aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig30
-rw-r--r--arch/arm/Makefile4
-rw-r--r--arch/arm/boot/Makefile8
-rw-r--r--arch/arm/common/rtctime.c1
-rw-r--r--arch/arm/common/scoop.c183
-rw-r--r--arch/arm/configs/am200epdkit_defconfig1149
-rw-r--r--arch/arm/configs/at91rm9200dk_defconfig4
-rw-r--r--arch/arm/configs/at91rm9200ek_defconfig4
-rw-r--r--arch/arm/configs/at91sam9260ek_defconfig520
-rw-r--r--arch/arm/configs/at91sam9261ek_defconfig573
-rw-r--r--arch/arm/configs/at91sam9263ek_defconfig557
-rw-r--r--arch/arm/configs/at91sam9rlek_defconfig430
-rw-r--r--arch/arm/configs/ateb9200_defconfig2
-rw-r--r--arch/arm/configs/cam60_defconfig1228
-rw-r--r--arch/arm/configs/csb337_defconfig732
-rw-r--r--arch/arm/configs/csb637_defconfig728
-rw-r--r--arch/arm/configs/ecbat91_defconfig1315
-rw-r--r--arch/arm/configs/kafa_defconfig4
-rw-r--r--arch/arm/configs/magician_defconfig1182
-rw-r--r--arch/arm/configs/ns9xxx_defconfig652
-rw-r--r--arch/arm/configs/orion5x_defconfig (renamed from arch/arm/configs/orion_defconfig)2
-rw-r--r--arch/arm/configs/picotux200_defconfig4
-rw-r--r--arch/arm/configs/sam9_l9260_defconfig1098
-rw-r--r--arch/arm/configs/tct_hammer_defconfig886
-rw-r--r--arch/arm/configs/yl9200_defconfig1216
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--arch/arm/kernel/asm-offsets.c10
-rw-r--r--arch/arm/kernel/calls.S4
-rw-r--r--arch/arm/kernel/entry-armv.S111
-rw-r--r--arch/arm/kernel/entry-common.S5
-rw-r--r--arch/arm/kernel/head-common.S7
-rw-r--r--arch/arm/kernel/thumbee.c81
-rw-r--r--arch/arm/mach-aaec2000/clock.c2
-rw-r--r--arch/arm/mach-at91/Kconfig33
-rw-r--r--arch/arm/mach-at91/Makefile3
-rw-r--r--arch/arm/mach-at91/at91cap9.c9
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c70
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c92
-rw-r--r--arch/arm/mach-at91/at91sam9260.c8
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c159
-rw-r--r--arch/arm/mach-at91/at91sam9261.c8
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c102
-rw-r--r--arch/arm/mach-at91/at91sam9263.c8
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c98
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c171
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c8
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c117
-rw-r--r--arch/arm/mach-at91/board-cam60.c180
-rw-r--r--arch/arm/mach-at91/board-cap9adk.c2
-rw-r--r--arch/arm/mach-at91/board-csb337.c18
-rw-r--r--arch/arm/mach-at91/board-csb637.c30
-rw-r--r--arch/arm/mach-at91/board-ecbat91.c178
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c199
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c83
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c83
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c25
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c23
-rwxr-xr-xarch/arm/mach-at91/board-yl-9200.c683
-rw-r--r--arch/arm/mach-at91/clock.c1
-rw-r--r--arch/arm/mach-at91/pm.c165
-rw-r--r--arch/arm/mach-clps711x/Kconfig2
-rw-r--r--arch/arm/mach-ep93xx/Makefile2
-rw-r--r--arch/arm/mach-ep93xx/core.c109
-rw-r--r--arch/arm/mach-ep93xx/gpio.c158
-rw-r--r--arch/arm/mach-integrator/clock.c1
-rw-r--r--arch/arm/mach-integrator/time.c2
-rw-r--r--arch/arm/mach-iop32x/Kconfig8
-rw-r--r--arch/arm/mach-iop32x/iq31244.c11
-rw-r--r--arch/arm/mach-iop32x/iq80321.c2
-rw-r--r--arch/arm/mach-iop33x/Kconfig8
-rw-r--r--arch/arm/mach-iop33x/iq80331.c2
-rw-r--r--arch/arm/mach-iop33x/iq80332.c2
-rw-r--r--arch/arm/mach-ks8695/Makefile3
-rw-r--r--arch/arm/mach-ks8695/devices.c21
-rw-r--r--arch/arm/mach-ks8695/leds.c94
-rw-r--r--arch/arm/mach-ns9xxx/Kconfig30
-rw-r--r--arch/arm/mach-ns9xxx/Makefile7
-rw-r--r--arch/arm/mach-ns9xxx/Makefile.boot2
-rw-r--r--arch/arm/mach-ns9xxx/board-a9m9750dev.c69
-rw-r--r--arch/arm/mach-ns9xxx/clock.c215
-rw-r--r--arch/arm/mach-ns9xxx/clock.h35
-rw-r--r--arch/arm/mach-ns9xxx/generic.c27
-rw-r--r--arch/arm/mach-ns9xxx/generic.h5
-rw-r--r--arch/arm/mach-ns9xxx/gpio-ns9360.c118
-rw-r--r--arch/arm/mach-ns9xxx/gpio-ns9360.h13
-rw-r--r--arch/arm/mach-ns9xxx/gpio.c141
-rw-r--r--arch/arm/mach-ns9xxx/irq.c74
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360dev.c8
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360js.c8
-rw-r--r--arch/arm/mach-ns9xxx/plat-serial8250.c69
-rw-r--r--arch/arm/mach-ns9xxx/processor-ns9360.c54
-rw-r--r--arch/arm/mach-ns9xxx/time-ns9360.c (renamed from arch/arm/mach-ns9xxx/time.c)75
-rw-r--r--arch/arm/mach-omap1/Makefile3
-rw-r--r--arch/arm/mach-omap1/board-osk.c138
-rw-r--r--arch/arm/mach-omap1/leds-osk.c80
-rw-r--r--arch/arm/mach-omap1/mux.c146
-rw-r--r--arch/arm/mach-omap1/time.c49
-rw-r--r--arch/arm/mach-omap1/timer32k.c (renamed from arch/arm/plat-omap/timer32k.c)76
-rw-r--r--arch/arm/mach-omap2/Makefile12
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c23
-rw-r--r--arch/arm/mach-omap2/board-apollon.c60
-rw-r--r--arch/arm/mach-omap2/board-h4.c111
-rw-r--r--arch/arm/mach-omap2/clock.c1362
-rw-r--r--arch/arm/mach-omap2/clock.h2129
-rw-r--r--arch/arm/mach-omap2/clock24xx.c539
-rw-r--r--arch/arm/mach-omap2/clock24xx.h2643
-rw-r--r--arch/arm/mach-omap2/clock34xx.c235
-rw-r--r--arch/arm/mach-omap2/clock34xx.h3009
-rw-r--r--arch/arm/mach-omap2/cm-regbits-24xx.h401
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h673
-rw-r--r--arch/arm/mach-omap2/cm.h124
-rw-r--r--arch/arm/mach-omap2/control.c74
-rw-r--r--arch/arm/mach-omap2/gpmc.c12
-rw-r--r--arch/arm/mach-omap2/memory.c74
-rw-r--r--arch/arm/mach-omap2/memory.h2
-rw-r--r--arch/arm/mach-omap2/mux.c121
-rw-r--r--arch/arm/mach-omap2/pm-domain.c299
-rw-r--r--arch/arm/mach-omap2/pm.c270
-rw-r--r--arch/arm/mach-omap2/prcm-common.h317
-rw-r--r--arch/arm/mach-omap2/prcm-regs.h483
-rw-r--r--arch/arm/mach-omap2/prcm.c14
-rw-r--r--arch/arm/mach-omap2/prm-regbits-24xx.h279
-rw-r--r--arch/arm/mach-omap2/prm-regbits-34xx.h582
-rw-r--r--arch/arm/mach-omap2/prm.h316
-rw-r--r--arch/arm/mach-omap2/sdrc.h58
-rw-r--r--arch/arm/mach-omap2/sleep.S23
-rw-r--r--arch/arm/mach-omap2/sram-fn.S42
-rw-r--r--arch/arm/mach-omap2/timer-gp.c152
-rw-r--r--arch/arm/mach-orion/addr-map.c490
-rw-r--r--arch/arm/mach-orion/common.h92
-rw-r--r--arch/arm/mach-orion/pci.c557
-rw-r--r--arch/arm/mach-orion/time.c181
-rw-r--r--arch/arm/mach-orion5x/Kconfig (renamed from arch/arm/mach-orion/Kconfig)10
-rw-r--r--arch/arm/mach-orion5x/Makefile (renamed from arch/arm/mach-orion/Makefile)3
-rw-r--r--arch/arm/mach-orion5x/Makefile.boot (renamed from arch/arm/mach-orion/Makefile.boot)0
-rw-r--r--arch/arm/mach-orion5x/addr-map.c240
-rw-r--r--arch/arm/mach-orion5x/common.c (renamed from arch/arm/mach-orion/common.c)220
-rw-r--r--arch/arm/mach-orion5x/common.h72
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c (renamed from arch/arm/mach-orion/db88f5281-setup.c)55
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c (renamed from arch/arm/mach-orion/dns323-setup.c)45
-rw-r--r--arch/arm/mach-orion5x/gpio.c (renamed from arch/arm/mach-orion/gpio.c)77
-rw-r--r--arch/arm/mach-orion5x/irq.c (renamed from arch/arm/mach-orion/irq.c)132
-rw-r--r--arch/arm/mach-orion5x/kurobox_pro-setup.c (renamed from arch/arm/mach-orion/kurobox_pro-setup.c)80
-rw-r--r--arch/arm/mach-orion5x/pci.c559
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c (renamed from arch/arm/mach-orion/rd88f5182-setup.c)53
-rw-r--r--arch/arm/mach-orion5x/ts209-setup.c (renamed from arch/arm/mach-orion/ts209-setup.c)145
-rw-r--r--arch/arm/mach-pnx4008/clock.c1
-rw-r--r--arch/arm/mach-pnx4008/gpio.c1
-rw-r--r--arch/arm/mach-pxa/Kconfig20
-rw-r--r--arch/arm/mach-pxa/Makefile7
-rw-r--r--arch/arm/mach-pxa/clock.c1
-rw-r--r--arch/arm/mach-pxa/cm-x270-pci.c1
-rw-r--r--arch/arm/mach-pxa/cm-x270.c1
-rw-r--r--arch/arm/mach-pxa/colibri.c1
-rw-r--r--arch/arm/mach-pxa/corgi.c1
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c1
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c1
-rw-r--r--arch/arm/mach-pxa/devices.c58
-rw-r--r--arch/arm/mach-pxa/devices.h1
-rw-r--r--arch/arm/mach-pxa/em-x270.c1
-rw-r--r--arch/arm/mach-pxa/generic.c62
-rw-r--r--arch/arm/mach-pxa/generic.h12
-rw-r--r--arch/arm/mach-pxa/gpio.c325
-rw-r--r--arch/arm/mach-pxa/gumstix.c147
-rw-r--r--arch/arm/mach-pxa/idp.c1
-rw-r--r--arch/arm/mach-pxa/irq.c336
-rw-r--r--arch/arm/mach-pxa/leds-trizeps4.c1
-rw-r--r--arch/arm/mach-pxa/littleton.c67
-rw-r--r--arch/arm/mach-pxa/lpd270.c1
-rw-r--r--arch/arm/mach-pxa/lubbock.c121
-rw-r--r--arch/arm/mach-pxa/magician.c486
-rw-r--r--arch/arm/mach-pxa/mainstone.c219
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c245
-rw-r--r--arch/arm/mach-pxa/mfp-pxa3xx.c (renamed from arch/arm/mach-pxa/mfp.c)20
-rw-r--r--arch/arm/mach-pxa/pcm027.c1
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c87
-rw-r--r--arch/arm/mach-pxa/poodle.c1
-rw-r--r--arch/arm/mach-pxa/pxa25x.c32
-rw-r--r--arch/arm/mach-pxa/pxa27x.c48
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c77
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c1
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c1
-rw-r--r--arch/arm/mach-pxa/tosa.c297
-rw-r--r--arch/arm/mach-pxa/trizeps4.c1
-rw-r--r--arch/arm/mach-pxa/zylonite.c69
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c8
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c8
-rw-r--r--arch/arm/mach-realview/Kconfig15
-rw-r--r--arch/arm/mach-realview/Makefile2
-rw-r--r--arch/arm/mach-realview/clock.c1
-rw-r--r--arch/arm/mach-realview/core.c53
-rw-r--r--arch/arm/mach-realview/core.h5
-rw-r--r--arch/arm/mach-realview/platsmp.c56
-rw-r--r--arch/arm/mach-realview/realview_eb.c149
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c292
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c342
-rw-r--r--arch/arm/mach-s3c2410/Kconfig7
-rw-r--r--arch/arm/mach-s3c2410/Makefile1
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c38
-rw-r--r--arch/arm/mach-s3c2410/mach-tct_hammer.c160
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c2
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c2
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c4
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c5
-rw-r--r--arch/arm/mach-sa1100/Makefile2
-rw-r--r--arch/arm/mach-sa1100/generic.c31
-rw-r--r--arch/arm/mach-sa1100/generic.h1
-rw-r--r--arch/arm/mach-sa1100/gpio.c65
-rw-r--r--arch/arm/mach-sa1100/irq.c2
-rw-r--r--arch/arm/mach-sa1100/time.c159
-rw-r--r--arch/arm/mach-versatile/clock.c1
-rw-r--r--arch/arm/mm/Kconfig42
-rw-r--r--arch/arm/mm/init.c2
-rw-r--r--arch/arm/mm/proc-arm1020.S1
-rw-r--r--arch/arm/mm/proc-arm1020e.S1
-rw-r--r--arch/arm/mm/proc-arm1022.S1
-rw-r--r--arch/arm/mm/proc-arm1026.S1
-rw-r--r--arch/arm/mm/proc-arm6_7.S2
-rw-r--r--arch/arm/mm/proc-arm720.S1
-rw-r--r--arch/arm/mm/proc-arm920.S1
-rw-r--r--arch/arm/mm/proc-arm922.S1
-rw-r--r--arch/arm/mm/proc-arm925.S1
-rw-r--r--arch/arm/mm/proc-arm926.S1
-rw-r--r--arch/arm/mm/proc-feroceon.S1
-rw-r--r--arch/arm/mm/proc-sa110.S1
-rw-r--r--arch/arm/mm/proc-sa1100.S1
-rw-r--r--arch/arm/mm/proc-v6.S15
-rw-r--r--arch/arm/mm/proc-v7.S1
-rw-r--r--arch/arm/mm/proc-xscale.S1
-rw-r--r--arch/arm/plat-iop/pci.c79
-rw-r--r--arch/arm/plat-mxc/Kconfig2
-rw-r--r--arch/arm/plat-mxc/Makefile4
-rw-r--r--arch/arm/plat-mxc/irq.c14
-rw-r--r--arch/arm/plat-omap/Makefile2
-rw-r--r--arch/arm/plat-omap/clock.c43
-rw-r--r--arch/arm/plat-omap/common.c64
-rw-r--r--arch/arm/plat-omap/gpio.c176
-rw-r--r--arch/arm/plat-omap/mux.c174
-rw-r--r--arch/arm/plat-omap/usb.c67
-rw-r--r--arch/arm/plat-orion/Makefile8
-rw-r--r--arch/arm/plat-orion/irq.c64
-rw-r--r--arch/arm/plat-orion/pcie.c245
-rw-r--r--arch/arm/plat-orion/time.c203
-rw-r--r--arch/arm/plat-s3c24xx/clock.c56
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c27
-rw-r--r--arch/arm/tools/mach-types117
-rw-r--r--arch/avr32/Kconfig5
-rw-r--r--arch/avr32/kernel/entry-avr32b.S20
-rw-r--r--arch/avr32/kernel/process.c6
-rw-r--r--arch/avr32/kernel/time.c248
-rw-r--r--arch/avr32/mach-at32ap/Makefile3
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c243
-rw-r--r--arch/avr32/mach-at32ap/intc.c1
-rw-r--r--arch/avr32/mach-at32ap/pm-at32ap700x.S66
-rw-r--r--arch/avr32/mach-at32ap/time-tc.c218
-rw-r--r--arch/avr32/mm/init.c3
-rw-r--r--arch/avr32/oprofile/op_model_avr32.c1
-rw-r--r--arch/blackfin/kernel/time.c5
-rw-r--r--arch/ia64/kernel/salinfo.c2
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c1
-rw-r--r--arch/m68k/atari/stram.c1
-rw-r--r--arch/m68k/sun3/intersil.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-console.c1
-rw-r--r--arch/parisc/kernel/sys_parisc32.c1
-rw-r--r--arch/powerpc/Kconfig82
-rw-r--r--arch/powerpc/Kconfig.debug2
-rw-r--r--arch/powerpc/Makefile12
-rw-r--r--arch/powerpc/boot/Makefile40
-rw-r--r--arch/powerpc/boot/bamboo.c3
-rw-r--r--arch/powerpc/boot/cpm-serial.c117
-rw-r--r--arch/powerpc/boot/cuboot-pq2.c27
-rw-r--r--arch/powerpc/boot/cuboot-rainier.c3
-rw-r--r--arch/powerpc/boot/cuboot-sequoia.c3
-rw-r--r--arch/powerpc/boot/cuboot-taishan.c3
-rw-r--r--arch/powerpc/boot/cuboot-warp.c2
-rw-r--r--arch/powerpc/boot/cuboot-yosemite.c44
-rw-r--r--arch/powerpc/boot/devtree.c20
-rw-r--r--arch/powerpc/boot/dts/bamboo.dts2
-rw-r--r--arch/powerpc/boot/dts/canyonlands.dts402
-rw-r--r--arch/powerpc/boot/dts/ebony.dts2
-rw-r--r--arch/powerpc/boot/dts/ep8248e.dts5
-rw-r--r--arch/powerpc/boot/dts/ep88xc.dts73
-rw-r--r--arch/powerpc/boot/dts/glacier.dts467
-rw-r--r--arch/powerpc/boot/dts/haleakala.dts4
-rw-r--r--arch/powerpc/boot/dts/katmai.dts2
-rw-r--r--arch/powerpc/boot/dts/kilauea.dts4
-rw-r--r--arch/powerpc/boot/dts/ksi8560.dts267
-rw-r--r--arch/powerpc/boot/dts/kuroboxHD.dts83
-rw-r--r--arch/powerpc/boot/dts/kuroboxHG.dts83
-rw-r--r--arch/powerpc/boot/dts/makalu.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts97
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts132
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts7
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts173
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts161
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts299
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts289
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts161
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts209
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts291
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts383
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts58
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts77
-rw-r--r--arch/powerpc/boot/dts/pq2fads.dts126
-rw-r--r--arch/powerpc/boot/dts/prpmc2800.dts336
-rw-r--r--arch/powerpc/boot/dts/rainier.dts6
-rw-r--r--arch/powerpc/boot/dts/sbc8641d.dts352
-rw-r--r--arch/powerpc/boot/dts/sequoia.dts6
-rw-r--r--arch/powerpc/boot/dts/taishan.dts31
-rw-r--r--arch/powerpc/boot/dts/walnut.dts1
-rw-r--r--arch/powerpc/boot/dts/warp.dts1
-rw-r--r--arch/powerpc/boot/dts/yosemite.dts304
-rw-r--r--arch/powerpc/boot/ebony.c3
-rw-r--r--arch/powerpc/boot/libfdt-wrapper.c2
-rw-r--r--arch/powerpc/boot/mpc52xx-psc.c9
-rw-r--r--arch/powerpc/boot/mpsc.c2
-rw-r--r--arch/powerpc/boot/mv64x60.c4
-rw-r--r--arch/powerpc/boot/mv64x60_i2c.c2
-rw-r--r--arch/powerpc/boot/ns16550.c10
-rw-r--r--arch/powerpc/boot/ops.h1
-rw-r--r--arch/powerpc/boot/prpmc2800.c23
-rw-r--r--arch/powerpc/boot/ps3-head.S25
-rw-r--r--arch/powerpc/boot/ps3.c23
-rw-r--r--arch/powerpc/boot/serial.c2
-rw-r--r--arch/powerpc/boot/simpleboot.c84
-rw-r--r--arch/powerpc/boot/treeboot-walnut.c2
-rw-r--r--arch/powerpc/boot/virtex405-head.S30
-rwxr-xr-xarch/powerpc/boot/wrapper32
-rw-r--r--arch/powerpc/configs/40x/ep405_defconfig (renamed from arch/powerpc/configs/ep405_defconfig)0
-rw-r--r--arch/powerpc/configs/40x/kilauea_defconfig (renamed from arch/powerpc/configs/kilauea_defconfig)0
-rw-r--r--arch/powerpc/configs/40x/makalu_defconfig (renamed from arch/powerpc/configs/makalu_defconfig)0
-rw-r--r--arch/powerpc/configs/40x/walnut_defconfig (renamed from arch/powerpc/configs/walnut_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/bamboo_defconfig (renamed from arch/powerpc/configs/bamboo_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/canyonlands_defconfig721
-rw-r--r--arch/powerpc/configs/44x/ebony_defconfig (renamed from arch/powerpc/configs/ebony_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/katmai_defconfig (renamed from arch/powerpc/configs/katmai_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/rainier_defconfig (renamed from arch/powerpc/configs/rainier_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/sequoia_defconfig (renamed from arch/powerpc/configs/sequoia_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/taishan_defconfig (renamed from arch/powerpc/configs/taishan_defconfig)0
-rw-r--r--arch/powerpc/configs/44x/warp_defconfig (renamed from arch/powerpc/configs/warp_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc8313_rdb_defconfig (renamed from arch/powerpc/configs/mpc8313_rdb_defconfig)8
-rw-r--r--arch/powerpc/configs/83xx/mpc8315_rdb_defconfig (renamed from arch/powerpc/configs/mpc8315_rdb_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_mds_defconfig (renamed from arch/powerpc/configs/mpc832x_mds_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_rdb_defconfig (renamed from arch/powerpc/configs/mpc832x_rdb_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itx_defconfig (renamed from arch/powerpc/configs/mpc834x_itx_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig (renamed from arch/powerpc/configs/mpc834x_itxgp_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_mds_defconfig (renamed from arch/powerpc/configs/mpc834x_mds_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_mds_defconfig (renamed from arch/powerpc/configs/mpc836x_mds_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_mds_defconfig (renamed from arch/powerpc/configs/mpc837x_mds_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_rdb_defconfig (renamed from arch/powerpc/configs/mpc837x_rdb_defconfig)0
-rw-r--r--arch/powerpc/configs/83xx/sbc834x_defconfig (renamed from arch/powerpc/configs/sbc834x_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/ksi8560_defconfig899
-rw-r--r--arch/powerpc/configs/85xx/mpc8540_ads_defconfig (renamed from arch/powerpc/configs/mpc8540_ads_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/mpc8544_ds_defconfig (renamed from arch/powerpc/configs/mpc8544_ds_defconfig)17
-rw-r--r--arch/powerpc/configs/85xx/mpc8560_ads_defconfig (renamed from arch/powerpc/configs/mpc8560_ads_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/mpc8568mds_defconfig (renamed from arch/powerpc/configs/mpc8568mds_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/mpc8572_ds_defconfig (renamed from arch/powerpc/configs/mpc8572_ds_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/mpc85xx_cds_defconfig (renamed from arch/powerpc/configs/mpc85xx_cds_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/sbc8548_defconfig (renamed from arch/powerpc/configs/sbc8548_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/sbc8560_defconfig (renamed from arch/powerpc/configs/sbc8560_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/stx_gp3_defconfig (renamed from arch/powerpc/configs/stx_gp3_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/tqm8540_defconfig (renamed from arch/powerpc/configs/tqm8540_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/tqm8541_defconfig (renamed from arch/powerpc/configs/tqm8541_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/tqm8555_defconfig (renamed from arch/powerpc/configs/tqm8555_defconfig)0
-rw-r--r--arch/powerpc/configs/85xx/tqm8560_defconfig (renamed from arch/powerpc/configs/tqm8560_defconfig)0
-rw-r--r--arch/powerpc/configs/chrp32_defconfig7
-rw-r--r--arch/powerpc/configs/g5_defconfig7
-rw-r--r--arch/powerpc/configs/iseries_defconfig7
-rw-r--r--arch/powerpc/configs/maple_defconfig131
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig164
-rw-r--r--arch/powerpc/configs/pmac32_defconfig7
-rw-r--r--arch/powerpc/configs/ppc40x_defconfig896
-rw-r--r--arch/powerpc/configs/ppc44x_defconfig14
-rw-r--r--arch/powerpc/configs/ppc64_defconfig8
-rw-r--r--arch/powerpc/configs/pseries_defconfig8
-rw-r--r--arch/powerpc/configs/sbc8641d_defconfig1342
-rw-r--r--arch/powerpc/kernel/Makefile1
-rw-r--r--arch/powerpc/kernel/asm-offsets.c10
-rw-r--r--arch/powerpc/kernel/btext.c3
-rw-r--r--arch/powerpc/kernel/cpu_setup_44x.S5
-rw-r--r--arch/powerpc/kernel/cputable.c28
-rw-r--r--arch/powerpc/kernel/crash.c3
-rw-r--r--arch/powerpc/kernel/crash_dump.c3
-rw-r--r--arch/powerpc/kernel/entry_32.S30
-rw-r--r--arch/powerpc/kernel/entry_64.S30
-rw-r--r--arch/powerpc/kernel/head_32.S22
-rw-r--r--arch/powerpc/kernel/head_44x.S4
-rw-r--r--arch/powerpc/kernel/head_64.S69
-rw-r--r--arch/powerpc/kernel/head_booke.h33
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S44
-rw-r--r--arch/powerpc/kernel/ibmebus.c12
-rw-r--r--arch/powerpc/kernel/iommu.c4
-rw-r--r--arch/powerpc/kernel/irq.c18
-rw-r--r--arch/powerpc/kernel/isa-bridge.c6
-rw-r--r--arch/powerpc/kernel/lparcfg.c12
-rw-r--r--arch/powerpc/kernel/machine_kexec.c3
-rw-r--r--arch/powerpc/kernel/paca.c34
-rw-r--r--arch/powerpc/kernel/ppc32.h2
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c7
-rw-r--r--arch/powerpc/kernel/process.c33
-rw-r--r--arch/powerpc/kernel/prom.c120
-rw-r--r--arch/powerpc/kernel/prom_init.c8
-rw-r--r--arch/powerpc/kernel/ptrace32.c27
-rw-r--r--arch/powerpc/kernel/rtas.c5
-rw-r--r--arch/powerpc/kernel/rtas_flash.c2
-rw-r--r--arch/powerpc/kernel/rtas_pci.c29
-rw-r--r--arch/powerpc/kernel/setup-common.c11
-rw-r--r--arch/powerpc/kernel/setup_32.c14
-rw-r--r--arch/powerpc/kernel/setup_64.c8
-rw-r--r--arch/powerpc/kernel/signal_32.c19
-rw-r--r--arch/powerpc/kernel/stacktrace.c47
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c6
-rw-r--r--arch/powerpc/kernel/syscalls.c1
-rw-r--r--arch/powerpc/kernel/vdso.c3
-rw-r--r--arch/powerpc/kernel/vio.c10
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S51
-rw-r--r--arch/powerpc/lib/rheap.c4
-rw-r--r--arch/powerpc/lib/string.S14
-rw-r--r--arch/powerpc/math-emu/fabs.c2
-rw-r--r--arch/powerpc/math-emu/fadd.c2
-rw-r--r--arch/powerpc/math-emu/fadds.c2
-rw-r--r--arch/powerpc/math-emu/fcmpo.c2
-rw-r--r--arch/powerpc/math-emu/fcmpu.c2
-rw-r--r--arch/powerpc/math-emu/fctiw.c2
-rw-r--r--arch/powerpc/math-emu/fctiwz.c2
-rw-r--r--arch/powerpc/math-emu/fdiv.c6
-rw-r--r--arch/powerpc/math-emu/fdivs.c6
-rw-r--r--arch/powerpc/math-emu/fmadd.c2
-rw-r--r--arch/powerpc/math-emu/fmadds.c2
-rw-r--r--arch/powerpc/math-emu/fmr.c2
-rw-r--r--arch/powerpc/math-emu/fmsub.c2
-rw-r--r--arch/powerpc/math-emu/fmsubs.c2
-rw-r--r--arch/powerpc/math-emu/fmul.c2
-rw-r--r--arch/powerpc/math-emu/fmuls.c2
-rw-r--r--arch/powerpc/math-emu/fnabs.c2
-rw-r--r--arch/powerpc/math-emu/fneg.c2
-rw-r--r--arch/powerpc/math-emu/fnmadd.c2
-rw-r--r--arch/powerpc/math-emu/fnmadds.c2
-rw-r--r--arch/powerpc/math-emu/fnmsub.c2
-rw-r--r--arch/powerpc/math-emu/fnmsubs.c2
-rw-r--r--arch/powerpc/math-emu/fres.c2
-rw-r--r--arch/powerpc/math-emu/frsp.c2
-rw-r--r--arch/powerpc/math-emu/frsqrte.c2
-rw-r--r--arch/powerpc/math-emu/fsel.c2
-rw-r--r--arch/powerpc/math-emu/fsqrt.c2
-rw-r--r--arch/powerpc/math-emu/fsqrts.c2
-rw-r--r--arch/powerpc/math-emu/fsub.c2
-rw-r--r--arch/powerpc/math-emu/fsubs.c2
-rw-r--r--arch/powerpc/math-emu/lfd.c2
-rw-r--r--arch/powerpc/math-emu/lfs.c2
-rw-r--r--arch/powerpc/math-emu/mcrfs.c4
-rw-r--r--arch/powerpc/math-emu/mffs.c2
-rw-r--r--arch/powerpc/math-emu/mtfsb0.c2
-rw-r--r--arch/powerpc/math-emu/mtfsb1.c2
-rw-r--r--arch/powerpc/math-emu/mtfsf.c2
-rw-r--r--arch/powerpc/math-emu/mtfsfi.c2
-rw-r--r--arch/powerpc/math-emu/stfd.c2
-rw-r--r--arch/powerpc/math-emu/stfiwx.c2
-rw-r--r--arch/powerpc/math-emu/stfs.c2
-rw-r--r--arch/powerpc/mm/40x_mmu.c2
-rw-r--r--arch/powerpc/mm/44x_mmu.c2
-rw-r--r--arch/powerpc/mm/Makefile2
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c48
-rw-r--r--arch/powerpc/mm/hash_utils_64.c32
-rw-r--r--arch/powerpc/mm/init_32.c27
-rw-r--r--arch/powerpc/mm/init_64.c7
-rw-r--r--arch/powerpc/mm/lmb.c357
-rw-r--r--arch/powerpc/mm/mem.c21
-rw-r--r--arch/powerpc/mm/mmu_decl.h4
-rw-r--r--arch/powerpc/mm/numa.c3
-rw-r--r--arch/powerpc/mm/pgtable_32.c5
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c15
-rw-r--r--arch/powerpc/mm/stab.c4
-rw-r--r--arch/powerpc/oprofile/cell/spu_task_sync.c12
-rw-r--r--arch/powerpc/oprofile/cell/vma_map.c10
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c14
-rw-r--r--arch/powerpc/platforms/40x/ep405.c2
-rw-r--r--arch/powerpc/platforms/40x/kilauea.c4
-rw-r--r--arch/powerpc/platforms/40x/makalu.c2
-rw-r--r--arch/powerpc/platforms/40x/virtex.c2
-rw-r--r--arch/powerpc/platforms/40x/walnut.c4
-rw-r--r--arch/powerpc/platforms/44x/44x.h1
-rw-r--r--arch/powerpc/platforms/44x/Kconfig27
-rw-r--r--arch/powerpc/platforms/44x/Makefile4
-rw-r--r--arch/powerpc/platforms/44x/bamboo.c15
-rw-r--r--arch/powerpc/platforms/44x/canyonlands.c63
-rw-r--r--arch/powerpc/platforms/44x/ebony.c5
-rw-r--r--arch/powerpc/platforms/44x/idle.c67
-rw-r--r--arch/powerpc/platforms/44x/katmai.c5
-rw-r--r--arch/powerpc/platforms/44x/misc_44x.S11
-rw-r--r--arch/powerpc/platforms/44x/rainier.c4
-rw-r--r--arch/powerpc/platforms/44x/sequoia.c4
-rw-r--r--arch/powerpc/platforms/44x/taishan.c5
-rw-r--r--arch/powerpc/platforms/44x/warp-nand.c3
-rw-r--r--arch/powerpc/platforms/44x/warp.c6
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c4
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h2
-rw-r--r--arch/powerpc/platforms/83xx/usb.c12
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig13
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/ksi8560.c257
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c15
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig8
-rw-r--r--arch/powerpc/platforms/86xx/Makefile1
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c4
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c14
-rw-r--r--arch/powerpc/platforms/86xx/sbc8641d.c164
-rw-r--r--arch/powerpc/platforms/8xx/Kconfig4
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c7
-rw-r--r--arch/powerpc/platforms/Kconfig8
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype2
-rw-r--r--arch/powerpc/platforms/cell/iommu.c10
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c2
-rw-r--r--arch/powerpc/platforms/cell/ras.c10
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c8
-rw-r--r--arch/powerpc/platforms/cell/spu_callbacks.c2
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c8
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c8
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c9
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c14
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c2
-rw-r--r--arch/powerpc/platforms/celleb/beat.c17
-rw-r--r--arch/powerpc/platforms/celleb/beat.h4
-rw-r--r--arch/powerpc/platforms/celleb/beat_wrapper.h3
-rw-r--r--arch/powerpc/platforms/celleb/htab.c7
-rw-r--r--arch/powerpc/platforms/celleb/interrupt.c26
-rw-r--r--arch/powerpc/platforms/celleb/scc_epci.c8
-rw-r--r--arch/powerpc/platforms/celleb/scc_sio.c4
-rw-r--r--arch/powerpc/platforms/celleb/spu_priv1.c3
-rw-r--r--arch/powerpc/platforms/celleb/udbg_beat.c5
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c10
-rw-r--r--arch/powerpc/platforms/embedded6xx/prpmc2800.c4
-rw-r--r--arch/powerpc/platforms/iseries/exception.S12
-rw-r--r--arch/powerpc/platforms/iseries/ipl_parms.h2
-rw-r--r--arch/powerpc/platforms/iseries/lpardata.c121
-rw-r--r--arch/powerpc/platforms/iseries/naca.h2
-rw-r--r--arch/powerpc/platforms/iseries/pci.c3
-rw-r--r--arch/powerpc/platforms/iseries/release_data.h2
-rw-r--r--arch/powerpc/platforms/iseries/spcomm_area.h2
-rw-r--r--arch/powerpc/platforms/iseries/vpd_areas.h4
-rw-r--r--arch/powerpc/platforms/maple/pci.c47
-rw-r--r--arch/powerpc/platforms/maple/setup.c4
-rw-r--r--arch/powerpc/platforms/pasemi/dma_lib.c144
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c19
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c1
-rw-r--r--arch/powerpc/platforms/powermac/setup.c2
-rw-r--r--arch/powerpc/platforms/ps3/device-init.c78
-rw-r--r--arch/powerpc/platforms/ps3/htab.c3
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c2
-rw-r--r--arch/powerpc/platforms/ps3/mm.c3
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c3
-rw-r--r--arch/powerpc/platforms/ps3/setup.c14
-rw-r--r--arch/powerpc/platforms/ps3/spu.c7
-rw-r--r--arch/powerpc/platforms/pseries/Makefile1
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c5
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c25
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/phyp_dump.c507
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h2
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c12
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c37
-rw-r--r--arch/powerpc/platforms/pseries/setup.c105
-rw-r--r--arch/powerpc/platforms/pseries/xics.c87
-rw-r--r--arch/powerpc/platforms/pseries/xics.h3
-rw-r--r--arch/powerpc/sysdev/Makefile2
-rw-r--r--arch/powerpc/sysdev/cpm1.c114
-rw-r--r--arch/powerpc/sysdev/cpm2.c105
-rw-r--r--arch/powerpc/sysdev/cpm_common.c3
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c2
-rw-r--r--arch/powerpc/sysdev/fsl_lbc.c129
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c611
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h1
-rw-r--r--arch/powerpc/sysdev/mpic.c41
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c78
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c6
-rw-r--r--arch/powerpc/sysdev/mv64x60_pic.c4
-rw-r--r--arch/powerpc/sysdev/mv64x60_udbg.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.c133
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.h59
-rw-r--r--arch/powerpc/sysdev/ppc4xx_soc.c200
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c13
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_io.c7
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c32
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c18
-rw-r--r--arch/powerpc/sysdev/rtc_cmos_setup.c2
-rw-r--r--arch/powerpc/sysdev/tsi108_dev.c4
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c4
-rw-r--r--arch/powerpc/xmon/xmon.c24
-rw-r--r--arch/ppc/8xx_io/commproc.c2
-rw-r--r--arch/ppc/8xx_io/fec.c7
-rw-r--r--arch/ppc/kernel/head.S17
-rw-r--r--arch/ppc/mm/init.c1
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c8
-rw-r--r--arch/ppc/platforms/sbc82xx.c4
-rw-r--r--arch/ppc/syslib/mpc52xx_setup.c2
-rw-r--r--arch/ppc/syslib/ocp.c1
-rw-r--r--arch/s390/kernel/compat_linux.c1
-rw-r--r--arch/s390/kernel/debug.c1
-rw-r--r--arch/sh/Kconfig30
-rw-r--r--arch/sh/Kconfig.debug13
-rw-r--r--arch/sh/Makefile1
-rw-r--r--arch/sh/boards/renesas/migor/setup.c197
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7780mp.c39
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c42
-rw-r--r--arch/sh/boards/se/7721/Makefile1
-rw-r--r--arch/sh/boards/se/7721/irq.c45
-rw-r--r--arch/sh/boards/se/7721/setup.c99
-rw-r--r--arch/sh/boards/se/7722/setup.c41
-rw-r--r--arch/sh/configs/se7721_defconfig1085
-rw-r--r--arch/sh/kernel/cf-enabler.c15
-rw-r--r--arch/sh/kernel/cpu/sh2a/Makefile7
-rw-r--r--arch/sh/kernel/cpu/sh2a/probe.c3
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-mxg.c168
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c33
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c28
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c300
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c10
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7770.c37
-rw-r--r--arch/sh/kernel/setup.c15
-rw-r--r--arch/sh/lib/clear_page.S6
-rw-r--r--arch/sh/lib/copy_page.S6
-rw-r--r--arch/sh/mm/cache-debugfs.c4
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--arch/sh/tools/mach-types5
-rw-r--r--arch/sparc/kernel/time.c2
-rw-r--r--arch/sparc64/Kconfig1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/v850/kernel/syscalls.c1
-rw-r--r--arch/x86/Kconfig12
-rw-r--r--arch/x86/boot/a20.c2
-rw-r--r--arch/x86/boot/apm.c2
-rw-r--r--arch/x86/boot/bitops.h2
-rw-r--r--arch/x86/boot/boot.h2
-rw-r--r--arch/x86/boot/cmdline.c2
-rw-r--r--arch/x86/boot/compressed/head_32.S15
-rw-r--r--arch/x86/boot/compressed/head_64.S30
-rw-r--r--arch/x86/boot/compressed/misc.c8
-rw-r--r--arch/x86/boot/compressed/vmlinux_64.lds4
-rw-r--r--arch/x86/boot/copy.S2
-rw-r--r--arch/x86/boot/cpucheck.c2
-rw-r--r--arch/x86/boot/edd.c2
-rw-r--r--arch/x86/boot/install.sh2
-rw-r--r--arch/x86/boot/main.c2
-rw-r--r--arch/x86/boot/mca.c2
-rw-r--r--arch/x86/boot/memory.c2
-rw-r--r--arch/x86/boot/pm.c2
-rw-r--r--arch/x86/boot/pmjump.S2
-rw-r--r--arch/x86/boot/printf.c2
-rw-r--r--arch/x86/boot/string.c2
-rw-r--r--arch/x86/boot/tty.c2
-rw-r--r--arch/x86/boot/version.c2
-rw-r--r--arch/x86/boot/video-bios.c2
-rw-r--r--arch/x86/boot/video-vesa.c2
-rw-r--r--arch/x86/boot/video-vga.c2
-rw-r--r--arch/x86/boot/video.c2
-rw-r--r--arch/x86/boot/video.h2
-rw-r--r--arch/x86/boot/voyager.c2
-rw-r--r--arch/x86/ia32/sys_ia32.c1
-rw-r--r--arch/x86/kernel/Makefile9
-rw-r--r--arch/x86/kernel/acpi/cstate.c6
-rw-r--r--arch/x86/kernel/acpi/processor.c2
-rw-r--r--arch/x86/kernel/cpu/common.c1
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c28
-rw-r--r--arch/x86/kernel/cpu/cpufreq/p4-clockmod.c4
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c32
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c13
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-ich.c20
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c92
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c46
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c1
-rw-r--r--arch/x86/kernel/cpu/proc.c1
-rw-r--r--arch/x86/kernel/cpuid.c4
-rw-r--r--arch/x86/kernel/e820_32.c4
-rw-r--r--arch/x86/kernel/e820_64.c4
-rw-r--r--arch/x86/kernel/efi.c18
-rw-r--r--arch/x86/kernel/efi_64.c12
-rw-r--r--arch/x86/kernel/entry_32.S1
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c17
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/kernel/head_32.S1
-rw-r--r--arch/x86/kernel/i387.c114
-rw-r--r--arch/x86/kernel/io_apic_64.c2
-rw-r--r--arch/x86/kernel/kgdb.c6
-rw-r--r--arch/x86/kernel/microcode.c16
-rw-r--r--arch/x86/kernel/msr.c4
-rw-r--r--arch/x86/kernel/nmi_32.c3
-rw-r--r--arch/x86/kernel/nmi_64.c6
-rw-r--r--arch/x86/kernel/pci-calgary_64.c3
-rw-r--r--arch/x86/kernel/pci-dma.c (renamed from arch/x86/kernel/pci-dma_64.c)546
-rw-r--r--arch/x86/kernel/pci-dma_32.c177
-rw-r--r--arch/x86/kernel/pci-gart_64.c15
-rw-r--r--arch/x86/kernel/pci-nommu.c (renamed from arch/x86/kernel/pci-nommu_64.c)34
-rw-r--r--arch/x86/kernel/pci-swiotlb_64.c9
-rw-r--r--arch/x86/kernel/process.c44
-rw-r--r--arch/x86/kernel/process_32.c50
-rw-r--r--arch/x86/kernel/process_64.c74
-rw-r--r--arch/x86/kernel/reboot.c2
-rw-r--r--arch/x86/kernel/setup.c28
-rw-r--r--arch/x86/kernel/setup64.c4
-rw-r--r--arch/x86/kernel/setup_32.c7
-rw-r--r--arch/x86/kernel/setup_64.c13
-rw-r--r--arch/x86/kernel/smpboot.c29
-rw-r--r--arch/x86/kernel/traps_32.c35
-rw-r--r--arch/x86/kernel/traps_64.c36
-rw-r--r--arch/x86/kernel/tsc_32.c23
-rw-r--r--arch/x86/kernel/tsc_64.c23
-rw-r--r--arch/x86/mach-visws/visws_apic.c2
-rw-r--r--arch/x86/mach-voyager/voyager_basic.c2
-rw-r--r--arch/x86/mach-voyager/voyager_cat.c2
-rw-r--r--arch/x86/mach-voyager/voyager_smp.c2
-rw-r--r--arch/x86/mach-voyager/voyager_thread.c2
-rw-r--r--arch/x86/math-emu/fpu_entry.c4
-rw-r--r--arch/x86/math-emu/fpu_system.h26
-rw-r--r--arch/x86/math-emu/reg_ld_str.c4
-rw-r--r--arch/x86/mm/discontig_32.c6
-rw-r--r--arch/x86/mm/init_32.c1
-rw-r--r--arch/x86/mm/init_64.c3
-rw-r--r--arch/x86/mm/ioremap.c5
-rw-r--r--arch/x86/mm/k8topology_64.c2
-rw-r--r--arch/x86/mm/numa_64.c19
-rw-r--r--arch/x86/mm/pgtable_32.c4
-rw-r--r--arch/x86/mm/srat_64.c32
-rw-r--r--arch/x86/oprofile/nmi_int.c49
-rw-r--r--arch/x86/vdso/Makefile3
-rw-r--r--arch/x86/video/fbdev.c1
734 files changed, 44564 insertions, 15629 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a133006e..d8d253285a94 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -255,6 +255,7 @@ config ARCH_EP93XX
255 select ARM_AMBA 255 select ARM_AMBA
256 select ARM_VIC 256 select ARM_VIC
257 select GENERIC_GPIO 257 select GENERIC_GPIO
258 select HAVE_GPIO_LIB
258 help 259 help
259 This enables support for the Cirrus EP93xx series of CPUs. 260 This enables support for the Cirrus EP93xx series of CPUs.
260 261
@@ -377,15 +378,17 @@ config ARCH_MXC
377 help 378 help
378 Support for Freescale MXC/iMX-based family of processors 379 Support for Freescale MXC/iMX-based family of processors
379 380
380config ARCH_ORION 381config ARCH_ORION5X
381 bool "Marvell Orion" 382 bool "Marvell Orion"
382 depends on MMU 383 depends on MMU
383 select PCI 384 select PCI
384 select GENERIC_GPIO 385 select GENERIC_GPIO
385 select GENERIC_TIME 386 select GENERIC_TIME
386 select GENERIC_CLOCKEVENTS 387 select GENERIC_CLOCKEVENTS
388 select PLAT_ORION
387 help 389 help
388 Support for Marvell Orion System on Chip family. 390 Support for the following Marvell Orion 5x series SoCs:
391 Orion-1 (5181), Orion-NAS (5182), Orion-2 (5281.)
389 392
390config ARCH_PNX4008 393config ARCH_PNX4008
391 bool "Philips Nexperia PNX4008 Mobile" 394 bool "Philips Nexperia PNX4008 Mobile"
@@ -422,10 +425,15 @@ config ARCH_SA1100
422 bool "SA1100-based" 425 bool "SA1100-based"
423 select ISA 426 select ISA
424 select ARCH_DISCONTIGMEM_ENABLE 427 select ARCH_DISCONTIGMEM_ENABLE
428 select ARCH_SPARSEMEM_ENABLE
429 select ARCH_SELECT_MEMORY_MODEL
425 select ARCH_MTD_XIP 430 select ARCH_MTD_XIP
426 select GENERIC_GPIO 431 select GENERIC_GPIO
427 select GENERIC_TIME 432 select GENERIC_TIME
433 select GENERIC_CLOCKEVENTS
434 select TICK_ONESHOT
428 select HAVE_IDE 435 select HAVE_IDE
436 select HAVE_GPIO_LIB
429 help 437 help
430 Support for StrongARM 11x0 based boards. 438 Support for StrongARM 11x0 based boards.
431 439
@@ -468,6 +476,7 @@ config ARCH_DAVINCI
468config ARCH_OMAP 476config ARCH_OMAP
469 bool "TI OMAP" 477 bool "TI OMAP"
470 select GENERIC_GPIO 478 select GENERIC_GPIO
479 select HAVE_GPIO_LIB
471 select GENERIC_TIME 480 select GENERIC_TIME
472 select GENERIC_CLOCKEVENTS 481 select GENERIC_CLOCKEVENTS
473 help 482 help
@@ -516,7 +525,7 @@ source "arch/arm/mach-omap1/Kconfig"
516 525
517source "arch/arm/mach-omap2/Kconfig" 526source "arch/arm/mach-omap2/Kconfig"
518 527
519source "arch/arm/mach-orion/Kconfig" 528source "arch/arm/mach-orion5x/Kconfig"
520 529
521source "arch/arm/plat-s3c24xx/Kconfig" 530source "arch/arm/plat-s3c24xx/Kconfig"
522source "arch/arm/plat-s3c/Kconfig" 531source "arch/arm/plat-s3c/Kconfig"
@@ -563,6 +572,9 @@ config ARCH_ACORN
563config PLAT_IOP 572config PLAT_IOP
564 bool 573 bool
565 574
575config PLAT_ORION
576 bool
577
566source arch/arm/mm/Kconfig 578source arch/arm/mm/Kconfig
567 579
568config IWMMXT 580config IWMMXT
@@ -650,7 +662,7 @@ source "kernel/time/Kconfig"
650 662
651config SMP 663config SMP
652 bool "Symmetric Multi-Processing (EXPERIMENTAL)" 664 bool "Symmetric Multi-Processing (EXPERIMENTAL)"
653 depends on EXPERIMENTAL && REALVIEW_EB_ARM11MP 665 depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP)
654 help 666 help
655 This enables support for systems with more than one CPU. If you have 667 This enables support for systems with more than one CPU. If you have
656 a system with only one CPU, like most personal computers, say N. If 668 a system with only one CPU, like most personal computers, say N. If
@@ -683,7 +695,7 @@ config HOTPLUG_CPU
683 695
684config LOCAL_TIMERS 696config LOCAL_TIMERS
685 bool "Use local timer interrupts" 697 bool "Use local timer interrupts"
686 depends on SMP && REALVIEW_EB_ARM11MP 698 depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP)
687 default y 699 default y
688 help 700 help
689 Enable support for local timers on SMP platforms, rather then the 701 Enable support for local timers on SMP platforms, rather then the
@@ -774,6 +786,12 @@ config ARCH_DISCONTIGMEM_ENABLE
774 or have huge holes in the physical address space for other reasons. 786 or have huge holes in the physical address space for other reasons.
775 See <file:Documentation/vm/numa> for more. 787 See <file:Documentation/vm/numa> for more.
776 788
789config ARCH_SPARSEMEM_ENABLE
790 bool
791
792config ARCH_SELECT_MEMORY_MODEL
793 bool
794
777config NODES_SHIFT 795config NODES_SHIFT
778 int 796 int
779 default "4" if ARCH_LH7A40X 797 default "4" if ARCH_LH7A40X
@@ -1174,6 +1192,8 @@ source "drivers/dma/Kconfig"
1174 1192
1175source "drivers/dca/Kconfig" 1193source "drivers/dca/Kconfig"
1176 1194
1195source "drivers/uio/Kconfig"
1196
1177endmenu 1197endmenu
1178 1198
1179source "fs/Kconfig" 1199source "fs/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 1a4649667ec8..e72db27e0ba0 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -134,12 +134,11 @@ endif
134 machine-$(CONFIG_ARCH_PNX4008) := pnx4008 134 machine-$(CONFIG_ARCH_PNX4008) := pnx4008
135 machine-$(CONFIG_ARCH_NETX) := netx 135 machine-$(CONFIG_ARCH_NETX) := netx
136 machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx 136 machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
137 textofs-$(CONFIG_ARCH_NS9XXX) := 0x00108000
138 machine-$(CONFIG_ARCH_DAVINCI) := davinci 137 machine-$(CONFIG_ARCH_DAVINCI) := davinci
139 machine-$(CONFIG_ARCH_KS8695) := ks8695 138 machine-$(CONFIG_ARCH_KS8695) := ks8695
140 incdir-$(CONFIG_ARCH_MXC) := mxc 139 incdir-$(CONFIG_ARCH_MXC) := mxc
141 machine-$(CONFIG_ARCH_MX3) := mx3 140 machine-$(CONFIG_ARCH_MX3) := mx3
142 machine-$(CONFIG_ARCH_ORION) := orion 141 machine-$(CONFIG_ARCH_ORION5X) := orion5x
143 machine-$(CONFIG_ARCH_MSM7X00A) := msm 142 machine-$(CONFIG_ARCH_MSM7X00A) := msm
144 143
145ifeq ($(CONFIG_ARCH_EBSA110),y) 144ifeq ($(CONFIG_ARCH_EBSA110),y)
@@ -185,6 +184,7 @@ core-$(CONFIG_VFP) += arch/arm/vfp/
185 184
186# If we have a common platform directory, then include it in the build. 185# If we have a common platform directory, then include it in the build.
187core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/ 186core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/
187core-$(CONFIG_PLAT_ORION) += arch/arm/plat-orion/
188core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ 188core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
189core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/ 189core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/
190core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/ 190core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 25f12303b106..da226abce2d0 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -61,9 +61,15 @@ endif
61 61
62quiet_cmd_uimage = UIMAGE $@ 62quiet_cmd_uimage = UIMAGE $@
63 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ 63 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
64 -C none -a $(ZRELADDR) -e $(ZRELADDR) \ 64 -C none -a $(LOADADDR) -e $(LOADADDR) \
65 -n 'Linux-$(KERNELRELEASE)' -d $< $@ 65 -n 'Linux-$(KERNELRELEASE)' -d $< $@
66 66
67ifeq ($(CONFIG_ZBOOT_ROM),y)
68$(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
69else
70$(obj)/uImage: LOADADDR=$(ZRELADDR)
71endif
72
67$(obj)/uImage: $(obj)/zImage FORCE 73$(obj)/uImage: $(obj)/zImage FORCE
68 $(call if_changed,uimage) 74 $(call if_changed,uimage)
69 @echo ' Image $@ is ready' 75 @echo ' Image $@ is ready'
diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c
index f53bca46e23c..aa8f7739c822 100644
--- a/arch/arm/common/rtctime.c
+++ b/arch/arm/common/rtctime.c
@@ -22,7 +22,6 @@
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23 23
24#include <asm/rtc.h> 24#include <asm/rtc.h>
25#include <asm/semaphore.h>
26 25
27static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); 26static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
28static struct fasync_struct *rtc_async_queue; 27static struct fasync_struct *rtc_async_queue;
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index 314ebd3a1d71..bc299b07a6fa 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -16,6 +16,7 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/gpio.h>
19#include <asm/hardware/scoop.h> 20#include <asm/hardware/scoop.h>
20 21
21/* PCMCIA to Scoop linkage 22/* PCMCIA to Scoop linkage
@@ -30,10 +31,9 @@
30struct scoop_pcmcia_config *platform_scoop_config; 31struct scoop_pcmcia_config *platform_scoop_config;
31EXPORT_SYMBOL(platform_scoop_config); 32EXPORT_SYMBOL(platform_scoop_config);
32 33
33#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
34
35struct scoop_dev { 34struct scoop_dev {
36 void *base; 35 void __iomem *base;
36 struct gpio_chip gpio;
37 spinlock_t scoop_lock; 37 spinlock_t scoop_lock;
38 unsigned short suspend_clr; 38 unsigned short suspend_clr;
39 unsigned short suspend_set; 39 unsigned short suspend_set;
@@ -44,13 +44,84 @@ void reset_scoop(struct device *dev)
44{ 44{
45 struct scoop_dev *sdev = dev_get_drvdata(dev); 45 struct scoop_dev *sdev = dev_get_drvdata(dev);
46 46
47 SCOOP_REG(sdev->base,SCOOP_MCR) = 0x0100; // 00 47 iowrite16(0x0100, sdev->base + SCOOP_MCR); // 00
48 SCOOP_REG(sdev->base,SCOOP_CDR) = 0x0000; // 04 48 iowrite16(0x0000, sdev->base + SCOOP_CDR); // 04
49 SCOOP_REG(sdev->base,SCOOP_CCR) = 0x0000; // 10 49 iowrite16(0x0000, sdev->base + SCOOP_CCR); // 10
50 SCOOP_REG(sdev->base,SCOOP_IMR) = 0x0000; // 18 50 iowrite16(0x0000, sdev->base + SCOOP_IMR); // 18
51 SCOOP_REG(sdev->base,SCOOP_IRM) = 0x00FF; // 14 51 iowrite16(0x00FF, sdev->base + SCOOP_IRM); // 14
52 SCOOP_REG(sdev->base,SCOOP_ISR) = 0x0000; // 1C 52 iowrite16(0x0000, sdev->base + SCOOP_ISR); // 1C
53 SCOOP_REG(sdev->base,SCOOP_IRM) = 0x0000; 53 iowrite16(0x0000, sdev->base + SCOOP_IRM);
54}
55
56static void __scoop_gpio_set(struct scoop_dev *sdev,
57 unsigned offset, int value)
58{
59 unsigned short gpwr;
60
61 gpwr = ioread16(sdev->base + SCOOP_GPWR);
62 if (value)
63 gpwr |= 1 << (offset + 1);
64 else
65 gpwr &= ~(1 << (offset + 1));
66 iowrite16(gpwr, sdev->base + SCOOP_GPWR);
67}
68
69static void scoop_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
70{
71 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio);
72 unsigned long flags;
73
74 spin_lock_irqsave(&sdev->scoop_lock, flags);
75
76 __scoop_gpio_set(sdev, offset, value);
77
78 spin_unlock_irqrestore(&sdev->scoop_lock, flags);
79}
80
81static int scoop_gpio_get(struct gpio_chip *chip, unsigned offset)
82{
83 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio);
84
85 /* XXX: I'm usure, but it seems so */
86 return ioread16(sdev->base + SCOOP_GPRR) & (1 << (offset + 1));
87}
88
89static int scoop_gpio_direction_input(struct gpio_chip *chip,
90 unsigned offset)
91{
92 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio);
93 unsigned long flags;
94 unsigned short gpcr;
95
96 spin_lock_irqsave(&sdev->scoop_lock, flags);
97
98 gpcr = ioread16(sdev->base + SCOOP_GPCR);
99 gpcr &= ~(1 << (offset + 1));
100 iowrite16(gpcr, sdev->base + SCOOP_GPCR);
101
102 spin_unlock_irqrestore(&sdev->scoop_lock, flags);
103
104 return 0;
105}
106
107static int scoop_gpio_direction_output(struct gpio_chip *chip,
108 unsigned offset, int value)
109{
110 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio);
111 unsigned long flags;
112 unsigned short gpcr;
113
114 spin_lock_irqsave(&sdev->scoop_lock, flags);
115
116 __scoop_gpio_set(sdev, offset, value);
117
118 gpcr = ioread16(sdev->base + SCOOP_GPCR);
119 gpcr |= 1 << (offset + 1);
120 iowrite16(gpcr, sdev->base + SCOOP_GPCR);
121
122 spin_unlock_irqrestore(&sdev->scoop_lock, flags);
123
124 return 0;
54} 125}
55 126
56unsigned short set_scoop_gpio(struct device *dev, unsigned short bit) 127unsigned short set_scoop_gpio(struct device *dev, unsigned short bit)
@@ -60,8 +131,8 @@ unsigned short set_scoop_gpio(struct device *dev, unsigned short bit)
60 struct scoop_dev *sdev = dev_get_drvdata(dev); 131 struct scoop_dev *sdev = dev_get_drvdata(dev);
61 132
62 spin_lock_irqsave(&sdev->scoop_lock, flag); 133 spin_lock_irqsave(&sdev->scoop_lock, flag);
63 gpio_bit = SCOOP_REG(sdev->base, SCOOP_GPWR) | bit; 134 gpio_bit = ioread16(sdev->base + SCOOP_GPWR) | bit;
64 SCOOP_REG(sdev->base, SCOOP_GPWR) = gpio_bit; 135 iowrite16(gpio_bit, sdev->base + SCOOP_GPWR);
65 spin_unlock_irqrestore(&sdev->scoop_lock, flag); 136 spin_unlock_irqrestore(&sdev->scoop_lock, flag);
66 137
67 return gpio_bit; 138 return gpio_bit;
@@ -74,8 +145,8 @@ unsigned short reset_scoop_gpio(struct device *dev, unsigned short bit)
74 struct scoop_dev *sdev = dev_get_drvdata(dev); 145 struct scoop_dev *sdev = dev_get_drvdata(dev);
75 146
76 spin_lock_irqsave(&sdev->scoop_lock, flag); 147 spin_lock_irqsave(&sdev->scoop_lock, flag);
77 gpio_bit = SCOOP_REG(sdev->base, SCOOP_GPWR) & ~bit; 148 gpio_bit = ioread16(sdev->base + SCOOP_GPWR) & ~bit;
78 SCOOP_REG(sdev->base,SCOOP_GPWR) = gpio_bit; 149 iowrite16(gpio_bit, sdev->base + SCOOP_GPWR);
79 spin_unlock_irqrestore(&sdev->scoop_lock, flag); 150 spin_unlock_irqrestore(&sdev->scoop_lock, flag);
80 151
81 return gpio_bit; 152 return gpio_bit;
@@ -87,13 +158,13 @@ EXPORT_SYMBOL(reset_scoop_gpio);
87unsigned short read_scoop_reg(struct device *dev, unsigned short reg) 158unsigned short read_scoop_reg(struct device *dev, unsigned short reg)
88{ 159{
89 struct scoop_dev *sdev = dev_get_drvdata(dev); 160 struct scoop_dev *sdev = dev_get_drvdata(dev);
90 return SCOOP_REG(sdev->base,reg); 161 return ioread16(sdev->base + reg);
91} 162}
92 163
93void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data) 164void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data)
94{ 165{
95 struct scoop_dev *sdev = dev_get_drvdata(dev); 166 struct scoop_dev *sdev = dev_get_drvdata(dev);
96 SCOOP_REG(sdev->base,reg)=data; 167 iowrite16(data, sdev->base + reg);
97} 168}
98 169
99EXPORT_SYMBOL(reset_scoop); 170EXPORT_SYMBOL(reset_scoop);
@@ -104,9 +175,9 @@ static void check_scoop_reg(struct scoop_dev *sdev)
104{ 175{
105 unsigned short mcr; 176 unsigned short mcr;
106 177
107 mcr = SCOOP_REG(sdev->base, SCOOP_MCR); 178 mcr = ioread16(sdev->base + SCOOP_MCR);
108 if ((mcr & 0x100) == 0) 179 if ((mcr & 0x100) == 0)
109 SCOOP_REG(sdev->base, SCOOP_MCR) = 0x0101; 180 iowrite16(0x0101, sdev->base + SCOOP_MCR);
110} 181}
111 182
112#ifdef CONFIG_PM 183#ifdef CONFIG_PM
@@ -115,8 +186,8 @@ static int scoop_suspend(struct platform_device *dev, pm_message_t state)
115 struct scoop_dev *sdev = platform_get_drvdata(dev); 186 struct scoop_dev *sdev = platform_get_drvdata(dev);
116 187
117 check_scoop_reg(sdev); 188 check_scoop_reg(sdev);
118 sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR); 189 sdev->scoop_gpwr = ioread16(sdev->base + SCOOP_GPWR);
119 SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set; 190 iowrite16((sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set, sdev->base + SCOOP_GPWR);
120 191
121 return 0; 192 return 0;
122} 193}
@@ -126,7 +197,7 @@ static int scoop_resume(struct platform_device *dev)
126 struct scoop_dev *sdev = platform_get_drvdata(dev); 197 struct scoop_dev *sdev = platform_get_drvdata(dev);
127 198
128 check_scoop_reg(sdev); 199 check_scoop_reg(sdev);
129 SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; 200 iowrite16(sdev->scoop_gpwr, sdev->base + SCOOP_GPWR);
130 201
131 return 0; 202 return 0;
132} 203}
@@ -135,11 +206,13 @@ static int scoop_resume(struct platform_device *dev)
135#define scoop_resume NULL 206#define scoop_resume NULL
136#endif 207#endif
137 208
138int __init scoop_probe(struct platform_device *pdev) 209static int __devinit scoop_probe(struct platform_device *pdev)
139{ 210{
140 struct scoop_dev *devptr; 211 struct scoop_dev *devptr;
141 struct scoop_config *inf; 212 struct scoop_config *inf;
142 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 213 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
214 int ret;
215 int temp;
143 216
144 if (!mem) 217 if (!mem)
145 return -EINVAL; 218 return -EINVAL;
@@ -154,40 +227,78 @@ int __init scoop_probe(struct platform_device *pdev)
154 devptr->base = ioremap(mem->start, mem->end - mem->start + 1); 227 devptr->base = ioremap(mem->start, mem->end - mem->start + 1);
155 228
156 if (!devptr->base) { 229 if (!devptr->base) {
157 kfree(devptr); 230 ret = -ENOMEM;
158 return -ENOMEM; 231 goto err_ioremap;
159 } 232 }
160 233
161 platform_set_drvdata(pdev, devptr); 234 platform_set_drvdata(pdev, devptr);
162 235
163 printk("Sharp Scoop Device found at 0x%08x -> 0x%08x\n",(unsigned int)mem->start,(unsigned int)devptr->base); 236 printk("Sharp Scoop Device found at 0x%08x -> 0x%8p\n",(unsigned int)mem->start, devptr->base);
164 237
165 SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140; 238 iowrite16(0x0140, devptr->base + SCOOP_MCR);
166 reset_scoop(&pdev->dev); 239 reset_scoop(&pdev->dev);
167 SCOOP_REG(devptr->base, SCOOP_CPR) = 0x0000; 240 iowrite16(0x0000, devptr->base + SCOOP_CPR);
168 SCOOP_REG(devptr->base, SCOOP_GPCR) = inf->io_dir & 0xffff; 241 iowrite16(inf->io_dir & 0xffff, devptr->base + SCOOP_GPCR);
169 SCOOP_REG(devptr->base, SCOOP_GPWR) = inf->io_out & 0xffff; 242 iowrite16(inf->io_out & 0xffff, devptr->base + SCOOP_GPWR);
170 243
171 devptr->suspend_clr = inf->suspend_clr; 244 devptr->suspend_clr = inf->suspend_clr;
172 devptr->suspend_set = inf->suspend_set; 245 devptr->suspend_set = inf->suspend_set;
173 246
247 devptr->gpio.base = -1;
248
249 if (inf->gpio_base != 0) {
250 devptr->gpio.label = pdev->dev.bus_id;
251 devptr->gpio.base = inf->gpio_base;
252 devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */
253 devptr->gpio.set = scoop_gpio_set;
254 devptr->gpio.get = scoop_gpio_get;
255 devptr->gpio.direction_input = scoop_gpio_direction_input;
256 devptr->gpio.direction_output = scoop_gpio_direction_output;
257
258 ret = gpiochip_add(&devptr->gpio);
259 if (ret)
260 goto err_gpio;
261 }
262
174 return 0; 263 return 0;
264
265 if (devptr->gpio.base != -1)
266 temp = gpiochip_remove(&devptr->gpio);
267err_gpio:
268 platform_set_drvdata(pdev, NULL);
269err_ioremap:
270 iounmap(devptr->base);
271 kfree(devptr);
272
273 return ret;
175} 274}
176 275
177static int scoop_remove(struct platform_device *pdev) 276static int __devexit scoop_remove(struct platform_device *pdev)
178{ 277{
179 struct scoop_dev *sdev = platform_get_drvdata(pdev); 278 struct scoop_dev *sdev = platform_get_drvdata(pdev);
180 if (sdev) { 279 int ret;
181 iounmap(sdev->base); 280
182 kfree(sdev); 281 if (!sdev)
183 platform_set_drvdata(pdev, NULL); 282 return -EINVAL;
283
284 if (sdev->gpio.base != -1) {
285 ret = gpiochip_remove(&sdev->gpio);
286 if (ret) {
287 dev_err(&pdev->dev, "Can't remove gpio chip: %d\n", ret);
288 return ret;
289 }
184 } 290 }
291
292 platform_set_drvdata(pdev, NULL);
293 iounmap(sdev->base);
294 kfree(sdev);
295
185 return 0; 296 return 0;
186} 297}
187 298
188static struct platform_driver scoop_driver = { 299static struct platform_driver scoop_driver = {
189 .probe = scoop_probe, 300 .probe = scoop_probe,
190 .remove = scoop_remove, 301 .remove = __devexit_p(scoop_remove),
191 .suspend = scoop_suspend, 302 .suspend = scoop_suspend,
192 .resume = scoop_resume, 303 .resume = scoop_resume,
193 .driver = { 304 .driver = {
@@ -195,7 +306,7 @@ static struct platform_driver scoop_driver = {
195 }, 306 },
196}; 307};
197 308
198int __init scoop_init(void) 309static int __init scoop_init(void)
199{ 310{
200 return platform_driver_register(&scoop_driver); 311 return platform_driver_register(&scoop_driver);
201} 312}
diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am200epdkit_defconfig
new file mode 100644
index 000000000000..dc030cfe5009
--- /dev/null
+++ b/arch/arm/configs/am200epdkit_defconfig
@@ -0,0 +1,1149 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc3
4# Sun Mar 9 06:33:33 2008
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_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
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ARCH_SUPPORTS_AOUT=y
25CONFIG_ZONE_DMA=y
26CONFIG_ARCH_MTD_XIP=y
27CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
29
30#
31# General setup
32#
33CONFIG_EXPERIMENTAL=y
34CONFIG_BROKEN_ON_SMP=y
35CONFIG_LOCK_KERNEL=y
36CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION="gum"
38CONFIG_LOCALVERSION_AUTO=y
39# CONFIG_SWAP is not set
40CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y
42# CONFIG_POSIX_MQUEUE is not set
43# CONFIG_BSD_PROCESS_ACCT is not set
44# CONFIG_TASKSTATS is not set
45# CONFIG_AUDIT is not set
46# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=17
48# CONFIG_CGROUPS is not set
49CONFIG_GROUP_SCHED=y
50CONFIG_FAIR_GROUP_SCHED=y
51# CONFIG_RT_GROUP_SCHED is not set
52CONFIG_USER_SCHED=y
53# CONFIG_CGROUP_SCHED is not set
54# CONFIG_SYSFS_DEPRECATED is not set
55# CONFIG_RELAY is not set
56# CONFIG_NAMESPACES is not set
57# CONFIG_BLK_DEV_INITRD is not set
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y
60CONFIG_EMBEDDED=y
61CONFIG_UID16=y
62# CONFIG_SYSCTL_SYSCALL is not set
63CONFIG_KALLSYMS=y
64# CONFIG_KALLSYMS_ALL is not set
65# CONFIG_KALLSYMS_EXTRA_PASS is not set
66CONFIG_HOTPLUG=y
67CONFIG_PRINTK=y
68CONFIG_BUG=y
69CONFIG_ELF_CORE=y
70CONFIG_COMPAT_BRK=y
71CONFIG_BASE_FULL=y
72CONFIG_FUTEX=y
73CONFIG_ANON_INODES=y
74# CONFIG_EPOLL is not set
75CONFIG_SIGNALFD=y
76CONFIG_TIMERFD=y
77CONFIG_EVENTFD=y
78# CONFIG_SHMEM is not set
79# CONFIG_VM_EVENT_COUNTERS is not set
80CONFIG_SLAB=y
81# CONFIG_SLUB is not set
82# CONFIG_SLOB is not set
83# CONFIG_PROFILING is not set
84# CONFIG_MARKERS is not set
85CONFIG_HAVE_OPROFILE=y
86# CONFIG_KPROBES is not set
87CONFIG_HAVE_KPROBES=y
88CONFIG_PROC_PAGE_MONITOR=y
89CONFIG_SLABINFO=y
90CONFIG_RT_MUTEXES=y
91CONFIG_TINY_SHMEM=y
92CONFIG_BASE_SMALL=0
93CONFIG_MODULES=y
94CONFIG_MODULE_UNLOAD=y
95# CONFIG_MODULE_FORCE_UNLOAD is not set
96# CONFIG_MODVERSIONS is not set
97# CONFIG_MODULE_SRCVERSION_ALL is not set
98CONFIG_KMOD=y
99CONFIG_BLOCK=y
100# CONFIG_LBD is not set
101# CONFIG_BLK_DEV_IO_TRACE is not set
102# CONFIG_LSF is not set
103# CONFIG_BLK_DEV_BSG is not set
104
105#
106# IO Schedulers
107#
108CONFIG_IOSCHED_NOOP=y
109# CONFIG_IOSCHED_AS is not set
110# CONFIG_IOSCHED_DEADLINE is not set
111# CONFIG_IOSCHED_CFQ is not set
112# CONFIG_DEFAULT_AS is not set
113# CONFIG_DEFAULT_DEADLINE is not set
114# CONFIG_DEFAULT_CFQ is not set
115CONFIG_DEFAULT_NOOP=y
116CONFIG_DEFAULT_IOSCHED="noop"
117CONFIG_CLASSIC_RCU=y
118# CONFIG_PREEMPT_RCU is not set
119
120#
121# System Type
122#
123# CONFIG_ARCH_AAEC2000 is not set
124# CONFIG_ARCH_INTEGRATOR is not set
125# CONFIG_ARCH_REALVIEW is not set
126# CONFIG_ARCH_VERSATILE is not set
127# CONFIG_ARCH_AT91 is not set
128# CONFIG_ARCH_CLPS7500 is not set
129# CONFIG_ARCH_CLPS711X is not set
130# CONFIG_ARCH_CO285 is not set
131# CONFIG_ARCH_EBSA110 is not set
132# CONFIG_ARCH_EP93XX is not set
133# CONFIG_ARCH_FOOTBRIDGE is not set
134# CONFIG_ARCH_NETX is not set
135# CONFIG_ARCH_H720X is not set
136# CONFIG_ARCH_IMX is not set
137# CONFIG_ARCH_IOP13XX is not set
138# CONFIG_ARCH_IOP32X is not set
139# CONFIG_ARCH_IOP33X is not set
140# CONFIG_ARCH_IXP23XX is not set
141# CONFIG_ARCH_IXP2000 is not set
142# CONFIG_ARCH_IXP4XX is not set
143# CONFIG_ARCH_L7200 is not set
144# CONFIG_ARCH_KS8695 is not set
145# CONFIG_ARCH_NS9XXX is not set
146# CONFIG_ARCH_MXC is not set
147# CONFIG_ARCH_ORION is not set
148# CONFIG_ARCH_PNX4008 is not set
149CONFIG_ARCH_PXA=y
150# CONFIG_ARCH_RPC is not set
151# CONFIG_ARCH_SA1100 is not set
152# CONFIG_ARCH_S3C2410 is not set
153# CONFIG_ARCH_SHARK is not set
154# CONFIG_ARCH_LH7A40X is not set
155# CONFIG_ARCH_DAVINCI is not set
156# CONFIG_ARCH_OMAP is not set
157# CONFIG_ARCH_MSM7X00A is not set
158
159#
160# Intel PXA2xx/PXA3xx Implementations
161#
162CONFIG_ARCH_GUMSTIX=y
163# CONFIG_ARCH_LUBBOCK is not set
164# CONFIG_MACH_LOGICPD_PXA270 is not set
165# CONFIG_MACH_MAINSTONE is not set
166# CONFIG_ARCH_PXA_IDP is not set
167# CONFIG_PXA_SHARPSL is not set
168# CONFIG_ARCH_PXA_ESERIES is not set
169# CONFIG_MACH_TRIZEPS4 is not set
170# CONFIG_MACH_EM_X270 is not set
171# CONFIG_MACH_COLIBRI is not set
172# CONFIG_MACH_ZYLONITE is not set
173# CONFIG_MACH_LITTLETON is not set
174# CONFIG_MACH_ARMCORE is not set
175# CONFIG_MACH_MAGICIAN is not set
176# CONFIG_MACH_PCM027 is not set
177CONFIG_MACH_GUMSTIX_F=y
178CONFIG_PXA25x=y
179
180#
181# Boot options
182#
183
184#
185# Power management
186#
187
188#
189# Processor Type
190#
191CONFIG_CPU_32=y
192CONFIG_CPU_XSCALE=y
193CONFIG_CPU_32v5=y
194CONFIG_CPU_ABRT_EV5T=y
195CONFIG_CPU_CACHE_VIVT=y
196CONFIG_CPU_TLB_V4WBI=y
197CONFIG_CPU_CP15=y
198CONFIG_CPU_CP15_MMU=y
199
200#
201# Processor Features
202#
203CONFIG_ARM_THUMB=y
204# CONFIG_CPU_DCACHE_DISABLE is not set
205# CONFIG_OUTER_CACHE is not set
206# CONFIG_IWMMXT is not set
207CONFIG_XSCALE_PMU=y
208
209#
210# Bus support
211#
212# CONFIG_PCI_SYSCALL is not set
213# CONFIG_ARCH_SUPPORTS_MSI is not set
214CONFIG_PCCARD=y
215# CONFIG_PCMCIA_DEBUG is not set
216CONFIG_PCMCIA=y
217CONFIG_PCMCIA_LOAD_CIS=y
218# CONFIG_PCMCIA_IOCTL is not set
219
220#
221# PC-card bridges
222#
223CONFIG_PCMCIA_PXA2XX=y
224
225#
226# Kernel Features
227#
228CONFIG_TICK_ONESHOT=y
229# CONFIG_NO_HZ is not set
230# CONFIG_HIGH_RES_TIMERS is not set
231CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
232CONFIG_PREEMPT=y
233CONFIG_HZ=100
234CONFIG_AEABI=y
235# CONFIG_OABI_COMPAT is not set
236# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
237CONFIG_SELECT_MEMORY_MODEL=y
238CONFIG_FLATMEM_MANUAL=y
239# CONFIG_DISCONTIGMEM_MANUAL is not set
240# CONFIG_SPARSEMEM_MANUAL is not set
241CONFIG_FLATMEM=y
242CONFIG_FLAT_NODE_MEM_MAP=y
243# CONFIG_SPARSEMEM_STATIC is not set
244# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
245CONFIG_SPLIT_PTLOCK_CPUS=4096
246# CONFIG_RESOURCES_64BIT is not set
247CONFIG_ZONE_DMA_FLAG=1
248CONFIG_BOUNCE=y
249CONFIG_VIRT_TO_BUS=y
250CONFIG_ALIGNMENT_TRAP=y
251
252#
253# Boot options
254#
255CONFIG_ZBOOT_ROM_TEXT=0x0
256CONFIG_ZBOOT_ROM_BSS=0x0
257CONFIG_CMDLINE="console=ttyS0,115200n8 root=1f01 rootfstype=jffs2"
258# CONFIG_XIP_KERNEL is not set
259# CONFIG_KEXEC is not set
260
261#
262# CPU Frequency scaling
263#
264# CONFIG_CPU_FREQ is not set
265
266#
267# Floating point emulation
268#
269
270#
271# At least one emulation must be selected
272#
273
274#
275# Userspace binary formats
276#
277CONFIG_BINFMT_ELF=y
278# CONFIG_BINFMT_AOUT is not set
279# CONFIG_BINFMT_MISC is not set
280
281#
282# Power management options
283#
284# CONFIG_PM is not set
285CONFIG_ARCH_SUSPEND_POSSIBLE=y
286
287#
288# Networking
289#
290CONFIG_NET=y
291
292#
293# Networking options
294#
295CONFIG_PACKET=m
296CONFIG_PACKET_MMAP=y
297CONFIG_UNIX=y
298# CONFIG_NET_KEY is not set
299CONFIG_INET=y
300# CONFIG_IP_MULTICAST is not set
301# CONFIG_IP_ADVANCED_ROUTER is not set
302CONFIG_IP_FIB_HASH=y
303# CONFIG_IP_PNP is not set
304# CONFIG_NET_IPIP is not set
305# CONFIG_NET_IPGRE is not set
306# CONFIG_ARPD is not set
307# CONFIG_SYN_COOKIES is not set
308# CONFIG_INET_AH is not set
309# CONFIG_INET_ESP is not set
310# CONFIG_INET_IPCOMP is not set
311# CONFIG_INET_XFRM_TUNNEL is not set
312# CONFIG_INET_TUNNEL is not set
313# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
314# CONFIG_INET_XFRM_MODE_TUNNEL is not set
315# CONFIG_INET_XFRM_MODE_BEET is not set
316# CONFIG_INET_LRO is not set
317# CONFIG_INET_DIAG is not set
318# CONFIG_TCP_CONG_ADVANCED is not set
319CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic"
321# CONFIG_TCP_MD5SIG is not set
322# CONFIG_IPV6 is not set
323# CONFIG_INET6_XFRM_TUNNEL is not set
324# CONFIG_INET6_TUNNEL is not set
325# CONFIG_NETWORK_SECMARK is not set
326# CONFIG_NETFILTER is not set
327# CONFIG_IP_DCCP is not set
328# CONFIG_IP_SCTP is not set
329# CONFIG_TIPC is not set
330# CONFIG_ATM is not set
331# CONFIG_BRIDGE is not set
332# CONFIG_VLAN_8021Q is not set
333# CONFIG_DECNET is not set
334# CONFIG_LLC2 is not set
335# CONFIG_IPX is not set
336# CONFIG_ATALK is not set
337# CONFIG_X25 is not set
338# CONFIG_LAPB is not set
339# CONFIG_ECONET is not set
340# CONFIG_WAN_ROUTER is not set
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_CAN is not set
349# CONFIG_IRDA is not set
350CONFIG_BT=m
351CONFIG_BT_L2CAP=m
352CONFIG_BT_SCO=m
353CONFIG_BT_RFCOMM=m
354CONFIG_BT_RFCOMM_TTY=y
355CONFIG_BT_BNEP=m
356# CONFIG_BT_BNEP_MC_FILTER is not set
357# CONFIG_BT_BNEP_PROTO_FILTER is not set
358# CONFIG_BT_HIDP is not set
359
360#
361# Bluetooth device drivers
362#
363# CONFIG_BT_HCIBTSDIO is not set
364CONFIG_BT_HCIUART=m
365CONFIG_BT_HCIUART_H4=y
366# CONFIG_BT_HCIUART_BCSP is not set
367# CONFIG_BT_HCIUART_LL is not set
368# CONFIG_BT_HCIDTL1 is not set
369# CONFIG_BT_HCIBT3C is not set
370# CONFIG_BT_HCIBLUECARD is not set
371# CONFIG_BT_HCIBTUART is not set
372# CONFIG_BT_HCIVHCI is not set
373# CONFIG_AF_RXRPC is not set
374
375#
376# Wireless
377#
378# CONFIG_CFG80211 is not set
379CONFIG_WIRELESS_EXT=y
380# CONFIG_MAC80211 is not set
381CONFIG_IEEE80211=m
382# CONFIG_IEEE80211_DEBUG is not set
383CONFIG_IEEE80211_CRYPT_WEP=m
384# CONFIG_IEEE80211_CRYPT_CCMP is not set
385# CONFIG_IEEE80211_CRYPT_TKIP is not set
386# CONFIG_IEEE80211_SOFTMAC is not set
387# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set
389
390#
391# Device Drivers
392#
393
394#
395# Generic Driver Options
396#
397CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
398CONFIG_STANDALONE=y
399CONFIG_PREVENT_FIRMWARE_BUILD=y
400CONFIG_FW_LOADER=y
401# CONFIG_DEBUG_DRIVER is not set
402# CONFIG_DEBUG_DEVRES is not set
403# CONFIG_SYS_HYPERVISOR is not set
404# CONFIG_CONNECTOR is not set
405CONFIG_MTD=y
406# CONFIG_MTD_DEBUG is not set
407# CONFIG_MTD_CONCAT is not set
408CONFIG_MTD_PARTITIONS=y
409# CONFIG_MTD_REDBOOT_PARTS is not set
410# CONFIG_MTD_CMDLINE_PARTS is not set
411# CONFIG_MTD_AFS_PARTS is not set
412
413#
414# User Modules And Translation Layers
415#
416CONFIG_MTD_CHAR=y
417CONFIG_MTD_BLKDEVS=y
418CONFIG_MTD_BLOCK=y
419# CONFIG_FTL is not set
420# CONFIG_NFTL is not set
421# CONFIG_INFTL is not set
422# CONFIG_RFD_FTL is not set
423# CONFIG_SSFDC is not set
424# CONFIG_MTD_OOPS is not set
425
426#
427# RAM/ROM/Flash chip drivers
428#
429CONFIG_MTD_CFI=y
430# CONFIG_MTD_JEDECPROBE is not set
431CONFIG_MTD_GEN_PROBE=y
432CONFIG_MTD_CFI_ADV_OPTIONS=y
433CONFIG_MTD_CFI_NOSWAP=y
434# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
435# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
436CONFIG_MTD_CFI_GEOMETRY=y
437# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
438CONFIG_MTD_MAP_BANK_WIDTH_2=y
439# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
440# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
441# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
442# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
443CONFIG_MTD_CFI_I1=y
444# CONFIG_MTD_CFI_I2 is not set
445# CONFIG_MTD_CFI_I4 is not set
446# CONFIG_MTD_CFI_I8 is not set
447# CONFIG_MTD_OTP is not set
448CONFIG_MTD_CFI_INTELEXT=y
449# CONFIG_MTD_CFI_AMDSTD is not set
450# CONFIG_MTD_CFI_STAA is not set
451CONFIG_MTD_CFI_UTIL=y
452# CONFIG_MTD_RAM is not set
453# CONFIG_MTD_ROM is not set
454# CONFIG_MTD_ABSENT is not set
455# CONFIG_MTD_XIP is not set
456
457#
458# Mapping drivers for chip access
459#
460CONFIG_MTD_COMPLEX_MAPPINGS=y
461# CONFIG_MTD_PHYSMAP is not set
462CONFIG_MTD_PXA2XX=y
463# CONFIG_MTD_ARM_INTEGRATOR is not set
464# CONFIG_MTD_SHARP_SL is not set
465# CONFIG_MTD_PLATRAM is not set
466
467#
468# Self-contained MTD device drivers
469#
470# CONFIG_MTD_SLRAM is not set
471# CONFIG_MTD_PHRAM is not set
472# CONFIG_MTD_MTDRAM is not set
473# CONFIG_MTD_BLOCK2MTD is not set
474
475#
476# Disk-On-Chip Device Drivers
477#
478# CONFIG_MTD_DOC2000 is not set
479# CONFIG_MTD_DOC2001 is not set
480# CONFIG_MTD_DOC2001PLUS is not set
481# CONFIG_MTD_NAND is not set
482# CONFIG_MTD_ONENAND is not set
483
484#
485# UBI - Unsorted block images
486#
487# CONFIG_MTD_UBI is not set
488# CONFIG_PARPORT is not set
489CONFIG_BLK_DEV=y
490# CONFIG_BLK_DEV_COW_COMMON is not set
491CONFIG_BLK_DEV_LOOP=m
492# CONFIG_BLK_DEV_CRYPTOLOOP is not set
493# CONFIG_BLK_DEV_NBD is not set
494# CONFIG_BLK_DEV_RAM is not set
495# CONFIG_CDROM_PKTCDVD is not set
496# CONFIG_ATA_OVER_ETH is not set
497CONFIG_MISC_DEVICES=y
498# CONFIG_EEPROM_93CX6 is not set
499# CONFIG_ENCLOSURE_SERVICES is not set
500CONFIG_HAVE_IDE=y
501CONFIG_IDE=m
502CONFIG_IDE_MAX_HWIFS=2
503CONFIG_BLK_DEV_IDE=m
504
505#
506# Please see Documentation/ide.txt for help/info on IDE drives
507#
508# CONFIG_BLK_DEV_IDE_SATA is not set
509CONFIG_BLK_DEV_IDEDISK=m
510# CONFIG_IDEDISK_MULTI_MODE is not set
511CONFIG_BLK_DEV_IDECS=m
512# CONFIG_BLK_DEV_IDECD is not set
513# CONFIG_BLK_DEV_IDETAPE is not set
514# CONFIG_BLK_DEV_IDEFLOPPY is not set
515# CONFIG_IDE_TASK_IOCTL is not set
516CONFIG_IDE_PROC_FS=y
517
518#
519# IDE chipset support/bugfixes
520#
521CONFIG_IDE_GENERIC=m
522# CONFIG_BLK_DEV_PLATFORM is not set
523# CONFIG_BLK_DEV_IDEDMA is not set
524CONFIG_IDE_ARCH_OBSOLETE_INIT=y
525# CONFIG_BLK_DEV_HD is not set
526
527#
528# SCSI device support
529#
530# CONFIG_RAID_ATTRS is not set
531# CONFIG_SCSI is not set
532# CONFIG_SCSI_DMA is not set
533# CONFIG_SCSI_NETLINK is not set
534# CONFIG_ATA is not set
535# CONFIG_MD is not set
536CONFIG_NETDEVICES=y
537# CONFIG_NETDEVICES_MULTIQUEUE is not set
538# CONFIG_DUMMY is not set
539# CONFIG_BONDING is not set
540# CONFIG_MACVLAN is not set
541# CONFIG_EQUALIZER is not set
542# CONFIG_TUN is not set
543# CONFIG_VETH is not set
544# CONFIG_PHYLIB is not set
545CONFIG_NET_ETHERNET=y
546CONFIG_MII=m
547# CONFIG_AX88796 is not set
548CONFIG_SMC91X=m
549# CONFIG_DM9000 is not set
550# CONFIG_SMC911X is not set
551# CONFIG_IBM_NEW_EMAC_ZMII is not set
552# CONFIG_IBM_NEW_EMAC_RGMII is not set
553# CONFIG_IBM_NEW_EMAC_TAH is not set
554# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
555# CONFIG_B44 is not set
556CONFIG_NETDEV_1000=y
557# CONFIG_E1000E_ENABLED is not set
558CONFIG_NETDEV_10000=y
559
560#
561# Wireless LAN
562#
563# CONFIG_WLAN_PRE80211 is not set
564# CONFIG_WLAN_80211 is not set
565# CONFIG_NET_PCMCIA is not set
566# CONFIG_WAN is not set
567# CONFIG_PPP is not set
568# CONFIG_SLIP is not set
569# CONFIG_NETCONSOLE is not set
570# CONFIG_NETPOLL is not set
571# CONFIG_NET_POLL_CONTROLLER is not set
572# CONFIG_ISDN is not set
573
574#
575# Input device support
576#
577CONFIG_INPUT=y
578# CONFIG_INPUT_FF_MEMLESS is not set
579# CONFIG_INPUT_POLLDEV is not set
580
581#
582# Userland interfaces
583#
584CONFIG_INPUT_MOUSEDEV=y
585CONFIG_INPUT_MOUSEDEV_PSAUX=y
586CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
587CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
588# CONFIG_INPUT_JOYDEV is not set
589# CONFIG_INPUT_EVDEV is not set
590# CONFIG_INPUT_EVBUG is not set
591
592#
593# Input Device Drivers
594#
595CONFIG_INPUT_KEYBOARD=y
596CONFIG_KEYBOARD_ATKBD=y
597# CONFIG_KEYBOARD_SUNKBD is not set
598# CONFIG_KEYBOARD_LKKBD is not set
599# CONFIG_KEYBOARD_XTKBD is not set
600# CONFIG_KEYBOARD_NEWTON is not set
601# CONFIG_KEYBOARD_STOWAWAY is not set
602# CONFIG_KEYBOARD_GPIO is not set
603CONFIG_INPUT_MOUSE=y
604CONFIG_MOUSE_PS2=y
605CONFIG_MOUSE_PS2_ALPS=y
606CONFIG_MOUSE_PS2_LOGIPS2PP=y
607CONFIG_MOUSE_PS2_SYNAPTICS=y
608CONFIG_MOUSE_PS2_LIFEBOOK=y
609CONFIG_MOUSE_PS2_TRACKPOINT=y
610# CONFIG_MOUSE_PS2_TOUCHKIT is not set
611# CONFIG_MOUSE_SERIAL is not set
612# CONFIG_MOUSE_APPLETOUCH is not set
613# CONFIG_MOUSE_VSXXXAA is not set
614# CONFIG_MOUSE_GPIO is not set
615# CONFIG_INPUT_JOYSTICK is not set
616# CONFIG_INPUT_TABLET is not set
617# CONFIG_INPUT_TOUCHSCREEN is not set
618# CONFIG_INPUT_MISC is not set
619
620#
621# Hardware I/O ports
622#
623CONFIG_SERIO=y
624CONFIG_SERIO_SERPORT=y
625CONFIG_SERIO_LIBPS2=y
626# CONFIG_SERIO_RAW is not set
627# CONFIG_GAMEPORT is not set
628
629#
630# Character devices
631#
632CONFIG_VT=y
633CONFIG_VT_CONSOLE=y
634CONFIG_HW_CONSOLE=y
635# CONFIG_VT_HW_CONSOLE_BINDING is not set
636# CONFIG_SERIAL_NONSTANDARD is not set
637
638#
639# Serial drivers
640#
641# CONFIG_SERIAL_8250 is not set
642
643#
644# Non-8250 serial port support
645#
646CONFIG_SERIAL_PXA=y
647CONFIG_SERIAL_PXA_CONSOLE=y
648CONFIG_SERIAL_CORE=y
649CONFIG_SERIAL_CORE_CONSOLE=y
650CONFIG_UNIX98_PTYS=y
651# CONFIG_LEGACY_PTYS is not set
652# CONFIG_IPMI_HANDLER is not set
653# CONFIG_HW_RANDOM is not set
654# CONFIG_NVRAM is not set
655# CONFIG_R3964 is not set
656
657#
658# PCMCIA character devices
659#
660# CONFIG_SYNCLINK_CS is not set
661# CONFIG_CARDMAN_4000 is not set
662# CONFIG_CARDMAN_4040 is not set
663# CONFIG_IPWIRELESS is not set
664# CONFIG_RAW_DRIVER is not set
665# CONFIG_TCG_TPM is not set
666# CONFIG_I2C is not set
667
668#
669# SPI support
670#
671# CONFIG_SPI is not set
672# CONFIG_SPI_MASTER is not set
673CONFIG_HAVE_GPIO_LIB=y
674
675#
676# GPIO Support
677#
678# CONFIG_DEBUG_GPIO is not set
679
680#
681# I2C GPIO expanders:
682#
683
684#
685# SPI GPIO expanders:
686#
687# CONFIG_W1 is not set
688# CONFIG_POWER_SUPPLY is not set
689# CONFIG_HWMON is not set
690CONFIG_WATCHDOG=y
691# CONFIG_WATCHDOG_NOWAYOUT is not set
692
693#
694# Watchdog Device Drivers
695#
696# CONFIG_SOFT_WATCHDOG is not set
697CONFIG_SA1100_WATCHDOG=m
698
699#
700# Sonics Silicon Backplane
701#
702CONFIG_SSB_POSSIBLE=y
703# CONFIG_SSB is not set
704
705#
706# Multifunction device drivers
707#
708# CONFIG_MFD_SM501 is not set
709# CONFIG_MFD_ASIC3 is not set
710
711#
712# Multimedia devices
713#
714# CONFIG_VIDEO_DEV is not set
715# CONFIG_DVB_CORE is not set
716CONFIG_DAB=y
717
718#
719# Graphics support
720#
721# CONFIG_VGASTATE is not set
722# CONFIG_VIDEO_OUTPUT_CONTROL is not set
723CONFIG_FB=y
724# CONFIG_FIRMWARE_EDID is not set
725# CONFIG_FB_DDC is not set
726CONFIG_FB_CFB_FILLRECT=y
727CONFIG_FB_CFB_COPYAREA=y
728CONFIG_FB_CFB_IMAGEBLIT=y
729# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
730CONFIG_FB_SYS_FILLRECT=m
731CONFIG_FB_SYS_COPYAREA=m
732CONFIG_FB_SYS_IMAGEBLIT=m
733CONFIG_FB_SYS_FOPS=m
734CONFIG_FB_DEFERRED_IO=y
735# CONFIG_FB_SVGALIB is not set
736# CONFIG_FB_MACMODES is not set
737# CONFIG_FB_BACKLIGHT is not set
738CONFIG_FB_MODE_HELPERS=y
739CONFIG_FB_TILEBLITTING=y
740
741#
742# Frame buffer hardware drivers
743#
744# CONFIG_FB_S1D13XXX is not set
745CONFIG_FB_PXA=y
746CONFIG_FB_PXA_PARAMETERS=y
747CONFIG_FB_MBX=m
748CONFIG_FB_VIRTUAL=m
749# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
750
751#
752# Display device support
753#
754# CONFIG_DISPLAY_SUPPORT is not set
755
756#
757# Console display driver support
758#
759# CONFIG_VGA_CONSOLE is not set
760CONFIG_DUMMY_CONSOLE=y
761# CONFIG_FRAMEBUFFER_CONSOLE is not set
762# CONFIG_LOGO is not set
763
764#
765# Sound
766#
767CONFIG_SOUND=m
768
769#
770# Advanced Linux Sound Architecture
771#
772CONFIG_SND=m
773CONFIG_SND_TIMER=m
774CONFIG_SND_PCM=m
775# CONFIG_SND_SEQUENCER is not set
776CONFIG_SND_OSSEMUL=y
777CONFIG_SND_MIXER_OSS=m
778CONFIG_SND_PCM_OSS=m
779CONFIG_SND_PCM_OSS_PLUGINS=y
780# CONFIG_SND_DYNAMIC_MINORS is not set
781# CONFIG_SND_SUPPORT_OLD_API is not set
782# CONFIG_SND_VERBOSE_PROCFS is not set
783# CONFIG_SND_VERBOSE_PRINTK is not set
784# CONFIG_SND_DEBUG is not set
785
786#
787# Generic devices
788#
789CONFIG_SND_AC97_CODEC=m
790# CONFIG_SND_DUMMY is not set
791# CONFIG_SND_MTPAV is not set
792# CONFIG_SND_SERIAL_U16550 is not set
793# CONFIG_SND_MPU401 is not set
794
795#
796# ALSA ARM devices
797#
798CONFIG_SND_PXA2XX_PCM=m
799CONFIG_SND_PXA2XX_AC97=m
800
801#
802# PCMCIA devices
803#
804# CONFIG_SND_VXPOCKET is not set
805# CONFIG_SND_PDAUDIOCF is not set
806
807#
808# System on Chip audio support
809#
810# CONFIG_SND_SOC is not set
811
812#
813# SoC Audio support for SuperH
814#
815
816#
817# ALSA SoC audio for Freescale SOCs
818#
819
820#
821# Open Sound System
822#
823# CONFIG_SOUND_PRIME is not set
824CONFIG_AC97_BUS=m
825CONFIG_HID_SUPPORT=y
826CONFIG_HID=y
827# CONFIG_HID_DEBUG is not set
828# CONFIG_HIDRAW is not set
829CONFIG_USB_SUPPORT=y
830CONFIG_USB_ARCH_HAS_HCD=y
831# CONFIG_USB_ARCH_HAS_OHCI is not set
832# CONFIG_USB_ARCH_HAS_EHCI is not set
833# CONFIG_USB is not set
834
835#
836# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
837#
838CONFIG_USB_GADGET=y
839# CONFIG_USB_GADGET_DEBUG is not set
840# CONFIG_USB_GADGET_DEBUG_FILES is not set
841CONFIG_USB_GADGET_SELECTED=y
842# CONFIG_USB_GADGET_AMD5536UDC is not set
843# CONFIG_USB_GADGET_ATMEL_USBA is not set
844# CONFIG_USB_GADGET_FSL_USB2 is not set
845# CONFIG_USB_GADGET_NET2280 is not set
846CONFIG_USB_GADGET_PXA2XX=y
847CONFIG_USB_PXA2XX=y
848# CONFIG_USB_PXA2XX_SMALL is not set
849# CONFIG_USB_GADGET_M66592 is not set
850# CONFIG_USB_GADGET_GOKU is not set
851# CONFIG_USB_GADGET_LH7A40X is not set
852# CONFIG_USB_GADGET_OMAP is not set
853# CONFIG_USB_GADGET_S3C2410 is not set
854# CONFIG_USB_GADGET_AT91 is not set
855# CONFIG_USB_GADGET_DUMMY_HCD is not set
856# CONFIG_USB_GADGET_DUALSPEED is not set
857# CONFIG_USB_ZERO is not set
858CONFIG_USB_ETH=y
859CONFIG_USB_ETH_RNDIS=y
860# CONFIG_USB_GADGETFS is not set
861# CONFIG_USB_FILE_STORAGE is not set
862# CONFIG_USB_G_SERIAL is not set
863# CONFIG_USB_MIDI_GADGET is not set
864# CONFIG_USB_G_PRINTER is not set
865CONFIG_MMC=y
866# CONFIG_MMC_DEBUG is not set
867# CONFIG_MMC_UNSAFE_RESUME is not set
868
869#
870# MMC/SD Card Drivers
871#
872CONFIG_MMC_BLOCK=y
873CONFIG_MMC_BLOCK_BOUNCE=y
874# CONFIG_SDIO_UART is not set
875
876#
877# MMC/SD Host Controller Drivers
878#
879CONFIG_MMC_PXA=y
880# CONFIG_NEW_LEDS is not set
881CONFIG_RTC_LIB=y
882# CONFIG_RTC_CLASS is not set
883
884#
885# File systems
886#
887# CONFIG_EXT2_FS is not set
888# CONFIG_EXT3_FS is not set
889# CONFIG_EXT4DEV_FS is not set
890# CONFIG_REISERFS_FS is not set
891# CONFIG_JFS_FS is not set
892# CONFIG_FS_POSIX_ACL is not set
893# CONFIG_XFS_FS is not set
894# CONFIG_GFS2_FS is not set
895# CONFIG_OCFS2_FS is not set
896# CONFIG_DNOTIFY is not set
897CONFIG_INOTIFY=y
898CONFIG_INOTIFY_USER=y
899# CONFIG_QUOTA is not set
900# CONFIG_AUTOFS_FS is not set
901# CONFIG_AUTOFS4_FS is not set
902# CONFIG_FUSE_FS is not set
903
904#
905# CD-ROM/DVD Filesystems
906#
907# CONFIG_ISO9660_FS is not set
908# CONFIG_UDF_FS is not set
909
910#
911# DOS/FAT/NT Filesystems
912#
913CONFIG_FAT_FS=y
914# CONFIG_MSDOS_FS is not set
915CONFIG_VFAT_FS=y
916CONFIG_FAT_DEFAULT_CODEPAGE=437
917CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
918# CONFIG_NTFS_FS is not set
919
920#
921# Pseudo filesystems
922#
923CONFIG_PROC_FS=y
924CONFIG_PROC_SYSCTL=y
925CONFIG_SYSFS=y
926CONFIG_TMPFS=y
927# CONFIG_TMPFS_POSIX_ACL is not set
928# CONFIG_HUGETLB_PAGE is not set
929# CONFIG_CONFIGFS_FS is not set
930
931#
932# Miscellaneous filesystems
933#
934# CONFIG_ADFS_FS is not set
935# CONFIG_AFFS_FS is not set
936# CONFIG_HFS_FS is not set
937# CONFIG_HFSPLUS_FS is not set
938# CONFIG_BEFS_FS is not set
939# CONFIG_BFS_FS is not set
940# CONFIG_EFS_FS is not set
941CONFIG_JFFS2_FS=y
942CONFIG_JFFS2_FS_DEBUG=0
943CONFIG_JFFS2_FS_WRITEBUFFER=y
944# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
945# CONFIG_JFFS2_SUMMARY is not set
946# CONFIG_JFFS2_FS_XATTR is not set
947CONFIG_JFFS2_COMPRESSION_OPTIONS=y
948CONFIG_JFFS2_ZLIB=y
949# CONFIG_JFFS2_LZO is not set
950CONFIG_JFFS2_RTIME=y
951CONFIG_JFFS2_RUBIN=y
952# CONFIG_JFFS2_CMODE_NONE is not set
953CONFIG_JFFS2_CMODE_PRIORITY=y
954# CONFIG_JFFS2_CMODE_SIZE is not set
955# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
956# CONFIG_CRAMFS is not set
957# CONFIG_VXFS_FS is not set
958# CONFIG_MINIX_FS is not set
959# CONFIG_HPFS_FS is not set
960# CONFIG_QNX4FS_FS is not set
961# CONFIG_ROMFS_FS is not set
962# CONFIG_SYSV_FS is not set
963# CONFIG_UFS_FS is not set
964CONFIG_NETWORK_FILESYSTEMS=y
965# CONFIG_NFS_FS is not set
966# CONFIG_NFSD is not set
967# CONFIG_SMB_FS is not set
968# CONFIG_CIFS is not set
969# CONFIG_NCP_FS is not set
970# CONFIG_CODA_FS is not set
971# CONFIG_AFS_FS is not set
972
973#
974# Partition Types
975#
976CONFIG_PARTITION_ADVANCED=y
977# CONFIG_ACORN_PARTITION is not set
978# CONFIG_OSF_PARTITION is not set
979# CONFIG_AMIGA_PARTITION is not set
980# CONFIG_ATARI_PARTITION is not set
981# CONFIG_MAC_PARTITION is not set
982CONFIG_MSDOS_PARTITION=y
983# CONFIG_BSD_DISKLABEL is not set
984# CONFIG_MINIX_SUBPARTITION is not set
985# CONFIG_SOLARIS_X86_PARTITION is not set
986# CONFIG_UNIXWARE_DISKLABEL is not set
987# CONFIG_LDM_PARTITION is not set
988# CONFIG_SGI_PARTITION is not set
989# CONFIG_ULTRIX_PARTITION is not set
990# CONFIG_SUN_PARTITION is not set
991# CONFIG_KARMA_PARTITION is not set
992# CONFIG_EFI_PARTITION is not set
993# CONFIG_SYSV68_PARTITION is not set
994CONFIG_NLS=y
995CONFIG_NLS_DEFAULT="iso8859-1"
996CONFIG_NLS_CODEPAGE_437=y
997# CONFIG_NLS_CODEPAGE_737 is not set
998# CONFIG_NLS_CODEPAGE_775 is not set
999# CONFIG_NLS_CODEPAGE_850 is not set
1000# CONFIG_NLS_CODEPAGE_852 is not set
1001# CONFIG_NLS_CODEPAGE_855 is not set
1002# CONFIG_NLS_CODEPAGE_857 is not set
1003# CONFIG_NLS_CODEPAGE_860 is not set
1004# CONFIG_NLS_CODEPAGE_861 is not set
1005# CONFIG_NLS_CODEPAGE_862 is not set
1006# CONFIG_NLS_CODEPAGE_863 is not set
1007# CONFIG_NLS_CODEPAGE_864 is not set
1008# CONFIG_NLS_CODEPAGE_865 is not set
1009# CONFIG_NLS_CODEPAGE_866 is not set
1010# CONFIG_NLS_CODEPAGE_869 is not set
1011# CONFIG_NLS_CODEPAGE_936 is not set
1012# CONFIG_NLS_CODEPAGE_950 is not set
1013# CONFIG_NLS_CODEPAGE_932 is not set
1014# CONFIG_NLS_CODEPAGE_949 is not set
1015# CONFIG_NLS_CODEPAGE_874 is not set
1016# CONFIG_NLS_ISO8859_8 is not set
1017# CONFIG_NLS_CODEPAGE_1250 is not set
1018# CONFIG_NLS_CODEPAGE_1251 is not set
1019# CONFIG_NLS_ASCII is not set
1020CONFIG_NLS_ISO8859_1=y
1021# CONFIG_NLS_ISO8859_2 is not set
1022# CONFIG_NLS_ISO8859_3 is not set
1023# CONFIG_NLS_ISO8859_4 is not set
1024# CONFIG_NLS_ISO8859_5 is not set
1025# CONFIG_NLS_ISO8859_6 is not set
1026# CONFIG_NLS_ISO8859_7 is not set
1027# CONFIG_NLS_ISO8859_9 is not set
1028# CONFIG_NLS_ISO8859_13 is not set
1029# CONFIG_NLS_ISO8859_14 is not set
1030# CONFIG_NLS_ISO8859_15 is not set
1031# CONFIG_NLS_KOI8_R is not set
1032# CONFIG_NLS_KOI8_U is not set
1033# CONFIG_NLS_UTF8 is not set
1034# CONFIG_DLM is not set
1035
1036#
1037# Kernel hacking
1038#
1039# CONFIG_PRINTK_TIME is not set
1040CONFIG_ENABLE_WARN_DEPRECATED=y
1041CONFIG_ENABLE_MUST_CHECK=y
1042# CONFIG_MAGIC_SYSRQ is not set
1043# CONFIG_UNUSED_SYMBOLS is not set
1044# CONFIG_DEBUG_FS is not set
1045# CONFIG_HEADERS_CHECK is not set
1046CONFIG_DEBUG_KERNEL=y
1047# CONFIG_DEBUG_SHIRQ is not set
1048# CONFIG_DETECT_SOFTLOCKUP is not set
1049CONFIG_SCHED_DEBUG=y
1050# CONFIG_SCHEDSTATS is not set
1051# CONFIG_TIMER_STATS is not set
1052# CONFIG_DEBUG_SLAB is not set
1053# CONFIG_DEBUG_PREEMPT is not set
1054# CONFIG_DEBUG_RT_MUTEXES is not set
1055# CONFIG_RT_MUTEX_TESTER is not set
1056# CONFIG_DEBUG_SPINLOCK is not set
1057# CONFIG_DEBUG_MUTEXES is not set
1058# CONFIG_DEBUG_LOCK_ALLOC is not set
1059# CONFIG_PROVE_LOCKING is not set
1060# CONFIG_LOCK_STAT is not set
1061# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1062# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1063# CONFIG_DEBUG_KOBJECT is not set
1064# CONFIG_DEBUG_BUGVERBOSE is not set
1065# CONFIG_DEBUG_INFO is not set
1066# CONFIG_DEBUG_VM is not set
1067# CONFIG_DEBUG_LIST is not set
1068# CONFIG_DEBUG_SG is not set
1069CONFIG_FRAME_POINTER=y
1070# CONFIG_BOOT_PRINTK_DELAY is not set
1071# CONFIG_RCU_TORTURE_TEST is not set
1072# CONFIG_BACKTRACE_SELF_TEST is not set
1073# CONFIG_FAULT_INJECTION is not set
1074# CONFIG_SAMPLES is not set
1075CONFIG_DEBUG_USER=y
1076CONFIG_DEBUG_ERRORS=y
1077# CONFIG_DEBUG_STACK_USAGE is not set
1078# CONFIG_DEBUG_LL is not set
1079
1080#
1081# Security options
1082#
1083# CONFIG_KEYS is not set
1084# CONFIG_SECURITY is not set
1085# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1086CONFIG_CRYPTO=y
1087CONFIG_CRYPTO_ALGAPI=m
1088CONFIG_CRYPTO_BLKCIPHER=m
1089# CONFIG_CRYPTO_SEQIV is not set
1090CONFIG_CRYPTO_MANAGER=m
1091# CONFIG_CRYPTO_HMAC is not set
1092# CONFIG_CRYPTO_XCBC is not set
1093# CONFIG_CRYPTO_NULL is not set
1094# CONFIG_CRYPTO_MD4 is not set
1095# CONFIG_CRYPTO_MD5 is not set
1096# CONFIG_CRYPTO_SHA1 is not set
1097# CONFIG_CRYPTO_SHA256 is not set
1098# CONFIG_CRYPTO_SHA512 is not set
1099# CONFIG_CRYPTO_WP512 is not set
1100# CONFIG_CRYPTO_TGR192 is not set
1101# CONFIG_CRYPTO_GF128MUL is not set
1102CONFIG_CRYPTO_ECB=m
1103CONFIG_CRYPTO_CBC=m
1104CONFIG_CRYPTO_PCBC=m
1105# CONFIG_CRYPTO_LRW is not set
1106# CONFIG_CRYPTO_XTS is not set
1107# CONFIG_CRYPTO_CTR is not set
1108# CONFIG_CRYPTO_GCM is not set
1109# CONFIG_CRYPTO_CCM is not set
1110# CONFIG_CRYPTO_CRYPTD is not set
1111# CONFIG_CRYPTO_DES is not set
1112# CONFIG_CRYPTO_FCRYPT is not set
1113# CONFIG_CRYPTO_BLOWFISH is not set
1114# CONFIG_CRYPTO_TWOFISH is not set
1115# CONFIG_CRYPTO_SERPENT is not set
1116# CONFIG_CRYPTO_AES is not set
1117# CONFIG_CRYPTO_CAST5 is not set
1118# CONFIG_CRYPTO_CAST6 is not set
1119# CONFIG_CRYPTO_TEA is not set
1120CONFIG_CRYPTO_ARC4=m
1121# CONFIG_CRYPTO_KHAZAD is not set
1122# CONFIG_CRYPTO_ANUBIS is not set
1123# CONFIG_CRYPTO_SEED is not set
1124# CONFIG_CRYPTO_SALSA20 is not set
1125# CONFIG_CRYPTO_DEFLATE is not set
1126# CONFIG_CRYPTO_MICHAEL_MIC is not set
1127# CONFIG_CRYPTO_CRC32C is not set
1128# CONFIG_CRYPTO_CAMELLIA is not set
1129# CONFIG_CRYPTO_TEST is not set
1130# CONFIG_CRYPTO_AUTHENC is not set
1131# CONFIG_CRYPTO_LZO is not set
1132CONFIG_CRYPTO_HW=y
1133
1134#
1135# Library routines
1136#
1137CONFIG_BITREVERSE=y
1138# CONFIG_CRC_CCITT is not set
1139# CONFIG_CRC16 is not set
1140# CONFIG_CRC_ITU_T is not set
1141CONFIG_CRC32=y
1142# CONFIG_CRC7 is not set
1143# CONFIG_LIBCRC32C is not set
1144CONFIG_ZLIB_INFLATE=y
1145CONFIG_ZLIB_DEFLATE=y
1146CONFIG_PLIST=y
1147CONFIG_HAS_IOMEM=y
1148CONFIG_HAS_IOPORT=y
1149CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig
index e10d003566d6..2dbbbc3d4ac3 100644
--- a/arch/arm/configs/at91rm9200dk_defconfig
+++ b/arch/arm/configs/at91rm9200dk_defconfig
@@ -620,14 +620,14 @@ CONFIG_I2C_CHARDEV=y
620# 620#
621# I2C Algorithms 621# I2C Algorithms
622# 622#
623# CONFIG_I2C_ALGOBIT is not set 623CONFIG_I2C_ALGOBIT=y
624# CONFIG_I2C_ALGOPCF is not set 624# CONFIG_I2C_ALGOPCF is not set
625# CONFIG_I2C_ALGOPCA is not set 625# CONFIG_I2C_ALGOPCA is not set
626 626
627# 627#
628# I2C Hardware Bus support 628# I2C Hardware Bus support
629# 629#
630CONFIG_I2C_AT91=y 630CONFIG_I2C_GPIO=y
631# CONFIG_I2C_PARPORT_LIGHT is not set 631# CONFIG_I2C_PARPORT_LIGHT is not set
632# CONFIG_I2C_STUB is not set 632# CONFIG_I2C_STUB is not set
633# CONFIG_I2C_PCA_ISA is not set 633# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index 834dddb51314..6e994f7820c6 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -594,14 +594,14 @@ CONFIG_I2C_CHARDEV=y
594# 594#
595# I2C Algorithms 595# I2C Algorithms
596# 596#
597# CONFIG_I2C_ALGOBIT is not set 597CONFIG_I2C_ALGOBIT=y
598# CONFIG_I2C_ALGOPCF is not set 598# CONFIG_I2C_ALGOPCF is not set
599# CONFIG_I2C_ALGOPCA is not set 599# CONFIG_I2C_ALGOPCA is not set
600 600
601# 601#
602# I2C Hardware Bus support 602# I2C Hardware Bus support
603# 603#
604CONFIG_I2C_AT91=y 604CONFIG_I2C_GPIO=y
605# CONFIG_I2C_PARPORT_LIGHT is not set 605# CONFIG_I2C_PARPORT_LIGHT is not set
606# CONFIG_I2C_STUB is not set 606# CONFIG_I2C_STUB is not set
607# CONFIG_I2C_PCA_ISA is not set 607# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 46b0c734aeb9..f659c938473f 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -1,43 +1,56 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc6 3# Linux kernel version: 2.6.24-rc7
4# Fri Nov 17 18:42:21 2006 4# Tue Jan 8 22:20:50 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
7# CONFIG_GENERIC_TIME is not set 9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
8CONFIG_MMU=y 11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
9CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
10CONFIG_TRACE_IRQFLAGS_SUPPORT=y 16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
11CONFIG_HARDIRQS_SW_RESEND=y 17CONFIG_HARDIRQS_SW_RESEND=y
12CONFIG_GENERIC_IRQ_PROBE=y 18CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_HWEIGHT=y 22CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
16CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
17CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
18 27
19# 28#
20# Code maturity level options 29# General setup
21# 30#
22CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
23CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
24CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
25
26#
27# General setup
28#
29CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
30# CONFIG_LOCALVERSION_AUTO is not set 35# CONFIG_LOCALVERSION_AUTO is not set
31# CONFIG_SWAP is not set 36# CONFIG_SWAP is not set
32CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
33# CONFIG_IPC_NS is not set 38CONFIG_SYSVIPC_SYSCTL=y
34# CONFIG_POSIX_MQUEUE is not set 39# CONFIG_POSIX_MQUEUE is not set
35# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
36# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
37# CONFIG_UTS_NS is not set 42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
38# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
39# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
51CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 52# CONFIG_RELAY is not set
53CONFIG_BLK_DEV_INITRD=y
41CONFIG_INITRAMFS_SOURCE="" 54CONFIG_INITRAMFS_SOURCE=""
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y 55CONFIG_CC_OPTIMIZE_FOR_SIZE=y
43CONFIG_SYSCTL=y 56CONFIG_SYSCTL=y
@@ -53,30 +66,30 @@ CONFIG_BUG=y
53CONFIG_ELF_CORE=y 66CONFIG_ELF_CORE=y
54CONFIG_BASE_FULL=y 67CONFIG_BASE_FULL=y
55CONFIG_FUTEX=y 68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
56CONFIG_EPOLL=y 70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_EVENTFD=y
57CONFIG_SHMEM=y 73CONFIG_SHMEM=y
58CONFIG_SLAB=y
59CONFIG_VM_EVENT_COUNTERS=y 74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78CONFIG_SLABINFO=y
60CONFIG_RT_MUTEXES=y 79CONFIG_RT_MUTEXES=y
61# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
62CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
63# CONFIG_SLOB is not set
64
65#
66# Loadable module support
67#
68CONFIG_MODULES=y 82CONFIG_MODULES=y
69CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
70# CONFIG_MODULE_FORCE_UNLOAD is not set 84# CONFIG_MODULE_FORCE_UNLOAD is not set
71# CONFIG_MODVERSIONS is not set 85# CONFIG_MODVERSIONS is not set
72# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
73CONFIG_KMOD=y 87CONFIG_KMOD=y
74
75#
76# Block layer
77#
78CONFIG_BLOCK=y 88CONFIG_BLOCK=y
89# CONFIG_LBD is not set
79# CONFIG_BLK_DEV_IO_TRACE is not set 90# CONFIG_BLK_DEV_IO_TRACE is not set
91# CONFIG_LSF is not set
92# CONFIG_BLK_DEV_BSG is not set
80 93
81# 94#
82# IO Schedulers 95# IO Schedulers
@@ -108,12 +121,16 @@ CONFIG_ARCH_AT91=y
108# CONFIG_ARCH_NETX is not set 121# CONFIG_ARCH_NETX is not set
109# CONFIG_ARCH_H720X is not set 122# CONFIG_ARCH_H720X is not set
110# CONFIG_ARCH_IMX is not set 123# CONFIG_ARCH_IMX is not set
124# CONFIG_ARCH_IOP13XX is not set
111# CONFIG_ARCH_IOP32X is not set 125# CONFIG_ARCH_IOP32X is not set
112# CONFIG_ARCH_IOP33X is not set 126# CONFIG_ARCH_IOP33X is not set
113# CONFIG_ARCH_IXP4XX is not set
114# CONFIG_ARCH_IXP2000 is not set
115# CONFIG_ARCH_IXP23XX is not set 127# CONFIG_ARCH_IXP23XX is not set
128# CONFIG_ARCH_IXP2000 is not set
129# CONFIG_ARCH_IXP4XX is not set
116# CONFIG_ARCH_L7200 is not set 130# CONFIG_ARCH_L7200 is not set
131# CONFIG_ARCH_KS8695 is not set
132# CONFIG_ARCH_NS9XXX is not set
133# CONFIG_ARCH_MXC is not set
117# CONFIG_ARCH_PNX4008 is not set 134# CONFIG_ARCH_PNX4008 is not set
118# CONFIG_ARCH_PXA is not set 135# CONFIG_ARCH_PXA is not set
119# CONFIG_ARCH_RPC is not set 136# CONFIG_ARCH_RPC is not set
@@ -121,29 +138,52 @@ CONFIG_ARCH_AT91=y
121# CONFIG_ARCH_S3C2410 is not set 138# CONFIG_ARCH_S3C2410 is not set
122# CONFIG_ARCH_SHARK is not set 139# CONFIG_ARCH_SHARK is not set
123# CONFIG_ARCH_LH7A40X is not set 140# CONFIG_ARCH_LH7A40X is not set
141# CONFIG_ARCH_DAVINCI is not set
124# CONFIG_ARCH_OMAP is not set 142# CONFIG_ARCH_OMAP is not set
125 143
126# 144#
145# Boot options
146#
147
148#
149# Power management
150#
151
152#
127# Atmel AT91 System-on-Chip 153# Atmel AT91 System-on-Chip
128# 154#
129# CONFIG_ARCH_AT91RM9200 is not set 155# CONFIG_ARCH_AT91RM9200 is not set
130CONFIG_ARCH_AT91SAM9260=y 156CONFIG_ARCH_AT91SAM9260=y
131# CONFIG_ARCH_AT91SAM9261 is not set 157# CONFIG_ARCH_AT91SAM9261 is not set
158# CONFIG_ARCH_AT91SAM9263 is not set
159# CONFIG_ARCH_AT91SAM9RL is not set
160# CONFIG_ARCH_AT91X40 is not set
161CONFIG_AT91_PMC_UNIT=y
162
163#
164# AT91SAM9260 Variants
165#
166# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
132 167
133# 168#
134# AT91SAM9260 Board Type 169# AT91SAM9260 / AT91SAM9XE Board Type
135# 170#
136CONFIG_MACH_AT91SAM9260EK=y 171CONFIG_MACH_AT91SAM9260EK=y
172# CONFIG_MACH_CAM60 is not set
173# CONFIG_MACH_SAM9_L9260 is not set
137 174
138# 175#
139# AT91 Board Options 176# AT91 Board Options
140# 177#
178# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
141# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set 179# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
142 180
143# 181#
144# AT91 Feature Selections 182# AT91 Feature Selections
145# 183#
146# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set 184CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
185# CONFIG_ATMEL_TCLIB is not set
186CONFIG_AT91_TIMER_HZ=100
147 187
148# 188#
149# Processor Type 189# Processor Type
@@ -166,19 +206,19 @@ CONFIG_CPU_CP15_MMU=y
166# CONFIG_CPU_DCACHE_DISABLE is not set 206# CONFIG_CPU_DCACHE_DISABLE is not set
167# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 207# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
168# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 208# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
209# CONFIG_OUTER_CACHE is not set
169 210
170# 211#
171# Bus support 212# Bus support
172# 213#
173 214# CONFIG_PCI_SYSCALL is not set
174# 215# CONFIG_ARCH_SUPPORTS_MSI is not set
175# PCCARD (PCMCIA/CardBus) support
176#
177# CONFIG_PCCARD is not set 216# CONFIG_PCCARD is not set
178 217
179# 218#
180# Kernel Features 219# Kernel Features
181# 220#
221# CONFIG_TICK_ONESHOT is not set
182# CONFIG_PREEMPT is not set 222# CONFIG_PREEMPT is not set
183# CONFIG_NO_IDLE_HZ is not set 223# CONFIG_NO_IDLE_HZ is not set
184CONFIG_HZ=100 224CONFIG_HZ=100
@@ -191,8 +231,12 @@ CONFIG_FLATMEM_MANUAL=y
191CONFIG_FLATMEM=y 231CONFIG_FLATMEM=y
192CONFIG_FLAT_NODE_MEM_MAP=y 232CONFIG_FLAT_NODE_MEM_MAP=y
193# CONFIG_SPARSEMEM_STATIC is not set 233# CONFIG_SPARSEMEM_STATIC is not set
234# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4096 235CONFIG_SPLIT_PTLOCK_CPUS=4096
195# CONFIG_RESOURCES_64BIT is not set 236# CONFIG_RESOURCES_64BIT is not set
237CONFIG_ZONE_DMA_FLAG=1
238CONFIG_BOUNCE=y
239CONFIG_VIRT_TO_BUS=y
196# CONFIG_LEDS is not set 240# CONFIG_LEDS is not set
197CONFIG_ALIGNMENT_TRAP=y 241CONFIG_ALIGNMENT_TRAP=y
198 242
@@ -203,6 +247,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
203CONFIG_ZBOOT_ROM_BSS=0x0 247CONFIG_ZBOOT_ROM_BSS=0x0
204CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 248CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
205# CONFIG_XIP_KERNEL is not set 249# CONFIG_XIP_KERNEL is not set
250# CONFIG_KEXEC is not set
206 251
207# 252#
208# Floating point emulation 253# Floating point emulation
@@ -228,7 +273,7 @@ CONFIG_BINFMT_ELF=y
228# Power management options 273# Power management options
229# 274#
230# CONFIG_PM is not set 275# CONFIG_PM is not set
231# CONFIG_APM is not set 276CONFIG_SUSPEND_UP_POSSIBLE=y
232 277
233# 278#
234# Networking 279# Networking
@@ -238,13 +283,9 @@ CONFIG_NET=y
238# 283#
239# Networking options 284# Networking options
240# 285#
241# CONFIG_NETDEBUG is not set
242CONFIG_PACKET=y 286CONFIG_PACKET=y
243# CONFIG_PACKET_MMAP is not set 287# CONFIG_PACKET_MMAP is not set
244CONFIG_UNIX=y 288CONFIG_UNIX=y
245CONFIG_XFRM=y
246# CONFIG_XFRM_USER is not set
247# CONFIG_XFRM_SUB_POLICY is not set
248# CONFIG_NET_KEY is not set 289# CONFIG_NET_KEY is not set
249CONFIG_INET=y 290CONFIG_INET=y
250# CONFIG_IP_MULTICAST is not set 291# CONFIG_IP_MULTICAST is not set
@@ -263,33 +304,23 @@ CONFIG_IP_PNP_BOOTP=y
263# CONFIG_INET_IPCOMP is not set 304# CONFIG_INET_IPCOMP is not set
264# CONFIG_INET_XFRM_TUNNEL is not set 305# CONFIG_INET_XFRM_TUNNEL is not set
265# CONFIG_INET_TUNNEL is not set 306# CONFIG_INET_TUNNEL is not set
266CONFIG_INET_XFRM_MODE_TRANSPORT=y 307# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
267CONFIG_INET_XFRM_MODE_TUNNEL=y 308# CONFIG_INET_XFRM_MODE_TUNNEL is not set
268CONFIG_INET_XFRM_MODE_BEET=y 309# CONFIG_INET_XFRM_MODE_BEET is not set
310# CONFIG_INET_LRO is not set
269CONFIG_INET_DIAG=y 311CONFIG_INET_DIAG=y
270CONFIG_INET_TCP_DIAG=y 312CONFIG_INET_TCP_DIAG=y
271# CONFIG_TCP_CONG_ADVANCED is not set 313# CONFIG_TCP_CONG_ADVANCED is not set
272CONFIG_TCP_CONG_CUBIC=y 314CONFIG_TCP_CONG_CUBIC=y
273CONFIG_DEFAULT_TCP_CONG="cubic" 315CONFIG_DEFAULT_TCP_CONG="cubic"
316# CONFIG_TCP_MD5SIG is not set
274# CONFIG_IPV6 is not set 317# CONFIG_IPV6 is not set
275# CONFIG_INET6_XFRM_TUNNEL is not set 318# CONFIG_INET6_XFRM_TUNNEL is not set
276# CONFIG_INET6_TUNNEL is not set 319# CONFIG_INET6_TUNNEL is not set
277# CONFIG_NETWORK_SECMARK is not set 320# CONFIG_NETWORK_SECMARK is not set
278# CONFIG_NETFILTER is not set 321# CONFIG_NETFILTER is not set
279
280#
281# DCCP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_DCCP is not set 322# CONFIG_IP_DCCP is not set
284
285#
286# SCTP Configuration (EXPERIMENTAL)
287#
288# CONFIG_IP_SCTP is not set 323# CONFIG_IP_SCTP is not set
289
290#
291# TIPC Configuration (EXPERIMENTAL)
292#
293# CONFIG_TIPC is not set 324# CONFIG_TIPC is not set
294# CONFIG_ATM is not set 325# CONFIG_ATM is not set
295# CONFIG_BRIDGE is not set 326# CONFIG_BRIDGE is not set
@@ -302,10 +333,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_LAPB is not set 333# CONFIG_LAPB is not set
303# CONFIG_ECONET is not set 334# CONFIG_ECONET is not set
304# CONFIG_WAN_ROUTER is not set 335# CONFIG_WAN_ROUTER is not set
305
306#
307# QoS and/or fair queueing
308#
309# CONFIG_NET_SCHED is not set 336# CONFIG_NET_SCHED is not set
310 337
311# 338#
@@ -315,7 +342,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_HAMRADIO is not set 342# CONFIG_HAMRADIO is not set
316# CONFIG_IRDA is not set 343# CONFIG_IRDA is not set
317# CONFIG_BT is not set 344# CONFIG_BT is not set
345# CONFIG_AF_RXRPC is not set
346
347#
348# Wireless
349#
350# CONFIG_CFG80211 is not set
351# CONFIG_WIRELESS_EXT is not set
352# CONFIG_MAC80211 is not set
318# CONFIG_IEEE80211 is not set 353# CONFIG_IEEE80211 is not set
354# CONFIG_RFKILL is not set
355# CONFIG_NET_9P is not set
319 356
320# 357#
321# Device Drivers 358# Device Drivers
@@ -324,34 +361,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
324# 361#
325# Generic Driver Options 362# Generic Driver Options
326# 363#
364CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
327CONFIG_STANDALONE=y 365CONFIG_STANDALONE=y
328CONFIG_PREVENT_FIRMWARE_BUILD=y 366CONFIG_PREVENT_FIRMWARE_BUILD=y
329# CONFIG_FW_LOADER is not set 367# CONFIG_FW_LOADER is not set
330# CONFIG_DEBUG_DRIVER is not set 368# CONFIG_DEBUG_DRIVER is not set
369# CONFIG_DEBUG_DEVRES is not set
331# CONFIG_SYS_HYPERVISOR is not set 370# CONFIG_SYS_HYPERVISOR is not set
332
333#
334# Connector - unified userspace <-> kernelspace linker
335#
336# CONFIG_CONNECTOR is not set 371# CONFIG_CONNECTOR is not set
337
338#
339# Memory Technology Devices (MTD)
340#
341# CONFIG_MTD is not set 372# CONFIG_MTD is not set
342
343#
344# Parallel port support
345#
346# CONFIG_PARPORT is not set 373# CONFIG_PARPORT is not set
347 374CONFIG_BLK_DEV=y
348#
349# Plug and Play support
350#
351
352#
353# Block devices
354#
355# CONFIG_BLK_DEV_COW_COMMON is not set 375# CONFIG_BLK_DEV_COW_COMMON is not set
356# CONFIG_BLK_DEV_LOOP is not set 376# CONFIG_BLK_DEV_LOOP is not set
357# CONFIG_BLK_DEV_NBD is not set 377# CONFIG_BLK_DEV_NBD is not set
@@ -360,15 +380,19 @@ CONFIG_BLK_DEV_RAM=y
360CONFIG_BLK_DEV_RAM_COUNT=16 380CONFIG_BLK_DEV_RAM_COUNT=16
361CONFIG_BLK_DEV_RAM_SIZE=8192 381CONFIG_BLK_DEV_RAM_SIZE=8192
362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 382CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
363CONFIG_BLK_DEV_INITRD=y
364# CONFIG_CDROM_PKTCDVD is not set 383# CONFIG_CDROM_PKTCDVD is not set
365# CONFIG_ATA_OVER_ETH is not set 384# CONFIG_ATA_OVER_ETH is not set
385CONFIG_MISC_DEVICES=y
386# CONFIG_EEPROM_93CX6 is not set
387CONFIG_ATMEL_SSC=y
366 388
367# 389#
368# SCSI device support 390# SCSI device support
369# 391#
370# CONFIG_RAID_ATTRS is not set 392# CONFIG_RAID_ATTRS is not set
371CONFIG_SCSI=y 393CONFIG_SCSI=y
394CONFIG_SCSI_DMA=y
395# CONFIG_SCSI_TGT is not set
372# CONFIG_SCSI_NETLINK is not set 396# CONFIG_SCSI_NETLINK is not set
373CONFIG_SCSI_PROC_FS=y 397CONFIG_SCSI_PROC_FS=y
374 398
@@ -388,6 +412,8 @@ CONFIG_BLK_DEV_SD=y
388CONFIG_SCSI_MULTI_LUN=y 412CONFIG_SCSI_MULTI_LUN=y
389# CONFIG_SCSI_CONSTANTS is not set 413# CONFIG_SCSI_CONSTANTS is not set
390# CONFIG_SCSI_LOGGING is not set 414# CONFIG_SCSI_LOGGING is not set
415# CONFIG_SCSI_SCAN_ASYNC is not set
416CONFIG_SCSI_WAIT_SCAN=m
391 417
392# 418#
393# SCSI Transports 419# SCSI Transports
@@ -395,43 +421,72 @@ CONFIG_SCSI_MULTI_LUN=y
395# CONFIG_SCSI_SPI_ATTRS is not set 421# CONFIG_SCSI_SPI_ATTRS is not set
396# CONFIG_SCSI_FC_ATTRS is not set 422# CONFIG_SCSI_FC_ATTRS is not set
397# CONFIG_SCSI_ISCSI_ATTRS is not set 423# CONFIG_SCSI_ISCSI_ATTRS is not set
398# CONFIG_SCSI_SAS_ATTRS is not set
399# CONFIG_SCSI_SAS_LIBSAS is not set 424# CONFIG_SCSI_SAS_LIBSAS is not set
400 425# CONFIG_SCSI_SRP_ATTRS is not set
401# 426CONFIG_SCSI_LOWLEVEL=y
402# SCSI low-level drivers
403#
404# CONFIG_ISCSI_TCP is not set 427# CONFIG_ISCSI_TCP is not set
405# CONFIG_SCSI_DEBUG is not set 428# CONFIG_SCSI_DEBUG is not set
406 429# CONFIG_ATA is not set
407#
408# Multi-device support (RAID and LVM)
409#
410# CONFIG_MD is not set 430# CONFIG_MD is not set
431CONFIG_NETDEVICES=y
432# CONFIG_NETDEVICES_MULTIQUEUE is not set
433# CONFIG_DUMMY is not set
434# CONFIG_BONDING is not set
435# CONFIG_MACVLAN is not set
436# CONFIG_EQUALIZER is not set
437# CONFIG_TUN is not set
438# CONFIG_VETH is not set
439CONFIG_PHYLIB=y
440
441#
442# MII PHY device drivers
443#
444# CONFIG_MARVELL_PHY is not set
445# CONFIG_DAVICOM_PHY is not set
446# CONFIG_QSEMI_PHY is not set
447# CONFIG_LXT_PHY is not set
448# CONFIG_CICADA_PHY is not set
449# CONFIG_VITESSE_PHY is not set
450# CONFIG_SMSC_PHY is not set
451# CONFIG_BROADCOM_PHY is not set
452# CONFIG_ICPLUS_PHY is not set
453# CONFIG_FIXED_PHY is not set
454# CONFIG_MDIO_BITBANG is not set
455CONFIG_NET_ETHERNET=y
456CONFIG_MII=y
457CONFIG_MACB=y
458# CONFIG_AX88796 is not set
459# CONFIG_SMC91X is not set
460# CONFIG_DM9000 is not set
461# CONFIG_IBM_NEW_EMAC_ZMII is not set
462# CONFIG_IBM_NEW_EMAC_RGMII is not set
463# CONFIG_IBM_NEW_EMAC_TAH is not set
464# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
465# CONFIG_B44 is not set
466CONFIG_NETDEV_1000=y
467CONFIG_NETDEV_10000=y
468
469#
470# Wireless LAN
471#
472# CONFIG_WLAN_PRE80211 is not set
473# CONFIG_WLAN_80211 is not set
411 474
412# 475#
413# Fusion MPT device support 476# USB Network Adapters
414#
415# CONFIG_FUSION is not set
416
417#
418# IEEE 1394 (FireWire) support
419#
420
421#
422# I2O device support
423#
424
425#
426# Network device support
427# 477#
428# CONFIG_NETDEVICES is not set 478# CONFIG_USB_CATC is not set
479# CONFIG_USB_KAWETH is not set
480# CONFIG_USB_PEGASUS is not set
481# CONFIG_USB_RTL8150 is not set
482# CONFIG_USB_USBNET is not set
483# CONFIG_WAN is not set
484# CONFIG_PPP is not set
485# CONFIG_SLIP is not set
486# CONFIG_SHAPER is not set
487# CONFIG_NETCONSOLE is not set
429# CONFIG_NETPOLL is not set 488# CONFIG_NETPOLL is not set
430# CONFIG_NET_POLL_CONTROLLER is not set 489# CONFIG_NET_POLL_CONTROLLER is not set
431
432#
433# ISDN subsystem
434#
435# CONFIG_ISDN is not set 490# CONFIG_ISDN is not set
436 491
437# 492#
@@ -439,6 +494,7 @@ CONFIG_SCSI_MULTI_LUN=y
439# 494#
440CONFIG_INPUT=y 495CONFIG_INPUT=y
441# CONFIG_INPUT_FF_MEMLESS is not set 496# CONFIG_INPUT_FF_MEMLESS is not set
497# CONFIG_INPUT_POLLDEV is not set
442 498
443# 499#
444# Userland interfaces 500# Userland interfaces
@@ -448,7 +504,6 @@ CONFIG_INPUT_MOUSEDEV=y
448CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 504CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
449CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 505CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
450# CONFIG_INPUT_JOYDEV is not set 506# CONFIG_INPUT_JOYDEV is not set
451# CONFIG_INPUT_TSDEV is not set
452# CONFIG_INPUT_EVDEV is not set 507# CONFIG_INPUT_EVDEV is not set
453# CONFIG_INPUT_EVBUG is not set 508# CONFIG_INPUT_EVBUG is not set
454 509
@@ -458,6 +513,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
458# CONFIG_INPUT_KEYBOARD is not set 513# CONFIG_INPUT_KEYBOARD is not set
459# CONFIG_INPUT_MOUSE is not set 514# CONFIG_INPUT_MOUSE is not set
460# CONFIG_INPUT_JOYSTICK is not set 515# CONFIG_INPUT_JOYSTICK is not set
516# CONFIG_INPUT_TABLET is not set
461# CONFIG_INPUT_TOUCHSCREEN is not set 517# CONFIG_INPUT_TOUCHSCREEN is not set
462# CONFIG_INPUT_MISC is not set 518# CONFIG_INPUT_MISC is not set
463 519
@@ -492,114 +548,131 @@ CONFIG_SERIAL_CORE_CONSOLE=y
492CONFIG_UNIX98_PTYS=y 548CONFIG_UNIX98_PTYS=y
493CONFIG_LEGACY_PTYS=y 549CONFIG_LEGACY_PTYS=y
494CONFIG_LEGACY_PTY_COUNT=256 550CONFIG_LEGACY_PTY_COUNT=256
495
496#
497# IPMI
498#
499# CONFIG_IPMI_HANDLER is not set 551# CONFIG_IPMI_HANDLER is not set
500 552# CONFIG_HW_RANDOM is not set
501#
502# Watchdog Cards
503#
504CONFIG_WATCHDOG=y
505CONFIG_WATCHDOG_NOWAYOUT=y
506
507#
508# Watchdog Device Drivers
509#
510# CONFIG_SOFT_WATCHDOG is not set
511
512#
513# USB-based Watchdog Cards
514#
515# CONFIG_USBPCWATCHDOG is not set
516CONFIG_HW_RANDOM=y
517# CONFIG_NVRAM is not set 553# CONFIG_NVRAM is not set
518# CONFIG_DTLK is not set
519# CONFIG_R3964 is not set 554# CONFIG_R3964 is not set
555# CONFIG_RAW_DRIVER is not set
556# CONFIG_TCG_TPM is not set
557CONFIG_I2C=y
558CONFIG_I2C_BOARDINFO=y
559CONFIG_I2C_CHARDEV=y
520 560
521# 561#
522# Ftape, the floppy tape device driver 562# I2C Algorithms
523# 563#
524# CONFIG_RAW_DRIVER is not set 564CONFIG_I2C_ALGOBIT=y
565# CONFIG_I2C_ALGOPCF is not set
566# CONFIG_I2C_ALGOPCA is not set
525 567
526# 568#
527# TPM devices 569# I2C Hardware Bus support
528# 570#
529# CONFIG_TCG_TPM is not set 571CONFIG_I2C_GPIO=y
572# CONFIG_I2C_OCORES is not set
573# CONFIG_I2C_PARPORT_LIGHT is not set
574# CONFIG_I2C_SIMTEC is not set
575# CONFIG_I2C_TAOS_EVM is not set
576# CONFIG_I2C_STUB is not set
577# CONFIG_I2C_TINY_USB is not set
578# CONFIG_I2C_PCA is not set
530 579
531# 580#
532# I2C support 581# Miscellaneous I2C Chip support
533# 582#
534# CONFIG_I2C is not set 583# CONFIG_SENSORS_DS1337 is not set
584# CONFIG_SENSORS_DS1374 is not set
585# CONFIG_DS1682 is not set
586# CONFIG_SENSORS_EEPROM is not set
587# CONFIG_SENSORS_PCF8574 is not set
588# CONFIG_SENSORS_PCA9539 is not set
589# CONFIG_SENSORS_PCF8591 is not set
590# CONFIG_SENSORS_MAX6875 is not set
591# CONFIG_SENSORS_TSL2550 is not set
592# CONFIG_I2C_DEBUG_CORE is not set
593# CONFIG_I2C_DEBUG_ALGO is not set
594# CONFIG_I2C_DEBUG_BUS is not set
595# CONFIG_I2C_DEBUG_CHIP is not set
535 596
536# 597#
537# SPI support 598# SPI support
538# 599#
539# CONFIG_SPI is not set 600# CONFIG_SPI is not set
540# CONFIG_SPI_MASTER is not set 601# CONFIG_SPI_MASTER is not set
541
542#
543# Dallas's 1-wire bus
544#
545# CONFIG_W1 is not set 602# CONFIG_W1 is not set
546 603# CONFIG_POWER_SUPPLY is not set
547#
548# Hardware Monitoring support
549#
550# CONFIG_HWMON is not set 604# CONFIG_HWMON is not set
551# CONFIG_HWMON_VID is not set 605CONFIG_WATCHDOG=y
606CONFIG_WATCHDOG_NOWAYOUT=y
552 607
553# 608#
554# Misc devices 609# Watchdog Device Drivers
555# 610#
556# CONFIG_TIFM_CORE is not set 611# CONFIG_SOFT_WATCHDOG is not set
612CONFIG_AT91SAM9_WATCHDOG=y
557 613
558# 614#
559# LED devices 615# USB-based Watchdog Cards
560# 616#
561# CONFIG_NEW_LEDS is not set 617# CONFIG_USBPCWATCHDOG is not set
562 618
563# 619#
564# LED drivers 620# Sonics Silicon Backplane
565# 621#
622CONFIG_SSB_POSSIBLE=y
623# CONFIG_SSB is not set
566 624
567# 625#
568# LED Triggers 626# Multifunction device drivers
569# 627#
628# CONFIG_MFD_SM501 is not set
570 629
571# 630#
572# Multimedia devices 631# Multimedia devices
573# 632#
574# CONFIG_VIDEO_DEV is not set 633# CONFIG_VIDEO_DEV is not set
634# CONFIG_DVB_CORE is not set
635# CONFIG_DAB is not set
575 636
576# 637#
577# Digital Video Broadcasting Devices 638# Graphics support
578# 639#
579# CONFIG_DVB is not set 640# CONFIG_VGASTATE is not set
580# CONFIG_USB_DABUSB is not set 641# CONFIG_VIDEO_OUTPUT_CONTROL is not set
642# CONFIG_FB is not set
643# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
581 644
582# 645#
583# Graphics support 646# Display device support
584# 647#
585# CONFIG_FIRMWARE_EDID is not set 648# CONFIG_DISPLAY_SUPPORT is not set
586# CONFIG_FB is not set
587 649
588# 650#
589# Console display driver support 651# Console display driver support
590# 652#
591# CONFIG_VGA_CONSOLE is not set 653# CONFIG_VGA_CONSOLE is not set
592CONFIG_DUMMY_CONSOLE=y 654CONFIG_DUMMY_CONSOLE=y
593# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
594 655
595# 656#
596# Sound 657# Sound
597# 658#
598# CONFIG_SOUND is not set 659# CONFIG_SOUND is not set
660CONFIG_HID_SUPPORT=y
661CONFIG_HID=y
662# CONFIG_HID_DEBUG is not set
663# CONFIG_HIDRAW is not set
599 664
600# 665#
601# USB support 666# USB Input Devices
602# 667#
668# CONFIG_USB_HID is not set
669
670#
671# USB HID Boot Protocol drivers
672#
673# CONFIG_USB_KBD is not set
674# CONFIG_USB_MOUSE is not set
675CONFIG_USB_SUPPORT=y
603CONFIG_USB_ARCH_HAS_HCD=y 676CONFIG_USB_ARCH_HAS_HCD=y
604CONFIG_USB_ARCH_HAS_OHCI=y 677CONFIG_USB_ARCH_HAS_OHCI=y
605# CONFIG_USB_ARCH_HAS_EHCI is not set 678# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -610,7 +683,7 @@ CONFIG_USB=y
610# Miscellaneous USB options 683# Miscellaneous USB options
611# 684#
612CONFIG_USB_DEVICEFS=y 685CONFIG_USB_DEVICEFS=y
613# CONFIG_USB_BANDWIDTH is not set 686CONFIG_USB_DEVICE_CLASS=y
614# CONFIG_USB_DYNAMIC_MINORS is not set 687# CONFIG_USB_DYNAMIC_MINORS is not set
615# CONFIG_USB_OTG is not set 688# CONFIG_USB_OTG is not set
616 689
@@ -619,9 +692,11 @@ CONFIG_USB_DEVICEFS=y
619# 692#
620# CONFIG_USB_ISP116X_HCD is not set 693# CONFIG_USB_ISP116X_HCD is not set
621CONFIG_USB_OHCI_HCD=y 694CONFIG_USB_OHCI_HCD=y
622# CONFIG_USB_OHCI_BIG_ENDIAN is not set 695# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
696# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
623CONFIG_USB_OHCI_LITTLE_ENDIAN=y 697CONFIG_USB_OHCI_LITTLE_ENDIAN=y
624# CONFIG_USB_SL811_HCD is not set 698# CONFIG_USB_SL811_HCD is not set
699# CONFIG_USB_R8A66597_HCD is not set
625 700
626# 701#
627# USB Device Class drivers 702# USB Device Class drivers
@@ -640,6 +715,7 @@ CONFIG_USB_STORAGE=y
640CONFIG_USB_STORAGE_DEBUG=y 715CONFIG_USB_STORAGE_DEBUG=y
641# CONFIG_USB_STORAGE_DATAFAB is not set 716# CONFIG_USB_STORAGE_DATAFAB is not set
642# CONFIG_USB_STORAGE_FREECOM is not set 717# CONFIG_USB_STORAGE_FREECOM is not set
718# CONFIG_USB_STORAGE_ISD200 is not set
643# CONFIG_USB_STORAGE_DPCM is not set 719# CONFIG_USB_STORAGE_DPCM is not set
644# CONFIG_USB_STORAGE_USBAT is not set 720# CONFIG_USB_STORAGE_USBAT is not set
645# CONFIG_USB_STORAGE_SDDR09 is not set 721# CONFIG_USB_STORAGE_SDDR09 is not set
@@ -650,43 +726,10 @@ CONFIG_USB_STORAGE_DEBUG=y
650# CONFIG_USB_LIBUSUAL is not set 726# CONFIG_USB_LIBUSUAL is not set
651 727
652# 728#
653# USB Input Devices
654#
655# CONFIG_USB_HID is not set
656
657#
658# USB HID Boot Protocol drivers
659#
660# CONFIG_USB_KBD is not set
661# CONFIG_USB_MOUSE is not set
662# CONFIG_USB_AIPTEK is not set
663# CONFIG_USB_WACOM is not set
664# CONFIG_USB_ACECAD is not set
665# CONFIG_USB_KBTAB is not set
666# CONFIG_USB_POWERMATE is not set
667# CONFIG_USB_TOUCHSCREEN is not set
668# CONFIG_USB_YEALINK is not set
669# CONFIG_USB_XPAD is not set
670# CONFIG_USB_ATI_REMOTE is not set
671# CONFIG_USB_ATI_REMOTE2 is not set
672# CONFIG_USB_KEYSPAN_REMOTE is not set
673# CONFIG_USB_APPLETOUCH is not set
674
675#
676# USB Imaging devices 729# USB Imaging devices
677# 730#
678# CONFIG_USB_MDC800 is not set 731# CONFIG_USB_MDC800 is not set
679# CONFIG_USB_MICROTEK is not set 732# CONFIG_USB_MICROTEK is not set
680
681#
682# USB Network Adapters
683#
684# CONFIG_USB_CATC is not set
685# CONFIG_USB_KAWETH is not set
686# CONFIG_USB_PEGASUS is not set
687# CONFIG_USB_RTL8150 is not set
688# CONFIG_USB_USBNET_MII is not set
689# CONFIG_USB_USBNET is not set
690CONFIG_USB_MON=y 733CONFIG_USB_MON=y
691 734
692# 735#
@@ -708,6 +751,7 @@ CONFIG_USB_MON=y
708# CONFIG_USB_RIO500 is not set 751# CONFIG_USB_RIO500 is not set
709# CONFIG_USB_LEGOTOWER is not set 752# CONFIG_USB_LEGOTOWER is not set
710# CONFIG_USB_LCD is not set 753# CONFIG_USB_LCD is not set
754# CONFIG_USB_BERRY_CHARGE is not set
711# CONFIG_USB_LED is not set 755# CONFIG_USB_LED is not set
712# CONFIG_USB_CYPRESS_CY7C63 is not set 756# CONFIG_USB_CYPRESS_CY7C63 is not set
713# CONFIG_USB_CYTHERM is not set 757# CONFIG_USB_CYTHERM is not set
@@ -717,6 +761,7 @@ CONFIG_USB_MON=y
717# CONFIG_USB_APPLEDISPLAY is not set 761# CONFIG_USB_APPLEDISPLAY is not set
718# CONFIG_USB_LD is not set 762# CONFIG_USB_LD is not set
719# CONFIG_USB_TRANCEVIBRATOR is not set 763# CONFIG_USB_TRANCEVIBRATOR is not set
764# CONFIG_USB_IOWARRIOR is not set
720# CONFIG_USB_TEST is not set 765# CONFIG_USB_TEST is not set
721 766
722# 767#
@@ -727,13 +772,19 @@ CONFIG_USB_MON=y
727# USB Gadget Support 772# USB Gadget Support
728# 773#
729CONFIG_USB_GADGET=y 774CONFIG_USB_GADGET=y
775# CONFIG_USB_GADGET_DEBUG is not set
730# CONFIG_USB_GADGET_DEBUG_FILES is not set 776# CONFIG_USB_GADGET_DEBUG_FILES is not set
731CONFIG_USB_GADGET_SELECTED=y 777CONFIG_USB_GADGET_SELECTED=y
778# CONFIG_USB_GADGET_AMD5536UDC is not set
779# CONFIG_USB_GADGET_ATMEL_USBA is not set
780# CONFIG_USB_GADGET_FSL_USB2 is not set
732# CONFIG_USB_GADGET_NET2280 is not set 781# CONFIG_USB_GADGET_NET2280 is not set
733# CONFIG_USB_GADGET_PXA2XX is not set 782# CONFIG_USB_GADGET_PXA2XX is not set
783# CONFIG_USB_GADGET_M66592 is not set
734# CONFIG_USB_GADGET_GOKU is not set 784# CONFIG_USB_GADGET_GOKU is not set
735# CONFIG_USB_GADGET_LH7A40X is not set 785# CONFIG_USB_GADGET_LH7A40X is not set
736# CONFIG_USB_GADGET_OMAP is not set 786# CONFIG_USB_GADGET_OMAP is not set
787# CONFIG_USB_GADGET_S3C2410 is not set
737CONFIG_USB_GADGET_AT91=y 788CONFIG_USB_GADGET_AT91=y
738CONFIG_USB_AT91=y 789CONFIG_USB_AT91=y
739# CONFIG_USB_GADGET_DUMMY_HCD is not set 790# CONFIG_USB_GADGET_DUMMY_HCD is not set
@@ -745,17 +796,56 @@ CONFIG_USB_FILE_STORAGE=m
745# CONFIG_USB_FILE_STORAGE_TEST is not set 796# CONFIG_USB_FILE_STORAGE_TEST is not set
746CONFIG_USB_G_SERIAL=m 797CONFIG_USB_G_SERIAL=m
747# CONFIG_USB_MIDI_GADGET is not set 798# CONFIG_USB_MIDI_GADGET is not set
799# CONFIG_MMC is not set
800# CONFIG_NEW_LEDS is not set
801CONFIG_RTC_LIB=y
802CONFIG_RTC_CLASS=y
803CONFIG_RTC_HCTOSYS=y
804CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
805# CONFIG_RTC_DEBUG is not set
748 806
749# 807#
750# MMC/SD Card support 808# RTC interfaces
751# 809#
752# CONFIG_MMC is not set 810CONFIG_RTC_INTF_SYSFS=y
811CONFIG_RTC_INTF_PROC=y
812CONFIG_RTC_INTF_DEV=y
813# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
814# CONFIG_RTC_DRV_TEST is not set
753 815
754# 816#
755# Real Time Clock 817# I2C RTC drivers
818#
819# CONFIG_RTC_DRV_DS1307 is not set
820# CONFIG_RTC_DRV_DS1374 is not set
821# CONFIG_RTC_DRV_DS1672 is not set
822# CONFIG_RTC_DRV_MAX6900 is not set
823# CONFIG_RTC_DRV_RS5C372 is not set
824# CONFIG_RTC_DRV_ISL1208 is not set
825# CONFIG_RTC_DRV_X1205 is not set
826# CONFIG_RTC_DRV_PCF8563 is not set
827# CONFIG_RTC_DRV_PCF8583 is not set
828# CONFIG_RTC_DRV_M41T80 is not set
829
830#
831# SPI RTC drivers
756# 832#
757CONFIG_RTC_LIB=y 833
758# CONFIG_RTC_CLASS is not set 834#
835# Platform RTC drivers
836#
837# CONFIG_RTC_DRV_CMOS is not set
838# CONFIG_RTC_DRV_DS1553 is not set
839# CONFIG_RTC_DRV_STK17TA8 is not set
840# CONFIG_RTC_DRV_DS1742 is not set
841# CONFIG_RTC_DRV_M48T86 is not set
842# CONFIG_RTC_DRV_M48T59 is not set
843# CONFIG_RTC_DRV_V3020 is not set
844
845#
846# on-CPU RTC drivers
847#
848CONFIG_RTC_DRV_AT91SAM9=y
759 849
760# 850#
761# File systems 851# File systems
@@ -806,7 +896,6 @@ CONFIG_SYSFS=y
806CONFIG_TMPFS=y 896CONFIG_TMPFS=y
807# CONFIG_TMPFS_POSIX_ACL is not set 897# CONFIG_TMPFS_POSIX_ACL is not set
808# CONFIG_HUGETLB_PAGE is not set 898# CONFIG_HUGETLB_PAGE is not set
809CONFIG_RAMFS=y
810# CONFIG_CONFIGFS_FS is not set 899# CONFIG_CONFIGFS_FS is not set
811 900
812# 901#
@@ -825,10 +914,7 @@ CONFIG_CRAMFS=y
825# CONFIG_QNX4FS_FS is not set 914# CONFIG_QNX4FS_FS is not set
826# CONFIG_SYSV_FS is not set 915# CONFIG_SYSV_FS is not set
827# CONFIG_UFS_FS is not set 916# CONFIG_UFS_FS is not set
828 917CONFIG_NETWORK_FILESYSTEMS=y
829#
830# Network File Systems
831#
832# CONFIG_NFS_FS is not set 918# CONFIG_NFS_FS is not set
833# CONFIG_NFSD is not set 919# CONFIG_NFSD is not set
834# CONFIG_SMB_FS is not set 920# CONFIG_SMB_FS is not set
@@ -836,17 +922,12 @@ CONFIG_CRAMFS=y
836# CONFIG_NCP_FS is not set 922# CONFIG_NCP_FS is not set
837# CONFIG_CODA_FS is not set 923# CONFIG_CODA_FS is not set
838# CONFIG_AFS_FS is not set 924# CONFIG_AFS_FS is not set
839# CONFIG_9P_FS is not set
840 925
841# 926#
842# Partition Types 927# Partition Types
843# 928#
844# CONFIG_PARTITION_ADVANCED is not set 929# CONFIG_PARTITION_ADVANCED is not set
845CONFIG_MSDOS_PARTITION=y 930CONFIG_MSDOS_PARTITION=y
846
847#
848# Native Language Support
849#
850CONFIG_NLS=y 931CONFIG_NLS=y
851CONFIG_NLS_DEFAULT="iso8859-1" 932CONFIG_NLS_DEFAULT="iso8859-1"
852CONFIG_NLS_CODEPAGE_437=y 933CONFIG_NLS_CODEPAGE_437=y
@@ -887,41 +968,49 @@ CONFIG_NLS_ISO8859_1=y
887# CONFIG_NLS_KOI8_R is not set 968# CONFIG_NLS_KOI8_R is not set
888# CONFIG_NLS_KOI8_U is not set 969# CONFIG_NLS_KOI8_U is not set
889# CONFIG_NLS_UTF8 is not set 970# CONFIG_NLS_UTF8 is not set
890 971# CONFIG_DLM is not set
891# 972CONFIG_INSTRUMENTATION=y
892# Profiling support
893#
894# CONFIG_PROFILING is not set 973# CONFIG_PROFILING is not set
974# CONFIG_MARKERS is not set
895 975
896# 976#
897# Kernel hacking 977# Kernel hacking
898# 978#
899# CONFIG_PRINTK_TIME is not set 979# CONFIG_PRINTK_TIME is not set
980CONFIG_ENABLE_WARN_DEPRECATED=y
900CONFIG_ENABLE_MUST_CHECK=y 981CONFIG_ENABLE_MUST_CHECK=y
901# CONFIG_MAGIC_SYSRQ is not set 982# CONFIG_MAGIC_SYSRQ is not set
902# CONFIG_UNUSED_SYMBOLS is not set 983# CONFIG_UNUSED_SYMBOLS is not set
984# CONFIG_DEBUG_FS is not set
985# CONFIG_HEADERS_CHECK is not set
903CONFIG_DEBUG_KERNEL=y 986CONFIG_DEBUG_KERNEL=y
904CONFIG_LOG_BUF_SHIFT=14 987# CONFIG_DEBUG_SHIRQ is not set
905CONFIG_DETECT_SOFTLOCKUP=y 988CONFIG_DETECT_SOFTLOCKUP=y
989CONFIG_SCHED_DEBUG=y
906# CONFIG_SCHEDSTATS is not set 990# CONFIG_SCHEDSTATS is not set
991# CONFIG_TIMER_STATS is not set
907# CONFIG_DEBUG_SLAB is not set 992# CONFIG_DEBUG_SLAB is not set
908# CONFIG_DEBUG_RT_MUTEXES is not set 993# CONFIG_DEBUG_RT_MUTEXES is not set
909# CONFIG_RT_MUTEX_TESTER is not set 994# CONFIG_RT_MUTEX_TESTER is not set
910# CONFIG_DEBUG_SPINLOCK is not set 995# CONFIG_DEBUG_SPINLOCK is not set
911# CONFIG_DEBUG_MUTEXES is not set 996# CONFIG_DEBUG_MUTEXES is not set
912# CONFIG_DEBUG_RWSEMS is not set 997# CONFIG_DEBUG_LOCK_ALLOC is not set
998# CONFIG_PROVE_LOCKING is not set
999# CONFIG_LOCK_STAT is not set
913# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1000# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
914# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1001# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
915# CONFIG_DEBUG_KOBJECT is not set 1002# CONFIG_DEBUG_KOBJECT is not set
916CONFIG_DEBUG_BUGVERBOSE=y 1003CONFIG_DEBUG_BUGVERBOSE=y
917# CONFIG_DEBUG_INFO is not set 1004# CONFIG_DEBUG_INFO is not set
918# CONFIG_DEBUG_FS is not set
919# CONFIG_DEBUG_VM is not set 1005# CONFIG_DEBUG_VM is not set
920# CONFIG_DEBUG_LIST is not set 1006# CONFIG_DEBUG_LIST is not set
1007# CONFIG_DEBUG_SG is not set
921CONFIG_FRAME_POINTER=y 1008CONFIG_FRAME_POINTER=y
922CONFIG_FORCED_INLINING=y 1009CONFIG_FORCED_INLINING=y
923# CONFIG_HEADERS_CHECK is not set 1010# CONFIG_BOOT_PRINTK_DELAY is not set
924# CONFIG_RCU_TORTURE_TEST is not set 1011# CONFIG_RCU_TORTURE_TEST is not set
1012# CONFIG_FAULT_INJECTION is not set
1013# CONFIG_SAMPLES is not set
925CONFIG_DEBUG_USER=y 1014CONFIG_DEBUG_USER=y
926# CONFIG_DEBUG_ERRORS is not set 1015# CONFIG_DEBUG_ERRORS is not set
927CONFIG_DEBUG_LL=y 1016CONFIG_DEBUG_LL=y
@@ -932,18 +1021,21 @@ CONFIG_DEBUG_LL=y
932# 1021#
933# CONFIG_KEYS is not set 1022# CONFIG_KEYS is not set
934# CONFIG_SECURITY is not set 1023# CONFIG_SECURITY is not set
935 1024# CONFIG_SECURITY_FILE_CAPABILITIES is not set
936#
937# Cryptographic options
938#
939# CONFIG_CRYPTO is not set 1025# CONFIG_CRYPTO is not set
940 1026
941# 1027#
942# Library routines 1028# Library routines
943# 1029#
1030CONFIG_BITREVERSE=y
944# CONFIG_CRC_CCITT is not set 1031# CONFIG_CRC_CCITT is not set
945# CONFIG_CRC16 is not set 1032# CONFIG_CRC16 is not set
1033# CONFIG_CRC_ITU_T is not set
946CONFIG_CRC32=y 1034CONFIG_CRC32=y
1035# CONFIG_CRC7 is not set
947# CONFIG_LIBCRC32C is not set 1036# CONFIG_LIBCRC32C is not set
948CONFIG_ZLIB_INFLATE=y 1037CONFIG_ZLIB_INFLATE=y
949CONFIG_PLIST=y 1038CONFIG_PLIST=y
1039CONFIG_HAS_IOMEM=y
1040CONFIG_HAS_IOPORT=y
1041CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index fcd8fa091e9d..3802e85f7483 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -1,43 +1,56 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc6 3# Linux kernel version: 2.6.24-rc7
4# Fri Nov 17 18:00:38 2006 4# Tue Jan 8 22:21:49 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
7# CONFIG_GENERIC_TIME is not set 9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
8CONFIG_MMU=y 11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
9CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
10CONFIG_TRACE_IRQFLAGS_SUPPORT=y 16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
11CONFIG_HARDIRQS_SW_RESEND=y 17CONFIG_HARDIRQS_SW_RESEND=y
12CONFIG_GENERIC_IRQ_PROBE=y 18CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_HWEIGHT=y 22CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
16CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
17CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
18 27
19# 28#
20# Code maturity level options 29# General setup
21# 30#
22CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
23CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
24CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
25
26#
27# General setup
28#
29CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
30# CONFIG_LOCALVERSION_AUTO is not set 35# CONFIG_LOCALVERSION_AUTO is not set
31# CONFIG_SWAP is not set 36# CONFIG_SWAP is not set
32CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
33# CONFIG_IPC_NS is not set 38CONFIG_SYSVIPC_SYSCTL=y
34# CONFIG_POSIX_MQUEUE is not set 39# CONFIG_POSIX_MQUEUE is not set
35# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
36# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
37# CONFIG_UTS_NS is not set 42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
38# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
39# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
51CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 52# CONFIG_RELAY is not set
53CONFIG_BLK_DEV_INITRD=y
41CONFIG_INITRAMFS_SOURCE="" 54CONFIG_INITRAMFS_SOURCE=""
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y 55CONFIG_CC_OPTIMIZE_FOR_SIZE=y
43CONFIG_SYSCTL=y 56CONFIG_SYSCTL=y
@@ -53,30 +66,30 @@ CONFIG_BUG=y
53CONFIG_ELF_CORE=y 66CONFIG_ELF_CORE=y
54CONFIG_BASE_FULL=y 67CONFIG_BASE_FULL=y
55CONFIG_FUTEX=y 68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
56CONFIG_EPOLL=y 70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_EVENTFD=y
57CONFIG_SHMEM=y 73CONFIG_SHMEM=y
58CONFIG_SLAB=y
59CONFIG_VM_EVENT_COUNTERS=y 74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78CONFIG_SLABINFO=y
60CONFIG_RT_MUTEXES=y 79CONFIG_RT_MUTEXES=y
61# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
62CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
63# CONFIG_SLOB is not set
64
65#
66# Loadable module support
67#
68CONFIG_MODULES=y 82CONFIG_MODULES=y
69CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
70# CONFIG_MODULE_FORCE_UNLOAD is not set 84# CONFIG_MODULE_FORCE_UNLOAD is not set
71# CONFIG_MODVERSIONS is not set 85# CONFIG_MODVERSIONS is not set
72# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
73CONFIG_KMOD=y 87CONFIG_KMOD=y
74
75#
76# Block layer
77#
78CONFIG_BLOCK=y 88CONFIG_BLOCK=y
89# CONFIG_LBD is not set
79# CONFIG_BLK_DEV_IO_TRACE is not set 90# CONFIG_BLK_DEV_IO_TRACE is not set
91# CONFIG_LSF is not set
92# CONFIG_BLK_DEV_BSG is not set
80 93
81# 94#
82# IO Schedulers 95# IO Schedulers
@@ -108,12 +121,16 @@ CONFIG_ARCH_AT91=y
108# CONFIG_ARCH_NETX is not set 121# CONFIG_ARCH_NETX is not set
109# CONFIG_ARCH_H720X is not set 122# CONFIG_ARCH_H720X is not set
110# CONFIG_ARCH_IMX is not set 123# CONFIG_ARCH_IMX is not set
124# CONFIG_ARCH_IOP13XX is not set
111# CONFIG_ARCH_IOP32X is not set 125# CONFIG_ARCH_IOP32X is not set
112# CONFIG_ARCH_IOP33X is not set 126# CONFIG_ARCH_IOP33X is not set
113# CONFIG_ARCH_IXP4XX is not set
114# CONFIG_ARCH_IXP2000 is not set
115# CONFIG_ARCH_IXP23XX is not set 127# CONFIG_ARCH_IXP23XX is not set
128# CONFIG_ARCH_IXP2000 is not set
129# CONFIG_ARCH_IXP4XX is not set
116# CONFIG_ARCH_L7200 is not set 130# CONFIG_ARCH_L7200 is not set
131# CONFIG_ARCH_KS8695 is not set
132# CONFIG_ARCH_NS9XXX is not set
133# CONFIG_ARCH_MXC is not set
117# CONFIG_ARCH_PNX4008 is not set 134# CONFIG_ARCH_PNX4008 is not set
118# CONFIG_ARCH_PXA is not set 135# CONFIG_ARCH_PXA is not set
119# CONFIG_ARCH_RPC is not set 136# CONFIG_ARCH_RPC is not set
@@ -121,14 +138,27 @@ CONFIG_ARCH_AT91=y
121# CONFIG_ARCH_S3C2410 is not set 138# CONFIG_ARCH_S3C2410 is not set
122# CONFIG_ARCH_SHARK is not set 139# CONFIG_ARCH_SHARK is not set
123# CONFIG_ARCH_LH7A40X is not set 140# CONFIG_ARCH_LH7A40X is not set
141# CONFIG_ARCH_DAVINCI is not set
124# CONFIG_ARCH_OMAP is not set 142# CONFIG_ARCH_OMAP is not set
125 143
126# 144#
145# Boot options
146#
147
148#
149# Power management
150#
151
152#
127# Atmel AT91 System-on-Chip 153# Atmel AT91 System-on-Chip
128# 154#
129# CONFIG_ARCH_AT91RM9200 is not set 155# CONFIG_ARCH_AT91RM9200 is not set
130# CONFIG_ARCH_AT91SAM9260 is not set 156# CONFIG_ARCH_AT91SAM9260 is not set
131CONFIG_ARCH_AT91SAM9261=y 157CONFIG_ARCH_AT91SAM9261=y
158# CONFIG_ARCH_AT91SAM9263 is not set
159# CONFIG_ARCH_AT91SAM9RL is not set
160# CONFIG_ARCH_AT91X40 is not set
161CONFIG_AT91_PMC_UNIT=y
132 162
133# 163#
134# AT91SAM9261 Board Type 164# AT91SAM9261 Board Type
@@ -138,12 +168,15 @@ CONFIG_MACH_AT91SAM9261EK=y
138# 168#
139# AT91 Board Options 169# AT91 Board Options
140# 170#
171# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
141# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set 172# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
142 173
143# 174#
144# AT91 Feature Selections 175# AT91 Feature Selections
145# 176#
146# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set 177CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
178# CONFIG_ATMEL_TCLIB is not set
179CONFIG_AT91_TIMER_HZ=100
147 180
148# 181#
149# Processor Type 182# Processor Type
@@ -166,19 +199,19 @@ CONFIG_CPU_CP15_MMU=y
166# CONFIG_CPU_DCACHE_DISABLE is not set 199# CONFIG_CPU_DCACHE_DISABLE is not set
167# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 200# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
168# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 201# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
202# CONFIG_OUTER_CACHE is not set
169 203
170# 204#
171# Bus support 205# Bus support
172# 206#
173 207# CONFIG_PCI_SYSCALL is not set
174# 208# CONFIG_ARCH_SUPPORTS_MSI is not set
175# PCCARD (PCMCIA/CardBus) support
176#
177# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
178 210
179# 211#
180# Kernel Features 212# Kernel Features
181# 213#
214# CONFIG_TICK_ONESHOT is not set
182# CONFIG_PREEMPT is not set 215# CONFIG_PREEMPT is not set
183# CONFIG_NO_IDLE_HZ is not set 216# CONFIG_NO_IDLE_HZ is not set
184CONFIG_HZ=100 217CONFIG_HZ=100
@@ -191,8 +224,12 @@ CONFIG_FLATMEM_MANUAL=y
191CONFIG_FLATMEM=y 224CONFIG_FLATMEM=y
192CONFIG_FLAT_NODE_MEM_MAP=y 225CONFIG_FLAT_NODE_MEM_MAP=y
193# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
227# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4096 228CONFIG_SPLIT_PTLOCK_CPUS=4096
195# CONFIG_RESOURCES_64BIT is not set 229# CONFIG_RESOURCES_64BIT is not set
230CONFIG_ZONE_DMA_FLAG=1
231CONFIG_BOUNCE=y
232CONFIG_VIRT_TO_BUS=y
196# CONFIG_LEDS is not set 233# CONFIG_LEDS is not set
197CONFIG_ALIGNMENT_TRAP=y 234CONFIG_ALIGNMENT_TRAP=y
198 235
@@ -203,6 +240,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
203CONFIG_ZBOOT_ROM_BSS=0x0 240CONFIG_ZBOOT_ROM_BSS=0x0
204CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 241CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
205# CONFIG_XIP_KERNEL is not set 242# CONFIG_XIP_KERNEL is not set
243# CONFIG_KEXEC is not set
206 244
207# 245#
208# Floating point emulation 246# Floating point emulation
@@ -228,7 +266,7 @@ CONFIG_BINFMT_ELF=y
228# Power management options 266# Power management options
229# 267#
230# CONFIG_PM is not set 268# CONFIG_PM is not set
231# CONFIG_APM is not set 269CONFIG_SUSPEND_UP_POSSIBLE=y
232 270
233# 271#
234# Networking 272# Networking
@@ -238,13 +276,13 @@ CONFIG_NET=y
238# 276#
239# Networking options 277# Networking options
240# 278#
241# CONFIG_NETDEBUG is not set
242CONFIG_PACKET=y 279CONFIG_PACKET=y
243# CONFIG_PACKET_MMAP is not set 280# CONFIG_PACKET_MMAP is not set
244CONFIG_UNIX=y 281CONFIG_UNIX=y
245CONFIG_XFRM=y 282CONFIG_XFRM=y
246# CONFIG_XFRM_USER is not set 283# CONFIG_XFRM_USER is not set
247# CONFIG_XFRM_SUB_POLICY is not set 284# CONFIG_XFRM_SUB_POLICY is not set
285# CONFIG_XFRM_MIGRATE is not set
248# CONFIG_NET_KEY is not set 286# CONFIG_NET_KEY is not set
249CONFIG_INET=y 287CONFIG_INET=y
250# CONFIG_IP_MULTICAST is not set 288# CONFIG_IP_MULTICAST is not set
@@ -266,30 +304,20 @@ CONFIG_IP_PNP_BOOTP=y
266CONFIG_INET_XFRM_MODE_TRANSPORT=y 304CONFIG_INET_XFRM_MODE_TRANSPORT=y
267CONFIG_INET_XFRM_MODE_TUNNEL=y 305CONFIG_INET_XFRM_MODE_TUNNEL=y
268CONFIG_INET_XFRM_MODE_BEET=y 306CONFIG_INET_XFRM_MODE_BEET=y
307# CONFIG_INET_LRO is not set
269CONFIG_INET_DIAG=y 308CONFIG_INET_DIAG=y
270CONFIG_INET_TCP_DIAG=y 309CONFIG_INET_TCP_DIAG=y
271# CONFIG_TCP_CONG_ADVANCED is not set 310# CONFIG_TCP_CONG_ADVANCED is not set
272CONFIG_TCP_CONG_CUBIC=y 311CONFIG_TCP_CONG_CUBIC=y
273CONFIG_DEFAULT_TCP_CONG="cubic" 312CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_TCP_MD5SIG is not set
274# CONFIG_IPV6 is not set 314# CONFIG_IPV6 is not set
275# CONFIG_INET6_XFRM_TUNNEL is not set 315# CONFIG_INET6_XFRM_TUNNEL is not set
276# CONFIG_INET6_TUNNEL is not set 316# CONFIG_INET6_TUNNEL is not set
277# CONFIG_NETWORK_SECMARK is not set 317# CONFIG_NETWORK_SECMARK is not set
278# CONFIG_NETFILTER is not set 318# CONFIG_NETFILTER is not set
279
280#
281# DCCP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_DCCP is not set 319# CONFIG_IP_DCCP is not set
284
285#
286# SCTP Configuration (EXPERIMENTAL)
287#
288# CONFIG_IP_SCTP is not set 320# CONFIG_IP_SCTP is not set
289
290#
291# TIPC Configuration (EXPERIMENTAL)
292#
293# CONFIG_TIPC is not set 321# CONFIG_TIPC is not set
294# CONFIG_ATM is not set 322# CONFIG_ATM is not set
295# CONFIG_BRIDGE is not set 323# CONFIG_BRIDGE is not set
@@ -302,10 +330,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_LAPB is not set 330# CONFIG_LAPB is not set
303# CONFIG_ECONET is not set 331# CONFIG_ECONET is not set
304# CONFIG_WAN_ROUTER is not set 332# CONFIG_WAN_ROUTER is not set
305
306#
307# QoS and/or fair queueing
308#
309# CONFIG_NET_SCHED is not set 333# CONFIG_NET_SCHED is not set
310 334
311# 335#
@@ -315,7 +339,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_HAMRADIO is not set 339# CONFIG_HAMRADIO is not set
316# CONFIG_IRDA is not set 340# CONFIG_IRDA is not set
317# CONFIG_BT is not set 341# CONFIG_BT is not set
342# CONFIG_AF_RXRPC is not set
343
344#
345# Wireless
346#
347# CONFIG_CFG80211 is not set
348# CONFIG_WIRELESS_EXT is not set
349# CONFIG_MAC80211 is not set
318# CONFIG_IEEE80211 is not set 350# CONFIG_IEEE80211 is not set
351# CONFIG_RFKILL is not set
352# CONFIG_NET_9P is not set
319 353
320# 354#
321# Device Drivers 355# Device Drivers
@@ -324,20 +358,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
324# 358#
325# Generic Driver Options 359# Generic Driver Options
326# 360#
361CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
327CONFIG_STANDALONE=y 362CONFIG_STANDALONE=y
328CONFIG_PREVENT_FIRMWARE_BUILD=y 363CONFIG_PREVENT_FIRMWARE_BUILD=y
329# CONFIG_FW_LOADER is not set 364# CONFIG_FW_LOADER is not set
330# CONFIG_DEBUG_DRIVER is not set 365# CONFIG_DEBUG_DRIVER is not set
366# CONFIG_DEBUG_DEVRES is not set
331# CONFIG_SYS_HYPERVISOR is not set 367# CONFIG_SYS_HYPERVISOR is not set
332
333#
334# Connector - unified userspace <-> kernelspace linker
335#
336# CONFIG_CONNECTOR is not set 368# CONFIG_CONNECTOR is not set
337
338#
339# Memory Technology Devices (MTD)
340#
341CONFIG_MTD=y 369CONFIG_MTD=y
342# CONFIG_MTD_DEBUG is not set 370# CONFIG_MTD_DEBUG is not set
343# CONFIG_MTD_CONCAT is not set 371# CONFIG_MTD_CONCAT is not set
@@ -350,12 +378,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
350# User Modules And Translation Layers 378# User Modules And Translation Layers
351# 379#
352# CONFIG_MTD_CHAR is not set 380# CONFIG_MTD_CHAR is not set
381CONFIG_MTD_BLKDEVS=y
353CONFIG_MTD_BLOCK=y 382CONFIG_MTD_BLOCK=y
354# CONFIG_FTL is not set 383# CONFIG_FTL is not set
355# CONFIG_NFTL is not set 384# CONFIG_NFTL is not set
356# CONFIG_INFTL is not set 385# CONFIG_INFTL is not set
357# CONFIG_RFD_FTL is not set 386# CONFIG_RFD_FTL is not set
358# CONFIG_SSFDC is not set 387# CONFIG_SSFDC is not set
388# CONFIG_MTD_OOPS is not set
359 389
360# 390#
361# RAM/ROM/Flash chip drivers 391# RAM/ROM/Flash chip drivers
@@ -375,7 +405,6 @@ CONFIG_MTD_CFI_I2=y
375# CONFIG_MTD_RAM is not set 405# CONFIG_MTD_RAM is not set
376# CONFIG_MTD_ROM is not set 406# CONFIG_MTD_ROM is not set
377# CONFIG_MTD_ABSENT is not set 407# CONFIG_MTD_ABSENT is not set
378# CONFIG_MTD_OBSOLETE_CHIPS is not set
379 408
380# 409#
381# Mapping drivers for chip access 410# Mapping drivers for chip access
@@ -386,6 +415,8 @@ CONFIG_MTD_CFI_I2=y
386# 415#
387# Self-contained MTD device drivers 416# Self-contained MTD device drivers
388# 417#
418# CONFIG_MTD_DATAFLASH is not set
419# CONFIG_MTD_M25P80 is not set
389# CONFIG_MTD_SLRAM is not set 420# CONFIG_MTD_SLRAM is not set
390# CONFIG_MTD_PHRAM is not set 421# CONFIG_MTD_PHRAM is not set
391# CONFIG_MTD_MTDRAM is not set 422# CONFIG_MTD_MTDRAM is not set
@@ -397,35 +428,24 @@ CONFIG_MTD_CFI_I2=y
397# CONFIG_MTD_DOC2000 is not set 428# CONFIG_MTD_DOC2000 is not set
398# CONFIG_MTD_DOC2001 is not set 429# CONFIG_MTD_DOC2001 is not set
399# CONFIG_MTD_DOC2001PLUS is not set 430# CONFIG_MTD_DOC2001PLUS is not set
400
401#
402# NAND Flash Device Drivers
403#
404CONFIG_MTD_NAND=y 431CONFIG_MTD_NAND=y
405# CONFIG_MTD_NAND_VERIFY_WRITE is not set 432# CONFIG_MTD_NAND_VERIFY_WRITE is not set
406# CONFIG_MTD_NAND_ECC_SMC is not set 433# CONFIG_MTD_NAND_ECC_SMC is not set
434# CONFIG_MTD_NAND_MUSEUM_IDS is not set
407CONFIG_MTD_NAND_IDS=y 435CONFIG_MTD_NAND_IDS=y
408# CONFIG_MTD_NAND_DISKONCHIP is not set 436# CONFIG_MTD_NAND_DISKONCHIP is not set
409CONFIG_MTD_NAND_AT91=y 437CONFIG_MTD_NAND_AT91=y
410# CONFIG_MTD_NAND_NANDSIM is not set 438# CONFIG_MTD_NAND_NANDSIM is not set
411 439# CONFIG_MTD_NAND_PLATFORM is not set
412# 440# CONFIG_MTD_ALAUDA is not set
413# OneNAND Flash Device Drivers
414#
415# CONFIG_MTD_ONENAND is not set 441# CONFIG_MTD_ONENAND is not set
416 442
417# 443#
418# Parallel port support 444# UBI - Unsorted block images
419# 445#
446# CONFIG_MTD_UBI is not set
420# CONFIG_PARPORT is not set 447# CONFIG_PARPORT is not set
421 448CONFIG_BLK_DEV=y
422#
423# Plug and Play support
424#
425
426#
427# Block devices
428#
429# CONFIG_BLK_DEV_COW_COMMON is not set 449# CONFIG_BLK_DEV_COW_COMMON is not set
430# CONFIG_BLK_DEV_LOOP is not set 450# CONFIG_BLK_DEV_LOOP is not set
431# CONFIG_BLK_DEV_NBD is not set 451# CONFIG_BLK_DEV_NBD is not set
@@ -434,15 +454,19 @@ CONFIG_BLK_DEV_RAM=y
434CONFIG_BLK_DEV_RAM_COUNT=16 454CONFIG_BLK_DEV_RAM_COUNT=16
435CONFIG_BLK_DEV_RAM_SIZE=8192 455CONFIG_BLK_DEV_RAM_SIZE=8192
436CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 456CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
437CONFIG_BLK_DEV_INITRD=y
438# CONFIG_CDROM_PKTCDVD is not set 457# CONFIG_CDROM_PKTCDVD is not set
439# CONFIG_ATA_OVER_ETH is not set 458# CONFIG_ATA_OVER_ETH is not set
459CONFIG_MISC_DEVICES=y
460# CONFIG_EEPROM_93CX6 is not set
461CONFIG_ATMEL_SSC=y
440 462
441# 463#
442# SCSI device support 464# SCSI device support
443# 465#
444# CONFIG_RAID_ATTRS is not set 466# CONFIG_RAID_ATTRS is not set
445CONFIG_SCSI=y 467CONFIG_SCSI=y
468CONFIG_SCSI_DMA=y
469# CONFIG_SCSI_TGT is not set
446# CONFIG_SCSI_NETLINK is not set 470# CONFIG_SCSI_NETLINK is not set
447CONFIG_SCSI_PROC_FS=y 471CONFIG_SCSI_PROC_FS=y
448 472
@@ -462,6 +486,8 @@ CONFIG_BLK_DEV_SD=y
462CONFIG_SCSI_MULTI_LUN=y 486CONFIG_SCSI_MULTI_LUN=y
463# CONFIG_SCSI_CONSTANTS is not set 487# CONFIG_SCSI_CONSTANTS is not set
464# CONFIG_SCSI_LOGGING is not set 488# CONFIG_SCSI_LOGGING is not set
489# CONFIG_SCSI_SCAN_ASYNC is not set
490CONFIG_SCSI_WAIT_SCAN=m
465 491
466# 492#
467# SCSI Transports 493# SCSI Transports
@@ -469,75 +495,49 @@ CONFIG_SCSI_MULTI_LUN=y
469# CONFIG_SCSI_SPI_ATTRS is not set 495# CONFIG_SCSI_SPI_ATTRS is not set
470# CONFIG_SCSI_FC_ATTRS is not set 496# CONFIG_SCSI_FC_ATTRS is not set
471# CONFIG_SCSI_ISCSI_ATTRS is not set 497# CONFIG_SCSI_ISCSI_ATTRS is not set
472# CONFIG_SCSI_SAS_ATTRS is not set
473# CONFIG_SCSI_SAS_LIBSAS is not set 498# CONFIG_SCSI_SAS_LIBSAS is not set
474 499# CONFIG_SCSI_SRP_ATTRS is not set
475# 500CONFIG_SCSI_LOWLEVEL=y
476# SCSI low-level drivers
477#
478# CONFIG_ISCSI_TCP is not set 501# CONFIG_ISCSI_TCP is not set
479# CONFIG_SCSI_DEBUG is not set 502# CONFIG_SCSI_DEBUG is not set
480 503# CONFIG_ATA is not set
481#
482# Multi-device support (RAID and LVM)
483#
484# CONFIG_MD is not set 504# CONFIG_MD is not set
485
486#
487# Fusion MPT device support
488#
489# CONFIG_FUSION is not set
490
491#
492# IEEE 1394 (FireWire) support
493#
494
495#
496# I2O device support
497#
498
499#
500# Network device support
501#
502CONFIG_NETDEVICES=y 505CONFIG_NETDEVICES=y
506# CONFIG_NETDEVICES_MULTIQUEUE is not set
503# CONFIG_DUMMY is not set 507# CONFIG_DUMMY is not set
504# CONFIG_BONDING is not set 508# CONFIG_BONDING is not set
509# CONFIG_MACVLAN is not set
505# CONFIG_EQUALIZER is not set 510# CONFIG_EQUALIZER is not set
506# CONFIG_TUN is not set 511# CONFIG_TUN is not set
507 512# CONFIG_VETH is not set
508#
509# PHY device support
510#
511# CONFIG_PHYLIB is not set 513# CONFIG_PHYLIB is not set
512
513#
514# Ethernet (10 or 100Mbit)
515#
516CONFIG_NET_ETHERNET=y 514CONFIG_NET_ETHERNET=y
517CONFIG_MII=y 515CONFIG_MII=y
516# CONFIG_AX88796 is not set
518# CONFIG_SMC91X is not set 517# CONFIG_SMC91X is not set
519CONFIG_DM9000=y 518CONFIG_DM9000=y
519# CONFIG_IBM_NEW_EMAC_ZMII is not set
520# CONFIG_IBM_NEW_EMAC_RGMII is not set
521# CONFIG_IBM_NEW_EMAC_TAH is not set
522# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
523# CONFIG_B44 is not set
524# CONFIG_NETDEV_1000 is not set
525# CONFIG_NETDEV_10000 is not set
520 526
521# 527#
522# Ethernet (1000 Mbit) 528# Wireless LAN
523#
524
525#
526# Ethernet (10000 Mbit)
527#
528
529#
530# Token Ring devices
531# 529#
530# CONFIG_WLAN_PRE80211 is not set
531# CONFIG_WLAN_80211 is not set
532 532
533# 533#
534# Wireless LAN (non-hamradio) 534# USB Network Adapters
535#
536# CONFIG_NET_RADIO is not set
537
538#
539# Wan interfaces
540# 535#
536# CONFIG_USB_CATC is not set
537# CONFIG_USB_KAWETH is not set
538# CONFIG_USB_PEGASUS is not set
539# CONFIG_USB_RTL8150 is not set
540# CONFIG_USB_USBNET is not set
541# CONFIG_WAN is not set 541# CONFIG_WAN is not set
542# CONFIG_PPP is not set 542# CONFIG_PPP is not set
543# CONFIG_SLIP is not set 543# CONFIG_SLIP is not set
@@ -545,10 +545,6 @@ CONFIG_DM9000=y
545# CONFIG_NETCONSOLE is not set 545# CONFIG_NETCONSOLE is not set
546# CONFIG_NETPOLL is not set 546# CONFIG_NETPOLL is not set
547# CONFIG_NET_POLL_CONTROLLER is not set 547# CONFIG_NET_POLL_CONTROLLER is not set
548
549#
550# ISDN subsystem
551#
552# CONFIG_ISDN is not set 548# CONFIG_ISDN is not set
553 549
554# 550#
@@ -556,6 +552,7 @@ CONFIG_DM9000=y
556# 552#
557CONFIG_INPUT=y 553CONFIG_INPUT=y
558# CONFIG_INPUT_FF_MEMLESS is not set 554# CONFIG_INPUT_FF_MEMLESS is not set
555# CONFIG_INPUT_POLLDEV is not set
559 556
560# 557#
561# Userland interfaces 558# Userland interfaces
@@ -565,23 +562,43 @@ CONFIG_INPUT_MOUSEDEV=y
565CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 562CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
566CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 563CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
567# CONFIG_INPUT_JOYDEV is not set 564# CONFIG_INPUT_JOYDEV is not set
568# CONFIG_INPUT_TSDEV is not set
569# CONFIG_INPUT_EVDEV is not set 565# CONFIG_INPUT_EVDEV is not set
570# CONFIG_INPUT_EVBUG is not set 566# CONFIG_INPUT_EVBUG is not set
571 567
572# 568#
573# Input Device Drivers 569# Input Device Drivers
574# 570#
575# CONFIG_INPUT_KEYBOARD is not set 571CONFIG_INPUT_KEYBOARD=y
572# CONFIG_KEYBOARD_ATKBD is not set
573# CONFIG_KEYBOARD_SUNKBD is not set
574# CONFIG_KEYBOARD_LKKBD is not set
575# CONFIG_KEYBOARD_XTKBD is not set
576# CONFIG_KEYBOARD_NEWTON is not set
577# CONFIG_KEYBOARD_STOWAWAY is not set
578CONFIG_KEYBOARD_GPIO=y
576# CONFIG_INPUT_MOUSE is not set 579# CONFIG_INPUT_MOUSE is not set
577# CONFIG_INPUT_JOYSTICK is not set 580# CONFIG_INPUT_JOYSTICK is not set
578# CONFIG_INPUT_TOUCHSCREEN is not set 581# CONFIG_INPUT_TABLET is not set
582CONFIG_INPUT_TOUCHSCREEN=y
583CONFIG_TOUCHSCREEN_ADS7846=y
584# CONFIG_TOUCHSCREEN_FUJITSU is not set
585# CONFIG_TOUCHSCREEN_GUNZE is not set
586# CONFIG_TOUCHSCREEN_ELO is not set
587# CONFIG_TOUCHSCREEN_MTOUCH is not set
588# CONFIG_TOUCHSCREEN_MK712 is not set
589# CONFIG_TOUCHSCREEN_PENMOUNT is not set
590# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
591# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
592# CONFIG_TOUCHSCREEN_UCB1400 is not set
593# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
579# CONFIG_INPUT_MISC is not set 594# CONFIG_INPUT_MISC is not set
580 595
581# 596#
582# Hardware I/O ports 597# Hardware I/O ports
583# 598#
584# CONFIG_SERIO is not set 599CONFIG_SERIO=y
600CONFIG_SERIO_SERPORT=y
601# CONFIG_SERIO_RAW is not set
585# CONFIG_GAMEPORT is not set 602# CONFIG_GAMEPORT is not set
586 603
587# 604#
@@ -609,75 +626,47 @@ CONFIG_SERIAL_CORE_CONSOLE=y
609CONFIG_UNIX98_PTYS=y 626CONFIG_UNIX98_PTYS=y
610CONFIG_LEGACY_PTYS=y 627CONFIG_LEGACY_PTYS=y
611CONFIG_LEGACY_PTY_COUNT=256 628CONFIG_LEGACY_PTY_COUNT=256
612
613#
614# IPMI
615#
616# CONFIG_IPMI_HANDLER is not set 629# CONFIG_IPMI_HANDLER is not set
617
618#
619# Watchdog Cards
620#
621CONFIG_WATCHDOG=y
622CONFIG_WATCHDOG_NOWAYOUT=y
623
624#
625# Watchdog Device Drivers
626#
627# CONFIG_SOFT_WATCHDOG is not set
628
629#
630# USB-based Watchdog Cards
631#
632# CONFIG_USBPCWATCHDOG is not set
633CONFIG_HW_RANDOM=y 630CONFIG_HW_RANDOM=y
634# CONFIG_NVRAM is not set 631# CONFIG_NVRAM is not set
635# CONFIG_DTLK is not set
636# CONFIG_R3964 is not set 632# CONFIG_R3964 is not set
637
638#
639# Ftape, the floppy tape device driver
640#
641# CONFIG_RAW_DRIVER is not set 633# CONFIG_RAW_DRIVER is not set
642
643#
644# TPM devices
645#
646# CONFIG_TCG_TPM is not set 634# CONFIG_TCG_TPM is not set
647
648#
649# I2C support
650#
651CONFIG_I2C=y 635CONFIG_I2C=y
636CONFIG_I2C_BOARDINFO=y
652CONFIG_I2C_CHARDEV=y 637CONFIG_I2C_CHARDEV=y
653 638
654# 639#
655# I2C Algorithms 640# I2C Algorithms
656# 641#
657# CONFIG_I2C_ALGOBIT is not set 642CONFIG_I2C_ALGOBIT=y
658# CONFIG_I2C_ALGOPCF is not set 643# CONFIG_I2C_ALGOPCF is not set
659# CONFIG_I2C_ALGOPCA is not set 644# CONFIG_I2C_ALGOPCA is not set
660 645
661# 646#
662# I2C Hardware Bus support 647# I2C Hardware Bus support
663# 648#
664CONFIG_I2C_AT91=y 649CONFIG_I2C_GPIO=y
665# CONFIG_I2C_OCORES is not set 650# CONFIG_I2C_OCORES is not set
666# CONFIG_I2C_PARPORT_LIGHT is not set 651# CONFIG_I2C_PARPORT_LIGHT is not set
652# CONFIG_I2C_SIMTEC is not set
653# CONFIG_I2C_TAOS_EVM is not set
667# CONFIG_I2C_STUB is not set 654# CONFIG_I2C_STUB is not set
655# CONFIG_I2C_TINY_USB is not set
668# CONFIG_I2C_PCA is not set 656# CONFIG_I2C_PCA is not set
669# CONFIG_I2C_PCA_ISA is not set
670 657
671# 658#
672# Miscellaneous I2C Chip support 659# Miscellaneous I2C Chip support
673# 660#
674# CONFIG_SENSORS_DS1337 is not set 661# CONFIG_SENSORS_DS1337 is not set
675# CONFIG_SENSORS_DS1374 is not set 662# CONFIG_SENSORS_DS1374 is not set
663# CONFIG_DS1682 is not set
676# CONFIG_SENSORS_EEPROM is not set 664# CONFIG_SENSORS_EEPROM is not set
677# CONFIG_SENSORS_PCF8574 is not set 665# CONFIG_SENSORS_PCF8574 is not set
678# CONFIG_SENSORS_PCA9539 is not set 666# CONFIG_SENSORS_PCA9539 is not set
679# CONFIG_SENSORS_PCF8591 is not set 667# CONFIG_SENSORS_PCF8591 is not set
680# CONFIG_SENSORS_MAX6875 is not set 668# CONFIG_SENSORS_MAX6875 is not set
669# CONFIG_SENSORS_TSL2550 is not set
681# CONFIG_I2C_DEBUG_CORE is not set 670# CONFIG_I2C_DEBUG_CORE is not set
682# CONFIG_I2C_DEBUG_ALGO is not set 671# CONFIG_I2C_DEBUG_ALGO is not set
683# CONFIG_I2C_DEBUG_BUS is not set 672# CONFIG_I2C_DEBUG_BUS is not set
@@ -686,70 +675,125 @@ CONFIG_I2C_AT91=y
686# 675#
687# SPI support 676# SPI support
688# 677#
689# CONFIG_SPI is not set 678CONFIG_SPI=y
690# CONFIG_SPI_MASTER is not set 679# CONFIG_SPI_DEBUG is not set
680CONFIG_SPI_MASTER=y
691 681
692# 682#
693# Dallas's 1-wire bus 683# SPI Master Controller Drivers
694# 684#
695# CONFIG_W1 is not set 685CONFIG_SPI_ATMEL=y
686# CONFIG_SPI_BITBANG is not set
696 687
697# 688#
698# Hardware Monitoring support 689# SPI Protocol Masters
699# 690#
691# CONFIG_SPI_AT25 is not set
692# CONFIG_SPI_SPIDEV is not set
693# CONFIG_SPI_TLE62X0 is not set
694# CONFIG_W1 is not set
695# CONFIG_POWER_SUPPLY is not set
700# CONFIG_HWMON is not set 696# CONFIG_HWMON is not set
701# CONFIG_HWMON_VID is not set 697CONFIG_WATCHDOG=y
698CONFIG_WATCHDOG_NOWAYOUT=y
702 699
703# 700#
704# Misc devices 701# Watchdog Device Drivers
705# 702#
706# CONFIG_TIFM_CORE is not set 703# CONFIG_SOFT_WATCHDOG is not set
704CONFIG_AT91SAM9_WATCHDOG=y
707 705
708# 706#
709# LED devices 707# USB-based Watchdog Cards
710# 708#
711# CONFIG_NEW_LEDS is not set 709# CONFIG_USBPCWATCHDOG is not set
712 710
713# 711#
714# LED drivers 712# Sonics Silicon Backplane
715# 713#
714CONFIG_SSB_POSSIBLE=y
715# CONFIG_SSB is not set
716 716
717# 717#
718# LED Triggers 718# Multifunction device drivers
719# 719#
720# CONFIG_MFD_SM501 is not set
720 721
721# 722#
722# Multimedia devices 723# Multimedia devices
723# 724#
724# CONFIG_VIDEO_DEV is not set 725# CONFIG_VIDEO_DEV is not set
725 726# CONFIG_DVB_CORE is not set
726# 727CONFIG_DAB=y
727# Digital Video Broadcasting Devices
728#
729# CONFIG_DVB is not set
730# CONFIG_USB_DABUSB is not set 728# CONFIG_USB_DABUSB is not set
731 729
732# 730#
733# Graphics support 731# Graphics support
734# 732#
733# CONFIG_VGASTATE is not set
734# CONFIG_VIDEO_OUTPUT_CONTROL is not set
735CONFIG_FB=y
735# CONFIG_FIRMWARE_EDID is not set 736# CONFIG_FIRMWARE_EDID is not set
736# CONFIG_FB is not set 737# CONFIG_FB_DDC is not set
738CONFIG_FB_CFB_FILLRECT=y
739CONFIG_FB_CFB_COPYAREA=y
740CONFIG_FB_CFB_IMAGEBLIT=y
741# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
742# CONFIG_FB_SYS_FILLRECT is not set
743# CONFIG_FB_SYS_COPYAREA is not set
744# CONFIG_FB_SYS_IMAGEBLIT is not set
745# CONFIG_FB_SYS_FOPS is not set
746CONFIG_FB_DEFERRED_IO=y
747# CONFIG_FB_SVGALIB is not set
748# CONFIG_FB_MACMODES is not set
749# CONFIG_FB_BACKLIGHT is not set
750# CONFIG_FB_MODE_HELPERS is not set
751# CONFIG_FB_TILEBLITTING is not set
752
753#
754# Frame buffer hardware drivers
755#
756# CONFIG_FB_S1D15605 is not set
757# CONFIG_FB_S1D13XXX is not set
758CONFIG_FB_ATMEL=y
759# CONFIG_FB_INTSRAM is not set
760# CONFIG_FB_ATMEL_STN is not set
761# CONFIG_FB_VIRTUAL is not set
762# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
763
764#
765# Display device support
766#
767# CONFIG_DISPLAY_SUPPORT is not set
737 768
738# 769#
739# Console display driver support 770# Console display driver support
740# 771#
741# CONFIG_VGA_CONSOLE is not set 772# CONFIG_VGA_CONSOLE is not set
742CONFIG_DUMMY_CONSOLE=y 773CONFIG_DUMMY_CONSOLE=y
743# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 774# CONFIG_FRAMEBUFFER_CONSOLE is not set
775# CONFIG_LOGO is not set
744 776
745# 777#
746# Sound 778# Sound
747# 779#
748# CONFIG_SOUND is not set 780# CONFIG_SOUND is not set
781CONFIG_HID_SUPPORT=y
782CONFIG_HID=y
783# CONFIG_HID_DEBUG is not set
784# CONFIG_HIDRAW is not set
749 785
750# 786#
751# USB support 787# USB Input Devices
752# 788#
789# CONFIG_USB_HID is not set
790
791#
792# USB HID Boot Protocol drivers
793#
794# CONFIG_USB_KBD is not set
795# CONFIG_USB_MOUSE is not set
796CONFIG_USB_SUPPORT=y
753CONFIG_USB_ARCH_HAS_HCD=y 797CONFIG_USB_ARCH_HAS_HCD=y
754CONFIG_USB_ARCH_HAS_OHCI=y 798CONFIG_USB_ARCH_HAS_OHCI=y
755# CONFIG_USB_ARCH_HAS_EHCI is not set 799# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -760,7 +804,7 @@ CONFIG_USB=y
760# Miscellaneous USB options 804# Miscellaneous USB options
761# 805#
762CONFIG_USB_DEVICEFS=y 806CONFIG_USB_DEVICEFS=y
763# CONFIG_USB_BANDWIDTH is not set 807CONFIG_USB_DEVICE_CLASS=y
764# CONFIG_USB_DYNAMIC_MINORS is not set 808# CONFIG_USB_DYNAMIC_MINORS is not set
765# CONFIG_USB_OTG is not set 809# CONFIG_USB_OTG is not set
766 810
@@ -769,9 +813,11 @@ CONFIG_USB_DEVICEFS=y
769# 813#
770# CONFIG_USB_ISP116X_HCD is not set 814# CONFIG_USB_ISP116X_HCD is not set
771CONFIG_USB_OHCI_HCD=y 815CONFIG_USB_OHCI_HCD=y
772# CONFIG_USB_OHCI_BIG_ENDIAN is not set 816# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
817# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
773CONFIG_USB_OHCI_LITTLE_ENDIAN=y 818CONFIG_USB_OHCI_LITTLE_ENDIAN=y
774# CONFIG_USB_SL811_HCD is not set 819# CONFIG_USB_SL811_HCD is not set
820# CONFIG_USB_R8A66597_HCD is not set
775 821
776# 822#
777# USB Device Class drivers 823# USB Device Class drivers
@@ -790,6 +836,7 @@ CONFIG_USB_STORAGE=y
790CONFIG_USB_STORAGE_DEBUG=y 836CONFIG_USB_STORAGE_DEBUG=y
791# CONFIG_USB_STORAGE_DATAFAB is not set 837# CONFIG_USB_STORAGE_DATAFAB is not set
792# CONFIG_USB_STORAGE_FREECOM is not set 838# CONFIG_USB_STORAGE_FREECOM is not set
839# CONFIG_USB_STORAGE_ISD200 is not set
793# CONFIG_USB_STORAGE_DPCM is not set 840# CONFIG_USB_STORAGE_DPCM is not set
794# CONFIG_USB_STORAGE_USBAT is not set 841# CONFIG_USB_STORAGE_USBAT is not set
795# CONFIG_USB_STORAGE_SDDR09 is not set 842# CONFIG_USB_STORAGE_SDDR09 is not set
@@ -800,43 +847,10 @@ CONFIG_USB_STORAGE_DEBUG=y
800# CONFIG_USB_LIBUSUAL is not set 847# CONFIG_USB_LIBUSUAL is not set
801 848
802# 849#
803# USB Input Devices
804#
805# CONFIG_USB_HID is not set
806
807#
808# USB HID Boot Protocol drivers
809#
810# CONFIG_USB_KBD is not set
811# CONFIG_USB_MOUSE is not set
812# CONFIG_USB_AIPTEK is not set
813# CONFIG_USB_WACOM is not set
814# CONFIG_USB_ACECAD is not set
815# CONFIG_USB_KBTAB is not set
816# CONFIG_USB_POWERMATE is not set
817# CONFIG_USB_TOUCHSCREEN is not set
818# CONFIG_USB_YEALINK is not set
819# CONFIG_USB_XPAD is not set
820# CONFIG_USB_ATI_REMOTE is not set
821# CONFIG_USB_ATI_REMOTE2 is not set
822# CONFIG_USB_KEYSPAN_REMOTE is not set
823# CONFIG_USB_APPLETOUCH is not set
824
825#
826# USB Imaging devices 850# USB Imaging devices
827# 851#
828# CONFIG_USB_MDC800 is not set 852# CONFIG_USB_MDC800 is not set
829# CONFIG_USB_MICROTEK is not set 853# CONFIG_USB_MICROTEK is not set
830
831#
832# USB Network Adapters
833#
834# CONFIG_USB_CATC is not set
835# CONFIG_USB_KAWETH is not set
836# CONFIG_USB_PEGASUS is not set
837# CONFIG_USB_RTL8150 is not set
838# CONFIG_USB_USBNET_MII is not set
839# CONFIG_USB_USBNET is not set
840CONFIG_USB_MON=y 854CONFIG_USB_MON=y
841 855
842# 856#
@@ -858,6 +872,7 @@ CONFIG_USB_MON=y
858# CONFIG_USB_RIO500 is not set 872# CONFIG_USB_RIO500 is not set
859# CONFIG_USB_LEGOTOWER is not set 873# CONFIG_USB_LEGOTOWER is not set
860# CONFIG_USB_LCD is not set 874# CONFIG_USB_LCD is not set
875# CONFIG_USB_BERRY_CHARGE is not set
861# CONFIG_USB_LED is not set 876# CONFIG_USB_LED is not set
862# CONFIG_USB_CYPRESS_CY7C63 is not set 877# CONFIG_USB_CYPRESS_CY7C63 is not set
863# CONFIG_USB_CYTHERM is not set 878# CONFIG_USB_CYTHERM is not set
@@ -867,6 +882,7 @@ CONFIG_USB_MON=y
867# CONFIG_USB_APPLEDISPLAY is not set 882# CONFIG_USB_APPLEDISPLAY is not set
868# CONFIG_USB_LD is not set 883# CONFIG_USB_LD is not set
869# CONFIG_USB_TRANCEVIBRATOR is not set 884# CONFIG_USB_TRANCEVIBRATOR is not set
885# CONFIG_USB_IOWARRIOR is not set
870# CONFIG_USB_TEST is not set 886# CONFIG_USB_TEST is not set
871 887
872# 888#
@@ -877,13 +893,19 @@ CONFIG_USB_MON=y
877# USB Gadget Support 893# USB Gadget Support
878# 894#
879CONFIG_USB_GADGET=y 895CONFIG_USB_GADGET=y
896# CONFIG_USB_GADGET_DEBUG is not set
880# CONFIG_USB_GADGET_DEBUG_FILES is not set 897# CONFIG_USB_GADGET_DEBUG_FILES is not set
881CONFIG_USB_GADGET_SELECTED=y 898CONFIG_USB_GADGET_SELECTED=y
899# CONFIG_USB_GADGET_AMD5536UDC is not set
900# CONFIG_USB_GADGET_ATMEL_USBA is not set
901# CONFIG_USB_GADGET_FSL_USB2 is not set
882# CONFIG_USB_GADGET_NET2280 is not set 902# CONFIG_USB_GADGET_NET2280 is not set
883# CONFIG_USB_GADGET_PXA2XX is not set 903# CONFIG_USB_GADGET_PXA2XX is not set
904# CONFIG_USB_GADGET_M66592 is not set
884# CONFIG_USB_GADGET_GOKU is not set 905# CONFIG_USB_GADGET_GOKU is not set
885# CONFIG_USB_GADGET_LH7A40X is not set 906# CONFIG_USB_GADGET_LH7A40X is not set
886# CONFIG_USB_GADGET_OMAP is not set 907# CONFIG_USB_GADGET_OMAP is not set
908# CONFIG_USB_GADGET_S3C2410 is not set
887CONFIG_USB_GADGET_AT91=y 909CONFIG_USB_GADGET_AT91=y
888CONFIG_USB_AT91=y 910CONFIG_USB_AT91=y
889# CONFIG_USB_GADGET_DUMMY_HCD is not set 911# CONFIG_USB_GADGET_DUMMY_HCD is not set
@@ -895,21 +917,73 @@ CONFIG_USB_FILE_STORAGE=m
895# CONFIG_USB_FILE_STORAGE_TEST is not set 917# CONFIG_USB_FILE_STORAGE_TEST is not set
896CONFIG_USB_G_SERIAL=m 918CONFIG_USB_G_SERIAL=m
897# CONFIG_USB_MIDI_GADGET is not set 919# CONFIG_USB_MIDI_GADGET is not set
920CONFIG_MMC=y
921# CONFIG_MMC_DEBUG is not set
922# CONFIG_MMC_UNSAFE_RESUME is not set
898 923
899# 924#
900# MMC/SD Card support 925# MMC/SD Card Drivers
901# 926#
902CONFIG_MMC=y
903# CONFIG_MMC_DEBUG is not set
904CONFIG_MMC_BLOCK=y 927CONFIG_MMC_BLOCK=y
905CONFIG_MMC_AT91=m 928CONFIG_MMC_BLOCK_BOUNCE=y
906# CONFIG_MMC_TIFM_SD is not set 929# CONFIG_SDIO_UART is not set
907 930
908# 931#
909# Real Time Clock 932# MMC/SD Host Controller Drivers
910# 933#
934CONFIG_MMC_AT91=y
935# CONFIG_MMC_SPI is not set
936# CONFIG_NEW_LEDS is not set
911CONFIG_RTC_LIB=y 937CONFIG_RTC_LIB=y
912# CONFIG_RTC_CLASS is not set 938CONFIG_RTC_CLASS=y
939CONFIG_RTC_HCTOSYS=y
940CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
941# CONFIG_RTC_DEBUG is not set
942
943#
944# RTC interfaces
945#
946CONFIG_RTC_INTF_SYSFS=y
947CONFIG_RTC_INTF_PROC=y
948CONFIG_RTC_INTF_DEV=y
949# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
950# CONFIG_RTC_DRV_TEST is not set
951
952#
953# I2C RTC drivers
954#
955# CONFIG_RTC_DRV_DS1307 is not set
956# CONFIG_RTC_DRV_DS1374 is not set
957# CONFIG_RTC_DRV_DS1672 is not set
958# CONFIG_RTC_DRV_MAX6900 is not set
959# CONFIG_RTC_DRV_RS5C372 is not set
960# CONFIG_RTC_DRV_ISL1208 is not set
961# CONFIG_RTC_DRV_X1205 is not set
962# CONFIG_RTC_DRV_PCF8563 is not set
963# CONFIG_RTC_DRV_PCF8583 is not set
964# CONFIG_RTC_DRV_M41T80 is not set
965
966#
967# SPI RTC drivers
968#
969# CONFIG_RTC_DRV_RS5C348 is not set
970# CONFIG_RTC_DRV_MAX6902 is not set
971
972#
973# Platform RTC drivers
974#
975# CONFIG_RTC_DRV_CMOS is not set
976# CONFIG_RTC_DRV_DS1553 is not set
977# CONFIG_RTC_DRV_STK17TA8 is not set
978# CONFIG_RTC_DRV_DS1742 is not set
979# CONFIG_RTC_DRV_M48T86 is not set
980# CONFIG_RTC_DRV_M48T59 is not set
981# CONFIG_RTC_DRV_V3020 is not set
982
983#
984# on-CPU RTC drivers
985#
986CONFIG_RTC_DRV_AT91SAM9=y
913 987
914# 988#
915# File systems 989# File systems
@@ -960,7 +1034,6 @@ CONFIG_SYSFS=y
960CONFIG_TMPFS=y 1034CONFIG_TMPFS=y
961# CONFIG_TMPFS_POSIX_ACL is not set 1035# CONFIG_TMPFS_POSIX_ACL is not set
962# CONFIG_HUGETLB_PAGE is not set 1036# CONFIG_HUGETLB_PAGE is not set
963CONFIG_RAMFS=y
964# CONFIG_CONFIGFS_FS is not set 1037# CONFIG_CONFIGFS_FS is not set
965 1038
966# 1039#
@@ -973,7 +1046,6 @@ CONFIG_RAMFS=y
973# CONFIG_BEFS_FS is not set 1046# CONFIG_BEFS_FS is not set
974# CONFIG_BFS_FS is not set 1047# CONFIG_BFS_FS is not set
975# CONFIG_EFS_FS is not set 1048# CONFIG_EFS_FS is not set
976# CONFIG_JFFS_FS is not set
977# CONFIG_JFFS2_FS is not set 1049# CONFIG_JFFS2_FS is not set
978CONFIG_CRAMFS=y 1050CONFIG_CRAMFS=y
979# CONFIG_VXFS_FS is not set 1051# CONFIG_VXFS_FS is not set
@@ -981,10 +1053,7 @@ CONFIG_CRAMFS=y
981# CONFIG_QNX4FS_FS is not set 1053# CONFIG_QNX4FS_FS is not set
982# CONFIG_SYSV_FS is not set 1054# CONFIG_SYSV_FS is not set
983# CONFIG_UFS_FS is not set 1055# CONFIG_UFS_FS is not set
984 1056CONFIG_NETWORK_FILESYSTEMS=y
985#
986# Network File Systems
987#
988# CONFIG_NFS_FS is not set 1057# CONFIG_NFS_FS is not set
989# CONFIG_NFSD is not set 1058# CONFIG_NFSD is not set
990# CONFIG_SMB_FS is not set 1059# CONFIG_SMB_FS is not set
@@ -992,17 +1061,12 @@ CONFIG_CRAMFS=y
992# CONFIG_NCP_FS is not set 1061# CONFIG_NCP_FS is not set
993# CONFIG_CODA_FS is not set 1062# CONFIG_CODA_FS is not set
994# CONFIG_AFS_FS is not set 1063# CONFIG_AFS_FS is not set
995# CONFIG_9P_FS is not set
996 1064
997# 1065#
998# Partition Types 1066# Partition Types
999# 1067#
1000# CONFIG_PARTITION_ADVANCED is not set 1068# CONFIG_PARTITION_ADVANCED is not set
1001CONFIG_MSDOS_PARTITION=y 1069CONFIG_MSDOS_PARTITION=y
1002
1003#
1004# Native Language Support
1005#
1006CONFIG_NLS=y 1070CONFIG_NLS=y
1007CONFIG_NLS_DEFAULT="iso8859-1" 1071CONFIG_NLS_DEFAULT="iso8859-1"
1008CONFIG_NLS_CODEPAGE_437=y 1072CONFIG_NLS_CODEPAGE_437=y
@@ -1043,41 +1107,49 @@ CONFIG_NLS_ISO8859_1=y
1043# CONFIG_NLS_KOI8_R is not set 1107# CONFIG_NLS_KOI8_R is not set
1044# CONFIG_NLS_KOI8_U is not set 1108# CONFIG_NLS_KOI8_U is not set
1045# CONFIG_NLS_UTF8 is not set 1109# CONFIG_NLS_UTF8 is not set
1046 1110# CONFIG_DLM is not set
1047# 1111CONFIG_INSTRUMENTATION=y
1048# Profiling support
1049#
1050# CONFIG_PROFILING is not set 1112# CONFIG_PROFILING is not set
1113# CONFIG_MARKERS is not set
1051 1114
1052# 1115#
1053# Kernel hacking 1116# Kernel hacking
1054# 1117#
1055# CONFIG_PRINTK_TIME is not set 1118# CONFIG_PRINTK_TIME is not set
1119CONFIG_ENABLE_WARN_DEPRECATED=y
1056CONFIG_ENABLE_MUST_CHECK=y 1120CONFIG_ENABLE_MUST_CHECK=y
1057# CONFIG_MAGIC_SYSRQ is not set 1121# CONFIG_MAGIC_SYSRQ is not set
1058# CONFIG_UNUSED_SYMBOLS is not set 1122# CONFIG_UNUSED_SYMBOLS is not set
1123# CONFIG_DEBUG_FS is not set
1124# CONFIG_HEADERS_CHECK is not set
1059CONFIG_DEBUG_KERNEL=y 1125CONFIG_DEBUG_KERNEL=y
1060CONFIG_LOG_BUF_SHIFT=14 1126# CONFIG_DEBUG_SHIRQ is not set
1061CONFIG_DETECT_SOFTLOCKUP=y 1127CONFIG_DETECT_SOFTLOCKUP=y
1128CONFIG_SCHED_DEBUG=y
1062# CONFIG_SCHEDSTATS is not set 1129# CONFIG_SCHEDSTATS is not set
1130# CONFIG_TIMER_STATS is not set
1063# CONFIG_DEBUG_SLAB is not set 1131# CONFIG_DEBUG_SLAB is not set
1064# CONFIG_DEBUG_RT_MUTEXES is not set 1132# CONFIG_DEBUG_RT_MUTEXES is not set
1065# CONFIG_RT_MUTEX_TESTER is not set 1133# CONFIG_RT_MUTEX_TESTER is not set
1066# CONFIG_DEBUG_SPINLOCK is not set 1134# CONFIG_DEBUG_SPINLOCK is not set
1067# CONFIG_DEBUG_MUTEXES is not set 1135# CONFIG_DEBUG_MUTEXES is not set
1068# CONFIG_DEBUG_RWSEMS is not set 1136# CONFIG_DEBUG_LOCK_ALLOC is not set
1137# CONFIG_PROVE_LOCKING is not set
1138# CONFIG_LOCK_STAT is not set
1069# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1139# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1070# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1140# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1071# CONFIG_DEBUG_KOBJECT is not set 1141# CONFIG_DEBUG_KOBJECT is not set
1072CONFIG_DEBUG_BUGVERBOSE=y 1142CONFIG_DEBUG_BUGVERBOSE=y
1073# CONFIG_DEBUG_INFO is not set 1143# CONFIG_DEBUG_INFO is not set
1074# CONFIG_DEBUG_FS is not set
1075# CONFIG_DEBUG_VM is not set 1144# CONFIG_DEBUG_VM is not set
1076# CONFIG_DEBUG_LIST is not set 1145# CONFIG_DEBUG_LIST is not set
1146# CONFIG_DEBUG_SG is not set
1077CONFIG_FRAME_POINTER=y 1147CONFIG_FRAME_POINTER=y
1078CONFIG_FORCED_INLINING=y 1148CONFIG_FORCED_INLINING=y
1079# CONFIG_HEADERS_CHECK is not set 1149# CONFIG_BOOT_PRINTK_DELAY is not set
1080# CONFIG_RCU_TORTURE_TEST is not set 1150# CONFIG_RCU_TORTURE_TEST is not set
1151# CONFIG_FAULT_INJECTION is not set
1152# CONFIG_SAMPLES is not set
1081CONFIG_DEBUG_USER=y 1153CONFIG_DEBUG_USER=y
1082# CONFIG_DEBUG_ERRORS is not set 1154# CONFIG_DEBUG_ERRORS is not set
1083CONFIG_DEBUG_LL=y 1155CONFIG_DEBUG_LL=y
@@ -1088,18 +1160,21 @@ CONFIG_DEBUG_LL=y
1088# 1160#
1089# CONFIG_KEYS is not set 1161# CONFIG_KEYS is not set
1090# CONFIG_SECURITY is not set 1162# CONFIG_SECURITY is not set
1091 1163# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1092#
1093# Cryptographic options
1094#
1095# CONFIG_CRYPTO is not set 1164# CONFIG_CRYPTO is not set
1096 1165
1097# 1166#
1098# Library routines 1167# Library routines
1099# 1168#
1169CONFIG_BITREVERSE=y
1100# CONFIG_CRC_CCITT is not set 1170# CONFIG_CRC_CCITT is not set
1101# CONFIG_CRC16 is not set 1171# CONFIG_CRC16 is not set
1172# CONFIG_CRC_ITU_T is not set
1102CONFIG_CRC32=y 1173CONFIG_CRC32=y
1174# CONFIG_CRC7 is not set
1103# CONFIG_LIBCRC32C is not set 1175# CONFIG_LIBCRC32C is not set
1104CONFIG_ZLIB_INFLATE=y 1176CONFIG_ZLIB_INFLATE=y
1105CONFIG_PLIST=y 1177CONFIG_PLIST=y
1178CONFIG_HAS_IOMEM=y
1179CONFIG_HAS_IOPORT=y
1180CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index c72ab82873d5..32a0d74e0c89 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -1,12 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc1 3# Linux kernel version: 2.6.24-rc7
4# Mon Jan 8 16:06:54 2007 4# Tue Jan 8 22:12:20 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
7# CONFIG_GENERIC_TIME is not set 9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
8CONFIG_MMU=y 11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
9CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
10CONFIG_TRACE_IRQFLAGS_SUPPORT=y 16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
11CONFIG_HARDIRQS_SW_RESEND=y 17CONFIG_HARDIRQS_SW_RESEND=y
12CONFIG_GENERIC_IRQ_PROBE=y 18CONFIG_GENERIC_IRQ_PROBE=y
@@ -15,32 +21,36 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set 21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_GENERIC_HWEIGHT=y 22CONFIG_GENERIC_HWEIGHT=y
17CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
18CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20 27
21# 28#
22# Code maturity level options 29# General setup
23# 30#
24CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
25CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
27
28#
29# General setup
30#
31CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
32# CONFIG_LOCALVERSION_AUTO is not set 35# CONFIG_LOCALVERSION_AUTO is not set
33# CONFIG_SWAP is not set 36# CONFIG_SWAP is not set
34CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set 38CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 39# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
39# CONFIG_UTS_NS is not set 42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
40# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
42CONFIG_SYSFS_DEPRECATED=y 51CONFIG_SYSFS_DEPRECATED=y
43# CONFIG_RELAY is not set 52# CONFIG_RELAY is not set
53CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 54CONFIG_INITRAMFS_SOURCE=""
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y 55CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SYSCTL=y 56CONFIG_SYSCTL=y
@@ -56,32 +66,30 @@ CONFIG_BUG=y
56CONFIG_ELF_CORE=y 66CONFIG_ELF_CORE=y
57CONFIG_BASE_FULL=y 67CONFIG_BASE_FULL=y
58CONFIG_FUTEX=y 68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
59CONFIG_EPOLL=y 70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_EVENTFD=y
60CONFIG_SHMEM=y 73CONFIG_SHMEM=y
61CONFIG_SLAB=y
62CONFIG_VM_EVENT_COUNTERS=y 74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78CONFIG_SLABINFO=y
63CONFIG_RT_MUTEXES=y 79CONFIG_RT_MUTEXES=y
64# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
65CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
66# CONFIG_SLOB is not set
67
68#
69# Loadable module support
70#
71CONFIG_MODULES=y 82CONFIG_MODULES=y
72CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
73# CONFIG_MODULE_FORCE_UNLOAD is not set 84# CONFIG_MODULE_FORCE_UNLOAD is not set
74# CONFIG_MODVERSIONS is not set 85# CONFIG_MODVERSIONS is not set
75# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
76CONFIG_KMOD=y 87CONFIG_KMOD=y
77
78#
79# Block layer
80#
81CONFIG_BLOCK=y 88CONFIG_BLOCK=y
82# CONFIG_LBD is not set 89# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set 90# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set 91# CONFIG_LSF is not set
92# CONFIG_BLK_DEV_BSG is not set
85 93
86# 94#
87# IO Schedulers 95# IO Schedulers
@@ -113,13 +121,16 @@ CONFIG_ARCH_AT91=y
113# CONFIG_ARCH_NETX is not set 121# CONFIG_ARCH_NETX is not set
114# CONFIG_ARCH_H720X is not set 122# CONFIG_ARCH_H720X is not set
115# CONFIG_ARCH_IMX is not set 123# CONFIG_ARCH_IMX is not set
124# CONFIG_ARCH_IOP13XX is not set
116# CONFIG_ARCH_IOP32X is not set 125# CONFIG_ARCH_IOP32X is not set
117# CONFIG_ARCH_IOP33X is not set 126# CONFIG_ARCH_IOP33X is not set
118# CONFIG_ARCH_IOP13XX is not set
119# CONFIG_ARCH_IXP4XX is not set
120# CONFIG_ARCH_IXP2000 is not set
121# CONFIG_ARCH_IXP23XX is not set 127# CONFIG_ARCH_IXP23XX is not set
128# CONFIG_ARCH_IXP2000 is not set
129# CONFIG_ARCH_IXP4XX is not set
122# CONFIG_ARCH_L7200 is not set 130# CONFIG_ARCH_L7200 is not set
131# CONFIG_ARCH_KS8695 is not set
132# CONFIG_ARCH_NS9XXX is not set
133# CONFIG_ARCH_MXC is not set
123# CONFIG_ARCH_PNX4008 is not set 134# CONFIG_ARCH_PNX4008 is not set
124# CONFIG_ARCH_PXA is not set 135# CONFIG_ARCH_PXA is not set
125# CONFIG_ARCH_RPC is not set 136# CONFIG_ARCH_RPC is not set
@@ -127,15 +138,27 @@ CONFIG_ARCH_AT91=y
127# CONFIG_ARCH_S3C2410 is not set 138# CONFIG_ARCH_S3C2410 is not set
128# CONFIG_ARCH_SHARK is not set 139# CONFIG_ARCH_SHARK is not set
129# CONFIG_ARCH_LH7A40X is not set 140# CONFIG_ARCH_LH7A40X is not set
141# CONFIG_ARCH_DAVINCI is not set
130# CONFIG_ARCH_OMAP is not set 142# CONFIG_ARCH_OMAP is not set
131 143
132# 144#
145# Boot options
146#
147
148#
149# Power management
150#
151
152#
133# Atmel AT91 System-on-Chip 153# Atmel AT91 System-on-Chip
134# 154#
135# CONFIG_ARCH_AT91RM9200 is not set 155# CONFIG_ARCH_AT91RM9200 is not set
136# CONFIG_ARCH_AT91SAM9260 is not set 156# CONFIG_ARCH_AT91SAM9260 is not set
137# CONFIG_ARCH_AT91SAM9261 is not set 157# CONFIG_ARCH_AT91SAM9261 is not set
138CONFIG_ARCH_AT91SAM9263=y 158CONFIG_ARCH_AT91SAM9263=y
159# CONFIG_ARCH_AT91SAM9RL is not set
160# CONFIG_ARCH_AT91X40 is not set
161CONFIG_AT91_PMC_UNIT=y
139 162
140# 163#
141# AT91SAM9263 Board Type 164# AT91SAM9263 Board Type
@@ -152,6 +175,8 @@ CONFIG_MTD_AT91_DATAFLASH_CARD=y
152# AT91 Feature Selections 175# AT91 Feature Selections
153# 176#
154# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set 177# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
178# CONFIG_ATMEL_TCLIB is not set
179CONFIG_AT91_TIMER_HZ=100
155 180
156# 181#
157# Processor Type 182# Processor Type
@@ -174,19 +199,19 @@ CONFIG_CPU_CP15_MMU=y
174# CONFIG_CPU_DCACHE_DISABLE is not set 199# CONFIG_CPU_DCACHE_DISABLE is not set
175# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 200# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
176# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 201# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
202# CONFIG_OUTER_CACHE is not set
177 203
178# 204#
179# Bus support 205# Bus support
180# 206#
181 207# CONFIG_PCI_SYSCALL is not set
182# 208# CONFIG_ARCH_SUPPORTS_MSI is not set
183# PCCARD (PCMCIA/CardBus) support
184#
185# CONFIG_PCCARD is not set 209# CONFIG_PCCARD is not set
186 210
187# 211#
188# Kernel Features 212# Kernel Features
189# 213#
214# CONFIG_TICK_ONESHOT is not set
190# CONFIG_PREEMPT is not set 215# CONFIG_PREEMPT is not set
191# CONFIG_NO_IDLE_HZ is not set 216# CONFIG_NO_IDLE_HZ is not set
192CONFIG_HZ=100 217CONFIG_HZ=100
@@ -199,8 +224,12 @@ CONFIG_FLATMEM_MANUAL=y
199CONFIG_FLATMEM=y 224CONFIG_FLATMEM=y
200CONFIG_FLAT_NODE_MEM_MAP=y 225CONFIG_FLAT_NODE_MEM_MAP=y
201# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
227# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
202CONFIG_SPLIT_PTLOCK_CPUS=4096 228CONFIG_SPLIT_PTLOCK_CPUS=4096
203# CONFIG_RESOURCES_64BIT is not set 229# CONFIG_RESOURCES_64BIT is not set
230CONFIG_ZONE_DMA_FLAG=1
231CONFIG_BOUNCE=y
232CONFIG_VIRT_TO_BUS=y
204# CONFIG_LEDS is not set 233# CONFIG_LEDS is not set
205CONFIG_ALIGNMENT_TRAP=y 234CONFIG_ALIGNMENT_TRAP=y
206 235
@@ -211,6 +240,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
211CONFIG_ZBOOT_ROM_BSS=0x0 240CONFIG_ZBOOT_ROM_BSS=0x0
212CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 241CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
213# CONFIG_XIP_KERNEL is not set 242# CONFIG_XIP_KERNEL is not set
243# CONFIG_KEXEC is not set
214 244
215# 245#
216# Floating point emulation 246# Floating point emulation
@@ -236,7 +266,7 @@ CONFIG_BINFMT_ELF=y
236# Power management options 266# Power management options
237# 267#
238# CONFIG_PM is not set 268# CONFIG_PM is not set
239# CONFIG_APM is not set 269CONFIG_SUSPEND_UP_POSSIBLE=y
240 270
241# 271#
242# Networking 272# Networking
@@ -246,7 +276,6 @@ CONFIG_NET=y
246# 276#
247# Networking options 277# Networking options
248# 278#
249# CONFIG_NETDEBUG is not set
250CONFIG_PACKET=y 279CONFIG_PACKET=y
251# CONFIG_PACKET_MMAP is not set 280# CONFIG_PACKET_MMAP is not set
252CONFIG_UNIX=y 281CONFIG_UNIX=y
@@ -271,6 +300,7 @@ CONFIG_IP_PNP_RARP=y
271# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 300# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
272# CONFIG_INET_XFRM_MODE_TUNNEL is not set 301# CONFIG_INET_XFRM_MODE_TUNNEL is not set
273# CONFIG_INET_XFRM_MODE_BEET is not set 302# CONFIG_INET_XFRM_MODE_BEET is not set
303# CONFIG_INET_LRO is not set
274# CONFIG_INET_DIAG is not set 304# CONFIG_INET_DIAG is not set
275# CONFIG_TCP_CONG_ADVANCED is not set 305# CONFIG_TCP_CONG_ADVANCED is not set
276CONFIG_TCP_CONG_CUBIC=y 306CONFIG_TCP_CONG_CUBIC=y
@@ -281,20 +311,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_INET6_TUNNEL is not set 311# CONFIG_INET6_TUNNEL is not set
282# CONFIG_NETWORK_SECMARK is not set 312# CONFIG_NETWORK_SECMARK is not set
283# CONFIG_NETFILTER is not set 313# CONFIG_NETFILTER is not set
284
285#
286# DCCP Configuration (EXPERIMENTAL)
287#
288# CONFIG_IP_DCCP is not set 314# CONFIG_IP_DCCP is not set
289
290#
291# SCTP Configuration (EXPERIMENTAL)
292#
293# CONFIG_IP_SCTP is not set 315# CONFIG_IP_SCTP is not set
294
295#
296# TIPC Configuration (EXPERIMENTAL)
297#
298# CONFIG_TIPC is not set 316# CONFIG_TIPC is not set
299# CONFIG_ATM is not set 317# CONFIG_ATM is not set
300# CONFIG_BRIDGE is not set 318# CONFIG_BRIDGE is not set
@@ -307,10 +325,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
307# CONFIG_LAPB is not set 325# CONFIG_LAPB is not set
308# CONFIG_ECONET is not set 326# CONFIG_ECONET is not set
309# CONFIG_WAN_ROUTER is not set 327# CONFIG_WAN_ROUTER is not set
310
311#
312# QoS and/or fair queueing
313#
314# CONFIG_NET_SCHED is not set 328# CONFIG_NET_SCHED is not set
315 329
316# 330#
@@ -320,7 +334,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
320# CONFIG_HAMRADIO is not set 334# CONFIG_HAMRADIO is not set
321# CONFIG_IRDA is not set 335# CONFIG_IRDA is not set
322# CONFIG_BT is not set 336# CONFIG_BT is not set
337# CONFIG_AF_RXRPC is not set
338
339#
340# Wireless
341#
342# CONFIG_CFG80211 is not set
343# CONFIG_WIRELESS_EXT is not set
344# CONFIG_MAC80211 is not set
323# CONFIG_IEEE80211 is not set 345# CONFIG_IEEE80211 is not set
346# CONFIG_RFKILL is not set
347# CONFIG_NET_9P is not set
324 348
325# 349#
326# Device Drivers 350# Device Drivers
@@ -329,20 +353,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
329# 353#
330# Generic Driver Options 354# Generic Driver Options
331# 355#
356CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
332CONFIG_STANDALONE=y 357CONFIG_STANDALONE=y
333CONFIG_PREVENT_FIRMWARE_BUILD=y 358CONFIG_PREVENT_FIRMWARE_BUILD=y
334# CONFIG_FW_LOADER is not set 359# CONFIG_FW_LOADER is not set
335# CONFIG_DEBUG_DRIVER is not set 360# CONFIG_DEBUG_DRIVER is not set
361# CONFIG_DEBUG_DEVRES is not set
336# CONFIG_SYS_HYPERVISOR is not set 362# CONFIG_SYS_HYPERVISOR is not set
337
338#
339# Connector - unified userspace <-> kernelspace linker
340#
341# CONFIG_CONNECTOR is not set 363# CONFIG_CONNECTOR is not set
342
343#
344# Memory Technology Devices (MTD)
345#
346CONFIG_MTD=y 364CONFIG_MTD=y
347# CONFIG_MTD_DEBUG is not set 365# CONFIG_MTD_DEBUG is not set
348# CONFIG_MTD_CONCAT is not set 366# CONFIG_MTD_CONCAT is not set
@@ -362,6 +380,7 @@ CONFIG_MTD_BLOCK=y
362# CONFIG_INFTL is not set 380# CONFIG_INFTL is not set
363# CONFIG_RFD_FTL is not set 381# CONFIG_RFD_FTL is not set
364# CONFIG_SSFDC is not set 382# CONFIG_SSFDC is not set
383# CONFIG_MTD_OOPS is not set
365 384
366# 385#
367# RAM/ROM/Flash chip drivers 386# RAM/ROM/Flash chip drivers
@@ -381,7 +400,6 @@ CONFIG_MTD_CFI_I2=y
381# CONFIG_MTD_RAM is not set 400# CONFIG_MTD_RAM is not set
382# CONFIG_MTD_ROM is not set 401# CONFIG_MTD_ROM is not set
383# CONFIG_MTD_ABSENT is not set 402# CONFIG_MTD_ABSENT is not set
384# CONFIG_MTD_OBSOLETE_CHIPS is not set
385 403
386# 404#
387# Mapping drivers for chip access 405# Mapping drivers for chip access
@@ -405,35 +423,24 @@ CONFIG_MTD_DATAFLASH=y
405# CONFIG_MTD_DOC2000 is not set 423# CONFIG_MTD_DOC2000 is not set
406# CONFIG_MTD_DOC2001 is not set 424# CONFIG_MTD_DOC2001 is not set
407# CONFIG_MTD_DOC2001PLUS is not set 425# CONFIG_MTD_DOC2001PLUS is not set
408
409#
410# NAND Flash Device Drivers
411#
412CONFIG_MTD_NAND=y 426CONFIG_MTD_NAND=y
413# CONFIG_MTD_NAND_VERIFY_WRITE is not set 427# CONFIG_MTD_NAND_VERIFY_WRITE is not set
414# CONFIG_MTD_NAND_ECC_SMC is not set 428# CONFIG_MTD_NAND_ECC_SMC is not set
429# CONFIG_MTD_NAND_MUSEUM_IDS is not set
415CONFIG_MTD_NAND_IDS=y 430CONFIG_MTD_NAND_IDS=y
416# CONFIG_MTD_NAND_DISKONCHIP is not set 431# CONFIG_MTD_NAND_DISKONCHIP is not set
417CONFIG_MTD_NAND_AT91=y 432CONFIG_MTD_NAND_AT91=y
418# CONFIG_MTD_NAND_NANDSIM is not set 433# CONFIG_MTD_NAND_NANDSIM is not set
419 434# CONFIG_MTD_NAND_PLATFORM is not set
420# 435# CONFIG_MTD_ALAUDA is not set
421# OneNAND Flash Device Drivers
422#
423# CONFIG_MTD_ONENAND is not set 436# CONFIG_MTD_ONENAND is not set
424 437
425# 438#
426# Parallel port support 439# UBI - Unsorted block images
427# 440#
441# CONFIG_MTD_UBI is not set
428# CONFIG_PARPORT is not set 442# CONFIG_PARPORT is not set
429 443CONFIG_BLK_DEV=y
430#
431# Plug and Play support
432#
433
434#
435# Block devices
436#
437# CONFIG_BLK_DEV_COW_COMMON is not set 444# CONFIG_BLK_DEV_COW_COMMON is not set
438CONFIG_BLK_DEV_LOOP=y 445CONFIG_BLK_DEV_LOOP=y
439# CONFIG_BLK_DEV_CRYPTOLOOP is not set 446# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -443,15 +450,18 @@ CONFIG_BLK_DEV_RAM=y
443CONFIG_BLK_DEV_RAM_COUNT=16 450CONFIG_BLK_DEV_RAM_COUNT=16
444CONFIG_BLK_DEV_RAM_SIZE=8192 451CONFIG_BLK_DEV_RAM_SIZE=8192
445CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 452CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
446CONFIG_BLK_DEV_INITRD=y
447# CONFIG_CDROM_PKTCDVD is not set 453# CONFIG_CDROM_PKTCDVD is not set
448# CONFIG_ATA_OVER_ETH is not set 454# CONFIG_ATA_OVER_ETH is not set
455CONFIG_MISC_DEVICES=y
456# CONFIG_EEPROM_93CX6 is not set
457CONFIG_ATMEL_SSC=y
449 458
450# 459#
451# SCSI device support 460# SCSI device support
452# 461#
453# CONFIG_RAID_ATTRS is not set 462# CONFIG_RAID_ATTRS is not set
454CONFIG_SCSI=y 463CONFIG_SCSI=y
464CONFIG_SCSI_DMA=y
455# CONFIG_SCSI_TGT is not set 465# CONFIG_SCSI_TGT is not set
456# CONFIG_SCSI_NETLINK is not set 466# CONFIG_SCSI_NETLINK is not set
457CONFIG_SCSI_PROC_FS=y 467CONFIG_SCSI_PROC_FS=y
@@ -473,6 +483,7 @@ CONFIG_SCSI_MULTI_LUN=y
473# CONFIG_SCSI_CONSTANTS is not set 483# CONFIG_SCSI_CONSTANTS is not set
474# CONFIG_SCSI_LOGGING is not set 484# CONFIG_SCSI_LOGGING is not set
475# CONFIG_SCSI_SCAN_ASYNC is not set 485# CONFIG_SCSI_SCAN_ASYNC is not set
486CONFIG_SCSI_WAIT_SCAN=m
476 487
477# 488#
478# SCSI Transports 489# SCSI Transports
@@ -480,80 +491,65 @@ CONFIG_SCSI_MULTI_LUN=y
480# CONFIG_SCSI_SPI_ATTRS is not set 491# CONFIG_SCSI_SPI_ATTRS is not set
481# CONFIG_SCSI_FC_ATTRS is not set 492# CONFIG_SCSI_FC_ATTRS is not set
482# CONFIG_SCSI_ISCSI_ATTRS is not set 493# CONFIG_SCSI_ISCSI_ATTRS is not set
483# CONFIG_SCSI_SAS_ATTRS is not set
484# CONFIG_SCSI_SAS_LIBSAS is not set 494# CONFIG_SCSI_SAS_LIBSAS is not set
485 495# CONFIG_SCSI_SRP_ATTRS is not set
486# 496CONFIG_SCSI_LOWLEVEL=y
487# SCSI low-level drivers
488#
489# CONFIG_ISCSI_TCP is not set 497# CONFIG_ISCSI_TCP is not set
490# CONFIG_SCSI_DEBUG is not set 498# CONFIG_SCSI_DEBUG is not set
491
492#
493# Serial ATA (prod) and Parallel ATA (experimental) drivers
494#
495# CONFIG_ATA is not set 499# CONFIG_ATA is not set
496
497#
498# Multi-device support (RAID and LVM)
499#
500# CONFIG_MD is not set 500# CONFIG_MD is not set
501
502#
503# Fusion MPT device support
504#
505# CONFIG_FUSION is not set
506
507#
508# IEEE 1394 (FireWire) support
509#
510
511#
512# I2O device support
513#
514
515#
516# Network device support
517#
518CONFIG_NETDEVICES=y 501CONFIG_NETDEVICES=y
502# CONFIG_NETDEVICES_MULTIQUEUE is not set
519# CONFIG_DUMMY is not set 503# CONFIG_DUMMY is not set
520# CONFIG_BONDING is not set 504# CONFIG_BONDING is not set
505# CONFIG_MACVLAN is not set
521# CONFIG_EQUALIZER is not set 506# CONFIG_EQUALIZER is not set
522# CONFIG_TUN is not set 507# CONFIG_TUN is not set
523 508# CONFIG_VETH is not set
524# 509CONFIG_PHYLIB=y
525# PHY device support 510
526# 511#
527# CONFIG_PHYLIB is not set 512# MII PHY device drivers
528 513#
529# 514# CONFIG_MARVELL_PHY is not set
530# Ethernet (10 or 100Mbit) 515# CONFIG_DAVICOM_PHY is not set
531# 516# CONFIG_QSEMI_PHY is not set
517# CONFIG_LXT_PHY is not set
518# CONFIG_CICADA_PHY is not set
519# CONFIG_VITESSE_PHY is not set
520# CONFIG_SMSC_PHY is not set
521# CONFIG_BROADCOM_PHY is not set
522# CONFIG_ICPLUS_PHY is not set
523# CONFIG_FIXED_PHY is not set
524# CONFIG_MDIO_BITBANG is not set
532CONFIG_NET_ETHERNET=y 525CONFIG_NET_ETHERNET=y
533CONFIG_MII=y 526CONFIG_MII=y
527CONFIG_MACB=y
528# CONFIG_AX88796 is not set
534# CONFIG_SMC91X is not set 529# CONFIG_SMC91X is not set
535# CONFIG_DM9000 is not set 530# CONFIG_DM9000 is not set
531# CONFIG_IBM_NEW_EMAC_ZMII is not set
532# CONFIG_IBM_NEW_EMAC_RGMII is not set
533# CONFIG_IBM_NEW_EMAC_TAH is not set
534# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
535# CONFIG_B44 is not set
536CONFIG_NETDEV_1000=y
537CONFIG_NETDEV_10000=y
536 538
537# 539#
538# Ethernet (1000 Mbit) 540# Wireless LAN
539#
540
541#
542# Ethernet (10000 Mbit)
543#
544
545#
546# Token Ring devices
547#
548
549#
550# Wireless LAN (non-hamradio)
551# 541#
552# CONFIG_NET_RADIO is not set 542# CONFIG_WLAN_PRE80211 is not set
543# CONFIG_WLAN_80211 is not set
553 544
554# 545#
555# Wan interfaces 546# USB Network Adapters
556# 547#
548# CONFIG_USB_CATC is not set
549# CONFIG_USB_KAWETH is not set
550# CONFIG_USB_PEGASUS is not set
551# CONFIG_USB_RTL8150 is not set
552# CONFIG_USB_USBNET is not set
557# CONFIG_WAN is not set 553# CONFIG_WAN is not set
558# CONFIG_PPP is not set 554# CONFIG_PPP is not set
559# CONFIG_SLIP is not set 555# CONFIG_SLIP is not set
@@ -561,10 +557,6 @@ CONFIG_MII=y
561# CONFIG_NETCONSOLE is not set 557# CONFIG_NETCONSOLE is not set
562# CONFIG_NETPOLL is not set 558# CONFIG_NETPOLL is not set
563# CONFIG_NET_POLL_CONTROLLER is not set 559# CONFIG_NET_POLL_CONTROLLER is not set
564
565#
566# ISDN subsystem
567#
568# CONFIG_ISDN is not set 560# CONFIG_ISDN is not set
569 561
570# 562#
@@ -572,6 +564,7 @@ CONFIG_MII=y
572# 564#
573CONFIG_INPUT=y 565CONFIG_INPUT=y
574# CONFIG_INPUT_FF_MEMLESS is not set 566# CONFIG_INPUT_FF_MEMLESS is not set
567# CONFIG_INPUT_POLLDEV is not set
575 568
576# 569#
577# Userland interfaces 570# Userland interfaces
@@ -581,20 +574,26 @@ CONFIG_INPUT_MOUSEDEV=y
581CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 574CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
582CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 575CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
583# CONFIG_INPUT_JOYDEV is not set 576# CONFIG_INPUT_JOYDEV is not set
584CONFIG_INPUT_TSDEV=y
585CONFIG_INPUT_TSDEV_SCREEN_X=240
586CONFIG_INPUT_TSDEV_SCREEN_Y=320
587CONFIG_INPUT_EVDEV=y 577CONFIG_INPUT_EVDEV=y
588# CONFIG_INPUT_EVBUG is not set 578# CONFIG_INPUT_EVBUG is not set
589 579
590# 580#
591# Input Device Drivers 581# Input Device Drivers
592# 582#
593# CONFIG_INPUT_KEYBOARD is not set 583CONFIG_INPUT_KEYBOARD=y
584# CONFIG_KEYBOARD_ATKBD is not set
585# CONFIG_KEYBOARD_SUNKBD is not set
586# CONFIG_KEYBOARD_LKKBD is not set
587# CONFIG_KEYBOARD_XTKBD is not set
588# CONFIG_KEYBOARD_NEWTON is not set
589# CONFIG_KEYBOARD_STOWAWAY is not set
590CONFIG_KEYBOARD_GPIO=y
594# CONFIG_INPUT_MOUSE is not set 591# CONFIG_INPUT_MOUSE is not set
595# CONFIG_INPUT_JOYSTICK is not set 592# CONFIG_INPUT_JOYSTICK is not set
593# CONFIG_INPUT_TABLET is not set
596CONFIG_INPUT_TOUCHSCREEN=y 594CONFIG_INPUT_TOUCHSCREEN=y
597CONFIG_TOUCHSCREEN_ADS7846=y 595CONFIG_TOUCHSCREEN_ADS7846=y
596# CONFIG_TOUCHSCREEN_FUJITSU is not set
598# CONFIG_TOUCHSCREEN_GUNZE is not set 597# CONFIG_TOUCHSCREEN_GUNZE is not set
599# CONFIG_TOUCHSCREEN_ELO is not set 598# CONFIG_TOUCHSCREEN_ELO is not set
600# CONFIG_TOUCHSCREEN_MTOUCH is not set 599# CONFIG_TOUCHSCREEN_MTOUCH is not set
@@ -603,6 +602,7 @@ CONFIG_TOUCHSCREEN_ADS7846=y
603# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 602# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
604# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 603# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
605# CONFIG_TOUCHSCREEN_UCB1400 is not set 604# CONFIG_TOUCHSCREEN_UCB1400 is not set
605# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
606# CONFIG_INPUT_MISC is not set 606# CONFIG_INPUT_MISC is not set
607 607
608# 608#
@@ -636,71 +636,47 @@ CONFIG_SERIAL_CORE_CONSOLE=y
636CONFIG_UNIX98_PTYS=y 636CONFIG_UNIX98_PTYS=y
637CONFIG_LEGACY_PTYS=y 637CONFIG_LEGACY_PTYS=y
638CONFIG_LEGACY_PTY_COUNT=256 638CONFIG_LEGACY_PTY_COUNT=256
639
640#
641# IPMI
642#
643# CONFIG_IPMI_HANDLER is not set 639# CONFIG_IPMI_HANDLER is not set
644
645#
646# Watchdog Cards
647#
648CONFIG_WATCHDOG=y
649CONFIG_WATCHDOG_NOWAYOUT=y
650
651#
652# Watchdog Device Drivers
653#
654# CONFIG_SOFT_WATCHDOG is not set
655
656#
657# USB-based Watchdog Cards
658#
659# CONFIG_USBPCWATCHDOG is not set
660CONFIG_HW_RANDOM=y 640CONFIG_HW_RANDOM=y
661# CONFIG_NVRAM is not set 641# CONFIG_NVRAM is not set
662# CONFIG_DTLK is not set
663# CONFIG_R3964 is not set 642# CONFIG_R3964 is not set
664# CONFIG_RAW_DRIVER is not set 643# CONFIG_RAW_DRIVER is not set
665
666#
667# TPM devices
668#
669# CONFIG_TCG_TPM is not set 644# CONFIG_TCG_TPM is not set
670
671#
672# I2C support
673#
674CONFIG_I2C=y 645CONFIG_I2C=y
646CONFIG_I2C_BOARDINFO=y
675CONFIG_I2C_CHARDEV=y 647CONFIG_I2C_CHARDEV=y
676 648
677# 649#
678# I2C Algorithms 650# I2C Algorithms
679# 651#
680# CONFIG_I2C_ALGOBIT is not set 652CONFIG_I2C_ALGOBIT=y
681# CONFIG_I2C_ALGOPCF is not set 653# CONFIG_I2C_ALGOPCF is not set
682# CONFIG_I2C_ALGOPCA is not set 654# CONFIG_I2C_ALGOPCA is not set
683 655
684# 656#
685# I2C Hardware Bus support 657# I2C Hardware Bus support
686# 658#
687CONFIG_I2C_AT91=y 659CONFIG_I2C_GPIO=y
688# CONFIG_I2C_OCORES is not set 660# CONFIG_I2C_OCORES is not set
689# CONFIG_I2C_PARPORT_LIGHT is not set 661# CONFIG_I2C_PARPORT_LIGHT is not set
662# CONFIG_I2C_SIMTEC is not set
663# CONFIG_I2C_TAOS_EVM is not set
690# CONFIG_I2C_STUB is not set 664# CONFIG_I2C_STUB is not set
665# CONFIG_I2C_TINY_USB is not set
691# CONFIG_I2C_PCA is not set 666# CONFIG_I2C_PCA is not set
692# CONFIG_I2C_PCA_ISA is not set
693 667
694# 668#
695# Miscellaneous I2C Chip support 669# Miscellaneous I2C Chip support
696# 670#
697# CONFIG_SENSORS_DS1337 is not set 671# CONFIG_SENSORS_DS1337 is not set
698# CONFIG_SENSORS_DS1374 is not set 672# CONFIG_SENSORS_DS1374 is not set
673# CONFIG_DS1682 is not set
699# CONFIG_SENSORS_EEPROM is not set 674# CONFIG_SENSORS_EEPROM is not set
700# CONFIG_SENSORS_PCF8574 is not set 675# CONFIG_SENSORS_PCF8574 is not set
701# CONFIG_SENSORS_PCA9539 is not set 676# CONFIG_SENSORS_PCA9539 is not set
702# CONFIG_SENSORS_PCF8591 is not set 677# CONFIG_SENSORS_PCF8591 is not set
703# CONFIG_SENSORS_MAX6875 is not set 678# CONFIG_SENSORS_MAX6875 is not set
679# CONFIG_SENSORS_TSL2550 is not set
704# CONFIG_I2C_DEBUG_CORE is not set 680# CONFIG_I2C_DEBUG_CORE is not set
705# CONFIG_I2C_DEBUG_ALGO is not set 681# CONFIG_I2C_DEBUG_ALGO is not set
706# CONFIG_I2C_DEBUG_BUS is not set 682# CONFIG_I2C_DEBUG_BUS is not set
@@ -722,61 +698,80 @@ CONFIG_SPI_ATMEL=y
722# 698#
723# SPI Protocol Masters 699# SPI Protocol Masters
724# 700#
725 701# CONFIG_SPI_AT25 is not set
726# 702# CONFIG_SPI_SPIDEV is not set
727# Dallas's 1-wire bus 703# CONFIG_SPI_TLE62X0 is not set
728#
729# CONFIG_W1 is not set 704# CONFIG_W1 is not set
730 705# CONFIG_POWER_SUPPLY is not set
731#
732# Hardware Monitoring support
733#
734# CONFIG_HWMON is not set 706# CONFIG_HWMON is not set
735# CONFIG_HWMON_VID is not set 707CONFIG_WATCHDOG=y
708CONFIG_WATCHDOG_NOWAYOUT=y
736 709
737# 710#
738# Misc devices 711# Watchdog Device Drivers
739# 712#
740# CONFIG_TIFM_CORE is not set 713# CONFIG_SOFT_WATCHDOG is not set
714CONFIG_AT91SAM9_WATCHDOG=y
741 715
742# 716#
743# LED devices 717# USB-based Watchdog Cards
744# 718#
745# CONFIG_NEW_LEDS is not set 719# CONFIG_USBPCWATCHDOG is not set
746 720
747# 721#
748# LED drivers 722# Sonics Silicon Backplane
749# 723#
724CONFIG_SSB_POSSIBLE=y
725# CONFIG_SSB is not set
750 726
751# 727#
752# LED Triggers 728# Multifunction device drivers
753# 729#
730# CONFIG_MFD_SM501 is not set
754 731
755# 732#
756# Multimedia devices 733# Multimedia devices
757# 734#
758# CONFIG_VIDEO_DEV is not set 735# CONFIG_VIDEO_DEV is not set
759 736# CONFIG_DVB_CORE is not set
760# 737# CONFIG_DAB is not set
761# Digital Video Broadcasting Devices
762#
763# CONFIG_DVB is not set
764# CONFIG_USB_DABUSB is not set
765 738
766# 739#
767# Graphics support 740# Graphics support
768# 741#
769# CONFIG_FIRMWARE_EDID is not set 742# CONFIG_VGASTATE is not set
743# CONFIG_VIDEO_OUTPUT_CONTROL is not set
770CONFIG_FB=y 744CONFIG_FB=y
771# CONFIG_FB_CFB_FILLRECT is not set 745# CONFIG_FIRMWARE_EDID is not set
772# CONFIG_FB_CFB_COPYAREA is not set 746# CONFIG_FB_DDC is not set
773# CONFIG_FB_CFB_IMAGEBLIT is not set 747CONFIG_FB_CFB_FILLRECT=y
748CONFIG_FB_CFB_COPYAREA=y
749CONFIG_FB_CFB_IMAGEBLIT=y
750# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
751# CONFIG_FB_SYS_FILLRECT is not set
752# CONFIG_FB_SYS_COPYAREA is not set
753# CONFIG_FB_SYS_IMAGEBLIT is not set
754# CONFIG_FB_SYS_FOPS is not set
755CONFIG_FB_DEFERRED_IO=y
756# CONFIG_FB_SVGALIB is not set
774# CONFIG_FB_MACMODES is not set 757# CONFIG_FB_MACMODES is not set
775# CONFIG_FB_BACKLIGHT is not set 758# CONFIG_FB_BACKLIGHT is not set
776# CONFIG_FB_MODE_HELPERS is not set 759# CONFIG_FB_MODE_HELPERS is not set
777# CONFIG_FB_TILEBLITTING is not set 760# CONFIG_FB_TILEBLITTING is not set
761
762#
763# Frame buffer hardware drivers
764#
765# CONFIG_FB_S1D15605 is not set
778# CONFIG_FB_S1D13XXX is not set 766# CONFIG_FB_S1D13XXX is not set
767CONFIG_FB_ATMEL=y
779# CONFIG_FB_VIRTUAL is not set 768# CONFIG_FB_VIRTUAL is not set
769# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
770
771#
772# Display device support
773#
774# CONFIG_DISPLAY_SUPPORT is not set
780 775
781# 776#
782# Console display driver support 777# Console display driver support
@@ -784,26 +779,28 @@ CONFIG_FB=y
784# CONFIG_VGA_CONSOLE is not set 779# CONFIG_VGA_CONSOLE is not set
785CONFIG_DUMMY_CONSOLE=y 780CONFIG_DUMMY_CONSOLE=y
786# CONFIG_FRAMEBUFFER_CONSOLE is not set 781# CONFIG_FRAMEBUFFER_CONSOLE is not set
787
788#
789# Logo configuration
790#
791# CONFIG_LOGO is not set 782# CONFIG_LOGO is not set
792# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
793 783
794# 784#
795# Sound 785# Sound
796# 786#
797# CONFIG_SOUND is not set 787# CONFIG_SOUND is not set
788CONFIG_HID_SUPPORT=y
789CONFIG_HID=y
790# CONFIG_HID_DEBUG is not set
791# CONFIG_HIDRAW is not set
798 792
799# 793#
800# HID Devices 794# USB Input Devices
801# 795#
802CONFIG_HID=y 796# CONFIG_USB_HID is not set
803 797
804# 798#
805# USB support 799# USB HID Boot Protocol drivers
806# 800#
801# CONFIG_USB_KBD is not set
802# CONFIG_USB_MOUSE is not set
803CONFIG_USB_SUPPORT=y
807CONFIG_USB_ARCH_HAS_HCD=y 804CONFIG_USB_ARCH_HAS_HCD=y
808CONFIG_USB_ARCH_HAS_OHCI=y 805CONFIG_USB_ARCH_HAS_OHCI=y
809# CONFIG_USB_ARCH_HAS_EHCI is not set 806# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -814,9 +811,8 @@ CONFIG_USB=y
814# Miscellaneous USB options 811# Miscellaneous USB options
815# 812#
816CONFIG_USB_DEVICEFS=y 813CONFIG_USB_DEVICEFS=y
817# CONFIG_USB_BANDWIDTH is not set 814CONFIG_USB_DEVICE_CLASS=y
818# CONFIG_USB_DYNAMIC_MINORS is not set 815# CONFIG_USB_DYNAMIC_MINORS is not set
819# CONFIG_USB_MULTITHREAD_PROBE is not set
820# CONFIG_USB_OTG is not set 816# CONFIG_USB_OTG is not set
821 817
822# 818#
@@ -824,9 +820,11 @@ CONFIG_USB_DEVICEFS=y
824# 820#
825# CONFIG_USB_ISP116X_HCD is not set 821# CONFIG_USB_ISP116X_HCD is not set
826CONFIG_USB_OHCI_HCD=y 822CONFIG_USB_OHCI_HCD=y
827# CONFIG_USB_OHCI_BIG_ENDIAN is not set 823# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
824# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
828CONFIG_USB_OHCI_LITTLE_ENDIAN=y 825CONFIG_USB_OHCI_LITTLE_ENDIAN=y
829# CONFIG_USB_SL811_HCD is not set 826# CONFIG_USB_SL811_HCD is not set
827# CONFIG_USB_R8A66597_HCD is not set
830 828
831# 829#
832# USB Device Class drivers 830# USB Device Class drivers
@@ -845,6 +843,7 @@ CONFIG_USB_STORAGE=y
845# CONFIG_USB_STORAGE_DEBUG is not set 843# CONFIG_USB_STORAGE_DEBUG is not set
846# CONFIG_USB_STORAGE_DATAFAB is not set 844# CONFIG_USB_STORAGE_DATAFAB is not set
847# CONFIG_USB_STORAGE_FREECOM is not set 845# CONFIG_USB_STORAGE_FREECOM is not set
846# CONFIG_USB_STORAGE_ISD200 is not set
848# CONFIG_USB_STORAGE_DPCM is not set 847# CONFIG_USB_STORAGE_DPCM is not set
849# CONFIG_USB_STORAGE_USBAT is not set 848# CONFIG_USB_STORAGE_USBAT is not set
850# CONFIG_USB_STORAGE_SDDR09 is not set 849# CONFIG_USB_STORAGE_SDDR09 is not set
@@ -856,43 +855,10 @@ CONFIG_USB_STORAGE=y
856# CONFIG_USB_LIBUSUAL is not set 855# CONFIG_USB_LIBUSUAL is not set
857 856
858# 857#
859# USB Input Devices
860#
861# CONFIG_USB_HID is not set
862
863#
864# USB HID Boot Protocol drivers
865#
866# CONFIG_USB_KBD is not set
867# CONFIG_USB_MOUSE is not set
868# CONFIG_USB_AIPTEK is not set
869# CONFIG_USB_WACOM is not set
870# CONFIG_USB_ACECAD is not set
871# CONFIG_USB_KBTAB is not set
872# CONFIG_USB_POWERMATE is not set
873# CONFIG_USB_TOUCHSCREEN is not set
874# CONFIG_USB_YEALINK is not set
875# CONFIG_USB_XPAD is not set
876# CONFIG_USB_ATI_REMOTE is not set
877# CONFIG_USB_ATI_REMOTE2 is not set
878# CONFIG_USB_KEYSPAN_REMOTE is not set
879# CONFIG_USB_APPLETOUCH is not set
880
881#
882# USB Imaging devices 858# USB Imaging devices
883# 859#
884# CONFIG_USB_MDC800 is not set 860# CONFIG_USB_MDC800 is not set
885# CONFIG_USB_MICROTEK is not set 861# CONFIG_USB_MICROTEK is not set
886
887#
888# USB Network Adapters
889#
890# CONFIG_USB_CATC is not set
891# CONFIG_USB_KAWETH is not set
892# CONFIG_USB_PEGASUS is not set
893# CONFIG_USB_RTL8150 is not set
894# CONFIG_USB_USBNET_MII is not set
895# CONFIG_USB_USBNET is not set
896CONFIG_USB_MON=y 862CONFIG_USB_MON=y
897 863
898# 864#
@@ -914,6 +880,7 @@ CONFIG_USB_MON=y
914# CONFIG_USB_RIO500 is not set 880# CONFIG_USB_RIO500 is not set
915# CONFIG_USB_LEGOTOWER is not set 881# CONFIG_USB_LEGOTOWER is not set
916# CONFIG_USB_LCD is not set 882# CONFIG_USB_LCD is not set
883# CONFIG_USB_BERRY_CHARGE is not set
917# CONFIG_USB_LED is not set 884# CONFIG_USB_LED is not set
918# CONFIG_USB_CYPRESS_CY7C63 is not set 885# CONFIG_USB_CYPRESS_CY7C63 is not set
919# CONFIG_USB_CYTHERM is not set 886# CONFIG_USB_CYTHERM is not set
@@ -923,6 +890,7 @@ CONFIG_USB_MON=y
923# CONFIG_USB_APPLEDISPLAY is not set 890# CONFIG_USB_APPLEDISPLAY is not set
924# CONFIG_USB_LD is not set 891# CONFIG_USB_LD is not set
925# CONFIG_USB_TRANCEVIBRATOR is not set 892# CONFIG_USB_TRANCEVIBRATOR is not set
893# CONFIG_USB_IOWARRIOR is not set
926# CONFIG_USB_TEST is not set 894# CONFIG_USB_TEST is not set
927 895
928# 896#
@@ -933,13 +901,19 @@ CONFIG_USB_MON=y
933# USB Gadget Support 901# USB Gadget Support
934# 902#
935CONFIG_USB_GADGET=y 903CONFIG_USB_GADGET=y
904# CONFIG_USB_GADGET_DEBUG is not set
936# CONFIG_USB_GADGET_DEBUG_FILES is not set 905# CONFIG_USB_GADGET_DEBUG_FILES is not set
937CONFIG_USB_GADGET_SELECTED=y 906CONFIG_USB_GADGET_SELECTED=y
907# CONFIG_USB_GADGET_AMD5536UDC is not set
908# CONFIG_USB_GADGET_ATMEL_USBA is not set
909# CONFIG_USB_GADGET_FSL_USB2 is not set
938# CONFIG_USB_GADGET_NET2280 is not set 910# CONFIG_USB_GADGET_NET2280 is not set
939# CONFIG_USB_GADGET_PXA2XX is not set 911# CONFIG_USB_GADGET_PXA2XX is not set
912# CONFIG_USB_GADGET_M66592 is not set
940# CONFIG_USB_GADGET_GOKU is not set 913# CONFIG_USB_GADGET_GOKU is not set
941# CONFIG_USB_GADGET_LH7A40X is not set 914# CONFIG_USB_GADGET_LH7A40X is not set
942# CONFIG_USB_GADGET_OMAP is not set 915# CONFIG_USB_GADGET_OMAP is not set
916# CONFIG_USB_GADGET_S3C2410 is not set
943CONFIG_USB_GADGET_AT91=y 917CONFIG_USB_GADGET_AT91=y
944CONFIG_USB_AT91=y 918CONFIG_USB_AT91=y
945# CONFIG_USB_GADGET_DUMMY_HCD is not set 919# CONFIG_USB_GADGET_DUMMY_HCD is not set
@@ -951,21 +925,73 @@ CONFIG_USB_FILE_STORAGE=m
951# CONFIG_USB_FILE_STORAGE_TEST is not set 925# CONFIG_USB_FILE_STORAGE_TEST is not set
952CONFIG_USB_G_SERIAL=m 926CONFIG_USB_G_SERIAL=m
953# CONFIG_USB_MIDI_GADGET is not set 927# CONFIG_USB_MIDI_GADGET is not set
928CONFIG_MMC=y
929# CONFIG_MMC_DEBUG is not set
930# CONFIG_MMC_UNSAFE_RESUME is not set
954 931
955# 932#
956# MMC/SD Card support 933# MMC/SD Card Drivers
957# 934#
958CONFIG_MMC=y
959# CONFIG_MMC_DEBUG is not set
960CONFIG_MMC_BLOCK=y 935CONFIG_MMC_BLOCK=y
961CONFIG_MMC_AT91=m 936CONFIG_MMC_BLOCK_BOUNCE=y
962# CONFIG_MMC_TIFM_SD is not set 937# CONFIG_SDIO_UART is not set
963 938
964# 939#
965# Real Time Clock 940# MMC/SD Host Controller Drivers
966# 941#
942CONFIG_MMC_AT91=m
943# CONFIG_MMC_SPI is not set
944# CONFIG_NEW_LEDS is not set
967CONFIG_RTC_LIB=y 945CONFIG_RTC_LIB=y
968# CONFIG_RTC_CLASS is not set 946CONFIG_RTC_CLASS=y
947CONFIG_RTC_HCTOSYS=y
948CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
949# CONFIG_RTC_DEBUG is not set
950
951#
952# RTC interfaces
953#
954CONFIG_RTC_INTF_SYSFS=y
955CONFIG_RTC_INTF_PROC=y
956CONFIG_RTC_INTF_DEV=y
957# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
958# CONFIG_RTC_DRV_TEST is not set
959
960#
961# I2C RTC drivers
962#
963# CONFIG_RTC_DRV_DS1307 is not set
964# CONFIG_RTC_DRV_DS1374 is not set
965# CONFIG_RTC_DRV_DS1672 is not set
966# CONFIG_RTC_DRV_MAX6900 is not set
967# CONFIG_RTC_DRV_RS5C372 is not set
968# CONFIG_RTC_DRV_ISL1208 is not set
969# CONFIG_RTC_DRV_X1205 is not set
970# CONFIG_RTC_DRV_PCF8563 is not set
971# CONFIG_RTC_DRV_PCF8583 is not set
972# CONFIG_RTC_DRV_M41T80 is not set
973
974#
975# SPI RTC drivers
976#
977# CONFIG_RTC_DRV_RS5C348 is not set
978# CONFIG_RTC_DRV_MAX6902 is not set
979
980#
981# Platform RTC drivers
982#
983# CONFIG_RTC_DRV_CMOS is not set
984# CONFIG_RTC_DRV_DS1553 is not set
985# CONFIG_RTC_DRV_STK17TA8 is not set
986# CONFIG_RTC_DRV_DS1742 is not set
987# CONFIG_RTC_DRV_M48T86 is not set
988# CONFIG_RTC_DRV_M48T59 is not set
989# CONFIG_RTC_DRV_V3020 is not set
990
991#
992# on-CPU RTC drivers
993#
994CONFIG_RTC_DRV_AT91SAM9=y
969 995
970# 996#
971# File systems 997# File systems
@@ -1016,7 +1042,6 @@ CONFIG_SYSFS=y
1016CONFIG_TMPFS=y 1042CONFIG_TMPFS=y
1017# CONFIG_TMPFS_POSIX_ACL is not set 1043# CONFIG_TMPFS_POSIX_ACL is not set
1018# CONFIG_HUGETLB_PAGE is not set 1044# CONFIG_HUGETLB_PAGE is not set
1019CONFIG_RAMFS=y
1020# CONFIG_CONFIGFS_FS is not set 1045# CONFIG_CONFIGFS_FS is not set
1021 1046
1022# 1047#
@@ -1032,10 +1057,12 @@ CONFIG_RAMFS=y
1032CONFIG_JFFS2_FS=y 1057CONFIG_JFFS2_FS=y
1033CONFIG_JFFS2_FS_DEBUG=0 1058CONFIG_JFFS2_FS_DEBUG=0
1034CONFIG_JFFS2_FS_WRITEBUFFER=y 1059CONFIG_JFFS2_FS_WRITEBUFFER=y
1060# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1035# CONFIG_JFFS2_SUMMARY is not set 1061# CONFIG_JFFS2_SUMMARY is not set
1036# CONFIG_JFFS2_FS_XATTR is not set 1062# CONFIG_JFFS2_FS_XATTR is not set
1037# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 1063# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1038CONFIG_JFFS2_ZLIB=y 1064CONFIG_JFFS2_ZLIB=y
1065# CONFIG_JFFS2_LZO is not set
1039CONFIG_JFFS2_RTIME=y 1066CONFIG_JFFS2_RTIME=y
1040# CONFIG_JFFS2_RUBIN is not set 1067# CONFIG_JFFS2_RUBIN is not set
1041CONFIG_CRAMFS=y 1068CONFIG_CRAMFS=y
@@ -1044,10 +1071,7 @@ CONFIG_CRAMFS=y
1044# CONFIG_QNX4FS_FS is not set 1071# CONFIG_QNX4FS_FS is not set
1045# CONFIG_SYSV_FS is not set 1072# CONFIG_SYSV_FS is not set
1046# CONFIG_UFS_FS is not set 1073# CONFIG_UFS_FS is not set
1047 1074CONFIG_NETWORK_FILESYSTEMS=y
1048#
1049# Network File Systems
1050#
1051CONFIG_NFS_FS=y 1075CONFIG_NFS_FS=y
1052# CONFIG_NFS_V3 is not set 1076# CONFIG_NFS_V3 is not set
1053# CONFIG_NFS_V4 is not set 1077# CONFIG_NFS_V4 is not set
@@ -1057,6 +1081,7 @@ CONFIG_ROOT_NFS=y
1057CONFIG_LOCKD=y 1081CONFIG_LOCKD=y
1058CONFIG_NFS_COMMON=y 1082CONFIG_NFS_COMMON=y
1059CONFIG_SUNRPC=y 1083CONFIG_SUNRPC=y
1084# CONFIG_SUNRPC_BIND34 is not set
1060# CONFIG_RPCSEC_GSS_KRB5 is not set 1085# CONFIG_RPCSEC_GSS_KRB5 is not set
1061# CONFIG_RPCSEC_GSS_SPKM3 is not set 1086# CONFIG_RPCSEC_GSS_SPKM3 is not set
1062# CONFIG_SMB_FS is not set 1087# CONFIG_SMB_FS is not set
@@ -1064,17 +1089,12 @@ CONFIG_SUNRPC=y
1064# CONFIG_NCP_FS is not set 1089# CONFIG_NCP_FS is not set
1065# CONFIG_CODA_FS is not set 1090# CONFIG_CODA_FS is not set
1066# CONFIG_AFS_FS is not set 1091# CONFIG_AFS_FS is not set
1067# CONFIG_9P_FS is not set
1068 1092
1069# 1093#
1070# Partition Types 1094# Partition Types
1071# 1095#
1072# CONFIG_PARTITION_ADVANCED is not set 1096# CONFIG_PARTITION_ADVANCED is not set
1073CONFIG_MSDOS_PARTITION=y 1097CONFIG_MSDOS_PARTITION=y
1074
1075#
1076# Native Language Support
1077#
1078CONFIG_NLS=y 1098CONFIG_NLS=y
1079CONFIG_NLS_DEFAULT="iso8859-1" 1099CONFIG_NLS_DEFAULT="iso8859-1"
1080CONFIG_NLS_CODEPAGE_437=y 1100CONFIG_NLS_CODEPAGE_437=y
@@ -1115,36 +1135,35 @@ CONFIG_NLS_ISO8859_1=y
1115# CONFIG_NLS_KOI8_R is not set 1135# CONFIG_NLS_KOI8_R is not set
1116# CONFIG_NLS_KOI8_U is not set 1136# CONFIG_NLS_KOI8_U is not set
1117# CONFIG_NLS_UTF8 is not set 1137# CONFIG_NLS_UTF8 is not set
1118
1119#
1120# Distributed Lock Manager
1121#
1122# CONFIG_DLM is not set 1138# CONFIG_DLM is not set
1123 1139CONFIG_INSTRUMENTATION=y
1124#
1125# Profiling support
1126#
1127# CONFIG_PROFILING is not set 1140# CONFIG_PROFILING is not set
1141# CONFIG_MARKERS is not set
1128 1142
1129# 1143#
1130# Kernel hacking 1144# Kernel hacking
1131# 1145#
1132# CONFIG_PRINTK_TIME is not set 1146# CONFIG_PRINTK_TIME is not set
1147CONFIG_ENABLE_WARN_DEPRECATED=y
1133CONFIG_ENABLE_MUST_CHECK=y 1148CONFIG_ENABLE_MUST_CHECK=y
1134# CONFIG_MAGIC_SYSRQ is not set 1149# CONFIG_MAGIC_SYSRQ is not set
1135# CONFIG_UNUSED_SYMBOLS is not set 1150# CONFIG_UNUSED_SYMBOLS is not set
1136# CONFIG_DEBUG_FS is not set 1151# CONFIG_DEBUG_FS is not set
1137# CONFIG_HEADERS_CHECK is not set 1152# CONFIG_HEADERS_CHECK is not set
1138CONFIG_DEBUG_KERNEL=y 1153CONFIG_DEBUG_KERNEL=y
1139CONFIG_LOG_BUF_SHIFT=14 1154# CONFIG_DEBUG_SHIRQ is not set
1140CONFIG_DETECT_SOFTLOCKUP=y 1155CONFIG_DETECT_SOFTLOCKUP=y
1156CONFIG_SCHED_DEBUG=y
1141# CONFIG_SCHEDSTATS is not set 1157# CONFIG_SCHEDSTATS is not set
1158# CONFIG_TIMER_STATS is not set
1142# CONFIG_DEBUG_SLAB is not set 1159# CONFIG_DEBUG_SLAB is not set
1143# CONFIG_DEBUG_RT_MUTEXES is not set 1160# CONFIG_DEBUG_RT_MUTEXES is not set
1144# CONFIG_RT_MUTEX_TESTER is not set 1161# CONFIG_RT_MUTEX_TESTER is not set
1145# CONFIG_DEBUG_SPINLOCK is not set 1162# CONFIG_DEBUG_SPINLOCK is not set
1146# CONFIG_DEBUG_MUTEXES is not set 1163# CONFIG_DEBUG_MUTEXES is not set
1147# CONFIG_DEBUG_RWSEMS is not set 1164# CONFIG_DEBUG_LOCK_ALLOC is not set
1165# CONFIG_PROVE_LOCKING is not set
1166# CONFIG_LOCK_STAT is not set
1148# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1167# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1149# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1168# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1150# CONFIG_DEBUG_KOBJECT is not set 1169# CONFIG_DEBUG_KOBJECT is not set
@@ -1152,9 +1171,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
1152# CONFIG_DEBUG_INFO is not set 1171# CONFIG_DEBUG_INFO is not set
1153# CONFIG_DEBUG_VM is not set 1172# CONFIG_DEBUG_VM is not set
1154# CONFIG_DEBUG_LIST is not set 1173# CONFIG_DEBUG_LIST is not set
1174# CONFIG_DEBUG_SG is not set
1155CONFIG_FRAME_POINTER=y 1175CONFIG_FRAME_POINTER=y
1156CONFIG_FORCED_INLINING=y 1176CONFIG_FORCED_INLINING=y
1177# CONFIG_BOOT_PRINTK_DELAY is not set
1157# CONFIG_RCU_TORTURE_TEST is not set 1178# CONFIG_RCU_TORTURE_TEST is not set
1179# CONFIG_FAULT_INJECTION is not set
1180# CONFIG_SAMPLES is not set
1158CONFIG_DEBUG_USER=y 1181CONFIG_DEBUG_USER=y
1159# CONFIG_DEBUG_ERRORS is not set 1182# CONFIG_DEBUG_ERRORS is not set
1160CONFIG_DEBUG_LL=y 1183CONFIG_DEBUG_LL=y
@@ -1165,10 +1188,7 @@ CONFIG_DEBUG_LL=y
1165# 1188#
1166# CONFIG_KEYS is not set 1189# CONFIG_KEYS is not set
1167# CONFIG_SECURITY is not set 1190# CONFIG_SECURITY is not set
1168 1191# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1169#
1170# Cryptographic options
1171#
1172# CONFIG_CRYPTO is not set 1192# CONFIG_CRYPTO is not set
1173 1193
1174# 1194#
@@ -1177,8 +1197,13 @@ CONFIG_DEBUG_LL=y
1177CONFIG_BITREVERSE=y 1197CONFIG_BITREVERSE=y
1178# CONFIG_CRC_CCITT is not set 1198# CONFIG_CRC_CCITT is not set
1179# CONFIG_CRC16 is not set 1199# CONFIG_CRC16 is not set
1200# CONFIG_CRC_ITU_T is not set
1180CONFIG_CRC32=y 1201CONFIG_CRC32=y
1202# CONFIG_CRC7 is not set
1181# CONFIG_LIBCRC32C is not set 1203# CONFIG_LIBCRC32C is not set
1182CONFIG_ZLIB_INFLATE=y 1204CONFIG_ZLIB_INFLATE=y
1205CONFIG_ZLIB_DEFLATE=y
1183CONFIG_PLIST=y 1206CONFIG_PLIST=y
1184CONFIG_IOMAP_COPY=y 1207CONFIG_HAS_IOMEM=y
1208CONFIG_HAS_IOPORT=y
1209CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/at91sam9rlek_defconfig b/arch/arm/configs/at91sam9rlek_defconfig
index fbe8b3049343..98e6746d02be 100644
--- a/arch/arm/configs/at91sam9rlek_defconfig
+++ b/arch/arm/configs/at91sam9rlek_defconfig
@@ -1,15 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21 3# Linux kernel version: 2.6.24-rc7
4# Mon May 7 16:30:40 2007 4# Tue Jan 8 22:24:14 2008
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
9# CONFIG_GENERIC_TIME is not set 9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
10CONFIG_MMU=y 11CONFIG_MMU=y
11# CONFIG_NO_IOPORT is not set 12# CONFIG_NO_IOPORT is not set
12CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
13CONFIG_TRACE_IRQFLAGS_SUPPORT=y 16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
14CONFIG_HARDIRQS_SW_RESEND=y 17CONFIG_HARDIRQS_SW_RESEND=y
15CONFIG_GENERIC_IRQ_PROBE=y 18CONFIG_GENERIC_IRQ_PROBE=y
@@ -23,27 +26,28 @@ CONFIG_VECTORS_BASE=0xffff0000
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24 27
25# 28#
26# Code maturity level options 29# General setup
27# 30#
28CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
29CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
30CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
31
32#
33# General setup
34#
35CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
36# CONFIG_LOCALVERSION_AUTO is not set 35# CONFIG_LOCALVERSION_AUTO is not set
37# CONFIG_SWAP is not set 36# CONFIG_SWAP is not set
38CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
39# CONFIG_IPC_NS is not set
40CONFIG_SYSVIPC_SYSCTL=y 38CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_POSIX_MQUEUE is not set 39# CONFIG_POSIX_MQUEUE is not set
42# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
44# CONFIG_UTS_NS is not set 42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
45# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
46# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
47CONFIG_SYSFS_DEPRECATED=y 51CONFIG_SYSFS_DEPRECATED=y
48# CONFIG_RELAY is not set 52# CONFIG_RELAY is not set
49CONFIG_BLK_DEV_INITRD=y 53CONFIG_BLK_DEV_INITRD=y
@@ -62,32 +66,30 @@ CONFIG_BUG=y
62CONFIG_ELF_CORE=y 66CONFIG_ELF_CORE=y
63CONFIG_BASE_FULL=y 67CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y 70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_EVENTFD=y
66CONFIG_SHMEM=y 73CONFIG_SHMEM=y
67CONFIG_SLAB=y
68CONFIG_VM_EVENT_COUNTERS=y 74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78CONFIG_SLABINFO=y
69CONFIG_RT_MUTEXES=y 79CONFIG_RT_MUTEXES=y
70# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
71CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
72# CONFIG_SLOB is not set
73
74#
75# Loadable module support
76#
77CONFIG_MODULES=y 82CONFIG_MODULES=y
78CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
79# CONFIG_MODULE_FORCE_UNLOAD is not set 84# CONFIG_MODULE_FORCE_UNLOAD is not set
80# CONFIG_MODVERSIONS is not set 85# CONFIG_MODVERSIONS is not set
81# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
82CONFIG_KMOD=y 87CONFIG_KMOD=y
83
84#
85# Block layer
86#
87CONFIG_BLOCK=y 88CONFIG_BLOCK=y
88# CONFIG_LBD is not set 89# CONFIG_LBD is not set
89# CONFIG_BLK_DEV_IO_TRACE is not set 90# CONFIG_BLK_DEV_IO_TRACE is not set
90# CONFIG_LSF is not set 91# CONFIG_LSF is not set
92# CONFIG_BLK_DEV_BSG is not set
91 93
92# 94#
93# IO Schedulers 95# IO Schedulers
@@ -119,14 +121,16 @@ CONFIG_ARCH_AT91=y
119# CONFIG_ARCH_NETX is not set 121# CONFIG_ARCH_NETX is not set
120# CONFIG_ARCH_H720X is not set 122# CONFIG_ARCH_H720X is not set
121# CONFIG_ARCH_IMX is not set 123# CONFIG_ARCH_IMX is not set
124# CONFIG_ARCH_IOP13XX is not set
122# CONFIG_ARCH_IOP32X is not set 125# CONFIG_ARCH_IOP32X is not set
123# CONFIG_ARCH_IOP33X is not set 126# CONFIG_ARCH_IOP33X is not set
124# CONFIG_ARCH_IOP13XX is not set
125# CONFIG_ARCH_IXP4XX is not set
126# CONFIG_ARCH_IXP2000 is not set
127# CONFIG_ARCH_IXP23XX is not set 127# CONFIG_ARCH_IXP23XX is not set
128# CONFIG_ARCH_IXP2000 is not set
129# CONFIG_ARCH_IXP4XX is not set
128# CONFIG_ARCH_L7200 is not set 130# CONFIG_ARCH_L7200 is not set
131# CONFIG_ARCH_KS8695 is not set
129# CONFIG_ARCH_NS9XXX is not set 132# CONFIG_ARCH_NS9XXX is not set
133# CONFIG_ARCH_MXC is not set
130# CONFIG_ARCH_PNX4008 is not set 134# CONFIG_ARCH_PNX4008 is not set
131# CONFIG_ARCH_PXA is not set 135# CONFIG_ARCH_PXA is not set
132# CONFIG_ARCH_RPC is not set 136# CONFIG_ARCH_RPC is not set
@@ -134,9 +138,18 @@ CONFIG_ARCH_AT91=y
134# CONFIG_ARCH_S3C2410 is not set 138# CONFIG_ARCH_S3C2410 is not set
135# CONFIG_ARCH_SHARK is not set 139# CONFIG_ARCH_SHARK is not set
136# CONFIG_ARCH_LH7A40X is not set 140# CONFIG_ARCH_LH7A40X is not set
141# CONFIG_ARCH_DAVINCI is not set
137# CONFIG_ARCH_OMAP is not set 142# CONFIG_ARCH_OMAP is not set
138 143
139# 144#
145# Boot options
146#
147
148#
149# Power management
150#
151
152#
140# Atmel AT91 System-on-Chip 153# Atmel AT91 System-on-Chip
141# 154#
142# CONFIG_ARCH_AT91RM9200 is not set 155# CONFIG_ARCH_AT91RM9200 is not set
@@ -144,6 +157,8 @@ CONFIG_ARCH_AT91=y
144# CONFIG_ARCH_AT91SAM9261 is not set 157# CONFIG_ARCH_AT91SAM9261 is not set
145# CONFIG_ARCH_AT91SAM9263 is not set 158# CONFIG_ARCH_AT91SAM9263 is not set
146CONFIG_ARCH_AT91SAM9RL=y 159CONFIG_ARCH_AT91SAM9RL=y
160# CONFIG_ARCH_AT91X40 is not set
161CONFIG_AT91_PMC_UNIT=y
147 162
148# 163#
149# AT91SAM9RL Board Type 164# AT91SAM9RL Board Type
@@ -157,7 +172,9 @@ CONFIG_MACH_AT91SAM9RLEK=y
157# 172#
158# AT91 Feature Selections 173# AT91 Feature Selections
159# 174#
160# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set 175CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
176# CONFIG_ATMEL_TCLIB is not set
177CONFIG_AT91_TIMER_HZ=100
161 178
162# 179#
163# Processor Type 180# Processor Type
@@ -185,15 +202,14 @@ CONFIG_CPU_CP15_MMU=y
185# 202#
186# Bus support 203# Bus support
187# 204#
188 205# CONFIG_PCI_SYSCALL is not set
189# 206# CONFIG_ARCH_SUPPORTS_MSI is not set
190# PCCARD (PCMCIA/CardBus) support
191#
192# CONFIG_PCCARD is not set 207# CONFIG_PCCARD is not set
193 208
194# 209#
195# Kernel Features 210# Kernel Features
196# 211#
212# CONFIG_TICK_ONESHOT is not set
197# CONFIG_PREEMPT is not set 213# CONFIG_PREEMPT is not set
198# CONFIG_NO_IDLE_HZ is not set 214# CONFIG_NO_IDLE_HZ is not set
199CONFIG_HZ=100 215CONFIG_HZ=100
@@ -206,9 +222,12 @@ CONFIG_FLATMEM_MANUAL=y
206CONFIG_FLATMEM=y 222CONFIG_FLATMEM=y
207CONFIG_FLAT_NODE_MEM_MAP=y 223CONFIG_FLAT_NODE_MEM_MAP=y
208# CONFIG_SPARSEMEM_STATIC is not set 224# CONFIG_SPARSEMEM_STATIC is not set
225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
209CONFIG_SPLIT_PTLOCK_CPUS=4096 226CONFIG_SPLIT_PTLOCK_CPUS=4096
210# CONFIG_RESOURCES_64BIT is not set 227# CONFIG_RESOURCES_64BIT is not set
211CONFIG_ZONE_DMA_FLAG=1 228CONFIG_ZONE_DMA_FLAG=1
229CONFIG_BOUNCE=y
230CONFIG_VIRT_TO_BUS=y
212# CONFIG_LEDS is not set 231# CONFIG_LEDS is not set
213CONFIG_ALIGNMENT_TRAP=y 232CONFIG_ALIGNMENT_TRAP=y
214 233
@@ -245,6 +264,7 @@ CONFIG_BINFMT_ELF=y
245# Power management options 264# Power management options
246# 265#
247# CONFIG_PM is not set 266# CONFIG_PM is not set
267CONFIG_SUSPEND_UP_POSSIBLE=y
248 268
249# 269#
250# Networking 270# Networking
@@ -254,7 +274,6 @@ CONFIG_NET=y
254# 274#
255# Networking options 275# Networking options
256# 276#
257# CONFIG_NETDEBUG is not set
258# CONFIG_PACKET is not set 277# CONFIG_PACKET is not set
259CONFIG_UNIX=y 278CONFIG_UNIX=y
260# CONFIG_NET_KEY is not set 279# CONFIG_NET_KEY is not set
@@ -271,10 +290,6 @@ CONFIG_UNIX=y
271# CONFIG_X25 is not set 290# CONFIG_X25 is not set
272# CONFIG_LAPB is not set 291# CONFIG_LAPB is not set
273# CONFIG_WAN_ROUTER is not set 292# CONFIG_WAN_ROUTER is not set
274
275#
276# QoS and/or fair queueing
277#
278# CONFIG_NET_SCHED is not set 293# CONFIG_NET_SCHED is not set
279 294
280# 295#
@@ -284,7 +299,16 @@ CONFIG_UNIX=y
284# CONFIG_HAMRADIO is not set 299# CONFIG_HAMRADIO is not set
285# CONFIG_IRDA is not set 300# CONFIG_IRDA is not set
286# CONFIG_BT is not set 301# CONFIG_BT is not set
302
303#
304# Wireless
305#
306# CONFIG_CFG80211 is not set
307# CONFIG_WIRELESS_EXT is not set
308# CONFIG_MAC80211 is not set
287# CONFIG_IEEE80211 is not set 309# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
288 312
289# 313#
290# Device Drivers 314# Device Drivers
@@ -293,21 +317,14 @@ CONFIG_UNIX=y
293# 317#
294# Generic Driver Options 318# Generic Driver Options
295# 319#
320CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
296CONFIG_STANDALONE=y 321CONFIG_STANDALONE=y
297CONFIG_PREVENT_FIRMWARE_BUILD=y 322CONFIG_PREVENT_FIRMWARE_BUILD=y
298# CONFIG_FW_LOADER is not set 323# CONFIG_FW_LOADER is not set
299# CONFIG_DEBUG_DRIVER is not set 324# CONFIG_DEBUG_DRIVER is not set
300# CONFIG_DEBUG_DEVRES is not set 325# CONFIG_DEBUG_DEVRES is not set
301# CONFIG_SYS_HYPERVISOR is not set 326# CONFIG_SYS_HYPERVISOR is not set
302
303#
304# Connector - unified userspace <-> kernelspace linker
305#
306# CONFIG_CONNECTOR is not set 327# CONFIG_CONNECTOR is not set
307
308#
309# Memory Technology Devices (MTD)
310#
311CONFIG_MTD=y 328CONFIG_MTD=y
312# CONFIG_MTD_DEBUG is not set 329# CONFIG_MTD_DEBUG is not set
313CONFIG_MTD_CONCAT=y 330CONFIG_MTD_CONCAT=y
@@ -327,6 +344,7 @@ CONFIG_MTD_BLOCK=y
327# CONFIG_INFTL is not set 344# CONFIG_INFTL is not set
328# CONFIG_RFD_FTL is not set 345# CONFIG_RFD_FTL is not set
329# CONFIG_SSFDC is not set 346# CONFIG_SSFDC is not set
347# CONFIG_MTD_OOPS is not set
330 348
331# 349#
332# RAM/ROM/Flash chip drivers 350# RAM/ROM/Flash chip drivers
@@ -346,7 +364,6 @@ CONFIG_MTD_CFI_I2=y
346# CONFIG_MTD_RAM is not set 364# CONFIG_MTD_RAM is not set
347# CONFIG_MTD_ROM is not set 365# CONFIG_MTD_ROM is not set
348# CONFIG_MTD_ABSENT is not set 366# CONFIG_MTD_ABSENT is not set
349# CONFIG_MTD_OBSOLETE_CHIPS is not set
350 367
351# 368#
352# Mapping drivers for chip access 369# Mapping drivers for chip access
@@ -370,36 +387,23 @@ CONFIG_MTD_DATAFLASH=y
370# CONFIG_MTD_DOC2000 is not set 387# CONFIG_MTD_DOC2000 is not set
371# CONFIG_MTD_DOC2001 is not set 388# CONFIG_MTD_DOC2001 is not set
372# CONFIG_MTD_DOC2001PLUS is not set 389# CONFIG_MTD_DOC2001PLUS is not set
373
374#
375# NAND Flash Device Drivers
376#
377CONFIG_MTD_NAND=y 390CONFIG_MTD_NAND=y
378# CONFIG_MTD_NAND_VERIFY_WRITE is not set 391# CONFIG_MTD_NAND_VERIFY_WRITE is not set
379# CONFIG_MTD_NAND_ECC_SMC is not set 392# CONFIG_MTD_NAND_ECC_SMC is not set
393# CONFIG_MTD_NAND_MUSEUM_IDS is not set
380CONFIG_MTD_NAND_IDS=y 394CONFIG_MTD_NAND_IDS=y
381# CONFIG_MTD_NAND_DISKONCHIP is not set 395# CONFIG_MTD_NAND_DISKONCHIP is not set
382CONFIG_MTD_NAND_AT91=y 396CONFIG_MTD_NAND_AT91=y
383# CONFIG_MTD_NAND_NANDSIM is not set 397# CONFIG_MTD_NAND_NANDSIM is not set
384 398# CONFIG_MTD_NAND_PLATFORM is not set
385#
386# OneNAND Flash Device Drivers
387#
388# CONFIG_MTD_ONENAND is not set 399# CONFIG_MTD_ONENAND is not set
389 400
390# 401#
391# Parallel port support 402# UBI - Unsorted block images
392# 403#
404# CONFIG_MTD_UBI is not set
393# CONFIG_PARPORT is not set 405# CONFIG_PARPORT is not set
394 406CONFIG_BLK_DEV=y
395#
396# Plug and Play support
397#
398# CONFIG_PNPACPI is not set
399
400#
401# Block devices
402#
403# CONFIG_BLK_DEV_COW_COMMON is not set 407# CONFIG_BLK_DEV_COW_COMMON is not set
404CONFIG_BLK_DEV_LOOP=y 408CONFIG_BLK_DEV_LOOP=y
405# CONFIG_BLK_DEV_CRYPTOLOOP is not set 409# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -410,12 +414,16 @@ CONFIG_BLK_DEV_RAM_SIZE=24576
410CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 414CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
411# CONFIG_CDROM_PKTCDVD is not set 415# CONFIG_CDROM_PKTCDVD is not set
412# CONFIG_ATA_OVER_ETH is not set 416# CONFIG_ATA_OVER_ETH is not set
417CONFIG_MISC_DEVICES=y
418# CONFIG_EEPROM_93CX6 is not set
419CONFIG_ATMEL_SSC=y
413 420
414# 421#
415# SCSI device support 422# SCSI device support
416# 423#
417# CONFIG_RAID_ATTRS is not set 424# CONFIG_RAID_ATTRS is not set
418CONFIG_SCSI=y 425CONFIG_SCSI=y
426CONFIG_SCSI_DMA=y
419# CONFIG_SCSI_TGT is not set 427# CONFIG_SCSI_TGT is not set
420# CONFIG_SCSI_NETLINK is not set 428# CONFIG_SCSI_NETLINK is not set
421CONFIG_SCSI_PROC_FS=y 429CONFIG_SCSI_PROC_FS=y
@@ -437,6 +445,7 @@ CONFIG_SCSI_MULTI_LUN=y
437# CONFIG_SCSI_CONSTANTS is not set 445# CONFIG_SCSI_CONSTANTS is not set
438# CONFIG_SCSI_LOGGING is not set 446# CONFIG_SCSI_LOGGING is not set
439# CONFIG_SCSI_SCAN_ASYNC is not set 447# CONFIG_SCSI_SCAN_ASYNC is not set
448CONFIG_SCSI_WAIT_SCAN=m
440 449
441# 450#
442# SCSI Transports 451# SCSI Transports
@@ -444,47 +453,13 @@ CONFIG_SCSI_MULTI_LUN=y
444# CONFIG_SCSI_SPI_ATTRS is not set 453# CONFIG_SCSI_SPI_ATTRS is not set
445# CONFIG_SCSI_FC_ATTRS is not set 454# CONFIG_SCSI_FC_ATTRS is not set
446# CONFIG_SCSI_ISCSI_ATTRS is not set 455# CONFIG_SCSI_ISCSI_ATTRS is not set
447# CONFIG_SCSI_SAS_ATTRS is not set
448# CONFIG_SCSI_SAS_LIBSAS is not set 456# CONFIG_SCSI_SAS_LIBSAS is not set
449 457# CONFIG_SCSI_SRP_ATTRS is not set
450# 458CONFIG_SCSI_LOWLEVEL=y
451# SCSI low-level drivers
452#
453# CONFIG_SCSI_DEBUG is not set 459# CONFIG_SCSI_DEBUG is not set
454
455#
456# Serial ATA (prod) and Parallel ATA (experimental) drivers
457#
458# CONFIG_ATA is not set 460# CONFIG_ATA is not set
459
460#
461# Multi-device support (RAID and LVM)
462#
463# CONFIG_MD is not set 461# CONFIG_MD is not set
464
465#
466# Fusion MPT device support
467#
468# CONFIG_FUSION is not set
469
470#
471# IEEE 1394 (FireWire) support
472#
473
474#
475# I2O device support
476#
477
478#
479# Network device support
480#
481# CONFIG_NETDEVICES is not set 462# CONFIG_NETDEVICES is not set
482# CONFIG_NETPOLL is not set
483# CONFIG_NET_POLL_CONTROLLER is not set
484
485#
486# ISDN subsystem
487#
488# CONFIG_ISDN is not set 463# CONFIG_ISDN is not set
489 464
490# 465#
@@ -492,6 +467,7 @@ CONFIG_SCSI_MULTI_LUN=y
492# 467#
493CONFIG_INPUT=y 468CONFIG_INPUT=y
494# CONFIG_INPUT_FF_MEMLESS is not set 469# CONFIG_INPUT_FF_MEMLESS is not set
470# CONFIG_INPUT_POLLDEV is not set
495 471
496# 472#
497# Userland interfaces 473# Userland interfaces
@@ -501,7 +477,6 @@ CONFIG_INPUT_MOUSEDEV=y
501CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 477CONFIG_INPUT_MOUSEDEV_SCREEN_X=320
502CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 478CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
503# CONFIG_INPUT_JOYDEV is not set 479# CONFIG_INPUT_JOYDEV is not set
504# CONFIG_INPUT_TSDEV is not set
505CONFIG_INPUT_EVDEV=y 480CONFIG_INPUT_EVDEV=y
506# CONFIG_INPUT_EVBUG is not set 481# CONFIG_INPUT_EVBUG is not set
507 482
@@ -511,8 +486,10 @@ CONFIG_INPUT_EVDEV=y
511# CONFIG_INPUT_KEYBOARD is not set 486# CONFIG_INPUT_KEYBOARD is not set
512# CONFIG_INPUT_MOUSE is not set 487# CONFIG_INPUT_MOUSE is not set
513# CONFIG_INPUT_JOYSTICK is not set 488# CONFIG_INPUT_JOYSTICK is not set
489# CONFIG_INPUT_TABLET is not set
514CONFIG_INPUT_TOUCHSCREEN=y 490CONFIG_INPUT_TOUCHSCREEN=y
515# CONFIG_TOUCHSCREEN_ADS7846 is not set 491# CONFIG_TOUCHSCREEN_ADS7846 is not set
492# CONFIG_TOUCHSCREEN_FUJITSU is not set
516# CONFIG_TOUCHSCREEN_GUNZE is not set 493# CONFIG_TOUCHSCREEN_GUNZE is not set
517# CONFIG_TOUCHSCREEN_ELO is not set 494# CONFIG_TOUCHSCREEN_ELO is not set
518# CONFIG_TOUCHSCREEN_MTOUCH is not set 495# CONFIG_TOUCHSCREEN_MTOUCH is not set
@@ -521,6 +498,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
521# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 498# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
522# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 499# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
523# CONFIG_TOUCHSCREEN_UCB1400 is not set 500# CONFIG_TOUCHSCREEN_UCB1400 is not set
501# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
524# CONFIG_INPUT_MISC is not set 502# CONFIG_INPUT_MISC is not set
525 503
526# 504#
@@ -554,37 +532,50 @@ CONFIG_SERIAL_CORE_CONSOLE=y
554CONFIG_UNIX98_PTYS=y 532CONFIG_UNIX98_PTYS=y
555CONFIG_LEGACY_PTYS=y 533CONFIG_LEGACY_PTYS=y
556CONFIG_LEGACY_PTY_COUNT=256 534CONFIG_LEGACY_PTY_COUNT=256
557
558#
559# IPMI
560#
561# CONFIG_IPMI_HANDLER is not set 535# CONFIG_IPMI_HANDLER is not set
562 536# CONFIG_HW_RANDOM is not set
563#
564# Watchdog Cards
565#
566CONFIG_WATCHDOG=y
567CONFIG_WATCHDOG_NOWAYOUT=y
568
569#
570# Watchdog Device Drivers
571#
572# CONFIG_SOFT_WATCHDOG is not set
573CONFIG_HW_RANDOM=y
574# CONFIG_NVRAM is not set 537# CONFIG_NVRAM is not set
575# CONFIG_DTLK is not set
576# CONFIG_R3964 is not set 538# CONFIG_R3964 is not set
577# CONFIG_RAW_DRIVER is not set 539# CONFIG_RAW_DRIVER is not set
540# CONFIG_TCG_TPM is not set
541CONFIG_I2C=y
542CONFIG_I2C_BOARDINFO=y
543CONFIG_I2C_CHARDEV=y
578 544
579# 545#
580# TPM devices 546# I2C Algorithms
581# 547#
582# CONFIG_TCG_TPM is not set 548CONFIG_I2C_ALGOBIT=y
549# CONFIG_I2C_ALGOPCF is not set
550# CONFIG_I2C_ALGOPCA is not set
583 551
584# 552#
585# I2C support 553# I2C Hardware Bus support
586# 554#
587# CONFIG_I2C is not set 555CONFIG_I2C_GPIO=y
556# CONFIG_I2C_OCORES is not set
557# CONFIG_I2C_PARPORT_LIGHT is not set
558# CONFIG_I2C_SIMTEC is not set
559# CONFIG_I2C_TAOS_EVM is not set
560# CONFIG_I2C_STUB is not set
561# CONFIG_I2C_PCA is not set
562
563#
564# Miscellaneous I2C Chip support
565#
566# CONFIG_SENSORS_DS1337 is not set
567# CONFIG_SENSORS_DS1374 is not set
568# CONFIG_DS1682 is not set
569# CONFIG_SENSORS_EEPROM is not set
570# CONFIG_SENSORS_PCF8574 is not set
571# CONFIG_SENSORS_PCA9539 is not set
572# CONFIG_SENSORS_PCF8591 is not set
573# CONFIG_SENSORS_MAX6875 is not set
574# CONFIG_SENSORS_TSL2550 is not set
575# CONFIG_I2C_DEBUG_CORE is not set
576# CONFIG_I2C_DEBUG_ALGO is not set
577# CONFIG_I2C_DEBUG_BUS is not set
578# CONFIG_I2C_DEBUG_CHIP is not set
588 579
589# 580#
590# SPI support 581# SPI support
@@ -603,21 +594,25 @@ CONFIG_SPI_ATMEL=y
603# SPI Protocol Masters 594# SPI Protocol Masters
604# 595#
605# CONFIG_SPI_AT25 is not set 596# CONFIG_SPI_AT25 is not set
606 597# CONFIG_SPI_SPIDEV is not set
607# 598# CONFIG_SPI_TLE62X0 is not set
608# Dallas's 1-wire bus
609#
610# CONFIG_W1 is not set 599# CONFIG_W1 is not set
600# CONFIG_POWER_SUPPLY is not set
601# CONFIG_HWMON is not set
602CONFIG_WATCHDOG=y
603CONFIG_WATCHDOG_NOWAYOUT=y
611 604
612# 605#
613# Hardware Monitoring support 606# Watchdog Device Drivers
614# 607#
615# CONFIG_HWMON is not set 608# CONFIG_SOFT_WATCHDOG is not set
616# CONFIG_HWMON_VID is not set 609CONFIG_AT91SAM9_WATCHDOG=y
617 610
618# 611#
619# Misc devices 612# Sonics Silicon Backplane
620# 613#
614CONFIG_SSB_POSSIBLE=y
615# CONFIG_SSB is not set
621 616
622# 617#
623# Multifunction device drivers 618# Multifunction device drivers
@@ -625,37 +620,28 @@ CONFIG_SPI_ATMEL=y
625# CONFIG_MFD_SM501 is not set 620# CONFIG_MFD_SM501 is not set
626 621
627# 622#
628# LED devices
629#
630# CONFIG_NEW_LEDS is not set
631
632#
633# LED drivers
634#
635
636#
637# LED Triggers
638#
639
640#
641# Multimedia devices 623# Multimedia devices
642# 624#
643# CONFIG_VIDEO_DEV is not set 625# CONFIG_VIDEO_DEV is not set
644 626# CONFIG_DAB is not set
645#
646# Digital Video Broadcasting Devices
647#
648 627
649# 628#
650# Graphics support 629# Graphics support
651# 630#
652# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 631# CONFIG_VGASTATE is not set
632# CONFIG_VIDEO_OUTPUT_CONTROL is not set
653CONFIG_FB=y 633CONFIG_FB=y
654# CONFIG_FIRMWARE_EDID is not set 634# CONFIG_FIRMWARE_EDID is not set
655# CONFIG_FB_DDC is not set 635# CONFIG_FB_DDC is not set
656CONFIG_FB_CFB_FILLRECT=y 636CONFIG_FB_CFB_FILLRECT=y
657CONFIG_FB_CFB_COPYAREA=y 637CONFIG_FB_CFB_COPYAREA=y
658CONFIG_FB_CFB_IMAGEBLIT=y 638CONFIG_FB_CFB_IMAGEBLIT=y
639# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
640# CONFIG_FB_SYS_FILLRECT is not set
641# CONFIG_FB_SYS_COPYAREA is not set
642# CONFIG_FB_SYS_IMAGEBLIT is not set
643# CONFIG_FB_SYS_FOPS is not set
644CONFIG_FB_DEFERRED_IO=y
659# CONFIG_FB_SVGALIB is not set 645# CONFIG_FB_SVGALIB is not set
660# CONFIG_FB_MACMODES is not set 646# CONFIG_FB_MACMODES is not set
661# CONFIG_FB_BACKLIGHT is not set 647# CONFIG_FB_BACKLIGHT is not set
@@ -665,9 +651,16 @@ CONFIG_FB_CFB_IMAGEBLIT=y
665# 651#
666# Frame buffer hardware drivers 652# Frame buffer hardware drivers
667# 653#
654# CONFIG_FB_S1D15605 is not set
668# CONFIG_FB_S1D13XXX is not set 655# CONFIG_FB_S1D13XXX is not set
669CONFIG_FB_ATMEL=y 656CONFIG_FB_ATMEL=y
670# CONFIG_FB_VIRTUAL is not set 657# CONFIG_FB_VIRTUAL is not set
658# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
659
660#
661# Display device support
662#
663# CONFIG_DISPLAY_SUPPORT is not set
671 664
672# 665#
673# Console display driver support 666# Console display driver support
@@ -675,97 +668,97 @@ CONFIG_FB_ATMEL=y
675# CONFIG_VGA_CONSOLE is not set 668# CONFIG_VGA_CONSOLE is not set
676CONFIG_DUMMY_CONSOLE=y 669CONFIG_DUMMY_CONSOLE=y
677# CONFIG_FRAMEBUFFER_CONSOLE is not set 670# CONFIG_FRAMEBUFFER_CONSOLE is not set
678
679#
680# Logo configuration
681#
682# CONFIG_LOGO is not set 671# CONFIG_LOGO is not set
683 672
684# 673#
685# Sound 674# Sound
686# 675#
687CONFIG_SOUND=y 676# CONFIG_SOUND is not set
688 677CONFIG_HID_SUPPORT=y
689# 678CONFIG_HID=y
690# Advanced Linux Sound Architecture 679# CONFIG_HID_DEBUG is not set
691# 680# CONFIG_HIDRAW is not set
692CONFIG_SND=y 681CONFIG_USB_SUPPORT=y
693CONFIG_SND_TIMER=y 682CONFIG_USB_ARCH_HAS_HCD=y
694CONFIG_SND_PCM=y 683CONFIG_USB_ARCH_HAS_OHCI=y
695CONFIG_SND_SEQUENCER=y 684# CONFIG_USB_ARCH_HAS_EHCI is not set
696CONFIG_SND_SEQ_DUMMY=y 685# CONFIG_USB is not set
697CONFIG_SND_OSSEMUL=y
698CONFIG_SND_MIXER_OSS=y
699CONFIG_SND_PCM_OSS=y
700CONFIG_SND_PCM_OSS_PLUGINS=y
701CONFIG_SND_SEQUENCER_OSS=y
702# CONFIG_SND_DYNAMIC_MINORS is not set
703CONFIG_SND_SUPPORT_OLD_API=y
704CONFIG_SND_VERBOSE_PROCFS=y
705CONFIG_SND_VERBOSE_PRINTK=y
706CONFIG_SND_DEBUG=y
707CONFIG_SND_DEBUG_DETECT=y
708# CONFIG_SND_PCM_XRUN_DEBUG is not set
709
710#
711# Generic devices
712#
713# CONFIG_SND_DUMMY is not set
714# CONFIG_SND_VIRMIDI is not set
715# CONFIG_SND_MTPAV is not set
716# CONFIG_SND_SERIAL_U16550 is not set
717# CONFIG_SND_MPU401 is not set
718 686
719# 687#
720# ALSA ARM devices 688# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
721# 689#
722 690
723# 691#
724# SoC audio support 692# USB Gadget Support
725# 693#
726# CONFIG_SND_SOC is not set 694# CONFIG_USB_GADGET is not set
695CONFIG_MMC=y
696# CONFIG_MMC_DEBUG is not set
697# CONFIG_MMC_UNSAFE_RESUME is not set
727 698
728# 699#
729# Open Sound System 700# MMC/SD Card Drivers
730# 701#
731# CONFIG_SOUND_PRIME is not set 702CONFIG_MMC_BLOCK=y
703CONFIG_MMC_BLOCK_BOUNCE=y
704# CONFIG_SDIO_UART is not set
732 705
733# 706#
734# HID Devices 707# MMC/SD Host Controller Drivers
735# 708#
736CONFIG_HID=y 709CONFIG_MMC_AT91=y
737# CONFIG_HID_DEBUG is not set 710# CONFIG_MMC_SPI is not set
711# CONFIG_NEW_LEDS is not set
712CONFIG_RTC_LIB=y
713CONFIG_RTC_CLASS=y
714CONFIG_RTC_HCTOSYS=y
715CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
716# CONFIG_RTC_DEBUG is not set
738 717
739# 718#
740# USB support 719# RTC interfaces
741# 720#
742CONFIG_USB_ARCH_HAS_HCD=y 721CONFIG_RTC_INTF_SYSFS=y
743CONFIG_USB_ARCH_HAS_OHCI=y 722CONFIG_RTC_INTF_PROC=y
744# CONFIG_USB_ARCH_HAS_EHCI is not set 723CONFIG_RTC_INTF_DEV=y
745# CONFIG_USB is not set 724# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
725# CONFIG_RTC_DRV_TEST is not set
746 726
747# 727#
748# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 728# I2C RTC drivers
749# 729#
730# CONFIG_RTC_DRV_DS1307 is not set
731# CONFIG_RTC_DRV_DS1374 is not set
732# CONFIG_RTC_DRV_DS1672 is not set
733# CONFIG_RTC_DRV_MAX6900 is not set
734# CONFIG_RTC_DRV_RS5C372 is not set
735# CONFIG_RTC_DRV_ISL1208 is not set
736# CONFIG_RTC_DRV_X1205 is not set
737# CONFIG_RTC_DRV_PCF8563 is not set
738# CONFIG_RTC_DRV_PCF8583 is not set
739# CONFIG_RTC_DRV_M41T80 is not set
750 740
751# 741#
752# USB Gadget Support 742# SPI RTC drivers
753# 743#
754# CONFIG_USB_GADGET is not set 744# CONFIG_RTC_DRV_RS5C348 is not set
745# CONFIG_RTC_DRV_MAX6902 is not set
755 746
756# 747#
757# MMC/SD Card support 748# Platform RTC drivers
758# 749#
759CONFIG_MMC=y 750# CONFIG_RTC_DRV_CMOS is not set
760# CONFIG_MMC_DEBUG is not set 751# CONFIG_RTC_DRV_DS1553 is not set
761CONFIG_MMC_BLOCK=y 752# CONFIG_RTC_DRV_STK17TA8 is not set
762CONFIG_MMC_AT91=y 753# CONFIG_RTC_DRV_DS1742 is not set
754# CONFIG_RTC_DRV_M48T86 is not set
755# CONFIG_RTC_DRV_M48T59 is not set
756# CONFIG_RTC_DRV_V3020 is not set
763 757
764# 758#
765# Real Time Clock 759# on-CPU RTC drivers
766# 760#
767CONFIG_RTC_LIB=y 761CONFIG_RTC_DRV_AT91SAM9=y
768# CONFIG_RTC_CLASS is not set
769 762
770# 763#
771# File systems 764# File systems
@@ -816,7 +809,6 @@ CONFIG_SYSFS=y
816CONFIG_TMPFS=y 809CONFIG_TMPFS=y
817# CONFIG_TMPFS_POSIX_ACL is not set 810# CONFIG_TMPFS_POSIX_ACL is not set
818# CONFIG_HUGETLB_PAGE is not set 811# CONFIG_HUGETLB_PAGE is not set
819CONFIG_RAMFS=y
820# CONFIG_CONFIGFS_FS is not set 812# CONFIG_CONFIGFS_FS is not set
821 813
822# 814#
@@ -836,20 +828,13 @@ CONFIG_CRAMFS=y
836# CONFIG_QNX4FS_FS is not set 828# CONFIG_QNX4FS_FS is not set
837# CONFIG_SYSV_FS is not set 829# CONFIG_SYSV_FS is not set
838# CONFIG_UFS_FS is not set 830# CONFIG_UFS_FS is not set
839 831CONFIG_NETWORK_FILESYSTEMS=y
840#
841# Network File Systems
842#
843 832
844# 833#
845# Partition Types 834# Partition Types
846# 835#
847# CONFIG_PARTITION_ADVANCED is not set 836# CONFIG_PARTITION_ADVANCED is not set
848CONFIG_MSDOS_PARTITION=y 837CONFIG_MSDOS_PARTITION=y
849
850#
851# Native Language Support
852#
853CONFIG_NLS=y 838CONFIG_NLS=y
854CONFIG_NLS_DEFAULT="iso8859-1" 839CONFIG_NLS_DEFAULT="iso8859-1"
855CONFIG_NLS_CODEPAGE_437=y 840CONFIG_NLS_CODEPAGE_437=y
@@ -890,16 +875,15 @@ CONFIG_NLS_ISO8859_15=y
890# CONFIG_NLS_KOI8_R is not set 875# CONFIG_NLS_KOI8_R is not set
891# CONFIG_NLS_KOI8_U is not set 876# CONFIG_NLS_KOI8_U is not set
892CONFIG_NLS_UTF8=y 877CONFIG_NLS_UTF8=y
893 878CONFIG_INSTRUMENTATION=y
894#
895# Profiling support
896#
897# CONFIG_PROFILING is not set 879# CONFIG_PROFILING is not set
880# CONFIG_MARKERS is not set
898 881
899# 882#
900# Kernel hacking 883# Kernel hacking
901# 884#
902# CONFIG_PRINTK_TIME is not set 885# CONFIG_PRINTK_TIME is not set
886CONFIG_ENABLE_WARN_DEPRECATED=y
903CONFIG_ENABLE_MUST_CHECK=y 887CONFIG_ENABLE_MUST_CHECK=y
904# CONFIG_MAGIC_SYSRQ is not set 888# CONFIG_MAGIC_SYSRQ is not set
905# CONFIG_UNUSED_SYMBOLS is not set 889# CONFIG_UNUSED_SYMBOLS is not set
@@ -907,8 +891,8 @@ CONFIG_ENABLE_MUST_CHECK=y
907# CONFIG_HEADERS_CHECK is not set 891# CONFIG_HEADERS_CHECK is not set
908CONFIG_DEBUG_KERNEL=y 892CONFIG_DEBUG_KERNEL=y
909# CONFIG_DEBUG_SHIRQ is not set 893# CONFIG_DEBUG_SHIRQ is not set
910CONFIG_LOG_BUF_SHIFT=14
911CONFIG_DETECT_SOFTLOCKUP=y 894CONFIG_DETECT_SOFTLOCKUP=y
895CONFIG_SCHED_DEBUG=y
912# CONFIG_SCHEDSTATS is not set 896# CONFIG_SCHEDSTATS is not set
913# CONFIG_TIMER_STATS is not set 897# CONFIG_TIMER_STATS is not set
914# CONFIG_DEBUG_SLAB is not set 898# CONFIG_DEBUG_SLAB is not set
@@ -916,6 +900,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
916# CONFIG_RT_MUTEX_TESTER is not set 900# CONFIG_RT_MUTEX_TESTER is not set
917# CONFIG_DEBUG_SPINLOCK is not set 901# CONFIG_DEBUG_SPINLOCK is not set
918# CONFIG_DEBUG_MUTEXES is not set 902# CONFIG_DEBUG_MUTEXES is not set
903# CONFIG_DEBUG_LOCK_ALLOC is not set
904# CONFIG_PROVE_LOCKING is not set
905# CONFIG_LOCK_STAT is not set
919# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 906# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
920# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 907# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
921# CONFIG_DEBUG_KOBJECT is not set 908# CONFIG_DEBUG_KOBJECT is not set
@@ -923,10 +910,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
923CONFIG_DEBUG_INFO=y 910CONFIG_DEBUG_INFO=y
924# CONFIG_DEBUG_VM is not set 911# CONFIG_DEBUG_VM is not set
925# CONFIG_DEBUG_LIST is not set 912# CONFIG_DEBUG_LIST is not set
913# CONFIG_DEBUG_SG is not set
926CONFIG_FRAME_POINTER=y 914CONFIG_FRAME_POINTER=y
927CONFIG_FORCED_INLINING=y 915CONFIG_FORCED_INLINING=y
916# CONFIG_BOOT_PRINTK_DELAY is not set
928# CONFIG_RCU_TORTURE_TEST is not set 917# CONFIG_RCU_TORTURE_TEST is not set
929# CONFIG_FAULT_INJECTION is not set 918# CONFIG_FAULT_INJECTION is not set
919# CONFIG_SAMPLES is not set
930CONFIG_DEBUG_USER=y 920CONFIG_DEBUG_USER=y
931# CONFIG_DEBUG_ERRORS is not set 921# CONFIG_DEBUG_ERRORS is not set
932CONFIG_DEBUG_LL=y 922CONFIG_DEBUG_LL=y
@@ -937,10 +927,7 @@ CONFIG_DEBUG_LL=y
937# 927#
938# CONFIG_KEYS is not set 928# CONFIG_KEYS is not set
939# CONFIG_SECURITY is not set 929# CONFIG_SECURITY is not set
940 930# CONFIG_SECURITY_FILE_CAPABILITIES is not set
941#
942# Cryptographic options
943#
944# CONFIG_CRYPTO is not set 931# CONFIG_CRYPTO is not set
945 932
946# 933#
@@ -949,9 +936,12 @@ CONFIG_DEBUG_LL=y
949CONFIG_BITREVERSE=y 936CONFIG_BITREVERSE=y
950# CONFIG_CRC_CCITT is not set 937# CONFIG_CRC_CCITT is not set
951# CONFIG_CRC16 is not set 938# CONFIG_CRC16 is not set
939# CONFIG_CRC_ITU_T is not set
952CONFIG_CRC32=y 940CONFIG_CRC32=y
941# CONFIG_CRC7 is not set
953# CONFIG_LIBCRC32C is not set 942# CONFIG_LIBCRC32C is not set
954CONFIG_ZLIB_INFLATE=y 943CONFIG_ZLIB_INFLATE=y
955CONFIG_PLIST=y 944CONFIG_PLIST=y
956CONFIG_HAS_IOMEM=y 945CONFIG_HAS_IOMEM=y
957CONFIG_HAS_IOPORT=y 946CONFIG_HAS_IOPORT=y
947CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig
index baa97698c744..d846a492e5ce 100644
--- a/arch/arm/configs/ateb9200_defconfig
+++ b/arch/arm/configs/ateb9200_defconfig
@@ -714,7 +714,7 @@ CONFIG_I2C_ALGOPCA=m
714# 714#
715# I2C Hardware Bus support 715# I2C Hardware Bus support
716# 716#
717CONFIG_I2C_AT91=m 717CONFIG_I2C_GPIO=m
718# CONFIG_I2C_PARPORT_LIGHT is not set 718# CONFIG_I2C_PARPORT_LIGHT is not set
719# CONFIG_I2C_STUB is not set 719# CONFIG_I2C_STUB is not set
720# CONFIG_I2C_PCA_ISA is not set 720# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/cam60_defconfig b/arch/arm/configs/cam60_defconfig
new file mode 100644
index 000000000000..f3cd4a95373a
--- /dev/null
+++ b/arch/arm/configs/cam60_defconfig
@@ -0,0 +1,1228 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24
4# Thu Mar 6 10:07:26 2008
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_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
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35# CONFIG_LOCALVERSION_AUTO is not set
36CONFIG_SWAP=y
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39CONFIG_POSIX_MQUEUE=y
40CONFIG_BSD_PROCESS_ACCT=y
41CONFIG_BSD_PROCESS_ACCT_V3=y
42# CONFIG_TASKSTATS is not set
43# CONFIG_USER_NS is not set
44# CONFIG_PID_NS is not set
45CONFIG_AUDIT=y
46CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=17
49# CONFIG_CGROUPS is not set
50CONFIG_FAIR_GROUP_SCHED=y
51CONFIG_FAIR_USER_SCHED=y
52# CONFIG_FAIR_CGROUP_SCHED is not set
53CONFIG_SYSFS_DEPRECATED=y
54CONFIG_RELAY=y
55CONFIG_BLK_DEV_INITRD=y
56CONFIG_INITRAMFS_SOURCE=""
57# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
58CONFIG_SYSCTL=y
59# CONFIG_EMBEDDED is not set
60CONFIG_UID16=y
61CONFIG_SYSCTL_SYSCALL=y
62CONFIG_KALLSYMS=y
63CONFIG_KALLSYMS_ALL=y
64# CONFIG_KALLSYMS_EXTRA_PASS is not set
65CONFIG_HOTPLUG=y
66CONFIG_PRINTK=y
67CONFIG_BUG=y
68CONFIG_ELF_CORE=y
69CONFIG_BASE_FULL=y
70CONFIG_FUTEX=y
71CONFIG_ANON_INODES=y
72CONFIG_EPOLL=y
73CONFIG_SIGNALFD=y
74CONFIG_EVENTFD=y
75CONFIG_SHMEM=y
76CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLUB_DEBUG=y
78# CONFIG_SLAB is not set
79CONFIG_SLUB=y
80# CONFIG_SLOB is not set
81CONFIG_SLABINFO=y
82CONFIG_RT_MUTEXES=y
83# CONFIG_TINY_SHMEM is not set
84CONFIG_BASE_SMALL=0
85CONFIG_MODULES=y
86CONFIG_MODULE_UNLOAD=y
87# CONFIG_MODULE_FORCE_UNLOAD is not set
88CONFIG_MODVERSIONS=y
89# CONFIG_MODULE_SRCVERSION_ALL is not set
90# CONFIG_KMOD is not set
91CONFIG_BLOCK=y
92CONFIG_LBD=y
93CONFIG_BLK_DEV_IO_TRACE=y
94# CONFIG_LSF is not set
95# CONFIG_BLK_DEV_BSG is not set
96
97#
98# IO Schedulers
99#
100CONFIG_IOSCHED_NOOP=y
101CONFIG_IOSCHED_AS=y
102CONFIG_IOSCHED_DEADLINE=y
103CONFIG_IOSCHED_CFQ=y
104# CONFIG_DEFAULT_AS is not set
105# CONFIG_DEFAULT_DEADLINE is not set
106CONFIG_DEFAULT_CFQ=y
107# CONFIG_DEFAULT_NOOP is not set
108CONFIG_DEFAULT_IOSCHED="cfq"
109
110#
111# System Type
112#
113# CONFIG_ARCH_AAEC2000 is not set
114# CONFIG_ARCH_INTEGRATOR is not set
115# CONFIG_ARCH_REALVIEW is not set
116# CONFIG_ARCH_VERSATILE is not set
117CONFIG_ARCH_AT91=y
118# CONFIG_ARCH_CLPS7500 is not set
119# CONFIG_ARCH_CLPS711X is not set
120# CONFIG_ARCH_CO285 is not set
121# CONFIG_ARCH_EBSA110 is not set
122# CONFIG_ARCH_EP93XX is not set
123# CONFIG_ARCH_FOOTBRIDGE is not set
124# CONFIG_ARCH_NETX is not set
125# CONFIG_ARCH_H720X is not set
126# CONFIG_ARCH_IMX is not set
127# CONFIG_ARCH_IOP13XX is not set
128# CONFIG_ARCH_IOP32X is not set
129# CONFIG_ARCH_IOP33X is not set
130# CONFIG_ARCH_IXP23XX is not set
131# CONFIG_ARCH_IXP2000 is not set
132# CONFIG_ARCH_IXP4XX is not set
133# CONFIG_ARCH_L7200 is not set
134# CONFIG_ARCH_KS8695 is not set
135# CONFIG_ARCH_NS9XXX is not set
136# CONFIG_ARCH_MXC is not set
137# CONFIG_ARCH_PNX4008 is not set
138# CONFIG_ARCH_PXA is not set
139# CONFIG_ARCH_RPC is not set
140# CONFIG_ARCH_SA1100 is not set
141# CONFIG_ARCH_S3C2410 is not set
142# CONFIG_ARCH_SHARK is not set
143# CONFIG_ARCH_LH7A40X is not set
144# CONFIG_ARCH_DAVINCI is not set
145# CONFIG_ARCH_OMAP is not set
146
147#
148# Boot options
149#
150
151#
152# Power management
153#
154
155#
156# Atmel AT91 System-on-Chip
157#
158# CONFIG_ARCH_AT91RM9200 is not set
159CONFIG_ARCH_AT91SAM9260=y
160# CONFIG_ARCH_AT91SAM9261 is not set
161# CONFIG_ARCH_AT91SAM9263 is not set
162# CONFIG_ARCH_AT91SAM9RL is not set
163# CONFIG_ARCH_AT91CAP9 is not set
164# CONFIG_ARCH_AT91X40 is not set
165CONFIG_AT91_PMC_UNIT=y
166
167#
168# AT91SAM9260 Variants
169#
170# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
171
172#
173# AT91SAM9260 / AT91SAM9XE Board Type
174#
175# CONFIG_MACH_AT91SAM9260EK is not set
176CONFIG_MACH_CAM60=y
177# CONFIG_MACH_SAM9_L9260 is not set
178
179#
180# AT91 Board Options
181#
182
183#
184# AT91 Feature Selections
185#
186# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
187CONFIG_AT91_TIMER_HZ=100
188CONFIG_AT91_EARLY_DBGU=y
189# CONFIG_AT91_EARLY_USART0 is not set
190# CONFIG_AT91_EARLY_USART1 is not set
191# CONFIG_AT91_EARLY_USART2 is not set
192# CONFIG_AT91_EARLY_USART3 is not set
193# CONFIG_AT91_EARLY_USART4 is not set
194# CONFIG_AT91_EARLY_USART5 is not set
195
196#
197# Processor Type
198#
199CONFIG_CPU_32=y
200CONFIG_CPU_ARM926T=y
201CONFIG_CPU_32v5=y
202CONFIG_CPU_ABRT_EV5TJ=y
203CONFIG_CPU_CACHE_VIVT=y
204CONFIG_CPU_COPY_V4WB=y
205CONFIG_CPU_TLB_V4WBI=y
206CONFIG_CPU_CP15=y
207CONFIG_CPU_CP15_MMU=y
208
209#
210# Processor Features
211#
212CONFIG_ARM_THUMB=y
213# CONFIG_CPU_ICACHE_DISABLE is not set
214# CONFIG_CPU_DCACHE_DISABLE is not set
215# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
216# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
217# CONFIG_OUTER_CACHE is not set
218
219#
220# Bus support
221#
222# CONFIG_PCI_SYSCALL is not set
223# CONFIG_ARCH_SUPPORTS_MSI is not set
224# CONFIG_PCCARD is not set
225
226#
227# Kernel Features
228#
229# CONFIG_TICK_ONESHOT is not set
230# CONFIG_NO_HZ is not set
231# CONFIG_HIGH_RES_TIMERS is not set
232CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
233# CONFIG_PREEMPT is not set
234CONFIG_HZ=100
235# CONFIG_AEABI is not set
236# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
237CONFIG_SELECT_MEMORY_MODEL=y
238CONFIG_FLATMEM_MANUAL=y
239# CONFIG_DISCONTIGMEM_MANUAL is not set
240# CONFIG_SPARSEMEM_MANUAL is not set
241CONFIG_FLATMEM=y
242CONFIG_FLAT_NODE_MEM_MAP=y
243# CONFIG_SPARSEMEM_STATIC is not set
244# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
245CONFIG_SPLIT_PTLOCK_CPUS=4096
246# CONFIG_RESOURCES_64BIT is not set
247CONFIG_ZONE_DMA_FLAG=1
248CONFIG_BOUNCE=y
249CONFIG_VIRT_TO_BUS=y
250# CONFIG_LEDS is not set
251CONFIG_ALIGNMENT_TRAP=y
252
253#
254# Boot options
255#
256CONFIG_ZBOOT_ROM_TEXT=0
257CONFIG_ZBOOT_ROM_BSS=0x20004000
258# CONFIG_ZBOOT_ROM is not set
259CONFIG_CMDLINE="console=ttyS0,115200 noinitrd root=/dev/mtdblock0 rootfstype=jffs2 mem=64M"
260# CONFIG_XIP_KERNEL is not set
261# CONFIG_KEXEC is not set
262
263#
264# Floating point emulation
265#
266
267#
268# At least one emulation must be selected
269#
270CONFIG_FPE_NWFPE=y
271# CONFIG_FPE_NWFPE_XP is not set
272# CONFIG_FPE_FASTFPE is not set
273# CONFIG_VFP is not set
274
275#
276# Userspace binary formats
277#
278CONFIG_BINFMT_ELF=y
279CONFIG_BINFMT_AOUT=y
280CONFIG_BINFMT_MISC=y
281# CONFIG_ARTHUR is not set
282
283#
284# Power management options
285#
286# CONFIG_PM is not set
287CONFIG_SUSPEND_UP_POSSIBLE=y
288
289#
290# Networking
291#
292CONFIG_NET=y
293
294#
295# Networking options
296#
297CONFIG_PACKET=y
298# CONFIG_PACKET_MMAP is not set
299CONFIG_UNIX=y
300# CONFIG_NET_KEY is not set
301CONFIG_INET=y
302CONFIG_IP_MULTICAST=y
303# CONFIG_IP_ADVANCED_ROUTER is not set
304CONFIG_IP_FIB_HASH=y
305CONFIG_IP_PNP=y
306CONFIG_IP_PNP_DHCP=y
307# CONFIG_IP_PNP_BOOTP is not set
308# CONFIG_IP_PNP_RARP is not set
309# CONFIG_NET_IPIP is not set
310# CONFIG_NET_IPGRE is not set
311# CONFIG_IP_MROUTE is not set
312# CONFIG_ARPD is not set
313# CONFIG_SYN_COOKIES is not set
314# CONFIG_INET_AH is not set
315# CONFIG_INET_ESP is not set
316# CONFIG_INET_IPCOMP is not set
317# CONFIG_INET_XFRM_TUNNEL is not set
318# CONFIG_INET_TUNNEL is not set
319# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
320# CONFIG_INET_XFRM_MODE_TUNNEL is not set
321# CONFIG_INET_XFRM_MODE_BEET is not set
322# CONFIG_INET_LRO is not set
323# CONFIG_INET_DIAG is not set
324# CONFIG_TCP_CONG_ADVANCED is not set
325CONFIG_TCP_CONG_CUBIC=y
326CONFIG_DEFAULT_TCP_CONG="cubic"
327# CONFIG_TCP_MD5SIG is not set
328# CONFIG_IPV6 is not set
329# CONFIG_INET6_XFRM_TUNNEL is not set
330# CONFIG_INET6_TUNNEL is not set
331CONFIG_NETWORK_SECMARK=y
332# CONFIG_NETFILTER is not set
333# CONFIG_IP_DCCP is not set
334# CONFIG_IP_SCTP is not set
335# CONFIG_TIPC is not set
336# CONFIG_ATM is not set
337# CONFIG_BRIDGE is not set
338# CONFIG_VLAN_8021Q is not set
339# CONFIG_DECNET is not set
340# CONFIG_LLC2 is not set
341# CONFIG_IPX is not set
342# CONFIG_ATALK is not set
343# CONFIG_X25 is not set
344# CONFIG_LAPB is not set
345# CONFIG_ECONET is not set
346# CONFIG_WAN_ROUTER is not set
347# CONFIG_NET_SCHED is not set
348CONFIG_NET_SCH_FIFO=y
349
350#
351# Network testing
352#
353# CONFIG_NET_PKTGEN is not set
354# CONFIG_HAMRADIO is not set
355# CONFIG_IRDA is not set
356# CONFIG_BT is not set
357# CONFIG_AF_RXRPC is not set
358
359#
360# Wireless
361#
362CONFIG_CFG80211=m
363CONFIG_NL80211=y
364CONFIG_WIRELESS_EXT=y
365CONFIG_MAC80211=m
366CONFIG_MAC80211_RCSIMPLE=y
367# CONFIG_MAC80211_DEBUGFS is not set
368# CONFIG_MAC80211_DEBUG is not set
369CONFIG_IEEE80211=m
370# CONFIG_IEEE80211_DEBUG is not set
371CONFIG_IEEE80211_CRYPT_WEP=m
372CONFIG_IEEE80211_CRYPT_CCMP=m
373CONFIG_IEEE80211_CRYPT_TKIP=m
374CONFIG_IEEE80211_SOFTMAC=m
375# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
376# CONFIG_RFKILL is not set
377# CONFIG_NET_9P is not set
378
379#
380# Device Drivers
381#
382
383#
384# Generic Driver Options
385#
386CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
387CONFIG_STANDALONE=y
388CONFIG_PREVENT_FIRMWARE_BUILD=y
389# CONFIG_FW_LOADER is not set
390# CONFIG_DEBUG_DRIVER is not set
391# CONFIG_DEBUG_DEVRES is not set
392# CONFIG_SYS_HYPERVISOR is not set
393# CONFIG_CONNECTOR is not set
394CONFIG_MTD=y
395# CONFIG_MTD_DEBUG is not set
396CONFIG_MTD_CONCAT=y
397CONFIG_MTD_PARTITIONS=y
398# CONFIG_MTD_REDBOOT_PARTS is not set
399CONFIG_MTD_CMDLINE_PARTS=y
400# CONFIG_MTD_AFS_PARTS is not set
401
402#
403# User Modules And Translation Layers
404#
405CONFIG_MTD_CHAR=y
406CONFIG_MTD_BLKDEVS=y
407CONFIG_MTD_BLOCK=y
408# CONFIG_FTL is not set
409# CONFIG_NFTL is not set
410# CONFIG_INFTL is not set
411# CONFIG_RFD_FTL is not set
412# CONFIG_SSFDC is not set
413# CONFIG_MTD_OOPS is not set
414
415#
416# RAM/ROM/Flash chip drivers
417#
418CONFIG_MTD_CFI=y
419# CONFIG_MTD_JEDECPROBE is not set
420CONFIG_MTD_GEN_PROBE=y
421# CONFIG_MTD_CFI_ADV_OPTIONS is not set
422CONFIG_MTD_MAP_BANK_WIDTH_1=y
423CONFIG_MTD_MAP_BANK_WIDTH_2=y
424CONFIG_MTD_MAP_BANK_WIDTH_4=y
425# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
426# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
427# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
428CONFIG_MTD_CFI_I1=y
429CONFIG_MTD_CFI_I2=y
430# CONFIG_MTD_CFI_I4 is not set
431# CONFIG_MTD_CFI_I8 is not set
432# CONFIG_MTD_CFI_INTELEXT is not set
433# CONFIG_MTD_CFI_AMDSTD is not set
434# CONFIG_MTD_CFI_STAA is not set
435CONFIG_MTD_RAM=m
436# CONFIG_MTD_ROM is not set
437# CONFIG_MTD_ABSENT is not set
438
439#
440# Mapping drivers for chip access
441#
442CONFIG_MTD_COMPLEX_MAPPINGS=y
443# CONFIG_MTD_PHYSMAP is not set
444# CONFIG_MTD_ARM_INTEGRATOR is not set
445CONFIG_MTD_PLATRAM=m
446
447#
448# Self-contained MTD device drivers
449#
450CONFIG_MTD_DATAFLASH=y
451# CONFIG_MTD_M25P80 is not set
452# CONFIG_MTD_SLRAM is not set
453# CONFIG_MTD_PHRAM is not set
454# CONFIG_MTD_MTDRAM is not set
455# CONFIG_MTD_BLOCK2MTD is not set
456
457#
458# Disk-On-Chip Device Drivers
459#
460# CONFIG_MTD_DOC2000 is not set
461# CONFIG_MTD_DOC2001 is not set
462# CONFIG_MTD_DOC2001PLUS is not set
463CONFIG_MTD_NAND=y
464CONFIG_MTD_NAND_VERIFY_WRITE=y
465# CONFIG_MTD_NAND_ECC_SMC is not set
466# CONFIG_MTD_NAND_MUSEUM_IDS is not set
467CONFIG_MTD_NAND_IDS=y
468# CONFIG_MTD_NAND_DISKONCHIP is not set
469CONFIG_MTD_NAND_AT91=y
470# CONFIG_MTD_NAND_AT91_ECC_SOFT is not set
471CONFIG_MTD_NAND_AT91_ECC_HW=y
472# CONFIG_MTD_NAND_AT91_ECC_NONE is not set
473# CONFIG_MTD_NAND_NANDSIM is not set
474# CONFIG_MTD_NAND_PLATFORM is not set
475# CONFIG_MTD_ALAUDA is not set
476# CONFIG_MTD_ONENAND is not set
477
478#
479# UBI - Unsorted block images
480#
481# CONFIG_MTD_UBI is not set
482# CONFIG_PARPORT is not set
483CONFIG_BLK_DEV=y
484# CONFIG_BLK_DEV_COW_COMMON is not set
485CONFIG_BLK_DEV_LOOP=y
486# CONFIG_BLK_DEV_CRYPTOLOOP is not set
487# CONFIG_BLK_DEV_NBD is not set
488# CONFIG_BLK_DEV_UB is not set
489CONFIG_BLK_DEV_RAM=y
490CONFIG_BLK_DEV_RAM_COUNT=16
491CONFIG_BLK_DEV_RAM_SIZE=4096
492CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
493# CONFIG_CDROM_PKTCDVD is not set
494# CONFIG_ATA_OVER_ETH is not set
495# CONFIG_MISC_DEVICES is not set
496
497#
498# SCSI device support
499#
500# CONFIG_RAID_ATTRS is not set
501CONFIG_SCSI=y
502CONFIG_SCSI_DMA=y
503CONFIG_SCSI_TGT=y
504CONFIG_SCSI_NETLINK=y
505CONFIG_SCSI_PROC_FS=y
506
507#
508# SCSI support type (disk, tape, CD-ROM)
509#
510CONFIG_BLK_DEV_SD=y
511# CONFIG_CHR_DEV_ST is not set
512# CONFIG_CHR_DEV_OSST is not set
513# CONFIG_BLK_DEV_SR is not set
514CONFIG_CHR_DEV_SG=y
515CONFIG_CHR_DEV_SCH=y
516
517#
518# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
519#
520CONFIG_SCSI_MULTI_LUN=y
521# CONFIG_SCSI_CONSTANTS is not set
522CONFIG_SCSI_LOGGING=y
523CONFIG_SCSI_SCAN_ASYNC=y
524CONFIG_SCSI_WAIT_SCAN=m
525
526#
527# SCSI Transports
528#
529CONFIG_SCSI_SPI_ATTRS=m
530CONFIG_SCSI_FC_ATTRS=m
531# CONFIG_SCSI_FC_TGT_ATTRS is not set
532CONFIG_SCSI_ISCSI_ATTRS=m
533CONFIG_SCSI_SAS_ATTRS=m
534CONFIG_SCSI_SAS_LIBSAS=m
535# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
536# CONFIG_SCSI_SRP_ATTRS is not set
537# CONFIG_SCSI_LOWLEVEL is not set
538# CONFIG_ATA is not set
539# CONFIG_MD is not set
540CONFIG_NETDEVICES=y
541# CONFIG_NETDEVICES_MULTIQUEUE is not set
542# CONFIG_DUMMY is not set
543# CONFIG_BONDING is not set
544# CONFIG_MACVLAN is not set
545# CONFIG_EQUALIZER is not set
546# CONFIG_TUN is not set
547# CONFIG_VETH is not set
548CONFIG_PHYLIB=y
549
550#
551# MII PHY device drivers
552#
553CONFIG_MARVELL_PHY=m
554CONFIG_DAVICOM_PHY=m
555CONFIG_QSEMI_PHY=m
556CONFIG_LXT_PHY=m
557CONFIG_CICADA_PHY=m
558CONFIG_VITESSE_PHY=m
559CONFIG_SMSC_PHY=m
560CONFIG_BROADCOM_PHY=m
561# CONFIG_ICPLUS_PHY is not set
562CONFIG_FIXED_PHY=m
563# CONFIG_FIXED_MII_10_FDX is not set
564# CONFIG_FIXED_MII_100_FDX is not set
565# CONFIG_FIXED_MII_1000_FDX is not set
566CONFIG_FIXED_MII_AMNT=1
567# CONFIG_MDIO_BITBANG is not set
568CONFIG_NET_ETHERNET=y
569CONFIG_MII=y
570CONFIG_MACB=y
571# CONFIG_AX88796 is not set
572# CONFIG_SMC91X is not set
573# CONFIG_DM9000 is not set
574# CONFIG_IBM_NEW_EMAC_ZMII is not set
575# CONFIG_IBM_NEW_EMAC_RGMII is not set
576# CONFIG_IBM_NEW_EMAC_TAH is not set
577# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
578# CONFIG_B44 is not set
579# CONFIG_NETDEV_1000 is not set
580# CONFIG_NETDEV_10000 is not set
581
582#
583# Wireless LAN
584#
585# CONFIG_WLAN_PRE80211 is not set
586# CONFIG_WLAN_80211 is not set
587
588#
589# USB Network Adapters
590#
591# CONFIG_USB_CATC is not set
592# CONFIG_USB_KAWETH is not set
593# CONFIG_USB_PEGASUS is not set
594# CONFIG_USB_RTL8150 is not set
595# CONFIG_USB_USBNET is not set
596# CONFIG_WAN is not set
597# CONFIG_PPP is not set
598# CONFIG_SLIP is not set
599# CONFIG_SHAPER is not set
600# CONFIG_NETCONSOLE is not set
601# CONFIG_NETPOLL is not set
602# CONFIG_NET_POLL_CONTROLLER is not set
603# CONFIG_ISDN is not set
604
605#
606# Input device support
607#
608CONFIG_INPUT=y
609# CONFIG_INPUT_FF_MEMLESS is not set
610# CONFIG_INPUT_POLLDEV is not set
611
612#
613# Userland interfaces
614#
615CONFIG_INPUT_MOUSEDEV=y
616CONFIG_INPUT_MOUSEDEV_PSAUX=y
617CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
618CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
619# CONFIG_INPUT_JOYDEV is not set
620CONFIG_INPUT_EVDEV=y
621# CONFIG_INPUT_EVBUG is not set
622
623#
624# Input Device Drivers
625#
626CONFIG_INPUT_KEYBOARD=y
627CONFIG_KEYBOARD_ATKBD=y
628CONFIG_KEYBOARD_SUNKBD=m
629CONFIG_KEYBOARD_LKKBD=m
630CONFIG_KEYBOARD_XTKBD=m
631CONFIG_KEYBOARD_NEWTON=m
632CONFIG_KEYBOARD_STOWAWAY=m
633# CONFIG_KEYBOARD_GPIO is not set
634CONFIG_INPUT_MOUSE=y
635CONFIG_MOUSE_PS2=y
636CONFIG_MOUSE_PS2_ALPS=y
637CONFIG_MOUSE_PS2_LOGIPS2PP=y
638CONFIG_MOUSE_PS2_SYNAPTICS=y
639CONFIG_MOUSE_PS2_LIFEBOOK=y
640CONFIG_MOUSE_PS2_TRACKPOINT=y
641# CONFIG_MOUSE_PS2_TOUCHKIT is not set
642CONFIG_MOUSE_SERIAL=m
643CONFIG_MOUSE_APPLETOUCH=m
644CONFIG_MOUSE_VSXXXAA=m
645# CONFIG_MOUSE_GPIO is not set
646# CONFIG_INPUT_JOYSTICK is not set
647# CONFIG_INPUT_TABLET is not set
648# CONFIG_INPUT_TOUCHSCREEN is not set
649# CONFIG_INPUT_MISC is not set
650
651#
652# Hardware I/O ports
653#
654CONFIG_SERIO=y
655# CONFIG_SERIO_SERPORT is not set
656CONFIG_SERIO_LIBPS2=y
657# CONFIG_SERIO_RAW is not set
658# CONFIG_GAMEPORT is not set
659
660#
661# Character devices
662#
663CONFIG_VT=y
664CONFIG_VT_CONSOLE=y
665CONFIG_HW_CONSOLE=y
666CONFIG_VT_HW_CONSOLE_BINDING=y
667CONFIG_SERIAL_NONSTANDARD=y
668# CONFIG_MOXA_SMARTIO is not set
669# CONFIG_N_HDLC is not set
670# CONFIG_RISCOM8 is not set
671# CONFIG_SPECIALIX is not set
672# CONFIG_RIO is not set
673# CONFIG_STALDRV is not set
674
675#
676# Serial drivers
677#
678# CONFIG_SERIAL_8250 is not set
679
680#
681# Non-8250 serial port support
682#
683CONFIG_SERIAL_ATMEL=y
684CONFIG_SERIAL_ATMEL_CONSOLE=y
685# CONFIG_SERIAL_ATMEL_TTYAT is not set
686CONFIG_SERIAL_CORE=y
687CONFIG_SERIAL_CORE_CONSOLE=y
688CONFIG_UNIX98_PTYS=y
689# CONFIG_LEGACY_PTYS is not set
690# CONFIG_IPMI_HANDLER is not set
691CONFIG_HW_RANDOM=y
692# CONFIG_NVRAM is not set
693# CONFIG_R3964 is not set
694# CONFIG_RAW_DRIVER is not set
695# CONFIG_TCG_TPM is not set
696CONFIG_I2C=y
697CONFIG_I2C_BOARDINFO=y
698CONFIG_I2C_CHARDEV=y
699
700#
701# I2C Algorithms
702#
703CONFIG_I2C_ALGOBIT=y
704# CONFIG_I2C_ALGOPCF is not set
705# CONFIG_I2C_ALGOPCA is not set
706
707#
708# I2C Hardware Bus support
709#
710# CONFIG_I2C_GPIO is not set
711# CONFIG_I2C_OCORES is not set
712# CONFIG_I2C_PARPORT_LIGHT is not set
713# CONFIG_I2C_SIMTEC is not set
714# CONFIG_I2C_TAOS_EVM is not set
715# CONFIG_I2C_STUB is not set
716# CONFIG_I2C_TINY_USB is not set
717# CONFIG_I2C_PCA is not set
718
719#
720# Miscellaneous I2C Chip support
721#
722# CONFIG_SENSORS_DS1337 is not set
723# CONFIG_SENSORS_DS1374 is not set
724# CONFIG_DS1682 is not set
725# CONFIG_SENSORS_EEPROM is not set
726# CONFIG_SENSORS_PCF8574 is not set
727# CONFIG_SENSORS_PCA9539 is not set
728# CONFIG_SENSORS_PCF8591 is not set
729# CONFIG_SENSORS_MAX6875 is not set
730# CONFIG_SENSORS_TSL2550 is not set
731# CONFIG_I2C_DEBUG_CORE is not set
732# CONFIG_I2C_DEBUG_ALGO is not set
733# CONFIG_I2C_DEBUG_BUS is not set
734# CONFIG_I2C_DEBUG_CHIP is not set
735
736#
737# SPI support
738#
739CONFIG_SPI=y
740# CONFIG_SPI_DEBUG is not set
741CONFIG_SPI_MASTER=y
742
743#
744# SPI Master Controller Drivers
745#
746CONFIG_SPI_ATMEL=y
747# CONFIG_SPI_BITBANG is not set
748
749#
750# SPI Protocol Masters
751#
752# CONFIG_SPI_AT25 is not set
753# CONFIG_SPI_SPIDEV is not set
754# CONFIG_SPI_TLE62X0 is not set
755# CONFIG_W1 is not set
756# CONFIG_POWER_SUPPLY is not set
757# CONFIG_HWMON is not set
758# CONFIG_WATCHDOG is not set
759
760#
761# Sonics Silicon Backplane
762#
763CONFIG_SSB_POSSIBLE=y
764# CONFIG_SSB is not set
765
766#
767# Multifunction device drivers
768#
769# CONFIG_MFD_SM501 is not set
770
771#
772# Multimedia devices
773#
774# CONFIG_VIDEO_DEV is not set
775# CONFIG_DVB_CORE is not set
776# CONFIG_DAB is not set
777
778#
779# Graphics support
780#
781# CONFIG_VGASTATE is not set
782# CONFIG_VIDEO_OUTPUT_CONTROL is not set
783# CONFIG_FB is not set
784# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
785
786#
787# Display device support
788#
789# CONFIG_DISPLAY_SUPPORT is not set
790
791#
792# Console display driver support
793#
794# CONFIG_VGA_CONSOLE is not set
795CONFIG_DUMMY_CONSOLE=y
796
797#
798# Sound
799#
800# CONFIG_SOUND is not set
801# CONFIG_HID_SUPPORT is not set
802CONFIG_USB_SUPPORT=y
803CONFIG_USB_ARCH_HAS_HCD=y
804CONFIG_USB_ARCH_HAS_OHCI=y
805# CONFIG_USB_ARCH_HAS_EHCI is not set
806CONFIG_USB=y
807# CONFIG_USB_DEBUG is not set
808
809#
810# Miscellaneous USB options
811#
812CONFIG_USB_DEVICEFS=y
813CONFIG_USB_DEVICE_CLASS=y
814# CONFIG_USB_DYNAMIC_MINORS is not set
815# CONFIG_USB_OTG is not set
816
817#
818# USB Host Controller Drivers
819#
820# CONFIG_USB_ISP116X_HCD is not set
821CONFIG_USB_OHCI_HCD=y
822# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
823# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
824CONFIG_USB_OHCI_LITTLE_ENDIAN=y
825# CONFIG_USB_SL811_HCD is not set
826# CONFIG_USB_R8A66597_HCD is not set
827
828#
829# USB Device Class drivers
830#
831# CONFIG_USB_ACM is not set
832# CONFIG_USB_PRINTER is not set
833
834#
835# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
836#
837
838#
839# may also be needed; see USB_STORAGE Help for more information
840#
841CONFIG_USB_STORAGE=y
842# CONFIG_USB_STORAGE_DEBUG is not set
843# CONFIG_USB_STORAGE_DATAFAB is not set
844# CONFIG_USB_STORAGE_FREECOM is not set
845# CONFIG_USB_STORAGE_ISD200 is not set
846# CONFIG_USB_STORAGE_DPCM is not set
847# CONFIG_USB_STORAGE_USBAT is not set
848# CONFIG_USB_STORAGE_SDDR09 is not set
849# CONFIG_USB_STORAGE_SDDR55 is not set
850# CONFIG_USB_STORAGE_JUMPSHOT is not set
851# CONFIG_USB_STORAGE_ALAUDA is not set
852# CONFIG_USB_STORAGE_ONETOUCH is not set
853# CONFIG_USB_STORAGE_KARMA is not set
854CONFIG_USB_LIBUSUAL=y
855
856#
857# USB Imaging devices
858#
859# CONFIG_USB_MDC800 is not set
860# CONFIG_USB_MICROTEK is not set
861# CONFIG_USB_MON is not set
862
863#
864# USB port drivers
865#
866
867#
868# USB Serial Converter support
869#
870# CONFIG_USB_SERIAL is not set
871
872#
873# USB Miscellaneous drivers
874#
875# CONFIG_USB_EMI62 is not set
876# CONFIG_USB_EMI26 is not set
877# CONFIG_USB_ADUTUX is not set
878# CONFIG_USB_AUERSWALD is not set
879# CONFIG_USB_RIO500 is not set
880# CONFIG_USB_LEGOTOWER is not set
881# CONFIG_USB_LCD is not set
882# CONFIG_USB_BERRY_CHARGE is not set
883# CONFIG_USB_LED is not set
884# CONFIG_USB_CYPRESS_CY7C63 is not set
885# CONFIG_USB_CYTHERM is not set
886# CONFIG_USB_PHIDGET is not set
887# CONFIG_USB_IDMOUSE is not set
888# CONFIG_USB_FTDI_ELAN is not set
889# CONFIG_USB_APPLEDISPLAY is not set
890# CONFIG_USB_LD is not set
891# CONFIG_USB_TRANCEVIBRATOR is not set
892# CONFIG_USB_IOWARRIOR is not set
893# CONFIG_USB_TEST is not set
894
895#
896# USB DSL modem support
897#
898
899#
900# USB Gadget Support
901#
902# CONFIG_USB_GADGET is not set
903# CONFIG_MMC is not set
904# CONFIG_NEW_LEDS is not set
905CONFIG_RTC_LIB=y
906CONFIG_RTC_CLASS=y
907CONFIG_RTC_HCTOSYS=y
908CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
909# CONFIG_RTC_DEBUG is not set
910
911#
912# RTC interfaces
913#
914CONFIG_RTC_INTF_SYSFS=y
915CONFIG_RTC_INTF_PROC=y
916CONFIG_RTC_INTF_DEV=y
917CONFIG_RTC_INTF_DEV_UIE_EMUL=y
918CONFIG_RTC_DRV_TEST=m
919
920#
921# I2C RTC drivers
922#
923# CONFIG_RTC_DRV_DS1307 is not set
924# CONFIG_RTC_DRV_DS1374 is not set
925# CONFIG_RTC_DRV_DS1672 is not set
926# CONFIG_RTC_DRV_MAX6900 is not set
927# CONFIG_RTC_DRV_RS5C372 is not set
928# CONFIG_RTC_DRV_ISL1208 is not set
929# CONFIG_RTC_DRV_X1205 is not set
930# CONFIG_RTC_DRV_PCF8563 is not set
931# CONFIG_RTC_DRV_PCF8583 is not set
932# CONFIG_RTC_DRV_M41T80 is not set
933
934#
935# SPI RTC drivers
936#
937# CONFIG_RTC_DRV_RS5C348 is not set
938# CONFIG_RTC_DRV_MAX6902 is not set
939
940#
941# Platform RTC drivers
942#
943# CONFIG_RTC_DRV_CMOS is not set
944# CONFIG_RTC_DRV_DS1553 is not set
945# CONFIG_RTC_DRV_STK17TA8 is not set
946# CONFIG_RTC_DRV_DS1742 is not set
947# CONFIG_RTC_DRV_M48T86 is not set
948# CONFIG_RTC_DRV_M48T59 is not set
949# CONFIG_RTC_DRV_V3020 is not set
950
951#
952# on-CPU RTC drivers
953#
954CONFIG_RTC_DRV_AT91SAM9=y
955CONFIG_RTC_DRV_AT91SAM9_RTT=0
956CONFIG_RTC_DRV_AT91SAM9_GPBR=0
957
958#
959# File systems
960#
961CONFIG_EXT2_FS=y
962CONFIG_EXT2_FS_XATTR=y
963CONFIG_EXT2_FS_POSIX_ACL=y
964# CONFIG_EXT2_FS_SECURITY is not set
965# CONFIG_EXT2_FS_XIP is not set
966CONFIG_EXT3_FS=y
967CONFIG_EXT3_FS_XATTR=y
968# CONFIG_EXT3_FS_POSIX_ACL is not set
969# CONFIG_EXT3_FS_SECURITY is not set
970# CONFIG_EXT4DEV_FS is not set
971CONFIG_JBD=y
972# CONFIG_JBD_DEBUG is not set
973CONFIG_FS_MBCACHE=y
974# CONFIG_REISERFS_FS is not set
975# CONFIG_JFS_FS is not set
976CONFIG_FS_POSIX_ACL=y
977# CONFIG_XFS_FS is not set
978# CONFIG_GFS2_FS is not set
979# CONFIG_OCFS2_FS is not set
980# CONFIG_MINIX_FS is not set
981# CONFIG_ROMFS_FS is not set
982CONFIG_INOTIFY=y
983CONFIG_INOTIFY_USER=y
984CONFIG_QUOTA=y
985# CONFIG_QUOTA_NETLINK_INTERFACE is not set
986CONFIG_PRINT_QUOTA_WARNING=y
987# CONFIG_QFMT_V1 is not set
988# CONFIG_QFMT_V2 is not set
989CONFIG_QUOTACTL=y
990CONFIG_DNOTIFY=y
991CONFIG_AUTOFS_FS=y
992CONFIG_AUTOFS4_FS=y
993# CONFIG_FUSE_FS is not set
994
995#
996# CD-ROM/DVD Filesystems
997#
998# CONFIG_ISO9660_FS is not set
999# CONFIG_UDF_FS is not set
1000
1001#
1002# DOS/FAT/NT Filesystems
1003#
1004CONFIG_FAT_FS=y
1005CONFIG_MSDOS_FS=y
1006CONFIG_VFAT_FS=y
1007CONFIG_FAT_DEFAULT_CODEPAGE=437
1008CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1009# CONFIG_NTFS_FS is not set
1010
1011#
1012# Pseudo filesystems
1013#
1014CONFIG_PROC_FS=y
1015CONFIG_PROC_SYSCTL=y
1016CONFIG_SYSFS=y
1017CONFIG_TMPFS=y
1018# CONFIG_TMPFS_POSIX_ACL is not set
1019# CONFIG_HUGETLB_PAGE is not set
1020CONFIG_CONFIGFS_FS=y
1021
1022#
1023# Miscellaneous filesystems
1024#
1025# CONFIG_ADFS_FS is not set
1026# CONFIG_AFFS_FS is not set
1027# CONFIG_HFS_FS is not set
1028# CONFIG_HFSPLUS_FS is not set
1029# CONFIG_BEFS_FS is not set
1030# CONFIG_BFS_FS is not set
1031# CONFIG_EFS_FS is not set
1032CONFIG_YAFFS_FS=y
1033CONFIG_YAFFS_YAFFS1=y
1034# CONFIG_YAFFS_9BYTE_TAGS is not set
1035# CONFIG_YAFFS_DOES_ECC is not set
1036CONFIG_YAFFS_YAFFS2=y
1037CONFIG_YAFFS_AUTO_YAFFS2=y
1038# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
1039# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1040# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1041CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1042# CONFIG_JFFS2_FS is not set
1043# CONFIG_CRAMFS is not set
1044# CONFIG_VXFS_FS is not set
1045# CONFIG_HPFS_FS is not set
1046# CONFIG_QNX4FS_FS is not set
1047# CONFIG_SYSV_FS is not set
1048# CONFIG_UFS_FS is not set
1049CONFIG_NETWORK_FILESYSTEMS=y
1050CONFIG_NFS_FS=y
1051CONFIG_NFS_V3=y
1052# CONFIG_NFS_V3_ACL is not set
1053# CONFIG_NFS_V4 is not set
1054# CONFIG_NFS_DIRECTIO is not set
1055# CONFIG_NFSD is not set
1056CONFIG_ROOT_NFS=y
1057CONFIG_LOCKD=y
1058CONFIG_LOCKD_V4=y
1059CONFIG_NFS_COMMON=y
1060CONFIG_SUNRPC=y
1061# CONFIG_SUNRPC_BIND34 is not set
1062# CONFIG_RPCSEC_GSS_KRB5 is not set
1063# CONFIG_RPCSEC_GSS_SPKM3 is not set
1064# CONFIG_SMB_FS is not set
1065# CONFIG_CIFS is not set
1066# CONFIG_NCP_FS is not set
1067# CONFIG_CODA_FS is not set
1068# CONFIG_AFS_FS is not set
1069
1070#
1071# Partition Types
1072#
1073# CONFIG_PARTITION_ADVANCED is not set
1074CONFIG_MSDOS_PARTITION=y
1075CONFIG_NLS=y
1076CONFIG_NLS_DEFAULT="cp437"
1077CONFIG_NLS_CODEPAGE_437=y
1078# CONFIG_NLS_CODEPAGE_737 is not set
1079# CONFIG_NLS_CODEPAGE_775 is not set
1080# CONFIG_NLS_CODEPAGE_850 is not set
1081# CONFIG_NLS_CODEPAGE_852 is not set
1082# CONFIG_NLS_CODEPAGE_855 is not set
1083# CONFIG_NLS_CODEPAGE_857 is not set
1084# CONFIG_NLS_CODEPAGE_860 is not set
1085# CONFIG_NLS_CODEPAGE_861 is not set
1086# CONFIG_NLS_CODEPAGE_862 is not set
1087# CONFIG_NLS_CODEPAGE_863 is not set
1088# CONFIG_NLS_CODEPAGE_864 is not set
1089# CONFIG_NLS_CODEPAGE_865 is not set
1090# CONFIG_NLS_CODEPAGE_866 is not set
1091# CONFIG_NLS_CODEPAGE_869 is not set
1092# CONFIG_NLS_CODEPAGE_936 is not set
1093# CONFIG_NLS_CODEPAGE_950 is not set
1094# CONFIG_NLS_CODEPAGE_932 is not set
1095# CONFIG_NLS_CODEPAGE_949 is not set
1096# CONFIG_NLS_CODEPAGE_874 is not set
1097# CONFIG_NLS_ISO8859_8 is not set
1098# CONFIG_NLS_CODEPAGE_1250 is not set
1099# CONFIG_NLS_CODEPAGE_1251 is not set
1100CONFIG_NLS_ASCII=y
1101CONFIG_NLS_ISO8859_1=y
1102# CONFIG_NLS_ISO8859_2 is not set
1103# CONFIG_NLS_ISO8859_3 is not set
1104# CONFIG_NLS_ISO8859_4 is not set
1105# CONFIG_NLS_ISO8859_5 is not set
1106# CONFIG_NLS_ISO8859_6 is not set
1107# CONFIG_NLS_ISO8859_7 is not set
1108# CONFIG_NLS_ISO8859_9 is not set
1109# CONFIG_NLS_ISO8859_13 is not set
1110# CONFIG_NLS_ISO8859_14 is not set
1111# CONFIG_NLS_ISO8859_15 is not set
1112# CONFIG_NLS_KOI8_R is not set
1113# CONFIG_NLS_KOI8_U is not set
1114CONFIG_NLS_UTF8=y
1115# CONFIG_DLM is not set
1116# CONFIG_INSTRUMENTATION is not set
1117
1118#
1119# Kernel hacking
1120#
1121CONFIG_PRINTK_TIME=y
1122CONFIG_ENABLE_WARN_DEPRECATED=y
1123# CONFIG_ENABLE_MUST_CHECK is not set
1124CONFIG_MAGIC_SYSRQ=y
1125CONFIG_UNUSED_SYMBOLS=y
1126CONFIG_DEBUG_FS=y
1127# CONFIG_HEADERS_CHECK is not set
1128CONFIG_DEBUG_KERNEL=y
1129# CONFIG_DEBUG_SHIRQ is not set
1130CONFIG_DETECT_SOFTLOCKUP=y
1131CONFIG_SCHED_DEBUG=y
1132# CONFIG_SCHEDSTATS is not set
1133# CONFIG_TIMER_STATS is not set
1134# CONFIG_SLUB_DEBUG_ON is not set
1135# CONFIG_DEBUG_RT_MUTEXES is not set
1136# CONFIG_RT_MUTEX_TESTER is not set
1137# CONFIG_DEBUG_SPINLOCK is not set
1138# CONFIG_DEBUG_MUTEXES is not set
1139# CONFIG_DEBUG_LOCK_ALLOC is not set
1140# CONFIG_PROVE_LOCKING is not set
1141# CONFIG_LOCK_STAT is not set
1142# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1143# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1144# CONFIG_DEBUG_KOBJECT is not set
1145CONFIG_DEBUG_BUGVERBOSE=y
1146# CONFIG_DEBUG_INFO is not set
1147# CONFIG_DEBUG_VM is not set
1148# CONFIG_DEBUG_LIST is not set
1149# CONFIG_DEBUG_SG is not set
1150CONFIG_FRAME_POINTER=y
1151# CONFIG_FORCED_INLINING is not set
1152# CONFIG_BOOT_PRINTK_DELAY is not set
1153# CONFIG_RCU_TORTURE_TEST is not set
1154# CONFIG_FAULT_INJECTION is not set
1155# CONFIG_SAMPLES is not set
1156# CONFIG_DEBUG_USER is not set
1157# CONFIG_DEBUG_ERRORS is not set
1158CONFIG_DEBUG_LL=y
1159# CONFIG_DEBUG_ICEDCC is not set
1160
1161#
1162# Security options
1163#
1164# CONFIG_KEYS is not set
1165# CONFIG_SECURITY is not set
1166# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1167CONFIG_CRYPTO=y
1168CONFIG_CRYPTO_ALGAPI=y
1169CONFIG_CRYPTO_ABLKCIPHER=m
1170CONFIG_CRYPTO_BLKCIPHER=m
1171CONFIG_CRYPTO_HASH=y
1172CONFIG_CRYPTO_MANAGER=y
1173CONFIG_CRYPTO_HMAC=y
1174CONFIG_CRYPTO_XCBC=m
1175CONFIG_CRYPTO_NULL=m
1176# CONFIG_CRYPTO_MD4 is not set
1177CONFIG_CRYPTO_MD5=y
1178CONFIG_CRYPTO_SHA1=y
1179CONFIG_CRYPTO_SHA256=y
1180CONFIG_CRYPTO_SHA512=y
1181CONFIG_CRYPTO_WP512=m
1182CONFIG_CRYPTO_TGR192=m
1183CONFIG_CRYPTO_GF128MUL=m
1184CONFIG_CRYPTO_ECB=m
1185CONFIG_CRYPTO_CBC=m
1186CONFIG_CRYPTO_PCBC=m
1187CONFIG_CRYPTO_LRW=m
1188# CONFIG_CRYPTO_XTS is not set
1189CONFIG_CRYPTO_CRYPTD=m
1190CONFIG_CRYPTO_DES=y
1191CONFIG_CRYPTO_FCRYPT=m
1192CONFIG_CRYPTO_BLOWFISH=m
1193CONFIG_CRYPTO_TWOFISH=m
1194CONFIG_CRYPTO_TWOFISH_COMMON=m
1195CONFIG_CRYPTO_SERPENT=m
1196CONFIG_CRYPTO_AES=m
1197CONFIG_CRYPTO_CAST5=m
1198CONFIG_CRYPTO_CAST6=m
1199CONFIG_CRYPTO_TEA=m
1200CONFIG_CRYPTO_ARC4=m
1201CONFIG_CRYPTO_KHAZAD=m
1202CONFIG_CRYPTO_ANUBIS=m
1203# CONFIG_CRYPTO_SEED is not set
1204CONFIG_CRYPTO_DEFLATE=m
1205CONFIG_CRYPTO_MICHAEL_MIC=m
1206CONFIG_CRYPTO_CRC32C=m
1207CONFIG_CRYPTO_CAMELLIA=m
1208CONFIG_CRYPTO_TEST=m
1209# CONFIG_CRYPTO_AUTHENC is not set
1210# CONFIG_CRYPTO_HW is not set
1211
1212#
1213# Library routines
1214#
1215CONFIG_BITREVERSE=m
1216# CONFIG_CRC_CCITT is not set
1217# CONFIG_CRC16 is not set
1218# CONFIG_CRC_ITU_T is not set
1219CONFIG_CRC32=m
1220# CONFIG_CRC7 is not set
1221CONFIG_LIBCRC32C=m
1222CONFIG_AUDIT_GENERIC=y
1223CONFIG_ZLIB_INFLATE=m
1224CONFIG_ZLIB_DEFLATE=m
1225CONFIG_PLIST=y
1226CONFIG_HAS_IOMEM=y
1227CONFIG_HAS_IOPORT=y
1228CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig
index 88e5d28aeec7..67e65e4f0cdc 100644
--- a/arch/arm/configs/csb337_defconfig
+++ b/arch/arm/configs/csb337_defconfig
@@ -1,69 +1,96 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15 3# Linux kernel version: 2.6.24-rc7
4# Mon Jan 9 21:51:31 2006 4# Wed Jan 9 22:19:24 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_MMU=y 11CONFIG_MMU=y
8CONFIG_UID16=y 12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 27
12# 28#
13# Code maturity level options 29# General setup
14# 30#
15CONFIG_EXPERIMENTAL=y 31CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 32CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 35CONFIG_LOCALVERSION_AUTO=y
25# CONFIG_SWAP is not set 36# CONFIG_SWAP is not set
26CONFIG_SYSVIPC=y 37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 39# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 40# CONFIG_BSD_PROCESS_ACCT is not set
29CONFIG_SYSCTL=y 41# CONFIG_TASKSTATS is not set
42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
30# CONFIG_AUDIT is not set 44# CONFIG_AUDIT is not set
31CONFIG_HOTPLUG=y
32CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 45# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
51CONFIG_SYSFS_DEPRECATED=y
52# CONFIG_RELAY is not set
53CONFIG_BLK_DEV_INITRD=y
34CONFIG_INITRAMFS_SOURCE="" 54CONFIG_INITRAMFS_SOURCE=""
35CONFIG_CC_OPTIMIZE_FOR_SIZE=y 55CONFIG_CC_OPTIMIZE_FOR_SIZE=y
56CONFIG_SYSCTL=y
36# CONFIG_EMBEDDED is not set 57# CONFIG_EMBEDDED is not set
58CONFIG_UID16=y
59CONFIG_SYSCTL_SYSCALL=y
37CONFIG_KALLSYMS=y 60CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set 61# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set 62# CONFIG_KALLSYMS_EXTRA_PASS is not set
63CONFIG_HOTPLUG=y
40CONFIG_PRINTK=y 64CONFIG_PRINTK=y
41CONFIG_BUG=y 65CONFIG_BUG=y
66CONFIG_ELF_CORE=y
42CONFIG_BASE_FULL=y 67CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y 68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
44CONFIG_EPOLL=y 70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_EVENTFD=y
45CONFIG_SHMEM=y 73CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 74CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LABELS=0 75CONFIG_SLUB_DEBUG=y
48CONFIG_CC_ALIGN_LOOPS=0 76# CONFIG_SLAB is not set
49CONFIG_CC_ALIGN_JUMPS=0 77CONFIG_SLUB=y
78# CONFIG_SLOB is not set
79CONFIG_SLABINFO=y
80CONFIG_RT_MUTEXES=y
50# CONFIG_TINY_SHMEM is not set 81# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 82CONFIG_BASE_SMALL=0
52
53#
54# Loadable module support
55#
56CONFIG_MODULES=y 83CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y 84CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set 85# CONFIG_MODULE_FORCE_UNLOAD is not set
59CONFIG_OBSOLETE_MODPARM=y
60# CONFIG_MODVERSIONS is not set 86# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 87# CONFIG_MODULE_SRCVERSION_ALL is not set
62CONFIG_KMOD=y 88CONFIG_KMOD=y
63 89CONFIG_BLOCK=y
64# 90# CONFIG_LBD is not set
65# Block layer 91# CONFIG_BLK_DEV_IO_TRACE is not set
66# 92# CONFIG_LSF is not set
93# CONFIG_BLK_DEV_BSG is not set
67 94
68# 95#
69# IO Schedulers 96# IO Schedulers
@@ -81,62 +108,101 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
81# 108#
82# System Type 109# System Type
83# 110#
111# CONFIG_ARCH_AAEC2000 is not set
112# CONFIG_ARCH_INTEGRATOR is not set
113# CONFIG_ARCH_REALVIEW is not set
114# CONFIG_ARCH_VERSATILE is not set
115CONFIG_ARCH_AT91=y
84# CONFIG_ARCH_CLPS7500 is not set 116# CONFIG_ARCH_CLPS7500 is not set
85# CONFIG_ARCH_CLPS711X is not set 117# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 118# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 119# CONFIG_ARCH_EBSA110 is not set
120# CONFIG_ARCH_EP93XX is not set
88# CONFIG_ARCH_FOOTBRIDGE is not set 121# CONFIG_ARCH_FOOTBRIDGE is not set
89# CONFIG_ARCH_INTEGRATOR is not set 122# CONFIG_ARCH_NETX is not set
90# CONFIG_ARCH_IOP3XX is not set 123# CONFIG_ARCH_H720X is not set
91# CONFIG_ARCH_IXP4XX is not set 124# CONFIG_ARCH_IMX is not set
125# CONFIG_ARCH_IOP13XX is not set
126# CONFIG_ARCH_IOP32X is not set
127# CONFIG_ARCH_IOP33X is not set
128# CONFIG_ARCH_IXP23XX is not set
92# CONFIG_ARCH_IXP2000 is not set 129# CONFIG_ARCH_IXP2000 is not set
130# CONFIG_ARCH_IXP4XX is not set
93# CONFIG_ARCH_L7200 is not set 131# CONFIG_ARCH_L7200 is not set
132# CONFIG_ARCH_KS8695 is not set
133# CONFIG_ARCH_NS9XXX is not set
134# CONFIG_ARCH_MXC is not set
135# CONFIG_ARCH_PNX4008 is not set
94# CONFIG_ARCH_PXA is not set 136# CONFIG_ARCH_PXA is not set
95# CONFIG_ARCH_RPC is not set 137# CONFIG_ARCH_RPC is not set
96# CONFIG_ARCH_SA1100 is not set 138# CONFIG_ARCH_SA1100 is not set
97# CONFIG_ARCH_S3C2410 is not set 139# CONFIG_ARCH_S3C2410 is not set
98# CONFIG_ARCH_SHARK is not set 140# CONFIG_ARCH_SHARK is not set
99# CONFIG_ARCH_LH7A40X is not set 141# CONFIG_ARCH_LH7A40X is not set
142# CONFIG_ARCH_DAVINCI is not set
100# CONFIG_ARCH_OMAP is not set 143# CONFIG_ARCH_OMAP is not set
101# CONFIG_ARCH_VERSATILE is not set
102# CONFIG_ARCH_REALVIEW is not set
103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set
106CONFIG_ARCH_AT91=y
107CONFIG_ARCH_AT91RM9200=y
108 144
109# 145#
110# AT91RM9200 Implementations 146# Boot options
111# 147#
112 148
113# 149#
150# Power management
151#
152
153#
154# Atmel AT91 System-on-Chip
155#
156CONFIG_ARCH_AT91RM9200=y
157# CONFIG_ARCH_AT91SAM9260 is not set
158# CONFIG_ARCH_AT91SAM9261 is not set
159# CONFIG_ARCH_AT91SAM9263 is not set
160# CONFIG_ARCH_AT91SAM9RL is not set
161# CONFIG_ARCH_AT91X40 is not set
162CONFIG_AT91_PMC_UNIT=y
163
164#
114# AT91RM9200 Board Type 165# AT91RM9200 Board Type
115# 166#
167# CONFIG_MACH_ONEARM is not set
116# CONFIG_ARCH_AT91RM9200DK is not set 168# CONFIG_ARCH_AT91RM9200DK is not set
117# CONFIG_MACH_AT91RM9200EK is not set 169# CONFIG_MACH_AT91RM9200EK is not set
118CONFIG_MACH_CSB337=y 170CONFIG_MACH_CSB337=y
119# CONFIG_MACH_CSB637 is not set 171# CONFIG_MACH_CSB637 is not set
120# CONFIG_MACH_CARMEVA is not set 172# CONFIG_MACH_CARMEVA is not set
121# CONFIG_MACH_KB9200 is not set
122# CONFIG_MACH_ATEB9200 is not set 173# CONFIG_MACH_ATEB9200 is not set
174# CONFIG_MACH_KB9200 is not set
175# CONFIG_MACH_PICOTUX2XX is not set
176# CONFIG_MACH_KAFA is not set
177# CONFIG_MACH_CHUB is not set
178# CONFIG_MACH_HOMEMATIC is not set
179# CONFIG_MACH_ECBAT91 is not set
180# CONFIG_MACH_SWEDATMS is not set
181
182#
183# AT91 Board Options
184#
123 185
124# 186#
125# AT91RM9200 Feature Selections 187# AT91 Feature Selections
126# 188#
127CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 189CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
190# CONFIG_ATMEL_TCLIB is not set
191CONFIG_AT91_TIMER_HZ=128
128 192
129# 193#
130# Processor Type 194# Processor Type
131# 195#
132CONFIG_CPU_32=y 196CONFIG_CPU_32=y
133CONFIG_CPU_ARM920T=y 197CONFIG_CPU_ARM920T=y
134CONFIG_CPU_32v4=y 198CONFIG_CPU_32v4T=y
135CONFIG_CPU_ABRT_EV4T=y 199CONFIG_CPU_ABRT_EV4T=y
136CONFIG_CPU_CACHE_V4WT=y 200CONFIG_CPU_CACHE_V4WT=y
137CONFIG_CPU_CACHE_VIVT=y 201CONFIG_CPU_CACHE_VIVT=y
138CONFIG_CPU_COPY_V4WB=y 202CONFIG_CPU_COPY_V4WB=y
139CONFIG_CPU_TLB_V4WBI=y 203CONFIG_CPU_TLB_V4WBI=y
204CONFIG_CPU_CP15=y
205CONFIG_CPU_CP15_MMU=y
140 206
141# 207#
142# Processor Features 208# Processor Features
@@ -145,15 +211,13 @@ CONFIG_CPU_TLB_V4WBI=y
145# CONFIG_CPU_ICACHE_DISABLE is not set 211# CONFIG_CPU_ICACHE_DISABLE is not set
146# CONFIG_CPU_DCACHE_DISABLE is not set 212# CONFIG_CPU_DCACHE_DISABLE is not set
147# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 213# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
214# CONFIG_OUTER_CACHE is not set
148 215
149# 216#
150# Bus support 217# Bus support
151# 218#
152CONFIG_ISA_DMA_API=y 219# CONFIG_PCI_SYSCALL is not set
153 220# CONFIG_ARCH_SUPPORTS_MSI is not set
154#
155# PCCARD (PCMCIA/CardBus) support
156#
157CONFIG_PCCARD=y 221CONFIG_PCCARD=y
158# CONFIG_PCMCIA_DEBUG is not set 222# CONFIG_PCMCIA_DEBUG is not set
159CONFIG_PCMCIA=y 223CONFIG_PCMCIA=y
@@ -168,8 +232,13 @@ CONFIG_AT91_CF=y
168# 232#
169# Kernel Features 233# Kernel Features
170# 234#
235# CONFIG_TICK_ONESHOT is not set
236# CONFIG_NO_HZ is not set
237# CONFIG_HIGH_RES_TIMERS is not set
238CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
171# CONFIG_PREEMPT is not set 239# CONFIG_PREEMPT is not set
172# CONFIG_NO_IDLE_HZ is not set 240CONFIG_HZ=128
241# CONFIG_AEABI is not set
173# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 242# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
174CONFIG_SELECT_MEMORY_MODEL=y 243CONFIG_SELECT_MEMORY_MODEL=y
175CONFIG_FLATMEM_MANUAL=y 244CONFIG_FLATMEM_MANUAL=y
@@ -178,9 +247,13 @@ CONFIG_FLATMEM_MANUAL=y
178CONFIG_FLATMEM=y 247CONFIG_FLATMEM=y
179CONFIG_FLAT_NODE_MEM_MAP=y 248CONFIG_FLAT_NODE_MEM_MAP=y
180# CONFIG_SPARSEMEM_STATIC is not set 249# CONFIG_SPARSEMEM_STATIC is not set
250# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
181CONFIG_SPLIT_PTLOCK_CPUS=4096 251CONFIG_SPLIT_PTLOCK_CPUS=4096
252# CONFIG_RESOURCES_64BIT is not set
253CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y
255CONFIG_VIRT_TO_BUS=y
182CONFIG_LEDS=y 256CONFIG_LEDS=y
183CONFIG_LEDS_TIMER=y
184CONFIG_LEDS_CPU=y 257CONFIG_LEDS_CPU=y
185CONFIG_ALIGNMENT_TRAP=y 258CONFIG_ALIGNMENT_TRAP=y
186 259
@@ -191,6 +264,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
191CONFIG_ZBOOT_ROM_BSS=0x0 264CONFIG_ZBOOT_ROM_BSS=0x0
192CONFIG_CMDLINE="mem=32M console=ttyS0,38400 initrd=0x20410000,3145728 root=/dev/ram0 rw" 265CONFIG_CMDLINE="mem=32M console=ttyS0,38400 initrd=0x20410000,3145728 root=/dev/ram0 rw"
193# CONFIG_XIP_KERNEL is not set 266# CONFIG_XIP_KERNEL is not set
267# CONFIG_KEXEC is not set
194 268
195# 269#
196# Floating point emulation 270# Floating point emulation
@@ -215,6 +289,7 @@ CONFIG_BINFMT_ELF=y
215# Power management options 289# Power management options
216# 290#
217# CONFIG_PM is not set 291# CONFIG_PM is not set
292CONFIG_SUSPEND_UP_POSSIBLE=y
218 293
219# 294#
220# Networking 295# Networking
@@ -227,6 +302,10 @@ CONFIG_NET=y
227CONFIG_PACKET=y 302CONFIG_PACKET=y
228# CONFIG_PACKET_MMAP is not set 303# CONFIG_PACKET_MMAP is not set
229CONFIG_UNIX=y 304CONFIG_UNIX=y
305CONFIG_XFRM=y
306# CONFIG_XFRM_USER is not set
307# CONFIG_XFRM_SUB_POLICY is not set
308# CONFIG_XFRM_MIGRATE is not set
230# CONFIG_NET_KEY is not set 309# CONFIG_NET_KEY is not set
231CONFIG_INET=y 310CONFIG_INET=y
232# CONFIG_IP_MULTICAST is not set 311# CONFIG_IP_MULTICAST is not set
@@ -243,23 +322,26 @@ CONFIG_IP_PNP_BOOTP=y
243# CONFIG_INET_AH is not set 322# CONFIG_INET_AH is not set
244# CONFIG_INET_ESP is not set 323# CONFIG_INET_ESP is not set
245# CONFIG_INET_IPCOMP is not set 324# CONFIG_INET_IPCOMP is not set
325# CONFIG_INET_XFRM_TUNNEL is not set
246# CONFIG_INET_TUNNEL is not set 326# CONFIG_INET_TUNNEL is not set
327CONFIG_INET_XFRM_MODE_TRANSPORT=y
328CONFIG_INET_XFRM_MODE_TUNNEL=y
329CONFIG_INET_XFRM_MODE_BEET=y
330# CONFIG_INET_LRO is not set
247CONFIG_INET_DIAG=y 331CONFIG_INET_DIAG=y
248CONFIG_INET_TCP_DIAG=y 332CONFIG_INET_TCP_DIAG=y
249# CONFIG_TCP_CONG_ADVANCED is not set 333# CONFIG_TCP_CONG_ADVANCED is not set
250CONFIG_TCP_CONG_BIC=y 334CONFIG_TCP_CONG_CUBIC=y
335CONFIG_DEFAULT_TCP_CONG="cubic"
336# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set 337# CONFIG_IPV6 is not set
338# CONFIG_INET6_XFRM_TUNNEL is not set
339# CONFIG_INET6_TUNNEL is not set
340# CONFIG_NETWORK_SECMARK is not set
252# CONFIG_NETFILTER is not set 341# CONFIG_NETFILTER is not set
253
254#
255# DCCP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_DCCP is not set 342# CONFIG_IP_DCCP is not set
258
259#
260# SCTP Configuration (EXPERIMENTAL)
261#
262# CONFIG_IP_SCTP is not set 343# CONFIG_IP_SCTP is not set
344# CONFIG_TIPC is not set
263# CONFIG_ATM is not set 345# CONFIG_ATM is not set
264# CONFIG_BRIDGE is not set 346# CONFIG_BRIDGE is not set
265# CONFIG_VLAN_8021Q is not set 347# CONFIG_VLAN_8021Q is not set
@@ -269,13 +351,8 @@ CONFIG_TCP_CONG_BIC=y
269# CONFIG_ATALK is not set 351# CONFIG_ATALK is not set
270# CONFIG_X25 is not set 352# CONFIG_X25 is not set
271# CONFIG_LAPB is not set 353# CONFIG_LAPB is not set
272# CONFIG_NET_DIVERT is not set
273# CONFIG_ECONET is not set 354# CONFIG_ECONET is not set
274# CONFIG_WAN_ROUTER is not set 355# CONFIG_WAN_ROUTER is not set
275
276#
277# QoS and/or fair queueing
278#
279# CONFIG_NET_SCHED is not set 356# CONFIG_NET_SCHED is not set
280 357
281# 358#
@@ -285,7 +362,17 @@ CONFIG_TCP_CONG_BIC=y
285# CONFIG_HAMRADIO is not set 362# CONFIG_HAMRADIO is not set
286# CONFIG_IRDA is not set 363# CONFIG_IRDA is not set
287# CONFIG_BT is not set 364# CONFIG_BT is not set
365# CONFIG_AF_RXRPC is not set
366
367#
368# Wireless
369#
370# CONFIG_CFG80211 is not set
371# CONFIG_WIRELESS_EXT is not set
372# CONFIG_MAC80211 is not set
288# CONFIG_IEEE80211 is not set 373# CONFIG_IEEE80211 is not set
374# CONFIG_RFKILL is not set
375# CONFIG_NET_9P is not set
289 376
290# 377#
291# Device Drivers 378# Device Drivers
@@ -294,19 +381,14 @@ CONFIG_TCP_CONG_BIC=y
294# 381#
295# Generic Driver Options 382# Generic Driver Options
296# 383#
384CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
297CONFIG_STANDALONE=y 385CONFIG_STANDALONE=y
298CONFIG_PREVENT_FIRMWARE_BUILD=y 386CONFIG_PREVENT_FIRMWARE_BUILD=y
299CONFIG_FW_LOADER=y 387CONFIG_FW_LOADER=y
300# CONFIG_DEBUG_DRIVER is not set 388# CONFIG_DEBUG_DRIVER is not set
301 389# CONFIG_DEBUG_DEVRES is not set
302# 390# CONFIG_SYS_HYPERVISOR is not set
303# Connector - unified userspace <-> kernelspace linker
304#
305# CONFIG_CONNECTOR is not set 391# CONFIG_CONNECTOR is not set
306
307#
308# Memory Technology Devices (MTD)
309#
310CONFIG_MTD=y 392CONFIG_MTD=y
311# CONFIG_MTD_DEBUG is not set 393# CONFIG_MTD_DEBUG is not set
312# CONFIG_MTD_CONCAT is not set 394# CONFIG_MTD_CONCAT is not set
@@ -319,11 +401,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
319# User Modules And Translation Layers 401# User Modules And Translation Layers
320# 402#
321CONFIG_MTD_CHAR=y 403CONFIG_MTD_CHAR=y
404CONFIG_MTD_BLKDEVS=y
322CONFIG_MTD_BLOCK=y 405CONFIG_MTD_BLOCK=y
323# CONFIG_FTL is not set 406# CONFIG_FTL is not set
324# CONFIG_NFTL is not set 407# CONFIG_NFTL is not set
325# CONFIG_INFTL is not set 408# CONFIG_INFTL is not set
326# CONFIG_RFD_FTL is not set 409# CONFIG_RFD_FTL is not set
410# CONFIG_SSFDC is not set
411# CONFIG_MTD_OOPS is not set
327 412
328# 413#
329# RAM/ROM/Flash chip drivers 414# RAM/ROM/Flash chip drivers
@@ -349,15 +434,14 @@ CONFIG_MTD_CFI_UTIL=y
349# CONFIG_MTD_RAM is not set 434# CONFIG_MTD_RAM is not set
350# CONFIG_MTD_ROM is not set 435# CONFIG_MTD_ROM is not set
351# CONFIG_MTD_ABSENT is not set 436# CONFIG_MTD_ABSENT is not set
352# CONFIG_MTD_XIP is not set
353 437
354# 438#
355# Mapping drivers for chip access 439# Mapping drivers for chip access
356# 440#
357# CONFIG_MTD_COMPLEX_MAPPINGS is not set 441# CONFIG_MTD_COMPLEX_MAPPINGS is not set
358CONFIG_MTD_PHYSMAP=y 442CONFIG_MTD_PHYSMAP=y
359CONFIG_MTD_PHYSMAP_START=0 443CONFIG_MTD_PHYSMAP_START=0x0
360CONFIG_MTD_PHYSMAP_LEN=0 444CONFIG_MTD_PHYSMAP_LEN=0x0
361CONFIG_MTD_PHYSMAP_BANKWIDTH=0 445CONFIG_MTD_PHYSMAP_BANKWIDTH=0
362# CONFIG_MTD_ARM_INTEGRATOR is not set 446# CONFIG_MTD_ARM_INTEGRATOR is not set
363# CONFIG_MTD_PLATRAM is not set 447# CONFIG_MTD_PLATRAM is not set
@@ -368,7 +452,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
368# CONFIG_MTD_SLRAM is not set 452# CONFIG_MTD_SLRAM is not set
369# CONFIG_MTD_PHRAM is not set 453# CONFIG_MTD_PHRAM is not set
370# CONFIG_MTD_MTDRAM is not set 454# CONFIG_MTD_MTDRAM is not set
371# CONFIG_MTD_BLKMTD is not set
372# CONFIG_MTD_BLOCK2MTD is not set 455# CONFIG_MTD_BLOCK2MTD is not set
373 456
374# 457#
@@ -378,29 +461,15 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
378# CONFIG_MTD_DOC2001 is not set 461# CONFIG_MTD_DOC2001 is not set
379# CONFIG_MTD_DOC2001PLUS is not set 462# CONFIG_MTD_DOC2001PLUS is not set
380# CONFIG_MTD_AT91_DATAFLASH is not set 463# CONFIG_MTD_AT91_DATAFLASH is not set
381
382#
383# NAND Flash Device Drivers
384#
385# CONFIG_MTD_NAND is not set 464# CONFIG_MTD_NAND is not set
386
387#
388# OneNAND Flash Device Drivers
389#
390# CONFIG_MTD_ONENAND is not set 465# CONFIG_MTD_ONENAND is not set
391 466
392# 467#
393# Parallel port support 468# UBI - Unsorted block images
394# 469#
470# CONFIG_MTD_UBI is not set
395# CONFIG_PARPORT is not set 471# CONFIG_PARPORT is not set
396 472CONFIG_BLK_DEV=y
397#
398# Plug and Play support
399#
400
401#
402# Block devices
403#
404# CONFIG_BLK_DEV_COW_COMMON is not set 473# CONFIG_BLK_DEV_COW_COMMON is not set
405CONFIG_BLK_DEV_LOOP=y 474CONFIG_BLK_DEV_LOOP=y
406# CONFIG_BLK_DEV_CRYPTOLOOP is not set 475# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -409,13 +478,12 @@ CONFIG_BLK_DEV_LOOP=y
409CONFIG_BLK_DEV_RAM=y 478CONFIG_BLK_DEV_RAM=y
410CONFIG_BLK_DEV_RAM_COUNT=16 479CONFIG_BLK_DEV_RAM_COUNT=16
411CONFIG_BLK_DEV_RAM_SIZE=8192 480CONFIG_BLK_DEV_RAM_SIZE=8192
412CONFIG_BLK_DEV_INITRD=y 481CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
413# CONFIG_CDROM_PKTCDVD is not set 482# CONFIG_CDROM_PKTCDVD is not set
414# CONFIG_ATA_OVER_ETH is not set 483# CONFIG_ATA_OVER_ETH is not set
415 484CONFIG_MISC_DEVICES=y
416# 485# CONFIG_EEPROM_93CX6 is not set
417# ATA/ATAPI/MFM/RLL support 486CONFIG_ATMEL_SSC=y
418#
419# CONFIG_IDE is not set 487# CONFIG_IDE is not set
420 488
421# 489#
@@ -423,6 +491,9 @@ CONFIG_BLK_DEV_INITRD=y
423# 491#
424# CONFIG_RAID_ATTRS is not set 492# CONFIG_RAID_ATTRS is not set
425CONFIG_SCSI=y 493CONFIG_SCSI=y
494CONFIG_SCSI_DMA=y
495# CONFIG_SCSI_TGT is not set
496# CONFIG_SCSI_NETLINK is not set
426CONFIG_SCSI_PROC_FS=y 497CONFIG_SCSI_PROC_FS=y
427 498
428# 499#
@@ -441,97 +512,61 @@ CONFIG_SCSI_PROC_FS=y
441# CONFIG_SCSI_MULTI_LUN is not set 512# CONFIG_SCSI_MULTI_LUN is not set
442# CONFIG_SCSI_CONSTANTS is not set 513# CONFIG_SCSI_CONSTANTS is not set
443# CONFIG_SCSI_LOGGING is not set 514# CONFIG_SCSI_LOGGING is not set
515# CONFIG_SCSI_SCAN_ASYNC is not set
516CONFIG_SCSI_WAIT_SCAN=m
444 517
445# 518#
446# SCSI Transport Attributes 519# SCSI Transports
447# 520#
448# CONFIG_SCSI_SPI_ATTRS is not set 521# CONFIG_SCSI_SPI_ATTRS is not set
449# CONFIG_SCSI_FC_ATTRS is not set 522# CONFIG_SCSI_FC_ATTRS is not set
450# CONFIG_SCSI_ISCSI_ATTRS is not set 523# CONFIG_SCSI_ISCSI_ATTRS is not set
451# CONFIG_SCSI_SAS_ATTRS is not set 524# CONFIG_SCSI_SAS_LIBSAS is not set
452 525# CONFIG_SCSI_SRP_ATTRS is not set
453# 526CONFIG_SCSI_LOWLEVEL=y
454# SCSI low-level drivers
455#
456# CONFIG_ISCSI_TCP is not set 527# CONFIG_ISCSI_TCP is not set
457# CONFIG_SCSI_SATA is not set
458# CONFIG_SCSI_DEBUG is not set 528# CONFIG_SCSI_DEBUG is not set
459 529# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
460# 530# CONFIG_ATA is not set
461# PCMCIA SCSI adapter support
462#
463# CONFIG_PCMCIA_AHA152X is not set
464# CONFIG_PCMCIA_FDOMAIN is not set
465# CONFIG_PCMCIA_NINJA_SCSI is not set
466# CONFIG_PCMCIA_QLOGIC is not set
467# CONFIG_PCMCIA_SYM53C500 is not set
468
469#
470# Multi-device support (RAID and LVM)
471#
472# CONFIG_MD is not set 531# CONFIG_MD is not set
473
474#
475# Fusion MPT device support
476#
477# CONFIG_FUSION is not set
478
479#
480# IEEE 1394 (FireWire) support
481#
482
483#
484# I2O device support
485#
486
487#
488# Network device support
489#
490CONFIG_NETDEVICES=y 532CONFIG_NETDEVICES=y
533# CONFIG_NETDEVICES_MULTIQUEUE is not set
491# CONFIG_DUMMY is not set 534# CONFIG_DUMMY is not set
492# CONFIG_BONDING is not set 535# CONFIG_BONDING is not set
536# CONFIG_MACVLAN is not set
493# CONFIG_EQUALIZER is not set 537# CONFIG_EQUALIZER is not set
494# CONFIG_TUN is not set 538# CONFIG_TUN is not set
495 539# CONFIG_VETH is not set
496#
497# PHY device support
498#
499# CONFIG_PHYLIB is not set 540# CONFIG_PHYLIB is not set
500
501#
502# Ethernet (10 or 100Mbit)
503#
504CONFIG_NET_ETHERNET=y 541CONFIG_NET_ETHERNET=y
505CONFIG_MII=y 542CONFIG_MII=y
506CONFIG_ARM_AT91_ETHER=y 543CONFIG_ARM_AT91_ETHER=y
544# CONFIG_AX88796 is not set
507# CONFIG_SMC91X is not set 545# CONFIG_SMC91X is not set
508# CONFIG_DM9000 is not set 546# CONFIG_DM9000 is not set
547# CONFIG_IBM_NEW_EMAC_ZMII is not set
548# CONFIG_IBM_NEW_EMAC_RGMII is not set
549# CONFIG_IBM_NEW_EMAC_TAH is not set
550# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
551# CONFIG_B44 is not set
552CONFIG_NETDEV_1000=y
553CONFIG_NETDEV_10000=y
509 554
510# 555#
511# Ethernet (1000 Mbit) 556# Wireless LAN
512#
513
514#
515# Ethernet (10000 Mbit)
516# 557#
558# CONFIG_WLAN_PRE80211 is not set
559# CONFIG_WLAN_80211 is not set
517 560
518# 561#
519# Token Ring devices 562# USB Network Adapters
520#
521
522#
523# Wireless LAN (non-hamradio)
524#
525# CONFIG_NET_RADIO is not set
526
527#
528# PCMCIA network device support
529# 563#
564# CONFIG_USB_CATC is not set
565# CONFIG_USB_KAWETH is not set
566# CONFIG_USB_PEGASUS is not set
567# CONFIG_USB_RTL8150 is not set
568# CONFIG_USB_USBNET is not set
530# CONFIG_NET_PCMCIA is not set 569# CONFIG_NET_PCMCIA is not set
531
532#
533# Wan interfaces
534#
535# CONFIG_WAN is not set 570# CONFIG_WAN is not set
536# CONFIG_PPP is not set 571# CONFIG_PPP is not set
537# CONFIG_SLIP is not set 572# CONFIG_SLIP is not set
@@ -539,26 +574,23 @@ CONFIG_ARM_AT91_ETHER=y
539# CONFIG_NETCONSOLE is not set 574# CONFIG_NETCONSOLE is not set
540# CONFIG_NETPOLL is not set 575# CONFIG_NETPOLL is not set
541# CONFIG_NET_POLL_CONTROLLER is not set 576# CONFIG_NET_POLL_CONTROLLER is not set
542
543#
544# ISDN subsystem
545#
546# CONFIG_ISDN is not set 577# CONFIG_ISDN is not set
547 578
548# 579#
549# Input device support 580# Input device support
550# 581#
551CONFIG_INPUT=y 582CONFIG_INPUT=y
583# CONFIG_INPUT_FF_MEMLESS is not set
584# CONFIG_INPUT_POLLDEV is not set
552 585
553# 586#
554# Userland interfaces 587# Userland interfaces
555# 588#
556CONFIG_INPUT_MOUSEDEV=y 589CONFIG_INPUT_MOUSEDEV=y
557CONFIG_INPUT_MOUSEDEV_PSAUX=y 590# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
558CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 591CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
559CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 592CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
560# CONFIG_INPUT_JOYDEV is not set 593# CONFIG_INPUT_JOYDEV is not set
561# CONFIG_INPUT_TSDEV is not set
562# CONFIG_INPUT_EVDEV is not set 594# CONFIG_INPUT_EVDEV is not set
563# CONFIG_INPUT_EVBUG is not set 595# CONFIG_INPUT_EVBUG is not set
564 596
@@ -568,6 +600,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
568# CONFIG_INPUT_KEYBOARD is not set 600# CONFIG_INPUT_KEYBOARD is not set
569# CONFIG_INPUT_MOUSE is not set 601# CONFIG_INPUT_MOUSE is not set
570# CONFIG_INPUT_JOYSTICK is not set 602# CONFIG_INPUT_JOYSTICK is not set
603# CONFIG_INPUT_TABLET is not set
571# CONFIG_INPUT_TOUCHSCREEN is not set 604# CONFIG_INPUT_TOUCHSCREEN is not set
572# CONFIG_INPUT_MISC is not set 605# CONFIG_INPUT_MISC is not set
573 606
@@ -583,6 +616,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
583CONFIG_VT=y 616CONFIG_VT=y
584CONFIG_VT_CONSOLE=y 617CONFIG_VT_CONSOLE=y
585CONFIG_HW_CONSOLE=y 618CONFIG_HW_CONSOLE=y
619# CONFIG_VT_HW_CONSOLE_BINDING is not set
586# CONFIG_SERIAL_NONSTANDARD is not set 620# CONFIG_SERIAL_NONSTANDARD is not set
587 621
588# 622#
@@ -601,152 +635,114 @@ CONFIG_SERIAL_CORE_CONSOLE=y
601CONFIG_UNIX98_PTYS=y 635CONFIG_UNIX98_PTYS=y
602CONFIG_LEGACY_PTYS=y 636CONFIG_LEGACY_PTYS=y
603CONFIG_LEGACY_PTY_COUNT=256 637CONFIG_LEGACY_PTY_COUNT=256
604
605#
606# IPMI
607#
608# CONFIG_IPMI_HANDLER is not set 638# CONFIG_IPMI_HANDLER is not set
609
610#
611# Watchdog Cards
612#
613CONFIG_WATCHDOG=y
614CONFIG_WATCHDOG_NOWAYOUT=y
615
616#
617# Watchdog Device Drivers
618#
619# CONFIG_SOFT_WATCHDOG is not set
620CONFIG_AT91RM9200_WATCHDOG=y
621
622#
623# USB-based Watchdog Cards
624#
625# CONFIG_USBPCWATCHDOG is not set
626# CONFIG_HW_RANDOM is not set 639# CONFIG_HW_RANDOM is not set
627# CONFIG_NVRAM is not set 640# CONFIG_NVRAM is not set
628# CONFIG_DTLK is not set
629# CONFIG_R3964 is not set 641# CONFIG_R3964 is not set
630 642
631# 643#
632# Ftape, the floppy tape device driver
633#
634
635#
636# PCMCIA character devices 644# PCMCIA character devices
637# 645#
638# CONFIG_SYNCLINK_CS is not set 646# CONFIG_SYNCLINK_CS is not set
639# CONFIG_CARDMAN_4000 is not set 647# CONFIG_CARDMAN_4000 is not set
640# CONFIG_CARDMAN_4040 is not set 648# CONFIG_CARDMAN_4040 is not set
641# CONFIG_RAW_DRIVER is not set 649# CONFIG_RAW_DRIVER is not set
642
643#
644# TPM devices
645#
646# CONFIG_TCG_TPM is not set 650# CONFIG_TCG_TPM is not set
647# CONFIG_TELCLOCK is not set
648CONFIG_AT91_SPI=y 651CONFIG_AT91_SPI=y
649CONFIG_AT91_SPIDEV=y 652CONFIG_AT91_SPIDEV=y
650
651#
652# I2C support
653#
654CONFIG_I2C=y 653CONFIG_I2C=y
654CONFIG_I2C_BOARDINFO=y
655CONFIG_I2C_CHARDEV=y 655CONFIG_I2C_CHARDEV=y
656 656
657# 657#
658# I2C Algorithms 658# I2C Algorithms
659# 659#
660# CONFIG_I2C_ALGOBIT is not set 660CONFIG_I2C_ALGOBIT=y
661# CONFIG_I2C_ALGOPCF is not set 661# CONFIG_I2C_ALGOPCF is not set
662# CONFIG_I2C_ALGOPCA is not set 662# CONFIG_I2C_ALGOPCA is not set
663 663
664# 664#
665# I2C Hardware Bus support 665# I2C Hardware Bus support
666# 666#
667CONFIG_I2C_AT91=y 667CONFIG_I2C_GPIO=y
668# CONFIG_I2C_OCORES is not set
668# CONFIG_I2C_PARPORT_LIGHT is not set 669# CONFIG_I2C_PARPORT_LIGHT is not set
670# CONFIG_I2C_SIMTEC is not set
671# CONFIG_I2C_TAOS_EVM is not set
669# CONFIG_I2C_STUB is not set 672# CONFIG_I2C_STUB is not set
670# CONFIG_I2C_PCA_ISA is not set 673# CONFIG_I2C_TINY_USB is not set
674# CONFIG_I2C_PCA is not set
671 675
672# 676#
673# Miscellaneous I2C Chip support 677# Miscellaneous I2C Chip support
674# 678#
675# CONFIG_SENSORS_DS1337 is not set 679# CONFIG_SENSORS_DS1337 is not set
676# CONFIG_SENSORS_DS1374 is not set 680# CONFIG_SENSORS_DS1374 is not set
681# CONFIG_DS1682 is not set
677# CONFIG_SENSORS_EEPROM is not set 682# CONFIG_SENSORS_EEPROM is not set
678# CONFIG_SENSORS_PCF8574 is not set 683# CONFIG_SENSORS_PCF8574 is not set
679# CONFIG_SENSORS_PCA9539 is not set 684# CONFIG_SENSORS_PCA9539 is not set
680# CONFIG_SENSORS_PCF8591 is not set 685# CONFIG_SENSORS_PCF8591 is not set
681# CONFIG_SENSORS_RTC8564 is not set
682# CONFIG_SENSORS_MAX6875 is not set 686# CONFIG_SENSORS_MAX6875 is not set
683# CONFIG_RTC_X1205_I2C is not set 687# CONFIG_SENSORS_TSL2550 is not set
684# CONFIG_I2C_DEBUG_CORE is not set 688# CONFIG_I2C_DEBUG_CORE is not set
685# CONFIG_I2C_DEBUG_ALGO is not set 689# CONFIG_I2C_DEBUG_ALGO is not set
686# CONFIG_I2C_DEBUG_BUS is not set 690# CONFIG_I2C_DEBUG_BUS is not set
687# CONFIG_I2C_DEBUG_CHIP is not set 691# CONFIG_I2C_DEBUG_CHIP is not set
688 692
689# 693#
690# Hardware Monitoring support 694# SPI support
691#
692CONFIG_HWMON=y
693# CONFIG_HWMON_VID is not set
694# CONFIG_SENSORS_ADM1021 is not set
695# CONFIG_SENSORS_ADM1025 is not set
696# CONFIG_SENSORS_ADM1026 is not set
697# CONFIG_SENSORS_ADM1031 is not set
698# CONFIG_SENSORS_ADM9240 is not set
699# CONFIG_SENSORS_ASB100 is not set
700# CONFIG_SENSORS_ATXP1 is not set
701# CONFIG_SENSORS_DS1621 is not set
702# CONFIG_SENSORS_FSCHER is not set
703# CONFIG_SENSORS_FSCPOS is not set
704# CONFIG_SENSORS_GL518SM is not set
705# CONFIG_SENSORS_GL520SM is not set
706# CONFIG_SENSORS_IT87 is not set
707# CONFIG_SENSORS_LM63 is not set
708# CONFIG_SENSORS_LM75 is not set
709# CONFIG_SENSORS_LM77 is not set
710# CONFIG_SENSORS_LM78 is not set
711# CONFIG_SENSORS_LM80 is not set
712# CONFIG_SENSORS_LM83 is not set
713# CONFIG_SENSORS_LM85 is not set
714# CONFIG_SENSORS_LM87 is not set
715# CONFIG_SENSORS_LM90 is not set
716# CONFIG_SENSORS_LM92 is not set
717# CONFIG_SENSORS_MAX1619 is not set
718# CONFIG_SENSORS_PC87360 is not set
719# CONFIG_SENSORS_SMSC47M1 is not set
720# CONFIG_SENSORS_SMSC47B397 is not set
721# CONFIG_SENSORS_W83781D is not set
722# CONFIG_SENSORS_W83792D is not set
723# CONFIG_SENSORS_W83L785TS is not set
724# CONFIG_SENSORS_W83627HF is not set
725# CONFIG_SENSORS_W83627EHF is not set
726# CONFIG_HWMON_DEBUG_CHIP is not set
727
728#
729# Misc devices
730#
731
732#
733# Multimedia Capabilities Port drivers
734# 695#
696# CONFIG_SPI is not set
697# CONFIG_SPI_MASTER is not set
698# CONFIG_W1 is not set
699# CONFIG_POWER_SUPPLY is not set
700# CONFIG_HWMON is not set
701CONFIG_WATCHDOG=y
702CONFIG_WATCHDOG_NOWAYOUT=y
735 703
736# 704#
737# Multimedia devices 705# Watchdog Device Drivers
738# 706#
739# CONFIG_VIDEO_DEV is not set 707# CONFIG_SOFT_WATCHDOG is not set
708CONFIG_AT91RM9200_WATCHDOG=y
709
710#
711# USB-based Watchdog Cards
712#
713# CONFIG_USBPCWATCHDOG is not set
714
715#
716# Sonics Silicon Backplane
717#
718CONFIG_SSB_POSSIBLE=y
719# CONFIG_SSB is not set
740 720
741# 721#
742# Digital Video Broadcasting Devices 722# Multifunction device drivers
743# 723#
744# CONFIG_DVB is not set 724# CONFIG_MFD_SM501 is not set
725
726#
727# Multimedia devices
728#
729# CONFIG_VIDEO_DEV is not set
730# CONFIG_DVB_CORE is not set
731CONFIG_DAB=y
732# CONFIG_USB_DABUSB is not set
745 733
746# 734#
747# Graphics support 735# Graphics support
748# 736#
737# CONFIG_VGASTATE is not set
738# CONFIG_VIDEO_OUTPUT_CONTROL is not set
749# CONFIG_FB is not set 739# CONFIG_FB is not set
740# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
741
742#
743# Display device support
744#
745# CONFIG_DISPLAY_SUPPORT is not set
750 746
751# 747#
752# Console display driver support 748# Console display driver support
@@ -758,12 +754,25 @@ CONFIG_DUMMY_CONSOLE=y
758# Sound 754# Sound
759# 755#
760# CONFIG_SOUND is not set 756# CONFIG_SOUND is not set
757CONFIG_HID_SUPPORT=y
758CONFIG_HID=y
759CONFIG_HID_DEBUG=y
760# CONFIG_HIDRAW is not set
761
762#
763# USB Input Devices
764#
765# CONFIG_USB_HID is not set
761 766
762# 767#
763# USB support 768# USB HID Boot Protocol drivers
764# 769#
770# CONFIG_USB_KBD is not set
771# CONFIG_USB_MOUSE is not set
772CONFIG_USB_SUPPORT=y
765CONFIG_USB_ARCH_HAS_HCD=y 773CONFIG_USB_ARCH_HAS_HCD=y
766CONFIG_USB_ARCH_HAS_OHCI=y 774CONFIG_USB_ARCH_HAS_OHCI=y
775# CONFIG_USB_ARCH_HAS_EHCI is not set
767CONFIG_USB=y 776CONFIG_USB=y
768CONFIG_USB_DEBUG=y 777CONFIG_USB_DEBUG=y
769 778
@@ -771,7 +780,7 @@ CONFIG_USB_DEBUG=y
771# Miscellaneous USB options 780# Miscellaneous USB options
772# 781#
773CONFIG_USB_DEVICEFS=y 782CONFIG_USB_DEVICEFS=y
774# CONFIG_USB_BANDWIDTH is not set 783CONFIG_USB_DEVICE_CLASS=y
775# CONFIG_USB_DYNAMIC_MINORS is not set 784# CONFIG_USB_DYNAMIC_MINORS is not set
776# CONFIG_USB_OTG is not set 785# CONFIG_USB_OTG is not set
777 786
@@ -780,9 +789,11 @@ CONFIG_USB_DEVICEFS=y
780# 789#
781# CONFIG_USB_ISP116X_HCD is not set 790# CONFIG_USB_ISP116X_HCD is not set
782CONFIG_USB_OHCI_HCD=y 791CONFIG_USB_OHCI_HCD=y
783# CONFIG_USB_OHCI_BIG_ENDIAN is not set 792# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
793# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
784CONFIG_USB_OHCI_LITTLE_ENDIAN=y 794CONFIG_USB_OHCI_LITTLE_ENDIAN=y
785# CONFIG_USB_SL811_HCD is not set 795# CONFIG_USB_SL811_HCD is not set
796# CONFIG_USB_R8A66597_HCD is not set
786 797
787# 798#
788# USB Device Class drivers 799# USB Device Class drivers
@@ -801,59 +812,21 @@ CONFIG_USB_STORAGE=y
801# CONFIG_USB_STORAGE_DEBUG is not set 812# CONFIG_USB_STORAGE_DEBUG is not set
802# CONFIG_USB_STORAGE_DATAFAB is not set 813# CONFIG_USB_STORAGE_DATAFAB is not set
803# CONFIG_USB_STORAGE_FREECOM is not set 814# CONFIG_USB_STORAGE_FREECOM is not set
815# CONFIG_USB_STORAGE_ISD200 is not set
804# CONFIG_USB_STORAGE_DPCM is not set 816# CONFIG_USB_STORAGE_DPCM is not set
805# CONFIG_USB_STORAGE_USBAT is not set 817# CONFIG_USB_STORAGE_USBAT is not set
806# CONFIG_USB_STORAGE_SDDR09 is not set 818# CONFIG_USB_STORAGE_SDDR09 is not set
807# CONFIG_USB_STORAGE_SDDR55 is not set 819# CONFIG_USB_STORAGE_SDDR55 is not set
808# CONFIG_USB_STORAGE_JUMPSHOT is not set 820# CONFIG_USB_STORAGE_JUMPSHOT is not set
809 821# CONFIG_USB_STORAGE_ALAUDA is not set
810# 822# CONFIG_USB_STORAGE_KARMA is not set
811# USB Input Devices 823# CONFIG_USB_LIBUSUAL is not set
812#
813# CONFIG_USB_HID is not set
814
815#
816# USB HID Boot Protocol drivers
817#
818# CONFIG_USB_KBD is not set
819# CONFIG_USB_MOUSE is not set
820# CONFIG_USB_AIPTEK is not set
821# CONFIG_USB_WACOM is not set
822# CONFIG_USB_ACECAD is not set
823# CONFIG_USB_KBTAB is not set
824# CONFIG_USB_POWERMATE is not set
825# CONFIG_USB_MTOUCH is not set
826# CONFIG_USB_ITMTOUCH is not set
827# CONFIG_USB_EGALAX is not set
828# CONFIG_USB_YEALINK is not set
829# CONFIG_USB_XPAD is not set
830# CONFIG_USB_ATI_REMOTE is not set
831# CONFIG_USB_KEYSPAN_REMOTE is not set
832# CONFIG_USB_APPLETOUCH is not set
833 824
834# 825#
835# USB Imaging devices 826# USB Imaging devices
836# 827#
837# CONFIG_USB_MDC800 is not set 828# CONFIG_USB_MDC800 is not set
838# CONFIG_USB_MICROTEK is not set 829# CONFIG_USB_MICROTEK is not set
839
840#
841# USB Multimedia devices
842#
843# CONFIG_USB_DABUSB is not set
844
845#
846# Video4Linux support is needed for USB Multimedia device support
847#
848
849#
850# USB Network Adapters
851#
852# CONFIG_USB_CATC is not set
853# CONFIG_USB_KAWETH is not set
854# CONFIG_USB_PEGASUS is not set
855# CONFIG_USB_RTL8150 is not set
856# CONFIG_USB_USBNET is not set
857CONFIG_USB_MON=y 830CONFIG_USB_MON=y
858 831
859# 832#
@@ -866,15 +839,18 @@ CONFIG_USB_MON=y
866CONFIG_USB_SERIAL=y 839CONFIG_USB_SERIAL=y
867CONFIG_USB_SERIAL_CONSOLE=y 840CONFIG_USB_SERIAL_CONSOLE=y
868CONFIG_USB_SERIAL_GENERIC=y 841CONFIG_USB_SERIAL_GENERIC=y
842# CONFIG_USB_SERIAL_AIRCABLE is not set
869# CONFIG_USB_SERIAL_AIRPRIME is not set 843# CONFIG_USB_SERIAL_AIRPRIME is not set
870# CONFIG_USB_SERIAL_ANYDATA is not set 844# CONFIG_USB_SERIAL_ARK3116 is not set
871# CONFIG_USB_SERIAL_BELKIN is not set 845# CONFIG_USB_SERIAL_BELKIN is not set
846# CONFIG_USB_SERIAL_CH341 is not set
872# CONFIG_USB_SERIAL_WHITEHEAT is not set 847# CONFIG_USB_SERIAL_WHITEHEAT is not set
873# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 848# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
874# CONFIG_USB_SERIAL_CP2101 is not set 849# CONFIG_USB_SERIAL_CP2101 is not set
875# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 850# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
876# CONFIG_USB_SERIAL_EMPEG is not set 851# CONFIG_USB_SERIAL_EMPEG is not set
877CONFIG_USB_SERIAL_FTDI_SIO=y 852CONFIG_USB_SERIAL_FTDI_SIO=y
853# CONFIG_USB_SERIAL_FUNSOFT is not set
878# CONFIG_USB_SERIAL_VISOR is not set 854# CONFIG_USB_SERIAL_VISOR is not set
879# CONFIG_USB_SERIAL_IPAQ is not set 855# CONFIG_USB_SERIAL_IPAQ is not set
880# CONFIG_USB_SERIAL_IR is not set 856# CONFIG_USB_SERIAL_IR is not set
@@ -899,14 +875,20 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
899# CONFIG_USB_SERIAL_KLSI is not set 875# CONFIG_USB_SERIAL_KLSI is not set
900# CONFIG_USB_SERIAL_KOBIL_SCT is not set 876# CONFIG_USB_SERIAL_KOBIL_SCT is not set
901CONFIG_USB_SERIAL_MCT_U232=y 877CONFIG_USB_SERIAL_MCT_U232=y
878# CONFIG_USB_SERIAL_MOS7720 is not set
879# CONFIG_USB_SERIAL_MOS7840 is not set
880# CONFIG_USB_SERIAL_NAVMAN is not set
902# CONFIG_USB_SERIAL_PL2303 is not set 881# CONFIG_USB_SERIAL_PL2303 is not set
882# CONFIG_USB_SERIAL_OTI6858 is not set
903# CONFIG_USB_SERIAL_HP4X is not set 883# CONFIG_USB_SERIAL_HP4X is not set
904# CONFIG_USB_SERIAL_SAFE is not set 884# CONFIG_USB_SERIAL_SAFE is not set
885# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
905# CONFIG_USB_SERIAL_TI is not set 886# CONFIG_USB_SERIAL_TI is not set
906# CONFIG_USB_SERIAL_CYBERJACK is not set 887# CONFIG_USB_SERIAL_CYBERJACK is not set
907# CONFIG_USB_SERIAL_XIRCOM is not set 888# CONFIG_USB_SERIAL_XIRCOM is not set
908# CONFIG_USB_SERIAL_OPTION is not set 889# CONFIG_USB_SERIAL_OPTION is not set
909# CONFIG_USB_SERIAL_OMNINET is not set 890# CONFIG_USB_SERIAL_OMNINET is not set
891# CONFIG_USB_SERIAL_DEBUG is not set
910CONFIG_USB_EZUSB=y 892CONFIG_USB_EZUSB=y
911 893
912# 894#
@@ -914,16 +896,22 @@ CONFIG_USB_EZUSB=y
914# 896#
915# CONFIG_USB_EMI62 is not set 897# CONFIG_USB_EMI62 is not set
916# CONFIG_USB_EMI26 is not set 898# CONFIG_USB_EMI26 is not set
899# CONFIG_USB_ADUTUX is not set
917# CONFIG_USB_AUERSWALD is not set 900# CONFIG_USB_AUERSWALD is not set
918# CONFIG_USB_RIO500 is not set 901# CONFIG_USB_RIO500 is not set
919# CONFIG_USB_LEGOTOWER is not set 902# CONFIG_USB_LEGOTOWER is not set
920# CONFIG_USB_LCD is not set 903# CONFIG_USB_LCD is not set
904# CONFIG_USB_BERRY_CHARGE is not set
921# CONFIG_USB_LED is not set 905# CONFIG_USB_LED is not set
906# CONFIG_USB_CYPRESS_CY7C63 is not set
922# CONFIG_USB_CYTHERM is not set 907# CONFIG_USB_CYTHERM is not set
923# CONFIG_USB_PHIDGETKIT is not set 908# CONFIG_USB_PHIDGET is not set
924# CONFIG_USB_PHIDGETSERVO is not set
925# CONFIG_USB_IDMOUSE is not set 909# CONFIG_USB_IDMOUSE is not set
910# CONFIG_USB_FTDI_ELAN is not set
911# CONFIG_USB_APPLEDISPLAY is not set
926# CONFIG_USB_LD is not set 912# CONFIG_USB_LD is not set
913# CONFIG_USB_TRANCEVIBRATOR is not set
914# CONFIG_USB_IOWARRIOR is not set
927# CONFIG_USB_TEST is not set 915# CONFIG_USB_TEST is not set
928 916
929# 917#
@@ -934,13 +922,19 @@ CONFIG_USB_EZUSB=y
934# USB Gadget Support 922# USB Gadget Support
935# 923#
936CONFIG_USB_GADGET=y 924CONFIG_USB_GADGET=y
925# CONFIG_USB_GADGET_DEBUG is not set
937# CONFIG_USB_GADGET_DEBUG_FILES is not set 926# CONFIG_USB_GADGET_DEBUG_FILES is not set
938CONFIG_USB_GADGET_SELECTED=y 927CONFIG_USB_GADGET_SELECTED=y
928# CONFIG_USB_GADGET_AMD5536UDC is not set
929# CONFIG_USB_GADGET_ATMEL_USBA is not set
930# CONFIG_USB_GADGET_FSL_USB2 is not set
939# CONFIG_USB_GADGET_NET2280 is not set 931# CONFIG_USB_GADGET_NET2280 is not set
940# CONFIG_USB_GADGET_PXA2XX is not set 932# CONFIG_USB_GADGET_PXA2XX is not set
933# CONFIG_USB_GADGET_M66592 is not set
941# CONFIG_USB_GADGET_GOKU is not set 934# CONFIG_USB_GADGET_GOKU is not set
942# CONFIG_USB_GADGET_LH7A40X is not set 935# CONFIG_USB_GADGET_LH7A40X is not set
943# CONFIG_USB_GADGET_OMAP is not set 936# CONFIG_USB_GADGET_OMAP is not set
937# CONFIG_USB_GADGET_S3C2410 is not set
944CONFIG_USB_GADGET_AT91=y 938CONFIG_USB_GADGET_AT91=y
945CONFIG_USB_AT91=y 939CONFIG_USB_AT91=y
946# CONFIG_USB_GADGET_DUMMY_HCD is not set 940# CONFIG_USB_GADGET_DUMMY_HCD is not set
@@ -950,22 +944,28 @@ CONFIG_USB_AT91=y
950# CONFIG_USB_GADGETFS is not set 944# CONFIG_USB_GADGETFS is not set
951# CONFIG_USB_FILE_STORAGE is not set 945# CONFIG_USB_FILE_STORAGE is not set
952# CONFIG_USB_G_SERIAL is not set 946# CONFIG_USB_G_SERIAL is not set
947# CONFIG_USB_MIDI_GADGET is not set
948CONFIG_MMC=y
949# CONFIG_MMC_DEBUG is not set
950# CONFIG_MMC_UNSAFE_RESUME is not set
953 951
954# 952#
955# MMC/SD Card support 953# MMC/SD Card Drivers
956# 954#
957CONFIG_MMC=y
958# CONFIG_MMC_DEBUG is not set
959CONFIG_MMC_BLOCK=y 955CONFIG_MMC_BLOCK=y
960CONFIG_MMC_AT91RM9200=y 956CONFIG_MMC_BLOCK_BOUNCE=y
957# CONFIG_SDIO_UART is not set
961 958
962# 959#
963# Real Time Clock 960# MMC/SD Host Controller Drivers
964# 961#
962# CONFIG_MMC_AT91 is not set
963# CONFIG_NEW_LEDS is not set
965CONFIG_RTC_LIB=y 964CONFIG_RTC_LIB=y
966CONFIG_RTC_CLASS=y 965CONFIG_RTC_CLASS=y
967CONFIG_RTC_HCTOSYS=y 966CONFIG_RTC_HCTOSYS=y
968CONFIG_RTC_HCTOSYS_DEVICE="rtc1" 967CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
968# CONFIG_RTC_DEBUG is not set
969 969
970# 970#
971# RTC interfaces 971# RTC interfaces
@@ -974,39 +974,60 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
974CONFIG_RTC_INTF_PROC=y 974CONFIG_RTC_INTF_PROC=y
975CONFIG_RTC_INTF_DEV=y 975CONFIG_RTC_INTF_DEV=y
976# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set 976# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
977# CONFIG_RTC_DRV_TEST is not set
977 978
978# 979#
979# RTC drivers 980# I2C RTC drivers
980# 981#
981# CONFIG_RTC_DRV_X1205 is not set
982CONFIG_RTC_DRV_DS1307=y 982CONFIG_RTC_DRV_DS1307=y
983# CONFIG_RTC_DRV_DS1553 is not set 983# CONFIG_RTC_DRV_DS1374 is not set
984# CONFIG_RTC_DRV_ISL1208 is not set
985# CONFIG_RTC_DRV_DS1672 is not set 984# CONFIG_RTC_DRV_DS1672 is not set
986# CONFIG_RTC_DRV_DS1742 is not set 985# CONFIG_RTC_DRV_MAX6900 is not set
986# CONFIG_RTC_DRV_RS5C372 is not set
987# CONFIG_RTC_DRV_ISL1208 is not set
988# CONFIG_RTC_DRV_X1205 is not set
987# CONFIG_RTC_DRV_PCF8563 is not set 989# CONFIG_RTC_DRV_PCF8563 is not set
988# CONFIG_RTC_DRV_PCF8583 is not set 990# CONFIG_RTC_DRV_PCF8583 is not set
989# CONFIG_RTC_DRV_RS5C372 is not set 991# CONFIG_RTC_DRV_M41T80 is not set
992
993#
994# SPI RTC drivers
995#
996
997#
998# Platform RTC drivers
999#
1000# CONFIG_RTC_DRV_CMOS is not set
1001# CONFIG_RTC_DRV_DS1553 is not set
1002# CONFIG_RTC_DRV_STK17TA8 is not set
1003# CONFIG_RTC_DRV_DS1742 is not set
990# CONFIG_RTC_DRV_M48T86 is not set 1004# CONFIG_RTC_DRV_M48T86 is not set
991CONFIG_RTC_DRV_AT91RM9200=y 1005# CONFIG_RTC_DRV_M48T59 is not set
992# CONFIG_RTC_DRV_TEST is not set
993# CONFIG_RTC_DRV_V3020 is not set 1006# CONFIG_RTC_DRV_V3020 is not set
994 1007
995# 1008#
1009# on-CPU RTC drivers
1010#
1011CONFIG_RTC_DRV_AT91RM9200=y
1012
1013#
996# File systems 1014# File systems
997# 1015#
998CONFIG_EXT2_FS=y 1016CONFIG_EXT2_FS=y
999# CONFIG_EXT2_FS_XATTR is not set 1017# CONFIG_EXT2_FS_XATTR is not set
1000# CONFIG_EXT2_FS_XIP is not set 1018# CONFIG_EXT2_FS_XIP is not set
1001# CONFIG_EXT3_FS is not set 1019# CONFIG_EXT3_FS is not set
1002# CONFIG_JBD is not set 1020# CONFIG_EXT4DEV_FS is not set
1003# CONFIG_REISERFS_FS is not set 1021# CONFIG_REISERFS_FS is not set
1004# CONFIG_JFS_FS is not set 1022# CONFIG_JFS_FS is not set
1005# CONFIG_FS_POSIX_ACL is not set 1023# CONFIG_FS_POSIX_ACL is not set
1006# CONFIG_XFS_FS is not set 1024# CONFIG_XFS_FS is not set
1025# CONFIG_GFS2_FS is not set
1026# CONFIG_OCFS2_FS is not set
1007# CONFIG_MINIX_FS is not set 1027# CONFIG_MINIX_FS is not set
1008# CONFIG_ROMFS_FS is not set 1028# CONFIG_ROMFS_FS is not set
1009CONFIG_INOTIFY=y 1029CONFIG_INOTIFY=y
1030CONFIG_INOTIFY_USER=y
1010# CONFIG_QUOTA is not set 1031# CONFIG_QUOTA is not set
1011CONFIG_DNOTIFY=y 1032CONFIG_DNOTIFY=y
1012# CONFIG_AUTOFS_FS is not set 1033# CONFIG_AUTOFS_FS is not set
@@ -1030,11 +1051,12 @@ CONFIG_DNOTIFY=y
1030# Pseudo filesystems 1051# Pseudo filesystems
1031# 1052#
1032CONFIG_PROC_FS=y 1053CONFIG_PROC_FS=y
1054CONFIG_PROC_SYSCTL=y
1033CONFIG_SYSFS=y 1055CONFIG_SYSFS=y
1034CONFIG_TMPFS=y 1056CONFIG_TMPFS=y
1057# CONFIG_TMPFS_POSIX_ACL is not set
1035# CONFIG_HUGETLB_PAGE is not set 1058# CONFIG_HUGETLB_PAGE is not set
1036CONFIG_RAMFS=y 1059# CONFIG_CONFIGFS_FS is not set
1037# CONFIG_RELAYFS_FS is not set
1038 1060
1039# 1061#
1040# Miscellaneous filesystems 1062# Miscellaneous filesystems
@@ -1046,7 +1068,6 @@ CONFIG_RAMFS=y
1046# CONFIG_BEFS_FS is not set 1068# CONFIG_BEFS_FS is not set
1047# CONFIG_BFS_FS is not set 1069# CONFIG_BFS_FS is not set
1048# CONFIG_EFS_FS is not set 1070# CONFIG_EFS_FS is not set
1049# CONFIG_JFFS_FS is not set
1050# CONFIG_JFFS2_FS is not set 1071# CONFIG_JFFS2_FS is not set
1051CONFIG_CRAMFS=y 1072CONFIG_CRAMFS=y
1052# CONFIG_VXFS_FS is not set 1073# CONFIG_VXFS_FS is not set
@@ -1054,10 +1075,7 @@ CONFIG_CRAMFS=y
1054# CONFIG_QNX4FS_FS is not set 1075# CONFIG_QNX4FS_FS is not set
1055# CONFIG_SYSV_FS is not set 1076# CONFIG_SYSV_FS is not set
1056# CONFIG_UFS_FS is not set 1077# CONFIG_UFS_FS is not set
1057 1078CONFIG_NETWORK_FILESYSTEMS=y
1058#
1059# Network File Systems
1060#
1061CONFIG_NFS_FS=y 1079CONFIG_NFS_FS=y
1062CONFIG_NFS_V3=y 1080CONFIG_NFS_V3=y
1063# CONFIG_NFS_V3_ACL is not set 1081# CONFIG_NFS_V3_ACL is not set
@@ -1070,6 +1088,7 @@ CONFIG_LOCKD_V4=y
1070CONFIG_NFS_COMMON=y 1088CONFIG_NFS_COMMON=y
1071CONFIG_SUNRPC=y 1089CONFIG_SUNRPC=y
1072CONFIG_SUNRPC_GSS=y 1090CONFIG_SUNRPC_GSS=y
1091# CONFIG_SUNRPC_BIND34 is not set
1073CONFIG_RPCSEC_GSS_KRB5=y 1092CONFIG_RPCSEC_GSS_KRB5=y
1074# CONFIG_RPCSEC_GSS_SPKM3 is not set 1093# CONFIG_RPCSEC_GSS_SPKM3 is not set
1075# CONFIG_SMB_FS is not set 1094# CONFIG_SMB_FS is not set
@@ -1077,43 +1096,56 @@ CONFIG_RPCSEC_GSS_KRB5=y
1077# CONFIG_NCP_FS is not set 1096# CONFIG_NCP_FS is not set
1078# CONFIG_CODA_FS is not set 1097# CONFIG_CODA_FS is not set
1079# CONFIG_AFS_FS is not set 1098# CONFIG_AFS_FS is not set
1080# CONFIG_9P_FS is not set
1081 1099
1082# 1100#
1083# Partition Types 1101# Partition Types
1084# 1102#
1085# CONFIG_PARTITION_ADVANCED is not set 1103# CONFIG_PARTITION_ADVANCED is not set
1086CONFIG_MSDOS_PARTITION=y 1104CONFIG_MSDOS_PARTITION=y
1087
1088#
1089# Native Language Support
1090#
1091# CONFIG_NLS is not set 1105# CONFIG_NLS is not set
1092 1106# CONFIG_DLM is not set
1093# 1107CONFIG_INSTRUMENTATION=y
1094# Profiling support
1095#
1096# CONFIG_PROFILING is not set 1108# CONFIG_PROFILING is not set
1109# CONFIG_MARKERS is not set
1097 1110
1098# 1111#
1099# Kernel hacking 1112# Kernel hacking
1100# 1113#
1101# CONFIG_PRINTK_TIME is not set 1114# CONFIG_PRINTK_TIME is not set
1102CONFIG_DEBUG_KERNEL=y 1115CONFIG_ENABLE_WARN_DEPRECATED=y
1116CONFIG_ENABLE_MUST_CHECK=y
1103# CONFIG_MAGIC_SYSRQ is not set 1117# CONFIG_MAGIC_SYSRQ is not set
1104CONFIG_LOG_BUF_SHIFT=14 1118# CONFIG_UNUSED_SYMBOLS is not set
1119# CONFIG_DEBUG_FS is not set
1120# CONFIG_HEADERS_CHECK is not set
1121CONFIG_DEBUG_KERNEL=y
1122# CONFIG_DEBUG_SHIRQ is not set
1105CONFIG_DETECT_SOFTLOCKUP=y 1123CONFIG_DETECT_SOFTLOCKUP=y
1124CONFIG_SCHED_DEBUG=y
1106# CONFIG_SCHEDSTATS is not set 1125# CONFIG_SCHEDSTATS is not set
1107# CONFIG_DEBUG_SLAB is not set 1126# CONFIG_TIMER_STATS is not set
1127# CONFIG_SLUB_DEBUG_ON is not set
1128# CONFIG_DEBUG_RT_MUTEXES is not set
1129# CONFIG_RT_MUTEX_TESTER is not set
1108# CONFIG_DEBUG_SPINLOCK is not set 1130# CONFIG_DEBUG_SPINLOCK is not set
1131# CONFIG_DEBUG_MUTEXES is not set
1132# CONFIG_DEBUG_LOCK_ALLOC is not set
1133# CONFIG_PROVE_LOCKING is not set
1134# CONFIG_LOCK_STAT is not set
1109# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1135# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1136# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1110# CONFIG_DEBUG_KOBJECT is not set 1137# CONFIG_DEBUG_KOBJECT is not set
1111CONFIG_DEBUG_BUGVERBOSE=y 1138CONFIG_DEBUG_BUGVERBOSE=y
1112# CONFIG_DEBUG_INFO is not set 1139# CONFIG_DEBUG_INFO is not set
1113# CONFIG_DEBUG_FS is not set
1114# CONFIG_DEBUG_VM is not set 1140# CONFIG_DEBUG_VM is not set
1141# CONFIG_DEBUG_LIST is not set
1142# CONFIG_DEBUG_SG is not set
1115CONFIG_FRAME_POINTER=y 1143CONFIG_FRAME_POINTER=y
1144CONFIG_FORCED_INLINING=y
1145# CONFIG_BOOT_PRINTK_DELAY is not set
1116# CONFIG_RCU_TORTURE_TEST is not set 1146# CONFIG_RCU_TORTURE_TEST is not set
1147# CONFIG_FAULT_INJECTION is not set
1148# CONFIG_SAMPLES is not set
1117CONFIG_DEBUG_USER=y 1149CONFIG_DEBUG_USER=y
1118# CONFIG_DEBUG_ERRORS is not set 1150# CONFIG_DEBUG_ERRORS is not set
1119CONFIG_DEBUG_LL=y 1151CONFIG_DEBUG_LL=y
@@ -1124,12 +1156,13 @@ CONFIG_DEBUG_LL=y
1124# 1156#
1125# CONFIG_KEYS is not set 1157# CONFIG_KEYS is not set
1126# CONFIG_SECURITY is not set 1158# CONFIG_SECURITY is not set
1127 1159# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1128#
1129# Cryptographic options
1130#
1131CONFIG_CRYPTO=y 1160CONFIG_CRYPTO=y
1161CONFIG_CRYPTO_ALGAPI=y
1162CONFIG_CRYPTO_BLKCIPHER=y
1163CONFIG_CRYPTO_MANAGER=y
1132# CONFIG_CRYPTO_HMAC is not set 1164# CONFIG_CRYPTO_HMAC is not set
1165# CONFIG_CRYPTO_XCBC is not set
1133# CONFIG_CRYPTO_NULL is not set 1166# CONFIG_CRYPTO_NULL is not set
1134# CONFIG_CRYPTO_MD4 is not set 1167# CONFIG_CRYPTO_MD4 is not set
1135CONFIG_CRYPTO_MD5=y 1168CONFIG_CRYPTO_MD5=y
@@ -1138,7 +1171,15 @@ CONFIG_CRYPTO_MD5=y
1138# CONFIG_CRYPTO_SHA512 is not set 1171# CONFIG_CRYPTO_SHA512 is not set
1139# CONFIG_CRYPTO_WP512 is not set 1172# CONFIG_CRYPTO_WP512 is not set
1140# CONFIG_CRYPTO_TGR192 is not set 1173# CONFIG_CRYPTO_TGR192 is not set
1174# CONFIG_CRYPTO_GF128MUL is not set
1175# CONFIG_CRYPTO_ECB is not set
1176CONFIG_CRYPTO_CBC=y
1177# CONFIG_CRYPTO_PCBC is not set
1178# CONFIG_CRYPTO_LRW is not set
1179# CONFIG_CRYPTO_XTS is not set
1180# CONFIG_CRYPTO_CRYPTD is not set
1141CONFIG_CRYPTO_DES=y 1181CONFIG_CRYPTO_DES=y
1182# CONFIG_CRYPTO_FCRYPT is not set
1142# CONFIG_CRYPTO_BLOWFISH is not set 1183# CONFIG_CRYPTO_BLOWFISH is not set
1143# CONFIG_CRYPTO_TWOFISH is not set 1184# CONFIG_CRYPTO_TWOFISH is not set
1144# CONFIG_CRYPTO_SERPENT is not set 1185# CONFIG_CRYPTO_SERPENT is not set
@@ -1149,20 +1190,27 @@ CONFIG_CRYPTO_DES=y
1149# CONFIG_CRYPTO_ARC4 is not set 1190# CONFIG_CRYPTO_ARC4 is not set
1150# CONFIG_CRYPTO_KHAZAD is not set 1191# CONFIG_CRYPTO_KHAZAD is not set
1151# CONFIG_CRYPTO_ANUBIS is not set 1192# CONFIG_CRYPTO_ANUBIS is not set
1193# CONFIG_CRYPTO_SEED is not set
1152# CONFIG_CRYPTO_DEFLATE is not set 1194# CONFIG_CRYPTO_DEFLATE is not set
1153# CONFIG_CRYPTO_MICHAEL_MIC is not set 1195# CONFIG_CRYPTO_MICHAEL_MIC is not set
1154# CONFIG_CRYPTO_CRC32C is not set 1196# CONFIG_CRYPTO_CRC32C is not set
1197# CONFIG_CRYPTO_CAMELLIA is not set
1155# CONFIG_CRYPTO_TEST is not set 1198# CONFIG_CRYPTO_TEST is not set
1156 1199# CONFIG_CRYPTO_AUTHENC is not set
1157# 1200CONFIG_CRYPTO_HW=y
1158# Hardware crypto devices
1159#
1160 1201
1161# 1202#
1162# Library routines 1203# Library routines
1163# 1204#
1205CONFIG_BITREVERSE=y
1164# CONFIG_CRC_CCITT is not set 1206# CONFIG_CRC_CCITT is not set
1165# CONFIG_CRC16 is not set 1207# CONFIG_CRC16 is not set
1208# CONFIG_CRC_ITU_T is not set
1166CONFIG_CRC32=y 1209CONFIG_CRC32=y
1210# CONFIG_CRC7 is not set
1167# CONFIG_LIBCRC32C is not set 1211# CONFIG_LIBCRC32C is not set
1168CONFIG_ZLIB_INFLATE=y 1212CONFIG_ZLIB_INFLATE=y
1213CONFIG_PLIST=y
1214CONFIG_HAS_IOMEM=y
1215CONFIG_HAS_IOPORT=y
1216CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig
index 669f035896f9..99702146c9fc 100644
--- a/arch/arm/configs/csb637_defconfig
+++ b/arch/arm/configs/csb637_defconfig
@@ -1,69 +1,112 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15 3# Linux kernel version: 2.6.25-rc8
4# Mon Jan 9 21:52:00 2006 4# Fri Apr 4 22:06:15 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_MMU=y 11CONFIG_MMU=y
8CONFIG_UID16=y 12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ARCH_SUPPORTS_AOUT=y
25CONFIG_ZONE_DMA=y
26CONFIG_VECTORS_BASE=0xffff0000
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 28
12# 29#
13# Code maturity level options 30# General setup
14# 31#
15CONFIG_EXPERIMENTAL=y 32CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 33CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 34CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION="" 35CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 36CONFIG_LOCALVERSION_AUTO=y
25# CONFIG_SWAP is not set 37# CONFIG_SWAP is not set
26CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
39CONFIG_SYSVIPC_SYSCTL=y
27# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
29CONFIG_SYSCTL=y 42# CONFIG_TASKSTATS is not set
30# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
31CONFIG_HOTPLUG=y
32CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set
52CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set
55CONFIG_NAMESPACES=y
56# CONFIG_UTS_NS is not set
57# CONFIG_IPC_NS is not set
58# CONFIG_USER_NS is not set
59# CONFIG_PID_NS is not set
60CONFIG_BLK_DEV_INITRD=y
34CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
35CONFIG_CC_OPTIMIZE_FOR_SIZE=y 62CONFIG_CC_OPTIMIZE_FOR_SIZE=y
63CONFIG_SYSCTL=y
36# CONFIG_EMBEDDED is not set 64# CONFIG_EMBEDDED is not set
65CONFIG_UID16=y
66CONFIG_SYSCTL_SYSCALL=y
37CONFIG_KALLSYMS=y 67CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set 68# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set 69# CONFIG_KALLSYMS_EXTRA_PASS is not set
70CONFIG_HOTPLUG=y
40CONFIG_PRINTK=y 71CONFIG_PRINTK=y
41CONFIG_BUG=y 72CONFIG_BUG=y
73CONFIG_ELF_CORE=y
74CONFIG_COMPAT_BRK=y
42CONFIG_BASE_FULL=y 75CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y 76CONFIG_FUTEX=y
77CONFIG_ANON_INODES=y
44CONFIG_EPOLL=y 78CONFIG_EPOLL=y
79CONFIG_SIGNALFD=y
80CONFIG_TIMERFD=y
81CONFIG_EVENTFD=y
45CONFIG_SHMEM=y 82CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 83CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LABELS=0 84CONFIG_SLUB_DEBUG=y
48CONFIG_CC_ALIGN_LOOPS=0 85# CONFIG_SLAB is not set
49CONFIG_CC_ALIGN_JUMPS=0 86CONFIG_SLUB=y
87# CONFIG_SLOB is not set
88# CONFIG_PROFILING is not set
89# CONFIG_MARKERS is not set
90CONFIG_HAVE_OPROFILE=y
91# CONFIG_KPROBES is not set
92CONFIG_HAVE_KPROBES=y
93CONFIG_HAVE_KRETPROBES=y
94CONFIG_PROC_PAGE_MONITOR=y
95CONFIG_SLABINFO=y
96CONFIG_RT_MUTEXES=y
50# CONFIG_TINY_SHMEM is not set 97# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
52
53#
54# Loadable module support
55#
56CONFIG_MODULES=y 99CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y 100CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set 101# CONFIG_MODULE_FORCE_UNLOAD is not set
59CONFIG_OBSOLETE_MODPARM=y
60# CONFIG_MODVERSIONS is not set 102# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 103# CONFIG_MODULE_SRCVERSION_ALL is not set
62CONFIG_KMOD=y 104CONFIG_KMOD=y
63 105CONFIG_BLOCK=y
64# 106# CONFIG_LBD is not set
65# Block layer 107# CONFIG_BLK_DEV_IO_TRACE is not set
66# 108# CONFIG_LSF is not set
109# CONFIG_BLK_DEV_BSG is not set
67 110
68# 111#
69# IO Schedulers 112# IO Schedulers
@@ -77,66 +120,111 @@ CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_CFQ is not set 120# CONFIG_DEFAULT_CFQ is not set
78# CONFIG_DEFAULT_NOOP is not set 121# CONFIG_DEFAULT_NOOP is not set
79CONFIG_DEFAULT_IOSCHED="anticipatory" 122CONFIG_DEFAULT_IOSCHED="anticipatory"
123CONFIG_CLASSIC_RCU=y
80 124
81# 125#
82# System Type 126# System Type
83# 127#
128# CONFIG_ARCH_AAEC2000 is not set
129# CONFIG_ARCH_INTEGRATOR is not set
130# CONFIG_ARCH_REALVIEW is not set
131# CONFIG_ARCH_VERSATILE is not set
132CONFIG_ARCH_AT91=y
84# CONFIG_ARCH_CLPS7500 is not set 133# CONFIG_ARCH_CLPS7500 is not set
85# CONFIG_ARCH_CLPS711X is not set 134# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 135# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 136# CONFIG_ARCH_EBSA110 is not set
137# CONFIG_ARCH_EP93XX is not set
88# CONFIG_ARCH_FOOTBRIDGE is not set 138# CONFIG_ARCH_FOOTBRIDGE is not set
89# CONFIG_ARCH_INTEGRATOR is not set 139# CONFIG_ARCH_NETX is not set
90# CONFIG_ARCH_IOP3XX is not set 140# CONFIG_ARCH_H720X is not set
91# CONFIG_ARCH_IXP4XX is not set 141# CONFIG_ARCH_IMX is not set
142# CONFIG_ARCH_IOP13XX is not set
143# CONFIG_ARCH_IOP32X is not set
144# CONFIG_ARCH_IOP33X is not set
145# CONFIG_ARCH_IXP23XX is not set
92# CONFIG_ARCH_IXP2000 is not set 146# CONFIG_ARCH_IXP2000 is not set
147# CONFIG_ARCH_IXP4XX is not set
93# CONFIG_ARCH_L7200 is not set 148# CONFIG_ARCH_L7200 is not set
149# CONFIG_ARCH_KS8695 is not set
150# CONFIG_ARCH_NS9XXX is not set
151# CONFIG_ARCH_MXC is not set
152# CONFIG_ARCH_ORION is not set
153# CONFIG_ARCH_PNX4008 is not set
94# CONFIG_ARCH_PXA is not set 154# CONFIG_ARCH_PXA is not set
95# CONFIG_ARCH_RPC is not set 155# CONFIG_ARCH_RPC is not set
96# CONFIG_ARCH_SA1100 is not set 156# CONFIG_ARCH_SA1100 is not set
97# CONFIG_ARCH_S3C2410 is not set 157# CONFIG_ARCH_S3C2410 is not set
98# CONFIG_ARCH_SHARK is not set 158# CONFIG_ARCH_SHARK is not set
99# CONFIG_ARCH_LH7A40X is not set 159# CONFIG_ARCH_LH7A40X is not set
160# CONFIG_ARCH_DAVINCI is not set
100# CONFIG_ARCH_OMAP is not set 161# CONFIG_ARCH_OMAP is not set
101# CONFIG_ARCH_VERSATILE is not set 162# CONFIG_ARCH_MSM7X00A is not set
102# CONFIG_ARCH_REALVIEW is not set 163
103# CONFIG_ARCH_IMX is not set 164#
104# CONFIG_ARCH_H720X is not set 165# Boot options
105# CONFIG_ARCH_AAEC2000 is not set 166#
106CONFIG_ARCH_AT91=y 167
107CONFIG_ARCH_AT91RM9200=y 168#
169# Power management
170#
108 171
109# 172#
110# AT91RM9200 Implementations 173# Atmel AT91 System-on-Chip
111# 174#
175CONFIG_ARCH_AT91RM9200=y
176# CONFIG_ARCH_AT91SAM9260 is not set
177# CONFIG_ARCH_AT91SAM9261 is not set
178# CONFIG_ARCH_AT91SAM9263 is not set
179# CONFIG_ARCH_AT91SAM9RL is not set
180# CONFIG_ARCH_AT91CAP9 is not set
181# CONFIG_ARCH_AT91X40 is not set
182CONFIG_AT91_PMC_UNIT=y
112 183
113# 184#
114# AT91RM9200 Board Type 185# AT91RM9200 Board Type
115# 186#
187# CONFIG_MACH_ONEARM is not set
116# CONFIG_ARCH_AT91RM9200DK is not set 188# CONFIG_ARCH_AT91RM9200DK is not set
117# CONFIG_MACH_AT91RM9200EK is not set 189# CONFIG_MACH_AT91RM9200EK is not set
118# CONFIG_MACH_CSB337 is not set 190# CONFIG_MACH_CSB337 is not set
119CONFIG_MACH_CSB637=y 191CONFIG_MACH_CSB637=y
120# CONFIG_MACH_CARMEVA is not set 192# CONFIG_MACH_CARMEVA is not set
121# CONFIG_MACH_KB9200 is not set
122# CONFIG_MACH_ATEB9200 is not set 193# CONFIG_MACH_ATEB9200 is not set
194# CONFIG_MACH_KB9200 is not set
195# CONFIG_MACH_PICOTUX2XX is not set
196# CONFIG_MACH_KAFA is not set
123 197
124# 198#
125# AT91RM9200 Feature Selections 199# AT91 Board Options
200#
201
202#
203# AT91 Feature Selections
126# 204#
127CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 205CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
206CONFIG_AT91_TIMER_HZ=128
207CONFIG_AT91_EARLY_DBGU=y
208# CONFIG_AT91_EARLY_USART0 is not set
209# CONFIG_AT91_EARLY_USART1 is not set
210# CONFIG_AT91_EARLY_USART2 is not set
211# CONFIG_AT91_EARLY_USART3 is not set
212# CONFIG_AT91_EARLY_USART4 is not set
213# CONFIG_AT91_EARLY_USART5 is not set
128 214
129# 215#
130# Processor Type 216# Processor Type
131# 217#
132CONFIG_CPU_32=y 218CONFIG_CPU_32=y
133CONFIG_CPU_ARM920T=y 219CONFIG_CPU_ARM920T=y
134CONFIG_CPU_32v4=y 220CONFIG_CPU_32v4T=y
135CONFIG_CPU_ABRT_EV4T=y 221CONFIG_CPU_ABRT_EV4T=y
136CONFIG_CPU_CACHE_V4WT=y 222CONFIG_CPU_CACHE_V4WT=y
137CONFIG_CPU_CACHE_VIVT=y 223CONFIG_CPU_CACHE_VIVT=y
138CONFIG_CPU_COPY_V4WB=y 224CONFIG_CPU_COPY_V4WB=y
139CONFIG_CPU_TLB_V4WBI=y 225CONFIG_CPU_TLB_V4WBI=y
226CONFIG_CPU_CP15=y
227CONFIG_CPU_CP15_MMU=y
140 228
141# 229#
142# Processor Features 230# Processor Features
@@ -145,15 +233,13 @@ CONFIG_CPU_TLB_V4WBI=y
145# CONFIG_CPU_ICACHE_DISABLE is not set 233# CONFIG_CPU_ICACHE_DISABLE is not set
146# CONFIG_CPU_DCACHE_DISABLE is not set 234# CONFIG_CPU_DCACHE_DISABLE is not set
147# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 235# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
236# CONFIG_OUTER_CACHE is not set
148 237
149# 238#
150# Bus support 239# Bus support
151# 240#
152CONFIG_ISA_DMA_API=y 241# CONFIG_PCI_SYSCALL is not set
153 242# CONFIG_ARCH_SUPPORTS_MSI is not set
154#
155# PCCARD (PCMCIA/CardBus) support
156#
157CONFIG_PCCARD=y 243CONFIG_PCCARD=y
158# CONFIG_PCMCIA_DEBUG is not set 244# CONFIG_PCMCIA_DEBUG is not set
159CONFIG_PCMCIA=y 245CONFIG_PCMCIA=y
@@ -168,8 +254,13 @@ CONFIG_AT91_CF=y
168# 254#
169# Kernel Features 255# Kernel Features
170# 256#
257# CONFIG_TICK_ONESHOT is not set
258# CONFIG_NO_HZ is not set
259# CONFIG_HIGH_RES_TIMERS is not set
260CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
171# CONFIG_PREEMPT is not set 261# CONFIG_PREEMPT is not set
172# CONFIG_NO_IDLE_HZ is not set 262CONFIG_HZ=128
263# CONFIG_AEABI is not set
173# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 264# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
174CONFIG_SELECT_MEMORY_MODEL=y 265CONFIG_SELECT_MEMORY_MODEL=y
175CONFIG_FLATMEM_MANUAL=y 266CONFIG_FLATMEM_MANUAL=y
@@ -178,9 +269,13 @@ CONFIG_FLATMEM_MANUAL=y
178CONFIG_FLATMEM=y 269CONFIG_FLATMEM=y
179CONFIG_FLAT_NODE_MEM_MAP=y 270CONFIG_FLAT_NODE_MEM_MAP=y
180# CONFIG_SPARSEMEM_STATIC is not set 271# CONFIG_SPARSEMEM_STATIC is not set
272# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
181CONFIG_SPLIT_PTLOCK_CPUS=4096 273CONFIG_SPLIT_PTLOCK_CPUS=4096
274# CONFIG_RESOURCES_64BIT is not set
275CONFIG_ZONE_DMA_FLAG=1
276CONFIG_BOUNCE=y
277CONFIG_VIRT_TO_BUS=y
182CONFIG_LEDS=y 278CONFIG_LEDS=y
183CONFIG_LEDS_TIMER=y
184CONFIG_LEDS_CPU=y 279CONFIG_LEDS_CPU=y
185CONFIG_ALIGNMENT_TRAP=y 280CONFIG_ALIGNMENT_TRAP=y
186 281
@@ -191,6 +286,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
191CONFIG_ZBOOT_ROM_BSS=0x0 286CONFIG_ZBOOT_ROM_BSS=0x0
192CONFIG_CMDLINE="mem=32M console=ttyS0,38400 initrd=0x20410000,3145728 root=/dev/ram0 rw" 287CONFIG_CMDLINE="mem=32M console=ttyS0,38400 initrd=0x20410000,3145728 root=/dev/ram0 rw"
193# CONFIG_XIP_KERNEL is not set 288# CONFIG_XIP_KERNEL is not set
289# CONFIG_KEXEC is not set
194 290
195# 291#
196# Floating point emulation 292# Floating point emulation
@@ -215,6 +311,7 @@ CONFIG_BINFMT_ELF=y
215# Power management options 311# Power management options
216# 312#
217# CONFIG_PM is not set 313# CONFIG_PM is not set
314CONFIG_ARCH_SUSPEND_POSSIBLE=y
218 315
219# 316#
220# Networking 317# Networking
@@ -227,6 +324,11 @@ CONFIG_NET=y
227CONFIG_PACKET=y 324CONFIG_PACKET=y
228# CONFIG_PACKET_MMAP is not set 325# CONFIG_PACKET_MMAP is not set
229CONFIG_UNIX=y 326CONFIG_UNIX=y
327CONFIG_XFRM=y
328# CONFIG_XFRM_USER is not set
329# CONFIG_XFRM_SUB_POLICY is not set
330# CONFIG_XFRM_MIGRATE is not set
331# CONFIG_XFRM_STATISTICS is not set
230# CONFIG_NET_KEY is not set 332# CONFIG_NET_KEY is not set
231CONFIG_INET=y 333CONFIG_INET=y
232# CONFIG_IP_MULTICAST is not set 334# CONFIG_IP_MULTICAST is not set
@@ -243,23 +345,26 @@ CONFIG_IP_PNP_BOOTP=y
243# CONFIG_INET_AH is not set 345# CONFIG_INET_AH is not set
244# CONFIG_INET_ESP is not set 346# CONFIG_INET_ESP is not set
245# CONFIG_INET_IPCOMP is not set 347# CONFIG_INET_IPCOMP is not set
348# CONFIG_INET_XFRM_TUNNEL is not set
246# CONFIG_INET_TUNNEL is not set 349# CONFIG_INET_TUNNEL is not set
350CONFIG_INET_XFRM_MODE_TRANSPORT=y
351CONFIG_INET_XFRM_MODE_TUNNEL=y
352CONFIG_INET_XFRM_MODE_BEET=y
353# CONFIG_INET_LRO is not set
247CONFIG_INET_DIAG=y 354CONFIG_INET_DIAG=y
248CONFIG_INET_TCP_DIAG=y 355CONFIG_INET_TCP_DIAG=y
249# CONFIG_TCP_CONG_ADVANCED is not set 356# CONFIG_TCP_CONG_ADVANCED is not set
250CONFIG_TCP_CONG_BIC=y 357CONFIG_TCP_CONG_CUBIC=y
358CONFIG_DEFAULT_TCP_CONG="cubic"
359# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set 360# CONFIG_IPV6 is not set
361# CONFIG_INET6_XFRM_TUNNEL is not set
362# CONFIG_INET6_TUNNEL is not set
363# CONFIG_NETWORK_SECMARK is not set
252# CONFIG_NETFILTER is not set 364# CONFIG_NETFILTER is not set
253
254#
255# DCCP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_DCCP is not set 365# CONFIG_IP_DCCP is not set
258
259#
260# SCTP Configuration (EXPERIMENTAL)
261#
262# CONFIG_IP_SCTP is not set 366# CONFIG_IP_SCTP is not set
367# CONFIG_TIPC is not set
263# CONFIG_ATM is not set 368# CONFIG_ATM is not set
264# CONFIG_BRIDGE is not set 369# CONFIG_BRIDGE is not set
265# CONFIG_VLAN_8021Q is not set 370# CONFIG_VLAN_8021Q is not set
@@ -269,13 +374,8 @@ CONFIG_TCP_CONG_BIC=y
269# CONFIG_ATALK is not set 374# CONFIG_ATALK is not set
270# CONFIG_X25 is not set 375# CONFIG_X25 is not set
271# CONFIG_LAPB is not set 376# CONFIG_LAPB is not set
272# CONFIG_NET_DIVERT is not set
273# CONFIG_ECONET is not set 377# CONFIG_ECONET is not set
274# CONFIG_WAN_ROUTER is not set 378# CONFIG_WAN_ROUTER is not set
275
276#
277# QoS and/or fair queueing
278#
279# CONFIG_NET_SCHED is not set 379# CONFIG_NET_SCHED is not set
280 380
281# 381#
@@ -283,9 +383,20 @@ CONFIG_TCP_CONG_BIC=y
283# 383#
284# CONFIG_NET_PKTGEN is not set 384# CONFIG_NET_PKTGEN is not set
285# CONFIG_HAMRADIO is not set 385# CONFIG_HAMRADIO is not set
386# CONFIG_CAN is not set
286# CONFIG_IRDA is not set 387# CONFIG_IRDA is not set
287# CONFIG_BT is not set 388# CONFIG_BT is not set
389# CONFIG_AF_RXRPC is not set
390
391#
392# Wireless
393#
394# CONFIG_CFG80211 is not set
395# CONFIG_WIRELESS_EXT is not set
396# CONFIG_MAC80211 is not set
288# CONFIG_IEEE80211 is not set 397# CONFIG_IEEE80211 is not set
398# CONFIG_RFKILL is not set
399# CONFIG_NET_9P is not set
289 400
290# 401#
291# Device Drivers 402# Device Drivers
@@ -294,19 +405,14 @@ CONFIG_TCP_CONG_BIC=y
294# 405#
295# Generic Driver Options 406# Generic Driver Options
296# 407#
408CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
297CONFIG_STANDALONE=y 409CONFIG_STANDALONE=y
298CONFIG_PREVENT_FIRMWARE_BUILD=y 410CONFIG_PREVENT_FIRMWARE_BUILD=y
299CONFIG_FW_LOADER=y 411CONFIG_FW_LOADER=y
300# CONFIG_DEBUG_DRIVER is not set 412# CONFIG_DEBUG_DRIVER is not set
301 413# CONFIG_DEBUG_DEVRES is not set
302# 414# CONFIG_SYS_HYPERVISOR is not set
303# Connector - unified userspace <-> kernelspace linker
304#
305# CONFIG_CONNECTOR is not set 415# CONFIG_CONNECTOR is not set
306
307#
308# Memory Technology Devices (MTD)
309#
310CONFIG_MTD=y 416CONFIG_MTD=y
311# CONFIG_MTD_DEBUG is not set 417# CONFIG_MTD_DEBUG is not set
312# CONFIG_MTD_CONCAT is not set 418# CONFIG_MTD_CONCAT is not set
@@ -319,11 +425,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
319# User Modules And Translation Layers 425# User Modules And Translation Layers
320# 426#
321CONFIG_MTD_CHAR=y 427CONFIG_MTD_CHAR=y
428CONFIG_MTD_BLKDEVS=y
322CONFIG_MTD_BLOCK=y 429CONFIG_MTD_BLOCK=y
323# CONFIG_FTL is not set 430# CONFIG_FTL is not set
324# CONFIG_NFTL is not set 431# CONFIG_NFTL is not set
325# CONFIG_INFTL is not set 432# CONFIG_INFTL is not set
326# CONFIG_RFD_FTL is not set 433# CONFIG_RFD_FTL is not set
434# CONFIG_SSFDC is not set
435# CONFIG_MTD_OOPS is not set
327 436
328# 437#
329# RAM/ROM/Flash chip drivers 438# RAM/ROM/Flash chip drivers
@@ -349,15 +458,14 @@ CONFIG_MTD_CFI_UTIL=y
349# CONFIG_MTD_RAM is not set 458# CONFIG_MTD_RAM is not set
350# CONFIG_MTD_ROM is not set 459# CONFIG_MTD_ROM is not set
351# CONFIG_MTD_ABSENT is not set 460# CONFIG_MTD_ABSENT is not set
352# CONFIG_MTD_XIP is not set
353 461
354# 462#
355# Mapping drivers for chip access 463# Mapping drivers for chip access
356# 464#
357# CONFIG_MTD_COMPLEX_MAPPINGS is not set 465# CONFIG_MTD_COMPLEX_MAPPINGS is not set
358CONFIG_MTD_PHYSMAP=y 466CONFIG_MTD_PHYSMAP=y
359CONFIG_MTD_PHYSMAP_START=0 467CONFIG_MTD_PHYSMAP_START=0x0
360CONFIG_MTD_PHYSMAP_LEN=0 468CONFIG_MTD_PHYSMAP_LEN=0x0
361CONFIG_MTD_PHYSMAP_BANKWIDTH=0 469CONFIG_MTD_PHYSMAP_BANKWIDTH=0
362# CONFIG_MTD_ARM_INTEGRATOR is not set 470# CONFIG_MTD_ARM_INTEGRATOR is not set
363# CONFIG_MTD_PLATRAM is not set 471# CONFIG_MTD_PLATRAM is not set
@@ -368,7 +476,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
368# CONFIG_MTD_SLRAM is not set 476# CONFIG_MTD_SLRAM is not set
369# CONFIG_MTD_PHRAM is not set 477# CONFIG_MTD_PHRAM is not set
370# CONFIG_MTD_MTDRAM is not set 478# CONFIG_MTD_MTDRAM is not set
371# CONFIG_MTD_BLKMTD is not set
372# CONFIG_MTD_BLOCK2MTD is not set 479# CONFIG_MTD_BLOCK2MTD is not set
373 480
374# 481#
@@ -377,30 +484,15 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
377# CONFIG_MTD_DOC2000 is not set 484# CONFIG_MTD_DOC2000 is not set
378# CONFIG_MTD_DOC2001 is not set 485# CONFIG_MTD_DOC2001 is not set
379# CONFIG_MTD_DOC2001PLUS is not set 486# CONFIG_MTD_DOC2001PLUS is not set
380# CONFIG_MTD_AT91_DATAFLASH is not set
381
382#
383# NAND Flash Device Drivers
384#
385# CONFIG_MTD_NAND is not set 487# CONFIG_MTD_NAND is not set
386
387#
388# OneNAND Flash Device Drivers
389#
390# CONFIG_MTD_ONENAND is not set 488# CONFIG_MTD_ONENAND is not set
391 489
392# 490#
393# Parallel port support 491# UBI - Unsorted block images
394# 492#
493# CONFIG_MTD_UBI is not set
395# CONFIG_PARPORT is not set 494# CONFIG_PARPORT is not set
396 495CONFIG_BLK_DEV=y
397#
398# Plug and Play support
399#
400
401#
402# Block devices
403#
404# CONFIG_BLK_DEV_COW_COMMON is not set 496# CONFIG_BLK_DEV_COW_COMMON is not set
405CONFIG_BLK_DEV_LOOP=y 497CONFIG_BLK_DEV_LOOP=y
406# CONFIG_BLK_DEV_CRYPTOLOOP is not set 498# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -409,13 +501,15 @@ CONFIG_BLK_DEV_LOOP=y
409CONFIG_BLK_DEV_RAM=y 501CONFIG_BLK_DEV_RAM=y
410CONFIG_BLK_DEV_RAM_COUNT=16 502CONFIG_BLK_DEV_RAM_COUNT=16
411CONFIG_BLK_DEV_RAM_SIZE=8192 503CONFIG_BLK_DEV_RAM_SIZE=8192
412CONFIG_BLK_DEV_INITRD=y 504# CONFIG_BLK_DEV_XIP is not set
413# CONFIG_CDROM_PKTCDVD is not set 505# CONFIG_CDROM_PKTCDVD is not set
414# CONFIG_ATA_OVER_ETH is not set 506# CONFIG_ATA_OVER_ETH is not set
415 507CONFIG_MISC_DEVICES=y
416# 508# CONFIG_ATMEL_PWM is not set
417# ATA/ATAPI/MFM/RLL support 509# CONFIG_EEPROM_93CX6 is not set
418# 510# CONFIG_ATMEL_SSC is not set
511# CONFIG_ENCLOSURE_SERVICES is not set
512CONFIG_HAVE_IDE=y
419# CONFIG_IDE is not set 513# CONFIG_IDE is not set
420 514
421# 515#
@@ -423,6 +517,9 @@ CONFIG_BLK_DEV_INITRD=y
423# 517#
424# CONFIG_RAID_ATTRS is not set 518# CONFIG_RAID_ATTRS is not set
425CONFIG_SCSI=y 519CONFIG_SCSI=y
520CONFIG_SCSI_DMA=y
521# CONFIG_SCSI_TGT is not set
522# CONFIG_SCSI_NETLINK is not set
426CONFIG_SCSI_PROC_FS=y 523CONFIG_SCSI_PROC_FS=y
427 524
428# 525#
@@ -441,114 +538,78 @@ CONFIG_SCSI_PROC_FS=y
441# CONFIG_SCSI_MULTI_LUN is not set 538# CONFIG_SCSI_MULTI_LUN is not set
442# CONFIG_SCSI_CONSTANTS is not set 539# CONFIG_SCSI_CONSTANTS is not set
443# CONFIG_SCSI_LOGGING is not set 540# CONFIG_SCSI_LOGGING is not set
541# CONFIG_SCSI_SCAN_ASYNC is not set
542CONFIG_SCSI_WAIT_SCAN=m
444 543
445# 544#
446# SCSI Transport Attributes 545# SCSI Transports
447# 546#
448# CONFIG_SCSI_SPI_ATTRS is not set 547# CONFIG_SCSI_SPI_ATTRS is not set
449# CONFIG_SCSI_FC_ATTRS is not set 548# CONFIG_SCSI_FC_ATTRS is not set
450# CONFIG_SCSI_ISCSI_ATTRS is not set 549# CONFIG_SCSI_ISCSI_ATTRS is not set
451# CONFIG_SCSI_SAS_ATTRS is not set 550# CONFIG_SCSI_SAS_LIBSAS is not set
452 551# CONFIG_SCSI_SRP_ATTRS is not set
453# 552CONFIG_SCSI_LOWLEVEL=y
454# SCSI low-level drivers
455#
456# CONFIG_ISCSI_TCP is not set 553# CONFIG_ISCSI_TCP is not set
457# CONFIG_SCSI_SATA is not set
458# CONFIG_SCSI_DEBUG is not set 554# CONFIG_SCSI_DEBUG is not set
459 555# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
460# 556# CONFIG_ATA is not set
461# PCMCIA SCSI adapter support
462#
463# CONFIG_PCMCIA_AHA152X is not set
464# CONFIG_PCMCIA_FDOMAIN is not set
465# CONFIG_PCMCIA_NINJA_SCSI is not set
466# CONFIG_PCMCIA_QLOGIC is not set
467# CONFIG_PCMCIA_SYM53C500 is not set
468
469#
470# Multi-device support (RAID and LVM)
471#
472# CONFIG_MD is not set 557# CONFIG_MD is not set
473
474#
475# Fusion MPT device support
476#
477# CONFIG_FUSION is not set
478
479#
480# IEEE 1394 (FireWire) support
481#
482
483#
484# I2O device support
485#
486
487#
488# Network device support
489#
490CONFIG_NETDEVICES=y 558CONFIG_NETDEVICES=y
559# CONFIG_NETDEVICES_MULTIQUEUE is not set
491# CONFIG_DUMMY is not set 560# CONFIG_DUMMY is not set
492# CONFIG_BONDING is not set 561# CONFIG_BONDING is not set
562# CONFIG_MACVLAN is not set
493# CONFIG_EQUALIZER is not set 563# CONFIG_EQUALIZER is not set
494# CONFIG_TUN is not set 564# CONFIG_TUN is not set
495 565# CONFIG_VETH is not set
496#
497# PHY device support
498#
499# CONFIG_PHYLIB is not set 566# CONFIG_PHYLIB is not set
500
501#
502# Ethernet (10 or 100Mbit)
503#
504CONFIG_NET_ETHERNET=y 567CONFIG_NET_ETHERNET=y
505CONFIG_MII=y 568CONFIG_MII=y
506CONFIG_ARM_AT91_ETHER=y 569CONFIG_ARM_AT91_ETHER=y
570# CONFIG_AX88796 is not set
507# CONFIG_SMC91X is not set 571# CONFIG_SMC91X is not set
572# CONFIG_SMSC911X is not set
508# CONFIG_DM9000 is not set 573# CONFIG_DM9000 is not set
574# CONFIG_IBM_NEW_EMAC_ZMII is not set
575# CONFIG_IBM_NEW_EMAC_RGMII is not set
576# CONFIG_IBM_NEW_EMAC_TAH is not set
577# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
578# CONFIG_B44 is not set
579# CONFIG_CS89x0 is not set
580CONFIG_NETDEV_1000=y
581# CONFIG_E1000E_ENABLED is not set
582CONFIG_NETDEV_10000=y
509 583
510# 584#
511# Ethernet (1000 Mbit) 585# Wireless LAN
512# 586#
587# CONFIG_WLAN_PRE80211 is not set
588# CONFIG_WLAN_80211 is not set
513 589
514# 590#
515# Ethernet (10000 Mbit) 591# USB Network Adapters
516#
517
518#
519# Token Ring devices
520#
521
522#
523# Wireless LAN (non-hamradio)
524#
525# CONFIG_NET_RADIO is not set
526
527#
528# PCMCIA network device support
529# 592#
593# CONFIG_USB_CATC is not set
594# CONFIG_USB_KAWETH is not set
595# CONFIG_USB_PEGASUS is not set
596# CONFIG_USB_RTL8150 is not set
597# CONFIG_USB_USBNET is not set
530# CONFIG_NET_PCMCIA is not set 598# CONFIG_NET_PCMCIA is not set
531
532#
533# Wan interfaces
534#
535# CONFIG_WAN is not set 599# CONFIG_WAN is not set
536# CONFIG_PPP is not set 600# CONFIG_PPP is not set
537# CONFIG_SLIP is not set 601# CONFIG_SLIP is not set
538# CONFIG_SHAPER is not set
539# CONFIG_NETCONSOLE is not set 602# CONFIG_NETCONSOLE is not set
540# CONFIG_NETPOLL is not set 603# CONFIG_NETPOLL is not set
541# CONFIG_NET_POLL_CONTROLLER is not set 604# CONFIG_NET_POLL_CONTROLLER is not set
542
543#
544# ISDN subsystem
545#
546# CONFIG_ISDN is not set 605# CONFIG_ISDN is not set
547 606
548# 607#
549# Input device support 608# Input device support
550# 609#
551CONFIG_INPUT=y 610CONFIG_INPUT=y
611# CONFIG_INPUT_FF_MEMLESS is not set
612# CONFIG_INPUT_POLLDEV is not set
552 613
553# 614#
554# Userland interfaces 615# Userland interfaces
@@ -558,7 +619,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
558CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 619CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
559CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 620CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
560# CONFIG_INPUT_JOYDEV is not set 621# CONFIG_INPUT_JOYDEV is not set
561# CONFIG_INPUT_TSDEV is not set
562# CONFIG_INPUT_EVDEV is not set 622# CONFIG_INPUT_EVDEV is not set
563# CONFIG_INPUT_EVBUG is not set 623# CONFIG_INPUT_EVBUG is not set
564 624
@@ -568,6 +628,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
568# CONFIG_INPUT_KEYBOARD is not set 628# CONFIG_INPUT_KEYBOARD is not set
569# CONFIG_INPUT_MOUSE is not set 629# CONFIG_INPUT_MOUSE is not set
570# CONFIG_INPUT_JOYSTICK is not set 630# CONFIG_INPUT_JOYSTICK is not set
631# CONFIG_INPUT_TABLET is not set
571# CONFIG_INPUT_TOUCHSCREEN is not set 632# CONFIG_INPUT_TOUCHSCREEN is not set
572# CONFIG_INPUT_MISC is not set 633# CONFIG_INPUT_MISC is not set
573 634
@@ -583,6 +644,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
583CONFIG_VT=y 644CONFIG_VT=y
584CONFIG_VT_CONSOLE=y 645CONFIG_VT_CONSOLE=y
585CONFIG_HW_CONSOLE=y 646CONFIG_HW_CONSOLE=y
647# CONFIG_VT_HW_CONSOLE_BINDING is not set
586# CONFIG_SERIAL_NONSTANDARD is not set 648# CONFIG_SERIAL_NONSTANDARD is not set
587 649
588# 650#
@@ -595,64 +657,29 @@ CONFIG_HW_CONSOLE=y
595# 657#
596CONFIG_SERIAL_ATMEL=y 658CONFIG_SERIAL_ATMEL=y
597CONFIG_SERIAL_ATMEL_CONSOLE=y 659CONFIG_SERIAL_ATMEL_CONSOLE=y
660CONFIG_SERIAL_ATMEL_PDC=y
598# CONFIG_SERIAL_ATMEL_TTYAT is not set 661# CONFIG_SERIAL_ATMEL_TTYAT is not set
599CONFIG_SERIAL_CORE=y 662CONFIG_SERIAL_CORE=y
600CONFIG_SERIAL_CORE_CONSOLE=y 663CONFIG_SERIAL_CORE_CONSOLE=y
601CONFIG_UNIX98_PTYS=y 664CONFIG_UNIX98_PTYS=y
602CONFIG_LEGACY_PTYS=y 665CONFIG_LEGACY_PTYS=y
603CONFIG_LEGACY_PTY_COUNT=256 666CONFIG_LEGACY_PTY_COUNT=256
604
605#
606# IPMI
607#
608# CONFIG_IPMI_HANDLER is not set 667# CONFIG_IPMI_HANDLER is not set
609 668CONFIG_HW_RANDOM=m
610#
611# Watchdog Cards
612#
613CONFIG_WATCHDOG=y
614CONFIG_WATCHDOG_NOWAYOUT=y
615
616#
617# Watchdog Device Drivers
618#
619# CONFIG_SOFT_WATCHDOG is not set
620CONFIG_AT91RM9200_WATCHDOG=y
621
622#
623# USB-based Watchdog Cards
624#
625# CONFIG_USBPCWATCHDOG is not set
626# CONFIG_NVRAM is not set 669# CONFIG_NVRAM is not set
627CONFIG_RTC=y
628# CONFIG_AT91RM9200_RTC is not set
629# CONFIG_DTLK is not set
630# CONFIG_R3964 is not set 670# CONFIG_R3964 is not set
631 671
632# 672#
633# Ftape, the floppy tape device driver
634#
635
636#
637# PCMCIA character devices 673# PCMCIA character devices
638# 674#
639# CONFIG_SYNCLINK_CS is not set 675# CONFIG_SYNCLINK_CS is not set
640# CONFIG_CARDMAN_4000 is not set 676# CONFIG_CARDMAN_4000 is not set
641# CONFIG_CARDMAN_4040 is not set 677# CONFIG_CARDMAN_4040 is not set
678# CONFIG_IPWIRELESS is not set
642# CONFIG_RAW_DRIVER is not set 679# CONFIG_RAW_DRIVER is not set
643
644#
645# TPM devices
646#
647# CONFIG_TCG_TPM is not set 680# CONFIG_TCG_TPM is not set
648# CONFIG_TELCLOCK is not set
649CONFIG_AT91_SPI=y
650CONFIG_AT91_SPIDEV=y
651
652#
653# I2C support
654#
655CONFIG_I2C=y 681CONFIG_I2C=y
682CONFIG_I2C_BOARDINFO=y
656CONFIG_I2C_CHARDEV=y 683CONFIG_I2C_CHARDEV=y
657 684
658# 685#
@@ -665,43 +692,53 @@ CONFIG_I2C_CHARDEV=y
665# 692#
666# I2C Hardware Bus support 693# I2C Hardware Bus support
667# 694#
668CONFIG_I2C_AT91=y 695# CONFIG_I2C_GPIO is not set
696# CONFIG_I2C_OCORES is not set
669# CONFIG_I2C_PARPORT_LIGHT is not set 697# CONFIG_I2C_PARPORT_LIGHT is not set
698# CONFIG_I2C_SIMTEC is not set
699# CONFIG_I2C_TAOS_EVM is not set
670# CONFIG_I2C_STUB is not set 700# CONFIG_I2C_STUB is not set
671# CONFIG_I2C_PCA_ISA is not set 701# CONFIG_I2C_TINY_USB is not set
672 702
673# 703#
674# Miscellaneous I2C Chip support 704# Miscellaneous I2C Chip support
675# 705#
676# CONFIG_SENSORS_DS1337 is not set 706# CONFIG_DS1682 is not set
677# CONFIG_SENSORS_DS1374 is not set
678# CONFIG_SENSORS_EEPROM is not set 707# CONFIG_SENSORS_EEPROM is not set
679# CONFIG_SENSORS_PCF8574 is not set 708# CONFIG_SENSORS_PCF8574 is not set
680# CONFIG_SENSORS_PCA9539 is not set 709# CONFIG_PCF8575 is not set
681# CONFIG_SENSORS_PCF8591 is not set 710# CONFIG_SENSORS_PCF8591 is not set
682# CONFIG_SENSORS_RTC8564 is not set 711# CONFIG_TPS65010 is not set
683# CONFIG_SENSORS_MAX6875 is not set 712# CONFIG_SENSORS_MAX6875 is not set
684# CONFIG_RTC_X1205_I2C is not set 713# CONFIG_SENSORS_TSL2550 is not set
685# CONFIG_I2C_DEBUG_CORE is not set 714# CONFIG_I2C_DEBUG_CORE is not set
686# CONFIG_I2C_DEBUG_ALGO is not set 715# CONFIG_I2C_DEBUG_ALGO is not set
687# CONFIG_I2C_DEBUG_BUS is not set 716# CONFIG_I2C_DEBUG_BUS is not set
688# CONFIG_I2C_DEBUG_CHIP is not set 717# CONFIG_I2C_DEBUG_CHIP is not set
689 718
690# 719#
691# Hardware Monitoring support 720# SPI support
692# 721#
722# CONFIG_SPI is not set
723# CONFIG_SPI_MASTER is not set
724# CONFIG_W1 is not set
725# CONFIG_POWER_SUPPLY is not set
693CONFIG_HWMON=y 726CONFIG_HWMON=y
694# CONFIG_HWMON_VID is not set 727# CONFIG_HWMON_VID is not set
728# CONFIG_SENSORS_AD7418 is not set
695# CONFIG_SENSORS_ADM1021 is not set 729# CONFIG_SENSORS_ADM1021 is not set
696# CONFIG_SENSORS_ADM1025 is not set 730# CONFIG_SENSORS_ADM1025 is not set
697# CONFIG_SENSORS_ADM1026 is not set 731# CONFIG_SENSORS_ADM1026 is not set
732# CONFIG_SENSORS_ADM1029 is not set
698# CONFIG_SENSORS_ADM1031 is not set 733# CONFIG_SENSORS_ADM1031 is not set
699# CONFIG_SENSORS_ADM9240 is not set 734# CONFIG_SENSORS_ADM9240 is not set
700# CONFIG_SENSORS_ASB100 is not set 735# CONFIG_SENSORS_ADT7470 is not set
736# CONFIG_SENSORS_ADT7473 is not set
701# CONFIG_SENSORS_ATXP1 is not set 737# CONFIG_SENSORS_ATXP1 is not set
702# CONFIG_SENSORS_DS1621 is not set 738# CONFIG_SENSORS_DS1621 is not set
703# CONFIG_SENSORS_FSCHER is not set 739# CONFIG_SENSORS_F71805F is not set
704# CONFIG_SENSORS_FSCPOS is not set 740# CONFIG_SENSORS_F71882FG is not set
741# CONFIG_SENSORS_F75375S is not set
705# CONFIG_SENSORS_GL518SM is not set 742# CONFIG_SENSORS_GL518SM is not set
706# CONFIG_SENSORS_GL520SM is not set 743# CONFIG_SENSORS_GL520SM is not set
707# CONFIG_SENSORS_IT87 is not set 744# CONFIG_SENSORS_IT87 is not set
@@ -715,39 +752,72 @@ CONFIG_HWMON=y
715# CONFIG_SENSORS_LM87 is not set 752# CONFIG_SENSORS_LM87 is not set
716# CONFIG_SENSORS_LM90 is not set 753# CONFIG_SENSORS_LM90 is not set
717# CONFIG_SENSORS_LM92 is not set 754# CONFIG_SENSORS_LM92 is not set
755# CONFIG_SENSORS_LM93 is not set
718# CONFIG_SENSORS_MAX1619 is not set 756# CONFIG_SENSORS_MAX1619 is not set
757# CONFIG_SENSORS_MAX6650 is not set
719# CONFIG_SENSORS_PC87360 is not set 758# CONFIG_SENSORS_PC87360 is not set
759# CONFIG_SENSORS_PC87427 is not set
760# CONFIG_SENSORS_DME1737 is not set
720# CONFIG_SENSORS_SMSC47M1 is not set 761# CONFIG_SENSORS_SMSC47M1 is not set
762# CONFIG_SENSORS_SMSC47M192 is not set
721# CONFIG_SENSORS_SMSC47B397 is not set 763# CONFIG_SENSORS_SMSC47B397 is not set
764# CONFIG_SENSORS_ADS7828 is not set
765# CONFIG_SENSORS_THMC50 is not set
766# CONFIG_SENSORS_VT1211 is not set
722# CONFIG_SENSORS_W83781D is not set 767# CONFIG_SENSORS_W83781D is not set
768# CONFIG_SENSORS_W83791D is not set
723# CONFIG_SENSORS_W83792D is not set 769# CONFIG_SENSORS_W83792D is not set
770# CONFIG_SENSORS_W83793 is not set
724# CONFIG_SENSORS_W83L785TS is not set 771# CONFIG_SENSORS_W83L785TS is not set
772# CONFIG_SENSORS_W83L786NG is not set
725# CONFIG_SENSORS_W83627HF is not set 773# CONFIG_SENSORS_W83627HF is not set
726# CONFIG_SENSORS_W83627EHF is not set 774# CONFIG_SENSORS_W83627EHF is not set
727# CONFIG_HWMON_DEBUG_CHIP is not set 775# CONFIG_HWMON_DEBUG_CHIP is not set
776CONFIG_WATCHDOG=y
777CONFIG_WATCHDOG_NOWAYOUT=y
728 778
729# 779#
730# Misc devices 780# Watchdog Device Drivers
731# 781#
782# CONFIG_SOFT_WATCHDOG is not set
783CONFIG_AT91RM9200_WATCHDOG=y
732 784
733# 785#
734# Multimedia Capabilities Port drivers 786# USB-based Watchdog Cards
735# 787#
788# CONFIG_USBPCWATCHDOG is not set
736 789
737# 790#
738# Multimedia devices 791# Sonics Silicon Backplane
739# 792#
740# CONFIG_VIDEO_DEV is not set 793CONFIG_SSB_POSSIBLE=y
794# CONFIG_SSB is not set
741 795
742# 796#
743# Digital Video Broadcasting Devices 797# Multifunction device drivers
744# 798#
745# CONFIG_DVB is not set 799# CONFIG_MFD_SM501 is not set
800# CONFIG_MFD_ASIC3 is not set
801
802#
803# Multimedia devices
804#
805# CONFIG_VIDEO_DEV is not set
806# CONFIG_DVB_CORE is not set
807# CONFIG_DAB is not set
746 808
747# 809#
748# Graphics support 810# Graphics support
749# 811#
812# CONFIG_VGASTATE is not set
813# CONFIG_VIDEO_OUTPUT_CONTROL is not set
750# CONFIG_FB is not set 814# CONFIG_FB is not set
815# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
816
817#
818# Display device support
819#
820# CONFIG_DISPLAY_SUPPORT is not set
751 821
752# 822#
753# Console display driver support 823# Console display driver support
@@ -759,20 +829,34 @@ CONFIG_DUMMY_CONSOLE=y
759# Sound 829# Sound
760# 830#
761# CONFIG_SOUND is not set 831# CONFIG_SOUND is not set
832CONFIG_HID_SUPPORT=y
833CONFIG_HID=y
834CONFIG_HID_DEBUG=y
835# CONFIG_HIDRAW is not set
762 836
763# 837#
764# USB support 838# USB Input Devices
765# 839#
840# CONFIG_USB_HID is not set
841
842#
843# USB HID Boot Protocol drivers
844#
845# CONFIG_USB_KBD is not set
846# CONFIG_USB_MOUSE is not set
847CONFIG_USB_SUPPORT=y
766CONFIG_USB_ARCH_HAS_HCD=y 848CONFIG_USB_ARCH_HAS_HCD=y
767CONFIG_USB_ARCH_HAS_OHCI=y 849CONFIG_USB_ARCH_HAS_OHCI=y
850# CONFIG_USB_ARCH_HAS_EHCI is not set
768CONFIG_USB=y 851CONFIG_USB=y
769CONFIG_USB_DEBUG=y 852CONFIG_USB_DEBUG=y
853# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
770 854
771# 855#
772# Miscellaneous USB options 856# Miscellaneous USB options
773# 857#
774CONFIG_USB_DEVICEFS=y 858CONFIG_USB_DEVICEFS=y
775# CONFIG_USB_BANDWIDTH is not set 859CONFIG_USB_DEVICE_CLASS=y
776# CONFIG_USB_DYNAMIC_MINORS is not set 860# CONFIG_USB_DYNAMIC_MINORS is not set
777# CONFIG_USB_OTG is not set 861# CONFIG_USB_OTG is not set
778 862
@@ -781,9 +865,11 @@ CONFIG_USB_DEVICEFS=y
781# 865#
782# CONFIG_USB_ISP116X_HCD is not set 866# CONFIG_USB_ISP116X_HCD is not set
783CONFIG_USB_OHCI_HCD=y 867CONFIG_USB_OHCI_HCD=y
784# CONFIG_USB_OHCI_BIG_ENDIAN is not set 868# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
869# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
785CONFIG_USB_OHCI_LITTLE_ENDIAN=y 870CONFIG_USB_OHCI_LITTLE_ENDIAN=y
786# CONFIG_USB_SL811_HCD is not set 871# CONFIG_USB_SL811_HCD is not set
872# CONFIG_USB_R8A66597_HCD is not set
787 873
788# 874#
789# USB Device Class drivers 875# USB Device Class drivers
@@ -802,80 +888,42 @@ CONFIG_USB_STORAGE=y
802# CONFIG_USB_STORAGE_DEBUG is not set 888# CONFIG_USB_STORAGE_DEBUG is not set
803# CONFIG_USB_STORAGE_DATAFAB is not set 889# CONFIG_USB_STORAGE_DATAFAB is not set
804# CONFIG_USB_STORAGE_FREECOM is not set 890# CONFIG_USB_STORAGE_FREECOM is not set
891# CONFIG_USB_STORAGE_ISD200 is not set
805# CONFIG_USB_STORAGE_DPCM is not set 892# CONFIG_USB_STORAGE_DPCM is not set
806# CONFIG_USB_STORAGE_USBAT is not set 893# CONFIG_USB_STORAGE_USBAT is not set
807# CONFIG_USB_STORAGE_SDDR09 is not set 894# CONFIG_USB_STORAGE_SDDR09 is not set
808# CONFIG_USB_STORAGE_SDDR55 is not set 895# CONFIG_USB_STORAGE_SDDR55 is not set
809# CONFIG_USB_STORAGE_JUMPSHOT is not set 896# CONFIG_USB_STORAGE_JUMPSHOT is not set
810 897# CONFIG_USB_STORAGE_ALAUDA is not set
811# 898# CONFIG_USB_STORAGE_KARMA is not set
812# USB Input Devices 899# CONFIG_USB_LIBUSUAL is not set
813#
814# CONFIG_USB_HID is not set
815
816#
817# USB HID Boot Protocol drivers
818#
819# CONFIG_USB_KBD is not set
820# CONFIG_USB_MOUSE is not set
821# CONFIG_USB_AIPTEK is not set
822# CONFIG_USB_WACOM is not set
823# CONFIG_USB_ACECAD is not set
824# CONFIG_USB_KBTAB is not set
825# CONFIG_USB_POWERMATE is not set
826# CONFIG_USB_MTOUCH is not set
827# CONFIG_USB_ITMTOUCH is not set
828# CONFIG_USB_EGALAX is not set
829# CONFIG_USB_YEALINK is not set
830# CONFIG_USB_XPAD is not set
831# CONFIG_USB_ATI_REMOTE is not set
832# CONFIG_USB_KEYSPAN_REMOTE is not set
833# CONFIG_USB_APPLETOUCH is not set
834 900
835# 901#
836# USB Imaging devices 902# USB Imaging devices
837# 903#
838# CONFIG_USB_MDC800 is not set 904# CONFIG_USB_MDC800 is not set
839# CONFIG_USB_MICROTEK is not set 905# CONFIG_USB_MICROTEK is not set
840
841#
842# USB Multimedia devices
843#
844# CONFIG_USB_DABUSB is not set
845
846#
847# Video4Linux support is needed for USB Multimedia device support
848#
849
850#
851# USB Network Adapters
852#
853# CONFIG_USB_CATC is not set
854# CONFIG_USB_KAWETH is not set
855# CONFIG_USB_PEGASUS is not set
856# CONFIG_USB_RTL8150 is not set
857# CONFIG_USB_USBNET is not set
858CONFIG_USB_MON=y 906CONFIG_USB_MON=y
859 907
860# 908#
861# USB port drivers 909# USB port drivers
862# 910#
863
864#
865# USB Serial Converter support
866#
867CONFIG_USB_SERIAL=y 911CONFIG_USB_SERIAL=y
868CONFIG_USB_SERIAL_CONSOLE=y 912CONFIG_USB_SERIAL_CONSOLE=y
913CONFIG_USB_EZUSB=y
869CONFIG_USB_SERIAL_GENERIC=y 914CONFIG_USB_SERIAL_GENERIC=y
915# CONFIG_USB_SERIAL_AIRCABLE is not set
870# CONFIG_USB_SERIAL_AIRPRIME is not set 916# CONFIG_USB_SERIAL_AIRPRIME is not set
871# CONFIG_USB_SERIAL_ANYDATA is not set 917# CONFIG_USB_SERIAL_ARK3116 is not set
872# CONFIG_USB_SERIAL_BELKIN is not set 918# CONFIG_USB_SERIAL_BELKIN is not set
919# CONFIG_USB_SERIAL_CH341 is not set
873# CONFIG_USB_SERIAL_WHITEHEAT is not set 920# CONFIG_USB_SERIAL_WHITEHEAT is not set
874# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 921# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
875# CONFIG_USB_SERIAL_CP2101 is not set 922# CONFIG_USB_SERIAL_CP2101 is not set
876# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 923# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
877# CONFIG_USB_SERIAL_EMPEG is not set 924# CONFIG_USB_SERIAL_EMPEG is not set
878CONFIG_USB_SERIAL_FTDI_SIO=y 925CONFIG_USB_SERIAL_FTDI_SIO=y
926# CONFIG_USB_SERIAL_FUNSOFT is not set
879# CONFIG_USB_SERIAL_VISOR is not set 927# CONFIG_USB_SERIAL_VISOR is not set
880# CONFIG_USB_SERIAL_IPAQ is not set 928# CONFIG_USB_SERIAL_IPAQ is not set
881# CONFIG_USB_SERIAL_IR is not set 929# CONFIG_USB_SERIAL_IR is not set
@@ -883,6 +931,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
883# CONFIG_USB_SERIAL_EDGEPORT_TI is not set 931# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
884# CONFIG_USB_SERIAL_GARMIN is not set 932# CONFIG_USB_SERIAL_GARMIN is not set
885# CONFIG_USB_SERIAL_IPW is not set 933# CONFIG_USB_SERIAL_IPW is not set
934# CONFIG_USB_SERIAL_IUU is not set
886# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set 935# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
887CONFIG_USB_SERIAL_KEYSPAN=y 936CONFIG_USB_SERIAL_KEYSPAN=y
888CONFIG_USB_SERIAL_KEYSPAN_MPR=y 937CONFIG_USB_SERIAL_KEYSPAN_MPR=y
@@ -900,46 +949,66 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
900# CONFIG_USB_SERIAL_KLSI is not set 949# CONFIG_USB_SERIAL_KLSI is not set
901# CONFIG_USB_SERIAL_KOBIL_SCT is not set 950# CONFIG_USB_SERIAL_KOBIL_SCT is not set
902CONFIG_USB_SERIAL_MCT_U232=y 951CONFIG_USB_SERIAL_MCT_U232=y
952# CONFIG_USB_SERIAL_MOS7720 is not set
953# CONFIG_USB_SERIAL_MOS7840 is not set
954# CONFIG_USB_SERIAL_NAVMAN is not set
903# CONFIG_USB_SERIAL_PL2303 is not set 955# CONFIG_USB_SERIAL_PL2303 is not set
956# CONFIG_USB_SERIAL_OTI6858 is not set
904# CONFIG_USB_SERIAL_HP4X is not set 957# CONFIG_USB_SERIAL_HP4X is not set
905# CONFIG_USB_SERIAL_SAFE is not set 958# CONFIG_USB_SERIAL_SAFE is not set
959# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
906# CONFIG_USB_SERIAL_TI is not set 960# CONFIG_USB_SERIAL_TI is not set
907# CONFIG_USB_SERIAL_CYBERJACK is not set 961# CONFIG_USB_SERIAL_CYBERJACK is not set
908# CONFIG_USB_SERIAL_XIRCOM is not set 962# CONFIG_USB_SERIAL_XIRCOM is not set
909# CONFIG_USB_SERIAL_OPTION is not set 963# CONFIG_USB_SERIAL_OPTION is not set
910# CONFIG_USB_SERIAL_OMNINET is not set 964# CONFIG_USB_SERIAL_OMNINET is not set
911CONFIG_USB_EZUSB=y 965# CONFIG_USB_SERIAL_DEBUG is not set
912 966
913# 967#
914# USB Miscellaneous drivers 968# USB Miscellaneous drivers
915# 969#
916# CONFIG_USB_EMI62 is not set 970# CONFIG_USB_EMI62 is not set
917# CONFIG_USB_EMI26 is not set 971# CONFIG_USB_EMI26 is not set
972# CONFIG_USB_ADUTUX is not set
918# CONFIG_USB_AUERSWALD is not set 973# CONFIG_USB_AUERSWALD is not set
919# CONFIG_USB_RIO500 is not set 974# CONFIG_USB_RIO500 is not set
920# CONFIG_USB_LEGOTOWER is not set 975# CONFIG_USB_LEGOTOWER is not set
921# CONFIG_USB_LCD is not set 976# CONFIG_USB_LCD is not set
977# CONFIG_USB_BERRY_CHARGE is not set
922# CONFIG_USB_LED is not set 978# CONFIG_USB_LED is not set
979# CONFIG_USB_CYPRESS_CY7C63 is not set
923# CONFIG_USB_CYTHERM is not set 980# CONFIG_USB_CYTHERM is not set
924# CONFIG_USB_PHIDGETKIT is not set 981# CONFIG_USB_PHIDGET is not set
925# CONFIG_USB_PHIDGETSERVO is not set
926# CONFIG_USB_IDMOUSE is not set 982# CONFIG_USB_IDMOUSE is not set
983# CONFIG_USB_FTDI_ELAN is not set
984# CONFIG_USB_APPLEDISPLAY is not set
927# CONFIG_USB_LD is not set 985# CONFIG_USB_LD is not set
986# CONFIG_USB_TRANCEVIBRATOR is not set
987# CONFIG_USB_IOWARRIOR is not set
928# CONFIG_USB_TEST is not set 988# CONFIG_USB_TEST is not set
989# CONFIG_USB_GADGET is not set
990# CONFIG_MMC is not set
991CONFIG_NEW_LEDS=y
992CONFIG_LEDS_CLASS=y
929 993
930# 994#
931# USB DSL modem support 995# LED drivers
932# 996#
997CONFIG_LEDS_GPIO=y
933 998
934# 999#
935# USB Gadget Support 1000# LED Triggers
936# 1001#
937# CONFIG_USB_GADGET is not set 1002CONFIG_LEDS_TRIGGERS=y
1003# CONFIG_LEDS_TRIGGER_TIMER is not set
1004CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1005CONFIG_RTC_LIB=y
1006# CONFIG_RTC_CLASS is not set
938 1007
939# 1008#
940# MMC/SD Card support 1009# Userspace I/O
941# 1010#
942# CONFIG_MMC is not set 1011# CONFIG_UIO is not set
943 1012
944# 1013#
945# File systems 1014# File systems
@@ -948,16 +1017,17 @@ CONFIG_EXT2_FS=y
948# CONFIG_EXT2_FS_XATTR is not set 1017# CONFIG_EXT2_FS_XATTR is not set
949# CONFIG_EXT2_FS_XIP is not set 1018# CONFIG_EXT2_FS_XIP is not set
950# CONFIG_EXT3_FS is not set 1019# CONFIG_EXT3_FS is not set
951# CONFIG_JBD is not set 1020# CONFIG_EXT4DEV_FS is not set
952# CONFIG_REISERFS_FS is not set 1021# CONFIG_REISERFS_FS is not set
953# CONFIG_JFS_FS is not set 1022# CONFIG_JFS_FS is not set
954# CONFIG_FS_POSIX_ACL is not set 1023# CONFIG_FS_POSIX_ACL is not set
955# CONFIG_XFS_FS is not set 1024# CONFIG_XFS_FS is not set
956# CONFIG_MINIX_FS is not set 1025# CONFIG_GFS2_FS is not set
957# CONFIG_ROMFS_FS is not set 1026# CONFIG_OCFS2_FS is not set
1027CONFIG_DNOTIFY=y
958CONFIG_INOTIFY=y 1028CONFIG_INOTIFY=y
1029CONFIG_INOTIFY_USER=y
959# CONFIG_QUOTA is not set 1030# CONFIG_QUOTA is not set
960CONFIG_DNOTIFY=y
961# CONFIG_AUTOFS_FS is not set 1031# CONFIG_AUTOFS_FS is not set
962# CONFIG_AUTOFS4_FS is not set 1032# CONFIG_AUTOFS4_FS is not set
963# CONFIG_FUSE_FS is not set 1033# CONFIG_FUSE_FS is not set
@@ -979,11 +1049,12 @@ CONFIG_DNOTIFY=y
979# Pseudo filesystems 1049# Pseudo filesystems
980# 1050#
981CONFIG_PROC_FS=y 1051CONFIG_PROC_FS=y
1052CONFIG_PROC_SYSCTL=y
982CONFIG_SYSFS=y 1053CONFIG_SYSFS=y
983CONFIG_TMPFS=y 1054CONFIG_TMPFS=y
1055# CONFIG_TMPFS_POSIX_ACL is not set
984# CONFIG_HUGETLB_PAGE is not set 1056# CONFIG_HUGETLB_PAGE is not set
985CONFIG_RAMFS=y 1057# CONFIG_CONFIGFS_FS is not set
986# CONFIG_RELAYFS_FS is not set
987 1058
988# 1059#
989# Miscellaneous filesystems 1060# Miscellaneous filesystems
@@ -995,18 +1066,16 @@ CONFIG_RAMFS=y
995# CONFIG_BEFS_FS is not set 1066# CONFIG_BEFS_FS is not set
996# CONFIG_BFS_FS is not set 1067# CONFIG_BFS_FS is not set
997# CONFIG_EFS_FS is not set 1068# CONFIG_EFS_FS is not set
998# CONFIG_JFFS_FS is not set
999# CONFIG_JFFS2_FS is not set 1069# CONFIG_JFFS2_FS is not set
1000CONFIG_CRAMFS=y 1070CONFIG_CRAMFS=y
1001# CONFIG_VXFS_FS is not set 1071# CONFIG_VXFS_FS is not set
1072# CONFIG_MINIX_FS is not set
1002# CONFIG_HPFS_FS is not set 1073# CONFIG_HPFS_FS is not set
1003# CONFIG_QNX4FS_FS is not set 1074# CONFIG_QNX4FS_FS is not set
1075# CONFIG_ROMFS_FS is not set
1004# CONFIG_SYSV_FS is not set 1076# CONFIG_SYSV_FS is not set
1005# CONFIG_UFS_FS is not set 1077# CONFIG_UFS_FS is not set
1006 1078CONFIG_NETWORK_FILESYSTEMS=y
1007#
1008# Network File Systems
1009#
1010CONFIG_NFS_FS=y 1079CONFIG_NFS_FS=y
1011CONFIG_NFS_V3=y 1080CONFIG_NFS_V3=y
1012# CONFIG_NFS_V3_ACL is not set 1081# CONFIG_NFS_V3_ACL is not set
@@ -1019,6 +1088,7 @@ CONFIG_LOCKD_V4=y
1019CONFIG_NFS_COMMON=y 1088CONFIG_NFS_COMMON=y
1020CONFIG_SUNRPC=y 1089CONFIG_SUNRPC=y
1021CONFIG_SUNRPC_GSS=y 1090CONFIG_SUNRPC_GSS=y
1091# CONFIG_SUNRPC_BIND34 is not set
1022CONFIG_RPCSEC_GSS_KRB5=y 1092CONFIG_RPCSEC_GSS_KRB5=y
1023# CONFIG_RPCSEC_GSS_SPKM3 is not set 1093# CONFIG_RPCSEC_GSS_SPKM3 is not set
1024# CONFIG_SMB_FS is not set 1094# CONFIG_SMB_FS is not set
@@ -1026,45 +1096,57 @@ CONFIG_RPCSEC_GSS_KRB5=y
1026# CONFIG_NCP_FS is not set 1096# CONFIG_NCP_FS is not set
1027# CONFIG_CODA_FS is not set 1097# CONFIG_CODA_FS is not set
1028# CONFIG_AFS_FS is not set 1098# CONFIG_AFS_FS is not set
1029# CONFIG_9P_FS is not set
1030 1099
1031# 1100#
1032# Partition Types 1101# Partition Types
1033# 1102#
1034# CONFIG_PARTITION_ADVANCED is not set 1103# CONFIG_PARTITION_ADVANCED is not set
1035CONFIG_MSDOS_PARTITION=y 1104CONFIG_MSDOS_PARTITION=y
1036
1037#
1038# Native Language Support
1039#
1040# CONFIG_NLS is not set 1105# CONFIG_NLS is not set
1041 1106# CONFIG_DLM is not set
1042#
1043# Profiling support
1044#
1045# CONFIG_PROFILING is not set
1046 1107
1047# 1108#
1048# Kernel hacking 1109# Kernel hacking
1049# 1110#
1050# CONFIG_PRINTK_TIME is not set 1111# CONFIG_PRINTK_TIME is not set
1051CONFIG_DEBUG_KERNEL=y 1112CONFIG_ENABLE_WARN_DEPRECATED=y
1113CONFIG_ENABLE_MUST_CHECK=y
1052# CONFIG_MAGIC_SYSRQ is not set 1114# CONFIG_MAGIC_SYSRQ is not set
1053CONFIG_LOG_BUF_SHIFT=14 1115# CONFIG_UNUSED_SYMBOLS is not set
1116# CONFIG_DEBUG_FS is not set
1117# CONFIG_HEADERS_CHECK is not set
1118CONFIG_DEBUG_KERNEL=y
1119# CONFIG_DEBUG_SHIRQ is not set
1054CONFIG_DETECT_SOFTLOCKUP=y 1120CONFIG_DETECT_SOFTLOCKUP=y
1121CONFIG_SCHED_DEBUG=y
1055# CONFIG_SCHEDSTATS is not set 1122# CONFIG_SCHEDSTATS is not set
1056# CONFIG_DEBUG_SLAB is not set 1123# CONFIG_TIMER_STATS is not set
1124# CONFIG_SLUB_DEBUG_ON is not set
1125# CONFIG_SLUB_STATS is not set
1126# CONFIG_DEBUG_RT_MUTEXES is not set
1127# CONFIG_RT_MUTEX_TESTER is not set
1057# CONFIG_DEBUG_SPINLOCK is not set 1128# CONFIG_DEBUG_SPINLOCK is not set
1129# CONFIG_DEBUG_MUTEXES is not set
1130# CONFIG_DEBUG_LOCK_ALLOC is not set
1131# CONFIG_PROVE_LOCKING is not set
1132# CONFIG_LOCK_STAT is not set
1058# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1133# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1134# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1059# CONFIG_DEBUG_KOBJECT is not set 1135# CONFIG_DEBUG_KOBJECT is not set
1060CONFIG_DEBUG_BUGVERBOSE=y 1136CONFIG_DEBUG_BUGVERBOSE=y
1061# CONFIG_DEBUG_INFO is not set 1137# CONFIG_DEBUG_INFO is not set
1062# CONFIG_DEBUG_FS is not set
1063# CONFIG_DEBUG_VM is not set 1138# CONFIG_DEBUG_VM is not set
1139# CONFIG_DEBUG_LIST is not set
1140# CONFIG_DEBUG_SG is not set
1064CONFIG_FRAME_POINTER=y 1141CONFIG_FRAME_POINTER=y
1142# CONFIG_BOOT_PRINTK_DELAY is not set
1065# CONFIG_RCU_TORTURE_TEST is not set 1143# CONFIG_RCU_TORTURE_TEST is not set
1144# CONFIG_BACKTRACE_SELF_TEST is not set
1145# CONFIG_FAULT_INJECTION is not set
1146# CONFIG_SAMPLES is not set
1066CONFIG_DEBUG_USER=y 1147CONFIG_DEBUG_USER=y
1067# CONFIG_DEBUG_ERRORS is not set 1148# CONFIG_DEBUG_ERRORS is not set
1149# CONFIG_DEBUG_STACK_USAGE is not set
1068CONFIG_DEBUG_LL=y 1150CONFIG_DEBUG_LL=y
1069# CONFIG_DEBUG_ICEDCC is not set 1151# CONFIG_DEBUG_ICEDCC is not set
1070 1152
@@ -1073,12 +1155,14 @@ CONFIG_DEBUG_LL=y
1073# 1155#
1074# CONFIG_KEYS is not set 1156# CONFIG_KEYS is not set
1075# CONFIG_SECURITY is not set 1157# CONFIG_SECURITY is not set
1076 1158# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1077#
1078# Cryptographic options
1079#
1080CONFIG_CRYPTO=y 1159CONFIG_CRYPTO=y
1160CONFIG_CRYPTO_ALGAPI=y
1161CONFIG_CRYPTO_BLKCIPHER=y
1162# CONFIG_CRYPTO_SEQIV is not set
1163CONFIG_CRYPTO_MANAGER=y
1081# CONFIG_CRYPTO_HMAC is not set 1164# CONFIG_CRYPTO_HMAC is not set
1165# CONFIG_CRYPTO_XCBC is not set
1082# CONFIG_CRYPTO_NULL is not set 1166# CONFIG_CRYPTO_NULL is not set
1083# CONFIG_CRYPTO_MD4 is not set 1167# CONFIG_CRYPTO_MD4 is not set
1084CONFIG_CRYPTO_MD5=y 1168CONFIG_CRYPTO_MD5=y
@@ -1087,7 +1171,18 @@ CONFIG_CRYPTO_MD5=y
1087# CONFIG_CRYPTO_SHA512 is not set 1171# CONFIG_CRYPTO_SHA512 is not set
1088# CONFIG_CRYPTO_WP512 is not set 1172# CONFIG_CRYPTO_WP512 is not set
1089# CONFIG_CRYPTO_TGR192 is not set 1173# CONFIG_CRYPTO_TGR192 is not set
1174# CONFIG_CRYPTO_GF128MUL is not set
1175# CONFIG_CRYPTO_ECB is not set
1176CONFIG_CRYPTO_CBC=y
1177# CONFIG_CRYPTO_PCBC is not set
1178# CONFIG_CRYPTO_LRW is not set
1179# CONFIG_CRYPTO_XTS is not set
1180# CONFIG_CRYPTO_CTR is not set
1181# CONFIG_CRYPTO_GCM is not set
1182# CONFIG_CRYPTO_CCM is not set
1183# CONFIG_CRYPTO_CRYPTD is not set
1090CONFIG_CRYPTO_DES=y 1184CONFIG_CRYPTO_DES=y
1185# CONFIG_CRYPTO_FCRYPT is not set
1091# CONFIG_CRYPTO_BLOWFISH is not set 1186# CONFIG_CRYPTO_BLOWFISH is not set
1092# CONFIG_CRYPTO_TWOFISH is not set 1187# CONFIG_CRYPTO_TWOFISH is not set
1093# CONFIG_CRYPTO_SERPENT is not set 1188# CONFIG_CRYPTO_SERPENT is not set
@@ -1098,20 +1193,29 @@ CONFIG_CRYPTO_DES=y
1098# CONFIG_CRYPTO_ARC4 is not set 1193# CONFIG_CRYPTO_ARC4 is not set
1099# CONFIG_CRYPTO_KHAZAD is not set 1194# CONFIG_CRYPTO_KHAZAD is not set
1100# CONFIG_CRYPTO_ANUBIS is not set 1195# CONFIG_CRYPTO_ANUBIS is not set
1196# CONFIG_CRYPTO_SEED is not set
1197# CONFIG_CRYPTO_SALSA20 is not set
1101# CONFIG_CRYPTO_DEFLATE is not set 1198# CONFIG_CRYPTO_DEFLATE is not set
1102# CONFIG_CRYPTO_MICHAEL_MIC is not set 1199# CONFIG_CRYPTO_MICHAEL_MIC is not set
1103# CONFIG_CRYPTO_CRC32C is not set 1200# CONFIG_CRYPTO_CRC32C is not set
1201# CONFIG_CRYPTO_CAMELLIA is not set
1104# CONFIG_CRYPTO_TEST is not set 1202# CONFIG_CRYPTO_TEST is not set
1105 1203# CONFIG_CRYPTO_AUTHENC is not set
1106# 1204# CONFIG_CRYPTO_LZO is not set
1107# Hardware crypto devices 1205CONFIG_CRYPTO_HW=y
1108#
1109 1206
1110# 1207#
1111# Library routines 1208# Library routines
1112# 1209#
1210CONFIG_BITREVERSE=y
1113# CONFIG_CRC_CCITT is not set 1211# CONFIG_CRC_CCITT is not set
1114# CONFIG_CRC16 is not set 1212# CONFIG_CRC16 is not set
1213# CONFIG_CRC_ITU_T is not set
1115CONFIG_CRC32=y 1214CONFIG_CRC32=y
1215# CONFIG_CRC7 is not set
1116# CONFIG_LIBCRC32C is not set 1216# CONFIG_LIBCRC32C is not set
1117CONFIG_ZLIB_INFLATE=y 1217CONFIG_ZLIB_INFLATE=y
1218CONFIG_PLIST=y
1219CONFIG_HAS_IOMEM=y
1220CONFIG_HAS_IOPORT=y
1221CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/ecbat91_defconfig b/arch/arm/configs/ecbat91_defconfig
new file mode 100644
index 000000000000..90ed214e3673
--- /dev/null
+++ b/arch/arm/configs/ecbat91_defconfig
@@ -0,0 +1,1315 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4
4# Sat Jun 9 01:30:18 2007
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27
28#
29# Code maturity level options
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_LOCK_KERNEL=y
34CONFIG_INIT_ENV_ARG_LIMIT=32
35
36#
37# General setup
38#
39CONFIG_LOCALVERSION=""
40CONFIG_LOCALVERSION_AUTO=y
41CONFIG_SWAP=y
42CONFIG_SYSVIPC=y
43# CONFIG_IPC_NS is not set
44CONFIG_SYSVIPC_SYSCTL=y
45# CONFIG_POSIX_MQUEUE is not set
46# CONFIG_BSD_PROCESS_ACCT is not set
47# CONFIG_TASKSTATS is not set
48# CONFIG_UTS_NS is not set
49# CONFIG_AUDIT is not set
50CONFIG_IKCONFIG=y
51CONFIG_IKCONFIG_PROC=y
52CONFIG_LOG_BUF_SHIFT=14
53CONFIG_SYSFS_DEPRECATED=y
54# CONFIG_RELAY is not set
55# CONFIG_BLK_DEV_INITRD is not set
56CONFIG_CC_OPTIMIZE_FOR_SIZE=y
57CONFIG_SYSCTL=y
58# CONFIG_EMBEDDED is not set
59CONFIG_UID16=y
60CONFIG_SYSCTL_SYSCALL=y
61CONFIG_KALLSYMS=y
62# CONFIG_KALLSYMS_EXTRA_PASS is not set
63CONFIG_HOTPLUG=y
64CONFIG_PRINTK=y
65CONFIG_BUG=y
66CONFIG_ELF_CORE=y
67CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y
73CONFIG_EVENTFD=y
74CONFIG_SHMEM=y
75CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_SLAB=y
77# CONFIG_SLUB is not set
78# CONFIG_SLOB is not set
79CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0
82
83#
84# Loadable module support
85#
86CONFIG_MODULES=y
87CONFIG_MODULE_UNLOAD=y
88# CONFIG_MODULE_FORCE_UNLOAD is not set
89# CONFIG_MODVERSIONS is not set
90# CONFIG_MODULE_SRCVERSION_ALL is not set
91CONFIG_KMOD=y
92
93#
94# Block layer
95#
96CONFIG_BLOCK=y
97# CONFIG_LBD is not set
98# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set
100
101#
102# IO Schedulers
103#
104CONFIG_IOSCHED_NOOP=y
105CONFIG_IOSCHED_AS=y
106# CONFIG_IOSCHED_DEADLINE is not set
107# CONFIG_IOSCHED_CFQ is not set
108CONFIG_DEFAULT_AS=y
109# CONFIG_DEFAULT_DEADLINE is not set
110# CONFIG_DEFAULT_CFQ is not set
111# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="anticipatory"
113
114#
115# System Type
116#
117# CONFIG_ARCH_AAEC2000 is not set
118# CONFIG_ARCH_INTEGRATOR is not set
119# CONFIG_ARCH_REALVIEW is not set
120# CONFIG_ARCH_VERSATILE is not set
121CONFIG_ARCH_AT91=y
122# CONFIG_ARCH_CLPS7500 is not set
123# CONFIG_ARCH_CLPS711X is not set
124# CONFIG_ARCH_CO285 is not set
125# CONFIG_ARCH_EBSA110 is not set
126# CONFIG_ARCH_EP93XX is not set
127# CONFIG_ARCH_FOOTBRIDGE is not set
128# CONFIG_ARCH_NETX is not set
129# CONFIG_ARCH_H720X is not set
130# CONFIG_ARCH_IMX is not set
131# CONFIG_ARCH_IOP13XX is not set
132# CONFIG_ARCH_IOP32X is not set
133# CONFIG_ARCH_IOP33X is not set
134# CONFIG_ARCH_IXP23XX is not set
135# CONFIG_ARCH_IXP2000 is not set
136# CONFIG_ARCH_IXP4XX is not set
137# CONFIG_ARCH_L7200 is not set
138# CONFIG_ARCH_KS8695 is not set
139# CONFIG_ARCH_NS9XXX is not set
140# CONFIG_ARCH_PNX4008 is not set
141# CONFIG_ARCH_PXA is not set
142# CONFIG_ARCH_RPC is not set
143# CONFIG_ARCH_SA1100 is not set
144# CONFIG_ARCH_S3C2410 is not set
145# CONFIG_ARCH_SHARK is not set
146# CONFIG_ARCH_LH7A40X is not set
147# CONFIG_ARCH_DAVINCI is not set
148# CONFIG_ARCH_OMAP is not set
149
150#
151# Atmel AT91 System-on-Chip
152#
153CONFIG_ARCH_AT91RM9200=y
154# CONFIG_ARCH_AT91SAM9260 is not set
155# CONFIG_ARCH_AT91SAM9261 is not set
156# CONFIG_ARCH_AT91SAM9263 is not set
157# CONFIG_ARCH_AT91SAM9RL is not set
158
159#
160# AT91RM9200 Board Type
161#
162# CONFIG_MACH_ONEARM is not set
163# CONFIG_ARCH_AT91RM9200DK is not set
164# CONFIG_MACH_AT91RM9200EK is not set
165# CONFIG_MACH_CSB337 is not set
166# CONFIG_MACH_CSB637 is not set
167# CONFIG_MACH_CARMEVA is not set
168# CONFIG_MACH_ATEB9200 is not set
169# CONFIG_MACH_KB9200 is not set
170# CONFIG_MACH_PICOTUX2XX is not set
171# CONFIG_MACH_KAFA is not set
172# CONFIG_MACH_CHUB is not set
173CONFIG_MACH_ECBAT91=y
174
175#
176# AT91 Board Options
177#
178# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
179
180#
181# AT91 Feature Selections
182#
183CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
184# CONFIG_ATMEL_TCLIB is not set
185
186#
187# Processor Type
188#
189CONFIG_CPU_32=y
190CONFIG_CPU_ARM920T=y
191CONFIG_CPU_32v4T=y
192CONFIG_CPU_ABRT_EV4T=y
193CONFIG_CPU_CACHE_V4WT=y
194CONFIG_CPU_CACHE_VIVT=y
195CONFIG_CPU_COPY_V4WB=y
196CONFIG_CPU_TLB_V4WBI=y
197CONFIG_CPU_CP15=y
198CONFIG_CPU_CP15_MMU=y
199
200#
201# Processor Features
202#
203CONFIG_ARM_THUMB=y
204# CONFIG_CPU_ICACHE_DISABLE is not set
205# CONFIG_CPU_DCACHE_DISABLE is not set
206# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
207# CONFIG_OUTER_CACHE is not set
208
209#
210# Bus support
211#
212# CONFIG_ARCH_SUPPORTS_MSI is not set
213
214#
215# PCCARD (PCMCIA/CardBus) support
216#
217CONFIG_PCCARD=y
218# CONFIG_PCMCIA_DEBUG is not set
219CONFIG_PCMCIA=y
220CONFIG_PCMCIA_LOAD_CIS=y
221CONFIG_PCMCIA_IOCTL=y
222
223#
224# PC-card bridges
225#
226CONFIG_AT91_CF=y
227
228#
229# Kernel Features
230#
231# CONFIG_TICK_ONESHOT is not set
232CONFIG_PREEMPT=y
233# CONFIG_NO_IDLE_HZ is not set
234CONFIG_HZ=100
235# CONFIG_AEABI is not set
236# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
237CONFIG_SELECT_MEMORY_MODEL=y
238CONFIG_FLATMEM_MANUAL=y
239# CONFIG_DISCONTIGMEM_MANUAL is not set
240# CONFIG_SPARSEMEM_MANUAL is not set
241CONFIG_FLATMEM=y
242CONFIG_FLAT_NODE_MEM_MAP=y
243# CONFIG_SPARSEMEM_STATIC is not set
244CONFIG_SPLIT_PTLOCK_CPUS=4096
245# CONFIG_RESOURCES_64BIT is not set
246CONFIG_ZONE_DMA_FLAG=1
247CONFIG_LEDS=y
248CONFIG_LEDS_TIMER=y
249CONFIG_LEDS_CPU=y
250CONFIG_ALIGNMENT_TRAP=y
251
252#
253# Boot options
254#
255CONFIG_ZBOOT_ROM_TEXT=0x0
256CONFIG_ZBOOT_ROM_BSS=0x0
257CONFIG_CMDLINE="rootfstype=reiserfs root=/dev/mmcblk0p1 console=ttyS0,115200n8 rootdelay=1"
258# CONFIG_XIP_KERNEL is not set
259# CONFIG_KEXEC is not set
260
261#
262# Floating point emulation
263#
264
265#
266# At least one emulation must be selected
267#
268CONFIG_FPE_NWFPE=y
269# CONFIG_FPE_NWFPE_XP is not set
270# CONFIG_FPE_FASTFPE is not set
271
272#
273# Userspace binary formats
274#
275CONFIG_BINFMT_ELF=y
276# CONFIG_BINFMT_AOUT is not set
277# CONFIG_BINFMT_MISC is not set
278# CONFIG_ARTHUR is not set
279
280#
281# Power management options
282#
283# CONFIG_PM is not set
284
285#
286# Networking
287#
288CONFIG_NET=y
289
290#
291# Networking options
292#
293CONFIG_PACKET=y
294# CONFIG_PACKET_MMAP is not set
295CONFIG_UNIX=y
296CONFIG_XFRM=y
297# CONFIG_XFRM_USER is not set
298# CONFIG_XFRM_SUB_POLICY is not set
299# CONFIG_XFRM_MIGRATE is not set
300# CONFIG_NET_KEY is not set
301CONFIG_INET=y
302# CONFIG_IP_MULTICAST is not set
303# CONFIG_IP_ADVANCED_ROUTER is not set
304CONFIG_IP_FIB_HASH=y
305CONFIG_IP_PNP=y
306CONFIG_IP_PNP_DHCP=y
307# CONFIG_IP_PNP_BOOTP is not set
308# CONFIG_IP_PNP_RARP is not set
309# CONFIG_NET_IPIP is not set
310# CONFIG_NET_IPGRE is not set
311# CONFIG_ARPD is not set
312# CONFIG_SYN_COOKIES is not set
313# CONFIG_INET_AH is not set
314# CONFIG_INET_ESP is not set
315# CONFIG_INET_IPCOMP is not set
316# CONFIG_INET_XFRM_TUNNEL is not set
317# CONFIG_INET_TUNNEL is not set
318CONFIG_INET_XFRM_MODE_TRANSPORT=y
319CONFIG_INET_XFRM_MODE_TUNNEL=y
320CONFIG_INET_XFRM_MODE_BEET=y
321CONFIG_INET_DIAG=y
322CONFIG_INET_TCP_DIAG=y
323# CONFIG_TCP_CONG_ADVANCED is not set
324CONFIG_TCP_CONG_CUBIC=y
325CONFIG_DEFAULT_TCP_CONG="cubic"
326# CONFIG_TCP_MD5SIG is not set
327# CONFIG_IPV6 is not set
328# CONFIG_INET6_XFRM_TUNNEL is not set
329# CONFIG_INET6_TUNNEL is not set
330# CONFIG_NETWORK_SECMARK is not set
331# CONFIG_NETFILTER is not set
332# CONFIG_IP_DCCP is not set
333# CONFIG_IP_SCTP is not set
334# CONFIG_TIPC is not set
335# CONFIG_ATM is not set
336# CONFIG_BRIDGE is not set
337# CONFIG_VLAN_8021Q is not set
338# CONFIG_DECNET is not set
339# CONFIG_LLC2 is not set
340# CONFIG_IPX is not set
341# CONFIG_ATALK is not set
342# CONFIG_X25 is not set
343# CONFIG_LAPB is not set
344# CONFIG_ECONET is not set
345# CONFIG_WAN_ROUTER is not set
346
347#
348# QoS and/or fair queueing
349#
350# CONFIG_NET_SCHED is not set
351CONFIG_NET_SCH_FIFO=y
352
353#
354# Network testing
355#
356# CONFIG_NET_PKTGEN is not set
357# CONFIG_HAMRADIO is not set
358# CONFIG_IRDA is not set
359# CONFIG_BT is not set
360# CONFIG_AF_RXRPC is not set
361
362#
363# Wireless
364#
365CONFIG_CFG80211=y
366CONFIG_WIRELESS_EXT=y
367CONFIG_MAC80211=y
368# CONFIG_MAC80211_DEBUG is not set
369CONFIG_IEEE80211=y
370# CONFIG_IEEE80211_DEBUG is not set
371CONFIG_IEEE80211_CRYPT_WEP=y
372# CONFIG_IEEE80211_CRYPT_CCMP is not set
373# CONFIG_IEEE80211_CRYPT_TKIP is not set
374CONFIG_IEEE80211_SOFTMAC=y
375CONFIG_IEEE80211_SOFTMAC_DEBUG=y
376# CONFIG_RFKILL is not set
377
378#
379# Device Drivers
380#
381
382#
383# Generic Driver Options
384#
385# CONFIG_STANDALONE is not set
386# CONFIG_PREVENT_FIRMWARE_BUILD is not set
387CONFIG_FW_LOADER=y
388# CONFIG_SYS_HYPERVISOR is not set
389
390#
391# Connector - unified userspace <-> kernelspace linker
392#
393# CONFIG_CONNECTOR is not set
394CONFIG_MTD=y
395# CONFIG_MTD_DEBUG is not set
396# CONFIG_MTD_CONCAT is not set
397CONFIG_MTD_PARTITIONS=y
398# CONFIG_MTD_REDBOOT_PARTS is not set
399CONFIG_MTD_CMDLINE_PARTS=y
400CONFIG_MTD_AFS_PARTS=y
401
402#
403# User Modules And Translation Layers
404#
405CONFIG_MTD_CHAR=y
406CONFIG_MTD_BLKDEVS=y
407CONFIG_MTD_BLOCK=y
408# CONFIG_FTL is not set
409# CONFIG_NFTL is not set
410# CONFIG_INFTL is not set
411# CONFIG_RFD_FTL is not set
412# CONFIG_SSFDC is not set
413
414#
415# RAM/ROM/Flash chip drivers
416#
417# CONFIG_MTD_CFI is not set
418# CONFIG_MTD_JEDECPROBE is not set
419CONFIG_MTD_MAP_BANK_WIDTH_1=y
420CONFIG_MTD_MAP_BANK_WIDTH_2=y
421CONFIG_MTD_MAP_BANK_WIDTH_4=y
422# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
423# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
424# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
425CONFIG_MTD_CFI_I1=y
426CONFIG_MTD_CFI_I2=y
427# CONFIG_MTD_CFI_I4 is not set
428# CONFIG_MTD_CFI_I8 is not set
429# CONFIG_MTD_RAM is not set
430# CONFIG_MTD_ROM is not set
431# CONFIG_MTD_ABSENT is not set
432
433#
434# Mapping drivers for chip access
435#
436# CONFIG_MTD_COMPLEX_MAPPINGS is not set
437# CONFIG_MTD_PLATRAM is not set
438
439#
440# Self-contained MTD device drivers
441#
442CONFIG_MTD_DATAFLASH=y
443# CONFIG_MTD_M25P80 is not set
444# CONFIG_MTD_SLRAM is not set
445# CONFIG_MTD_PHRAM is not set
446# CONFIG_MTD_MTDRAM is not set
447# CONFIG_MTD_BLOCK2MTD is not set
448
449#
450# Disk-On-Chip Device Drivers
451#
452# CONFIG_MTD_DOC2000 is not set
453# CONFIG_MTD_DOC2001 is not set
454# CONFIG_MTD_DOC2001PLUS is not set
455# CONFIG_MTD_NAND is not set
456# CONFIG_MTD_ONENAND is not set
457
458#
459# UBI - Unsorted block images
460#
461# CONFIG_MTD_UBI is not set
462
463#
464# Parallel port support
465#
466# CONFIG_PARPORT is not set
467
468#
469# Plug and Play support
470#
471# CONFIG_PNPACPI is not set
472
473#
474# Block devices
475#
476# CONFIG_BLK_DEV_COW_COMMON is not set
477CONFIG_BLK_DEV_LOOP=y
478# CONFIG_BLK_DEV_CRYPTOLOOP is not set
479# CONFIG_BLK_DEV_NBD is not set
480# CONFIG_BLK_DEV_UB is not set
481# CONFIG_BLK_DEV_RAM is not set
482# CONFIG_CDROM_PKTCDVD is not set
483# CONFIG_ATA_OVER_ETH is not set
484# CONFIG_IDE is not set
485
486#
487# SCSI device support
488#
489# CONFIG_RAID_ATTRS is not set
490CONFIG_SCSI=y
491# CONFIG_SCSI_TGT is not set
492# CONFIG_SCSI_NETLINK is not set
493CONFIG_SCSI_PROC_FS=y
494
495#
496# SCSI support type (disk, tape, CD-ROM)
497#
498CONFIG_BLK_DEV_SD=y
499# CONFIG_CHR_DEV_ST is not set
500# CONFIG_CHR_DEV_OSST is not set
501# CONFIG_BLK_DEV_SR is not set
502CONFIG_CHR_DEV_SG=y
503# CONFIG_CHR_DEV_SCH is not set
504
505#
506# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
507#
508# CONFIG_SCSI_MULTI_LUN is not set
509# CONFIG_SCSI_CONSTANTS is not set
510# CONFIG_SCSI_LOGGING is not set
511# CONFIG_SCSI_SCAN_ASYNC is not set
512CONFIG_SCSI_WAIT_SCAN=m
513
514#
515# SCSI Transports
516#
517# CONFIG_SCSI_SPI_ATTRS is not set
518# CONFIG_SCSI_FC_ATTRS is not set
519# CONFIG_SCSI_ISCSI_ATTRS is not set
520# CONFIG_SCSI_SAS_ATTRS is not set
521# CONFIG_SCSI_SAS_LIBSAS is not set
522
523#
524# SCSI low-level drivers
525#
526# CONFIG_ISCSI_TCP is not set
527# CONFIG_SCSI_DEBUG is not set
528
529#
530# PCMCIA SCSI adapter support
531#
532# CONFIG_PCMCIA_AHA152X is not set
533# CONFIG_PCMCIA_FDOMAIN is not set
534# CONFIG_PCMCIA_NINJA_SCSI is not set
535# CONFIG_PCMCIA_QLOGIC is not set
536# CONFIG_PCMCIA_SYM53C500 is not set
537# CONFIG_ATA is not set
538
539#
540# Multi-device support (RAID and LVM)
541#
542# CONFIG_MD is not set
543
544#
545# Network device support
546#
547CONFIG_NETDEVICES=y
548# CONFIG_DUMMY is not set
549# CONFIG_BONDING is not set
550# CONFIG_EQUALIZER is not set
551# CONFIG_TUN is not set
552# CONFIG_PHYLIB is not set
553
554#
555# Ethernet (10 or 100Mbit)
556#
557CONFIG_NET_ETHERNET=y
558CONFIG_MII=y
559CONFIG_ARM_AT91_ETHER=y
560# CONFIG_SMC91X is not set
561# CONFIG_DM9000 is not set
562# CONFIG_NETDEV_1000 is not set
563# CONFIG_NETDEV_10000 is not set
564
565#
566# Wireless LAN
567#
568# CONFIG_WLAN_PRE80211 is not set
569# CONFIG_WLAN_80211 is not set
570
571#
572# USB Network Adapters
573#
574# CONFIG_USB_CATC is not set
575# CONFIG_USB_KAWETH is not set
576# CONFIG_USB_PEGASUS is not set
577# CONFIG_USB_RTL8150 is not set
578# CONFIG_USB_USBNET_MII is not set
579# CONFIG_USB_USBNET is not set
580# CONFIG_NET_PCMCIA is not set
581# CONFIG_WAN is not set
582CONFIG_PPP=y
583CONFIG_PPP_MULTILINK=y
584CONFIG_PPP_FILTER=y
585CONFIG_PPP_ASYNC=y
586# CONFIG_PPP_SYNC_TTY is not set
587# CONFIG_PPP_DEFLATE is not set
588# CONFIG_PPP_BSDCOMP is not set
589# CONFIG_PPP_MPPE is not set
590# CONFIG_PPPOE is not set
591# CONFIG_SLIP is not set
592CONFIG_SLHC=y
593# CONFIG_SHAPER is not set
594# CONFIG_NETCONSOLE is not set
595# CONFIG_NETPOLL is not set
596# CONFIG_NET_POLL_CONTROLLER is not set
597
598#
599# ISDN subsystem
600#
601# CONFIG_ISDN is not set
602
603#
604# Input device support
605#
606CONFIG_INPUT=y
607# CONFIG_INPUT_FF_MEMLESS is not set
608
609#
610# Userland interfaces
611#
612CONFIG_INPUT_MOUSEDEV=y
613# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
614CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
615CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
616# CONFIG_INPUT_JOYDEV is not set
617# CONFIG_INPUT_TSDEV is not set
618# CONFIG_INPUT_EVDEV is not set
619# CONFIG_INPUT_EVBUG is not set
620
621#
622# Input Device Drivers
623#
624# CONFIG_INPUT_KEYBOARD is not set
625# CONFIG_INPUT_MOUSE is not set
626# CONFIG_INPUT_JOYSTICK is not set
627# CONFIG_INPUT_TABLET is not set
628# CONFIG_INPUT_TOUCHSCREEN is not set
629# CONFIG_INPUT_MISC is not set
630
631#
632# Hardware I/O ports
633#
634# CONFIG_SERIO is not set
635# CONFIG_GAMEPORT is not set
636
637#
638# Character devices
639#
640CONFIG_VT=y
641CONFIG_VT_CONSOLE=y
642CONFIG_HW_CONSOLE=y
643# CONFIG_VT_HW_CONSOLE_BINDING is not set
644# CONFIG_SERIAL_NONSTANDARD is not set
645
646#
647# Serial drivers
648#
649# CONFIG_SERIAL_8250 is not set
650
651#
652# Non-8250 serial port support
653#
654CONFIG_SERIAL_ATMEL=y
655CONFIG_SERIAL_ATMEL_CONSOLE=y
656# CONFIG_SERIAL_ATMEL_TTYAT is not set
657CONFIG_SERIAL_CORE=y
658CONFIG_SERIAL_CORE_CONSOLE=y
659CONFIG_UNIX98_PTYS=y
660CONFIG_LEGACY_PTYS=y
661CONFIG_LEGACY_PTY_COUNT=256
662
663#
664# IPMI
665#
666# CONFIG_IPMI_HANDLER is not set
667CONFIG_WATCHDOG=y
668CONFIG_WATCHDOG_NOWAYOUT=y
669
670#
671# Watchdog Device Drivers
672#
673# CONFIG_SOFT_WATCHDOG is not set
674# CONFIG_AT91RM9200_WATCHDOG is not set
675
676#
677# USB-based Watchdog Cards
678#
679# CONFIG_USBPCWATCHDOG is not set
680CONFIG_HW_RANDOM=y
681# CONFIG_NVRAM is not set
682# CONFIG_R3964 is not set
683
684#
685# PCMCIA character devices
686#
687# CONFIG_SYNCLINK_CS is not set
688# CONFIG_CARDMAN_4000 is not set
689# CONFIG_CARDMAN_4040 is not set
690# CONFIG_RAW_DRIVER is not set
691
692#
693# TPM devices
694#
695# CONFIG_TCG_TPM is not set
696# CONFIG_AT91_SPI is not set
697CONFIG_I2C=y
698CONFIG_I2C_BOARDINFO=y
699CONFIG_I2C_CHARDEV=y
700
701#
702# I2C Algorithms
703#
704CONFIG_I2C_ALGOBIT=y
705# CONFIG_I2C_ALGOPCF is not set
706# CONFIG_I2C_ALGOPCA is not set
707
708#
709# I2C Hardware Bus support
710#
711CONFIG_I2C_GPIO=y
712# CONFIG_I2C_GPIO is not set
713# CONFIG_I2C_OCORES is not set
714# CONFIG_I2C_PARPORT_LIGHT is not set
715# CONFIG_I2C_SIMTEC is not set
716# CONFIG_I2C_STUB is not set
717# CONFIG_I2C_TINY_USB is not set
718# CONFIG_I2C_PCA is not set
719
720#
721# Miscellaneous I2C Chip support
722#
723# CONFIG_SENSORS_DS1337 is not set
724# CONFIG_SENSORS_DS1374 is not set
725# CONFIG_SENSORS_EEPROM is not set
726# CONFIG_SENSORS_PCF8574 is not set
727# CONFIG_SENSORS_PCA9539 is not set
728# CONFIG_SENSORS_PCF8591 is not set
729# CONFIG_SENSORS_MAX6875 is not set
730# CONFIG_I2C_DEBUG_CORE is not set
731# CONFIG_I2C_DEBUG_ALGO is not set
732# CONFIG_I2C_DEBUG_BUS is not set
733# CONFIG_I2C_DEBUG_CHIP is not set
734
735#
736# SPI support
737#
738CONFIG_SPI=y
739CONFIG_SPI_MASTER=y
740
741#
742# SPI Master Controller Drivers
743#
744# CONFIG_SPI_ATMEL is not set
745CONFIG_SPI_BITBANG=y
746CONFIG_SPI_AT91=y
747
748#
749# SPI Protocol Masters
750#
751# CONFIG_SPI_AT25 is not set
752# CONFIG_SPI_SPIDEV is not set
753
754#
755# Dallas's 1-wire bus
756#
757# CONFIG_W1 is not set
758CONFIG_HWMON=y
759# CONFIG_HWMON_VID is not set
760# CONFIG_SENSORS_ABITUGURU is not set
761# CONFIG_SENSORS_AD7418 is not set
762# CONFIG_SENSORS_ADM1021 is not set
763# CONFIG_SENSORS_ADM1025 is not set
764# CONFIG_SENSORS_ADM1026 is not set
765# CONFIG_SENSORS_ADM1029 is not set
766# CONFIG_SENSORS_ADM1031 is not set
767# CONFIG_SENSORS_ADM9240 is not set
768# CONFIG_SENSORS_ASB100 is not set
769# CONFIG_SENSORS_ATXP1 is not set
770# CONFIG_SENSORS_DS1621 is not set
771# CONFIG_SENSORS_F71805F is not set
772# CONFIG_SENSORS_FSCHER is not set
773# CONFIG_SENSORS_FSCPOS is not set
774# CONFIG_SENSORS_GL518SM is not set
775# CONFIG_SENSORS_GL520SM is not set
776# CONFIG_SENSORS_IT87 is not set
777# CONFIG_SENSORS_LM63 is not set
778# CONFIG_SENSORS_LM70 is not set
779# CONFIG_SENSORS_LM75 is not set
780# CONFIG_SENSORS_LM77 is not set
781# CONFIG_SENSORS_LM78 is not set
782# CONFIG_SENSORS_LM80 is not set
783# CONFIG_SENSORS_LM83 is not set
784# CONFIG_SENSORS_LM85 is not set
785# CONFIG_SENSORS_LM87 is not set
786# CONFIG_SENSORS_LM90 is not set
787# CONFIG_SENSORS_LM92 is not set
788# CONFIG_SENSORS_MAX1619 is not set
789# CONFIG_SENSORS_MAX6650 is not set
790# CONFIG_SENSORS_PC87360 is not set
791# CONFIG_SENSORS_PC87427 is not set
792# CONFIG_SENSORS_SMSC47M1 is not set
793# CONFIG_SENSORS_SMSC47M192 is not set
794# CONFIG_SENSORS_SMSC47B397 is not set
795# CONFIG_SENSORS_VT1211 is not set
796# CONFIG_SENSORS_W83781D is not set
797# CONFIG_SENSORS_W83791D is not set
798# CONFIG_SENSORS_W83792D is not set
799# CONFIG_SENSORS_W83793 is not set
800# CONFIG_SENSORS_W83L785TS is not set
801# CONFIG_SENSORS_W83627HF is not set
802# CONFIG_SENSORS_W83627EHF is not set
803# CONFIG_HWMON_DEBUG_CHIP is not set
804
805#
806# Misc devices
807#
808# CONFIG_BLINK is not set
809
810#
811# Multifunction device drivers
812#
813# CONFIG_MFD_SM501 is not set
814
815#
816# LED devices
817#
818CONFIG_NEW_LEDS=y
819CONFIG_LEDS_CLASS=y
820
821#
822# LED drivers
823#
824
825#
826# LED Triggers
827#
828# CONFIG_LEDS_TRIGGERS is not set
829
830#
831# Multimedia devices
832#
833# CONFIG_VIDEO_DEV is not set
834# CONFIG_DVB_CORE is not set
835CONFIG_DAB=y
836# CONFIG_USB_DABUSB is not set
837
838#
839# Graphics support
840#
841# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
842
843#
844# Display device support
845#
846# CONFIG_DISPLAY_SUPPORT is not set
847# CONFIG_VGASTATE is not set
848# CONFIG_FB is not set
849
850#
851# Console display driver support
852#
853# CONFIG_VGA_CONSOLE is not set
854CONFIG_DUMMY_CONSOLE=y
855
856#
857# Sound
858#
859# CONFIG_SOUND is not set
860
861#
862# HID Devices
863#
864CONFIG_HID=y
865# CONFIG_HID_DEBUG is not set
866
867#
868# USB Input Devices
869#
870# CONFIG_USB_HID is not set
871
872#
873# USB HID Boot Protocol drivers
874#
875# CONFIG_USB_KBD is not set
876# CONFIG_USB_MOUSE is not set
877
878#
879# USB support
880#
881CONFIG_USB_ARCH_HAS_HCD=y
882CONFIG_USB_ARCH_HAS_OHCI=y
883# CONFIG_USB_ARCH_HAS_EHCI is not set
884CONFIG_USB=y
885# CONFIG_USB_DEBUG is not set
886
887#
888# Miscellaneous USB options
889#
890CONFIG_USB_DEVICEFS=y
891# CONFIG_USB_DEVICE_CLASS is not set
892# CONFIG_USB_DYNAMIC_MINORS is not set
893# CONFIG_USB_OTG is not set
894
895#
896# USB Host Controller Drivers
897#
898# CONFIG_USB_ISP116X_HCD is not set
899CONFIG_USB_OHCI_HCD=y
900# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
901# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
902CONFIG_USB_OHCI_LITTLE_ENDIAN=y
903# CONFIG_USB_SL811_HCD is not set
904
905#
906# USB Device Class drivers
907#
908# CONFIG_USB_ACM is not set
909CONFIG_USB_PRINTER=y
910
911#
912# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
913#
914
915#
916# may also be needed; see USB_STORAGE Help for more information
917#
918CONFIG_USB_STORAGE=y
919# CONFIG_USB_STORAGE_DEBUG is not set
920# CONFIG_USB_STORAGE_DATAFAB is not set
921# CONFIG_USB_STORAGE_FREECOM is not set
922# CONFIG_USB_STORAGE_DPCM is not set
923# CONFIG_USB_STORAGE_USBAT is not set
924# CONFIG_USB_STORAGE_SDDR09 is not set
925# CONFIG_USB_STORAGE_SDDR55 is not set
926# CONFIG_USB_STORAGE_JUMPSHOT is not set
927# CONFIG_USB_STORAGE_ALAUDA is not set
928# CONFIG_USB_STORAGE_KARMA is not set
929# CONFIG_USB_LIBUSUAL is not set
930
931#
932# USB Imaging devices
933#
934# CONFIG_USB_MDC800 is not set
935# CONFIG_USB_MICROTEK is not set
936# CONFIG_USB_MON is not set
937
938#
939# USB port drivers
940#
941
942#
943# USB Serial Converter support
944#
945# CONFIG_USB_SERIAL is not set
946
947#
948# USB Miscellaneous drivers
949#
950# CONFIG_USB_EMI62 is not set
951# CONFIG_USB_EMI26 is not set
952# CONFIG_USB_ADUTUX is not set
953# CONFIG_USB_AUERSWALD is not set
954# CONFIG_USB_RIO500 is not set
955# CONFIG_USB_LEGOTOWER is not set
956# CONFIG_USB_LCD is not set
957# CONFIG_USB_BERRY_CHARGE is not set
958# CONFIG_USB_LED is not set
959# CONFIG_USB_CYPRESS_CY7C63 is not set
960# CONFIG_USB_CYTHERM is not set
961# CONFIG_USB_PHIDGET is not set
962# CONFIG_USB_IDMOUSE is not set
963# CONFIG_USB_FTDI_ELAN is not set
964# CONFIG_USB_APPLEDISPLAY is not set
965# CONFIG_USB_LD is not set
966# CONFIG_USB_TRANCEVIBRATOR is not set
967# CONFIG_USB_IOWARRIOR is not set
968# CONFIG_USB_TEST is not set
969
970#
971# USB DSL modem support
972#
973
974#
975# USB Gadget Support
976#
977CONFIG_USB_GADGET=y
978# CONFIG_USB_GADGET_DEBUG_FILES is not set
979CONFIG_USB_GADGET_SELECTED=y
980# CONFIG_USB_GADGET_FSL_USB2 is not set
981# CONFIG_USB_GADGET_NET2280 is not set
982# CONFIG_USB_GADGET_PXA2XX is not set
983# CONFIG_USB_GADGET_GOKU is not set
984# CONFIG_USB_GADGET_LH7A40X is not set
985# CONFIG_USB_GADGET_OMAP is not set
986CONFIG_USB_GADGET_AT91=y
987CONFIG_USB_AT91=y
988# CONFIG_USB_GADGET_DUMMY_HCD is not set
989# CONFIG_USB_GADGET_DUALSPEED is not set
990# CONFIG_USB_ZERO is not set
991# CONFIG_USB_ETH is not set
992# CONFIG_USB_GADGETFS is not set
993# CONFIG_USB_FILE_STORAGE is not set
994# CONFIG_USB_G_SERIAL is not set
995# CONFIG_USB_MIDI_GADGET is not set
996CONFIG_MMC=y
997CONFIG_MMC_DEBUG=y
998# CONFIG_MMC_UNSAFE_RESUME is not set
999
1000#
1001# MMC/SD Card Drivers
1002#
1003CONFIG_MMC_BLOCK=y
1004
1005#
1006# MMC/SD Host Controller Drivers
1007#
1008CONFIG_MMC_AT91=y
1009
1010#
1011# Real Time Clock
1012#
1013CONFIG_RTC_LIB=y
1014CONFIG_RTC_CLASS=y
1015# CONFIG_RTC_HCTOSYS is not set
1016# CONFIG_RTC_DEBUG is not set
1017
1018#
1019# RTC interfaces
1020#
1021CONFIG_RTC_INTF_SYSFS=y
1022CONFIG_RTC_INTF_PROC=y
1023CONFIG_RTC_INTF_DEV=y
1024# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1025# CONFIG_RTC_DRV_TEST is not set
1026
1027#
1028# I2C RTC drivers
1029#
1030# CONFIG_RTC_DRV_DS1307 is not set
1031# CONFIG_RTC_DRV_DS1672 is not set
1032# CONFIG_RTC_DRV_MAX6900 is not set
1033# CONFIG_RTC_DRV_RS5C372 is not set
1034# CONFIG_RTC_DRV_ISL1208 is not set
1035# CONFIG_RTC_DRV_X1205 is not set
1036# CONFIG_RTC_DRV_PCF8563 is not set
1037# CONFIG_RTC_DRV_PCF8583 is not set
1038
1039#
1040# SPI RTC drivers
1041#
1042# CONFIG_RTC_DRV_RS5C348 is not set
1043# CONFIG_RTC_DRV_MAX6902 is not set
1044
1045#
1046# Platform RTC drivers
1047#
1048# CONFIG_RTC_DRV_CMOS is not set
1049# CONFIG_RTC_DRV_DS1553 is not set
1050# CONFIG_RTC_DRV_DS1742 is not set
1051# CONFIG_RTC_DRV_M48T86 is not set
1052# CONFIG_RTC_DRV_V3020 is not set
1053
1054#
1055# on-CPU RTC drivers
1056#
1057CONFIG_RTC_DRV_AT91RM9200=y
1058
1059#
1060# File systems
1061#
1062CONFIG_EXT2_FS=y
1063# CONFIG_EXT2_FS_XATTR is not set
1064# CONFIG_EXT2_FS_XIP is not set
1065CONFIG_EXT3_FS=y
1066CONFIG_EXT3_FS_XATTR=y
1067# CONFIG_EXT3_FS_POSIX_ACL is not set
1068# CONFIG_EXT3_FS_SECURITY is not set
1069# CONFIG_EXT4DEV_FS is not set
1070CONFIG_JBD=y
1071# CONFIG_JBD_DEBUG is not set
1072CONFIG_FS_MBCACHE=y
1073CONFIG_REISERFS_FS=y
1074# CONFIG_REISERFS_CHECK is not set
1075# CONFIG_REISERFS_PROC_INFO is not set
1076# CONFIG_REISERFS_FS_XATTR is not set
1077# CONFIG_JFS_FS is not set
1078CONFIG_FS_POSIX_ACL=y
1079# CONFIG_XFS_FS is not set
1080# CONFIG_GFS2_FS is not set
1081# CONFIG_OCFS2_FS is not set
1082# CONFIG_MINIX_FS is not set
1083# CONFIG_ROMFS_FS is not set
1084CONFIG_INOTIFY=y
1085CONFIG_INOTIFY_USER=y
1086# CONFIG_QUOTA is not set
1087CONFIG_DNOTIFY=y
1088# CONFIG_AUTOFS_FS is not set
1089# CONFIG_AUTOFS4_FS is not set
1090# CONFIG_FUSE_FS is not set
1091
1092#
1093# CD-ROM/DVD Filesystems
1094#
1095# CONFIG_ISO9660_FS is not set
1096# CONFIG_UDF_FS is not set
1097
1098#
1099# DOS/FAT/NT Filesystems
1100#
1101# CONFIG_MSDOS_FS is not set
1102# CONFIG_VFAT_FS is not set
1103# CONFIG_NTFS_FS is not set
1104
1105#
1106# Pseudo filesystems
1107#
1108CONFIG_PROC_FS=y
1109CONFIG_PROC_SYSCTL=y
1110CONFIG_SYSFS=y
1111CONFIG_TMPFS=y
1112# CONFIG_TMPFS_POSIX_ACL is not set
1113# CONFIG_HUGETLB_PAGE is not set
1114CONFIG_RAMFS=y
1115CONFIG_CONFIGFS_FS=y
1116
1117#
1118# Miscellaneous filesystems
1119#
1120# CONFIG_ADFS_FS is not set
1121# CONFIG_AFFS_FS is not set
1122# CONFIG_HFS_FS is not set
1123# CONFIG_HFSPLUS_FS is not set
1124# CONFIG_BEFS_FS is not set
1125# CONFIG_BFS_FS is not set
1126# CONFIG_EFS_FS is not set
1127# CONFIG_JFFS2_FS is not set
1128CONFIG_CRAMFS=y
1129# CONFIG_VXFS_FS is not set
1130# CONFIG_HPFS_FS is not set
1131# CONFIG_QNX4FS_FS is not set
1132# CONFIG_SYSV_FS is not set
1133# CONFIG_UFS_FS is not set
1134
1135#
1136# Network File Systems
1137#
1138CONFIG_NFS_FS=y
1139CONFIG_NFS_V3=y
1140CONFIG_NFS_V3_ACL=y
1141CONFIG_NFS_V4=y
1142# CONFIG_NFS_DIRECTIO is not set
1143# CONFIG_NFSD is not set
1144CONFIG_ROOT_NFS=y
1145CONFIG_LOCKD=y
1146CONFIG_LOCKD_V4=y
1147CONFIG_NFS_ACL_SUPPORT=y
1148CONFIG_NFS_COMMON=y
1149CONFIG_SUNRPC=y
1150CONFIG_SUNRPC_GSS=y
1151# CONFIG_SUNRPC_BIND34 is not set
1152CONFIG_RPCSEC_GSS_KRB5=y
1153# CONFIG_RPCSEC_GSS_SPKM3 is not set
1154# CONFIG_SMB_FS is not set
1155# CONFIG_CIFS is not set
1156# CONFIG_NCP_FS is not set
1157# CONFIG_CODA_FS is not set
1158# CONFIG_AFS_FS is not set
1159# CONFIG_9P_FS is not set
1160
1161#
1162# Partition Types
1163#
1164CONFIG_PARTITION_ADVANCED=y
1165# CONFIG_ACORN_PARTITION is not set
1166# CONFIG_OSF_PARTITION is not set
1167# CONFIG_AMIGA_PARTITION is not set
1168# CONFIG_ATARI_PARTITION is not set
1169# CONFIG_MAC_PARTITION is not set
1170CONFIG_MSDOS_PARTITION=y
1171# CONFIG_BSD_DISKLABEL is not set
1172# CONFIG_MINIX_SUBPARTITION is not set
1173# CONFIG_SOLARIS_X86_PARTITION is not set
1174# CONFIG_UNIXWARE_DISKLABEL is not set
1175# CONFIG_LDM_PARTITION is not set
1176# CONFIG_SGI_PARTITION is not set
1177# CONFIG_ULTRIX_PARTITION is not set
1178# CONFIG_SUN_PARTITION is not set
1179# CONFIG_KARMA_PARTITION is not set
1180# CONFIG_EFI_PARTITION is not set
1181# CONFIG_SYSV68_PARTITION is not set
1182
1183#
1184# Native Language Support
1185#
1186CONFIG_NLS=y
1187CONFIG_NLS_DEFAULT="iso8859-1"
1188# CONFIG_NLS_CODEPAGE_437 is not set
1189# CONFIG_NLS_CODEPAGE_737 is not set
1190# CONFIG_NLS_CODEPAGE_775 is not set
1191# CONFIG_NLS_CODEPAGE_850 is not set
1192# CONFIG_NLS_CODEPAGE_852 is not set
1193# CONFIG_NLS_CODEPAGE_855 is not set
1194# CONFIG_NLS_CODEPAGE_857 is not set
1195# CONFIG_NLS_CODEPAGE_860 is not set
1196# CONFIG_NLS_CODEPAGE_861 is not set
1197# CONFIG_NLS_CODEPAGE_862 is not set
1198# CONFIG_NLS_CODEPAGE_863 is not set
1199# CONFIG_NLS_CODEPAGE_864 is not set
1200# CONFIG_NLS_CODEPAGE_865 is not set
1201# CONFIG_NLS_CODEPAGE_866 is not set
1202# CONFIG_NLS_CODEPAGE_869 is not set
1203# CONFIG_NLS_CODEPAGE_936 is not set
1204# CONFIG_NLS_CODEPAGE_950 is not set
1205# CONFIG_NLS_CODEPAGE_932 is not set
1206# CONFIG_NLS_CODEPAGE_949 is not set
1207# CONFIG_NLS_CODEPAGE_874 is not set
1208# CONFIG_NLS_ISO8859_8 is not set
1209# CONFIG_NLS_CODEPAGE_1250 is not set
1210# CONFIG_NLS_CODEPAGE_1251 is not set
1211# CONFIG_NLS_ASCII is not set
1212# CONFIG_NLS_ISO8859_1 is not set
1213# CONFIG_NLS_ISO8859_2 is not set
1214# CONFIG_NLS_ISO8859_3 is not set
1215# CONFIG_NLS_ISO8859_4 is not set
1216# CONFIG_NLS_ISO8859_5 is not set
1217# CONFIG_NLS_ISO8859_6 is not set
1218# CONFIG_NLS_ISO8859_7 is not set
1219# CONFIG_NLS_ISO8859_9 is not set
1220# CONFIG_NLS_ISO8859_13 is not set
1221# CONFIG_NLS_ISO8859_14 is not set
1222# CONFIG_NLS_ISO8859_15 is not set
1223# CONFIG_NLS_KOI8_R is not set
1224# CONFIG_NLS_KOI8_U is not set
1225# CONFIG_NLS_UTF8 is not set
1226
1227#
1228# Distributed Lock Manager
1229#
1230# CONFIG_DLM is not set
1231
1232#
1233# Profiling support
1234#
1235# CONFIG_PROFILING is not set
1236
1237#
1238# Kernel hacking
1239#
1240# CONFIG_PRINTK_TIME is not set
1241CONFIG_ENABLE_MUST_CHECK=y
1242# CONFIG_MAGIC_SYSRQ is not set
1243# CONFIG_UNUSED_SYMBOLS is not set
1244# CONFIG_DEBUG_FS is not set
1245# CONFIG_HEADERS_CHECK is not set
1246# CONFIG_DEBUG_KERNEL is not set
1247CONFIG_DEBUG_BUGVERBOSE=y
1248CONFIG_FRAME_POINTER=y
1249CONFIG_DEBUG_USER=y
1250
1251#
1252# Security options
1253#
1254# CONFIG_KEYS is not set
1255# CONFIG_SECURITY is not set
1256
1257#
1258# Cryptographic options
1259#
1260CONFIG_CRYPTO=y
1261CONFIG_CRYPTO_ALGAPI=y
1262CONFIG_CRYPTO_BLKCIPHER=y
1263CONFIG_CRYPTO_MANAGER=y
1264# CONFIG_CRYPTO_HMAC is not set
1265# CONFIG_CRYPTO_XCBC is not set
1266# CONFIG_CRYPTO_NULL is not set
1267# CONFIG_CRYPTO_MD4 is not set
1268CONFIG_CRYPTO_MD5=y
1269CONFIG_CRYPTO_SHA1=y
1270# CONFIG_CRYPTO_SHA256 is not set
1271# CONFIG_CRYPTO_SHA512 is not set
1272# CONFIG_CRYPTO_WP512 is not set
1273# CONFIG_CRYPTO_TGR192 is not set
1274# CONFIG_CRYPTO_GF128MUL is not set
1275CONFIG_CRYPTO_ECB=y
1276CONFIG_CRYPTO_CBC=y
1277CONFIG_CRYPTO_PCBC=y
1278# CONFIG_CRYPTO_LRW is not set
1279# CONFIG_CRYPTO_CRYPTD is not set
1280CONFIG_CRYPTO_DES=y
1281# CONFIG_CRYPTO_FCRYPT is not set
1282# CONFIG_CRYPTO_BLOWFISH is not set
1283# CONFIG_CRYPTO_TWOFISH is not set
1284# CONFIG_CRYPTO_SERPENT is not set
1285CONFIG_CRYPTO_AES=y
1286# CONFIG_CRYPTO_CAST5 is not set
1287# CONFIG_CRYPTO_CAST6 is not set
1288# CONFIG_CRYPTO_TEA is not set
1289CONFIG_CRYPTO_ARC4=y
1290# CONFIG_CRYPTO_KHAZAD is not set
1291# CONFIG_CRYPTO_ANUBIS is not set
1292# CONFIG_CRYPTO_DEFLATE is not set
1293# CONFIG_CRYPTO_MICHAEL_MIC is not set
1294# CONFIG_CRYPTO_CRC32C is not set
1295# CONFIG_CRYPTO_CAMELLIA is not set
1296# CONFIG_CRYPTO_TEST is not set
1297
1298#
1299# Hardware crypto devices
1300#
1301
1302#
1303# Library routines
1304#
1305CONFIG_BITREVERSE=y
1306CONFIG_CRC_CCITT=y
1307# CONFIG_CRC16 is not set
1308# CONFIG_CRC_ITU_T is not set
1309CONFIG_CRC32=y
1310# CONFIG_LIBCRC32C is not set
1311CONFIG_ZLIB_INFLATE=y
1312CONFIG_PLIST=y
1313CONFIG_HAS_IOMEM=y
1314CONFIG_HAS_IOPORT=y
1315CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig
index a0f48d54fbcc..ae51a40db6f9 100644
--- a/arch/arm/configs/kafa_defconfig
+++ b/arch/arm/configs/kafa_defconfig
@@ -587,14 +587,14 @@ CONFIG_I2C_CHARDEV=y
587# 587#
588# I2C Algorithms 588# I2C Algorithms
589# 589#
590# CONFIG_I2C_ALGOBIT is not set 590CONFIG_I2C_ALGOBIT=y
591# CONFIG_I2C_ALGOPCF is not set 591# CONFIG_I2C_ALGOPCF is not set
592# CONFIG_I2C_ALGOPCA is not set 592# CONFIG_I2C_ALGOPCA is not set
593 593
594# 594#
595# I2C Hardware Bus support 595# I2C Hardware Bus support
596# 596#
597CONFIG_I2C_AT91=y 597CONFIG_I2C_GPIO=y
598# CONFIG_I2C_PARPORT_LIGHT is not set 598# CONFIG_I2C_PARPORT_LIGHT is not set
599# CONFIG_I2C_STUB is not set 599# CONFIG_I2C_STUB is not set
600# CONFIG_I2C_PCA_ISA is not set 600# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig
new file mode 100644
index 000000000000..4d11678584db
--- /dev/null
+++ b/arch/arm/configs/magician_defconfig
@@ -0,0 +1,1182 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Sun Dec 30 13:02:54 2007
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_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
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_ARCH_MTD_XIP=y
26CONFIG_VECTORS_BASE=0xffff0000
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28
29#
30# General setup
31#
32CONFIG_EXPERIMENTAL=y
33CONFIG_BROKEN_ON_SMP=y
34CONFIG_LOCK_KERNEL=y
35CONFIG_INIT_ENV_ARG_LIMIT=32
36CONFIG_LOCALVERSION=""
37CONFIG_LOCALVERSION_AUTO=y
38CONFIG_SWAP=y
39CONFIG_SYSVIPC=y
40CONFIG_SYSVIPC_SYSCTL=y
41# CONFIG_POSIX_MQUEUE is not set
42# CONFIG_BSD_PROCESS_ACCT is not set
43# CONFIG_TASKSTATS is not set
44# CONFIG_USER_NS is not set
45# CONFIG_PID_NS is not set
46# CONFIG_AUDIT is not set
47CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=16
50# CONFIG_CGROUPS is not set
51# CONFIG_FAIR_GROUP_SCHED is not set
52# CONFIG_SYSFS_DEPRECATED is not set
53# CONFIG_RELAY is not set
54CONFIG_BLK_DEV_INITRD=y
55CONFIG_INITRAMFS_SOURCE=""
56CONFIG_CC_OPTIMIZE_FOR_SIZE=y
57CONFIG_SYSCTL=y
58CONFIG_EMBEDDED=y
59# CONFIG_UID16 is not set
60CONFIG_SYSCTL_SYSCALL=y
61CONFIG_KALLSYMS=y
62# CONFIG_KALLSYMS_ALL is not set
63# CONFIG_KALLSYMS_EXTRA_PASS is not set
64CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y
66CONFIG_BUG=y
67CONFIG_ELF_CORE=y
68CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y
70CONFIG_ANON_INODES=y
71CONFIG_EPOLL=y
72CONFIG_SIGNALFD=y
73CONFIG_EVENTFD=y
74CONFIG_SHMEM=y
75CONFIG_VM_EVENT_COUNTERS=y
76CONFIG_SLAB=y
77# CONFIG_SLUB is not set
78# CONFIG_SLOB is not set
79CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0
82CONFIG_MODULES=y
83CONFIG_MODULE_UNLOAD=y
84CONFIG_MODULE_FORCE_UNLOAD=y
85# CONFIG_MODVERSIONS is not set
86# CONFIG_MODULE_SRCVERSION_ALL is not set
87CONFIG_KMOD=y
88CONFIG_BLOCK=y
89# CONFIG_LBD is not set
90# CONFIG_BLK_DEV_IO_TRACE is not set
91# CONFIG_LSF is not set
92# CONFIG_BLK_DEV_BSG is not set
93
94#
95# IO Schedulers
96#
97CONFIG_IOSCHED_NOOP=y
98# CONFIG_IOSCHED_AS is not set
99# CONFIG_IOSCHED_DEADLINE is not set
100# CONFIG_IOSCHED_CFQ is not set
101# CONFIG_DEFAULT_AS is not set
102# CONFIG_DEFAULT_DEADLINE is not set
103# CONFIG_DEFAULT_CFQ is not set
104CONFIG_DEFAULT_NOOP=y
105CONFIG_DEFAULT_IOSCHED="noop"
106CONFIG_CLASSIC_RCU=y
107# CONFIG_PREEMPT_RCU is not set
108
109#
110# System Type
111#
112# CONFIG_ARCH_AAEC2000 is not set
113# CONFIG_ARCH_INTEGRATOR is not set
114# CONFIG_ARCH_REALVIEW is not set
115# CONFIG_ARCH_VERSATILE is not set
116# CONFIG_ARCH_AT91 is not set
117# CONFIG_ARCH_CLPS7500 is not set
118# CONFIG_ARCH_CLPS711X is not set
119# CONFIG_ARCH_CO285 is not set
120# CONFIG_ARCH_EBSA110 is not set
121# CONFIG_ARCH_EP93XX is not set
122# CONFIG_ARCH_FOOTBRIDGE is not set
123# CONFIG_ARCH_NETX is not set
124# CONFIG_ARCH_H720X is not set
125# CONFIG_ARCH_IMX is not set
126# CONFIG_ARCH_IOP13XX is not set
127# CONFIG_ARCH_IOP32X is not set
128# CONFIG_ARCH_IOP33X is not set
129# CONFIG_ARCH_IXP23XX is not set
130# CONFIG_ARCH_IXP2000 is not set
131# CONFIG_ARCH_IXP4XX is not set
132# CONFIG_ARCH_L7200 is not set
133# CONFIG_ARCH_KS8695 is not set
134# CONFIG_ARCH_NS9XXX is not set
135# CONFIG_ARCH_MXC is not set
136# CONFIG_ARCH_PNX4008 is not set
137CONFIG_ARCH_PXA=y
138# CONFIG_ARCH_RPC is not set
139# CONFIG_ARCH_SA1100 is not set
140# CONFIG_ARCH_S3C2410 is not set
141# CONFIG_ARCH_SHARK is not set
142# CONFIG_ARCH_LH7A40X is not set
143# CONFIG_ARCH_DAVINCI is not set
144# CONFIG_ARCH_OMAP is not set
145
146#
147# Intel PXA2xx/PXA3xx Implementations
148#
149# CONFIG_ARCH_LUBBOCK is not set
150# CONFIG_MACH_LOGICPD_PXA270 is not set
151# CONFIG_MACH_MAINSTONE is not set
152# CONFIG_ARCH_PXA_IDP is not set
153# CONFIG_PXA_SHARPSL is not set
154# CONFIG_MACH_TRIZEPS4 is not set
155# CONFIG_MACH_EM_X270 is not set
156# CONFIG_MACH_ZYLONITE is not set
157# CONFIG_MACH_ARMCORE is not set
158CONFIG_MACH_MAGICIAN=y
159CONFIG_PXA27x=y
160
161#
162# Boot options
163#
164
165#
166# Power management
167#
168
169#
170# Processor Type
171#
172CONFIG_CPU_32=y
173CONFIG_CPU_XSCALE=y
174CONFIG_CPU_32v5=y
175CONFIG_CPU_ABRT_EV5T=y
176CONFIG_CPU_CACHE_VIVT=y
177CONFIG_CPU_TLB_V4WBI=y
178CONFIG_CPU_CP15=y
179CONFIG_CPU_CP15_MMU=y
180
181#
182# Processor Features
183#
184CONFIG_ARM_THUMB=y
185# CONFIG_CPU_DCACHE_DISABLE is not set
186# CONFIG_OUTER_CACHE is not set
187CONFIG_IWMMXT=y
188CONFIG_XSCALE_PMU=y
189
190#
191# Bus support
192#
193# CONFIG_PCI_SYSCALL is not set
194# CONFIG_ARCH_SUPPORTS_MSI is not set
195# CONFIG_PCCARD is not set
196
197#
198# Kernel Features
199#
200# CONFIG_TICK_ONESHOT is not set
201# CONFIG_NO_HZ is not set
202# CONFIG_HIGH_RES_TIMERS is not set
203CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
204CONFIG_PREEMPT=y
205CONFIG_HZ=100
206CONFIG_AEABI=y
207CONFIG_OABI_COMPAT=y
208# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
209CONFIG_SELECT_MEMORY_MODEL=y
210CONFIG_FLATMEM_MANUAL=y
211# CONFIG_DISCONTIGMEM_MANUAL is not set
212# CONFIG_SPARSEMEM_MANUAL is not set
213CONFIG_FLATMEM=y
214CONFIG_FLAT_NODE_MEM_MAP=y
215# CONFIG_SPARSEMEM_STATIC is not set
216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
217CONFIG_SPLIT_PTLOCK_CPUS=4096
218# CONFIG_RESOURCES_64BIT is not set
219CONFIG_ZONE_DMA_FLAG=1
220CONFIG_BOUNCE=y
221CONFIG_VIRT_TO_BUS=y
222CONFIG_ALIGNMENT_TRAP=y
223
224#
225# Boot options
226#
227CONFIG_ZBOOT_ROM_TEXT=0x0
228CONFIG_ZBOOT_ROM_BSS=0x0
229CONFIG_CMDLINE="keepinitrd"
230# CONFIG_XIP_KERNEL is not set
231CONFIG_KEXEC=y
232
233#
234# CPU Frequency scaling
235#
236CONFIG_CPU_FREQ=y
237CONFIG_CPU_FREQ_TABLE=y
238# CONFIG_CPU_FREQ_DEBUG is not set
239CONFIG_CPU_FREQ_STAT=y
240# CONFIG_CPU_FREQ_STAT_DETAILS is not set
241CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
242# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
243# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
244# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
245CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
246# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
247# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
248CONFIG_CPU_FREQ_GOV_ONDEMAND=y
249# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
250
251#
252# Floating point emulation
253#
254
255#
256# At least one emulation must be selected
257#
258CONFIG_FPE_NWFPE=y
259# CONFIG_FPE_NWFPE_XP is not set
260# CONFIG_FPE_FASTFPE is not set
261
262#
263# Userspace binary formats
264#
265CONFIG_BINFMT_ELF=y
266# CONFIG_BINFMT_AOUT is not set
267# CONFIG_BINFMT_MISC is not set
268
269#
270# Power management options
271#
272CONFIG_PM=y
273# CONFIG_PM_LEGACY is not set
274# CONFIG_PM_DEBUG is not set
275CONFIG_PM_SLEEP=y
276CONFIG_SUSPEND_UP_POSSIBLE=y
277CONFIG_SUSPEND=y
278CONFIG_APM_EMULATION=y
279
280#
281# Networking
282#
283CONFIG_NET=y
284
285#
286# Networking options
287#
288CONFIG_PACKET=y
289CONFIG_PACKET_MMAP=y
290CONFIG_UNIX=y
291# CONFIG_NET_KEY is not set
292CONFIG_INET=y
293CONFIG_IP_MULTICAST=y
294# CONFIG_IP_ADVANCED_ROUTER is not set
295CONFIG_IP_FIB_HASH=y
296CONFIG_IP_PNP=y
297# CONFIG_IP_PNP_DHCP is not set
298# CONFIG_IP_PNP_BOOTP is not set
299# CONFIG_IP_PNP_RARP is not set
300# CONFIG_NET_IPIP is not set
301# CONFIG_NET_IPGRE is not set
302# CONFIG_IP_MROUTE is not set
303# CONFIG_ARPD is not set
304# CONFIG_SYN_COOKIES is not set
305# CONFIG_INET_AH is not set
306# CONFIG_INET_ESP is not set
307# CONFIG_INET_IPCOMP is not set
308# CONFIG_INET_XFRM_TUNNEL is not set
309# CONFIG_INET_TUNNEL is not set
310# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
311# CONFIG_INET_XFRM_MODE_TUNNEL is not set
312# CONFIG_INET_XFRM_MODE_BEET is not set
313# CONFIG_INET_LRO is not set
314# CONFIG_INET_DIAG is not set
315# CONFIG_TCP_CONG_ADVANCED is not set
316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318# CONFIG_TCP_MD5SIG is not set
319# CONFIG_IP_VS is not set
320# CONFIG_IPV6 is not set
321# CONFIG_INET6_XFRM_TUNNEL is not set
322# CONFIG_INET6_TUNNEL is not set
323# CONFIG_NETWORK_SECMARK is not set
324CONFIG_NETFILTER=y
325# CONFIG_NETFILTER_DEBUG is not set
326
327#
328# Core Netfilter Configuration
329#
330# CONFIG_NETFILTER_NETLINK is not set
331# CONFIG_NF_CONNTRACK_ENABLED is not set
332# CONFIG_NF_CONNTRACK is not set
333# CONFIG_NETFILTER_XTABLES is not set
334
335#
336# IP: Netfilter Configuration
337#
338# CONFIG_IP_NF_QUEUE is not set
339# CONFIG_IP_NF_IPTABLES is not set
340# CONFIG_IP_NF_ARPTABLES is not set
341# CONFIG_IP_DCCP is not set
342# CONFIG_IP_SCTP is not set
343# CONFIG_TIPC is not set
344# CONFIG_ATM is not set
345# CONFIG_BRIDGE is not set
346# CONFIG_VLAN_8021Q is not set
347# CONFIG_DECNET is not set
348# CONFIG_LLC2 is not set
349# CONFIG_IPX is not set
350# CONFIG_ATALK is not set
351# CONFIG_X25 is not set
352# CONFIG_LAPB is not set
353# CONFIG_ECONET is not set
354# CONFIG_WAN_ROUTER is not set
355# CONFIG_NET_SCHED is not set
356
357#
358# Network testing
359#
360# CONFIG_NET_PKTGEN is not set
361# CONFIG_HAMRADIO is not set
362# CONFIG_CAN is not set
363CONFIG_IRDA=m
364
365#
366# IrDA protocols
367#
368CONFIG_IRLAN=m
369# CONFIG_IRNET is not set
370CONFIG_IRCOMM=m
371CONFIG_IRDA_ULTRA=y
372
373#
374# IrDA options
375#
376CONFIG_IRDA_CACHE_LAST_LSAP=y
377CONFIG_IRDA_FAST_RR=y
378CONFIG_IRDA_DEBUG=y
379
380#
381# Infrared-port device drivers
382#
383
384#
385# SIR device drivers
386#
387CONFIG_IRTTY_SIR=m
388
389#
390# Dongle support
391#
392# CONFIG_DONGLE is not set
393
394#
395# Old SIR device drivers
396#
397# CONFIG_IRPORT_SIR is not set
398
399#
400# Old Serial dongle support
401#
402
403#
404# FIR device drivers
405#
406CONFIG_PXA_FICP=m
407CONFIG_BT=m
408CONFIG_BT_L2CAP=m
409CONFIG_BT_SCO=m
410CONFIG_BT_RFCOMM=m
411CONFIG_BT_RFCOMM_TTY=y
412CONFIG_BT_BNEP=m
413CONFIG_BT_BNEP_MC_FILTER=y
414CONFIG_BT_BNEP_PROTO_FILTER=y
415CONFIG_BT_HIDP=m
416
417#
418# Bluetooth device drivers
419#
420# CONFIG_BT_HCIUART is not set
421# CONFIG_BT_HCIVHCI is not set
422# CONFIG_AF_RXRPC is not set
423
424#
425# Wireless
426#
427# CONFIG_CFG80211 is not set
428# CONFIG_WIRELESS_EXT is not set
429# CONFIG_MAC80211 is not set
430# CONFIG_IEEE80211 is not set
431# CONFIG_RFKILL is not set
432# CONFIG_NET_9P is not set
433
434#
435# Device Drivers
436#
437
438#
439# Generic Driver Options
440#
441CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
442CONFIG_STANDALONE=y
443CONFIG_PREVENT_FIRMWARE_BUILD=y
444CONFIG_FW_LOADER=y
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
450CONFIG_MTD_DEBUG=y
451CONFIG_MTD_DEBUG_VERBOSE=0
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_AFS_PARTS is not set
457
458#
459# User Modules And Translation Layers
460#
461CONFIG_MTD_CHAR=m
462CONFIG_MTD_BLKDEVS=m
463CONFIG_MTD_BLOCK=m
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
476# CONFIG_MTD_CFI_ADV_OPTIONS is not set
477CONFIG_MTD_MAP_BANK_WIDTH_1=y
478CONFIG_MTD_MAP_BANK_WIDTH_2=y
479CONFIG_MTD_MAP_BANK_WIDTH_4=y
480# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
481# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
482# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
483CONFIG_MTD_CFI_I1=y
484CONFIG_MTD_CFI_I2=y
485# CONFIG_MTD_CFI_I4 is not set
486# CONFIG_MTD_CFI_I8 is not set
487CONFIG_MTD_CFI_INTELEXT=y
488# CONFIG_MTD_CFI_AMDSTD is not set
489# CONFIG_MTD_CFI_STAA is not set
490# CONFIG_MTD_RAM is not set
491# CONFIG_MTD_ROM is not set
492# CONFIG_MTD_ABSENT is not set
493# CONFIG_MTD_XIP is not set
494
495#
496# Mapping drivers for chip access
497#
498# CONFIG_MTD_COMPLEX_MAPPINGS is not set
499CONFIG_MTD_PHYSMAP=y
500CONFIG_MTD_PHYSMAP_START=0x00000000
501CONFIG_MTD_PHYSMAP_LEN=0x04000000
502CONFIG_MTD_PHYSMAP_BANKWIDTH=4
503# CONFIG_MTD_PXA2XX is not set
504# CONFIG_MTD_ARM_INTEGRATOR is not set
505# CONFIG_MTD_SHARP_SL is not set
506# CONFIG_MTD_PLATRAM is not set
507
508#
509# Self-contained MTD device drivers
510#
511# CONFIG_MTD_SLRAM is not set
512# CONFIG_MTD_PHRAM is not set
513# CONFIG_MTD_MTDRAM is not set
514# CONFIG_MTD_BLOCK2MTD is not set
515
516#
517# Disk-On-Chip Device Drivers
518#
519# CONFIG_MTD_DOC2000 is not set
520# CONFIG_MTD_DOC2001 is not set
521# CONFIG_MTD_DOC2001PLUS is not set
522# CONFIG_MTD_NAND is not set
523# CONFIG_MTD_ONENAND is not set
524
525#
526# UBI - Unsorted block images
527#
528# CONFIG_MTD_UBI is not set
529# CONFIG_PARPORT is not set
530CONFIG_BLK_DEV=y
531# CONFIG_BLK_DEV_COW_COMMON is not set
532# CONFIG_BLK_DEV_LOOP is not set
533# CONFIG_BLK_DEV_NBD is not set
534# CONFIG_BLK_DEV_RAM is not set
535# CONFIG_CDROM_PKTCDVD is not set
536# CONFIG_ATA_OVER_ETH is not set
537# CONFIG_MISC_DEVICES is not set
538# CONFIG_IDE is not set
539
540#
541# SCSI device support
542#
543# CONFIG_RAID_ATTRS is not set
544# CONFIG_SCSI is not set
545# CONFIG_SCSI_DMA is not set
546# CONFIG_SCSI_NETLINK is not set
547# CONFIG_ATA is not set
548# CONFIG_MD is not set
549CONFIG_NETDEVICES=y
550# CONFIG_NETDEVICES_MULTIQUEUE is not set
551# CONFIG_DUMMY is not set
552# CONFIG_BONDING is not set
553# CONFIG_MACVLAN is not set
554# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set
556# CONFIG_VETH is not set
557# CONFIG_NET_ETHERNET is not set
558# CONFIG_NETDEV_1000 is not set
559# CONFIG_NETDEV_10000 is not set
560
561#
562# Wireless LAN
563#
564# CONFIG_WLAN_PRE80211 is not set
565# CONFIG_WLAN_80211 is not set
566# CONFIG_WAN is not set
567CONFIG_PPP=m
568# CONFIG_PPP_MULTILINK is not set
569# CONFIG_PPP_FILTER is not set
570CONFIG_PPP_ASYNC=m
571# CONFIG_PPP_SYNC_TTY is not set
572CONFIG_PPP_DEFLATE=m
573CONFIG_PPP_BSDCOMP=m
574CONFIG_PPP_MPPE=m
575# CONFIG_PPPOE is not set
576# CONFIG_PPPOL2TP is not set
577# CONFIG_SLIP is not set
578CONFIG_SLHC=m
579# CONFIG_NETCONSOLE is not set
580# CONFIG_NETPOLL is not set
581# CONFIG_NET_POLL_CONTROLLER is not set
582# CONFIG_ISDN is not set
583
584#
585# Input device support
586#
587CONFIG_INPUT=y
588# CONFIG_INPUT_FF_MEMLESS is not set
589# CONFIG_INPUT_POLLDEV is not set
590
591#
592# Userland interfaces
593#
594# CONFIG_INPUT_MOUSEDEV is not set
595# CONFIG_INPUT_JOYDEV is not set
596CONFIG_INPUT_EVDEV=y
597# CONFIG_INPUT_EVBUG is not set
598
599#
600# Input Device Drivers
601#
602CONFIG_INPUT_KEYBOARD=y
603# CONFIG_KEYBOARD_ATKBD is not set
604# CONFIG_KEYBOARD_SUNKBD is not set
605# CONFIG_KEYBOARD_LKKBD is not set
606# CONFIG_KEYBOARD_XTKBD is not set
607# CONFIG_KEYBOARD_NEWTON is not set
608# CONFIG_KEYBOARD_STOWAWAY is not set
609# CONFIG_KEYBOARD_PXA27x is not set
610CONFIG_KEYBOARD_GPIO=y
611# CONFIG_INPUT_MOUSE is not set
612# CONFIG_INPUT_JOYSTICK is not set
613# CONFIG_INPUT_TABLET is not set
614CONFIG_INPUT_TOUCHSCREEN=y
615CONFIG_INPUT_MISC=y
616CONFIG_INPUT_UINPUT=m
617
618#
619# Hardware I/O ports
620#
621# CONFIG_SERIO is not set
622# CONFIG_GAMEPORT is not set
623
624#
625# Character devices
626#
627CONFIG_VT=y
628CONFIG_VT_CONSOLE=y
629CONFIG_HW_CONSOLE=y
630# CONFIG_VT_HW_CONSOLE_BINDING is not set
631# CONFIG_SERIAL_NONSTANDARD is not set
632
633#
634# Serial drivers
635#
636# CONFIG_SERIAL_8250 is not set
637
638#
639# Non-8250 serial port support
640#
641CONFIG_SERIAL_PXA=y
642# CONFIG_SERIAL_PXA_CONSOLE is not set
643CONFIG_SERIAL_CORE=y
644CONFIG_UNIX98_PTYS=y
645# CONFIG_LEGACY_PTYS is not set
646# CONFIG_IPMI_HANDLER is not set
647# CONFIG_HW_RANDOM is not set
648# CONFIG_NVRAM is not set
649# CONFIG_R3964 is not set
650# CONFIG_RAW_DRIVER is not set
651# CONFIG_TCG_TPM is not set
652CONFIG_I2C=m
653CONFIG_I2C_BOARDINFO=y
654CONFIG_I2C_CHARDEV=m
655
656#
657# I2C Algorithms
658#
659# CONFIG_I2C_ALGOBIT is not set
660# CONFIG_I2C_ALGOPCF is not set
661# CONFIG_I2C_ALGOPCA is not set
662
663#
664# I2C Hardware Bus support
665#
666# CONFIG_I2C_GPIO is not set
667CONFIG_I2C_PXA=m
668# CONFIG_I2C_PXA_SLAVE is not set
669# CONFIG_I2C_OCORES is not set
670# CONFIG_I2C_PARPORT_LIGHT is not set
671# CONFIG_I2C_SIMTEC is not set
672# CONFIG_I2C_TAOS_EVM is not set
673# CONFIG_I2C_STUB is not set
674
675#
676# Miscellaneous I2C Chip support
677#
678# CONFIG_SENSORS_DS1337 is not set
679# CONFIG_SENSORS_DS1374 is not set
680# CONFIG_DS1682 is not set
681# CONFIG_SENSORS_EEPROM is not set
682# CONFIG_SENSORS_PCF8574 is not set
683# CONFIG_SENSORS_PCA9539 is not set
684# CONFIG_SENSORS_PCF8591 is not set
685# CONFIG_SENSORS_MAX6875 is not set
686# CONFIG_SENSORS_TSL2550 is not set
687# CONFIG_I2C_DEBUG_CORE is not set
688# CONFIG_I2C_DEBUG_ALGO is not set
689# CONFIG_I2C_DEBUG_BUS is not set
690# CONFIG_I2C_DEBUG_CHIP is not set
691
692#
693# SPI support
694#
695# CONFIG_SPI is not set
696# CONFIG_SPI_MASTER is not set
697CONFIG_W1=y
698
699#
700# 1-wire Bus Masters
701#
702# CONFIG_W1_MASTER_DS2482 is not set
703CONFIG_W1_MASTER_DS1WM=y
704
705#
706# 1-wire Slaves
707#
708# CONFIG_W1_SLAVE_THERM is not set
709# CONFIG_W1_SLAVE_SMEM is not set
710# CONFIG_W1_SLAVE_DS2433 is not set
711CONFIG_W1_SLAVE_DS2760=y
712CONFIG_POWER_SUPPLY=y
713# CONFIG_POWER_SUPPLY_DEBUG is not set
714CONFIG_PDA_POWER=y
715# CONFIG_APM_POWER is not set
716CONFIG_BATTERY_DS2760=y
717# CONFIG_HWMON is not set
718# CONFIG_WATCHDOG is not set
719
720#
721# Sonics Silicon Backplane
722#
723CONFIG_SSB_POSSIBLE=y
724# CONFIG_SSB is not set
725
726#
727# Multifunction device drivers
728#
729# CONFIG_MFD_SM501 is not set
730CONFIG_HTC_EGPIO=y
731CONFIG_HTC_PASIC3=y
732
733#
734# Multimedia devices
735#
736# CONFIG_VIDEO_DEV is not set
737# CONFIG_DVB_CORE is not set
738# CONFIG_DAB is not set
739
740#
741# Graphics support
742#
743# CONFIG_VGASTATE is not set
744# CONFIG_VIDEO_OUTPUT_CONTROL is not set
745CONFIG_FB=y
746# CONFIG_FIRMWARE_EDID is not set
747# CONFIG_FB_DDC is not set
748CONFIG_FB_CFB_FILLRECT=y
749CONFIG_FB_CFB_COPYAREA=y
750CONFIG_FB_CFB_IMAGEBLIT=y
751# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
752# CONFIG_FB_SYS_FILLRECT is not set
753# CONFIG_FB_SYS_COPYAREA is not set
754# CONFIG_FB_SYS_IMAGEBLIT is not set
755# CONFIG_FB_SYS_FOPS is not set
756CONFIG_FB_DEFERRED_IO=y
757# CONFIG_FB_SVGALIB is not set
758# CONFIG_FB_MACMODES is not set
759# CONFIG_FB_BACKLIGHT is not set
760# CONFIG_FB_MODE_HELPERS is not set
761# CONFIG_FB_TILEBLITTING is not set
762
763#
764# Frame buffer hardware drivers
765#
766# CONFIG_FB_S1D13XXX is not set
767CONFIG_FB_PXA=y
768# CONFIG_FB_PXA_PARAMETERS is not set
769# CONFIG_FB_MBX is not set
770# CONFIG_FB_VIRTUAL is not set
771CONFIG_BACKLIGHT_LCD_SUPPORT=y
772CONFIG_LCD_CLASS_DEVICE=y
773CONFIG_BACKLIGHT_CLASS_DEVICE=y
774CONFIG_BACKLIGHT_CORGI=y
775
776#
777# Display device support
778#
779CONFIG_DISPLAY_SUPPORT=y
780
781#
782# Display hardware drivers
783#
784
785#
786# Console display driver support
787#
788# CONFIG_VGA_CONSOLE is not set
789CONFIG_DUMMY_CONSOLE=y
790CONFIG_FRAMEBUFFER_CONSOLE=y
791# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
792CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
793CONFIG_FONTS=y
794# CONFIG_FONT_8x8 is not set
795# CONFIG_FONT_8x16 is not set
796# CONFIG_FONT_6x11 is not set
797# CONFIG_FONT_7x14 is not set
798# CONFIG_FONT_PEARL_8x8 is not set
799# CONFIG_FONT_ACORN_8x8 is not set
800CONFIG_FONT_MINI_4x6=y
801# CONFIG_FONT_SUN8x16 is not set
802# CONFIG_FONT_SUN12x22 is not set
803# CONFIG_FONT_10x18 is not set
804# CONFIG_LOGO is not set
805
806#
807# Sound
808#
809CONFIG_SOUND=y
810
811#
812# Advanced Linux Sound Architecture
813#
814CONFIG_SND=m
815CONFIG_SND_TIMER=m
816CONFIG_SND_PCM=m
817# CONFIG_SND_SEQUENCER is not set
818CONFIG_SND_OSSEMUL=y
819CONFIG_SND_MIXER_OSS=m
820CONFIG_SND_PCM_OSS=m
821CONFIG_SND_PCM_OSS_PLUGINS=y
822# CONFIG_SND_DYNAMIC_MINORS is not set
823CONFIG_SND_SUPPORT_OLD_API=y
824CONFIG_SND_VERBOSE_PROCFS=y
825# CONFIG_SND_VERBOSE_PRINTK is not set
826# CONFIG_SND_DEBUG is not set
827
828#
829# Generic devices
830#
831# CONFIG_SND_DUMMY is not set
832# CONFIG_SND_MTPAV is not set
833# CONFIG_SND_SERIAL_U16550 is not set
834# CONFIG_SND_MPU401 is not set
835
836#
837# ALSA ARM devices
838#
839# CONFIG_SND_PXA2XX_AC97 is not set
840
841#
842# System on Chip audio support
843#
844CONFIG_SND_SOC=m
845CONFIG_SND_PXA2XX_SOC=m
846
847#
848# SoC Audio support for SuperH
849#
850
851#
852# Open Sound System
853#
854# CONFIG_SOUND_PRIME is not set
855# CONFIG_HID_SUPPORT is not set
856CONFIG_HID=m
857# CONFIG_USB_SUPPORT is not set
858CONFIG_MMC=y
859# CONFIG_MMC_DEBUG is not set
860# CONFIG_MMC_UNSAFE_RESUME is not set
861
862#
863# MMC/SD Card Drivers
864#
865CONFIG_MMC_BLOCK=y
866CONFIG_MMC_BLOCK_BOUNCE=y
867CONFIG_SDIO_UART=m
868
869#
870# MMC/SD Host Controller Drivers
871#
872CONFIG_MMC_PXA=y
873CONFIG_NEW_LEDS=y
874CONFIG_RTC_LIB=y
875CONFIG_RTC_CLASS=y
876CONFIG_RTC_HCTOSYS=y
877CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
878CONFIG_RTC_DEBUG=y
879
880#
881# RTC interfaces
882#
883CONFIG_RTC_INTF_SYSFS=y
884CONFIG_RTC_INTF_PROC=y
885CONFIG_RTC_INTF_DEV=y
886# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
887# CONFIG_RTC_DRV_TEST is not set
888
889#
890# I2C RTC drivers
891#
892# CONFIG_RTC_DRV_DS1307 is not set
893# CONFIG_RTC_DRV_DS1374 is not set
894# CONFIG_RTC_DRV_DS1672 is not set
895# CONFIG_RTC_DRV_MAX6900 is not set
896# CONFIG_RTC_DRV_RS5C372 is not set
897# CONFIG_RTC_DRV_ISL1208 is not set
898# CONFIG_RTC_DRV_X1205 is not set
899# CONFIG_RTC_DRV_PCF8563 is not set
900# CONFIG_RTC_DRV_PCF8583 is not set
901# CONFIG_RTC_DRV_M41T80 is not set
902
903#
904# SPI RTC drivers
905#
906
907#
908# Platform RTC drivers
909#
910# CONFIG_RTC_DRV_CMOS is not set
911# CONFIG_RTC_DRV_DS1553 is not set
912# CONFIG_RTC_DRV_STK17TA8 is not set
913# CONFIG_RTC_DRV_DS1742 is not set
914# CONFIG_RTC_DRV_M48T86 is not set
915# CONFIG_RTC_DRV_M48T59 is not set
916# CONFIG_RTC_DRV_V3020 is not set
917
918#
919# on-CPU RTC drivers
920#
921CONFIG_RTC_DRV_SA1100=y
922
923#
924# File systems
925#
926CONFIG_EXT2_FS=y
927# CONFIG_EXT2_FS_XATTR is not set
928# CONFIG_EXT2_FS_XIP is not set
929# CONFIG_EXT3_FS is not set
930# CONFIG_EXT4DEV_FS is not set
931# CONFIG_REISERFS_FS is not set
932# CONFIG_JFS_FS is not set
933# CONFIG_FS_POSIX_ACL is not set
934# CONFIG_XFS_FS is not set
935# CONFIG_GFS2_FS is not set
936# CONFIG_OCFS2_FS is not set
937# CONFIG_MINIX_FS is not set
938# CONFIG_ROMFS_FS is not set
939CONFIG_INOTIFY=y
940CONFIG_INOTIFY_USER=y
941# CONFIG_QUOTA is not set
942CONFIG_DNOTIFY=y
943# CONFIG_AUTOFS_FS is not set
944# CONFIG_AUTOFS4_FS is not set
945# CONFIG_FUSE_FS is not set
946
947#
948# CD-ROM/DVD Filesystems
949#
950# CONFIG_ISO9660_FS is not set
951# CONFIG_UDF_FS is not set
952
953#
954# DOS/FAT/NT Filesystems
955#
956CONFIG_FAT_FS=m
957CONFIG_MSDOS_FS=m
958CONFIG_VFAT_FS=m
959CONFIG_FAT_DEFAULT_CODEPAGE=437
960CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
961# CONFIG_NTFS_FS is not set
962
963#
964# Pseudo filesystems
965#
966CONFIG_PROC_FS=y
967CONFIG_PROC_SYSCTL=y
968CONFIG_SYSFS=y
969CONFIG_TMPFS=y
970# CONFIG_TMPFS_POSIX_ACL is not set
971# CONFIG_HUGETLB_PAGE is not set
972# CONFIG_CONFIGFS_FS is not set
973
974#
975# Miscellaneous filesystems
976#
977# CONFIG_ADFS_FS is not set
978# CONFIG_AFFS_FS is not set
979# CONFIG_HFS_FS is not set
980# CONFIG_HFSPLUS_FS is not set
981# CONFIG_BEFS_FS is not set
982# CONFIG_BFS_FS is not set
983# CONFIG_EFS_FS is not set
984CONFIG_JFFS2_FS=y
985CONFIG_JFFS2_FS_DEBUG=0
986CONFIG_JFFS2_FS_WRITEBUFFER=y
987# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
988# CONFIG_JFFS2_SUMMARY is not set
989# CONFIG_JFFS2_FS_XATTR is not set
990CONFIG_JFFS2_COMPRESSION_OPTIONS=y
991CONFIG_JFFS2_ZLIB=y
992CONFIG_JFFS2_LZO=y
993CONFIG_JFFS2_RTIME=y
994# CONFIG_JFFS2_RUBIN is not set
995# CONFIG_JFFS2_CMODE_NONE is not set
996CONFIG_JFFS2_CMODE_PRIORITY=y
997# CONFIG_JFFS2_CMODE_SIZE is not set
998# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
999# CONFIG_CRAMFS is not set
1000# CONFIG_VXFS_FS is not set
1001# CONFIG_HPFS_FS is not set
1002# CONFIG_QNX4FS_FS is not set
1003# CONFIG_SYSV_FS is not set
1004# CONFIG_UFS_FS is not set
1005CONFIG_NETWORK_FILESYSTEMS=y
1006CONFIG_NFS_FS=y
1007CONFIG_NFS_V3=y
1008# CONFIG_NFS_V3_ACL is not set
1009# CONFIG_NFS_V4 is not set
1010# CONFIG_NFS_DIRECTIO is not set
1011# CONFIG_NFSD is not set
1012CONFIG_ROOT_NFS=y
1013CONFIG_LOCKD=y
1014CONFIG_LOCKD_V4=y
1015CONFIG_NFS_COMMON=y
1016CONFIG_SUNRPC=y
1017# CONFIG_SUNRPC_BIND34 is not set
1018# CONFIG_RPCSEC_GSS_KRB5 is not set
1019# CONFIG_RPCSEC_GSS_SPKM3 is not set
1020# CONFIG_SMB_FS is not set
1021# CONFIG_CIFS is not set
1022# CONFIG_NCP_FS is not set
1023# CONFIG_CODA_FS is not set
1024# CONFIG_AFS_FS is not set
1025
1026#
1027# Partition Types
1028#
1029# CONFIG_PARTITION_ADVANCED is not set
1030CONFIG_MSDOS_PARTITION=y
1031CONFIG_NLS=y
1032CONFIG_NLS_DEFAULT="utf8"
1033CONFIG_NLS_CODEPAGE_437=y
1034# CONFIG_NLS_CODEPAGE_737 is not set
1035# CONFIG_NLS_CODEPAGE_775 is not set
1036# CONFIG_NLS_CODEPAGE_850 is not set
1037# CONFIG_NLS_CODEPAGE_852 is not set
1038# CONFIG_NLS_CODEPAGE_855 is not set
1039# CONFIG_NLS_CODEPAGE_857 is not set
1040# CONFIG_NLS_CODEPAGE_860 is not set
1041# CONFIG_NLS_CODEPAGE_861 is not set
1042# CONFIG_NLS_CODEPAGE_862 is not set
1043# CONFIG_NLS_CODEPAGE_863 is not set
1044# CONFIG_NLS_CODEPAGE_864 is not set
1045# CONFIG_NLS_CODEPAGE_865 is not set
1046# CONFIG_NLS_CODEPAGE_866 is not set
1047# CONFIG_NLS_CODEPAGE_869 is not set
1048# CONFIG_NLS_CODEPAGE_936 is not set
1049# CONFIG_NLS_CODEPAGE_950 is not set
1050# CONFIG_NLS_CODEPAGE_932 is not set
1051# CONFIG_NLS_CODEPAGE_949 is not set
1052# CONFIG_NLS_CODEPAGE_874 is not set
1053# CONFIG_NLS_ISO8859_8 is not set
1054# CONFIG_NLS_CODEPAGE_1250 is not set
1055CONFIG_NLS_CODEPAGE_1251=m
1056# CONFIG_NLS_ASCII is not set
1057CONFIG_NLS_ISO8859_1=y
1058# CONFIG_NLS_ISO8859_2 is not set
1059# CONFIG_NLS_ISO8859_3 is not set
1060# CONFIG_NLS_ISO8859_4 is not set
1061# CONFIG_NLS_ISO8859_5 is not set
1062# CONFIG_NLS_ISO8859_6 is not set
1063# CONFIG_NLS_ISO8859_7 is not set
1064# CONFIG_NLS_ISO8859_9 is not set
1065# CONFIG_NLS_ISO8859_13 is not set
1066# CONFIG_NLS_ISO8859_14 is not set
1067# CONFIG_NLS_ISO8859_15 is not set
1068# CONFIG_NLS_KOI8_R is not set
1069# CONFIG_NLS_KOI8_U is not set
1070CONFIG_NLS_UTF8=y
1071# CONFIG_DLM is not set
1072
1073#
1074# Kernel hacking
1075#
1076CONFIG_PRINTK_TIME=y
1077CONFIG_ENABLE_WARN_DEPRECATED=y
1078CONFIG_ENABLE_MUST_CHECK=y
1079# CONFIG_MAGIC_SYSRQ is not set
1080# CONFIG_UNUSED_SYMBOLS is not set
1081# CONFIG_DEBUG_FS is not set
1082# CONFIG_HEADERS_CHECK is not set
1083CONFIG_DEBUG_KERNEL=y
1084# CONFIG_DEBUG_SHIRQ is not set
1085CONFIG_DETECT_SOFTLOCKUP=y
1086# CONFIG_SCHED_DEBUG is not set
1087# CONFIG_SCHEDSTATS is not set
1088CONFIG_TIMER_STATS=y
1089# CONFIG_DEBUG_SLAB is not set
1090CONFIG_DEBUG_PREEMPT=y
1091# CONFIG_DEBUG_RT_MUTEXES is not set
1092# CONFIG_RT_MUTEX_TESTER is not set
1093# CONFIG_DEBUG_SPINLOCK is not set
1094CONFIG_DEBUG_MUTEXES=y
1095# CONFIG_DEBUG_LOCK_ALLOC is not set
1096# CONFIG_PROVE_LOCKING is not set
1097# CONFIG_LOCK_STAT is not set
1098# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1099# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1100# CONFIG_DEBUG_KOBJECT is not set
1101CONFIG_DEBUG_BUGVERBOSE=y
1102# CONFIG_DEBUG_INFO is not set
1103CONFIG_DEBUG_VM=y
1104# CONFIG_DEBUG_LIST is not set
1105# CONFIG_DEBUG_SG is not set
1106CONFIG_FRAME_POINTER=y
1107CONFIG_FORCED_INLINING=y
1108# CONFIG_BOOT_PRINTK_DELAY is not set
1109# CONFIG_RCU_TORTURE_TEST is not set
1110# CONFIG_FAULT_INJECTION is not set
1111# CONFIG_SAMPLES is not set
1112CONFIG_DEBUG_USER=y
1113CONFIG_DEBUG_ERRORS=y
1114CONFIG_DEBUG_LL=y
1115# CONFIG_DEBUG_ICEDCC is not set
1116
1117#
1118# Security options
1119#
1120# CONFIG_KEYS is not set
1121# CONFIG_SECURITY is not set
1122# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1123CONFIG_CRYPTO=y
1124CONFIG_CRYPTO_ALGAPI=m
1125CONFIG_CRYPTO_BLKCIPHER=m
1126CONFIG_CRYPTO_MANAGER=m
1127# CONFIG_CRYPTO_HMAC is not set
1128# CONFIG_CRYPTO_XCBC is not set
1129# CONFIG_CRYPTO_NULL is not set
1130# CONFIG_CRYPTO_MD4 is not set
1131# CONFIG_CRYPTO_MD5 is not set
1132CONFIG_CRYPTO_SHA1=m
1133# CONFIG_CRYPTO_SHA256 is not set
1134# CONFIG_CRYPTO_SHA512 is not set
1135# CONFIG_CRYPTO_WP512 is not set
1136# CONFIG_CRYPTO_TGR192 is not set
1137# CONFIG_CRYPTO_GF128MUL is not set
1138CONFIG_CRYPTO_ECB=m
1139# CONFIG_CRYPTO_CBC is not set
1140CONFIG_CRYPTO_PCBC=m
1141# CONFIG_CRYPTO_LRW is not set
1142# CONFIG_CRYPTO_XTS is not set
1143# CONFIG_CRYPTO_CRYPTD is not set
1144# CONFIG_CRYPTO_DES is not set
1145# CONFIG_CRYPTO_FCRYPT is not set
1146# CONFIG_CRYPTO_BLOWFISH is not set
1147# CONFIG_CRYPTO_TWOFISH is not set
1148# CONFIG_CRYPTO_SERPENT is not set
1149# CONFIG_CRYPTO_AES is not set
1150# CONFIG_CRYPTO_CAST5 is not set
1151# CONFIG_CRYPTO_CAST6 is not set
1152# CONFIG_CRYPTO_TEA is not set
1153CONFIG_CRYPTO_ARC4=m
1154# CONFIG_CRYPTO_KHAZAD is not set
1155# CONFIG_CRYPTO_ANUBIS is not set
1156# CONFIG_CRYPTO_SEED is not set
1157# CONFIG_CRYPTO_DEFLATE is not set
1158# CONFIG_CRYPTO_MICHAEL_MIC is not set
1159# CONFIG_CRYPTO_CRC32C is not set
1160# CONFIG_CRYPTO_CAMELLIA is not set
1161# CONFIG_CRYPTO_TEST is not set
1162# CONFIG_CRYPTO_AUTHENC is not set
1163# CONFIG_CRYPTO_HW is not set
1164
1165#
1166# Library routines
1167#
1168CONFIG_BITREVERSE=y
1169CONFIG_CRC_CCITT=y
1170# CONFIG_CRC16 is not set
1171# CONFIG_CRC_ITU_T is not set
1172CONFIG_CRC32=y
1173# CONFIG_CRC7 is not set
1174# CONFIG_LIBCRC32C is not set
1175CONFIG_ZLIB_INFLATE=y
1176CONFIG_ZLIB_DEFLATE=y
1177CONFIG_LZO_COMPRESS=y
1178CONFIG_LZO_DECOMPRESS=y
1179CONFIG_PLIST=y
1180CONFIG_HAS_IOMEM=y
1181CONFIG_HAS_IOPORT=y
1182CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/ns9xxx_defconfig b/arch/arm/configs/ns9xxx_defconfig
index 0e5794c6a48e..7dc1580e4d99 100644
--- a/arch/arm/configs/ns9xxx_defconfig
+++ b/arch/arm/configs/ns9xxx_defconfig
@@ -1,621 +1,79 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Thu Feb 15 20:51:47 2007
5#
6CONFIG_ARM=y
7# CONFIG_GENERIC_TIME is not set
8CONFIG_MMU=y
9CONFIG_GENERIC_HARDIRQS=y
10CONFIG_TRACE_IRQFLAGS_SUPPORT=y
11CONFIG_HARDIRQS_SW_RESEND=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_RWSEM_GENERIC_SPINLOCK=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_GENERIC_HWEIGHT=y
17CONFIG_GENERIC_CALIBRATE_DELAY=y
18CONFIG_VECTORS_BASE=0xffff0000
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20
21#
22# Code maturity level options
23#
24CONFIG_EXPERIMENTAL=y
25CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32
27
28#
29# General setup
30#
31CONFIG_LOCALVERSION=""
32CONFIG_LOCALVERSION_AUTO=y
33CONFIG_SWAP=y
34CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36# CONFIG_BSD_PROCESS_ACCT is not set
37# CONFIG_UTS_NS is not set
38CONFIG_IKCONFIG=y 1CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y 2CONFIG_IKCONFIG_PROC=y
40CONFIG_SYSFS_DEPRECATED=y 3CONFIG_BLK_DEV_INITRD=y
41# CONFIG_RELAY is not set
42CONFIG_INITRAMFS_SOURCE=""
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SYSCTL=y
45CONFIG_EMBEDDED=y
46CONFIG_UID16=y
47# CONFIG_SYSCTL_SYSCALL is not set
48CONFIG_KALLSYMS=y
49# CONFIG_KALLSYMS_ALL is not set
50# CONFIG_KALLSYMS_EXTRA_PASS is not set
51CONFIG_HOTPLUG=y
52CONFIG_PRINTK=y
53CONFIG_BUG=y
54CONFIG_ELF_CORE=y
55CONFIG_BASE_FULL=y
56CONFIG_FUTEX=y
57CONFIG_EPOLL=y
58CONFIG_SHMEM=y
59CONFIG_SLAB=y
60# CONFIG_VM_EVENT_COUNTERS is not set
61CONFIG_RT_MUTEXES=y
62# CONFIG_TINY_SHMEM is not set
63CONFIG_BASE_SMALL=0
64# CONFIG_SLOB is not set
65
66#
67# Loadable module support
68#
69CONFIG_MODULES=y 4CONFIG_MODULES=y
70CONFIG_MODULE_UNLOAD=y 5CONFIG_MODULE_UNLOAD=y
71CONFIG_MODULE_FORCE_UNLOAD=y
72CONFIG_MODVERSIONS=y
73CONFIG_MODULE_SRCVERSION_ALL=y
74CONFIG_KMOD=y
75
76#
77# Block layer
78#
79CONFIG_BLOCK=y
80# CONFIG_LBD is not set
81# CONFIG_BLK_DEV_IO_TRACE is not set
82# CONFIG_LSF is not set
83
84#
85# IO Schedulers
86#
87CONFIG_IOSCHED_NOOP=y
88# CONFIG_IOSCHED_AS is not set 6# CONFIG_IOSCHED_AS is not set
89# CONFIG_IOSCHED_DEADLINE is not set 7# CONFIG_IOSCHED_DEADLINE is not set
90# CONFIG_IOSCHED_CFQ is not set 8# CONFIG_IOSCHED_CFQ is not set
91# CONFIG_DEFAULT_AS is not set
92# CONFIG_DEFAULT_DEADLINE is not set
93# CONFIG_DEFAULT_CFQ is not set
94CONFIG_DEFAULT_NOOP=y
95CONFIG_DEFAULT_IOSCHED="noop"
96
97#
98# System Type
99#
100# CONFIG_ARCH_AAEC2000 is not set
101# CONFIG_ARCH_INTEGRATOR is not set
102# CONFIG_ARCH_REALVIEW is not set
103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_AT91 is not set
105# CONFIG_ARCH_CLPS7500 is not set
106# CONFIG_ARCH_CLPS711X is not set
107# CONFIG_ARCH_CO285 is not set
108# CONFIG_ARCH_EBSA110 is not set
109# CONFIG_ARCH_EP93XX is not set
110# CONFIG_ARCH_FOOTBRIDGE is not set
111# CONFIG_ARCH_NETX is not set
112# CONFIG_ARCH_H720X is not set
113# CONFIG_ARCH_IMX is not set
114# CONFIG_ARCH_IOP32X is not set
115# CONFIG_ARCH_IOP33X is not set
116# CONFIG_ARCH_IOP13XX is not set
117# CONFIG_ARCH_IXP4XX is not set
118# CONFIG_ARCH_IXP2000 is not set
119# CONFIG_ARCH_IXP23XX is not set
120# CONFIG_ARCH_L7200 is not set
121CONFIG_ARCH_NS9XXX=y 9CONFIG_ARCH_NS9XXX=y
122# CONFIG_ARCH_PNX4008 is not set 10CONFIG_MACH_A9M9360=y
123# CONFIG_ARCH_PXA is not set 11CONFIG_MACH_A9M9750=y
124# CONFIG_ARCH_RPC is not set 12CONFIG_MACH_CC7UCAMRY=y
125# CONFIG_ARCH_SA1100 is not set 13CONFIG_MACH_CC9C=y
126# CONFIG_ARCH_S3C2410 is not set 14CONFIG_MACH_CC9P9210=y
127# CONFIG_ARCH_SHARK is not set 15CONFIG_MACH_CC9P9210JS=y
128# CONFIG_ARCH_LH7A40X is not set 16CONFIG_MACH_CC9P9215=y
129# CONFIG_ARCH_OMAP is not set 17CONFIG_MACH_CC9P9215JS=y
130
131#
132# NS9xxx Implementations
133#
134CONFIG_MACH_CC9P9360DEV=y 18CONFIG_MACH_CC9P9360DEV=y
135CONFIG_PROCESSOR_NS9360=y 19CONFIG_MACH_CC9P9360JS=y
136CONFIG_BOARD_A9M9750DEV=y 20CONFIG_MACH_CC9P9360VAL=y
137 21CONFIG_MACH_CC9P9750DEV=y
138# 22CONFIG_MACH_CC9P9750VAL=y
139# Processor Type 23CONFIG_MACH_CCW9C=y
140# 24CONFIG_MACH_INC20OTTER=y
141CONFIG_CPU_32=y 25CONFIG_MACH_OTTER=y
142CONFIG_CPU_ARM926T=y 26CONFIG_NO_HZ=y
143CONFIG_CPU_32v5=y 27CONFIG_HIGH_RES_TIMERS=y
144CONFIG_CPU_ABRT_EV5TJ=y
145CONFIG_CPU_CACHE_VIVT=y
146CONFIG_CPU_COPY_V4WB=y
147CONFIG_CPU_TLB_V4WBI=y
148CONFIG_CPU_CP15=y
149CONFIG_CPU_CP15_MMU=y
150
151#
152# Processor Features
153#
154# CONFIG_ARM_THUMB is not set
155# CONFIG_CPU_ICACHE_DISABLE is not set
156# CONFIG_CPU_DCACHE_DISABLE is not set
157# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
158# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
159
160#
161# Bus support
162#
163
164#
165# PCCARD (PCMCIA/CardBus) support
166#
167# CONFIG_PCCARD is not set
168
169#
170# Kernel Features
171#
172# CONFIG_PREEMPT is not set
173# CONFIG_NO_IDLE_HZ is not set
174CONFIG_HZ=100
175# CONFIG_AEABI is not set
176# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
177CONFIG_SELECT_MEMORY_MODEL=y
178CONFIG_FLATMEM_MANUAL=y
179# CONFIG_DISCONTIGMEM_MANUAL is not set
180# CONFIG_SPARSEMEM_MANUAL is not set
181CONFIG_FLATMEM=y
182CONFIG_FLAT_NODE_MEM_MAP=y
183# CONFIG_SPARSEMEM_STATIC is not set
184CONFIG_SPLIT_PTLOCK_CPUS=4096
185# CONFIG_RESOURCES_64BIT is not set
186CONFIG_ALIGNMENT_TRAP=y
187
188#
189# Boot options
190#
191CONFIG_ZBOOT_ROM_TEXT=0x0
192CONFIG_ZBOOT_ROM_BSS=0x0
193CONFIG_CMDLINE=""
194# CONFIG_XIP_KERNEL is not set
195
196#
197# Floating point emulation
198#
199
200#
201# At least one emulation must be selected
202#
203CONFIG_FPE_NWFPE=y 28CONFIG_FPE_NWFPE=y
204# CONFIG_FPE_NWFPE_XP is not set 29CONFIG_NET=y
205# CONFIG_FPE_FASTFPE is not set 30CONFIG_PACKET=m
206# CONFIG_VFP is not set 31CONFIG_INET=y
207 32CONFIG_IP_PNP=y
208# 33CONFIG_SYN_COOKIES=y
209# Userspace binary formats 34CONFIG_MTD=m
210# 35CONFIG_MTD_CONCAT=m
211CONFIG_BINFMT_ELF=y 36CONFIG_MTD_CHAR=m
212# CONFIG_BINFMT_AOUT is not set 37CONFIG_MTD_BLOCK=m
213# CONFIG_BINFMT_MISC is not set 38CONFIG_MTD_CFI=m
214# CONFIG_ARTHUR is not set 39CONFIG_MTD_JEDECPROBE=m
215 40CONFIG_MTD_CFI_AMDSTD=m
216# 41CONFIG_MTD_PHYSMAP=m
217# Power management options 42CONFIG_MTD_PHYSMAP_START=0x0
218# 43CONFIG_BLK_DEV_LOOP=m
219# CONFIG_PM is not set 44CONFIG_NETDEVICES=y
220# CONFIG_APM is not set 45CONFIG_NET_ETHERNET=y
221 46CONFIG_NS9XXX_ETH=y
222#
223# Networking
224#
225# CONFIG_NET is not set
226
227#
228# Device Drivers
229#
230
231#
232# Generic Driver Options
233#
234CONFIG_STANDALONE=y
235CONFIG_PREVENT_FIRMWARE_BUILD=y
236# CONFIG_FW_LOADER is not set
237# CONFIG_DEBUG_DRIVER is not set
238# CONFIG_SYS_HYPERVISOR is not set
239
240#
241# Connector - unified userspace <-> kernelspace linker
242#
243
244#
245# Memory Technology Devices (MTD)
246#
247# CONFIG_MTD is not set
248
249#
250# Parallel port support
251#
252# CONFIG_PARPORT is not set
253
254#
255# Plug and Play support
256#
257
258#
259# Block devices
260#
261# CONFIG_BLK_DEV_COW_COMMON is not set
262# CONFIG_BLK_DEV_LOOP is not set
263CONFIG_BLK_DEV_RAM=y
264CONFIG_BLK_DEV_RAM_COUNT=16
265CONFIG_BLK_DEV_RAM_SIZE=4096
266CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
267CONFIG_BLK_DEV_INITRD=y
268# CONFIG_CDROM_PKTCDVD is not set
269
270#
271# SCSI device support
272#
273# CONFIG_RAID_ATTRS is not set
274# CONFIG_SCSI is not set
275# CONFIG_SCSI_NETLINK is not set
276
277#
278# Serial ATA (prod) and Parallel ATA (experimental) drivers
279#
280# CONFIG_ATA is not set
281
282#
283# Multi-device support (RAID and LVM)
284#
285# CONFIG_MD is not set
286
287#
288# Fusion MPT device support
289#
290# CONFIG_FUSION is not set
291
292#
293# IEEE 1394 (FireWire) support
294#
295
296#
297# I2O device support
298#
299
300#
301# ISDN subsystem
302#
303
304#
305# Input device support
306#
307CONFIG_INPUT=y
308# CONFIG_INPUT_FF_MEMLESS is not set
309
310#
311# Userland interfaces
312#
313# CONFIG_INPUT_MOUSEDEV is not set
314# CONFIG_INPUT_JOYDEV is not set
315# CONFIG_INPUT_TSDEV is not set
316# CONFIG_INPUT_EVDEV is not set
317# CONFIG_INPUT_EVBUG is not set
318
319#
320# Input Device Drivers
321#
322# CONFIG_INPUT_KEYBOARD is not set
323# CONFIG_INPUT_MOUSE is not set
324# CONFIG_INPUT_JOYSTICK is not set
325# CONFIG_INPUT_TOUCHSCREEN is not set
326# CONFIG_INPUT_MISC is not set
327
328#
329# Hardware I/O ports
330#
331CONFIG_SERIO=y
332# CONFIG_SERIO_SERPORT is not set 47# CONFIG_SERIO_SERPORT is not set
333CONFIG_SERIO_LIBPS2=y
334# CONFIG_SERIO_RAW is not set
335# CONFIG_GAMEPORT is not set
336
337#
338# Character devices
339#
340CONFIG_VT=y
341CONFIG_VT_CONSOLE=y
342CONFIG_HW_CONSOLE=y
343# CONFIG_VT_HW_CONSOLE_BINDING is not set
344# CONFIG_SERIAL_NONSTANDARD is not set
345
346#
347# Serial drivers
348#
349CONFIG_SERIAL_8250=y 48CONFIG_SERIAL_8250=y
350CONFIG_SERIAL_8250_CONSOLE=y 49CONFIG_SERIAL_8250_CONSOLE=y
351CONFIG_SERIAL_8250_NR_UARTS=4 50CONFIG_SERIAL_NS921X=y
352CONFIG_SERIAL_8250_RUNTIME_UARTS=4 51CONFIG_SERIAL_NS921X_CONSOLE=y
353CONFIG_SERIAL_8250_EXTENDED=y
354# CONFIG_SERIAL_8250_MANY_PORTS is not set
355# CONFIG_SERIAL_8250_SHARE_IRQ is not set
356# CONFIG_SERIAL_8250_DETECT_IRQ is not set
357# CONFIG_SERIAL_8250_RSA is not set
358
359#
360# Non-8250 serial port support
361#
362CONFIG_SERIAL_CORE=y
363CONFIG_SERIAL_CORE_CONSOLE=y
364CONFIG_UNIX98_PTYS=y
365# CONFIG_LEGACY_PTYS is not set 52# CONFIG_LEGACY_PTYS is not set
366
367#
368# IPMI
369#
370# CONFIG_IPMI_HANDLER is not set
371
372#
373# Watchdog Cards
374#
375# CONFIG_WATCHDOG is not set
376# CONFIG_HW_RANDOM is not set 53# CONFIG_HW_RANDOM is not set
377# CONFIG_NVRAM is not set 54CONFIG_ADC_NS9215=m
378# CONFIG_DTLK is not set 55CONFIG_I2C=m
379# CONFIG_R3964 is not set 56CONFIG_I2C_GPIO=m
380# CONFIG_RAW_DRIVER is not set
381
382#
383# TPM devices
384#
385# CONFIG_TCG_TPM is not set
386
387#
388# I2C support
389#
390# CONFIG_I2C is not set
391
392#
393# SPI support
394#
395# CONFIG_SPI is not set
396# CONFIG_SPI_MASTER is not set
397
398#
399# Dallas's 1-wire bus
400#
401# CONFIG_W1 is not set
402
403#
404# Hardware Monitoring support
405#
406# CONFIG_HWMON is not set 57# CONFIG_HWMON is not set
407# CONFIG_HWMON_VID is not set
408
409#
410# Misc devices
411#
412# CONFIG_TIFM_CORE is not set
413
414#
415# LED devices
416#
417# CONFIG_NEW_LEDS is not set
418
419#
420# LED drivers
421#
422
423#
424# LED Triggers
425#
426
427#
428# Multimedia devices
429#
430# CONFIG_VIDEO_DEV is not set
431
432#
433# Digital Video Broadcasting Devices
434#
435
436#
437# Graphics support
438#
439# CONFIG_FIRMWARE_EDID is not set
440# CONFIG_FB is not set
441
442#
443# Console display driver support
444#
445# CONFIG_VGA_CONSOLE is not set 58# CONFIG_VGA_CONSOLE is not set
446CONFIG_DUMMY_CONSOLE=y 59# CONFIG_HID_DEBUG is not set
447# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 60# CONFIG_USB_SUPPORT is not set
448 61CONFIG_NEW_LEDS=y
449# 62CONFIG_LEDS_CLASS=m
450# Sound 63CONFIG_LEDS_GPIO=m
451# 64CONFIG_LEDS_TRIGGERS=y
452# CONFIG_SOUND is not set 65CONFIG_LEDS_TRIGGER_TIMER=m
453 66CONFIG_LEDS_TRIGGER_HEARTBEAT=m
454# 67CONFIG_RTC_CLASS=m
455# HID Devices 68CONFIG_RTC_DRV_NS9215=m
456# 69CONFIG_EXT2_FS=m
457CONFIG_HID=y
458
459#
460# USB support
461#
462CONFIG_USB_ARCH_HAS_HCD=y
463# CONFIG_USB_ARCH_HAS_OHCI is not set
464# CONFIG_USB_ARCH_HAS_EHCI is not set
465# CONFIG_USB is not set
466
467#
468# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
469#
470
471#
472# USB Gadget Support
473#
474# CONFIG_USB_GADGET is not set
475
476#
477# MMC/SD Card support
478#
479# CONFIG_MMC is not set
480
481#
482# Real Time Clock
483#
484CONFIG_RTC_LIB=y
485# CONFIG_RTC_CLASS is not set
486
487#
488# File systems
489#
490CONFIG_EXT2_FS=y
491# CONFIG_EXT2_FS_XATTR is not set
492# CONFIG_EXT2_FS_XIP is not set
493# CONFIG_EXT3_FS is not set
494# CONFIG_EXT4DEV_FS is not set
495# CONFIG_REISERFS_FS is not set
496# CONFIG_JFS_FS is not set
497# CONFIG_FS_POSIX_ACL is not set
498# CONFIG_XFS_FS is not set
499# CONFIG_GFS2_FS is not set
500# CONFIG_MINIX_FS is not set
501# CONFIG_ROMFS_FS is not set
502CONFIG_INOTIFY=y
503CONFIG_INOTIFY_USER=y
504# CONFIG_QUOTA is not set
505# CONFIG_DNOTIFY is not set
506# CONFIG_AUTOFS_FS is not set
507# CONFIG_AUTOFS4_FS is not set
508# CONFIG_FUSE_FS is not set
509
510#
511# CD-ROM/DVD Filesystems
512#
513# CONFIG_ISO9660_FS is not set
514# CONFIG_UDF_FS is not set
515
516#
517# DOS/FAT/NT Filesystems
518#
519# CONFIG_MSDOS_FS is not set
520# CONFIG_VFAT_FS is not set
521# CONFIG_NTFS_FS is not set
522
523#
524# Pseudo filesystems
525#
526CONFIG_PROC_FS=y
527CONFIG_PROC_SYSCTL=y
528CONFIG_SYSFS=y
529CONFIG_TMPFS=y 70CONFIG_TMPFS=y
530# CONFIG_TMPFS_POSIX_ACL is not set 71CONFIG_JFFS2_FS=m
531# CONFIG_HUGETLB_PAGE is not set 72CONFIG_NFS_FS=y
532CONFIG_RAMFS=y 73CONFIG_ROOT_NFS=y
533# CONFIG_CONFIGFS_FS is not set
534
535#
536# Miscellaneous filesystems
537#
538# CONFIG_ADFS_FS is not set
539# CONFIG_AFFS_FS is not set
540# CONFIG_HFS_FS is not set
541# CONFIG_HFSPLUS_FS is not set
542# CONFIG_BEFS_FS is not set
543# CONFIG_BFS_FS is not set
544# CONFIG_EFS_FS is not set
545# CONFIG_CRAMFS is not set
546# CONFIG_VXFS_FS is not set
547# CONFIG_HPFS_FS is not set
548# CONFIG_QNX4FS_FS is not set
549# CONFIG_SYSV_FS is not set
550# CONFIG_UFS_FS is not set
551
552#
553# Partition Types
554#
555# CONFIG_PARTITION_ADVANCED is not set
556CONFIG_MSDOS_PARTITION=y
557
558#
559# Native Language Support
560#
561# CONFIG_NLS is not set
562
563#
564# Profiling support
565#
566# CONFIG_PROFILING is not set
567
568#
569# Kernel hacking
570#
571# CONFIG_PRINTK_TIME is not set
572# CONFIG_ENABLE_MUST_CHECK is not set 74# CONFIG_ENABLE_MUST_CHECK is not set
573# CONFIG_MAGIC_SYSRQ is not set
574# CONFIG_UNUSED_SYMBOLS is not set
575# CONFIG_DEBUG_FS is not set
576# CONFIG_HEADERS_CHECK is not set
577CONFIG_DEBUG_KERNEL=y 75CONFIG_DEBUG_KERNEL=y
578CONFIG_LOG_BUF_SHIFT=14
579# CONFIG_DETECT_SOFTLOCKUP is not set
580# CONFIG_SCHEDSTATS is not set
581# CONFIG_DEBUG_SLAB is not set
582# CONFIG_DEBUG_RT_MUTEXES is not set
583# CONFIG_RT_MUTEX_TESTER is not set
584# CONFIG_DEBUG_SPINLOCK is not set
585# CONFIG_DEBUG_MUTEXES is not set
586# CONFIG_DEBUG_RWSEMS is not set
587# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
588# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
589# CONFIG_DEBUG_KOBJECT is not set
590CONFIG_DEBUG_BUGVERBOSE=y 76CONFIG_DEBUG_BUGVERBOSE=y
591CONFIG_DEBUG_INFO=y 77CONFIG_DEBUG_INFO=y
592# CONFIG_DEBUG_VM is not set
593# CONFIG_DEBUG_LIST is not set
594CONFIG_FRAME_POINTER=y
595CONFIG_FORCED_INLINING=y
596# CONFIG_RCU_TORTURE_TEST is not set
597CONFIG_DEBUG_USER=y 78CONFIG_DEBUG_USER=y
598CONFIG_DEBUG_ERRORS=y 79CONFIG_DEBUG_ERRORS=y
599CONFIG_DEBUG_LL=y
600CONFIG_DEBUG_ICEDCC=y
601
602#
603# Security options
604#
605# CONFIG_KEYS is not set
606# CONFIG_SECURITY is not set
607
608#
609# Cryptographic options
610#
611# CONFIG_CRYPTO is not set
612
613#
614# Library routines
615#
616# CONFIG_CRC_CCITT is not set
617# CONFIG_CRC16 is not set
618# CONFIG_CRC32 is not set
619# CONFIG_LIBCRC32C is not set
620CONFIG_PLIST=y
621CONFIG_IOMAP_COPY=y
diff --git a/arch/arm/configs/orion_defconfig b/arch/arm/configs/orion5x_defconfig
index 1e5aaa645fcd..52cd99bd52fb 100644
--- a/arch/arm/configs/orion_defconfig
+++ b/arch/arm/configs/orion5x_defconfig
@@ -140,7 +140,7 @@ CONFIG_CLASSIC_RCU=y
140# CONFIG_ARCH_KS8695 is not set 140# CONFIG_ARCH_KS8695 is not set
141# CONFIG_ARCH_NS9XXX is not set 141# CONFIG_ARCH_NS9XXX is not set
142# CONFIG_ARCH_MXC is not set 142# CONFIG_ARCH_MXC is not set
143CONFIG_ARCH_ORION=y 143CONFIG_ARCH_ORION5X=y
144# CONFIG_ARCH_PNX4008 is not set 144# CONFIG_ARCH_PNX4008 is not set
145# CONFIG_ARCH_PXA is not set 145# CONFIG_ARCH_PXA is not set
146# CONFIG_ARCH_RPC is not set 146# CONFIG_ARCH_RPC is not set
diff --git a/arch/arm/configs/picotux200_defconfig b/arch/arm/configs/picotux200_defconfig
index 3c0c4f192dc1..95a22f512805 100644
--- a/arch/arm/configs/picotux200_defconfig
+++ b/arch/arm/configs/picotux200_defconfig
@@ -727,14 +727,14 @@ CONFIG_I2C_CHARDEV=m
727# 727#
728# I2C Algorithms 728# I2C Algorithms
729# 729#
730# CONFIG_I2C_ALGOBIT is not set 730CONFIG_I2C_ALGOBIT=m
731# CONFIG_I2C_ALGOPCF is not set 731# CONFIG_I2C_ALGOPCF is not set
732# CONFIG_I2C_ALGOPCA is not set 732# CONFIG_I2C_ALGOPCA is not set
733 733
734# 734#
735# I2C Hardware Bus support 735# I2C Hardware Bus support
736# 736#
737CONFIG_I2C_AT91=m 737CONFIG_I2C_GPIO=m
738# CONFIG_I2C_OCORES is not set 738# CONFIG_I2C_OCORES is not set
739# CONFIG_I2C_PARPORT_LIGHT is not set 739# CONFIG_I2C_PARPORT_LIGHT is not set
740# CONFIG_I2C_STUB is not set 740# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/sam9_l9260_defconfig b/arch/arm/configs/sam9_l9260_defconfig
new file mode 100644
index 000000000000..484dc9739dfc
--- /dev/null
+++ b/arch/arm/configs/sam9_l9260_defconfig
@@ -0,0 +1,1098 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23
4# Sun Oct 14 02:01:07 2007
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
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
40CONFIG_POSIX_MQUEUE=y
41CONFIG_BSD_PROCESS_ACCT=y
42CONFIG_BSD_PROCESS_ACCT_V3=y
43# CONFIG_TASKSTATS is not set
44# CONFIG_USER_NS is not set
45CONFIG_AUDIT=y
46# CONFIG_IKCONFIG is not set
47CONFIG_LOG_BUF_SHIFT=15
48CONFIG_SYSFS_DEPRECATED=y
49# CONFIG_RELAY is not set
50CONFIG_BLK_DEV_INITRD=y
51CONFIG_INITRAMFS_SOURCE=""
52CONFIG_CC_OPTIMIZE_FOR_SIZE=y
53CONFIG_SYSCTL=y
54# CONFIG_EMBEDDED is not set
55CONFIG_UID16=y
56CONFIG_SYSCTL_SYSCALL=y
57CONFIG_KALLSYMS=y
58# CONFIG_KALLSYMS_ALL is not set
59# CONFIG_KALLSYMS_EXTRA_PASS is not set
60CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y
62CONFIG_BUG=y
63CONFIG_ELF_CORE=y
64CONFIG_BASE_FULL=y
65CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
67CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y
69CONFIG_EVENTFD=y
70CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLAB=y
73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set
75CONFIG_RT_MUTEXES=y
76# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=0
78# CONFIG_MODULES is not set
79CONFIG_BLOCK=y
80CONFIG_LBD=y
81# CONFIG_BLK_DEV_IO_TRACE is not set
82CONFIG_LSF=y
83# CONFIG_BLK_DEV_BSG is not set
84
85#
86# IO Schedulers
87#
88CONFIG_IOSCHED_NOOP=y
89CONFIG_IOSCHED_AS=y
90CONFIG_IOSCHED_DEADLINE=y
91CONFIG_IOSCHED_CFQ=y
92# CONFIG_DEFAULT_AS is not set
93# CONFIG_DEFAULT_DEADLINE is not set
94CONFIG_DEFAULT_CFQ=y
95# CONFIG_DEFAULT_NOOP is not set
96CONFIG_DEFAULT_IOSCHED="cfq"
97
98#
99# System Type
100#
101# CONFIG_ARCH_AAEC2000 is not set
102# CONFIG_ARCH_INTEGRATOR is not set
103# CONFIG_ARCH_REALVIEW is not set
104# CONFIG_ARCH_VERSATILE is not set
105CONFIG_ARCH_AT91=y
106# CONFIG_ARCH_CLPS7500 is not set
107# CONFIG_ARCH_CLPS711X is not set
108# CONFIG_ARCH_CO285 is not set
109# CONFIG_ARCH_EBSA110 is not set
110# CONFIG_ARCH_EP93XX is not set
111# CONFIG_ARCH_FOOTBRIDGE is not set
112# CONFIG_ARCH_NETX is not set
113# CONFIG_ARCH_H720X is not set
114# CONFIG_ARCH_IMX is not set
115# CONFIG_ARCH_IOP13XX is not set
116# CONFIG_ARCH_IOP32X is not set
117# CONFIG_ARCH_IOP33X is not set
118# CONFIG_ARCH_IXP23XX is not set
119# CONFIG_ARCH_IXP2000 is not set
120# CONFIG_ARCH_IXP4XX is not set
121# CONFIG_ARCH_L7200 is not set
122# CONFIG_ARCH_KS8695 is not set
123# CONFIG_ARCH_NS9XXX is not set
124# CONFIG_ARCH_MXC is not set
125# CONFIG_ARCH_PNX4008 is not set
126# CONFIG_ARCH_PXA is not set
127# CONFIG_ARCH_RPC is not set
128# CONFIG_ARCH_SA1100 is not set
129# CONFIG_ARCH_S3C2410 is not set
130# CONFIG_ARCH_SHARK is not set
131# CONFIG_ARCH_LH7A40X is not set
132# CONFIG_ARCH_DAVINCI is not set
133# CONFIG_ARCH_OMAP is not set
134
135#
136# Boot options
137#
138
139#
140# Power management
141#
142
143#
144# Atmel AT91 System-on-Chip
145#
146# CONFIG_ARCH_AT91RM9200 is not set
147CONFIG_ARCH_AT91SAM9260=y
148# CONFIG_ARCH_AT91SAM9261 is not set
149# CONFIG_ARCH_AT91SAM9263 is not set
150# CONFIG_ARCH_AT91SAM9RL is not set
151
152#
153# AT91SAM9260 Variants
154#
155# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
156
157#
158# AT91SAM9260 / AT91SAM9XE Board Type
159#
160# CONFIG_MACH_AT91SAM9260EK is not set
161# CONFIG_MACH_CAM60 is not set
162CONFIG_MACH_SAM9_L9260=y
163
164#
165# AT91 Board Options
166#
167CONFIG_MTD_AT91_DATAFLASH_CARD=y
168
169#
170# AT91 Feature Selections
171#
172# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
173# CONFIG_ATMEL_TCLIB is not set
174
175#
176# Processor Type
177#
178CONFIG_CPU_32=y
179CONFIG_CPU_ARM926T=y
180CONFIG_CPU_32v5=y
181CONFIG_CPU_ABRT_EV5TJ=y
182CONFIG_CPU_CACHE_VIVT=y
183CONFIG_CPU_COPY_V4WB=y
184CONFIG_CPU_TLB_V4WBI=y
185CONFIG_CPU_CP15=y
186CONFIG_CPU_CP15_MMU=y
187
188#
189# Processor Features
190#
191CONFIG_ARM_THUMB=y
192# CONFIG_CPU_ICACHE_DISABLE is not set
193# CONFIG_CPU_DCACHE_DISABLE is not set
194# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
195# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
196# CONFIG_OUTER_CACHE is not set
197
198#
199# Bus support
200#
201# CONFIG_PCI_SYSCALL is not set
202# CONFIG_ARCH_SUPPORTS_MSI is not set
203
204#
205# PCCARD (PCMCIA/CardBus) support
206#
207# CONFIG_PCCARD is not set
208
209#
210# Kernel Features
211#
212# CONFIG_TICK_ONESHOT is not set
213CONFIG_PREEMPT=y
214# CONFIG_NO_IDLE_HZ is not set
215CONFIG_HZ=100
216# CONFIG_AEABI is not set
217# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
218CONFIG_SELECT_MEMORY_MODEL=y
219CONFIG_FLATMEM_MANUAL=y
220# CONFIG_DISCONTIGMEM_MANUAL is not set
221# CONFIG_SPARSEMEM_MANUAL is not set
222CONFIG_FLATMEM=y
223CONFIG_FLAT_NODE_MEM_MAP=y
224# CONFIG_SPARSEMEM_STATIC is not set
225CONFIG_SPLIT_PTLOCK_CPUS=4096
226# CONFIG_RESOURCES_64BIT is not set
227CONFIG_ZONE_DMA_FLAG=1
228CONFIG_BOUNCE=y
229CONFIG_VIRT_TO_BUS=y
230CONFIG_LEDS=y
231CONFIG_LEDS_TIMER=y
232CONFIG_LEDS_CPU=y
233CONFIG_ALIGNMENT_TRAP=y
234
235#
236# Boot options
237#
238CONFIG_ZBOOT_ROM_TEXT=0x0
239CONFIG_ZBOOT_ROM_BSS=0x0
240CONFIG_CMDLINE="console=ttyS0,115200 mem=64M initrd=0x21100000,4194304 root=/dev/ram0 rw"
241# CONFIG_XIP_KERNEL is not set
242# CONFIG_KEXEC is not set
243
244#
245# Floating point emulation
246#
247
248#
249# At least one emulation must be selected
250#
251CONFIG_FPE_NWFPE=y
252# CONFIG_FPE_NWFPE_XP is not set
253# CONFIG_FPE_FASTFPE is not set
254# CONFIG_VFP is not set
255
256#
257# Userspace binary formats
258#
259CONFIG_BINFMT_ELF=y
260# CONFIG_BINFMT_AOUT is not set
261# CONFIG_BINFMT_MISC is not set
262# CONFIG_ARTHUR is not set
263
264#
265# Power management options
266#
267# CONFIG_PM is not set
268CONFIG_SUSPEND_UP_POSSIBLE=y
269
270#
271# Networking
272#
273CONFIG_NET=y
274
275#
276# Networking options
277#
278CONFIG_PACKET=y
279CONFIG_PACKET_MMAP=y
280CONFIG_UNIX=y
281CONFIG_XFRM=y
282CONFIG_XFRM_USER=y
283# CONFIG_XFRM_SUB_POLICY is not set
284# CONFIG_XFRM_MIGRATE is not set
285CONFIG_NET_KEY=y
286# CONFIG_NET_KEY_MIGRATE is not set
287CONFIG_INET=y
288# CONFIG_IP_MULTICAST is not set
289# CONFIG_IP_ADVANCED_ROUTER is not set
290CONFIG_IP_FIB_HASH=y
291# CONFIG_IP_PNP is not set
292# CONFIG_NET_IPIP is not set
293# CONFIG_NET_IPGRE is not set
294# CONFIG_ARPD is not set
295# CONFIG_SYN_COOKIES is not set
296# CONFIG_INET_AH is not set
297# CONFIG_INET_ESP is not set
298# CONFIG_INET_IPCOMP is not set
299# CONFIG_INET_XFRM_TUNNEL is not set
300# CONFIG_INET_TUNNEL is not set
301# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
302# CONFIG_INET_XFRM_MODE_TUNNEL is not set
303# CONFIG_INET_XFRM_MODE_BEET is not set
304CONFIG_INET_DIAG=y
305CONFIG_INET_TCP_DIAG=y
306# CONFIG_TCP_CONG_ADVANCED is not set
307CONFIG_TCP_CONG_CUBIC=y
308CONFIG_DEFAULT_TCP_CONG="cubic"
309# CONFIG_TCP_MD5SIG is not set
310# CONFIG_IPV6 is not set
311# CONFIG_INET6_XFRM_TUNNEL is not set
312# CONFIG_INET6_TUNNEL is not set
313# CONFIG_NETWORK_SECMARK is not set
314# CONFIG_NETFILTER is not set
315# CONFIG_IP_DCCP is not set
316# CONFIG_IP_SCTP is not set
317# CONFIG_TIPC is not set
318# CONFIG_ATM is not set
319# CONFIG_BRIDGE is not set
320# CONFIG_VLAN_8021Q is not set
321# CONFIG_DECNET is not set
322# CONFIG_LLC2 is not set
323# CONFIG_IPX is not set
324# CONFIG_ATALK is not set
325# CONFIG_X25 is not set
326# CONFIG_LAPB is not set
327# CONFIG_ECONET is not set
328# CONFIG_WAN_ROUTER is not set
329
330#
331# QoS and/or fair queueing
332#
333# CONFIG_NET_SCHED is not set
334
335#
336# Network testing
337#
338# CONFIG_NET_PKTGEN is not set
339# CONFIG_HAMRADIO is not set
340# CONFIG_IRDA is not set
341# CONFIG_BT is not set
342# CONFIG_AF_RXRPC is not set
343
344#
345# Wireless
346#
347# CONFIG_CFG80211 is not set
348# CONFIG_WIRELESS_EXT is not set
349# CONFIG_MAC80211 is not set
350# CONFIG_IEEE80211 is not set
351# CONFIG_RFKILL is not set
352# CONFIG_NET_9P is not set
353
354#
355# Device Drivers
356#
357
358#
359# Generic Driver Options
360#
361CONFIG_STANDALONE=y
362CONFIG_PREVENT_FIRMWARE_BUILD=y
363CONFIG_FW_LOADER=y
364# CONFIG_DEBUG_DRIVER is not set
365# CONFIG_DEBUG_DEVRES is not set
366# CONFIG_SYS_HYPERVISOR is not set
367# CONFIG_CONNECTOR is not set
368CONFIG_MTD=y
369# CONFIG_MTD_DEBUG is not set
370# CONFIG_MTD_CONCAT is not set
371CONFIG_MTD_PARTITIONS=y
372# CONFIG_MTD_REDBOOT_PARTS is not set
373# CONFIG_MTD_CMDLINE_PARTS is not set
374# CONFIG_MTD_AFS_PARTS is not set
375
376#
377# User Modules And Translation Layers
378#
379CONFIG_MTD_CHAR=y
380CONFIG_MTD_BLKDEVS=y
381CONFIG_MTD_BLOCK=y
382# CONFIG_FTL is not set
383# CONFIG_NFTL is not set
384# CONFIG_INFTL is not set
385# CONFIG_RFD_FTL is not set
386# CONFIG_SSFDC is not set
387
388#
389# RAM/ROM/Flash chip drivers
390#
391# CONFIG_MTD_CFI is not set
392# CONFIG_MTD_JEDECPROBE is not set
393CONFIG_MTD_MAP_BANK_WIDTH_1=y
394CONFIG_MTD_MAP_BANK_WIDTH_2=y
395CONFIG_MTD_MAP_BANK_WIDTH_4=y
396# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
397# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
398# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
399CONFIG_MTD_CFI_I1=y
400CONFIG_MTD_CFI_I2=y
401# CONFIG_MTD_CFI_I4 is not set
402# CONFIG_MTD_CFI_I8 is not set
403# CONFIG_MTD_RAM is not set
404# CONFIG_MTD_ROM is not set
405# CONFIG_MTD_ABSENT is not set
406
407#
408# Mapping drivers for chip access
409#
410# CONFIG_MTD_COMPLEX_MAPPINGS is not set
411# CONFIG_MTD_PLATRAM is not set
412
413#
414# Self-contained MTD device drivers
415#
416# CONFIG_MTD_SLRAM is not set
417# CONFIG_MTD_PHRAM is not set
418# CONFIG_MTD_MTDRAM is not set
419CONFIG_MTD_BLOCK2MTD=y
420
421#
422# Disk-On-Chip Device Drivers
423#
424# CONFIG_MTD_DOC2000 is not set
425# CONFIG_MTD_DOC2001 is not set
426# CONFIG_MTD_DOC2001PLUS is not set
427CONFIG_MTD_NAND=y
428# CONFIG_MTD_NAND_VERIFY_WRITE is not set
429# CONFIG_MTD_NAND_ECC_SMC is not set
430# CONFIG_MTD_NAND_MUSEUM_IDS is not set
431CONFIG_MTD_NAND_IDS=y
432# CONFIG_MTD_NAND_DISKONCHIP is not set
433CONFIG_MTD_NAND_AT91=y
434# CONFIG_MTD_NAND_NANDSIM is not set
435CONFIG_MTD_NAND_PLATFORM=y
436# CONFIG_MTD_ONENAND is not set
437
438#
439# UBI - Unsorted block images
440#
441CONFIG_MTD_UBI=y
442CONFIG_MTD_UBI_WL_THRESHOLD=4096
443CONFIG_MTD_UBI_BEB_RESERVE=3
444CONFIG_MTD_UBI_GLUEBI=y
445
446#
447# UBI debugging options
448#
449# CONFIG_MTD_UBI_DEBUG is not set
450# CONFIG_PARPORT is not set
451CONFIG_BLK_DEV=y
452# CONFIG_BLK_DEV_COW_COMMON is not set
453CONFIG_BLK_DEV_LOOP=y
454# CONFIG_BLK_DEV_CRYPTOLOOP is not set
455# CONFIG_BLK_DEV_NBD is not set
456# CONFIG_BLK_DEV_UB is not set
457CONFIG_BLK_DEV_RAM=y
458CONFIG_BLK_DEV_RAM_COUNT=16
459CONFIG_BLK_DEV_RAM_SIZE=8192
460CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
461# CONFIG_CDROM_PKTCDVD is not set
462# CONFIG_ATA_OVER_ETH is not set
463
464#
465# SCSI device support
466#
467CONFIG_RAID_ATTRS=y
468CONFIG_SCSI=y
469CONFIG_SCSI_DMA=y
470# CONFIG_SCSI_TGT is not set
471# CONFIG_SCSI_NETLINK is not set
472CONFIG_SCSI_PROC_FS=y
473
474#
475# SCSI support type (disk, tape, CD-ROM)
476#
477CONFIG_BLK_DEV_SD=y
478# CONFIG_CHR_DEV_ST is not set
479# CONFIG_CHR_DEV_OSST is not set
480# CONFIG_BLK_DEV_SR is not set
481CONFIG_CHR_DEV_SG=y
482# CONFIG_CHR_DEV_SCH is not set
483
484#
485# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
486#
487CONFIG_SCSI_MULTI_LUN=y
488CONFIG_SCSI_CONSTANTS=y
489CONFIG_SCSI_LOGGING=y
490# CONFIG_SCSI_SCAN_ASYNC is not set
491
492#
493# SCSI Transports
494#
495# CONFIG_SCSI_SPI_ATTRS is not set
496# CONFIG_SCSI_FC_ATTRS is not set
497# CONFIG_SCSI_ISCSI_ATTRS is not set
498# CONFIG_SCSI_SAS_LIBSAS is not set
499# CONFIG_SCSI_LOWLEVEL is not set
500# CONFIG_ATA is not set
501# CONFIG_MD is not set
502CONFIG_NETDEVICES=y
503# CONFIG_NETDEVICES_MULTIQUEUE is not set
504# CONFIG_DUMMY is not set
505# CONFIG_BONDING is not set
506# CONFIG_MACVLAN is not set
507# CONFIG_EQUALIZER is not set
508# CONFIG_TUN is not set
509CONFIG_PHYLIB=y
510
511#
512# MII PHY device drivers
513#
514# CONFIG_MARVELL_PHY is not set
515# CONFIG_DAVICOM_PHY is not set
516# CONFIG_QSEMI_PHY is not set
517# CONFIG_LXT_PHY is not set
518# CONFIG_CICADA_PHY is not set
519# CONFIG_VITESSE_PHY is not set
520# CONFIG_SMSC_PHY is not set
521# CONFIG_BROADCOM_PHY is not set
522# CONFIG_ICPLUS_PHY is not set
523# CONFIG_FIXED_PHY is not set
524CONFIG_NET_ETHERNET=y
525CONFIG_MII=y
526CONFIG_MACB=y
527# CONFIG_AX88796 is not set
528# CONFIG_SMC91X is not set
529# CONFIG_DM9000 is not set
530# CONFIG_NETDEV_1000 is not set
531# CONFIG_NETDEV_10000 is not set
532
533#
534# Wireless LAN
535#
536# CONFIG_WLAN_PRE80211 is not set
537# CONFIG_WLAN_80211 is not set
538
539#
540# USB Network Adapters
541#
542# CONFIG_USB_CATC is not set
543# CONFIG_USB_KAWETH is not set
544# CONFIG_USB_PEGASUS is not set
545# CONFIG_USB_RTL8150 is not set
546# CONFIG_USB_USBNET_MII is not set
547# CONFIG_USB_USBNET is not set
548# CONFIG_WAN is not set
549# CONFIG_PPP is not set
550# CONFIG_SLIP is not set
551# CONFIG_SHAPER is not set
552# CONFIG_NETCONSOLE is not set
553# CONFIG_NETPOLL is not set
554# CONFIG_NET_POLL_CONTROLLER is not set
555# CONFIG_ISDN is not set
556
557#
558# Input device support
559#
560CONFIG_INPUT=y
561# CONFIG_INPUT_FF_MEMLESS is not set
562# CONFIG_INPUT_POLLDEV is not set
563
564#
565# Userland interfaces
566#
567CONFIG_INPUT_MOUSEDEV=y
568# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
569CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
570CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
571# CONFIG_INPUT_JOYDEV is not set
572# CONFIG_INPUT_TSDEV is not set
573# CONFIG_INPUT_EVDEV is not set
574# CONFIG_INPUT_EVBUG is not set
575
576#
577# Input Device Drivers
578#
579# CONFIG_INPUT_KEYBOARD is not set
580# CONFIG_INPUT_MOUSE is not set
581# CONFIG_INPUT_JOYSTICK is not set
582# CONFIG_INPUT_TABLET is not set
583# CONFIG_INPUT_TOUCHSCREEN is not set
584# CONFIG_INPUT_MISC is not set
585
586#
587# Hardware I/O ports
588#
589# CONFIG_SERIO is not set
590# CONFIG_GAMEPORT is not set
591
592#
593# Character devices
594#
595CONFIG_VT=y
596CONFIG_VT_CONSOLE=y
597CONFIG_HW_CONSOLE=y
598# CONFIG_VT_HW_CONSOLE_BINDING is not set
599# CONFIG_SERIAL_NONSTANDARD is not set
600
601#
602# Serial drivers
603#
604# CONFIG_SERIAL_8250 is not set
605
606#
607# Non-8250 serial port support
608#
609CONFIG_SERIAL_ATMEL=y
610CONFIG_SERIAL_ATMEL_CONSOLE=y
611# CONFIG_SERIAL_ATMEL_TTYAT is not set
612CONFIG_SERIAL_CORE=y
613CONFIG_SERIAL_CORE_CONSOLE=y
614CONFIG_UNIX98_PTYS=y
615CONFIG_LEGACY_PTYS=y
616CONFIG_LEGACY_PTY_COUNT=16
617# CONFIG_IPMI_HANDLER is not set
618# CONFIG_WATCHDOG is not set
619# CONFIG_HW_RANDOM is not set
620# CONFIG_NVRAM is not set
621# CONFIG_R3964 is not set
622# CONFIG_RAW_DRIVER is not set
623# CONFIG_TCG_TPM is not set
624# CONFIG_I2C is not set
625
626#
627# SPI support
628#
629# CONFIG_SPI is not set
630# CONFIG_SPI_MASTER is not set
631# CONFIG_W1 is not set
632# CONFIG_HWMON is not set
633# CONFIG_MISC_DEVICES is not set
634
635#
636# Multifunction device drivers
637#
638# CONFIG_MFD_SM501 is not set
639CONFIG_NEW_LEDS=y
640CONFIG_LEDS_CLASS=y
641
642#
643# LED drivers
644#
645CONFIG_LEDS_GPIO=y
646
647#
648# LED Triggers
649#
650CONFIG_LEDS_TRIGGERS=y
651CONFIG_LEDS_TRIGGER_TIMER=y
652CONFIG_LEDS_TRIGGER_HEARTBEAT=y
653
654#
655# Multimedia devices
656#
657# CONFIG_VIDEO_DEV is not set
658# CONFIG_DVB_CORE is not set
659# CONFIG_DAB is not set
660
661#
662# Graphics support
663#
664# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
665
666#
667# Display device support
668#
669# CONFIG_DISPLAY_SUPPORT is not set
670# CONFIG_VGASTATE is not set
671# CONFIG_VIDEO_OUTPUT_CONTROL is not set
672# CONFIG_FB is not set
673
674#
675# Console display driver support
676#
677# CONFIG_VGA_CONSOLE is not set
678CONFIG_DUMMY_CONSOLE=y
679
680#
681# Sound
682#
683# CONFIG_SOUND is not set
684# CONFIG_HID_SUPPORT is not set
685CONFIG_USB_SUPPORT=y
686CONFIG_USB_ARCH_HAS_HCD=y
687CONFIG_USB_ARCH_HAS_OHCI=y
688# CONFIG_USB_ARCH_HAS_EHCI is not set
689CONFIG_USB=y
690# CONFIG_USB_DEBUG is not set
691
692#
693# Miscellaneous USB options
694#
695CONFIG_USB_DEVICEFS=y
696CONFIG_USB_DEVICE_CLASS=y
697# CONFIG_USB_DYNAMIC_MINORS is not set
698# CONFIG_USB_OTG is not set
699
700#
701# USB Host Controller Drivers
702#
703# CONFIG_USB_ISP116X_HCD is not set
704CONFIG_USB_OHCI_HCD=y
705# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
706# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
707CONFIG_USB_OHCI_LITTLE_ENDIAN=y
708# CONFIG_USB_SL811_HCD is not set
709# CONFIG_USB_R8A66597_HCD is not set
710
711#
712# USB Device Class drivers
713#
714# CONFIG_USB_ACM is not set
715# CONFIG_USB_PRINTER is not set
716
717#
718# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
719#
720
721#
722# may also be needed; see USB_STORAGE Help for more information
723#
724CONFIG_USB_STORAGE=y
725# CONFIG_USB_STORAGE_DEBUG is not set
726# CONFIG_USB_STORAGE_DATAFAB is not set
727# CONFIG_USB_STORAGE_FREECOM is not set
728# CONFIG_USB_STORAGE_DPCM is not set
729# CONFIG_USB_STORAGE_USBAT is not set
730# CONFIG_USB_STORAGE_SDDR09 is not set
731# CONFIG_USB_STORAGE_SDDR55 is not set
732# CONFIG_USB_STORAGE_JUMPSHOT is not set
733# CONFIG_USB_STORAGE_ALAUDA is not set
734# CONFIG_USB_STORAGE_KARMA is not set
735CONFIG_USB_LIBUSUAL=y
736
737#
738# USB Imaging devices
739#
740# CONFIG_USB_MDC800 is not set
741# CONFIG_USB_MICROTEK is not set
742# CONFIG_USB_MON is not set
743
744#
745# USB port drivers
746#
747
748#
749# USB Serial Converter support
750#
751# CONFIG_USB_SERIAL is not set
752
753#
754# USB Miscellaneous drivers
755#
756# CONFIG_USB_EMI62 is not set
757# CONFIG_USB_EMI26 is not set
758# CONFIG_USB_ADUTUX is not set
759# CONFIG_USB_AUERSWALD is not set
760# CONFIG_USB_RIO500 is not set
761# CONFIG_USB_LEGOTOWER is not set
762# CONFIG_USB_LCD is not set
763# CONFIG_USB_BERRY_CHARGE is not set
764# CONFIG_USB_LED is not set
765# CONFIG_USB_CYPRESS_CY7C63 is not set
766# CONFIG_USB_CYTHERM is not set
767# CONFIG_USB_PHIDGET is not set
768# CONFIG_USB_IDMOUSE is not set
769# CONFIG_USB_FTDI_ELAN is not set
770# CONFIG_USB_APPLEDISPLAY is not set
771# CONFIG_USB_LD is not set
772# CONFIG_USB_TRANCEVIBRATOR is not set
773# CONFIG_USB_IOWARRIOR is not set
774# CONFIG_USB_TEST is not set
775
776#
777# USB DSL modem support
778#
779
780#
781# USB Gadget Support
782#
783CONFIG_USB_GADGET=y
784# CONFIG_USB_GADGET_DEBUG is not set
785# CONFIG_USB_GADGET_DEBUG_FILES is not set
786CONFIG_USB_GADGET_SELECTED=y
787# CONFIG_USB_GADGET_AMD5536UDC is not set
788# CONFIG_USB_GADGET_FSL_USB2 is not set
789# CONFIG_USB_GADGET_NET2280 is not set
790# CONFIG_USB_GADGET_PXA2XX is not set
791# CONFIG_USB_GADGET_M66592 is not set
792# CONFIG_USB_GADGET_GOKU is not set
793# CONFIG_USB_GADGET_LH7A40X is not set
794# CONFIG_USB_GADGET_OMAP is not set
795# CONFIG_USB_GADGET_S3C2410 is not set
796CONFIG_USB_GADGET_AT91=y
797CONFIG_USB_AT91=y
798# CONFIG_USB_GADGET_DUMMY_HCD is not set
799# CONFIG_USB_GADGET_DUALSPEED is not set
800# CONFIG_USB_ZERO is not set
801CONFIG_USB_ETH=y
802CONFIG_USB_ETH_RNDIS=y
803# CONFIG_USB_GADGETFS is not set
804# CONFIG_USB_FILE_STORAGE is not set
805# CONFIG_USB_G_SERIAL is not set
806# CONFIG_USB_MIDI_GADGET is not set
807CONFIG_MMC=y
808CONFIG_MMC_DEBUG=y
809# CONFIG_MMC_UNSAFE_RESUME is not set
810
811#
812# MMC/SD Card Drivers
813#
814CONFIG_MMC_BLOCK=y
815CONFIG_MMC_BLOCK_BOUNCE=y
816
817#
818# MMC/SD Host Controller Drivers
819#
820CONFIG_MMC_AT91=y
821CONFIG_RTC_LIB=y
822CONFIG_RTC_CLASS=y
823CONFIG_RTC_HCTOSYS=y
824CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
825# CONFIG_RTC_DEBUG is not set
826
827#
828# RTC interfaces
829#
830CONFIG_RTC_INTF_SYSFS=y
831CONFIG_RTC_INTF_PROC=y
832CONFIG_RTC_INTF_DEV=y
833# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
834# CONFIG_RTC_DRV_TEST is not set
835
836#
837# SPI RTC drivers
838#
839
840#
841# Platform RTC drivers
842#
843# CONFIG_RTC_DRV_CMOS is not set
844CONFIG_RTC_DRV_DS1553=y
845# CONFIG_RTC_DRV_STK17TA8 is not set
846CONFIG_RTC_DRV_DS1742=y
847CONFIG_RTC_DRV_M48T86=y
848# CONFIG_RTC_DRV_M48T59 is not set
849CONFIG_RTC_DRV_V3020=y
850
851#
852# on-CPU RTC drivers
853#
854
855#
856# DMA Engine support
857#
858# CONFIG_DMA_ENGINE is not set
859
860#
861# DMA Clients
862#
863
864#
865# DMA Devices
866#
867
868#
869# File systems
870#
871CONFIG_EXT2_FS=y
872CONFIG_EXT2_FS_XATTR=y
873CONFIG_EXT2_FS_POSIX_ACL=y
874CONFIG_EXT2_FS_SECURITY=y
875# CONFIG_EXT2_FS_XIP is not set
876CONFIG_EXT3_FS=y
877CONFIG_EXT3_FS_XATTR=y
878CONFIG_EXT3_FS_POSIX_ACL=y
879CONFIG_EXT3_FS_SECURITY=y
880# CONFIG_EXT4DEV_FS is not set
881CONFIG_JBD=y
882# CONFIG_JBD_DEBUG is not set
883CONFIG_FS_MBCACHE=y
884# CONFIG_REISERFS_FS is not set
885# CONFIG_JFS_FS is not set
886CONFIG_FS_POSIX_ACL=y
887# CONFIG_XFS_FS is not set
888# CONFIG_GFS2_FS is not set
889# CONFIG_OCFS2_FS is not set
890# CONFIG_MINIX_FS is not set
891# CONFIG_ROMFS_FS is not set
892CONFIG_INOTIFY=y
893CONFIG_INOTIFY_USER=y
894# CONFIG_QUOTA is not set
895CONFIG_DNOTIFY=y
896# CONFIG_AUTOFS_FS is not set
897# CONFIG_AUTOFS4_FS is not set
898# CONFIG_FUSE_FS is not set
899
900#
901# CD-ROM/DVD Filesystems
902#
903# CONFIG_ISO9660_FS is not set
904# CONFIG_UDF_FS is not set
905
906#
907# DOS/FAT/NT Filesystems
908#
909CONFIG_FAT_FS=y
910CONFIG_MSDOS_FS=y
911CONFIG_VFAT_FS=y
912CONFIG_FAT_DEFAULT_CODEPAGE=437
913CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
914# CONFIG_NTFS_FS is not set
915
916#
917# Pseudo filesystems
918#
919CONFIG_PROC_FS=y
920CONFIG_PROC_SYSCTL=y
921CONFIG_SYSFS=y
922CONFIG_TMPFS=y
923# CONFIG_TMPFS_POSIX_ACL is not set
924# CONFIG_HUGETLB_PAGE is not set
925CONFIG_RAMFS=y
926# CONFIG_CONFIGFS_FS is not set
927
928#
929# Miscellaneous filesystems
930#
931# CONFIG_ADFS_FS is not set
932# CONFIG_AFFS_FS is not set
933# CONFIG_HFS_FS is not set
934# CONFIG_HFSPLUS_FS is not set
935# CONFIG_BEFS_FS is not set
936# CONFIG_BFS_FS is not set
937# CONFIG_EFS_FS is not set
938CONFIG_JFFS2_FS=y
939CONFIG_JFFS2_FS_DEBUG=0
940CONFIG_JFFS2_FS_WRITEBUFFER=y
941# CONFIG_JFFS2_SUMMARY is not set
942# CONFIG_JFFS2_FS_XATTR is not set
943# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
944CONFIG_JFFS2_ZLIB=y
945CONFIG_JFFS2_RTIME=y
946# CONFIG_JFFS2_RUBIN is not set
947# CONFIG_CRAMFS is not set
948# CONFIG_VXFS_FS is not set
949# CONFIG_HPFS_FS is not set
950# CONFIG_QNX4FS_FS is not set
951# CONFIG_SYSV_FS is not set
952# CONFIG_UFS_FS is not set
953
954#
955# Network File Systems
956#
957CONFIG_NFS_FS=y
958CONFIG_NFS_V3=y
959# CONFIG_NFS_V3_ACL is not set
960# CONFIG_NFS_V4 is not set
961CONFIG_NFS_DIRECTIO=y
962# CONFIG_NFSD is not set
963CONFIG_LOCKD=y
964CONFIG_LOCKD_V4=y
965CONFIG_NFS_COMMON=y
966CONFIG_SUNRPC=y
967# CONFIG_SUNRPC_BIND34 is not set
968# CONFIG_RPCSEC_GSS_KRB5 is not set
969# CONFIG_RPCSEC_GSS_SPKM3 is not set
970# CONFIG_SMB_FS is not set
971# CONFIG_CIFS is not set
972# CONFIG_NCP_FS is not set
973# CONFIG_CODA_FS is not set
974# CONFIG_AFS_FS is not set
975
976#
977# Partition Types
978#
979# CONFIG_PARTITION_ADVANCED is not set
980CONFIG_MSDOS_PARTITION=y
981
982#
983# Native Language Support
984#
985CONFIG_NLS=y
986CONFIG_NLS_DEFAULT="iso8859-1"
987CONFIG_NLS_CODEPAGE_437=y
988CONFIG_NLS_CODEPAGE_737=y
989CONFIG_NLS_CODEPAGE_775=y
990CONFIG_NLS_CODEPAGE_850=y
991CONFIG_NLS_CODEPAGE_852=y
992CONFIG_NLS_CODEPAGE_855=y
993CONFIG_NLS_CODEPAGE_857=y
994CONFIG_NLS_CODEPAGE_860=y
995CONFIG_NLS_CODEPAGE_861=y
996CONFIG_NLS_CODEPAGE_862=y
997CONFIG_NLS_CODEPAGE_863=y
998CONFIG_NLS_CODEPAGE_864=y
999CONFIG_NLS_CODEPAGE_865=y
1000CONFIG_NLS_CODEPAGE_866=y
1001CONFIG_NLS_CODEPAGE_869=y
1002CONFIG_NLS_CODEPAGE_936=y
1003CONFIG_NLS_CODEPAGE_950=y
1004CONFIG_NLS_CODEPAGE_932=y
1005CONFIG_NLS_CODEPAGE_949=y
1006CONFIG_NLS_CODEPAGE_874=y
1007CONFIG_NLS_ISO8859_8=y
1008CONFIG_NLS_CODEPAGE_1250=y
1009CONFIG_NLS_CODEPAGE_1251=y
1010CONFIG_NLS_ASCII=y
1011CONFIG_NLS_ISO8859_1=y
1012CONFIG_NLS_ISO8859_2=y
1013CONFIG_NLS_ISO8859_3=y
1014CONFIG_NLS_ISO8859_4=y
1015CONFIG_NLS_ISO8859_5=y
1016CONFIG_NLS_ISO8859_6=y
1017CONFIG_NLS_ISO8859_7=y
1018CONFIG_NLS_ISO8859_9=y
1019CONFIG_NLS_ISO8859_13=y
1020CONFIG_NLS_ISO8859_14=y
1021CONFIG_NLS_ISO8859_15=y
1022CONFIG_NLS_KOI8_R=y
1023CONFIG_NLS_KOI8_U=y
1024CONFIG_NLS_UTF8=y
1025
1026#
1027# Distributed Lock Manager
1028#
1029# CONFIG_DLM is not set
1030
1031#
1032# Profiling support
1033#
1034# CONFIG_PROFILING is not set
1035
1036#
1037# Kernel hacking
1038#
1039# CONFIG_PRINTK_TIME is not set
1040CONFIG_ENABLE_MUST_CHECK=y
1041CONFIG_MAGIC_SYSRQ=y
1042CONFIG_UNUSED_SYMBOLS=y
1043CONFIG_DEBUG_FS=y
1044# CONFIG_HEADERS_CHECK is not set
1045CONFIG_DEBUG_KERNEL=y
1046# CONFIG_DEBUG_SHIRQ is not set
1047CONFIG_DETECT_SOFTLOCKUP=y
1048CONFIG_SCHED_DEBUG=y
1049# CONFIG_SCHEDSTATS is not set
1050# CONFIG_TIMER_STATS is not set
1051# CONFIG_DEBUG_SLAB is not set
1052CONFIG_DEBUG_PREEMPT=y
1053# CONFIG_DEBUG_RT_MUTEXES is not set
1054# CONFIG_RT_MUTEX_TESTER is not set
1055# CONFIG_DEBUG_SPINLOCK is not set
1056# CONFIG_DEBUG_MUTEXES is not set
1057# CONFIG_DEBUG_LOCK_ALLOC is not set
1058# CONFIG_PROVE_LOCKING is not set
1059# CONFIG_LOCK_STAT is not set
1060# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1061# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1062# CONFIG_DEBUG_KOBJECT is not set
1063CONFIG_DEBUG_BUGVERBOSE=y
1064# CONFIG_DEBUG_INFO is not set
1065# CONFIG_DEBUG_VM is not set
1066# CONFIG_DEBUG_LIST is not set
1067CONFIG_FRAME_POINTER=y
1068CONFIG_FORCED_INLINING=y
1069# CONFIG_FAULT_INJECTION is not set
1070# CONFIG_DEBUG_USER is not set
1071# CONFIG_DEBUG_ERRORS is not set
1072CONFIG_DEBUG_LL=y
1073# CONFIG_DEBUG_ICEDCC is not set
1074
1075#
1076# Security options
1077#
1078# CONFIG_KEYS is not set
1079# CONFIG_SECURITY is not set
1080# CONFIG_CRYPTO is not set
1081
1082#
1083# Library routines
1084#
1085CONFIG_BITREVERSE=y
1086# CONFIG_CRC_CCITT is not set
1087# CONFIG_CRC16 is not set
1088# CONFIG_CRC_ITU_T is not set
1089CONFIG_CRC32=y
1090# CONFIG_CRC7 is not set
1091# CONFIG_LIBCRC32C is not set
1092CONFIG_AUDIT_GENERIC=y
1093CONFIG_ZLIB_INFLATE=y
1094CONFIG_ZLIB_DEFLATE=y
1095CONFIG_PLIST=y
1096CONFIG_HAS_IOMEM=y
1097CONFIG_HAS_IOPORT=y
1098CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig
new file mode 100644
index 000000000000..576b8339f0d6
--- /dev/null
+++ b/arch/arm/configs/tct_hammer_defconfig
@@ -0,0 +1,886 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc7-hammer
4# Thu Mar 27 16:39:48 2008
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9# CONFIG_GENERIC_TIME is not set
10# CONFIG_GENERIC_CLOCKEVENTS is not set
11CONFIG_MMU=y
12CONFIG_NO_IOPORT=y
13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ARCH_SUPPORTS_AOUT=y
25CONFIG_ZONE_DMA=y
26CONFIG_VECTORS_BASE=0xffff0000
27CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
28
29#
30# General setup
31#
32CONFIG_EXPERIMENTAL=y
33CONFIG_BROKEN_ON_SMP=y
34CONFIG_INIT_ENV_ARG_LIMIT=32
35CONFIG_LOCALVERSION=""
36# CONFIG_LOCALVERSION_AUTO is not set
37# CONFIG_SWAP is not set
38CONFIG_SYSVIPC=y
39CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set
41# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set
44# CONFIG_IKCONFIG is not set
45CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_GROUP_SCHED=y
48CONFIG_FAIR_GROUP_SCHED=y
49# CONFIG_RT_GROUP_SCHED is not set
50CONFIG_USER_SCHED=y
51# CONFIG_CGROUP_SCHED is not set
52CONFIG_SYSFS_DEPRECATED=y
53CONFIG_SYSFS_DEPRECATED_V2=y
54# CONFIG_RELAY is not set
55# CONFIG_NAMESPACES is not set
56CONFIG_BLK_DEV_INITRD=y
57CONFIG_INITRAMFS_SOURCE=""
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59CONFIG_SYSCTL=y
60CONFIG_EMBEDDED=y
61CONFIG_UID16=y
62CONFIG_SYSCTL_SYSCALL=y
63# CONFIG_KALLSYMS is not set
64CONFIG_HOTPLUG=y
65CONFIG_PRINTK=y
66# CONFIG_BUG is not set
67# CONFIG_ELF_CORE is not set
68CONFIG_COMPAT_BRK=y
69CONFIG_BASE_FULL=y
70CONFIG_FUTEX=y
71CONFIG_ANON_INODES=y
72CONFIG_EPOLL=y
73CONFIG_SIGNALFD=y
74CONFIG_TIMERFD=y
75CONFIG_EVENTFD=y
76# CONFIG_SHMEM is not set
77CONFIG_VM_EVENT_COUNTERS=y
78# CONFIG_SLAB is not set
79# CONFIG_SLUB is not set
80CONFIG_SLOB=y
81# CONFIG_PROFILING is not set
82# CONFIG_MARKERS is not set
83CONFIG_HAVE_OPROFILE=y
84CONFIG_HAVE_KPROBES=y
85CONFIG_HAVE_KRETPROBES=y
86CONFIG_PROC_PAGE_MONITOR=y
87CONFIG_RT_MUTEXES=y
88CONFIG_TINY_SHMEM=y
89CONFIG_BASE_SMALL=0
90CONFIG_MODULES=y
91CONFIG_MODULE_UNLOAD=y
92# CONFIG_MODULE_FORCE_UNLOAD is not set
93# CONFIG_MODVERSIONS is not set
94# CONFIG_MODULE_SRCVERSION_ALL is not set
95# CONFIG_KMOD is not set
96CONFIG_BLOCK=y
97# CONFIG_LBD is not set
98# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set
100# CONFIG_BLK_DEV_BSG is not set
101
102#
103# IO Schedulers
104#
105CONFIG_IOSCHED_NOOP=y
106CONFIG_IOSCHED_AS=y
107CONFIG_IOSCHED_DEADLINE=y
108CONFIG_IOSCHED_CFQ=y
109CONFIG_DEFAULT_AS=y
110# CONFIG_DEFAULT_DEADLINE is not set
111# CONFIG_DEFAULT_CFQ is not set
112# CONFIG_DEFAULT_NOOP is not set
113CONFIG_DEFAULT_IOSCHED="anticipatory"
114CONFIG_CLASSIC_RCU=y
115
116#
117# System Type
118#
119# CONFIG_ARCH_AAEC2000 is not set
120# CONFIG_ARCH_INTEGRATOR is not set
121# CONFIG_ARCH_REALVIEW is not set
122# CONFIG_ARCH_VERSATILE is not set
123# CONFIG_ARCH_AT91 is not set
124# CONFIG_ARCH_CLPS7500 is not set
125# CONFIG_ARCH_CLPS711X is not set
126# CONFIG_ARCH_CO285 is not set
127# CONFIG_ARCH_EBSA110 is not set
128# CONFIG_ARCH_EP93XX is not set
129# CONFIG_ARCH_FOOTBRIDGE is not set
130# CONFIG_ARCH_NETX is not set
131# CONFIG_ARCH_H720X is not set
132# CONFIG_ARCH_IMX is not set
133# CONFIG_ARCH_IOP13XX is not set
134# CONFIG_ARCH_IOP32X is not set
135# CONFIG_ARCH_IOP33X is not set
136# CONFIG_ARCH_IXP23XX is not set
137# CONFIG_ARCH_IXP2000 is not set
138# CONFIG_ARCH_IXP4XX is not set
139# CONFIG_ARCH_L7200 is not set
140# CONFIG_ARCH_KS8695 is not set
141# CONFIG_ARCH_NS9XXX is not set
142# CONFIG_ARCH_MXC is not set
143# CONFIG_ARCH_ORION is not set
144# CONFIG_ARCH_PNX4008 is not set
145# CONFIG_ARCH_PXA is not set
146# CONFIG_ARCH_RPC is not set
147# CONFIG_ARCH_SA1100 is not set
148CONFIG_ARCH_S3C2410=y
149# CONFIG_ARCH_SHARK is not set
150# CONFIG_ARCH_LH7A40X is not set
151# CONFIG_ARCH_DAVINCI is not set
152# CONFIG_ARCH_OMAP is not set
153# CONFIG_ARCH_MSM7X00A is not set
154CONFIG_PLAT_S3C24XX=y
155# CONFIG_S3C2410_DMA is not set
156CONFIG_PLAT_S3C=y
157CONFIG_CPU_LLSERIAL_S3C2410_ONLY=y
158CONFIG_CPU_LLSERIAL_S3C2410=y
159
160#
161# Boot options
162#
163# CONFIG_S3C_BOOT_ERROR_RESET is not set
164
165#
166# Power management
167#
168CONFIG_S3C_LOWLEVEL_UART_PORT=0
169
170#
171# S3C2400 Machines
172#
173CONFIG_CPU_S3C2410=y
174CONFIG_S3C2410_GPIO=y
175CONFIG_S3C2410_CLOCK=y
176
177#
178# S3C2410 Machines
179#
180# CONFIG_ARCH_SMDK2410 is not set
181# CONFIG_ARCH_H1940 is not set
182# CONFIG_MACH_N30 is not set
183# CONFIG_ARCH_BAST is not set
184# CONFIG_MACH_OTOM is not set
185# CONFIG_MACH_AML_M5900 is not set
186CONFIG_MACH_TCT_HAMMER=y
187# CONFIG_MACH_VR1000 is not set
188# CONFIG_MACH_QT2410 is not set
189
190#
191# S3C2412 Machines
192#
193# CONFIG_MACH_SMDK2413 is not set
194# CONFIG_MACH_SMDK2412 is not set
195# CONFIG_MACH_VSTMS is not set
196
197#
198# S3C2440 Machines
199#
200# CONFIG_MACH_ANUBIS is not set
201# CONFIG_MACH_OSIRIS is not set
202# CONFIG_MACH_RX3715 is not set
203# CONFIG_ARCH_S3C2440 is not set
204# CONFIG_MACH_NEXCODER_2440 is not set
205
206#
207# S3C2442 Machines
208#
209
210#
211# S3C2443 Machines
212#
213# CONFIG_MACH_SMDK2443 is not set
214
215#
216# Processor Type
217#
218CONFIG_CPU_32=y
219CONFIG_CPU_ARM920T=y
220CONFIG_CPU_32v4T=y
221CONFIG_CPU_ABRT_EV4T=y
222CONFIG_CPU_CACHE_V4WT=y
223CONFIG_CPU_CACHE_VIVT=y
224CONFIG_CPU_COPY_V4WB=y
225CONFIG_CPU_TLB_V4WBI=y
226CONFIG_CPU_CP15=y
227CONFIG_CPU_CP15_MMU=y
228
229#
230# Processor Features
231#
232CONFIG_ARM_THUMB=y
233# CONFIG_CPU_ICACHE_DISABLE is not set
234# CONFIG_CPU_DCACHE_DISABLE is not set
235# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
236# CONFIG_OUTER_CACHE is not set
237
238#
239# Bus support
240#
241# CONFIG_PCI_SYSCALL is not set
242# CONFIG_ARCH_SUPPORTS_MSI is not set
243# CONFIG_PCCARD is not set
244
245#
246# Kernel Features
247#
248# CONFIG_TICK_ONESHOT is not set
249# CONFIG_PREEMPT is not set
250# CONFIG_NO_IDLE_HZ is not set
251CONFIG_HZ=200
252# CONFIG_AEABI is not set
253# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
254CONFIG_SELECT_MEMORY_MODEL=y
255CONFIG_FLATMEM_MANUAL=y
256# CONFIG_DISCONTIGMEM_MANUAL is not set
257# CONFIG_SPARSEMEM_MANUAL is not set
258CONFIG_FLATMEM=y
259CONFIG_FLAT_NODE_MEM_MAP=y
260# CONFIG_SPARSEMEM_STATIC is not set
261# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
262CONFIG_SPLIT_PTLOCK_CPUS=4096
263# CONFIG_RESOURCES_64BIT is not set
264CONFIG_ZONE_DMA_FLAG=1
265CONFIG_BOUNCE=y
266CONFIG_VIRT_TO_BUS=y
267CONFIG_ALIGNMENT_TRAP=y
268
269#
270# Boot options
271#
272CONFIG_ZBOOT_ROM_TEXT=0x0
273CONFIG_ZBOOT_ROM_BSS=0x0
274CONFIG_CMDLINE="mem=64M root=/dev/ram0 init=/linuxrc rw"
275# CONFIG_XIP_KERNEL is not set
276# CONFIG_KEXEC is not set
277
278#
279# Floating point emulation
280#
281
282#
283# At least one emulation must be selected
284#
285CONFIG_FPE_NWFPE=y
286# CONFIG_FPE_NWFPE_XP is not set
287# CONFIG_FPE_FASTFPE is not set
288
289#
290# Userspace binary formats
291#
292CONFIG_BINFMT_ELF=y
293# CONFIG_BINFMT_AOUT is not set
294# CONFIG_BINFMT_MISC is not set
295# CONFIG_ARTHUR is not set
296
297#
298# Power management options
299#
300# CONFIG_PM is not set
301CONFIG_ARCH_SUSPEND_POSSIBLE=y
302
303#
304# Networking
305#
306CONFIG_NET=y
307
308#
309# Networking options
310#
311CONFIG_PACKET=y
312# CONFIG_PACKET_MMAP is not set
313CONFIG_UNIX=y
314# CONFIG_NET_KEY is not set
315# CONFIG_INET is not set
316# CONFIG_NETWORK_SECMARK is not set
317# CONFIG_NETFILTER is not set
318# CONFIG_ATM is not set
319# CONFIG_BRIDGE is not set
320# CONFIG_VLAN_8021Q is not set
321# CONFIG_DECNET is not set
322# CONFIG_LLC2 is not set
323# CONFIG_IPX is not set
324# CONFIG_ATALK is not set
325# CONFIG_X25 is not set
326# CONFIG_LAPB is not set
327# CONFIG_WAN_ROUTER is not set
328# CONFIG_NET_SCHED is not set
329
330#
331# Network testing
332#
333# CONFIG_NET_PKTGEN is not set
334# CONFIG_HAMRADIO is not set
335# CONFIG_CAN is not set
336# CONFIG_IRDA is not set
337# CONFIG_BT is not set
338
339#
340# Wireless
341#
342# CONFIG_CFG80211 is not set
343# CONFIG_WIRELESS_EXT is not set
344# CONFIG_MAC80211 is not set
345# CONFIG_IEEE80211 is not set
346# CONFIG_RFKILL is not set
347# CONFIG_NET_9P is not set
348
349#
350# Device Drivers
351#
352
353#
354# Generic Driver Options
355#
356CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
357CONFIG_STANDALONE=y
358# CONFIG_PREVENT_FIRMWARE_BUILD is not set
359CONFIG_FW_LOADER=y
360# CONFIG_DEBUG_DRIVER is not set
361# CONFIG_DEBUG_DEVRES is not set
362# CONFIG_SYS_HYPERVISOR is not set
363# CONFIG_CONNECTOR is not set
364CONFIG_MTD=y
365# CONFIG_MTD_DEBUG is not set
366# CONFIG_MTD_CONCAT is not set
367CONFIG_MTD_PARTITIONS=y
368# CONFIG_MTD_REDBOOT_PARTS is not set
369# CONFIG_MTD_CMDLINE_PARTS is not set
370# CONFIG_MTD_AFS_PARTS is not set
371
372#
373# User Modules And Translation Layers
374#
375CONFIG_MTD_CHAR=y
376CONFIG_MTD_BLKDEVS=y
377CONFIG_MTD_BLOCK=y
378# CONFIG_FTL is not set
379# CONFIG_NFTL is not set
380# CONFIG_INFTL is not set
381# CONFIG_RFD_FTL is not set
382# CONFIG_SSFDC is not set
383# CONFIG_MTD_OOPS is not set
384
385#
386# RAM/ROM/Flash chip drivers
387#
388CONFIG_MTD_CFI=y
389# CONFIG_MTD_JEDECPROBE is not set
390CONFIG_MTD_GEN_PROBE=y
391CONFIG_MTD_CFI_ADV_OPTIONS=y
392CONFIG_MTD_CFI_NOSWAP=y
393# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
394# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
395CONFIG_MTD_CFI_GEOMETRY=y
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_OTP is not set
407CONFIG_MTD_CFI_INTELEXT=y
408# CONFIG_MTD_CFI_AMDSTD is not set
409# CONFIG_MTD_CFI_STAA is not set
410CONFIG_MTD_CFI_UTIL=y
411# CONFIG_MTD_RAM is not set
412# CONFIG_MTD_ROM is not set
413# CONFIG_MTD_ABSENT is not set
414
415#
416# Mapping drivers for chip access
417#
418# CONFIG_MTD_COMPLEX_MAPPINGS is not set
419CONFIG_MTD_PHYSMAP=y
420CONFIG_MTD_PHYSMAP_START=0x00000000
421CONFIG_MTD_PHYSMAP_LEN=0x0
422CONFIG_MTD_PHYSMAP_BANKWIDTH=2
423# CONFIG_MTD_ARM_INTEGRATOR is not set
424# CONFIG_MTD_PLATRAM is not set
425
426#
427# Self-contained MTD device drivers
428#
429# CONFIG_MTD_SLRAM is not set
430# CONFIG_MTD_PHRAM is not set
431# CONFIG_MTD_MTDRAM is not set
432# CONFIG_MTD_BLOCK2MTD is not set
433
434#
435# Disk-On-Chip Device Drivers
436#
437# CONFIG_MTD_DOC2000 is not set
438# CONFIG_MTD_DOC2001 is not set
439# CONFIG_MTD_DOC2001PLUS is not set
440# CONFIG_MTD_NAND is not set
441# CONFIG_MTD_ONENAND is not set
442
443#
444# UBI - Unsorted block images
445#
446# CONFIG_MTD_UBI is not set
447# CONFIG_PARPORT is not set
448CONFIG_BLK_DEV=y
449# CONFIG_BLK_DEV_COW_COMMON is not set
450# CONFIG_BLK_DEV_LOOP is not set
451# CONFIG_BLK_DEV_NBD is not set
452# CONFIG_BLK_DEV_UB is not set
453CONFIG_BLK_DEV_RAM=y
454CONFIG_BLK_DEV_RAM_COUNT=16
455CONFIG_BLK_DEV_RAM_SIZE=10240
456# CONFIG_BLK_DEV_XIP is not set
457# CONFIG_CDROM_PKTCDVD is not set
458# CONFIG_ATA_OVER_ETH is not set
459# CONFIG_MISC_DEVICES is not set
460CONFIG_HAVE_IDE=y
461# CONFIG_IDE is not set
462
463#
464# SCSI device support
465#
466# CONFIG_RAID_ATTRS is not set
467# CONFIG_SCSI is not set
468# CONFIG_SCSI_DMA is not set
469# CONFIG_SCSI_NETLINK is not set
470# CONFIG_ATA is not set
471# CONFIG_MD is not set
472# CONFIG_NETDEVICES is not set
473# CONFIG_ISDN is not set
474
475#
476# Input device support
477#
478CONFIG_INPUT=y
479# CONFIG_INPUT_FF_MEMLESS is not set
480# CONFIG_INPUT_POLLDEV is not set
481
482#
483# Userland interfaces
484#
485# CONFIG_INPUT_MOUSEDEV is not set
486# CONFIG_INPUT_JOYDEV is not set
487# CONFIG_INPUT_EVDEV is not set
488# CONFIG_INPUT_EVBUG is not set
489
490#
491# Input Device Drivers
492#
493# CONFIG_INPUT_KEYBOARD is not set
494# CONFIG_INPUT_MOUSE is not set
495# CONFIG_INPUT_JOYSTICK is not set
496# CONFIG_INPUT_TABLET is not set
497# CONFIG_INPUT_TOUCHSCREEN is not set
498# CONFIG_INPUT_MISC is not set
499
500#
501# Hardware I/O ports
502#
503# CONFIG_SERIO is not set
504# CONFIG_GAMEPORT is not set
505
506#
507# Character devices
508#
509CONFIG_VT=y
510# CONFIG_VT_CONSOLE is not set
511CONFIG_HW_CONSOLE=y
512# CONFIG_VT_HW_CONSOLE_BINDING is not set
513# CONFIG_SERIAL_NONSTANDARD is not set
514
515#
516# Serial drivers
517#
518# CONFIG_SERIAL_8250 is not set
519
520#
521# Non-8250 serial port support
522#
523CONFIG_SERIAL_S3C2410=y
524CONFIG_SERIAL_S3C2410_CONSOLE=y
525CONFIG_SERIAL_CORE=y
526CONFIG_SERIAL_CORE_CONSOLE=y
527CONFIG_UNIX98_PTYS=y
528CONFIG_LEGACY_PTYS=y
529CONFIG_LEGACY_PTY_COUNT=256
530# CONFIG_IPMI_HANDLER is not set
531# CONFIG_HW_RANDOM is not set
532# CONFIG_NVRAM is not set
533# CONFIG_R3964 is not set
534# CONFIG_RAW_DRIVER is not set
535# CONFIG_TCG_TPM is not set
536# CONFIG_I2C is not set
537
538#
539# SPI support
540#
541# CONFIG_SPI is not set
542# CONFIG_SPI_MASTER is not set
543# CONFIG_W1 is not set
544# CONFIG_POWER_SUPPLY is not set
545# CONFIG_HWMON is not set
546# CONFIG_WATCHDOG is not set
547
548#
549# Sonics Silicon Backplane
550#
551CONFIG_SSB_POSSIBLE=y
552# CONFIG_SSB is not set
553
554#
555# Multifunction device drivers
556#
557# CONFIG_MFD_SM501 is not set
558# CONFIG_MFD_ASIC3 is not set
559
560#
561# Multimedia devices
562#
563# CONFIG_VIDEO_DEV is not set
564# CONFIG_DAB is not set
565
566#
567# Graphics support
568#
569# CONFIG_VGASTATE is not set
570# CONFIG_VIDEO_OUTPUT_CONTROL is not set
571# CONFIG_FB is not set
572# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
573
574#
575# Display device support
576#
577# CONFIG_DISPLAY_SUPPORT is not set
578
579#
580# Console display driver support
581#
582# CONFIG_VGA_CONSOLE is not set
583CONFIG_DUMMY_CONSOLE=y
584
585#
586# Sound
587#
588# CONFIG_SOUND is not set
589# CONFIG_HID_SUPPORT is not set
590CONFIG_USB_SUPPORT=y
591CONFIG_USB_ARCH_HAS_HCD=y
592CONFIG_USB_ARCH_HAS_OHCI=y
593# CONFIG_USB_ARCH_HAS_EHCI is not set
594CONFIG_USB=y
595CONFIG_USB_DEBUG=y
596# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
597
598#
599# Miscellaneous USB options
600#
601# CONFIG_USB_DEVICEFS is not set
602# CONFIG_USB_DEVICE_CLASS is not set
603# CONFIG_USB_DYNAMIC_MINORS is not set
604# CONFIG_USB_OTG is not set
605
606#
607# USB Host Controller Drivers
608#
609# CONFIG_USB_ISP116X_HCD is not set
610CONFIG_USB_OHCI_HCD=y
611# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
612# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
613CONFIG_USB_OHCI_LITTLE_ENDIAN=y
614# CONFIG_USB_SL811_HCD is not set
615# CONFIG_USB_R8A66597_HCD is not set
616
617#
618# USB Device Class drivers
619#
620# CONFIG_USB_ACM is not set
621# CONFIG_USB_PRINTER is not set
622
623#
624# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
625#
626
627#
628# may also be needed; see USB_STORAGE Help for more information
629#
630# CONFIG_USB_LIBUSUAL is not set
631
632#
633# USB Imaging devices
634#
635# CONFIG_USB_MDC800 is not set
636CONFIG_USB_MON=y
637
638#
639# USB port drivers
640#
641# CONFIG_USB_SERIAL is not set
642
643#
644# USB Miscellaneous drivers
645#
646# CONFIG_USB_EMI62 is not set
647# CONFIG_USB_EMI26 is not set
648# CONFIG_USB_ADUTUX is not set
649# CONFIG_USB_AUERSWALD is not set
650# CONFIG_USB_RIO500 is not set
651# CONFIG_USB_LEGOTOWER is not set
652# CONFIG_USB_LCD is not set
653# CONFIG_USB_BERRY_CHARGE is not set
654# CONFIG_USB_LED is not set
655# CONFIG_USB_CYPRESS_CY7C63 is not set
656# CONFIG_USB_CYTHERM is not set
657# CONFIG_USB_PHIDGET is not set
658# CONFIG_USB_IDMOUSE is not set
659# CONFIG_USB_FTDI_ELAN is not set
660# CONFIG_USB_APPLEDISPLAY is not set
661# CONFIG_USB_LD is not set
662# CONFIG_USB_TRANCEVIBRATOR is not set
663# CONFIG_USB_IOWARRIOR is not set
664CONFIG_USB_GADGET=y
665# CONFIG_USB_GADGET_DEBUG is not set
666# CONFIG_USB_GADGET_DEBUG_FILES is not set
667CONFIG_USB_GADGET_SELECTED=y
668# CONFIG_USB_GADGET_AMD5536UDC is not set
669# CONFIG_USB_GADGET_ATMEL_USBA is not set
670# CONFIG_USB_GADGET_FSL_USB2 is not set
671# CONFIG_USB_GADGET_NET2280 is not set
672# CONFIG_USB_GADGET_PXA2XX is not set
673# CONFIG_USB_GADGET_M66592 is not set
674# CONFIG_USB_GADGET_GOKU is not set
675# CONFIG_USB_GADGET_LH7A40X is not set
676# CONFIG_USB_GADGET_OMAP is not set
677CONFIG_USB_GADGET_S3C2410=y
678CONFIG_USB_S3C2410=y
679# CONFIG_USB_S3C2410_DEBUG is not set
680# CONFIG_USB_GADGET_AT91 is not set
681# CONFIG_USB_GADGET_DUMMY_HCD is not set
682# CONFIG_USB_GADGET_DUALSPEED is not set
683# CONFIG_USB_ZERO is not set
684CONFIG_USB_ETH=y
685CONFIG_USB_ETH_RNDIS=y
686# CONFIG_USB_GADGETFS is not set
687# CONFIG_USB_FILE_STORAGE is not set
688# CONFIG_USB_G_SERIAL is not set
689# CONFIG_USB_MIDI_GADGET is not set
690# CONFIG_USB_G_PRINTER is not set
691# CONFIG_MMC is not set
692# CONFIG_NEW_LEDS is not set
693CONFIG_RTC_LIB=y
694# CONFIG_RTC_CLASS is not set
695
696#
697# File systems
698#
699CONFIG_EXT2_FS=y
700# CONFIG_EXT2_FS_XATTR is not set
701# CONFIG_EXT2_FS_XIP is not set
702# CONFIG_EXT3_FS is not set
703# CONFIG_EXT4DEV_FS is not set
704# CONFIG_REISERFS_FS is not set
705# CONFIG_JFS_FS is not set
706# CONFIG_FS_POSIX_ACL is not set
707# CONFIG_XFS_FS is not set
708# CONFIG_GFS2_FS is not set
709# CONFIG_OCFS2_FS is not set
710# CONFIG_DNOTIFY is not set
711# CONFIG_INOTIFY is not set
712# CONFIG_QUOTA is not set
713# CONFIG_AUTOFS_FS is not set
714# CONFIG_AUTOFS4_FS is not set
715# CONFIG_FUSE_FS is not set
716
717#
718# CD-ROM/DVD Filesystems
719#
720# CONFIG_ISO9660_FS is not set
721# CONFIG_UDF_FS is not set
722
723#
724# DOS/FAT/NT Filesystems
725#
726CONFIG_FAT_FS=y
727CONFIG_MSDOS_FS=y
728CONFIG_VFAT_FS=y
729CONFIG_FAT_DEFAULT_CODEPAGE=437
730CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
731# CONFIG_NTFS_FS is not set
732
733#
734# Pseudo filesystems
735#
736CONFIG_PROC_FS=y
737# CONFIG_PROC_SYSCTL is not set
738CONFIG_SYSFS=y
739# CONFIG_TMPFS is not set
740# CONFIG_HUGETLB_PAGE is not set
741# CONFIG_CONFIGFS_FS is not set
742
743#
744# Miscellaneous filesystems
745#
746# CONFIG_ADFS_FS is not set
747# CONFIG_AFFS_FS is not set
748# CONFIG_HFS_FS is not set
749# CONFIG_HFSPLUS_FS is not set
750# CONFIG_BEFS_FS is not set
751# CONFIG_BFS_FS is not set
752# CONFIG_EFS_FS is not set
753CONFIG_JFFS2_FS=y
754CONFIG_JFFS2_FS_DEBUG=0
755CONFIG_JFFS2_FS_WRITEBUFFER=y
756# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
757# CONFIG_JFFS2_SUMMARY is not set
758# CONFIG_JFFS2_FS_XATTR is not set
759# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
760CONFIG_JFFS2_ZLIB=y
761# CONFIG_JFFS2_LZO is not set
762CONFIG_JFFS2_RTIME=y
763# CONFIG_JFFS2_RUBIN is not set
764# CONFIG_CRAMFS is not set
765# CONFIG_VXFS_FS is not set
766# CONFIG_MINIX_FS is not set
767# CONFIG_HPFS_FS is not set
768# CONFIG_QNX4FS_FS is not set
769# CONFIG_ROMFS_FS is not set
770# CONFIG_SYSV_FS is not set
771# CONFIG_UFS_FS is not set
772CONFIG_NETWORK_FILESYSTEMS=y
773
774#
775# Partition Types
776#
777# CONFIG_PARTITION_ADVANCED is not set
778CONFIG_MSDOS_PARTITION=y
779CONFIG_NLS=y
780CONFIG_NLS_DEFAULT="iso8859-1"
781CONFIG_NLS_CODEPAGE_437=y
782# CONFIG_NLS_CODEPAGE_737 is not set
783# CONFIG_NLS_CODEPAGE_775 is not set
784# CONFIG_NLS_CODEPAGE_850 is not set
785# CONFIG_NLS_CODEPAGE_852 is not set
786# CONFIG_NLS_CODEPAGE_855 is not set
787# CONFIG_NLS_CODEPAGE_857 is not set
788# CONFIG_NLS_CODEPAGE_860 is not set
789# CONFIG_NLS_CODEPAGE_861 is not set
790# CONFIG_NLS_CODEPAGE_862 is not set
791# CONFIG_NLS_CODEPAGE_863 is not set
792# CONFIG_NLS_CODEPAGE_864 is not set
793# CONFIG_NLS_CODEPAGE_865 is not set
794# CONFIG_NLS_CODEPAGE_866 is not set
795# CONFIG_NLS_CODEPAGE_869 is not set
796# CONFIG_NLS_CODEPAGE_936 is not set
797# CONFIG_NLS_CODEPAGE_950 is not set
798# CONFIG_NLS_CODEPAGE_932 is not set
799# CONFIG_NLS_CODEPAGE_949 is not set
800# CONFIG_NLS_CODEPAGE_874 is not set
801# CONFIG_NLS_ISO8859_8 is not set
802# CONFIG_NLS_CODEPAGE_1250 is not set
803# CONFIG_NLS_CODEPAGE_1251 is not set
804# CONFIG_NLS_ASCII is not set
805CONFIG_NLS_ISO8859_1=y
806# CONFIG_NLS_ISO8859_2 is not set
807# CONFIG_NLS_ISO8859_3 is not set
808# CONFIG_NLS_ISO8859_4 is not set
809# CONFIG_NLS_ISO8859_5 is not set
810# CONFIG_NLS_ISO8859_6 is not set
811# CONFIG_NLS_ISO8859_7 is not set
812# CONFIG_NLS_ISO8859_9 is not set
813# CONFIG_NLS_ISO8859_13 is not set
814# CONFIG_NLS_ISO8859_14 is not set
815# CONFIG_NLS_ISO8859_15 is not set
816# CONFIG_NLS_KOI8_R is not set
817# CONFIG_NLS_KOI8_U is not set
818# CONFIG_NLS_UTF8 is not set
819
820#
821# Kernel hacking
822#
823# CONFIG_PRINTK_TIME is not set
824CONFIG_ENABLE_WARN_DEPRECATED=y
825# CONFIG_ENABLE_MUST_CHECK is not set
826# CONFIG_MAGIC_SYSRQ is not set
827# CONFIG_UNUSED_SYMBOLS is not set
828# CONFIG_DEBUG_FS is not set
829# CONFIG_HEADERS_CHECK is not set
830CONFIG_DEBUG_KERNEL=y
831# CONFIG_DEBUG_SHIRQ is not set
832# CONFIG_DETECT_SOFTLOCKUP is not set
833CONFIG_SCHED_DEBUG=y
834# CONFIG_SCHEDSTATS is not set
835# CONFIG_TIMER_STATS is not set
836# CONFIG_DEBUG_RT_MUTEXES is not set
837# CONFIG_RT_MUTEX_TESTER is not set
838# CONFIG_DEBUG_SPINLOCK is not set
839# CONFIG_DEBUG_MUTEXES is not set
840# CONFIG_DEBUG_LOCK_ALLOC is not set
841# CONFIG_PROVE_LOCKING is not set
842# CONFIG_LOCK_STAT is not set
843# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
844# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
845# CONFIG_DEBUG_KOBJECT is not set
846# CONFIG_DEBUG_INFO is not set
847# CONFIG_DEBUG_VM is not set
848# CONFIG_DEBUG_LIST is not set
849# CONFIG_DEBUG_SG is not set
850CONFIG_FRAME_POINTER=y
851# CONFIG_BOOT_PRINTK_DELAY is not set
852# CONFIG_RCU_TORTURE_TEST is not set
853# CONFIG_BACKTRACE_SELF_TEST is not set
854# CONFIG_FAULT_INJECTION is not set
855# CONFIG_SAMPLES is not set
856# CONFIG_DEBUG_USER is not set
857CONFIG_DEBUG_ERRORS=y
858# CONFIG_DEBUG_STACK_USAGE is not set
859CONFIG_DEBUG_LL=y
860# CONFIG_DEBUG_ICEDCC is not set
861# CONFIG_DEBUG_S3C_PORT is not set
862CONFIG_DEBUG_S3C_UART=0
863
864#
865# Security options
866#
867# CONFIG_KEYS is not set
868# CONFIG_SECURITY is not set
869# CONFIG_SECURITY_FILE_CAPABILITIES is not set
870# CONFIG_CRYPTO is not set
871
872#
873# Library routines
874#
875CONFIG_BITREVERSE=y
876CONFIG_CRC_CCITT=y
877# CONFIG_CRC16 is not set
878# CONFIG_CRC_ITU_T is not set
879CONFIG_CRC32=y
880# CONFIG_CRC7 is not set
881# CONFIG_LIBCRC32C is not set
882CONFIG_ZLIB_INFLATE=y
883CONFIG_ZLIB_DEFLATE=y
884CONFIG_PLIST=y
885CONFIG_HAS_IOMEM=y
886CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/yl9200_defconfig b/arch/arm/configs/yl9200_defconfig
new file mode 100644
index 000000000000..26de37f74686
--- /dev/null
+++ b/arch/arm/configs/yl9200_defconfig
@@ -0,0 +1,1216 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Fri Jan 11 09:53:59 2008
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_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
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_GENERIC_HWEIGHT=y
23CONFIG_GENERIC_CALIBRATE_DELAY=y
24CONFIG_ZONE_DMA=y
25CONFIG_VECTORS_BASE=0xffff0000
26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27
28#
29# General setup
30#
31# CONFIG_EXPERIMENTAL is not set
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y
36# CONFIG_SWAP is not set
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_BSD_PROCESS_ACCT is not set
40# CONFIG_TASKSTATS is not set
41# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set
43CONFIG_LOG_BUF_SHIFT=14
44# CONFIG_CGROUPS is not set
45CONFIG_FAIR_GROUP_SCHED=y
46CONFIG_FAIR_USER_SCHED=y
47# CONFIG_FAIR_CGROUP_SCHED is not set
48# CONFIG_SYSFS_DEPRECATED is not set
49# CONFIG_RELAY is not set
50CONFIG_BLK_DEV_INITRD=y
51CONFIG_INITRAMFS_SOURCE=""
52# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
53CONFIG_SYSCTL=y
54# CONFIG_EMBEDDED is not set
55CONFIG_UID16=y
56CONFIG_SYSCTL_SYSCALL=y
57CONFIG_KALLSYMS=y
58# CONFIG_KALLSYMS_ALL is not set
59# CONFIG_KALLSYMS_EXTRA_PASS is not set
60CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y
62CONFIG_BUG=y
63CONFIG_ELF_CORE=y
64CONFIG_BASE_FULL=y
65CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y
67CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y
69CONFIG_EVENTFD=y
70CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLUB_DEBUG=y
73# CONFIG_SLAB is not set
74CONFIG_SLUB=y
75# CONFIG_SLOB is not set
76CONFIG_RT_MUTEXES=y
77# CONFIG_TINY_SHMEM is not set
78CONFIG_BASE_SMALL=0
79CONFIG_MODULES=y
80CONFIG_MODULE_UNLOAD=y
81# CONFIG_MODVERSIONS is not set
82# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y
84CONFIG_BLOCK=y
85# CONFIG_LBD is not set
86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
88
89#
90# IO Schedulers
91#
92CONFIG_IOSCHED_NOOP=y
93# CONFIG_IOSCHED_AS is not set
94# CONFIG_IOSCHED_DEADLINE is not set
95# CONFIG_IOSCHED_CFQ is not set
96# CONFIG_DEFAULT_AS is not set
97# CONFIG_DEFAULT_DEADLINE is not set
98# CONFIG_DEFAULT_CFQ is not set
99CONFIG_DEFAULT_NOOP=y
100CONFIG_DEFAULT_IOSCHED="noop"
101
102#
103# System Type
104#
105# CONFIG_ARCH_AAEC2000 is not set
106# CONFIG_ARCH_INTEGRATOR is not set
107# CONFIG_ARCH_REALVIEW is not set
108# CONFIG_ARCH_VERSATILE is not set
109CONFIG_ARCH_AT91=y
110# CONFIG_ARCH_CLPS7500 is not set
111# CONFIG_ARCH_CLPS711X is not set
112# CONFIG_ARCH_CO285 is not set
113# CONFIG_ARCH_EBSA110 is not set
114# CONFIG_ARCH_EP93XX is not set
115# CONFIG_ARCH_FOOTBRIDGE is not set
116# CONFIG_ARCH_NETX is not set
117# CONFIG_ARCH_H720X is not set
118# CONFIG_ARCH_IMX is not set
119# CONFIG_ARCH_IOP13XX is not set
120# CONFIG_ARCH_IOP32X is not set
121# CONFIG_ARCH_IOP33X is not set
122# CONFIG_ARCH_IXP23XX is not set
123# CONFIG_ARCH_IXP2000 is not set
124# CONFIG_ARCH_IXP4XX is not set
125# CONFIG_ARCH_L7200 is not set
126# CONFIG_ARCH_KS8695 is not set
127# CONFIG_ARCH_NS9XXX is not set
128# CONFIG_ARCH_MXC is not set
129# CONFIG_ARCH_PNX4008 is not set
130# CONFIG_ARCH_PXA is not set
131# CONFIG_ARCH_RPC is not set
132# CONFIG_ARCH_SA1100 is not set
133# CONFIG_ARCH_S3C2410 is not set
134# CONFIG_ARCH_SHARK is not set
135# CONFIG_ARCH_LH7A40X is not set
136# CONFIG_ARCH_DAVINCI is not set
137# CONFIG_ARCH_OMAP is not set
138
139#
140# Boot options
141#
142
143#
144# Power management
145#
146
147#
148# Atmel AT91 System-on-Chip
149#
150CONFIG_ARCH_AT91RM9200=y
151# CONFIG_ARCH_AT91SAM9260 is not set
152# CONFIG_ARCH_AT91SAM9261 is not set
153# CONFIG_ARCH_AT91SAM9263 is not set
154# CONFIG_ARCH_AT91SAM9RL is not set
155# CONFIG_ARCH_AT91X40 is not set
156CONFIG_AT91_PMC_UNIT=y
157
158#
159# AT91RM9200 Board Type
160#
161# CONFIG_MACH_ONEARM is not set
162CONFIG_ARCH_AT91RM9200DK=y
163# CONFIG_MACH_AT91RM9200EK is not set
164# CONFIG_MACH_CSB337 is not set
165# CONFIG_MACH_CSB637 is not set
166# CONFIG_MACH_CARMEVA is not set
167# CONFIG_MACH_ATEB9200 is not set
168# CONFIG_MACH_KB9200 is not set
169# CONFIG_MACH_PICOTUX2XX is not set
170# CONFIG_MACH_KAFA is not set
171CONFIG_MACH_YL9200=y
172
173#
174# AT91 Board Options
175#
176# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
177
178#
179# AT91 Feature Selections
180#
181# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
182
183#
184# Processor Type
185#
186CONFIG_CPU_32=y
187CONFIG_CPU_ARM920T=y
188CONFIG_CPU_32v4T=y
189CONFIG_CPU_ABRT_EV4T=y
190CONFIG_CPU_CACHE_V4WT=y
191CONFIG_CPU_CACHE_VIVT=y
192CONFIG_CPU_COPY_V4WB=y
193CONFIG_CPU_TLB_V4WBI=y
194CONFIG_CPU_CP15=y
195CONFIG_CPU_CP15_MMU=y
196
197#
198# Processor Features
199#
200# CONFIG_ARM_THUMB is not set
201# CONFIG_CPU_ICACHE_DISABLE is not set
202# CONFIG_CPU_DCACHE_DISABLE is not set
203# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
204# CONFIG_OUTER_CACHE is not set
205
206#
207# Bus support
208#
209# CONFIG_PCI_SYSCALL is not set
210# CONFIG_ARCH_SUPPORTS_MSI is not set
211# CONFIG_PCCARD is not set
212
213#
214# Kernel Features
215#
216# CONFIG_TICK_ONESHOT is not set
217# CONFIG_NO_HZ is not set
218# CONFIG_HIGH_RES_TIMERS is not set
219CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
220CONFIG_HZ=100
221# CONFIG_AEABI is not set
222# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
223CONFIG_FLATMEM=y
224CONFIG_FLAT_NODE_MEM_MAP=y
225# CONFIG_SPARSEMEM_STATIC is not set
226# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
227CONFIG_SPLIT_PTLOCK_CPUS=4096
228# CONFIG_RESOURCES_64BIT is not set
229CONFIG_ZONE_DMA_FLAG=1
230CONFIG_BOUNCE=y
231CONFIG_VIRT_TO_BUS=y
232# CONFIG_LEDS is not set
233CONFIG_ALIGNMENT_TRAP=y
234
235#
236# Boot options
237#
238CONFIG_ZBOOT_ROM_TEXT=0x0
239CONFIG_ZBOOT_ROM_BSS=0x0
240CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw"
241# CONFIG_XIP_KERNEL is not set
242
243#
244# Floating point emulation
245#
246
247#
248# At least one emulation must be selected
249#
250CONFIG_FPE_NWFPE=y
251# CONFIG_FPE_NWFPE_XP is not set
252
253#
254# Userspace binary formats
255#
256CONFIG_BINFMT_ELF=y
257# CONFIG_BINFMT_AOUT is not set
258# CONFIG_BINFMT_MISC is not set
259# CONFIG_ARTHUR is not set
260
261#
262# Power management options
263#
264# CONFIG_PM is not set
265CONFIG_SUSPEND_UP_POSSIBLE=y
266
267#
268# Networking
269#
270CONFIG_NET=y
271
272#
273# Networking options
274#
275CONFIG_PACKET=y
276# CONFIG_PACKET_MMAP is not set
277CONFIG_UNIX=y
278# CONFIG_NET_KEY is not set
279CONFIG_INET=y
280# CONFIG_IP_MULTICAST is not set
281# CONFIG_IP_ADVANCED_ROUTER is not set
282CONFIG_IP_FIB_HASH=y
283CONFIG_IP_PNP=y
284CONFIG_IP_PNP_DHCP=y
285# CONFIG_IP_PNP_BOOTP is not set
286# CONFIG_IP_PNP_RARP is not set
287# CONFIG_NET_IPIP is not set
288# CONFIG_NET_IPGRE is not set
289# CONFIG_SYN_COOKIES is not set
290# CONFIG_INET_AH is not set
291# CONFIG_INET_ESP is not set
292# CONFIG_INET_IPCOMP is not set
293# CONFIG_INET_XFRM_TUNNEL is not set
294# CONFIG_INET_TUNNEL is not set
295# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
296# CONFIG_INET_XFRM_MODE_TUNNEL is not set
297# CONFIG_INET_XFRM_MODE_BEET is not set
298# CONFIG_INET_LRO is not set
299# CONFIG_INET_DIAG is not set
300# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_CUBIC=y
302CONFIG_DEFAULT_TCP_CONG="cubic"
303# CONFIG_IPV6 is not set
304# CONFIG_INET6_XFRM_TUNNEL is not set
305# CONFIG_INET6_TUNNEL is not set
306# CONFIG_NETWORK_SECMARK is not set
307# CONFIG_NETFILTER is not set
308# CONFIG_BRIDGE is not set
309# CONFIG_VLAN_8021Q is not set
310# CONFIG_DECNET is not set
311# CONFIG_LLC2 is not set
312# CONFIG_IPX is not set
313# CONFIG_ATALK is not set
314# CONFIG_NET_SCHED is not set
315
316#
317# Network testing
318#
319# CONFIG_NET_PKTGEN is not set
320# CONFIG_HAMRADIO is not set
321# CONFIG_IRDA is not set
322# CONFIG_BT is not set
323
324#
325# Wireless
326#
327# CONFIG_CFG80211 is not set
328# CONFIG_WIRELESS_EXT is not set
329# CONFIG_IEEE80211 is not set
330# CONFIG_RFKILL is not set
331
332#
333# Device Drivers
334#
335
336#
337# Generic Driver Options
338#
339CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
340CONFIG_STANDALONE=y
341CONFIG_PREVENT_FIRMWARE_BUILD=y
342CONFIG_FW_LOADER=y
343# CONFIG_DEBUG_DRIVER is not set
344# CONFIG_DEBUG_DEVRES is not set
345# CONFIG_SYS_HYPERVISOR is not set
346# CONFIG_CONNECTOR is not set
347CONFIG_MTD=y
348# CONFIG_MTD_DEBUG is not set
349CONFIG_MTD_CONCAT=y
350CONFIG_MTD_PARTITIONS=y
351# CONFIG_MTD_REDBOOT_PARTS is not set
352CONFIG_MTD_CMDLINE_PARTS=y
353# CONFIG_MTD_AFS_PARTS is not set
354
355#
356# User Modules And Translation Layers
357#
358CONFIG_MTD_CHAR=y
359CONFIG_MTD_BLKDEVS=y
360CONFIG_MTD_BLOCK=y
361# CONFIG_FTL is not set
362# CONFIG_NFTL is not set
363# CONFIG_INFTL is not set
364# CONFIG_RFD_FTL is not set
365# CONFIG_SSFDC is not set
366# CONFIG_MTD_OOPS is not set
367
368#
369# RAM/ROM/Flash chip drivers
370#
371CONFIG_MTD_CFI=y
372CONFIG_MTD_JEDECPROBE=y
373CONFIG_MTD_GEN_PROBE=y
374# CONFIG_MTD_CFI_ADV_OPTIONS is not set
375CONFIG_MTD_MAP_BANK_WIDTH_1=y
376CONFIG_MTD_MAP_BANK_WIDTH_2=y
377CONFIG_MTD_MAP_BANK_WIDTH_4=y
378# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
379# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
380# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
381CONFIG_MTD_CFI_I1=y
382CONFIG_MTD_CFI_I2=y
383# CONFIG_MTD_CFI_I4 is not set
384# CONFIG_MTD_CFI_I8 is not set
385CONFIG_MTD_CFI_INTELEXT=y
386# CONFIG_MTD_CFI_AMDSTD is not set
387# CONFIG_MTD_CFI_STAA is not set
388CONFIG_MTD_CFI_UTIL=y
389CONFIG_MTD_RAM=y
390# CONFIG_MTD_ROM is not set
391# CONFIG_MTD_ABSENT is not set
392
393#
394# Mapping drivers for chip access
395#
396CONFIG_MTD_COMPLEX_MAPPINGS=y
397CONFIG_MTD_PHYSMAP=y
398CONFIG_MTD_PHYSMAP_START=0x0000000
399CONFIG_MTD_PHYSMAP_LEN=0
400CONFIG_MTD_PHYSMAP_BANKWIDTH=2
401# CONFIG_MTD_ARM_INTEGRATOR is not set
402# CONFIG_MTD_IMPA7 is not set
403CONFIG_MTD_PLATRAM=y
404
405#
406# Self-contained MTD device drivers
407#
408# CONFIG_MTD_SLRAM is not set
409# CONFIG_MTD_PHRAM is not set
410# CONFIG_MTD_MTDRAM is not set
411# CONFIG_MTD_BLOCK2MTD is not set
412
413#
414# Disk-On-Chip Device Drivers
415#
416# CONFIG_MTD_DOC2000 is not set
417# CONFIG_MTD_DOC2001 is not set
418# CONFIG_MTD_DOC2001PLUS is not set
419CONFIG_MTD_NAND=y
420# CONFIG_MTD_NAND_VERIFY_WRITE is not set
421# CONFIG_MTD_NAND_ECC_SMC is not set
422# CONFIG_MTD_NAND_MUSEUM_IDS is not set
423CONFIG_MTD_NAND_IDS=y
424CONFIG_MTD_NAND_AT91=y
425# CONFIG_MTD_NAND_NANDSIM is not set
426CONFIG_MTD_NAND_PLATFORM=y
427# CONFIG_MTD_ALAUDA is not set
428# CONFIG_MTD_ONENAND is not set
429
430#
431# UBI - Unsorted block images
432#
433# CONFIG_MTD_UBI is not set
434# CONFIG_PARPORT is not set
435CONFIG_BLK_DEV=y
436# CONFIG_BLK_DEV_COW_COMMON is not set
437CONFIG_BLK_DEV_LOOP=y
438# CONFIG_BLK_DEV_CRYPTOLOOP is not set
439# CONFIG_BLK_DEV_NBD is not set
440# CONFIG_BLK_DEV_UB is not set
441CONFIG_BLK_DEV_RAM=y
442CONFIG_BLK_DEV_RAM_COUNT=3
443CONFIG_BLK_DEV_RAM_SIZE=8192
444CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
445# CONFIG_CDROM_PKTCDVD is not set
446# CONFIG_ATA_OVER_ETH is not set
447# CONFIG_MISC_DEVICES is not set
448
449#
450# SCSI device support
451#
452# CONFIG_RAID_ATTRS is not set
453CONFIG_SCSI=y
454CONFIG_SCSI_DMA=y
455# CONFIG_SCSI_NETLINK is not set
456CONFIG_SCSI_PROC_FS=y
457
458#
459# SCSI support type (disk, tape, CD-ROM)
460#
461CONFIG_BLK_DEV_SD=y
462# CONFIG_CHR_DEV_ST is not set
463# CONFIG_CHR_DEV_OSST is not set
464# CONFIG_BLK_DEV_SR is not set
465# CONFIG_CHR_DEV_SG is not set
466# CONFIG_CHR_DEV_SCH is not set
467
468#
469# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
470#
471# CONFIG_SCSI_MULTI_LUN is not set
472# CONFIG_SCSI_CONSTANTS is not set
473# CONFIG_SCSI_LOGGING is not set
474# CONFIG_SCSI_SCAN_ASYNC is not set
475CONFIG_SCSI_WAIT_SCAN=m
476
477#
478# SCSI Transports
479#
480# CONFIG_SCSI_SPI_ATTRS is not set
481# CONFIG_SCSI_FC_ATTRS is not set
482# CONFIG_SCSI_ISCSI_ATTRS is not set
483# CONFIG_SCSI_SAS_LIBSAS is not set
484# CONFIG_SCSI_SRP_ATTRS is not set
485CONFIG_SCSI_LOWLEVEL=y
486# CONFIG_ISCSI_TCP is not set
487# CONFIG_SCSI_DEBUG is not set
488CONFIG_ATA=y
489# CONFIG_ATA_NONSTANDARD is not set
490# CONFIG_MD is not set
491CONFIG_NETDEVICES=y
492# CONFIG_NETDEVICES_MULTIQUEUE is not set
493# CONFIG_DUMMY is not set
494# CONFIG_BONDING is not set
495# CONFIG_EQUALIZER is not set
496# CONFIG_TUN is not set
497# CONFIG_VETH is not set
498CONFIG_PHYLIB=y
499
500#
501# MII PHY device drivers
502#
503# CONFIG_MARVELL_PHY is not set
504CONFIG_DAVICOM_PHY=y
505# CONFIG_QSEMI_PHY is not set
506# CONFIG_LXT_PHY is not set
507# CONFIG_CICADA_PHY is not set
508# CONFIG_VITESSE_PHY is not set
509# CONFIG_SMSC_PHY is not set
510# CONFIG_BROADCOM_PHY is not set
511# CONFIG_ICPLUS_PHY is not set
512# CONFIG_FIXED_PHY is not set
513# CONFIG_MDIO_BITBANG is not set
514CONFIG_NET_ETHERNET=y
515CONFIG_MII=y
516CONFIG_ARM_AT91_ETHER=y
517# CONFIG_AX88796 is not set
518# CONFIG_SMC91X is not set
519# CONFIG_DM9000 is not set
520# CONFIG_IBM_NEW_EMAC_ZMII is not set
521# CONFIG_IBM_NEW_EMAC_RGMII is not set
522# CONFIG_IBM_NEW_EMAC_TAH is not set
523# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
524# CONFIG_B44 is not set
525# CONFIG_NETDEV_1000 is not set
526# CONFIG_NETDEV_10000 is not set
527
528#
529# Wireless LAN
530#
531# CONFIG_WLAN_PRE80211 is not set
532# CONFIG_WLAN_80211 is not set
533
534#
535# USB Network Adapters
536#
537# CONFIG_USB_KAWETH is not set
538# CONFIG_USB_PEGASUS is not set
539# CONFIG_USB_USBNET is not set
540# CONFIG_WAN is not set
541# CONFIG_PPP is not set
542# CONFIG_SLIP is not set
543# CONFIG_NETPOLL is not set
544# CONFIG_NET_POLL_CONTROLLER is not set
545# CONFIG_ISDN is not set
546
547#
548# Input device support
549#
550CONFIG_INPUT=y
551# CONFIG_INPUT_FF_MEMLESS is not set
552# CONFIG_INPUT_POLLDEV is not set
553
554#
555# Userland interfaces
556#
557CONFIG_INPUT_MOUSEDEV=y
558# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
559CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
560CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
561# CONFIG_INPUT_JOYDEV is not set
562CONFIG_INPUT_EVDEV=y
563# CONFIG_INPUT_EVBUG is not set
564
565#
566# Input Device Drivers
567#
568CONFIG_INPUT_KEYBOARD=y
569# CONFIG_KEYBOARD_ATKBD is not set
570# CONFIG_KEYBOARD_SUNKBD is not set
571# CONFIG_KEYBOARD_LKKBD is not set
572# CONFIG_KEYBOARD_XTKBD is not set
573# CONFIG_KEYBOARD_NEWTON is not set
574# CONFIG_KEYBOARD_STOWAWAY is not set
575CONFIG_KEYBOARD_GPIO=y
576CONFIG_INPUT_MOUSE=y
577CONFIG_MOUSE_PS2=y
578CONFIG_MOUSE_PS2_ALPS=y
579CONFIG_MOUSE_PS2_LOGIPS2PP=y
580CONFIG_MOUSE_PS2_SYNAPTICS=y
581CONFIG_MOUSE_PS2_LIFEBOOK=y
582CONFIG_MOUSE_PS2_TRACKPOINT=y
583# CONFIG_MOUSE_PS2_TOUCHKIT is not set
584# CONFIG_MOUSE_SERIAL is not set
585# CONFIG_MOUSE_APPLETOUCH is not set
586# CONFIG_MOUSE_VSXXXAA is not set
587# CONFIG_MOUSE_GPIO is not set
588# CONFIG_INPUT_JOYSTICK is not set
589# CONFIG_INPUT_TABLET is not set
590CONFIG_INPUT_TOUCHSCREEN=y
591CONFIG_TOUCHSCREEN_ADS7846=y
592# CONFIG_TOUCHSCREEN_FUJITSU is not set
593# CONFIG_TOUCHSCREEN_GUNZE is not set
594# CONFIG_TOUCHSCREEN_ELO is not set
595# CONFIG_TOUCHSCREEN_MTOUCH is not set
596# CONFIG_TOUCHSCREEN_MK712 is not set
597# CONFIG_TOUCHSCREEN_PENMOUNT is not set
598# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
599# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
600# CONFIG_TOUCHSCREEN_UCB1400 is not set
601# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
602# CONFIG_INPUT_MISC is not set
603
604#
605# Hardware I/O ports
606#
607CONFIG_SERIO=y
608# CONFIG_SERIO_SERPORT is not set
609CONFIG_SERIO_LIBPS2=y
610# CONFIG_SERIO_RAW is not set
611# CONFIG_GAMEPORT is not set
612
613#
614# Character devices
615#
616CONFIG_VT=y
617CONFIG_VT_CONSOLE=y
618CONFIG_HW_CONSOLE=y
619# CONFIG_VT_HW_CONSOLE_BINDING is not set
620# CONFIG_SERIAL_NONSTANDARD is not set
621
622#
623# Serial drivers
624#
625# CONFIG_SERIAL_8250 is not set
626
627#
628# Non-8250 serial port support
629#
630CONFIG_SERIAL_ATMEL=y
631CONFIG_SERIAL_ATMEL_CONSOLE=y
632# CONFIG_SERIAL_ATMEL_TTYAT is not set
633CONFIG_SERIAL_CORE=y
634CONFIG_SERIAL_CORE_CONSOLE=y
635CONFIG_UNIX98_PTYS=y
636CONFIG_LEGACY_PTYS=y
637CONFIG_LEGACY_PTY_COUNT=256
638# CONFIG_IPMI_HANDLER is not set
639# CONFIG_HW_RANDOM is not set
640# CONFIG_NVRAM is not set
641# CONFIG_R3964 is not set
642# CONFIG_RAW_DRIVER is not set
643CONFIG_I2C=y
644CONFIG_I2C_BOARDINFO=y
645# CONFIG_I2C_CHARDEV is not set
646
647#
648# I2C Algorithms
649#
650# CONFIG_I2C_ALGOBIT is not set
651# CONFIG_I2C_ALGOPCF is not set
652# CONFIG_I2C_ALGOPCA is not set
653
654#
655# I2C Hardware Bus support
656#
657# CONFIG_I2C_GPIO is not set
658# CONFIG_I2C_PARPORT_LIGHT is not set
659# CONFIG_I2C_SIMTEC is not set
660# CONFIG_I2C_TINY_USB is not set
661
662#
663# Miscellaneous I2C Chip support
664#
665# CONFIG_I2C_DEBUG_CORE is not set
666# CONFIG_I2C_DEBUG_ALGO is not set
667# CONFIG_I2C_DEBUG_BUS is not set
668# CONFIG_I2C_DEBUG_CHIP is not set
669
670#
671# SPI support
672#
673CONFIG_SPI=y
674CONFIG_SPI_DEBUG=y
675CONFIG_SPI_MASTER=y
676
677#
678# SPI Master Controller Drivers
679#
680CONFIG_SPI_ATMEL=y
681
682#
683# SPI Protocol Masters
684#
685# CONFIG_SPI_AT25 is not set
686# CONFIG_SPI_TLE62X0 is not set
687# CONFIG_W1 is not set
688# CONFIG_POWER_SUPPLY is not set
689CONFIG_HWMON=y
690# CONFIG_HWMON_VID is not set
691# CONFIG_SENSORS_ADM1021 is not set
692# CONFIG_SENSORS_ADM1025 is not set
693# CONFIG_SENSORS_DS1621 is not set
694# CONFIG_SENSORS_GL518SM is not set
695# CONFIG_SENSORS_GL520SM is not set
696# CONFIG_SENSORS_IT87 is not set
697# CONFIG_SENSORS_LM63 is not set
698# CONFIG_SENSORS_LM75 is not set
699# CONFIG_SENSORS_LM77 is not set
700# CONFIG_SENSORS_LM78 is not set
701# CONFIG_SENSORS_LM83 is not set
702# CONFIG_SENSORS_LM87 is not set
703# CONFIG_SENSORS_LM90 is not set
704# CONFIG_SENSORS_LM92 is not set
705# CONFIG_SENSORS_LM93 is not set
706# CONFIG_SENSORS_MAX1619 is not set
707# CONFIG_SENSORS_PC87360 is not set
708# CONFIG_SENSORS_SMSC47M1 is not set
709# CONFIG_SENSORS_W83781D is not set
710# CONFIG_SENSORS_W83627HF is not set
711# CONFIG_SENSORS_W83627EHF is not set
712# CONFIG_HWMON_DEBUG_CHIP is not set
713# CONFIG_WATCHDOG is not set
714
715#
716# Sonics Silicon Backplane
717#
718CONFIG_SSB_POSSIBLE=y
719# CONFIG_SSB is not set
720
721#
722# Multifunction device drivers
723#
724# CONFIG_MFD_SM501 is not set
725
726#
727# Multimedia devices
728#
729# CONFIG_VIDEO_DEV is not set
730# CONFIG_DVB_CORE is not set
731# CONFIG_DAB is not set
732
733#
734# Graphics support
735#
736# CONFIG_VGASTATE is not set
737# CONFIG_VIDEO_OUTPUT_CONTROL is not set
738CONFIG_FB=y
739# CONFIG_FIRMWARE_EDID is not set
740# CONFIG_FB_DDC is not set
741CONFIG_FB_CFB_FILLRECT=y
742CONFIG_FB_CFB_COPYAREA=y
743CONFIG_FB_CFB_IMAGEBLIT=y
744# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
745# CONFIG_FB_SYS_FILLRECT is not set
746# CONFIG_FB_SYS_COPYAREA is not set
747# CONFIG_FB_SYS_IMAGEBLIT is not set
748# CONFIG_FB_SYS_FOPS is not set
749CONFIG_FB_DEFERRED_IO=y
750# CONFIG_FB_SVGALIB is not set
751# CONFIG_FB_MACMODES is not set
752# CONFIG_FB_BACKLIGHT is not set
753# CONFIG_FB_MODE_HELPERS is not set
754# CONFIG_FB_TILEBLITTING is not set
755
756#
757# Frame buffer hardware drivers
758#
759# CONFIG_FB_S1D13XXX is not set
760CONFIG_FB_S1D135XX=y
761# CONFIG_FB_VIRTUAL is not set
762CONFIG_BACKLIGHT_LCD_SUPPORT=y
763CONFIG_LCD_CLASS_DEVICE=y
764# CONFIG_LCD_LTV350QV is not set
765CONFIG_BACKLIGHT_CLASS_DEVICE=y
766# CONFIG_BACKLIGHT_CORGI is not set
767
768#
769# Display device support
770#
771CONFIG_DISPLAY_SUPPORT=y
772
773#
774# Display hardware drivers
775#
776
777#
778# Console display driver support
779#
780# CONFIG_VGA_CONSOLE is not set
781CONFIG_DUMMY_CONSOLE=y
782# CONFIG_FRAMEBUFFER_CONSOLE is not set
783CONFIG_LOGO=y
784# CONFIG_LOGO_LINUX_MONO is not set
785# CONFIG_LOGO_LINUX_VGA16 is not set
786CONFIG_LOGO_LINUX_CLUT224=y
787
788#
789# Sound
790#
791# CONFIG_SOUND is not set
792CONFIG_HID_SUPPORT=y
793CONFIG_HID=y
794CONFIG_HID_DEBUG=y
795# CONFIG_HIDRAW is not set
796
797#
798# USB Input Devices
799#
800CONFIG_USB_HID=y
801# CONFIG_USB_HIDINPUT_POWERBOOK is not set
802# CONFIG_USB_HIDDEV is not set
803CONFIG_USB_SUPPORT=y
804CONFIG_USB_ARCH_HAS_HCD=y
805CONFIG_USB_ARCH_HAS_OHCI=y
806# CONFIG_USB_ARCH_HAS_EHCI is not set
807CONFIG_USB=y
808CONFIG_USB_DEBUG=y
809
810#
811# Miscellaneous USB options
812#
813CONFIG_USB_DEVICEFS=y
814# CONFIG_USB_DEVICE_CLASS is not set
815
816#
817# USB Host Controller Drivers
818#
819# CONFIG_USB_ISP116X_HCD is not set
820CONFIG_USB_OHCI_HCD=y
821# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
822# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
823CONFIG_USB_OHCI_LITTLE_ENDIAN=y
824# CONFIG_USB_SL811_HCD is not set
825# CONFIG_USB_R8A66597_HCD is not set
826
827#
828# USB Device Class drivers
829#
830# CONFIG_USB_ACM is not set
831# CONFIG_USB_PRINTER is not set
832
833#
834# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
835#
836
837#
838# may also be needed; see USB_STORAGE Help for more information
839#
840CONFIG_USB_STORAGE=y
841# CONFIG_USB_STORAGE_DEBUG is not set
842# CONFIG_USB_STORAGE_FREECOM is not set
843# CONFIG_USB_STORAGE_ISD200 is not set
844# CONFIG_USB_STORAGE_DPCM is not set
845# CONFIG_USB_STORAGE_KARMA is not set
846# CONFIG_USB_LIBUSUAL is not set
847
848#
849# USB Imaging devices
850#
851# CONFIG_USB_MICROTEK is not set
852CONFIG_USB_MON=y
853
854#
855# USB port drivers
856#
857
858#
859# USB Serial Converter support
860#
861# CONFIG_USB_SERIAL is not set
862
863#
864# USB Miscellaneous drivers
865#
866# CONFIG_USB_EMI62 is not set
867# CONFIG_USB_EMI26 is not set
868# CONFIG_USB_LCD is not set
869# CONFIG_USB_BERRY_CHARGE is not set
870# CONFIG_USB_LED is not set
871# CONFIG_USB_CYPRESS_CY7C63 is not set
872# CONFIG_USB_CYTHERM is not set
873# CONFIG_USB_PHIDGET is not set
874# CONFIG_USB_IDMOUSE is not set
875# CONFIG_USB_FTDI_ELAN is not set
876# CONFIG_USB_APPLEDISPLAY is not set
877# CONFIG_USB_LD is not set
878# CONFIG_USB_TRANCEVIBRATOR is not set
879# CONFIG_USB_IOWARRIOR is not set
880
881#
882# USB DSL modem support
883#
884
885#
886# USB Gadget Support
887#
888CONFIG_USB_GADGET=y
889# CONFIG_USB_GADGET_DEBUG_FILES is not set
890# CONFIG_USB_GADGET_DEBUG_FS is not set
891CONFIG_USB_GADGET_SELECTED=y
892# CONFIG_USB_GADGET_AMD5536UDC is not set
893# CONFIG_USB_GADGET_ATMEL_USBA is not set
894# CONFIG_USB_GADGET_FSL_USB2 is not set
895# CONFIG_USB_GADGET_NET2280 is not set
896# CONFIG_USB_GADGET_PXA2XX is not set
897CONFIG_USB_GADGET_M66592=y
898CONFIG_USB_M66592=y
899# CONFIG_USB_GADGET_GOKU is not set
900# CONFIG_USB_GADGET_LH7A40X is not set
901# CONFIG_USB_GADGET_OMAP is not set
902# CONFIG_USB_GADGET_S3C2410 is not set
903# CONFIG_USB_GADGET_AT91 is not set
904# CONFIG_USB_GADGET_DUMMY_HCD is not set
905CONFIG_USB_GADGET_DUALSPEED=y
906# CONFIG_USB_ZERO is not set
907# CONFIG_USB_ETH is not set
908# CONFIG_USB_GADGETFS is not set
909CONFIG_USB_FILE_STORAGE=y
910# CONFIG_USB_FILE_STORAGE_TEST is not set
911# CONFIG_USB_G_SERIAL is not set
912# CONFIG_USB_MIDI_GADGET is not set
913CONFIG_MMC=y
914CONFIG_MMC_DEBUG=y
915# CONFIG_MMC_UNSAFE_RESUME is not set
916
917#
918# MMC/SD Card Drivers
919#
920CONFIG_MMC_BLOCK=y
921# CONFIG_MMC_BLOCK_BOUNCE is not set
922# CONFIG_SDIO_UART is not set
923
924#
925# MMC/SD Host Controller Drivers
926#
927CONFIG_MMC_AT91=y
928CONFIG_NEW_LEDS=y
929CONFIG_LEDS_CLASS=y
930
931#
932# LED drivers
933#
934CONFIG_LEDS_GPIO=y
935
936#
937# LED Triggers
938#
939CONFIG_LEDS_TRIGGERS=y
940CONFIG_LEDS_TRIGGER_TIMER=y
941CONFIG_LEDS_TRIGGER_HEARTBEAT=y
942CONFIG_RTC_LIB=y
943CONFIG_RTC_CLASS=y
944CONFIG_RTC_HCTOSYS=y
945CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
946# CONFIG_RTC_DEBUG is not set
947
948#
949# RTC interfaces
950#
951CONFIG_RTC_INTF_SYSFS=y
952CONFIG_RTC_INTF_PROC=y
953CONFIG_RTC_INTF_DEV=y
954# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
955# CONFIG_RTC_DRV_TEST is not set
956
957#
958# I2C RTC drivers
959#
960# CONFIG_RTC_DRV_DS1307 is not set
961# CONFIG_RTC_DRV_DS1374 is not set
962# CONFIG_RTC_DRV_DS1672 is not set
963# CONFIG_RTC_DRV_MAX6900 is not set
964# CONFIG_RTC_DRV_RS5C372 is not set
965# CONFIG_RTC_DRV_ISL1208 is not set
966# CONFIG_RTC_DRV_X1205 is not set
967# CONFIG_RTC_DRV_PCF8563 is not set
968# CONFIG_RTC_DRV_PCF8583 is not set
969# CONFIG_RTC_DRV_M41T80 is not set
970
971#
972# SPI RTC drivers
973#
974# CONFIG_RTC_DRV_RS5C348 is not set
975# CONFIG_RTC_DRV_MAX6902 is not set
976
977#
978# Platform RTC drivers
979#
980# CONFIG_RTC_DRV_CMOS is not set
981# CONFIG_RTC_DRV_DS1553 is not set
982# CONFIG_RTC_DRV_STK17TA8 is not set
983# CONFIG_RTC_DRV_DS1742 is not set
984# CONFIG_RTC_DRV_M48T86 is not set
985# CONFIG_RTC_DRV_M48T59 is not set
986# CONFIG_RTC_DRV_V3020 is not set
987
988#
989# on-CPU RTC drivers
990#
991CONFIG_RTC_DRV_AT91RM9200=y
992
993#
994# File systems
995#
996CONFIG_EXT2_FS=y
997CONFIG_EXT2_FS_XATTR=y
998# CONFIG_EXT2_FS_POSIX_ACL is not set
999# CONFIG_EXT2_FS_SECURITY is not set
1000# CONFIG_EXT2_FS_XIP is not set
1001CONFIG_EXT3_FS=y
1002CONFIG_EXT3_FS_XATTR=y
1003# CONFIG_EXT3_FS_POSIX_ACL is not set
1004# CONFIG_EXT3_FS_SECURITY is not set
1005CONFIG_JBD=y
1006# CONFIG_JBD_DEBUG is not set
1007CONFIG_FS_MBCACHE=y
1008CONFIG_REISERFS_FS=y
1009# CONFIG_REISERFS_CHECK is not set
1010# CONFIG_REISERFS_PROC_INFO is not set
1011# CONFIG_REISERFS_FS_XATTR is not set
1012# CONFIG_JFS_FS is not set
1013# CONFIG_FS_POSIX_ACL is not set
1014# CONFIG_XFS_FS is not set
1015# CONFIG_OCFS2_FS is not set
1016# CONFIG_MINIX_FS is not set
1017# CONFIG_ROMFS_FS is not set
1018CONFIG_INOTIFY=y
1019CONFIG_INOTIFY_USER=y
1020# CONFIG_QUOTA is not set
1021CONFIG_DNOTIFY=y
1022# CONFIG_AUTOFS_FS is not set
1023# CONFIG_AUTOFS4_FS is not set
1024# CONFIG_FUSE_FS is not set
1025
1026#
1027# CD-ROM/DVD Filesystems
1028#
1029CONFIG_ISO9660_FS=y
1030CONFIG_JOLIET=y
1031CONFIG_ZISOFS=y
1032CONFIG_UDF_FS=y
1033CONFIG_UDF_NLS=y
1034
1035#
1036# DOS/FAT/NT Filesystems
1037#
1038CONFIG_FAT_FS=y
1039CONFIG_MSDOS_FS=y
1040CONFIG_VFAT_FS=y
1041CONFIG_FAT_DEFAULT_CODEPAGE=437
1042CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1043# CONFIG_NTFS_FS is not set
1044
1045#
1046# Pseudo filesystems
1047#
1048CONFIG_PROC_FS=y
1049CONFIG_PROC_SYSCTL=y
1050CONFIG_SYSFS=y
1051CONFIG_TMPFS=y
1052# CONFIG_TMPFS_POSIX_ACL is not set
1053# CONFIG_HUGETLB_PAGE is not set
1054
1055#
1056# Miscellaneous filesystems
1057#
1058# CONFIG_HFSPLUS_FS is not set
1059CONFIG_JFFS2_FS=y
1060CONFIG_JFFS2_FS_DEBUG=1
1061CONFIG_JFFS2_FS_WRITEBUFFER=y
1062# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1063CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1064CONFIG_JFFS2_ZLIB=y
1065# CONFIG_JFFS2_LZO is not set
1066CONFIG_JFFS2_RTIME=y
1067CONFIG_JFFS2_RUBIN=y
1068# CONFIG_JFFS2_CMODE_NONE is not set
1069CONFIG_JFFS2_CMODE_PRIORITY=y
1070# CONFIG_JFFS2_CMODE_SIZE is not set
1071# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
1072CONFIG_CRAMFS=y
1073# CONFIG_VXFS_FS is not set
1074# CONFIG_HPFS_FS is not set
1075# CONFIG_QNX4FS_FS is not set
1076# CONFIG_SYSV_FS is not set
1077# CONFIG_UFS_FS is not set
1078CONFIG_NETWORK_FILESYSTEMS=y
1079# CONFIG_NFS_FS is not set
1080# CONFIG_NFSD is not set
1081# CONFIG_SMB_FS is not set
1082# CONFIG_CIFS is not set
1083# CONFIG_NCP_FS is not set
1084# CONFIG_CODA_FS is not set
1085
1086#
1087# Partition Types
1088#
1089CONFIG_PARTITION_ADVANCED=y
1090# CONFIG_ACORN_PARTITION is not set
1091# CONFIG_OSF_PARTITION is not set
1092# CONFIG_AMIGA_PARTITION is not set
1093# CONFIG_ATARI_PARTITION is not set
1094CONFIG_MAC_PARTITION=y
1095CONFIG_MSDOS_PARTITION=y
1096# CONFIG_BSD_DISKLABEL is not set
1097# CONFIG_MINIX_SUBPARTITION is not set
1098# CONFIG_SOLARIS_X86_PARTITION is not set
1099# CONFIG_UNIXWARE_DISKLABEL is not set
1100# CONFIG_LDM_PARTITION is not set
1101# CONFIG_SGI_PARTITION is not set
1102# CONFIG_ULTRIX_PARTITION is not set
1103# CONFIG_SUN_PARTITION is not set
1104# CONFIG_KARMA_PARTITION is not set
1105# CONFIG_EFI_PARTITION is not set
1106# CONFIG_SYSV68_PARTITION is not set
1107CONFIG_NLS=y
1108CONFIG_NLS_DEFAULT="iso8859-1"
1109CONFIG_NLS_CODEPAGE_437=y
1110# CONFIG_NLS_CODEPAGE_737 is not set
1111# CONFIG_NLS_CODEPAGE_775 is not set
1112# CONFIG_NLS_CODEPAGE_850 is not set
1113# CONFIG_NLS_CODEPAGE_852 is not set
1114# CONFIG_NLS_CODEPAGE_855 is not set
1115# CONFIG_NLS_CODEPAGE_857 is not set
1116# CONFIG_NLS_CODEPAGE_860 is not set
1117# CONFIG_NLS_CODEPAGE_861 is not set
1118# CONFIG_NLS_CODEPAGE_862 is not set
1119# CONFIG_NLS_CODEPAGE_863 is not set
1120# CONFIG_NLS_CODEPAGE_864 is not set
1121# CONFIG_NLS_CODEPAGE_865 is not set
1122# CONFIG_NLS_CODEPAGE_866 is not set
1123# CONFIG_NLS_CODEPAGE_869 is not set
1124# CONFIG_NLS_CODEPAGE_936 is not set
1125# CONFIG_NLS_CODEPAGE_950 is not set
1126# CONFIG_NLS_CODEPAGE_932 is not set
1127# CONFIG_NLS_CODEPAGE_949 is not set
1128# CONFIG_NLS_CODEPAGE_874 is not set
1129# CONFIG_NLS_ISO8859_8 is not set
1130# CONFIG_NLS_CODEPAGE_1250 is not set
1131# CONFIG_NLS_CODEPAGE_1251 is not set
1132# CONFIG_NLS_ASCII is not set
1133CONFIG_NLS_ISO8859_1=y
1134# CONFIG_NLS_ISO8859_2 is not set
1135# CONFIG_NLS_ISO8859_3 is not set
1136# CONFIG_NLS_ISO8859_4 is not set
1137# CONFIG_NLS_ISO8859_5 is not set
1138# CONFIG_NLS_ISO8859_6 is not set
1139# CONFIG_NLS_ISO8859_7 is not set
1140# CONFIG_NLS_ISO8859_9 is not set
1141# CONFIG_NLS_ISO8859_13 is not set
1142# CONFIG_NLS_ISO8859_14 is not set
1143# CONFIG_NLS_ISO8859_15 is not set
1144# CONFIG_NLS_KOI8_R is not set
1145# CONFIG_NLS_KOI8_U is not set
1146# CONFIG_NLS_UTF8 is not set
1147CONFIG_INSTRUMENTATION=y
1148# CONFIG_PROFILING is not set
1149# CONFIG_MARKERS is not set
1150
1151#
1152# Kernel hacking
1153#
1154# CONFIG_PRINTK_TIME is not set
1155CONFIG_ENABLE_WARN_DEPRECATED=y
1156# CONFIG_ENABLE_MUST_CHECK is not set
1157# CONFIG_MAGIC_SYSRQ is not set
1158# CONFIG_UNUSED_SYMBOLS is not set
1159CONFIG_DEBUG_FS=y
1160# CONFIG_HEADERS_CHECK is not set
1161CONFIG_DEBUG_KERNEL=y
1162# CONFIG_DEBUG_SHIRQ is not set
1163CONFIG_DETECT_SOFTLOCKUP=y
1164CONFIG_SCHED_DEBUG=y
1165# CONFIG_SCHEDSTATS is not set
1166# CONFIG_TIMER_STATS is not set
1167CONFIG_SLUB_DEBUG_ON=y
1168# CONFIG_DEBUG_RT_MUTEXES is not set
1169# CONFIG_RT_MUTEX_TESTER is not set
1170# CONFIG_DEBUG_SPINLOCK is not set
1171# CONFIG_DEBUG_MUTEXES is not set
1172# CONFIG_DEBUG_LOCK_ALLOC is not set
1173# CONFIG_PROVE_LOCKING is not set
1174# CONFIG_LOCK_STAT is not set
1175# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1176# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1177CONFIG_DEBUG_KOBJECT=y
1178CONFIG_DEBUG_BUGVERBOSE=y
1179CONFIG_DEBUG_INFO=y
1180# CONFIG_DEBUG_VM is not set
1181CONFIG_DEBUG_LIST=y
1182# CONFIG_DEBUG_SG is not set
1183CONFIG_FRAME_POINTER=y
1184CONFIG_FORCED_INLINING=y
1185# CONFIG_BOOT_PRINTK_DELAY is not set
1186# CONFIG_RCU_TORTURE_TEST is not set
1187# CONFIG_FAULT_INJECTION is not set
1188# CONFIG_SAMPLES is not set
1189CONFIG_DEBUG_USER=y
1190CONFIG_DEBUG_ERRORS=y
1191CONFIG_DEBUG_LL=y
1192# CONFIG_DEBUG_ICEDCC is not set
1193
1194#
1195# Security options
1196#
1197# CONFIG_KEYS is not set
1198# CONFIG_SECURITY is not set
1199# CONFIG_CRYPTO is not set
1200
1201#
1202# Library routines
1203#
1204CONFIG_BITREVERSE=y
1205# CONFIG_CRC_CCITT is not set
1206# CONFIG_CRC16 is not set
1207# CONFIG_CRC_ITU_T is not set
1208CONFIG_CRC32=y
1209# CONFIG_CRC7 is not set
1210# CONFIG_LIBCRC32C is not set
1211CONFIG_ZLIB_INFLATE=y
1212CONFIG_ZLIB_DEFLATE=y
1213CONFIG_PLIST=y
1214CONFIG_HAS_IOMEM=y
1215CONFIG_HAS_IOPORT=y
1216CONFIG_HAS_DMA=y
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 6235f72a14f0..ad455ff5aebe 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
22obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o 22obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o
23obj-$(CONFIG_ATAGS_PROC) += atags.o 23obj-$(CONFIG_ATAGS_PROC) += atags.o
24obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o 24obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
25obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
25 26
26obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 27obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
27AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 28AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 3278e713c32a..0a0d2479274b 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -58,6 +58,9 @@ int main(void)
58 DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); 58 DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value));
59 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); 59 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate));
60 DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); 60 DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate));
61#ifdef CONFIG_ARM_THUMBEE
62 DEFINE(TI_THUMBEE_STATE, offsetof(struct thread_info, thumbee_state));
63#endif
61#ifdef CONFIG_IWMMXT 64#ifdef CONFIG_IWMMXT
62 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); 65 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
63#endif 66#endif
@@ -108,5 +111,12 @@ int main(void)
108 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); 111 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush));
109 DEFINE(PROCINFO_MM_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mm_mmu_flags)); 112 DEFINE(PROCINFO_MM_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mm_mmu_flags));
110 DEFINE(PROCINFO_IO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_io_mmu_flags)); 113 DEFINE(PROCINFO_IO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_io_mmu_flags));
114 BLANK();
115#ifdef MULTI_DABORT
116 DEFINE(PROCESSOR_DABT_FUNC, offsetof(struct processor, _data_abort));
117#endif
118#ifdef MULTI_PABORT
119 DEFINE(PROCESSOR_PABT_FUNC, offsetof(struct processor, _prefetch_abort));
120#endif
111 return 0; 121 return 0;
112} 122}
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 7e97b7376563..30a67a5a40a8 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -359,9 +359,11 @@
359 CALL(sys_kexec_load) 359 CALL(sys_kexec_load)
360 CALL(sys_utimensat) 360 CALL(sys_utimensat)
361 CALL(sys_signalfd) 361 CALL(sys_signalfd)
362/* 350 */ CALL(sys_ni_syscall) 362/* 350 */ CALL(sys_timerfd_create)
363 CALL(sys_eventfd) 363 CALL(sys_eventfd)
364 CALL(sys_fallocate) 364 CALL(sys_fallocate)
365 CALL(sys_timerfd_settime)
366 CALL(sys_timerfd_gettime)
365#ifndef syscalls_counted 367#ifndef syscalls_counted
366.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 368.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
367#define syscalls_counted 369#define syscalls_counted
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index a46d5b456765..7dca225752c1 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -166,12 +166,12 @@ __dabt_svc:
166 @ The abort handler must return the aborted address in r0, and 166 @ The abort handler must return the aborted address in r0, and
167 @ the fault status register in r1. r9 must be preserved. 167 @ the fault status register in r1. r9 must be preserved.
168 @ 168 @
169#ifdef MULTI_ABORT 169#ifdef MULTI_DABORT
170 ldr r4, .LCprocfns 170 ldr r4, .LCprocfns
171 mov lr, pc 171 mov lr, pc
172 ldr pc, [r4] 172 ldr pc, [r4, #PROCESSOR_DABT_FUNC]
173#else 173#else
174 bl CPU_ABORT_HANDLER 174 bl CPU_DABORT_HANDLER
175#endif 175#endif
176 176
177 @ 177 @
@@ -209,14 +209,12 @@ __irq_svc:
209 209
210 irq_handler 210 irq_handler
211#ifdef CONFIG_PREEMPT 211#ifdef CONFIG_PREEMPT
212 str r8, [tsk, #TI_PREEMPT] @ restore preempt count
212 ldr r0, [tsk, #TI_FLAGS] @ get flags 213 ldr r0, [tsk, #TI_FLAGS] @ get flags
214 teq r8, #0 @ if preempt count != 0
215 movne r0, #0 @ force flags to 0
213 tst r0, #_TIF_NEED_RESCHED 216 tst r0, #_TIF_NEED_RESCHED
214 blne svc_preempt 217 blne svc_preempt
215preempt_return:
216 ldr r0, [tsk, #TI_PREEMPT] @ read preempt value
217 str r8, [tsk, #TI_PREEMPT] @ restore preempt count
218 teq r0, r7
219 strne r0, [r0, -r0] @ bug()
220#endif 218#endif
221 ldr r0, [sp, #S_PSR] @ irqs are already disabled 219 ldr r0, [sp, #S_PSR] @ irqs are already disabled
222 msr spsr_cxsf, r0 220 msr spsr_cxsf, r0
@@ -230,19 +228,11 @@ preempt_return:
230 228
231#ifdef CONFIG_PREEMPT 229#ifdef CONFIG_PREEMPT
232svc_preempt: 230svc_preempt:
233 teq r8, #0 @ was preempt count = 0 231 mov r8, lr
234 ldreq r6, .LCirq_stat
235 movne pc, lr @ no
236 ldr r0, [r6, #4] @ local_irq_count
237 ldr r1, [r6, #8] @ local_bh_count
238 adds r0, r0, r1
239 movne pc, lr
240 mov r7, #0 @ preempt_schedule_irq
241 str r7, [tsk, #TI_PREEMPT] @ expects preempt_count == 0
2421: bl preempt_schedule_irq @ irq en/disable is done inside 2321: bl preempt_schedule_irq @ irq en/disable is done inside
243 ldr r0, [tsk, #TI_FLAGS] @ get new tasks TI_FLAGS 233 ldr r0, [tsk, #TI_FLAGS] @ get new tasks TI_FLAGS
244 tst r0, #_TIF_NEED_RESCHED 234 tst r0, #_TIF_NEED_RESCHED
245 beq preempt_return @ go again 235 moveq pc, r8 @ go again
246 b 1b 236 b 1b
247#endif 237#endif
248 238
@@ -293,7 +283,6 @@ __pabt_svc:
293 mrs r9, cpsr 283 mrs r9, cpsr
294 tst r3, #PSR_I_BIT 284 tst r3, #PSR_I_BIT
295 biceq r9, r9, #PSR_I_BIT 285 biceq r9, r9, #PSR_I_BIT
296 msr cpsr_c, r9
297 286
298 @ 287 @
299 @ set args, then call main handler 288 @ set args, then call main handler
@@ -301,7 +290,15 @@ __pabt_svc:
301 @ r0 - address of faulting instruction 290 @ r0 - address of faulting instruction
302 @ r1 - pointer to registers on stack 291 @ r1 - pointer to registers on stack
303 @ 292 @
304 mov r0, r2 @ address (pc) 293#ifdef MULTI_PABORT
294 mov r0, r2 @ pass address of aborted instruction.
295 ldr r4, .LCprocfns
296 mov lr, pc
297 ldr pc, [r4, #PROCESSOR_PABT_FUNC]
298#else
299 CPU_PABORT_HANDLER(r0, r2)
300#endif
301 msr cpsr_c, r9 @ Maybe enable interrupts
305 mov r1, sp @ regs 302 mov r1, sp @ regs
306 bl do_PrefetchAbort @ call abort handler 303 bl do_PrefetchAbort @ call abort handler
307 304
@@ -320,16 +317,12 @@ __pabt_svc:
320 .align 5 317 .align 5
321.LCcralign: 318.LCcralign:
322 .word cr_alignment 319 .word cr_alignment
323#ifdef MULTI_ABORT 320#ifdef MULTI_DABORT
324.LCprocfns: 321.LCprocfns:
325 .word processor 322 .word processor
326#endif 323#endif
327.LCfp: 324.LCfp:
328 .word fp_enter 325 .word fp_enter
329#ifdef CONFIG_PREEMPT
330.LCirq_stat:
331 .word irq_stat
332#endif
333 326
334/* 327/*
335 * User mode handlers 328 * User mode handlers
@@ -404,12 +397,12 @@ __dabt_usr:
404 @ The abort handler must return the aborted address in r0, and 397 @ The abort handler must return the aborted address in r0, and
405 @ the fault status register in r1. 398 @ the fault status register in r1.
406 @ 399 @
407#ifdef MULTI_ABORT 400#ifdef MULTI_DABORT
408 ldr r4, .LCprocfns 401 ldr r4, .LCprocfns
409 mov lr, pc 402 mov lr, pc
410 ldr pc, [r4] 403 ldr pc, [r4, #PROCESSOR_DABT_FUNC]
411#else 404#else
412 bl CPU_ABORT_HANDLER 405 bl CPU_DABORT_HANDLER
413#endif 406#endif
414 407
415 @ 408 @
@@ -455,10 +448,6 @@ __irq_usr:
455__und_usr: 448__und_usr:
456 usr_entry 449 usr_entry
457 450
458 tst r3, #PSR_T_BIT @ Thumb mode?
459 bne __und_usr_unknown @ ignore FP
460 sub r4, r2, #4
461
462 @ 451 @
463 @ fall through to the emulation code, which returns using r9 if 452 @ fall through to the emulation code, which returns using r9 if
464 @ it has emulated the instruction, or the more conventional lr 453 @ it has emulated the instruction, or the more conventional lr
@@ -468,7 +457,24 @@ __und_usr:
468 @ 457 @
469 adr r9, ret_from_exception 458 adr r9, ret_from_exception
470 adr lr, __und_usr_unknown 459 adr lr, __und_usr_unknown
4711: ldrt r0, [r4] 460 tst r3, #PSR_T_BIT @ Thumb mode?
461 subeq r4, r2, #4 @ ARM instr at LR - 4
462 subne r4, r2, #2 @ Thumb instr at LR - 2
4631: ldreqt r0, [r4]
464 beq call_fpe
465 @ Thumb instruction
466#if __LINUX_ARM_ARCH__ >= 7
4672: ldrht r5, [r4], #2
468 and r0, r5, #0xf800 @ mask bits 111x x... .... ....
469 cmp r0, #0xe800 @ 32bit instruction if xx != 0
470 blo __und_usr_unknown
4713: ldrht r0, [r4]
472 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
473 orr r0, r0, r5, lsl #16
474#else
475 b __und_usr_unknown
476#endif
477
472 @ 478 @
473 @ fallthrough to call_fpe 479 @ fallthrough to call_fpe
474 @ 480 @
@@ -477,10 +483,14 @@ __und_usr:
477 * The out of line fixup for the ldrt above. 483 * The out of line fixup for the ldrt above.
478 */ 484 */
479 .section .fixup, "ax" 485 .section .fixup, "ax"
4802: mov pc, r9 4864: mov pc, r9
481 .previous 487 .previous
482 .section __ex_table,"a" 488 .section __ex_table,"a"
483 .long 1b, 2b 489 .long 1b, 4b
490#if __LINUX_ARM_ARCH__ >= 7
491 .long 2b, 4b
492 .long 3b, 4b
493#endif
484 .previous 494 .previous
485 495
486/* 496/*
@@ -507,9 +517,16 @@ __und_usr:
507 * r10 = this threads thread_info structure. 517 * r10 = this threads thread_info structure.
508 * lr = unrecognised instruction return address 518 * lr = unrecognised instruction return address
509 */ 519 */
520 @
521 @ Fall-through from Thumb-2 __und_usr
522 @
523#ifdef CONFIG_NEON
524 adr r6, .LCneon_thumb_opcodes
525 b 2f
526#endif
510call_fpe: 527call_fpe:
511#ifdef CONFIG_NEON 528#ifdef CONFIG_NEON
512 adr r6, .LCneon_opcodes 529 adr r6, .LCneon_arm_opcodes
5132: 5302:
514 ldr r7, [r6], #4 @ mask value 531 ldr r7, [r6], #4 @ mask value
515 cmp r7, #0 @ end mask? 532 cmp r7, #0 @ end mask?
@@ -526,6 +543,7 @@ call_fpe:
5261: 5431:
527#endif 544#endif
528 tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 545 tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27
546 tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2
529#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) 547#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710)
530 and r8, r0, #0x0f000000 @ mask out op-code bits 548 and r8, r0, #0x0f000000 @ mask out op-code bits
531 teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? 549 teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)?
@@ -577,7 +595,7 @@ call_fpe:
577#ifdef CONFIG_NEON 595#ifdef CONFIG_NEON
578 .align 6 596 .align 6
579 597
580.LCneon_opcodes: 598.LCneon_arm_opcodes:
581 .word 0xfe000000 @ mask 599 .word 0xfe000000 @ mask
582 .word 0xf2000000 @ opcode 600 .word 0xf2000000 @ opcode
583 601
@@ -586,6 +604,16 @@ call_fpe:
586 604
587 .word 0x00000000 @ mask 605 .word 0x00000000 @ mask
588 .word 0x00000000 @ opcode 606 .word 0x00000000 @ opcode
607
608.LCneon_thumb_opcodes:
609 .word 0xef000000 @ mask
610 .word 0xef000000 @ opcode
611
612 .word 0xff100000 @ mask
613 .word 0xf9000000 @ opcode
614
615 .word 0x00000000 @ mask
616 .word 0x00000000 @ opcode
589#endif 617#endif
590 618
591do_fpe: 619do_fpe:
@@ -619,8 +647,15 @@ __und_usr_unknown:
619__pabt_usr: 647__pabt_usr:
620 usr_entry 648 usr_entry
621 649
650#ifdef MULTI_PABORT
651 mov r0, r2 @ pass address of aborted instruction.
652 ldr r4, .LCprocfns
653 mov lr, pc
654 ldr pc, [r4, #PROCESSOR_PABT_FUNC]
655#else
656 CPU_PABORT_HANDLER(r0, r2)
657#endif
622 enable_irq @ Enable interrupts 658 enable_irq @ Enable interrupts
623 mov r0, r2 @ address (pc)
624 mov r1, sp @ regs 659 mov r1, sp @ regs
625 bl do_PrefetchAbort @ call abort handler 660 bl do_PrefetchAbort @ call abort handler
626 /* fall through */ 661 /* fall through */
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 6c90c50a9ee3..597ed00a08d8 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -352,6 +352,11 @@ sys_mmap2:
352 b do_mmap2 352 b do_mmap2
353#endif 353#endif
354 354
355ENTRY(pabort_ifar)
356 mrc p15, 0, r0, cr6, cr0, 2
357ENTRY(pabort_noifar)
358 mov pc, lr
359
355#ifdef CONFIG_OABI_COMPAT 360#ifdef CONFIG_OABI_COMPAT
356 361
357/* 362/*
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 50f667febe29..7e9c00a8a412 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -75,8 +75,13 @@ __error_p:
75#ifdef CONFIG_DEBUG_LL 75#ifdef CONFIG_DEBUG_LL
76 adr r0, str_p1 76 adr r0, str_p1
77 bl printascii 77 bl printascii
78 mov r0, r9
79 bl printhex8
80 adr r0, str_p2
81 bl printascii
78 b __error 82 b __error
79str_p1: .asciz "\nError: unrecognized/unsupported processor variant.\n" 83str_p1: .asciz "\nError: unrecognized/unsupported processor variant (0x"
84str_p2: .asciz ").\n"
80 .align 85 .align
81#endif 86#endif
82 87
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c
new file mode 100644
index 000000000000..df3f6b7ebcea
--- /dev/null
+++ b/arch/arm/kernel/thumbee.c
@@ -0,0 +1,81 @@
1/*
2 * arch/arm/kernel/thumbee.c
3 *
4 * Copyright (C) 2008 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#include <linux/kernel.h>
21#include <linux/init.h>
22
23#include <asm/thread_notify.h>
24
25/*
26 * Access to the ThumbEE Handler Base register
27 */
28static inline unsigned long teehbr_read()
29{
30 unsigned long v;
31 asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v));
32 return v;
33}
34
35static inline void teehbr_write(unsigned long v)
36{
37 asm("mcr p14, 6, %0, c1, c0, 0\n" : : "r" (v));
38}
39
40static int thumbee_notifier(struct notifier_block *self, unsigned long cmd, void *t)
41{
42 struct thread_info *thread = t;
43
44 switch (cmd) {
45 case THREAD_NOTIFY_FLUSH:
46 thread->thumbee_state = 0;
47 break;
48 case THREAD_NOTIFY_SWITCH:
49 current_thread_info()->thumbee_state = teehbr_read();
50 teehbr_write(thread->thumbee_state);
51 break;
52 }
53
54 return NOTIFY_DONE;
55}
56
57static struct notifier_block thumbee_notifier_block = {
58 .notifier_call = thumbee_notifier,
59};
60
61static int __init thumbee_init(void)
62{
63 unsigned long pfr0;
64 unsigned int cpu_arch = cpu_architecture();
65
66 if (cpu_arch < CPU_ARCH_ARMv7)
67 return 0;
68
69 /* processor feature register 0 */
70 asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0));
71 if ((pfr0 & 0x0000f000) != 0x00001000)
72 return 0;
73
74 printk(KERN_INFO "ThumbEE CPU extension supported.\n");
75 elf_hwcap |= HWCAP_THUMBEE;
76 thread_register_notifier(&thumbee_notifier_block);
77
78 return 0;
79}
80
81late_initcall(thumbee_init);
diff --git a/arch/arm/mach-aaec2000/clock.c b/arch/arm/mach-aaec2000/clock.c
index 74aa7a39bb68..e10ee158d720 100644
--- a/arch/arm/mach-aaec2000/clock.c
+++ b/arch/arm/mach-aaec2000/clock.c
@@ -18,8 +18,6 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20 20
21#include <asm/semaphore.h>
22
23#include "clock.h" 21#include "clock.h"
24 22
25static LIST_HEAD(clocks); 23static LIST_HEAD(clocks);
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 074dcd5d9a7e..0fc07b6db749 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -12,18 +12,28 @@ config ARCH_AT91RM9200
12 12
13config ARCH_AT91SAM9260 13config ARCH_AT91SAM9260
14 bool "AT91SAM9260 or AT91SAM9XE" 14 bool "AT91SAM9260 or AT91SAM9XE"
15 select GENERIC_TIME
16 select GENERIC_CLOCKEVENTS
15 17
16config ARCH_AT91SAM9261 18config ARCH_AT91SAM9261
17 bool "AT91SAM9261" 19 bool "AT91SAM9261"
20 select GENERIC_TIME
21 select GENERIC_CLOCKEVENTS
18 22
19config ARCH_AT91SAM9263 23config ARCH_AT91SAM9263
20 bool "AT91SAM9263" 24 bool "AT91SAM9263"
25 select GENERIC_TIME
26 select GENERIC_CLOCKEVENTS
21 27
22config ARCH_AT91SAM9RL 28config ARCH_AT91SAM9RL
23 bool "AT91SAM9RL" 29 bool "AT91SAM9RL"
30 select GENERIC_TIME
31 select GENERIC_CLOCKEVENTS
24 32
25config ARCH_AT91CAP9 33config ARCH_AT91CAP9
26 bool "AT91CAP9" 34 bool "AT91CAP9"
35 select GENERIC_TIME
36 select GENERIC_CLOCKEVENTS
27 37
28config ARCH_AT91X40 38config ARCH_AT91X40
29 bool "AT91x40" 39 bool "AT91x40"
@@ -109,6 +119,13 @@ config MACH_KAFA
109 help 119 help
110 Select this if you are using Sperry-Sun's KAFA board. 120 Select this if you are using Sperry-Sun's KAFA board.
111 121
122config MACH_ECBAT91
123 bool "emQbit ECB_AT91 SBC"
124 depends on ARCH_AT91RM9200
125 help
126 Select this if you are using emQbit's ECB_AT91 board.
127 <http://wiki.emqbit.com/free-ecb-at91>
128
112endif 129endif
113 130
114# ---------------------------------------------------------- 131# ----------------------------------------------------------
@@ -133,6 +150,20 @@ config MACH_AT91SAM9260EK
133 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit 150 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
134 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> 151 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
135 152
153config MACH_CAM60
154 bool "KwikByte KB9260 (CAM60) board"
155 depends on ARCH_AT91SAM9260
156 help
157 Select this if you are using KwikByte's KB9260 (CAM60) board based on the Atmel AT91SAM9260.
158 <http://www.kwikbyte.com/KB9260.html>
159
160config MACH_SAM9_L9260
161 bool "Olimex SAM9-L9260 board"
162 depends on ARCH_AT91SAM9260
163 help
164 Select this if you are using Olimex's SAM9-L9260 board based on the Atmel AT91SAM9260.
165 <http://www.olimex.com/dev/sam9-L9260.html>
166
136endif 167endif
137 168
138# ---------------------------------------------------------- 169# ----------------------------------------------------------
@@ -216,7 +247,7 @@ comment "AT91 Board Options"
216 247
217config MTD_AT91_DATAFLASH_CARD 248config MTD_AT91_DATAFLASH_CARD
218 bool "Enable DataFlash Card support" 249 bool "Enable DataFlash Card support"
219 depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91CAP9ADK) 250 depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91CAP9ADK || MACH_SAM9_L9260 || MACH_ECBAT91)
220 help 251 help
221 Enable support for the DataFlash card. 252 Enable support for the DataFlash card.
222 253
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index bf5f293dccf8..8d9bc0153b18 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -29,9 +29,12 @@ obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
29obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o 29obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
30obj-$(CONFIG_MACH_KAFA) += board-kafa.o 30obj-$(CONFIG_MACH_KAFA) += board-kafa.o
31obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o 31obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
32obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
32 33
33# AT91SAM9260 board-specific support 34# AT91SAM9260 board-specific support
34obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o 35obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
36obj-$(CONFIG_MACH_CAM60) += board-cam60.o
37obj-$(CONFIG_MACH_SAM9_L9260) += board-sam9-l9260.o
35 38
36# AT91SAM9261 board-specific support 39# AT91SAM9261 board-specific support
37obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o 40obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c
index 48d27d8000b0..933fa8f55cbc 100644
--- a/arch/arm/mach-at91/at91cap9.c
+++ b/arch/arm/mach-at91/at91cap9.c
@@ -13,12 +13,14 @@
13 */ 13 */
14 14
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/pm.h>
16 17
17#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 19#include <asm/mach/map.h>
19#include <asm/arch/at91cap9.h> 20#include <asm/arch/at91cap9.h>
20#include <asm/arch/at91_pmc.h> 21#include <asm/arch/at91_pmc.h>
21#include <asm/arch/at91_rstc.h> 22#include <asm/arch/at91_rstc.h>
23#include <asm/arch/at91_shdwc.h>
22 24
23#include "generic.h" 25#include "generic.h"
24#include "clock.h" 26#include "clock.h"
@@ -288,6 +290,12 @@ static void at91cap9_reset(void)
288 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 290 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
289} 291}
290 292
293static void at91cap9_poweroff(void)
294{
295 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
296}
297
298
291/* -------------------------------------------------------------------- 299/* --------------------------------------------------------------------
292 * AT91CAP9 processor initialization 300 * AT91CAP9 processor initialization
293 * -------------------------------------------------------------------- */ 301 * -------------------------------------------------------------------- */
@@ -298,6 +306,7 @@ void __init at91cap9_initialize(unsigned long main_clock)
298 iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc)); 306 iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc));
299 307
300 at91_arch_reset = at91cap9_reset; 308 at91_arch_reset = at91cap9_reset;
309 pm_power_off = at91cap9_poweroff;
301 at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); 310 at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
302 311
303 /* Init clock subsystem */ 312 /* Init clock subsystem */
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index c50fad9cd143..f1a80d74a4b6 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -16,15 +16,15 @@
16 16
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/mtd/physmap.h> 19#include <linux/i2c-gpio.h>
20 20
21#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
22 22
23#include <asm/arch/board.h> 23#include <asm/arch/board.h>
24#include <asm/arch/gpio.h> 24#include <asm/arch/gpio.h>
25#include <asm/arch/at91cap9.h> 25#include <asm/arch/at91cap9.h>
26#include <asm/arch/at91sam926x_mc.h>
27#include <asm/arch/at91cap9_matrix.h> 26#include <asm/arch/at91cap9_matrix.h>
27#include <asm/arch/at91sam9_smc.h>
28 28
29#include "generic.h" 29#include "generic.h"
30 30
@@ -283,10 +283,15 @@ static struct at91_nand_data nand_data;
283#define NAND_BASE AT91_CHIPSELECT_3 283#define NAND_BASE AT91_CHIPSELECT_3
284 284
285static struct resource nand_resources[] = { 285static struct resource nand_resources[] = {
286 { 286 [0] = {
287 .start = NAND_BASE, 287 .start = NAND_BASE,
288 .end = NAND_BASE + SZ_256M - 1, 288 .end = NAND_BASE + SZ_256M - 1,
289 .flags = IORESOURCE_MEM, 289 .flags = IORESOURCE_MEM,
290 },
291 [1] = {
292 .start = AT91_BASE_SYS + AT91_ECC,
293 .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1,
294 .flags = IORESOURCE_MEM,
290 } 295 }
291}; 296};
292 297
@@ -344,6 +349,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data)
344void __init at91_add_device_nand(struct at91_nand_data *data) {} 349void __init at91_add_device_nand(struct at91_nand_data *data) {}
345#endif 350#endif
346 351
352
347/* -------------------------------------------------------------------- 353/* --------------------------------------------------------------------
348 * TWI (i2c) 354 * TWI (i2c)
349 * -------------------------------------------------------------------- */ 355 * -------------------------------------------------------------------- */
@@ -532,13 +538,59 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
532 538
533 539
534/* -------------------------------------------------------------------- 540/* --------------------------------------------------------------------
541 * Timer/Counter block
542 * -------------------------------------------------------------------- */
543
544#ifdef CONFIG_ATMEL_TCLIB
545
546static struct resource tcb_resources[] = {
547 [0] = {
548 .start = AT91CAP9_BASE_TCB0,
549 .end = AT91CAP9_BASE_TCB0 + SZ_16K - 1,
550 .flags = IORESOURCE_MEM,
551 },
552 [1] = {
553 .start = AT91CAP9_ID_TCB,
554 .end = AT91CAP9_ID_TCB,
555 .flags = IORESOURCE_IRQ,
556 },
557};
558
559static struct platform_device at91cap9_tcb_device = {
560 .name = "atmel_tcb",
561 .id = 0,
562 .resource = tcb_resources,
563 .num_resources = ARRAY_SIZE(tcb_resources),
564};
565
566static void __init at91_add_device_tc(void)
567{
568 /* this chip has one clock and irq for all three TC channels */
569 at91_clock_associate("tcb_clk", &at91cap9_tcb_device.dev, "t0_clk");
570 platform_device_register(&at91cap9_tcb_device);
571}
572#else
573static void __init at91_add_device_tc(void) { }
574#endif
575
576
577/* --------------------------------------------------------------------
535 * RTT 578 * RTT
536 * -------------------------------------------------------------------- */ 579 * -------------------------------------------------------------------- */
537 580
581static struct resource rtt_resources[] = {
582 {
583 .start = AT91_BASE_SYS + AT91_RTT,
584 .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
585 .flags = IORESOURCE_MEM,
586 }
587};
588
538static struct platform_device at91cap9_rtt_device = { 589static struct platform_device at91cap9_rtt_device = {
539 .name = "at91_rtt", 590 .name = "at91_rtt",
540 .id = -1, 591 .id = 0,
541 .num_resources = 0, 592 .resource = rtt_resources,
593 .num_resources = ARRAY_SIZE(rtt_resources),
542}; 594};
543 595
544static void __init at91_add_device_rtt(void) 596static void __init at91_add_device_rtt(void)
@@ -990,7 +1042,7 @@ static inline void configure_usart2_pins(unsigned pins)
990 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ 1042 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */
991} 1043}
992 1044
993static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1045static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
994struct platform_device *atmel_default_console_device; /* the serial console device */ 1046struct platform_device *atmel_default_console_device; /* the serial console device */
995 1047
996void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1048void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
@@ -1031,8 +1083,6 @@ void __init at91_set_serial_console(unsigned portnr)
1031{ 1083{
1032 if (portnr < ATMEL_MAX_UART) 1084 if (portnr < ATMEL_MAX_UART)
1033 atmel_default_console_device = at91_uarts[portnr]; 1085 atmel_default_console_device = at91_uarts[portnr];
1034 if (!atmel_default_console_device)
1035 printk(KERN_INFO "AT91: No default serial console defined.\n");
1036} 1086}
1037 1087
1038void __init at91_add_device_serial(void) 1088void __init at91_add_device_serial(void)
@@ -1043,6 +1093,9 @@ void __init at91_add_device_serial(void)
1043 if (at91_uarts[i]) 1093 if (at91_uarts[i])
1044 platform_device_register(at91_uarts[i]); 1094 platform_device_register(at91_uarts[i]);
1045 } 1095 }
1096
1097 if (!atmel_default_console_device)
1098 printk(KERN_INFO "AT91: No default serial console defined.\n");
1046} 1099}
1047#else 1100#else
1048void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1101void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
@@ -1060,6 +1113,7 @@ static int __init at91_add_standard_devices(void)
1060{ 1113{
1061 at91_add_device_rtt(); 1114 at91_add_device_rtt();
1062 at91_add_device_watchdog(); 1115 at91_add_device_watchdog();
1116 at91_add_device_tc();
1063 return 0; 1117 return 0;
1064} 1118}
1065 1119
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index ef6aeb86e980..de19bee83f75 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -577,6 +577,90 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
577 577
578 578
579/* -------------------------------------------------------------------- 579/* --------------------------------------------------------------------
580 * Timer/Counter blocks
581 * -------------------------------------------------------------------- */
582
583#ifdef CONFIG_ATMEL_TCLIB
584
585static struct resource tcb0_resources[] = {
586 [0] = {
587 .start = AT91RM9200_BASE_TCB0,
588 .end = AT91RM9200_BASE_TCB0 + SZ_16K - 1,
589 .flags = IORESOURCE_MEM,
590 },
591 [1] = {
592 .start = AT91RM9200_ID_TC0,
593 .end = AT91RM9200_ID_TC0,
594 .flags = IORESOURCE_IRQ,
595 },
596 [2] = {
597 .start = AT91RM9200_ID_TC1,
598 .end = AT91RM9200_ID_TC1,
599 .flags = IORESOURCE_IRQ,
600 },
601 [3] = {
602 .start = AT91RM9200_ID_TC2,
603 .end = AT91RM9200_ID_TC2,
604 .flags = IORESOURCE_IRQ,
605 },
606};
607
608static struct platform_device at91rm9200_tcb0_device = {
609 .name = "atmel_tcb",
610 .id = 0,
611 .resource = tcb0_resources,
612 .num_resources = ARRAY_SIZE(tcb0_resources),
613};
614
615static struct resource tcb1_resources[] = {
616 [0] = {
617 .start = AT91RM9200_BASE_TCB1,
618 .end = AT91RM9200_BASE_TCB1 + SZ_16K - 1,
619 .flags = IORESOURCE_MEM,
620 },
621 [1] = {
622 .start = AT91RM9200_ID_TC3,
623 .end = AT91RM9200_ID_TC3,
624 .flags = IORESOURCE_IRQ,
625 },
626 [2] = {
627 .start = AT91RM9200_ID_TC4,
628 .end = AT91RM9200_ID_TC4,
629 .flags = IORESOURCE_IRQ,
630 },
631 [3] = {
632 .start = AT91RM9200_ID_TC5,
633 .end = AT91RM9200_ID_TC5,
634 .flags = IORESOURCE_IRQ,
635 },
636};
637
638static struct platform_device at91rm9200_tcb1_device = {
639 .name = "atmel_tcb",
640 .id = 1,
641 .resource = tcb1_resources,
642 .num_resources = ARRAY_SIZE(tcb1_resources),
643};
644
645static void __init at91_add_device_tc(void)
646{
647 /* this chip has a separate clock and irq for each TC channel */
648 at91_clock_associate("tc0_clk", &at91rm9200_tcb0_device.dev, "t0_clk");
649 at91_clock_associate("tc1_clk", &at91rm9200_tcb0_device.dev, "t1_clk");
650 at91_clock_associate("tc2_clk", &at91rm9200_tcb0_device.dev, "t2_clk");
651 platform_device_register(&at91rm9200_tcb0_device);
652
653 at91_clock_associate("tc3_clk", &at91rm9200_tcb1_device.dev, "t0_clk");
654 at91_clock_associate("tc4_clk", &at91rm9200_tcb1_device.dev, "t1_clk");
655 at91_clock_associate("tc5_clk", &at91rm9200_tcb1_device.dev, "t2_clk");
656 platform_device_register(&at91rm9200_tcb1_device);
657}
658#else
659static void __init at91_add_device_tc(void) { }
660#endif
661
662
663/* --------------------------------------------------------------------
580 * RTC 664 * RTC
581 * -------------------------------------------------------------------- */ 665 * -------------------------------------------------------------------- */
582 666
@@ -1019,7 +1103,7 @@ static inline void configure_usart3_pins(unsigned pins)
1019 at91_set_B_periph(AT91_PIN_PB0, 0); /* RTS3 */ 1103 at91_set_B_periph(AT91_PIN_PB0, 0); /* RTS3 */
1020} 1104}
1021 1105
1022static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1106static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1023struct platform_device *atmel_default_console_device; /* the serial console device */ 1107struct platform_device *atmel_default_console_device; /* the serial console device */
1024 1108
1025void __init __deprecated at91_init_serial(struct at91_uart_config *config) 1109void __init __deprecated at91_init_serial(struct at91_uart_config *config)
@@ -1110,8 +1194,6 @@ void __init at91_set_serial_console(unsigned portnr)
1110{ 1194{
1111 if (portnr < ATMEL_MAX_UART) 1195 if (portnr < ATMEL_MAX_UART)
1112 atmel_default_console_device = at91_uarts[portnr]; 1196 atmel_default_console_device = at91_uarts[portnr];
1113 if (!atmel_default_console_device)
1114 printk(KERN_INFO "AT91: No default serial console defined.\n");
1115} 1197}
1116 1198
1117void __init at91_add_device_serial(void) 1199void __init at91_add_device_serial(void)
@@ -1122,6 +1204,9 @@ void __init at91_add_device_serial(void)
1122 if (at91_uarts[i]) 1204 if (at91_uarts[i])
1123 platform_device_register(at91_uarts[i]); 1205 platform_device_register(at91_uarts[i]);
1124 } 1206 }
1207
1208 if (!atmel_default_console_device)
1209 printk(KERN_INFO "AT91: No default serial console defined.\n");
1125} 1210}
1126#else 1211#else
1127void __init __deprecated at91_init_serial(struct at91_uart_config *config) {} 1212void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
@@ -1141,6 +1226,7 @@ static int __init at91_add_standard_devices(void)
1141{ 1226{
1142 at91_add_device_rtc(); 1227 at91_add_device_rtc();
1143 at91_add_device_watchdog(); 1228 at91_add_device_watchdog();
1229 at91_add_device_tc();
1144 return 0; 1230 return 0;
1145} 1231}
1146 1232
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 18d06612ce8a..ee26550cdc21 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/pm.h>
14 15
15#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
@@ -18,6 +19,7 @@
18#include <asm/arch/at91sam9260.h> 19#include <asm/arch/at91sam9260.h>
19#include <asm/arch/at91_pmc.h> 20#include <asm/arch/at91_pmc.h>
20#include <asm/arch/at91_rstc.h> 21#include <asm/arch/at91_rstc.h>
22#include <asm/arch/at91_shdwc.h>
21 23
22#include "generic.h" 24#include "generic.h"
23#include "clock.h" 25#include "clock.h"
@@ -267,6 +269,11 @@ static void at91sam9260_reset(void)
267 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 269 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
268} 270}
269 271
272static void at91sam9260_poweroff(void)
273{
274 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
275}
276
270 277
271/* -------------------------------------------------------------------- 278/* --------------------------------------------------------------------
272 * AT91SAM9260 processor initialization 279 * AT91SAM9260 processor initialization
@@ -304,6 +311,7 @@ void __init at91sam9260_initialize(unsigned long main_clock)
304 iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); 311 iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
305 312
306 at91_arch_reset = at91sam9260_reset; 313 at91_arch_reset = at91sam9260_reset;
314 pm_power_off = at91sam9260_poweroff;
307 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) 315 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
308 | (1 << AT91SAM9260_ID_IRQ2); 316 | (1 << AT91SAM9260_ID_IRQ2);
309 317
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 105f8403860b..393a32aefce5 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -19,8 +19,8 @@
19#include <asm/arch/board.h> 19#include <asm/arch/board.h>
20#include <asm/arch/gpio.h> 20#include <asm/arch/gpio.h>
21#include <asm/arch/at91sam9260.h> 21#include <asm/arch/at91sam9260.h>
22#include <asm/arch/at91sam926x_mc.h>
23#include <asm/arch/at91sam9260_matrix.h> 22#include <asm/arch/at91sam9260_matrix.h>
23#include <asm/arch/at91sam9_smc.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
@@ -288,10 +288,15 @@ static struct at91_nand_data nand_data;
288#define NAND_BASE AT91_CHIPSELECT_3 288#define NAND_BASE AT91_CHIPSELECT_3
289 289
290static struct resource nand_resources[] = { 290static struct resource nand_resources[] = {
291 { 291 [0] = {
292 .start = NAND_BASE, 292 .start = NAND_BASE,
293 .end = NAND_BASE + SZ_256M - 1, 293 .end = NAND_BASE + SZ_256M - 1,
294 .flags = IORESOURCE_MEM, 294 .flags = IORESOURCE_MEM,
295 },
296 [1] = {
297 .start = AT91_BASE_SYS + AT91_ECC,
298 .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1,
299 .flags = IORESOURCE_MEM,
295 } 300 }
296}; 301};
297 302
@@ -540,6 +545,90 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
540 545
541 546
542/* -------------------------------------------------------------------- 547/* --------------------------------------------------------------------
548 * Timer/Counter blocks
549 * -------------------------------------------------------------------- */
550
551#ifdef CONFIG_ATMEL_TCLIB
552
553static struct resource tcb0_resources[] = {
554 [0] = {
555 .start = AT91SAM9260_BASE_TCB0,
556 .end = AT91SAM9260_BASE_TCB0 + SZ_16K - 1,
557 .flags = IORESOURCE_MEM,
558 },
559 [1] = {
560 .start = AT91SAM9260_ID_TC0,
561 .end = AT91SAM9260_ID_TC0,
562 .flags = IORESOURCE_IRQ,
563 },
564 [2] = {
565 .start = AT91SAM9260_ID_TC1,
566 .end = AT91SAM9260_ID_TC1,
567 .flags = IORESOURCE_IRQ,
568 },
569 [3] = {
570 .start = AT91SAM9260_ID_TC2,
571 .end = AT91SAM9260_ID_TC2,
572 .flags = IORESOURCE_IRQ,
573 },
574};
575
576static struct platform_device at91sam9260_tcb0_device = {
577 .name = "atmel_tcb",
578 .id = 0,
579 .resource = tcb0_resources,
580 .num_resources = ARRAY_SIZE(tcb0_resources),
581};
582
583static struct resource tcb1_resources[] = {
584 [0] = {
585 .start = AT91SAM9260_BASE_TCB1,
586 .end = AT91SAM9260_BASE_TCB1 + SZ_16K - 1,
587 .flags = IORESOURCE_MEM,
588 },
589 [1] = {
590 .start = AT91SAM9260_ID_TC3,
591 .end = AT91SAM9260_ID_TC3,
592 .flags = IORESOURCE_IRQ,
593 },
594 [2] = {
595 .start = AT91SAM9260_ID_TC4,
596 .end = AT91SAM9260_ID_TC4,
597 .flags = IORESOURCE_IRQ,
598 },
599 [3] = {
600 .start = AT91SAM9260_ID_TC5,
601 .end = AT91SAM9260_ID_TC5,
602 .flags = IORESOURCE_IRQ,
603 },
604};
605
606static struct platform_device at91sam9260_tcb1_device = {
607 .name = "atmel_tcb",
608 .id = 1,
609 .resource = tcb1_resources,
610 .num_resources = ARRAY_SIZE(tcb1_resources),
611};
612
613static void __init at91_add_device_tc(void)
614{
615 /* this chip has a separate clock and irq for each TC channel */
616 at91_clock_associate("tc0_clk", &at91sam9260_tcb0_device.dev, "t0_clk");
617 at91_clock_associate("tc1_clk", &at91sam9260_tcb0_device.dev, "t1_clk");
618 at91_clock_associate("tc2_clk", &at91sam9260_tcb0_device.dev, "t2_clk");
619 platform_device_register(&at91sam9260_tcb0_device);
620
621 at91_clock_associate("tc3_clk", &at91sam9260_tcb1_device.dev, "t0_clk");
622 at91_clock_associate("tc4_clk", &at91sam9260_tcb1_device.dev, "t1_clk");
623 at91_clock_associate("tc5_clk", &at91sam9260_tcb1_device.dev, "t2_clk");
624 platform_device_register(&at91sam9260_tcb1_device);
625}
626#else
627static void __init at91_add_device_tc(void) { }
628#endif
629
630
631/* --------------------------------------------------------------------
543 * RTT 632 * RTT
544 * -------------------------------------------------------------------- */ 633 * -------------------------------------------------------------------- */
545 634
@@ -553,7 +642,7 @@ static struct resource rtt_resources[] = {
553 642
554static struct platform_device at91sam9260_rtt_device = { 643static struct platform_device at91sam9260_rtt_device = {
555 .name = "at91_rtt", 644 .name = "at91_rtt",
556 .id = -1, 645 .id = 0,
557 .resource = rtt_resources, 646 .resource = rtt_resources,
558 .num_resources = ARRAY_SIZE(rtt_resources), 647 .num_resources = ARRAY_SIZE(rtt_resources),
559}; 648};
@@ -962,64 +1051,9 @@ static inline void configure_usart5_pins(void)
962 at91_set_A_periph(AT91_PIN_PB13, 0); /* RXD5 */ 1051 at91_set_A_periph(AT91_PIN_PB13, 0); /* RXD5 */
963} 1052}
964 1053
965static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1054static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
966struct platform_device *atmel_default_console_device; /* the serial console device */ 1055struct platform_device *atmel_default_console_device; /* the serial console device */
967 1056
968void __init __deprecated at91_init_serial(struct at91_uart_config *config)
969{
970 int i;
971
972 /* Fill in list of supported UARTs */
973 for (i = 0; i < config->nr_tty; i++) {
974 switch (config->tty_map[i]) {
975 case 0:
976 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS | ATMEL_UART_DSR | ATMEL_UART_DTR | ATMEL_UART_DCD | ATMEL_UART_RI);
977 at91_uarts[i] = &at91sam9260_uart0_device;
978 at91_clock_associate("usart0_clk", &at91sam9260_uart0_device.dev, "usart");
979 break;
980 case 1:
981 configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
982 at91_uarts[i] = &at91sam9260_uart1_device;
983 at91_clock_associate("usart1_clk", &at91sam9260_uart1_device.dev, "usart");
984 break;
985 case 2:
986 configure_usart2_pins(0);
987 at91_uarts[i] = &at91sam9260_uart2_device;
988 at91_clock_associate("usart2_clk", &at91sam9260_uart2_device.dev, "usart");
989 break;
990 case 3:
991 configure_usart3_pins(0);
992 at91_uarts[i] = &at91sam9260_uart3_device;
993 at91_clock_associate("usart3_clk", &at91sam9260_uart3_device.dev, "usart");
994 break;
995 case 4:
996 configure_usart4_pins();
997 at91_uarts[i] = &at91sam9260_uart4_device;
998 at91_clock_associate("usart4_clk", &at91sam9260_uart4_device.dev, "usart");
999 break;
1000 case 5:
1001 configure_usart5_pins();
1002 at91_uarts[i] = &at91sam9260_uart5_device;
1003 at91_clock_associate("usart5_clk", &at91sam9260_uart5_device.dev, "usart");
1004 break;
1005 case 6:
1006 configure_dbgu_pins();
1007 at91_uarts[i] = &at91sam9260_dbgu_device;
1008 at91_clock_associate("mck", &at91sam9260_dbgu_device.dev, "usart");
1009 break;
1010 default:
1011 continue;
1012 }
1013 at91_uarts[i]->id = i; /* update ID number to mapped ID */
1014 }
1015
1016 /* Set serial console device */
1017 if (config->console_tty < ATMEL_MAX_UART)
1018 atmel_default_console_device = at91_uarts[config->console_tty];
1019 if (!atmel_default_console_device)
1020 printk(KERN_INFO "AT91: No default serial console defined.\n");
1021}
1022
1023void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1057void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1024{ 1058{
1025 struct platform_device *pdev; 1059 struct platform_device *pdev;
@@ -1073,8 +1107,6 @@ void __init at91_set_serial_console(unsigned portnr)
1073{ 1107{
1074 if (portnr < ATMEL_MAX_UART) 1108 if (portnr < ATMEL_MAX_UART)
1075 atmel_default_console_device = at91_uarts[portnr]; 1109 atmel_default_console_device = at91_uarts[portnr];
1076 if (!atmel_default_console_device)
1077 printk(KERN_INFO "AT91: No default serial console defined.\n");
1078} 1110}
1079 1111
1080void __init at91_add_device_serial(void) 1112void __init at91_add_device_serial(void)
@@ -1085,9 +1117,11 @@ void __init at91_add_device_serial(void)
1085 if (at91_uarts[i]) 1117 if (at91_uarts[i])
1086 platform_device_register(at91_uarts[i]); 1118 platform_device_register(at91_uarts[i]);
1087 } 1119 }
1120
1121 if (!atmel_default_console_device)
1122 printk(KERN_INFO "AT91: No default serial console defined.\n");
1088} 1123}
1089#else 1124#else
1090void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
1091void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1125void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1092void __init at91_set_serial_console(unsigned portnr) {} 1126void __init at91_set_serial_console(unsigned portnr) {}
1093void __init at91_add_device_serial(void) {} 1127void __init at91_add_device_serial(void) {}
@@ -1103,6 +1137,7 @@ static int __init at91_add_standard_devices(void)
1103{ 1137{
1104 at91_add_device_rtt(); 1138 at91_add_device_rtt();
1105 at91_add_device_watchdog(); 1139 at91_add_device_watchdog();
1140 at91_add_device_tc();
1106 return 0; 1141 return 0;
1107} 1142}
1108 1143
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 90b87e1877d9..35bf6fd52516 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -11,12 +11,14 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/pm.h>
14 15
15#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
17#include <asm/arch/at91sam9261.h> 18#include <asm/arch/at91sam9261.h>
18#include <asm/arch/at91_pmc.h> 19#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h> 20#include <asm/arch/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h>
20 22
21#include "generic.h" 23#include "generic.h"
22#include "clock.h" 24#include "clock.h"
@@ -245,6 +247,11 @@ static void at91sam9261_reset(void)
245 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 247 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
246} 248}
247 249
250static void at91sam9261_poweroff(void)
251{
252 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
253}
254
248 255
249/* -------------------------------------------------------------------- 256/* --------------------------------------------------------------------
250 * AT91SAM9261 processor initialization 257 * AT91SAM9261 processor initialization
@@ -256,6 +263,7 @@ void __init at91sam9261_initialize(unsigned long main_clock)
256 iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); 263 iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
257 264
258 at91_arch_reset = at91sam9261_reset; 265 at91_arch_reset = at91sam9261_reset;
266 pm_power_off = at91sam9261_poweroff;
259 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) 267 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
260 | (1 << AT91SAM9261_ID_IRQ2); 268 | (1 << AT91SAM9261_ID_IRQ2);
261 269
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 245641263fce..37cd547855b1 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -24,7 +24,7 @@
24#include <asm/arch/gpio.h> 24#include <asm/arch/gpio.h>
25#include <asm/arch/at91sam9261.h> 25#include <asm/arch/at91sam9261.h>
26#include <asm/arch/at91sam9261_matrix.h> 26#include <asm/arch/at91sam9261_matrix.h>
27#include <asm/arch/at91sam926x_mc.h> 27#include <asm/arch/at91sam9_smc.h>
28 28
29#include "generic.h" 29#include "generic.h"
30 30
@@ -548,6 +548,55 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
548 548
549 549
550/* -------------------------------------------------------------------- 550/* --------------------------------------------------------------------
551 * Timer/Counter block
552 * -------------------------------------------------------------------- */
553
554#ifdef CONFIG_ATMEL_TCLIB
555
556static struct resource tcb_resources[] = {
557 [0] = {
558 .start = AT91SAM9261_BASE_TCB0,
559 .end = AT91SAM9261_BASE_TCB0 + SZ_16K - 1,
560 .flags = IORESOURCE_MEM,
561 },
562 [1] = {
563 .start = AT91SAM9261_ID_TC0,
564 .end = AT91SAM9261_ID_TC0,
565 .flags = IORESOURCE_IRQ,
566 },
567 [2] = {
568 .start = AT91SAM9261_ID_TC1,
569 .end = AT91SAM9261_ID_TC1,
570 .flags = IORESOURCE_IRQ,
571 },
572 [3] = {
573 .start = AT91SAM9261_ID_TC2,
574 .end = AT91SAM9261_ID_TC2,
575 .flags = IORESOURCE_IRQ,
576 },
577};
578
579static struct platform_device at91sam9261_tcb_device = {
580 .name = "atmel_tcb",
581 .id = 0,
582 .resource = tcb_resources,
583 .num_resources = ARRAY_SIZE(tcb_resources),
584};
585
586static void __init at91_add_device_tc(void)
587{
588 /* this chip has a separate clock and irq for each TC channel */
589 at91_clock_associate("tc0_clk", &at91sam9261_tcb_device.dev, "t0_clk");
590 at91_clock_associate("tc1_clk", &at91sam9261_tcb_device.dev, "t1_clk");
591 at91_clock_associate("tc2_clk", &at91sam9261_tcb_device.dev, "t2_clk");
592 platform_device_register(&at91sam9261_tcb_device);
593}
594#else
595static void __init at91_add_device_tc(void) { }
596#endif
597
598
599/* --------------------------------------------------------------------
551 * RTT 600 * RTT
552 * -------------------------------------------------------------------- */ 601 * -------------------------------------------------------------------- */
553 602
@@ -561,7 +610,7 @@ static struct resource rtt_resources[] = {
561 610
562static struct platform_device at91sam9261_rtt_device = { 611static struct platform_device at91sam9261_rtt_device = {
563 .name = "at91_rtt", 612 .name = "at91_rtt",
564 .id = -1, 613 .id = 0,
565 .resource = rtt_resources, 614 .resource = rtt_resources,
566 .num_resources = ARRAY_SIZE(rtt_resources), 615 .num_resources = ARRAY_SIZE(rtt_resources),
567}; 616};
@@ -938,49 +987,9 @@ static inline void configure_usart2_pins(unsigned pins)
938 at91_set_B_periph(AT91_PIN_PA16, 0); /* CTS2 */ 987 at91_set_B_periph(AT91_PIN_PA16, 0); /* CTS2 */
939} 988}
940 989
941static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 990static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
942struct platform_device *atmel_default_console_device; /* the serial console device */ 991struct platform_device *atmel_default_console_device; /* the serial console device */
943 992
944void __init __deprecated at91_init_serial(struct at91_uart_config *config)
945{
946 int i;
947
948 /* Fill in list of supported UARTs */
949 for (i = 0; i < config->nr_tty; i++) {
950 switch (config->tty_map[i]) {
951 case 0:
952 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
953 at91_uarts[i] = &at91sam9261_uart0_device;
954 at91_clock_associate("usart0_clk", &at91sam9261_uart0_device.dev, "usart");
955 break;
956 case 1:
957 configure_usart1_pins(0);
958 at91_uarts[i] = &at91sam9261_uart1_device;
959 at91_clock_associate("usart1_clk", &at91sam9261_uart1_device.dev, "usart");
960 break;
961 case 2:
962 configure_usart2_pins(0);
963 at91_uarts[i] = &at91sam9261_uart2_device;
964 at91_clock_associate("usart2_clk", &at91sam9261_uart2_device.dev, "usart");
965 break;
966 case 3:
967 configure_dbgu_pins();
968 at91_uarts[i] = &at91sam9261_dbgu_device;
969 at91_clock_associate("mck", &at91sam9261_dbgu_device.dev, "usart");
970 break;
971 default:
972 continue;
973 }
974 at91_uarts[i]->id = i; /* update ID number to mapped ID */
975 }
976
977 /* Set serial console device */
978 if (config->console_tty < ATMEL_MAX_UART)
979 atmel_default_console_device = at91_uarts[config->console_tty];
980 if (!atmel_default_console_device)
981 printk(KERN_INFO "AT91: No default serial console defined.\n");
982}
983
984void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 993void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
985{ 994{
986 struct platform_device *pdev; 995 struct platform_device *pdev;
@@ -1019,8 +1028,6 @@ void __init at91_set_serial_console(unsigned portnr)
1019{ 1028{
1020 if (portnr < ATMEL_MAX_UART) 1029 if (portnr < ATMEL_MAX_UART)
1021 atmel_default_console_device = at91_uarts[portnr]; 1030 atmel_default_console_device = at91_uarts[portnr];
1022 if (!atmel_default_console_device)
1023 printk(KERN_INFO "AT91: No default serial console defined.\n");
1024} 1031}
1025 1032
1026void __init at91_add_device_serial(void) 1033void __init at91_add_device_serial(void)
@@ -1031,9 +1038,11 @@ void __init at91_add_device_serial(void)
1031 if (at91_uarts[i]) 1038 if (at91_uarts[i])
1032 platform_device_register(at91_uarts[i]); 1039 platform_device_register(at91_uarts[i]);
1033 } 1040 }
1041
1042 if (!atmel_default_console_device)
1043 printk(KERN_INFO "AT91: No default serial console defined.\n");
1034} 1044}
1035#else 1045#else
1036void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
1037void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1046void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1038void __init at91_set_serial_console(unsigned portnr) {} 1047void __init at91_set_serial_console(unsigned portnr) {}
1039void __init at91_add_device_serial(void) {} 1048void __init at91_add_device_serial(void) {}
@@ -1050,6 +1059,7 @@ static int __init at91_add_standard_devices(void)
1050{ 1059{
1051 at91_add_device_rtt(); 1060 at91_add_device_rtt();
1052 at91_add_device_watchdog(); 1061 at91_add_device_watchdog();
1062 at91_add_device_tc();
1053 return 0; 1063 return 0;
1054} 1064}
1055 1065
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index a53ba0f74351..052074a9f2d3 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -11,12 +11,14 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/pm.h>
14 15
15#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
17#include <asm/arch/at91sam9263.h> 18#include <asm/arch/at91sam9263.h>
18#include <asm/arch/at91_pmc.h> 19#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h> 20#include <asm/arch/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h>
20 22
21#include "generic.h" 23#include "generic.h"
22#include "clock.h" 24#include "clock.h"
@@ -271,6 +273,11 @@ static void at91sam9263_reset(void)
271 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 273 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
272} 274}
273 275
276static void at91sam9263_poweroff(void)
277{
278 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
279}
280
274 281
275/* -------------------------------------------------------------------- 282/* --------------------------------------------------------------------
276 * AT91SAM9263 processor initialization 283 * AT91SAM9263 processor initialization
@@ -282,6 +289,7 @@ void __init at91sam9263_initialize(unsigned long main_clock)
282 iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc)); 289 iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc));
283 290
284 at91_arch_reset = at91sam9263_reset; 291 at91_arch_reset = at91sam9263_reset;
292 pm_power_off = at91sam9263_poweroff;
285 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); 293 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
286 294
287 /* Init clock subsystem */ 295 /* Init clock subsystem */
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 0b12e1adcc8e..b6454c525962 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -22,8 +22,8 @@
22#include <asm/arch/board.h> 22#include <asm/arch/board.h>
23#include <asm/arch/gpio.h> 23#include <asm/arch/gpio.h>
24#include <asm/arch/at91sam9263.h> 24#include <asm/arch/at91sam9263.h>
25#include <asm/arch/at91sam926x_mc.h>
26#include <asm/arch/at91sam9263_matrix.h> 25#include <asm/arch/at91sam9263_matrix.h>
26#include <asm/arch/at91sam9_smc.h>
27 27
28#include "generic.h" 28#include "generic.h"
29 29
@@ -358,10 +358,15 @@ static struct at91_nand_data nand_data;
358#define NAND_BASE AT91_CHIPSELECT_3 358#define NAND_BASE AT91_CHIPSELECT_3
359 359
360static struct resource nand_resources[] = { 360static struct resource nand_resources[] = {
361 { 361 [0] = {
362 .start = NAND_BASE, 362 .start = NAND_BASE,
363 .end = NAND_BASE + SZ_256M - 1, 363 .end = NAND_BASE + SZ_256M - 1,
364 .flags = IORESOURCE_MEM, 364 .flags = IORESOURCE_MEM,
365 },
366 [1] = {
367 .start = AT91_BASE_SYS + AT91_ECC0,
368 .end = AT91_BASE_SYS + AT91_ECC0 + SZ_512 - 1,
369 .flags = IORESOURCE_MEM,
365 } 370 }
366}; 371};
367 372
@@ -783,6 +788,43 @@ void __init at91_add_device_isi(void) {}
783 788
784 789
785/* -------------------------------------------------------------------- 790/* --------------------------------------------------------------------
791 * Timer/Counter block
792 * -------------------------------------------------------------------- */
793
794#ifdef CONFIG_ATMEL_TCLIB
795
796static struct resource tcb_resources[] = {
797 [0] = {
798 .start = AT91SAM9263_BASE_TCB0,
799 .end = AT91SAM9263_BASE_TCB0 + SZ_16K - 1,
800 .flags = IORESOURCE_MEM,
801 },
802 [1] = {
803 .start = AT91SAM9263_ID_TCB,
804 .end = AT91SAM9263_ID_TCB,
805 .flags = IORESOURCE_IRQ,
806 },
807};
808
809static struct platform_device at91sam9263_tcb_device = {
810 .name = "atmel_tcb",
811 .id = 0,
812 .resource = tcb_resources,
813 .num_resources = ARRAY_SIZE(tcb_resources),
814};
815
816static void __init at91_add_device_tc(void)
817{
818 /* this chip has one clock and irq for all three TC channels */
819 at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk");
820 platform_device_register(&at91sam9263_tcb_device);
821}
822#else
823static void __init at91_add_device_tc(void) { }
824#endif
825
826
827/* --------------------------------------------------------------------
786 * RTT 828 * RTT
787 * -------------------------------------------------------------------- */ 829 * -------------------------------------------------------------------- */
788 830
@@ -933,9 +975,6 @@ static inline void configure_ssc1_pins(unsigned pins)
933} 975}
934 976
935/* 977/*
936 * Return the device node so that board init code can use it as the
937 * parent for the device node reflecting how it's used on this board.
938 *
939 * SSC controllers are accessed through library code, instead of any 978 * SSC controllers are accessed through library code, instead of any
940 * kind of all-singing/all-dancing driver. For example one could be 979 * kind of all-singing/all-dancing driver. For example one could be
941 * used by a particular I2S audio codec's driver, while another one 980 * used by a particular I2S audio codec's driver, while another one
@@ -1146,49 +1185,9 @@ static inline void configure_usart2_pins(unsigned pins)
1146 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ 1185 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */
1147} 1186}
1148 1187
1149static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 1188static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
1150struct platform_device *atmel_default_console_device; /* the serial console device */ 1189struct platform_device *atmel_default_console_device; /* the serial console device */
1151 1190
1152void __init __deprecated at91_init_serial(struct at91_uart_config *config)
1153{
1154 int i;
1155
1156 /* Fill in list of supported UARTs */
1157 for (i = 0; i < config->nr_tty; i++) {
1158 switch (config->tty_map[i]) {
1159 case 0:
1160 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1161 at91_uarts[i] = &at91sam9263_uart0_device;
1162 at91_clock_associate("usart0_clk", &at91sam9263_uart0_device.dev, "usart");
1163 break;
1164 case 1:
1165 configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1166 at91_uarts[i] = &at91sam9263_uart1_device;
1167 at91_clock_associate("usart1_clk", &at91sam9263_uart1_device.dev, "usart");
1168 break;
1169 case 2:
1170 configure_usart2_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
1171 at91_uarts[i] = &at91sam9263_uart2_device;
1172 at91_clock_associate("usart2_clk", &at91sam9263_uart2_device.dev, "usart");
1173 break;
1174 case 3:
1175 configure_dbgu_pins();
1176 at91_uarts[i] = &at91sam9263_dbgu_device;
1177 at91_clock_associate("mck", &at91sam9263_dbgu_device.dev, "usart");
1178 break;
1179 default:
1180 continue;
1181 }
1182 at91_uarts[i]->id = i; /* update ID number to mapped ID */
1183 }
1184
1185 /* Set serial console device */
1186 if (config->console_tty < ATMEL_MAX_UART)
1187 atmel_default_console_device = at91_uarts[config->console_tty];
1188 if (!atmel_default_console_device)
1189 printk(KERN_INFO "AT91: No default serial console defined.\n");
1190}
1191
1192void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1191void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1193{ 1192{
1194 struct platform_device *pdev; 1193 struct platform_device *pdev;
@@ -1227,8 +1226,6 @@ void __init at91_set_serial_console(unsigned portnr)
1227{ 1226{
1228 if (portnr < ATMEL_MAX_UART) 1227 if (portnr < ATMEL_MAX_UART)
1229 atmel_default_console_device = at91_uarts[portnr]; 1228 atmel_default_console_device = at91_uarts[portnr];
1230 if (!atmel_default_console_device)
1231 printk(KERN_INFO "AT91: No default serial console defined.\n");
1232} 1229}
1233 1230
1234void __init at91_add_device_serial(void) 1231void __init at91_add_device_serial(void)
@@ -1239,9 +1236,11 @@ void __init at91_add_device_serial(void)
1239 if (at91_uarts[i]) 1236 if (at91_uarts[i])
1240 platform_device_register(at91_uarts[i]); 1237 platform_device_register(at91_uarts[i]);
1241 } 1238 }
1239
1240 if (!atmel_default_console_device)
1241 printk(KERN_INFO "AT91: No default serial console defined.\n");
1242} 1242}
1243#else 1243#else
1244void __init at91_init_serial(struct at91_uart_config *config) {}
1245void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1244void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1246void __init at91_set_serial_console(unsigned portnr) {} 1245void __init at91_set_serial_console(unsigned portnr) {}
1247void __init at91_add_device_serial(void) {} 1246void __init at91_add_device_serial(void) {}
@@ -1257,6 +1256,7 @@ static int __init at91_add_standard_devices(void)
1257{ 1256{
1258 at91_add_device_rtt(); 1257 at91_add_device_rtt();
1259 at91_add_device_watchdog(); 1258 at91_add_device_watchdog();
1259 at91_add_device_tc();
1260 return 0; 1260 return 0;
1261} 1261}
1262 1262
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index e38d23770992..5cecbd7de6a6 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -1,23 +1,20 @@
1/* 1/*
2 * linux/arch/arm/mach-at91/at91sam926x_time.c 2 * at91sam926x_time.c - Periodic Interval Timer (PIT) for at91sam926x
3 * 3 *
4 * Copyright (C) 2005-2006 M. Amine SAYA, ATMEL Rousset, France 4 * Copyright (C) 2005-2006 M. Amine SAYA, ATMEL Rousset, France
5 * Revision 2005 M. Nicolas Diremdjian, ATMEL Rousset, France 5 * Revision 2005 M. Nicolas Diremdjian, ATMEL Rousset, France
6 * Converted to ClockSource/ClockEvents by David Brownell.
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * 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 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
10 */ 11 */
11
12#include <linux/init.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/clk.h>
17#include <linux/time.h> 16#include <linux/clockchips.h>
18 17
19#include <asm/hardware.h>
20#include <asm/io.h>
21#include <asm/mach/time.h> 18#include <asm/mach/time.h>
22 19
23#include <asm/arch/at91_pit.h> 20#include <asm/arch/at91_pit.h>
@@ -26,85 +23,167 @@
26#define PIT_CPIV(x) ((x) & AT91_PIT_CPIV) 23#define PIT_CPIV(x) ((x) & AT91_PIT_CPIV)
27#define PIT_PICNT(x) (((x) & AT91_PIT_PICNT) >> 20) 24#define PIT_PICNT(x) (((x) & AT91_PIT_PICNT) >> 20)
28 25
26static u32 pit_cycle; /* write-once */
27static u32 pit_cnt; /* access only w/system irq blocked */
28
29
29/* 30/*
30 * Returns number of microseconds since last timer interrupt. Note that interrupts 31 * Clocksource: just a monotonic counter of MCK/16 cycles.
31 * will have been disabled by do_gettimeofday() 32 * We don't care whether or not PIT irqs are enabled.
32 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
33 */ 33 */
34static unsigned long at91sam926x_gettimeoffset(void) 34static cycle_t read_pit_clk(void)
35{ 35{
36 unsigned long elapsed; 36 unsigned long flags;
37 unsigned long t = at91_sys_read(AT91_PIT_PIIR); 37 u32 elapsed;
38 u32 t;
39
40 raw_local_irq_save(flags);
41 elapsed = pit_cnt;
42 t = at91_sys_read(AT91_PIT_PIIR);
43 raw_local_irq_restore(flags);
44
45 elapsed += PIT_PICNT(t) * pit_cycle;
46 elapsed += PIT_CPIV(t);
47 return elapsed;
48}
49
50static struct clocksource pit_clk = {
51 .name = "pit",
52 .rating = 175,
53 .read = read_pit_clk,
54 .shift = 20,
55 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
56};
38 57
39 elapsed = (PIT_PICNT(t) * LATCH) + PIT_CPIV(t); /* hardware clock cycles */
40 58
41 return (unsigned long)(elapsed * jiffies_to_usecs(1)) / LATCH; 59/*
60 * Clockevent device: interrupts every 1/HZ (== pit_cycles * MCK/16)
61 */
62static void
63pit_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev)
64{
65 unsigned long flags;
66
67 switch (mode) {
68 case CLOCK_EVT_MODE_PERIODIC:
69 /* update clocksource counter, then enable the IRQ */
70 raw_local_irq_save(flags);
71 pit_cnt += pit_cycle * PIT_PICNT(at91_sys_read(AT91_PIT_PIVR));
72 at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN
73 | AT91_PIT_PITIEN);
74 raw_local_irq_restore(flags);
75 break;
76 case CLOCK_EVT_MODE_ONESHOT:
77 BUG();
78 /* FALLTHROUGH */
79 case CLOCK_EVT_MODE_SHUTDOWN:
80 case CLOCK_EVT_MODE_UNUSED:
81 /* disable irq, leaving the clocksource active */
82 at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
83 break;
84 case CLOCK_EVT_MODE_RESUME:
85 break;
86 }
42} 87}
43 88
89static struct clock_event_device pit_clkevt = {
90 .name = "pit",
91 .features = CLOCK_EVT_FEAT_PERIODIC,
92 .shift = 32,
93 .rating = 100,
94 .cpumask = CPU_MASK_CPU0,
95 .set_mode = pit_clkevt_mode,
96};
97
98
44/* 99/*
45 * IRQ handler for the timer. 100 * IRQ handler for the timer.
46 */ 101 */
47static irqreturn_t at91sam926x_timer_interrupt(int irq, void *dev_id) 102static irqreturn_t at91sam926x_pit_interrupt(int irq, void *dev_id)
48{ 103{
49 volatile long nr_ticks;
50 104
51 if (at91_sys_read(AT91_PIT_SR) & AT91_PIT_PITS) { /* This is a shared interrupt */ 105 /* The PIT interrupt may be disabled, and is shared */
52 /* Get number to ticks performed before interrupt and clear PIT interrupt */ 106 if ((pit_clkevt.mode == CLOCK_EVT_MODE_PERIODIC)
107 && (at91_sys_read(AT91_PIT_SR) & AT91_PIT_PITS)) {
108 unsigned nr_ticks;
109
110 /* Get number of ticks performed before irq, and ack it */
53 nr_ticks = PIT_PICNT(at91_sys_read(AT91_PIT_PIVR)); 111 nr_ticks = PIT_PICNT(at91_sys_read(AT91_PIT_PIVR));
54 do { 112 do {
55 timer_tick(); 113 pit_cnt += pit_cycle;
114 pit_clkevt.event_handler(&pit_clkevt);
56 nr_ticks--; 115 nr_ticks--;
57 } while (nr_ticks); 116 } while (nr_ticks);
58 117
59 return IRQ_HANDLED; 118 return IRQ_HANDLED;
60 } else 119 }
61 return IRQ_NONE; /* not handled */ 120
121 return IRQ_NONE;
62} 122}
63 123
64static struct irqaction at91sam926x_timer_irq = { 124static struct irqaction at91sam926x_pit_irq = {
65 .name = "at91_tick", 125 .name = "at91_tick",
66 .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 126 .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
67 .handler = at91sam926x_timer_interrupt 127 .handler = at91sam926x_pit_interrupt
68}; 128};
69 129
70void at91sam926x_timer_reset(void) 130static void at91sam926x_pit_reset(void)
71{ 131{
72 /* Disable timer */ 132 /* Disable timer and irqs */
73 at91_sys_write(AT91_PIT_MR, 0); 133 at91_sys_write(AT91_PIT_MR, 0);
74 134
75 /* Clear any pending interrupts */ 135 /* Clear any pending interrupts, wait for PIT to stop counting */
76 (void) at91_sys_read(AT91_PIT_PIVR); 136 while (PIT_CPIV(at91_sys_read(AT91_PIT_PIVR)) != 0)
137 cpu_relax();
77 138
78 /* Set Period Interval timer and enable its interrupt */ 139 /* Start PIT but don't enable IRQ */
79 at91_sys_write(AT91_PIT_MR, (LATCH & AT91_PIT_PIV) | AT91_PIT_PITIEN | AT91_PIT_PITEN); 140 at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
80} 141}
81 142
82/* 143/*
83 * Set up timer interrupt. 144 * Set up both clocksource and clockevent support.
84 */ 145 */
85void __init at91sam926x_timer_init(void) 146static void __init at91sam926x_pit_init(void)
86{ 147{
87 /* Initialize and enable the timer */ 148 unsigned long pit_rate;
88 at91sam926x_timer_reset(); 149 unsigned bits;
150
151 /*
152 * Use our actual MCK to figure out how many MCK/16 ticks per
153 * 1/HZ period (instead of a compile-time constant LATCH).
154 */
155 pit_rate = clk_get_rate(clk_get(NULL, "mck")) / 16;
156 pit_cycle = (pit_rate + HZ/2) / HZ;
157 WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0);
89 158
90 /* Make IRQs happen for the system timer. */ 159 /* Initialize and enable the timer */
91 setup_irq(AT91_ID_SYS, &at91sam926x_timer_irq); 160 at91sam926x_pit_reset();
161
162 /*
163 * Register clocksource. The high order bits of PIV are unused,
164 * so this isn't a 32-bit counter unless we get clockevent irqs.
165 */
166 pit_clk.mult = clocksource_hz2mult(pit_rate, pit_clk.shift);
167 bits = 12 /* PICNT */ + ilog2(pit_cycle) /* PIV */;
168 pit_clk.mask = CLOCKSOURCE_MASK(bits);
169 clocksource_register(&pit_clk);
170
171 /* Set up irq handler */
172 setup_irq(AT91_ID_SYS, &at91sam926x_pit_irq);
173
174 /* Set up and register clockevents */
175 pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift);
176 clockevents_register_device(&pit_clkevt);
92} 177}
93 178
94#ifdef CONFIG_PM 179static void at91sam926x_pit_suspend(void)
95static void at91sam926x_timer_suspend(void)
96{ 180{
97 /* Disable timer */ 181 /* Disable timer */
98 at91_sys_write(AT91_PIT_MR, 0); 182 at91_sys_write(AT91_PIT_MR, 0);
99} 183}
100#else
101#define at91sam926x_timer_suspend NULL
102#endif
103 184
104struct sys_timer at91sam926x_timer = { 185struct sys_timer at91sam926x_timer = {
105 .init = at91sam926x_timer_init, 186 .init = at91sam926x_pit_init,
106 .offset = at91sam926x_gettimeoffset, 187 .suspend = at91sam926x_pit_suspend,
107 .suspend = at91sam926x_timer_suspend, 188 .resume = at91sam926x_pit_reset,
108 .resume = at91sam926x_timer_reset,
109}; 189};
110
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 4813a35f6cf5..902c79893ec7 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/pm.h>
13 14
14#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
15#include <asm/mach/map.h> 16#include <asm/mach/map.h>
@@ -17,6 +18,7 @@
17#include <asm/arch/at91sam9rl.h> 18#include <asm/arch/at91sam9rl.h>
18#include <asm/arch/at91_pmc.h> 19#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h> 20#include <asm/arch/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h>
20 22
21#include "generic.h" 23#include "generic.h"
22#include "clock.h" 24#include "clock.h"
@@ -244,6 +246,11 @@ static void at91sam9rl_reset(void)
244 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 246 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
245} 247}
246 248
249static void at91sam9rl_poweroff(void)
250{
251 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
252}
253
247 254
248/* -------------------------------------------------------------------- 255/* --------------------------------------------------------------------
249 * AT91SAM9RL processor initialization 256 * AT91SAM9RL processor initialization
@@ -274,6 +281,7 @@ void __init at91sam9rl_initialize(unsigned long main_clock)
274 iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); 281 iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
275 282
276 at91_arch_reset = at91sam9rl_reset; 283 at91_arch_reset = at91sam9rl_reset;
284 pm_power_off = at91sam9rl_poweroff;
277 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); 285 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
278 286
279 /* Init clock subsystem */ 287 /* Init clock subsystem */
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index f43b5c33e45d..dbb9a5fc2090 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -20,7 +20,7 @@
20#include <asm/arch/gpio.h> 20#include <asm/arch/gpio.h>
21#include <asm/arch/at91sam9rl.h> 21#include <asm/arch/at91sam9rl.h>
22#include <asm/arch/at91sam9rl_matrix.h> 22#include <asm/arch/at91sam9rl_matrix.h>
23#include <asm/arch/at91sam926x_mc.h> 23#include <asm/arch/at91sam9_smc.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
@@ -105,10 +105,15 @@ static struct at91_nand_data nand_data;
105#define NAND_BASE AT91_CHIPSELECT_3 105#define NAND_BASE AT91_CHIPSELECT_3
106 106
107static struct resource nand_resources[] = { 107static struct resource nand_resources[] = {
108 { 108 [0] = {
109 .start = NAND_BASE, 109 .start = NAND_BASE,
110 .end = NAND_BASE + SZ_256M - 1, 110 .end = NAND_BASE + SZ_256M - 1,
111 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
112 },
113 [1] = {
114 .start = AT91_BASE_SYS + AT91_ECC,
115 .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1,
116 .flags = IORESOURCE_MEM,
112 } 117 }
113}; 118};
114 119
@@ -385,6 +390,55 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
385 390
386 391
387/* -------------------------------------------------------------------- 392/* --------------------------------------------------------------------
393 * Timer/Counter block
394 * -------------------------------------------------------------------- */
395
396#ifdef CONFIG_ATMEL_TCLIB
397
398static struct resource tcb_resources[] = {
399 [0] = {
400 .start = AT91SAM9RL_BASE_TCB0,
401 .end = AT91SAM9RL_BASE_TCB0 + SZ_16K - 1,
402 .flags = IORESOURCE_MEM,
403 },
404 [1] = {
405 .start = AT91SAM9RL_ID_TC0,
406 .end = AT91SAM9RL_ID_TC0,
407 .flags = IORESOURCE_IRQ,
408 },
409 [2] = {
410 .start = AT91SAM9RL_ID_TC1,
411 .end = AT91SAM9RL_ID_TC1,
412 .flags = IORESOURCE_IRQ,
413 },
414 [3] = {
415 .start = AT91SAM9RL_ID_TC2,
416 .end = AT91SAM9RL_ID_TC2,
417 .flags = IORESOURCE_IRQ,
418 },
419};
420
421static struct platform_device at91sam9rl_tcb_device = {
422 .name = "atmel_tcb",
423 .id = 0,
424 .resource = tcb_resources,
425 .num_resources = ARRAY_SIZE(tcb_resources),
426};
427
428static void __init at91_add_device_tc(void)
429{
430 /* this chip has a separate clock and irq for each TC channel */
431 at91_clock_associate("tc0_clk", &at91sam9rl_tcb_device.dev, "t0_clk");
432 at91_clock_associate("tc1_clk", &at91sam9rl_tcb_device.dev, "t1_clk");
433 at91_clock_associate("tc2_clk", &at91sam9rl_tcb_device.dev, "t2_clk");
434 platform_device_register(&at91sam9rl_tcb_device);
435}
436#else
437static void __init at91_add_device_tc(void) { }
438#endif
439
440
441/* --------------------------------------------------------------------
388 * RTC 442 * RTC
389 * -------------------------------------------------------------------- */ 443 * -------------------------------------------------------------------- */
390 444
@@ -418,7 +472,7 @@ static struct resource rtt_resources[] = {
418 472
419static struct platform_device at91sam9rl_rtt_device = { 473static struct platform_device at91sam9rl_rtt_device = {
420 .name = "at91_rtt", 474 .name = "at91_rtt",
421 .id = -1, 475 .id = 0,
422 .resource = rtt_resources, 476 .resource = rtt_resources,
423 .num_resources = ARRAY_SIZE(rtt_resources), 477 .num_resources = ARRAY_SIZE(rtt_resources),
424}; 478};
@@ -539,9 +593,6 @@ static inline void configure_ssc1_pins(unsigned pins)
539} 593}
540 594
541/* 595/*
542 * Return the device node so that board init code can use it as the
543 * parent for the device node reflecting how it's used on this board.
544 *
545 * SSC controllers are accessed through library code, instead of any 596 * SSC controllers are accessed through library code, instead of any
546 * kind of all-singing/all-dancing driver. For example one could be 597 * kind of all-singing/all-dancing driver. For example one could be
547 * used by a particular I2S audio codec's driver, while another one 598 * used by a particular I2S audio codec's driver, while another one
@@ -802,54 +853,9 @@ static inline void configure_usart3_pins(unsigned pins)
802 at91_set_B_periph(AT91_PIN_PD3, 0); /* CTS3 */ 853 at91_set_B_periph(AT91_PIN_PD3, 0); /* CTS3 */
803} 854}
804 855
805static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 856static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
806struct platform_device *atmel_default_console_device; /* the serial console device */ 857struct platform_device *atmel_default_console_device; /* the serial console device */
807 858
808void __init __deprecated at91_init_serial(struct at91_uart_config *config)
809{
810 int i;
811
812 /* Fill in list of supported UARTs */
813 for (i = 0; i < config->nr_tty; i++) {
814 switch (config->tty_map[i]) {
815 case 0:
816 configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS);
817 at91_uarts[i] = &at91sam9rl_uart0_device;
818 at91_clock_associate("usart0_clk", &at91sam9rl_uart0_device.dev, "usart");
819 break;
820 case 1:
821 configure_usart1_pins(0);
822 at91_uarts[i] = &at91sam9rl_uart1_device;
823 at91_clock_associate("usart1_clk", &at91sam9rl_uart1_device.dev, "usart");
824 break;
825 case 2:
826 configure_usart2_pins(0);
827 at91_uarts[i] = &at91sam9rl_uart2_device;
828 at91_clock_associate("usart2_clk", &at91sam9rl_uart2_device.dev, "usart");
829 break;
830 case 3:
831 configure_usart3_pins(0);
832 at91_uarts[i] = &at91sam9rl_uart3_device;
833 at91_clock_associate("usart3_clk", &at91sam9rl_uart3_device.dev, "usart");
834 break;
835 case 4:
836 configure_dbgu_pins();
837 at91_uarts[i] = &at91sam9rl_dbgu_device;
838 at91_clock_associate("mck", &at91sam9rl_dbgu_device.dev, "usart");
839 break;
840 default:
841 continue;
842 }
843 at91_uarts[i]->id = i; /* update ID number to mapped ID */
844 }
845
846 /* Set serial console device */
847 if (config->console_tty < ATMEL_MAX_UART)
848 atmel_default_console_device = at91_uarts[config->console_tty];
849 if (!atmel_default_console_device)
850 printk(KERN_INFO "AT91: No default serial console defined.\n");
851}
852
853void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 859void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
854{ 860{
855 struct platform_device *pdev; 861 struct platform_device *pdev;
@@ -893,8 +899,6 @@ void __init at91_set_serial_console(unsigned portnr)
893{ 899{
894 if (portnr < ATMEL_MAX_UART) 900 if (portnr < ATMEL_MAX_UART)
895 atmel_default_console_device = at91_uarts[portnr]; 901 atmel_default_console_device = at91_uarts[portnr];
896 if (!atmel_default_console_device)
897 printk(KERN_INFO "AT91: No default serial console defined.\n");
898} 902}
899 903
900void __init at91_add_device_serial(void) 904void __init at91_add_device_serial(void)
@@ -905,9 +909,11 @@ void __init at91_add_device_serial(void)
905 if (at91_uarts[i]) 909 if (at91_uarts[i])
906 platform_device_register(at91_uarts[i]); 910 platform_device_register(at91_uarts[i]);
907 } 911 }
912
913 if (!atmel_default_console_device)
914 printk(KERN_INFO "AT91: No default serial console defined.\n");
908} 915}
909#else 916#else
910void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
911void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 917void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
912void __init at91_set_serial_console(unsigned portnr) {} 918void __init at91_set_serial_console(unsigned portnr) {}
913void __init at91_add_device_serial(void) {} 919void __init at91_add_device_serial(void) {}
@@ -925,6 +931,7 @@ static int __init at91_add_standard_devices(void)
925 at91_add_device_rtc(); 931 at91_add_device_rtc();
926 at91_add_device_rtt(); 932 at91_add_device_rtt();
927 at91_add_device_watchdog(); 933 at91_add_device_watchdog();
934 at91_add_device_tc();
928 return 0; 935 return 0;
929} 936}
930 937
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
new file mode 100644
index 000000000000..b22a1a004055
--- /dev/null
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -0,0 +1,180 @@
1/*
2 * KwikByte CAM60 (KB9260)
3 *
4 * based on board-sam9260ek.c
5 * Copyright (C) 2005 SAN People
6 * Copyright (C) 2006 Atmel
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/types.h>
24#include <linux/init.h>
25#include <linux/mm.h>
26#include <linux/module.h>
27#include <linux/platform_device.h>
28#include <linux/spi/spi.h>
29#include <linux/spi/flash.h>
30
31#include <asm/hardware.h>
32#include <asm/setup.h>
33#include <asm/mach-types.h>
34#include <asm/irq.h>
35
36#include <asm/mach/arch.h>
37#include <asm/mach/map.h>
38#include <asm/mach/irq.h>
39
40#include <asm/arch/board.h>
41#include <asm/arch/gpio.h>
42
43#include "generic.h"
44
45
46static void __init cam60_map_io(void)
47{
48 /* Initialize processor: 10 MHz crystal */
49 at91sam9260_initialize(10000000);
50
51 /* DGBU on ttyS0. (Rx & Tx only) */
52 at91_register_uart(0, 0, 0);
53
54 /* set serial console to ttyS0 (ie, DBGU) */
55 at91_set_serial_console(0);
56}
57
58static void __init cam60_init_irq(void)
59{
60 at91sam9260_init_interrupts(NULL);
61}
62
63
64/*
65 * USB Host
66 */
67static struct at91_usbh_data __initdata cam60_usbh_data = {
68 .ports = 1,
69};
70
71
72/*
73 * SPI devices.
74 */
75#if defined(CONFIG_MTD_DATAFLASH)
76static struct mtd_partition __initdata cam60_spi_partitions[] = {
77 {
78 .name = "BOOT1",
79 .offset = 0,
80 .size = 4 * 1056,
81 },
82 {
83 .name = "BOOT2",
84 .offset = MTDPART_OFS_NXTBLK,
85 .size = 256 * 1056,
86 },
87 {
88 .name = "kernel",
89 .offset = MTDPART_OFS_NXTBLK,
90 .size = 2222 * 1056,
91 },
92 {
93 .name = "file system",
94 .offset = MTDPART_OFS_NXTBLK,
95 .size = MTDPART_SIZ_FULL,
96 },
97};
98
99static struct flash_platform_data __initdata cam60_spi_flash_platform_data = {
100 .name = "spi_flash",
101 .parts = cam60_spi_partitions,
102 .nr_parts = ARRAY_SIZE(cam60_spi_partitions)
103};
104#endif
105
106static struct spi_board_info cam60_spi_devices[] = {
107#if defined(CONFIG_MTD_DATAFLASH)
108 { /* DataFlash chip */
109 .modalias = "mtd_dataflash",
110 .chip_select = 0,
111 .max_speed_hz = 15 * 1000 * 1000,
112 .bus_num = 0,
113 .platform_data = &cam60_spi_flash_platform_data
114 },
115#endif
116};
117
118
119/*
120 * MACB Ethernet device
121 */
122static struct __initdata at91_eth_data cam60_macb_data = {
123 .phy_irq_pin = AT91_PIN_PB5,
124 .is_rmii = 0,
125};
126
127
128/*
129 * NAND Flash
130 */
131static struct mtd_partition __initdata cam60_nand_partition[] = {
132 {
133 .name = "nand_fs",
134 .offset = 0,
135 .size = MTDPART_SIZ_FULL,
136 },
137};
138
139static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
140{
141 *num_partitions = ARRAY_SIZE(cam60_nand_partition);
142 return cam60_nand_partition;
143}
144
145static struct at91_nand_data __initdata cam60_nand_data = {
146 .ale = 21,
147 .cle = 22,
148 // .det_pin = ... not there
149 .rdy_pin = AT91_PIN_PA9,
150 .enable_pin = AT91_PIN_PA7,
151 .partition_info = nand_partitions,
152};
153
154
155static void __init cam60_board_init(void)
156{
157 /* Serial */
158 at91_add_device_serial();
159 /* SPI */
160 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
161 /* Ethernet */
162 at91_add_device_eth(&cam60_macb_data);
163 /* USB Host */
164 /* enable USB power supply circuit */
165 at91_set_gpio_output(AT91_PIN_PB18, 1);
166 at91_add_device_usbh(&cam60_usbh_data);
167 /* NAND */
168 at91_add_device_nand(&cam60_nand_data);
169}
170
171MACHINE_START(CAM60, "KwikByte CAM60")
172 /* Maintainer: KwikByte */
173 .phys_io = AT91_BASE_SYS,
174 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
175 .boot_params = AT91_SDRAM_BASE + 0x100,
176 .timer = &at91sam926x_timer,
177 .map_io = cam60_map_io,
178 .init_irq = cam60_init_irq,
179 .init_machine = cam60_board_init,
180MACHINE_END
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index 185437131541..e5512d1ff217 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -45,7 +45,7 @@
45#include <asm/arch/board.h> 45#include <asm/arch/board.h>
46#include <asm/arch/gpio.h> 46#include <asm/arch/gpio.h>
47#include <asm/arch/at91cap9_matrix.h> 47#include <asm/arch/at91cap9_matrix.h>
48#include <asm/arch/at91sam926x_mc.h> 48#include <asm/arch/at91sam9_smc.h>
49 49
50#include "generic.h" 50#include "generic.h"
51 51
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 0e2a11fc5bbd..26fea4dcc3a0 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -43,17 +43,6 @@
43#include "generic.h" 43#include "generic.h"
44 44
45 45
46/*
47 * Serial port configuration.
48 * 0 .. 3 = USART0 .. USART3
49 * 4 = DBGU
50 */
51static struct at91_uart_config __initdata csb337_uart_config = {
52 .console_tty = 0, /* ttyS0 */
53 .nr_tty = 2,
54 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
55};
56
57static void __init csb337_map_io(void) 46static void __init csb337_map_io(void)
58{ 47{
59 /* Initialize processor: 3.6864 MHz crystal */ 48 /* Initialize processor: 3.6864 MHz crystal */
@@ -62,8 +51,11 @@ static void __init csb337_map_io(void)
62 /* Setup the LEDs */ 51 /* Setup the LEDs */
63 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); 52 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
64 53
65 /* Setup the serial ports and console */ 54 /* DBGU on ttyS0 */
66 at91_init_serial(&csb337_uart_config); 55 at91_register_uart(0, 0, 0);
56
57 /* make console=ttyS0 the default */
58 at91_set_serial_console(0);
67} 59}
68 60
69static void __init csb337_init_irq(void) 61static void __init csb337_init_irq(void)
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index c5c721d27f42..419fd19b620b 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -40,27 +40,16 @@
40#include "generic.h" 40#include "generic.h"
41 41
42 42
43/*
44 * Serial port configuration.
45 * 0 .. 3 = USART0 .. USART3
46 * 4 = DBGU
47 */
48static struct at91_uart_config __initdata csb637_uart_config = {
49 .console_tty = 0, /* ttyS0 */
50 .nr_tty = 2,
51 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
52};
53
54static void __init csb637_map_io(void) 43static void __init csb637_map_io(void)
55{ 44{
56 /* Initialize processor: 3.6864 MHz crystal */ 45 /* Initialize processor: 3.6864 MHz crystal */
57 at91rm9200_initialize(3686400, AT91RM9200_BGA); 46 at91rm9200_initialize(3686400, AT91RM9200_BGA);
58 47
59 /* Setup the LEDs */ 48 /* DBGU on ttyS0 */
60 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); 49 at91_register_uart(0, 0, 0);
61 50
62 /* Setup the serial ports and console */ 51 /* make console=ttyS0 the default */
63 at91_init_serial(&csb637_uart_config); 52 at91_set_serial_console(0);
64} 53}
65 54
66static void __init csb637_init_irq(void) 55static void __init csb637_init_irq(void)
@@ -118,8 +107,19 @@ static struct platform_device csb_flash = {
118 .num_resources = ARRAY_SIZE(csb_flash_resources), 107 .num_resources = ARRAY_SIZE(csb_flash_resources),
119}; 108};
120 109
110static struct gpio_led csb_leds[] = {
111 { /* "d1", red */
112 .name = "d1",
113 .gpio = AT91_PIN_PB2,
114 .active_low = 1,
115 .default_trigger = "heartbeat",
116 },
117};
118
121static void __init csb637_board_init(void) 119static void __init csb637_board_init(void)
122{ 120{
121 /* LED(s) */
122 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
123 /* Serial */ 123 /* Serial */
124 at91_add_device_serial(); 124 at91_add_device_serial();
125 /* Ethernet */ 125 /* Ethernet */
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
new file mode 100644
index 000000000000..e77fad443835
--- /dev/null
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -0,0 +1,178 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/board-ecbat91.c
3 * Copyright (C) 2007 emQbit.com.
4 *
5 * We started from board-dk.c, which is Copyright (C) 2005 SAN People.
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/init.h>
24#include <linux/mm.h>
25#include <linux/module.h>
26#include <linux/platform_device.h>
27#include <linux/spi/spi.h>
28#include <linux/spi/flash.h>
29
30#include <asm/hardware.h>
31#include <asm/setup.h>
32#include <asm/mach-types.h>
33#include <asm/irq.h>
34
35#include <asm/mach/arch.h>
36#include <asm/mach/map.h>
37#include <asm/mach/irq.h>
38
39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
41
42#include "generic.h"
43
44
45static void __init ecb_at91map_io(void)
46{
47 /* Initialize processor: 18.432 MHz crystal */
48 at91rm9200_initialize(18432000, AT91RM9200_PQFP);
49
50 /* Setup the LEDs */
51 at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
52
53 /* DBGU on ttyS0. (Rx & Tx only) */
54 at91_register_uart(0, 0, 0);
55
56 /* USART0 on ttyS1. (Rx & Tx only) */
57 at91_register_uart(AT91RM9200_ID_US0, 1, 0);
58
59 /* set serial console to ttyS0 (ie, DBGU) */
60 at91_set_serial_console(0);
61}
62
63static void __init ecb_at91init_irq(void)
64{
65 at91rm9200_init_interrupts(NULL);
66}
67
68static struct at91_eth_data __initdata ecb_at91eth_data = {
69 .phy_irq_pin = AT91_PIN_PC4,
70 .is_rmii = 0,
71};
72
73static struct at91_usbh_data __initdata ecb_at91usbh_data = {
74 .ports = 1,
75};
76
77static struct at91_mmc_data __initdata ecb_at91mmc_data = {
78 .slot_b = 0,
79 .wire4 = 1,
80};
81
82
83#if defined(CONFIG_MTD_DATAFLASH)
84static struct mtd_partition __initdata my_flash0_partitions[] =
85{
86 { /* 0x8400 */
87 .name = "Darrell-loader",
88 .offset = 0,
89 .size = 12* 1056,
90 },
91 {
92 .name = "U-boot",
93 .offset = MTDPART_OFS_NXTBLK,
94 .size = 110 * 1056,
95 },
96 { /* 1336 (167 blocks) pages * 1056 bytes = 0x158700 bytes */
97 .name = "UBoot-env",
98 .offset = MTDPART_OFS_NXTBLK,
99 .size = 8 * 1056,
100 },
101 { /* 1336 (167 blocks) pages * 1056 bytes = 0x158700 bytes */
102 .name = "Kernel",
103 .offset = MTDPART_OFS_NXTBLK,
104 .size = 1534 * 1056,
105 },
106 { /* 190200 - jffs2 root filesystem */
107 .name = "Filesystem",
108 .offset = MTDPART_OFS_NXTBLK,
109 .size = MTDPART_SIZ_FULL, /* 26 sectors */
110 }
111};
112
113static struct flash_platform_data __initdata my_flash0_platform = {
114 .name = "Removable flash card",
115 .parts = my_flash0_partitions,
116 .nr_parts = ARRAY_SIZE(my_flash0_partitions)
117};
118
119#endif
120
121static struct spi_board_info __initdata ecb_at91spi_devices[] = {
122 { /* DataFlash chip */
123 .modalias = "mtd_dataflash",
124 .chip_select = 0,
125 .max_speed_hz = 10 * 1000 * 1000,
126 .bus_num = 0,
127#if defined(CONFIG_MTD_DATAFLASH)
128 .platform_data = &my_flash0_platform,
129#endif
130 },
131 { /* User accessable spi - cs1 (250KHz) */
132 .modalias = "spi-cs1",
133 .chip_select = 1,
134 .max_speed_hz = 250 * 1000,
135 },
136 { /* User accessable spi - cs2 (1MHz) */
137 .modalias = "spi-cs2",
138 .chip_select = 2,
139 .max_speed_hz = 1 * 1000 * 1000,
140 },
141 { /* User accessable spi - cs3 (10MHz) */
142 .modalias = "spi-cs3",
143 .chip_select = 3,
144 .max_speed_hz = 10 * 1000 * 1000,
145 },
146};
147
148static void __init ecb_at91board_init(void)
149{
150 /* Serial */
151 at91_add_device_serial();
152
153 /* Ethernet */
154 at91_add_device_eth(&ecb_at91eth_data);
155
156 /* USB Host */
157 at91_add_device_usbh(&ecb_at91usbh_data);
158
159 /* I2C */
160 at91_add_device_i2c(NULL, 0);
161
162 /* MMC */
163 at91_add_device_mmc(0, &ecb_at91mmc_data);
164
165 /* SPI */
166 at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));
167}
168
169MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
170 /* Maintainer: emQbit.com */
171 .phys_io = AT91_BASE_SYS,
172 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
173 .boot_params = AT91_SDRAM_BASE + 0x100,
174 .timer = &at91rm9200_timer,
175 .map_io = ecb_at91map_io,
176 .init_irq = ecb_at91init_irq,
177 .init_machine = ecb_at91board_init,
178MACHINE_END
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
new file mode 100644
index 000000000000..8f76af5e219a
--- /dev/null
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -0,0 +1,199 @@
1/*
2 * linux/arch/arm/mach-at91/board-sam9-l9260.c
3 *
4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2006 Atmel
6 * Copyright (C) 2007 Olimex Ltd
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/types.h>
24#include <linux/init.h>
25#include <linux/mm.h>
26#include <linux/module.h>
27#include <linux/platform_device.h>
28#include <linux/spi/spi.h>
29
30#include <asm/hardware.h>
31#include <asm/setup.h>
32#include <asm/mach-types.h>
33#include <asm/irq.h>
34
35#include <asm/mach/arch.h>
36#include <asm/mach/map.h>
37#include <asm/mach/irq.h>
38
39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
41
42#include "generic.h"
43
44
45static void __init ek_map_io(void)
46{
47 /* Initialize processor: 18.432 MHz crystal */
48 at91sam9260_initialize(18432000);
49
50 /* Setup the LEDs */
51 at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
52
53 /* DBGU on ttyS0. (Rx & Tx only) */
54 at91_register_uart(0, 0, 0);
55
56 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
57 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
58 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
59 | ATMEL_UART_RI);
60
61 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
62 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
63
64 /* set serial console to ttyS0 (ie, DBGU) */
65 at91_set_serial_console(0);
66}
67
68static void __init ek_init_irq(void)
69{
70 at91sam9260_init_interrupts(NULL);
71}
72
73
74/*
75 * USB Host port
76 */
77static struct at91_usbh_data __initdata ek_usbh_data = {
78 .ports = 2,
79};
80
81/*
82 * USB Device port
83 */
84static struct at91_udc_data __initdata ek_udc_data = {
85 .vbus_pin = AT91_PIN_PC5,
86 .pullup_pin = 0, /* pull-up driven by UDC */
87};
88
89
90/*
91 * SPI devices.
92 */
93static struct spi_board_info ek_spi_devices[] = {
94#if !defined(CONFIG_MMC_AT91)
95 { /* DataFlash chip */
96 .modalias = "mtd_dataflash",
97 .chip_select = 1,
98 .max_speed_hz = 15 * 1000 * 1000,
99 .bus_num = 0,
100 },
101#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
102 { /* DataFlash card */
103 .modalias = "mtd_dataflash",
104 .chip_select = 0,
105 .max_speed_hz = 15 * 1000 * 1000,
106 .bus_num = 0,
107 },
108#endif
109#endif
110};
111
112
113/*
114 * MACB Ethernet device
115 */
116static struct at91_eth_data __initdata ek_macb_data = {
117 .phy_irq_pin = AT91_PIN_PA7,
118 .is_rmii = 0,
119};
120
121
122/*
123 * NAND flash
124 */
125static struct mtd_partition __initdata ek_nand_partition[] = {
126 {
127 .name = "Bootloader Area",
128 .offset = 0,
129 .size = 10 * 1024 * 1024,
130 },
131 {
132 .name = "User Area",
133 .offset = 10 * 1024 * 1024,
134 .size = MTDPART_SIZ_FULL,
135 },
136};
137
138static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
139{
140 *num_partitions = ARRAY_SIZE(ek_nand_partition);
141 return ek_nand_partition;
142}
143
144static struct at91_nand_data __initdata ek_nand_data = {
145 .ale = 21,
146 .cle = 22,
147// .det_pin = ... not connected
148 .rdy_pin = AT91_PIN_PC13,
149 .enable_pin = AT91_PIN_PC14,
150 .partition_info = nand_partitions,
151#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
152 .bus_width_16 = 1,
153#else
154 .bus_width_16 = 0,
155#endif
156};
157
158
159/*
160 * MCI (SD/MMC)
161 */
162static struct at91_mmc_data __initdata ek_mmc_data = {
163 .slot_b = 1,
164 .wire4 = 1,
165 .det_pin = AT91_PIN_PC8,
166 .wp_pin = AT91_PIN_PC4,
167// .vcc_pin = ... not connected
168};
169
170static void __init ek_board_init(void)
171{
172 /* Serial */
173 at91_add_device_serial();
174 /* USB Host */
175 at91_add_device_usbh(&ek_usbh_data);
176 /* USB Device */
177 at91_add_device_udc(&ek_udc_data);
178 /* SPI */
179 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
180 /* NAND */
181 at91_add_device_nand(&ek_nand_data);
182 /* Ethernet */
183 at91_add_device_eth(&ek_macb_data);
184 /* MMC */
185 at91_add_device_mmc(0, &ek_mmc_data);
186 /* I2C */
187 at91_add_device_i2c(NULL, 0);
188}
189
190MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
191 /* Maintainer: Olimex */
192 .phys_io = AT91_BASE_SYS,
193 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
194 .boot_params = AT91_SDRAM_BASE + 0x100,
195 .timer = &at91sam926x_timer,
196 .map_io = ek_map_io,
197 .init_irq = ek_init_irq,
198 .init_machine = ek_board_init,
199MACHINE_END
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index b343a6c28120..4d1d9c777084 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -25,6 +25,8 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/at73c213.h>
29#include <linux/clk.h>
28 30
29#include <asm/hardware.h> 31#include <asm/hardware.h>
30#include <asm/setup.h> 32#include <asm/setup.h>
@@ -37,29 +39,28 @@
37 39
38#include <asm/arch/board.h> 40#include <asm/arch/board.h>
39#include <asm/arch/gpio.h> 41#include <asm/arch/gpio.h>
40#include <asm/arch/at91sam926x_mc.h>
41 42
42#include "generic.h" 43#include "generic.h"
43 44
44 45
45/*
46 * Serial port configuration.
47 * 0 .. 5 = USART0 .. USART5
48 * 6 = DBGU
49 */
50static struct at91_uart_config __initdata ek_uart_config = {
51 .console_tty = 0, /* ttyS0 */
52 .nr_tty = 3,
53 .tty_map = { 6, 0, 1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
54};
55
56static void __init ek_map_io(void) 46static void __init ek_map_io(void)
57{ 47{
58 /* Initialize processor: 18.432 MHz crystal */ 48 /* Initialize processor: 18.432 MHz crystal */
59 at91sam9260_initialize(18432000); 49 at91sam9260_initialize(18432000);
60 50
61 /* Setup the serial ports and console */ 51 /* DGBU on ttyS0. (Rx & Tx only) */
62 at91_init_serial(&ek_uart_config); 52 at91_register_uart(0, 0, 0);
53
54 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
55 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
56 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
57 | ATMEL_UART_RI);
58
59 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
60 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
61
62 /* set serial console to ttyS0 (ie, DBGU) */
63 at91_set_serial_console(0);
63} 64}
64 65
65static void __init ek_init_irq(void) 66static void __init ek_init_irq(void)
@@ -85,6 +86,35 @@ static struct at91_udc_data __initdata ek_udc_data = {
85 86
86 87
87/* 88/*
89 * Audio
90 */
91static struct at73c213_board_info at73c213_data = {
92 .ssc_id = 0,
93 .shortname = "AT91SAM9260-EK external DAC",
94};
95
96#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
97static void __init at73c213_set_clk(struct at73c213_board_info *info)
98{
99 struct clk *pck0;
100 struct clk *plla;
101
102 pck0 = clk_get(NULL, "pck0");
103 plla = clk_get(NULL, "plla");
104
105 /* AT73C213 MCK Clock */
106 at91_set_B_periph(AT91_PIN_PC1, 0); /* PCK0 */
107
108 clk_set_parent(pck0, plla);
109 clk_put(plla);
110
111 info->dac_clk = pck0;
112}
113#else
114static void __init at73c213_set_clk(struct at73c213_board_info *info) {}
115#endif
116
117/*
88 * SPI devices. 118 * SPI devices.
89 */ 119 */
90static struct spi_board_info ek_spi_devices[] = { 120static struct spi_board_info ek_spi_devices[] = {
@@ -110,6 +140,8 @@ static struct spi_board_info ek_spi_devices[] = {
110 .chip_select = 0, 140 .chip_select = 0,
111 .max_speed_hz = 10 * 1000 * 1000, 141 .max_speed_hz = 10 * 1000 * 1000,
112 .bus_num = 1, 142 .bus_num = 1,
143 .mode = SPI_MODE_1,
144 .platform_data = &at73c213_data,
113 }, 145 },
114#endif 146#endif
115}; 147};
@@ -172,6 +204,24 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
172// .vcc_pin = ... not connected 204// .vcc_pin = ... not connected
173}; 205};
174 206
207
208/*
209 * LEDs
210 */
211static struct gpio_led ek_leds[] = {
212 { /* "bottom" led, green, userled1 to be defined */
213 .name = "ds5",
214 .gpio = AT91_PIN_PA6,
215 .active_low = 1,
216 .default_trigger = "none",
217 },
218 { /* "power" led, yellow */
219 .name = "ds1",
220 .gpio = AT91_PIN_PA9,
221 .default_trigger = "heartbeat",
222 }
223};
224
175static void __init ek_board_init(void) 225static void __init ek_board_init(void)
176{ 226{
177 /* Serial */ 227 /* Serial */
@@ -190,6 +240,11 @@ static void __init ek_board_init(void)
190 at91_add_device_mmc(0, &ek_mmc_data); 240 at91_add_device_mmc(0, &ek_mmc_data);
191 /* I2C */ 241 /* I2C */
192 at91_add_device_i2c(NULL, 0); 242 at91_add_device_i2c(NULL, 0);
243 /* SSC (to AT73C213) */
244 at73c213_set_clk(&at73c213_data);
245 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
246 /* LEDs */
247 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
193} 248}
194 249
195MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") 250MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 0ce38dfa6ebe..08382c0df221 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -26,6 +26,8 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
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/spi/at73c213.h>
30#include <linux/clk.h>
29#include <linux/dm9000.h> 31#include <linux/dm9000.h>
30#include <linux/fb.h> 32#include <linux/fb.h>
31#include <linux/gpio_keys.h> 33#include <linux/gpio_keys.h>
@@ -44,22 +46,11 @@
44 46
45#include <asm/arch/board.h> 47#include <asm/arch/board.h>
46#include <asm/arch/gpio.h> 48#include <asm/arch/gpio.h>
47#include <asm/arch/at91sam926x_mc.h> 49#include <asm/arch/at91sam9_smc.h>
48 50
49#include "generic.h" 51#include "generic.h"
50 52
51 53
52/*
53 * Serial port configuration.
54 * 0 .. 2 = USART0 .. USART2
55 * 3 = DBGU
56 */
57static struct at91_uart_config __initdata ek_uart_config = {
58 .console_tty = 0, /* ttyS0 */
59 .nr_tty = 1,
60 .tty_map = { 3, -1, -1, -1 } /* ttyS0, ..., ttyS3 */
61};
62
63static void __init ek_map_io(void) 54static void __init ek_map_io(void)
64{ 55{
65 /* Initialize processor: 18.432 MHz crystal */ 56 /* Initialize processor: 18.432 MHz crystal */
@@ -68,8 +59,11 @@ static void __init ek_map_io(void)
68 /* Setup the LEDs */ 59 /* Setup the LEDs */
69 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); 60 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
70 61
71 /* Setup the serial ports and console */ 62 /* DGBU on ttyS0. (Rx & Tx only) */
72 at91_init_serial(&ek_uart_config); 63 at91_register_uart(0, 0, 0);
64
65 /* set serial console to ttyS0 (ie, DBGU) */
66 at91_set_serial_console(0);
73} 67}
74 68
75static void __init ek_init_irq(void) 69static void __init ek_init_irq(void)
@@ -239,6 +233,35 @@ static void __init ek_add_device_ts(void) {}
239#endif 233#endif
240 234
241/* 235/*
236 * Audio
237 */
238static struct at73c213_board_info at73c213_data = {
239 .ssc_id = 1,
240 .shortname = "AT91SAM9261-EK external DAC",
241};
242
243#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
244static void __init at73c213_set_clk(struct at73c213_board_info *info)
245{
246 struct clk *pck2;
247 struct clk *plla;
248
249 pck2 = clk_get(NULL, "pck2");
250 plla = clk_get(NULL, "plla");
251
252 /* AT73C213 MCK Clock */
253 at91_set_B_periph(AT91_PIN_PB31, 0); /* PCK2 */
254
255 clk_set_parent(pck2, plla);
256 clk_put(plla);
257
258 info->dac_clk = pck2;
259}
260#else
261static void __init at73c213_set_clk(struct at73c213_board_info *info) {}
262#endif
263
264/*
242 * SPI devices 265 * SPI devices
243 */ 266 */
244static struct spi_board_info ek_spi_devices[] = { 267static struct spi_board_info ek_spi_devices[] = {
@@ -256,6 +279,7 @@ static struct spi_board_info ek_spi_devices[] = {
256 .bus_num = 0, 279 .bus_num = 0,
257 .platform_data = &ads_info, 280 .platform_data = &ads_info,
258 .irq = AT91SAM9261_ID_IRQ0, 281 .irq = AT91SAM9261_ID_IRQ0,
282 .controller_data = (void *) AT91_PIN_PA28, /* CS pin */
259 }, 283 },
260#endif 284#endif
261#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) 285#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
@@ -271,6 +295,9 @@ static struct spi_board_info ek_spi_devices[] = {
271 .chip_select = 3, 295 .chip_select = 3,
272 .max_speed_hz = 10 * 1000 * 1000, 296 .max_speed_hz = 10 * 1000 * 1000,
273 .bus_num = 0, 297 .bus_num = 0,
298 .mode = SPI_MODE_1,
299 .platform_data = &at73c213_data,
300 .controller_data = (void*) AT91_PIN_PA29, /* default for CS3 is PA6, but it must be PA29 */
274 }, 301 },
275#endif 302#endif
276}; 303};
@@ -460,6 +487,29 @@ static void __init ek_add_device_buttons(void)
460static void __init ek_add_device_buttons(void) {} 487static void __init ek_add_device_buttons(void) {}
461#endif 488#endif
462 489
490/*
491 * LEDs
492 */
493static struct gpio_led ek_leds[] = {
494 { /* "bottom" led, green, userled1 to be defined */
495 .name = "ds7",
496 .gpio = AT91_PIN_PA14,
497 .active_low = 1,
498 .default_trigger = "none",
499 },
500 { /* "top" led, green, userled2 to be defined */
501 .name = "ds8",
502 .gpio = AT91_PIN_PA13,
503 .active_low = 1,
504 .default_trigger = "none",
505 },
506 { /* "power" led, yellow */
507 .name = "ds1",
508 .gpio = AT91_PIN_PA23,
509 .default_trigger = "heartbeat",
510 }
511};
512
463static void __init ek_board_init(void) 513static void __init ek_board_init(void)
464{ 514{
465 /* Serial */ 515 /* Serial */
@@ -481,6 +531,9 @@ static void __init ek_board_init(void)
481 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); 531 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
482 /* Touchscreen */ 532 /* Touchscreen */
483 ek_add_device_ts(); 533 ek_add_device_ts();
534 /* SSC (to AT73C213) */
535 at73c213_set_clk(&at73c213_data);
536 at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
484#else 537#else
485 /* MMC */ 538 /* MMC */
486 at91_add_device_mmc(0, &ek_mmc_data); 539 at91_add_device_mmc(0, &ek_mmc_data);
@@ -489,6 +542,8 @@ static void __init ek_board_init(void)
489 at91_add_device_lcdc(&ek_lcdc_data); 542 at91_add_device_lcdc(&ek_lcdc_data);
490 /* Push Buttons */ 543 /* Push Buttons */
491 ek_add_device_buttons(); 544 ek_add_device_buttons();
545 /* LEDs */
546 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
492} 547}
493 548
494MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 549MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index bf103b24c937..b4cd5d0ed597 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -43,29 +43,24 @@
43 43
44#include <asm/arch/board.h> 44#include <asm/arch/board.h>
45#include <asm/arch/gpio.h> 45#include <asm/arch/gpio.h>
46#include <asm/arch/at91sam926x_mc.h> 46#include <asm/arch/at91sam9_smc.h>
47 47
48#include "generic.h" 48#include "generic.h"
49 49
50 50
51/*
52 * Serial port configuration.
53 * 0 .. 2 = USART0 .. USART2
54 * 3 = DBGU
55 */
56static struct at91_uart_config __initdata ek_uart_config = {
57 .console_tty = 0, /* ttyS0 */
58 .nr_tty = 2,
59 .tty_map = { 3, 0, -1, -1, } /* ttyS0, ..., ttyS3 */
60};
61
62static void __init ek_map_io(void) 51static void __init ek_map_io(void)
63{ 52{
64 /* Initialize processor: 16.367 MHz crystal */ 53 /* Initialize processor: 16.367 MHz crystal */
65 at91sam9263_initialize(16367660); 54 at91sam9263_initialize(16367660);
66 55
67 /* Setup the serial ports and console */ 56 /* DGBU on ttyS0. (Rx & Tx only) */
68 at91_init_serial(&ek_uart_config); 57 at91_register_uart(0, 0, 0);
58
59 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
60 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
61
62 /* set serial console to ttyS0 (ie, DBGU) */
63 at91_set_serial_console(0);
69} 64}
70 65
71static void __init ek_init_irq(void) 66static void __init ek_init_irq(void)
@@ -341,7 +336,7 @@ static struct gpio_led ek_leds[] = {
341 .name = "ds3", 336 .name = "ds3",
342 .gpio = AT91_PIN_PB7, 337 .gpio = AT91_PIN_PB7,
343 .default_trigger = "heartbeat", 338 .default_trigger = "heartbeat",
344 }, 339 }
345}; 340};
346 341
347 342
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index bc0546d7245f..ffc0597aee8d 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -29,29 +29,24 @@
29 29
30#include <asm/arch/board.h> 30#include <asm/arch/board.h>
31#include <asm/arch/gpio.h> 31#include <asm/arch/gpio.h>
32#include <asm/arch/at91sam926x_mc.h> 32#include <asm/arch/at91sam9_smc.h>
33 33
34#include "generic.h" 34#include "generic.h"
35 35
36 36
37/*
38 * Serial port configuration.
39 * 0 .. 3 = USART0 .. USART3
40 * 4 = DBGU
41 */
42static struct at91_uart_config __initdata ek_uart_config = {
43 .console_tty = 0, /* ttyS0 */
44 .nr_tty = 2,
45 .tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
46};
47
48static void __init ek_map_io(void) 37static void __init ek_map_io(void)
49{ 38{
50 /* Initialize processor: 12.000 MHz crystal */ 39 /* Initialize processor: 12.000 MHz crystal */
51 at91sam9rl_initialize(12000000); 40 at91sam9rl_initialize(12000000);
52 41
53 /* Setup the serial ports and console */ 42 /* DGBU on ttyS0. (Rx & Tx only) */
54 at91_init_serial(&ek_uart_config); 43 at91_register_uart(0, 0, 0);
44
45 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
46 at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
47
48 /* set serial console to ttyS0 (ie, DBGU) */
49 at91_set_serial_console(0);
55} 50}
56 51
57static void __init ek_init_irq(void) 52static void __init ek_init_irq(void)
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
new file mode 100755
index 000000000000..b5717108991d
--- /dev/null
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -0,0 +1,683 @@
1/*
2 * linux/arch/arm/mach-at91/board-yl-9200.c
3 *
4 * Adapted from:
5 *various board files in
6 * /arch/arm/mach-at91
7 * modifications to convert to YL-9200 platform
8 * Copyright (C) 2007 S.Birtles
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#include <linux/types.h>
26#include <linux/init.h>
27#include <linux/mm.h>
28#include <linux/module.h>
29#include <linux/platform_device.h>
30#include <linux/spi/spi.h>
31/*#include <linux/can_bus/candata.h>*/
32#include <linux/spi/ads7846.h>
33#include <linux/mtd/physmap.h>
34
35/*#include <sound/gpio_sounder.h>*/
36#include <asm/hardware.h>
37#include <asm/setup.h>
38#include <asm/mach-types.h>
39#include <asm/irq.h>
40
41#include <asm/mach/arch.h>
42#include <asm/mach/map.h>
43#include <asm/mach/irq.h>
44
45#include <asm/arch/board.h>
46#include <asm/arch/gpio.h>
47#include <asm/arch/at91rm9200_mc.h>
48#include <linux/gpio_keys.h>
49#include <linux/input.h>
50
51#include "generic.h"
52#include <asm/arch/at91_pio.h>
53
54#define YL_9200_FLASH_BASE AT91_CHIPSELECT_0
55#define YL_9200_FLASH_SIZE 0x800000
56
57/*
58 * Serial port configuration.
59 * 0 .. 3 = USART0 .. USART3
60 * 4 = DBGU
61 *atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
62 *atmel_usart.1: ttyS1 at MMIO 0xfffc0000 (irq = 6) is a ATMEL_SERIAL
63 *atmel_usart.2: ttyS2 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
64 *atmel_usart.3: ttyS3 at MMIO 0xfffc8000 (irq = 8) is a ATMEL_SERIAL
65 *atmel_usart.4: ttyS4 at MMIO 0xfffcc000 (irq = 9) is a ATMEL_SERIAL
66 * on the YL-9200 we are sitting at the following
67 *ttyS0 at MMIO 0xfefff200 (irq = 1) is a AT91_SERIAL
68 *ttyS1 at MMIO 0xfefc4000 (irq = 7) is a AT91_SERIAL
69 */
70
71/* extern void __init yl_9200_add_device_sounder(struct gpio_sounder *sounders, int nr);*/
72
73static struct at91_uart_config __initdata yl_9200_uart_config = {
74 .console_tty = 0, /* ttyS0 */
75 .nr_tty = 3,
76 .tty_map = { 4, 1, 0, -1, -1 } /* ttyS0, ..., ttyS4 */
77};
78
79static void __init yl_9200_map_io(void)
80{
81 /* Initialize processor: 18.432 MHz crystal */
82 /*Also initialises register clocks & gpio*/
83 at91rm9200_initialize(18432000, AT91RM9200_PQFP); /*we have a 3 bank system*/
84
85 /* Setup the serial ports and console */
86 at91_init_serial(&yl_9200_uart_config);
87
88 /* Setup the LEDs D2=PB17,D3=PB16 */
89 at91_init_leds(AT91_PIN_PB16,AT91_PIN_PB17); /*cpu-led,timer-led*/
90}
91
92static void __init yl_9200_init_irq(void)
93{
94 at91rm9200_init_interrupts(NULL);
95}
96
97static struct at91_eth_data __initdata yl_9200_eth_data = {
98 .phy_irq_pin = AT91_PIN_PB28,
99 .is_rmii = 1,
100};
101
102static struct at91_usbh_data __initdata yl_9200_usbh_data = {
103 .ports = 1, /* this should be 1 not 2 for the Yl9200*/
104};
105
106static struct at91_udc_data __initdata yl_9200_udc_data = {
107/*on sheet 7 Schemitic rev 1.0*/
108 .pullup_pin = AT91_PIN_PC4,
109 .vbus_pin= AT91_PIN_PC5,
110 .pullup_active_low = 1, /*ACTIVE LOW!! due to PNP transistor on page 7*/
111
112};
113/*
114static struct at91_cf_data __initdata yl_9200_cf_data = {
115TODO S.BIRTLES
116 .det_pin = AT91_PIN_xxx,
117 .rst_pin = AT91_PIN_xxx,
118 .irq_pin = ... not connected
119 .vcc_pin = ... always powered
120
121};
122*/
123static struct at91_mmc_data __initdata yl_9200_mmc_data = {
124 .det_pin = AT91_PIN_PB9, /*THIS LOOKS CORRECT SHEET7*/
125/* .wp_pin = ... not connected SHEET7*/
126 .slot_b = 0,
127 .wire4 = 1,
128
129};
130
131/* --------------------------------------------------------------------
132 * Touch screen
133 * -------------------------------------------------------------------- */
134#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
135static int ads7843_pendown_state(void)
136{
137 return !at91_get_gpio_value(AT91_PIN_PB11); /* Touchscreen PENIRQ */
138}
139
140static void __init at91_init_device_ts(void)
141{
142/*IMPORTANT NOTE THE SPI INTERFACE IS ALREADY CONFIGURED BY XXX_DEVICES.C
143THAT IS TO SAY THAT MISO,MOSI,SPCK AND CS are already configured
144we only need to enable the other datapins which are:
145PB10/RK1 BUSY
146*/
147/* Touchscreen BUSY signal , pin,use pullup ( TODO not currently used in the ADS7843/6.c driver)*/
148at91_set_gpio_input(AT91_PIN_PB10, 1);
149}
150
151#else
152static void __init at91_init_device_ts(void) {}
153#endif
154
155static struct ads7846_platform_data ads_info = {
156 .model = 7843,
157 .x_min = 150,
158 .x_max = 3830,
159 .y_min = 190,
160 .y_max = 3830,
161 .vref_delay_usecs = 100,
162/* for a 8" touch screen*/
163 //.x_plate_ohms = 603, //= 450, S.Birtles TODO
164 //.y_plate_ohms = 332, //= 250, S.Birtles TODO
165/*for a 10.4" touch screen*/
166 //.x_plate_ohms =611,
167 //.y_plate_ohms =325,
168
169 .x_plate_ohms = 576,
170 .y_plate_ohms = 366,
171 //
172 .pressure_max = 15000, /*generally nonsense on the 7843*/
173 /*number of times to send query to chip in a given run 0 equals one time (do not set to 0!! ,there is a bug in ADS 7846 code)*/
174 .debounce_max = 1,
175 .debounce_rep = 0,
176 .debounce_tol = (~0),
177 .get_pendown_state = ads7843_pendown_state,
178};
179
180/*static struct canbus_platform_data can_info = {
181 .model = 2510,
182};
183*/
184
185static struct spi_board_info yl_9200_spi_devices[] = {
186/*this sticks it at:
187 /sys/devices/platform/atmel_spi.0/spi0.0
188 /sys/bus/platform/devices/
189Documentation/spi IIRC*/
190
191#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
192 /*(this IS correct 04-NOV-2007)*/
193 {
194 .modalias = "ads7846", /* because the driver is called ads7846*/
195 .chip_select = 0, /*THIS MUST BE AN INDEX INTO AN ARRAY OF pins */
196/*this is ONLY TO BE USED if chipselect above is not used, it passes a pin directly for the chip select*/
197 /*.controller_data =AT91_PIN_PA3 ,*/
198 .max_speed_hz = 5000*26, /*(4700 * 26)-125000 * 26, (max sample rate @ 3V) * (cmd + data + overhead) */
199 .bus_num = 0,
200 .platform_data = &ads_info,
201 .irq = AT91_PIN_PB11,
202 },
203#endif
204/*we need to put our CAN driver data here!!*/
205/*THIS IS ALL DUMMY DATA*/
206/* {
207 .modalias = "mcp2510", //DUMMY for MCP2510 chip
208 .chip_select = 1,*/ /*THIS MUST BE AN INDEX INTO AN ARRAY OF pins */
209 /*this is ONLY TO BE USED if chipselect above is not used, it passes a pin directly for the chip select */
210 /* .controller_data =AT91_PIN_PA4 ,
211 .max_speed_hz = 25000 * 26,
212 .bus_num = 0,
213 .platform_data = &can_info,
214 .irq = AT91_PIN_PC0,
215 },
216 */
217 //max SPI chip needs to go here
218};
219
220static struct mtd_partition __initdata yl_9200_nand_partition[] = {
221 {
222 .name = "AT91 NAND partition 1, boot",
223 .offset = 0,
224 .size = 1 * SZ_256K
225 },
226 {
227 .name = "AT91 NAND partition 2, kernel",
228 .offset = 1 * SZ_256K,
229 .size = 2 * SZ_1M - 1 * SZ_256K
230 },
231 {
232 .name = "AT91 NAND partition 3, filesystem",
233 .offset = 2 * SZ_1M,
234 .size = 14 * SZ_1M
235 },
236 {
237 .name = "AT91 NAND partition 4, storage",
238 .offset = 16 * SZ_1M,
239 .size = 16 * SZ_1M
240 },
241 {
242 .name = "AT91 NAND partition 5, ext-fs",
243 .offset = 32 * SZ_1M,
244 .size = 32 * SZ_1M
245 },
246};
247
248static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
249{
250 *num_partitions = ARRAY_SIZE(yl_9200_nand_partition);
251 return yl_9200_nand_partition;
252}
253
254static struct at91_nand_data __initdata yl_9200_nand_data = {
255 .ale= 6,
256 .cle= 7,
257 /*.det_pin = AT91_PIN_PCxx,*/ /*we don't have a det pin because NandFlash is fixed to board*/
258 .rdy_pin = AT91_PIN_PC14, /*R/!B Sheet10*/
259 .enable_pin = AT91_PIN_PC15, /*!CE Sheet10 */
260 .partition_info = nand_partitions,
261};
262
263
264
265/*
266TODO S.Birtles
267potentially a problem with the size above
268physmap platform flash device: 00800000 at 10000000
269physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
270NOR chip too large to fit in mapping. Attempting to cope...
271 Intel/Sharp Extended Query Table at 0x0031
272Using buffer write method
273cfi_cmdset_0001: Erase suspend on write enabled
274Reducing visibility of 16384KiB chip to 8192KiB
275*/
276
277static struct mtd_partition yl_9200_flash_partitions[] = {
278 {
279 .name = "Bootloader",
280 .size = 0x00040000,
281 .offset = 0,
282 .mask_flags = MTD_WRITEABLE /* force read-only */
283 },{
284 .name = "Kernel",
285 .size = 0x001C0000,
286 .offset = 0x00040000,
287 },{
288 .name = "Filesystem",
289 .size = MTDPART_SIZ_FULL,
290 .offset = 0x00200000
291 }
292
293};
294
295static struct physmap_flash_data yl_9200_flash_data = {
296 .width = 2,
297 .parts = yl_9200_flash_partitions,
298 .nr_parts = ARRAY_SIZE(yl_9200_flash_partitions),
299};
300
301static struct resource yl_9200_flash_resources[] = {
302{
303 .start = YL_9200_FLASH_BASE,
304 .end = YL_9200_FLASH_BASE + YL_9200_FLASH_SIZE - 1,
305 .flags = IORESOURCE_MEM,
306 }
307};
308
309static struct platform_device yl_9200_flash = {
310 .name = "physmap-flash",
311 .id = 0,
312 .dev = {
313 .platform_data = &yl_9200_flash_data,
314 },
315 .resource = yl_9200_flash_resources,
316 .num_resources = ARRAY_SIZE(yl_9200_flash_resources),
317};
318
319
320static struct gpio_led yl_9200_leds[] = {
321/*D2 &D3 are passed directly in via at91_init_leds*/
322 {
323 .name = "led4", /*D4*/
324 .gpio = AT91_PIN_PB15,
325 .active_low = 1,
326 .default_trigger = "heartbeat",
327 /*.default_trigger = "timer",*/
328 },
329 {
330 .name = "led5", /*D5*/
331 .gpio = AT91_PIN_PB8,
332 .active_low = 1,
333 .default_trigger = "heartbeat",
334 }
335};
336
337//static struct gpio_sounder yl_9200_sounder[] = {*/
338/*This is a simple speaker attached to a gpo line*/
339
340// {
341// .name = "Speaker", /*LS1*/
342// .gpio = AT91_PIN_PA22,
343// .active_low = 0,
344// .default_trigger = "heartbeat",
345 /*.default_trigger = "timer",*/
346// },
347//};
348
349
350
351static struct i2c_board_info __initdata yl_9200_i2c_devices[] = {
352 {
353 /*TODO*/
354 I2C_BOARD_INFO("CS4334", 0x00),
355 }
356};
357
358
359 /*
360 * GPIO Buttons
361 */
362#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
363static struct gpio_keys_button yl_9200_buttons[] = {
364 {
365 .gpio = AT91_PIN_PA24,
366 .code = BTN_2,
367 .desc = "SW2",
368 .active_low = 1,
369 .wakeup = 1,
370 },
371 {
372 .gpio = AT91_PIN_PB1,
373 .code = BTN_3,
374 .desc = "SW3",
375 .active_low = 1,
376 .wakeup = 1,
377 },
378 {
379 .gpio = AT91_PIN_PB2,
380 .code = BTN_4,
381 .desc = "SW4",
382 .active_low = 1,
383 .wakeup = 1,
384 },
385 {
386 .gpio = AT91_PIN_PB6,
387 .code = BTN_5,
388 .desc = "SW5",
389 .active_low = 1,
390 .wakeup = 1,
391 },
392
393};
394
395static struct gpio_keys_platform_data yl_9200_button_data = {
396 .buttons = yl_9200_buttons,
397 .nbuttons = ARRAY_SIZE(yl_9200_buttons),
398};
399
400static struct platform_device yl_9200_button_device = {
401 .name = "gpio-keys",
402 .id = -1,
403 .num_resources = 0,
404 .dev = {
405 .platform_data = &yl_9200_button_data,
406 }
407};
408
409static void __init yl_9200_add_device_buttons(void)
410{
411 //SW2
412 at91_set_gpio_input(AT91_PIN_PA24, 0);
413 at91_set_deglitch(AT91_PIN_PA24, 1);
414
415 //SW3
416 at91_set_gpio_input(AT91_PIN_PB1, 0);
417 at91_set_deglitch(AT91_PIN_PB1, 1);
418 //SW4
419 at91_set_gpio_input(AT91_PIN_PB2, 0);
420 at91_set_deglitch(AT91_PIN_PB2, 1);
421
422 //SW5
423 at91_set_gpio_input(AT91_PIN_PB6, 0);
424 at91_set_deglitch(AT91_PIN_PB6, 1);
425
426
427 at91_set_gpio_output(AT91_PIN_PB7, 1); /* #TURN BUTTONS ON, SHEET 5 of schematics */
428 platform_device_register(&yl_9200_button_device);
429}
430#else
431static void __init yl_9200_add_device_buttons(void) {}
432#endif
433
434#if defined(CONFIG_FB_S1D135XX) || defined(CONFIG_FB_S1D13XXX_MODULE)
435#include <video/s1d13xxxfb.h>
436
437/* EPSON S1D13806 FB (discontinued chip)*/
438/* EPSON S1D13506 FB */
439
440#define AT91_FB_REG_BASE 0x80000000L
441#define AT91_FB_REG_SIZE 0x200
442#define AT91_FB_VMEM_BASE 0x80200000L
443#define AT91_FB_VMEM_SIZE 0x200000L
444
445/*#define S1D_DISPLAY_WIDTH 640*/
446/*#define S1D_DISPLAY_HEIGHT 480*/
447
448
449static void __init yl_9200_init_video(void)
450{
451 at91_sys_write(AT91_PIOC + PIO_ASR,AT91_PIN_PC6);
452 at91_sys_write(AT91_PIOC + PIO_BSR,0);
453 at91_sys_write(AT91_PIOC + PIO_ASR,AT91_PIN_PC6);
454
455 at91_sys_write( AT91_SMC_CSR(2),
456 AT91_SMC_NWS_(0x4) |
457 AT91_SMC_WSEN |
458 AT91_SMC_TDF_(0x100) |
459 AT91_SMC_DBW
460 );
461
462
463
464}
465
466
467static struct s1d13xxxfb_regval yl_9200_s1dfb_initregs[] =
468{
469 {S1DREG_MISC, 0x00}, /* Miscellaneous Register*/
470 {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/
471 {S1DREG_GPIO_CNF0, 0x00}, /* General IO Pins Configuration Register*/
472 {S1DREG_GPIO_CTL0, 0x00}, /* General IO Pins Control Register*/
473 {S1DREG_CLK_CNF, 0x11}, /* Memory Clock Configuration Register*/
474 {S1DREG_LCD_CLK_CNF, 0x10}, /* LCD Pixel Clock Configuration Register*/
475 {S1DREG_CRT_CLK_CNF, 0x12}, /* CRT/TV Pixel Clock Configuration Register*/
476 {S1DREG_MPLUG_CLK_CNF, 0x01}, /* MediaPlug Clock Configuration Register*/
477 {S1DREG_CPU2MEM_WST_SEL, 0x02}, /* CPU To Memory Wait State Select Register*/
478 {S1DREG_MEM_CNF, 0x00}, /* Memory Configuration Register*/
479 {S1DREG_SDRAM_REF_RATE, 0x04}, /* DRAM Refresh Rate Register, MCLK source*/
480 {S1DREG_SDRAM_TC0, 0x12}, /* DRAM Timings Control Register 0*/
481 {S1DREG_SDRAM_TC1, 0x02}, /* DRAM Timings Control Register 1*/
482 {S1DREG_PANEL_TYPE, 0x25}, /* Panel Type Register*/
483 {S1DREG_MOD_RATE, 0x00}, /* MOD Rate Register*/
484 {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* LCD Horizontal Display Width Register*/
485 {S1DREG_LCD_NDISP_HPER, 0x13}, /* LCD Horizontal Non-Display Period Register*/
486 {S1DREG_TFT_FPLINE_START, 0x01}, /* TFT FPLINE Start Position Register*/
487 {S1DREG_TFT_FPLINE_PWIDTH, 0x0c}, /* TFT FPLINE Pulse Width Register*/
488 {S1DREG_LCD_DISP_VHEIGHT0, 0xDF}, /* LCD Vertical Display Height Register 0*/
489 {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* LCD Vertical Display Height Register 1*/
490 {S1DREG_LCD_NDISP_VPER, 0x2c}, /* LCD Vertical Non-Display Period Register*/
491 {S1DREG_TFT_FPFRAME_START, 0x0a}, /* TFT FPFRAME Start Position Register*/
492 {S1DREG_TFT_FPFRAME_PWIDTH, 0x02}, /* TFT FPFRAME Pulse Width Register*/
493 {S1DREG_LCD_DISP_MODE, 0x05}, /* LCD Display Mode Register*/
494 {S1DREG_LCD_MISC, 0x01}, /* LCD Miscellaneous Register*/
495 {S1DREG_LCD_DISP_START0, 0x00}, /* LCD Display Start Address Register 0*/
496 {S1DREG_LCD_DISP_START1, 0x00}, /* LCD Display Start Address Register 1*/
497 {S1DREG_LCD_DISP_START2, 0x00}, /* LCD Display Start Address Register 2*/
498 {S1DREG_LCD_MEM_OFF0, 0x80}, /* LCD Memory Address Offset Register 0*/
499 {S1DREG_LCD_MEM_OFF1, 0x02}, /* LCD Memory Address Offset Register 1*/
500 {S1DREG_LCD_PIX_PAN, 0x03}, /* LCD Pixel Panning Register*/
501 {S1DREG_LCD_DISP_FIFO_HTC, 0x00}, /* LCD Display FIFO High Threshold Control Register*/
502 {S1DREG_LCD_DISP_FIFO_LTC, 0x00}, /* LCD Display FIFO Low Threshold Control Register*/
503 {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* CRT/TV Horizontal Display Width Register*/
504 {S1DREG_CRT_NDISP_HPER, 0x13}, /* CRT/TV Horizontal Non-Display Period Register*/
505 {S1DREG_CRT_HRTC_START, 0x01}, /* CRT/TV HRTC Start Position Register*/
506 {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* CRT/TV HRTC Pulse Width Register*/
507 {S1DREG_CRT_DISP_VHEIGHT0, 0xDF}, /* CRT/TV Vertical Display Height Register 0*/
508 {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* CRT/TV Vertical Display Height Register 1*/
509 {S1DREG_CRT_NDISP_VPER, 0x2B}, /* CRT/TV Vertical Non-Display Period Register*/
510 {S1DREG_CRT_VRTC_START, 0x09}, /* CRT/TV VRTC Start Position Register*/
511 {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* CRT/TV VRTC Pulse Width Register*/
512 {S1DREG_TV_OUT_CTL, 0x18}, /* TV Output Control Register */
513 {S1DREG_CRT_DISP_MODE, 0x05}, /* CRT/TV Display Mode Register, 16BPP*/
514 {S1DREG_CRT_DISP_START0, 0x00}, /* CRT/TV Display Start Address Register 0*/
515 {S1DREG_CRT_DISP_START1, 0x00}, /* CRT/TV Display Start Address Register 1*/
516 {S1DREG_CRT_DISP_START2, 0x00}, /* CRT/TV Display Start Address Register 2*/
517 {S1DREG_CRT_MEM_OFF0, 0x80}, /* CRT/TV Memory Address Offset Register 0*/
518 {S1DREG_CRT_MEM_OFF1, 0x02}, /* CRT/TV Memory Address Offset Register 1*/
519 {S1DREG_CRT_PIX_PAN, 0x00}, /* CRT/TV Pixel Panning Register*/
520 {S1DREG_CRT_DISP_FIFO_HTC, 0x00}, /* CRT/TV Display FIFO High Threshold Control Register*/
521 {S1DREG_CRT_DISP_FIFO_LTC, 0x00}, /* CRT/TV Display FIFO Low Threshold Control Register*/
522 {S1DREG_LCD_CUR_CTL, 0x00}, /* LCD Ink/Cursor Control Register*/
523 {S1DREG_LCD_CUR_START, 0x01}, /* LCD Ink/Cursor Start Address Register*/
524 {S1DREG_LCD_CUR_XPOS0, 0x00}, /* LCD Cursor X Position Register 0*/
525 {S1DREG_LCD_CUR_XPOS1, 0x00}, /* LCD Cursor X Position Register 1*/
526 {S1DREG_LCD_CUR_YPOS0, 0x00}, /* LCD Cursor Y Position Register 0*/
527 {S1DREG_LCD_CUR_YPOS1, 0x00}, /* LCD Cursor Y Position Register 1*/
528 {S1DREG_LCD_CUR_BCTL0, 0x00}, /* LCD Ink/Cursor Blue Color 0 Register*/
529 {S1DREG_LCD_CUR_GCTL0, 0x00}, /* LCD Ink/Cursor Green Color 0 Register*/
530 {S1DREG_LCD_CUR_RCTL0, 0x00}, /* LCD Ink/Cursor Red Color 0 Register*/
531 {S1DREG_LCD_CUR_BCTL1, 0x1F}, /* LCD Ink/Cursor Blue Color 1 Register*/
532 {S1DREG_LCD_CUR_GCTL1, 0x3F}, /* LCD Ink/Cursor Green Color 1 Register*/
533 {S1DREG_LCD_CUR_RCTL1, 0x1F}, /* LCD Ink/Cursor Red Color 1 Register*/
534 {S1DREG_LCD_CUR_FIFO_HTC, 0x00}, /* LCD Ink/Cursor FIFO Threshold Register*/
535 {S1DREG_CRT_CUR_CTL, 0x00}, /* CRT/TV Ink/Cursor Control Register*/
536 {S1DREG_CRT_CUR_START, 0x01}, /* CRT/TV Ink/Cursor Start Address Register*/
537 {S1DREG_CRT_CUR_XPOS0, 0x00}, /* CRT/TV Cursor X Position Register 0*/
538 {S1DREG_CRT_CUR_XPOS1, 0x00}, /* CRT/TV Cursor X Position Register 1*/
539 {S1DREG_CRT_CUR_YPOS0, 0x00}, /* CRT/TV Cursor Y Position Register 0*/
540 {S1DREG_CRT_CUR_YPOS1, 0x00}, /* CRT/TV Cursor Y Position Register 1*/
541 {S1DREG_CRT_CUR_BCTL0, 0x00}, /* CRT/TV Ink/Cursor Blue Color 0 Register*/
542 {S1DREG_CRT_CUR_GCTL0, 0x00}, /* CRT/TV Ink/Cursor Green Color 0 Register*/
543 {S1DREG_CRT_CUR_RCTL0, 0x00}, /* CRT/TV Ink/Cursor Red Color 0 Register*/
544 {S1DREG_CRT_CUR_BCTL1, 0x1F}, /* CRT/TV Ink/Cursor Blue Color 1 Register*/
545 {S1DREG_CRT_CUR_GCTL1, 0x3F}, /* CRT/TV Ink/Cursor Green Color 1 Register*/
546 {S1DREG_CRT_CUR_RCTL1, 0x1F}, /* CRT/TV Ink/Cursor Red Color 1 Register*/
547 {S1DREG_CRT_CUR_FIFO_HTC, 0x00}, /* CRT/TV Ink/Cursor FIFO Threshold Register*/
548 {S1DREG_BBLT_CTL0, 0x00}, /* BitBlt Control Register 0*/
549 {S1DREG_BBLT_CTL1, 0x01}, /* BitBlt Control Register 1*/
550 {S1DREG_BBLT_CC_EXP, 0x00}, /* BitBlt ROP Code/Color Expansion Register*/
551 {S1DREG_BBLT_OP, 0x00}, /* BitBlt Operation Register*/
552 {S1DREG_BBLT_SRC_START0, 0x00}, /* BitBlt Source Start Address Register 0*/
553 {S1DREG_BBLT_SRC_START1, 0x00}, /* BitBlt Source Start Address Register 1*/
554 {S1DREG_BBLT_SRC_START2, 0x00}, /* BitBlt Source Start Address Register 2*/
555 {S1DREG_BBLT_DST_START0, 0x00}, /* BitBlt Destination Start Address Register 0*/
556 {S1DREG_BBLT_DST_START1, 0x00}, /* BitBlt Destination Start Address Register 1*/
557 {S1DREG_BBLT_DST_START2, 0x00}, /* BitBlt Destination Start Address Register 2*/
558 {S1DREG_BBLT_MEM_OFF0, 0x00}, /* BitBlt Memory Address Offset Register 0*/
559 {S1DREG_BBLT_MEM_OFF1, 0x00}, /* BitBlt Memory Address Offset Register 1*/
560 {S1DREG_BBLT_WIDTH0, 0x00}, /* BitBlt Width Register 0*/
561 {S1DREG_BBLT_WIDTH1, 0x00}, /* BitBlt Width Register 1*/
562 {S1DREG_BBLT_HEIGHT0, 0x00}, /* BitBlt Height Register 0*/
563 {S1DREG_BBLT_HEIGHT1, 0x00}, /* BitBlt Height Register 1*/
564 {S1DREG_BBLT_BGC0, 0x00}, /* BitBlt Background Color Register 0*/
565 {S1DREG_BBLT_BGC1, 0x00}, /* BitBlt Background Color Register 1*/
566 {S1DREG_BBLT_FGC0, 0x00}, /* BitBlt Foreground Color Register 0*/
567 {S1DREG_BBLT_FGC1, 0x00}, /* BitBlt Foreground Color Register 1*/
568 {S1DREG_LKUP_MODE, 0x00}, /* Look-Up Table Mode Register*/
569 {S1DREG_LKUP_ADDR, 0x00}, /* Look-Up Table Address Register*/
570 {S1DREG_PS_CNF, 0x00}, /* Power Save Configuration Register*/
571 {S1DREG_PS_STATUS, 0x00}, /* Power Save Status Register*/
572 {S1DREG_CPU2MEM_WDOGT, 0x00}, /* CPU-to-Memory Access Watchdog Timer Register*/
573 {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/
574};
575
576static u64 s1dfb_dmamask = 0xffffffffUL;
577
578static struct s1d13xxxfb_pdata yl_9200_s1dfb_pdata = {
579 .initregs = yl_9200_s1dfb_initregs,
580 .initregssize = ARRAY_SIZE(yl_9200_s1dfb_initregs),
581 .platform_init_video = yl_9200_init_video,
582};
583
584static struct resource yl_9200_s1dfb_resource[] = {
585 [0] = { /* video mem */
586 .name = "s1d13xxxfb memory",
587 /* .name = "s1d13806 memory",*/
588 .start = AT91_FB_VMEM_BASE,
589 .end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
590 .flags = IORESOURCE_MEM,
591 },
592 [1] = { /* video registers */
593 .name = "s1d13xxxfb registers",
594 /* .name = "s1d13806 registers",*/
595 .start = AT91_FB_REG_BASE,
596 .end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
597 .flags = IORESOURCE_MEM,
598 },
599};
600
601static struct platform_device yl_9200_s1dfb_device = {
602 /*TODO S.Birtles , really we need the chip revision in here as well*/
603 .name = "s1d13806fb",
604 /* .name = "s1d13506fb",*/
605 .id = -1,
606 .dev = {
607 /*TODO theres a waring here!!*/
608 /*WARNING: vmlinux.o(.data+0x2dbc): Section mismatch: reference to .init.text: (between 'yl_9200_s1dfb_pdata' and 's1dfb_dmamask')*/
609 .dma_mask = &s1dfb_dmamask,
610 .coherent_dma_mask = 0xffffffff,
611 .platform_data = &yl_9200_s1dfb_pdata,
612 },
613 .resource = yl_9200_s1dfb_resource,
614 .num_resources = ARRAY_SIZE(yl_9200_s1dfb_resource),
615};
616
617void __init yl_9200_add_device_video(void)
618{
619 platform_device_register(&yl_9200_s1dfb_device);
620}
621#else
622 void __init yl_9200_add_device_video(void) {}
623#endif
624
625/*this is not called first , yl_9200_map_io is called first*/
626static void __init yl_9200_board_init(void)
627{
628 /* Serial */
629 at91_add_device_serial();
630 /* Ethernet */
631 at91_add_device_eth(&yl_9200_eth_data);
632 /* USB Host */
633 at91_add_device_usbh(&yl_9200_usbh_data);
634 /* USB Device */
635 at91_add_device_udc(&yl_9200_udc_data);
636 /* pullup_pin it is actually active low, but this is not needed, driver sets it up */
637 /*at91_set_multi_drive(yl_9200_udc_data.pullup_pin, 0);*/
638
639 /* Compact Flash */
640 /*at91_add_device_cf(&yl_9200_cf_data);*/
641
642 /* I2C */
643 at91_add_device_i2c(yl_9200_i2c_devices, ARRAY_SIZE(yl_9200_i2c_devices));
644 /* SPI */
645 /*TODO YL9200 we have 2 spi interfaces touch screen & CAN*/
646 /* AT91_PIN_PA5, AT91_PIN_PA6 , are used on the max 485 NOT SPI*/
647
648 /*touch screen and CAN*/
649 at91_add_device_spi(yl_9200_spi_devices, ARRAY_SIZE(yl_9200_spi_devices));
650
651 /*Basically the TS uses PB11 & PB10 , PB11 is configured by the SPI system BP10 IS NOT USED!!*/
652 /* we need this incase the board is running without a touch screen*/
653 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
654 at91_init_device_ts(); /*init the touch screen device*/
655 #endif
656 /* DataFlash card */
657 at91_add_device_mmc(0, &yl_9200_mmc_data);
658 /* NAND */
659 at91_add_device_nand(&yl_9200_nand_data);
660 /* NOR Flash */
661 platform_device_register(&yl_9200_flash);
662 /* LEDs. Note!! this does not include the led's we passed for the processor status */
663 at91_gpio_leds(yl_9200_leds, ARRAY_SIZE(yl_9200_leds));
664 /* VGA */
665 /*this is self registered by including the s1d13xxx chip in the kernel build*/
666 yl_9200_add_device_video();
667 /* Push Buttons */
668 yl_9200_add_device_buttons();
669 /*TODO fixup the Sounder */
670// yl_9200_add_device_sounder(yl_9200_sounder,ARRAY_SIZE(yl_9200_sounder));
671
672}
673
674MACHINE_START(YL9200, "uCdragon YL-9200")
675 /* Maintainer: S.Birtles*/
676 .phys_io = AT91_BASE_SYS,
677 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
678 .boot_params = AT91_SDRAM_BASE + 0x100,
679 .timer = &at91rm9200_timer,
680 .map_io = yl_9200_map_io,
681 .init_irq = yl_9200_init_irq,
682 .init_machine = yl_9200_board_init,
683MACHINE_END
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index de6424e9ac02..a33dfe450726 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -23,7 +23,6 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/clk.h> 24#include <linux/clk.h>
25 25
26#include <asm/semaphore.h>
27#include <asm/io.h> 26#include <asm/io.h>
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29 28
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index a67defd50438..39733b6992aa 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -26,12 +26,135 @@
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28#include <asm/arch/at91_pmc.h> 28#include <asm/arch/at91_pmc.h>
29#include <asm/arch/at91rm9200_mc.h>
30#include <asm/arch/gpio.h> 29#include <asm/arch/gpio.h>
31#include <asm/arch/cpu.h> 30#include <asm/arch/cpu.h>
32 31
33#include "generic.h" 32#include "generic.h"
34 33
34#ifdef CONFIG_ARCH_AT91RM9200
35#include <asm/arch/at91rm9200_mc.h>
36
37/*
38 * The AT91RM9200 goes into self-refresh mode with this command, and will
39 * terminate self-refresh automatically on the next SDRAM access.
40 */
41#define sdram_selfrefresh_enable() at91_sys_write(AT91_SDRAMC_SRR, 1)
42#define sdram_selfrefresh_disable() do {} while (0)
43
44#elif defined(CONFIG_ARCH_AT91CAP9)
45#include <asm/arch/at91cap9_ddrsdr.h>
46
47static u32 saved_lpr;
48
49static inline void sdram_selfrefresh_enable(void)
50{
51 u32 lpr;
52
53 saved_lpr = at91_sys_read(AT91_DDRSDRC_LPR);
54
55 lpr = saved_lpr & ~AT91_DDRSDRC_LPCB;
56 at91_sys_write(AT91_DDRSDRC_LPR, lpr | AT91_DDRSDRC_LPCB_SELF_REFRESH);
57}
58
59#define sdram_selfrefresh_disable() at91_sys_write(AT91_DDRSDRC_LPR, saved_lpr)
60
61#else
62#include <asm/arch/at91sam9_sdramc.h>
63
64static u32 saved_lpr;
65
66static inline void sdram_selfrefresh_enable(void)
67{
68 u32 lpr;
69
70 saved_lpr = at91_sys_read(AT91_SDRAMC_LPR);
71
72 lpr = saved_lpr & ~AT91_SDRAMC_LPCB;
73 at91_sys_write(AT91_SDRAMC_LPR, lpr | AT91_SDRAMC_LPCB_SELF_REFRESH);
74}
75
76#define sdram_selfrefresh_disable() at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
77
78/*
79 * FIXME: The AT91SAM9263 has a second EBI controller which may have
80 * additional SDRAM. pm_slowclock.S will require a similar fix.
81 */
82
83#endif
84
85
86/*
87 * Show the reason for the previous system reset.
88 */
89#if defined(AT91_SHDWC)
90
91#include <asm/arch/at91_rstc.h>
92#include <asm/arch/at91_shdwc.h>
93
94static void __init show_reset_status(void)
95{
96 static char reset[] __initdata = "reset";
97
98 static char general[] __initdata = "general";
99 static char wakeup[] __initdata = "wakeup";
100 static char watchdog[] __initdata = "watchdog";
101 static char software[] __initdata = "software";
102 static char user[] __initdata = "user";
103 static char unknown[] __initdata = "unknown";
104
105 static char signal[] __initdata = "signal";
106 static char rtc[] __initdata = "rtc";
107 static char rtt[] __initdata = "rtt";
108 static char restore[] __initdata = "power-restored";
109
110 char *reason, *r2 = reset;
111 u32 reset_type, wake_type;
112
113 reset_type = at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_RSTTYP;
114 wake_type = at91_sys_read(AT91_SHDW_SR);
115
116 switch (reset_type) {
117 case AT91_RSTC_RSTTYP_GENERAL:
118 reason = general;
119 break;
120 case AT91_RSTC_RSTTYP_WAKEUP:
121 /* board-specific code enabled the wakeup sources */
122 reason = wakeup;
123
124 /* "wakeup signal" */
125 if (wake_type & AT91_SHDW_WAKEUP0)
126 r2 = signal;
127 else {
128 r2 = reason;
129 if (wake_type & AT91_SHDW_RTTWK) /* rtt wakeup */
130 reason = rtt;
131 else if (wake_type & AT91_SHDW_RTCWK) /* rtc wakeup */
132 reason = rtc;
133 else if (wake_type == 0) /* power-restored wakeup */
134 reason = restore;
135 else /* unknown wakeup */
136 reason = unknown;
137 }
138 break;
139 case AT91_RSTC_RSTTYP_WATCHDOG:
140 reason = watchdog;
141 break;
142 case AT91_RSTC_RSTTYP_SOFTWARE:
143 reason = software;
144 break;
145 case AT91_RSTC_RSTTYP_USER:
146 reason = user;
147 break;
148 default:
149 reason = unknown;
150 break;
151 }
152 pr_info("AT91: Starting after %s %s\n", reason, r2);
153}
154#else
155static void __init show_reset_status(void) {}
156#endif
157
35 158
36static int at91_pm_valid_state(suspend_state_t state) 159static int at91_pm_valid_state(suspend_state_t state)
37{ 160{
@@ -125,6 +248,11 @@ EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
125 248
126static void (*slow_clock)(void); 249static void (*slow_clock)(void);
127 250
251#ifdef CONFIG_AT91_SLOW_CLOCK
252extern void at91_slow_clock(void);
253extern u32 at91_slow_clock_sz;
254#endif
255
128 256
129static int at91_pm_enter(suspend_state_t state) 257static int at91_pm_enter(suspend_state_t state)
130{ 258{
@@ -158,11 +286,14 @@ static int at91_pm_enter(suspend_state_t state)
158 * turning off the main oscillator; reverse on wakeup. 286 * turning off the main oscillator; reverse on wakeup.
159 */ 287 */
160 if (slow_clock) { 288 if (slow_clock) {
289#ifdef CONFIG_AT91_SLOW_CLOCK
290 /* copy slow_clock handler to SRAM, and call it */
291 memcpy(slow_clock, at91_slow_clock, at91_slow_clock_sz);
292#endif
161 slow_clock(); 293 slow_clock();
162 break; 294 break;
163 } else { 295 } else {
164 /* DEVELOPMENT ONLY */ 296 pr_info("AT91: PM - no slow clock mode enabled ...\n");
165 pr_info("AT91: PM - no slow clock mode yet ...\n");
166 /* FALLTHROUGH leaving master clock alone */ 297 /* FALLTHROUGH leaving master clock alone */
167 } 298 }
168 299
@@ -175,13 +306,15 @@ static int at91_pm_enter(suspend_state_t state)
175 case PM_SUSPEND_STANDBY: 306 case PM_SUSPEND_STANDBY:
176 /* 307 /*
177 * NOTE: the Wait-for-Interrupt instruction needs to be 308 * NOTE: the Wait-for-Interrupt instruction needs to be
178 * in icache so the SDRAM stays in self-refresh mode until 309 * in icache so no SDRAM accesses are needed until the
179 * the wakeup IRQ occurs. 310 * wakeup IRQ occurs and self-refresh is terminated.
180 */ 311 */
181 asm("b 1f; .align 5; 1:"); 312 asm("b 1f; .align 5; 1:");
182 asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */ 313 asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */
183 at91_sys_write(AT91_SDRAMC_SRR, 1); /* self-refresh mode */ 314 sdram_selfrefresh_enable();
184 /* fall though to next state */ 315 asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
316 sdram_selfrefresh_disable();
317 break;
185 318
186 case PM_SUSPEND_ON: 319 case PM_SUSPEND_ON:
187 asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */ 320 asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
@@ -196,6 +329,7 @@ static int at91_pm_enter(suspend_state_t state)
196 at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR)); 329 at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));
197 330
198error: 331error:
332 sdram_selfrefresh_disable();
199 target_state = PM_SUSPEND_ON; 333 target_state = PM_SUSPEND_ON;
200 at91_irq_resume(); 334 at91_irq_resume();
201 at91_gpio_resume(); 335 at91_gpio_resume();
@@ -220,21 +354,20 @@ static struct platform_suspend_ops at91_pm_ops ={
220 354
221static int __init at91_pm_init(void) 355static int __init at91_pm_init(void)
222{ 356{
223 printk("AT91: Power Management\n"); 357#ifdef CONFIG_AT91_SLOW_CLOCK
224 358 slow_clock = (void *) (AT91_IO_VIRT_BASE - at91_slow_clock_sz);
225#ifdef CONFIG_AT91_PM_SLOW_CLOCK
226 /* REVISIT allocations of SRAM should be dynamically managed.
227 * FIQ handlers and other components will want SRAM/TCM too...
228 */
229 slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
230 memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
231#endif 359#endif
232 360
233 /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */ 361 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
362
363#ifdef CONFIG_ARCH_AT91RM9200
364 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */
234 at91_sys_write(AT91_SDRAMC_LPR, 0); 365 at91_sys_write(AT91_SDRAMC_LPR, 0);
366#endif
235 367
236 suspend_set_ops(&at91_pm_ops); 368 suspend_set_ops(&at91_pm_ops);
237 369
370 show_reset_status();
238 return 0; 371 return 0;
239} 372}
240arch_initcall(at91_pm_init); 373arch_initcall(at91_pm_init);
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 0e2b641268ad..dbaae5f746a1 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -31,6 +31,8 @@ config ARCH_EDB7211
31 bool "EDB7211" 31 bool "EDB7211"
32 select ISA 32 select ISA
33 select ARCH_DISCONTIGMEM_ENABLE 33 select ARCH_DISCONTIGMEM_ENABLE
34 select ARCH_SPARSEMEM_ENABLE
35 select ARCH_SELECT_MEMORY_MODEL
34 help 36 help
35 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 37 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
36 evaluation board. 38 evaluation board.
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 0ecf99761feb..c1252ca9648e 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4obj-y := core.o clock.o 4obj-y := core.o clock.o gpio.o
5obj-m := 5obj-m :=
6obj-n := 6obj-n :=
7obj- := 7obj- :=
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 91f6a07a51d5..8bc187240542 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -159,7 +159,7 @@ static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 };
159static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; 159static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 };
160static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x5c }; 160static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x5c };
161 161
162static void update_gpio_int_params(unsigned port) 162void ep93xx_gpio_update_int_params(unsigned port)
163{ 163{
164 BUG_ON(port > 2); 164 BUG_ON(port > 2);
165 165
@@ -175,98 +175,10 @@ static void update_gpio_int_params(unsigned port)
175 EP93XX_GPIO_REG(int_en_register_offset[port])); 175 EP93XX_GPIO_REG(int_en_register_offset[port]));
176} 176}
177 177
178/* Port ordering is: A B F D E C G H */ 178void ep93xx_gpio_int_mask(unsigned line)
179static const u8 data_register_offset[8] = {
180 0x00, 0x04, 0x30, 0x0c, 0x20, 0x08, 0x38, 0x40,
181};
182
183static const u8 data_direction_register_offset[8] = {
184 0x10, 0x14, 0x34, 0x1c, 0x24, 0x18, 0x3c, 0x44,
185};
186
187#define GPIO_IN 0
188#define GPIO_OUT 1
189
190static void ep93xx_gpio_set_direction(unsigned line, int direction)
191{
192 unsigned int data_direction_register;
193 unsigned long flags;
194 unsigned char v;
195
196 data_direction_register =
197 EP93XX_GPIO_REG(data_direction_register_offset[line >> 3]);
198
199 local_irq_save(flags);
200 if (direction == GPIO_OUT) {
201 if (line >= 0 && line <= EP93XX_GPIO_LINE_MAX_IRQ) {
202 /* Port A/B/F */
203 gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7));
204 update_gpio_int_params(line >> 3);
205 }
206
207 v = __raw_readb(data_direction_register);
208 v |= 1 << (line & 7);
209 __raw_writeb(v, data_direction_register);
210 } else if (direction == GPIO_IN) {
211 v = __raw_readb(data_direction_register);
212 v &= ~(1 << (line & 7));
213 __raw_writeb(v, data_direction_register);
214 }
215 local_irq_restore(flags);
216}
217
218int gpio_direction_input(unsigned gpio)
219{
220 if (gpio > EP93XX_GPIO_LINE_MAX)
221 return -EINVAL;
222
223 ep93xx_gpio_set_direction(gpio, GPIO_IN);
224
225 return 0;
226}
227EXPORT_SYMBOL(gpio_direction_input);
228
229int gpio_direction_output(unsigned gpio, int value)
230{
231 if (gpio > EP93XX_GPIO_LINE_MAX)
232 return -EINVAL;
233
234 gpio_set_value(gpio, value);
235 ep93xx_gpio_set_direction(gpio, GPIO_OUT);
236
237 return 0;
238}
239EXPORT_SYMBOL(gpio_direction_output);
240
241int gpio_get_value(unsigned gpio)
242{
243 unsigned int data_register;
244
245 data_register = EP93XX_GPIO_REG(data_register_offset[gpio >> 3]);
246
247 return !!(__raw_readb(data_register) & (1 << (gpio & 7)));
248}
249EXPORT_SYMBOL(gpio_get_value);
250
251void gpio_set_value(unsigned gpio, int value)
252{ 179{
253 unsigned int data_register; 180 gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7));
254 unsigned long flags;
255 unsigned char v;
256
257 data_register = EP93XX_GPIO_REG(data_register_offset[gpio >> 3]);
258
259 local_irq_save(flags);
260 v = __raw_readb(data_register);
261 if (value)
262 v |= 1 << (gpio & 7);
263 else
264 v &= ~(1 << (gpio & 7));
265 __raw_writeb(v, data_register);
266 local_irq_restore(flags);
267} 181}
268EXPORT_SYMBOL(gpio_set_value);
269
270 182
271/************************************************************************* 183/*************************************************************************
272 * EP93xx IRQ handling 184 * EP93xx IRQ handling
@@ -316,7 +228,7 @@ static void ep93xx_gpio_irq_ack(unsigned int irq)
316 228
317 if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { 229 if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
318 gpio_int_type2[port] ^= port_mask; /* switch edge direction */ 230 gpio_int_type2[port] ^= port_mask; /* switch edge direction */
319 update_gpio_int_params(port); 231 ep93xx_gpio_update_int_params(port);
320 } 232 }
321 233
322 __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); 234 __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port]));
@@ -332,7 +244,7 @@ static void ep93xx_gpio_irq_mask_ack(unsigned int irq)
332 gpio_int_type2[port] ^= port_mask; /* switch edge direction */ 244 gpio_int_type2[port] ^= port_mask; /* switch edge direction */
333 245
334 gpio_int_unmasked[port] &= ~port_mask; 246 gpio_int_unmasked[port] &= ~port_mask;
335 update_gpio_int_params(port); 247 ep93xx_gpio_update_int_params(port);
336 248
337 __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); 249 __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port]));
338} 250}
@@ -343,7 +255,7 @@ static void ep93xx_gpio_irq_mask(unsigned int irq)
343 int port = line >> 3; 255 int port = line >> 3;
344 256
345 gpio_int_unmasked[port] &= ~(1 << (line & 7)); 257 gpio_int_unmasked[port] &= ~(1 << (line & 7));
346 update_gpio_int_params(port); 258 ep93xx_gpio_update_int_params(port);
347} 259}
348 260
349static void ep93xx_gpio_irq_unmask(unsigned int irq) 261static void ep93xx_gpio_irq_unmask(unsigned int irq)
@@ -352,7 +264,7 @@ static void ep93xx_gpio_irq_unmask(unsigned int irq)
352 int port = line >> 3; 264 int port = line >> 3;
353 265
354 gpio_int_unmasked[port] |= 1 << (line & 7); 266 gpio_int_unmasked[port] |= 1 << (line & 7);
355 update_gpio_int_params(port); 267 ep93xx_gpio_update_int_params(port);
356} 268}
357 269
358 270
@@ -368,7 +280,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
368 const int port = gpio >> 3; 280 const int port = gpio >> 3;
369 const int port_mask = 1 << (gpio & 7); 281 const int port_mask = 1 << (gpio & 7);
370 282
371 ep93xx_gpio_set_direction(gpio, GPIO_IN); 283 gpio_direction_output(gpio, gpio_get_value(gpio));
372 284
373 switch (type) { 285 switch (type) {
374 case IRQT_RISING: 286 case IRQT_RISING:
@@ -411,7 +323,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
411 desc->status &= ~IRQ_TYPE_SENSE_MASK; 323 desc->status &= ~IRQ_TYPE_SENSE_MASK;
412 desc->status |= type & IRQ_TYPE_SENSE_MASK; 324 desc->status |= type & IRQ_TYPE_SENSE_MASK;
413 325
414 update_gpio_int_params(port); 326 ep93xx_gpio_update_int_params(port);
415 327
416 return 0; 328 return 0;
417} 329}
@@ -549,6 +461,7 @@ static struct platform_device ep93xx_ohci_device = {
549 .resource = ep93xx_ohci_resources, 461 .resource = ep93xx_ohci_resources,
550}; 462};
551 463
464extern void ep93xx_gpio_init(void);
552 465
553void __init ep93xx_init_devices(void) 466void __init ep93xx_init_devices(void)
554{ 467{
@@ -562,6 +475,8 @@ void __init ep93xx_init_devices(void)
562 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); 475 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
563 __raw_writel(v, EP93XX_SYSCON_DEVICE_CONFIG); 476 __raw_writel(v, EP93XX_SYSCON_DEVICE_CONFIG);
564 477
478 ep93xx_gpio_init();
479
565 amba_device_register(&uart1_device, &iomem_resource); 480 amba_device_register(&uart1_device, &iomem_resource);
566 amba_device_register(&uart2_device, &iomem_resource); 481 amba_device_register(&uart2_device, &iomem_resource);
567 amba_device_register(&uart3_device, &iomem_resource); 482 amba_device_register(&uart3_device, &iomem_resource);
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
new file mode 100644
index 000000000000..dc2e4c00d989
--- /dev/null
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -0,0 +1,158 @@
1/*
2 * linux/arch/arm/mach-ep93xx/gpio.c
3 *
4 * Generic EP93xx GPIO handling
5 *
6 * Copyright (c) 2008 Ryan Mallon <ryan@bluewatersys.com>
7 *
8 * Based on code originally from:
9 * linux/arch/arm/mach-ep93xx/core.c
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/seq_file.h>
19
20#include <asm/arch/ep93xx-regs.h>
21#include <asm/io.h>
22#include <asm/gpio.h>
23
24struct ep93xx_gpio_chip {
25 struct gpio_chip chip;
26
27 unsigned int data_reg;
28 unsigned int data_dir_reg;
29};
30
31#define to_ep93xx_gpio_chip(c) container_of(c, struct ep93xx_gpio_chip, chip)
32
33/* From core.c */
34extern void ep93xx_gpio_int_mask(unsigned line);
35extern void ep93xx_gpio_update_int_params(unsigned port);
36
37static int ep93xx_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
38{
39 struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
40 unsigned long flags;
41 u8 v;
42
43 local_irq_save(flags);
44 v = __raw_readb(ep93xx_chip->data_dir_reg);
45 v &= ~(1 << offset);
46 __raw_writeb(v, ep93xx_chip->data_dir_reg);
47 local_irq_restore(flags);
48
49 return 0;
50}
51
52static int ep93xx_gpio_direction_output(struct gpio_chip *chip,
53 unsigned offset, int val)
54{
55 struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
56 unsigned long flags;
57 int line;
58 u8 v;
59
60 local_irq_save(flags);
61
62 /* Set the value */
63 v = __raw_readb(ep93xx_chip->data_reg);
64 if (val)
65 v |= (1 << offset);
66 else
67 v &= ~(1 << offset);
68 __raw_writeb(v, ep93xx_chip->data_reg);
69
70 /* Drive as an output */
71 line = chip->base + offset;
72 if (line <= EP93XX_GPIO_LINE_MAX_IRQ) {
73 /* Ports A/B/F */
74 ep93xx_gpio_int_mask(line);
75 ep93xx_gpio_update_int_params(line >> 3);
76 }
77
78 v = __raw_readb(ep93xx_chip->data_dir_reg);
79 v |= (1 << offset);
80 __raw_writeb(v, ep93xx_chip->data_dir_reg);
81
82 local_irq_restore(flags);
83
84 return 0;
85}
86
87static int ep93xx_gpio_get(struct gpio_chip *chip, unsigned offset)
88{
89 struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
90
91 return !!(__raw_readb(ep93xx_chip->data_reg) & (1 << offset));
92}
93
94static void ep93xx_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
95{
96 struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
97 unsigned long flags;
98 u8 v;
99
100 local_irq_save(flags);
101 v = __raw_readb(ep93xx_chip->data_reg);
102 if (val)
103 v |= (1 << offset);
104 else
105 v &= ~(1 << offset);
106 __raw_writeb(v, ep93xx_chip->data_reg);
107 local_irq_restore(flags);
108}
109
110static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
111{
112 struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip);
113 u8 data_reg, data_dir_reg;
114 int i;
115
116 data_reg = __raw_readb(ep93xx_chip->data_reg);
117 data_dir_reg = __raw_readb(ep93xx_chip->data_dir_reg);
118
119 for (i = 0; i < chip->ngpio; i++)
120 seq_printf(s, "GPIO %s%d: %s %s\n", chip->label, i,
121 (data_reg & (1 << i)) ? "set" : "clear",
122 (data_dir_reg & (1 << i)) ? "out" : "in");
123}
124
125#define EP93XX_GPIO_BANK(name, dr, ddr, base_gpio) \
126 { \
127 .chip = { \
128 .label = name, \
129 .direction_input = ep93xx_gpio_direction_input, \
130 .direction_output = ep93xx_gpio_direction_output, \
131 .get = ep93xx_gpio_get, \
132 .set = ep93xx_gpio_set, \
133 .dbg_show = ep93xx_gpio_dbg_show, \
134 .base = base_gpio, \
135 .ngpio = 8, \
136 }, \
137 .data_reg = EP93XX_GPIO_REG(dr), \
138 .data_dir_reg = EP93XX_GPIO_REG(ddr), \
139 }
140
141static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = {
142 EP93XX_GPIO_BANK("A", 0x00, 0x10, 0),
143 EP93XX_GPIO_BANK("B", 0x04, 0x14, 8),
144 EP93XX_GPIO_BANK("C", 0x30, 0x34, 40),
145 EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24),
146 EP93XX_GPIO_BANK("E", 0x20, 0x24, 32),
147 EP93XX_GPIO_BANK("F", 0x08, 0x18, 16),
148 EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48),
149 EP93XX_GPIO_BANK("H", 0x40, 0x44, 56),
150};
151
152void __init ep93xx_gpio_init(void)
153{
154 int i;
155
156 for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++)
157 gpiochip_add(&ep93xx_gpio_banks[i].chip);
158}
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c
index 95a1e263f7fa..8d761fdd2ecd 100644
--- a/arch/arm/mach-integrator/clock.c
+++ b/arch/arm/mach-integrator/clock.c
@@ -17,7 +17,6 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19 19
20#include <asm/semaphore.h>
21#include <asm/hardware/icst525.h> 20#include <asm/hardware/icst525.h>
22 21
23#include "clock.h" 22#include "clock.h"
diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
index 5278f589fcee..5235f64f235b 100644
--- a/arch/arm/mach-integrator/time.c
+++ b/arch/arm/mach-integrator/time.c
@@ -125,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id)
125 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); 125 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
126 126
127 ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED, 127 ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED,
128 "rtc-pl030", dev); 128 "rtc-pl030", NULL);
129 if (ret) 129 if (ret)
130 goto map_out; 130 goto map_out;
131 131
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index dbe07c9472ed..5e8c6f7dfabb 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -34,14 +34,6 @@ config MACH_N2100
34 Say Y here if you want to run your kernel on the Thecus n2100 34 Say Y here if you want to run your kernel on the Thecus n2100
35 NAS appliance. 35 NAS appliance.
36 36
37config IOP3XX_ATU
38 bool "Enable the PCI Controller"
39 default y
40 help
41 Say Y here if you want the IOP to initialize its PCI Controller.
42 Say N if the IOP is an add in card, the host system owns the PCI
43 bus in this case.
44
45config MACH_EM7210 37config MACH_EM7210
46 bool "Enable support for the Lanner EM7210" 38 bool "Enable support for the Lanner EM7210"
47 help 39 help
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 98cfa1cd6bdb..4a89823bcebb 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -178,10 +178,9 @@ static struct hw_pci iq31244_pci __initdata = {
178 178
179static int __init iq31244_pci_init(void) 179static int __init iq31244_pci_init(void)
180{ 180{
181 if (is_ep80219()) { 181 if (is_ep80219())
182 if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) 182 pci_common_init(&ep80219_pci);
183 pci_common_init(&ep80219_pci); 183 else if (machine_is_iq31244()) {
184 } else if (machine_is_iq31244()) {
185 if (is_80219()) { 184 if (is_80219()) {
186 printk("note: iq31244 board type has been selected\n"); 185 printk("note: iq31244 board type has been selected\n");
187 printk("note: to select ep80219 operation:\n"); 186 printk("note: to select ep80219 operation:\n");
@@ -190,9 +189,7 @@ static int __init iq31244_pci_init(void)
190 printk("\t2/ update boot loader to pass" 189 printk("\t2/ update boot loader to pass"
191 " the ep80219 id: %d\n", MACH_TYPE_EP80219); 190 " the ep80219 id: %d\n", MACH_TYPE_EP80219);
192 } 191 }
193 192 pci_common_init(&iq31244_pci);
194 if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE)
195 pci_common_init(&iq31244_pci);
196 } 193 }
197 194
198 return 0; 195 return 0;
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 18ad29f213b2..1da3c911edd3 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -106,7 +106,7 @@ static struct hw_pci iq80321_pci __initdata = {
106 .swizzle = pci_std_swizzle, 106 .swizzle = pci_std_swizzle,
107 .nr_controllers = 1, 107 .nr_controllers = 1,
108 .setup = iop3xx_pci_setup, 108 .setup = iop3xx_pci_setup,
109 .preinit = iop3xx_pci_preinit, 109 .preinit = iop3xx_pci_preinit_cond,
110 .scan = iop3xx_pci_scan_bus, 110 .scan = iop3xx_pci_scan_bus,
111 .map_irq = iq80321_pci_map_irq, 111 .map_irq = iq80321_pci_map_irq,
112}; 112};
diff --git a/arch/arm/mach-iop33x/Kconfig b/arch/arm/mach-iop33x/Kconfig
index 45598e096898..9aa016bb18f9 100644
--- a/arch/arm/mach-iop33x/Kconfig
+++ b/arch/arm/mach-iop33x/Kconfig
@@ -16,14 +16,6 @@ config MACH_IQ80332
16 Say Y here if you want to run your kernel on the Intel IQ80332 16 Say Y here if you want to run your kernel on the Intel IQ80332
17 evaluation kit for the IOP332 chipset. 17 evaluation kit for the IOP332 chipset.
18 18
19config IOP3XX_ATU
20 bool "Enable the PCI Controller"
21 default y
22 help
23 Say Y here if you want the IOP to initialize its PCI Controller.
24 Say N if the IOP is an add in card, the host system owns the PCI
25 bus in this case.
26
27endmenu 19endmenu
28 20
29endif 21endif
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 433188ebff2a..de39fd778579 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -89,7 +89,7 @@ static struct hw_pci iq80331_pci __initdata = {
89 .swizzle = pci_std_swizzle, 89 .swizzle = pci_std_swizzle,
90 .nr_controllers = 1, 90 .nr_controllers = 1,
91 .setup = iop3xx_pci_setup, 91 .setup = iop3xx_pci_setup,
92 .preinit = iop3xx_pci_preinit, 92 .preinit = iop3xx_pci_preinit_cond,
93 .scan = iop3xx_pci_scan_bus, 93 .scan = iop3xx_pci_scan_bus,
94 .map_irq = iq80331_pci_map_irq, 94 .map_irq = iq80331_pci_map_irq,
95}; 95};
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 416c09564cc6..4904fd78445f 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -89,7 +89,7 @@ static struct hw_pci iq80332_pci __initdata = {
89 .swizzle = pci_std_swizzle, 89 .swizzle = pci_std_swizzle,
90 .nr_controllers = 1, 90 .nr_controllers = 1,
91 .setup = iop3xx_pci_setup, 91 .setup = iop3xx_pci_setup,
92 .preinit = iop3xx_pci_preinit, 92 .preinit = iop3xx_pci_preinit_cond,
93 .scan = iop3xx_pci_scan_bus, 93 .scan = iop3xx_pci_scan_bus,
94 .map_irq = iq80332_pci_map_irq, 94 .map_irq = iq80332_pci_map_irq,
95}; 95};
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 730a3af12c98..ade42b73afbb 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -11,5 +11,8 @@ obj- :=
11# PCI support is optional 11# PCI support is optional
12obj-$(CONFIG_PCI) += pci.o 12obj-$(CONFIG_PCI) += pci.o
13 13
14# LEDs
15obj-$(CONFIG_LEDS) += leds.o
16
14# Board-specific support 17# Board-specific support
15obj-$(CONFIG_MACH_KS8695) += board-micrel.o 18obj-$(CONFIG_MACH_KS8695) += board-micrel.o
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c
index 386593f8ac65..3db2ec61d06f 100644
--- a/arch/arm/mach-ks8695/devices.c
+++ b/arch/arm/mach-ks8695/devices.c
@@ -176,6 +176,27 @@ static void __init ks8695_add_device_watchdog(void) {}
176#endif 176#endif
177 177
178 178
179/* --------------------------------------------------------------------
180 * LEDs
181 * -------------------------------------------------------------------- */
182
183#if defined(CONFIG_LEDS)
184short ks8695_leds_cpu = -1;
185short ks8695_leds_timer = -1;
186
187void __init ks8695_init_leds(u8 cpu_led, u8 timer_led)
188{
189 /* Enable GPIO to access the LEDs */
190 gpio_direction_output(cpu_led, 1);
191 gpio_direction_output(timer_led, 1);
192
193 ks8695_leds_cpu = cpu_led;
194 ks8695_leds_timer = timer_led;
195}
196#else
197void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) {}
198#endif
199
179/* -------------------------------------------------------------------- */ 200/* -------------------------------------------------------------------- */
180 201
181/* 202/*
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c
new file mode 100644
index 000000000000..d61762ae50d8
--- /dev/null
+++ b/arch/arm/mach-ks8695/leds.c
@@ -0,0 +1,94 @@
1/*
2 * LED driver for KS8695-based boards.
3 *
4 * Copyright (C) Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/init.h>
14
15#include <asm/mach-types.h>
16#include <asm/leds.h>
17#include <asm/arch/devices.h>
18#include <asm/arch/gpio.h>
19
20
21static inline void ks8695_led_on(unsigned int led)
22{
23 gpio_set_value(led, 0);
24}
25
26static inline void ks8695_led_off(unsigned int led)
27{
28 gpio_set_value(led, 1);
29}
30
31static inline void ks8695_led_toggle(unsigned int led)
32{
33 unsigned long is_off = gpio_get_value(led);
34 if (is_off)
35 ks8695_led_on(led);
36 else
37 ks8695_led_off(led);
38}
39
40
41/*
42 * Handle LED events.
43 */
44static void ks8695_leds_event(led_event_t evt)
45{
46 unsigned long flags;
47
48 local_irq_save(flags);
49
50 switch(evt) {
51 case led_start: /* System startup */
52 ks8695_led_on(ks8695_leds_cpu);
53 break;
54
55 case led_stop: /* System stop / suspend */
56 ks8695_led_off(ks8695_leds_cpu);
57 break;
58
59#ifdef CONFIG_LEDS_TIMER
60 case led_timer: /* Every 50 timer ticks */
61 ks8695_led_toggle(ks8695_leds_timer);
62 break;
63#endif
64
65#ifdef CONFIG_LEDS_CPU
66 case led_idle_start: /* Entering idle state */
67 ks8695_led_off(ks8695_leds_cpu);
68 break;
69
70 case led_idle_end: /* Exit idle state */
71 ks8695_led_on(ks8695_leds_cpu);
72 break;
73#endif
74
75 default:
76 break;
77 }
78
79 local_irq_restore(flags);
80}
81
82
83static int __init leds_init(void)
84{
85 if ((ks8695_leds_timer == -1) || (ks8695_leds_cpu == -1))
86 return -ENODEV;
87
88 leds_event = ks8695_leds_event;
89
90 leds_event(led_start);
91 return 0;
92}
93
94__initcall(leds_init);
diff --git a/arch/arm/mach-ns9xxx/Kconfig b/arch/arm/mach-ns9xxx/Kconfig
index 8584ed107991..dd0cd5ac4b8b 100644
--- a/arch/arm/mach-ns9xxx/Kconfig
+++ b/arch/arm/mach-ns9xxx/Kconfig
@@ -2,9 +2,26 @@ if ARCH_NS9XXX
2 2
3menu "NS9xxx Implementations" 3menu "NS9xxx Implementations"
4 4
5config NS9XXX_HAVE_SERIAL8250
6 bool
7
8config PROCESSOR_NS9360
9 bool
10
11config MODULE_CC9P9360
12 bool
13 select PROCESSOR_NS9360
14
15config BOARD_A9M9750DEV
16 select NS9XXX_HAVE_SERIAL8250
17 bool
18
19config BOARD_JSCC9P9360
20 bool
21
5config MACH_CC9P9360DEV 22config MACH_CC9P9360DEV
6 bool "ConnectCore 9P 9360 on an A9M9750 Devboard" 23 bool "ConnectCore 9P 9360 on an A9M9750 Devboard"
7 select PROCESSOR_NS9360 24 select MODULE_CC9P9360
8 select BOARD_A9M9750DEV 25 select BOARD_A9M9750DEV
9 help 26 help
10 Say Y here if you are using the Digi ConnectCore 9P 9360 27 Say Y here if you are using the Digi ConnectCore 9P 9360
@@ -12,21 +29,12 @@ config MACH_CC9P9360DEV
12 29
13config MACH_CC9P9360JS 30config MACH_CC9P9360JS
14 bool "ConnectCore 9P 9360 on a JSCC9P9360 Devboard" 31 bool "ConnectCore 9P 9360 on a JSCC9P9360 Devboard"
15 select PROCESSOR_NS9360 32 select MODULE_CC9P9360
16 select BOARD_JSCC9P9360 33 select BOARD_JSCC9P9360
17 help 34 help
18 Say Y here if you are using the Digi ConnectCore 9P 9360 35 Say Y here if you are using the Digi ConnectCore 9P 9360
19 on an JSCC9P9360 Development Board. 36 on an JSCC9P9360 Development Board.
20 37
21config PROCESSOR_NS9360
22 bool
23
24config BOARD_A9M9750DEV
25 bool
26
27config BOARD_JSCC9P9360
28 bool
29
30endmenu 38endmenu
31 39
32endif 40endif
diff --git a/arch/arm/mach-ns9xxx/Makefile b/arch/arm/mach-ns9xxx/Makefile
index 6fb82b855a55..41efaf9ad50b 100644
--- a/arch/arm/mach-ns9xxx/Makefile
+++ b/arch/arm/mach-ns9xxx/Makefile
@@ -1,7 +1,12 @@
1obj-y := irq.o time.o generic.o gpio.o 1obj-y := clock.o generic.o gpio.o irq.o
2 2
3obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o 3obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o
4obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o 4obj-$(CONFIG_MACH_CC9P9360JS) += mach-cc9p9360js.o
5 5
6obj-$(CONFIG_PROCESSOR_NS9360) += gpio-ns9360.o processor-ns9360.o time-ns9360.o
7
6obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o 8obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o
7obj-$(CONFIG_BOARD_JSCC9P9360) += board-jscc9p9360.o 9obj-$(CONFIG_BOARD_JSCC9P9360) += board-jscc9p9360.o
10
11# platform devices
12obj-$(CONFIG_NS9XXX_HAVE_SERIAL8250) += plat-serial8250.o
diff --git a/arch/arm/mach-ns9xxx/Makefile.boot b/arch/arm/mach-ns9xxx/Makefile.boot
index 75ed64e90fa4..54654919229b 100644
--- a/arch/arm/mach-ns9xxx/Makefile.boot
+++ b/arch/arm/mach-ns9xxx/Makefile.boot
@@ -1,2 +1,2 @@
1zreladdr-y := 0x108000 1zreladdr-y := 0x8000
2params_phys-y := 0x100 2params_phys-y := 0x100
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
index 0f65177f9e5f..a494b71c0195 100644
--- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c
+++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
@@ -8,15 +8,14 @@
8 * under the terms of the GNU General Public License version 2 as published by 8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation. 9 * the Free Software Foundation.
10 */ 10 */
11#include <linux/platform_device.h>
12#include <linux/serial_8250.h>
13#include <linux/irq.h> 11#include <linux/irq.h>
14 12
15#include <asm/mach/map.h> 13#include <asm/mach/map.h>
16#include <asm/gpio.h> 14#include <asm/gpio.h>
17 15
18#include <asm/arch-ns9xxx/board.h> 16#include <asm/arch-ns9xxx/board.h>
19#include <asm/arch-ns9xxx/regs-sys.h> 17#include <asm/arch-ns9xxx/processor-ns9360.h>
18#include <asm/arch-ns9xxx/regs-sys-ns9360.h>
20#include <asm/arch-ns9xxx/regs-mem.h> 19#include <asm/arch-ns9xxx/regs-mem.h>
21#include <asm/arch-ns9xxx/regs-bbu.h> 20#include <asm/arch-ns9xxx/regs-bbu.h>
22#include <asm/arch-ns9xxx/regs-board-a9m9750dev.h> 21#include <asm/arch-ns9xxx/regs-board-a9m9750dev.h>
@@ -105,9 +104,9 @@ void __init board_a9m9750dev_init_irq(void)
105 int i; 104 int i;
106 105
107 if (gpio_request(11, "board a9m9750dev extirq2") == 0) 106 if (gpio_request(11, "board a9m9750dev extirq2") == 0)
108 ns9xxx_gpio_configure(11, 0, 1); 107 ns9360_gpio_configure(11, 0, 1);
109 else 108 else
110 printk(KERN_ERR "%s: cannot get gpio 11 for IRQ_EXT2\n", 109 printk(KERN_ERR "%s: cannot get gpio 11 for IRQ_NS9XXX_EXT2\n",
111 __func__); 110 __func__);
112 111
113 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) { 112 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) {
@@ -116,69 +115,16 @@ void __init board_a9m9750dev_init_irq(void)
116 set_irq_flags(i, IRQF_VALID); 115 set_irq_flags(i, IRQF_VALID);
117 } 116 }
118 117
119 /* IRQ_EXT2: level sensitive + active low */ 118 /* IRQ_NS9XXX_EXT2: level sensitive + active low */
120 eic = __raw_readl(SYS_EIC(2)); 119 eic = __raw_readl(SYS_EIC(2));
121 REGSET(eic, SYS_EIC, PLTY, AL); 120 REGSET(eic, SYS_EIC, PLTY, AL);
122 REGSET(eic, SYS_EIC, LVEDG, LEVEL); 121 REGSET(eic, SYS_EIC, LVEDG, LEVEL);
123 __raw_writel(eic, SYS_EIC(2)); 122 __raw_writel(eic, SYS_EIC(2));
124 123
125 set_irq_chained_handler(IRQ_EXT2, 124 set_irq_chained_handler(IRQ_NS9XXX_EXT2,
126 a9m9750dev_fpga_demux_handler); 125 a9m9750dev_fpga_demux_handler);
127} 126}
128 127
129static struct plat_serial8250_port board_a9m9750dev_serial8250_port[] = {
130 {
131 .iobase = FPGA_UARTA_BASE,
132 .membase = (unsigned char*)FPGA_UARTA_BASE,
133 .mapbase = FPGA_UARTA_BASE,
134 .irq = IRQ_FPGA_UARTA,
135 .iotype = UPIO_MEM,
136 .uartclk = 18432000,
137 .regshift = 0,
138 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
139 }, {
140 .iobase = FPGA_UARTB_BASE,
141 .membase = (unsigned char*)FPGA_UARTB_BASE,
142 .mapbase = FPGA_UARTB_BASE,
143 .irq = IRQ_FPGA_UARTB,
144 .iotype = UPIO_MEM,
145 .uartclk = 18432000,
146 .regshift = 0,
147 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
148 }, {
149 .iobase = FPGA_UARTC_BASE,
150 .membase = (unsigned char*)FPGA_UARTC_BASE,
151 .mapbase = FPGA_UARTC_BASE,
152 .irq = IRQ_FPGA_UARTC,
153 .iotype = UPIO_MEM,
154 .uartclk = 18432000,
155 .regshift = 0,
156 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
157 }, {
158 .iobase = FPGA_UARTD_BASE,
159 .membase = (unsigned char*)FPGA_UARTD_BASE,
160 .mapbase = FPGA_UARTD_BASE,
161 .irq = IRQ_FPGA_UARTD,
162 .iotype = UPIO_MEM,
163 .uartclk = 18432000,
164 .regshift = 0,
165 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
166 }, {
167 /* end marker */
168 },
169};
170
171static struct platform_device board_a9m9750dev_serial_device = {
172 .name = "serial8250",
173 .dev = {
174 .platform_data = board_a9m9750dev_serial8250_port,
175 },
176};
177
178static struct platform_device *board_a9m9750dev_devices[] __initdata = {
179 &board_a9m9750dev_serial_device,
180};
181
182void __init board_a9m9750dev_init_machine(void) 128void __init board_a9m9750dev_init_machine(void)
183{ 129{
184 u32 reg; 130 u32 reg;
@@ -210,7 +156,4 @@ void __init board_a9m9750dev_init_machine(void)
210 __raw_writel(0x2, MEM_SMOED(0)); 156 __raw_writel(0x2, MEM_SMOED(0));
211 __raw_writel(0x6, MEM_SMRD(0)); 157 __raw_writel(0x6, MEM_SMRD(0));
212 __raw_writel(0x6, MEM_SMWD(0)); 158 __raw_writel(0x6, MEM_SMWD(0));
213
214 platform_add_devices(board_a9m9750dev_devices,
215 ARRAY_SIZE(board_a9m9750dev_devices));
216} 159}
diff --git a/arch/arm/mach-ns9xxx/clock.c b/arch/arm/mach-ns9xxx/clock.c
new file mode 100644
index 000000000000..f8639161068f
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/clock.c
@@ -0,0 +1,215 @@
1/*
2 * arch/arm/mach-ns9xxx/clock.c
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/err.h>
12#include <linux/module.h>
13#include <linux/list.h>
14#include <linux/clk.h>
15#include <linux/string.h>
16#include <linux/platform_device.h>
17
18#include <asm/semaphore.h>
19#include "clock.h"
20
21static LIST_HEAD(clocks);
22static DEFINE_SPINLOCK(clk_lock);
23
24struct clk *clk_get(struct device *dev, const char *id)
25{
26 struct clk *p, *ret = NULL, *retgen = NULL;
27 unsigned long flags;
28 int idno;
29
30 if (dev == NULL || dev->bus != &platform_bus_type)
31 idno = -1;
32 else
33 idno = to_platform_device(dev)->id;
34
35 spin_lock_irqsave(&clk_lock, flags);
36 list_for_each_entry(p, &clocks, node) {
37 if (strcmp(id, p->name) == 0) {
38 if (p->id == idno) {
39 if (!try_module_get(p->owner))
40 continue;
41 ret = p;
42 break;
43 } else if (p->id == -1)
44 /* remember match with id == -1 in case there is
45 * no clock for idno */
46 retgen = p;
47 }
48 }
49
50 if (!ret && retgen && try_module_get(retgen->owner))
51 ret = retgen;
52
53 if (ret)
54 ++ret->refcount;
55
56 spin_unlock_irqrestore(&clk_lock, flags);
57
58 return ret ? ret : ERR_PTR(-ENOENT);
59}
60EXPORT_SYMBOL(clk_get);
61
62void clk_put(struct clk *clk)
63{
64 module_put(clk->owner);
65 --clk->refcount;
66}
67EXPORT_SYMBOL(clk_put);
68
69static int clk_enable_unlocked(struct clk *clk)
70{
71 int ret = 0;
72 if (clk->parent) {
73 ret = clk_enable_unlocked(clk->parent);
74 if (ret)
75 return ret;
76 }
77
78 if (clk->usage++ == 0 && clk->endisable)
79 ret = clk->endisable(clk, 1);
80
81 return ret;
82}
83
84int clk_enable(struct clk *clk)
85{
86 int ret;
87 unsigned long flags;
88
89 spin_lock_irqsave(&clk_lock, flags);
90
91 ret = clk_enable_unlocked(clk);
92
93 spin_unlock_irqrestore(&clk_lock, flags);
94
95 return ret;
96}
97EXPORT_SYMBOL(clk_enable);
98
99static void clk_disable_unlocked(struct clk *clk)
100{
101 if (--clk->usage == 0 && clk->endisable)
102 clk->endisable(clk, 0);
103
104 if (clk->parent)
105 clk_disable_unlocked(clk->parent);
106}
107
108void clk_disable(struct clk *clk)
109{
110 unsigned long flags;
111
112 spin_lock_irqsave(&clk_lock, flags);
113
114 clk_disable_unlocked(clk);
115
116 spin_unlock_irqrestore(&clk_lock, flags);
117}
118EXPORT_SYMBOL(clk_disable);
119
120unsigned long clk_get_rate(struct clk *clk)
121{
122 if (clk->get_rate)
123 return clk->get_rate(clk);
124
125 if (clk->rate)
126 return clk->rate;
127
128 if (clk->parent)
129 return clk_get_rate(clk->parent);
130
131 return 0;
132}
133EXPORT_SYMBOL(clk_get_rate);
134
135int clk_register(struct clk *clk)
136{
137 unsigned long flags;
138
139 spin_lock_irqsave(&clk_lock, flags);
140
141 list_add(&clk->node, &clocks);
142
143 if (clk->parent)
144 ++clk->parent->refcount;
145
146 spin_unlock_irqrestore(&clk_lock, flags);
147
148 return 0;
149}
150
151int clk_unregister(struct clk *clk)
152{
153 int ret = 0;
154 unsigned long flags;
155
156 spin_lock_irqsave(&clk_lock, flags);
157
158 if (clk->usage || clk->refcount)
159 ret = -EBUSY;
160 else
161 list_del(&clk->node);
162
163 if (clk->parent)
164 --clk->parent->refcount;
165
166 spin_unlock_irqrestore(&clk_lock, flags);
167
168 return ret;
169}
170
171#if defined CONFIG_DEBUG_FS
172
173#include <linux/debugfs.h>
174#include <linux/seq_file.h>
175
176static int clk_debugfs_show(struct seq_file *s, void *null)
177{
178 unsigned long flags;
179 struct clk *p;
180
181 spin_lock_irqsave(&clk_lock, flags);
182
183 list_for_each_entry(p, &clocks, node)
184 seq_printf(s, "%s.%d: usage=%lu refcount=%lu rate=%lu\n",
185 p->name, p->id, p->usage, p->refcount,
186 p->usage ? clk_get_rate(p) : 0);
187
188 spin_unlock_irqrestore(&clk_lock, flags);
189
190 return 0;
191}
192
193static int clk_debugfs_open(struct inode *inode, struct file *file)
194{
195 return single_open(file, clk_debugfs_show, NULL);
196}
197
198static struct file_operations clk_debugfs_operations = {
199 .open = clk_debugfs_open,
200 .read = seq_read,
201 .llseek = seq_lseek,
202 .release = single_release,
203};
204
205static int __init clk_debugfs_init(void)
206{
207 struct dentry *dentry;
208
209 dentry = debugfs_create_file("clk", S_IFREG | S_IRUGO, NULL, NULL,
210 &clk_debugfs_operations);
211 return IS_ERR(dentry) ? PTR_ERR(dentry) : 0;
212}
213subsys_initcall(clk_debugfs_init);
214
215#endif /* if defined CONFIG_DEBUG_FS */
diff --git a/arch/arm/mach-ns9xxx/clock.h b/arch/arm/mach-ns9xxx/clock.h
new file mode 100644
index 000000000000..b86c30dd79eb
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/clock.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-ns9xxx/clock.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __NS9XXX_CLOCK_H
12#define __NS9XXX_CLOCK_H
13
14#include <linux/list.h>
15
16struct clk {
17 struct module *owner;
18 const char *name;
19 int id;
20
21 struct clk *parent;
22
23 unsigned long rate;
24 int (*endisable)(struct clk *, int enable);
25 unsigned long (*get_rate)(struct clk *);
26
27 struct list_head node;
28 unsigned long refcount;
29 unsigned long usage;
30};
31
32int clk_register(struct clk *clk);
33int clk_unregister(struct clk *clk);
34
35#endif /* ifndef __NS9XXX_CLOCK_H */
diff --git a/arch/arm/mach-ns9xxx/generic.c b/arch/arm/mach-ns9xxx/generic.c
index d742c921e34d..1e0f467879cc 100644
--- a/arch/arm/mach-ns9xxx/generic.c
+++ b/arch/arm/mach-ns9xxx/generic.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/generic.c 2 * arch/arm/mach-ns9xxx/generic.c
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -11,34 +11,9 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/memory.h> 13#include <asm/memory.h>
14#include <asm/page.h>
15#include <asm/mach-types.h>
16#include <asm/mach/map.h>
17#include <asm/arch-ns9xxx/regs-sys.h>
18#include <asm/arch-ns9xxx/regs-mem.h>
19#include <asm/arch-ns9xxx/board.h>
20 14
21#include "generic.h" 15#include "generic.h"
22 16
23static struct map_desc standard_io_desc[] __initdata = {
24 { /* BBus */
25 .virtual = io_p2v(0x90000000),
26 .pfn = __phys_to_pfn(0x90000000),
27 .length = 0x00700000,
28 .type = MT_DEVICE,
29 }, { /* AHB */
30 .virtual = io_p2v(0xa0100000),
31 .pfn = __phys_to_pfn(0xa0100000),
32 .length = 0x00900000,
33 .type = MT_DEVICE,
34 },
35};
36
37void __init ns9xxx_map_io(void)
38{
39 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
40}
41
42void __init ns9xxx_init_machine(void) 17void __init ns9xxx_init_machine(void)
43{ 18{
44} 19}
diff --git a/arch/arm/mach-ns9xxx/generic.h b/arch/arm/mach-ns9xxx/generic.h
index 687e291773f4..82493191aad6 100644
--- a/arch/arm/mach-ns9xxx/generic.h
+++ b/arch/arm/mach-ns9xxx/generic.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/generic.h 2 * arch/arm/mach-ns9xxx/generic.h
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -13,7 +13,4 @@
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15void __init ns9xxx_init_irq(void); 15void __init ns9xxx_init_irq(void);
16void __init ns9xxx_map_io(void);
17void __init ns9xxx_init_machine(void); 16void __init ns9xxx_init_machine(void);
18
19extern struct sys_timer ns9xxx_timer;
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.c b/arch/arm/mach-ns9xxx/gpio-ns9360.c
new file mode 100644
index 000000000000..cabfb879dda9
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/gpio-ns9360.c
@@ -0,0 +1,118 @@
1/*
2 * arch/arm/mach-ns9xxx/gpio-ns9360.c
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/bug.h>
12#include <linux/errno.h>
13#include <linux/io.h>
14#include <linux/kernel.h>
15#include <linux/module.h>
16
17#include <asm/arch-ns9xxx/regs-bbu.h>
18#include <asm/arch-ns9xxx/processor-ns9360.h>
19
20#include "gpio-ns9360.h"
21
22static inline int ns9360_valid_gpio(unsigned gpio)
23{
24 return gpio <= 72;
25}
26
27static inline void __iomem *ns9360_gpio_get_gconfaddr(unsigned gpio)
28{
29 if (gpio < 56)
30 return BBU_GCONFb1(gpio / 8);
31 else
32 /*
33 * this could be optimised away on
34 * ns9750 only builds, but it isn't ...
35 */
36 return BBU_GCONFb2((gpio - 56) / 8);
37}
38
39static inline void __iomem *ns9360_gpio_get_gctrladdr(unsigned gpio)
40{
41 if (gpio < 32)
42 return BBU_GCTRL1;
43 else if (gpio < 64)
44 return BBU_GCTRL2;
45 else
46 /* this could be optimised away on ns9750 only builds */
47 return BBU_GCTRL3;
48}
49
50static inline void __iomem *ns9360_gpio_get_gstataddr(unsigned gpio)
51{
52 if (gpio < 32)
53 return BBU_GSTAT1;
54 else if (gpio < 64)
55 return BBU_GSTAT2;
56 else
57 /* this could be optimised away on ns9750 only builds */
58 return BBU_GSTAT3;
59}
60
61/*
62 * each gpio can serve for 4 different purposes [0..3]. These are called
63 * "functions" and passed in the parameter func. Functions 0-2 are always some
64 * special things, function 3 is GPIO. If func == 3 dir specifies input or
65 * output, and with inv you can enable an inverter (independent of func).
66 */
67int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func)
68{
69 void __iomem *conf = ns9360_gpio_get_gconfaddr(gpio);
70 u32 confval;
71
72 confval = __raw_readl(conf);
73 REGSETIM_IDX(confval, BBU_GCONFx, DIR, gpio & 7, dir);
74 REGSETIM_IDX(confval, BBU_GCONFx, INV, gpio & 7, inv);
75 REGSETIM_IDX(confval, BBU_GCONFx, FUNC, gpio & 7, func);
76 __raw_writel(confval, conf);
77
78 return 0;
79}
80
81int ns9360_gpio_configure(unsigned gpio, int inv, int func)
82{
83 if (likely(ns9360_valid_gpio(gpio))) {
84 if (func == 3) {
85 printk(KERN_WARNING "use gpio_direction_input "
86 "or gpio_direction_output\n");
87 return -EINVAL;
88 } else
89 return __ns9360_gpio_configure(gpio, 0, inv, func);
90 } else
91 return -EINVAL;
92}
93EXPORT_SYMBOL(ns9360_gpio_configure);
94
95int ns9360_gpio_get_value(unsigned gpio)
96{
97 void __iomem *stat = ns9360_gpio_get_gstataddr(gpio);
98 int ret;
99
100 ret = 1 & (__raw_readl(stat) >> (gpio & 31));
101
102 return ret;
103}
104
105void ns9360_gpio_set_value(unsigned gpio, int value)
106{
107 void __iomem *ctrl = ns9360_gpio_get_gctrladdr(gpio);
108 u32 ctrlval;
109
110 ctrlval = __raw_readl(ctrl);
111
112 if (value)
113 ctrlval |= 1 << (gpio & 31);
114 else
115 ctrlval &= ~(1 << (gpio & 31));
116
117 __raw_writel(ctrlval, ctrl);
118}
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.h b/arch/arm/mach-ns9xxx/gpio-ns9360.h
new file mode 100644
index 000000000000..131cd1715caa
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/gpio-ns9360.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-ns9xxx/gpio-ns9360.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11int __ns9360_gpio_configure(unsigned gpio, int dir, int inv, int func);
12int ns9360_gpio_get_value(unsigned gpio);
13void ns9360_gpio_set_value(unsigned gpio, int value);
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c
index 5286e9fc1d30..b3c963b0c8f5 100644
--- a/arch/arm/mach-ns9xxx/gpio.c
+++ b/arch/arm/mach-ns9xxx/gpio.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/gpio.c 2 * arch/arm/mach-ns9xxx/gpio.c
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -15,12 +15,13 @@
15 15
16#include <asm/arch-ns9xxx/gpio.h> 16#include <asm/arch-ns9xxx/gpio.h>
17#include <asm/arch-ns9xxx/processor.h> 17#include <asm/arch-ns9xxx/processor.h>
18#include <asm/arch-ns9xxx/regs-bbu.h> 18#include <asm/arch-ns9xxx/processor-ns9360.h>
19#include <asm/io.h>
20#include <asm/bug.h> 19#include <asm/bug.h>
21#include <asm/types.h> 20#include <asm/types.h>
22#include <asm/bitops.h> 21#include <asm/bitops.h>
23 22
23#include "gpio-ns9360.h"
24
24#if defined(CONFIG_PROCESSOR_NS9360) 25#if defined(CONFIG_PROCESSOR_NS9360)
25#define GPIO_MAX 72 26#define GPIO_MAX 72
26#elif defined(CONFIG_PROCESSOR_NS9750) 27#elif defined(CONFIG_PROCESSOR_NS9750)
@@ -45,41 +46,10 @@ static inline int ns9xxx_valid_gpio(unsigned gpio)
45 return gpio <= 49; 46 return gpio <= 49;
46 else 47 else
47#endif 48#endif
49 {
48 BUG(); 50 BUG();
49} 51 return 0;
50 52 }
51static inline void __iomem *ns9xxx_gpio_get_gconfaddr(unsigned gpio)
52{
53 if (gpio < 56)
54 return BBU_GCONFb1(gpio / 8);
55 else
56 /*
57 * this could be optimised away on
58 * ns9750 only builds, but it isn't ...
59 */
60 return BBU_GCONFb2((gpio - 56) / 8);
61}
62
63static inline void __iomem *ns9xxx_gpio_get_gctrladdr(unsigned gpio)
64{
65 if (gpio < 32)
66 return BBU_GCTRL1;
67 else if (gpio < 64)
68 return BBU_GCTRL2;
69 else
70 /* this could be optimised away on ns9750 only builds */
71 return BBU_GCTRL3;
72}
73
74static inline void __iomem *ns9xxx_gpio_get_gstataddr(unsigned gpio)
75{
76 if (gpio < 32)
77 return BBU_GSTAT1;
78 else if (gpio < 64)
79 return BBU_GSTAT2;
80 else
81 /* this could be optimised away on ns9750 only builds */
82 return BBU_GSTAT3;
83} 53}
84 54
85int gpio_request(unsigned gpio, const char *label) 55int gpio_request(unsigned gpio, const char *label)
@@ -98,49 +68,24 @@ void gpio_free(unsigned gpio)
98} 68}
99EXPORT_SYMBOL(gpio_free); 69EXPORT_SYMBOL(gpio_free);
100 70
101/* 71int gpio_direction_input(unsigned gpio)
102 * each gpio can serve for 4 different purposes [0..3]. These are called
103 * "functions" and passed in the parameter func. Functions 0-2 are always some
104 * special things, function 3 is GPIO. If func == 3 dir specifies input or
105 * output, and with inv you can enable an inverter (independent of func).
106 */
107static int __ns9xxx_gpio_configure(unsigned gpio, int dir, int inv, int func)
108{ 72{
109 void __iomem *conf = ns9xxx_gpio_get_gconfaddr(gpio); 73 if (likely(ns9xxx_valid_gpio(gpio))) {
110 u32 confval; 74 int ret = -EINVAL;
111 unsigned long flags; 75 unsigned long flags;
112
113 spin_lock_irqsave(&gpio_lock, flags);
114
115 confval = __raw_readl(conf);
116 REGSETIM_IDX(confval, BBU_GCONFx, DIR, gpio & 7, dir);
117 REGSETIM_IDX(confval, BBU_GCONFx, INV, gpio & 7, inv);
118 REGSETIM_IDX(confval, BBU_GCONFx, FUNC, gpio & 7, func);
119 __raw_writel(confval, conf);
120 76
121 spin_unlock_irqrestore(&gpio_lock, flags); 77 spin_lock_irqsave(&gpio_lock, flags);
78#if defined(CONFIG_PROCESSOR_NS9360)
79 if (processor_is_ns9360())
80 ret = __ns9360_gpio_configure(gpio, 0, 0, 3);
81 else
82#endif
83 BUG();
122 84
123 return 0; 85 spin_unlock_irqrestore(&gpio_lock, flags);
124}
125 86
126int ns9xxx_gpio_configure(unsigned gpio, int inv, int func) 87 return ret;
127{
128 if (likely(ns9xxx_valid_gpio(gpio))) {
129 if (func == 3) {
130 printk(KERN_WARNING "use gpio_direction_input "
131 "or gpio_direction_output\n");
132 return -EINVAL;
133 } else
134 return __ns9xxx_gpio_configure(gpio, 0, inv, func);
135 } else
136 return -EINVAL;
137}
138EXPORT_SYMBOL(ns9xxx_gpio_configure);
139 88
140int gpio_direction_input(unsigned gpio)
141{
142 if (likely(ns9xxx_valid_gpio(gpio))) {
143 return __ns9xxx_gpio_configure(gpio, 0, 0, 3);
144 } else 89 } else
145 return -EINVAL; 90 return -EINVAL;
146} 91}
@@ -149,9 +94,22 @@ EXPORT_SYMBOL(gpio_direction_input);
149int gpio_direction_output(unsigned gpio, int value) 94int gpio_direction_output(unsigned gpio, int value)
150{ 95{
151 if (likely(ns9xxx_valid_gpio(gpio))) { 96 if (likely(ns9xxx_valid_gpio(gpio))) {
97 int ret = -EINVAL;
98 unsigned long flags;
99
152 gpio_set_value(gpio, value); 100 gpio_set_value(gpio, value);
153 101
154 return __ns9xxx_gpio_configure(gpio, 1, 0, 3); 102 spin_lock_irqsave(&gpio_lock, flags);
103#if defined(CONFIG_PROCESSOR_NS9360)
104 if (processor_is_ns9360())
105 ret = __ns9360_gpio_configure(gpio, 1, 0, 3);
106 else
107#endif
108 BUG();
109
110 spin_unlock_irqrestore(&gpio_lock, flags);
111
112 return ret;
155 } else 113 } else
156 return -EINVAL; 114 return -EINVAL;
157} 115}
@@ -159,31 +117,28 @@ EXPORT_SYMBOL(gpio_direction_output);
159 117
160int gpio_get_value(unsigned gpio) 118int gpio_get_value(unsigned gpio)
161{ 119{
162 void __iomem *stat = ns9xxx_gpio_get_gstataddr(gpio); 120#if defined(CONFIG_PROCESSOR_NS9360)
163 int ret; 121 if (processor_is_ns9360())
164 122 return ns9360_gpio_get_value(gpio);
165 ret = 1 & (__raw_readl(stat) >> (gpio & 31)); 123 else
166 124#endif
167 return ret; 125 {
126 BUG();
127 return -EINVAL;
128 }
168} 129}
169EXPORT_SYMBOL(gpio_get_value); 130EXPORT_SYMBOL(gpio_get_value);
170 131
171void gpio_set_value(unsigned gpio, int value) 132void gpio_set_value(unsigned gpio, int value)
172{ 133{
173 void __iomem *ctrl = ns9xxx_gpio_get_gctrladdr(gpio);
174 u32 ctrlval;
175 unsigned long flags; 134 unsigned long flags;
176
177 spin_lock_irqsave(&gpio_lock, flags); 135 spin_lock_irqsave(&gpio_lock, flags);
178 136#if defined(CONFIG_PROCESSOR_NS9360)
179 ctrlval = __raw_readl(ctrl); 137 if (processor_is_ns9360())
180 138 ns9360_gpio_set_value(gpio, value);
181 if (value)
182 ctrlval |= 1 << (gpio & 31);
183 else 139 else
184 ctrlval &= ~(1 << (gpio & 31)); 140#endif
185 141 BUG();
186 __raw_writel(ctrlval, ctrl);
187 142
188 spin_unlock_irqrestore(&gpio_lock, flags); 143 spin_unlock_irqrestore(&gpio_lock, flags);
189} 144}
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index 00001b874e97..36e5835e6097 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -9,21 +9,27 @@
9 * the Free Software Foundation. 9 * the Free Software Foundation.
10 */ 10 */
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <linux/kernel_stat.h>
12#include <asm/io.h> 13#include <asm/io.h>
13#include <asm/mach/irq.h> 14#include <asm/mach/irq.h>
14#include <asm/mach-types.h> 15#include <asm/mach-types.h>
15#include <asm/arch-ns9xxx/regs-sys.h> 16#include <asm/arch-ns9xxx/regs-sys-common.h>
16#include <asm/arch-ns9xxx/irqs.h> 17#include <asm/arch-ns9xxx/irqs.h>
17#include <asm/arch-ns9xxx/board.h> 18#include <asm/arch-ns9xxx/board.h>
18 19
19#include "generic.h" 20#include "generic.h"
20 21
22/* simple interrupt prio table: prio(x) < prio(y) <=> x < y */
23#define irq2prio(i) (i)
24#define prio2irq(p) (p)
25
21static void ns9xxx_mask_irq(unsigned int irq) 26static void ns9xxx_mask_irq(unsigned int irq)
22{ 27{
23 /* XXX: better use cpp symbols */ 28 /* XXX: better use cpp symbols */
24 u32 ic = __raw_readl(SYS_IC(irq / 4)); 29 int prio = irq2prio(irq);
25 ic &= ~(1 << (7 + 8 * (3 - (irq & 3)))); 30 u32 ic = __raw_readl(SYS_IC(prio / 4));
26 __raw_writel(ic, SYS_IC(irq / 4)); 31 ic &= ~(1 << (7 + 8 * (3 - (prio & 3))));
32 __raw_writel(ic, SYS_IC(prio / 4));
27} 33}
28 34
29static void ns9xxx_ack_irq(unsigned int irq) 35static void ns9xxx_ack_irq(unsigned int irq)
@@ -40,9 +46,10 @@ static void ns9xxx_maskack_irq(unsigned int irq)
40static void ns9xxx_unmask_irq(unsigned int irq) 46static void ns9xxx_unmask_irq(unsigned int irq)
41{ 47{
42 /* XXX: better use cpp symbols */ 48 /* XXX: better use cpp symbols */
43 u32 ic = __raw_readl(SYS_IC(irq / 4)); 49 int prio = irq2prio(irq);
44 ic |= 1 << (7 + 8 * (3 - (irq & 3))); 50 u32 ic = __raw_readl(SYS_IC(prio / 4));
45 __raw_writel(ic, SYS_IC(irq / 4)); 51 ic |= 1 << (7 + 8 * (3 - (prio & 3)));
52 __raw_writel(ic, SYS_IC(prio / 4));
46} 53}
47 54
48static struct irq_chip ns9xxx_chip = { 55static struct irq_chip ns9xxx_chip = {
@@ -52,24 +59,61 @@ static struct irq_chip ns9xxx_chip = {
52 .unmask = ns9xxx_unmask_irq, 59 .unmask = ns9xxx_unmask_irq,
53}; 60};
54 61
62#if 0
63#define handle_irq handle_level_irq
64#else
65void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
66{
67 unsigned int cpu = smp_processor_id();
68 struct irqaction *action;
69 irqreturn_t action_ret;
70
71 spin_lock(&desc->lock);
72
73 if (unlikely(desc->status & IRQ_INPROGRESS))
74 goto out_unlock;
75
76 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
77 kstat_cpu(cpu).irqs[irq]++;
78
79 action = desc->action;
80 if (unlikely(!action || (desc->status & IRQ_DISABLED)))
81 goto out_unlock;
82
83 desc->status |= IRQ_INPROGRESS;
84 spin_unlock(&desc->lock);
85
86 action_ret = handle_IRQ_event(irq, action);
87
88 spin_lock(&desc->lock);
89 desc->status &= ~IRQ_INPROGRESS;
90 if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
91 desc->chip->ack(irq);
92
93out_unlock:
94 spin_unlock(&desc->lock);
95}
96#define handle_irq handle_prio_irq
97#endif
98
55void __init ns9xxx_init_irq(void) 99void __init ns9xxx_init_irq(void)
56{ 100{
57 int i; 101 int i;
58 102
59 /* disable all IRQs */ 103 /* disable all IRQs */
60 for (i = 0; i < 8; ++i) 104 for (i = 0; i < 8; ++i)
61 __raw_writel((4 * i) << 24 | (4 * i + 1) << 16 | 105 __raw_writel(prio2irq(4 * i) << 24 |
62 (4 * i + 2) << 8 | (4 * i + 3), SYS_IC(i)); 106 prio2irq(4 * i + 1) << 16 |
107 prio2irq(4 * i + 2) << 8 |
108 prio2irq(4 * i + 3),
109 SYS_IC(i));
63 110
64 /* simple interrupt prio table:
65 * prio(x) < prio(y) <=> x < y
66 */
67 for (i = 0; i < 32; ++i) 111 for (i = 0; i < 32; ++i)
68 __raw_writel(i, SYS_IVA(i)); 112 __raw_writel(prio2irq(i), SYS_IVA(i));
69 113
70 for (i = IRQ_WATCHDOG; i <= IRQ_EXT3; ++i) { 114 for (i = 0; i <= 31; ++i) {
71 set_irq_chip(i, &ns9xxx_chip); 115 set_irq_chip(i, &ns9xxx_chip);
72 set_irq_handler(i, handle_level_irq); 116 set_irq_handler(i, handle_irq);
73 set_irq_flags(i, IRQF_VALID); 117 set_irq_flags(i, IRQF_VALID);
74 } 118 }
75} 119}
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
index 760c9d0db7c3..9623fff6b3bc 100644
--- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/mach-cc9p9360dev.c 2 * arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -11,12 +11,14 @@
11#include <asm/mach/arch.h> 11#include <asm/mach/arch.h>
12#include <asm/mach-types.h> 12#include <asm/mach-types.h>
13 13
14#include <asm/arch-ns9xxx/processor-ns9360.h>
15
14#include "board-a9m9750dev.h" 16#include "board-a9m9750dev.h"
15#include "generic.h" 17#include "generic.h"
16 18
17static void __init mach_cc9p9360dev_map_io(void) 19static void __init mach_cc9p9360dev_map_io(void)
18{ 20{
19 ns9xxx_map_io(); 21 ns9360_map_io();
20 board_a9m9750dev_map_io(); 22 board_a9m9750dev_map_io();
21} 23}
22 24
@@ -36,6 +38,6 @@ MACHINE_START(CC9P9360DEV, "Digi ConnectCore 9P 9360 on an A9M9750 Devboard")
36 .map_io = mach_cc9p9360dev_map_io, 38 .map_io = mach_cc9p9360dev_map_io,
37 .init_irq = mach_cc9p9360dev_init_irq, 39 .init_irq = mach_cc9p9360dev_init_irq,
38 .init_machine = mach_cc9p9360dev_init_machine, 40 .init_machine = mach_cc9p9360dev_init_machine,
39 .timer = &ns9xxx_timer, 41 .timer = &ns9360_timer,
40 .boot_params = 0x100, 42 .boot_params = 0x100,
41MACHINE_END 43MACHINE_END
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
index 85c8b41105c9..fcc815bdd291 100644
--- a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/mach-cc9p9360js.c 2 * arch/arm/mach-ns9xxx/mach-cc9p9360js.c
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -11,6 +11,8 @@
11#include <asm/mach/arch.h> 11#include <asm/mach/arch.h>
12#include <asm/mach-types.h> 12#include <asm/mach-types.h>
13 13
14#include <asm/arch-ns9xxx/processor-ns9360.h>
15
14#include "board-jscc9p9360.h" 16#include "board-jscc9p9360.h"
15#include "generic.h" 17#include "generic.h"
16 18
@@ -21,9 +23,9 @@ static void __init mach_cc9p9360js_init_machine(void)
21} 23}
22 24
23MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard") 25MACHINE_START(CC9P9360JS, "Digi ConnectCore 9P 9360 on an JSCC9P9360 Devboard")
24 .map_io = ns9xxx_map_io, 26 .map_io = ns9360_map_io,
25 .init_irq = ns9xxx_init_irq, 27 .init_irq = ns9xxx_init_irq,
26 .init_machine = mach_cc9p9360js_init_machine, 28 .init_machine = mach_cc9p9360js_init_machine,
27 .timer = &ns9xxx_timer, 29 .timer = &ns9360_timer,
28 .boot_params = 0x100, 30 .boot_params = 0x100,
29MACHINE_END 31MACHINE_END
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c
new file mode 100644
index 000000000000..5aa5d9baf8c8
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/plat-serial8250.c
@@ -0,0 +1,69 @@
1/*
2 * arch/arm/mach-ns9xxx/plat-serial8250.c
3 *
4 * Copyright (C) 2008 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/platform_device.h>
12#include <linux/serial_8250.h>
13
14#include <asm/arch-ns9xxx/regs-board-a9m9750dev.h>
15#include <asm/arch-ns9xxx/board.h>
16
17#define DRIVER_NAME "serial8250"
18
19static int __init ns9xxx_plat_serial8250_init(void)
20{
21 struct plat_serial8250_port *pdata;
22 struct platform_device *pdev;
23 int ret = -ENOMEM;
24 int i;
25
26 if (!board_is_a9m9750dev())
27 return -ENODEV;
28
29 pdev = platform_device_alloc(DRIVER_NAME, 0);
30 if (!pdev)
31 goto err;
32
33 pdata = kzalloc(5 * sizeof(*pdata), GFP_KERNEL);
34 if (!pdata)
35 goto err;
36
37 pdev->dev.platform_data = pdata;
38
39 pdata[0].iobase = FPGA_UARTA_BASE;
40 pdata[1].iobase = FPGA_UARTB_BASE;
41 pdata[2].iobase = FPGA_UARTC_BASE;
42 pdata[3].iobase = FPGA_UARTD_BASE;
43
44 for (i = 0; i < 4; ++i) {
45 pdata[i].membase = (void __iomem *)pdata[i].iobase;
46 pdata[i].mapbase = pdata[i].iobase;
47 pdata[i].iotype = UPIO_MEM;
48 pdata[i].uartclk = 18432000;
49 pdata[i].flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
50 }
51
52 pdata[0].irq = IRQ_FPGA_UARTA;
53 pdata[1].irq = IRQ_FPGA_UARTB;
54 pdata[2].irq = IRQ_FPGA_UARTC;
55 pdata[3].irq = IRQ_FPGA_UARTD;
56
57 ret = platform_device_add(pdev);
58 if (ret) {
59err:
60 platform_device_put(pdev);
61
62 printk(KERN_WARNING "Could not add %s (errno=%d)\n",
63 DRIVER_NAME, ret);
64 }
65
66 return 0;
67}
68
69arch_initcall(ns9xxx_plat_serial8250_init);
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c
new file mode 100644
index 000000000000..2bee0b7fccbb
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/processor-ns9360.c
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/mach-ns9xxx/processor-ns9360.c
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/io.h>
12#include <linux/kernel.h>
13#include <linux/slab.h>
14
15#include <asm/page.h>
16#include <asm/mach/map.h>
17#include <asm/arch-ns9xxx/processor-ns9360.h>
18#include <asm/arch-ns9xxx/regs-sys-ns9360.h>
19
20void ns9360_reset(char mode)
21{
22 u32 reg;
23
24 reg = __raw_readl(SYS_PLL) >> 16;
25 REGSET(reg, SYS_PLL, SWC, YES);
26 __raw_writel(reg, SYS_PLL);
27}
28
29#define CRYSTAL 29491200 /* Hz */
30unsigned long ns9360_systemclock(void)
31{
32 u32 pll = __raw_readl(SYS_PLL);
33 return CRYSTAL * (REGGETIM(pll, SYS_PLL, ND) + 1)
34 >> REGGETIM(pll, SYS_PLL, FS);
35}
36
37static struct map_desc ns9360_io_desc[] __initdata = {
38 { /* BBus */
39 .virtual = io_p2v(0x90000000),
40 .pfn = __phys_to_pfn(0x90000000),
41 .length = 0x00700000,
42 .type = MT_DEVICE,
43 }, { /* AHB */
44 .virtual = io_p2v(0xa0100000),
45 .pfn = __phys_to_pfn(0xa0100000),
46 .length = 0x00900000,
47 .type = MT_DEVICE,
48 },
49};
50
51void __init ns9360_map_io(void)
52{
53 iotable_init(ns9360_io_desc, ARRAY_SIZE(ns9360_io_desc));
54}
diff --git a/arch/arm/mach-ns9xxx/time.c b/arch/arm/mach-ns9xxx/time-ns9360.c
index c3dd1f4acb99..4d573c9793ed 100644
--- a/arch/arm/mach-ns9xxx/time.c
+++ b/arch/arm/mach-ns9xxx/time-ns9360.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ns9xxx/time.c 2 * arch/arm/mach-ns9xxx/time-ns9360.c
3 * 3 *
4 * Copyright (C) 2006 by Digi International Inc. 4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved. 5 * All rights reserved.
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
@@ -15,8 +15,8 @@
15#include <linux/clocksource.h> 15#include <linux/clocksource.h>
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17 17
18#include <asm/arch-ns9xxx/regs-sys.h> 18#include <asm/arch-ns9xxx/processor-ns9360.h>
19#include <asm/arch-ns9xxx/clock.h> 19#include <asm/arch-ns9xxx/regs-sys-ns9360.h>
20#include <asm/arch-ns9xxx/irqs.h> 20#include <asm/arch-ns9xxx/irqs.h>
21#include <asm/arch/system.h> 21#include <asm/arch/system.h>
22#include "generic.h" 22#include "generic.h"
@@ -25,26 +25,26 @@
25#define TIMER_CLOCKEVENT 1 25#define TIMER_CLOCKEVENT 1
26static u32 latch; 26static u32 latch;
27 27
28static cycle_t ns9xxx_clocksource_read(void) 28static cycle_t ns9360_clocksource_read(void)
29{ 29{
30 return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE)); 30 return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE));
31} 31}
32 32
33static struct clocksource ns9xxx_clocksource = { 33static struct clocksource ns9360_clocksource = {
34 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKSOURCE), 34 .name = "ns9360-timer" __stringify(TIMER_CLOCKSOURCE),
35 .rating = 300, 35 .rating = 300,
36 .read = ns9xxx_clocksource_read, 36 .read = ns9360_clocksource_read,
37 .mask = CLOCKSOURCE_MASK(32), 37 .mask = CLOCKSOURCE_MASK(32),
38 .shift = 20, 38 .shift = 20,
39 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 39 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
40}; 40};
41 41
42static void ns9xxx_clockevent_setmode(enum clock_event_mode mode, 42static void ns9360_clockevent_setmode(enum clock_event_mode mode,
43 struct clock_event_device *clk) 43 struct clock_event_device *clk)
44{ 44{
45 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); 45 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
46 46
47 switch(mode) { 47 switch (mode) {
48 case CLOCK_EVT_MODE_PERIODIC: 48 case CLOCK_EVT_MODE_PERIODIC:
49 __raw_writel(latch, SYS_TRC(TIMER_CLOCKEVENT)); 49 __raw_writel(latch, SYS_TRC(TIMER_CLOCKEVENT));
50 REGSET(tc, SYS_TCx, REN, EN); 50 REGSET(tc, SYS_TCx, REN, EN);
@@ -69,7 +69,7 @@ static void ns9xxx_clockevent_setmode(enum clock_event_mode mode,
69 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); 69 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
70} 70}
71 71
72static int ns9xxx_clockevent_setnextevent(unsigned long evt, 72static int ns9360_clockevent_setnextevent(unsigned long evt,
73 struct clock_event_device *clk) 73 struct clock_event_device *clk)
74{ 74{
75 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); 75 u32 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
@@ -88,20 +88,20 @@ static int ns9xxx_clockevent_setnextevent(unsigned long evt,
88 return 0; 88 return 0;
89} 89}
90 90
91static struct clock_event_device ns9xxx_clockevent_device = { 91static struct clock_event_device ns9360_clockevent_device = {
92 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKEVENT), 92 .name = "ns9360-timer" __stringify(TIMER_CLOCKEVENT),
93 .shift = 20, 93 .shift = 20,
94 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 94 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
95 .set_mode = ns9xxx_clockevent_setmode, 95 .set_mode = ns9360_clockevent_setmode,
96 .set_next_event = ns9xxx_clockevent_setnextevent, 96 .set_next_event = ns9360_clockevent_setnextevent,
97}; 97};
98 98
99static irqreturn_t ns9xxx_clockevent_handler(int irq, void *dev_id) 99static irqreturn_t ns9360_clockevent_handler(int irq, void *dev_id)
100{ 100{
101 int timerno = irq - IRQ_TIMER0; 101 int timerno = irq - IRQ_NS9360_TIMER0;
102 u32 tc; 102 u32 tc;
103 103
104 struct clock_event_device *evt = &ns9xxx_clockevent_device; 104 struct clock_event_device *evt = &ns9360_clockevent_device;
105 105
106 /* clear irq */ 106 /* clear irq */
107 tc = __raw_readl(SYS_TC(timerno)); 107 tc = __raw_readl(SYS_TC(timerno));
@@ -119,13 +119,13 @@ static irqreturn_t ns9xxx_clockevent_handler(int irq, void *dev_id)
119 return IRQ_HANDLED; 119 return IRQ_HANDLED;
120} 120}
121 121
122static struct irqaction ns9xxx_clockevent_action = { 122static struct irqaction ns9360_clockevent_action = {
123 .name = "ns9xxx-timer" __stringify(TIMER_CLOCKEVENT), 123 .name = "ns9360-timer" __stringify(TIMER_CLOCKEVENT),
124 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 124 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
125 .handler = ns9xxx_clockevent_handler, 125 .handler = ns9360_clockevent_handler,
126}; 126};
127 127
128static void __init ns9xxx_timer_init(void) 128static void __init ns9360_timer_init(void)
129{ 129{
130 int tc; 130 int tc;
131 131
@@ -148,12 +148,12 @@ static void __init ns9xxx_timer_init(void)
148 148
149 __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE)); 149 __raw_writel(tc, SYS_TC(TIMER_CLOCKSOURCE));
150 150
151 ns9xxx_clocksource.mult = clocksource_hz2mult(ns9xxx_cpuclock(), 151 ns9360_clocksource.mult = clocksource_hz2mult(ns9360_cpuclock(),
152 ns9xxx_clocksource.shift); 152 ns9360_clocksource.shift);
153 153
154 clocksource_register(&ns9xxx_clocksource); 154 clocksource_register(&ns9360_clocksource);
155 155
156 latch = SH_DIV(ns9xxx_cpuclock(), HZ, 0); 156 latch = SH_DIV(ns9360_cpuclock(), HZ, 0);
157 157
158 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT)); 158 tc = __raw_readl(SYS_TC(TIMER_CLOCKEVENT));
159 REGSET(tc, SYS_TCx, TEN, DIS); 159 REGSET(tc, SYS_TCx, TEN, DIS);
@@ -166,19 +166,20 @@ static void __init ns9xxx_timer_init(void)
166 REGSET(tc, SYS_TCx, REN, EN); 166 REGSET(tc, SYS_TCx, REN, EN);
167 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT)); 167 __raw_writel(tc, SYS_TC(TIMER_CLOCKEVENT));
168 168
169 ns9xxx_clockevent_device.mult = div_sc(ns9xxx_cpuclock(), 169 ns9360_clockevent_device.mult = div_sc(ns9360_cpuclock(),
170 NSEC_PER_SEC, ns9xxx_clockevent_device.shift); 170 NSEC_PER_SEC, ns9360_clockevent_device.shift);
171 ns9xxx_clockevent_device.max_delta_ns = 171 ns9360_clockevent_device.max_delta_ns =
172 clockevent_delta2ns(-1, &ns9xxx_clockevent_device); 172 clockevent_delta2ns(-1, &ns9360_clockevent_device);
173 ns9xxx_clockevent_device.min_delta_ns = 173 ns9360_clockevent_device.min_delta_ns =
174 clockevent_delta2ns(1, &ns9xxx_clockevent_device); 174 clockevent_delta2ns(1, &ns9360_clockevent_device);
175 175
176 ns9xxx_clockevent_device.cpumask = cpumask_of_cpu(0); 176 ns9360_clockevent_device.cpumask = cpumask_of_cpu(0);
177 clockevents_register_device(&ns9xxx_clockevent_device); 177 clockevents_register_device(&ns9360_clockevent_device);
178 178
179 setup_irq(IRQ_TIMER0 + TIMER_CLOCKEVENT, &ns9xxx_clockevent_action); 179 setup_irq(IRQ_NS9360_TIMER0 + TIMER_CLOCKEVENT,
180 &ns9360_clockevent_action);
180} 181}
181 182
182struct sys_timer ns9xxx_timer = { 183struct sys_timer ns9360_timer = {
183 .init = ns9xxx_timer_init, 184 .init = ns9360_timer_init,
184}; 185};
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 015a66b3ca8e..c06f5254c0f3 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -5,7 +5,8 @@
5# Common support 5# Common support
6obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o 6obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o
7 7
8obj-$(CONFIG_OMAP_MPU_TIMER) += time.o 8obj-$(CONFIG_OMAP_MPU_TIMER) += time.o
9obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
9 10
10# Power Management 11# Power Management
11obj-$(CONFIG_PM) += pm.o sleep.o 12obj-$(CONFIG_PM) += pm.o sleep.o
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 5279e35a8aec..4f9baba7d893 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -32,6 +32,7 @@
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
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 36
36#include <linux/mtd/mtd.h> 37#include <linux/mtd/mtd.h>
37#include <linux/mtd/partitions.h> 38#include <linux/mtd/partitions.h>
@@ -183,11 +184,80 @@ static struct platform_device *osk5912_devices[] __initdata = {
183 &osk5912_mcbsp1_device, 184 &osk5912_mcbsp1_device,
184}; 185};
185 186
187static struct gpio_led tps_leds[] = {
188 /* NOTE: D9 and D2 have hardware blink support.
189 * Also, D9 requires non-battery power.
190 */
191 { .gpio = OSK_TPS_GPIO_LED_D9, .name = "d9", },
192 { .gpio = OSK_TPS_GPIO_LED_D2, .name = "d2", },
193 { .gpio = OSK_TPS_GPIO_LED_D3, .name = "d3", .active_low = 1,
194 .default_trigger = "heartbeat", },
195};
196
197static struct gpio_led_platform_data tps_leds_data = {
198 .num_leds = 3,
199 .leds = tps_leds,
200};
201
202static struct platform_device osk5912_tps_leds = {
203 .name = "leds-gpio",
204 .id = 0,
205 .dev.platform_data = &tps_leds_data,
206};
207
208static int osk_tps_setup(struct i2c_client *client, void *context)
209{
210 /* Set GPIO 1 HIGH to disable VBUS power supply;
211 * OHCI driver powers it up/down as needed.
212 */
213 gpio_request(OSK_TPS_GPIO_USB_PWR_EN, "n_vbus_en");
214 gpio_direction_output(OSK_TPS_GPIO_USB_PWR_EN, 1);
215
216 /* Set GPIO 2 high so LED D3 is off by default */
217 tps65010_set_gpio_out_value(GPIO2, HIGH);
218
219 /* Set GPIO 3 low to take ethernet out of reset */
220 gpio_request(OSK_TPS_GPIO_LAN_RESET, "smc_reset");
221 gpio_direction_output(OSK_TPS_GPIO_LAN_RESET, 0);
222
223 /* GPIO4 is VDD_DSP */
224 gpio_request(OSK_TPS_GPIO_DSP_PWR_EN, "dsp_power");
225 gpio_direction_output(OSK_TPS_GPIO_DSP_PWR_EN, 1);
226 /* REVISIT if DSP support isn't configured, power it off ... */
227
228 /* Let LED1 (D9) blink; leds-gpio may override it */
229 tps65010_set_led(LED1, BLINK);
230
231 /* Set LED2 off by default */
232 tps65010_set_led(LED2, OFF);
233
234 /* Enable LOW_PWR handshake */
235 tps65010_set_low_pwr(ON);
236
237 /* Switch VLDO2 to 3.0V for AIC23 */
238 tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V
239 | TPS_LDO1_ENABLE);
240
241 /* register these three LEDs */
242 osk5912_tps_leds.dev.parent = &client->dev;
243 platform_device_register(&osk5912_tps_leds);
244
245 return 0;
246}
247
248static struct tps65010_board tps_board = {
249 .base = OSK_TPS_GPIO_BASE,
250 .outmask = 0x0f,
251 .setup = osk_tps_setup,
252};
253
186static struct i2c_board_info __initdata osk_i2c_board_info[] = { 254static struct i2c_board_info __initdata osk_i2c_board_info[] = {
187 { 255 {
188 I2C_BOARD_INFO("tps65010", 0x48), 256 I2C_BOARD_INFO("tps65010", 0x48),
189 .type = "tps65010", 257 .type = "tps65010",
190 .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)), 258 .irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)),
259 .platform_data = &tps_board,
260
191 }, 261 },
192 /* TODO when driver support is ready: 262 /* TODO when driver support is ready:
193 * - aic23 audio chip at 0x1a 263 * - aic23 audio chip at 0x1a
@@ -198,7 +268,7 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = {
198 268
199static void __init osk_init_smc91x(void) 269static void __init osk_init_smc91x(void)
200{ 270{
201 if ((omap_request_gpio(0)) < 0) { 271 if ((gpio_request(0, "smc_irq")) < 0) {
202 printk("Error requesting gpio 0 for smc91x irq\n"); 272 printk("Error requesting gpio 0 for smc91x irq\n");
203 return; 273 return;
204 } 274 }
@@ -210,7 +280,7 @@ static void __init osk_init_smc91x(void)
210static void __init osk_init_cf(void) 280static void __init osk_init_cf(void)
211{ 281{
212 omap_cfg_reg(M7_1610_GPIO62); 282 omap_cfg_reg(M7_1610_GPIO62);
213 if ((omap_request_gpio(62)) < 0) { 283 if ((gpio_request(62, "cf_irq")) < 0) {
214 printk("Error requesting gpio 62 for CF irq\n"); 284 printk("Error requesting gpio 62 for CF irq\n");
215 return; 285 return;
216 } 286 }
@@ -334,7 +404,7 @@ static struct platform_device *mistral_devices[] __initdata = {
334 404
335static int mistral_get_pendown_state(void) 405static int mistral_get_pendown_state(void)
336{ 406{
337 return !omap_get_gpio_datain(4); 407 return !gpio_get_value(4);
338} 408}
339 409
340static const struct ads7846_platform_data mistral_ts_info = { 410static const struct ads7846_platform_data mistral_ts_info = {
@@ -396,25 +466,31 @@ static void __init osk_mistral_init(void)
396 omap_cfg_reg(W14_1610_CCP_DATAP); 466 omap_cfg_reg(W14_1610_CCP_DATAP);
397 467
398 /* CAM_PWDN */ 468 /* CAM_PWDN */
399 if (omap_request_gpio(11) == 0) { 469 if (gpio_request(11, "cam_pwdn") == 0) {
400 omap_cfg_reg(N20_1610_GPIO11); 470 omap_cfg_reg(N20_1610_GPIO11);
401 omap_set_gpio_direction(11, 0 /* out */); 471 gpio_direction_output(11, 0);
402 omap_set_gpio_dataout(11, 0 /* off */);
403 } else 472 } else
404 pr_debug("OSK+Mistral: CAM_PWDN is awol\n"); 473 pr_debug("OSK+Mistral: CAM_PWDN is awol\n");
405 474
406 475
407 /* omap_cfg_reg(P19_1610_GPIO6); */ /* BUSY */ 476 /* omap_cfg_reg(P19_1610_GPIO6); */ /* BUSY */
477 gpio_request(6, "ts_busy");
478 gpio_direction_input(6);
479
408 omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */ 480 omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */
481 gpio_request(4, "ts_int");
482 gpio_direction_input(4);
409 set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING); 483 set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING);
484
410 spi_register_board_info(mistral_boardinfo, 485 spi_register_board_info(mistral_boardinfo,
411 ARRAY_SIZE(mistral_boardinfo)); 486 ARRAY_SIZE(mistral_boardinfo));
412 487
413 /* the sideways button (SW1) is for use as a "wakeup" button */ 488 /* the sideways button (SW1) is for use as a "wakeup" button */
414 omap_cfg_reg(N15_1610_MPUIO2); 489 omap_cfg_reg(N15_1610_MPUIO2);
415 if (omap_request_gpio(OMAP_MPUIO(2)) == 0) { 490 if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
416 int ret = 0; 491 int ret = 0;
417 omap_set_gpio_direction(OMAP_MPUIO(2), 1); 492
493 gpio_direction_input(OMAP_MPUIO(2));
418 set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQT_RISING); 494 set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQT_RISING);
419#ifdef CONFIG_PM 495#ifdef CONFIG_PM
420 /* share the IRQ in case someone wants to use the 496 /* share the IRQ in case someone wants to use the
@@ -425,7 +501,7 @@ static void __init osk_mistral_init(void)
425 IRQF_SHARED, "mistral_wakeup", 501 IRQF_SHARED, "mistral_wakeup",
426 &osk_mistral_wake_interrupt); 502 &osk_mistral_wake_interrupt);
427 if (ret != 0) { 503 if (ret != 0) {
428 omap_free_gpio(OMAP_MPUIO(2)); 504 gpio_free(OMAP_MPUIO(2));
429 printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n", 505 printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n",
430 ret); 506 ret);
431 } else 507 } else
@@ -438,10 +514,8 @@ static void __init osk_mistral_init(void)
438 * board, like the touchscreen, EEPROM, and wakeup (!) switch. 514 * board, like the touchscreen, EEPROM, and wakeup (!) switch.
439 */ 515 */
440 omap_cfg_reg(PWL); 516 omap_cfg_reg(PWL);
441 if (omap_request_gpio(2) == 0) { 517 if (gpio_request(2, "lcd_pwr") == 0)
442 omap_set_gpio_direction(2, 0 /* out */); 518 gpio_direction_output(2, 1);
443 omap_set_gpio_dataout(2, 1 /* on */);
444 }
445 519
446 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); 520 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
447} 521}
@@ -484,44 +558,6 @@ static void __init osk_map_io(void)
484 omap1_map_common_io(); 558 omap1_map_common_io();
485} 559}
486 560
487#ifdef CONFIG_TPS65010
488static int __init osk_tps_init(void)
489{
490 if (!machine_is_omap_osk())
491 return 0;
492
493 /* Let LED1 (D9) blink */
494 tps65010_set_led(LED1, BLINK);
495
496 /* Disable LED 2 (D2) */
497 tps65010_set_led(LED2, OFF);
498
499 /* Set GPIO 1 HIGH to disable VBUS power supply;
500 * OHCI driver powers it up/down as needed.
501 */
502 tps65010_set_gpio_out_value(GPIO1, HIGH);
503
504 /* Set GPIO 2 low to turn on LED D3 */
505 tps65010_set_gpio_out_value(GPIO2, HIGH);
506
507 /* Set GPIO 3 low to take ethernet out of reset */
508 tps65010_set_gpio_out_value(GPIO3, LOW);
509
510 /* gpio4 for VDD_DSP */
511 /* FIXME send power to DSP iff it's configured */
512
513 /* Enable LOW_PWR */
514 tps65010_set_low_pwr(ON);
515
516 /* Switch VLDO2 to 3.0V for AIC23 */
517 tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V
518 | TPS_LDO1_ENABLE);
519
520 return 0;
521}
522fs_initcall(osk_tps_init);
523#endif
524
525MACHINE_START(OMAP_OSK, "TI-OSK") 561MACHINE_START(OMAP_OSK, "TI-OSK")
526 /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ 562 /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */
527 .phys_io = 0xfff00000, 563 .phys_io = 0xfff00000,
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 026685ed461a..754383dde807 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -1,11 +1,9 @@
1/* 1/*
2 * linux/arch/arm/mach-omap1/leds-osk.c 2 * linux/arch/arm/mach-omap1/leds-osk.c
3 * 3 *
4 * LED driver for OSK, and optionally Mistral QVGA, boards 4 * LED driver for OSK with optional Mistral QVGA board
5 */ 5 */
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/workqueue.h>
8#include <linux/i2c/tps65010.h>
9 7
10#include <asm/hardware.h> 8#include <asm/hardware.h>
11#include <asm/leds.h> 9#include <asm/leds.h>
@@ -20,49 +18,11 @@
20#define LED_STATE_CLAIMED (1 << 1) 18#define LED_STATE_CLAIMED (1 << 1)
21static u8 led_state; 19static u8 led_state;
22 20
23#define GREEN_LED (1 << 0) /* TPS65010 LED1 */
24#define AMBER_LED (1 << 1) /* TPS65010 LED2 */
25#define RED_LED (1 << 2) /* TPS65010 GPIO2 */
26#define TIMER_LED (1 << 3) /* Mistral board */ 21#define TIMER_LED (1 << 3) /* Mistral board */
27#define IDLE_LED (1 << 4) /* Mistral board */ 22#define IDLE_LED (1 << 4) /* Mistral board */
28static u8 hw_led_state; 23static u8 hw_led_state;
29 24
30 25
31/* TPS65010 leds are changed using i2c -- from a task context.
32 * Using one of these for the "idle" LED would be impractical...
33 */
34#define TPS_LEDS (GREEN_LED | RED_LED | AMBER_LED)
35
36static u8 tps_leds_change;
37
38static void tps_work(struct work_struct *unused)
39{
40 for (;;) {
41 u8 leds;
42
43 local_irq_disable();
44 leds = tps_leds_change;
45 tps_leds_change = 0;
46 local_irq_enable();
47
48 if (!leds)
49 break;
50
51 /* careful: the set_led() value is on/off/blink */
52 if (leds & GREEN_LED)
53 tps65010_set_led(LED1, !!(hw_led_state & GREEN_LED));
54 if (leds & AMBER_LED)
55 tps65010_set_led(LED2, !!(hw_led_state & AMBER_LED));
56
57 /* the gpio led doesn't have that issue */
58 if (leds & RED_LED)
59 tps65010_set_gpio_out_value(GPIO2,
60 !(hw_led_state & RED_LED));
61 }
62}
63
64static DECLARE_WORK(work, tps_work);
65
66#ifdef CONFIG_OMAP_OSK_MISTRAL 26#ifdef CONFIG_OMAP_OSK_MISTRAL
67 27
68/* For now, all system indicators require the Mistral board, since that 28/* For now, all system indicators require the Mistral board, since that
@@ -112,7 +72,6 @@ void osk_leds_event(led_event_t evt)
112 case led_stop: 72 case led_stop:
113 led_state &= ~LED_STATE_ENABLED; 73 led_state &= ~LED_STATE_ENABLED;
114 hw_led_state = 0; 74 hw_led_state = 0;
115 /* NOTE: work may still be pending!! */
116 break; 75 break;
117 76
118 case led_claim: 77 case led_claim:
@@ -145,48 +104,11 @@ void osk_leds_event(led_event_t evt)
145 104
146#endif /* CONFIG_OMAP_OSK_MISTRAL */ 105#endif /* CONFIG_OMAP_OSK_MISTRAL */
147 106
148 /* "green" == tps LED1 (leftmost, normally power-good)
149 * works only with DC adapter, not on battery power!
150 */
151 case led_green_on:
152 if (led_state & LED_STATE_CLAIMED)
153 hw_led_state |= GREEN_LED;
154 break;
155 case led_green_off:
156 if (led_state & LED_STATE_CLAIMED)
157 hw_led_state &= ~GREEN_LED;
158 break;
159
160 /* "amber" == tps LED2 (middle) */
161 case led_amber_on:
162 if (led_state & LED_STATE_CLAIMED)
163 hw_led_state |= AMBER_LED;
164 break;
165 case led_amber_off:
166 if (led_state & LED_STATE_CLAIMED)
167 hw_led_state &= ~AMBER_LED;
168 break;
169
170 /* "red" == LED on tps gpio3 (rightmost) */
171 case led_red_on:
172 if (led_state & LED_STATE_CLAIMED)
173 hw_led_state |= RED_LED;
174 break;
175 case led_red_off:
176 if (led_state & LED_STATE_CLAIMED)
177 hw_led_state &= ~RED_LED;
178 break;
179
180 default: 107 default:
181 break; 108 break;
182 } 109 }
183 110
184 leds ^= hw_led_state; 111 leds ^= hw_led_state;
185 leds &= TPS_LEDS;
186 if (leds && (led_state & LED_STATE_CLAIMED)) {
187 tps_leds_change |= leds;
188 schedule_work(&work);
189 }
190 112
191done: 113done:
192 local_irq_restore(flags); 114 local_irq_restore(flags);
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 52c70e5fcf65..e207bf7cb853 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -3,9 +3,9 @@
3 * 3 *
4 * OMAP1 pin multiplexing configurations 4 * OMAP1 pin multiplexing configurations
5 * 5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation 6 * Copyright (C) 2003 - 2008 Nokia Corporation
7 * 7 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com> 8 * Written by Tony Lindgren
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
@@ -32,8 +32,10 @@
32 32
33#ifdef CONFIG_OMAP_MUX 33#ifdef CONFIG_OMAP_MUX
34 34
35static struct omap_mux_cfg arch_mux_cfg;
36
35#ifdef CONFIG_ARCH_OMAP730 37#ifdef CONFIG_ARCH_OMAP730
36struct pin_config __initdata_or_module omap730_pins[] = { 38static struct pin_config __initdata_or_module omap730_pins[] = {
37MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0) 39MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0)
38MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0) 40MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0)
39MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0) 41MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0)
@@ -49,10 +51,14 @@ MUX_CFG_730("AA17_730_USB_DM", 2, 21, 0, 20, 0, 0)
49MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0) 51MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0)
50MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0) 52MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0)
51}; 53};
52#endif 54#define OMAP730_PINS_SZ ARRAY_SIZE(omap730_pins)
55#else
56#define omap730_pins NULL
57#define OMAP730_PINS_SZ 0
58#endif /* CONFIG_ARCH_OMAP730 */
53 59
54#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) 60#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
55struct pin_config __initdata_or_module omap1xxx_pins[] = { 61static struct pin_config __initdata_or_module omap1xxx_pins[] = {
56/* 62/*
57 * description mux mode mux pull pull pull pu_pd pu dbg 63 * description mux mode mux pull pull pull pu_pd pu dbg
58 * reg offset mode reg bit ena reg 64 * reg offset mode reg bit ena reg
@@ -306,22 +312,136 @@ MUX_CFG("Y12_1610_CCP_CLKP", 8, 18, 6, 1, 24, 1, 1, 0, 0)
306MUX_CFG("W13_1610_CCP_CLKM", 9, 0, 6, 1, 28, 1, 1, 0, 0) 312MUX_CFG("W13_1610_CCP_CLKM", 9, 0, 6, 1, 28, 1, 1, 0, 0)
307MUX_CFG("W14_1610_CCP_DATAP", 9, 24, 6, 2, 4, 1, 2, 0, 0) 313MUX_CFG("W14_1610_CCP_DATAP", 9, 24, 6, 2, 4, 1, 2, 0, 0)
308MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0) 314MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0)
309
310}; 315};
316#define OMAP1XXX_PINS_SZ ARRAY_SIZE(omap1xxx_pins)
317#else
318#define omap1xxx_pins NULL
319#define OMAP1XXX_PINS_SZ 0
311#endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ 320#endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */
312 321
313int __init omap1_mux_init(void) 322int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
314{ 323{
315 324 static DEFINE_SPINLOCK(mux_spin_lock);
316#ifdef CONFIG_ARCH_OMAP730 325 unsigned long flags;
317 omap_mux_register(omap730_pins, ARRAY_SIZE(omap730_pins)); 326 unsigned int reg_orig = 0, reg = 0, pu_pd_orig = 0, pu_pd = 0,
327 pull_orig = 0, pull = 0;
328 unsigned int mask, warn = 0;
329
330 /* Check the mux register in question */
331 if (cfg->mux_reg) {
332 unsigned tmp1, tmp2;
333
334 spin_lock_irqsave(&mux_spin_lock, flags);
335 reg_orig = omap_readl(cfg->mux_reg);
336
337 /* The mux registers always seem to be 3 bits long */
338 mask = (0x7 << cfg->mask_offset);
339 tmp1 = reg_orig & mask;
340 reg = reg_orig & ~mask;
341
342 tmp2 = (cfg->mask << cfg->mask_offset);
343 reg |= tmp2;
344
345 if (tmp1 != tmp2)
346 warn = 1;
347
348 omap_writel(reg, cfg->mux_reg);
349 spin_unlock_irqrestore(&mux_spin_lock, flags);
350 }
351
352 /* Check for pull up or pull down selection on 1610 */
353 if (!cpu_is_omap15xx()) {
354 if (cfg->pu_pd_reg && cfg->pull_val) {
355 spin_lock_irqsave(&mux_spin_lock, flags);
356 pu_pd_orig = omap_readl(cfg->pu_pd_reg);
357 mask = 1 << cfg->pull_bit;
358
359 if (cfg->pu_pd_val) {
360 if (!(pu_pd_orig & mask))
361 warn = 1;
362 /* Use pull up */
363 pu_pd = pu_pd_orig | mask;
364 } else {
365 if (pu_pd_orig & mask)
366 warn = 1;
367 /* Use pull down */
368 pu_pd = pu_pd_orig & ~mask;
369 }
370 omap_writel(pu_pd, cfg->pu_pd_reg);
371 spin_unlock_irqrestore(&mux_spin_lock, flags);
372 }
373 }
374
375 /* Check for an associated pull down register */
376 if (cfg->pull_reg) {
377 spin_lock_irqsave(&mux_spin_lock, flags);
378 pull_orig = omap_readl(cfg->pull_reg);
379 mask = 1 << cfg->pull_bit;
380
381 if (cfg->pull_val) {
382 if (pull_orig & mask)
383 warn = 1;
384 /* Low bit = pull enabled */
385 pull = pull_orig & ~mask;
386 } else {
387 if (!(pull_orig & mask))
388 warn = 1;
389 /* High bit = pull disabled */
390 pull = pull_orig | mask;
391 }
392
393 omap_writel(pull, cfg->pull_reg);
394 spin_unlock_irqrestore(&mux_spin_lock, flags);
395 }
396
397 if (warn) {
398#ifdef CONFIG_OMAP_MUX_WARNINGS
399 printk(KERN_WARNING "MUX: initialized %s\n", cfg->name);
318#endif 400#endif
319 401 }
320#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) 402
321 omap_mux_register(omap1xxx_pins, ARRAY_SIZE(omap1xxx_pins)); 403#ifdef CONFIG_OMAP_MUX_DEBUG
404 if (cfg->debug || warn) {
405 printk("MUX: Setting register %s\n", cfg->name);
406 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
407 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg);
408
409 if (!cpu_is_omap15xx()) {
410 if (cfg->pu_pd_reg && cfg->pull_val) {
411 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
412 cfg->pu_pd_name, cfg->pu_pd_reg,
413 pu_pd_orig, pu_pd);
414 }
415 }
416
417 if (cfg->pull_reg)
418 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
419 cfg->pull_name, cfg->pull_reg, pull_orig, pull);
420 }
322#endif 421#endif
323 422
423#ifdef CONFIG_OMAP_MUX_ERRORS
424 return warn ? -ETXTBSY : 0;
425#else
324 return 0; 426 return 0;
427#endif
428}
429
430int __init omap1_mux_init(void)
431{
432 if (cpu_is_omap730()) {
433 arch_mux_cfg.pins = omap730_pins;
434 arch_mux_cfg.size = OMAP730_PINS_SZ;
435 arch_mux_cfg.cfg_reg = omap1_cfg_reg;
436 }
437
438 if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
439 arch_mux_cfg.pins = omap1xxx_pins;
440 arch_mux_cfg.size = OMAP1XXX_PINS_SZ;
441 arch_mux_cfg.cfg_reg = omap1_cfg_reg;
442 }
443
444 return omap_mux_register(&arch_mux_cfg);
325} 445}
326 446
327#endif 447#endif
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index a4f8b2055437..5d2b270935a2 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -56,37 +56,6 @@
56#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE 56#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE
57#define OMAP_MPU_TIMER_OFFSET 0x100 57#define OMAP_MPU_TIMER_OFFSET 0x100
58 58
59/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c,
60 * converted to use kHz by Kevin Hilman */
61/* convert from cycles(64bits) => nanoseconds (64bits)
62 * basic equation:
63 * ns = cycles / (freq / ns_per_sec)
64 * ns = cycles * (ns_per_sec / freq)
65 * ns = cycles * (10^9 / (cpu_khz * 10^3))
66 * ns = cycles * (10^6 / cpu_khz)
67 *
68 * Then we use scaling math (suggested by george at mvista.com) to get:
69 * ns = cycles * (10^6 * SC / cpu_khz / SC
70 * ns = cycles * cyc2ns_scale / SC
71 *
72 * And since SC is a constant power of two, we can convert the div
73 * into a shift.
74 * -johnstul at us.ibm.com "math is hard, lets go shopping!"
75 */
76static unsigned long cyc2ns_scale;
77#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
78
79static inline void set_cyc2ns_scale(unsigned long cpu_khz)
80{
81 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz;
82}
83
84static inline unsigned long long cycles_2_ns(unsigned long long cyc)
85{
86 return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
87}
88
89
90typedef struct { 59typedef struct {
91 u32 cntl; /* CNTL_TIMER, R/W */ 60 u32 cntl; /* CNTL_TIMER, R/W */
92 u32 load_tim; /* LOAD_TIM, W */ 61 u32 load_tim; /* LOAD_TIM, W */
@@ -194,8 +163,6 @@ static struct irqaction omap_mpu_timer1_irq = {
194 163
195static __init void omap_init_mpu_timer(unsigned long rate) 164static __init void omap_init_mpu_timer(unsigned long rate)
196{ 165{
197 set_cyc2ns_scale(rate / 1000);
198
199 setup_irq(INT_TIMER1, &omap_mpu_timer1_irq); 166 setup_irq(INT_TIMER1, &omap_mpu_timer1_irq);
200 omap_mpu_timer_start(0, (rate / HZ) - 1, 1); 167 omap_mpu_timer_start(0, (rate / HZ) - 1, 1);
201 168
@@ -260,22 +227,6 @@ static void __init omap_init_clocksource(unsigned long rate)
260 printk(err, clocksource_mpu.name); 227 printk(err, clocksource_mpu.name);
261} 228}
262 229
263
264/*
265 * Scheduler clock - returns current time in nanosec units.
266 */
267unsigned long long sched_clock(void)
268{
269 unsigned long ticks = 0 - omap_mpu_timer_read(1);
270 unsigned long long ticks64;
271
272 ticks64 = omap_mpu_timer2_overflows;
273 ticks64 <<= 32;
274 ticks64 |= ticks;
275
276 return cycles_2_ns(ticks64);
277}
278
279/* 230/*
280 * --------------------------------------------------------------------------- 231 * ---------------------------------------------------------------------------
281 * Timer initialization 232 * Timer initialization
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index ea76f1979a3d..fbbdb806c95a 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/plat-omap/timer32k.c 2 * linux/arch/arm/mach-omap1/timer32k.c
3 * 3 *
4 * OMAP 32K Timer 4 * OMAP 32K Timer
5 * 5 *
@@ -70,8 +70,6 @@ struct sys_timer omap_timer;
70 70
71#if defined(CONFIG_ARCH_OMAP16XX) 71#if defined(CONFIG_ARCH_OMAP16XX)
72#define TIMER_32K_SYNCHRONIZED 0xfffbc410 72#define TIMER_32K_SYNCHRONIZED 0xfffbc410
73#elif defined(CONFIG_ARCH_OMAP24XX)
74#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
75#else 73#else
76#error OMAP 32KHz timer does not currently work on 15XX! 74#error OMAP 32KHz timer does not currently work on 15XX!
77#endif 75#endif
@@ -93,8 +91,6 @@ struct sys_timer omap_timer;
93#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ 91#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \
94 (((nr_jiffies) * (clock_rate)) / HZ) 92 (((nr_jiffies) * (clock_rate)) / HZ)
95 93
96#if defined(CONFIG_ARCH_OMAP1)
97
98static inline void omap_32k_timer_write(int val, int reg) 94static inline void omap_32k_timer_write(int val, int reg)
99{ 95{
100 omap_writew(val, OMAP1_32K_TIMER_BASE + reg); 96 omap_writew(val, OMAP1_32K_TIMER_BASE + reg);
@@ -120,30 +116,14 @@ static inline void omap_32k_timer_stop(void)
120 116
121#define omap_32k_timer_ack_irq() 117#define omap_32k_timer_ack_irq()
122 118
123#elif defined(CONFIG_ARCH_OMAP2) 119static int omap_32k_timer_set_next_event(unsigned long delta,
124 120 struct clock_event_device *dev)
125static struct omap_dm_timer *gptimer;
126
127static inline void omap_32k_timer_start(unsigned long load_val)
128{
129 omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val);
130 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
131 omap_dm_timer_start(gptimer);
132}
133
134static inline void omap_32k_timer_stop(void)
135{ 121{
136 omap_dm_timer_stop(gptimer); 122 omap_32k_timer_start(delta);
137}
138 123
139static inline void omap_32k_timer_ack_irq(void) 124 return 0;
140{
141 u32 status = omap_dm_timer_read_status(gptimer);
142 omap_dm_timer_write_status(gptimer, status);
143} 125}
144 126
145#endif
146
147static void omap_32k_timer_set_mode(enum clock_event_mode mode, 127static void omap_32k_timer_set_mode(enum clock_event_mode mode,
148 struct clock_event_device *evt) 128 struct clock_event_device *evt)
149{ 129{
@@ -164,8 +144,9 @@ static void omap_32k_timer_set_mode(enum clock_event_mode mode,
164 144
165static struct clock_event_device clockevent_32k_timer = { 145static struct clock_event_device clockevent_32k_timer = {
166 .name = "32k-timer", 146 .name = "32k-timer",
167 .features = CLOCK_EVT_FEAT_PERIODIC, 147 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
168 .shift = 32, 148 .shift = 32,
149 .set_next_event = omap_32k_timer_set_next_event,
169 .set_mode = omap_32k_timer_set_mode, 150 .set_mode = omap_32k_timer_set_mode,
170}; 151};
171 152
@@ -178,32 +159,6 @@ static inline unsigned long omap_32k_sync_timer_read(void)
178 return omap_readl(TIMER_32K_SYNCHRONIZED); 159 return omap_readl(TIMER_32K_SYNCHRONIZED);
179} 160}
180 161
181/*
182 * Rounds down to nearest usec. Note that this will overflow for larger values.
183 */
184static inline unsigned long omap_32k_ticks_to_usecs(unsigned long ticks_32k)
185{
186 return (ticks_32k * 5*5*5*5*5*5) >> 9;
187}
188
189/*
190 * Rounds down to nearest nsec.
191 */
192static inline unsigned long long
193omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
194{
195 return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
196}
197
198/*
199 * Returns current time from boot in nsecs. It's OK for this to wrap
200 * around for now, as it's just a relative time stamp.
201 */
202unsigned long long sched_clock(void)
203{
204 return omap_32k_ticks_to_nsecs(omap_32k_sync_timer_read());
205}
206
207static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id) 162static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
208{ 163{
209 struct clock_event_device *evt = &clockevent_32k_timer; 164 struct clock_event_device *evt = &clockevent_32k_timer;
@@ -222,22 +177,7 @@ static struct irqaction omap_32k_timer_irq = {
222 177
223static __init void omap_init_32k_timer(void) 178static __init void omap_init_32k_timer(void)
224{ 179{
225 if (cpu_class_is_omap1()) 180 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
226 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
227
228#ifdef CONFIG_ARCH_OMAP2
229 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */
230 if (cpu_is_omap24xx()) {
231 gptimer = omap_dm_timer_request_specific(1);
232 BUG_ON(gptimer == NULL);
233
234 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);
235 setup_irq(omap_dm_timer_get_irq(gptimer), &omap_32k_timer_irq);
236 omap_dm_timer_set_int_enable(gptimer,
237 OMAP_TIMER_INT_CAPTURE | OMAP_TIMER_INT_OVERFLOW |
238 OMAP_TIMER_INT_MATCH);
239 }
240#endif
241 181
242 clockevent_32k_timer.mult = div_sc(OMAP_32K_TICKS_PER_SEC, 182 clockevent_32k_timer.mult = div_sc(OMAP_32K_TICKS_PER_SEC,
243 NSEC_PER_SEC, 183 NSEC_PER_SEC,
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index b05b738d31e6..2feb6870b735 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,13 +3,15 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o \ 6obj-y := irq.o id.o io.o sram-fn.o memory.o control.o prcm.o clock.o mux.o \
7 serial.o gpmc.o 7 devices.o serial.o gpmc.o timer-gp.o
8
9obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o
10 8
11# Power Management 9# Power Management
12obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o 10obj-$(CONFIG_PM) += pm.o sleep.o
11
12# Clock framework
13obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o
14obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
13 15
14# Specific board support 16# Specific board support
15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 17obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 64235dee5614..1c12d7c6c7fc 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -33,7 +33,6 @@
33#include <asm/arch/board.h> 33#include <asm/arch/board.h>
34#include <asm/arch/common.h> 34#include <asm/arch/common.h>
35#include <asm/arch/gpmc.h> 35#include <asm/arch/gpmc.h>
36#include "prcm-regs.h"
37 36
38#include <asm/io.h> 37#include <asm/io.h>
39 38
@@ -125,15 +124,18 @@ static inline void __init sdp2430_init_smc91x(void)
125 int eth_cs; 124 int eth_cs;
126 unsigned long cs_mem_base; 125 unsigned long cs_mem_base;
127 unsigned int rate; 126 unsigned int rate;
128 struct clk *l3ck; 127 struct clk *gpmc_fck;
129 128
130 eth_cs = SDP2430_SMC91X_CS; 129 eth_cs = SDP2430_SMC91X_CS;
131 130
132 l3ck = clk_get(NULL, "core_l3_ck"); 131 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
133 if (IS_ERR(l3ck)) 132 if (IS_ERR(gpmc_fck)) {
134 rate = 100000000; 133 WARN_ON(1);
135 else 134 return;
136 rate = clk_get_rate(l3ck); 135 }
136
137 clk_enable(gpmc_fck);
138 rate = clk_get_rate(gpmc_fck);
137 139
138 /* Make sure CS1 timings are correct, for 2430 always muxed */ 140 /* Make sure CS1 timings are correct, for 2430 always muxed */
139 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200); 141 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200);
@@ -160,7 +162,7 @@ static inline void __init sdp2430_init_smc91x(void)
160 162
161 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { 163 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
162 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n"); 164 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
163 return; 165 goto out;
164 } 166 }
165 167
166 sdp2430_smc91x_resources[0].start = cs_mem_base + 0x300; 168 sdp2430_smc91x_resources[0].start = cs_mem_base + 0x300;
@@ -171,10 +173,13 @@ static inline void __init sdp2430_init_smc91x(void)
171 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 173 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
172 OMAP24XX_ETHR_GPIO_IRQ); 174 OMAP24XX_ETHR_GPIO_IRQ);
173 gpmc_cs_free(eth_cs); 175 gpmc_cs_free(eth_cs);
174 return; 176 goto out;
175 } 177 }
176 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1); 178 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1);
177 179
180out:
181 clk_disable(gpmc_fck);
182 clk_put(gpmc_fck);
178} 183}
179 184
180static void __init omap_2430sdp_init_irq(void) 185static void __init omap_2430sdp_init_irq(void)
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 7846551f0575..a1e1e6765b5b 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -26,6 +26,8 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/err.h>
30#include <linux/clk.h>
29 31
30#include <asm/hardware.h> 32#include <asm/hardware.h>
31#include <asm/mach-types.h> 33#include <asm/mach-types.h>
@@ -39,7 +41,7 @@
39#include <asm/arch/board.h> 41#include <asm/arch/board.h>
40#include <asm/arch/common.h> 42#include <asm/arch/common.h>
41#include <asm/arch/gpmc.h> 43#include <asm/arch/gpmc.h>
42#include "prcm-regs.h" 44#include <asm/arch/control.h>
43 45
44/* LED & Switch macros */ 46/* LED & Switch macros */
45#define LED0_GPIO13 13 47#define LED0_GPIO13 13
@@ -187,17 +189,47 @@ static inline void __init apollon_init_smc91x(void)
187{ 189{
188 unsigned long base; 190 unsigned long base;
189 191
192 unsigned int rate;
193 struct clk *gpmc_fck;
194 int eth_cs;
195
196 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
197 if (IS_ERR(gpmc_fck)) {
198 WARN_ON(1);
199 return;
200 }
201
202 clk_enable(gpmc_fck);
203 rate = clk_get_rate(gpmc_fck);
204
205 eth_cs = APOLLON_ETH_CS;
206
190 /* Make sure CS1 timings are correct */ 207 /* Make sure CS1 timings are correct */
191 GPMC_CONFIG1_1 = 0x00011203; 208 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200);
192 GPMC_CONFIG2_1 = 0x001f1f01; 209
193 GPMC_CONFIG3_1 = 0x00080803; 210 if (rate >= 160000000) {
194 GPMC_CONFIG4_1 = 0x1c091c09; 211 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
195 GPMC_CONFIG5_1 = 0x041f1f1f; 212 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
196 GPMC_CONFIG6_1 = 0x000004c4; 213 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
214 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
215 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
216 } else if (rate >= 130000000) {
217 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
218 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
219 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
220 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
221 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
222 } else {/* rate = 100000000 */
223 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
224 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
225 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
226 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F);
227 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2);
228 }
197 229
198 if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) { 230 if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) {
199 printk(KERN_ERR "Failed to request GPMC CS for smc91x\n"); 231 printk(KERN_ERR "Failed to request GPMC CS for smc91x\n");
200 return; 232 goto out;
201 } 233 }
202 apollon_smc91x_resources[0].start = base + 0x300; 234 apollon_smc91x_resources[0].start = base + 0x300;
203 apollon_smc91x_resources[0].end = base + 0x30f; 235 apollon_smc91x_resources[0].end = base + 0x30f;
@@ -208,9 +240,13 @@ static inline void __init apollon_init_smc91x(void)
208 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 240 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
209 APOLLON_ETHR_GPIO_IRQ); 241 APOLLON_ETHR_GPIO_IRQ);
210 gpmc_cs_free(APOLLON_ETH_CS); 242 gpmc_cs_free(APOLLON_ETH_CS);
211 return; 243 goto out;
212 } 244 }
213 omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1); 245 omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1);
246
247out:
248 clk_disable(gpmc_fck);
249 clk_put(gpmc_fck);
214} 250}
215 251
216static void __init omap_apollon_init_irq(void) 252static void __init omap_apollon_init_irq(void)
@@ -330,6 +366,8 @@ static void __init apollon_usb_init(void)
330 366
331static void __init omap_apollon_init(void) 367static void __init omap_apollon_init(void)
332{ 368{
369 u32 v;
370
333 apollon_led_init(); 371 apollon_led_init();
334 apollon_sw_init(); 372 apollon_sw_init();
335 apollon_flash_init(); 373 apollon_flash_init();
@@ -339,7 +377,9 @@ static void __init omap_apollon_init(void)
339 omap_cfg_reg(W19_24XX_SYS_NIRQ); 377 omap_cfg_reg(W19_24XX_SYS_NIRQ);
340 378
341 /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */ 379 /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */
342 CONTROL_DEVCONF |= (1 << 24); 380 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
381 v |= (1 << 24);
382 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
343 383
344 /* 384 /*
345 * Make sure the serial ports are muxed on at this point. 385 * Make sure the serial ports are muxed on at this point.
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index f125f432cc3e..d1915f99a5fa 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -19,6 +19,8 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/workqueue.h> 20#include <linux/workqueue.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/err.h>
23#include <linux/clk.h>
22 24
23#include <asm/hardware.h> 25#include <asm/hardware.h>
24#include <asm/mach-types.h> 26#include <asm/mach-types.h>
@@ -26,6 +28,7 @@
26#include <asm/mach/map.h> 28#include <asm/mach/map.h>
27#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
28 30
31#include <asm/arch/control.h>
29#include <asm/arch/gpio.h> 32#include <asm/arch/gpio.h>
30#include <asm/arch/gpioexpander.h> 33#include <asm/arch/gpioexpander.h>
31#include <asm/arch/mux.h> 34#include <asm/arch/mux.h>
@@ -36,10 +39,13 @@
36#include <asm/arch/keypad.h> 39#include <asm/arch/keypad.h>
37#include <asm/arch/menelaus.h> 40#include <asm/arch/menelaus.h>
38#include <asm/arch/dma.h> 41#include <asm/arch/dma.h>
39#include "prcm-regs.h" 42#include <asm/arch/gpmc.h>
40 43
41#include <asm/io.h> 44#include <asm/io.h>
42 45
46#define H4_FLASH_CS 0
47#define H4_SMC91X_CS 1
48
43static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 }; 49static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
44static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 }; 50static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
45 51
@@ -116,8 +122,6 @@ static struct flash_platform_data h4_flash_data = {
116}; 122};
117 123
118static struct resource h4_flash_resource = { 124static struct resource h4_flash_resource = {
119 .start = H4_CS0_BASE,
120 .end = H4_CS0_BASE + SZ_64M - 1,
121 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
122}; 126};
123 127
@@ -253,21 +257,107 @@ static struct platform_device *h4_devices[] __initdata = {
253 &h4_lcd_device, 257 &h4_lcd_device,
254}; 258};
255 259
260/* 2420 Sysboot setup (2430 is different) */
261static u32 get_sysboot_value(void)
262{
263 return (omap_ctrl_readl(OMAP24XX_CONTROL_STATUS) &
264 (OMAP2_SYSBOOT_5_MASK | OMAP2_SYSBOOT_4_MASK |
265 OMAP2_SYSBOOT_3_MASK | OMAP2_SYSBOOT_2_MASK |
266 OMAP2_SYSBOOT_1_MASK | OMAP2_SYSBOOT_0_MASK));
267}
268
269/* H4-2420's always used muxed mode, H4-2422's always use non-muxed
270 *
271 * Note: OMAP-GIT doesn't correctly do is_cpu_omap2422 and is_cpu_omap2423
272 * correctly. The macro needs to look at production_id not just hawkeye.
273 */
274static u32 is_gpmc_muxed(void)
275{
276 u32 mux;
277 mux = get_sysboot_value();
278 if ((mux & 0xF) == 0xd)
279 return 1; /* NAND config (could be either) */
280 if (mux & 0x2) /* if mux'ed */
281 return 1;
282 else
283 return 0;
284}
285
256static inline void __init h4_init_debug(void) 286static inline void __init h4_init_debug(void)
257{ 287{
288 int eth_cs;
289 unsigned long cs_mem_base;
290 unsigned int muxed, rate;
291 struct clk *gpmc_fck;
292
293 eth_cs = H4_SMC91X_CS;
294
295 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
296 if (IS_ERR(gpmc_fck)) {
297 WARN_ON(1);
298 return;
299 }
300
301 clk_enable(gpmc_fck);
302 rate = clk_get_rate(gpmc_fck);
303 clk_disable(gpmc_fck);
304 clk_put(gpmc_fck);
305
306 if (is_gpmc_muxed())
307 muxed = 0x200;
308 else
309 muxed = 0;
310
258 /* Make sure CS1 timings are correct */ 311 /* Make sure CS1 timings are correct */
259 GPMC_CONFIG1_1 = 0x00011200; 312 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1,
260 GPMC_CONFIG2_1 = 0x001f1f01; 313 0x00011000 | muxed);
261 GPMC_CONFIG3_1 = 0x00080803; 314
262 GPMC_CONFIG4_1 = 0x1c091c09; 315 if (rate >= 160000000) {
263 GPMC_CONFIG5_1 = 0x041f1f1f; 316 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
264 GPMC_CONFIG6_1 = 0x000004c4; 317 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
265 GPMC_CONFIG7_1 = 0x00000f40 | (0x08000000 >> 24); 318 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
319 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
320 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
321 } else if (rate >= 130000000) {
322 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
323 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
324 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
325 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
326 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
327 } else {/* rate = 100000000 */
328 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
329 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
330 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
331 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F);
332 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2);
333 }
334
335 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
336 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
337 goto out;
338 }
339
266 udelay(100); 340 udelay(100);
267 341
268 omap_cfg_reg(M15_24XX_GPIO92); 342 omap_cfg_reg(M15_24XX_GPIO92);
269 if (debug_card_init(cs_mem_base, OMAP24XX_ETHR_GPIO_IRQ) < 0) 343 if (debug_card_init(cs_mem_base, OMAP24XX_ETHR_GPIO_IRQ) < 0)
270 gpmc_cs_free(eth_cs); 344 gpmc_cs_free(eth_cs);
345
346out:
347 clk_disable(gpmc_fck);
348 clk_put(gpmc_fck);
349}
350
351static void __init h4_init_flash(void)
352{
353 unsigned long base;
354
355 if (gpmc_cs_request(H4_FLASH_CS, SZ_64M, &base) < 0) {
356 printk("Can't request GPMC CS for flash\n");
357 return;
358 }
359 h4_flash_resource.start = base;
360 h4_flash_resource.end = base + SZ_64M - 1;
271} 361}
272 362
273static void __init omap_h4_init_irq(void) 363static void __init omap_h4_init_irq(void)
@@ -275,6 +365,7 @@ static void __init omap_h4_init_irq(void)
275 omap2_init_common_hw(); 365 omap2_init_common_hw();
276 omap_init_irq(); 366 omap_init_irq();
277 omap_gpio_init(); 367 omap_gpio_init();
368 h4_init_flash();
278} 369}
279 370
280static struct omap_uart_config h4_uart_config __initdata = { 371static struct omap_uart_config h4_uart_config __initdata = {
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index e6e85b7b097b..b57ffb5a22a5 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1,20 +1,19 @@
1/* 1/*
2 * linux/arch/arm/mach-omap2/clock.c 2 * linux/arch/arm/mach-omap2/clock.c
3 * 3 *
4 * Copyright (C) 2005 Texas Instruments Inc. 4 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Richard Woodruff <r-woodruff2@ti.com> 5 * Copyright (C) 2004-2008 Nokia Corporation
6 * Created for OMAP2.
7 *
8 * Cleaned up and modified to use omap shared clock framework by
9 * Tony Lindgren <tony@atomide.com>
10 * 6 *
11 * Based on omap1 clock.c, Copyright (C) 2004 - 2005 Nokia corporation 7 * Contacts:
12 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Paul Walmsley
13 * 10 *
14 * This program is free software; you can redistribute it and/or modify 11 * 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 12 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
17 */ 14 */
15#undef DEBUG
16
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/device.h> 19#include <linux/device.h>
@@ -22,176 +21,227 @@
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
24#include <linux/clk.h> 23#include <linux/clk.h>
24#include <asm/bitops.h>
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include <asm/arch/clock.h> 28#include <asm/arch/clock.h>
29#include <asm/arch/sram.h> 29#include <asm/arch/sram.h>
30#include <asm/arch/cpu.h>
30#include <asm/div64.h> 31#include <asm/div64.h>
31 32
32#include "prcm-regs.h"
33#include "memory.h" 33#include "memory.h"
34#include "sdrc.h"
34#include "clock.h" 35#include "clock.h"
36#include "prm.h"
37#include "prm-regbits-24xx.h"
38#include "cm.h"
39#include "cm-regbits-24xx.h"
40#include "cm-regbits-34xx.h"
35 41
36#undef DEBUG 42#define MAX_CLOCK_ENABLE_WAIT 100000
37
38//#define DOWN_VARIABLE_DPLL 1 /* Experimental */
39 43
40static struct prcm_config *curr_prcm_set; 44u8 cpu_mask;
41static u32 curr_perf_level = PRCM_FULL_SPEED;
42static struct clk *vclk;
43static struct clk *sclk;
44 45
45/*------------------------------------------------------------------------- 46/*-------------------------------------------------------------------------
46 * Omap2 specific clock functions 47 * Omap2 specific clock functions
47 *-------------------------------------------------------------------------*/ 48 *-------------------------------------------------------------------------*/
48 49
49/* Recalculate SYST_CLK */ 50/**
50static void omap2_sys_clk_recalc(struct clk * clk) 51 * omap2_init_clksel_parent - set a clksel clk's parent field from the hardware
52 * @clk: OMAP clock struct ptr to use
53 *
54 * Given a pointer to a source-selectable struct clk, read the hardware
55 * register and determine what its parent is currently set to. Update the
56 * clk->parent field with the appropriate clk ptr.
57 */
58void omap2_init_clksel_parent(struct clk *clk)
51{ 59{
52 u32 div = PRCM_CLKSRC_CTRL; 60 const struct clksel *clks;
53 div &= (1 << 7) | (1 << 6); /* Test if ext clk divided by 1 or 2 */ 61 const struct clksel_rate *clkr;
54 div >>= clk->rate_offset; 62 u32 r, found = 0;
55 clk->rate = (clk->parent->rate / div); 63
56 propagate_rate(clk); 64 if (!clk->clksel)
65 return;
66
67 r = __raw_readl(clk->clksel_reg) & clk->clksel_mask;
68 r >>= __ffs(clk->clksel_mask);
69
70 for (clks = clk->clksel; clks->parent && !found; clks++) {
71 for (clkr = clks->rates; clkr->div && !found; clkr++) {
72 if ((clkr->flags & cpu_mask) && (clkr->val == r)) {
73 if (clk->parent != clks->parent) {
74 pr_debug("clock: inited %s parent "
75 "to %s (was %s)\n",
76 clk->name, clks->parent->name,
77 ((clk->parent) ?
78 clk->parent->name : "NULL"));
79 clk->parent = clks->parent;
80 };
81 found = 1;
82 }
83 }
84 }
85
86 if (!found)
87 printk(KERN_ERR "clock: init parent: could not find "
88 "regval %0x for clock %s\n", r, clk->name);
89
90 return;
57} 91}
58 92
59static u32 omap2_get_dpll_rate(struct clk * tclk) 93/* Returns the DPLL rate */
94u32 omap2_get_dpll_rate(struct clk *clk)
60{ 95{
61 long long dpll_clk; 96 long long dpll_clk;
62 int dpll_mult, dpll_div, amult; 97 u32 dpll_mult, dpll_div, dpll;
98 const struct dpll_data *dd;
99
100 dd = clk->dpll_data;
101 /* REVISIT: What do we return on error? */
102 if (!dd)
103 return 0;
104
105 dpll = __raw_readl(dd->mult_div1_reg);
106 dpll_mult = dpll & dd->mult_mask;
107 dpll_mult >>= __ffs(dd->mult_mask);
108 dpll_div = dpll & dd->div1_mask;
109 dpll_div >>= __ffs(dd->div1_mask);
63 110
64 dpll_mult = (CM_CLKSEL1_PLL >> 12) & 0x03ff; /* 10 bits */ 111 dpll_clk = (long long)clk->parent->rate * dpll_mult;
65 dpll_div = (CM_CLKSEL1_PLL >> 8) & 0x0f; /* 4 bits */
66 dpll_clk = (long long)tclk->parent->rate * dpll_mult;
67 do_div(dpll_clk, dpll_div + 1); 112 do_div(dpll_clk, dpll_div + 1);
68 amult = CM_CLKSEL2_PLL & 0x3;
69 dpll_clk *= amult;
70 113
71 return dpll_clk; 114 return dpll_clk;
72} 115}
73 116
74static void omap2_followparent_recalc(struct clk *clk) 117/*
75{ 118 * Used for clocks that have the same value as the parent clock,
76 followparent_recalc(clk); 119 * divided by some factor
77} 120 */
78 121void omap2_fixed_divisor_recalc(struct clk *clk)
79static void omap2_propagate_rate(struct clk * clk)
80{ 122{
81 if (!(clk->flags & RATE_FIXED)) 123 WARN_ON(!clk->fixed_div);
82 clk->rate = clk->parent->rate;
83 124
84 propagate_rate(clk); 125 clk->rate = clk->parent->rate / clk->fixed_div;
85}
86 126
87static void omap2_set_osc_ck(int enable) 127 if (clk->flags & RATE_PROPAGATES)
88{ 128 propagate_rate(clk);
89 if (enable)
90 PRCM_CLKSRC_CTRL &= ~(0x3 << 3);
91 else
92 PRCM_CLKSRC_CTRL |= 0x3 << 3;
93} 129}
94 130
95/* Enable an APLL if off */ 131/**
96static void omap2_clk_fixed_enable(struct clk *clk) 132 * omap2_wait_clock_ready - wait for clock to enable
133 * @reg: physical address of clock IDLEST register
134 * @mask: value to mask against to determine if the clock is active
135 * @name: name of the clock (for printk)
136 *
137 * Returns 1 if the clock enabled in time, or 0 if it failed to enable
138 * in roughly MAX_CLOCK_ENABLE_WAIT microseconds.
139 */
140int omap2_wait_clock_ready(void __iomem *reg, u32 mask, const char *name)
97{ 141{
98 u32 cval, i=0; 142 int i = 0;
143 int ena = 0;
99 144
100 if (clk->enable_bit == 0xff) /* Parent will do it */ 145 /*
101 return; 146 * 24xx uses 0 to indicate not ready, and 1 to indicate ready.
147 * 34xx reverses this, just to keep us on our toes
148 */
149 if (cpu_mask & (RATE_IN_242X | RATE_IN_243X)) {
150 ena = mask;
151 } else if (cpu_mask & RATE_IN_343X) {
152 ena = 0;
153 }
102 154
103 cval = CM_CLKEN_PLL; 155 /* Wait for lock */
156 while (((__raw_readl(reg) & mask) != ena) &&
157 (i++ < MAX_CLOCK_ENABLE_WAIT)) {
158 udelay(1);
159 }
104 160
105 if ((cval & (0x3 << clk->enable_bit)) == (0x3 << clk->enable_bit)) 161 if (i < MAX_CLOCK_ENABLE_WAIT)
106 return; 162 pr_debug("Clock %s stable after %d loops\n", name, i);
163 else
164 printk(KERN_ERR "Clock %s didn't enable in %d tries\n",
165 name, MAX_CLOCK_ENABLE_WAIT);
107 166
108 cval &= ~(0x3 << clk->enable_bit);
109 cval |= (0x3 << clk->enable_bit);
110 CM_CLKEN_PLL = cval;
111 167
112 if (clk == &apll96_ck) 168 return (i < MAX_CLOCK_ENABLE_WAIT) ? 1 : 0;
113 cval = (1 << 8); 169};
114 else if (clk == &apll54_ck)
115 cval = (1 << 6);
116 170
117 while (!(CM_IDLEST_CKGEN & cval)) { /* Wait for lock */
118 ++i;
119 udelay(1);
120 if (i == 100000) {
121 printk(KERN_ERR "Clock %s didn't lock\n", clk->name);
122 break;
123 }
124 }
125}
126 171
172/*
173 * Note: We don't need special code here for INVERT_ENABLE
174 * for the time being since INVERT_ENABLE only applies to clocks enabled by
175 * CM_CLKEN_PLL
176 */
127static void omap2_clk_wait_ready(struct clk *clk) 177static void omap2_clk_wait_ready(struct clk *clk)
128{ 178{
129 unsigned long reg, other_reg, st_reg; 179 void __iomem *reg, *other_reg, *st_reg;
130 u32 bit; 180 u32 bit;
131 int i; 181
132 182 /*
133 reg = (unsigned long) clk->enable_reg; 183 * REVISIT: This code is pretty ugly. It would be nice to generalize
134 if (reg == (unsigned long) &CM_FCLKEN1_CORE || 184 * it and pull it into struct clk itself somehow.
135 reg == (unsigned long) &CM_FCLKEN2_CORE) 185 */
136 other_reg = (reg & ~0xf0) | 0x10; 186 reg = clk->enable_reg;
137 else if (reg == (unsigned long) &CM_ICLKEN1_CORE || 187 if ((((u32)reg & 0xff) >= CM_FCLKEN1) &&
138 reg == (unsigned long) &CM_ICLKEN2_CORE) 188 (((u32)reg & 0xff) <= OMAP24XX_CM_FCLKEN2))
139 other_reg = (reg & ~0xf0) | 0x00; 189 other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x10); /* CM_ICLKEN* */
190 else if ((((u32)reg & 0xff) >= CM_ICLKEN1) &&
191 (((u32)reg & 0xff) <= OMAP24XX_CM_ICLKEN4))
192 other_reg = (void __iomem *)(((u32)reg & ~0xf0) | 0x00); /* CM_FCLKEN* */
140 else 193 else
141 return; 194 return;
142 195
196 /* REVISIT: What are the appropriate exclusions for 34XX? */
143 /* No check for DSS or cam clocks */ 197 /* No check for DSS or cam clocks */
144 if ((reg & 0x0f) == 0) { 198 if (cpu_is_omap24xx() && ((u32)reg & 0x0f) == 0) { /* CM_{F,I}CLKEN1 */
145 if (clk->enable_bit <= 1 || clk->enable_bit == 31) 199 if (clk->enable_bit == OMAP24XX_EN_DSS2_SHIFT ||
200 clk->enable_bit == OMAP24XX_EN_DSS1_SHIFT ||
201 clk->enable_bit == OMAP24XX_EN_CAM_SHIFT)
146 return; 202 return;
147 } 203 }
148 204
205 /* REVISIT: What are the appropriate exclusions for 34XX? */
206 /* OMAP3: ignore DSS-mod clocks */
207 if (cpu_is_omap34xx() &&
208 (((u32)reg & ~0xff) == (u32)OMAP_CM_REGADDR(OMAP3430_DSS_MOD, 0)))
209 return;
210
149 /* Check if both functional and interface clocks 211 /* Check if both functional and interface clocks
150 * are running. */ 212 * are running. */
151 bit = 1 << clk->enable_bit; 213 bit = 1 << clk->enable_bit;
152 if (!(__raw_readl(other_reg) & bit)) 214 if (!(__raw_readl(other_reg) & bit))
153 return; 215 return;
154 st_reg = (other_reg & ~0xf0) | 0x20; 216 st_reg = (void __iomem *)(((u32)other_reg & ~0xf0) | 0x20); /* CM_IDLEST* */
155 i = 0; 217
156 while (!(__raw_readl(st_reg) & bit)) { 218 omap2_wait_clock_ready(st_reg, bit, clk->name);
157 i++;
158 if (i == 100000) {
159 printk(KERN_ERR "Timeout enabling clock %s\n", clk->name);
160 break;
161 }
162 }
163 if (i)
164 pr_debug("Clock %s stable after %d loops\n", clk->name, i);
165} 219}
166 220
167/* Enables clock without considering parent dependencies or use count 221/* Enables clock without considering parent dependencies or use count
168 * REVISIT: Maybe change this to use clk->enable like on omap1? 222 * REVISIT: Maybe change this to use clk->enable like on omap1?
169 */ 223 */
170static int _omap2_clk_enable(struct clk * clk) 224int _omap2_clk_enable(struct clk *clk)
171{ 225{
172 u32 regval32; 226 u32 regval32;
173 227
174 if (clk->flags & ALWAYS_ENABLED) 228 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
175 return 0; 229 return 0;
176 230
177 if (unlikely(clk == &osc_ck)) { 231 if (clk->enable)
178 omap2_set_osc_ck(1); 232 return clk->enable(clk);
179 return 0;
180 }
181 233
182 if (unlikely(clk->enable_reg == 0)) { 234 if (unlikely(clk->enable_reg == 0)) {
183 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 235 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
184 clk->name); 236 clk->name);
185 return 0; 237 return 0; /* REVISIT: -EINVAL */
186 }
187
188 if (clk->enable_reg == (void __iomem *)&CM_CLKEN_PLL) {
189 omap2_clk_fixed_enable(clk);
190 return 0;
191 } 238 }
192 239
193 regval32 = __raw_readl(clk->enable_reg); 240 regval32 = __raw_readl(clk->enable_reg);
194 regval32 |= (1 << clk->enable_bit); 241 if (clk->flags & INVERT_ENABLE)
242 regval32 &= ~(1 << clk->enable_bit);
243 else
244 regval32 |= (1 << clk->enable_bit);
195 __raw_writel(regval32, clk->enable_reg); 245 __raw_writel(regval32, clk->enable_reg);
196 wmb(); 246 wmb();
197 247
@@ -200,44 +250,48 @@ static int _omap2_clk_enable(struct clk * clk)
200 return 0; 250 return 0;
201} 251}
202 252
203/* Stop APLL */
204static void omap2_clk_fixed_disable(struct clk *clk)
205{
206 u32 cval;
207
208 if(clk->enable_bit == 0xff) /* let parent off do it */
209 return;
210
211 cval = CM_CLKEN_PLL;
212 cval &= ~(0x3 << clk->enable_bit);
213 CM_CLKEN_PLL = cval;
214}
215
216/* Disables clock without considering parent dependencies or use count */ 253/* Disables clock without considering parent dependencies or use count */
217static void _omap2_clk_disable(struct clk *clk) 254void _omap2_clk_disable(struct clk *clk)
218{ 255{
219 u32 regval32; 256 u32 regval32;
220 257
221 if (unlikely(clk == &osc_ck)) { 258 if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
222 omap2_set_osc_ck(0);
223 return; 259 return;
224 }
225 260
226 if (clk->enable_reg == 0) 261 if (clk->disable) {
262 clk->disable(clk);
227 return; 263 return;
264 }
228 265
229 if (clk->enable_reg == (void __iomem *)&CM_CLKEN_PLL) { 266 if (clk->enable_reg == 0) {
230 omap2_clk_fixed_disable(clk); 267 /*
268 * 'Independent' here refers to a clock which is not
269 * controlled by its parent.
270 */
271 printk(KERN_ERR "clock: clk_disable called on independent "
272 "clock %s which has no enable_reg\n", clk->name);
231 return; 273 return;
232 } 274 }
233 275
234 regval32 = __raw_readl(clk->enable_reg); 276 regval32 = __raw_readl(clk->enable_reg);
235 regval32 &= ~(1 << clk->enable_bit); 277 if (clk->flags & INVERT_ENABLE)
278 regval32 |= (1 << clk->enable_bit);
279 else
280 regval32 &= ~(1 << clk->enable_bit);
236 __raw_writel(regval32, clk->enable_reg); 281 __raw_writel(regval32, clk->enable_reg);
237 wmb(); 282 wmb();
238} 283}
239 284
240static int omap2_clk_enable(struct clk *clk) 285void omap2_clk_disable(struct clk *clk)
286{
287 if (clk->usecount > 0 && !(--clk->usecount)) {
288 _omap2_clk_disable(clk);
289 if (likely((u32)clk->parent))
290 omap2_clk_disable(clk->parent);
291 }
292}
293
294int omap2_clk_enable(struct clk *clk)
241{ 295{
242 int ret = 0; 296 int ret = 0;
243 297
@@ -261,519 +315,314 @@ static int omap2_clk_enable(struct clk *clk)
261 return ret; 315 return ret;
262} 316}
263 317
264static void omap2_clk_disable(struct clk *clk)
265{
266 if (clk->usecount > 0 && !(--clk->usecount)) {
267 _omap2_clk_disable(clk);
268 if (likely((u32)clk->parent))
269 omap2_clk_disable(clk->parent);
270 }
271}
272
273/*
274 * Uses the current prcm set to tell if a rate is valid.
275 * You can go slower, but not faster within a given rate set.
276 */
277static u32 omap2_dpll_round_rate(unsigned long target_rate)
278{
279 u32 high, low;
280
281 if ((CM_CLKSEL2_PLL & 0x3) == 1) { /* DPLL clockout */
282 high = curr_prcm_set->dpll_speed * 2;
283 low = curr_prcm_set->dpll_speed;
284 } else { /* DPLL clockout x 2 */
285 high = curr_prcm_set->dpll_speed;
286 low = curr_prcm_set->dpll_speed / 2;
287 }
288
289#ifdef DOWN_VARIABLE_DPLL
290 if (target_rate > high)
291 return high;
292 else
293 return target_rate;
294#else
295 if (target_rate > low)
296 return high;
297 else
298 return low;
299#endif
300
301}
302
303/* 318/*
304 * Used for clocks that are part of CLKSEL_xyz governed clocks. 319 * Used for clocks that are part of CLKSEL_xyz governed clocks.
305 * REVISIT: Maybe change to use clk->enable() functions like on omap1? 320 * REVISIT: Maybe change to use clk->enable() functions like on omap1?
306 */ 321 */
307static void omap2_clksel_recalc(struct clk * clk) 322void omap2_clksel_recalc(struct clk *clk)
308{ 323{
309 u32 fixed = 0, div = 0; 324 u32 div = 0;
310 325
311 if (clk == &dpll_ck) { 326 pr_debug("clock: recalc'ing clksel clk %s\n", clk->name);
312 clk->rate = omap2_get_dpll_rate(clk);
313 fixed = 1;
314 div = 0;
315 }
316 327
317 if (clk == &iva1_mpu_int_ifck) { 328 div = omap2_clksel_get_divisor(clk);
318 div = 2; 329 if (div == 0)
319 fixed = 1;
320 }
321
322 if ((clk == &dss1_fck) && ((CM_CLKSEL1_CORE & (0x1f << 8)) == 0)) {
323 clk->rate = sys_ck.rate;
324 return; 330 return;
325 }
326 331
327 if (!fixed) { 332 if (unlikely(clk->rate == clk->parent->rate / div))
328 div = omap2_clksel_get_divisor(clk); 333 return;
329 if (div == 0) 334 clk->rate = clk->parent->rate / div;
330 return;
331 }
332 335
333 if (div != 0) { 336 pr_debug("clock: new clock rate is %ld (div %d)\n", clk->rate, div);
334 if (unlikely(clk->rate == clk->parent->rate / div))
335 return;
336 clk->rate = clk->parent->rate / div;
337 }
338 337
339 if (unlikely(clk->flags & RATE_PROPAGATES)) 338 if (unlikely(clk->flags & RATE_PROPAGATES))
340 propagate_rate(clk); 339 propagate_rate(clk);
341} 340}
342 341
343/* 342/**
344 * Finds best divider value in an array based on the source and target 343 * omap2_get_clksel_by_parent - return clksel struct for a given clk & parent
345 * rates. The divider array must be sorted with smallest divider first. 344 * @clk: OMAP struct clk ptr to inspect
345 * @src_clk: OMAP struct clk ptr of the parent clk to search for
346 *
347 * Scan the struct clksel array associated with the clock to find
348 * the element associated with the supplied parent clock address.
349 * Returns a pointer to the struct clksel on success or NULL on error.
346 */ 350 */
347static inline u32 omap2_divider_from_table(u32 size, u32 *div_array, 351const struct clksel *omap2_get_clksel_by_parent(struct clk *clk,
348 u32 src_rate, u32 tgt_rate) 352 struct clk *src_clk)
349{ 353{
350 int i, test_rate; 354 const struct clksel *clks;
351 355
352 if (div_array == NULL) 356 if (!clk->clksel)
353 return ~1; 357 return NULL;
354 358
355 for (i=0; i < size; i++) { 359 for (clks = clk->clksel; clks->parent; clks++) {
356 test_rate = src_rate / *div_array; 360 if (clks->parent == src_clk)
357 if (test_rate <= tgt_rate) 361 break; /* Found the requested parent */
358 return *div_array;
359 ++div_array;
360 } 362 }
361 363
362 return ~0; /* No acceptable divider */ 364 if (!clks->parent) {
365 printk(KERN_ERR "clock: Could not find parent clock %s in "
366 "clksel array of clock %s\n", src_clk->name,
367 clk->name);
368 return NULL;
369 }
370
371 return clks;
363} 372}
364 373
365/* 374/**
366 * Find divisor for the given clock and target rate. 375 * omap2_clksel_round_rate_div - find divisor for the given clock and rate
376 * @clk: OMAP struct clk to use
377 * @target_rate: desired clock rate
378 * @new_div: ptr to where we should store the divisor
367 * 379 *
380 * Finds 'best' divider value in an array based on the source and target
381 * rates. The divider array must be sorted with smallest divider first.
368 * Note that this will not work for clocks which are part of CONFIG_PARTICIPANT, 382 * Note that this will not work for clocks which are part of CONFIG_PARTICIPANT,
369 * they are only settable as part of virtual_prcm set. 383 * they are only settable as part of virtual_prcm set.
384 *
385 * Returns the rounded clock rate or returns 0xffffffff on error.
370 */ 386 */
371static u32 omap2_clksel_round_rate(struct clk *tclk, u32 target_rate, 387u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
372 u32 *new_div) 388 u32 *new_div)
373{ 389{
374 u32 gfx_div[] = {2, 3, 4}; 390 unsigned long test_rate;
375 u32 sysclkout_div[] = {1, 2, 4, 8, 16}; 391 const struct clksel *clks;
376 u32 dss1_div[] = {1, 2, 3, 4, 5, 6, 8, 9, 12, 16}; 392 const struct clksel_rate *clkr;
377 u32 vylnq_div[] = {1, 2, 3, 4, 6, 8, 9, 12, 16, 18}; 393 u32 last_div = 0;
378 u32 best_div = ~0, asize = 0; 394
379 u32 *div_array = NULL; 395 printk(KERN_INFO "clock: clksel_round_rate_div: %s target_rate %ld\n",
380 396 clk->name, target_rate);
381 switch (tclk->flags & SRC_RATE_SEL_MASK) { 397
382 case CM_GFX_SEL1: 398 *new_div = 1;
383 asize = 3; 399
384 div_array = gfx_div; 400 clks = omap2_get_clksel_by_parent(clk, clk->parent);
385 break; 401 if (clks == NULL)
386 case CM_PLL_SEL1: 402 return ~0;
387 return omap2_dpll_round_rate(target_rate); 403
388 case CM_SYSCLKOUT_SEL1: 404 for (clkr = clks->rates; clkr->div; clkr++) {
389 asize = 5; 405 if (!(clkr->flags & cpu_mask))
390 div_array = sysclkout_div; 406 continue;
391 break; 407
392 case CM_CORE_SEL1: 408 /* Sanity check */
393 if(tclk == &dss1_fck){ 409 if (clkr->div <= last_div)
394 if(tclk->parent == &core_ck){ 410 printk(KERN_ERR "clock: clksel_rate table not sorted "
395 asize = 10; 411 "for clock %s", clk->name);
396 div_array = dss1_div; 412
397 } else { 413 last_div = clkr->div;
398 *new_div = 0; /* fixed clk */ 414
399 return(tclk->parent->rate); 415 test_rate = clk->parent->rate / clkr->div;
400 } 416
401 } else if((tclk == &vlynq_fck) && cpu_is_omap2420()){ 417 if (test_rate <= target_rate)
402 if(tclk->parent == &core_ck){ 418 break; /* found it */
403 asize = 10;
404 div_array = vylnq_div;
405 } else {
406 *new_div = 0; /* fixed clk */
407 return(tclk->parent->rate);
408 }
409 }
410 break;
411 } 419 }
412 420
413 best_div = omap2_divider_from_table(asize, div_array, 421 if (!clkr->div) {
414 tclk->parent->rate, target_rate); 422 printk(KERN_ERR "clock: Could not find divisor for target "
415 if (best_div == ~0){ 423 "rate %ld for clock %s parent %s\n", target_rate,
416 *new_div = 1; 424 clk->name, clk->parent->name);
417 return best_div; /* signal error */ 425 return ~0;
418 } 426 }
419 427
420 *new_div = best_div; 428 *new_div = clkr->div;
421 return (tclk->parent->rate / best_div); 429
430 printk(KERN_INFO "clock: new_div = %d, new_rate = %ld\n", *new_div,
431 (clk->parent->rate / clkr->div));
432
433 return (clk->parent->rate / clkr->div);
422} 434}
423 435
424/* Given a clock and a rate apply a clock specific rounding function */ 436/**
425static long omap2_clk_round_rate(struct clk *clk, unsigned long rate) 437 * omap2_clksel_round_rate - find rounded rate for the given clock and rate
438 * @clk: OMAP struct clk to use
439 * @target_rate: desired clock rate
440 *
441 * Compatibility wrapper for OMAP clock framework
442 * Finds best target rate based on the source clock and possible dividers.
443 * rates. The divider array must be sorted with smallest divider first.
444 * Note that this will not work for clocks which are part of CONFIG_PARTICIPANT,
445 * they are only settable as part of virtual_prcm set.
446 *
447 * Returns the rounded clock rate or returns 0xffffffff on error.
448 */
449long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate)
426{ 450{
427 u32 new_div = 0; 451 u32 new_div;
428 int valid_rate;
429 452
430 if (clk->flags & RATE_FIXED) 453 return omap2_clksel_round_rate_div(clk, target_rate, &new_div);
431 return clk->rate; 454}
432 455
433 if (clk->flags & RATE_CKCTL) {
434 valid_rate = omap2_clksel_round_rate(clk, rate, &new_div);
435 return valid_rate;
436 }
437 456
457/* Given a clock and a rate apply a clock specific rounding function */
458long omap2_clk_round_rate(struct clk *clk, unsigned long rate)
459{
438 if (clk->round_rate != 0) 460 if (clk->round_rate != 0)
439 return clk->round_rate(clk, rate); 461 return clk->round_rate(clk, rate);
440 462
463 if (clk->flags & RATE_FIXED)
464 printk(KERN_ERR "clock: generic omap2_clk_round_rate called "
465 "on fixed-rate clock %s\n", clk->name);
466
441 return clk->rate; 467 return clk->rate;
442} 468}
443 469
444/* 470/**
445 * Check the DLL lock state, and return tue if running in unlock mode. 471 * omap2_clksel_to_divisor() - turn clksel field value into integer divider
446 * This is needed to compensate for the shifted DLL value in unlock mode. 472 * @clk: OMAP struct clk to use
473 * @field_val: register field value to find
474 *
475 * Given a struct clk of a rate-selectable clksel clock, and a register field
476 * value to search for, find the corresponding clock divisor. The register
477 * field value should be pre-masked and shifted down so the LSB is at bit 0
478 * before calling. Returns 0 on error
447 */ 479 */
448static u32 omap2_dll_force_needed(void) 480u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val)
449{ 481{
450 u32 dll_state = SDRC_DLLA_CTRL; /* dlla and dllb are a set */ 482 const struct clksel *clks;
483 const struct clksel_rate *clkr;
451 484
452 if ((dll_state & (1 << 2)) == (1 << 2)) 485 clks = omap2_get_clksel_by_parent(clk, clk->parent);
453 return 1; 486 if (clks == NULL)
454 else
455 return 0; 487 return 0;
456}
457 488
458static u32 omap2_reprogram_sdrc(u32 level, u32 force) 489 for (clkr = clks->rates; clkr->div; clkr++) {
459{ 490 if ((clkr->flags & cpu_mask) && (clkr->val == field_val))
460 u32 slow_dll_ctrl, fast_dll_ctrl, m_type; 491 break;
461 u32 prev = curr_perf_level, flags;
462
463 if ((curr_perf_level == level) && !force)
464 return prev;
465
466 m_type = omap2_memory_get_type();
467 slow_dll_ctrl = omap2_memory_get_slow_dll_ctrl();
468 fast_dll_ctrl = omap2_memory_get_fast_dll_ctrl();
469
470 if (level == PRCM_HALF_SPEED) {
471 local_irq_save(flags);
472 PRCM_VOLTSETUP = 0xffff;
473 omap2_sram_reprogram_sdrc(PRCM_HALF_SPEED,
474 slow_dll_ctrl, m_type);
475 curr_perf_level = PRCM_HALF_SPEED;
476 local_irq_restore(flags);
477 } 492 }
478 if (level == PRCM_FULL_SPEED) { 493
479 local_irq_save(flags); 494 if (!clkr->div) {
480 PRCM_VOLTSETUP = 0xffff; 495 printk(KERN_ERR "clock: Could not find fieldval %d for "
481 omap2_sram_reprogram_sdrc(PRCM_FULL_SPEED, 496 "clock %s parent %s\n", field_val, clk->name,
482 fast_dll_ctrl, m_type); 497 clk->parent->name);
483 curr_perf_level = PRCM_FULL_SPEED; 498 return 0;
484 local_irq_restore(flags);
485 } 499 }
486 500
487 return prev; 501 return clkr->div;
488} 502}
489 503
490static int omap2_reprogram_dpll(struct clk * clk, unsigned long rate) 504/**
505 * omap2_divisor_to_clksel() - turn clksel integer divisor into a field value
506 * @clk: OMAP struct clk to use
507 * @div: integer divisor to search for
508 *
509 * Given a struct clk of a rate-selectable clksel clock, and a clock divisor,
510 * find the corresponding register field value. The return register value is
511 * the value before left-shifting. Returns 0xffffffff on error
512 */
513u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)
491{ 514{
492 u32 flags, cur_rate, low, mult, div, valid_rate, done_rate; 515 const struct clksel *clks;
493 u32 bypass = 0; 516 const struct clksel_rate *clkr;
494 struct prcm_config tmpset;
495 int ret = -EINVAL;
496 517
497 local_irq_save(flags); 518 /* should never happen */
498 cur_rate = omap2_get_dpll_rate(&dpll_ck); 519 WARN_ON(div == 0);
499 mult = CM_CLKSEL2_PLL & 0x3;
500
501 if ((rate == (cur_rate / 2)) && (mult == 2)) {
502 omap2_reprogram_sdrc(PRCM_HALF_SPEED, 1);
503 } else if ((rate == (cur_rate * 2)) && (mult == 1)) {
504 omap2_reprogram_sdrc(PRCM_FULL_SPEED, 1);
505 } else if (rate != cur_rate) {
506 valid_rate = omap2_dpll_round_rate(rate);
507 if (valid_rate != rate)
508 goto dpll_exit;
509
510 if ((CM_CLKSEL2_PLL & 0x3) == 1)
511 low = curr_prcm_set->dpll_speed;
512 else
513 low = curr_prcm_set->dpll_speed / 2;
514
515 tmpset.cm_clksel1_pll = CM_CLKSEL1_PLL;
516 tmpset.cm_clksel1_pll &= ~(0x3FFF << 8);
517 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
518 tmpset.cm_clksel2_pll = CM_CLKSEL2_PLL;
519 tmpset.cm_clksel2_pll &= ~0x3;
520 if (rate > low) {
521 tmpset.cm_clksel2_pll |= 0x2;
522 mult = ((rate / 2) / 1000000);
523 done_rate = PRCM_FULL_SPEED;
524 } else {
525 tmpset.cm_clksel2_pll |= 0x1;
526 mult = (rate / 1000000);
527 done_rate = PRCM_HALF_SPEED;
528 }
529 tmpset.cm_clksel1_pll |= ((div << 8) | (mult << 12));
530
531 /* Worst case */
532 tmpset.base_sdrc_rfr = V24XX_SDRC_RFR_CTRL_BYPASS;
533
534 if (rate == curr_prcm_set->xtal_speed) /* If asking for 1-1 */
535 bypass = 1;
536 520
537 omap2_reprogram_sdrc(PRCM_FULL_SPEED, 1); /* For init_mem */ 521 clks = omap2_get_clksel_by_parent(clk, clk->parent);
538 522 if (clks == NULL)
539 /* Force dll lock mode */ 523 return 0;
540 omap2_set_prcm(tmpset.cm_clksel1_pll, tmpset.base_sdrc_rfr,
541 bypass);
542 524
543 /* Errata: ret dll entry state */ 525 for (clkr = clks->rates; clkr->div; clkr++) {
544 omap2_init_memory_params(omap2_dll_force_needed()); 526 if ((clkr->flags & cpu_mask) && (clkr->div == div))
545 omap2_reprogram_sdrc(done_rate, 0); 527 break;
546 } 528 }
547 omap2_clksel_recalc(&dpll_ck);
548 ret = 0;
549 529
550dpll_exit: 530 if (!clkr->div) {
551 local_irq_restore(flags); 531 printk(KERN_ERR "clock: Could not find divisor %d for "
552 return(ret); 532 "clock %s parent %s\n", div, clk->name,
553} 533 clk->parent->name);
534 return 0;
535 }
554 536
555/* Just return the MPU speed */ 537 return clkr->val;
556static void omap2_mpu_recalc(struct clk * clk)
557{
558 clk->rate = curr_prcm_set->mpu_speed;
559} 538}
560 539
561/* 540/**
562 * Look for a rate equal or less than the target rate given a configuration set. 541 * omap2_get_clksel - find clksel register addr & field mask for a clk
542 * @clk: struct clk to use
543 * @field_mask: ptr to u32 to store the register field mask
563 * 544 *
564 * What's not entirely clear is "which" field represents the key field. 545 * Returns the address of the clksel register upon success or NULL on error.
565 * Some might argue L3-DDR, others ARM, others IVA. This code is simple and
566 * just uses the ARM rates.
567 */ 546 */
568static long omap2_round_to_table_rate(struct clk * clk, unsigned long rate) 547void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask)
569{ 548{
570 struct prcm_config * ptr; 549 if (unlikely((clk->clksel_reg == 0) || (clk->clksel_mask == 0)))
571 long highest_rate; 550 return NULL;
572
573 if (clk != &virt_prcm_set)
574 return -EINVAL;
575
576 highest_rate = -EINVAL;
577
578 for (ptr = rate_table; ptr->mpu_speed; ptr++) {
579 if (ptr->xtal_speed != sys_ck.rate)
580 continue;
581 551
582 highest_rate = ptr->mpu_speed; 552 *field_mask = clk->clksel_mask;
583 553
584 /* Can check only after xtal frequency check */ 554 return clk->clksel_reg;
585 if (ptr->mpu_speed <= rate)
586 break;
587 }
588 return highest_rate;
589} 555}
590 556
591/* 557/**
592 * omap2_convert_field_to_div() - turn field value into integer divider 558 * omap2_clksel_get_divisor - get current divider applied to parent clock.
559 * @clk: OMAP struct clk to use.
560 *
561 * Returns the integer divisor upon success or 0 on error.
593 */ 562 */
594static u32 omap2_clksel_to_divisor(u32 div_sel, u32 field_val) 563u32 omap2_clksel_get_divisor(struct clk *clk)
595{ 564{
596 u32 i; 565 u32 field_mask, field_val;
597 u32 clkout_array[] = {1, 2, 4, 8, 16}; 566 void __iomem *div_addr;
598 567
599 if ((div_sel & SRC_RATE_SEL_MASK) == CM_SYSCLKOUT_SEL1) { 568 div_addr = omap2_get_clksel(clk, &field_mask);
600 for (i = 0; i < 5; i++) { 569 if (div_addr == 0)
601 if (field_val == i) 570 return 0;
602 return clkout_array[i]; 571
603 } 572 field_val = __raw_readl(div_addr) & field_mask;
604 return ~0; 573 field_val >>= __ffs(field_mask);
605 } else 574
606 return field_val; 575 return omap2_clksel_to_divisor(clk, field_val);
607} 576}
608 577
609/* 578int omap2_clksel_set_rate(struct clk *clk, unsigned long rate)
610 * Returns the CLKSEL divider register value
611 * REVISIT: This should be cleaned up to work nicely with void __iomem *
612 */
613static u32 omap2_get_clksel(u32 *div_sel, u32 *field_mask,
614 struct clk *clk)
615{ 579{
616 int ret = ~0; 580 u32 field_mask, field_val, reg_val, validrate, new_div = 0;
617 u32 reg_val, div_off; 581 void __iomem *div_addr;
618 u32 div_addr = 0;
619 u32 mask = ~0;
620
621 div_off = clk->rate_offset;
622
623 switch ((*div_sel & SRC_RATE_SEL_MASK)) {
624 case CM_MPU_SEL1:
625 div_addr = (u32)&CM_CLKSEL_MPU;
626 mask = 0x1f;
627 break;
628 case CM_DSP_SEL1:
629 div_addr = (u32)&CM_CLKSEL_DSP;
630 if (cpu_is_omap2420()) {
631 if ((div_off == 0) || (div_off == 8))
632 mask = 0x1f;
633 else if (div_off == 5)
634 mask = 0x3;
635 } else if (cpu_is_omap2430()) {
636 if (div_off == 0)
637 mask = 0x1f;
638 else if (div_off == 5)
639 mask = 0x3;
640 }
641 break;
642 case CM_GFX_SEL1:
643 div_addr = (u32)&CM_CLKSEL_GFX;
644 if (div_off == 0)
645 mask = 0x7;
646 break;
647 case CM_MODEM_SEL1:
648 div_addr = (u32)&CM_CLKSEL_MDM;
649 if (div_off == 0)
650 mask = 0xf;
651 break;
652 case CM_SYSCLKOUT_SEL1:
653 div_addr = (u32)&PRCM_CLKOUT_CTRL;
654 if ((div_off == 3) || (div_off == 11))
655 mask= 0x3;
656 break;
657 case CM_CORE_SEL1:
658 div_addr = (u32)&CM_CLKSEL1_CORE;
659 switch (div_off) {
660 case 0: /* l3 */
661 case 8: /* dss1 */
662 case 15: /* vylnc-2420 */
663 case 20: /* ssi */
664 mask = 0x1f; break;
665 case 5: /* l4 */
666 mask = 0x3; break;
667 case 13: /* dss2 */
668 mask = 0x1; break;
669 case 25: /* usb */
670 mask = 0x7; break;
671 }
672 }
673 582
674 *field_mask = mask; 583 validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
584 if (validrate != rate)
585 return -EINVAL;
675 586
676 if (unlikely(mask == ~0)) 587 div_addr = omap2_get_clksel(clk, &field_mask);
677 div_addr = 0; 588 if (div_addr == 0)
589 return -EINVAL;
678 590
679 *div_sel = div_addr; 591 field_val = omap2_divisor_to_clksel(clk, new_div);
592 if (field_val == ~0)
593 return -EINVAL;
680 594
681 if (unlikely(div_addr == 0)) 595 reg_val = __raw_readl(div_addr);
682 return ret; 596 reg_val &= ~field_mask;
597 reg_val |= (field_val << __ffs(field_mask));
598 __raw_writel(reg_val, div_addr);
599 wmb();
683 600
684 /* Isolate field */ 601 clk->rate = clk->parent->rate / new_div;
685 reg_val = __raw_readl((void __iomem *)div_addr) & (mask << div_off);
686 602
687 /* Normalize back to divider value */ 603 if (clk->flags & DELAYED_APP && cpu_is_omap24xx()) {
688 reg_val >>= div_off; 604 __raw_writel(OMAP24XX_VALID_CONFIG, OMAP24XX_PRCM_CLKCFG_CTRL);
605 wmb();
606 }
689 607
690 return reg_val; 608 return 0;
691} 609}
692 610
693/*
694 * Return divider to be applied to parent clock.
695 * Return 0 on error.
696 */
697static u32 omap2_clksel_get_divisor(struct clk *clk)
698{
699 int ret = 0;
700 u32 div, div_sel, div_off, field_mask, field_val;
701
702 /* isolate control register */
703 div_sel = (SRC_RATE_SEL_MASK & clk->flags);
704
705 div_off = clk->rate_offset;
706 field_val = omap2_get_clksel(&div_sel, &field_mask, clk);
707 if (div_sel == 0)
708 return ret;
709
710 div_sel = (SRC_RATE_SEL_MASK & clk->flags);
711 div = omap2_clksel_to_divisor(div_sel, field_val);
712
713 return div;
714}
715 611
716/* Set the clock rate for a clock source */ 612/* Set the clock rate for a clock source */
717static int omap2_clk_set_rate(struct clk *clk, unsigned long rate) 613int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
718
719{ 614{
720 int ret = -EINVAL; 615 int ret = -EINVAL;
721 void __iomem * reg;
722 u32 div_sel, div_off, field_mask, field_val, reg_val, validrate;
723 u32 new_div = 0;
724
725 if (!(clk->flags & CONFIG_PARTICIPANT) && (clk->flags & RATE_CKCTL)) {
726 if (clk == &dpll_ck)
727 return omap2_reprogram_dpll(clk, rate);
728
729 /* Isolate control register */
730 div_sel = (SRC_RATE_SEL_MASK & clk->flags);
731 div_off = clk->rate_offset;
732
733 validrate = omap2_clksel_round_rate(clk, rate, &new_div);
734 if (validrate != rate)
735 return(ret);
736 616
737 field_val = omap2_get_clksel(&div_sel, &field_mask, clk); 617 pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate);
738 if (div_sel == 0)
739 return ret;
740
741 if (clk->flags & CM_SYSCLKOUT_SEL1) {
742 switch (new_div) {
743 case 16:
744 field_val = 4;
745 break;
746 case 8:
747 field_val = 3;
748 break;
749 case 4:
750 field_val = 2;
751 break;
752 case 2:
753 field_val = 1;
754 break;
755 case 1:
756 field_val = 0;
757 break;
758 }
759 } else
760 field_val = new_div;
761 618
762 reg = (void __iomem *)div_sel; 619 /* CONFIG_PARTICIPANT clocks are changed only in sets via the
763 620 rate table mechanism, driven by mpu_speed */
764 reg_val = __raw_readl(reg); 621 if (clk->flags & CONFIG_PARTICIPANT)
765 reg_val &= ~(field_mask << div_off); 622 return -EINVAL;
766 reg_val |= (field_val << div_off);
767 __raw_writel(reg_val, reg);
768 wmb();
769 clk->rate = clk->parent->rate / field_val;
770 623
771 if (clk->flags & DELAYED_APP) { 624 /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */
772 __raw_writel(0x1, (void __iomem *)&PRCM_CLKCFG_CTRL); 625 if (clk->set_rate != 0)
773 wmb();
774 }
775 ret = 0;
776 } else if (clk->set_rate != 0)
777 ret = clk->set_rate(clk, rate); 626 ret = clk->set_rate(clk, rate);
778 627
779 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) 628 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
@@ -782,242 +631,92 @@ static int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
782 return ret; 631 return ret;
783} 632}
784 633
785/* Converts encoded control register address into a full address */ 634/*
786static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset, 635 * Converts encoded control register address into a full address
787 struct clk *src_clk, u32 *field_mask) 636 * On error, *src_addr will be returned as 0.
788{ 637 */
789 u32 val = ~0, src_reg_addr = 0, mask = 0; 638static u32 omap2_clksel_get_src_field(void __iomem **src_addr,
790 639 struct clk *src_clk, u32 *field_mask,
791 /* Find target control register.*/ 640 struct clk *clk, u32 *parent_div)
792 switch ((*type_to_addr & SRC_RATE_SEL_MASK)) {
793 case CM_CORE_SEL1:
794 src_reg_addr = (u32)&CM_CLKSEL1_CORE;
795 if (reg_offset == 13) { /* DSS2_fclk */
796 mask = 0x1;
797 if (src_clk == &sys_ck)
798 val = 0;
799 if (src_clk == &func_48m_ck)
800 val = 1;
801 } else if (reg_offset == 8) { /* DSS1_fclk */
802 mask = 0x1f;
803 if (src_clk == &sys_ck)
804 val = 0;
805 else if (src_clk == &core_ck) /* divided clock */
806 val = 0x10; /* rate needs fixing */
807 } else if ((reg_offset == 15) && cpu_is_omap2420()){ /*vlnyq*/
808 mask = 0x1F;
809 if(src_clk == &func_96m_ck)
810 val = 0;
811 else if (src_clk == &core_ck)
812 val = 0x10;
813 }
814 break;
815 case CM_CORE_SEL2:
816 src_reg_addr = (u32)&CM_CLKSEL2_CORE;
817 mask = 0x3;
818 if (src_clk == &func_32k_ck)
819 val = 0x0;
820 if (src_clk == &sys_ck)
821 val = 0x1;
822 if (src_clk == &alt_ck)
823 val = 0x2;
824 break;
825 case CM_WKUP_SEL1:
826 src_reg_addr = (u32)&CM_CLKSEL_WKUP;
827 mask = 0x3;
828 if (src_clk == &func_32k_ck)
829 val = 0x0;
830 if (src_clk == &sys_ck)
831 val = 0x1;
832 if (src_clk == &alt_ck)
833 val = 0x2;
834 break;
835 case CM_PLL_SEL1:
836 src_reg_addr = (u32)&CM_CLKSEL1_PLL;
837 mask = 0x1;
838 if (reg_offset == 0x3) {
839 if (src_clk == &apll96_ck)
840 val = 0;
841 if (src_clk == &alt_ck)
842 val = 1;
843 }
844 else if (reg_offset == 0x5) {
845 if (src_clk == &apll54_ck)
846 val = 0;
847 if (src_clk == &alt_ck)
848 val = 1;
849 }
850 break;
851 case CM_PLL_SEL2:
852 src_reg_addr = (u32)&CM_CLKSEL2_PLL;
853 mask = 0x3;
854 if (src_clk == &func_32k_ck)
855 val = 0x0;
856 if (src_clk == &dpll_ck)
857 val = 0x2;
858 break;
859 case CM_SYSCLKOUT_SEL1:
860 src_reg_addr = (u32)&PRCM_CLKOUT_CTRL;
861 mask = 0x3;
862 if (src_clk == &dpll_ck)
863 val = 0;
864 if (src_clk == &sys_ck)
865 val = 1;
866 if (src_clk == &func_96m_ck)
867 val = 2;
868 if (src_clk == &func_54m_ck)
869 val = 3;
870 break;
871 }
872
873 if (val == ~0) /* Catch errors in offset */
874 *type_to_addr = 0;
875 else
876 *type_to_addr = src_reg_addr;
877 *field_mask = mask;
878
879 return val;
880}
881
882static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
883{ 641{
884 void __iomem * reg; 642 const struct clksel *clks;
885 u32 src_sel, src_off, field_val, field_mask, reg_val, rate; 643 const struct clksel_rate *clkr;
886 int ret = -EINVAL;
887
888 if (unlikely(clk->flags & CONFIG_PARTICIPANT))
889 return ret;
890
891 if (clk->flags & SRC_SEL_MASK) { /* On-chip SEL collection */
892 src_sel = (SRC_RATE_SEL_MASK & clk->flags);
893 src_off = clk->src_offset;
894
895 if (src_sel == 0)
896 goto set_parent_error;
897
898 field_val = omap2_get_src_field(&src_sel, src_off, new_parent,
899 &field_mask);
900
901 reg = (void __iomem *)src_sel;
902
903 if (clk->usecount > 0)
904 _omap2_clk_disable(clk);
905
906 /* Set new source value (previous dividers if any in effect) */
907 reg_val = __raw_readl(reg) & ~(field_mask << src_off);
908 reg_val |= (field_val << src_off);
909 __raw_writel(reg_val, reg);
910 wmb();
911 644
912 if (clk->flags & DELAYED_APP) { 645 *parent_div = 0;
913 __raw_writel(0x1, (void __iomem *)&PRCM_CLKCFG_CTRL); 646 *src_addr = 0;
914 wmb();
915 }
916 if (clk->usecount > 0)
917 _omap2_clk_enable(clk);
918
919 clk->parent = new_parent;
920 647
921 /* SRC_RATE_SEL_MASK clocks follow their parents rates.*/ 648 clks = omap2_get_clksel_by_parent(clk, src_clk);
922 if ((new_parent == &core_ck) && (clk == &dss1_fck)) 649 if (clks == NULL)
923 clk->rate = new_parent->rate / 0x10; 650 return 0;
924 else
925 clk->rate = new_parent->rate;
926 651
927 if (unlikely(clk->flags & RATE_PROPAGATES)) 652 for (clkr = clks->rates; clkr->div; clkr++) {
928 propagate_rate(clk); 653 if (clkr->flags & (cpu_mask | DEFAULT_RATE))
654 break; /* Found the default rate for this platform */
655 }
929 656
657 if (!clkr->div) {
658 printk(KERN_ERR "clock: Could not find default rate for "
659 "clock %s parent %s\n", clk->name,
660 src_clk->parent->name);
930 return 0; 661 return 0;
931 } else {
932 clk->parent = new_parent;
933 rate = new_parent->rate;
934 omap2_clk_set_rate(clk, rate);
935 ret = 0;
936 } 662 }
937 663
938 set_parent_error: 664 /* Should never happen. Add a clksel mask to the struct clk. */
939 return ret; 665 WARN_ON(clk->clksel_mask == 0);
666
667 *field_mask = clk->clksel_mask;
668 *src_addr = clk->clksel_reg;
669 *parent_div = clkr->div;
670
671 return clkr->val;
940} 672}
941 673
942/* Sets basic clocks based on the specified rate */ 674int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
943static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
944{ 675{
945 u32 flags, cur_rate, done_rate, bypass = 0; 676 void __iomem *src_addr;
946 u8 cpu_mask = 0; 677 u32 field_val, field_mask, reg_val, parent_div;
947 struct prcm_config *prcm;
948 unsigned long found_speed = 0;
949 678
950 if (clk != &virt_prcm_set) 679 if (unlikely(clk->flags & CONFIG_PARTICIPANT))
951 return -EINVAL; 680 return -EINVAL;
952 681
953 /* FIXME: Change cpu_is_omap2420() to cpu_is_omap242x() */ 682 if (!clk->clksel)
954 if (cpu_is_omap2420())
955 cpu_mask = RATE_IN_242X;
956 else if (cpu_is_omap2430())
957 cpu_mask = RATE_IN_243X;
958
959 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
960 if (!(prcm->flags & cpu_mask))
961 continue;
962
963 if (prcm->xtal_speed != sys_ck.rate)
964 continue;
965
966 if (prcm->mpu_speed <= rate) {
967 found_speed = prcm->mpu_speed;
968 break;
969 }
970 }
971
972 if (!found_speed) {
973 printk(KERN_INFO "Could not set MPU rate to %luMHz\n",
974 rate / 1000000);
975 return -EINVAL; 683 return -EINVAL;
976 }
977
978 curr_prcm_set = prcm;
979 cur_rate = omap2_get_dpll_rate(&dpll_ck);
980
981 if (prcm->dpll_speed == cur_rate / 2) {
982 omap2_reprogram_sdrc(PRCM_HALF_SPEED, 1);
983 } else if (prcm->dpll_speed == cur_rate * 2) {
984 omap2_reprogram_sdrc(PRCM_FULL_SPEED, 1);
985 } else if (prcm->dpll_speed != cur_rate) {
986 local_irq_save(flags);
987 684
988 if (prcm->dpll_speed == prcm->xtal_speed) 685 field_val = omap2_clksel_get_src_field(&src_addr, new_parent,
989 bypass = 1; 686 &field_mask, clk, &parent_div);
687 if (src_addr == 0)
688 return -EINVAL;
990 689
991 if ((prcm->cm_clksel2_pll & 0x3) == 2) 690 if (clk->usecount > 0)
992 done_rate = PRCM_FULL_SPEED; 691 _omap2_clk_disable(clk);
993 else
994 done_rate = PRCM_HALF_SPEED;
995 692
996 /* MPU divider */ 693 /* Set new source value (previous dividers if any in effect) */
997 CM_CLKSEL_MPU = prcm->cm_clksel_mpu; 694 reg_val = __raw_readl(src_addr) & ~field_mask;
695 reg_val |= (field_val << __ffs(field_mask));
696 __raw_writel(reg_val, src_addr);
697 wmb();
998 698
999 /* dsp + iva1 div(2420), iva2.1(2430) */ 699 if (clk->flags & DELAYED_APP && cpu_is_omap24xx()) {
1000 CM_CLKSEL_DSP = prcm->cm_clksel_dsp; 700 __raw_writel(OMAP24XX_VALID_CONFIG, OMAP24XX_PRCM_CLKCFG_CTRL);
701 wmb();
702 }
1001 703
1002 CM_CLKSEL_GFX = prcm->cm_clksel_gfx; 704 if (clk->usecount > 0)
705 _omap2_clk_enable(clk);
1003 706
1004 /* Major subsystem dividers */ 707 clk->parent = new_parent;
1005 CM_CLKSEL1_CORE = prcm->cm_clksel1_core;
1006 if (cpu_is_omap2430())
1007 CM_CLKSEL_MDM = prcm->cm_clksel_mdm;
1008 708
1009 /* x2 to enter init_mem */ 709 /* CLKSEL clocks follow their parents' rates, divided by a divisor */
1010 omap2_reprogram_sdrc(PRCM_FULL_SPEED, 1); 710 clk->rate = new_parent->rate;
1011 711
1012 omap2_set_prcm(prcm->cm_clksel1_pll, prcm->base_sdrc_rfr, 712 if (parent_div > 0)
1013 bypass); 713 clk->rate /= parent_div;
1014 714
1015 omap2_init_memory_params(omap2_dll_force_needed()); 715 pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
1016 omap2_reprogram_sdrc(done_rate, 0); 716 clk->name, clk->parent->name, clk->rate);
1017 717
1018 local_irq_restore(flags); 718 if (unlikely(clk->flags & RATE_PROPAGATES))
1019 } 719 propagate_rate(clk);
1020 omap2_clksel_recalc(&dpll_ck);
1021 720
1022 return 0; 721 return 0;
1023} 722}
@@ -1027,150 +726,17 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
1027 *-------------------------------------------------------------------------*/ 726 *-------------------------------------------------------------------------*/
1028 727
1029#ifdef CONFIG_OMAP_RESET_CLOCKS 728#ifdef CONFIG_OMAP_RESET_CLOCKS
1030static void __init omap2_clk_disable_unused(struct clk *clk) 729void omap2_clk_disable_unused(struct clk *clk)
1031{ 730{
1032 u32 regval32; 731 u32 regval32, v;
732
733 v = (clk->flags & INVERT_ENABLE) ? (1 << clk->enable_bit) : 0;
1033 734
1034 regval32 = __raw_readl(clk->enable_reg); 735 regval32 = __raw_readl(clk->enable_reg);
1035 if ((regval32 & (1 << clk->enable_bit)) == 0) 736 if ((regval32 & (1 << clk->enable_bit)) == v)
1036 return; 737 return;
1037 738
1038 printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name); 739 printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
1039 _omap2_clk_disable(clk); 740 _omap2_clk_disable(clk);
1040} 741}
1041#else
1042#define omap2_clk_disable_unused NULL
1043#endif 742#endif
1044
1045static struct clk_functions omap2_clk_functions = {
1046 .clk_enable = omap2_clk_enable,
1047 .clk_disable = omap2_clk_disable,
1048 .clk_round_rate = omap2_clk_round_rate,
1049 .clk_set_rate = omap2_clk_set_rate,
1050 .clk_set_parent = omap2_clk_set_parent,
1051 .clk_disable_unused = omap2_clk_disable_unused,
1052};
1053
1054static void __init omap2_get_crystal_rate(struct clk *osc, struct clk *sys)
1055{
1056 u32 div, aplls, sclk = 13000000;
1057
1058 aplls = CM_CLKSEL1_PLL;
1059 aplls &= ((1 << 23) | (1 << 24) | (1 << 25));
1060 aplls >>= 23; /* Isolate field, 0,2,3 */
1061
1062 if (aplls == 0)
1063 sclk = 19200000;
1064 else if (aplls == 2)
1065 sclk = 13000000;
1066 else if (aplls == 3)
1067 sclk = 12000000;
1068
1069 div = PRCM_CLKSRC_CTRL;
1070 div &= ((1 << 7) | (1 << 6));
1071 div >>= sys->rate_offset;
1072
1073 osc->rate = sclk * div;
1074 sys->rate = sclk;
1075}
1076
1077/*
1078 * Set clocks for bypass mode for reboot to work.
1079 */
1080void omap2_clk_prepare_for_reboot(void)
1081{
1082 u32 rate;
1083
1084 if (vclk == NULL || sclk == NULL)
1085 return;
1086
1087 rate = clk_get_rate(sclk);
1088 clk_set_rate(vclk, rate);
1089}
1090
1091/*
1092 * Switch the MPU rate if specified on cmdline.
1093 * We cannot do this early until cmdline is parsed.
1094 */
1095static int __init omap2_clk_arch_init(void)
1096{
1097 if (!mpurate)
1098 return -EINVAL;
1099
1100 if (omap2_select_table_rate(&virt_prcm_set, mpurate))
1101 printk(KERN_ERR "Could not find matching MPU rate\n");
1102
1103 propagate_rate(&osc_ck); /* update main root fast */
1104 propagate_rate(&func_32k_ck); /* update main root slow */
1105
1106 printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL/MPU): "
1107 "%ld.%01ld/%ld/%ld MHz\n",
1108 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
1109 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
1110
1111 return 0;
1112}
1113arch_initcall(omap2_clk_arch_init);
1114
1115int __init omap2_clk_init(void)
1116{
1117 struct prcm_config *prcm;
1118 struct clk ** clkp;
1119 u32 clkrate;
1120
1121 clk_init(&omap2_clk_functions);
1122 omap2_get_crystal_rate(&osc_ck, &sys_ck);
1123
1124 for (clkp = onchip_clks; clkp < onchip_clks + ARRAY_SIZE(onchip_clks);
1125 clkp++) {
1126
1127 if ((*clkp)->flags & CLOCK_IN_OMAP242X && cpu_is_omap2420()) {
1128 clk_register(*clkp);
1129 continue;
1130 }
1131
1132 if ((*clkp)->flags & CLOCK_IN_OMAP243X && cpu_is_omap2430()) {
1133 clk_register(*clkp);
1134 continue;
1135 }
1136 }
1137
1138 /* Check the MPU rate set by bootloader */
1139 clkrate = omap2_get_dpll_rate(&dpll_ck);
1140 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
1141 if (prcm->xtal_speed != sys_ck.rate)
1142 continue;
1143 if (prcm->dpll_speed <= clkrate)
1144 break;
1145 }
1146 curr_prcm_set = prcm;
1147
1148 propagate_rate(&osc_ck); /* update main root fast */
1149 propagate_rate(&func_32k_ck); /* update main root slow */
1150
1151 printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): "
1152 "%ld.%01ld/%ld/%ld MHz\n",
1153 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
1154 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
1155
1156 /*
1157 * Only enable those clocks we will need, let the drivers
1158 * enable other clocks as necessary
1159 */
1160 clk_enable(&sync_32k_ick);
1161 clk_enable(&omapctrl_ick);
1162
1163 /* Force the APLLs always active. The clocks are idled
1164 * automatically by hardware. */
1165 clk_enable(&apll96_ck);
1166 clk_enable(&apll54_ck);
1167
1168 if (cpu_is_omap2430())
1169 clk_enable(&sdrc_ick);
1170
1171 /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */
1172 vclk = clk_get(NULL, "virt_prcm_set");
1173 sclk = clk_get(NULL, "sys_ck");
1174
1175 return 0;
1176}
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 4f791866b910..d5980a9e09a4 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -1,13 +1,12 @@
1/* 1/*
2 * linux/arch/arm/mach-omap24xx/clock.h 2 * linux/arch/arm/mach-omap2/clock.h
3 * 3 *
4 * Copyright (C) 2005 Texas Instruments Inc. 4 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Richard Woodruff <r-woodruff2@ti.com> 5 * Copyright (C) 2004-2008 Nokia Corporation
6 * Created for OMAP2.
7 * 6 *
8 * Copyright (C) 2004 Nokia corporation 7 * Contacts:
9 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 8 * Richard Woodruff <r-woodruff2@ti.com>
10 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc 9 * Paul Walmsley
11 * 10 *
12 * This program is free software; you can redistribute it and/or modify 11 * 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 12 * it under the terms of the GNU General Public License version 2 as
@@ -17,2095 +16,53 @@
17#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H 16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
18#define __ARCH_ARM_MACH_OMAP2_CLOCK_H 17#define __ARCH_ARM_MACH_OMAP2_CLOCK_H
19 18
20static void omap2_sys_clk_recalc(struct clk * clk); 19#include <asm/arch/clock.h>
21static void omap2_clksel_recalc(struct clk * clk);
22static void omap2_followparent_recalc(struct clk * clk);
23static void omap2_propagate_rate(struct clk * clk);
24static void omap2_mpu_recalc(struct clk * clk);
25static int omap2_select_table_rate(struct clk * clk, unsigned long rate);
26static long omap2_round_to_table_rate(struct clk * clk, unsigned long rate);
27static void omap2_clk_disable(struct clk *clk);
28static void omap2_sys_clk_recalc(struct clk * clk);
29static u32 omap2_clksel_to_divisor(u32 div_sel, u32 field_val);
30static u32 omap2_clksel_get_divisor(struct clk *clk);
31
32
33#define RATE_IN_242X (1 << 0)
34#define RATE_IN_243X (1 << 1)
35
36/* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
37 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
38 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
39 */
40struct prcm_config {
41 unsigned long xtal_speed; /* crystal rate */
42 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
43 unsigned long mpu_speed; /* speed of MPU */
44 unsigned long cm_clksel_mpu; /* mpu divider */
45 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
46 unsigned long cm_clksel_gfx; /* gfx dividers */
47 unsigned long cm_clksel1_core; /* major subsystem dividers */
48 unsigned long cm_clksel1_pll; /* m,n */
49 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
50 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
51 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
52 unsigned char flags;
53};
54
55/* Mask for clksel which support parent settign in set_rate */
56#define SRC_SEL_MASK (CM_CORE_SEL1 | CM_CORE_SEL2 | CM_WKUP_SEL1 | \
57 CM_PLL_SEL1 | CM_PLL_SEL2 | CM_SYSCLKOUT_SEL1)
58
59/* Mask for clksel regs which support rate operations */
60#define SRC_RATE_SEL_MASK (CM_MPU_SEL1 | CM_DSP_SEL1 | CM_GFX_SEL1 | \
61 CM_MODEM_SEL1 | CM_CORE_SEL1 | CM_CORE_SEL2 | \
62 CM_WKUP_SEL1 | CM_PLL_SEL1 | CM_PLL_SEL2 | \
63 CM_SYSCLKOUT_SEL1)
64
65/*
66 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
67 * These configurations are characterized by voltage and speed for clocks.
68 * The device is only validated for certain combinations. One way to express
69 * these combinations is via the 'ratio's' which the clocks operate with
70 * respect to each other. These ratio sets are for a given voltage/DPLL
71 * setting. All configurations can be described by a DPLL setting and a ratio
72 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
73 *
74 * 2430 differs from 2420 in that there are no more phase synchronizers used.
75 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
76 * 2430 (iva2.1, NOdsp, mdm)
77 */
78
79/* Core fields for cm_clksel, not ratio governed */
80#define RX_CLKSEL_DSS1 (0x10 << 8)
81#define RX_CLKSEL_DSS2 (0x0 << 13)
82#define RX_CLKSEL_SSI (0x5 << 20)
83
84/*-------------------------------------------------------------------------
85 * Voltage/DPLL ratios
86 *-------------------------------------------------------------------------*/
87
88/* 2430 Ratio's, 2430-Ratio Config 1 */
89#define R1_CLKSEL_L3 (4 << 0)
90#define R1_CLKSEL_L4 (2 << 5)
91#define R1_CLKSEL_USB (4 << 25)
92#define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \
93 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
94 R1_CLKSEL_L4 | R1_CLKSEL_L3
95#define R1_CLKSEL_MPU (2 << 0)
96#define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
97#define R1_CLKSEL_DSP (2 << 0)
98#define R1_CLKSEL_DSP_IF (2 << 5)
99#define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF
100#define R1_CLKSEL_GFX (2 << 0)
101#define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
102#define R1_CLKSEL_MDM (4 << 0)
103#define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
104
105/* 2430-Ratio Config 2 */
106#define R2_CLKSEL_L3 (6 << 0)
107#define R2_CLKSEL_L4 (2 << 5)
108#define R2_CLKSEL_USB (2 << 25)
109#define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \
110 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
111 R2_CLKSEL_L4 | R2_CLKSEL_L3
112#define R2_CLKSEL_MPU (2 << 0)
113#define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
114#define R2_CLKSEL_DSP (2 << 0)
115#define R2_CLKSEL_DSP_IF (3 << 5)
116#define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF
117#define R2_CLKSEL_GFX (2 << 0)
118#define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
119#define R2_CLKSEL_MDM (6 << 0)
120#define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
121
122/* 2430-Ratio Bootm (BYPASS) */
123#define RB_CLKSEL_L3 (1 << 0)
124#define RB_CLKSEL_L4 (1 << 5)
125#define RB_CLKSEL_USB (1 << 25)
126#define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \
127 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
128 RB_CLKSEL_L4 | RB_CLKSEL_L3
129#define RB_CLKSEL_MPU (1 << 0)
130#define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
131#define RB_CLKSEL_DSP (1 << 0)
132#define RB_CLKSEL_DSP_IF (1 << 5)
133#define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF
134#define RB_CLKSEL_GFX (1 << 0)
135#define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
136#define RB_CLKSEL_MDM (1 << 0)
137#define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
138
139/* 2420 Ratio Equivalents */
140#define RXX_CLKSEL_VLYNQ (0x12 << 15)
141#define RXX_CLKSEL_SSI (0x8 << 20)
142
143/* 2420-PRCM III 532MHz core */
144#define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
145#define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
146#define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
147#define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
148 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
149 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
150 RIII_CLKSEL_L3
151#define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
152#define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
153#define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
154#define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
155#define RIII_SYNC_DSP (1 << 7) /* Enable sync */
156#define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
157#define RIII_SYNC_IVA (1 << 13) /* Enable sync */
158#define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
159 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
160 RIII_CLKSEL_DSP
161#define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
162#define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
163
164/* 2420-PRCM II 600MHz core */
165#define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
166#define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
167#define RII_CLKSEL_USB (2 << 25) /* 50MHz */
168#define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \
169 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
170 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
171 RII_CLKSEL_L4 | RII_CLKSEL_L3
172#define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
173#define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
174#define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
175#define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
176#define RII_SYNC_DSP (0 << 7) /* Bypass sync */
177#define RII_CLKSEL_IVA (6 << 8) /* iva1 - 200MHz */
178#define RII_SYNC_IVA (0 << 13) /* Bypass sync */
179#define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \
180 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
181 RII_CLKSEL_DSP
182#define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
183#define RII_CM_CLKSEL_GFX_VAL RII_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 | RVII_CLKSEL_DSS2 | \
196 RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3
197
198#define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
199#define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
200 20
201#define RVII_CLKSEL_DSP (1 << 0) 21int omap2_clk_enable(struct clk *clk);
202#define RVII_CLKSEL_DSP_IF (1 << 5) 22void omap2_clk_disable(struct clk *clk);
203#define RVII_SYNC_DSP (0 << 7) 23long omap2_clk_round_rate(struct clk *clk, unsigned long rate);
204#define RVII_CLKSEL_IVA (1 << 8) 24int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
205#define RVII_SYNC_IVA (0 << 13) 25int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
206#define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \
207 RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP
208
209#define RVII_CLKSEL_GFX (1 << 0)
210#define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
211
212/*-------------------------------------------------------------------------
213 * 2430 Target modes: Along with each configuration the CPU has several
214 * modes which goes along with them. Modes mainly are the addition of
215 * describe DPLL combinations to go along with a ratio.
216 *-------------------------------------------------------------------------*/
217
218/* Hardware governed */
219#define MX_48M_SRC (0 << 3)
220#define MX_54M_SRC (0 << 5)
221#define MX_APLLS_CLIKIN_12 (3 << 23)
222#define MX_APLLS_CLIKIN_13 (2 << 23)
223#define MX_APLLS_CLIKIN_19_2 (0 << 23)
224
225/*
226 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
227 * #2 (ratio1) baseport-target
228 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
229 */
230#define M5A_DPLL_MULT_12 (133 << 12)
231#define M5A_DPLL_DIV_12 (5 << 8)
232#define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
233 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
234 MX_APLLS_CLIKIN_12
235#define M5A_DPLL_MULT_13 (266 << 12)
236#define M5A_DPLL_DIV_13 (12 << 8)
237#define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
238 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
239 MX_APLLS_CLIKIN_13
240#define M5A_DPLL_MULT_19 (180 << 12)
241#define M5A_DPLL_DIV_19 (12 << 8)
242#define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
243 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
244 MX_APLLS_CLIKIN_19_2
245/* #5b (ratio1) target DPLL = 200*2 = 400MHz */
246#define M5B_DPLL_MULT_12 (50 << 12)
247#define M5B_DPLL_DIV_12 (2 << 8)
248#define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
249 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
250 MX_APLLS_CLIKIN_12
251#define M5B_DPLL_MULT_13 (200 << 12)
252#define M5B_DPLL_DIV_13 (12 << 8)
253
254#define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
255 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
256 MX_APLLS_CLIKIN_13
257#define M5B_DPLL_MULT_19 (125 << 12)
258#define M5B_DPLL_DIV_19 (31 << 8)
259#define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
260 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
261 MX_APLLS_CLIKIN_19_2
262/*
263 * #4 (ratio2)
264 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
265 */
266#define M3_DPLL_MULT_12 (55 << 12)
267#define M3_DPLL_DIV_12 (1 << 8)
268#define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
269 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
270 MX_APLLS_CLIKIN_12
271#define M3_DPLL_MULT_13 (330 << 12)
272#define M3_DPLL_DIV_13 (12 << 8)
273#define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
274 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
275 MX_APLLS_CLIKIN_13
276#define M3_DPLL_MULT_19 (275 << 12)
277#define M3_DPLL_DIV_19 (15 << 8)
278#define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
279 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
280 MX_APLLS_CLIKIN_19_2
281/* boot (boot) */
282#define MB_DPLL_MULT (1 << 12)
283#define MB_DPLL_DIV (0 << 8)
284#define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
285 MB_DPLL_MULT | MX_APLLS_CLIKIN_12
286
287#define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
288 MB_DPLL_MULT | MX_APLLS_CLIKIN_13
289
290#define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
291 MB_DPLL_MULT | MX_APLLS_CLIKIN_19
292
293/*
294 * 2430 - chassis (sedna)
295 * 165 (ratio1) same as above #2
296 * 150 (ratio1)
297 * 133 (ratio2) same as above #4
298 * 110 (ratio2) same as above #3
299 * 104 (ratio2)
300 * boot (boot)
301 */
302
303/*
304 * 2420 Equivalent - mode registers
305 * PRCM II , target DPLL = 2*300MHz = 600MHz
306 */
307#define MII_DPLL_MULT_12 (50 << 12)
308#define MII_DPLL_DIV_12 (1 << 8)
309#define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
310 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
311 MX_APLLS_CLIKIN_12
312#define MII_DPLL_MULT_13 (300 << 12)
313#define MII_DPLL_DIV_13 (12 << 8)
314#define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
315 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
316 MX_APLLS_CLIKIN_13
317
318/* PRCM III target DPLL = 2*266 = 532MHz*/
319#define MIII_DPLL_MULT_12 (133 << 12)
320#define MIII_DPLL_DIV_12 (5 << 8)
321#define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
322 MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \
323 MX_APLLS_CLIKIN_12
324#define MIII_DPLL_MULT_13 (266 << 12)
325#define MIII_DPLL_DIV_13 (12 << 8)
326#define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
327 MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \
328 MX_APLLS_CLIKIN_13
329
330/* PRCM VII (boot bypass) */
331#define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
332#define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
333
334/* High and low operation value */
335#define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
336#define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
337
338/*
339 * These represent optimal values for common parts, it won't work for all.
340 * As long as you scale down, most parameters are still work, they just
341 * become sub-optimal. The RFR value goes in the opposite direction. If you
342 * don't adjust it down as your clock period increases the refresh interval
343 * will not be met. Setting all parameters for complete worst case may work,
344 * but may cut memory performance by 2x. Due to errata the DLLs need to be
345 * unlocked and their value needs run time calibration. A dynamic call is
346 * need for that as no single right value exists acorss production samples.
347 *
348 * Only the FULL speed values are given. Current code is such that rate
349 * changes must be made at DPLLoutx2. The actual value adjustment for low
350 * frequency operation will be handled by omap_set_performance()
351 *
352 * By having the boot loader boot up in the fastest L4 speed available likely
353 * will result in something which you can switch between.
354 */
355#define V24XX_SDRC_RFR_CTRL_133MHz (0x0003de00 | 1)
356#define V24XX_SDRC_RFR_CTRL_100MHz (0x0002da01 | 1)
357#define V24XX_SDRC_RFR_CTRL_110MHz (0x0002da01 | 1) /* Need to calc */
358#define V24XX_SDRC_RFR_CTRL_BYPASS (0x00005000 | 1) /* Need to calc */
359
360/* MPU speed defines */
361#define S12M 12000000
362#define S13M 13000000
363#define S19M 19200000
364#define S26M 26000000
365#define S100M 100000000
366#define S133M 133000000
367#define S150M 150000000
368#define S165M 165000000
369#define S200M 200000000
370#define S266M 266000000
371#define S300M 300000000
372#define S330M 330000000
373#define S400M 400000000
374#define S532M 532000000
375#define S600M 600000000
376#define S660M 660000000
377
378/*-------------------------------------------------------------------------
379 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
380 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
381 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
382 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
383 *
384 * Filling in table based on H4 boards and 2430-SDPs variants available.
385 * There are quite a few more rates combinations which could be defined.
386 *
387 * When multiple values are defined the start up will try and choose the
388 * fastest one. If a 'fast' value is defined, then automatically, the /2
389 * one should be included as it can be used. Generally having more that
390 * one fast set does not make sense, as static timings need to be changed
391 * to change the set. The exception is the bypass setting which is
392 * availble for low power bypass.
393 *
394 * Note: This table needs to be sorted, fastest to slowest.
395 *-------------------------------------------------------------------------*/
396static struct prcm_config rate_table[] = {
397 /* PRCM II - FAST */
398 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
399 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
400 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
401 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
402 RATE_IN_242X},
403
404 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
405 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
406 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
407 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
408 RATE_IN_242X},
409
410 /* PRCM III - FAST */
411 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
412 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
413 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
414 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
415 RATE_IN_242X},
416
417 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
418 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
419 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
420 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
421 RATE_IN_242X},
422
423 /* PRCM II - SLOW */
424 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
425 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
426 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
427 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
428 RATE_IN_242X},
429
430 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
431 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
432 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
433 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_100MHz,
434 RATE_IN_242X},
435
436 /* PRCM III - SLOW */
437 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
438 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
439 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
440 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
441 RATE_IN_242X},
442
443 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
444 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
445 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
446 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_133MHz,
447 RATE_IN_242X},
448
449 /* PRCM-VII (boot-bypass) */
450 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
451 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
452 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
453 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_BYPASS,
454 RATE_IN_242X},
455
456 /* PRCM-VII (boot-bypass) */
457 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
458 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
459 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
460 MX_CLKSEL2_PLL_2x_VAL, 0, V24XX_SDRC_RFR_CTRL_BYPASS,
461 RATE_IN_242X},
462
463 /* PRCM #3 - ratio2 (ES2) - FAST */
464 {S13M, S660M, S330M, R2_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
465 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
466 R2_CM_CLKSEL1_CORE_VAL, M3_CM_CLKSEL1_PLL_13_VAL,
467 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
468 V24XX_SDRC_RFR_CTRL_110MHz,
469 RATE_IN_243X},
470
471 /* PRCM #5a - ratio1 - FAST */
472 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
473 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
474 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
475 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
476 V24XX_SDRC_RFR_CTRL_133MHz,
477 RATE_IN_243X},
478
479 /* PRCM #5b - ratio1 - FAST */
480 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
481 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
482 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
483 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
484 V24XX_SDRC_RFR_CTRL_100MHz,
485 RATE_IN_243X},
486
487 /* PRCM #3 - ratio2 (ES2) - SLOW */
488 {S13M, S330M, S165M, R2_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
489 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
490 R2_CM_CLKSEL1_CORE_VAL, M3_CM_CLKSEL1_PLL_13_VAL,
491 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
492 V24XX_SDRC_RFR_CTRL_110MHz,
493 RATE_IN_243X},
494
495 /* PRCM #5a - ratio1 - SLOW */
496 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
497 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
498 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
499 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
500 V24XX_SDRC_RFR_CTRL_133MHz,
501 RATE_IN_243X},
502
503 /* PRCM #5b - ratio1 - SLOW*/
504 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
505 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
506 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
507 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
508 V24XX_SDRC_RFR_CTRL_100MHz,
509 RATE_IN_243X},
510
511 /* PRCM-boot/bypass */
512 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
513 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
514 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
515 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
516 V24XX_SDRC_RFR_CTRL_BYPASS,
517 RATE_IN_243X},
518
519 /* PRCM-boot/bypass */
520 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
521 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
522 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
523 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
524 V24XX_SDRC_RFR_CTRL_BYPASS,
525 RATE_IN_243X},
526
527 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
528};
529
530/*-------------------------------------------------------------------------
531 * 24xx clock tree.
532 *
533 * NOTE:In many cases here we are assigning a 'default' parent. In many
534 * cases the parent is selectable. The get/set parent calls will also
535 * switch sources.
536 *
537 * Many some clocks say always_enabled, but they can be auto idled for
538 * power savings. They will always be available upon clock request.
539 *
540 * Several sources are given initial rates which may be wrong, this will
541 * be fixed up in the init func.
542 *
543 * Things are broadly separated below by clock domains. It is
544 * noteworthy that most periferals have dependencies on multiple clock
545 * domains. Many get their interface clocks from the L4 domain, but get
546 * functional clocks from fixed sources or other core domain derived
547 * clocks.
548 *-------------------------------------------------------------------------*/
549
550/* Base external input clocks */
551static struct clk func_32k_ck = {
552 .name = "func_32k_ck",
553 .rate = 32000,
554 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
555 RATE_FIXED | ALWAYS_ENABLED,
556};
557
558/* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */
559static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
560 .name = "osc_ck",
561 .rate = 26000000, /* fixed up in clock init */
562 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
563 RATE_FIXED | RATE_PROPAGATES,
564};
565
566/* With out modem likely 12MHz, with modem likely 13MHz */
567static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
568 .name = "sys_ck", /* ~ ref_clk also */
569 .parent = &osc_ck,
570 .rate = 13000000,
571 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
572 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
573 .rate_offset = 6, /* sysclkdiv 1 or 2, already handled or no boot */
574 .recalc = &omap2_sys_clk_recalc,
575};
576
577static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
578 .name = "alt_ck",
579 .rate = 54000000,
580 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
581 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
582 .recalc = &omap2_propagate_rate,
583};
584
585/*
586 * Analog domain root source clocks
587 */
588
589/* dpll_ck, is broken out in to special cases through clksel */
590static struct clk dpll_ck = {
591 .name = "dpll_ck",
592 .parent = &sys_ck, /* Can be func_32k also */
593 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
594 RATE_PROPAGATES | RATE_CKCTL | CM_PLL_SEL1,
595 .recalc = &omap2_clksel_recalc,
596};
597
598static struct clk apll96_ck = {
599 .name = "apll96_ck",
600 .parent = &sys_ck,
601 .rate = 96000000,
602 .flags = CLOCK_IN_OMAP242X |CLOCK_IN_OMAP243X |
603 RATE_FIXED | RATE_PROPAGATES,
604 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
605 .enable_bit = 0x2,
606 .recalc = &omap2_propagate_rate,
607};
608
609static struct clk apll54_ck = {
610 .name = "apll54_ck",
611 .parent = &sys_ck,
612 .rate = 54000000,
613 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
614 RATE_FIXED | RATE_PROPAGATES,
615 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
616 .enable_bit = 0x6,
617 .recalc = &omap2_propagate_rate,
618};
619 26
620/* 27#ifdef CONFIG_OMAP_RESET_CLOCKS
621 * PRCM digital base sources 28void omap2_clk_disable_unused(struct clk *clk);
622 */ 29#else
623static struct clk func_54m_ck = { 30#define omap2_clk_disable_unused NULL
624 .name = "func_54m_ck", 31#endif
625 .parent = &apll54_ck, /* can also be alt_clk */
626 .rate = 54000000,
627 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
628 RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
629 .src_offset = 5,
630 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
631 .enable_bit = 0xff,
632 .recalc = &omap2_propagate_rate,
633};
634
635static struct clk core_ck = {
636 .name = "core_ck",
637 .parent = &dpll_ck, /* can also be 32k */
638 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
639 ALWAYS_ENABLED | RATE_PROPAGATES,
640 .recalc = &omap2_propagate_rate,
641};
642
643static struct clk sleep_ck = { /* sys_clk or 32k */
644 .name = "sleep_ck",
645 .parent = &func_32k_ck,
646 .rate = 32000,
647 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
648 .recalc = &omap2_propagate_rate,
649};
650
651static struct clk func_96m_ck = {
652 .name = "func_96m_ck",
653 .parent = &apll96_ck,
654 .rate = 96000000,
655 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
656 RATE_FIXED | RATE_PROPAGATES,
657 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
658 .enable_bit = 0xff,
659 .recalc = &omap2_propagate_rate,
660};
661
662static struct clk func_48m_ck = {
663 .name = "func_48m_ck",
664 .parent = &apll96_ck, /* 96M or Alt */
665 .rate = 48000000,
666 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
667 RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
668 .src_offset = 3,
669 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
670 .enable_bit = 0xff,
671 .recalc = &omap2_propagate_rate,
672};
673
674static struct clk func_12m_ck = {
675 .name = "func_12m_ck",
676 .parent = &func_48m_ck,
677 .rate = 12000000,
678 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
679 RATE_FIXED | RATE_PROPAGATES,
680 .recalc = &omap2_propagate_rate,
681 .enable_reg = (void __iomem *)&CM_CLKEN_PLL,
682 .enable_bit = 0xff,
683};
684
685/* Secure timer, only available in secure mode */
686static struct clk wdt1_osc_ck = {
687 .name = "ck_wdt1_osc",
688 .parent = &osc_ck,
689 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
690 .recalc = &omap2_followparent_recalc,
691};
692
693static struct clk sys_clkout = {
694 .name = "sys_clkout",
695 .parent = &func_54m_ck,
696 .rate = 54000000,
697 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
698 CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
699 .src_offset = 0,
700 .enable_reg = (void __iomem *)&PRCM_CLKOUT_CTRL,
701 .enable_bit = 7,
702 .rate_offset = 3,
703 .recalc = &omap2_clksel_recalc,
704};
705
706/* In 2430, new in 2420 ES2 */
707static struct clk sys_clkout2 = {
708 .name = "sys_clkout2",
709 .parent = &func_54m_ck,
710 .rate = 54000000,
711 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
712 CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
713 .src_offset = 8,
714 .enable_reg = (void __iomem *)&PRCM_CLKOUT_CTRL,
715 .enable_bit = 15,
716 .rate_offset = 11,
717 .recalc = &omap2_clksel_recalc,
718};
719
720static struct clk emul_ck = {
721 .name = "emul_ck",
722 .parent = &func_54m_ck,
723 .flags = CLOCK_IN_OMAP242X,
724 .enable_reg = (void __iomem *)&PRCM_CLKEMUL_CTRL,
725 .enable_bit = 0,
726 .recalc = &omap2_propagate_rate,
727
728};
729
730/*
731 * MPU clock domain
732 * Clocks:
733 * MPU_FCLK, MPU_ICLK
734 * INT_M_FCLK, INT_M_I_CLK
735 *
736 * - Individual clocks are hardware managed.
737 * - Base divider comes from: CM_CLKSEL_MPU
738 *
739 */
740static struct clk mpu_ck = { /* Control cpu */
741 .name = "mpu_ck",
742 .parent = &core_ck,
743 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL |
744 ALWAYS_ENABLED | CM_MPU_SEL1 | DELAYED_APP |
745 CONFIG_PARTICIPANT | RATE_PROPAGATES,
746 .rate_offset = 0, /* bits 0-4 */
747 .recalc = &omap2_clksel_recalc,
748};
749
750/*
751 * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain
752 * Clocks:
753 * 2430: IVA2.1_FCLK, IVA2.1_ICLK
754 * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP
755 */
756static struct clk iva2_1_fck = {
757 .name = "iva2_1_fck",
758 .parent = &core_ck,
759 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
760 DELAYED_APP | RATE_PROPAGATES |
761 CONFIG_PARTICIPANT,
762 .rate_offset = 0,
763 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
764 .enable_bit = 0,
765 .recalc = &omap2_clksel_recalc,
766};
767
768static struct clk iva2_1_ick = {
769 .name = "iva2_1_ick",
770 .parent = &iva2_1_fck,
771 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
772 DELAYED_APP | CONFIG_PARTICIPANT,
773 .rate_offset = 5,
774 .recalc = &omap2_clksel_recalc,
775};
776
777/*
778 * Won't be too specific here. The core clock comes into this block
779 * it is divided then tee'ed. One branch goes directly to xyz enable
780 * controls. The other branch gets further divided by 2 then possibly
781 * routed into a synchronizer and out of clocks abc.
782 */
783static struct clk dsp_fck = {
784 .name = "dsp_fck",
785 .parent = &core_ck,
786 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
787 DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES,
788 .rate_offset = 0,
789 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
790 .enable_bit = 0,
791 .recalc = &omap2_clksel_recalc,
792};
793
794static struct clk dsp_ick = {
795 .name = "dsp_ick", /* apparently ipi and isp */
796 .parent = &dsp_fck,
797 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
798 DELAYED_APP | CONFIG_PARTICIPANT,
799 .rate_offset = 5,
800 .enable_reg = (void __iomem *)&CM_ICLKEN_DSP,
801 .enable_bit = 1, /* for ipi */
802 .recalc = &omap2_clksel_recalc,
803};
804
805static struct clk iva1_ifck = {
806 .name = "iva1_ifck",
807 .parent = &core_ck,
808 .flags = CLOCK_IN_OMAP242X | CM_DSP_SEL1 | RATE_CKCTL |
809 CONFIG_PARTICIPANT | RATE_PROPAGATES | DELAYED_APP,
810 .rate_offset= 8,
811 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
812 .enable_bit = 10,
813 .recalc = &omap2_clksel_recalc,
814};
815
816/* IVA1 mpu/int/i/f clocks are /2 of parent */
817static struct clk iva1_mpu_int_ifck = {
818 .name = "iva1_mpu_int_ifck",
819 .parent = &iva1_ifck,
820 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1,
821 .enable_reg = (void __iomem *)&CM_FCLKEN_DSP,
822 .enable_bit = 8,
823 .recalc = &omap2_clksel_recalc,
824};
825
826/*
827 * L3 clock domain
828 * L3 clocks are used for both interface and functional clocks to
829 * multiple entities. Some of these clocks are completely managed
830 * by hardware, and some others allow software control. Hardware
831 * managed ones general are based on directly CLK_REQ signals and
832 * various auto idle settings. The functional spec sets many of these
833 * as 'tie-high' for their enables.
834 *
835 * I-CLOCKS:
836 * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA
837 * CAM, HS-USB.
838 * F-CLOCK
839 * SSI.
840 *
841 * GPMC memories and SDRC have timing and clock sensitive registers which
842 * may very well need notification when the clock changes. Currently for low
843 * operating points, these are taken care of in sleep.S.
844 */
845static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
846 .name = "core_l3_ck",
847 .parent = &core_ck,
848 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
849 RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
850 DELAYED_APP | CONFIG_PARTICIPANT |
851 RATE_PROPAGATES,
852 .rate_offset = 0,
853 .recalc = &omap2_clksel_recalc,
854};
855
856static struct clk usb_l4_ick = { /* FS-USB interface clock */
857 .name = "usb_l4_ick",
858 .parent = &core_l3_ck,
859 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
860 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP |
861 CONFIG_PARTICIPANT,
862 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
863 .enable_bit = 0,
864 .rate_offset = 25,
865 .recalc = &omap2_clksel_recalc,
866};
867
868/*
869 * SSI is in L3 management domain, its direct parent is core not l3,
870 * many core power domain entities are grouped into the L3 clock
871 * domain.
872 * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_CLIK
873 *
874 * ssr = core/1/2/3/4/5, sst = 1/2 ssr.
875 */
876static struct clk ssi_ssr_sst_fck = {
877 .name = "ssi_fck",
878 .parent = &core_ck,
879 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
880 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
881 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE, /* bit 1 */
882 .enable_bit = 1,
883 .rate_offset = 20,
884 .recalc = &omap2_clksel_recalc,
885};
886
887/*
888 * GFX clock domain
889 * Clocks:
890 * GFX_FCLK, GFX_ICLK
891 * GFX_CG1(2d), GFX_CG2(3d)
892 *
893 * GFX_FCLK runs from L3, and is divided by (1,2,3,4)
894 * The 2d and 3d clocks run at a hardware determined
895 * divided value of fclk.
896 *
897 */
898static struct clk gfx_3d_fck = {
899 .name = "gfx_3d_fck",
900 .parent = &core_l3_ck,
901 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
902 RATE_CKCTL | CM_GFX_SEL1,
903 .enable_reg = (void __iomem *)&CM_FCLKEN_GFX,
904 .enable_bit = 2,
905 .rate_offset= 0,
906 .recalc = &omap2_clksel_recalc,
907};
908
909static struct clk gfx_2d_fck = {
910 .name = "gfx_2d_fck",
911 .parent = &core_l3_ck,
912 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
913 RATE_CKCTL | CM_GFX_SEL1,
914 .enable_reg = (void __iomem *)&CM_FCLKEN_GFX,
915 .enable_bit = 1,
916 .rate_offset= 0,
917 .recalc = &omap2_clksel_recalc,
918};
919
920static struct clk gfx_ick = {
921 .name = "gfx_ick", /* From l3 */
922 .parent = &core_l3_ck,
923 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
924 RATE_CKCTL,
925 .enable_reg = (void __iomem *)&CM_ICLKEN_GFX, /* bit 0 */
926 .enable_bit = 0,
927 .recalc = &omap2_followparent_recalc,
928};
929
930/*
931 * Modem clock domain (2430)
932 * CLOCKS:
933 * MDM_OSC_CLK
934 * MDM_ICLK
935 */
936static struct clk mdm_ick = { /* used both as a ick and fck */
937 .name = "mdm_ick",
938 .parent = &core_ck,
939 .flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_MODEM_SEL1 |
940 DELAYED_APP | CONFIG_PARTICIPANT,
941 .rate_offset = 0,
942 .enable_reg = (void __iomem *)&CM_ICLKEN_MDM,
943 .enable_bit = 0,
944 .recalc = &omap2_clksel_recalc,
945};
946
947static struct clk mdm_osc_ck = {
948 .name = "mdm_osc_ck",
949 .rate = 26000000,
950 .parent = &osc_ck,
951 .flags = CLOCK_IN_OMAP243X | RATE_FIXED,
952 .enable_reg = (void __iomem *)&CM_FCLKEN_MDM,
953 .enable_bit = 1,
954 .recalc = &omap2_followparent_recalc,
955};
956
957/*
958 * L4 clock management domain
959 *
960 * This domain contains lots of interface clocks from the L4 interface, some
961 * functional clocks. Fixed APLL functional source clocks are managed in
962 * this domain.
963 */
964static struct clk l4_ck = { /* used both as an ick and fck */
965 .name = "l4_ck",
966 .parent = &core_l3_ck,
967 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
968 RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
969 DELAYED_APP | RATE_PROPAGATES,
970 .rate_offset = 5,
971 .recalc = &omap2_clksel_recalc,
972};
973
974static struct clk ssi_l4_ick = {
975 .name = "ssi_l4_ick",
976 .parent = &l4_ck,
977 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL,
978 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE, /* bit 1 */
979 .enable_bit = 1,
980 .recalc = &omap2_followparent_recalc,
981};
982
983/*
984 * DSS clock domain
985 * CLOCKs:
986 * DSS_L4_ICLK, DSS_L3_ICLK,
987 * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK
988 *
989 * DSS is both initiator and target.
990 */
991static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */
992 .name = "dss_ick",
993 .parent = &l4_ck, /* really both l3 and l4 */
994 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL,
995 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
996 .enable_bit = 0,
997 .recalc = &omap2_followparent_recalc,
998};
999
1000static struct clk dss1_fck = {
1001 .name = "dss1_fck",
1002 .parent = &core_ck, /* Core or sys */
1003 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1004 RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
1005 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1006 .enable_bit = 0,
1007 .rate_offset = 8,
1008 .src_offset = 8,
1009 .recalc = &omap2_clksel_recalc,
1010};
1011
1012static struct clk dss2_fck = { /* Alt clk used in power management */
1013 .name = "dss2_fck",
1014 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */
1015 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1016 RATE_CKCTL | CM_CORE_SEL1 | RATE_FIXED |
1017 DELAYED_APP,
1018 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1019 .enable_bit = 1,
1020 .src_offset = 13,
1021 .recalc = &omap2_followparent_recalc,
1022};
1023
1024static struct clk dss_54m_fck = { /* Alt clk used in power management */
1025 .name = "dss_54m_fck", /* 54m tv clk */
1026 .parent = &func_54m_ck,
1027 .rate = 54000000,
1028 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1029 RATE_FIXED | RATE_PROPAGATES,
1030 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1031 .enable_bit = 2,
1032 .recalc = &omap2_propagate_rate,
1033};
1034
1035/*
1036 * CORE power domain ICLK & FCLK defines.
1037 * Many of the these can have more than one possible parent. Entries
1038 * here will likely have an L4 interface parent, and may have multiple
1039 * functional clock parents.
1040 */
1041static struct clk gpt1_ick = {
1042 .name = "gpt1_ick",
1043 .parent = &l4_ck,
1044 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1045 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP, /* Bit0 */
1046 .enable_bit = 0,
1047 .recalc = &omap2_followparent_recalc,
1048};
1049
1050static struct clk gpt1_fck = {
1051 .name = "gpt1_fck",
1052 .parent = &func_32k_ck,
1053 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1054 CM_WKUP_SEL1,
1055 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP, /* Bit0 */
1056 .enable_bit = 0,
1057 .src_offset = 0,
1058 .recalc = &omap2_followparent_recalc,
1059};
1060
1061static struct clk gpt2_ick = {
1062 .name = "gpt2_ick",
1063 .parent = &l4_ck,
1064 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1065 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */
1066 .enable_bit = 4,
1067 .recalc = &omap2_followparent_recalc,
1068};
1069
1070static struct clk gpt2_fck = {
1071 .name = "gpt2_fck",
1072 .parent = &func_32k_ck,
1073 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1074 CM_CORE_SEL2,
1075 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1076 .enable_bit = 4,
1077 .src_offset = 2,
1078 .recalc = &omap2_followparent_recalc,
1079};
1080
1081static struct clk gpt3_ick = {
1082 .name = "gpt3_ick",
1083 .parent = &l4_ck,
1084 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1085 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit5 */
1086 .enable_bit = 5,
1087 .recalc = &omap2_followparent_recalc,
1088};
1089
1090static struct clk gpt3_fck = {
1091 .name = "gpt3_fck",
1092 .parent = &func_32k_ck,
1093 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1094 CM_CORE_SEL2,
1095 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1096 .enable_bit = 5,
1097 .src_offset = 4,
1098 .recalc = &omap2_followparent_recalc,
1099};
1100
1101static struct clk gpt4_ick = {
1102 .name = "gpt4_ick",
1103 .parent = &l4_ck,
1104 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1105 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit6 */
1106 .enable_bit = 6,
1107 .recalc = &omap2_followparent_recalc,
1108};
1109
1110static struct clk gpt4_fck = {
1111 .name = "gpt4_fck",
1112 .parent = &func_32k_ck,
1113 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1114 CM_CORE_SEL2,
1115 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1116 .enable_bit = 6,
1117 .src_offset = 6,
1118 .recalc = &omap2_followparent_recalc,
1119};
1120
1121static struct clk gpt5_ick = {
1122 .name = "gpt5_ick",
1123 .parent = &l4_ck,
1124 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1125 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit7 */
1126 .enable_bit = 7,
1127 .recalc = &omap2_followparent_recalc,
1128};
1129
1130static struct clk gpt5_fck = {
1131 .name = "gpt5_fck",
1132 .parent = &func_32k_ck,
1133 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1134 CM_CORE_SEL2,
1135 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1136 .enable_bit = 7,
1137 .src_offset = 8,
1138 .recalc = &omap2_followparent_recalc,
1139};
1140
1141static struct clk gpt6_ick = {
1142 .name = "gpt6_ick",
1143 .parent = &l4_ck,
1144 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1145 .enable_bit = 8,
1146 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit8 */
1147 .recalc = &omap2_followparent_recalc,
1148};
1149
1150static struct clk gpt6_fck = {
1151 .name = "gpt6_fck",
1152 .parent = &func_32k_ck,
1153 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1154 CM_CORE_SEL2,
1155 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1156 .enable_bit = 8,
1157 .src_offset = 10,
1158 .recalc = &omap2_followparent_recalc,
1159};
1160
1161static struct clk gpt7_ick = {
1162 .name = "gpt7_ick",
1163 .parent = &l4_ck,
1164 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1165 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit9 */
1166 .enable_bit = 9,
1167 .recalc = &omap2_followparent_recalc,
1168};
1169
1170static struct clk gpt7_fck = {
1171 .name = "gpt7_fck",
1172 .parent = &func_32k_ck,
1173 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1174 CM_CORE_SEL2,
1175 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1176 .enable_bit = 9,
1177 .src_offset = 12,
1178 .recalc = &omap2_followparent_recalc,
1179};
1180
1181static struct clk gpt8_ick = {
1182 .name = "gpt8_ick",
1183 .parent = &l4_ck,
1184 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1185 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit10 */
1186 .enable_bit = 10,
1187 .recalc = &omap2_followparent_recalc,
1188};
1189
1190static struct clk gpt8_fck = {
1191 .name = "gpt8_fck",
1192 .parent = &func_32k_ck,
1193 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1194 CM_CORE_SEL2,
1195 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1196 .enable_bit = 10,
1197 .src_offset = 14,
1198 .recalc = &omap2_followparent_recalc,
1199};
1200
1201static struct clk gpt9_ick = {
1202 .name = "gpt9_ick",
1203 .parent = &l4_ck,
1204 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1205 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1206 .enable_bit = 11,
1207 .recalc = &omap2_followparent_recalc,
1208};
1209
1210static struct clk gpt9_fck = {
1211 .name = "gpt9_fck",
1212 .parent = &func_32k_ck,
1213 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1214 CM_CORE_SEL2,
1215 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1216 .enable_bit = 11,
1217 .src_offset = 16,
1218 .recalc = &omap2_followparent_recalc,
1219};
1220
1221static struct clk gpt10_ick = {
1222 .name = "gpt10_ick",
1223 .parent = &l4_ck,
1224 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1225 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1226 .enable_bit = 12,
1227 .recalc = &omap2_followparent_recalc,
1228};
1229
1230static struct clk gpt10_fck = {
1231 .name = "gpt10_fck",
1232 .parent = &func_32k_ck,
1233 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1234 CM_CORE_SEL2,
1235 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1236 .enable_bit = 12,
1237 .src_offset = 18,
1238 .recalc = &omap2_followparent_recalc,
1239};
1240
1241static struct clk gpt11_ick = {
1242 .name = "gpt11_ick",
1243 .parent = &l4_ck,
1244 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1245 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1246 .enable_bit = 13,
1247 .recalc = &omap2_followparent_recalc,
1248};
1249
1250static struct clk gpt11_fck = {
1251 .name = "gpt11_fck",
1252 .parent = &func_32k_ck,
1253 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1254 CM_CORE_SEL2,
1255 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1256 .enable_bit = 13,
1257 .src_offset = 20,
1258 .recalc = &omap2_followparent_recalc,
1259};
1260
1261static struct clk gpt12_ick = {
1262 .name = "gpt12_ick",
1263 .parent = &l4_ck,
1264 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1265 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit14 */
1266 .enable_bit = 14,
1267 .recalc = &omap2_followparent_recalc,
1268};
1269
1270static struct clk gpt12_fck = {
1271 .name = "gpt12_fck",
1272 .parent = &func_32k_ck,
1273 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1274 CM_CORE_SEL2,
1275 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1276 .enable_bit = 14,
1277 .src_offset = 22,
1278 .recalc = &omap2_followparent_recalc,
1279};
1280
1281static struct clk mcbsp1_ick = {
1282 .name = "mcbsp1_ick",
1283 .parent = &l4_ck,
1284 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1285 .enable_bit = 15,
1286 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* bit16 */
1287 .recalc = &omap2_followparent_recalc,
1288};
1289
1290static struct clk mcbsp1_fck = {
1291 .name = "mcbsp1_fck",
1292 .parent = &func_96m_ck,
1293 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1294 .enable_bit = 15,
1295 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1296 .recalc = &omap2_followparent_recalc,
1297};
1298
1299static struct clk mcbsp2_ick = {
1300 .name = "mcbsp2_ick",
1301 .parent = &l4_ck,
1302 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1303 .enable_bit = 16,
1304 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1305 .recalc = &omap2_followparent_recalc,
1306};
1307
1308static struct clk mcbsp2_fck = {
1309 .name = "mcbsp2_fck",
1310 .parent = &func_96m_ck,
1311 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1312 .enable_bit = 16,
1313 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1314 .recalc = &omap2_followparent_recalc,
1315};
1316
1317static struct clk mcbsp3_ick = {
1318 .name = "mcbsp3_ick",
1319 .parent = &l4_ck,
1320 .flags = CLOCK_IN_OMAP243X,
1321 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1322 .enable_bit = 3,
1323 .recalc = &omap2_followparent_recalc,
1324};
1325
1326static struct clk mcbsp3_fck = {
1327 .name = "mcbsp3_fck",
1328 .parent = &func_96m_ck,
1329 .flags = CLOCK_IN_OMAP243X,
1330 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1331 .enable_bit = 3,
1332 .recalc = &omap2_followparent_recalc,
1333};
1334
1335static struct clk mcbsp4_ick = {
1336 .name = "mcbsp4_ick",
1337 .parent = &l4_ck,
1338 .flags = CLOCK_IN_OMAP243X,
1339 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1340 .enable_bit = 4,
1341 .recalc = &omap2_followparent_recalc,
1342};
1343
1344static struct clk mcbsp4_fck = {
1345 .name = "mcbsp4_fck",
1346 .parent = &func_96m_ck,
1347 .flags = CLOCK_IN_OMAP243X,
1348 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1349 .enable_bit = 4,
1350 .recalc = &omap2_followparent_recalc,
1351};
1352
1353static struct clk mcbsp5_ick = {
1354 .name = "mcbsp5_ick",
1355 .parent = &l4_ck,
1356 .flags = CLOCK_IN_OMAP243X,
1357 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1358 .enable_bit = 5,
1359 .recalc = &omap2_followparent_recalc,
1360};
1361
1362static struct clk mcbsp5_fck = {
1363 .name = "mcbsp5_fck",
1364 .parent = &func_96m_ck,
1365 .flags = CLOCK_IN_OMAP243X,
1366 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1367 .enable_bit = 5,
1368 .recalc = &omap2_followparent_recalc,
1369};
1370
1371static struct clk mcspi1_ick = {
1372 .name = "mcspi_ick",
1373 .id = 1,
1374 .parent = &l4_ck,
1375 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1376 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1377 .enable_bit = 17,
1378 .recalc = &omap2_followparent_recalc,
1379};
1380
1381static struct clk mcspi1_fck = {
1382 .name = "mcspi_fck",
1383 .id = 1,
1384 .parent = &func_48m_ck,
1385 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1386 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1387 .enable_bit = 17,
1388 .recalc = &omap2_followparent_recalc,
1389};
1390
1391static struct clk mcspi2_ick = {
1392 .name = "mcspi_ick",
1393 .id = 2,
1394 .parent = &l4_ck,
1395 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1396 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1397 .enable_bit = 18,
1398 .recalc = &omap2_followparent_recalc,
1399};
1400
1401static struct clk mcspi2_fck = {
1402 .name = "mcspi_fck",
1403 .id = 2,
1404 .parent = &func_48m_ck,
1405 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1406 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1407 .enable_bit = 18,
1408 .recalc = &omap2_followparent_recalc,
1409};
1410
1411static struct clk mcspi3_ick = {
1412 .name = "mcspi_ick",
1413 .id = 3,
1414 .parent = &l4_ck,
1415 .flags = CLOCK_IN_OMAP243X,
1416 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1417 .enable_bit = 9,
1418 .recalc = &omap2_followparent_recalc,
1419};
1420
1421static struct clk mcspi3_fck = {
1422 .name = "mcspi_fck",
1423 .id = 3,
1424 .parent = &func_48m_ck,
1425 .flags = CLOCK_IN_OMAP243X,
1426 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1427 .enable_bit = 9,
1428 .recalc = &omap2_followparent_recalc,
1429};
1430
1431static struct clk uart1_ick = {
1432 .name = "uart1_ick",
1433 .parent = &l4_ck,
1434 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1435 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1436 .enable_bit = 21,
1437 .recalc = &omap2_followparent_recalc,
1438};
1439
1440static struct clk uart1_fck = {
1441 .name = "uart1_fck",
1442 .parent = &func_48m_ck,
1443 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1444 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1445 .enable_bit = 21,
1446 .recalc = &omap2_followparent_recalc,
1447};
1448
1449static struct clk uart2_ick = {
1450 .name = "uart2_ick",
1451 .parent = &l4_ck,
1452 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1453 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1454 .enable_bit = 22,
1455 .recalc = &omap2_followparent_recalc,
1456};
1457
1458static struct clk uart2_fck = {
1459 .name = "uart2_fck",
1460 .parent = &func_48m_ck,
1461 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1462 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1463 .enable_bit = 22,
1464 .recalc = &omap2_followparent_recalc,
1465};
1466
1467static struct clk uart3_ick = {
1468 .name = "uart3_ick",
1469 .parent = &l4_ck,
1470 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1471 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1472 .enable_bit = 2,
1473 .recalc = &omap2_followparent_recalc,
1474};
1475
1476static struct clk uart3_fck = {
1477 .name = "uart3_fck",
1478 .parent = &func_48m_ck,
1479 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1480 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1481 .enable_bit = 2,
1482 .recalc = &omap2_followparent_recalc,
1483};
1484
1485static struct clk gpios_ick = {
1486 .name = "gpios_ick",
1487 .parent = &l4_ck,
1488 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1489 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1490 .enable_bit = 2,
1491 .recalc = &omap2_followparent_recalc,
1492};
1493
1494static struct clk gpios_fck = {
1495 .name = "gpios_fck",
1496 .parent = &func_32k_ck,
1497 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1498 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP,
1499 .enable_bit = 2,
1500 .recalc = &omap2_followparent_recalc,
1501};
1502
1503static struct clk mpu_wdt_ick = {
1504 .name = "mpu_wdt_ick",
1505 .parent = &l4_ck,
1506 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1507 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1508 .enable_bit = 3,
1509 .recalc = &omap2_followparent_recalc,
1510};
1511
1512static struct clk mpu_wdt_fck = {
1513 .name = "mpu_wdt_fck",
1514 .parent = &func_32k_ck,
1515 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1516 .enable_reg = (void __iomem *)&CM_FCLKEN_WKUP,
1517 .enable_bit = 3,
1518 .recalc = &omap2_followparent_recalc,
1519};
1520
1521static struct clk sync_32k_ick = {
1522 .name = "sync_32k_ick",
1523 .parent = &l4_ck,
1524 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1525 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1526 .enable_bit = 1,
1527 .recalc = &omap2_followparent_recalc,
1528};
1529static struct clk wdt1_ick = {
1530 .name = "wdt1_ick",
1531 .parent = &l4_ck,
1532 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1533 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1534 .enable_bit = 4,
1535 .recalc = &omap2_followparent_recalc,
1536};
1537static struct clk omapctrl_ick = {
1538 .name = "omapctrl_ick",
1539 .parent = &l4_ck,
1540 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1541 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1542 .enable_bit = 5,
1543 .recalc = &omap2_followparent_recalc,
1544};
1545static struct clk icr_ick = {
1546 .name = "icr_ick",
1547 .parent = &l4_ck,
1548 .flags = CLOCK_IN_OMAP243X,
1549 .enable_reg = (void __iomem *)&CM_ICLKEN_WKUP,
1550 .enable_bit = 6,
1551 .recalc = &omap2_followparent_recalc,
1552};
1553
1554static struct clk cam_ick = {
1555 .name = "cam_ick",
1556 .parent = &l4_ck,
1557 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1558 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1559 .enable_bit = 31,
1560 .recalc = &omap2_followparent_recalc,
1561};
1562
1563static struct clk cam_fck = {
1564 .name = "cam_fck",
1565 .parent = &func_96m_ck,
1566 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1567 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1568 .enable_bit = 31,
1569 .recalc = &omap2_followparent_recalc,
1570};
1571
1572static struct clk mailboxes_ick = {
1573 .name = "mailboxes_ick",
1574 .parent = &l4_ck,
1575 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1576 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1577 .enable_bit = 30,
1578 .recalc = &omap2_followparent_recalc,
1579};
1580
1581static struct clk wdt4_ick = {
1582 .name = "wdt4_ick",
1583 .parent = &l4_ck,
1584 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1585 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1586 .enable_bit = 29,
1587 .recalc = &omap2_followparent_recalc,
1588};
1589
1590static struct clk wdt4_fck = {
1591 .name = "wdt4_fck",
1592 .parent = &func_32k_ck,
1593 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1594 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1595 .enable_bit = 29,
1596 .recalc = &omap2_followparent_recalc,
1597};
1598
1599static struct clk wdt3_ick = {
1600 .name = "wdt3_ick",
1601 .parent = &l4_ck,
1602 .flags = CLOCK_IN_OMAP242X,
1603 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1604 .enable_bit = 28,
1605 .recalc = &omap2_followparent_recalc,
1606};
1607
1608static struct clk wdt3_fck = {
1609 .name = "wdt3_fck",
1610 .parent = &func_32k_ck,
1611 .flags = CLOCK_IN_OMAP242X,
1612 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1613 .enable_bit = 28,
1614 .recalc = &omap2_followparent_recalc,
1615};
1616
1617static struct clk mspro_ick = {
1618 .name = "mspro_ick",
1619 .parent = &l4_ck,
1620 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1621 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1622 .enable_bit = 27,
1623 .recalc = &omap2_followparent_recalc,
1624};
1625
1626static struct clk mspro_fck = {
1627 .name = "mspro_fck",
1628 .parent = &func_96m_ck,
1629 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1630 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1631 .enable_bit = 27,
1632 .recalc = &omap2_followparent_recalc,
1633};
1634
1635static struct clk mmc_ick = {
1636 .name = "mmc_ick",
1637 .parent = &l4_ck,
1638 .flags = CLOCK_IN_OMAP242X,
1639 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1640 .enable_bit = 26,
1641 .recalc = &omap2_followparent_recalc,
1642};
1643
1644static struct clk mmc_fck = {
1645 .name = "mmc_fck",
1646 .parent = &func_96m_ck,
1647 .flags = CLOCK_IN_OMAP242X,
1648 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1649 .enable_bit = 26,
1650 .recalc = &omap2_followparent_recalc,
1651};
1652
1653static struct clk fac_ick = {
1654 .name = "fac_ick",
1655 .parent = &l4_ck,
1656 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1657 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1658 .enable_bit = 25,
1659 .recalc = &omap2_followparent_recalc,
1660};
1661
1662static struct clk fac_fck = {
1663 .name = "fac_fck",
1664 .parent = &func_12m_ck,
1665 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1666 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1667 .enable_bit = 25,
1668 .recalc = &omap2_followparent_recalc,
1669};
1670
1671static struct clk eac_ick = {
1672 .name = "eac_ick",
1673 .parent = &l4_ck,
1674 .flags = CLOCK_IN_OMAP242X,
1675 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1676 .enable_bit = 24,
1677 .recalc = &omap2_followparent_recalc,
1678};
1679
1680static struct clk eac_fck = {
1681 .name = "eac_fck",
1682 .parent = &func_96m_ck,
1683 .flags = CLOCK_IN_OMAP242X,
1684 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1685 .enable_bit = 24,
1686 .recalc = &omap2_followparent_recalc,
1687};
1688
1689static struct clk hdq_ick = {
1690 .name = "hdq_ick",
1691 .parent = &l4_ck,
1692 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1693 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1694 .enable_bit = 23,
1695 .recalc = &omap2_followparent_recalc,
1696};
1697
1698static struct clk hdq_fck = {
1699 .name = "hdq_fck",
1700 .parent = &func_12m_ck,
1701 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1702 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1703 .enable_bit = 23,
1704 .recalc = &omap2_followparent_recalc,
1705};
1706
1707static struct clk i2c2_ick = {
1708 .name = "i2c_ick",
1709 .id = 2,
1710 .parent = &l4_ck,
1711 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1712 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1713 .enable_bit = 20,
1714 .recalc = &omap2_followparent_recalc,
1715};
1716
1717static struct clk i2c2_fck = {
1718 .name = "i2c_fck",
1719 .id = 2,
1720 .parent = &func_12m_ck,
1721 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1722 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1723 .enable_bit = 20,
1724 .recalc = &omap2_followparent_recalc,
1725};
1726
1727static struct clk i2chs2_fck = {
1728 .name = "i2chs2_fck",
1729 .parent = &func_96m_ck,
1730 .flags = CLOCK_IN_OMAP243X,
1731 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1732 .enable_bit = 20,
1733 .recalc = &omap2_followparent_recalc,
1734};
1735
1736static struct clk i2c1_ick = {
1737 .name = "i2c_ick",
1738 .id = 1,
1739 .parent = &l4_ck,
1740 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1741 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1742 .enable_bit = 19,
1743 .recalc = &omap2_followparent_recalc,
1744};
1745
1746static struct clk i2c1_fck = {
1747 .name = "i2c_fck",
1748 .id = 1,
1749 .parent = &func_12m_ck,
1750 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1751 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1752 .enable_bit = 19,
1753 .recalc = &omap2_followparent_recalc,
1754};
1755
1756static struct clk i2chs1_fck = {
1757 .name = "i2chs1_fck",
1758 .parent = &func_96m_ck,
1759 .flags = CLOCK_IN_OMAP243X,
1760 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1761 .enable_bit = 19,
1762 .recalc = &omap2_followparent_recalc,
1763};
1764
1765static struct clk vlynq_ick = {
1766 .name = "vlynq_ick",
1767 .parent = &core_l3_ck,
1768 .flags = CLOCK_IN_OMAP242X,
1769 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
1770 .enable_bit = 3,
1771 .recalc = &omap2_followparent_recalc,
1772};
1773
1774static struct clk vlynq_fck = {
1775 .name = "vlynq_fck",
1776 .parent = &func_96m_ck,
1777 .flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
1778 .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
1779 .enable_bit = 3,
1780 .src_offset = 15,
1781 .recalc = &omap2_followparent_recalc,
1782};
1783
1784static struct clk sdrc_ick = {
1785 .name = "sdrc_ick",
1786 .parent = &l4_ck,
1787 .flags = CLOCK_IN_OMAP243X,
1788 .enable_reg = (void __iomem *)&CM_ICLKEN3_CORE,
1789 .enable_bit = 2,
1790 .recalc = &omap2_followparent_recalc,
1791};
1792
1793static struct clk des_ick = {
1794 .name = "des_ick",
1795 .parent = &l4_ck,
1796 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1797 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1798 .enable_bit = 0,
1799 .recalc = &omap2_followparent_recalc,
1800};
1801
1802static struct clk sha_ick = {
1803 .name = "sha_ick",
1804 .parent = &l4_ck,
1805 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1806 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1807 .enable_bit = 1,
1808 .recalc = &omap2_followparent_recalc,
1809};
1810
1811static struct clk rng_ick = {
1812 .name = "rng_ick",
1813 .parent = &l4_ck,
1814 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1815 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1816 .enable_bit = 2,
1817 .recalc = &omap2_followparent_recalc,
1818};
1819
1820static struct clk aes_ick = {
1821 .name = "aes_ick",
1822 .parent = &l4_ck,
1823 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1824 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1825 .enable_bit = 3,
1826 .recalc = &omap2_followparent_recalc,
1827};
1828
1829static struct clk pka_ick = {
1830 .name = "pka_ick",
1831 .parent = &l4_ck,
1832 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1833 .enable_reg = (void __iomem *)&CM_ICLKEN4_CORE,
1834 .enable_bit = 4,
1835 .recalc = &omap2_followparent_recalc,
1836};
1837
1838static struct clk usb_fck = {
1839 .name = "usb_fck",
1840 .parent = &func_48m_ck,
1841 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
1842 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1843 .enable_bit = 0,
1844 .recalc = &omap2_followparent_recalc,
1845};
1846
1847static struct clk usbhs_ick = {
1848 .name = "usbhs_ick",
1849 .parent = &core_l3_ck,
1850 .flags = CLOCK_IN_OMAP243X,
1851 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1852 .enable_bit = 6,
1853 .recalc = &omap2_followparent_recalc,
1854};
1855
1856static struct clk mmchs1_ick = {
1857 .name = "mmchs1_ick",
1858 .parent = &l4_ck,
1859 .flags = CLOCK_IN_OMAP243X,
1860 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1861 .enable_bit = 7,
1862 .recalc = &omap2_followparent_recalc,
1863};
1864
1865static struct clk mmchs1_fck = {
1866 .name = "mmchs1_fck",
1867 .parent = &func_96m_ck,
1868 .flags = CLOCK_IN_OMAP243X,
1869 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1870 .enable_bit = 7,
1871 .recalc = &omap2_followparent_recalc,
1872};
1873
1874static struct clk mmchs2_ick = {
1875 .name = "mmchs2_ick",
1876 .parent = &l4_ck,
1877 .flags = CLOCK_IN_OMAP243X,
1878 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1879 .enable_bit = 8,
1880 .recalc = &omap2_followparent_recalc,
1881};
1882
1883static struct clk mmchs2_fck = {
1884 .name = "mmchs2_fck",
1885 .parent = &func_96m_ck,
1886 .flags = CLOCK_IN_OMAP243X,
1887 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1888 .enable_bit = 8,
1889 .recalc = &omap2_followparent_recalc,
1890};
1891 32
1892static struct clk gpio5_ick = { 33void omap2_clksel_recalc(struct clk *clk);
1893 .name = "gpio5_ick", 34void omap2_init_clksel_parent(struct clk *clk);
1894 .parent = &l4_ck, 35u32 omap2_clksel_get_divisor(struct clk *clk);
1895 .flags = CLOCK_IN_OMAP243X, 36u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
1896 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE, 37 u32 *new_div);
1897 .enable_bit = 10, 38u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val);
1898 .recalc = &omap2_followparent_recalc, 39u32 omap2_divisor_to_clksel(struct clk *clk, u32 div);
1899}; 40void omap2_fixed_divisor_recalc(struct clk *clk);
41long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
42int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
43u32 omap2_get_dpll_rate(struct clk *clk);
44int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
1900 45
1901static struct clk gpio5_fck = { 46extern u8 cpu_mask;
1902 .name = "gpio5_fck",
1903 .parent = &func_32k_ck,
1904 .flags = CLOCK_IN_OMAP243X,
1905 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1906 .enable_bit = 10,
1907 .recalc = &omap2_followparent_recalc,
1908};
1909 47
1910static struct clk mdm_intc_ick = { 48/* clksel_rate data common to 24xx/343x */
1911 .name = "mdm_intc_ick", 49static const struct clksel_rate gpt_32k_rates[] = {
1912 .parent = &l4_ck, 50 { .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
1913 .flags = CLOCK_IN_OMAP243X, 51 { .div = 0 }
1914 .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
1915 .enable_bit = 11,
1916 .recalc = &omap2_followparent_recalc,
1917}; 52};
1918 53
1919static struct clk mmchsdb1_fck = { 54static const struct clksel_rate gpt_sys_rates[] = {
1920 .name = "mmchsdb1_fck", 55 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
1921 .parent = &func_32k_ck, 56 { .div = 0 }
1922 .flags = CLOCK_IN_OMAP243X,
1923 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
1924 .enable_bit = 16,
1925 .recalc = &omap2_followparent_recalc,
1926}; 57};
1927 58
1928static struct clk mmchsdb2_fck = { 59static const struct clksel_rate gfx_l3_rates[] = {
1929 .name = "mmchsdb2_fck", 60 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X },
1930 .parent = &func_32k_ck, 61 { .div = 2, .val = 2, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
1931 .flags = CLOCK_IN_OMAP243X, 62 { .div = 3, .val = 3, .flags = RATE_IN_243X | RATE_IN_343X },
1932 .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE, 63 { .div = 4, .val = 4, .flags = RATE_IN_243X | RATE_IN_343X },
1933 .enable_bit = 17, 64 { .div = 0 }
1934 .recalc = &omap2_followparent_recalc,
1935}; 65};
1936 66
1937/*
1938 * This clock is a composite clock which does entire set changes then
1939 * forces a rebalance. It keys on the MPU speed, but it really could
1940 * be any key speed part of a set in the rate table.
1941 *
1942 * to really change a set, you need memory table sets which get changed
1943 * in sram, pre-notifiers & post notifiers, changing the top set, without
1944 * having low level display recalc's won't work... this is why dpm notifiers
1945 * work, isr's off, walk a list of clocks already _off_ and not messing with
1946 * the bus.
1947 *
1948 * This clock should have no parent. It embodies the entire upper level
1949 * active set. A parent will mess up some of the init also.
1950 */
1951static struct clk virt_prcm_set = {
1952 .name = "virt_prcm_set",
1953 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1954 VIRTUAL_CLOCK | ALWAYS_ENABLED | DELAYED_APP,
1955 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */
1956 .recalc = &omap2_mpu_recalc, /* sets are keyed on mpu rate */
1957 .set_rate = &omap2_select_table_rate,
1958 .round_rate = &omap2_round_to_table_rate,
1959};
1960
1961static struct clk *onchip_clks[] = {
1962 /* external root sources */
1963 &func_32k_ck,
1964 &osc_ck,
1965 &sys_ck,
1966 &alt_ck,
1967 /* internal analog sources */
1968 &dpll_ck,
1969 &apll96_ck,
1970 &apll54_ck,
1971 /* internal prcm root sources */
1972 &func_54m_ck,
1973 &core_ck,
1974 &sleep_ck,
1975 &func_96m_ck,
1976 &func_48m_ck,
1977 &func_12m_ck,
1978 &wdt1_osc_ck,
1979 &sys_clkout,
1980 &sys_clkout2,
1981 &emul_ck,
1982 /* mpu domain clocks */
1983 &mpu_ck,
1984 /* dsp domain clocks */
1985 &iva2_1_fck, /* 2430 */
1986 &iva2_1_ick,
1987 &dsp_ick, /* 2420 */
1988 &dsp_fck,
1989 &iva1_ifck,
1990 &iva1_mpu_int_ifck,
1991 /* GFX domain clocks */
1992 &gfx_3d_fck,
1993 &gfx_2d_fck,
1994 &gfx_ick,
1995 /* Modem domain clocks */
1996 &mdm_ick,
1997 &mdm_osc_ck,
1998 /* DSS domain clocks */
1999 &dss_ick,
2000 &dss1_fck,
2001 &dss2_fck,
2002 &dss_54m_fck,
2003 /* L3 domain clocks */
2004 &core_l3_ck,
2005 &ssi_ssr_sst_fck,
2006 &usb_l4_ick,
2007 /* L4 domain clocks */
2008 &l4_ck, /* used as both core_l4 and wu_l4 */
2009 &ssi_l4_ick,
2010 /* virtual meta-group clock */
2011 &virt_prcm_set,
2012 /* general l4 interface ck, multi-parent functional clk */
2013 &gpt1_ick,
2014 &gpt1_fck,
2015 &gpt2_ick,
2016 &gpt2_fck,
2017 &gpt3_ick,
2018 &gpt3_fck,
2019 &gpt4_ick,
2020 &gpt4_fck,
2021 &gpt5_ick,
2022 &gpt5_fck,
2023 &gpt6_ick,
2024 &gpt6_fck,
2025 &gpt7_ick,
2026 &gpt7_fck,
2027 &gpt8_ick,
2028 &gpt8_fck,
2029 &gpt9_ick,
2030 &gpt9_fck,
2031 &gpt10_ick,
2032 &gpt10_fck,
2033 &gpt11_ick,
2034 &gpt11_fck,
2035 &gpt12_ick,
2036 &gpt12_fck,
2037 &mcbsp1_ick,
2038 &mcbsp1_fck,
2039 &mcbsp2_ick,
2040 &mcbsp2_fck,
2041 &mcbsp3_ick,
2042 &mcbsp3_fck,
2043 &mcbsp4_ick,
2044 &mcbsp4_fck,
2045 &mcbsp5_ick,
2046 &mcbsp5_fck,
2047 &mcspi1_ick,
2048 &mcspi1_fck,
2049 &mcspi2_ick,
2050 &mcspi2_fck,
2051 &mcspi3_ick,
2052 &mcspi3_fck,
2053 &uart1_ick,
2054 &uart1_fck,
2055 &uart2_ick,
2056 &uart2_fck,
2057 &uart3_ick,
2058 &uart3_fck,
2059 &gpios_ick,
2060 &gpios_fck,
2061 &mpu_wdt_ick,
2062 &mpu_wdt_fck,
2063 &sync_32k_ick,
2064 &wdt1_ick,
2065 &omapctrl_ick,
2066 &icr_ick,
2067 &cam_fck,
2068 &cam_ick,
2069 &mailboxes_ick,
2070 &wdt4_ick,
2071 &wdt4_fck,
2072 &wdt3_ick,
2073 &wdt3_fck,
2074 &mspro_ick,
2075 &mspro_fck,
2076 &mmc_ick,
2077 &mmc_fck,
2078 &fac_ick,
2079 &fac_fck,
2080 &eac_ick,
2081 &eac_fck,
2082 &hdq_ick,
2083 &hdq_fck,
2084 &i2c1_ick,
2085 &i2c1_fck,
2086 &i2chs1_fck,
2087 &i2c2_ick,
2088 &i2c2_fck,
2089 &i2chs2_fck,
2090 &vlynq_ick,
2091 &vlynq_fck,
2092 &sdrc_ick,
2093 &des_ick,
2094 &sha_ick,
2095 &rng_ick,
2096 &aes_ick,
2097 &pka_ick,
2098 &usb_fck,
2099 &usbhs_ick,
2100 &mmchs1_ick,
2101 &mmchs1_fck,
2102 &mmchs2_ick,
2103 &mmchs2_fck,
2104 &gpio5_ick,
2105 &gpio5_fck,
2106 &mdm_intc_ick,
2107 &mmchsdb1_fck,
2108 &mmchsdb2_fck,
2109};
2110 67
2111#endif 68#endif
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
new file mode 100644
index 000000000000..ece32d8acba4
--- /dev/null
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -0,0 +1,539 @@
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
28#include <linux/io.h>
29#include <linux/cpufreq.h>
30
31#include <asm/arch/clock.h>
32#include <asm/arch/sram.h>
33#include <asm/div64.h>
34#include <asm/bitops.h>
35
36#include "memory.h"
37#include "clock.h"
38#include "clock24xx.h"
39#include "prm.h"
40#include "prm-regbits-24xx.h"
41#include "cm.h"
42#include "cm-regbits-24xx.h"
43
44/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
45#define EN_APLL_STOPPED 0
46#define EN_APLL_LOCKED 3
47
48/* CM_CLKSEL1_PLL.APLLS_CLKIN options (24XX) */
49#define APLLS_CLKIN_19_2MHZ 0
50#define APLLS_CLKIN_13MHZ 2
51#define APLLS_CLKIN_12MHZ 3
52
53/* #define DOWN_VARIABLE_DPLL 1 */ /* Experimental */
54
55static struct prcm_config *curr_prcm_set;
56static struct clk *vclk;
57static struct clk *sclk;
58
59/*-------------------------------------------------------------------------
60 * Omap24xx specific clock functions
61 *-------------------------------------------------------------------------*/
62
63/* This actually returns the rate of core_ck, not dpll_ck. */
64static u32 omap2_get_dpll_rate_24xx(struct clk *tclk)
65{
66 long long dpll_clk;
67 u8 amult;
68
69 dpll_clk = omap2_get_dpll_rate(tclk);
70
71 amult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
72 amult &= OMAP24XX_CORE_CLK_SRC_MASK;
73 dpll_clk *= amult;
74
75 return dpll_clk;
76}
77
78static int omap2_enable_osc_ck(struct clk *clk)
79{
80 u32 pcc;
81
82 pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
83
84 __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK,
85 OMAP24XX_PRCM_CLKSRC_CTRL);
86
87 return 0;
88}
89
90static void omap2_disable_osc_ck(struct clk *clk)
91{
92 u32 pcc;
93
94 pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
95
96 __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK,
97 OMAP24XX_PRCM_CLKSRC_CTRL);
98}
99
100#ifdef OLD_CK
101/* Recalculate SYST_CLK */
102static void omap2_sys_clk_recalc(struct clk * clk)
103{
104 u32 div = PRCM_CLKSRC_CTRL;
105 div &= (1 << 7) | (1 << 6); /* Test if ext clk divided by 1 or 2 */
106 div >>= clk->rate_offset;
107 clk->rate = (clk->parent->rate / div);
108 propagate_rate(clk);
109}
110#endif /* OLD_CK */
111
112/* Enable an APLL if off */
113static int omap2_clk_fixed_enable(struct clk *clk)
114{
115 u32 cval, apll_mask;
116
117 apll_mask = EN_APLL_LOCKED << clk->enable_bit;
118
119 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
120
121 if ((cval & apll_mask) == apll_mask)
122 return 0; /* apll already enabled */
123
124 cval &= ~apll_mask;
125 cval |= apll_mask;
126 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
127
128 if (clk == &apll96_ck)
129 cval = OMAP24XX_ST_96M_APLL;
130 else if (clk == &apll54_ck)
131 cval = OMAP24XX_ST_54M_APLL;
132
133 omap2_wait_clock_ready(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), cval,
134 clk->name);
135
136 /*
137 * REVISIT: Should we return an error code if omap2_wait_clock_ready()
138 * fails?
139 */
140 return 0;
141}
142
143/* Stop APLL */
144static void omap2_clk_fixed_disable(struct clk *clk)
145{
146 u32 cval;
147
148 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
149 cval &= ~(EN_APLL_LOCKED << clk->enable_bit);
150 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
151}
152
153/*
154 * Uses the current prcm set to tell if a rate is valid.
155 * You can go slower, but not faster within a given rate set.
156 */
157static u32 omap2_dpll_round_rate(unsigned long target_rate)
158{
159 u32 high, low, core_clk_src;
160
161 core_clk_src = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
162 core_clk_src &= OMAP24XX_CORE_CLK_SRC_MASK;
163
164 if (core_clk_src == CORE_CLK_SRC_DPLL) { /* DPLL clockout */
165 high = curr_prcm_set->dpll_speed * 2;
166 low = curr_prcm_set->dpll_speed;
167 } else { /* DPLL clockout x 2 */
168 high = curr_prcm_set->dpll_speed;
169 low = curr_prcm_set->dpll_speed / 2;
170 }
171
172#ifdef DOWN_VARIABLE_DPLL
173 if (target_rate > high)
174 return high;
175 else
176 return target_rate;
177#else
178 if (target_rate > low)
179 return high;
180 else
181 return low;
182#endif
183
184}
185
186static void omap2_dpll_recalc(struct clk *clk)
187{
188 clk->rate = omap2_get_dpll_rate_24xx(clk);
189
190 propagate_rate(clk);
191}
192
193static int omap2_reprogram_dpll(struct clk *clk, unsigned long rate)
194{
195 u32 cur_rate, low, mult, div, valid_rate, done_rate;
196 u32 bypass = 0;
197 struct prcm_config tmpset;
198 const struct dpll_data *dd;
199 unsigned long flags;
200 int ret = -EINVAL;
201
202 local_irq_save(flags);
203 cur_rate = omap2_get_dpll_rate_24xx(&dpll_ck);
204 mult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
205 mult &= OMAP24XX_CORE_CLK_SRC_MASK;
206
207 if ((rate == (cur_rate / 2)) && (mult == 2)) {
208 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL, 1);
209 } else if ((rate == (cur_rate * 2)) && (mult == 1)) {
210 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
211 } else if (rate != cur_rate) {
212 valid_rate = omap2_dpll_round_rate(rate);
213 if (valid_rate != rate)
214 goto dpll_exit;
215
216 if (mult == 1)
217 low = curr_prcm_set->dpll_speed;
218 else
219 low = curr_prcm_set->dpll_speed / 2;
220
221 dd = clk->dpll_data;
222 if (!dd)
223 goto dpll_exit;
224
225 tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg);
226 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
227 dd->div1_mask);
228 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
229 tmpset.cm_clksel2_pll = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
230 tmpset.cm_clksel2_pll &= ~OMAP24XX_CORE_CLK_SRC_MASK;
231 if (rate > low) {
232 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL_X2;
233 mult = ((rate / 2) / 1000000);
234 done_rate = CORE_CLK_SRC_DPLL_X2;
235 } else {
236 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL;
237 mult = (rate / 1000000);
238 done_rate = CORE_CLK_SRC_DPLL;
239 }
240 tmpset.cm_clksel1_pll |= (div << __ffs(dd->mult_mask));
241 tmpset.cm_clksel1_pll |= (mult << __ffs(dd->div1_mask));
242
243 /* Worst case */
244 tmpset.base_sdrc_rfr = SDRC_RFR_CTRL_BYPASS;
245
246 if (rate == curr_prcm_set->xtal_speed) /* If asking for 1-1 */
247 bypass = 1;
248
249 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1); /* For init_mem */
250
251 /* Force dll lock mode */
252 omap2_set_prcm(tmpset.cm_clksel1_pll, tmpset.base_sdrc_rfr,
253 bypass);
254
255 /* Errata: ret dll entry state */
256 omap2_init_memory_params(omap2_dll_force_needed());
257 omap2_reprogram_sdrc(done_rate, 0);
258 }
259 omap2_dpll_recalc(&dpll_ck);
260 ret = 0;
261
262dpll_exit:
263 local_irq_restore(flags);
264 return(ret);
265}
266
267/**
268 * omap2_table_mpu_recalc - just return the MPU speed
269 * @clk: virt_prcm_set struct clk
270 *
271 * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set.
272 */
273static void omap2_table_mpu_recalc(struct clk *clk)
274{
275 clk->rate = curr_prcm_set->mpu_speed;
276}
277
278/*
279 * Look for a rate equal or less than the target rate given a configuration set.
280 *
281 * What's not entirely clear is "which" field represents the key field.
282 * Some might argue L3-DDR, others ARM, others IVA. This code is simple and
283 * just uses the ARM rates.
284 */
285static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
286{
287 struct prcm_config *ptr;
288 long highest_rate;
289
290 if (clk != &virt_prcm_set)
291 return -EINVAL;
292
293 highest_rate = -EINVAL;
294
295 for (ptr = rate_table; ptr->mpu_speed; ptr++) {
296 if (!(ptr->flags & cpu_mask))
297 continue;
298 if (ptr->xtal_speed != sys_ck.rate)
299 continue;
300
301 highest_rate = ptr->mpu_speed;
302
303 /* Can check only after xtal frequency check */
304 if (ptr->mpu_speed <= rate)
305 break;
306 }
307 return highest_rate;
308}
309
310/* Sets basic clocks based on the specified rate */
311static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
312{
313 u32 cur_rate, done_rate, bypass = 0, tmp;
314 struct prcm_config *prcm;
315 unsigned long found_speed = 0;
316 unsigned long flags;
317
318 if (clk != &virt_prcm_set)
319 return -EINVAL;
320
321 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
322 if (!(prcm->flags & cpu_mask))
323 continue;
324
325 if (prcm->xtal_speed != sys_ck.rate)
326 continue;
327
328 if (prcm->mpu_speed <= rate) {
329 found_speed = prcm->mpu_speed;
330 break;
331 }
332 }
333
334 if (!found_speed) {
335 printk(KERN_INFO "Could not set MPU rate to %luMHz\n",
336 rate / 1000000);
337 return -EINVAL;
338 }
339
340 curr_prcm_set = prcm;
341 cur_rate = omap2_get_dpll_rate_24xx(&dpll_ck);
342
343 if (prcm->dpll_speed == cur_rate / 2) {
344 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL, 1);
345 } else if (prcm->dpll_speed == cur_rate * 2) {
346 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
347 } else if (prcm->dpll_speed != cur_rate) {
348 local_irq_save(flags);
349
350 if (prcm->dpll_speed == prcm->xtal_speed)
351 bypass = 1;
352
353 if ((prcm->cm_clksel2_pll & OMAP24XX_CORE_CLK_SRC_MASK) ==
354 CORE_CLK_SRC_DPLL_X2)
355 done_rate = CORE_CLK_SRC_DPLL_X2;
356 else
357 done_rate = CORE_CLK_SRC_DPLL;
358
359 /* MPU divider */
360 cm_write_mod_reg(prcm->cm_clksel_mpu, MPU_MOD, CM_CLKSEL);
361
362 /* dsp + iva1 div(2420), iva2.1(2430) */
363 cm_write_mod_reg(prcm->cm_clksel_dsp,
364 OMAP24XX_DSP_MOD, CM_CLKSEL);
365
366 cm_write_mod_reg(prcm->cm_clksel_gfx, GFX_MOD, CM_CLKSEL);
367
368 /* Major subsystem dividers */
369 tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
370 cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD, CM_CLKSEL1);
371 if (cpu_is_omap2430())
372 cm_write_mod_reg(prcm->cm_clksel_mdm,
373 OMAP2430_MDM_MOD, CM_CLKSEL);
374
375 /* x2 to enter init_mem */
376 omap2_reprogram_sdrc(CORE_CLK_SRC_DPLL_X2, 1);
377
378 omap2_set_prcm(prcm->cm_clksel1_pll, prcm->base_sdrc_rfr,
379 bypass);
380
381 omap2_init_memory_params(omap2_dll_force_needed());
382 omap2_reprogram_sdrc(done_rate, 0);
383
384 local_irq_restore(flags);
385 }
386 omap2_dpll_recalc(&dpll_ck);
387
388 return 0;
389}
390
391static struct clk_functions omap2_clk_functions = {
392 .clk_enable = omap2_clk_enable,
393 .clk_disable = omap2_clk_disable,
394 .clk_round_rate = omap2_clk_round_rate,
395 .clk_set_rate = omap2_clk_set_rate,
396 .clk_set_parent = omap2_clk_set_parent,
397 .clk_disable_unused = omap2_clk_disable_unused,
398};
399
400static u32 omap2_get_apll_clkin(void)
401{
402 u32 aplls, sclk = 0;
403
404 aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
405 aplls &= OMAP24XX_APLLS_CLKIN_MASK;
406 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
407
408 if (aplls == APLLS_CLKIN_19_2MHZ)
409 sclk = 19200000;
410 else if (aplls == APLLS_CLKIN_13MHZ)
411 sclk = 13000000;
412 else if (aplls == APLLS_CLKIN_12MHZ)
413 sclk = 12000000;
414
415 return sclk;
416}
417
418static u32 omap2_get_sysclkdiv(void)
419{
420 u32 div;
421
422 div = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
423 div &= OMAP_SYSCLKDIV_MASK;
424 div >>= OMAP_SYSCLKDIV_SHIFT;
425
426 return div;
427}
428
429static void omap2_osc_clk_recalc(struct clk *clk)
430{
431 clk->rate = omap2_get_apll_clkin() * omap2_get_sysclkdiv();
432 propagate_rate(clk);
433}
434
435static void omap2_sys_clk_recalc(struct clk *clk)
436{
437 clk->rate = clk->parent->rate / omap2_get_sysclkdiv();
438 propagate_rate(clk);
439}
440
441/*
442 * Set clocks for bypass mode for reboot to work.
443 */
444void omap2_clk_prepare_for_reboot(void)
445{
446 u32 rate;
447
448 if (vclk == NULL || sclk == NULL)
449 return;
450
451 rate = clk_get_rate(sclk);
452 clk_set_rate(vclk, rate);
453}
454
455/*
456 * Switch the MPU rate if specified on cmdline.
457 * We cannot do this early until cmdline is parsed.
458 */
459static int __init omap2_clk_arch_init(void)
460{
461 if (!mpurate)
462 return -EINVAL;
463
464 if (omap2_select_table_rate(&virt_prcm_set, mpurate))
465 printk(KERN_ERR "Could not find matching MPU rate\n");
466
467 recalculate_root_clocks();
468
469 printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL/MPU): "
470 "%ld.%01ld/%ld/%ld MHz\n",
471 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
472 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
473
474 return 0;
475}
476arch_initcall(omap2_clk_arch_init);
477
478int __init omap2_clk_init(void)
479{
480 struct prcm_config *prcm;
481 struct clk **clkp;
482 u32 clkrate;
483
484 if (cpu_is_omap242x())
485 cpu_mask = RATE_IN_242X;
486 else if (cpu_is_omap2430())
487 cpu_mask = RATE_IN_243X;
488
489 clk_init(&omap2_clk_functions);
490
491 omap2_osc_clk_recalc(&osc_ck);
492 omap2_sys_clk_recalc(&sys_ck);
493
494 for (clkp = onchip_24xx_clks;
495 clkp < onchip_24xx_clks + ARRAY_SIZE(onchip_24xx_clks);
496 clkp++) {
497
498 if ((*clkp)->flags & CLOCK_IN_OMAP242X && cpu_is_omap2420()) {
499 clk_register(*clkp);
500 continue;
501 }
502
503 if ((*clkp)->flags & CLOCK_IN_OMAP243X && cpu_is_omap2430()) {
504 clk_register(*clkp);
505 continue;
506 }
507 }
508
509 /* Check the MPU rate set by bootloader */
510 clkrate = omap2_get_dpll_rate_24xx(&dpll_ck);
511 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
512 if (!(prcm->flags & cpu_mask))
513 continue;
514 if (prcm->xtal_speed != sys_ck.rate)
515 continue;
516 if (prcm->dpll_speed <= clkrate)
517 break;
518 }
519 curr_prcm_set = prcm;
520
521 recalculate_root_clocks();
522
523 printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): "
524 "%ld.%01ld/%ld/%ld MHz\n",
525 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
526 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
527
528 /*
529 * Only enable those clocks we will need, let the drivers
530 * enable other clocks as necessary
531 */
532 clk_enable_init_clocks();
533
534 /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */
535 vclk = clk_get(NULL, "virt_prcm_set");
536 sclk = clk_get(NULL, "sys_ck");
537
538 return 0;
539}
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
new file mode 100644
index 000000000000..88081ed13f96
--- /dev/null
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -0,0 +1,2643 @@
1/*
2 * linux/arch/arm/mach-omap2/clock24xx.h
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 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H
17#define __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H
18
19#include "clock.h"
20
21#include "prm.h"
22#include "cm.h"
23#include "prm-regbits-24xx.h"
24#include "cm-regbits-24xx.h"
25#include "sdrc.h"
26
27static void omap2_table_mpu_recalc(struct clk *clk);
28static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
29static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
30static void omap2_sys_clk_recalc(struct clk *clk);
31static void omap2_osc_clk_recalc(struct clk *clk);
32static void omap2_sys_clk_recalc(struct clk *clk);
33static void omap2_dpll_recalc(struct clk *clk);
34static int omap2_clk_fixed_enable(struct clk *clk);
35static void omap2_clk_fixed_disable(struct clk *clk);
36static int omap2_enable_osc_ck(struct clk *clk);
37static void omap2_disable_osc_ck(struct clk *clk);
38static int omap2_reprogram_dpll(struct clk *clk, unsigned long rate);
39
40/* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
41 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
42 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
43 */
44struct prcm_config {
45 unsigned long xtal_speed; /* crystal rate */
46 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
47 unsigned long mpu_speed; /* speed of MPU */
48 unsigned long cm_clksel_mpu; /* mpu divider */
49 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
50 unsigned long cm_clksel_gfx; /* gfx dividers */
51 unsigned long cm_clksel1_core; /* major subsystem dividers */
52 unsigned long cm_clksel1_pll; /* m,n */
53 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
54 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
55 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
56 unsigned char flags;
57};
58
59/*
60 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
61 * These configurations are characterized by voltage and speed for clocks.
62 * The device is only validated for certain combinations. One way to express
63 * these combinations is via the 'ratio's' which the clocks operate with
64 * respect to each other. These ratio sets are for a given voltage/DPLL
65 * setting. All configurations can be described by a DPLL setting and a ratio
66 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
67 *
68 * 2430 differs from 2420 in that there are no more phase synchronizers used.
69 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
70 * 2430 (iva2.1, NOdsp, mdm)
71 */
72
73/* Core fields for cm_clksel, not ratio governed */
74#define RX_CLKSEL_DSS1 (0x10 << 8)
75#define RX_CLKSEL_DSS2 (0x0 << 13)
76#define RX_CLKSEL_SSI (0x5 << 20)
77
78/*-------------------------------------------------------------------------
79 * Voltage/DPLL ratios
80 *-------------------------------------------------------------------------*/
81
82/* 2430 Ratio's, 2430-Ratio Config 1 */
83#define R1_CLKSEL_L3 (4 << 0)
84#define R1_CLKSEL_L4 (2 << 5)
85#define R1_CLKSEL_USB (4 << 25)
86#define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \
87 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
88 R1_CLKSEL_L4 | R1_CLKSEL_L3
89#define R1_CLKSEL_MPU (2 << 0)
90#define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
91#define R1_CLKSEL_DSP (2 << 0)
92#define R1_CLKSEL_DSP_IF (2 << 5)
93#define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF
94#define R1_CLKSEL_GFX (2 << 0)
95#define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
96#define R1_CLKSEL_MDM (4 << 0)
97#define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
98
99/* 2430-Ratio Config 2 */
100#define R2_CLKSEL_L3 (6 << 0)
101#define R2_CLKSEL_L4 (2 << 5)
102#define R2_CLKSEL_USB (2 << 25)
103#define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \
104 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
105 R2_CLKSEL_L4 | R2_CLKSEL_L3
106#define R2_CLKSEL_MPU (2 << 0)
107#define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
108#define R2_CLKSEL_DSP (2 << 0)
109#define R2_CLKSEL_DSP_IF (3 << 5)
110#define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF
111#define R2_CLKSEL_GFX (2 << 0)
112#define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
113#define R2_CLKSEL_MDM (6 << 0)
114#define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
115
116/* 2430-Ratio Bootm (BYPASS) */
117#define RB_CLKSEL_L3 (1 << 0)
118#define RB_CLKSEL_L4 (1 << 5)
119#define RB_CLKSEL_USB (1 << 25)
120#define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \
121 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
122 RB_CLKSEL_L4 | RB_CLKSEL_L3
123#define RB_CLKSEL_MPU (1 << 0)
124#define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
125#define RB_CLKSEL_DSP (1 << 0)
126#define RB_CLKSEL_DSP_IF (1 << 5)
127#define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF
128#define RB_CLKSEL_GFX (1 << 0)
129#define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
130#define RB_CLKSEL_MDM (1 << 0)
131#define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
132
133/* 2420 Ratio Equivalents */
134#define RXX_CLKSEL_VLYNQ (0x12 << 15)
135#define RXX_CLKSEL_SSI (0x8 << 20)
136
137/* 2420-PRCM III 532MHz core */
138#define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
139#define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
140#define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
141#define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
142 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
143 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
144 RIII_CLKSEL_L3
145#define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
146#define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
147#define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
148#define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
149#define RIII_SYNC_DSP (1 << 7) /* Enable sync */
150#define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
151#define RIII_SYNC_IVA (1 << 13) /* Enable sync */
152#define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
153 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
154 RIII_CLKSEL_DSP
155#define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
156#define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
157
158/* 2420-PRCM II 600MHz core */
159#define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
160#define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
161#define RII_CLKSEL_USB (2 << 25) /* 50MHz */
162#define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \
163 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
164 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
165 RII_CLKSEL_L4 | RII_CLKSEL_L3
166#define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
167#define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
168#define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
169#define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
170#define RII_SYNC_DSP (0 << 7) /* Bypass sync */
171#define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
172#define RII_SYNC_IVA (0 << 13) /* Bypass sync */
173#define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \
174 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
175 RII_CLKSEL_DSP
176#define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
177#define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
178
179/* 2420-PRCM I 660MHz core */
180#define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
181#define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
182#define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
183#define RI_CM_CLKSEL1_CORE_VAL RI_CLKSEL_USB | \
184 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
185 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
186 RI_CLKSEL_L4 | RI_CLKSEL_L3
187#define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
188#define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
189#define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
190#define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
191#define RI_SYNC_DSP (1 << 7) /* Activate sync */
192#define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
193#define RI_SYNC_IVA (0 << 13) /* Bypass sync */
194#define RI_CM_CLKSEL_DSP_VAL RI_SYNC_IVA | RI_CLKSEL_IVA | \
195 RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
196 RI_CLKSEL_DSP
197#define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
198#define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
199
200/* 2420-PRCM VII (boot) */
201#define RVII_CLKSEL_L3 (1 << 0)
202#define RVII_CLKSEL_L4 (1 << 5)
203#define RVII_CLKSEL_DSS1 (1 << 8)
204#define RVII_CLKSEL_DSS2 (0 << 13)
205#define RVII_CLKSEL_VLYNQ (1 << 15)
206#define RVII_CLKSEL_SSI (1 << 20)
207#define RVII_CLKSEL_USB (1 << 25)
208
209#define RVII_CM_CLKSEL1_CORE_VAL RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
210 RVII_CLKSEL_VLYNQ | RVII_CLKSEL_DSS2 | \
211 RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3
212
213#define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
214#define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
215
216#define RVII_CLKSEL_DSP (1 << 0)
217#define RVII_CLKSEL_DSP_IF (1 << 5)
218#define RVII_SYNC_DSP (0 << 7)
219#define RVII_CLKSEL_IVA (1 << 8)
220#define RVII_SYNC_IVA (0 << 13)
221#define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \
222 RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP
223
224#define RVII_CLKSEL_GFX (1 << 0)
225#define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
226
227/*-------------------------------------------------------------------------
228 * 2430 Target modes: Along with each configuration the CPU has several
229 * modes which goes along with them. Modes mainly are the addition of
230 * describe DPLL combinations to go along with a ratio.
231 *-------------------------------------------------------------------------*/
232
233/* Hardware governed */
234#define MX_48M_SRC (0 << 3)
235#define MX_54M_SRC (0 << 5)
236#define MX_APLLS_CLIKIN_12 (3 << 23)
237#define MX_APLLS_CLIKIN_13 (2 << 23)
238#define MX_APLLS_CLIKIN_19_2 (0 << 23)
239
240/*
241 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
242 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
243 */
244#define M5A_DPLL_MULT_12 (133 << 12)
245#define M5A_DPLL_DIV_12 (5 << 8)
246#define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
247 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
248 MX_APLLS_CLIKIN_12
249#define M5A_DPLL_MULT_13 (61 << 12)
250#define M5A_DPLL_DIV_13 (2 << 8)
251#define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
252 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
253 MX_APLLS_CLIKIN_13
254#define M5A_DPLL_MULT_19 (55 << 12)
255#define M5A_DPLL_DIV_19 (3 << 8)
256#define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
257 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
258 MX_APLLS_CLIKIN_19_2
259/* #5b (ratio1) target DPLL = 200*2 = 400MHz */
260#define M5B_DPLL_MULT_12 (50 << 12)
261#define M5B_DPLL_DIV_12 (2 << 8)
262#define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
263 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
264 MX_APLLS_CLIKIN_12
265#define M5B_DPLL_MULT_13 (200 << 12)
266#define M5B_DPLL_DIV_13 (12 << 8)
267
268#define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
269 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
270 MX_APLLS_CLIKIN_13
271#define M5B_DPLL_MULT_19 (125 << 12)
272#define M5B_DPLL_DIV_19 (31 << 8)
273#define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
274 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
275 MX_APLLS_CLIKIN_19_2
276/*
277 * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz
278 */
279#define M4_DPLL_MULT_12 (133 << 12)
280#define M4_DPLL_DIV_12 (3 << 8)
281#define M4_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
282 M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \
283 MX_APLLS_CLIKIN_12
284
285#define M4_DPLL_MULT_13 (399 << 12)
286#define M4_DPLL_DIV_13 (12 << 8)
287#define M4_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
288 M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \
289 MX_APLLS_CLIKIN_13
290
291#define M4_DPLL_MULT_19 (145 << 12)
292#define M4_DPLL_DIV_19 (6 << 8)
293#define M4_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
294 M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \
295 MX_APLLS_CLIKIN_19_2
296
297/*
298 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
299 */
300#define M3_DPLL_MULT_12 (55 << 12)
301#define M3_DPLL_DIV_12 (1 << 8)
302#define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
303 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
304 MX_APLLS_CLIKIN_12
305#define M3_DPLL_MULT_13 (76 << 12)
306#define M3_DPLL_DIV_13 (2 << 8)
307#define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
308 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
309 MX_APLLS_CLIKIN_13
310#define M3_DPLL_MULT_19 (17 << 12)
311#define M3_DPLL_DIV_19 (0 << 8)
312#define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
313 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
314 MX_APLLS_CLIKIN_19_2
315
316/*
317 * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz
318 */
319#define M2_DPLL_MULT_12 (55 << 12)
320#define M2_DPLL_DIV_12 (1 << 8)
321#define M2_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
322 M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \
323 MX_APLLS_CLIKIN_12
324
325/* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2,
326 * relock time issue */
327/* Core frequency changed from 330/165 to 329/164 MHz*/
328#define M2_DPLL_MULT_13 (76 << 12)
329#define M2_DPLL_DIV_13 (2 << 8)
330#define M2_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
331 M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \
332 MX_APLLS_CLIKIN_13
333
334#define M2_DPLL_MULT_19 (17 << 12)
335#define M2_DPLL_DIV_19 (0 << 8)
336#define M2_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
337 M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \
338 MX_APLLS_CLIKIN_19_2
339
340/* boot (boot) */
341#define MB_DPLL_MULT (1 << 12)
342#define MB_DPLL_DIV (0 << 8)
343#define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
344 MB_DPLL_MULT | MX_APLLS_CLIKIN_12
345
346#define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
347 MB_DPLL_MULT | MX_APLLS_CLIKIN_13
348
349#define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
350 MB_DPLL_MULT | MX_APLLS_CLIKIN_19
351
352/*
353 * 2430 - chassis (sedna)
354 * 165 (ratio1) same as above #2
355 * 150 (ratio1)
356 * 133 (ratio2) same as above #4
357 * 110 (ratio2) same as above #3
358 * 104 (ratio2)
359 * boot (boot)
360 */
361
362/* PRCM I target DPLL = 2*330MHz = 660MHz */
363#define MI_DPLL_MULT_12 (55 << 12)
364#define MI_DPLL_DIV_12 (1 << 8)
365#define MI_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
366 MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
367 MX_APLLS_CLIKIN_12
368
369/*
370 * 2420 Equivalent - mode registers
371 * PRCM II , target DPLL = 2*300MHz = 600MHz
372 */
373#define MII_DPLL_MULT_12 (50 << 12)
374#define MII_DPLL_DIV_12 (1 << 8)
375#define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
376 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
377 MX_APLLS_CLIKIN_12
378#define MII_DPLL_MULT_13 (300 << 12)
379#define MII_DPLL_DIV_13 (12 << 8)
380#define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
381 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
382 MX_APLLS_CLIKIN_13
383
384/* PRCM III target DPLL = 2*266 = 532MHz*/
385#define MIII_DPLL_MULT_12 (133 << 12)
386#define MIII_DPLL_DIV_12 (5 << 8)
387#define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
388 MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \
389 MX_APLLS_CLIKIN_12
390#define MIII_DPLL_MULT_13 (266 << 12)
391#define MIII_DPLL_DIV_13 (12 << 8)
392#define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
393 MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \
394 MX_APLLS_CLIKIN_13
395
396/* PRCM VII (boot bypass) */
397#define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
398#define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
399
400/* High and low operation value */
401#define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
402#define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
403
404/* MPU speed defines */
405#define S12M 12000000
406#define S13M 13000000
407#define S19M 19200000
408#define S26M 26000000
409#define S100M 100000000
410#define S133M 133000000
411#define S150M 150000000
412#define S164M 164000000
413#define S165M 165000000
414#define S199M 199000000
415#define S200M 200000000
416#define S266M 266000000
417#define S300M 300000000
418#define S329M 329000000
419#define S330M 330000000
420#define S399M 399000000
421#define S400M 400000000
422#define S532M 532000000
423#define S600M 600000000
424#define S658M 658000000
425#define S660M 660000000
426#define S798M 798000000
427
428/*-------------------------------------------------------------------------
429 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
430 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
431 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
432 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
433 *
434 * Filling in table based on H4 boards and 2430-SDPs variants available.
435 * There are quite a few more rates combinations which could be defined.
436 *
437 * When multiple values are defined the start up will try and choose the
438 * fastest one. If a 'fast' value is defined, then automatically, the /2
439 * one should be included as it can be used. Generally having more that
440 * one fast set does not make sense, as static timings need to be changed
441 * to change the set. The exception is the bypass setting which is
442 * availble for low power bypass.
443 *
444 * Note: This table needs to be sorted, fastest to slowest.
445 *-------------------------------------------------------------------------*/
446static struct prcm_config rate_table[] = {
447 /* PRCM I - FAST */
448 {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
449 RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
450 RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
451 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
452 RATE_IN_242X},
453
454 /* PRCM II - FAST */
455 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
456 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
457 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
458 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
459 RATE_IN_242X},
460
461 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
462 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
463 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
464 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
465 RATE_IN_242X},
466
467 /* PRCM III - FAST */
468 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
469 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
470 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
471 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
472 RATE_IN_242X},
473
474 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
475 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
476 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
477 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
478 RATE_IN_242X},
479
480 /* PRCM II - SLOW */
481 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
482 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
483 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
484 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
485 RATE_IN_242X},
486
487 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
488 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
489 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
490 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
491 RATE_IN_242X},
492
493 /* PRCM III - SLOW */
494 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
495 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
496 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
497 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
498 RATE_IN_242X},
499
500 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
501 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
502 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
503 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
504 RATE_IN_242X},
505
506 /* PRCM-VII (boot-bypass) */
507 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
508 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
509 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
510 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
511 RATE_IN_242X},
512
513 /* PRCM-VII (boot-bypass) */
514 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
515 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
516 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
517 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
518 RATE_IN_242X},
519
520 /* PRCM #4 - ratio2 (ES2.1) - FAST */
521 {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
522 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
523 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
524 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
525 SDRC_RFR_CTRL_133MHz,
526 RATE_IN_243X},
527
528 /* PRCM #2 - ratio1 (ES2) - FAST */
529 {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
530 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
531 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
532 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
533 SDRC_RFR_CTRL_165MHz,
534 RATE_IN_243X},
535
536 /* PRCM #5a - ratio1 - FAST */
537 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
538 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
539 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
540 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
541 SDRC_RFR_CTRL_133MHz,
542 RATE_IN_243X},
543
544 /* PRCM #5b - ratio1 - FAST */
545 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
546 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
547 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
548 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
549 SDRC_RFR_CTRL_100MHz,
550 RATE_IN_243X},
551
552 /* PRCM #4 - ratio1 (ES2.1) - SLOW */
553 {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
554 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
555 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
556 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
557 SDRC_RFR_CTRL_133MHz,
558 RATE_IN_243X},
559
560 /* PRCM #2 - ratio1 (ES2) - SLOW */
561 {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
562 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
563 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
564 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
565 SDRC_RFR_CTRL_165MHz,
566 RATE_IN_243X},
567
568 /* PRCM #5a - ratio1 - SLOW */
569 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
570 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
571 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
572 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
573 SDRC_RFR_CTRL_133MHz,
574 RATE_IN_243X},
575
576 /* PRCM #5b - ratio1 - SLOW*/
577 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
578 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
579 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
580 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
581 SDRC_RFR_CTRL_100MHz,
582 RATE_IN_243X},
583
584 /* PRCM-boot/bypass */
585 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
586 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
587 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
588 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
589 SDRC_RFR_CTRL_BYPASS,
590 RATE_IN_243X},
591
592 /* PRCM-boot/bypass */
593 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
594 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
595 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
596 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
597 SDRC_RFR_CTRL_BYPASS,
598 RATE_IN_243X},
599
600 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
601};
602
603/*-------------------------------------------------------------------------
604 * 24xx clock tree.
605 *
606 * NOTE:In many cases here we are assigning a 'default' parent. In many
607 * cases the parent is selectable. The get/set parent calls will also
608 * switch sources.
609 *
610 * Many some clocks say always_enabled, but they can be auto idled for
611 * power savings. They will always be available upon clock request.
612 *
613 * Several sources are given initial rates which may be wrong, this will
614 * be fixed up in the init func.
615 *
616 * Things are broadly separated below by clock domains. It is
617 * noteworthy that most periferals have dependencies on multiple clock
618 * domains. Many get their interface clocks from the L4 domain, but get
619 * functional clocks from fixed sources or other core domain derived
620 * clocks.
621 *-------------------------------------------------------------------------*/
622
623/* Base external input clocks */
624static struct clk func_32k_ck = {
625 .name = "func_32k_ck",
626 .rate = 32000,
627 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
628 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
629 .recalc = &propagate_rate,
630};
631
632/* Typical 12/13MHz in standalone mode, will be 26Mhz in chassis mode */
633static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
634 .name = "osc_ck",
635 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
636 RATE_PROPAGATES,
637 .enable = &omap2_enable_osc_ck,
638 .disable = &omap2_disable_osc_ck,
639 .recalc = &omap2_osc_clk_recalc,
640};
641
642/* With out modem likely 12MHz, with modem likely 13MHz */
643static struct clk sys_ck = { /* (*12, *13, 19.2, 26, 38.4)MHz */
644 .name = "sys_ck", /* ~ ref_clk also */
645 .parent = &osc_ck,
646 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
647 ALWAYS_ENABLED | RATE_PROPAGATES,
648 .recalc = &omap2_sys_clk_recalc,
649};
650
651static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */
652 .name = "alt_ck",
653 .rate = 54000000,
654 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
655 RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
656 .recalc = &propagate_rate,
657};
658
659/*
660 * Analog domain root source clocks
661 */
662
663/* dpll_ck, is broken out in to special cases through clksel */
664/* REVISIT: Rate changes on dpll_ck trigger a full set change. ...
665 * deal with this
666 */
667
668static const struct dpll_data dpll_dd = {
669 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
670 .mult_mask = OMAP24XX_DPLL_MULT_MASK,
671 .div1_mask = OMAP24XX_DPLL_DIV_MASK,
672};
673
674static struct clk dpll_ck = {
675 .name = "dpll_ck",
676 .parent = &sys_ck, /* Can be func_32k also */
677 .dpll_data = &dpll_dd,
678 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
679 RATE_PROPAGATES | ALWAYS_ENABLED,
680 .recalc = &omap2_dpll_recalc,
681 .set_rate = &omap2_reprogram_dpll,
682};
683
684static struct clk apll96_ck = {
685 .name = "apll96_ck",
686 .parent = &sys_ck,
687 .rate = 96000000,
688 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
689 RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
690 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
691 .enable_bit = OMAP24XX_EN_96M_PLL_SHIFT,
692 .enable = &omap2_clk_fixed_enable,
693 .disable = &omap2_clk_fixed_disable,
694 .recalc = &propagate_rate,
695};
696
697static struct clk apll54_ck = {
698 .name = "apll54_ck",
699 .parent = &sys_ck,
700 .rate = 54000000,
701 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
702 RATE_FIXED | RATE_PROPAGATES | ENABLE_ON_INIT,
703 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
704 .enable_bit = OMAP24XX_EN_54M_PLL_SHIFT,
705 .enable = &omap2_clk_fixed_enable,
706 .disable = &omap2_clk_fixed_disable,
707 .recalc = &propagate_rate,
708};
709
710/*
711 * PRCM digital base sources
712 */
713
714/* func_54m_ck */
715
716static const struct clksel_rate func_54m_apll54_rates[] = {
717 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
718 { .div = 0 },
719};
720
721static const struct clksel_rate func_54m_alt_rates[] = {
722 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
723 { .div = 0 },
724};
725
726static const struct clksel func_54m_clksel[] = {
727 { .parent = &apll54_ck, .rates = func_54m_apll54_rates, },
728 { .parent = &alt_ck, .rates = func_54m_alt_rates, },
729 { .parent = NULL },
730};
731
732static struct clk func_54m_ck = {
733 .name = "func_54m_ck",
734 .parent = &apll54_ck, /* can also be alt_clk */
735 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
736 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
737 .init = &omap2_init_clksel_parent,
738 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
739 .clksel_mask = OMAP24XX_54M_SOURCE,
740 .clksel = func_54m_clksel,
741 .recalc = &omap2_clksel_recalc,
742};
743
744static struct clk core_ck = {
745 .name = "core_ck",
746 .parent = &dpll_ck, /* can also be 32k */
747 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
748 ALWAYS_ENABLED | RATE_PROPAGATES,
749 .recalc = &followparent_recalc,
750};
751
752/* func_96m_ck */
753static const struct clksel_rate func_96m_apll96_rates[] = {
754 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
755 { .div = 0 },
756};
757
758static const struct clksel_rate func_96m_alt_rates[] = {
759 { .div = 1, .val = 1, .flags = RATE_IN_243X | DEFAULT_RATE },
760 { .div = 0 },
761};
762
763static const struct clksel func_96m_clksel[] = {
764 { .parent = &apll96_ck, .rates = func_96m_apll96_rates },
765 { .parent = &alt_ck, .rates = func_96m_alt_rates },
766 { .parent = NULL }
767};
768
769/* The parent of this clock is not selectable on 2420. */
770static struct clk func_96m_ck = {
771 .name = "func_96m_ck",
772 .parent = &apll96_ck,
773 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
774 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
775 .init = &omap2_init_clksel_parent,
776 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
777 .clksel_mask = OMAP2430_96M_SOURCE,
778 .clksel = func_96m_clksel,
779 .recalc = &omap2_clksel_recalc,
780 .round_rate = &omap2_clksel_round_rate,
781 .set_rate = &omap2_clksel_set_rate
782};
783
784/* func_48m_ck */
785
786static const struct clksel_rate func_48m_apll96_rates[] = {
787 { .div = 2, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
788 { .div = 0 },
789};
790
791static const struct clksel_rate func_48m_alt_rates[] = {
792 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
793 { .div = 0 },
794};
795
796static const struct clksel func_48m_clksel[] = {
797 { .parent = &apll96_ck, .rates = func_48m_apll96_rates },
798 { .parent = &alt_ck, .rates = func_48m_alt_rates },
799 { .parent = NULL }
800};
801
802static struct clk func_48m_ck = {
803 .name = "func_48m_ck",
804 .parent = &apll96_ck, /* 96M or Alt */
805 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
806 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
807 .init = &omap2_init_clksel_parent,
808 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
809 .clksel_mask = OMAP24XX_48M_SOURCE,
810 .clksel = func_48m_clksel,
811 .recalc = &omap2_clksel_recalc,
812 .round_rate = &omap2_clksel_round_rate,
813 .set_rate = &omap2_clksel_set_rate
814};
815
816static struct clk func_12m_ck = {
817 .name = "func_12m_ck",
818 .parent = &func_48m_ck,
819 .fixed_div = 4,
820 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
821 RATE_PROPAGATES | PARENT_CONTROLS_CLOCK,
822 .recalc = &omap2_fixed_divisor_recalc,
823};
824
825/* Secure timer, only available in secure mode */
826static struct clk wdt1_osc_ck = {
827 .name = "ck_wdt1_osc",
828 .parent = &osc_ck,
829 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
830 .recalc = &followparent_recalc,
831};
832
833/*
834 * The common_clkout* clksel_rate structs are common to
835 * sys_clkout, sys_clkout_src, sys_clkout2, and sys_clkout2_src.
836 * sys_clkout2_* are 2420-only, so the
837 * clksel_rate flags fields are inaccurate for those clocks. This is
838 * harmless since access to those clocks are gated by the struct clk
839 * flags fields, which mark them as 2420-only.
840 */
841static const struct clksel_rate common_clkout_src_core_rates[] = {
842 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
843 { .div = 0 }
844};
845
846static const struct clksel_rate common_clkout_src_sys_rates[] = {
847 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
848 { .div = 0 }
849};
850
851static const struct clksel_rate common_clkout_src_96m_rates[] = {
852 { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
853 { .div = 0 }
854};
855
856static const struct clksel_rate common_clkout_src_54m_rates[] = {
857 { .div = 1, .val = 3, .flags = RATE_IN_24XX | DEFAULT_RATE },
858 { .div = 0 }
859};
860
861static const struct clksel common_clkout_src_clksel[] = {
862 { .parent = &core_ck, .rates = common_clkout_src_core_rates },
863 { .parent = &sys_ck, .rates = common_clkout_src_sys_rates },
864 { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates },
865 { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates },
866 { .parent = NULL }
867};
868
869static struct clk sys_clkout_src = {
870 .name = "sys_clkout_src",
871 .parent = &func_54m_ck,
872 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
873 RATE_PROPAGATES,
874 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
875 .enable_bit = OMAP24XX_CLKOUT_EN_SHIFT,
876 .init = &omap2_init_clksel_parent,
877 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
878 .clksel_mask = OMAP24XX_CLKOUT_SOURCE_MASK,
879 .clksel = common_clkout_src_clksel,
880 .recalc = &omap2_clksel_recalc,
881 .round_rate = &omap2_clksel_round_rate,
882 .set_rate = &omap2_clksel_set_rate
883};
884
885static const struct clksel_rate common_clkout_rates[] = {
886 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
887 { .div = 2, .val = 1, .flags = RATE_IN_24XX },
888 { .div = 4, .val = 2, .flags = RATE_IN_24XX },
889 { .div = 8, .val = 3, .flags = RATE_IN_24XX },
890 { .div = 16, .val = 4, .flags = RATE_IN_24XX },
891 { .div = 0 },
892};
893
894static const struct clksel sys_clkout_clksel[] = {
895 { .parent = &sys_clkout_src, .rates = common_clkout_rates },
896 { .parent = NULL }
897};
898
899static struct clk sys_clkout = {
900 .name = "sys_clkout",
901 .parent = &sys_clkout_src,
902 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
903 PARENT_CONTROLS_CLOCK,
904 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
905 .clksel_mask = OMAP24XX_CLKOUT_DIV_MASK,
906 .clksel = sys_clkout_clksel,
907 .recalc = &omap2_clksel_recalc,
908 .round_rate = &omap2_clksel_round_rate,
909 .set_rate = &omap2_clksel_set_rate
910};
911
912/* In 2430, new in 2420 ES2 */
913static struct clk sys_clkout2_src = {
914 .name = "sys_clkout2_src",
915 .parent = &func_54m_ck,
916 .flags = CLOCK_IN_OMAP242X | RATE_PROPAGATES,
917 .enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
918 .enable_bit = OMAP2420_CLKOUT2_EN_SHIFT,
919 .init = &omap2_init_clksel_parent,
920 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
921 .clksel_mask = OMAP2420_CLKOUT2_SOURCE_MASK,
922 .clksel = common_clkout_src_clksel,
923 .recalc = &omap2_clksel_recalc,
924 .round_rate = &omap2_clksel_round_rate,
925 .set_rate = &omap2_clksel_set_rate
926};
927
928static const struct clksel sys_clkout2_clksel[] = {
929 { .parent = &sys_clkout2_src, .rates = common_clkout_rates },
930 { .parent = NULL }
931};
932
933/* In 2430, new in 2420 ES2 */
934static struct clk sys_clkout2 = {
935 .name = "sys_clkout2",
936 .parent = &sys_clkout2_src,
937 .flags = CLOCK_IN_OMAP242X | PARENT_CONTROLS_CLOCK,
938 .clksel_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
939 .clksel_mask = OMAP2420_CLKOUT2_DIV_MASK,
940 .clksel = sys_clkout2_clksel,
941 .recalc = &omap2_clksel_recalc,
942 .round_rate = &omap2_clksel_round_rate,
943 .set_rate = &omap2_clksel_set_rate
944};
945
946static struct clk emul_ck = {
947 .name = "emul_ck",
948 .parent = &func_54m_ck,
949 .flags = CLOCK_IN_OMAP242X,
950 .enable_reg = OMAP24XX_PRCM_CLKEMUL_CTRL,
951 .enable_bit = OMAP24XX_EMULATION_EN_SHIFT,
952 .recalc = &followparent_recalc,
953
954};
955
956/*
957 * MPU clock domain
958 * Clocks:
959 * MPU_FCLK, MPU_ICLK
960 * INT_M_FCLK, INT_M_I_CLK
961 *
962 * - Individual clocks are hardware managed.
963 * - Base divider comes from: CM_CLKSEL_MPU
964 *
965 */
966static const struct clksel_rate mpu_core_rates[] = {
967 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
968 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
969 { .div = 4, .val = 4, .flags = RATE_IN_242X },
970 { .div = 6, .val = 6, .flags = RATE_IN_242X },
971 { .div = 8, .val = 8, .flags = RATE_IN_242X },
972 { .div = 0 },
973};
974
975static const struct clksel mpu_clksel[] = {
976 { .parent = &core_ck, .rates = mpu_core_rates },
977 { .parent = NULL }
978};
979
980static struct clk mpu_ck = { /* Control cpu */
981 .name = "mpu_ck",
982 .parent = &core_ck,
983 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
984 ALWAYS_ENABLED | DELAYED_APP |
985 CONFIG_PARTICIPANT | RATE_PROPAGATES,
986 .init = &omap2_init_clksel_parent,
987 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
988 .clksel_mask = OMAP24XX_CLKSEL_MPU_MASK,
989 .clksel = mpu_clksel,
990 .recalc = &omap2_clksel_recalc,
991 .round_rate = &omap2_clksel_round_rate,
992 .set_rate = &omap2_clksel_set_rate
993};
994
995/*
996 * DSP (2430-IVA2.1) (2420-UMA+IVA1) clock domain
997 * Clocks:
998 * 2430: IVA2.1_FCLK (really just DSP_FCLK), IVA2.1_ICLK
999 * 2420: UMA_FCLK, UMA_ICLK, IVA_MPU, IVA_COP
1000 *
1001 * Won't be too specific here. The core clock comes into this block
1002 * it is divided then tee'ed. One branch goes directly to xyz enable
1003 * controls. The other branch gets further divided by 2 then possibly
1004 * routed into a synchronizer and out of clocks abc.
1005 */
1006static const struct clksel_rate dsp_fck_core_rates[] = {
1007 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1008 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1009 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1010 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1011 { .div = 6, .val = 6, .flags = RATE_IN_242X },
1012 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1013 { .div = 12, .val = 12, .flags = RATE_IN_242X },
1014 { .div = 0 },
1015};
1016
1017static const struct clksel dsp_fck_clksel[] = {
1018 { .parent = &core_ck, .rates = dsp_fck_core_rates },
1019 { .parent = NULL }
1020};
1021
1022static struct clk dsp_fck = {
1023 .name = "dsp_fck",
1024 .parent = &core_ck,
1025 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
1026 CONFIG_PARTICIPANT | RATE_PROPAGATES,
1027 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1028 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
1029 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1030 .clksel_mask = OMAP24XX_CLKSEL_DSP_MASK,
1031 .clksel = dsp_fck_clksel,
1032 .recalc = &omap2_clksel_recalc,
1033 .round_rate = &omap2_clksel_round_rate,
1034 .set_rate = &omap2_clksel_set_rate
1035};
1036
1037/* DSP interface clock */
1038static const struct clksel_rate dsp_irate_ick_rates[] = {
1039 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1040 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1041 { .div = 3, .val = 3, .flags = RATE_IN_243X },
1042 { .div = 0 },
1043};
1044
1045static const struct clksel dsp_irate_ick_clksel[] = {
1046 { .parent = &dsp_fck, .rates = dsp_irate_ick_rates },
1047 { .parent = NULL }
1048};
1049
1050/*
1051 * This clock does not exist as such in the TRM, but is added to
1052 * separate source selection from XXX
1053 */
1054static struct clk dsp_irate_ick = {
1055 .name = "dsp_irate_ick",
1056 .parent = &dsp_fck,
1057 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | DELAYED_APP |
1058 CONFIG_PARTICIPANT | PARENT_CONTROLS_CLOCK,
1059 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1060 .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK,
1061 .clksel = dsp_irate_ick_clksel,
1062 .recalc = &omap2_clksel_recalc,
1063 .round_rate = &omap2_clksel_round_rate,
1064 .set_rate = &omap2_clksel_set_rate
1065};
1066
1067/* 2420 only */
1068static struct clk dsp_ick = {
1069 .name = "dsp_ick", /* apparently ipi and isp */
1070 .parent = &dsp_irate_ick,
1071 .flags = CLOCK_IN_OMAP242X | DELAYED_APP | CONFIG_PARTICIPANT,
1072 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
1073 .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */
1074};
1075
1076/* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */
1077static struct clk iva2_1_ick = {
1078 .name = "iva2_1_ick",
1079 .parent = &dsp_irate_ick,
1080 .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
1081 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1082 .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
1083};
1084
1085static struct clk iva1_ifck = {
1086 .name = "iva1_ifck",
1087 .parent = &core_ck,
1088 .flags = CLOCK_IN_OMAP242X | CONFIG_PARTICIPANT |
1089 RATE_PROPAGATES | DELAYED_APP,
1090 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1091 .enable_bit = OMAP2420_EN_IVA_COP_SHIFT,
1092 .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
1093 .clksel_mask = OMAP2420_CLKSEL_IVA_MASK,
1094 .clksel = dsp_fck_clksel,
1095 .recalc = &omap2_clksel_recalc,
1096 .round_rate = &omap2_clksel_round_rate,
1097 .set_rate = &omap2_clksel_set_rate
1098};
1099
1100/* IVA1 mpu/int/i/f clocks are /2 of parent */
1101static struct clk iva1_mpu_int_ifck = {
1102 .name = "iva1_mpu_int_ifck",
1103 .parent = &iva1_ifck,
1104 .flags = CLOCK_IN_OMAP242X,
1105 .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
1106 .enable_bit = OMAP2420_EN_IVA_MPU_SHIFT,
1107 .fixed_div = 2,
1108 .recalc = &omap2_fixed_divisor_recalc,
1109};
1110
1111/*
1112 * L3 clock domain
1113 * L3 clocks are used for both interface and functional clocks to
1114 * multiple entities. Some of these clocks are completely managed
1115 * by hardware, and some others allow software control. Hardware
1116 * managed ones general are based on directly CLK_REQ signals and
1117 * various auto idle settings. The functional spec sets many of these
1118 * as 'tie-high' for their enables.
1119 *
1120 * I-CLOCKS:
1121 * L3-Interconnect, SMS, GPMC, SDRC, OCM_RAM, OCM_ROM, SDMA
1122 * CAM, HS-USB.
1123 * F-CLOCK
1124 * SSI.
1125 *
1126 * GPMC memories and SDRC have timing and clock sensitive registers which
1127 * may very well need notification when the clock changes. Currently for low
1128 * operating points, these are taken care of in sleep.S.
1129 */
1130static const struct clksel_rate core_l3_core_rates[] = {
1131 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1132 { .div = 2, .val = 2, .flags = RATE_IN_242X },
1133 { .div = 4, .val = 4, .flags = RATE_IN_24XX | DEFAULT_RATE },
1134 { .div = 6, .val = 6, .flags = RATE_IN_24XX },
1135 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1136 { .div = 12, .val = 12, .flags = RATE_IN_242X },
1137 { .div = 16, .val = 16, .flags = RATE_IN_242X },
1138 { .div = 0 }
1139};
1140
1141static const struct clksel core_l3_clksel[] = {
1142 { .parent = &core_ck, .rates = core_l3_core_rates },
1143 { .parent = NULL }
1144};
1145
1146static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
1147 .name = "core_l3_ck",
1148 .parent = &core_ck,
1149 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1150 ALWAYS_ENABLED | DELAYED_APP |
1151 CONFIG_PARTICIPANT | RATE_PROPAGATES,
1152 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1153 .clksel_mask = OMAP24XX_CLKSEL_L3_MASK,
1154 .clksel = core_l3_clksel,
1155 .recalc = &omap2_clksel_recalc,
1156 .round_rate = &omap2_clksel_round_rate,
1157 .set_rate = &omap2_clksel_set_rate
1158};
1159
1160/* usb_l4_ick */
1161static const struct clksel_rate usb_l4_ick_core_l3_rates[] = {
1162 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1163 { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1164 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1165 { .div = 0 }
1166};
1167
1168static const struct clksel usb_l4_ick_clksel[] = {
1169 { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates },
1170 { .parent = NULL },
1171};
1172
1173static struct clk usb_l4_ick = { /* FS-USB interface clock */
1174 .name = "usb_l4_ick",
1175 .parent = &core_l3_ck,
1176 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1177 DELAYED_APP | CONFIG_PARTICIPANT,
1178 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1179 .enable_bit = OMAP24XX_EN_USB_SHIFT,
1180 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1181 .clksel_mask = OMAP24XX_CLKSEL_USB_MASK,
1182 .clksel = usb_l4_ick_clksel,
1183 .recalc = &omap2_clksel_recalc,
1184 .round_rate = &omap2_clksel_round_rate,
1185 .set_rate = &omap2_clksel_set_rate
1186};
1187
1188/*
1189 * SSI is in L3 management domain, its direct parent is core not l3,
1190 * many core power domain entities are grouped into the L3 clock
1191 * domain.
1192 * SSI_SSR_FCLK, SSI_SST_FCLK, SSI_L4_CLIK
1193 *
1194 * ssr = core/1/2/3/4/5, sst = 1/2 ssr.
1195 */
1196static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = {
1197 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1198 { .div = 2, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1199 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1200 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1201 { .div = 5, .val = 5, .flags = RATE_IN_243X },
1202 { .div = 6, .val = 6, .flags = RATE_IN_242X },
1203 { .div = 8, .val = 8, .flags = RATE_IN_242X },
1204 { .div = 0 }
1205};
1206
1207static const struct clksel ssi_ssr_sst_fck_clksel[] = {
1208 { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates },
1209 { .parent = NULL }
1210};
1211
1212static struct clk ssi_ssr_sst_fck = {
1213 .name = "ssi_fck",
1214 .parent = &core_ck,
1215 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1216 DELAYED_APP,
1217 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1218 .enable_bit = OMAP24XX_EN_SSI_SHIFT,
1219 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1220 .clksel_mask = OMAP24XX_CLKSEL_SSI_MASK,
1221 .clksel = ssi_ssr_sst_fck_clksel,
1222 .recalc = &omap2_clksel_recalc,
1223 .round_rate = &omap2_clksel_round_rate,
1224 .set_rate = &omap2_clksel_set_rate
1225};
1226
1227/*
1228 * GFX clock domain
1229 * Clocks:
1230 * GFX_FCLK, GFX_ICLK
1231 * GFX_CG1(2d), GFX_CG2(3d)
1232 *
1233 * GFX_FCLK runs from L3, and is divided by (1,2,3,4)
1234 * The 2d and 3d clocks run at a hardware determined
1235 * divided value of fclk.
1236 *
1237 */
1238/* XXX REVISIT: GFX clock is part of CONFIG_PARTICIPANT, no? doublecheck. */
1239
1240/* This clksel struct is shared between gfx_3d_fck and gfx_2d_fck */
1241static const struct clksel gfx_fck_clksel[] = {
1242 { .parent = &core_l3_ck, .rates = gfx_l3_rates },
1243 { .parent = NULL },
1244};
1245
1246static struct clk gfx_3d_fck = {
1247 .name = "gfx_3d_fck",
1248 .parent = &core_l3_ck,
1249 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1250 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1251 .enable_bit = OMAP24XX_EN_3D_SHIFT,
1252 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1253 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1254 .clksel = gfx_fck_clksel,
1255 .recalc = &omap2_clksel_recalc,
1256 .round_rate = &omap2_clksel_round_rate,
1257 .set_rate = &omap2_clksel_set_rate
1258};
1259
1260static struct clk gfx_2d_fck = {
1261 .name = "gfx_2d_fck",
1262 .parent = &core_l3_ck,
1263 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1264 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1265 .enable_bit = OMAP24XX_EN_2D_SHIFT,
1266 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1267 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1268 .clksel = gfx_fck_clksel,
1269 .recalc = &omap2_clksel_recalc,
1270 .round_rate = &omap2_clksel_round_rate,
1271 .set_rate = &omap2_clksel_set_rate
1272};
1273
1274static struct clk gfx_ick = {
1275 .name = "gfx_ick", /* From l3 */
1276 .parent = &core_l3_ck,
1277 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1278 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1279 .enable_bit = OMAP_EN_GFX_SHIFT,
1280 .recalc = &followparent_recalc,
1281};
1282
1283/*
1284 * Modem clock domain (2430)
1285 * CLOCKS:
1286 * MDM_OSC_CLK
1287 * MDM_ICLK
1288 * These clocks are usable in chassis mode only.
1289 */
1290static const struct clksel_rate mdm_ick_core_rates[] = {
1291 { .div = 1, .val = 1, .flags = RATE_IN_243X },
1292 { .div = 4, .val = 4, .flags = RATE_IN_243X | DEFAULT_RATE },
1293 { .div = 6, .val = 6, .flags = RATE_IN_243X },
1294 { .div = 9, .val = 9, .flags = RATE_IN_243X },
1295 { .div = 0 }
1296};
1297
1298static const struct clksel mdm_ick_clksel[] = {
1299 { .parent = &core_ck, .rates = mdm_ick_core_rates },
1300 { .parent = NULL }
1301};
1302
1303static struct clk mdm_ick = { /* used both as a ick and fck */
1304 .name = "mdm_ick",
1305 .parent = &core_ck,
1306 .flags = CLOCK_IN_OMAP243X | DELAYED_APP | CONFIG_PARTICIPANT,
1307 .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
1308 .enable_bit = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT,
1309 .clksel_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_CLKSEL),
1310 .clksel_mask = OMAP2430_CLKSEL_MDM_MASK,
1311 .clksel = mdm_ick_clksel,
1312 .recalc = &omap2_clksel_recalc,
1313 .round_rate = &omap2_clksel_round_rate,
1314 .set_rate = &omap2_clksel_set_rate
1315};
1316
1317static struct clk mdm_osc_ck = {
1318 .name = "mdm_osc_ck",
1319 .parent = &osc_ck,
1320 .flags = CLOCK_IN_OMAP243X,
1321 .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN),
1322 .enable_bit = OMAP2430_EN_OSC_SHIFT,
1323 .recalc = &followparent_recalc,
1324};
1325
1326/*
1327 * L4 clock management domain
1328 *
1329 * This domain contains lots of interface clocks from the L4 interface, some
1330 * functional clocks. Fixed APLL functional source clocks are managed in
1331 * this domain.
1332 */
1333static const struct clksel_rate l4_core_l3_rates[] = {
1334 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1335 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1336 { .div = 0 }
1337};
1338
1339static const struct clksel l4_clksel[] = {
1340 { .parent = &core_l3_ck, .rates = l4_core_l3_rates },
1341 { .parent = NULL }
1342};
1343
1344static struct clk l4_ck = { /* used both as an ick and fck */
1345 .name = "l4_ck",
1346 .parent = &core_l3_ck,
1347 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1348 ALWAYS_ENABLED | DELAYED_APP | RATE_PROPAGATES,
1349 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1350 .clksel_mask = OMAP24XX_CLKSEL_L4_MASK,
1351 .clksel = l4_clksel,
1352 .recalc = &omap2_clksel_recalc,
1353 .round_rate = &omap2_clksel_round_rate,
1354 .set_rate = &omap2_clksel_set_rate
1355};
1356
1357static struct clk ssi_l4_ick = {
1358 .name = "ssi_l4_ick",
1359 .parent = &l4_ck,
1360 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1361 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1362 .enable_bit = OMAP24XX_EN_SSI_SHIFT,
1363 .recalc = &followparent_recalc,
1364};
1365
1366/*
1367 * DSS clock domain
1368 * CLOCKs:
1369 * DSS_L4_ICLK, DSS_L3_ICLK,
1370 * DSS_CLK1, DSS_CLK2, DSS_54MHz_CLK
1371 *
1372 * DSS is both initiator and target.
1373 */
1374/* XXX Add RATE_NOT_VALIDATED */
1375
1376static const struct clksel_rate dss1_fck_sys_rates[] = {
1377 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
1378 { .div = 0 }
1379};
1380
1381static const struct clksel_rate dss1_fck_core_rates[] = {
1382 { .div = 1, .val = 1, .flags = RATE_IN_24XX },
1383 { .div = 2, .val = 2, .flags = RATE_IN_24XX },
1384 { .div = 3, .val = 3, .flags = RATE_IN_24XX },
1385 { .div = 4, .val = 4, .flags = RATE_IN_24XX },
1386 { .div = 5, .val = 5, .flags = RATE_IN_24XX },
1387 { .div = 6, .val = 6, .flags = RATE_IN_24XX },
1388 { .div = 8, .val = 8, .flags = RATE_IN_24XX },
1389 { .div = 9, .val = 9, .flags = RATE_IN_24XX },
1390 { .div = 12, .val = 12, .flags = RATE_IN_24XX },
1391 { .div = 16, .val = 16, .flags = RATE_IN_24XX | DEFAULT_RATE },
1392 { .div = 0 }
1393};
1394
1395static const struct clksel dss1_fck_clksel[] = {
1396 { .parent = &sys_ck, .rates = dss1_fck_sys_rates },
1397 { .parent = &core_ck, .rates = dss1_fck_core_rates },
1398 { .parent = NULL },
1399};
1400
1401static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */
1402 .name = "dss_ick",
1403 .parent = &l4_ck, /* really both l3 and l4 */
1404 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1405 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1406 .enable_bit = OMAP24XX_EN_DSS1_SHIFT,
1407 .recalc = &followparent_recalc,
1408};
1409
1410static struct clk dss1_fck = {
1411 .name = "dss1_fck",
1412 .parent = &core_ck, /* Core or sys */
1413 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1414 DELAYED_APP,
1415 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1416 .enable_bit = OMAP24XX_EN_DSS1_SHIFT,
1417 .init = &omap2_init_clksel_parent,
1418 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1419 .clksel_mask = OMAP24XX_CLKSEL_DSS1_MASK,
1420 .clksel = dss1_fck_clksel,
1421 .recalc = &omap2_clksel_recalc,
1422 .round_rate = &omap2_clksel_round_rate,
1423 .set_rate = &omap2_clksel_set_rate
1424};
1425
1426static const struct clksel_rate dss2_fck_sys_rates[] = {
1427 { .div = 1, .val = 0, .flags = RATE_IN_24XX | DEFAULT_RATE },
1428 { .div = 0 }
1429};
1430
1431static const struct clksel_rate dss2_fck_48m_rates[] = {
1432 { .div = 1, .val = 1, .flags = RATE_IN_24XX | DEFAULT_RATE },
1433 { .div = 0 }
1434};
1435
1436static const struct clksel dss2_fck_clksel[] = {
1437 { .parent = &sys_ck, .rates = dss2_fck_sys_rates },
1438 { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates },
1439 { .parent = NULL }
1440};
1441
1442static struct clk dss2_fck = { /* Alt clk used in power management */
1443 .name = "dss2_fck",
1444 .parent = &sys_ck, /* fixed at sys_ck or 48MHz */
1445 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
1446 DELAYED_APP,
1447 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1448 .enable_bit = OMAP24XX_EN_DSS2_SHIFT,
1449 .init = &omap2_init_clksel_parent,
1450 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
1451 .clksel_mask = OMAP24XX_CLKSEL_DSS2_MASK,
1452 .clksel = dss2_fck_clksel,
1453 .recalc = &followparent_recalc,
1454};
1455
1456static struct clk dss_54m_fck = { /* Alt clk used in power management */
1457 .name = "dss_54m_fck", /* 54m tv clk */
1458 .parent = &func_54m_ck,
1459 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1460 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1461 .enable_bit = OMAP24XX_EN_TV_SHIFT,
1462 .recalc = &followparent_recalc,
1463};
1464
1465/*
1466 * CORE power domain ICLK & FCLK defines.
1467 * Many of the these can have more than one possible parent. Entries
1468 * here will likely have an L4 interface parent, and may have multiple
1469 * functional clock parents.
1470 */
1471static const struct clksel_rate gpt_alt_rates[] = {
1472 { .div = 1, .val = 2, .flags = RATE_IN_24XX | DEFAULT_RATE },
1473 { .div = 0 }
1474};
1475
1476static const struct clksel omap24xx_gpt_clksel[] = {
1477 { .parent = &func_32k_ck, .rates = gpt_32k_rates },
1478 { .parent = &sys_ck, .rates = gpt_sys_rates },
1479 { .parent = &alt_ck, .rates = gpt_alt_rates },
1480 { .parent = NULL },
1481};
1482
1483static struct clk gpt1_ick = {
1484 .name = "gpt1_ick",
1485 .parent = &l4_ck,
1486 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1487 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1488 .enable_bit = OMAP24XX_EN_GPT1_SHIFT,
1489 .recalc = &followparent_recalc,
1490};
1491
1492static struct clk gpt1_fck = {
1493 .name = "gpt1_fck",
1494 .parent = &func_32k_ck,
1495 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1496 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1497 .enable_bit = OMAP24XX_EN_GPT1_SHIFT,
1498 .init = &omap2_init_clksel_parent,
1499 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1),
1500 .clksel_mask = OMAP24XX_CLKSEL_GPT1_MASK,
1501 .clksel = omap24xx_gpt_clksel,
1502 .recalc = &omap2_clksel_recalc,
1503 .round_rate = &omap2_clksel_round_rate,
1504 .set_rate = &omap2_clksel_set_rate
1505};
1506
1507static struct clk gpt2_ick = {
1508 .name = "gpt2_ick",
1509 .parent = &l4_ck,
1510 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1511 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1512 .enable_bit = OMAP24XX_EN_GPT2_SHIFT,
1513 .recalc = &followparent_recalc,
1514};
1515
1516static struct clk gpt2_fck = {
1517 .name = "gpt2_fck",
1518 .parent = &func_32k_ck,
1519 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1520 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1521 .enable_bit = OMAP24XX_EN_GPT2_SHIFT,
1522 .init = &omap2_init_clksel_parent,
1523 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1524 .clksel_mask = OMAP24XX_CLKSEL_GPT2_MASK,
1525 .clksel = omap24xx_gpt_clksel,
1526 .recalc = &omap2_clksel_recalc,
1527};
1528
1529static struct clk gpt3_ick = {
1530 .name = "gpt3_ick",
1531 .parent = &l4_ck,
1532 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1533 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1534 .enable_bit = OMAP24XX_EN_GPT3_SHIFT,
1535 .recalc = &followparent_recalc,
1536};
1537
1538static struct clk gpt3_fck = {
1539 .name = "gpt3_fck",
1540 .parent = &func_32k_ck,
1541 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1542 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1543 .enable_bit = OMAP24XX_EN_GPT3_SHIFT,
1544 .init = &omap2_init_clksel_parent,
1545 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1546 .clksel_mask = OMAP24XX_CLKSEL_GPT3_MASK,
1547 .clksel = omap24xx_gpt_clksel,
1548 .recalc = &omap2_clksel_recalc,
1549};
1550
1551static struct clk gpt4_ick = {
1552 .name = "gpt4_ick",
1553 .parent = &l4_ck,
1554 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1555 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1556 .enable_bit = OMAP24XX_EN_GPT4_SHIFT,
1557 .recalc = &followparent_recalc,
1558};
1559
1560static struct clk gpt4_fck = {
1561 .name = "gpt4_fck",
1562 .parent = &func_32k_ck,
1563 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1564 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1565 .enable_bit = OMAP24XX_EN_GPT4_SHIFT,
1566 .init = &omap2_init_clksel_parent,
1567 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1568 .clksel_mask = OMAP24XX_CLKSEL_GPT4_MASK,
1569 .clksel = omap24xx_gpt_clksel,
1570 .recalc = &omap2_clksel_recalc,
1571};
1572
1573static struct clk gpt5_ick = {
1574 .name = "gpt5_ick",
1575 .parent = &l4_ck,
1576 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1577 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1578 .enable_bit = OMAP24XX_EN_GPT5_SHIFT,
1579 .recalc = &followparent_recalc,
1580};
1581
1582static struct clk gpt5_fck = {
1583 .name = "gpt5_fck",
1584 .parent = &func_32k_ck,
1585 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1586 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1587 .enable_bit = OMAP24XX_EN_GPT5_SHIFT,
1588 .init = &omap2_init_clksel_parent,
1589 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1590 .clksel_mask = OMAP24XX_CLKSEL_GPT5_MASK,
1591 .clksel = omap24xx_gpt_clksel,
1592 .recalc = &omap2_clksel_recalc,
1593};
1594
1595static struct clk gpt6_ick = {
1596 .name = "gpt6_ick",
1597 .parent = &l4_ck,
1598 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1599 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1600 .enable_bit = OMAP24XX_EN_GPT6_SHIFT,
1601 .recalc = &followparent_recalc,
1602};
1603
1604static struct clk gpt6_fck = {
1605 .name = "gpt6_fck",
1606 .parent = &func_32k_ck,
1607 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1608 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1609 .enable_bit = OMAP24XX_EN_GPT6_SHIFT,
1610 .init = &omap2_init_clksel_parent,
1611 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1612 .clksel_mask = OMAP24XX_CLKSEL_GPT6_MASK,
1613 .clksel = omap24xx_gpt_clksel,
1614 .recalc = &omap2_clksel_recalc,
1615};
1616
1617static struct clk gpt7_ick = {
1618 .name = "gpt7_ick",
1619 .parent = &l4_ck,
1620 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1621 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1622 .enable_bit = OMAP24XX_EN_GPT7_SHIFT,
1623 .recalc = &followparent_recalc,
1624};
1625
1626static struct clk gpt7_fck = {
1627 .name = "gpt7_fck",
1628 .parent = &func_32k_ck,
1629 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1630 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1631 .enable_bit = OMAP24XX_EN_GPT7_SHIFT,
1632 .init = &omap2_init_clksel_parent,
1633 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1634 .clksel_mask = OMAP24XX_CLKSEL_GPT7_MASK,
1635 .clksel = omap24xx_gpt_clksel,
1636 .recalc = &omap2_clksel_recalc,
1637};
1638
1639static struct clk gpt8_ick = {
1640 .name = "gpt8_ick",
1641 .parent = &l4_ck,
1642 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1643 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1644 .enable_bit = OMAP24XX_EN_GPT8_SHIFT,
1645 .recalc = &followparent_recalc,
1646};
1647
1648static struct clk gpt8_fck = {
1649 .name = "gpt8_fck",
1650 .parent = &func_32k_ck,
1651 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1652 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1653 .enable_bit = OMAP24XX_EN_GPT8_SHIFT,
1654 .init = &omap2_init_clksel_parent,
1655 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1656 .clksel_mask = OMAP24XX_CLKSEL_GPT8_MASK,
1657 .clksel = omap24xx_gpt_clksel,
1658 .recalc = &omap2_clksel_recalc,
1659};
1660
1661static struct clk gpt9_ick = {
1662 .name = "gpt9_ick",
1663 .parent = &l4_ck,
1664 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1665 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1666 .enable_bit = OMAP24XX_EN_GPT9_SHIFT,
1667 .recalc = &followparent_recalc,
1668};
1669
1670static struct clk gpt9_fck = {
1671 .name = "gpt9_fck",
1672 .parent = &func_32k_ck,
1673 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1674 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1675 .enable_bit = OMAP24XX_EN_GPT9_SHIFT,
1676 .init = &omap2_init_clksel_parent,
1677 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1678 .clksel_mask = OMAP24XX_CLKSEL_GPT9_MASK,
1679 .clksel = omap24xx_gpt_clksel,
1680 .recalc = &omap2_clksel_recalc,
1681};
1682
1683static struct clk gpt10_ick = {
1684 .name = "gpt10_ick",
1685 .parent = &l4_ck,
1686 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1687 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1688 .enable_bit = OMAP24XX_EN_GPT10_SHIFT,
1689 .recalc = &followparent_recalc,
1690};
1691
1692static struct clk gpt10_fck = {
1693 .name = "gpt10_fck",
1694 .parent = &func_32k_ck,
1695 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1696 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1697 .enable_bit = OMAP24XX_EN_GPT10_SHIFT,
1698 .init = &omap2_init_clksel_parent,
1699 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1700 .clksel_mask = OMAP24XX_CLKSEL_GPT10_MASK,
1701 .clksel = omap24xx_gpt_clksel,
1702 .recalc = &omap2_clksel_recalc,
1703};
1704
1705static struct clk gpt11_ick = {
1706 .name = "gpt11_ick",
1707 .parent = &l4_ck,
1708 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1709 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1710 .enable_bit = OMAP24XX_EN_GPT11_SHIFT,
1711 .recalc = &followparent_recalc,
1712};
1713
1714static struct clk gpt11_fck = {
1715 .name = "gpt11_fck",
1716 .parent = &func_32k_ck,
1717 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1718 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1719 .enable_bit = OMAP24XX_EN_GPT11_SHIFT,
1720 .init = &omap2_init_clksel_parent,
1721 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1722 .clksel_mask = OMAP24XX_CLKSEL_GPT11_MASK,
1723 .clksel = omap24xx_gpt_clksel,
1724 .recalc = &omap2_clksel_recalc,
1725};
1726
1727static struct clk gpt12_ick = {
1728 .name = "gpt12_ick",
1729 .parent = &l4_ck,
1730 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1731 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1732 .enable_bit = OMAP24XX_EN_GPT12_SHIFT,
1733 .recalc = &followparent_recalc,
1734};
1735
1736static struct clk gpt12_fck = {
1737 .name = "gpt12_fck",
1738 .parent = &func_32k_ck,
1739 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1740 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1741 .enable_bit = OMAP24XX_EN_GPT12_SHIFT,
1742 .init = &omap2_init_clksel_parent,
1743 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
1744 .clksel_mask = OMAP24XX_CLKSEL_GPT12_MASK,
1745 .clksel = omap24xx_gpt_clksel,
1746 .recalc = &omap2_clksel_recalc,
1747};
1748
1749static struct clk mcbsp1_ick = {
1750 .name = "mcbsp1_ick",
1751 .parent = &l4_ck,
1752 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1753 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1754 .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1755 .recalc = &followparent_recalc,
1756};
1757
1758static struct clk mcbsp1_fck = {
1759 .name = "mcbsp1_fck",
1760 .parent = &func_96m_ck,
1761 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1762 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1763 .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1764 .recalc = &followparent_recalc,
1765};
1766
1767static struct clk mcbsp2_ick = {
1768 .name = "mcbsp2_ick",
1769 .parent = &l4_ck,
1770 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1771 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1772 .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1773 .recalc = &followparent_recalc,
1774};
1775
1776static struct clk mcbsp2_fck = {
1777 .name = "mcbsp2_fck",
1778 .parent = &func_96m_ck,
1779 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1780 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1781 .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1782 .recalc = &followparent_recalc,
1783};
1784
1785static struct clk mcbsp3_ick = {
1786 .name = "mcbsp3_ick",
1787 .parent = &l4_ck,
1788 .flags = CLOCK_IN_OMAP243X,
1789 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1790 .enable_bit = OMAP2430_EN_MCBSP3_SHIFT,
1791 .recalc = &followparent_recalc,
1792};
1793
1794static struct clk mcbsp3_fck = {
1795 .name = "mcbsp3_fck",
1796 .parent = &func_96m_ck,
1797 .flags = CLOCK_IN_OMAP243X,
1798 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1799 .enable_bit = OMAP2430_EN_MCBSP3_SHIFT,
1800 .recalc = &followparent_recalc,
1801};
1802
1803static struct clk mcbsp4_ick = {
1804 .name = "mcbsp4_ick",
1805 .parent = &l4_ck,
1806 .flags = CLOCK_IN_OMAP243X,
1807 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1808 .enable_bit = OMAP2430_EN_MCBSP4_SHIFT,
1809 .recalc = &followparent_recalc,
1810};
1811
1812static struct clk mcbsp4_fck = {
1813 .name = "mcbsp4_fck",
1814 .parent = &func_96m_ck,
1815 .flags = CLOCK_IN_OMAP243X,
1816 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1817 .enable_bit = OMAP2430_EN_MCBSP4_SHIFT,
1818 .recalc = &followparent_recalc,
1819};
1820
1821static struct clk mcbsp5_ick = {
1822 .name = "mcbsp5_ick",
1823 .parent = &l4_ck,
1824 .flags = CLOCK_IN_OMAP243X,
1825 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1826 .enable_bit = OMAP2430_EN_MCBSP5_SHIFT,
1827 .recalc = &followparent_recalc,
1828};
1829
1830static struct clk mcbsp5_fck = {
1831 .name = "mcbsp5_fck",
1832 .parent = &func_96m_ck,
1833 .flags = CLOCK_IN_OMAP243X,
1834 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1835 .enable_bit = OMAP2430_EN_MCBSP5_SHIFT,
1836 .recalc = &followparent_recalc,
1837};
1838
1839static struct clk mcspi1_ick = {
1840 .name = "mcspi_ick",
1841 .id = 1,
1842 .parent = &l4_ck,
1843 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1844 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1845 .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1846 .recalc = &followparent_recalc,
1847};
1848
1849static struct clk mcspi1_fck = {
1850 .name = "mcspi_fck",
1851 .id = 1,
1852 .parent = &func_48m_ck,
1853 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1854 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1855 .enable_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1856 .recalc = &followparent_recalc,
1857};
1858
1859static struct clk mcspi2_ick = {
1860 .name = "mcspi_ick",
1861 .id = 2,
1862 .parent = &l4_ck,
1863 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1864 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1865 .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1866 .recalc = &followparent_recalc,
1867};
1868
1869static struct clk mcspi2_fck = {
1870 .name = "mcspi_fck",
1871 .id = 2,
1872 .parent = &func_48m_ck,
1873 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1874 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1875 .enable_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1876 .recalc = &followparent_recalc,
1877};
1878
1879static struct clk mcspi3_ick = {
1880 .name = "mcspi_ick",
1881 .id = 3,
1882 .parent = &l4_ck,
1883 .flags = CLOCK_IN_OMAP243X,
1884 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1885 .enable_bit = OMAP2430_EN_MCSPI3_SHIFT,
1886 .recalc = &followparent_recalc,
1887};
1888
1889static struct clk mcspi3_fck = {
1890 .name = "mcspi_fck",
1891 .id = 3,
1892 .parent = &func_48m_ck,
1893 .flags = CLOCK_IN_OMAP243X,
1894 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1895 .enable_bit = OMAP2430_EN_MCSPI3_SHIFT,
1896 .recalc = &followparent_recalc,
1897};
1898
1899static struct clk uart1_ick = {
1900 .name = "uart1_ick",
1901 .parent = &l4_ck,
1902 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1903 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1904 .enable_bit = OMAP24XX_EN_UART1_SHIFT,
1905 .recalc = &followparent_recalc,
1906};
1907
1908static struct clk uart1_fck = {
1909 .name = "uart1_fck",
1910 .parent = &func_48m_ck,
1911 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1912 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1913 .enable_bit = OMAP24XX_EN_UART1_SHIFT,
1914 .recalc = &followparent_recalc,
1915};
1916
1917static struct clk uart2_ick = {
1918 .name = "uart2_ick",
1919 .parent = &l4_ck,
1920 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1921 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1922 .enable_bit = OMAP24XX_EN_UART2_SHIFT,
1923 .recalc = &followparent_recalc,
1924};
1925
1926static struct clk uart2_fck = {
1927 .name = "uart2_fck",
1928 .parent = &func_48m_ck,
1929 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1930 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1931 .enable_bit = OMAP24XX_EN_UART2_SHIFT,
1932 .recalc = &followparent_recalc,
1933};
1934
1935static struct clk uart3_ick = {
1936 .name = "uart3_ick",
1937 .parent = &l4_ck,
1938 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1939 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1940 .enable_bit = OMAP24XX_EN_UART3_SHIFT,
1941 .recalc = &followparent_recalc,
1942};
1943
1944static struct clk uart3_fck = {
1945 .name = "uart3_fck",
1946 .parent = &func_48m_ck,
1947 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1948 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
1949 .enable_bit = OMAP24XX_EN_UART3_SHIFT,
1950 .recalc = &followparent_recalc,
1951};
1952
1953static struct clk gpios_ick = {
1954 .name = "gpios_ick",
1955 .parent = &l4_ck,
1956 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1957 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1958 .enable_bit = OMAP24XX_EN_GPIOS_SHIFT,
1959 .recalc = &followparent_recalc,
1960};
1961
1962static struct clk gpios_fck = {
1963 .name = "gpios_fck",
1964 .parent = &func_32k_ck,
1965 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1966 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1967 .enable_bit = OMAP24XX_EN_GPIOS_SHIFT,
1968 .recalc = &followparent_recalc,
1969};
1970
1971static struct clk mpu_wdt_ick = {
1972 .name = "mpu_wdt_ick",
1973 .parent = &l4_ck,
1974 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1975 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1976 .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
1977 .recalc = &followparent_recalc,
1978};
1979
1980static struct clk mpu_wdt_fck = {
1981 .name = "mpu_wdt_fck",
1982 .parent = &func_32k_ck,
1983 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1984 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1985 .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
1986 .recalc = &followparent_recalc,
1987};
1988
1989static struct clk sync_32k_ick = {
1990 .name = "sync_32k_ick",
1991 .parent = &l4_ck,
1992 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
1993 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1994 .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT,
1995 .recalc = &followparent_recalc,
1996};
1997static struct clk wdt1_ick = {
1998 .name = "wdt1_ick",
1999 .parent = &l4_ck,
2000 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2001 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2002 .enable_bit = OMAP24XX_EN_WDT1_SHIFT,
2003 .recalc = &followparent_recalc,
2004};
2005static struct clk omapctrl_ick = {
2006 .name = "omapctrl_ick",
2007 .parent = &l4_ck,
2008 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
2009 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2010 .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT,
2011 .recalc = &followparent_recalc,
2012};
2013static struct clk icr_ick = {
2014 .name = "icr_ick",
2015 .parent = &l4_ck,
2016 .flags = CLOCK_IN_OMAP243X,
2017 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2018 .enable_bit = OMAP2430_EN_ICR_SHIFT,
2019 .recalc = &followparent_recalc,
2020};
2021
2022static struct clk cam_ick = {
2023 .name = "cam_ick",
2024 .parent = &l4_ck,
2025 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2026 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2027 .enable_bit = OMAP24XX_EN_CAM_SHIFT,
2028 .recalc = &followparent_recalc,
2029};
2030
2031static struct clk cam_fck = {
2032 .name = "cam_fck",
2033 .parent = &func_96m_ck,
2034 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2035 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2036 .enable_bit = OMAP24XX_EN_CAM_SHIFT,
2037 .recalc = &followparent_recalc,
2038};
2039
2040static struct clk mailboxes_ick = {
2041 .name = "mailboxes_ick",
2042 .parent = &l4_ck,
2043 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2044 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2045 .enable_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
2046 .recalc = &followparent_recalc,
2047};
2048
2049static struct clk wdt4_ick = {
2050 .name = "wdt4_ick",
2051 .parent = &l4_ck,
2052 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2053 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2054 .enable_bit = OMAP24XX_EN_WDT4_SHIFT,
2055 .recalc = &followparent_recalc,
2056};
2057
2058static struct clk wdt4_fck = {
2059 .name = "wdt4_fck",
2060 .parent = &func_32k_ck,
2061 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2062 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2063 .enable_bit = OMAP24XX_EN_WDT4_SHIFT,
2064 .recalc = &followparent_recalc,
2065};
2066
2067static struct clk wdt3_ick = {
2068 .name = "wdt3_ick",
2069 .parent = &l4_ck,
2070 .flags = CLOCK_IN_OMAP242X,
2071 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2072 .enable_bit = OMAP2420_EN_WDT3_SHIFT,
2073 .recalc = &followparent_recalc,
2074};
2075
2076static struct clk wdt3_fck = {
2077 .name = "wdt3_fck",
2078 .parent = &func_32k_ck,
2079 .flags = CLOCK_IN_OMAP242X,
2080 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2081 .enable_bit = OMAP2420_EN_WDT3_SHIFT,
2082 .recalc = &followparent_recalc,
2083};
2084
2085static struct clk mspro_ick = {
2086 .name = "mspro_ick",
2087 .parent = &l4_ck,
2088 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2089 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2090 .enable_bit = OMAP24XX_EN_MSPRO_SHIFT,
2091 .recalc = &followparent_recalc,
2092};
2093
2094static struct clk mspro_fck = {
2095 .name = "mspro_fck",
2096 .parent = &func_96m_ck,
2097 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2098 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2099 .enable_bit = OMAP24XX_EN_MSPRO_SHIFT,
2100 .recalc = &followparent_recalc,
2101};
2102
2103static struct clk mmc_ick = {
2104 .name = "mmc_ick",
2105 .parent = &l4_ck,
2106 .flags = CLOCK_IN_OMAP242X,
2107 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2108 .enable_bit = OMAP2420_EN_MMC_SHIFT,
2109 .recalc = &followparent_recalc,
2110};
2111
2112static struct clk mmc_fck = {
2113 .name = "mmc_fck",
2114 .parent = &func_96m_ck,
2115 .flags = CLOCK_IN_OMAP242X,
2116 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2117 .enable_bit = OMAP2420_EN_MMC_SHIFT,
2118 .recalc = &followparent_recalc,
2119};
2120
2121static struct clk fac_ick = {
2122 .name = "fac_ick",
2123 .parent = &l4_ck,
2124 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2125 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2126 .enable_bit = OMAP24XX_EN_FAC_SHIFT,
2127 .recalc = &followparent_recalc,
2128};
2129
2130static struct clk fac_fck = {
2131 .name = "fac_fck",
2132 .parent = &func_12m_ck,
2133 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2134 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2135 .enable_bit = OMAP24XX_EN_FAC_SHIFT,
2136 .recalc = &followparent_recalc,
2137};
2138
2139static struct clk eac_ick = {
2140 .name = "eac_ick",
2141 .parent = &l4_ck,
2142 .flags = CLOCK_IN_OMAP242X,
2143 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2144 .enable_bit = OMAP2420_EN_EAC_SHIFT,
2145 .recalc = &followparent_recalc,
2146};
2147
2148static struct clk eac_fck = {
2149 .name = "eac_fck",
2150 .parent = &func_96m_ck,
2151 .flags = CLOCK_IN_OMAP242X,
2152 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2153 .enable_bit = OMAP2420_EN_EAC_SHIFT,
2154 .recalc = &followparent_recalc,
2155};
2156
2157static struct clk hdq_ick = {
2158 .name = "hdq_ick",
2159 .parent = &l4_ck,
2160 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2161 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2162 .enable_bit = OMAP24XX_EN_HDQ_SHIFT,
2163 .recalc = &followparent_recalc,
2164};
2165
2166static struct clk hdq_fck = {
2167 .name = "hdq_fck",
2168 .parent = &func_12m_ck,
2169 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2170 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2171 .enable_bit = OMAP24XX_EN_HDQ_SHIFT,
2172 .recalc = &followparent_recalc,
2173};
2174
2175static struct clk i2c2_ick = {
2176 .name = "i2c_ick",
2177 .id = 2,
2178 .parent = &l4_ck,
2179 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2180 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2181 .enable_bit = OMAP2420_EN_I2C2_SHIFT,
2182 .recalc = &followparent_recalc,
2183};
2184
2185static struct clk i2c2_fck = {
2186 .name = "i2c_fck",
2187 .id = 2,
2188 .parent = &func_12m_ck,
2189 .flags = CLOCK_IN_OMAP242X,
2190 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2191 .enable_bit = OMAP2420_EN_I2C2_SHIFT,
2192 .recalc = &followparent_recalc,
2193};
2194
2195static struct clk i2chs2_fck = {
2196 .name = "i2chs_fck",
2197 .id = 2,
2198 .parent = &func_96m_ck,
2199 .flags = CLOCK_IN_OMAP243X,
2200 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2201 .enable_bit = OMAP2430_EN_I2CHS2_SHIFT,
2202 .recalc = &followparent_recalc,
2203};
2204
2205static struct clk i2c1_ick = {
2206 .name = "i2c_ick",
2207 .id = 1,
2208 .parent = &l4_ck,
2209 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2210 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2211 .enable_bit = OMAP2420_EN_I2C1_SHIFT,
2212 .recalc = &followparent_recalc,
2213};
2214
2215static struct clk i2c1_fck = {
2216 .name = "i2c_fck",
2217 .id = 1,
2218 .parent = &func_12m_ck,
2219 .flags = CLOCK_IN_OMAP242X,
2220 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2221 .enable_bit = OMAP2420_EN_I2C1_SHIFT,
2222 .recalc = &followparent_recalc,
2223};
2224
2225static struct clk i2chs1_fck = {
2226 .name = "i2chs_fck",
2227 .id = 1,
2228 .parent = &func_96m_ck,
2229 .flags = CLOCK_IN_OMAP243X,
2230 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2231 .enable_bit = OMAP2430_EN_I2CHS1_SHIFT,
2232 .recalc = &followparent_recalc,
2233};
2234
2235static struct clk gpmc_fck = {
2236 .name = "gpmc_fck",
2237 .parent = &core_l3_ck,
2238 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
2239 .recalc = &followparent_recalc,
2240};
2241
2242static struct clk sdma_fck = {
2243 .name = "sdma_fck",
2244 .parent = &core_l3_ck,
2245 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2246 .recalc = &followparent_recalc,
2247};
2248
2249static struct clk sdma_ick = {
2250 .name = "sdma_ick",
2251 .parent = &l4_ck,
2252 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
2253 .recalc = &followparent_recalc,
2254};
2255
2256static struct clk vlynq_ick = {
2257 .name = "vlynq_ick",
2258 .parent = &core_l3_ck,
2259 .flags = CLOCK_IN_OMAP242X,
2260 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2261 .enable_bit = OMAP2420_EN_VLYNQ_SHIFT,
2262 .recalc = &followparent_recalc,
2263};
2264
2265static const struct clksel_rate vlynq_fck_96m_rates[] = {
2266 { .div = 1, .val = 0, .flags = RATE_IN_242X | DEFAULT_RATE },
2267 { .div = 0 }
2268};
2269
2270static const struct clksel_rate vlynq_fck_core_rates[] = {
2271 { .div = 1, .val = 1, .flags = RATE_IN_242X },
2272 { .div = 2, .val = 2, .flags = RATE_IN_242X },
2273 { .div = 3, .val = 3, .flags = RATE_IN_242X },
2274 { .div = 4, .val = 4, .flags = RATE_IN_242X },
2275 { .div = 6, .val = 6, .flags = RATE_IN_242X },
2276 { .div = 8, .val = 8, .flags = RATE_IN_242X },
2277 { .div = 9, .val = 9, .flags = RATE_IN_242X },
2278 { .div = 12, .val = 12, .flags = RATE_IN_242X },
2279 { .div = 16, .val = 16, .flags = RATE_IN_242X | DEFAULT_RATE },
2280 { .div = 18, .val = 18, .flags = RATE_IN_242X },
2281 { .div = 0 }
2282};
2283
2284static const struct clksel vlynq_fck_clksel[] = {
2285 { .parent = &func_96m_ck, .rates = vlynq_fck_96m_rates },
2286 { .parent = &core_ck, .rates = vlynq_fck_core_rates },
2287 { .parent = NULL }
2288};
2289
2290static struct clk vlynq_fck = {
2291 .name = "vlynq_fck",
2292 .parent = &func_96m_ck,
2293 .flags = CLOCK_IN_OMAP242X | DELAYED_APP,
2294 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2295 .enable_bit = OMAP2420_EN_VLYNQ_SHIFT,
2296 .init = &omap2_init_clksel_parent,
2297 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
2298 .clksel_mask = OMAP2420_CLKSEL_VLYNQ_MASK,
2299 .clksel = vlynq_fck_clksel,
2300 .recalc = &omap2_clksel_recalc,
2301 .round_rate = &omap2_clksel_round_rate,
2302 .set_rate = &omap2_clksel_set_rate
2303};
2304
2305static struct clk sdrc_ick = {
2306 .name = "sdrc_ick",
2307 .parent = &l4_ck,
2308 .flags = CLOCK_IN_OMAP243X | ENABLE_ON_INIT,
2309 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
2310 .enable_bit = OMAP2430_EN_SDRC_SHIFT,
2311 .recalc = &followparent_recalc,
2312};
2313
2314static struct clk des_ick = {
2315 .name = "des_ick",
2316 .parent = &l4_ck,
2317 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2318 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2319 .enable_bit = OMAP24XX_EN_DES_SHIFT,
2320 .recalc = &followparent_recalc,
2321};
2322
2323static struct clk sha_ick = {
2324 .name = "sha_ick",
2325 .parent = &l4_ck,
2326 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2327 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2328 .enable_bit = OMAP24XX_EN_SHA_SHIFT,
2329 .recalc = &followparent_recalc,
2330};
2331
2332static struct clk rng_ick = {
2333 .name = "rng_ick",
2334 .parent = &l4_ck,
2335 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2336 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2337 .enable_bit = OMAP24XX_EN_RNG_SHIFT,
2338 .recalc = &followparent_recalc,
2339};
2340
2341static struct clk aes_ick = {
2342 .name = "aes_ick",
2343 .parent = &l4_ck,
2344 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2345 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2346 .enable_bit = OMAP24XX_EN_AES_SHIFT,
2347 .recalc = &followparent_recalc,
2348};
2349
2350static struct clk pka_ick = {
2351 .name = "pka_ick",
2352 .parent = &l4_ck,
2353 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2354 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
2355 .enable_bit = OMAP24XX_EN_PKA_SHIFT,
2356 .recalc = &followparent_recalc,
2357};
2358
2359static struct clk usb_fck = {
2360 .name = "usb_fck",
2361 .parent = &func_48m_ck,
2362 .flags = CLOCK_IN_OMAP243X | CLOCK_IN_OMAP242X,
2363 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2364 .enable_bit = OMAP24XX_EN_USB_SHIFT,
2365 .recalc = &followparent_recalc,
2366};
2367
2368static struct clk usbhs_ick = {
2369 .name = "usbhs_ick",
2370 .parent = &core_l3_ck,
2371 .flags = CLOCK_IN_OMAP243X,
2372 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2373 .enable_bit = OMAP2430_EN_USBHS_SHIFT,
2374 .recalc = &followparent_recalc,
2375};
2376
2377static struct clk mmchs1_ick = {
2378 .name = "mmchs_ick",
2379 .id = 1,
2380 .parent = &l4_ck,
2381 .flags = CLOCK_IN_OMAP243X,
2382 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2383 .enable_bit = OMAP2430_EN_MMCHS1_SHIFT,
2384 .recalc = &followparent_recalc,
2385};
2386
2387static struct clk mmchs1_fck = {
2388 .name = "mmchs_fck",
2389 .id = 1,
2390 .parent = &func_96m_ck,
2391 .flags = CLOCK_IN_OMAP243X,
2392 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2393 .enable_bit = OMAP2430_EN_MMCHS1_SHIFT,
2394 .recalc = &followparent_recalc,
2395};
2396
2397static struct clk mmchs2_ick = {
2398 .name = "mmchs_ick",
2399 .id = 2,
2400 .parent = &l4_ck,
2401 .flags = CLOCK_IN_OMAP243X,
2402 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2403 .enable_bit = OMAP2430_EN_MMCHS2_SHIFT,
2404 .recalc = &followparent_recalc,
2405};
2406
2407static struct clk mmchs2_fck = {
2408 .name = "mmchs_fck",
2409 .id = 2,
2410 .parent = &func_96m_ck,
2411 .flags = CLOCK_IN_OMAP243X,
2412 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2413 .enable_bit = OMAP2430_EN_MMCHS2_SHIFT,
2414 .recalc = &followparent_recalc,
2415};
2416
2417static struct clk gpio5_ick = {
2418 .name = "gpio5_ick",
2419 .parent = &l4_ck,
2420 .flags = CLOCK_IN_OMAP243X,
2421 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2422 .enable_bit = OMAP2430_EN_GPIO5_SHIFT,
2423 .recalc = &followparent_recalc,
2424};
2425
2426static struct clk gpio5_fck = {
2427 .name = "gpio5_fck",
2428 .parent = &func_32k_ck,
2429 .flags = CLOCK_IN_OMAP243X,
2430 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2431 .enable_bit = OMAP2430_EN_GPIO5_SHIFT,
2432 .recalc = &followparent_recalc,
2433};
2434
2435static struct clk mdm_intc_ick = {
2436 .name = "mdm_intc_ick",
2437 .parent = &l4_ck,
2438 .flags = CLOCK_IN_OMAP243X,
2439 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2440 .enable_bit = OMAP2430_EN_MDM_INTC_SHIFT,
2441 .recalc = &followparent_recalc,
2442};
2443
2444static struct clk mmchsdb1_fck = {
2445 .name = "mmchsdb_fck",
2446 .id = 1,
2447 .parent = &func_32k_ck,
2448 .flags = CLOCK_IN_OMAP243X,
2449 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2450 .enable_bit = OMAP2430_EN_MMCHSDB1_SHIFT,
2451 .recalc = &followparent_recalc,
2452};
2453
2454static struct clk mmchsdb2_fck = {
2455 .name = "mmchsdb_fck",
2456 .id = 2,
2457 .parent = &func_32k_ck,
2458 .flags = CLOCK_IN_OMAP243X,
2459 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
2460 .enable_bit = OMAP2430_EN_MMCHSDB2_SHIFT,
2461 .recalc = &followparent_recalc,
2462};
2463
2464/*
2465 * This clock is a composite clock which does entire set changes then
2466 * forces a rebalance. It keys on the MPU speed, but it really could
2467 * be any key speed part of a set in the rate table.
2468 *
2469 * to really change a set, you need memory table sets which get changed
2470 * in sram, pre-notifiers & post notifiers, changing the top set, without
2471 * having low level display recalc's won't work... this is why dpm notifiers
2472 * work, isr's off, walk a list of clocks already _off_ and not messing with
2473 * the bus.
2474 *
2475 * This clock should have no parent. It embodies the entire upper level
2476 * active set. A parent will mess up some of the init also.
2477 */
2478static struct clk virt_prcm_set = {
2479 .name = "virt_prcm_set",
2480 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
2481 VIRTUAL_CLOCK | ALWAYS_ENABLED | DELAYED_APP,
2482 .parent = &mpu_ck, /* Indexed by mpu speed, no parent */
2483 .recalc = &omap2_table_mpu_recalc, /* sets are keyed on mpu rate */
2484 .set_rate = &omap2_select_table_rate,
2485 .round_rate = &omap2_round_to_table_rate,
2486};
2487
2488static struct clk *onchip_24xx_clks[] __initdata = {
2489 /* external root sources */
2490 &func_32k_ck,
2491 &osc_ck,
2492 &sys_ck,
2493 &alt_ck,
2494 /* internal analog sources */
2495 &dpll_ck,
2496 &apll96_ck,
2497 &apll54_ck,
2498 /* internal prcm root sources */
2499 &func_54m_ck,
2500 &core_ck,
2501 &func_96m_ck,
2502 &func_48m_ck,
2503 &func_12m_ck,
2504 &wdt1_osc_ck,
2505 &sys_clkout_src,
2506 &sys_clkout,
2507 &sys_clkout2_src,
2508 &sys_clkout2,
2509 &emul_ck,
2510 /* mpu domain clocks */
2511 &mpu_ck,
2512 /* dsp domain clocks */
2513 &dsp_fck,
2514 &dsp_irate_ick,
2515 &dsp_ick, /* 242x */
2516 &iva2_1_ick, /* 243x */
2517 &iva1_ifck, /* 242x */
2518 &iva1_mpu_int_ifck, /* 242x */
2519 /* GFX domain clocks */
2520 &gfx_3d_fck,
2521 &gfx_2d_fck,
2522 &gfx_ick,
2523 /* Modem domain clocks */
2524 &mdm_ick,
2525 &mdm_osc_ck,
2526 /* DSS domain clocks */
2527 &dss_ick,
2528 &dss1_fck,
2529 &dss2_fck,
2530 &dss_54m_fck,
2531 /* L3 domain clocks */
2532 &core_l3_ck,
2533 &ssi_ssr_sst_fck,
2534 &usb_l4_ick,
2535 /* L4 domain clocks */
2536 &l4_ck, /* used as both core_l4 and wu_l4 */
2537 &ssi_l4_ick,
2538 /* virtual meta-group clock */
2539 &virt_prcm_set,
2540 /* general l4 interface ck, multi-parent functional clk */
2541 &gpt1_ick,
2542 &gpt1_fck,
2543 &gpt2_ick,
2544 &gpt2_fck,
2545 &gpt3_ick,
2546 &gpt3_fck,
2547 &gpt4_ick,
2548 &gpt4_fck,
2549 &gpt5_ick,
2550 &gpt5_fck,
2551 &gpt6_ick,
2552 &gpt6_fck,
2553 &gpt7_ick,
2554 &gpt7_fck,
2555 &gpt8_ick,
2556 &gpt8_fck,
2557 &gpt9_ick,
2558 &gpt9_fck,
2559 &gpt10_ick,
2560 &gpt10_fck,
2561 &gpt11_ick,
2562 &gpt11_fck,
2563 &gpt12_ick,
2564 &gpt12_fck,
2565 &mcbsp1_ick,
2566 &mcbsp1_fck,
2567 &mcbsp2_ick,
2568 &mcbsp2_fck,
2569 &mcbsp3_ick,
2570 &mcbsp3_fck,
2571 &mcbsp4_ick,
2572 &mcbsp4_fck,
2573 &mcbsp5_ick,
2574 &mcbsp5_fck,
2575 &mcspi1_ick,
2576 &mcspi1_fck,
2577 &mcspi2_ick,
2578 &mcspi2_fck,
2579 &mcspi3_ick,
2580 &mcspi3_fck,
2581 &uart1_ick,
2582 &uart1_fck,
2583 &uart2_ick,
2584 &uart2_fck,
2585 &uart3_ick,
2586 &uart3_fck,
2587 &gpios_ick,
2588 &gpios_fck,
2589 &mpu_wdt_ick,
2590 &mpu_wdt_fck,
2591 &sync_32k_ick,
2592 &wdt1_ick,
2593 &omapctrl_ick,
2594 &icr_ick,
2595 &cam_fck,
2596 &cam_ick,
2597 &mailboxes_ick,
2598 &wdt4_ick,
2599 &wdt4_fck,
2600 &wdt3_ick,
2601 &wdt3_fck,
2602 &mspro_ick,
2603 &mspro_fck,
2604 &mmc_ick,
2605 &mmc_fck,
2606 &fac_ick,
2607 &fac_fck,
2608 &eac_ick,
2609 &eac_fck,
2610 &hdq_ick,
2611 &hdq_fck,
2612 &i2c1_ick,
2613 &i2c1_fck,
2614 &i2chs1_fck,
2615 &i2c2_ick,
2616 &i2c2_fck,
2617 &i2chs2_fck,
2618 &gpmc_fck,
2619 &sdma_fck,
2620 &sdma_ick,
2621 &vlynq_ick,
2622 &vlynq_fck,
2623 &sdrc_ick,
2624 &des_ick,
2625 &sha_ick,
2626 &rng_ick,
2627 &aes_ick,
2628 &pka_ick,
2629 &usb_fck,
2630 &usbhs_ick,
2631 &mmchs1_ick,
2632 &mmchs1_fck,
2633 &mmchs2_ick,
2634 &mmchs2_fck,
2635 &gpio5_ick,
2636 &gpio5_fck,
2637 &mdm_intc_ick,
2638 &mmchsdb1_fck,
2639 &mmchsdb2_fck,
2640};
2641
2642#endif
2643
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
new file mode 100644
index 000000000000..b42bdd6079a5
--- /dev/null
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -0,0 +1,235 @@
1/*
2 * OMAP3-specific clock framework functions
3 *
4 * Copyright (C) 2007 Texas Instruments, Inc.
5 * Copyright (C) 2007 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 *
9 * Parts of this code are based on code written by
10 * Richard Woodruff, Tony Lindgren, Tuukka Tikkanen, Karthik Dasu
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#undef DEBUG
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
27#include <asm/arch/clock.h>
28#include <asm/arch/sram.h>
29#include <asm/div64.h>
30#include <asm/bitops.h>
31
32#include "memory.h"
33#include "clock.h"
34#include "clock34xx.h"
35#include "prm.h"
36#include "prm-regbits-34xx.h"
37#include "cm.h"
38#include "cm-regbits-34xx.h"
39
40/* CM_CLKEN_PLL*.EN* bit values */
41#define DPLL_LOCKED 0x7
42
43/**
44 * omap3_dpll_recalc - recalculate DPLL rate
45 * @clk: DPLL struct clk
46 *
47 * Recalculate and propagate the DPLL rate.
48 */
49static void omap3_dpll_recalc(struct clk *clk)
50{
51 clk->rate = omap2_get_dpll_rate(clk);
52
53 propagate_rate(clk);
54}
55
56/**
57 * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
58 * @clk: DPLL output struct clk
59 *
60 * Using parent clock DPLL data, look up DPLL state. If locked, set our
61 * rate to the dpll_clk * 2; otherwise, just use dpll_clk.
62 */
63static void omap3_clkoutx2_recalc(struct clk *clk)
64{
65 const struct dpll_data *dd;
66 u32 v;
67 struct clk *pclk;
68
69 /* Walk up the parents of clk, looking for a DPLL */
70 pclk = clk->parent;
71 while (pclk && !pclk->dpll_data)
72 pclk = pclk->parent;
73
74 /* clk does not have a DPLL as a parent? */
75 WARN_ON(!pclk);
76
77 dd = pclk->dpll_data;
78
79 WARN_ON(!dd->control_reg || !dd->enable_mask);
80
81 v = __raw_readl(dd->control_reg) & dd->enable_mask;
82 v >>= __ffs(dd->enable_mask);
83 if (v != DPLL_LOCKED)
84 clk->rate = clk->parent->rate;
85 else
86 clk->rate = clk->parent->rate * 2;
87
88 if (clk->flags & RATE_PROPAGATES)
89 propagate_rate(clk);
90}
91
92/*
93 * As it is structured now, this will prevent an OMAP2/3 multiboot
94 * kernel from compiling. This will need further attention.
95 */
96#if defined(CONFIG_ARCH_OMAP3)
97
98static struct clk_functions omap2_clk_functions = {
99 .clk_enable = omap2_clk_enable,
100 .clk_disable = omap2_clk_disable,
101 .clk_round_rate = omap2_clk_round_rate,
102 .clk_set_rate = omap2_clk_set_rate,
103 .clk_set_parent = omap2_clk_set_parent,
104 .clk_disable_unused = omap2_clk_disable_unused,
105};
106
107/*
108 * Set clocks for bypass mode for reboot to work.
109 */
110void omap2_clk_prepare_for_reboot(void)
111{
112 /* REVISIT: Not ready for 343x */
113#if 0
114 u32 rate;
115
116 if (vclk == NULL || sclk == NULL)
117 return;
118
119 rate = clk_get_rate(sclk);
120 clk_set_rate(vclk, rate);
121#endif
122}
123
124/* REVISIT: Move this init stuff out into clock.c */
125
126/*
127 * Switch the MPU rate if specified on cmdline.
128 * We cannot do this early until cmdline is parsed.
129 */
130static int __init omap2_clk_arch_init(void)
131{
132 if (!mpurate)
133 return -EINVAL;
134
135 /* REVISIT: not yet ready for 343x */
136#if 0
137 if (omap2_select_table_rate(&virt_prcm_set, mpurate))
138 printk(KERN_ERR "Could not find matching MPU rate\n");
139#endif
140
141 recalculate_root_clocks();
142
143 printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL3/MPU): "
144 "%ld.%01ld/%ld/%ld MHz\n",
145 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
146 (core_ck.rate / 1000000), (dpll1_fck.rate / 1000000)) ;
147
148 return 0;
149}
150arch_initcall(omap2_clk_arch_init);
151
152int __init omap2_clk_init(void)
153{
154 /* struct prcm_config *prcm; */
155 struct clk **clkp;
156 /* u32 clkrate; */
157 u32 cpu_clkflg;
158
159 /* REVISIT: Ultimately this will be used for multiboot */
160#if 0
161 if (cpu_is_omap242x()) {
162 cpu_mask = RATE_IN_242X;
163 cpu_clkflg = CLOCK_IN_OMAP242X;
164 clkp = onchip_24xx_clks;
165 } else if (cpu_is_omap2430()) {
166 cpu_mask = RATE_IN_243X;
167 cpu_clkflg = CLOCK_IN_OMAP243X;
168 clkp = onchip_24xx_clks;
169 }
170#endif
171 if (cpu_is_omap34xx()) {
172 cpu_mask = RATE_IN_343X;
173 cpu_clkflg = CLOCK_IN_OMAP343X;
174 clkp = onchip_34xx_clks;
175
176 /*
177 * Update this if there are further clock changes between ES2
178 * and production parts
179 */
180 if (is_sil_rev_equal_to(OMAP3430_REV_ES1_0)) {
181 /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */
182 cpu_clkflg |= CLOCK_IN_OMAP3430ES1;
183 } else {
184 cpu_mask |= RATE_IN_3430ES2;
185 cpu_clkflg |= CLOCK_IN_OMAP3430ES2;
186 }
187 }
188
189 clk_init(&omap2_clk_functions);
190
191 for (clkp = onchip_34xx_clks;
192 clkp < onchip_34xx_clks + ARRAY_SIZE(onchip_34xx_clks);
193 clkp++) {
194 if ((*clkp)->flags & cpu_clkflg)
195 clk_register(*clkp);
196 }
197
198 /* REVISIT: Not yet ready for OMAP3 */
199#if 0
200 /* Check the MPU rate set by bootloader */
201 clkrate = omap2_get_dpll_rate_24xx(&dpll_ck);
202 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
203 if (!(prcm->flags & cpu_mask))
204 continue;
205 if (prcm->xtal_speed != sys_ck.rate)
206 continue;
207 if (prcm->dpll_speed <= clkrate)
208 break;
209 }
210 curr_prcm_set = prcm;
211#endif
212
213 recalculate_root_clocks();
214
215 printk(KERN_INFO "Clocking rate (Crystal/DPLL/ARM core): "
216 "%ld.%01ld/%ld/%ld MHz\n",
217 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
218 (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
219
220 /*
221 * Only enable those clocks we will need, let the drivers
222 * enable other clocks as necessary
223 */
224 clk_enable_init_clocks();
225
226 /* Avoid sleeping during omap2_clk_prepare_for_reboot() */
227 /* REVISIT: not yet ready for 343x */
228#if 0
229 vclk = clk_get(NULL, "virt_prcm_set");
230 sclk = clk_get(NULL, "sys_ck");
231#endif
232 return 0;
233}
234
235#endif
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
new file mode 100644
index 000000000000..cf4644a94b9b
--- /dev/null
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -0,0 +1,3009 @@
1/*
2 * OMAP3 clock framework
3 *
4 * Virtual clocks are introduced as a convenient tools.
5 * They are sources for other clocks and not supposed
6 * to be requested from drivers directly.
7 *
8 * Copyright (C) 2007-2008 Texas Instruments, Inc.
9 * Copyright (C) 2007-2008 Nokia Corporation
10 *
11 * Written by Paul Walmsley
12 */
13
14#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
15#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
16
17#include <asm/arch/control.h>
18
19#include "clock.h"
20#include "cm.h"
21#include "cm-regbits-34xx.h"
22#include "prm.h"
23#include "prm-regbits-34xx.h"
24
25static void omap3_dpll_recalc(struct clk *clk);
26static void omap3_clkoutx2_recalc(struct clk *clk);
27
28/*
29 * DPLL1 supplies clock to the MPU.
30 * DPLL2 supplies clock to the IVA2.
31 * DPLL3 supplies CORE domain clocks.
32 * DPLL4 supplies peripheral clocks.
33 * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
34 */
35
36/* PRM CLOCKS */
37
38/* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
39static struct clk omap_32k_fck = {
40 .name = "omap_32k_fck",
41 .rate = 32768,
42 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
43 ALWAYS_ENABLED,
44 .recalc = &propagate_rate,
45};
46
47static struct clk secure_32k_fck = {
48 .name = "secure_32k_fck",
49 .rate = 32768,
50 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
51 ALWAYS_ENABLED,
52 .recalc = &propagate_rate,
53};
54
55/* Virtual source clocks for osc_sys_ck */
56static struct clk virt_12m_ck = {
57 .name = "virt_12m_ck",
58 .rate = 12000000,
59 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
60 ALWAYS_ENABLED,
61 .recalc = &propagate_rate,
62};
63
64static struct clk virt_13m_ck = {
65 .name = "virt_13m_ck",
66 .rate = 13000000,
67 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
68 ALWAYS_ENABLED,
69 .recalc = &propagate_rate,
70};
71
72static struct clk virt_16_8m_ck = {
73 .name = "virt_16_8m_ck",
74 .rate = 16800000,
75 .flags = CLOCK_IN_OMAP3430ES2 | RATE_FIXED | RATE_PROPAGATES |
76 ALWAYS_ENABLED,
77 .recalc = &propagate_rate,
78};
79
80static struct clk virt_19_2m_ck = {
81 .name = "virt_19_2m_ck",
82 .rate = 19200000,
83 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
84 ALWAYS_ENABLED,
85 .recalc = &propagate_rate,
86};
87
88static struct clk virt_26m_ck = {
89 .name = "virt_26m_ck",
90 .rate = 26000000,
91 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
92 ALWAYS_ENABLED,
93 .recalc = &propagate_rate,
94};
95
96static struct clk virt_38_4m_ck = {
97 .name = "virt_38_4m_ck",
98 .rate = 38400000,
99 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
100 ALWAYS_ENABLED,
101 .recalc = &propagate_rate,
102};
103
104static const struct clksel_rate osc_sys_12m_rates[] = {
105 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
106 { .div = 0 }
107};
108
109static const struct clksel_rate osc_sys_13m_rates[] = {
110 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
111 { .div = 0 }
112};
113
114static const struct clksel_rate osc_sys_16_8m_rates[] = {
115 { .div = 1, .val = 5, .flags = RATE_IN_3430ES2 | DEFAULT_RATE },
116 { .div = 0 }
117};
118
119static const struct clksel_rate osc_sys_19_2m_rates[] = {
120 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
121 { .div = 0 }
122};
123
124static const struct clksel_rate osc_sys_26m_rates[] = {
125 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
126 { .div = 0 }
127};
128
129static const struct clksel_rate osc_sys_38_4m_rates[] = {
130 { .div = 1, .val = 4, .flags = RATE_IN_343X | DEFAULT_RATE },
131 { .div = 0 }
132};
133
134static const struct clksel osc_sys_clksel[] = {
135 { .parent = &virt_12m_ck, .rates = osc_sys_12m_rates },
136 { .parent = &virt_13m_ck, .rates = osc_sys_13m_rates },
137 { .parent = &virt_16_8m_ck, .rates = osc_sys_16_8m_rates },
138 { .parent = &virt_19_2m_ck, .rates = osc_sys_19_2m_rates },
139 { .parent = &virt_26m_ck, .rates = osc_sys_26m_rates },
140 { .parent = &virt_38_4m_ck, .rates = osc_sys_38_4m_rates },
141 { .parent = NULL },
142};
143
144/* Oscillator clock */
145/* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
146static struct clk osc_sys_ck = {
147 .name = "osc_sys_ck",
148 .init = &omap2_init_clksel_parent,
149 .clksel_reg = OMAP3430_PRM_CLKSEL,
150 .clksel_mask = OMAP3430_SYS_CLKIN_SEL_MASK,
151 .clksel = osc_sys_clksel,
152 /* REVISIT: deal with autoextclkmode? */
153 .flags = CLOCK_IN_OMAP343X | RATE_FIXED | RATE_PROPAGATES |
154 ALWAYS_ENABLED,
155 .recalc = &omap2_clksel_recalc,
156};
157
158static const struct clksel_rate div2_rates[] = {
159 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
160 { .div = 2, .val = 2, .flags = RATE_IN_343X },
161 { .div = 0 }
162};
163
164static const struct clksel sys_clksel[] = {
165 { .parent = &osc_sys_ck, .rates = div2_rates },
166 { .parent = NULL }
167};
168
169/* Latency: this clock is only enabled after PRM_CLKSETUP.SETUP_TIME */
170/* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
171static struct clk sys_ck = {
172 .name = "sys_ck",
173 .parent = &osc_sys_ck,
174 .init = &omap2_init_clksel_parent,
175 .clksel_reg = OMAP3430_PRM_CLKSRC_CTRL,
176 .clksel_mask = OMAP_SYSCLKDIV_MASK,
177 .clksel = sys_clksel,
178 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
179 .recalc = &omap2_clksel_recalc,
180};
181
182static struct clk sys_altclk = {
183 .name = "sys_altclk",
184 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
185 .recalc = &propagate_rate,
186};
187
188/* Optional external clock input for some McBSPs */
189static struct clk mcbsp_clks = {
190 .name = "mcbsp_clks",
191 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
192 .recalc = &propagate_rate,
193};
194
195/* PRM EXTERNAL CLOCK OUTPUT */
196
197static struct clk sys_clkout1 = {
198 .name = "sys_clkout1",
199 .parent = &osc_sys_ck,
200 .enable_reg = OMAP3430_PRM_CLKOUT_CTRL,
201 .enable_bit = OMAP3430_CLKOUT_EN_SHIFT,
202 .flags = CLOCK_IN_OMAP343X,
203 .recalc = &followparent_recalc,
204};
205
206/* DPLLS */
207
208/* CM CLOCKS */
209
210static const struct clksel_rate dpll_bypass_rates[] = {
211 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
212 { .div = 0 }
213};
214
215static const struct clksel_rate dpll_locked_rates[] = {
216 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
217 { .div = 0 }
218};
219
220static const struct clksel_rate div16_dpll_rates[] = {
221 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
222 { .div = 2, .val = 2, .flags = RATE_IN_343X },
223 { .div = 3, .val = 3, .flags = RATE_IN_343X },
224 { .div = 4, .val = 4, .flags = RATE_IN_343X },
225 { .div = 5, .val = 5, .flags = RATE_IN_343X },
226 { .div = 6, .val = 6, .flags = RATE_IN_343X },
227 { .div = 7, .val = 7, .flags = RATE_IN_343X },
228 { .div = 8, .val = 8, .flags = RATE_IN_343X },
229 { .div = 9, .val = 9, .flags = RATE_IN_343X },
230 { .div = 10, .val = 10, .flags = RATE_IN_343X },
231 { .div = 11, .val = 11, .flags = RATE_IN_343X },
232 { .div = 12, .val = 12, .flags = RATE_IN_343X },
233 { .div = 13, .val = 13, .flags = RATE_IN_343X },
234 { .div = 14, .val = 14, .flags = RATE_IN_343X },
235 { .div = 15, .val = 15, .flags = RATE_IN_343X },
236 { .div = 16, .val = 16, .flags = RATE_IN_343X },
237 { .div = 0 }
238};
239
240/* DPLL1 */
241/* MPU clock source */
242/* Type: DPLL */
243static const struct dpll_data dpll1_dd = {
244 .mult_div1_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
245 .mult_mask = OMAP3430_MPU_DPLL_MULT_MASK,
246 .div1_mask = OMAP3430_MPU_DPLL_DIV_MASK,
247 .control_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL),
248 .enable_mask = OMAP3430_EN_MPU_DPLL_MASK,
249 .auto_recal_bit = OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT,
250 .recal_en_bit = OMAP3430_MPU_DPLL_RECAL_EN_SHIFT,
251 .recal_st_bit = OMAP3430_MPU_DPLL_ST_SHIFT,
252};
253
254static struct clk dpll1_ck = {
255 .name = "dpll1_ck",
256 .parent = &sys_ck,
257 .dpll_data = &dpll1_dd,
258 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
259 .recalc = &omap3_dpll_recalc,
260};
261
262/*
263 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
264 * DPLL isn't bypassed.
265 */
266static struct clk dpll1_x2_ck = {
267 .name = "dpll1_x2_ck",
268 .parent = &dpll1_ck,
269 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
270 PARENT_CONTROLS_CLOCK,
271 .recalc = &omap3_clkoutx2_recalc,
272};
273
274/* On DPLL1, unlike other DPLLs, the divider is downstream from CLKOUTX2 */
275static const struct clksel div16_dpll1_x2m2_clksel[] = {
276 { .parent = &dpll1_x2_ck, .rates = div16_dpll_rates },
277 { .parent = NULL }
278};
279
280/*
281 * Does not exist in the TRM - needed to separate the M2 divider from
282 * bypass selection in mpu_ck
283 */
284static struct clk dpll1_x2m2_ck = {
285 .name = "dpll1_x2m2_ck",
286 .parent = &dpll1_x2_ck,
287 .init = &omap2_init_clksel_parent,
288 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
289 .clksel_mask = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
290 .clksel = div16_dpll1_x2m2_clksel,
291 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
292 PARENT_CONTROLS_CLOCK,
293 .recalc = &omap2_clksel_recalc,
294};
295
296/* DPLL2 */
297/* IVA2 clock source */
298/* Type: DPLL */
299
300static const struct dpll_data dpll2_dd = {
301 .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
302 .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK,
303 .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK,
304 .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
305 .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK,
306 .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
307 .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
308 .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
309};
310
311static struct clk dpll2_ck = {
312 .name = "dpll2_ck",
313 .parent = &sys_ck,
314 .dpll_data = &dpll2_dd,
315 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
316 .recalc = &omap3_dpll_recalc,
317};
318
319static const struct clksel div16_dpll2_m2x2_clksel[] = {
320 { .parent = &dpll2_ck, .rates = div16_dpll_rates },
321 { .parent = NULL }
322};
323
324/*
325 * The TRM is conflicted on whether IVA2 clock comes from DPLL2 CLKOUT
326 * or CLKOUTX2. CLKOUT seems most plausible.
327 */
328static struct clk dpll2_m2_ck = {
329 .name = "dpll2_m2_ck",
330 .parent = &dpll2_ck,
331 .init = &omap2_init_clksel_parent,
332 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
333 OMAP3430_CM_CLKSEL2_PLL),
334 .clksel_mask = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
335 .clksel = div16_dpll2_m2x2_clksel,
336 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
337 PARENT_CONTROLS_CLOCK,
338 .recalc = &omap2_clksel_recalc,
339};
340
341/* DPLL3 */
342/* Source clock for all interfaces and for some device fclks */
343/* Type: DPLL */
344static const struct dpll_data dpll3_dd = {
345 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
346 .mult_mask = OMAP3430_CORE_DPLL_MULT_MASK,
347 .div1_mask = OMAP3430_CORE_DPLL_DIV_MASK,
348 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
349 .enable_mask = OMAP3430_EN_CORE_DPLL_MASK,
350 .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT,
351 .recal_en_bit = OMAP3430_CORE_DPLL_RECAL_EN_SHIFT,
352 .recal_st_bit = OMAP3430_CORE_DPLL_ST_SHIFT,
353};
354
355static struct clk dpll3_ck = {
356 .name = "dpll3_ck",
357 .parent = &sys_ck,
358 .dpll_data = &dpll3_dd,
359 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
360 .recalc = &omap3_dpll_recalc,
361};
362
363/*
364 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
365 * DPLL isn't bypassed
366 */
367static struct clk dpll3_x2_ck = {
368 .name = "dpll3_x2_ck",
369 .parent = &dpll3_ck,
370 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
371 PARENT_CONTROLS_CLOCK,
372 .recalc = &omap3_clkoutx2_recalc,
373};
374
375static const struct clksel_rate div31_dpll3_rates[] = {
376 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
377 { .div = 2, .val = 2, .flags = RATE_IN_343X },
378 { .div = 3, .val = 3, .flags = RATE_IN_3430ES2 },
379 { .div = 4, .val = 4, .flags = RATE_IN_3430ES2 },
380 { .div = 5, .val = 5, .flags = RATE_IN_3430ES2 },
381 { .div = 6, .val = 6, .flags = RATE_IN_3430ES2 },
382 { .div = 7, .val = 7, .flags = RATE_IN_3430ES2 },
383 { .div = 8, .val = 8, .flags = RATE_IN_3430ES2 },
384 { .div = 9, .val = 9, .flags = RATE_IN_3430ES2 },
385 { .div = 10, .val = 10, .flags = RATE_IN_3430ES2 },
386 { .div = 11, .val = 11, .flags = RATE_IN_3430ES2 },
387 { .div = 12, .val = 12, .flags = RATE_IN_3430ES2 },
388 { .div = 13, .val = 13, .flags = RATE_IN_3430ES2 },
389 { .div = 14, .val = 14, .flags = RATE_IN_3430ES2 },
390 { .div = 15, .val = 15, .flags = RATE_IN_3430ES2 },
391 { .div = 16, .val = 16, .flags = RATE_IN_3430ES2 },
392 { .div = 17, .val = 17, .flags = RATE_IN_3430ES2 },
393 { .div = 18, .val = 18, .flags = RATE_IN_3430ES2 },
394 { .div = 19, .val = 19, .flags = RATE_IN_3430ES2 },
395 { .div = 20, .val = 20, .flags = RATE_IN_3430ES2 },
396 { .div = 21, .val = 21, .flags = RATE_IN_3430ES2 },
397 { .div = 22, .val = 22, .flags = RATE_IN_3430ES2 },
398 { .div = 23, .val = 23, .flags = RATE_IN_3430ES2 },
399 { .div = 24, .val = 24, .flags = RATE_IN_3430ES2 },
400 { .div = 25, .val = 25, .flags = RATE_IN_3430ES2 },
401 { .div = 26, .val = 26, .flags = RATE_IN_3430ES2 },
402 { .div = 27, .val = 27, .flags = RATE_IN_3430ES2 },
403 { .div = 28, .val = 28, .flags = RATE_IN_3430ES2 },
404 { .div = 29, .val = 29, .flags = RATE_IN_3430ES2 },
405 { .div = 30, .val = 30, .flags = RATE_IN_3430ES2 },
406 { .div = 31, .val = 31, .flags = RATE_IN_3430ES2 },
407 { .div = 0 },
408};
409
410static const struct clksel div31_dpll3m2_clksel[] = {
411 { .parent = &dpll3_ck, .rates = div31_dpll3_rates },
412 { .parent = NULL }
413};
414
415/*
416 * DPLL3 output M2
417 * REVISIT: This DPLL output divider must be changed in SRAM, so until
418 * that code is ready, this should remain a 'read-only' clksel clock.
419 */
420static struct clk dpll3_m2_ck = {
421 .name = "dpll3_m2_ck",
422 .parent = &dpll3_ck,
423 .init = &omap2_init_clksel_parent,
424 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
425 .clksel_mask = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
426 .clksel = div31_dpll3m2_clksel,
427 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
428 PARENT_CONTROLS_CLOCK,
429 .recalc = &omap2_clksel_recalc,
430};
431
432static const struct clksel core_ck_clksel[] = {
433 { .parent = &sys_ck, .rates = dpll_bypass_rates },
434 { .parent = &dpll3_m2_ck, .rates = dpll_locked_rates },
435 { .parent = NULL }
436};
437
438static struct clk core_ck = {
439 .name = "core_ck",
440 .init = &omap2_init_clksel_parent,
441 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
442 .clksel_mask = OMAP3430_ST_CORE_CLK,
443 .clksel = core_ck_clksel,
444 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
445 PARENT_CONTROLS_CLOCK,
446 .recalc = &omap2_clksel_recalc,
447};
448
449static const struct clksel dpll3_m2x2_ck_clksel[] = {
450 { .parent = &sys_ck, .rates = dpll_bypass_rates },
451 { .parent = &dpll3_x2_ck, .rates = dpll_locked_rates },
452 { .parent = NULL }
453};
454
455static struct clk dpll3_m2x2_ck = {
456 .name = "dpll3_m2x2_ck",
457 .init = &omap2_init_clksel_parent,
458 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
459 .clksel_mask = OMAP3430_ST_CORE_CLK,
460 .clksel = dpll3_m2x2_ck_clksel,
461 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
462 PARENT_CONTROLS_CLOCK,
463 .recalc = &omap2_clksel_recalc,
464};
465
466/* The PWRDN bit is apparently only available on 3430ES2 and above */
467static const struct clksel div16_dpll3_clksel[] = {
468 { .parent = &dpll3_ck, .rates = div16_dpll_rates },
469 { .parent = NULL }
470};
471
472/* This virtual clock is the source for dpll3_m3x2_ck */
473static struct clk dpll3_m3_ck = {
474 .name = "dpll3_m3_ck",
475 .parent = &dpll3_ck,
476 .init = &omap2_init_clksel_parent,
477 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
478 .clksel_mask = OMAP3430_DIV_DPLL3_MASK,
479 .clksel = div16_dpll3_clksel,
480 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
481 PARENT_CONTROLS_CLOCK,
482 .recalc = &omap2_clksel_recalc,
483};
484
485/* The PWRDN bit is apparently only available on 3430ES2 and above */
486static struct clk dpll3_m3x2_ck = {
487 .name = "dpll3_m3x2_ck",
488 .parent = &dpll3_m3_ck,
489 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
490 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
491 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
492 .recalc = &omap3_clkoutx2_recalc,
493};
494
495static const struct clksel emu_core_alwon_ck_clksel[] = {
496 { .parent = &sys_ck, .rates = dpll_bypass_rates },
497 { .parent = &dpll3_m3x2_ck, .rates = dpll_locked_rates },
498 { .parent = NULL }
499};
500
501static struct clk emu_core_alwon_ck = {
502 .name = "emu_core_alwon_ck",
503 .parent = &dpll3_m3x2_ck,
504 .init = &omap2_init_clksel_parent,
505 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
506 .clksel_mask = OMAP3430_ST_CORE_CLK,
507 .clksel = emu_core_alwon_ck_clksel,
508 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
509 PARENT_CONTROLS_CLOCK,
510 .recalc = &omap2_clksel_recalc,
511};
512
513/* DPLL4 */
514/* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
515/* Type: DPLL */
516static const struct dpll_data dpll4_dd = {
517 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2),
518 .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK,
519 .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK,
520 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
521 .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK,
522 .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT,
523 .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT,
524 .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT,
525};
526
527static struct clk dpll4_ck = {
528 .name = "dpll4_ck",
529 .parent = &sys_ck,
530 .dpll_data = &dpll4_dd,
531 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
532 .recalc = &omap3_dpll_recalc,
533};
534
535/*
536 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
537 * DPLL isn't bypassed --
538 * XXX does this serve any downstream clocks?
539 */
540static struct clk dpll4_x2_ck = {
541 .name = "dpll4_x2_ck",
542 .parent = &dpll4_ck,
543 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
544 PARENT_CONTROLS_CLOCK,
545 .recalc = &omap3_clkoutx2_recalc,
546};
547
548static const struct clksel div16_dpll4_clksel[] = {
549 { .parent = &dpll4_ck, .rates = div16_dpll_rates },
550 { .parent = NULL }
551};
552
553/* This virtual clock is the source for dpll4_m2x2_ck */
554static struct clk dpll4_m2_ck = {
555 .name = "dpll4_m2_ck",
556 .parent = &dpll4_ck,
557 .init = &omap2_init_clksel_parent,
558 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
559 .clksel_mask = OMAP3430_DIV_96M_MASK,
560 .clksel = div16_dpll4_clksel,
561 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
562 PARENT_CONTROLS_CLOCK,
563 .recalc = &omap2_clksel_recalc,
564};
565
566/* The PWRDN bit is apparently only available on 3430ES2 and above */
567static struct clk dpll4_m2x2_ck = {
568 .name = "dpll4_m2x2_ck",
569 .parent = &dpll4_m2_ck,
570 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
571 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
572 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
573 .recalc = &omap3_clkoutx2_recalc,
574};
575
576static const struct clksel omap_96m_alwon_fck_clksel[] = {
577 { .parent = &sys_ck, .rates = dpll_bypass_rates },
578 { .parent = &dpll4_m2x2_ck, .rates = dpll_locked_rates },
579 { .parent = NULL }
580};
581
582static struct clk omap_96m_alwon_fck = {
583 .name = "omap_96m_alwon_fck",
584 .parent = &dpll4_m2x2_ck,
585 .init = &omap2_init_clksel_parent,
586 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
587 .clksel_mask = OMAP3430_ST_PERIPH_CLK,
588 .clksel = omap_96m_alwon_fck_clksel,
589 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
590 PARENT_CONTROLS_CLOCK,
591 .recalc = &omap2_clksel_recalc,
592};
593
594static struct clk omap_96m_fck = {
595 .name = "omap_96m_fck",
596 .parent = &omap_96m_alwon_fck,
597 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
598 PARENT_CONTROLS_CLOCK,
599 .recalc = &followparent_recalc,
600};
601
602static const struct clksel cm_96m_fck_clksel[] = {
603 { .parent = &sys_ck, .rates = dpll_bypass_rates },
604 { .parent = &dpll4_m2x2_ck, .rates = dpll_locked_rates },
605 { .parent = NULL }
606};
607
608static struct clk cm_96m_fck = {
609 .name = "cm_96m_fck",
610 .parent = &dpll4_m2x2_ck,
611 .init = &omap2_init_clksel_parent,
612 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
613 .clksel_mask = OMAP3430_ST_PERIPH_CLK,
614 .clksel = cm_96m_fck_clksel,
615 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
616 PARENT_CONTROLS_CLOCK,
617 .recalc = &omap2_clksel_recalc,
618};
619
620/* This virtual clock is the source for dpll4_m3x2_ck */
621static struct clk dpll4_m3_ck = {
622 .name = "dpll4_m3_ck",
623 .parent = &dpll4_ck,
624 .init = &omap2_init_clksel_parent,
625 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
626 .clksel_mask = OMAP3430_CLKSEL_TV_MASK,
627 .clksel = div16_dpll4_clksel,
628 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
629 PARENT_CONTROLS_CLOCK,
630 .recalc = &omap2_clksel_recalc,
631};
632
633/* The PWRDN bit is apparently only available on 3430ES2 and above */
634static struct clk dpll4_m3x2_ck = {
635 .name = "dpll4_m3x2_ck",
636 .parent = &dpll4_m3_ck,
637 .init = &omap2_init_clksel_parent,
638 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
639 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
640 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
641 .recalc = &omap3_clkoutx2_recalc,
642};
643
644static const struct clksel virt_omap_54m_fck_clksel[] = {
645 { .parent = &sys_ck, .rates = dpll_bypass_rates },
646 { .parent = &dpll4_m3x2_ck, .rates = dpll_locked_rates },
647 { .parent = NULL }
648};
649
650static struct clk virt_omap_54m_fck = {
651 .name = "virt_omap_54m_fck",
652 .parent = &dpll4_m3x2_ck,
653 .init = &omap2_init_clksel_parent,
654 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
655 .clksel_mask = OMAP3430_ST_PERIPH_CLK,
656 .clksel = virt_omap_54m_fck_clksel,
657 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
658 PARENT_CONTROLS_CLOCK,
659 .recalc = &omap2_clksel_recalc,
660};
661
662static const struct clksel_rate omap_54m_d4m3x2_rates[] = {
663 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
664 { .div = 0 }
665};
666
667static const struct clksel_rate omap_54m_alt_rates[] = {
668 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
669 { .div = 0 }
670};
671
672static const struct clksel omap_54m_clksel[] = {
673 { .parent = &virt_omap_54m_fck, .rates = omap_54m_d4m3x2_rates },
674 { .parent = &sys_altclk, .rates = omap_54m_alt_rates },
675 { .parent = NULL }
676};
677
678static struct clk omap_54m_fck = {
679 .name = "omap_54m_fck",
680 .init = &omap2_init_clksel_parent,
681 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
682 .clksel_mask = OMAP3430_SOURCE_54M,
683 .clksel = omap_54m_clksel,
684 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
685 PARENT_CONTROLS_CLOCK,
686 .recalc = &omap2_clksel_recalc,
687};
688
689static const struct clksel_rate omap_48m_96md2_rates[] = {
690 { .div = 2, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
691 { .div = 0 }
692};
693
694static const struct clksel_rate omap_48m_alt_rates[] = {
695 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
696 { .div = 0 }
697};
698
699static const struct clksel omap_48m_clksel[] = {
700 { .parent = &cm_96m_fck, .rates = omap_48m_96md2_rates },
701 { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
702 { .parent = NULL }
703};
704
705static struct clk omap_48m_fck = {
706 .name = "omap_48m_fck",
707 .init = &omap2_init_clksel_parent,
708 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
709 .clksel_mask = OMAP3430_SOURCE_48M,
710 .clksel = omap_48m_clksel,
711 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
712 PARENT_CONTROLS_CLOCK,
713 .recalc = &omap2_clksel_recalc,
714};
715
716static struct clk omap_12m_fck = {
717 .name = "omap_12m_fck",
718 .parent = &omap_48m_fck,
719 .fixed_div = 4,
720 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
721 PARENT_CONTROLS_CLOCK,
722 .recalc = &omap2_fixed_divisor_recalc,
723};
724
725/* This virstual clock is the source for dpll4_m4x2_ck */
726static struct clk dpll4_m4_ck = {
727 .name = "dpll4_m4_ck",
728 .parent = &dpll4_ck,
729 .init = &omap2_init_clksel_parent,
730 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
731 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK,
732 .clksel = div16_dpll4_clksel,
733 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
734 PARENT_CONTROLS_CLOCK,
735 .recalc = &omap2_clksel_recalc,
736};
737
738/* The PWRDN bit is apparently only available on 3430ES2 and above */
739static struct clk dpll4_m4x2_ck = {
740 .name = "dpll4_m4x2_ck",
741 .parent = &dpll4_m4_ck,
742 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
743 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
744 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
745 .recalc = &omap3_clkoutx2_recalc,
746};
747
748/* This virtual clock is the source for dpll4_m5x2_ck */
749static struct clk dpll4_m5_ck = {
750 .name = "dpll4_m5_ck",
751 .parent = &dpll4_ck,
752 .init = &omap2_init_clksel_parent,
753 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
754 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
755 .clksel = div16_dpll4_clksel,
756 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
757 PARENT_CONTROLS_CLOCK,
758 .recalc = &omap2_clksel_recalc,
759};
760
761/* The PWRDN bit is apparently only available on 3430ES2 and above */
762static struct clk dpll4_m5x2_ck = {
763 .name = "dpll4_m5x2_ck",
764 .parent = &dpll4_m5_ck,
765 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
766 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
767 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
768 .recalc = &omap3_clkoutx2_recalc,
769};
770
771/* This virtual clock is the source for dpll4_m6x2_ck */
772static struct clk dpll4_m6_ck = {
773 .name = "dpll4_m6_ck",
774 .parent = &dpll4_ck,
775 .init = &omap2_init_clksel_parent,
776 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
777 .clksel_mask = OMAP3430_DIV_DPLL4_MASK,
778 .clksel = div16_dpll4_clksel,
779 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
780 PARENT_CONTROLS_CLOCK,
781 .recalc = &omap2_clksel_recalc,
782};
783
784/* The PWRDN bit is apparently only available on 3430ES2 and above */
785static struct clk dpll4_m6x2_ck = {
786 .name = "dpll4_m6x2_ck",
787 .parent = &dpll4_m6_ck,
788 .init = &omap2_init_clksel_parent,
789 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
790 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
791 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
792 .recalc = &omap3_clkoutx2_recalc,
793};
794
795static struct clk emu_per_alwon_ck = {
796 .name = "emu_per_alwon_ck",
797 .parent = &dpll4_m6x2_ck,
798 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
799 PARENT_CONTROLS_CLOCK,
800 .recalc = &followparent_recalc,
801};
802
803/* DPLL5 */
804/* Supplies 120MHz clock, USIM source clock */
805/* Type: DPLL */
806/* 3430ES2 only */
807static const struct dpll_data dpll5_dd = {
808 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
809 .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
810 .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
811 .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
812 .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
813 .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
814 .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
815 .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
816};
817
818static struct clk dpll5_ck = {
819 .name = "dpll5_ck",
820 .parent = &sys_ck,
821 .dpll_data = &dpll5_dd,
822 .flags = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES |
823 ALWAYS_ENABLED,
824 .recalc = &omap3_dpll_recalc,
825};
826
827static const struct clksel div16_dpll5_clksel[] = {
828 { .parent = &dpll5_ck, .rates = div16_dpll_rates },
829 { .parent = NULL }
830};
831
832static struct clk dpll5_m2_ck = {
833 .name = "dpll5_m2_ck",
834 .parent = &dpll5_ck,
835 .init = &omap2_init_clksel_parent,
836 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
837 .clksel_mask = OMAP3430ES2_DIV_120M_MASK,
838 .clksel = div16_dpll5_clksel,
839 .flags = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES,
840 .recalc = &omap2_clksel_recalc,
841};
842
843static const struct clksel omap_120m_fck_clksel[] = {
844 { .parent = &sys_ck, .rates = dpll_bypass_rates },
845 { .parent = &dpll5_m2_ck, .rates = dpll_locked_rates },
846 { .parent = NULL }
847};
848
849static struct clk omap_120m_fck = {
850 .name = "omap_120m_fck",
851 .parent = &dpll5_m2_ck,
852 .init = &omap2_init_clksel_parent,
853 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
854 .clksel_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
855 .clksel = omap_120m_fck_clksel,
856 .flags = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES |
857 PARENT_CONTROLS_CLOCK,
858 .recalc = &omap2_clksel_recalc,
859};
860
861/* CM EXTERNAL CLOCK OUTPUTS */
862
863static const struct clksel_rate clkout2_src_core_rates[] = {
864 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
865 { .div = 0 }
866};
867
868static const struct clksel_rate clkout2_src_sys_rates[] = {
869 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
870 { .div = 0 }
871};
872
873static const struct clksel_rate clkout2_src_96m_rates[] = {
874 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
875 { .div = 0 }
876};
877
878static const struct clksel_rate clkout2_src_54m_rates[] = {
879 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
880 { .div = 0 }
881};
882
883static const struct clksel clkout2_src_clksel[] = {
884 { .parent = &core_ck, .rates = clkout2_src_core_rates },
885 { .parent = &sys_ck, .rates = clkout2_src_sys_rates },
886 { .parent = &omap_96m_alwon_fck, .rates = clkout2_src_96m_rates },
887 { .parent = &omap_54m_fck, .rates = clkout2_src_54m_rates },
888 { .parent = NULL }
889};
890
891static struct clk clkout2_src_ck = {
892 .name = "clkout2_src_ck",
893 .init = &omap2_init_clksel_parent,
894 .enable_reg = OMAP3430_CM_CLKOUT_CTRL,
895 .enable_bit = OMAP3430_CLKOUT2_EN_SHIFT,
896 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
897 .clksel_mask = OMAP3430_CLKOUT2SOURCE_MASK,
898 .clksel = clkout2_src_clksel,
899 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
900 .recalc = &omap2_clksel_recalc,
901};
902
903static const struct clksel_rate sys_clkout2_rates[] = {
904 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
905 { .div = 2, .val = 1, .flags = RATE_IN_343X },
906 { .div = 4, .val = 2, .flags = RATE_IN_343X },
907 { .div = 8, .val = 3, .flags = RATE_IN_343X },
908 { .div = 16, .val = 4, .flags = RATE_IN_343X },
909 { .div = 0 },
910};
911
912static const struct clksel sys_clkout2_clksel[] = {
913 { .parent = &clkout2_src_ck, .rates = sys_clkout2_rates },
914 { .parent = NULL },
915};
916
917static struct clk sys_clkout2 = {
918 .name = "sys_clkout2",
919 .init = &omap2_init_clksel_parent,
920 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
921 .clksel_mask = OMAP3430_CLKOUT2_DIV_MASK,
922 .clksel = sys_clkout2_clksel,
923 .flags = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
924 .recalc = &omap2_clksel_recalc,
925};
926
927/* CM OUTPUT CLOCKS */
928
929static struct clk corex2_fck = {
930 .name = "corex2_fck",
931 .parent = &dpll3_m2x2_ck,
932 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
933 PARENT_CONTROLS_CLOCK,
934 .recalc = &followparent_recalc,
935};
936
937/* DPLL power domain clock controls */
938
939static const struct clksel div2_core_clksel[] = {
940 { .parent = &core_ck, .rates = div2_rates },
941 { .parent = NULL }
942};
943
944/*
945 * REVISIT: Are these in DPLL power domain or CM power domain? docs
946 * may be inconsistent here?
947 */
948static struct clk dpll1_fck = {
949 .name = "dpll1_fck",
950 .parent = &core_ck,
951 .init = &omap2_init_clksel_parent,
952 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
953 .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK,
954 .clksel = div2_core_clksel,
955 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
956 PARENT_CONTROLS_CLOCK,
957 .recalc = &omap2_clksel_recalc,
958};
959
960/*
961 * MPU clksel:
962 * If DPLL1 is locked, mpu_ck derives from DPLL1; otherwise, mpu_ck
963 * derives from the high-frequency bypass clock originating from DPLL3,
964 * called 'dpll1_fck'
965 */
966static const struct clksel mpu_clksel[] = {
967 { .parent = &dpll1_fck, .rates = dpll_bypass_rates },
968 { .parent = &dpll1_x2m2_ck, .rates = dpll_locked_rates },
969 { .parent = NULL }
970};
971
972static struct clk mpu_ck = {
973 .name = "mpu_ck",
974 .parent = &dpll1_x2m2_ck,
975 .init = &omap2_init_clksel_parent,
976 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
977 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
978 .clksel = mpu_clksel,
979 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
980 PARENT_CONTROLS_CLOCK,
981 .recalc = &omap2_clksel_recalc,
982};
983
984/* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
985static const struct clksel_rate arm_fck_rates[] = {
986 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
987 { .div = 2, .val = 1, .flags = RATE_IN_343X },
988 { .div = 0 },
989};
990
991static const struct clksel arm_fck_clksel[] = {
992 { .parent = &mpu_ck, .rates = arm_fck_rates },
993 { .parent = NULL }
994};
995
996static struct clk arm_fck = {
997 .name = "arm_fck",
998 .parent = &mpu_ck,
999 .init = &omap2_init_clksel_parent,
1000 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1001 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1002 .clksel = arm_fck_clksel,
1003 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1004 PARENT_CONTROLS_CLOCK,
1005 .recalc = &omap2_clksel_recalc,
1006};
1007
1008/*
1009 * REVISIT: This clock is never specifically defined in the 3430 TRM,
1010 * although it is referenced - so this is a guess
1011 */
1012static struct clk emu_mpu_alwon_ck = {
1013 .name = "emu_mpu_alwon_ck",
1014 .parent = &mpu_ck,
1015 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1016 PARENT_CONTROLS_CLOCK,
1017 .recalc = &followparent_recalc,
1018};
1019
1020static struct clk dpll2_fck = {
1021 .name = "dpll2_fck",
1022 .parent = &core_ck,
1023 .init = &omap2_init_clksel_parent,
1024 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
1025 .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK,
1026 .clksel = div2_core_clksel,
1027 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1028 PARENT_CONTROLS_CLOCK,
1029 .recalc = &omap2_clksel_recalc,
1030};
1031
1032/*
1033 * IVA2 clksel:
1034 * If DPLL2 is locked, iva2_ck derives from DPLL2; otherwise, iva2_ck
1035 * derives from the high-frequency bypass clock originating from DPLL3,
1036 * called 'dpll2_fck'
1037 */
1038
1039static const struct clksel iva2_clksel[] = {
1040 { .parent = &dpll2_fck, .rates = dpll_bypass_rates },
1041 { .parent = &dpll2_m2_ck, .rates = dpll_locked_rates },
1042 { .parent = NULL }
1043};
1044
1045static struct clk iva2_ck = {
1046 .name = "iva2_ck",
1047 .parent = &dpll2_m2_ck,
1048 .init = &omap2_init_clksel_parent,
1049 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
1050 OMAP3430_CM_IDLEST_PLL),
1051 .clksel_mask = OMAP3430_ST_IVA2_CLK_MASK,
1052 .clksel = iva2_clksel,
1053 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1054 PARENT_CONTROLS_CLOCK,
1055 .recalc = &omap2_clksel_recalc,
1056};
1057
1058/* Common interface clocks */
1059
1060static struct clk l3_ick = {
1061 .name = "l3_ick",
1062 .parent = &core_ck,
1063 .init = &omap2_init_clksel_parent,
1064 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1065 .clksel_mask = OMAP3430_CLKSEL_L3_MASK,
1066 .clksel = div2_core_clksel,
1067 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1068 PARENT_CONTROLS_CLOCK,
1069 .recalc = &omap2_clksel_recalc,
1070};
1071
1072static const struct clksel div2_l3_clksel[] = {
1073 { .parent = &l3_ick, .rates = div2_rates },
1074 { .parent = NULL }
1075};
1076
1077static struct clk l4_ick = {
1078 .name = "l4_ick",
1079 .parent = &l3_ick,
1080 .init = &omap2_init_clksel_parent,
1081 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1082 .clksel_mask = OMAP3430_CLKSEL_L4_MASK,
1083 .clksel = div2_l3_clksel,
1084 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1085 PARENT_CONTROLS_CLOCK,
1086 .recalc = &omap2_clksel_recalc,
1087
1088};
1089
1090static const struct clksel div2_l4_clksel[] = {
1091 { .parent = &l4_ick, .rates = div2_rates },
1092 { .parent = NULL }
1093};
1094
1095static struct clk rm_ick = {
1096 .name = "rm_ick",
1097 .parent = &l4_ick,
1098 .init = &omap2_init_clksel_parent,
1099 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
1100 .clksel_mask = OMAP3430_CLKSEL_RM_MASK,
1101 .clksel = div2_l4_clksel,
1102 .flags = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
1103 .recalc = &omap2_clksel_recalc,
1104};
1105
1106/* GFX power domain */
1107
1108/* GFX clocks are in 3430ES1 only. 3430ES2 and later uses the SGX instead */
1109
1110static const struct clksel gfx_l3_clksel[] = {
1111 { .parent = &l3_ick, .rates = gfx_l3_rates },
1112 { .parent = NULL }
1113};
1114
1115static struct clk gfx_l3_fck = {
1116 .name = "gfx_l3_fck",
1117 .parent = &l3_ick,
1118 .init = &omap2_init_clksel_parent,
1119 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1120 .enable_bit = OMAP_EN_GFX_SHIFT,
1121 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1122 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1123 .clksel = gfx_l3_clksel,
1124 .flags = CLOCK_IN_OMAP3430ES1 | RATE_PROPAGATES,
1125 .recalc = &omap2_clksel_recalc,
1126};
1127
1128static struct clk gfx_l3_ick = {
1129 .name = "gfx_l3_ick",
1130 .parent = &l3_ick,
1131 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1132 .enable_bit = OMAP_EN_GFX_SHIFT,
1133 .flags = CLOCK_IN_OMAP3430ES1,
1134 .recalc = &followparent_recalc,
1135};
1136
1137static struct clk gfx_cg1_ck = {
1138 .name = "gfx_cg1_ck",
1139 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1140 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1141 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1142 .flags = CLOCK_IN_OMAP3430ES1,
1143 .recalc = &followparent_recalc,
1144};
1145
1146static struct clk gfx_cg2_ck = {
1147 .name = "gfx_cg2_ck",
1148 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1149 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1150 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1151 .flags = CLOCK_IN_OMAP3430ES1,
1152 .recalc = &followparent_recalc,
1153};
1154
1155/* SGX power domain - 3430ES2 only */
1156
1157static const struct clksel_rate sgx_core_rates[] = {
1158 { .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1159 { .div = 4, .val = 1, .flags = RATE_IN_343X },
1160 { .div = 6, .val = 2, .flags = RATE_IN_343X },
1161 { .div = 0 },
1162};
1163
1164static const struct clksel_rate sgx_96m_rates[] = {
1165 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
1166 { .div = 0 },
1167};
1168
1169static const struct clksel sgx_clksel[] = {
1170 { .parent = &core_ck, .rates = sgx_core_rates },
1171 { .parent = &cm_96m_fck, .rates = sgx_96m_rates },
1172 { .parent = NULL },
1173};
1174
1175static struct clk sgx_fck = {
1176 .name = "sgx_fck",
1177 .init = &omap2_init_clksel_parent,
1178 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
1179 .enable_bit = OMAP3430ES2_EN_SGX_SHIFT,
1180 .clksel_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
1181 .clksel_mask = OMAP3430ES2_CLKSEL_SGX_MASK,
1182 .clksel = sgx_clksel,
1183 .flags = CLOCK_IN_OMAP3430ES2,
1184 .recalc = &omap2_clksel_recalc,
1185};
1186
1187static struct clk sgx_ick = {
1188 .name = "sgx_ick",
1189 .parent = &l3_ick,
1190 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
1191 .enable_bit = OMAP3430ES2_EN_SGX_SHIFT,
1192 .flags = CLOCK_IN_OMAP3430ES2,
1193 .recalc = &followparent_recalc,
1194};
1195
1196/* CORE power domain */
1197
1198static struct clk d2d_26m_fck = {
1199 .name = "d2d_26m_fck",
1200 .parent = &sys_ck,
1201 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1202 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
1203 .flags = CLOCK_IN_OMAP3430ES1,
1204 .recalc = &followparent_recalc,
1205};
1206
1207static const struct clksel omap343x_gpt_clksel[] = {
1208 { .parent = &omap_32k_fck, .rates = gpt_32k_rates },
1209 { .parent = &sys_ck, .rates = gpt_sys_rates },
1210 { .parent = NULL}
1211};
1212
1213static struct clk gpt10_fck = {
1214 .name = "gpt10_fck",
1215 .parent = &sys_ck,
1216 .init = &omap2_init_clksel_parent,
1217 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1218 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1219 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1220 .clksel_mask = OMAP3430_CLKSEL_GPT10_MASK,
1221 .clksel = omap343x_gpt_clksel,
1222 .flags = CLOCK_IN_OMAP343X,
1223 .recalc = &omap2_clksel_recalc,
1224};
1225
1226static struct clk gpt11_fck = {
1227 .name = "gpt11_fck",
1228 .parent = &sys_ck,
1229 .init = &omap2_init_clksel_parent,
1230 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1231 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1232 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1233 .clksel_mask = OMAP3430_CLKSEL_GPT11_MASK,
1234 .clksel = omap343x_gpt_clksel,
1235 .flags = CLOCK_IN_OMAP343X,
1236 .recalc = &omap2_clksel_recalc,
1237};
1238
1239static struct clk cpefuse_fck = {
1240 .name = "cpefuse_fck",
1241 .parent = &sys_ck,
1242 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1243 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
1244 .flags = CLOCK_IN_OMAP3430ES2,
1245 .recalc = &followparent_recalc,
1246};
1247
1248static struct clk ts_fck = {
1249 .name = "ts_fck",
1250 .parent = &omap_32k_fck,
1251 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1252 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
1253 .flags = CLOCK_IN_OMAP3430ES2,
1254 .recalc = &followparent_recalc,
1255};
1256
1257static struct clk usbtll_fck = {
1258 .name = "usbtll_fck",
1259 .parent = &omap_120m_fck,
1260 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1261 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1262 .flags = CLOCK_IN_OMAP3430ES2,
1263 .recalc = &followparent_recalc,
1264};
1265
1266/* CORE 96M FCLK-derived clocks */
1267
1268static struct clk core_96m_fck = {
1269 .name = "core_96m_fck",
1270 .parent = &omap_96m_fck,
1271 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1272 PARENT_CONTROLS_CLOCK,
1273 .recalc = &followparent_recalc,
1274};
1275
1276static struct clk mmchs3_fck = {
1277 .name = "mmchs_fck",
1278 .id = 3,
1279 .parent = &core_96m_fck,
1280 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1281 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1282 .flags = CLOCK_IN_OMAP3430ES2,
1283 .recalc = &followparent_recalc,
1284};
1285
1286static struct clk mmchs2_fck = {
1287 .name = "mmchs_fck",
1288 .id = 2,
1289 .parent = &core_96m_fck,
1290 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1291 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1292 .flags = CLOCK_IN_OMAP343X,
1293 .recalc = &followparent_recalc,
1294};
1295
1296static struct clk mspro_fck = {
1297 .name = "mspro_fck",
1298 .parent = &core_96m_fck,
1299 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1300 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1301 .flags = CLOCK_IN_OMAP343X,
1302 .recalc = &followparent_recalc,
1303};
1304
1305static struct clk mmchs1_fck = {
1306 .name = "mmchs_fck",
1307 .id = 1,
1308 .parent = &core_96m_fck,
1309 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1310 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1311 .flags = CLOCK_IN_OMAP343X,
1312 .recalc = &followparent_recalc,
1313};
1314
1315static struct clk i2c3_fck = {
1316 .name = "i2c_fck",
1317 .id = 3,
1318 .parent = &core_96m_fck,
1319 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1320 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1321 .flags = CLOCK_IN_OMAP343X,
1322 .recalc = &followparent_recalc,
1323};
1324
1325static struct clk i2c2_fck = {
1326 .name = "i2c_fck",
1327 .id = 2,
1328 .parent = &core_96m_fck,
1329 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1330 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1331 .flags = CLOCK_IN_OMAP343X,
1332 .recalc = &followparent_recalc,
1333};
1334
1335static struct clk i2c1_fck = {
1336 .name = "i2c_fck",
1337 .id = 1,
1338 .parent = &core_96m_fck,
1339 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1340 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1341 .flags = CLOCK_IN_OMAP343X,
1342 .recalc = &followparent_recalc,
1343};
1344
1345/*
1346 * MCBSP 1 & 5 get their 96MHz clock from core_96m_fck;
1347 * MCBSP 2, 3, 4 get their 96MHz clock from per_96m_fck.
1348 */
1349static const struct clksel_rate common_mcbsp_96m_rates[] = {
1350 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1351 { .div = 0 }
1352};
1353
1354static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
1355 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1356 { .div = 0 }
1357};
1358
1359static const struct clksel mcbsp_15_clksel[] = {
1360 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
1361 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
1362 { .parent = NULL }
1363};
1364
1365static struct clk mcbsp5_fck = {
1366 .name = "mcbsp5_fck",
1367 .init = &omap2_init_clksel_parent,
1368 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1369 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1370 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
1371 .clksel_mask = OMAP2_MCBSP5_CLKS_MASK,
1372 .clksel = mcbsp_15_clksel,
1373 .flags = CLOCK_IN_OMAP343X,
1374 .recalc = &omap2_clksel_recalc,
1375};
1376
1377static struct clk mcbsp1_fck = {
1378 .name = "mcbsp1_fck",
1379 .init = &omap2_init_clksel_parent,
1380 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1381 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1382 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
1383 .clksel_mask = OMAP2_MCBSP1_CLKS_MASK,
1384 .clksel = mcbsp_15_clksel,
1385 .flags = CLOCK_IN_OMAP343X,
1386 .recalc = &omap2_clksel_recalc,
1387};
1388
1389/* CORE_48M_FCK-derived clocks */
1390
1391static struct clk core_48m_fck = {
1392 .name = "core_48m_fck",
1393 .parent = &omap_48m_fck,
1394 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1395 PARENT_CONTROLS_CLOCK,
1396 .recalc = &followparent_recalc,
1397};
1398
1399static struct clk mcspi4_fck = {
1400 .name = "mcspi_fck",
1401 .id = 4,
1402 .parent = &core_48m_fck,
1403 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1404 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1405 .flags = CLOCK_IN_OMAP343X,
1406 .recalc = &followparent_recalc,
1407};
1408
1409static struct clk mcspi3_fck = {
1410 .name = "mcspi_fck",
1411 .id = 3,
1412 .parent = &core_48m_fck,
1413 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1414 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1415 .flags = CLOCK_IN_OMAP343X,
1416 .recalc = &followparent_recalc,
1417};
1418
1419static struct clk mcspi2_fck = {
1420 .name = "mcspi_fck",
1421 .id = 2,
1422 .parent = &core_48m_fck,
1423 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1424 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1425 .flags = CLOCK_IN_OMAP343X,
1426 .recalc = &followparent_recalc,
1427};
1428
1429static struct clk mcspi1_fck = {
1430 .name = "mcspi_fck",
1431 .id = 1,
1432 .parent = &core_48m_fck,
1433 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1434 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1435 .flags = CLOCK_IN_OMAP343X,
1436 .recalc = &followparent_recalc,
1437};
1438
1439static struct clk uart2_fck = {
1440 .name = "uart2_fck",
1441 .parent = &core_48m_fck,
1442 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1443 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1444 .flags = CLOCK_IN_OMAP343X,
1445 .recalc = &followparent_recalc,
1446};
1447
1448static struct clk uart1_fck = {
1449 .name = "uart1_fck",
1450 .parent = &core_48m_fck,
1451 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1452 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1453 .flags = CLOCK_IN_OMAP343X,
1454 .recalc = &followparent_recalc,
1455};
1456
1457static struct clk fshostusb_fck = {
1458 .name = "fshostusb_fck",
1459 .parent = &core_48m_fck,
1460 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1461 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1462 .flags = CLOCK_IN_OMAP3430ES1,
1463 .recalc = &followparent_recalc,
1464};
1465
1466/* CORE_12M_FCK based clocks */
1467
1468static struct clk core_12m_fck = {
1469 .name = "core_12m_fck",
1470 .parent = &omap_12m_fck,
1471 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1472 PARENT_CONTROLS_CLOCK,
1473 .recalc = &followparent_recalc,
1474};
1475
1476static struct clk hdq_fck = {
1477 .name = "hdq_fck",
1478 .parent = &core_12m_fck,
1479 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1480 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1481 .flags = CLOCK_IN_OMAP343X,
1482 .recalc = &followparent_recalc,
1483};
1484
1485/* DPLL3-derived clock */
1486
1487static const struct clksel_rate ssi_ssr_corex2_rates[] = {
1488 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1489 { .div = 2, .val = 2, .flags = RATE_IN_343X },
1490 { .div = 3, .val = 3, .flags = RATE_IN_343X },
1491 { .div = 4, .val = 4, .flags = RATE_IN_343X },
1492 { .div = 6, .val = 6, .flags = RATE_IN_343X },
1493 { .div = 8, .val = 8, .flags = RATE_IN_343X },
1494 { .div = 0 }
1495};
1496
1497static const struct clksel ssi_ssr_clksel[] = {
1498 { .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
1499 { .parent = NULL }
1500};
1501
1502static struct clk ssi_ssr_fck = {
1503 .name = "ssi_ssr_fck",
1504 .init = &omap2_init_clksel_parent,
1505 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1506 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1507 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1508 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1509 .clksel = ssi_ssr_clksel,
1510 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
1511 .recalc = &omap2_clksel_recalc,
1512};
1513
1514static struct clk ssi_sst_fck = {
1515 .name = "ssi_sst_fck",
1516 .parent = &ssi_ssr_fck,
1517 .fixed_div = 2,
1518 .flags = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK,
1519 .recalc = &omap2_fixed_divisor_recalc,
1520};
1521
1522
1523
1524/* CORE_L3_ICK based clocks */
1525
1526static struct clk core_l3_ick = {
1527 .name = "core_l3_ick",
1528 .parent = &l3_ick,
1529 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1530 PARENT_CONTROLS_CLOCK,
1531 .recalc = &followparent_recalc,
1532};
1533
1534static struct clk hsotgusb_ick = {
1535 .name = "hsotgusb_ick",
1536 .parent = &core_l3_ick,
1537 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1538 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1539 .flags = CLOCK_IN_OMAP343X,
1540 .recalc = &followparent_recalc,
1541};
1542
1543static struct clk sdrc_ick = {
1544 .name = "sdrc_ick",
1545 .parent = &core_l3_ick,
1546 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1547 .enable_bit = OMAP3430_EN_SDRC_SHIFT,
1548 .flags = CLOCK_IN_OMAP343X | ENABLE_ON_INIT,
1549 .recalc = &followparent_recalc,
1550};
1551
1552static struct clk gpmc_fck = {
1553 .name = "gpmc_fck",
1554 .parent = &core_l3_ick,
1555 .flags = CLOCK_IN_OMAP343X | PARENT_CONTROLS_CLOCK |
1556 ENABLE_ON_INIT,
1557 .recalc = &followparent_recalc,
1558};
1559
1560/* SECURITY_L3_ICK based clocks */
1561
1562static struct clk security_l3_ick = {
1563 .name = "security_l3_ick",
1564 .parent = &l3_ick,
1565 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1566 PARENT_CONTROLS_CLOCK,
1567 .recalc = &followparent_recalc,
1568};
1569
1570static struct clk pka_ick = {
1571 .name = "pka_ick",
1572 .parent = &security_l3_ick,
1573 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1574 .enable_bit = OMAP3430_EN_PKA_SHIFT,
1575 .flags = CLOCK_IN_OMAP343X,
1576 .recalc = &followparent_recalc,
1577};
1578
1579/* CORE_L4_ICK based clocks */
1580
1581static struct clk core_l4_ick = {
1582 .name = "core_l4_ick",
1583 .parent = &l4_ick,
1584 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1585 PARENT_CONTROLS_CLOCK,
1586 .recalc = &followparent_recalc,
1587};
1588
1589static struct clk usbtll_ick = {
1590 .name = "usbtll_ick",
1591 .parent = &core_l4_ick,
1592 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1593 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1594 .flags = CLOCK_IN_OMAP3430ES2,
1595 .recalc = &followparent_recalc,
1596};
1597
1598static struct clk mmchs3_ick = {
1599 .name = "mmchs_ick",
1600 .id = 3,
1601 .parent = &core_l4_ick,
1602 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1603 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1604 .flags = CLOCK_IN_OMAP3430ES2,
1605 .recalc = &followparent_recalc,
1606};
1607
1608/* Intersystem Communication Registers - chassis mode only */
1609static struct clk icr_ick = {
1610 .name = "icr_ick",
1611 .parent = &core_l4_ick,
1612 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1613 .enable_bit = OMAP3430_EN_ICR_SHIFT,
1614 .flags = CLOCK_IN_OMAP343X,
1615 .recalc = &followparent_recalc,
1616};
1617
1618static struct clk aes2_ick = {
1619 .name = "aes2_ick",
1620 .parent = &core_l4_ick,
1621 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1622 .enable_bit = OMAP3430_EN_AES2_SHIFT,
1623 .flags = CLOCK_IN_OMAP343X,
1624 .recalc = &followparent_recalc,
1625};
1626
1627static struct clk sha12_ick = {
1628 .name = "sha12_ick",
1629 .parent = &core_l4_ick,
1630 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1631 .enable_bit = OMAP3430_EN_SHA12_SHIFT,
1632 .flags = CLOCK_IN_OMAP343X,
1633 .recalc = &followparent_recalc,
1634};
1635
1636static struct clk des2_ick = {
1637 .name = "des2_ick",
1638 .parent = &core_l4_ick,
1639 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1640 .enable_bit = OMAP3430_EN_DES2_SHIFT,
1641 .flags = CLOCK_IN_OMAP343X,
1642 .recalc = &followparent_recalc,
1643};
1644
1645static struct clk mmchs2_ick = {
1646 .name = "mmchs_ick",
1647 .id = 2,
1648 .parent = &core_l4_ick,
1649 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1650 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1651 .flags = CLOCK_IN_OMAP343X,
1652 .recalc = &followparent_recalc,
1653};
1654
1655static struct clk mmchs1_ick = {
1656 .name = "mmchs_ick",
1657 .id = 1,
1658 .parent = &core_l4_ick,
1659 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1660 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1661 .flags = CLOCK_IN_OMAP343X,
1662 .recalc = &followparent_recalc,
1663};
1664
1665static struct clk mspro_ick = {
1666 .name = "mspro_ick",
1667 .parent = &core_l4_ick,
1668 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1669 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1670 .flags = CLOCK_IN_OMAP343X,
1671 .recalc = &followparent_recalc,
1672};
1673
1674static struct clk hdq_ick = {
1675 .name = "hdq_ick",
1676 .parent = &core_l4_ick,
1677 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1678 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1679 .flags = CLOCK_IN_OMAP343X,
1680 .recalc = &followparent_recalc,
1681};
1682
1683static struct clk mcspi4_ick = {
1684 .name = "mcspi_ick",
1685 .id = 4,
1686 .parent = &core_l4_ick,
1687 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1688 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1689 .flags = CLOCK_IN_OMAP343X,
1690 .recalc = &followparent_recalc,
1691};
1692
1693static struct clk mcspi3_ick = {
1694 .name = "mcspi_ick",
1695 .id = 3,
1696 .parent = &core_l4_ick,
1697 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1698 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1699 .flags = CLOCK_IN_OMAP343X,
1700 .recalc = &followparent_recalc,
1701};
1702
1703static struct clk mcspi2_ick = {
1704 .name = "mcspi_ick",
1705 .id = 2,
1706 .parent = &core_l4_ick,
1707 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1708 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1709 .flags = CLOCK_IN_OMAP343X,
1710 .recalc = &followparent_recalc,
1711};
1712
1713static struct clk mcspi1_ick = {
1714 .name = "mcspi_ick",
1715 .id = 1,
1716 .parent = &core_l4_ick,
1717 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1718 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1719 .flags = CLOCK_IN_OMAP343X,
1720 .recalc = &followparent_recalc,
1721};
1722
1723static struct clk i2c3_ick = {
1724 .name = "i2c_ick",
1725 .id = 3,
1726 .parent = &core_l4_ick,
1727 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1728 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1729 .flags = CLOCK_IN_OMAP343X,
1730 .recalc = &followparent_recalc,
1731};
1732
1733static struct clk i2c2_ick = {
1734 .name = "i2c_ick",
1735 .id = 2,
1736 .parent = &core_l4_ick,
1737 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1738 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1739 .flags = CLOCK_IN_OMAP343X,
1740 .recalc = &followparent_recalc,
1741};
1742
1743static struct clk i2c1_ick = {
1744 .name = "i2c_ick",
1745 .id = 1,
1746 .parent = &core_l4_ick,
1747 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1748 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1749 .flags = CLOCK_IN_OMAP343X,
1750 .recalc = &followparent_recalc,
1751};
1752
1753static struct clk uart2_ick = {
1754 .name = "uart2_ick",
1755 .parent = &core_l4_ick,
1756 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1757 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1758 .flags = CLOCK_IN_OMAP343X,
1759 .recalc = &followparent_recalc,
1760};
1761
1762static struct clk uart1_ick = {
1763 .name = "uart1_ick",
1764 .parent = &core_l4_ick,
1765 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1766 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1767 .flags = CLOCK_IN_OMAP343X,
1768 .recalc = &followparent_recalc,
1769};
1770
1771static struct clk gpt11_ick = {
1772 .name = "gpt11_ick",
1773 .parent = &core_l4_ick,
1774 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1775 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1776 .flags = CLOCK_IN_OMAP343X,
1777 .recalc = &followparent_recalc,
1778};
1779
1780static struct clk gpt10_ick = {
1781 .name = "gpt10_ick",
1782 .parent = &core_l4_ick,
1783 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1784 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1785 .flags = CLOCK_IN_OMAP343X,
1786 .recalc = &followparent_recalc,
1787};
1788
1789static struct clk mcbsp5_ick = {
1790 .name = "mcbsp5_ick",
1791 .parent = &core_l4_ick,
1792 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1793 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1794 .flags = CLOCK_IN_OMAP343X,
1795 .recalc = &followparent_recalc,
1796};
1797
1798static struct clk mcbsp1_ick = {
1799 .name = "mcbsp1_ick",
1800 .parent = &core_l4_ick,
1801 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1802 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1803 .flags = CLOCK_IN_OMAP343X,
1804 .recalc = &followparent_recalc,
1805};
1806
1807static struct clk fac_ick = {
1808 .name = "fac_ick",
1809 .parent = &core_l4_ick,
1810 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1811 .enable_bit = OMAP3430ES1_EN_FAC_SHIFT,
1812 .flags = CLOCK_IN_OMAP3430ES1,
1813 .recalc = &followparent_recalc,
1814};
1815
1816static struct clk mailboxes_ick = {
1817 .name = "mailboxes_ick",
1818 .parent = &core_l4_ick,
1819 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1820 .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1821 .flags = CLOCK_IN_OMAP343X,
1822 .recalc = &followparent_recalc,
1823};
1824
1825static struct clk omapctrl_ick = {
1826 .name = "omapctrl_ick",
1827 .parent = &core_l4_ick,
1828 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1829 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
1830 .flags = CLOCK_IN_OMAP343X | ENABLE_ON_INIT,
1831 .recalc = &followparent_recalc,
1832};
1833
1834/* SSI_L4_ICK based clocks */
1835
1836static struct clk ssi_l4_ick = {
1837 .name = "ssi_l4_ick",
1838 .parent = &l4_ick,
1839 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
1840 .recalc = &followparent_recalc,
1841};
1842
1843static struct clk ssi_ick = {
1844 .name = "ssi_ick",
1845 .parent = &ssi_l4_ick,
1846 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1847 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1848 .flags = CLOCK_IN_OMAP343X,
1849 .recalc = &followparent_recalc,
1850};
1851
1852/* REVISIT: Technically the TRM claims that this is CORE_CLK based,
1853 * but l4_ick makes more sense to me */
1854
1855static const struct clksel usb_l4_clksel[] = {
1856 { .parent = &l4_ick, .rates = div2_rates },
1857 { .parent = NULL },
1858};
1859
1860static struct clk usb_l4_ick = {
1861 .name = "usb_l4_ick",
1862 .parent = &l4_ick,
1863 .init = &omap2_init_clksel_parent,
1864 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1865 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1866 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1867 .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
1868 .clksel = usb_l4_clksel,
1869 .flags = CLOCK_IN_OMAP3430ES1,
1870 .recalc = &omap2_clksel_recalc,
1871};
1872
1873/* XXX MDM_INTC_ICK, SAD2D_ICK ?? */
1874
1875/* SECURITY_L4_ICK2 based clocks */
1876
1877static struct clk security_l4_ick2 = {
1878 .name = "security_l4_ick2",
1879 .parent = &l4_ick,
1880 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
1881 PARENT_CONTROLS_CLOCK,
1882 .recalc = &followparent_recalc,
1883};
1884
1885static struct clk aes1_ick = {
1886 .name = "aes1_ick",
1887 .parent = &security_l4_ick2,
1888 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1889 .enable_bit = OMAP3430_EN_AES1_SHIFT,
1890 .flags = CLOCK_IN_OMAP343X,
1891 .recalc = &followparent_recalc,
1892};
1893
1894static struct clk rng_ick = {
1895 .name = "rng_ick",
1896 .parent = &security_l4_ick2,
1897 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1898 .enable_bit = OMAP3430_EN_RNG_SHIFT,
1899 .flags = CLOCK_IN_OMAP343X,
1900 .recalc = &followparent_recalc,
1901};
1902
1903static struct clk sha11_ick = {
1904 .name = "sha11_ick",
1905 .parent = &security_l4_ick2,
1906 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1907 .enable_bit = OMAP3430_EN_SHA11_SHIFT,
1908 .flags = CLOCK_IN_OMAP343X,
1909 .recalc = &followparent_recalc,
1910};
1911
1912static struct clk des1_ick = {
1913 .name = "des1_ick",
1914 .parent = &security_l4_ick2,
1915 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1916 .enable_bit = OMAP3430_EN_DES1_SHIFT,
1917 .flags = CLOCK_IN_OMAP343X,
1918 .recalc = &followparent_recalc,
1919};
1920
1921/* DSS */
1922static const struct clksel dss1_alwon_fck_clksel[] = {
1923 { .parent = &sys_ck, .rates = dpll_bypass_rates },
1924 { .parent = &dpll4_m4x2_ck, .rates = dpll_locked_rates },
1925 { .parent = NULL }
1926};
1927
1928static struct clk dss1_alwon_fck = {
1929 .name = "dss1_alwon_fck",
1930 .parent = &dpll4_m4x2_ck,
1931 .init = &omap2_init_clksel_parent,
1932 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1933 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
1934 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
1935 .clksel_mask = OMAP3430_ST_PERIPH_CLK,
1936 .clksel = dss1_alwon_fck_clksel,
1937 .flags = CLOCK_IN_OMAP343X,
1938 .recalc = &omap2_clksel_recalc,
1939};
1940
1941static struct clk dss_tv_fck = {
1942 .name = "dss_tv_fck",
1943 .parent = &omap_54m_fck,
1944 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1945 .enable_bit = OMAP3430_EN_TV_SHIFT,
1946 .flags = CLOCK_IN_OMAP343X,
1947 .recalc = &followparent_recalc,
1948};
1949
1950static struct clk dss_96m_fck = {
1951 .name = "dss_96m_fck",
1952 .parent = &omap_96m_fck,
1953 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1954 .enable_bit = OMAP3430_EN_TV_SHIFT,
1955 .flags = CLOCK_IN_OMAP343X,
1956 .recalc = &followparent_recalc,
1957};
1958
1959static struct clk dss2_alwon_fck = {
1960 .name = "dss2_alwon_fck",
1961 .parent = &sys_ck,
1962 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1963 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
1964 .flags = CLOCK_IN_OMAP343X,
1965 .recalc = &followparent_recalc,
1966};
1967
1968static struct clk dss_ick = {
1969 /* Handles both L3 and L4 clocks */
1970 .name = "dss_ick",
1971 .parent = &l4_ick,
1972 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
1973 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
1974 .flags = CLOCK_IN_OMAP343X,
1975 .recalc = &followparent_recalc,
1976};
1977
1978/* CAM */
1979
1980static const struct clksel cam_mclk_clksel[] = {
1981 { .parent = &sys_ck, .rates = dpll_bypass_rates },
1982 { .parent = &dpll4_m5x2_ck, .rates = dpll_locked_rates },
1983 { .parent = NULL }
1984};
1985
1986static struct clk cam_mclk = {
1987 .name = "cam_mclk",
1988 .parent = &dpll4_m5x2_ck,
1989 .init = &omap2_init_clksel_parent,
1990 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
1991 .clksel_mask = OMAP3430_ST_PERIPH_CLK,
1992 .clksel = cam_mclk_clksel,
1993 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
1994 .enable_bit = OMAP3430_EN_CAM_SHIFT,
1995 .flags = CLOCK_IN_OMAP343X,
1996 .recalc = &omap2_clksel_recalc,
1997};
1998
1999static struct clk cam_l3_ick = {
2000 .name = "cam_l3_ick",
2001 .parent = &l3_ick,
2002 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
2003 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2004 .flags = CLOCK_IN_OMAP343X,
2005 .recalc = &followparent_recalc,
2006};
2007
2008static struct clk cam_l4_ick = {
2009 .name = "cam_l4_ick",
2010 .parent = &l4_ick,
2011 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
2012 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2013 .flags = CLOCK_IN_OMAP343X,
2014 .recalc = &followparent_recalc,
2015};
2016
2017/* USBHOST - 3430ES2 only */
2018
2019static struct clk usbhost_120m_fck = {
2020 .name = "usbhost_120m_fck",
2021 .parent = &omap_120m_fck,
2022 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2023 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2024 .flags = CLOCK_IN_OMAP3430ES2,
2025 .recalc = &followparent_recalc,
2026};
2027
2028static struct clk usbhost_48m_fck = {
2029 .name = "usbhost_48m_fck",
2030 .parent = &omap_48m_fck,
2031 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2032 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
2033 .flags = CLOCK_IN_OMAP3430ES2,
2034 .recalc = &followparent_recalc,
2035};
2036
2037static struct clk usbhost_l3_ick = {
2038 .name = "usbhost_l3_ick",
2039 .parent = &l3_ick,
2040 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
2041 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
2042 .flags = CLOCK_IN_OMAP3430ES2,
2043 .recalc = &followparent_recalc,
2044};
2045
2046static struct clk usbhost_l4_ick = {
2047 .name = "usbhost_l4_ick",
2048 .parent = &l4_ick,
2049 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
2050 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
2051 .flags = CLOCK_IN_OMAP3430ES2,
2052 .recalc = &followparent_recalc,
2053};
2054
2055static struct clk usbhost_sar_fck = {
2056 .name = "usbhost_sar_fck",
2057 .parent = &osc_sys_ck,
2058 .enable_reg = OMAP_PRM_REGADDR(OMAP3430ES2_USBHOST_MOD, PM_PWSTCTRL),
2059 .enable_bit = OMAP3430ES2_SAVEANDRESTORE_SHIFT,
2060 .flags = CLOCK_IN_OMAP3430ES2,
2061 .recalc = &followparent_recalc,
2062};
2063
2064/* WKUP */
2065
2066static const struct clksel_rate usim_96m_rates[] = {
2067 { .div = 2, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2068 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2069 { .div = 8, .val = 5, .flags = RATE_IN_343X },
2070 { .div = 10, .val = 6, .flags = RATE_IN_343X },
2071 { .div = 0 },
2072};
2073
2074static const struct clksel_rate usim_120m_rates[] = {
2075 { .div = 4, .val = 7, .flags = RATE_IN_343X | DEFAULT_RATE },
2076 { .div = 8, .val = 8, .flags = RATE_IN_343X },
2077 { .div = 16, .val = 9, .flags = RATE_IN_343X },
2078 { .div = 20, .val = 10, .flags = RATE_IN_343X },
2079 { .div = 0 },
2080};
2081
2082static const struct clksel usim_clksel[] = {
2083 { .parent = &omap_96m_fck, .rates = usim_96m_rates },
2084 { .parent = &omap_120m_fck, .rates = usim_120m_rates },
2085 { .parent = &sys_ck, .rates = div2_rates },
2086 { .parent = NULL },
2087};
2088
2089/* 3430ES2 only */
2090static struct clk usim_fck = {
2091 .name = "usim_fck",
2092 .init = &omap2_init_clksel_parent,
2093 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2094 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2095 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2096 .clksel_mask = OMAP3430ES2_CLKSEL_USIMOCP_MASK,
2097 .clksel = usim_clksel,
2098 .flags = CLOCK_IN_OMAP3430ES2,
2099 .recalc = &omap2_clksel_recalc,
2100};
2101
2102static struct clk gpt1_fck = {
2103 .name = "gpt1_fck",
2104 .init = &omap2_init_clksel_parent,
2105 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2106 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2107 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2108 .clksel_mask = OMAP3430_CLKSEL_GPT1_MASK,
2109 .clksel = omap343x_gpt_clksel,
2110 .flags = CLOCK_IN_OMAP343X,
2111 .recalc = &omap2_clksel_recalc,
2112};
2113
2114static struct clk wkup_32k_fck = {
2115 .name = "wkup_32k_fck",
2116 .parent = &omap_32k_fck,
2117 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2118 .recalc = &followparent_recalc,
2119};
2120
2121static struct clk gpio1_fck = {
2122 .name = "gpio1_fck",
2123 .parent = &wkup_32k_fck,
2124 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2125 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2126 .flags = CLOCK_IN_OMAP343X,
2127 .recalc = &followparent_recalc,
2128};
2129
2130static struct clk wdt2_fck = {
2131 .name = "wdt2_fck",
2132 .parent = &wkup_32k_fck,
2133 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2134 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2135 .flags = CLOCK_IN_OMAP343X,
2136 .recalc = &followparent_recalc,
2137};
2138
2139static struct clk wkup_l4_ick = {
2140 .name = "wkup_l4_ick",
2141 .parent = &sys_ck,
2142 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2143 .recalc = &followparent_recalc,
2144};
2145
2146/* 3430ES2 only */
2147/* Never specifically named in the TRM, so we have to infer a likely name */
2148static struct clk usim_ick = {
2149 .name = "usim_ick",
2150 .parent = &wkup_l4_ick,
2151 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2152 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2153 .flags = CLOCK_IN_OMAP3430ES2,
2154 .recalc = &followparent_recalc,
2155};
2156
2157static struct clk wdt2_ick = {
2158 .name = "wdt2_ick",
2159 .parent = &wkup_l4_ick,
2160 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2161 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2162 .flags = CLOCK_IN_OMAP343X,
2163 .recalc = &followparent_recalc,
2164};
2165
2166static struct clk wdt1_ick = {
2167 .name = "wdt1_ick",
2168 .parent = &wkup_l4_ick,
2169 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2170 .enable_bit = OMAP3430_EN_WDT1_SHIFT,
2171 .flags = CLOCK_IN_OMAP343X,
2172 .recalc = &followparent_recalc,
2173};
2174
2175static struct clk gpio1_ick = {
2176 .name = "gpio1_ick",
2177 .parent = &wkup_l4_ick,
2178 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2179 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2180 .flags = CLOCK_IN_OMAP343X,
2181 .recalc = &followparent_recalc,
2182};
2183
2184static struct clk omap_32ksync_ick = {
2185 .name = "omap_32ksync_ick",
2186 .parent = &wkup_l4_ick,
2187 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2188 .enable_bit = OMAP3430_EN_32KSYNC_SHIFT,
2189 .flags = CLOCK_IN_OMAP343X,
2190 .recalc = &followparent_recalc,
2191};
2192
2193static struct clk gpt12_ick = {
2194 .name = "gpt12_ick",
2195 .parent = &wkup_l4_ick,
2196 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2197 .enable_bit = OMAP3430_EN_GPT12_SHIFT,
2198 .flags = CLOCK_IN_OMAP343X,
2199 .recalc = &followparent_recalc,
2200};
2201
2202static struct clk gpt1_ick = {
2203 .name = "gpt1_ick",
2204 .parent = &wkup_l4_ick,
2205 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2206 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2207 .flags = CLOCK_IN_OMAP343X,
2208 .recalc = &followparent_recalc,
2209};
2210
2211
2212
2213/* PER clock domain */
2214
2215static struct clk per_96m_fck = {
2216 .name = "per_96m_fck",
2217 .parent = &omap_96m_alwon_fck,
2218 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
2219 PARENT_CONTROLS_CLOCK,
2220 .recalc = &followparent_recalc,
2221};
2222
2223static struct clk per_48m_fck = {
2224 .name = "per_48m_fck",
2225 .parent = &omap_48m_fck,
2226 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
2227 PARENT_CONTROLS_CLOCK,
2228 .recalc = &followparent_recalc,
2229};
2230
2231static struct clk uart3_fck = {
2232 .name = "uart3_fck",
2233 .parent = &per_48m_fck,
2234 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2235 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2236 .flags = CLOCK_IN_OMAP343X,
2237 .recalc = &followparent_recalc,
2238};
2239
2240static struct clk gpt2_fck = {
2241 .name = "gpt2_fck",
2242 .init = &omap2_init_clksel_parent,
2243 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2244 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2245 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2246 .clksel_mask = OMAP3430_CLKSEL_GPT2_MASK,
2247 .clksel = omap343x_gpt_clksel,
2248 .flags = CLOCK_IN_OMAP343X,
2249 .recalc = &omap2_clksel_recalc,
2250};
2251
2252static struct clk gpt3_fck = {
2253 .name = "gpt3_fck",
2254 .init = &omap2_init_clksel_parent,
2255 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2256 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2257 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2258 .clksel_mask = OMAP3430_CLKSEL_GPT3_MASK,
2259 .clksel = omap343x_gpt_clksel,
2260 .flags = CLOCK_IN_OMAP343X,
2261 .recalc = &omap2_clksel_recalc,
2262};
2263
2264static struct clk gpt4_fck = {
2265 .name = "gpt4_fck",
2266 .init = &omap2_init_clksel_parent,
2267 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2268 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2269 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2270 .clksel_mask = OMAP3430_CLKSEL_GPT4_MASK,
2271 .clksel = omap343x_gpt_clksel,
2272 .flags = CLOCK_IN_OMAP343X,
2273 .recalc = &omap2_clksel_recalc,
2274};
2275
2276static struct clk gpt5_fck = {
2277 .name = "gpt5_fck",
2278 .init = &omap2_init_clksel_parent,
2279 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2280 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2281 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2282 .clksel_mask = OMAP3430_CLKSEL_GPT5_MASK,
2283 .clksel = omap343x_gpt_clksel,
2284 .flags = CLOCK_IN_OMAP343X,
2285 .recalc = &omap2_clksel_recalc,
2286};
2287
2288static struct clk gpt6_fck = {
2289 .name = "gpt6_fck",
2290 .init = &omap2_init_clksel_parent,
2291 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2292 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2293 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2294 .clksel_mask = OMAP3430_CLKSEL_GPT6_MASK,
2295 .clksel = omap343x_gpt_clksel,
2296 .flags = CLOCK_IN_OMAP343X,
2297 .recalc = &omap2_clksel_recalc,
2298};
2299
2300static struct clk gpt7_fck = {
2301 .name = "gpt7_fck",
2302 .init = &omap2_init_clksel_parent,
2303 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2304 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2305 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2306 .clksel_mask = OMAP3430_CLKSEL_GPT7_MASK,
2307 .clksel = omap343x_gpt_clksel,
2308 .flags = CLOCK_IN_OMAP343X,
2309 .recalc = &omap2_clksel_recalc,
2310};
2311
2312static struct clk gpt8_fck = {
2313 .name = "gpt8_fck",
2314 .init = &omap2_init_clksel_parent,
2315 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2316 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2317 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2318 .clksel_mask = OMAP3430_CLKSEL_GPT8_MASK,
2319 .clksel = omap343x_gpt_clksel,
2320 .flags = CLOCK_IN_OMAP343X,
2321 .recalc = &omap2_clksel_recalc,
2322};
2323
2324static struct clk gpt9_fck = {
2325 .name = "gpt9_fck",
2326 .init = &omap2_init_clksel_parent,
2327 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2328 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2329 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2330 .clksel_mask = OMAP3430_CLKSEL_GPT9_MASK,
2331 .clksel = omap343x_gpt_clksel,
2332 .flags = CLOCK_IN_OMAP343X,
2333 .recalc = &omap2_clksel_recalc,
2334};
2335
2336static struct clk per_32k_alwon_fck = {
2337 .name = "per_32k_alwon_fck",
2338 .parent = &omap_32k_fck,
2339 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2340 .recalc = &followparent_recalc,
2341};
2342
2343static struct clk gpio6_fck = {
2344 .name = "gpio6_fck",
2345 .parent = &per_32k_alwon_fck,
2346 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2347 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2348 .flags = CLOCK_IN_OMAP343X,
2349 .recalc = &followparent_recalc,
2350};
2351
2352static struct clk gpio5_fck = {
2353 .name = "gpio5_fck",
2354 .parent = &per_32k_alwon_fck,
2355 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2356 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2357 .flags = CLOCK_IN_OMAP343X,
2358 .recalc = &followparent_recalc,
2359};
2360
2361static struct clk gpio4_fck = {
2362 .name = "gpio4_fck",
2363 .parent = &per_32k_alwon_fck,
2364 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2365 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2366 .flags = CLOCK_IN_OMAP343X,
2367 .recalc = &followparent_recalc,
2368};
2369
2370static struct clk gpio3_fck = {
2371 .name = "gpio3_fck",
2372 .parent = &per_32k_alwon_fck,
2373 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2374 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2375 .flags = CLOCK_IN_OMAP343X,
2376 .recalc = &followparent_recalc,
2377};
2378
2379static struct clk gpio2_fck = {
2380 .name = "gpio2_fck",
2381 .parent = &per_32k_alwon_fck,
2382 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2383 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2384 .flags = CLOCK_IN_OMAP343X,
2385 .recalc = &followparent_recalc,
2386};
2387
2388static struct clk wdt3_fck = {
2389 .name = "wdt3_fck",
2390 .parent = &per_32k_alwon_fck,
2391 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2392 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2393 .flags = CLOCK_IN_OMAP343X,
2394 .recalc = &followparent_recalc,
2395};
2396
2397static struct clk per_l4_ick = {
2398 .name = "per_l4_ick",
2399 .parent = &l4_ick,
2400 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
2401 PARENT_CONTROLS_CLOCK,
2402 .recalc = &followparent_recalc,
2403};
2404
2405static struct clk gpio6_ick = {
2406 .name = "gpio6_ick",
2407 .parent = &per_l4_ick,
2408 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2409 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
2410 .flags = CLOCK_IN_OMAP343X,
2411 .recalc = &followparent_recalc,
2412};
2413
2414static struct clk gpio5_ick = {
2415 .name = "gpio5_ick",
2416 .parent = &per_l4_ick,
2417 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2418 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
2419 .flags = CLOCK_IN_OMAP343X,
2420 .recalc = &followparent_recalc,
2421};
2422
2423static struct clk gpio4_ick = {
2424 .name = "gpio4_ick",
2425 .parent = &per_l4_ick,
2426 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2427 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
2428 .flags = CLOCK_IN_OMAP343X,
2429 .recalc = &followparent_recalc,
2430};
2431
2432static struct clk gpio3_ick = {
2433 .name = "gpio3_ick",
2434 .parent = &per_l4_ick,
2435 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2436 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
2437 .flags = CLOCK_IN_OMAP343X,
2438 .recalc = &followparent_recalc,
2439};
2440
2441static struct clk gpio2_ick = {
2442 .name = "gpio2_ick",
2443 .parent = &per_l4_ick,
2444 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2445 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
2446 .flags = CLOCK_IN_OMAP343X,
2447 .recalc = &followparent_recalc,
2448};
2449
2450static struct clk wdt3_ick = {
2451 .name = "wdt3_ick",
2452 .parent = &per_l4_ick,
2453 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2454 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2455 .flags = CLOCK_IN_OMAP343X,
2456 .recalc = &followparent_recalc,
2457};
2458
2459static struct clk uart3_ick = {
2460 .name = "uart3_ick",
2461 .parent = &per_l4_ick,
2462 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2463 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2464 .flags = CLOCK_IN_OMAP343X,
2465 .recalc = &followparent_recalc,
2466};
2467
2468static struct clk gpt9_ick = {
2469 .name = "gpt9_ick",
2470 .parent = &per_l4_ick,
2471 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2472 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2473 .flags = CLOCK_IN_OMAP343X,
2474 .recalc = &followparent_recalc,
2475};
2476
2477static struct clk gpt8_ick = {
2478 .name = "gpt8_ick",
2479 .parent = &per_l4_ick,
2480 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2481 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2482 .flags = CLOCK_IN_OMAP343X,
2483 .recalc = &followparent_recalc,
2484};
2485
2486static struct clk gpt7_ick = {
2487 .name = "gpt7_ick",
2488 .parent = &per_l4_ick,
2489 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2490 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2491 .flags = CLOCK_IN_OMAP343X,
2492 .recalc = &followparent_recalc,
2493};
2494
2495static struct clk gpt6_ick = {
2496 .name = "gpt6_ick",
2497 .parent = &per_l4_ick,
2498 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2499 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2500 .flags = CLOCK_IN_OMAP343X,
2501 .recalc = &followparent_recalc,
2502};
2503
2504static struct clk gpt5_ick = {
2505 .name = "gpt5_ick",
2506 .parent = &per_l4_ick,
2507 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2508 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2509 .flags = CLOCK_IN_OMAP343X,
2510 .recalc = &followparent_recalc,
2511};
2512
2513static struct clk gpt4_ick = {
2514 .name = "gpt4_ick",
2515 .parent = &per_l4_ick,
2516 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2517 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2518 .flags = CLOCK_IN_OMAP343X,
2519 .recalc = &followparent_recalc,
2520};
2521
2522static struct clk gpt3_ick = {
2523 .name = "gpt3_ick",
2524 .parent = &per_l4_ick,
2525 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2526 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2527 .flags = CLOCK_IN_OMAP343X,
2528 .recalc = &followparent_recalc,
2529};
2530
2531static struct clk gpt2_ick = {
2532 .name = "gpt2_ick",
2533 .parent = &per_l4_ick,
2534 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2535 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2536 .flags = CLOCK_IN_OMAP343X,
2537 .recalc = &followparent_recalc,
2538};
2539
2540static struct clk mcbsp2_ick = {
2541 .name = "mcbsp2_ick",
2542 .parent = &per_l4_ick,
2543 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2544 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2545 .flags = CLOCK_IN_OMAP343X,
2546 .recalc = &followparent_recalc,
2547};
2548
2549static struct clk mcbsp3_ick = {
2550 .name = "mcbsp3_ick",
2551 .parent = &per_l4_ick,
2552 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2553 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2554 .flags = CLOCK_IN_OMAP343X,
2555 .recalc = &followparent_recalc,
2556};
2557
2558static struct clk mcbsp4_ick = {
2559 .name = "mcbsp4_ick",
2560 .parent = &per_l4_ick,
2561 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2562 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2563 .flags = CLOCK_IN_OMAP343X,
2564 .recalc = &followparent_recalc,
2565};
2566
2567static const struct clksel mcbsp_234_clksel[] = {
2568 { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates },
2569 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2570 { .parent = NULL }
2571};
2572
2573static struct clk mcbsp2_fck = {
2574 .name = "mcbsp2_fck",
2575 .init = &omap2_init_clksel_parent,
2576 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2577 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2578 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2579 .clksel_mask = OMAP2_MCBSP2_CLKS_MASK,
2580 .clksel = mcbsp_234_clksel,
2581 .flags = CLOCK_IN_OMAP343X,
2582 .recalc = &omap2_clksel_recalc,
2583};
2584
2585static struct clk mcbsp3_fck = {
2586 .name = "mcbsp3_fck",
2587 .init = &omap2_init_clksel_parent,
2588 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2589 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2590 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2591 .clksel_mask = OMAP2_MCBSP3_CLKS_MASK,
2592 .clksel = mcbsp_234_clksel,
2593 .flags = CLOCK_IN_OMAP343X,
2594 .recalc = &omap2_clksel_recalc,
2595};
2596
2597static struct clk mcbsp4_fck = {
2598 .name = "mcbsp4_fck",
2599 .init = &omap2_init_clksel_parent,
2600 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2601 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2602 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2603 .clksel_mask = OMAP2_MCBSP4_CLKS_MASK,
2604 .clksel = mcbsp_234_clksel,
2605 .flags = CLOCK_IN_OMAP343X,
2606 .recalc = &omap2_clksel_recalc,
2607};
2608
2609/* EMU clocks */
2610
2611/* More information: ARM Cortex-A8 Technical Reference Manual, sect 10.1 */
2612
2613static const struct clksel_rate emu_src_sys_rates[] = {
2614 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
2615 { .div = 0 },
2616};
2617
2618static const struct clksel_rate emu_src_core_rates[] = {
2619 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2620 { .div = 0 },
2621};
2622
2623static const struct clksel_rate emu_src_per_rates[] = {
2624 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2625 { .div = 0 },
2626};
2627
2628static const struct clksel_rate emu_src_mpu_rates[] = {
2629 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2630 { .div = 0 },
2631};
2632
2633static const struct clksel emu_src_clksel[] = {
2634 { .parent = &sys_ck, .rates = emu_src_sys_rates },
2635 { .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
2636 { .parent = &emu_per_alwon_ck, .rates = emu_src_per_rates },
2637 { .parent = &emu_mpu_alwon_ck, .rates = emu_src_mpu_rates },
2638 { .parent = NULL },
2639};
2640
2641/*
2642 * Like the clkout_src clocks, emu_src_clk is a virtual clock, existing only
2643 * to switch the source of some of the EMU clocks.
2644 * XXX Are there CLKEN bits for these EMU clks?
2645 */
2646static struct clk emu_src_ck = {
2647 .name = "emu_src_ck",
2648 .init = &omap2_init_clksel_parent,
2649 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2650 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
2651 .clksel = emu_src_clksel,
2652 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2653 .recalc = &omap2_clksel_recalc,
2654};
2655
2656static const struct clksel_rate pclk_emu_rates[] = {
2657 { .div = 2, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2658 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2659 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2660 { .div = 6, .val = 6, .flags = RATE_IN_343X },
2661 { .div = 0 },
2662};
2663
2664static const struct clksel pclk_emu_clksel[] = {
2665 { .parent = &emu_src_ck, .rates = pclk_emu_rates },
2666 { .parent = NULL },
2667};
2668
2669static struct clk pclk_fck = {
2670 .name = "pclk_fck",
2671 .init = &omap2_init_clksel_parent,
2672 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2673 .clksel_mask = OMAP3430_CLKSEL_PCLK_MASK,
2674 .clksel = pclk_emu_clksel,
2675 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2676 .recalc = &omap2_clksel_recalc,
2677};
2678
2679static const struct clksel_rate pclkx2_emu_rates[] = {
2680 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2681 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2682 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2683 { .div = 0 },
2684};
2685
2686static const struct clksel pclkx2_emu_clksel[] = {
2687 { .parent = &emu_src_ck, .rates = pclkx2_emu_rates },
2688 { .parent = NULL },
2689};
2690
2691static struct clk pclkx2_fck = {
2692 .name = "pclkx2_fck",
2693 .init = &omap2_init_clksel_parent,
2694 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2695 .clksel_mask = OMAP3430_CLKSEL_PCLKX2_MASK,
2696 .clksel = pclkx2_emu_clksel,
2697 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2698 .recalc = &omap2_clksel_recalc,
2699};
2700
2701static const struct clksel atclk_emu_clksel[] = {
2702 { .parent = &emu_src_ck, .rates = div2_rates },
2703 { .parent = NULL },
2704};
2705
2706static struct clk atclk_fck = {
2707 .name = "atclk_fck",
2708 .init = &omap2_init_clksel_parent,
2709 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2710 .clksel_mask = OMAP3430_CLKSEL_ATCLK_MASK,
2711 .clksel = atclk_emu_clksel,
2712 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2713 .recalc = &omap2_clksel_recalc,
2714};
2715
2716static struct clk traceclk_src_fck = {
2717 .name = "traceclk_src_fck",
2718 .init = &omap2_init_clksel_parent,
2719 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2720 .clksel_mask = OMAP3430_TRACE_MUX_CTRL_MASK,
2721 .clksel = emu_src_clksel,
2722 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
2723 .recalc = &omap2_clksel_recalc,
2724};
2725
2726static const struct clksel_rate traceclk_rates[] = {
2727 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2728 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2729 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2730 { .div = 0 },
2731};
2732
2733static const struct clksel traceclk_clksel[] = {
2734 { .parent = &traceclk_src_fck, .rates = traceclk_rates },
2735 { .parent = NULL },
2736};
2737
2738static struct clk traceclk_fck = {
2739 .name = "traceclk_fck",
2740 .init = &omap2_init_clksel_parent,
2741 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2742 .clksel_mask = OMAP3430_CLKSEL_TRACECLK_MASK,
2743 .clksel = traceclk_clksel,
2744 .flags = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
2745 .recalc = &omap2_clksel_recalc,
2746};
2747
2748/* SR clocks */
2749
2750/* SmartReflex fclk (VDD1) */
2751static struct clk sr1_fck = {
2752 .name = "sr1_fck",
2753 .parent = &sys_ck,
2754 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2755 .enable_bit = OMAP3430_EN_SR1_SHIFT,
2756 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
2757 .recalc = &followparent_recalc,
2758};
2759
2760/* SmartReflex fclk (VDD2) */
2761static struct clk sr2_fck = {
2762 .name = "sr2_fck",
2763 .parent = &sys_ck,
2764 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2765 .enable_bit = OMAP3430_EN_SR2_SHIFT,
2766 .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES,
2767 .recalc = &followparent_recalc,
2768};
2769
2770static struct clk sr_l4_ick = {
2771 .name = "sr_l4_ick",
2772 .parent = &l4_ick,
2773 .flags = CLOCK_IN_OMAP343X,
2774 .recalc = &followparent_recalc,
2775};
2776
2777/* SECURE_32K_FCK clocks */
2778
2779static struct clk gpt12_fck = {
2780 .name = "gpt12_fck",
2781 .parent = &secure_32k_fck,
2782 .flags = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
2783 .recalc = &followparent_recalc,
2784};
2785
2786static struct clk wdt1_fck = {
2787 .name = "wdt1_fck",
2788 .parent = &secure_32k_fck,
2789 .flags = CLOCK_IN_OMAP343X | ALWAYS_ENABLED,
2790 .recalc = &followparent_recalc,
2791};
2792
2793static struct clk *onchip_34xx_clks[] __initdata = {
2794 &omap_32k_fck,
2795 &virt_12m_ck,
2796 &virt_13m_ck,
2797 &virt_16_8m_ck,
2798 &virt_19_2m_ck,
2799 &virt_26m_ck,
2800 &virt_38_4m_ck,
2801 &osc_sys_ck,
2802 &sys_ck,
2803 &sys_altclk,
2804 &mcbsp_clks,
2805 &sys_clkout1,
2806 &dpll1_ck,
2807 &dpll1_x2_ck,
2808 &dpll1_x2m2_ck,
2809 &dpll2_ck,
2810 &dpll2_m2_ck,
2811 &dpll3_ck,
2812 &core_ck,
2813 &dpll3_x2_ck,
2814 &dpll3_m2_ck,
2815 &dpll3_m2x2_ck,
2816 &dpll3_m3_ck,
2817 &dpll3_m3x2_ck,
2818 &emu_core_alwon_ck,
2819 &dpll4_ck,
2820 &dpll4_x2_ck,
2821 &omap_96m_alwon_fck,
2822 &omap_96m_fck,
2823 &cm_96m_fck,
2824 &virt_omap_54m_fck,
2825 &omap_54m_fck,
2826 &omap_48m_fck,
2827 &omap_12m_fck,
2828 &dpll4_m2_ck,
2829 &dpll4_m2x2_ck,
2830 &dpll4_m3_ck,
2831 &dpll4_m3x2_ck,
2832 &dpll4_m4_ck,
2833 &dpll4_m4x2_ck,
2834 &dpll4_m5_ck,
2835 &dpll4_m5x2_ck,
2836 &dpll4_m6_ck,
2837 &dpll4_m6x2_ck,
2838 &emu_per_alwon_ck,
2839 &dpll5_ck,
2840 &dpll5_m2_ck,
2841 &omap_120m_fck,
2842 &clkout2_src_ck,
2843 &sys_clkout2,
2844 &corex2_fck,
2845 &dpll1_fck,
2846 &mpu_ck,
2847 &arm_fck,
2848 &emu_mpu_alwon_ck,
2849 &dpll2_fck,
2850 &iva2_ck,
2851 &l3_ick,
2852 &l4_ick,
2853 &rm_ick,
2854 &gfx_l3_fck,
2855 &gfx_l3_ick,
2856 &gfx_cg1_ck,
2857 &gfx_cg2_ck,
2858 &sgx_fck,
2859 &sgx_ick,
2860 &d2d_26m_fck,
2861 &gpt10_fck,
2862 &gpt11_fck,
2863 &cpefuse_fck,
2864 &ts_fck,
2865 &usbtll_fck,
2866 &core_96m_fck,
2867 &mmchs3_fck,
2868 &mmchs2_fck,
2869 &mspro_fck,
2870 &mmchs1_fck,
2871 &i2c3_fck,
2872 &i2c2_fck,
2873 &i2c1_fck,
2874 &mcbsp5_fck,
2875 &mcbsp1_fck,
2876 &core_48m_fck,
2877 &mcspi4_fck,
2878 &mcspi3_fck,
2879 &mcspi2_fck,
2880 &mcspi1_fck,
2881 &uart2_fck,
2882 &uart1_fck,
2883 &fshostusb_fck,
2884 &core_12m_fck,
2885 &hdq_fck,
2886 &ssi_ssr_fck,
2887 &ssi_sst_fck,
2888 &core_l3_ick,
2889 &hsotgusb_ick,
2890 &sdrc_ick,
2891 &gpmc_fck,
2892 &security_l3_ick,
2893 &pka_ick,
2894 &core_l4_ick,
2895 &usbtll_ick,
2896 &mmchs3_ick,
2897 &icr_ick,
2898 &aes2_ick,
2899 &sha12_ick,
2900 &des2_ick,
2901 &mmchs2_ick,
2902 &mmchs1_ick,
2903 &mspro_ick,
2904 &hdq_ick,
2905 &mcspi4_ick,
2906 &mcspi3_ick,
2907 &mcspi2_ick,
2908 &mcspi1_ick,
2909 &i2c3_ick,
2910 &i2c2_ick,
2911 &i2c1_ick,
2912 &uart2_ick,
2913 &uart1_ick,
2914 &gpt11_ick,
2915 &gpt10_ick,
2916 &mcbsp5_ick,
2917 &mcbsp1_ick,
2918 &fac_ick,
2919 &mailboxes_ick,
2920 &omapctrl_ick,
2921 &ssi_l4_ick,
2922 &ssi_ick,
2923 &usb_l4_ick,
2924 &security_l4_ick2,
2925 &aes1_ick,
2926 &rng_ick,
2927 &sha11_ick,
2928 &des1_ick,
2929 &dss1_alwon_fck,
2930 &dss_tv_fck,
2931 &dss_96m_fck,
2932 &dss2_alwon_fck,
2933 &dss_ick,
2934 &cam_mclk,
2935 &cam_l3_ick,
2936 &cam_l4_ick,
2937 &usbhost_120m_fck,
2938 &usbhost_48m_fck,
2939 &usbhost_l3_ick,
2940 &usbhost_l4_ick,
2941 &usbhost_sar_fck,
2942 &usim_fck,
2943 &gpt1_fck,
2944 &wkup_32k_fck,
2945 &gpio1_fck,
2946 &wdt2_fck,
2947 &wkup_l4_ick,
2948 &usim_ick,
2949 &wdt2_ick,
2950 &wdt1_ick,
2951 &gpio1_ick,
2952 &omap_32ksync_ick,
2953 &gpt12_ick,
2954 &gpt1_ick,
2955 &per_96m_fck,
2956 &per_48m_fck,
2957 &uart3_fck,
2958 &gpt2_fck,
2959 &gpt3_fck,
2960 &gpt4_fck,
2961 &gpt5_fck,
2962 &gpt6_fck,
2963 &gpt7_fck,
2964 &gpt8_fck,
2965 &gpt9_fck,
2966 &per_32k_alwon_fck,
2967 &gpio6_fck,
2968 &gpio5_fck,
2969 &gpio4_fck,
2970 &gpio3_fck,
2971 &gpio2_fck,
2972 &wdt3_fck,
2973 &per_l4_ick,
2974 &gpio6_ick,
2975 &gpio5_ick,
2976 &gpio4_ick,
2977 &gpio3_ick,
2978 &gpio2_ick,
2979 &wdt3_ick,
2980 &uart3_ick,
2981 &gpt9_ick,
2982 &gpt8_ick,
2983 &gpt7_ick,
2984 &gpt6_ick,
2985 &gpt5_ick,
2986 &gpt4_ick,
2987 &gpt3_ick,
2988 &gpt2_ick,
2989 &mcbsp2_ick,
2990 &mcbsp3_ick,
2991 &mcbsp4_ick,
2992 &mcbsp2_fck,
2993 &mcbsp3_fck,
2994 &mcbsp4_fck,
2995 &emu_src_ck,
2996 &pclk_fck,
2997 &pclkx2_fck,
2998 &atclk_fck,
2999 &traceclk_src_fck,
3000 &traceclk_fck,
3001 &sr1_fck,
3002 &sr2_fck,
3003 &sr_l4_ick,
3004 &secure_32k_fck,
3005 &gpt12_fck,
3006 &wdt1_fck,
3007};
3008
3009#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-24xx.h b/arch/arm/mach-omap2/cm-regbits-24xx.h
new file mode 100644
index 000000000000..20ac38100678
--- /dev/null
+++ b/arch/arm/mach-omap2/cm-regbits-24xx.h
@@ -0,0 +1,401 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
2#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
3
4/*
5 * OMAP24XX Clock Management register bits
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "cm.h"
18
19/* Bits shared between registers */
20
21/* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
22#define OMAP24XX_EN_CAM_SHIFT 31
23#define OMAP24XX_EN_CAM (1 << 31)
24#define OMAP24XX_EN_WDT4_SHIFT 29
25#define OMAP24XX_EN_WDT4 (1 << 29)
26#define OMAP2420_EN_WDT3_SHIFT 28
27#define OMAP2420_EN_WDT3 (1 << 28)
28#define OMAP24XX_EN_MSPRO_SHIFT 27
29#define OMAP24XX_EN_MSPRO (1 << 27)
30#define OMAP24XX_EN_FAC_SHIFT 25
31#define OMAP24XX_EN_FAC (1 << 25)
32#define OMAP2420_EN_EAC_SHIFT 24
33#define OMAP2420_EN_EAC (1 << 24)
34#define OMAP24XX_EN_HDQ_SHIFT 23
35#define OMAP24XX_EN_HDQ (1 << 23)
36#define OMAP2420_EN_I2C2_SHIFT 20
37#define OMAP2420_EN_I2C2 (1 << 20)
38#define OMAP2420_EN_I2C1_SHIFT 19
39#define OMAP2420_EN_I2C1 (1 << 19)
40
41/* CM_FCLKEN2_CORE and CM_ICLKEN2_CORE shared bits */
42#define OMAP2430_EN_MCBSP5_SHIFT 5
43#define OMAP2430_EN_MCBSP5 (1 << 5)
44#define OMAP2430_EN_MCBSP4_SHIFT 4
45#define OMAP2430_EN_MCBSP4 (1 << 4)
46#define OMAP2430_EN_MCBSP3_SHIFT 3
47#define OMAP2430_EN_MCBSP3 (1 << 3)
48#define OMAP24XX_EN_SSI_SHIFT 1
49#define OMAP24XX_EN_SSI (1 << 1)
50
51/* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
52#define OMAP24XX_EN_MPU_WDT_SHIFT 3
53#define OMAP24XX_EN_MPU_WDT (1 << 3)
54
55/* Bits specific to each register */
56
57/* CM_IDLEST_MPU */
58/* 2430 only */
59#define OMAP2430_ST_MPU (1 << 0)
60
61/* CM_CLKSEL_MPU */
62#define OMAP24XX_CLKSEL_MPU_SHIFT 0
63#define OMAP24XX_CLKSEL_MPU_MASK (0x1f << 0)
64
65/* CM_CLKSTCTRL_MPU */
66#define OMAP24XX_AUTOSTATE_MPU (1 << 0)
67
68/* CM_FCLKEN1_CORE specific bits*/
69#define OMAP24XX_EN_TV_SHIFT 2
70#define OMAP24XX_EN_TV (1 << 2)
71#define OMAP24XX_EN_DSS2_SHIFT 1
72#define OMAP24XX_EN_DSS2 (1 << 1)
73#define OMAP24XX_EN_DSS1_SHIFT 0
74#define OMAP24XX_EN_DSS1 (1 << 0)
75
76/* CM_FCLKEN2_CORE specific bits */
77#define OMAP2430_EN_I2CHS2_SHIFT 20
78#define OMAP2430_EN_I2CHS2 (1 << 20)
79#define OMAP2430_EN_I2CHS1_SHIFT 19
80#define OMAP2430_EN_I2CHS1 (1 << 19)
81#define OMAP2430_EN_MMCHSDB2_SHIFT 17
82#define OMAP2430_EN_MMCHSDB2 (1 << 17)
83#define OMAP2430_EN_MMCHSDB1_SHIFT 16
84#define OMAP2430_EN_MMCHSDB1 (1 << 16)
85
86/* CM_ICLKEN1_CORE specific bits */
87#define OMAP24XX_EN_MAILBOXES_SHIFT 30
88#define OMAP24XX_EN_MAILBOXES (1 << 30)
89#define OMAP24XX_EN_DSS_SHIFT 0
90#define OMAP24XX_EN_DSS (1 << 0)
91
92/* CM_ICLKEN2_CORE specific bits */
93
94/* CM_ICLKEN3_CORE */
95/* 2430 only */
96#define OMAP2430_EN_SDRC_SHIFT 2
97#define OMAP2430_EN_SDRC (1 << 2)
98
99/* CM_ICLKEN4_CORE */
100#define OMAP24XX_EN_PKA_SHIFT 4
101#define OMAP24XX_EN_PKA (1 << 4)
102#define OMAP24XX_EN_AES_SHIFT 3
103#define OMAP24XX_EN_AES (1 << 3)
104#define OMAP24XX_EN_RNG_SHIFT 2
105#define OMAP24XX_EN_RNG (1 << 2)
106#define OMAP24XX_EN_SHA_SHIFT 1
107#define OMAP24XX_EN_SHA (1 << 1)
108#define OMAP24XX_EN_DES_SHIFT 0
109#define OMAP24XX_EN_DES (1 << 0)
110
111/* CM_IDLEST1_CORE specific bits */
112#define OMAP24XX_ST_MAILBOXES (1 << 30)
113#define OMAP24XX_ST_WDT4 (1 << 29)
114#define OMAP2420_ST_WDT3 (1 << 28)
115#define OMAP24XX_ST_MSPRO (1 << 27)
116#define OMAP24XX_ST_FAC (1 << 25)
117#define OMAP2420_ST_EAC (1 << 24)
118#define OMAP24XX_ST_HDQ (1 << 23)
119#define OMAP24XX_ST_I2C2 (1 << 20)
120#define OMAP24XX_ST_I2C1 (1 << 19)
121#define OMAP24XX_ST_MCBSP2 (1 << 16)
122#define OMAP24XX_ST_MCBSP1 (1 << 15)
123#define OMAP24XX_ST_DSS (1 << 0)
124
125/* CM_IDLEST2_CORE */
126#define OMAP2430_ST_MCBSP5 (1 << 5)
127#define OMAP2430_ST_MCBSP4 (1 << 4)
128#define OMAP2430_ST_MCBSP3 (1 << 3)
129#define OMAP24XX_ST_SSI (1 << 1)
130
131/* CM_IDLEST3_CORE */
132/* 2430 only */
133#define OMAP2430_ST_SDRC (1 << 2)
134
135/* CM_IDLEST4_CORE */
136#define OMAP24XX_ST_PKA (1 << 4)
137#define OMAP24XX_ST_AES (1 << 3)
138#define OMAP24XX_ST_RNG (1 << 2)
139#define OMAP24XX_ST_SHA (1 << 1)
140#define OMAP24XX_ST_DES (1 << 0)
141
142/* CM_AUTOIDLE1_CORE */
143#define OMAP24XX_AUTO_CAM (1 << 31)
144#define OMAP24XX_AUTO_MAILBOXES (1 << 30)
145#define OMAP24XX_AUTO_WDT4 (1 << 29)
146#define OMAP2420_AUTO_WDT3 (1 << 28)
147#define OMAP24XX_AUTO_MSPRO (1 << 27)
148#define OMAP2420_AUTO_MMC (1 << 26)
149#define OMAP24XX_AUTO_FAC (1 << 25)
150#define OMAP2420_AUTO_EAC (1 << 24)
151#define OMAP24XX_AUTO_HDQ (1 << 23)
152#define OMAP24XX_AUTO_UART2 (1 << 22)
153#define OMAP24XX_AUTO_UART1 (1 << 21)
154#define OMAP24XX_AUTO_I2C2 (1 << 20)
155#define OMAP24XX_AUTO_I2C1 (1 << 19)
156#define OMAP24XX_AUTO_MCSPI2 (1 << 18)
157#define OMAP24XX_AUTO_MCSPI1 (1 << 17)
158#define OMAP24XX_AUTO_MCBSP2 (1 << 16)
159#define OMAP24XX_AUTO_MCBSP1 (1 << 15)
160#define OMAP24XX_AUTO_GPT12 (1 << 14)
161#define OMAP24XX_AUTO_GPT11 (1 << 13)
162#define OMAP24XX_AUTO_GPT10 (1 << 12)
163#define OMAP24XX_AUTO_GPT9 (1 << 11)
164#define OMAP24XX_AUTO_GPT8 (1 << 10)
165#define OMAP24XX_AUTO_GPT7 (1 << 9)
166#define OMAP24XX_AUTO_GPT6 (1 << 8)
167#define OMAP24XX_AUTO_GPT5 (1 << 7)
168#define OMAP24XX_AUTO_GPT4 (1 << 6)
169#define OMAP24XX_AUTO_GPT3 (1 << 5)
170#define OMAP24XX_AUTO_GPT2 (1 << 4)
171#define OMAP2420_AUTO_VLYNQ (1 << 3)
172#define OMAP24XX_AUTO_DSS (1 << 0)
173
174/* CM_AUTOIDLE2_CORE */
175#define OMAP2430_AUTO_MDM_INTC (1 << 11)
176#define OMAP2430_AUTO_GPIO5 (1 << 10)
177#define OMAP2430_AUTO_MCSPI3 (1 << 9)
178#define OMAP2430_AUTO_MMCHS2 (1 << 8)
179#define OMAP2430_AUTO_MMCHS1 (1 << 7)
180#define OMAP2430_AUTO_USBHS (1 << 6)
181#define OMAP2430_AUTO_MCBSP5 (1 << 5)
182#define OMAP2430_AUTO_MCBSP4 (1 << 4)
183#define OMAP2430_AUTO_MCBSP3 (1 << 3)
184#define OMAP24XX_AUTO_UART3 (1 << 2)
185#define OMAP24XX_AUTO_SSI (1 << 1)
186#define OMAP24XX_AUTO_USB (1 << 0)
187
188/* CM_AUTOIDLE3_CORE */
189#define OMAP24XX_AUTO_SDRC (1 << 2)
190#define OMAP24XX_AUTO_GPMC (1 << 1)
191#define OMAP24XX_AUTO_SDMA (1 << 0)
192
193/* CM_AUTOIDLE4_CORE */
194#define OMAP24XX_AUTO_PKA (1 << 4)
195#define OMAP24XX_AUTO_AES (1 << 3)
196#define OMAP24XX_AUTO_RNG (1 << 2)
197#define OMAP24XX_AUTO_SHA (1 << 1)
198#define OMAP24XX_AUTO_DES (1 << 0)
199
200/* CM_CLKSEL1_CORE */
201#define OMAP24XX_CLKSEL_USB_SHIFT 25
202#define OMAP24XX_CLKSEL_USB_MASK (0x7 << 25)
203#define OMAP24XX_CLKSEL_SSI_SHIFT 20
204#define OMAP24XX_CLKSEL_SSI_MASK (0x1f << 20)
205#define OMAP2420_CLKSEL_VLYNQ_SHIFT 15
206#define OMAP2420_CLKSEL_VLYNQ_MASK (0x1f << 15)
207#define OMAP24XX_CLKSEL_DSS2_SHIFT 13
208#define OMAP24XX_CLKSEL_DSS2_MASK (0x1 << 13)
209#define OMAP24XX_CLKSEL_DSS1_SHIFT 8
210#define OMAP24XX_CLKSEL_DSS1_MASK (0x1f << 8)
211#define OMAP24XX_CLKSEL_L4_SHIFT 5
212#define OMAP24XX_CLKSEL_L4_MASK (0x3 << 5)
213#define OMAP24XX_CLKSEL_L3_SHIFT 0
214#define OMAP24XX_CLKSEL_L3_MASK (0x1f << 0)
215
216/* CM_CLKSEL2_CORE */
217#define OMAP24XX_CLKSEL_GPT12_SHIFT 22
218#define OMAP24XX_CLKSEL_GPT12_MASK (0x3 << 22)
219#define OMAP24XX_CLKSEL_GPT11_SHIFT 20
220#define OMAP24XX_CLKSEL_GPT11_MASK (0x3 << 20)
221#define OMAP24XX_CLKSEL_GPT10_SHIFT 18
222#define OMAP24XX_CLKSEL_GPT10_MASK (0x3 << 18)
223#define OMAP24XX_CLKSEL_GPT9_SHIFT 16
224#define OMAP24XX_CLKSEL_GPT9_MASK (0x3 << 16)
225#define OMAP24XX_CLKSEL_GPT8_SHIFT 14
226#define OMAP24XX_CLKSEL_GPT8_MASK (0x3 << 14)
227#define OMAP24XX_CLKSEL_GPT7_SHIFT 12
228#define OMAP24XX_CLKSEL_GPT7_MASK (0x3 << 12)
229#define OMAP24XX_CLKSEL_GPT6_SHIFT 10
230#define OMAP24XX_CLKSEL_GPT6_MASK (0x3 << 10)
231#define OMAP24XX_CLKSEL_GPT5_SHIFT 8
232#define OMAP24XX_CLKSEL_GPT5_MASK (0x3 << 8)
233#define OMAP24XX_CLKSEL_GPT4_SHIFT 6
234#define OMAP24XX_CLKSEL_GPT4_MASK (0x3 << 6)
235#define OMAP24XX_CLKSEL_GPT3_SHIFT 4
236#define OMAP24XX_CLKSEL_GPT3_MASK (0x3 << 4)
237#define OMAP24XX_CLKSEL_GPT2_SHIFT 2
238#define OMAP24XX_CLKSEL_GPT2_MASK (0x3 << 2)
239
240/* CM_CLKSTCTRL_CORE */
241#define OMAP24XX_AUTOSTATE_DSS (1 << 2)
242#define OMAP24XX_AUTOSTATE_L4 (1 << 1)
243#define OMAP24XX_AUTOSTATE_L3 (1 << 0)
244
245/* CM_FCLKEN_GFX */
246#define OMAP24XX_EN_3D_SHIFT 2
247#define OMAP24XX_EN_3D (1 << 2)
248#define OMAP24XX_EN_2D_SHIFT 1
249#define OMAP24XX_EN_2D (1 << 1)
250
251/* CM_ICLKEN_GFX specific bits */
252
253/* CM_IDLEST_GFX specific bits */
254
255/* CM_CLKSEL_GFX specific bits */
256
257/* CM_CLKSTCTRL_GFX */
258#define OMAP24XX_AUTOSTATE_GFX (1 << 0)
259
260/* CM_FCLKEN_WKUP specific bits */
261
262/* CM_ICLKEN_WKUP specific bits */
263#define OMAP2430_EN_ICR_SHIFT 6
264#define OMAP2430_EN_ICR (1 << 6)
265#define OMAP24XX_EN_OMAPCTRL_SHIFT 5
266#define OMAP24XX_EN_OMAPCTRL (1 << 5)
267#define OMAP24XX_EN_WDT1_SHIFT 4
268#define OMAP24XX_EN_WDT1 (1 << 4)
269#define OMAP24XX_EN_32KSYNC_SHIFT 1
270#define OMAP24XX_EN_32KSYNC (1 << 1)
271
272/* CM_IDLEST_WKUP specific bits */
273#define OMAP2430_ST_ICR (1 << 6)
274#define OMAP24XX_ST_OMAPCTRL (1 << 5)
275#define OMAP24XX_ST_WDT1 (1 << 4)
276#define OMAP24XX_ST_MPU_WDT (1 << 3)
277#define OMAP24XX_ST_32KSYNC (1 << 1)
278
279/* CM_AUTOIDLE_WKUP */
280#define OMAP24XX_AUTO_OMAPCTRL (1 << 5)
281#define OMAP24XX_AUTO_WDT1 (1 << 4)
282#define OMAP24XX_AUTO_MPU_WDT (1 << 3)
283#define OMAP24XX_AUTO_GPIOS (1 << 2)
284#define OMAP24XX_AUTO_32KSYNC (1 << 1)
285#define OMAP24XX_AUTO_GPT1 (1 << 0)
286
287/* CM_CLKSEL_WKUP */
288#define OMAP24XX_CLKSEL_GPT1_SHIFT 0
289#define OMAP24XX_CLKSEL_GPT1_MASK (0x3 << 0)
290
291/* CM_CLKEN_PLL */
292#define OMAP24XX_EN_54M_PLL_SHIFT 6
293#define OMAP24XX_EN_54M_PLL_MASK (0x3 << 6)
294#define OMAP24XX_EN_96M_PLL_SHIFT 2
295#define OMAP24XX_EN_96M_PLL_MASK (0x3 << 2)
296#define OMAP24XX_EN_DPLL_SHIFT 0
297#define OMAP24XX_EN_DPLL_MASK (0x3 << 0)
298
299/* CM_IDLEST_CKGEN */
300#define OMAP24XX_ST_54M_APLL (1 << 9)
301#define OMAP24XX_ST_96M_APLL (1 << 8)
302#define OMAP24XX_ST_54M_CLK (1 << 6)
303#define OMAP24XX_ST_12M_CLK (1 << 5)
304#define OMAP24XX_ST_48M_CLK (1 << 4)
305#define OMAP24XX_ST_96M_CLK (1 << 2)
306#define OMAP24XX_ST_CORE_CLK_SHIFT 0
307#define OMAP24XX_ST_CORE_CLK_MASK (0x3 << 0)
308
309/* CM_AUTOIDLE_PLL */
310#define OMAP24XX_AUTO_54M_SHIFT 6
311#define OMAP24XX_AUTO_54M_MASK (0x3 << 6)
312#define OMAP24XX_AUTO_96M_SHIFT 2
313#define OMAP24XX_AUTO_96M_MASK (0x3 << 2)
314#define OMAP24XX_AUTO_DPLL_SHIFT 0
315#define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0)
316
317/* CM_CLKSEL1_PLL */
318#define OMAP2430_MAXDPLLFASTLOCK_SHIFT 28
319#define OMAP2430_MAXDPLLFASTLOCK_MASK (0x7 << 28)
320#define OMAP24XX_APLLS_CLKIN_SHIFT 23
321#define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23)
322#define OMAP24XX_DPLL_MULT_SHIFT 12
323#define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12)
324#define OMAP24XX_DPLL_DIV_SHIFT 8
325#define OMAP24XX_DPLL_DIV_MASK (0xf << 8)
326#define OMAP24XX_54M_SOURCE_SHIFT 5
327#define OMAP24XX_54M_SOURCE (1 << 5)
328#define OMAP2430_96M_SOURCE_SHIFT 4
329#define OMAP2430_96M_SOURCE (1 << 4)
330#define OMAP24XX_48M_SOURCE_SHIFT 3
331#define OMAP24XX_48M_SOURCE (1 << 3)
332#define OMAP2430_ALTCLK_SOURCE_SHIFT 0
333#define OMAP2430_ALTCLK_SOURCE_MASK (0x7 << 0)
334
335/* CM_CLKSEL2_PLL */
336#define OMAP24XX_CORE_CLK_SRC_SHIFT 0
337#define OMAP24XX_CORE_CLK_SRC_MASK (0x3 << 0)
338
339/* CM_FCLKEN_DSP */
340#define OMAP2420_EN_IVA_COP_SHIFT 10
341#define OMAP2420_EN_IVA_COP (1 << 10)
342#define OMAP2420_EN_IVA_MPU_SHIFT 8
343#define OMAP2420_EN_IVA_MPU (1 << 8)
344#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT 0
345#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP (1 << 0)
346
347/* CM_ICLKEN_DSP */
348#define OMAP2420_EN_DSP_IPI_SHIFT 1
349#define OMAP2420_EN_DSP_IPI (1 << 1)
350
351/* CM_IDLEST_DSP */
352#define OMAP2420_ST_IVA (1 << 8)
353#define OMAP2420_ST_IPI (1 << 1)
354#define OMAP24XX_ST_DSP (1 << 0)
355
356/* CM_AUTOIDLE_DSP */
357#define OMAP2420_AUTO_DSP_IPI (1 << 1)
358
359/* CM_CLKSEL_DSP */
360#define OMAP2420_SYNC_IVA (1 << 13)
361#define OMAP2420_CLKSEL_IVA_SHIFT 8
362#define OMAP2420_CLKSEL_IVA_MASK (0x1f << 8)
363#define OMAP24XX_SYNC_DSP (1 << 7)
364#define OMAP24XX_CLKSEL_DSP_IF_SHIFT 5
365#define OMAP24XX_CLKSEL_DSP_IF_MASK (0x3 << 5)
366#define OMAP24XX_CLKSEL_DSP_SHIFT 0
367#define OMAP24XX_CLKSEL_DSP_MASK (0x1f << 0)
368
369/* CM_CLKSTCTRL_DSP */
370#define OMAP2420_AUTOSTATE_IVA (1 << 8)
371#define OMAP24XX_AUTOSTATE_DSP (1 << 0)
372
373/* CM_FCLKEN_MDM */
374/* 2430 only */
375#define OMAP2430_EN_OSC_SHIFT 1
376#define OMAP2430_EN_OSC (1 << 1)
377
378/* CM_ICLKEN_MDM */
379/* 2430 only */
380#define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT 0
381#define OMAP2430_CM_ICLKEN_MDM_EN_MDM (1 << 0)
382
383/* CM_IDLEST_MDM specific bits */
384/* 2430 only */
385
386/* CM_AUTOIDLE_MDM */
387/* 2430 only */
388#define OMAP2430_AUTO_OSC (1 << 1)
389#define OMAP2430_AUTO_MDM (1 << 0)
390
391/* CM_CLKSEL_MDM */
392/* 2430 only */
393#define OMAP2430_SYNC_MDM (1 << 4)
394#define OMAP2430_CLKSEL_MDM_SHIFT 0
395#define OMAP2430_CLKSEL_MDM_MASK (0xf << 0)
396
397/* CM_CLKSTCTRL_MDM */
398/* 2430 only */
399#define OMAP2430_AUTOSTATE_MDM (1 << 0)
400
401#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
new file mode 100644
index 000000000000..9249129a5f46
--- /dev/null
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -0,0 +1,673 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_34XX_H
2#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_34XX_H
3
4/*
5 * OMAP3430 Clock Management register bits
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "cm.h"
18
19/* Bits shared between registers */
20
21/* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
22#define OMAP3430ES2_EN_MMC3_MASK (1 << 30)
23#define OMAP3430ES2_EN_MMC3_SHIFT 30
24#define OMAP3430_EN_MSPRO (1 << 23)
25#define OMAP3430_EN_MSPRO_SHIFT 23
26#define OMAP3430_EN_HDQ (1 << 22)
27#define OMAP3430_EN_HDQ_SHIFT 22
28#define OMAP3430ES1_EN_FSHOSTUSB (1 << 5)
29#define OMAP3430ES1_EN_FSHOSTUSB_SHIFT 5
30#define OMAP3430ES1_EN_D2D (1 << 3)
31#define OMAP3430ES1_EN_D2D_SHIFT 3
32#define OMAP3430_EN_SSI (1 << 0)
33#define OMAP3430_EN_SSI_SHIFT 0
34
35/* CM_FCLKEN3_CORE and CM_ICLKEN3_CORE shared bits */
36#define OMAP3430ES2_EN_USBTLL_SHIFT 2
37#define OMAP3430ES2_EN_USBTLL_MASK (1 << 2)
38
39/* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
40#define OMAP3430_EN_WDT2 (1 << 5)
41#define OMAP3430_EN_WDT2_SHIFT 5
42
43/* CM_ICLKEN_CAM, CM_FCLKEN_CAM shared bits */
44#define OMAP3430_EN_CAM (1 << 0)
45#define OMAP3430_EN_CAM_SHIFT 0
46
47/* CM_FCLKEN_PER, CM_ICLKEN_PER shared bits */
48#define OMAP3430_EN_WDT3 (1 << 12)
49#define OMAP3430_EN_WDT3_SHIFT 12
50
51/* CM_CLKSEL2_EMU, CM_CLKSEL3_EMU shared bits */
52#define OMAP3430_OVERRIDE_ENABLE (1 << 19)
53
54
55/* Bits specific to each register */
56
57/* CM_FCLKEN_IVA2 */
58#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2 (1 << 0)
59
60/* CM_CLKEN_PLL_IVA2 */
61#define OMAP3430_IVA2_DPLL_RAMPTIME_SHIFT 8
62#define OMAP3430_IVA2_DPLL_RAMPTIME_MASK (0x3 << 8)
63#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT 4
64#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4)
65#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3
66#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_MASK (1 << 3)
67#define OMAP3430_EN_IVA2_DPLL_SHIFT 0
68#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0)
69
70/* CM_IDLEST_IVA2 */
71#define OMAP3430_ST_IVA2 (1 << 0)
72
73/* CM_IDLEST_PLL_IVA2 */
74#define OMAP3430_ST_IVA2_CLK (1 << 0)
75
76/* CM_AUTOIDLE_PLL_IVA2 */
77#define OMAP3430_AUTO_IVA2_DPLL_SHIFT 0
78#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0)
79
80/* CM_CLKSEL1_PLL_IVA2 */
81#define OMAP3430_IVA2_CLK_SRC_SHIFT 19
82#define OMAP3430_IVA2_CLK_SRC_MASK (0x3 << 19)
83#define OMAP3430_IVA2_DPLL_MULT_SHIFT 8
84#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8)
85#define OMAP3430_IVA2_DPLL_DIV_SHIFT 0
86#define OMAP3430_IVA2_DPLL_DIV_MASK (0x7f << 0)
87
88/* CM_CLKSEL2_PLL_IVA2 */
89#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT 0
90#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
91
92/* CM_CLKSTCTRL_IVA2 */
93#define OMAP3430_CLKTRCTRL_IVA2_SHIFT 0
94#define OMAP3430_CLKTRCTRL_IVA2_MASK (0x3 << 0)
95
96/* CM_CLKSTST_IVA2 */
97#define OMAP3430_CLKACTIVITY_IVA2 (1 << 0)
98
99/* CM_REVISION specific bits */
100
101/* CM_SYSCONFIG specific bits */
102
103/* CM_CLKEN_PLL_MPU */
104#define OMAP3430_MPU_DPLL_RAMPTIME_SHIFT 8
105#define OMAP3430_MPU_DPLL_RAMPTIME_MASK (0x3 << 8)
106#define OMAP3430_MPU_DPLL_FREQSEL_SHIFT 4
107#define OMAP3430_MPU_DPLL_FREQSEL_MASK (0xf << 4)
108#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT 3
109#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_MASK (1 << 3)
110#define OMAP3430_EN_MPU_DPLL_SHIFT 0
111#define OMAP3430_EN_MPU_DPLL_MASK (0x7 << 0)
112
113/* CM_IDLEST_MPU */
114#define OMAP3430_ST_MPU (1 << 0)
115
116/* CM_IDLEST_PLL_MPU */
117#define OMAP3430_ST_MPU_CLK (1 << 0)
118#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0)
119
120/* CM_IDLEST_PLL_MPU */
121#define OMAP3430_ST_MPU_CLK_MASK (1 << 0)
122
123/* CM_AUTOIDLE_PLL_MPU */
124#define OMAP3430_AUTO_MPU_DPLL_SHIFT 0
125#define OMAP3430_AUTO_MPU_DPLL_MASK (0x7 << 0)
126
127/* CM_CLKSEL1_PLL_MPU */
128#define OMAP3430_MPU_CLK_SRC_SHIFT 19
129#define OMAP3430_MPU_CLK_SRC_MASK (0x3 << 19)
130#define OMAP3430_MPU_DPLL_MULT_SHIFT 8
131#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8)
132#define OMAP3430_MPU_DPLL_DIV_SHIFT 0
133#define OMAP3430_MPU_DPLL_DIV_MASK (0x7f << 0)
134
135/* CM_CLKSEL2_PLL_MPU */
136#define OMAP3430_MPU_DPLL_CLKOUT_DIV_SHIFT 0
137#define OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
138
139/* CM_CLKSTCTRL_MPU */
140#define OMAP3430_CLKTRCTRL_MPU_SHIFT 0
141#define OMAP3430_CLKTRCTRL_MPU_MASK (0x3 << 0)
142
143/* CM_CLKSTST_MPU */
144#define OMAP3430_CLKACTIVITY_MPU (1 << 0)
145
146/* CM_FCLKEN1_CORE specific bits */
147
148/* CM_ICLKEN1_CORE specific bits */
149#define OMAP3430_EN_ICR (1 << 29)
150#define OMAP3430_EN_ICR_SHIFT 29
151#define OMAP3430_EN_AES2 (1 << 28)
152#define OMAP3430_EN_AES2_SHIFT 28
153#define OMAP3430_EN_SHA12 (1 << 27)
154#define OMAP3430_EN_SHA12_SHIFT 27
155#define OMAP3430_EN_DES2 (1 << 26)
156#define OMAP3430_EN_DES2_SHIFT 26
157#define OMAP3430ES1_EN_FAC (1 << 8)
158#define OMAP3430ES1_EN_FAC_SHIFT 8
159#define OMAP3430_EN_MAILBOXES (1 << 7)
160#define OMAP3430_EN_MAILBOXES_SHIFT 7
161#define OMAP3430_EN_OMAPCTRL (1 << 6)
162#define OMAP3430_EN_OMAPCTRL_SHIFT 6
163#define OMAP3430_EN_SDRC (1 << 1)
164#define OMAP3430_EN_SDRC_SHIFT 1
165
166/* CM_ICLKEN2_CORE */
167#define OMAP3430_EN_PKA (1 << 4)
168#define OMAP3430_EN_PKA_SHIFT 4
169#define OMAP3430_EN_AES1 (1 << 3)
170#define OMAP3430_EN_AES1_SHIFT 3
171#define OMAP3430_EN_RNG (1 << 2)
172#define OMAP3430_EN_RNG_SHIFT 2
173#define OMAP3430_EN_SHA11 (1 << 1)
174#define OMAP3430_EN_SHA11_SHIFT 1
175#define OMAP3430_EN_DES1 (1 << 0)
176#define OMAP3430_EN_DES1_SHIFT 0
177
178/* CM_FCLKEN3_CORE specific bits */
179#define OMAP3430ES2_EN_TS_SHIFT 1
180#define OMAP3430ES2_EN_TS_MASK (1 << 1)
181#define OMAP3430ES2_EN_CPEFUSE_SHIFT 0
182#define OMAP3430ES2_EN_CPEFUSE_MASK (1 << 0)
183
184/* CM_IDLEST1_CORE specific bits */
185#define OMAP3430_ST_ICR (1 << 29)
186#define OMAP3430_ST_AES2 (1 << 28)
187#define OMAP3430_ST_SHA12 (1 << 27)
188#define OMAP3430_ST_DES2 (1 << 26)
189#define OMAP3430_ST_MSPRO (1 << 23)
190#define OMAP3430_ST_HDQ (1 << 22)
191#define OMAP3430ES1_ST_FAC (1 << 8)
192#define OMAP3430ES1_ST_MAILBOXES (1 << 7)
193#define OMAP3430_ST_OMAPCTRL (1 << 6)
194#define OMAP3430_ST_SDMA (1 << 2)
195#define OMAP3430_ST_SDRC (1 << 1)
196#define OMAP3430_ST_SSI (1 << 0)
197
198/* CM_IDLEST2_CORE */
199#define OMAP3430_ST_PKA (1 << 4)
200#define OMAP3430_ST_AES1 (1 << 3)
201#define OMAP3430_ST_RNG (1 << 2)
202#define OMAP3430_ST_SHA11 (1 << 1)
203#define OMAP3430_ST_DES1 (1 << 0)
204
205/* CM_IDLEST3_CORE */
206#define OMAP3430ES2_ST_USBTLL_SHIFT 2
207#define OMAP3430ES2_ST_USBTLL_MASK (1 << 2)
208
209/* CM_AUTOIDLE1_CORE */
210#define OMAP3430_AUTO_AES2 (1 << 28)
211#define OMAP3430_AUTO_AES2_SHIFT 28
212#define OMAP3430_AUTO_SHA12 (1 << 27)
213#define OMAP3430_AUTO_SHA12_SHIFT 27
214#define OMAP3430_AUTO_DES2 (1 << 26)
215#define OMAP3430_AUTO_DES2_SHIFT 26
216#define OMAP3430_AUTO_MMC2 (1 << 25)
217#define OMAP3430_AUTO_MMC2_SHIFT 25
218#define OMAP3430_AUTO_MMC1 (1 << 24)
219#define OMAP3430_AUTO_MMC1_SHIFT 24
220#define OMAP3430_AUTO_MSPRO (1 << 23)
221#define OMAP3430_AUTO_MSPRO_SHIFT 23
222#define OMAP3430_AUTO_HDQ (1 << 22)
223#define OMAP3430_AUTO_HDQ_SHIFT 22
224#define OMAP3430_AUTO_MCSPI4 (1 << 21)
225#define OMAP3430_AUTO_MCSPI4_SHIFT 21
226#define OMAP3430_AUTO_MCSPI3 (1 << 20)
227#define OMAP3430_AUTO_MCSPI3_SHIFT 20
228#define OMAP3430_AUTO_MCSPI2 (1 << 19)
229#define OMAP3430_AUTO_MCSPI2_SHIFT 19
230#define OMAP3430_AUTO_MCSPI1 (1 << 18)
231#define OMAP3430_AUTO_MCSPI1_SHIFT 18
232#define OMAP3430_AUTO_I2C3 (1 << 17)
233#define OMAP3430_AUTO_I2C3_SHIFT 17
234#define OMAP3430_AUTO_I2C2 (1 << 16)
235#define OMAP3430_AUTO_I2C2_SHIFT 16
236#define OMAP3430_AUTO_I2C1 (1 << 15)
237#define OMAP3430_AUTO_I2C1_SHIFT 15
238#define OMAP3430_AUTO_UART2 (1 << 14)
239#define OMAP3430_AUTO_UART2_SHIFT 14
240#define OMAP3430_AUTO_UART1 (1 << 13)
241#define OMAP3430_AUTO_UART1_SHIFT 13
242#define OMAP3430_AUTO_GPT11 (1 << 12)
243#define OMAP3430_AUTO_GPT11_SHIFT 12
244#define OMAP3430_AUTO_GPT10 (1 << 11)
245#define OMAP3430_AUTO_GPT10_SHIFT 11
246#define OMAP3430_AUTO_MCBSP5 (1 << 10)
247#define OMAP3430_AUTO_MCBSP5_SHIFT 10
248#define OMAP3430_AUTO_MCBSP1 (1 << 9)
249#define OMAP3430_AUTO_MCBSP1_SHIFT 9
250#define OMAP3430ES1_AUTO_FAC (1 << 8)
251#define OMAP3430ES1_AUTO_FAC_SHIFT 8
252#define OMAP3430_AUTO_MAILBOXES (1 << 7)
253#define OMAP3430_AUTO_MAILBOXES_SHIFT 7
254#define OMAP3430_AUTO_OMAPCTRL (1 << 6)
255#define OMAP3430_AUTO_OMAPCTRL_SHIFT 6
256#define OMAP3430ES1_AUTO_FSHOSTUSB (1 << 5)
257#define OMAP3430ES1_AUTO_FSHOSTUSB_SHIFT 5
258#define OMAP3430_AUTO_HSOTGUSB (1 << 4)
259#define OMAP3430_AUTO_HSOTGUSB_SHIFT 4
260#define OMAP3430ES1_AUTO_D2D (1 << 3)
261#define OMAP3430ES1_AUTO_D2D_SHIFT 3
262#define OMAP3430_AUTO_SSI (1 << 0)
263#define OMAP3430_AUTO_SSI_SHIFT 0
264
265/* CM_AUTOIDLE2_CORE */
266#define OMAP3430_AUTO_PKA (1 << 4)
267#define OMAP3430_AUTO_PKA_SHIFT 4
268#define OMAP3430_AUTO_AES1 (1 << 3)
269#define OMAP3430_AUTO_AES1_SHIFT 3
270#define OMAP3430_AUTO_RNG (1 << 2)
271#define OMAP3430_AUTO_RNG_SHIFT 2
272#define OMAP3430_AUTO_SHA11 (1 << 1)
273#define OMAP3430_AUTO_SHA11_SHIFT 1
274#define OMAP3430_AUTO_DES1 (1 << 0)
275#define OMAP3430_AUTO_DES1_SHIFT 0
276
277/* CM_AUTOIDLE3_CORE */
278#define OMAP3430ES2_AUTO_USBTLL_SHIFT 2
279#define OMAP3430ES2_AUTO_USBTLL_MASK (1 << 2)
280
281/* CM_CLKSEL_CORE */
282#define OMAP3430_CLKSEL_SSI_SHIFT 8
283#define OMAP3430_CLKSEL_SSI_MASK (0xf << 8)
284#define OMAP3430_CLKSEL_GPT11_MASK (1 << 7)
285#define OMAP3430_CLKSEL_GPT11_SHIFT 7
286#define OMAP3430_CLKSEL_GPT10_MASK (1 << 6)
287#define OMAP3430_CLKSEL_GPT10_SHIFT 6
288#define OMAP3430ES1_CLKSEL_FSHOSTUSB_SHIFT 4
289#define OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK (0x3 << 4)
290#define OMAP3430_CLKSEL_L4_SHIFT 2
291#define OMAP3430_CLKSEL_L4_MASK (0x3 << 2)
292#define OMAP3430_CLKSEL_L3_SHIFT 0
293#define OMAP3430_CLKSEL_L3_MASK (0x3 << 0)
294
295/* CM_CLKSTCTRL_CORE */
296#define OMAP3430ES1_CLKTRCTRL_D2D_SHIFT 4
297#define OMAP3430ES1_CLKTRCTRL_D2D_MASK (0x3 << 4)
298#define OMAP3430_CLKTRCTRL_L4_SHIFT 2
299#define OMAP3430_CLKTRCTRL_L4_MASK (0x3 << 2)
300#define OMAP3430_CLKTRCTRL_L3_SHIFT 0
301#define OMAP3430_CLKTRCTRL_L3_MASK (0x3 << 0)
302
303/* CM_CLKSTST_CORE */
304#define OMAP3430ES1_CLKACTIVITY_D2D (1 << 2)
305#define OMAP3430_CLKACTIVITY_L4 (1 << 1)
306#define OMAP3430_CLKACTIVITY_L3 (1 << 0)
307
308/* CM_FCLKEN_GFX */
309#define OMAP3430ES1_EN_3D (1 << 2)
310#define OMAP3430ES1_EN_3D_SHIFT 2
311#define OMAP3430ES1_EN_2D (1 << 1)
312#define OMAP3430ES1_EN_2D_SHIFT 1
313
314/* CM_ICLKEN_GFX specific bits */
315
316/* CM_IDLEST_GFX specific bits */
317
318/* CM_CLKSEL_GFX specific bits */
319
320/* CM_SLEEPDEP_GFX specific bits */
321
322/* CM_CLKSTCTRL_GFX */
323#define OMAP3430ES1_CLKTRCTRL_GFX_SHIFT 0
324#define OMAP3430ES1_CLKTRCTRL_GFX_MASK (0x3 << 0)
325
326/* CM_CLKSTST_GFX */
327#define OMAP3430ES1_CLKACTIVITY_GFX (1 << 0)
328
329/* CM_FCLKEN_SGX */
330#define OMAP3430ES2_EN_SGX_SHIFT 1
331#define OMAP3430ES2_EN_SGX_MASK (1 << 1)
332
333/* CM_CLKSEL_SGX */
334#define OMAP3430ES2_CLKSEL_SGX_SHIFT 0
335#define OMAP3430ES2_CLKSEL_SGX_MASK (0x7 << 0)
336
337/* CM_FCLKEN_WKUP specific bits */
338#define OMAP3430ES2_EN_USIMOCP_SHIFT 9
339
340/* CM_ICLKEN_WKUP specific bits */
341#define OMAP3430_EN_WDT1 (1 << 4)
342#define OMAP3430_EN_WDT1_SHIFT 4
343#define OMAP3430_EN_32KSYNC (1 << 2)
344#define OMAP3430_EN_32KSYNC_SHIFT 2
345
346/* CM_IDLEST_WKUP specific bits */
347#define OMAP3430_ST_WDT2 (1 << 5)
348#define OMAP3430_ST_WDT1 (1 << 4)
349#define OMAP3430_ST_32KSYNC (1 << 2)
350
351/* CM_AUTOIDLE_WKUP */
352#define OMAP3430_AUTO_WDT2 (1 << 5)
353#define OMAP3430_AUTO_WDT2_SHIFT 5
354#define OMAP3430_AUTO_WDT1 (1 << 4)
355#define OMAP3430_AUTO_WDT1_SHIFT 4
356#define OMAP3430_AUTO_GPIO1 (1 << 3)
357#define OMAP3430_AUTO_GPIO1_SHIFT 3
358#define OMAP3430_AUTO_32KSYNC (1 << 2)
359#define OMAP3430_AUTO_32KSYNC_SHIFT 2
360#define OMAP3430_AUTO_GPT12 (1 << 1)
361#define OMAP3430_AUTO_GPT12_SHIFT 1
362#define OMAP3430_AUTO_GPT1 (1 << 0)
363#define OMAP3430_AUTO_GPT1_SHIFT 0
364
365/* CM_CLKSEL_WKUP */
366#define OMAP3430ES2_CLKSEL_USIMOCP_MASK (0xf << 3)
367#define OMAP3430_CLKSEL_RM_SHIFT 1
368#define OMAP3430_CLKSEL_RM_MASK (0x3 << 1)
369#define OMAP3430_CLKSEL_GPT1_SHIFT 0
370#define OMAP3430_CLKSEL_GPT1_MASK (1 << 0)
371
372/* CM_CLKEN_PLL */
373#define OMAP3430_PWRDN_EMU_PERIPH_SHIFT 31
374#define OMAP3430_PWRDN_CAM_SHIFT 30
375#define OMAP3430_PWRDN_DSS1_SHIFT 29
376#define OMAP3430_PWRDN_TV_SHIFT 28
377#define OMAP3430_PWRDN_96M_SHIFT 27
378#define OMAP3430_PERIPH_DPLL_RAMPTIME_SHIFT 24
379#define OMAP3430_PERIPH_DPLL_RAMPTIME_MASK (0x3 << 24)
380#define OMAP3430_PERIPH_DPLL_FREQSEL_SHIFT 20
381#define OMAP3430_PERIPH_DPLL_FREQSEL_MASK (0xf << 20)
382#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT 19
383#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_MASK (1 << 19)
384#define OMAP3430_EN_PERIPH_DPLL_SHIFT 16
385#define OMAP3430_EN_PERIPH_DPLL_MASK (0x7 << 16)
386#define OMAP3430_PWRDN_EMU_CORE_SHIFT 12
387#define OMAP3430_CORE_DPLL_RAMPTIME_SHIFT 8
388#define OMAP3430_CORE_DPLL_RAMPTIME_MASK (0x3 << 8)
389#define OMAP3430_CORE_DPLL_FREQSEL_SHIFT 4
390#define OMAP3430_CORE_DPLL_FREQSEL_MASK (0xf << 4)
391#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT 3
392#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_MASK (1 << 3)
393#define OMAP3430_EN_CORE_DPLL_SHIFT 0
394#define OMAP3430_EN_CORE_DPLL_MASK (0x7 << 0)
395
396/* CM_CLKEN2_PLL */
397#define OMAP3430ES2_EN_PERIPH2_DPLL_LPMODE_SHIFT 10
398#define OMAP3430ES2_PERIPH2_DPLL_RAMPTIME_MASK (0x3 << 8)
399#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_SHIFT 4
400#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK (0xf << 4)
401#define OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT 3
402#define OMAP3430ES2_EN_PERIPH2_DPLL_SHIFT 0
403#define OMAP3430ES2_EN_PERIPH2_DPLL_MASK (0x7 << 0)
404
405/* CM_IDLEST_CKGEN */
406#define OMAP3430_ST_54M_CLK (1 << 5)
407#define OMAP3430_ST_12M_CLK (1 << 4)
408#define OMAP3430_ST_48M_CLK (1 << 3)
409#define OMAP3430_ST_96M_CLK (1 << 2)
410#define OMAP3430_ST_PERIPH_CLK (1 << 1)
411#define OMAP3430_ST_CORE_CLK (1 << 0)
412
413/* CM_IDLEST2_CKGEN */
414#define OMAP3430ES2_ST_120M_CLK_SHIFT 1
415#define OMAP3430ES2_ST_120M_CLK_MASK (1 << 1)
416#define OMAP3430ES2_ST_PERIPH2_CLK_SHIFT 0
417#define OMAP3430ES2_ST_PERIPH2_CLK_MASK (1 << 0)
418
419/* CM_AUTOIDLE_PLL */
420#define OMAP3430_AUTO_PERIPH_DPLL_SHIFT 3
421#define OMAP3430_AUTO_PERIPH_DPLL_MASK (0x7 << 3)
422#define OMAP3430_AUTO_CORE_DPLL_SHIFT 0
423#define OMAP3430_AUTO_CORE_DPLL_MASK (0x7 << 0)
424
425/* CM_CLKSEL1_PLL */
426/* Note that OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK was (0x3 << 27) on 3430ES1 */
427#define OMAP3430_CORE_DPLL_CLKOUT_DIV_SHIFT 27
428#define OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK (0x1f << 27)
429#define OMAP3430_CORE_DPLL_MULT_SHIFT 16
430#define OMAP3430_CORE_DPLL_MULT_MASK (0x7ff << 16)
431#define OMAP3430_CORE_DPLL_DIV_SHIFT 8
432#define OMAP3430_CORE_DPLL_DIV_MASK (0x7f << 8)
433#define OMAP3430_SOURCE_54M (1 << 5)
434#define OMAP3430_SOURCE_48M (1 << 3)
435
436/* CM_CLKSEL2_PLL */
437#define OMAP3430_PERIPH_DPLL_MULT_SHIFT 8
438#define OMAP3430_PERIPH_DPLL_MULT_MASK (0x7ff << 8)
439#define OMAP3430_PERIPH_DPLL_DIV_SHIFT 0
440#define OMAP3430_PERIPH_DPLL_DIV_MASK (0x7f << 0)
441
442/* CM_CLKSEL3_PLL */
443#define OMAP3430_DIV_96M_SHIFT 0
444#define OMAP3430_DIV_96M_MASK (0x1f << 0)
445
446/* CM_CLKSEL4_PLL */
447#define OMAP3430ES2_PERIPH2_DPLL_MULT_SHIFT 8
448#define OMAP3430ES2_PERIPH2_DPLL_MULT_MASK (0x7ff << 8)
449#define OMAP3430ES2_PERIPH2_DPLL_DIV_SHIFT 0
450#define OMAP3430ES2_PERIPH2_DPLL_DIV_MASK (0x7f << 0)
451
452/* CM_CLKSEL5_PLL */
453#define OMAP3430ES2_DIV_120M_SHIFT 0
454#define OMAP3430ES2_DIV_120M_MASK (0x1f << 0)
455
456/* CM_CLKOUT_CTRL */
457#define OMAP3430_CLKOUT2_EN_SHIFT 7
458#define OMAP3430_CLKOUT2_EN (1 << 7)
459#define OMAP3430_CLKOUT2_DIV_SHIFT 3
460#define OMAP3430_CLKOUT2_DIV_MASK (0x7 << 3)
461#define OMAP3430_CLKOUT2SOURCE_SHIFT 0
462#define OMAP3430_CLKOUT2SOURCE_MASK (0x3 << 0)
463
464/* CM_FCLKEN_DSS */
465#define OMAP3430_EN_TV (1 << 2)
466#define OMAP3430_EN_TV_SHIFT 2
467#define OMAP3430_EN_DSS2 (1 << 1)
468#define OMAP3430_EN_DSS2_SHIFT 1
469#define OMAP3430_EN_DSS1 (1 << 0)
470#define OMAP3430_EN_DSS1_SHIFT 0
471
472/* CM_ICLKEN_DSS */
473#define OMAP3430_CM_ICLKEN_DSS_EN_DSS (1 << 0)
474#define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0
475
476/* CM_IDLEST_DSS */
477#define OMAP3430_ST_DSS (1 << 0)
478
479/* CM_AUTOIDLE_DSS */
480#define OMAP3430_AUTO_DSS (1 << 0)
481#define OMAP3430_AUTO_DSS_SHIFT 0
482
483/* CM_CLKSEL_DSS */
484#define OMAP3430_CLKSEL_TV_SHIFT 8
485#define OMAP3430_CLKSEL_TV_MASK (0x1f << 8)
486#define OMAP3430_CLKSEL_DSS1_SHIFT 0
487#define OMAP3430_CLKSEL_DSS1_MASK (0x1f << 0)
488
489/* CM_SLEEPDEP_DSS specific bits */
490
491/* CM_CLKSTCTRL_DSS */
492#define OMAP3430_CLKTRCTRL_DSS_SHIFT 0
493#define OMAP3430_CLKTRCTRL_DSS_MASK (0x3 << 0)
494
495/* CM_CLKSTST_DSS */
496#define OMAP3430_CLKACTIVITY_DSS (1 << 0)
497
498/* CM_FCLKEN_CAM specific bits */
499
500/* CM_ICLKEN_CAM specific bits */
501
502/* CM_IDLEST_CAM */
503#define OMAP3430_ST_CAM (1 << 0)
504
505/* CM_AUTOIDLE_CAM */
506#define OMAP3430_AUTO_CAM (1 << 0)
507#define OMAP3430_AUTO_CAM_SHIFT 0
508
509/* CM_CLKSEL_CAM */
510#define OMAP3430_CLKSEL_CAM_SHIFT 0
511#define OMAP3430_CLKSEL_CAM_MASK (0x1f << 0)
512
513/* CM_SLEEPDEP_CAM specific bits */
514
515/* CM_CLKSTCTRL_CAM */
516#define OMAP3430_CLKTRCTRL_CAM_SHIFT 0
517#define OMAP3430_CLKTRCTRL_CAM_MASK (0x3 << 0)
518
519/* CM_CLKSTST_CAM */
520#define OMAP3430_CLKACTIVITY_CAM (1 << 0)
521
522/* CM_FCLKEN_PER specific bits */
523
524/* CM_ICLKEN_PER specific bits */
525
526/* CM_IDLEST_PER */
527#define OMAP3430_ST_WDT3 (1 << 12)
528#define OMAP3430_ST_MCBSP4 (1 << 2)
529#define OMAP3430_ST_MCBSP3 (1 << 1)
530#define OMAP3430_ST_MCBSP2 (1 << 0)
531
532/* CM_AUTOIDLE_PER */
533#define OMAP3430_AUTO_GPIO6 (1 << 17)
534#define OMAP3430_AUTO_GPIO6_SHIFT 17
535#define OMAP3430_AUTO_GPIO5 (1 << 16)
536#define OMAP3430_AUTO_GPIO5_SHIFT 16
537#define OMAP3430_AUTO_GPIO4 (1 << 15)
538#define OMAP3430_AUTO_GPIO4_SHIFT 15
539#define OMAP3430_AUTO_GPIO3 (1 << 14)
540#define OMAP3430_AUTO_GPIO3_SHIFT 14
541#define OMAP3430_AUTO_GPIO2 (1 << 13)
542#define OMAP3430_AUTO_GPIO2_SHIFT 13
543#define OMAP3430_AUTO_WDT3 (1 << 12)
544#define OMAP3430_AUTO_WDT3_SHIFT 12
545#define OMAP3430_AUTO_UART3 (1 << 11)
546#define OMAP3430_AUTO_UART3_SHIFT 11
547#define OMAP3430_AUTO_GPT9 (1 << 10)
548#define OMAP3430_AUTO_GPT9_SHIFT 10
549#define OMAP3430_AUTO_GPT8 (1 << 9)
550#define OMAP3430_AUTO_GPT8_SHIFT 9
551#define OMAP3430_AUTO_GPT7 (1 << 8)
552#define OMAP3430_AUTO_GPT7_SHIFT 8
553#define OMAP3430_AUTO_GPT6 (1 << 7)
554#define OMAP3430_AUTO_GPT6_SHIFT 7
555#define OMAP3430_AUTO_GPT5 (1 << 6)
556#define OMAP3430_AUTO_GPT5_SHIFT 6
557#define OMAP3430_AUTO_GPT4 (1 << 5)
558#define OMAP3430_AUTO_GPT4_SHIFT 5
559#define OMAP3430_AUTO_GPT3 (1 << 4)
560#define OMAP3430_AUTO_GPT3_SHIFT 4
561#define OMAP3430_AUTO_GPT2 (1 << 3)
562#define OMAP3430_AUTO_GPT2_SHIFT 3
563#define OMAP3430_AUTO_MCBSP4 (1 << 2)
564#define OMAP3430_AUTO_MCBSP4_SHIFT 2
565#define OMAP3430_AUTO_MCBSP3 (1 << 1)
566#define OMAP3430_AUTO_MCBSP3_SHIFT 1
567#define OMAP3430_AUTO_MCBSP2 (1 << 0)
568#define OMAP3430_AUTO_MCBSP2_SHIFT 0
569
570/* CM_CLKSEL_PER */
571#define OMAP3430_CLKSEL_GPT9_MASK (1 << 7)
572#define OMAP3430_CLKSEL_GPT9_SHIFT 7
573#define OMAP3430_CLKSEL_GPT8_MASK (1 << 6)
574#define OMAP3430_CLKSEL_GPT8_SHIFT 6
575#define OMAP3430_CLKSEL_GPT7_MASK (1 << 5)
576#define OMAP3430_CLKSEL_GPT7_SHIFT 5
577#define OMAP3430_CLKSEL_GPT6_MASK (1 << 4)
578#define OMAP3430_CLKSEL_GPT6_SHIFT 4
579#define OMAP3430_CLKSEL_GPT5_MASK (1 << 3)
580#define OMAP3430_CLKSEL_GPT5_SHIFT 3
581#define OMAP3430_CLKSEL_GPT4_MASK (1 << 2)
582#define OMAP3430_CLKSEL_GPT4_SHIFT 2
583#define OMAP3430_CLKSEL_GPT3_MASK (1 << 1)
584#define OMAP3430_CLKSEL_GPT3_SHIFT 1
585#define OMAP3430_CLKSEL_GPT2_MASK (1 << 0)
586#define OMAP3430_CLKSEL_GPT2_SHIFT 0
587
588/* CM_SLEEPDEP_PER specific bits */
589#define OMAP3430_CM_SLEEPDEP_PER_EN_IVA2 (1 << 2)
590
591/* CM_CLKSTCTRL_PER */
592#define OMAP3430_CLKTRCTRL_PER_SHIFT 0
593#define OMAP3430_CLKTRCTRL_PER_MASK (0x3 << 0)
594
595/* CM_CLKSTST_PER */
596#define OMAP3430_CLKACTIVITY_PER (1 << 0)
597
598/* CM_CLKSEL1_EMU */
599#define OMAP3430_DIV_DPLL4_SHIFT 24
600#define OMAP3430_DIV_DPLL4_MASK (0x1f << 24)
601#define OMAP3430_DIV_DPLL3_SHIFT 16
602#define OMAP3430_DIV_DPLL3_MASK (0x1f << 16)
603#define OMAP3430_CLKSEL_TRACECLK_SHIFT 11
604#define OMAP3430_CLKSEL_TRACECLK_MASK (0x7 << 11)
605#define OMAP3430_CLKSEL_PCLK_SHIFT 8
606#define OMAP3430_CLKSEL_PCLK_MASK (0x7 << 8)
607#define OMAP3430_CLKSEL_PCLKX2_SHIFT 6
608#define OMAP3430_CLKSEL_PCLKX2_MASK (0x3 << 6)
609#define OMAP3430_CLKSEL_ATCLK_SHIFT 4
610#define OMAP3430_CLKSEL_ATCLK_MASK (0x3 << 4)
611#define OMAP3430_TRACE_MUX_CTRL_SHIFT 2
612#define OMAP3430_TRACE_MUX_CTRL_MASK (0x3 << 2)
613#define OMAP3430_MUX_CTRL_SHIFT 0
614#define OMAP3430_MUX_CTRL_MASK (0x3 << 0)
615
616/* CM_CLKSTCTRL_EMU */
617#define OMAP3430_CLKTRCTRL_EMU_SHIFT 0
618#define OMAP3430_CLKTRCTRL_EMU_MASK (0x3 << 0)
619
620/* CM_CLKSTST_EMU */
621#define OMAP3430_CLKACTIVITY_EMU (1 << 0)
622
623/* CM_CLKSEL2_EMU specific bits */
624#define OMAP3430_CORE_DPLL_EMU_MULT_SHIFT 8
625#define OMAP3430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8)
626#define OMAP3430_CORE_DPLL_EMU_DIV_SHIFT 0
627#define OMAP3430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0)
628
629/* CM_CLKSEL3_EMU specific bits */
630#define OMAP3430_PERIPH_DPLL_EMU_MULT_SHIFT 8
631#define OMAP3430_PERIPH_DPLL_EMU_MULT_MASK (0x7ff << 8)
632#define OMAP3430_PERIPH_DPLL_EMU_DIV_SHIFT 0
633#define OMAP3430_PERIPH_DPLL_EMU_DIV_MASK (0x7f << 0)
634
635/* CM_POLCTRL */
636#define OMAP3430_CLKOUT2_POL (1 << 0)
637
638/* CM_IDLEST_NEON */
639#define OMAP3430_ST_NEON (1 << 0)
640
641/* CM_CLKSTCTRL_NEON */
642#define OMAP3430_CLKTRCTRL_NEON_SHIFT 0
643#define OMAP3430_CLKTRCTRL_NEON_MASK (0x3 << 0)
644
645/* CM_FCLKEN_USBHOST */
646#define OMAP3430ES2_EN_USBHOST2_SHIFT 1
647#define OMAP3430ES2_EN_USBHOST2_MASK (1 << 1)
648#define OMAP3430ES2_EN_USBHOST1_SHIFT 0
649#define OMAP3430ES2_EN_USBHOST1_MASK (1 << 0)
650
651/* CM_ICLKEN_USBHOST */
652#define OMAP3430ES2_EN_USBHOST_SHIFT 0
653#define OMAP3430ES2_EN_USBHOST_MASK (1 << 0)
654
655/* CM_IDLEST_USBHOST */
656
657/* CM_AUTOIDLE_USBHOST */
658#define OMAP3430ES2_AUTO_USBHOST_SHIFT 0
659#define OMAP3430ES2_AUTO_USBHOST_MASK (1 << 0)
660
661/* CM_SLEEPDEP_USBHOST */
662#define OMAP3430ES2_EN_MPU_SHIFT 1
663#define OMAP3430ES2_EN_MPU_MASK (1 << 1)
664#define OMAP3430ES2_EN_IVA2_SHIFT 2
665#define OMAP3430ES2_EN_IVA2_MASK (1 << 2)
666
667/* CM_CLKSTCTRL_USBHOST */
668#define OMAP3430ES2_CLKTRCTRL_USBHOST_SHIFT 0
669#define OMAP3430ES2_CLKTRCTRL_USBHOST_MASK (3 << 0)
670
671
672
673#endif
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
new file mode 100644
index 000000000000..8489f3029fed
--- /dev/null
+++ b/arch/arm/mach-omap2/cm.h
@@ -0,0 +1,124 @@
1#ifndef __ARCH_ASM_MACH_OMAP2_CM_H
2#define __ARCH_ASM_MACH_OMAP2_CM_H
3
4/*
5 * OMAP2/3 Clock Management (CM) register definitions
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "prcm-common.h"
18
19#ifndef __ASSEMBLER__
20#define OMAP_CM_REGADDR(module, reg) \
21 (void __iomem *)IO_ADDRESS(OMAP2_CM_BASE + (module) + (reg))
22#else
23#define OMAP2420_CM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
25#define OMAP2430_CM_REGADDR(module, reg) \
26 IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
27#define OMAP34XX_CM_REGADDR(module, reg) \
28 IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
29#endif
30
31/*
32 * Architecture-specific global CM registers
33 * Use cm_{read,write}_reg() with these registers.
34 * These registers appear once per CM module.
35 */
36
37#define OMAP3430_CM_REVISION OMAP_CM_REGADDR(OCP_MOD, 0x0000)
38#define OMAP3430_CM_SYSCONFIG OMAP_CM_REGADDR(OCP_MOD, 0x0010)
39#define OMAP3430_CM_POLCTRL OMAP_CM_REGADDR(OCP_MOD, 0x009c)
40
41#define OMAP3430_CM_CLKOUT_CTRL OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
42
43/*
44 * Module specific CM registers from CM_BASE + domain offset
45 * Use cm_{read,write}_mod_reg() with these registers.
46 * These register offsets generally appear in more than one PRCM submodule.
47 */
48
49/* Common between 24xx and 34xx */
50
51#define CM_FCLKEN 0x0000
52#define CM_FCLKEN1 CM_FCLKEN
53#define CM_CLKEN CM_FCLKEN
54#define CM_ICLKEN 0x0010
55#define CM_ICLKEN1 CM_ICLKEN
56#define CM_ICLKEN2 0x0014
57#define CM_ICLKEN3 0x0018
58#define CM_IDLEST 0x0020
59#define CM_IDLEST1 CM_IDLEST
60#define CM_IDLEST2 0x0024
61#define CM_AUTOIDLE 0x0030
62#define CM_AUTOIDLE1 CM_AUTOIDLE
63#define CM_AUTOIDLE2 0x0034
64#define CM_AUTOIDLE3 0x0038
65#define CM_CLKSEL 0x0040
66#define CM_CLKSEL1 CM_CLKSEL
67#define CM_CLKSEL2 0x0044
68#define CM_CLKSTCTRL 0x0048
69
70
71/* Architecture-specific registers */
72
73#define OMAP24XX_CM_FCLKEN2 0x0004
74#define OMAP24XX_CM_ICLKEN4 0x001c
75#define OMAP24XX_CM_AUTOIDLE4 0x003c
76
77#define OMAP2430_CM_IDLEST3 0x0028
78
79#define OMAP3430_CM_CLKEN_PLL 0x0004
80#define OMAP3430ES2_CM_CLKEN2 0x0004
81#define OMAP3430ES2_CM_FCLKEN3 0x0008
82#define OMAP3430_CM_IDLEST_PLL CM_IDLEST2
83#define OMAP3430_CM_AUTOIDLE_PLL CM_AUTOIDLE2
84#define OMAP3430_CM_CLKSEL1 CM_CLKSEL
85#define OMAP3430_CM_CLKSEL1_PLL CM_CLKSEL
86#define OMAP3430_CM_CLKSEL2_PLL CM_CLKSEL2
87#define OMAP3430_CM_SLEEPDEP CM_CLKSEL2
88#define OMAP3430_CM_CLKSEL3 CM_CLKSTCTRL
89#define OMAP3430_CM_CLKSTST 0x004c
90#define OMAP3430ES2_CM_CLKSEL4 0x004c
91#define OMAP3430ES2_CM_CLKSEL5 0x0050
92#define OMAP3430_CM_CLKSEL2_EMU 0x0050
93#define OMAP3430_CM_CLKSEL3_EMU 0x0054
94
95
96/* Clock management domain register get/set */
97
98#ifndef __ASSEMBLER__
99static inline void cm_write_mod_reg(u32 val, s16 module, s16 idx)
100{
101 __raw_writel(val, OMAP_CM_REGADDR(module, idx));
102}
103
104static inline u32 cm_read_mod_reg(s16 module, s16 idx)
105{
106 return __raw_readl(OMAP_CM_REGADDR(module, idx));
107}
108#endif
109
110/* CM register bits shared between 24XX and 3430 */
111
112/* CM_CLKSEL_GFX */
113#define OMAP_CLKSEL_GFX_SHIFT 0
114#define OMAP_CLKSEL_GFX_MASK (0x7 << 0)
115
116/* CM_ICLKEN_GFX */
117#define OMAP_EN_GFX_SHIFT 0
118#define OMAP_EN_GFX (1 << 0)
119
120/* CM_IDLEST_GFX */
121#define OMAP_ST_GFX (1 << 0)
122
123
124#endif
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
new file mode 100644
index 000000000000..a5d86a49c213
--- /dev/null
+++ b/arch/arm/mach-omap2/control.c
@@ -0,0 +1,74 @@
1/*
2 * OMAP2/3 System Control Module register access
3 *
4 * Copyright (C) 2007 Texas Instruments, Inc.
5 * Copyright (C) 2007 Nokia Corporation
6 *
7 * Written by Paul Walmsley
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#undef DEBUG
14
15#include <linux/kernel.h>
16
17#include <asm/io.h>
18
19#include <asm/arch/control.h>
20
21static u32 omap2_ctrl_base;
22
23#define OMAP_CTRL_REGADDR(reg) (void __iomem *)IO_ADDRESS(omap2_ctrl_base \
24 + (reg))
25
26void omap_ctrl_base_set(u32 base)
27{
28 omap2_ctrl_base = base;
29}
30
31u32 omap_ctrl_base_get(void)
32{
33 return omap2_ctrl_base;
34}
35
36u8 omap_ctrl_readb(u16 offset)
37{
38 return __raw_readb(OMAP_CTRL_REGADDR(offset));
39}
40
41u16 omap_ctrl_readw(u16 offset)
42{
43 return __raw_readw(OMAP_CTRL_REGADDR(offset));
44}
45
46u32 omap_ctrl_readl(u16 offset)
47{
48 return __raw_readl(OMAP_CTRL_REGADDR(offset));
49}
50
51void omap_ctrl_writeb(u8 val, u16 offset)
52{
53 pr_debug("omap_ctrl_writeb: writing 0x%0x to 0x%0x\n", val,
54 (u32)OMAP_CTRL_REGADDR(offset));
55
56 __raw_writeb(val, OMAP_CTRL_REGADDR(offset));
57}
58
59void omap_ctrl_writew(u16 val, u16 offset)
60{
61 pr_debug("omap_ctrl_writew: writing 0x%0x to 0x%0x\n", val,
62 (u32)OMAP_CTRL_REGADDR(offset));
63
64 __raw_writew(val, OMAP_CTRL_REGADDR(offset));
65}
66
67void omap_ctrl_writel(u32 val, u16 offset)
68{
69 pr_debug("omap_ctrl_writel: writing 0x%0x to 0x%0x\n", val,
70 (u32)OMAP_CTRL_REGADDR(offset));
71
72 __raw_writel(val, OMAP_CTRL_REGADDR(offset));
73}
74
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 5a4cc2076a7d..02cede295e89 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -69,7 +69,7 @@ static void __iomem *gpmc_base =
69static void __iomem *gpmc_cs_base = 69static void __iomem *gpmc_cs_base =
70 (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0; 70 (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0;
71 71
72static struct clk *gpmc_l3_clk; 72static struct clk *gpmc_fck;
73 73
74static void gpmc_write_reg(int idx, u32 val) 74static void gpmc_write_reg(int idx, u32 val)
75{ 75{
@@ -94,11 +94,10 @@ u32 gpmc_cs_read_reg(int cs, int idx)
94 return __raw_readl(gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx); 94 return __raw_readl(gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx);
95} 95}
96 96
97/* TODO: Add support for gpmc_fck to clock framework and use it */
98unsigned long gpmc_get_fclk_period(void) 97unsigned long gpmc_get_fclk_period(void)
99{ 98{
100 /* In picoseconds */ 99 /* In picoseconds */
101 return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000); 100 return 1000000000 / ((clk_get_rate(gpmc_fck)) / 1000);
102} 101}
103 102
104unsigned int gpmc_ns_to_ticks(unsigned int time_ns) 103unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
@@ -398,8 +397,11 @@ void __init gpmc_init(void)
398{ 397{
399 u32 l; 398 u32 l;
400 399
401 gpmc_l3_clk = clk_get(NULL, "core_l3_ck"); 400 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
402 BUG_ON(IS_ERR(gpmc_l3_clk)); 401 if (IS_ERR(gpmc_fck))
402 WARN_ON(1);
403 else
404 clk_enable(gpmc_fck);
403 405
404 l = gpmc_read_reg(GPMC_REVISION); 406 l = gpmc_read_reg(GPMC_REVISION);
405 printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); 407 printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c
index 3e5d8cd4ea4f..12479081881a 100644
--- a/arch/arm/mach-omap2/memory.c
+++ b/arch/arm/mach-omap2/memory.c
@@ -27,11 +27,16 @@
27#include <asm/arch/clock.h> 27#include <asm/arch/clock.h>
28#include <asm/arch/sram.h> 28#include <asm/arch/sram.h>
29 29
30#include "prcm-regs.h" 30#include "prm.h"
31
31#include "memory.h" 32#include "memory.h"
33#include "sdrc.h"
32 34
35unsigned long omap2_sdrc_base;
36unsigned long omap2_sms_base;
33 37
34static struct memory_timings mem_timings; 38static struct memory_timings mem_timings;
39static u32 curr_perf_level = CORE_CLK_SRC_DPLL_X2;
35 40
36u32 omap2_memory_get_slow_dll_ctrl(void) 41u32 omap2_memory_get_slow_dll_ctrl(void)
37{ 42{
@@ -48,12 +53,60 @@ u32 omap2_memory_get_type(void)
48 return mem_timings.m_type; 53 return mem_timings.m_type;
49} 54}
50 55
56/*
57 * Check the DLL lock state, and return tue if running in unlock mode.
58 * This is needed to compensate for the shifted DLL value in unlock mode.
59 */
60u32 omap2_dll_force_needed(void)
61{
62 /* dlla and dllb are a set */
63 u32 dll_state = sdrc_read_reg(SDRC_DLLA_CTRL);
64
65 if ((dll_state & (1 << 2)) == (1 << 2))
66 return 1;
67 else
68 return 0;
69}
70
71/*
72 * 'level' is the value to store to CM_CLKSEL2_PLL.CORE_CLK_SRC.
73 * Practical values are CORE_CLK_SRC_DPLL (for CORE_CLK = DPLL_CLK) or
74 * CORE_CLK_SRC_DPLL_X2 (for CORE_CLK = * DPLL_CLK * 2)
75 */
76u32 omap2_reprogram_sdrc(u32 level, u32 force)
77{
78 u32 dll_ctrl, m_type;
79 u32 prev = curr_perf_level;
80 unsigned long flags;
81
82 if ((curr_perf_level == level) && !force)
83 return prev;
84
85 if (level == CORE_CLK_SRC_DPLL) {
86 dll_ctrl = omap2_memory_get_slow_dll_ctrl();
87 } else if (level == CORE_CLK_SRC_DPLL_X2) {
88 dll_ctrl = omap2_memory_get_fast_dll_ctrl();
89 } else {
90 return prev;
91 }
92
93 m_type = omap2_memory_get_type();
94
95 local_irq_save(flags);
96 __raw_writel(0xffff, OMAP24XX_PRCM_VOLTSETUP);
97 omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type);
98 curr_perf_level = level;
99 local_irq_restore(flags);
100
101 return prev;
102}
103
51void omap2_init_memory_params(u32 force_lock_to_unlock_mode) 104void omap2_init_memory_params(u32 force_lock_to_unlock_mode)
52{ 105{
53 unsigned long dll_cnt; 106 unsigned long dll_cnt;
54 u32 fast_dll = 0; 107 u32 fast_dll = 0;
55 108
56 mem_timings.m_type = !((SDRC_MR_0 & 0x3) == 0x1); /* DDR = 1, SDR = 0 */ 109 mem_timings.m_type = !((sdrc_read_reg(SDRC_MR_0) & 0x3) == 0x1); /* DDR = 1, SDR = 0 */
57 110
58 /* 2422 es2.05 and beyond has a single SIP DDR instead of 2 like others. 111 /* 2422 es2.05 and beyond has a single SIP DDR instead of 2 like others.
59 * In the case of 2422, its ok to use CS1 instead of CS0. 112 * In the case of 2422, its ok to use CS1 instead of CS0.
@@ -73,11 +126,11 @@ void omap2_init_memory_params(u32 force_lock_to_unlock_mode)
73 mem_timings.dll_mode = M_LOCK; 126 mem_timings.dll_mode = M_LOCK;
74 127
75 if (mem_timings.base_cs == 0) { 128 if (mem_timings.base_cs == 0) {
76 fast_dll = SDRC_DLLA_CTRL; 129 fast_dll = sdrc_read_reg(SDRC_DLLA_CTRL);
77 dll_cnt = SDRC_DLLA_STATUS & 0xff00; 130 dll_cnt = sdrc_read_reg(SDRC_DLLA_STATUS) & 0xff00;
78 } else { 131 } else {
79 fast_dll = SDRC_DLLB_CTRL; 132 fast_dll = sdrc_read_reg(SDRC_DLLB_CTRL);
80 dll_cnt = SDRC_DLLB_STATUS & 0xff00; 133 dll_cnt = sdrc_read_reg(SDRC_DLLB_STATUS) & 0xff00;
81 } 134 }
82 if (force_lock_to_unlock_mode) { 135 if (force_lock_to_unlock_mode) {
83 fast_dll &= ~0xff00; 136 fast_dll &= ~0xff00;
@@ -106,14 +159,13 @@ void __init omap2_init_memory(void)
106{ 159{
107 u32 l; 160 u32 l;
108 161
109 l = SMS_SYSCONFIG; 162 l = sms_read_reg(SMS_SYSCONFIG);
110 l &= ~(0x3 << 3); 163 l &= ~(0x3 << 3);
111 l |= (0x2 << 3); 164 l |= (0x2 << 3);
112 SMS_SYSCONFIG = l; 165 sms_write_reg(l, SMS_SYSCONFIG);
113 166
114 l = SDRC_SYSCONFIG; 167 l = sdrc_read_reg(SDRC_SYSCONFIG);
115 l &= ~(0x3 << 3); 168 l &= ~(0x3 << 3);
116 l |= (0x2 << 3); 169 l |= (0x2 << 3);
117 SDRC_SYSCONFIG = l; 170 sdrc_write_reg(l, SDRC_SYSCONFIG);
118
119} 171}
diff --git a/arch/arm/mach-omap2/memory.h b/arch/arm/mach-omap2/memory.h
index d212eea83a05..9a280b50a893 100644
--- a/arch/arm/mach-omap2/memory.h
+++ b/arch/arm/mach-omap2/memory.h
@@ -32,3 +32,5 @@ extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode);
32extern u32 omap2_memory_get_slow_dll_ctrl(void); 32extern u32 omap2_memory_get_slow_dll_ctrl(void);
33extern u32 omap2_memory_get_fast_dll_ctrl(void); 33extern u32 omap2_memory_get_fast_dll_ctrl(void);
34extern u32 omap2_memory_get_type(void); 34extern u32 omap2_memory_get_type(void);
35u32 omap2_dll_force_needed(void);
36u32 omap2_reprogram_sdrc(u32 level, u32 force);
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 05750975d746..930770012a75 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -1,11 +1,12 @@
1/* 1/*
2 * linux/arch/arm/mach-omap2/mux.c 2 * linux/arch/arm/mach-omap2/mux.c
3 * 3 *
4 * OMAP1 pin multiplexing configurations 4 * OMAP2 pin multiplexing configurations
5 * 5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation 6 * Copyright (C) 2004 - 2008 Texas Instruments Inc.
7 * Copyright (C) 2003 - 2008 Nokia Corporation
7 * 8 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com> 9 * Written by Tony Lindgren
9 * 10 *
10 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
@@ -28,13 +29,17 @@
28#include <asm/io.h> 29#include <asm/io.h>
29#include <linux/spinlock.h> 30#include <linux/spinlock.h>
30 31
32#include <asm/arch/control.h>
31#include <asm/arch/mux.h> 33#include <asm/arch/mux.h>
32 34
33#ifdef CONFIG_OMAP_MUX 35#ifdef CONFIG_OMAP_MUX
34 36
37static struct omap_mux_cfg arch_mux_cfg;
38
35/* NOTE: See mux.h for the enumeration */ 39/* NOTE: See mux.h for the enumeration */
36 40
37struct pin_config __initdata_or_module omap24xx_pins[] = { 41#ifdef CONFIG_ARCH_OMAP24XX
42static struct pin_config __initdata_or_module omap24xx_pins[] = {
38/* 43/*
39 * description mux mux pull pull debug 44 * description mux mux pull pull debug
40 * offset mode ena type 45 * offset mode ena type
@@ -77,7 +82,12 @@ MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
77MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) 82MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
78MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) 83MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1)
79MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) 84MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1)
85MUX_CFG_24XX("N15_24XX_GPIO85", 0x103, 3, 0, 0, 1)
80MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) 86MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1)
87MUX_CFG_24XX("P20_24XX_GPIO93", 0x10b, 3, 0, 0, 1)
88MUX_CFG_24XX("P18_24XX_GPIO95", 0x10d, 3, 0, 0, 1)
89MUX_CFG_24XX("M18_24XX_GPIO96", 0x10e, 3, 0, 0, 1)
90MUX_CFG_24XX("L14_24XX_GPIO97", 0x10f, 3, 0, 0, 1)
81MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1) 91MUX_CFG_24XX("J15_24XX_GPIO99", 0x113, 3, 1, 1, 1)
82MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) 92MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1)
83MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1) 93MUX_CFG_24XX("P14_24XX_GPIO125", 0x140, 3, 1, 1, 1)
@@ -102,9 +112,6 @@ MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1)
102MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1) 112MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1)
103MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1) 113MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1)
104 114
105/* TSC IRQ */
106MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1)
107
108/* UART3 */ 115/* UART3 */
109MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1) 116MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1)
110MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1) 117MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1)
@@ -167,12 +174,108 @@ MUX_CFG_24XX("B3__24XX_KBR5", 0x30, 3, 1, 1, 1)
167MUX_CFG_24XX("AA4_24XX_KBC2", 0xe7, 3, 0, 0, 1) 174MUX_CFG_24XX("AA4_24XX_KBC2", 0xe7, 3, 0, 0, 1)
168MUX_CFG_24XX("B13_24XX_KBC6", 0x110, 3, 0, 0, 1) 175MUX_CFG_24XX("B13_24XX_KBC6", 0x110, 3, 0, 0, 1)
169 176
177/* 2430 USB */
178MUX_CFG_24XX("AD9_2430_USB0_PUEN", 0x133, 4, 0, 0, 1)
179MUX_CFG_24XX("Y11_2430_USB0_VP", 0x134, 4, 0, 0, 1)
180MUX_CFG_24XX("AD7_2430_USB0_VM", 0x135, 4, 0, 0, 1)
181MUX_CFG_24XX("AE7_2430_USB0_RCV", 0x136, 4, 0, 0, 1)
182MUX_CFG_24XX("AD4_2430_USB0_TXEN", 0x137, 4, 0, 0, 1)
183MUX_CFG_24XX("AF9_2430_USB0_SE0", 0x138, 4, 0, 0, 1)
184MUX_CFG_24XX("AE6_2430_USB0_DAT", 0x139, 4, 0, 0, 1)
185MUX_CFG_24XX("AD24_2430_USB1_SE0", 0x107, 2, 0, 0, 1)
186MUX_CFG_24XX("AB24_2430_USB1_RCV", 0x108, 2, 0, 0, 1)
187MUX_CFG_24XX("Y25_2430_USB1_TXEN", 0x109, 2, 0, 0, 1)
188MUX_CFG_24XX("AA26_2430_USB1_DAT", 0x10A, 2, 0, 0, 1)
189
190/* 2430 HS-USB */
191MUX_CFG_24XX("AD9_2430_USB0HS_DATA3", 0x133, 0, 0, 0, 1)
192MUX_CFG_24XX("Y11_2430_USB0HS_DATA4", 0x134, 0, 0, 0, 1)
193MUX_CFG_24XX("AD7_2430_USB0HS_DATA5", 0x135, 0, 0, 0, 1)
194MUX_CFG_24XX("AE7_2430_USB0HS_DATA6", 0x136, 0, 0, 0, 1)
195MUX_CFG_24XX("AD4_2430_USB0HS_DATA2", 0x137, 0, 0, 0, 1)
196MUX_CFG_24XX("AF9_2430_USB0HS_DATA0", 0x138, 0, 0, 0, 1)
197MUX_CFG_24XX("AE6_2430_USB0HS_DATA1", 0x139, 0, 0, 0, 1)
198MUX_CFG_24XX("AE8_2430_USB0HS_CLK", 0x13A, 0, 0, 0, 1)
199MUX_CFG_24XX("AD8_2430_USB0HS_DIR", 0x13B, 0, 0, 0, 1)
200MUX_CFG_24XX("AE5_2430_USB0HS_STP", 0x13c, 0, 1, 1, 1)
201MUX_CFG_24XX("AE9_2430_USB0HS_NXT", 0x13D, 0, 0, 0, 1)
202MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1)
203
204/* 2430 McBSP */
205MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1)
206MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1)
207MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1)
208MUX_CFG_24XX("AD13_2430_MCBSP2_DR", 0x0131, 1, 0, 0, 1)
209MUX_CFG_24XX("AC10_2430_MCBSP2_FSX_OFF",0x012E, 0, 0, 0, 1)
210MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1)
211MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1)
212MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1)
170}; 213};
171 214
172int __init omap2_mux_init(void) 215#define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins)
216
217#else
218#define omap24xx_pins NULL
219#define OMAP24XX_PINS_SZ 0
220#endif /* CONFIG_ARCH_OMAP24XX */
221
222#define OMAP24XX_PULL_ENA (1 << 3)
223#define OMAP24XX_PULL_UP (1 << 4)
224
225#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
226void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u8 reg)
173{ 227{
174 omap_mux_register(omap24xx_pins, ARRAY_SIZE(omap24xx_pins)); 228 u16 orig;
229 u8 warn = 0, debug = 0;
230
231 orig = omap_ctrl_readb(cfg->mux_reg);
232
233#ifdef CONFIG_OMAP_MUX_DEBUG
234 debug = cfg->debug;
235#endif
236 warn = (orig != reg);
237 if (debug || warn)
238 printk(KERN_WARNING
239 "MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
240 cfg->name, omap_ctrl_base_get() + cfg->mux_reg,
241 orig, reg);
242}
243#else
244#define omap2_cfg_debug(x, y) do {} while (0)
245#endif
246
247#ifdef CONFIG_ARCH_OMAP24XX
248int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
249{
250 static DEFINE_SPINLOCK(mux_spin_lock);
251 unsigned long flags;
252 u8 reg = 0;
253
254 spin_lock_irqsave(&mux_spin_lock, flags);
255 reg |= cfg->mask & 0x7;
256 if (cfg->pull_val)
257 reg |= OMAP24XX_PULL_ENA;
258 if (cfg->pu_pd_val)
259 reg |= OMAP24XX_PULL_UP;
260 omap2_cfg_debug(cfg, reg);
261 omap_ctrl_writeb(reg, cfg->mux_reg);
262 spin_unlock_irqrestore(&mux_spin_lock, flags);
263
175 return 0; 264 return 0;
176} 265}
266#else
267#define omap24xx_cfg_reg 0
268#endif
269
270int __init omap2_mux_init(void)
271{
272 if (cpu_is_omap24xx()) {
273 arch_mux_cfg.pins = omap24xx_pins;
274 arch_mux_cfg.size = OMAP24XX_PINS_SZ;
275 arch_mux_cfg.cfg_reg = omap24xx_cfg_reg;
276 }
277
278 return omap_mux_register(&arch_mux_cfg);
279}
177 280
178#endif 281#endif
diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c
deleted file mode 100644
index 2494091a078b..000000000000
--- a/arch/arm/mach-omap2/pm-domain.c
+++ /dev/null
@@ -1,299 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/pm-domain.c
3 *
4 * Power domain functions for OMAP2
5 *
6 * Copyright (C) 2006 Nokia Corporation
7 * Tony Lindgren <tony@atomide.com>
8 *
9 * Some code based on earlier OMAP2 sample PM code
10 * Copyright (C) 2005 Texas Instruments, Inc.
11 * Richard Woodruff <r-woodruff2@ti.com>
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/init.h>
20#include <linux/clk.h>
21
22#include <asm/io.h>
23
24#include "prcm-regs.h"
25
26/* Power domain offsets */
27#define PM_MPU_OFFSET 0x100
28#define PM_CORE_OFFSET 0x200
29#define PM_GFX_OFFSET 0x300
30#define PM_WKUP_OFFSET 0x400 /* Autoidle only */
31#define PM_PLL_OFFSET 0x500 /* Autoidle only */
32#define PM_DSP_OFFSET 0x800
33#define PM_MDM_OFFSET 0xc00
34
35/* Power domain wake-up dependency control register */
36#define PM_WKDEP_OFFSET 0xc8
37#define EN_MDM (1 << 5)
38#define EN_WKUP (1 << 4)
39#define EN_GFX (1 << 3)
40#define EN_DSP (1 << 2)
41#define EN_MPU (1 << 1)
42#define EN_CORE (1 << 0)
43
44/* Core power domain state transition control register */
45#define PM_PWSTCTRL_OFFSET 0xe0
46#define FORCESTATE (1 << 18) /* Only for DSP & GFX */
47#define MEM4RETSTATE (1 << 6)
48#define MEM3RETSTATE (1 << 5)
49#define MEM2RETSTATE (1 << 4)
50#define MEM1RETSTATE (1 << 3)
51#define LOGICRETSTATE (1 << 2) /* Logic is retained */
52#define POWERSTATE_OFF 0x3
53#define POWERSTATE_RETENTION 0x1
54#define POWERSTATE_ON 0x0
55
56/* Power domain state register */
57#define PM_PWSTST_OFFSET 0xe4
58
59/* Hardware supervised state transition control register */
60#define CM_CLKSTCTRL_OFFSET 0x48
61#define AUTOSTAT_MPU (1 << 0) /* MPU */
62#define AUTOSTAT_DSS (1 << 2) /* Core */
63#define AUTOSTAT_L4 (1 << 1) /* Core */
64#define AUTOSTAT_L3 (1 << 0) /* Core */
65#define AUTOSTAT_GFX (1 << 0) /* GFX */
66#define AUTOSTAT_IVA (1 << 8) /* 2420 IVA in DSP domain */
67#define AUTOSTAT_DSP (1 << 0) /* DSP */
68#define AUTOSTAT_MDM (1 << 0) /* MDM */
69
70/* Automatic control of interface clock idling */
71#define CM_AUTOIDLE1_OFFSET 0x30
72#define CM_AUTOIDLE2_OFFSET 0x34 /* Core only */
73#define CM_AUTOIDLE3_OFFSET 0x38 /* Core only */
74#define CM_AUTOIDLE4_OFFSET 0x3c /* Core only */
75#define AUTO_54M(x) (((x) & 0x3) << 6)
76#define AUTO_96M(x) (((x) & 0x3) << 2)
77#define AUTO_DPLL(x) (((x) & 0x3) << 0)
78#define AUTO_STOPPED 0x3
79#define AUTO_BYPASS_FAST 0x2 /* DPLL only */
80#define AUTO_BYPASS_LOW_POWER 0x1 /* DPLL only */
81#define AUTO_DISABLED 0x0
82
83/* Voltage control PRCM_VOLTCTRL bits */
84#define AUTO_EXTVOLT (1 << 15)
85#define FORCE_EXTVOLT (1 << 14)
86#define SETOFF_LEVEL(x) (((x) & 0x3) << 12)
87#define MEMRETCTRL (1 << 8)
88#define SETRET_LEVEL(x) (((x) & 0x3) << 6)
89#define VOLT_LEVEL(x) (((x) & 0x3) << 0)
90
91#define OMAP24XX_PRCM_VBASE IO_ADDRESS(OMAP24XX_PRCM_BASE)
92#define prcm_readl(r) __raw_readl(OMAP24XX_PRCM_VBASE + (r))
93#define prcm_writel(v, r) __raw_writel((v), OMAP24XX_PRCM_VBASE + (r))
94
95static u32 pmdomain_get_wakeup_dependencies(int domain_offset)
96{
97 return prcm_readl(domain_offset + PM_WKDEP_OFFSET);
98}
99
100static void pmdomain_set_wakeup_dependencies(u32 state, int domain_offset)
101{
102 prcm_writel(state, domain_offset + PM_WKDEP_OFFSET);
103}
104
105static u32 pmdomain_get_powerstate(int domain_offset)
106{
107 return prcm_readl(domain_offset + PM_PWSTCTRL_OFFSET);
108}
109
110static void pmdomain_set_powerstate(u32 state, int domain_offset)
111{
112 prcm_writel(state, domain_offset + PM_PWSTCTRL_OFFSET);
113}
114
115static u32 pmdomain_get_clock_autocontrol(int domain_offset)
116{
117 return prcm_readl(domain_offset + CM_CLKSTCTRL_OFFSET);
118}
119
120static void pmdomain_set_clock_autocontrol(u32 state, int domain_offset)
121{
122 prcm_writel(state, domain_offset + CM_CLKSTCTRL_OFFSET);
123}
124
125static u32 pmdomain_get_clock_autoidle1(int domain_offset)
126{
127 return prcm_readl(domain_offset + CM_AUTOIDLE1_OFFSET);
128}
129
130/* Core domain only */
131static u32 pmdomain_get_clock_autoidle2(int domain_offset)
132{
133 return prcm_readl(domain_offset + CM_AUTOIDLE2_OFFSET);
134}
135
136/* Core domain only */
137static u32 pmdomain_get_clock_autoidle3(int domain_offset)
138{
139 return prcm_readl(domain_offset + CM_AUTOIDLE3_OFFSET);
140}
141
142/* Core domain only */
143static u32 pmdomain_get_clock_autoidle4(int domain_offset)
144{
145 return prcm_readl(domain_offset + CM_AUTOIDLE4_OFFSET);
146}
147
148static void pmdomain_set_clock_autoidle1(u32 state, int domain_offset)
149{
150 prcm_writel(state, CM_AUTOIDLE1_OFFSET + domain_offset);
151}
152
153/* Core domain only */
154static void pmdomain_set_clock_autoidle2(u32 state, int domain_offset)
155{
156 prcm_writel(state, CM_AUTOIDLE2_OFFSET + domain_offset);
157}
158
159/* Core domain only */
160static void pmdomain_set_clock_autoidle3(u32 state, int domain_offset)
161{
162 prcm_writel(state, CM_AUTOIDLE3_OFFSET + domain_offset);
163}
164
165/* Core domain only */
166static void pmdomain_set_clock_autoidle4(u32 state, int domain_offset)
167{
168 prcm_writel(state, CM_AUTOIDLE4_OFFSET + domain_offset);
169}
170
171/*
172 * Configures power management domains to idle clocks automatically.
173 */
174void pmdomain_set_autoidle(void)
175{
176 u32 val;
177
178 /* Set PLL auto stop for 54M, 96M & DPLL */
179 pmdomain_set_clock_autoidle1(AUTO_54M(AUTO_STOPPED) |
180 AUTO_96M(AUTO_STOPPED) |
181 AUTO_DPLL(AUTO_STOPPED), PM_PLL_OFFSET);
182
183 /* External clock input control
184 * REVISIT: Should this be in clock framework?
185 */
186 PRCM_CLKSRC_CTRL |= (0x3 << 3);
187
188 /* Configure number of 32KHz clock cycles for sys_clk */
189 PRCM_CLKSSETUP = 0x00ff;
190
191 /* Configure automatic voltage transition */
192 PRCM_VOLTSETUP = 0;
193 val = PRCM_VOLTCTRL;
194 val &= ~(SETOFF_LEVEL(0x3) | VOLT_LEVEL(0x3));
195 val |= SETOFF_LEVEL(1) | VOLT_LEVEL(1) | AUTO_EXTVOLT;
196 PRCM_VOLTCTRL = val;
197
198 /* Disable emulation tools functional clock */
199 PRCM_CLKEMUL_CTRL = 0x0;
200
201 /* Set core memory retention state */
202 val = pmdomain_get_powerstate(PM_CORE_OFFSET);
203 if (cpu_is_omap2420()) {
204 val &= ~(0x7 << 3);
205 val |= (MEM3RETSTATE | MEM2RETSTATE | MEM1RETSTATE);
206 } else {
207 val &= ~(0xf << 3);
208 val |= (MEM4RETSTATE | MEM3RETSTATE | MEM2RETSTATE |
209 MEM1RETSTATE);
210 }
211 pmdomain_set_powerstate(val, PM_CORE_OFFSET);
212
213 /* OCP interface smart idle. REVISIT: Enable autoidle bit0 ? */
214 val = SMS_SYSCONFIG;
215 val &= ~(0x3 << 3);
216 val |= (0x2 << 3) | (1 << 0);
217 SMS_SYSCONFIG |= val;
218
219 val = SDRC_SYSCONFIG;
220 val &= ~(0x3 << 3);
221 val |= (0x2 << 3);
222 SDRC_SYSCONFIG = val;
223
224 /* Configure L3 interface for smart idle.
225 * REVISIT: Enable autoidle bit0 ?
226 */
227 val = GPMC_SYSCONFIG;
228 val &= ~(0x3 << 3);
229 val |= (0x2 << 3) | (1 << 0);
230 GPMC_SYSCONFIG = val;
231
232 pmdomain_set_powerstate(LOGICRETSTATE | POWERSTATE_RETENTION,
233 PM_MPU_OFFSET);
234 pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_CORE_OFFSET);
235 if (!cpu_is_omap2420())
236 pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_MDM_OFFSET);
237
238 /* Assume suspend function has saved the state for DSP and GFX */
239 pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_DSP_OFFSET);
240 pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_GFX_OFFSET);
241
242#if 0
243 /* REVISIT: Internal USB needs special handling */
244 force_standby_usb();
245 if (cpu_is_omap2430())
246 force_hsmmc();
247 sdram_self_refresh_on_idle_req(1);
248#endif
249
250 /* Enable clock auto control for all domains.
251 * Note that CORE domain includes also DSS, L4 & L3.
252 */
253 pmdomain_set_clock_autocontrol(AUTOSTAT_MPU, PM_MPU_OFFSET);
254 pmdomain_set_clock_autocontrol(AUTOSTAT_GFX, PM_GFX_OFFSET);
255 pmdomain_set_clock_autocontrol(AUTOSTAT_DSS | AUTOSTAT_L4 | AUTOSTAT_L3,
256 PM_CORE_OFFSET);
257 if (cpu_is_omap2420())
258 pmdomain_set_clock_autocontrol(AUTOSTAT_IVA | AUTOSTAT_DSP,
259 PM_DSP_OFFSET);
260 else {
261 pmdomain_set_clock_autocontrol(AUTOSTAT_DSP, PM_DSP_OFFSET);
262 pmdomain_set_clock_autocontrol(AUTOSTAT_MDM, PM_MDM_OFFSET);
263 }
264
265 /* Enable clock autoidle for all domains */
266 pmdomain_set_clock_autoidle1(0x2, PM_DSP_OFFSET);
267 if (cpu_is_omap2420()) {
268 pmdomain_set_clock_autoidle1(0xfffffff9, PM_CORE_OFFSET);
269 pmdomain_set_clock_autoidle2(0x7, PM_CORE_OFFSET);
270 pmdomain_set_clock_autoidle1(0x3f, PM_WKUP_OFFSET);
271 } else {
272 pmdomain_set_clock_autoidle1(0xeafffff1, PM_CORE_OFFSET);
273 pmdomain_set_clock_autoidle2(0xfff, PM_CORE_OFFSET);
274 pmdomain_set_clock_autoidle1(0x7f, PM_WKUP_OFFSET);
275 pmdomain_set_clock_autoidle1(0x3, PM_MDM_OFFSET);
276 }
277 pmdomain_set_clock_autoidle3(0x7, PM_CORE_OFFSET);
278 pmdomain_set_clock_autoidle4(0x1f, PM_CORE_OFFSET);
279}
280
281/*
282 * Initializes power domains by removing wake-up dependencies and powering
283 * down DSP and GFX. Gets called from PM init. Note that DSP and IVA code
284 * must re-enable DSP and GFX when used.
285 */
286void __init pmdomain_init(void)
287{
288 /* Remove all domain wakeup dependencies */
289 pmdomain_set_wakeup_dependencies(EN_WKUP | EN_CORE, PM_MPU_OFFSET);
290 pmdomain_set_wakeup_dependencies(0, PM_DSP_OFFSET);
291 pmdomain_set_wakeup_dependencies(0, PM_GFX_OFFSET);
292 pmdomain_set_wakeup_dependencies(EN_WKUP | EN_MPU, PM_CORE_OFFSET);
293 if (cpu_is_omap2430())
294 pmdomain_set_wakeup_dependencies(0, PM_MDM_OFFSET);
295
296 /* Power down DSP and GFX */
297 pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_DSP_OFFSET);
298 pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_GFX_OFFSET);
299}
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index baf7d82b458b..aad781dcf1b1 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -23,6 +23,7 @@
23#include <linux/sysfs.h> 23#include <linux/sysfs.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/clk.h>
26 27
27#include <asm/io.h> 28#include <asm/io.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
@@ -36,8 +37,6 @@
36#include <asm/arch/sram.h> 37#include <asm/arch/sram.h>
37#include <asm/arch/pm.h> 38#include <asm/arch/pm.h>
38 39
39#include "prcm-regs.h"
40
41static struct clk *vclk; 40static struct clk *vclk;
42static void (*omap2_sram_idle)(void); 41static void (*omap2_sram_idle)(void);
43static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev); 42static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev);
@@ -78,251 +77,8 @@ static int omap2_pm_prepare(void)
78 return 0; 77 return 0;
79} 78}
80 79
81#define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \
82 OMAP_IRQ_BIT(INT_24XX_GPIO_BANK2) | \
83 OMAP_IRQ_BIT(INT_24XX_GPIO_BANK3))
84
85#define INT1_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK4))
86
87#define INT2_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_UART1_IRQ) | \
88 OMAP_IRQ_BIT(INT_24XX_UART2_IRQ) | \
89 OMAP_IRQ_BIT(INT_24XX_UART3_IRQ))
90
91#define preg(reg) printk("%s\t(0x%p):\t0x%08x\n", #reg, &reg, reg);
92
93static void omap2_pm_debug(char * desc)
94{
95 printk("%s:\n", desc);
96
97 preg(CM_CLKSTCTRL_MPU);
98 preg(CM_CLKSTCTRL_CORE);
99 preg(CM_CLKSTCTRL_GFX);
100 preg(CM_CLKSTCTRL_DSP);
101 preg(CM_CLKSTCTRL_MDM);
102
103 preg(PM_PWSTCTRL_MPU);
104 preg(PM_PWSTCTRL_CORE);
105 preg(PM_PWSTCTRL_GFX);
106 preg(PM_PWSTCTRL_DSP);
107 preg(PM_PWSTCTRL_MDM);
108
109 preg(PM_PWSTST_MPU);
110 preg(PM_PWSTST_CORE);
111 preg(PM_PWSTST_GFX);
112 preg(PM_PWSTST_DSP);
113 preg(PM_PWSTST_MDM);
114
115 preg(CM_AUTOIDLE1_CORE);
116 preg(CM_AUTOIDLE2_CORE);
117 preg(CM_AUTOIDLE3_CORE);
118 preg(CM_AUTOIDLE4_CORE);
119 preg(CM_AUTOIDLE_WKUP);
120 preg(CM_AUTOIDLE_PLL);
121 preg(CM_AUTOIDLE_DSP);
122 preg(CM_AUTOIDLE_MDM);
123
124 preg(CM_ICLKEN1_CORE);
125 preg(CM_ICLKEN2_CORE);
126 preg(CM_ICLKEN3_CORE);
127 preg(CM_ICLKEN4_CORE);
128 preg(CM_ICLKEN_GFX);
129 preg(CM_ICLKEN_WKUP);
130 preg(CM_ICLKEN_DSP);
131 preg(CM_ICLKEN_MDM);
132
133 preg(CM_IDLEST1_CORE);
134 preg(CM_IDLEST2_CORE);
135 preg(CM_IDLEST3_CORE);
136 preg(CM_IDLEST4_CORE);
137 preg(CM_IDLEST_GFX);
138 preg(CM_IDLEST_WKUP);
139 preg(CM_IDLEST_CKGEN);
140 preg(CM_IDLEST_DSP);
141 preg(CM_IDLEST_MDM);
142
143 preg(RM_RSTST_MPU);
144 preg(RM_RSTST_GFX);
145 preg(RM_RSTST_WKUP);
146 preg(RM_RSTST_DSP);
147 preg(RM_RSTST_MDM);
148
149 preg(PM_WKDEP_MPU);
150 preg(PM_WKDEP_CORE);
151 preg(PM_WKDEP_GFX);
152 preg(PM_WKDEP_DSP);
153 preg(PM_WKDEP_MDM);
154
155 preg(CM_FCLKEN_WKUP);
156 preg(CM_ICLKEN_WKUP);
157 preg(CM_IDLEST_WKUP);
158 preg(CM_AUTOIDLE_WKUP);
159 preg(CM_CLKSEL_WKUP);
160
161 preg(PM_WKEN_WKUP);
162 preg(PM_WKST_WKUP);
163}
164
165static inline void omap2_pm_save_registers(void)
166{
167 /* Save interrupt registers */
168 OMAP24XX_SAVE(INTC_MIR0);
169 OMAP24XX_SAVE(INTC_MIR1);
170 OMAP24XX_SAVE(INTC_MIR2);
171
172 /* Save power control registers */
173 OMAP24XX_SAVE(CM_CLKSTCTRL_MPU);
174 OMAP24XX_SAVE(CM_CLKSTCTRL_CORE);
175 OMAP24XX_SAVE(CM_CLKSTCTRL_GFX);
176 OMAP24XX_SAVE(CM_CLKSTCTRL_DSP);
177 OMAP24XX_SAVE(CM_CLKSTCTRL_MDM);
178
179 /* Save power state registers */
180 OMAP24XX_SAVE(PM_PWSTCTRL_MPU);
181 OMAP24XX_SAVE(PM_PWSTCTRL_CORE);
182 OMAP24XX_SAVE(PM_PWSTCTRL_GFX);
183 OMAP24XX_SAVE(PM_PWSTCTRL_DSP);
184 OMAP24XX_SAVE(PM_PWSTCTRL_MDM);
185
186 /* Save autoidle registers */
187 OMAP24XX_SAVE(CM_AUTOIDLE1_CORE);
188 OMAP24XX_SAVE(CM_AUTOIDLE2_CORE);
189 OMAP24XX_SAVE(CM_AUTOIDLE3_CORE);
190 OMAP24XX_SAVE(CM_AUTOIDLE4_CORE);
191 OMAP24XX_SAVE(CM_AUTOIDLE_WKUP);
192 OMAP24XX_SAVE(CM_AUTOIDLE_PLL);
193 OMAP24XX_SAVE(CM_AUTOIDLE_DSP);
194 OMAP24XX_SAVE(CM_AUTOIDLE_MDM);
195
196 /* Save idle state registers */
197 OMAP24XX_SAVE(CM_IDLEST1_CORE);
198 OMAP24XX_SAVE(CM_IDLEST2_CORE);
199 OMAP24XX_SAVE(CM_IDLEST3_CORE);
200 OMAP24XX_SAVE(CM_IDLEST4_CORE);
201 OMAP24XX_SAVE(CM_IDLEST_GFX);
202 OMAP24XX_SAVE(CM_IDLEST_WKUP);
203 OMAP24XX_SAVE(CM_IDLEST_CKGEN);
204 OMAP24XX_SAVE(CM_IDLEST_DSP);
205 OMAP24XX_SAVE(CM_IDLEST_MDM);
206
207 /* Save clock registers */
208 OMAP24XX_SAVE(CM_FCLKEN1_CORE);
209 OMAP24XX_SAVE(CM_FCLKEN2_CORE);
210 OMAP24XX_SAVE(CM_ICLKEN1_CORE);
211 OMAP24XX_SAVE(CM_ICLKEN2_CORE);
212 OMAP24XX_SAVE(CM_ICLKEN3_CORE);
213 OMAP24XX_SAVE(CM_ICLKEN4_CORE);
214}
215
216static inline void omap2_pm_restore_registers(void)
217{
218 /* Restore clock state registers */
219 OMAP24XX_RESTORE(CM_CLKSTCTRL_MPU);
220 OMAP24XX_RESTORE(CM_CLKSTCTRL_CORE);
221 OMAP24XX_RESTORE(CM_CLKSTCTRL_GFX);
222 OMAP24XX_RESTORE(CM_CLKSTCTRL_DSP);
223 OMAP24XX_RESTORE(CM_CLKSTCTRL_MDM);
224
225 /* Restore power state registers */
226 OMAP24XX_RESTORE(PM_PWSTCTRL_MPU);
227 OMAP24XX_RESTORE(PM_PWSTCTRL_CORE);
228 OMAP24XX_RESTORE(PM_PWSTCTRL_GFX);
229 OMAP24XX_RESTORE(PM_PWSTCTRL_DSP);
230 OMAP24XX_RESTORE(PM_PWSTCTRL_MDM);
231
232 /* Restore idle state registers */
233 OMAP24XX_RESTORE(CM_IDLEST1_CORE);
234 OMAP24XX_RESTORE(CM_IDLEST2_CORE);
235 OMAP24XX_RESTORE(CM_IDLEST3_CORE);
236 OMAP24XX_RESTORE(CM_IDLEST4_CORE);
237 OMAP24XX_RESTORE(CM_IDLEST_GFX);
238 OMAP24XX_RESTORE(CM_IDLEST_WKUP);
239 OMAP24XX_RESTORE(CM_IDLEST_CKGEN);
240 OMAP24XX_RESTORE(CM_IDLEST_DSP);
241 OMAP24XX_RESTORE(CM_IDLEST_MDM);
242
243 /* Restore autoidle registers */
244 OMAP24XX_RESTORE(CM_AUTOIDLE1_CORE);
245 OMAP24XX_RESTORE(CM_AUTOIDLE2_CORE);
246 OMAP24XX_RESTORE(CM_AUTOIDLE3_CORE);
247 OMAP24XX_RESTORE(CM_AUTOIDLE4_CORE);
248 OMAP24XX_RESTORE(CM_AUTOIDLE_WKUP);
249 OMAP24XX_RESTORE(CM_AUTOIDLE_PLL);
250 OMAP24XX_RESTORE(CM_AUTOIDLE_DSP);
251 OMAP24XX_RESTORE(CM_AUTOIDLE_MDM);
252
253 /* Restore clock registers */
254 OMAP24XX_RESTORE(CM_FCLKEN1_CORE);
255 OMAP24XX_RESTORE(CM_FCLKEN2_CORE);
256 OMAP24XX_RESTORE(CM_ICLKEN1_CORE);
257 OMAP24XX_RESTORE(CM_ICLKEN2_CORE);
258 OMAP24XX_RESTORE(CM_ICLKEN3_CORE);
259 OMAP24XX_RESTORE(CM_ICLKEN4_CORE);
260
261 /* REVISIT: Clear interrupts here */
262
263 /* Restore interrupt registers */
264 OMAP24XX_RESTORE(INTC_MIR0);
265 OMAP24XX_RESTORE(INTC_MIR1);
266 OMAP24XX_RESTORE(INTC_MIR2);
267}
268
269static int omap2_pm_suspend(void) 80static int omap2_pm_suspend(void)
270{ 81{
271 int processor_type = 0;
272
273 /* REVISIT: 0x21 or 0x26? */
274 if (cpu_is_omap2420())
275 processor_type = 0x21;
276
277 if (!processor_type)
278 return -ENOTSUPP;
279
280 local_irq_disable();
281 local_fiq_disable();
282
283 omap2_pm_save_registers();
284
285 /* Disable interrupts except for the wake events */
286 INTC_MIR_SET0 = 0xffffffff & ~INT0_WAKE_MASK;
287 INTC_MIR_SET1 = 0xffffffff & ~INT1_WAKE_MASK;
288 INTC_MIR_SET2 = 0xffffffff & ~INT2_WAKE_MASK;
289
290 pmdomain_set_autoidle();
291
292 /* Clear old wake-up events */
293 PM_WKST1_CORE = 0;
294 PM_WKST2_CORE = 0;
295 PM_WKST_WKUP = 0;
296
297 /* Enable wake-up events */
298 PM_WKEN1_CORE = (1 << 22) | (1 << 21); /* UART1 & 2 */
299 PM_WKEN2_CORE = (1 << 2); /* UART3 */
300 PM_WKEN_WKUP = (1 << 2) | (1 << 0); /* GPIO & GPT1 */
301
302 /* Disable clocks except for CM_ICLKEN2_CORE. It gets disabled
303 * in the SRAM suspend code */
304 CM_FCLKEN1_CORE = 0;
305 CM_FCLKEN2_CORE = 0;
306 CM_ICLKEN1_CORE = 0;
307 CM_ICLKEN3_CORE = 0;
308 CM_ICLKEN4_CORE = 0;
309
310 omap2_pm_debug("Status before suspend");
311
312 /* Must wait for serial buffers to clear */
313 mdelay(200);
314
315 /* Jump to SRAM suspend code
316 * REVISIT: When is this SDRC_DLLB_CTRL?
317 */
318 omap2_sram_suspend(SDRC_DLLA_CTRL, processor_type);
319
320 /* Back from sleep */
321 omap2_pm_restore_registers();
322
323 local_fiq_enable();
324 local_irq_enable();
325
326 return 0; 82 return 0;
327} 83}
328 84
@@ -357,30 +113,6 @@ static struct platform_suspend_ops omap_pm_ops = {
357 113
358int __init omap2_pm_init(void) 114int __init omap2_pm_init(void)
359{ 115{
360 printk("Power Management for TI OMAP.\n");
361
362 vclk = clk_get(NULL, "virt_prcm_set");
363 if (IS_ERR(vclk)) {
364 printk(KERN_ERR "Could not get PM vclk\n");
365 return -ENODEV;
366 }
367
368 /*
369 * We copy the assembler sleep/wakeup routines to SRAM.
370 * These routines need to be in SRAM as that's the only
371 * memory the MPU can see when it wakes up.
372 */
373 omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
374 omap24xx_idle_loop_suspend_sz);
375
376 omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
377 omap24xx_cpu_suspend_sz);
378
379 suspend_set_ops(&omap_pm_ops);
380 pm_idle = omap2_pm_idle;
381
382 pmdomain_init();
383
384 return 0; 116 return 0;
385} 117}
386 118
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
new file mode 100644
index 000000000000..cacb34086e35
--- /dev/null
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -0,0 +1,317 @@
1#ifndef __ARCH_ASM_MACH_OMAP2_PRCM_COMMON_H
2#define __ARCH_ASM_MACH_OMAP2_PRCM_COMMON_H
3
4/*
5 * OMAP2/3 PRCM base and module definitions
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17
18/* Module offsets from both CM_BASE & PRM_BASE */
19
20/*
21 * Offsets that are the same on 24xx and 34xx
22 *
23 * Technically, in terms of the TRM, OCP_MOD is 34xx only; PLL_MOD is
24 * CCR_MOD on 3430; and GFX_MOD only exists < 3430ES2.
25 */
26#define OCP_MOD 0x000
27#define MPU_MOD 0x100
28#define CORE_MOD 0x200
29#define GFX_MOD 0x300
30#define WKUP_MOD 0x400
31#define PLL_MOD 0x500
32
33
34/* Chip-specific module offsets */
35#define OMAP24XX_DSP_MOD 0x800
36
37#define OMAP2430_MDM_MOD 0xc00
38
39/* IVA2 module is < base on 3430 */
40#define OMAP3430_IVA2_MOD -0x800
41#define OMAP3430ES2_SGX_MOD GFX_MOD
42#define OMAP3430_CCR_MOD PLL_MOD
43#define OMAP3430_DSS_MOD 0x600
44#define OMAP3430_CAM_MOD 0x700
45#define OMAP3430_PER_MOD 0x800
46#define OMAP3430_EMU_MOD 0x900
47#define OMAP3430_GR_MOD 0xa00
48#define OMAP3430_NEON_MOD 0xb00
49#define OMAP3430ES2_USBHOST_MOD 0xc00
50
51
52/* 24XX register bits shared between CM & PRM registers */
53
54/* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
55#define OMAP2420_EN_MMC_SHIFT 26
56#define OMAP2420_EN_MMC (1 << 26)
57#define OMAP24XX_EN_UART2_SHIFT 22
58#define OMAP24XX_EN_UART2 (1 << 22)
59#define OMAP24XX_EN_UART1_SHIFT 21
60#define OMAP24XX_EN_UART1 (1 << 21)
61#define OMAP24XX_EN_MCSPI2_SHIFT 18
62#define OMAP24XX_EN_MCSPI2 (1 << 18)
63#define OMAP24XX_EN_MCSPI1_SHIFT 17
64#define OMAP24XX_EN_MCSPI1 (1 << 17)
65#define OMAP24XX_EN_MCBSP2_SHIFT 16
66#define OMAP24XX_EN_MCBSP2 (1 << 16)
67#define OMAP24XX_EN_MCBSP1_SHIFT 15
68#define OMAP24XX_EN_MCBSP1 (1 << 15)
69#define OMAP24XX_EN_GPT12_SHIFT 14
70#define OMAP24XX_EN_GPT12 (1 << 14)
71#define OMAP24XX_EN_GPT11_SHIFT 13
72#define OMAP24XX_EN_GPT11 (1 << 13)
73#define OMAP24XX_EN_GPT10_SHIFT 12
74#define OMAP24XX_EN_GPT10 (1 << 12)
75#define OMAP24XX_EN_GPT9_SHIFT 11
76#define OMAP24XX_EN_GPT9 (1 << 11)
77#define OMAP24XX_EN_GPT8_SHIFT 10
78#define OMAP24XX_EN_GPT8 (1 << 10)
79#define OMAP24XX_EN_GPT7_SHIFT 9
80#define OMAP24XX_EN_GPT7 (1 << 9)
81#define OMAP24XX_EN_GPT6_SHIFT 8
82#define OMAP24XX_EN_GPT6 (1 << 8)
83#define OMAP24XX_EN_GPT5_SHIFT 7
84#define OMAP24XX_EN_GPT5 (1 << 7)
85#define OMAP24XX_EN_GPT4_SHIFT 6
86#define OMAP24XX_EN_GPT4 (1 << 6)
87#define OMAP24XX_EN_GPT3_SHIFT 5
88#define OMAP24XX_EN_GPT3 (1 << 5)
89#define OMAP24XX_EN_GPT2_SHIFT 4
90#define OMAP24XX_EN_GPT2 (1 << 4)
91#define OMAP2420_EN_VLYNQ_SHIFT 3
92#define OMAP2420_EN_VLYNQ (1 << 3)
93
94/* CM_FCLKEN2_CORE, CM_ICLKEN2_CORE, PM_WKEN2_CORE shared bits */
95#define OMAP2430_EN_GPIO5_SHIFT 10
96#define OMAP2430_EN_GPIO5 (1 << 10)
97#define OMAP2430_EN_MCSPI3_SHIFT 9
98#define OMAP2430_EN_MCSPI3 (1 << 9)
99#define OMAP2430_EN_MMCHS2_SHIFT 8
100#define OMAP2430_EN_MMCHS2 (1 << 8)
101#define OMAP2430_EN_MMCHS1_SHIFT 7
102#define OMAP2430_EN_MMCHS1 (1 << 7)
103#define OMAP24XX_EN_UART3_SHIFT 2
104#define OMAP24XX_EN_UART3 (1 << 2)
105#define OMAP24XX_EN_USB_SHIFT 0
106#define OMAP24XX_EN_USB (1 << 0)
107
108/* CM_ICLKEN2_CORE, PM_WKEN2_CORE shared bits */
109#define OMAP2430_EN_MDM_INTC_SHIFT 11
110#define OMAP2430_EN_MDM_INTC (1 << 11)
111#define OMAP2430_EN_USBHS_SHIFT 6
112#define OMAP2430_EN_USBHS (1 << 6)
113
114/* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */
115#define OMAP2420_ST_MMC (1 << 26)
116#define OMAP24XX_ST_UART2 (1 << 22)
117#define OMAP24XX_ST_UART1 (1 << 21)
118#define OMAP24XX_ST_MCSPI2 (1 << 18)
119#define OMAP24XX_ST_MCSPI1 (1 << 17)
120#define OMAP24XX_ST_GPT12 (1 << 14)
121#define OMAP24XX_ST_GPT11 (1 << 13)
122#define OMAP24XX_ST_GPT10 (1 << 12)
123#define OMAP24XX_ST_GPT9 (1 << 11)
124#define OMAP24XX_ST_GPT8 (1 << 10)
125#define OMAP24XX_ST_GPT7 (1 << 9)
126#define OMAP24XX_ST_GPT6 (1 << 8)
127#define OMAP24XX_ST_GPT5 (1 << 7)
128#define OMAP24XX_ST_GPT4 (1 << 6)
129#define OMAP24XX_ST_GPT3 (1 << 5)
130#define OMAP24XX_ST_GPT2 (1 << 4)
131#define OMAP2420_ST_VLYNQ (1 << 3)
132
133/* CM_IDLEST2_CORE, PM_WKST2_CORE shared bits */
134#define OMAP2430_ST_MDM_INTC (1 << 11)
135#define OMAP2430_ST_GPIO5 (1 << 10)
136#define OMAP2430_ST_MCSPI3 (1 << 9)
137#define OMAP2430_ST_MMCHS2 (1 << 8)
138#define OMAP2430_ST_MMCHS1 (1 << 7)
139#define OMAP2430_ST_USBHS (1 << 6)
140#define OMAP24XX_ST_UART3 (1 << 2)
141#define OMAP24XX_ST_USB (1 << 0)
142
143/* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */
144#define OMAP24XX_EN_GPIOS_SHIFT 2
145#define OMAP24XX_EN_GPIOS (1 << 2)
146#define OMAP24XX_EN_GPT1_SHIFT 0
147#define OMAP24XX_EN_GPT1 (1 << 0)
148
149/* PM_WKST_WKUP, CM_IDLEST_WKUP shared bits */
150#define OMAP24XX_ST_GPIOS (1 << 2)
151#define OMAP24XX_ST_GPT1 (1 << 0)
152
153/* CM_IDLEST_MDM and PM_WKST_MDM shared bits */
154#define OMAP2430_ST_MDM (1 << 0)
155
156
157/* 3430 register bits shared between CM & PRM registers */
158
159/* CM_REVISION, PRM_REVISION shared bits */
160#define OMAP3430_REV_SHIFT 0
161#define OMAP3430_REV_MASK (0xff << 0)
162
163/* CM_SYSCONFIG, PRM_SYSCONFIG shared bits */
164#define OMAP3430_AUTOIDLE (1 << 0)
165
166/* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
167#define OMAP3430_EN_MMC2 (1 << 25)
168#define OMAP3430_EN_MMC2_SHIFT 25
169#define OMAP3430_EN_MMC1 (1 << 24)
170#define OMAP3430_EN_MMC1_SHIFT 24
171#define OMAP3430_EN_MCSPI4 (1 << 21)
172#define OMAP3430_EN_MCSPI4_SHIFT 21
173#define OMAP3430_EN_MCSPI3 (1 << 20)
174#define OMAP3430_EN_MCSPI3_SHIFT 20
175#define OMAP3430_EN_MCSPI2 (1 << 19)
176#define OMAP3430_EN_MCSPI2_SHIFT 19
177#define OMAP3430_EN_MCSPI1 (1 << 18)
178#define OMAP3430_EN_MCSPI1_SHIFT 18
179#define OMAP3430_EN_I2C3 (1 << 17)
180#define OMAP3430_EN_I2C3_SHIFT 17
181#define OMAP3430_EN_I2C2 (1 << 16)
182#define OMAP3430_EN_I2C2_SHIFT 16
183#define OMAP3430_EN_I2C1 (1 << 15)
184#define OMAP3430_EN_I2C1_SHIFT 15
185#define OMAP3430_EN_UART2 (1 << 14)
186#define OMAP3430_EN_UART2_SHIFT 14
187#define OMAP3430_EN_UART1 (1 << 13)
188#define OMAP3430_EN_UART1_SHIFT 13
189#define OMAP3430_EN_GPT11 (1 << 12)
190#define OMAP3430_EN_GPT11_SHIFT 12
191#define OMAP3430_EN_GPT10 (1 << 11)
192#define OMAP3430_EN_GPT10_SHIFT 11
193#define OMAP3430_EN_MCBSP5 (1 << 10)
194#define OMAP3430_EN_MCBSP5_SHIFT 10
195#define OMAP3430_EN_MCBSP1 (1 << 9)
196#define OMAP3430_EN_MCBSP1_SHIFT 9
197#define OMAP3430_EN_FSHOSTUSB (1 << 5)
198#define OMAP3430_EN_FSHOSTUSB_SHIFT 5
199#define OMAP3430_EN_D2D (1 << 3)
200#define OMAP3430_EN_D2D_SHIFT 3
201
202/* CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
203#define OMAP3430_EN_HSOTGUSB (1 << 4)
204#define OMAP3430_EN_HSOTGUSB_SHIFT 4
205
206/* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */
207#define OMAP3430_ST_MMC2 (1 << 25)
208#define OMAP3430_ST_MMC1 (1 << 24)
209#define OMAP3430_ST_MCSPI4 (1 << 21)
210#define OMAP3430_ST_MCSPI3 (1 << 20)
211#define OMAP3430_ST_MCSPI2 (1 << 19)
212#define OMAP3430_ST_MCSPI1 (1 << 18)
213#define OMAP3430_ST_I2C3 (1 << 17)
214#define OMAP3430_ST_I2C2 (1 << 16)
215#define OMAP3430_ST_I2C1 (1 << 15)
216#define OMAP3430_ST_UART2 (1 << 14)
217#define OMAP3430_ST_UART1 (1 << 13)
218#define OMAP3430_ST_GPT11 (1 << 12)
219#define OMAP3430_ST_GPT10 (1 << 11)
220#define OMAP3430_ST_MCBSP5 (1 << 10)
221#define OMAP3430_ST_MCBSP1 (1 << 9)
222#define OMAP3430_ST_FSHOSTUSB (1 << 5)
223#define OMAP3430_ST_HSOTGUSB (1 << 4)
224#define OMAP3430_ST_D2D (1 << 3)
225
226/* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */
227#define OMAP3430_EN_GPIO1 (1 << 3)
228#define OMAP3430_EN_GPIO1_SHIFT 3
229#define OMAP3430_EN_GPT1 (1 << 0)
230#define OMAP3430_EN_GPT1_SHIFT 0
231
232/* CM_FCLKEN_WKUP, PM_WKEN_WKUP shared bits */
233#define OMAP3430_EN_SR2 (1 << 7)
234#define OMAP3430_EN_SR2_SHIFT 7
235#define OMAP3430_EN_SR1 (1 << 6)
236#define OMAP3430_EN_SR1_SHIFT 6
237
238/* CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */
239#define OMAP3430_EN_GPT12 (1 << 1)
240#define OMAP3430_EN_GPT12_SHIFT 1
241
242/* CM_IDLEST_WKUP, PM_WKST_WKUP shared bits */
243#define OMAP3430_ST_SR2 (1 << 7)
244#define OMAP3430_ST_SR1 (1 << 6)
245#define OMAP3430_ST_GPIO1 (1 << 3)
246#define OMAP3430_ST_GPT12 (1 << 1)
247#define OMAP3430_ST_GPT1 (1 << 0)
248
249/*
250 * CM_SLEEPDEP_GFX, CM_SLEEPDEP_DSS, CM_SLEEPDEP_CAM,
251 * CM_SLEEPDEP_PER, PM_WKDEP_IVA2, PM_WKDEP_GFX,
252 * PM_WKDEP_DSS, PM_WKDEP_CAM, PM_WKDEP_PER, PM_WKDEP_NEON shared bits
253 */
254#define OMAP3430_EN_MPU (1 << 1)
255#define OMAP3430_EN_MPU_SHIFT 1
256
257/* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER shared bits */
258#define OMAP3430_EN_GPIO6 (1 << 17)
259#define OMAP3430_EN_GPIO6_SHIFT 17
260#define OMAP3430_EN_GPIO5 (1 << 16)
261#define OMAP3430_EN_GPIO5_SHIFT 16
262#define OMAP3430_EN_GPIO4 (1 << 15)
263#define OMAP3430_EN_GPIO4_SHIFT 15
264#define OMAP3430_EN_GPIO3 (1 << 14)
265#define OMAP3430_EN_GPIO3_SHIFT 14
266#define OMAP3430_EN_GPIO2 (1 << 13)
267#define OMAP3430_EN_GPIO2_SHIFT 13
268#define OMAP3430_EN_UART3 (1 << 11)
269#define OMAP3430_EN_UART3_SHIFT 11
270#define OMAP3430_EN_GPT9 (1 << 10)
271#define OMAP3430_EN_GPT9_SHIFT 10
272#define OMAP3430_EN_GPT8 (1 << 9)
273#define OMAP3430_EN_GPT8_SHIFT 9
274#define OMAP3430_EN_GPT7 (1 << 8)
275#define OMAP3430_EN_GPT7_SHIFT 8
276#define OMAP3430_EN_GPT6 (1 << 7)
277#define OMAP3430_EN_GPT6_SHIFT 7
278#define OMAP3430_EN_GPT5 (1 << 6)
279#define OMAP3430_EN_GPT5_SHIFT 6
280#define OMAP3430_EN_GPT4 (1 << 5)
281#define OMAP3430_EN_GPT4_SHIFT 5
282#define OMAP3430_EN_GPT3 (1 << 4)
283#define OMAP3430_EN_GPT3_SHIFT 4
284#define OMAP3430_EN_GPT2 (1 << 3)
285#define OMAP3430_EN_GPT2_SHIFT 3
286
287/* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER, PM_WKST_PER shared bits */
288/* XXX Possible TI documentation bug: should the PM_WKST_PER EN_* bits
289 * be ST_* bits instead? */
290#define OMAP3430_EN_MCBSP4 (1 << 2)
291#define OMAP3430_EN_MCBSP4_SHIFT 2
292#define OMAP3430_EN_MCBSP3 (1 << 1)
293#define OMAP3430_EN_MCBSP3_SHIFT 1
294#define OMAP3430_EN_MCBSP2 (1 << 0)
295#define OMAP3430_EN_MCBSP2_SHIFT 0
296
297/* CM_IDLEST_PER, PM_WKST_PER shared bits */
298#define OMAP3430_ST_GPIO6 (1 << 17)
299#define OMAP3430_ST_GPIO5 (1 << 16)
300#define OMAP3430_ST_GPIO4 (1 << 15)
301#define OMAP3430_ST_GPIO3 (1 << 14)
302#define OMAP3430_ST_GPIO2 (1 << 13)
303#define OMAP3430_ST_UART3 (1 << 11)
304#define OMAP3430_ST_GPT9 (1 << 10)
305#define OMAP3430_ST_GPT8 (1 << 9)
306#define OMAP3430_ST_GPT7 (1 << 8)
307#define OMAP3430_ST_GPT6 (1 << 7)
308#define OMAP3430_ST_GPT5 (1 << 6)
309#define OMAP3430_ST_GPT4 (1 << 5)
310#define OMAP3430_ST_GPT3 (1 << 4)
311#define OMAP3430_ST_GPT2 (1 << 3)
312
313/* CM_SLEEPDEP_PER, PM_WKDEP_IVA2, PM_WKDEP_MPU, PM_WKDEP_PER shared bits */
314#define OMAP3430_EN_CORE (1 << 0)
315
316#endif
317
diff --git a/arch/arm/mach-omap2/prcm-regs.h b/arch/arm/mach-omap2/prcm-regs.h
deleted file mode 100644
index 5e1c4b53ee9d..000000000000
--- a/arch/arm/mach-omap2/prcm-regs.h
+++ /dev/null
@@ -1,483 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/prcm-regs.h
3 *
4 * OMAP24XX Power Reset and Clock Management (PRCM) registers
5 *
6 * Copyright (C) 2005 Texas Instruments, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_H
24#define __ARCH_ARM_MACH_OMAP2_PRCM_H
25
26/* SET_PERFORMANCE_LEVEL PARAMETERS */
27#define PRCM_HALF_SPEED 1
28#define PRCM_FULL_SPEED 2
29
30#ifndef __ASSEMBLER__
31
32#define PRCM_REG32(offset) __REG32(OMAP24XX_PRCM_BASE + (offset))
33
34#define PRCM_REVISION PRCM_REG32(0x000)
35#define PRCM_SYSCONFIG PRCM_REG32(0x010)
36#define PRCM_IRQSTATUS_MPU PRCM_REG32(0x018)
37#define PRCM_IRQENABLE_MPU PRCM_REG32(0x01C)
38#define PRCM_VOLTCTRL PRCM_REG32(0x050)
39#define PRCM_VOLTST PRCM_REG32(0x054)
40#define PRCM_CLKSRC_CTRL PRCM_REG32(0x060)
41#define PRCM_CLKOUT_CTRL PRCM_REG32(0x070)
42#define PRCM_CLKEMUL_CTRL PRCM_REG32(0x078)
43#define PRCM_CLKCFG_CTRL PRCM_REG32(0x080)
44#define PRCM_CLKCFG_STATUS PRCM_REG32(0x084)
45#define PRCM_VOLTSETUP PRCM_REG32(0x090)
46#define PRCM_CLKSSETUP PRCM_REG32(0x094)
47#define PRCM_POLCTRL PRCM_REG32(0x098)
48
49/* GENERAL PURPOSE */
50#define GENERAL_PURPOSE1 PRCM_REG32(0x0B0)
51#define GENERAL_PURPOSE2 PRCM_REG32(0x0B4)
52#define GENERAL_PURPOSE3 PRCM_REG32(0x0B8)
53#define GENERAL_PURPOSE4 PRCM_REG32(0x0BC)
54#define GENERAL_PURPOSE5 PRCM_REG32(0x0C0)
55#define GENERAL_PURPOSE6 PRCM_REG32(0x0C4)
56#define GENERAL_PURPOSE7 PRCM_REG32(0x0C8)
57#define GENERAL_PURPOSE8 PRCM_REG32(0x0CC)
58#define GENERAL_PURPOSE9 PRCM_REG32(0x0D0)
59#define GENERAL_PURPOSE10 PRCM_REG32(0x0D4)
60#define GENERAL_PURPOSE11 PRCM_REG32(0x0D8)
61#define GENERAL_PURPOSE12 PRCM_REG32(0x0DC)
62#define GENERAL_PURPOSE13 PRCM_REG32(0x0E0)
63#define GENERAL_PURPOSE14 PRCM_REG32(0x0E4)
64#define GENERAL_PURPOSE15 PRCM_REG32(0x0E8)
65#define GENERAL_PURPOSE16 PRCM_REG32(0x0EC)
66#define GENERAL_PURPOSE17 PRCM_REG32(0x0F0)
67#define GENERAL_PURPOSE18 PRCM_REG32(0x0F4)
68#define GENERAL_PURPOSE19 PRCM_REG32(0x0F8)
69#define GENERAL_PURPOSE20 PRCM_REG32(0x0FC)
70
71/* MPU */
72#define CM_CLKSEL_MPU PRCM_REG32(0x140)
73#define CM_CLKSTCTRL_MPU PRCM_REG32(0x148)
74#define RM_RSTST_MPU PRCM_REG32(0x158)
75#define PM_WKDEP_MPU PRCM_REG32(0x1C8)
76#define PM_EVGENCTRL_MPU PRCM_REG32(0x1D4)
77#define PM_EVEGENONTIM_MPU PRCM_REG32(0x1D8)
78#define PM_EVEGENOFFTIM_MPU PRCM_REG32(0x1DC)
79#define PM_PWSTCTRL_MPU PRCM_REG32(0x1E0)
80#define PM_PWSTST_MPU PRCM_REG32(0x1E4)
81
82/* CORE */
83#define CM_FCLKEN1_CORE PRCM_REG32(0x200)
84#define CM_FCLKEN2_CORE PRCM_REG32(0x204)
85#define CM_FCLKEN3_CORE PRCM_REG32(0x208)
86#define CM_ICLKEN1_CORE PRCM_REG32(0x210)
87#define CM_ICLKEN2_CORE PRCM_REG32(0x214)
88#define CM_ICLKEN3_CORE PRCM_REG32(0x218)
89#define CM_ICLKEN4_CORE PRCM_REG32(0x21C)
90#define CM_IDLEST1_CORE PRCM_REG32(0x220)
91#define CM_IDLEST2_CORE PRCM_REG32(0x224)
92#define CM_IDLEST3_CORE PRCM_REG32(0x228)
93#define CM_IDLEST4_CORE PRCM_REG32(0x22C)
94#define CM_AUTOIDLE1_CORE PRCM_REG32(0x230)
95#define CM_AUTOIDLE2_CORE PRCM_REG32(0x234)
96#define CM_AUTOIDLE3_CORE PRCM_REG32(0x238)
97#define CM_AUTOIDLE4_CORE PRCM_REG32(0x23C)
98#define CM_CLKSEL1_CORE PRCM_REG32(0x240)
99#define CM_CLKSEL2_CORE PRCM_REG32(0x244)
100#define CM_CLKSTCTRL_CORE PRCM_REG32(0x248)
101#define PM_WKEN1_CORE PRCM_REG32(0x2A0)
102#define PM_WKEN2_CORE PRCM_REG32(0x2A4)
103#define PM_WKST1_CORE PRCM_REG32(0x2B0)
104#define PM_WKST2_CORE PRCM_REG32(0x2B4)
105#define PM_WKDEP_CORE PRCM_REG32(0x2C8)
106#define PM_PWSTCTRL_CORE PRCM_REG32(0x2E0)
107#define PM_PWSTST_CORE PRCM_REG32(0x2E4)
108
109/* GFX */
110#define CM_FCLKEN_GFX PRCM_REG32(0x300)
111#define CM_ICLKEN_GFX PRCM_REG32(0x310)
112#define CM_IDLEST_GFX PRCM_REG32(0x320)
113#define CM_CLKSEL_GFX PRCM_REG32(0x340)
114#define CM_CLKSTCTRL_GFX PRCM_REG32(0x348)
115#define RM_RSTCTRL_GFX PRCM_REG32(0x350)
116#define RM_RSTST_GFX PRCM_REG32(0x358)
117#define PM_WKDEP_GFX PRCM_REG32(0x3C8)
118#define PM_PWSTCTRL_GFX PRCM_REG32(0x3E0)
119#define PM_PWSTST_GFX PRCM_REG32(0x3E4)
120
121/* WAKE-UP */
122#define CM_FCLKEN_WKUP PRCM_REG32(0x400)
123#define CM_ICLKEN_WKUP PRCM_REG32(0x410)
124#define CM_IDLEST_WKUP PRCM_REG32(0x420)
125#define CM_AUTOIDLE_WKUP PRCM_REG32(0x430)
126#define CM_CLKSEL_WKUP PRCM_REG32(0x440)
127#define RM_RSTCTRL_WKUP PRCM_REG32(0x450)
128#define RM_RSTTIME_WKUP PRCM_REG32(0x454)
129#define RM_RSTST_WKUP PRCM_REG32(0x458)
130#define PM_WKEN_WKUP PRCM_REG32(0x4A0)
131#define PM_WKST_WKUP PRCM_REG32(0x4B0)
132
133/* CLOCKS */
134#define CM_CLKEN_PLL PRCM_REG32(0x500)
135#define CM_IDLEST_CKGEN PRCM_REG32(0x520)
136#define CM_AUTOIDLE_PLL PRCM_REG32(0x530)
137#define CM_CLKSEL1_PLL PRCM_REG32(0x540)
138#define CM_CLKSEL2_PLL PRCM_REG32(0x544)
139
140/* DSP */
141#define CM_FCLKEN_DSP PRCM_REG32(0x800)
142#define CM_ICLKEN_DSP PRCM_REG32(0x810)
143#define CM_IDLEST_DSP PRCM_REG32(0x820)
144#define CM_AUTOIDLE_DSP PRCM_REG32(0x830)
145#define CM_CLKSEL_DSP PRCM_REG32(0x840)
146#define CM_CLKSTCTRL_DSP PRCM_REG32(0x848)
147#define RM_RSTCTRL_DSP PRCM_REG32(0x850)
148#define RM_RSTST_DSP PRCM_REG32(0x858)
149#define PM_WKEN_DSP PRCM_REG32(0x8A0)
150#define PM_WKDEP_DSP PRCM_REG32(0x8C8)
151#define PM_PWSTCTRL_DSP PRCM_REG32(0x8E0)
152#define PM_PWSTST_DSP PRCM_REG32(0x8E4)
153#define PRCM_IRQSTATUS_DSP PRCM_REG32(0x8F0)
154#define PRCM_IRQENABLE_DSP PRCM_REG32(0x8F4)
155
156/* IVA */
157#define PRCM_IRQSTATUS_IVA PRCM_REG32(0x8F8)
158#define PRCM_IRQENABLE_IVA PRCM_REG32(0x8FC)
159
160/* Modem on 2430 */
161#define CM_FCLKEN_MDM PRCM_REG32(0xC00)
162#define CM_ICLKEN_MDM PRCM_REG32(0xC10)
163#define CM_IDLEST_MDM PRCM_REG32(0xC20)
164#define CM_AUTOIDLE_MDM PRCM_REG32(0xC30)
165#define CM_CLKSEL_MDM PRCM_REG32(0xC40)
166#define CM_CLKSTCTRL_MDM PRCM_REG32(0xC48)
167#define RM_RSTCTRL_MDM PRCM_REG32(0xC50)
168#define RM_RSTST_MDM PRCM_REG32(0xC58)
169#define PM_WKEN_MDM PRCM_REG32(0xCA0)
170#define PM_WKST_MDM PRCM_REG32(0xCB0)
171#define PM_WKDEP_MDM PRCM_REG32(0xCC8)
172#define PM_PWSTCTRL_MDM PRCM_REG32(0xCE0)
173#define PM_PWSTST_MDM PRCM_REG32(0xCE4)
174
175#define OMAP24XX_L4_IO_BASE 0x48000000
176
177#define DISP_BASE (OMAP24XX_L4_IO_BASE + 0x50000)
178#define DISP_REG32(offset) __REG32(DISP_BASE + (offset))
179
180#define OMAP24XX_GPMC_BASE (L3_24XX_BASE + 0xa000)
181#define GPMC_REG32(offset) __REG32(OMAP24XX_GPMC_BASE + (offset))
182
183/* FIXME: Move these to timer code */
184#define GPT1_BASE (0x48028000)
185#define GPT1_REG32(offset) __REG32(GPT1_BASE + (offset))
186
187/* Misc sysconfig */
188#define DISPC_SYSCONFIG DISP_REG32(0x410)
189#define SPI_BASE (OMAP24XX_L4_IO_BASE + 0x98000)
190#define MCSPI1_SYSCONFIG __REG32(SPI_BASE + 0x10)
191#define MCSPI2_SYSCONFIG __REG32(SPI_BASE + 0x2000 + 0x10)
192#define MCSPI3_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE + 0xb8010)
193
194#define CAMERA_MMU_SYSCONFIG __REG32(DISP_BASE + 0x2C10)
195#define CAMERA_DMA_SYSCONFIG __REG32(DISP_BASE + 0x282C)
196#define SYSTEM_DMA_SYSCONFIG __REG32(DISP_BASE + 0x602C)
197#define GPMC_SYSCONFIG GPMC_REG32(0x010)
198#define MAILBOXES_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE + 0x94010)
199#define UART1_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE + 0x6A054)
200#define UART2_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE + 0x6C054)
201#define UART3_SYSCONFIG __REG32(OMAP24XX_L4_IO_BASE + 0x6E054)
202#define SDRC_SYSCONFIG __REG32(OMAP24XX_SDRC_BASE + 0x10)
203#define OMAP24XX_SMS_BASE (L3_24XX_BASE + 0x8000)
204#define SMS_SYSCONFIG __REG32(OMAP24XX_SMS_BASE + 0x10)
205#define SSI_SYSCONFIG __REG32(DISP_BASE + 0x8010)
206
207/* rkw - good cannidates for PM_ to start what nm was trying */
208#define OMAP24XX_GPT2 (OMAP24XX_L4_IO_BASE + 0x2A000)
209#define OMAP24XX_GPT3 (OMAP24XX_L4_IO_BASE + 0x78000)
210#define OMAP24XX_GPT4 (OMAP24XX_L4_IO_BASE + 0x7A000)
211#define OMAP24XX_GPT5 (OMAP24XX_L4_IO_BASE + 0x7C000)
212#define OMAP24XX_GPT6 (OMAP24XX_L4_IO_BASE + 0x7E000)
213#define OMAP24XX_GPT7 (OMAP24XX_L4_IO_BASE + 0x80000)
214#define OMAP24XX_GPT8 (OMAP24XX_L4_IO_BASE + 0x82000)
215#define OMAP24XX_GPT9 (OMAP24XX_L4_IO_BASE + 0x84000)
216#define OMAP24XX_GPT10 (OMAP24XX_L4_IO_BASE + 0x86000)
217#define OMAP24XX_GPT11 (OMAP24XX_L4_IO_BASE + 0x88000)
218#define OMAP24XX_GPT12 (OMAP24XX_L4_IO_BASE + 0x8A000)
219
220/* FIXME: Move these to timer code */
221#define GPTIMER1_SYSCONFIG GPT1_REG32(0x010)
222#define GPTIMER2_SYSCONFIG __REG32(OMAP24XX_GPT2 + 0x10)
223#define GPTIMER3_SYSCONFIG __REG32(OMAP24XX_GPT3 + 0x10)
224#define GPTIMER4_SYSCONFIG __REG32(OMAP24XX_GPT4 + 0x10)
225#define GPTIMER5_SYSCONFIG __REG32(OMAP24XX_GPT5 + 0x10)
226#define GPTIMER6_SYSCONFIG __REG32(OMAP24XX_GPT6 + 0x10)
227#define GPTIMER7_SYSCONFIG __REG32(OMAP24XX_GPT7 + 0x10)
228#define GPTIMER8_SYSCONFIG __REG32(OMAP24XX_GPT8 + 0x10)
229#define GPTIMER9_SYSCONFIG __REG32(OMAP24XX_GPT9 + 0x10)
230#define GPTIMER10_SYSCONFIG __REG32(OMAP24XX_GPT10 + 0x10)
231#define GPTIMER11_SYSCONFIG __REG32(OMAP24XX_GPT11 + 0x10)
232#define GPTIMER12_SYSCONFIG __REG32(OMAP24XX_GPT12 + 0x10)
233
234/* FIXME: Move these to gpio code */
235#define OMAP24XX_GPIO_BASE 0x48018000
236#define GPIOX_BASE(X) (OMAP24XX_GPIO_BASE + (0x2000 * ((X) - 1)))
237
238#define GPIO1_SYSCONFIG __REG32((GPIOX_BASE(1) + 0x10))
239#define GPIO2_SYSCONFIG __REG32((GPIOX_BASE(2) + 0x10))
240#define GPIO3_SYSCONFIG __REG32((GPIOX_BASE(3) + 0x10))
241#define GPIO4_SYSCONFIG __REG32((GPIOX_BASE(4) + 0x10))
242
243#if defined(CONFIG_ARCH_OMAP243X)
244#define GPIO5_SYSCONFIG __REG32((OMAP24XX_GPIO5_BASE + 0x10))
245#endif
246
247/* GP TIMER 1 */
248#define GPTIMER1_TISTAT GPT1_REG32(0x014)
249#define GPTIMER1_TISR GPT1_REG32(0x018)
250#define GPTIMER1_TIER GPT1_REG32(0x01C)
251#define GPTIMER1_TWER GPT1_REG32(0x020)
252#define GPTIMER1_TCLR GPT1_REG32(0x024)
253#define GPTIMER1_TCRR GPT1_REG32(0x028)
254#define GPTIMER1_TLDR GPT1_REG32(0x02C)
255#define GPTIMER1_TTGR GPT1_REG32(0x030)
256#define GPTIMER1_TWPS GPT1_REG32(0x034)
257#define GPTIMER1_TMAR GPT1_REG32(0x038)
258#define GPTIMER1_TCAR1 GPT1_REG32(0x03C)
259#define GPTIMER1_TSICR GPT1_REG32(0x040)
260#define GPTIMER1_TCAR2 GPT1_REG32(0x044)
261
262/* rkw -- base fix up please... */
263#define GPTIMER3_TISR __REG32(OMAP24XX_L4_IO_BASE + 0x78018)
264
265/* SDRC */
266#define SDRC_DLLA_CTRL __REG32(OMAP24XX_SDRC_BASE + 0x060)
267#define SDRC_DLLA_STATUS __REG32(OMAP24XX_SDRC_BASE + 0x064)
268#define SDRC_DLLB_CTRL __REG32(OMAP24XX_SDRC_BASE + 0x068)
269#define SDRC_DLLB_STATUS __REG32(OMAP24XX_SDRC_BASE + 0x06C)
270#define SDRC_POWER __REG32(OMAP24XX_SDRC_BASE + 0x070)
271#define SDRC_MR_0 __REG32(OMAP24XX_SDRC_BASE + 0x084)
272
273/* GPIO 1 */
274#define GPIO1_BASE GPIOX_BASE(1)
275#define GPIO1_REG32(offset) __REG32(GPIO1_BASE + (offset))
276#define GPIO1_IRQENABLE1 GPIO1_REG32(0x01C)
277#define GPIO1_IRQSTATUS1 GPIO1_REG32(0x018)
278#define GPIO1_IRQENABLE2 GPIO1_REG32(0x02C)
279#define GPIO1_IRQSTATUS2 GPIO1_REG32(0x028)
280#define GPIO1_WAKEUPENABLE GPIO1_REG32(0x020)
281#define GPIO1_RISINGDETECT GPIO1_REG32(0x048)
282#define GPIO1_DATAIN GPIO1_REG32(0x038)
283#define GPIO1_OE GPIO1_REG32(0x034)
284#define GPIO1_DATAOUT GPIO1_REG32(0x03C)
285
286/* GPIO2 */
287#define GPIO2_BASE GPIOX_BASE(2)
288#define GPIO2_REG32(offset) __REG32(GPIO2_BASE + (offset))
289#define GPIO2_IRQENABLE1 GPIO2_REG32(0x01C)
290#define GPIO2_IRQSTATUS1 GPIO2_REG32(0x018)
291#define GPIO2_IRQENABLE2 GPIO2_REG32(0x02C)
292#define GPIO2_IRQSTATUS2 GPIO2_REG32(0x028)
293#define GPIO2_WAKEUPENABLE GPIO2_REG32(0x020)
294#define GPIO2_RISINGDETECT GPIO2_REG32(0x048)
295#define GPIO2_DATAIN GPIO2_REG32(0x038)
296#define GPIO2_OE GPIO2_REG32(0x034)
297#define GPIO2_DATAOUT GPIO2_REG32(0x03C)
298#define GPIO2_DEBOUNCENABLE GPIO2_REG32(0x050)
299#define GPIO2_DEBOUNCINGTIME GPIO2_REG32(0x054)
300
301/* GPIO 3 */
302#define GPIO3_BASE GPIOX_BASE(3)
303#define GPIO3_REG32(offset) __REG32(GPIO3_BASE + (offset))
304#define GPIO3_IRQENABLE1 GPIO3_REG32(0x01C)
305#define GPIO3_IRQSTATUS1 GPIO3_REG32(0x018)
306#define GPIO3_IRQENABLE2 GPIO3_REG32(0x02C)
307#define GPIO3_IRQSTATUS2 GPIO3_REG32(0x028)
308#define GPIO3_WAKEUPENABLE GPIO3_REG32(0x020)
309#define GPIO3_RISINGDETECT GPIO3_REG32(0x048)
310#define GPIO3_FALLINGDETECT GPIO3_REG32(0x04C)
311#define GPIO3_DATAIN GPIO3_REG32(0x038)
312#define GPIO3_OE GPIO3_REG32(0x034)
313#define GPIO3_DATAOUT GPIO3_REG32(0x03C)
314#define GPIO3_DEBOUNCENABLE GPIO3_REG32(0x050)
315#define GPIO3_DEBOUNCINGTIME GPIO3_REG32(0x054)
316#define GPIO3_DEBOUNCENABLE GPIO3_REG32(0x050)
317#define GPIO3_DEBOUNCINGTIME GPIO3_REG32(0x054)
318
319/* GPIO 4 */
320#define GPIO4_BASE GPIOX_BASE(4)
321#define GPIO4_REG32(offset) __REG32(GPIO4_BASE + (offset))
322#define GPIO4_IRQENABLE1 GPIO4_REG32(0x01C)
323#define GPIO4_IRQSTATUS1 GPIO4_REG32(0x018)
324#define GPIO4_IRQENABLE2 GPIO4_REG32(0x02C)
325#define GPIO4_IRQSTATUS2 GPIO4_REG32(0x028)
326#define GPIO4_WAKEUPENABLE GPIO4_REG32(0x020)
327#define GPIO4_RISINGDETECT GPIO4_REG32(0x048)
328#define GPIO4_FALLINGDETECT GPIO4_REG32(0x04C)
329#define GPIO4_DATAIN GPIO4_REG32(0x038)
330#define GPIO4_OE GPIO4_REG32(0x034)
331#define GPIO4_DATAOUT GPIO4_REG32(0x03C)
332#define GPIO4_DEBOUNCENABLE GPIO4_REG32(0x050)
333#define GPIO4_DEBOUNCINGTIME GPIO4_REG32(0x054)
334
335#if defined(CONFIG_ARCH_OMAP243X)
336/* GPIO 5 */
337#define GPIO5_REG32(offset) __REG32((OMAP24XX_GPIO5_BASE + (offset)))
338#define GPIO5_IRQENABLE1 GPIO5_REG32(0x01C)
339#define GPIO5_IRQSTATUS1 GPIO5_REG32(0x018)
340#define GPIO5_IRQENABLE2 GPIO5_REG32(0x02C)
341#define GPIO5_IRQSTATUS2 GPIO5_REG32(0x028)
342#define GPIO5_WAKEUPENABLE GPIO5_REG32(0x020)
343#define GPIO5_RISINGDETECT GPIO5_REG32(0x048)
344#define GPIO5_FALLINGDETECT GPIO5_REG32(0x04C)
345#define GPIO5_DATAIN GPIO5_REG32(0x038)
346#define GPIO5_OE GPIO5_REG32(0x034)
347#define GPIO5_DATAOUT GPIO5_REG32(0x03C)
348#define GPIO5_DEBOUNCENABLE GPIO5_REG32(0x050)
349#define GPIO5_DEBOUNCINGTIME GPIO5_REG32(0x054)
350#endif
351
352/* IO CONFIG */
353#define OMAP24XX_CTRL_BASE (L4_24XX_BASE)
354#define CONTROL_REG32(offset) __REG32(OMAP24XX_CTRL_BASE + (offset))
355
356#define CONTROL_PADCONF_SPI1_NCS2 CONTROL_REG32(0x104)
357#define CONTROL_PADCONF_SYS_XTALOUT CONTROL_REG32(0x134)
358#define CONTROL_PADCONF_UART1_RX CONTROL_REG32(0x0C8)
359#define CONTROL_PADCONF_MCBSP1_DX CONTROL_REG32(0x10C)
360#define CONTROL_PADCONF_GPMC_NCS4 CONTROL_REG32(0x090)
361#define CONTROL_PADCONF_DSS_D5 CONTROL_REG32(0x0B8)
362#define CONTROL_PADCONF_DSS_D9 CONTROL_REG32(0x0BC) /* 2420 */
363#define CONTROL_PADCONF_DSS_D13 CONTROL_REG32(0x0C0)
364#define CONTROL_PADCONF_DSS_VSYNC CONTROL_REG32(0x0CC)
365#define CONTROL_PADCONF_SYS_NIRQW0 CONTROL_REG32(0x0BC) /* 2430 */
366#define CONTROL_PADCONF_SSI1_FLAG_TX CONTROL_REG32(0x108) /* 2430 */
367
368/* CONTROL */
369#define CONTROL_DEVCONF CONTROL_REG32(0x274)
370#define CONTROL_DEVCONF1 CONTROL_REG32(0x2E8)
371
372/* INTERRUPT CONTROLLER */
373#define INTC_BASE ((L4_24XX_BASE) + 0xfe000)
374#define INTC_REG32(offset) __REG32(INTC_BASE + (offset))
375
376#define INTC1_U_BASE INTC_REG32(0x000)
377#define INTC_MIR0 INTC_REG32(0x084)
378#define INTC_MIR_SET0 INTC_REG32(0x08C)
379#define INTC_MIR_CLEAR0 INTC_REG32(0x088)
380#define INTC_ISR_CLEAR0 INTC_REG32(0x094)
381#define INTC_MIR1 INTC_REG32(0x0A4)
382#define INTC_MIR_SET1 INTC_REG32(0x0AC)
383#define INTC_MIR_CLEAR1 INTC_REG32(0x0A8)
384#define INTC_ISR_CLEAR1 INTC_REG32(0x0B4)
385#define INTC_MIR2 INTC_REG32(0x0C4)
386#define INTC_MIR_SET2 INTC_REG32(0x0CC)
387#define INTC_MIR_CLEAR2 INTC_REG32(0x0C8)
388#define INTC_ISR_CLEAR2 INTC_REG32(0x0D4)
389#define INTC_SIR_IRQ INTC_REG32(0x040)
390#define INTC_CONTROL INTC_REG32(0x048)
391#define INTC_ILR11 INTC_REG32(0x12C) /* PRCM on MPU PIC */
392#define INTC_ILR30 INTC_REG32(0x178)
393#define INTC_ILR31 INTC_REG32(0x17C)
394#define INTC_ILR32 INTC_REG32(0x180)
395#define INTC_ILR37 INTC_REG32(0x194) /* GPIO4 on MPU PIC */
396#define INTC_SYSCONFIG INTC_REG32(0x010) /* GPT1 on MPU PIC */
397
398/* RAM FIREWALL */
399#define RAMFW_BASE (0x68005000)
400#define RAMFW_REG32(offset) __REG32(RAMFW_BASE + (offset))
401
402#define RAMFW_REQINFOPERM0 RAMFW_REG32(0x048)
403#define RAMFW_READPERM0 RAMFW_REG32(0x050)
404#define RAMFW_WRITEPERM0 RAMFW_REG32(0x058)
405
406/* GPMC CS1 FPGA ON USER INTERFACE MODULE */
407//#define DEBUG_BOARD_LED_REGISTER 0x04000014
408
409/* GPMC CS0 */
410#define GPMC_CONFIG1_0 GPMC_REG32(0x060)
411#define GPMC_CONFIG2_0 GPMC_REG32(0x064)
412#define GPMC_CONFIG3_0 GPMC_REG32(0x068)
413#define GPMC_CONFIG4_0 GPMC_REG32(0x06C)
414#define GPMC_CONFIG5_0 GPMC_REG32(0x070)
415#define GPMC_CONFIG6_0 GPMC_REG32(0x074)
416#define GPMC_CONFIG7_0 GPMC_REG32(0x078)
417
418/* GPMC CS1 */
419#define GPMC_CONFIG1_1 GPMC_REG32(0x090)
420#define GPMC_CONFIG2_1 GPMC_REG32(0x094)
421#define GPMC_CONFIG3_1 GPMC_REG32(0x098)
422#define GPMC_CONFIG4_1 GPMC_REG32(0x09C)
423#define GPMC_CONFIG5_1 GPMC_REG32(0x0a0)
424#define GPMC_CONFIG6_1 GPMC_REG32(0x0a4)
425#define GPMC_CONFIG7_1 GPMC_REG32(0x0a8)
426
427/* GPMC CS3 */
428#define GPMC_CONFIG1_3 GPMC_REG32(0x0F0)
429#define GPMC_CONFIG2_3 GPMC_REG32(0x0F4)
430#define GPMC_CONFIG3_3 GPMC_REG32(0x0F8)
431#define GPMC_CONFIG4_3 GPMC_REG32(0x0FC)
432#define GPMC_CONFIG5_3 GPMC_REG32(0x100)
433#define GPMC_CONFIG6_3 GPMC_REG32(0x104)
434#define GPMC_CONFIG7_3 GPMC_REG32(0x108)
435
436/* DSS */
437#define DSS_CONTROL DISP_REG32(0x040)
438#define DISPC_CONTROL DISP_REG32(0x440)
439#define DISPC_SYSSTATUS DISP_REG32(0x414)
440#define DISPC_IRQSTATUS DISP_REG32(0x418)
441#define DISPC_IRQENABLE DISP_REG32(0x41C)
442#define DISPC_CONFIG DISP_REG32(0x444)
443#define DISPC_DEFAULT_COLOR0 DISP_REG32(0x44C)
444#define DISPC_DEFAULT_COLOR1 DISP_REG32(0x450)
445#define DISPC_TRANS_COLOR0 DISP_REG32(0x454)
446#define DISPC_TRANS_COLOR1 DISP_REG32(0x458)
447#define DISPC_LINE_NUMBER DISP_REG32(0x460)
448#define DISPC_TIMING_H DISP_REG32(0x464)
449#define DISPC_TIMING_V DISP_REG32(0x468)
450#define DISPC_POL_FREQ DISP_REG32(0x46C)
451#define DISPC_DIVISOR DISP_REG32(0x470)
452#define DISPC_SIZE_DIG DISP_REG32(0x478)
453#define DISPC_SIZE_LCD DISP_REG32(0x47C)
454#define DISPC_GFX_BA0 DISP_REG32(0x480)
455#define DISPC_GFX_BA1 DISP_REG32(0x484)
456#define DISPC_GFX_POSITION DISP_REG32(0x488)
457#define DISPC_GFX_SIZE DISP_REG32(0x48C)
458#define DISPC_GFX_ATTRIBUTES DISP_REG32(0x4A0)
459#define DISPC_GFX_FIFO_THRESHOLD DISP_REG32(0x4A4)
460#define DISPC_GFX_ROW_INC DISP_REG32(0x4AC)
461#define DISPC_GFX_PIXEL_INC DISP_REG32(0x4B0)
462#define DISPC_GFX_WINDOW_SKIP DISP_REG32(0x4B4)
463#define DISPC_GFX_TABLE_BA DISP_REG32(0x4B8)
464#define DISPC_DATA_CYCLE1 DISP_REG32(0x5D4)
465#define DISPC_DATA_CYCLE2 DISP_REG32(0x5D8)
466#define DISPC_DATA_CYCLE3 DISP_REG32(0x5DC)
467
468/* HSUSB Suspend */
469#define HSUSB_CTRL __REG8(0x480AC001)
470#define USBOTG_POWER __REG32(0x480AC000)
471
472/* HS MMC */
473#define MMCHS1_SYSCONFIG __REG32(0x4809C010)
474#define MMCHS2_SYSCONFIG __REG32(0x480b4010)
475
476#endif /* __ASSEMBLER__ */
477
478#endif
479
480
481
482
483
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 90f530540c65..b12f423b8595 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -17,19 +17,27 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/clk.h> 18#include <linux/clk.h>
19 19
20#include "prcm-regs.h" 20#include <asm/io.h>
21
22#include "prm.h"
23#include "prm-regbits-24xx.h"
21 24
22extern void omap2_clk_prepare_for_reboot(void); 25extern void omap2_clk_prepare_for_reboot(void);
23 26
24u32 omap_prcm_get_reset_sources(void) 27u32 omap_prcm_get_reset_sources(void)
25{ 28{
26 return RM_RSTST_WKUP & 0x7f; 29 return prm_read_mod_reg(WKUP_MOD, RM_RSTST) & 0x7f;
27} 30}
28EXPORT_SYMBOL(omap_prcm_get_reset_sources); 31EXPORT_SYMBOL(omap_prcm_get_reset_sources);
29 32
30/* Resets clock rates and reboots the system. Only called from system.h */ 33/* Resets clock rates and reboots the system. Only called from system.h */
31void omap_prcm_arch_reset(char mode) 34void omap_prcm_arch_reset(char mode)
32{ 35{
36 u32 wkup;
33 omap2_clk_prepare_for_reboot(); 37 omap2_clk_prepare_for_reboot();
34 RM_RSTCTRL_WKUP |= 2; 38
39 if (cpu_is_omap24xx()) {
40 wkup = prm_read_mod_reg(WKUP_MOD, RM_RSTCTRL) | OMAP_RST_DPLL3;
41 prm_write_mod_reg(wkup, WKUP_MOD, RM_RSTCTRL);
42 }
35} 43}
diff --git a/arch/arm/mach-omap2/prm-regbits-24xx.h b/arch/arm/mach-omap2/prm-regbits-24xx.h
new file mode 100644
index 000000000000..c6d17a3378ec
--- /dev/null
+++ b/arch/arm/mach-omap2/prm-regbits-24xx.h
@@ -0,0 +1,279 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H
2#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H
3
4/*
5 * OMAP24XX Power/Reset Management register bits
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "prm.h"
18
19/* Bits shared between registers */
20
21/* PRCM_IRQSTATUS_MPU, PM_IRQSTATUS_DSP, PRCM_IRQSTATUS_IVA shared bits */
22#define OMAP24XX_VOLTTRANS_ST (1 << 2)
23#define OMAP24XX_WKUP2_ST (1 << 1)
24#define OMAP24XX_WKUP1_ST (1 << 0)
25
26/* PRCM_IRQENABLE_MPU, PM_IRQENABLE_DSP, PRCM_IRQENABLE_IVA shared bits */
27#define OMAP24XX_VOLTTRANS_EN (1 << 2)
28#define OMAP24XX_WKUP2_EN (1 << 1)
29#define OMAP24XX_WKUP1_EN (1 << 0)
30
31/* PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_DSP, PM_WKDEP_MDM shared bits */
32#define OMAP24XX_EN_MPU (1 << 1)
33#define OMAP24XX_EN_CORE (1 << 0)
34
35/*
36 * PM_PWSTCTRL_MPU, PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM
37 * shared bits
38 */
39#define OMAP24XX_MEMONSTATE_SHIFT 10
40#define OMAP24XX_MEMONSTATE_MASK (0x3 << 10)
41#define OMAP24XX_MEMRETSTATE (1 << 3)
42
43/* PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM shared bits */
44#define OMAP24XX_FORCESTATE (1 << 18)
45
46/*
47 * PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP,
48 * PM_PWSTST_MDM shared bits
49 */
50#define OMAP24XX_CLKACTIVITY (1 << 19)
51
52/* PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_DSP shared bits */
53#define OMAP24XX_LASTSTATEENTERED_SHIFT 4
54#define OMAP24XX_LASTSTATEENTERED_MASK (0x3 << 4)
55
56/* PM_PWSTST_MPU and PM_PWSTST_DSP shared bits */
57#define OMAP2430_MEMSTATEST_SHIFT 10
58#define OMAP2430_MEMSTATEST_MASK (0x3 << 10)
59
60/* PM_PWSTST_GFX, PM_PWSTST_DSP, PM_PWSTST_MDM shared bits */
61#define OMAP24XX_POWERSTATEST_SHIFT 0
62#define OMAP24XX_POWERSTATEST_MASK (0x3 << 0)
63
64
65/* Bits specific to each register */
66
67/* PRCM_REVISION */
68#define OMAP24XX_REV_SHIFT 0
69#define OMAP24XX_REV_MASK (0xff << 0)
70
71/* PRCM_SYSCONFIG */
72#define OMAP24XX_AUTOIDLE (1 << 0)
73
74/* PRCM_IRQSTATUS_MPU specific bits */
75#define OMAP2430_DPLL_RECAL_ST (1 << 6)
76#define OMAP24XX_TRANSITION_ST (1 << 5)
77#define OMAP24XX_EVGENOFF_ST (1 << 4)
78#define OMAP24XX_EVGENON_ST (1 << 3)
79
80/* PRCM_IRQENABLE_MPU specific bits */
81#define OMAP2430_DPLL_RECAL_EN (1 << 6)
82#define OMAP24XX_TRANSITION_EN (1 << 5)
83#define OMAP24XX_EVGENOFF_EN (1 << 4)
84#define OMAP24XX_EVGENON_EN (1 << 3)
85
86/* PRCM_VOLTCTRL */
87#define OMAP24XX_AUTO_EXTVOLT (1 << 15)
88#define OMAP24XX_FORCE_EXTVOLT (1 << 14)
89#define OMAP24XX_SETOFF_LEVEL_SHIFT 12
90#define OMAP24XX_SETOFF_LEVEL_MASK (0x3 << 12)
91#define OMAP24XX_MEMRETCTRL (1 << 8)
92#define OMAP24XX_SETRET_LEVEL_SHIFT 6
93#define OMAP24XX_SETRET_LEVEL_MASK (0x3 << 6)
94#define OMAP24XX_VOLT_LEVEL_SHIFT 0
95#define OMAP24XX_VOLT_LEVEL_MASK (0x3 << 0)
96
97/* PRCM_VOLTST */
98#define OMAP24XX_ST_VOLTLEVEL_SHIFT 0
99#define OMAP24XX_ST_VOLTLEVEL_MASK (0x3 << 0)
100
101/* PRCM_CLKSRC_CTRL specific bits */
102
103/* PRCM_CLKOUT_CTRL */
104#define OMAP2420_CLKOUT2_EN_SHIFT 15
105#define OMAP2420_CLKOUT2_EN (1 << 15)
106#define OMAP2420_CLKOUT2_DIV_SHIFT 11
107#define OMAP2420_CLKOUT2_DIV_MASK (0x7 << 11)
108#define OMAP2420_CLKOUT2_SOURCE_SHIFT 8
109#define OMAP2420_CLKOUT2_SOURCE_MASK (0x3 << 8)
110#define OMAP24XX_CLKOUT_EN_SHIFT 7
111#define OMAP24XX_CLKOUT_EN (1 << 7)
112#define OMAP24XX_CLKOUT_DIV_SHIFT 3
113#define OMAP24XX_CLKOUT_DIV_MASK (0x7 << 3)
114#define OMAP24XX_CLKOUT_SOURCE_SHIFT 0
115#define OMAP24XX_CLKOUT_SOURCE_MASK (0x3 << 0)
116
117/* PRCM_CLKEMUL_CTRL */
118#define OMAP24XX_EMULATION_EN_SHIFT 0
119#define OMAP24XX_EMULATION_EN (1 << 0)
120
121/* PRCM_CLKCFG_CTRL */
122#define OMAP24XX_VALID_CONFIG (1 << 0)
123
124/* PRCM_CLKCFG_STATUS */
125#define OMAP24XX_CONFIG_STATUS (1 << 0)
126
127/* PRCM_VOLTSETUP specific bits */
128
129/* PRCM_CLKSSETUP specific bits */
130
131/* PRCM_POLCTRL */
132#define OMAP2420_CLKOUT2_POL (1 << 10)
133#define OMAP24XX_CLKOUT_POL (1 << 9)
134#define OMAP24XX_CLKREQ_POL (1 << 8)
135#define OMAP2430_USE_POWEROK (1 << 2)
136#define OMAP2430_POWEROK_POL (1 << 1)
137#define OMAP24XX_EXTVOL_POL (1 << 0)
138
139/* RM_RSTST_MPU specific bits */
140/* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" instead */
141
142/* PM_WKDEP_MPU specific bits */
143#define OMAP2430_PM_WKDEP_MPU_EN_MDM (1 << 5)
144#define OMAP24XX_PM_WKDEP_MPU_EN_DSP (1 << 2)
145
146/* PM_EVGENCTRL_MPU specific bits */
147
148/* PM_EVEGENONTIM_MPU specific bits */
149
150/* PM_EVEGENOFFTIM_MPU specific bits */
151
152/* PM_PWSTCTRL_MPU specific bits */
153#define OMAP2430_FORCESTATE (1 << 18)
154
155/* PM_PWSTST_MPU specific bits */
156/* INTRANSITION, CLKACTIVITY, POWERSTATE, MEMSTATEST are 2430 only */
157
158/* PM_WKEN1_CORE specific bits */
159
160/* PM_WKEN2_CORE specific bits */
161
162/* PM_WKST1_CORE specific bits*/
163
164/* PM_WKST2_CORE specific bits */
165
166/* PM_WKDEP_CORE specific bits*/
167#define OMAP2430_PM_WKDEP_CORE_EN_MDM (1 << 5)
168#define OMAP24XX_PM_WKDEP_CORE_EN_GFX (1 << 3)
169#define OMAP24XX_PM_WKDEP_CORE_EN_DSP (1 << 2)
170
171/* PM_PWSTCTRL_CORE specific bits */
172#define OMAP24XX_MEMORYCHANGE (1 << 20)
173#define OMAP24XX_MEM3ONSTATE_SHIFT 14
174#define OMAP24XX_MEM3ONSTATE_MASK (0x3 << 14)
175#define OMAP24XX_MEM2ONSTATE_SHIFT 12
176#define OMAP24XX_MEM2ONSTATE_MASK (0x3 << 12)
177#define OMAP24XX_MEM1ONSTATE_SHIFT 10
178#define OMAP24XX_MEM1ONSTATE_MASK (0x3 << 10)
179#define OMAP24XX_MEM3RETSTATE (1 << 5)
180#define OMAP24XX_MEM2RETSTATE (1 << 4)
181#define OMAP24XX_MEM1RETSTATE (1 << 3)
182
183/* PM_PWSTST_CORE specific bits */
184#define OMAP24XX_MEM3STATEST_SHIFT 14
185#define OMAP24XX_MEM3STATEST_MASK (0x3 << 14)
186#define OMAP24XX_MEM2STATEST_SHIFT 12
187#define OMAP24XX_MEM2STATEST_MASK (0x3 << 12)
188#define OMAP24XX_MEM1STATEST_SHIFT 10
189#define OMAP24XX_MEM1STATEST_MASK (0x3 << 10)
190
191/* RM_RSTCTRL_GFX */
192#define OMAP24XX_GFX_RST (1 << 0)
193
194/* RM_RSTST_GFX specific bits */
195#define OMAP24XX_GFX_SW_RST (1 << 4)
196
197/* PM_PWSTCTRL_GFX specific bits */
198
199/* PM_WKDEP_GFX specific bits */
200/* 2430 often calls EN_WAKEUP "EN_WKUP" */
201
202/* RM_RSTCTRL_WKUP specific bits */
203
204/* RM_RSTTIME_WKUP specific bits */
205
206/* RM_RSTST_WKUP specific bits */
207/* 2430 calls EXTWMPU_RST "EXTWARM_RST" and GLOBALWMPU_RST "GLOBALWARM_RST" */
208#define OMAP24XX_EXTWMPU_RST (1 << 6)
209#define OMAP24XX_SECU_WD_RST (1 << 5)
210#define OMAP24XX_MPU_WD_RST (1 << 4)
211#define OMAP24XX_SECU_VIOL_RST (1 << 3)
212
213/* PM_WKEN_WKUP specific bits */
214
215/* PM_WKST_WKUP specific bits */
216
217/* RM_RSTCTRL_DSP */
218#define OMAP2420_RST_IVA (1 << 8)
219#define OMAP24XX_RST2_DSP (1 << 1)
220#define OMAP24XX_RST1_DSP (1 << 0)
221
222/* RM_RSTST_DSP specific bits */
223/* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" */
224#define OMAP2420_IVA_SW_RST (1 << 8)
225#define OMAP24XX_DSP_SW_RST2 (1 << 5)
226#define OMAP24XX_DSP_SW_RST1 (1 << 4)
227
228/* PM_WKDEP_DSP specific bits */
229
230/* PM_PWSTCTRL_DSP specific bits */
231/* 2430 only: MEMONSTATE, MEMRETSTATE */
232#define OMAP2420_MEMIONSTATE_SHIFT 12
233#define OMAP2420_MEMIONSTATE_MASK (0x3 << 12)
234#define OMAP2420_MEMIRETSTATE (1 << 4)
235
236/* PM_PWSTST_DSP specific bits */
237/* MEMSTATEST is 2430 only */
238#define OMAP2420_MEMISTATEST_SHIFT 12
239#define OMAP2420_MEMISTATEST_MASK (0x3 << 12)
240
241/* PRCM_IRQSTATUS_DSP specific bits */
242
243/* PRCM_IRQENABLE_DSP specific bits */
244
245/* RM_RSTCTRL_MDM */
246/* 2430 only */
247#define OMAP2430_PWRON1_MDM (1 << 1)
248#define OMAP2430_RST1_MDM (1 << 0)
249
250/* RM_RSTST_MDM specific bits */
251/* 2430 only */
252#define OMAP2430_MDM_SECU_VIOL (1 << 6)
253#define OMAP2430_MDM_SW_PWRON1 (1 << 5)
254#define OMAP2430_MDM_SW_RST1 (1 << 4)
255
256/* PM_WKEN_MDM */
257/* 2430 only */
258#define OMAP2430_PM_WKEN_MDM_EN_MDM (1 << 0)
259
260/* PM_WKST_MDM specific bits */
261/* 2430 only */
262
263/* PM_WKDEP_MDM specific bits */
264/* 2430 only */
265
266/* PM_PWSTCTRL_MDM specific bits */
267/* 2430 only */
268#define OMAP2430_KILLDOMAINWKUP (1 << 19)
269
270/* PM_PWSTST_MDM specific bits */
271/* 2430 only */
272
273/* PRCM_IRQSTATUS_IVA */
274/* 2420 only */
275
276/* PRCM_IRQENABLE_IVA */
277/* 2420 only */
278
279#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
new file mode 100644
index 000000000000..b4686bc345ca
--- /dev/null
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -0,0 +1,582 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_34XX_H
2#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_34XX_H
3
4/*
5 * OMAP3430 Power/Reset Management register bits
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "prm.h"
18
19/* Shared register bits */
20
21/* PRM_VC_CMD_VAL_0, PRM_VC_CMD_VAL_1 shared bits */
22#define OMAP3430_ON_SHIFT 24
23#define OMAP3430_ON_MASK (0xff << 24)
24#define OMAP3430_ONLP_SHIFT 16
25#define OMAP3430_ONLP_MASK (0xff << 16)
26#define OMAP3430_RET_SHIFT 8
27#define OMAP3430_RET_MASK (0xff << 8)
28#define OMAP3430_OFF_SHIFT 0
29#define OMAP3430_OFF_MASK (0xff << 0)
30
31/* PRM_VP1_CONFIG, PRM_VP2_CONFIG shared bits */
32#define OMAP3430_ERROROFFSET_SHIFT 24
33#define OMAP3430_ERROROFFSET_MASK (0xff << 24)
34#define OMAP3430_ERRORGAIN_SHIFT 16
35#define OMAP3430_ERRORGAIN_MASK (0xff << 16)
36#define OMAP3430_INITVOLTAGE_SHIFT 8
37#define OMAP3430_INITVOLTAGE_MASK (0xff << 8)
38#define OMAP3430_TIMEOUTEN (1 << 3)
39#define OMAP3430_INITVDD (1 << 2)
40#define OMAP3430_FORCEUPDATE (1 << 1)
41#define OMAP3430_VPENABLE (1 << 0)
42
43/* PRM_VP1_VSTEPMIN, PRM_VP2_VSTEPMIN shared bits */
44#define OMAP3430_SMPSWAITTIMEMIN_SHIFT 8
45#define OMAP3430_SMPSWAITTIMEMIN_MASK (0xffff << 8)
46#define OMAP3430_VSTEPMIN_SHIFT 0
47#define OMAP3430_VSTEPMIN_MASK (0xff << 0)
48
49/* PRM_VP1_VSTEPMAX, PRM_VP2_VSTEPMAX shared bits */
50#define OMAP3430_SMPSWAITTIMEMAX_SHIFT 8
51#define OMAP3430_SMPSWAITTIMEMAX_MASK (0xffff << 8)
52#define OMAP3430_VSTEPMAX_SHIFT 0
53#define OMAP3430_VSTEPMAX_MASK (0xff << 0)
54
55/* PRM_VP1_VLIMITTO, PRM_VP2_VLIMITTO shared bits */
56#define OMAP3430_VDDMAX_SHIFT 24
57#define OMAP3430_VDDMAX_MASK (0xff << 24)
58#define OMAP3430_VDDMIN_SHIFT 16
59#define OMAP3430_VDDMIN_MASK (0xff << 16)
60#define OMAP3430_TIMEOUT_SHIFT 0
61#define OMAP3430_TIMEOUT_MASK (0xffff << 0)
62
63/* PRM_VP1_VOLTAGE, PRM_VP2_VOLTAGE shared bits */
64#define OMAP3430_VPVOLTAGE_SHIFT 0
65#define OMAP3430_VPVOLTAGE_MASK (0xff << 0)
66
67/* PRM_VP1_STATUS, PRM_VP2_STATUS shared bits */
68#define OMAP3430_VPINIDLE (1 << 0)
69
70/* PM_WKDEP_IVA2, PM_WKDEP_MPU shared bits */
71#define OMAP3430_EN_PER (1 << 7)
72
73/* PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE shared bits */
74#define OMAP3430_MEMORYCHANGE (1 << 3)
75
76/* PM_PWSTST_IVA2, PM_PWSTST_CORE shared bits */
77#define OMAP3430_LOGICSTATEST (1 << 2)
78
79/* PM_PREPWSTST_IVA2, PM_PREPWSTST_CORE shared bits */
80#define OMAP3430_LASTLOGICSTATEENTERED (1 << 2)
81
82/*
83 * PM_PREPWSTST_IVA2, PM_PREPWSTST_MPU, PM_PREPWSTST_CORE,
84 * PM_PREPWSTST_GFX, PM_PREPWSTST_DSS, PM_PREPWSTST_CAM,
85 * PM_PREPWSTST_PER, PM_PREPWSTST_NEON shared bits
86 */
87#define OMAP3430_LASTPOWERSTATEENTERED_SHIFT 0
88#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
89
90/* PRM_IRQSTATUS_IVA2, PRM_IRQSTATUS_MPU shared bits */
91#define OMAP3430_WKUP_ST (1 << 0)
92
93/* PRM_IRQENABLE_IVA2, PRM_IRQENABLE_MPU shared bits */
94#define OMAP3430_WKUP_EN (1 << 0)
95
96/* PM_MPUGRPSEL1_CORE, PM_IVA2GRPSEL1_CORE shared bits */
97#define OMAP3430_GRPSEL_MMC2 (1 << 25)
98#define OMAP3430_GRPSEL_MMC1 (1 << 24)
99#define OMAP3430_GRPSEL_MCSPI4 (1 << 21)
100#define OMAP3430_GRPSEL_MCSPI3 (1 << 20)
101#define OMAP3430_GRPSEL_MCSPI2 (1 << 19)
102#define OMAP3430_GRPSEL_MCSPI1 (1 << 18)
103#define OMAP3430_GRPSEL_I2C3 (1 << 17)
104#define OMAP3430_GRPSEL_I2C2 (1 << 16)
105#define OMAP3430_GRPSEL_I2C1 (1 << 15)
106#define OMAP3430_GRPSEL_UART2 (1 << 14)
107#define OMAP3430_GRPSEL_UART1 (1 << 13)
108#define OMAP3430_GRPSEL_GPT11 (1 << 12)
109#define OMAP3430_GRPSEL_GPT10 (1 << 11)
110#define OMAP3430_GRPSEL_MCBSP5 (1 << 10)
111#define OMAP3430_GRPSEL_MCBSP1 (1 << 9)
112#define OMAP3430_GRPSEL_HSOTGUSB (1 << 4)
113#define OMAP3430_GRPSEL_D2D (1 << 3)
114
115/*
116 * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM,
117 * PM_PWSTCTRL_PER shared bits
118 */
119#define OMAP3430_MEMONSTATE_SHIFT 16
120#define OMAP3430_MEMONSTATE_MASK (0x3 << 16)
121#define OMAP3430_MEMRETSTATE (1 << 8)
122
123/* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */
124#define OMAP3430_GRPSEL_GPIO6 (1 << 17)
125#define OMAP3430_GRPSEL_GPIO5 (1 << 16)
126#define OMAP3430_GRPSEL_GPIO4 (1 << 15)
127#define OMAP3430_GRPSEL_GPIO3 (1 << 14)
128#define OMAP3430_GRPSEL_GPIO2 (1 << 13)
129#define OMAP3430_GRPSEL_UART3 (1 << 11)
130#define OMAP3430_GRPSEL_GPT9 (1 << 10)
131#define OMAP3430_GRPSEL_GPT8 (1 << 9)
132#define OMAP3430_GRPSEL_GPT7 (1 << 8)
133#define OMAP3430_GRPSEL_GPT6 (1 << 7)
134#define OMAP3430_GRPSEL_GPT5 (1 << 6)
135#define OMAP3430_GRPSEL_GPT4 (1 << 5)
136#define OMAP3430_GRPSEL_GPT3 (1 << 4)
137#define OMAP3430_GRPSEL_GPT2 (1 << 3)
138#define OMAP3430_GRPSEL_MCBSP4 (1 << 2)
139#define OMAP3430_GRPSEL_MCBSP3 (1 << 1)
140#define OMAP3430_GRPSEL_MCBSP2 (1 << 0)
141
142/* PM_MPUGRPSEL_WKUP, PM_IVA2GRPSEL_WKUP shared bits */
143#define OMAP3430_GRPSEL_IO (1 << 8)
144#define OMAP3430_GRPSEL_SR2 (1 << 7)
145#define OMAP3430_GRPSEL_SR1 (1 << 6)
146#define OMAP3430_GRPSEL_GPIO1 (1 << 3)
147#define OMAP3430_GRPSEL_GPT12 (1 << 1)
148#define OMAP3430_GRPSEL_GPT1 (1 << 0)
149
150/* Bits specific to each register */
151
152/* RM_RSTCTRL_IVA2 */
153#define OMAP3430_RST3_IVA2 (1 << 2)
154#define OMAP3430_RST2_IVA2 (1 << 1)
155#define OMAP3430_RST1_IVA2 (1 << 0)
156
157/* RM_RSTST_IVA2 specific bits */
158#define OMAP3430_EMULATION_VSEQ_RST (1 << 13)
159#define OMAP3430_EMULATION_VHWA_RST (1 << 12)
160#define OMAP3430_EMULATION_IVA2_RST (1 << 11)
161#define OMAP3430_IVA2_SW_RST3 (1 << 10)
162#define OMAP3430_IVA2_SW_RST2 (1 << 9)
163#define OMAP3430_IVA2_SW_RST1 (1 << 8)
164
165/* PM_WKDEP_IVA2 specific bits */
166
167/* PM_PWSTCTRL_IVA2 specific bits */
168#define OMAP3430_L2FLATMEMONSTATE_SHIFT 22
169#define OMAP3430_L2FLATMEMONSTATE_MASK (0x3 << 22)
170#define OMAP3430_SHAREDL2CACHEFLATONSTATE_SHIFT 20
171#define OMAP3430_SHAREDL2CACHEFLATONSTATE_MASK (0x3 << 20)
172#define OMAP3430_L1FLATMEMONSTATE_SHIFT 18
173#define OMAP3430_L1FLATMEMONSTATE_MASK (0x3 << 18)
174#define OMAP3430_SHAREDL1CACHEFLATONSTATE_SHIFT 16
175#define OMAP3430_SHAREDL1CACHEFLATONSTATE_MASK (0x3 << 16)
176#define OMAP3430_L2FLATMEMRETSTATE (1 << 11)
177#define OMAP3430_SHAREDL2CACHEFLATRETSTATE (1 << 10)
178#define OMAP3430_L1FLATMEMRETSTATE (1 << 9)
179#define OMAP3430_SHAREDL1CACHEFLATRETSTATE (1 << 8)
180
181/* PM_PWSTST_IVA2 specific bits */
182#define OMAP3430_L2FLATMEMSTATEST_SHIFT 10
183#define OMAP3430_L2FLATMEMSTATEST_MASK (0x3 << 10)
184#define OMAP3430_SHAREDL2CACHEFLATSTATEST_SHIFT 8
185#define OMAP3430_SHAREDL2CACHEFLATSTATEST_MASK (0x3 << 8)
186#define OMAP3430_L1FLATMEMSTATEST_SHIFT 6
187#define OMAP3430_L1FLATMEMSTATEST_MASK (0x3 << 6)
188#define OMAP3430_SHAREDL1CACHEFLATSTATEST_SHIFT 4
189#define OMAP3430_SHAREDL1CACHEFLATSTATEST_MASK (0x3 << 4)
190
191/* PM_PREPWSTST_IVA2 specific bits */
192#define OMAP3430_LASTL2FLATMEMSTATEENTERED_SHIFT 10
193#define OMAP3430_LASTL2FLATMEMSTATEENTERED_MASK (0x3 << 10)
194#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_SHIFT 8
195#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_MASK (0x3 << 8)
196#define OMAP3430_LASTL1FLATMEMSTATEENTERED_SHIFT 6
197#define OMAP3430_LASTL1FLATMEMSTATEENTERED_MASK (0x3 << 6)
198#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_SHIFT 4
199#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_MASK (0x3 << 4)
200
201/* PRM_IRQSTATUS_IVA2 specific bits */
202#define OMAP3430_PRM_IRQSTATUS_IVA2_IVA2_DPLL_ST (1 << 2)
203#define OMAP3430_FORCEWKUP_ST (1 << 1)
204
205/* PRM_IRQENABLE_IVA2 specific bits */
206#define OMAP3430_PRM_IRQENABLE_IVA2_IVA2_DPLL_RECAL_EN (1 << 2)
207#define OMAP3430_FORCEWKUP_EN (1 << 1)
208
209/* PRM_REVISION specific bits */
210
211/* PRM_SYSCONFIG specific bits */
212
213/* PRM_IRQSTATUS_MPU specific bits */
214#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25
215#define OMAP3430ES2_SND_PERIPH_DPLL_ST (1 << 25)
216#define OMAP3430_VC_TIMEOUTERR_ST (1 << 24)
217#define OMAP3430_VC_RAERR_ST (1 << 23)
218#define OMAP3430_VC_SAERR_ST (1 << 22)
219#define OMAP3430_VP2_TRANXDONE_ST (1 << 21)
220#define OMAP3430_VP2_EQVALUE_ST (1 << 20)
221#define OMAP3430_VP2_NOSMPSACK_ST (1 << 19)
222#define OMAP3430_VP2_MAXVDD_ST (1 << 18)
223#define OMAP3430_VP2_MINVDD_ST (1 << 17)
224#define OMAP3430_VP2_OPPCHANGEDONE_ST (1 << 16)
225#define OMAP3430_VP1_TRANXDONE_ST (1 << 15)
226#define OMAP3430_VP1_EQVALUE_ST (1 << 14)
227#define OMAP3430_VP1_NOSMPSACK_ST (1 << 13)
228#define OMAP3430_VP1_MAXVDD_ST (1 << 12)
229#define OMAP3430_VP1_MINVDD_ST (1 << 11)
230#define OMAP3430_VP1_OPPCHANGEDONE_ST (1 << 10)
231#define OMAP3430_IO_ST (1 << 9)
232#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST (1 << 8)
233#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT 8
234#define OMAP3430_MPU_DPLL_ST (1 << 7)
235#define OMAP3430_MPU_DPLL_ST_SHIFT 7
236#define OMAP3430_PERIPH_DPLL_ST (1 << 6)
237#define OMAP3430_PERIPH_DPLL_ST_SHIFT 6
238#define OMAP3430_CORE_DPLL_ST (1 << 5)
239#define OMAP3430_CORE_DPLL_ST_SHIFT 5
240#define OMAP3430_TRANSITION_ST (1 << 4)
241#define OMAP3430_EVGENOFF_ST (1 << 3)
242#define OMAP3430_EVGENON_ST (1 << 2)
243#define OMAP3430_FS_USB_WKUP_ST (1 << 1)
244
245/* PRM_IRQENABLE_MPU specific bits */
246#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT 25
247#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN (1 << 25)
248#define OMAP3430_VC_TIMEOUTERR_EN (1 << 24)
249#define OMAP3430_VC_RAERR_EN (1 << 23)
250#define OMAP3430_VC_SAERR_EN (1 << 22)
251#define OMAP3430_VP2_TRANXDONE_EN (1 << 21)
252#define OMAP3430_VP2_EQVALUE_EN (1 << 20)
253#define OMAP3430_VP2_NOSMPSACK_EN (1 << 19)
254#define OMAP3430_VP2_MAXVDD_EN (1 << 18)
255#define OMAP3430_VP2_MINVDD_EN (1 << 17)
256#define OMAP3430_VP2_OPPCHANGEDONE_EN (1 << 16)
257#define OMAP3430_VP1_TRANXDONE_EN (1 << 15)
258#define OMAP3430_VP1_EQVALUE_EN (1 << 14)
259#define OMAP3430_VP1_NOSMPSACK_EN (1 << 13)
260#define OMAP3430_VP1_MAXVDD_EN (1 << 12)
261#define OMAP3430_VP1_MINVDD_EN (1 << 11)
262#define OMAP3430_VP1_OPPCHANGEDONE_EN (1 << 10)
263#define OMAP3430_IO_EN (1 << 9)
264#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN (1 << 8)
265#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT 8
266#define OMAP3430_MPU_DPLL_RECAL_EN (1 << 7)
267#define OMAP3430_MPU_DPLL_RECAL_EN_SHIFT 7
268#define OMAP3430_PERIPH_DPLL_RECAL_EN (1 << 6)
269#define OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT 6
270#define OMAP3430_CORE_DPLL_RECAL_EN (1 << 5)
271#define OMAP3430_CORE_DPLL_RECAL_EN_SHIFT 5
272#define OMAP3430_TRANSITION_EN (1 << 4)
273#define OMAP3430_EVGENOFF_EN (1 << 3)
274#define OMAP3430_EVGENON_EN (1 << 2)
275#define OMAP3430_FS_USB_WKUP_EN (1 << 1)
276
277/* RM_RSTST_MPU specific bits */
278#define OMAP3430_EMULATION_MPU_RST (1 << 11)
279
280/* PM_WKDEP_MPU specific bits */
281#define OMAP3430_PM_WKDEP_MPU_EN_DSS (1 << 5)
282#define OMAP3430_PM_WKDEP_MPU_EN_IVA2 (1 << 2)
283
284/* PM_EVGENCTRL_MPU */
285#define OMAP3430_OFFLOADMODE_SHIFT 3
286#define OMAP3430_OFFLOADMODE_MASK (0x3 << 3)
287#define OMAP3430_ONLOADMODE_SHIFT 1
288#define OMAP3430_ONLOADMODE_MASK (0x3 << 1)
289#define OMAP3430_ENABLE (1 << 0)
290
291/* PM_EVGENONTIM_MPU */
292#define OMAP3430_ONTIMEVAL_SHIFT 0
293#define OMAP3430_ONTIMEVAL_MASK (0xffffffff << 0)
294
295/* PM_EVGENOFFTIM_MPU */
296#define OMAP3430_OFFTIMEVAL_SHIFT 0
297#define OMAP3430_OFFTIMEVAL_MASK (0xffffffff << 0)
298
299/* PM_PWSTCTRL_MPU specific bits */
300#define OMAP3430_L2CACHEONSTATE_SHIFT 16
301#define OMAP3430_L2CACHEONSTATE_MASK (0x3 << 16)
302#define OMAP3430_L2CACHERETSTATE (1 << 8)
303#define OMAP3430_LOGICL1CACHERETSTATE (1 << 2)
304
305/* PM_PWSTST_MPU specific bits */
306#define OMAP3430_L2CACHESTATEST_SHIFT 6
307#define OMAP3430_L2CACHESTATEST_MASK (0x3 << 6)
308#define OMAP3430_LOGICL1CACHESTATEST (1 << 2)
309
310/* PM_PREPWSTST_MPU specific bits */
311#define OMAP3430_LASTL2CACHESTATEENTERED_SHIFT 6
312#define OMAP3430_LASTL2CACHESTATEENTERED_MASK (0x3 << 6)
313#define OMAP3430_LASTLOGICL1CACHESTATEENTERED (1 << 2)
314
315/* RM_RSTCTRL_CORE */
316#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON (1 << 1)
317#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST (1 << 0)
318
319/* RM_RSTST_CORE specific bits */
320#define OMAP3430_MODEM_SECURITY_VIOL_RST (1 << 10)
321#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RSTPWRON (1 << 9)
322#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RST (1 << 8)
323
324/* PM_WKEN1_CORE specific bits */
325
326/* PM_MPUGRPSEL1_CORE specific bits */
327#define OMAP3430_GRPSEL_FSHOSTUSB (1 << 5)
328
329/* PM_IVA2GRPSEL1_CORE specific bits */
330
331/* PM_WKST1_CORE specific bits */
332
333/* PM_PWSTCTRL_CORE specific bits */
334#define OMAP3430_MEM2ONSTATE_SHIFT 18
335#define OMAP3430_MEM2ONSTATE_MASK (0x3 << 18)
336#define OMAP3430_MEM1ONSTATE_SHIFT 16
337#define OMAP3430_MEM1ONSTATE_MASK (0x3 << 16)
338#define OMAP3430_MEM2RETSTATE (1 << 9)
339#define OMAP3430_MEM1RETSTATE (1 << 8)
340
341/* PM_PWSTST_CORE specific bits */
342#define OMAP3430_MEM2STATEST_SHIFT 6
343#define OMAP3430_MEM2STATEST_MASK (0x3 << 6)
344#define OMAP3430_MEM1STATEST_SHIFT 4
345#define OMAP3430_MEM1STATEST_MASK (0x3 << 4)
346
347/* PM_PREPWSTST_CORE specific bits */
348#define OMAP3430_LASTMEM2STATEENTERED_SHIFT 6
349#define OMAP3430_LASTMEM2STATEENTERED_MASK (0x3 << 6)
350#define OMAP3430_LASTMEM1STATEENTERED_SHIFT 4
351#define OMAP3430_LASTMEM1STATEENTERED_MASK (0x3 << 4)
352
353/* RM_RSTST_GFX specific bits */
354
355/* PM_WKDEP_GFX specific bits */
356#define OMAP3430_PM_WKDEP_GFX_EN_IVA2 (1 << 2)
357
358/* PM_PWSTCTRL_GFX specific bits */
359
360/* PM_PWSTST_GFX specific bits */
361
362/* PM_PREPWSTST_GFX specific bits */
363
364/* PM_WKEN_WKUP specific bits */
365#define OMAP3430_EN_IO (1 << 8)
366
367/* PM_MPUGRPSEL_WKUP specific bits */
368
369/* PM_IVA2GRPSEL_WKUP specific bits */
370
371/* PM_WKST_WKUP specific bits */
372#define OMAP3430_ST_IO (1 << 8)
373
374/* PRM_CLKSEL */
375#define OMAP3430_SYS_CLKIN_SEL_SHIFT 0
376#define OMAP3430_SYS_CLKIN_SEL_MASK (0x7 << 0)
377
378/* PRM_CLKOUT_CTRL */
379#define OMAP3430_CLKOUT_EN (1 << 7)
380#define OMAP3430_CLKOUT_EN_SHIFT 7
381
382/* RM_RSTST_DSS specific bits */
383
384/* PM_WKEN_DSS */
385#define OMAP3430_PM_WKEN_DSS_EN_DSS (1 << 0)
386
387/* PM_WKDEP_DSS specific bits */
388#define OMAP3430_PM_WKDEP_DSS_EN_IVA2 (1 << 2)
389
390/* PM_PWSTCTRL_DSS specific bits */
391
392/* PM_PWSTST_DSS specific bits */
393
394/* PM_PREPWSTST_DSS specific bits */
395
396/* RM_RSTST_CAM specific bits */
397
398/* PM_WKDEP_CAM specific bits */
399#define OMAP3430_PM_WKDEP_CAM_EN_IVA2 (1 << 2)
400
401/* PM_PWSTCTRL_CAM specific bits */
402
403/* PM_PWSTST_CAM specific bits */
404
405/* PM_PREPWSTST_CAM specific bits */
406
407/* PM_PWSTCTRL_USBHOST specific bits */
408#define OMAP3430ES2_SAVEANDRESTORE_SHIFT (1 << 4)
409
410/* RM_RSTST_PER specific bits */
411
412/* PM_WKEN_PER specific bits */
413
414/* PM_MPUGRPSEL_PER specific bits */
415
416/* PM_IVA2GRPSEL_PER specific bits */
417
418/* PM_WKST_PER specific bits */
419
420/* PM_WKDEP_PER specific bits */
421#define OMAP3430_PM_WKDEP_PER_EN_IVA2 (1 << 2)
422
423/* PM_PWSTCTRL_PER specific bits */
424
425/* PM_PWSTST_PER specific bits */
426
427/* PM_PREPWSTST_PER specific bits */
428
429/* RM_RSTST_EMU specific bits */
430
431/* PM_PWSTST_EMU specific bits */
432
433/* PRM_VC_SMPS_SA */
434#define OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT 16
435#define OMAP3430_PRM_VC_SMPS_SA_SA1_MASK (0x7f << 16)
436#define OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT 0
437#define OMAP3430_PRM_VC_SMPS_SA_SA0_MASK (0x7f << 0)
438
439/* PRM_VC_SMPS_VOL_RA */
440#define OMAP3430_VOLRA1_SHIFT 16
441#define OMAP3430_VOLRA1_MASK (0xff << 16)
442#define OMAP3430_VOLRA0_SHIFT 0
443#define OMAP3430_VOLRA0_MASK (0xff << 0)
444
445/* PRM_VC_SMPS_CMD_RA */
446#define OMAP3430_CMDRA1_SHIFT 16
447#define OMAP3430_CMDRA1_MASK (0xff << 16)
448#define OMAP3430_CMDRA0_SHIFT 0
449#define OMAP3430_CMDRA0_MASK (0xff << 0)
450
451/* PRM_VC_CMD_VAL_0 specific bits */
452
453/* PRM_VC_CMD_VAL_1 specific bits */
454
455/* PRM_VC_CH_CONF */
456#define OMAP3430_CMD1 (1 << 20)
457#define OMAP3430_RACEN1 (1 << 19)
458#define OMAP3430_RAC1 (1 << 18)
459#define OMAP3430_RAV1 (1 << 17)
460#define OMAP3430_PRM_VC_CH_CONF_SA1 (1 << 16)
461#define OMAP3430_CMD0 (1 << 4)
462#define OMAP3430_RACEN0 (1 << 3)
463#define OMAP3430_RAC0 (1 << 2)
464#define OMAP3430_RAV0 (1 << 1)
465#define OMAP3430_PRM_VC_CH_CONF_SA0 (1 << 0)
466
467/* PRM_VC_I2C_CFG */
468#define OMAP3430_HSMASTER (1 << 5)
469#define OMAP3430_SREN (1 << 4)
470#define OMAP3430_HSEN (1 << 3)
471#define OMAP3430_MCODE_SHIFT 0
472#define OMAP3430_MCODE_MASK (0x7 << 0)
473
474/* PRM_VC_BYPASS_VAL */
475#define OMAP3430_VALID (1 << 24)
476#define OMAP3430_DATA_SHIFT 16
477#define OMAP3430_DATA_MASK (0xff << 16)
478#define OMAP3430_REGADDR_SHIFT 8
479#define OMAP3430_REGADDR_MASK (0xff << 8)
480#define OMAP3430_SLAVEADDR_SHIFT 0
481#define OMAP3430_SLAVEADDR_MASK (0x7f << 0)
482
483/* PRM_RSTCTRL */
484#define OMAP3430_RST_DPLL3 (1 << 2)
485#define OMAP3430_RST_GS (1 << 1)
486
487/* PRM_RSTTIME */
488#define OMAP3430_RSTTIME2_SHIFT 8
489#define OMAP3430_RSTTIME2_MASK (0x1f << 8)
490#define OMAP3430_RSTTIME1_SHIFT 0
491#define OMAP3430_RSTTIME1_MASK (0xff << 0)
492
493/* PRM_RSTST */
494#define OMAP3430_ICECRUSHER_RST (1 << 10)
495#define OMAP3430_ICEPICK_RST (1 << 9)
496#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST (1 << 8)
497#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST (1 << 7)
498#define OMAP3430_EXTERNAL_WARM_RST (1 << 6)
499#define OMAP3430_SECURE_WD_RST (1 << 5)
500#define OMAP3430_MPU_WD_RST (1 << 4)
501#define OMAP3430_SECURITY_VIOL_RST (1 << 3)
502#define OMAP3430_GLOBAL_SW_RST (1 << 1)
503#define OMAP3430_GLOBAL_COLD_RST (1 << 0)
504
505/* PRM_VOLTCTRL */
506#define OMAP3430_SEL_VMODE (1 << 4)
507#define OMAP3430_SEL_OFF (1 << 3)
508#define OMAP3430_AUTO_OFF (1 << 2)
509#define OMAP3430_AUTO_RET (1 << 1)
510#define OMAP3430_AUTO_SLEEP (1 << 0)
511
512/* PRM_SRAM_PCHARGE */
513#define OMAP3430_PCHARGE_TIME_SHIFT 0
514#define OMAP3430_PCHARGE_TIME_MASK (0xff << 0)
515
516/* PRM_CLKSRC_CTRL */
517#define OMAP3430_SYSCLKDIV_SHIFT 6
518#define OMAP3430_SYSCLKDIV_MASK (0x3 << 6)
519#define OMAP3430_AUTOEXTCLKMODE_SHIFT 3
520#define OMAP3430_AUTOEXTCLKMODE_MASK (0x3 << 3)
521#define OMAP3430_SYSCLKSEL_SHIFT 0
522#define OMAP3430_SYSCLKSEL_MASK (0x3 << 0)
523
524/* PRM_VOLTSETUP1 */
525#define OMAP3430_SETUP_TIME2_SHIFT 16
526#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16)
527#define OMAP3430_SETUP_TIME1_SHIFT 0
528#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0)
529
530/* PRM_VOLTOFFSET */
531#define OMAP3430_OFFSET_TIME_SHIFT 0
532#define OMAP3430_OFFSET_TIME_MASK (0xffff << 0)
533
534/* PRM_CLKSETUP */
535#define OMAP3430_SETUP_TIME_SHIFT 0
536#define OMAP3430_SETUP_TIME_MASK (0xffff << 0)
537
538/* PRM_POLCTRL */
539#define OMAP3430_OFFMODE_POL (1 << 3)
540#define OMAP3430_CLKOUT_POL (1 << 2)
541#define OMAP3430_CLKREQ_POL (1 << 1)
542#define OMAP3430_EXTVOL_POL (1 << 0)
543
544/* PRM_VOLTSETUP2 */
545#define OMAP3430_OFFMODESETUPTIME_SHIFT 0
546#define OMAP3430_OFFMODESETUPTIME_MASK (0xffff << 0)
547
548/* PRM_VP1_CONFIG specific bits */
549
550/* PRM_VP1_VSTEPMIN specific bits */
551
552/* PRM_VP1_VSTEPMAX specific bits */
553
554/* PRM_VP1_VLIMITTO specific bits */
555
556/* PRM_VP1_VOLTAGE specific bits */
557
558/* PRM_VP1_STATUS specific bits */
559
560/* PRM_VP2_CONFIG specific bits */
561
562/* PRM_VP2_VSTEPMIN specific bits */
563
564/* PRM_VP2_VSTEPMAX specific bits */
565
566/* PRM_VP2_VLIMITTO specific bits */
567
568/* PRM_VP2_VOLTAGE specific bits */
569
570/* PRM_VP2_STATUS specific bits */
571
572/* RM_RSTST_NEON specific bits */
573
574/* PM_WKDEP_NEON specific bits */
575
576/* PM_PWSTCTRL_NEON specific bits */
577
578/* PM_PWSTST_NEON specific bits */
579
580/* PM_PREPWSTST_NEON specific bits */
581
582#endif
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
new file mode 100644
index 000000000000..ab7649afd891
--- /dev/null
+++ b/arch/arm/mach-omap2/prm.h
@@ -0,0 +1,316 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_PRM_H
2#define __ARCH_ARM_MACH_OMAP2_PRM_H
3
4/*
5 * OMAP2/3 Power/Reset Management (PRM) register definitions
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "prcm-common.h"
18
19#ifndef __ASSEMBLER__
20#define OMAP_PRM_REGADDR(module, reg) \
21 (void __iomem *)IO_ADDRESS(OMAP2_PRM_BASE + (module) + (reg))
22#else
23#define OMAP2420_PRM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
25#define OMAP2430_PRM_REGADDR(module, reg) \
26 IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
27#define OMAP34XX_PRM_REGADDR(module, reg) \
28 IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))
29#endif
30
31/*
32 * Architecture-specific global PRM registers
33 * Use prm_{read,write}_reg() with these registers.
34 *
35 * With a few exceptions, these are the register names beginning with
36 * PRCM_* on 24xx, and PRM_* on 34xx. (The exceptions are the
37 * IRQSTATUS and IRQENABLE bits.)
38 *
39 */
40
41#define OMAP24XX_PRCM_REVISION OMAP_PRM_REGADDR(OCP_MOD, 0x0000)
42#define OMAP24XX_PRCM_SYSCONFIG OMAP_PRM_REGADDR(OCP_MOD, 0x0010)
43
44#define OMAP24XX_PRCM_IRQSTATUS_MPU OMAP_PRM_REGADDR(OCP_MOD, 0x0018)
45#define OMAP24XX_PRCM_IRQENABLE_MPU OMAP_PRM_REGADDR(OCP_MOD, 0x001c)
46
47#define OMAP24XX_PRCM_VOLTCTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0050)
48#define OMAP24XX_PRCM_VOLTST OMAP_PRM_REGADDR(OCP_MOD, 0x0054)
49#define OMAP24XX_PRCM_CLKSRC_CTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0060)
50#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0070)
51#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0078)
52#define OMAP24XX_PRCM_CLKCFG_CTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0080)
53#define OMAP24XX_PRCM_CLKCFG_STATUS OMAP_PRM_REGADDR(OCP_MOD, 0x0084)
54#define OMAP24XX_PRCM_VOLTSETUP OMAP_PRM_REGADDR(OCP_MOD, 0x0090)
55#define OMAP24XX_PRCM_CLKSSETUP OMAP_PRM_REGADDR(OCP_MOD, 0x0094)
56#define OMAP24XX_PRCM_POLCTRL OMAP_PRM_REGADDR(OCP_MOD, 0x0098)
57
58#define OMAP3430_PRM_REVISION OMAP_PRM_REGADDR(OCP_MOD, 0x0004)
59#define OMAP3430_PRM_SYSCONFIG OMAP_PRM_REGADDR(OCP_MOD, 0x0014)
60
61#define OMAP3430_PRM_IRQSTATUS_MPU OMAP_PRM_REGADDR(OCP_MOD, 0x0018)
62#define OMAP3430_PRM_IRQENABLE_MPU OMAP_PRM_REGADDR(OCP_MOD, 0x001c)
63
64
65#define OMAP3430_PRM_VC_SMPS_SA OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0020)
66#define OMAP3430_PRM_VC_SMPS_VOL_RA OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0024)
67#define OMAP3430_PRM_VC_SMPS_CMD_RA OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0028)
68#define OMAP3430_PRM_VC_CMD_VAL_0 OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x002c)
69#define OMAP3430_PRM_VC_CMD_VAL_1 OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0030)
70#define OMAP3430_PRM_VC_CH_CONF OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0034)
71#define OMAP3430_PRM_VC_I2C_CFG OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0038)
72#define OMAP3430_PRM_VC_BYPASS_VAL OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x003c)
73#define OMAP3430_PRM_RSTCTRL OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0050)
74#define OMAP3430_PRM_RSTTIME OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0054)
75#define OMAP3430_PRM_RSTST OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0058)
76#define OMAP3430_PRM_VOLTCTRL OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0060)
77#define OMAP3430_PRM_SRAM_PCHARGE OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0064)
78#define OMAP3430_PRM_CLKSRC_CTRL OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0070)
79#define OMAP3430_PRM_VOLTSETUP1 OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0090)
80#define OMAP3430_PRM_VOLTOFFSET OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0094)
81#define OMAP3430_PRM_CLKSETUP OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x0098)
82#define OMAP3430_PRM_POLCTRL OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x009c)
83#define OMAP3430_PRM_VOLTSETUP2 OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00a0)
84#define OMAP3430_PRM_VP1_CONFIG OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00b0)
85#define OMAP3430_PRM_VP1_VSTEPMIN OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00b4)
86#define OMAP3430_PRM_VP1_VSTEPMAX OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00b8)
87#define OMAP3430_PRM_VP1_VLIMITTO OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00bc)
88#define OMAP3430_PRM_VP1_VOLTAGE OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00c0)
89#define OMAP3430_PRM_VP1_STATUS OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00c4)
90#define OMAP3430_PRM_VP2_CONFIG OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00d0)
91#define OMAP3430_PRM_VP2_VSTEPMIN OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00d4)
92#define OMAP3430_PRM_VP2_VSTEPMAX OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00d8)
93#define OMAP3430_PRM_VP2_VLIMITTO OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00dc)
94#define OMAP3430_PRM_VP2_VOLTAGE OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e0)
95#define OMAP3430_PRM_VP2_STATUS OMAP_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e4)
96
97#define OMAP3430_PRM_CLKSEL OMAP_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0040)
98#define OMAP3430_PRM_CLKOUT_CTRL OMAP_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
99
100/*
101 * Module specific PRM registers from PRM_BASE + domain offset
102 *
103 * Use prm_{read,write}_mod_reg() with these registers.
104 *
105 * With a few exceptions, these are the register names beginning with
106 * {PM,RM}_* on both architectures. (The exceptions are the IRQSTATUS
107 * and IRQENABLE bits.)
108 *
109 */
110
111/* Registers appearing on both 24xx and 34xx */
112
113#define RM_RSTCTRL 0x0050
114#define RM_RSTTIME 0x0054
115#define RM_RSTST 0x0058
116
117#define PM_WKEN 0x00a0
118#define PM_WKEN1 PM_WKEN
119#define PM_WKST 0x00b0
120#define PM_WKST1 PM_WKST
121#define PM_WKDEP 0x00c8
122#define PM_EVGENCTRL 0x00d4
123#define PM_EVGENONTIM 0x00d8
124#define PM_EVGENOFFTIM 0x00dc
125#define PM_PWSTCTRL 0x00e0
126#define PM_PWSTST 0x00e4
127
128#define OMAP3430_PM_MPUGRPSEL 0x00a4
129#define OMAP3430_PM_MPUGRPSEL1 OMAP3430_PM_MPUGRPSEL
130
131#define OMAP3430_PM_IVAGRPSEL 0x00a8
132#define OMAP3430_PM_IVAGRPSEL1 OMAP3430_PM_IVAGRPSEL
133
134#define OMAP3430_PM_PREPWSTST 0x00e8
135
136#define OMAP3430_PRM_IRQSTATUS_IVA2 0x00f8
137#define OMAP3430_PRM_IRQENABLE_IVA2 0x00fc
138
139
140/* Architecture-specific registers */
141
142#define OMAP24XX_PM_WKEN2 0x00a4
143#define OMAP24XX_PM_WKST2 0x00b4
144
145#define OMAP24XX_PRCM_IRQSTATUS_DSP 0x00f0 /* IVA mod */
146#define OMAP24XX_PRCM_IRQENABLE_DSP 0x00f4 /* IVA mod */
147#define OMAP24XX_PRCM_IRQSTATUS_IVA 0x00f8
148#define OMAP24XX_PRCM_IRQENABLE_IVA 0x00fc
149
150#ifndef __ASSEMBLER__
151
152/* Power/reset management domain register get/set */
153
154static inline void prm_write_mod_reg(u32 val, s16 module, s16 idx)
155{
156 __raw_writel(val, OMAP_PRM_REGADDR(module, idx));
157}
158
159static inline u32 prm_read_mod_reg(s16 module, s16 idx)
160{
161 return __raw_readl(OMAP_PRM_REGADDR(module, idx));
162}
163
164#endif
165
166/*
167 * Bits common to specific registers
168 *
169 * The 3430 register and bit names are generally used,
170 * since they tend to make more sense
171 */
172
173/* PM_EVGENONTIM_MPU */
174/* Named PM_EVEGENONTIM_MPU on the 24XX */
175#define OMAP_ONTIMEVAL_SHIFT 0
176#define OMAP_ONTIMEVAL_MASK (0xffffffff << 0)
177
178/* PM_EVGENOFFTIM_MPU */
179/* Named PM_EVEGENOFFTIM_MPU on the 24XX */
180#define OMAP_OFFTIMEVAL_SHIFT 0
181#define OMAP_OFFTIMEVAL_MASK (0xffffffff << 0)
182
183/* PRM_CLKSETUP and PRCM_VOLTSETUP */
184/* Named PRCM_CLKSSETUP on the 24XX */
185#define OMAP_SETUP_TIME_SHIFT 0
186#define OMAP_SETUP_TIME_MASK (0xffff << 0)
187
188/* PRM_CLKSRC_CTRL */
189/* Named PRCM_CLKSRC_CTRL on the 24XX */
190#define OMAP_SYSCLKDIV_SHIFT 6
191#define OMAP_SYSCLKDIV_MASK (0x3 << 6)
192#define OMAP_AUTOEXTCLKMODE_SHIFT 3
193#define OMAP_AUTOEXTCLKMODE_MASK (0x3 << 3)
194#define OMAP_SYSCLKSEL_SHIFT 0
195#define OMAP_SYSCLKSEL_MASK (0x3 << 0)
196
197/* PM_EVGENCTRL_MPU */
198#define OMAP_OFFLOADMODE_SHIFT 3
199#define OMAP_OFFLOADMODE_MASK (0x3 << 3)
200#define OMAP_ONLOADMODE_SHIFT 1
201#define OMAP_ONLOADMODE_MASK (0x3 << 1)
202#define OMAP_ENABLE (1 << 0)
203
204/* PRM_RSTTIME */
205/* Named RM_RSTTIME_WKUP on the 24xx */
206#define OMAP_RSTTIME2_SHIFT 8
207#define OMAP_RSTTIME2_MASK (0x1f << 8)
208#define OMAP_RSTTIME1_SHIFT 0
209#define OMAP_RSTTIME1_MASK (0xff << 0)
210
211
212/* PRM_RSTCTRL */
213/* Named RM_RSTCTRL_WKUP on the 24xx */
214/* 2420 calls RST_DPLL3 'RST_DPLL' */
215#define OMAP_RST_DPLL3 (1 << 2)
216#define OMAP_RST_GS (1 << 1)
217
218
219/*
220 * Bits common to module-shared registers
221 *
222 * Not all registers of a particular type support all of these bits -
223 * check TRM if you are unsure
224 */
225
226/*
227 * 24XX: PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP
228 *
229 * 2430: PM_PWSTST_MDM
230 *
231 * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
232 * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
233 * PM_PWSTST_NEON
234 */
235#define OMAP_INTRANSITION (1 << 20)
236
237
238/*
239 * 24XX: PM_PWSTST_GFX, PM_PWSTST_DSP
240 *
241 * 2430: PM_PWSTST_MDM
242 *
243 * 3430: PM_PWSTST_IVA2, PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_GFX,
244 * PM_PWSTST_DSS, PM_PWSTST_CAM, PM_PWSTST_PER, PM_PWSTST_EMU,
245 * PM_PWSTST_NEON
246 */
247#define OMAP_POWERSTATEST_SHIFT 0
248#define OMAP_POWERSTATEST_MASK (0x3 << 0)
249
250/*
251 * 24XX: RM_RSTST_MPU and RM_RSTST_DSP - on 24XX, 'COREDOMAINWKUP_RST' is
252 * called 'COREWKUP_RST'
253 *
254 * 3430: RM_RSTST_IVA2, RM_RSTST_MPU, RM_RSTST_GFX, RM_RSTST_DSS,
255 * RM_RSTST_CAM, RM_RSTST_PER, RM_RSTST_NEON
256 */
257#define OMAP_COREDOMAINWKUP_RST (1 << 3)
258
259/*
260 * 24XX: RM_RSTST_MPU, RM_RSTST_GFX, RM_RSTST_DSP
261 *
262 * 2430: RM_RSTST_MDM
263 *
264 * 3430: RM_RSTST_CORE, RM_RSTST_EMU
265 */
266#define OMAP_DOMAINWKUP_RST (1 << 2)
267
268/*
269 * 24XX: RM_RSTST_MPU, RM_RSTST_WKUP, RM_RSTST_DSP
270 * On 24XX, 'GLOBALWARM_RST' is called 'GLOBALWMPU_RST'.
271 *
272 * 2430: RM_RSTST_MDM
273 *
274 * 3430: RM_RSTST_CORE, RM_RSTST_EMU
275 */
276#define OMAP_GLOBALWARM_RST (1 << 1)
277#define OMAP_GLOBALCOLD_RST (1 << 0)
278
279/*
280 * 24XX: PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_CORE, PM_WKDEP_DSP
281 * 2420 TRM sometimes uses "EN_WAKEUP" instead of "EN_WKUP"
282 *
283 * 2430: PM_WKDEP_MDM
284 *
285 * 3430: PM_WKDEP_IVA2, PM_WKDEP_GFX, PM_WKDEP_DSS, PM_WKDEP_CAM,
286 * PM_WKDEP_PER
287 */
288#define OMAP_EN_WKUP (1 << 4)
289
290/*
291 * 24XX: PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE, PM_PWSTCTRL_GFX,
292 * PM_PWSTCTRL_DSP
293 *
294 * 2430: PM_PWSTCTRL_MDM
295 *
296 * 3430: PM_PWSTCTRL_IVA2, PM_PWSTCTRL_CORE, PM_PWSTCTRL_GFX,
297 * PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM, PM_PWSTCTRL_PER,
298 * PM_PWSTCTRL_NEON
299 */
300#define OMAP_LOGICRETSTATE (1 << 2)
301
302/*
303 * 24XX: PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE, PM_PWSTCTRL_GFX,
304 * PM_PWSTCTRL_DSP, PM_PWSTST_MPU
305 *
306 * 2430: PM_PWSTCTRL_MDM shared bits
307 *
308 * 3430: PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE,
309 * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM, PM_PWSTCTRL_PER,
310 * PM_PWSTCTRL_NEON shared bits
311 */
312#define OMAP_POWERSTATE_SHIFT 0
313#define OMAP_POWERSTATE_MASK (0x3 << 0)
314
315
316#endif
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
new file mode 100644
index 000000000000..d7f23bc9550a
--- /dev/null
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -0,0 +1,58 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_SDRC_H
2#define __ARCH_ARM_MACH_OMAP2_SDRC_H
3
4/*
5 * OMAP2 SDRC register definitions
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#undef DEBUG
17
18#include <asm/arch/sdrc.h>
19
20#ifndef __ASSEMBLER__
21extern unsigned long omap2_sdrc_base;
22extern unsigned long omap2_sms_base;
23
24#define OMAP_SDRC_REGADDR(reg) \
25 (void __iomem *)IO_ADDRESS(omap2_sdrc_base + (reg))
26#define OMAP_SMS_REGADDR(reg) \
27 (void __iomem *)IO_ADDRESS(omap2_sms_base + (reg))
28
29/* SDRC global register get/set */
30
31static inline void sdrc_write_reg(u32 val, u16 reg)
32{
33 __raw_writel(val, OMAP_SDRC_REGADDR(reg));
34}
35
36static inline u32 sdrc_read_reg(u16 reg)
37{
38 return __raw_readl(OMAP_SDRC_REGADDR(reg));
39}
40
41/* SMS global register get/set */
42
43static inline void sms_write_reg(u32 val, u16 reg)
44{
45 __raw_writel(val, OMAP_SMS_REGADDR(reg));
46}
47
48static inline u32 sms_read_reg(u16 reg)
49{
50 return __raw_readl(OMAP_SMS_REGADDR(reg));
51}
52#else
53#define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg))
54#define OMAP243X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg))
55#define OMAP34XX_SDRC_REGADDR(reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg))
56#endif /* __ASSEMBLER__ */
57
58#endif
diff --git a/arch/arm/mach-omap2/sleep.S b/arch/arm/mach-omap2/sleep.S
index 16247d557853..46ccb9b8b583 100644
--- a/arch/arm/mach-omap2/sleep.S
+++ b/arch/arm/mach-omap2/sleep.S
@@ -26,19 +26,10 @@
26#include <asm/arch/io.h> 26#include <asm/arch/io.h>
27#include <asm/arch/pm.h> 27#include <asm/arch/pm.h>
28 28
29#define A_32KSYNC_CR_V IO_ADDRESS(OMAP_TIMER32K_BASE+0x10) 29#include "sdrc.h"
30#define A_PRCM_VOLTCTRL_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x50)
31#define A_PRCM_CLKCFG_CTRL_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x80)
32#define A_CM_CLKEN_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x500)
33#define A_CM_IDLEST_CKGEN_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x520)
34#define A_CM_CLKSEL1_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x540)
35#define A_CM_CLKSEL2_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE+0x544)
36 30
37#define A_SDRC_DLLA_CTRL_V IO_ADDRESS(OMAP24XX_SDRC_BASE+0x60) 31/* First address of reserved address space? apparently valid for OMAP2 & 3 */
38#define A_SDRC_POWER_V IO_ADDRESS(OMAP24XX_SDRC_BASE+0x70)
39#define A_SDRC_RFR_CTRL_V IO_ADDRESS(OMAP24XX_SDRC_BASE+0xA4)
40#define A_SDRC0_V (0xC0000000) 32#define A_SDRC0_V (0xC0000000)
41#define A_SDRC_MANUAL_V IO_ADDRESS(OMAP24XX_SDRC_BASE+0xA8)
42 33
43 .text 34 .text
44 35
@@ -126,17 +117,11 @@ loop2:
126 ldmfd sp!, {r0 - r12, pc} @ restore regs and return 117 ldmfd sp!, {r0 - r12, pc} @ restore regs and return
127 118
128A_SDRC_POWER: 119A_SDRC_POWER:
129 .word A_SDRC_POWER_V 120 .word OMAP242X_SDRC_REGADDR(SDRC_POWER)
130A_SDRC0: 121A_SDRC0:
131 .word A_SDRC0_V 122 .word A_SDRC0_V
132A_CM_CLKSEL2_PLL_S:
133 .word A_CM_CLKSEL2_PLL_V
134A_CM_CLKEN_PLL:
135 .word A_CM_CLKEN_PLL_V
136A_SDRC_DLLA_CTRL_S: 123A_SDRC_DLLA_CTRL_S:
137 .word A_SDRC_DLLA_CTRL_V 124 .word OMAP242X_SDRC_REGADDR(SDRC_DLLA_CTRL)
138A_SDRC_MANUAL_S:
139 .word A_SDRC_MANUAL_V
140 125
141ENTRY(omap24xx_cpu_suspend_sz) 126ENTRY(omap24xx_cpu_suspend_sz)
142 .word . - omap24xx_cpu_suspend 127 .word . - omap24xx_cpu_suspend
diff --git a/arch/arm/mach-omap2/sram-fn.S b/arch/arm/mach-omap2/sram-fn.S
index b27576690f8d..4a9e49140716 100644
--- a/arch/arm/mach-omap2/sram-fn.S
+++ b/arch/arm/mach-omap2/sram-fn.S
@@ -27,19 +27,11 @@
27#include <asm/arch/io.h> 27#include <asm/arch/io.h>
28#include <asm/hardware.h> 28#include <asm/hardware.h>
29 29
30#include "prcm-regs.h" 30#include "sdrc.h"
31#include "prm.h"
32#include "cm.h"
31 33
32#define TIMER_32KSYNCT_CR_V IO_ADDRESS(OMAP24XX_32KSYNCT_BASE + 0x010) 34#define TIMER_32KSYNCT_CR_V IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
33
34#define CM_CLKSEL2_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x544)
35#define PRCM_VOLTCTRL_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x050)
36#define PRCM_CLKCFG_CTRL_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x080)
37#define CM_CLKEN_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x500)
38#define CM_IDLEST_CKGEN_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x520)
39#define CM_CLKSEL1_PLL_V IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x540)
40
41#define SDRC_DLLA_CTRL_V IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x060)
42#define SDRC_RFR_CTRL_V IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x0a4)
43 35
44 .text 36 .text
45 37
@@ -131,11 +123,11 @@ volt_delay:
131 123
132/* relative load constants */ 124/* relative load constants */
133cm_clksel2_pll: 125cm_clksel2_pll:
134 .word CM_CLKSEL2_PLL_V 126 .word OMAP2420_CM_REGADDR(PLL_MOD, CM_CLKSEL2)
135sdrc_dlla_ctrl: 127sdrc_dlla_ctrl:
136 .word SDRC_DLLA_CTRL_V 128 .word OMAP242X_SDRC_REGADDR(SDRC_DLLA_CTRL)
137prcm_voltctrl: 129prcm_voltctrl:
138 .word PRCM_VOLTCTRL_V 130 .word OMAP2420_PRM_REGADDR(OCP_MOD, 0x50)
139prcm_mask_val: 131prcm_mask_val:
140 .word 0xFFFF3FFC 132 .word 0xFFFF3FFC
141timer_32ksynct_cr: 133timer_32ksynct_cr:
@@ -225,13 +217,13 @@ volt_delay_c:
225 mov pc, lr @ back to caller 217 mov pc, lr @ back to caller
226 218
227ddr_cm_clksel2_pll: 219ddr_cm_clksel2_pll:
228 .word CM_CLKSEL2_PLL_V 220 .word OMAP2420_CM_REGADDR(PLL_MOD, CM_CLKSEL2)
229ddr_sdrc_dlla_ctrl: 221ddr_sdrc_dlla_ctrl:
230 .word SDRC_DLLA_CTRL_V 222 .word OMAP242X_SDRC_REGADDR(SDRC_DLLA_CTRL)
231ddr_sdrc_rfr_ctrl: 223ddr_sdrc_rfr_ctrl:
232 .word SDRC_RFR_CTRL_V 224 .word OMAP242X_SDRC_REGADDR(SDRC_RFR_CTRL_0)
233ddr_prcm_voltctrl: 225ddr_prcm_voltctrl:
234 .word PRCM_VOLTCTRL_V 226 .word OMAP2420_PRM_REGADDR(OCP_MOD, 0x50)
235ddr_prcm_mask_val: 227ddr_prcm_mask_val:
236 .word 0xFFFF3FFC 228 .word 0xFFFF3FFC
237ddr_timer_32ksynct: 229ddr_timer_32ksynct:
@@ -316,17 +308,17 @@ wait_dll_lock:
316 ldmfd sp!, {r0-r12, pc} @ restore regs and return 308 ldmfd sp!, {r0-r12, pc} @ restore regs and return
317 309
318set_config: 310set_config:
319 .word PRCM_CLKCFG_CTRL_V 311 .word OMAP2420_PRM_REGADDR(OCP_MOD, 0x80)
320pll_ctl: 312pll_ctl:
321 .word CM_CLKEN_PLL_V 313 .word OMAP2420_CM_REGADDR(PLL_MOD, CM_FCLKEN1)
322pll_stat: 314pll_stat:
323 .word CM_IDLEST_CKGEN_V 315 .word OMAP2420_CM_REGADDR(PLL_MOD, CM_IDLEST1)
324pll_div: 316pll_div:
325 .word CM_CLKSEL1_PLL_V 317 .word OMAP2420_CM_REGADDR(PLL_MOD, CM_CLKSEL)
326sdrc_rfr: 318sdrc_rfr:
327 .word SDRC_RFR_CTRL_V 319 .word OMAP242X_SDRC_REGADDR(SDRC_RFR_CTRL_0)
328dlla_ctrl: 320dlla_ctrl:
329 .word SDRC_DLLA_CTRL_V 321 .word OMAP242X_SDRC_REGADDR(SDRC_DLLA_CTRL)
330 322
331ENTRY(sram_set_prcm_sz) 323ENTRY(sram_set_prcm_sz)
332 .word . - sram_set_prcm 324 .word . - sram_set_prcm
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 3234deedb946..78d05f203fff 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -3,6 +3,11 @@
3 * 3 *
4 * OMAP2 GP timer support. 4 * OMAP2 GP timer support.
5 * 5 *
6 * Update to use new clocksource/clockevent layers
7 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
8 * Copyright (C) 2007 MontaVista Software, Inc.
9 *
10 * Original driver:
6 * Copyright (C) 2005 Nokia Corporation 11 * Copyright (C) 2005 Nokia Corporation
7 * Author: Paul Mundt <paul.mundt@nokia.com> 12 * Author: Paul Mundt <paul.mundt@nokia.com>
8 * Juha Yrjölä <juha.yrjola@nokia.com> 13 * Juha Yrjölä <juha.yrjola@nokia.com>
@@ -25,24 +30,23 @@
25#include <linux/clk.h> 30#include <linux/clk.h>
26#include <linux/delay.h> 31#include <linux/delay.h>
27#include <linux/irq.h> 32#include <linux/irq.h>
33#include <linux/clocksource.h>
34#include <linux/clockchips.h>
28 35
29#include <asm/mach/time.h> 36#include <asm/mach/time.h>
30#include <asm/arch/dmtimer.h> 37#include <asm/arch/dmtimer.h>
31 38
32static struct omap_dm_timer *gptimer; 39static struct omap_dm_timer *gptimer;
33 40static struct clock_event_device clockevent_gpt;
34static inline void omap2_gp_timer_start(unsigned long load_val)
35{
36 omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val);
37 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
38 omap_dm_timer_start(gptimer);
39}
40 41
41static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) 42static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
42{ 43{
43 omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); 44 struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id;
44 timer_tick(); 45 struct clock_event_device *evt = &clockevent_gpt;
46
47 omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW);
45 48
49 evt->event_handler(evt);
46 return IRQ_HANDLED; 50 return IRQ_HANDLED;
47} 51}
48 52
@@ -52,20 +56,138 @@ static struct irqaction omap2_gp_timer_irq = {
52 .handler = omap2_gp_timer_interrupt, 56 .handler = omap2_gp_timer_interrupt,
53}; 57};
54 58
55static void __init omap2_gp_timer_init(void) 59static int omap2_gp_timer_set_next_event(unsigned long cycles,
60 struct clock_event_device *evt)
56{ 61{
57 u32 tick_period; 62 omap_dm_timer_set_load(gptimer, 0, 0xffffffff - cycles);
63 omap_dm_timer_start(gptimer);
64
65 return 0;
66}
67
68static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
69 struct clock_event_device *evt)
70{
71 u32 period;
72
73 omap_dm_timer_stop(gptimer);
74
75 switch (mode) {
76 case CLOCK_EVT_MODE_PERIODIC:
77 period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
78 period -= 1;
79
80 omap_dm_timer_set_load(gptimer, 1, 0xffffffff - period);
81 omap_dm_timer_start(gptimer);
82 break;
83 case CLOCK_EVT_MODE_ONESHOT:
84 break;
85 case CLOCK_EVT_MODE_UNUSED:
86 case CLOCK_EVT_MODE_SHUTDOWN:
87 case CLOCK_EVT_MODE_RESUME:
88 break;
89 }
90}
91
92static struct clock_event_device clockevent_gpt = {
93 .name = "gp timer",
94 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
95 .shift = 32,
96 .set_next_event = omap2_gp_timer_set_next_event,
97 .set_mode = omap2_gp_timer_set_mode,
98};
99
100static void __init omap2_gp_clockevent_init(void)
101{
102 u32 tick_rate;
58 103
59 omap_dm_timer_init();
60 gptimer = omap_dm_timer_request_specific(1); 104 gptimer = omap_dm_timer_request_specific(1);
61 BUG_ON(gptimer == NULL); 105 BUG_ON(gptimer == NULL);
62 106
107#if defined(CONFIG_OMAP_32K_TIMER)
108 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);
109#else
63 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK); 110 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK);
64 tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ; 111#endif
65 tick_period -= 1; 112 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer));
66 113
114 omap2_gp_timer_irq.dev_id = (void *)gptimer;
67 setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq); 115 setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
68 omap2_gp_timer_start(tick_period); 116 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
117
118 clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC,
119 clockevent_gpt.shift);
120 clockevent_gpt.max_delta_ns =
121 clockevent_delta2ns(0xffffffff, &clockevent_gpt);
122 clockevent_gpt.min_delta_ns =
123 clockevent_delta2ns(1, &clockevent_gpt);
124
125 clockevent_gpt.cpumask = cpumask_of_cpu(0);
126 clockevents_register_device(&clockevent_gpt);
127}
128
129#ifdef CONFIG_OMAP_32K_TIMER
130/*
131 * When 32k-timer is enabled, don't use GPTimer for clocksource
132 * instead, just leave default clocksource which uses the 32k
133 * sync counter. See clocksource setup in see plat-omap/common.c.
134 */
135
136static inline void __init omap2_gp_clocksource_init(void) {}
137#else
138/*
139 * clocksource
140 */
141static struct omap_dm_timer *gpt_clocksource;
142static cycle_t clocksource_read_cycles(void)
143{
144 return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
145}
146
147static struct clocksource clocksource_gpt = {
148 .name = "gp timer",
149 .rating = 300,
150 .read = clocksource_read_cycles,
151 .mask = CLOCKSOURCE_MASK(32),
152 .shift = 24,
153 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
154};
155
156/* Setup free-running counter for clocksource */
157static void __init omap2_gp_clocksource_init(void)
158{
159 static struct omap_dm_timer *gpt;
160 u32 tick_rate, tick_period;
161 static char err1[] __initdata = KERN_ERR
162 "%s: failed to request dm-timer\n";
163 static char err2[] __initdata = KERN_ERR
164 "%s: can't register clocksource!\n";
165
166 gpt = omap_dm_timer_request();
167 if (!gpt)
168 printk(err1, clocksource_gpt.name);
169 gpt_clocksource = gpt;
170
171 omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
172 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
173 tick_period = (tick_rate / HZ) - 1;
174
175 omap_dm_timer_set_load(gpt, 1, 0);
176 omap_dm_timer_start(gpt);
177
178 clocksource_gpt.mult =
179 clocksource_khz2mult(tick_rate/1000, clocksource_gpt.shift);
180 if (clocksource_register(&clocksource_gpt))
181 printk(err2, clocksource_gpt.name);
182}
183#endif
184
185static void __init omap2_gp_timer_init(void)
186{
187 omap_dm_timer_init();
188
189 omap2_gp_clockevent_init();
190 omap2_gp_clocksource_init();
69} 191}
70 192
71struct sys_timer omap_timer = { 193struct sys_timer omap_timer = {
diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c
deleted file mode 100644
index 58cc3c0333b6..000000000000
--- a/arch/arm/mach-orion/addr-map.c
+++ /dev/null
@@ -1,490 +0,0 @@
1/*
2 * arch/arm/mach-orion/addr-map.c
3 *
4 * Address map functions for Marvell Orion System On Chip
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <asm/hardware.h>
16#include "common.h"
17
18/*
19 * The Orion has fully programable address map. There's a separate address
20 * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIE, USB,
21 * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own
22 * address decode windows that allow it to access any of the Orion resources.
23 *
24 * CPU address decoding --
25 * Linux assumes that it is the boot loader that already setup the access to
26 * DDR and internal registers.
27 * Setup access to PCI and PCI-E IO/MEM space is issued by core.c.
28 * Setup access to various devices located on the device bus interface (e.g.
29 * flashes, RTC, etc) should be issued by machine-setup.c according to
30 * specific board population (by using orion_setup_cpu_win()).
31 *
32 * Non-CPU Masters address decoding --
33 * Unlike the CPU, we setup the access from Orion's master interfaces to DDR
34 * banks only (the typical use case).
35 * Setup access for each master to DDR is issued by common.c.
36 *
37 * Note: although orion_setbits() and orion_clrbits() are not atomic
38 * no locking is necessary here since code in this file is only called
39 * at boot time when there is no concurrency issues.
40 */
41
42/*
43 * Generic Address Decode Windows bit settings
44 */
45#define TARGET_DDR 0
46#define TARGET_PCI 3
47#define TARGET_PCIE 4
48#define TARGET_DEV_BUS 1
49#define ATTR_DDR_CS(n) (((n) ==0) ? 0xe : \
50 ((n) == 1) ? 0xd : \
51 ((n) == 2) ? 0xb : \
52 ((n) == 3) ? 0x7 : 0xf)
53#define ATTR_PCIE_MEM 0x59
54#define ATTR_PCIE_IO 0x51
55#define ATTR_PCI_MEM 0x59
56#define ATTR_PCI_IO 0x51
57#define ATTR_DEV_CS0 0x1e
58#define ATTR_DEV_CS1 0x1d
59#define ATTR_DEV_CS2 0x1b
60#define ATTR_DEV_BOOT 0xf
61#define WIN_EN 1
62
63/*
64 * Helpers to get DDR banks info
65 */
66#define DDR_BASE_CS(n) ORION_DDR_REG(0x1500 + ((n) * 8))
67#define DDR_SIZE_CS(n) ORION_DDR_REG(0x1504 + ((n) * 8))
68#define DDR_MAX_CS 4
69#define DDR_REG_TO_SIZE(reg) (((reg) | 0xffffff) + 1)
70#define DDR_REG_TO_BASE(reg) ((reg) & 0xff000000)
71#define DDR_BANK_EN 1
72
73/*
74 * CPU Address Decode Windows registers
75 */
76#define CPU_WIN_CTRL(n) ORION_BRIDGE_REG(0x000 | ((n) << 4))
77#define CPU_WIN_BASE(n) ORION_BRIDGE_REG(0x004 | ((n) << 4))
78#define CPU_WIN_REMAP_LO(n) ORION_BRIDGE_REG(0x008 | ((n) << 4))
79#define CPU_WIN_REMAP_HI(n) ORION_BRIDGE_REG(0x00c | ((n) << 4))
80#define CPU_MAX_WIN 8
81
82/*
83 * Use this CPU address decode windows allocation
84 */
85#define CPU_WIN_PCIE_IO 0
86#define CPU_WIN_PCI_IO 1
87#define CPU_WIN_PCIE_MEM 2
88#define CPU_WIN_PCI_MEM 3
89#define CPU_WIN_DEV_BOOT 4
90#define CPU_WIN_DEV_CS0 5
91#define CPU_WIN_DEV_CS1 6
92#define CPU_WIN_DEV_CS2 7
93
94/*
95 * PCIE Address Decode Windows registers
96 */
97#define PCIE_BAR_CTRL(n) ORION_PCIE_REG(0x1804 + ((n - 1) * 4))
98#define PCIE_BAR_LO(n) ORION_PCIE_REG(0x0010 + ((n) * 8))
99#define PCIE_BAR_HI(n) ORION_PCIE_REG(0x0014 + ((n) * 8))
100#define PCIE_WIN_CTRL(n) (((n) < 5) ? \
101 ORION_PCIE_REG(0x1820 + ((n) << 4)) : \
102 ORION_PCIE_REG(0x1880))
103#define PCIE_WIN_BASE(n) (((n) < 5) ? \
104 ORION_PCIE_REG(0x1824 + ((n) << 4)) : \
105 ORION_PCIE_REG(0x1884))
106#define PCIE_WIN_REMAP(n) (((n) < 5) ? \
107 ORION_PCIE_REG(0x182c + ((n) << 4)) : \
108 ORION_PCIE_REG(0x188c))
109#define PCIE_DEFWIN_CTRL ORION_PCIE_REG(0x18b0)
110#define PCIE_EXPROM_WIN_CTRL ORION_PCIE_REG(0x18c0)
111#define PCIE_EXPROM_WIN_REMP ORION_PCIE_REG(0x18c4)
112#define PCIE_MAX_BARS 3
113#define PCIE_MAX_WINS 6
114
115/*
116 * Use PCIE BAR '1' for all DDR banks
117 */
118#define PCIE_DRAM_BAR 1
119
120/*
121 * PCI Address Decode Windows registers
122 */
123#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION_PCI_REG(0xc08) : \
124 ((n) == 1) ? ORION_PCI_REG(0xd08) : \
125 ((n) == 2) ? ORION_PCI_REG(0xc0c) : \
126 ((n) == 3) ? ORION_PCI_REG(0xd0c) : 0)
127#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION_PCI_REG(0xc48) : \
128 ((n) == 1) ? ORION_PCI_REG(0xd48) : \
129 ((n) == 2) ? ORION_PCI_REG(0xc4c) : \
130 ((n) == 3) ? ORION_PCI_REG(0xd4c) : 0)
131#define PCI_BAR_ENABLE ORION_PCI_REG(0xc3c)
132#define PCI_CTRL_BASE_LO(n) ORION_PCI_REG(0x1e00 | ((n) << 4))
133#define PCI_CTRL_BASE_HI(n) ORION_PCI_REG(0x1e04 | ((n) << 4))
134#define PCI_CTRL_SIZE(n) ORION_PCI_REG(0x1e08 | ((n) << 4))
135#define PCI_ADDR_DECODE_CTRL ORION_PCI_REG(0xd3c)
136
137/*
138 * PCI configuration heleprs for BAR settings
139 */
140#define PCI_CONF_FUNC_BAR_CS(n) ((n) >> 1)
141#define PCI_CONF_REG_BAR_LO_CS(n) (((n) & 1) ? 0x18 : 0x10)
142#define PCI_CONF_REG_BAR_HI_CS(n) (((n) & 1) ? 0x1c : 0x14)
143
144/*
145 * Gigabit Ethernet Address Decode Windows registers
146 */
147#define ETH_WIN_BASE(win) ORION_ETH_REG(0x200 + ((win) * 8))
148#define ETH_WIN_SIZE(win) ORION_ETH_REG(0x204 + ((win) * 8))
149#define ETH_WIN_REMAP(win) ORION_ETH_REG(0x280 + ((win) * 4))
150#define ETH_WIN_EN ORION_ETH_REG(0x290)
151#define ETH_WIN_PROT ORION_ETH_REG(0x294)
152#define ETH_MAX_WIN 6
153#define ETH_MAX_REMAP_WIN 4
154
155/*
156 * USB Address Decode Windows registers
157 */
158#define USB_WIN_CTRL(i, w) ((i == 0) ? ORION_USB0_REG(0x320 + ((w) << 4)) \
159 : ORION_USB1_REG(0x320 + ((w) << 4)))
160#define USB_WIN_BASE(i, w) ((i == 0) ? ORION_USB0_REG(0x324 + ((w) << 4)) \
161 : ORION_USB1_REG(0x324 + ((w) << 4)))
162#define USB_MAX_WIN 4
163
164/*
165 * SATA Address Decode Windows registers
166 */
167#define SATA_WIN_CTRL(win) ORION_SATA_REG(0x30 + ((win) * 0x10))
168#define SATA_WIN_BASE(win) ORION_SATA_REG(0x34 + ((win) * 0x10))
169#define SATA_MAX_WIN 4
170
171static int __init orion_cpu_win_can_remap(u32 win)
172{
173 u32 dev, rev;
174
175 orion_pcie_id(&dev, &rev);
176 if ((dev == MV88F5281_DEV_ID && win < 4)
177 || (dev == MV88F5182_DEV_ID && win < 2)
178 || (dev == MV88F5181_DEV_ID && win < 2))
179 return 1;
180
181 return 0;
182}
183
184void __init orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap)
185{
186 u32 win, attr, ctrl;
187
188 switch (target) {
189 case ORION_PCIE_IO:
190 target = TARGET_PCIE;
191 attr = ATTR_PCIE_IO;
192 win = CPU_WIN_PCIE_IO;
193 break;
194 case ORION_PCI_IO:
195 target = TARGET_PCI;
196 attr = ATTR_PCI_IO;
197 win = CPU_WIN_PCI_IO;
198 break;
199 case ORION_PCIE_MEM:
200 target = TARGET_PCIE;
201 attr = ATTR_PCIE_MEM;
202 win = CPU_WIN_PCIE_MEM;
203 break;
204 case ORION_PCI_MEM:
205 target = TARGET_PCI;
206 attr = ATTR_PCI_MEM;
207 win = CPU_WIN_PCI_MEM;
208 break;
209 case ORION_DEV_BOOT:
210 target = TARGET_DEV_BUS;
211 attr = ATTR_DEV_BOOT;
212 win = CPU_WIN_DEV_BOOT;
213 break;
214 case ORION_DEV0:
215 target = TARGET_DEV_BUS;
216 attr = ATTR_DEV_CS0;
217 win = CPU_WIN_DEV_CS0;
218 break;
219 case ORION_DEV1:
220 target = TARGET_DEV_BUS;
221 attr = ATTR_DEV_CS1;
222 win = CPU_WIN_DEV_CS1;
223 break;
224 case ORION_DEV2:
225 target = TARGET_DEV_BUS;
226 attr = ATTR_DEV_CS2;
227 win = CPU_WIN_DEV_CS2;
228 break;
229 case ORION_DDR:
230 case ORION_REGS:
231 /*
232 * Must be mapped by bootloader.
233 */
234 default:
235 target = attr = win = -1;
236 BUG();
237 }
238
239 base &= 0xffff0000;
240 ctrl = (((size - 1) & 0xffff0000) | (attr << 8) |
241 (target << 4) | WIN_EN);
242
243 orion_write(CPU_WIN_BASE(win), base);
244 orion_write(CPU_WIN_CTRL(win), ctrl);
245
246 if (orion_cpu_win_can_remap(win)) {
247 if (remap >= 0) {
248 orion_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000);
249 orion_write(CPU_WIN_REMAP_HI(win), 0);
250 } else {
251 orion_write(CPU_WIN_REMAP_LO(win), base);
252 orion_write(CPU_WIN_REMAP_HI(win), 0);
253 }
254 }
255}
256
257void __init orion_setup_cpu_wins(void)
258{
259 int i;
260
261 /*
262 * First, disable and clear windows
263 */
264 for (i = 0; i < CPU_MAX_WIN; i++) {
265 orion_write(CPU_WIN_BASE(i), 0);
266 orion_write(CPU_WIN_CTRL(i), 0);
267 if (orion_cpu_win_can_remap(i)) {
268 orion_write(CPU_WIN_REMAP_LO(i), 0);
269 orion_write(CPU_WIN_REMAP_HI(i), 0);
270 }
271 }
272
273 /*
274 * Setup windows for PCI+PCIe IO+MEM space.
275 */
276 orion_setup_cpu_win(ORION_PCIE_IO, ORION_PCIE_IO_PHYS_BASE,
277 ORION_PCIE_IO_SIZE, ORION_PCIE_IO_BUS_BASE);
278 orion_setup_cpu_win(ORION_PCI_IO, ORION_PCI_IO_PHYS_BASE,
279 ORION_PCI_IO_SIZE, ORION_PCI_IO_BUS_BASE);
280 orion_setup_cpu_win(ORION_PCIE_MEM, ORION_PCIE_MEM_PHYS_BASE,
281 ORION_PCIE_MEM_SIZE, -1);
282 orion_setup_cpu_win(ORION_PCI_MEM, ORION_PCI_MEM_PHYS_BASE,
283 ORION_PCI_MEM_SIZE, -1);
284}
285
286/*
287 * Setup PCIE BARs and Address Decode Wins:
288 * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
289 * WIN[0-3] -> DRAM bank[0-3]
290 */
291void __init orion_setup_pcie_wins(void)
292{
293 u32 base, size, i;
294
295 /*
296 * First, disable and clear BARs and windows
297 */
298 for (i = 1; i < PCIE_MAX_BARS; i++) {
299 orion_write(PCIE_BAR_CTRL(i), 0);
300 orion_write(PCIE_BAR_LO(i), 0);
301 orion_write(PCIE_BAR_HI(i), 0);
302 }
303
304 for (i = 0; i < PCIE_MAX_WINS; i++) {
305 orion_write(PCIE_WIN_CTRL(i), 0);
306 orion_write(PCIE_WIN_BASE(i), 0);
307 orion_write(PCIE_WIN_REMAP(i), 0);
308 }
309
310 /*
311 * Setup windows for DDR banks. Count total DDR size on the fly.
312 */
313 base = DDR_REG_TO_BASE(orion_read(DDR_BASE_CS(0)));
314 size = 0;
315 for (i = 0; i < DDR_MAX_CS; i++) {
316 u32 bank_base, bank_size;
317 bank_size = orion_read(DDR_SIZE_CS(i));
318 bank_base = orion_read(DDR_BASE_CS(i));
319 if (bank_size & DDR_BANK_EN) {
320 bank_size = DDR_REG_TO_SIZE(bank_size);
321 bank_base = DDR_REG_TO_BASE(bank_base);
322 orion_write(PCIE_WIN_BASE(i), bank_base & 0xffff0000);
323 orion_write(PCIE_WIN_REMAP(i), 0);
324 orion_write(PCIE_WIN_CTRL(i),
325 ((bank_size-1) & 0xffff0000) |
326 (ATTR_DDR_CS(i) << 8) |
327 (TARGET_DDR << 4) |
328 (PCIE_DRAM_BAR << 1) | WIN_EN);
329 size += bank_size;
330 }
331 }
332
333 /*
334 * Setup BAR[1] to all DRAM banks
335 */
336 orion_write(PCIE_BAR_LO(PCIE_DRAM_BAR), base & 0xffff0000);
337 orion_write(PCIE_BAR_HI(PCIE_DRAM_BAR), 0);
338 orion_write(PCIE_BAR_CTRL(PCIE_DRAM_BAR),
339 ((size - 1) & 0xffff0000) | WIN_EN);
340}
341
342void __init orion_setup_pci_wins(void)
343{
344 u32 base, size, i;
345
346 /*
347 * First, disable windows
348 */
349 orion_write(PCI_BAR_ENABLE, 0xffffffff);
350
351 /*
352 * Setup windows for DDR banks.
353 */
354 for (i = 0; i < DDR_MAX_CS; i++) {
355 base = orion_read(DDR_BASE_CS(i));
356 size = orion_read(DDR_SIZE_CS(i));
357 if (size & DDR_BANK_EN) {
358 u32 bus, dev, func, reg, val;
359 size = DDR_REG_TO_SIZE(size);
360 base = DDR_REG_TO_BASE(base);
361 bus = orion_pci_local_bus_nr();
362 dev = orion_pci_local_dev_nr();
363 func = PCI_CONF_FUNC_BAR_CS(i);
364 reg = PCI_CONF_REG_BAR_LO_CS(i);
365 orion_pci_hw_rd_conf(bus, dev, func, reg, 4, &val);
366 orion_pci_hw_wr_conf(bus, dev, func, reg, 4,
367 (base & 0xfffff000) | (val & 0xfff));
368 reg = PCI_CONF_REG_BAR_HI_CS(i);
369 orion_pci_hw_wr_conf(bus, dev, func, reg, 4, 0);
370 orion_write(PCI_BAR_SIZE_DDR_CS(i),
371 (size - 1) & 0xfffff000);
372 orion_write(PCI_BAR_REMAP_DDR_CS(i),
373 base & 0xfffff000);
374 orion_clrbits(PCI_BAR_ENABLE, (1 << i));
375 }
376 }
377
378 /*
379 * Disable automatic update of address remaping when writing to BARs
380 */
381 orion_setbits(PCI_ADDR_DECODE_CTRL, 1);
382}
383
384void __init orion_setup_usb_wins(void)
385{
386 int i;
387 u32 usb_if, dev, rev;
388 u32 max_usb_if = 1;
389
390 orion_pcie_id(&dev, &rev);
391 if (dev == MV88F5182_DEV_ID)
392 max_usb_if = 2;
393
394 for (usb_if = 0; usb_if < max_usb_if; usb_if++) {
395 /*
396 * First, disable and clear windows
397 */
398 for (i = 0; i < USB_MAX_WIN; i++) {
399 orion_write(USB_WIN_BASE(usb_if, i), 0);
400 orion_write(USB_WIN_CTRL(usb_if, i), 0);
401 }
402
403 /*
404 * Setup windows for DDR banks.
405 */
406 for (i = 0; i < DDR_MAX_CS; i++) {
407 u32 base, size;
408 size = orion_read(DDR_SIZE_CS(i));
409 base = orion_read(DDR_BASE_CS(i));
410 if (size & DDR_BANK_EN) {
411 base = DDR_REG_TO_BASE(base);
412 size = DDR_REG_TO_SIZE(size);
413 orion_write(USB_WIN_CTRL(usb_if, i),
414 ((size-1) & 0xffff0000) |
415 (ATTR_DDR_CS(i) << 8) |
416 (TARGET_DDR << 4) | WIN_EN);
417 orion_write(USB_WIN_BASE(usb_if, i),
418 base & 0xffff0000);
419 }
420 }
421 }
422}
423
424void __init orion_setup_eth_wins(void)
425{
426 int i;
427
428 /*
429 * First, disable and clear windows
430 */
431 for (i = 0; i < ETH_MAX_WIN; i++) {
432 orion_write(ETH_WIN_BASE(i), 0);
433 orion_write(ETH_WIN_SIZE(i), 0);
434 orion_setbits(ETH_WIN_EN, 1 << i);
435 orion_clrbits(ETH_WIN_PROT, 0x3 << (i * 2));
436 if (i < ETH_MAX_REMAP_WIN)
437 orion_write(ETH_WIN_REMAP(i), 0);
438 }
439
440 /*
441 * Setup windows for DDR banks.
442 */
443 for (i = 0; i < DDR_MAX_CS; i++) {
444 u32 base, size;
445 size = orion_read(DDR_SIZE_CS(i));
446 base = orion_read(DDR_BASE_CS(i));
447 if (size & DDR_BANK_EN) {
448 base = DDR_REG_TO_BASE(base);
449 size = DDR_REG_TO_SIZE(size);
450 orion_write(ETH_WIN_SIZE(i), (size-1) & 0xffff0000);
451 orion_write(ETH_WIN_BASE(i), (base & 0xffff0000) |
452 (ATTR_DDR_CS(i) << 8) |
453 TARGET_DDR);
454 orion_clrbits(ETH_WIN_EN, 1 << i);
455 orion_setbits(ETH_WIN_PROT, 0x3 << (i * 2));
456 }
457 }
458}
459
460void __init orion_setup_sata_wins(void)
461{
462 int i;
463
464 /*
465 * First, disable and clear windows
466 */
467 for (i = 0; i < SATA_MAX_WIN; i++) {
468 orion_write(SATA_WIN_BASE(i), 0);
469 orion_write(SATA_WIN_CTRL(i), 0);
470 }
471
472 /*
473 * Setup windows for DDR banks.
474 */
475 for (i = 0; i < DDR_MAX_CS; i++) {
476 u32 base, size;
477 size = orion_read(DDR_SIZE_CS(i));
478 base = orion_read(DDR_BASE_CS(i));
479 if (size & DDR_BANK_EN) {
480 base = DDR_REG_TO_BASE(base);
481 size = DDR_REG_TO_SIZE(size);
482 orion_write(SATA_WIN_CTRL(i),
483 ((size-1) & 0xffff0000) |
484 (ATTR_DDR_CS(i) << 8) |
485 (TARGET_DDR << 4) | WIN_EN);
486 orion_write(SATA_WIN_BASE(i),
487 base & 0xffff0000);
488 }
489 }
490}
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h
deleted file mode 100644
index 501497cc2c4d..000000000000
--- a/arch/arm/mach-orion/common.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef __ARCH_ORION_COMMON_H__
2#define __ARCH_ORION_COMMON_H__
3
4/*
5 * Basic Orion init functions used early by machine-setup.
6 */
7
8void __init orion_map_io(void);
9void __init orion_init_irq(void);
10void __init orion_init(void);
11
12/*
13 * Enumerations and functions for Orion windows mapping. Used by Orion core
14 * functions to map its interfaces and by the machine-setup to map its on-
15 * board devices. Details in /mach-orion/addr-map.c
16 */
17
18enum orion_target {
19 ORION_DEV_BOOT = 0,
20 ORION_DEV0,
21 ORION_DEV1,
22 ORION_DEV2,
23 ORION_PCIE_MEM,
24 ORION_PCIE_IO,
25 ORION_PCI_MEM,
26 ORION_PCI_IO,
27 ORION_DDR,
28 ORION_REGS,
29 ORION_MAX_TARGETS
30};
31
32void orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap);
33void orion_setup_cpu_wins(void);
34void orion_setup_eth_wins(void);
35void orion_setup_usb_wins(void);
36void orion_setup_pci_wins(void);
37void orion_setup_pcie_wins(void);
38void orion_setup_sata_wins(void);
39
40/*
41 * Shared code used internally by other Orion core functions.
42 * (/mach-orion/pci.c)
43 */
44
45struct pci_sys_data;
46struct pci_bus;
47
48void orion_pcie_id(u32 *dev, u32 *rev);
49u32 orion_pcie_local_bus_nr(void);
50u32 orion_pci_local_bus_nr(void);
51u32 orion_pci_local_dev_nr(void);
52int orion_pci_sys_setup(int nr, struct pci_sys_data *sys);
53struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
54int orion_pci_hw_rd_conf(u32 bus, u32 dev, u32 func, u32 where, u32 size, u32 *val);
55int orion_pci_hw_wr_conf(u32 bus, u32 dev, u32 func, u32 where, u32 size, u32 val);
56
57/*
58 * Valid GPIO pins according to MPP setup, used by machine-setup.
59 * (/mach-orion/gpio.c).
60 */
61
62void __init orion_gpio_set_valid_pins(u32 pins);
63void gpio_display(void); /* debug */
64
65/*
66 * Orion system timer (clocksource + clockevnt, /mach-orion/time.c)
67 */
68extern struct sys_timer orion_timer;
69
70/*
71 * Pull in Orion Ethernet platform_data, used by machine-setup
72 */
73
74struct mv643xx_eth_platform_data;
75
76void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
77
78/*
79 * Orion Sata platform_data, used by machine-setup
80 */
81
82struct mv_sata_platform_data;
83
84void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
85
86struct machine_desc;
87struct meminfo;
88struct tag;
89extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
90 char **, struct meminfo *);
91
92#endif /* __ARCH_ORION_COMMON_H__ */
diff --git a/arch/arm/mach-orion/pci.c b/arch/arm/mach-orion/pci.c
deleted file mode 100644
index b109bb46681e..000000000000
--- a/arch/arm/mach-orion/pci.c
+++ /dev/null
@@ -1,557 +0,0 @@
1/*
2 * arch/arm/mach-orion/pci.c
3 *
4 * PCI and PCIE functions for Marvell Orion System On Chip
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/pci.h>
15#include <asm/mach/pci.h>
16#include "common.h"
17
18/*****************************************************************************
19 * Orion has one PCIE controller and one PCI controller.
20 *
21 * Note1: The local PCIE bus number is '0'. The local PCI bus number
22 * follows the scanned PCIE bridged busses, if any.
23 *
24 * Note2: It is possible for PCI/PCIE agents to access many subsystem's
25 * space, by configuring BARs and Address Decode Windows, e.g. flashes on
26 * device bus, Orion registers, etc. However this code only enable the
27 * access to DDR banks.
28 ****************************************************************************/
29
30
31/*****************************************************************************
32 * PCIE controller
33 ****************************************************************************/
34#define PCIE_CTRL ORION_PCIE_REG(0x1a00)
35#define PCIE_STAT ORION_PCIE_REG(0x1a04)
36#define PCIE_DEV_ID ORION_PCIE_REG(0x0000)
37#define PCIE_CMD_STAT ORION_PCIE_REG(0x0004)
38#define PCIE_DEV_REV ORION_PCIE_REG(0x0008)
39#define PCIE_MASK ORION_PCIE_REG(0x1910)
40#define PCIE_CONF_ADDR ORION_PCIE_REG(0x18f8)
41#define PCIE_CONF_DATA ORION_PCIE_REG(0x18fc)
42
43/*
44 * PCIE_STAT bits
45 */
46#define PCIE_STAT_LINK_DOWN 1
47#define PCIE_STAT_BUS_OFFS 8
48#define PCIE_STAT_BUS_MASK (0xff << PCIE_STAT_BUS_OFFS)
49#define PCIE_STAT_DEV_OFFS 20
50#define PCIE_STAT_DEV_MASK (0x1f << PCIE_STAT_DEV_OFFS)
51
52/*
53 * PCIE_CONF_ADDR bits
54 */
55#define PCIE_CONF_REG(r) ((((r) & 0xf00) << 24) | ((r) & 0xfc))
56#define PCIE_CONF_FUNC(f) (((f) & 0x3) << 8)
57#define PCIE_CONF_DEV(d) (((d) & 0x1f) << 11)
58#define PCIE_CONF_BUS(b) (((b) & 0xff) << 16)
59#define PCIE_CONF_ADDR_EN (1 << 31)
60
61/*
62 * PCIE config cycles are done by programming the PCIE_CONF_ADDR register
63 * and then reading the PCIE_CONF_DATA register. Need to make sure these
64 * transactions are atomic.
65 */
66static DEFINE_SPINLOCK(orion_pcie_lock);
67
68void orion_pcie_id(u32 *dev, u32 *rev)
69{
70 *dev = orion_read(PCIE_DEV_ID) >> 16;
71 *rev = orion_read(PCIE_DEV_REV) & 0xff;
72}
73
74u32 orion_pcie_local_bus_nr(void)
75{
76 u32 stat = orion_read(PCIE_STAT);
77 return((stat & PCIE_STAT_BUS_MASK) >> PCIE_STAT_BUS_OFFS);
78}
79
80static u32 orion_pcie_local_dev_nr(void)
81{
82 u32 stat = orion_read(PCIE_STAT);
83 return((stat & PCIE_STAT_DEV_MASK) >> PCIE_STAT_DEV_OFFS);
84}
85
86static u32 orion_pcie_no_link(void)
87{
88 u32 stat = orion_read(PCIE_STAT);
89 return(stat & PCIE_STAT_LINK_DOWN);
90}
91
92static void orion_pcie_set_bus_nr(int nr)
93{
94 orion_clrbits(PCIE_STAT, PCIE_STAT_BUS_MASK);
95 orion_setbits(PCIE_STAT, nr << PCIE_STAT_BUS_OFFS);
96}
97
98static void orion_pcie_master_slave_enable(void)
99{
100 orion_setbits(PCIE_CMD_STAT, PCI_COMMAND_MASTER |
101 PCI_COMMAND_IO |
102 PCI_COMMAND_MEMORY);
103}
104
105static void orion_pcie_enable_interrupts(void)
106{
107 /*
108 * Enable interrupts lines
109 * INTA[24] INTB[25] INTC[26] INTD[27]
110 */
111 orion_setbits(PCIE_MASK, 0xf<<24);
112}
113
114static int orion_pcie_valid_config(u32 bus, u32 dev)
115{
116 /*
117 * Don't go out when trying to access --
118 * 1. our own device
119 * 2. where there's no device connected (no link)
120 * 3. nonexisting devices on local bus
121 */
122
123 if ((orion_pcie_local_bus_nr() == bus) &&
124 (orion_pcie_local_dev_nr() == dev))
125 return 0;
126
127 if (orion_pcie_no_link())
128 return 0;
129
130 if (bus == orion_pcie_local_bus_nr())
131 if (((orion_pcie_local_dev_nr() == 0) && (dev != 1)) ||
132 ((orion_pcie_local_dev_nr() != 0) && (dev != 0)))
133 return 0;
134
135 return 1;
136}
137
138static int orion_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
139 int size, u32 *val)
140{
141 unsigned long flags;
142 unsigned int dev, rev, pcie_addr;
143
144 if (orion_pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
145 *val = 0xffffffff;
146 return PCIBIOS_DEVICE_NOT_FOUND;
147 }
148
149 spin_lock_irqsave(&orion_pcie_lock, flags);
150
151 orion_write(PCIE_CONF_ADDR, PCIE_CONF_BUS(bus->number) |
152 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
153 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
154 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN);
155
156 orion_pcie_id(&dev, &rev);
157 if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
158 /* extended register space */
159 pcie_addr = ORION_PCIE_WA_VIRT_BASE;
160 pcie_addr |= PCIE_CONF_BUS(bus->number) |
161 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
162 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
163 PCIE_CONF_REG(where);
164 *val = orion_read(pcie_addr);
165 } else
166 *val = orion_read(PCIE_CONF_DATA);
167
168 if (size == 1)
169 *val = (*val >> (8*(where & 0x3))) & 0xff;
170 else if (size == 2)
171 *val = (*val >> (8*(where & 0x3))) & 0xffff;
172
173 spin_unlock_irqrestore(&orion_pcie_lock, flags);
174
175 return PCIBIOS_SUCCESSFUL;
176}
177
178
179static int orion_pcie_wr_conf(struct pci_bus *bus, u32 devfn, int where,
180 int size, u32 val)
181{
182 unsigned long flags;
183 int ret;
184
185 if (orion_pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0)
186 return PCIBIOS_DEVICE_NOT_FOUND;
187
188 spin_lock_irqsave(&orion_pcie_lock, flags);
189
190 ret = PCIBIOS_SUCCESSFUL;
191
192 orion_write(PCIE_CONF_ADDR, PCIE_CONF_BUS(bus->number) |
193 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
194 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
195 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN);
196
197 if (size == 4) {
198 __raw_writel(val, PCIE_CONF_DATA);
199 } else if (size == 2) {
200 __raw_writew(val, PCIE_CONF_DATA + (where & 0x3));
201 } else if (size == 1) {
202 __raw_writeb(val, PCIE_CONF_DATA + (where & 0x3));
203 } else {
204 ret = PCIBIOS_BAD_REGISTER_NUMBER;
205 }
206
207 spin_unlock_irqrestore(&orion_pcie_lock, flags);
208
209 return ret;
210}
211
212struct pci_ops orion_pcie_ops = {
213 .read = orion_pcie_rd_conf,
214 .write = orion_pcie_wr_conf,
215};
216
217
218static int orion_pcie_setup(struct pci_sys_data *sys)
219{
220 struct resource *res;
221
222 /*
223 * Master + Slave enable
224 */
225 orion_pcie_master_slave_enable();
226
227 /*
228 * Enable interrupts lines A-D
229 */
230 orion_pcie_enable_interrupts();
231
232 /*
233 * Request resource
234 */
235 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
236 if (!res)
237 panic("orion_pci_setup unable to alloc resources");
238
239 /*
240 * IORESOURCE_IO
241 */
242 res[0].name = "PCI-EX I/O Space";
243 res[0].flags = IORESOURCE_IO;
244 res[0].start = ORION_PCIE_IO_BUS_BASE;
245 res[0].end = res[0].start + ORION_PCIE_IO_SIZE - 1;
246 if (request_resource(&ioport_resource, &res[0]))
247 panic("Request PCIE IO resource failed\n");
248 sys->resource[0] = &res[0];
249
250 /*
251 * IORESOURCE_MEM
252 */
253 res[1].name = "PCI-EX Memory Space";
254 res[1].flags = IORESOURCE_MEM;
255 res[1].start = ORION_PCIE_MEM_PHYS_BASE;
256 res[1].end = res[1].start + ORION_PCIE_MEM_SIZE - 1;
257 if (request_resource(&iomem_resource, &res[1]))
258 panic("Request PCIE Memory resource failed\n");
259 sys->resource[1] = &res[1];
260
261 sys->resource[2] = NULL;
262 sys->io_offset = 0;
263
264 return 1;
265}
266
267/*****************************************************************************
268 * PCI controller
269 ****************************************************************************/
270#define PCI_MODE ORION_PCI_REG(0xd00)
271#define PCI_CMD ORION_PCI_REG(0xc00)
272#define PCI_P2P_CONF ORION_PCI_REG(0x1d14)
273#define PCI_CONF_ADDR ORION_PCI_REG(0xc78)
274#define PCI_CONF_DATA ORION_PCI_REG(0xc7c)
275
276/*
277 * PCI_MODE bits
278 */
279#define PCI_MODE_64BIT (1 << 2)
280#define PCI_MODE_PCIX ((1 << 4) | (1 << 5))
281
282/*
283 * PCI_CMD bits
284 */
285#define PCI_CMD_HOST_REORDER (1 << 29)
286
287/*
288 * PCI_P2P_CONF bits
289 */
290#define PCI_P2P_BUS_OFFS 16
291#define PCI_P2P_BUS_MASK (0xff << PCI_P2P_BUS_OFFS)
292#define PCI_P2P_DEV_OFFS 24
293#define PCI_P2P_DEV_MASK (0x1f << PCI_P2P_DEV_OFFS)
294
295/*
296 * PCI_CONF_ADDR bits
297 */
298#define PCI_CONF_REG(reg) ((reg) & 0xfc)
299#define PCI_CONF_FUNC(func) (((func) & 0x3) << 8)
300#define PCI_CONF_DEV(dev) (((dev) & 0x1f) << 11)
301#define PCI_CONF_BUS(bus) (((bus) & 0xff) << 16)
302#define PCI_CONF_ADDR_EN (1 << 31)
303
304/*
305 * Internal configuration space
306 */
307#define PCI_CONF_FUNC_STAT_CMD 0
308#define PCI_CONF_REG_STAT_CMD 4
309#define PCIX_STAT 0x64
310#define PCIX_STAT_BUS_OFFS 8
311#define PCIX_STAT_BUS_MASK (0xff << PCIX_STAT_BUS_OFFS)
312
313/*
314 * PCI config cycles are done by programming the PCI_CONF_ADDR register
315 * and then reading the PCI_CONF_DATA register. Need to make sure these
316 * transactions are atomic.
317 */
318static DEFINE_SPINLOCK(orion_pci_lock);
319
320u32 orion_pci_local_bus_nr(void)
321{
322 u32 conf = orion_read(PCI_P2P_CONF);
323 return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
324}
325
326u32 orion_pci_local_dev_nr(void)
327{
328 u32 conf = orion_read(PCI_P2P_CONF);
329 return((conf & PCI_P2P_DEV_MASK) >> PCI_P2P_DEV_OFFS);
330}
331
332int orion_pci_hw_rd_conf(u32 bus, u32 dev, u32 func,
333 u32 where, u32 size, u32 *val)
334{
335 unsigned long flags;
336 spin_lock_irqsave(&orion_pci_lock, flags);
337
338 orion_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
339 PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
340 PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
341
342 *val = orion_read(PCI_CONF_DATA);
343
344 if (size == 1)
345 *val = (*val >> (8*(where & 0x3))) & 0xff;
346 else if (size == 2)
347 *val = (*val >> (8*(where & 0x3))) & 0xffff;
348
349 spin_unlock_irqrestore(&orion_pci_lock, flags);
350
351 return PCIBIOS_SUCCESSFUL;
352}
353
354int orion_pci_hw_wr_conf(u32 bus, u32 dev, u32 func,
355 u32 where, u32 size, u32 val)
356{
357 unsigned long flags;
358 int ret = PCIBIOS_SUCCESSFUL;
359
360 spin_lock_irqsave(&orion_pci_lock, flags);
361
362 orion_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
363 PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
364 PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
365
366 if (size == 4) {
367 __raw_writel(val, PCI_CONF_DATA);
368 } else if (size == 2) {
369 __raw_writew(val, PCI_CONF_DATA + (where & 0x3));
370 } else if (size == 1) {
371 __raw_writeb(val, PCI_CONF_DATA + (where & 0x3));
372 } else {
373 ret = PCIBIOS_BAD_REGISTER_NUMBER;
374 }
375
376 spin_unlock_irqrestore(&orion_pci_lock, flags);
377
378 return ret;
379}
380
381static int orion_pci_rd_conf(struct pci_bus *bus, u32 devfn,
382 int where, int size, u32 *val)
383{
384 /*
385 * Don't go out for local device
386 */
387 if ((orion_pci_local_bus_nr() == bus->number) &&
388 (orion_pci_local_dev_nr() == PCI_SLOT(devfn))) {
389 *val = 0xffffffff;
390 return PCIBIOS_DEVICE_NOT_FOUND;
391 }
392
393 return orion_pci_hw_rd_conf(bus->number, PCI_SLOT(devfn),
394 PCI_FUNC(devfn), where, size, val);
395}
396
397static int orion_pci_wr_conf(struct pci_bus *bus, u32 devfn,
398 int where, int size, u32 val)
399{
400 /*
401 * Don't go out for local device
402 */
403 if ((orion_pci_local_bus_nr() == bus->number) &&
404 (orion_pci_local_dev_nr() == PCI_SLOT(devfn)))
405 return PCIBIOS_DEVICE_NOT_FOUND;
406
407 return orion_pci_hw_wr_conf(bus->number, PCI_SLOT(devfn),
408 PCI_FUNC(devfn), where, size, val);
409}
410
411struct pci_ops orion_pci_ops = {
412 .read = orion_pci_rd_conf,
413 .write = orion_pci_wr_conf,
414};
415
416static void orion_pci_set_bus_nr(int nr)
417{
418 u32 p2p = orion_read(PCI_P2P_CONF);
419
420 if (orion_read(PCI_MODE) & PCI_MODE_PCIX) {
421 /*
422 * PCI-X mode
423 */
424 u32 pcix_status, bus, dev;
425 bus = (p2p & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS;
426 dev = (p2p & PCI_P2P_DEV_MASK) >> PCI_P2P_DEV_OFFS;
427 orion_pci_hw_rd_conf(bus, dev, 0, PCIX_STAT, 4, &pcix_status);
428 pcix_status &= ~PCIX_STAT_BUS_MASK;
429 pcix_status |= (nr << PCIX_STAT_BUS_OFFS);
430 orion_pci_hw_wr_conf(bus, dev, 0, PCIX_STAT, 4, pcix_status);
431 } else {
432 /*
433 * PCI Conventional mode
434 */
435 p2p &= ~PCI_P2P_BUS_MASK;
436 p2p |= (nr << PCI_P2P_BUS_OFFS);
437 orion_write(PCI_P2P_CONF, p2p);
438 }
439}
440
441static void orion_pci_master_slave_enable(void)
442{
443 u32 bus_nr, dev_nr, func, reg, val;
444
445 bus_nr = orion_pci_local_bus_nr();
446 dev_nr = orion_pci_local_dev_nr();
447 func = PCI_CONF_FUNC_STAT_CMD;
448 reg = PCI_CONF_REG_STAT_CMD;
449 orion_pci_hw_rd_conf(bus_nr, dev_nr, func, reg, 4, &val);
450 val |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
451 orion_pci_hw_wr_conf(bus_nr, dev_nr, func, reg, 4, val | 0x7);
452}
453
454static int orion_pci_setup(struct pci_sys_data *sys)
455{
456 struct resource *res;
457
458 /*
459 * Master + Slave enable
460 */
461 orion_pci_master_slave_enable();
462
463 /*
464 * Force ordering
465 */
466 orion_setbits(PCI_CMD, PCI_CMD_HOST_REORDER);
467
468 /*
469 * Request resources
470 */
471 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
472 if (!res)
473 panic("orion_pci_setup unable to alloc resources");
474
475 /*
476 * IORESOURCE_IO
477 */
478 res[0].name = "PCI I/O Space";
479 res[0].flags = IORESOURCE_IO;
480 res[0].start = ORION_PCI_IO_BUS_BASE;
481 res[0].end = res[0].start + ORION_PCI_IO_SIZE - 1;
482 if (request_resource(&ioport_resource, &res[0]))
483 panic("Request PCI IO resource failed\n");
484 sys->resource[0] = &res[0];
485
486 /*
487 * IORESOURCE_MEM
488 */
489 res[1].name = "PCI Memory Space";
490 res[1].flags = IORESOURCE_MEM;
491 res[1].start = ORION_PCI_MEM_PHYS_BASE;
492 res[1].end = res[1].start + ORION_PCI_MEM_SIZE - 1;
493 if (request_resource(&iomem_resource, &res[1]))
494 panic("Request PCI Memory resource failed\n");
495 sys->resource[1] = &res[1];
496
497 sys->resource[2] = NULL;
498 sys->io_offset = 0;
499
500 return 1;
501}
502
503
504/*****************************************************************************
505 * General PCIE + PCI
506 ****************************************************************************/
507int orion_pci_sys_setup(int nr, struct pci_sys_data *sys)
508{
509 int ret = 0;
510
511 if (nr == 0) {
512 /*
513 * PCIE setup
514 */
515 orion_pcie_set_bus_nr(0);
516 ret = orion_pcie_setup(sys);
517 } else if (nr == 1) {
518 /*
519 * PCI setup
520 */
521 ret = orion_pci_setup(sys);
522 }
523
524 return ret;
525}
526
527struct pci_bus *orion_pci_sys_scan_bus(int nr, struct pci_sys_data *sys)
528{
529 struct pci_ops *ops;
530 struct pci_bus *bus;
531
532
533 if (nr == 0) {
534 u32 pci_bus;
535 /*
536 * PCIE scan
537 */
538 ops = &orion_pcie_ops;
539 bus = pci_scan_bus(sys->busnr, ops, sys);
540 /*
541 * Set local PCI bus number to follow PCIE bridges (if any)
542 */
543 pci_bus = bus->number + bus->subordinate - bus->secondary + 1;
544 orion_pci_set_bus_nr(pci_bus);
545 } else if (nr == 1) {
546 /*
547 * PCI scan
548 */
549 ops = &orion_pci_ops;
550 bus = pci_scan_bus(sys->busnr, ops, sys);
551 } else {
552 BUG();
553 bus = NULL;
554 }
555
556 return bus;
557}
diff --git a/arch/arm/mach-orion/time.c b/arch/arm/mach-orion/time.c
deleted file mode 100644
index bd4262da4f40..000000000000
--- a/arch/arm/mach-orion/time.c
+++ /dev/null
@@ -1,181 +0,0 @@
1/*
2 * arch/arm/mach-orion/time.c
3 *
4 * Core time functions for Marvell Orion System On Chip
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/clockchips.h>
15#include <linux/interrupt.h>
16#include <linux/irq.h>
17#include <asm/mach/time.h>
18#include <asm/arch/orion.h>
19#include "common.h"
20
21/*
22 * Timer0: clock_event_device, Tick.
23 * Timer1: clocksource, Free running.
24 * WatchDog: Not used.
25 *
26 * Timers are counting down.
27 */
28#define CLOCKEVENT 0
29#define CLOCKSOURCE 1
30
31/*
32 * Timers bits
33 */
34#define BRIDGE_INT_TIMER(x) (1 << ((x) + 1))
35#define TIMER_EN(x) (1 << ((x) * 2))
36#define TIMER_RELOAD_EN(x) (1 << (((x) * 2) + 1))
37#define BRIDGE_INT_TIMER_WD (1 << 3)
38#define TIMER_WD_EN (1 << 4)
39#define TIMER_WD_RELOAD_EN (1 << 5)
40
41static cycle_t orion_clksrc_read(void)
42{
43 return (0xffffffff - orion_read(TIMER_VAL(CLOCKSOURCE)));
44}
45
46static struct clocksource orion_clksrc = {
47 .name = "orion_clocksource",
48 .shift = 20,
49 .rating = 300,
50 .read = orion_clksrc_read,
51 .mask = CLOCKSOURCE_MASK(32),
52 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
53};
54
55static int
56orion_clkevt_next_event(unsigned long delta, struct clock_event_device *dev)
57{
58 unsigned long flags;
59
60 if (delta == 0)
61 return -ETIME;
62
63 local_irq_save(flags);
64
65 /*
66 * Clear and enable timer interrupt bit
67 */
68 orion_write(BRIDGE_CAUSE, ~BRIDGE_INT_TIMER(CLOCKEVENT));
69 orion_setbits(BRIDGE_MASK, BRIDGE_INT_TIMER(CLOCKEVENT));
70
71 /*
72 * Setup new timer value
73 */
74 orion_write(TIMER_VAL(CLOCKEVENT), delta);
75
76 /*
77 * Disable auto reload and kickoff the timer
78 */
79 orion_clrbits(TIMER_CTRL, TIMER_RELOAD_EN(CLOCKEVENT));
80 orion_setbits(TIMER_CTRL, TIMER_EN(CLOCKEVENT));
81
82 local_irq_restore(flags);
83
84 return 0;
85}
86
87static void
88orion_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev)
89{
90 unsigned long flags;
91
92 local_irq_save(flags);
93
94 if (mode == CLOCK_EVT_MODE_PERIODIC) {
95 /*
96 * Setup latch cycles in timer and enable reload interrupt.
97 */
98 orion_write(TIMER_VAL_RELOAD(CLOCKEVENT), LATCH);
99 orion_write(TIMER_VAL(CLOCKEVENT), LATCH);
100 orion_setbits(BRIDGE_MASK, BRIDGE_INT_TIMER(CLOCKEVENT));
101 orion_setbits(TIMER_CTRL, TIMER_RELOAD_EN(CLOCKEVENT) |
102 TIMER_EN(CLOCKEVENT));
103 } else {
104 /*
105 * Disable timer and interrupt
106 */
107 orion_clrbits(BRIDGE_MASK, BRIDGE_INT_TIMER(CLOCKEVENT));
108 orion_write(BRIDGE_CAUSE, ~BRIDGE_INT_TIMER(CLOCKEVENT));
109 orion_clrbits(TIMER_CTRL, TIMER_RELOAD_EN(CLOCKEVENT) |
110 TIMER_EN(CLOCKEVENT));
111 }
112
113 local_irq_restore(flags);
114}
115
116static struct clock_event_device orion_clkevt = {
117 .name = "orion_tick",
118 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
119 .shift = 32,
120 .rating = 300,
121 .cpumask = CPU_MASK_CPU0,
122 .set_next_event = orion_clkevt_next_event,
123 .set_mode = orion_clkevt_mode,
124};
125
126static irqreturn_t orion_timer_interrupt(int irq, void *dev_id)
127{
128 /*
129 * Clear cause bit and do event
130 */
131 orion_write(BRIDGE_CAUSE, ~BRIDGE_INT_TIMER(CLOCKEVENT));
132 orion_clkevt.event_handler(&orion_clkevt);
133 return IRQ_HANDLED;
134}
135
136static struct irqaction orion_timer_irq = {
137 .name = "orion_tick",
138 .flags = IRQF_DISABLED | IRQF_TIMER,
139 .handler = orion_timer_interrupt
140};
141
142static void orion_timer_init(void)
143{
144 /*
145 * Setup clocksource free running timer (no interrupt on reload)
146 */
147 orion_write(TIMER_VAL(CLOCKSOURCE), 0xffffffff);
148 orion_write(TIMER_VAL_RELOAD(CLOCKSOURCE), 0xffffffff);
149 orion_clrbits(BRIDGE_MASK, BRIDGE_INT_TIMER(CLOCKSOURCE));
150 orion_setbits(TIMER_CTRL, TIMER_RELOAD_EN(CLOCKSOURCE) |
151 TIMER_EN(CLOCKSOURCE));
152
153 /*
154 * Register clocksource
155 */
156 orion_clksrc.mult =
157 clocksource_hz2mult(CLOCK_TICK_RATE, orion_clksrc.shift);
158
159 clocksource_register(&orion_clksrc);
160
161 /*
162 * Connect and enable tick handler
163 */
164 setup_irq(IRQ_ORION_BRIDGE, &orion_timer_irq);
165
166 /*
167 * Register clockevent
168 */
169 orion_clkevt.mult =
170 div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, orion_clkevt.shift);
171 orion_clkevt.max_delta_ns =
172 clockevent_delta2ns(0xfffffffe, &orion_clkevt);
173 orion_clkevt.min_delta_ns =
174 clockevent_delta2ns(1, &orion_clkevt);
175
176 clockevents_register_device(&orion_clkevt);
177}
178
179struct sys_timer orion_timer = {
180 .init = orion_timer_init,
181};
diff --git a/arch/arm/mach-orion/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 1dcbb6ac5a30..93debf336155 100644
--- a/arch/arm/mach-orion/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -1,4 +1,4 @@
1if ARCH_ORION 1if ARCH_ORION5X
2 2
3menu "Orion Implementations" 3menu "Orion Implementations"
4 4
@@ -36,6 +36,14 @@ config MACH_TS209
36 Say 'Y' here if you want your kernel to support the 36 Say 'Y' here if you want your kernel to support the
37 QNAP TS-109/TS-209 platform. 37 QNAP TS-109/TS-209 platform.
38 38
39config MACH_LINKSTATION_PRO
40 bool "Buffalo Linkstation Pro/Live"
41 select I2C_BOARDINFO
42 help
43 Say 'Y' here if you want your kernel to support the
44 Buffalo Linkstation Pro/Live platform. Both v1 and
45 v2 devices are supported.
46
39endmenu 47endmenu
40 48
41endif 49endif
diff --git a/arch/arm/mach-orion/Makefile b/arch/arm/mach-orion5x/Makefile
index f91d937a73e8..9301bf55910b 100644
--- a/arch/arm/mach-orion/Makefile
+++ b/arch/arm/mach-orion5x/Makefile
@@ -1,6 +1,7 @@
1obj-y += common.o addr-map.o pci.o gpio.o irq.o time.o 1obj-y += common.o addr-map.o pci.o gpio.o irq.o
2obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o 2obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
3obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o 3obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
4obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o 4obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
5obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
5obj-$(CONFIG_MACH_DNS323) += dns323-setup.o 6obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
6obj-$(CONFIG_MACH_TS209) += ts209-setup.o 7obj-$(CONFIG_MACH_TS209) += ts209-setup.o
diff --git a/arch/arm/mach-orion/Makefile.boot b/arch/arm/mach-orion5x/Makefile.boot
index 67039c3e0c48..67039c3e0c48 100644
--- a/arch/arm/mach-orion/Makefile.boot
+++ b/arch/arm/mach-orion5x/Makefile.boot
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
new file mode 100644
index 000000000000..6b179371e0a2
--- /dev/null
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -0,0 +1,240 @@
1/*
2 * arch/arm/mach-orion5x/addr-map.c
3 *
4 * Address map functions for Marvell Orion 5x SoCs
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mbus.h>
16#include <asm/hardware.h>
17#include <asm/io.h>
18#include "common.h"
19
20/*
21 * The Orion has fully programable address map. There's a separate address
22 * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIE, USB,
23 * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own
24 * address decode windows that allow it to access any of the Orion resources.
25 *
26 * CPU address decoding --
27 * Linux assumes that it is the boot loader that already setup the access to
28 * DDR and internal registers.
29 * Setup access to PCI and PCI-E IO/MEM space is issued by this file.
30 * Setup access to various devices located on the device bus interface (e.g.
31 * flashes, RTC, etc) should be issued by machine-setup.c according to
32 * specific board population (by using orion5x_setup_*_win()).
33 *
34 * Non-CPU Masters address decoding --
35 * Unlike the CPU, we setup the access from Orion's master interfaces to DDR
36 * banks only (the typical use case).
37 * Setup access for each master to DDR is issued by common.c.
38 *
39 * Note: although orion_setbits() and orion_clrbits() are not atomic
40 * no locking is necessary here since code in this file is only called
41 * at boot time when there is no concurrency issues.
42 */
43
44/*
45 * Generic Address Decode Windows bit settings
46 */
47#define TARGET_DDR 0
48#define TARGET_DEV_BUS 1
49#define TARGET_PCI 3
50#define TARGET_PCIE 4
51#define ATTR_DDR_CS(n) (((n) ==0) ? 0xe : \
52 ((n) == 1) ? 0xd : \
53 ((n) == 2) ? 0xb : \
54 ((n) == 3) ? 0x7 : 0xf)
55#define ATTR_PCIE_MEM 0x59
56#define ATTR_PCIE_IO 0x51
57#define ATTR_PCIE_WA 0x79
58#define ATTR_PCI_MEM 0x59
59#define ATTR_PCI_IO 0x51
60#define ATTR_DEV_CS0 0x1e
61#define ATTR_DEV_CS1 0x1d
62#define ATTR_DEV_CS2 0x1b
63#define ATTR_DEV_BOOT 0xf
64#define WIN_EN 1
65
66/*
67 * Helpers to get DDR bank info
68 */
69#define DDR_BASE_CS(n) ORION5X_DDR_REG(0x1500 + ((n) * 8))
70#define DDR_SIZE_CS(n) ORION5X_DDR_REG(0x1504 + ((n) * 8))
71#define DDR_MAX_CS 4
72#define DDR_REG_TO_SIZE(reg) (((reg) | 0xffffff) + 1)
73#define DDR_REG_TO_BASE(reg) ((reg) & 0xff000000)
74#define DDR_BANK_EN 1
75
76/*
77 * CPU Address Decode Windows registers
78 */
79#define CPU_WIN_CTRL(n) ORION5X_BRIDGE_REG(0x000 | ((n) << 4))
80#define CPU_WIN_BASE(n) ORION5X_BRIDGE_REG(0x004 | ((n) << 4))
81#define CPU_WIN_REMAP_LO(n) ORION5X_BRIDGE_REG(0x008 | ((n) << 4))
82#define CPU_WIN_REMAP_HI(n) ORION5X_BRIDGE_REG(0x00c | ((n) << 4))
83
84/*
85 * Gigabit Ethernet Address Decode Windows registers
86 */
87#define ETH_WIN_BASE(win) ORION5X_ETH_REG(0x200 + ((win) * 8))
88#define ETH_WIN_SIZE(win) ORION5X_ETH_REG(0x204 + ((win) * 8))
89#define ETH_WIN_REMAP(win) ORION5X_ETH_REG(0x280 + ((win) * 4))
90#define ETH_WIN_EN ORION5X_ETH_REG(0x290)
91#define ETH_WIN_PROT ORION5X_ETH_REG(0x294)
92#define ETH_MAX_WIN 6
93#define ETH_MAX_REMAP_WIN 4
94
95
96struct mbus_dram_target_info orion5x_mbus_dram_info;
97
98static int __init orion5x_cpu_win_can_remap(int win)
99{
100 u32 dev, rev;
101
102 orion5x_pcie_id(&dev, &rev);
103 if ((dev == MV88F5281_DEV_ID && win < 4)
104 || (dev == MV88F5182_DEV_ID && win < 2)
105 || (dev == MV88F5181_DEV_ID && win < 2))
106 return 1;
107
108 return 0;
109}
110
111static void __init setup_cpu_win(int win, u32 base, u32 size,
112 u8 target, u8 attr, int remap)
113{
114 orion5x_write(CPU_WIN_BASE(win), base & 0xffff0000);
115 orion5x_write(CPU_WIN_CTRL(win),
116 ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1);
117
118 if (orion5x_cpu_win_can_remap(win)) {
119 if (remap < 0)
120 remap = base;
121
122 orion5x_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000);
123 orion5x_write(CPU_WIN_REMAP_HI(win), 0);
124 }
125}
126
127void __init orion5x_setup_cpu_mbus_bridge(void)
128{
129 int i;
130 int cs;
131
132 /*
133 * First, disable and clear windows.
134 */
135 for (i = 0; i < 8; i++) {
136 orion5x_write(CPU_WIN_BASE(i), 0);
137 orion5x_write(CPU_WIN_CTRL(i), 0);
138 if (orion5x_cpu_win_can_remap(i)) {
139 orion5x_write(CPU_WIN_REMAP_LO(i), 0);
140 orion5x_write(CPU_WIN_REMAP_HI(i), 0);
141 }
142 }
143
144 /*
145 * Setup windows for PCI+PCIe IO+MEM space.
146 */
147 setup_cpu_win(0, ORION5X_PCIE_IO_PHYS_BASE, ORION5X_PCIE_IO_SIZE,
148 TARGET_PCIE, ATTR_PCIE_IO, ORION5X_PCIE_IO_BUS_BASE);
149 setup_cpu_win(1, ORION5X_PCI_IO_PHYS_BASE, ORION5X_PCI_IO_SIZE,
150 TARGET_PCI, ATTR_PCI_IO, ORION5X_PCI_IO_BUS_BASE);
151 setup_cpu_win(2, ORION5X_PCIE_MEM_PHYS_BASE, ORION5X_PCIE_MEM_SIZE,
152 TARGET_PCIE, ATTR_PCIE_MEM, -1);
153 setup_cpu_win(3, ORION5X_PCI_MEM_PHYS_BASE, ORION5X_PCI_MEM_SIZE,
154 TARGET_PCI, ATTR_PCI_MEM, -1);
155
156 /*
157 * Setup MBUS dram target info.
158 */
159 orion5x_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
160
161 for (i = 0, cs = 0; i < 4; i++) {
162 u32 base = readl(DDR_BASE_CS(i));
163 u32 size = readl(DDR_SIZE_CS(i));
164
165 /*
166 * Chip select enabled?
167 */
168 if (size & 1) {
169 struct mbus_dram_window *w;
170
171 w = &orion5x_mbus_dram_info.cs[cs++];
172 w->cs_index = i;
173 w->mbus_attr = 0xf & ~(1 << i);
174 w->base = base & 0xff000000;
175 w->size = (size | 0x00ffffff) + 1;
176 }
177 }
178 orion5x_mbus_dram_info.num_cs = cs;
179}
180
181void __init orion5x_setup_dev_boot_win(u32 base, u32 size)
182{
183 setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
184}
185
186void __init orion5x_setup_dev0_win(u32 base, u32 size)
187{
188 setup_cpu_win(5, base, size, TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
189}
190
191void __init orion5x_setup_dev1_win(u32 base, u32 size)
192{
193 setup_cpu_win(6, base, size, TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
194}
195
196void __init orion5x_setup_dev2_win(u32 base, u32 size)
197{
198 setup_cpu_win(7, base, size, TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
199}
200
201void __init orion5x_setup_pcie_wa_win(u32 base, u32 size)
202{
203 setup_cpu_win(7, base, size, TARGET_PCIE, ATTR_PCIE_WA, -1);
204}
205
206void __init orion5x_setup_eth_wins(void)
207{
208 int i;
209
210 /*
211 * First, disable and clear windows
212 */
213 for (i = 0; i < ETH_MAX_WIN; i++) {
214 orion5x_write(ETH_WIN_BASE(i), 0);
215 orion5x_write(ETH_WIN_SIZE(i), 0);
216 orion5x_setbits(ETH_WIN_EN, 1 << i);
217 orion5x_clrbits(ETH_WIN_PROT, 0x3 << (i * 2));
218 if (i < ETH_MAX_REMAP_WIN)
219 orion5x_write(ETH_WIN_REMAP(i), 0);
220 }
221
222 /*
223 * Setup windows for DDR banks.
224 */
225 for (i = 0; i < DDR_MAX_CS; i++) {
226 u32 base, size;
227 size = orion5x_read(DDR_SIZE_CS(i));
228 base = orion5x_read(DDR_BASE_CS(i));
229 if (size & DDR_BANK_EN) {
230 base = DDR_REG_TO_BASE(base);
231 size = DDR_REG_TO_SIZE(size);
232 orion5x_write(ETH_WIN_SIZE(i), (size-1) & 0xffff0000);
233 orion5x_write(ETH_WIN_BASE(i), (base & 0xffff0000) |
234 (ATTR_DDR_CS(i) << 8) |
235 TARGET_DDR);
236 orion5x_clrbits(ETH_WIN_EN, 1 << i);
237 orion5x_setbits(ETH_WIN_PROT, 0x3 << (i * 2));
238 }
239 }
240}
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion5x/common.c
index bbc2b4ec932c..439c7784af02 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -1,12 +1,12 @@
1/* 1/*
2 * arch/arm/mach-orion/common.c 2 * arch/arm/mach-orion5x/common.c
3 * 3 *
4 * Core functions for Marvell Orion System On Chip 4 * Core functions for Marvell Orion 5x SoCs
5 * 5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com> 6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
@@ -14,64 +14,71 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/mbus.h>
17#include <linux/mv643xx_eth.h> 18#include <linux/mv643xx_eth.h>
18#include <linux/mv643xx_i2c.h> 19#include <linux/mv643xx_i2c.h>
20#include <linux/ata_platform.h>
19#include <asm/page.h> 21#include <asm/page.h>
20#include <asm/setup.h> 22#include <asm/setup.h>
21#include <asm/timex.h> 23#include <asm/timex.h>
22#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/time.h>
24#include <asm/arch/hardware.h> 27#include <asm/arch/hardware.h>
28#include <asm/arch/orion5x.h>
29#include <asm/plat-orion/ehci-orion.h>
30#include <asm/plat-orion/orion_nand.h>
31#include <asm/plat-orion/time.h>
25#include "common.h" 32#include "common.h"
26 33
27/***************************************************************************** 34/*****************************************************************************
28 * I/O Address Mapping 35 * I/O Address Mapping
29 ****************************************************************************/ 36 ****************************************************************************/
30static struct map_desc orion_io_desc[] __initdata = { 37static struct map_desc orion5x_io_desc[] __initdata = {
31 { 38 {
32 .virtual = ORION_REGS_VIRT_BASE, 39 .virtual = ORION5X_REGS_VIRT_BASE,
33 .pfn = __phys_to_pfn(ORION_REGS_PHYS_BASE), 40 .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
34 .length = ORION_REGS_SIZE, 41 .length = ORION5X_REGS_SIZE,
35 .type = MT_DEVICE 42 .type = MT_DEVICE
36 }, 43 },
37 { 44 {
38 .virtual = ORION_PCIE_IO_VIRT_BASE, 45 .virtual = ORION5X_PCIE_IO_VIRT_BASE,
39 .pfn = __phys_to_pfn(ORION_PCIE_IO_PHYS_BASE), 46 .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
40 .length = ORION_PCIE_IO_SIZE, 47 .length = ORION5X_PCIE_IO_SIZE,
41 .type = MT_DEVICE 48 .type = MT_DEVICE
42 }, 49 },
43 { 50 {
44 .virtual = ORION_PCI_IO_VIRT_BASE, 51 .virtual = ORION5X_PCI_IO_VIRT_BASE,
45 .pfn = __phys_to_pfn(ORION_PCI_IO_PHYS_BASE), 52 .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
46 .length = ORION_PCI_IO_SIZE, 53 .length = ORION5X_PCI_IO_SIZE,
47 .type = MT_DEVICE 54 .type = MT_DEVICE
48 }, 55 },
49 { 56 {
50 .virtual = ORION_PCIE_WA_VIRT_BASE, 57 .virtual = ORION5X_PCIE_WA_VIRT_BASE,
51 .pfn = __phys_to_pfn(ORION_PCIE_WA_PHYS_BASE), 58 .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
52 .length = ORION_PCIE_WA_SIZE, 59 .length = ORION5X_PCIE_WA_SIZE,
53 .type = MT_DEVICE 60 .type = MT_DEVICE
54 }, 61 },
55}; 62};
56 63
57void __init orion_map_io(void) 64void __init orion5x_map_io(void)
58{ 65{
59 iotable_init(orion_io_desc, ARRAY_SIZE(orion_io_desc)); 66 iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
60} 67}
61 68
62/***************************************************************************** 69/*****************************************************************************
63 * UART 70 * UART
64 ****************************************************************************/ 71 ****************************************************************************/
65 72
66static struct resource orion_uart_resources[] = { 73static struct resource orion5x_uart_resources[] = {
67 { 74 {
68 .start = UART0_PHYS_BASE, 75 .start = UART0_PHYS_BASE,
69 .end = UART0_PHYS_BASE + 0xff, 76 .end = UART0_PHYS_BASE + 0xff,
70 .flags = IORESOURCE_MEM, 77 .flags = IORESOURCE_MEM,
71 }, 78 },
72 { 79 {
73 .start = IRQ_ORION_UART0, 80 .start = IRQ_ORION5X_UART0,
74 .end = IRQ_ORION_UART0, 81 .end = IRQ_ORION5X_UART0,
75 .flags = IORESOURCE_IRQ, 82 .flags = IORESOURCE_IRQ,
76 }, 83 },
77 { 84 {
@@ -80,96 +87,102 @@ static struct resource orion_uart_resources[] = {
80 .flags = IORESOURCE_MEM, 87 .flags = IORESOURCE_MEM,
81 }, 88 },
82 { 89 {
83 .start = IRQ_ORION_UART1, 90 .start = IRQ_ORION5X_UART1,
84 .end = IRQ_ORION_UART1, 91 .end = IRQ_ORION5X_UART1,
85 .flags = IORESOURCE_IRQ, 92 .flags = IORESOURCE_IRQ,
86 }, 93 },
87}; 94};
88 95
89static struct plat_serial8250_port orion_uart_data[] = { 96static struct plat_serial8250_port orion5x_uart_data[] = {
90 { 97 {
91 .mapbase = UART0_PHYS_BASE, 98 .mapbase = UART0_PHYS_BASE,
92 .membase = (char *)UART0_VIRT_BASE, 99 .membase = (char *)UART0_VIRT_BASE,
93 .irq = IRQ_ORION_UART0, 100 .irq = IRQ_ORION5X_UART0,
94 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 101 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
95 .iotype = UPIO_MEM, 102 .iotype = UPIO_MEM,
96 .regshift = 2, 103 .regshift = 2,
97 .uartclk = ORION_TCLK, 104 .uartclk = ORION5X_TCLK,
98 }, 105 },
99 { 106 {
100 .mapbase = UART1_PHYS_BASE, 107 .mapbase = UART1_PHYS_BASE,
101 .membase = (char *)UART1_VIRT_BASE, 108 .membase = (char *)UART1_VIRT_BASE,
102 .irq = IRQ_ORION_UART1, 109 .irq = IRQ_ORION5X_UART1,
103 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 110 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
104 .iotype = UPIO_MEM, 111 .iotype = UPIO_MEM,
105 .regshift = 2, 112 .regshift = 2,
106 .uartclk = ORION_TCLK, 113 .uartclk = ORION5X_TCLK,
107 }, 114 },
108 { }, 115 { },
109}; 116};
110 117
111static struct platform_device orion_uart = { 118static struct platform_device orion5x_uart = {
112 .name = "serial8250", 119 .name = "serial8250",
113 .id = PLAT8250_DEV_PLATFORM, 120 .id = PLAT8250_DEV_PLATFORM,
114 .dev = { 121 .dev = {
115 .platform_data = orion_uart_data, 122 .platform_data = orion5x_uart_data,
116 }, 123 },
117 .resource = orion_uart_resources, 124 .resource = orion5x_uart_resources,
118 .num_resources = ARRAY_SIZE(orion_uart_resources), 125 .num_resources = ARRAY_SIZE(orion5x_uart_resources),
119}; 126};
120 127
121/******************************************************************************* 128/*******************************************************************************
122 * USB Controller - 2 interfaces 129 * USB Controller - 2 interfaces
123 ******************************************************************************/ 130 ******************************************************************************/
124 131
125static struct resource orion_ehci0_resources[] = { 132static struct resource orion5x_ehci0_resources[] = {
126 { 133 {
127 .start = ORION_USB0_PHYS_BASE, 134 .start = ORION5X_USB0_PHYS_BASE,
128 .end = ORION_USB0_PHYS_BASE + SZ_4K, 135 .end = ORION5X_USB0_PHYS_BASE + SZ_4K,
129 .flags = IORESOURCE_MEM, 136 .flags = IORESOURCE_MEM,
130 }, 137 },
131 { 138 {
132 .start = IRQ_ORION_USB0_CTRL, 139 .start = IRQ_ORION5X_USB0_CTRL,
133 .end = IRQ_ORION_USB0_CTRL, 140 .end = IRQ_ORION5X_USB0_CTRL,
134 .flags = IORESOURCE_IRQ, 141 .flags = IORESOURCE_IRQ,
135 }, 142 },
136}; 143};
137 144
138static struct resource orion_ehci1_resources[] = { 145static struct resource orion5x_ehci1_resources[] = {
139 { 146 {
140 .start = ORION_USB1_PHYS_BASE, 147 .start = ORION5X_USB1_PHYS_BASE,
141 .end = ORION_USB1_PHYS_BASE + SZ_4K, 148 .end = ORION5X_USB1_PHYS_BASE + SZ_4K,
142 .flags = IORESOURCE_MEM, 149 .flags = IORESOURCE_MEM,
143 }, 150 },
144 { 151 {
145 .start = IRQ_ORION_USB1_CTRL, 152 .start = IRQ_ORION5X_USB1_CTRL,
146 .end = IRQ_ORION_USB1_CTRL, 153 .end = IRQ_ORION5X_USB1_CTRL,
147 .flags = IORESOURCE_IRQ, 154 .flags = IORESOURCE_IRQ,
148 }, 155 },
149}; 156};
150 157
158static struct orion_ehci_data orion5x_ehci_data = {
159 .dram = &orion5x_mbus_dram_info,
160};
161
151static u64 ehci_dmamask = 0xffffffffUL; 162static u64 ehci_dmamask = 0xffffffffUL;
152 163
153static struct platform_device orion_ehci0 = { 164static struct platform_device orion5x_ehci0 = {
154 .name = "orion-ehci", 165 .name = "orion-ehci",
155 .id = 0, 166 .id = 0,
156 .dev = { 167 .dev = {
157 .dma_mask = &ehci_dmamask, 168 .dma_mask = &ehci_dmamask,
158 .coherent_dma_mask = 0xffffffff, 169 .coherent_dma_mask = 0xffffffff,
170 .platform_data = &orion5x_ehci_data,
159 }, 171 },
160 .resource = orion_ehci0_resources, 172 .resource = orion5x_ehci0_resources,
161 .num_resources = ARRAY_SIZE(orion_ehci0_resources), 173 .num_resources = ARRAY_SIZE(orion5x_ehci0_resources),
162}; 174};
163 175
164static struct platform_device orion_ehci1 = { 176static struct platform_device orion5x_ehci1 = {
165 .name = "orion-ehci", 177 .name = "orion-ehci",
166 .id = 1, 178 .id = 1,
167 .dev = { 179 .dev = {
168 .dma_mask = &ehci_dmamask, 180 .dma_mask = &ehci_dmamask,
169 .coherent_dma_mask = 0xffffffff, 181 .coherent_dma_mask = 0xffffffff,
182 .platform_data = &orion5x_ehci_data,
170 }, 183 },
171 .resource = orion_ehci1_resources, 184 .resource = orion5x_ehci1_resources,
172 .num_resources = ARRAY_SIZE(orion_ehci1_resources), 185 .num_resources = ARRAY_SIZE(orion5x_ehci1_resources),
173}; 186};
174 187
175/***************************************************************************** 188/*****************************************************************************
@@ -177,42 +190,42 @@ static struct platform_device orion_ehci1 = {
177 * (The Orion and Discovery (MV643xx) families use the same Ethernet driver) 190 * (The Orion and Discovery (MV643xx) families use the same Ethernet driver)
178 ****************************************************************************/ 191 ****************************************************************************/
179 192
180static struct resource orion_eth_shared_resources[] = { 193static struct resource orion5x_eth_shared_resources[] = {
181 { 194 {
182 .start = ORION_ETH_PHYS_BASE + 0x2000, 195 .start = ORION5X_ETH_PHYS_BASE + 0x2000,
183 .end = ORION_ETH_PHYS_BASE + 0x3fff, 196 .end = ORION5X_ETH_PHYS_BASE + 0x3fff,
184 .flags = IORESOURCE_MEM, 197 .flags = IORESOURCE_MEM,
185 }, 198 },
186}; 199};
187 200
188static struct platform_device orion_eth_shared = { 201static struct platform_device orion5x_eth_shared = {
189 .name = MV643XX_ETH_SHARED_NAME, 202 .name = MV643XX_ETH_SHARED_NAME,
190 .id = 0, 203 .id = 0,
191 .num_resources = 1, 204 .num_resources = 1,
192 .resource = orion_eth_shared_resources, 205 .resource = orion5x_eth_shared_resources,
193}; 206};
194 207
195static struct resource orion_eth_resources[] = { 208static struct resource orion5x_eth_resources[] = {
196 { 209 {
197 .name = "eth irq", 210 .name = "eth irq",
198 .start = IRQ_ORION_ETH_SUM, 211 .start = IRQ_ORION5X_ETH_SUM,
199 .end = IRQ_ORION_ETH_SUM, 212 .end = IRQ_ORION5X_ETH_SUM,
200 .flags = IORESOURCE_IRQ, 213 .flags = IORESOURCE_IRQ,
201 } 214 }
202}; 215};
203 216
204static struct platform_device orion_eth = { 217static struct platform_device orion5x_eth = {
205 .name = MV643XX_ETH_NAME, 218 .name = MV643XX_ETH_NAME,
206 .id = 0, 219 .id = 0,
207 .num_resources = 1, 220 .num_resources = 1,
208 .resource = orion_eth_resources, 221 .resource = orion5x_eth_resources,
209}; 222};
210 223
211void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data) 224void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
212{ 225{
213 orion_eth.dev.platform_data = eth_data; 226 orion5x_eth.dev.platform_data = eth_data;
214 platform_device_register(&orion_eth_shared); 227 platform_device_register(&orion5x_eth_shared);
215 platform_device_register(&orion_eth); 228 platform_device_register(&orion5x_eth);
216} 229}
217 230
218/***************************************************************************** 231/*****************************************************************************
@@ -220,13 +233,13 @@ void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data)
220 * (The Orion and Discovery (MV643xx) families share the same I2C controller) 233 * (The Orion and Discovery (MV643xx) families share the same I2C controller)
221 ****************************************************************************/ 234 ****************************************************************************/
222 235
223static struct mv64xxx_i2c_pdata orion_i2c_pdata = { 236static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
224 .freq_m = 8, /* assumes 166 MHz TCLK */ 237 .freq_m = 8, /* assumes 166 MHz TCLK */
225 .freq_n = 3, 238 .freq_n = 3,
226 .timeout = 1000, /* Default timeout of 1 second */ 239 .timeout = 1000, /* Default timeout of 1 second */
227}; 240};
228 241
229static struct resource orion_i2c_resources[] = { 242static struct resource orion5x_i2c_resources[] = {
230 { 243 {
231 .name = "i2c base", 244 .name = "i2c base",
232 .start = I2C_PHYS_BASE, 245 .start = I2C_PHYS_BASE,
@@ -235,66 +248,80 @@ static struct resource orion_i2c_resources[] = {
235 }, 248 },
236 { 249 {
237 .name = "i2c irq", 250 .name = "i2c irq",
238 .start = IRQ_ORION_I2C, 251 .start = IRQ_ORION5X_I2C,
239 .end = IRQ_ORION_I2C, 252 .end = IRQ_ORION5X_I2C,
240 .flags = IORESOURCE_IRQ, 253 .flags = IORESOURCE_IRQ,
241 }, 254 },
242}; 255};
243 256
244static struct platform_device orion_i2c = { 257static struct platform_device orion5x_i2c = {
245 .name = MV64XXX_I2C_CTLR_NAME, 258 .name = MV64XXX_I2C_CTLR_NAME,
246 .id = 0, 259 .id = 0,
247 .num_resources = ARRAY_SIZE(orion_i2c_resources), 260 .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
248 .resource = orion_i2c_resources, 261 .resource = orion5x_i2c_resources,
249 .dev = { 262 .dev = {
250 .platform_data = &orion_i2c_pdata, 263 .platform_data = &orion5x_i2c_pdata,
251 }, 264 },
252}; 265};
253 266
254/***************************************************************************** 267/*****************************************************************************
255 * Sata port 268 * Sata port
256 ****************************************************************************/ 269 ****************************************************************************/
257static struct resource orion_sata_resources[] = { 270static struct resource orion5x_sata_resources[] = {
258 { 271 {
259 .name = "sata base", 272 .name = "sata base",
260 .start = ORION_SATA_PHYS_BASE, 273 .start = ORION5X_SATA_PHYS_BASE,
261 .end = ORION_SATA_PHYS_BASE + 0x5000 - 1, 274 .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
262 .flags = IORESOURCE_MEM, 275 .flags = IORESOURCE_MEM,
263 }, 276 },
264 { 277 {
265 .name = "sata irq", 278 .name = "sata irq",
266 .start = IRQ_ORION_SATA, 279 .start = IRQ_ORION5X_SATA,
267 .end = IRQ_ORION_SATA, 280 .end = IRQ_ORION5X_SATA,
268 .flags = IORESOURCE_IRQ, 281 .flags = IORESOURCE_IRQ,
269 }, 282 },
270}; 283};
271 284
272static struct platform_device orion_sata = { 285static struct platform_device orion5x_sata = {
273 .name = "sata_mv", 286 .name = "sata_mv",
274 .id = 0, 287 .id = 0,
275 .dev = { 288 .dev = {
276 .coherent_dma_mask = 0xffffffff, 289 .coherent_dma_mask = 0xffffffff,
277 }, 290 },
278 .num_resources = ARRAY_SIZE(orion_sata_resources), 291 .num_resources = ARRAY_SIZE(orion5x_sata_resources),
279 .resource = orion_sata_resources, 292 .resource = orion5x_sata_resources,
280}; 293};
281 294
282void __init orion_sata_init(struct mv_sata_platform_data *sata_data) 295void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
283{ 296{
284 orion_sata.dev.platform_data = sata_data; 297 sata_data->dram = &orion5x_mbus_dram_info;
285 platform_device_register(&orion_sata); 298 orion5x_sata.dev.platform_data = sata_data;
299 platform_device_register(&orion5x_sata);
286} 300}
287 301
288/***************************************************************************** 302/*****************************************************************************
303 * Time handling
304 ****************************************************************************/
305
306static void orion5x_timer_init(void)
307{
308 orion_time_init(IRQ_ORION5X_BRIDGE, ORION5X_TCLK);
309}
310
311struct sys_timer orion5x_timer = {
312 .init = orion5x_timer_init,
313};
314
315/*****************************************************************************
289 * General 316 * General
290 ****************************************************************************/ 317 ****************************************************************************/
291 318
292/* 319/*
293 * Identify device ID and rev from PCIE configuration header space '0'. 320 * Identify device ID and rev from PCIE configuration header space '0'.
294 */ 321 */
295static void orion_id(u32 *dev, u32 *rev, char **dev_name) 322static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
296{ 323{
297 orion_pcie_id(dev, rev); 324 orion5x_pcie_id(dev, rev);
298 325
299 if (*dev == MV88F5281_DEV_ID) { 326 if (*dev == MV88F5281_DEV_ID) {
300 if (*rev == MV88F5281_REV_D2) { 327 if (*rev == MV88F5281_REV_D2) {
@@ -321,33 +348,28 @@ static void orion_id(u32 *dev, u32 *rev, char **dev_name)
321 } 348 }
322} 349}
323 350
324void __init orion_init(void) 351void __init orion5x_init(void)
325{ 352{
326 char *dev_name; 353 char *dev_name;
327 u32 dev, rev; 354 u32 dev, rev;
328 355
329 orion_id(&dev, &rev, &dev_name); 356 orion5x_id(&dev, &rev, &dev_name);
330 printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, ORION_TCLK); 357 printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, ORION5X_TCLK);
331 358
332 /* 359 /*
333 * Setup Orion address map 360 * Setup Orion address map
334 */ 361 */
335 orion_setup_cpu_wins(); 362 orion5x_setup_cpu_mbus_bridge();
336 orion_setup_usb_wins(); 363 orion5x_setup_eth_wins();
337 orion_setup_eth_wins();
338 orion_setup_pci_wins();
339 orion_setup_pcie_wins();
340 if (dev == MV88F5182_DEV_ID)
341 orion_setup_sata_wins();
342 364
343 /* 365 /*
344 * REgister devices 366 * Register devices.
345 */ 367 */
346 platform_device_register(&orion_uart); 368 platform_device_register(&orion5x_uart);
347 platform_device_register(&orion_ehci0); 369 platform_device_register(&orion5x_ehci0);
348 if (dev == MV88F5182_DEV_ID) 370 if (dev == MV88F5182_DEV_ID)
349 platform_device_register(&orion_ehci1); 371 platform_device_register(&orion5x_ehci1);
350 platform_device_register(&orion_i2c); 372 platform_device_register(&orion5x_i2c);
351} 373}
352 374
353/* 375/*
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
new file mode 100644
index 000000000000..f4c4c9a72a7c
--- /dev/null
+++ b/arch/arm/mach-orion5x/common.h
@@ -0,0 +1,72 @@
1#ifndef __ARCH_ORION5X_COMMON_H
2#define __ARCH_ORION5X_COMMON_H
3
4/*
5 * Basic Orion init functions used early by machine-setup.
6 */
7
8void orion5x_map_io(void);
9void orion5x_init_irq(void);
10void orion5x_init(void);
11extern struct sys_timer orion5x_timer;
12
13/*
14 * Enumerations and functions for Orion windows mapping. Used by Orion core
15 * functions to map its interfaces and by the machine-setup to map its on-
16 * board devices. Details in /mach-orion/addr-map.c
17 */
18extern struct mbus_dram_target_info orion5x_mbus_dram_info;
19void orion5x_setup_cpu_mbus_bridge(void);
20void orion5x_setup_dev_boot_win(u32 base, u32 size);
21void orion5x_setup_dev0_win(u32 base, u32 size);
22void orion5x_setup_dev1_win(u32 base, u32 size);
23void orion5x_setup_dev2_win(u32 base, u32 size);
24void orion5x_setup_pcie_wa_win(u32 base, u32 size);
25void orion5x_setup_eth_wins(void);
26
27/*
28 * Shared code used internally by other Orion core functions.
29 * (/mach-orion/pci.c)
30 */
31
32struct pci_sys_data;
33struct pci_bus;
34
35void orion5x_pcie_id(u32 *dev, u32 *rev);
36int orion5x_pcie_local_bus_nr(void);
37int orion5x_pci_local_bus_nr(void);
38int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
39struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
40
41/*
42 * Valid GPIO pins according to MPP setup, used by machine-setup.
43 * (/mach-orion/gpio.c).
44 */
45
46void orion5x_gpio_set_valid_pins(u32 pins);
47void gpio_display(void); /* debug */
48
49/*
50 * Pull in Orion Ethernet platform_data, used by machine-setup
51 */
52
53struct mv643xx_eth_platform_data;
54
55void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
56
57/*
58 * Orion Sata platform_data, used by machine-setup
59 */
60
61struct mv_sata_platform_data;
62
63void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
64
65struct machine_desc;
66struct meminfo;
67struct tag;
68extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
69 char **, struct meminfo *);
70
71
72#endif
diff --git a/arch/arm/mach-orion/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 5ef44e1a2d36..872aed372327 100644
--- a/arch/arm/mach-orion/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -1,12 +1,12 @@
1/* 1/*
2 * arch/arm/mach-orion/db88f5281-setup.c 2 * arch/arm/mach-orion5x/db88f5281-setup.c
3 * 3 *
4 * Marvell Orion-2 Development Board Setup 4 * Marvell Orion-2 Development Board Setup
5 * 5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com> 6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
@@ -24,8 +24,8 @@
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion.h> 27#include <asm/arch/orion5x.h>
28#include <asm/arch/platform.h> 28#include <asm/plat-orion/orion_nand.h>
29#include "common.h" 29#include "common.h"
30 30
31/***************************************************************************** 31/*****************************************************************************
@@ -244,8 +244,8 @@ static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
244 /* 244 /*
245 * PCIE IRQ is connected internally (not GPIO) 245 * PCIE IRQ is connected internally (not GPIO)
246 */ 246 */
247 if (dev->bus->number == orion_pcie_local_bus_nr()) 247 if (dev->bus->number == orion5x_pcie_local_bus_nr())
248 return IRQ_ORION_PCIE0_INT; 248 return IRQ_ORION5X_PCIE0_INT;
249 249
250 /* 250 /*
251 * PCI IRQs are connected via GPIOs 251 * PCI IRQs are connected via GPIOs
@@ -265,8 +265,8 @@ static struct hw_pci db88f5281_pci __initdata = {
265 .nr_controllers = 2, 265 .nr_controllers = 2,
266 .preinit = db88f5281_pci_preinit, 266 .preinit = db88f5281_pci_preinit,
267 .swizzle = pci_std_swizzle, 267 .swizzle = pci_std_swizzle,
268 .setup = orion_pci_sys_setup, 268 .setup = orion5x_pci_sys_setup,
269 .scan = orion_pci_sys_scan_bus, 269 .scan = orion5x_pci_sys_scan_bus,
270 .map_irq = db88f5281_pci_map_irq, 270 .map_irq = db88f5281_pci_map_irq,
271}; 271};
272 272
@@ -312,19 +312,16 @@ static void __init db88f5281_init(void)
312 /* 312 /*
313 * Basic Orion setup. Need to be called early. 313 * Basic Orion setup. Need to be called early.
314 */ 314 */
315 orion_init(); 315 orion5x_init();
316 316
317 /* 317 /*
318 * Setup the CPU address decode windows for our on-board devices 318 * Setup the CPU address decode windows for our on-board devices
319 */ 319 */
320 orion_setup_cpu_win(ORION_DEV_BOOT, DB88F5281_NOR_BOOT_BASE, 320 orion5x_setup_dev_boot_win(DB88F5281_NOR_BOOT_BASE,
321 DB88F5281_NOR_BOOT_SIZE, -1); 321 DB88F5281_NOR_BOOT_SIZE);
322 orion_setup_cpu_win(ORION_DEV0, DB88F5281_7SEG_BASE, 322 orion5x_setup_dev0_win(DB88F5281_7SEG_BASE, DB88F5281_7SEG_SIZE);
323 DB88F5281_7SEG_SIZE, -1); 323 orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
324 orion_setup_cpu_win(ORION_DEV1, DB88F5281_NOR_BASE, 324 orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
325 DB88F5281_NOR_SIZE, -1);
326 orion_setup_cpu_win(ORION_DEV2, DB88F5281_NAND_BASE,
327 DB88F5281_NAND_SIZE, -1);
328 325
329 /* 326 /*
330 * Setup Multiplexing Pins: 327 * Setup Multiplexing Pins:
@@ -340,25 +337,25 @@ static void __init db88f5281_init(void)
340 * MPP18: UART1_CTS MPP19: UART1_RTS 337 * MPP18: UART1_CTS MPP19: UART1_RTS
341 * MPP-DEV: DEV_D[16:31] 338 * MPP-DEV: DEV_D[16:31]
342 */ 339 */
343 orion_write(MPP_0_7_CTRL, 0x00222203); 340 orion5x_write(MPP_0_7_CTRL, 0x00222203);
344 orion_write(MPP_8_15_CTRL, 0x44000000); 341 orion5x_write(MPP_8_15_CTRL, 0x44000000);
345 orion_write(MPP_16_19_CTRL, 0); 342 orion5x_write(MPP_16_19_CTRL, 0);
346 orion_write(MPP_DEV_CTRL, 0); 343 orion5x_write(MPP_DEV_CTRL, 0);
347 344
348 orion_gpio_set_valid_pins(0x00003fc3); 345 orion5x_gpio_set_valid_pins(0x00003fc3);
349 346
350 platform_add_devices(db88f5281_devs, ARRAY_SIZE(db88f5281_devs)); 347 platform_add_devices(db88f5281_devs, ARRAY_SIZE(db88f5281_devs));
351 i2c_register_board_info(0, &db88f5281_i2c_rtc, 1); 348 i2c_register_board_info(0, &db88f5281_i2c_rtc, 1);
352 orion_eth_init(&db88f5281_eth_data); 349 orion5x_eth_init(&db88f5281_eth_data);
353} 350}
354 351
355MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") 352MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
356 /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */ 353 /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */
357 .phys_io = ORION_REGS_PHYS_BASE, 354 .phys_io = ORION5X_REGS_PHYS_BASE,
358 .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xfffc, 355 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xfffc,
359 .boot_params = 0x00000100, 356 .boot_params = 0x00000100,
360 .init_machine = db88f5281_init, 357 .init_machine = db88f5281_init,
361 .map_io = orion_map_io, 358 .map_io = orion5x_map_io,
362 .init_irq = orion_init_irq, 359 .init_irq = orion5x_init_irq,
363 .timer = &orion_timer, 360 .timer = &orion5x_timer,
364MACHINE_END 361MACHINE_END
diff --git a/arch/arm/mach-orion/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 076e155ad510..d67790ef236e 100644
--- a/arch/arm/mach-orion/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-orion/dns323-setup.c 2 * arch/arm/mach-orion5x/dns323-setup.c
3 * 3 *
4 * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org> 4 * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
5 * 5 *
@@ -25,8 +25,7 @@
25#include <asm/gpio.h> 25#include <asm/gpio.h>
26#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
27#include <asm/mach/pci.h> 27#include <asm/mach/pci.h>
28#include <asm/arch/orion.h> 28#include <asm/arch/orion5x.h>
29#include <asm/arch/platform.h>
30#include "common.h" 29#include "common.h"
31 30
32#define DNS323_GPIO_LED_RIGHT_AMBER 1 31#define DNS323_GPIO_LED_RIGHT_AMBER 1
@@ -45,8 +44,8 @@
45static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 44static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
46{ 45{
47 /* PCI-E */ 46 /* PCI-E */
48 if (dev->bus->number == orion_pcie_local_bus_nr()) 47 if (dev->bus->number == orion5x_pcie_local_bus_nr())
49 return IRQ_ORION_PCIE0_INT; 48 return IRQ_ORION5X_PCIE0_INT;
50 49
51 pr_err("%s: requested mapping for unknown bus\n", __func__); 50 pr_err("%s: requested mapping for unknown bus\n", __func__);
52 51
@@ -56,8 +55,8 @@ static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
56static struct hw_pci dns323_pci __initdata = { 55static struct hw_pci dns323_pci __initdata = {
57 .nr_controllers = 1, 56 .nr_controllers = 1,
58 .swizzle = pci_std_swizzle, 57 .swizzle = pci_std_swizzle,
59 .setup = orion_pci_sys_setup, 58 .setup = orion5x_pci_sys_setup,
60 .scan = orion_pci_sys_scan_bus, 59 .scan = orion5x_pci_sys_scan_bus,
61 .map_irq = dns323_pci_map_irq, 60 .map_irq = dns323_pci_map_irq,
62}; 61};
63 62
@@ -247,27 +246,25 @@ static void dns323_power_off(void)
247static void __init dns323_init(void) 246static void __init dns323_init(void)
248{ 247{
249 /* Setup basic Orion functions. Need to be called early. */ 248 /* Setup basic Orion functions. Need to be called early. */
250 orion_init(); 249 orion5x_init();
251 250
252 /* setup flash mapping 251 /* setup flash mapping
253 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4 252 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
254 */ 253 */
255 orion_setup_cpu_win(ORION_DEV_BOOT, DNS323_NOR_BOOT_BASE, 254 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
256 DNS323_NOR_BOOT_SIZE, -1);
257 255
258 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIE 256 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIE
259 * 257 *
260 * Open a special address decode windows for the PCIE WA. 258 * Open a special address decode windows for the PCIE WA.
261 */ 259 */
262 orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); 260 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
263 orion_write(ORION_REGS_VIRT_BASE | 0x20070, 261 ORION5X_PCIE_WA_SIZE);
264 (0x7941 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16));
265 262
266 /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */ 263 /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */
267 orion_write(MPP_0_7_CTRL, 0); 264 orion5x_write(MPP_0_7_CTRL, 0);
268 orion_write(MPP_8_15_CTRL, 0); 265 orion5x_write(MPP_8_15_CTRL, 0);
269 orion_write(MPP_16_19_CTRL, 0); 266 orion5x_write(MPP_16_19_CTRL, 0);
270 orion_write(MPP_DEV_CTRL, 0); 267 orion5x_write(MPP_DEV_CTRL, 0);
271 268
272 /* Define used GPIO pins 269 /* Define used GPIO pins
273 270
@@ -290,7 +287,7 @@ static void __init dns323_init(void)
290 | 14 | Out | //unknown// 287 | 14 | Out | //unknown//
291 | 15 | Out | //unknown// 288 | 15 | Out | //unknown//
292 */ 289 */
293 orion_gpio_set_valid_pins(0x07f6); 290 orion5x_gpio_set_valid_pins(0x07f6);
294 291
295 /* register dns323 specific power-off method */ 292 /* register dns323 specific power-off method */
296 if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0) 293 if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
@@ -306,18 +303,18 @@ static void __init dns323_init(void)
306 i2c_register_board_info(0, dns323_i2c_devices, 303 i2c_register_board_info(0, dns323_i2c_devices,
307 ARRAY_SIZE(dns323_i2c_devices)); 304 ARRAY_SIZE(dns323_i2c_devices));
308 305
309 orion_eth_init(&dns323_eth_data); 306 orion5x_eth_init(&dns323_eth_data);
310} 307}
311 308
312/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */ 309/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
313MACHINE_START(DNS323, "D-Link DNS-323") 310MACHINE_START(DNS323, "D-Link DNS-323")
314 /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ 311 /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
315 .phys_io = ORION_REGS_PHYS_BASE, 312 .phys_io = ORION5X_REGS_PHYS_BASE,
316 .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, 313 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
317 .boot_params = 0x00000100, 314 .boot_params = 0x00000100,
318 .init_machine = dns323_init, 315 .init_machine = dns323_init,
319 .map_io = orion_map_io, 316 .map_io = orion5x_map_io,
320 .init_irq = orion_init_irq, 317 .init_irq = orion5x_init_irq,
321 .timer = &orion_timer, 318 .timer = &orion5x_timer,
322 .fixup = tag_fixup_mem32, 319 .fixup = tag_fixup_mem32,
323MACHINE_END 320MACHINE_END
diff --git a/arch/arm/mach-orion/gpio.c b/arch/arm/mach-orion5x/gpio.c
index f713818c66a3..8108c316c426 100644
--- a/arch/arm/mach-orion/gpio.c
+++ b/arch/arm/mach-orion5x/gpio.c
@@ -1,12 +1,12 @@
1/* 1/*
2 * arch/arm/mach-orion/gpio.c 2 * arch/arm/mach-orion5x/gpio.c
3 * 3 *
4 * GPIO functions for Marvell Orion System On Chip 4 * GPIO functions for Marvell Orion System On Chip
5 * 5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com> 6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
@@ -16,14 +16,15 @@
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18#include <asm/gpio.h> 18#include <asm/gpio.h>
19#include <asm/arch/orion.h> 19#include <asm/io.h>
20#include <asm/arch/orion5x.h>
20#include "common.h" 21#include "common.h"
21 22
22static DEFINE_SPINLOCK(gpio_lock); 23static DEFINE_SPINLOCK(gpio_lock);
23static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)]; 24static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)];
24static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */ 25static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */
25 26
26void __init orion_gpio_set_valid_pins(u32 pins) 27void __init orion5x_gpio_set_valid_pins(u32 pins)
27{ 28{
28 gpio_valid[0] = pins; 29 gpio_valid[0] = pins;
29} 30}
@@ -49,7 +50,7 @@ int gpio_direction_input(unsigned pin)
49 if (!gpio_label[pin]) 50 if (!gpio_label[pin])
50 gpio_label[pin] = "?"; 51 gpio_label[pin] = "?";
51 52
52 orion_setbits(GPIO_IO_CONF, 1 << pin); 53 orion5x_setbits(GPIO_IO_CONF, 1 << pin);
53 54
54 spin_unlock_irqrestore(&gpio_lock, flags); 55 spin_unlock_irqrestore(&gpio_lock, flags);
55 return 0; 56 return 0;
@@ -76,12 +77,12 @@ int gpio_direction_output(unsigned pin, int value)
76 gpio_label[pin] = "?"; 77 gpio_label[pin] = "?";
77 78
78 mask = 1 << pin; 79 mask = 1 << pin;
79 orion_clrbits(GPIO_BLINK_EN, mask); 80 orion5x_clrbits(GPIO_BLINK_EN, mask);
80 if (value) 81 if (value)
81 orion_setbits(GPIO_OUT, mask); 82 orion5x_setbits(GPIO_OUT, mask);
82 else 83 else
83 orion_clrbits(GPIO_OUT, mask); 84 orion5x_clrbits(GPIO_OUT, mask);
84 orion_clrbits(GPIO_IO_CONF, mask); 85 orion5x_clrbits(GPIO_IO_CONF, mask);
85 86
86 spin_unlock_irqrestore(&gpio_lock, flags); 87 spin_unlock_irqrestore(&gpio_lock, flags);
87 return 0; 88 return 0;
@@ -92,10 +93,10 @@ int gpio_get_value(unsigned pin)
92{ 93{
93 int val, mask = 1 << pin; 94 int val, mask = 1 << pin;
94 95
95 if (orion_read(GPIO_IO_CONF) & mask) 96 if (orion5x_read(GPIO_IO_CONF) & mask)
96 val = orion_read(GPIO_DATA_IN) ^ orion_read(GPIO_IN_POL); 97 val = orion5x_read(GPIO_DATA_IN) ^ orion5x_read(GPIO_IN_POL);
97 else 98 else
98 val = orion_read(GPIO_OUT); 99 val = orion5x_read(GPIO_OUT);
99 100
100 return val & mask; 101 return val & mask;
101} 102}
@@ -108,32 +109,32 @@ void gpio_set_value(unsigned pin, int value)
108 109
109 spin_lock_irqsave(&gpio_lock, flags); 110 spin_lock_irqsave(&gpio_lock, flags);
110 111
111 orion_clrbits(GPIO_BLINK_EN, mask); 112 orion5x_clrbits(GPIO_BLINK_EN, mask);
112 if (value) 113 if (value)
113 orion_setbits(GPIO_OUT, mask); 114 orion5x_setbits(GPIO_OUT, mask);
114 else 115 else
115 orion_clrbits(GPIO_OUT, mask); 116 orion5x_clrbits(GPIO_OUT, mask);
116 117
117 spin_unlock_irqrestore(&gpio_lock, flags); 118 spin_unlock_irqrestore(&gpio_lock, flags);
118} 119}
119EXPORT_SYMBOL(gpio_set_value); 120EXPORT_SYMBOL(gpio_set_value);
120 121
121void orion_gpio_set_blink(unsigned pin, int blink) 122void orion5x_gpio_set_blink(unsigned pin, int blink)
122{ 123{
123 unsigned long flags; 124 unsigned long flags;
124 int mask = 1 << pin; 125 int mask = 1 << pin;
125 126
126 spin_lock_irqsave(&gpio_lock, flags); 127 spin_lock_irqsave(&gpio_lock, flags);
127 128
128 orion_clrbits(GPIO_OUT, mask); 129 orion5x_clrbits(GPIO_OUT, mask);
129 if (blink) 130 if (blink)
130 orion_setbits(GPIO_BLINK_EN, mask); 131 orion5x_setbits(GPIO_BLINK_EN, mask);
131 else 132 else
132 orion_clrbits(GPIO_BLINK_EN, mask); 133 orion5x_clrbits(GPIO_BLINK_EN, mask);
133 134
134 spin_unlock_irqrestore(&gpio_lock, flags); 135 spin_unlock_irqrestore(&gpio_lock, flags);
135} 136}
136EXPORT_SYMBOL(orion_gpio_set_blink); 137EXPORT_SYMBOL(orion5x_gpio_set_blink);
137 138
138int gpio_request(unsigned pin, const char *label) 139int gpio_request(unsigned pin, const char *label)
139{ 140{
@@ -187,39 +188,39 @@ void gpio_display(void)
187 printk("GPIO, free\n"); 188 printk("GPIO, free\n");
188 } else { 189 } else {
189 printk("GPIO, used by %s, ", gpio_label[i]); 190 printk("GPIO, used by %s, ", gpio_label[i]);
190 if (orion_read(GPIO_IO_CONF) & (1 << i)) { 191 if (orion5x_read(GPIO_IO_CONF) & (1 << i)) {
191 printk("input, active %s, level %s, edge %s\n", 192 printk("input, active %s, level %s, edge %s\n",
192 ((orion_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high", 193 ((orion5x_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
193 ((orion_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked", 194 ((orion5x_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
194 ((orion_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked"); 195 ((orion5x_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
195 } else { 196 } else {
196 printk("output, val=%d\n", (orion_read(GPIO_OUT) >> i) & 1); 197 printk("output, val=%d\n", (orion5x_read(GPIO_OUT) >> i) & 1);
197 } 198 }
198 } 199 }
199 } 200 }
200 201
201 printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n", 202 printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n",
202 MPP_0_7_CTRL, orion_read(MPP_0_7_CTRL)); 203 MPP_0_7_CTRL, orion5x_read(MPP_0_7_CTRL));
203 printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n", 204 printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n",
204 MPP_8_15_CTRL, orion_read(MPP_8_15_CTRL)); 205 MPP_8_15_CTRL, orion5x_read(MPP_8_15_CTRL));
205 printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n", 206 printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n",
206 MPP_16_19_CTRL, orion_read(MPP_16_19_CTRL)); 207 MPP_16_19_CTRL, orion5x_read(MPP_16_19_CTRL));
207 printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n", 208 printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n",
208 MPP_DEV_CTRL, orion_read(MPP_DEV_CTRL)); 209 MPP_DEV_CTRL, orion5x_read(MPP_DEV_CTRL));
209 printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n", 210 printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n",
210 GPIO_OUT, orion_read(GPIO_OUT)); 211 GPIO_OUT, orion5x_read(GPIO_OUT));
211 printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n", 212 printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n",
212 GPIO_IO_CONF, orion_read(GPIO_IO_CONF)); 213 GPIO_IO_CONF, orion5x_read(GPIO_IO_CONF));
213 printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n", 214 printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n",
214 GPIO_BLINK_EN, orion_read(GPIO_BLINK_EN)); 215 GPIO_BLINK_EN, orion5x_read(GPIO_BLINK_EN));
215 printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n", 216 printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n",
216 GPIO_IN_POL, orion_read(GPIO_IN_POL)); 217 GPIO_IN_POL, orion5x_read(GPIO_IN_POL));
217 printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n", 218 printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n",
218 GPIO_DATA_IN, orion_read(GPIO_DATA_IN)); 219 GPIO_DATA_IN, orion5x_read(GPIO_DATA_IN));
219 printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n", 220 printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n",
220 GPIO_LEVEL_MASK, orion_read(GPIO_LEVEL_MASK)); 221 GPIO_LEVEL_MASK, orion5x_read(GPIO_LEVEL_MASK));
221 printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n", 222 printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n",
222 GPIO_EDGE_CAUSE, orion_read(GPIO_EDGE_CAUSE)); 223 GPIO_EDGE_CAUSE, orion5x_read(GPIO_EDGE_CAUSE));
223 printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n", 224 printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n",
224 GPIO_EDGE_MASK, orion_read(GPIO_EDGE_MASK)); 225 GPIO_EDGE_MASK, orion5x_read(GPIO_EDGE_MASK));
225} 226}
diff --git a/arch/arm/mach-orion/irq.c b/arch/arm/mach-orion5x/irq.c
index df7e12ad378b..dd21f38c5d37 100644
--- a/arch/arm/mach-orion/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -1,12 +1,12 @@
1/* 1/*
2 * arch/arm/mach-orion/irq.c 2 * arch/arm/mach-orion5x/irq.c
3 * 3 *
4 * Core IRQ functions for Marvell Orion System On Chip 4 * Core IRQ functions for Marvell Orion System On Chip
5 * 5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com> 6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
@@ -14,7 +14,9 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/gpio.h> 16#include <asm/gpio.h>
17#include <asm/arch/orion.h> 17#include <asm/io.h>
18#include <asm/arch/orion5x.h>
19#include <asm/plat-orion/irq.h>
18#include "common.h" 20#include "common.h"
19 21
20/***************************************************************************** 22/*****************************************************************************
@@ -42,46 +44,46 @@
42 * polarity LEVEL mask 44 * polarity LEVEL mask
43 * 45 *
44 ****************************************************************************/ 46 ****************************************************************************/
45static void orion_gpio_irq_ack(u32 irq) 47static void orion5x_gpio_irq_ack(u32 irq)
46{ 48{
47 int pin = irq_to_gpio(irq); 49 int pin = irq_to_gpio(irq);
48 if (irq_desc[irq].status & IRQ_LEVEL) 50 if (irq_desc[irq].status & IRQ_LEVEL)
49 /* 51 /*
50 * Mask bit for level interrupt 52 * Mask bit for level interrupt
51 */ 53 */
52 orion_clrbits(GPIO_LEVEL_MASK, 1 << pin); 54 orion5x_clrbits(GPIO_LEVEL_MASK, 1 << pin);
53 else 55 else
54 /* 56 /*
55 * Clear casue bit for egde interrupt 57 * Clear casue bit for egde interrupt
56 */ 58 */
57 orion_clrbits(GPIO_EDGE_CAUSE, 1 << pin); 59 orion5x_clrbits(GPIO_EDGE_CAUSE, 1 << pin);
58} 60}
59 61
60static void orion_gpio_irq_mask(u32 irq) 62static void orion5x_gpio_irq_mask(u32 irq)
61{ 63{
62 int pin = irq_to_gpio(irq); 64 int pin = irq_to_gpio(irq);
63 if (irq_desc[irq].status & IRQ_LEVEL) 65 if (irq_desc[irq].status & IRQ_LEVEL)
64 orion_clrbits(GPIO_LEVEL_MASK, 1 << pin); 66 orion5x_clrbits(GPIO_LEVEL_MASK, 1 << pin);
65 else 67 else
66 orion_clrbits(GPIO_EDGE_MASK, 1 << pin); 68 orion5x_clrbits(GPIO_EDGE_MASK, 1 << pin);
67} 69}
68 70
69static void orion_gpio_irq_unmask(u32 irq) 71static void orion5x_gpio_irq_unmask(u32 irq)
70{ 72{
71 int pin = irq_to_gpio(irq); 73 int pin = irq_to_gpio(irq);
72 if (irq_desc[irq].status & IRQ_LEVEL) 74 if (irq_desc[irq].status & IRQ_LEVEL)
73 orion_setbits(GPIO_LEVEL_MASK, 1 << pin); 75 orion5x_setbits(GPIO_LEVEL_MASK, 1 << pin);
74 else 76 else
75 orion_setbits(GPIO_EDGE_MASK, 1 << pin); 77 orion5x_setbits(GPIO_EDGE_MASK, 1 << pin);
76} 78}
77 79
78static int orion_gpio_set_irq_type(u32 irq, u32 type) 80static int orion5x_gpio_set_irq_type(u32 irq, u32 type)
79{ 81{
80 int pin = irq_to_gpio(irq); 82 int pin = irq_to_gpio(irq);
81 struct irq_desc *desc; 83 struct irq_desc *desc;
82 84
83 if ((orion_read(GPIO_IO_CONF) & (1 << pin)) == 0) { 85 if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) {
84 printk(KERN_ERR "orion_gpio_set_irq_type failed " 86 printk(KERN_ERR "orion5x_gpio_set_irq_type failed "
85 "(irq %d, pin %d).\n", irq, pin); 87 "(irq %d, pin %d).\n", irq, pin);
86 return -EINVAL; 88 return -EINVAL;
87 } 89 }
@@ -92,22 +94,22 @@ static int orion_gpio_set_irq_type(u32 irq, u32 type)
92 case IRQT_HIGH: 94 case IRQT_HIGH:
93 desc->handle_irq = handle_level_irq; 95 desc->handle_irq = handle_level_irq;
94 desc->status |= IRQ_LEVEL; 96 desc->status |= IRQ_LEVEL;
95 orion_clrbits(GPIO_IN_POL, (1 << pin)); 97 orion5x_clrbits(GPIO_IN_POL, (1 << pin));
96 break; 98 break;
97 case IRQT_LOW: 99 case IRQT_LOW:
98 desc->handle_irq = handle_level_irq; 100 desc->handle_irq = handle_level_irq;
99 desc->status |= IRQ_LEVEL; 101 desc->status |= IRQ_LEVEL;
100 orion_setbits(GPIO_IN_POL, (1 << pin)); 102 orion5x_setbits(GPIO_IN_POL, (1 << pin));
101 break; 103 break;
102 case IRQT_RISING: 104 case IRQT_RISING:
103 desc->handle_irq = handle_edge_irq; 105 desc->handle_irq = handle_edge_irq;
104 desc->status &= ~IRQ_LEVEL; 106 desc->status &= ~IRQ_LEVEL;
105 orion_clrbits(GPIO_IN_POL, (1 << pin)); 107 orion5x_clrbits(GPIO_IN_POL, (1 << pin));
106 break; 108 break;
107 case IRQT_FALLING: 109 case IRQT_FALLING:
108 desc->handle_irq = handle_edge_irq; 110 desc->handle_irq = handle_edge_irq;
109 desc->status &= ~IRQ_LEVEL; 111 desc->status &= ~IRQ_LEVEL;
110 orion_setbits(GPIO_IN_POL, (1 << pin)); 112 orion5x_setbits(GPIO_IN_POL, (1 << pin));
111 break; 113 break;
112 case IRQT_BOTHEDGE: 114 case IRQT_BOTHEDGE:
113 desc->handle_irq = handle_edge_irq; 115 desc->handle_irq = handle_edge_irq;
@@ -115,11 +117,11 @@ static int orion_gpio_set_irq_type(u32 irq, u32 type)
115 /* 117 /*
116 * set initial polarity based on current input level 118 * set initial polarity based on current input level
117 */ 119 */
118 if ((orion_read(GPIO_IN_POL) ^ orion_read(GPIO_DATA_IN)) 120 if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN))
119 & (1 << pin)) 121 & (1 << pin))
120 orion_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ 122 orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */
121 else 123 else
122 orion_clrbits(GPIO_IN_POL, (1 << pin)); /* rising */ 124 orion5x_clrbits(GPIO_IN_POL, (1 << pin)); /* rising */
123 125
124 break; 126 break;
125 default: 127 default:
@@ -133,22 +135,22 @@ static int orion_gpio_set_irq_type(u32 irq, u32 type)
133 return 0; 135 return 0;
134} 136}
135 137
136static struct irq_chip orion_gpio_irq_chip = { 138static struct irq_chip orion5x_gpio_irq_chip = {
137 .name = "Orion-IRQ-GPIO", 139 .name = "Orion-IRQ-GPIO",
138 .ack = orion_gpio_irq_ack, 140 .ack = orion5x_gpio_irq_ack,
139 .mask = orion_gpio_irq_mask, 141 .mask = orion5x_gpio_irq_mask,
140 .unmask = orion_gpio_irq_unmask, 142 .unmask = orion5x_gpio_irq_unmask,
141 .set_type = orion_gpio_set_irq_type, 143 .set_type = orion5x_gpio_set_irq_type,
142}; 144};
143 145
144static void orion_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 146static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
145{ 147{
146 u32 cause, offs, pin; 148 u32 cause, offs, pin;
147 149
148 BUG_ON(irq < IRQ_ORION_GPIO_0_7 || irq > IRQ_ORION_GPIO_24_31); 150 BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31);
149 offs = (irq - IRQ_ORION_GPIO_0_7) * 8; 151 offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8;
150 cause = (orion_read(GPIO_DATA_IN) & orion_read(GPIO_LEVEL_MASK)) | 152 cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) |
151 (orion_read(GPIO_EDGE_CAUSE) & orion_read(GPIO_EDGE_MASK)); 153 (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK));
152 154
153 for (pin = offs; pin < offs + 8; pin++) { 155 for (pin = offs; pin < offs + 8; pin++) {
154 if (cause & (1 << pin)) { 156 if (cause & (1 << pin)) {
@@ -156,16 +158,16 @@ static void orion_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
156 desc = irq_desc + irq; 158 desc = irq_desc + irq;
157 if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) { 159 if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
158 /* Swap polarity (race with GPIO line) */ 160 /* Swap polarity (race with GPIO line) */
159 u32 polarity = orion_read(GPIO_IN_POL); 161 u32 polarity = orion5x_read(GPIO_IN_POL);
160 polarity ^= 1 << pin; 162 polarity ^= 1 << pin;
161 orion_write(GPIO_IN_POL, polarity); 163 orion5x_write(GPIO_IN_POL, polarity);
162 } 164 }
163 desc_handle_irq(irq, desc); 165 desc_handle_irq(irq, desc);
164 } 166 }
165 } 167 }
166} 168}
167 169
168static void __init orion_init_gpio_irq(void) 170static void __init orion5x_init_gpio_irq(void)
169{ 171{
170 int i; 172 int i;
171 struct irq_desc *desc; 173 struct irq_desc *desc;
@@ -173,69 +175,37 @@ static void __init orion_init_gpio_irq(void)
173 /* 175 /*
174 * Mask and clear GPIO IRQ interrupts 176 * Mask and clear GPIO IRQ interrupts
175 */ 177 */
176 orion_write(GPIO_LEVEL_MASK, 0x0); 178 orion5x_write(GPIO_LEVEL_MASK, 0x0);
177 orion_write(GPIO_EDGE_MASK, 0x0); 179 orion5x_write(GPIO_EDGE_MASK, 0x0);
178 orion_write(GPIO_EDGE_CAUSE, 0x0); 180 orion5x_write(GPIO_EDGE_CAUSE, 0x0);
179 181
180 /* 182 /*
181 * Register chained level handlers for GPIO IRQs by default. 183 * Register chained level handlers for GPIO IRQs by default.
182 * User can use set_type() if he wants to use edge types handlers. 184 * User can use set_type() if he wants to use edge types handlers.
183 */ 185 */
184 for (i = IRQ_ORION_GPIO_START; i < NR_IRQS; i++) { 186 for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) {
185 set_irq_chip(i, &orion_gpio_irq_chip); 187 set_irq_chip(i, &orion5x_gpio_irq_chip);
186 set_irq_handler(i, handle_level_irq); 188 set_irq_handler(i, handle_level_irq);
187 desc = irq_desc + i; 189 desc = irq_desc + i;
188 desc->status |= IRQ_LEVEL; 190 desc->status |= IRQ_LEVEL;
189 set_irq_flags(i, IRQF_VALID); 191 set_irq_flags(i, IRQF_VALID);
190 } 192 }
191 set_irq_chained_handler(IRQ_ORION_GPIO_0_7, orion_gpio_irq_handler); 193 set_irq_chained_handler(IRQ_ORION5X_GPIO_0_7, orion5x_gpio_irq_handler);
192 set_irq_chained_handler(IRQ_ORION_GPIO_8_15, orion_gpio_irq_handler); 194 set_irq_chained_handler(IRQ_ORION5X_GPIO_8_15, orion5x_gpio_irq_handler);
193 set_irq_chained_handler(IRQ_ORION_GPIO_16_23, orion_gpio_irq_handler); 195 set_irq_chained_handler(IRQ_ORION5X_GPIO_16_23, orion5x_gpio_irq_handler);
194 set_irq_chained_handler(IRQ_ORION_GPIO_24_31, orion_gpio_irq_handler); 196 set_irq_chained_handler(IRQ_ORION5X_GPIO_24_31, orion5x_gpio_irq_handler);
195} 197}
196 198
197/***************************************************************************** 199/*****************************************************************************
198 * Orion Main IRQ 200 * Orion Main IRQ
199 ****************************************************************************/ 201 ****************************************************************************/
200static void orion_main_irq_mask(u32 irq) 202static void __init orion5x_init_main_irq(void)
201{ 203{
202 orion_clrbits(MAIN_IRQ_MASK, 1 << irq); 204 orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK);
203} 205}
204 206
205static void orion_main_irq_unmask(u32 irq) 207void __init orion5x_init_irq(void)
206{ 208{
207 orion_setbits(MAIN_IRQ_MASK, 1 << irq); 209 orion5x_init_main_irq();
208} 210 orion5x_init_gpio_irq();
209
210static struct irq_chip orion_main_irq_chip = {
211 .name = "Orion-IRQ-Main",
212 .ack = orion_main_irq_mask,
213 .mask = orion_main_irq_mask,
214 .unmask = orion_main_irq_unmask,
215};
216
217static void __init orion_init_main_irq(void)
218{
219 int i;
220
221 /*
222 * Mask and clear Main IRQ interrupts
223 */
224 orion_write(MAIN_IRQ_MASK, 0x0);
225 orion_write(MAIN_IRQ_CAUSE, 0x0);
226
227 /*
228 * Register level handler for Main IRQs
229 */
230 for (i = 0; i < IRQ_ORION_GPIO_START; i++) {
231 set_irq_chip(i, &orion_main_irq_chip);
232 set_irq_handler(i, handle_level_irq);
233 set_irq_flags(i, IRQF_VALID);
234 }
235}
236
237void __init orion_init_irq(void)
238{
239 orion_init_main_irq();
240 orion_init_gpio_irq();
241} 211}
diff --git a/arch/arm/mach-orion/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index 785a07bdf1e2..91413455beba 100644
--- a/arch/arm/mach-orion/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -1,10 +1,10 @@
1/* 1/*
2 * arch/arm/mach-orion/kurobox_pro-setup.c 2 * arch/arm/mach-orion5x/kurobox_pro-setup.c
3 * 3 *
4 * Maintainer: Ronen Shitrit <rshitrit@marvell.com> 4 * Maintainer: Ronen Shitrit <rshitrit@marvell.com>
5 * 5 *
6 * This file is licensed under the terms of the GNU General Public 6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10 10
@@ -22,8 +22,8 @@
22#include <asm/gpio.h> 22#include <asm/gpio.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25#include <asm/arch/orion.h> 25#include <asm/arch/orion5x.h>
26#include <asm/arch/platform.h> 26#include <asm/plat-orion/orion_nand.h>
27#include "common.h" 27#include "common.h"
28 28
29/***************************************************************************** 29/*****************************************************************************
@@ -123,8 +123,8 @@ static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
123 /* 123 /*
124 * PCI isn't used on the Kuro 124 * PCI isn't used on the Kuro
125 */ 125 */
126 if (dev->bus->number == orion_pcie_local_bus_nr()) 126 if (dev->bus->number == orion5x_pcie_local_bus_nr())
127 return IRQ_ORION_PCIE0_INT; 127 return IRQ_ORION5X_PCIE0_INT;
128 else 128 else
129 printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n"); 129 printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
130 130
@@ -134,8 +134,8 @@ static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
134static struct hw_pci kurobox_pro_pci __initdata = { 134static struct hw_pci kurobox_pro_pci __initdata = {
135 .nr_controllers = 1, 135 .nr_controllers = 1,
136 .swizzle = pci_std_swizzle, 136 .swizzle = pci_std_swizzle,
137 .setup = orion_pci_sys_setup, 137 .setup = orion5x_pci_sys_setup,
138 .scan = orion_pci_sys_scan_bus, 138 .scan = orion5x_pci_sys_scan_bus,
139 .map_irq = kurobox_pro_pci_map_irq, 139 .map_irq = kurobox_pro_pci_map_irq,
140}; 140};
141 141
@@ -178,31 +178,25 @@ static struct mv_sata_platform_data kurobox_pro_sata_data = {
178 * General Setup 178 * General Setup
179 ****************************************************************************/ 179 ****************************************************************************/
180 180
181static struct platform_device *kurobox_pro_devices[] __initdata = {
182 &kurobox_pro_nor_flash,
183 &kurobox_pro_nand_flash,
184};
185
186static void __init kurobox_pro_init(void) 181static void __init kurobox_pro_init(void)
187{ 182{
188 /* 183 /*
189 * Setup basic Orion functions. Need to be called early. 184 * Setup basic Orion functions. Need to be called early.
190 */ 185 */
191 orion_init(); 186 orion5x_init();
192 187
193 /* 188 /*
194 * Setup the CPU address decode windows for our devices 189 * Setup the CPU address decode windows for our devices
195 */ 190 */
196 orion_setup_cpu_win(ORION_DEV_BOOT, KUROBOX_PRO_NOR_BOOT_BASE, 191 orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
197 KUROBOX_PRO_NOR_BOOT_SIZE, -1); 192 KUROBOX_PRO_NOR_BOOT_SIZE);
198 orion_setup_cpu_win(ORION_DEV0, KUROBOX_PRO_NAND_BASE, 193 orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE);
199 KUROBOX_PRO_NAND_SIZE, -1); 194
200 /* 195 /*
201 * Open a special address decode windows for the PCIE WA. 196 * Open a special address decode windows for the PCIE WA.
202 */ 197 */
203 orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); 198 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
204 orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | 199 ORION5X_PCIE_WA_SIZE);
205 (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16));
206 200
207 /* 201 /*
208 * Setup Multiplexing Pins -- 202 * Setup Multiplexing Pins --
@@ -219,26 +213,44 @@ static void __init kurobox_pro_init(void)
219 * MPP[15] SATA 1 active indication 213 * MPP[15] SATA 1 active indication
220 * MPP[16-19] Not used 214 * MPP[16-19] Not used
221 */ 215 */
222 orion_write(MPP_0_7_CTRL, 0x44220003); 216 orion5x_write(MPP_0_7_CTRL, 0x44220003);
223 orion_write(MPP_8_15_CTRL, 0x55550000); 217 orion5x_write(MPP_8_15_CTRL, 0x55550000);
224 orion_write(MPP_16_19_CTRL, 0x0); 218 orion5x_write(MPP_16_19_CTRL, 0x0);
225 219
226 orion_gpio_set_valid_pins(0x0000000c); 220 orion5x_gpio_set_valid_pins(0x0000000c);
227 221
228 platform_add_devices(kurobox_pro_devices, ARRAY_SIZE(kurobox_pro_devices)); 222 platform_device_register(&kurobox_pro_nor_flash);
223 if (machine_is_kurobox_pro())
224 platform_device_register(&kurobox_pro_nand_flash);
229 i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); 225 i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
230 orion_eth_init(&kurobox_pro_eth_data); 226 orion5x_eth_init(&kurobox_pro_eth_data);
231 orion_sata_init(&kurobox_pro_sata_data); 227 orion5x_sata_init(&kurobox_pro_sata_data);
232} 228}
233 229
230#ifdef CONFIG_MACH_KUROBOX_PRO
234MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") 231MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
235 /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ 232 /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */
236 .phys_io = ORION_REGS_PHYS_BASE, 233 .phys_io = ORION5X_REGS_PHYS_BASE,
237 .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, 234 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
235 .boot_params = 0x00000100,
236 .init_machine = kurobox_pro_init,
237 .map_io = orion5x_map_io,
238 .init_irq = orion5x_init_irq,
239 .timer = &orion5x_timer,
240 .fixup = tag_fixup_mem32,
241MACHINE_END
242#endif
243
244#ifdef CONFIG_MACH_LINKSTATION_PRO
245MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
246 /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
247 .phys_io = ORION5X_REGS_PHYS_BASE,
248 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
238 .boot_params = 0x00000100, 249 .boot_params = 0x00000100,
239 .init_machine = kurobox_pro_init, 250 .init_machine = kurobox_pro_init,
240 .map_io = orion_map_io, 251 .map_io = orion5x_map_io,
241 .init_irq = orion_init_irq, 252 .init_irq = orion5x_init_irq,
242 .timer = &orion_timer, 253 .timer = &orion5x_timer,
243 .fixup = tag_fixup_mem32, 254 .fixup = tag_fixup_mem32,
244MACHINE_END 255MACHINE_END
256#endif
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
new file mode 100644
index 000000000000..fdf99fca85b3
--- /dev/null
+++ b/arch/arm/mach-orion5x/pci.c
@@ -0,0 +1,559 @@
1/*
2 * arch/arm/mach-orion5x/pci.c
3 *
4 * PCI and PCIe functions for Marvell Orion System On Chip
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/pci.h>
15#include <linux/mbus.h>
16#include <asm/mach/pci.h>
17#include <asm/plat-orion/pcie.h>
18#include "common.h"
19
20/*****************************************************************************
21 * Orion has one PCIe controller and one PCI controller.
22 *
23 * Note1: The local PCIe bus number is '0'. The local PCI bus number
24 * follows the scanned PCIe bridged busses, if any.
25 *
26 * Note2: It is possible for PCI/PCIe agents to access many subsystem's
27 * space, by configuring BARs and Address Decode Windows, e.g. flashes on
28 * device bus, Orion registers, etc. However this code only enable the
29 * access to DDR banks.
30 ****************************************************************************/
31
32
33/*****************************************************************************
34 * PCIe controller
35 ****************************************************************************/
36#define PCIE_BASE ((void __iomem *)ORION5X_PCIE_VIRT_BASE)
37
38void __init orion5x_pcie_id(u32 *dev, u32 *rev)
39{
40 *dev = orion_pcie_dev_id(PCIE_BASE);
41 *rev = orion_pcie_rev(PCIE_BASE);
42}
43
44int __init orion5x_pcie_local_bus_nr(void)
45{
46 return orion_pcie_get_local_bus_nr(PCIE_BASE);
47}
48
49static int pcie_valid_config(int bus, int dev)
50{
51 /*
52 * Don't go out when trying to access --
53 * 1. nonexisting device on local bus
54 * 2. where there's no device connected (no link)
55 */
56 if (bus == 0 && dev == 0)
57 return 1;
58
59 if (!orion_pcie_link_up(PCIE_BASE))
60 return 0;
61
62 if (bus == 0 && dev != 1)
63 return 0;
64
65 return 1;
66}
67
68
69/*
70 * PCIe config cycles are done by programming the PCIE_CONF_ADDR register
71 * and then reading the PCIE_CONF_DATA register. Need to make sure these
72 * transactions are atomic.
73 */
74static DEFINE_SPINLOCK(orion5x_pcie_lock);
75
76static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
77 int size, u32 *val)
78{
79 unsigned long flags;
80 int ret;
81
82 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
83 *val = 0xffffffff;
84 return PCIBIOS_DEVICE_NOT_FOUND;
85 }
86
87 spin_lock_irqsave(&orion5x_pcie_lock, flags);
88 ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val);
89 spin_unlock_irqrestore(&orion5x_pcie_lock, flags);
90
91 return ret;
92}
93
94static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn,
95 int where, int size, u32 *val)
96{
97 int ret;
98
99 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
100 *val = 0xffffffff;
101 return PCIBIOS_DEVICE_NOT_FOUND;
102 }
103
104 /*
105 * We only support access to the non-extended configuration
106 * space when using the WA access method (or we would have to
107 * sacrifice 256M of CPU virtual address space.)
108 */
109 if (where >= 0x100) {
110 *val = 0xffffffff;
111 return PCIBIOS_DEVICE_NOT_FOUND;
112 }
113
114 ret = orion_pcie_rd_conf_wa((void __iomem *)ORION5X_PCIE_WA_VIRT_BASE,
115 bus, devfn, where, size, val);
116
117 return ret;
118}
119
120static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
121 int where, int size, u32 val)
122{
123 unsigned long flags;
124 int ret;
125
126 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0)
127 return PCIBIOS_DEVICE_NOT_FOUND;
128
129 spin_lock_irqsave(&orion5x_pcie_lock, flags);
130 ret = orion_pcie_wr_conf(PCIE_BASE, bus, devfn, where, size, val);
131 spin_unlock_irqrestore(&orion5x_pcie_lock, flags);
132
133 return ret;
134}
135
136static struct pci_ops pcie_ops = {
137 .read = pcie_rd_conf,
138 .write = pcie_wr_conf,
139};
140
141
142static int __init pcie_setup(struct pci_sys_data *sys)
143{
144 struct resource *res;
145 int dev;
146
147 /*
148 * Generic PCIe unit setup.
149 */
150 orion_pcie_setup(PCIE_BASE, &orion5x_mbus_dram_info);
151
152 /*
153 * Check whether to apply Orion-1/Orion-NAS PCIe config
154 * read transaction workaround.
155 */
156 dev = orion_pcie_dev_id(PCIE_BASE);
157 if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
158 printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config "
159 "read transaction workaround\n");
160 pcie_ops.read = pcie_rd_conf_wa;
161 }
162
163 /*
164 * Request resources.
165 */
166 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
167 if (!res)
168 panic("pcie_setup unable to alloc resources");
169
170 /*
171 * IORESOURCE_IO
172 */
173 res[0].name = "PCIe I/O Space";
174 res[0].flags = IORESOURCE_IO;
175 res[0].start = ORION5X_PCIE_IO_BUS_BASE;
176 res[0].end = res[0].start + ORION5X_PCIE_IO_SIZE - 1;
177 if (request_resource(&ioport_resource, &res[0]))
178 panic("Request PCIe IO resource failed\n");
179 sys->resource[0] = &res[0];
180
181 /*
182 * IORESOURCE_MEM
183 */
184 res[1].name = "PCIe Memory Space";
185 res[1].flags = IORESOURCE_MEM;
186 res[1].start = ORION5X_PCIE_MEM_PHYS_BASE;
187 res[1].end = res[1].start + ORION5X_PCIE_MEM_SIZE - 1;
188 if (request_resource(&iomem_resource, &res[1]))
189 panic("Request PCIe Memory resource failed\n");
190 sys->resource[1] = &res[1];
191
192 sys->resource[2] = NULL;
193 sys->io_offset = 0;
194
195 return 1;
196}
197
198/*****************************************************************************
199 * PCI controller
200 ****************************************************************************/
201#define PCI_MODE ORION5X_PCI_REG(0xd00)
202#define PCI_CMD ORION5X_PCI_REG(0xc00)
203#define PCI_P2P_CONF ORION5X_PCI_REG(0x1d14)
204#define PCI_CONF_ADDR ORION5X_PCI_REG(0xc78)
205#define PCI_CONF_DATA ORION5X_PCI_REG(0xc7c)
206
207/*
208 * PCI_MODE bits
209 */
210#define PCI_MODE_64BIT (1 << 2)
211#define PCI_MODE_PCIX ((1 << 4) | (1 << 5))
212
213/*
214 * PCI_CMD bits
215 */
216#define PCI_CMD_HOST_REORDER (1 << 29)
217
218/*
219 * PCI_P2P_CONF bits
220 */
221#define PCI_P2P_BUS_OFFS 16
222#define PCI_P2P_BUS_MASK (0xff << PCI_P2P_BUS_OFFS)
223#define PCI_P2P_DEV_OFFS 24
224#define PCI_P2P_DEV_MASK (0x1f << PCI_P2P_DEV_OFFS)
225
226/*
227 * PCI_CONF_ADDR bits
228 */
229#define PCI_CONF_REG(reg) ((reg) & 0xfc)
230#define PCI_CONF_FUNC(func) (((func) & 0x3) << 8)
231#define PCI_CONF_DEV(dev) (((dev) & 0x1f) << 11)
232#define PCI_CONF_BUS(bus) (((bus) & 0xff) << 16)
233#define PCI_CONF_ADDR_EN (1 << 31)
234
235/*
236 * Internal configuration space
237 */
238#define PCI_CONF_FUNC_STAT_CMD 0
239#define PCI_CONF_REG_STAT_CMD 4
240#define PCIX_STAT 0x64
241#define PCIX_STAT_BUS_OFFS 8
242#define PCIX_STAT_BUS_MASK (0xff << PCIX_STAT_BUS_OFFS)
243
244/*
245 * PCI Address Decode Windows registers
246 */
247#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
248 ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
249 ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
250 ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
251#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
252 ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
253 ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
254 ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
255#define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
256#define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
257
258/*
259 * PCI configuration helpers for BAR settings
260 */
261#define PCI_CONF_FUNC_BAR_CS(n) ((n) >> 1)
262#define PCI_CONF_REG_BAR_LO_CS(n) (((n) & 1) ? 0x18 : 0x10)
263#define PCI_CONF_REG_BAR_HI_CS(n) (((n) & 1) ? 0x1c : 0x14)
264
265/*
266 * PCI config cycles are done by programming the PCI_CONF_ADDR register
267 * and then reading the PCI_CONF_DATA register. Need to make sure these
268 * transactions are atomic.
269 */
270static DEFINE_SPINLOCK(orion5x_pci_lock);
271
272int orion5x_pci_local_bus_nr(void)
273{
274 u32 conf = orion5x_read(PCI_P2P_CONF);
275 return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
276}
277
278static int orion5x_pci_hw_rd_conf(int bus, int dev, u32 func,
279 u32 where, u32 size, u32 *val)
280{
281 unsigned long flags;
282 spin_lock_irqsave(&orion5x_pci_lock, flags);
283
284 orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
285 PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
286 PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
287
288 *val = orion5x_read(PCI_CONF_DATA);
289
290 if (size == 1)
291 *val = (*val >> (8*(where & 0x3))) & 0xff;
292 else if (size == 2)
293 *val = (*val >> (8*(where & 0x3))) & 0xffff;
294
295 spin_unlock_irqrestore(&orion5x_pci_lock, flags);
296
297 return PCIBIOS_SUCCESSFUL;
298}
299
300static int orion5x_pci_hw_wr_conf(int bus, int dev, u32 func,
301 u32 where, u32 size, u32 val)
302{
303 unsigned long flags;
304 int ret = PCIBIOS_SUCCESSFUL;
305
306 spin_lock_irqsave(&orion5x_pci_lock, flags);
307
308 orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
309 PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
310 PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
311
312 if (size == 4) {
313 __raw_writel(val, PCI_CONF_DATA);
314 } else if (size == 2) {
315 __raw_writew(val, PCI_CONF_DATA + (where & 0x3));
316 } else if (size == 1) {
317 __raw_writeb(val, PCI_CONF_DATA + (where & 0x3));
318 } else {
319 ret = PCIBIOS_BAD_REGISTER_NUMBER;
320 }
321
322 spin_unlock_irqrestore(&orion5x_pci_lock, flags);
323
324 return ret;
325}
326
327static int orion5x_pci_rd_conf(struct pci_bus *bus, u32 devfn,
328 int where, int size, u32 *val)
329{
330 /*
331 * Don't go out for local device
332 */
333 if (bus->number == orion5x_pci_local_bus_nr() &&
334 PCI_SLOT(devfn) == 0 && PCI_FUNC(devfn) != 0) {
335 *val = 0xffffffff;
336 return PCIBIOS_DEVICE_NOT_FOUND;
337 }
338
339 return orion5x_pci_hw_rd_conf(bus->number, PCI_SLOT(devfn),
340 PCI_FUNC(devfn), where, size, val);
341}
342
343static int orion5x_pci_wr_conf(struct pci_bus *bus, u32 devfn,
344 int where, int size, u32 val)
345{
346 if (bus->number == orion5x_pci_local_bus_nr() &&
347 PCI_SLOT(devfn) == 0 && PCI_FUNC(devfn) != 0)
348 return PCIBIOS_DEVICE_NOT_FOUND;
349
350 return orion5x_pci_hw_wr_conf(bus->number, PCI_SLOT(devfn),
351 PCI_FUNC(devfn), where, size, val);
352}
353
354static struct pci_ops pci_ops = {
355 .read = orion5x_pci_rd_conf,
356 .write = orion5x_pci_wr_conf,
357};
358
359static void __init orion5x_pci_set_bus_nr(int nr)
360{
361 u32 p2p = orion5x_read(PCI_P2P_CONF);
362
363 if (orion5x_read(PCI_MODE) & PCI_MODE_PCIX) {
364 /*
365 * PCI-X mode
366 */
367 u32 pcix_status, bus, dev;
368 bus = (p2p & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS;
369 dev = (p2p & PCI_P2P_DEV_MASK) >> PCI_P2P_DEV_OFFS;
370 orion5x_pci_hw_rd_conf(bus, dev, 0, PCIX_STAT, 4, &pcix_status);
371 pcix_status &= ~PCIX_STAT_BUS_MASK;
372 pcix_status |= (nr << PCIX_STAT_BUS_OFFS);
373 orion5x_pci_hw_wr_conf(bus, dev, 0, PCIX_STAT, 4, pcix_status);
374 } else {
375 /*
376 * PCI Conventional mode
377 */
378 p2p &= ~PCI_P2P_BUS_MASK;
379 p2p |= (nr << PCI_P2P_BUS_OFFS);
380 orion5x_write(PCI_P2P_CONF, p2p);
381 }
382}
383
384static void __init orion5x_pci_master_slave_enable(void)
385{
386 int bus_nr, func, reg;
387 u32 val;
388
389 bus_nr = orion5x_pci_local_bus_nr();
390 func = PCI_CONF_FUNC_STAT_CMD;
391 reg = PCI_CONF_REG_STAT_CMD;
392 orion5x_pci_hw_rd_conf(bus_nr, 0, func, reg, 4, &val);
393 val |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
394 orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7);
395}
396
397static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
398{
399 u32 win_enable;
400 int bus;
401 int i;
402
403 /*
404 * First, disable windows.
405 */
406 win_enable = 0xffffffff;
407 orion5x_write(PCI_BAR_ENABLE, win_enable);
408
409 /*
410 * Setup windows for DDR banks.
411 */
412 bus = orion5x_pci_local_bus_nr();
413
414 for (i = 0; i < dram->num_cs; i++) {
415 struct mbus_dram_window *cs = dram->cs + i;
416 u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index);
417 u32 reg;
418 u32 val;
419
420 /*
421 * Write DRAM bank base address register.
422 */
423 reg = PCI_CONF_REG_BAR_LO_CS(cs->cs_index);
424 orion5x_pci_hw_rd_conf(bus, 0, func, reg, 4, &val);
425 val = (cs->base & 0xfffff000) | (val & 0xfff);
426 orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, val);
427
428 /*
429 * Write DRAM bank size register.
430 */
431 reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index);
432 orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0);
433 orion5x_write(PCI_BAR_SIZE_DDR_CS(cs->cs_index),
434 (cs->size - 1) & 0xfffff000);
435 orion5x_write(PCI_BAR_REMAP_DDR_CS(cs->cs_index),
436 cs->base & 0xfffff000);
437
438 /*
439 * Enable decode window for this chip select.
440 */
441 win_enable &= ~(1 << cs->cs_index);
442 }
443
444 /*
445 * Re-enable decode windows.
446 */
447 orion5x_write(PCI_BAR_ENABLE, win_enable);
448
449 /*
450 * Disable automatic update of address remaping when writing to BARs.
451 */
452 orion5x_setbits(PCI_ADDR_DECODE_CTRL, 1);
453}
454
455static int __init pci_setup(struct pci_sys_data *sys)
456{
457 struct resource *res;
458
459 /*
460 * Point PCI unit MBUS decode windows to DRAM space.
461 */
462 orion5x_setup_pci_wins(&orion5x_mbus_dram_info);
463
464 /*
465 * Master + Slave enable
466 */
467 orion5x_pci_master_slave_enable();
468
469 /*
470 * Force ordering
471 */
472 orion5x_setbits(PCI_CMD, PCI_CMD_HOST_REORDER);
473
474 /*
475 * Request resources
476 */
477 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
478 if (!res)
479 panic("pci_setup unable to alloc resources");
480
481 /*
482 * IORESOURCE_IO
483 */
484 res[0].name = "PCI I/O Space";
485 res[0].flags = IORESOURCE_IO;
486 res[0].start = ORION5X_PCI_IO_BUS_BASE;
487 res[0].end = res[0].start + ORION5X_PCI_IO_SIZE - 1;
488 if (request_resource(&ioport_resource, &res[0]))
489 panic("Request PCI IO resource failed\n");
490 sys->resource[0] = &res[0];
491
492 /*
493 * IORESOURCE_MEM
494 */
495 res[1].name = "PCI Memory Space";
496 res[1].flags = IORESOURCE_MEM;
497 res[1].start = ORION5X_PCI_MEM_PHYS_BASE;
498 res[1].end = res[1].start + ORION5X_PCI_MEM_SIZE - 1;
499 if (request_resource(&iomem_resource, &res[1]))
500 panic("Request PCI Memory resource failed\n");
501 sys->resource[1] = &res[1];
502
503 sys->resource[2] = NULL;
504 sys->io_offset = 0;
505
506 return 1;
507}
508
509
510/*****************************************************************************
511 * General PCIe + PCI
512 ****************************************************************************/
513static void __devinit rc_pci_fixup(struct pci_dev *dev)
514{
515 /*
516 * Prevent enumeration of root complex.
517 */
518 if (dev->bus->parent == NULL && dev->devfn == 0) {
519 int i;
520
521 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
522 dev->resource[i].start = 0;
523 dev->resource[i].end = 0;
524 dev->resource[i].flags = 0;
525 }
526 }
527}
528DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
529
530int __init orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys)
531{
532 int ret = 0;
533
534 if (nr == 0) {
535 orion_pcie_set_local_bus_nr(PCIE_BASE, sys->busnr);
536 ret = pcie_setup(sys);
537 } else if (nr == 1) {
538 orion5x_pci_set_bus_nr(sys->busnr);
539 ret = pci_setup(sys);
540 }
541
542 return ret;
543}
544
545struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys)
546{
547 struct pci_bus *bus;
548
549 if (nr == 0) {
550 bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
551 } else if (nr == 1) {
552 bus = pci_scan_bus(sys->busnr, &pci_ops, sys);
553 } else {
554 bus = NULL;
555 BUG();
556 }
557
558 return bus;
559}
diff --git a/arch/arm/mach-orion/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index e851b8ca5ac6..37e8b2dc3ed5 100644
--- a/arch/arm/mach-orion/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -1,12 +1,12 @@
1/* 1/*
2 * arch/arm/mach-orion/rd88f5182-setup.c 2 * arch/arm/mach-orion5x/rd88f5182-setup.c
3 * 3 *
4 * Marvell Orion-NAS Reference Design Setup 4 * Marvell Orion-NAS Reference Design Setup
5 * 5 *
6 * Maintainer: Ronen Shitrit <rshitrit@marvell.com> 6 * Maintainer: Ronen Shitrit <rshitrit@marvell.com>
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
@@ -24,8 +24,7 @@
24#include <asm/leds.h> 24#include <asm/leds.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion.h> 27#include <asm/arch/orion5x.h>
28#include <asm/arch/platform.h>
29#include "common.h" 28#include "common.h"
30 29
31/***************************************************************************** 30/*****************************************************************************
@@ -176,8 +175,8 @@ static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
176 /* 175 /*
177 * PCI-E isn't used on the RD2 176 * PCI-E isn't used on the RD2
178 */ 177 */
179 if (dev->bus->number == orion_pcie_local_bus_nr()) 178 if (dev->bus->number == orion5x_pcie_local_bus_nr())
180 return IRQ_ORION_PCIE0_INT; 179 return IRQ_ORION5X_PCIE0_INT;
181 180
182 /* 181 /*
183 * PCI IRQs are connected via GPIOs 182 * PCI IRQs are connected via GPIOs
@@ -197,8 +196,8 @@ static struct hw_pci rd88f5182_pci __initdata = {
197 .nr_controllers = 2, 196 .nr_controllers = 2,
198 .preinit = rd88f5182_pci_preinit, 197 .preinit = rd88f5182_pci_preinit,
199 .swizzle = pci_std_swizzle, 198 .swizzle = pci_std_swizzle,
200 .setup = orion_pci_sys_setup, 199 .setup = orion5x_pci_sys_setup,
201 .scan = orion_pci_sys_scan_bus, 200 .scan = orion5x_pci_sys_scan_bus,
202 .map_irq = rd88f5182_pci_map_irq, 201 .map_irq = rd88f5182_pci_map_irq,
203}; 202};
204 203
@@ -250,22 +249,20 @@ static void __init rd88f5182_init(void)
250 /* 249 /*
251 * Setup basic Orion functions. Need to be called early. 250 * Setup basic Orion functions. Need to be called early.
252 */ 251 */
253 orion_init(); 252 orion5x_init();
254 253
255 /* 254 /*
256 * Setup the CPU address decode windows for our devices 255 * Setup the CPU address decode windows for our devices
257 */ 256 */
258 orion_setup_cpu_win(ORION_DEV_BOOT, RD88F5182_NOR_BOOT_BASE, 257 orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
259 RD88F5182_NOR_BOOT_SIZE, -1); 258 RD88F5182_NOR_BOOT_SIZE);
260 orion_setup_cpu_win(ORION_DEV1, RD88F5182_NOR_BASE, 259 orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
261 RD88F5182_NOR_SIZE, -1);
262 260
263 /* 261 /*
264 * Open a special address decode windows for the PCIE WA. 262 * Open a special address decode windows for the PCIE WA.
265 */ 263 */
266 orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); 264 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
267 orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | 265 ORION5X_PCIE_WA_SIZE);
268 (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16));
269 266
270 /* 267 /*
271 * Setup Multiplexing Pins -- 268 * Setup Multiplexing Pins --
@@ -291,25 +288,25 @@ static void __init rd88f5182_init(void)
291 * MPP[25] USB 0 over current enable 288 * MPP[25] USB 0 over current enable
292 */ 289 */
293 290
294 orion_write(MPP_0_7_CTRL, 0x00000003); 291 orion5x_write(MPP_0_7_CTRL, 0x00000003);
295 orion_write(MPP_8_15_CTRL, 0x55550000); 292 orion5x_write(MPP_8_15_CTRL, 0x55550000);
296 orion_write(MPP_16_19_CTRL, 0x5555); 293 orion5x_write(MPP_16_19_CTRL, 0x5555);
297 294
298 orion_gpio_set_valid_pins(0x000000fb); 295 orion5x_gpio_set_valid_pins(0x000000fb);
299 296
300 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); 297 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
301 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); 298 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
302 orion_eth_init(&rd88f5182_eth_data); 299 orion5x_eth_init(&rd88f5182_eth_data);
303 orion_sata_init(&rd88f5182_sata_data); 300 orion5x_sata_init(&rd88f5182_sata_data);
304} 301}
305 302
306MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") 303MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
307 /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ 304 /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */
308 .phys_io = ORION_REGS_PHYS_BASE, 305 .phys_io = ORION5X_REGS_PHYS_BASE,
309 .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, 306 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
310 .boot_params = 0x00000100, 307 .boot_params = 0x00000100,
311 .init_machine = rd88f5182_init, 308 .init_machine = rd88f5182_init,
312 .map_io = orion_map_io, 309 .map_io = orion5x_map_io,
313 .init_irq = orion_init_irq, 310 .init_irq = orion5x_init_irq,
314 .timer = &orion_timer, 311 .timer = &orion5x_timer,
315MACHINE_END 312MACHINE_END
diff --git a/arch/arm/mach-orion/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index 45764dad16d0..fd43863a86f6 100644
--- a/arch/arm/mach-orion/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -26,8 +26,7 @@
26#include <asm/gpio.h> 26#include <asm/gpio.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/pci.h> 28#include <asm/mach/pci.h>
29#include <asm/arch/orion.h> 29#include <asm/arch/orion5x.h>
30#include <asm/arch/platform.h>
31#include "common.h" 30#include "common.h"
32 31
33#define QNAP_TS209_NOR_BOOT_BASE 0xf4000000 32#define QNAP_TS209_NOR_BOOT_BASE 0xf4000000
@@ -145,8 +144,8 @@ static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
145 /* 144 /*
146 * PCIE IRQ is connected internally (not GPIO) 145 * PCIE IRQ is connected internally (not GPIO)
147 */ 146 */
148 if (dev->bus->number == orion_pcie_local_bus_nr()) 147 if (dev->bus->number == orion5x_pcie_local_bus_nr())
149 return IRQ_ORION_PCIE0_INT; 148 return IRQ_ORION5X_PCIE0_INT;
150 149
151 /* 150 /*
152 * PCI IRQs are connected via GPIOs 151 * PCI IRQs are connected via GPIOs
@@ -165,8 +164,8 @@ static struct hw_pci qnap_ts209_pci __initdata = {
165 .nr_controllers = 2, 164 .nr_controllers = 2,
166 .preinit = qnap_ts209_pci_preinit, 165 .preinit = qnap_ts209_pci_preinit,
167 .swizzle = pci_std_swizzle, 166 .swizzle = pci_std_swizzle,
168 .setup = orion_pci_sys_setup, 167 .setup = orion5x_pci_sys_setup,
169 .scan = orion_pci_sys_scan_bus, 168 .scan = orion5x_pci_sys_scan_bus,
170 .map_irq = qnap_ts209_pci_map_irq, 169 .map_irq = qnap_ts209_pci_map_irq,
171}; 170};
172 171
@@ -189,6 +188,87 @@ static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
189 .force_phy_addr = 1, 188 .force_phy_addr = 1,
190}; 189};
191 190
191static int __init parse_hex_nibble(char n)
192{
193 if (n >= '0' && n <= '9')
194 return n - '0';
195
196 if (n >= 'A' && n <= 'F')
197 return n - 'A' + 10;
198
199 if (n >= 'a' && n <= 'f')
200 return n - 'a' + 10;
201
202 return -1;
203}
204
205static int __init parse_hex_byte(const char *b)
206{
207 int hi;
208 int lo;
209
210 hi = parse_hex_nibble(b[0]);
211 lo = parse_hex_nibble(b[1]);
212
213 if (hi < 0 || lo < 0)
214 return -1;
215
216 return (hi << 4) | lo;
217}
218
219static int __init check_mac_addr(const char *addr_str)
220{
221 u_int8_t addr[6];
222 int i;
223
224 for (i = 0; i < 6; i++) {
225 int byte;
226
227 /*
228 * Enforce "xx:xx:xx:xx:xx:xx\n" format.
229 */
230 if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
231 return -1;
232
233 byte = parse_hex_byte(addr_str + (i * 3));
234 if (byte < 0)
235 return -1;
236 addr[i] = byte;
237 }
238
239 printk(KERN_INFO "ts209: found ethernet mac address ");
240 for (i = 0; i < 6; i++)
241 printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
242
243 memcpy(qnap_ts209_eth_data.mac_addr, addr, 6);
244
245 return 0;
246}
247
248/*
249 * The 'NAS Config' flash partition has an ext2 filesystem which
250 * contains a file that has the ethernet MAC address in plain text
251 * (format "xx:xx:xx:xx:xx:xx\n".)
252 */
253static void __init ts209_find_mac_addr(void)
254{
255 unsigned long addr;
256
257 for (addr = 0x00700000; addr < 0x00760000; addr += 1024) {
258 char *nor_page;
259 int ret = 0;
260
261 nor_page = ioremap(QNAP_TS209_NOR_BOOT_BASE + addr, 1024);
262 if (nor_page != NULL) {
263 ret = check_mac_addr(nor_page);
264 iounmap(nor_page);
265 }
266
267 if (ret == 0)
268 break;
269 }
270}
271
192/***************************************************************************** 272/*****************************************************************************
193 * RTC S35390A on I2C bus 273 * RTC S35390A on I2C bus
194 ****************************************************************************/ 274 ****************************************************************************/
@@ -262,21 +342,21 @@ static struct platform_device *qnap_ts209_devices[] __initdata = {
262static void qnap_ts209_power_off(void) 342static void qnap_ts209_power_off(void)
263{ 343{
264 /* 19200 baud divisor */ 344 /* 19200 baud divisor */
265 const unsigned divisor = ((ORION_TCLK + (8 * 19200)) / (16 * 19200)); 345 const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
266 346
267 pr_info("%s: triggering power-off...\n", __func__); 347 pr_info("%s: triggering power-off...\n", __func__);
268 348
269 /* hijack uart1 and reset into sane state (19200,8n1) */ 349 /* hijack uart1 and reset into sane state (19200,8n1) */
270 orion_write(UART1_REG(LCR), 0x83); 350 orion5x_write(UART1_REG(LCR), 0x83);
271 orion_write(UART1_REG(DLL), divisor & 0xff); 351 orion5x_write(UART1_REG(DLL), divisor & 0xff);
272 orion_write(UART1_REG(DLM), (divisor >> 8) & 0xff); 352 orion5x_write(UART1_REG(DLM), (divisor >> 8) & 0xff);
273 orion_write(UART1_REG(LCR), 0x03); 353 orion5x_write(UART1_REG(LCR), 0x03);
274 orion_write(UART1_REG(IER), 0x00); 354 orion5x_write(UART1_REG(IER), 0x00);
275 orion_write(UART1_REG(FCR), 0x00); 355 orion5x_write(UART1_REG(FCR), 0x00);
276 orion_write(UART1_REG(MCR), 0x00); 356 orion5x_write(UART1_REG(MCR), 0x00);
277 357
278 /* send the power-off command 'A' to PIC */ 358 /* send the power-off command 'A' to PIC */
279 orion_write(UART1_REG(TX), 'A'); 359 orion5x_write(UART1_REG(TX), 'A');
280} 360}
281 361
282static void __init qnap_ts209_init(void) 362static void __init qnap_ts209_init(void)
@@ -284,20 +364,19 @@ static void __init qnap_ts209_init(void)
284 /* 364 /*
285 * Setup basic Orion functions. Need to be called early. 365 * Setup basic Orion functions. Need to be called early.
286 */ 366 */
287 orion_init(); 367 orion5x_init();
288 368
289 /* 369 /*
290 * Setup flash mapping 370 * Setup flash mapping
291 */ 371 */
292 orion_setup_cpu_win(ORION_DEV_BOOT, QNAP_TS209_NOR_BOOT_BASE, 372 orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
293 QNAP_TS209_NOR_BOOT_SIZE, -1); 373 QNAP_TS209_NOR_BOOT_SIZE);
294 374
295 /* 375 /*
296 * Open a special address decode windows for the PCIE WA. 376 * Open a special address decode windows for the PCIE WA.
297 */ 377 */
298 orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); 378 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
299 orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | 379 ORION5X_PCIE_WA_SIZE);
300 (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16));
301 380
302 /* 381 /*
303 * Setup Multiplexing Pins -- 382 * Setup Multiplexing Pins --
@@ -322,10 +401,10 @@ static void __init qnap_ts209_init(void)
322 * MPP[22] USB 0 over current 401 * MPP[22] USB 0 over current
323 * MPP[23-25] Reserved 402 * MPP[23-25] Reserved
324 */ 403 */
325 orion_write(MPP_0_7_CTRL, 0x3); 404 orion5x_write(MPP_0_7_CTRL, 0x3);
326 orion_write(MPP_8_15_CTRL, 0x55550000); 405 orion5x_write(MPP_8_15_CTRL, 0x55550000);
327 orion_write(MPP_16_19_CTRL, 0x5500); 406 orion5x_write(MPP_16_19_CTRL, 0x5500);
328 orion_gpio_set_valid_pins(0x3cc0fff); 407 orion5x_gpio_set_valid_pins(0x3cc0fff);
329 408
330 /* register ts209 specific power-off method */ 409 /* register ts209 specific power-off method */
331 pm_power_off = qnap_ts209_power_off; 410 pm_power_off = qnap_ts209_power_off;
@@ -344,18 +423,20 @@ static void __init qnap_ts209_init(void)
344 pr_warning("qnap_ts209_init: failed to get RTC IRQ\n"); 423 pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
345 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); 424 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
346 425
347 orion_eth_init(&qnap_ts209_eth_data); 426 ts209_find_mac_addr();
348 orion_sata_init(&qnap_ts209_sata_data); 427 orion5x_eth_init(&qnap_ts209_eth_data);
428
429 orion5x_sata_init(&qnap_ts209_sata_data);
349} 430}
350 431
351MACHINE_START(TS209, "QNAP TS-109/TS-209") 432MACHINE_START(TS209, "QNAP TS-109/TS-209")
352 /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ 433 /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
353 .phys_io = ORION_REGS_PHYS_BASE, 434 .phys_io = ORION5X_REGS_PHYS_BASE,
354 .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, 435 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
355 .boot_params = 0x00000100, 436 .boot_params = 0x00000100,
356 .init_machine = qnap_ts209_init, 437 .init_machine = qnap_ts209_init,
357 .map_io = orion_map_io, 438 .map_io = orion5x_map_io,
358 .init_irq = orion_init_irq, 439 .init_irq = orion5x_init_irq,
359 .timer = &orion_timer, 440 .timer = &orion5x_timer,
360 .fixup = tag_fixup_mem32, 441 .fixup = tag_fixup_mem32,
361MACHINE_END 442MACHINE_END
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c
index 8e00ed43fb95..a5268c3ac5a7 100644
--- a/arch/arm/mach-pnx4008/clock.c
+++ b/arch/arm/mach-pnx4008/clock.c
@@ -21,7 +21,6 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/semaphore.h>
25#include <asm/hardware.h> 24#include <asm/hardware.h>
26#include <asm/io.h> 25#include <asm/io.h>
27 26
diff --git a/arch/arm/mach-pnx4008/gpio.c b/arch/arm/mach-pnx4008/gpio.c
index 1ab84ced7b5a..ef179cab80e2 100644
--- a/arch/arm/mach-pnx4008/gpio.c
+++ b/arch/arm/mach-pnx4008/gpio.c
@@ -17,7 +17,6 @@
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/semaphore.h>
21#include <asm/io.h> 20#include <asm/io.h>
22#include <asm/arch/platform.h> 21#include <asm/arch/platform.h>
23#include <asm/arch/gpio.h> 22#include <asm/arch/gpio.h>
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 0908bea0f609..5da7a6820492 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -23,6 +23,12 @@ endif
23choice 23choice
24 prompt "Select target board" 24 prompt "Select target board"
25 25
26config ARCH_GUMSTIX
27 bool "Gumstix XScale boards"
28 help
29 Say Y here if you intend to run this kernel on a
30 Gumstix Full Function Minature Computer.
31
26config ARCH_LUBBOCK 32config ARCH_LUBBOCK
27 bool "Intel DBPXA250 Development Platform" 33 bool "Intel DBPXA250 Development Platform"
28 select PXA25x 34 select PXA25x
@@ -160,6 +166,20 @@ endchoice
160 166
161endif 167endif
162 168
169if ARCH_GUMSTIX
170
171choice
172 prompt "Select target Gumstix board"
173
174config MACH_GUMSTIX_F
175 bool "Basix, Connex, ws-200ax, ws-400ax systems"
176 select PXA25x
177
178endchoice
179
180endif
181
182
163if MACH_TRIZEPS4 183if MACH_TRIZEPS4
164 184
165choice 185choice
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 6e0c4f5b5ae6..7cdcb459ea9d 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -5,13 +5,14 @@
5# Common support (must be linked before board specific support) 5# Common support (must be linked before board specific support)
6obj-y += clock.o devices.o generic.o irq.o dma.o \ 6obj-y += clock.o devices.o generic.o irq.o dma.o \
7 time.o gpio.o 7 time.o gpio.o
8obj-$(CONFIG_PXA25x) += pxa25x.o 8obj-$(CONFIG_PXA25x) += pxa25x.o mfp-pxa2xx.o
9obj-$(CONFIG_PXA27x) += pxa27x.o 9obj-$(CONFIG_PXA27x) += pxa27x.o mfp-pxa2xx.o
10obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp.o smemc.o 10obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp-pxa3xx.o smemc.o
11obj-$(CONFIG_CPU_PXA300) += pxa300.o 11obj-$(CONFIG_CPU_PXA300) += pxa300.o
12obj-$(CONFIG_CPU_PXA320) += pxa320.o 12obj-$(CONFIG_CPU_PXA320) += pxa320.o
13 13
14# Specific board support 14# Specific board support
15obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
15obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o 16obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
16obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o 17obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
17obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o 18obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
index df5ae2710ab1..e97dc59813c8 100644
--- a/arch/arm/mach-pxa/clock.c
+++ b/arch/arm/mach-pxa/clock.c
@@ -13,6 +13,7 @@
13#include <linux/delay.h> 13#include <linux/delay.h>
14 14
15#include <asm/arch/pxa-regs.h> 15#include <asm/arch/pxa-regs.h>
16#include <asm/arch/pxa2xx-gpio.h>
16#include <asm/hardware.h> 17#include <asm/hardware.h>
17 18
18#include "devices.h" 19#include "devices.h"
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c
index fcda7d5cb693..ac7f05f9f3eb 100644
--- a/arch/arm/mach-pxa/cm-x270-pci.c
+++ b/arch/arm/mach-pxa/cm-x270-pci.c
@@ -23,6 +23,7 @@
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/arch/cm-x270.h> 24#include <asm/arch/cm-x270.h>
25#include <asm/arch/pxa-regs.h> 25#include <asm/arch/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27 28
28#include <asm/hardware/it8152.h> 29#include <asm/hardware/it8152.h>
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index ecdbc96a4de1..6d4416a4f378 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -30,6 +30,7 @@
30 30
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/pxa2xx-regs.h> 32#include <asm/arch/pxa2xx-regs.h>
33#include <asm/arch/pxa2xx-gpio.h>
33#include <asm/arch/pxafb.h> 34#include <asm/arch/pxafb.h>
34#include <asm/arch/ohci.h> 35#include <asm/arch/ohci.h>
35#include <asm/arch/mmc.h> 36#include <asm/arch/mmc.h>
diff --git a/arch/arm/mach-pxa/colibri.c b/arch/arm/mach-pxa/colibri.c
index 6db54e31c397..43bf5a183e90 100644
--- a/arch/arm/mach-pxa/colibri.c
+++ b/arch/arm/mach-pxa/colibri.c
@@ -29,6 +29,7 @@
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/pxa2xx-gpio.h>
32#include <asm/arch/colibri.h> 33#include <asm/arch/colibri.h>
33 34
34#include "generic.h" 35#include "generic.h"
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 9292576b83b3..259ca821e464 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -36,6 +36,7 @@
36#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
37 37
38#include <asm/arch/pxa-regs.h> 38#include <asm/arch/pxa-regs.h>
39#include <asm/arch/pxa2xx-gpio.h>
39#include <asm/arch/irda.h> 40#include <asm/arch/irda.h>
40#include <asm/arch/mmc.h> 41#include <asm/arch/mmc.h>
41#include <asm/arch/udc.h> 42#include <asm/arch/udc.h>
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index 392c38717362..0a85f706e887 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -26,6 +26,7 @@
26#include <asm/arch/sharpsl.h> 26#include <asm/arch/sharpsl.h>
27#include <asm/arch/corgi.h> 27#include <asm/arch/corgi.h>
28#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
29#include <asm/arch/pxa2xx-gpio.h>
29#include "sharpsl.h" 30#include "sharpsl.h"
30 31
31#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 32#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index 31706224a04c..eccc45d21f75 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -21,6 +21,7 @@
21 21
22#include <asm/arch/ssp.h> 22#include <asm/arch/ssp.h>
23#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
24#include <asm/arch/pxa2xx-gpio.h>
24#include <asm/arch/regs-ssp.h> 25#include <asm/arch/regs-ssp.h>
25#include "sharpsl.h" 26#include "sharpsl.h"
26 27
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index bfccb80ac8ef..d6c05b6eab35 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -11,6 +11,8 @@
11#include <asm/arch/irda.h> 11#include <asm/arch/irda.h>
12#include <asm/arch/i2c.h> 12#include <asm/arch/i2c.h>
13#include <asm/arch/ohci.h> 13#include <asm/arch/ohci.h>
14#include <asm/arch/pxa27x_keypad.h>
15#include <asm/arch/camera.h>
14 16
15#include "devices.h" 17#include "devices.h"
16 18
@@ -396,6 +398,31 @@ struct platform_device pxa25x_device_assp = {
396 398
397#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) 399#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
398 400
401static struct resource pxa27x_resource_keypad[] = {
402 [0] = {
403 .start = 0x41500000,
404 .end = 0x4150004c,
405 .flags = IORESOURCE_MEM,
406 },
407 [1] = {
408 .start = IRQ_KEYPAD,
409 .end = IRQ_KEYPAD,
410 .flags = IORESOURCE_IRQ,
411 },
412};
413
414struct platform_device pxa27x_device_keypad = {
415 .name = "pxa27x-keypad",
416 .id = -1,
417 .resource = pxa27x_resource_keypad,
418 .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
419};
420
421void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
422{
423 pxa_register_device(&pxa27x_device_keypad, info);
424}
425
399static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32); 426static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
400 427
401static struct resource pxa27x_resource_ohci[] = { 428static struct resource pxa27x_resource_ohci[] = {
@@ -540,6 +567,37 @@ struct platform_device pxa27x_device_ssp3 = {
540 .resource = pxa27x_resource_ssp3, 567 .resource = pxa27x_resource_ssp3,
541 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), 568 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
542}; 569};
570
571static struct resource pxa27x_resource_camera[] = {
572 [0] = {
573 .start = 0x50000000,
574 .end = 0x50000fff,
575 .flags = IORESOURCE_MEM,
576 },
577 [1] = {
578 .start = IRQ_CAMERA,
579 .end = IRQ_CAMERA,
580 .flags = IORESOURCE_IRQ,
581 },
582};
583
584static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32);
585
586static struct platform_device pxa27x_device_camera = {
587 .name = "pxa27x-camera",
588 .id = 0, /* This is used to put cameras on this interface */
589 .dev = {
590 .dma_mask = &pxa27x_dma_mask_camera,
591 .coherent_dma_mask = 0xffffffff,
592 },
593 .num_resources = ARRAY_SIZE(pxa27x_resource_camera),
594 .resource = pxa27x_resource_camera,
595};
596
597void __init pxa_set_camera_info(struct pxacamera_platform_data *info)
598{
599 pxa_register_device(&pxa27x_device_camera, info);
600}
543#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ 601#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
544 602
545#ifdef CONFIG_PXA3xx 603#ifdef CONFIG_PXA3xx
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index 96c7c8909068..fcab017f27ee 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -14,6 +14,7 @@ extern struct platform_device pxa_device_rtc;
14 14
15extern struct platform_device pxa27x_device_i2c_power; 15extern struct platform_device pxa27x_device_i2c_power;
16extern struct platform_device pxa27x_device_ohci; 16extern struct platform_device pxa27x_device_ohci;
17extern struct platform_device pxa27x_device_keypad;
17 18
18extern struct platform_device pxa25x_device_ssp; 19extern struct platform_device pxa25x_device_ssp;
19extern struct platform_device pxa25x_device_nssp; 20extern struct platform_device pxa25x_device_nssp;
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 3bb31314429a..edc4f07a230d 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -23,6 +23,7 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24 24
25#include <asm/arch/pxa-regs.h> 25#include <asm/arch/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h>
26#include <asm/arch/pxafb.h> 27#include <asm/arch/pxafb.h>
27#include <asm/arch/ohci.h> 28#include <asm/arch/ohci.h>
28#include <asm/arch/mmc.h> 29#include <asm/arch/mmc.h>
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 80721c610d41..331f29b2d0cd 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -19,14 +19,8 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/delay.h>
23#include <linux/ioport.h>
24#include <linux/pm.h>
25#include <linux/string.h>
26#include <linux/sysdev.h>
27 22
28#include <asm/hardware.h> 23#include <asm/hardware.h>
29#include <asm/irq.h>
30#include <asm/system.h> 24#include <asm/system.h>
31#include <asm/pgtable.h> 25#include <asm/pgtable.h>
32#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -134,59 +128,3 @@ void __init pxa_map_io(void)
134 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); 128 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
135 get_clk_frequency_khz(1); 129 get_clk_frequency_khz(1);
136} 130}
137
138#ifdef CONFIG_PM
139
140static unsigned long saved_gplr[4];
141static unsigned long saved_gpdr[4];
142static unsigned long saved_grer[4];
143static unsigned long saved_gfer[4];
144
145static int pxa_gpio_suspend(struct sys_device *dev, pm_message_t state)
146{
147 int i, gpio;
148
149 for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
150 saved_gplr[i] = GPLR(gpio);
151 saved_gpdr[i] = GPDR(gpio);
152 saved_grer[i] = GRER(gpio);
153 saved_gfer[i] = GFER(gpio);
154
155 /* Clear GPIO transition detect bits */
156 GEDR(gpio) = GEDR(gpio);
157 }
158 return 0;
159}
160
161static int pxa_gpio_resume(struct sys_device *dev)
162{
163 int i, gpio;
164
165 for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
166 /* restore level with set/clear */
167 GPSR(gpio) = saved_gplr[i];
168 GPCR(gpio) = ~saved_gplr[i];
169
170 GRER(gpio) = saved_grer[i];
171 GFER(gpio) = saved_gfer[i];
172 GPDR(gpio) = saved_gpdr[i];
173 }
174 return 0;
175}
176#else
177#define pxa_gpio_suspend NULL
178#define pxa_gpio_resume NULL
179#endif
180
181struct sysdev_class pxa_gpio_sysclass = {
182 .name = "gpio",
183 .suspend = pxa_gpio_suspend,
184 .resume = pxa_gpio_resume,
185};
186
187static int __init pxa_gpio_init(void)
188{
189 return sysdev_class_register(&pxa_gpio_sysclass);
190}
191
192core_initcall(pxa_gpio_init);
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index b3d10b0e52a0..5bb7ae757831 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -9,14 +9,13 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12typedef int (*set_wake_t)(unsigned int, unsigned int);
13
12struct sys_timer; 14struct sys_timer;
13 15
14extern struct sys_timer pxa_timer; 16extern struct sys_timer pxa_timer;
15extern void __init pxa_init_irq_low(void); 17extern void __init pxa_init_irq(int irq_nr, set_wake_t fn);
16extern void __init pxa_init_irq_high(void); 18extern void __init pxa_init_gpio(int gpio_nr, set_wake_t fn);
17extern void __init pxa_init_irq_gpio(int gpio_nr);
18extern void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int));
19extern void __init pxa_init_gpio(int gpio_nr);
20extern void __init pxa25x_init_irq(void); 19extern void __init pxa25x_init_irq(void);
21extern void __init pxa27x_init_irq(void); 20extern void __init pxa27x_init_irq(void);
22extern void __init pxa3xx_init_irq(void); 21extern void __init pxa3xx_init_irq(void);
@@ -30,6 +29,8 @@ extern int pxa_last_gpio;
30 mi->bank[__nr].size = (__size), \ 29 mi->bank[__nr].size = (__size), \
31 mi->bank[__nr].node = (((unsigned)(__start) - PHYS_OFFSET) >> 27) 30 mi->bank[__nr].node = (((unsigned)(__start) - PHYS_OFFSET) >> 27)
32 31
32#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
33
33#ifdef CONFIG_PXA25x 34#ifdef CONFIG_PXA25x
34extern unsigned pxa25x_get_clk_frequency_khz(int); 35extern unsigned pxa25x_get_clk_frequency_khz(int);
35extern unsigned pxa25x_get_memclk_frequency_10khz(void); 36extern unsigned pxa25x_get_memclk_frequency_10khz(void);
@@ -56,3 +57,4 @@ extern unsigned pxa3xx_get_memclk_frequency_10khz(void);
56 57
57extern struct sysdev_class pxa_irq_sysclass; 58extern struct sysdev_class pxa_irq_sysclass;
58extern struct sysdev_class pxa_gpio_sysclass; 59extern struct sysdev_class pxa_gpio_sysclass;
60extern struct sysdev_class pxa3xx_mfp_sysclass;
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
index 8638dd7dd076..7d3e16970be0 100644
--- a/arch/arm/mach-pxa/gpio.c
+++ b/arch/arm/mach-pxa/gpio.c
@@ -14,11 +14,14 @@
14 14
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/irq.h>
18#include <linux/sysdev.h>
17 19
18#include <asm/gpio.h> 20#include <asm/gpio.h>
19#include <asm/hardware.h> 21#include <asm/hardware.h>
20#include <asm/io.h> 22#include <asm/io.h>
21#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
24#include <asm/arch/pxa2xx-gpio.h>
22 25
23#include "generic.h" 26#include "generic.h"
24 27
@@ -129,69 +132,283 @@ static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
129 __raw_writel(mask, pxa->regbase + GPCR_OFFSET); 132 __raw_writel(mask, pxa->regbase + GPCR_OFFSET);
130} 133}
131 134
135#define GPIO_CHIP(_n) \
136 [_n] = { \
137 .regbase = GPIO##_n##_BASE, \
138 .chip = { \
139 .label = "gpio-" #_n, \
140 .direction_input = pxa_gpio_direction_input, \
141 .direction_output = pxa_gpio_direction_output, \
142 .get = pxa_gpio_get, \
143 .set = pxa_gpio_set, \
144 .base = (_n) * 32, \
145 .ngpio = 32, \
146 }, \
147 }
148
132static struct pxa_gpio_chip pxa_gpio_chip[] = { 149static struct pxa_gpio_chip pxa_gpio_chip[] = {
133 [0] = { 150 GPIO_CHIP(0),
134 .regbase = GPIO0_BASE, 151 GPIO_CHIP(1),
135 .chip = { 152 GPIO_CHIP(2),
136 .label = "gpio-0",
137 .direction_input = pxa_gpio_direction_input,
138 .direction_output = pxa_gpio_direction_output,
139 .get = pxa_gpio_get,
140 .set = pxa_gpio_set,
141 .base = 0,
142 .ngpio = 32,
143 },
144 },
145 [1] = {
146 .regbase = GPIO1_BASE,
147 .chip = {
148 .label = "gpio-1",
149 .direction_input = pxa_gpio_direction_input,
150 .direction_output = pxa_gpio_direction_output,
151 .get = pxa_gpio_get,
152 .set = pxa_gpio_set,
153 .base = 32,
154 .ngpio = 32,
155 },
156 },
157 [2] = {
158 .regbase = GPIO2_BASE,
159 .chip = {
160 .label = "gpio-2",
161 .direction_input = pxa_gpio_direction_input,
162 .direction_output = pxa_gpio_direction_output,
163 .get = pxa_gpio_get,
164 .set = pxa_gpio_set,
165 .base = 64,
166 .ngpio = 32, /* 21 for PXA25x */
167 },
168 },
169#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) 153#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
170 [3] = { 154 GPIO_CHIP(3),
171 .regbase = GPIO3_BASE,
172 .chip = {
173 .label = "gpio-3",
174 .direction_input = pxa_gpio_direction_input,
175 .direction_output = pxa_gpio_direction_output,
176 .get = pxa_gpio_get,
177 .set = pxa_gpio_set,
178 .base = 96,
179 .ngpio = 32,
180 },
181 },
182#endif 155#endif
183}; 156};
184 157
185void __init pxa_init_gpio(int gpio_nr) 158/*
159 * PXA GPIO edge detection for IRQs:
160 * IRQs are generated on Falling-Edge, Rising-Edge, or both.
161 * Use this instead of directly setting GRER/GFER.
162 */
163
164static unsigned long GPIO_IRQ_rising_edge[4];
165static unsigned long GPIO_IRQ_falling_edge[4];
166static unsigned long GPIO_IRQ_mask[4];
167
168/*
169 * On PXA25x and PXA27x, GAFRx and GPDRx together decide the alternate
170 * function of a GPIO, and GPDRx cannot be altered once configured. It
171 * is attributed as "occupied" here (I know this terminology isn't
172 * accurate, you are welcome to propose a better one :-)
173 */
174static int __gpio_is_occupied(unsigned gpio)
175{
176 if (cpu_is_pxa25x() || cpu_is_pxa27x())
177 return GAFR(gpio) & (0x3 << (((gpio) & 0xf) * 2));
178 else
179 return 0;
180}
181
182static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
183{
184 int gpio, idx;
185
186 gpio = IRQ_TO_GPIO(irq);
187 idx = gpio >> 5;
188
189 if (type == IRQ_TYPE_PROBE) {
190 /* Don't mess with enabled GPIOs using preconfigured edges or
191 * GPIOs set to alternate function or to output during probe
192 */
193 if ((GPIO_IRQ_rising_edge[idx] |
194 GPIO_IRQ_falling_edge[idx] |
195 GPDR(gpio)) & GPIO_bit(gpio))
196 return 0;
197
198 if (__gpio_is_occupied(gpio))
199 return 0;
200
201 type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
202 }
203
204 GPDR(gpio) &= ~GPIO_bit(gpio);
205
206 if (type & IRQ_TYPE_EDGE_RISING)
207 __set_bit(gpio, GPIO_IRQ_rising_edge);
208 else
209 __clear_bit(gpio, GPIO_IRQ_rising_edge);
210
211 if (type & IRQ_TYPE_EDGE_FALLING)
212 __set_bit(gpio, GPIO_IRQ_falling_edge);
213 else
214 __clear_bit(gpio, GPIO_IRQ_falling_edge);
215
216 GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
217 GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
218
219 pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio,
220 ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""),
221 ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : ""));
222 return 0;
223}
224
225/*
226 * GPIO IRQs must be acknowledged. This is for GPIO 0 and 1.
227 */
228
229static void pxa_ack_low_gpio(unsigned int irq)
230{
231 GEDR0 = (1 << (irq - IRQ_GPIO0));
232}
233
234static void pxa_mask_low_gpio(unsigned int irq)
235{
236 ICMR &= ~(1 << (irq - PXA_IRQ(0)));
237}
238
239static void pxa_unmask_low_gpio(unsigned int irq)
240{
241 ICMR |= 1 << (irq - PXA_IRQ(0));
242}
243
244static struct irq_chip pxa_low_gpio_chip = {
245 .name = "GPIO-l",
246 .ack = pxa_ack_low_gpio,
247 .mask = pxa_mask_low_gpio,
248 .unmask = pxa_unmask_low_gpio,
249 .set_type = pxa_gpio_irq_type,
250};
251
252/*
253 * Demux handler for GPIO>=2 edge detect interrupts
254 */
255
256#define GEDR_BITS (sizeof(gedr) * BITS_PER_BYTE)
257
258static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
259{
260 int loop, bit, n;
261 unsigned long gedr[4];
262
263 do {
264 gedr[0] = GEDR0 & GPIO_IRQ_mask[0] & ~3;
265 gedr[1] = GEDR1 & GPIO_IRQ_mask[1];
266 gedr[2] = GEDR2 & GPIO_IRQ_mask[2];
267 gedr[3] = GEDR3 & GPIO_IRQ_mask[3];
268
269 GEDR0 = gedr[0]; GEDR1 = gedr[1];
270 GEDR2 = gedr[2]; GEDR3 = gedr[3];
271
272 loop = 0;
273 bit = find_first_bit(gedr, GEDR_BITS);
274 while (bit < GEDR_BITS) {
275 loop = 1;
276
277 n = PXA_GPIO_IRQ_BASE + bit;
278 desc_handle_irq(n, irq_desc + n);
279
280 bit = find_next_bit(gedr, GEDR_BITS, bit + 1);
281 }
282 } while (loop);
283}
284
285static void pxa_ack_muxed_gpio(unsigned int irq)
286{
287 int gpio = irq - IRQ_GPIO(2) + 2;
288 GEDR(gpio) = GPIO_bit(gpio);
289}
290
291static void pxa_mask_muxed_gpio(unsigned int irq)
292{
293 int gpio = irq - IRQ_GPIO(2) + 2;
294 __clear_bit(gpio, GPIO_IRQ_mask);
295 GRER(gpio) &= ~GPIO_bit(gpio);
296 GFER(gpio) &= ~GPIO_bit(gpio);
297}
298
299static void pxa_unmask_muxed_gpio(unsigned int irq)
300{
301 int gpio = irq - IRQ_GPIO(2) + 2;
302 int idx = gpio >> 5;
303 __set_bit(gpio, GPIO_IRQ_mask);
304 GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
305 GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
306}
307
308static struct irq_chip pxa_muxed_gpio_chip = {
309 .name = "GPIO",
310 .ack = pxa_ack_muxed_gpio,
311 .mask = pxa_mask_muxed_gpio,
312 .unmask = pxa_unmask_muxed_gpio,
313 .set_type = pxa_gpio_irq_type,
314};
315
316void __init pxa_init_gpio(int gpio_nr, set_wake_t fn)
186{ 317{
187 int i; 318 int irq, i, gpio;
319
320 pxa_last_gpio = gpio_nr - 1;
321
322 /* clear all GPIO edge detects */
323 for (i = 0; i < gpio_nr; i += 32) {
324 GFER(i) = 0;
325 GRER(i) = 0;
326 GEDR(i) = GEDR(i);
327 }
328
329 /* GPIO 0 and 1 must have their mask bit always set */
330 GPIO_IRQ_mask[0] = 3;
331
332 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
333 set_irq_chip(irq, &pxa_low_gpio_chip);
334 set_irq_handler(irq, handle_edge_irq);
335 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
336 }
337
338 for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) {
339 set_irq_chip(irq, &pxa_muxed_gpio_chip);
340 set_irq_handler(irq, handle_edge_irq);
341 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
342 }
343
344 /* Install handler for GPIO>=2 edge detect interrupts */
345 set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
346
347 pxa_low_gpio_chip.set_wake = fn;
348 pxa_muxed_gpio_chip.set_wake = fn;
188 349
189 /* add a GPIO chip for each register bank. 350 /* add a GPIO chip for each register bank.
190 * the last PXA25x register only contains 21 GPIOs 351 * the last PXA25x register only contains 21 GPIOs
191 */ 352 */
192 for (i = 0; i < gpio_nr; i += 32) { 353 for (gpio = 0, i = 0; gpio < gpio_nr; gpio += 32, i++) {
193 if (i+32 > gpio_nr) 354 if (gpio + 32 > gpio_nr)
194 pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i; 355 pxa_gpio_chip[i].chip.ngpio = gpio_nr - gpio;
195 gpiochip_add(&pxa_gpio_chip[i/32].chip); 356 gpiochip_add(&pxa_gpio_chip[i].chip);
196 } 357 }
197} 358}
359
360#ifdef CONFIG_PM
361
362static unsigned long saved_gplr[4];
363static unsigned long saved_gpdr[4];
364static unsigned long saved_grer[4];
365static unsigned long saved_gfer[4];
366
367static int pxa_gpio_suspend(struct sys_device *dev, pm_message_t state)
368{
369 int i, gpio;
370
371 for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
372 saved_gplr[i] = GPLR(gpio);
373 saved_gpdr[i] = GPDR(gpio);
374 saved_grer[i] = GRER(gpio);
375 saved_gfer[i] = GFER(gpio);
376
377 /* Clear GPIO transition detect bits */
378 GEDR(gpio) = GEDR(gpio);
379 }
380 return 0;
381}
382
383static int pxa_gpio_resume(struct sys_device *dev)
384{
385 int i, gpio;
386
387 for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) {
388 /* restore level with set/clear */
389 GPSR(gpio) = saved_gplr[i];
390 GPCR(gpio) = ~saved_gplr[i];
391
392 GRER(gpio) = saved_grer[i];
393 GFER(gpio) = saved_gfer[i];
394 GPDR(gpio) = saved_gpdr[i];
395 }
396 return 0;
397}
398#else
399#define pxa_gpio_suspend NULL
400#define pxa_gpio_resume NULL
401#endif
402
403struct sysdev_class pxa_gpio_sysclass = {
404 .name = "gpio",
405 .suspend = pxa_gpio_suspend,
406 .resume = pxa_gpio_resume,
407};
408
409static int __init pxa_gpio_init(void)
410{
411 return sysdev_class_register(&pxa_gpio_sysclass);
412}
413
414core_initcall(pxa_gpio_init);
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
new file mode 100644
index 000000000000..f01d18544133
--- /dev/null
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -0,0 +1,147 @@
1/*
2 * linux/arch/arm/mach-pxa/gumstix.c
3 *
4 * Support for the Gumstix motherboards.
5 *
6 * Original Author: Craig Hughes
7 * Created: Feb 14, 2008
8 * Copyright: Craig Hughes
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 * Implemented based on lubbock.c by Nicolas Pitre and code from Craig
15 * Hughes
16 */
17
18#include <linux/module.h>
19#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/platform_device.h>
22#include <linux/interrupt.h>
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h>
25
26#include <asm/setup.h>
27#include <asm/memory.h>
28#include <asm/mach-types.h>
29#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/sizes.h>
32
33#include <asm/mach/arch.h>
34#include <asm/mach/map.h>
35#include <asm/mach/irq.h>
36#include <asm/mach/flash.h>
37#include <asm/arch/mmc.h>
38#include <asm/arch/udc.h>
39#include <asm/arch/gumstix.h>
40
41#include <asm/arch/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h>
43
44#include "generic.h"
45
46static struct resource flash_resource = {
47 .start = 0x00000000,
48 .end = SZ_64M - 1,
49 .flags = IORESOURCE_MEM,
50};
51
52static struct mtd_partition gumstix_partitions[] = {
53 {
54 .name = "Bootloader",
55 .size = 0x00040000,
56 .offset = 0,
57 .mask_flags = MTD_WRITEABLE /* force read-only */
58 } , {
59 .name = "rootfs",
60 .size = MTDPART_SIZ_FULL,
61 .offset = MTDPART_OFS_APPEND
62 }
63};
64
65static struct flash_platform_data gumstix_flash_data = {
66 .map_name = "cfi_probe",
67 .parts = gumstix_partitions,
68 .nr_parts = ARRAY_SIZE(gumstix_partitions),
69 .width = 2,
70};
71
72static struct platform_device gumstix_flash_device = {
73 .name = "pxa2xx-flash",
74 .id = 0,
75 .dev = {
76 .platform_data = &gumstix_flash_data,
77 },
78 .resource = &flash_resource,
79 .num_resources = 1,
80};
81
82static struct platform_device *devices[] __initdata = {
83 &gumstix_flash_device,
84};
85
86#ifdef CONFIG_MMC_PXA
87static struct pxamci_platform_data gumstix_mci_platform_data;
88
89static int gumstix_mci_init(struct device *dev, irq_handler_t detect_int,
90 void *data)
91{
92 pxa_gpio_mode(GPIO6_MMCCLK_MD);
93 pxa_gpio_mode(GPIO53_MMCCLK_MD);
94 pxa_gpio_mode(GPIO8_MMCCS0_MD);
95
96 return 0;
97}
98
99static struct pxamci_platform_data gumstix_mci_platform_data = {
100 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
101 .init = gumstix_mci_init,
102};
103
104static void __init gumstix_mmc_init(void)
105{
106 pxa_set_mci_info(&gumstix_mci_platform_data);
107}
108#else
109static void __init gumstix_mmc_init(void)
110{
111 printk(KERN_INFO "Gumstix mmc disabled\n");
112}
113#endif
114
115#ifdef CONFIG_USB_GADGET_PXA2XX
116static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
117 .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
118 .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx,
119};
120
121static void __init gumstix_udc_init(void)
122{
123 pxa_set_udc_info(&gumstix_udc_info);
124}
125#else
126static void gumstix_udc_init(void)
127{
128 printk(KERN_INFO "Gumstix udc is disabled\n");
129}
130#endif
131
132static void __init gumstix_init(void)
133{
134 gumstix_udc_init();
135 gumstix_mmc_init();
136 (void) platform_add_devices(devices, ARRAY_SIZE(devices));
137}
138
139MACHINE_START(GUMSTIX, "Gumstix")
140 .phys_io = 0x40000000,
141 .boot_params = 0xa0000100, /* match u-boot bi_boot_params */
142 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
143 .map_io = pxa_map_io,
144 .init_irq = pxa25x_init_irq,
145 .timer = &pxa_timer,
146 .init_machine = gumstix_init,
147MACHINE_END
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 0a9434432c55..2637633f9166 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -32,6 +32,7 @@
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <asm/arch/pxa-regs.h>
35#include <asm/arch/pxa2xx-gpio.h>
35#include <asm/arch/idp.h> 36#include <asm/arch/idp.h>
36#include <asm/arch/pxafb.h> 37#include <asm/arch/pxafb.h>
37#include <asm/arch/bitfield.h> 38#include <asm/arch/bitfield.h>
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 36c6a68beca2..a9a0c3fab159 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/mach-pxa/irq.c 2 * linux/arch/arm/mach-pxa/irq.c
3 * 3 *
4 * Generic PXA IRQ handling, GPIO IRQ demultiplexing, etc. 4 * Generic PXA IRQ handling
5 * 5 *
6 * Author: Nicolas Pitre 6 * Author: Nicolas Pitre
7 * Created: Jun 15, 2001 7 * Created: Jun 15, 2001
@@ -21,308 +21,58 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/mach/irq.h> 22#include <asm/mach/irq.h>
23#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
24#include <asm/arch/pxa2xx-gpio.h>
24 25
25#include "generic.h" 26#include "generic.h"
26 27
28#define IRQ_BIT(n) (((n) - PXA_IRQ(0)) & 0x1f)
29#define _ICMR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICMR2 : &ICMR))
30#define _ICLR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICLR2 : &ICLR))
27 31
28/* 32/*
29 * This is for peripheral IRQs internal to the PXA chip. 33 * This is for peripheral IRQs internal to the PXA chip.
30 */ 34 */
31 35
32static void pxa_mask_low_irq(unsigned int irq) 36static int pxa_internal_irq_nr;
37
38static void pxa_mask_irq(unsigned int irq)
33{ 39{
34 ICMR &= ~(1 << irq); 40 _ICMR(irq) &= ~(1 << IRQ_BIT(irq));
35} 41}
36 42
37static void pxa_unmask_low_irq(unsigned int irq) 43static void pxa_unmask_irq(unsigned int irq)
38{ 44{
39 ICMR |= (1 << irq); 45 _ICMR(irq) |= 1 << IRQ_BIT(irq);
40} 46}
41 47
42static struct irq_chip pxa_internal_chip_low = { 48static struct irq_chip pxa_internal_irq_chip = {
43 .name = "SC", 49 .name = "SC",
44 .ack = pxa_mask_low_irq, 50 .ack = pxa_mask_irq,
45 .mask = pxa_mask_low_irq, 51 .mask = pxa_mask_irq,
46 .unmask = pxa_unmask_low_irq, 52 .unmask = pxa_unmask_irq,
47}; 53};
48 54
49void __init pxa_init_irq_low(void) 55void __init pxa_init_irq(int irq_nr, set_wake_t fn)
50{ 56{
51 int irq; 57 int irq;
52 58
53 /* disable all IRQs */ 59 pxa_internal_irq_nr = irq_nr;
54 ICMR = 0;
55 60
56 /* all IRQs are IRQ, not FIQ */ 61 for (irq = 0; irq < irq_nr; irq += 32) {
57 ICLR = 0; 62 _ICMR(irq) = 0; /* disable all IRQs */
63 _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */
64 }
58 65
59 /* only unmasked interrupts kick us out of idle */ 66 /* only unmasked interrupts kick us out of idle */
60 ICCR = 1; 67 ICCR = 1;
61 68
62 for (irq = PXA_IRQ(0); irq <= PXA_IRQ(31); irq++) { 69 for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) {
63 set_irq_chip(irq, &pxa_internal_chip_low); 70 set_irq_chip(irq, &pxa_internal_irq_chip);
64 set_irq_handler(irq, handle_level_irq);
65 set_irq_flags(irq, IRQF_VALID);
66 }
67}
68
69#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
70
71/*
72 * This is for the second set of internal IRQs as found on the PXA27x.
73 */
74
75static void pxa_mask_high_irq(unsigned int irq)
76{
77 ICMR2 &= ~(1 << (irq - 32));
78}
79
80static void pxa_unmask_high_irq(unsigned int irq)
81{
82 ICMR2 |= (1 << (irq - 32));
83}
84
85static struct irq_chip pxa_internal_chip_high = {
86 .name = "SC-hi",
87 .ack = pxa_mask_high_irq,
88 .mask = pxa_mask_high_irq,
89 .unmask = pxa_unmask_high_irq,
90};
91
92void __init pxa_init_irq_high(void)
93{
94 int irq;
95
96 ICMR2 = 0;
97 ICLR2 = 0;
98
99 for (irq = PXA_IRQ(32); irq < PXA_IRQ(64); irq++) {
100 set_irq_chip(irq, &pxa_internal_chip_high);
101 set_irq_handler(irq, handle_level_irq); 71 set_irq_handler(irq, handle_level_irq);
102 set_irq_flags(irq, IRQF_VALID); 72 set_irq_flags(irq, IRQF_VALID);
103 } 73 }
104}
105#endif
106
107/*
108 * PXA GPIO edge detection for IRQs:
109 * IRQs are generated on Falling-Edge, Rising-Edge, or both.
110 * Use this instead of directly setting GRER/GFER.
111 */
112
113static long GPIO_IRQ_rising_edge[4];
114static long GPIO_IRQ_falling_edge[4];
115static long GPIO_IRQ_mask[4];
116
117static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
118{
119 int gpio, idx;
120
121 gpio = IRQ_TO_GPIO(irq);
122 idx = gpio >> 5;
123
124 if (type == IRQT_PROBE) {
125 /* Don't mess with enabled GPIOs using preconfigured edges or
126 GPIOs set to alternate function or to output during probe */
127 if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx] | GPDR(gpio)) &
128 GPIO_bit(gpio))
129 return 0;
130 if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2)))
131 return 0;
132 type = __IRQT_RISEDGE | __IRQT_FALEDGE;
133 }
134
135 /* printk(KERN_DEBUG "IRQ%d (GPIO%d): ", irq, gpio); */
136
137 pxa_gpio_mode(gpio | GPIO_IN);
138
139 if (type & __IRQT_RISEDGE) {
140 /* printk("rising "); */
141 __set_bit (gpio, GPIO_IRQ_rising_edge);
142 } else {
143 __clear_bit (gpio, GPIO_IRQ_rising_edge);
144 }
145
146 if (type & __IRQT_FALEDGE) {
147 /* printk("falling "); */
148 __set_bit (gpio, GPIO_IRQ_falling_edge);
149 } else {
150 __clear_bit (gpio, GPIO_IRQ_falling_edge);
151 }
152
153 /* printk("edges\n"); */
154
155 GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
156 GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
157 return 0;
158}
159
160/*
161 * GPIO IRQs must be acknowledged. This is for GPIO 0 and 1.
162 */
163
164static void pxa_ack_low_gpio(unsigned int irq)
165{
166 GEDR0 = (1 << (irq - IRQ_GPIO0));
167}
168
169static struct irq_chip pxa_low_gpio_chip = {
170 .name = "GPIO-l",
171 .ack = pxa_ack_low_gpio,
172 .mask = pxa_mask_low_irq,
173 .unmask = pxa_unmask_low_irq,
174 .set_type = pxa_gpio_irq_type,
175};
176
177/*
178 * Demux handler for GPIO>=2 edge detect interrupts
179 */
180
181static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
182{
183 unsigned int mask;
184 int loop;
185
186 do {
187 loop = 0;
188
189 mask = GEDR0 & GPIO_IRQ_mask[0] & ~3;
190 if (mask) {
191 GEDR0 = mask;
192 irq = IRQ_GPIO(2);
193 desc = irq_desc + irq;
194 mask >>= 2;
195 do {
196 if (mask & 1)
197 desc_handle_irq(irq, desc);
198 irq++;
199 desc++;
200 mask >>= 1;
201 } while (mask);
202 loop = 1;
203 }
204
205 mask = GEDR1 & GPIO_IRQ_mask[1];
206 if (mask) {
207 GEDR1 = mask;
208 irq = IRQ_GPIO(32);
209 desc = irq_desc + irq;
210 do {
211 if (mask & 1)
212 desc_handle_irq(irq, desc);
213 irq++;
214 desc++;
215 mask >>= 1;
216 } while (mask);
217 loop = 1;
218 }
219
220 mask = GEDR2 & GPIO_IRQ_mask[2];
221 if (mask) {
222 GEDR2 = mask;
223 irq = IRQ_GPIO(64);
224 desc = irq_desc + irq;
225 do {
226 if (mask & 1)
227 desc_handle_irq(irq, desc);
228 irq++;
229 desc++;
230 mask >>= 1;
231 } while (mask);
232 loop = 1;
233 }
234
235 mask = GEDR3 & GPIO_IRQ_mask[3];
236 if (mask) {
237 GEDR3 = mask;
238 irq = IRQ_GPIO(96);
239 desc = irq_desc + irq;
240 do {
241 if (mask & 1)
242 desc_handle_irq(irq, desc);
243 irq++;
244 desc++;
245 mask >>= 1;
246 } while (mask);
247 loop = 1;
248 }
249 } while (loop);
250}
251
252static void pxa_ack_muxed_gpio(unsigned int irq)
253{
254 int gpio = irq - IRQ_GPIO(2) + 2;
255 GEDR(gpio) = GPIO_bit(gpio);
256}
257
258static void pxa_mask_muxed_gpio(unsigned int irq)
259{
260 int gpio = irq - IRQ_GPIO(2) + 2;
261 __clear_bit(gpio, GPIO_IRQ_mask);
262 GRER(gpio) &= ~GPIO_bit(gpio);
263 GFER(gpio) &= ~GPIO_bit(gpio);
264}
265
266static void pxa_unmask_muxed_gpio(unsigned int irq)
267{
268 int gpio = irq - IRQ_GPIO(2) + 2;
269 int idx = gpio >> 5;
270 __set_bit(gpio, GPIO_IRQ_mask);
271 GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx];
272 GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx];
273}
274
275static struct irq_chip pxa_muxed_gpio_chip = {
276 .name = "GPIO",
277 .ack = pxa_ack_muxed_gpio,
278 .mask = pxa_mask_muxed_gpio,
279 .unmask = pxa_unmask_muxed_gpio,
280 .set_type = pxa_gpio_irq_type,
281};
282
283void __init pxa_init_irq_gpio(int gpio_nr)
284{
285 int irq, i;
286
287 pxa_last_gpio = gpio_nr - 1;
288
289 /* clear all GPIO edge detects */
290 for (i = 0; i < gpio_nr; i += 32) {
291 GFER(i) = 0;
292 GRER(i) = 0;
293 GEDR(i) = GEDR(i);
294 }
295
296 /* GPIO 0 and 1 must have their mask bit always set */
297 GPIO_IRQ_mask[0] = 3;
298
299 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
300 set_irq_chip(irq, &pxa_low_gpio_chip);
301 set_irq_handler(irq, handle_edge_irq);
302 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
303 }
304 74
305 for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) { 75 pxa_internal_irq_chip.set_wake = fn;
306 set_irq_chip(irq, &pxa_muxed_gpio_chip);
307 set_irq_handler(irq, handle_edge_irq);
308 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
309 }
310
311 /* Install handler for GPIO>=2 edge detect interrupts */
312 set_irq_chip(IRQ_GPIO_2_x, &pxa_internal_chip_low);
313 set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
314
315 pxa_init_gpio(gpio_nr);
316}
317
318void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int))
319{
320 pxa_internal_chip_low.set_wake = set_wake;
321#ifdef CONFIG_PXA27x
322 pxa_internal_chip_high.set_wake = set_wake;
323#endif
324 pxa_low_gpio_chip.set_wake = set_wake;
325 pxa_muxed_gpio_chip.set_wake = set_wake;
326} 76}
327 77
328#ifdef CONFIG_PM 78#ifdef CONFIG_PM
@@ -330,19 +80,11 @@ static unsigned long saved_icmr[2];
330 80
331static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) 81static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
332{ 82{
333 switch (dev->id) { 83 int i, irq = PXA_IRQ(0);
334 case 0: 84
335 saved_icmr[0] = ICMR; 85 for (i = 0; irq < PXA_IRQ(pxa_internal_irq_nr); i++, irq += 32) {
336 ICMR = 0; 86 saved_icmr[i] = _ICMR(irq);
337 break; 87 _ICMR(irq) = 0;
338#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
339 case 1:
340 saved_icmr[1] = ICMR2;
341 ICMR2 = 0;
342 break;
343#endif
344 default:
345 return -EINVAL;
346 } 88 }
347 89
348 return 0; 90 return 0;
@@ -350,22 +92,14 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
350 92
351static int pxa_irq_resume(struct sys_device *dev) 93static int pxa_irq_resume(struct sys_device *dev)
352{ 94{
353 switch (dev->id) { 95 int i, irq = PXA_IRQ(0);
354 case 0: 96
355 ICMR = saved_icmr[0]; 97 for (i = 0; irq < PXA_IRQ(pxa_internal_irq_nr); i++, irq += 32) {
356 ICLR = 0; 98 _ICMR(irq) = saved_icmr[i];
357 ICCR = 1; 99 _ICLR(irq) = 0;
358 break;
359#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
360 case 1:
361 ICMR2 = saved_icmr[1];
362 ICLR2 = 0;
363 break;
364#endif
365 default:
366 return -EINVAL;
367 } 100 }
368 101
102 ICCR = 1;
369 return 0; 103 return 0;
370} 104}
371#else 105#else
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c
index 2271d20ffeda..21880daabafe 100644
--- a/arch/arm/mach-pxa/leds-trizeps4.c
+++ b/arch/arm/mach-pxa/leds-trizeps4.c
@@ -18,6 +18,7 @@
18#include <asm/leds.h> 18#include <asm/leds.h>
19 19
20#include <asm/arch/pxa-regs.h> 20#include <asm/arch/pxa-regs.h>
21#include <asm/arch/pxa2xx-gpio.h>
21#include <asm/arch/trizeps4.h> 22#include <asm/arch/trizeps4.h>
22 23
23#include "leds.h" 24#include "leds.h"
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 0a4b54c21314..03396063b561 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -37,12 +37,11 @@
37#include <asm/arch/gpio.h> 37#include <asm/arch/gpio.h>
38#include <asm/arch/pxafb.h> 38#include <asm/arch/pxafb.h>
39#include <asm/arch/ssp.h> 39#include <asm/arch/ssp.h>
40#include <asm/arch/pxa27x_keypad.h>
40#include <asm/arch/littleton.h> 41#include <asm/arch/littleton.h>
41 42
42#include "generic.h" 43#include "generic.h"
43 44
44#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
45
46/* Littleton MFP configurations */ 45/* Littleton MFP configurations */
47static mfp_cfg_t littleton_mfp_cfg[] __initdata = { 46static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
48 /* LCD */ 47 /* LCD */
@@ -76,6 +75,21 @@ static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
76 75
77 /* Debug Ethernet */ 76 /* Debug Ethernet */
78 GPIO90_GPIO, 77 GPIO90_GPIO,
78
79 /* Keypad */
80 GPIO107_KP_DKIN_0,
81 GPIO108_KP_DKIN_1,
82 GPIO115_KP_MKIN_0,
83 GPIO116_KP_MKIN_1,
84 GPIO117_KP_MKIN_2,
85 GPIO118_KP_MKIN_3,
86 GPIO119_KP_MKIN_4,
87 GPIO120_KP_MKIN_5,
88 GPIO121_KP_MKOUT_0,
89 GPIO122_KP_MKOUT_1,
90 GPIO123_KP_MKOUT_2,
91 GPIO124_KP_MKOUT_3,
92 GPIO125_KP_MKOUT_4,
79}; 93};
80 94
81static struct resource smc91x_resources[] = { 95static struct resource smc91x_resources[] = {
@@ -300,6 +314,54 @@ static void littleton_init_lcd(void)
300static inline void littleton_init_lcd(void) {}; 314static inline void littleton_init_lcd(void) {};
301#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */ 315#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */
302 316
317#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
318static unsigned int littleton_matrix_key_map[] = {
319 /* KEY(row, col, key_code) */
320 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
321 KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7),
322 KEY(1, 2, KEY_8), KEY(2, 2, KEY_9),
323
324 KEY(0, 3, KEY_KPASTERISK), /* * */
325 KEY(2, 3, KEY_KPDOT), /* # */
326
327 KEY(5, 4, KEY_ENTER),
328
329 KEY(5, 0, KEY_UP),
330 KEY(5, 1, KEY_DOWN),
331 KEY(5, 2, KEY_LEFT),
332 KEY(5, 3, KEY_RIGHT),
333 KEY(3, 2, KEY_HOME),
334 KEY(4, 1, KEY_END),
335 KEY(3, 3, KEY_BACK),
336
337 KEY(4, 0, KEY_SEND),
338 KEY(4, 2, KEY_VOLUMEUP),
339 KEY(4, 3, KEY_VOLUMEDOWN),
340
341 KEY(3, 0, KEY_F22), /* soft1 */
342 KEY(3, 1, KEY_F23), /* soft2 */
343};
344
345static struct pxa27x_keypad_platform_data littleton_keypad_info = {
346 .matrix_key_rows = 6,
347 .matrix_key_cols = 5,
348 .matrix_key_map = littleton_matrix_key_map,
349 .matrix_key_map_size = ARRAY_SIZE(littleton_matrix_key_map),
350
351 .enable_rotary0 = 1,
352 .rotary0_up_key = KEY_UP,
353 .rotary0_down_key = KEY_DOWN,
354
355 .debounce_interval = 30,
356};
357static void __init littleton_init_keypad(void)
358{
359 pxa_set_keypad_info(&littleton_keypad_info);
360}
361#else
362static inline void littleton_init_keypad(void) {}
363#endif
364
303static void __init littleton_init(void) 365static void __init littleton_init(void)
304{ 366{
305 /* initialize MFP configurations */ 367 /* initialize MFP configurations */
@@ -312,6 +374,7 @@ static void __init littleton_init(void)
312 platform_device_register(&smc91x_device); 374 platform_device_register(&smc91x_device);
313 375
314 littleton_init_lcd(); 376 littleton_init_lcd();
377 littleton_init_keypad();
315} 378}
316 379
317MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") 380MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)")
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index afa62ffe3ad5..a20e4b1649d6 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -39,6 +39,7 @@
39 39
40#include <asm/arch/pxa-regs.h> 40#include <asm/arch/pxa-regs.h>
41#include <asm/arch/pxa2xx-regs.h> 41#include <asm/arch/pxa2xx-regs.h>
42#include <asm/arch/pxa2xx-gpio.h>
42#include <asm/arch/lpd270.h> 43#include <asm/arch/lpd270.h>
43#include <asm/arch/audio.h> 44#include <asm/arch/audio.h>
44#include <asm/arch/pxafb.h> 45#include <asm/arch/pxafb.h>
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index e7ae4bb3e361..ca209c443f34 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -42,6 +42,7 @@
42 42
43#include <asm/arch/pxa-regs.h> 43#include <asm/arch/pxa-regs.h>
44#include <asm/arch/pxa2xx-regs.h> 44#include <asm/arch/pxa2xx-regs.h>
45#include <asm/arch/mfp-pxa25x.h>
45#include <asm/arch/lubbock.h> 46#include <asm/arch/lubbock.h>
46#include <asm/arch/udc.h> 47#include <asm/arch/udc.h>
47#include <asm/arch/irda.h> 48#include <asm/arch/irda.h>
@@ -51,6 +52,40 @@
51#include "generic.h" 52#include "generic.h"
52#include "devices.h" 53#include "devices.h"
53 54
55static unsigned long lubbock_pin_config[] __initdata = {
56 GPIO15_nCS_1, /* CS1 - Flash */
57 GPIO79_nCS_3, /* CS3 - SMC ethernet */
58
59 /* SSP data pins */
60 GPIO23_SSP1_SCLK,
61 GPIO25_SSP1_TXD,
62 GPIO26_SSP1_RXD,
63
64 /* BTUART */
65 GPIO42_BTUART_RXD,
66 GPIO43_BTUART_TXD,
67 GPIO44_BTUART_CTS,
68 GPIO45_BTUART_RTS,
69
70 /* PC Card */
71 GPIO48_nPOE,
72 GPIO49_nPWE,
73 GPIO50_nPIOR,
74 GPIO51_nPIOW,
75 GPIO52_nPCE_1,
76 GPIO53_nPCE_2,
77 GPIO54_nPSKTSEL,
78 GPIO55_nPREG,
79 GPIO56_nPWAIT,
80 GPIO57_nIOIS16,
81
82 /* MMC */
83 GPIO6_MMC_CLK,
84 GPIO8_MMC_CS0,
85
86 /* wakeup */
87 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
88};
54 89
55#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) 90#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
56 91
@@ -186,26 +221,6 @@ static struct platform_device sa1111_device = {
186 .resource = sa1111_resources, 221 .resource = sa1111_resources,
187}; 222};
188 223
189static struct resource smc91x_resources[] = {
190 [0] = {
191 .name = "smc91x-regs",
192 .start = 0x0c000c00,
193 .end = 0x0c0fffff,
194 .flags = IORESOURCE_MEM,
195 },
196 [1] = {
197 .start = LUBBOCK_ETH_IRQ,
198 .end = LUBBOCK_ETH_IRQ,
199 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
200 },
201 [2] = {
202 .name = "smc91x-attrib",
203 .start = 0x0e000000,
204 .end = 0x0e0fffff,
205 .flags = IORESOURCE_MEM,
206 },
207};
208
209/* ADS7846 is connected through SSP ... and if your board has J5 populated, 224/* ADS7846 is connected through SSP ... and if your board has J5 populated,
210 * you can select it to replace the ucb1400 by switching the touchscreen cable 225 * you can select it to replace the ucb1400 by switching the touchscreen cable
211 * (to J5) and poking board registers (as done below). Else it's only useful 226 * (to J5) and poking board registers (as done below). Else it's only useful
@@ -261,6 +276,26 @@ static struct spi_board_info spi_board_info[] __initdata = { {
261}, 276},
262}; 277};
263 278
279static struct resource smc91x_resources[] = {
280 [0] = {
281 .name = "smc91x-regs",
282 .start = 0x0c000c00,
283 .end = 0x0c0fffff,
284 .flags = IORESOURCE_MEM,
285 },
286 [1] = {
287 .start = LUBBOCK_ETH_IRQ,
288 .end = LUBBOCK_ETH_IRQ,
289 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
290 },
291 [2] = {
292 .name = "smc91x-attrib",
293 .start = 0x0e000000,
294 .end = 0x0e0fffff,
295 .flags = IORESOURCE_MEM,
296 },
297};
298
264static struct platform_device smc91x_device = { 299static struct platform_device smc91x_device = {
265 .name = "smc91x", 300 .name = "smc91x",
266 .id = -1, 301 .id = -1,
@@ -404,10 +439,6 @@ static int lubbock_mci_init(struct device *dev,
404 irq_handler_t detect_int, 439 irq_handler_t detect_int,
405 void *data) 440 void *data)
406{ 441{
407 /* setup GPIO for PXA25x MMC controller */
408 pxa_gpio_mode(GPIO6_MMCCLK_MD);
409 pxa_gpio_mode(GPIO8_MMCCS0_MD);
410
411 /* detect card insert/eject */ 442 /* detect card insert/eject */
412 mmc_detect_int = detect_int; 443 mmc_detect_int = detect_int;
413 init_timer(&mmc_timer); 444 init_timer(&mmc_timer);
@@ -457,6 +488,8 @@ static void __init lubbock_init(void)
457{ 488{
458 int flashboot = (LUB_CONF_SWITCHES & 1); 489 int flashboot = (LUB_CONF_SWITCHES & 1);
459 490
491 pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
492
460 pxa_set_udc_info(&udc_info); 493 pxa_set_udc_info(&udc_info);
461 set_pxa_fb_info(&sharp_lm8v31); 494 set_pxa_fb_info(&sharp_lm8v31);
462 pxa_set_mci_info(&lubbock_mci_platform_data); 495 pxa_set_mci_info(&lubbock_mci_platform_data);
@@ -489,46 +522,6 @@ static void __init lubbock_map_io(void)
489 pxa_map_io(); 522 pxa_map_io();
490 iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc)); 523 iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc));
491 524
492 /* SSP data pins */
493 pxa_gpio_mode(GPIO23_SCLK_MD);
494 pxa_gpio_mode(GPIO25_STXD_MD);
495 pxa_gpio_mode(GPIO26_SRXD_MD);
496
497 /* This enables the BTUART */
498 pxa_gpio_mode(GPIO42_BTRXD_MD);
499 pxa_gpio_mode(GPIO43_BTTXD_MD);
500 pxa_gpio_mode(GPIO44_BTCTS_MD);
501 pxa_gpio_mode(GPIO45_BTRTS_MD);
502
503 GPSR(GPIO48_nPOE) =
504 GPIO_bit(GPIO48_nPOE) |
505 GPIO_bit(GPIO49_nPWE) |
506 GPIO_bit(GPIO50_nPIOR) |
507 GPIO_bit(GPIO51_nPIOW) |
508 GPIO_bit(GPIO52_nPCE_1) |
509 GPIO_bit(GPIO53_nPCE_2);
510
511 pxa_gpio_mode(GPIO48_nPOE_MD);
512 pxa_gpio_mode(GPIO49_nPWE_MD);
513 pxa_gpio_mode(GPIO50_nPIOR_MD);
514 pxa_gpio_mode(GPIO51_nPIOW_MD);
515 pxa_gpio_mode(GPIO52_nPCE_1_MD);
516 pxa_gpio_mode(GPIO53_nPCE_2_MD);
517 pxa_gpio_mode(GPIO54_pSKTSEL_MD);
518 pxa_gpio_mode(GPIO55_nPREG_MD);
519 pxa_gpio_mode(GPIO56_nPWAIT_MD);
520 pxa_gpio_mode(GPIO57_nIOIS16_MD);
521
522 /* This is for the SMC chip select */
523 pxa_gpio_mode(GPIO79_nCS_3_MD);
524
525 /* setup sleep mode values */
526 PWER = 0x00000002;
527 PFER = 0x00000000;
528 PRER = 0x00000002;
529 PGSR0 = 0x00008000;
530 PGSR1 = 0x003F0202;
531 PGSR2 = 0x0001C000;
532 PCFR |= PCFR_OPDE; 525 PCFR |= PCFR_OPDE;
533} 526}
534 527
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index d98ef7ada2f8..d70be75bd199 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -16,24 +16,106 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/delay.h>
19#include <linux/gpio_keys.h> 20#include <linux/gpio_keys.h>
20#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/mfd/htc-egpio.h>
23#include <linux/mfd/htc-pasic3.h>
21#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
22#include <linux/mtd/map.h> 25#include <linux/mtd/map.h>
23#include <linux/mtd/physmap.h> 26#include <linux/mtd/physmap.h>
27#include <linux/pda_power.h>
24 28
25#include <asm/gpio.h> 29#include <asm/gpio.h>
26#include <asm/hardware.h> 30#include <asm/hardware.h>
27#include <asm/mach-types.h> 31#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
29#include <asm/arch/magician.h> 33#include <asm/arch/magician.h>
34#include <asm/arch/mfp-pxa27x.h>
30#include <asm/arch/pxa-regs.h> 35#include <asm/arch/pxa-regs.h>
31#include <asm/arch/pxafb.h> 36#include <asm/arch/pxafb.h>
37#include <asm/arch/i2c.h>
38#include <asm/arch/mmc.h>
32#include <asm/arch/irda.h> 39#include <asm/arch/irda.h>
33#include <asm/arch/ohci.h> 40#include <asm/arch/ohci.h>
34 41
35#include "generic.h" 42#include "generic.h"
36 43
44static unsigned long magician_pin_config[] = {
45
46 /* SDRAM and Static Memory I/O Signals */
47 GPIO20_nSDCS_2,
48 GPIO21_nSDCS_3,
49 GPIO15_nCS_1,
50 GPIO78_nCS_2, /* PASIC3 */
51 GPIO79_nCS_3, /* EGPIO CPLD */
52 GPIO80_nCS_4,
53 GPIO33_nCS_5,
54
55 /* I2C */
56 GPIO117_I2C_SCL,
57 GPIO118_I2C_SDA,
58
59 /* PWM 0 */
60 GPIO16_PWM0_OUT,
61
62 /* I2S */
63 GPIO28_I2S_BITCLK_OUT,
64 GPIO29_I2S_SDATA_IN,
65 GPIO31_I2S_SYNC,
66 GPIO113_I2S_SYSCLK,
67
68 /* SSP 2 */
69 GPIO19_SSP2_SCLK,
70 GPIO14_SSP2_SFRM,
71 GPIO89_SSP2_TXD,
72 GPIO88_SSP2_RXD,
73
74 /* MMC */
75 GPIO32_MMC_CLK,
76 GPIO92_MMC_DAT_0,
77 GPIO109_MMC_DAT_1,
78 GPIO110_MMC_DAT_2,
79 GPIO111_MMC_DAT_3,
80 GPIO112_MMC_CMD,
81
82 /* LCD */
83 GPIO58_LCD_LDD_0,
84 GPIO59_LCD_LDD_1,
85 GPIO60_LCD_LDD_2,
86 GPIO61_LCD_LDD_3,
87 GPIO62_LCD_LDD_4,
88 GPIO63_LCD_LDD_5,
89 GPIO64_LCD_LDD_6,
90 GPIO65_LCD_LDD_7,
91 GPIO66_LCD_LDD_8,
92 GPIO67_LCD_LDD_9,
93 GPIO68_LCD_LDD_10,
94 GPIO69_LCD_LDD_11,
95 GPIO70_LCD_LDD_12,
96 GPIO71_LCD_LDD_13,
97 GPIO72_LCD_LDD_14,
98 GPIO73_LCD_LDD_15,
99 GPIO74_LCD_FCLK,
100 GPIO75_LCD_LCLK,
101 GPIO76_LCD_PCLK,
102 GPIO77_LCD_BIAS,
103
104 /* QCI */
105 GPIO12_CIF_DD_7,
106 GPIO17_CIF_DD_6,
107 GPIO50_CIF_DD_3,
108 GPIO51_CIF_DD_2,
109 GPIO52_CIF_DD_4,
110 GPIO53_CIF_MCLK,
111 GPIO54_CIF_PCLK,
112 GPIO55_CIF_DD_1,
113 GPIO81_CIF_DD_0,
114 GPIO82_CIF_DD_5,
115 GPIO84_CIF_FV,
116 GPIO85_CIF_LV,
117};
118
37/* 119/*
38 * IRDA 120 * IRDA
39 */ 121 */
@@ -83,8 +165,64 @@ static struct platform_device gpio_keys = {
83 .id = -1, 165 .id = -1,
84}; 166};
85 167
168
169/*
170 * EGPIO (Xilinx CPLD)
171 *
172 * 7 32-bit aligned 8-bit registers: 3x output, 1x irq, 3x input
173 */
174
175static struct resource egpio_resources[] = {
176 [0] = {
177 .start = PXA_CS3_PHYS,
178 .end = PXA_CS3_PHYS + 0x20,
179 .flags = IORESOURCE_MEM,
180 },
181 [1] = {
182 .start = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ),
183 .end = gpio_to_irq(GPIO13_MAGICIAN_CPLD_IRQ),
184 .flags = IORESOURCE_IRQ,
185 },
186};
187
188static struct htc_egpio_chip egpio_chips[] = {
189 [0] = {
190 .reg_start = 0,
191 .gpio_base = MAGICIAN_EGPIO(0, 0),
192 .num_gpios = 24,
193 .direction = HTC_EGPIO_OUTPUT,
194 .initial_values = 0x40, /* EGPIO_MAGICIAN_GSM_RESET */
195 },
196 [1] = {
197 .reg_start = 4,
198 .gpio_base = MAGICIAN_EGPIO(4, 0),
199 .num_gpios = 24,
200 .direction = HTC_EGPIO_INPUT,
201 },
202};
203
204static struct htc_egpio_platform_data egpio_info = {
205 .reg_width = 8,
206 .bus_width = 32,
207 .irq_base = IRQ_BOARD_START,
208 .num_irqs = 4,
209 .ack_register = 3,
210 .chip = egpio_chips,
211 .num_chips = ARRAY_SIZE(egpio_chips),
212};
213
214static struct platform_device egpio = {
215 .name = "htc-egpio",
216 .id = -1,
217 .resource = egpio_resources,
218 .num_resources = ARRAY_SIZE(egpio_resources),
219 .dev = {
220 .platform_data = &egpio_info,
221 },
222};
223
86/* 224/*
87 * LCD - Toppoly TD028STEB1 225 * LCD - Toppoly TD028STEB1 or Samsung LTP280QV
88 */ 226 */
89 227
90static struct pxafb_mode_info toppoly_modes[] = { 228static struct pxafb_mode_info toppoly_modes[] = {
@@ -103,12 +241,99 @@ static struct pxafb_mode_info toppoly_modes[] = {
103 }, 241 },
104}; 242};
105 243
244static struct pxafb_mode_info samsung_modes[] = {
245 {
246 .pixclock = 96153,
247 .bpp = 16,
248 .xres = 240,
249 .yres = 320,
250 .hsync_len = 8,
251 .vsync_len = 4,
252 .left_margin = 9,
253 .upper_margin = 4,
254 .right_margin = 9,
255 .lower_margin = 4,
256 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
257 },
258};
259
260static void toppoly_lcd_power(int on, struct fb_var_screeninfo *si)
261{
262 pr_debug("Toppoly LCD power\n");
263
264 if (on) {
265 pr_debug("on\n");
266 gpio_set_value(EGPIO_MAGICIAN_TOPPOLY_POWER, 1);
267 gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 1);
268 udelay(2000);
269 gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 1);
270 udelay(2000);
271 /* FIXME: enable LCDC here */
272 udelay(2000);
273 gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 1);
274 udelay(2000);
275 gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 1);
276 } else {
277 pr_debug("off\n");
278 msleep(15);
279 gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 0);
280 udelay(500);
281 gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 0);
282 udelay(1000);
283 gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 0);
284 gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 0);
285 }
286}
287
288static void samsung_lcd_power(int on, struct fb_var_screeninfo *si)
289{
290 pr_debug("Samsung LCD power\n");
291
292 if (on) {
293 pr_debug("on\n");
294 if (system_rev < 3)
295 gpio_set_value(GPIO75_MAGICIAN_SAMSUNG_POWER, 1);
296 else
297 gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 1);
298 mdelay(10);
299 gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 1);
300 mdelay(10);
301 gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 1);
302 mdelay(30);
303 gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 1);
304 mdelay(10);
305 } else {
306 pr_debug("off\n");
307 mdelay(10);
308 gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 0);
309 mdelay(30);
310 gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 0);
311 mdelay(10);
312 gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 0);
313 mdelay(10);
314 if (system_rev < 3)
315 gpio_set_value(GPIO75_MAGICIAN_SAMSUNG_POWER, 0);
316 else
317 gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 0);
318 }
319}
320
106static struct pxafb_mach_info toppoly_info = { 321static struct pxafb_mach_info toppoly_info = {
107 .modes = toppoly_modes, 322 .modes = toppoly_modes,
108 .num_modes = 1, 323 .num_modes = 1,
109 .fixed_modes = 1, 324 .fixed_modes = 1,
110 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 325 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
111 .lccr3 = LCCR3_PixRsEdg, 326 .lccr3 = LCCR3_PixRsEdg,
327 .pxafb_lcd_power = toppoly_lcd_power,
328};
329
330static struct pxafb_mach_info samsung_info = {
331 .modes = samsung_modes,
332 .num_modes = 1,
333 .fixed_modes = 1,
334 .lccr0 = LCCR0_LDDALT | LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
335 .lccr3 = LCCR3_PixFlEdg,
336 .pxafb_lcd_power = samsung_lcd_power,
112}; 337};
113 338
114/* 339/*
@@ -120,9 +345,18 @@ static void magician_set_bl_intensity(int intensity)
120 if (intensity) { 345 if (intensity) {
121 PWM_CTRL0 = 1; 346 PWM_CTRL0 = 1;
122 PWM_PERVAL0 = 0xc8; 347 PWM_PERVAL0 = 0xc8;
123 PWM_PWDUTY0 = intensity; 348 if (intensity > 0xc7) {
349 PWM_PWDUTY0 = intensity - 0x48;
350 gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 1);
351 } else {
352 PWM_PWDUTY0 = intensity;
353 gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 0);
354 }
355 gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 1);
124 pxa_set_cken(CKEN_PWM0, 1); 356 pxa_set_cken(CKEN_PWM0, 1);
125 } else { 357 } else {
358 /* PWM_PWDUTY0 = intensity; */
359 gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 0);
126 pxa_set_cken(CKEN_PWM0, 0); 360 pxa_set_cken(CKEN_PWM0, 0);
127 } 361 }
128} 362}
@@ -130,18 +364,215 @@ static void magician_set_bl_intensity(int intensity)
130static struct generic_bl_info backlight_info = { 364static struct generic_bl_info backlight_info = {
131 .default_intensity = 0x64, 365 .default_intensity = 0x64,
132 .limit_mask = 0x0b, 366 .limit_mask = 0x0b,
133 .max_intensity = 0xc7, 367 .max_intensity = 0xc7+0x48,
134 .set_bl_intensity = magician_set_bl_intensity, 368 .set_bl_intensity = magician_set_bl_intensity,
135}; 369};
136 370
137static struct platform_device backlight = { 371static struct platform_device backlight = {
138 .name = "corgi-bl", 372 .name = "generic-bl",
139 .dev = { 373 .dev = {
140 .platform_data = &backlight_info, 374 .platform_data = &backlight_info,
141 }, 375 },
142 .id = -1, 376 .id = -1,
143}; 377};
144 378
379/*
380 * LEDs
381 */
382
383struct gpio_led gpio_leds[] = {
384 {
385 .name = "magician::vibra",
386 .default_trigger = "none",
387 .gpio = GPIO22_MAGICIAN_VIBRA_EN,
388 },
389 {
390 .name = "magician::phone_bl",
391 .default_trigger = "none",
392 .gpio = GPIO103_MAGICIAN_LED_KP,
393 },
394};
395
396static struct gpio_led_platform_data gpio_led_info = {
397 .leds = gpio_leds,
398 .num_leds = ARRAY_SIZE(gpio_leds),
399};
400
401static struct platform_device leds_gpio = {
402 .name = "leds-gpio",
403 .id = -1,
404 .dev = {
405 .platform_data = &gpio_led_info,
406 },
407};
408
409static struct pasic3_led pasic3_leds[] = {
410 {
411 .led = {
412 .name = "magician:red",
413 .default_trigger = "ds2760-battery.0-charging",
414 },
415 .hw_num = 0,
416 .bit2 = PASIC3_BIT2_LED0,
417 .mask = PASIC3_MASK_LED0,
418 },
419 {
420 .led = {
421 .name = "magician:green",
422 .default_trigger = "ds2760-battery.0-charging-or-full",
423 },
424 .hw_num = 1,
425 .bit2 = PASIC3_BIT2_LED1,
426 .mask = PASIC3_MASK_LED1,
427 },
428 {
429 .led = {
430 .name = "magician:blue",
431 .default_trigger = "bluetooth",
432 },
433 .hw_num = 2,
434 .bit2 = PASIC3_BIT2_LED2,
435 .mask = PASIC3_MASK_LED2,
436 },
437};
438
439static struct platform_device pasic3;
440
441static struct pasic3_leds_machinfo __devinit pasic3_leds_info = {
442 .num_leds = ARRAY_SIZE(pasic3_leds),
443 .power_gpio = EGPIO_MAGICIAN_LED_POWER,
444 .leds = pasic3_leds,
445};
446
447/*
448 * PASIC3 with DS1WM
449 */
450
451static struct resource pasic3_resources[] = {
452 [0] = {
453 .start = PXA_CS2_PHYS,
454 .end = PXA_CS2_PHYS + 0x1b,
455 .flags = IORESOURCE_MEM,
456 },
457 /* No IRQ handler in the PASIC3, DS1WM needs an external IRQ */
458 [1] = {
459 .start = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ),
460 .end = gpio_to_irq(GPIO107_MAGICIAN_DS1WM_IRQ),
461 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
462 }
463};
464
465static struct pasic3_platform_data pasic3_platform_data = {
466 .bus_shift = 2,
467 .led_pdata = &pasic3_leds_info,
468 .clock_rate = 4000000,
469};
470
471static struct platform_device pasic3 = {
472 .name = "pasic3",
473 .id = -1,
474 .num_resources = ARRAY_SIZE(pasic3_resources),
475 .resource = pasic3_resources,
476 .dev = {
477 .platform_data = &pasic3_platform_data,
478 },
479};
480
481/*
482 * External power
483 */
484
485static int magician_is_ac_online(void)
486{
487 return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC);
488}
489
490static int magician_is_usb_online(void)
491{
492 return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_USB);
493}
494
495static void magician_set_charge(int flags)
496{
497 gpio_set_value(GPIO30_MAGICIAN_nCHARGE_EN, !flags);
498 gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags);
499}
500
501static char *magician_supplicants[] = {
502 "ds2760-battery.0", "backup-battery"
503};
504
505static struct pda_power_pdata power_supply_info = {
506 .is_ac_online = magician_is_ac_online,
507 .is_usb_online = magician_is_usb_online,
508 .set_charge = magician_set_charge,
509 .supplied_to = magician_supplicants,
510 .num_supplicants = ARRAY_SIZE(magician_supplicants),
511};
512
513static struct resource power_supply_resources[] = {
514 [0] = {
515 .name = "ac",
516 .flags = IORESOURCE_IRQ,
517 .start = IRQ_MAGICIAN_AC,
518 .end = IRQ_MAGICIAN_AC,
519 },
520 [1] = {
521 .name = "usb",
522 .flags = IORESOURCE_IRQ,
523 .start = IRQ_MAGICIAN_AC,
524 .end = IRQ_MAGICIAN_AC,
525 },
526};
527
528static struct platform_device power_supply = {
529 .name = "pda-power",
530 .id = -1,
531 .dev = {
532 .platform_data = &power_supply_info,
533 },
534 .resource = power_supply_resources,
535 .num_resources = ARRAY_SIZE(power_supply_resources),
536};
537
538
539/*
540 * MMC/SD
541 */
542
543static int magician_mci_init(struct device *dev,
544 irq_handler_t detect_irq, void *data)
545{
546 return request_irq(IRQ_MAGICIAN_SD, detect_irq,
547 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
548 "MMC card detect", data);
549}
550
551static void magician_mci_setpower(struct device *dev, unsigned int vdd)
552{
553 struct pxamci_platform_data *pdata = dev->platform_data;
554
555 gpio_set_value(EGPIO_MAGICIAN_SD_POWER, (1 << vdd) & pdata->ocr_mask);
556}
557
558static int magician_mci_get_ro(struct device *dev)
559{
560 return (!gpio_get_value(EGPIO_MAGICIAN_nSD_READONLY));
561}
562
563static void magician_mci_exit(struct device *dev, void *data)
564{
565 free_irq(IRQ_MAGICIAN_SD, data);
566}
567
568static struct pxamci_platform_data magician_mci_info = {
569 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
570 .init = magician_mci_init,
571 .get_ro = magician_mci_get_ro,
572 .setpower = magician_mci_setpower,
573 .exit = magician_mci_exit,
574};
575
145 576
146/* 577/*
147 * USB OHCI 578 * USB OHCI
@@ -166,6 +597,11 @@ static struct pxaohci_platform_data magician_ohci_info = {
166 * StrataFlash 597 * StrataFlash
167 */ 598 */
168 599
600static void magician_set_vpp(struct map_info *map, int vpp)
601{
602 gpio_set_value(EGPIO_MAGICIAN_FLASH_VPP, vpp);
603}
604
169#define PXA_CS_SIZE 0x04000000 605#define PXA_CS_SIZE 0x04000000
170 606
171static struct resource strataflash_resource = { 607static struct resource strataflash_resource = {
@@ -176,13 +612,14 @@ static struct resource strataflash_resource = {
176 612
177static struct physmap_flash_data strataflash_data = { 613static struct physmap_flash_data strataflash_data = {
178 .width = 4, 614 .width = 4,
615 .set_vpp = magician_set_vpp,
179}; 616};
180 617
181static struct platform_device strataflash = { 618static struct platform_device strataflash = {
182 .name = "physmap-flash", 619 .name = "physmap-flash",
183 .id = -1, 620 .id = -1,
184 .num_resources = 1,
185 .resource = &strataflash_resource, 621 .resource = &strataflash_resource,
622 .num_resources = 1,
186 .dev = { 623 .dev = {
187 .platform_data = &strataflash_data, 624 .platform_data = &strataflash_data,
188 }, 625 },
@@ -194,16 +631,43 @@ static struct platform_device strataflash = {
194 631
195static struct platform_device *devices[] __initdata = { 632static struct platform_device *devices[] __initdata = {
196 &gpio_keys, 633 &gpio_keys,
634 &egpio,
197 &backlight, 635 &backlight,
636 &pasic3,
637 &power_supply,
198 &strataflash, 638 &strataflash,
639 &leds_gpio,
199}; 640};
200 641
201static void __init magician_init(void) 642static void __init magician_init(void)
202{ 643{
644 void __iomem *cpld;
645 int lcd_select;
646
647 pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config));
648
203 platform_add_devices(devices, ARRAY_SIZE(devices)); 649 platform_add_devices(devices, ARRAY_SIZE(devices));
650 pxa_set_i2c_info(NULL);
651 pxa_set_mci_info(&magician_mci_info);
204 pxa_set_ohci_info(&magician_ohci_info); 652 pxa_set_ohci_info(&magician_ohci_info);
205 pxa_set_ficp_info(&magician_ficp_info); 653 pxa_set_ficp_info(&magician_ficp_info);
206 set_pxa_fb_info(&toppoly_info); 654
655 /* Check LCD type we have */
656 cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000);
657 if (cpld) {
658 u8 board_id = __raw_readb(cpld+0x14);
659 system_rev = board_id & 0x7;
660 lcd_select = board_id & 0x8;
661 iounmap(cpld);
662 pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly");
663 if (lcd_select && (system_rev < 3))
664 pxa_gpio_mode(GPIO75_MAGICIAN_SAMSUNG_POWER_MD);
665 pxa_gpio_mode(GPIO104_MAGICIAN_LCD_POWER_1_MD);
666 pxa_gpio_mode(GPIO105_MAGICIAN_LCD_POWER_2_MD);
667 pxa_gpio_mode(GPIO106_MAGICIAN_LCD_POWER_3_MD);
668 set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info);
669 } else
670 pr_err("LCD detection: CPLD mapping failed\n");
207} 671}
208 672
209 673
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 72a436fb9a29..18d47cfa2a18 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -24,6 +24,8 @@
24#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <linux/backlight.h> 26#include <linux/backlight.h>
27#include <linux/input.h>
28#include <linux/gpio_keys.h>
27 29
28#include <asm/types.h> 30#include <asm/types.h>
29#include <asm/setup.h> 31#include <asm/setup.h>
@@ -40,16 +42,94 @@
40 42
41#include <asm/arch/pxa-regs.h> 43#include <asm/arch/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h> 44#include <asm/arch/pxa2xx-regs.h>
45#include <asm/arch/mfp-pxa27x.h>
43#include <asm/arch/mainstone.h> 46#include <asm/arch/mainstone.h>
44#include <asm/arch/audio.h> 47#include <asm/arch/audio.h>
45#include <asm/arch/pxafb.h> 48#include <asm/arch/pxafb.h>
49#include <asm/arch/i2c.h>
46#include <asm/arch/mmc.h> 50#include <asm/arch/mmc.h>
47#include <asm/arch/irda.h> 51#include <asm/arch/irda.h>
48#include <asm/arch/ohci.h> 52#include <asm/arch/ohci.h>
53#include <asm/arch/pxa27x_keypad.h>
49 54
50#include "generic.h" 55#include "generic.h"
51#include "devices.h" 56#include "devices.h"
52 57
58static unsigned long mainstone_pin_config[] = {
59 /* Chip Select */
60 GPIO15_nCS_1,
61
62 /* LCD - 16bpp Active TFT */
63 GPIO58_LCD_LDD_0,
64 GPIO59_LCD_LDD_1,
65 GPIO60_LCD_LDD_2,
66 GPIO61_LCD_LDD_3,
67 GPIO62_LCD_LDD_4,
68 GPIO63_LCD_LDD_5,
69 GPIO64_LCD_LDD_6,
70 GPIO65_LCD_LDD_7,
71 GPIO66_LCD_LDD_8,
72 GPIO67_LCD_LDD_9,
73 GPIO68_LCD_LDD_10,
74 GPIO69_LCD_LDD_11,
75 GPIO70_LCD_LDD_12,
76 GPIO71_LCD_LDD_13,
77 GPIO72_LCD_LDD_14,
78 GPIO73_LCD_LDD_15,
79 GPIO74_LCD_FCLK,
80 GPIO75_LCD_LCLK,
81 GPIO76_LCD_PCLK,
82 GPIO77_LCD_BIAS,
83 GPIO16_PWM0_OUT, /* Backlight */
84
85 /* MMC */
86 GPIO32_MMC_CLK,
87 GPIO112_MMC_CMD,
88 GPIO92_MMC_DAT_0,
89 GPIO109_MMC_DAT_1,
90 GPIO110_MMC_DAT_2,
91 GPIO111_MMC_DAT_3,
92
93 /* USB Host Port 1 */
94 GPIO88_USBH1_PWR,
95 GPIO89_USBH1_PEN,
96
97 /* PC Card */
98 GPIO48_nPOE,
99 GPIO49_nPWE,
100 GPIO50_nPIOR,
101 GPIO51_nPIOW,
102 GPIO85_nPCE_1,
103 GPIO54_nPCE_2,
104 GPIO79_PSKTSEL,
105 GPIO55_nPREG,
106 GPIO56_nPWAIT,
107 GPIO57_nIOIS16,
108
109 /* AC97 */
110 GPIO45_AC97_SYSCLK,
111
112 /* Keypad */
113 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,
114 GPIO94_KP_DKIN_1 | WAKEUP_ON_LEVEL_HIGH,
115 GPIO95_KP_DKIN_2 | WAKEUP_ON_LEVEL_HIGH,
116 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
117 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
118 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
119 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
120 GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
121 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
122 GPIO103_KP_MKOUT_0,
123 GPIO104_KP_MKOUT_1,
124 GPIO105_KP_MKOUT_2,
125 GPIO106_KP_MKOUT_3,
126 GPIO107_KP_MKOUT_4,
127 GPIO108_KP_MKOUT_5,
128 GPIO96_KP_MKOUT_6,
129
130 /* GPIO */
131 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
132};
53 133
54static unsigned long mainstone_irq_enabled; 134static unsigned long mainstone_irq_enabled;
55 135
@@ -278,13 +358,13 @@ static int mainstone_backlight_update_status(struct backlight_device *bl)
278 bl->props.fb_blank != FB_BLANK_UNBLANK) 358 bl->props.fb_blank != FB_BLANK_UNBLANK)
279 brightness = 0; 359 brightness = 0;
280 360
281 if (brightness != 0) { 361 if (brightness != 0)
282 pxa_gpio_mode(GPIO16_PWM0_MD);
283 pxa_set_cken(CKEN_PWM0, 1); 362 pxa_set_cken(CKEN_PWM0, 1);
284 } 363
285 PWM_CTRL0 = 0; 364 PWM_CTRL0 = 0;
286 PWM_PWDUTY0 = brightness; 365 PWM_PWDUTY0 = brightness;
287 PWM_PERVAL0 = bl->props.max_brightness; 366 PWM_PERVAL0 = bl->props.max_brightness;
367
288 if (brightness == 0) 368 if (brightness == 0)
289 pxa_set_cken(CKEN_PWM0, 0); 369 pxa_set_cken(CKEN_PWM0, 0);
290 return 0; /* pointless return value */ 370 return 0; /* pointless return value */
@@ -362,16 +442,6 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in
362{ 442{
363 int err; 443 int err;
364 444
365 /*
366 * setup GPIO for PXA27x MMC controller
367 */
368 pxa_gpio_mode(GPIO32_MMCCLK_MD);
369 pxa_gpio_mode(GPIO112_MMCCMD_MD);
370 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
371 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
372 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
373 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
374
375 /* make sure SD/Memory Stick multiplexer's signals 445 /* make sure SD/Memory Stick multiplexer's signals
376 * are routed to MMC controller 446 * are routed to MMC controller
377 */ 447 */
@@ -434,19 +504,39 @@ static struct pxaficp_platform_data mainstone_ficp_platform_data = {
434 .transceiver_mode = mainstone_irda_transceiver_mode, 504 .transceiver_mode = mainstone_irda_transceiver_mode,
435}; 505};
436 506
507static struct gpio_keys_button gpio_keys_button[] = {
508 [0] = {
509 .desc = "wakeup",
510 .code = KEY_SUSPEND,
511 .type = EV_KEY,
512 .gpio = 1,
513 .wakeup = 1,
514 },
515};
516
517static struct gpio_keys_platform_data mainstone_gpio_keys = {
518 .buttons = gpio_keys_button,
519 .nbuttons = 1,
520};
521
522static struct platform_device mst_gpio_keys_device = {
523 .name = "gpio-keys",
524 .id = -1,
525 .dev = {
526 .platform_data = &mainstone_gpio_keys,
527 },
528};
529
437static struct platform_device *platform_devices[] __initdata = { 530static struct platform_device *platform_devices[] __initdata = {
438 &smc91x_device, 531 &smc91x_device,
439 &mst_audio_device, 532 &mst_audio_device,
440 &mst_flash_device[0], 533 &mst_flash_device[0],
441 &mst_flash_device[1], 534 &mst_flash_device[1],
535 &mst_gpio_keys_device,
442}; 536};
443 537
444static int mainstone_ohci_init(struct device *dev) 538static int mainstone_ohci_init(struct device *dev)
445{ 539{
446 /* setup Port1 GPIO pin. */
447 pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */
448 pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
449
450 /* Set the Power Control Polarity Low and Power Sense 540 /* Set the Power Control Polarity Low and Power Sense
451 Polarity Low to active low. */ 541 Polarity Low to active low. */
452 UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) & 542 UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
@@ -460,10 +550,63 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
460 .init = mainstone_ohci_init, 550 .init = mainstone_ohci_init,
461}; 551};
462 552
553#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
554static unsigned int mainstone_matrix_keys[] = {
555 KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
556 KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
557 KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I),
558 KEY(3, 1, KEY_J), KEY(4, 1, KEY_K), KEY(5, 1, KEY_L),
559 KEY(0, 2, KEY_M), KEY(1, 2, KEY_N), KEY(2, 2, KEY_O),
560 KEY(3, 2, KEY_P), KEY(4, 2, KEY_Q), KEY(5, 2, KEY_R),
561 KEY(0, 3, KEY_S), KEY(1, 3, KEY_T), KEY(2, 3, KEY_U),
562 KEY(3, 3, KEY_V), KEY(4, 3, KEY_W), KEY(5, 3, KEY_X),
563 KEY(2, 4, KEY_Y), KEY(3, 4, KEY_Z),
564
565 KEY(0, 4, KEY_DOT), /* . */
566 KEY(1, 4, KEY_CLOSE), /* @ */
567 KEY(4, 4, KEY_SLASH),
568 KEY(5, 4, KEY_BACKSLASH),
569 KEY(0, 5, KEY_HOME),
570 KEY(1, 5, KEY_LEFTSHIFT),
571 KEY(2, 5, KEY_SPACE),
572 KEY(3, 5, KEY_SPACE),
573 KEY(4, 5, KEY_ENTER),
574 KEY(5, 5, KEY_BACKSPACE),
575
576 KEY(0, 6, KEY_UP),
577 KEY(1, 6, KEY_DOWN),
578 KEY(2, 6, KEY_LEFT),
579 KEY(3, 6, KEY_RIGHT),
580 KEY(4, 6, KEY_SELECT),
581};
582
583struct pxa27x_keypad_platform_data mainstone_keypad_info = {
584 .matrix_key_rows = 6,
585 .matrix_key_cols = 7,
586 .matrix_key_map = mainstone_matrix_keys,
587 .matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys),
588
589 .enable_rotary0 = 1,
590 .rotary0_up_key = KEY_UP,
591 .rotary0_down_key = KEY_DOWN,
592
593 .debounce_interval = 30,
594};
595
596static void __init mainstone_init_keypad(void)
597{
598 pxa_set_keypad_info(&mainstone_keypad_info);
599}
600#else
601static inline void mainstone_init_keypad(void) {}
602#endif
603
463static void __init mainstone_init(void) 604static void __init mainstone_init(void)
464{ 605{
465 int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */ 606 int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */
466 607
608 pxa2xx_mfp_config(ARRAY_AND_SIZE(mainstone_pin_config));
609
467 mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; 610 mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
468 mst_flash_data[1].width = 4; 611 mst_flash_data[1].width = 4;
469 612
@@ -480,31 +623,6 @@ static void __init mainstone_init(void)
480 */ 623 */
481 ARB_CNTRL = ARB_CORE_PARK | 0x234; 624 ARB_CNTRL = ARB_CORE_PARK | 0x234;
482 625
483 /*
484 * On Mainstone, we route AC97_SYSCLK via GPIO45 to
485 * the audio daughter card
486 */
487 pxa_gpio_mode(GPIO45_SYSCLK_AC97_MD);
488
489 GPSR(GPIO48_nPOE) =
490 GPIO_bit(GPIO48_nPOE) |
491 GPIO_bit(GPIO49_nPWE) |
492 GPIO_bit(GPIO50_nPIOR) |
493 GPIO_bit(GPIO51_nPIOW) |
494 GPIO_bit(GPIO85_nPCE_1) |
495 GPIO_bit(GPIO54_nPCE_2);
496
497 pxa_gpio_mode(GPIO48_nPOE_MD);
498 pxa_gpio_mode(GPIO49_nPWE_MD);
499 pxa_gpio_mode(GPIO50_nPIOR_MD);
500 pxa_gpio_mode(GPIO51_nPIOW_MD);
501 pxa_gpio_mode(GPIO85_nPCE_1_MD);
502 pxa_gpio_mode(GPIO54_nPCE_2_MD);
503 pxa_gpio_mode(GPIO79_pSKTSEL_MD);
504 pxa_gpio_mode(GPIO55_nPREG_MD);
505 pxa_gpio_mode(GPIO56_nPWAIT_MD);
506 pxa_gpio_mode(GPIO57_nIOIS16_MD);
507
508 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 626 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
509 627
510 /* reading Mainstone's "Virtual Configuration Register" 628 /* reading Mainstone's "Virtual Configuration Register"
@@ -520,6 +638,9 @@ static void __init mainstone_init(void)
520 pxa_set_mci_info(&mainstone_mci_platform_data); 638 pxa_set_mci_info(&mainstone_mci_platform_data);
521 pxa_set_ficp_info(&mainstone_ficp_platform_data); 639 pxa_set_ficp_info(&mainstone_ficp_platform_data);
522 pxa_set_ohci_info(&mainstone_ohci_platform_data); 640 pxa_set_ohci_info(&mainstone_ohci_platform_data);
641 pxa_set_i2c_info(NULL);
642
643 mainstone_init_keypad();
523} 644}
524 645
525 646
@@ -537,23 +658,9 @@ static void __init mainstone_map_io(void)
537 pxa_map_io(); 658 pxa_map_io();
538 iotable_init(mainstone_io_desc, ARRAY_SIZE(mainstone_io_desc)); 659 iotable_init(mainstone_io_desc, ARRAY_SIZE(mainstone_io_desc));
539 660
540 /* initialize sleep mode regs (wake-up sources, etc) */
541 PGSR0 = 0x00008800;
542 PGSR1 = 0x00000002;
543 PGSR2 = 0x0001FC00;
544 PGSR3 = 0x00001F81;
545 PWER = 0xC0000002;
546 PRER = 0x00000002;
547 PFER = 0x00000002;
548 /* for use I SRAM as framebuffer. */ 661 /* for use I SRAM as framebuffer. */
549 PSLR |= 0xF04; 662 PSLR |= 0xF04;
550 PCFR = 0x66; 663 PCFR = 0x66;
551 /* For Keypad wakeup. */
552 KPC &=~KPC_ASACT;
553 KPC |=KPC_AS;
554 PKWR = 0x000FD000;
555 /* Need read PKWR back after set it. */
556 PKWR;
557} 664}
558 665
559MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") 666MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
new file mode 100644
index 000000000000..22097a1707cc
--- /dev/null
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -0,0 +1,245 @@
1/*
2 * linux/arch/arm/mach-pxa/mfp-pxa2xx.c
3 *
4 * PXA2xx pin mux configuration support
5 *
6 * The GPIOs on PXA2xx can be configured as one of many alternate
7 * functions, this is by concept samilar to the MFP configuration
8 * on PXA3xx, what's more important, the low power pin state and
9 * wakeup detection are also supported by the same framework.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/module.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/sysdev.h>
20
21#include <asm/arch/hardware.h>
22#include <asm/arch/pxa-regs.h>
23#include <asm/arch/mfp-pxa2xx.h>
24
25#include "generic.h"
26
27#define PGSR(x) __REG2(0x40F00020, ((x) & 0x60) >> 3)
28
29#define PWER_WE35 (1 << 24)
30
31struct gpio_desc {
32 unsigned valid : 1;
33 unsigned can_wakeup : 1;
34 unsigned keypad_gpio : 1;
35 unsigned int mask; /* bit mask in PWER or PKWR */
36 unsigned long config;
37};
38
39static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1];
40
41static int __mfp_config_gpio(unsigned gpio, unsigned long c)
42{
43 unsigned long gafr, mask = GPIO_bit(gpio);
44 int fn;
45
46 fn = MFP_AF(c);
47 if (fn > 3)
48 return -EINVAL;
49
50 /* alternate function and direction */
51 gafr = GAFR(gpio) & ~(0x3 << ((gpio & 0xf) * 2));
52 GAFR(gpio) = gafr | (fn << ((gpio & 0xf) * 2));
53
54 if (c & MFP_DIR_OUT)
55 GPDR(gpio) |= mask;
56 else
57 GPDR(gpio) &= ~mask;
58
59 /* low power state */
60 switch (c & MFP_LPM_STATE_MASK) {
61 case MFP_LPM_DRIVE_HIGH:
62 PGSR(gpio) |= mask;
63 break;
64 case MFP_LPM_DRIVE_LOW:
65 PGSR(gpio) &= ~mask;
66 break;
67 case MFP_LPM_INPUT:
68 break;
69 default:
70 pr_warning("%s: invalid low power state for GPIO%d\n",
71 __func__, gpio);
72 return -EINVAL;
73 }
74
75 /* give early warning if MFP_LPM_CAN_WAKEUP is set on the
76 * configurations of those pins not able to wakeup
77 */
78 if ((c & MFP_LPM_CAN_WAKEUP) && !gpio_desc[gpio].can_wakeup) {
79 pr_warning("%s: GPIO%d unable to wakeup\n",
80 __func__, gpio);
81 return -EINVAL;
82 }
83
84 if ((c & MFP_LPM_CAN_WAKEUP) && (c & MFP_DIR_OUT)) {
85 pr_warning("%s: output GPIO%d unable to wakeup\n",
86 __func__, gpio);
87 return -EINVAL;
88 }
89
90 return 0;
91}
92
93void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
94{
95 unsigned long flags;
96 unsigned long *c;
97 int i, gpio;
98
99 for (i = 0, c = mfp_cfgs; i < num; i++, c++) {
100
101 gpio = mfp_to_gpio(MFP_PIN(*c));
102
103 if (!gpio_desc[gpio].valid) {
104 pr_warning("%s: GPIO%d is invalid pin\n",
105 __func__, gpio);
106 continue;
107 }
108
109 local_irq_save(flags);
110
111 gpio_desc[gpio].config = *c;
112 __mfp_config_gpio(gpio, *c);
113
114 local_irq_restore(flags);
115 }
116}
117
118int gpio_set_wake(unsigned int gpio, unsigned int on)
119{
120 struct gpio_desc *d;
121 unsigned long c;
122
123 if (gpio > mfp_to_gpio(MFP_PIN_GPIO127))
124 return -EINVAL;
125
126 d = &gpio_desc[gpio];
127 c = d->config;
128
129 if (!d->valid)
130 return -EINVAL;
131
132 if (d->keypad_gpio)
133 return -EINVAL;
134
135 if (d->can_wakeup && (c & MFP_LPM_CAN_WAKEUP)) {
136 if (on) {
137 PWER |= d->mask;
138
139 if (c & MFP_LPM_EDGE_RISE)
140 PRER |= d->mask;
141 else
142 PRER &= ~d->mask;
143
144 if (c & MFP_LPM_EDGE_FALL)
145 PFER |= d->mask;
146 else
147 PFER &= ~d->mask;
148 } else {
149 PWER &= ~d->mask;
150 PRER &= ~d->mask;
151 PFER &= ~d->mask;
152 }
153 }
154 return 0;
155}
156
157#ifdef CONFIG_PXA25x
158static int __init pxa25x_mfp_init(void)
159{
160 int i;
161
162 if (cpu_is_pxa25x()) {
163 for (i = 0; i <= 84; i++)
164 gpio_desc[i].valid = 1;
165
166 for (i = 0; i <= 15; i++) {
167 gpio_desc[i].can_wakeup = 1;
168 gpio_desc[i].mask = GPIO_bit(i);
169 }
170 }
171
172 return 0;
173}
174postcore_initcall(pxa25x_mfp_init);
175#endif /* CONFIG_PXA25x */
176
177#ifdef CONFIG_PXA27x
178static int pxa27x_pkwr_gpio[] = {
179 13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
180 95, 96, 97, 98, 99, 100, 101, 102
181};
182
183int keypad_set_wake(unsigned int on)
184{
185 unsigned int i, gpio, mask = 0;
186
187 if (!on) {
188 PKWR = 0;
189 return 0;
190 }
191
192 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
193
194 gpio = pxa27x_pkwr_gpio[i];
195
196 if (gpio_desc[gpio].config & MFP_LPM_CAN_WAKEUP)
197 mask |= gpio_desc[gpio].mask;
198 }
199
200 PKWR = mask;
201 return 0;
202}
203
204static int __init pxa27x_mfp_init(void)
205{
206 int i, gpio;
207
208 if (cpu_is_pxa27x()) {
209 for (i = 0; i <= 120; i++) {
210 /* skip GPIO2, 5, 6, 7, 8, they are not
211 * valid pins allow configuration
212 */
213 if (i == 2 || i == 5 || i == 6 ||
214 i == 7 || i == 8)
215 continue;
216
217 gpio_desc[i].valid = 1;
218 }
219
220 /* Keypad GPIOs */
221 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
222 gpio = pxa27x_pkwr_gpio[i];
223 gpio_desc[gpio].can_wakeup = 1;
224 gpio_desc[gpio].keypad_gpio = 1;
225 gpio_desc[gpio].mask = 1 << i;
226 }
227
228 /* Overwrite GPIO13 as a PWER wakeup source */
229 for (i = 0; i <= 15; i++) {
230 /* skip GPIO2, 5, 6, 7, 8 */
231 if (GPIO_bit(i) & 0x1e4)
232 continue;
233
234 gpio_desc[i].can_wakeup = 1;
235 gpio_desc[i].mask = GPIO_bit(i);
236 }
237
238 gpio_desc[35].can_wakeup = 1;
239 gpio_desc[35].mask = PWER_WE35;
240 }
241
242 return 0;
243}
244postcore_initcall(pxa27x_mfp_init);
245#endif /* CONFIG_PXA27x */
diff --git a/arch/arm/mach-pxa/mfp.c b/arch/arm/mach-pxa/mfp-pxa3xx.c
index f5809adce298..b84c3ba7a8d6 100644
--- a/arch/arm/mach-pxa/mfp.c
+++ b/arch/arm/mach-pxa/mfp-pxa3xx.c
@@ -234,22 +234,22 @@ static int pxa3xx_mfp_resume(struct sys_device *d)
234 234
235 return 0; 235 return 0;
236} 236}
237#else
238#define pxa3xx_mfp_suspend NULL
239#define pxa3xx_mfp_resume NULL
240#endif
237 241
238static struct sysdev_class mfp_sysclass = { 242struct sysdev_class pxa3xx_mfp_sysclass = {
239 .name = "mfp", 243 .name = "mfp",
240 .suspend = pxa3xx_mfp_suspend, 244 .suspend = pxa3xx_mfp_suspend,
241 .resume = pxa3xx_mfp_resume, 245 .resume = pxa3xx_mfp_resume,
242}; 246};
243 247
244static struct sys_device mfp_device = {
245 .id = 0,
246 .cls = &mfp_sysclass,
247};
248
249static int __init mfp_init_devicefs(void) 248static int __init mfp_init_devicefs(void)
250{ 249{
251 sysdev_class_register(&mfp_sysclass); 250 if (cpu_is_pxa3xx())
252 return sysdev_register(&mfp_device); 251 return sysdev_class_register(&pxa3xx_mfp_sysclass);
252
253 return 0;
253} 254}
254device_initcall(mfp_init_devicefs); 255postcore_initcall(mfp_init_devicefs);
255#endif
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index c14696b9979d..3b945eb0aee3 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -29,6 +29,7 @@
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/arch/hardware.h> 30#include <asm/arch/hardware.h>
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/pxa2xx-gpio.h>
32#include <asm/arch/pxa2xx-regs.h> 33#include <asm/arch/pxa2xx-regs.h>
33#include <asm/arch/pxa2xx_spi.h> 34#include <asm/arch/pxa2xx_spi.h>
34#include <asm/arch/pcm027.h> 35#include <asm/arch/pcm027.h>
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 3dda16a20049..e6be9d0aeccf 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -23,8 +23,16 @@
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/ide.h> 25#include <linux/ide.h>
26#include <linux/i2c.h>
27
28#include <media/soc_camera.h>
29
30#include <asm/gpio.h>
31#include <asm/arch/i2c.h>
32#include <asm/arch/camera.h>
26#include <asm/mach/map.h> 33#include <asm/mach/map.h>
27#include <asm/arch/pxa-regs.h> 34#include <asm/arch/pxa-regs.h>
35#include <asm/arch/pxa2xx-gpio.h>
28#include <asm/arch/mmc.h> 36#include <asm/arch/mmc.h>
29#include <asm/arch/ohci.h> 37#include <asm/arch/ohci.h>
30#include <asm/arch/pcm990_baseboard.h> 38#include <asm/arch/pcm990_baseboard.h>
@@ -258,6 +266,76 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = {
258}; 266};
259 267
260/* 268/*
269 * PXA27x Camera specific stuff
270 */
271#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
272static int pcm990_pxacamera_init(struct device *dev)
273{
274 pxa_gpio_mode(GPIO98_CIF_DD_0_MD);
275 pxa_gpio_mode(GPIO105_CIF_DD_1_MD);
276 pxa_gpio_mode(GPIO104_CIF_DD_2_MD);
277 pxa_gpio_mode(GPIO103_CIF_DD_3_MD);
278 pxa_gpio_mode(GPIO95_CIF_DD_4_MD);
279 pxa_gpio_mode(GPIO94_CIF_DD_5_MD);
280 pxa_gpio_mode(GPIO93_CIF_DD_6_MD);
281 pxa_gpio_mode(GPIO108_CIF_DD_7_MD);
282 pxa_gpio_mode(GPIO107_CIF_DD_8_MD);
283 pxa_gpio_mode(GPIO106_CIF_DD_9_MD);
284 pxa_gpio_mode(GPIO42_CIF_MCLK_MD);
285 pxa_gpio_mode(GPIO45_CIF_PCLK_MD);
286 pxa_gpio_mode(GPIO43_CIF_FV_MD);
287 pxa_gpio_mode(GPIO44_CIF_LV_MD);
288
289 return 0;
290}
291
292/*
293 * CICR4: PCLK_EN: Pixel clock is supplied by the sensor
294 * MCLK_EN: Master clock is generated by PXA
295 * PCP: Data sampled on the falling edge of pixel clock
296 */
297struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
298 .init = pcm990_pxacamera_init,
299 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
300 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
301 .mclk_10khz = 1000,
302};
303
304#include <linux/i2c/pca953x.h>
305
306static struct pca953x_platform_data pca9536_data = {
307 .gpio_base = NR_BUILTIN_GPIO + 1,
308};
309
310static struct soc_camera_link iclink[] = {
311 {
312 .bus_id = 0, /* Must match with the camera ID above */
313 .gpio = NR_BUILTIN_GPIO + 1,
314 }, {
315 .bus_id = 0, /* Must match with the camera ID above */
316 }
317};
318
319/* Board I2C devices. */
320static struct i2c_board_info __initdata pcm990_i2c_devices[] = {
321 {
322 /* Must initialize before the camera(s) */
323 I2C_BOARD_INFO("pca953x", 0x41),
324 .type = "pca9536",
325 .platform_data = &pca9536_data,
326 }, {
327 I2C_BOARD_INFO("mt9v022", 0x48),
328 .type = "mt9v022",
329 .platform_data = &iclink[0], /* With extender */
330 }, {
331 I2C_BOARD_INFO("mt9m001", 0x5d),
332 .type = "mt9m001",
333 .platform_data = &iclink[0], /* With extender */
334 },
335};
336#endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */
337
338/*
261 * AC97 support 339 * AC97 support
262 * Note: The connected AC97 mixer also reports interrupts at PCM990_AC97_IRQ 340 * Note: The connected AC97 mixer also reports interrupts at PCM990_AC97_IRQ
263 */ 341 */
@@ -326,5 +404,14 @@ void __init pcm990_baseboard_init(void)
326 /* USB host */ 404 /* USB host */
327 pxa_set_ohci_info(&pcm990_ohci_platform_data); 405 pxa_set_ohci_info(&pcm990_ohci_platform_data);
328 406
407 pxa_set_i2c_info(NULL);
408
409#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
410 pxa_set_camera_info(&pcm990_pxacamera_platform_data);
411
412 i2c_register_board_info(0, pcm990_i2c_devices,
413 ARRAY_SIZE(pcm990_i2c_devices));
414#endif
415
329 printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); 416 printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n");
330} 417}
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 209eabf0ed3e..ca5ac196b47b 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -32,6 +32,7 @@
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <asm/arch/pxa-regs.h>
35#include <asm/arch/pxa2xx-gpio.h>
35#include <asm/arch/mmc.h> 36#include <asm/arch/mmc.h>
36#include <asm/arch/udc.h> 37#include <asm/arch/udc.h>
37#include <asm/arch/irda.h> 38#include <asm/arch/irda.h>
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 599e53fcc2c5..d9b5450aee5b 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -26,6 +26,7 @@
26#include <asm/hardware.h> 26#include <asm/hardware.h>
27#include <asm/arch/irqs.h> 27#include <asm/arch/irqs.h>
28#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
29#include <asm/arch/mfp-pxa25x.h>
29#include <asm/arch/pm.h> 30#include <asm/arch/pm.h>
30#include <asm/arch/dma.h> 31#include <asm/arch/dma.h>
31 32
@@ -129,6 +130,8 @@ static struct clk pxa25x_clks[] = {
129 INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev), 130 INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
130 INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev), 131 INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
131 132
133 INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL),
134
132 /* 135 /*
133 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), 136 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
134 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), 137 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
@@ -228,24 +231,10 @@ static inline void pxa25x_init_pm(void) {}
228static int pxa25x_set_wake(unsigned int irq, unsigned int on) 231static int pxa25x_set_wake(unsigned int irq, unsigned int on)
229{ 232{
230 int gpio = IRQ_TO_GPIO(irq); 233 int gpio = IRQ_TO_GPIO(irq);
231 uint32_t gpio_bit, mask = 0; 234 uint32_t mask = 0;
232 235
233 if (gpio >= 0 && gpio <= 15) { 236 if (gpio >= 0 && gpio < 85)
234 gpio_bit = GPIO_bit(gpio); 237 return gpio_set_wake(gpio, on);
235 mask = gpio_bit;
236 if (on) {
237 if (GRER(gpio) | gpio_bit)
238 PRER |= gpio_bit;
239 else
240 PRER &= ~gpio_bit;
241
242 if (GFER(gpio) | gpio_bit)
243 PFER |= gpio_bit;
244 else
245 PFER &= ~gpio_bit;
246 }
247 goto set_pwer;
248 }
249 238
250 if (irq == IRQ_RTCAlrm) { 239 if (irq == IRQ_RTCAlrm) {
251 mask = PWER_RTC; 240 mask = PWER_RTC;
@@ -265,9 +254,8 @@ set_pwer:
265 254
266void __init pxa25x_init_irq(void) 255void __init pxa25x_init_irq(void)
267{ 256{
268 pxa_init_irq_low(); 257 pxa_init_irq(32, pxa25x_set_wake);
269 pxa_init_irq_gpio(85); 258 pxa_init_gpio(85, pxa25x_set_wake);
270 pxa_init_irq_set_wake(pxa25x_set_wake);
271} 259}
272 260
273static struct platform_device *pxa25x_devices[] __initdata = { 261static struct platform_device *pxa25x_devices[] __initdata = {
@@ -325,4 +313,4 @@ static int __init pxa25x_init(void)
325 return ret; 313 return ret;
326} 314}
327 315
328subsys_initcall(pxa25x_init); 316postcore_initcall(pxa25x_init);
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 46a951c3e5a0..7a2449dd0fd4 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -23,6 +23,7 @@
23#include <asm/arch/irqs.h> 23#include <asm/arch/irqs.h>
24#include <asm/arch/pxa-regs.h> 24#include <asm/arch/pxa-regs.h>
25#include <asm/arch/pxa2xx-regs.h> 25#include <asm/arch/pxa2xx-regs.h>
26#include <asm/arch/mfp-pxa27x.h>
26#include <asm/arch/ohci.h> 27#include <asm/arch/ohci.h>
27#include <asm/arch/pm.h> 28#include <asm/arch/pm.h>
28#include <asm/arch/dma.h> 29#include <asm/arch/dma.h>
@@ -151,12 +152,15 @@ static struct clk pxa27x_clks[] = {
151 152
152 INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev), 153 INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev),
153 INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), 154 INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
154 INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL), 155 INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
155 156
156 INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), 157 INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
157 INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), 158 INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
158 INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), 159 INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
159 160
161 INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL),
162 INIT_CKEN("AC97CONFCLK", AC97CONF, 24576000, 0, NULL),
163
160 /* 164 /*
161 INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL), 165 INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
162 INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL), 166 INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
@@ -283,37 +287,16 @@ static inline void pxa27x_init_pm(void) {}
283/* PXA27x: Various gpios can issue wakeup events. This logic only 287/* PXA27x: Various gpios can issue wakeup events. This logic only
284 * handles the simple cases, not the WEMUX2 and WEMUX3 options 288 * handles the simple cases, not the WEMUX2 and WEMUX3 options
285 */ 289 */
286#define PXA27x_GPIO_NOWAKE_MASK \
287 ((1 << 8) | (1 << 7) | (1 << 6) | (1 << 5) | (1 << 2))
288#define WAKEMASK(gpio) \
289 (((gpio) <= 15) \
290 ? ((1 << (gpio)) & ~PXA27x_GPIO_NOWAKE_MASK) \
291 : ((gpio == 35) ? (1 << 24) : 0))
292
293static int pxa27x_set_wake(unsigned int irq, unsigned int on) 290static int pxa27x_set_wake(unsigned int irq, unsigned int on)
294{ 291{
295 int gpio = IRQ_TO_GPIO(irq); 292 int gpio = IRQ_TO_GPIO(irq);
296 uint32_t mask; 293 uint32_t mask;
297 294
298 if ((gpio >= 0 && gpio <= 15) || (gpio == 35)) { 295 if (gpio >= 0 && gpio < 128)
299 if (WAKEMASK(gpio) == 0) 296 return gpio_set_wake(gpio, on);
300 return -EINVAL;
301
302 mask = WAKEMASK(gpio);
303
304 if (on) {
305 if (GRER(gpio) | GPIO_bit(gpio))
306 PRER |= mask;
307 else
308 PRER &= ~mask;
309 297
310 if (GFER(gpio) | GPIO_bit(gpio)) 298 if (irq == IRQ_KEYPAD)
311 PFER |= mask; 299 return keypad_set_wake(on);
312 else
313 PFER &= ~mask;
314 }
315 goto set_pwer;
316 }
317 300
318 switch (irq) { 301 switch (irq) {
319 case IRQ_RTCAlrm: 302 case IRQ_RTCAlrm:
@@ -326,7 +309,6 @@ static int pxa27x_set_wake(unsigned int irq, unsigned int on)
326 return -EINVAL; 309 return -EINVAL;
327 } 310 }
328 311
329set_pwer:
330 if (on) 312 if (on)
331 PWER |= mask; 313 PWER |= mask;
332 else 314 else
@@ -337,10 +319,8 @@ set_pwer:
337 319
338void __init pxa27x_init_irq(void) 320void __init pxa27x_init_irq(void)
339{ 321{
340 pxa_init_irq_low(); 322 pxa_init_irq(34, pxa27x_set_wake);
341 pxa_init_irq_high(); 323 pxa_init_gpio(128, pxa27x_set_wake);
342 pxa_init_irq_gpio(128);
343 pxa_init_irq_set_wake(pxa27x_set_wake);
344} 324}
345 325
346/* 326/*
@@ -386,10 +366,6 @@ static struct platform_device *devices[] __initdata = {
386 366
387static struct sys_device pxa27x_sysdev[] = { 367static struct sys_device pxa27x_sysdev[] = {
388 { 368 {
389 .id = 0,
390 .cls = &pxa_irq_sysclass,
391 }, {
392 .id = 1,
393 .cls = &pxa_irq_sysclass, 369 .cls = &pxa_irq_sysclass,
394 }, { 370 }, {
395 .cls = &pxa_gpio_sysclass, 371 .cls = &pxa_gpio_sysclass,
@@ -420,4 +396,4 @@ static int __init pxa27x_init(void)
420 return ret; 396 return ret;
421} 397}
422 398
423subsys_initcall(pxa27x_init); 399postcore_initcall(pxa27x_init);
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 35f25fdaeba3..dde355e88fa1 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -110,6 +110,25 @@ unsigned int pxa3xx_get_memclk_frequency_10khz(void)
110} 110}
111 111
112/* 112/*
113 * Return the current AC97 clock frequency.
114 */
115static unsigned long clk_pxa3xx_ac97_getrate(struct clk *clk)
116{
117 unsigned long rate = 312000000;
118 unsigned long ac97_div;
119
120 ac97_div = AC97_DIV;
121
122 /* This may loose precision for some rates but won't for the
123 * standard 24.576MHz.
124 */
125 rate /= (ac97_div >> 12) & 0x7fff;
126 rate *= (ac97_div & 0xfff);
127
128 return rate;
129}
130
131/*
113 * Return the current HSIO bus clock frequency 132 * Return the current HSIO bus clock frequency
114 */ 133 */
115static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk) 134static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk)
@@ -156,6 +175,27 @@ static const struct clkops clk_pxa3xx_hsio_ops = {
156 .getrate = clk_pxa3xx_hsio_getrate, 175 .getrate = clk_pxa3xx_hsio_getrate,
157}; 176};
158 177
178static const struct clkops clk_pxa3xx_ac97_ops = {
179 .enable = clk_pxa3xx_cken_enable,
180 .disable = clk_pxa3xx_cken_disable,
181 .getrate = clk_pxa3xx_ac97_getrate,
182};
183
184static void clk_pout_enable(struct clk *clk)
185{
186 OSCC |= OSCC_PEN;
187}
188
189static void clk_pout_disable(struct clk *clk)
190{
191 OSCC &= ~OSCC_PEN;
192}
193
194static const struct clkops clk_pout_ops = {
195 .enable = clk_pout_enable,
196 .disable = clk_pout_disable,
197};
198
159#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ 199#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
160 { \ 200 { \
161 .name = _name, \ 201 .name = _name, \
@@ -175,8 +215,16 @@ static const struct clkops clk_pxa3xx_hsio_ops = {
175 } 215 }
176 216
177static struct clk pxa3xx_clks[] = { 217static struct clk pxa3xx_clks[] = {
178 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), 218 {
179 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), 219 .name = "CLK_POUT",
220 .ops = &clk_pout_ops,
221 .rate = 13000000,
222 .delay = 70,
223 },
224
225 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
226 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
227 PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL),
180 228
181 PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), 229 PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
182 PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), 230 PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
@@ -185,6 +233,7 @@ static struct clk pxa3xx_clks[] = {
185 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), 233 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
186 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), 234 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
187 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), 235 PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
236 PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
188 237
189 PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), 238 PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
190 PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), 239 PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
@@ -305,8 +354,10 @@ static void pxa3xx_cpu_pm_enter(suspend_state_t state)
305 /* 354 /*
306 * Don't sleep if no wakeup sources are defined 355 * Don't sleep if no wakeup sources are defined
307 */ 356 */
308 if (wakeup_src == 0) 357 if (wakeup_src == 0) {
358 printk(KERN_ERR "Not suspending: no wakeup sources\n");
309 return; 359 return;
360 }
310 361
311 switch (state) { 362 switch (state) {
312 case PM_SUSPEND_STANDBY: 363 case PM_SUSPEND_STANDBY:
@@ -446,15 +497,9 @@ static int pxa3xx_set_wake(unsigned int irq, unsigned int on)
446 497
447 return 0; 498 return 0;
448} 499}
449
450static void pxa3xx_init_irq_pm(void)
451{
452 pxa_init_irq_set_wake(pxa3xx_set_wake);
453}
454
455#else 500#else
456static inline void pxa3xx_init_pm(void) {} 501static inline void pxa3xx_init_pm(void) {}
457static inline void pxa3xx_init_irq_pm(void) {} 502#define pxa3xx_set_wake NULL
458#endif 503#endif
459 504
460void __init pxa3xx_init_irq(void) 505void __init pxa3xx_init_irq(void)
@@ -465,10 +510,8 @@ void __init pxa3xx_init_irq(void)
465 value |= (1 << 6); 510 value |= (1 << 6);
466 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value)); 511 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value));
467 512
468 pxa_init_irq_low(); 513 pxa_init_irq(56, pxa3xx_set_wake);
469 pxa_init_irq_high(); 514 pxa_init_gpio(128, NULL);
470 pxa_init_irq_gpio(128);
471 pxa3xx_init_irq_pm();
472} 515}
473 516
474/* 517/*
@@ -490,11 +533,9 @@ static struct platform_device *devices[] __initdata = {
490 533
491static struct sys_device pxa3xx_sysdev[] = { 534static struct sys_device pxa3xx_sysdev[] = {
492 { 535 {
493 .id = 0,
494 .cls = &pxa_irq_sysclass, 536 .cls = &pxa_irq_sysclass,
495 }, { 537 }, {
496 .id = 1, 538 .cls = &pxa3xx_mfp_sysclass,
497 .cls = &pxa_irq_sysclass,
498 }, { 539 }, {
499 .cls = &pxa_gpio_sysclass, 540 .cls = &pxa_gpio_sysclass,
500 }, 541 },
@@ -532,4 +573,4 @@ static int __init pxa3xx_init(void)
532 return ret; 573 return ret;
533} 574}
534 575
535subsys_initcall(pxa3xx_init); 576postcore_initcall(pxa3xx_init);
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index f9d1b61e1185..34cd585075b0 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -26,6 +26,7 @@
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/arch/pm.h> 27#include <asm/arch/pm.h>
28#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
29#include <asm/arch/pxa2xx-gpio.h>
29#include <asm/arch/sharpsl.h> 30#include <asm/arch/sharpsl.h>
30#include "sharpsl.h" 31#include "sharpsl.h"
31 32
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 9e7773fca01c..62a02c3927c5 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -37,6 +37,7 @@
37 37
38#include <asm/arch/pxa-regs.h> 38#include <asm/arch/pxa-regs.h>
39#include <asm/arch/pxa2xx-regs.h> 39#include <asm/arch/pxa2xx-regs.h>
40#include <asm/arch/pxa2xx-gpio.h>
40#include <asm/arch/irda.h> 41#include <asm/arch/irda.h>
41#include <asm/arch/mmc.h> 42#include <asm/arch/mmc.h>
42#include <asm/arch/ohci.h> 43#include <asm/arch/ohci.h>
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 745a4dc7acdd..7a7f5f947cc5 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -26,6 +26,7 @@
26#include <asm/arch/sharpsl.h> 26#include <asm/arch/sharpsl.h>
27#include <asm/arch/spitz.h> 27#include <asm/arch/spitz.h>
28#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
29#include <asm/arch/pxa2xx-gpio.h>
29#include "sharpsl.h" 30#include "sharpsl.h"
30 31
31#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 32#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index f99112d50b41..6458f6d371d9 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -23,6 +23,7 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/gpio_keys.h> 24#include <linux/gpio_keys.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/gpio.h>
26 27
27#include <asm/setup.h> 28#include <asm/setup.h>
28#include <asm/memory.h> 29#include <asm/memory.h>
@@ -32,7 +33,9 @@
32#include <asm/system.h> 33#include <asm/system.h>
33#include <asm/arch/pxa-regs.h> 34#include <asm/arch/pxa-regs.h>
34#include <asm/arch/pxa2xx-regs.h> 35#include <asm/arch/pxa2xx-regs.h>
36#include <asm/arch/mfp-pxa25x.h>
35#include <asm/arch/irda.h> 37#include <asm/arch/irda.h>
38#include <asm/arch/i2c.h>
36#include <asm/arch/mmc.h> 39#include <asm/arch/mmc.h>
37#include <asm/arch/udc.h> 40#include <asm/arch/udc.h>
38 41
@@ -47,6 +50,110 @@
47#include "generic.h" 50#include "generic.h"
48#include "devices.h" 51#include "devices.h"
49 52
53static unsigned long tosa_pin_config[] = {
54 GPIO78_nCS_2, /* Scoop */
55 GPIO80_nCS_4, /* tg6393xb */
56 GPIO33_nCS_5, /* Scoop */
57
58 // GPIO76 CARD_VCC_ON1
59
60 GPIO19_GPIO, /* Reset out */
61 GPIO1_RST | WAKEUP_ON_EDGE_FALL,
62
63 GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* WAKE_UP */
64 GPIO2_GPIO | WAKEUP_ON_EDGE_BOTH, /* AC_IN */
65 GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* RECORD */
66 GPIO4_GPIO | WAKEUP_ON_EDGE_FALL, /* SYNC */
67 GPIO20_GPIO, /* EAR_IN */
68 GPIO22_GPIO, /* On */
69
70 GPIO5_GPIO, /* USB_IN */
71 GPIO32_GPIO, /* Pen IRQ */
72
73 GPIO7_GPIO, /* Jacket Detect */
74 GPIO14_GPIO, /* BAT0_CRG */
75 GPIO12_GPIO, /* BAT1_CRG */
76 GPIO17_GPIO, /* BAT0_LOW */
77 GPIO84_GPIO, /* BAT1_LOW */
78 GPIO38_GPIO, /* BAT_LOCK */
79
80 GPIO11_3_6MHz,
81 GPIO15_GPIO, /* TC6393XB IRQ */
82 GPIO18_RDY,
83 GPIO27_GPIO, /* LCD Sync */
84
85 /* MMC */
86 GPIO6_MMC_CLK,
87 GPIO8_MMC_CS0,
88 GPIO9_GPIO, /* Detect */
89 // GPIO10 nSD_INT
90
91 /* CF */
92 GPIO13_GPIO, /* CD_IRQ */
93 GPIO21_GPIO, /* Main Slot IRQ */
94 GPIO36_GPIO, /* Jacket Slot IRQ */
95 GPIO48_nPOE,
96 GPIO49_nPWE,
97 GPIO50_nPIOR,
98 GPIO51_nPIOW,
99 GPIO52_nPCE_1,
100 GPIO53_nPCE_2,
101 GPIO54_nPSKTSEL,
102 GPIO55_nPREG,
103 GPIO56_nPWAIT,
104 GPIO57_nIOIS16,
105
106 /* AC97 */
107 GPIO31_AC97_SYNC,
108 GPIO30_AC97_SDATA_OUT,
109 GPIO28_AC97_BITCLK,
110 GPIO29_AC97_SDATA_IN_0,
111 // GPIO79 nAUD_IRQ
112
113 /* FFUART */
114 GPIO34_FFUART_RXD,
115 GPIO35_FFUART_CTS,
116 GPIO37_FFUART_DSR,
117 GPIO39_FFUART_TXD,
118 GPIO40_FFUART_DTR,
119 GPIO41_FFUART_RTS,
120
121 /* BTUART */
122 GPIO42_BTUART_RXD,
123 GPIO43_BTUART_TXD,
124 GPIO44_BTUART_CTS,
125 GPIO45_BTUART_RTS,
126
127 /* IrDA */
128 GPIO46_STUART_RXD,
129 GPIO47_STUART_TXD,
130
131 /* Keybd */
132 GPIO58_GPIO,
133 GPIO59_GPIO,
134 GPIO60_GPIO,
135 GPIO61_GPIO,
136 GPIO62_GPIO,
137 GPIO63_GPIO,
138 GPIO64_GPIO,
139 GPIO65_GPIO,
140 GPIO66_GPIO,
141 GPIO67_GPIO,
142 GPIO68_GPIO,
143 GPIO69_GPIO,
144 GPIO70_GPIO,
145 GPIO71_GPIO,
146 GPIO72_GPIO,
147 GPIO73_GPIO,
148 GPIO74_GPIO,
149 GPIO75_GPIO,
150
151 /* SPI */
152 GPIO81_SSP2_CLK_OUT,
153 GPIO82_SSP2_FRM_OUT,
154 GPIO83_SSP2_TXD,
155};
156
50/* 157/*
51 * SCOOP Device 158 * SCOOP Device
52 */ 159 */
@@ -60,11 +167,10 @@ static struct resource tosa_scoop_resources[] = {
60 167
61static struct scoop_config tosa_scoop_setup = { 168static struct scoop_config tosa_scoop_setup = {
62 .io_dir = TOSA_SCOOP_IO_DIR, 169 .io_dir = TOSA_SCOOP_IO_DIR,
63 .io_out = TOSA_SCOOP_IO_OUT, 170 .gpio_base = TOSA_SCOOP_GPIO_BASE,
64
65}; 171};
66 172
67struct platform_device tosascoop_device = { 173static struct platform_device tosascoop_device = {
68 .name = "sharp-scoop", 174 .name = "sharp-scoop",
69 .id = 0, 175 .id = 0,
70 .dev = { 176 .dev = {
@@ -88,10 +194,10 @@ static struct resource tosa_scoop_jc_resources[] = {
88 194
89static struct scoop_config tosa_scoop_jc_setup = { 195static struct scoop_config tosa_scoop_jc_setup = {
90 .io_dir = TOSA_SCOOP_JC_IO_DIR, 196 .io_dir = TOSA_SCOOP_JC_IO_DIR,
91 .io_out = TOSA_SCOOP_JC_IO_OUT, 197 .gpio_base = TOSA_SCOOP_JC_GPIO_BASE,
92}; 198};
93 199
94struct platform_device tosascoop_jc_device = { 200static struct platform_device tosascoop_jc_device = {
95 .name = "sharp-scoop", 201 .name = "sharp-scoop",
96 .id = 1, 202 .id = 1,
97 .dev = { 203 .dev = {
@@ -118,50 +224,16 @@ static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
118}, 224},
119}; 225};
120 226
121static void tosa_pcmcia_init(void)
122{
123 /* Setup default state of GPIO outputs
124 before we enable them as outputs. */
125 GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
126 GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
127 GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
128 GPIO_bit(GPIO53_nPCE_2);
129
130 pxa_gpio_mode(GPIO48_nPOE_MD);
131 pxa_gpio_mode(GPIO49_nPWE_MD);
132 pxa_gpio_mode(GPIO50_nPIOR_MD);
133 pxa_gpio_mode(GPIO51_nPIOW_MD);
134 pxa_gpio_mode(GPIO55_nPREG_MD);
135 pxa_gpio_mode(GPIO56_nPWAIT_MD);
136 pxa_gpio_mode(GPIO57_nIOIS16_MD);
137 pxa_gpio_mode(GPIO52_nPCE_1_MD);
138 pxa_gpio_mode(GPIO53_nPCE_2_MD);
139 pxa_gpio_mode(GPIO54_pSKTSEL_MD);
140}
141
142static struct scoop_pcmcia_config tosa_pcmcia_config = { 227static struct scoop_pcmcia_config tosa_pcmcia_config = {
143 .devs = &tosa_pcmcia_scoop[0], 228 .devs = &tosa_pcmcia_scoop[0],
144 .num_devs = 2, 229 .num_devs = 2,
145 .pcmcia_init = tosa_pcmcia_init,
146}; 230};
147 231
148/* 232/*
149 * USB Device Controller 233 * USB Device Controller
150 */ 234 */
151static void tosa_udc_command(int cmd)
152{
153 switch(cmd) {
154 case PXA2XX_UDC_CMD_CONNECT:
155 set_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP);
156 break;
157 case PXA2XX_UDC_CMD_DISCONNECT:
158 reset_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP);
159 break;
160 }
161}
162
163static struct pxa2xx_udc_mach_info udc_info __initdata = { 235static struct pxa2xx_udc_mach_info udc_info __initdata = {
164 .udc_command = tosa_udc_command, 236 .gpio_pullup = TOSA_GPIO_USB_PULLUP,
165 .gpio_vbus = TOSA_GPIO_USB_IN, 237 .gpio_vbus = TOSA_GPIO_USB_IN,
166 .gpio_vbus_inverted = 1, 238 .gpio_vbus_inverted = 1,
167}; 239};
@@ -175,19 +247,44 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
175{ 247{
176 int err; 248 int err;
177 249
178 /* setup GPIO for PXA25x MMC controller */
179 pxa_gpio_mode(GPIO6_MMCCLK_MD);
180 pxa_gpio_mode(GPIO8_MMCCS0_MD);
181 pxa_gpio_mode(TOSA_GPIO_nSD_DETECT | GPIO_IN);
182
183 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); 250 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
184 251
185 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, 252 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int,
186 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 253 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
187 "MMC/SD card detect", data); 254 "MMC/SD card detect", data);
188 if (err) 255 if (err) {
189 printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 256 printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
257 goto err_irq;
258 }
190 259
260 err = gpio_request(TOSA_GPIO_SD_WP, "sd_wp");
261 if (err) {
262 printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n");
263 goto err_gpio_wp;
264 }
265 err = gpio_direction_input(TOSA_GPIO_SD_WP);
266 if (err)
267 goto err_gpio_wp_dir;
268
269 err = gpio_request(TOSA_GPIO_PWR_ON, "sd_pwr");
270 if (err) {
271 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
272 goto err_gpio_pwr;
273 }
274 err = gpio_direction_output(TOSA_GPIO_PWR_ON, 0);
275 if (err)
276 goto err_gpio_pwr_dir;
277
278 return 0;
279
280err_gpio_pwr_dir:
281 gpio_free(TOSA_GPIO_PWR_ON);
282err_gpio_pwr:
283err_gpio_wp_dir:
284 gpio_free(TOSA_GPIO_SD_WP);
285err_gpio_wp:
286 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
287err_irq:
191 return err; 288 return err;
192} 289}
193 290
@@ -196,19 +293,21 @@ static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
196 struct pxamci_platform_data* p_d = dev->platform_data; 293 struct pxamci_platform_data* p_d = dev->platform_data;
197 294
198 if (( 1 << vdd) & p_d->ocr_mask) { 295 if (( 1 << vdd) & p_d->ocr_mask) {
199 set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); 296 gpio_set_value(TOSA_GPIO_PWR_ON, 1);
200 } else { 297 } else {
201 reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); 298 gpio_set_value(TOSA_GPIO_PWR_ON, 0);
202 } 299 }
203} 300}
204 301
205static int tosa_mci_get_ro(struct device *dev) 302static int tosa_mci_get_ro(struct device *dev)
206{ 303{
207 return (read_scoop_reg(&tosascoop_device.dev, SCOOP_GPWR)&TOSA_SCOOP_SD_WP); 304 return gpio_get_value(TOSA_GPIO_SD_WP);
208} 305}
209 306
210static void tosa_mci_exit(struct device *dev, void *data) 307static void tosa_mci_exit(struct device *dev, void *data)
211{ 308{
309 gpio_free(TOSA_GPIO_PWR_ON);
310 gpio_free(TOSA_GPIO_SD_WP);
212 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); 311 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
213} 312}
214 313
@@ -223,21 +322,36 @@ static struct pxamci_platform_data tosa_mci_platform_data = {
223/* 322/*
224 * Irda 323 * Irda
225 */ 324 */
226static void tosa_irda_transceiver_mode(struct device *dev, int mode) 325static int tosa_irda_startup(struct device *dev)
227{ 326{
228 if (mode & IR_OFF) { 327 int ret;
229 reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); 328
230 pxa_gpio_mode(GPIO47_STTXD|GPIO_DFLT_LOW); 329 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown");
231 pxa_gpio_mode(GPIO47_STTXD|GPIO_OUT); 330 if (ret)
232 } else { 331 return ret;
233 pxa_gpio_mode(GPIO47_STTXD_MD); 332
234 set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); 333 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0);
334 if (ret)
335 gpio_free(TOSA_GPIO_IR_POWERDWN);
336
337 return ret;
235 } 338 }
339
340static void tosa_irda_shutdown(struct device *dev)
341{
342 gpio_free(TOSA_GPIO_IR_POWERDWN);
343}
344
345static void tosa_irda_transceiver_mode(struct device *dev, int mode)
346{
347 gpio_set_value(TOSA_GPIO_IR_POWERDWN, !(mode & IR_OFF));
236} 348}
237 349
238static struct pxaficp_platform_data tosa_ficp_platform_data = { 350static struct pxaficp_platform_data tosa_ficp_platform_data = {
239 .transceiver_cap = IR_SIRMODE | IR_OFF, 351 .transceiver_cap = IR_SIRMODE | IR_OFF,
240 .transceiver_mode = tosa_irda_transceiver_mode, 352 .transceiver_mode = tosa_irda_transceiver_mode,
353 .startup = tosa_irda_startup,
354 .shutdown = tosa_irda_shutdown,
241}; 355};
242 356
243/* 357/*
@@ -249,12 +363,28 @@ static struct platform_device tosakbd_device = {
249}; 363};
250 364
251static struct gpio_keys_button tosa_gpio_keys[] = { 365static struct gpio_keys_button tosa_gpio_keys[] = {
366 /*
367 * Two following keys are directly tied to "ON" button of tosa. Why?
368 * The first one can be used as a wakeup source, the second can't;
369 * also the first one is OR of ac_powered and on_button.
370 */
371 {
372 .type = EV_PWR,
373 .code = KEY_RESERVED,
374 .gpio = TOSA_GPIO_POWERON,
375 .desc = "Poweron",
376 .wakeup = 1,
377 .active_low = 1,
378 },
252 { 379 {
253 .type = EV_PWR, 380 .type = EV_PWR,
254 .code = KEY_SUSPEND, 381 .code = KEY_SUSPEND,
255 .gpio = TOSA_GPIO_ON_KEY, 382 .gpio = TOSA_GPIO_ON_KEY,
256 .desc = "On key", 383 .desc = "On key",
257 .wakeup = 1, 384 /*
385 * can't be used as wakeup
386 * .wakeup = 1,
387 */
258 .active_low = 1, 388 .active_low = 1,
259 }, 389 },
260 { 390 {
@@ -291,9 +421,40 @@ static struct platform_device tosa_gpio_keys_device = {
291/* 421/*
292 * Tosa LEDs 422 * Tosa LEDs
293 */ 423 */
424static struct gpio_led tosa_gpio_leds[] = {
425 {
426 .name = "tosa:amber:charge",
427 .default_trigger = "main-battery-charging",
428 .gpio = TOSA_GPIO_CHRG_ERR_LED,
429 },
430 {
431 .name = "tosa:green:mail",
432 .default_trigger = "nand-disk",
433 .gpio = TOSA_GPIO_NOTE_LED,
434 },
435 {
436 .name = "tosa:dual:wlan",
437 .default_trigger = "none",
438 .gpio = TOSA_GPIO_WLAN_LED,
439 },
440 {
441 .name = "tosa:blue:bluetooth",
442 .default_trigger = "none",
443 .gpio = TOSA_GPIO_BT_LED,
444 },
445};
446
447static struct gpio_led_platform_data tosa_gpio_leds_platform_data = {
448 .leds = tosa_gpio_leds,
449 .num_leds = ARRAY_SIZE(tosa_gpio_leds),
450};
451
294static struct platform_device tosaled_device = { 452static struct platform_device tosaled_device = {
295 .name = "tosa-led", 453 .name = "leds-gpio",
296 .id = -1, 454 .id = -1,
455 .dev = {
456 .platform_data = &tosa_gpio_leds_platform_data,
457 },
297}; 458};
298 459
299static struct platform_device *devices[] __initdata = { 460static struct platform_device *devices[] __initdata = {
@@ -326,20 +487,13 @@ static void tosa_restart(char mode)
326 487
327static void __init tosa_init(void) 488static void __init tosa_init(void)
328{ 489{
490 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
491 gpio_set_wake(MFP_PIN_GPIO1, 1);
492 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
493
329 pm_power_off = tosa_poweroff; 494 pm_power_off = tosa_poweroff;
330 arm_pm_restart = tosa_restart; 495 arm_pm_restart = tosa_restart;
331 496
332 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
333 pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
334 pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
335
336 /* setup sleep mode values */
337 PWER = 0x00000002;
338 PFER = 0x00000000;
339 PRER = 0x00000002;
340 PGSR0 = 0x00000000;
341 PGSR1 = 0x00FF0002;
342 PGSR2 = 0x00014000;
343 PCFR |= PCFR_OPDE; 497 PCFR |= PCFR_OPDE;
344 498
345 /* enable batt_fault */ 499 /* enable batt_fault */
@@ -348,6 +502,7 @@ static void __init tosa_init(void)
348 pxa_set_mci_info(&tosa_mci_platform_data); 502 pxa_set_mci_info(&tosa_mci_platform_data);
349 pxa_set_udc_info(&udc_info); 503 pxa_set_udc_info(&udc_info);
350 pxa_set_ficp_info(&tosa_ficp_platform_data); 504 pxa_set_ficp_info(&tosa_ficp_platform_data);
505 pxa_set_i2c_info(NULL);
351 platform_scoop_config = &tosa_pcmcia_config; 506 platform_scoop_config = &tosa_pcmcia_config;
352 507
353 platform_add_devices(devices, ARRAY_SIZE(devices)); 508 platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index f207fcd30cd7..931885d86b91 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -41,6 +41,7 @@
41#include <asm/mach/flash.h> 41#include <asm/mach/flash.h>
42 42
43#include <asm/arch/pxa-regs.h> 43#include <asm/arch/pxa-regs.h>
44#include <asm/arch/pxa2xx-gpio.h>
44#include <asm/arch/trizeps4.h> 45#include <asm/arch/trizeps4.h>
45#include <asm/arch/audio.h> 46#include <asm/arch/audio.h>
46#include <asm/arch/pxafb.h> 47#include <asm/arch/pxafb.h>
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index afd2cbfca0d9..dbb546216be1 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -26,6 +26,7 @@
26#include <asm/arch/pxafb.h> 26#include <asm/arch/pxafb.h>
27#include <asm/arch/zylonite.h> 27#include <asm/arch/zylonite.h>
28#include <asm/arch/mmc.h> 28#include <asm/arch/mmc.h>
29#include <asm/arch/pxa27x_keypad.h>
29 30
30#include "generic.h" 31#include "generic.h"
31 32
@@ -35,6 +36,8 @@ struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
35int gpio_backlight; 36int gpio_backlight;
36int gpio_eth_irq; 37int gpio_eth_irq;
37 38
39int wm9713_irq;
40
38int lcd_id; 41int lcd_id;
39int lcd_orientation; 42int lcd_orientation;
40 43
@@ -249,6 +252,71 @@ static void __init zylonite_init_mmc(void)
249static inline void zylonite_init_mmc(void) {} 252static inline void zylonite_init_mmc(void) {}
250#endif 253#endif
251 254
255#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
256static unsigned int zylonite_matrix_key_map[] = {
257 /* KEY(row, col, key_code) */
258 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
259 KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
260 KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L),
261 KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P),
262 KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T),
263 KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X),
264 KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z),
265
266 KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3),
267 KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7),
268 KEY(4, 3, KEY_8), KEY(3, 4, KEY_9),
269
270 KEY(4, 5, KEY_SPACE),
271 KEY(5, 3, KEY_KPASTERISK), /* * */
272 KEY(5, 4, KEY_KPDOT), /* #" */
273
274 KEY(0, 7, KEY_UP),
275 KEY(1, 7, KEY_DOWN),
276 KEY(2, 7, KEY_LEFT),
277 KEY(3, 7, KEY_RIGHT),
278 KEY(2, 6, KEY_HOME),
279 KEY(3, 6, KEY_END),
280 KEY(6, 4, KEY_DELETE),
281 KEY(6, 6, KEY_BACK),
282 KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */
283
284 KEY(4, 6, KEY_ENTER), /* scroll push */
285 KEY(5, 7, KEY_ENTER), /* keypad action */
286
287 KEY(0, 4, KEY_EMAIL),
288 KEY(5, 6, KEY_SEND),
289 KEY(4, 0, KEY_CALENDAR),
290 KEY(7, 6, KEY_RECORD),
291 KEY(6, 7, KEY_VOLUMEUP),
292 KEY(7, 7, KEY_VOLUMEDOWN),
293
294 KEY(0, 6, KEY_F22), /* soft1 */
295 KEY(1, 6, KEY_F23), /* soft2 */
296 KEY(0, 3, KEY_AUX), /* contact */
297};
298
299static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
300 .matrix_key_rows = 8,
301 .matrix_key_cols = 8,
302 .matrix_key_map = zylonite_matrix_key_map,
303 .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
304
305 .enable_rotary0 = 1,
306 .rotary0_up_key = KEY_UP,
307 .rotary0_down_key = KEY_DOWN,
308
309 .debounce_interval = 30,
310};
311
312static void __init zylonite_init_keypad(void)
313{
314 pxa_set_keypad_info(&zylonite_keypad_info);
315}
316#else
317static inline void zylonite_init_keypad(void) {}
318#endif
319
252static void __init zylonite_init(void) 320static void __init zylonite_init(void)
253{ 321{
254 /* board-processor specific initialization */ 322 /* board-processor specific initialization */
@@ -265,6 +333,7 @@ static void __init zylonite_init(void)
265 333
266 zylonite_init_lcd(); 334 zylonite_init_lcd();
267 zylonite_init_mmc(); 335 zylonite_init_mmc();
336 zylonite_init_keypad();
268} 337}
269 338
270MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 339MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 6ac04c09b0e9..324fb9daae28 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -21,7 +21,7 @@
21#include <asm/arch/mfp-pxa300.h> 21#include <asm/arch/mfp-pxa300.h>
22#include <asm/arch/zylonite.h> 22#include <asm/arch/zylonite.h>
23 23
24#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 24#include "generic.h"
25 25
26/* PXA300/PXA310 common configurations */ 26/* PXA300/PXA310 common configurations */
27static mfp_cfg_t common_mfp_cfg[] __initdata = { 27static mfp_cfg_t common_mfp_cfg[] __initdata = {
@@ -69,6 +69,9 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
69 GPIO27_AC97_SDATA_OUT, 69 GPIO27_AC97_SDATA_OUT,
70 GPIO28_AC97_SYNC, 70 GPIO28_AC97_SYNC,
71 71
72 /* WM9713 IRQ */
73 GPIO26_GPIO,
74
72 /* Keypad */ 75 /* Keypad */
73 GPIO107_KP_DKIN_0 | MFP_LPM_EDGE_BOTH, 76 GPIO107_KP_DKIN_0 | MFP_LPM_EDGE_BOTH,
74 GPIO108_KP_DKIN_1 | MFP_LPM_EDGE_BOTH, 77 GPIO108_KP_DKIN_1 | MFP_LPM_EDGE_BOTH,
@@ -203,6 +206,9 @@ void __init zylonite_pxa300_init(void)
203 /* MMC card detect & write protect for controller 0 */ 206 /* MMC card detect & write protect for controller 0 */
204 zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0); 207 zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0);
205 zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2); 208 zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2);
209
210 /* WM9713 IRQ */
211 wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26);
206 } 212 }
207 213
208 if (cpu_is_pxa300()) { 214 if (cpu_is_pxa300()) {
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index dfa79992b8ab..193d07903b06 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -21,7 +21,7 @@
21#include <asm/arch/mfp-pxa320.h> 21#include <asm/arch/mfp-pxa320.h>
22#include <asm/arch/zylonite.h> 22#include <asm/arch/zylonite.h>
23 23
24#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 24#include "generic.h"
25 25
26static mfp_cfg_t mfp_cfg[] __initdata = { 26static mfp_cfg_t mfp_cfg[] __initdata = {
27 /* LCD */ 27 /* LCD */
@@ -68,6 +68,9 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
68 GPIO39_AC97_BITCLK, 68 GPIO39_AC97_BITCLK,
69 GPIO40_AC97_nACRESET, 69 GPIO40_AC97_nACRESET,
70 70
71 /* WM9713 IRQ */
72 GPIO15_GPIO,
73
71 /* I2C */ 74 /* I2C */
72 GPIO32_I2C_SCL, 75 GPIO32_I2C_SCL,
73 GPIO33_I2C_SDA, 76 GPIO33_I2C_SDA,
@@ -190,5 +193,8 @@ void __init zylonite_pxa320_init(void)
190 /* MMC card detect & write protect for controller 0 */ 193 /* MMC card detect & write protect for controller 0 */
191 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); 194 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1);
192 zylonite_mmc_slot[0].gpio_wp = mfp_to_gpio(MFP_PIN_GPIO5); 195 zylonite_mmc_slot[0].gpio_wp = mfp_to_gpio(MFP_PIN_GPIO5);
196
197 /* WM9713 IRQ */
198 wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO15);
193 } 199 }
194} 200}
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index 39b3bb7f1020..5ccde7cf39e8 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -10,7 +10,6 @@ config MACH_REALVIEW_EB
10config REALVIEW_EB_ARM11MP 10config REALVIEW_EB_ARM11MP
11 bool "Support ARM11MPCore tile" 11 bool "Support ARM11MPCore tile"
12 depends on MACH_REALVIEW_EB 12 depends on MACH_REALVIEW_EB
13 select CACHE_L2X0
14 help 13 help
15 Enable support for the ARM11MPCore tile on the Realview platform. 14 Enable support for the ARM11MPCore tile on the Realview platform.
16 15
@@ -24,4 +23,18 @@ config REALVIEW_EB_ARM11MP_REVB
24 kernel built with this option enabled is not compatible with 23 kernel built with this option enabled is not compatible with
25 other revisions of the ARM11MPCore tile. 24 other revisions of the ARM11MPCore tile.
26 25
26config MACH_REALVIEW_PB11MP
27 bool "Support RealView/PB11MPCore platform"
28 select ARM_GIC
29 help
30 Include support for the ARM(R) RealView MPCore Platform Baseboard.
31 PB11MPCore is a platform with an on-board ARM11MPCore and has
32 support for PCI-E and Compact Flash.
33
34config MACH_REALVIEW_PB1176
35 bool "Support RealView/PB1176 platform"
36 select ARM_GIC
37 help
38 Include support for the ARM(R) RealView ARM1176 Platform Baseboard.
39
27endmenu 40endmenu
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile
index ca1e390c3c28..d2ae077431dd 100644
--- a/arch/arm/mach-realview/Makefile
+++ b/arch/arm/mach-realview/Makefile
@@ -4,5 +4,7 @@
4 4
5obj-y := core.o clock.o 5obj-y := core.o clock.o
6obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o 6obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o
7obj-$(CONFIG_MACH_REALVIEW_PB11MP) += realview_pb11mp.o
8obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o
7obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o 9obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o
8obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 10obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-realview/clock.c b/arch/arm/mach-realview/clock.c
index 21325a4da9da..3e706c57833a 100644
--- a/arch/arm/mach-realview/clock.c
+++ b/arch/arm/mach-realview/clock.c
@@ -16,7 +16,6 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18 18
19#include <asm/semaphore.h>
20#include <asm/hardware/icst307.h> 19#include <asm/hardware/icst307.h>
21 20
22#include "clock.h" 21#include "clock.h"
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 98aefc9f4df3..131990d196f5 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -109,22 +109,21 @@ static struct flash_platform_data realview_flash_data = {
109 .set_vpp = realview_flash_set_vpp, 109 .set_vpp = realview_flash_set_vpp,
110}; 110};
111 111
112static struct resource realview_flash_resource = {
113 .start = REALVIEW_FLASH_BASE,
114 .end = REALVIEW_FLASH_BASE + REALVIEW_FLASH_SIZE,
115 .flags = IORESOURCE_MEM,
116};
117
118struct platform_device realview_flash_device = { 112struct platform_device realview_flash_device = {
119 .name = "armflash", 113 .name = "armflash",
120 .id = 0, 114 .id = 0,
121 .dev = { 115 .dev = {
122 .platform_data = &realview_flash_data, 116 .platform_data = &realview_flash_data,
123 }, 117 },
124 .num_resources = 1,
125 .resource = &realview_flash_resource,
126}; 118};
127 119
120int realview_flash_register(struct resource *res, u32 num)
121{
122 realview_flash_device.resource = res;
123 realview_flash_device.num_resources = num;
124 return platform_device_register(&realview_flash_device);
125}
126
128static struct resource realview_i2c_resource = { 127static struct resource realview_i2c_resource = {
129 .start = REALVIEW_I2C_BASE, 128 .start = REALVIEW_I2C_BASE,
130 .end = REALVIEW_I2C_BASE + SZ_4K - 1, 129 .end = REALVIEW_I2C_BASE + SZ_4K - 1,
@@ -445,10 +444,10 @@ void realview_leds_event(led_event_t ledevt)
445/* 444/*
446 * Where is the timer (VA)? 445 * Where is the timer (VA)?
447 */ 446 */
448#define TIMER0_VA_BASE __io_address(REALVIEW_TIMER0_1_BASE) 447void __iomem *timer0_va_base;
449#define TIMER1_VA_BASE (__io_address(REALVIEW_TIMER0_1_BASE) + 0x20) 448void __iomem *timer1_va_base;
450#define TIMER2_VA_BASE __io_address(REALVIEW_TIMER2_3_BASE) 449void __iomem *timer2_va_base;
451#define TIMER3_VA_BASE (__io_address(REALVIEW_TIMER2_3_BASE) + 0x20) 450void __iomem *timer3_va_base;
452 451
453/* 452/*
454 * How long is the timer interval? 453 * How long is the timer interval?
@@ -475,7 +474,7 @@ static void timer_set_mode(enum clock_event_mode mode,
475 474
476 switch(mode) { 475 switch(mode) {
477 case CLOCK_EVT_MODE_PERIODIC: 476 case CLOCK_EVT_MODE_PERIODIC:
478 writel(TIMER_RELOAD, TIMER0_VA_BASE + TIMER_LOAD); 477 writel(TIMER_RELOAD, timer0_va_base + TIMER_LOAD);
479 478
480 ctrl = TIMER_CTRL_PERIODIC; 479 ctrl = TIMER_CTRL_PERIODIC;
481 ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ENABLE; 480 ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ENABLE;
@@ -491,16 +490,16 @@ static void timer_set_mode(enum clock_event_mode mode,
491 ctrl = 0; 490 ctrl = 0;
492 } 491 }
493 492
494 writel(ctrl, TIMER0_VA_BASE + TIMER_CTRL); 493 writel(ctrl, timer0_va_base + TIMER_CTRL);
495} 494}
496 495
497static int timer_set_next_event(unsigned long evt, 496static int timer_set_next_event(unsigned long evt,
498 struct clock_event_device *unused) 497 struct clock_event_device *unused)
499{ 498{
500 unsigned long ctrl = readl(TIMER0_VA_BASE + TIMER_CTRL); 499 unsigned long ctrl = readl(timer0_va_base + TIMER_CTRL);
501 500
502 writel(evt, TIMER0_VA_BASE + TIMER_LOAD); 501 writel(evt, timer0_va_base + TIMER_LOAD);
503 writel(ctrl | TIMER_CTRL_ENABLE, TIMER0_VA_BASE + TIMER_CTRL); 502 writel(ctrl | TIMER_CTRL_ENABLE, timer0_va_base + TIMER_CTRL);
504 503
505 return 0; 504 return 0;
506} 505}
@@ -536,7 +535,7 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id)
536 struct clock_event_device *evt = &timer0_clockevent; 535 struct clock_event_device *evt = &timer0_clockevent;
537 536
538 /* clear the interrupt */ 537 /* clear the interrupt */
539 writel(1, TIMER0_VA_BASE + TIMER_INTCLR); 538 writel(1, timer0_va_base + TIMER_INTCLR);
540 539
541 evt->event_handler(evt); 540 evt->event_handler(evt);
542 541
@@ -551,7 +550,7 @@ static struct irqaction realview_timer_irq = {
551 550
552static cycle_t realview_get_cycles(void) 551static cycle_t realview_get_cycles(void)
553{ 552{
554 return ~readl(TIMER3_VA_BASE + TIMER_VALUE); 553 return ~readl(timer3_va_base + TIMER_VALUE);
555} 554}
556 555
557static struct clocksource clocksource_realview = { 556static struct clocksource clocksource_realview = {
@@ -566,11 +565,11 @@ static struct clocksource clocksource_realview = {
566static void __init realview_clocksource_init(void) 565static void __init realview_clocksource_init(void)
567{ 566{
568 /* setup timer 0 as free-running clocksource */ 567 /* setup timer 0 as free-running clocksource */
569 writel(0, TIMER3_VA_BASE + TIMER_CTRL); 568 writel(0, timer3_va_base + TIMER_CTRL);
570 writel(0xffffffff, TIMER3_VA_BASE + TIMER_LOAD); 569 writel(0xffffffff, timer3_va_base + TIMER_LOAD);
571 writel(0xffffffff, TIMER3_VA_BASE + TIMER_VALUE); 570 writel(0xffffffff, timer3_va_base + TIMER_VALUE);
572 writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC, 571 writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
573 TIMER3_VA_BASE + TIMER_CTRL); 572 timer3_va_base + TIMER_CTRL);
574 573
575 clocksource_realview.mult = 574 clocksource_realview.mult =
576 clocksource_khz2mult(1000, clocksource_realview.shift); 575 clocksource_khz2mult(1000, clocksource_realview.shift);
@@ -607,10 +606,10 @@ void __init realview_timer_init(unsigned int timer_irq)
607 /* 606 /*
608 * Initialise to a known state (all timers off) 607 * Initialise to a known state (all timers off)
609 */ 608 */
610 writel(0, TIMER0_VA_BASE + TIMER_CTRL); 609 writel(0, timer0_va_base + TIMER_CTRL);
611 writel(0, TIMER1_VA_BASE + TIMER_CTRL); 610 writel(0, timer1_va_base + TIMER_CTRL);
612 writel(0, TIMER2_VA_BASE + TIMER_CTRL); 611 writel(0, timer2_va_base + TIMER_CTRL);
613 writel(0, TIMER3_VA_BASE + TIMER_CTRL); 612 writel(0, timer3_va_base + TIMER_CTRL);
614 613
615 /* 614 /*
616 * Make irqs happen for the system timer 615 * Make irqs happen for the system timer
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 492a14c0d604..33dbbb41a663 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -55,8 +55,13 @@ extern void __iomem *gic_cpu_base_addr;
55extern void __iomem *twd_base_addr; 55extern void __iomem *twd_base_addr;
56extern unsigned int twd_size; 56extern unsigned int twd_size;
57#endif 57#endif
58extern void __iomem *timer0_va_base;
59extern void __iomem *timer1_va_base;
60extern void __iomem *timer2_va_base;
61extern void __iomem *timer3_va_base;
58 62
59extern void realview_leds_event(led_event_t ledevt); 63extern void realview_leds_event(led_event_t ledevt);
60extern void realview_timer_init(unsigned int timer_irq); 64extern void realview_timer_init(unsigned int timer_irq);
65extern int realview_flash_register(struct resource *res, u32 num);
61 66
62#endif 67#endif
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index de2b7159557d..3e57428affee 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -15,11 +15,14 @@
15#include <linux/smp.h> 15#include <linux/smp.h>
16 16
17#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
18#include <asm/hardware/arm_scu.h>
19#include <asm/hardware.h> 18#include <asm/hardware.h>
20#include <asm/io.h> 19#include <asm/io.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22 21
22#include <asm/arch/board-eb.h>
23#include <asm/arch/board-pb11mp.h>
24#include <asm/arch/scu.h>
25
23extern void realview_secondary_startup(void); 26extern void realview_secondary_startup(void);
24 27
25/* 28/*
@@ -31,9 +34,15 @@ volatile int __cpuinitdata pen_release = -1;
31static unsigned int __init get_core_count(void) 34static unsigned int __init get_core_count(void)
32{ 35{
33 unsigned int ncores; 36 unsigned int ncores;
37 void __iomem *scu_base = 0;
38
39 if (machine_is_realview_eb() && core_tile_eb11mp())
40 scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE);
41 else if (machine_is_realview_pb11mp())
42 scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE);
34 43
35 if (machine_is_realview_eb() && core_tile_eb11mp()) { 44 if (scu_base) {
36 ncores = __raw_readl(__io_address(REALVIEW_EB11MP_SCU_BASE) + SCU_CONFIG); 45 ncores = __raw_readl(scu_base + SCU_CONFIG);
37 ncores = (ncores & 0x03) + 1; 46 ncores = (ncores & 0x03) + 1;
38 } else 47 } else
39 ncores = 1; 48 ncores = 1;
@@ -41,6 +50,26 @@ static unsigned int __init get_core_count(void)
41 return ncores; 50 return ncores;
42} 51}
43 52
53/*
54 * Setup the SCU
55 */
56static void scu_enable(void)
57{
58 u32 scu_ctrl;
59 void __iomem *scu_base;
60
61 if (machine_is_realview_eb() && core_tile_eb11mp())
62 scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE);
63 else if (machine_is_realview_pb11mp())
64 scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE);
65 else
66 BUG();
67
68 scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
69 scu_ctrl |= 1;
70 __raw_writel(scu_ctrl, scu_base + SCU_CTRL);
71}
72
44static DEFINE_SPINLOCK(boot_lock); 73static DEFINE_SPINLOCK(boot_lock);
45 74
46void __cpuinit platform_secondary_init(unsigned int cpu) 75void __cpuinit platform_secondary_init(unsigned int cpu)
@@ -57,7 +86,10 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
57 * core (e.g. timer irq), then they will not have been enabled 86 * core (e.g. timer irq), then they will not have been enabled
58 * for us: do so 87 * for us: do so
59 */ 88 */
60 gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); 89 if (machine_is_realview_eb() && core_tile_eb11mp())
90 gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE));
91 else if (machine_is_realview_pb11mp())
92 gic_cpu_init(0, __io_address(REALVIEW_TC11MP_GIC_CPU_BASE));
61 93
62 /* 94 /*
63 * let the primary processor know we're out of the 95 * let the primary processor know we're out of the
@@ -198,7 +230,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
198 * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in 230 * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in
199 * realview_timer_init 231 * realview_timer_init
200 */ 232 */
201 if (machine_is_realview_eb() && core_tile_eb11mp()) 233 if ((machine_is_realview_eb() && core_tile_eb11mp()) ||
234 machine_is_realview_pb11mp())
202 local_timer_setup(cpu); 235 local_timer_setup(cpu);
203#endif 236#endif
204 237
@@ -210,11 +243,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
210 cpu_set(i, cpu_present_map); 243 cpu_set(i, cpu_present_map);
211 244
212 /* 245 /*
213 * Do we need any more CPUs? If so, then let them know where 246 * Initialise the SCU if there are more than one CPU and let
214 * to start. Note that, on modern versions of MILO, the "poke" 247 * them know where to start. Note that, on modern versions of
215 * doesn't actually do anything until each individual core is 248 * MILO, the "poke" doesn't actually do anything until each
216 * sent a soft interrupt to get it out of WFI 249 * individual core is sent a soft interrupt to get it out of
250 * WFI
217 */ 251 */
218 if (max_cpus > 1) 252 if (max_cpus > 1) {
253 scu_enable();
219 poke_milo(); 254 poke_milo();
255 }
220} 256}
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 60d9eb810246..5782d83fd886 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -51,13 +51,13 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
51 .length = SZ_4K, 51 .length = SZ_4K,
52 .type = MT_DEVICE, 52 .type = MT_DEVICE,
53 }, { 53 }, {
54 .virtual = IO_ADDRESS(REALVIEW_GIC_CPU_BASE), 54 .virtual = IO_ADDRESS(REALVIEW_EB_GIC_CPU_BASE),
55 .pfn = __phys_to_pfn(REALVIEW_GIC_CPU_BASE), 55 .pfn = __phys_to_pfn(REALVIEW_EB_GIC_CPU_BASE),
56 .length = SZ_4K, 56 .length = SZ_4K,
57 .type = MT_DEVICE, 57 .type = MT_DEVICE,
58 }, { 58 }, {
59 .virtual = IO_ADDRESS(REALVIEW_GIC_DIST_BASE), 59 .virtual = IO_ADDRESS(REALVIEW_EB_GIC_DIST_BASE),
60 .pfn = __phys_to_pfn(REALVIEW_GIC_DIST_BASE), 60 .pfn = __phys_to_pfn(REALVIEW_EB_GIC_DIST_BASE),
61 .length = SZ_4K, 61 .length = SZ_4K,
62 .type = MT_DEVICE, 62 .type = MT_DEVICE,
63 }, { 63 }, {
@@ -66,20 +66,20 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
66 .length = SZ_4K, 66 .length = SZ_4K,
67 .type = MT_DEVICE, 67 .type = MT_DEVICE,
68 }, { 68 }, {
69 .virtual = IO_ADDRESS(REALVIEW_TIMER0_1_BASE), 69 .virtual = IO_ADDRESS(REALVIEW_EB_TIMER0_1_BASE),
70 .pfn = __phys_to_pfn(REALVIEW_TIMER0_1_BASE), 70 .pfn = __phys_to_pfn(REALVIEW_EB_TIMER0_1_BASE),
71 .length = SZ_4K, 71 .length = SZ_4K,
72 .type = MT_DEVICE, 72 .type = MT_DEVICE,
73 }, { 73 }, {
74 .virtual = IO_ADDRESS(REALVIEW_TIMER2_3_BASE), 74 .virtual = IO_ADDRESS(REALVIEW_EB_TIMER2_3_BASE),
75 .pfn = __phys_to_pfn(REALVIEW_TIMER2_3_BASE), 75 .pfn = __phys_to_pfn(REALVIEW_EB_TIMER2_3_BASE),
76 .length = SZ_4K, 76 .length = SZ_4K,
77 .type = MT_DEVICE, 77 .type = MT_DEVICE,
78 }, 78 },
79#ifdef CONFIG_DEBUG_LL 79#ifdef CONFIG_DEBUG_LL
80 { 80 {
81 .virtual = IO_ADDRESS(REALVIEW_UART0_BASE), 81 .virtual = IO_ADDRESS(REALVIEW_EB_UART0_BASE),
82 .pfn = __phys_to_pfn(REALVIEW_UART0_BASE), 82 .pfn = __phys_to_pfn(REALVIEW_EB_UART0_BASE),
83 .length = SZ_4K, 83 .length = SZ_4K,
84 .type = MT_DEVICE, 84 .type = MT_DEVICE,
85 } 85 }
@@ -136,12 +136,12 @@ static void __init realview_eb_map_io(void)
136/* 136/*
137 * These devices are connected directly to the multi-layer AHB switch 137 * These devices are connected directly to the multi-layer AHB switch
138 */ 138 */
139#define SMC_IRQ { NO_IRQ, NO_IRQ } 139#define EB_SMC_IRQ { NO_IRQ, NO_IRQ }
140#define SMC_DMA { 0, 0 } 140#define EB_SMC_DMA { 0, 0 }
141#define MPMC_IRQ { NO_IRQ, NO_IRQ } 141#define MPMC_IRQ { NO_IRQ, NO_IRQ }
142#define MPMC_DMA { 0, 0 } 142#define MPMC_DMA { 0, 0 }
143#define CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ } 143#define EB_CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ }
144#define CLCD_DMA { 0, 0 } 144#define EB_CLCD_DMA { 0, 0 }
145#define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ } 145#define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ }
146#define DMAC_DMA { 0, 0 } 146#define DMAC_DMA { 0, 0 }
147 147
@@ -150,53 +150,53 @@ static void __init realview_eb_map_io(void)
150 */ 150 */
151#define SCTL_IRQ { NO_IRQ, NO_IRQ } 151#define SCTL_IRQ { NO_IRQ, NO_IRQ }
152#define SCTL_DMA { 0, 0 } 152#define SCTL_DMA { 0, 0 }
153#define WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ } 153#define EB_WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ }
154#define WATCHDOG_DMA { 0, 0 } 154#define EB_WATCHDOG_DMA { 0, 0 }
155#define GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ } 155#define EB_GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ }
156#define GPIO0_DMA { 0, 0 } 156#define EB_GPIO0_DMA { 0, 0 }
157#define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ } 157#define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ }
158#define GPIO1_DMA { 0, 0 } 158#define GPIO1_DMA { 0, 0 }
159#define RTC_IRQ { IRQ_EB_RTC, NO_IRQ } 159#define EB_RTC_IRQ { IRQ_EB_RTC, NO_IRQ }
160#define RTC_DMA { 0, 0 } 160#define EB_RTC_DMA { 0, 0 }
161 161
162/* 162/*
163 * These devices are connected via the DMA APB bridge 163 * These devices are connected via the DMA APB bridge
164 */ 164 */
165#define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } 165#define SCI_IRQ { IRQ_EB_SCI, NO_IRQ }
166#define SCI_DMA { 7, 6 } 166#define SCI_DMA { 7, 6 }
167#define UART0_IRQ { IRQ_EB_UART0, NO_IRQ } 167#define EB_UART0_IRQ { IRQ_EB_UART0, NO_IRQ }
168#define UART0_DMA { 15, 14 } 168#define EB_UART0_DMA { 15, 14 }
169#define UART1_IRQ { IRQ_EB_UART1, NO_IRQ } 169#define EB_UART1_IRQ { IRQ_EB_UART1, NO_IRQ }
170#define UART1_DMA { 13, 12 } 170#define EB_UART1_DMA { 13, 12 }
171#define UART2_IRQ { IRQ_EB_UART2, NO_IRQ } 171#define EB_UART2_IRQ { IRQ_EB_UART2, NO_IRQ }
172#define UART2_DMA { 11, 10 } 172#define EB_UART2_DMA { 11, 10 }
173#define UART3_IRQ { IRQ_EB_UART3, NO_IRQ } 173#define EB_UART3_IRQ { IRQ_EB_UART3, NO_IRQ }
174#define UART3_DMA { 0x86, 0x87 } 174#define EB_UART3_DMA { 0x86, 0x87 }
175#define SSP_IRQ { IRQ_EB_SSP, NO_IRQ } 175#define EB_SSP_IRQ { IRQ_EB_SSP, NO_IRQ }
176#define SSP_DMA { 9, 8 } 176#define EB_SSP_DMA { 9, 8 }
177 177
178/* FPGA Primecells */ 178/* FPGA Primecells */
179AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 179AMBA_DEVICE(aaci, "fpga:04", AACI, NULL);
180AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); 180AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data);
181AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 181AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL);
182AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 182AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL);
183AMBA_DEVICE(uart3, "fpga:09", UART3, NULL); 183AMBA_DEVICE(uart3, "fpga:09", EB_UART3, NULL);
184 184
185/* DevChip Primecells */ 185/* DevChip Primecells */
186AMBA_DEVICE(smc, "dev:00", SMC, NULL); 186AMBA_DEVICE(smc, "dev:00", EB_SMC, NULL);
187AMBA_DEVICE(clcd, "dev:20", CLCD, &clcd_plat_data); 187AMBA_DEVICE(clcd, "dev:20", EB_CLCD, &clcd_plat_data);
188AMBA_DEVICE(dmac, "dev:30", DMAC, NULL); 188AMBA_DEVICE(dmac, "dev:30", DMAC, NULL);
189AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 189AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
190AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL); 190AMBA_DEVICE(wdog, "dev:e1", EB_WATCHDOG, NULL);
191AMBA_DEVICE(gpio0, "dev:e4", GPIO0, NULL); 191AMBA_DEVICE(gpio0, "dev:e4", EB_GPIO0, NULL);
192AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); 192AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL);
193AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); 193AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL);
194AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); 194AMBA_DEVICE(rtc, "dev:e8", EB_RTC, NULL);
195AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 195AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
196AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); 196AMBA_DEVICE(uart0, "dev:f1", EB_UART0, NULL);
197AMBA_DEVICE(uart1, "dev:f2", UART1, NULL); 197AMBA_DEVICE(uart1, "dev:f2", EB_UART1, NULL);
198AMBA_DEVICE(uart2, "dev:f3", UART2, NULL); 198AMBA_DEVICE(uart2, "dev:f3", EB_UART2, NULL);
199AMBA_DEVICE(ssp0, "dev:f4", SSP, NULL); 199AMBA_DEVICE(ssp0, "dev:f4", EB_SSP, NULL);
200 200
201static struct amba_device *amba_devs[] __initdata = { 201static struct amba_device *amba_devs[] __initdata = {
202 &dmac_device, 202 &dmac_device,
@@ -223,11 +223,16 @@ static struct amba_device *amba_devs[] __initdata = {
223/* 223/*
224 * RealView EB platform devices 224 * RealView EB platform devices
225 */ 225 */
226static struct resource realview_eb_flash_resource = {
227 .start = REALVIEW_EB_FLASH_BASE,
228 .end = REALVIEW_EB_FLASH_BASE + REALVIEW_EB_FLASH_SIZE - 1,
229 .flags = IORESOURCE_MEM,
230};
226 231
227static struct resource realview_eb_smc91x_resources[] = { 232static struct resource realview_eb_eth_resources[] = {
228 [0] = { 233 [0] = {
229 .start = REALVIEW_ETH_BASE, 234 .start = REALVIEW_EB_ETH_BASE,
230 .end = REALVIEW_ETH_BASE + SZ_64K - 1, 235 .end = REALVIEW_EB_ETH_BASE + SZ_64K - 1,
231 .flags = IORESOURCE_MEM, 236 .flags = IORESOURCE_MEM,
232 }, 237 },
233 [1] = { 238 [1] = {
@@ -237,13 +242,36 @@ static struct resource realview_eb_smc91x_resources[] = {
237 }, 242 },
238}; 243};
239 244
240static struct platform_device realview_eb_smc91x_device = { 245static struct platform_device realview_eb_eth_device = {
241 .name = "smc91x",
242 .id = 0, 246 .id = 0,
243 .num_resources = ARRAY_SIZE(realview_eb_smc91x_resources), 247 .num_resources = ARRAY_SIZE(realview_eb_eth_resources),
244 .resource = realview_eb_smc91x_resources, 248 .resource = realview_eb_eth_resources,
245}; 249};
246 250
251/*
252 * Detect and register the correct Ethernet device. RealView/EB rev D
253 * platforms use the newer SMSC LAN9118 Ethernet chip
254 */
255static int eth_device_register(void)
256{
257 void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K);
258 u32 idrev;
259
260 if (!eth_addr)
261 return -ENOMEM;
262
263 idrev = readl(eth_addr + 0x50);
264 if ((idrev & 0xFFFF0000) == 0x01180000)
265 /* SMSC LAN9118 chip present */
266 realview_eb_eth_device.name = "smc911x";
267 else
268 /* SMSC 91C111 chip present */
269 realview_eb_eth_device.name = "smc91x";
270
271 iounmap(eth_addr);
272 return platform_device_register(&realview_eb_eth_device);
273}
274
247static void __init gic_init_irq(void) 275static void __init gic_init_irq(void)
248{ 276{
249 if (core_tile_eb11mp()) { 277 if (core_tile_eb11mp()) {
@@ -263,14 +291,14 @@ static void __init gic_init_irq(void)
263 291
264#ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB 292#ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB
265 /* board GIC, secondary */ 293 /* board GIC, secondary */
266 gic_dist_init(1, __io_address(REALVIEW_GIC_DIST_BASE), 64); 294 gic_dist_init(1, __io_address(REALVIEW_EB_GIC_DIST_BASE), 64);
267 gic_cpu_init(1, __io_address(REALVIEW_GIC_CPU_BASE)); 295 gic_cpu_init(1, __io_address(REALVIEW_EB_GIC_CPU_BASE));
268 gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); 296 gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1);
269#endif 297#endif
270 } else { 298 } else {
271 /* board GIC, primary */ 299 /* board GIC, primary */
272 gic_cpu_base_addr = __io_address(REALVIEW_GIC_CPU_BASE); 300 gic_cpu_base_addr = __io_address(REALVIEW_EB_GIC_CPU_BASE);
273 gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); 301 gic_dist_init(0, __io_address(REALVIEW_EB_GIC_DIST_BASE), 29);
274 gic_cpu_init(0, gic_cpu_base_addr); 302 gic_cpu_init(0, gic_cpu_base_addr);
275 } 303 }
276} 304}
@@ -301,14 +329,19 @@ static void realview_eb11mp_fixup(void)
301 kmi1_device.irq[0] = IRQ_EB11MP_KMI1; 329 kmi1_device.irq[0] = IRQ_EB11MP_KMI1;
302 330
303 /* platform devices */ 331 /* platform devices */
304 realview_eb_smc91x_resources[1].start = IRQ_EB11MP_ETH; 332 realview_eb_eth_resources[1].start = IRQ_EB11MP_ETH;
305 realview_eb_smc91x_resources[1].end = IRQ_EB11MP_ETH; 333 realview_eb_eth_resources[1].end = IRQ_EB11MP_ETH;
306} 334}
307 335
308static void __init realview_eb_timer_init(void) 336static void __init realview_eb_timer_init(void)
309{ 337{
310 unsigned int timer_irq; 338 unsigned int timer_irq;
311 339
340 timer0_va_base = __io_address(REALVIEW_EB_TIMER0_1_BASE);
341 timer1_va_base = __io_address(REALVIEW_EB_TIMER0_1_BASE) + 0x20;
342 timer2_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE);
343 timer3_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE) + 0x20;
344
312 if (core_tile_eb11mp()) { 345 if (core_tile_eb11mp()) {
313#ifdef CONFIG_LOCAL_TIMERS 346#ifdef CONFIG_LOCAL_TIMERS
314 twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE); 347 twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE);
@@ -332,16 +365,18 @@ static void __init realview_eb_init(void)
332 if (core_tile_eb11mp()) { 365 if (core_tile_eb11mp()) {
333 realview_eb11mp_fixup(); 366 realview_eb11mp_fixup();
334 367
368#ifdef CONFIG_CACHE_L2X0
335 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled 369 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled
336 * Bits: .... ...0 0111 1001 0000 .... .... .... */ 370 * Bits: .... ...0 0111 1001 0000 .... .... .... */
337 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff); 371 l2x0_init(__io_address(REALVIEW_EB11MP_L220_BASE), 0x00790000, 0xfe000fff);
372#endif
338 } 373 }
339 374
340 clk_register(&realview_clcd_clk); 375 clk_register(&realview_clcd_clk);
341 376
342 platform_device_register(&realview_flash_device); 377 realview_flash_register(&realview_eb_flash_resource, 1);
343 platform_device_register(&realview_eb_smc91x_device);
344 platform_device_register(&realview_i2c_device); 378 platform_device_register(&realview_i2c_device);
379 eth_device_register();
345 380
346 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 381 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
347 struct amba_device *d = amba_devs[i]; 382 struct amba_device *d = amba_devs[i];
@@ -355,8 +390,8 @@ static void __init realview_eb_init(void)
355 390
356MACHINE_START(REALVIEW_EB, "ARM-RealView EB") 391MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
357 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 392 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
358 .phys_io = REALVIEW_UART0_BASE, 393 .phys_io = REALVIEW_EB_UART0_BASE,
359 .io_pg_offst = (IO_ADDRESS(REALVIEW_UART0_BASE) >> 18) & 0xfffc, 394 .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc,
360 .boot_params = 0x00000100, 395 .boot_params = 0x00000100,
361 .map_io = realview_eb_map_io, 396 .map_io = realview_eb_map_io,
362 .init_irq = gic_init_irq, 397 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
new file mode 100644
index 000000000000..cf7f576a5860
--- /dev/null
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -0,0 +1,292 @@
1/*
2 * linux/arch/arm/mach-realview/realview_pb1176.c
3 *
4 * Copyright (C) 2008 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <linux/init.h>
23#include <linux/platform_device.h>
24#include <linux/sysdev.h>
25#include <linux/amba/bus.h>
26
27#include <asm/hardware.h>
28#include <asm/io.h>
29#include <asm/irq.h>
30#include <asm/leds.h>
31#include <asm/mach-types.h>
32#include <asm/hardware/gic.h>
33#include <asm/hardware/icst307.h>
34#include <asm/hardware/cache-l2x0.h>
35
36#include <asm/mach/arch.h>
37#include <asm/mach/flash.h>
38#include <asm/mach/map.h>
39#include <asm/mach/mmc.h>
40#include <asm/mach/time.h>
41
42#include <asm/arch/board-pb1176.h>
43#include <asm/arch/irqs.h>
44
45#include "core.h"
46#include "clock.h"
47
48static struct map_desc realview_pb1176_io_desc[] __initdata = {
49 {
50 .virtual = IO_ADDRESS(REALVIEW_SYS_BASE),
51 .pfn = __phys_to_pfn(REALVIEW_SYS_BASE),
52 .length = SZ_4K,
53 .type = MT_DEVICE,
54 }, {
55 .virtual = IO_ADDRESS(REALVIEW_PB1176_GIC_CPU_BASE),
56 .pfn = __phys_to_pfn(REALVIEW_PB1176_GIC_CPU_BASE),
57 .length = SZ_4K,
58 .type = MT_DEVICE,
59 }, {
60 .virtual = IO_ADDRESS(REALVIEW_PB1176_GIC_DIST_BASE),
61 .pfn = __phys_to_pfn(REALVIEW_PB1176_GIC_DIST_BASE),
62 .length = SZ_4K,
63 .type = MT_DEVICE,
64 }, {
65 .virtual = IO_ADDRESS(REALVIEW_DC1176_GIC_CPU_BASE),
66 .pfn = __phys_to_pfn(REALVIEW_DC1176_GIC_CPU_BASE),
67 .length = SZ_4K,
68 .type = MT_DEVICE,
69 }, {
70 .virtual = IO_ADDRESS(REALVIEW_DC1176_GIC_DIST_BASE),
71 .pfn = __phys_to_pfn(REALVIEW_DC1176_GIC_DIST_BASE),
72 .length = SZ_4K,
73 .type = MT_DEVICE,
74 }, {
75 .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE),
76 .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE),
77 .length = SZ_4K,
78 .type = MT_DEVICE,
79 }, {
80 .virtual = IO_ADDRESS(REALVIEW_PB1176_TIMER0_1_BASE),
81 .pfn = __phys_to_pfn(REALVIEW_PB1176_TIMER0_1_BASE),
82 .length = SZ_4K,
83 .type = MT_DEVICE,
84 }, {
85 .virtual = IO_ADDRESS(REALVIEW_PB1176_TIMER2_3_BASE),
86 .pfn = __phys_to_pfn(REALVIEW_PB1176_TIMER2_3_BASE),
87 .length = SZ_4K,
88 .type = MT_DEVICE,
89 }, {
90 .virtual = IO_ADDRESS(REALVIEW_PB1176_L220_BASE),
91 .pfn = __phys_to_pfn(REALVIEW_PB1176_L220_BASE),
92 .length = SZ_8K,
93 .type = MT_DEVICE,
94 },
95#ifdef CONFIG_DEBUG_LL
96 {
97 .virtual = IO_ADDRESS(REALVIEW_PB1176_UART0_BASE),
98 .pfn = __phys_to_pfn(REALVIEW_PB1176_UART0_BASE),
99 .length = SZ_4K,
100 .type = MT_DEVICE,
101 },
102#endif
103};
104
105static void __init realview_pb1176_map_io(void)
106{
107 iotable_init(realview_pb1176_io_desc, ARRAY_SIZE(realview_pb1176_io_desc));
108}
109
110/*
111 * RealView PB1176 AMBA devices
112 */
113#define GPIO2_IRQ { IRQ_PB1176_GPIO2, NO_IRQ }
114#define GPIO2_DMA { 0, 0 }
115#define GPIO3_IRQ { IRQ_PB1176_GPIO3, NO_IRQ }
116#define GPIO3_DMA { 0, 0 }
117#define AACI_IRQ { IRQ_PB1176_AACI, NO_IRQ }
118#define AACI_DMA { 0x80, 0x81 }
119#define MMCI0_IRQ { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B }
120#define MMCI0_DMA { 0x84, 0 }
121#define KMI0_IRQ { IRQ_PB1176_KMI0, NO_IRQ }
122#define KMI0_DMA { 0, 0 }
123#define KMI1_IRQ { IRQ_PB1176_KMI1, NO_IRQ }
124#define KMI1_DMA { 0, 0 }
125#define PB1176_SMC_IRQ { NO_IRQ, NO_IRQ }
126#define PB1176_SMC_DMA { 0, 0 }
127#define MPMC_IRQ { NO_IRQ, NO_IRQ }
128#define MPMC_DMA { 0, 0 }
129#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ }
130#define PB1176_CLCD_DMA { 0, 0 }
131#define DMAC_IRQ { IRQ_PB1176_DMAC, NO_IRQ }
132#define DMAC_DMA { 0, 0 }
133#define SCTL_IRQ { NO_IRQ, NO_IRQ }
134#define SCTL_DMA { 0, 0 }
135#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ }
136#define PB1176_WATCHDOG_DMA { 0, 0 }
137#define PB1176_GPIO0_IRQ { IRQ_PB1176_GPIO0, NO_IRQ }
138#define PB1176_GPIO0_DMA { 0, 0 }
139#define GPIO1_IRQ { IRQ_PB1176_GPIO1, NO_IRQ }
140#define GPIO1_DMA { 0, 0 }
141#define PB1176_RTC_IRQ { IRQ_DC1176_RTC, NO_IRQ }
142#define PB1176_RTC_DMA { 0, 0 }
143#define SCI_IRQ { IRQ_PB1176_SCI, NO_IRQ }
144#define SCI_DMA { 7, 6 }
145#define PB1176_UART0_IRQ { IRQ_DC1176_UART0, NO_IRQ }
146#define PB1176_UART0_DMA { 15, 14 }
147#define PB1176_UART1_IRQ { IRQ_DC1176_UART1, NO_IRQ }
148#define PB1176_UART1_DMA { 13, 12 }
149#define PB1176_UART2_IRQ { IRQ_DC1176_UART2, NO_IRQ }
150#define PB1176_UART2_DMA { 11, 10 }
151#define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ }
152#define PB1176_UART3_DMA { 0x86, 0x87 }
153#define PB1176_SSP_IRQ { IRQ_PB1176_SSP, NO_IRQ }
154#define PB1176_SSP_DMA { 9, 8 }
155
156/* FPGA Primecells */
157AMBA_DEVICE(aaci, "fpga:04", AACI, NULL);
158AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data);
159AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL);
160AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL);
161AMBA_DEVICE(uart3, "fpga:09", PB1176_UART3, NULL);
162
163/* DevChip Primecells */
164AMBA_DEVICE(smc, "dev:00", PB1176_SMC, NULL);
165AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
166AMBA_DEVICE(wdog, "dev:e1", PB1176_WATCHDOG, NULL);
167AMBA_DEVICE(gpio0, "dev:e4", PB1176_GPIO0, NULL);
168AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL);
169AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL);
170AMBA_DEVICE(rtc, "dev:e8", PB1176_RTC, NULL);
171AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
172AMBA_DEVICE(uart0, "dev:f1", PB1176_UART0, NULL);
173AMBA_DEVICE(uart1, "dev:f2", PB1176_UART1, NULL);
174AMBA_DEVICE(uart2, "dev:f3", PB1176_UART2, NULL);
175AMBA_DEVICE(ssp0, "dev:f4", PB1176_SSP, NULL);
176
177/* Primecells on the NEC ISSP chip */
178AMBA_DEVICE(clcd, "issp:20", PB1176_CLCD, &clcd_plat_data);
179//AMBA_DEVICE(dmac, "issp:30", PB1176_DMAC, NULL);
180
181static struct amba_device *amba_devs[] __initdata = {
182// &dmac_device,
183 &uart0_device,
184 &uart1_device,
185 &uart2_device,
186 &uart3_device,
187 &smc_device,
188 &clcd_device,
189 &sctl_device,
190 &wdog_device,
191 &gpio0_device,
192 &gpio1_device,
193 &gpio2_device,
194 &rtc_device,
195 &sci0_device,
196 &ssp0_device,
197 &aaci_device,
198 &mmc0_device,
199 &kmi0_device,
200 &kmi1_device,
201};
202
203/*
204 * RealView PB1176 platform devices
205 */
206static struct resource realview_pb1176_flash_resource = {
207 .start = REALVIEW_PB1176_FLASH_BASE,
208 .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1,
209 .flags = IORESOURCE_MEM,
210};
211
212static struct resource realview_pb1176_smsc911x_resources[] = {
213 [0] = {
214 .start = REALVIEW_PB1176_ETH_BASE,
215 .end = REALVIEW_PB1176_ETH_BASE + SZ_64K - 1,
216 .flags = IORESOURCE_MEM,
217 },
218 [1] = {
219 .start = IRQ_PB1176_ETH,
220 .end = IRQ_PB1176_ETH,
221 .flags = IORESOURCE_IRQ,
222 },
223};
224
225static struct platform_device realview_pb1176_smsc911x_device = {
226 .name = "smc911x",
227 .id = 0,
228 .num_resources = ARRAY_SIZE(realview_pb1176_smsc911x_resources),
229 .resource = realview_pb1176_smsc911x_resources,
230};
231
232static void __init gic_init_irq(void)
233{
234 /* ARM1176 DevChip GIC, primary */
235 gic_cpu_base_addr = __io_address(REALVIEW_DC1176_GIC_CPU_BASE);
236 gic_dist_init(0, __io_address(REALVIEW_DC1176_GIC_DIST_BASE), IRQ_DC1176_GIC_START);
237 gic_cpu_init(0, gic_cpu_base_addr);
238
239 /* board GIC, secondary */
240 gic_dist_init(1, __io_address(REALVIEW_PB1176_GIC_DIST_BASE), IRQ_PB1176_GIC_START);
241 gic_cpu_init(1, __io_address(REALVIEW_PB1176_GIC_CPU_BASE));
242 gic_cascade_irq(1, IRQ_DC1176_PB_IRQ1);
243}
244
245static void __init realview_pb1176_timer_init(void)
246{
247 timer0_va_base = __io_address(REALVIEW_PB1176_TIMER0_1_BASE);
248 timer1_va_base = __io_address(REALVIEW_PB1176_TIMER0_1_BASE) + 0x20;
249 timer2_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE);
250 timer3_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE) + 0x20;
251
252 realview_timer_init(IRQ_DC1176_TIMER0);
253}
254
255static struct sys_timer realview_pb1176_timer = {
256 .init = realview_pb1176_timer_init,
257};
258
259static void __init realview_pb1176_init(void)
260{
261 int i;
262
263#ifdef CONFIG_CACHE_L2X0
264 /* 128Kb (16Kb/way) 8-way associativity. evmon/parity/share enabled. */
265 l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff);
266#endif
267
268 clk_register(&realview_clcd_clk);
269
270 realview_flash_register(&realview_pb1176_flash_resource, 1);
271 platform_device_register(&realview_pb1176_smsc911x_device);
272
273 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
274 struct amba_device *d = amba_devs[i];
275 amba_device_register(d, &iomem_resource);
276 }
277
278#ifdef CONFIG_LEDS
279 leds_event = realview_leds_event;
280#endif
281}
282
283MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
284 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
285 .phys_io = REALVIEW_PB1176_UART0_BASE,
286 .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc,
287 .boot_params = 0x00000100,
288 .map_io = realview_pb1176_map_io,
289 .init_irq = gic_init_irq,
290 .timer = &realview_pb1176_timer,
291 .init_machine = realview_pb1176_init,
292MACHINE_END
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
new file mode 100644
index 000000000000..f7ce1c5a178a
--- /dev/null
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -0,0 +1,342 @@
1/*
2 * linux/arch/arm/mach-realview/realview_pb11mp.c
3 *
4 * Copyright (C) 2008 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <linux/init.h>
23#include <linux/platform_device.h>
24#include <linux/sysdev.h>
25#include <linux/amba/bus.h>
26
27#include <asm/hardware.h>
28#include <asm/io.h>
29#include <asm/irq.h>
30#include <asm/leds.h>
31#include <asm/mach-types.h>
32#include <asm/hardware/gic.h>
33#include <asm/hardware/icst307.h>
34#include <asm/hardware/cache-l2x0.h>
35
36#include <asm/mach/arch.h>
37#include <asm/mach/flash.h>
38#include <asm/mach/map.h>
39#include <asm/mach/mmc.h>
40#include <asm/mach/time.h>
41
42#include <asm/arch/board-pb11mp.h>
43#include <asm/arch/irqs.h>
44
45#include "core.h"
46#include "clock.h"
47
48static struct map_desc realview_pb11mp_io_desc[] __initdata = {
49 {
50 .virtual = IO_ADDRESS(REALVIEW_SYS_BASE),
51 .pfn = __phys_to_pfn(REALVIEW_SYS_BASE),
52 .length = SZ_4K,
53 .type = MT_DEVICE,
54 }, {
55 .virtual = IO_ADDRESS(REALVIEW_PB11MP_GIC_CPU_BASE),
56 .pfn = __phys_to_pfn(REALVIEW_PB11MP_GIC_CPU_BASE),
57 .length = SZ_4K,
58 .type = MT_DEVICE,
59 }, {
60 .virtual = IO_ADDRESS(REALVIEW_PB11MP_GIC_DIST_BASE),
61 .pfn = __phys_to_pfn(REALVIEW_PB11MP_GIC_DIST_BASE),
62 .length = SZ_4K,
63 .type = MT_DEVICE,
64 }, {
65 .virtual = IO_ADDRESS(REALVIEW_TC11MP_GIC_CPU_BASE),
66 .pfn = __phys_to_pfn(REALVIEW_TC11MP_GIC_CPU_BASE),
67 .length = SZ_4K,
68 .type = MT_DEVICE,
69 }, {
70 .virtual = IO_ADDRESS(REALVIEW_TC11MP_GIC_DIST_BASE),
71 .pfn = __phys_to_pfn(REALVIEW_TC11MP_GIC_DIST_BASE),
72 .length = SZ_4K,
73 .type = MT_DEVICE,
74 }, {
75 .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE),
76 .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE),
77 .length = SZ_4K,
78 .type = MT_DEVICE,
79 }, {
80 .virtual = IO_ADDRESS(REALVIEW_PB11MP_TIMER0_1_BASE),
81 .pfn = __phys_to_pfn(REALVIEW_PB11MP_TIMER0_1_BASE),
82 .length = SZ_4K,
83 .type = MT_DEVICE,
84 }, {
85 .virtual = IO_ADDRESS(REALVIEW_PB11MP_TIMER2_3_BASE),
86 .pfn = __phys_to_pfn(REALVIEW_PB11MP_TIMER2_3_BASE),
87 .length = SZ_4K,
88 .type = MT_DEVICE,
89 }, {
90 .virtual = IO_ADDRESS(REALVIEW_TC11MP_L220_BASE),
91 .pfn = __phys_to_pfn(REALVIEW_TC11MP_L220_BASE),
92 .length = SZ_8K,
93 .type = MT_DEVICE,
94 },
95#ifdef CONFIG_DEBUG_LL
96 {
97 .virtual = IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE),
98 .pfn = __phys_to_pfn(REALVIEW_PB11MP_UART0_BASE),
99 .length = SZ_4K,
100 .type = MT_DEVICE,
101 },
102#endif
103};
104
105static void __init realview_pb11mp_map_io(void)
106{
107 iotable_init(realview_pb11mp_io_desc, ARRAY_SIZE(realview_pb11mp_io_desc));
108}
109
110/*
111 * RealView PB11MPCore AMBA devices
112 */
113
114#define GPIO2_IRQ { IRQ_PB11MP_GPIO2, NO_IRQ }
115#define GPIO2_DMA { 0, 0 }
116#define GPIO3_IRQ { IRQ_PB11MP_GPIO3, NO_IRQ }
117#define GPIO3_DMA { 0, 0 }
118#define AACI_IRQ { IRQ_TC11MP_AACI, NO_IRQ }
119#define AACI_DMA { 0x80, 0x81 }
120#define MMCI0_IRQ { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B }
121#define MMCI0_DMA { 0x84, 0 }
122#define KMI0_IRQ { IRQ_TC11MP_KMI0, NO_IRQ }
123#define KMI0_DMA { 0, 0 }
124#define KMI1_IRQ { IRQ_TC11MP_KMI1, NO_IRQ }
125#define KMI1_DMA { 0, 0 }
126#define PB11MP_SMC_IRQ { NO_IRQ, NO_IRQ }
127#define PB11MP_SMC_DMA { 0, 0 }
128#define MPMC_IRQ { NO_IRQ, NO_IRQ }
129#define MPMC_DMA { 0, 0 }
130#define PB11MP_CLCD_IRQ { IRQ_PB11MP_CLCD, NO_IRQ }
131#define PB11MP_CLCD_DMA { 0, 0 }
132#define DMAC_IRQ { IRQ_PB11MP_DMAC, NO_IRQ }
133#define DMAC_DMA { 0, 0 }
134#define SCTL_IRQ { NO_IRQ, NO_IRQ }
135#define SCTL_DMA { 0, 0 }
136#define PB11MP_WATCHDOG_IRQ { IRQ_PB11MP_WATCHDOG, NO_IRQ }
137#define PB11MP_WATCHDOG_DMA { 0, 0 }
138#define PB11MP_GPIO0_IRQ { IRQ_PB11MP_GPIO0, NO_IRQ }
139#define PB11MP_GPIO0_DMA { 0, 0 }
140#define GPIO1_IRQ { IRQ_PB11MP_GPIO1, NO_IRQ }
141#define GPIO1_DMA { 0, 0 }
142#define PB11MP_RTC_IRQ { IRQ_TC11MP_RTC, NO_IRQ }
143#define PB11MP_RTC_DMA { 0, 0 }
144#define SCI_IRQ { IRQ_PB11MP_SCI, NO_IRQ }
145#define SCI_DMA { 7, 6 }
146#define PB11MP_UART0_IRQ { IRQ_TC11MP_UART0, NO_IRQ }
147#define PB11MP_UART0_DMA { 15, 14 }
148#define PB11MP_UART1_IRQ { IRQ_TC11MP_UART1, NO_IRQ }
149#define PB11MP_UART1_DMA { 13, 12 }
150#define PB11MP_UART2_IRQ { IRQ_PB11MP_UART2, NO_IRQ }
151#define PB11MP_UART2_DMA { 11, 10 }
152#define PB11MP_UART3_IRQ { IRQ_PB11MP_UART3, NO_IRQ }
153#define PB11MP_UART3_DMA { 0x86, 0x87 }
154#define PB11MP_SSP_IRQ { IRQ_PB11MP_SSP, NO_IRQ }
155#define PB11MP_SSP_DMA { 9, 8 }
156
157/* FPGA Primecells */
158AMBA_DEVICE(aaci, "fpga:04", AACI, NULL);
159AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data);
160AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL);
161AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL);
162AMBA_DEVICE(uart3, "fpga:09", PB11MP_UART3, NULL);
163
164/* DevChip Primecells */
165AMBA_DEVICE(smc, "dev:00", PB11MP_SMC, NULL);
166AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
167AMBA_DEVICE(wdog, "dev:e1", PB11MP_WATCHDOG, NULL);
168AMBA_DEVICE(gpio0, "dev:e4", PB11MP_GPIO0, NULL);
169AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL);
170AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL);
171AMBA_DEVICE(rtc, "dev:e8", PB11MP_RTC, NULL);
172AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
173AMBA_DEVICE(uart0, "dev:f1", PB11MP_UART0, NULL);
174AMBA_DEVICE(uart1, "dev:f2", PB11MP_UART1, NULL);
175AMBA_DEVICE(uart2, "dev:f3", PB11MP_UART2, NULL);
176AMBA_DEVICE(ssp0, "dev:f4", PB11MP_SSP, NULL);
177
178/* Primecells on the NEC ISSP chip */
179AMBA_DEVICE(clcd, "issp:20", PB11MP_CLCD, &clcd_plat_data);
180AMBA_DEVICE(dmac, "issp:30", DMAC, NULL);
181
182static struct amba_device *amba_devs[] __initdata = {
183 &dmac_device,
184 &uart0_device,
185 &uart1_device,
186 &uart2_device,
187 &uart3_device,
188 &smc_device,
189 &clcd_device,
190 &sctl_device,
191 &wdog_device,
192 &gpio0_device,
193 &gpio1_device,
194 &gpio2_device,
195 &rtc_device,
196 &sci0_device,
197 &ssp0_device,
198 &aaci_device,
199 &mmc0_device,
200 &kmi0_device,
201 &kmi1_device,
202};
203
204/*
205 * RealView PB11MPCore platform devices
206 */
207static struct resource realview_pb11mp_flash_resource[] = {
208 [0] = {
209 .start = REALVIEW_PB11MP_FLASH0_BASE,
210 .end = REALVIEW_PB11MP_FLASH0_BASE + REALVIEW_PB11MP_FLASH0_SIZE - 1,
211 .flags = IORESOURCE_MEM,
212 },
213 [1] = {
214 .start = REALVIEW_PB11MP_FLASH1_BASE,
215 .end = REALVIEW_PB11MP_FLASH1_BASE + REALVIEW_PB11MP_FLASH1_SIZE - 1,
216 .flags = IORESOURCE_MEM,
217 },
218};
219
220static struct resource realview_pb11mp_smsc911x_resources[] = {
221 [0] = {
222 .start = REALVIEW_PB11MP_ETH_BASE,
223 .end = REALVIEW_PB11MP_ETH_BASE + SZ_64K - 1,
224 .flags = IORESOURCE_MEM,
225 },
226 [1] = {
227 .start = IRQ_TC11MP_ETH,
228 .end = IRQ_TC11MP_ETH,
229 .flags = IORESOURCE_IRQ,
230 },
231};
232
233static struct platform_device realview_pb11mp_smsc911x_device = {
234 .name = "smc911x",
235 .id = 0,
236 .num_resources = ARRAY_SIZE(realview_pb11mp_smsc911x_resources),
237 .resource = realview_pb11mp_smsc911x_resources,
238};
239
240struct resource realview_pb11mp_cf_resources[] = {
241 [0] = {
242 .start = REALVIEW_PB11MP_CF_BASE,
243 .end = REALVIEW_PB11MP_CF_BASE + SZ_4K - 1,
244 .flags = IORESOURCE_MEM,
245 },
246 [1] = {
247 .start = REALVIEW_PB11MP_CF_MEM_BASE,
248 .end = REALVIEW_PB11MP_CF_MEM_BASE + SZ_4K - 1,
249 .flags = IORESOURCE_MEM,
250 },
251 [2] = {
252 .start = -1, /* FIXME: Find correct irq */
253 .end = -1,
254 .flags = IORESOURCE_IRQ,
255 },
256};
257
258struct platform_device realview_pb11mp_cf_device = {
259 .name = "compactflash",
260 .id = 0,
261 .num_resources = ARRAY_SIZE(realview_pb11mp_cf_resources),
262 .resource = realview_pb11mp_cf_resources,
263};
264
265static void __init gic_init_irq(void)
266{
267 unsigned int pldctrl;
268
269 /* new irq mode with no DCC */
270 writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK));
271 pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + REALVIEW_PB11MP_SYS_PLD_CTRL1);
272 pldctrl |= 2 << 22;
273 writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + REALVIEW_PB11MP_SYS_PLD_CTRL1);
274 writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
275
276 /* ARM11MPCore test chip GIC, primary */
277 gic_cpu_base_addr = __io_address(REALVIEW_TC11MP_GIC_CPU_BASE);
278 gic_dist_init(0, __io_address(REALVIEW_TC11MP_GIC_DIST_BASE), 29);
279 gic_cpu_init(0, gic_cpu_base_addr);
280
281 /* board GIC, secondary */
282 gic_dist_init(1, __io_address(REALVIEW_PB11MP_GIC_DIST_BASE), IRQ_PB11MP_GIC_START);
283 gic_cpu_init(1, __io_address(REALVIEW_PB11MP_GIC_CPU_BASE));
284 gic_cascade_irq(1, IRQ_TC11MP_PB_IRQ1);
285}
286
287static void __init realview_pb11mp_timer_init(void)
288{
289 timer0_va_base = __io_address(REALVIEW_PB11MP_TIMER0_1_BASE);
290 timer1_va_base = __io_address(REALVIEW_PB11MP_TIMER0_1_BASE) + 0x20;
291 timer2_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE);
292 timer3_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE) + 0x20;
293
294#ifdef CONFIG_LOCAL_TIMERS
295 twd_base_addr = __io_address(REALVIEW_TC11MP_TWD_BASE);
296 twd_size = REALVIEW_TC11MP_TWD_SIZE;
297#endif
298 realview_timer_init(IRQ_TC11MP_TIMER0_1);
299}
300
301static struct sys_timer realview_pb11mp_timer = {
302 .init = realview_pb11mp_timer_init,
303};
304
305static void __init realview_pb11mp_init(void)
306{
307 int i;
308
309#ifdef CONFIG_CACHE_L2X0
310 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled
311 * Bits: .... ...0 0111 1001 0000 .... .... .... */
312 l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff);
313#endif
314
315 clk_register(&realview_clcd_clk);
316
317 realview_flash_register(realview_pb11mp_flash_resource,
318 ARRAY_SIZE(realview_pb11mp_flash_resource));
319 platform_device_register(&realview_pb11mp_smsc911x_device);
320 platform_device_register(&realview_i2c_device);
321 platform_device_register(&realview_pb11mp_cf_device);
322
323 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
324 struct amba_device *d = amba_devs[i];
325 amba_device_register(d, &iomem_resource);
326 }
327
328#ifdef CONFIG_LEDS
329 leds_event = realview_leds_event;
330#endif
331}
332
333MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
334 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
335 .phys_io = REALVIEW_PB11MP_UART0_BASE,
336 .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc,
337 .boot_params = 0x00000100,
338 .map_io = realview_pb11mp_map_io,
339 .init_irq = gic_init_irq,
340 .timer = &realview_pb11mp_timer,
341 .init_machine = realview_pb11mp_init,
342MACHINE_END
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index e2079cf9266f..cd3dc0834b3b 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -97,6 +97,13 @@ config BAST_PC104_IRQ
97 Say Y here to enable the PC104 IRQ routing on the 97 Say Y here to enable the PC104 IRQ routing on the
98 Simtec BAST (EB2410ITX) 98 Simtec BAST (EB2410ITX)
99 99
100config MACH_TCT_HAMMER
101 bool "TCT Hammer Board"
102 select CPU_S3C2410
103 help
104 Say Y here if you are using the TinCanTools Hammer Board
105 <http://www.tincantools.com>
106
100config MACH_VR1000 107config MACH_VR1000
101 bool "Thorcom VR1000" 108 bool "Thorcom VR1000"
102 select PM_SIMTEC if PM 109 select PM_SIMTEC if PM
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 3e7a85594d9c..cabc13ce09e4 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -27,5 +27,6 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
27obj-$(CONFIG_MACH_OTOM) += mach-otom.o 27obj-$(CONFIG_MACH_OTOM) += mach-otom.o
28obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o 28obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
29obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o 29obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
30obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o
30obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o 31obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
31obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o 32obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 66175471fff3..661a2358ac22 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -16,6 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h>
19#include <linux/serial_core.h> 20#include <linux/serial_core.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/dm9000.h> 22#include <linux/dm9000.h>
@@ -236,6 +237,36 @@ static struct platform_device bast_device_nor = {
236 237
237/* NAND Flash on BAST board */ 238/* NAND Flash on BAST board */
238 239
240#ifdef CONFIG_PM
241static int bast_pm_suspend(struct sys_device *sd, pm_message_t state)
242{
243 /* ensure that an nRESET is not generated on resume. */
244 s3c2410_gpio_setpin(S3C2410_GPA21, 1);
245 s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT);
246
247 return 0;
248}
249
250static int bast_pm_resume(struct sys_device *sd)
251{
252 s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT);
253 return 0;
254}
255
256#else
257#define bast_pm_suspend NULL
258#define bast_pm_resume NULL
259#endif
260
261static struct sysdev_class bast_pm_sysclass = {
262 .name = "mach-bast",
263 .suspend = bast_pm_suspend,
264 .resume = bast_pm_resume,
265};
266
267static struct sys_device bast_pm_sysdev = {
268 .cls = &bast_pm_sysclass,
269};
239 270
240static int smartmedia_map[] = { 0 }; 271static int smartmedia_map[] = { 0 };
241static int chip0_map[] = { 1 }; 272static int chip0_map[] = { 1 };
@@ -561,10 +592,10 @@ static void __init bast_map_io(void)
561{ 592{
562 /* initialise the clocks */ 593 /* initialise the clocks */
563 594
564 s3c24xx_dclk0.parent = NULL; 595 s3c24xx_dclk0.parent = &clk_upll;
565 s3c24xx_dclk0.rate = 12*1000*1000; 596 s3c24xx_dclk0.rate = 12*1000*1000;
566 597
567 s3c24xx_dclk1.parent = NULL; 598 s3c24xx_dclk1.parent = &clk_upll;
568 s3c24xx_dclk1.rate = 24*1000*1000; 599 s3c24xx_dclk1.rate = 24*1000*1000;
569 600
570 s3c24xx_clkout0.parent = &s3c24xx_dclk0; 601 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
@@ -586,6 +617,9 @@ static void __init bast_map_io(void)
586 617
587static void __init bast_init(void) 618static void __init bast_init(void)
588{ 619{
620 sysdev_class_register(&bast_pm_sysclass);
621 sysdev_register(&bast_pm_sysdev);
622
589 s3c24xx_fb_set_platdata(&bast_fb_info); 623 s3c24xx_fb_set_platdata(&bast_fb_info);
590 platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); 624 platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices));
591} 625}
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c
new file mode 100644
index 000000000000..d90d445ccfb4
--- /dev/null
+++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c
@@ -0,0 +1,160 @@
1/* linux/arch/arm/mach-s3c2410/mach-tct_hammer.c
2 *
3 * Copyright (c) 2007 TinCanTools
4 * David Anders <danders@amltd.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; either version 2 of
9 * the License, or (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,
19 * MA 02111-1307 USA
20 *
21 * @History:
22 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
23 * Ben Dooks <ben@simtec.co.uk>
24 *
25 ***********************************************************************/
26
27#include <linux/kernel.h>
28#include <linux/types.h>
29#include <linux/interrupt.h>
30#include <linux/list.h>
31#include <linux/timer.h>
32#include <linux/init.h>
33#include <linux/device.h>
34#include <linux/platform_device.h>
35#include <linux/serial_core.h>
36
37#include <asm/mach/arch.h>
38#include <asm/mach/map.h>
39#include <asm/mach/irq.h>
40#include <asm/mach/flash.h>
41
42#include <asm/hardware.h>
43#include <asm/io.h>
44#include <asm/irq.h>
45#include <asm/mach-types.h>
46
47#include <asm/plat-s3c/regs-serial.h>
48#include <asm/plat-s3c24xx/devs.h>
49#include <asm/plat-s3c24xx/cpu.h>
50
51#ifdef CONFIG_MTD_PARTITIONS
52
53#include <linux/mtd/mtd.h>
54#include <linux/mtd/partitions.h>
55#include <linux/mtd/map.h>
56#include <linux/mtd/physmap.h>
57
58static struct resource tct_hammer_nor_resource = {
59 .start = 0x00000000,
60 .end = 0x01000000 - 1,
61 .flags = IORESOURCE_MEM,
62};
63
64static struct mtd_partition tct_hammer_mtd_partitions[] = {
65 {
66 .name = "System",
67 .size = 0x240000,
68 .offset = 0,
69 .mask_flags = MTD_WRITEABLE, /* force read-only */
70 }, {
71 .name = "JFFS2",
72 .size = MTDPART_SIZ_FULL,
73 .offset = MTDPART_OFS_APPEND,
74 }
75};
76
77static struct physmap_flash_data tct_hammer_flash_data = {
78 .width = 2,
79 .parts = tct_hammer_mtd_partitions,
80 .nr_parts = ARRAY_SIZE(tct_hammer_mtd_partitions),
81};
82
83static struct platform_device tct_hammer_device_nor = {
84 .name = "physmap-flash",
85 .id = 0,
86 .dev = {
87 .platform_data = &tct_hammer_flash_data,
88 },
89 .num_resources = 1,
90 .resource = &tct_hammer_nor_resource,
91};
92
93#endif
94
95static struct map_desc tct_hammer_iodesc[] __initdata = {
96};
97
98#define UCON S3C2410_UCON_DEFAULT
99#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
100#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
101
102static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
103 [0] = {
104 .hwport = 0,
105 .flags = 0,
106 .ucon = UCON,
107 .ulcon = ULCON,
108 .ufcon = UFCON,
109 },
110 [1] = {
111 .hwport = 1,
112 .flags = 0,
113 .ucon = UCON,
114 .ulcon = ULCON,
115 .ufcon = UFCON,
116 },
117 [2] = {
118 .hwport = 2,
119 .flags = 0,
120 .ucon = UCON,
121 .ulcon = ULCON,
122 .ufcon = UFCON,
123 }
124};
125
126
127static struct platform_device *tct_hammer_devices[] __initdata = {
128 &s3c_device_adc,
129 &s3c_device_wdt,
130 &s3c_device_i2c,
131 &s3c_device_usb,
132 &s3c_device_rtc,
133 &s3c_device_usbgadget,
134 &s3c_device_sdi,
135#ifdef CONFIG_MTD_PARTITIONS
136 &tct_hammer_device_nor,
137#endif
138};
139
140static void __init tct_hammer_map_io(void)
141{
142 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
143 s3c24xx_init_clocks(0);
144 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
145}
146
147static void __init tct_hammer_init(void)
148{
149 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
150}
151
152MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
153 .phys_io = S3C2410_PA_UART,
154 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
155 .boot_params = S3C2410_SDRAM_PA + 0x100,
156 .map_io = tct_hammer_map_io,
157 .init_irq = s3c24xx_init_irq,
158 .init_machine = tct_hammer_init,
159 .timer = &s3c24xx_timer,
160MACHINE_END
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 3aade7b78fe5..c56423373ff3 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -393,7 +393,7 @@ static void __init vr1000_map_io(void)
393{ 393{
394 /* initialise clock sources */ 394 /* initialise clock sources */
395 395
396 s3c24xx_dclk0.parent = NULL; 396 s3c24xx_dclk0.parent = &clk_upll;
397 s3c24xx_dclk0.rate = 12*1000*1000; 397 s3c24xx_dclk0.rate = 12*1000*1000;
398 398
399 s3c24xx_dclk1.parent = NULL; 399 s3c24xx_dclk1.parent = NULL;
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index abf1599c9f97..98a0de924c22 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -175,7 +175,7 @@ void __init s3c2412_init_clocks(int xtal)
175 /* work out clock scalings */ 175 /* work out clock scalings */
176 176
177 hclk = fclk / ((tmp & S3C2412_CLKDIVN_HDIVN_MASK) + 1); 177 hclk = fclk / ((tmp & S3C2412_CLKDIVN_HDIVN_MASK) + 1);
178 hclk /= ((tmp & S3C2421_CLKDIVN_ARMDIVN) ? 2 : 1); 178 hclk /= ((tmp & S3C2412_CLKDIVN_ARMDIVN) ? 2 : 1);
179 pclk = hclk / ((tmp & S3C2412_CLKDIVN_PDIVN) ? 2 : 1); 179 pclk = hclk / ((tmp & S3C2412_CLKDIVN_PDIVN) ? 2 : 1);
180 180
181 /* print brieft summary of clocks, etc */ 181 /* print brieft summary of clocks, etc */
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 3d3dfa95db8e..47258915a2f9 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -413,10 +413,10 @@ static void __init anubis_map_io(void)
413{ 413{
414 /* initialise the clocks */ 414 /* initialise the clocks */
415 415
416 s3c24xx_dclk0.parent = NULL; 416 s3c24xx_dclk0.parent = &clk_upll;
417 s3c24xx_dclk0.rate = 12*1000*1000; 417 s3c24xx_dclk0.rate = 12*1000*1000;
418 418
419 s3c24xx_dclk1.parent = NULL; 419 s3c24xx_dclk1.parent = &clk_upll;
420 s3c24xx_dclk1.rate = 24*1000*1000; 420 s3c24xx_dclk1.rate = 24*1000*1000;
421 421
422 s3c24xx_clkout0.parent = &s3c24xx_dclk0; 422 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 78af7664988b..8a8acdbd072d 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -18,6 +18,7 @@
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/clk.h>
21 22
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 24#include <asm/mach/map.h>
@@ -344,10 +345,10 @@ static void __init osiris_map_io(void)
344 345
345 /* initialise the clocks */ 346 /* initialise the clocks */
346 347
347 s3c24xx_dclk0.parent = NULL; 348 s3c24xx_dclk0.parent = &clk_upll;
348 s3c24xx_dclk0.rate = 12*1000*1000; 349 s3c24xx_dclk0.rate = 12*1000*1000;
349 350
350 s3c24xx_dclk1.parent = NULL; 351 s3c24xx_dclk1.parent = &clk_upll;
351 s3c24xx_dclk1.rate = 24*1000*1000; 352 s3c24xx_dclk1.rate = 24*1000*1000;
352 353
353 s3c24xx_clkout0.parent = &s3c24xx_dclk0; 354 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
index 7a61e8d33ab7..8e0244631d65 100644
--- a/arch/arm/mach-sa1100/Makefile
+++ b/arch/arm/mach-sa1100/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := clock.o generic.o irq.o dma.o time.o #nmi-oopser.o 6obj-y := clock.o generic.o gpio.o irq.o dma.o time.o #nmi-oopser.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 5c84c604ed86..0c2fa1c4fb4c 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -139,37 +139,6 @@ unsigned long long sched_clock(void)
139 return v; 139 return v;
140} 140}
141 141
142int gpio_direction_input(unsigned gpio)
143{
144 unsigned long flags;
145
146 if (gpio > GPIO_MAX)
147 return -EINVAL;
148
149 local_irq_save(flags);
150 GPDR &= ~GPIO_GPIO(gpio);
151 local_irq_restore(flags);
152 return 0;
153}
154
155EXPORT_SYMBOL(gpio_direction_input);
156
157int gpio_direction_output(unsigned gpio, int value)
158{
159 unsigned long flags;
160
161 if (gpio > GPIO_MAX)
162 return -EINVAL;
163
164 local_irq_save(flags);
165 gpio_set_value(gpio, value);
166 GPDR |= GPIO_GPIO(gpio);
167 local_irq_restore(flags);
168 return 0;
169}
170
171EXPORT_SYMBOL(gpio_direction_output);
172
173/* 142/*
174 * Default power-off for SA1100 143 * Default power-off for SA1100
175 */ 144 */
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index f085d68e568e..793c2e6c991f 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -9,6 +9,7 @@ struct sys_timer;
9extern struct sys_timer sa1100_timer; 9extern struct sys_timer sa1100_timer;
10extern void __init sa1100_map_io(void); 10extern void __init sa1100_map_io(void);
11extern void __init sa1100_init_irq(void); 11extern void __init sa1100_init_irq(void);
12extern void __init sa1100_init_gpio(void);
12 13
13#define SET_BANK(__nr,__start,__size) \ 14#define SET_BANK(__nr,__start,__size) \
14 mi->bank[__nr].start = (__start), \ 15 mi->bank[__nr].start = (__start), \
diff --git a/arch/arm/mach-sa1100/gpio.c b/arch/arm/mach-sa1100/gpio.c
new file mode 100644
index 000000000000..372f1f4f54a1
--- /dev/null
+++ b/arch/arm/mach-sa1100/gpio.c
@@ -0,0 +1,65 @@
1/*
2 * linux/arch/arm/mach-sa1100/gpio.c
3 *
4 * Generic SA-1100 GPIO handling
5 *
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/init.h>
12#include <linux/module.h>
13
14#include <asm/gpio.h>
15#include <asm/hardware.h>
16#include "generic.h"
17
18static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset)
19{
20 return GPLR & GPIO_GPIO(offset);
21}
22
23static void sa1100_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
24{
25 if (value)
26 GPSR = GPIO_GPIO(offset);
27 else
28 GPCR = GPIO_GPIO(offset);
29}
30
31static int sa1100_direction_input(struct gpio_chip *chip, unsigned offset)
32{
33 unsigned long flags;
34
35 local_irq_save(flags);
36 GPDR &= ~GPIO_GPIO(offset);
37 local_irq_restore(flags);
38 return 0;
39}
40
41static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int value)
42{
43 unsigned long flags;
44
45 local_irq_save(flags);
46 sa1100_gpio_set(chip, offset, value);
47 GPDR |= GPIO_GPIO(offset);
48 local_irq_restore(flags);
49 return 0;
50}
51
52static struct gpio_chip sa1100_gpio_chip = {
53 .label = "gpio",
54 .direction_input = sa1100_direction_input,
55 .direction_output = sa1100_direction_output,
56 .set = sa1100_gpio_set,
57 .get = sa1100_gpio_get,
58 .base = 0,
59 .ngpio = GPIO_MAX + 1,
60};
61
62void __init sa1100_init_gpio(void)
63{
64 gpiochip_add(&sa1100_gpio_chip);
65}
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 3dc17d7bf38e..fa0403af7eec 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -347,4 +347,6 @@ void __init sa1100_init_irq(void)
347 */ 347 */
348 set_irq_chip(IRQ_GPIO11_27, &sa1100_normal_chip); 348 set_irq_chip(IRQ_GPIO11_27, &sa1100_normal_chip);
349 set_irq_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler); 349 set_irq_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler);
350
351 sa1100_init_gpio();
350} 352}
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index c2677368d6af..a9799cb35b74 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -13,67 +13,69 @@
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/timex.h> 15#include <linux/timex.h>
16#include <linux/signal.h> 16#include <linux/clockchips.h>
17#include <linux/clocksource.h>
18 17
19#include <asm/mach/time.h> 18#include <asm/mach/time.h>
20#include <asm/hardware.h> 19#include <asm/hardware.h>
21 20
22#define RTC_DEF_DIVIDER (32768 - 1) 21#define MIN_OSCR_DELTA 2
23#define RTC_DEF_TRIM 0
24 22
25static int sa1100_set_rtc(void) 23static irqreturn_t sa1100_ost0_interrupt(int irq, void *dev_id)
26{ 24{
27 unsigned long current_time = xtime.tv_sec; 25 struct clock_event_device *c = dev_id;
28 26
29 if (RTSR & RTSR_ALE) { 27 /* Disarm the compare/match, signal the event. */
30 /* make sure not to forward the clock over an alarm */ 28 OIER &= ~OIER_E0;
31 unsigned long alarm = RTAR; 29 OSSR = OSSR_M0;
32 if (current_time >= alarm && alarm >= RCNR) 30 c->event_handler(c);
33 return -ERESTARTSYS;
34 }
35 RCNR = current_time;
36 return 0;
37}
38 31
39#ifdef CONFIG_NO_IDLE_HZ 32 return IRQ_HANDLED;
40static unsigned long initial_match; 33}
41static int match_posponed;
42#endif
43 34
44static irqreturn_t 35static int
45sa1100_timer_interrupt(int irq, void *dev_id) 36sa1100_osmr0_set_next_event(unsigned long delta, struct clock_event_device *c)
46{ 37{
47 unsigned int next_match; 38 unsigned long flags, next, oscr;
48 39
49#ifdef CONFIG_NO_IDLE_HZ 40 raw_local_irq_save(flags);
50 if (match_posponed) { 41 OIER |= OIER_E0;
51 match_posponed = 0; 42 next = OSCR + delta;
52 OSMR0 = initial_match; 43 OSMR0 = next;
53 } 44 oscr = OSCR;
54#endif 45 raw_local_irq_restore(flags);
55 46
56 /* 47 return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0;
57 * Loop until we get ahead of the free running timer. 48}
58 * This ensures an exact clock tick count and time accuracy.
59 * Since IRQs are disabled at this point, coherence between
60 * lost_ticks(updated in do_timer()) and the match reg value is
61 * ensured, hence we can use do_gettimeofday() from interrupt
62 * handlers.
63 */
64 do {
65 timer_tick();
66 OSSR = OSSR_M0; /* Clear match on timer 0 */
67 next_match = (OSMR0 += LATCH);
68 } while ((signed long)(next_match - OSCR) <= 0);
69 49
70 return IRQ_HANDLED; 50static void
51sa1100_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *c)
52{
53 unsigned long flags;
54
55 switch (mode) {
56 case CLOCK_EVT_MODE_ONESHOT:
57 case CLOCK_EVT_MODE_UNUSED:
58 case CLOCK_EVT_MODE_SHUTDOWN:
59 raw_local_irq_save(flags);
60 OIER &= ~OIER_E0;
61 OSSR = OSSR_M0;
62 raw_local_irq_restore(flags);
63 break;
64
65 case CLOCK_EVT_MODE_RESUME:
66 case CLOCK_EVT_MODE_PERIODIC:
67 break;
68 }
71} 69}
72 70
73static struct irqaction sa1100_timer_irq = { 71static struct clock_event_device ckevt_sa1100_osmr0 = {
74 .name = "SA11xx Timer Tick", 72 .name = "osmr0",
75 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 73 .features = CLOCK_EVT_FEAT_ONESHOT,
76 .handler = sa1100_timer_interrupt, 74 .shift = 32,
75 .rating = 200,
76 .cpumask = CPU_MASK_CPU0,
77 .set_next_event = sa1100_osmr0_set_next_event,
78 .set_mode = sa1100_osmr0_set_mode,
77}; 79};
78 80
79static cycle_t sa1100_read_oscr(void) 81static cycle_t sa1100_read_oscr(void)
@@ -90,62 +92,34 @@ static struct clocksource cksrc_sa1100_oscr = {
90 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 92 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
91}; 93};
92 94
95static struct irqaction sa1100_timer_irq = {
96 .name = "ost0",
97 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
98 .handler = sa1100_ost0_interrupt,
99 .dev_id = &ckevt_sa1100_osmr0,
100};
101
93static void __init sa1100_timer_init(void) 102static void __init sa1100_timer_init(void)
94{ 103{
95 unsigned long flags;
96
97 set_rtc = sa1100_set_rtc;
98
99 OIER = 0; /* disable any timer interrupts */ 104 OIER = 0; /* disable any timer interrupts */
100 OSSR = 0xf; /* clear status on all timers */ 105 OSSR = 0xf; /* clear status on all timers */
101 setup_irq(IRQ_OST0, &sa1100_timer_irq); 106
102 local_irq_save(flags); 107 ckevt_sa1100_osmr0.mult =
103 OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ 108 div_sc(3686400, NSEC_PER_SEC, ckevt_sa1100_osmr0.shift);
104 OSMR0 = OSCR + LATCH; /* set initial match */ 109 ckevt_sa1100_osmr0.max_delta_ns =
105 local_irq_restore(flags); 110 clockevent_delta2ns(0x7fffffff, &ckevt_sa1100_osmr0);
111 ckevt_sa1100_osmr0.min_delta_ns =
112 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_sa1100_osmr0) + 1;
106 113
107 cksrc_sa1100_oscr.mult = 114 cksrc_sa1100_oscr.mult =
108 clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_sa1100_oscr.shift); 115 clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_sa1100_oscr.shift);
109 116
110 clocksource_register(&cksrc_sa1100_oscr); 117 setup_irq(IRQ_OST0, &sa1100_timer_irq);
111}
112
113#ifdef CONFIG_NO_IDLE_HZ
114static int sa1100_dyn_tick_enable_disable(void)
115{
116 /* nothing to do */
117 return 0;
118}
119
120static void sa1100_dyn_tick_reprogram(unsigned long ticks)
121{
122 if (ticks > 1) {
123 initial_match = OSMR0;
124 OSMR0 = initial_match + ticks * LATCH;
125 match_posponed = 1;
126 }
127}
128 118
129static irqreturn_t 119 clocksource_register(&cksrc_sa1100_oscr);
130sa1100_dyn_tick_handler(int irq, void *dev_id) 120 clockevents_register_device(&ckevt_sa1100_osmr0);
131{
132 if (match_posponed) {
133 match_posponed = 0;
134 OSMR0 = initial_match;
135 if ((signed long)(initial_match - OSCR) <= 0)
136 return sa1100_timer_interrupt(irq, dev_id);
137 }
138 return IRQ_NONE;
139} 121}
140 122
141static struct dyn_tick_timer sa1100_dyn_tick = {
142 .enable = sa1100_dyn_tick_enable_disable,
143 .disable = sa1100_dyn_tick_enable_disable,
144 .reprogram = sa1100_dyn_tick_reprogram,
145 .handler = sa1100_dyn_tick_handler,
146};
147#endif
148
149#ifdef CONFIG_PM 123#ifdef CONFIG_PM
150unsigned long osmr[4], oier; 124unsigned long osmr[4], oier;
151 125
@@ -181,7 +155,4 @@ struct sys_timer sa1100_timer = {
181 .init = sa1100_timer_init, 155 .init = sa1100_timer_init,
182 .suspend = sa1100_timer_suspend, 156 .suspend = sa1100_timer_suspend,
183 .resume = sa1100_timer_resume, 157 .resume = sa1100_timer_resume,
184#ifdef CONFIG_NO_IDLE_HZ
185 .dyn_tick = &sa1100_dyn_tick,
186#endif
187}; 158};
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c
index 9858c96560e2..9336508ec0b2 100644
--- a/arch/arm/mach-versatile/clock.c
+++ b/arch/arm/mach-versatile/clock.c
@@ -17,7 +17,6 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19 19
20#include <asm/semaphore.h>
21#include <asm/hardware/icst307.h> 20#include <asm/hardware/icst307.h>
22 21
23#include "clock.h" 22#include "clock.h"
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 76348f060f27..746cbb7c8e95 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -18,6 +18,7 @@ config CPU_ARM610
18 select CPU_CP15_MMU 18 select CPU_CP15_MMU
19 select CPU_COPY_V3 if MMU 19 select CPU_COPY_V3 if MMU
20 select CPU_TLB_V3 if MMU 20 select CPU_TLB_V3 if MMU
21 select CPU_PABRT_NOIFAR
21 help 22 help
22 The ARM610 is the successor to the ARM3 processor 23 The ARM610 is the successor to the ARM3 processor
23 and was produced by VLSI Technology Inc. 24 and was produced by VLSI Technology Inc.
@@ -49,6 +50,7 @@ config CPU_ARM710
49 select CPU_CP15_MMU 50 select CPU_CP15_MMU
50 select CPU_COPY_V3 if MMU 51 select CPU_COPY_V3 if MMU
51 select CPU_TLB_V3 if MMU 52 select CPU_TLB_V3 if MMU
53 select CPU_PABRT_NOIFAR
52 help 54 help
53 A 32-bit RISC microprocessor based on the ARM7 processor core 55 A 32-bit RISC microprocessor based on the ARM7 processor core
54 designed by Advanced RISC Machines Ltd. The ARM710 is the 56 designed by Advanced RISC Machines Ltd. The ARM710 is the
@@ -64,6 +66,7 @@ config CPU_ARM720T
64 default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X 66 default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X
65 select CPU_32v4T 67 select CPU_32v4T
66 select CPU_ABRT_LV4T 68 select CPU_ABRT_LV4T
69 select CPU_PABRT_NOIFAR
67 select CPU_CACHE_V4 70 select CPU_CACHE_V4
68 select CPU_CACHE_VIVT 71 select CPU_CACHE_VIVT
69 select CPU_CP15_MMU 72 select CPU_CP15_MMU
@@ -113,6 +116,7 @@ config CPU_ARM920T
113 default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200 116 default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200
114 select CPU_32v4T 117 select CPU_32v4T
115 select CPU_ABRT_EV4T 118 select CPU_ABRT_EV4T
119 select CPU_PABRT_NOIFAR
116 select CPU_CACHE_V4WT 120 select CPU_CACHE_V4WT
117 select CPU_CACHE_VIVT 121 select CPU_CACHE_VIVT
118 select CPU_CP15_MMU 122 select CPU_CP15_MMU
@@ -135,6 +139,7 @@ config CPU_ARM922T
135 default y if ARCH_LH7A40X || ARCH_KS8695 139 default y if ARCH_LH7A40X || ARCH_KS8695
136 select CPU_32v4T 140 select CPU_32v4T
137 select CPU_ABRT_EV4T 141 select CPU_ABRT_EV4T
142 select CPU_PABRT_NOIFAR
138 select CPU_CACHE_V4WT 143 select CPU_CACHE_V4WT
139 select CPU_CACHE_VIVT 144 select CPU_CACHE_VIVT
140 select CPU_CP15_MMU 145 select CPU_CP15_MMU
@@ -155,6 +160,7 @@ config CPU_ARM925T
155 default y if ARCH_OMAP15XX 160 default y if ARCH_OMAP15XX
156 select CPU_32v4T 161 select CPU_32v4T
157 select CPU_ABRT_EV4T 162 select CPU_ABRT_EV4T
163 select CPU_PABRT_NOIFAR
158 select CPU_CACHE_V4WT 164 select CPU_CACHE_V4WT
159 select CPU_CACHE_VIVT 165 select CPU_CACHE_VIVT
160 select CPU_CP15_MMU 166 select CPU_CP15_MMU
@@ -175,6 +181,7 @@ config CPU_ARM926T
175 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91CAP9 || ARCH_NS9XXX || ARCH_DAVINCI 181 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91CAP9 || ARCH_NS9XXX || ARCH_DAVINCI
176 select CPU_32v5 182 select CPU_32v5
177 select CPU_ABRT_EV5TJ 183 select CPU_ABRT_EV5TJ
184 select CPU_PABRT_NOIFAR
178 select CPU_CACHE_VIVT 185 select CPU_CACHE_VIVT
179 select CPU_CP15_MMU 186 select CPU_CP15_MMU
180 select CPU_COPY_V4WB if MMU 187 select CPU_COPY_V4WB if MMU
@@ -226,6 +233,7 @@ config CPU_ARM1020
226 depends on ARCH_INTEGRATOR 233 depends on ARCH_INTEGRATOR
227 select CPU_32v5 234 select CPU_32v5
228 select CPU_ABRT_EV4T 235 select CPU_ABRT_EV4T
236 select CPU_PABRT_NOIFAR
229 select CPU_CACHE_V4WT 237 select CPU_CACHE_V4WT
230 select CPU_CACHE_VIVT 238 select CPU_CACHE_VIVT
231 select CPU_CP15_MMU 239 select CPU_CP15_MMU
@@ -244,6 +252,7 @@ config CPU_ARM1020E
244 depends on ARCH_INTEGRATOR 252 depends on ARCH_INTEGRATOR
245 select CPU_32v5 253 select CPU_32v5
246 select CPU_ABRT_EV4T 254 select CPU_ABRT_EV4T
255 select CPU_PABRT_NOIFAR
247 select CPU_CACHE_V4WT 256 select CPU_CACHE_V4WT
248 select CPU_CACHE_VIVT 257 select CPU_CACHE_VIVT
249 select CPU_CP15_MMU 258 select CPU_CP15_MMU
@@ -257,6 +266,7 @@ config CPU_ARM1022
257 depends on ARCH_INTEGRATOR 266 depends on ARCH_INTEGRATOR
258 select CPU_32v5 267 select CPU_32v5
259 select CPU_ABRT_EV4T 268 select CPU_ABRT_EV4T
269 select CPU_PABRT_NOIFAR
260 select CPU_CACHE_VIVT 270 select CPU_CACHE_VIVT
261 select CPU_CP15_MMU 271 select CPU_CP15_MMU
262 select CPU_COPY_V4WB if MMU # can probably do better 272 select CPU_COPY_V4WB if MMU # can probably do better
@@ -275,6 +285,7 @@ config CPU_ARM1026
275 depends on ARCH_INTEGRATOR 285 depends on ARCH_INTEGRATOR
276 select CPU_32v5 286 select CPU_32v5
277 select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 287 select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10
288 select CPU_PABRT_NOIFAR
278 select CPU_CACHE_VIVT 289 select CPU_CACHE_VIVT
279 select CPU_CP15_MMU 290 select CPU_CP15_MMU
280 select CPU_COPY_V4WB if MMU # can probably do better 291 select CPU_COPY_V4WB if MMU # can probably do better
@@ -293,6 +304,7 @@ config CPU_SA110
293 select CPU_32v3 if ARCH_RPC 304 select CPU_32v3 if ARCH_RPC
294 select CPU_32v4 if !ARCH_RPC 305 select CPU_32v4 if !ARCH_RPC
295 select CPU_ABRT_EV4 306 select CPU_ABRT_EV4
307 select CPU_PABRT_NOIFAR
296 select CPU_CACHE_V4WB 308 select CPU_CACHE_V4WB
297 select CPU_CACHE_VIVT 309 select CPU_CACHE_VIVT
298 select CPU_CP15_MMU 310 select CPU_CP15_MMU
@@ -314,6 +326,7 @@ config CPU_SA1100
314 default y 326 default y
315 select CPU_32v4 327 select CPU_32v4
316 select CPU_ABRT_EV4 328 select CPU_ABRT_EV4
329 select CPU_PABRT_NOIFAR
317 select CPU_CACHE_V4WB 330 select CPU_CACHE_V4WB
318 select CPU_CACHE_VIVT 331 select CPU_CACHE_VIVT
319 select CPU_CP15_MMU 332 select CPU_CP15_MMU
@@ -326,6 +339,7 @@ config CPU_XSCALE
326 default y 339 default y
327 select CPU_32v5 340 select CPU_32v5
328 select CPU_ABRT_EV5T 341 select CPU_ABRT_EV5T
342 select CPU_PABRT_NOIFAR
329 select CPU_CACHE_VIVT 343 select CPU_CACHE_VIVT
330 select CPU_CP15_MMU 344 select CPU_CP15_MMU
331 select CPU_TLB_V4WBI if MMU 345 select CPU_TLB_V4WBI if MMU
@@ -345,10 +359,11 @@ config CPU_XSC3
345# Feroceon 359# Feroceon
346config CPU_FEROCEON 360config CPU_FEROCEON
347 bool 361 bool
348 depends on ARCH_ORION 362 depends on ARCH_ORION5X
349 default y 363 default y
350 select CPU_32v5 364 select CPU_32v5
351 select CPU_ABRT_EV5T 365 select CPU_ABRT_EV5T
366 select CPU_PABRT_NOIFAR
352 select CPU_CACHE_VIVT 367 select CPU_CACHE_VIVT
353 select CPU_CP15_MMU 368 select CPU_CP15_MMU
354 select CPU_COPY_V4WB if MMU 369 select CPU_COPY_V4WB if MMU
@@ -366,11 +381,12 @@ config CPU_FEROCEON_OLD_ID
366# ARMv6 381# ARMv6
367config CPU_V6 382config CPU_V6
368 bool "Support ARM V6 processor" 383 bool "Support ARM V6 processor"
369 depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A 384 depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
370 default y if ARCH_MX3 385 default y if ARCH_MX3
371 default y if ARCH_MSM7X00A 386 default y if ARCH_MSM7X00A
372 select CPU_32v6 387 select CPU_32v6
373 select CPU_ABRT_EV6 388 select CPU_ABRT_EV6
389 select CPU_PABRT_NOIFAR
374 select CPU_CACHE_V6 390 select CPU_CACHE_V6
375 select CPU_CACHE_VIPT 391 select CPU_CACHE_VIPT
376 select CPU_CP15_MMU 392 select CPU_CP15_MMU
@@ -393,10 +409,11 @@ config CPU_32v6K
393# ARMv7 409# ARMv7
394config CPU_V7 410config CPU_V7
395 bool "Support ARM V7 processor" 411 bool "Support ARM V7 processor"
396 depends on ARCH_INTEGRATOR 412 depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB
397 select CPU_32v6K 413 select CPU_32v6K
398 select CPU_32v7 414 select CPU_32v7
399 select CPU_ABRT_EV7 415 select CPU_ABRT_EV7
416 select CPU_PABRT_IFAR
400 select CPU_CACHE_V7 417 select CPU_CACHE_V7
401 select CPU_CACHE_VIPT 418 select CPU_CACHE_VIPT
402 select CPU_CP15_MMU 419 select CPU_CP15_MMU
@@ -458,6 +475,12 @@ config CPU_ABRT_EV6
458config CPU_ABRT_EV7 475config CPU_ABRT_EV7
459 bool 476 bool
460 477
478config CPU_PABRT_IFAR
479 bool
480
481config CPU_PABRT_NOIFAR
482 bool
483
461# The cache model 484# The cache model
462config CPU_CACHE_V3 485config CPU_CACHE_V3
463 bool 486 bool
@@ -572,6 +595,13 @@ config ARM_THUMB
572 595
573 If you don't know what this all is, saying Y is a safe choice. 596 If you don't know what this all is, saying Y is a safe choice.
574 597
598config ARM_THUMBEE
599 bool "Enable ThumbEE CPU extension"
600 depends on CPU_V7
601 help
602 Say Y here if you have a CPU with the ThumbEE extension and code to
603 make use of it. Say N for code that can run on CPUs without ThumbEE.
604
575config CPU_BIG_ENDIAN 605config CPU_BIG_ENDIAN
576 bool "Build big-endian kernel" 606 bool "Build big-endian kernel"
577 depends on ARCH_SUPPORTS_BIG_ENDIAN 607 depends on ARCH_SUPPORTS_BIG_ENDIAN
@@ -671,5 +701,9 @@ config OUTER_CACHE
671 default n 701 default n
672 702
673config CACHE_L2X0 703config CACHE_L2X0
674 bool 704 bool "Enable the L2x0 outer cache controller"
705 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
706 default y
675 select OUTER_CACHE 707 select OUTER_CACHE
708 help
709 This option enables the L2x0 PrimeCell.
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ec00f26bffa4..b657f1719af0 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -48,8 +48,6 @@ void show_mem(void)
48 48
49 printk("Mem-info:\n"); 49 printk("Mem-info:\n");
50 show_free_areas(); 50 show_free_areas();
51 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
52
53 for_each_online_node(node) { 51 for_each_online_node(node) {
54 pg_data_t *n = NODE_DATA(node); 52 pg_data_t *n = NODE_DATA(node);
55 struct page *map = n->node_mem_map - n->node_start_pfn; 53 struct page *map = n->node_mem_map - n->node_start_pfn;
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index 700c04d6996e..32fd7ea533f2 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -478,6 +478,7 @@ arm1020_processor_functions:
478 .word cpu_arm1020_dcache_clean_area 478 .word cpu_arm1020_dcache_clean_area
479 .word cpu_arm1020_switch_mm 479 .word cpu_arm1020_switch_mm
480 .word cpu_arm1020_set_pte_ext 480 .word cpu_arm1020_set_pte_ext
481 .word pabort_noifar
481 .size arm1020_processor_functions, . - arm1020_processor_functions 482 .size arm1020_processor_functions, . - arm1020_processor_functions
482 483
483 .section ".rodata" 484 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 1cc206ab5eae..fe2b0ae70274 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -459,6 +459,7 @@ arm1020e_processor_functions:
459 .word cpu_arm1020e_dcache_clean_area 459 .word cpu_arm1020e_dcache_clean_area
460 .word cpu_arm1020e_switch_mm 460 .word cpu_arm1020e_switch_mm
461 .word cpu_arm1020e_set_pte_ext 461 .word cpu_arm1020e_set_pte_ext
462 .word pabort_noifar
462 .size arm1020e_processor_functions, . - arm1020e_processor_functions 463 .size arm1020e_processor_functions, . - arm1020e_processor_functions
463 464
464 .section ".rodata" 465 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
index aff0ea08e2f8..06dde678e19d 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.S
@@ -442,6 +442,7 @@ arm1022_processor_functions:
442 .word cpu_arm1022_dcache_clean_area 442 .word cpu_arm1022_dcache_clean_area
443 .word cpu_arm1022_switch_mm 443 .word cpu_arm1022_switch_mm
444 .word cpu_arm1022_set_pte_ext 444 .word cpu_arm1022_set_pte_ext
445 .word pabort_noifar
445 .size arm1022_processor_functions, . - arm1022_processor_functions 446 .size arm1022_processor_functions, . - arm1022_processor_functions
446 447
447 .section ".rodata" 448 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
index 65e43a109085..f5506e6e681e 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.S
@@ -437,6 +437,7 @@ arm1026_processor_functions:
437 .word cpu_arm1026_dcache_clean_area 437 .word cpu_arm1026_dcache_clean_area
438 .word cpu_arm1026_switch_mm 438 .word cpu_arm1026_switch_mm
439 .word cpu_arm1026_set_pte_ext 439 .word cpu_arm1026_set_pte_ext
440 .word pabort_noifar
440 .size arm1026_processor_functions, . - arm1026_processor_functions 441 .size arm1026_processor_functions, . - arm1026_processor_functions
441 442
442 .section .rodata 443 .section .rodata
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S
index 123a7dc7a433..14b6a95c8d45 100644
--- a/arch/arm/mm/proc-arm6_7.S
+++ b/arch/arm/mm/proc-arm6_7.S
@@ -300,6 +300,7 @@ ENTRY(arm6_processor_functions)
300 .word cpu_arm6_dcache_clean_area 300 .word cpu_arm6_dcache_clean_area
301 .word cpu_arm6_switch_mm 301 .word cpu_arm6_switch_mm
302 .word cpu_arm6_set_pte_ext 302 .word cpu_arm6_set_pte_ext
303 .word pabort_noifar
303 .size arm6_processor_functions, . - arm6_processor_functions 304 .size arm6_processor_functions, . - arm6_processor_functions
304 305
305/* 306/*
@@ -316,6 +317,7 @@ ENTRY(arm7_processor_functions)
316 .word cpu_arm7_dcache_clean_area 317 .word cpu_arm7_dcache_clean_area
317 .word cpu_arm7_switch_mm 318 .word cpu_arm7_switch_mm
318 .word cpu_arm7_set_pte_ext 319 .word cpu_arm7_set_pte_ext
320 .word pabort_noifar
319 .size arm7_processor_functions, . - arm7_processor_functions 321 .size arm7_processor_functions, . - arm7_processor_functions
320 322
321 .section ".rodata" 323 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
index dc763be43362..ca5e7aac2da7 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.S
@@ -205,6 +205,7 @@ ENTRY(arm720_processor_functions)
205 .word cpu_arm720_dcache_clean_area 205 .word cpu_arm720_dcache_clean_area
206 .word cpu_arm720_switch_mm 206 .word cpu_arm720_switch_mm
207 .word cpu_arm720_set_pte_ext 207 .word cpu_arm720_set_pte_ext
208 .word pabort_noifar
208 .size arm720_processor_functions, . - arm720_processor_functions 209 .size arm720_processor_functions, . - arm720_processor_functions
209 210
210 .section ".rodata" 211 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index 75c945ed6c4d..0170d4f466ea 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -424,6 +424,7 @@ arm920_processor_functions:
424 .word cpu_arm920_dcache_clean_area 424 .word cpu_arm920_dcache_clean_area
425 .word cpu_arm920_switch_mm 425 .word cpu_arm920_switch_mm
426 .word cpu_arm920_set_pte_ext 426 .word cpu_arm920_set_pte_ext
427 .word pabort_noifar
427 .size arm920_processor_functions, . - arm920_processor_functions 428 .size arm920_processor_functions, . - arm920_processor_functions
428 429
429 .section ".rodata" 430 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index ffb751b877ff..b7952493d404 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -428,6 +428,7 @@ arm922_processor_functions:
428 .word cpu_arm922_dcache_clean_area 428 .word cpu_arm922_dcache_clean_area
429 .word cpu_arm922_switch_mm 429 .word cpu_arm922_switch_mm
430 .word cpu_arm922_set_pte_ext 430 .word cpu_arm922_set_pte_ext
431 .word pabort_noifar
431 .size arm922_processor_functions, . - arm922_processor_functions 432 .size arm922_processor_functions, . - arm922_processor_functions
432 433
433 .section ".rodata" 434 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index 44c2c997819f..e2988eba4cf6 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -491,6 +491,7 @@ arm925_processor_functions:
491 .word cpu_arm925_dcache_clean_area 491 .word cpu_arm925_dcache_clean_area
492 .word cpu_arm925_switch_mm 492 .word cpu_arm925_switch_mm
493 .word cpu_arm925_set_pte_ext 493 .word cpu_arm925_set_pte_ext
494 .word pabort_noifar
494 .size arm925_processor_functions, . - arm925_processor_functions 495 .size arm925_processor_functions, . - arm925_processor_functions
495 496
496 .section ".rodata" 497 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 194ef48968e6..62f7d1dfe016 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -444,6 +444,7 @@ arm926_processor_functions:
444 .word cpu_arm926_dcache_clean_area 444 .word cpu_arm926_dcache_clean_area
445 .word cpu_arm926_switch_mm 445 .word cpu_arm926_switch_mm
446 .word cpu_arm926_set_pte_ext 446 .word cpu_arm926_set_pte_ext
447 .word pabort_noifar
447 .size arm926_processor_functions, . - arm926_processor_functions 448 .size arm926_processor_functions, . - arm926_processor_functions
448 449
449 .section ".rodata" 450 .section ".rodata"
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index fa0dc7e6f0ea..2f169b28e938 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -430,6 +430,7 @@ feroceon_processor_functions:
430 .word cpu_feroceon_dcache_clean_area 430 .word cpu_feroceon_dcache_clean_area
431 .word cpu_feroceon_switch_mm 431 .word cpu_feroceon_switch_mm
432 .word cpu_feroceon_set_pte_ext 432 .word cpu_feroceon_set_pte_ext
433 .word pabort_noifar
433 .size feroceon_processor_functions, . - feroceon_processor_functions 434 .size feroceon_processor_functions, . - feroceon_processor_functions
434 435
435 .section ".rodata" 436 .section ".rodata"
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index 6e226e12989f..4db3d6299a2b 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -223,6 +223,7 @@ ENTRY(sa110_processor_functions)
223 .word cpu_sa110_dcache_clean_area 223 .word cpu_sa110_dcache_clean_area
224 .word cpu_sa110_switch_mm 224 .word cpu_sa110_switch_mm
225 .word cpu_sa110_set_pte_ext 225 .word cpu_sa110_set_pte_ext
226 .word pabort_noifar
226 .size sa110_processor_functions, . - sa110_processor_functions 227 .size sa110_processor_functions, . - sa110_processor_functions
227 228
228 .section ".rodata" 229 .section ".rodata"
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index 9afb11d089fe..3cdef043760f 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -238,6 +238,7 @@ ENTRY(sa1100_processor_functions)
238 .word cpu_sa1100_dcache_clean_area 238 .word cpu_sa1100_dcache_clean_area
239 .word cpu_sa1100_switch_mm 239 .word cpu_sa1100_switch_mm
240 .word cpu_sa1100_set_pte_ext 240 .word cpu_sa1100_set_pte_ext
241 .word pabort_noifar
241 .size sa1100_processor_functions, . - sa1100_processor_functions 242 .size sa1100_processor_functions, . - sa1100_processor_functions
242 243
243 .section ".rodata" 244 .section ".rodata"
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index eb42e5b94863..bf760ea2f789 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -17,10 +17,6 @@
17#include <asm/pgtable-hwdef.h> 17#include <asm/pgtable-hwdef.h>
18#include <asm/pgtable.h> 18#include <asm/pgtable.h>
19 19
20#ifdef CONFIG_SMP
21#include <asm/hardware/arm_scu.h>
22#endif
23
24#include "proc-macros.S" 20#include "proc-macros.S"
25 21
26#define D_CACHE_LINE_SIZE 32 22#define D_CACHE_LINE_SIZE 32
@@ -187,20 +183,10 @@ cpu_v6_name:
187 */ 183 */
188__v6_setup: 184__v6_setup:
189#ifdef CONFIG_SMP 185#ifdef CONFIG_SMP
190 /* Set up the SCU on core 0 only */
191 mrc p15, 0, r0, c0, c0, 5 @ CPU core number
192 ands r0, r0, #15
193 ldreq r0, =SCU_BASE
194 ldreq r5, [r0, #SCU_CTRL]
195 orreq r5, r5, #1
196 streq r5, [r0, #SCU_CTRL]
197
198#ifndef CONFIG_CPU_DCACHE_DISABLE
199 mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode 186 mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode
200 orr r0, r0, #0x20 187 orr r0, r0, #0x20
201 mcr p15, 0, r0, c1, c0, 1 188 mcr p15, 0, r0, c1, c0, 1
202#endif 189#endif
203#endif
204 190
205 mov r0, #0 191 mov r0, #0
206 mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache 192 mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache
@@ -240,6 +226,7 @@ ENTRY(v6_processor_functions)
240 .word cpu_v6_dcache_clean_area 226 .word cpu_v6_dcache_clean_area
241 .word cpu_v6_switch_mm 227 .word cpu_v6_switch_mm
242 .word cpu_v6_set_pte_ext 228 .word cpu_v6_set_pte_ext
229 .word pabort_noifar
243 .size v6_processor_functions, . - v6_processor_functions 230 .size v6_processor_functions, . - v6_processor_functions
244 231
245 .type cpu_arch_name, #object 232 .type cpu_arch_name, #object
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index e0acc5ae6f6f..a1d7331cd64c 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -212,6 +212,7 @@ ENTRY(v7_processor_functions)
212 .word cpu_v7_dcache_clean_area 212 .word cpu_v7_dcache_clean_area
213 .word cpu_v7_switch_mm 213 .word cpu_v7_switch_mm
214 .word cpu_v7_set_pte_ext 214 .word cpu_v7_set_pte_ext
215 .word pabort_ifar
215 .size v7_processor_functions, . - v7_processor_functions 216 .size v7_processor_functions, . - v7_processor_functions
216 217
217 .type cpu_arch_name, #object 218 .type cpu_arch_name, #object
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 016690b9d564..1a6d89823dff 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -534,6 +534,7 @@ ENTRY(xscale_processor_functions)
534 .word cpu_xscale_dcache_clean_area 534 .word cpu_xscale_dcache_clean_area
535 .word cpu_xscale_switch_mm 535 .word cpu_xscale_switch_mm
536 .word cpu_xscale_set_pte_ext 536 .word cpu_xscale_set_pte_ext
537 .word pabort_noifar
537 .size xscale_processor_functions, . - xscale_processor_functions 538 .size xscale_processor_functions, . - xscale_processor_functions
538 539
539 .section ".rodata" 540 .section ".rodata"
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c
index 98d01517b563..d9bc15a69e5d 100644
--- a/arch/arm/plat-iop/pci.c
+++ b/arch/arm/plat-iop/pci.c
@@ -24,6 +24,7 @@
24#include <asm/hardware.h> 24#include <asm/hardware.h>
25#include <asm/mach/pci.h> 25#include <asm/mach/pci.h>
26#include <asm/hardware/iop3xx.h> 26#include <asm/hardware/iop3xx.h>
27#include <asm/mach-types.h>
27 28
28// #define DEBUG 29// #define DEBUG
29 30
@@ -209,8 +210,11 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys)
209 res[1].flags = IORESOURCE_MEM; 210 res[1].flags = IORESOURCE_MEM;
210 request_resource(&iomem_resource, &res[1]); 211 request_resource(&iomem_resource, &res[1]);
211 212
212 sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA; 213 /*
213 sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - IOP3XX_PCI_LOWER_IO_BA; 214 * Use whatever translation is already setup.
215 */
216 sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - *IOP3XX_OMWTVR0;
217 sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - *IOP3XX_OIOWTVR;
214 218
215 sys->resource[0] = &res[0]; 219 sys->resource[0] = &res[0];
216 sys->resource[1] = &res[1]; 220 sys->resource[1] = &res[1];
@@ -250,11 +254,11 @@ void __init iop3xx_atu_setup(void)
250 *IOP3XX_IATVR2 = PHYS_OFFSET; 254 *IOP3XX_IATVR2 = PHYS_OFFSET;
251 255
252 /* Outbound window 0 */ 256 /* Outbound window 0 */
253 *IOP3XX_OMWTVR0 = IOP3XX_PCI_LOWER_MEM_PA; 257 *IOP3XX_OMWTVR0 = IOP3XX_PCI_LOWER_MEM_BA;
254 *IOP3XX_OUMWTVR0 = 0; 258 *IOP3XX_OUMWTVR0 = 0;
255 259
256 /* Outbound window 1 */ 260 /* Outbound window 1 */
257 *IOP3XX_OMWTVR1 = IOP3XX_PCI_LOWER_MEM_PA + IOP3XX_PCI_MEM_WINDOW_SIZE; 261 *IOP3XX_OMWTVR1 = IOP3XX_PCI_LOWER_MEM_BA + IOP3XX_PCI_MEM_WINDOW_SIZE;
258 *IOP3XX_OUMWTVR1 = 0; 262 *IOP3XX_OUMWTVR1 = 0;
259 263
260 /* BAR 3 ( Disabled ) */ 264 /* BAR 3 ( Disabled ) */
@@ -265,7 +269,7 @@ void __init iop3xx_atu_setup(void)
265 269
266 /* Setup the I/O Bar 270 /* Setup the I/O Bar
267 */ 271 */
268 *IOP3XX_OIOWTVR = IOP3XX_PCI_LOWER_IO_PA;; 272 *IOP3XX_OIOWTVR = IOP3XX_PCI_LOWER_IO_BA;
269 273
270 /* Enable inbound and outbound cycles 274 /* Enable inbound and outbound cycles
271 */ 275 */
@@ -322,34 +326,59 @@ void __init iop3xx_atu_disable(void)
322/* Flag to determine whether the ATU is initialized and the PCI bus scanned */ 326/* Flag to determine whether the ATU is initialized and the PCI bus scanned */
323int init_atu; 327int init_atu;
324 328
325void __init iop3xx_pci_preinit(void) 329int iop3xx_get_init_atu(void) {
330 /* check if default has been overridden */
331 if (init_atu != IOP3XX_INIT_ATU_DEFAULT)
332 return init_atu;
333 else
334 return IOP3XX_INIT_ATU_DISABLE;
335}
336
337static void __init iop3xx_atu_debug(void)
326{ 338{
327 if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) { 339 DBG("PCI: Intel IOP3xx PCI init.\n");
328 iop3xx_atu_disable(); 340 DBG("PCI: Outbound memory window 0: PCI 0x%08x%08x\n",
329 iop3xx_atu_setup(); 341 *IOP3XX_OUMWTVR0, *IOP3XX_OMWTVR0);
330 } 342 DBG("PCI: Outbound memory window 1: PCI 0x%08x%08x\n",
343 *IOP3XX_OUMWTVR1, *IOP3XX_OMWTVR1);
344 DBG("PCI: Outbound IO window: PCI 0x%08x\n",
345 *IOP3XX_OIOWTVR);
346
347 DBG("PCI: Inbound memory window 0: PCI 0x%08x%08x 0x%08x -> 0x%08x\n",
348 *IOP3XX_IAUBAR0, *IOP3XX_IABAR0, *IOP3XX_IALR0, *IOP3XX_IATVR0);
349 DBG("PCI: Inbound memory window 1: PCI 0x%08x%08x 0x%08x\n",
350 *IOP3XX_IAUBAR1, *IOP3XX_IABAR1, *IOP3XX_IALR1);
351 DBG("PCI: Inbound memory window 2: PCI 0x%08x%08x 0x%08x -> 0x%08x\n",
352 *IOP3XX_IAUBAR2, *IOP3XX_IABAR2, *IOP3XX_IALR2, *IOP3XX_IATVR2);
353 DBG("PCI: Inbound memory window 3: PCI 0x%08x%08x 0x%08x -> 0x%08x\n",
354 *IOP3XX_IAUBAR3, *IOP3XX_IABAR3, *IOP3XX_IALR3, *IOP3XX_IATVR3);
355
356 DBG("PCI: Expansion ROM window: PCI 0x%08x%08x 0x%08x -> 0x%08x\n",
357 0, *IOP3XX_ERBAR, *IOP3XX_ERLR, *IOP3XX_ERTVR);
331 358
332 DBG("PCI: Intel 803xx PCI init code.\n");
333 DBG("ATU: IOP3XX_ATUCMD=0x%04x\n", *IOP3XX_ATUCMD); 359 DBG("ATU: IOP3XX_ATUCMD=0x%04x\n", *IOP3XX_ATUCMD);
334 DBG("ATU: IOP3XX_OMWTVR0=0x%04x, IOP3XX_OIOWTVR=0x%04x\n",
335 *IOP3XX_OMWTVR0,
336 *IOP3XX_OIOWTVR);
337 DBG("ATU: IOP3XX_ATUCR=0x%08x\n", *IOP3XX_ATUCR); 360 DBG("ATU: IOP3XX_ATUCR=0x%08x\n", *IOP3XX_ATUCR);
338 DBG("ATU: IOP3XX_IABAR0=0x%08x IOP3XX_IALR0=0x%08x IOP3XX_IATVR0=%08x\n",
339 *IOP3XX_IABAR0, *IOP3XX_IALR0, *IOP3XX_IATVR0);
340 DBG("ATU: IOP3XX_OMWTVR0=0x%08x\n", *IOP3XX_OMWTVR0);
341 DBG("ATU: IOP3XX_IABAR1=0x%08x IOP3XX_IALR1=0x%08x\n",
342 *IOP3XX_IABAR1, *IOP3XX_IALR1);
343 DBG("ATU: IOP3XX_ERBAR=0x%08x IOP3XX_ERLR=0x%08x IOP3XX_ERTVR=%08x\n",
344 *IOP3XX_ERBAR, *IOP3XX_ERLR, *IOP3XX_ERTVR);
345 DBG("ATU: IOP3XX_IABAR2=0x%08x IOP3XX_IALR2=0x%08x IOP3XX_IATVR2=%08x\n",
346 *IOP3XX_IABAR2, *IOP3XX_IALR2, *IOP3XX_IATVR2);
347 DBG("ATU: IOP3XX_IABAR3=0x%08x IOP3XX_IALR3=0x%08x IOP3XX_IATVR3=%08x\n",
348 *IOP3XX_IABAR3, *IOP3XX_IALR3, *IOP3XX_IATVR3);
349 361
350 hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); 362 hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort");
351} 363}
352 364
365/* for platforms that might be host-bus-adapters */
366void __init iop3xx_pci_preinit_cond(void)
367{
368 if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) {
369 iop3xx_atu_disable();
370 iop3xx_atu_setup();
371 iop3xx_atu_debug();
372 }
373}
374
375void __init iop3xx_pci_preinit(void)
376{
377 iop3xx_atu_disable();
378 iop3xx_atu_setup();
379 iop3xx_atu_debug();
380}
381
353/* allow init_atu to be user overridden */ 382/* allow init_atu to be user overridden */
354static int __init iop3xx_init_atu_setup(char *str) 383static int __init iop3xx_init_atu_setup(char *str)
355{ 384{
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index 03a65c0dfb60..bb6e12738fb3 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -4,7 +4,7 @@ menu "Freescale MXC Implementations"
4 4
5choice 5choice
6 prompt "MXC/iMX System Type" 6 prompt "MXC/iMX System Type"
7 default 0 7 default ARCH_MX3
8 8
9config ARCH_MX3 9config ARCH_MX3
10 bool "MX3-based" 10 bool "MX3-based"
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile
index 66ad9c2b6d64..f96dc0362068 100644
--- a/arch/arm/plat-mxc/Makefile
+++ b/arch/arm/plat-mxc/Makefile
@@ -4,7 +4,3 @@
4 4
5# Common support 5# Common support
6obj-y := irq.o 6obj-y := irq.o
7
8obj-m :=
9obj-n :=
10obj- :=
diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c
index 87d253bc3d3c..2ad5a6917b3f 100644
--- a/arch/arm/plat-mxc/irq.c
+++ b/arch/arm/plat-mxc/irq.c
@@ -19,21 +19,13 @@
19#include <asm/mach/irq.h> 19#include <asm/mach/irq.h>
20#include <asm/arch/common.h> 20#include <asm/arch/common.h>
21 21
22/*! 22/* Disable interrupt number "irq" in the AVIC */
23 * Disable interrupt number "irq" in the AVIC
24 *
25 * @param irq interrupt source number
26 */
27static void mxc_mask_irq(unsigned int irq) 23static void mxc_mask_irq(unsigned int irq)
28{ 24{
29 __raw_writel(irq, AVIC_INTDISNUM); 25 __raw_writel(irq, AVIC_INTDISNUM);
30} 26}
31 27
32/*! 28/* Enable interrupt number "irq" in the AVIC */
33 * Enable interrupt number "irq" in the AVIC
34 *
35 * @param irq interrupt source number
36 */
37static void mxc_unmask_irq(unsigned int irq) 29static void mxc_unmask_irq(unsigned int irq)
38{ 30{
39 __raw_writel(irq, AVIC_INTENNUM); 31 __raw_writel(irq, AVIC_INTENNUM);
@@ -45,7 +37,7 @@ static struct irq_chip mxc_avic_chip = {
45 .unmask = mxc_unmask_irq, 37 .unmask = mxc_unmask_irq,
46}; 38};
47 39
48/*! 40/*
49 * This function initializes the AVIC hardware and disables all the 41 * This function initializes the AVIC hardware and disables all the
50 * interrupts. It registers the interrupt enable and disable functions 42 * interrupts. It registers the interrupt enable and disable functions
51 * to the kernel for each interrupt source. 43 * to the kernel for each interrupt source.
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 8f56c255d1ee..bc639a30d6d1 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -9,8 +9,6 @@ obj-m :=
9obj-n := 9obj-n :=
10obj- := 10obj- :=
11 11
12obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
13
14# OCPI interconnect support for 1710, 1610 and 5912 12# OCPI interconnect support for 1710, 1610 and 5912
15obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o 13obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
16 14
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 0a603242f367..72d34a23a2ec 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -23,7 +23,6 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/semaphore.h>
27 26
28#include <asm/arch/clock.h> 27#include <asm/arch/clock.h>
29 28
@@ -304,6 +303,23 @@ void propagate_rate(struct clk * tclk)
304 } 303 }
305} 304}
306 305
306/**
307 * recalculate_root_clocks - recalculate and propagate all root clocks
308 *
309 * Recalculates all root clocks (clocks with no parent), which if the
310 * clock's .recalc is set correctly, should also propagate their rates.
311 * Called at init.
312 */
313void recalculate_root_clocks(void)
314{
315 struct clk *clkp;
316
317 list_for_each_entry(clkp, &clocks, node) {
318 if (unlikely(!clkp->parent) && likely((u32)clkp->recalc))
319 clkp->recalc(clkp);
320 }
321}
322
307int clk_register(struct clk *clk) 323int clk_register(struct clk *clk)
308{ 324{
309 if (clk == NULL || IS_ERR(clk)) 325 if (clk == NULL || IS_ERR(clk))
@@ -358,6 +374,30 @@ void clk_allow_idle(struct clk *clk)
358} 374}
359EXPORT_SYMBOL(clk_allow_idle); 375EXPORT_SYMBOL(clk_allow_idle);
360 376
377void clk_enable_init_clocks(void)
378{
379 struct clk *clkp;
380
381 list_for_each_entry(clkp, &clocks, node) {
382 if (clkp->flags & ENABLE_ON_INIT)
383 clk_enable(clkp);
384 }
385}
386EXPORT_SYMBOL(clk_enable_init_clocks);
387
388#ifdef CONFIG_CPU_FREQ
389void clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
390{
391 unsigned long flags;
392
393 spin_lock_irqsave(&clockfw_lock, flags);
394 if (arch_clock->clk_init_cpufreq_table)
395 arch_clock->clk_init_cpufreq_table(table);
396 spin_unlock_irqrestore(&clockfw_lock, flags);
397}
398EXPORT_SYMBOL(clk_init_cpufreq_table);
399#endif
400
361/*-------------------------------------------------------------------------*/ 401/*-------------------------------------------------------------------------*/
362 402
363#ifdef CONFIG_OMAP_RESET_CLOCKS 403#ifdef CONFIG_OMAP_RESET_CLOCKS
@@ -396,3 +436,4 @@ int __init clk_init(struct clk_functions * custom_clocks)
396 436
397 return 0; 437 return 0;
398} 438}
439
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 4f0f9c4e938e..bd1cef2c3c14 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -27,11 +27,16 @@
27#include <asm/setup.h> 27#include <asm/setup.h>
28 28
29#include <asm/arch/board.h> 29#include <asm/arch/board.h>
30#include <asm/arch/control.h>
30#include <asm/arch/mux.h> 31#include <asm/arch/mux.h>
31#include <asm/arch/fpga.h> 32#include <asm/arch/fpga.h>
32 33
33#include <asm/arch/clock.h> 34#include <asm/arch/clock.h>
34 35
36#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
37# include "../mach-omap2/sdrc.h"
38#endif
39
35#define NO_LENGTH_CHECK 0xffffffff 40#define NO_LENGTH_CHECK 0xffffffff
36 41
37unsigned char omap_bootloader_tag[512]; 42unsigned char omap_bootloader_tag[512];
@@ -171,8 +176,8 @@ console_initcall(omap_add_serial_console);
171 176
172#if defined(CONFIG_ARCH_OMAP16XX) 177#if defined(CONFIG_ARCH_OMAP16XX)
173#define TIMER_32K_SYNCHRONIZED 0xfffbc410 178#define TIMER_32K_SYNCHRONIZED 0xfffbc410
174#elif defined(CONFIG_ARCH_OMAP24XX) 179#elif defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
175#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10) 180#define TIMER_32K_SYNCHRONIZED (OMAP2_32KSYNCT_BASE + 0x10)
176#endif 181#endif
177 182
178#ifdef TIMER_32K_SYNCHRONIZED 183#ifdef TIMER_32K_SYNCHRONIZED
@@ -193,12 +198,35 @@ static struct clocksource clocksource_32k = {
193 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 198 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
194}; 199};
195 200
201/*
202 * Rounds down to nearest nsec.
203 */
204unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
205{
206 return cyc2ns(&clocksource_32k, ticks_32k);
207}
208
209/*
210 * Returns current time from boot in nsecs. It's OK for this to wrap
211 * around for now, as it's just a relative time stamp.
212 */
213unsigned long long sched_clock(void)
214{
215 return omap_32k_ticks_to_nsecs(omap_32k_read());
216}
217
196static int __init omap_init_clocksource_32k(void) 218static int __init omap_init_clocksource_32k(void)
197{ 219{
198 static char err[] __initdata = KERN_ERR 220 static char err[] __initdata = KERN_ERR
199 "%s: can't register clocksource!\n"; 221 "%s: can't register clocksource!\n";
200 222
201 if (cpu_is_omap16xx() || cpu_is_omap24xx()) { 223 if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
224 struct clk *sync_32k_ick;
225
226 sync_32k_ick = clk_get(NULL, "omap_32ksync_ick");
227 if (sync_32k_ick)
228 clk_enable(sync_32k_ick);
229
202 clocksource_32k.mult = clocksource_hz2mult(32768, 230 clocksource_32k.mult = clocksource_hz2mult(32768,
203 clocksource_32k.shift); 231 clocksource_32k.shift);
204 232
@@ -210,3 +238,33 @@ static int __init omap_init_clocksource_32k(void)
210arch_initcall(omap_init_clocksource_32k); 238arch_initcall(omap_init_clocksource_32k);
211 239
212#endif /* TIMER_32K_SYNCHRONIZED */ 240#endif /* TIMER_32K_SYNCHRONIZED */
241
242/* Global address base setup code */
243
244#if defined(CONFIG_ARCH_OMAP2420)
245void __init omap2_set_globals_242x(void)
246{
247 omap2_sdrc_base = OMAP2420_SDRC_BASE;
248 omap2_sms_base = OMAP2420_SMS_BASE;
249 omap_ctrl_base_set(OMAP2420_CTRL_BASE);
250}
251#endif
252
253#if defined(CONFIG_ARCH_OMAP2430)
254void __init omap2_set_globals_243x(void)
255{
256 omap2_sdrc_base = OMAP243X_SDRC_BASE;
257 omap2_sms_base = OMAP243X_SMS_BASE;
258 omap_ctrl_base_set(OMAP243X_CTRL_BASE);
259}
260#endif
261
262#if defined(CONFIG_ARCH_OMAP3430)
263void __init omap2_set_globals_343x(void)
264{
265 omap2_sdrc_base = OMAP343X_SDRC_BASE;
266 omap2_sms_base = OMAP343X_SMS_BASE;
267 omap_ctrl_base_set(OMAP343X_CTRL_BASE);
268}
269#endif
270
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 8c78e4e57b5c..1903a3491ee9 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -136,7 +136,6 @@ struct gpio_bank {
136 u16 irq; 136 u16 irq;
137 u16 virtual_irq_start; 137 u16 virtual_irq_start;
138 int method; 138 int method;
139 u32 reserved_map;
140#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) 139#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
141 u32 suspend_wakeup; 140 u32 suspend_wakeup;
142 u32 saved_wakeup; 141 u32 saved_wakeup;
@@ -149,7 +148,9 @@ struct gpio_bank {
149 u32 saved_fallingdetect; 148 u32 saved_fallingdetect;
150 u32 saved_risingdetect; 149 u32 saved_risingdetect;
151#endif 150#endif
151 u32 level_mask;
152 spinlock_t lock; 152 spinlock_t lock;
153 struct gpio_chip chip;
153}; 154};
154 155
155#define METHOD_MPUIO 0 156#define METHOD_MPUIO 0
@@ -538,10 +539,9 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
538 bank->enabled_non_wakeup_gpios &= ~gpio_bit; 539 bank->enabled_non_wakeup_gpios &= ~gpio_bit;
539 } 540 }
540 541
541 /* 542 bank->level_mask =
542 * FIXME: Possibly do 'set_irq_handler(j, handle_level_irq)' if only 543 __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT0) |
543 * level triggering requested. 544 __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT1);
544 */
545} 545}
546#endif 546#endif
547 547
@@ -652,6 +652,12 @@ static int gpio_irq_type(unsigned irq, unsigned type)
652 irq_desc[irq].status |= type; 652 irq_desc[irq].status |= type;
653 } 653 }
654 spin_unlock_irqrestore(&bank->lock, flags); 654 spin_unlock_irqrestore(&bank->lock, flags);
655
656 if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
657 __set_irq_handler_unlocked(irq, handle_level_irq);
658 else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
659 __set_irq_handler_unlocked(irq, handle_edge_irq);
660
655 return retval; 661 return retval;
656} 662}
657 663
@@ -903,19 +909,17 @@ int omap_request_gpio(int gpio)
903{ 909{
904 struct gpio_bank *bank; 910 struct gpio_bank *bank;
905 unsigned long flags; 911 unsigned long flags;
912 int status;
906 913
907 if (check_gpio(gpio) < 0) 914 if (check_gpio(gpio) < 0)
908 return -EINVAL; 915 return -EINVAL;
909 916
917 status = gpio_request(gpio, NULL);
918 if (status < 0)
919 return status;
920
910 bank = get_gpio_bank(gpio); 921 bank = get_gpio_bank(gpio);
911 spin_lock_irqsave(&bank->lock, flags); 922 spin_lock_irqsave(&bank->lock, flags);
912 if (unlikely(bank->reserved_map & (1 << get_gpio_index(gpio)))) {
913 printk(KERN_ERR "omap-gpio: GPIO %d is already reserved!\n", gpio);
914 dump_stack();
915 spin_unlock_irqrestore(&bank->lock, flags);
916 return -1;
917 }
918 bank->reserved_map |= (1 << get_gpio_index(gpio));
919 923
920 /* Set trigger to none. You need to enable the desired trigger with 924 /* Set trigger to none. You need to enable the desired trigger with
921 * request_irq() or set_irq_type(). 925 * request_irq() or set_irq_type().
@@ -945,10 +949,11 @@ void omap_free_gpio(int gpio)
945 return; 949 return;
946 bank = get_gpio_bank(gpio); 950 bank = get_gpio_bank(gpio);
947 spin_lock_irqsave(&bank->lock, flags); 951 spin_lock_irqsave(&bank->lock, flags);
948 if (unlikely(!(bank->reserved_map & (1 << get_gpio_index(gpio))))) { 952 if (unlikely(!gpiochip_is_requested(&bank->chip,
953 get_gpio_index(gpio)))) {
954 spin_unlock_irqrestore(&bank->lock, flags);
949 printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio); 955 printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio);
950 dump_stack(); 956 dump_stack();
951 spin_unlock_irqrestore(&bank->lock, flags);
952 return; 957 return;
953 } 958 }
954#ifdef CONFIG_ARCH_OMAP16XX 959#ifdef CONFIG_ARCH_OMAP16XX
@@ -965,9 +970,9 @@ void omap_free_gpio(int gpio)
965 __raw_writel(1 << get_gpio_index(gpio), reg); 970 __raw_writel(1 << get_gpio_index(gpio), reg);
966 } 971 }
967#endif 972#endif
968 bank->reserved_map &= ~(1 << get_gpio_index(gpio));
969 _reset_gpio(bank, gpio); 973 _reset_gpio(bank, gpio);
970 spin_unlock_irqrestore(&bank->lock, flags); 974 spin_unlock_irqrestore(&bank->lock, flags);
975 gpio_free(gpio);
971} 976}
972 977
973/* 978/*
@@ -1022,12 +1027,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
1022 isr &= 0x0000ffff; 1027 isr &= 0x0000ffff;
1023 1028
1024 if (cpu_class_is_omap2()) { 1029 if (cpu_class_is_omap2()) {
1025 level_mask = 1030 level_mask = bank->level_mask & enabled;
1026 __raw_readl(bank->base +
1027 OMAP24XX_GPIO_LEVELDETECT0) |
1028 __raw_readl(bank->base +
1029 OMAP24XX_GPIO_LEVELDETECT1);
1030 level_mask &= enabled;
1031 } 1031 }
1032 1032
1033 /* clear edge sensitive interrupts before handler(s) are 1033 /* clear edge sensitive interrupts before handler(s) are
@@ -1052,51 +1052,13 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
1052 gpio_irq = bank->virtual_irq_start; 1052 gpio_irq = bank->virtual_irq_start;
1053 for (; isr != 0; isr >>= 1, gpio_irq++) { 1053 for (; isr != 0; isr >>= 1, gpio_irq++) {
1054 struct irq_desc *d; 1054 struct irq_desc *d;
1055 int irq_mask; 1055
1056 if (!(isr & 1)) 1056 if (!(isr & 1))
1057 continue; 1057 continue;
1058 d = irq_desc + gpio_irq; 1058 d = irq_desc + gpio_irq;
1059 /* Don't run the handler if it's already running
1060 * or was disabled lazely.
1061 */
1062 if (unlikely((d->depth ||
1063 (d->status & IRQ_INPROGRESS)))) {
1064 irq_mask = 1 <<
1065 (gpio_irq - bank->virtual_irq_start);
1066 /* The unmasking will be done by
1067 * enable_irq in case it is disabled or
1068 * after returning from the handler if
1069 * it's already running.
1070 */
1071 _enable_gpio_irqbank(bank, irq_mask, 0);
1072 if (!d->depth) {
1073 /* Level triggered interrupts
1074 * won't ever be reentered
1075 */
1076 BUG_ON(level_mask & irq_mask);
1077 d->status |= IRQ_PENDING;
1078 }
1079 continue;
1080 }
1081 1059
1082 desc_handle_irq(gpio_irq, d); 1060 desc_handle_irq(gpio_irq, d);
1083
1084 if (unlikely((d->status & IRQ_PENDING) && !d->depth)) {
1085 irq_mask = 1 <<
1086 (gpio_irq - bank->virtual_irq_start);
1087 d->status &= ~IRQ_PENDING;
1088 _enable_gpio_irqbank(bank, irq_mask, 1);
1089 retrigger |= irq_mask;
1090 }
1091 } 1061 }
1092
1093 if (cpu_class_is_omap2()) {
1094 /* clear level sensitive interrupts after handler(s) */
1095 _enable_gpio_irqbank(bank, isr_saved & level_mask, 0);
1096 _clear_gpio_irqbank(bank, isr_saved & level_mask);
1097 _enable_gpio_irqbank(bank, isr_saved & level_mask, 1);
1098 }
1099
1100 } 1062 }
1101 /* if bank has any level sensitive GPIO pin interrupt 1063 /* if bank has any level sensitive GPIO pin interrupt
1102 configured, we must unmask the bank interrupt only after 1064 configured, we must unmask the bank interrupt only after
@@ -1135,6 +1097,14 @@ static void gpio_unmask_irq(unsigned int irq)
1135{ 1097{
1136 unsigned int gpio = irq - IH_GPIO_BASE; 1098 unsigned int gpio = irq - IH_GPIO_BASE;
1137 struct gpio_bank *bank = get_irq_chip_data(irq); 1099 struct gpio_bank *bank = get_irq_chip_data(irq);
1100 unsigned int irq_mask = 1 << get_gpio_index(gpio);
1101
1102 /* For level-triggered GPIOs, the clearing must be done after
1103 * the HW source is cleared, thus after the handler has run */
1104 if (bank->level_mask & irq_mask) {
1105 _set_gpio_irqenable(bank, gpio, 0);
1106 _clear_gpio_irqstatus(bank, gpio);
1107 }
1138 1108
1139 _set_gpio_irqenable(bank, gpio, 1); 1109 _set_gpio_irqenable(bank, gpio, 1);
1140} 1110}
@@ -1266,6 +1236,53 @@ static inline void mpuio_init(void) {}
1266 1236
1267/*---------------------------------------------------------------------*/ 1237/*---------------------------------------------------------------------*/
1268 1238
1239/* REVISIT these are stupid implementations! replace by ones that
1240 * don't switch on METHOD_* and which mostly avoid spinlocks
1241 */
1242
1243static int gpio_input(struct gpio_chip *chip, unsigned offset)
1244{
1245 struct gpio_bank *bank;
1246 unsigned long flags;
1247
1248 bank = container_of(chip, struct gpio_bank, chip);
1249 spin_lock_irqsave(&bank->lock, flags);
1250 _set_gpio_direction(bank, offset, 1);
1251 spin_unlock_irqrestore(&bank->lock, flags);
1252 return 0;
1253}
1254
1255static int gpio_get(struct gpio_chip *chip, unsigned offset)
1256{
1257 return omap_get_gpio_datain(chip->base + offset);
1258}
1259
1260static int gpio_output(struct gpio_chip *chip, unsigned offset, int value)
1261{
1262 struct gpio_bank *bank;
1263 unsigned long flags;
1264
1265 bank = container_of(chip, struct gpio_bank, chip);
1266 spin_lock_irqsave(&bank->lock, flags);
1267 _set_gpio_dataout(bank, offset, value);
1268 _set_gpio_direction(bank, offset, 0);
1269 spin_unlock_irqrestore(&bank->lock, flags);
1270 return 0;
1271}
1272
1273static void gpio_set(struct gpio_chip *chip, unsigned offset, int value)
1274{
1275 struct gpio_bank *bank;
1276 unsigned long flags;
1277
1278 bank = container_of(chip, struct gpio_bank, chip);
1279 spin_lock_irqsave(&bank->lock, flags);
1280 _set_gpio_dataout(bank, offset, value);
1281 spin_unlock_irqrestore(&bank->lock, flags);
1282}
1283
1284/*---------------------------------------------------------------------*/
1285
1269static int initialized; 1286static int initialized;
1270#if !defined(CONFIG_ARCH_OMAP3) 1287#if !defined(CONFIG_ARCH_OMAP3)
1271static struct clk * gpio_ick; 1288static struct clk * gpio_ick;
@@ -1293,6 +1310,7 @@ static struct lock_class_key gpio_lock_class;
1293static int __init _omap_gpio_init(void) 1310static int __init _omap_gpio_init(void)
1294{ 1311{
1295 int i; 1312 int i;
1313 int gpio = 0;
1296 struct gpio_bank *bank; 1314 struct gpio_bank *bank;
1297#if defined(CONFIG_ARCH_OMAP3) 1315#if defined(CONFIG_ARCH_OMAP3)
1298 char clk_name[11]; 1316 char clk_name[11];
@@ -1423,7 +1441,6 @@ static int __init _omap_gpio_init(void)
1423 int j, gpio_count = 16; 1441 int j, gpio_count = 16;
1424 1442
1425 bank = &gpio_bank[i]; 1443 bank = &gpio_bank[i];
1426 bank->reserved_map = 0;
1427 bank->base = IO_ADDRESS(bank->base); 1444 bank->base = IO_ADDRESS(bank->base);
1428 spin_lock_init(&bank->lock); 1445 spin_lock_init(&bank->lock);
1429 if (bank_is_mpuio(bank)) 1446 if (bank_is_mpuio(bank))
@@ -1461,6 +1478,26 @@ static int __init _omap_gpio_init(void)
1461 gpio_count = 32; 1478 gpio_count = 32;
1462 } 1479 }
1463#endif 1480#endif
1481
1482 /* REVISIT eventually switch from OMAP-specific gpio structs
1483 * over to the generic ones
1484 */
1485 bank->chip.direction_input = gpio_input;
1486 bank->chip.get = gpio_get;
1487 bank->chip.direction_output = gpio_output;
1488 bank->chip.set = gpio_set;
1489 if (bank_is_mpuio(bank)) {
1490 bank->chip.label = "mpuio";
1491 bank->chip.base = OMAP_MPUIO(0);
1492 } else {
1493 bank->chip.label = "gpio";
1494 bank->chip.base = gpio;
1495 gpio += gpio_count;
1496 }
1497 bank->chip.ngpio = gpio_count;
1498
1499 gpiochip_add(&bank->chip);
1500
1464 for (j = bank->virtual_irq_start; 1501 for (j = bank->virtual_irq_start;
1465 j < bank->virtual_irq_start + gpio_count; j++) { 1502 j < bank->virtual_irq_start + gpio_count; j++) {
1466 lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class); 1503 lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class);
@@ -1757,8 +1794,10 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
1757 1794
1758 for (j = 0; j < bankwidth; j++, gpio++, mask <<= 1) { 1795 for (j = 0; j < bankwidth; j++, gpio++, mask <<= 1) {
1759 unsigned irq, value, is_in, irqstat; 1796 unsigned irq, value, is_in, irqstat;
1797 const char *label;
1760 1798
1761 if (!(bank->reserved_map & mask)) 1799 label = gpiochip_is_requested(&bank->chip, j);
1800 if (!label)
1762 continue; 1801 continue;
1763 1802
1764 irq = bank->virtual_irq_start + j; 1803 irq = bank->virtual_irq_start + j;
@@ -1766,13 +1805,16 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
1766 is_in = gpio_is_input(bank, mask); 1805 is_in = gpio_is_input(bank, mask);
1767 1806
1768 if (bank_is_mpuio(bank)) 1807 if (bank_is_mpuio(bank))
1769 seq_printf(s, "MPUIO %2d: ", j); 1808 seq_printf(s, "MPUIO %2d ", j);
1770 else 1809 else
1771 seq_printf(s, "GPIO %3d: ", gpio); 1810 seq_printf(s, "GPIO %3d ", gpio);
1772 seq_printf(s, "%s %s", 1811 seq_printf(s, "(%10s): %s %s",
1812 label,
1773 is_in ? "in " : "out", 1813 is_in ? "in " : "out",
1774 value ? "hi" : "lo"); 1814 value ? "hi" : "lo");
1775 1815
1816/* FIXME for at least omap2, show pullup/pulldown state */
1817
1776 irqstat = irq_desc[irq].status; 1818 irqstat = irq_desc[irq].status;
1777 if (is_in && ((bank->suspend_wakeup & mask) 1819 if (is_in && ((bank->suspend_wakeup & mask)
1778 || irqstat & IRQ_TYPE_SENSE_MASK)) { 1820 || irqstat & IRQ_TYPE_SENSE_MASK)) {
@@ -1795,10 +1837,10 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
1795 trigger = "high"; 1837 trigger = "high";
1796 break; 1838 break;
1797 case IRQ_TYPE_NONE: 1839 case IRQ_TYPE_NONE:
1798 trigger = "(unspecified)"; 1840 trigger = "(?)";
1799 break; 1841 break;
1800 } 1842 }
1801 seq_printf(s, ", irq-%d %s%s", 1843 seq_printf(s, ", irq-%d %-8s%s",
1802 irq, trigger, 1844 irq, trigger,
1803 (bank->suspend_wakeup & mask) 1845 (bank->suspend_wakeup & mask)
1804 ? " wakeup" : ""); 1846 ? " wakeup" : "");
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index 75211f20ccb3..6f3f459731c8 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -3,9 +3,9 @@
3 * 3 *
4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h 4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h
5 * 5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation 6 * Copyright (C) 2003 - 2008 Nokia Corporation
7 * 7 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com> 8 * Written by Tony Lindgren
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
@@ -32,21 +32,17 @@
32 32
33#ifdef CONFIG_OMAP_MUX 33#ifdef CONFIG_OMAP_MUX
34 34
35#define OMAP24XX_L4_BASE 0x48000000 35static struct omap_mux_cfg *mux_cfg;
36#define OMAP24XX_PULL_ENA (1 << 3)
37#define OMAP24XX_PULL_UP (1 << 4)
38 36
39static struct pin_config * pin_table; 37int __init omap_mux_register(struct omap_mux_cfg *arch_mux_cfg)
40static unsigned long pin_table_sz;
41
42extern struct pin_config * omap730_pins;
43extern struct pin_config * omap1xxx_pins;
44extern struct pin_config * omap24xx_pins;
45
46int __init omap_mux_register(struct pin_config * pins, unsigned long size)
47{ 38{
48 pin_table = pins; 39 if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0
49 pin_table_sz = size; 40 || !arch_mux_cfg->cfg_reg) {
41 printk(KERN_ERR "Invalid pin table\n");
42 return -EINVAL;
43 }
44
45 mux_cfg = arch_mux_cfg;
50 46
51 return 0; 47 return 0;
52} 48}
@@ -56,152 +52,26 @@ int __init omap_mux_register(struct pin_config * pins, unsigned long size)
56 */ 52 */
57int __init_or_module omap_cfg_reg(const unsigned long index) 53int __init_or_module omap_cfg_reg(const unsigned long index)
58{ 54{
59 static DEFINE_SPINLOCK(mux_spin_lock); 55 struct pin_config *reg;
60
61 unsigned long flags;
62 struct pin_config *cfg;
63 unsigned int reg_orig = 0, reg = 0, pu_pd_orig = 0, pu_pd = 0,
64 pull_orig = 0, pull = 0;
65 unsigned int mask, warn = 0;
66 56
67 if (!pin_table) 57 if (mux_cfg == NULL) {
68 BUG(); 58 printk(KERN_ERR "Pin mux table not initialized\n");
59 return -ENODEV;
60 }
69 61
70 if (index >= pin_table_sz) { 62 if (index >= mux_cfg->size) {
71 printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n", 63 printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n",
72 index, pin_table_sz); 64 index, mux_cfg->size);
73 dump_stack(); 65 dump_stack();
74 return -ENODEV; 66 return -ENODEV;
75 } 67 }
76 68
77 cfg = (struct pin_config *)&pin_table[index]; 69 reg = (struct pin_config *)&mux_cfg->pins[index];
78 if (cpu_is_omap24xx()) {
79 u8 reg = 0;
80
81 reg |= cfg->mask & 0x7;
82 if (cfg->pull_val)
83 reg |= OMAP24XX_PULL_ENA;
84 if(cfg->pu_pd_val)
85 reg |= OMAP24XX_PULL_UP;
86#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
87 {
88 u8 orig = omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg);
89 u8 debug = 0;
90
91#ifdef CONFIG_OMAP_MUX_DEBUG
92 debug = cfg->debug;
93#endif
94 warn = (orig != reg);
95 if (debug || warn)
96 printk("MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
97 cfg->name,
98 OMAP24XX_L4_BASE + cfg->mux_reg,
99 orig, reg);
100 }
101#endif
102 omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg);
103 70
104 return 0; 71 if (!mux_cfg->cfg_reg)
105 } 72 return -ENODEV;
106
107 /* Check the mux register in question */
108 if (cfg->mux_reg) {
109 unsigned tmp1, tmp2;
110
111 spin_lock_irqsave(&mux_spin_lock, flags);
112 reg_orig = omap_readl(cfg->mux_reg);
113
114 /* The mux registers always seem to be 3 bits long */
115 mask = (0x7 << cfg->mask_offset);
116 tmp1 = reg_orig & mask;
117 reg = reg_orig & ~mask;
118
119 tmp2 = (cfg->mask << cfg->mask_offset);
120 reg |= tmp2;
121
122 if (tmp1 != tmp2)
123 warn = 1;
124
125 omap_writel(reg, cfg->mux_reg);
126 spin_unlock_irqrestore(&mux_spin_lock, flags);
127 }
128
129 /* Check for pull up or pull down selection on 1610 */
130 if (!cpu_is_omap15xx()) {
131 if (cfg->pu_pd_reg && cfg->pull_val) {
132 spin_lock_irqsave(&mux_spin_lock, flags);
133 pu_pd_orig = omap_readl(cfg->pu_pd_reg);
134 mask = 1 << cfg->pull_bit;
135
136 if (cfg->pu_pd_val) {
137 if (!(pu_pd_orig & mask))
138 warn = 1;
139 /* Use pull up */
140 pu_pd = pu_pd_orig | mask;
141 } else {
142 if (pu_pd_orig & mask)
143 warn = 1;
144 /* Use pull down */
145 pu_pd = pu_pd_orig & ~mask;
146 }
147 omap_writel(pu_pd, cfg->pu_pd_reg);
148 spin_unlock_irqrestore(&mux_spin_lock, flags);
149 }
150 }
151
152 /* Check for an associated pull down register */
153 if (cfg->pull_reg) {
154 spin_lock_irqsave(&mux_spin_lock, flags);
155 pull_orig = omap_readl(cfg->pull_reg);
156 mask = 1 << cfg->pull_bit;
157
158 if (cfg->pull_val) {
159 if (pull_orig & mask)
160 warn = 1;
161 /* Low bit = pull enabled */
162 pull = pull_orig & ~mask;
163 } else {
164 if (!(pull_orig & mask))
165 warn = 1;
166 /* High bit = pull disabled */
167 pull = pull_orig | mask;
168 }
169
170 omap_writel(pull, cfg->pull_reg);
171 spin_unlock_irqrestore(&mux_spin_lock, flags);
172 }
173
174 if (warn) {
175#ifdef CONFIG_OMAP_MUX_WARNINGS
176 printk(KERN_WARNING "MUX: initialized %s\n", cfg->name);
177#endif
178 }
179
180#ifdef CONFIG_OMAP_MUX_DEBUG
181 if (cfg->debug || warn) {
182 printk("MUX: Setting register %s\n", cfg->name);
183 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
184 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg);
185
186 if (!cpu_is_omap15xx()) {
187 if (cfg->pu_pd_reg && cfg->pull_val) {
188 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
189 cfg->pu_pd_name, cfg->pu_pd_reg,
190 pu_pd_orig, pu_pd);
191 }
192 }
193
194 if (cfg->pull_reg)
195 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
196 cfg->pull_name, cfg->pull_reg, pull_orig, pull);
197 }
198#endif
199 73
200#ifdef CONFIG_OMAP_MUX_ERRORS 74 return mux_cfg->cfg_reg(reg);
201 return warn ? -ETXTBSY : 0;
202#else
203 return 0;
204#endif
205} 75}
206EXPORT_SYMBOL(omap_cfg_reg); 76EXPORT_SYMBOL(omap_cfg_reg);
207#else 77#else
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index a5aedf964b88..a619475c4b76 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -33,6 +33,7 @@
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <asm/hardware.h>
35 35
36#include <asm/arch/control.h>
36#include <asm/arch/mux.h> 37#include <asm/arch/mux.h>
37#include <asm/arch/usb.h> 38#include <asm/arch/usb.h>
38#include <asm/arch/board.h> 39#include <asm/arch/board.h>
@@ -76,7 +77,7 @@
76 77
77/*-------------------------------------------------------------------------*/ 78/*-------------------------------------------------------------------------*/
78 79
79#ifdef CONFIG_ARCH_OMAP_OTG 80#if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_USB_MUSB_OTG)
80 81
81static struct otg_transceiver *xceiv; 82static struct otg_transceiver *xceiv;
82 83
@@ -110,12 +111,48 @@ EXPORT_SYMBOL(otg_set_transceiver);
110 111
111#if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP15XX) 112#if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP15XX)
112 113
114static void omap2_usb_devconf_clear(u8 port, u32 mask)
115{
116 u32 r;
117
118 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
119 r &= ~USBTXWRMODEI(port, mask);
120 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
121}
122
123static void omap2_usb_devconf_set(u8 port, u32 mask)
124{
125 u32 r;
126
127 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
128 r |= USBTXWRMODEI(port, mask);
129 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
130}
131
132static void omap2_usb2_disable_5pinbitll(void)
133{
134 u32 r;
135
136 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
137 r &= ~(USBTXWRMODEI(2, USB_BIDIR_TLL) | USBT2TLL5PI);
138 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
139}
140
141static void omap2_usb2_enable_5pinunitll(void)
142{
143 u32 r;
144
145 r = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
146 r |= USBTXWRMODEI(2, USB_UNIDIR_TLL) | USBT2TLL5PI;
147 omap_ctrl_writel(r, OMAP2_CONTROL_DEVCONF0);
148}
149
113static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device) 150static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device)
114{ 151{
115 u32 syscon1 = 0; 152 u32 syscon1 = 0;
116 153
117 if (cpu_is_omap24xx()) 154 if (cpu_is_omap24xx())
118 CONTROL_DEVCONF_REG &= ~USBT0WRMODEI(USB_BIDIR_TLL); 155 omap2_usb_devconf_clear(0, USB_BIDIR_TLL);
119 156
120 if (nwires == 0) { 157 if (nwires == 0) {
121 if (cpu_class_is_omap1() && !cpu_is_omap15xx()) { 158 if (cpu_class_is_omap1() && !cpu_is_omap15xx()) {
@@ -187,19 +224,19 @@ static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device)
187 case 3: 224 case 3:
188 syscon1 = 2; 225 syscon1 = 2;
189 if (cpu_is_omap24xx()) 226 if (cpu_is_omap24xx())
190 CONTROL_DEVCONF_REG |= USBT0WRMODEI(USB_BIDIR); 227 omap2_usb_devconf_set(0, USB_BIDIR);
191 break; 228 break;
192 case 4: 229 case 4:
193 syscon1 = 1; 230 syscon1 = 1;
194 if (cpu_is_omap24xx()) 231 if (cpu_is_omap24xx())
195 CONTROL_DEVCONF_REG |= USBT0WRMODEI(USB_BIDIR); 232 omap2_usb_devconf_set(0, USB_BIDIR);
196 break; 233 break;
197 case 6: 234 case 6:
198 syscon1 = 3; 235 syscon1 = 3;
199 if (cpu_is_omap24xx()) { 236 if (cpu_is_omap24xx()) {
200 omap_cfg_reg(J19_24XX_USB0_VP); 237 omap_cfg_reg(J19_24XX_USB0_VP);
201 omap_cfg_reg(K20_24XX_USB0_VM); 238 omap_cfg_reg(K20_24XX_USB0_VM);
202 CONTROL_DEVCONF_REG |= USBT0WRMODEI(USB_UNIDIR); 239 omap2_usb_devconf_set(0, USB_UNIDIR);
203 } else { 240 } else {
204 omap_cfg_reg(AA9_USB0_VP); 241 omap_cfg_reg(AA9_USB0_VP);
205 omap_cfg_reg(R9_USB0_VM); 242 omap_cfg_reg(R9_USB0_VM);
@@ -220,7 +257,7 @@ static u32 __init omap_usb1_init(unsigned nwires)
220 if (cpu_class_is_omap1() && !cpu_is_omap15xx() && nwires != 6) 257 if (cpu_class_is_omap1() && !cpu_is_omap15xx() && nwires != 6)
221 USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB1_UNI_R; 258 USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB1_UNI_R;
222 if (cpu_is_omap24xx()) 259 if (cpu_is_omap24xx())
223 CONTROL_DEVCONF_REG &= ~USBT1WRMODEI(USB_BIDIR_TLL); 260 omap2_usb_devconf_clear(1, USB_BIDIR_TLL);
224 261
225 if (nwires == 0) 262 if (nwires == 0)
226 return 0; 263 return 0;
@@ -261,17 +298,17 @@ static u32 __init omap_usb1_init(unsigned nwires)
261 * this TLL link is not using DP/DM 298 * this TLL link is not using DP/DM
262 */ 299 */
263 syscon1 = 1; 300 syscon1 = 1;
264 CONTROL_DEVCONF_REG |= USBT1WRMODEI(USB_BIDIR_TLL); 301 omap2_usb_devconf_set(1, USB_BIDIR_TLL);
265 break; 302 break;
266 case 3: 303 case 3:
267 syscon1 = 2; 304 syscon1 = 2;
268 if (cpu_is_omap24xx()) 305 if (cpu_is_omap24xx())
269 CONTROL_DEVCONF_REG |= USBT1WRMODEI(USB_BIDIR); 306 omap2_usb_devconf_set(1, USB_BIDIR);
270 break; 307 break;
271 case 4: 308 case 4:
272 syscon1 = 1; 309 syscon1 = 1;
273 if (cpu_is_omap24xx()) 310 if (cpu_is_omap24xx())
274 CONTROL_DEVCONF_REG |= USBT1WRMODEI(USB_BIDIR); 311 omap2_usb_devconf_set(1, USB_BIDIR);
275 break; 312 break;
276 case 6: 313 case 6:
277 if (cpu_is_omap24xx()) 314 if (cpu_is_omap24xx())
@@ -295,8 +332,7 @@ static u32 __init omap_usb2_init(unsigned nwires, unsigned alt_pingroup)
295 u32 syscon1 = 0; 332 u32 syscon1 = 0;
296 333
297 if (cpu_is_omap24xx()) { 334 if (cpu_is_omap24xx()) {
298 CONTROL_DEVCONF_REG &= ~(USBT2WRMODEI(USB_BIDIR_TLL) 335 omap2_usb2_disable_5pinbitll();
299 | USBT2TLL5PI);
300 alt_pingroup = 0; 336 alt_pingroup = 0;
301 } 337 }
302 338
@@ -343,17 +379,17 @@ static u32 __init omap_usb2_init(unsigned nwires, unsigned alt_pingroup)
343 * this TLL link is not using DP/DM 379 * this TLL link is not using DP/DM
344 */ 380 */
345 syscon1 = 1; 381 syscon1 = 1;
346 CONTROL_DEVCONF_REG |= USBT2WRMODEI(USB_BIDIR_TLL); 382 omap2_usb_devconf_set(2, USB_BIDIR_TLL);
347 break; 383 break;
348 case 3: 384 case 3:
349 syscon1 = 2; 385 syscon1 = 2;
350 if (cpu_is_omap24xx()) 386 if (cpu_is_omap24xx())
351 CONTROL_DEVCONF_REG |= USBT2WRMODEI(USB_BIDIR); 387 omap2_usb_devconf_set(2, USB_BIDIR);
352 break; 388 break;
353 case 4: 389 case 4:
354 syscon1 = 1; 390 syscon1 = 1;
355 if (cpu_is_omap24xx()) 391 if (cpu_is_omap24xx())
356 CONTROL_DEVCONF_REG |= USBT2WRMODEI(USB_BIDIR); 392 omap2_usb_devconf_set(2, USB_BIDIR);
357 break; 393 break;
358 case 5: 394 case 5:
359 if (!cpu_is_omap24xx()) 395 if (!cpu_is_omap24xx())
@@ -364,8 +400,7 @@ static u32 __init omap_usb2_init(unsigned nwires, unsigned alt_pingroup)
364 * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED} 400 * set up OTG_SYSCON2.HMC_TLL{ATTACH,SPEED}
365 */ 401 */
366 syscon1 = 3; 402 syscon1 = 3;
367 CONTROL_DEVCONF_REG |= USBT2WRMODEI(USB_UNIDIR_TLL) 403 omap2_usb2_enable_5pinunitll();
368 | USBT2TLL5PI;
369 break; 404 break;
370 case 6: 405 case 6:
371 if (cpu_is_omap24xx()) 406 if (cpu_is_omap24xx())
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile
new file mode 100644
index 000000000000..198f3dde2be3
--- /dev/null
+++ b/arch/arm/plat-orion/Makefile
@@ -0,0 +1,8 @@
1#
2# Makefile for the linux kernel.
3#
4
5obj-y := irq.o pcie.o time.o
6obj-m :=
7obj-n :=
8obj- :=
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c
new file mode 100644
index 000000000000..c5b669d234bc
--- /dev/null
+++ b/arch/arm/plat-orion/irq.c
@@ -0,0 +1,64 @@
1/*
2 * arch/arm/plat-orion/irq.c
3 *
4 * Marvell Orion SoC IRQ handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/io.h>
15#include <asm/plat-orion/irq.h>
16
17static void orion_irq_mask(u32 irq)
18{
19 void __iomem *maskaddr = get_irq_chip_data(irq);
20 u32 mask;
21
22 mask = readl(maskaddr);
23 mask &= ~(1 << (irq & 31));
24 writel(mask, maskaddr);
25}
26
27static void orion_irq_unmask(u32 irq)
28{
29 void __iomem *maskaddr = get_irq_chip_data(irq);
30 u32 mask;
31
32 mask = readl(maskaddr);
33 mask |= 1 << (irq & 31);
34 writel(mask, maskaddr);
35}
36
37static struct irq_chip orion_irq_chip = {
38 .name = "orion_irq",
39 .ack = orion_irq_mask,
40 .mask = orion_irq_mask,
41 .unmask = orion_irq_unmask,
42};
43
44void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
45{
46 unsigned int i;
47
48 /*
49 * Mask all interrupts initially.
50 */
51 writel(0, maskaddr);
52
53 /*
54 * Register IRQ sources.
55 */
56 for (i = 0; i < 32; i++) {
57 unsigned int irq = irq_start + i;
58
59 set_irq_chip(irq, &orion_irq_chip);
60 set_irq_chip_data(irq, maskaddr);
61 set_irq_handler(irq, handle_level_irq);
62 set_irq_flags(irq, IRQF_VALID);
63 }
64}
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c
new file mode 100644
index 000000000000..abfda53f1800
--- /dev/null
+++ b/arch/arm/plat-orion/pcie.c
@@ -0,0 +1,245 @@
1/*
2 * arch/arm/plat-orion/pcie.c
3 *
4 * Marvell Orion SoC PCIe handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/pci.h>
13#include <linux/mbus.h>
14#include <asm/mach/pci.h>
15#include <asm/plat-orion/pcie.h>
16
17/*
18 * PCIe unit register offsets.
19 */
20#define PCIE_DEV_ID_OFF 0x0000
21#define PCIE_CMD_OFF 0x0004
22#define PCIE_DEV_REV_OFF 0x0008
23#define PCIE_BAR_LO_OFF(n) (0x0010 + ((n) << 3))
24#define PCIE_BAR_HI_OFF(n) (0x0014 + ((n) << 3))
25#define PCIE_HEADER_LOG_4_OFF 0x0128
26#define PCIE_BAR_CTRL_OFF(n) (0x1804 + ((n - 1) * 4))
27#define PCIE_WIN04_CTRL_OFF(n) (0x1820 + ((n) << 4))
28#define PCIE_WIN04_BASE_OFF(n) (0x1824 + ((n) << 4))
29#define PCIE_WIN04_REMAP_OFF(n) (0x182c + ((n) << 4))
30#define PCIE_WIN5_CTRL_OFF 0x1880
31#define PCIE_WIN5_BASE_OFF 0x1884
32#define PCIE_WIN5_REMAP_OFF 0x188c
33#define PCIE_CONF_ADDR_OFF 0x18f8
34#define PCIE_CONF_ADDR_EN 0x80000000
35#define PCIE_CONF_REG(r) ((((r) & 0xf00) << 16) | ((r) & 0xfc))
36#define PCIE_CONF_BUS(b) (((b) & 0xff) << 16)
37#define PCIE_CONF_DEV(d) (((d) & 0x1f) << 11)
38#define PCIE_CONF_FUNC(f) (((f) & 0x3) << 8)
39#define PCIE_CONF_DATA_OFF 0x18fc
40#define PCIE_MASK_OFF 0x1910
41#define PCIE_CTRL_OFF 0x1a00
42#define PCIE_STAT_OFF 0x1a04
43#define PCIE_STAT_DEV_OFFS 20
44#define PCIE_STAT_DEV_MASK 0x1f
45#define PCIE_STAT_BUS_OFFS 8
46#define PCIE_STAT_BUS_MASK 0xff
47#define PCIE_STAT_LINK_DOWN 1
48
49
50u32 __init orion_pcie_dev_id(void __iomem *base)
51{
52 return readl(base + PCIE_DEV_ID_OFF) >> 16;
53}
54
55u32 __init orion_pcie_rev(void __iomem *base)
56{
57 return readl(base + PCIE_DEV_REV_OFF) & 0xff;
58}
59
60int orion_pcie_link_up(void __iomem *base)
61{
62 return !(readl(base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
63}
64
65int orion_pcie_get_local_bus_nr(void __iomem *base)
66{
67 u32 stat = readl(base + PCIE_STAT_OFF);
68
69 return (stat >> PCIE_STAT_BUS_OFFS) & PCIE_STAT_BUS_MASK;
70}
71
72void __init orion_pcie_set_local_bus_nr(void __iomem *base, int nr)
73{
74 u32 stat;
75
76 stat = readl(base + PCIE_STAT_OFF);
77 stat &= ~(PCIE_STAT_BUS_MASK << PCIE_STAT_BUS_OFFS);
78 stat |= nr << PCIE_STAT_BUS_OFFS;
79 writel(stat, base + PCIE_STAT_OFF);
80}
81
82/*
83 * Setup PCIE BARs and Address Decode Wins:
84 * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
85 * WIN[0-3] -> DRAM bank[0-3]
86 */
87static void __init orion_pcie_setup_wins(void __iomem *base,
88 struct mbus_dram_target_info *dram)
89{
90 u32 size;
91 int i;
92
93 /*
94 * First, disable and clear BARs and windows.
95 */
96 for (i = 1; i <= 2; i++) {
97 writel(0, base + PCIE_BAR_CTRL_OFF(i));
98 writel(0, base + PCIE_BAR_LO_OFF(i));
99 writel(0, base + PCIE_BAR_HI_OFF(i));
100 }
101
102 for (i = 0; i < 5; i++) {
103 writel(0, base + PCIE_WIN04_CTRL_OFF(i));
104 writel(0, base + PCIE_WIN04_BASE_OFF(i));
105 writel(0, base + PCIE_WIN04_REMAP_OFF(i));
106 }
107
108 writel(0, base + PCIE_WIN5_CTRL_OFF);
109 writel(0, base + PCIE_WIN5_BASE_OFF);
110 writel(0, base + PCIE_WIN5_REMAP_OFF);
111
112 /*
113 * Setup windows for DDR banks. Count total DDR size on the fly.
114 */
115 size = 0;
116 for (i = 0; i < dram->num_cs; i++) {
117 struct mbus_dram_window *cs = dram->cs + i;
118
119 writel(cs->base & 0xffff0000, base + PCIE_WIN04_BASE_OFF(i));
120 writel(0, base + PCIE_WIN04_REMAP_OFF(i));
121 writel(((cs->size - 1) & 0xffff0000) |
122 (cs->mbus_attr << 8) |
123 (dram->mbus_dram_target_id << 4) | 1,
124 base + PCIE_WIN04_CTRL_OFF(i));
125
126 size += cs->size;
127 }
128
129 /*
130 * Setup BAR[1] to all DRAM banks.
131 */
132 writel(dram->cs[0].base, base + PCIE_BAR_LO_OFF(1));
133 writel(0, base + PCIE_BAR_HI_OFF(1));
134 writel(((size - 1) & 0xffff0000) | 1, base + PCIE_BAR_CTRL_OFF(1));
135}
136
137void __init orion_pcie_setup(void __iomem *base,
138 struct mbus_dram_target_info *dram)
139{
140 u16 cmd;
141 u32 mask;
142
143 /*
144 * Point PCIe unit MBUS decode windows to DRAM space.
145 */
146 orion_pcie_setup_wins(base, dram);
147
148 /*
149 * Master + slave enable.
150 */
151 cmd = readw(base + PCIE_CMD_OFF);
152 cmd |= PCI_COMMAND_IO;
153 cmd |= PCI_COMMAND_MEMORY;
154 cmd |= PCI_COMMAND_MASTER;
155 writew(cmd, base + PCIE_CMD_OFF);
156
157 /*
158 * Enable interrupt lines A-D.
159 */
160 mask = readl(base + PCIE_MASK_OFF);
161 mask |= 0x0f000000;
162 writel(mask, base + PCIE_MASK_OFF);
163}
164
165int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus,
166 u32 devfn, int where, int size, u32 *val)
167{
168 writel(PCIE_CONF_BUS(bus->number) |
169 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
170 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
171 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN,
172 base + PCIE_CONF_ADDR_OFF);
173
174 *val = readl(base + PCIE_CONF_DATA_OFF);
175
176 if (size == 1)
177 *val = (*val >> (8 * (where & 3))) & 0xff;
178 else if (size == 2)
179 *val = (*val >> (8 * (where & 3))) & 0xffff;
180
181 return PCIBIOS_SUCCESSFUL;
182}
183
184int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
185 u32 devfn, int where, int size, u32 *val)
186{
187 writel(PCIE_CONF_BUS(bus->number) |
188 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
189 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
190 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN,
191 base + PCIE_CONF_ADDR_OFF);
192
193 *val = readl(base + PCIE_CONF_DATA_OFF);
194
195 if (bus->number != orion_pcie_get_local_bus_nr(base) ||
196 PCI_FUNC(devfn) != 0)
197 *val = readl(base + PCIE_HEADER_LOG_4_OFF);
198
199 if (size == 1)
200 *val = (*val >> (8 * (where & 3))) & 0xff;
201 else if (size == 2)
202 *val = (*val >> (8 * (where & 3))) & 0xffff;
203
204 return PCIBIOS_SUCCESSFUL;
205}
206
207int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
208 u32 devfn, int where, int size, u32 *val)
209{
210 *val = readl(wa_base + (PCIE_CONF_BUS(bus->number) |
211 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
212 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
213 PCIE_CONF_REG(where)));
214
215 if (size == 1)
216 *val = (*val >> (8 * (where & 3))) & 0xff;
217 else if (size == 2)
218 *val = (*val >> (8 * (where & 3))) & 0xffff;
219
220 return PCIBIOS_SUCCESSFUL;
221}
222
223int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus,
224 u32 devfn, int where, int size, u32 val)
225{
226 int ret = PCIBIOS_SUCCESSFUL;
227
228 writel(PCIE_CONF_BUS(bus->number) |
229 PCIE_CONF_DEV(PCI_SLOT(devfn)) |
230 PCIE_CONF_FUNC(PCI_FUNC(devfn)) |
231 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN,
232 base + PCIE_CONF_ADDR_OFF);
233
234 if (size == 4) {
235 writel(val, base + PCIE_CONF_DATA_OFF);
236 } else if (size == 2) {
237 writew(val, base + PCIE_CONF_DATA_OFF + (where & 3));
238 } else if (size == 1) {
239 writeb(val, base + PCIE_CONF_DATA_OFF + (where & 3));
240 } else {
241 ret = PCIBIOS_BAD_REGISTER_NUMBER;
242 }
243
244 return ret;
245}
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
new file mode 100644
index 000000000000..28b5285446e8
--- /dev/null
+++ b/arch/arm/plat-orion/time.c
@@ -0,0 +1,203 @@
1/*
2 * arch/arm/plat-orion/time.c
3 *
4 * Marvell Orion SoC timer handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 *
10 * Timer 0 is used as free-running clocksource, while timer 1 is
11 * used as clock_event_device.
12 */
13
14#include <linux/kernel.h>
15#include <linux/clockchips.h>
16#include <linux/interrupt.h>
17#include <linux/irq.h>
18#include <asm/mach/time.h>
19#include <asm/arch/hardware.h>
20
21/*
22 * Number of timer ticks per jiffy.
23 */
24static u32 ticks_per_jiffy;
25
26
27/*
28 * Timer block registers.
29 */
30#define TIMER_CTRL (TIMER_VIRT_BASE + 0x0000)
31#define TIMER0_EN 0x0001
32#define TIMER0_RELOAD_EN 0x0002
33#define TIMER1_EN 0x0004
34#define TIMER1_RELOAD_EN 0x0008
35#define TIMER0_RELOAD (TIMER_VIRT_BASE + 0x0010)
36#define TIMER0_VAL (TIMER_VIRT_BASE + 0x0014)
37#define TIMER1_RELOAD (TIMER_VIRT_BASE + 0x0018)
38#define TIMER1_VAL (TIMER_VIRT_BASE + 0x001c)
39
40
41/*
42 * Clocksource handling.
43 */
44static cycle_t orion_clksrc_read(void)
45{
46 return 0xffffffff - readl(TIMER0_VAL);
47}
48
49static struct clocksource orion_clksrc = {
50 .name = "orion_clocksource",
51 .shift = 20,
52 .rating = 300,
53 .read = orion_clksrc_read,
54 .mask = CLOCKSOURCE_MASK(32),
55 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
56};
57
58
59
60/*
61 * Clockevent handling.
62 */
63static int
64orion_clkevt_next_event(unsigned long delta, struct clock_event_device *dev)
65{
66 unsigned long flags;
67 u32 u;
68
69 if (delta == 0)
70 return -ETIME;
71
72 local_irq_save(flags);
73
74 /*
75 * Clear and enable clockevent timer interrupt.
76 */
77 writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
78
79 u = readl(BRIDGE_MASK);
80 u |= BRIDGE_INT_TIMER1;
81 writel(u, BRIDGE_MASK);
82
83 /*
84 * Setup new clockevent timer value.
85 */
86 writel(delta, TIMER1_VAL);
87
88 /*
89 * Enable the timer.
90 */
91 u = readl(TIMER_CTRL);
92 u = (u & ~TIMER1_RELOAD_EN) | TIMER1_EN;
93 writel(u, TIMER_CTRL);
94
95 local_irq_restore(flags);
96
97 return 0;
98}
99
100static void
101orion_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev)
102{
103 unsigned long flags;
104 u32 u;
105
106 local_irq_save(flags);
107 if (mode == CLOCK_EVT_MODE_PERIODIC) {
108 /*
109 * Setup timer to fire at 1/HZ intervals.
110 */
111 writel(ticks_per_jiffy - 1, TIMER1_RELOAD);
112 writel(ticks_per_jiffy - 1, TIMER1_VAL);
113
114 /*
115 * Enable timer interrupt.
116 */
117 u = readl(BRIDGE_MASK);
118 writel(u | BRIDGE_INT_TIMER1, BRIDGE_MASK);
119
120 /*
121 * Enable timer.
122 */
123 u = readl(TIMER_CTRL);
124 writel(u | TIMER1_EN | TIMER1_RELOAD_EN, TIMER_CTRL);
125 } else {
126 /*
127 * Disable timer.
128 */
129 u = readl(TIMER_CTRL);
130 writel(u & ~TIMER1_EN, TIMER_CTRL);
131
132 /*
133 * Disable timer interrupt.
134 */
135 u = readl(BRIDGE_MASK);
136 writel(u & ~BRIDGE_INT_TIMER1, BRIDGE_MASK);
137
138 /*
139 * ACK pending timer interrupt.
140 */
141 writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
142
143 }
144 local_irq_restore(flags);
145}
146
147static struct clock_event_device orion_clkevt = {
148 .name = "orion_tick",
149 .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
150 .shift = 32,
151 .rating = 300,
152 .cpumask = CPU_MASK_CPU0,
153 .set_next_event = orion_clkevt_next_event,
154 .set_mode = orion_clkevt_mode,
155};
156
157static irqreturn_t orion_timer_interrupt(int irq, void *dev_id)
158{
159 /*
160 * ACK timer interrupt and call event handler.
161 */
162 writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
163 orion_clkevt.event_handler(&orion_clkevt);
164
165 return IRQ_HANDLED;
166}
167
168static struct irqaction orion_timer_irq = {
169 .name = "orion_tick",
170 .flags = IRQF_DISABLED | IRQF_TIMER,
171 .handler = orion_timer_interrupt
172};
173
174void __init orion_time_init(unsigned int irq, unsigned int tclk)
175{
176 u32 u;
177
178 ticks_per_jiffy = (tclk + HZ/2) / HZ;
179
180
181 /*
182 * Setup free-running clocksource timer (interrupts
183 * disabled.)
184 */
185 writel(0xffffffff, TIMER0_VAL);
186 writel(0xffffffff, TIMER0_RELOAD);
187 u = readl(BRIDGE_MASK);
188 writel(u & ~BRIDGE_INT_TIMER0, BRIDGE_MASK);
189 u = readl(TIMER_CTRL);
190 writel(u | TIMER0_EN | TIMER0_RELOAD_EN, TIMER_CTRL);
191 orion_clksrc.mult = clocksource_hz2mult(tclk, orion_clksrc.shift);
192 clocksource_register(&orion_clksrc);
193
194
195 /*
196 * Setup clockevent timer (interrupt-driven.)
197 */
198 setup_irq(irq, &orion_timer_irq);
199 orion_clkevt.mult = div_sc(tclk, NSEC_PER_SEC, orion_clkevt.shift);
200 orion_clkevt.max_delta_ns = clockevent_delta2ns(0xfffffffe, &orion_clkevt);
201 orion_clkevt.min_delta_ns = clockevent_delta2ns(1, &orion_clkevt);
202 clockevents_register_device(&orion_clkevt);
203}
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c
index 99a44746f8f2..d84167fb33b1 100644
--- a/arch/arm/plat-s3c24xx/clock.c
+++ b/arch/arm/plat-s3c24xx/clock.c
@@ -332,6 +332,58 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent)
332 return 0; 332 return 0;
333} 333}
334 334
335static unsigned long s3c24xx_calc_div(struct clk *clk, unsigned long rate)
336{
337 unsigned long div;
338
339 if ((rate == 0) || !clk->parent)
340 return 0;
341
342 div = clk_get_rate(clk->parent) / rate;
343 if (div < 2)
344 div = 2;
345 else if (div > 16)
346 div = 16;
347
348 return div;
349}
350
351static unsigned long s3c24xx_round_dclk_rate(struct clk *clk,
352 unsigned long rate)
353{
354 unsigned long div = s3c24xx_calc_div(clk, rate);
355
356 if (div == 0)
357 return 0;
358
359 return clk_get_rate(clk->parent) / div;
360}
361
362static int s3c24xx_set_dclk_rate(struct clk *clk, unsigned long rate)
363{
364 unsigned long mask, data, div = s3c24xx_calc_div(clk, rate);
365
366 if (div == 0)
367 return -EINVAL;
368
369 if (clk == &s3c24xx_dclk0) {
370 mask = S3C2410_DCLKCON_DCLK0_DIV_MASK |
371 S3C2410_DCLKCON_DCLK0_CMP_MASK;
372 data = S3C2410_DCLKCON_DCLK0_DIV(div) |
373 S3C2410_DCLKCON_DCLK0_CMP((div + 1) / 2);
374 } else if (clk == &s3c24xx_dclk1) {
375 mask = S3C2410_DCLKCON_DCLK1_DIV_MASK |
376 S3C2410_DCLKCON_DCLK1_CMP_MASK;
377 data = S3C2410_DCLKCON_DCLK1_DIV(div) |
378 S3C2410_DCLKCON_DCLK1_CMP((div + 1) / 2);
379 } else
380 return -EINVAL;
381
382 clk->rate = clk_get_rate(clk->parent) / div;
383 __raw_writel(((__raw_readl(S3C24XX_DCLKCON) & ~mask) | data),
384 S3C24XX_DCLKCON);
385 return clk->rate;
386}
335 387
336static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) 388static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
337{ 389{
@@ -378,6 +430,8 @@ struct clk s3c24xx_dclk0 = {
378 .ctrlbit = S3C2410_DCLKCON_DCLK0EN, 430 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
379 .enable = s3c24xx_dclk_enable, 431 .enable = s3c24xx_dclk_enable,
380 .set_parent = s3c24xx_dclk_setparent, 432 .set_parent = s3c24xx_dclk_setparent,
433 .set_rate = s3c24xx_set_dclk_rate,
434 .round_rate = s3c24xx_round_dclk_rate,
381}; 435};
382 436
383struct clk s3c24xx_dclk1 = { 437struct clk s3c24xx_dclk1 = {
@@ -386,6 +440,8 @@ struct clk s3c24xx_dclk1 = {
386 .ctrlbit = S3C2410_DCLKCON_DCLK0EN, 440 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
387 .enable = s3c24xx_dclk_enable, 441 .enable = s3c24xx_dclk_enable,
388 .set_parent = s3c24xx_dclk_setparent, 442 .set_parent = s3c24xx_dclk_setparent,
443 .set_rate = s3c24xx_set_dclk_rate,
444 .round_rate = s3c24xx_round_dclk_rate,
389}; 445};
390 446
391struct clk s3c24xx_clkout0 = { 447struct clk s3c24xx_clkout0 = {
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index f513ab083b8f..f5699cadb0c3 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -28,15 +28,19 @@
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31#include <linux/delay.h>
31 32
32#include <asm/hardware.h> 33#include <asm/hardware.h>
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/delay.h> 36#include <asm/delay.h>
37#include <asm/cacheflush.h>
36 38
37#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 40#include <asm/mach/map.h>
39 41
42#include <asm/arch/system-reset.h>
43
40#include <asm/arch/regs-gpio.h> 44#include <asm/arch/regs-gpio.h>
41#include <asm/plat-s3c/regs-serial.h> 45#include <asm/plat-s3c/regs-serial.h>
42 46
@@ -203,6 +207,27 @@ static unsigned long s3c24xx_read_idcode_v4(void)
203#endif 207#endif
204} 208}
205 209
210/* Hook for arm_pm_restart to ensure we execute the reset code
211 * with the caches enabled. It seems at least the S3C2440 has a problem
212 * resetting if there is bus activity interrupted by the reset.
213 */
214static void s3c24xx_pm_restart(char mode)
215{
216 if (mode != 's') {
217 unsigned long flags;
218
219 local_irq_save(flags);
220 __cpuc_flush_kern_all();
221 __cpuc_flush_user_all();
222
223 arch_reset(mode);
224 local_irq_restore(flags);
225 }
226
227 /* fallback, or unhandled */
228 arm_machine_restart(mode);
229}
230
206void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) 231void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
207{ 232{
208 unsigned long idcode = 0x0; 233 unsigned long idcode = 0x0;
@@ -230,6 +255,8 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
230 panic("Unsupported S3C24XX CPU"); 255 panic("Unsupported S3C24XX CPU");
231 } 256 }
232 257
258 arm_pm_restart = s3c24xx_pm_restart;
259
233 (cpu->map_io)(mach_desc, size); 260 (cpu->map_io)(mach_desc, size);
234} 261}
235 262
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 7ed58c0c24c2..207a8b5a0c4a 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: Sat Jan 26 14:45:34 2008 15# Last update: Sat Apr 19 11:23:38 2008
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -381,13 +381,13 @@ ks8695p ARCH_KS8695P KS8695P 363
381se4000 ARCH_SE4000 SE4000 364 381se4000 ARCH_SE4000 SE4000 364
382quadriceps ARCH_QUADRICEPS QUADRICEPS 365 382quadriceps ARCH_QUADRICEPS QUADRICEPS 365
383bronco ARCH_BRONCO BRONCO 366 383bronco ARCH_BRONCO BRONCO 366
384esl_wireless_tab ARCH_ESL_WIRELESS_TABLETESL_WIRELESS_TABLET 367 384esl_wireless_tab ARCH_ESL_WIRELESS_TAB ESL_WIRELESS_TAB 367
385esl_sofcomp ARCH_ESL_SOFCOMP ESL_SOFCOMP 368 385esl_sofcomp ARCH_ESL_SOFCOMP ESL_SOFCOMP 368
386s5c7375 ARCH_S5C7375 S5C7375 369 386s5c7375 ARCH_S5C7375 S5C7375 369
387spearhead ARCH_SPEARHEAD SPEARHEAD 370 387spearhead ARCH_SPEARHEAD SPEARHEAD 370
388pantera ARCH_PANTERA PANTERA 371 388pantera ARCH_PANTERA PANTERA 371
389prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372 389prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372
390gumstix ARCH_GUMSTIK GUMSTIK 373 390gumstix ARCH_GUMSTIX GUMSTIX 373
391rcube ARCH_RCUBE RCUBE 374 391rcube ARCH_RCUBE RCUBE 374
392rea_olv ARCH_REA_OLV REA_OLV 375 392rea_olv ARCH_REA_OLV REA_OLV 375
393pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376 393pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376
@@ -1463,7 +1463,7 @@ artemis MACH_ARTEMIS ARTEMIS 1462
1463htctitan MACH_HTCTITAN HTCTITAN 1463 1463htctitan MACH_HTCTITAN HTCTITAN 1463
1464qranium MACH_QRANIUM QRANIUM 1464 1464qranium MACH_QRANIUM QRANIUM 1464
1465adx_wsc2 MACH_ADX_WSC2 ADX_WSC2 1465 1465adx_wsc2 MACH_ADX_WSC2 ADX_WSC2 1465
1466adx_medinet MACH_ADX_MEDINET ADX_MEDINET 1466 1466adx_medcom MACH_ADX_MEDINET ADX_MEDINET 1466
1467bboard MACH_BBOARD BBOARD 1467 1467bboard MACH_BBOARD BBOARD 1467
1468cambria MACH_CAMBRIA CAMBRIA 1468 1468cambria MACH_CAMBRIA CAMBRIA 1468
1469mt7xxx MACH_MT7XXX MT7XXX 1469 1469mt7xxx MACH_MT7XXX MT7XXX 1469
@@ -1611,3 +1611,112 @@ kb9263 MACH_KB9263 KB9263 1612
1611mt7108 MACH_MT7108 MT7108 1613 1611mt7108 MACH_MT7108 MT7108 1613
1612smtr2440 MACH_SMTR2440 SMTR2440 1614 1612smtr2440 MACH_SMTR2440 SMTR2440 1614
1613manao MACH_MANAO MANAO 1615 1613manao MACH_MANAO MANAO 1615
1614cm_x300 MACH_CM_X300 CM_X300 1616
1615gulfstream_kp MACH_GULFSTREAM_KP GULFSTREAM_KP 1617
1616lanreadyfn522 MACH_LANREADYFN522 LANREADYFN522 1618
1617arma37 MACH_ARMA37 ARMA37 1619
1618mendel MACH_MENDEL MENDEL 1620
1619pelco_iliad MACH_PELCO_ILIAD PELCO_ILIAD 1621
1620unit2p MACH_UNIT2P UNIT2P 1622
1621inc20otter MACH_INC20OTTER INC20OTTER 1623
1622at91sam9g20ek MACH_AT91SAM9G20EK AT91SAM9G20EK 1624
1623sc_ge2 MACH_STORCENTER STORCENTER 1625
1624smdk6410 MACH_SMDK6410 SMDK6410 1626
1625u300 MACH_U300 U300 1627
1626u500 MACH_U500 U500 1628
1627ds9260 MACH_DS9260 DS9260 1629
1628riverrock MACH_RIVERROCK RIVERROCK 1630
1629scibath MACH_SCIBATH SCIBATH 1631
1630at91sam7se MACH_AT91SAM7SE512EK AT91SAM7SE512EK 1632
1631wrt350n_v2 MACH_WRT350N_V2 WRT350N_V2 1633
1632multimedia MACH_MULTIMEDIA MULTIMEDIA 1634
1633marvin MACH_MARVIN MARVIN 1635
1634x500 MACH_X500 X500 1636
1635awlug4lcu MACH_AWLUG4LCU AWLUG4LCU 1637
1636palermoc MACH_PALERMOC PALERMOC 1638
1637omap_ldp MACH_OMAP_LDP OMAP_LDP 1639
1638ip500 MACH_IP500 IP500 1640
1639mx35ads MACH_MACH_MX35ADS MACH_MX35ADS 1641
1640ase2 MACH_ASE2 ASE2 1642
1641mx35evb MACH_MX35EVB MX35EVB 1643
1642aml_m8050 MACH_AML_M8050 AML_M8050 1644
1643mx35_3ds MACH_MX35_3DS MX35_3DS 1645
1644mars MACH_MARS MARS 1646
1645ntosd_644xa MACH_NTOSD_644XA NTOSD_644XA 1647
1646badger MACH_BADGER BADGER 1648
1647trizeps4wl MACH_TRIZEPS4WL TRIZEPS4WL 1649
1648trizeps5 MACH_TRIZEPS5 TRIZEPS5 1650
1649marlin MACH_MARLIN MARLIN 1651
1650ts7800 MACH_TS7800 TS7800 1652
1651hpipaq214 MACH_HPIPAQ214 HPIPAQ214 1653
1652at572d940dcm MACH_AT572D940DCM AT572D940DCM 1654
1653ne1board MACH_NE1BOARD NE1BOARD 1655
1654zante MACH_ZANTE ZANTE 1656
1655sffsdr MACH_SFFSDR SFFSDR 1657
1656tw2662 MACH_TW2662 TW2662 1658
1657vf10xx MACH_VF10XX VF10XX 1659
1658zoran43xx MACH_ZORAN43XX ZORAN43XX 1660
1659sonix926 MACH_SONIX926 SONIX926 1661
1660celestialsemi MACH_CELESTIALSEMI CELESTIALSEMI 1662
1661cc9m2443 MACH_CC9M2443 CC9M2443 1663
1662tw5334 MACH_TW5334 TW5334 1664
1663omap_htcartemis MACH_HTCARTEMIS HTCARTEMIS 1665
1664nal_hlite MACH_NAL_HLITE NAL_HLITE 1666
1665htcvogue MACH_HTCVOGUE HTCVOGUE 1667
1666smartweb MACH_SMARTWEB SMARTWEB 1668
1667mv86xx MACH_MV86XX MV86XX 1669
1668mv87xx MACH_MV87XX MV87XX 1670
1669songyoungho MACH_SONGYOUNGHO SONGYOUNGHO 1671
1670younghotema MACH_YOUNGHOTEMA YOUNGHOTEMA 1672
1671pcm037 MACH_PCM037 PCM037 1673
1672mmvp MACH_MMVP MMVP 1674
1673mmap MACH_MMAP MMAP 1675
1674ptid2410 MACH_PTID2410 PTID2410 1676
1675james_926 MACH_JAMES_926 JAMES_926 1677
1676fm6000 MACH_FM6000 FM6000 1678
1677db88f6281_bp MACH_DB88F6281_BP DB88F6281_BP 1680
1678rd88f6192_nas MACH_RD88F6192_NAS RD88F6192_NAS 1681
1679rd88f6281 MACH_RD88F6281 RD88F6281 1682
1680db78x00_bp MACH_DB78X00_BP DB78X00_BP 1683
1681smdk2416 MACH_SMDK2416 SMDK2416 1685
1682oce_spider_si MACH_OCE_SPIDER_SI OCE_SPIDER_SI 1686
1683oce_spider_sk MACH_OCE_SPIDER_SK OCE_SPIDER_SK 1687
1684rovern6 MACH_ROVERN6 ROVERN6 1688
1685pelco_evolution MACH_PELCO_EVOLUTION PELCO_EVOLUTION 1689
1686wbd111 MACH_WBD111 WBD111 1690
1687elaracpe MACH_ELARACPE ELARACPE 1691
1688mabv3 MACH_MABV3 MABV3 1692
1689mv2120 MACH_MV2120 MV2120 1693
1690csb737 MACH_CSB737 CSB737 1695
1691mx51_3ds MACH_MX51_3DS MX51_3DS 1696
1692g900 MACH_G900 G900 1697
1693apf27 MACH_APF27 APF27 1698
1694ggus2000 MACH_GGUS2000 GGUS2000 1699
1695omap_2430_mimic MACH_OMAP_2430_MIMIC OMAP_2430_MIMIC 1700
1696imx27lite MACH_IMX27LITE IMX27LITE 1701
1697almex MACH_ALMEX ALMEX 1702
1698control MACH_CONTROL CONTROL 1703
1699mba2410 MACH_MBA2410 MBA2410 1704
1700volcano MACH_VOLCANO VOLCANO 1705
1701zenith MACH_ZENITH ZENITH 1706
1702muchip MACH_MUCHIP MUCHIP 1707
1703magellan MACH_MAGELLAN MAGELLAN 1708
1704usb_a9260 MACH_USB_A9260 USB_A9260 1709
1705usb_a9263 MACH_USB_A9263 USB_A9263 1710
1706qil_a9260 MACH_QIL_A9260 QIL_A9260 1711
1707cme9210 MACH_CME9210 CME9210 1712
1708hczh4 MACH_HCZH4 HCZH4 1713
1709spearbasic MACH_SPEARBASIC SPEARBASIC 1714
1710dep2440 MACH_DEP2440 DEP2440 1715
1711hdl_gxr MACH_HDL_GXR HDL_GXR 1716
1712hdl_gt MACH_HDL_GT HDL_GT 1717
1713hdl_4g MACH_HDL_4G HDL_4G 1718
1714s3c6000 MACH_S3C6000 S3C6000 1719
1715mmsp2_mdk MACH_MMSP2_MDK MMSP2_MDK 1720
1716mpx220 MACH_MPX220 MPX220 1721
1717kzm_arm11_01 MACH_KZM_ARM11_01 KZM_ARM11_01 1722
1718htc_polaris MACH_HTC_POLARIS HTC_POLARIS 1723
1719htc_kaiser MACH_HTC_KAISER HTC_KAISER 1724
1720lg_ks20 MACH_LG_KS20 LG_KS20 1725
1721hhgps MACH_HHGPS HHGPS 1726
1722nokia_n810_wimax MACH_NOKIA_N810_WIMAX NOKIA_N810_WIMAX 1727
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 28e0caf4156c..09ad7995080c 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -47,6 +47,9 @@ config RWSEM_GENERIC_SPINLOCK
47config GENERIC_TIME 47config GENERIC_TIME
48 def_bool y 48 def_bool y
49 49
50config GENERIC_CLOCKEVENTS
51 def_bool y
52
50config RWSEM_XCHGADD_ALGORITHM 53config RWSEM_XCHGADD_ALGORITHM
51 def_bool n 54 def_bool n
52 55
@@ -70,6 +73,8 @@ source "init/Kconfig"
70 73
71menu "System Type and features" 74menu "System Type and features"
72 75
76source "kernel/time/Kconfig"
77
73config SUBARCH_AVR32B 78config SUBARCH_AVR32B
74 bool 79 bool
75config MMU 80config MMU
diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S
index 8cf16d7a7040..5f31702d6b1c 100644
--- a/arch/avr32/kernel/entry-avr32b.S
+++ b/arch/avr32/kernel/entry-avr32b.S
@@ -741,26 +741,6 @@ irq_level\level:
741 741
742 .section .irq.text,"ax",@progbits 742 .section .irq.text,"ax",@progbits
743 743
744.global cpu_idle_sleep
745cpu_idle_sleep:
746 mask_interrupts
747 get_thread_info r8
748 ld.w r9, r8[TI_flags]
749 bld r9, TIF_NEED_RESCHED
750 brcs cpu_idle_enable_int_and_exit
751 sbr r9, TIF_CPU_GOING_TO_SLEEP
752 st.w r8[TI_flags], r9
753 unmask_interrupts
754 sleep 0
755cpu_idle_skip_sleep:
756 mask_interrupts
757 ld.w r9, r8[TI_flags]
758 cbr r9, TIF_CPU_GOING_TO_SLEEP
759 st.w r8[TI_flags], r9
760cpu_idle_enable_int_and_exit:
761 unmask_interrupts
762 retal r12
763
764 .global irq_level0 744 .global irq_level0
765 .global irq_level1 745 .global irq_level1
766 .global irq_level2 746 .global irq_level2
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 7f4af0b1e111..6cf9df176274 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -18,11 +18,11 @@
18#include <asm/sysreg.h> 18#include <asm/sysreg.h>
19#include <asm/ocd.h> 19#include <asm/ocd.h>
20 20
21#include <asm/arch/pm.h>
22
21void (*pm_power_off)(void) = NULL; 23void (*pm_power_off)(void) = NULL;
22EXPORT_SYMBOL(pm_power_off); 24EXPORT_SYMBOL(pm_power_off);
23 25
24extern void cpu_idle_sleep(void);
25
26/* 26/*
27 * This file handles the architecture-dependent parts of process handling.. 27 * This file handles the architecture-dependent parts of process handling..
28 */ 28 */
@@ -54,6 +54,8 @@ void machine_halt(void)
54 54
55void machine_power_off(void) 55void machine_power_off(void)
56{ 56{
57 if (pm_power_off)
58 pm_power_off();
57} 59}
58 60
59void machine_restart(char *cmd) 61void machine_restart(char *cmd)
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 36a46c3ae308..00a9862380ff 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -1,16 +1,12 @@
1/* 1/*
2 * Copyright (C) 2004-2007 Atmel Corporation 2 * Copyright (C) 2004-2007 Atmel Corporation
3 * 3 *
4 * Based on MIPS implementation arch/mips/kernel/time.c
5 * Copyright 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify 4 * 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 5 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
10 */ 7 */
11
12#include <linux/clk.h> 8#include <linux/clk.h>
13#include <linux/clocksource.h> 9#include <linux/clockchips.h>
14#include <linux/time.h> 10#include <linux/time.h>
15#include <linux/module.h> 11#include <linux/module.h>
16#include <linux/interrupt.h> 12#include <linux/interrupt.h>
@@ -27,207 +23,133 @@
27#include <asm/io.h> 23#include <asm/io.h>
28#include <asm/sections.h> 24#include <asm/sections.h>
29 25
30/* how many counter cycles in a jiffy? */ 26#include <asm/arch/pm.h>
31static u32 cycles_per_jiffy;
32 27
33/* the count value for the next timer interrupt */
34static u32 expirelo;
35 28
36cycle_t __weak read_cycle_count(void) 29static cycle_t read_cycle_count(void)
37{ 30{
38 return (cycle_t)sysreg_read(COUNT); 31 return (cycle_t)sysreg_read(COUNT);
39} 32}
40 33
41struct clocksource __weak clocksource_avr32 = { 34/*
42 .name = "avr32", 35 * The architectural cycle count registers are a fine clocksource unless
43 .rating = 350, 36 * the system idle loop use sleep states like "idle": the CPU cycles
37 * measured by COUNT (and COMPARE) don't happen during sleep states.
38 * Their duration also changes if cpufreq changes the CPU clock rate.
39 * So we rate the clocksource using COUNT as very low quality.
40 */
41static struct clocksource counter = {
42 .name = "avr32_counter",
43 .rating = 50,
44 .read = read_cycle_count, 44 .read = read_cycle_count,
45 .mask = CLOCKSOURCE_MASK(32), 45 .mask = CLOCKSOURCE_MASK(32),
46 .shift = 16, 46 .shift = 16,
47 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 47 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
48}; 48};
49 49
50irqreturn_t __weak timer_interrupt(int irq, void *dev_id); 50static irqreturn_t timer_interrupt(int irq, void *dev_id)
51
52struct irqaction timer_irqaction = {
53 .handler = timer_interrupt,
54 .flags = IRQF_DISABLED,
55 .name = "timer",
56};
57
58/*
59 * By default we provide the null RTC ops
60 */
61static unsigned long null_rtc_get_time(void)
62{ 51{
63 return mktime(2007, 1, 1, 0, 0, 0); 52 struct clock_event_device *evdev = dev_id;
64}
65
66static int null_rtc_set_time(unsigned long sec)
67{
68 return 0;
69}
70 53
71static unsigned long (*rtc_get_time)(void) = null_rtc_get_time; 54 /*
72static int (*rtc_set_time)(unsigned long) = null_rtc_set_time; 55 * Disable the interrupt until the clockevent subsystem
73 56 * reprograms it.
74static void avr32_timer_ack(void) 57 */
75{ 58 sysreg_write(COMPARE, 0);
76 u32 count;
77
78 /* Ack this timer interrupt and set the next one */
79 expirelo += cycles_per_jiffy;
80 /* setting COMPARE to 0 stops the COUNT-COMPARE */
81 if (expirelo == 0) {
82 sysreg_write(COMPARE, expirelo + 1);
83 } else {
84 sysreg_write(COMPARE, expirelo);
85 }
86 59
87 /* Check to see if we have missed any timer interrupts */ 60 evdev->event_handler(evdev);
88 count = sysreg_read(COUNT); 61 return IRQ_HANDLED;
89 if ((count - expirelo) < 0x7fffffff) {
90 expirelo = count + cycles_per_jiffy;
91 sysreg_write(COMPARE, expirelo);
92 }
93} 62}
94 63
95int __weak avr32_hpt_init(void) 64static struct irqaction timer_irqaction = {
96{ 65 .handler = timer_interrupt,
97 int ret; 66 .flags = IRQF_TIMER | IRQF_DISABLED,
98 unsigned long mult, shift, count_hz; 67 .name = "avr32_comparator",
99 68};
100 count_hz = clk_get_rate(boot_cpu_data.clk);
101 shift = clocksource_avr32.shift;
102 mult = clocksource_hz2mult(count_hz, shift);
103 clocksource_avr32.mult = mult;
104
105 {
106 u64 tmp;
107
108 tmp = TICK_NSEC;
109 tmp <<= shift;
110 tmp += mult / 2;
111 do_div(tmp, mult);
112
113 cycles_per_jiffy = tmp;
114 }
115 69
116 ret = setup_irq(0, &timer_irqaction); 70static int comparator_next_event(unsigned long delta,
117 if (ret) { 71 struct clock_event_device *evdev)
118 pr_debug("timer: could not request IRQ 0: %d\n", ret); 72{
119 return -ENODEV; 73 unsigned long flags;
120 }
121 74
122 printk(KERN_INFO "timer: AT32AP COUNT-COMPARE at irq 0, " 75 raw_local_irq_save(flags);
123 "%lu.%03lu MHz\n",
124 ((count_hz + 500) / 1000) / 1000,
125 ((count_hz + 500) / 1000) % 1000);
126 76
127 return 0; 77 /* The time to read COUNT then update COMPARE must be less
128} 78 * than the min_delta_ns value for this clockevent source.
79 */
80 sysreg_write(COMPARE, (sysreg_read(COUNT) + delta) ? : 1);
129 81
130/* 82 raw_local_irq_restore(flags);
131 * Taken from MIPS c0_hpt_timer_init().
132 *
133 * The reason COUNT is written twice is probably to make sure we don't get any
134 * timer interrupts while we are messing with the counter.
135 */
136int __weak avr32_hpt_start(void)
137{
138 u32 count = sysreg_read(COUNT);
139 expirelo = (count / cycles_per_jiffy + 1) * cycles_per_jiffy;
140 sysreg_write(COUNT, expirelo - cycles_per_jiffy);
141 sysreg_write(COMPARE, expirelo);
142 sysreg_write(COUNT, count);
143 83
144 return 0; 84 return 0;
145} 85}
146 86
147/* 87static void comparator_mode(enum clock_event_mode mode,
148 * local_timer_interrupt() does profiling and process accounting on a 88 struct clock_event_device *evdev)
149 * per-CPU basis.
150 *
151 * In UP mode, it is invoked from the (global) timer_interrupt.
152 */
153void local_timer_interrupt(int irq, void *dev_id)
154{ 89{
155 if (current->pid) 90 switch (mode) {
156 profile_tick(CPU_PROFILING); 91 case CLOCK_EVT_MODE_ONESHOT:
157 update_process_times(user_mode(get_irq_regs())); 92 pr_debug("%s: start\n", evdev->name);
93 /* FALLTHROUGH */
94 case CLOCK_EVT_MODE_RESUME:
95 cpu_disable_idle_sleep();
96 break;
97 case CLOCK_EVT_MODE_UNUSED:
98 case CLOCK_EVT_MODE_SHUTDOWN:
99 sysreg_write(COMPARE, 0);
100 pr_debug("%s: stop\n", evdev->name);
101 cpu_enable_idle_sleep();
102 break;
103 default:
104 BUG();
105 }
158} 106}
159 107
160irqreturn_t __weak timer_interrupt(int irq, void *dev_id) 108static struct clock_event_device comparator = {
161{ 109 .name = "avr32_comparator",
162 /* ack timer interrupt and try to set next interrupt */ 110 .features = CLOCK_EVT_FEAT_ONESHOT,
163 avr32_timer_ack(); 111 .shift = 16,
164 112 .rating = 50,
165 /* 113 .cpumask = CPU_MASK_CPU0,
166 * Call the generic timer interrupt handler 114 .set_next_event = comparator_next_event,
167 */ 115 .set_mode = comparator_mode,
168 write_seqlock(&xtime_lock); 116};
169 do_timer(1);
170 write_sequnlock(&xtime_lock);
171
172 /*
173 * In UP mode, we call local_timer_interrupt() to do profiling
174 * and process accounting.
175 *
176 * SMP is not supported yet.
177 */
178 local_timer_interrupt(irq, dev_id);
179
180 return IRQ_HANDLED;
181}
182 117
183void __init time_init(void) 118void __init time_init(void)
184{ 119{
120 unsigned long counter_hz;
185 int ret; 121 int ret;
186 122
187 /* 123 xtime.tv_sec = mktime(2007, 1, 1, 0, 0, 0);
188 * Make sure we don't get any COMPARE interrupts before we can
189 * handle them.
190 */
191 sysreg_write(COMPARE, 0);
192
193 xtime.tv_sec = rtc_get_time();
194 xtime.tv_nsec = 0; 124 xtime.tv_nsec = 0;
195 125
196 set_normalized_timespec(&wall_to_monotonic, 126 set_normalized_timespec(&wall_to_monotonic,
197 -xtime.tv_sec, -xtime.tv_nsec); 127 -xtime.tv_sec, -xtime.tv_nsec);
198 128
199 ret = avr32_hpt_init(); 129 /* figure rate for counter */
200 if (ret) { 130 counter_hz = clk_get_rate(boot_cpu_data.clk);
201 pr_debug("timer: failed setup: %d\n", ret); 131 counter.mult = clocksource_hz2mult(counter_hz, counter.shift);
202 return;
203 }
204 132
205 ret = clocksource_register(&clocksource_avr32); 133 ret = clocksource_register(&counter);
206 if (ret) 134 if (ret)
207 pr_debug("timer: could not register clocksource: %d\n", ret); 135 pr_debug("timer: could not register clocksource: %d\n", ret);
208 136
209 ret = avr32_hpt_start(); 137 /* setup COMPARE clockevent */
210 if (ret) { 138 comparator.mult = div_sc(counter_hz, NSEC_PER_SEC, comparator.shift);
211 pr_debug("timer: failed starting: %d\n", ret); 139 comparator.max_delta_ns = clockevent_delta2ns((u32)~0, &comparator);
212 return; 140 comparator.min_delta_ns = clockevent_delta2ns(50, &comparator) + 1;
213 }
214}
215 141
216static struct sysdev_class timer_class = { 142 sysreg_write(COMPARE, 0);
217 .name = "timer", 143 timer_irqaction.dev_id = &comparator;
218};
219 144
220static struct sys_device timer_device = { 145 ret = setup_irq(0, &timer_irqaction);
221 .id = 0, 146 if (ret)
222 .cls = &timer_class, 147 pr_debug("timer: could not request IRQ 0: %d\n", ret);
223}; 148 else {
149 clockevents_register_device(&comparator);
224 150
225static int __init init_timer_sysfs(void) 151 pr_info("%s: irq 0, %lu.%03lu MHz\n", comparator.name,
226{ 152 ((counter_hz + 500) / 1000) / 1000,
227 int err = sysdev_class_register(&timer_class); 153 ((counter_hz + 500) / 1000) % 1000);
228 if (!err) 154 }
229 err = sysdev_register(&timer_device);
230 return err;
231} 155}
232
233device_initcall(init_timer_sysfs);
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile
index 5e9f8217befc..e89009439e4a 100644
--- a/arch/avr32/mach-at32ap/Makefile
+++ b/arch/avr32/mach-at32ap/Makefile
@@ -1,4 +1,3 @@
1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o 1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o
2obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o 2obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o pm-at32ap700x.o
3obj-$(CONFIG_CPU_AT32AP700X) += time-tc.o
4obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o 3obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 7678fee9a885..0f24b4f85c17 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -6,11 +6,13 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8#include <linux/clk.h> 8#include <linux/clk.h>
9#include <linux/delay.h>
9#include <linux/fb.h> 10#include <linux/fb.h>
10#include <linux/init.h> 11#include <linux/init.h>
11#include <linux/platform_device.h> 12#include <linux/platform_device.h>
12#include <linux/dma-mapping.h> 13#include <linux/dma-mapping.h>
13#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/usb/atmel_usba_udc.h>
14 16
15#include <asm/io.h> 17#include <asm/io.h>
16#include <asm/irq.h> 18#include <asm/irq.h>
@@ -98,6 +100,9 @@ unsigned long at32ap7000_osc_rates[3] = {
98 [2] = 12000000, 100 [2] = 12000000,
99}; 101};
100 102
103static struct clk osc0;
104static struct clk osc1;
105
101static unsigned long osc_get_rate(struct clk *clk) 106static unsigned long osc_get_rate(struct clk *clk)
102{ 107{
103 return at32ap7000_osc_rates[clk->index]; 108 return at32ap7000_osc_rates[clk->index];
@@ -107,9 +112,6 @@ static unsigned long pll_get_rate(struct clk *clk, unsigned long control)
107{ 112{
108 unsigned long div, mul, rate; 113 unsigned long div, mul, rate;
109 114
110 if (!(control & PM_BIT(PLLEN)))
111 return 0;
112
113 div = PM_BFEXT(PLLDIV, control) + 1; 115 div = PM_BFEXT(PLLDIV, control) + 1;
114 mul = PM_BFEXT(PLLMUL, control) + 1; 116 mul = PM_BFEXT(PLLMUL, control) + 1;
115 117
@@ -120,6 +122,71 @@ static unsigned long pll_get_rate(struct clk *clk, unsigned long control)
120 return rate; 122 return rate;
121} 123}
122 124
125static long pll_set_rate(struct clk *clk, unsigned long rate,
126 u32 *pll_ctrl)
127{
128 unsigned long mul;
129 unsigned long mul_best_fit = 0;
130 unsigned long div;
131 unsigned long div_min;
132 unsigned long div_max;
133 unsigned long div_best_fit = 0;
134 unsigned long base;
135 unsigned long pll_in;
136 unsigned long actual = 0;
137 unsigned long rate_error;
138 unsigned long rate_error_prev = ~0UL;
139 u32 ctrl;
140
141 /* Rate must be between 80 MHz and 200 Mhz. */
142 if (rate < 80000000UL || rate > 200000000UL)
143 return -EINVAL;
144
145 ctrl = PM_BF(PLLOPT, 4);
146 base = clk->parent->get_rate(clk->parent);
147
148 /* PLL input frequency must be between 6 MHz and 32 MHz. */
149 div_min = DIV_ROUND_UP(base, 32000000UL);
150 div_max = base / 6000000UL;
151
152 if (div_max < div_min)
153 return -EINVAL;
154
155 for (div = div_min; div <= div_max; div++) {
156 pll_in = (base + div / 2) / div;
157 mul = (rate + pll_in / 2) / pll_in;
158
159 if (mul == 0)
160 continue;
161
162 actual = pll_in * mul;
163 rate_error = abs(actual - rate);
164
165 if (rate_error < rate_error_prev) {
166 mul_best_fit = mul;
167 div_best_fit = div;
168 rate_error_prev = rate_error;
169 }
170
171 if (rate_error == 0)
172 break;
173 }
174
175 if (div_best_fit == 0)
176 return -EINVAL;
177
178 ctrl |= PM_BF(PLLMUL, mul_best_fit - 1);
179 ctrl |= PM_BF(PLLDIV, div_best_fit - 1);
180 ctrl |= PM_BF(PLLCOUNT, 16);
181
182 if (clk->parent == &osc1)
183 ctrl |= PM_BIT(PLLOSC);
184
185 *pll_ctrl = ctrl;
186
187 return actual;
188}
189
123static unsigned long pll0_get_rate(struct clk *clk) 190static unsigned long pll0_get_rate(struct clk *clk)
124{ 191{
125 u32 control; 192 u32 control;
@@ -129,6 +196,41 @@ static unsigned long pll0_get_rate(struct clk *clk)
129 return pll_get_rate(clk, control); 196 return pll_get_rate(clk, control);
130} 197}
131 198
199static void pll1_mode(struct clk *clk, int enabled)
200{
201 unsigned long timeout;
202 u32 status;
203 u32 ctrl;
204
205 ctrl = pm_readl(PLL1);
206
207 if (enabled) {
208 if (!PM_BFEXT(PLLMUL, ctrl) && !PM_BFEXT(PLLDIV, ctrl)) {
209 pr_debug("clk %s: failed to enable, rate not set\n",
210 clk->name);
211 return;
212 }
213
214 ctrl |= PM_BIT(PLLEN);
215 pm_writel(PLL1, ctrl);
216
217 /* Wait for PLL lock. */
218 for (timeout = 10000; timeout; timeout--) {
219 status = pm_readl(ISR);
220 if (status & PM_BIT(LOCK1))
221 break;
222 udelay(10);
223 }
224
225 if (!(status & PM_BIT(LOCK1)))
226 printk(KERN_ERR "clk %s: timeout waiting for lock\n",
227 clk->name);
228 } else {
229 ctrl &= ~PM_BIT(PLLEN);
230 pm_writel(PLL1, ctrl);
231 }
232}
233
132static unsigned long pll1_get_rate(struct clk *clk) 234static unsigned long pll1_get_rate(struct clk *clk)
133{ 235{
134 u32 control; 236 u32 control;
@@ -138,6 +240,49 @@ static unsigned long pll1_get_rate(struct clk *clk)
138 return pll_get_rate(clk, control); 240 return pll_get_rate(clk, control);
139} 241}
140 242
243static long pll1_set_rate(struct clk *clk, unsigned long rate, int apply)
244{
245 u32 ctrl = 0;
246 unsigned long actual_rate;
247
248 actual_rate = pll_set_rate(clk, rate, &ctrl);
249
250 if (apply) {
251 if (actual_rate != rate)
252 return -EINVAL;
253 if (clk->users > 0)
254 return -EBUSY;
255 pr_debug(KERN_INFO "clk %s: new rate %lu (actual rate %lu)\n",
256 clk->name, rate, actual_rate);
257 pm_writel(PLL1, ctrl);
258 }
259
260 return actual_rate;
261}
262
263static int pll1_set_parent(struct clk *clk, struct clk *parent)
264{
265 u32 ctrl;
266
267 if (clk->users > 0)
268 return -EBUSY;
269
270 ctrl = pm_readl(PLL1);
271 WARN_ON(ctrl & PM_BIT(PLLEN));
272
273 if (parent == &osc0)
274 ctrl &= ~PM_BIT(PLLOSC);
275 else if (parent == &osc1)
276 ctrl |= PM_BIT(PLLOSC);
277 else
278 return -EINVAL;
279
280 pm_writel(PLL1, ctrl);
281 clk->parent = parent;
282
283 return 0;
284}
285
141/* 286/*
142 * The AT32AP7000 has five primary clock sources: One 32kHz 287 * The AT32AP7000 has five primary clock sources: One 32kHz
143 * oscillator, two crystal oscillators and two PLLs. 288 * oscillator, two crystal oscillators and two PLLs.
@@ -166,7 +311,10 @@ static struct clk pll0 = {
166}; 311};
167static struct clk pll1 = { 312static struct clk pll1 = {
168 .name = "pll1", 313 .name = "pll1",
314 .mode = pll1_mode,
169 .get_rate = pll1_get_rate, 315 .get_rate = pll1_get_rate,
316 .set_rate = pll1_set_rate,
317 .set_parent = pll1_set_parent,
170 .parent = &osc0, 318 .parent = &osc0,
171}; 319};
172 320
@@ -605,19 +753,32 @@ static inline void set_ebi_sfr_bits(u32 mask)
605} 753}
606 754
607/* -------------------------------------------------------------------- 755/* --------------------------------------------------------------------
608 * System Timer/Counter (TC) 756 * Timer/Counter (TC)
609 * -------------------------------------------------------------------- */ 757 * -------------------------------------------------------------------- */
610static struct resource at32_systc0_resource[] = { 758
759static struct resource at32_tcb0_resource[] = {
611 PBMEM(0xfff00c00), 760 PBMEM(0xfff00c00),
612 IRQ(22), 761 IRQ(22),
613}; 762};
614struct platform_device at32_systc0_device = { 763static struct platform_device at32_tcb0_device = {
615 .name = "systc", 764 .name = "atmel_tcb",
616 .id = 0, 765 .id = 0,
617 .resource = at32_systc0_resource, 766 .resource = at32_tcb0_resource,
618 .num_resources = ARRAY_SIZE(at32_systc0_resource), 767 .num_resources = ARRAY_SIZE(at32_tcb0_resource),
619}; 768};
620DEV_CLK(pclk, at32_systc0, pbb, 3); 769DEV_CLK(t0_clk, at32_tcb0, pbb, 3);
770
771static struct resource at32_tcb1_resource[] = {
772 PBMEM(0xfff01000),
773 IRQ(23),
774};
775static struct platform_device at32_tcb1_device = {
776 .name = "atmel_tcb",
777 .id = 1,
778 .resource = at32_tcb1_resource,
779 .num_resources = ARRAY_SIZE(at32_tcb1_resource),
780};
781DEV_CLK(t0_clk, at32_tcb1, pbb, 4);
621 782
622/* -------------------------------------------------------------------- 783/* --------------------------------------------------------------------
623 * PIO 784 * PIO
@@ -669,7 +830,8 @@ void __init at32_add_system_devices(void)
669 platform_device_register(&pdc_device); 830 platform_device_register(&pdc_device);
670 platform_device_register(&dmaca0_device); 831 platform_device_register(&dmaca0_device);
671 832
672 platform_device_register(&at32_systc0_device); 833 platform_device_register(&at32_tcb0_device);
834 platform_device_register(&at32_tcb1_device);
673 835
674 platform_device_register(&pio0_device); 836 platform_device_register(&pio0_device);
675 platform_device_register(&pio1_device); 837 platform_device_register(&pio1_device);
@@ -989,7 +1151,9 @@ static struct clk atmel_twi0_pclk = {
989 .index = 2, 1151 .index = 2,
990}; 1152};
991 1153
992struct platform_device *__init at32_add_device_twi(unsigned int id) 1154struct platform_device *__init at32_add_device_twi(unsigned int id,
1155 struct i2c_board_info *b,
1156 unsigned int n)
993{ 1157{
994 struct platform_device *pdev; 1158 struct platform_device *pdev;
995 1159
@@ -1009,6 +1173,9 @@ struct platform_device *__init at32_add_device_twi(unsigned int id)
1009 1173
1010 atmel_twi0_pclk.dev = &pdev->dev; 1174 atmel_twi0_pclk.dev = &pdev->dev;
1011 1175
1176 if (b)
1177 i2c_register_board_info(id, b, n);
1178
1012 platform_device_add(pdev); 1179 platform_device_add(pdev);
1013 return pdev; 1180 return pdev;
1014 1181
@@ -1351,9 +1518,39 @@ static struct clk usba0_hclk = {
1351 .index = 6, 1518 .index = 6,
1352}; 1519};
1353 1520
1521#define EP(nam, idx, maxpkt, maxbk, dma, isoc) \
1522 [idx] = { \
1523 .name = nam, \
1524 .index = idx, \
1525 .fifo_size = maxpkt, \
1526 .nr_banks = maxbk, \
1527 .can_dma = dma, \
1528 .can_isoc = isoc, \
1529 }
1530
1531static struct usba_ep_data at32_usba_ep[] __initdata = {
1532 EP("ep0", 0, 64, 1, 0, 0),
1533 EP("ep1", 1, 512, 2, 1, 1),
1534 EP("ep2", 2, 512, 2, 1, 1),
1535 EP("ep3-int", 3, 64, 3, 1, 0),
1536 EP("ep4-int", 4, 64, 3, 1, 0),
1537 EP("ep5", 5, 1024, 3, 1, 1),
1538 EP("ep6", 6, 1024, 3, 1, 1),
1539};
1540
1541#undef EP
1542
1354struct platform_device *__init 1543struct platform_device *__init
1355at32_add_device_usba(unsigned int id, struct usba_platform_data *data) 1544at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
1356{ 1545{
1546 /*
1547 * pdata doesn't have room for any endpoints, so we need to
1548 * append room for the ones we need right after it.
1549 */
1550 struct {
1551 struct usba_platform_data pdata;
1552 struct usba_ep_data ep[7];
1553 } usba_data;
1357 struct platform_device *pdev; 1554 struct platform_device *pdev;
1358 1555
1359 if (id != 0) 1556 if (id != 0)
@@ -1367,13 +1564,20 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
1367 ARRAY_SIZE(usba0_resource))) 1564 ARRAY_SIZE(usba0_resource)))
1368 goto out_free_pdev; 1565 goto out_free_pdev;
1369 1566
1370 if (data) { 1567 if (data)
1371 if (platform_device_add_data(pdev, data, sizeof(*data))) 1568 usba_data.pdata.vbus_pin = data->vbus_pin;
1372 goto out_free_pdev; 1569 else
1570 usba_data.pdata.vbus_pin = -EINVAL;
1571
1572 data = &usba_data.pdata;
1573 data->num_ep = ARRAY_SIZE(at32_usba_ep);
1574 memcpy(data->ep, at32_usba_ep, sizeof(at32_usba_ep));
1373 1575
1374 if (data->vbus_pin != GPIO_PIN_NONE) 1576 if (platform_device_add_data(pdev, data, sizeof(usba_data)))
1375 at32_select_gpio(data->vbus_pin, 0); 1577 goto out_free_pdev;
1376 } 1578
1579 if (data->vbus_pin >= 0)
1580 at32_select_gpio(data->vbus_pin, 0);
1377 1581
1378 usba0_pclk.dev = &pdev->dev; 1582 usba0_pclk.dev = &pdev->dev;
1379 usba0_hclk.dev = &pdev->dev; 1583 usba0_hclk.dev = &pdev->dev;
@@ -1694,7 +1898,8 @@ struct clk *at32_clock_list[] = {
1694 &pio2_mck, 1898 &pio2_mck,
1695 &pio3_mck, 1899 &pio3_mck,
1696 &pio4_mck, 1900 &pio4_mck,
1697 &at32_systc0_pclk, 1901 &at32_tcb0_t0_clk,
1902 &at32_tcb1_t0_clk,
1698 &atmel_usart0_usart, 1903 &atmel_usart0_usart,
1699 &atmel_usart1_usart, 1904 &atmel_usart1_usart,
1700 &atmel_usart2_usart, 1905 &atmel_usart2_usart,
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c
index 0b286cd53028..097cf4e84052 100644
--- a/arch/avr32/mach-at32ap/intc.c
+++ b/arch/avr32/mach-at32ap/intc.c
@@ -13,7 +13,6 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15 15
16#include <asm/intc.h>
17#include <asm/io.h> 16#include <asm/io.h>
18 17
19#include "intc.h" 18#include "intc.h"
diff --git a/arch/avr32/mach-at32ap/pm-at32ap700x.S b/arch/avr32/mach-at32ap/pm-at32ap700x.S
new file mode 100644
index 000000000000..949e2485e278
--- /dev/null
+++ b/arch/avr32/mach-at32ap/pm-at32ap700x.S
@@ -0,0 +1,66 @@
1/*
2 * Low-level Power Management code.
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/asm.h>
11#include <asm/asm-offsets.h>
12#include <asm/thread_info.h>
13#include <asm/arch/pm.h>
14
15 .section .bss, "wa", @nobits
16 .global disable_idle_sleep
17 .type disable_idle_sleep, @object
18disable_idle_sleep:
19 .int 4
20 .size disable_idle_sleep, . - disable_idle_sleep
21
22 /* Keep this close to the irq handlers */
23 .section .irq.text, "ax", @progbits
24
25 /*
26 * void cpu_enter_idle(void)
27 *
28 * Put the CPU into "idle" mode, in which it will consume
29 * significantly less power.
30 *
31 * If an interrupt comes along in the window between
32 * unmask_interrupts and the sleep instruction below, the
33 * interrupt code will adjust the return address so that we
34 * never execute the sleep instruction. This is required
35 * because the AP7000 doesn't unmask interrupts when entering
36 * sleep modes; later CPUs may not need this workaround.
37 */
38 .global cpu_enter_idle
39 .type cpu_enter_idle, @function
40cpu_enter_idle:
41 mask_interrupts
42 get_thread_info r8
43 ld.w r9, r8[TI_flags]
44 bld r9, TIF_NEED_RESCHED
45 brcs .Lret_from_sleep
46 sbr r9, TIF_CPU_GOING_TO_SLEEP
47 st.w r8[TI_flags], r9
48 unmask_interrupts
49 sleep CPU_SLEEP_IDLE
50 .size cpu_idle_sleep, . - cpu_idle_sleep
51
52 /*
53 * Common return path for PM functions that don't run from
54 * SRAM.
55 */
56 .global cpu_idle_skip_sleep
57 .type cpu_idle_skip_sleep, @function
58cpu_idle_skip_sleep:
59 mask_interrupts
60 ld.w r9, r8[TI_flags]
61 cbr r9, TIF_CPU_GOING_TO_SLEEP
62 st.w r8[TI_flags], r9
63.Lret_from_sleep:
64 unmask_interrupts
65 retal r12
66 .size cpu_idle_skip_sleep, . - cpu_idle_skip_sleep
diff --git a/arch/avr32/mach-at32ap/time-tc.c b/arch/avr32/mach-at32ap/time-tc.c
deleted file mode 100644
index 10265863c982..000000000000
--- a/arch/avr32/mach-at32ap/time-tc.c
+++ /dev/null
@@ -1,218 +0,0 @@
1/*
2 * Copyright (C) 2004-2007 Atmel Corporation
3 *
4 * Based on MIPS implementation arch/mips/kernel/time.c
5 * Copyright 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/clk.h>
13#include <linux/clocksource.h>
14#include <linux/time.h>
15#include <linux/module.h>
16#include <linux/interrupt.h>
17#include <linux/irq.h>
18#include <linux/kernel_stat.h>
19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/profile.h>
22#include <linux/sysdev.h>
23#include <linux/err.h>
24
25#include <asm/div64.h>
26#include <asm/sysreg.h>
27#include <asm/io.h>
28#include <asm/sections.h>
29
30#include <asm/arch/time.h>
31
32/* how many counter cycles in a jiffy? */
33static u32 cycles_per_jiffy;
34
35/* the count value for the next timer interrupt */
36static u32 expirelo;
37
38/* the I/O registers of the TC module */
39static void __iomem *ioregs;
40
41cycle_t read_cycle_count(void)
42{
43 return (cycle_t)timer_read(ioregs, 0, CV);
44}
45
46struct clocksource clocksource_avr32 = {
47 .name = "avr32",
48 .rating = 342,
49 .read = read_cycle_count,
50 .mask = CLOCKSOURCE_MASK(16),
51 .shift = 16,
52 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
53};
54
55static void avr32_timer_ack(void)
56{
57 u16 count = expirelo;
58
59 /* Ack this timer interrupt and set the next one, use a u16
60 * variable so it will wrap around correctly */
61 count += cycles_per_jiffy;
62 expirelo = count;
63 timer_write(ioregs, 0, RC, expirelo);
64
65 /* Check to see if we have missed any timer interrupts */
66 count = timer_read(ioregs, 0, CV);
67 if ((count - expirelo) < 0x7fff) {
68 expirelo = count + cycles_per_jiffy;
69 timer_write(ioregs, 0, RC, expirelo);
70 }
71}
72
73u32 avr32_hpt_read(void)
74{
75 return timer_read(ioregs, 0, CV);
76}
77
78static int avr32_timer_calc_div_and_set_jiffies(struct clk *pclk)
79{
80 unsigned int cycles_max = (clocksource_avr32.mask + 1) / 2;
81 unsigned int divs[] = { 4, 8, 16, 32 };
82 int divs_size = ARRAY_SIZE(divs);
83 int i = 0;
84 unsigned long count_hz;
85 unsigned long shift;
86 unsigned long mult;
87 int clock_div = -1;
88 u64 tmp;
89
90 shift = clocksource_avr32.shift;
91
92 do {
93 count_hz = clk_get_rate(pclk) / divs[i];
94 mult = clocksource_hz2mult(count_hz, shift);
95 clocksource_avr32.mult = mult;
96
97 tmp = TICK_NSEC;
98 tmp <<= shift;
99 tmp += mult / 2;
100 do_div(tmp, mult);
101
102 cycles_per_jiffy = tmp;
103 } while (cycles_per_jiffy > cycles_max && ++i < divs_size);
104
105 clock_div = i + 1;
106
107 if (clock_div > divs_size) {
108 pr_debug("timer: could not calculate clock divider\n");
109 return -EFAULT;
110 }
111
112 /* Set the clock divider */
113 timer_write(ioregs, 0, CMR, TIMER_BF(CMR_TCCLKS, clock_div));
114
115 return 0;
116}
117
118int avr32_hpt_init(unsigned int count)
119{
120 struct resource *regs;
121 struct clk *pclk;
122 int irq = -1;
123 int ret = 0;
124
125 ret = -ENXIO;
126
127 irq = platform_get_irq(&at32_systc0_device, 0);
128 if (irq < 0) {
129 pr_debug("timer: could not get irq\n");
130 goto out_error;
131 }
132
133 pclk = clk_get(&at32_systc0_device.dev, "pclk");
134 if (IS_ERR(pclk)) {
135 pr_debug("timer: could not get clk: %ld\n", PTR_ERR(pclk));
136 goto out_error;
137 }
138 clk_enable(pclk);
139
140 regs = platform_get_resource(&at32_systc0_device, IORESOURCE_MEM, 0);
141 if (!regs) {
142 pr_debug("timer: could not get resource\n");
143 goto out_error_clk;
144 }
145
146 ioregs = ioremap(regs->start, regs->end - regs->start + 1);
147 if (!ioregs) {
148 pr_debug("timer: could not get ioregs\n");
149 goto out_error_clk;
150 }
151
152 ret = avr32_timer_calc_div_and_set_jiffies(pclk);
153 if (ret)
154 goto out_error_io;
155
156 ret = setup_irq(irq, &timer_irqaction);
157 if (ret) {
158 pr_debug("timer: could not request irq %d: %d\n",
159 irq, ret);
160 goto out_error_io;
161 }
162
163 expirelo = (timer_read(ioregs, 0, CV) / cycles_per_jiffy + 1)
164 * cycles_per_jiffy;
165
166 /* Enable clock and interrupts on RC compare */
167 timer_write(ioregs, 0, CCR, TIMER_BIT(CCR_CLKEN));
168 timer_write(ioregs, 0, IER, TIMER_BIT(IER_CPCS));
169 /* Set cycles to first interrupt */
170 timer_write(ioregs, 0, RC, expirelo);
171
172 printk(KERN_INFO "timer: AT32AP system timer/counter at 0x%p irq %d\n",
173 ioregs, irq);
174
175 return 0;
176
177out_error_io:
178 iounmap(ioregs);
179out_error_clk:
180 clk_put(pclk);
181out_error:
182 return ret;
183}
184
185int avr32_hpt_start(void)
186{
187 timer_write(ioregs, 0, CCR, TIMER_BIT(CCR_SWTRG));
188 return 0;
189}
190
191irqreturn_t timer_interrupt(int irq, void *dev_id)
192{
193 unsigned int sr = timer_read(ioregs, 0, SR);
194
195 if (sr & TIMER_BIT(SR_CPCS)) {
196 /* ack timer interrupt and try to set next interrupt */
197 avr32_timer_ack();
198
199 /*
200 * Call the generic timer interrupt handler
201 */
202 write_seqlock(&xtime_lock);
203 do_timer(1);
204 write_sequnlock(&xtime_lock);
205
206 /*
207 * In UP mode, we call local_timer_interrupt() to do profiling
208 * and process accounting.
209 *
210 * SMP is not supported yet.
211 */
212 local_timer_interrupt(irq, dev_id);
213
214 return IRQ_HANDLED;
215 }
216
217 return IRQ_NONE;
218}
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 480760bde63f..0e64ddc45e37 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -34,9 +34,6 @@ struct page *empty_zero_page;
34 */ 34 */
35unsigned long mmu_context_cache = NO_CONTEXT; 35unsigned long mmu_context_cache = NO_CONTEXT;
36 36
37#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
38#define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn)
39
40void show_mem(void) 37void show_mem(void)
41{ 38{
42 int total = 0, reserved = 0, cached = 0; 39 int total = 0, reserved = 0, cached = 0;
diff --git a/arch/avr32/oprofile/op_model_avr32.c b/arch/avr32/oprofile/op_model_avr32.c
index e2f876bfc86b..df42325c7f81 100644
--- a/arch/avr32/oprofile/op_model_avr32.c
+++ b/arch/avr32/oprofile/op_model_avr32.c
@@ -16,7 +16,6 @@
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/types.h> 17#include <linux/types.h>
18 18
19#include <asm/intc.h>
20#include <asm/sysreg.h> 19#include <asm/sysreg.h>
21#include <asm/system.h> 20#include <asm/system.h>
22 21
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index 9bdc8f99183a..715b3945e4c7 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -39,8 +39,7 @@
39/* This is an NTP setting */ 39/* This is an NTP setting */
40#define TICK_SIZE (tick_nsec / 1000) 40#define TICK_SIZE (tick_nsec / 1000)
41 41
42static void time_sched_init(irqreturn_t(*timer_routine) 42static void time_sched_init(irq_handler_t timer_routine);
43 (int, void *));
44static unsigned long gettimeoffset(void); 43static unsigned long gettimeoffset(void);
45 44
46static struct irqaction bfin_timer_irq = { 45static struct irqaction bfin_timer_irq = {
@@ -64,7 +63,7 @@ static struct irqaction bfin_timer_irq = {
64#define TIME_SCALE 1 63#define TIME_SCALE 1
65 64
66static void 65static void
67time_sched_init(irqreturn_t(*timer_routine) (int, void *)) 66time_sched_init(irq_handler_t timer_routine)
68{ 67{
69 u32 tcount; 68 u32 tcount;
70 69
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index 779c3cca206c..b11bb50a197a 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -44,8 +44,8 @@
44#include <linux/smp.h> 44#include <linux/smp.h>
45#include <linux/timer.h> 45#include <linux/timer.h>
46#include <linux/vmalloc.h> 46#include <linux/vmalloc.h>
47#include <linux/semaphore.h>
47 48
48#include <asm/semaphore.h>
49#include <asm/sal.h> 49#include <asm/sal.h>
50#include <asm/uaccess.h> 50#include <asm/uaccess.h>
51 51
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 4b0d1538e7e5..8cc0c4753d89 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -37,7 +37,6 @@
37 37
38#include <asm/processor.h> 38#include <asm/processor.h>
39#include <asm/topology.h> 39#include <asm/topology.h>
40#include <asm/semaphore.h>
41#include <asm/uaccess.h> 40#include <asm/uaccess.h>
42#include <asm/sal.h> 41#include <asm/sal.h>
43#include <asm/sn/io.h> 42#include <asm/sn/io.h>
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
index 0055a6c06f75..04c69ffbea71 100644
--- a/arch/m68k/atari/stram.c
+++ b/arch/m68k/atari/stram.c
@@ -29,7 +29,6 @@
29#include <asm/atarihw.h> 29#include <asm/atarihw.h>
30#include <asm/atari_stram.h> 30#include <asm/atari_stram.h>
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/semaphore.h>
33 32
34#undef DEBUG 33#undef DEBUG
35 34
diff --git a/arch/m68k/sun3/intersil.c b/arch/m68k/sun3/intersil.c
index db359d7402a6..0116d208d300 100644
--- a/arch/m68k/sun3/intersil.c
+++ b/arch/m68k/sun3/intersil.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/errno.h> 16#include <asm/errno.h>
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/semaphore.h>
19#include <asm/rtc.h> 18#include <asm/rtc.h>
20#include <asm/intersil.h> 19#include <asm/intersil.h>
21 20
diff --git a/arch/mips/sgi-ip27/ip27-console.c b/arch/mips/sgi-ip27/ip27-console.c
index 3ba830651c58..984e561f0f7a 100644
--- a/arch/mips/sgi-ip27/ip27-console.c
+++ b/arch/mips/sgi-ip27/ip27-console.c
@@ -8,7 +8,6 @@
8#include <linux/init.h> 8#include <linux/init.h>
9 9
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/semaphore.h>
12#include <asm/sn/addrs.h> 11#include <asm/sn/addrs.h>
13#include <asm/sn/sn0/hub.h> 12#include <asm/sn/sn0/hub.h>
14#include <asm/sn/klconfig.h> 13#include <asm/sn/klconfig.h>
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 50bbf33ee00c..71efd6a28e2a 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -49,7 +49,6 @@
49 49
50#include <asm/types.h> 50#include <asm/types.h>
51#include <asm/uaccess.h> 51#include <asm/uaccess.h>
52#include <asm/semaphore.h>
53#include <asm/mmu_context.h> 52#include <asm/mmu_context.h>
54 53
55#include "sys32.h" 54#include "sys32.h"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1189d8d6170d..4bb2e9310a56 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -49,6 +49,19 @@ config IRQ_PER_CPU
49 bool 49 bool
50 default y 50 default y
51 51
52config STACKTRACE_SUPPORT
53 bool
54 default y
55
56config TRACE_IRQFLAGS_SUPPORT
57 bool
58 depends on PPC64
59 default y
60
61config LOCKDEP_SUPPORT
62 bool
63 default y
64
52config RWSEM_GENERIC_SPINLOCK 65config RWSEM_GENERIC_SPINLOCK
53 bool 66 bool
54 67
@@ -81,6 +94,11 @@ config GENERIC_FIND_NEXT_BIT
81 bool 94 bool
82 default y 95 default y
83 96
97config GENERIC_GPIO
98 bool
99 help
100 Generic GPIO API support
101
84config ARCH_NO_VIRT_TO_BUS 102config ARCH_NO_VIRT_TO_BUS
85 def_bool PPC64 103 def_bool PPC64
86 104
@@ -91,6 +109,7 @@ config PPC
91 select HAVE_OPROFILE 109 select HAVE_OPROFILE
92 select HAVE_KPROBES 110 select HAVE_KPROBES
93 select HAVE_KRETPROBES 111 select HAVE_KRETPROBES
112 select HAVE_LMB
94 113
95config EARLY_PRINTK 114config EARLY_PRINTK
96 bool 115 bool
@@ -210,15 +229,6 @@ source kernel/Kconfig.hz
210source kernel/Kconfig.preempt 229source kernel/Kconfig.preempt
211source "fs/Kconfig.binfmt" 230source "fs/Kconfig.binfmt"
212 231
213# We optimistically allocate largepages from the VM, so make the limit
214# large enough (16MB). This badly named config option is actually
215# max order + 1
216config FORCE_MAX_ZONEORDER
217 int
218 depends on PPC64
219 default "9" if PPC_64K_PAGES
220 default "13"
221
222config HUGETLB_PAGE_SIZE_VARIABLE 232config HUGETLB_PAGE_SIZE_VARIABLE
223 bool 233 bool
224 depends on HUGETLB_PAGE 234 depends on HUGETLB_PAGE
@@ -307,6 +317,16 @@ config CRASH_DUMP
307 317
308 Don't change this unless you know what you are doing. 318 Don't change this unless you know what you are doing.
309 319
320config PHYP_DUMP
321 bool "Hypervisor-assisted dump (EXPERIMENTAL)"
322 depends on PPC_PSERIES && EXPERIMENTAL
323 help
324 Hypervisor-assisted dump is meant to be a kdump replacement
325 offering robustness and speed not possible without system
326 hypervisor assistence.
327
328 If unsure, say "N"
329
310config PPCBUG_NVRAM 330config PPCBUG_NVRAM
311 bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC 331 bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
312 default y if PPC_PREP 332 default y if PPC_PREP
@@ -381,6 +401,26 @@ config PPC_64K_PAGES
381 while on hardware with such support, it will be used to map 401 while on hardware with such support, it will be used to map
382 normal application pages. 402 normal application pages.
383 403
404config FORCE_MAX_ZONEORDER
405 int "Maximum zone order"
406 default "9" if PPC_64K_PAGES
407 default "13" if PPC64 && !PPC_64K_PAGES
408 default "11"
409 help
410 The kernel memory allocator divides physically contiguous memory
411 blocks into "zones", where each zone is a power of two number of
412 pages. This option selects the largest power of two that the kernel
413 keeps in the memory allocator. If you need to allocate very large
414 blocks of physically contiguous memory, then you may need to
415 increase this value.
416
417 This config option is actually maximum order plus one. For example,
418 a value of 11 means that the largest free memory block is 2^10 pages.
419
420 The page size is not necessarily 4KB. For example, on 64-bit
421 systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
422 this in mind when choosing a value for this option.
423
384config PPC_SUBPAGE_PROT 424config PPC_SUBPAGE_PROT
385 bool "Support setting protections for 4k subpages" 425 bool "Support setting protections for 4k subpages"
386 depends on PPC_64K_PAGES 426 depends on PPC_64K_PAGES
@@ -490,6 +530,14 @@ config FSL_PCI
490 bool 530 bool
491 select PPC_INDIRECT_PCI 531 select PPC_INDIRECT_PCI
492 532
533config 4xx_SOC
534 bool
535
536config FSL_LBC
537 bool
538 help
539 Freescale Localbus support
540
493# Yes MCA RS/6000s exist but Linux-PPC does not currently support any 541# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
494config MCA 542config MCA
495 bool 543 bool
@@ -663,22 +711,6 @@ config CONSISTENT_SIZE
663 hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL 711 hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL
664 default "0x00200000" if NOT_COHERENT_CACHE 712 default "0x00200000" if NOT_COHERENT_CACHE
665 713
666config BOOT_LOAD_BOOL
667 bool "Set the boot link/load address"
668 depends on ADVANCED_OPTIONS && !PPC_MULTIPLATFORM
669 help
670 This option allows you to set the initial load address of the zImage
671 or zImage.initrd file. This can be useful if you are on a board
672 which has a small amount of memory.
673
674 Say N here unless you know what you are doing.
675
676config BOOT_LOAD
677 hex "Link/load address for booting" if BOOT_LOAD_BOOL
678 default "0x00400000" if 40x || 8xx || 8260
679 default "0x01000000" if 44x
680 default "0x00800000"
681
682config PIN_TLB 714config PIN_TLB
683 bool "Pinned Kernel TLBs (860 ONLY)" 715 bool "Pinned Kernel TLBs (860 ONLY)"
684 depends on ADVANCED_OPTIONS && 8xx 716 depends on ADVANCED_OPTIONS && 8xx
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index db7cc34c24d4..a86d8d853214 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -269,7 +269,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
269 hex "CPM UART early debug transmit descriptor address" 269 hex "CPM UART early debug transmit descriptor address"
270 depends on PPC_EARLY_DEBUG_CPM 270 depends on PPC_EARLY_DEBUG_CPM
271 default "0xfa202008" if PPC_EP88XC 271 default "0xfa202008" if PPC_EP88XC
272 default "0xf0000008" if CPM2 272 default "0xf0001ff8" if CPM2
273 default "0xff002008" if CPM1 273 default "0xff002008" if CPM1
274 help 274 help
275 This specifies the address of the transmit descriptor 275 This specifies the address of the transmit descriptor
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index ab5cfe8ef988..e2ec4a91ccef 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -71,13 +71,11 @@ endif
71 71
72LDFLAGS_vmlinux := -Bstatic 72LDFLAGS_vmlinux := -Bstatic
73 73
74CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 74CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 75CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
78KBUILD_CPPFLAGS += $(CPPFLAGS-y) 76KBUILD_CPPFLAGS += -Iarch/$(ARCH)
79KBUILD_AFLAGS += $(AFLAGS-y) 77KBUILD_AFLAGS += -Iarch/$(ARCH)
80KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) 78KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
81CPP = $(CC) -E $(KBUILD_CFLAGS) 79CPP = $(CC) -E $(KBUILD_CFLAGS)
82 80
83CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 81CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
@@ -164,7 +162,7 @@ boot := arch/$(ARCH)/boot
164$(BOOT_TARGETS): vmlinux 162$(BOOT_TARGETS): vmlinux
165 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 163 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
166 164
167bootwrapper_install: 165bootwrapper_install %.dtb:
168 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 166 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
169 167
170define archhelp 168define archhelp
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 1aded8f759d0..5ba50c673390 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -40,6 +40,7 @@ $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
40$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 40$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
41$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 41$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
42$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 42$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
43$(obj)/virtex405-head.o: BOOTCFLAGS += -mcpu=405
43 44
44 45
45zlib := inffast.c inflate.c inftrees.c 46zlib := inffast.c inflate.c inftrees.c
@@ -64,7 +65,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c
64 cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ 65 cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \
65 fixed-head.S ep88xc.c ep405.c \ 66 fixed-head.S ep88xc.c ep405.c \
66 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ 67 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
67 cuboot-warp.c cuboot-85xx-cpm2.c 68 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
69 virtex405-head.S
68src-boot := $(src-wlib) $(src-plat) empty.c 70src-boot := $(src-wlib) $(src-plat) empty.c
69 71
70src-boot := $(addprefix $(obj)/, $(src-boot)) 72src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -192,7 +194,7 @@ image-$(CONFIG_PPC_CHRP) += zImage.chrp
192image-$(CONFIG_PPC_EFIKA) += zImage.chrp 194image-$(CONFIG_PPC_EFIKA) += zImage.chrp
193image-$(CONFIG_PPC_PMAC) += zImage.pmac 195image-$(CONFIG_PPC_PMAC) += zImage.pmac
194image-$(CONFIG_PPC_HOLLY) += zImage.holly 196image-$(CONFIG_PPC_HOLLY) += zImage.holly
195image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 197image-$(CONFIG_PPC_PRPMC2800) += dtbImage.prpmc2800
196image-$(CONFIG_PPC_ISERIES) += zImage.iseries 198image-$(CONFIG_PPC_ISERIES) += zImage.iseries
197image-$(CONFIG_DEFAULT_UIMAGE) += uImage 199image-$(CONFIG_DEFAULT_UIMAGE) += uImage
198 200
@@ -216,6 +218,7 @@ image-$(CONFIG_RAINIER) += cuImage.rainier
216image-$(CONFIG_TAISHAN) += cuImage.taishan 218image-$(CONFIG_TAISHAN) += cuImage.taishan
217image-$(CONFIG_KATMAI) += cuImage.katmai 219image-$(CONFIG_KATMAI) += cuImage.katmai
218image-$(CONFIG_WARP) += cuImage.warp 220image-$(CONFIG_WARP) += cuImage.warp
221image-$(CONFIG_YOSEMITE) += cuImage.yosemite
219 222
220# Board ports in arch/powerpc/platform/8xx/Kconfig 223# Board ports in arch/powerpc/platform/8xx/Kconfig
221image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads 224image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads
@@ -255,6 +258,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm8555
255image-$(CONFIG_TQM8560) += cuImage.tqm8560 258image-$(CONFIG_TQM8560) += cuImage.tqm8560
256image-$(CONFIG_SBC8548) += cuImage.sbc8548 259image-$(CONFIG_SBC8548) += cuImage.sbc8548
257image-$(CONFIG_SBC8560) += cuImage.sbc8560 260image-$(CONFIG_SBC8560) += cuImage.sbc8560
261image-$(CONFIG_KSI8560) += cuImage.ksi8560
258 262
259# Board ports in arch/powerpc/platform/embedded6xx/Kconfig 263# Board ports in arch/powerpc/platform/embedded6xx/Kconfig
260image-$(CONFIG_STORCENTER) += cuImage.storcenter 264image-$(CONFIG_STORCENTER) += cuImage.storcenter
@@ -285,11 +289,11 @@ $(obj)/zImage.%: vmlinux $(wrapperbits)
285 $(call if_changed,wrap,$*) 289 $(call if_changed,wrap,$*)
286 290
287# dtbImage% - a dtbImage is a zImage with an embedded device tree blob 291# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
288$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts 292$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
289 $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) 293 $(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
290 294
291$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(dtstree)/%.dts 295$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb
292 $(call if_changed,wrap,$*,$(dtstree)/$*.dts) 296 $(call if_changed,wrap,$*,,$(obj)/$*.dtb)
293 297
294# This cannot be in the root of $(src) as the zImage rule always adds a $(obj) 298# This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
295# prefix 299# prefix
@@ -302,14 +306,24 @@ $(obj)/zImage.iseries: vmlinux
302$(obj)/uImage: vmlinux $(wrapperbits) 306$(obj)/uImage: vmlinux $(wrapperbits)
303 $(call if_changed,wrap,uboot) 307 $(call if_changed,wrap,uboot)
304 308
305$(obj)/cuImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) 309$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
306 $(call if_changed,wrap,cuboot-$*,$(dtstree)/$*.dts) 310 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)
307 311
308$(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits) 312$(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
309 $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) 313 $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
310 314
311$(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) 315$(obj)/simpleImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
312 $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts) 316 $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb)
317
318$(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
319 $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
320
321$(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
322 $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb)
323
324# Rule to build device tree blobs
325$(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc
326 $(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(DTS_FLAGS) $(dtstree)/$*.dts
313 327
314# If there isn't a platform selected then just strip the vmlinux. 328# If there isn't a platform selected then just strip the vmlinux.
315ifeq (,$(image-y)) 329ifeq (,$(image-y))
@@ -326,7 +340,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
326 340
327# anything not in $(targets) 341# anything not in $(targets)
328clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ 342clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \
329 otheros.bld 343 otheros.bld *.dtb
330 344
331# clean up files cached by wrapper 345# clean up files cached by wrapper
332clean-kernel := vmlinux.strip vmlinux.bin 346clean-kernel := vmlinux.strip vmlinux.bin
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c
index 54b33f1500e2..b82cacbc60db 100644
--- a/arch/powerpc/boot/bamboo.c
+++ b/arch/powerpc/boot/bamboo.c
@@ -33,7 +33,8 @@ static void bamboo_fixups(void)
33 ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); 33 ibm440ep_fixup_clocks(sysclk, 11059200, 25000000);
34 ibm4xx_sdram_fixup_memsize(); 34 ibm4xx_sdram_fixup_memsize();
35 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); 35 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
36 dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); 36 dt_fixup_mac_address_by_alias("ethernet0", bamboo_mac0);
37 dt_fixup_mac_address_by_alias("ethernet1", bamboo_mac1);
37} 38}
38 39
39void bamboo_init(void *mac0, void *mac1) 40void bamboo_init(void *mac0, void *mac1)
diff --git a/arch/powerpc/boot/cpm-serial.c b/arch/powerpc/boot/cpm-serial.c
index 28296facb2ae..19dc15abe43d 100644
--- a/arch/powerpc/boot/cpm-serial.c
+++ b/arch/powerpc/boot/cpm-serial.c
@@ -11,6 +11,7 @@
11#include "types.h" 11#include "types.h"
12#include "io.h" 12#include "io.h"
13#include "ops.h" 13#include "ops.h"
14#include "page.h"
14 15
15struct cpm_scc { 16struct cpm_scc {
16 u32 gsmrl; 17 u32 gsmrl;
@@ -42,6 +43,22 @@ struct cpm_param {
42 u16 tbase; 43 u16 tbase;
43 u8 rfcr; 44 u8 rfcr;
44 u8 tfcr; 45 u8 tfcr;
46 u16 mrblr;
47 u32 rstate;
48 u8 res1[4];
49 u16 rbptr;
50 u8 res2[6];
51 u32 tstate;
52 u8 res3[4];
53 u16 tbptr;
54 u8 res4[6];
55 u16 maxidl;
56 u16 idlc;
57 u16 brkln;
58 u16 brkec;
59 u16 brkcr;
60 u16 rmask;
61 u8 res5[4];
45}; 62};
46 63
47struct cpm_bd { 64struct cpm_bd {
@@ -54,10 +71,10 @@ static void *cpcr;
54static struct cpm_param *param; 71static struct cpm_param *param;
55static struct cpm_smc *smc; 72static struct cpm_smc *smc;
56static struct cpm_scc *scc; 73static struct cpm_scc *scc;
57struct cpm_bd *tbdf, *rbdf; 74static struct cpm_bd *tbdf, *rbdf;
58static u32 cpm_cmd; 75static u32 cpm_cmd;
59static u8 *muram_start; 76static void *cbd_addr;
60static u32 muram_offset; 77static u32 cbd_offset;
61 78
62static void (*do_cmd)(int op); 79static void (*do_cmd)(int op);
63static void (*enable_port)(void); 80static void (*enable_port)(void);
@@ -119,20 +136,25 @@ static int cpm_serial_open(void)
119 136
120 out_8(&param->rfcr, 0x10); 137 out_8(&param->rfcr, 0x10);
121 out_8(&param->tfcr, 0x10); 138 out_8(&param->tfcr, 0x10);
122 139 out_be16(&param->mrblr, 1);
123 rbdf = (struct cpm_bd *)muram_start; 140 out_be16(&param->maxidl, 0);
124 rbdf->addr = (u8 *)(rbdf + 2); 141 out_be16(&param->brkec, 0);
142 out_be16(&param->brkln, 0);
143 out_be16(&param->brkcr, 0);
144
145 rbdf = cbd_addr;
146 rbdf->addr = (u8 *)rbdf - 1;
125 rbdf->sc = 0xa000; 147 rbdf->sc = 0xa000;
126 rbdf->len = 1; 148 rbdf->len = 1;
127 149
128 tbdf = rbdf + 1; 150 tbdf = rbdf + 1;
129 tbdf->addr = (u8 *)(rbdf + 2) + 1; 151 tbdf->addr = (u8 *)rbdf - 2;
130 tbdf->sc = 0x2000; 152 tbdf->sc = 0x2000;
131 tbdf->len = 1; 153 tbdf->len = 1;
132 154
133 sync(); 155 sync();
134 out_be16(&param->rbase, muram_offset); 156 out_be16(&param->rbase, cbd_offset);
135 out_be16(&param->tbase, muram_offset + sizeof(struct cpm_bd)); 157 out_be16(&param->tbase, cbd_offset + sizeof(struct cpm_bd));
136 158
137 do_cmd(CPM_CMD_INIT_RX_TX); 159 do_cmd(CPM_CMD_INIT_RX_TX);
138 160
@@ -175,10 +197,12 @@ static unsigned char cpm_serial_getc(void)
175 197
176int cpm_console_init(void *devp, struct serial_console_data *scdp) 198int cpm_console_init(void *devp, struct serial_console_data *scdp)
177{ 199{
178 void *reg_virt[2]; 200 void *vreg[2];
179 int is_smc = 0, is_cpm2 = 0, n; 201 u32 reg[2];
180 unsigned long reg_phys; 202 int is_smc = 0, is_cpm2 = 0;
181 void *parent, *muram; 203 void *parent, *muram;
204 void *muram_addr;
205 unsigned long muram_offset, muram_size;
182 206
183 if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) { 207 if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) {
184 is_smc = 1; 208 is_smc = 1;
@@ -202,63 +226,64 @@ int cpm_console_init(void *devp, struct serial_console_data *scdp)
202 else 226 else
203 do_cmd = cpm1_cmd; 227 do_cmd = cpm1_cmd;
204 228
205 n = getprop(devp, "fsl,cpm-command", &cpm_cmd, 4); 229 if (getprop(devp, "fsl,cpm-command", &cpm_cmd, 4) < 4)
206 if (n < 4)
207 return -1; 230 return -1;
208 231
209 n = getprop(devp, "virtual-reg", reg_virt, sizeof(reg_virt)); 232 if (dt_get_virtual_reg(devp, vreg, 2) < 2)
210 if (n < (int)sizeof(reg_virt)) { 233 return -1;
211 for (n = 0; n < 2; n++) {
212 if (!dt_xlate_reg(devp, n, &reg_phys, NULL))
213 return -1;
214
215 reg_virt[n] = (void *)reg_phys;
216 }
217 }
218 234
219 if (is_smc) 235 if (is_smc)
220 smc = reg_virt[0]; 236 smc = vreg[0];
221 else 237 else
222 scc = reg_virt[0]; 238 scc = vreg[0];
223 239
224 param = reg_virt[1]; 240 param = vreg[1];
225 241
226 parent = get_parent(devp); 242 parent = get_parent(devp);
227 if (!parent) 243 if (!parent)
228 return -1; 244 return -1;
229 245
230 n = getprop(parent, "virtual-reg", reg_virt, sizeof(reg_virt)); 246 if (dt_get_virtual_reg(parent, &cpcr, 1) < 1)
231 if (n < (int)sizeof(reg_virt)) { 247 return -1;
232 if (!dt_xlate_reg(parent, 0, &reg_phys, NULL))
233 return -1;
234
235 reg_virt[0] = (void *)reg_phys;
236 }
237
238 cpcr = reg_virt[0];
239 248
240 muram = finddevice("/soc/cpm/muram/data"); 249 muram = finddevice("/soc/cpm/muram/data");
241 if (!muram) 250 if (!muram)
242 return -1; 251 return -1;
243 252
244 /* For bootwrapper-compatible device trees, we assume that the first 253 /* For bootwrapper-compatible device trees, we assume that the first
245 * entry has at least 18 bytes, and that #address-cells/#data-cells 254 * entry has at least 128 bytes, and that #address-cells/#data-cells
246 * is one for both parent and child. 255 * is one for both parent and child.
247 */ 256 */
248 257
249 n = getprop(muram, "virtual-reg", reg_virt, sizeof(reg_virt)); 258 if (dt_get_virtual_reg(muram, &muram_addr, 1) < 1)
250 if (n < (int)sizeof(reg_virt)) { 259 return -1;
251 if (!dt_xlate_reg(muram, 0, &reg_phys, NULL))
252 return -1;
253 260
254 reg_virt[0] = (void *)reg_phys; 261 if (getprop(muram, "reg", reg, 8) < 8)
255 } 262 return -1;
256 263
257 muram_start = reg_virt[0]; 264 muram_offset = reg[0];
265 muram_size = reg[1];
258 266
259 n = getprop(muram, "reg", &muram_offset, 4); 267 /* Store the buffer descriptors at the end of the first muram chunk.
260 if (n < 4) 268 * For SMC ports on CPM2-based platforms, relocate the parameter RAM
261 return -1; 269 * just before the buffer descriptors.
270 */
271
272 cbd_offset = muram_offset + muram_size - 2 * sizeof(struct cpm_bd);
273
274 if (is_cpm2 && is_smc) {
275 u16 *smc_base = (u16 *)param;
276 u16 pram_offset;
277
278 pram_offset = cbd_offset - 64;
279 pram_offset = _ALIGN_DOWN(pram_offset, 64);
280
281 disable_port();
282 out_be16(smc_base, pram_offset);
283 param = muram_addr - muram_offset + pram_offset;
284 }
285
286 cbd_addr = muram_addr - muram_offset + cbd_offset;
262 287
263 scdp->open = cpm_serial_open; 288 scdp->open = cpm_serial_open;
264 scdp->putc = cpm_serial_putc; 289 scdp->putc = cpm_serial_putc;
diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c
index f56ac6cae9f3..9c7d13428293 100644
--- a/arch/powerpc/boot/cuboot-pq2.c
+++ b/arch/powerpc/boot/cuboot-pq2.c
@@ -128,7 +128,7 @@ static void fixup_pci(void)
128 u8 *soc_regs; 128 u8 *soc_regs;
129 int i, len; 129 int i, len;
130 void *node, *parent_node; 130 void *node, *parent_node;
131 u32 naddr, nsize, mem_log2; 131 u32 naddr, nsize, mem_pow2, mem_mask;
132 132
133 node = finddevice("/pci"); 133 node = finddevice("/pci");
134 if (!node || !dt_is_compatible(node, "fsl,pq2-pci")) 134 if (!node || !dt_is_compatible(node, "fsl,pq2-pci"))
@@ -141,7 +141,7 @@ static void fixup_pci(void)
141 141
142 soc_regs = (u8 *)fsl_get_immr(); 142 soc_regs = (u8 *)fsl_get_immr();
143 if (!soc_regs) 143 if (!soc_regs)
144 goto err; 144 goto unhandled;
145 145
146 dt_get_reg_format(node, &naddr, &nsize); 146 dt_get_reg_format(node, &naddr, &nsize);
147 if (naddr != 3 || nsize != 2) 147 if (naddr != 3 || nsize != 2)
@@ -153,7 +153,7 @@ static void fixup_pci(void)
153 153
154 dt_get_reg_format(parent_node, &naddr, &nsize); 154 dt_get_reg_format(parent_node, &naddr, &nsize);
155 if (naddr != 1 || nsize != 1) 155 if (naddr != 1 || nsize != 1)
156 goto err; 156 goto unhandled;
157 157
158 len = getprop(node, "ranges", pci_ranges_buf, 158 len = getprop(node, "ranges", pci_ranges_buf,
159 sizeof(pci_ranges_buf)); 159 sizeof(pci_ranges_buf));
@@ -170,14 +170,20 @@ static void fixup_pci(void)
170 } 170 }
171 171
172 if (!mem || !mmio || !io) 172 if (!mem || !mmio || !io)
173 goto err; 173 goto unhandled;
174 if (mem->size[1] != mmio->size[1])
175 goto unhandled;
176 if (mem->size[1] & (mem->size[1] - 1))
177 goto unhandled;
178 if (io->size[1] & (io->size[1] - 1))
179 goto unhandled;
174 180
175 if (mem->phys_addr + mem->size[1] == mmio->phys_addr) 181 if (mem->phys_addr + mem->size[1] == mmio->phys_addr)
176 mem_base = mem; 182 mem_base = mem;
177 else if (mmio->phys_addr + mmio->size[1] == mem->phys_addr) 183 else if (mmio->phys_addr + mmio->size[1] == mem->phys_addr)
178 mem_base = mmio; 184 mem_base = mmio;
179 else 185 else
180 goto err; 186 goto unhandled;
181 187
182 out_be32(&pci_regs[1][0], mem_base->phys_addr | 1); 188 out_be32(&pci_regs[1][0], mem_base->phys_addr | 1);
183 out_be32(&pci_regs[2][0], ~(mem->size[1] + mmio->size[1] - 1)); 189 out_be32(&pci_regs[2][0], ~(mem->size[1] + mmio->size[1] - 1));
@@ -201,8 +207,9 @@ static void fixup_pci(void)
201 out_le32(&pci_regs[0][58], 0); 207 out_le32(&pci_regs[0][58], 0);
202 out_le32(&pci_regs[0][60], 0); 208 out_le32(&pci_regs[0][60], 0);
203 209
204 mem_log2 = 1 << (__ilog2_u32(bd.bi_memsize - 1) + 1); 210 mem_pow2 = 1 << (__ilog2_u32(bd.bi_memsize - 1) + 1);
205 out_le32(&pci_regs[0][62], 0xa0000000 | ~((1 << (mem_log2 - 12)) - 1)); 211 mem_mask = ~(mem_pow2 - 1) >> 12;
212 out_le32(&pci_regs[0][62], 0xa0000000 | mem_mask);
206 213
207 /* If PCI is disabled, drive RST high to enable. */ 214 /* If PCI is disabled, drive RST high to enable. */
208 if (!(in_le32(&pci_regs[0][32]) & 1)) { 215 if (!(in_le32(&pci_regs[0][32]) & 1)) {
@@ -228,7 +235,11 @@ static void fixup_pci(void)
228 return; 235 return;
229 236
230err: 237err:
231 printf("Bad PCI node\r\n"); 238 printf("Bad PCI node -- using existing firmware setup.\r\n");
239 return;
240
241unhandled:
242 printf("Unsupported PCI node -- using existing firmware setup.\r\n");
232} 243}
233 244
234static void pq2_platform_fixups(void) 245static void pq2_platform_fixups(void)
diff --git a/arch/powerpc/boot/cuboot-rainier.c b/arch/powerpc/boot/cuboot-rainier.c
index cf452b66dce8..0a3fddee54df 100644
--- a/arch/powerpc/boot/cuboot-rainier.c
+++ b/arch/powerpc/boot/cuboot-rainier.c
@@ -42,7 +42,8 @@ static void rainier_fixups(void)
42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); 42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
44 ibm4xx_denali_fixup_memsize(); 44 ibm4xx_denali_fixup_memsize();
45 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); 45 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
46 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
46} 47}
47 48
48void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 49void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
diff --git a/arch/powerpc/boot/cuboot-sequoia.c b/arch/powerpc/boot/cuboot-sequoia.c
index f555575a44de..caf8f2e842ea 100644
--- a/arch/powerpc/boot/cuboot-sequoia.c
+++ b/arch/powerpc/boot/cuboot-sequoia.c
@@ -42,7 +42,8 @@ static void sequoia_fixups(void)
42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); 42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
44 ibm4xx_denali_fixup_memsize(); 44 ibm4xx_denali_fixup_memsize();
45 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); 45 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
46 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
46} 47}
47 48
48void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, 49void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
diff --git a/arch/powerpc/boot/cuboot-taishan.c b/arch/powerpc/boot/cuboot-taishan.c
index b55b80467eed..9bc906a754dd 100644
--- a/arch/powerpc/boot/cuboot-taishan.c
+++ b/arch/powerpc/boot/cuboot-taishan.c
@@ -40,7 +40,8 @@ static void taishan_fixups(void)
40 40
41 ibm4xx_sdram_fixup_memsize(); 41 ibm4xx_sdram_fixup_memsize();
42 42
43 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); 43 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
44 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
44 45
45 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 46 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
46} 47}
diff --git a/arch/powerpc/boot/cuboot-warp.c b/arch/powerpc/boot/cuboot-warp.c
index 3db93e85e9ea..eb108a877492 100644
--- a/arch/powerpc/boot/cuboot-warp.c
+++ b/arch/powerpc/boot/cuboot-warp.c
@@ -24,7 +24,7 @@ static void warp_fixups(void)
24 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); 24 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
25 ibm4xx_sdram_fixup_memsize(); 25 ibm4xx_sdram_fixup_memsize();
26 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 26 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
27 dt_fixup_mac_addresses(&bd.bi_enetaddr); 27 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
28} 28}
29 29
30 30
diff --git a/arch/powerpc/boot/cuboot-yosemite.c b/arch/powerpc/boot/cuboot-yosemite.c
new file mode 100644
index 000000000000..cc6e338c5d0d
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-yosemite.c
@@ -0,0 +1,44 @@
1/*
2 * Old U-boot compatibility for Yosemite
3 *
4 * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
5 *
6 * Copyright 2008 IBM Corporation
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 "ops.h"
14#include "stdio.h"
15#include "4xx.h"
16#include "44x.h"
17#include "cuboot.h"
18
19#define TARGET_4xx
20#define TARGET_44x
21#include "ppcboot.h"
22
23static bd_t bd;
24
25static void yosemite_fixups(void)
26{
27 unsigned long sysclk = 66666666;
28
29 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
30 ibm4xx_sdram_fixup_memsize();
31 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
32 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
33 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
34}
35
36void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
37 unsigned long r6, unsigned long r7)
38{
39 CUBOOT_INIT();
40 platform_ops.fixups = yosemite_fixups;
41 platform_ops.exit = ibm44x_dbcr_reset;
42 fdt_init(_dtb_start);
43 serial_console_init();
44}
diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
index 60f561e307a9..5d12336dc360 100644
--- a/arch/powerpc/boot/devtree.c
+++ b/arch/powerpc/boot/devtree.c
@@ -350,3 +350,23 @@ int dt_is_compatible(void *node, const char *compat)
350 350
351 return 0; 351 return 0;
352} 352}
353
354int dt_get_virtual_reg(void *node, void **addr, int nres)
355{
356 unsigned long xaddr;
357 int n;
358
359 n = getprop(node, "virtual-reg", addr, nres * 4);
360 if (n > 0)
361 return n / 4;
362
363 for (n = 0; n < nres; n++) {
364 if (!dt_xlate_reg(node, n, &xaddr, NULL))
365 break;
366
367 addr[n] = (void *)xaddr;
368 }
369
370 return n;
371}
372
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts
index 7dc37c9a7446..ba2521bdaab1 100644
--- a/arch/powerpc/boot/dts/bamboo.dts
+++ b/arch/powerpc/boot/dts/bamboo.dts
@@ -204,7 +204,6 @@
204 }; 204 };
205 205
206 EMAC0: ethernet@ef600e00 { 206 EMAC0: ethernet@ef600e00 {
207 linux,network-index = <0>;
208 device_type = "network"; 207 device_type = "network";
209 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; 208 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
210 interrupt-parent = <&UIC1>; 209 interrupt-parent = <&UIC1>;
@@ -225,7 +224,6 @@
225 }; 224 };
226 225
227 EMAC1: ethernet@ef600f00 { 226 EMAC1: ethernet@ef600f00 {
228 linux,network-index = <1>;
229 device_type = "network"; 227 device_type = "network";
230 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; 228 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
231 interrupt-parent = <&UIC1>; 229 interrupt-parent = <&UIC1>;
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
new file mode 100644
index 000000000000..6f3d38a1554f
--- /dev/null
+++ b/arch/powerpc/boot/dts/canyonlands.dts
@@ -0,0 +1,402 @@
1/*
2 * Device Tree Source for AMCC Canyonlands (460EX)
3 *
4 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without
8 * any warranty of any kind, whether express or implied.
9 */
10
11/ {
12 #address-cells = <2>;
13 #size-cells = <1>;
14 model = "amcc,canyonlands";
15 compatible = "amcc,canyonlands";
16 dcr-parent = <&/cpus/cpu@0>;
17
18 aliases {
19 ethernet0 = &EMAC0;
20 ethernet1 = &EMAC1;
21 serial0 = &UART0;
22 serial1 = &UART1;
23 };
24
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 cpu@0 {
30 device_type = "cpu";
31 model = "PowerPC,460EX";
32 reg = <0>;
33 clock-frequency = <0>; /* Filled in by U-Boot */
34 timebase-frequency = <0>; /* Filled in by U-Boot */
35 i-cache-line-size = <20>;
36 d-cache-line-size = <20>;
37 i-cache-size = <8000>;
38 d-cache-size = <8000>;
39 dcr-controller;
40 dcr-access-method = "native";
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0 0 0>; /* Filled in by U-Boot */
47 };
48
49 UIC0: interrupt-controller0 {
50 compatible = "ibm,uic-460ex","ibm,uic";
51 interrupt-controller;
52 cell-index = <0>;
53 dcr-reg = <0c0 009>;
54 #address-cells = <0>;
55 #size-cells = <0>;
56 #interrupt-cells = <2>;
57 };
58
59 UIC1: interrupt-controller1 {
60 compatible = "ibm,uic-460ex","ibm,uic";
61 interrupt-controller;
62 cell-index = <1>;
63 dcr-reg = <0d0 009>;
64 #address-cells = <0>;
65 #size-cells = <0>;
66 #interrupt-cells = <2>;
67 interrupts = <1e 4 1f 4>; /* cascade */
68 interrupt-parent = <&UIC0>;
69 };
70
71 UIC2: interrupt-controller2 {
72 compatible = "ibm,uic-460ex","ibm,uic";
73 interrupt-controller;
74 cell-index = <2>;
75 dcr-reg = <0e0 009>;
76 #address-cells = <0>;
77 #size-cells = <0>;
78 #interrupt-cells = <2>;
79 interrupts = <a 4 b 4>; /* cascade */
80 interrupt-parent = <&UIC0>;
81 };
82
83 UIC3: interrupt-controller3 {
84 compatible = "ibm,uic-460ex","ibm,uic";
85 interrupt-controller;
86 cell-index = <3>;
87 dcr-reg = <0f0 009>;
88 #address-cells = <0>;
89 #size-cells = <0>;
90 #interrupt-cells = <2>;
91 interrupts = <10 4 11 4>; /* cascade */
92 interrupt-parent = <&UIC0>;
93 };
94
95 SDR0: sdr {
96 compatible = "ibm,sdr-460ex";
97 dcr-reg = <00e 002>;
98 };
99
100 CPR0: cpr {
101 compatible = "ibm,cpr-460ex";
102 dcr-reg = <00c 002>;
103 };
104
105 plb {
106 compatible = "ibm,plb-460ex", "ibm,plb4";
107 #address-cells = <2>;
108 #size-cells = <1>;
109 ranges;
110 clock-frequency = <0>; /* Filled in by U-Boot */
111
112 SDRAM0: sdram {
113 compatible = "ibm,sdram-460ex", "ibm,sdram-405gp";
114 dcr-reg = <010 2>;
115 };
116
117 MAL0: mcmal {
118 compatible = "ibm,mcmal-460ex", "ibm,mcmal2";
119 dcr-reg = <180 62>;
120 num-tx-chans = <2>;
121 num-rx-chans = <10>;
122 #address-cells = <0>;
123 #size-cells = <0>;
124 interrupt-parent = <&UIC2>;
125 interrupts = < /*TXEOB*/ 6 4
126 /*RXEOB*/ 7 4
127 /*SERR*/ 3 4
128 /*TXDE*/ 4 4
129 /*RXDE*/ 5 4>;
130 };
131
132 POB0: opb {
133 compatible = "ibm,opb-460ex", "ibm,opb";
134 #address-cells = <1>;
135 #size-cells = <1>;
136 ranges = <b0000000 4 b0000000 50000000>;
137 clock-frequency = <0>; /* Filled in by U-Boot */
138
139 EBC0: ebc {
140 compatible = "ibm,ebc-460ex", "ibm,ebc";
141 dcr-reg = <012 2>;
142 #address-cells = <2>;
143 #size-cells = <1>;
144 clock-frequency = <0>; /* Filled in by U-Boot */
145 interrupts = <6 4>;
146 interrupt-parent = <&UIC1>;
147 };
148
149 UART0: serial@ef600300 {
150 device_type = "serial";
151 compatible = "ns16550";
152 reg = <ef600300 8>;
153 virtual-reg = <ef600300>;
154 clock-frequency = <0>; /* Filled in by U-Boot */
155 current-speed = <0>; /* Filled in by U-Boot */
156 interrupt-parent = <&UIC1>;
157 interrupts = <1 4>;
158 };
159
160 UART1: serial@ef600400 {
161 device_type = "serial";
162 compatible = "ns16550";
163 reg = <ef600400 8>;
164 virtual-reg = <ef600400>;
165 clock-frequency = <0>; /* Filled in by U-Boot */
166 current-speed = <0>; /* Filled in by U-Boot */
167 interrupt-parent = <&UIC0>;
168 interrupts = <1 4>;
169 };
170
171 UART2: serial@ef600500 {
172 device_type = "serial";
173 compatible = "ns16550";
174 reg = <ef600500 8>;
175 virtual-reg = <ef600500>;
176 clock-frequency = <0>; /* Filled in by U-Boot */
177 current-speed = <0>; /* Filled in by U-Boot */
178 interrupt-parent = <&UIC1>;
179 interrupts = <1d 4>;
180 };
181
182 UART3: serial@ef600600 {
183 device_type = "serial";
184 compatible = "ns16550";
185 reg = <ef600600 8>;
186 virtual-reg = <ef600600>;
187 clock-frequency = <0>; /* Filled in by U-Boot */
188 current-speed = <0>; /* Filled in by U-Boot */
189 interrupt-parent = <&UIC1>;
190 interrupts = <1e 4>;
191 };
192
193 IIC0: i2c@ef600700 {
194 compatible = "ibm,iic-460ex", "ibm,iic";
195 reg = <ef600700 14>;
196 interrupt-parent = <&UIC0>;
197 interrupts = <2 4>;
198 };
199
200 IIC1: i2c@ef600800 {
201 compatible = "ibm,iic-460ex", "ibm,iic";
202 reg = <ef600800 14>;
203 interrupt-parent = <&UIC0>;
204 interrupts = <3 4>;
205 };
206
207 ZMII0: emac-zmii@ef600d00 {
208 compatible = "ibm,zmii-460ex", "ibm,zmii";
209 reg = <ef600d00 c>;
210 };
211
212 RGMII0: emac-rgmii@ef601500 {
213 compatible = "ibm,rgmii-460ex", "ibm,rgmii";
214 reg = <ef601500 8>;
215 has-mdio;
216 };
217
218 TAH0: emac-tah@ef601350 {
219 compatible = "ibm,tah-460ex", "ibm,tah";
220 reg = <ef601350 30>;
221 };
222
223 TAH1: emac-tah@ef601450 {
224 compatible = "ibm,tah-460ex", "ibm,tah";
225 reg = <ef601450 30>;
226 };
227
228 EMAC0: ethernet@ef600e00 {
229 device_type = "network";
230 compatible = "ibm,emac-460ex", "ibm,emac4";
231 interrupt-parent = <&EMAC0>;
232 interrupts = <0 1>;
233 #interrupt-cells = <1>;
234 #address-cells = <0>;
235 #size-cells = <0>;
236 interrupt-map = </*Status*/ 0 &UIC2 10 4
237 /*Wake*/ 1 &UIC2 14 4>;
238 reg = <ef600e00 70>;
239 local-mac-address = [000000000000]; /* Filled in by U-Boot */
240 mal-device = <&MAL0>;
241 mal-tx-channel = <0>;
242 mal-rx-channel = <0>;
243 cell-index = <0>;
244 max-frame-size = <2328>;
245 rx-fifo-size = <1000>;
246 tx-fifo-size = <800>;
247 phy-mode = "rgmii";
248 phy-map = <00000000>;
249 rgmii-device = <&RGMII0>;
250 rgmii-channel = <0>;
251 tah-device = <&TAH0>;
252 tah-channel = <0>;
253 has-inverted-stacr-oc;
254 has-new-stacr-staopc;
255 };
256
257 EMAC1: ethernet@ef600f00 {
258 device_type = "network";
259 compatible = "ibm,emac-460ex", "ibm,emac4";
260 interrupt-parent = <&EMAC1>;
261 interrupts = <0 1>;
262 #interrupt-cells = <1>;
263 #address-cells = <0>;
264 #size-cells = <0>;
265 interrupt-map = </*Status*/ 0 &UIC2 11 4
266 /*Wake*/ 1 &UIC2 15 4>;
267 reg = <ef600f00 70>;
268 local-mac-address = [000000000000]; /* Filled in by U-Boot */
269 mal-device = <&MAL0>;
270 mal-tx-channel = <1>;
271 mal-rx-channel = <8>;
272 cell-index = <1>;
273 max-frame-size = <2328>;
274 rx-fifo-size = <1000>;
275 tx-fifo-size = <800>;
276 phy-mode = "rgmii";
277 phy-map = <00000000>;
278 rgmii-device = <&RGMII0>;
279 rgmii-channel = <1>;
280 tah-device = <&TAH1>;
281 tah-channel = <1>;
282 has-inverted-stacr-oc;
283 has-new-stacr-staopc;
284 mdio-device = <&EMAC0>;
285 };
286 };
287
288 PCIX0: pci@c0ec00000 {
289 device_type = "pci";
290 #interrupt-cells = <1>;
291 #size-cells = <2>;
292 #address-cells = <3>;
293 compatible = "ibm,plb-pcix-460ex", "ibm,plb-pcix";
294 primary;
295 large-inbound-windows;
296 enable-msi-hole;
297 reg = <c 0ec00000 8 /* Config space access */
298 0 0 0 /* no IACK cycles */
299 c 0ed00000 4 /* Special cycles */
300 c 0ec80000 100 /* Internal registers */
301 c 0ec80100 fc>; /* Internal messaging registers */
302
303 /* Outbound ranges, one memory and one IO,
304 * later cannot be changed
305 */
306 ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
307 01000000 0 00000000 0000000c 08000000 0 00010000>;
308
309 /* Inbound 2GB range starting at 0 */
310 dma-ranges = <42000000 0 0 0 0 0 80000000>;
311
312 /* This drives busses 0 to 0x3f */
313 bus-range = <0 3f>;
314
315 /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */
316 interrupt-map-mask = <0000 0 0 0>;
317 interrupt-map = < 0000 0 0 0 &UIC1 0 8 >;
318 };
319
320 PCIE0: pciex@d00000000 {
321 device_type = "pci";
322 #interrupt-cells = <1>;
323 #size-cells = <2>;
324 #address-cells = <3>;
325 compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex";
326 primary;
327 port = <0>; /* port number */
328 reg = <d 00000000 20000000 /* Config space access */
329 c 08010000 00001000>; /* Registers */
330 dcr-reg = <100 020>;
331 sdr-base = <300>;
332
333 /* Outbound ranges, one memory and one IO,
334 * later cannot be changed
335 */
336 ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
337 01000000 0 00000000 0000000f 80000000 0 00010000>;
338
339 /* Inbound 2GB range starting at 0 */
340 dma-ranges = <42000000 0 0 0 0 0 80000000>;
341
342 /* This drives busses 40 to 0x7f */
343 bus-range = <40 7f>;
344
345 /* Legacy interrupts (note the weird polarity, the bridge seems
346 * to invert PCIe legacy interrupts).
347 * We are de-swizzling here because the numbers are actually for
348 * port of the root complex virtual P2P bridge. But I want
349 * to avoid putting a node for it in the tree, so the numbers
350 * below are basically de-swizzled numbers.
351 * The real slot is on idsel 0, so the swizzling is 1:1
352 */
353 interrupt-map-mask = <0000 0 0 7>;
354 interrupt-map = <
355 0000 0 0 1 &UIC3 c 4 /* swizzled int A */
356 0000 0 0 2 &UIC3 d 4 /* swizzled int B */
357 0000 0 0 3 &UIC3 e 4 /* swizzled int C */
358 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>;
359 };
360
361 PCIE1: pciex@d20000000 {
362 device_type = "pci";
363 #interrupt-cells = <1>;
364 #size-cells = <2>;
365 #address-cells = <3>;
366 compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex";
367 primary;
368 port = <1>; /* port number */
369 reg = <d 20000000 20000000 /* Config space access */
370 c 08011000 00001000>; /* Registers */
371 dcr-reg = <120 020>;
372 sdr-base = <340>;
373
374 /* Outbound ranges, one memory and one IO,
375 * later cannot be changed
376 */
377 ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
378 01000000 0 00000000 0000000f 80010000 0 00010000>;
379
380 /* Inbound 2GB range starting at 0 */
381 dma-ranges = <42000000 0 0 0 0 0 80000000>;
382
383 /* This drives busses 80 to 0xbf */
384 bus-range = <80 bf>;
385
386 /* Legacy interrupts (note the weird polarity, the bridge seems
387 * to invert PCIe legacy interrupts).
388 * We are de-swizzling here because the numbers are actually for
389 * port of the root complex virtual P2P bridge. But I want
390 * to avoid putting a node for it in the tree, so the numbers
391 * below are basically de-swizzled numbers.
392 * The real slot is on idsel 0, so the swizzling is 1:1
393 */
394 interrupt-map-mask = <0000 0 0 7>;
395 interrupt-map = <
396 0000 0 0 1 &UIC3 10 4 /* swizzled int A */
397 0000 0 0 2 &UIC3 11 4 /* swizzled int B */
398 0000 0 0 3 &UIC3 12 4 /* swizzled int C */
399 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>;
400 };
401 };
402};
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts
index 0b000cb7ed8b..5079dc890e0e 100644
--- a/arch/powerpc/boot/dts/ebony.dts
+++ b/arch/powerpc/boot/dts/ebony.dts
@@ -241,7 +241,6 @@
241 }; 241 };
242 242
243 EMAC0: ethernet@40000800 { 243 EMAC0: ethernet@40000800 {
244 linux,network-index = <0>;
245 device_type = "network"; 244 device_type = "network";
246 compatible = "ibm,emac-440gp", "ibm,emac"; 245 compatible = "ibm,emac-440gp", "ibm,emac";
247 interrupt-parent = <&UIC1>; 246 interrupt-parent = <&UIC1>;
@@ -261,7 +260,6 @@
261 zmii-channel = <0>; 260 zmii-channel = <0>;
262 }; 261 };
263 EMAC1: ethernet@40000900 { 262 EMAC1: ethernet@40000900 {
264 linux,network-index = <1>;
265 device_type = "network"; 263 device_type = "network";
266 compatible = "ibm,emac-440gp", "ibm,emac"; 264 compatible = "ibm,emac-440gp", "ibm,emac";
267 interrupt-parent = <&UIC1>; 265 interrupt-parent = <&UIC1>;
diff --git a/arch/powerpc/boot/dts/ep8248e.dts b/arch/powerpc/boot/dts/ep8248e.dts
index 5d2fb76a72c1..756758fb5b7b 100644
--- a/arch/powerpc/boot/dts/ep8248e.dts
+++ b/arch/powerpc/boot/dts/ep8248e.dts
@@ -121,8 +121,7 @@
121 121
122 data@0 { 122 data@0 {
123 compatible = "fsl,cpm-muram-data"; 123 compatible = "fsl,cpm-muram-data";
124 reg = <0 0x1100 0x1140 124 reg = <0 0x2000 0x9800 0x800>;
125 0xec0 0x9800 0x800>;
126 }; 125 };
127 }; 126 };
128 127
@@ -138,7 +137,7 @@
138 device_type = "serial"; 137 device_type = "serial";
139 compatible = "fsl,mpc8248-smc-uart", 138 compatible = "fsl,mpc8248-smc-uart",
140 "fsl,cpm2-smc-uart"; 139 "fsl,cpm2-smc-uart";
141 reg = <0x11a80 0x20 0x1100 0x40>; 140 reg = <0x11a80 0x20 0x87fc 2>;
142 interrupts = <4 8>; 141 interrupts = <4 8>;
143 interrupt-parent = <&PIC>; 142 interrupt-parent = <&PIC>;
144 fsl,cpm-brg = <7>; 143 fsl,cpm-brg = <7>;
diff --git a/arch/powerpc/boot/dts/ep88xc.dts b/arch/powerpc/boot/dts/ep88xc.dts
index 02705f299790..ae57d6240120 100644
--- a/arch/powerpc/boot/dts/ep88xc.dts
+++ b/arch/powerpc/boot/dts/ep88xc.dts
@@ -2,7 +2,7 @@
2 * EP88xC Device Tree Source 2 * EP88xC Device Tree Source
3 * 3 *
4 * Copyright 2006 MontaVista Software, Inc. 4 * Copyright 2006 MontaVista Software, Inc.
5 * Copyright 2007 Freescale Semiconductor, Inc. 5 * Copyright 2007,2008 Freescale Semiconductor, Inc.
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
8 * under the terms of the GNU General Public License as published by the 8 * under the terms of the GNU General Public License as published by the
@@ -10,6 +10,7 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/dts-v1/;
13 14
14/ { 15/ {
15 model = "EP88xC"; 16 model = "EP88xC";
@@ -23,44 +24,44 @@
23 24
24 PowerPC,885@0 { 25 PowerPC,885@0 {
25 device_type = "cpu"; 26 device_type = "cpu";
26 reg = <0>; 27 reg = <0x0>;
27 d-cache-line-size = <d#16>; 28 d-cache-line-size = <16>;
28 i-cache-line-size = <d#16>; 29 i-cache-line-size = <16>;
29 d-cache-size = <d#8192>; 30 d-cache-size = <8192>;
30 i-cache-size = <d#8192>; 31 i-cache-size = <8192>;
31 timebase-frequency = <0>; 32 timebase-frequency = <0>;
32 bus-frequency = <0>; 33 bus-frequency = <0>;
33 clock-frequency = <0>; 34 clock-frequency = <0>;
34 interrupts = <f 2>; // decrementer interrupt 35 interrupts = <15 2>; // decrementer interrupt
35 interrupt-parent = <&PIC>; 36 interrupt-parent = <&PIC>;
36 }; 37 };
37 }; 38 };
38 39
39 memory { 40 memory {
40 device_type = "memory"; 41 device_type = "memory";
41 reg = <0 0>; 42 reg = <0x0 0x0>;
42 }; 43 };
43 44
44 localbus@fa200100 { 45 localbus@fa200100 {
45 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus"; 46 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus";
46 #address-cells = <2>; 47 #address-cells = <2>;
47 #size-cells = <1>; 48 #size-cells = <1>;
48 reg = <fa200100 40>; 49 reg = <0xfa200100 0x40>;
49 50
50 ranges = < 51 ranges = <
51 0 0 fc000000 04000000 52 0x0 0x0 0xfc000000 0x4000000
52 3 0 fa000000 01000000 53 0x3 0x0 0xfa000000 0x1000000
53 >; 54 >;
54 55
55 flash@0,2000000 { 56 flash@0,2000000 {
56 compatible = "cfi-flash"; 57 compatible = "cfi-flash";
57 reg = <0 2000000 2000000>; 58 reg = <0x0 0x2000000 0x2000000>;
58 bank-width = <4>; 59 bank-width = <4>;
59 device-width = <2>; 60 device-width = <2>;
60 }; 61 };
61 62
62 board-control@3,400000 { 63 board-control@3,400000 {
63 reg = <3 400000 10>; 64 reg = <0x3 0x400000 0x10>;
64 compatible = "fsl,ep88xc-bcsr"; 65 compatible = "fsl,ep88xc-bcsr";
65 }; 66 };
66 }; 67 };
@@ -70,25 +71,25 @@
70 #address-cells = <1>; 71 #address-cells = <1>;
71 #size-cells = <1>; 72 #size-cells = <1>;
72 device_type = "soc"; 73 device_type = "soc";
73 ranges = <0 fa200000 00004000>; 74 ranges = <0x0 0xfa200000 0x4000>;
74 bus-frequency = <0>; 75 bus-frequency = <0>;
75 76
76 // Temporary -- will go away once kernel uses ranges for get_immrbase(). 77 // Temporary -- will go away once kernel uses ranges for get_immrbase().
77 reg = <fa200000 4000>; 78 reg = <0xfa200000 0x4000>;
78 79
79 mdio@e00 { 80 mdio@e00 {
80 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio"; 81 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
81 reg = <e00 188>; 82 reg = <0xe00 0x188>;
82 #address-cells = <1>; 83 #address-cells = <1>;
83 #size-cells = <0>; 84 #size-cells = <0>;
84 85
85 PHY0: ethernet-phy@0 { 86 PHY0: ethernet-phy@0 {
86 reg = <0>; 87 reg = <0x0>;
87 device_type = "ethernet-phy"; 88 device_type = "ethernet-phy";
88 }; 89 };
89 90
90 PHY1: ethernet-phy@1 { 91 PHY1: ethernet-phy@1 {
91 reg = <1>; 92 reg = <0x1>;
92 device_type = "ethernet-phy"; 93 device_type = "ethernet-phy";
93 }; 94 };
94 }; 95 };
@@ -97,7 +98,7 @@
97 device_type = "network"; 98 device_type = "network";
98 compatible = "fsl,mpc885-fec-enet", 99 compatible = "fsl,mpc885-fec-enet",
99 "fsl,pq1-fec-enet"; 100 "fsl,pq1-fec-enet";
100 reg = <e00 188>; 101 reg = <0xe00 0x188>;
101 local-mac-address = [ 00 00 00 00 00 00 ]; 102 local-mac-address = [ 00 00 00 00 00 00 ];
102 interrupts = <3 1>; 103 interrupts = <3 1>;
103 interrupt-parent = <&PIC>; 104 interrupt-parent = <&PIC>;
@@ -109,7 +110,7 @@
109 device_type = "network"; 110 device_type = "network";
110 compatible = "fsl,mpc885-fec-enet", 111 compatible = "fsl,mpc885-fec-enet",
111 "fsl,pq1-fec-enet"; 112 "fsl,pq1-fec-enet";
112 reg = <1e00 188>; 113 reg = <0x1e00 0x188>;
113 local-mac-address = [ 00 00 00 00 00 00 ]; 114 local-mac-address = [ 00 00 00 00 00 00 ];
114 interrupts = <7 1>; 115 interrupts = <7 1>;
115 interrupt-parent = <&PIC>; 116 interrupt-parent = <&PIC>;
@@ -120,7 +121,7 @@
120 PIC: interrupt-controller@0 { 121 PIC: interrupt-controller@0 {
121 interrupt-controller; 122 interrupt-controller;
122 #interrupt-cells = <2>; 123 #interrupt-cells = <2>;
123 reg = <0 24>; 124 reg = <0x0 0x24>;
124 compatible = "fsl,mpc885-pic", "fsl,pq1-pic"; 125 compatible = "fsl,mpc885-pic", "fsl,pq1-pic";
125 }; 126 };
126 127
@@ -130,29 +131,29 @@
130 #size-cells = <2>; 131 #size-cells = <2>;
131 compatible = "fsl,pq-pcmcia"; 132 compatible = "fsl,pq-pcmcia";
132 device_type = "pcmcia"; 133 device_type = "pcmcia";
133 reg = <80 80>; 134 reg = <0x80 0x80>;
134 interrupt-parent = <&PIC>; 135 interrupt-parent = <&PIC>;
135 interrupts = <d 1>; 136 interrupts = <13 1>;
136 }; 137 };
137 138
138 cpm@9c0 { 139 cpm@9c0 {
139 #address-cells = <1>; 140 #address-cells = <1>;
140 #size-cells = <1>; 141 #size-cells = <1>;
141 compatible = "fsl,mpc885-cpm", "fsl,cpm1"; 142 compatible = "fsl,mpc885-cpm", "fsl,cpm1";
142 command-proc = <9c0>; 143 command-proc = <0x9c0>;
143 interrupts = <0>; // cpm error interrupt 144 interrupts = <0>; // cpm error interrupt
144 interrupt-parent = <&CPM_PIC>; 145 interrupt-parent = <&CPM_PIC>;
145 reg = <9c0 40>; 146 reg = <0x9c0 0x40>;
146 ranges; 147 ranges;
147 148
148 muram@2000 { 149 muram@2000 {
149 #address-cells = <1>; 150 #address-cells = <1>;
150 #size-cells = <1>; 151 #size-cells = <1>;
151 ranges = <0 2000 2000>; 152 ranges = <0x0 0x2000 0x2000>;
152 153
153 data@0 { 154 data@0 {
154 compatible = "fsl,cpm-muram-data"; 155 compatible = "fsl,cpm-muram-data";
155 reg = <0 1c00>; 156 reg = <0x0 0x1c00>;
156 }; 157 };
157 }; 158 };
158 159
@@ -160,7 +161,7 @@
160 compatible = "fsl,mpc885-brg", 161 compatible = "fsl,mpc885-brg",
161 "fsl,cpm1-brg", 162 "fsl,cpm1-brg",
162 "fsl,cpm-brg"; 163 "fsl,cpm-brg";
163 reg = <9f0 10>; 164 reg = <0x9f0 0x10>;
164 }; 165 };
165 166
166 CPM_PIC: interrupt-controller@930 { 167 CPM_PIC: interrupt-controller@930 {
@@ -168,7 +169,7 @@
168 #interrupt-cells = <1>; 169 #interrupt-cells = <1>;
169 interrupts = <5 2 0 2>; 170 interrupts = <5 2 0 2>;
170 interrupt-parent = <&PIC>; 171 interrupt-parent = <&PIC>;
171 reg = <930 20>; 172 reg = <0x930 0x20>;
172 compatible = "fsl,mpc885-cpm-pic", 173 compatible = "fsl,mpc885-cpm-pic",
173 "fsl,cpm1-pic"; 174 "fsl,cpm1-pic";
174 }; 175 };
@@ -178,11 +179,11 @@
178 device_type = "serial"; 179 device_type = "serial";
179 compatible = "fsl,mpc885-smc-uart", 180 compatible = "fsl,mpc885-smc-uart",
180 "fsl,cpm1-smc-uart"; 181 "fsl,cpm1-smc-uart";
181 reg = <a80 10 3e80 40>; 182 reg = <0xa80 0x10 0x3e80 0x40>;
182 interrupts = <4>; 183 interrupts = <4>;
183 interrupt-parent = <&CPM_PIC>; 184 interrupt-parent = <&CPM_PIC>;
184 fsl,cpm-brg = <1>; 185 fsl,cpm-brg = <1>;
185 fsl,cpm-command = <0090>; 186 fsl,cpm-command = <0x90>;
186 linux,planetcore-label = "SMC1"; 187 linux,planetcore-label = "SMC1";
187 }; 188 };
188 189
@@ -191,11 +192,11 @@
191 device_type = "serial"; 192 device_type = "serial";
192 compatible = "fsl,mpc885-scc-uart", 193 compatible = "fsl,mpc885-scc-uart",
193 "fsl,cpm1-scc-uart"; 194 "fsl,cpm1-scc-uart";
194 reg = <a20 20 3d00 80>; 195 reg = <0xa20 0x20 0x3d00 0x80>;
195 interrupts = <1d>; 196 interrupts = <29>;
196 interrupt-parent = <&CPM_PIC>; 197 interrupt-parent = <&CPM_PIC>;
197 fsl,cpm-brg = <2>; 198 fsl,cpm-brg = <2>;
198 fsl,cpm-command = <0040>; 199 fsl,cpm-command = <0x40>;
199 linux,planetcore-label = "SCC2"; 200 linux,planetcore-label = "SCC2";
200 }; 201 };
201 202
@@ -204,9 +205,9 @@
204 #size-cells = <0>; 205 #size-cells = <0>;
205 compatible = "fsl,mpc885-usb", 206 compatible = "fsl,mpc885-usb",
206 "fsl,cpm1-usb"; 207 "fsl,cpm1-usb";
207 reg = <a00 18 1c00 80>; 208 reg = <0xa00 0x18 0x1c00 0x80>;
208 interrupt-parent = <&CPM_PIC>; 209 interrupt-parent = <&CPM_PIC>;
209 interrupts = <1e>; 210 interrupts = <30>;
210 fsl,cpm-command = <0000>; 211 fsl,cpm-command = <0000>;
211 }; 212 };
212 }; 213 };
diff --git a/arch/powerpc/boot/dts/glacier.dts b/arch/powerpc/boot/dts/glacier.dts
new file mode 100644
index 000000000000..958a5ca53d35
--- /dev/null
+++ b/arch/powerpc/boot/dts/glacier.dts
@@ -0,0 +1,467 @@
1/*
2 * Device Tree Source for AMCC Glacier (460GT)
3 *
4 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without
8 * any warranty of any kind, whether express or implied.
9 */
10
11/ {
12 #address-cells = <2>;
13 #size-cells = <1>;
14 model = "amcc,glacier";
15 compatible = "amcc,glacier", "amcc,canyonlands";
16 dcr-parent = <&/cpus/cpu@0>;
17
18 aliases {
19 ethernet0 = &EMAC0;
20 ethernet1 = &EMAC1;
21 ethernet2 = &EMAC2;
22 ethernet3 = &EMAC3;
23 serial0 = &UART0;
24 serial1 = &UART1;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 cpu@0 {
32 device_type = "cpu";
33 model = "PowerPC,460GT";
34 reg = <0>;
35 clock-frequency = <0>; /* Filled in by U-Boot */
36 timebase-frequency = <0>; /* Filled in by U-Boot */
37 i-cache-line-size = <20>;
38 d-cache-line-size = <20>;
39 i-cache-size = <8000>;
40 d-cache-size = <8000>;
41 dcr-controller;
42 dcr-access-method = "native";
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0 0 0>; /* Filled in by U-Boot */
49 };
50
51 UIC0: interrupt-controller0 {
52 compatible = "ibm,uic-460gt","ibm,uic";
53 interrupt-controller;
54 cell-index = <0>;
55 dcr-reg = <0c0 009>;
56 #address-cells = <0>;
57 #size-cells = <0>;
58 #interrupt-cells = <2>;
59 };
60
61 UIC1: interrupt-controller1 {
62 compatible = "ibm,uic-460gt","ibm,uic";
63 interrupt-controller;
64 cell-index = <1>;
65 dcr-reg = <0d0 009>;
66 #address-cells = <0>;
67 #size-cells = <0>;
68 #interrupt-cells = <2>;
69 interrupts = <1e 4 1f 4>; /* cascade */
70 interrupt-parent = <&UIC0>;
71 };
72
73 UIC2: interrupt-controller2 {
74 compatible = "ibm,uic-460gt","ibm,uic";
75 interrupt-controller;
76 cell-index = <2>;
77 dcr-reg = <0e0 009>;
78 #address-cells = <0>;
79 #size-cells = <0>;
80 #interrupt-cells = <2>;
81 interrupts = <a 4 b 4>; /* cascade */
82 interrupt-parent = <&UIC0>;
83 };
84
85 UIC3: interrupt-controller3 {
86 compatible = "ibm,uic-460gt","ibm,uic";
87 interrupt-controller;
88 cell-index = <3>;
89 dcr-reg = <0f0 009>;
90 #address-cells = <0>;
91 #size-cells = <0>;
92 #interrupt-cells = <2>;
93 interrupts = <10 4 11 4>; /* cascade */
94 interrupt-parent = <&UIC0>;
95 };
96
97 SDR0: sdr {
98 compatible = "ibm,sdr-460gt";
99 dcr-reg = <00e 002>;
100 };
101
102 CPR0: cpr {
103 compatible = "ibm,cpr-460gt";
104 dcr-reg = <00c 002>;
105 };
106
107 plb {
108 compatible = "ibm,plb-460gt", "ibm,plb4";
109 #address-cells = <2>;
110 #size-cells = <1>;
111 ranges;
112 clock-frequency = <0>; /* Filled in by U-Boot */
113
114 SDRAM0: sdram {
115 compatible = "ibm,sdram-460gt", "ibm,sdram-405gp";
116 dcr-reg = <010 2>;
117 };
118
119 MAL0: mcmal {
120 compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
121 dcr-reg = <180 62>;
122 num-tx-chans = <4>;
123 num-rx-chans = <20>;
124 #address-cells = <0>;
125 #size-cells = <0>;
126 interrupt-parent = <&UIC2>;
127 interrupts = < /*TXEOB*/ 6 4
128 /*RXEOB*/ 7 4
129 /*SERR*/ 3 4
130 /*TXDE*/ 4 4
131 /*RXDE*/ 5 4>;
132 desc-base-addr-high = <8>;
133 };
134
135 POB0: opb {
136 compatible = "ibm,opb-460gt", "ibm,opb";
137 #address-cells = <1>;
138 #size-cells = <1>;
139 ranges = <b0000000 4 b0000000 50000000>;
140 clock-frequency = <0>; /* Filled in by U-Boot */
141
142 EBC0: ebc {
143 compatible = "ibm,ebc-460gt", "ibm,ebc";
144 dcr-reg = <012 2>;
145 #address-cells = <2>;
146 #size-cells = <1>;
147 clock-frequency = <0>; /* Filled in by U-Boot */
148 interrupts = <6 4>;
149 interrupt-parent = <&UIC1>;
150 };
151
152 UART0: serial@ef600300 {
153 device_type = "serial";
154 compatible = "ns16550";
155 reg = <ef600300 8>;
156 virtual-reg = <ef600300>;
157 clock-frequency = <0>; /* Filled in by U-Boot */
158 current-speed = <0>; /* Filled in by U-Boot */
159 interrupt-parent = <&UIC1>;
160 interrupts = <1 4>;
161 };
162
163 UART1: serial@ef600400 {
164 device_type = "serial";
165 compatible = "ns16550";
166 reg = <ef600400 8>;
167 virtual-reg = <ef600400>;
168 clock-frequency = <0>; /* Filled in by U-Boot */
169 current-speed = <0>; /* Filled in by U-Boot */
170 interrupt-parent = <&UIC0>;
171 interrupts = <1 4>;
172 };
173
174 UART2: serial@ef600500 {
175 device_type = "serial";
176 compatible = "ns16550";
177 reg = <ef600500 8>;
178 virtual-reg = <ef600500>;
179 clock-frequency = <0>; /* Filled in by U-Boot */
180 current-speed = <0>; /* Filled in by U-Boot */
181 interrupt-parent = <&UIC1>;
182 interrupts = <1d 4>;
183 };
184
185 UART3: serial@ef600600 {
186 device_type = "serial";
187 compatible = "ns16550";
188 reg = <ef600600 8>;
189 virtual-reg = <ef600600>;
190 clock-frequency = <0>; /* Filled in by U-Boot */
191 current-speed = <0>; /* Filled in by U-Boot */
192 interrupt-parent = <&UIC1>;
193 interrupts = <1e 4>;
194 };
195
196 IIC0: i2c@ef600700 {
197 compatible = "ibm,iic-460gt", "ibm,iic";
198 reg = <ef600700 14>;
199 interrupt-parent = <&UIC0>;
200 interrupts = <2 4>;
201 };
202
203 IIC1: i2c@ef600800 {
204 compatible = "ibm,iic-460gt", "ibm,iic";
205 reg = <ef600800 14>;
206 interrupt-parent = <&UIC0>;
207 interrupts = <3 4>;
208 };
209
210 ZMII0: emac-zmii@ef600d00 {
211 compatible = "ibm,zmii-460gt", "ibm,zmii";
212 reg = <ef600d00 c>;
213 };
214
215 RGMII0: emac-rgmii@ef601500 {
216 compatible = "ibm,rgmii-460gt", "ibm,rgmii";
217 reg = <ef601500 8>;
218 has-mdio;
219 };
220
221 RGMII1: emac-rgmii@ef601600 {
222 compatible = "ibm,rgmii-460gt", "ibm,rgmii";
223 reg = <ef601600 8>;
224 has-mdio;
225 };
226
227 TAH0: emac-tah@ef601350 {
228 compatible = "ibm,tah-460gt", "ibm,tah";
229 reg = <ef601350 30>;
230 };
231
232 TAH1: emac-tah@ef601450 {
233 compatible = "ibm,tah-460gt", "ibm,tah";
234 reg = <ef601450 30>;
235 };
236
237 EMAC0: ethernet@ef600e00 {
238 device_type = "network";
239 compatible = "ibm,emac-460gt", "ibm,emac4";
240 interrupt-parent = <&EMAC0>;
241 interrupts = <0 1>;
242 #interrupt-cells = <1>;
243 #address-cells = <0>;
244 #size-cells = <0>;
245 interrupt-map = </*Status*/ 0 &UIC2 10 4
246 /*Wake*/ 1 &UIC2 14 4>;
247 reg = <ef600e00 70>;
248 local-mac-address = [000000000000]; /* Filled in by U-Boot */
249 mal-device = <&MAL0>;
250 mal-tx-channel = <0>;
251 mal-rx-channel = <0>;
252 cell-index = <0>;
253 max-frame-size = <2328>;
254 rx-fifo-size = <1000>;
255 tx-fifo-size = <800>;
256 phy-mode = "rgmii";
257 phy-map = <00000000>;
258 rgmii-device = <&RGMII0>;
259 rgmii-channel = <0>;
260 tah-device = <&TAH0>;
261 tah-channel = <0>;
262 has-inverted-stacr-oc;
263 has-new-stacr-staopc;
264 };
265
266 EMAC1: ethernet@ef600f00 {
267 device_type = "network";
268 compatible = "ibm,emac-460gt", "ibm,emac4";
269 interrupt-parent = <&EMAC1>;
270 interrupts = <0 1>;
271 #interrupt-cells = <1>;
272 #address-cells = <0>;
273 #size-cells = <0>;
274 interrupt-map = </*Status*/ 0 &UIC2 11 4
275 /*Wake*/ 1 &UIC2 15 4>;
276 reg = <ef600f00 70>;
277 local-mac-address = [000000000000]; /* Filled in by U-Boot */
278 mal-device = <&MAL0>;
279 mal-tx-channel = <1>;
280 mal-rx-channel = <8>;
281 cell-index = <1>;
282 max-frame-size = <2328>;
283 rx-fifo-size = <1000>;
284 tx-fifo-size = <800>;
285 phy-mode = "rgmii";
286 phy-map = <00000000>;
287 rgmii-device = <&RGMII0>;
288 rgmii-channel = <1>;
289 tah-device = <&TAH1>;
290 tah-channel = <1>;
291 has-inverted-stacr-oc;
292 has-new-stacr-staopc;
293 mdio-device = <&EMAC0>;
294 };
295
296 EMAC2: ethernet@ef601100 {
297 device_type = "network";
298 compatible = "ibm,emac-460gt", "ibm,emac4";
299 interrupt-parent = <&EMAC2>;
300 interrupts = <0 1>;
301 #interrupt-cells = <1>;
302 #address-cells = <0>;
303 #size-cells = <0>;
304 interrupt-map = </*Status*/ 0 &UIC2 12 4
305 /*Wake*/ 1 &UIC2 16 4>;
306 reg = <ef601100 70>;
307 local-mac-address = [000000000000]; /* Filled in by U-Boot */
308 mal-device = <&MAL0>;
309 mal-tx-channel = <2>;
310 mal-rx-channel = <10>;
311 cell-index = <2>;
312 max-frame-size = <2328>;
313 rx-fifo-size = <1000>;
314 tx-fifo-size = <800>;
315 phy-mode = "rgmii";
316 phy-map = <00000000>;
317 rgmii-device = <&RGMII1>;
318 rgmii-channel = <0>;
319 has-inverted-stacr-oc;
320 has-new-stacr-staopc;
321 mdio-device = <&EMAC0>;
322 };
323
324 EMAC3: ethernet@ef601200 {
325 device_type = "network";
326 compatible = "ibm,emac-460gt", "ibm,emac4";
327 interrupt-parent = <&EMAC3>;
328 interrupts = <0 1>;
329 #interrupt-cells = <1>;
330 #address-cells = <0>;
331 #size-cells = <0>;
332 interrupt-map = </*Status*/ 0 &UIC2 13 4
333 /*Wake*/ 1 &UIC2 17 4>;
334 reg = <ef601200 70>;
335 local-mac-address = [000000000000]; /* Filled in by U-Boot */
336 mal-device = <&MAL0>;
337 mal-tx-channel = <3>;
338 mal-rx-channel = <18>;
339 cell-index = <3>;
340 max-frame-size = <2328>;
341 rx-fifo-size = <1000>;
342 tx-fifo-size = <800>;
343 phy-mode = "rgmii";
344 phy-map = <00000000>;
345 rgmii-device = <&RGMII1>;
346 rgmii-channel = <1>;
347 has-inverted-stacr-oc;
348 has-new-stacr-staopc;
349 mdio-device = <&EMAC0>;
350 };
351 };
352
353 PCIX0: pci@c0ec00000 {
354 device_type = "pci";
355 #interrupt-cells = <1>;
356 #size-cells = <2>;
357 #address-cells = <3>;
358 compatible = "ibm,plb-pcix-460gt", "ibm,plb-pcix";
359 primary;
360 large-inbound-windows;
361 enable-msi-hole;
362 reg = <c 0ec00000 8 /* Config space access */
363 0 0 0 /* no IACK cycles */
364 c 0ed00000 4 /* Special cycles */
365 c 0ec80000 100 /* Internal registers */
366 c 0ec80100 fc>; /* Internal messaging registers */
367
368 /* Outbound ranges, one memory and one IO,
369 * later cannot be changed
370 */
371 ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
372 01000000 0 00000000 0000000c 08000000 0 00010000>;
373
374 /* Inbound 2GB range starting at 0 */
375 dma-ranges = <42000000 0 0 0 0 0 80000000>;
376
377 /* This drives busses 0 to 0x3f */
378 bus-range = <0 3f>;
379
380 /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */
381 interrupt-map-mask = <0000 0 0 0>;
382 interrupt-map = < 0000 0 0 0 &UIC1 0 8 >;
383 };
384
385 PCIE0: pciex@d00000000 {
386 device_type = "pci";
387 #interrupt-cells = <1>;
388 #size-cells = <2>;
389 #address-cells = <3>;
390 compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex";
391 primary;
392 port = <0>; /* port number */
393 reg = <d 00000000 20000000 /* Config space access */
394 c 08010000 00001000>; /* Registers */
395 dcr-reg = <100 020>;
396 sdr-base = <300>;
397
398 /* Outbound ranges, one memory and one IO,
399 * later cannot be changed
400 */
401 ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
402 01000000 0 00000000 0000000f 80000000 0 00010000>;
403
404 /* Inbound 2GB range starting at 0 */
405 dma-ranges = <42000000 0 0 0 0 0 80000000>;
406
407 /* This drives busses 40 to 0x7f */
408 bus-range = <40 7f>;
409
410 /* Legacy interrupts (note the weird polarity, the bridge seems
411 * to invert PCIe legacy interrupts).
412 * We are de-swizzling here because the numbers are actually for
413 * port of the root complex virtual P2P bridge. But I want
414 * to avoid putting a node for it in the tree, so the numbers
415 * below are basically de-swizzled numbers.
416 * The real slot is on idsel 0, so the swizzling is 1:1
417 */
418 interrupt-map-mask = <0000 0 0 7>;
419 interrupt-map = <
420 0000 0 0 1 &UIC3 c 4 /* swizzled int A */
421 0000 0 0 2 &UIC3 d 4 /* swizzled int B */
422 0000 0 0 3 &UIC3 e 4 /* swizzled int C */
423 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>;
424 };
425
426 PCIE1: pciex@d20000000 {
427 device_type = "pci";
428 #interrupt-cells = <1>;
429 #size-cells = <2>;
430 #address-cells = <3>;
431 compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex";
432 primary;
433 port = <1>; /* port number */
434 reg = <d 20000000 20000000 /* Config space access */
435 c 08011000 00001000>; /* Registers */
436 dcr-reg = <120 020>;
437 sdr-base = <340>;
438
439 /* Outbound ranges, one memory and one IO,
440 * later cannot be changed
441 */
442 ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
443 01000000 0 00000000 0000000f 80010000 0 00010000>;
444
445 /* Inbound 2GB range starting at 0 */
446 dma-ranges = <42000000 0 0 0 0 0 80000000>;
447
448 /* This drives busses 80 to 0xbf */
449 bus-range = <80 bf>;
450
451 /* Legacy interrupts (note the weird polarity, the bridge seems
452 * to invert PCIe legacy interrupts).
453 * We are de-swizzling here because the numbers are actually for
454 * port of the root complex virtual P2P bridge. But I want
455 * to avoid putting a node for it in the tree, so the numbers
456 * below are basically de-swizzled numbers.
457 * The real slot is on idsel 0, so the swizzling is 1:1
458 */
459 interrupt-map-mask = <0000 0 0 7>;
460 interrupt-map = <
461 0000 0 0 1 &UIC3 10 4 /* swizzled int A */
462 0000 0 0 2 &UIC3 11 4 /* swizzled int B */
463 0000 0 0 3 &UIC3 12 4 /* swizzled int C */
464 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>;
465 };
466 };
467};
diff --git a/arch/powerpc/boot/dts/haleakala.dts b/arch/powerpc/boot/dts/haleakala.dts
index ae68fefc01b6..b5d95ac24dbf 100644
--- a/arch/powerpc/boot/dts/haleakala.dts
+++ b/arch/powerpc/boot/dts/haleakala.dts
@@ -12,7 +12,7 @@
12 #address-cells = <1>; 12 #address-cells = <1>;
13 #size-cells = <1>; 13 #size-cells = <1>;
14 model = "amcc,haleakala"; 14 model = "amcc,haleakala";
15 compatible = "amcc,kilauea"; 15 compatible = "amcc,haleakala", "amcc,kilauea";
16 dcr-parent = <&/cpus/cpu@0>; 16 dcr-parent = <&/cpus/cpu@0>;
17 17
18 aliases { 18 aliases {
@@ -218,7 +218,7 @@
218 mal-tx-channel = <0>; 218 mal-tx-channel = <0>;
219 mal-rx-channel = <0>; 219 mal-rx-channel = <0>;
220 cell-index = <0>; 220 cell-index = <0>;
221 max-frame-size = <5dc>; 221 max-frame-size = <2328>;
222 rx-fifo-size = <1000>; 222 rx-fifo-size = <1000>;
223 tx-fifo-size = <800>; 223 tx-fifo-size = <800>;
224 phy-mode = "rgmii"; 224 phy-mode = "rgmii";
diff --git a/arch/powerpc/boot/dts/katmai.dts b/arch/powerpc/boot/dts/katmai.dts
index fc86e5a3afc4..cc2873a531d2 100644
--- a/arch/powerpc/boot/dts/katmai.dts
+++ b/arch/powerpc/boot/dts/katmai.dts
@@ -212,7 +212,7 @@
212 mal-tx-channel = <0>; 212 mal-tx-channel = <0>;
213 mal-rx-channel = <0>; 213 mal-rx-channel = <0>;
214 cell-index = <0>; 214 cell-index = <0>;
215 max-frame-size = <5dc>; 215 max-frame-size = <2328>;
216 rx-fifo-size = <1000>; 216 rx-fifo-size = <1000>;
217 tx-fifo-size = <800>; 217 tx-fifo-size = <800>;
218 phy-mode = "gmii"; 218 phy-mode = "gmii";
diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts
index 8baef61f31cd..48c9a6e71f1a 100644
--- a/arch/powerpc/boot/dts/kilauea.dts
+++ b/arch/powerpc/boot/dts/kilauea.dts
@@ -219,7 +219,7 @@
219 mal-tx-channel = <0>; 219 mal-tx-channel = <0>;
220 mal-rx-channel = <0>; 220 mal-rx-channel = <0>;
221 cell-index = <0>; 221 cell-index = <0>;
222 max-frame-size = <5dc>; 222 max-frame-size = <2328>;
223 rx-fifo-size = <1000>; 223 rx-fifo-size = <1000>;
224 tx-fifo-size = <800>; 224 tx-fifo-size = <800>;
225 phy-mode = "rgmii"; 225 phy-mode = "rgmii";
@@ -247,7 +247,7 @@
247 mal-tx-channel = <1>; 247 mal-tx-channel = <1>;
248 mal-rx-channel = <1>; 248 mal-rx-channel = <1>;
249 cell-index = <1>; 249 cell-index = <1>;
250 max-frame-size = <5dc>; 250 max-frame-size = <2328>;
251 rx-fifo-size = <1000>; 251 rx-fifo-size = <1000>;
252 tx-fifo-size = <800>; 252 tx-fifo-size = <800>;
253 phy-mode = "rgmii"; 253 phy-mode = "rgmii";
diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts
new file mode 100644
index 000000000000..f869ce3ca0b7
--- /dev/null
+++ b/arch/powerpc/boot/dts/ksi8560.dts
@@ -0,0 +1,267 @@
1/*
2 * Device Tree Source for Emerson KSI8560
3 *
4 * Author: Alexandr Smirnov <asmirnov@ru.mvista.com>
5 *
6 * Based on mpc8560ads.dts
7 *
8 * 2008 (c) MontaVista, Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 *
13 */
14
15/dts-v1/;
16
17/ {
18 model = "KSI8560";
19 compatible = "emerson,KSI8560";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 aliases {
24 ethernet0 = &enet0;
25 ethernet1 = &enet1;
26 ethernet2 = &enet2;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 PowerPC,8560@0 {
34 device_type = "cpu";
35 reg = <0>;
36 d-cache-line-size = <32>;
37 i-cache-line-size = <32>;
38 d-cache-size = <0x8000>; /* L1, 32K */
39 i-cache-size = <0x8000>; /* L1, 32K */
40 timebase-frequency = <0>; /* From U-boot */
41 bus-frequency = <0>; /* From U-boot */
42 clock-frequency = <0>; /* From U-boot */
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0x00000000 0x10000000>; /* Fixed by bootwrapper */
49 };
50
51 soc@fdf00000 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 device_type = "soc";
55 ranges = <0x00000000 0xfdf00000 0x00100000>;
56 bus-frequency = <0>; /* Fixed by bootwrapper */
57
58 memory-controller@2000 {
59 compatible = "fsl,8540-memory-controller";
60 reg = <0x2000 0x1000>;
61 interrupt-parent = <&MPIC>;
62 interrupts = <0x12 0x2>;
63 };
64
65 l2-cache-controller@20000 {
66 compatible = "fsl,8540-l2-cache-controller";
67 reg = <0x20000 0x1000>;
68 cache-line-size = <0x20>; /* 32 bytes */
69 cache-size = <0x40000>; /* L2, 256K */
70 interrupt-parent = <&MPIC>;
71 interrupts = <0x10 0x2>;
72 };
73
74 i2c@3000 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <0>;
78 compatible = "fsl-i2c";
79 reg = <0x3000 0x100>;
80 interrupts = <0x2b 0x2>;
81 interrupt-parent = <&MPIC>;
82 dfsrr;
83 };
84
85 mdio@24520 { /* For TSECs */
86 #address-cells = <1>;
87 #size-cells = <0>;
88 compatible = "fsl,gianfar-mdio";
89 reg = <0x24520 0x20>;
90
91 PHY1: ethernet-phy@1 {
92 interrupt-parent = <&MPIC>;
93 reg = <0x1>;
94 device_type = "ethernet-phy";
95 };
96
97 PHY2: ethernet-phy@2 {
98 interrupt-parent = <&MPIC>;
99 reg = <0x2>;
100 device_type = "ethernet-phy";
101 };
102 };
103
104 enet0: ethernet@24000 {
105 device_type = "network";
106 model = "TSEC";
107 compatible = "gianfar";
108 reg = <0x24000 0x1000>;
109 /* Mac address filled in by bootwrapper */
110 local-mac-address = [ 00 00 00 00 00 00 ];
111 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
112 interrupt-parent = <&MPIC>;
113 phy-handle = <&PHY1>;
114 };
115
116 enet1: ethernet@25000 {
117 device_type = "network";
118 model = "TSEC";
119 compatible = "gianfar";
120 reg = <0x25000 0x1000>;
121 /* Mac address filled in by bootwrapper */
122 local-mac-address = [ 00 00 00 00 00 00 ];
123 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
124 interrupt-parent = <&MPIC>;
125 phy-handle = <&PHY2>;
126 };
127
128 MPIC: pic@40000 {
129 #address-cells = <0>;
130 #interrupt-cells = <2>;
131 interrupt-controller;
132 reg = <0x40000 0x40000>;
133 device_type = "open-pic";
134 };
135
136 cpm@919c0 {
137 #address-cells = <1>;
138 #size-cells = <1>;
139 compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
140 reg = <0x919c0 0x30>;
141 ranges;
142
143 muram@80000 {
144 #address-cells = <1>;
145 #size-cells = <1>;
146 ranges = <0x0 0x80000 0x10000>;
147
148 data@0 {
149 compatible = "fsl,cpm-muram-data";
150 reg = <0x0 0x4000 0x9000 0x2000>;
151 };
152 };
153
154 brg@919f0 {
155 compatible = "fsl,mpc8560-brg",
156 "fsl,cpm2-brg",
157 "fsl,cpm-brg";
158 reg = <0x919f0 0x10 0x915f0 0x10>;
159 clock-frequency = <165000000>; /* 166MHz */
160 };
161
162 CPMPIC: pic@90c00 {
163 #address-cells = <0>;
164 #interrupt-cells = <2>;
165 interrupt-controller;
166 interrupts = <0x2e 0x2>;
167 interrupt-parent = <&MPIC>;
168 reg = <0x90c00 0x80>;
169 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
170 };
171
172 serial@91a00 {
173 device_type = "serial";
174 compatible = "fsl,mpc8560-scc-uart",
175 "fsl,cpm2-scc-uart";
176 reg = <0x91a00 0x20 0x88000 0x100>;
177 fsl,cpm-brg = <1>;
178 fsl,cpm-command = <0x800000>;
179 current-speed = <0x1c200>;
180 interrupts = <0x28 0x8>;
181 interrupt-parent = <&CPMPIC>;
182 };
183
184 serial@91a20 {
185 device_type = "serial";
186 compatible = "fsl,mpc8560-scc-uart",
187 "fsl,cpm2-scc-uart";
188 reg = <0x91a20 0x20 0x88100 0x100>;
189 fsl,cpm-brg = <2>;
190 fsl,cpm-command = <0x4a00000>;
191 current-speed = <0x1c200>;
192 interrupts = <0x29 0x8>;
193 interrupt-parent = <&CPMPIC>;
194 };
195
196 mdio@90d00 { /* For FCCs */
197 #address-cells = <1>;
198 #size-cells = <0>;
199 compatible = "fsl,cpm2-mdio-bitbang";
200 reg = <0x90d00 0x14>;
201 fsl,mdio-pin = <24>;
202 fsl,mdc-pin = <25>;
203
204 PHY0: ethernet-phy@0 {
205 interrupt-parent = <&MPIC>;
206 reg = <0x0>;
207 device_type = "ethernet-phy";
208 };
209 };
210
211 enet2: ethernet@91300 {
212 device_type = "network";
213 compatible = "fsl,mpc8560-fcc-enet",
214 "fsl,cpm2-fcc-enet";
215 reg = <0x91300 0x20 0x88400 0x100 0x91390 0x1>;
216 /* Mac address filled in by bootwrapper */
217 local-mac-address = [ 00 00 00 00 00 00 ];
218 fsl,cpm-command = <0x12000300>;
219 interrupts = <0x20 0x8>;
220 interrupt-parent = <&CPMPIC>;
221 phy-handle = <&PHY0>;
222 };
223 };
224 };
225
226 localbus@fdf05000 {
227 #address-cells = <2>;
228 #size-cells = <1>;
229 compatible = "fsl,mpc8560-localbus";
230 reg = <0xfdf05000 0x68>;
231
232 ranges = <0x0 0x0 0xe0000000 0x00800000
233 0x4 0x0 0xe8080000 0x00080000>;
234
235 flash@0,0 {
236 #address-cells = <1>;
237 #size-cells = <1>;
238 compatible = "jedec-flash";
239 reg = <0x0 0x0 0x800000>;
240 bank-width = <0x2>;
241
242 partition@0 {
243 label = "Primary Kernel";
244 reg = <0x0 0x180000>;
245 };
246 partition@180000 {
247 label = "Primary Filesystem";
248 reg = <0x180000 0x580000>;
249 };
250 partition@700000 {
251 label = "Monitor";
252 reg = <0x300000 0x100000>;
253 read-only;
254 };
255 };
256
257 cpld@4,0 {
258 compatible = "emerson,KSI8560-cpld";
259 reg = <0x4 0x0 0x80000>;
260 };
261 };
262
263
264 chosen {
265 linux,stdout-path = "/soc/cpm/serial@91a00";
266 };
267};
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
index 446958854519..2e5a1a1812b6 100644
--- a/arch/powerpc/boot/dts/kuroboxHD.dts
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -7,6 +7,7 @@
7 * Based on sandpoint.dts 7 * Based on sandpoint.dts
8 * 8 *
9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de> 9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de>
10 * Copyright 2008 Freescale Semiconductor, Inc.
10 * 11 *
11 * This file is licensed under 12 * This file is licensed under
12 * the terms of the GNU General Public License version 2. This program 13 * the terms of the GNU General Public License version 2. This program
@@ -17,6 +18,8 @@ XXXX add flash parts, rtc, ??
17 18
18 */ 19 */
19 20
21/dts-v1/;
22
20/ { 23/ {
21 model = "KuroboxHD"; 24 model = "KuroboxHD";
22 compatible = "linkstation"; 25 compatible = "linkstation";
@@ -35,19 +38,19 @@ XXXX add flash parts, rtc, ??
35 38
36 PowerPC,603e { /* Really 8241 */ 39 PowerPC,603e { /* Really 8241 */
37 device_type = "cpu"; 40 device_type = "cpu";
38 reg = <0>; 41 reg = <0x0>;
39 clock-frequency = <bebc200>; /* Fixed by bootloader */ 42 clock-frequency = <200000000>; /* Fixed by bootloader */
40 timebase-frequency = <1743000>; /* Fixed by bootloader */ 43 timebase-frequency = <24391680>; /* Fixed by bootloader */
41 bus-frequency = <0>; /* Fixed by bootloader */ 44 bus-frequency = <0>; /* Fixed by bootloader */
42 /* Following required by dtc but not used */ 45 /* Following required by dtc but not used */
43 i-cache-size = <4000>; 46 i-cache-size = <0x4000>;
44 d-cache-size = <4000>; 47 d-cache-size = <0x4000>;
45 }; 48 };
46 }; 49 };
47 50
48 memory { 51 memory {
49 device_type = "memory"; 52 device_type = "memory";
50 reg = <00000000 04000000>; 53 reg = <0x0 0x4000000>;
51 }; 54 };
52 55
53 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ 56 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */
@@ -56,26 +59,26 @@ XXXX add flash parts, rtc, ??
56 device_type = "soc"; 59 device_type = "soc";
57 compatible = "mpc10x"; 60 compatible = "mpc10x";
58 store-gathering = <0>; /* 0 == off, !0 == on */ 61 store-gathering = <0>; /* 0 == off, !0 == on */
59 reg = <80000000 00100000>; 62 reg = <0x80000000 0x100000>;
60 ranges = <80000000 80000000 70000000 /* pci mem space */ 63 ranges = <0x80000000 0x80000000 0x70000000 /* pci mem space */
61 fc000000 fc000000 00100000 /* EUMB */ 64 0xfc000000 0xfc000000 0x100000 /* EUMB */
62 fe000000 fe000000 00c00000 /* pci i/o space */ 65 0xfe000000 0xfe000000 0xc00000 /* pci i/o space */
63 fec00000 fec00000 00300000 /* pci cfg regs */ 66 0xfec00000 0xfec00000 0x300000 /* pci cfg regs */
64 fef00000 fef00000 00100000>; /* pci iack */ 67 0xfef00000 0xfef00000 0x100000>; /* pci iack */
65 68
66 i2c@80003000 { 69 i2c@80003000 {
67 #address-cells = <1>; 70 #address-cells = <1>;
68 #size-cells = <0>; 71 #size-cells = <0>;
69 cell-index = <0>; 72 cell-index = <0>;
70 compatible = "fsl-i2c"; 73 compatible = "fsl-i2c";
71 reg = <80003000 1000>; 74 reg = <0x80003000 0x1000>;
72 interrupts = <5 2>; 75 interrupts = <5 2>;
73 interrupt-parent = <&mpic>; 76 interrupt-parent = <&mpic>;
74 77
75 rtc@32 { 78 rtc@32 {
76 device_type = "rtc"; 79 device_type = "rtc";
77 compatible = "ricoh,rs5c372a"; 80 compatible = "ricoh,rs5c372a";
78 reg = <32>; 81 reg = <0x32>;
79 }; 82 };
80 }; 83 };
81 84
@@ -83,9 +86,9 @@ XXXX add flash parts, rtc, ??
83 cell-index = <0>; 86 cell-index = <0>;
84 device_type = "serial"; 87 device_type = "serial";
85 compatible = "ns16550"; 88 compatible = "ns16550";
86 reg = <80004500 8>; 89 reg = <0x80004500 0x8>;
87 clock-frequency = <5d08d88>; 90 clock-frequency = <97553800>;
88 current-speed = <2580>; 91 current-speed = <9600>;
89 interrupts = <9 0>; 92 interrupts = <9 0>;
90 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
91 }; 94 };
@@ -94,10 +97,10 @@ XXXX add flash parts, rtc, ??
94 cell-index = <1>; 97 cell-index = <1>;
95 device_type = "serial"; 98 device_type = "serial";
96 compatible = "ns16550"; 99 compatible = "ns16550";
97 reg = <80004600 8>; 100 reg = <0x80004600 0x8>;
98 clock-frequency = <5d08d88>; 101 clock-frequency = <97553800>;
99 current-speed = <e100>; 102 current-speed = <57600>;
100 interrupts = <a 0>; 103 interrupts = <10 0>;
101 interrupt-parent = <&mpic>; 104 interrupt-parent = <&mpic>;
102 }; 105 };
103 106
@@ -107,7 +110,7 @@ XXXX add flash parts, rtc, ??
107 device_type = "open-pic"; 110 device_type = "open-pic";
108 compatible = "chrp,open-pic"; 111 compatible = "chrp,open-pic";
109 interrupt-controller; 112 interrupt-controller;
110 reg = <80040000 40000>; 113 reg = <0x80040000 0x40000>;
111 }; 114 };
112 115
113 pci0: pci@fec00000 { 116 pci0: pci@fec00000 {
@@ -116,29 +119,29 @@ XXXX add flash parts, rtc, ??
116 #interrupt-cells = <1>; 119 #interrupt-cells = <1>;
117 device_type = "pci"; 120 device_type = "pci";
118 compatible = "mpc10x-pci"; 121 compatible = "mpc10x-pci";
119 reg = <fec00000 400000>; 122 reg = <0xfec00000 0x400000>;
120 ranges = <01000000 0 0 fe000000 0 00c00000 123 ranges = <0x1000000 0x0 0x0 0xfe000000 0x0 0xc00000
121 02000000 0 80000000 80000000 0 70000000>; 124 0x2000000 0x0 0x80000000 0x80000000 0x0 0x70000000>;
122 bus-range = <0 ff>; 125 bus-range = <0 255>;
123 clock-frequency = <7f28155>; 126 clock-frequency = <133333333>;
124 interrupt-parent = <&mpic>; 127 interrupt-parent = <&mpic>;
125 interrupt-map-mask = <f800 0 0 7>; 128 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
126 interrupt-map = < 129 interrupt-map = <
127 /* IDSEL 11 - IRQ0 ETH */ 130 /* IDSEL 11 - IRQ0 ETH */
128 5800 0 0 1 &mpic 0 1 131 0x5800 0x0 0x0 0x1 &mpic 0x0 0x1
129 5800 0 0 2 &mpic 1 1 132 0x5800 0x0 0x0 0x2 &mpic 0x1 0x1
130 5800 0 0 3 &mpic 2 1 133 0x5800 0x0 0x0 0x3 &mpic 0x2 0x1
131 5800 0 0 4 &mpic 3 1 134 0x5800 0x0 0x0 0x4 &mpic 0x3 0x1
132 /* IDSEL 12 - IRQ1 IDE0 */ 135 /* IDSEL 12 - IRQ1 IDE0 */
133 6000 0 0 1 &mpic 1 1 136 0x6000 0x0 0x0 0x1 &mpic 0x1 0x1
134 6000 0 0 2 &mpic 2 1 137 0x6000 0x0 0x0 0x2 &mpic 0x2 0x1
135 6000 0 0 3 &mpic 3 1 138 0x6000 0x0 0x0 0x3 &mpic 0x3 0x1
136 6000 0 0 4 &mpic 0 1 139 0x6000 0x0 0x0 0x4 &mpic 0x0 0x1
137 /* IDSEL 14 - IRQ3 USB2.0 */ 140 /* IDSEL 14 - IRQ3 USB2.0 */
138 7000 0 0 1 &mpic 3 1 141 0x7000 0x0 0x0 0x1 &mpic 0x3 0x1
139 7000 0 0 2 &mpic 3 1 142 0x7000 0x0 0x0 0x2 &mpic 0x3 0x1
140 7000 0 0 3 &mpic 3 1 143 0x7000 0x0 0x0 0x3 &mpic 0x3 0x1
141 7000 0 0 4 &mpic 3 1 144 0x7000 0x0 0x0 0x4 &mpic 0x3 0x1
142 >; 145 >;
143 }; 146 };
144 }; 147 };
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index 8443c85b7b30..e4916e69ad31 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -7,6 +7,7 @@
7 * Based on sandpoint.dts 7 * Based on sandpoint.dts
8 * 8 *
9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de> 9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de>
10 * Copyright 2008 Freescale Semiconductor, Inc.
10 * 11 *
11 * This file is licensed under 12 * This file is licensed under
12 * the terms of the GNU General Public License version 2. This program 13 * the terms of the GNU General Public License version 2. This program
@@ -17,6 +18,8 @@ XXXX add flash parts, rtc, ??
17 18
18 */ 19 */
19 20
21/dts-v1/;
22
20/ { 23/ {
21 model = "KuroboxHG"; 24 model = "KuroboxHG";
22 compatible = "linkstation"; 25 compatible = "linkstation";
@@ -35,19 +38,19 @@ XXXX add flash parts, rtc, ??
35 38
36 PowerPC,603e { /* Really 8241 */ 39 PowerPC,603e { /* Really 8241 */
37 device_type = "cpu"; 40 device_type = "cpu";
38 reg = <0>; 41 reg = <0x0>;
39 clock-frequency = <fdad680>; /* Fixed by bootloader */ 42 clock-frequency = <266000000>; /* Fixed by bootloader */
40 timebase-frequency = <1F04000>; /* Fixed by bootloader */ 43 timebase-frequency = <32522240>; /* Fixed by bootloader */
41 bus-frequency = <0>; /* Fixed by bootloader */ 44 bus-frequency = <0>; /* Fixed by bootloader */
42 /* Following required by dtc but not used */ 45 /* Following required by dtc but not used */
43 i-cache-size = <4000>; 46 i-cache-size = <0x4000>;
44 d-cache-size = <4000>; 47 d-cache-size = <0x4000>;
45 }; 48 };
46 }; 49 };
47 50
48 memory { 51 memory {
49 device_type = "memory"; 52 device_type = "memory";
50 reg = <00000000 08000000>; 53 reg = <0x0 0x8000000>;
51 }; 54 };
52 55
53 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ 56 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */
@@ -56,26 +59,26 @@ XXXX add flash parts, rtc, ??
56 device_type = "soc"; 59 device_type = "soc";
57 compatible = "mpc10x"; 60 compatible = "mpc10x";
58 store-gathering = <0>; /* 0 == off, !0 == on */ 61 store-gathering = <0>; /* 0 == off, !0 == on */
59 reg = <80000000 00100000>; 62 reg = <0x80000000 0x100000>;
60 ranges = <80000000 80000000 70000000 /* pci mem space */ 63 ranges = <0x80000000 0x80000000 0x70000000 /* pci mem space */
61 fc000000 fc000000 00100000 /* EUMB */ 64 0xfc000000 0xfc000000 0x100000 /* EUMB */
62 fe000000 fe000000 00c00000 /* pci i/o space */ 65 0xfe000000 0xfe000000 0xc00000 /* pci i/o space */
63 fec00000 fec00000 00300000 /* pci cfg regs */ 66 0xfec00000 0xfec00000 0x300000 /* pci cfg regs */
64 fef00000 fef00000 00100000>; /* pci iack */ 67 0xfef00000 0xfef00000 0x100000>; /* pci iack */
65 68
66 i2c@80003000 { 69 i2c@80003000 {
67 #address-cells = <1>; 70 #address-cells = <1>;
68 #size-cells = <0>; 71 #size-cells = <0>;
69 cell-index = <0>; 72 cell-index = <0>;
70 compatible = "fsl-i2c"; 73 compatible = "fsl-i2c";
71 reg = <80003000 1000>; 74 reg = <0x80003000 0x1000>;
72 interrupts = <5 2>; 75 interrupts = <5 2>;
73 interrupt-parent = <&mpic>; 76 interrupt-parent = <&mpic>;
74 77
75 rtc@32 { 78 rtc@32 {
76 device_type = "rtc"; 79 device_type = "rtc";
77 compatible = "ricoh,rs5c372a"; 80 compatible = "ricoh,rs5c372a";
78 reg = <32>; 81 reg = <0x32>;
79 }; 82 };
80 }; 83 };
81 84
@@ -83,9 +86,9 @@ XXXX add flash parts, rtc, ??
83 cell-index = <0>; 86 cell-index = <0>;
84 device_type = "serial"; 87 device_type = "serial";
85 compatible = "ns16550"; 88 compatible = "ns16550";
86 reg = <80004500 8>; 89 reg = <0x80004500 0x8>;
87 clock-frequency = <7c044a8>; 90 clock-frequency = <130041000>;
88 current-speed = <2580>; 91 current-speed = <9600>;
89 interrupts = <9 0>; 92 interrupts = <9 0>;
90 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
91 }; 94 };
@@ -94,10 +97,10 @@ XXXX add flash parts, rtc, ??
94 cell-index = <1>; 97 cell-index = <1>;
95 device_type = "serial"; 98 device_type = "serial";
96 compatible = "ns16550"; 99 compatible = "ns16550";
97 reg = <80004600 8>; 100 reg = <0x80004600 0x8>;
98 clock-frequency = <7c044a8>; 101 clock-frequency = <130041000>;
99 current-speed = <e100>; 102 current-speed = <57600>;
100 interrupts = <a 0>; 103 interrupts = <10 0>;
101 interrupt-parent = <&mpic>; 104 interrupt-parent = <&mpic>;
102 }; 105 };
103 106
@@ -107,7 +110,7 @@ XXXX add flash parts, rtc, ??
107 device_type = "open-pic"; 110 device_type = "open-pic";
108 compatible = "chrp,open-pic"; 111 compatible = "chrp,open-pic";
109 interrupt-controller; 112 interrupt-controller;
110 reg = <80040000 40000>; 113 reg = <0x80040000 0x40000>;
111 }; 114 };
112 115
113 pci0: pci@fec00000 { 116 pci0: pci@fec00000 {
@@ -116,29 +119,29 @@ XXXX add flash parts, rtc, ??
116 #interrupt-cells = <1>; 119 #interrupt-cells = <1>;
117 device_type = "pci"; 120 device_type = "pci";
118 compatible = "mpc10x-pci"; 121 compatible = "mpc10x-pci";
119 reg = <fec00000 400000>; 122 reg = <0xfec00000 0x400000>;
120 ranges = <01000000 0 0 fe000000 0 00c00000 123 ranges = <0x1000000 0x0 0x0 0xfe000000 0x0 0xc00000
121 02000000 0 80000000 80000000 0 70000000>; 124 0x2000000 0x0 0x80000000 0x80000000 0x0 0x70000000>;
122 bus-range = <0 ff>; 125 bus-range = <0 255>;
123 clock-frequency = <7f28155>; 126 clock-frequency = <133333333>;
124 interrupt-parent = <&mpic>; 127 interrupt-parent = <&mpic>;
125 interrupt-map-mask = <f800 0 0 7>; 128 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
126 interrupt-map = < 129 interrupt-map = <
127 /* IDSEL 11 - IRQ0 ETH */ 130 /* IDSEL 11 - IRQ0 ETH */
128 5800 0 0 1 &mpic 0 1 131 0x5800 0x0 0x0 0x1 &mpic 0x0 0x1
129 5800 0 0 2 &mpic 1 1 132 0x5800 0x0 0x0 0x2 &mpic 0x1 0x1
130 5800 0 0 3 &mpic 2 1 133 0x5800 0x0 0x0 0x3 &mpic 0x2 0x1
131 5800 0 0 4 &mpic 3 1 134 0x5800 0x0 0x0 0x4 &mpic 0x3 0x1
132 /* IDSEL 12 - IRQ1 IDE0 */ 135 /* IDSEL 12 - IRQ1 IDE0 */
133 6000 0 0 1 &mpic 1 1 136 0x6000 0x0 0x0 0x1 &mpic 0x1 0x1
134 6000 0 0 2 &mpic 2 1 137 0x6000 0x0 0x0 0x2 &mpic 0x2 0x1
135 6000 0 0 3 &mpic 3 1 138 0x6000 0x0 0x0 0x3 &mpic 0x3 0x1
136 6000 0 0 4 &mpic 0 1 139 0x6000 0x0 0x0 0x4 &mpic 0x0 0x1
137 /* IDSEL 14 - IRQ3 USB2.0 */ 140 /* IDSEL 14 - IRQ3 USB2.0 */
138 7000 0 0 1 &mpic 3 1 141 0x7000 0x0 0x0 0x1 &mpic 0x3 0x1
139 7000 0 0 2 &mpic 3 1 142 0x7000 0x0 0x0 0x2 &mpic 0x3 0x1
140 7000 0 0 3 &mpic 3 1 143 0x7000 0x0 0x0 0x3 &mpic 0x3 0x1
141 7000 0 0 4 &mpic 3 1 144 0x7000 0x0 0x0 0x4 &mpic 0x3 0x1
142 >; 145 >;
143 }; 146 };
144 }; 147 };
diff --git a/arch/powerpc/boot/dts/makalu.dts b/arch/powerpc/boot/dts/makalu.dts
index 710c01168179..84cc5e72ddd8 100644
--- a/arch/powerpc/boot/dts/makalu.dts
+++ b/arch/powerpc/boot/dts/makalu.dts
@@ -219,7 +219,7 @@
219 mal-tx-channel = <0>; 219 mal-tx-channel = <0>;
220 mal-rx-channel = <0>; 220 mal-rx-channel = <0>;
221 cell-index = <0>; 221 cell-index = <0>;
222 max-frame-size = <5dc>; 222 max-frame-size = <2328>;
223 rx-fifo-size = <1000>; 223 rx-fifo-size = <1000>;
224 tx-fifo-size = <800>; 224 tx-fifo-size = <800>;
225 phy-mode = "rgmii"; 225 phy-mode = "rgmii";
@@ -247,7 +247,7 @@
247 mal-tx-channel = <1>; 247 mal-tx-channel = <1>;
248 mal-rx-channel = <1>; 248 mal-rx-channel = <1>;
249 cell-index = <1>; 249 cell-index = <1>;
250 max-frame-size = <5dc>; 250 max-frame-size = <2328>;
251 rx-fifo-size = <1000>; 251 rx-fifo-size = <1000>;
252 tx-fifo-size = <800>; 252 tx-fifo-size = <800>;
253 phy-mode = "rgmii"; 253 phy-mode = "rgmii";
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 8fb542387436..4936349b87cd 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC7448HPC2 (Taiga) board Device Tree Source 2 * MPC7448HPC2 (Taiga) board Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 2006 Roy Zang <Roy Zang at freescale.com>. 5 * 2006 Roy Zang <Roy Zang at freescale.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
@@ -10,6 +10,7 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/dts-v1/;
13 14
14/ { 15/ {
15 model = "mpc7448hpc2"; 16 model = "mpc7448hpc2";
@@ -23,11 +24,11 @@
23 24
24 PowerPC,7448@0 { 25 PowerPC,7448@0 {
25 device_type = "cpu"; 26 device_type = "cpu";
26 reg = <0>; 27 reg = <0x0>;
27 d-cache-line-size = <20>; // 32 bytes 28 d-cache-line-size = <32>; // 32 bytes
28 i-cache-line-size = <20>; // 32 bytes 29 i-cache-line-size = <32>; // 32 bytes
29 d-cache-size = <8000>; // L1, 32K bytes 30 d-cache-size = <0x8000>; // L1, 32K bytes
30 i-cache-size = <8000>; // L1, 32K bytes 31 i-cache-size = <0x8000>; // L1, 32K bytes
31 timebase-frequency = <0>; // 33 MHz, from uboot 32 timebase-frequency = <0>; // 33 MHz, from uboot
32 clock-frequency = <0>; // From U-Boot 33 clock-frequency = <0>; // From U-Boot
33 bus-frequency = <0>; // From U-Boot 34 bus-frequency = <0>; // From U-Boot
@@ -36,7 +37,7 @@
36 37
37 memory { 38 memory {
38 device_type = "memory"; 39 device_type = "memory";
39 reg = <00000000 20000000 // DDR2 512M at 0 40 reg = <0x0 0x20000000 // DDR2 512M at 0
40 >; 41 >;
41 }; 42 };
42 43
@@ -44,14 +45,14 @@
44 #address-cells = <1>; 45 #address-cells = <1>;
45 #size-cells = <1>; 46 #size-cells = <1>;
46 device_type = "tsi-bridge"; 47 device_type = "tsi-bridge";
47 ranges = <00000000 c0000000 00010000>; 48 ranges = <0x0 0xc0000000 0x10000>;
48 reg = <c0000000 00010000>; 49 reg = <0xc0000000 0x10000>;
49 bus-frequency = <0>; 50 bus-frequency = <0>;
50 51
51 i2c@7000 { 52 i2c@7000 {
52 interrupt-parent = <&mpic>; 53 interrupt-parent = <&mpic>;
53 interrupts = <E 0>; 54 interrupts = <14 0>;
54 reg = <7000 400>; 55 reg = <0x7000 0x400>;
55 device_type = "i2c"; 56 device_type = "i2c";
56 compatible = "tsi108-i2c"; 57 compatible = "tsi108-i2c";
57 }; 58 };
@@ -59,20 +60,20 @@
59 MDIO: mdio@6000 { 60 MDIO: mdio@6000 {
60 device_type = "mdio"; 61 device_type = "mdio";
61 compatible = "tsi108-mdio"; 62 compatible = "tsi108-mdio";
62 reg = <6000 50>; 63 reg = <0x6000 0x50>;
63 #address-cells = <1>; 64 #address-cells = <1>;
64 #size-cells = <0>; 65 #size-cells = <0>;
65 66
66 phy8: ethernet-phy@8 { 67 phy8: ethernet-phy@8 {
67 interrupt-parent = <&mpic>; 68 interrupt-parent = <&mpic>;
68 interrupts = <2 1>; 69 interrupts = <2 1>;
69 reg = <8>; 70 reg = <0x8>;
70 }; 71 };
71 72
72 phy9: ethernet-phy@9 { 73 phy9: ethernet-phy@9 {
73 interrupt-parent = <&mpic>; 74 interrupt-parent = <&mpic>;
74 interrupts = <2 1>; 75 interrupts = <2 1>;
75 reg = <9>; 76 reg = <0x9>;
76 }; 77 };
77 78
78 }; 79 };
@@ -82,9 +83,9 @@
82 #size-cells = <0>; 83 #size-cells = <0>;
83 device_type = "network"; 84 device_type = "network";
84 compatible = "tsi108-ethernet"; 85 compatible = "tsi108-ethernet";
85 reg = <6000 200>; 86 reg = <0x6000 0x200>;
86 address = [ 00 06 D2 00 00 01 ]; 87 address = [ 00 06 D2 00 00 01 ];
87 interrupts = <10 2>; 88 interrupts = <16 2>;
88 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
89 mdio-handle = <&MDIO>; 90 mdio-handle = <&MDIO>;
90 phy-handle = <&phy8>; 91 phy-handle = <&phy8>;
@@ -96,9 +97,9 @@
96 #size-cells = <0>; 97 #size-cells = <0>;
97 device_type = "network"; 98 device_type = "network";
98 compatible = "tsi108-ethernet"; 99 compatible = "tsi108-ethernet";
99 reg = <6400 200>; 100 reg = <0x6400 0x200>;
100 address = [ 00 06 D2 00 00 02 ]; 101 address = [ 00 06 D2 00 00 02 ];
101 interrupts = <11 2>; 102 interrupts = <17 2>;
102 interrupt-parent = <&mpic>; 103 interrupt-parent = <&mpic>;
103 mdio-handle = <&MDIO>; 104 mdio-handle = <&MDIO>;
104 phy-handle = <&phy9>; 105 phy-handle = <&phy9>;
@@ -107,18 +108,18 @@
107 serial@7808 { 108 serial@7808 {
108 device_type = "serial"; 109 device_type = "serial";
109 compatible = "ns16550"; 110 compatible = "ns16550";
110 reg = <7808 200>; 111 reg = <0x7808 0x200>;
111 clock-frequency = <3f6b5a00>; 112 clock-frequency = <1064000000>;
112 interrupts = <c 0>; 113 interrupts = <12 0>;
113 interrupt-parent = <&mpic>; 114 interrupt-parent = <&mpic>;
114 }; 115 };
115 116
116 serial@7c08 { 117 serial@7c08 {
117 device_type = "serial"; 118 device_type = "serial";
118 compatible = "ns16550"; 119 compatible = "ns16550";
119 reg = <7c08 200>; 120 reg = <0x7c08 0x200>;
120 clock-frequency = <3f6b5a00>; 121 clock-frequency = <1064000000>;
121 interrupts = <d 0>; 122 interrupts = <13 0>;
122 interrupt-parent = <&mpic>; 123 interrupt-parent = <&mpic>;
123 }; 124 };
124 125
@@ -127,7 +128,7 @@
127 interrupt-controller; 128 interrupt-controller;
128 #address-cells = <0>; 129 #address-cells = <0>;
129 #interrupt-cells = <2>; 130 #interrupt-cells = <2>;
130 reg = <7400 400>; 131 reg = <0x7400 0x400>;
131 compatible = "chrp,open-pic"; 132 compatible = "chrp,open-pic";
132 device_type = "open-pic"; 133 device_type = "open-pic";
133 big-endian; 134 big-endian;
@@ -138,39 +139,39 @@
138 #interrupt-cells = <1>; 139 #interrupt-cells = <1>;
139 #size-cells = <2>; 140 #size-cells = <2>;
140 #address-cells = <3>; 141 #address-cells = <3>;
141 reg = <1000 1000>; 142 reg = <0x1000 0x1000>;
142 bus-range = <0 0>; 143 bus-range = <0 0>;
143 ranges = <02000000 0 e0000000 e0000000 0 1A000000 144 ranges = <0x2000000 0x0 0xe0000000 0xe0000000 0x0 0x1a000000
144 01000000 0 00000000 fa000000 0 00010000>; 145 0x1000000 0x0 0x0 0xfa000000 0x0 0x10000>;
145 clock-frequency = <7f28154>; 146 clock-frequency = <133333332>;
146 interrupt-parent = <&mpic>; 147 interrupt-parent = <&mpic>;
147 interrupts = <17 2>; 148 interrupts = <23 2>;
148 interrupt-map-mask = <f800 0 0 7>; 149 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
149 interrupt-map = < 150 interrupt-map = <
150 151
151 /* IDSEL 0x11 */ 152 /* IDSEL 0x11 */
152 0800 0 0 1 &RT0 24 0 153 0x800 0x0 0x0 0x1 &RT0 0x24 0x0
153 0800 0 0 2 &RT0 25 0 154 0x800 0x0 0x0 0x2 &RT0 0x25 0x0
154 0800 0 0 3 &RT0 26 0 155 0x800 0x0 0x0 0x3 &RT0 0x26 0x0
155 0800 0 0 4 &RT0 27 0 156 0x800 0x0 0x0 0x4 &RT0 0x27 0x0
156 157
157 /* IDSEL 0x12 */ 158 /* IDSEL 0x12 */
158 1000 0 0 1 &RT0 25 0 159 0x1000 0x0 0x0 0x1 &RT0 0x25 0x0
159 1000 0 0 2 &RT0 26 0 160 0x1000 0x0 0x0 0x2 &RT0 0x26 0x0
160 1000 0 0 3 &RT0 27 0 161 0x1000 0x0 0x0 0x3 &RT0 0x27 0x0
161 1000 0 0 4 &RT0 24 0 162 0x1000 0x0 0x0 0x4 &RT0 0x24 0x0
162 163
163 /* IDSEL 0x13 */ 164 /* IDSEL 0x13 */
164 1800 0 0 1 &RT0 26 0 165 0x1800 0x0 0x0 0x1 &RT0 0x26 0x0
165 1800 0 0 2 &RT0 27 0 166 0x1800 0x0 0x0 0x2 &RT0 0x27 0x0
166 1800 0 0 3 &RT0 24 0 167 0x1800 0x0 0x0 0x3 &RT0 0x24 0x0
167 1800 0 0 4 &RT0 25 0 168 0x1800 0x0 0x0 0x4 &RT0 0x25 0x0
168 169
169 /* IDSEL 0x14 */ 170 /* IDSEL 0x14 */
170 2000 0 0 1 &RT0 27 0 171 0x2000 0x0 0x0 0x1 &RT0 0x27 0x0
171 2000 0 0 2 &RT0 24 0 172 0x2000 0x0 0x0 0x2 &RT0 0x24 0x0
172 2000 0 0 3 &RT0 25 0 173 0x2000 0x0 0x0 0x3 &RT0 0x25 0x0
173 2000 0 0 4 &RT0 26 0 174 0x2000 0x0 0x0 0x4 &RT0 0x26 0x0
174 >; 175 >;
175 176
176 RT0: router@1180 { 177 RT0: router@1180 {
@@ -180,7 +181,7 @@
180 #address-cells = <0>; 181 #address-cells = <0>;
181 #interrupt-cells = <2>; 182 #interrupt-cells = <2>;
182 big-endian; 183 big-endian;
183 interrupts = <17 2>; 184 interrupts = <23 2>;
184 interrupt-parent = <&mpic>; 185 interrupt-parent = <&mpic>;
185 }; 186 };
186 }; 187 };
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 7285ca1325fd..46e2da30c3dd 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8272 ADS Device Tree Source 2 * MPC8272 ADS Device Tree Source
3 * 3 *
4 * Copyright 2005 Freescale Semiconductor Inc. 4 * Copyright 2005,2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,8 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
13
12/ { 14/ {
13 model = "MPC8272ADS"; 15 model = "MPC8272ADS";
14 compatible = "fsl,mpc8272ads"; 16 compatible = "fsl,mpc8272ads";
@@ -21,11 +23,11 @@
21 23
22 PowerPC,8272@0 { 24 PowerPC,8272@0 {
23 device_type = "cpu"; 25 device_type = "cpu";
24 reg = <0>; 26 reg = <0x0>;
25 d-cache-line-size = <d#32>; 27 d-cache-line-size = <32>;
26 i-cache-line-size = <d#32>; 28 i-cache-line-size = <32>;
27 d-cache-size = <d#16384>; 29 d-cache-size = <16384>;
28 i-cache-size = <d#16384>; 30 i-cache-size = <16384>;
29 timebase-frequency = <0>; 31 timebase-frequency = <0>;
30 bus-frequency = <0>; 32 bus-frequency = <0>;
31 clock-frequency = <0>; 33 clock-frequency = <0>;
@@ -34,7 +36,7 @@
34 36
35 memory { 37 memory {
36 device_type = "memory"; 38 device_type = "memory";
37 reg = <0 0>; 39 reg = <0x0 0x0>;
38 }; 40 };
39 41
40 localbus@f0010100 { 42 localbus@f0010100 {
@@ -42,21 +44,21 @@
42 "fsl,pq2-localbus"; 44 "fsl,pq2-localbus";
43 #address-cells = <2>; 45 #address-cells = <2>;
44 #size-cells = <1>; 46 #size-cells = <1>;
45 reg = <f0010100 40>; 47 reg = <0xf0010100 0x40>;
46 48
47 ranges = <0 0 fe000000 02000000 49 ranges = <0x0 0x0 0xfe000000 0x2000000
48 1 0 f4500000 00008000 50 0x1 0x0 0xf4500000 0x8000
49 3 0 f8200000 00008000>; 51 0x3 0x0 0xf8200000 0x8000>;
50 52
51 flash@0,0 { 53 flash@0,0 {
52 compatible = "jedec-flash"; 54 compatible = "jedec-flash";
53 reg = <0 0 2000000>; 55 reg = <0x0 0x0 0x2000000>;
54 bank-width = <4>; 56 bank-width = <4>;
55 device-width = <1>; 57 device-width = <1>;
56 }; 58 };
57 59
58 board-control@1,0 { 60 board-control@1,0 {
59 reg = <1 0 20>; 61 reg = <0x1 0x0 0x20>;
60 compatible = "fsl,mpc8272ads-bcsr"; 62 compatible = "fsl,mpc8272ads-bcsr";
61 }; 63 };
62 64
@@ -65,46 +67,46 @@
65 "fsl,pq2ads-pci-pic"; 67 "fsl,pq2ads-pci-pic";
66 #interrupt-cells = <1>; 68 #interrupt-cells = <1>;
67 interrupt-controller; 69 interrupt-controller;
68 reg = <3 0 8>; 70 reg = <0x3 0x0 0x8>;
69 interrupt-parent = <&PIC>; 71 interrupt-parent = <&PIC>;
70 interrupts = <14 8>; 72 interrupts = <20 8>;
71 }; 73 };
72 }; 74 };
73 75
74 76
75 pci@f0010800 { 77 pci@f0010800 {
76 device_type = "pci"; 78 device_type = "pci";
77 reg = <f0010800 10c f00101ac 8 f00101c4 8>; 79 reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
78 compatible = "fsl,mpc8272-pci", "fsl,pq2-pci"; 80 compatible = "fsl,mpc8272-pci", "fsl,pq2-pci";
79 #interrupt-cells = <1>; 81 #interrupt-cells = <1>;
80 #size-cells = <2>; 82 #size-cells = <2>;
81 #address-cells = <3>; 83 #address-cells = <3>;
82 clock-frequency = <d#66666666>; 84 clock-frequency = <66666666>;
83 interrupt-map-mask = <f800 0 0 7>; 85 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
84 interrupt-map = < 86 interrupt-map = <
85 /* IDSEL 0x16 */ 87 /* IDSEL 0x16 */
86 b000 0 0 1 &PCI_PIC 0 88 0xb000 0x0 0x0 0x1 &PCI_PIC 0
87 b000 0 0 2 &PCI_PIC 1 89 0xb000 0x0 0x0 0x2 &PCI_PIC 1
88 b000 0 0 3 &PCI_PIC 2 90 0xb000 0x0 0x0 0x3 &PCI_PIC 2
89 b000 0 0 4 &PCI_PIC 3 91 0xb000 0x0 0x0 0x4 &PCI_PIC 3
90 92
91 /* IDSEL 0x17 */ 93 /* IDSEL 0x17 */
92 b800 0 0 1 &PCI_PIC 4 94 0xb800 0x0 0x0 0x1 &PCI_PIC 4
93 b800 0 0 2 &PCI_PIC 5 95 0xb800 0x0 0x0 0x2 &PCI_PIC 5
94 b800 0 0 3 &PCI_PIC 6 96 0xb800 0x0 0x0 0x3 &PCI_PIC 6
95 b800 0 0 4 &PCI_PIC 7 97 0xb800 0x0 0x0 0x4 &PCI_PIC 7
96 98
97 /* IDSEL 0x18 */ 99 /* IDSEL 0x18 */
98 c000 0 0 1 &PCI_PIC 8 100 0xc000 0x0 0x0 0x1 &PCI_PIC 8
99 c000 0 0 2 &PCI_PIC 9 101 0xc000 0x0 0x0 0x2 &PCI_PIC 9
100 c000 0 0 3 &PCI_PIC a 102 0xc000 0x0 0x0 0x3 &PCI_PIC 10
101 c000 0 0 4 &PCI_PIC b>; 103 0xc000 0x0 0x0 0x4 &PCI_PIC 11>;
102 104
103 interrupt-parent = <&PIC>; 105 interrupt-parent = <&PIC>;
104 interrupts = <12 8>; 106 interrupts = <18 8>;
105 ranges = <42000000 0 80000000 80000000 0 20000000 107 ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x20000000
106 02000000 0 a0000000 a0000000 0 20000000 108 0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
107 01000000 0 00000000 f6000000 0 02000000>; 109 0x1000000 0x0 0x0 0xf6000000 0x0 0x2000000>;
108 }; 110 };
109 111
110 soc@f0000000 { 112 soc@f0000000 {
@@ -112,26 +114,26 @@
112 #size-cells = <1>; 114 #size-cells = <1>;
113 device_type = "soc"; 115 device_type = "soc";
114 compatible = "fsl,mpc8272", "fsl,pq2-soc"; 116 compatible = "fsl,mpc8272", "fsl,pq2-soc";
115 ranges = <00000000 f0000000 00053000>; 117 ranges = <0x0 0xf0000000 0x53000>;
116 118
117 // Temporary -- will go away once kernel uses ranges for get_immrbase(). 119 // Temporary -- will go away once kernel uses ranges for get_immrbase().
118 reg = <f0000000 00053000>; 120 reg = <0xf0000000 0x53000>;
119 121
120 cpm@119c0 { 122 cpm@119c0 {
121 #address-cells = <1>; 123 #address-cells = <1>;
122 #size-cells = <1>; 124 #size-cells = <1>;
123 compatible = "fsl,mpc8272-cpm", "fsl,cpm2"; 125 compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
124 reg = <119c0 30>; 126 reg = <0x119c0 0x30>;
125 ranges; 127 ranges;
126 128
127 muram@0 { 129 muram@0 {
128 #address-cells = <1>; 130 #address-cells = <1>;
129 #size-cells = <1>; 131 #size-cells = <1>;
130 ranges = <0 0 10000>; 132 ranges = <0x0 0x0 0x10000>;
131 133
132 data@0 { 134 data@0 {
133 compatible = "fsl,cpm-muram-data"; 135 compatible = "fsl,cpm-muram-data";
134 reg = <0 2000 9800 800>; 136 reg = <0x0 0x2000 0x9800 0x800>;
135 }; 137 };
136 }; 138 };
137 139
@@ -139,29 +141,29 @@
139 compatible = "fsl,mpc8272-brg", 141 compatible = "fsl,mpc8272-brg",
140 "fsl,cpm2-brg", 142 "fsl,cpm2-brg",
141 "fsl,cpm-brg"; 143 "fsl,cpm-brg";
142 reg = <119f0 10 115f0 10>; 144 reg = <0x119f0 0x10 0x115f0 0x10>;
143 }; 145 };
144 146
145 serial@11a00 { 147 serial@11a00 {
146 device_type = "serial"; 148 device_type = "serial";
147 compatible = "fsl,mpc8272-scc-uart", 149 compatible = "fsl,mpc8272-scc-uart",
148 "fsl,cpm2-scc-uart"; 150 "fsl,cpm2-scc-uart";
149 reg = <11a00 20 8000 100>; 151 reg = <0x11a00 0x20 0x8000 0x100>;
150 interrupts = <28 8>; 152 interrupts = <40 8>;
151 interrupt-parent = <&PIC>; 153 interrupt-parent = <&PIC>;
152 fsl,cpm-brg = <1>; 154 fsl,cpm-brg = <1>;
153 fsl,cpm-command = <00800000>; 155 fsl,cpm-command = <0x800000>;
154 }; 156 };
155 157
156 serial@11a60 { 158 serial@11a60 {
157 device_type = "serial"; 159 device_type = "serial";
158 compatible = "fsl,mpc8272-scc-uart", 160 compatible = "fsl,mpc8272-scc-uart",
159 "fsl,cpm2-scc-uart"; 161 "fsl,cpm2-scc-uart";
160 reg = <11a60 20 8300 100>; 162 reg = <0x11a60 0x20 0x8300 0x100>;
161 interrupts = <2b 8>; 163 interrupts = <43 8>;
162 interrupt-parent = <&PIC>; 164 interrupt-parent = <&PIC>;
163 fsl,cpm-brg = <4>; 165 fsl,cpm-brg = <4>;
164 fsl,cpm-command = <0ce00000>; 166 fsl,cpm-command = <0xce00000>;
165 }; 167 };
166 168
167 mdio@10d40 { 169 mdio@10d40 {
@@ -169,23 +171,23 @@
169 compatible = "fsl,mpc8272ads-mdio-bitbang", 171 compatible = "fsl,mpc8272ads-mdio-bitbang",
170 "fsl,mpc8272-mdio-bitbang", 172 "fsl,mpc8272-mdio-bitbang",
171 "fsl,cpm2-mdio-bitbang"; 173 "fsl,cpm2-mdio-bitbang";
172 reg = <10d40 14>; 174 reg = <0x10d40 0x14>;
173 #address-cells = <1>; 175 #address-cells = <1>;
174 #size-cells = <0>; 176 #size-cells = <0>;
175 fsl,mdio-pin = <12>; 177 fsl,mdio-pin = <18>;
176 fsl,mdc-pin = <13>; 178 fsl,mdc-pin = <19>;
177 179
178 PHY0: ethernet-phy@0 { 180 PHY0: ethernet-phy@0 {
179 interrupt-parent = <&PIC>; 181 interrupt-parent = <&PIC>;
180 interrupts = <17 8>; 182 interrupts = <23 8>;
181 reg = <0>; 183 reg = <0x0>;
182 device_type = "ethernet-phy"; 184 device_type = "ethernet-phy";
183 }; 185 };
184 186
185 PHY1: ethernet-phy@1 { 187 PHY1: ethernet-phy@1 {
186 interrupt-parent = <&PIC>; 188 interrupt-parent = <&PIC>;
187 interrupts = <17 8>; 189 interrupts = <23 8>;
188 reg = <3>; 190 reg = <0x3>;
189 device_type = "ethernet-phy"; 191 device_type = "ethernet-phy";
190 }; 192 };
191 }; 193 };
@@ -194,33 +196,33 @@
194 device_type = "network"; 196 device_type = "network";
195 compatible = "fsl,mpc8272-fcc-enet", 197 compatible = "fsl,mpc8272-fcc-enet",
196 "fsl,cpm2-fcc-enet"; 198 "fsl,cpm2-fcc-enet";
197 reg = <11300 20 8400 100 11390 1>; 199 reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>;
198 local-mac-address = [ 00 00 00 00 00 00 ]; 200 local-mac-address = [ 00 00 00 00 00 00 ];
199 interrupts = <20 8>; 201 interrupts = <32 8>;
200 interrupt-parent = <&PIC>; 202 interrupt-parent = <&PIC>;
201 phy-handle = <&PHY0>; 203 phy-handle = <&PHY0>;
202 linux,network-index = <0>; 204 linux,network-index = <0>;
203 fsl,cpm-command = <12000300>; 205 fsl,cpm-command = <0x12000300>;
204 }; 206 };
205 207
206 ethernet@11320 { 208 ethernet@11320 {
207 device_type = "network"; 209 device_type = "network";
208 compatible = "fsl,mpc8272-fcc-enet", 210 compatible = "fsl,mpc8272-fcc-enet",
209 "fsl,cpm2-fcc-enet"; 211 "fsl,cpm2-fcc-enet";
210 reg = <11320 20 8500 100 113b0 1>; 212 reg = <0x11320 0x20 0x8500 0x100 0x113b0 0x1>;
211 local-mac-address = [ 00 00 00 00 00 00 ]; 213 local-mac-address = [ 00 00 00 00 00 00 ];
212 interrupts = <21 8>; 214 interrupts = <33 8>;
213 interrupt-parent = <&PIC>; 215 interrupt-parent = <&PIC>;
214 phy-handle = <&PHY1>; 216 phy-handle = <&PHY1>;
215 linux,network-index = <1>; 217 linux,network-index = <1>;
216 fsl,cpm-command = <16200300>; 218 fsl,cpm-command = <0x16200300>;
217 }; 219 };
218 }; 220 };
219 221
220 PIC: interrupt-controller@10c00 { 222 PIC: interrupt-controller@10c00 {
221 #interrupt-cells = <2>; 223 #interrupt-cells = <2>;
222 interrupt-controller; 224 interrupt-controller;
223 reg = <10c00 80>; 225 reg = <0x10c00 0x80>;
224 compatible = "fsl,mpc8272-pic", "fsl,cpm2-pic"; 226 compatible = "fsl,mpc8272-pic", "fsl,cpm2-pic";
225 }; 227 };
226 228
@@ -232,14 +234,14 @@
232 "fsl,talitos-sec2", 234 "fsl,talitos-sec2",
233 "fsl,talitos", 235 "fsl,talitos",
234 "talitos"; 236 "talitos";
235 reg = <30000 10000>; 237 reg = <0x30000 0x10000>;
236 interrupts = <b 8>; 238 interrupts = <11 8>;
237 interrupt-parent = <&PIC>; 239 interrupt-parent = <&PIC>;
238 num-channels = <4>; 240 num-channels = <4>;
239 channel-fifo-len = <18>; 241 channel-fifo-len = <24>;
240 exec-units-mask = <0000007e>; 242 exec-units-mask = <0x7e>;
241/* desc mask is for rev1.x, we need runtime fixup for >=2.x */ 243/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
242 descriptor-types-mask = <01010ebf>; 244 descriptor-types-mask = <0x1010ebf>;
243 }; 245 };
244 }; 246 };
245 247
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 9bb408371bcd..539e02fb3526 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -255,9 +255,7 @@
255 enet0: ucc@2200 { 255 enet0: ucc@2200 {
256 device_type = "network"; 256 device_type = "network";
257 compatible = "ucc_geth"; 257 compatible = "ucc_geth";
258 model = "UCC";
259 cell-index = <3>; 258 cell-index = <3>;
260 device-id = <3>;
261 reg = <0x2200 0x200>; 259 reg = <0x2200 0x200>;
262 interrupts = <34>; 260 interrupts = <34>;
263 interrupt-parent = <&qeic>; 261 interrupt-parent = <&qeic>;
@@ -271,9 +269,7 @@
271 enet1: ucc@3200 { 269 enet1: ucc@3200 {
272 device_type = "network"; 270 device_type = "network";
273 compatible = "ucc_geth"; 271 compatible = "ucc_geth";
274 model = "UCC";
275 cell-index = <4>; 272 cell-index = <4>;
276 device-id = <4>;
277 reg = <0x3200 0x200>; 273 reg = <0x3200 0x200>;
278 interrupts = <35>; 274 interrupts = <35>;
279 interrupt-parent = <&qeic>; 275 interrupt-parent = <&qeic>;
@@ -287,8 +283,7 @@
287 ucc@2400 { 283 ucc@2400 {
288 device_type = "serial"; 284 device_type = "serial";
289 compatible = "ucc_uart"; 285 compatible = "ucc_uart";
290 model = "UCC"; 286 cell-index = <5>; /* The UCC number, 1-7*/
291 device-id = <5>; /* The UCC number, 1-7*/
292 port-number = <0>; /* Which ttyQEx device */ 287 port-number = <0>; /* Which ttyQEx device */
293 soft-uart; /* We need Soft-UART */ 288 soft-uart; /* We need Soft-UART */
294 reg = <0x2400 0x200>; 289 reg = <0x2400 0x200>;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 94f93d209de8..179c81c6a7ac 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -208,9 +208,7 @@
208 enet0: ucc@3000 { 208 enet0: ucc@3000 {
209 device_type = "network"; 209 device_type = "network";
210 compatible = "ucc_geth"; 210 compatible = "ucc_geth";
211 model = "UCC";
212 cell-index = <2>; 211 cell-index = <2>;
213 device-id = <2>;
214 reg = <0x3000 0x200>; 212 reg = <0x3000 0x200>;
215 interrupts = <33>; 213 interrupts = <33>;
216 interrupt-parent = <&qeic>; 214 interrupt-parent = <&qeic>;
@@ -224,9 +222,7 @@
224 enet1: ucc@2200 { 222 enet1: ucc@2200 {
225 device_type = "network"; 223 device_type = "network";
226 compatible = "ucc_geth"; 224 compatible = "ucc_geth";
227 model = "UCC";
228 cell-index = <3>; 225 cell-index = <3>;
229 device-id = <3>;
230 reg = <0x2200 0x200>; 226 reg = <0x2200 0x200>;
231 interrupts = <34>; 227 interrupts = <34>;
232 interrupt-parent = <&qeic>; 228 interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 55f03e8dc97f..8160ff24e87e 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -257,9 +257,7 @@
257 enet0: ucc@2000 { 257 enet0: ucc@2000 {
258 device_type = "network"; 258 device_type = "network";
259 compatible = "ucc_geth"; 259 compatible = "ucc_geth";
260 model = "UCC";
261 cell-index = <1>; 260 cell-index = <1>;
262 device-id = <1>;
263 reg = <0x2000 0x200>; 261 reg = <0x2000 0x200>;
264 interrupts = <32>; 262 interrupts = <32>;
265 interrupt-parent = <&qeic>; 263 interrupt-parent = <&qeic>;
@@ -274,9 +272,7 @@
274 enet1: ucc@3000 { 272 enet1: ucc@3000 {
275 device_type = "network"; 273 device_type = "network";
276 compatible = "ucc_geth"; 274 compatible = "ucc_geth";
277 model = "UCC";
278 cell-index = <2>; 275 cell-index = <2>;
279 device-id = <2>;
280 reg = <0x3000 0x200>; 276 reg = <0x3000 0x200>;
281 interrupts = <33>; 277 interrupts = <33>;
282 interrupt-parent = <&qeic>; 278 interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 975248491b7b..18033ed0b535 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8540 ADS Device Tree Source 2 * MPC8540 ADS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8540ADS"; 15 model = "MPC8540ADS";
@@ -31,11 +32,11 @@
31 32
32 PowerPC,8540@0 { 33 PowerPC,8540@0 {
33 device_type = "cpu"; 34 device_type = "cpu";
34 reg = <0>; 35 reg = <0x0>;
35 d-cache-line-size = <20>; // 32 bytes 36 d-cache-line-size = <32>; // 32 bytes
36 i-cache-line-size = <20>; // 32 bytes 37 i-cache-line-size = <32>; // 32 bytes
37 d-cache-size = <8000>; // L1, 32K 38 d-cache-size = <0x8000>; // L1, 32K
38 i-cache-size = <8000>; // L1, 32K 39 i-cache-size = <0x8000>; // L1, 32K
39 timebase-frequency = <0>; // 33 MHz, from uboot 40 timebase-frequency = <0>; // 33 MHz, from uboot
40 bus-frequency = <0>; // 166 MHz 41 bus-frequency = <0>; // 166 MHz
41 clock-frequency = <0>; // 825 MHz, from uboot 42 clock-frequency = <0>; // 825 MHz, from uboot
@@ -44,31 +45,31 @@
44 45
45 memory { 46 memory {
46 device_type = "memory"; 47 device_type = "memory";
47 reg = <00000000 08000000>; // 128M at 0x0 48 reg = <0x0 0x8000000>; // 128M at 0x0
48 }; 49 };
49 50
50 soc8540@e0000000 { 51 soc8540@e0000000 {
51 #address-cells = <1>; 52 #address-cells = <1>;
52 #size-cells = <1>; 53 #size-cells = <1>;
53 device_type = "soc"; 54 device_type = "soc";
54 ranges = <0 e0000000 00100000>; 55 ranges = <0x0 0xe0000000 0x100000>;
55 reg = <e0000000 00100000>; // CCSRBAR 1M 56 reg = <0xe0000000 0x100000>; // CCSRBAR 1M
56 bus-frequency = <0>; 57 bus-frequency = <0>;
57 58
58 memory-controller@2000 { 59 memory-controller@2000 {
59 compatible = "fsl,8540-memory-controller"; 60 compatible = "fsl,8540-memory-controller";
60 reg = <2000 1000>; 61 reg = <0x2000 0x1000>;
61 interrupt-parent = <&mpic>; 62 interrupt-parent = <&mpic>;
62 interrupts = <12 2>; 63 interrupts = <18 2>;
63 }; 64 };
64 65
65 l2-cache-controller@20000 { 66 l2-cache-controller@20000 {
66 compatible = "fsl,8540-l2-cache-controller"; 67 compatible = "fsl,8540-l2-cache-controller";
67 reg = <20000 1000>; 68 reg = <0x20000 0x1000>;
68 cache-line-size = <20>; // 32 bytes 69 cache-line-size = <32>; // 32 bytes
69 cache-size = <40000>; // L2, 256K 70 cache-size = <0x40000>; // L2, 256K
70 interrupt-parent = <&mpic>; 71 interrupt-parent = <&mpic>;
71 interrupts = <10 2>; 72 interrupts = <16 2>;
72 }; 73 };
73 74
74 i2c@3000 { 75 i2c@3000 {
@@ -76,8 +77,8 @@
76 #size-cells = <0>; 77 #size-cells = <0>;
77 cell-index = <0>; 78 cell-index = <0>;
78 compatible = "fsl-i2c"; 79 compatible = "fsl-i2c";
79 reg = <3000 100>; 80 reg = <0x3000 0x100>;
80 interrupts = <2b 2>; 81 interrupts = <43 2>;
81 interrupt-parent = <&mpic>; 82 interrupt-parent = <&mpic>;
82 dfsrr; 83 dfsrr;
83 }; 84 };
@@ -86,24 +87,24 @@
86 #address-cells = <1>; 87 #address-cells = <1>;
87 #size-cells = <0>; 88 #size-cells = <0>;
88 compatible = "fsl,gianfar-mdio"; 89 compatible = "fsl,gianfar-mdio";
89 reg = <24520 20>; 90 reg = <0x24520 0x20>;
90 91
91 phy0: ethernet-phy@0 { 92 phy0: ethernet-phy@0 {
92 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
93 interrupts = <5 1>; 94 interrupts = <5 1>;
94 reg = <0>; 95 reg = <0x0>;
95 device_type = "ethernet-phy"; 96 device_type = "ethernet-phy";
96 }; 97 };
97 phy1: ethernet-phy@1 { 98 phy1: ethernet-phy@1 {
98 interrupt-parent = <&mpic>; 99 interrupt-parent = <&mpic>;
99 interrupts = <5 1>; 100 interrupts = <5 1>;
100 reg = <1>; 101 reg = <0x1>;
101 device_type = "ethernet-phy"; 102 device_type = "ethernet-phy";
102 }; 103 };
103 phy3: ethernet-phy@3 { 104 phy3: ethernet-phy@3 {
104 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
105 interrupts = <7 1>; 106 interrupts = <7 1>;
106 reg = <3>; 107 reg = <0x3>;
107 device_type = "ethernet-phy"; 108 device_type = "ethernet-phy";
108 }; 109 };
109 }; 110 };
@@ -113,9 +114,9 @@
113 device_type = "network"; 114 device_type = "network";
114 model = "TSEC"; 115 model = "TSEC";
115 compatible = "gianfar"; 116 compatible = "gianfar";
116 reg = <24000 1000>; 117 reg = <0x24000 0x1000>;
117 local-mac-address = [ 00 00 00 00 00 00 ]; 118 local-mac-address = [ 00 00 00 00 00 00 ];
118 interrupts = <1d 2 1e 2 22 2>; 119 interrupts = <29 2 30 2 34 2>;
119 interrupt-parent = <&mpic>; 120 interrupt-parent = <&mpic>;
120 phy-handle = <&phy0>; 121 phy-handle = <&phy0>;
121 }; 122 };
@@ -125,9 +126,9 @@
125 device_type = "network"; 126 device_type = "network";
126 model = "TSEC"; 127 model = "TSEC";
127 compatible = "gianfar"; 128 compatible = "gianfar";
128 reg = <25000 1000>; 129 reg = <0x25000 0x1000>;
129 local-mac-address = [ 00 00 00 00 00 00 ]; 130 local-mac-address = [ 00 00 00 00 00 00 ];
130 interrupts = <23 2 24 2 28 2>; 131 interrupts = <35 2 36 2 40 2>;
131 interrupt-parent = <&mpic>; 132 interrupt-parent = <&mpic>;
132 phy-handle = <&phy1>; 133 phy-handle = <&phy1>;
133 }; 134 };
@@ -137,9 +138,9 @@
137 device_type = "network"; 138 device_type = "network";
138 model = "FEC"; 139 model = "FEC";
139 compatible = "gianfar"; 140 compatible = "gianfar";
140 reg = <26000 1000>; 141 reg = <0x26000 0x1000>;
141 local-mac-address = [ 00 00 00 00 00 00 ]; 142 local-mac-address = [ 00 00 00 00 00 00 ];
142 interrupts = <29 2>; 143 interrupts = <41 2>;
143 interrupt-parent = <&mpic>; 144 interrupt-parent = <&mpic>;
144 phy-handle = <&phy3>; 145 phy-handle = <&phy3>;
145 }; 146 };
@@ -148,9 +149,9 @@
148 cell-index = <0>; 149 cell-index = <0>;
149 device_type = "serial"; 150 device_type = "serial";
150 compatible = "ns16550"; 151 compatible = "ns16550";
151 reg = <4500 100>; // reg base, size 152 reg = <0x4500 0x100>; // reg base, size
152 clock-frequency = <0>; // should we fill in in uboot? 153 clock-frequency = <0>; // should we fill in in uboot?
153 interrupts = <2a 2>; 154 interrupts = <42 2>;
154 interrupt-parent = <&mpic>; 155 interrupt-parent = <&mpic>;
155 }; 156 };
156 157
@@ -158,9 +159,9 @@
158 cell-index = <1>; 159 cell-index = <1>;
159 device_type = "serial"; 160 device_type = "serial";
160 compatible = "ns16550"; 161 compatible = "ns16550";
161 reg = <4600 100>; // reg base, size 162 reg = <0x4600 0x100>; // reg base, size
162 clock-frequency = <0>; // should we fill in in uboot? 163 clock-frequency = <0>; // should we fill in in uboot?
163 interrupts = <2a 2>; 164 interrupts = <42 2>;
164 interrupt-parent = <&mpic>; 165 interrupt-parent = <&mpic>;
165 }; 166 };
166 mpic: pic@40000 { 167 mpic: pic@40000 {
@@ -168,7 +169,7 @@
168 interrupt-controller; 169 interrupt-controller;
169 #address-cells = <0>; 170 #address-cells = <0>;
170 #interrupt-cells = <2>; 171 #interrupt-cells = <2>;
171 reg = <40000 40000>; 172 reg = <0x40000 0x40000>;
172 compatible = "chrp,open-pic"; 173 compatible = "chrp,open-pic";
173 device_type = "open-pic"; 174 device_type = "open-pic";
174 big-endian; 175 big-endian;
@@ -177,90 +178,90 @@
177 178
178 pci0: pci@e0008000 { 179 pci0: pci@e0008000 {
179 cell-index = <0>; 180 cell-index = <0>;
180 interrupt-map-mask = <f800 0 0 7>; 181 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
181 interrupt-map = < 182 interrupt-map = <
182 183
183 /* IDSEL 0x02 */ 184 /* IDSEL 0x02 */
184 1000 0 0 1 &mpic 1 1 185 0x1000 0x0 0x0 0x1 &mpic 0x1 0x1
185 1000 0 0 2 &mpic 2 1 186 0x1000 0x0 0x0 0x2 &mpic 0x2 0x1
186 1000 0 0 3 &mpic 3 1 187 0x1000 0x0 0x0 0x3 &mpic 0x3 0x1
187 1000 0 0 4 &mpic 4 1 188 0x1000 0x0 0x0 0x4 &mpic 0x4 0x1
188 189
189 /* IDSEL 0x03 */ 190 /* IDSEL 0x03 */
190 1800 0 0 1 &mpic 4 1 191 0x1800 0x0 0x0 0x1 &mpic 0x4 0x1
191 1800 0 0 2 &mpic 1 1 192 0x1800 0x0 0x0 0x2 &mpic 0x1 0x1
192 1800 0 0 3 &mpic 2 1 193 0x1800 0x0 0x0 0x3 &mpic 0x2 0x1
193 1800 0 0 4 &mpic 3 1 194 0x1800 0x0 0x0 0x4 &mpic 0x3 0x1
194 195
195 /* IDSEL 0x04 */ 196 /* IDSEL 0x04 */
196 2000 0 0 1 &mpic 3 1 197 0x2000 0x0 0x0 0x1 &mpic 0x3 0x1
197 2000 0 0 2 &mpic 4 1 198 0x2000 0x0 0x0 0x2 &mpic 0x4 0x1
198 2000 0 0 3 &mpic 1 1 199 0x2000 0x0 0x0 0x3 &mpic 0x1 0x1
199 2000 0 0 4 &mpic 2 1 200 0x2000 0x0 0x0 0x4 &mpic 0x2 0x1
200 201
201 /* IDSEL 0x05 */ 202 /* IDSEL 0x05 */
202 2800 0 0 1 &mpic 2 1 203 0x2800 0x0 0x0 0x1 &mpic 0x2 0x1
203 2800 0 0 2 &mpic 3 1 204 0x2800 0x0 0x0 0x2 &mpic 0x3 0x1
204 2800 0 0 3 &mpic 4 1 205 0x2800 0x0 0x0 0x3 &mpic 0x4 0x1
205 2800 0 0 4 &mpic 1 1 206 0x2800 0x0 0x0 0x4 &mpic 0x1 0x1
206 207
207 /* IDSEL 0x0c */ 208 /* IDSEL 0x0c */
208 6000 0 0 1 &mpic 1 1 209 0x6000 0x0 0x0 0x1 &mpic 0x1 0x1
209 6000 0 0 2 &mpic 2 1 210 0x6000 0x0 0x0 0x2 &mpic 0x2 0x1
210 6000 0 0 3 &mpic 3 1 211 0x6000 0x0 0x0 0x3 &mpic 0x3 0x1
211 6000 0 0 4 &mpic 4 1 212 0x6000 0x0 0x0 0x4 &mpic 0x4 0x1
212 213
213 /* IDSEL 0x0d */ 214 /* IDSEL 0x0d */
214 6800 0 0 1 &mpic 4 1 215 0x6800 0x0 0x0 0x1 &mpic 0x4 0x1
215 6800 0 0 2 &mpic 1 1 216 0x6800 0x0 0x0 0x2 &mpic 0x1 0x1
216 6800 0 0 3 &mpic 2 1 217 0x6800 0x0 0x0 0x3 &mpic 0x2 0x1
217 6800 0 0 4 &mpic 3 1 218 0x6800 0x0 0x0 0x4 &mpic 0x3 0x1
218 219
219 /* IDSEL 0x0e */ 220 /* IDSEL 0x0e */
220 7000 0 0 1 &mpic 3 1 221 0x7000 0x0 0x0 0x1 &mpic 0x3 0x1
221 7000 0 0 2 &mpic 4 1 222 0x7000 0x0 0x0 0x2 &mpic 0x4 0x1
222 7000 0 0 3 &mpic 1 1 223 0x7000 0x0 0x0 0x3 &mpic 0x1 0x1
223 7000 0 0 4 &mpic 2 1 224 0x7000 0x0 0x0 0x4 &mpic 0x2 0x1
224 225
225 /* IDSEL 0x0f */ 226 /* IDSEL 0x0f */
226 7800 0 0 1 &mpic 2 1 227 0x7800 0x0 0x0 0x1 &mpic 0x2 0x1
227 7800 0 0 2 &mpic 3 1 228 0x7800 0x0 0x0 0x2 &mpic 0x3 0x1
228 7800 0 0 3 &mpic 4 1 229 0x7800 0x0 0x0 0x3 &mpic 0x4 0x1
229 7800 0 0 4 &mpic 1 1 230 0x7800 0x0 0x0 0x4 &mpic 0x1 0x1
230 231
231 /* IDSEL 0x12 */ 232 /* IDSEL 0x12 */
232 9000 0 0 1 &mpic 1 1 233 0x9000 0x0 0x0 0x1 &mpic 0x1 0x1
233 9000 0 0 2 &mpic 2 1 234 0x9000 0x0 0x0 0x2 &mpic 0x2 0x1
234 9000 0 0 3 &mpic 3 1 235 0x9000 0x0 0x0 0x3 &mpic 0x3 0x1
235 9000 0 0 4 &mpic 4 1 236 0x9000 0x0 0x0 0x4 &mpic 0x4 0x1
236 237
237 /* IDSEL 0x13 */ 238 /* IDSEL 0x13 */
238 9800 0 0 1 &mpic 4 1 239 0x9800 0x0 0x0 0x1 &mpic 0x4 0x1
239 9800 0 0 2 &mpic 1 1 240 0x9800 0x0 0x0 0x2 &mpic 0x1 0x1
240 9800 0 0 3 &mpic 2 1 241 0x9800 0x0 0x0 0x3 &mpic 0x2 0x1
241 9800 0 0 4 &mpic 3 1 242 0x9800 0x0 0x0 0x4 &mpic 0x3 0x1
242 243
243 /* IDSEL 0x14 */ 244 /* IDSEL 0x14 */
244 a000 0 0 1 &mpic 3 1 245 0xa000 0x0 0x0 0x1 &mpic 0x3 0x1
245 a000 0 0 2 &mpic 4 1 246 0xa000 0x0 0x0 0x2 &mpic 0x4 0x1
246 a000 0 0 3 &mpic 1 1 247 0xa000 0x0 0x0 0x3 &mpic 0x1 0x1
247 a000 0 0 4 &mpic 2 1 248 0xa000 0x0 0x0 0x4 &mpic 0x2 0x1
248 249
249 /* IDSEL 0x15 */ 250 /* IDSEL 0x15 */
250 a800 0 0 1 &mpic 2 1 251 0xa800 0x0 0x0 0x1 &mpic 0x2 0x1
251 a800 0 0 2 &mpic 3 1 252 0xa800 0x0 0x0 0x2 &mpic 0x3 0x1
252 a800 0 0 3 &mpic 4 1 253 0xa800 0x0 0x0 0x3 &mpic 0x4 0x1
253 a800 0 0 4 &mpic 1 1>; 254 0xa800 0x0 0x0 0x4 &mpic 0x1 0x1>;
254 interrupt-parent = <&mpic>; 255 interrupt-parent = <&mpic>;
255 interrupts = <18 2>; 256 interrupts = <24 2>;
256 bus-range = <0 0>; 257 bus-range = <0 0>;
257 ranges = <02000000 0 80000000 80000000 0 20000000 258 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
258 01000000 0 00000000 e2000000 0 00100000>; 259 0x1000000 0x0 0x0 0xe2000000 0x0 0x100000>;
259 clock-frequency = <3f940aa>; 260 clock-frequency = <66666666>;
260 #interrupt-cells = <1>; 261 #interrupt-cells = <1>;
261 #size-cells = <2>; 262 #size-cells = <2>;
262 #address-cells = <3>; 263 #address-cells = <3>;
263 reg = <e0008000 1000>; 264 reg = <0xe0008000 0x1000>;
264 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; 265 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
265 device_type = "pci"; 266 device_type = "pci";
266 }; 267 };
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index fa8d9aaad157..663c7c50ca45 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8541 CDS Device Tree Source 2 * MPC8541 CDS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8541CDS"; 15 model = "MPC8541CDS";
@@ -31,11 +32,11 @@
31 32
32 PowerPC,8541@0 { 33 PowerPC,8541@0 {
33 device_type = "cpu"; 34 device_type = "cpu";
34 reg = <0>; 35 reg = <0x0>;
35 d-cache-line-size = <20>; // 32 bytes 36 d-cache-line-size = <32>; // 32 bytes
36 i-cache-line-size = <20>; // 32 bytes 37 i-cache-line-size = <32>; // 32 bytes
37 d-cache-size = <8000>; // L1, 32K 38 d-cache-size = <0x8000>; // L1, 32K
38 i-cache-size = <8000>; // L1, 32K 39 i-cache-size = <0x8000>; // L1, 32K
39 timebase-frequency = <0>; // 33 MHz, from uboot 40 timebase-frequency = <0>; // 33 MHz, from uboot
40 bus-frequency = <0>; // 166 MHz 41 bus-frequency = <0>; // 166 MHz
41 clock-frequency = <0>; // 825 MHz, from uboot 42 clock-frequency = <0>; // 825 MHz, from uboot
@@ -44,31 +45,31 @@
44 45
45 memory { 46 memory {
46 device_type = "memory"; 47 device_type = "memory";
47 reg = <00000000 08000000>; // 128M at 0x0 48 reg = <0x0 0x8000000>; // 128M at 0x0
48 }; 49 };
49 50
50 soc8541@e0000000 { 51 soc8541@e0000000 {
51 #address-cells = <1>; 52 #address-cells = <1>;
52 #size-cells = <1>; 53 #size-cells = <1>;
53 device_type = "soc"; 54 device_type = "soc";
54 ranges = <0 e0000000 00100000>; 55 ranges = <0x0 0xe0000000 0x100000>;
55 reg = <e0000000 00001000>; // CCSRBAR 1M 56 reg = <0xe0000000 0x1000>; // CCSRBAR 1M
56 bus-frequency = <0>; 57 bus-frequency = <0>;
57 58
58 memory-controller@2000 { 59 memory-controller@2000 {
59 compatible = "fsl,8541-memory-controller"; 60 compatible = "fsl,8541-memory-controller";
60 reg = <2000 1000>; 61 reg = <0x2000 0x1000>;
61 interrupt-parent = <&mpic>; 62 interrupt-parent = <&mpic>;
62 interrupts = <12 2>; 63 interrupts = <18 2>;
63 }; 64 };
64 65
65 l2-cache-controller@20000 { 66 l2-cache-controller@20000 {
66 compatible = "fsl,8541-l2-cache-controller"; 67 compatible = "fsl,8541-l2-cache-controller";
67 reg = <20000 1000>; 68 reg = <0x20000 0x1000>;
68 cache-line-size = <20>; // 32 bytes 69 cache-line-size = <32>; // 32 bytes
69 cache-size = <40000>; // L2, 256K 70 cache-size = <0x40000>; // L2, 256K
70 interrupt-parent = <&mpic>; 71 interrupt-parent = <&mpic>;
71 interrupts = <10 2>; 72 interrupts = <16 2>;
72 }; 73 };
73 74
74 i2c@3000 { 75 i2c@3000 {
@@ -76,8 +77,8 @@
76 #size-cells = <0>; 77 #size-cells = <0>;
77 cell-index = <0>; 78 cell-index = <0>;
78 compatible = "fsl-i2c"; 79 compatible = "fsl-i2c";
79 reg = <3000 100>; 80 reg = <0x3000 0x100>;
80 interrupts = <2b 2>; 81 interrupts = <43 2>;
81 interrupt-parent = <&mpic>; 82 interrupt-parent = <&mpic>;
82 dfsrr; 83 dfsrr;
83 }; 84 };
@@ -86,18 +87,18 @@
86 #address-cells = <1>; 87 #address-cells = <1>;
87 #size-cells = <0>; 88 #size-cells = <0>;
88 compatible = "fsl,gianfar-mdio"; 89 compatible = "fsl,gianfar-mdio";
89 reg = <24520 20>; 90 reg = <0x24520 0x20>;
90 91
91 phy0: ethernet-phy@0 { 92 phy0: ethernet-phy@0 {
92 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
93 interrupts = <5 1>; 94 interrupts = <5 1>;
94 reg = <0>; 95 reg = <0x0>;
95 device_type = "ethernet-phy"; 96 device_type = "ethernet-phy";
96 }; 97 };
97 phy1: ethernet-phy@1 { 98 phy1: ethernet-phy@1 {
98 interrupt-parent = <&mpic>; 99 interrupt-parent = <&mpic>;
99 interrupts = <5 1>; 100 interrupts = <5 1>;
100 reg = <1>; 101 reg = <0x1>;
101 device_type = "ethernet-phy"; 102 device_type = "ethernet-phy";
102 }; 103 };
103 }; 104 };
@@ -107,9 +108,9 @@
107 device_type = "network"; 108 device_type = "network";
108 model = "TSEC"; 109 model = "TSEC";
109 compatible = "gianfar"; 110 compatible = "gianfar";
110 reg = <24000 1000>; 111 reg = <0x24000 0x1000>;
111 local-mac-address = [ 00 00 00 00 00 00 ]; 112 local-mac-address = [ 00 00 00 00 00 00 ];
112 interrupts = <1d 2 1e 2 22 2>; 113 interrupts = <29 2 30 2 34 2>;
113 interrupt-parent = <&mpic>; 114 interrupt-parent = <&mpic>;
114 phy-handle = <&phy0>; 115 phy-handle = <&phy0>;
115 }; 116 };
@@ -119,9 +120,9 @@
119 device_type = "network"; 120 device_type = "network";
120 model = "TSEC"; 121 model = "TSEC";
121 compatible = "gianfar"; 122 compatible = "gianfar";
122 reg = <25000 1000>; 123 reg = <0x25000 0x1000>;
123 local-mac-address = [ 00 00 00 00 00 00 ]; 124 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <23 2 24 2 28 2>; 125 interrupts = <35 2 36 2 40 2>;
125 interrupt-parent = <&mpic>; 126 interrupt-parent = <&mpic>;
126 phy-handle = <&phy1>; 127 phy-handle = <&phy1>;
127 }; 128 };
@@ -130,9 +131,9 @@
130 cell-index = <0>; 131 cell-index = <0>;
131 device_type = "serial"; 132 device_type = "serial";
132 compatible = "ns16550"; 133 compatible = "ns16550";
133 reg = <4500 100>; // reg base, size 134 reg = <0x4500 0x100>; // reg base, size
134 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
135 interrupts = <2a 2>; 136 interrupts = <42 2>;
136 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
137 }; 138 };
138 139
@@ -140,9 +141,9 @@
140 cell-index = <1>; 141 cell-index = <1>;
141 device_type = "serial"; 142 device_type = "serial";
142 compatible = "ns16550"; 143 compatible = "ns16550";
143 reg = <4600 100>; // reg base, size 144 reg = <0x4600 0x100>; // reg base, size
144 clock-frequency = <0>; // should we fill in in uboot? 145 clock-frequency = <0>; // should we fill in in uboot?
145 interrupts = <2a 2>; 146 interrupts = <42 2>;
146 interrupt-parent = <&mpic>; 147 interrupt-parent = <&mpic>;
147 }; 148 };
148 149
@@ -151,7 +152,7 @@
151 interrupt-controller; 152 interrupt-controller;
152 #address-cells = <0>; 153 #address-cells = <0>;
153 #interrupt-cells = <2>; 154 #interrupt-cells = <2>;
154 reg = <40000 40000>; 155 reg = <0x40000 0x40000>;
155 compatible = "chrp,open-pic"; 156 compatible = "chrp,open-pic";
156 device_type = "open-pic"; 157 device_type = "open-pic";
157 big-endian; 158 big-endian;
@@ -161,17 +162,17 @@
161 #address-cells = <1>; 162 #address-cells = <1>;
162 #size-cells = <1>; 163 #size-cells = <1>;
163 compatible = "fsl,mpc8541-cpm", "fsl,cpm2"; 164 compatible = "fsl,mpc8541-cpm", "fsl,cpm2";
164 reg = <919c0 30>; 165 reg = <0x919c0 0x30>;
165 ranges; 166 ranges;
166 167
167 muram@80000 { 168 muram@80000 {
168 #address-cells = <1>; 169 #address-cells = <1>;
169 #size-cells = <1>; 170 #size-cells = <1>;
170 ranges = <0 80000 10000>; 171 ranges = <0x0 0x80000 0x10000>;
171 172
172 data@0 { 173 data@0 {
173 compatible = "fsl,cpm-muram-data"; 174 compatible = "fsl,cpm-muram-data";
174 reg = <0 2000 9000 1000>; 175 reg = <0x0 0x2000 0x9000 0x1000>;
175 }; 176 };
176 }; 177 };
177 178
@@ -179,16 +180,16 @@
179 compatible = "fsl,mpc8541-brg", 180 compatible = "fsl,mpc8541-brg",
180 "fsl,cpm2-brg", 181 "fsl,cpm2-brg",
181 "fsl,cpm-brg"; 182 "fsl,cpm-brg";
182 reg = <919f0 10 915f0 10>; 183 reg = <0x919f0 0x10 0x915f0 0x10>;
183 }; 184 };
184 185
185 cpmpic: pic@90c00 { 186 cpmpic: pic@90c00 {
186 interrupt-controller; 187 interrupt-controller;
187 #address-cells = <0>; 188 #address-cells = <0>;
188 #interrupt-cells = <2>; 189 #interrupt-cells = <2>;
189 interrupts = <2e 2>; 190 interrupts = <46 2>;
190 interrupt-parent = <&mpic>; 191 interrupt-parent = <&mpic>;
191 reg = <90c00 80>; 192 reg = <0x90c00 0x80>;
192 compatible = "fsl,mpc8541-cpm-pic", "fsl,cpm2-pic"; 193 compatible = "fsl,mpc8541-cpm-pic", "fsl,cpm2-pic";
193 }; 194 };
194 }; 195 };
@@ -196,68 +197,68 @@
196 197
197 pci0: pci@e0008000 { 198 pci0: pci@e0008000 {
198 cell-index = <0>; 199 cell-index = <0>;
199 interrupt-map-mask = <1f800 0 0 7>; 200 interrupt-map-mask = <0x1f800 0x0 0x0 0x7>;
200 interrupt-map = < 201 interrupt-map = <
201 202
202 /* IDSEL 0x10 */ 203 /* IDSEL 0x10 */
203 08000 0 0 1 &mpic 0 1 204 0x8000 0x0 0x0 0x1 &mpic 0x0 0x1
204 08000 0 0 2 &mpic 1 1 205 0x8000 0x0 0x0 0x2 &mpic 0x1 0x1
205 08000 0 0 3 &mpic 2 1 206 0x8000 0x0 0x0 0x3 &mpic 0x2 0x1
206 08000 0 0 4 &mpic 3 1 207 0x8000 0x0 0x0 0x4 &mpic 0x3 0x1
207 208
208 /* IDSEL 0x11 */ 209 /* IDSEL 0x11 */
209 08800 0 0 1 &mpic 0 1 210 0x8800 0x0 0x0 0x1 &mpic 0x0 0x1
210 08800 0 0 2 &mpic 1 1 211 0x8800 0x0 0x0 0x2 &mpic 0x1 0x1
211 08800 0 0 3 &mpic 2 1 212 0x8800 0x0 0x0 0x3 &mpic 0x2 0x1
212 08800 0 0 4 &mpic 3 1 213 0x8800 0x0 0x0 0x4 &mpic 0x3 0x1
213 214
214 /* IDSEL 0x12 (Slot 1) */ 215 /* IDSEL 0x12 (Slot 1) */
215 09000 0 0 1 &mpic 0 1 216 0x9000 0x0 0x0 0x1 &mpic 0x0 0x1
216 09000 0 0 2 &mpic 1 1 217 0x9000 0x0 0x0 0x2 &mpic 0x1 0x1
217 09000 0 0 3 &mpic 2 1 218 0x9000 0x0 0x0 0x3 &mpic 0x2 0x1
218 09000 0 0 4 &mpic 3 1 219 0x9000 0x0 0x0 0x4 &mpic 0x3 0x1
219 220
220 /* IDSEL 0x13 (Slot 2) */ 221 /* IDSEL 0x13 (Slot 2) */
221 09800 0 0 1 &mpic 1 1 222 0x9800 0x0 0x0 0x1 &mpic 0x1 0x1
222 09800 0 0 2 &mpic 2 1 223 0x9800 0x0 0x0 0x2 &mpic 0x2 0x1
223 09800 0 0 3 &mpic 3 1 224 0x9800 0x0 0x0 0x3 &mpic 0x3 0x1
224 09800 0 0 4 &mpic 0 1 225 0x9800 0x0 0x0 0x4 &mpic 0x0 0x1
225 226
226 /* IDSEL 0x14 (Slot 3) */ 227 /* IDSEL 0x14 (Slot 3) */
227 0a000 0 0 1 &mpic 2 1 228 0xa000 0x0 0x0 0x1 &mpic 0x2 0x1
228 0a000 0 0 2 &mpic 3 1 229 0xa000 0x0 0x0 0x2 &mpic 0x3 0x1
229 0a000 0 0 3 &mpic 0 1 230 0xa000 0x0 0x0 0x3 &mpic 0x0 0x1
230 0a000 0 0 4 &mpic 1 1 231 0xa000 0x0 0x0 0x4 &mpic 0x1 0x1
231 232
232 /* IDSEL 0x15 (Slot 4) */ 233 /* IDSEL 0x15 (Slot 4) */
233 0a800 0 0 1 &mpic 3 1 234 0xa800 0x0 0x0 0x1 &mpic 0x3 0x1
234 0a800 0 0 2 &mpic 0 1 235 0xa800 0x0 0x0 0x2 &mpic 0x0 0x1
235 0a800 0 0 3 &mpic 1 1 236 0xa800 0x0 0x0 0x3 &mpic 0x1 0x1
236 0a800 0 0 4 &mpic 2 1 237 0xa800 0x0 0x0 0x4 &mpic 0x2 0x1
237 238
238 /* Bus 1 (Tundra Bridge) */ 239 /* Bus 1 (Tundra Bridge) */
239 /* IDSEL 0x12 (ISA bridge) */ 240 /* IDSEL 0x12 (ISA bridge) */
240 19000 0 0 1 &mpic 0 1 241 0x19000 0x0 0x0 0x1 &mpic 0x0 0x1
241 19000 0 0 2 &mpic 1 1 242 0x19000 0x0 0x0 0x2 &mpic 0x1 0x1
242 19000 0 0 3 &mpic 2 1 243 0x19000 0x0 0x0 0x3 &mpic 0x2 0x1
243 19000 0 0 4 &mpic 3 1>; 244 0x19000 0x0 0x0 0x4 &mpic 0x3 0x1>;
244 interrupt-parent = <&mpic>; 245 interrupt-parent = <&mpic>;
245 interrupts = <18 2>; 246 interrupts = <24 2>;
246 bus-range = <0 0>; 247 bus-range = <0 0>;
247 ranges = <02000000 0 80000000 80000000 0 20000000 248 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
248 01000000 0 00000000 e2000000 0 00100000>; 249 0x1000000 0x0 0x0 0xe2000000 0x0 0x100000>;
249 clock-frequency = <3f940aa>; 250 clock-frequency = <66666666>;
250 #interrupt-cells = <1>; 251 #interrupt-cells = <1>;
251 #size-cells = <2>; 252 #size-cells = <2>;
252 #address-cells = <3>; 253 #address-cells = <3>;
253 reg = <e0008000 1000>; 254 reg = <0xe0008000 0x1000>;
254 compatible = "fsl,mpc8540-pci"; 255 compatible = "fsl,mpc8540-pci";
255 device_type = "pci"; 256 device_type = "pci";
256 257
257 i8259@19000 { 258 i8259@19000 {
258 interrupt-controller; 259 interrupt-controller;
259 device_type = "interrupt-controller"; 260 device_type = "interrupt-controller";
260 reg = <19000 0 0 0 1>; 261 reg = <0x19000 0x0 0x0 0x0 0x1>;
261 #address-cells = <0>; 262 #address-cells = <0>;
262 #interrupt-cells = <2>; 263 #interrupt-cells = <2>;
263 compatible = "chrp,iic"; 264 compatible = "chrp,iic";
@@ -268,24 +269,24 @@
268 269
269 pci1: pci@e0009000 { 270 pci1: pci@e0009000 {
270 cell-index = <1>; 271 cell-index = <1>;
271 interrupt-map-mask = <f800 0 0 7>; 272 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
272 interrupt-map = < 273 interrupt-map = <
273 274
274 /* IDSEL 0x15 */ 275 /* IDSEL 0x15 */
275 a800 0 0 1 &mpic b 1 276 0xa800 0x0 0x0 0x1 &mpic 0xb 0x1
276 a800 0 0 2 &mpic b 1 277 0xa800 0x0 0x0 0x2 &mpic 0xb 0x1
277 a800 0 0 3 &mpic b 1 278 0xa800 0x0 0x0 0x3 &mpic 0xb 0x1
278 a800 0 0 4 &mpic b 1>; 279 0xa800 0x0 0x0 0x4 &mpic 0xb 0x1>;
279 interrupt-parent = <&mpic>; 280 interrupt-parent = <&mpic>;
280 interrupts = <19 2>; 281 interrupts = <25 2>;
281 bus-range = <0 0>; 282 bus-range = <0 0>;
282 ranges = <02000000 0 a0000000 a0000000 0 20000000 283 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
283 01000000 0 00000000 e3000000 0 00100000>; 284 0x1000000 0x0 0x0 0xe3000000 0x0 0x100000>;
284 clock-frequency = <3f940aa>; 285 clock-frequency = <66666666>;
285 #interrupt-cells = <1>; 286 #interrupt-cells = <1>;
286 #size-cells = <2>; 287 #size-cells = <2>;
287 #address-cells = <3>; 288 #address-cells = <3>;
288 reg = <e0009000 1000>; 289 reg = <0xe0009000 0x1000>;
289 compatible = "fsl,mpc8540-pci"; 290 compatible = "fsl,mpc8540-pci";
290 device_type = "pci"; 291 device_type = "pci";
291 }; 292 };
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 688af9d06382..6a0d8db96d97 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8544 DS Device Tree Source 2 * MPC8544 DS Device Tree Source
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor Inc. 4 * Copyright 2007, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12/ { 13/ {
13 model = "MPC8544DS"; 14 model = "MPC8544DS";
14 compatible = "MPC8544DS", "MPC85xxDS"; 15 compatible = "MPC8544DS", "MPC85xxDS";
@@ -27,17 +28,16 @@
27 }; 28 };
28 29
29 cpus { 30 cpus {
30 #cpus = <1>;
31 #address-cells = <1>; 31 #address-cells = <1>;
32 #size-cells = <0>; 32 #size-cells = <0>;
33 33
34 PowerPC,8544@0 { 34 PowerPC,8544@0 {
35 device_type = "cpu"; 35 device_type = "cpu";
36 reg = <0>; 36 reg = <0x0>;
37 d-cache-line-size = <20>; // 32 bytes 37 d-cache-line-size = <32>; // 32 bytes
38 i-cache-line-size = <20>; // 32 bytes 38 i-cache-line-size = <32>; // 32 bytes
39 d-cache-size = <8000>; // L1, 32K 39 d-cache-size = <0x8000>; // L1, 32K
40 i-cache-size = <8000>; // L1, 32K 40 i-cache-size = <0x8000>; // L1, 32K
41 timebase-frequency = <0>; 41 timebase-frequency = <0>;
42 bus-frequency = <0>; 42 bus-frequency = <0>;
43 clock-frequency = <0>; 43 clock-frequency = <0>;
@@ -46,7 +46,7 @@
46 46
47 memory { 47 memory {
48 device_type = "memory"; 48 device_type = "memory";
49 reg = <00000000 00000000>; // Filled by U-Boot 49 reg = <0x0 0x0>; // Filled by U-Boot
50 }; 50 };
51 51
52 soc8544@e0000000 { 52 soc8544@e0000000 {
@@ -54,24 +54,24 @@
54 #size-cells = <1>; 54 #size-cells = <1>;
55 device_type = "soc"; 55 device_type = "soc";
56 56
57 ranges = <00000000 e0000000 00100000>; 57 ranges = <0x0 0xe0000000 0x100000>;
58 reg = <e0000000 00001000>; // CCSRBAR 1M 58 reg = <0xe0000000 0x1000>; // CCSRBAR 1M
59 bus-frequency = <0>; // Filled out by uboot. 59 bus-frequency = <0>; // Filled out by uboot.
60 60
61 memory-controller@2000 { 61 memory-controller@2000 {
62 compatible = "fsl,8544-memory-controller"; 62 compatible = "fsl,8544-memory-controller";
63 reg = <2000 1000>; 63 reg = <0x2000 0x1000>;
64 interrupt-parent = <&mpic>; 64 interrupt-parent = <&mpic>;
65 interrupts = <12 2>; 65 interrupts = <18 2>;
66 }; 66 };
67 67
68 l2-cache-controller@20000 { 68 l2-cache-controller@20000 {
69 compatible = "fsl,8544-l2-cache-controller"; 69 compatible = "fsl,8544-l2-cache-controller";
70 reg = <20000 1000>; 70 reg = <0x20000 0x1000>;
71 cache-line-size = <20>; // 32 bytes 71 cache-line-size = <32>; // 32 bytes
72 cache-size = <40000>; // L2, 256K 72 cache-size = <0x40000>; // L2, 256K
73 interrupt-parent = <&mpic>; 73 interrupt-parent = <&mpic>;
74 interrupts = <10 2>; 74 interrupts = <16 2>;
75 }; 75 };
76 76
77 i2c@3000 { 77 i2c@3000 {
@@ -79,8 +79,8 @@
79 #size-cells = <0>; 79 #size-cells = <0>;
80 cell-index = <0>; 80 cell-index = <0>;
81 compatible = "fsl-i2c"; 81 compatible = "fsl-i2c";
82 reg = <3000 100>; 82 reg = <0x3000 0x100>;
83 interrupts = <2b 2>; 83 interrupts = <43 2>;
84 interrupt-parent = <&mpic>; 84 interrupt-parent = <&mpic>;
85 dfsrr; 85 dfsrr;
86 }; 86 };
@@ -90,8 +90,8 @@
90 #size-cells = <0>; 90 #size-cells = <0>;
91 cell-index = <1>; 91 cell-index = <1>;
92 compatible = "fsl-i2c"; 92 compatible = "fsl-i2c";
93 reg = <3100 100>; 93 reg = <0x3100 0x100>;
94 interrupts = <2b 2>; 94 interrupts = <43 2>;
95 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
96 dfsrr; 96 dfsrr;
97 }; 97 };
@@ -100,30 +100,71 @@
100 #address-cells = <1>; 100 #address-cells = <1>;
101 #size-cells = <0>; 101 #size-cells = <0>;
102 compatible = "fsl,gianfar-mdio"; 102 compatible = "fsl,gianfar-mdio";
103 reg = <24520 20>; 103 reg = <0x24520 0x20>;
104 104
105 phy0: ethernet-phy@0 { 105 phy0: ethernet-phy@0 {
106 interrupt-parent = <&mpic>; 106 interrupt-parent = <&mpic>;
107 interrupts = <a 1>; 107 interrupts = <10 1>;
108 reg = <0>; 108 reg = <0x0>;
109 device_type = "ethernet-phy"; 109 device_type = "ethernet-phy";
110 }; 110 };
111 phy1: ethernet-phy@1 { 111 phy1: ethernet-phy@1 {
112 interrupt-parent = <&mpic>; 112 interrupt-parent = <&mpic>;
113 interrupts = <a 1>; 113 interrupts = <10 1>;
114 reg = <1>; 114 reg = <0x1>;
115 device_type = "ethernet-phy"; 115 device_type = "ethernet-phy";
116 }; 116 };
117 }; 117 };
118 118
119 dma@21300 {
120 #address-cells = <1>;
121 #size-cells = <1>;
122 compatible = "fsl,mpc8544-dma", "fsl,eloplus-dma";
123 reg = <0x21300 0x4>;
124 ranges = <0x0 0x21100 0x200>;
125 cell-index = <0>;
126 dma-channel@0 {
127 compatible = "fsl,mpc8544-dma-channel",
128 "fsl,eloplus-dma-channel";
129 reg = <0x0 0x80>;
130 cell-index = <0>;
131 interrupt-parent = <&mpic>;
132 interrupts = <20 2>;
133 };
134 dma-channel@80 {
135 compatible = "fsl,mpc8544-dma-channel",
136 "fsl,eloplus-dma-channel";
137 reg = <0x80 0x80>;
138 cell-index = <1>;
139 interrupt-parent = <&mpic>;
140 interrupts = <21 2>;
141 };
142 dma-channel@100 {
143 compatible = "fsl,mpc8544-dma-channel",
144 "fsl,eloplus-dma-channel";
145 reg = <0x100 0x80>;
146 cell-index = <2>;
147 interrupt-parent = <&mpic>;
148 interrupts = <22 2>;
149 };
150 dma-channel@180 {
151 compatible = "fsl,mpc8544-dma-channel",
152 "fsl,eloplus-dma-channel";
153 reg = <0x180 0x80>;
154 cell-index = <3>;
155 interrupt-parent = <&mpic>;
156 interrupts = <23 2>;
157 };
158 };
159
119 enet0: ethernet@24000 { 160 enet0: ethernet@24000 {
120 cell-index = <0>; 161 cell-index = <0>;
121 device_type = "network"; 162 device_type = "network";
122 model = "TSEC"; 163 model = "TSEC";
123 compatible = "gianfar"; 164 compatible = "gianfar";
124 reg = <24000 1000>; 165 reg = <0x24000 0x1000>;
125 local-mac-address = [ 00 00 00 00 00 00 ]; 166 local-mac-address = [ 00 00 00 00 00 00 ];
126 interrupts = <1d 2 1e 2 22 2>; 167 interrupts = <29 2 30 2 34 2>;
127 interrupt-parent = <&mpic>; 168 interrupt-parent = <&mpic>;
128 phy-handle = <&phy0>; 169 phy-handle = <&phy0>;
129 phy-connection-type = "rgmii-id"; 170 phy-connection-type = "rgmii-id";
@@ -134,9 +175,9 @@
134 device_type = "network"; 175 device_type = "network";
135 model = "TSEC"; 176 model = "TSEC";
136 compatible = "gianfar"; 177 compatible = "gianfar";
137 reg = <26000 1000>; 178 reg = <0x26000 0x1000>;
138 local-mac-address = [ 00 00 00 00 00 00 ]; 179 local-mac-address = [ 00 00 00 00 00 00 ];
139 interrupts = <1f 2 20 2 21 2>; 180 interrupts = <31 2 32 2 33 2>;
140 interrupt-parent = <&mpic>; 181 interrupt-parent = <&mpic>;
141 phy-handle = <&phy1>; 182 phy-handle = <&phy1>;
142 phy-connection-type = "rgmii-id"; 183 phy-connection-type = "rgmii-id";
@@ -146,9 +187,9 @@
146 cell-index = <0>; 187 cell-index = <0>;
147 device_type = "serial"; 188 device_type = "serial";
148 compatible = "ns16550"; 189 compatible = "ns16550";
149 reg = <4500 100>; 190 reg = <0x4500 0x100>;
150 clock-frequency = <0>; 191 clock-frequency = <0>;
151 interrupts = <2a 2>; 192 interrupts = <42 2>;
152 interrupt-parent = <&mpic>; 193 interrupt-parent = <&mpic>;
153 }; 194 };
154 195
@@ -156,15 +197,15 @@
156 cell-index = <1>; 197 cell-index = <1>;
157 device_type = "serial"; 198 device_type = "serial";
158 compatible = "ns16550"; 199 compatible = "ns16550";
159 reg = <4600 100>; 200 reg = <0x4600 0x100>;
160 clock-frequency = <0>; 201 clock-frequency = <0>;
161 interrupts = <2a 2>; 202 interrupts = <42 2>;
162 interrupt-parent = <&mpic>; 203 interrupt-parent = <&mpic>;
163 }; 204 };
164 205
165 global-utilities@e0000 { //global utilities block 206 global-utilities@e0000 { //global utilities block
166 compatible = "fsl,mpc8548-guts"; 207 compatible = "fsl,mpc8548-guts";
167 reg = <e0000 1000>; 208 reg = <0xe0000 0x1000>;
168 fsl,has-rstcr; 209 fsl,has-rstcr;
169 }; 210 };
170 211
@@ -173,7 +214,7 @@
173 interrupt-controller; 214 interrupt-controller;
174 #address-cells = <0>; 215 #address-cells = <0>;
175 #interrupt-cells = <2>; 216 #interrupt-cells = <2>;
176 reg = <40000 40000>; 217 reg = <0x40000 0x40000>;
177 compatible = "chrp,open-pic"; 218 compatible = "chrp,open-pic";
178 device_type = "open-pic"; 219 device_type = "open-pic";
179 big-endian; 220 big-endian;
@@ -184,32 +225,32 @@
184 cell-index = <0>; 225 cell-index = <0>;
185 compatible = "fsl,mpc8540-pci"; 226 compatible = "fsl,mpc8540-pci";
186 device_type = "pci"; 227 device_type = "pci";
187 interrupt-map-mask = <f800 0 0 7>; 228 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
188 interrupt-map = < 229 interrupt-map = <
189 230
190 /* IDSEL 0x11 J17 Slot 1 */ 231 /* IDSEL 0x11 J17 Slot 1 */
191 8800 0 0 1 &mpic 2 1 232 0x8800 0x0 0x0 0x1 &mpic 0x2 0x1
192 8800 0 0 2 &mpic 3 1 233 0x8800 0x0 0x0 0x2 &mpic 0x3 0x1
193 8800 0 0 3 &mpic 4 1 234 0x8800 0x0 0x0 0x3 &mpic 0x4 0x1
194 8800 0 0 4 &mpic 1 1 235 0x8800 0x0 0x0 0x4 &mpic 0x1 0x1
195 236
196 /* IDSEL 0x12 J16 Slot 2 */ 237 /* IDSEL 0x12 J16 Slot 2 */
197 238
198 9000 0 0 1 &mpic 3 1 239 0x9000 0x0 0x0 0x1 &mpic 0x3 0x1
199 9000 0 0 2 &mpic 4 1 240 0x9000 0x0 0x0 0x2 &mpic 0x4 0x1
200 9000 0 0 3 &mpic 2 1 241 0x9000 0x0 0x0 0x3 &mpic 0x2 0x1
201 9000 0 0 4 &mpic 1 1>; 242 0x9000 0x0 0x0 0x4 &mpic 0x1 0x1>;
202 243
203 interrupt-parent = <&mpic>; 244 interrupt-parent = <&mpic>;
204 interrupts = <18 2>; 245 interrupts = <24 2>;
205 bus-range = <0 ff>; 246 bus-range = <0 255>;
206 ranges = <02000000 0 c0000000 c0000000 0 20000000 247 ranges = <0x2000000 0x0 0xc0000000 0xc0000000 0x0 0x20000000
207 01000000 0 00000000 e1000000 0 00010000>; 248 0x1000000 0x0 0x0 0xe1000000 0x0 0x10000>;
208 clock-frequency = <3f940aa>; 249 clock-frequency = <66666666>;
209 #interrupt-cells = <1>; 250 #interrupt-cells = <1>;
210 #size-cells = <2>; 251 #size-cells = <2>;
211 #address-cells = <3>; 252 #address-cells = <3>;
212 reg = <e0008000 1000>; 253 reg = <0xe0008000 0x1000>;
213 }; 254 };
214 255
215 pci1: pcie@e0009000 { 256 pci1: pcie@e0009000 {
@@ -219,33 +260,33 @@
219 #interrupt-cells = <1>; 260 #interrupt-cells = <1>;
220 #size-cells = <2>; 261 #size-cells = <2>;
221 #address-cells = <3>; 262 #address-cells = <3>;
222 reg = <e0009000 1000>; 263 reg = <0xe0009000 0x1000>;
223 bus-range = <0 ff>; 264 bus-range = <0 255>;
224 ranges = <02000000 0 80000000 80000000 0 20000000 265 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
225 01000000 0 00000000 e1010000 0 00010000>; 266 0x1000000 0x0 0x0 0xe1010000 0x0 0x10000>;
226 clock-frequency = <1fca055>; 267 clock-frequency = <33333333>;
227 interrupt-parent = <&mpic>; 268 interrupt-parent = <&mpic>;
228 interrupts = <1a 2>; 269 interrupts = <26 2>;
229 interrupt-map-mask = <f800 0 0 7>; 270 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
230 interrupt-map = < 271 interrupt-map = <
231 /* IDSEL 0x0 */ 272 /* IDSEL 0x0 */
232 0000 0 0 1 &mpic 4 1 273 0000 0x0 0x0 0x1 &mpic 0x4 0x1
233 0000 0 0 2 &mpic 5 1 274 0000 0x0 0x0 0x2 &mpic 0x5 0x1
234 0000 0 0 3 &mpic 6 1 275 0000 0x0 0x0 0x3 &mpic 0x6 0x1
235 0000 0 0 4 &mpic 7 1 276 0000 0x0 0x0 0x4 &mpic 0x7 0x1
236 >; 277 >;
237 pcie@0 { 278 pcie@0 {
238 reg = <0 0 0 0 0>; 279 reg = <0x0 0x0 0x0 0x0 0x0>;
239 #size-cells = <2>; 280 #size-cells = <2>;
240 #address-cells = <3>; 281 #address-cells = <3>;
241 device_type = "pci"; 282 device_type = "pci";
242 ranges = <02000000 0 80000000 283 ranges = <0x2000000 0x0 0x80000000
243 02000000 0 80000000 284 0x2000000 0x0 0x80000000
244 0 20000000 285 0x0 0x20000000
245 286
246 01000000 0 00000000 287 0x1000000 0x0 0x0
247 01000000 0 00000000 288 0x1000000 0x0 0x0
248 0 00010000>; 289 0x0 0x10000>;
249 }; 290 };
250 }; 291 };
251 292
@@ -256,33 +297,33 @@
256 #interrupt-cells = <1>; 297 #interrupt-cells = <1>;
257 #size-cells = <2>; 298 #size-cells = <2>;
258 #address-cells = <3>; 299 #address-cells = <3>;
259 reg = <e000a000 1000>; 300 reg = <0xe000a000 0x1000>;
260 bus-range = <0 ff>; 301 bus-range = <0 255>;
261 ranges = <02000000 0 a0000000 a0000000 0 10000000 302 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
262 01000000 0 00000000 e1020000 0 00010000>; 303 0x1000000 0x0 0x0 0xe1020000 0x0 0x10000>;
263 clock-frequency = <1fca055>; 304 clock-frequency = <33333333>;
264 interrupt-parent = <&mpic>; 305 interrupt-parent = <&mpic>;
265 interrupts = <19 2>; 306 interrupts = <25 2>;
266 interrupt-map-mask = <f800 0 0 7>; 307 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
267 interrupt-map = < 308 interrupt-map = <
268 /* IDSEL 0x0 */ 309 /* IDSEL 0x0 */
269 0000 0 0 1 &mpic 0 1 310 0000 0x0 0x0 0x1 &mpic 0x0 0x1
270 0000 0 0 2 &mpic 1 1 311 0000 0x0 0x0 0x2 &mpic 0x1 0x1
271 0000 0 0 3 &mpic 2 1 312 0000 0x0 0x0 0x3 &mpic 0x2 0x1
272 0000 0 0 4 &mpic 3 1 313 0000 0x0 0x0 0x4 &mpic 0x3 0x1
273 >; 314 >;
274 pcie@0 { 315 pcie@0 {
275 reg = <0 0 0 0 0>; 316 reg = <0x0 0x0 0x0 0x0 0x0>;
276 #size-cells = <2>; 317 #size-cells = <2>;
277 #address-cells = <3>; 318 #address-cells = <3>;
278 device_type = "pci"; 319 device_type = "pci";
279 ranges = <02000000 0 a0000000 320 ranges = <0x2000000 0x0 0xa0000000
280 02000000 0 a0000000 321 0x2000000 0x0 0xa0000000
281 0 10000000 322 0x0 0x10000000
282 323
283 01000000 0 00000000 324 0x1000000 0x0 0x0
284 01000000 0 00000000 325 0x1000000 0x0 0x0
285 0 00010000>; 326 0x0 0x10000>;
286 }; 327 };
287 }; 328 };
288 329
@@ -293,72 +334,72 @@
293 #interrupt-cells = <1>; 334 #interrupt-cells = <1>;
294 #size-cells = <2>; 335 #size-cells = <2>;
295 #address-cells = <3>; 336 #address-cells = <3>;
296 reg = <e000b000 1000>; 337 reg = <0xe000b000 0x1000>;
297 bus-range = <0 ff>; 338 bus-range = <0 255>;
298 ranges = <02000000 0 b0000000 b0000000 0 00100000 339 ranges = <0x2000000 0x0 0xb0000000 0xb0000000 0x0 0x100000
299 01000000 0 00000000 b0100000 0 00100000>; 340 0x1000000 0x0 0x0 0xb0100000 0x0 0x100000>;
300 clock-frequency = <1fca055>; 341 clock-frequency = <33333333>;
301 interrupt-parent = <&mpic>; 342 interrupt-parent = <&mpic>;
302 interrupts = <1b 2>; 343 interrupts = <27 2>;
303 interrupt-map-mask = <ff00 0 0 1>; 344 interrupt-map-mask = <0xff00 0x0 0x0 0x1>;
304 interrupt-map = < 345 interrupt-map = <
305 // IDSEL 0x1c USB 346 // IDSEL 0x1c USB
306 e000 0 0 1 &i8259 c 2 347 0xe000 0x0 0x0 0x1 &i8259 0xc 0x2
307 e100 0 0 2 &i8259 9 2 348 0xe100 0x0 0x0 0x2 &i8259 0x9 0x2
308 e200 0 0 3 &i8259 a 2 349 0xe200 0x0 0x0 0x3 &i8259 0xa 0x2
309 e300 0 0 4 &i8259 b 2 350 0xe300 0x0 0x0 0x4 &i8259 0xb 0x2
310 351
311 // IDSEL 0x1d Audio 352 // IDSEL 0x1d Audio
312 e800 0 0 1 &i8259 6 2 353 0xe800 0x0 0x0 0x1 &i8259 0x6 0x2
313 354
314 // IDSEL 0x1e Legacy 355 // IDSEL 0x1e Legacy
315 f000 0 0 1 &i8259 7 2 356 0xf000 0x0 0x0 0x1 &i8259 0x7 0x2
316 f100 0 0 1 &i8259 7 2 357 0xf100 0x0 0x0 0x1 &i8259 0x7 0x2
317 358
318 // IDSEL 0x1f IDE/SATA 359 // IDSEL 0x1f IDE/SATA
319 f800 0 0 1 &i8259 e 2 360 0xf800 0x0 0x0 0x1 &i8259 0xe 0x2
320 f900 0 0 1 &i8259 5 2 361 0xf900 0x0 0x0 0x1 &i8259 0x5 0x2
321 >; 362 >;
322 363
323 pcie@0 { 364 pcie@0 {
324 reg = <0 0 0 0 0>; 365 reg = <0x0 0x0 0x0 0x0 0x0>;
325 #size-cells = <2>; 366 #size-cells = <2>;
326 #address-cells = <3>; 367 #address-cells = <3>;
327 device_type = "pci"; 368 device_type = "pci";
328 ranges = <02000000 0 b0000000 369 ranges = <0x2000000 0x0 0xb0000000
329 02000000 0 b0000000 370 0x2000000 0x0 0xb0000000
330 0 00100000 371 0x0 0x100000
331 372
332 01000000 0 00000000 373 0x1000000 0x0 0x0
333 01000000 0 00000000 374 0x1000000 0x0 0x0
334 0 00100000>; 375 0x0 0x100000>;
335 376
336 uli1575@0 { 377 uli1575@0 {
337 reg = <0 0 0 0 0>; 378 reg = <0x0 0x0 0x0 0x0 0x0>;
338 #size-cells = <2>; 379 #size-cells = <2>;
339 #address-cells = <3>; 380 #address-cells = <3>;
340 ranges = <02000000 0 b0000000 381 ranges = <0x2000000 0x0 0xb0000000
341 02000000 0 b0000000 382 0x2000000 0x0 0xb0000000
342 0 00100000 383 0x0 0x100000
343 384
344 01000000 0 00000000 385 0x1000000 0x0 0x0
345 01000000 0 00000000 386 0x1000000 0x0 0x0
346 0 00100000>; 387 0x0 0x100000>;
347 isa@1e { 388 isa@1e {
348 device_type = "isa"; 389 device_type = "isa";
349 #interrupt-cells = <2>; 390 #interrupt-cells = <2>;
350 #size-cells = <1>; 391 #size-cells = <1>;
351 #address-cells = <2>; 392 #address-cells = <2>;
352 reg = <f000 0 0 0 0>; 393 reg = <0xf000 0x0 0x0 0x0 0x0>;
353 ranges = <1 0 394 ranges = <0x1 0x0
354 01000000 0 0 395 0x1000000 0x0 0x0
355 00001000>; 396 0x1000>;
356 interrupt-parent = <&i8259>; 397 interrupt-parent = <&i8259>;
357 398
358 i8259: interrupt-controller@20 { 399 i8259: interrupt-controller@20 {
359 reg = <1 20 2 400 reg = <0x1 0x20 0x2
360 1 a0 2 401 0x1 0xa0 0x2
361 1 4d0 2>; 402 0x1 0x4d0 0x2>;
362 interrupt-controller; 403 interrupt-controller;
363 device_type = "interrupt-controller"; 404 device_type = "interrupt-controller";
364 #address-cells = <0>; 405 #address-cells = <0>;
@@ -371,28 +412,28 @@
371 i8042@60 { 412 i8042@60 {
372 #size-cells = <0>; 413 #size-cells = <0>;
373 #address-cells = <1>; 414 #address-cells = <1>;
374 reg = <1 60 1 1 64 1>; 415 reg = <0x1 0x60 0x1 0x1 0x64 0x1>;
375 interrupts = <1 3 c 3>; 416 interrupts = <1 3 12 3>;
376 interrupt-parent = <&i8259>; 417 interrupt-parent = <&i8259>;
377 418
378 keyboard@0 { 419 keyboard@0 {
379 reg = <0>; 420 reg = <0x0>;
380 compatible = "pnpPNP,303"; 421 compatible = "pnpPNP,303";
381 }; 422 };
382 423
383 mouse@1 { 424 mouse@1 {
384 reg = <1>; 425 reg = <0x1>;
385 compatible = "pnpPNP,f03"; 426 compatible = "pnpPNP,f03";
386 }; 427 };
387 }; 428 };
388 429
389 rtc@70 { 430 rtc@70 {
390 compatible = "pnpPNP,b00"; 431 compatible = "pnpPNP,b00";
391 reg = <1 70 2>; 432 reg = <0x1 0x70 0x2>;
392 }; 433 };
393 434
394 gpio@400 { 435 gpio@400 {
395 reg = <1 400 80>; 436 reg = <0x1 0x400 0x80>;
396 }; 437 };
397 }; 438 };
398 }; 439 };
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 1f470c6a1c63..fa298a8c81cc 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8548 CDS Device Tree Source 2 * MPC8548 CDS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8548CDS"; 15 model = "MPC8548CDS";
@@ -36,11 +37,11 @@
36 37
37 PowerPC,8548@0 { 38 PowerPC,8548@0 {
38 device_type = "cpu"; 39 device_type = "cpu";
39 reg = <0>; 40 reg = <0x0>;
40 d-cache-line-size = <20>; // 32 bytes 41 d-cache-line-size = <32>; // 32 bytes
41 i-cache-line-size = <20>; // 32 bytes 42 i-cache-line-size = <32>; // 32 bytes
42 d-cache-size = <8000>; // L1, 32K 43 d-cache-size = <0x8000>; // L1, 32K
43 i-cache-size = <8000>; // L1, 32K 44 i-cache-size = <0x8000>; // L1, 32K
44 timebase-frequency = <0>; // 33 MHz, from uboot 45 timebase-frequency = <0>; // 33 MHz, from uboot
45 bus-frequency = <0>; // 166 MHz 46 bus-frequency = <0>; // 166 MHz
46 clock-frequency = <0>; // 825 MHz, from uboot 47 clock-frequency = <0>; // 825 MHz, from uboot
@@ -49,31 +50,31 @@
49 50
50 memory { 51 memory {
51 device_type = "memory"; 52 device_type = "memory";
52 reg = <00000000 08000000>; // 128M at 0x0 53 reg = <0x0 0x8000000>; // 128M at 0x0
53 }; 54 };
54 55
55 soc8548@e0000000 { 56 soc8548@e0000000 {
56 #address-cells = <1>; 57 #address-cells = <1>;
57 #size-cells = <1>; 58 #size-cells = <1>;
58 device_type = "soc"; 59 device_type = "soc";
59 ranges = <00000000 e0000000 00100000>; 60 ranges = <0x0 0xe0000000 0x100000>;
60 reg = <e0000000 00001000>; // CCSRBAR 61 reg = <0xe0000000 0x1000>; // CCSRBAR
61 bus-frequency = <0>; 62 bus-frequency = <0>;
62 63
63 memory-controller@2000 { 64 memory-controller@2000 {
64 compatible = "fsl,8548-memory-controller"; 65 compatible = "fsl,8548-memory-controller";
65 reg = <2000 1000>; 66 reg = <0x2000 0x1000>;
66 interrupt-parent = <&mpic>; 67 interrupt-parent = <&mpic>;
67 interrupts = <12 2>; 68 interrupts = <18 2>;
68 }; 69 };
69 70
70 l2-cache-controller@20000 { 71 l2-cache-controller@20000 {
71 compatible = "fsl,8548-l2-cache-controller"; 72 compatible = "fsl,8548-l2-cache-controller";
72 reg = <20000 1000>; 73 reg = <0x20000 0x1000>;
73 cache-line-size = <20>; // 32 bytes 74 cache-line-size = <32>; // 32 bytes
74 cache-size = <80000>; // L2, 512K 75 cache-size = <0x80000>; // L2, 512K
75 interrupt-parent = <&mpic>; 76 interrupt-parent = <&mpic>;
76 interrupts = <10 2>; 77 interrupts = <16 2>;
77 }; 78 };
78 79
79 i2c@3000 { 80 i2c@3000 {
@@ -81,8 +82,8 @@
81 #size-cells = <0>; 82 #size-cells = <0>;
82 cell-index = <0>; 83 cell-index = <0>;
83 compatible = "fsl-i2c"; 84 compatible = "fsl-i2c";
84 reg = <3000 100>; 85 reg = <0x3000 0x100>;
85 interrupts = <2b 2>; 86 interrupts = <43 2>;
86 interrupt-parent = <&mpic>; 87 interrupt-parent = <&mpic>;
87 dfsrr; 88 dfsrr;
88 }; 89 };
@@ -92,8 +93,8 @@
92 #size-cells = <0>; 93 #size-cells = <0>;
93 cell-index = <1>; 94 cell-index = <1>;
94 compatible = "fsl-i2c"; 95 compatible = "fsl-i2c";
95 reg = <3100 100>; 96 reg = <0x3100 0x100>;
96 interrupts = <2b 2>; 97 interrupts = <43 2>;
97 interrupt-parent = <&mpic>; 98 interrupt-parent = <&mpic>;
98 dfsrr; 99 dfsrr;
99 }; 100 };
@@ -102,30 +103,30 @@
102 #address-cells = <1>; 103 #address-cells = <1>;
103 #size-cells = <0>; 104 #size-cells = <0>;
104 compatible = "fsl,gianfar-mdio"; 105 compatible = "fsl,gianfar-mdio";
105 reg = <24520 20>; 106 reg = <0x24520 0x20>;
106 107
107 phy0: ethernet-phy@0 { 108 phy0: ethernet-phy@0 {
108 interrupt-parent = <&mpic>; 109 interrupt-parent = <&mpic>;
109 interrupts = <5 1>; 110 interrupts = <5 1>;
110 reg = <0>; 111 reg = <0x0>;
111 device_type = "ethernet-phy"; 112 device_type = "ethernet-phy";
112 }; 113 };
113 phy1: ethernet-phy@1 { 114 phy1: ethernet-phy@1 {
114 interrupt-parent = <&mpic>; 115 interrupt-parent = <&mpic>;
115 interrupts = <5 1>; 116 interrupts = <5 1>;
116 reg = <1>; 117 reg = <0x1>;
117 device_type = "ethernet-phy"; 118 device_type = "ethernet-phy";
118 }; 119 };
119 phy2: ethernet-phy@2 { 120 phy2: ethernet-phy@2 {
120 interrupt-parent = <&mpic>; 121 interrupt-parent = <&mpic>;
121 interrupts = <5 1>; 122 interrupts = <5 1>;
122 reg = <2>; 123 reg = <0x2>;
123 device_type = "ethernet-phy"; 124 device_type = "ethernet-phy";
124 }; 125 };
125 phy3: ethernet-phy@3 { 126 phy3: ethernet-phy@3 {
126 interrupt-parent = <&mpic>; 127 interrupt-parent = <&mpic>;
127 interrupts = <5 1>; 128 interrupts = <5 1>;
128 reg = <3>; 129 reg = <0x3>;
129 device_type = "ethernet-phy"; 130 device_type = "ethernet-phy";
130 }; 131 };
131 }; 132 };
@@ -135,9 +136,9 @@
135 device_type = "network"; 136 device_type = "network";
136 model = "eTSEC"; 137 model = "eTSEC";
137 compatible = "gianfar"; 138 compatible = "gianfar";
138 reg = <24000 1000>; 139 reg = <0x24000 0x1000>;
139 local-mac-address = [ 00 00 00 00 00 00 ]; 140 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <1d 2 1e 2 22 2>; 141 interrupts = <29 2 30 2 34 2>;
141 interrupt-parent = <&mpic>; 142 interrupt-parent = <&mpic>;
142 phy-handle = <&phy0>; 143 phy-handle = <&phy0>;
143 }; 144 };
@@ -147,9 +148,9 @@
147 device_type = "network"; 148 device_type = "network";
148 model = "eTSEC"; 149 model = "eTSEC";
149 compatible = "gianfar"; 150 compatible = "gianfar";
150 reg = <25000 1000>; 151 reg = <0x25000 0x1000>;
151 local-mac-address = [ 00 00 00 00 00 00 ]; 152 local-mac-address = [ 00 00 00 00 00 00 ];
152 interrupts = <23 2 24 2 28 2>; 153 interrupts = <35 2 36 2 40 2>;
153 interrupt-parent = <&mpic>; 154 interrupt-parent = <&mpic>;
154 phy-handle = <&phy1>; 155 phy-handle = <&phy1>;
155 }; 156 };
@@ -160,9 +161,9 @@
160 device_type = "network"; 161 device_type = "network";
161 model = "eTSEC"; 162 model = "eTSEC";
162 compatible = "gianfar"; 163 compatible = "gianfar";
163 reg = <26000 1000>; 164 reg = <0x26000 0x1000>;
164 local-mac-address = [ 00 00 00 00 00 00 ]; 165 local-mac-address = [ 00 00 00 00 00 00 ];
165 interrupts = <1f 2 20 2 21 2>; 166 interrupts = <31 2 32 2 33 2>;
166 interrupt-parent = <&mpic>; 167 interrupt-parent = <&mpic>;
167 phy-handle = <&phy2>; 168 phy-handle = <&phy2>;
168 }; 169 };
@@ -172,9 +173,9 @@
172 device_type = "network"; 173 device_type = "network";
173 model = "eTSEC"; 174 model = "eTSEC";
174 compatible = "gianfar"; 175 compatible = "gianfar";
175 reg = <27000 1000>; 176 reg = <0x27000 0x1000>;
176 local-mac-address = [ 00 00 00 00 00 00 ]; 177 local-mac-address = [ 00 00 00 00 00 00 ];
177 interrupts = <25 2 26 2 27 2>; 178 interrupts = <37 2 38 2 39 2>;
178 interrupt-parent = <&mpic>; 179 interrupt-parent = <&mpic>;
179 phy-handle = <&phy3>; 180 phy-handle = <&phy3>;
180 }; 181 };
@@ -184,9 +185,9 @@
184 cell-index = <0>; 185 cell-index = <0>;
185 device_type = "serial"; 186 device_type = "serial";
186 compatible = "ns16550"; 187 compatible = "ns16550";
187 reg = <4500 100>; // reg base, size 188 reg = <0x4500 0x100>; // reg base, size
188 clock-frequency = <0>; // should we fill in in uboot? 189 clock-frequency = <0>; // should we fill in in uboot?
189 interrupts = <2a 2>; 190 interrupts = <42 2>;
190 interrupt-parent = <&mpic>; 191 interrupt-parent = <&mpic>;
191 }; 192 };
192 193
@@ -194,15 +195,15 @@
194 cell-index = <1>; 195 cell-index = <1>;
195 device_type = "serial"; 196 device_type = "serial";
196 compatible = "ns16550"; 197 compatible = "ns16550";
197 reg = <4600 100>; // reg base, size 198 reg = <0x4600 0x100>; // reg base, size
198 clock-frequency = <0>; // should we fill in in uboot? 199 clock-frequency = <0>; // should we fill in in uboot?
199 interrupts = <2a 2>; 200 interrupts = <42 2>;
200 interrupt-parent = <&mpic>; 201 interrupt-parent = <&mpic>;
201 }; 202 };
202 203
203 global-utilities@e0000 { //global utilities reg 204 global-utilities@e0000 { //global utilities reg
204 compatible = "fsl,mpc8548-guts"; 205 compatible = "fsl,mpc8548-guts";
205 reg = <e0000 1000>; 206 reg = <0xe0000 0x1000>;
206 fsl,has-rstcr; 207 fsl,has-rstcr;
207 }; 208 };
208 209
@@ -211,7 +212,7 @@
211 interrupt-controller; 212 interrupt-controller;
212 #address-cells = <0>; 213 #address-cells = <0>;
213 #interrupt-cells = <2>; 214 #interrupt-cells = <2>;
214 reg = <40000 40000>; 215 reg = <0x40000 0x40000>;
215 compatible = "chrp,open-pic"; 216 compatible = "chrp,open-pic";
216 device_type = "open-pic"; 217 device_type = "open-pic";
217 big-endian; 218 big-endian;
@@ -220,139 +221,139 @@
220 221
221 pci0: pci@e0008000 { 222 pci0: pci@e0008000 {
222 cell-index = <0>; 223 cell-index = <0>;
223 interrupt-map-mask = <f800 0 0 7>; 224 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
224 interrupt-map = < 225 interrupt-map = <
225 /* IDSEL 0x4 (PCIX Slot 2) */ 226 /* IDSEL 0x4 (PCIX Slot 2) */
226 02000 0 0 1 &mpic 0 1 227 0x2000 0x0 0x0 0x1 &mpic 0x0 0x1
227 02000 0 0 2 &mpic 1 1 228 0x2000 0x0 0x0 0x2 &mpic 0x1 0x1
228 02000 0 0 3 &mpic 2 1 229 0x2000 0x0 0x0 0x3 &mpic 0x2 0x1
229 02000 0 0 4 &mpic 3 1 230 0x2000 0x0 0x0 0x4 &mpic 0x3 0x1
230 231
231 /* IDSEL 0x5 (PCIX Slot 3) */ 232 /* IDSEL 0x5 (PCIX Slot 3) */
232 02800 0 0 1 &mpic 1 1 233 0x2800 0x0 0x0 0x1 &mpic 0x1 0x1
233 02800 0 0 2 &mpic 2 1 234 0x2800 0x0 0x0 0x2 &mpic 0x2 0x1
234 02800 0 0 3 &mpic 3 1 235 0x2800 0x0 0x0 0x3 &mpic 0x3 0x1
235 02800 0 0 4 &mpic 0 1 236 0x2800 0x0 0x0 0x4 &mpic 0x0 0x1
236 237
237 /* IDSEL 0x6 (PCIX Slot 4) */ 238 /* IDSEL 0x6 (PCIX Slot 4) */
238 03000 0 0 1 &mpic 2 1 239 0x3000 0x0 0x0 0x1 &mpic 0x2 0x1
239 03000 0 0 2 &mpic 3 1 240 0x3000 0x0 0x0 0x2 &mpic 0x3 0x1
240 03000 0 0 3 &mpic 0 1 241 0x3000 0x0 0x0 0x3 &mpic 0x0 0x1
241 03000 0 0 4 &mpic 1 1 242 0x3000 0x0 0x0 0x4 &mpic 0x1 0x1
242 243
243 /* IDSEL 0x8 (PCIX Slot 5) */ 244 /* IDSEL 0x8 (PCIX Slot 5) */
244 04000 0 0 1 &mpic 0 1 245 0x4000 0x0 0x0 0x1 &mpic 0x0 0x1
245 04000 0 0 2 &mpic 1 1 246 0x4000 0x0 0x0 0x2 &mpic 0x1 0x1
246 04000 0 0 3 &mpic 2 1 247 0x4000 0x0 0x0 0x3 &mpic 0x2 0x1
247 04000 0 0 4 &mpic 3 1 248 0x4000 0x0 0x0 0x4 &mpic 0x3 0x1
248 249
249 /* IDSEL 0xC (Tsi310 bridge) */ 250 /* IDSEL 0xC (Tsi310 bridge) */
250 06000 0 0 1 &mpic 0 1 251 0x6000 0x0 0x0 0x1 &mpic 0x0 0x1
251 06000 0 0 2 &mpic 1 1 252 0x6000 0x0 0x0 0x2 &mpic 0x1 0x1
252 06000 0 0 3 &mpic 2 1 253 0x6000 0x0 0x0 0x3 &mpic 0x2 0x1
253 06000 0 0 4 &mpic 3 1 254 0x6000 0x0 0x0 0x4 &mpic 0x3 0x1
254 255
255 /* IDSEL 0x14 (Slot 2) */ 256 /* IDSEL 0x14 (Slot 2) */
256 0a000 0 0 1 &mpic 0 1 257 0xa000 0x0 0x0 0x1 &mpic 0x0 0x1
257 0a000 0 0 2 &mpic 1 1 258 0xa000 0x0 0x0 0x2 &mpic 0x1 0x1
258 0a000 0 0 3 &mpic 2 1 259 0xa000 0x0 0x0 0x3 &mpic 0x2 0x1
259 0a000 0 0 4 &mpic 3 1 260 0xa000 0x0 0x0 0x4 &mpic 0x3 0x1
260 261
261 /* IDSEL 0x15 (Slot 3) */ 262 /* IDSEL 0x15 (Slot 3) */
262 0a800 0 0 1 &mpic 1 1 263 0xa800 0x0 0x0 0x1 &mpic 0x1 0x1
263 0a800 0 0 2 &mpic 2 1 264 0xa800 0x0 0x0 0x2 &mpic 0x2 0x1
264 0a800 0 0 3 &mpic 3 1 265 0xa800 0x0 0x0 0x3 &mpic 0x3 0x1
265 0a800 0 0 4 &mpic 0 1 266 0xa800 0x0 0x0 0x4 &mpic 0x0 0x1
266 267
267 /* IDSEL 0x16 (Slot 4) */ 268 /* IDSEL 0x16 (Slot 4) */
268 0b000 0 0 1 &mpic 2 1 269 0xb000 0x0 0x0 0x1 &mpic 0x2 0x1
269 0b000 0 0 2 &mpic 3 1 270 0xb000 0x0 0x0 0x2 &mpic 0x3 0x1
270 0b000 0 0 3 &mpic 0 1 271 0xb000 0x0 0x0 0x3 &mpic 0x0 0x1
271 0b000 0 0 4 &mpic 1 1 272 0xb000 0x0 0x0 0x4 &mpic 0x1 0x1
272 273
273 /* IDSEL 0x18 (Slot 5) */ 274 /* IDSEL 0x18 (Slot 5) */
274 0c000 0 0 1 &mpic 0 1 275 0xc000 0x0 0x0 0x1 &mpic 0x0 0x1
275 0c000 0 0 2 &mpic 1 1 276 0xc000 0x0 0x0 0x2 &mpic 0x1 0x1
276 0c000 0 0 3 &mpic 2 1 277 0xc000 0x0 0x0 0x3 &mpic 0x2 0x1
277 0c000 0 0 4 &mpic 3 1 278 0xc000 0x0 0x0 0x4 &mpic 0x3 0x1
278 279
279 /* IDSEL 0x1C (Tsi310 bridge PCI primary) */ 280 /* IDSEL 0x1C (Tsi310 bridge PCI primary) */
280 0E000 0 0 1 &mpic 0 1 281 0xe000 0x0 0x0 0x1 &mpic 0x0 0x1
281 0E000 0 0 2 &mpic 1 1 282 0xe000 0x0 0x0 0x2 &mpic 0x1 0x1
282 0E000 0 0 3 &mpic 2 1 283 0xe000 0x0 0x0 0x3 &mpic 0x2 0x1
283 0E000 0 0 4 &mpic 3 1>; 284 0xe000 0x0 0x0 0x4 &mpic 0x3 0x1>;
284 285
285 interrupt-parent = <&mpic>; 286 interrupt-parent = <&mpic>;
286 interrupts = <18 2>; 287 interrupts = <24 2>;
287 bus-range = <0 0>; 288 bus-range = <0 0>;
288 ranges = <02000000 0 80000000 80000000 0 10000000 289 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x10000000
289 01000000 0 00000000 e2000000 0 00800000>; 290 0x1000000 0x0 0x0 0xe2000000 0x0 0x800000>;
290 clock-frequency = <3f940aa>; 291 clock-frequency = <66666666>;
291 #interrupt-cells = <1>; 292 #interrupt-cells = <1>;
292 #size-cells = <2>; 293 #size-cells = <2>;
293 #address-cells = <3>; 294 #address-cells = <3>;
294 reg = <e0008000 1000>; 295 reg = <0xe0008000 0x1000>;
295 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; 296 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
296 device_type = "pci"; 297 device_type = "pci";
297 298
298 pci_bridge@1c { 299 pci_bridge@1c {
299 interrupt-map-mask = <f800 0 0 7>; 300 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
300 interrupt-map = < 301 interrupt-map = <
301 302
302 /* IDSEL 0x00 (PrPMC Site) */ 303 /* IDSEL 0x00 (PrPMC Site) */
303 0000 0 0 1 &mpic 0 1 304 0000 0x0 0x0 0x1 &mpic 0x0 0x1
304 0000 0 0 2 &mpic 1 1 305 0000 0x0 0x0 0x2 &mpic 0x1 0x1
305 0000 0 0 3 &mpic 2 1 306 0000 0x0 0x0 0x3 &mpic 0x2 0x1
306 0000 0 0 4 &mpic 3 1 307 0000 0x0 0x0 0x4 &mpic 0x3 0x1
307 308
308 /* IDSEL 0x04 (VIA chip) */ 309 /* IDSEL 0x04 (VIA chip) */
309 2000 0 0 1 &mpic 0 1 310 0x2000 0x0 0x0 0x1 &mpic 0x0 0x1
310 2000 0 0 2 &mpic 1 1 311 0x2000 0x0 0x0 0x2 &mpic 0x1 0x1
311 2000 0 0 3 &mpic 2 1 312 0x2000 0x0 0x0 0x3 &mpic 0x2 0x1
312 2000 0 0 4 &mpic 3 1 313 0x2000 0x0 0x0 0x4 &mpic 0x3 0x1
313 314
314 /* IDSEL 0x05 (8139) */ 315 /* IDSEL 0x05 (8139) */
315 2800 0 0 1 &mpic 1 1 316 0x2800 0x0 0x0 0x1 &mpic 0x1 0x1
316 317
317 /* IDSEL 0x06 (Slot 6) */ 318 /* IDSEL 0x06 (Slot 6) */
318 3000 0 0 1 &mpic 2 1 319 0x3000 0x0 0x0 0x1 &mpic 0x2 0x1
319 3000 0 0 2 &mpic 3 1 320 0x3000 0x0 0x0 0x2 &mpic 0x3 0x1
320 3000 0 0 3 &mpic 0 1 321 0x3000 0x0 0x0 0x3 &mpic 0x0 0x1
321 3000 0 0 4 &mpic 1 1 322 0x3000 0x0 0x0 0x4 &mpic 0x1 0x1
322 323
323 /* IDESL 0x07 (Slot 7) */ 324 /* IDESL 0x07 (Slot 7) */
324 3800 0 0 1 &mpic 3 1 325 0x3800 0x0 0x0 0x1 &mpic 0x3 0x1
325 3800 0 0 2 &mpic 0 1 326 0x3800 0x0 0x0 0x2 &mpic 0x0 0x1
326 3800 0 0 3 &mpic 1 1 327 0x3800 0x0 0x0 0x3 &mpic 0x1 0x1
327 3800 0 0 4 &mpic 2 1>; 328 0x3800 0x0 0x0 0x4 &mpic 0x2 0x1>;
328 329
329 reg = <e000 0 0 0 0>; 330 reg = <0xe000 0x0 0x0 0x0 0x0>;
330 #interrupt-cells = <1>; 331 #interrupt-cells = <1>;
331 #size-cells = <2>; 332 #size-cells = <2>;
332 #address-cells = <3>; 333 #address-cells = <3>;
333 ranges = <02000000 0 80000000 334 ranges = <0x2000000 0x0 0x80000000
334 02000000 0 80000000 335 0x2000000 0x0 0x80000000
335 0 20000000 336 0x0 0x20000000
336 01000000 0 00000000 337 0x1000000 0x0 0x0
337 01000000 0 00000000 338 0x1000000 0x0 0x0
338 0 00080000>; 339 0x0 0x80000>;
339 clock-frequency = <1fca055>; 340 clock-frequency = <33333333>;
340 341
341 isa@4 { 342 isa@4 {
342 device_type = "isa"; 343 device_type = "isa";
343 #interrupt-cells = <2>; 344 #interrupt-cells = <2>;
344 #size-cells = <1>; 345 #size-cells = <1>;
345 #address-cells = <2>; 346 #address-cells = <2>;
346 reg = <2000 0 0 0 0>; 347 reg = <0x2000 0x0 0x0 0x0 0x0>;
347 ranges = <1 0 01000000 0 0 00001000>; 348 ranges = <0x1 0x0 0x1000000 0x0 0x0 0x1000>;
348 interrupt-parent = <&i8259>; 349 interrupt-parent = <&i8259>;
349 350
350 i8259: interrupt-controller@20 { 351 i8259: interrupt-controller@20 {
351 interrupt-controller; 352 interrupt-controller;
352 device_type = "interrupt-controller"; 353 device_type = "interrupt-controller";
353 reg = <1 20 2 354 reg = <0x1 0x20 0x2
354 1 a0 2 355 0x1 0xa0 0x2
355 1 4d0 2>; 356 0x1 0x4d0 0x2>;
356 #address-cells = <0>; 357 #address-cells = <0>;
357 #interrupt-cells = <2>; 358 #interrupt-cells = <2>;
358 compatible = "chrp,iic"; 359 compatible = "chrp,iic";
@@ -362,7 +363,7 @@
362 363
363 rtc@70 { 364 rtc@70 {
364 compatible = "pnpPNP,b00"; 365 compatible = "pnpPNP,b00";
365 reg = <1 70 2>; 366 reg = <0x1 0x70 0x2>;
366 }; 367 };
367 }; 368 };
368 }; 369 };
@@ -370,64 +371,64 @@
370 371
371 pci1: pci@e0009000 { 372 pci1: pci@e0009000 {
372 cell-index = <1>; 373 cell-index = <1>;
373 interrupt-map-mask = <f800 0 0 7>; 374 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
374 interrupt-map = < 375 interrupt-map = <
375 376
376 /* IDSEL 0x15 */ 377 /* IDSEL 0x15 */
377 a800 0 0 1 &mpic b 1 378 0xa800 0x0 0x0 0x1 &mpic 0xb 0x1
378 a800 0 0 2 &mpic 1 1 379 0xa800 0x0 0x0 0x2 &mpic 0x1 0x1
379 a800 0 0 3 &mpic 2 1 380 0xa800 0x0 0x0 0x3 &mpic 0x2 0x1
380 a800 0 0 4 &mpic 3 1>; 381 0xa800 0x0 0x0 0x4 &mpic 0x3 0x1>;
381 382
382 interrupt-parent = <&mpic>; 383 interrupt-parent = <&mpic>;
383 interrupts = <19 2>; 384 interrupts = <25 2>;
384 bus-range = <0 0>; 385 bus-range = <0 0>;
385 ranges = <02000000 0 90000000 90000000 0 10000000 386 ranges = <0x2000000 0x0 0x90000000 0x90000000 0x0 0x10000000
386 01000000 0 00000000 e2800000 0 00800000>; 387 0x1000000 0x0 0x0 0xe2800000 0x0 0x800000>;
387 clock-frequency = <3f940aa>; 388 clock-frequency = <66666666>;
388 #interrupt-cells = <1>; 389 #interrupt-cells = <1>;
389 #size-cells = <2>; 390 #size-cells = <2>;
390 #address-cells = <3>; 391 #address-cells = <3>;
391 reg = <e0009000 1000>; 392 reg = <0xe0009000 0x1000>;
392 compatible = "fsl,mpc8540-pci"; 393 compatible = "fsl,mpc8540-pci";
393 device_type = "pci"; 394 device_type = "pci";
394 }; 395 };
395 396
396 pci2: pcie@e000a000 { 397 pci2: pcie@e000a000 {
397 cell-index = <2>; 398 cell-index = <2>;
398 interrupt-map-mask = <f800 0 0 7>; 399 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
399 interrupt-map = < 400 interrupt-map = <
400 401
401 /* IDSEL 0x0 (PEX) */ 402 /* IDSEL 0x0 (PEX) */
402 00000 0 0 1 &mpic 0 1 403 00000 0x0 0x0 0x1 &mpic 0x0 0x1
403 00000 0 0 2 &mpic 1 1 404 00000 0x0 0x0 0x2 &mpic 0x1 0x1
404 00000 0 0 3 &mpic 2 1 405 00000 0x0 0x0 0x3 &mpic 0x2 0x1
405 00000 0 0 4 &mpic 3 1>; 406 00000 0x0 0x0 0x4 &mpic 0x3 0x1>;
406 407
407 interrupt-parent = <&mpic>; 408 interrupt-parent = <&mpic>;
408 interrupts = <1a 2>; 409 interrupts = <26 2>;
409 bus-range = <0 ff>; 410 bus-range = <0 255>;
410 ranges = <02000000 0 a0000000 a0000000 0 20000000 411 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
411 01000000 0 00000000 e3000000 0 08000000>; 412 0x1000000 0x0 0x0 0xe3000000 0x0 0x8000000>;
412 clock-frequency = <1fca055>; 413 clock-frequency = <33333333>;
413 #interrupt-cells = <1>; 414 #interrupt-cells = <1>;
414 #size-cells = <2>; 415 #size-cells = <2>;
415 #address-cells = <3>; 416 #address-cells = <3>;
416 reg = <e000a000 1000>; 417 reg = <0xe000a000 0x1000>;
417 compatible = "fsl,mpc8548-pcie"; 418 compatible = "fsl,mpc8548-pcie";
418 device_type = "pci"; 419 device_type = "pci";
419 pcie@0 { 420 pcie@0 {
420 reg = <0 0 0 0 0>; 421 reg = <0x0 0x0 0x0 0x0 0x0>;
421 #size-cells = <2>; 422 #size-cells = <2>;
422 #address-cells = <3>; 423 #address-cells = <3>;
423 device_type = "pci"; 424 device_type = "pci";
424 ranges = <02000000 0 a0000000 425 ranges = <0x2000000 0x0 0xa0000000
425 02000000 0 a0000000 426 0x2000000 0x0 0xa0000000
426 0 20000000 427 0x0 0x20000000
427 428
428 01000000 0 00000000 429 0x1000000 0x0 0x0
429 01000000 0 00000000 430 0x1000000 0x0 0x0
430 0 08000000>; 431 0x0 0x8000000>;
431 }; 432 };
432 }; 433 };
433}; 434};
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 4538f3c38862..b025c566c10d 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8555 CDS Device Tree Source 2 * MPC8555 CDS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8555CDS"; 15 model = "MPC8555CDS";
@@ -31,11 +32,11 @@
31 32
32 PowerPC,8555@0 { 33 PowerPC,8555@0 {
33 device_type = "cpu"; 34 device_type = "cpu";
34 reg = <0>; 35 reg = <0x0>;
35 d-cache-line-size = <20>; // 32 bytes 36 d-cache-line-size = <32>; // 32 bytes
36 i-cache-line-size = <20>; // 32 bytes 37 i-cache-line-size = <32>; // 32 bytes
37 d-cache-size = <8000>; // L1, 32K 38 d-cache-size = <0x8000>; // L1, 32K
38 i-cache-size = <8000>; // L1, 32K 39 i-cache-size = <0x8000>; // L1, 32K
39 timebase-frequency = <0>; // 33 MHz, from uboot 40 timebase-frequency = <0>; // 33 MHz, from uboot
40 bus-frequency = <0>; // 166 MHz 41 bus-frequency = <0>; // 166 MHz
41 clock-frequency = <0>; // 825 MHz, from uboot 42 clock-frequency = <0>; // 825 MHz, from uboot
@@ -44,31 +45,31 @@
44 45
45 memory { 46 memory {
46 device_type = "memory"; 47 device_type = "memory";
47 reg = <00000000 08000000>; // 128M at 0x0 48 reg = <0x0 0x8000000>; // 128M at 0x0
48 }; 49 };
49 50
50 soc8555@e0000000 { 51 soc8555@e0000000 {
51 #address-cells = <1>; 52 #address-cells = <1>;
52 #size-cells = <1>; 53 #size-cells = <1>;
53 device_type = "soc"; 54 device_type = "soc";
54 ranges = <0 e0000000 00100000>; 55 ranges = <0x0 0xe0000000 0x100000>;
55 reg = <e0000000 00001000>; // CCSRBAR 1M 56 reg = <0xe0000000 0x1000>; // CCSRBAR 1M
56 bus-frequency = <0>; 57 bus-frequency = <0>;
57 58
58 memory-controller@2000 { 59 memory-controller@2000 {
59 compatible = "fsl,8555-memory-controller"; 60 compatible = "fsl,8555-memory-controller";
60 reg = <2000 1000>; 61 reg = <0x2000 0x1000>;
61 interrupt-parent = <&mpic>; 62 interrupt-parent = <&mpic>;
62 interrupts = <12 2>; 63 interrupts = <18 2>;
63 }; 64 };
64 65
65 l2-cache-controller@20000 { 66 l2-cache-controller@20000 {
66 compatible = "fsl,8555-l2-cache-controller"; 67 compatible = "fsl,8555-l2-cache-controller";
67 reg = <20000 1000>; 68 reg = <0x20000 0x1000>;
68 cache-line-size = <20>; // 32 bytes 69 cache-line-size = <32>; // 32 bytes
69 cache-size = <40000>; // L2, 256K 70 cache-size = <0x40000>; // L2, 256K
70 interrupt-parent = <&mpic>; 71 interrupt-parent = <&mpic>;
71 interrupts = <10 2>; 72 interrupts = <16 2>;
72 }; 73 };
73 74
74 i2c@3000 { 75 i2c@3000 {
@@ -76,8 +77,8 @@
76 #size-cells = <0>; 77 #size-cells = <0>;
77 cell-index = <0>; 78 cell-index = <0>;
78 compatible = "fsl-i2c"; 79 compatible = "fsl-i2c";
79 reg = <3000 100>; 80 reg = <0x3000 0x100>;
80 interrupts = <2b 2>; 81 interrupts = <43 2>;
81 interrupt-parent = <&mpic>; 82 interrupt-parent = <&mpic>;
82 dfsrr; 83 dfsrr;
83 }; 84 };
@@ -86,18 +87,18 @@
86 #address-cells = <1>; 87 #address-cells = <1>;
87 #size-cells = <0>; 88 #size-cells = <0>;
88 compatible = "fsl,gianfar-mdio"; 89 compatible = "fsl,gianfar-mdio";
89 reg = <24520 20>; 90 reg = <0x24520 0x20>;
90 91
91 phy0: ethernet-phy@0 { 92 phy0: ethernet-phy@0 {
92 interrupt-parent = <&mpic>; 93 interrupt-parent = <&mpic>;
93 interrupts = <5 1>; 94 interrupts = <5 1>;
94 reg = <0>; 95 reg = <0x0>;
95 device_type = "ethernet-phy"; 96 device_type = "ethernet-phy";
96 }; 97 };
97 phy1: ethernet-phy@1 { 98 phy1: ethernet-phy@1 {
98 interrupt-parent = <&mpic>; 99 interrupt-parent = <&mpic>;
99 interrupts = <5 1>; 100 interrupts = <5 1>;
100 reg = <1>; 101 reg = <0x1>;
101 device_type = "ethernet-phy"; 102 device_type = "ethernet-phy";
102 }; 103 };
103 }; 104 };
@@ -107,9 +108,9 @@
107 device_type = "network"; 108 device_type = "network";
108 model = "TSEC"; 109 model = "TSEC";
109 compatible = "gianfar"; 110 compatible = "gianfar";
110 reg = <24000 1000>; 111 reg = <0x24000 0x1000>;
111 local-mac-address = [ 00 00 00 00 00 00 ]; 112 local-mac-address = [ 00 00 00 00 00 00 ];
112 interrupts = <1d 2 1e 2 22 2>; 113 interrupts = <29 2 30 2 34 2>;
113 interrupt-parent = <&mpic>; 114 interrupt-parent = <&mpic>;
114 phy-handle = <&phy0>; 115 phy-handle = <&phy0>;
115 }; 116 };
@@ -119,9 +120,9 @@
119 device_type = "network"; 120 device_type = "network";
120 model = "TSEC"; 121 model = "TSEC";
121 compatible = "gianfar"; 122 compatible = "gianfar";
122 reg = <25000 1000>; 123 reg = <0x25000 0x1000>;
123 local-mac-address = [ 00 00 00 00 00 00 ]; 124 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <23 2 24 2 28 2>; 125 interrupts = <35 2 36 2 40 2>;
125 interrupt-parent = <&mpic>; 126 interrupt-parent = <&mpic>;
126 phy-handle = <&phy1>; 127 phy-handle = <&phy1>;
127 }; 128 };
@@ -130,9 +131,9 @@
130 cell-index = <0>; 131 cell-index = <0>;
131 device_type = "serial"; 132 device_type = "serial";
132 compatible = "ns16550"; 133 compatible = "ns16550";
133 reg = <4500 100>; // reg base, size 134 reg = <0x4500 0x100>; // reg base, size
134 clock-frequency = <0>; // should we fill in in uboot? 135 clock-frequency = <0>; // should we fill in in uboot?
135 interrupts = <2a 2>; 136 interrupts = <42 2>;
136 interrupt-parent = <&mpic>; 137 interrupt-parent = <&mpic>;
137 }; 138 };
138 139
@@ -140,9 +141,9 @@
140 cell-index = <1>; 141 cell-index = <1>;
141 device_type = "serial"; 142 device_type = "serial";
142 compatible = "ns16550"; 143 compatible = "ns16550";
143 reg = <4600 100>; // reg base, size 144 reg = <0x4600 0x100>; // reg base, size
144 clock-frequency = <0>; // should we fill in in uboot? 145 clock-frequency = <0>; // should we fill in in uboot?
145 interrupts = <2a 2>; 146 interrupts = <42 2>;
146 interrupt-parent = <&mpic>; 147 interrupt-parent = <&mpic>;
147 }; 148 };
148 149
@@ -151,7 +152,7 @@
151 interrupt-controller; 152 interrupt-controller;
152 #address-cells = <0>; 153 #address-cells = <0>;
153 #interrupt-cells = <2>; 154 #interrupt-cells = <2>;
154 reg = <40000 40000>; 155 reg = <0x40000 0x40000>;
155 compatible = "chrp,open-pic"; 156 compatible = "chrp,open-pic";
156 device_type = "open-pic"; 157 device_type = "open-pic";
157 big-endian; 158 big-endian;
@@ -161,17 +162,17 @@
161 #address-cells = <1>; 162 #address-cells = <1>;
162 #size-cells = <1>; 163 #size-cells = <1>;
163 compatible = "fsl,mpc8555-cpm", "fsl,cpm2"; 164 compatible = "fsl,mpc8555-cpm", "fsl,cpm2";
164 reg = <919c0 30>; 165 reg = <0x919c0 0x30>;
165 ranges; 166 ranges;
166 167
167 muram@80000 { 168 muram@80000 {
168 #address-cells = <1>; 169 #address-cells = <1>;
169 #size-cells = <1>; 170 #size-cells = <1>;
170 ranges = <0 80000 10000>; 171 ranges = <0x0 0x80000 0x10000>;
171 172
172 data@0 { 173 data@0 {
173 compatible = "fsl,cpm-muram-data"; 174 compatible = "fsl,cpm-muram-data";
174 reg = <0 2000 9000 1000>; 175 reg = <0x0 0x2000 0x9000 0x1000>;
175 }; 176 };
176 }; 177 };
177 178
@@ -179,16 +180,16 @@
179 compatible = "fsl,mpc8555-brg", 180 compatible = "fsl,mpc8555-brg",
180 "fsl,cpm2-brg", 181 "fsl,cpm2-brg",
181 "fsl,cpm-brg"; 182 "fsl,cpm-brg";
182 reg = <919f0 10 915f0 10>; 183 reg = <0x919f0 0x10 0x915f0 0x10>;
183 }; 184 };
184 185
185 cpmpic: pic@90c00 { 186 cpmpic: pic@90c00 {
186 interrupt-controller; 187 interrupt-controller;
187 #address-cells = <0>; 188 #address-cells = <0>;
188 #interrupt-cells = <2>; 189 #interrupt-cells = <2>;
189 interrupts = <2e 2>; 190 interrupts = <46 2>;
190 interrupt-parent = <&mpic>; 191 interrupt-parent = <&mpic>;
191 reg = <90c00 80>; 192 reg = <0x90c00 0x80>;
192 compatible = "fsl,mpc8555-cpm-pic", "fsl,cpm2-pic"; 193 compatible = "fsl,mpc8555-cpm-pic", "fsl,cpm2-pic";
193 }; 194 };
194 }; 195 };
@@ -196,68 +197,68 @@
196 197
197 pci0: pci@e0008000 { 198 pci0: pci@e0008000 {
198 cell-index = <0>; 199 cell-index = <0>;
199 interrupt-map-mask = <1f800 0 0 7>; 200 interrupt-map-mask = <0x1f800 0x0 0x0 0x7>;
200 interrupt-map = < 201 interrupt-map = <
201 202
202 /* IDSEL 0x10 */ 203 /* IDSEL 0x10 */
203 08000 0 0 1 &mpic 0 1 204 0x8000 0x0 0x0 0x1 &mpic 0x0 0x1
204 08000 0 0 2 &mpic 1 1 205 0x8000 0x0 0x0 0x2 &mpic 0x1 0x1
205 08000 0 0 3 &mpic 2 1 206 0x8000 0x0 0x0 0x3 &mpic 0x2 0x1
206 08000 0 0 4 &mpic 3 1 207 0x8000 0x0 0x0 0x4 &mpic 0x3 0x1
207 208
208 /* IDSEL 0x11 */ 209 /* IDSEL 0x11 */
209 08800 0 0 1 &mpic 0 1 210 0x8800 0x0 0x0 0x1 &mpic 0x0 0x1
210 08800 0 0 2 &mpic 1 1 211 0x8800 0x0 0x0 0x2 &mpic 0x1 0x1
211 08800 0 0 3 &mpic 2 1 212 0x8800 0x0 0x0 0x3 &mpic 0x2 0x1
212 08800 0 0 4 &mpic 3 1 213 0x8800 0x0 0x0 0x4 &mpic 0x3 0x1
213 214
214 /* IDSEL 0x12 (Slot 1) */ 215 /* IDSEL 0x12 (Slot 1) */
215 09000 0 0 1 &mpic 0 1 216 0x9000 0x0 0x0 0x1 &mpic 0x0 0x1
216 09000 0 0 2 &mpic 1 1 217 0x9000 0x0 0x0 0x2 &mpic 0x1 0x1
217 09000 0 0 3 &mpic 2 1 218 0x9000 0x0 0x0 0x3 &mpic 0x2 0x1
218 09000 0 0 4 &mpic 3 1 219 0x9000 0x0 0x0 0x4 &mpic 0x3 0x1
219 220
220 /* IDSEL 0x13 (Slot 2) */ 221 /* IDSEL 0x13 (Slot 2) */
221 09800 0 0 1 &mpic 1 1 222 0x9800 0x0 0x0 0x1 &mpic 0x1 0x1
222 09800 0 0 2 &mpic 2 1 223 0x9800 0x0 0x0 0x2 &mpic 0x2 0x1
223 09800 0 0 3 &mpic 3 1 224 0x9800 0x0 0x0 0x3 &mpic 0x3 0x1
224 09800 0 0 4 &mpic 0 1 225 0x9800 0x0 0x0 0x4 &mpic 0x0 0x1
225 226
226 /* IDSEL 0x14 (Slot 3) */ 227 /* IDSEL 0x14 (Slot 3) */
227 0a000 0 0 1 &mpic 2 1 228 0xa000 0x0 0x0 0x1 &mpic 0x2 0x1
228 0a000 0 0 2 &mpic 3 1 229 0xa000 0x0 0x0 0x2 &mpic 0x3 0x1
229 0a000 0 0 3 &mpic 0 1 230 0xa000 0x0 0x0 0x3 &mpic 0x0 0x1
230 0a000 0 0 4 &mpic 1 1 231 0xa000 0x0 0x0 0x4 &mpic 0x1 0x1
231 232
232 /* IDSEL 0x15 (Slot 4) */ 233 /* IDSEL 0x15 (Slot 4) */
233 0a800 0 0 1 &mpic 3 1 234 0xa800 0x0 0x0 0x1 &mpic 0x3 0x1
234 0a800 0 0 2 &mpic 0 1 235 0xa800 0x0 0x0 0x2 &mpic 0x0 0x1
235 0a800 0 0 3 &mpic 1 1 236 0xa800 0x0 0x0 0x3 &mpic 0x1 0x1
236 0a800 0 0 4 &mpic 2 1 237 0xa800 0x0 0x0 0x4 &mpic 0x2 0x1
237 238
238 /* Bus 1 (Tundra Bridge) */ 239 /* Bus 1 (Tundra Bridge) */
239 /* IDSEL 0x12 (ISA bridge) */ 240 /* IDSEL 0x12 (ISA bridge) */
240 19000 0 0 1 &mpic 0 1 241 0x19000 0x0 0x0 0x1 &mpic 0x0 0x1
241 19000 0 0 2 &mpic 1 1 242 0x19000 0x0 0x0 0x2 &mpic 0x1 0x1
242 19000 0 0 3 &mpic 2 1 243 0x19000 0x0 0x0 0x3 &mpic 0x2 0x1
243 19000 0 0 4 &mpic 3 1>; 244 0x19000 0x0 0x0 0x4 &mpic 0x3 0x1>;
244 interrupt-parent = <&mpic>; 245 interrupt-parent = <&mpic>;
245 interrupts = <18 2>; 246 interrupts = <24 2>;
246 bus-range = <0 0>; 247 bus-range = <0 0>;
247 ranges = <02000000 0 80000000 80000000 0 20000000 248 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
248 01000000 0 00000000 e2000000 0 00100000>; 249 0x1000000 0x0 0x0 0xe2000000 0x0 0x100000>;
249 clock-frequency = <3f940aa>; 250 clock-frequency = <66666666>;
250 #interrupt-cells = <1>; 251 #interrupt-cells = <1>;
251 #size-cells = <2>; 252 #size-cells = <2>;
252 #address-cells = <3>; 253 #address-cells = <3>;
253 reg = <e0008000 1000>; 254 reg = <0xe0008000 0x1000>;
254 compatible = "fsl,mpc8540-pci"; 255 compatible = "fsl,mpc8540-pci";
255 device_type = "pci"; 256 device_type = "pci";
256 257
257 i8259@19000 { 258 i8259@19000 {
258 interrupt-controller; 259 interrupt-controller;
259 device_type = "interrupt-controller"; 260 device_type = "interrupt-controller";
260 reg = <19000 0 0 0 1>; 261 reg = <0x19000 0x0 0x0 0x0 0x1>;
261 #address-cells = <0>; 262 #address-cells = <0>;
262 #interrupt-cells = <2>; 263 #interrupt-cells = <2>;
263 compatible = "chrp,iic"; 264 compatible = "chrp,iic";
@@ -268,24 +269,24 @@
268 269
269 pci1: pci@e0009000 { 270 pci1: pci@e0009000 {
270 cell-index = <1>; 271 cell-index = <1>;
271 interrupt-map-mask = <f800 0 0 7>; 272 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
272 interrupt-map = < 273 interrupt-map = <
273 274
274 /* IDSEL 0x15 */ 275 /* IDSEL 0x15 */
275 a800 0 0 1 &mpic b 1 276 0xa800 0x0 0x0 0x1 &mpic 0xb 0x1
276 a800 0 0 2 &mpic b 1 277 0xa800 0x0 0x0 0x2 &mpic 0xb 0x1
277 a800 0 0 3 &mpic b 1 278 0xa800 0x0 0x0 0x3 &mpic 0xb 0x1
278 a800 0 0 4 &mpic b 1>; 279 0xa800 0x0 0x0 0x4 &mpic 0xb 0x1>;
279 interrupt-parent = <&mpic>; 280 interrupt-parent = <&mpic>;
280 interrupts = <19 2>; 281 interrupts = <25 2>;
281 bus-range = <0 0>; 282 bus-range = <0 0>;
282 ranges = <02000000 0 a0000000 a0000000 0 20000000 283 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
283 01000000 0 00000000 e3000000 0 00100000>; 284 0x1000000 0x0 0x0 0xe3000000 0x0 0x100000>;
284 clock-frequency = <3f940aa>; 285 clock-frequency = <66666666>;
285 #interrupt-cells = <1>; 286 #interrupt-cells = <1>;
286 #size-cells = <2>; 287 #size-cells = <2>;
287 #address-cells = <3>; 288 #address-cells = <3>;
288 reg = <e0009000 1000>; 289 reg = <0xe0009000 0x1000>;
289 compatible = "fsl,mpc8540-pci"; 290 compatible = "fsl,mpc8540-pci";
290 device_type = "pci"; 291 device_type = "pci";
291 }; 292 };
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 639ce8a709a6..0cc16ab305d1 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8560 ADS Device Tree Source 2 * MPC8560 ADS Device Tree Source
3 * 3 *
4 * Copyright 2006 Freescale Semiconductor Inc. 4 * Copyright 2006, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8560ADS"; 15 model = "MPC8560ADS";
@@ -32,74 +33,74 @@
32 33
33 PowerPC,8560@0 { 34 PowerPC,8560@0 {
34 device_type = "cpu"; 35 device_type = "cpu";
35 reg = <0>; 36 reg = <0x0>;
36 d-cache-line-size = <20>; // 32 bytes 37 d-cache-line-size = <32>; // 32 bytes
37 i-cache-line-size = <20>; // 32 bytes 38 i-cache-line-size = <32>; // 32 bytes
38 d-cache-size = <8000>; // L1, 32K 39 d-cache-size = <0x8000>; // L1, 32K
39 i-cache-size = <8000>; // L1, 32K 40 i-cache-size = <0x8000>; // L1, 32K
40 timebase-frequency = <04ead9a0>; 41 timebase-frequency = <82500000>;
41 bus-frequency = <13ab6680>; 42 bus-frequency = <330000000>;
42 clock-frequency = <312c8040>; 43 clock-frequency = <825000000>;
43 }; 44 };
44 }; 45 };
45 46
46 memory { 47 memory {
47 device_type = "memory"; 48 device_type = "memory";
48 reg = <00000000 10000000>; 49 reg = <0x0 0x10000000>;
49 }; 50 };
50 51
51 soc8560@e0000000 { 52 soc8560@e0000000 {
52 #address-cells = <1>; 53 #address-cells = <1>;
53 #size-cells = <1>; 54 #size-cells = <1>;
54 device_type = "soc"; 55 device_type = "soc";
55 ranges = <0 e0000000 00100000>; 56 ranges = <0x0 0xe0000000 0x100000>;
56 reg = <e0000000 00000200>; 57 reg = <0xe0000000 0x200>;
57 bus-frequency = <13ab6680>; 58 bus-frequency = <330000000>;
58 59
59 memory-controller@2000 { 60 memory-controller@2000 {
60 compatible = "fsl,8540-memory-controller"; 61 compatible = "fsl,8540-memory-controller";
61 reg = <2000 1000>; 62 reg = <0x2000 0x1000>;
62 interrupt-parent = <&mpic>; 63 interrupt-parent = <&mpic>;
63 interrupts = <12 2>; 64 interrupts = <18 2>;
64 }; 65 };
65 66
66 l2-cache-controller@20000 { 67 l2-cache-controller@20000 {
67 compatible = "fsl,8540-l2-cache-controller"; 68 compatible = "fsl,8540-l2-cache-controller";
68 reg = <20000 1000>; 69 reg = <0x20000 0x1000>;
69 cache-line-size = <20>; // 32 bytes 70 cache-line-size = <32>; // 32 bytes
70 cache-size = <40000>; // L2, 256K 71 cache-size = <0x40000>; // L2, 256K
71 interrupt-parent = <&mpic>; 72 interrupt-parent = <&mpic>;
72 interrupts = <10 2>; 73 interrupts = <16 2>;
73 }; 74 };
74 75
75 mdio@24520 { 76 mdio@24520 {
76 #address-cells = <1>; 77 #address-cells = <1>;
77 #size-cells = <0>; 78 #size-cells = <0>;
78 compatible = "fsl,gianfar-mdio"; 79 compatible = "fsl,gianfar-mdio";
79 reg = <24520 20>; 80 reg = <0x24520 0x20>;
80 81
81 phy0: ethernet-phy@0 { 82 phy0: ethernet-phy@0 {
82 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
83 interrupts = <5 1>; 84 interrupts = <5 1>;
84 reg = <0>; 85 reg = <0x0>;
85 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
86 }; 87 };
87 phy1: ethernet-phy@1 { 88 phy1: ethernet-phy@1 {
88 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
89 interrupts = <5 1>; 90 interrupts = <5 1>;
90 reg = <1>; 91 reg = <0x1>;
91 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
92 }; 93 };
93 phy2: ethernet-phy@2 { 94 phy2: ethernet-phy@2 {
94 interrupt-parent = <&mpic>; 95 interrupt-parent = <&mpic>;
95 interrupts = <7 1>; 96 interrupts = <7 1>;
96 reg = <2>; 97 reg = <0x2>;
97 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
98 }; 99 };
99 phy3: ethernet-phy@3 { 100 phy3: ethernet-phy@3 {
100 interrupt-parent = <&mpic>; 101 interrupt-parent = <&mpic>;
101 interrupts = <7 1>; 102 interrupts = <7 1>;
102 reg = <3>; 103 reg = <0x3>;
103 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
104 }; 105 };
105 }; 106 };
@@ -109,9 +110,9 @@
109 device_type = "network"; 110 device_type = "network";
110 model = "TSEC"; 111 model = "TSEC";
111 compatible = "gianfar"; 112 compatible = "gianfar";
112 reg = <24000 1000>; 113 reg = <0x24000 0x1000>;
113 local-mac-address = [ 00 00 00 00 00 00 ]; 114 local-mac-address = [ 00 00 00 00 00 00 ];
114 interrupts = <1d 2 1e 2 22 2>; 115 interrupts = <29 2 30 2 34 2>;
115 interrupt-parent = <&mpic>; 116 interrupt-parent = <&mpic>;
116 phy-handle = <&phy0>; 117 phy-handle = <&phy0>;
117 }; 118 };
@@ -121,9 +122,9 @@
121 device_type = "network"; 122 device_type = "network";
122 model = "TSEC"; 123 model = "TSEC";
123 compatible = "gianfar"; 124 compatible = "gianfar";
124 reg = <25000 1000>; 125 reg = <0x25000 0x1000>;
125 local-mac-address = [ 00 00 00 00 00 00 ]; 126 local-mac-address = [ 00 00 00 00 00 00 ];
126 interrupts = <23 2 24 2 28 2>; 127 interrupts = <35 2 36 2 40 2>;
127 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
128 phy-handle = <&phy1>; 129 phy-handle = <&phy1>;
129 }; 130 };
@@ -132,7 +133,7 @@
132 interrupt-controller; 133 interrupt-controller;
133 #address-cells = <0>; 134 #address-cells = <0>;
134 #interrupt-cells = <2>; 135 #interrupt-cells = <2>;
135 reg = <40000 40000>; 136 reg = <0x40000 0x40000>;
136 device_type = "open-pic"; 137 device_type = "open-pic";
137 }; 138 };
138 139
@@ -140,17 +141,17 @@
140 #address-cells = <1>; 141 #address-cells = <1>;
141 #size-cells = <1>; 142 #size-cells = <1>;
142 compatible = "fsl,mpc8560-cpm", "fsl,cpm2"; 143 compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
143 reg = <919c0 30>; 144 reg = <0x919c0 0x30>;
144 ranges; 145 ranges;
145 146
146 muram@80000 { 147 muram@80000 {
147 #address-cells = <1>; 148 #address-cells = <1>;
148 #size-cells = <1>; 149 #size-cells = <1>;
149 ranges = <0 80000 10000>; 150 ranges = <0x0 0x80000 0x10000>;
150 151
151 data@0 { 152 data@0 {
152 compatible = "fsl,cpm-muram-data"; 153 compatible = "fsl,cpm-muram-data";
153 reg = <0 4000 9000 2000>; 154 reg = <0x0 0x4000 0x9000 0x2000>;
154 }; 155 };
155 }; 156 };
156 157
@@ -158,17 +159,17 @@
158 compatible = "fsl,mpc8560-brg", 159 compatible = "fsl,mpc8560-brg",
159 "fsl,cpm2-brg", 160 "fsl,cpm2-brg",
160 "fsl,cpm-brg"; 161 "fsl,cpm-brg";
161 reg = <919f0 10 915f0 10>; 162 reg = <0x919f0 0x10 0x915f0 0x10>;
162 clock-frequency = <d#165000000>; 163 clock-frequency = <165000000>;
163 }; 164 };
164 165
165 cpmpic: pic@90c00 { 166 cpmpic: pic@90c00 {
166 interrupt-controller; 167 interrupt-controller;
167 #address-cells = <0>; 168 #address-cells = <0>;
168 #interrupt-cells = <2>; 169 #interrupt-cells = <2>;
169 interrupts = <2e 2>; 170 interrupts = <46 2>;
170 interrupt-parent = <&mpic>; 171 interrupt-parent = <&mpic>;
171 reg = <90c00 80>; 172 reg = <0x90c00 0x80>;
172 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic"; 173 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
173 }; 174 };
174 175
@@ -176,11 +177,11 @@
176 device_type = "serial"; 177 device_type = "serial";
177 compatible = "fsl,mpc8560-scc-uart", 178 compatible = "fsl,mpc8560-scc-uart",
178 "fsl,cpm2-scc-uart"; 179 "fsl,cpm2-scc-uart";
179 reg = <91a00 20 88000 100>; 180 reg = <0x91a00 0x20 0x88000 0x100>;
180 fsl,cpm-brg = <1>; 181 fsl,cpm-brg = <1>;
181 fsl,cpm-command = <00800000>; 182 fsl,cpm-command = <0x800000>;
182 current-speed = <1c200>; 183 current-speed = <115200>;
183 interrupts = <28 8>; 184 interrupts = <40 8>;
184 interrupt-parent = <&cpmpic>; 185 interrupt-parent = <&cpmpic>;
185 }; 186 };
186 187
@@ -188,11 +189,11 @@
188 device_type = "serial"; 189 device_type = "serial";
189 compatible = "fsl,mpc8560-scc-uart", 190 compatible = "fsl,mpc8560-scc-uart",
190 "fsl,cpm2-scc-uart"; 191 "fsl,cpm2-scc-uart";
191 reg = <91a20 20 88100 100>; 192 reg = <0x91a20 0x20 0x88100 0x100>;
192 fsl,cpm-brg = <2>; 193 fsl,cpm-brg = <2>;
193 fsl,cpm-command = <04a00000>; 194 fsl,cpm-command = <0x4a00000>;
194 current-speed = <1c200>; 195 current-speed = <115200>;
195 interrupts = <29 8>; 196 interrupts = <41 8>;
196 interrupt-parent = <&cpmpic>; 197 interrupt-parent = <&cpmpic>;
197 }; 198 };
198 199
@@ -200,10 +201,10 @@
200 device_type = "network"; 201 device_type = "network";
201 compatible = "fsl,mpc8560-fcc-enet", 202 compatible = "fsl,mpc8560-fcc-enet",
202 "fsl,cpm2-fcc-enet"; 203 "fsl,cpm2-fcc-enet";
203 reg = <91320 20 88500 100 913b0 1>; 204 reg = <0x91320 0x20 0x88500 0x100 0x913b0 0x1>;
204 local-mac-address = [ 00 00 00 00 00 00 ]; 205 local-mac-address = [ 00 00 00 00 00 00 ];
205 fsl,cpm-command = <16200300>; 206 fsl,cpm-command = <0x16200300>;
206 interrupts = <21 8>; 207 interrupts = <33 8>;
207 interrupt-parent = <&cpmpic>; 208 interrupt-parent = <&cpmpic>;
208 phy-handle = <&phy2>; 209 phy-handle = <&phy2>;
209 }; 210 };
@@ -212,10 +213,10 @@
212 device_type = "network"; 213 device_type = "network";
213 compatible = "fsl,mpc8560-fcc-enet", 214 compatible = "fsl,mpc8560-fcc-enet",
214 "fsl,cpm2-fcc-enet"; 215 "fsl,cpm2-fcc-enet";
215 reg = <91340 20 88600 100 913d0 1>; 216 reg = <0x91340 0x20 0x88600 0x100 0x913d0 0x1>;
216 local-mac-address = [ 00 00 00 00 00 00 ]; 217 local-mac-address = [ 00 00 00 00 00 00 ];
217 fsl,cpm-command = <1a400300>; 218 fsl,cpm-command = <0x1a400300>;
218 interrupts = <22 8>; 219 interrupts = <34 8>;
219 interrupt-parent = <&cpmpic>; 220 interrupt-parent = <&cpmpic>;
220 phy-handle = <&phy3>; 221 phy-handle = <&phy3>;
221 }; 222 };
@@ -229,87 +230,87 @@
229 #address-cells = <3>; 230 #address-cells = <3>;
230 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; 231 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
231 device_type = "pci"; 232 device_type = "pci";
232 reg = <e0008000 1000>; 233 reg = <0xe0008000 0x1000>;
233 clock-frequency = <3f940aa>; 234 clock-frequency = <66666666>;
234 interrupt-map-mask = <f800 0 0 7>; 235 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
235 interrupt-map = < 236 interrupt-map = <
236 237
237 /* IDSEL 0x2 */ 238 /* IDSEL 0x2 */
238 1000 0 0 1 &mpic 1 1 239 0x1000 0x0 0x0 0x1 &mpic 0x1 0x1
239 1000 0 0 2 &mpic 2 1 240 0x1000 0x0 0x0 0x2 &mpic 0x2 0x1
240 1000 0 0 3 &mpic 3 1 241 0x1000 0x0 0x0 0x3 &mpic 0x3 0x1
241 1000 0 0 4 &mpic 4 1 242 0x1000 0x0 0x0 0x4 &mpic 0x4 0x1
242 243
243 /* IDSEL 0x3 */ 244 /* IDSEL 0x3 */
244 1800 0 0 1 &mpic 4 1 245 0x1800 0x0 0x0 0x1 &mpic 0x4 0x1
245 1800 0 0 2 &mpic 1 1 246 0x1800 0x0 0x0 0x2 &mpic 0x1 0x1
246 1800 0 0 3 &mpic 2 1 247 0x1800 0x0 0x0 0x3 &mpic 0x2 0x1
247 1800 0 0 4 &mpic 3 1 248 0x1800 0x0 0x0 0x4 &mpic 0x3 0x1
248 249
249 /* IDSEL 0x4 */ 250 /* IDSEL 0x4 */
250 2000 0 0 1 &mpic 3 1 251 0x2000 0x0 0x0 0x1 &mpic 0x3 0x1
251 2000 0 0 2 &mpic 4 1 252 0x2000 0x0 0x0 0x2 &mpic 0x4 0x1
252 2000 0 0 3 &mpic 1 1 253 0x2000 0x0 0x0 0x3 &mpic 0x1 0x1
253 2000 0 0 4 &mpic 2 1 254 0x2000 0x0 0x0 0x4 &mpic 0x2 0x1
254 255
255 /* IDSEL 0x5 */ 256 /* IDSEL 0x5 */
256 2800 0 0 1 &mpic 2 1 257 0x2800 0x0 0x0 0x1 &mpic 0x2 0x1
257 2800 0 0 2 &mpic 3 1 258 0x2800 0x0 0x0 0x2 &mpic 0x3 0x1
258 2800 0 0 3 &mpic 4 1 259 0x2800 0x0 0x0 0x3 &mpic 0x4 0x1
259 2800 0 0 4 &mpic 1 1 260 0x2800 0x0 0x0 0x4 &mpic 0x1 0x1
260 261
261 /* IDSEL 12 */ 262 /* IDSEL 12 */
262 6000 0 0 1 &mpic 1 1 263 0x6000 0x0 0x0 0x1 &mpic 0x1 0x1
263 6000 0 0 2 &mpic 2 1 264 0x6000 0x0 0x0 0x2 &mpic 0x2 0x1
264 6000 0 0 3 &mpic 3 1 265 0x6000 0x0 0x0 0x3 &mpic 0x3 0x1
265 6000 0 0 4 &mpic 4 1 266 0x6000 0x0 0x0 0x4 &mpic 0x4 0x1
266 267
267 /* IDSEL 13 */ 268 /* IDSEL 13 */
268 6800 0 0 1 &mpic 4 1 269 0x6800 0x0 0x0 0x1 &mpic 0x4 0x1
269 6800 0 0 2 &mpic 1 1 270 0x6800 0x0 0x0 0x2 &mpic 0x1 0x1
270 6800 0 0 3 &mpic 2 1 271 0x6800 0x0 0x0 0x3 &mpic 0x2 0x1
271 6800 0 0 4 &mpic 3 1 272 0x6800 0x0 0x0 0x4 &mpic 0x3 0x1
272 273
273 /* IDSEL 14*/ 274 /* IDSEL 14*/
274 7000 0 0 1 &mpic 3 1 275 0x7000 0x0 0x0 0x1 &mpic 0x3 0x1
275 7000 0 0 2 &mpic 4 1 276 0x7000 0x0 0x0 0x2 &mpic 0x4 0x1
276 7000 0 0 3 &mpic 1 1 277 0x7000 0x0 0x0 0x3 &mpic 0x1 0x1
277 7000 0 0 4 &mpic 2 1 278 0x7000 0x0 0x0 0x4 &mpic 0x2 0x1
278 279
279 /* IDSEL 15 */ 280 /* IDSEL 15 */
280 7800 0 0 1 &mpic 2 1 281 0x7800 0x0 0x0 0x1 &mpic 0x2 0x1
281 7800 0 0 2 &mpic 3 1 282 0x7800 0x0 0x0 0x2 &mpic 0x3 0x1
282 7800 0 0 3 &mpic 4 1 283 0x7800 0x0 0x0 0x3 &mpic 0x4 0x1
283 7800 0 0 4 &mpic 1 1 284 0x7800 0x0 0x0 0x4 &mpic 0x1 0x1
284 285
285 /* IDSEL 18 */ 286 /* IDSEL 18 */
286 9000 0 0 1 &mpic 1 1 287 0x9000 0x0 0x0 0x1 &mpic 0x1 0x1
287 9000 0 0 2 &mpic 2 1 288 0x9000 0x0 0x0 0x2 &mpic 0x2 0x1
288 9000 0 0 3 &mpic 3 1 289 0x9000 0x0 0x0 0x3 &mpic 0x3 0x1
289 9000 0 0 4 &mpic 4 1 290 0x9000 0x0 0x0 0x4 &mpic 0x4 0x1
290 291
291 /* IDSEL 19 */ 292 /* IDSEL 19 */
292 9800 0 0 1 &mpic 4 1 293 0x9800 0x0 0x0 0x1 &mpic 0x4 0x1
293 9800 0 0 2 &mpic 1 1 294 0x9800 0x0 0x0 0x2 &mpic 0x1 0x1
294 9800 0 0 3 &mpic 2 1 295 0x9800 0x0 0x0 0x3 &mpic 0x2 0x1
295 9800 0 0 4 &mpic 3 1 296 0x9800 0x0 0x0 0x4 &mpic 0x3 0x1
296 297
297 /* IDSEL 20 */ 298 /* IDSEL 20 */
298 a000 0 0 1 &mpic 3 1 299 0xa000 0x0 0x0 0x1 &mpic 0x3 0x1
299 a000 0 0 2 &mpic 4 1 300 0xa000 0x0 0x0 0x2 &mpic 0x4 0x1
300 a000 0 0 3 &mpic 1 1 301 0xa000 0x0 0x0 0x3 &mpic 0x1 0x1
301 a000 0 0 4 &mpic 2 1 302 0xa000 0x0 0x0 0x4 &mpic 0x2 0x1
302 303
303 /* IDSEL 21 */ 304 /* IDSEL 21 */
304 a800 0 0 1 &mpic 2 1 305 0xa800 0x0 0x0 0x1 &mpic 0x2 0x1
305 a800 0 0 2 &mpic 3 1 306 0xa800 0x0 0x0 0x2 &mpic 0x3 0x1
306 a800 0 0 3 &mpic 4 1 307 0xa800 0x0 0x0 0x3 &mpic 0x4 0x1
307 a800 0 0 4 &mpic 1 1>; 308 0xa800 0x0 0x0 0x4 &mpic 0x1 0x1>;
308 309
309 interrupt-parent = <&mpic>; 310 interrupt-parent = <&mpic>;
310 interrupts = <18 2>; 311 interrupts = <24 2>;
311 bus-range = <0 0>; 312 bus-range = <0 0>;
312 ranges = <02000000 0 80000000 80000000 0 20000000 313 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
313 01000000 0 00000000 e2000000 0 01000000>; 314 0x1000000 0x0 0x0 0xe2000000 0x0 0x1000000>;
314 }; 315 };
315}; 316};
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 97bc048f2158..a025a8ededc5 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8568E MDS Device Tree Source 2 * MPC8568E MDS Device Tree Source
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor Inc. 4 * Copyright 2007, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,10 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12 12/dts-v1/;
13/*
14/memreserve/ 00000000 1000000;
15*/
16 13
17/ { 14/ {
18 model = "MPC8568EMDS"; 15 model = "MPC8568EMDS";
@@ -37,11 +34,11 @@
37 34
38 PowerPC,8568@0 { 35 PowerPC,8568@0 {
39 device_type = "cpu"; 36 device_type = "cpu";
40 reg = <0>; 37 reg = <0x0>;
41 d-cache-line-size = <20>; // 32 bytes 38 d-cache-line-size = <32>; // 32 bytes
42 i-cache-line-size = <20>; // 32 bytes 39 i-cache-line-size = <32>; // 32 bytes
43 d-cache-size = <8000>; // L1, 32K 40 d-cache-size = <0x8000>; // L1, 32K
44 i-cache-size = <8000>; // L1, 32K 41 i-cache-size = <0x8000>; // L1, 32K
45 timebase-frequency = <0>; 42 timebase-frequency = <0>;
46 bus-frequency = <0>; 43 bus-frequency = <0>;
47 clock-frequency = <0>; 44 clock-frequency = <0>;
@@ -50,36 +47,36 @@
50 47
51 memory { 48 memory {
52 device_type = "memory"; 49 device_type = "memory";
53 reg = <00000000 10000000>; 50 reg = <0x0 0x10000000>;
54 }; 51 };
55 52
56 bcsr@f8000000 { 53 bcsr@f8000000 {
57 device_type = "board-control"; 54 device_type = "board-control";
58 reg = <f8000000 8000>; 55 reg = <0xf8000000 0x8000>;
59 }; 56 };
60 57
61 soc8568@e0000000 { 58 soc8568@e0000000 {
62 #address-cells = <1>; 59 #address-cells = <1>;
63 #size-cells = <1>; 60 #size-cells = <1>;
64 device_type = "soc"; 61 device_type = "soc";
65 ranges = <0 e0000000 00100000>; 62 ranges = <0x0 0xe0000000 0x100000>;
66 reg = <e0000000 00001000>; 63 reg = <0xe0000000 0x1000>;
67 bus-frequency = <0>; 64 bus-frequency = <0>;
68 65
69 memory-controller@2000 { 66 memory-controller@2000 {
70 compatible = "fsl,8568-memory-controller"; 67 compatible = "fsl,8568-memory-controller";
71 reg = <2000 1000>; 68 reg = <0x2000 0x1000>;
72 interrupt-parent = <&mpic>; 69 interrupt-parent = <&mpic>;
73 interrupts = <12 2>; 70 interrupts = <18 2>;
74 }; 71 };
75 72
76 l2-cache-controller@20000 { 73 l2-cache-controller@20000 {
77 compatible = "fsl,8568-l2-cache-controller"; 74 compatible = "fsl,8568-l2-cache-controller";
78 reg = <20000 1000>; 75 reg = <0x20000 0x1000>;
79 cache-line-size = <20>; // 32 bytes 76 cache-line-size = <32>; // 32 bytes
80 cache-size = <80000>; // L2, 512K 77 cache-size = <0x80000>; // L2, 512K
81 interrupt-parent = <&mpic>; 78 interrupt-parent = <&mpic>;
82 interrupts = <10 2>; 79 interrupts = <16 2>;
83 }; 80 };
84 81
85 i2c@3000 { 82 i2c@3000 {
@@ -87,14 +84,14 @@
87 #size-cells = <0>; 84 #size-cells = <0>;
88 cell-index = <0>; 85 cell-index = <0>;
89 compatible = "fsl-i2c"; 86 compatible = "fsl-i2c";
90 reg = <3000 100>; 87 reg = <0x3000 0x100>;
91 interrupts = <2b 2>; 88 interrupts = <43 2>;
92 interrupt-parent = <&mpic>; 89 interrupt-parent = <&mpic>;
93 dfsrr; 90 dfsrr;
94 91
95 rtc@68 { 92 rtc@68 {
96 compatible = "dallas,ds1374"; 93 compatible = "dallas,ds1374";
97 reg = <68>; 94 reg = <0x68>;
98 }; 95 };
99 }; 96 };
100 97
@@ -103,8 +100,8 @@
103 #size-cells = <0>; 100 #size-cells = <0>;
104 cell-index = <1>; 101 cell-index = <1>;
105 compatible = "fsl-i2c"; 102 compatible = "fsl-i2c";
106 reg = <3100 100>; 103 reg = <0x3100 0x100>;
107 interrupts = <2b 2>; 104 interrupts = <43 2>;
108 interrupt-parent = <&mpic>; 105 interrupt-parent = <&mpic>;
109 dfsrr; 106 dfsrr;
110 }; 107 };
@@ -113,30 +110,30 @@
113 #address-cells = <1>; 110 #address-cells = <1>;
114 #size-cells = <0>; 111 #size-cells = <0>;
115 compatible = "fsl,gianfar-mdio"; 112 compatible = "fsl,gianfar-mdio";
116 reg = <24520 20>; 113 reg = <0x24520 0x20>;
117 114
118 phy0: ethernet-phy@7 { 115 phy0: ethernet-phy@7 {
119 interrupt-parent = <&mpic>; 116 interrupt-parent = <&mpic>;
120 interrupts = <1 1>; 117 interrupts = <1 1>;
121 reg = <7>; 118 reg = <0x7>;
122 device_type = "ethernet-phy"; 119 device_type = "ethernet-phy";
123 }; 120 };
124 phy1: ethernet-phy@1 { 121 phy1: ethernet-phy@1 {
125 interrupt-parent = <&mpic>; 122 interrupt-parent = <&mpic>;
126 interrupts = <2 1>; 123 interrupts = <2 1>;
127 reg = <1>; 124 reg = <0x1>;
128 device_type = "ethernet-phy"; 125 device_type = "ethernet-phy";
129 }; 126 };
130 phy2: ethernet-phy@2 { 127 phy2: ethernet-phy@2 {
131 interrupt-parent = <&mpic>; 128 interrupt-parent = <&mpic>;
132 interrupts = <1 1>; 129 interrupts = <1 1>;
133 reg = <2>; 130 reg = <0x2>;
134 device_type = "ethernet-phy"; 131 device_type = "ethernet-phy";
135 }; 132 };
136 phy3: ethernet-phy@3 { 133 phy3: ethernet-phy@3 {
137 interrupt-parent = <&mpic>; 134 interrupt-parent = <&mpic>;
138 interrupts = <2 1>; 135 interrupts = <2 1>;
139 reg = <3>; 136 reg = <0x3>;
140 device_type = "ethernet-phy"; 137 device_type = "ethernet-phy";
141 }; 138 };
142 }; 139 };
@@ -146,9 +143,9 @@
146 device_type = "network"; 143 device_type = "network";
147 model = "eTSEC"; 144 model = "eTSEC";
148 compatible = "gianfar"; 145 compatible = "gianfar";
149 reg = <24000 1000>; 146 reg = <0x24000 0x1000>;
150 local-mac-address = [ 00 00 00 00 00 00 ]; 147 local-mac-address = [ 00 00 00 00 00 00 ];
151 interrupts = <1d 2 1e 2 22 2>; 148 interrupts = <29 2 30 2 34 2>;
152 interrupt-parent = <&mpic>; 149 interrupt-parent = <&mpic>;
153 phy-handle = <&phy2>; 150 phy-handle = <&phy2>;
154 }; 151 };
@@ -158,9 +155,9 @@
158 device_type = "network"; 155 device_type = "network";
159 model = "eTSEC"; 156 model = "eTSEC";
160 compatible = "gianfar"; 157 compatible = "gianfar";
161 reg = <25000 1000>; 158 reg = <0x25000 0x1000>;
162 local-mac-address = [ 00 00 00 00 00 00 ]; 159 local-mac-address = [ 00 00 00 00 00 00 ];
163 interrupts = <23 2 24 2 28 2>; 160 interrupts = <35 2 36 2 40 2>;
164 interrupt-parent = <&mpic>; 161 interrupt-parent = <&mpic>;
165 phy-handle = <&phy3>; 162 phy-handle = <&phy3>;
166 }; 163 };
@@ -169,15 +166,15 @@
169 cell-index = <0>; 166 cell-index = <0>;
170 device_type = "serial"; 167 device_type = "serial";
171 compatible = "ns16550"; 168 compatible = "ns16550";
172 reg = <4500 100>; 169 reg = <0x4500 0x100>;
173 clock-frequency = <0>; 170 clock-frequency = <0>;
174 interrupts = <2a 2>; 171 interrupts = <42 2>;
175 interrupt-parent = <&mpic>; 172 interrupt-parent = <&mpic>;
176 }; 173 };
177 174
178 global-utilities@e0000 { //global utilities block 175 global-utilities@e0000 { //global utilities block
179 compatible = "fsl,mpc8548-guts"; 176 compatible = "fsl,mpc8548-guts";
180 reg = <e0000 1000>; 177 reg = <0xe0000 0x1000>;
181 fsl,has-rstcr; 178 fsl,has-rstcr;
182 }; 179 };
183 180
@@ -185,9 +182,9 @@
185 cell-index = <1>; 182 cell-index = <1>;
186 device_type = "serial"; 183 device_type = "serial";
187 compatible = "ns16550"; 184 compatible = "ns16550";
188 reg = <4600 100>; 185 reg = <0x4600 0x100>;
189 clock-frequency = <0>; 186 clock-frequency = <0>;
190 interrupts = <2a 2>; 187 interrupts = <42 2>;
191 interrupt-parent = <&mpic>; 188 interrupt-parent = <&mpic>;
192 }; 189 };
193 190
@@ -195,13 +192,13 @@
195 device_type = "crypto"; 192 device_type = "crypto";
196 model = "SEC2"; 193 model = "SEC2";
197 compatible = "talitos"; 194 compatible = "talitos";
198 reg = <30000 f000>; 195 reg = <0x30000 0xf000>;
199 interrupts = <2d 2>; 196 interrupts = <45 2>;
200 interrupt-parent = <&mpic>; 197 interrupt-parent = <&mpic>;
201 num-channels = <4>; 198 num-channels = <4>;
202 channel-fifo-len = <18>; 199 channel-fifo-len = <24>;
203 exec-units-mask = <000000fe>; 200 exec-units-mask = <0xfe>;
204 descriptor-types-mask = <012b0ebf>; 201 descriptor-types-mask = <0x12b0ebf>;
205 }; 202 };
206 203
207 mpic: pic@40000 { 204 mpic: pic@40000 {
@@ -209,73 +206,73 @@
209 interrupt-controller; 206 interrupt-controller;
210 #address-cells = <0>; 207 #address-cells = <0>;
211 #interrupt-cells = <2>; 208 #interrupt-cells = <2>;
212 reg = <40000 40000>; 209 reg = <0x40000 0x40000>;
213 compatible = "chrp,open-pic"; 210 compatible = "chrp,open-pic";
214 device_type = "open-pic"; 211 device_type = "open-pic";
215 big-endian; 212 big-endian;
216 }; 213 };
217 214
218 par_io@e0100 { 215 par_io@e0100 {
219 reg = <e0100 100>; 216 reg = <0xe0100 0x100>;
220 device_type = "par_io"; 217 device_type = "par_io";
221 num-ports = <7>; 218 num-ports = <7>;
222 219
223 pio1: ucc_pin@01 { 220 pio1: ucc_pin@01 {
224 pio-map = < 221 pio-map = <
225 /* port pin dir open_drain assignment has_irq */ 222 /* port pin dir open_drain assignment has_irq */
226 4 0a 1 0 2 0 /* TxD0 */ 223 0x4 0xa 0x1 0x0 0x2 0x0 /* TxD0 */
227 4 09 1 0 2 0 /* TxD1 */ 224 0x4 0x9 0x1 0x0 0x2 0x0 /* TxD1 */
228 4 08 1 0 2 0 /* TxD2 */ 225 0x4 0x8 0x1 0x0 0x2 0x0 /* TxD2 */
229 4 07 1 0 2 0 /* TxD3 */ 226 0x4 0x7 0x1 0x0 0x2 0x0 /* TxD3 */
230 4 17 1 0 2 0 /* TxD4 */ 227 0x4 0x17 0x1 0x0 0x2 0x0 /* TxD4 */
231 4 16 1 0 2 0 /* TxD5 */ 228 0x4 0x16 0x1 0x0 0x2 0x0 /* TxD5 */
232 4 15 1 0 2 0 /* TxD6 */ 229 0x4 0x15 0x1 0x0 0x2 0x0 /* TxD6 */
233 4 14 1 0 2 0 /* TxD7 */ 230 0x4 0x14 0x1 0x0 0x2 0x0 /* TxD7 */
234 4 0f 2 0 2 0 /* RxD0 */ 231 0x4 0xf 0x2 0x0 0x2 0x0 /* RxD0 */
235 4 0e 2 0 2 0 /* RxD1 */ 232 0x4 0xe 0x2 0x0 0x2 0x0 /* RxD1 */
236 4 0d 2 0 2 0 /* RxD2 */ 233 0x4 0xd 0x2 0x0 0x2 0x0 /* RxD2 */
237 4 0c 2 0 2 0 /* RxD3 */ 234 0x4 0xc 0x2 0x0 0x2 0x0 /* RxD3 */
238 4 1d 2 0 2 0 /* RxD4 */ 235 0x4 0x1d 0x2 0x0 0x2 0x0 /* RxD4 */
239 4 1c 2 0 2 0 /* RxD5 */ 236 0x4 0x1c 0x2 0x0 0x2 0x0 /* RxD5 */
240 4 1b 2 0 2 0 /* RxD6 */ 237 0x4 0x1b 0x2 0x0 0x2 0x0 /* RxD6 */
241 4 1a 2 0 2 0 /* RxD7 */ 238 0x4 0x1a 0x2 0x0 0x2 0x0 /* RxD7 */
242 4 0b 1 0 2 0 /* TX_EN */ 239 0x4 0xb 0x1 0x0 0x2 0x0 /* TX_EN */
243 4 18 1 0 2 0 /* TX_ER */ 240 0x4 0x18 0x1 0x0 0x2 0x0 /* TX_ER */
244 4 10 2 0 2 0 /* RX_DV */ 241 0x4 0x10 0x2 0x0 0x2 0x0 /* RX_DV */
245 4 1e 2 0 2 0 /* RX_ER */ 242 0x4 0x1e 0x2 0x0 0x2 0x0 /* RX_ER */
246 4 11 2 0 2 0 /* RX_CLK */ 243 0x4 0x11 0x2 0x0 0x2 0x0 /* RX_CLK */
247 4 13 1 0 2 0 /* GTX_CLK */ 244 0x4 0x13 0x1 0x0 0x2 0x0 /* GTX_CLK */
248 1 1f 2 0 3 0>; /* GTX125 */ 245 0x1 0x1f 0x2 0x0 0x3 0x0>; /* GTX125 */
249 }; 246 };
250 247
251 pio2: ucc_pin@02 { 248 pio2: ucc_pin@02 {
252 pio-map = < 249 pio-map = <
253 /* port pin dir open_drain assignment has_irq */ 250 /* port pin dir open_drain assignment has_irq */
254 5 0a 1 0 2 0 /* TxD0 */ 251 0x5 0xa 0x1 0x0 0x2 0x0 /* TxD0 */
255 5 09 1 0 2 0 /* TxD1 */ 252 0x5 0x9 0x1 0x0 0x2 0x0 /* TxD1 */
256 5 08 1 0 2 0 /* TxD2 */ 253 0x5 0x8 0x1 0x0 0x2 0x0 /* TxD2 */
257 5 07 1 0 2 0 /* TxD3 */ 254 0x5 0x7 0x1 0x0 0x2 0x0 /* TxD3 */
258 5 17 1 0 2 0 /* TxD4 */ 255 0x5 0x17 0x1 0x0 0x2 0x0 /* TxD4 */
259 5 16 1 0 2 0 /* TxD5 */ 256 0x5 0x16 0x1 0x0 0x2 0x0 /* TxD5 */
260 5 15 1 0 2 0 /* TxD6 */ 257 0x5 0x15 0x1 0x0 0x2 0x0 /* TxD6 */
261 5 14 1 0 2 0 /* TxD7 */ 258 0x5 0x14 0x1 0x0 0x2 0x0 /* TxD7 */
262 5 0f 2 0 2 0 /* RxD0 */ 259 0x5 0xf 0x2 0x0 0x2 0x0 /* RxD0 */
263 5 0e 2 0 2 0 /* RxD1 */ 260 0x5 0xe 0x2 0x0 0x2 0x0 /* RxD1 */
264 5 0d 2 0 2 0 /* RxD2 */ 261 0x5 0xd 0x2 0x0 0x2 0x0 /* RxD2 */
265 5 0c 2 0 2 0 /* RxD3 */ 262 0x5 0xc 0x2 0x0 0x2 0x0 /* RxD3 */
266 5 1d 2 0 2 0 /* RxD4 */ 263 0x5 0x1d 0x2 0x0 0x2 0x0 /* RxD4 */
267 5 1c 2 0 2 0 /* RxD5 */ 264 0x5 0x1c 0x2 0x0 0x2 0x0 /* RxD5 */
268 5 1b 2 0 2 0 /* RxD6 */ 265 0x5 0x1b 0x2 0x0 0x2 0x0 /* RxD6 */
269 5 1a 2 0 2 0 /* RxD7 */ 266 0x5 0x1a 0x2 0x0 0x2 0x0 /* RxD7 */
270 5 0b 1 0 2 0 /* TX_EN */ 267 0x5 0xb 0x1 0x0 0x2 0x0 /* TX_EN */
271 5 18 1 0 2 0 /* TX_ER */ 268 0x5 0x18 0x1 0x0 0x2 0x0 /* TX_ER */
272 5 10 2 0 2 0 /* RX_DV */ 269 0x5 0x10 0x2 0x0 0x2 0x0 /* RX_DV */
273 5 1e 2 0 2 0 /* RX_ER */ 270 0x5 0x1e 0x2 0x0 0x2 0x0 /* RX_ER */
274 5 11 2 0 2 0 /* RX_CLK */ 271 0x5 0x11 0x2 0x0 0x2 0x0 /* RX_CLK */
275 5 13 1 0 2 0 /* GTX_CLK */ 272 0x5 0x13 0x1 0x0 0x2 0x0 /* GTX_CLK */
276 1 1f 2 0 3 0 /* GTX125 */ 273 0x1 0x1f 0x2 0x0 0x3 0x0 /* GTX125 */
277 4 06 3 0 2 0 /* MDIO */ 274 0x4 0x6 0x3 0x0 0x2 0x0 /* MDIO */
278 4 05 1 0 2 0>; /* MDC */ 275 0x4 0x5 0x1 0x0 0x2 0x0>; /* MDC */
279 }; 276 };
280 }; 277 };
281 }; 278 };
@@ -285,28 +282,28 @@
285 #size-cells = <1>; 282 #size-cells = <1>;
286 device_type = "qe"; 283 device_type = "qe";
287 compatible = "fsl,qe"; 284 compatible = "fsl,qe";
288 ranges = <0 e0080000 00040000>; 285 ranges = <0x0 0xe0080000 0x40000>;
289 reg = <e0080000 480>; 286 reg = <0xe0080000 0x480>;
290 brg-frequency = <0>; 287 brg-frequency = <0>;
291 bus-frequency = <179A7B00>; 288 bus-frequency = <396000000>;
292 289
293 muram@10000 { 290 muram@10000 {
294 #address-cells = <1>; 291 #address-cells = <1>;
295 #size-cells = <1>; 292 #size-cells = <1>;
296 compatible = "fsl,qe-muram", "fsl,cpm-muram"; 293 compatible = "fsl,qe-muram", "fsl,cpm-muram";
297 ranges = <0 00010000 0000c000>; 294 ranges = <0x0 0x10000 0x10000>;
298 295
299 data-only@0 { 296 data-only@0 {
300 compatible = "fsl,qe-muram-data", 297 compatible = "fsl,qe-muram-data",
301 "fsl,cpm-muram-data"; 298 "fsl,cpm-muram-data";
302 reg = <0 c000>; 299 reg = <0x0 0x10000>;
303 }; 300 };
304 }; 301 };
305 302
306 spi@4c0 { 303 spi@4c0 {
307 cell-index = <0>; 304 cell-index = <0>;
308 compatible = "fsl,spi"; 305 compatible = "fsl,spi";
309 reg = <4c0 40>; 306 reg = <0x4c0 0x40>;
310 interrupts = <2>; 307 interrupts = <2>;
311 interrupt-parent = <&qeic>; 308 interrupt-parent = <&qeic>;
312 mode = "cpu"; 309 mode = "cpu";
@@ -315,7 +312,7 @@
315 spi@500 { 312 spi@500 {
316 cell-index = <1>; 313 cell-index = <1>;
317 compatible = "fsl,spi"; 314 compatible = "fsl,spi";
318 reg = <500 40>; 315 reg = <0x500 0x40>;
319 interrupts = <1>; 316 interrupts = <1>;
320 interrupt-parent = <&qeic>; 317 interrupt-parent = <&qeic>;
321 mode = "cpu"; 318 mode = "cpu";
@@ -324,11 +321,9 @@
324 enet2: ucc@2000 { 321 enet2: ucc@2000 {
325 device_type = "network"; 322 device_type = "network";
326 compatible = "ucc_geth"; 323 compatible = "ucc_geth";
327 model = "UCC";
328 cell-index = <1>; 324 cell-index = <1>;
329 device-id = <1>; 325 reg = <0x2000 0x200>;
330 reg = <2000 200>; 326 interrupts = <32>;
331 interrupts = <20>;
332 interrupt-parent = <&qeic>; 327 interrupt-parent = <&qeic>;
333 local-mac-address = [ 00 00 00 00 00 00 ]; 328 local-mac-address = [ 00 00 00 00 00 00 ];
334 rx-clock-name = "none"; 329 rx-clock-name = "none";
@@ -341,11 +336,9 @@
341 enet3: ucc@3000 { 336 enet3: ucc@3000 {
342 device_type = "network"; 337 device_type = "network";
343 compatible = "ucc_geth"; 338 compatible = "ucc_geth";
344 model = "UCC";
345 cell-index = <2>; 339 cell-index = <2>;
346 device-id = <2>; 340 reg = <0x3000 0x200>;
347 reg = <3000 200>; 341 interrupts = <33>;
348 interrupts = <21>;
349 interrupt-parent = <&qeic>; 342 interrupt-parent = <&qeic>;
350 local-mac-address = [ 00 00 00 00 00 00 ]; 343 local-mac-address = [ 00 00 00 00 00 00 ];
351 rx-clock-name = "none"; 344 rx-clock-name = "none";
@@ -358,7 +351,7 @@
358 mdio@2120 { 351 mdio@2120 {
359 #address-cells = <1>; 352 #address-cells = <1>;
360 #size-cells = <0>; 353 #size-cells = <0>;
361 reg = <2120 18>; 354 reg = <0x2120 0x18>;
362 compatible = "fsl,ucc-mdio"; 355 compatible = "fsl,ucc-mdio";
363 356
364 /* These are the same PHYs as on 357 /* These are the same PHYs as on
@@ -366,25 +359,25 @@
366 qe_phy0: ethernet-phy@07 { 359 qe_phy0: ethernet-phy@07 {
367 interrupt-parent = <&mpic>; 360 interrupt-parent = <&mpic>;
368 interrupts = <1 1>; 361 interrupts = <1 1>;
369 reg = <7>; 362 reg = <0x7>;
370 device_type = "ethernet-phy"; 363 device_type = "ethernet-phy";
371 }; 364 };
372 qe_phy1: ethernet-phy@01 { 365 qe_phy1: ethernet-phy@01 {
373 interrupt-parent = <&mpic>; 366 interrupt-parent = <&mpic>;
374 interrupts = <2 1>; 367 interrupts = <2 1>;
375 reg = <1>; 368 reg = <0x1>;
376 device_type = "ethernet-phy"; 369 device_type = "ethernet-phy";
377 }; 370 };
378 qe_phy2: ethernet-phy@02 { 371 qe_phy2: ethernet-phy@02 {
379 interrupt-parent = <&mpic>; 372 interrupt-parent = <&mpic>;
380 interrupts = <1 1>; 373 interrupts = <1 1>;
381 reg = <2>; 374 reg = <0x2>;
382 device_type = "ethernet-phy"; 375 device_type = "ethernet-phy";
383 }; 376 };
384 qe_phy3: ethernet-phy@03 { 377 qe_phy3: ethernet-phy@03 {
385 interrupt-parent = <&mpic>; 378 interrupt-parent = <&mpic>;
386 interrupts = <2 1>; 379 interrupts = <2 1>;
387 reg = <3>; 380 reg = <0x3>;
388 device_type = "ethernet-phy"; 381 device_type = "ethernet-phy";
389 }; 382 };
390 }; 383 };
@@ -394,9 +387,9 @@
394 compatible = "fsl,qe-ic"; 387 compatible = "fsl,qe-ic";
395 #address-cells = <0>; 388 #address-cells = <0>;
396 #interrupt-cells = <1>; 389 #interrupt-cells = <1>;
397 reg = <80 80>; 390 reg = <0x80 0x80>;
398 big-endian; 391 big-endian;
399 interrupts = <2e 2 2e 2>; //high:30 low:30 392 interrupts = <46 2 46 2>; //high:30 low:30
400 interrupt-parent = <&mpic>; 393 interrupt-parent = <&mpic>;
401 }; 394 };
402 395
@@ -404,30 +397,30 @@
404 397
405 pci0: pci@e0008000 { 398 pci0: pci@e0008000 {
406 cell-index = <0>; 399 cell-index = <0>;
407 interrupt-map-mask = <f800 0 0 7>; 400 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
408 interrupt-map = < 401 interrupt-map = <
409 /* IDSEL 0x12 AD18 */ 402 /* IDSEL 0x12 AD18 */
410 9000 0 0 1 &mpic 5 1 403 0x9000 0x0 0x0 0x1 &mpic 0x5 0x1
411 9000 0 0 2 &mpic 6 1 404 0x9000 0x0 0x0 0x2 &mpic 0x6 0x1
412 9000 0 0 3 &mpic 7 1 405 0x9000 0x0 0x0 0x3 &mpic 0x7 0x1
413 9000 0 0 4 &mpic 4 1 406 0x9000 0x0 0x0 0x4 &mpic 0x4 0x1
414 407
415 /* IDSEL 0x13 AD19 */ 408 /* IDSEL 0x13 AD19 */
416 9800 0 0 1 &mpic 6 1 409 0x9800 0x0 0x0 0x1 &mpic 0x6 0x1
417 9800 0 0 2 &mpic 7 1 410 0x9800 0x0 0x0 0x2 &mpic 0x7 0x1
418 9800 0 0 3 &mpic 4 1 411 0x9800 0x0 0x0 0x3 &mpic 0x4 0x1
419 9800 0 0 4 &mpic 5 1>; 412 0x9800 0x0 0x0 0x4 &mpic 0x5 0x1>;
420 413
421 interrupt-parent = <&mpic>; 414 interrupt-parent = <&mpic>;
422 interrupts = <18 2>; 415 interrupts = <24 2>;
423 bus-range = <0 ff>; 416 bus-range = <0 255>;
424 ranges = <02000000 0 80000000 80000000 0 20000000 417 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
425 01000000 0 00000000 e2000000 0 00800000>; 418 0x1000000 0x0 0x0 0xe2000000 0x0 0x800000>;
426 clock-frequency = <3f940aa>; 419 clock-frequency = <66666666>;
427 #interrupt-cells = <1>; 420 #interrupt-cells = <1>;
428 #size-cells = <2>; 421 #size-cells = <2>;
429 #address-cells = <3>; 422 #address-cells = <3>;
430 reg = <e0008000 1000>; 423 reg = <0xe0008000 0x1000>;
431 compatible = "fsl,mpc8540-pci"; 424 compatible = "fsl,mpc8540-pci";
432 device_type = "pci"; 425 device_type = "pci";
433 }; 426 };
@@ -435,39 +428,39 @@
435 /* PCI Express */ 428 /* PCI Express */
436 pci1: pcie@e000a000 { 429 pci1: pcie@e000a000 {
437 cell-index = <2>; 430 cell-index = <2>;
438 interrupt-map-mask = <f800 0 0 7>; 431 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
439 interrupt-map = < 432 interrupt-map = <
440 433
441 /* IDSEL 0x0 (PEX) */ 434 /* IDSEL 0x0 (PEX) */
442 00000 0 0 1 &mpic 0 1 435 00000 0x0 0x0 0x1 &mpic 0x0 0x1
443 00000 0 0 2 &mpic 1 1 436 00000 0x0 0x0 0x2 &mpic 0x1 0x1
444 00000 0 0 3 &mpic 2 1 437 00000 0x0 0x0 0x3 &mpic 0x2 0x1
445 00000 0 0 4 &mpic 3 1>; 438 00000 0x0 0x0 0x4 &mpic 0x3 0x1>;
446 439
447 interrupt-parent = <&mpic>; 440 interrupt-parent = <&mpic>;
448 interrupts = <1a 2>; 441 interrupts = <26 2>;
449 bus-range = <0 ff>; 442 bus-range = <0 255>;
450 ranges = <02000000 0 a0000000 a0000000 0 10000000 443 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
451 01000000 0 00000000 e2800000 0 00800000>; 444 0x1000000 0x0 0x0 0xe2800000 0x0 0x800000>;
452 clock-frequency = <1fca055>; 445 clock-frequency = <33333333>;
453 #interrupt-cells = <1>; 446 #interrupt-cells = <1>;
454 #size-cells = <2>; 447 #size-cells = <2>;
455 #address-cells = <3>; 448 #address-cells = <3>;
456 reg = <e000a000 1000>; 449 reg = <0xe000a000 0x1000>;
457 compatible = "fsl,mpc8548-pcie"; 450 compatible = "fsl,mpc8548-pcie";
458 device_type = "pci"; 451 device_type = "pci";
459 pcie@0 { 452 pcie@0 {
460 reg = <0 0 0 0 0>; 453 reg = <0x0 0x0 0x0 0x0 0x0>;
461 #size-cells = <2>; 454 #size-cells = <2>;
462 #address-cells = <3>; 455 #address-cells = <3>;
463 device_type = "pci"; 456 device_type = "pci";
464 ranges = <02000000 0 a0000000 457 ranges = <0x2000000 0x0 0xa0000000
465 02000000 0 a0000000 458 0x2000000 0x0 0xa0000000
466 0 10000000 459 0x0 0x10000000
467 460
468 01000000 0 00000000 461 0x1000000 0x0 0x0
469 01000000 0 00000000 462 0x1000000 0x0 0x0
470 0 00800000>; 463 0x0 0x800000>;
471 }; 464 };
472 }; 465 };
473}; 466};
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index db37214aee37..66f27ab613a2 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * MPC8572 DS Device Tree Source 2 * MPC8572 DS Device Tree Source
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor Inc. 4 * Copyright 2007, 2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12/ { 13/ {
13 model = "fsl,MPC8572DS"; 14 model = "fsl,MPC8572DS";
14 compatible = "fsl,MPC8572DS"; 15 compatible = "fsl,MPC8572DS";
@@ -33,11 +34,11 @@
33 34
34 PowerPC,8572@0 { 35 PowerPC,8572@0 {
35 device_type = "cpu"; 36 device_type = "cpu";
36 reg = <0>; 37 reg = <0x0>;
37 d-cache-line-size = <20>; // 32 bytes 38 d-cache-line-size = <32>; // 32 bytes
38 i-cache-line-size = <20>; // 32 bytes 39 i-cache-line-size = <32>; // 32 bytes
39 d-cache-size = <8000>; // L1, 32K 40 d-cache-size = <0x8000>; // L1, 32K
40 i-cache-size = <8000>; // L1, 32K 41 i-cache-size = <0x8000>; // L1, 32K
41 timebase-frequency = <0>; 42 timebase-frequency = <0>;
42 bus-frequency = <0>; 43 bus-frequency = <0>;
43 clock-frequency = <0>; 44 clock-frequency = <0>;
@@ -45,11 +46,11 @@
45 46
46 PowerPC,8572@1 { 47 PowerPC,8572@1 {
47 device_type = "cpu"; 48 device_type = "cpu";
48 reg = <1>; 49 reg = <0x1>;
49 d-cache-line-size = <20>; // 32 bytes 50 d-cache-line-size = <32>; // 32 bytes
50 i-cache-line-size = <20>; // 32 bytes 51 i-cache-line-size = <32>; // 32 bytes
51 d-cache-size = <8000>; // L1, 32K 52 d-cache-size = <0x8000>; // L1, 32K
52 i-cache-size = <8000>; // L1, 32K 53 i-cache-size = <0x8000>; // L1, 32K
53 timebase-frequency = <0>; 54 timebase-frequency = <0>;
54 bus-frequency = <0>; 55 bus-frequency = <0>;
55 clock-frequency = <0>; 56 clock-frequency = <0>;
@@ -58,38 +59,38 @@
58 59
59 memory { 60 memory {
60 device_type = "memory"; 61 device_type = "memory";
61 reg = <00000000 00000000>; // Filled by U-Boot 62 reg = <0x0 0x0>; // Filled by U-Boot
62 }; 63 };
63 64
64 soc8572@ffe00000 { 65 soc8572@ffe00000 {
65 #address-cells = <1>; 66 #address-cells = <1>;
66 #size-cells = <1>; 67 #size-cells = <1>;
67 device_type = "soc"; 68 device_type = "soc";
68 ranges = <00000000 ffe00000 00100000>; 69 ranges = <0x0 0xffe00000 0x100000>;
69 reg = <ffe00000 00001000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed 70 reg = <0xffe00000 0x1000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed
70 bus-frequency = <0>; // Filled out by uboot. 71 bus-frequency = <0>; // Filled out by uboot.
71 72
72 memory-controller@2000 { 73 memory-controller@2000 {
73 compatible = "fsl,mpc8572-memory-controller"; 74 compatible = "fsl,mpc8572-memory-controller";
74 reg = <2000 1000>; 75 reg = <0x2000 0x1000>;
75 interrupt-parent = <&mpic>; 76 interrupt-parent = <&mpic>;
76 interrupts = <12 2>; 77 interrupts = <18 2>;
77 }; 78 };
78 79
79 memory-controller@6000 { 80 memory-controller@6000 {
80 compatible = "fsl,mpc8572-memory-controller"; 81 compatible = "fsl,mpc8572-memory-controller";
81 reg = <6000 1000>; 82 reg = <0x6000 0x1000>;
82 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
83 interrupts = <12 2>; 84 interrupts = <18 2>;
84 }; 85 };
85 86
86 l2-cache-controller@20000 { 87 l2-cache-controller@20000 {
87 compatible = "fsl,mpc8572-l2-cache-controller"; 88 compatible = "fsl,mpc8572-l2-cache-controller";
88 reg = <20000 1000>; 89 reg = <0x20000 0x1000>;
89 cache-line-size = <20>; // 32 bytes 90 cache-line-size = <32>; // 32 bytes
90 cache-size = <80000>; // L2, 512K 91 cache-size = <0x80000>; // L2, 512K
91 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
92 interrupts = <10 2>; 93 interrupts = <16 2>;
93 }; 94 };
94 95
95 i2c@3000 { 96 i2c@3000 {
@@ -97,8 +98,8 @@
97 #size-cells = <0>; 98 #size-cells = <0>;
98 cell-index = <0>; 99 cell-index = <0>;
99 compatible = "fsl-i2c"; 100 compatible = "fsl-i2c";
100 reg = <3000 100>; 101 reg = <0x3000 0x100>;
101 interrupts = <2b 2>; 102 interrupts = <43 2>;
102 interrupt-parent = <&mpic>; 103 interrupt-parent = <&mpic>;
103 dfsrr; 104 dfsrr;
104 }; 105 };
@@ -108,8 +109,8 @@
108 #size-cells = <0>; 109 #size-cells = <0>;
109 cell-index = <1>; 110 cell-index = <1>;
110 compatible = "fsl-i2c"; 111 compatible = "fsl-i2c";
111 reg = <3100 100>; 112 reg = <0x3100 0x100>;
112 interrupts = <2b 2>; 113 interrupts = <43 2>;
113 interrupt-parent = <&mpic>; 114 interrupt-parent = <&mpic>;
114 dfsrr; 115 dfsrr;
115 }; 116 };
@@ -118,27 +119,27 @@
118 #address-cells = <1>; 119 #address-cells = <1>;
119 #size-cells = <0>; 120 #size-cells = <0>;
120 compatible = "fsl,gianfar-mdio"; 121 compatible = "fsl,gianfar-mdio";
121 reg = <24520 20>; 122 reg = <0x24520 0x20>;
122 123
123 phy0: ethernet-phy@0 { 124 phy0: ethernet-phy@0 {
124 interrupt-parent = <&mpic>; 125 interrupt-parent = <&mpic>;
125 interrupts = <a 1>; 126 interrupts = <10 1>;
126 reg = <0>; 127 reg = <0x0>;
127 }; 128 };
128 phy1: ethernet-phy@1 { 129 phy1: ethernet-phy@1 {
129 interrupt-parent = <&mpic>; 130 interrupt-parent = <&mpic>;
130 interrupts = <a 1>; 131 interrupts = <10 1>;
131 reg = <1>; 132 reg = <0x1>;
132 }; 133 };
133 phy2: ethernet-phy@2 { 134 phy2: ethernet-phy@2 {
134 interrupt-parent = <&mpic>; 135 interrupt-parent = <&mpic>;
135 interrupts = <a 1>; 136 interrupts = <10 1>;
136 reg = <2>; 137 reg = <0x2>;
137 }; 138 };
138 phy3: ethernet-phy@3 { 139 phy3: ethernet-phy@3 {
139 interrupt-parent = <&mpic>; 140 interrupt-parent = <&mpic>;
140 interrupts = <a 1>; 141 interrupts = <10 1>;
141 reg = <3>; 142 reg = <0x3>;
142 }; 143 };
143 }; 144 };
144 145
@@ -147,9 +148,9 @@
147 device_type = "network"; 148 device_type = "network";
148 model = "eTSEC"; 149 model = "eTSEC";
149 compatible = "gianfar"; 150 compatible = "gianfar";
150 reg = <24000 1000>; 151 reg = <0x24000 0x1000>;
151 local-mac-address = [ 00 00 00 00 00 00 ]; 152 local-mac-address = [ 00 00 00 00 00 00 ];
152 interrupts = <1d 2 1e 2 22 2>; 153 interrupts = <29 2 30 2 34 2>;
153 interrupt-parent = <&mpic>; 154 interrupt-parent = <&mpic>;
154 phy-handle = <&phy0>; 155 phy-handle = <&phy0>;
155 phy-connection-type = "rgmii-id"; 156 phy-connection-type = "rgmii-id";
@@ -160,9 +161,9 @@
160 device_type = "network"; 161 device_type = "network";
161 model = "eTSEC"; 162 model = "eTSEC";
162 compatible = "gianfar"; 163 compatible = "gianfar";
163 reg = <25000 1000>; 164 reg = <0x25000 0x1000>;
164 local-mac-address = [ 00 00 00 00 00 00 ]; 165 local-mac-address = [ 00 00 00 00 00 00 ];
165 interrupts = <23 2 24 2 28 2>; 166 interrupts = <35 2 36 2 40 2>;
166 interrupt-parent = <&mpic>; 167 interrupt-parent = <&mpic>;
167 phy-handle = <&phy1>; 168 phy-handle = <&phy1>;
168 phy-connection-type = "rgmii-id"; 169 phy-connection-type = "rgmii-id";
@@ -173,9 +174,9 @@
173 device_type = "network"; 174 device_type = "network";
174 model = "eTSEC"; 175 model = "eTSEC";
175 compatible = "gianfar"; 176 compatible = "gianfar";
176 reg = <26000 1000>; 177 reg = <0x26000 0x1000>;
177 local-mac-address = [ 00 00 00 00 00 00 ]; 178 local-mac-address = [ 00 00 00 00 00 00 ];
178 interrupts = <1f 2 20 2 21 2>; 179 interrupts = <31 2 32 2 33 2>;
179 interrupt-parent = <&mpic>; 180 interrupt-parent = <&mpic>;
180 phy-handle = <&phy2>; 181 phy-handle = <&phy2>;
181 phy-connection-type = "rgmii-id"; 182 phy-connection-type = "rgmii-id";
@@ -186,9 +187,9 @@
186 device_type = "network"; 187 device_type = "network";
187 model = "eTSEC"; 188 model = "eTSEC";
188 compatible = "gianfar"; 189 compatible = "gianfar";
189 reg = <27000 1000>; 190 reg = <0x27000 0x1000>;
190 local-mac-address = [ 00 00 00 00 00 00 ]; 191 local-mac-address = [ 00 00 00 00 00 00 ];
191 interrupts = <25 2 26 2 27 2>; 192 interrupts = <37 2 38 2 39 2>;
192 interrupt-parent = <&mpic>; 193 interrupt-parent = <&mpic>;
193 phy-handle = <&phy3>; 194 phy-handle = <&phy3>;
194 phy-connection-type = "rgmii-id"; 195 phy-connection-type = "rgmii-id";
@@ -198,9 +199,9 @@
198 cell-index = <0>; 199 cell-index = <0>;
199 device_type = "serial"; 200 device_type = "serial";
200 compatible = "ns16550"; 201 compatible = "ns16550";
201 reg = <4500 100>; 202 reg = <0x4500 0x100>;
202 clock-frequency = <0>; 203 clock-frequency = <0>;
203 interrupts = <2a 2>; 204 interrupts = <42 2>;
204 interrupt-parent = <&mpic>; 205 interrupt-parent = <&mpic>;
205 }; 206 };
206 207
@@ -208,15 +209,15 @@
208 cell-index = <1>; 209 cell-index = <1>;
209 device_type = "serial"; 210 device_type = "serial";
210 compatible = "ns16550"; 211 compatible = "ns16550";
211 reg = <4600 100>; 212 reg = <0x4600 0x100>;
212 clock-frequency = <0>; 213 clock-frequency = <0>;
213 interrupts = <2a 2>; 214 interrupts = <42 2>;
214 interrupt-parent = <&mpic>; 215 interrupt-parent = <&mpic>;
215 }; 216 };
216 217
217 global-utilities@e0000 { //global utilities block 218 global-utilities@e0000 { //global utilities block
218 compatible = "fsl,mpc8572-guts"; 219 compatible = "fsl,mpc8572-guts";
219 reg = <e0000 1000>; 220 reg = <0xe0000 0x1000>;
220 fsl,has-rstcr; 221 fsl,has-rstcr;
221 }; 222 };
222 223
@@ -225,7 +226,7 @@
225 interrupt-controller; 226 interrupt-controller;
226 #address-cells = <0>; 227 #address-cells = <0>;
227 #interrupt-cells = <2>; 228 #interrupt-cells = <2>;
228 reg = <40000 40000>; 229 reg = <0x40000 0x40000>;
229 compatible = "chrp,open-pic"; 230 compatible = "chrp,open-pic";
230 device_type = "open-pic"; 231 device_type = "open-pic";
231 big-endian; 232 big-endian;
@@ -239,167 +240,167 @@
239 #interrupt-cells = <1>; 240 #interrupt-cells = <1>;
240 #size-cells = <2>; 241 #size-cells = <2>;
241 #address-cells = <3>; 242 #address-cells = <3>;
242 reg = <ffe08000 1000>; 243 reg = <0xffe08000 0x1000>;
243 bus-range = <0 ff>; 244 bus-range = <0 255>;
244 ranges = <02000000 0 80000000 80000000 0 20000000 245 ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
245 01000000 0 00000000 ffc00000 0 00010000>; 246 0x1000000 0x0 0x0 0xffc00000 0x0 0x10000>;
246 clock-frequency = <1fca055>; 247 clock-frequency = <33333333>;
247 interrupt-parent = <&mpic>; 248 interrupt-parent = <&mpic>;
248 interrupts = <18 2>; 249 interrupts = <24 2>;
249 interrupt-map-mask = <ff00 0 0 7>; 250 interrupt-map-mask = <0xff00 0x0 0x0 0x7>;
250 interrupt-map = < 251 interrupt-map = <
251 /* IDSEL 0x11 func 0 - PCI slot 1 */ 252 /* IDSEL 0x11 func 0 - PCI slot 1 */
252 8800 0 0 1 &mpic 2 1 253 0x8800 0x0 0x0 0x1 &mpic 0x2 0x1
253 8800 0 0 2 &mpic 3 1 254 0x8800 0x0 0x0 0x2 &mpic 0x3 0x1
254 8800 0 0 3 &mpic 4 1 255 0x8800 0x0 0x0 0x3 &mpic 0x4 0x1
255 8800 0 0 4 &mpic 1 1 256 0x8800 0x0 0x0 0x4 &mpic 0x1 0x1
256 257
257 /* IDSEL 0x11 func 1 - PCI slot 1 */ 258 /* IDSEL 0x11 func 1 - PCI slot 1 */
258 8900 0 0 1 &mpic 2 1 259 0x8900 0x0 0x0 0x1 &mpic 0x2 0x1
259 8900 0 0 2 &mpic 3 1 260 0x8900 0x0 0x0 0x2 &mpic 0x3 0x1
260 8900 0 0 3 &mpic 4 1 261 0x8900 0x0 0x0 0x3 &mpic 0x4 0x1
261 8900 0 0 4 &mpic 1 1 262 0x8900 0x0 0x0 0x4 &mpic 0x1 0x1
262 263
263 /* IDSEL 0x11 func 2 - PCI slot 1 */ 264 /* IDSEL 0x11 func 2 - PCI slot 1 */
264 8a00 0 0 1 &mpic 2 1 265 0x8a00 0x0 0x0 0x1 &mpic 0x2 0x1
265 8a00 0 0 2 &mpic 3 1 266 0x8a00 0x0 0x0 0x2 &mpic 0x3 0x1
266 8a00 0 0 3 &mpic 4 1 267 0x8a00 0x0 0x0 0x3 &mpic 0x4 0x1
267 8a00 0 0 4 &mpic 1 1 268 0x8a00 0x0 0x0 0x4 &mpic 0x1 0x1
268 269
269 /* IDSEL 0x11 func 3 - PCI slot 1 */ 270 /* IDSEL 0x11 func 3 - PCI slot 1 */
270 8b00 0 0 1 &mpic 2 1 271 0x8b00 0x0 0x0 0x1 &mpic 0x2 0x1
271 8b00 0 0 2 &mpic 3 1 272 0x8b00 0x0 0x0 0x2 &mpic 0x3 0x1
272 8b00 0 0 3 &mpic 4 1 273 0x8b00 0x0 0x0 0x3 &mpic 0x4 0x1
273 8b00 0 0 4 &mpic 1 1 274 0x8b00 0x0 0x0 0x4 &mpic 0x1 0x1
274 275
275 /* IDSEL 0x11 func 4 - PCI slot 1 */ 276 /* IDSEL 0x11 func 4 - PCI slot 1 */
276 8c00 0 0 1 &mpic 2 1 277 0x8c00 0x0 0x0 0x1 &mpic 0x2 0x1
277 8c00 0 0 2 &mpic 3 1 278 0x8c00 0x0 0x0 0x2 &mpic 0x3 0x1
278 8c00 0 0 3 &mpic 4 1 279 0x8c00 0x0 0x0 0x3 &mpic 0x4 0x1
279 8c00 0 0 4 &mpic 1 1 280 0x8c00 0x0 0x0 0x4 &mpic 0x1 0x1
280 281
281 /* IDSEL 0x11 func 5 - PCI slot 1 */ 282 /* IDSEL 0x11 func 5 - PCI slot 1 */
282 8d00 0 0 1 &mpic 2 1 283 0x8d00 0x0 0x0 0x1 &mpic 0x2 0x1
283 8d00 0 0 2 &mpic 3 1 284 0x8d00 0x0 0x0 0x2 &mpic 0x3 0x1
284 8d00 0 0 3 &mpic 4 1 285 0x8d00 0x0 0x0 0x3 &mpic 0x4 0x1
285 8d00 0 0 4 &mpic 1 1 286 0x8d00 0x0 0x0 0x4 &mpic 0x1 0x1
286 287
287 /* IDSEL 0x11 func 6 - PCI slot 1 */ 288 /* IDSEL 0x11 func 6 - PCI slot 1 */
288 8e00 0 0 1 &mpic 2 1 289 0x8e00 0x0 0x0 0x1 &mpic 0x2 0x1
289 8e00 0 0 2 &mpic 3 1 290 0x8e00 0x0 0x0 0x2 &mpic 0x3 0x1
290 8e00 0 0 3 &mpic 4 1 291 0x8e00 0x0 0x0 0x3 &mpic 0x4 0x1
291 8e00 0 0 4 &mpic 1 1 292 0x8e00 0x0 0x0 0x4 &mpic 0x1 0x1
292 293
293 /* IDSEL 0x11 func 7 - PCI slot 1 */ 294 /* IDSEL 0x11 func 7 - PCI slot 1 */
294 8f00 0 0 1 &mpic 2 1 295 0x8f00 0x0 0x0 0x1 &mpic 0x2 0x1
295 8f00 0 0 2 &mpic 3 1 296 0x8f00 0x0 0x0 0x2 &mpic 0x3 0x1
296 8f00 0 0 3 &mpic 4 1 297 0x8f00 0x0 0x0 0x3 &mpic 0x4 0x1
297 8f00 0 0 4 &mpic 1 1 298 0x8f00 0x0 0x0 0x4 &mpic 0x1 0x1
298 299
299 /* IDSEL 0x12 func 0 - PCI slot 2 */ 300 /* IDSEL 0x12 func 0 - PCI slot 2 */
300 9000 0 0 1 &mpic 3 1 301 0x9000 0x0 0x0 0x1 &mpic 0x3 0x1
301 9000 0 0 2 &mpic 4 1 302 0x9000 0x0 0x0 0x2 &mpic 0x4 0x1
302 9000 0 0 3 &mpic 1 1 303 0x9000 0x0 0x0 0x3 &mpic 0x1 0x1
303 9000 0 0 4 &mpic 2 1 304 0x9000 0x0 0x0 0x4 &mpic 0x2 0x1
304 305
305 /* IDSEL 0x12 func 1 - PCI slot 2 */ 306 /* IDSEL 0x12 func 1 - PCI slot 2 */
306 9100 0 0 1 &mpic 3 1 307 0x9100 0x0 0x0 0x1 &mpic 0x3 0x1
307 9100 0 0 2 &mpic 4 1 308 0x9100 0x0 0x0 0x2 &mpic 0x4 0x1
308 9100 0 0 3 &mpic 1 1 309 0x9100 0x0 0x0 0x3 &mpic 0x1 0x1
309 9100 0 0 4 &mpic 2 1 310 0x9100 0x0 0x0 0x4 &mpic 0x2 0x1
310 311
311 /* IDSEL 0x12 func 2 - PCI slot 2 */ 312 /* IDSEL 0x12 func 2 - PCI slot 2 */
312 9200 0 0 1 &mpic 3 1 313 0x9200 0x0 0x0 0x1 &mpic 0x3 0x1
313 9200 0 0 2 &mpic 4 1 314 0x9200 0x0 0x0 0x2 &mpic 0x4 0x1
314 9200 0 0 3 &mpic 1 1 315 0x9200 0x0 0x0 0x3 &mpic 0x1 0x1
315 9200 0 0 4 &mpic 2 1 316 0x9200 0x0 0x0 0x4 &mpic 0x2 0x1
316 317
317 /* IDSEL 0x12 func 3 - PCI slot 2 */ 318 /* IDSEL 0x12 func 3 - PCI slot 2 */
318 9300 0 0 1 &mpic 3 1 319 0x9300 0x0 0x0 0x1 &mpic 0x3 0x1
319 9300 0 0 2 &mpic 4 1 320 0x9300 0x0 0x0 0x2 &mpic 0x4 0x1
320 9300 0 0 3 &mpic 1 1 321 0x9300 0x0 0x0 0x3 &mpic 0x1 0x1
321 9300 0 0 4 &mpic 2 1 322 0x9300 0x0 0x0 0x4 &mpic 0x2 0x1
322 323
323 /* IDSEL 0x12 func 4 - PCI slot 2 */ 324 /* IDSEL 0x12 func 4 - PCI slot 2 */
324 9400 0 0 1 &mpic 3 1 325 0x9400 0x0 0x0 0x1 &mpic 0x3 0x1
325 9400 0 0 2 &mpic 4 1 326 0x9400 0x0 0x0 0x2 &mpic 0x4 0x1
326 9400 0 0 3 &mpic 1 1 327 0x9400 0x0 0x0 0x3 &mpic 0x1 0x1
327 9400 0 0 4 &mpic 2 1 328 0x9400 0x0 0x0 0x4 &mpic 0x2 0x1
328 329
329 /* IDSEL 0x12 func 5 - PCI slot 2 */ 330 /* IDSEL 0x12 func 5 - PCI slot 2 */
330 9500 0 0 1 &mpic 3 1 331 0x9500 0x0 0x0 0x1 &mpic 0x3 0x1
331 9500 0 0 2 &mpic 4 1 332 0x9500 0x0 0x0 0x2 &mpic 0x4 0x1
332 9500 0 0 3 &mpic 1 1 333 0x9500 0x0 0x0 0x3 &mpic 0x1 0x1
333 9500 0 0 4 &mpic 2 1 334 0x9500 0x0 0x0 0x4 &mpic 0x2 0x1
334 335
335 /* IDSEL 0x12 func 6 - PCI slot 2 */ 336 /* IDSEL 0x12 func 6 - PCI slot 2 */
336 9600 0 0 1 &mpic 3 1 337 0x9600 0x0 0x0 0x1 &mpic 0x3 0x1
337 9600 0 0 2 &mpic 4 1 338 0x9600 0x0 0x0 0x2 &mpic 0x4 0x1
338 9600 0 0 3 &mpic 1 1 339 0x9600 0x0 0x0 0x3 &mpic 0x1 0x1
339 9600 0 0 4 &mpic 2 1 340 0x9600 0x0 0x0 0x4 &mpic 0x2 0x1
340 341
341 /* IDSEL 0x12 func 7 - PCI slot 2 */ 342 /* IDSEL 0x12 func 7 - PCI slot 2 */
342 9700 0 0 1 &mpic 3 1 343 0x9700 0x0 0x0 0x1 &mpic 0x3 0x1
343 9700 0 0 2 &mpic 4 1 344 0x9700 0x0 0x0 0x2 &mpic 0x4 0x1
344 9700 0 0 3 &mpic 1 1 345 0x9700 0x0 0x0 0x3 &mpic 0x1 0x1
345 9700 0 0 4 &mpic 2 1 346 0x9700 0x0 0x0 0x4 &mpic 0x2 0x1
346 347
347 // IDSEL 0x1c USB 348 // IDSEL 0x1c USB
348 e000 0 0 1 &i8259 c 2 349 0xe000 0x0 0x0 0x1 &i8259 0xc 0x2
349 e100 0 0 2 &i8259 9 2 350 0xe100 0x0 0x0 0x2 &i8259 0x9 0x2
350 e200 0 0 3 &i8259 a 2 351 0xe200 0x0 0x0 0x3 &i8259 0xa 0x2
351 e300 0 0 4 &i8259 b 2 352 0xe300 0x0 0x0 0x4 &i8259 0xb 0x2
352 353
353 // IDSEL 0x1d Audio 354 // IDSEL 0x1d Audio
354 e800 0 0 1 &i8259 6 2 355 0xe800 0x0 0x0 0x1 &i8259 0x6 0x2
355 356
356 // IDSEL 0x1e Legacy 357 // IDSEL 0x1e Legacy
357 f000 0 0 1 &i8259 7 2 358 0xf000 0x0 0x0 0x1 &i8259 0x7 0x2
358 f100 0 0 1 &i8259 7 2 359 0xf100 0x0 0x0 0x1 &i8259 0x7 0x2
359 360
360 // IDSEL 0x1f IDE/SATA 361 // IDSEL 0x1f IDE/SATA
361 f800 0 0 1 &i8259 e 2 362 0xf800 0x0 0x0 0x1 &i8259 0xe 0x2
362 f900 0 0 1 &i8259 5 2 363 0xf900 0x0 0x0 0x1 &i8259 0x5 0x2
363 364
364 >; 365 >;
365 366
366 pcie@0 { 367 pcie@0 {
367 reg = <0 0 0 0 0>; 368 reg = <0x0 0x0 0x0 0x0 0x0>;
368 #size-cells = <2>; 369 #size-cells = <2>;
369 #address-cells = <3>; 370 #address-cells = <3>;
370 device_type = "pci"; 371 device_type = "pci";
371 ranges = <02000000 0 80000000 372 ranges = <0x2000000 0x0 0x80000000
372 02000000 0 80000000 373 0x2000000 0x0 0x80000000
373 0 20000000 374 0x0 0x20000000
374 375
375 01000000 0 00000000 376 0x1000000 0x0 0x0
376 01000000 0 00000000 377 0x1000000 0x0 0x0
377 0 00100000>; 378 0x0 0x100000>;
378 uli1575@0 { 379 uli1575@0 {
379 reg = <0 0 0 0 0>; 380 reg = <0x0 0x0 0x0 0x0 0x0>;
380 #size-cells = <2>; 381 #size-cells = <2>;
381 #address-cells = <3>; 382 #address-cells = <3>;
382 ranges = <02000000 0 80000000 383 ranges = <0x2000000 0x0 0x80000000
383 02000000 0 80000000 384 0x2000000 0x0 0x80000000
384 0 20000000 385 0x0 0x20000000
385 386
386 01000000 0 00000000 387 0x1000000 0x0 0x0
387 01000000 0 00000000 388 0x1000000 0x0 0x0
388 0 00100000>; 389 0x0 0x100000>;
389 isa@1e { 390 isa@1e {
390 device_type = "isa"; 391 device_type = "isa";
391 #interrupt-cells = <2>; 392 #interrupt-cells = <2>;
392 #size-cells = <1>; 393 #size-cells = <1>;
393 #address-cells = <2>; 394 #address-cells = <2>;
394 reg = <f000 0 0 0 0>; 395 reg = <0xf000 0x0 0x0 0x0 0x0>;
395 ranges = <1 0 01000000 0 0 396 ranges = <0x1 0x0 0x1000000 0x0 0x0
396 00001000>; 397 0x1000>;
397 interrupt-parent = <&i8259>; 398 interrupt-parent = <&i8259>;
398 399
399 i8259: interrupt-controller@20 { 400 i8259: interrupt-controller@20 {
400 reg = <1 20 2 401 reg = <0x1 0x20 0x2
401 1 a0 2 402 0x1 0xa0 0x2
402 1 4d0 2>; 403 0x1 0x4d0 0x2>;
403 interrupt-controller; 404 interrupt-controller;
404 device_type = "interrupt-controller"; 405 device_type = "interrupt-controller";
405 #address-cells = <0>; 406 #address-cells = <0>;
@@ -412,29 +413,29 @@
412 i8042@60 { 413 i8042@60 {
413 #size-cells = <0>; 414 #size-cells = <0>;
414 #address-cells = <1>; 415 #address-cells = <1>;
415 reg = <1 60 1 1 64 1>; 416 reg = <0x1 0x60 0x1 0x1 0x64 0x1>;
416 interrupts = <1 3 c 3>; 417 interrupts = <1 3 12 3>;
417 interrupt-parent = 418 interrupt-parent =
418 <&i8259>; 419 <&i8259>;
419 420
420 keyboard@0 { 421 keyboard@0 {
421 reg = <0>; 422 reg = <0x0>;
422 compatible = "pnpPNP,303"; 423 compatible = "pnpPNP,303";
423 }; 424 };
424 425
425 mouse@1 { 426 mouse@1 {
426 reg = <1>; 427 reg = <0x1>;
427 compatible = "pnpPNP,f03"; 428 compatible = "pnpPNP,f03";
428 }; 429 };
429 }; 430 };
430 431
431 rtc@70 { 432 rtc@70 {
432 compatible = "pnpPNP,b00"; 433 compatible = "pnpPNP,b00";
433 reg = <1 70 2>; 434 reg = <0x1 0x70 0x2>;
434 }; 435 };
435 436
436 gpio@400 { 437 gpio@400 {
437 reg = <1 400 80>; 438 reg = <0x1 0x400 0x80>;
438 }; 439 };
439 }; 440 };
440 }; 441 };
@@ -449,33 +450,33 @@
449 #interrupt-cells = <1>; 450 #interrupt-cells = <1>;
450 #size-cells = <2>; 451 #size-cells = <2>;
451 #address-cells = <3>; 452 #address-cells = <3>;
452 reg = <ffe09000 1000>; 453 reg = <0xffe09000 0x1000>;
453 bus-range = <0 ff>; 454 bus-range = <0 255>;
454 ranges = <02000000 0 a0000000 a0000000 0 20000000 455 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
455 01000000 0 00000000 ffc10000 0 00010000>; 456 0x1000000 0x0 0x0 0xffc10000 0x0 0x10000>;
456 clock-frequency = <1fca055>; 457 clock-frequency = <33333333>;
457 interrupt-parent = <&mpic>; 458 interrupt-parent = <&mpic>;
458 interrupts = <1a 2>; 459 interrupts = <26 2>;
459 interrupt-map-mask = <f800 0 0 7>; 460 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
460 interrupt-map = < 461 interrupt-map = <
461 /* IDSEL 0x0 */ 462 /* IDSEL 0x0 */
462 0000 0 0 1 &mpic 4 1 463 0000 0x0 0x0 0x1 &mpic 0x4 0x1
463 0000 0 0 2 &mpic 5 1 464 0000 0x0 0x0 0x2 &mpic 0x5 0x1
464 0000 0 0 3 &mpic 6 1 465 0000 0x0 0x0 0x3 &mpic 0x6 0x1
465 0000 0 0 4 &mpic 7 1 466 0000 0x0 0x0 0x4 &mpic 0x7 0x1
466 >; 467 >;
467 pcie@0 { 468 pcie@0 {
468 reg = <0 0 0 0 0>; 469 reg = <0x0 0x0 0x0 0x0 0x0>;
469 #size-cells = <2>; 470 #size-cells = <2>;
470 #address-cells = <3>; 471 #address-cells = <3>;
471 device_type = "pci"; 472 device_type = "pci";
472 ranges = <02000000 0 a0000000 473 ranges = <0x2000000 0x0 0xa0000000
473 02000000 0 a0000000 474 0x2000000 0x0 0xa0000000
474 0 20000000 475 0x0 0x20000000
475 476
476 01000000 0 00000000 477 0x1000000 0x0 0x0
477 01000000 0 00000000 478 0x1000000 0x0 0x0
478 0 00100000>; 479 0x0 0x100000>;
479 }; 480 };
480 }; 481 };
481 482
@@ -486,33 +487,33 @@
486 #interrupt-cells = <1>; 487 #interrupt-cells = <1>;
487 #size-cells = <2>; 488 #size-cells = <2>;
488 #address-cells = <3>; 489 #address-cells = <3>;
489 reg = <ffe0a000 1000>; 490 reg = <0xffe0a000 0x1000>;
490 bus-range = <0 ff>; 491 bus-range = <0 255>;
491 ranges = <02000000 0 c0000000 c0000000 0 20000000 492 ranges = <0x2000000 0x0 0xc0000000 0xc0000000 0x0 0x20000000
492 01000000 0 00000000 ffc20000 0 00010000>; 493 0x1000000 0x0 0x0 0xffc20000 0x0 0x10000>;
493 clock-frequency = <1fca055>; 494 clock-frequency = <33333333>;
494 interrupt-parent = <&mpic>; 495 interrupt-parent = <&mpic>;
495 interrupts = <1b 2>; 496 interrupts = <27 2>;
496 interrupt-map-mask = <f800 0 0 7>; 497 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
497 interrupt-map = < 498 interrupt-map = <
498 /* IDSEL 0x0 */ 499 /* IDSEL 0x0 */
499 0000 0 0 1 &mpic 0 1 500 0000 0x0 0x0 0x1 &mpic 0x0 0x1
500 0000 0 0 2 &mpic 1 1 501 0000 0x0 0x0 0x2 &mpic 0x1 0x1
501 0000 0 0 3 &mpic 2 1 502 0000 0x0 0x0 0x3 &mpic 0x2 0x1
502 0000 0 0 4 &mpic 3 1 503 0000 0x0 0x0 0x4 &mpic 0x3 0x1
503 >; 504 >;
504 pcie@0 { 505 pcie@0 {
505 reg = <0 0 0 0 0>; 506 reg = <0x0 0x0 0x0 0x0 0x0>;
506 #size-cells = <2>; 507 #size-cells = <2>;
507 #address-cells = <3>; 508 #address-cells = <3>;
508 device_type = "pci"; 509 device_type = "pci";
509 ranges = <02000000 0 c0000000 510 ranges = <0x2000000 0x0 0xc0000000
510 02000000 0 c0000000 511 0x2000000 0x0 0xc0000000
511 0 20000000 512 0x0 0x20000000
512 513
513 01000000 0 00000000 514 0x1000000 0x0 0x0
514 01000000 0 00000000 515 0x1000000 0x0 0x0
515 0 00100000>; 516 0x0 0x100000>;
516 }; 517 };
517 }; 518 };
518}; 519};
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 79385bcd5c5f..7f9b999843ce 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -13,7 +13,7 @@
13 13
14/ { 14/ {
15 model = "MPC8641HPCN"; 15 model = "MPC8641HPCN";
16 compatible = "mpc86xx"; 16 compatible = "fsl,mpc8641hpcn";
17 #address-cells = <1>; 17 #address-cells = <1>;
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index daf9433e906b..765e43c997da 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -2,6 +2,7 @@
2 * MPC866 ADS Device Tree Source 2 * MPC866 ADS Device Tree Source
3 * 3 *
4 * Copyright 2006 MontaVista Software, Inc. 4 * Copyright 2006 MontaVista Software, Inc.
5 * Copyright 2008 Freescale Semiconductor, Inc.
5 * 6 *
6 * 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
7 * under the terms of the GNU General Public License as published by the 8 * under the terms of the GNU General Public License as published by the
@@ -9,6 +10,7 @@
9 * option) any later version. 10 * option) any later version.
10 */ 11 */
11 12
13/dts-v1/;
12 14
13/ { 15/ {
14 model = "MPC866ADS"; 16 model = "MPC866ADS";
@@ -22,37 +24,37 @@
22 24
23 PowerPC,866@0 { 25 PowerPC,866@0 {
24 device_type = "cpu"; 26 device_type = "cpu";
25 reg = <0>; 27 reg = <0x0>;
26 d-cache-line-size = <10>; // 16 bytes 28 d-cache-line-size = <16>; // 16 bytes
27 i-cache-line-size = <10>; // 16 bytes 29 i-cache-line-size = <16>; // 16 bytes
28 d-cache-size = <2000>; // L1, 8K 30 d-cache-size = <0x2000>; // L1, 8K
29 i-cache-size = <4000>; // L1, 16K 31 i-cache-size = <0x4000>; // L1, 16K
30 timebase-frequency = <0>; 32 timebase-frequency = <0>;
31 bus-frequency = <0>; 33 bus-frequency = <0>;
32 clock-frequency = <0>; 34 clock-frequency = <0>;
33 interrupts = <f 2>; // decrementer interrupt 35 interrupts = <15 2>; // decrementer interrupt
34 interrupt-parent = <&PIC>; 36 interrupt-parent = <&PIC>;
35 }; 37 };
36 }; 38 };
37 39
38 memory { 40 memory {
39 device_type = "memory"; 41 device_type = "memory";
40 reg = <00000000 800000>; 42 reg = <0x0 0x800000>;
41 }; 43 };
42 44
43 localbus@ff000100 { 45 localbus@ff000100 {
44 compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus"; 46 compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus";
45 #address-cells = <2>; 47 #address-cells = <2>;
46 #size-cells = <1>; 48 #size-cells = <1>;
47 reg = <ff000100 40>; 49 reg = <0xff000100 0x40>;
48 50
49 ranges = < 51 ranges = <
50 1 0 ff080000 00008000 52 0x1 0x0 0xff080000 0x8000
51 5 0 ff0a0000 00008000 53 0x5 0x0 0xff0a0000 0x8000
52 >; 54 >;
53 55
54 board-control@1,0 { 56 board-control@1,0 {
55 reg = <1 0 20 5 300 4>; 57 reg = <0x1 0x0 0x20 0x5 0x300 0x4>;
56 compatible = "fsl,mpc866ads-bcsr"; 58 compatible = "fsl,mpc866ads-bcsr";
57 }; 59 };
58 }; 60 };
@@ -61,17 +63,17 @@
61 #address-cells = <1>; 63 #address-cells = <1>;
62 #size-cells = <1>; 64 #size-cells = <1>;
63 device_type = "soc"; 65 device_type = "soc";
64 ranges = <0 ff000000 00100000>; 66 ranges = <0x0 0xff000000 0x100000>;
65 reg = <ff000000 00000200>; 67 reg = <0xff000000 0x200>;
66 bus-frequency = <0>; 68 bus-frequency = <0>;
67 69
68 mdio@e00 { 70 mdio@e00 {
69 compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio"; 71 compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio";
70 reg = <e00 188>; 72 reg = <0xe00 0x188>;
71 #address-cells = <1>; 73 #address-cells = <1>;
72 #size-cells = <0>; 74 #size-cells = <0>;
73 PHY: ethernet-phy@f { 75 PHY: ethernet-phy@f {
74 reg = <f>; 76 reg = <0xf>;
75 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
76 }; 78 };
77 }; 79 };
@@ -80,7 +82,7 @@
80 device_type = "network"; 82 device_type = "network";
81 compatible = "fsl,mpc866-fec-enet", 83 compatible = "fsl,mpc866-fec-enet",
82 "fsl,pq1-fec-enet"; 84 "fsl,pq1-fec-enet";
83 reg = <e00 188>; 85 reg = <0xe00 0x188>;
84 local-mac-address = [ 00 00 00 00 00 00 ]; 86 local-mac-address = [ 00 00 00 00 00 00 ];
85 interrupts = <3 1>; 87 interrupts = <3 1>;
86 interrupt-parent = <&PIC>; 88 interrupt-parent = <&PIC>;
@@ -91,7 +93,7 @@
91 PIC: pic@0 { 93 PIC: pic@0 {
92 interrupt-controller; 94 interrupt-controller;
93 #interrupt-cells = <2>; 95 #interrupt-cells = <2>;
94 reg = <0 24>; 96 reg = <0x0 0x24>;
95 compatible = "fsl,mpc866-pic", "fsl,pq1-pic"; 97 compatible = "fsl,mpc866-pic", "fsl,pq1-pic";
96 }; 98 };
97 99
@@ -100,7 +102,7 @@
100 #size-cells = <1>; 102 #size-cells = <1>;
101 compatible = "fsl,mpc866-cpm", "fsl,cpm1"; 103 compatible = "fsl,mpc866-cpm", "fsl,cpm1";
102 ranges; 104 ranges;
103 reg = <9c0 40>; 105 reg = <0x9c0 0x40>;
104 brg-frequency = <0>; 106 brg-frequency = <0>;
105 interrupts = <0 2>; // cpm error interrupt 107 interrupts = <0 2>; // cpm error interrupt
106 interrupt-parent = <&CPM_PIC>; 108 interrupt-parent = <&CPM_PIC>;
@@ -108,11 +110,11 @@
108 muram@2000 { 110 muram@2000 {
109 #address-cells = <1>; 111 #address-cells = <1>;
110 #size-cells = <1>; 112 #size-cells = <1>;
111 ranges = <0 2000 2000>; 113 ranges = <0x0 0x2000 0x2000>;
112 114
113 data@0 { 115 data@0 {
114 compatible = "fsl,cpm-muram-data"; 116 compatible = "fsl,cpm-muram-data";
115 reg = <0 1c00>; 117 reg = <0x0 0x1c00>;
116 }; 118 };
117 }; 119 };
118 120
@@ -120,7 +122,7 @@
120 compatible = "fsl,mpc866-brg", 122 compatible = "fsl,mpc866-brg",
121 "fsl,cpm1-brg", 123 "fsl,cpm1-brg",
122 "fsl,cpm-brg"; 124 "fsl,cpm-brg";
123 reg = <9f0 10>; 125 reg = <0x9f0 0x10>;
124 clock-frequency = <0>; 126 clock-frequency = <0>;
125 }; 127 };
126 128
@@ -130,7 +132,7 @@
130 #interrupt-cells = <1>; 132 #interrupt-cells = <1>;
131 interrupts = <5 2 0 2>; 133 interrupts = <5 2 0 2>;
132 interrupt-parent = <&PIC>; 134 interrupt-parent = <&PIC>;
133 reg = <930 20>; 135 reg = <0x930 0x20>;
134 compatible = "fsl,mpc866-cpm-pic", 136 compatible = "fsl,mpc866-cpm-pic",
135 "fsl,cpm1-pic"; 137 "fsl,cpm1-pic";
136 }; 138 };
@@ -140,31 +142,31 @@
140 device_type = "serial"; 142 device_type = "serial";
141 compatible = "fsl,mpc866-smc-uart", 143 compatible = "fsl,mpc866-smc-uart",
142 "fsl,cpm1-smc-uart"; 144 "fsl,cpm1-smc-uart";
143 reg = <a80 10 3e80 40>; 145 reg = <0xa80 0x10 0x3e80 0x40>;
144 interrupts = <4>; 146 interrupts = <4>;
145 interrupt-parent = <&CPM_PIC>; 147 interrupt-parent = <&CPM_PIC>;
146 fsl,cpm-brg = <1>; 148 fsl,cpm-brg = <1>;
147 fsl,cpm-command = <0090>; 149 fsl,cpm-command = <0x90>;
148 }; 150 };
149 151
150 serial@a90 { 152 serial@a90 {
151 device_type = "serial"; 153 device_type = "serial";
152 compatible = "fsl,mpc866-smc-uart", 154 compatible = "fsl,mpc866-smc-uart",
153 "fsl,cpm1-smc-uart"; 155 "fsl,cpm1-smc-uart";
154 reg = <a90 10 3f80 40>; 156 reg = <0xa90 0x10 0x3f80 0x40>;
155 interrupts = <3>; 157 interrupts = <3>;
156 interrupt-parent = <&CPM_PIC>; 158 interrupt-parent = <&CPM_PIC>;
157 fsl,cpm-brg = <2>; 159 fsl,cpm-brg = <2>;
158 fsl,cpm-command = <00d0>; 160 fsl,cpm-command = <0xd0>;
159 }; 161 };
160 162
161 ethernet@a00 { 163 ethernet@a00 {
162 device_type = "network"; 164 device_type = "network";
163 compatible = "fsl,mpc866-scc-enet", 165 compatible = "fsl,mpc866-scc-enet",
164 "fsl,cpm1-scc-enet"; 166 "fsl,cpm1-scc-enet";
165 reg = <a00 18 3c00 100>; 167 reg = <0xa00 0x18 0x3c00 0x100>;
166 local-mac-address = [ 00 00 00 00 00 00 ]; 168 local-mac-address = [ 00 00 00 00 00 00 ];
167 interrupts = <1e>; 169 interrupts = <30>;
168 interrupt-parent = <&CPM_PIC>; 170 interrupt-parent = <&CPM_PIC>;
169 fsl,cpm-command = <0000>; 171 fsl,cpm-command = <0000>;
170 linux,network-index = <1>; 172 linux,network-index = <1>;
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index d84a012c2aaf..9895043722b9 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -2,7 +2,7 @@
2 * MPC885 ADS Device Tree Source 2 * MPC885 ADS Device Tree Source
3 * 3 *
4 * Copyright 2006 MontaVista Software, Inc. 4 * Copyright 2006 MontaVista Software, Inc.
5 * Copyright 2007 Freescale Semiconductor, Inc. 5 * Copyright 2007,2008 Freescale Semiconductor, Inc.
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
8 * under the terms of the GNU General Public License as published by the 8 * under the terms of the GNU General Public License as published by the
@@ -10,6 +10,7 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/dts-v1/;
13 14
14/ { 15/ {
15 model = "MPC885ADS"; 16 model = "MPC885ADS";
@@ -23,45 +24,45 @@
23 24
24 PowerPC,885@0 { 25 PowerPC,885@0 {
25 device_type = "cpu"; 26 device_type = "cpu";
26 reg = <0>; 27 reg = <0x0>;
27 d-cache-line-size = <d#16>; 28 d-cache-line-size = <16>;
28 i-cache-line-size = <d#16>; 29 i-cache-line-size = <16>;
29 d-cache-size = <d#8192>; 30 d-cache-size = <8192>;
30 i-cache-size = <d#8192>; 31 i-cache-size = <8192>;
31 timebase-frequency = <0>; 32 timebase-frequency = <0>;
32 bus-frequency = <0>; 33 bus-frequency = <0>;
33 clock-frequency = <0>; 34 clock-frequency = <0>;
34 interrupts = <f 2>; // decrementer interrupt 35 interrupts = <15 2>; // decrementer interrupt
35 interrupt-parent = <&PIC>; 36 interrupt-parent = <&PIC>;
36 }; 37 };
37 }; 38 };
38 39
39 memory { 40 memory {
40 device_type = "memory"; 41 device_type = "memory";
41 reg = <0 0>; 42 reg = <0x0 0x0>;
42 }; 43 };
43 44
44 localbus@ff000100 { 45 localbus@ff000100 {
45 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus"; 46 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus";
46 #address-cells = <2>; 47 #address-cells = <2>;
47 #size-cells = <1>; 48 #size-cells = <1>;
48 reg = <ff000100 40>; 49 reg = <0xff000100 0x40>;
49 50
50 ranges = < 51 ranges = <
51 0 0 fe000000 00800000 52 0x0 0x0 0xfe000000 0x800000
52 1 0 ff080000 00008000 53 0x1 0x0 0xff080000 0x8000
53 5 0 ff0a0000 00008000 54 0x5 0x0 0xff0a0000 0x8000
54 >; 55 >;
55 56
56 flash@0,0 { 57 flash@0,0 {
57 compatible = "jedec-flash"; 58 compatible = "jedec-flash";
58 reg = <0 0 800000>; 59 reg = <0x0 0x0 0x800000>;
59 bank-width = <4>; 60 bank-width = <4>;
60 device-width = <1>; 61 device-width = <1>;
61 }; 62 };
62 63
63 board-control@1,0 { 64 board-control@1,0 {
64 reg = <1 0 20 5 300 4>; 65 reg = <0x1 0x0 0x20 0x5 0x300 0x4>;
65 compatible = "fsl,mpc885ads-bcsr"; 66 compatible = "fsl,mpc885ads-bcsr";
66 }; 67 };
67 }; 68 };
@@ -71,30 +72,30 @@
71 #address-cells = <1>; 72 #address-cells = <1>;
72 #size-cells = <1>; 73 #size-cells = <1>;
73 device_type = "soc"; 74 device_type = "soc";
74 ranges = <0 ff000000 00004000>; 75 ranges = <0x0 0xff000000 0x4000>;
75 bus-frequency = <0>; 76 bus-frequency = <0>;
76 77
77 // Temporary -- will go away once kernel uses ranges for get_immrbase(). 78 // Temporary -- will go away once kernel uses ranges for get_immrbase().
78 reg = <ff000000 4000>; 79 reg = <0xff000000 0x4000>;
79 80
80 mdio@e00 { 81 mdio@e00 {
81 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio"; 82 compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
82 reg = <e00 188>; 83 reg = <0xe00 0x188>;
83 #address-cells = <1>; 84 #address-cells = <1>;
84 #size-cells = <0>; 85 #size-cells = <0>;
85 86
86 PHY0: ethernet-phy@0 { 87 PHY0: ethernet-phy@0 {
87 reg = <0>; 88 reg = <0x0>;
88 device_type = "ethernet-phy"; 89 device_type = "ethernet-phy";
89 }; 90 };
90 91
91 PHY1: ethernet-phy@1 { 92 PHY1: ethernet-phy@1 {
92 reg = <1>; 93 reg = <0x1>;
93 device_type = "ethernet-phy"; 94 device_type = "ethernet-phy";
94 }; 95 };
95 96
96 PHY2: ethernet-phy@2 { 97 PHY2: ethernet-phy@2 {
97 reg = <2>; 98 reg = <0x2>;
98 device_type = "ethernet-phy"; 99 device_type = "ethernet-phy";
99 }; 100 };
100 }; 101 };
@@ -103,7 +104,7 @@
103 device_type = "network"; 104 device_type = "network";
104 compatible = "fsl,mpc885-fec-enet", 105 compatible = "fsl,mpc885-fec-enet",
105 "fsl,pq1-fec-enet"; 106 "fsl,pq1-fec-enet";
106 reg = <e00 188>; 107 reg = <0xe00 0x188>;
107 local-mac-address = [ 00 00 00 00 00 00 ]; 108 local-mac-address = [ 00 00 00 00 00 00 ];
108 interrupts = <3 1>; 109 interrupts = <3 1>;
109 interrupt-parent = <&PIC>; 110 interrupt-parent = <&PIC>;
@@ -115,7 +116,7 @@
115 device_type = "network"; 116 device_type = "network";
116 compatible = "fsl,mpc885-fec-enet", 117 compatible = "fsl,mpc885-fec-enet",
117 "fsl,pq1-fec-enet"; 118 "fsl,pq1-fec-enet";
118 reg = <1e00 188>; 119 reg = <0x1e00 0x188>;
119 local-mac-address = [ 00 00 00 00 00 00 ]; 120 local-mac-address = [ 00 00 00 00 00 00 ];
120 interrupts = <7 1>; 121 interrupts = <7 1>;
121 interrupt-parent = <&PIC>; 122 interrupt-parent = <&PIC>;
@@ -126,7 +127,7 @@
126 PIC: interrupt-controller@0 { 127 PIC: interrupt-controller@0 {
127 interrupt-controller; 128 interrupt-controller;
128 #interrupt-cells = <2>; 129 #interrupt-cells = <2>;
129 reg = <0 24>; 130 reg = <0x0 0x24>;
130 compatible = "fsl,mpc885-pic", "fsl,pq1-pic"; 131 compatible = "fsl,mpc885-pic", "fsl,pq1-pic";
131 }; 132 };
132 133
@@ -136,29 +137,29 @@
136 #size-cells = <2>; 137 #size-cells = <2>;
137 compatible = "fsl,pq-pcmcia"; 138 compatible = "fsl,pq-pcmcia";
138 device_type = "pcmcia"; 139 device_type = "pcmcia";
139 reg = <80 80>; 140 reg = <0x80 0x80>;
140 interrupt-parent = <&PIC>; 141 interrupt-parent = <&PIC>;
141 interrupts = <d 1>; 142 interrupts = <13 1>;
142 }; 143 };
143 144
144 cpm@9c0 { 145 cpm@9c0 {
145 #address-cells = <1>; 146 #address-cells = <1>;
146 #size-cells = <1>; 147 #size-cells = <1>;
147 compatible = "fsl,mpc885-cpm", "fsl,cpm1"; 148 compatible = "fsl,mpc885-cpm", "fsl,cpm1";
148 command-proc = <9c0>; 149 command-proc = <0x9c0>;
149 interrupts = <0>; // cpm error interrupt 150 interrupts = <0>; // cpm error interrupt
150 interrupt-parent = <&CPM_PIC>; 151 interrupt-parent = <&CPM_PIC>;
151 reg = <9c0 40>; 152 reg = <0x9c0 0x40>;
152 ranges; 153 ranges;
153 154
154 muram@2000 { 155 muram@2000 {
155 #address-cells = <1>; 156 #address-cells = <1>;
156 #size-cells = <1>; 157 #size-cells = <1>;
157 ranges = <0 2000 2000>; 158 ranges = <0x0 0x2000 0x2000>;
158 159
159 data@0 { 160 data@0 {
160 compatible = "fsl,cpm-muram-data"; 161 compatible = "fsl,cpm-muram-data";
161 reg = <0 1c00>; 162 reg = <0x0 0x1c00>;
162 }; 163 };
163 }; 164 };
164 165
@@ -167,7 +168,7 @@
167 "fsl,cpm1-brg", 168 "fsl,cpm1-brg",
168 "fsl,cpm-brg"; 169 "fsl,cpm-brg";
169 clock-frequency = <0>; 170 clock-frequency = <0>;
170 reg = <9f0 10>; 171 reg = <0x9f0 0x10>;
171 }; 172 };
172 173
173 CPM_PIC: interrupt-controller@930 { 174 CPM_PIC: interrupt-controller@930 {
@@ -175,7 +176,7 @@
175 #interrupt-cells = <1>; 176 #interrupt-cells = <1>;
176 interrupts = <5 2 0 2>; 177 interrupts = <5 2 0 2>;
177 interrupt-parent = <&PIC>; 178 interrupt-parent = <&PIC>;
178 reg = <930 20>; 179 reg = <0x930 0x20>;
179 compatible = "fsl,mpc885-cpm-pic", 180 compatible = "fsl,mpc885-cpm-pic",
180 "fsl,cpm1-pic"; 181 "fsl,cpm1-pic";
181 }; 182 };
@@ -184,34 +185,34 @@
184 device_type = "serial"; 185 device_type = "serial";
185 compatible = "fsl,mpc885-smc-uart", 186 compatible = "fsl,mpc885-smc-uart",
186 "fsl,cpm1-smc-uart"; 187 "fsl,cpm1-smc-uart";
187 reg = <a80 10 3e80 40>; 188 reg = <0xa80 0x10 0x3e80 0x40>;
188 interrupts = <4>; 189 interrupts = <4>;
189 interrupt-parent = <&CPM_PIC>; 190 interrupt-parent = <&CPM_PIC>;
190 fsl,cpm-brg = <1>; 191 fsl,cpm-brg = <1>;
191 fsl,cpm-command = <0090>; 192 fsl,cpm-command = <0x90>;
192 }; 193 };
193 194
194 serial@a90 { 195 serial@a90 {
195 device_type = "serial"; 196 device_type = "serial";
196 compatible = "fsl,mpc885-smc-uart", 197 compatible = "fsl,mpc885-smc-uart",
197 "fsl,cpm1-smc-uart"; 198 "fsl,cpm1-smc-uart";
198 reg = <a90 10 3f80 40>; 199 reg = <0xa90 0x10 0x3f80 0x40>;
199 interrupts = <3>; 200 interrupts = <3>;
200 interrupt-parent = <&CPM_PIC>; 201 interrupt-parent = <&CPM_PIC>;
201 fsl,cpm-brg = <2>; 202 fsl,cpm-brg = <2>;
202 fsl,cpm-command = <00d0>; 203 fsl,cpm-command = <0xd0>;
203 }; 204 };
204 205
205 ethernet@a40 { 206 ethernet@a40 {
206 device_type = "network"; 207 device_type = "network";
207 compatible = "fsl,mpc885-scc-enet", 208 compatible = "fsl,mpc885-scc-enet",
208 "fsl,cpm1-scc-enet"; 209 "fsl,cpm1-scc-enet";
209 reg = <a40 18 3e00 100>; 210 reg = <0xa40 0x18 0x3e00 0x100>;
210 local-mac-address = [ 00 00 00 00 00 00 ]; 211 local-mac-address = [ 00 00 00 00 00 00 ];
211 interrupts = <1c>; 212 interrupts = <28>;
212 interrupt-parent = <&CPM_PIC>; 213 interrupt-parent = <&CPM_PIC>;
213 phy-handle = <&PHY2>; 214 phy-handle = <&PHY2>;
214 fsl,cpm-command = <0080>; 215 fsl,cpm-command = <0x80>;
215 linux,network-index = <2>; 216 linux,network-index = <2>;
216 }; 217 };
217 }; 218 };
diff --git a/arch/powerpc/boot/dts/pq2fads.dts b/arch/powerpc/boot/dts/pq2fads.dts
index 2d564921897a..b2d61091b36d 100644
--- a/arch/powerpc/boot/dts/pq2fads.dts
+++ b/arch/powerpc/boot/dts/pq2fads.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Device Tree for the PQ2FADS-ZU board with an MPC8280 chip. 2 * Device Tree for the PQ2FADS-ZU board with an MPC8280 chip.
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor Inc. 4 * Copyright 2007,2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -9,6 +9,8 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
13
12/ { 14/ {
13 model = "pq2fads"; 15 model = "pq2fads";
14 compatible = "fsl,pq2fads"; 16 compatible = "fsl,pq2fads";
@@ -21,11 +23,11 @@
21 23
22 cpu@0 { 24 cpu@0 {
23 device_type = "cpu"; 25 device_type = "cpu";
24 reg = <0>; 26 reg = <0x0>;
25 d-cache-line-size = <d#32>; 27 d-cache-line-size = <32>;
26 i-cache-line-size = <d#32>; 28 i-cache-line-size = <32>;
27 d-cache-size = <d#16384>; 29 d-cache-size = <16384>;
28 i-cache-size = <d#16384>; 30 i-cache-size = <16384>;
29 timebase-frequency = <0>; 31 timebase-frequency = <0>;
30 clock-frequency = <0>; 32 clock-frequency = <0>;
31 }; 33 };
@@ -33,7 +35,7 @@
33 35
34 memory { 36 memory {
35 device_type = "memory"; 37 device_type = "memory";
36 reg = <0 0>; 38 reg = <0x0 0x0>;
37 }; 39 };
38 40
39 localbus@f0010100 { 41 localbus@f0010100 {
@@ -41,67 +43,67 @@
41 "fsl,pq2-localbus"; 43 "fsl,pq2-localbus";
42 #address-cells = <2>; 44 #address-cells = <2>;
43 #size-cells = <1>; 45 #size-cells = <1>;
44 reg = <f0010100 60>; 46 reg = <0xf0010100 0x60>;
45 47
46 ranges = <0 0 fe000000 00800000 48 ranges = <0x0 0x0 0xfe000000 0x800000
47 1 0 f4500000 00008000 49 0x1 0x0 0xf4500000 0x8000
48 8 0 f8200000 00008000>; 50 0x8 0x0 0xf8200000 0x8000>;
49 51
50 flash@0,0 { 52 flash@0,0 {
51 compatible = "jedec-flash"; 53 compatible = "jedec-flash";
52 reg = <0 0 800000>; 54 reg = <0x0 0x0 0x800000>;
53 bank-width = <4>; 55 bank-width = <4>;
54 device-width = <1>; 56 device-width = <1>;
55 }; 57 };
56 58
57 bcsr@1,0 { 59 bcsr@1,0 {
58 reg = <1 0 20>; 60 reg = <0x1 0x0 0x20>;
59 compatible = "fsl,pq2fads-bcsr"; 61 compatible = "fsl,pq2fads-bcsr";
60 }; 62 };
61 63
62 PCI_PIC: pic@8,0 { 64 PCI_PIC: pic@8,0 {
63 #interrupt-cells = <1>; 65 #interrupt-cells = <1>;
64 interrupt-controller; 66 interrupt-controller;
65 reg = <8 0 8>; 67 reg = <0x8 0x0 0x8>;
66 compatible = "fsl,pq2ads-pci-pic"; 68 compatible = "fsl,pq2ads-pci-pic";
67 interrupt-parent = <&PIC>; 69 interrupt-parent = <&PIC>;
68 interrupts = <18 8>; 70 interrupts = <24 8>;
69 }; 71 };
70 }; 72 };
71 73
72 pci@f0010800 { 74 pci@f0010800 {
73 device_type = "pci"; 75 device_type = "pci";
74 reg = <f0010800 10c f00101ac 8 f00101c4 8>; 76 reg = <0xf0010800 0x10c 0xf00101ac 0x8 0xf00101c4 0x8>;
75 compatible = "fsl,mpc8280-pci", "fsl,pq2-pci"; 77 compatible = "fsl,mpc8280-pci", "fsl,pq2-pci";
76 #interrupt-cells = <1>; 78 #interrupt-cells = <1>;
77 #size-cells = <2>; 79 #size-cells = <2>;
78 #address-cells = <3>; 80 #address-cells = <3>;
79 clock-frequency = <d#66000000>; 81 clock-frequency = <66000000>;
80 interrupt-map-mask = <f800 0 0 7>; 82 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
81 interrupt-map = < 83 interrupt-map = <
82 /* IDSEL 0x16 */ 84 /* IDSEL 0x16 */
83 b000 0 0 1 &PCI_PIC 0 85 0xb000 0x0 0x0 0x1 &PCI_PIC 0
84 b000 0 0 2 &PCI_PIC 1 86 0xb000 0x0 0x0 0x2 &PCI_PIC 1
85 b000 0 0 3 &PCI_PIC 2 87 0xb000 0x0 0x0 0x3 &PCI_PIC 2
86 b000 0 0 4 &PCI_PIC 3 88 0xb000 0x0 0x0 0x4 &PCI_PIC 3
87 89
88 /* IDSEL 0x17 */ 90 /* IDSEL 0x17 */
89 b800 0 0 1 &PCI_PIC 4 91 0xb800 0x0 0x0 0x1 &PCI_PIC 4
90 b800 0 0 2 &PCI_PIC 5 92 0xb800 0x0 0x0 0x2 &PCI_PIC 5
91 b800 0 0 3 &PCI_PIC 6 93 0xb800 0x0 0x0 0x3 &PCI_PIC 6
92 b800 0 0 4 &PCI_PIC 7 94 0xb800 0x0 0x0 0x4 &PCI_PIC 7
93 95
94 /* IDSEL 0x18 */ 96 /* IDSEL 0x18 */
95 c000 0 0 1 &PCI_PIC 8 97 0xc000 0x0 0x0 0x1 &PCI_PIC 8
96 c000 0 0 2 &PCI_PIC 9 98 0xc000 0x0 0x0 0x2 &PCI_PIC 9
97 c000 0 0 3 &PCI_PIC a 99 0xc000 0x0 0x0 0x3 &PCI_PIC 10
98 c000 0 0 4 &PCI_PIC b>; 100 0xc000 0x0 0x0 0x4 &PCI_PIC 11>;
99 101
100 interrupt-parent = <&PIC>; 102 interrupt-parent = <&PIC>;
101 interrupts = <12 8>; 103 interrupts = <18 8>;
102 ranges = <42000000 0 80000000 80000000 0 20000000 104 ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x20000000
103 02000000 0 a0000000 a0000000 0 20000000 105 0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
104 01000000 0 00000000 f6000000 0 02000000>; 106 0x1000000 0x0 0x0 0xf6000000 0x0 0x2000000>;
105 }; 107 };
106 108
107 soc@f0000000 { 109 soc@f0000000 {
@@ -109,27 +111,27 @@
109 #size-cells = <1>; 111 #size-cells = <1>;
110 device_type = "soc"; 112 device_type = "soc";
111 compatible = "fsl,mpc8280", "fsl,pq2-soc"; 113 compatible = "fsl,mpc8280", "fsl,pq2-soc";
112 ranges = <00000000 f0000000 00053000>; 114 ranges = <0x0 0xf0000000 0x53000>;
113 115
114 // Temporary -- will go away once kernel uses ranges for get_immrbase(). 116 // Temporary -- will go away once kernel uses ranges for get_immrbase().
115 reg = <f0000000 00053000>; 117 reg = <0xf0000000 0x53000>;
116 118
117 cpm@119c0 { 119 cpm@119c0 {
118 #address-cells = <1>; 120 #address-cells = <1>;
119 #size-cells = <1>; 121 #size-cells = <1>;
120 #interrupt-cells = <2>; 122 #interrupt-cells = <2>;
121 compatible = "fsl,mpc8280-cpm", "fsl,cpm2"; 123 compatible = "fsl,mpc8280-cpm", "fsl,cpm2";
122 reg = <119c0 30>; 124 reg = <0x119c0 0x30>;
123 ranges; 125 ranges;
124 126
125 muram@0 { 127 muram@0 {
126 #address-cells = <1>; 128 #address-cells = <1>;
127 #size-cells = <1>; 129 #size-cells = <1>;
128 ranges = <0 0 10000>; 130 ranges = <0x0 0x0 0x10000>;
129 131
130 data@0 { 132 data@0 {
131 compatible = "fsl,cpm-muram-data"; 133 compatible = "fsl,cpm-muram-data";
132 reg = <0 2000 9800 800>; 134 reg = <0x0 0x2000 0x9800 0x800>;
133 }; 135 };
134 }; 136 };
135 137
@@ -137,53 +139,53 @@
137 compatible = "fsl,mpc8280-brg", 139 compatible = "fsl,mpc8280-brg",
138 "fsl,cpm2-brg", 140 "fsl,cpm2-brg",
139 "fsl,cpm-brg"; 141 "fsl,cpm-brg";
140 reg = <119f0 10 115f0 10>; 142 reg = <0x119f0 0x10 0x115f0 0x10>;
141 }; 143 };
142 144
143 serial@11a00 { 145 serial@11a00 {
144 device_type = "serial"; 146 device_type = "serial";
145 compatible = "fsl,mpc8280-scc-uart", 147 compatible = "fsl,mpc8280-scc-uart",
146 "fsl,cpm2-scc-uart"; 148 "fsl,cpm2-scc-uart";
147 reg = <11a00 20 8000 100>; 149 reg = <0x11a00 0x20 0x8000 0x100>;
148 interrupts = <28 8>; 150 interrupts = <40 8>;
149 interrupt-parent = <&PIC>; 151 interrupt-parent = <&PIC>;
150 fsl,cpm-brg = <1>; 152 fsl,cpm-brg = <1>;
151 fsl,cpm-command = <00800000>; 153 fsl,cpm-command = <0x800000>;
152 }; 154 };
153 155
154 serial@11a20 { 156 serial@11a20 {
155 device_type = "serial"; 157 device_type = "serial";
156 compatible = "fsl,mpc8280-scc-uart", 158 compatible = "fsl,mpc8280-scc-uart",
157 "fsl,cpm2-scc-uart"; 159 "fsl,cpm2-scc-uart";
158 reg = <11a20 20 8100 100>; 160 reg = <0x11a20 0x20 0x8100 0x100>;
159 interrupts = <29 8>; 161 interrupts = <41 8>;
160 interrupt-parent = <&PIC>; 162 interrupt-parent = <&PIC>;
161 fsl,cpm-brg = <2>; 163 fsl,cpm-brg = <2>;
162 fsl,cpm-command = <04a00000>; 164 fsl,cpm-command = <0x4a00000>;
163 }; 165 };
164 166
165 ethernet@11320 { 167 ethernet@11320 {
166 device_type = "network"; 168 device_type = "network";
167 compatible = "fsl,mpc8280-fcc-enet", 169 compatible = "fsl,mpc8280-fcc-enet",
168 "fsl,cpm2-fcc-enet"; 170 "fsl,cpm2-fcc-enet";
169 reg = <11320 20 8500 100 113b0 1>; 171 reg = <0x11320 0x20 0x8500 0x100 0x113b0 0x1>;
170 interrupts = <21 8>; 172 interrupts = <33 8>;
171 interrupt-parent = <&PIC>; 173 interrupt-parent = <&PIC>;
172 phy-handle = <&PHY0>; 174 phy-handle = <&PHY0>;
173 linux,network-index = <0>; 175 linux,network-index = <0>;
174 fsl,cpm-command = <16200300>; 176 fsl,cpm-command = <0x16200300>;
175 }; 177 };
176 178
177 ethernet@11340 { 179 ethernet@11340 {
178 device_type = "network"; 180 device_type = "network";
179 compatible = "fsl,mpc8280-fcc-enet", 181 compatible = "fsl,mpc8280-fcc-enet",
180 "fsl,cpm2-fcc-enet"; 182 "fsl,cpm2-fcc-enet";
181 reg = <11340 20 8600 100 113d0 1>; 183 reg = <0x11340 0x20 0x8600 0x100 0x113d0 0x1>;
182 interrupts = <22 8>; 184 interrupts = <34 8>;
183 interrupt-parent = <&PIC>; 185 interrupt-parent = <&PIC>;
184 phy-handle = <&PHY1>; 186 phy-handle = <&PHY1>;
185 linux,network-index = <1>; 187 linux,network-index = <1>;
186 fsl,cpm-command = <1a400300>; 188 fsl,cpm-command = <0x1a400300>;
187 local-mac-address = [00 e0 0c 00 79 01]; 189 local-mac-address = [00 e0 0c 00 79 01];
188 }; 190 };
189 191
@@ -194,21 +196,21 @@
194 "fsl,cpm2-mdio-bitbang"; 196 "fsl,cpm2-mdio-bitbang";
195 #address-cells = <1>; 197 #address-cells = <1>;
196 #size-cells = <0>; 198 #size-cells = <0>;
197 reg = <10d40 14>; 199 reg = <0x10d40 0x14>;
198 fsl,mdio-pin = <9>; 200 fsl,mdio-pin = <9>;
199 fsl,mdc-pin = <a>; 201 fsl,mdc-pin = <10>;
200 202
201 PHY0: ethernet-phy@0 { 203 PHY0: ethernet-phy@0 {
202 interrupt-parent = <&PIC>; 204 interrupt-parent = <&PIC>;
203 interrupts = <19 2>; 205 interrupts = <25 2>;
204 reg = <0>; 206 reg = <0x0>;
205 device_type = "ethernet-phy"; 207 device_type = "ethernet-phy";
206 }; 208 };
207 209
208 PHY1: ethernet-phy@1 { 210 PHY1: ethernet-phy@1 {
209 interrupt-parent = <&PIC>; 211 interrupt-parent = <&PIC>;
210 interrupts = <19 2>; 212 interrupts = <25 2>;
211 reg = <3>; 213 reg = <0x3>;
212 device_type = "ethernet-phy"; 214 device_type = "ethernet-phy";
213 }; 215 };
214 }; 216 };
@@ -218,17 +220,17 @@
218 #size-cells = <0>; 220 #size-cells = <0>;
219 compatible = "fsl,mpc8280-usb", 221 compatible = "fsl,mpc8280-usb",
220 "fsl,cpm2-usb"; 222 "fsl,cpm2-usb";
221 reg = <11b60 18 8b00 100>; 223 reg = <0x11b60 0x18 0x8b00 0x100>;
222 interrupt-parent = <&PIC>; 224 interrupt-parent = <&PIC>;
223 interrupts = <b 8>; 225 interrupts = <11 8>;
224 fsl,cpm-command = <2e600000>; 226 fsl,cpm-command = <0x2e600000>;
225 }; 227 };
226 }; 228 };
227 229
228 PIC: interrupt-controller@10c00 { 230 PIC: interrupt-controller@10c00 {
229 #interrupt-cells = <2>; 231 #interrupt-cells = <2>;
230 interrupt-controller; 232 interrupt-controller;
231 reg = <10c00 80>; 233 reg = <0x10c00 0x80>;
232 compatible = "fsl,mpc8280-pic", "fsl,cpm2-pic"; 234 compatible = "fsl,mpc8280-pic", "fsl,cpm2-pic";
233 }; 235 };
234 236
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
index 297dfa53fe9e..1ee6ff43dd57 100644
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ b/arch/powerpc/boot/dts/prpmc2800.dts
@@ -11,6 +11,8 @@
11 * if it can determine the exact PrPMC type. 11 * if it can determine the exact PrPMC type.
12 */ 12 */
13 13
14/dts-v1/;
15
14/ { 16/ {
15 #address-cells = <1>; 17 #address-cells = <1>;
16 #size-cells = <1>; 18 #size-cells = <1>;
@@ -25,46 +27,46 @@
25 PowerPC,7447 { 27 PowerPC,7447 {
26 device_type = "cpu"; 28 device_type = "cpu";
27 reg = <0>; 29 reg = <0>;
28 clock-frequency = <2bb0b140>; /* Default (733 MHz) */ 30 clock-frequency = <733333333>; /* Default */
29 bus-frequency = <7f28155>; /* 133.333333 MHz */ 31 bus-frequency = <133333333>;
30 timebase-frequency = <1fca055>; /* 33.333333 MHz */ 32 timebase-frequency = <33333333>;
31 i-cache-line-size = <20>; 33 i-cache-line-size = <32>;
32 d-cache-line-size = <20>; 34 d-cache-line-size = <32>;
33 i-cache-size = <8000>; 35 i-cache-size = <32768>;
34 d-cache-size = <8000>; 36 d-cache-size = <32768>;
35 }; 37 };
36 }; 38 };
37 39
38 memory { 40 memory {
39 device_type = "memory"; 41 device_type = "memory";
40 reg = <00000000 20000000>; /* Default (512MB) */ 42 reg = <0x0 0x20000000>; /* Default (512MB) */
41 }; 43 };
42 44
43 mv64x60@f1000000 { /* Marvell Discovery */ 45 system-controller@f1000000 { /* Marvell Discovery mv64360 */
44 #address-cells = <1>; 46 #address-cells = <1>;
45 #size-cells = <1>; 47 #size-cells = <1>;
46 model = "mv64360"; /* Default */ 48 model = "mv64360"; /* Default */
47 compatible = "marvell,mv64x60"; 49 compatible = "marvell,mv64360";
48 clock-frequency = <7f28155>; /* 133.333333 MHz */ 50 clock-frequency = <133333333>;
49 reg = <f1000000 00010000>; 51 reg = <0xf1000000 0x10000>;
50 virtual-reg = <f1000000>; 52 virtual-reg = <0xf1000000>;
51 ranges = <88000000 88000000 01000000 /* PCI 0 I/O Space */ 53 ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
52 80000000 80000000 08000000 /* PCI 0 MEM Space */ 54 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
53 a0000000 a0000000 04000000 /* User FLASH */ 55 0xa0000000 0xa0000000 0x4000000 /* User FLASH */
54 00000000 f1000000 00010000 /* Bridge's regs */ 56 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
55 f2000000 f2000000 00040000>; /* Integrated SRAM */ 57 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
56 58
57 flash@a0000000 { 59 flash@a0000000 {
58 device_type = "rom"; 60 device_type = "rom";
59 compatible = "direct-mapped"; 61 compatible = "direct-mapped";
60 reg = <a0000000 4000000>; /* Default (64MB) */ 62 reg = <0xa0000000 0x4000000>; /* Default (64MB) */
61 probe-type = "CFI"; 63 probe-type = "CFI";
62 bank-width = <4>; 64 bank-width = <4>;
63 partitions = <00000000 00100000 /* RO */ 65 partitions = <0x00000000 0x00100000 /* RO */
64 00100000 00040001 /* RW */ 66 0x00100000 0x00040001 /* RW */
65 00140000 00400000 /* RO */ 67 0x00140000 0x00400000 /* RO */
66 00540000 039c0000 /* RO */ 68 0x00540000 0x039c0000 /* RO */
67 03f00000 00100000>; /* RO */ 69 0x03f00000 0x00100000>; /* RO */
68 partition-names = "FW Image A", "FW Config Data", "Kernel Image", "Filesystem", "FW Image B"; 70 partition-names = "FW Image A", "FW Config Data", "Kernel Image", "Filesystem", "FW Image B";
69 }; 71 };
70 72
@@ -72,171 +74,153 @@
72 #address-cells = <1>; 74 #address-cells = <1>;
73 #size-cells = <0>; 75 #size-cells = <0>;
74 device_type = "mdio"; 76 device_type = "mdio";
75 compatible = "marvell,mv64x60-mdio"; 77 compatible = "marvell,mv64360-mdio";
76 ethernet-phy@1 { 78 PHY0: ethernet-phy@1 {
77 device_type = "ethernet-phy"; 79 device_type = "ethernet-phy";
78 compatible = "broadcom,bcm5421"; 80 compatible = "broadcom,bcm5421";
79 interrupts = <4c>; /* GPP 12 */ 81 interrupts = <76>; /* GPP 12 */
80 interrupt-parent = <&/mv64x60/pic>; 82 interrupt-parent = <&PIC>;
81 reg = <1>; 83 reg = <1>;
82 }; 84 };
83 ethernet-phy@3 { 85 PHY1: ethernet-phy@3 {
84 device_type = "ethernet-phy"; 86 device_type = "ethernet-phy";
85 compatible = "broadcom,bcm5421"; 87 compatible = "broadcom,bcm5421";
86 interrupts = <4c>; /* GPP 12 */ 88 interrupts = <76>; /* GPP 12 */
87 interrupt-parent = <&/mv64x60/pic>; 89 interrupt-parent = <&PIC>;
88 reg = <3>; 90 reg = <3>;
89 }; 91 };
90 }; 92 };
91 93
92 ethernet@2000 { 94 ethernet-group@2000 {
93 reg = <2000 2000>; 95 #address-cells = <1>;
94 eth0 { 96 #size-cells = <0>;
97 compatible = "marvell,mv64360-eth-group";
98 reg = <0x2000 0x2000>;
99 ethernet@0 {
95 device_type = "network"; 100 device_type = "network";
96 compatible = "marvell,mv64x60-eth"; 101 compatible = "marvell,mv64360-eth";
97 block-index = <0>; 102 reg = <0>;
98 interrupts = <20>; 103 interrupts = <32>;
99 interrupt-parent = <&/mv64x60/pic>; 104 interrupt-parent = <&PIC>;
100 phy = <&/mv64x60/mdio/ethernet-phy@1>; 105 phy = <&PHY0>;
101 local-mac-address = [ 00 00 00 00 00 00 ]; 106 local-mac-address = [ 00 00 00 00 00 00 ];
102 }; 107 };
103 eth1 { 108 ethernet@1 {
104 device_type = "network"; 109 device_type = "network";
105 compatible = "marvell,mv64x60-eth"; 110 compatible = "marvell,mv64360-eth";
106 block-index = <1>; 111 reg = <1>;
107 interrupts = <21>; 112 interrupts = <33>;
108 interrupt-parent = <&/mv64x60/pic>; 113 interrupt-parent = <&PIC>;
109 phy = <&/mv64x60/mdio/ethernet-phy@3>; 114 phy = <&PHY1>;
110 local-mac-address = [ 00 00 00 00 00 00 ]; 115 local-mac-address = [ 00 00 00 00 00 00 ];
111 }; 116 };
112 }; 117 };
113 118
114 sdma@4000 { 119 SDMA0: sdma@4000 {
115 device_type = "dma"; 120 compatible = "marvell,mv64360-sdma";
116 compatible = "marvell,mv64x60-sdma"; 121 reg = <0x4000 0xc18>;
117 reg = <4000 c18>; 122 virtual-reg = <0xf1004000>;
118 virtual-reg = <f1004000>; 123 interrupts = <36>;
119 interrupt-base = <0>; 124 interrupt-parent = <&PIC>;
120 interrupts = <24>;
121 interrupt-parent = <&/mv64x60/pic>;
122 }; 125 };
123 126
124 sdma@6000 { 127 SDMA1: sdma@6000 {
125 device_type = "dma"; 128 compatible = "marvell,mv64360-sdma";
126 compatible = "marvell,mv64x60-sdma"; 129 reg = <0x6000 0xc18>;
127 reg = <6000 c18>; 130 virtual-reg = <0xf1006000>;
128 virtual-reg = <f1006000>; 131 interrupts = <38>;
129 interrupt-base = <0>; 132 interrupt-parent = <&PIC>;
130 interrupts = <26>;
131 interrupt-parent = <&/mv64x60/pic>;
132 }; 133 };
133 134
134 brg@b200 { 135 BRG0: brg@b200 {
135 compatible = "marvell,mv64x60-brg"; 136 compatible = "marvell,mv64360-brg";
136 reg = <b200 8>; 137 reg = <0xb200 0x8>;
137 clock-src = <8>; 138 clock-src = <8>;
138 clock-frequency = <7ed6b40>; 139 clock-frequency = <133333333>;
139 current-speed = <2580>; 140 current-speed = <9600>;
140 bcr = <0>;
141 }; 141 };
142 142
143 brg@b208 { 143 BRG1: brg@b208 {
144 compatible = "marvell,mv64x60-brg"; 144 compatible = "marvell,mv64360-brg";
145 reg = <b208 8>; 145 reg = <0xb208 0x8>;
146 clock-src = <8>; 146 clock-src = <8>;
147 clock-frequency = <7ed6b40>; 147 clock-frequency = <133333333>;
148 current-speed = <2580>; 148 current-speed = <9600>;
149 bcr = <0>;
150 }; 149 };
151 150
152 cunit@f200 { 151 CUNIT: cunit@f200 {
153 reg = <f200 200>; 152 reg = <0xf200 0x200>;
154 }; 153 };
155 154
156 mpscrouting@b400 { 155 MPSCROUTING: mpscrouting@b400 {
157 reg = <b400 c>; 156 reg = <0xb400 0xc>;
158 }; 157 };
159 158
160 mpscintr@b800 { 159 MPSCINTR: mpscintr@b800 {
161 reg = <b800 100>; 160 reg = <0xb800 0x100>;
162 virtual-reg = <f100b800>; 161 virtual-reg = <0xf100b800>;
163 }; 162 };
164 163
165 mpsc@8000 { 164 MPSC0: mpsc@8000 {
166 device_type = "serial"; 165 device_type = "serial";
167 compatible = "marvell,mpsc"; 166 compatible = "marvell,mv64360-mpsc";
168 reg = <8000 38>; 167 reg = <0x8000 0x38>;
169 virtual-reg = <f1008000>; 168 virtual-reg = <0xf1008000>;
170 sdma = <&/mv64x60/sdma@4000>; 169 sdma = <&SDMA0>;
171 brg = <&/mv64x60/brg@b200>; 170 brg = <&BRG0>;
172 cunit = <&/mv64x60/cunit@f200>; 171 cunit = <&CUNIT>;
173 mpscrouting = <&/mv64x60/mpscrouting@b400>; 172 mpscrouting = <&MPSCROUTING>;
174 mpscintr = <&/mv64x60/mpscintr@b800>; 173 mpscintr = <&MPSCINTR>;
175 block-index = <0>; 174 cell-index = <0>;
176 max_idle = <28>; 175 interrupts = <40>;
177 chr_1 = <0>; 176 interrupt-parent = <&PIC>;
178 chr_2 = <0>;
179 chr_10 = <3>;
180 mpcr = <0>;
181 interrupts = <28>;
182 interrupt-parent = <&/mv64x60/pic>;
183 }; 177 };
184 178
185 mpsc@9000 { 179 MPSC1: mpsc@9000 {
186 device_type = "serial"; 180 device_type = "serial";
187 compatible = "marvell,mpsc"; 181 compatible = "marvell,mv64360-mpsc";
188 reg = <9000 38>; 182 reg = <0x9000 0x38>;
189 virtual-reg = <f1009000>; 183 virtual-reg = <0xf1009000>;
190 sdma = <&/mv64x60/sdma@6000>; 184 sdma = <&SDMA1>;
191 brg = <&/mv64x60/brg@b208>; 185 brg = <&BRG1>;
192 cunit = <&/mv64x60/cunit@f200>; 186 cunit = <&CUNIT>;
193 mpscrouting = <&/mv64x60/mpscrouting@b400>; 187 mpscrouting = <&MPSCROUTING>;
194 mpscintr = <&/mv64x60/mpscintr@b800>; 188 mpscintr = <&MPSCINTR>;
195 block-index = <1>; 189 cell-index = <1>;
196 max_idle = <28>; 190 interrupts = <42>;
197 chr_1 = <0>; 191 interrupt-parent = <&PIC>;
198 chr_2 = <0>;
199 chr_10 = <3>;
200 mpcr = <0>;
201 interrupts = <2a>;
202 interrupt-parent = <&/mv64x60/pic>;
203 }; 192 };
204 193
205 wdt@b410 { /* watchdog timer */ 194 wdt@b410 { /* watchdog timer */
206 compatible = "marvell,mv64x60-wdt"; 195 compatible = "marvell,mv64360-wdt";
207 reg = <b410 8>; 196 reg = <0xb410 0x8>;
208 timeout = <a>; /* wdt timeout in seconds */
209 }; 197 };
210 198
211 i2c@c000 { 199 i2c@c000 {
212 device_type = "i2c"; 200 device_type = "i2c";
213 compatible = "marvell,mv64x60-i2c"; 201 compatible = "marvell,mv64360-i2c";
214 reg = <c000 20>; 202 reg = <0xc000 0x20>;
215 virtual-reg = <f100c000>; 203 virtual-reg = <0xf100c000>;
216 freq_m = <8>; 204 interrupts = <37>;
217 freq_n = <3>; 205 interrupt-parent = <&PIC>;
218 timeout = <3e8>; /* 1000 = 1 second */
219 retries = <1>;
220 interrupts = <25>;
221 interrupt-parent = <&/mv64x60/pic>;
222 }; 206 };
223 207
224 pic { 208 PIC: pic {
225 #interrupt-cells = <1>; 209 #interrupt-cells = <1>;
226 #address-cells = <0>; 210 #address-cells = <0>;
227 compatible = "marvell,mv64x60-pic"; 211 compatible = "marvell,mv64360-pic";
228 reg = <0000 88>; 212 reg = <0x0 0x88>;
229 interrupt-controller; 213 interrupt-controller;
230 }; 214 };
231 215
232 mpp@f000 { 216 mpp@f000 {
233 compatible = "marvell,mv64x60-mpp"; 217 compatible = "marvell,mv64360-mpp";
234 reg = <f000 10>; 218 reg = <0xf000 0x10>;
235 }; 219 };
236 220
237 gpp@f100 { 221 gpp@f100 {
238 compatible = "marvell,mv64x60-gpp"; 222 compatible = "marvell,mv64360-gpp";
239 reg = <f100 20>; 223 reg = <0xf100 0x20>;
240 }; 224 };
241 225
242 pci@80000000 { 226 pci@80000000 {
@@ -244,73 +228,75 @@
244 #size-cells = <2>; 228 #size-cells = <2>;
245 #interrupt-cells = <1>; 229 #interrupt-cells = <1>;
246 device_type = "pci"; 230 device_type = "pci";
247 compatible = "marvell,mv64x60-pci"; 231 compatible = "marvell,mv64360-pci";
248 reg = <0cf8 8>; 232 reg = <0xcf8 0x8>;
249 ranges = <01000000 0 0 88000000 0 01000000 233 ranges = <0x01000000 0x0 0x0
250 02000000 0 80000000 80000000 0 08000000>; 234 0x88000000 0x0 0x01000000
251 bus-range = <0 ff>; 235 0x02000000 0x0 0x80000000
252 clock-frequency = <3EF1480>; 236 0x80000000 0x0 0x08000000>;
253 interrupt-pci-iack = <0c34>; 237 bus-range = <0 255>;
254 interrupt-parent = <&/mv64x60/pic>; 238 clock-frequency = <66000000>;
255 interrupt-map-mask = <f800 0 0 7>; 239 interrupt-pci-iack = <0xc34>;
240 interrupt-parent = <&PIC>;
241 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
256 interrupt-map = < 242 interrupt-map = <
257 /* IDSEL 0x0a */ 243 /* IDSEL 0x0a */
258 5000 0 0 1 &/mv64x60/pic 50 244 0x5000 0 0 1 &PIC 80
259 5000 0 0 2 &/mv64x60/pic 51 245 0x5000 0 0 2 &PIC 81
260 5000 0 0 3 &/mv64x60/pic 5b 246 0x5000 0 0 3 &PIC 91
261 5000 0 0 4 &/mv64x60/pic 5d 247 0x5000 0 0 4 &PIC 93
262 248
263 /* IDSEL 0x0b */ 249 /* IDSEL 0x0b */
264 5800 0 0 1 &/mv64x60/pic 5b 250 0x5800 0 0 1 &PIC 91
265 5800 0 0 2 &/mv64x60/pic 5d 251 0x5800 0 0 2 &PIC 93
266 5800 0 0 3 &/mv64x60/pic 50 252 0x5800 0 0 3 &PIC 80
267 5800 0 0 4 &/mv64x60/pic 51 253 0x5800 0 0 4 &PIC 81
268 254
269 /* IDSEL 0x0c */ 255 /* IDSEL 0x0c */
270 6000 0 0 1 &/mv64x60/pic 5b 256 0x6000 0 0 1 &PIC 91
271 6000 0 0 2 &/mv64x60/pic 5d 257 0x6000 0 0 2 &PIC 93
272 6000 0 0 3 &/mv64x60/pic 50 258 0x6000 0 0 3 &PIC 80
273 6000 0 0 4 &/mv64x60/pic 51 259 0x6000 0 0 4 &PIC 81
274 260
275 /* IDSEL 0x0d */ 261 /* IDSEL 0x0d */
276 6800 0 0 1 &/mv64x60/pic 5d 262 0x6800 0 0 1 &PIC 93
277 6800 0 0 2 &/mv64x60/pic 50 263 0x6800 0 0 2 &PIC 80
278 6800 0 0 3 &/mv64x60/pic 51 264 0x6800 0 0 3 &PIC 81
279 6800 0 0 4 &/mv64x60/pic 5b 265 0x6800 0 0 4 &PIC 91
280 >; 266 >;
281 }; 267 };
282 268
283 cpu-error@0070 { 269 cpu-error@0070 {
284 compatible = "marvell,mv64x60-cpu-error"; 270 compatible = "marvell,mv64360-cpu-error";
285 reg = <0070 10 0128 28>; 271 reg = <0x70 0x10 0x128 0x28>;
286 interrupts = <03>; 272 interrupts = <3>;
287 interrupt-parent = <&/mv64x60/pic>; 273 interrupt-parent = <&PIC>;
288 }; 274 };
289 275
290 sram-ctrl@0380 { 276 sram-ctrl@0380 {
291 compatible = "marvell,mv64x60-sram-ctrl"; 277 compatible = "marvell,mv64360-sram-ctrl";
292 reg = <0380 80>; 278 reg = <0x380 0x80>;
293 interrupts = <0d>; 279 interrupts = <13>;
294 interrupt-parent = <&/mv64x60/pic>; 280 interrupt-parent = <&PIC>;
295 }; 281 };
296 282
297 pci-error@1d40 { 283 pci-error@1d40 {
298 compatible = "marvell,mv64x60-pci-error"; 284 compatible = "marvell,mv64360-pci-error";
299 reg = <1d40 40 0c28 4>; 285 reg = <0x1d40 0x40 0xc28 0x4>;
300 interrupts = <0c>; 286 interrupts = <12>;
301 interrupt-parent = <&/mv64x60/pic>; 287 interrupt-parent = <&PIC>;
302 }; 288 };
303 289
304 mem-ctrl@1400 { 290 mem-ctrl@1400 {
305 compatible = "marvell,mv64x60-mem-ctrl"; 291 compatible = "marvell,mv64360-mem-ctrl";
306 reg = <1400 60>; 292 reg = <0x1400 0x60>;
307 interrupts = <11>; 293 interrupts = <17>;
308 interrupt-parent = <&/mv64x60/pic>; 294 interrupt-parent = <&PIC>;
309 }; 295 };
310 }; 296 };
311 297
312 chosen { 298 chosen {
313 bootargs = "ip=on"; 299 bootargs = "ip=on";
314 linux,stdout-path = "/mv64x60@f1000000/mpsc@8000"; 300 linux,stdout-path = &MPSC0;
315 }; 301 };
316}; 302};
diff --git a/arch/powerpc/boot/dts/rainier.dts b/arch/powerpc/boot/dts/rainier.dts
index f947c75a2e94..6a8fa7089ea2 100644
--- a/arch/powerpc/boot/dts/rainier.dts
+++ b/arch/powerpc/boot/dts/rainier.dts
@@ -254,7 +254,6 @@
254 }; 254 };
255 255
256 EMAC0: ethernet@ef600e00 { 256 EMAC0: ethernet@ef600e00 {
257 linux,network-index = <0>;
258 device_type = "network"; 257 device_type = "network";
259 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; 258 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
260 interrupt-parent = <&EMAC0>; 259 interrupt-parent = <&EMAC0>;
@@ -270,7 +269,7 @@
270 mal-tx-channel = <0>; 269 mal-tx-channel = <0>;
271 mal-rx-channel = <0>; 270 mal-rx-channel = <0>;
272 cell-index = <0>; 271 cell-index = <0>;
273 max-frame-size = <5dc>; 272 max-frame-size = <2328>;
274 rx-fifo-size = <1000>; 273 rx-fifo-size = <1000>;
275 tx-fifo-size = <800>; 274 tx-fifo-size = <800>;
276 phy-mode = "rgmii"; 275 phy-mode = "rgmii";
@@ -284,7 +283,6 @@
284 }; 283 };
285 284
286 EMAC1: ethernet@ef600f00 { 285 EMAC1: ethernet@ef600f00 {
287 linux,network-index = <1>;
288 device_type = "network"; 286 device_type = "network";
289 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; 287 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
290 interrupt-parent = <&EMAC1>; 288 interrupt-parent = <&EMAC1>;
@@ -300,7 +298,7 @@
300 mal-tx-channel = <1>; 298 mal-tx-channel = <1>;
301 mal-rx-channel = <1>; 299 mal-rx-channel = <1>;
302 cell-index = <1>; 300 cell-index = <1>;
303 max-frame-size = <5dc>; 301 max-frame-size = <2328>;
304 rx-fifo-size = <1000>; 302 rx-fifo-size = <1000>;
305 tx-fifo-size = <800>; 303 tx-fifo-size = <800>;
306 phy-mode = "rgmii"; 304 phy-mode = "rgmii";
diff --git a/arch/powerpc/boot/dts/sbc8641d.dts b/arch/powerpc/boot/dts/sbc8641d.dts
new file mode 100644
index 000000000000..3eebeec157b3
--- /dev/null
+++ b/arch/powerpc/boot/dts/sbc8641d.dts
@@ -0,0 +1,352 @@
1/*
2 * SBC8641D Device Tree Source
3 *
4 * Copyright 2008 Wind River Systems Inc.
5 *
6 * Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the mpc8641_hpcn.dts by Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16/dts-v1/;
17
18/ {
19 model = "SBC8641D";
20 compatible = "wind,sbc8641";
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 aliases {
25 ethernet0 = &enet0;
26 ethernet1 = &enet1;
27 ethernet2 = &enet2;
28 ethernet3 = &enet3;
29 serial0 = &serial0;
30 serial1 = &serial1;
31 pci0 = &pci0;
32 pci1 = &pci1;
33 };
34
35 cpus {
36 #address-cells = <1>;
37 #size-cells = <0>;
38
39 PowerPC,8641@0 {
40 device_type = "cpu";
41 reg = <0>;
42 d-cache-line-size = <32>;
43 i-cache-line-size = <32>;
44 d-cache-size = <32768>; // L1
45 i-cache-size = <32768>; // L1
46 timebase-frequency = <0>; // From uboot
47 bus-frequency = <0>; // From uboot
48 clock-frequency = <0>; // From uboot
49 };
50 PowerPC,8641@1 {
51 device_type = "cpu";
52 reg = <1>;
53 d-cache-line-size = <32>;
54 i-cache-line-size = <32>;
55 d-cache-size = <32768>;
56 i-cache-size = <32768>;
57 timebase-frequency = <0>; // From uboot
58 bus-frequency = <0>; // From uboot
59 clock-frequency = <0>; // From uboot
60 };
61 };
62
63 memory {
64 device_type = "memory";
65 reg = <0x00000000 0x20000000>; // 512M at 0x0
66 };
67
68 localbus@f8005000 {
69 #address-cells = <2>;
70 #size-cells = <1>;
71 compatible = "fsl,mpc8641-localbus", "simple-bus";
72 reg = <0xf8005000 0x1000>;
73 interrupts = <19 2>;
74 interrupt-parent = <&mpic>;
75
76 ranges = <0 0 0xff000000 0x01000000 // 16MB Boot flash
77 1 0 0xf0000000 0x00010000 // 64KB EEPROM
78 2 0 0xf1000000 0x00100000 // EPLD (1MB)
79 3 0 0xe0000000 0x04000000 // 64MB LB SDRAM (CS3)
80 4 0 0xe4000000 0x04000000 // 64MB LB SDRAM (CS4)
81 6 0 0xf4000000 0x00100000 // LCD display (1MB)
82 7 0 0xe8000000 0x04000000>; // 64MB OneNAND
83
84 flash@0,0 {
85 compatible = "cfi-flash";
86 reg = <0 0 0x01000000>;
87 bank-width = <2>;
88 device-width = <2>;
89 #address-cells = <1>;
90 #size-cells = <1>;
91 partition@0 {
92 label = "dtb";
93 reg = <0x00000000 0x00100000>;
94 read-only;
95 };
96 partition@300000 {
97 label = "kernel";
98 reg = <0x00100000 0x00400000>;
99 read-only;
100 };
101 partition@400000 {
102 label = "fs";
103 reg = <0x00500000 0x00a00000>;
104 };
105 partition@700000 {
106 label = "firmware";
107 reg = <0x00f00000 0x00100000>;
108 read-only;
109 };
110 };
111
112 epld@2,0 {
113 compatible = "wrs,epld-localbus";
114 #address-cells = <2>;
115 #size-cells = <1>;
116 reg = <2 0 0x100000>;
117 ranges = <0 0 5 0 1 // User switches
118 1 0 5 1 1 // Board ID/Rev
119 3 0 5 3 1>; // LEDs
120 };
121 };
122
123 soc@f8000000 {
124 #address-cells = <1>;
125 #size-cells = <1>;
126 device_type = "soc";
127 compatible = "simple-bus";
128 ranges = <0x00000000 0xf8000000 0x00100000>;
129 reg = <0xf8000000 0x00001000>; // CCSRBAR
130 bus-frequency = <0>;
131
132 i2c@3000 {
133 #address-cells = <1>;
134 #size-cells = <0>;
135 cell-index = <0>;
136 compatible = "fsl-i2c";
137 reg = <0x3000 0x100>;
138 interrupts = <43 2>;
139 interrupt-parent = <&mpic>;
140 dfsrr;
141 };
142
143 i2c@3100 {
144 #address-cells = <1>;
145 #size-cells = <0>;
146 cell-index = <1>;
147 compatible = "fsl-i2c";
148 reg = <0x3100 0x100>;
149 interrupts = <43 2>;
150 interrupt-parent = <&mpic>;
151 dfsrr;
152 };
153
154 mdio@24520 {
155 #address-cells = <1>;
156 #size-cells = <0>;
157 compatible = "fsl,gianfar-mdio";
158 reg = <0x24520 0x20>;
159
160 phy0: ethernet-phy@1f {
161 interrupt-parent = <&mpic>;
162 interrupts = <10 1>;
163 reg = <0x1f>;
164 device_type = "ethernet-phy";
165 };
166 phy1: ethernet-phy@0 {
167 interrupt-parent = <&mpic>;
168 interrupts = <10 1>;
169 reg = <0>;
170 device_type = "ethernet-phy";
171 };
172 phy2: ethernet-phy@1 {
173 interrupt-parent = <&mpic>;
174 interrupts = <10 1>;
175 reg = <1>;
176 device_type = "ethernet-phy";
177 };
178 phy3: ethernet-phy@2 {
179 interrupt-parent = <&mpic>;
180 interrupts = <10 1>;
181 reg = <2>;
182 device_type = "ethernet-phy";
183 };
184 };
185
186 enet0: ethernet@24000 {
187 cell-index = <0>;
188 device_type = "network";
189 model = "TSEC";
190 compatible = "gianfar";
191 reg = <0x24000 0x1000>;
192 local-mac-address = [ 00 00 00 00 00 00 ];
193 interrupts = <29 2 30 2 34 2>;
194 interrupt-parent = <&mpic>;
195 phy-handle = <&phy0>;
196 phy-connection-type = "rgmii-id";
197 };
198
199 enet1: ethernet@25000 {
200 cell-index = <1>;
201 device_type = "network";
202 model = "TSEC";
203 compatible = "gianfar";
204 reg = <0x25000 0x1000>;
205 local-mac-address = [ 00 00 00 00 00 00 ];
206 interrupts = <35 2 36 2 40 2>;
207 interrupt-parent = <&mpic>;
208 phy-handle = <&phy1>;
209 phy-connection-type = "rgmii-id";
210 };
211
212 enet2: ethernet@26000 {
213 cell-index = <2>;
214 device_type = "network";
215 model = "TSEC";
216 compatible = "gianfar";
217 reg = <0x26000 0x1000>;
218 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <31 2 32 2 33 2>;
220 interrupt-parent = <&mpic>;
221 phy-handle = <&phy2>;
222 phy-connection-type = "rgmii-id";
223 };
224
225 enet3: ethernet@27000 {
226 cell-index = <3>;
227 device_type = "network";
228 model = "TSEC";
229 compatible = "gianfar";
230 reg = <0x27000 0x1000>;
231 local-mac-address = [ 00 00 00 00 00 00 ];
232 interrupts = <37 2 38 2 39 2>;
233 interrupt-parent = <&mpic>;
234 phy-handle = <&phy3>;
235 phy-connection-type = "rgmii-id";
236 };
237
238 serial0: serial@4500 {
239 cell-index = <0>;
240 device_type = "serial";
241 compatible = "ns16550";
242 reg = <0x4500 0x100>;
243 clock-frequency = <0>;
244 interrupts = <42 2>;
245 interrupt-parent = <&mpic>;
246 };
247
248 serial1: serial@4600 {
249 cell-index = <1>;
250 device_type = "serial";
251 compatible = "ns16550";
252 reg = <0x4600 0x100>;
253 clock-frequency = <0>;
254 interrupts = <28 2>;
255 interrupt-parent = <&mpic>;
256 };
257
258 mpic: pic@40000 {
259 clock-frequency = <0>;
260 interrupt-controller;
261 #address-cells = <0>;
262 #interrupt-cells = <2>;
263 reg = <0x40000 0x40000>;
264 compatible = "chrp,open-pic";
265 device_type = "open-pic";
266 big-endian;
267 };
268
269 global-utilities@e0000 {
270 compatible = "fsl,mpc8641-guts";
271 reg = <0xe0000 0x1000>;
272 fsl,has-rstcr;
273 };
274 };
275
276 pci0: pcie@f8008000 {
277 cell-index = <0>;
278 compatible = "fsl,mpc8641-pcie";
279 device_type = "pci";
280 #interrupt-cells = <1>;
281 #size-cells = <2>;
282 #address-cells = <3>;
283 reg = <0xf8008000 0x1000>;
284 bus-range = <0x0 0xff>;
285 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000
286 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
287 clock-frequency = <33333333>;
288 interrupt-parent = <&mpic>;
289 interrupts = <24 2>;
290 interrupt-map-mask = <0xff00 0 0 7>;
291 interrupt-map = <
292 /* IDSEL 0x0 */
293 0x0000 0 0 1 &mpic 0 1
294 0x0000 0 0 2 &mpic 1 1
295 0x0000 0 0 3 &mpic 2 1
296 0x0000 0 0 4 &mpic 3 1
297 >;
298
299 pcie@0 {
300 reg = <0 0 0 0 0>;
301 #size-cells = <2>;
302 #address-cells = <3>;
303 device_type = "pci";
304 ranges = <0x02000000 0x0 0x80000000
305 0x02000000 0x0 0x80000000
306 0x0 0x20000000
307
308 0x01000000 0x0 0x00000000
309 0x01000000 0x0 0x00000000
310 0x0 0x00100000>;
311 };
312
313 };
314
315 pci1: pcie@f8009000 {
316 cell-index = <1>;
317 compatible = "fsl,mpc8641-pcie";
318 device_type = "pci";
319 #interrupt-cells = <1>;
320 #size-cells = <2>;
321 #address-cells = <3>;
322 reg = <0xf8009000 0x1000>;
323 bus-range = <0 0xff>;
324 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
325 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>;
326 clock-frequency = <33333333>;
327 interrupt-parent = <&mpic>;
328 interrupts = <25 2>;
329 interrupt-map-mask = <0xf800 0 0 7>;
330 interrupt-map = <
331 /* IDSEL 0x0 */
332 0x0000 0 0 1 &mpic 4 1
333 0x0000 0 0 2 &mpic 5 1
334 0x0000 0 0 3 &mpic 6 1
335 0x0000 0 0 4 &mpic 7 1
336 >;
337
338 pcie@0 {
339 reg = <0 0 0 0 0>;
340 #size-cells = <2>;
341 #address-cells = <3>;
342 device_type = "pci";
343 ranges = <0x02000000 0x0 0xa0000000
344 0x02000000 0x0 0xa0000000
345 0x0 0x20000000
346
347 0x01000000 0x0 0x00000000
348 0x01000000 0x0 0x00000000
349 0x0 0x00100000>;
350 };
351 };
352};
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 8db9515d7dc3..a1ae4d6ec990 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -269,7 +269,6 @@
269 }; 269 };
270 270
271 EMAC0: ethernet@ef600e00 { 271 EMAC0: ethernet@ef600e00 {
272 linux,network-index = <0>;
273 device_type = "network"; 272 device_type = "network";
274 compatible = "ibm,emac-440epx", "ibm,emac4"; 273 compatible = "ibm,emac-440epx", "ibm,emac4";
275 interrupt-parent = <&EMAC0>; 274 interrupt-parent = <&EMAC0>;
@@ -285,7 +284,7 @@
285 mal-tx-channel = <0>; 284 mal-tx-channel = <0>;
286 mal-rx-channel = <0>; 285 mal-rx-channel = <0>;
287 cell-index = <0>; 286 cell-index = <0>;
288 max-frame-size = <5dc>; 287 max-frame-size = <2328>;
289 rx-fifo-size = <1000>; 288 rx-fifo-size = <1000>;
290 tx-fifo-size = <800>; 289 tx-fifo-size = <800>;
291 phy-mode = "rgmii"; 290 phy-mode = "rgmii";
@@ -299,7 +298,6 @@
299 }; 298 };
300 299
301 EMAC1: ethernet@ef600f00 { 300 EMAC1: ethernet@ef600f00 {
302 linux,network-index = <1>;
303 device_type = "network"; 301 device_type = "network";
304 compatible = "ibm,emac-440epx", "ibm,emac4"; 302 compatible = "ibm,emac-440epx", "ibm,emac4";
305 interrupt-parent = <&EMAC1>; 303 interrupt-parent = <&EMAC1>;
@@ -315,7 +313,7 @@
315 mal-tx-channel = <1>; 313 mal-tx-channel = <1>;
316 mal-rx-channel = <1>; 314 mal-rx-channel = <1>;
317 cell-index = <1>; 315 cell-index = <1>;
318 max-frame-size = <5dc>; 316 max-frame-size = <2328>;
319 rx-fifo-size = <1000>; 317 rx-fifo-size = <1000>;
320 tx-fifo-size = <800>; 318 tx-fifo-size = <800>;
321 phy-mode = "rgmii"; 319 phy-mode = "rgmii";
diff --git a/arch/powerpc/boot/dts/taishan.dts b/arch/powerpc/boot/dts/taishan.dts
index 8278068c802c..e808e1c5593a 100644
--- a/arch/powerpc/boot/dts/taishan.dts
+++ b/arch/powerpc/boot/dts/taishan.dts
@@ -104,6 +104,16 @@
104 // FIXME: anything else? 104 // FIXME: anything else?
105 }; 105 };
106 106
107 L2C0: l2c {
108 compatible = "ibm,l2-cache-440gx", "ibm,l2-cache";
109 dcr-reg = <20 8 /* Internal SRAM DCR's */
110 30 8>; /* L2 cache DCR's */
111 cache-line-size = <20>; /* 32 bytes */
112 cache-size = <40000>; /* L2, 256K */
113 interrupt-parent = <&UIC2>;
114 interrupts = <17 1>;
115 };
116
107 plb { 117 plb {
108 compatible = "ibm,plb-440gx", "ibm,plb4"; 118 compatible = "ibm,plb-440gx", "ibm,plb4";
109 #address-cells = <2>; 119 #address-cells = <2>;
@@ -232,10 +242,18 @@
232 reg = <40000790 8>; 242 reg = <40000790 8>;
233 }; 243 };
234 244
245 TAH0: emac-tah@40000b50 {
246 compatible = "ibm,tah-440gx", "ibm,tah";
247 reg = <40000b50 30>;
248 };
249
250 TAH1: emac-tah@40000d50 {
251 compatible = "ibm,tah-440gx", "ibm,tah";
252 reg = <40000d50 30>;
253 };
235 254
236 EMAC0: ethernet@40000800 { 255 EMAC0: ethernet@40000800 {
237 unused = <1>; 256 unused = <1>;
238 linux,network-index = <2>;
239 device_type = "network"; 257 device_type = "network";
240 compatible = "ibm,emac-440gx", "ibm,emac4"; 258 compatible = "ibm,emac-440gx", "ibm,emac4";
241 interrupt-parent = <&UIC1>; 259 interrupt-parent = <&UIC1>;
@@ -256,7 +274,6 @@
256 }; 274 };
257 EMAC1: ethernet@40000900 { 275 EMAC1: ethernet@40000900 {
258 unused = <1>; 276 unused = <1>;
259 linux,network-index = <3>;
260 device_type = "network"; 277 device_type = "network";
261 compatible = "ibm,emac-440gx", "ibm,emac4"; 278 compatible = "ibm,emac-440gx", "ibm,emac4";
262 interrupt-parent = <&UIC1>; 279 interrupt-parent = <&UIC1>;
@@ -277,7 +294,6 @@
277 }; 294 };
278 295
279 EMAC2: ethernet@40000c00 { 296 EMAC2: ethernet@40000c00 {
280 linux,network-index = <0>;
281 device_type = "network"; 297 device_type = "network";
282 compatible = "ibm,emac-440gx", "ibm,emac4"; 298 compatible = "ibm,emac-440gx", "ibm,emac4";
283 interrupt-parent = <&UIC2>; 299 interrupt-parent = <&UIC2>;
@@ -288,7 +304,7 @@
288 mal-tx-channel = <2>; 304 mal-tx-channel = <2>;
289 mal-rx-channel = <2>; 305 mal-rx-channel = <2>;
290 cell-index = <2>; 306 cell-index = <2>;
291 max-frame-size = <5dc>; 307 max-frame-size = <2328>;
292 rx-fifo-size = <1000>; 308 rx-fifo-size = <1000>;
293 tx-fifo-size = <800>; 309 tx-fifo-size = <800>;
294 phy-mode = "rgmii"; 310 phy-mode = "rgmii";
@@ -297,10 +313,11 @@
297 rgmii-channel = <0>; 313 rgmii-channel = <0>;
298 zmii-device = <&ZMII0>; 314 zmii-device = <&ZMII0>;
299 zmii-channel = <2>; 315 zmii-channel = <2>;
316 tah-device = <&TAH0>;
317 tah-channel = <0>;
300 }; 318 };
301 319
302 EMAC3: ethernet@40000e00 { 320 EMAC3: ethernet@40000e00 {
303 linux,network-index = <1>;
304 device_type = "network"; 321 device_type = "network";
305 compatible = "ibm,emac-440gx", "ibm,emac4"; 322 compatible = "ibm,emac-440gx", "ibm,emac4";
306 interrupt-parent = <&UIC2>; 323 interrupt-parent = <&UIC2>;
@@ -311,7 +328,7 @@
311 mal-tx-channel = <3>; 328 mal-tx-channel = <3>;
312 mal-rx-channel = <3>; 329 mal-rx-channel = <3>;
313 cell-index = <3>; 330 cell-index = <3>;
314 max-frame-size = <5dc>; 331 max-frame-size = <2328>;
315 rx-fifo-size = <1000>; 332 rx-fifo-size = <1000>;
316 tx-fifo-size = <800>; 333 tx-fifo-size = <800>;
317 phy-mode = "rgmii"; 334 phy-mode = "rgmii";
@@ -320,6 +337,8 @@
320 rgmii-channel = <1>; 337 rgmii-channel = <1>;
321 zmii-device = <&ZMII0>; 338 zmii-device = <&ZMII0>;
322 zmii-channel = <3>; 339 zmii-channel = <3>;
340 tah-device = <&TAH1>;
341 tah-channel = <0>;
323 }; 342 };
324 343
325 344
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts
index dcc21b0438e5..a328607c8f84 100644
--- a/arch/powerpc/boot/dts/walnut.dts
+++ b/arch/powerpc/boot/dts/walnut.dts
@@ -125,7 +125,6 @@
125 }; 125 };
126 126
127 EMAC: ethernet@ef600800 { 127 EMAC: ethernet@ef600800 {
128 linux,network-index = <0>;
129 device_type = "network"; 128 device_type = "network";
130 compatible = "ibm,emac-405gp", "ibm,emac"; 129 compatible = "ibm,emac-405gp", "ibm,emac";
131 interrupt-parent = <&UIC0>; 130 interrupt-parent = <&UIC0>;
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts
index dc1499d30f43..b04a52e22bf5 100644
--- a/arch/powerpc/boot/dts/warp.dts
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -204,7 +204,6 @@
204 }; 204 };
205 205
206 EMAC0: ethernet@ef600e00 { 206 EMAC0: ethernet@ef600e00 {
207 linux,network-index = <0>;
208 device_type = "network"; 207 device_type = "network";
209 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; 208 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
210 interrupt-parent = <&UIC1>; 209 interrupt-parent = <&UIC1>;
diff --git a/arch/powerpc/boot/dts/yosemite.dts b/arch/powerpc/boot/dts/yosemite.dts
new file mode 100644
index 000000000000..0d6d332814e0
--- /dev/null
+++ b/arch/powerpc/boot/dts/yosemite.dts
@@ -0,0 +1,304 @@
1/*
2 * Device Tree Source for AMCC Yosemite
3 *
4 * Copyright 2008 IBM Corp.
5 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without
9 * any warranty of any kind, whether express or implied.
10 */
11
12/ {
13 #address-cells = <2>;
14 #size-cells = <1>;
15 model = "amcc,yosemite";
16 compatible = "amcc,yosemite","amcc,bamboo";
17 dcr-parent = <&/cpus/cpu@0>;
18
19 aliases {
20 ethernet0 = &EMAC0;
21 ethernet1 = &EMAC1;
22 serial0 = &UART0;
23 serial1 = &UART1;
24 serial2 = &UART2;
25 serial3 = &UART3;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 cpu@0 {
33 device_type = "cpu";
34 model = "PowerPC,440EP";
35 reg = <0>;
36 clock-frequency = <0>; /* Filled in by zImage */
37 timebase-frequency = <0>; /* Filled in by zImage */
38 i-cache-line-size = <20>;
39 d-cache-line-size = <20>;
40 i-cache-size = <8000>;
41 d-cache-size = <8000>;
42 dcr-controller;
43 dcr-access-method = "native";
44 };
45 };
46
47 memory {
48 device_type = "memory";
49 reg = <0 0 0>; /* Filled in by zImage */
50 };
51
52 UIC0: interrupt-controller0 {
53 compatible = "ibm,uic-440ep","ibm,uic";
54 interrupt-controller;
55 cell-index = <0>;
56 dcr-reg = <0c0 009>;
57 #address-cells = <0>;
58 #size-cells = <0>;
59 #interrupt-cells = <2>;
60 };
61
62 UIC1: interrupt-controller1 {
63 compatible = "ibm,uic-440ep","ibm,uic";
64 interrupt-controller;
65 cell-index = <1>;
66 dcr-reg = <0d0 009>;
67 #address-cells = <0>;
68 #size-cells = <0>;
69 #interrupt-cells = <2>;
70 interrupts = <1e 4 1f 4>; /* cascade */
71 interrupt-parent = <&UIC0>;
72 };
73
74 SDR0: sdr {
75 compatible = "ibm,sdr-440ep";
76 dcr-reg = <00e 002>;
77 };
78
79 CPR0: cpr {
80 compatible = "ibm,cpr-440ep";
81 dcr-reg = <00c 002>;
82 };
83
84 plb {
85 compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
86 #address-cells = <2>;
87 #size-cells = <1>;
88 ranges;
89 clock-frequency = <0>; /* Filled in by zImage */
90
91 SDRAM0: sdram {
92 compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
93 dcr-reg = <010 2>;
94 };
95
96 DMA0: dma {
97 compatible = "ibm,dma-440ep", "ibm,dma-440gp";
98 dcr-reg = <100 027>;
99 };
100
101 MAL0: mcmal {
102 compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal";
103 dcr-reg = <180 62>;
104 num-tx-chans = <4>;
105 num-rx-chans = <2>;
106 interrupt-parent = <&MAL0>;
107 interrupts = <0 1 2 3 4>;
108 #interrupt-cells = <1>;
109 #address-cells = <0>;
110 #size-cells = <0>;
111 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
112 /*RXEOB*/ 1 &UIC0 b 4
113 /*SERR*/ 2 &UIC1 0 4
114 /*TXDE*/ 3 &UIC1 1 4
115 /*RXDE*/ 4 &UIC1 2 4>;
116 };
117
118 POB0: opb {
119 compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
120 #address-cells = <1>;
121 #size-cells = <1>;
122 /* Bamboo is oddball in the 44x world and doesn't use the ERPN
123 * bits.
124 */
125 ranges = <00000000 0 00000000 80000000
126 80000000 0 80000000 80000000>;
127 interrupt-parent = <&UIC1>;
128 interrupts = <7 4>;
129 clock-frequency = <0>; /* Filled in by zImage */
130
131 EBC0: ebc {
132 compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
133 dcr-reg = <012 2>;
134 #address-cells = <2>;
135 #size-cells = <1>;
136 clock-frequency = <0>; /* Filled in by zImage */
137 interrupts = <5 1>;
138 interrupt-parent = <&UIC1>;
139 };
140
141 UART0: serial@ef600300 {
142 device_type = "serial";
143 compatible = "ns16550";
144 reg = <ef600300 8>;
145 virtual-reg = <ef600300>;
146 clock-frequency = <0>; /* Filled in by zImage */
147 current-speed = <1c200>;
148 interrupt-parent = <&UIC0>;
149 interrupts = <0 4>;
150 };
151
152 UART1: serial@ef600400 {
153 device_type = "serial";
154 compatible = "ns16550";
155 reg = <ef600400 8>;
156 virtual-reg = <ef600400>;
157 clock-frequency = <0>;
158 current-speed = <0>;
159 interrupt-parent = <&UIC0>;
160 interrupts = <1 4>;
161 };
162
163 UART2: serial@ef600500 {
164 device_type = "serial";
165 compatible = "ns16550";
166 reg = <ef600500 8>;
167 virtual-reg = <ef600500>;
168 clock-frequency = <0>;
169 current-speed = <0>;
170 interrupt-parent = <&UIC0>;
171 interrupts = <3 4>;
172 status = "disabled";
173 };
174
175 UART3: serial@ef600600 {
176 device_type = "serial";
177 compatible = "ns16550";
178 reg = <ef600600 8>;
179 virtual-reg = <ef600600>;
180 clock-frequency = <0>;
181 current-speed = <0>;
182 interrupt-parent = <&UIC0>;
183 interrupts = <4 4>;
184 status = "disabled";
185 };
186
187 IIC0: i2c@ef600700 {
188 compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
189 reg = <ef600700 14>;
190 interrupt-parent = <&UIC0>;
191 interrupts = <2 4>;
192 };
193
194 IIC1: i2c@ef600800 {
195 compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
196 reg = <ef600800 14>;
197 interrupt-parent = <&UIC0>;
198 interrupts = <7 4>;
199 };
200
201 spi@ef600900 {
202 compatible = "amcc,spi-440ep";
203 reg = <ef600900 6>;
204 interrupts = <8 4>;
205 interrupt-parent = <&UIC0>;
206 };
207
208 ZMII0: emac-zmii@ef600d00 {
209 compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
210 reg = <ef600d00 c>;
211 };
212
213 EMAC0: ethernet@ef600e00 {
214 device_type = "network";
215 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
216 interrupt-parent = <&UIC1>;
217 interrupts = <1c 4 1d 4>;
218 reg = <ef600e00 70>;
219 local-mac-address = [000000000000];
220 mal-device = <&MAL0>;
221 mal-tx-channel = <0 1>;
222 mal-rx-channel = <0>;
223 cell-index = <0>;
224 max-frame-size = <5dc>;
225 rx-fifo-size = <1000>;
226 tx-fifo-size = <800>;
227 phy-mode = "rmii";
228 phy-map = <00000000>;
229 zmii-device = <&ZMII0>;
230 zmii-channel = <0>;
231 };
232
233 EMAC1: ethernet@ef600f00 {
234 device_type = "network";
235 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
236 interrupt-parent = <&UIC1>;
237 interrupts = <1e 4 1f 4>;
238 reg = <ef600f00 70>;
239 local-mac-address = [000000000000];
240 mal-device = <&MAL0>;
241 mal-tx-channel = <2 3>;
242 mal-rx-channel = <1>;
243 cell-index = <1>;
244 max-frame-size = <5dc>;
245 rx-fifo-size = <1000>;
246 tx-fifo-size = <800>;
247 phy-mode = "rmii";
248 phy-map = <00000000>;
249 zmii-device = <&ZMII0>;
250 zmii-channel = <1>;
251 };
252
253 usb@ef601000 {
254 compatible = "ohci-be";
255 reg = <ef601000 80>;
256 interrupts = <8 4 9 4>;
257 interrupt-parent = < &UIC1 >;
258 };
259 };
260
261 PCI0: pci@ec000000 {
262 device_type = "pci";
263 #interrupt-cells = <1>;
264 #size-cells = <2>;
265 #address-cells = <3>;
266 compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
267 primary;
268 reg = <0 eec00000 8 /* Config space access */
269 0 eed00000 4 /* IACK */
270 0 eed00000 4 /* Special cycle */
271 0 ef400000 40>; /* Internal registers */
272
273 /* Outbound ranges, one memory and one IO,
274 * later cannot be changed. Chip supports a second
275 * IO range but we don't use it for now
276 */
277 ranges = <02000000 0 a0000000 0 a0000000 0 20000000
278 01000000 0 00000000 0 e8000000 0 00010000>;
279
280 /* Inbound 2GB range starting at 0 */
281 dma-ranges = <42000000 0 0 0 0 0 80000000>;
282
283 /* Bamboo has all 4 IRQ pins tied together per slot */
284 interrupt-map-mask = <f800 0 0 0>;
285 interrupt-map = <
286 /* IDSEL 1 */
287 0800 0 0 0 &UIC0 1c 8
288
289 /* IDSEL 2 */
290 1000 0 0 0 &UIC0 1b 8
291
292 /* IDSEL 3 */
293 1800 0 0 0 &UIC0 1a 8
294
295 /* IDSEL 4 */
296 2000 0 0 0 &UIC0 19 8
297 >;
298 };
299 };
300
301 chosen {
302 linux,stdout-path = "/plb/opb/serial@ef600300";
303 };
304};
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c
index f61364c47a76..5532ab3221dd 100644
--- a/arch/powerpc/boot/ebony.c
+++ b/arch/powerpc/boot/ebony.c
@@ -75,7 +75,8 @@ static void ebony_fixups(void)
75 75
76 ibm440gp_fixup_clocks(sysclk, 6 * 1843200); 76 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
77 ibm4xx_sdram_fixup_memsize(); 77 ibm4xx_sdram_fixup_memsize();
78 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); 78 dt_fixup_mac_address_by_alias("ethernet0", ebony_mac0);
79 dt_fixup_mac_address_by_alias("ethernet1", ebony_mac1);
79 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 80 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
80 ebony_flashsel_fixup(); 81 ebony_flashsel_fixup();
81} 82}
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c
index 59016bef1391..c541fd8a95d4 100644
--- a/arch/powerpc/boot/libfdt-wrapper.c
+++ b/arch/powerpc/boot/libfdt-wrapper.c
@@ -35,7 +35,7 @@
35#define check_err(err) \ 35#define check_err(err) \
36 ({ \ 36 ({ \
37 if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \ 37 if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \
38 printf("%s():%d %s\n\r", __FUNCTION__, __LINE__, \ 38 printf("%s():%d %s\n\r", __func__, __LINE__, \
39 fdt_strerror(err)); \ 39 fdt_strerror(err)); \
40 if (BAD_ERROR(err)) \ 40 if (BAD_ERROR(err)) \
41 exit(); \ 41 exit(); \
diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c
index 1074626e6a37..d4cb4e4e0938 100644
--- a/arch/powerpc/boot/mpc52xx-psc.c
+++ b/arch/powerpc/boot/mpc52xx-psc.c
@@ -51,14 +51,9 @@ static unsigned char psc_getc(void)
51 51
52int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp) 52int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp)
53{ 53{
54 int n;
55
56 /* Get the base address of the psc registers */ 54 /* Get the base address of the psc registers */
57 n = getprop(devp, "virtual-reg", &psc, sizeof(psc)); 55 if (dt_get_virtual_reg(devp, &psc, 1) < 1)
58 if (n != sizeof(psc)) { 56 return -1;
59 if (!dt_xlate_reg(devp, 0, (void *)&psc, NULL))
60 return -1;
61 }
62 57
63 scdp->open = psc_open; 58 scdp->open = psc_open;
64 scdp->putc = psc_putc; 59 scdp->putc = psc_putc;
diff --git a/arch/powerpc/boot/mpsc.c b/arch/powerpc/boot/mpsc.c
index 802ea53790d8..425ad88cce8d 100644
--- a/arch/powerpc/boot/mpsc.c
+++ b/arch/powerpc/boot/mpsc.c
@@ -141,7 +141,7 @@ int mpsc_console_init(void *devp, struct serial_console_data *scdp)
141 if (mpscintr_base == NULL) 141 if (mpscintr_base == NULL)
142 goto err_out; 142 goto err_out;
143 143
144 n = getprop(devp, "block-index", &v, sizeof(v)); 144 n = getprop(devp, "cell-index", &v, sizeof(v));
145 if (n != sizeof(v)) 145 if (n != sizeof(v))
146 goto err_out; 146 goto err_out;
147 reg_set = (int)v; 147 reg_set = (int)v;
diff --git a/arch/powerpc/boot/mv64x60.c b/arch/powerpc/boot/mv64x60.c
index b43259455d4b..d9bb302b91d2 100644
--- a/arch/powerpc/boot/mv64x60.c
+++ b/arch/powerpc/boot/mv64x60.c
@@ -535,7 +535,7 @@ u8 *mv64x60_get_bridge_pbase(void)
535 u32 v[2]; 535 u32 v[2];
536 void *devp; 536 void *devp;
537 537
538 devp = finddevice("/mv64x60"); 538 devp = find_node_by_compatible(NULL, "marvell,mv64360");
539 if (devp == NULL) 539 if (devp == NULL)
540 goto err_out; 540 goto err_out;
541 if (getprop(devp, "reg", v, sizeof(v)) != sizeof(v)) 541 if (getprop(devp, "reg", v, sizeof(v)) != sizeof(v))
@@ -553,7 +553,7 @@ u8 *mv64x60_get_bridge_base(void)
553 u32 v; 553 u32 v;
554 void *devp; 554 void *devp;
555 555
556 devp = finddevice("/mv64x60"); 556 devp = find_node_by_compatible(NULL, "marvell,mv64360");
557 if (devp == NULL) 557 if (devp == NULL)
558 goto err_out; 558 goto err_out;
559 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) 559 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v))
diff --git a/arch/powerpc/boot/mv64x60_i2c.c b/arch/powerpc/boot/mv64x60_i2c.c
index d085377be3bc..52a3212b6638 100644
--- a/arch/powerpc/boot/mv64x60_i2c.c
+++ b/arch/powerpc/boot/mv64x60_i2c.c
@@ -185,7 +185,7 @@ int mv64x60_i2c_open(void)
185 u32 v; 185 u32 v;
186 void *devp; 186 void *devp;
187 187
188 devp = finddevice("/mv64x60/i2c"); 188 devp = find_node_by_compatible(NULL, "marvell,mv64360-i2c");
189 if (devp == NULL) 189 if (devp == NULL)
190 goto err_out; 190 goto err_out;
191 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) 191 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v))
diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
index f8f1b2f31412..aef3bdc89160 100644
--- a/arch/powerpc/boot/ns16550.c
+++ b/arch/powerpc/boot/ns16550.c
@@ -55,15 +55,9 @@ static u8 ns16550_tstc(void)
55int ns16550_console_init(void *devp, struct serial_console_data *scdp) 55int ns16550_console_init(void *devp, struct serial_console_data *scdp)
56{ 56{
57 int n; 57 int n;
58 unsigned long reg_phys;
59 58
60 n = getprop(devp, "virtual-reg", &reg_base, sizeof(reg_base)); 59 if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1)
61 if (n != sizeof(reg_base)) { 60 return -1;
62 if (!dt_xlate_reg(devp, 0, &reg_phys, NULL))
63 return -1;
64
65 reg_base = (void *)reg_phys;
66 }
67 61
68 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift)); 62 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift));
69 if (n != sizeof(reg_shift)) 63 if (n != sizeof(reg_shift))
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 4b0544b03c64..321e2f5afe71 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -95,6 +95,7 @@ int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size);
95int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); 95int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr);
96int dt_is_compatible(void *node, const char *compat); 96int dt_is_compatible(void *node, const char *compat);
97void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize); 97void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize);
98int dt_get_virtual_reg(void *node, void **addr, int nres);
98 99
99static inline void *finddevice(const char *name) 100static inline void *finddevice(const char *name)
100{ 101{
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 05c3245b30d7..da31d6030482 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -344,20 +344,20 @@ static void prpmc2800_bridge_setup(u32 mem_size)
344 acc_bits); 344 acc_bits);
345 345
346 /* Get the cpu -> pci i/o & mem mappings from the device tree */ 346 /* Get the cpu -> pci i/o & mem mappings from the device tree */
347 devp = finddevice("/mv64x60/pci@80000000"); 347 devp = find_node_by_compatible(NULL, "marvell,mv64360-pci");
348 if (devp == NULL) 348 if (devp == NULL)
349 fatal("Error: Missing /mv64x60/pci@80000000" 349 fatal("Error: Missing marvell,mv64360-pci"
350 " device tree node\n\r"); 350 " device tree node\n\r");
351 351
352 rc = getprop(devp, "ranges", v, sizeof(v)); 352 rc = getprop(devp, "ranges", v, sizeof(v));
353 if (rc != sizeof(v)) 353 if (rc != sizeof(v))
354 fatal("Error: Can't find /mv64x60/pci@80000000/ranges" 354 fatal("Error: Can't find marvell,mv64360-pci ranges"
355 " property\n\r"); 355 " property\n\r");
356 356
357 /* Get the cpu -> pci i/o & mem mappings from the device tree */ 357 /* Get the cpu -> pci i/o & mem mappings from the device tree */
358 devp = finddevice("/mv64x60"); 358 devp = find_node_by_compatible(NULL, "marvell,mv64360");
359 if (devp == NULL) 359 if (devp == NULL)
360 fatal("Error: Missing /mv64x60 device tree node\n\r"); 360 fatal("Error: Missing marvell,mv64360 device tree node\n\r");
361 361
362 enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE)); 362 enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE));
363 enables |= 0x0007fe00; /* Disable all cpu->pci windows */ 363 enables |= 0x0007fe00; /* Disable all cpu->pci windows */
@@ -429,9 +429,9 @@ static void prpmc2800_fixups(void)
429 setprop(devp, "model", model, l); 429 setprop(devp, "model", model, l);
430 430
431 /* Set /cpus/PowerPC,7447/clock-frequency */ 431 /* Set /cpus/PowerPC,7447/clock-frequency */
432 devp = finddevice("/cpus/PowerPC,7447"); 432 devp = find_node_by_prop_value_str(NULL, "device_type", "cpu");
433 if (devp == NULL) 433 if (devp == NULL)
434 fatal("Error: Missing proper /cpus device tree node\n\r"); 434 fatal("Error: Missing proper cpu device tree node\n\r");
435 v[0] = bip->core_speed; 435 v[0] = bip->core_speed;
436 setprop(devp, "clock-frequency", &v[0], sizeof(v[0])); 436 setprop(devp, "clock-frequency", &v[0], sizeof(v[0]));
437 437
@@ -443,16 +443,17 @@ static void prpmc2800_fixups(void)
443 v[1] = bip->mem_size; 443 v[1] = bip->mem_size;
444 setprop(devp, "reg", v, sizeof(v)); 444 setprop(devp, "reg", v, sizeof(v));
445 445
446 /* Update /mv64x60/model, if this is a mv64362 */ 446 /* Update model, if this is a mv64362 */
447 if (bip->bridge_type == BRIDGE_TYPE_MV64362) { 447 if (bip->bridge_type == BRIDGE_TYPE_MV64362) {
448 devp = finddevice("/mv64x60"); 448 devp = find_node_by_compatible(NULL, "marvell,mv64360");
449 if (devp == NULL) 449 if (devp == NULL)
450 fatal("Error: Missing /mv64x60 device tree node\n\r"); 450 fatal("Error: Missing marvell,mv64360"
451 " device tree node\n\r");
451 setprop(devp, "model", "mv64362", strlen("mv64362") + 1); 452 setprop(devp, "model", "mv64362", strlen("mv64362") + 1);
452 } 453 }
453 454
454 /* Set User FLASH size */ 455 /* Set User FLASH size */
455 devp = finddevice("/mv64x60/flash@a0000000"); 456 devp = find_node_by_compatible(NULL, "direct-mapped");
456 if (devp == NULL) 457 if (devp == NULL)
457 fatal("Error: Missing User FLASH device tree node\n\r"); 458 fatal("Error: Missing User FLASH device tree node\n\r");
458 rc = getprop(devp, "reg", v, sizeof(v)); 459 rc = getprop(devp, "reg", v, sizeof(v));
diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
index a55c2735f759..b6fcbaf5027b 100644
--- a/arch/powerpc/boot/ps3-head.S
+++ b/arch/powerpc/boot/ps3-head.S
@@ -27,8 +27,9 @@
27/* 27/*
28 * __system_reset_overlay - The PS3 first stage entry. 28 * __system_reset_overlay - The PS3 first stage entry.
29 * 29 *
30 * The bootwraper build script copies the 0x100 bytes at symbol 30 * The bootwraper build script copies the 512 bytes at symbol
31 * __system_reset_overlay to offset 0x100 of the rom image. 31 * __system_reset_overlay to offset 0x100 of the rom image. This symbol
32 * must occupy 512 or less bytes.
32 * 33 *
33 * The PS3 has a single processor with two threads. 34 * The PS3 has a single processor with two threads.
34 */ 35 */
@@ -47,8 +48,6 @@ __system_reset_overlay:
47 48
48 mfspr r3, 0x88 49 mfspr r3, 0x88
49 cntlzw. r3, r3 50 cntlzw. r3, r3
50 li r4, 0
51 li r5, 0
52 beq 1f 51 beq 1f
53 52
54 /* Secondary goes to __secondary_hold in kernel. */ 53 /* Secondary goes to __secondary_hold in kernel. */
@@ -57,8 +56,14 @@ __system_reset_overlay:
57 mtctr r4 56 mtctr r4
58 bctr 57 bctr
59 58
60 /* Primary delays then goes to _zimage_start in wrapper. */
611: 591:
60 /* Save the value at addr zero for a null pointer write check later. */
61
62 li r4, 0
63 lwz r3, 0(r4)
64
65 /* Primary delays then goes to _zimage_start in wrapper. */
66
62 or 31, 31, 31 /* db16cyc */ 67 or 31, 31, 31 /* db16cyc */
63 or 31, 31, 31 /* db16cyc */ 68 or 31, 31, 31 /* db16cyc */
64 69
@@ -67,16 +72,18 @@ __system_reset_overlay:
67 mtctr r4 72 mtctr r4
68 bctr 73 bctr
69 74
75 . = __system_reset_overlay + 512
76
70/* 77/*
71 * __system_reset_kernel - Place holder for the kernel reset vector. 78 * __system_reset_kernel - Place holder for the kernel reset vector.
72 * 79 *
73 * The bootwrapper build script copies 0x100 bytes from offset 0x100 80 * The bootwrapper build script copies 512 bytes from offset 0x100
74 * of the rom image to the symbol __system_reset_kernel. At runtime 81 * of the rom image to the symbol __system_reset_kernel. At runtime
75 * the bootwrapper program copies the 0x100 bytes at __system_reset_kernel 82 * the bootwrapper program copies the 512 bytes at __system_reset_kernel
76 * to ram address 0x100. This symbol must occupy 0x100 bytes. 83 * to ram address 0x100. This symbol must occupy 512 bytes.
77 */ 84 */
78 85
79 .globl __system_reset_kernel 86 .globl __system_reset_kernel
80__system_reset_kernel: 87__system_reset_kernel:
81 88
82 . = __system_reset_kernel + 0x100 89 . = __system_reset_kernel + 512
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index 3b0ac4d006ec..9954d98871d0 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -27,10 +27,10 @@
27#include "page.h" 27#include "page.h"
28#include "ops.h" 28#include "ops.h"
29 29
30extern s64 lv1_panic(u64 in_1); 30extern int lv1_panic(u64 in_1);
31extern s64 lv1_get_logical_partition_id(u64 *out_1); 31extern int lv1_get_logical_partition_id(u64 *out_1);
32extern s64 lv1_get_logical_ppe_id(u64 *out_1); 32extern int lv1_get_logical_ppe_id(u64 *out_1);
33extern s64 lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3, 33extern int lv1_get_repository_node_value(u64 in_1, u64 in_2, u64 in_3,
34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2); 34 u64 in_4, u64 in_5, u64 *out_1, u64 *out_2);
35 35
36#ifdef DEBUG 36#ifdef DEBUG
@@ -46,6 +46,7 @@ BSS_STACK(4096);
46 * edit the command line passed to vmlinux (by setting /chosen/bootargs). 46 * edit the command line passed to vmlinux (by setting /chosen/bootargs).
47 * The buffer is put in it's own section so that tools may locate it easier. 47 * The buffer is put in it's own section so that tools may locate it easier.
48 */ 48 */
49
49static char cmdline[COMMAND_LINE_SIZE] 50static char cmdline[COMMAND_LINE_SIZE]
50 __attribute__((__section__("__builtin_cmdline"))); 51 __attribute__((__section__("__builtin_cmdline")));
51 52
@@ -75,7 +76,7 @@ static void ps3_exit(void)
75 76
76static int ps3_repository_read_rm_size(u64 *rm_size) 77static int ps3_repository_read_rm_size(u64 *rm_size)
77{ 78{
78 s64 result; 79 int result;
79 u64 lpar_id; 80 u64 lpar_id;
80 u64 ppe_id; 81 u64 ppe_id;
81 u64 v2; 82 u64 v2;
@@ -114,16 +115,17 @@ void ps3_copy_vectors(void)
114{ 115{
115 extern char __system_reset_kernel[]; 116 extern char __system_reset_kernel[];
116 117
117 memcpy((void *)0x100, __system_reset_kernel, 0x100); 118 memcpy((void *)0x100, __system_reset_kernel, 512);
118 flush_cache((void *)0x100, 0x100); 119 flush_cache((void *)0x100, 512);
119} 120}
120 121
121void platform_init(void) 122void platform_init(unsigned long null_check)
122{ 123{
123 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ 124 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
124 void *chosen; 125 void *chosen;
125 unsigned long ft_addr; 126 unsigned long ft_addr;
126 u64 rm_size; 127 u64 rm_size;
128 unsigned long val;
127 129
128 console_ops.write = ps3_console_write; 130 console_ops.write = ps3_console_write;
129 platform_ops.exit = ps3_exit; 131 platform_ops.exit = ps3_exit;
@@ -151,6 +153,11 @@ void platform_init(void)
151 153
152 printf(" flat tree at 0x%lx\n\r", ft_addr); 154 printf(" flat tree at 0x%lx\n\r", ft_addr);
153 155
156 val = *(unsigned long *)0;
157
158 if (val != null_check)
159 printf("null check failed: %lx != %lx\n\r", val, null_check);
160
154 ((kernel_entry_t)0)(ft_addr, 0, NULL); 161 ((kernel_entry_t)0)(ft_addr, 0, NULL);
155 162
156 ps3_exit(); 163 ps3_exit();
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index 9960421eb6b9..8b3607cb53fb 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -119,7 +119,7 @@ int serial_console_init(void)
119 119
120 if (dt_is_compatible(devp, "ns16550")) 120 if (dt_is_compatible(devp, "ns16550"))
121 rc = ns16550_console_init(devp, &serial_cd); 121 rc = ns16550_console_init(devp, &serial_cd);
122 else if (dt_is_compatible(devp, "marvell,mpsc")) 122 else if (dt_is_compatible(devp, "marvell,mv64360-mpsc"))
123 rc = mpsc_console_init(devp, &serial_cd); 123 rc = mpsc_console_init(devp, &serial_cd);
124 else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") || 124 else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
125 dt_is_compatible(devp, "fsl,cpm1-smc-uart") || 125 dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
diff --git a/arch/powerpc/boot/simpleboot.c b/arch/powerpc/boot/simpleboot.c
new file mode 100644
index 000000000000..86cd285bccc6
--- /dev/null
+++ b/arch/powerpc/boot/simpleboot.c
@@ -0,0 +1,84 @@
1/*
2 * The simple platform -- for booting when firmware doesn't supply a device
3 * tree or any platform configuration information.
4 * All data is extracted from an embedded device tree
5 * blob.
6 *
7 * Authors: Scott Wood <scottwood@freescale.com>
8 * Grant Likely <grant.likely@secretlab.ca>
9 *
10 * Copyright (c) 2007 Freescale Semiconductor, Inc.
11 * Copyright (c) 2008 Secret Lab Technologies Ltd.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License version 2 as published
15 * by the Free Software Foundation.
16 */
17
18#include "ops.h"
19#include "types.h"
20#include "io.h"
21#include "stdio.h"
22#include "libfdt/libfdt.h"
23
24BSS_STACK(4*1024);
25
26void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
27 unsigned long r6, unsigned long r7)
28{
29 const u32 *na, *ns, *reg, *timebase;
30 u64 memsize64;
31 int node, size, i;
32
33 /* Make sure FDT blob is sane */
34 if (fdt_check_header(_dtb_start) != 0)
35 fatal("Invalid device tree blob\n");
36
37 /* Find the #address-cells and #size-cells properties */
38 node = fdt_path_offset(_dtb_start, "/");
39 if (node < 0)
40 fatal("Cannot find root node\n");
41 na = fdt_getprop(_dtb_start, node, "#address-cells", &size);
42 if (!na || (size != 4))
43 fatal("Cannot find #address-cells property");
44 ns = fdt_getprop(_dtb_start, node, "#size-cells", &size);
45 if (!ns || (size != 4))
46 fatal("Cannot find #size-cells property");
47
48 /* Find the memory range */
49 node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
50 "memory", sizeof("memory"));
51 if (node < 0)
52 fatal("Cannot find memory node\n");
53 reg = fdt_getprop(_dtb_start, node, "reg", &size);
54 if (size < (*na+*ns) * sizeof(u32))
55 fatal("cannot get memory range\n");
56
57 /* Only interested in memory based at 0 */
58 for (i = 0; i < *na; i++)
59 if (*reg++ != 0)
60 fatal("Memory range is not based at address 0\n");
61
62 /* get the memsize and trucate it to under 4G on 32 bit machines */
63 memsize64 = 0;
64 for (i = 0; i < *ns; i++)
65 memsize64 = (memsize64 << 32) | *reg++;
66 if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL)
67 memsize64 = 0xffffffff;
68
69 /* finally, setup the timebase */
70 node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
71 "cpu", sizeof("cpu"));
72 if (!node)
73 fatal("Cannot find cpu node\n");
74 timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size);
75 if (timebase && (size == 4))
76 timebase_period_ns = 1000000000 / *timebase;
77
78 /* Now we have the memory size; initialize the heap */
79 simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64);
80
81 /* prepare the device tree and find the console */
82 fdt_init(_dtb_start);
83 serial_console_init();
84}
diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c
index 472e36605a52..097974e59fac 100644
--- a/arch/powerpc/boot/treeboot-walnut.c
+++ b/arch/powerpc/boot/treeboot-walnut.c
@@ -68,7 +68,7 @@ static void walnut_fixups(void)
68 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); 68 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
69 ibm4xx_fixup_ebc_ranges("/plb/ebc"); 69 ibm4xx_fixup_ebc_ranges("/plb/ebc");
70 walnut_flashsel_fixup(); 70 walnut_flashsel_fixup();
71 dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); 71 dt_fixup_mac_address_by_alias("ethernet0", (u8 *) WALNUT_OPENBIOS_MAC_OFF);
72} 72}
73 73
74void platform_init(void) 74void platform_init(void)
diff --git a/arch/powerpc/boot/virtex405-head.S b/arch/powerpc/boot/virtex405-head.S
new file mode 100644
index 000000000000..3edb13f94669
--- /dev/null
+++ b/arch/powerpc/boot/virtex405-head.S
@@ -0,0 +1,30 @@
1#include "ppc_asm.h"
2
3 .text
4 .global _zimage_start
5_zimage_start:
6
7 /* PPC errata 213: needed by Virtex-4 FX */
8 mfccr0 0
9 oris 0,0,0x50000000@h
10 mtccr0 0
11
12 /*
13 * Invalidate the data cache if the data cache is turned off.
14 * - The 405 core does not invalidate the data cache on power-up
15 * or reset but does turn off the data cache. We cannot assume
16 * that the cache contents are valid.
17 * - If the data cache is turned on this must have been done by
18 * a bootloader and we assume that the cache contents are
19 * valid.
20 */
21 mfdccr r9
22 cmplwi r9,0
23 bne 2f
24 lis r9,0
25 li r8,256
26 mtctr r8
271: dccci r0,r9
28 addi r9,r9,0x20
29 bdnz 1b
302: b _zimage_start_lib
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 8f8b8494d62f..d6c96d9ab291 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -174,7 +174,7 @@ cuboot*)
174 *-mpc83*) 174 *-mpc83*)
175 platformo=$object/cuboot-83xx.o 175 platformo=$object/cuboot-83xx.o
176 ;; 176 ;;
177 *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555) 177 *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*)
178 platformo=$object/cuboot-85xx-cpm2.o 178 platformo=$object/cuboot-85xx-cpm2.o
179 ;; 179 ;;
180 *-mpc85*|*-tqm8540|*-sbc85*) 180 *-mpc85*|*-tqm8540|*-sbc85*)
@@ -199,6 +199,10 @@ adder875-redboot)
199 platformo="$object/fixed-head.o $object/redboot-8xx.o" 199 platformo="$object/fixed-head.o $object/redboot-8xx.o"
200 binary=y 200 binary=y
201 ;; 201 ;;
202simpleboot-virtex405-*)
203 platformo="$object/virtex405-head.o $object/simpleboot.o"
204 binary=y
205 ;;
202esac 206esac
203 207
204vmz="$tmpdir/`basename \"$kernel\"`.$ext" 208vmz="$tmpdir/`basename \"$kernel\"`.$ext"
@@ -226,10 +230,13 @@ if [ -n "$version" ]; then
226 uboot_version="-n Linux-$version" 230 uboot_version="-n Linux-$version"
227fi 231fi
228 232
233# physical offset of kernel image
234membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
235
229case "$platform" in 236case "$platform" in
230uboot) 237uboot)
231 rm -f "$ofile" 238 rm -f "$ofile"
232 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ 239 mkimage -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
233 $uboot_version -d "$vmz" "$ofile" 240 $uboot_version -d "$vmz" "$ofile"
234 if [ -z "$cacheit" ]; then 241 if [ -z "$cacheit" ]; then
235 rm -f "$vmz" 242 rm -f "$vmz"
@@ -298,15 +305,16 @@ treeboot*)
298 exit 0 305 exit 0
299 ;; 306 ;;
300ps3) 307ps3)
301 # The ps3's loader supports loading gzipped binary images from flash 308 # The ps3's loader supports loading a gzipped binary image from flash
302 # rom to addr zero. The loader enters the image at addr 0x100. A 309 # rom to ram addr zero. The loader then enters the system reset
303 # bootwrapper overlay is use to arrange for the kernel to be loaded 310 # vector at addr 0x100. A bootwrapper overlay is used to arrange for
304 # to addr zero and to have a suitable bootwrapper entry at 0x100. 311 # a binary image of the kernel to be at addr zero, and yet have a
305 # To construct the rom image, 0x100 bytes from offset 0x100 in the 312 # suitable bootwrapper entry at 0x100. To construct the final rom
306 # kernel is copied to the bootwrapper symbol __system_reset_kernel. 313 # image 512 bytes from offset 0x100 is copied to the bootwrapper
307 # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is 314 # place holder at symbol __system_reset_kernel. The 512 bytes of the
308 # then copied to offset 0x100. At runtime the bootwrapper program 315 # bootwrapper entry code at symbol __system_reset_overlay is then
309 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. 316 # copied to offset 0x100. At runtime the bootwrapper program copies
317 # the data at __system_reset_kernel back to addr 0x100.
310 318
311 system_reset_overlay=0x`${CROSS}nm "$ofile" \ 319 system_reset_overlay=0x`${CROSS}nm "$ofile" \
312 | grep ' __system_reset_overlay$' \ 320 | grep ' __system_reset_overlay$' \
@@ -317,7 +325,7 @@ ps3)
317 | cut -d' ' -f1` 325 | cut -d' ' -f1`
318 system_reset_kernel=`printf "%d" $system_reset_kernel` 326 system_reset_kernel=`printf "%d" $system_reset_kernel`
319 overlay_dest="256" 327 overlay_dest="256"
320 overlay_size="256" 328 overlay_size="512"
321 329
322 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 330 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
323 331
diff --git a/arch/powerpc/configs/ep405_defconfig b/arch/powerpc/configs/40x/ep405_defconfig
index e24240a9a047..e24240a9a047 100644
--- a/arch/powerpc/configs/ep405_defconfig
+++ b/arch/powerpc/configs/40x/ep405_defconfig
diff --git a/arch/powerpc/configs/kilauea_defconfig b/arch/powerpc/configs/40x/kilauea_defconfig
index 2f475391f1d1..2f475391f1d1 100644
--- a/arch/powerpc/configs/kilauea_defconfig
+++ b/arch/powerpc/configs/40x/kilauea_defconfig
diff --git a/arch/powerpc/configs/makalu_defconfig b/arch/powerpc/configs/40x/makalu_defconfig
index 9ef4d8a312c8..9ef4d8a312c8 100644
--- a/arch/powerpc/configs/makalu_defconfig
+++ b/arch/powerpc/configs/40x/makalu_defconfig
diff --git a/arch/powerpc/configs/walnut_defconfig b/arch/powerpc/configs/40x/walnut_defconfig
index 3b2689e5002a..3b2689e5002a 100644
--- a/arch/powerpc/configs/walnut_defconfig
+++ b/arch/powerpc/configs/40x/walnut_defconfig
diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/44x/bamboo_defconfig
index c44db554cdc6..c44db554cdc6 100644
--- a/arch/powerpc/configs/bamboo_defconfig
+++ b/arch/powerpc/configs/44x/bamboo_defconfig
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
new file mode 100644
index 000000000000..a3b763c45ec6
--- /dev/null
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -0,0 +1,721 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc1
4# Thu Feb 21 14:29:28 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_4xx=y
19CONFIG_BOOKE=y
20CONFIG_PTE_64BIT=y
21CONFIG_PHYS_64BIT=y
22# CONFIG_PPC_MM_SLICES is not set
23CONFIG_NOT_COHERENT_CACHE=y
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y
42CONFIG_EARLY_PRINTK=y
43CONFIG_GENERIC_NVRAM=y
44CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
45CONFIG_ARCH_MAY_HAVE_PC_FDC=y
46CONFIG_PPC_OF=y
47CONFIG_OF=y
48CONFIG_PPC_UDBG_16550=y
49# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y
51CONFIG_GENERIC_BUG=y
52# CONFIG_DEFAULT_UIMAGE is not set
53CONFIG_PPC_DCR_NATIVE=y
54# CONFIG_PPC_DCR_MMIO is not set
55CONFIG_PPC_DCR=y
56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
57
58#
59# General setup
60#
61CONFIG_EXPERIMENTAL=y
62CONFIG_BROKEN_ON_SMP=y
63CONFIG_INIT_ENV_ARG_LIMIT=32
64CONFIG_LOCALVERSION=""
65CONFIG_LOCALVERSION_AUTO=y
66CONFIG_SWAP=y
67CONFIG_SYSVIPC=y
68CONFIG_SYSVIPC_SYSCTL=y
69CONFIG_POSIX_MQUEUE=y
70# CONFIG_BSD_PROCESS_ACCT is not set
71# CONFIG_TASKSTATS is not set
72# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76# CONFIG_FAIR_GROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y
78# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y
81CONFIG_INITRAMFS_SOURCE=""
82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
83CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y
86CONFIG_KALLSYMS=y
87# CONFIG_KALLSYMS_ALL is not set
88# CONFIG_KALLSYMS_EXTRA_PASS is not set
89CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y
91# CONFIG_LOGBUFFER is not set
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_COMPAT_BRK=y
95CONFIG_BASE_FULL=y
96CONFIG_FUTEX=y
97CONFIG_ANON_INODES=y
98CONFIG_EPOLL=y
99CONFIG_SIGNALFD=y
100CONFIG_TIMERFD=y
101CONFIG_EVENTFD=y
102CONFIG_SHMEM=y
103CONFIG_VM_EVENT_COUNTERS=y
104CONFIG_SLUB_DEBUG=y
105# CONFIG_SLAB is not set
106CONFIG_SLUB=y
107# CONFIG_SLOB is not set
108# CONFIG_PROFILING is not set
109# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set
112CONFIG_HAVE_KPROBES=y
113CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y
119CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set
122# CONFIG_MODULE_SRCVERSION_ALL is not set
123CONFIG_KMOD=y
124CONFIG_BLOCK=y
125CONFIG_LBD=y
126# CONFIG_BLK_DEV_IO_TRACE is not set
127# CONFIG_LSF is not set
128# CONFIG_BLK_DEV_BSG is not set
129
130#
131# IO Schedulers
132#
133CONFIG_IOSCHED_NOOP=y
134CONFIG_IOSCHED_AS=y
135CONFIG_IOSCHED_DEADLINE=y
136CONFIG_IOSCHED_CFQ=y
137CONFIG_DEFAULT_AS=y
138# CONFIG_DEFAULT_DEADLINE is not set
139# CONFIG_DEFAULT_CFQ is not set
140# CONFIG_DEFAULT_NOOP is not set
141CONFIG_DEFAULT_IOSCHED="anticipatory"
142CONFIG_CLASSIC_RCU=y
143# CONFIG_PREEMPT_RCU is not set
144CONFIG_PPC4xx_PCI_EXPRESS=y
145
146#
147# Platform support
148#
149# CONFIG_PPC_MPC512x is not set
150# CONFIG_PPC_MPC5121 is not set
151# CONFIG_PPC_CELL is not set
152# CONFIG_PPC_CELL_NATIVE is not set
153# CONFIG_PQ2ADS is not set
154# CONFIG_BAMBOO is not set
155# CONFIG_EBONY is not set
156# CONFIG_SEQUOIA is not set
157# CONFIG_TAISHAN is not set
158# CONFIG_KATMAI is not set
159# CONFIG_RAINIER is not set
160# CONFIG_WARP is not set
161CONFIG_CANYONLANDS=y
162CONFIG_460EX=y
163# CONFIG_IPIC is not set
164# CONFIG_MPIC is not set
165# CONFIG_MPIC_WEIRD is not set
166# CONFIG_PPC_I8259 is not set
167# CONFIG_PPC_RTAS is not set
168# CONFIG_MMIO_NVRAM is not set
169# CONFIG_PPC_MPC106 is not set
170# CONFIG_PPC_970_NAP is not set
171# CONFIG_PPC_INDIRECT_IO is not set
172# CONFIG_GENERIC_IOMAP is not set
173# CONFIG_CPU_FREQ is not set
174# CONFIG_FSL_ULI1575 is not set
175
176#
177# Kernel options
178#
179# CONFIG_HIGHMEM is not set
180CONFIG_TICK_ONESHOT=y
181CONFIG_NO_HZ=y
182CONFIG_HIGH_RES_TIMERS=y
183CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
184# CONFIG_HZ_100 is not set
185CONFIG_HZ_250=y
186# CONFIG_HZ_300 is not set
187# CONFIG_HZ_1000 is not set
188CONFIG_HZ=250
189# CONFIG_SCHED_HRTICK is not set
190CONFIG_PREEMPT_NONE=y
191# CONFIG_PREEMPT_VOLUNTARY is not set
192# CONFIG_PREEMPT is not set
193CONFIG_RCU_TRACE=y
194CONFIG_BINFMT_ELF=y
195# CONFIG_BINFMT_MISC is not set
196# CONFIG_MATH_EMULATION is not set
197# CONFIG_IOMMU_HELPER is not set
198CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
199CONFIG_ARCH_HAS_WALK_MEMORY=y
200CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
201CONFIG_ARCH_FLATMEM_ENABLE=y
202CONFIG_ARCH_POPULATES_NODE_MAP=y
203CONFIG_SELECT_MEMORY_MODEL=y
204CONFIG_FLATMEM_MANUAL=y
205# CONFIG_DISCONTIGMEM_MANUAL is not set
206# CONFIG_SPARSEMEM_MANUAL is not set
207CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y
209# CONFIG_SPARSEMEM_STATIC is not set
210# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
211CONFIG_SPLIT_PTLOCK_CPUS=4
212CONFIG_RESOURCES_64BIT=y
213CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y
215CONFIG_VIRT_TO_BUS=y
216CONFIG_PROC_DEVICETREE=y
217CONFIG_CMDLINE_BOOL=y
218CONFIG_CMDLINE=""
219CONFIG_SECCOMP=y
220CONFIG_WANT_DEVICE_TREE=y
221CONFIG_ISA_DMA_API=y
222
223#
224# Bus options
225#
226CONFIG_ZONE_DMA=y
227CONFIG_PPC_INDIRECT_PCI=y
228CONFIG_PCI=y
229CONFIG_PCI_DOMAINS=y
230CONFIG_PCI_SYSCALL=y
231# CONFIG_PCIEPORTBUS is not set
232CONFIG_ARCH_SUPPORTS_MSI=y
233# CONFIG_PCI_MSI is not set
234CONFIG_PCI_LEGACY=y
235# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set
238
239#
240# Advanced setup
241#
242# CONFIG_ADVANCED_OPTIONS is not set
243
244#
245# Default settings for advanced configuration options are used
246#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000
249CONFIG_KERNEL_START=0xc0000000
250CONFIG_TASK_SIZE=0xc0000000
251CONFIG_CONSISTENT_START=0xff100000
252CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x01000000
254
255#
256# Networking
257#
258CONFIG_NET=y
259
260#
261# Networking options
262#
263CONFIG_PACKET=y
264# CONFIG_PACKET_MMAP is not set
265CONFIG_UNIX=y
266# CONFIG_NET_KEY is not set
267CONFIG_INET=y
268# CONFIG_IP_MULTICAST is not set
269# CONFIG_IP_ADVANCED_ROUTER is not set
270CONFIG_IP_FIB_HASH=y
271CONFIG_IP_PNP=y
272CONFIG_IP_PNP_DHCP=y
273CONFIG_IP_PNP_BOOTP=y
274# CONFIG_IP_PNP_RARP is not set
275# CONFIG_NET_IPIP is not set
276# CONFIG_NET_IPGRE is not set
277# CONFIG_ARPD is not set
278# CONFIG_SYN_COOKIES is not set
279# CONFIG_INET_AH is not set
280# CONFIG_INET_ESP is not set
281# CONFIG_INET_IPCOMP is not set
282# CONFIG_INET_XFRM_TUNNEL is not set
283# CONFIG_INET_TUNNEL is not set
284# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
285# CONFIG_INET_XFRM_MODE_TUNNEL is not set
286# CONFIG_INET_XFRM_MODE_BEET is not set
287# CONFIG_INET_LRO is not set
288CONFIG_INET_DIAG=y
289CONFIG_INET_TCP_DIAG=y
290# CONFIG_TCP_CONG_ADVANCED is not set
291CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set
300# CONFIG_IP_SCTP is not set
301# CONFIG_TIPC is not set
302# CONFIG_ATM is not set
303# CONFIG_BRIDGE is not set
304# CONFIG_VLAN_8021Q is not set
305# CONFIG_DECNET is not set
306# CONFIG_LLC2 is not set
307# CONFIG_IPX is not set
308# CONFIG_ATALK is not set
309# CONFIG_X25 is not set
310# CONFIG_LAPB is not set
311# CONFIG_ECONET is not set
312# CONFIG_WAN_ROUTER is not set
313# CONFIG_NET_SCHED is not set
314
315#
316# Network testing
317#
318# CONFIG_NET_PKTGEN is not set
319# CONFIG_HAMRADIO is not set
320# CONFIG_CAN is not set
321# CONFIG_IRDA is not set
322# CONFIG_BT is not set
323# CONFIG_AF_RXRPC is not set
324
325#
326# Wireless
327#
328# CONFIG_CFG80211 is not set
329# CONFIG_WIRELESS_EXT is not set
330# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set
333# CONFIG_NET_9P is not set
334
335#
336# Device Drivers
337#
338
339#
340# Generic Driver Options
341#
342CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y
346# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set
349CONFIG_CONNECTOR=y
350CONFIG_PROC_EVENTS=y
351# CONFIG_MTD is not set
352CONFIG_OF_DEVICE=y
353# CONFIG_PARPORT is not set
354CONFIG_BLK_DEV=y
355# CONFIG_BLK_DEV_FD is not set
356# CONFIG_BLK_CPQ_DA is not set
357# CONFIG_BLK_CPQ_CISS_DA is not set
358# CONFIG_BLK_DEV_DAC960 is not set
359# CONFIG_BLK_DEV_UMEM is not set
360# CONFIG_BLK_DEV_COW_COMMON is not set
361# CONFIG_BLK_DEV_LOOP is not set
362# CONFIG_BLK_DEV_NBD is not set
363# CONFIG_BLK_DEV_SX8 is not set
364CONFIG_BLK_DEV_RAM=y
365CONFIG_BLK_DEV_RAM_COUNT=16
366CONFIG_BLK_DEV_RAM_SIZE=35000
367# CONFIG_BLK_DEV_XIP is not set
368# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set
370# CONFIG_XILINX_SYSACE is not set
371# CONFIG_MISC_DEVICES is not set
372CONFIG_HAVE_IDE=y
373# CONFIG_IDE is not set
374
375#
376# SCSI device support
377#
378# CONFIG_RAID_ATTRS is not set
379# CONFIG_SCSI is not set
380# CONFIG_SCSI_DMA is not set
381# CONFIG_SCSI_NETLINK is not set
382# CONFIG_ATA is not set
383# CONFIG_MD is not set
384# CONFIG_FUSION is not set
385
386#
387# IEEE 1394 (FireWire) support
388#
389# CONFIG_FIREWIRE is not set
390# CONFIG_IEEE1394 is not set
391# CONFIG_I2O is not set
392# CONFIG_MACINTOSH_DRIVERS is not set
393CONFIG_NETDEVICES=y
394# CONFIG_NETDEVICES_MULTIQUEUE is not set
395# CONFIG_DUMMY is not set
396# CONFIG_BONDING is not set
397# CONFIG_MACVLAN is not set
398# CONFIG_EQUALIZER is not set
399# CONFIG_TUN is not set
400# CONFIG_VETH is not set
401# CONFIG_ARCNET is not set
402# CONFIG_PHYLIB is not set
403CONFIG_NET_ETHERNET=y
404# CONFIG_MII is not set
405# CONFIG_HAPPYMEAL is not set
406# CONFIG_SUNGEM is not set
407# CONFIG_CASSINI is not set
408# CONFIG_NET_VENDOR_3COM is not set
409# CONFIG_NET_TULIP is not set
410# CONFIG_HP100 is not set
411CONFIG_IBM_NEW_EMAC=y
412CONFIG_IBM_NEW_EMAC_RXB=256
413CONFIG_IBM_NEW_EMAC_TXB=256
414CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
415CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
416CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
417# CONFIG_IBM_NEW_EMAC_DEBUG is not set
418CONFIG_IBM_NEW_EMAC_ZMII=y
419CONFIG_IBM_NEW_EMAC_RGMII=y
420CONFIG_IBM_NEW_EMAC_TAH=y
421CONFIG_IBM_NEW_EMAC_EMAC4=y
422# CONFIG_NET_PCI is not set
423# CONFIG_B44 is not set
424# CONFIG_NETDEV_1000 is not set
425# CONFIG_NETDEV_10000 is not set
426# CONFIG_TR is not set
427
428#
429# Wireless LAN
430#
431# CONFIG_WLAN_PRE80211 is not set
432# CONFIG_WLAN_80211 is not set
433# CONFIG_WAN is not set
434# CONFIG_FDDI is not set
435# CONFIG_HIPPI is not set
436# CONFIG_PPP is not set
437# CONFIG_SLIP is not set
438# CONFIG_NETCONSOLE is not set
439# CONFIG_NETPOLL is not set
440# CONFIG_NET_POLL_CONTROLLER is not set
441# CONFIG_ISDN is not set
442# CONFIG_PHONE is not set
443
444#
445# Input device support
446#
447# CONFIG_INPUT is not set
448
449#
450# Hardware I/O ports
451#
452# CONFIG_SERIO is not set
453# CONFIG_GAMEPORT is not set
454
455#
456# Character devices
457#
458# CONFIG_VT is not set
459# CONFIG_SERIAL_NONSTANDARD is not set
460# CONFIG_NOZOMI is not set
461
462#
463# Serial drivers
464#
465CONFIG_SERIAL_8250=y
466CONFIG_SERIAL_8250_CONSOLE=y
467# CONFIG_SERIAL_8250_PCI is not set
468CONFIG_SERIAL_8250_NR_UARTS=4
469CONFIG_SERIAL_8250_RUNTIME_UARTS=4
470CONFIG_SERIAL_8250_EXTENDED=y
471# CONFIG_SERIAL_8250_MANY_PORTS is not set
472CONFIG_SERIAL_8250_SHARE_IRQ=y
473# CONFIG_SERIAL_8250_DETECT_IRQ is not set
474# CONFIG_SERIAL_8250_RSA is not set
475
476#
477# Non-8250 serial port support
478#
479# CONFIG_SERIAL_UARTLITE is not set
480CONFIG_SERIAL_CORE=y
481CONFIG_SERIAL_CORE_CONSOLE=y
482# CONFIG_SERIAL_JSM is not set
483CONFIG_SERIAL_OF_PLATFORM=y
484CONFIG_UNIX98_PTYS=y
485CONFIG_LEGACY_PTYS=y
486CONFIG_LEGACY_PTY_COUNT=256
487# CONFIG_IPMI_HANDLER is not set
488# CONFIG_HW_RANDOM is not set
489# CONFIG_NVRAM is not set
490# CONFIG_GEN_RTC is not set
491# CONFIG_R3964 is not set
492# CONFIG_APPLICOM is not set
493# CONFIG_RAW_DRIVER is not set
494# CONFIG_TCG_TPM is not set
495CONFIG_DEVPORT=y
496# CONFIG_I2C is not set
497
498#
499# SPI support
500#
501# CONFIG_SPI is not set
502# CONFIG_SPI_MASTER is not set
503# CONFIG_W1 is not set
504# CONFIG_POWER_SUPPLY is not set
505# CONFIG_HWMON is not set
506# CONFIG_THERMAL is not set
507# CONFIG_WATCHDOG is not set
508
509#
510# Sonics Silicon Backplane
511#
512CONFIG_SSB_POSSIBLE=y
513# CONFIG_SSB is not set
514
515#
516# Multifunction device drivers
517#
518# CONFIG_MFD_SM501 is not set
519
520#
521# Multimedia devices
522#
523# CONFIG_VIDEO_DEV is not set
524# CONFIG_DVB_CORE is not set
525CONFIG_DAB=y
526
527#
528# Graphics support
529#
530# CONFIG_AGP is not set
531# CONFIG_DRM is not set
532# CONFIG_VGASTATE is not set
533CONFIG_VIDEO_OUTPUT_CONTROL=m
534# CONFIG_FB is not set
535# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
536
537#
538# Display device support
539#
540# CONFIG_DISPLAY_SUPPORT is not set
541
542#
543# Sound
544#
545# CONFIG_SOUND is not set
546# CONFIG_USB_SUPPORT is not set
547# CONFIG_MMC is not set
548# CONFIG_MEMSTICK is not set
549# CONFIG_NEW_LEDS is not set
550# CONFIG_INFINIBAND is not set
551# CONFIG_EDAC is not set
552# CONFIG_RTC_CLASS is not set
553
554#
555# Userspace I/O
556#
557# CONFIG_UIO is not set
558
559#
560# File systems
561#
562CONFIG_EXT2_FS=y
563# CONFIG_EXT2_FS_XATTR is not set
564# CONFIG_EXT2_FS_XIP is not set
565# CONFIG_EXT3_FS is not set
566# CONFIG_EXT4DEV_FS is not set
567# CONFIG_REISERFS_FS is not set
568# CONFIG_JFS_FS is not set
569# CONFIG_FS_POSIX_ACL is not set
570# CONFIG_XFS_FS is not set
571# CONFIG_GFS2_FS is not set
572# CONFIG_OCFS2_FS is not set
573CONFIG_DNOTIFY=y
574CONFIG_INOTIFY=y
575CONFIG_INOTIFY_USER=y
576# CONFIG_QUOTA is not set
577# CONFIG_AUTOFS_FS is not set
578# CONFIG_AUTOFS4_FS is not set
579# CONFIG_FUSE_FS is not set
580
581#
582# CD-ROM/DVD Filesystems
583#
584# CONFIG_ISO9660_FS is not set
585# CONFIG_UDF_FS is not set
586
587#
588# DOS/FAT/NT Filesystems
589#
590# CONFIG_MSDOS_FS is not set
591# CONFIG_VFAT_FS is not set
592# CONFIG_NTFS_FS is not set
593
594#
595# Pseudo filesystems
596#
597CONFIG_PROC_FS=y
598CONFIG_PROC_KCORE=y
599CONFIG_PROC_SYSCTL=y
600CONFIG_SYSFS=y
601CONFIG_TMPFS=y
602# CONFIG_TMPFS_POSIX_ACL is not set
603# CONFIG_HUGETLB_PAGE is not set
604# CONFIG_CONFIGFS_FS is not set
605
606#
607# Miscellaneous filesystems
608#
609# CONFIG_ADFS_FS is not set
610# CONFIG_AFFS_FS is not set
611# CONFIG_HFS_FS is not set
612# CONFIG_HFSPLUS_FS is not set
613# CONFIG_BEFS_FS is not set
614# CONFIG_BFS_FS is not set
615# CONFIG_EFS_FS is not set
616CONFIG_CRAMFS=y
617# CONFIG_VXFS_FS is not set
618# CONFIG_MINIX_FS is not set
619# CONFIG_HPFS_FS is not set
620# CONFIG_QNX4FS_FS is not set
621# CONFIG_ROMFS_FS is not set
622# CONFIG_SYSV_FS is not set
623# CONFIG_UFS_FS is not set
624CONFIG_NETWORK_FILESYSTEMS=y
625CONFIG_NFS_FS=y
626CONFIG_NFS_V3=y
627# CONFIG_NFS_V3_ACL is not set
628# CONFIG_NFS_V4 is not set
629# CONFIG_NFS_DIRECTIO is not set
630# CONFIG_NFSD is not set
631CONFIG_ROOT_NFS=y
632CONFIG_LOCKD=y
633CONFIG_LOCKD_V4=y
634CONFIG_NFS_COMMON=y
635CONFIG_SUNRPC=y
636# CONFIG_SUNRPC_BIND34 is not set
637# CONFIG_RPCSEC_GSS_KRB5 is not set
638# CONFIG_RPCSEC_GSS_SPKM3 is not set
639# CONFIG_SMB_FS is not set
640# CONFIG_CIFS is not set
641# CONFIG_NCP_FS is not set
642# CONFIG_CODA_FS is not set
643# CONFIG_AFS_FS is not set
644
645#
646# Partition Types
647#
648# CONFIG_PARTITION_ADVANCED is not set
649CONFIG_MSDOS_PARTITION=y
650# CONFIG_NLS is not set
651# CONFIG_DLM is not set
652
653#
654# Library routines
655#
656CONFIG_BITREVERSE=y
657# CONFIG_CRC_CCITT is not set
658# CONFIG_CRC16 is not set
659# CONFIG_CRC_ITU_T is not set
660CONFIG_CRC32=y
661# CONFIG_CRC7 is not set
662# CONFIG_LIBCRC32C is not set
663CONFIG_ZLIB_INFLATE=y
664CONFIG_PLIST=y
665CONFIG_HAS_IOMEM=y
666CONFIG_HAS_IOPORT=y
667CONFIG_HAS_DMA=y
668
669#
670# Kernel hacking
671#
672# CONFIG_PRINTK_TIME is not set
673CONFIG_ENABLE_WARN_DEPRECATED=y
674CONFIG_ENABLE_MUST_CHECK=y
675CONFIG_MAGIC_SYSRQ=y
676# CONFIG_UNUSED_SYMBOLS is not set
677CONFIG_DEBUG_FS=y
678# CONFIG_HEADERS_CHECK is not set
679CONFIG_DEBUG_KERNEL=y
680# CONFIG_DEBUG_SHIRQ is not set
681CONFIG_DETECT_SOFTLOCKUP=y
682CONFIG_SCHED_DEBUG=y
683# CONFIG_SCHEDSTATS is not set
684# CONFIG_TIMER_STATS is not set
685# CONFIG_SLUB_DEBUG_ON is not set
686# CONFIG_SLUB_STATS is not set
687# CONFIG_DEBUG_RT_MUTEXES is not set
688# CONFIG_RT_MUTEX_TESTER is not set
689# CONFIG_DEBUG_SPINLOCK is not set
690# CONFIG_DEBUG_MUTEXES is not set
691# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
692# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
693# CONFIG_DEBUG_KOBJECT is not set
694# CONFIG_DEBUG_BUGVERBOSE is not set
695# CONFIG_DEBUG_INFO is not set
696# CONFIG_DEBUG_VM is not set
697# CONFIG_DEBUG_LIST is not set
698# CONFIG_DEBUG_SG is not set
699# CONFIG_BOOT_PRINTK_DELAY is not set
700# CONFIG_RCU_TORTURE_TEST is not set
701# CONFIG_BACKTRACE_SELF_TEST is not set
702# CONFIG_FAULT_INJECTION is not set
703# CONFIG_SAMPLES is not set
704# CONFIG_DEBUG_STACKOVERFLOW is not set
705# CONFIG_DEBUG_STACK_USAGE is not set
706# CONFIG_DEBUG_PAGEALLOC is not set
707CONFIG_DEBUGGER=y
708# CONFIG_KGDB is not set
709# CONFIG_XMON is not set
710# CONFIG_VIRQ_DEBUG is not set
711# CONFIG_BDI_SWITCH is not set
712# CONFIG_PPC_EARLY_DEBUG is not set
713
714#
715# Security options
716#
717# CONFIG_KEYS is not set
718# CONFIG_SECURITY is not set
719# CONFIG_SECURITY_FILE_CAPABILITIES is not set
720# CONFIG_CRYPTO is not set
721# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/44x/ebony_defconfig
index 07c8d4ce175a..07c8d4ce175a 100644
--- a/arch/powerpc/configs/ebony_defconfig
+++ b/arch/powerpc/configs/44x/ebony_defconfig
diff --git a/arch/powerpc/configs/katmai_defconfig b/arch/powerpc/configs/44x/katmai_defconfig
index c8804ec01ea4..c8804ec01ea4 100644
--- a/arch/powerpc/configs/katmai_defconfig
+++ b/arch/powerpc/configs/44x/katmai_defconfig
diff --git a/arch/powerpc/configs/rainier_defconfig b/arch/powerpc/configs/44x/rainier_defconfig
index dec18ca73519..dec18ca73519 100644
--- a/arch/powerpc/configs/rainier_defconfig
+++ b/arch/powerpc/configs/44x/rainier_defconfig
diff --git a/arch/powerpc/configs/sequoia_defconfig b/arch/powerpc/configs/44x/sequoia_defconfig
index dd5d6303c396..dd5d6303c396 100644
--- a/arch/powerpc/configs/sequoia_defconfig
+++ b/arch/powerpc/configs/44x/sequoia_defconfig
diff --git a/arch/powerpc/configs/taishan_defconfig b/arch/powerpc/configs/44x/taishan_defconfig
index 087aedce1338..087aedce1338 100644
--- a/arch/powerpc/configs/taishan_defconfig
+++ b/arch/powerpc/configs/44x/taishan_defconfig
diff --git a/arch/powerpc/configs/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig
index 2313c3e8ef61..2313c3e8ef61 100644
--- a/arch/powerpc/configs/warp_defconfig
+++ b/arch/powerpc/configs/44x/warp_defconfig
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index 7a862a6e3be8..7d18440e398f 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Mon Mar 24 08:48:14 2008 4# Fri Apr 11 11:10:09 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -196,6 +196,7 @@ CONFIG_PREEMPT_NONE=y
196# CONFIG_PREEMPT is not set 196# CONFIG_PREEMPT is not set
197CONFIG_BINFMT_ELF=y 197CONFIG_BINFMT_ELF=y
198# CONFIG_BINFMT_MISC is not set 198# CONFIG_BINFMT_MISC is not set
199CONFIG_FORCE_MAX_ZONEORDER=11
199# CONFIG_IOMMU_HELPER is not set 200# CONFIG_IOMMU_HELPER is not set
200CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 201CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
201CONFIG_ARCH_HAS_WALK_MEMORY=y 202CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -360,7 +361,7 @@ CONFIG_MTD=y
360CONFIG_MTD_PARTITIONS=y 361CONFIG_MTD_PARTITIONS=y
361# CONFIG_MTD_REDBOOT_PARTS is not set 362# CONFIG_MTD_REDBOOT_PARTS is not set
362# CONFIG_MTD_CMDLINE_PARTS is not set 363# CONFIG_MTD_CMDLINE_PARTS is not set
363# CONFIG_MTD_OF_PARTS is not set 364CONFIG_MTD_OF_PARTS=y
364 365
365# 366#
366# User Modules And Translation Layers 367# User Modules And Translation Layers
@@ -436,7 +437,7 @@ CONFIG_MTD_NAND_IDS=y
436# CONFIG_MTD_NAND_NANDSIM is not set 437# CONFIG_MTD_NAND_NANDSIM is not set
437# CONFIG_MTD_NAND_PLATFORM is not set 438# CONFIG_MTD_NAND_PLATFORM is not set
438# CONFIG_MTD_ALAUDA is not set 439# CONFIG_MTD_ALAUDA is not set
439# CONFIG_MTD_NAND_FSL_ELBC is not set 440CONFIG_MTD_NAND_FSL_ELBC=y
440# CONFIG_MTD_ONENAND is not set 441# CONFIG_MTD_ONENAND is not set
441 442
442# 443#
@@ -1293,6 +1294,7 @@ CONFIG_PLIST=y
1293CONFIG_HAS_IOMEM=y 1294CONFIG_HAS_IOMEM=y
1294CONFIG_HAS_IOPORT=y 1295CONFIG_HAS_IOPORT=y
1295CONFIG_HAS_DMA=y 1296CONFIG_HAS_DMA=y
1297CONFIG_HAVE_LMB=y
1296 1298
1297# 1299#
1298# Kernel hacking 1300# Kernel hacking
diff --git a/arch/powerpc/configs/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index 1f57456dd81e..1f57456dd81e 100644
--- a/arch/powerpc/configs/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
index 50cceda8994f..50cceda8994f 100644
--- a/arch/powerpc/configs/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index ac913025713e..ac913025713e 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index e1de399a7bdd..e1de399a7bdd 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index b4e39cf82a8c..b4e39cf82a8c 100644
--- a/arch/powerpc/configs/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
index b4e82c0e2be7..b4e82c0e2be7 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
index d50a96eddcdc..d50a96eddcdc 100644
--- a/arch/powerpc/configs/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
diff --git a/arch/powerpc/configs/mpc837x_mds_defconfig b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
index f377cde785b0..f377cde785b0 100644
--- a/arch/powerpc/configs/mpc837x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
diff --git a/arch/powerpc/configs/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index a6331769d88f..a6331769d88f 100644
--- a/arch/powerpc/configs/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
diff --git a/arch/powerpc/configs/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig
index 1f1518229f6d..1f1518229f6d 100644
--- a/arch/powerpc/configs/sbc834x_defconfig
+++ b/arch/powerpc/configs/83xx/sbc834x_defconfig
diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/configs/85xx/ksi8560_defconfig
new file mode 100644
index 000000000000..2d0debcefdbf
--- /dev/null
+++ b/arch/powerpc/configs/85xx/ksi8560_defconfig
@@ -0,0 +1,899 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24
4# Mon Feb 11 16:25:19 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
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_E500=y
18CONFIG_BOOKE=y
19CONFIG_FSL_BOOKE=y
20CONFIG_FSL_EMB_PERFMON=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y
42CONFIG_EARLY_PRINTK=y
43CONFIG_GENERIC_NVRAM=y
44CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
45CONFIG_ARCH_MAY_HAVE_PC_FDC=y
46CONFIG_PPC_OF=y
47CONFIG_OF=y
48CONFIG_PPC_UDBG_16550=y
49# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y
51CONFIG_GENERIC_BUG=y
52CONFIG_DEFAULT_UIMAGE=y
53# CONFIG_PPC_DCR_NATIVE is not set
54# CONFIG_PPC_DCR_MMIO is not set
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
56
57#
58# General setup
59#
60CONFIG_EXPERIMENTAL=y
61CONFIG_BROKEN_ON_SMP=y
62CONFIG_INIT_ENV_ARG_LIMIT=32
63CONFIG_LOCALVERSION=""
64CONFIG_LOCALVERSION_AUTO=y
65CONFIG_SWAP=y
66CONFIG_SYSVIPC=y
67CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set
71# CONFIG_USER_NS is not set
72# CONFIG_PID_NS is not set
73# CONFIG_AUDIT is not set
74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14
76# CONFIG_CGROUPS is not set
77CONFIG_FAIR_GROUP_SCHED=y
78CONFIG_FAIR_USER_SCHED=y
79# CONFIG_FAIR_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y
81# CONFIG_RELAY is not set
82CONFIG_BLK_DEV_INITRD=y
83CONFIG_INITRAMFS_SOURCE=""
84# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
85CONFIG_SYSCTL=y
86CONFIG_EMBEDDED=y
87CONFIG_SYSCTL_SYSCALL=y
88CONFIG_KALLSYMS=y
89# CONFIG_KALLSYMS_ALL is not set
90# CONFIG_KALLSYMS_EXTRA_PASS is not set
91CONFIG_HOTPLUG=y
92CONFIG_PRINTK=y
93CONFIG_BUG=y
94CONFIG_ELF_CORE=y
95CONFIG_BASE_FULL=y
96CONFIG_FUTEX=y
97CONFIG_ANON_INODES=y
98CONFIG_EPOLL=y
99CONFIG_SIGNALFD=y
100CONFIG_TIMERFD=y
101CONFIG_EVENTFD=y
102CONFIG_SHMEM=y
103CONFIG_VM_EVENT_COUNTERS=y
104CONFIG_SLUB_DEBUG=y
105# CONFIG_SLAB is not set
106CONFIG_SLUB=y
107# CONFIG_SLOB is not set
108# CONFIG_PROFILING is not set
109# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y
112CONFIG_PROC_PAGE_MONITOR=y
113CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0
117# CONFIG_MODULES is not set
118CONFIG_BLOCK=y
119# CONFIG_LBD is not set
120# CONFIG_BLK_DEV_IO_TRACE is not set
121# CONFIG_LSF is not set
122# CONFIG_BLK_DEV_BSG is not set
123
124#
125# IO Schedulers
126#
127CONFIG_IOSCHED_NOOP=y
128CONFIG_IOSCHED_AS=y
129CONFIG_IOSCHED_DEADLINE=y
130CONFIG_IOSCHED_CFQ=y
131CONFIG_DEFAULT_AS=y
132# CONFIG_DEFAULT_DEADLINE is not set
133# CONFIG_DEFAULT_CFQ is not set
134# CONFIG_DEFAULT_NOOP is not set
135CONFIG_DEFAULT_IOSCHED="anticipatory"
136CONFIG_CLASSIC_RCU=y
137# CONFIG_PREEMPT_RCU is not set
138
139#
140# Platform support
141#
142# CONFIG_PPC_MPC512x is not set
143# CONFIG_PPC_MPC5121 is not set
144# CONFIG_PPC_CELL is not set
145# CONFIG_PPC_CELL_NATIVE is not set
146# CONFIG_PQ2ADS is not set
147CONFIG_MPC85xx=y
148# CONFIG_MPC8540_ADS is not set
149# CONFIG_MPC8560_ADS is not set
150# CONFIG_MPC85xx_CDS is not set
151# CONFIG_MPC85xx_MDS is not set
152# CONFIG_MPC85xx_DS is not set
153CONFIG_KSI8560=y
154# CONFIG_STX_GP3 is not set
155# CONFIG_TQM8540 is not set
156# CONFIG_TQM8541 is not set
157# CONFIG_TQM8555 is not set
158# CONFIG_TQM8560 is not set
159# CONFIG_SBC8548 is not set
160# CONFIG_SBC8560 is not set
161# CONFIG_IPIC is not set
162CONFIG_MPIC=y
163# CONFIG_MPIC_WEIRD is not set
164# CONFIG_PPC_I8259 is not set
165# CONFIG_PPC_RTAS is not set
166# CONFIG_MMIO_NVRAM is not set
167# CONFIG_PPC_MPC106 is not set
168# CONFIG_PPC_970_NAP is not set
169# CONFIG_PPC_INDIRECT_IO is not set
170# CONFIG_GENERIC_IOMAP is not set
171# CONFIG_CPU_FREQ is not set
172CONFIG_CPM2=y
173CONFIG_PPC_CPM_NEW_BINDING=y
174# CONFIG_FSL_ULI1575 is not set
175CONFIG_CPM=y
176
177#
178# Kernel options
179#
180CONFIG_HIGHMEM=y
181# CONFIG_TICK_ONESHOT is not set
182# CONFIG_NO_HZ is not set
183# CONFIG_HIGH_RES_TIMERS is not set
184CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
185# CONFIG_HZ_100 is not set
186CONFIG_HZ_250=y
187# CONFIG_HZ_300 is not set
188# CONFIG_HZ_1000 is not set
189CONFIG_HZ=250
190# CONFIG_SCHED_HRTICK is not set
191CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT_VOLUNTARY is not set
193# CONFIG_PREEMPT is not set
194CONFIG_RCU_TRACE=y
195CONFIG_BINFMT_ELF=y
196CONFIG_BINFMT_MISC=y
197CONFIG_MATH_EMULATION=y
198# CONFIG_IOMMU_HELPER is not set
199CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
200CONFIG_ARCH_FLATMEM_ENABLE=y
201CONFIG_ARCH_POPULATES_NODE_MAP=y
202CONFIG_SELECT_MEMORY_MODEL=y
203CONFIG_FLATMEM_MANUAL=y
204# CONFIG_DISCONTIGMEM_MANUAL is not set
205# CONFIG_SPARSEMEM_MANUAL is not set
206CONFIG_FLATMEM=y
207CONFIG_FLAT_NODE_MEM_MAP=y
208# CONFIG_SPARSEMEM_STATIC is not set
209# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
210CONFIG_SPLIT_PTLOCK_CPUS=4
211# CONFIG_RESOURCES_64BIT is not set
212CONFIG_ZONE_DMA_FLAG=1
213CONFIG_BOUNCE=y
214CONFIG_VIRT_TO_BUS=y
215# CONFIG_PROC_DEVICETREE is not set
216# CONFIG_CMDLINE_BOOL is not set
217# CONFIG_PM is not set
218# CONFIG_SECCOMP is not set
219CONFIG_WANT_DEVICE_TREE=y
220CONFIG_ISA_DMA_API=y
221
222#
223# Bus options
224#
225CONFIG_ZONE_DMA=y
226CONFIG_FSL_SOC=y
227# CONFIG_PCI is not set
228# CONFIG_PCI_DOMAINS is not set
229# CONFIG_PCI_SYSCALL is not set
230# CONFIG_ARCH_SUPPORTS_MSI is not set
231# CONFIG_PCCARD is not set
232
233#
234# Advanced setup
235#
236# CONFIG_ADVANCED_OPTIONS is not set
237
238#
239# Default settings for advanced configuration options are used
240#
241CONFIG_HIGHMEM_START=0xfe000000
242CONFIG_LOWMEM_SIZE=0x30000000
243CONFIG_KERNEL_START=0xc0000000
244CONFIG_TASK_SIZE=0xc0000000
245CONFIG_BOOT_LOAD=0x00800000
246
247#
248# Networking
249#
250CONFIG_NET=y
251
252#
253# Networking options
254#
255CONFIG_PACKET=y
256# CONFIG_PACKET_MMAP is not set
257CONFIG_UNIX=y
258CONFIG_XFRM=y
259# CONFIG_XFRM_USER is not set
260# CONFIG_XFRM_SUB_POLICY is not set
261# CONFIG_XFRM_MIGRATE is not set
262# CONFIG_XFRM_STATISTICS is not set
263# CONFIG_NET_KEY is not set
264CONFIG_INET=y
265CONFIG_IP_MULTICAST=y
266# CONFIG_IP_ADVANCED_ROUTER is not set
267CONFIG_IP_FIB_HASH=y
268CONFIG_IP_PNP=y
269CONFIG_IP_PNP_DHCP=y
270CONFIG_IP_PNP_BOOTP=y
271# CONFIG_IP_PNP_RARP is not set
272# CONFIG_NET_IPIP is not set
273# CONFIG_NET_IPGRE is not set
274# CONFIG_IP_MROUTE is not set
275# CONFIG_ARPD is not set
276CONFIG_SYN_COOKIES=y
277# CONFIG_INET_AH is not set
278# CONFIG_INET_ESP is not set
279# CONFIG_INET_IPCOMP is not set
280# CONFIG_INET_XFRM_TUNNEL is not set
281# CONFIG_INET_TUNNEL is not set
282CONFIG_INET_XFRM_MODE_TRANSPORT=y
283CONFIG_INET_XFRM_MODE_TUNNEL=y
284CONFIG_INET_XFRM_MODE_BEET=y
285# CONFIG_INET_LRO is not set
286CONFIG_INET_DIAG=y
287CONFIG_INET_TCP_DIAG=y
288# CONFIG_TCP_CONG_ADVANCED is not set
289CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set
297# CONFIG_IP_DCCP is not set
298# CONFIG_IP_SCTP is not set
299# CONFIG_TIPC is not set
300# CONFIG_ATM is not set
301# CONFIG_BRIDGE is not set
302# CONFIG_VLAN_8021Q is not set
303# CONFIG_DECNET is not set
304# CONFIG_LLC2 is not set
305# CONFIG_IPX is not set
306# CONFIG_ATALK is not set
307# CONFIG_X25 is not set
308# CONFIG_LAPB is not set
309# CONFIG_ECONET is not set
310# CONFIG_WAN_ROUTER is not set
311# CONFIG_NET_SCHED is not set
312
313#
314# Network testing
315#
316# CONFIG_NET_PKTGEN is not set
317# CONFIG_HAMRADIO is not set
318# CONFIG_CAN is not set
319# CONFIG_IRDA is not set
320# CONFIG_BT is not set
321# CONFIG_AF_RXRPC is not set
322
323#
324# Wireless
325#
326# CONFIG_CFG80211 is not set
327# CONFIG_WIRELESS_EXT is not set
328# CONFIG_MAC80211 is not set
329# CONFIG_IEEE80211 is not set
330# CONFIG_RFKILL is not set
331# CONFIG_NET_9P is not set
332
333#
334# Device Drivers
335#
336
337#
338# Generic Driver Options
339#
340CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
341CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y
343# CONFIG_FW_LOADER is not set
344# CONFIG_DEBUG_DRIVER is not set
345# CONFIG_DEBUG_DEVRES is not set
346# CONFIG_SYS_HYPERVISOR is not set
347# CONFIG_CONNECTOR is not set
348CONFIG_MTD=y
349# CONFIG_MTD_DEBUG is not set
350CONFIG_MTD_CONCAT=y
351CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set
353# CONFIG_MTD_CMDLINE_PARTS is not set
354
355#
356# User Modules And Translation Layers
357#
358CONFIG_MTD_CHAR=y
359CONFIG_MTD_BLKDEVS=y
360CONFIG_MTD_BLOCK=y
361# CONFIG_FTL is not set
362# CONFIG_NFTL is not set
363# CONFIG_INFTL is not set
364# CONFIG_RFD_FTL is not set
365# CONFIG_SSFDC is not set
366# CONFIG_MTD_OOPS is not set
367
368#
369# RAM/ROM/Flash chip drivers
370#
371CONFIG_MTD_CFI=y
372CONFIG_MTD_JEDECPROBE=y
373CONFIG_MTD_GEN_PROBE=y
374# CONFIG_MTD_CFI_ADV_OPTIONS is not set
375CONFIG_MTD_MAP_BANK_WIDTH_1=y
376CONFIG_MTD_MAP_BANK_WIDTH_2=y
377CONFIG_MTD_MAP_BANK_WIDTH_4=y
378# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
379# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
380# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
381CONFIG_MTD_CFI_I1=y
382CONFIG_MTD_CFI_I2=y
383# CONFIG_MTD_CFI_I4 is not set
384# CONFIG_MTD_CFI_I8 is not set
385# CONFIG_MTD_CFI_INTELEXT is not set
386CONFIG_MTD_CFI_AMDSTD=y
387# CONFIG_MTD_CFI_STAA is not set
388CONFIG_MTD_CFI_UTIL=y
389# CONFIG_MTD_RAM is not set
390# CONFIG_MTD_ROM is not set
391# CONFIG_MTD_ABSENT is not set
392
393#
394# Mapping drivers for chip access
395#
396# CONFIG_MTD_COMPLEX_MAPPINGS is not set
397# CONFIG_MTD_PHYSMAP is not set
398CONFIG_MTD_PHYSMAP_OF=y
399# CONFIG_MTD_PLATRAM is not set
400
401#
402# Self-contained MTD device drivers
403#
404# CONFIG_MTD_SLRAM is not set
405# CONFIG_MTD_PHRAM is not set
406# CONFIG_MTD_MTDRAM is not set
407# CONFIG_MTD_BLOCK2MTD is not set
408
409#
410# Disk-On-Chip Device Drivers
411#
412# CONFIG_MTD_DOC2000 is not set
413# CONFIG_MTD_DOC2001 is not set
414# CONFIG_MTD_DOC2001PLUS is not set
415# CONFIG_MTD_NAND is not set
416# CONFIG_MTD_ONENAND is not set
417
418#
419# UBI - Unsorted block images
420#
421# CONFIG_MTD_UBI is not set
422CONFIG_OF_DEVICE=y
423# CONFIG_PARPORT is not set
424CONFIG_BLK_DEV=y
425# CONFIG_BLK_DEV_FD is not set
426# CONFIG_BLK_DEV_COW_COMMON is not set
427CONFIG_BLK_DEV_LOOP=y
428# CONFIG_BLK_DEV_CRYPTOLOOP is not set
429# CONFIG_BLK_DEV_NBD is not set
430CONFIG_BLK_DEV_RAM=y
431CONFIG_BLK_DEV_RAM_COUNT=16
432CONFIG_BLK_DEV_RAM_SIZE=32768
433CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
434# CONFIG_CDROM_PKTCDVD is not set
435# CONFIG_ATA_OVER_ETH is not set
436CONFIG_MISC_DEVICES=y
437# CONFIG_EEPROM_93CX6 is not set
438CONFIG_IDE=y
439CONFIG_IDE_MAX_HWIFS=4
440CONFIG_BLK_DEV_IDE=y
441
442#
443# Please see Documentation/ide.txt for help/info on IDE drives
444#
445# CONFIG_BLK_DEV_IDE_SATA is not set
446# CONFIG_BLK_DEV_IDEDISK is not set
447# CONFIG_IDEDISK_MULTI_MODE is not set
448# CONFIG_BLK_DEV_IDECD is not set
449# CONFIG_BLK_DEV_IDETAPE is not set
450# CONFIG_BLK_DEV_IDEFLOPPY is not set
451# CONFIG_IDE_TASK_IOCTL is not set
452CONFIG_IDE_PROC_FS=y
453
454#
455# IDE chipset support/bugfixes
456#
457CONFIG_IDE_GENERIC=y
458# CONFIG_BLK_DEV_PLATFORM is not set
459# CONFIG_BLK_DEV_IDEDMA is not set
460CONFIG_IDE_ARCH_OBSOLETE_INIT=y
461# CONFIG_BLK_DEV_HD is not set
462
463#
464# SCSI device support
465#
466# CONFIG_RAID_ATTRS is not set
467# CONFIG_SCSI is not set
468# CONFIG_SCSI_DMA is not set
469# CONFIG_SCSI_NETLINK is not set
470# CONFIG_ATA is not set
471# CONFIG_MD is not set
472# CONFIG_MACINTOSH_DRIVERS is not set
473CONFIG_NETDEVICES=y
474# CONFIG_NETDEVICES_MULTIQUEUE is not set
475# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set
477# CONFIG_MACVLAN is not set
478# CONFIG_EQUALIZER is not set
479# CONFIG_TUN is not set
480# CONFIG_VETH is not set
481CONFIG_PHYLIB=y
482
483#
484# MII PHY device drivers
485#
486CONFIG_MARVELL_PHY=y
487# CONFIG_DAVICOM_PHY is not set
488# CONFIG_QSEMI_PHY is not set
489# CONFIG_LXT_PHY is not set
490# CONFIG_CICADA_PHY is not set
491# CONFIG_VITESSE_PHY is not set
492# CONFIG_SMSC_PHY is not set
493# CONFIG_BROADCOM_PHY is not set
494# CONFIG_ICPLUS_PHY is not set
495# CONFIG_REALTEK_PHY is not set
496# CONFIG_FIXED_PHY is not set
497CONFIG_MDIO_BITBANG=y
498CONFIG_NET_ETHERNET=y
499CONFIG_MII=y
500# CONFIG_IBM_NEW_EMAC_ZMII is not set
501# CONFIG_IBM_NEW_EMAC_RGMII is not set
502# CONFIG_IBM_NEW_EMAC_TAH is not set
503# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
504# CONFIG_B44 is not set
505CONFIG_FS_ENET=y
506# CONFIG_FS_ENET_HAS_SCC is not set
507CONFIG_FS_ENET_HAS_FCC=y
508CONFIG_FS_ENET_MDIO_FCC=y
509CONFIG_NETDEV_1000=y
510# CONFIG_E1000E_ENABLED is not set
511CONFIG_GIANFAR=y
512CONFIG_GFAR_NAPI=y
513CONFIG_NETDEV_10000=y
514
515#
516# Wireless LAN
517#
518# CONFIG_WLAN_PRE80211 is not set
519# CONFIG_WLAN_80211 is not set
520# CONFIG_WAN is not set
521# CONFIG_PPP is not set
522# CONFIG_SLIP is not set
523# CONFIG_NETCONSOLE is not set
524# CONFIG_NETPOLL is not set
525# CONFIG_NET_POLL_CONTROLLER is not set
526# CONFIG_ISDN is not set
527# CONFIG_PHONE is not set
528
529#
530# Input device support
531#
532CONFIG_INPUT=y
533# CONFIG_INPUT_FF_MEMLESS is not set
534# CONFIG_INPUT_POLLDEV is not set
535
536#
537# Userland interfaces
538#
539# CONFIG_INPUT_MOUSEDEV is not set
540# CONFIG_INPUT_JOYDEV is not set
541# CONFIG_INPUT_EVDEV is not set
542# CONFIG_INPUT_EVBUG is not set
543
544#
545# Input Device Drivers
546#
547# CONFIG_INPUT_KEYBOARD is not set
548# CONFIG_INPUT_MOUSE is not set
549# CONFIG_INPUT_JOYSTICK is not set
550# CONFIG_INPUT_TABLET is not set
551# CONFIG_INPUT_TOUCHSCREEN is not set
552# CONFIG_INPUT_MISC is not set
553
554#
555# Hardware I/O ports
556#
557# CONFIG_SERIO is not set
558# CONFIG_GAMEPORT is not set
559
560#
561# Character devices
562#
563# CONFIG_VT is not set
564# CONFIG_SERIAL_NONSTANDARD is not set
565
566#
567# Serial drivers
568#
569# CONFIG_SERIAL_8250 is not set
570
571#
572# Non-8250 serial port support
573#
574# CONFIG_SERIAL_UARTLITE is not set
575CONFIG_SERIAL_CORE=y
576CONFIG_SERIAL_CORE_CONSOLE=y
577CONFIG_SERIAL_CPM=y
578CONFIG_SERIAL_CPM_CONSOLE=y
579CONFIG_SERIAL_CPM_SCC1=y
580# CONFIG_SERIAL_CPM_SCC2 is not set
581# CONFIG_SERIAL_CPM_SCC3 is not set
582# CONFIG_SERIAL_CPM_SCC4 is not set
583# CONFIG_SERIAL_CPM_SMC1 is not set
584# CONFIG_SERIAL_CPM_SMC2 is not set
585CONFIG_UNIX98_PTYS=y
586CONFIG_LEGACY_PTYS=y
587CONFIG_LEGACY_PTY_COUNT=256
588# CONFIG_IPMI_HANDLER is not set
589CONFIG_HW_RANDOM=y
590# CONFIG_NVRAM is not set
591CONFIG_GEN_RTC=y
592# CONFIG_GEN_RTC_X is not set
593# CONFIG_R3964 is not set
594# CONFIG_RAW_DRIVER is not set
595# CONFIG_TCG_TPM is not set
596# CONFIG_I2C is not set
597
598#
599# SPI support
600#
601# CONFIG_SPI is not set
602# CONFIG_SPI_MASTER is not set
603# CONFIG_W1 is not set
604# CONFIG_POWER_SUPPLY is not set
605CONFIG_HWMON=y
606# CONFIG_HWMON_VID is not set
607# CONFIG_SENSORS_F71805F is not set
608# CONFIG_SENSORS_F71882FG is not set
609# CONFIG_SENSORS_IT87 is not set
610# CONFIG_SENSORS_PC87360 is not set
611# CONFIG_SENSORS_PC87427 is not set
612# CONFIG_SENSORS_SMSC47M1 is not set
613# CONFIG_SENSORS_SMSC47B397 is not set
614# CONFIG_SENSORS_VT1211 is not set
615# CONFIG_SENSORS_W83627HF is not set
616# CONFIG_SENSORS_W83627EHF is not set
617# CONFIG_HWMON_DEBUG_CHIP is not set
618# CONFIG_WATCHDOG is not set
619
620#
621# Sonics Silicon Backplane
622#
623CONFIG_SSB_POSSIBLE=y
624# CONFIG_SSB is not set
625
626#
627# Multifunction device drivers
628#
629# CONFIG_MFD_SM501 is not set
630
631#
632# Multimedia devices
633#
634# CONFIG_VIDEO_DEV is not set
635# CONFIG_DVB_CORE is not set
636CONFIG_DAB=y
637
638#
639# Graphics support
640#
641# CONFIG_VGASTATE is not set
642CONFIG_VIDEO_OUTPUT_CONTROL=y
643# CONFIG_FB is not set
644# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
645
646#
647# Display device support
648#
649# CONFIG_DISPLAY_SUPPORT is not set
650
651#
652# Sound
653#
654# CONFIG_SOUND is not set
655CONFIG_HID_SUPPORT=y
656CONFIG_HID=y
657# CONFIG_HID_DEBUG is not set
658# CONFIG_HIDRAW is not set
659CONFIG_USB_SUPPORT=y
660# CONFIG_USB_ARCH_HAS_HCD is not set
661# CONFIG_USB_ARCH_HAS_OHCI is not set
662# CONFIG_USB_ARCH_HAS_EHCI is not set
663
664#
665# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
666#
667# CONFIG_USB_GADGET is not set
668# CONFIG_MMC is not set
669# CONFIG_NEW_LEDS is not set
670# CONFIG_EDAC is not set
671# CONFIG_RTC_CLASS is not set
672
673#
674# Userspace I/O
675#
676# CONFIG_UIO is not set
677
678#
679# File systems
680#
681CONFIG_EXT2_FS=y
682# CONFIG_EXT2_FS_XATTR is not set
683# CONFIG_EXT2_FS_XIP is not set
684CONFIG_EXT3_FS=y
685CONFIG_EXT3_FS_XATTR=y
686# CONFIG_EXT3_FS_POSIX_ACL is not set
687# CONFIG_EXT3_FS_SECURITY is not set
688# CONFIG_EXT4DEV_FS is not set
689CONFIG_JBD=y
690# CONFIG_JBD_DEBUG is not set
691CONFIG_FS_MBCACHE=y
692# CONFIG_REISERFS_FS is not set
693# CONFIG_JFS_FS is not set
694# CONFIG_FS_POSIX_ACL is not set
695# CONFIG_XFS_FS is not set
696# CONFIG_GFS2_FS is not set
697# CONFIG_OCFS2_FS is not set
698# CONFIG_MINIX_FS is not set
699# CONFIG_ROMFS_FS is not set
700CONFIG_INOTIFY=y
701CONFIG_INOTIFY_USER=y
702# CONFIG_QUOTA is not set
703CONFIG_DNOTIFY=y
704# CONFIG_AUTOFS_FS is not set
705# CONFIG_AUTOFS4_FS is not set
706# CONFIG_FUSE_FS is not set
707
708#
709# CD-ROM/DVD Filesystems
710#
711# CONFIG_ISO9660_FS is not set
712# CONFIG_UDF_FS is not set
713
714#
715# DOS/FAT/NT Filesystems
716#
717# CONFIG_MSDOS_FS is not set
718# CONFIG_VFAT_FS is not set
719# CONFIG_NTFS_FS is not set
720
721#
722# Pseudo filesystems
723#
724CONFIG_PROC_FS=y
725CONFIG_PROC_KCORE=y
726CONFIG_PROC_SYSCTL=y
727CONFIG_SYSFS=y
728CONFIG_TMPFS=y
729# CONFIG_TMPFS_POSIX_ACL is not set
730# CONFIG_HUGETLB_PAGE is not set
731# CONFIG_CONFIGFS_FS is not set
732
733#
734# Miscellaneous filesystems
735#
736# CONFIG_ADFS_FS is not set
737# CONFIG_AFFS_FS is not set
738# CONFIG_HFS_FS is not set
739# CONFIG_HFSPLUS_FS is not set
740# CONFIG_BEFS_FS is not set
741# CONFIG_BFS_FS is not set
742# CONFIG_EFS_FS is not set
743# CONFIG_JFFS2_FS is not set
744# CONFIG_CRAMFS is not set
745# CONFIG_VXFS_FS is not set
746# CONFIG_HPFS_FS is not set
747# CONFIG_QNX4FS_FS is not set
748# CONFIG_SYSV_FS is not set
749# CONFIG_UFS_FS is not set
750CONFIG_NETWORK_FILESYSTEMS=y
751CONFIG_NFS_FS=y
752# CONFIG_NFS_V3 is not set
753# CONFIG_NFS_V4 is not set
754# CONFIG_NFS_DIRECTIO is not set
755# CONFIG_NFSD is not set
756CONFIG_ROOT_NFS=y
757CONFIG_LOCKD=y
758CONFIG_NFS_COMMON=y
759CONFIG_SUNRPC=y
760# CONFIG_SUNRPC_BIND34 is not set
761# CONFIG_RPCSEC_GSS_KRB5 is not set
762# CONFIG_RPCSEC_GSS_SPKM3 is not set
763# CONFIG_SMB_FS is not set
764# CONFIG_CIFS is not set
765# CONFIG_NCP_FS is not set
766# CONFIG_CODA_FS is not set
767# CONFIG_AFS_FS is not set
768
769#
770# Partition Types
771#
772CONFIG_PARTITION_ADVANCED=y
773# CONFIG_ACORN_PARTITION is not set
774# CONFIG_OSF_PARTITION is not set
775# CONFIG_AMIGA_PARTITION is not set
776# CONFIG_ATARI_PARTITION is not set
777# CONFIG_MAC_PARTITION is not set
778# CONFIG_MSDOS_PARTITION is not set
779# CONFIG_LDM_PARTITION is not set
780# CONFIG_SGI_PARTITION is not set
781# CONFIG_ULTRIX_PARTITION is not set
782# CONFIG_SUN_PARTITION is not set
783# CONFIG_KARMA_PARTITION is not set
784# CONFIG_EFI_PARTITION is not set
785# CONFIG_SYSV68_PARTITION is not set
786# CONFIG_NLS is not set
787# CONFIG_DLM is not set
788
789#
790# Library routines
791#
792CONFIG_BITREVERSE=y
793# CONFIG_CRC_CCITT is not set
794# CONFIG_CRC16 is not set
795# CONFIG_CRC_ITU_T is not set
796CONFIG_CRC32=y
797# CONFIG_CRC7 is not set
798# CONFIG_LIBCRC32C is not set
799CONFIG_PLIST=y
800CONFIG_HAS_IOMEM=y
801CONFIG_HAS_IOPORT=y
802CONFIG_HAS_DMA=y
803
804#
805# Kernel hacking
806#
807# CONFIG_PRINTK_TIME is not set
808CONFIG_ENABLE_WARN_DEPRECATED=y
809CONFIG_ENABLE_MUST_CHECK=y
810# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set
812CONFIG_DEBUG_FS=y
813# CONFIG_HEADERS_CHECK is not set
814CONFIG_DEBUG_KERNEL=y
815# CONFIG_DEBUG_SHIRQ is not set
816CONFIG_DETECT_SOFTLOCKUP=y
817CONFIG_SCHED_DEBUG=y
818# CONFIG_SCHEDSTATS is not set
819# CONFIG_TIMER_STATS is not set
820# CONFIG_SLUB_DEBUG_ON is not set
821# CONFIG_DEBUG_RT_MUTEXES is not set
822# CONFIG_RT_MUTEX_TESTER is not set
823# CONFIG_DEBUG_SPINLOCK is not set
824CONFIG_DEBUG_MUTEXES=y
825# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
826# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
827# CONFIG_DEBUG_KOBJECT is not set
828# CONFIG_DEBUG_HIGHMEM is not set
829# CONFIG_DEBUG_BUGVERBOSE is not set
830# CONFIG_DEBUG_INFO is not set
831# CONFIG_DEBUG_VM is not set
832# CONFIG_DEBUG_LIST is not set
833# CONFIG_DEBUG_SG is not set
834CONFIG_FORCED_INLINING=y
835# CONFIG_BOOT_PRINTK_DELAY is not set
836# CONFIG_BACKTRACE_SELF_TEST is not set
837# CONFIG_FAULT_INJECTION is not set
838# CONFIG_SAMPLES is not set
839# CONFIG_DEBUG_STACKOVERFLOW is not set
840# CONFIG_DEBUG_STACK_USAGE is not set
841# CONFIG_DEBUG_PAGEALLOC is not set
842# CONFIG_DEBUGGER is not set
843# CONFIG_KGDB_CONSOLE is not set
844# CONFIG_VIRQ_DEBUG is not set
845# CONFIG_BDI_SWITCH is not set
846# CONFIG_PPC_EARLY_DEBUG is not set
847
848#
849# Security options
850#
851# CONFIG_KEYS is not set
852# CONFIG_SECURITY is not set
853# CONFIG_SECURITY_FILE_CAPABILITIES is not set
854CONFIG_CRYPTO=y
855# CONFIG_CRYPTO_SEQIV is not set
856# CONFIG_CRYPTO_MANAGER is not set
857# CONFIG_CRYPTO_HMAC is not set
858# CONFIG_CRYPTO_XCBC is not set
859# CONFIG_CRYPTO_NULL is not set
860# CONFIG_CRYPTO_MD4 is not set
861# CONFIG_CRYPTO_MD5 is not set
862# CONFIG_CRYPTO_SHA1 is not set
863# CONFIG_CRYPTO_SHA256 is not set
864# CONFIG_CRYPTO_SHA512 is not set
865# CONFIG_CRYPTO_WP512 is not set
866# CONFIG_CRYPTO_TGR192 is not set
867# CONFIG_CRYPTO_GF128MUL is not set
868# CONFIG_CRYPTO_ECB is not set
869# CONFIG_CRYPTO_CBC is not set
870# CONFIG_CRYPTO_PCBC is not set
871# CONFIG_CRYPTO_LRW is not set
872# CONFIG_CRYPTO_XTS is not set
873# CONFIG_CRYPTO_CTR is not set
874# CONFIG_CRYPTO_GCM is not set
875# CONFIG_CRYPTO_CCM is not set
876# CONFIG_CRYPTO_CRYPTD is not set
877# CONFIG_CRYPTO_DES is not set
878# CONFIG_CRYPTO_FCRYPT is not set
879# CONFIG_CRYPTO_BLOWFISH is not set
880# CONFIG_CRYPTO_TWOFISH is not set
881# CONFIG_CRYPTO_SERPENT is not set
882# CONFIG_CRYPTO_AES is not set
883# CONFIG_CRYPTO_CAST5 is not set
884# CONFIG_CRYPTO_CAST6 is not set
885# CONFIG_CRYPTO_TEA is not set
886# CONFIG_CRYPTO_ARC4 is not set
887# CONFIG_CRYPTO_KHAZAD is not set
888# CONFIG_CRYPTO_ANUBIS is not set
889# CONFIG_CRYPTO_SEED is not set
890# CONFIG_CRYPTO_SALSA20 is not set
891# CONFIG_CRYPTO_DEFLATE is not set
892# CONFIG_CRYPTO_MICHAEL_MIC is not set
893# CONFIG_CRYPTO_CRC32C is not set
894# CONFIG_CRYPTO_CAMELLIA is not set
895# CONFIG_CRYPTO_AUTHENC is not set
896# CONFIG_CRYPTO_LZO is not set
897CONFIG_CRYPTO_HW=y
898# CONFIG_PPC_CLOCK is not set
899CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
index b998539da86e..b998539da86e 100644
--- a/arch/powerpc/configs/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
index 418bcdb5f919..a9f113b243ae 100644
--- a/arch/powerpc/configs/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
@@ -162,6 +162,7 @@ CONFIG_MPC85xx=y
162# CONFIG_MPC85xx_CDS is not set 162# CONFIG_MPC85xx_CDS is not set
163# CONFIG_MPC85xx_MDS is not set 163# CONFIG_MPC85xx_MDS is not set
164CONFIG_MPC85xx_DS=y 164CONFIG_MPC85xx_DS=y
165# CONFIG_KSI8560 is not set
165# CONFIG_STX_GP3 is not set 166# CONFIG_STX_GP3 is not set
166# CONFIG_TQM8540 is not set 167# CONFIG_TQM8540 is not set
167# CONFIG_TQM8541 is not set 168# CONFIG_TQM8541 is not set
@@ -202,6 +203,7 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 203# CONFIG_PREEMPT is not set
203CONFIG_BINFMT_ELF=y 204CONFIG_BINFMT_ELF=y
204CONFIG_BINFMT_MISC=m 205CONFIG_BINFMT_MISC=m
206CONFIG_FORCE_MAX_ZONEORDER=11
205CONFIG_MATH_EMULATION=y 207CONFIG_MATH_EMULATION=y
206# CONFIG_IOMMU_HELPER is not set 208# CONFIG_IOMMU_HELPER is not set
207CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 209CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -1255,7 +1257,19 @@ CONFIG_RTC_DRV_CMOS=y
1255# 1257#
1256# on-CPU RTC drivers 1258# on-CPU RTC drivers
1257# 1259#
1258# CONFIG_DMADEVICES is not set 1260CONFIG_DMADEVICES=y
1261
1262#
1263# DMA Devices
1264#
1265CONFIG_FSL_DMA=y
1266# CONFIG_FSL_DMA_SELFTEST is not set
1267CONFIG_DMA_ENGINE=y
1268
1269#
1270# DMA Clients
1271#
1272# CONFIG_NET_DMA is not set
1259 1273
1260# 1274#
1261# Userspace I/O 1275# Userspace I/O
@@ -1447,6 +1461,7 @@ CONFIG_PLIST=y
1447CONFIG_HAS_IOMEM=y 1461CONFIG_HAS_IOMEM=y
1448CONFIG_HAS_IOPORT=y 1462CONFIG_HAS_IOPORT=y
1449CONFIG_HAS_DMA=y 1463CONFIG_HAS_DMA=y
1464CONFIG_HAVE_LMB=y
1450 1465
1451# 1466#
1452# Kernel hacking 1467# Kernel hacking
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
index 851ac9115617..851ac9115617 100644
--- a/arch/powerpc/configs/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/85xx/mpc8568mds_defconfig
index 2b866b385607..2b866b385607 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8568mds_defconfig
diff --git a/arch/powerpc/configs/mpc8572_ds_defconfig b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
index 53aa6f3173a5..53aa6f3173a5 100644
--- a/arch/powerpc/configs/mpc8572_ds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
index a469fe918816..a469fe918816 100644
--- a/arch/powerpc/configs/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
diff --git a/arch/powerpc/configs/sbc8548_defconfig b/arch/powerpc/configs/85xx/sbc8548_defconfig
index 67f67978c742..67f67978c742 100644
--- a/arch/powerpc/configs/sbc8548_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8548_defconfig
diff --git a/arch/powerpc/configs/sbc8560_defconfig b/arch/powerpc/configs/85xx/sbc8560_defconfig
index fef605579e29..fef605579e29 100644
--- a/arch/powerpc/configs/sbc8560_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8560_defconfig
diff --git a/arch/powerpc/configs/stx_gp3_defconfig b/arch/powerpc/configs/85xx/stx_gp3_defconfig
index 1d303c49bb0c..1d303c49bb0c 100644
--- a/arch/powerpc/configs/stx_gp3_defconfig
+++ b/arch/powerpc/configs/85xx/stx_gp3_defconfig
diff --git a/arch/powerpc/configs/tqm8540_defconfig b/arch/powerpc/configs/85xx/tqm8540_defconfig
index d39ee3b35bfc..d39ee3b35bfc 100644
--- a/arch/powerpc/configs/tqm8540_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8540_defconfig
diff --git a/arch/powerpc/configs/tqm8541_defconfig b/arch/powerpc/configs/85xx/tqm8541_defconfig
index cbf6ad2d71da..cbf6ad2d71da 100644
--- a/arch/powerpc/configs/tqm8541_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8541_defconfig
diff --git a/arch/powerpc/configs/tqm8555_defconfig b/arch/powerpc/configs/85xx/tqm8555_defconfig
index bbff962c8472..bbff962c8472 100644
--- a/arch/powerpc/configs/tqm8555_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8555_defconfig
diff --git a/arch/powerpc/configs/tqm8560_defconfig b/arch/powerpc/configs/85xx/tqm8560_defconfig
index 63c5ec8b6515..63c5ec8b6515 100644
--- a/arch/powerpc/configs/tqm8560_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8560_defconfig
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 38b85b211c38..d7fd298bd234 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 10:33:36 2008 4# Thu Mar 27 13:55:37 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -74,8 +74,6 @@ CONFIG_IKCONFIG_PROC=y
74CONFIG_LOG_BUF_SHIFT=15 74CONFIG_LOG_BUF_SHIFT=15
75# CONFIG_CGROUPS is not set 75# CONFIG_CGROUPS is not set
76# CONFIG_GROUP_SCHED is not set 76# CONFIG_GROUP_SCHED is not set
77# CONFIG_USER_SCHED is not set
78# CONFIG_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y 77CONFIG_SYSFS_DEPRECATED=y
80CONFIG_SYSFS_DEPRECATED_V2=y 78CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
@@ -243,7 +241,7 @@ CONFIG_PCI_SYSCALL=y
243# CONFIG_PCIEPORTBUS is not set 241# CONFIG_PCIEPORTBUS is not set
244CONFIG_ARCH_SUPPORTS_MSI=y 242CONFIG_ARCH_SUPPORTS_MSI=y
245# CONFIG_PCI_MSI is not set 243# CONFIG_PCI_MSI is not set
246CONFIG_PCI_LEGACY=y 244# CONFIG_PCI_LEGACY is not set
247# CONFIG_PCI_DEBUG is not set 245# CONFIG_PCI_DEBUG is not set
248# CONFIG_PCCARD is not set 246# CONFIG_PCCARD is not set
249# CONFIG_HOTPLUG_PCI is not set 247# CONFIG_HOTPLUG_PCI is not set
@@ -1328,6 +1326,7 @@ CONFIG_PLIST=y
1328CONFIG_HAS_IOMEM=y 1326CONFIG_HAS_IOMEM=y
1329CONFIG_HAS_IOPORT=y 1327CONFIG_HAS_IOPORT=y
1330CONFIG_HAS_DMA=y 1328CONFIG_HAS_DMA=y
1329CONFIG_HAVE_LMB=y
1331 1330
1332# 1331#
1333# Kernel hacking 1332# Kernel hacking
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 0f82f66a60f8..a20501f89474 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 10:36:41 2008 4# Thu Mar 27 13:55:43 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=17 77CONFIG_LOG_BUF_SHIFT=17
78# CONFIG_CGROUPS is not set 78# CONFIG_CGROUPS is not set
79# CONFIG_GROUP_SCHED is not set 79# CONFIG_GROUP_SCHED is not set
80# CONFIG_USER_SCHED is not set
81# CONFIG_CGROUP_SCHED is not set
82CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
83CONFIG_SYSFS_DEPRECATED_V2=y 81CONFIG_SYSFS_DEPRECATED_V2=y
84# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
@@ -276,7 +274,7 @@ CONFIG_PCI_SYSCALL=y
276# CONFIG_PCIEPORTBUS is not set 274# CONFIG_PCIEPORTBUS is not set
277CONFIG_ARCH_SUPPORTS_MSI=y 275CONFIG_ARCH_SUPPORTS_MSI=y
278CONFIG_PCI_MSI=y 276CONFIG_PCI_MSI=y
279CONFIG_PCI_LEGACY=y 277# CONFIG_PCI_LEGACY is not set
280# CONFIG_PCI_DEBUG is not set 278# CONFIG_PCI_DEBUG is not set
281# CONFIG_PCCARD is not set 279# CONFIG_PCCARD is not set
282# CONFIG_HOTPLUG_PCI is not set 280# CONFIG_HOTPLUG_PCI is not set
@@ -1596,6 +1594,7 @@ CONFIG_PLIST=y
1596CONFIG_HAS_IOMEM=y 1594CONFIG_HAS_IOMEM=y
1597CONFIG_HAS_IOPORT=y 1595CONFIG_HAS_IOPORT=y
1598CONFIG_HAS_DMA=y 1596CONFIG_HAS_DMA=y
1597CONFIG_HAVE_LMB=y
1599 1598
1600# 1599#
1601# Kernel hacking 1600# Kernel hacking
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index 8d9a84f50157..b3128fb7ce7e 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 10:43:46 2008 4# Thu Mar 27 13:55:45 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=17 77CONFIG_LOG_BUF_SHIFT=17
78# CONFIG_CGROUPS is not set 78# CONFIG_CGROUPS is not set
79# CONFIG_GROUP_SCHED is not set 79# CONFIG_GROUP_SCHED is not set
80# CONFIG_USER_SCHED is not set
81# CONFIG_CGROUP_SCHED is not set
82CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
83CONFIG_SYSFS_DEPRECATED_V2=y 81CONFIG_SYSFS_DEPRECATED_V2=y
84# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
@@ -261,7 +259,7 @@ CONFIG_PCI_SYSCALL=y
261# CONFIG_PCIEPORTBUS is not set 259# CONFIG_PCIEPORTBUS is not set
262CONFIG_ARCH_SUPPORTS_MSI=y 260CONFIG_ARCH_SUPPORTS_MSI=y
263# CONFIG_PCI_MSI is not set 261# CONFIG_PCI_MSI is not set
264CONFIG_PCI_LEGACY=y 262# CONFIG_PCI_LEGACY is not set
265# CONFIG_PCI_DEBUG is not set 263# CONFIG_PCI_DEBUG is not set
266# CONFIG_PCCARD is not set 264# CONFIG_PCCARD is not set
267# CONFIG_HOTPLUG_PCI is not set 265# CONFIG_HOTPLUG_PCI is not set
@@ -1065,6 +1063,7 @@ CONFIG_PLIST=y
1065CONFIG_HAS_IOMEM=y 1063CONFIG_HAS_IOMEM=y
1066CONFIG_HAS_IOPORT=y 1064CONFIG_HAS_IOPORT=y
1067CONFIG_HAS_DMA=y 1065CONFIG_HAS_DMA=y
1066CONFIG_HAVE_LMB=y
1068 1067
1069# 1068#
1070# Kernel hacking 1069# Kernel hacking
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 8b810d056440..7a166a39d92d 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -333,7 +333,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
333CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 333CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
334CONFIG_STANDALONE=y 334CONFIG_STANDALONE=y
335CONFIG_PREVENT_FIRMWARE_BUILD=y 335CONFIG_PREVENT_FIRMWARE_BUILD=y
336# CONFIG_FW_LOADER is not set 336CONFIG_FW_LOADER=y
337# CONFIG_DEBUG_DRIVER is not set 337# CONFIG_DEBUG_DRIVER is not set
338# CONFIG_DEBUG_DEVRES is not set 338# CONFIG_DEBUG_DEVRES is not set
339# CONFIG_SYS_HYPERVISOR is not set 339# CONFIG_SYS_HYPERVISOR is not set
@@ -374,6 +374,7 @@ CONFIG_BLK_DEV_IDEDISK=y
374CONFIG_BLK_DEV_IDECD=y 374CONFIG_BLK_DEV_IDECD=y
375# CONFIG_BLK_DEV_IDETAPE is not set 375# CONFIG_BLK_DEV_IDETAPE is not set
376# CONFIG_BLK_DEV_IDEFLOPPY is not set 376# CONFIG_BLK_DEV_IDEFLOPPY is not set
377# CONFIG_BLK_DEV_IDESCSI is not set
377CONFIG_IDE_TASK_IOCTL=y 378CONFIG_IDE_TASK_IOCTL=y
378CONFIG_IDE_PROC_FS=y 379CONFIG_IDE_PROC_FS=y
379 380
@@ -427,10 +428,129 @@ CONFIG_IDE_ARCH_OBSOLETE_INIT=y
427# SCSI device support 428# SCSI device support
428# 429#
429# CONFIG_RAID_ATTRS is not set 430# CONFIG_RAID_ATTRS is not set
430# CONFIG_SCSI is not set 431CONFIG_SCSI=y
431# CONFIG_SCSI_DMA is not set 432CONFIG_SCSI_DMA=y
433# CONFIG_SCSI_TGT is not set
432# CONFIG_SCSI_NETLINK is not set 434# CONFIG_SCSI_NETLINK is not set
433# CONFIG_ATA is not set 435# CONFIG_SCSI_PROC_FS is not set
436
437#
438# SCSI support type (disk, tape, CD-ROM)
439#
440CONFIG_BLK_DEV_SD=y
441# CONFIG_CHR_DEV_ST is not set
442# CONFIG_CHR_DEV_OSST is not set
443# CONFIG_BLK_DEV_SR is not set
444CONFIG_CHR_DEV_SG=y
445# CONFIG_CHR_DEV_SCH is not set
446
447#
448# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
449#
450# CONFIG_SCSI_MULTI_LUN is not set
451# CONFIG_SCSI_CONSTANTS is not set
452# CONFIG_SCSI_LOGGING is not set
453# CONFIG_SCSI_SCAN_ASYNC is not set
454CONFIG_SCSI_WAIT_SCAN=m
455
456#
457# SCSI Transports
458#
459# CONFIG_SCSI_SPI_ATTRS is not set
460# CONFIG_SCSI_FC_ATTRS is not set
461# CONFIG_SCSI_ISCSI_ATTRS is not set
462# CONFIG_SCSI_SAS_LIBSAS is not set
463# CONFIG_SCSI_SRP_ATTRS is not set
464CONFIG_SCSI_LOWLEVEL=y
465# CONFIG_ISCSI_TCP is not set
466# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
467# CONFIG_SCSI_3W_9XXX is not set
468# CONFIG_SCSI_ACARD is not set
469# CONFIG_SCSI_AACRAID is not set
470# CONFIG_SCSI_AIC7XXX is not set
471# CONFIG_SCSI_AIC7XXX_OLD is not set
472# CONFIG_SCSI_AIC79XX is not set
473# CONFIG_SCSI_AIC94XX is not set
474# CONFIG_SCSI_ARCMSR is not set
475# CONFIG_MEGARAID_NEWGEN is not set
476# CONFIG_MEGARAID_LEGACY is not set
477# CONFIG_MEGARAID_SAS is not set
478# CONFIG_SCSI_HPTIOP is not set
479# CONFIG_SCSI_DMX3191D is not set
480# CONFIG_SCSI_EATA is not set
481# CONFIG_SCSI_FUTURE_DOMAIN is not set
482# CONFIG_SCSI_GDTH is not set
483# CONFIG_SCSI_IPS is not set
484# CONFIG_SCSI_INITIO is not set
485# CONFIG_SCSI_INIA100 is not set
486# CONFIG_SCSI_STEX is not set
487# CONFIG_SCSI_SYM53C8XX_2 is not set
488CONFIG_SCSI_IPR=y
489CONFIG_SCSI_IPR_TRACE=y
490CONFIG_SCSI_IPR_DUMP=y
491# CONFIG_SCSI_QLOGIC_1280 is not set
492# CONFIG_SCSI_QLA_FC is not set
493# CONFIG_SCSI_QLA_ISCSI is not set
494# CONFIG_SCSI_LPFC is not set
495# CONFIG_SCSI_DC395x is not set
496# CONFIG_SCSI_DC390T is not set
497# CONFIG_SCSI_DEBUG is not set
498# CONFIG_SCSI_SRP is not set
499CONFIG_ATA=y
500CONFIG_ATA_NONSTANDARD=y
501# CONFIG_SATA_AHCI is not set
502# CONFIG_SATA_SVW is not set
503# CONFIG_ATA_PIIX is not set
504# CONFIG_SATA_MV is not set
505# CONFIG_SATA_NV is not set
506# CONFIG_PDC_ADMA is not set
507# CONFIG_SATA_QSTOR is not set
508# CONFIG_SATA_PROMISE is not set
509# CONFIG_SATA_SX4 is not set
510# CONFIG_SATA_SIL is not set
511# CONFIG_SATA_SIL24 is not set
512# CONFIG_SATA_SIS is not set
513# CONFIG_SATA_ULI is not set
514# CONFIG_SATA_VIA is not set
515# CONFIG_SATA_VITESSE is not set
516# CONFIG_SATA_INIC162X is not set
517# CONFIG_PATA_ALI is not set
518# CONFIG_PATA_AMD is not set
519# CONFIG_PATA_ARTOP is not set
520# CONFIG_PATA_ATIIXP is not set
521# CONFIG_PATA_CMD640_PCI is not set
522# CONFIG_PATA_CMD64X is not set
523# CONFIG_PATA_CS5520 is not set
524# CONFIG_PATA_CS5530 is not set
525# CONFIG_PATA_CYPRESS is not set
526# CONFIG_PATA_EFAR is not set
527# CONFIG_ATA_GENERIC is not set
528# CONFIG_PATA_HPT366 is not set
529# CONFIG_PATA_HPT37X is not set
530# CONFIG_PATA_HPT3X2N is not set
531# CONFIG_PATA_HPT3X3 is not set
532# CONFIG_PATA_IT821X is not set
533# CONFIG_PATA_IT8213 is not set
534# CONFIG_PATA_JMICRON is not set
535# CONFIG_PATA_TRIFLEX is not set
536# CONFIG_PATA_MARVELL is not set
537# CONFIG_PATA_MPIIX is not set
538# CONFIG_PATA_OLDPIIX is not set
539# CONFIG_PATA_NETCELL is not set
540# CONFIG_PATA_NS87410 is not set
541# CONFIG_PATA_NS87415 is not set
542# CONFIG_PATA_OPTI is not set
543# CONFIG_PATA_OPTIDMA is not set
544# CONFIG_PATA_PDC_OLD is not set
545# CONFIG_PATA_RADISYS is not set
546# CONFIG_PATA_RZ1000 is not set
547# CONFIG_PATA_SC1200 is not set
548# CONFIG_PATA_SERVERWORKS is not set
549# CONFIG_PATA_PDC2027X is not set
550# CONFIG_PATA_SIL680 is not set
551# CONFIG_PATA_SIS is not set
552# CONFIG_PATA_VIA is not set
553# CONFIG_PATA_WINBOND is not set
434# CONFIG_MD is not set 554# CONFIG_MD is not set
435# CONFIG_FUSION is not set 555# CONFIG_FUSION is not set
436 556
@@ -536,6 +656,7 @@ CONFIG_USB_PEGASUS=y
536# CONFIG_HIPPI is not set 656# CONFIG_HIPPI is not set
537# CONFIG_PPP is not set 657# CONFIG_PPP is not set
538# CONFIG_SLIP is not set 658# CONFIG_SLIP is not set
659# CONFIG_NET_FC is not set
539# CONFIG_SHAPER is not set 660# CONFIG_SHAPER is not set
540# CONFIG_NETCONSOLE is not set 661# CONFIG_NETCONSOLE is not set
541# CONFIG_NETPOLL is not set 662# CONFIG_NETPOLL is not set
@@ -783,12 +904,14 @@ CONFIG_USB_UHCI_HCD=y
783# 904#
784# may also be needed; see USB_STORAGE Help for more information 905# may also be needed; see USB_STORAGE Help for more information
785# 906#
907# CONFIG_USB_STORAGE is not set
786# CONFIG_USB_LIBUSUAL is not set 908# CONFIG_USB_LIBUSUAL is not set
787 909
788# 910#
789# USB Imaging devices 911# USB Imaging devices
790# 912#
791# CONFIG_USB_MDC800 is not set 913# CONFIG_USB_MDC800 is not set
914# CONFIG_USB_MICROTEK is not set
792CONFIG_USB_MON=y 915CONFIG_USB_MON=y
793 916
794# 917#
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 029d2dab7deb..9e0dd8201691 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_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-rc6 3# Linux kernel version: 2.6.25-rc9
4# Mon Mar 24 08:48:25 2008 4# Tue Apr 15 18:07:36 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -201,6 +201,7 @@ CONFIG_PREEMPT_NONE=y
201# CONFIG_PREEMPT is not set 201# CONFIG_PREEMPT is not set
202CONFIG_BINFMT_ELF=y 202CONFIG_BINFMT_ELF=y
203# CONFIG_BINFMT_MISC is not set 203# CONFIG_BINFMT_MISC is not set
204CONFIG_FORCE_MAX_ZONEORDER=11
204CONFIG_MATH_EMULATION=y 205CONFIG_MATH_EMULATION=y
205# CONFIG_IOMMU_HELPER is not set 206# CONFIG_IOMMU_HELPER is not set
206CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 207CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -353,7 +354,90 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_FW_LOADER is not set 354# CONFIG_FW_LOADER is not set
354# CONFIG_SYS_HYPERVISOR is not set 355# CONFIG_SYS_HYPERVISOR is not set
355# CONFIG_CONNECTOR is not set 356# CONFIG_CONNECTOR is not set
356# CONFIG_MTD is not set 357CONFIG_MTD=y
358# CONFIG_MTD_DEBUG is not set
359# CONFIG_MTD_CONCAT is not set
360CONFIG_MTD_PARTITIONS=y
361# CONFIG_MTD_REDBOOT_PARTS is not set
362# CONFIG_MTD_CMDLINE_PARTS is not set
363CONFIG_MTD_OF_PARTS=y
364
365#
366# User Modules And Translation Layers
367#
368CONFIG_MTD_CHAR=y
369CONFIG_MTD_BLKDEVS=y
370CONFIG_MTD_BLOCK=y
371# CONFIG_FTL is not set
372# CONFIG_NFTL is not set
373# CONFIG_INFTL is not set
374# CONFIG_RFD_FTL is not set
375# CONFIG_SSFDC is not set
376# CONFIG_MTD_OOPS is not set
377
378#
379# RAM/ROM/Flash chip drivers
380#
381CONFIG_MTD_CFI=y
382# CONFIG_MTD_JEDECPROBE is not set
383CONFIG_MTD_GEN_PROBE=y
384# CONFIG_MTD_CFI_ADV_OPTIONS is not set
385CONFIG_MTD_MAP_BANK_WIDTH_1=y
386CONFIG_MTD_MAP_BANK_WIDTH_2=y
387CONFIG_MTD_MAP_BANK_WIDTH_4=y
388# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
389# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
390# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
391CONFIG_MTD_CFI_I1=y
392CONFIG_MTD_CFI_I2=y
393# CONFIG_MTD_CFI_I4 is not set
394# CONFIG_MTD_CFI_I8 is not set
395# CONFIG_MTD_CFI_INTELEXT is not set
396CONFIG_MTD_CFI_AMDSTD=y
397# CONFIG_MTD_CFI_STAA is not set
398CONFIG_MTD_CFI_UTIL=y
399# CONFIG_MTD_RAM is not set
400# CONFIG_MTD_ROM is not set
401# CONFIG_MTD_ABSENT is not set
402
403#
404# Mapping drivers for chip access
405#
406# CONFIG_MTD_COMPLEX_MAPPINGS is not set
407# CONFIG_MTD_PHYSMAP is not set
408CONFIG_MTD_PHYSMAP_OF=y
409# CONFIG_MTD_PLATRAM is not set
410
411#
412# Self-contained MTD device drivers
413#
414# CONFIG_MTD_SLRAM is not set
415# CONFIG_MTD_PHRAM is not set
416# CONFIG_MTD_MTDRAM is not set
417# CONFIG_MTD_BLOCK2MTD is not set
418
419#
420# Disk-On-Chip Device Drivers
421#
422# CONFIG_MTD_DOC2000 is not set
423# CONFIG_MTD_DOC2001 is not set
424# CONFIG_MTD_DOC2001PLUS is not set
425CONFIG_MTD_NAND=y
426CONFIG_MTD_NAND_VERIFY_WRITE=y
427# CONFIG_MTD_NAND_ECC_SMC is not set
428# CONFIG_MTD_NAND_MUSEUM_IDS is not set
429CONFIG_MTD_NAND_IDS=y
430# CONFIG_MTD_NAND_DISKONCHIP is not set
431# CONFIG_MTD_NAND_NANDSIM is not set
432# CONFIG_MTD_NAND_PLATFORM is not set
433# CONFIG_MTD_ALAUDA is not set
434CONFIG_MTD_NAND_FSL_ELBC=y
435# CONFIG_MTD_ONENAND is not set
436
437#
438# UBI - Unsorted block images
439#
440# CONFIG_MTD_UBI is not set
357CONFIG_OF_DEVICE=y 441CONFIG_OF_DEVICE=y
358# CONFIG_PARPORT is not set 442# CONFIG_PARPORT is not set
359CONFIG_BLK_DEV=y 443CONFIG_BLK_DEV=y
@@ -362,6 +446,7 @@ CONFIG_BLK_DEV=y
362CONFIG_BLK_DEV_LOOP=y 446CONFIG_BLK_DEV_LOOP=y
363# CONFIG_BLK_DEV_CRYPTOLOOP is not set 447# CONFIG_BLK_DEV_CRYPTOLOOP is not set
364# CONFIG_BLK_DEV_NBD is not set 448# CONFIG_BLK_DEV_NBD is not set
449# CONFIG_BLK_DEV_UB is not set
365CONFIG_BLK_DEV_RAM=y 450CONFIG_BLK_DEV_RAM=y
366CONFIG_BLK_DEV_RAM_COUNT=16 451CONFIG_BLK_DEV_RAM_COUNT=16
367CONFIG_BLK_DEV_RAM_SIZE=32768 452CONFIG_BLK_DEV_RAM_SIZE=32768
@@ -469,6 +554,15 @@ CONFIG_NETDEV_10000=y
469# 554#
470# CONFIG_WLAN_PRE80211 is not set 555# CONFIG_WLAN_PRE80211 is not set
471# CONFIG_WLAN_80211 is not set 556# CONFIG_WLAN_80211 is not set
557
558#
559# USB Network Adapters
560#
561# CONFIG_USB_CATC is not set
562# CONFIG_USB_KAWETH is not set
563# CONFIG_USB_PEGASUS is not set
564# CONFIG_USB_RTL8150 is not set
565# CONFIG_USB_USBNET is not set
472# CONFIG_WAN is not set 566# CONFIG_WAN is not set
473# CONFIG_PPP is not set 567# CONFIG_PPP is not set
474# CONFIG_SLIP is not set 568# CONFIG_SLIP is not set
@@ -563,6 +657,7 @@ CONFIG_I2C_MPC=y
563# CONFIG_I2C_SIMTEC is not set 657# CONFIG_I2C_SIMTEC is not set
564# CONFIG_I2C_TAOS_EVM is not set 658# CONFIG_I2C_TAOS_EVM is not set
565# CONFIG_I2C_STUB is not set 659# CONFIG_I2C_STUB is not set
660# CONFIG_I2C_TINY_USB is not set
566 661
567# 662#
568# Miscellaneous I2C Chip support 663# Miscellaneous I2C Chip support
@@ -648,6 +743,11 @@ CONFIG_WATCHDOG=y
648CONFIG_83xx_WDT=y 743CONFIG_83xx_WDT=y
649 744
650# 745#
746# USB-based Watchdog Cards
747#
748# CONFIG_USBPCWATCHDOG is not set
749
750#
651# Sonics Silicon Backplane 751# Sonics Silicon Backplane
652# 752#
653CONFIG_SSB_POSSIBLE=y 753CONFIG_SSB_POSSIBLE=y
@@ -664,6 +764,7 @@ CONFIG_SSB_POSSIBLE=y
664# CONFIG_VIDEO_DEV is not set 764# CONFIG_VIDEO_DEV is not set
665# CONFIG_DVB_CORE is not set 765# CONFIG_DVB_CORE is not set
666CONFIG_DAB=y 766CONFIG_DAB=y
767# CONFIG_USB_DABUSB is not set
667 768
668# 769#
669# Graphics support 770# Graphics support
@@ -686,6 +787,14 @@ CONFIG_HID_SUPPORT=y
686CONFIG_HID=y 787CONFIG_HID=y
687# CONFIG_HID_DEBUG is not set 788# CONFIG_HID_DEBUG is not set
688# CONFIG_HIDRAW is not set 789# CONFIG_HIDRAW is not set
790
791#
792# USB Input Devices
793#
794CONFIG_USB_HID=y
795# CONFIG_USB_HIDINPUT_POWERBOOK is not set
796# CONFIG_HID_FF is not set
797# CONFIG_USB_HIDDEV is not set
689CONFIG_USB_SUPPORT=y 798CONFIG_USB_SUPPORT=y
690CONFIG_USB_ARCH_HAS_HCD=y 799CONFIG_USB_ARCH_HAS_HCD=y
691# CONFIG_USB_ARCH_HAS_OHCI is not set 800# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -715,8 +824,55 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
715# CONFIG_USB_R8A66597_HCD is not set 824# CONFIG_USB_R8A66597_HCD is not set
716 825
717# 826#
827# USB Device Class drivers
828#
829# CONFIG_USB_ACM is not set
830# CONFIG_USB_PRINTER is not set
831
832#
718# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 833# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
719# 834#
835
836#
837# may also be needed; see USB_STORAGE Help for more information
838#
839# CONFIG_USB_STORAGE is not set
840# CONFIG_USB_LIBUSUAL is not set
841
842#
843# USB Imaging devices
844#
845# CONFIG_USB_MDC800 is not set
846# CONFIG_USB_MICROTEK is not set
847CONFIG_USB_MON=y
848
849#
850# USB port drivers
851#
852# CONFIG_USB_SERIAL is not set
853
854#
855# USB Miscellaneous drivers
856#
857# CONFIG_USB_EMI62 is not set
858# CONFIG_USB_EMI26 is not set
859# CONFIG_USB_ADUTUX is not set
860# CONFIG_USB_AUERSWALD is not set
861# CONFIG_USB_RIO500 is not set
862# CONFIG_USB_LEGOTOWER is not set
863# CONFIG_USB_LCD is not set
864# CONFIG_USB_BERRY_CHARGE is not set
865# CONFIG_USB_LED is not set
866# CONFIG_USB_CYPRESS_CY7C63 is not set
867# CONFIG_USB_CYTHERM is not set
868# CONFIG_USB_PHIDGET is not set
869# CONFIG_USB_IDMOUSE is not set
870# CONFIG_USB_FTDI_ELAN is not set
871# CONFIG_USB_APPLEDISPLAY is not set
872# CONFIG_USB_SISUSBVGA is not set
873# CONFIG_USB_LD is not set
874# CONFIG_USB_TRANCEVIBRATOR is not set
875# CONFIG_USB_IOWARRIOR is not set
720# CONFIG_USB_GADGET is not set 876# CONFIG_USB_GADGET is not set
721# CONFIG_MMC is not set 877# CONFIG_MMC is not set
722# CONFIG_MEMSTICK is not set 878# CONFIG_MEMSTICK is not set
@@ -792,6 +948,7 @@ CONFIG_TMPFS=y
792# CONFIG_BEFS_FS is not set 948# CONFIG_BEFS_FS is not set
793# CONFIG_BFS_FS is not set 949# CONFIG_BFS_FS is not set
794# CONFIG_EFS_FS is not set 950# CONFIG_EFS_FS is not set
951# CONFIG_JFFS2_FS is not set
795# CONFIG_CRAMFS is not set 952# CONFIG_CRAMFS is not set
796# CONFIG_VXFS_FS is not set 953# CONFIG_VXFS_FS is not set
797# CONFIG_MINIX_FS is not set 954# CONFIG_MINIX_FS is not set
@@ -862,6 +1019,7 @@ CONFIG_PLIST=y
862CONFIG_HAS_IOMEM=y 1019CONFIG_HAS_IOMEM=y
863CONFIG_HAS_IOPORT=y 1020CONFIG_HAS_IOPORT=y
864CONFIG_HAS_DMA=y 1021CONFIG_HAS_DMA=y
1022CONFIG_HAVE_LMB=y
865 1023
866# 1024#
867# Kernel hacking 1025# Kernel hacking
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 558b0d348d4f..fca114252ac7 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 11:05:14 2008 4# Thu Mar 27 13:56:21 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -77,8 +77,6 @@ CONFIG_IKCONFIG_PROC=y
77CONFIG_LOG_BUF_SHIFT=14 77CONFIG_LOG_BUF_SHIFT=14
78# CONFIG_CGROUPS is not set 78# CONFIG_CGROUPS is not set
79# CONFIG_GROUP_SCHED is not set 79# CONFIG_GROUP_SCHED is not set
80# CONFIG_USER_SCHED is not set
81# CONFIG_CGROUP_SCHED is not set
82CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
83CONFIG_SYSFS_DEPRECATED_V2=y 81CONFIG_SYSFS_DEPRECATED_V2=y
84# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
@@ -272,7 +270,7 @@ CONFIG_PCI_SYSCALL=y
272# CONFIG_PCIEPORTBUS is not set 270# CONFIG_PCIEPORTBUS is not set
273CONFIG_ARCH_SUPPORTS_MSI=y 271CONFIG_ARCH_SUPPORTS_MSI=y
274# CONFIG_PCI_MSI is not set 272# CONFIG_PCI_MSI is not set
275CONFIG_PCI_LEGACY=y 273# CONFIG_PCI_LEGACY is not set
276# CONFIG_PCI_DEBUG is not set 274# CONFIG_PCI_DEBUG is not set
277CONFIG_PCCARD=m 275CONFIG_PCCARD=m
278# CONFIG_PCMCIA_DEBUG is not set 276# CONFIG_PCMCIA_DEBUG is not set
@@ -1895,6 +1893,7 @@ CONFIG_PLIST=y
1895CONFIG_HAS_IOMEM=y 1893CONFIG_HAS_IOMEM=y
1896CONFIG_HAS_IOPORT=y 1894CONFIG_HAS_IOPORT=y
1897CONFIG_HAS_DMA=y 1895CONFIG_HAS_DMA=y
1896CONFIG_HAVE_LMB=y
1898 1897
1899# 1898#
1900# Kernel hacking 1899# Kernel hacking
diff --git a/arch/powerpc/configs/ppc40x_defconfig b/arch/powerpc/configs/ppc40x_defconfig
new file mode 100644
index 000000000000..9d0140e3838e
--- /dev/null
+++ b/arch/powerpc/configs/ppc40x_defconfig
@@ -0,0 +1,896 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc9
4# Tue Apr 15 08:46:44 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14CONFIG_40x=y
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y
34CONFIG_GENERIC_CALIBRATE_DELAY=y
35CONFIG_GENERIC_FIND_NEXT_BIT=y
36# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
37CONFIG_PPC=y
38CONFIG_EARLY_PRINTK=y
39CONFIG_GENERIC_NVRAM=y
40CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
41CONFIG_ARCH_MAY_HAVE_PC_FDC=y
42CONFIG_PPC_OF=y
43CONFIG_OF=y
44CONFIG_PPC_UDBG_16550=y
45# CONFIG_GENERIC_TBSYNC is not set
46CONFIG_AUDIT_ARCH=y
47CONFIG_GENERIC_BUG=y
48# CONFIG_DEFAULT_UIMAGE is not set
49CONFIG_PPC_DCR_NATIVE=y
50# CONFIG_PPC_DCR_MMIO is not set
51CONFIG_PPC_DCR=y
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53
54#
55# General setup
56#
57CONFIG_EXPERIMENTAL=y
58CONFIG_BROKEN_ON_SMP=y
59CONFIG_INIT_ENV_ARG_LIMIT=32
60CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y
63CONFIG_SYSVIPC=y
64CONFIG_SYSVIPC_SYSCTL=y
65CONFIG_POSIX_MQUEUE=y
66# CONFIG_BSD_PROCESS_ACCT is not set
67# CONFIG_TASKSTATS is not set
68# CONFIG_AUDIT is not set
69# CONFIG_IKCONFIG is not set
70CONFIG_LOG_BUF_SHIFT=14
71# CONFIG_CGROUPS is not set
72CONFIG_GROUP_SCHED=y
73CONFIG_FAIR_GROUP_SCHED=y
74# CONFIG_RT_GROUP_SCHED is not set
75CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88CONFIG_KALLSYMS_ALL=y
89CONFIG_KALLSYMS_EXTRA_PASS=y
90CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_COMPAT_BRK=y
95CONFIG_BASE_FULL=y
96CONFIG_FUTEX=y
97CONFIG_ANON_INODES=y
98CONFIG_EPOLL=y
99CONFIG_SIGNALFD=y
100CONFIG_TIMERFD=y
101CONFIG_EVENTFD=y
102CONFIG_SHMEM=y
103CONFIG_VM_EVENT_COUNTERS=y
104CONFIG_SLUB_DEBUG=y
105# CONFIG_SLAB is not set
106CONFIG_SLUB=y
107# CONFIG_SLOB is not set
108# CONFIG_PROFILING is not set
109# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set
112CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y
114CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y
120CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set
123# CONFIG_MODULE_SRCVERSION_ALL is not set
124CONFIG_KMOD=y
125CONFIG_BLOCK=y
126CONFIG_LBD=y
127# CONFIG_BLK_DEV_IO_TRACE is not set
128# CONFIG_LSF is not set
129# CONFIG_BLK_DEV_BSG is not set
130
131#
132# IO Schedulers
133#
134CONFIG_IOSCHED_NOOP=y
135CONFIG_IOSCHED_AS=y
136CONFIG_IOSCHED_DEADLINE=y
137CONFIG_IOSCHED_CFQ=y
138CONFIG_DEFAULT_AS=y
139# CONFIG_DEFAULT_DEADLINE is not set
140# CONFIG_DEFAULT_CFQ is not set
141# CONFIG_DEFAULT_NOOP is not set
142CONFIG_DEFAULT_IOSCHED="anticipatory"
143CONFIG_CLASSIC_RCU=y
144CONFIG_PPC4xx_PCI_EXPRESS=y
145
146#
147# Platform support
148#
149# CONFIG_PPC_MPC512x is not set
150# CONFIG_PPC_MPC5121 is not set
151# CONFIG_PPC_CELL is not set
152# CONFIG_PPC_CELL_NATIVE is not set
153# CONFIG_PQ2ADS is not set
154CONFIG_EP405=y
155CONFIG_KILAUEA=y
156CONFIG_MAKALU=y
157CONFIG_WALNUT=y
158CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y
159CONFIG_405GP=y
160CONFIG_405EX=y
161CONFIG_XILINX_VIRTEX=y
162CONFIG_XILINX_VIRTEX_II_PRO=y
163CONFIG_XILINX_VIRTEX_4_FX=y
164CONFIG_IBM405_ERR77=y
165CONFIG_IBM405_ERR51=y
166# CONFIG_IPIC is not set
167# CONFIG_MPIC is not set
168# CONFIG_MPIC_WEIRD is not set
169# CONFIG_PPC_I8259 is not set
170# CONFIG_PPC_RTAS is not set
171# CONFIG_MMIO_NVRAM is not set
172# CONFIG_PPC_MPC106 is not set
173# CONFIG_PPC_970_NAP is not set
174# CONFIG_PPC_INDIRECT_IO is not set
175# CONFIG_GENERIC_IOMAP is not set
176# CONFIG_CPU_FREQ is not set
177# CONFIG_FSL_ULI1575 is not set
178CONFIG_OF_RTC=y
179
180#
181# Kernel options
182#
183# CONFIG_HIGHMEM is not set
184# CONFIG_TICK_ONESHOT is not set
185# CONFIG_NO_HZ is not set
186# CONFIG_HIGH_RES_TIMERS is not set
187CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
188# CONFIG_HZ_100 is not set
189CONFIG_HZ_250=y
190# CONFIG_HZ_300 is not set
191# CONFIG_HZ_1000 is not set
192CONFIG_HZ=250
193# CONFIG_SCHED_HRTICK is not set
194CONFIG_PREEMPT_NONE=y
195# CONFIG_PREEMPT_VOLUNTARY is not set
196# CONFIG_PREEMPT is not set
197CONFIG_BINFMT_ELF=y
198# CONFIG_BINFMT_MISC is not set
199# CONFIG_MATH_EMULATION is not set
200# CONFIG_IOMMU_HELPER is not set
201CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
202CONFIG_ARCH_HAS_WALK_MEMORY=y
203CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
204CONFIG_ARCH_FLATMEM_ENABLE=y
205CONFIG_ARCH_POPULATES_NODE_MAP=y
206CONFIG_SELECT_MEMORY_MODEL=y
207CONFIG_FLATMEM_MANUAL=y
208# CONFIG_DISCONTIGMEM_MANUAL is not set
209# CONFIG_SPARSEMEM_MANUAL is not set
210CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
214CONFIG_SPLIT_PTLOCK_CPUS=4
215CONFIG_RESOURCES_64BIT=y
216CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y
219CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set
223CONFIG_SECCOMP=y
224CONFIG_ISA_DMA_API=y
225
226#
227# Bus options
228#
229CONFIG_ZONE_DMA=y
230CONFIG_PPC_INDIRECT_PCI=y
231CONFIG_4xx_SOC=y
232CONFIG_PCI=y
233CONFIG_PCI_DOMAINS=y
234CONFIG_PCI_SYSCALL=y
235# CONFIG_PCIEPORTBUS is not set
236CONFIG_ARCH_SUPPORTS_MSI=y
237# CONFIG_PCI_MSI is not set
238# CONFIG_PCI_LEGACY is not set
239# CONFIG_PCI_DEBUG is not set
240# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set
242
243#
244# Advanced setup
245#
246# CONFIG_ADVANCED_OPTIONS is not set
247
248#
249# Default settings for advanced configuration options are used
250#
251CONFIG_HIGHMEM_START=0xfe000000
252CONFIG_LOWMEM_SIZE=0x30000000
253CONFIG_KERNEL_START=0xc0000000
254CONFIG_TASK_SIZE=0xc0000000
255CONFIG_CONSISTENT_START=0xff100000
256CONFIG_CONSISTENT_SIZE=0x00200000
257CONFIG_BOOT_LOAD=0x00400000
258
259#
260# Networking
261#
262CONFIG_NET=y
263
264#
265# Networking options
266#
267CONFIG_PACKET=y
268# CONFIG_PACKET_MMAP is not set
269CONFIG_UNIX=y
270# CONFIG_NET_KEY is not set
271CONFIG_INET=y
272# CONFIG_IP_MULTICAST is not set
273# CONFIG_IP_ADVANCED_ROUTER is not set
274CONFIG_IP_FIB_HASH=y
275CONFIG_IP_PNP=y
276CONFIG_IP_PNP_DHCP=y
277CONFIG_IP_PNP_BOOTP=y
278# CONFIG_IP_PNP_RARP is not set
279# CONFIG_NET_IPIP is not set
280# CONFIG_NET_IPGRE is not set
281# CONFIG_ARPD is not set
282# CONFIG_SYN_COOKIES is not set
283# CONFIG_INET_AH is not set
284# CONFIG_INET_ESP is not set
285# CONFIG_INET_IPCOMP is not set
286# CONFIG_INET_XFRM_TUNNEL is not set
287# CONFIG_INET_TUNNEL is not set
288# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
289# CONFIG_INET_XFRM_MODE_TUNNEL is not set
290# CONFIG_INET_XFRM_MODE_BEET is not set
291# CONFIG_INET_LRO is not set
292CONFIG_INET_DIAG=y
293CONFIG_INET_TCP_DIAG=y
294# CONFIG_TCP_CONG_ADVANCED is not set
295CONFIG_TCP_CONG_CUBIC=y
296CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_TCP_MD5SIG is not set
298# CONFIG_IPV6 is not set
299# CONFIG_INET6_XFRM_TUNNEL is not set
300# CONFIG_INET6_TUNNEL is not set
301# CONFIG_NETWORK_SECMARK is not set
302# CONFIG_NETFILTER is not set
303# CONFIG_IP_DCCP is not set
304# CONFIG_IP_SCTP is not set
305# CONFIG_TIPC is not set
306# CONFIG_ATM is not set
307# CONFIG_BRIDGE is not set
308# CONFIG_VLAN_8021Q is not set
309# CONFIG_DECNET is not set
310# CONFIG_LLC2 is not set
311# CONFIG_IPX is not set
312# CONFIG_ATALK is not set
313# CONFIG_X25 is not set
314# CONFIG_LAPB is not set
315# CONFIG_ECONET is not set
316# CONFIG_WAN_ROUTER is not set
317# CONFIG_NET_SCHED is not set
318
319#
320# Network testing
321#
322# CONFIG_NET_PKTGEN is not set
323# CONFIG_HAMRADIO is not set
324# CONFIG_CAN is not set
325# CONFIG_IRDA is not set
326# CONFIG_BT is not set
327# CONFIG_AF_RXRPC is not set
328
329#
330# Wireless
331#
332# CONFIG_CFG80211 is not set
333# CONFIG_WIRELESS_EXT is not set
334# CONFIG_MAC80211 is not set
335# CONFIG_IEEE80211 is not set
336# CONFIG_RFKILL is not set
337# CONFIG_NET_9P is not set
338
339#
340# Device Drivers
341#
342
343#
344# Generic Driver Options
345#
346CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
347CONFIG_STANDALONE=y
348CONFIG_PREVENT_FIRMWARE_BUILD=y
349CONFIG_FW_LOADER=y
350# CONFIG_DEBUG_DRIVER is not set
351# CONFIG_DEBUG_DEVRES is not set
352# CONFIG_SYS_HYPERVISOR is not set
353CONFIG_CONNECTOR=y
354CONFIG_PROC_EVENTS=y
355CONFIG_MTD=y
356# CONFIG_MTD_DEBUG is not set
357# CONFIG_MTD_CONCAT is not set
358CONFIG_MTD_PARTITIONS=y
359# CONFIG_MTD_REDBOOT_PARTS is not set
360CONFIG_MTD_CMDLINE_PARTS=y
361CONFIG_MTD_OF_PARTS=y
362
363#
364# User Modules And Translation Layers
365#
366CONFIG_MTD_CHAR=y
367CONFIG_MTD_BLKDEVS=m
368CONFIG_MTD_BLOCK=m
369# CONFIG_MTD_BLOCK_RO is not set
370# CONFIG_FTL is not set
371# CONFIG_NFTL is not set
372# CONFIG_INFTL is not set
373# CONFIG_RFD_FTL is not set
374# CONFIG_SSFDC is not set
375# CONFIG_MTD_OOPS is not set
376
377#
378# RAM/ROM/Flash chip drivers
379#
380CONFIG_MTD_CFI=y
381CONFIG_MTD_JEDECPROBE=y
382CONFIG_MTD_GEN_PROBE=y
383# CONFIG_MTD_CFI_ADV_OPTIONS is not set
384CONFIG_MTD_MAP_BANK_WIDTH_1=y
385CONFIG_MTD_MAP_BANK_WIDTH_2=y
386CONFIG_MTD_MAP_BANK_WIDTH_4=y
387# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
388# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
389# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
390CONFIG_MTD_CFI_I1=y
391CONFIG_MTD_CFI_I2=y
392# CONFIG_MTD_CFI_I4 is not set
393# CONFIG_MTD_CFI_I8 is not set
394# CONFIG_MTD_CFI_INTELEXT is not set
395CONFIG_MTD_CFI_AMDSTD=y
396# CONFIG_MTD_CFI_STAA is not set
397CONFIG_MTD_CFI_UTIL=y
398# CONFIG_MTD_RAM is not set
399# CONFIG_MTD_ROM is not set
400# CONFIG_MTD_ABSENT is not set
401
402#
403# Mapping drivers for chip access
404#
405# CONFIG_MTD_COMPLEX_MAPPINGS is not set
406# CONFIG_MTD_PHYSMAP is not set
407CONFIG_MTD_PHYSMAP_OF=y
408# CONFIG_MTD_INTEL_VR_NOR is not set
409# CONFIG_MTD_PLATRAM is not set
410
411#
412# Self-contained MTD device drivers
413#
414# CONFIG_MTD_PMC551 is not set
415# CONFIG_MTD_SLRAM is not set
416# CONFIG_MTD_PHRAM is not set
417# CONFIG_MTD_MTDRAM is not set
418# CONFIG_MTD_BLOCK2MTD is not set
419
420#
421# Disk-On-Chip Device Drivers
422#
423# CONFIG_MTD_DOC2000 is not set
424# CONFIG_MTD_DOC2001 is not set
425# CONFIG_MTD_DOC2001PLUS is not set
426# CONFIG_MTD_NAND is not set
427# CONFIG_MTD_ONENAND is not set
428
429#
430# UBI - Unsorted block images
431#
432# CONFIG_MTD_UBI is not set
433CONFIG_OF_DEVICE=y
434# CONFIG_PARPORT is not set
435CONFIG_BLK_DEV=y
436# CONFIG_BLK_DEV_FD is not set
437# CONFIG_BLK_CPQ_DA is not set
438# CONFIG_BLK_CPQ_CISS_DA is not set
439# CONFIG_BLK_DEV_DAC960 is not set
440# CONFIG_BLK_DEV_UMEM is not set
441# CONFIG_BLK_DEV_COW_COMMON is not set
442# CONFIG_BLK_DEV_LOOP is not set
443# CONFIG_BLK_DEV_NBD is not set
444# CONFIG_BLK_DEV_SX8 is not set
445CONFIG_BLK_DEV_RAM=y
446CONFIG_BLK_DEV_RAM_COUNT=16
447CONFIG_BLK_DEV_RAM_SIZE=35000
448# CONFIG_BLK_DEV_XIP is not set
449# CONFIG_CDROM_PKTCDVD is not set
450# CONFIG_ATA_OVER_ETH is not set
451# CONFIG_XILINX_SYSACE is not set
452CONFIG_MISC_DEVICES=y
453# CONFIG_PHANTOM is not set
454# CONFIG_EEPROM_93CX6 is not set
455# CONFIG_SGI_IOC4 is not set
456# CONFIG_TIFM_CORE is not set
457# CONFIG_ENCLOSURE_SERVICES is not set
458CONFIG_HAVE_IDE=y
459# CONFIG_IDE is not set
460
461#
462# SCSI device support
463#
464# CONFIG_RAID_ATTRS is not set
465# CONFIG_SCSI is not set
466# CONFIG_SCSI_DMA is not set
467# CONFIG_SCSI_NETLINK is not set
468# CONFIG_ATA is not set
469# CONFIG_MD is not set
470# CONFIG_FUSION is not set
471
472#
473# IEEE 1394 (FireWire) support
474#
475# CONFIG_FIREWIRE is not set
476# CONFIG_IEEE1394 is not set
477# CONFIG_I2O is not set
478# CONFIG_MACINTOSH_DRIVERS is not set
479CONFIG_NETDEVICES=y
480# CONFIG_NETDEVICES_MULTIQUEUE is not set
481# CONFIG_DUMMY is not set
482# CONFIG_BONDING is not set
483# CONFIG_MACVLAN is not set
484# CONFIG_EQUALIZER is not set
485# CONFIG_TUN is not set
486# CONFIG_VETH is not set
487# CONFIG_ARCNET is not set
488# CONFIG_PHYLIB is not set
489CONFIG_NET_ETHERNET=y
490# CONFIG_MII is not set
491# CONFIG_HAPPYMEAL is not set
492# CONFIG_SUNGEM is not set
493# CONFIG_CASSINI is not set
494# CONFIG_NET_VENDOR_3COM is not set
495# CONFIG_NET_TULIP is not set
496# CONFIG_HP100 is not set
497CONFIG_IBM_NEW_EMAC=y
498CONFIG_IBM_NEW_EMAC_RXB=128
499CONFIG_IBM_NEW_EMAC_TXB=64
500CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
501CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
502CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
503# CONFIG_IBM_NEW_EMAC_DEBUG is not set
504CONFIG_IBM_NEW_EMAC_ZMII=y
505CONFIG_IBM_NEW_EMAC_RGMII=y
506# CONFIG_IBM_NEW_EMAC_TAH is not set
507CONFIG_IBM_NEW_EMAC_EMAC4=y
508# CONFIG_NET_PCI is not set
509# CONFIG_B44 is not set
510CONFIG_NETDEV_1000=y
511# CONFIG_ACENIC is not set
512# CONFIG_DL2K is not set
513# CONFIG_E1000 is not set
514# CONFIG_E1000E is not set
515# CONFIG_E1000E_ENABLED is not set
516# CONFIG_IP1000 is not set
517# CONFIG_IGB is not set
518# CONFIG_NS83820 is not set
519# CONFIG_HAMACHI is not set
520# CONFIG_YELLOWFIN is not set
521# CONFIG_R8169 is not set
522# CONFIG_SIS190 is not set
523# CONFIG_SKGE is not set
524# CONFIG_SKY2 is not set
525# CONFIG_SK98LIN is not set
526# CONFIG_VIA_VELOCITY is not set
527# CONFIG_TIGON3 is not set
528# CONFIG_BNX2 is not set
529# CONFIG_QLA3XXX is not set
530# CONFIG_ATL1 is not set
531CONFIG_NETDEV_10000=y
532# CONFIG_CHELSIO_T1 is not set
533# CONFIG_CHELSIO_T3 is not set
534# CONFIG_IXGBE is not set
535# CONFIG_IXGB is not set
536# CONFIG_S2IO is not set
537# CONFIG_MYRI10GE is not set
538# CONFIG_NETXEN_NIC is not set
539# CONFIG_NIU is not set
540# CONFIG_MLX4_CORE is not set
541# CONFIG_TEHUTI is not set
542# CONFIG_BNX2X is not set
543# CONFIG_TR is not set
544
545#
546# Wireless LAN
547#
548# CONFIG_WLAN_PRE80211 is not set
549# CONFIG_WLAN_80211 is not set
550# CONFIG_WAN is not set
551# CONFIG_FDDI is not set
552# CONFIG_HIPPI is not set
553# CONFIG_PPP is not set
554# CONFIG_SLIP is not set
555# CONFIG_NETCONSOLE is not set
556# CONFIG_NETPOLL is not set
557# CONFIG_NET_POLL_CONTROLLER is not set
558# CONFIG_ISDN is not set
559# CONFIG_PHONE is not set
560
561#
562# Input device support
563#
564# CONFIG_INPUT is not set
565
566#
567# Hardware I/O ports
568#
569# CONFIG_SERIO is not set
570# CONFIG_GAMEPORT is not set
571
572#
573# Character devices
574#
575# CONFIG_VT is not set
576# CONFIG_SERIAL_NONSTANDARD is not set
577# CONFIG_NOZOMI is not set
578
579#
580# Serial drivers
581#
582CONFIG_SERIAL_8250=y
583CONFIG_SERIAL_8250_CONSOLE=y
584CONFIG_SERIAL_8250_PCI=y
585CONFIG_SERIAL_8250_NR_UARTS=4
586CONFIG_SERIAL_8250_RUNTIME_UARTS=4
587CONFIG_SERIAL_8250_EXTENDED=y
588# CONFIG_SERIAL_8250_MANY_PORTS is not set
589CONFIG_SERIAL_8250_SHARE_IRQ=y
590# CONFIG_SERIAL_8250_DETECT_IRQ is not set
591# CONFIG_SERIAL_8250_RSA is not set
592
593#
594# Non-8250 serial port support
595#
596# CONFIG_SERIAL_UARTLITE is not set
597CONFIG_SERIAL_CORE=y
598CONFIG_SERIAL_CORE_CONSOLE=y
599# CONFIG_SERIAL_JSM is not set
600CONFIG_SERIAL_OF_PLATFORM=y
601CONFIG_UNIX98_PTYS=y
602CONFIG_LEGACY_PTYS=y
603CONFIG_LEGACY_PTY_COUNT=256
604# CONFIG_IPMI_HANDLER is not set
605# CONFIG_HW_RANDOM is not set
606# CONFIG_NVRAM is not set
607# CONFIG_GEN_RTC is not set
608CONFIG_XILINX_HWICAP=m
609# CONFIG_R3964 is not set
610# CONFIG_APPLICOM is not set
611# CONFIG_RAW_DRIVER is not set
612# CONFIG_TCG_TPM is not set
613CONFIG_DEVPORT=y
614# CONFIG_I2C is not set
615
616#
617# SPI support
618#
619# CONFIG_SPI is not set
620# CONFIG_SPI_MASTER is not set
621# CONFIG_W1 is not set
622# CONFIG_POWER_SUPPLY is not set
623# CONFIG_HWMON is not set
624CONFIG_THERMAL=y
625# CONFIG_WATCHDOG is not set
626
627#
628# Sonics Silicon Backplane
629#
630CONFIG_SSB_POSSIBLE=y
631# CONFIG_SSB is not set
632
633#
634# Multifunction device drivers
635#
636# CONFIG_MFD_SM501 is not set
637
638#
639# Multimedia devices
640#
641# CONFIG_VIDEO_DEV is not set
642# CONFIG_DVB_CORE is not set
643# CONFIG_DAB is not set
644
645#
646# Graphics support
647#
648# CONFIG_AGP is not set
649# CONFIG_DRM is not set
650# CONFIG_VGASTATE is not set
651CONFIG_VIDEO_OUTPUT_CONTROL=m
652# CONFIG_FB is not set
653# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
654
655#
656# Display device support
657#
658# CONFIG_DISPLAY_SUPPORT is not set
659
660#
661# Sound
662#
663# CONFIG_SOUND is not set
664CONFIG_USB_SUPPORT=y
665CONFIG_USB_ARCH_HAS_HCD=y
666CONFIG_USB_ARCH_HAS_OHCI=y
667CONFIG_USB_ARCH_HAS_EHCI=y
668# CONFIG_USB is not set
669
670#
671# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
672#
673# CONFIG_USB_GADGET is not set
674# CONFIG_MMC is not set
675# CONFIG_MEMSTICK is not set
676# CONFIG_NEW_LEDS is not set
677# CONFIG_INFINIBAND is not set
678# CONFIG_EDAC is not set
679# CONFIG_RTC_CLASS is not set
680# CONFIG_DMADEVICES is not set
681
682#
683# Userspace I/O
684#
685# CONFIG_UIO is not set
686
687#
688# File systems
689#
690CONFIG_EXT2_FS=y
691# CONFIG_EXT2_FS_XATTR is not set
692# CONFIG_EXT2_FS_XIP is not set
693# CONFIG_EXT3_FS is not set
694# CONFIG_EXT4DEV_FS is not set
695# CONFIG_REISERFS_FS is not set
696# CONFIG_JFS_FS is not set
697# CONFIG_FS_POSIX_ACL is not set
698# CONFIG_XFS_FS is not set
699# CONFIG_GFS2_FS is not set
700# CONFIG_OCFS2_FS is not set
701CONFIG_DNOTIFY=y
702CONFIG_INOTIFY=y
703CONFIG_INOTIFY_USER=y
704# CONFIG_QUOTA is not set
705# CONFIG_AUTOFS_FS is not set
706# CONFIG_AUTOFS4_FS is not set
707# CONFIG_FUSE_FS is not set
708
709#
710# CD-ROM/DVD Filesystems
711#
712# CONFIG_ISO9660_FS is not set
713# CONFIG_UDF_FS is not set
714
715#
716# DOS/FAT/NT Filesystems
717#
718# CONFIG_MSDOS_FS is not set
719# CONFIG_VFAT_FS is not set
720# CONFIG_NTFS_FS is not set
721
722#
723# Pseudo filesystems
724#
725CONFIG_PROC_FS=y
726CONFIG_PROC_KCORE=y
727CONFIG_PROC_SYSCTL=y
728CONFIG_SYSFS=y
729CONFIG_TMPFS=y
730# CONFIG_TMPFS_POSIX_ACL is not set
731# CONFIG_HUGETLB_PAGE is not set
732# CONFIG_CONFIGFS_FS is not set
733
734#
735# Miscellaneous filesystems
736#
737# CONFIG_ADFS_FS is not set
738# CONFIG_AFFS_FS is not set
739# CONFIG_HFS_FS is not set
740# CONFIG_HFSPLUS_FS is not set
741# CONFIG_BEFS_FS is not set
742# CONFIG_BFS_FS is not set
743# CONFIG_EFS_FS is not set
744# CONFIG_JFFS2_FS is not set
745CONFIG_CRAMFS=y
746# CONFIG_VXFS_FS is not set
747# CONFIG_MINIX_FS is not set
748# CONFIG_HPFS_FS is not set
749# CONFIG_QNX4FS_FS is not set
750# CONFIG_ROMFS_FS is not set
751# CONFIG_SYSV_FS is not set
752# CONFIG_UFS_FS is not set
753CONFIG_NETWORK_FILESYSTEMS=y
754CONFIG_NFS_FS=y
755CONFIG_NFS_V3=y
756# CONFIG_NFS_V3_ACL is not set
757# CONFIG_NFS_V4 is not set
758# CONFIG_NFS_DIRECTIO is not set
759# CONFIG_NFSD is not set
760CONFIG_ROOT_NFS=y
761CONFIG_LOCKD=y
762CONFIG_LOCKD_V4=y
763CONFIG_NFS_COMMON=y
764CONFIG_SUNRPC=y
765# CONFIG_SUNRPC_BIND34 is not set
766# CONFIG_RPCSEC_GSS_KRB5 is not set
767# CONFIG_RPCSEC_GSS_SPKM3 is not set
768# CONFIG_SMB_FS is not set
769# CONFIG_CIFS is not set
770# CONFIG_NCP_FS is not set
771# CONFIG_CODA_FS is not set
772# CONFIG_AFS_FS is not set
773
774#
775# Partition Types
776#
777# CONFIG_PARTITION_ADVANCED is not set
778CONFIG_MSDOS_PARTITION=y
779# CONFIG_NLS is not set
780# CONFIG_DLM is not set
781
782#
783# Library routines
784#
785CONFIG_BITREVERSE=y
786# CONFIG_CRC_CCITT is not set
787# CONFIG_CRC16 is not set
788# CONFIG_CRC_ITU_T is not set
789CONFIG_CRC32=y
790# CONFIG_CRC7 is not set
791# CONFIG_LIBCRC32C is not set
792CONFIG_ZLIB_INFLATE=y
793CONFIG_PLIST=y
794CONFIG_HAS_IOMEM=y
795CONFIG_HAS_IOPORT=y
796CONFIG_HAS_DMA=y
797CONFIG_HAVE_LMB=y
798
799#
800# Kernel hacking
801#
802# CONFIG_PRINTK_TIME is not set
803CONFIG_ENABLE_WARN_DEPRECATED=y
804CONFIG_ENABLE_MUST_CHECK=y
805CONFIG_MAGIC_SYSRQ=y
806# CONFIG_UNUSED_SYMBOLS is not set
807CONFIG_DEBUG_FS=y
808# CONFIG_HEADERS_CHECK is not set
809CONFIG_DEBUG_KERNEL=y
810# CONFIG_DEBUG_SHIRQ is not set
811CONFIG_DETECT_SOFTLOCKUP=y
812CONFIG_SCHED_DEBUG=y
813# CONFIG_SCHEDSTATS is not set
814# CONFIG_TIMER_STATS is not set
815# CONFIG_SLUB_DEBUG_ON is not set
816# CONFIG_SLUB_STATS is not set
817# CONFIG_DEBUG_RT_MUTEXES is not set
818# CONFIG_RT_MUTEX_TESTER is not set
819# CONFIG_DEBUG_SPINLOCK is not set
820# CONFIG_DEBUG_MUTEXES is not set
821# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
822# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
823# CONFIG_DEBUG_KOBJECT is not set
824CONFIG_DEBUG_BUGVERBOSE=y
825# CONFIG_DEBUG_INFO is not set
826# CONFIG_DEBUG_VM is not set
827# CONFIG_DEBUG_LIST is not set
828# CONFIG_DEBUG_SG is not set
829# CONFIG_BOOT_PRINTK_DELAY is not set
830# CONFIG_RCU_TORTURE_TEST is not set
831# CONFIG_BACKTRACE_SELF_TEST is not set
832# CONFIG_FAULT_INJECTION is not set
833# CONFIG_SAMPLES is not set
834# CONFIG_DEBUG_STACKOVERFLOW is not set
835# CONFIG_DEBUG_STACK_USAGE is not set
836# CONFIG_DEBUG_PAGEALLOC is not set
837# CONFIG_DEBUGGER is not set
838# CONFIG_VIRQ_DEBUG is not set
839# CONFIG_BDI_SWITCH is not set
840# CONFIG_PPC_EARLY_DEBUG is not set
841
842#
843# Security options
844#
845# CONFIG_KEYS is not set
846# CONFIG_SECURITY is not set
847# CONFIG_SECURITY_FILE_CAPABILITIES is not set
848CONFIG_CRYPTO=y
849CONFIG_CRYPTO_ALGAPI=y
850CONFIG_CRYPTO_BLKCIPHER=y
851# CONFIG_CRYPTO_SEQIV is not set
852CONFIG_CRYPTO_MANAGER=y
853# CONFIG_CRYPTO_HMAC is not set
854# CONFIG_CRYPTO_XCBC is not set
855# CONFIG_CRYPTO_NULL is not set
856# CONFIG_CRYPTO_MD4 is not set
857CONFIG_CRYPTO_MD5=y
858# CONFIG_CRYPTO_SHA1 is not set
859# CONFIG_CRYPTO_SHA256 is not set
860# CONFIG_CRYPTO_SHA512 is not set
861# CONFIG_CRYPTO_WP512 is not set
862# CONFIG_CRYPTO_TGR192 is not set
863# CONFIG_CRYPTO_GF128MUL is not set
864CONFIG_CRYPTO_ECB=y
865CONFIG_CRYPTO_CBC=y
866CONFIG_CRYPTO_PCBC=y
867# CONFIG_CRYPTO_LRW is not set
868# CONFIG_CRYPTO_XTS is not set
869# CONFIG_CRYPTO_CTR is not set
870# CONFIG_CRYPTO_GCM is not set
871# CONFIG_CRYPTO_CCM is not set
872# CONFIG_CRYPTO_CRYPTD is not set
873CONFIG_CRYPTO_DES=y
874# CONFIG_CRYPTO_FCRYPT is not set
875# CONFIG_CRYPTO_BLOWFISH is not set
876# CONFIG_CRYPTO_TWOFISH is not set
877# CONFIG_CRYPTO_SERPENT is not set
878# CONFIG_CRYPTO_AES is not set
879# CONFIG_CRYPTO_CAST5 is not set
880# CONFIG_CRYPTO_CAST6 is not set
881# CONFIG_CRYPTO_TEA is not set
882# CONFIG_CRYPTO_ARC4 is not set
883# CONFIG_CRYPTO_KHAZAD is not set
884# CONFIG_CRYPTO_ANUBIS is not set
885# CONFIG_CRYPTO_SEED is not set
886# CONFIG_CRYPTO_SALSA20 is not set
887# CONFIG_CRYPTO_DEFLATE is not set
888# CONFIG_CRYPTO_MICHAEL_MIC is not set
889# CONFIG_CRYPTO_CRC32C is not set
890# CONFIG_CRYPTO_CAMELLIA is not set
891# CONFIG_CRYPTO_TEST is not set
892# CONFIG_CRYPTO_AUTHENC is not set
893# CONFIG_CRYPTO_LZO is not set
894CONFIG_CRYPTO_HW=y
895# CONFIG_CRYPTO_DEV_HIFN_795X is not set
896# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig
index 57bd775ef777..12f9b5a80220 100644
--- a/arch/powerpc/configs/ppc44x_defconfig
+++ b/arch/powerpc/configs/ppc44x_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.25-rc6
4# Fri Feb 15 21:57:35 2008 4# Sat Apr 5 09:35:48 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -79,6 +79,7 @@ CONFIG_FAIR_GROUP_SCHED=y
79CONFIG_USER_SCHED=y 79CONFIG_USER_SCHED=y
80# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
84CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -113,6 +114,7 @@ CONFIG_SLUB=y
113CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
114# CONFIG_KPROBES is not set 115# CONFIG_KPROBES is not set
115CONFIG_HAVE_KPROBES=y 116CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y
116CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
117CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -143,7 +145,6 @@ CONFIG_DEFAULT_AS=y
143# CONFIG_DEFAULT_NOOP is not set 145# CONFIG_DEFAULT_NOOP is not set
144CONFIG_DEFAULT_IOSCHED="anticipatory" 146CONFIG_DEFAULT_IOSCHED="anticipatory"
145CONFIG_CLASSIC_RCU=y 147CONFIG_CLASSIC_RCU=y
146# CONFIG_PREEMPT_RCU is not set
147CONFIG_PPC4xx_PCI_EXPRESS=y 148CONFIG_PPC4xx_PCI_EXPRESS=y
148 149
149# 150#
@@ -161,12 +162,15 @@ CONFIG_TAISHAN=y
161CONFIG_KATMAI=y 162CONFIG_KATMAI=y
162CONFIG_RAINIER=y 163CONFIG_RAINIER=y
163CONFIG_WARP=y 164CONFIG_WARP=y
165CONFIG_CANYONLANDS=y
166CONFIG_YOSEMITE=y
164CONFIG_440EP=y 167CONFIG_440EP=y
165CONFIG_440EPX=y 168CONFIG_440EPX=y
166CONFIG_440GRX=y 169CONFIG_440GRX=y
167CONFIG_440GP=y 170CONFIG_440GP=y
168CONFIG_440GX=y 171CONFIG_440GX=y
169CONFIG_440SPe=y 172CONFIG_440SPe=y
173CONFIG_460EX=y
170CONFIG_IBM440EP_ERR42=y 174CONFIG_IBM440EP_ERR42=y
171# CONFIG_IPIC is not set 175# CONFIG_IPIC is not set
172# CONFIG_MPIC is not set 176# CONFIG_MPIC is not set
@@ -199,7 +203,6 @@ CONFIG_HZ=250
199CONFIG_PREEMPT_NONE=y 203CONFIG_PREEMPT_NONE=y
200# CONFIG_PREEMPT_VOLUNTARY is not set 204# CONFIG_PREEMPT_VOLUNTARY is not set
201# CONFIG_PREEMPT is not set 205# CONFIG_PREEMPT is not set
202# CONFIG_RCU_TRACE is not set
203CONFIG_BINFMT_ELF=y 206CONFIG_BINFMT_ELF=y
204# CONFIG_BINFMT_MISC is not set 207# CONFIG_BINFMT_MISC is not set
205CONFIG_MATH_EMULATION=y 208CONFIG_MATH_EMULATION=y
@@ -232,6 +235,7 @@ CONFIG_ISA_DMA_API=y
232# 235#
233CONFIG_ZONE_DMA=y 236CONFIG_ZONE_DMA=y
234CONFIG_PPC_INDIRECT_PCI=y 237CONFIG_PPC_INDIRECT_PCI=y
238CONFIG_4xx_SOC=y
235CONFIG_PCI=y 239CONFIG_PCI=y
236CONFIG_PCI_DOMAINS=y 240CONFIG_PCI_DOMAINS=y
237CONFIG_PCI_SYSCALL=y 241CONFIG_PCI_SYSCALL=y
@@ -678,6 +682,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
678# CONFIG_INFINIBAND is not set 682# CONFIG_INFINIBAND is not set
679# CONFIG_EDAC is not set 683# CONFIG_EDAC is not set
680# CONFIG_RTC_CLASS is not set 684# CONFIG_RTC_CLASS is not set
685# CONFIG_DMADEVICES is not set
681 686
682# 687#
683# Userspace I/O 688# Userspace I/O
@@ -805,6 +810,7 @@ CONFIG_PLIST=y
805CONFIG_HAS_IOMEM=y 810CONFIG_HAS_IOMEM=y
806CONFIG_HAS_IOPORT=y 811CONFIG_HAS_IOPORT=y
807CONFIG_HAS_DMA=y 812CONFIG_HAS_DMA=y
813CONFIG_HAVE_LMB=y
808 814
809# 815#
810# Kernel hacking 816# Kernel hacking
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 880ab7ad10c1..970282b1a004 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 11:06:28 2008 4# Thu Mar 27 13:56:24 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -84,8 +84,6 @@ CONFIG_CGROUPS=y
84# CONFIG_CGROUP_NS is not set 84# CONFIG_CGROUP_NS is not set
85CONFIG_CPUSETS=y 85CONFIG_CPUSETS=y
86# CONFIG_GROUP_SCHED is not set 86# CONFIG_GROUP_SCHED is not set
87# CONFIG_USER_SCHED is not set
88# CONFIG_CGROUP_SCHED is not set
89# CONFIG_CGROUP_CPUACCT is not set 87# CONFIG_CGROUP_CPUACCT is not set
90# CONFIG_RESOURCE_COUNTERS is not set 88# CONFIG_RESOURCE_COUNTERS is not set
91CONFIG_SYSFS_DEPRECATED=y 89CONFIG_SYSFS_DEPRECATED=y
@@ -289,6 +287,7 @@ CONFIG_ARCH_HAS_WALK_MEMORY=y
289CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 287CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
290CONFIG_KEXEC=y 288CONFIG_KEXEC=y
291# CONFIG_CRASH_DUMP is not set 289# CONFIG_CRASH_DUMP is not set
290# CONFIG_PHYP_DUMP is not set
292CONFIG_IRQ_ALL_CPUS=y 291CONFIG_IRQ_ALL_CPUS=y
293# CONFIG_NUMA is not set 292# CONFIG_NUMA is not set
294CONFIG_ARCH_SELECT_MEMORY_MODEL=y 293CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -335,7 +334,7 @@ CONFIG_PCI_SYSCALL=y
335# CONFIG_PCIEPORTBUS is not set 334# CONFIG_PCIEPORTBUS is not set
336CONFIG_ARCH_SUPPORTS_MSI=y 335CONFIG_ARCH_SUPPORTS_MSI=y
337CONFIG_PCI_MSI=y 336CONFIG_PCI_MSI=y
338CONFIG_PCI_LEGACY=y 337# CONFIG_PCI_LEGACY is not set
339# CONFIG_PCI_DEBUG is not set 338# CONFIG_PCI_DEBUG is not set
340CONFIG_PCCARD=y 339CONFIG_PCCARD=y
341# CONFIG_PCMCIA_DEBUG is not set 340# CONFIG_PCMCIA_DEBUG is not set
@@ -1881,6 +1880,7 @@ CONFIG_PLIST=y
1881CONFIG_HAS_IOMEM=y 1880CONFIG_HAS_IOMEM=y
1882CONFIG_HAS_IOPORT=y 1881CONFIG_HAS_IOPORT=y
1883CONFIG_HAS_DMA=y 1882CONFIG_HAS_DMA=y
1883CONFIG_HAVE_LMB=y
1884 1884
1885# 1885#
1886# Kernel hacking 1886# Kernel hacking
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 755aca72b522..3e2593c60b12 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_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-rc6 3# Linux kernel version: 2.6.25-rc6
4# Thu Mar 20 11:08:01 2008 4# Thu Mar 27 13:56:28 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -83,8 +83,6 @@ CONFIG_CGROUPS=y
83CONFIG_CGROUP_NS=y 83CONFIG_CGROUP_NS=y
84CONFIG_CPUSETS=y 84CONFIG_CPUSETS=y
85# CONFIG_GROUP_SCHED is not set 85# CONFIG_GROUP_SCHED is not set
86# CONFIG_USER_SCHED is not set
87# CONFIG_CGROUP_SCHED is not set
88CONFIG_CGROUP_CPUACCT=y 86CONFIG_CGROUP_CPUACCT=y
89# CONFIG_RESOURCE_COUNTERS is not set 87# CONFIG_RESOURCE_COUNTERS is not set
90CONFIG_SYSFS_DEPRECATED=y 88CONFIG_SYSFS_DEPRECATED=y
@@ -237,6 +235,7 @@ CONFIG_ARCH_HAS_WALK_MEMORY=y
237CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 235CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
238CONFIG_KEXEC=y 236CONFIG_KEXEC=y
239# CONFIG_CRASH_DUMP is not set 237# CONFIG_CRASH_DUMP is not set
238# CONFIG_PHYP_DUMP is not set
240CONFIG_IRQ_ALL_CPUS=y 239CONFIG_IRQ_ALL_CPUS=y
241CONFIG_NUMA=y 240CONFIG_NUMA=y
242CONFIG_NODES_SHIFT=4 241CONFIG_NODES_SHIFT=4
@@ -283,7 +282,7 @@ CONFIG_PCI_SYSCALL=y
283# CONFIG_PCIEPORTBUS is not set 282# CONFIG_PCIEPORTBUS is not set
284CONFIG_ARCH_SUPPORTS_MSI=y 283CONFIG_ARCH_SUPPORTS_MSI=y
285CONFIG_PCI_MSI=y 284CONFIG_PCI_MSI=y
286CONFIG_PCI_LEGACY=y 285# CONFIG_PCI_LEGACY is not set
287# CONFIG_PCI_DEBUG is not set 286# CONFIG_PCI_DEBUG is not set
288# CONFIG_PCCARD is not set 287# CONFIG_PCCARD is not set
289CONFIG_HOTPLUG_PCI=m 288CONFIG_HOTPLUG_PCI=m
@@ -1519,6 +1518,7 @@ CONFIG_PLIST=y
1519CONFIG_HAS_IOMEM=y 1518CONFIG_HAS_IOMEM=y
1520CONFIG_HAS_IOPORT=y 1519CONFIG_HAS_IOPORT=y
1521CONFIG_HAS_DMA=y 1520CONFIG_HAS_DMA=y
1521CONFIG_HAVE_LMB=y
1522 1522
1523# 1523#
1524# Kernel hacking 1524# Kernel hacking
diff --git a/arch/powerpc/configs/sbc8641d_defconfig b/arch/powerpc/configs/sbc8641d_defconfig
new file mode 100644
index 000000000000..3180125aa6c4
--- /dev/null
+++ b/arch/powerpc/configs/sbc8641d_defconfig
@@ -0,0 +1,1342 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc6
4# Thu Apr 10 18:03:25 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=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_FPU=y
18CONFIG_ALTIVEC=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_SMP=y
23CONFIG_NR_CPUS=2
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_GENERIC_LOCKBREAK=y
37CONFIG_ARCH_HAS_ILOG2_U32=y
38CONFIG_GENERIC_HWEIGHT=y
39CONFIG_GENERIC_CALIBRATE_DELAY=y
40CONFIG_GENERIC_FIND_NEXT_BIT=y
41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
42CONFIG_PPC=y
43CONFIG_EARLY_PRINTK=y
44CONFIG_GENERIC_NVRAM=y
45CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
46CONFIG_ARCH_MAY_HAVE_PC_FDC=y
47CONFIG_PPC_OF=y
48CONFIG_OF=y
49CONFIG_PPC_UDBG_16550=y
50CONFIG_GENERIC_TBSYNC=y
51CONFIG_AUDIT_ARCH=y
52CONFIG_GENERIC_BUG=y
53CONFIG_DEFAULT_UIMAGE=y
54# CONFIG_PPC_DCR_NATIVE is not set
55# CONFIG_PPC_DCR_MMIO is not set
56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
57
58#
59# General setup
60#
61CONFIG_EXPERIMENTAL=y
62CONFIG_LOCK_KERNEL=y
63CONFIG_INIT_ENV_ARG_LIMIT=32
64CONFIG_LOCALVERSION=""
65CONFIG_LOCALVERSION_AUTO=y
66CONFIG_SWAP=y
67CONFIG_SYSVIPC=y
68CONFIG_SYSVIPC_SYSCTL=y
69CONFIG_POSIX_MQUEUE=y
70CONFIG_BSD_PROCESS_ACCT=y
71CONFIG_BSD_PROCESS_ACCT_V3=y
72# CONFIG_TASKSTATS is not set
73# CONFIG_AUDIT is not set
74CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=14
77# CONFIG_CGROUPS is not set
78CONFIG_GROUP_SCHED=y
79CONFIG_FAIR_GROUP_SCHED=y
80# CONFIG_RT_GROUP_SCHED is not set
81CONFIG_USER_SCHED=y
82# CONFIG_CGROUP_SCHED is not set
83CONFIG_SYSFS_DEPRECATED=y
84CONFIG_SYSFS_DEPRECATED_V2=y
85CONFIG_RELAY=y
86# CONFIG_NAMESPACES is not set
87CONFIG_BLK_DEV_INITRD=y
88CONFIG_INITRAMFS_SOURCE=""
89# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
90CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y
93CONFIG_KALLSYMS=y
94# CONFIG_KALLSYMS_ALL is not set
95# CONFIG_KALLSYMS_EXTRA_PASS is not set
96CONFIG_HOTPLUG=y
97CONFIG_PRINTK=y
98CONFIG_BUG=y
99CONFIG_ELF_CORE=y
100CONFIG_COMPAT_BRK=y
101CONFIG_BASE_FULL=y
102CONFIG_FUTEX=y
103CONFIG_ANON_INODES=y
104CONFIG_EPOLL=y
105CONFIG_SIGNALFD=y
106CONFIG_TIMERFD=y
107CONFIG_EVENTFD=y
108CONFIG_SHMEM=y
109CONFIG_VM_EVENT_COUNTERS=y
110CONFIG_SLAB=y
111# CONFIG_SLUB is not set
112# CONFIG_SLOB is not set
113# CONFIG_PROFILING is not set
114# CONFIG_MARKERS is not set
115CONFIG_HAVE_OPROFILE=y
116# CONFIG_KPROBES is not set
117CONFIG_HAVE_KPROBES=y
118CONFIG_HAVE_KRETPROBES=y
119CONFIG_PROC_PAGE_MONITOR=y
120CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y
122# CONFIG_TINY_SHMEM is not set
123CONFIG_BASE_SMALL=0
124CONFIG_MODULES=y
125CONFIG_MODULE_UNLOAD=y
126# CONFIG_MODULE_FORCE_UNLOAD is not set
127# CONFIG_MODVERSIONS is not set
128# CONFIG_MODULE_SRCVERSION_ALL is not set
129CONFIG_KMOD=y
130CONFIG_STOP_MACHINE=y
131CONFIG_BLOCK=y
132# CONFIG_LBD is not set
133# CONFIG_BLK_DEV_IO_TRACE is not set
134# CONFIG_LSF is not set
135# CONFIG_BLK_DEV_BSG is not set
136
137#
138# IO Schedulers
139#
140CONFIG_IOSCHED_NOOP=y
141CONFIG_IOSCHED_AS=y
142CONFIG_IOSCHED_DEADLINE=y
143CONFIG_IOSCHED_CFQ=y
144# CONFIG_DEFAULT_AS is not set
145# CONFIG_DEFAULT_DEADLINE is not set
146CONFIG_DEFAULT_CFQ=y
147# CONFIG_DEFAULT_NOOP is not set
148CONFIG_DEFAULT_IOSCHED="cfq"
149CONFIG_CLASSIC_RCU=y
150
151#
152# Platform support
153#
154# CONFIG_PPC_MULTIPLATFORM is not set
155# CONFIG_PPC_82xx is not set
156# CONFIG_PPC_83xx is not set
157CONFIG_PPC_86xx=y
158# CONFIG_PPC_MPC512x is not set
159# CONFIG_PPC_MPC5121 is not set
160# CONFIG_PPC_CELL is not set
161# CONFIG_PPC_CELL_NATIVE is not set
162# CONFIG_PQ2ADS is not set
163# CONFIG_MPC8641_HPCN is not set
164CONFIG_SBC8641D=y
165# CONFIG_MPC8610_HPCD is not set
166CONFIG_MPC8641=y
167# CONFIG_IPIC is not set
168CONFIG_MPIC=y
169# CONFIG_MPIC_WEIRD is not set
170# CONFIG_PPC_I8259 is not set
171# CONFIG_PPC_RTAS is not set
172# CONFIG_MMIO_NVRAM is not set
173# CONFIG_PPC_MPC106 is not set
174# CONFIG_PPC_970_NAP is not set
175# CONFIG_PPC_INDIRECT_IO is not set
176# CONFIG_GENERIC_IOMAP is not set
177# CONFIG_CPU_FREQ is not set
178# CONFIG_FSL_ULI1575 is not set
179
180#
181# Kernel options
182#
183# CONFIG_HIGHMEM is not set
184CONFIG_TICK_ONESHOT=y
185# CONFIG_NO_HZ is not set
186CONFIG_HIGH_RES_TIMERS=y
187CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
188# CONFIG_HZ_100 is not set
189CONFIG_HZ_250=y
190# CONFIG_HZ_300 is not set
191# CONFIG_HZ_1000 is not set
192CONFIG_HZ=250
193# CONFIG_SCHED_HRTICK is not set
194# CONFIG_PREEMPT_NONE is not set
195# CONFIG_PREEMPT_VOLUNTARY is not set
196CONFIG_PREEMPT=y
197# CONFIG_PREEMPT_RCU is not set
198CONFIG_BINFMT_ELF=y
199CONFIG_BINFMT_MISC=m
200CONFIG_FORCE_MAX_ZONEORDER=11
201# CONFIG_IOMMU_HELPER is not set
202CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
203CONFIG_ARCH_HAS_WALK_MEMORY=y
204CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
205CONFIG_IRQ_ALL_CPUS=y
206CONFIG_ARCH_FLATMEM_ENABLE=y
207CONFIG_ARCH_POPULATES_NODE_MAP=y
208CONFIG_SELECT_MEMORY_MODEL=y
209CONFIG_FLATMEM_MANUAL=y
210# CONFIG_DISCONTIGMEM_MANUAL is not set
211# CONFIG_SPARSEMEM_MANUAL is not set
212CONFIG_FLATMEM=y
213CONFIG_FLAT_NODE_MEM_MAP=y
214# CONFIG_SPARSEMEM_STATIC is not set
215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
216CONFIG_SPLIT_PTLOCK_CPUS=4
217# CONFIG_RESOURCES_64BIT is not set
218CONFIG_ZONE_DMA_FLAG=1
219CONFIG_BOUNCE=y
220CONFIG_VIRT_TO_BUS=y
221# CONFIG_PROC_DEVICETREE is not set
222# CONFIG_CMDLINE_BOOL is not set
223# CONFIG_PM is not set
224CONFIG_SECCOMP=y
225CONFIG_ISA_DMA_API=y
226
227#
228# Bus options
229#
230CONFIG_ZONE_DMA=y
231CONFIG_GENERIC_ISA_DMA=y
232CONFIG_PPC_INDIRECT_PCI=y
233CONFIG_FSL_SOC=y
234CONFIG_FSL_PCI=y
235CONFIG_PCI=y
236CONFIG_PCI_DOMAINS=y
237CONFIG_PCI_SYSCALL=y
238CONFIG_PCIEPORTBUS=y
239CONFIG_PCIEAER=y
240CONFIG_ARCH_SUPPORTS_MSI=y
241# CONFIG_PCI_MSI is not set
242CONFIG_PCI_LEGACY=y
243# CONFIG_PCI_DEBUG is not set
244# CONFIG_PCCARD is not set
245# CONFIG_HOTPLUG_PCI is not set
246
247#
248# Advanced setup
249#
250# CONFIG_ADVANCED_OPTIONS is not set
251
252#
253# Default settings for advanced configuration options are used
254#
255CONFIG_HIGHMEM_START=0xfe000000
256CONFIG_LOWMEM_SIZE=0x30000000
257CONFIG_KERNEL_START=0xc0000000
258CONFIG_TASK_SIZE=0xc0000000
259CONFIG_BOOT_LOAD=0x00800000
260
261#
262# Networking
263#
264CONFIG_NET=y
265
266#
267# Networking options
268#
269CONFIG_PACKET=y
270CONFIG_PACKET_MMAP=y
271CONFIG_UNIX=y
272CONFIG_XFRM=y
273CONFIG_XFRM_USER=m
274# CONFIG_XFRM_SUB_POLICY is not set
275# CONFIG_XFRM_MIGRATE is not set
276# CONFIG_XFRM_STATISTICS is not set
277CONFIG_NET_KEY=m
278# CONFIG_NET_KEY_MIGRATE is not set
279CONFIG_INET=y
280CONFIG_IP_MULTICAST=y
281CONFIG_IP_ADVANCED_ROUTER=y
282CONFIG_ASK_IP_FIB_HASH=y
283# CONFIG_IP_FIB_TRIE is not set
284CONFIG_IP_FIB_HASH=y
285CONFIG_IP_MULTIPLE_TABLES=y
286CONFIG_IP_ROUTE_MULTIPATH=y
287CONFIG_IP_ROUTE_VERBOSE=y
288CONFIG_IP_PNP=y
289CONFIG_IP_PNP_DHCP=y
290CONFIG_IP_PNP_BOOTP=y
291CONFIG_IP_PNP_RARP=y
292CONFIG_NET_IPIP=m
293CONFIG_NET_IPGRE=m
294CONFIG_NET_IPGRE_BROADCAST=y
295CONFIG_IP_MROUTE=y
296CONFIG_IP_PIMSM_V1=y
297CONFIG_IP_PIMSM_V2=y
298# CONFIG_ARPD is not set
299CONFIG_SYN_COOKIES=y
300CONFIG_INET_AH=m
301CONFIG_INET_ESP=m
302CONFIG_INET_IPCOMP=m
303CONFIG_INET_XFRM_TUNNEL=m
304CONFIG_INET_TUNNEL=m
305CONFIG_INET_XFRM_MODE_TRANSPORT=y
306CONFIG_INET_XFRM_MODE_TUNNEL=y
307CONFIG_INET_XFRM_MODE_BEET=y
308# CONFIG_INET_LRO is not set
309CONFIG_INET_DIAG=y
310CONFIG_INET_TCP_DIAG=y
311# CONFIG_TCP_CONG_ADVANCED is not set
312CONFIG_TCP_CONG_CUBIC=y
313CONFIG_DEFAULT_TCP_CONG="cubic"
314# CONFIG_TCP_MD5SIG is not set
315# CONFIG_IP_VS is not set
316CONFIG_IPV6=m
317# CONFIG_IPV6_PRIVACY is not set
318# CONFIG_IPV6_ROUTER_PREF is not set
319# CONFIG_IPV6_OPTIMISTIC_DAD is not set
320CONFIG_INET6_AH=m
321CONFIG_INET6_ESP=m
322CONFIG_INET6_IPCOMP=m
323# CONFIG_IPV6_MIP6 is not set
324CONFIG_INET6_XFRM_TUNNEL=m
325CONFIG_INET6_TUNNEL=m
326CONFIG_INET6_XFRM_MODE_TRANSPORT=m
327CONFIG_INET6_XFRM_MODE_TUNNEL=m
328CONFIG_INET6_XFRM_MODE_BEET=m
329# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
330CONFIG_IPV6_SIT=m
331CONFIG_IPV6_TUNNEL=m
332# CONFIG_IPV6_MULTIPLE_TABLES is not set
333# CONFIG_NETLABEL is not set
334# CONFIG_NETWORK_SECMARK is not set
335CONFIG_NETFILTER=y
336# CONFIG_NETFILTER_DEBUG is not set
337CONFIG_NETFILTER_ADVANCED=y
338CONFIG_BRIDGE_NETFILTER=y
339
340#
341# Core Netfilter Configuration
342#
343# CONFIG_NETFILTER_NETLINK_QUEUE is not set
344# CONFIG_NETFILTER_NETLINK_LOG is not set
345# CONFIG_NF_CONNTRACK is not set
346CONFIG_NETFILTER_XTABLES=m
347# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
348# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
349# CONFIG_NETFILTER_XT_TARGET_MARK is not set
350# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
351# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
352# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
353# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
354# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
355# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
356# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
357# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
358# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
359# CONFIG_NETFILTER_XT_MATCH_ESP is not set
360# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
361# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
362# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
363# CONFIG_NETFILTER_XT_MATCH_MAC is not set
364# CONFIG_NETFILTER_XT_MATCH_MARK is not set
365# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
366# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
367# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
368# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
369# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
370# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
371# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
372# CONFIG_NETFILTER_XT_MATCH_REALM is not set
373# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
374# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
375# CONFIG_NETFILTER_XT_MATCH_STRING is not set
376# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
377# CONFIG_NETFILTER_XT_MATCH_TIME is not set
378# CONFIG_NETFILTER_XT_MATCH_U32 is not set
379# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
380
381#
382# IP: Netfilter Configuration
383#
384CONFIG_IP_NF_QUEUE=m
385CONFIG_IP_NF_IPTABLES=m
386CONFIG_IP_NF_MATCH_RECENT=m
387CONFIG_IP_NF_MATCH_ECN=m
388# CONFIG_IP_NF_MATCH_AH is not set
389CONFIG_IP_NF_MATCH_TTL=m
390CONFIG_IP_NF_MATCH_ADDRTYPE=m
391CONFIG_IP_NF_FILTER=m
392CONFIG_IP_NF_TARGET_REJECT=m
393CONFIG_IP_NF_TARGET_LOG=m
394CONFIG_IP_NF_TARGET_ULOG=m
395CONFIG_IP_NF_MANGLE=m
396CONFIG_IP_NF_TARGET_ECN=m
397# CONFIG_IP_NF_TARGET_TTL is not set
398CONFIG_IP_NF_RAW=m
399CONFIG_IP_NF_ARPTABLES=m
400CONFIG_IP_NF_ARPFILTER=m
401CONFIG_IP_NF_ARP_MANGLE=m
402
403#
404# IPv6: Netfilter Configuration
405#
406CONFIG_IP6_NF_QUEUE=m
407CONFIG_IP6_NF_IPTABLES=m
408CONFIG_IP6_NF_MATCH_RT=m
409CONFIG_IP6_NF_MATCH_OPTS=m
410CONFIG_IP6_NF_MATCH_FRAG=m
411CONFIG_IP6_NF_MATCH_HL=m
412CONFIG_IP6_NF_MATCH_IPV6HEADER=m
413# CONFIG_IP6_NF_MATCH_AH is not set
414# CONFIG_IP6_NF_MATCH_MH is not set
415CONFIG_IP6_NF_MATCH_EUI64=m
416CONFIG_IP6_NF_FILTER=m
417CONFIG_IP6_NF_TARGET_LOG=m
418# CONFIG_IP6_NF_TARGET_REJECT is not set
419CONFIG_IP6_NF_MANGLE=m
420# CONFIG_IP6_NF_TARGET_HL is not set
421CONFIG_IP6_NF_RAW=m
422
423#
424# Bridge: Netfilter Configuration
425#
426# CONFIG_BRIDGE_NF_EBTABLES is not set
427# CONFIG_IP_DCCP is not set
428CONFIG_IP_SCTP=m
429# CONFIG_SCTP_DBG_MSG is not set
430# CONFIG_SCTP_DBG_OBJCNT is not set
431# CONFIG_SCTP_HMAC_NONE is not set
432# CONFIG_SCTP_HMAC_SHA1 is not set
433CONFIG_SCTP_HMAC_MD5=y
434CONFIG_TIPC=m
435# CONFIG_TIPC_ADVANCED is not set
436# CONFIG_TIPC_DEBUG is not set
437CONFIG_ATM=m
438CONFIG_ATM_CLIP=m
439# CONFIG_ATM_CLIP_NO_ICMP is not set
440CONFIG_ATM_LANE=m
441CONFIG_ATM_MPOA=m
442CONFIG_ATM_BR2684=m
443# CONFIG_ATM_BR2684_IPFILTER is not set
444CONFIG_BRIDGE=m
445CONFIG_VLAN_8021Q=m
446# CONFIG_DECNET is not set
447CONFIG_LLC=m
448# CONFIG_LLC2 is not set
449# CONFIG_IPX is not set
450# CONFIG_ATALK is not set
451# CONFIG_X25 is not set
452# CONFIG_LAPB is not set
453# CONFIG_ECONET is not set
454CONFIG_WAN_ROUTER=m
455CONFIG_NET_SCHED=y
456
457#
458# Queueing/Scheduling
459#
460CONFIG_NET_SCH_CBQ=m
461CONFIG_NET_SCH_HTB=m
462CONFIG_NET_SCH_HFSC=m
463CONFIG_NET_SCH_ATM=m
464CONFIG_NET_SCH_PRIO=m
465# CONFIG_NET_SCH_RR is not set
466CONFIG_NET_SCH_RED=m
467CONFIG_NET_SCH_SFQ=m
468CONFIG_NET_SCH_TEQL=m
469CONFIG_NET_SCH_TBF=m
470CONFIG_NET_SCH_GRED=m
471CONFIG_NET_SCH_DSMARK=m
472CONFIG_NET_SCH_NETEM=m
473
474#
475# Classification
476#
477CONFIG_NET_CLS=y
478# CONFIG_NET_CLS_BASIC is not set
479CONFIG_NET_CLS_TCINDEX=m
480CONFIG_NET_CLS_ROUTE4=m
481CONFIG_NET_CLS_ROUTE=y
482CONFIG_NET_CLS_FW=m
483CONFIG_NET_CLS_U32=m
484# CONFIG_CLS_U32_PERF is not set
485# CONFIG_CLS_U32_MARK is not set
486CONFIG_NET_CLS_RSVP=m
487CONFIG_NET_CLS_RSVP6=m
488# CONFIG_NET_CLS_FLOW is not set
489# CONFIG_NET_EMATCH is not set
490# CONFIG_NET_CLS_ACT is not set
491# CONFIG_NET_CLS_IND is not set
492CONFIG_NET_SCH_FIFO=y
493
494#
495# Network testing
496#
497CONFIG_NET_PKTGEN=m
498# CONFIG_HAMRADIO is not set
499# CONFIG_CAN is not set
500# CONFIG_IRDA is not set
501# CONFIG_BT is not set
502# CONFIG_AF_RXRPC is not set
503CONFIG_FIB_RULES=y
504
505#
506# Wireless
507#
508# CONFIG_CFG80211 is not set
509# CONFIG_WIRELESS_EXT is not set
510# CONFIG_MAC80211 is not set
511# CONFIG_IEEE80211 is not set
512# CONFIG_RFKILL is not set
513# CONFIG_NET_9P is not set
514
515#
516# Device Drivers
517#
518
519#
520# Generic Driver Options
521#
522CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
523CONFIG_STANDALONE=y
524CONFIG_PREVENT_FIRMWARE_BUILD=y
525# CONFIG_FW_LOADER is not set
526# CONFIG_DEBUG_DRIVER is not set
527# CONFIG_DEBUG_DEVRES is not set
528# CONFIG_SYS_HYPERVISOR is not set
529# CONFIG_CONNECTOR is not set
530CONFIG_MTD=y
531# CONFIG_MTD_DEBUG is not set
532CONFIG_MTD_CONCAT=y
533CONFIG_MTD_PARTITIONS=y
534# CONFIG_MTD_REDBOOT_PARTS is not set
535# CONFIG_MTD_CMDLINE_PARTS is not set
536# CONFIG_MTD_OF_PARTS is not set
537
538#
539# User Modules And Translation Layers
540#
541CONFIG_MTD_CHAR=y
542CONFIG_MTD_BLKDEVS=y
543CONFIG_MTD_BLOCK=y
544# CONFIG_FTL is not set
545# CONFIG_NFTL is not set
546# CONFIG_INFTL is not set
547# CONFIG_RFD_FTL is not set
548# CONFIG_SSFDC is not set
549# CONFIG_MTD_OOPS is not set
550
551#
552# RAM/ROM/Flash chip drivers
553#
554CONFIG_MTD_CFI=y
555# CONFIG_MTD_JEDECPROBE is not set
556CONFIG_MTD_GEN_PROBE=y
557CONFIG_MTD_CFI_ADV_OPTIONS=y
558# CONFIG_MTD_CFI_NOSWAP is not set
559# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
560CONFIG_MTD_CFI_LE_BYTE_SWAP=y
561# CONFIG_MTD_CFI_GEOMETRY is not set
562CONFIG_MTD_MAP_BANK_WIDTH_1=y
563CONFIG_MTD_MAP_BANK_WIDTH_2=y
564CONFIG_MTD_MAP_BANK_WIDTH_4=y
565# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
566# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
567# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
568CONFIG_MTD_CFI_I1=y
569CONFIG_MTD_CFI_I2=y
570# CONFIG_MTD_CFI_I4 is not set
571# CONFIG_MTD_CFI_I8 is not set
572# CONFIG_MTD_OTP is not set
573CONFIG_MTD_CFI_INTELEXT=y
574# CONFIG_MTD_CFI_AMDSTD is not set
575# CONFIG_MTD_CFI_STAA is not set
576CONFIG_MTD_CFI_UTIL=y
577# CONFIG_MTD_RAM is not set
578# CONFIG_MTD_ROM is not set
579# CONFIG_MTD_ABSENT is not set
580
581#
582# Mapping drivers for chip access
583#
584# CONFIG_MTD_COMPLEX_MAPPINGS is not set
585# CONFIG_MTD_PHYSMAP is not set
586CONFIG_MTD_PHYSMAP_OF=y
587# CONFIG_MTD_INTEL_VR_NOR is not set
588# CONFIG_MTD_PLATRAM is not set
589
590#
591# Self-contained MTD device drivers
592#
593# CONFIG_MTD_PMC551 is not set
594# CONFIG_MTD_SLRAM is not set
595# CONFIG_MTD_PHRAM is not set
596# CONFIG_MTD_MTDRAM is not set
597# CONFIG_MTD_BLOCK2MTD is not set
598
599#
600# Disk-On-Chip Device Drivers
601#
602# CONFIG_MTD_DOC2000 is not set
603# CONFIG_MTD_DOC2001 is not set
604# CONFIG_MTD_DOC2001PLUS is not set
605# CONFIG_MTD_NAND is not set
606# CONFIG_MTD_ONENAND is not set
607
608#
609# UBI - Unsorted block images
610#
611# CONFIG_MTD_UBI is not set
612CONFIG_OF_DEVICE=y
613# CONFIG_PARPORT is not set
614CONFIG_BLK_DEV=y
615# CONFIG_BLK_DEV_FD is not set
616# CONFIG_BLK_CPQ_DA is not set
617# CONFIG_BLK_CPQ_CISS_DA is not set
618# CONFIG_BLK_DEV_DAC960 is not set
619# CONFIG_BLK_DEV_UMEM is not set
620# CONFIG_BLK_DEV_COW_COMMON is not set
621CONFIG_BLK_DEV_LOOP=m
622CONFIG_BLK_DEV_CRYPTOLOOP=m
623CONFIG_BLK_DEV_NBD=m
624# CONFIG_BLK_DEV_SX8 is not set
625CONFIG_BLK_DEV_RAM=y
626CONFIG_BLK_DEV_RAM_COUNT=16
627CONFIG_BLK_DEV_RAM_SIZE=4096
628# CONFIG_BLK_DEV_XIP is not set
629# CONFIG_CDROM_PKTCDVD is not set
630# CONFIG_ATA_OVER_ETH is not set
631CONFIG_MISC_DEVICES=y
632# CONFIG_PHANTOM is not set
633# CONFIG_EEPROM_93CX6 is not set
634# CONFIG_SGI_IOC4 is not set
635# CONFIG_TIFM_CORE is not set
636# CONFIG_ENCLOSURE_SERVICES is not set
637CONFIG_HAVE_IDE=y
638# CONFIG_IDE is not set
639
640#
641# SCSI device support
642#
643# CONFIG_RAID_ATTRS is not set
644# CONFIG_SCSI is not set
645# CONFIG_SCSI_DMA is not set
646# CONFIG_SCSI_NETLINK is not set
647# CONFIG_ATA is not set
648CONFIG_MD=y
649CONFIG_BLK_DEV_MD=y
650CONFIG_MD_LINEAR=y
651CONFIG_MD_RAID0=y
652CONFIG_MD_RAID1=y
653CONFIG_MD_RAID10=y
654# CONFIG_MD_RAID456 is not set
655CONFIG_MD_MULTIPATH=y
656CONFIG_MD_FAULTY=y
657CONFIG_BLK_DEV_DM=y
658# CONFIG_DM_DEBUG is not set
659CONFIG_DM_CRYPT=y
660CONFIG_DM_SNAPSHOT=y
661CONFIG_DM_MIRROR=y
662CONFIG_DM_ZERO=y
663# CONFIG_DM_MULTIPATH is not set
664# CONFIG_DM_DELAY is not set
665# CONFIG_DM_UEVENT is not set
666# CONFIG_FUSION is not set
667
668#
669# IEEE 1394 (FireWire) support
670#
671# CONFIG_FIREWIRE is not set
672# CONFIG_IEEE1394 is not set
673# CONFIG_I2O is not set
674# CONFIG_MACINTOSH_DRIVERS is not set
675CONFIG_NETDEVICES=y
676# CONFIG_NETDEVICES_MULTIQUEUE is not set
677CONFIG_DUMMY=m
678CONFIG_BONDING=m
679# CONFIG_MACVLAN is not set
680# CONFIG_EQUALIZER is not set
681CONFIG_TUN=m
682# CONFIG_VETH is not set
683# CONFIG_ARCNET is not set
684CONFIG_PHYLIB=y
685
686#
687# MII PHY device drivers
688#
689# CONFIG_MARVELL_PHY is not set
690# CONFIG_DAVICOM_PHY is not set
691# CONFIG_QSEMI_PHY is not set
692# CONFIG_LXT_PHY is not set
693# CONFIG_CICADA_PHY is not set
694# CONFIG_VITESSE_PHY is not set
695# CONFIG_SMSC_PHY is not set
696CONFIG_BROADCOM_PHY=y
697# CONFIG_ICPLUS_PHY is not set
698# CONFIG_REALTEK_PHY is not set
699# CONFIG_FIXED_PHY is not set
700# CONFIG_MDIO_BITBANG is not set
701CONFIG_NET_ETHERNET=y
702CONFIG_MII=y
703# CONFIG_HAPPYMEAL is not set
704# CONFIG_SUNGEM is not set
705# CONFIG_CASSINI is not set
706# CONFIG_NET_VENDOR_3COM is not set
707# CONFIG_NET_TULIP is not set
708# CONFIG_HP100 is not set
709# CONFIG_IBM_NEW_EMAC_ZMII is not set
710# CONFIG_IBM_NEW_EMAC_RGMII is not set
711# CONFIG_IBM_NEW_EMAC_TAH is not set
712# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
713# CONFIG_NET_PCI is not set
714# CONFIG_B44 is not set
715CONFIG_NETDEV_1000=y
716# CONFIG_ACENIC is not set
717# CONFIG_DL2K is not set
718# CONFIG_E1000 is not set
719# CONFIG_E1000E is not set
720# CONFIG_E1000E_ENABLED is not set
721# CONFIG_IP1000 is not set
722# CONFIG_IGB is not set
723# CONFIG_NS83820 is not set
724# CONFIG_HAMACHI is not set
725# CONFIG_YELLOWFIN is not set
726# CONFIG_R8169 is not set
727# CONFIG_SIS190 is not set
728# CONFIG_SKGE is not set
729# CONFIG_SKY2 is not set
730# CONFIG_SK98LIN is not set
731# CONFIG_VIA_VELOCITY is not set
732# CONFIG_TIGON3 is not set
733# CONFIG_BNX2 is not set
734CONFIG_GIANFAR=y
735# CONFIG_GFAR_NAPI is not set
736# CONFIG_QLA3XXX is not set
737# CONFIG_ATL1 is not set
738# CONFIG_NETDEV_10000 is not set
739# CONFIG_TR is not set
740
741#
742# Wireless LAN
743#
744# CONFIG_WLAN_PRE80211 is not set
745# CONFIG_WLAN_80211 is not set
746# CONFIG_WAN is not set
747CONFIG_ATM_DRIVERS=y
748# CONFIG_ATM_DUMMY is not set
749# CONFIG_ATM_TCP is not set
750# CONFIG_ATM_LANAI is not set
751# CONFIG_ATM_ENI is not set
752# CONFIG_ATM_FIRESTREAM is not set
753# CONFIG_ATM_ZATM is not set
754# CONFIG_ATM_NICSTAR is not set
755# CONFIG_ATM_IDT77252 is not set
756# CONFIG_ATM_AMBASSADOR is not set
757# CONFIG_ATM_HORIZON is not set
758# CONFIG_ATM_IA is not set
759# CONFIG_ATM_FORE200E_MAYBE is not set
760# CONFIG_ATM_HE is not set
761# CONFIG_FDDI is not set
762# CONFIG_HIPPI is not set
763CONFIG_PPP=m
764CONFIG_PPP_MULTILINK=y
765CONFIG_PPP_FILTER=y
766CONFIG_PPP_ASYNC=m
767CONFIG_PPP_SYNC_TTY=m
768CONFIG_PPP_DEFLATE=m
769CONFIG_PPP_BSDCOMP=m
770# CONFIG_PPP_MPPE is not set
771CONFIG_PPPOE=m
772CONFIG_PPPOATM=m
773# CONFIG_PPPOL2TP is not set
774CONFIG_SLIP=m
775CONFIG_SLIP_COMPRESSED=y
776CONFIG_SLHC=m
777CONFIG_SLIP_SMART=y
778CONFIG_SLIP_MODE_SLIP6=y
779CONFIG_NETCONSOLE=y
780# CONFIG_NETCONSOLE_DYNAMIC is not set
781CONFIG_NETPOLL=y
782CONFIG_NETPOLL_TRAP=y
783CONFIG_NET_POLL_CONTROLLER=y
784# CONFIG_ISDN is not set
785# CONFIG_PHONE is not set
786
787#
788# Input device support
789#
790CONFIG_INPUT=y
791# CONFIG_INPUT_FF_MEMLESS is not set
792# CONFIG_INPUT_POLLDEV is not set
793
794#
795# Userland interfaces
796#
797CONFIG_INPUT_MOUSEDEV=y
798CONFIG_INPUT_MOUSEDEV_PSAUX=y
799CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
800CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
801# CONFIG_INPUT_JOYDEV is not set
802# CONFIG_INPUT_EVDEV is not set
803# CONFIG_INPUT_EVBUG is not set
804
805#
806# Input Device Drivers
807#
808# CONFIG_INPUT_KEYBOARD is not set
809# CONFIG_INPUT_MOUSE is not set
810# CONFIG_INPUT_JOYSTICK is not set
811# CONFIG_INPUT_TABLET is not set
812# CONFIG_INPUT_TOUCHSCREEN is not set
813# CONFIG_INPUT_MISC is not set
814
815#
816# Hardware I/O ports
817#
818# CONFIG_SERIO is not set
819# CONFIG_GAMEPORT is not set
820
821#
822# Character devices
823#
824CONFIG_VT=y
825CONFIG_VT_CONSOLE=y
826CONFIG_HW_CONSOLE=y
827# CONFIG_VT_HW_CONSOLE_BINDING is not set
828# CONFIG_SERIAL_NONSTANDARD is not set
829# CONFIG_NOZOMI is not set
830
831#
832# Serial drivers
833#
834CONFIG_SERIAL_8250=y
835CONFIG_SERIAL_8250_CONSOLE=y
836# CONFIG_SERIAL_8250_PCI is not set
837CONFIG_SERIAL_8250_NR_UARTS=2
838CONFIG_SERIAL_8250_RUNTIME_UARTS=2
839# CONFIG_SERIAL_8250_EXTENDED is not set
840
841#
842# Non-8250 serial port support
843#
844# CONFIG_SERIAL_UARTLITE is not set
845CONFIG_SERIAL_CORE=y
846CONFIG_SERIAL_CORE_CONSOLE=y
847# CONFIG_SERIAL_JSM is not set
848# CONFIG_SERIAL_OF_PLATFORM is not set
849CONFIG_UNIX98_PTYS=y
850CONFIG_LEGACY_PTYS=y
851CONFIG_LEGACY_PTY_COUNT=256
852# CONFIG_IPMI_HANDLER is not set
853CONFIG_HW_RANDOM=m
854# CONFIG_NVRAM is not set
855# CONFIG_GEN_RTC is not set
856# CONFIG_R3964 is not set
857# CONFIG_APPLICOM is not set
858# CONFIG_RAW_DRIVER is not set
859# CONFIG_TCG_TPM is not set
860CONFIG_DEVPORT=y
861CONFIG_I2C=y
862CONFIG_I2C_BOARDINFO=y
863CONFIG_I2C_CHARDEV=y
864
865#
866# I2C Algorithms
867#
868# CONFIG_I2C_ALGOBIT is not set
869# CONFIG_I2C_ALGOPCF is not set
870# CONFIG_I2C_ALGOPCA is not set
871
872#
873# I2C Hardware Bus support
874#
875# CONFIG_I2C_ALI1535 is not set
876# CONFIG_I2C_ALI1563 is not set
877# CONFIG_I2C_ALI15X3 is not set
878# CONFIG_I2C_AMD756 is not set
879# CONFIG_I2C_AMD8111 is not set
880# CONFIG_I2C_I801 is not set
881# CONFIG_I2C_I810 is not set
882# CONFIG_I2C_PIIX4 is not set
883CONFIG_I2C_MPC=y
884# CONFIG_I2C_NFORCE2 is not set
885# CONFIG_I2C_OCORES is not set
886# CONFIG_I2C_PARPORT_LIGHT is not set
887# CONFIG_I2C_PROSAVAGE is not set
888# CONFIG_I2C_SAVAGE4 is not set
889# CONFIG_I2C_SIMTEC is not set
890# CONFIG_I2C_SIS5595 is not set
891# CONFIG_I2C_SIS630 is not set
892# CONFIG_I2C_SIS96X is not set
893# CONFIG_I2C_TAOS_EVM is not set
894# CONFIG_I2C_STUB is not set
895# CONFIG_I2C_VIA is not set
896# CONFIG_I2C_VIAPRO is not set
897# CONFIG_I2C_VOODOO3 is not set
898
899#
900# Miscellaneous I2C Chip support
901#
902# CONFIG_DS1682 is not set
903# CONFIG_SENSORS_EEPROM is not set
904# CONFIG_SENSORS_PCF8574 is not set
905# CONFIG_PCF8575 is not set
906# CONFIG_SENSORS_PCF8591 is not set
907# CONFIG_TPS65010 is not set
908# CONFIG_SENSORS_MAX6875 is not set
909# CONFIG_SENSORS_TSL2550 is not set
910# CONFIG_I2C_DEBUG_CORE is not set
911# CONFIG_I2C_DEBUG_ALGO is not set
912# CONFIG_I2C_DEBUG_BUS is not set
913# CONFIG_I2C_DEBUG_CHIP is not set
914
915#
916# SPI support
917#
918# CONFIG_SPI is not set
919# CONFIG_SPI_MASTER is not set
920# CONFIG_W1 is not set
921# CONFIG_POWER_SUPPLY is not set
922CONFIG_HWMON=y
923# CONFIG_HWMON_VID is not set
924# CONFIG_SENSORS_AD7418 is not set
925# CONFIG_SENSORS_ADM1021 is not set
926# CONFIG_SENSORS_ADM1025 is not set
927# CONFIG_SENSORS_ADM1026 is not set
928# CONFIG_SENSORS_ADM1029 is not set
929# CONFIG_SENSORS_ADM1031 is not set
930# CONFIG_SENSORS_ADM9240 is not set
931# CONFIG_SENSORS_ADT7470 is not set
932# CONFIG_SENSORS_ADT7473 is not set
933# CONFIG_SENSORS_ATXP1 is not set
934# CONFIG_SENSORS_DS1621 is not set
935# CONFIG_SENSORS_I5K_AMB is not set
936# CONFIG_SENSORS_F71805F is not set
937# CONFIG_SENSORS_F71882FG is not set
938# CONFIG_SENSORS_F75375S is not set
939# CONFIG_SENSORS_GL518SM is not set
940# CONFIG_SENSORS_GL520SM is not set
941# CONFIG_SENSORS_IT87 is not set
942# CONFIG_SENSORS_LM63 is not set
943# CONFIG_SENSORS_LM75 is not set
944# CONFIG_SENSORS_LM77 is not set
945# CONFIG_SENSORS_LM78 is not set
946# CONFIG_SENSORS_LM80 is not set
947# CONFIG_SENSORS_LM83 is not set
948# CONFIG_SENSORS_LM85 is not set
949# CONFIG_SENSORS_LM87 is not set
950# CONFIG_SENSORS_LM90 is not set
951# CONFIG_SENSORS_LM92 is not set
952# CONFIG_SENSORS_LM93 is not set
953# CONFIG_SENSORS_MAX1619 is not set
954# CONFIG_SENSORS_MAX6650 is not set
955# CONFIG_SENSORS_PC87360 is not set
956# CONFIG_SENSORS_PC87427 is not set
957# CONFIG_SENSORS_SIS5595 is not set
958# CONFIG_SENSORS_DME1737 is not set
959# CONFIG_SENSORS_SMSC47M1 is not set
960# CONFIG_SENSORS_SMSC47M192 is not set
961# CONFIG_SENSORS_SMSC47B397 is not set
962# CONFIG_SENSORS_ADS7828 is not set
963# CONFIG_SENSORS_THMC50 is not set
964# CONFIG_SENSORS_VIA686A is not set
965# CONFIG_SENSORS_VT1211 is not set
966# CONFIG_SENSORS_VT8231 is not set
967# CONFIG_SENSORS_W83781D is not set
968# CONFIG_SENSORS_W83791D is not set
969# CONFIG_SENSORS_W83792D is not set
970# CONFIG_SENSORS_W83793 is not set
971# CONFIG_SENSORS_W83L785TS is not set
972# CONFIG_SENSORS_W83L786NG is not set
973# CONFIG_SENSORS_W83627HF is not set
974# CONFIG_SENSORS_W83627EHF is not set
975# CONFIG_HWMON_DEBUG_CHIP is not set
976# CONFIG_THERMAL is not set
977CONFIG_WATCHDOG=y
978# CONFIG_WATCHDOG_NOWAYOUT is not set
979
980#
981# Watchdog Device Drivers
982#
983CONFIG_SOFT_WATCHDOG=m
984
985#
986# PCI-based Watchdog Cards
987#
988# CONFIG_PCIPCWATCHDOG is not set
989# CONFIG_WDTPCI is not set
990
991#
992# Sonics Silicon Backplane
993#
994CONFIG_SSB_POSSIBLE=y
995# CONFIG_SSB is not set
996
997#
998# Multifunction device drivers
999#
1000# CONFIG_MFD_SM501 is not set
1001
1002#
1003# Multimedia devices
1004#
1005# CONFIG_VIDEO_DEV is not set
1006# CONFIG_DVB_CORE is not set
1007CONFIG_DAB=y
1008
1009#
1010# Graphics support
1011#
1012# CONFIG_AGP is not set
1013# CONFIG_DRM is not set
1014# CONFIG_VGASTATE is not set
1015CONFIG_VIDEO_OUTPUT_CONTROL=m
1016# CONFIG_FB is not set
1017# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1018
1019#
1020# Display device support
1021#
1022# CONFIG_DISPLAY_SUPPORT is not set
1023
1024#
1025# Console display driver support
1026#
1027CONFIG_VGA_CONSOLE=y
1028# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1029CONFIG_DUMMY_CONSOLE=y
1030
1031#
1032# Sound
1033#
1034# CONFIG_SOUND is not set
1035CONFIG_HID_SUPPORT=y
1036CONFIG_HID=y
1037# CONFIG_HID_DEBUG is not set
1038# CONFIG_HIDRAW is not set
1039CONFIG_USB_SUPPORT=y
1040CONFIG_USB_ARCH_HAS_HCD=y
1041CONFIG_USB_ARCH_HAS_OHCI=y
1042CONFIG_USB_ARCH_HAS_EHCI=y
1043# CONFIG_USB is not set
1044
1045#
1046# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1047#
1048# CONFIG_USB_GADGET is not set
1049# CONFIG_MMC is not set
1050# CONFIG_MEMSTICK is not set
1051# CONFIG_NEW_LEDS is not set
1052# CONFIG_INFINIBAND is not set
1053# CONFIG_EDAC is not set
1054# CONFIG_RTC_CLASS is not set
1055# CONFIG_DMADEVICES is not set
1056
1057#
1058# Userspace I/O
1059#
1060# CONFIG_UIO is not set
1061
1062#
1063# File systems
1064#
1065CONFIG_EXT2_FS=y
1066CONFIG_EXT2_FS_XATTR=y
1067CONFIG_EXT2_FS_POSIX_ACL=y
1068# CONFIG_EXT2_FS_SECURITY is not set
1069# CONFIG_EXT2_FS_XIP is not set
1070CONFIG_EXT3_FS=y
1071CONFIG_EXT3_FS_XATTR=y
1072CONFIG_EXT3_FS_POSIX_ACL=y
1073# CONFIG_EXT3_FS_SECURITY is not set
1074# CONFIG_EXT4DEV_FS is not set
1075CONFIG_JBD=y
1076# CONFIG_JBD_DEBUG is not set
1077CONFIG_FS_MBCACHE=y
1078CONFIG_REISERFS_FS=m
1079# CONFIG_REISERFS_CHECK is not set
1080# CONFIG_REISERFS_PROC_INFO is not set
1081CONFIG_REISERFS_FS_XATTR=y
1082CONFIG_REISERFS_FS_POSIX_ACL=y
1083# CONFIG_REISERFS_FS_SECURITY is not set
1084# CONFIG_JFS_FS is not set
1085CONFIG_FS_POSIX_ACL=y
1086# CONFIG_XFS_FS is not set
1087# CONFIG_GFS2_FS is not set
1088CONFIG_OCFS2_FS=m
1089CONFIG_OCFS2_DEBUG_MASKLOG=y
1090# CONFIG_OCFS2_DEBUG_FS is not set
1091CONFIG_DNOTIFY=y
1092CONFIG_INOTIFY=y
1093CONFIG_INOTIFY_USER=y
1094# CONFIG_QUOTA is not set
1095CONFIG_AUTOFS_FS=m
1096CONFIG_AUTOFS4_FS=m
1097# CONFIG_FUSE_FS is not set
1098
1099#
1100# CD-ROM/DVD Filesystems
1101#
1102# CONFIG_ISO9660_FS is not set
1103# CONFIG_UDF_FS is not set
1104
1105#
1106# DOS/FAT/NT Filesystems
1107#
1108# CONFIG_MSDOS_FS is not set
1109# CONFIG_VFAT_FS is not set
1110# CONFIG_NTFS_FS is not set
1111
1112#
1113# Pseudo filesystems
1114#
1115CONFIG_PROC_FS=y
1116CONFIG_PROC_KCORE=y
1117CONFIG_PROC_SYSCTL=y
1118CONFIG_SYSFS=y
1119CONFIG_TMPFS=y
1120# CONFIG_TMPFS_POSIX_ACL is not set
1121# CONFIG_HUGETLB_PAGE is not set
1122CONFIG_CONFIGFS_FS=m
1123
1124#
1125# Miscellaneous filesystems
1126#
1127# CONFIG_ADFS_FS is not set
1128# CONFIG_AFFS_FS is not set
1129# CONFIG_HFS_FS is not set
1130# CONFIG_HFSPLUS_FS is not set
1131# CONFIG_BEFS_FS is not set
1132# CONFIG_BFS_FS is not set
1133# CONFIG_EFS_FS is not set
1134# CONFIG_JFFS2_FS is not set
1135# CONFIG_CRAMFS is not set
1136# CONFIG_VXFS_FS is not set
1137CONFIG_MINIX_FS=m
1138# CONFIG_HPFS_FS is not set
1139# CONFIG_QNX4FS_FS is not set
1140CONFIG_ROMFS_FS=m
1141# CONFIG_SYSV_FS is not set
1142# CONFIG_UFS_FS is not set
1143CONFIG_NETWORK_FILESYSTEMS=y
1144CONFIG_NFS_FS=y
1145CONFIG_NFS_V3=y
1146# CONFIG_NFS_V3_ACL is not set
1147CONFIG_NFS_V4=y
1148CONFIG_NFS_DIRECTIO=y
1149# CONFIG_NFSD is not set
1150CONFIG_ROOT_NFS=y
1151CONFIG_LOCKD=y
1152CONFIG_LOCKD_V4=y
1153CONFIG_NFS_COMMON=y
1154CONFIG_SUNRPC=y
1155CONFIG_SUNRPC_GSS=y
1156# CONFIG_SUNRPC_BIND34 is not set
1157CONFIG_RPCSEC_GSS_KRB5=y
1158# CONFIG_RPCSEC_GSS_SPKM3 is not set
1159CONFIG_SMB_FS=m
1160CONFIG_SMB_NLS_DEFAULT=y
1161CONFIG_SMB_NLS_REMOTE="cp437"
1162CONFIG_CIFS=m
1163# CONFIG_CIFS_STATS is not set
1164# CONFIG_CIFS_WEAK_PW_HASH is not set
1165CONFIG_CIFS_XATTR=y
1166CONFIG_CIFS_POSIX=y
1167# CONFIG_CIFS_DEBUG2 is not set
1168# CONFIG_CIFS_EXPERIMENTAL is not set
1169# CONFIG_NCP_FS is not set
1170# CONFIG_CODA_FS is not set
1171# CONFIG_AFS_FS is not set
1172
1173#
1174# Partition Types
1175#
1176# CONFIG_PARTITION_ADVANCED is not set
1177CONFIG_MSDOS_PARTITION=y
1178CONFIG_NLS=m
1179CONFIG_NLS_DEFAULT="iso8859-1"
1180CONFIG_NLS_CODEPAGE_437=m
1181CONFIG_NLS_CODEPAGE_737=m
1182CONFIG_NLS_CODEPAGE_775=m
1183CONFIG_NLS_CODEPAGE_850=m
1184CONFIG_NLS_CODEPAGE_852=m
1185CONFIG_NLS_CODEPAGE_855=m
1186CONFIG_NLS_CODEPAGE_857=m
1187CONFIG_NLS_CODEPAGE_860=m
1188CONFIG_NLS_CODEPAGE_861=m
1189CONFIG_NLS_CODEPAGE_862=m
1190CONFIG_NLS_CODEPAGE_863=m
1191CONFIG_NLS_CODEPAGE_864=m
1192CONFIG_NLS_CODEPAGE_865=m
1193CONFIG_NLS_CODEPAGE_866=m
1194CONFIG_NLS_CODEPAGE_869=m
1195CONFIG_NLS_CODEPAGE_936=m
1196CONFIG_NLS_CODEPAGE_950=m
1197CONFIG_NLS_CODEPAGE_932=m
1198CONFIG_NLS_CODEPAGE_949=m
1199CONFIG_NLS_CODEPAGE_874=m
1200CONFIG_NLS_ISO8859_8=m
1201CONFIG_NLS_CODEPAGE_1250=m
1202CONFIG_NLS_CODEPAGE_1251=m
1203CONFIG_NLS_ASCII=m
1204CONFIG_NLS_ISO8859_1=m
1205CONFIG_NLS_ISO8859_2=m
1206CONFIG_NLS_ISO8859_3=m
1207CONFIG_NLS_ISO8859_4=m
1208CONFIG_NLS_ISO8859_5=m
1209CONFIG_NLS_ISO8859_6=m
1210CONFIG_NLS_ISO8859_7=m
1211CONFIG_NLS_ISO8859_9=m
1212CONFIG_NLS_ISO8859_13=m
1213CONFIG_NLS_ISO8859_14=m
1214CONFIG_NLS_ISO8859_15=m
1215CONFIG_NLS_KOI8_R=m
1216CONFIG_NLS_KOI8_U=m
1217CONFIG_NLS_UTF8=m
1218# CONFIG_DLM is not set
1219
1220#
1221# Library routines
1222#
1223CONFIG_BITREVERSE=y
1224CONFIG_CRC_CCITT=m
1225# CONFIG_CRC16 is not set
1226# CONFIG_CRC_ITU_T is not set
1227CONFIG_CRC32=y
1228# CONFIG_CRC7 is not set
1229CONFIG_LIBCRC32C=m
1230CONFIG_ZLIB_INFLATE=m
1231CONFIG_ZLIB_DEFLATE=m
1232CONFIG_PLIST=y
1233CONFIG_HAS_IOMEM=y
1234CONFIG_HAS_IOPORT=y
1235CONFIG_HAS_DMA=y
1236CONFIG_HAVE_LMB=y
1237
1238#
1239# Kernel hacking
1240#
1241# CONFIG_PRINTK_TIME is not set
1242CONFIG_ENABLE_WARN_DEPRECATED=y
1243CONFIG_ENABLE_MUST_CHECK=y
1244CONFIG_MAGIC_SYSRQ=y
1245# CONFIG_UNUSED_SYMBOLS is not set
1246CONFIG_DEBUG_FS=y
1247# CONFIG_HEADERS_CHECK is not set
1248CONFIG_DEBUG_KERNEL=y
1249# CONFIG_DEBUG_SHIRQ is not set
1250CONFIG_DETECT_SOFTLOCKUP=y
1251CONFIG_SCHED_DEBUG=y
1252# CONFIG_SCHEDSTATS is not set
1253# CONFIG_TIMER_STATS is not set
1254# CONFIG_DEBUG_SLAB is not set
1255# CONFIG_DEBUG_RT_MUTEXES is not set
1256# CONFIG_RT_MUTEX_TESTER is not set
1257# CONFIG_DEBUG_SPINLOCK is not set
1258# CONFIG_DEBUG_MUTEXES is not set
1259# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1260# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1261# CONFIG_DEBUG_KOBJECT is not set
1262# CONFIG_DEBUG_BUGVERBOSE is not set
1263CONFIG_DEBUG_INFO=y
1264# CONFIG_DEBUG_VM is not set
1265# CONFIG_DEBUG_LIST is not set
1266# CONFIG_DEBUG_SG is not set
1267# CONFIG_BOOT_PRINTK_DELAY is not set
1268# CONFIG_RCU_TORTURE_TEST is not set
1269# CONFIG_BACKTRACE_SELF_TEST is not set
1270# CONFIG_FAULT_INJECTION is not set
1271# CONFIG_SAMPLES is not set
1272# CONFIG_DEBUG_STACKOVERFLOW is not set
1273# CONFIG_DEBUG_STACK_USAGE is not set
1274# CONFIG_DEBUG_PAGEALLOC is not set
1275CONFIG_DEBUGGER=y
1276# CONFIG_XMON is not set
1277# CONFIG_VIRQ_DEBUG is not set
1278# CONFIG_BDI_SWITCH is not set
1279# CONFIG_PPC_EARLY_DEBUG is not set
1280
1281#
1282# Security options
1283#
1284# CONFIG_KEYS is not set
1285CONFIG_SECURITY=y
1286CONFIG_SECURITY_NETWORK=y
1287# CONFIG_SECURITY_NETWORK_XFRM is not set
1288CONFIG_SECURITY_CAPABILITIES=y
1289# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1290CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1291CONFIG_CRYPTO=y
1292CONFIG_CRYPTO_ALGAPI=y
1293CONFIG_CRYPTO_AEAD=m
1294CONFIG_CRYPTO_BLKCIPHER=y
1295# CONFIG_CRYPTO_SEQIV is not set
1296CONFIG_CRYPTO_HASH=y
1297CONFIG_CRYPTO_MANAGER=y
1298CONFIG_CRYPTO_HMAC=y
1299# CONFIG_CRYPTO_XCBC is not set
1300CONFIG_CRYPTO_NULL=m
1301CONFIG_CRYPTO_MD4=m
1302CONFIG_CRYPTO_MD5=y
1303CONFIG_CRYPTO_SHA1=m
1304CONFIG_CRYPTO_SHA256=m
1305CONFIG_CRYPTO_SHA512=m
1306CONFIG_CRYPTO_WP512=m
1307# CONFIG_CRYPTO_TGR192 is not set
1308# CONFIG_CRYPTO_GF128MUL is not set
1309CONFIG_CRYPTO_ECB=m
1310CONFIG_CRYPTO_CBC=y
1311CONFIG_CRYPTO_PCBC=m
1312# CONFIG_CRYPTO_LRW is not set
1313# CONFIG_CRYPTO_XTS is not set
1314# CONFIG_CRYPTO_CTR is not set
1315# CONFIG_CRYPTO_GCM is not set
1316# CONFIG_CRYPTO_CCM is not set
1317# CONFIG_CRYPTO_CRYPTD is not set
1318CONFIG_CRYPTO_DES=y
1319# CONFIG_CRYPTO_FCRYPT is not set
1320CONFIG_CRYPTO_BLOWFISH=m
1321CONFIG_CRYPTO_TWOFISH=m
1322CONFIG_CRYPTO_TWOFISH_COMMON=m
1323CONFIG_CRYPTO_SERPENT=m
1324CONFIG_CRYPTO_AES=m
1325CONFIG_CRYPTO_CAST5=m
1326CONFIG_CRYPTO_CAST6=m
1327CONFIG_CRYPTO_TEA=m
1328CONFIG_CRYPTO_ARC4=m
1329CONFIG_CRYPTO_KHAZAD=m
1330CONFIG_CRYPTO_ANUBIS=m
1331# CONFIG_CRYPTO_SEED is not set
1332# CONFIG_CRYPTO_SALSA20 is not set
1333CONFIG_CRYPTO_DEFLATE=m
1334CONFIG_CRYPTO_MICHAEL_MIC=m
1335CONFIG_CRYPTO_CRC32C=m
1336# CONFIG_CRYPTO_CAMELLIA is not set
1337CONFIG_CRYPTO_TEST=m
1338CONFIG_CRYPTO_AUTHENC=m
1339# CONFIG_CRYPTO_LZO is not set
1340CONFIG_CRYPTO_HW=y
1341# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1342# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index b9dbfff9afe9..ce1e8d24e747 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
67obj-$(CONFIG_SMP) += smp.o 67obj-$(CONFIG_SMP) += smp.o
68obj-$(CONFIG_KPROBES) += kprobes.o 68obj-$(CONFIG_KPROBES) += kprobes.o
69obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o 69obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o
70obj-$(CONFIG_STACKTRACE) += stacktrace.o
70 71
71pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o 72pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o
72obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ 73obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 4b749c416464..292c6d8db0e1 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -26,8 +26,6 @@
26#ifdef CONFIG_PPC64 26#ifdef CONFIG_PPC64
27#include <linux/time.h> 27#include <linux/time.h>
28#include <linux/hardirq.h> 28#include <linux/hardirq.h>
29#else
30#include <linux/ptrace.h>
31#endif 29#endif
32 30
33#include <asm/io.h> 31#include <asm/io.h>
@@ -46,6 +44,9 @@
46#include <asm/mmu.h> 44#include <asm/mmu.h>
47#include <asm/hvcall.h> 45#include <asm/hvcall.h>
48#endif 46#endif
47#ifdef CONFIG_PPC_ISERIES
48#include <asm/iseries/alpaca.h>
49#endif
49 50
50#define DEFINE(sym, val) \ 51#define DEFINE(sym, val) \
51 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 52 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -60,7 +61,6 @@ int main(void)
60 DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context)); 61 DEFINE(AUDITCONTEXT, offsetof(struct task_struct, audit_context));
61#else 62#else
62 DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); 63 DEFINE(THREAD_INFO, offsetof(struct task_struct, stack));
63 DEFINE(PTRACE, offsetof(struct task_struct, ptrace));
64#endif /* CONFIG_PPC64 */ 64#endif /* CONFIG_PPC64 */
65 65
66 DEFINE(KSP, offsetof(struct thread_struct, ksp)); 66 DEFINE(KSP, offsetof(struct thread_struct, ksp));
@@ -80,7 +80,6 @@ int main(void)
80 DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); 80 DEFINE(PGDIR, offsetof(struct thread_struct, pgdir));
81#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 81#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
82 DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); 82 DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0));
83 DEFINE(PT_PTRACED, PT_PTRACED);
84#endif 83#endif
85#ifdef CONFIG_SPE 84#ifdef CONFIG_SPE
86 DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0])); 85 DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0]));
@@ -325,6 +324,9 @@ int main(void)
325 DEFINE(PAGE_OFFSET_VSID, KERNEL_VSID(PAGE_OFFSET)); 324 DEFINE(PAGE_OFFSET_VSID, KERNEL_VSID(PAGE_OFFSET));
326 DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START)); 325 DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START));
327 DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START)); 326 DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START));
327
328 /* alpaca */
329 DEFINE(ALPACA_SIZE, sizeof(struct alpaca));
328#endif 330#endif
329 331
330 DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE); 332 DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE);
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 80e2eef05b2e..9f9377745490 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -7,6 +7,7 @@
7#include <linux/string.h> 7#include <linux/string.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/lmb.h>
10 11
11#include <asm/sections.h> 12#include <asm/sections.h>
12#include <asm/prom.h> 13#include <asm/prom.h>
@@ -15,7 +16,7 @@
15#include <asm/mmu.h> 16#include <asm/mmu.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <asm/lmb.h> 19#include <asm/prom.h>
19#include <asm/processor.h> 20#include <asm/processor.h>
20#include <asm/udbg.h> 21#include <asm/udbg.h>
21 22
diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S
index 6250443ab9c9..5465e8de0e61 100644
--- a/arch/powerpc/kernel/cpu_setup_44x.S
+++ b/arch/powerpc/kernel/cpu_setup_44x.S
@@ -3,7 +3,7 @@
3 * Valentine Barshak <vbarshak@ru.mvista.com> 3 * Valentine Barshak <vbarshak@ru.mvista.com>
4 * MontaVista Software, Inc (c) 2007 4 * MontaVista Software, Inc (c) 2007
5 * 5 *
6 * Based on cpu_setup_6xx code by 6 * Based on cpu_setup_6xx code by
7 * Benjamin Herrenschmidt <benh@kernel.crashing.org> 7 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
@@ -32,6 +32,9 @@ _GLOBAL(__setup_cpu_440grx)
32 bl __fixup_440A_mcheck 32 bl __fixup_440A_mcheck
33 mtlr r4 33 mtlr r4
34 blr 34 blr
35_GLOBAL(__setup_cpu_460ex)
36_GLOBAL(__setup_cpu_460gt)
37 b __init_fpu_44x
35_GLOBAL(__setup_cpu_440gx) 38_GLOBAL(__setup_cpu_440gx)
36_GLOBAL(__setup_cpu_440spe) 39_GLOBAL(__setup_cpu_440spe)
37 b __fixup_440A_mcheck 40 b __fixup_440A_mcheck
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 2a8f5cc5184f..26ffb44e2701 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -36,6 +36,8 @@ extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); 36extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); 37extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); 38extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); 41extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); 42extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); 43extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -1397,6 +1399,30 @@ static struct cpu_spec __initdata cpu_specs[] = {
1397 .machine_check = machine_check_440A, 1399 .machine_check = machine_check_440A,
1398 .platform = "ppc440", 1400 .platform = "ppc440",
1399 }, 1401 },
1402 { /* 460EX */
1403 .pvr_mask = 0xffff0002,
1404 .pvr_value = 0x13020002,
1405 .cpu_name = "460EX",
1406 .cpu_features = CPU_FTRS_44X,
1407 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
1410 .cpu_setup = __setup_cpu_460ex,
1411 .machine_check = machine_check_440A,
1412 .platform = "ppc440",
1413 },
1414 { /* 460GT */
1415 .pvr_mask = 0xffff0002,
1416 .pvr_value = 0x13020000,
1417 .cpu_name = "460GT",
1418 .cpu_features = CPU_FTRS_44X,
1419 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1420 .icache_bsize = 32,
1421 .dcache_bsize = 32,
1422 .cpu_setup = __setup_cpu_460gt,
1423 .machine_check = machine_check_440A,
1424 .platform = "ppc440",
1425 },
1400#endif /* CONFIG_44x */ 1426#endif /* CONFIG_44x */
1401#ifdef CONFIG_FSL_BOOKE 1427#ifdef CONFIG_FSL_BOOKE
1402#ifdef CONFIG_E200 1428#ifdef CONFIG_E200
@@ -1512,7 +1538,7 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1512 *t = *s; 1538 *t = *s;
1513 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; 1539 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1514#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) 1540#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1515 /* ppc64 and booke expect identify_cpu to also call 1541 /* ppc64 and booke expect identify_cpu to also call
1516 * setup_cpu for that processor. I will consolidate 1542 * setup_cpu for that processor. I will consolidate
1517 * that at a later time, for now, just use #ifdef. 1543 * that at a later time, for now, just use #ifdef.
1518 * we also don't need to PTRRELOC the function pointer 1544 * we also don't need to PTRRELOC the function pointer
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 571132ed12c1..eae401de3f76 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -24,12 +24,13 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/lmb.h>
27 28
28#include <asm/processor.h> 29#include <asm/processor.h>
29#include <asm/machdep.h> 30#include <asm/machdep.h>
30#include <asm/kexec.h> 31#include <asm/kexec.h>
31#include <asm/kdump.h> 32#include <asm/kdump.h>
32#include <asm/lmb.h> 33#include <asm/prom.h>
33#include <asm/firmware.h> 34#include <asm/firmware.h>
34#include <asm/smp.h> 35#include <asm/smp.h>
35#include <asm/system.h> 36#include <asm/system.h>
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 29ff77c468ac..9ee3c5278db0 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -13,8 +13,9 @@
13 13
14#include <linux/crash_dump.h> 14#include <linux/crash_dump.h>
15#include <linux/bootmem.h> 15#include <linux/bootmem.h>
16#include <linux/lmb.h>
16#include <asm/kdump.h> 17#include <asm/kdump.h>
17#include <asm/lmb.h> 18#include <asm/prom.h>
18#include <asm/firmware.h> 19#include <asm/firmware.h>
19#include <asm/uaccess.h> 20#include <asm/uaccess.h>
20 21
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 69a91bd46115..84c868633068 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -110,9 +110,9 @@ transfer_to_handler:
110 stw r11,PT_REGS(r12) 110 stw r11,PT_REGS(r12)
111#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) 111#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
112 /* Check to see if the dbcr0 register is set up to debug. Use the 112 /* Check to see if the dbcr0 register is set up to debug. Use the
113 single-step bit to do this. */ 113 internal debug mode bit to do this. */
114 lwz r12,THREAD_DBCR0(r12) 114 lwz r12,THREAD_DBCR0(r12)
115 andis. r12,r12,DBCR0_IC@h 115 andis. r12,r12,DBCR0_IDM@h
116 beq+ 3f 116 beq+ 3f
117 /* From user and task is ptraced - load up global dbcr0 */ 117 /* From user and task is ptraced - load up global dbcr0 */
118 li r12,-1 /* clear all pending debug events */ 118 li r12,-1 /* clear all pending debug events */
@@ -120,6 +120,12 @@ transfer_to_handler:
120 lis r11,global_dbcr0@ha 120 lis r11,global_dbcr0@ha
121 tophys(r11,r11) 121 tophys(r11,r11)
122 addi r11,r11,global_dbcr0@l 122 addi r11,r11,global_dbcr0@l
123#ifdef CONFIG_SMP
124 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
125 lwz r9,TI_CPU(r9)
126 slwi r9,r9,3
127 add r11,r11,r9
128#endif
123 lwz r12,0(r11) 129 lwz r12,0(r11)
124 mtspr SPRN_DBCR0,r12 130 mtspr SPRN_DBCR0,r12
125 lwz r12,4(r11) 131 lwz r12,4(r11)
@@ -238,10 +244,10 @@ ret_from_syscall:
238 stw r11,_CCR(r1) 244 stw r11,_CCR(r1)
239syscall_exit_cont: 245syscall_exit_cont:
240#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 246#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
241 /* If the process has its own DBCR0 value, load it up. The single 247 /* If the process has its own DBCR0 value, load it up. The internal
242 step bit tells us that dbcr0 should be loaded. */ 248 debug mode bit tells us that dbcr0 should be loaded. */
243 lwz r0,THREAD+THREAD_DBCR0(r2) 249 lwz r0,THREAD+THREAD_DBCR0(r2)
244 andis. r10,r0,DBCR0_IC@h 250 andis. r10,r0,DBCR0_IDM@h
245 bnel- load_dbcr0 251 bnel- load_dbcr0
246#endif 252#endif
247#ifdef CONFIG_44x 253#ifdef CONFIG_44x
@@ -666,10 +672,10 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
666 672
667restore_user: 673restore_user:
668#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 674#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
669 /* Check whether this process has its own DBCR0 value. The single 675 /* Check whether this process has its own DBCR0 value. The internal
670 step bit tells us that dbcr0 should be loaded. */ 676 debug mode bit tells us that dbcr0 should be loaded. */
671 lwz r0,THREAD+THREAD_DBCR0(r2) 677 lwz r0,THREAD+THREAD_DBCR0(r2)
672 andis. r10,r0,DBCR0_IC@h 678 andis. r10,r0,DBCR0_IDM@h
673 bnel- load_dbcr0 679 bnel- load_dbcr0
674#endif 680#endif
675 681
@@ -879,6 +885,12 @@ load_dbcr0:
879 mfspr r10,SPRN_DBCR0 885 mfspr r10,SPRN_DBCR0
880 lis r11,global_dbcr0@ha 886 lis r11,global_dbcr0@ha
881 addi r11,r11,global_dbcr0@l 887 addi r11,r11,global_dbcr0@l
888#ifdef CONFIG_SMP
889 rlwinm r9,r1,0,0,(31-THREAD_SHIFT)
890 lwz r9,TI_CPU(r9)
891 slwi r9,r9,3
892 add r11,r11,r9
893#endif
882 stw r10,0(r11) 894 stw r10,0(r11)
883 mtspr SPRN_DBCR0,r0 895 mtspr SPRN_DBCR0,r0
884 lwz r10,4(r11) 896 lwz r10,4(r11)
@@ -891,7 +903,7 @@ load_dbcr0:
891 .section .bss 903 .section .bss
892 .align 4 904 .align 4
893global_dbcr0: 905global_dbcr0:
894 .space 8 906 .space 8*NR_CPUS
895 .previous 907 .previous
896#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */ 908#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
897 909
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 148a3547c9aa..c0db5b769e55 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -29,6 +29,8 @@
29#include <asm/cputable.h> 29#include <asm/cputable.h>
30#include <asm/firmware.h> 30#include <asm/firmware.h>
31#include <asm/bug.h> 31#include <asm/bug.h>
32#include <asm/ptrace.h>
33#include <asm/irqflags.h>
32 34
33/* 35/*
34 * System calls. 36 * System calls.
@@ -39,7 +41,7 @@
39 41
40/* This value is used to mark exception frames on the stack. */ 42/* This value is used to mark exception frames on the stack. */
41exception_marker: 43exception_marker:
42 .tc ID_72656773_68657265[TC],0x7265677368657265 44 .tc ID_EXC_MARKER[TC],STACK_FRAME_REGS_MARKER
43 45
44 .section ".text" 46 .section ".text"
45 .align 7 47 .align 7
@@ -88,6 +90,14 @@ system_call_common:
88 addi r9,r1,STACK_FRAME_OVERHEAD 90 addi r9,r1,STACK_FRAME_OVERHEAD
89 ld r11,exception_marker@toc(r2) 91 ld r11,exception_marker@toc(r2)
90 std r11,-16(r9) /* "regshere" marker */ 92 std r11,-16(r9) /* "regshere" marker */
93#ifdef CONFIG_TRACE_IRQFLAGS
94 bl .trace_hardirqs_on
95 REST_GPR(0,r1)
96 REST_4GPRS(3,r1)
97 REST_2GPRS(7,r1)
98 addi r9,r1,STACK_FRAME_OVERHEAD
99 ld r12,_MSR(r1)
100#endif /* CONFIG_TRACE_IRQFLAGS */
91 li r10,1 101 li r10,1
92 stb r10,PACASOFTIRQEN(r13) 102 stb r10,PACASOFTIRQEN(r13)
93 stb r10,PACAHARDIRQEN(r13) 103 stb r10,PACAHARDIRQEN(r13)
@@ -102,7 +112,7 @@ BEGIN_FW_FTR_SECTION
102 b hardware_interrupt_entry 112 b hardware_interrupt_entry
1032: 1132:
104END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) 114END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
105#endif 115#endif /* CONFIG_PPC_ISERIES */
106 mfmsr r11 116 mfmsr r11
107 ori r11,r11,MSR_EE 117 ori r11,r11,MSR_EE
108 mtmsrd r11,1 118 mtmsrd r11,1
@@ -504,6 +514,10 @@ BEGIN_FW_FTR_SECTION
504 514
505 li r3,0 515 li r3,0
506 stb r3,PACASOFTIRQEN(r13) /* ensure we are soft-disabled */ 516 stb r3,PACASOFTIRQEN(r13) /* ensure we are soft-disabled */
517#ifdef CONFIG_TRACE_IRQFLAGS
518 bl .trace_hardirqs_off
519 mfmsr r10
520#endif
507 ori r10,r10,MSR_EE 521 ori r10,r10,MSR_EE
508 mtmsrd r10 /* hard-enable again */ 522 mtmsrd r10 /* hard-enable again */
509 addi r3,r1,STACK_FRAME_OVERHEAD 523 addi r3,r1,STACK_FRAME_OVERHEAD
@@ -512,7 +526,7 @@ BEGIN_FW_FTR_SECTION
5124: 5264:
513END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) 527END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
514#endif 528#endif
515 stb r5,PACASOFTIRQEN(r13) 529 TRACE_AND_RESTORE_IRQ(r5);
516 530
517 /* extract EE bit and use it to restore paca->hard_enabled */ 531 /* extract EE bit and use it to restore paca->hard_enabled */
518 ld r3,_MSR(r1) 532 ld r3,_MSR(r1)
@@ -580,6 +594,16 @@ do_work:
580 bne restore 594 bne restore
581 /* here we are preempting the current task */ 595 /* here we are preempting the current task */
5821: 5961:
597#ifdef CONFIG_TRACE_IRQFLAGS
598 bl .trace_hardirqs_on
599 /* Note: we just clobbered r10 which used to contain the previous
600 * MSR before the hard-disabling done by the caller of do_work.
601 * We don't have that value anymore, but it doesn't matter as
602 * we will hard-enable unconditionally, we can just reload the
603 * current MSR into r10
604 */
605 mfmsr r10
606#endif /* CONFIG_TRACE_IRQFLAGS */
583 li r0,1 607 li r0,1
584 stb r0,PACASOFTIRQEN(r13) 608 stb r0,PACASOFTIRQEN(r13)
585 stb r0,PACAHARDIRQEN(r13) 609 stb r0,PACAHARDIRQEN(r13)
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 0f4fac512020..785af9b56591 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -30,6 +30,7 @@
30#include <asm/thread_info.h> 30#include <asm/thread_info.h>
31#include <asm/ppc_asm.h> 31#include <asm/ppc_asm.h>
32#include <asm/asm-offsets.h> 32#include <asm/asm-offsets.h>
33#include <asm/ptrace.h>
33 34
34/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ 35/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */
35#define LOAD_BAT(n, reg, RA, RB) \ 36#define LOAD_BAT(n, reg, RA, RB) \
@@ -268,8 +269,8 @@ __secondary_hold_acknowledge:
268 li r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \ 269 li r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \
269 MTMSRD(r10); /* (except for mach check in rtas) */ \ 270 MTMSRD(r10); /* (except for mach check in rtas) */ \
270 stw r0,GPR0(r11); \ 271 stw r0,GPR0(r11); \
271 lis r10,0x7265; /* put exception frame marker */ \ 272 lis r10,STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */ \
272 addi r10,r10,0x6773; \ 273 addi r10,r10,STACK_FRAME_REGS_MARKER@l; \
273 stw r10,8(r11); \ 274 stw r10,8(r11); \
274 SAVE_4GPRS(3, r11); \ 275 SAVE_4GPRS(3, r11); \
275 SAVE_2GPRS(7, r11) 276 SAVE_2GPRS(7, r11)
@@ -763,23 +764,6 @@ load_up_altivec:
763 b fast_exception_return 764 b fast_exception_return
764 765
765/* 766/*
766 * AltiVec unavailable trap from kernel - print a message, but let
767 * the task use AltiVec in the kernel until it returns to user mode.
768 */
769KernelAltiVec:
770 lwz r3,_MSR(r1)
771 oris r3,r3,MSR_VEC@h
772 stw r3,_MSR(r1) /* enable use of AltiVec after return */
773 lis r3,87f@h
774 ori r3,r3,87f@l
775 mr r4,r2 /* current */
776 lwz r5,_NIP(r1)
777 bl printk
778 b ret_from_except
77987: .string "AltiVec used in kernel (task=%p, pc=%x) \n"
780 .align 4,0
781
782/*
783 * giveup_altivec(tsk) 767 * giveup_altivec(tsk)
784 * Disable AltiVec for the task given as the argument, 768 * Disable AltiVec for the task given as the argument,
785 * and save the AltiVec registers in its thread_struct. 769 * and save the AltiVec registers in its thread_struct.
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index ad071a146a8d..b84ec6a2fc94 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -211,7 +211,7 @@ skpinv: addi r4,r4,1 /* Increment */
211 SET_IVOR(12, WatchdogTimer); 211 SET_IVOR(12, WatchdogTimer);
212 SET_IVOR(13, DataTLBError); 212 SET_IVOR(13, DataTLBError);
213 SET_IVOR(14, InstructionTLBError); 213 SET_IVOR(14, InstructionTLBError);
214 SET_IVOR(15, Debug); 214 SET_IVOR(15, DebugCrit);
215 215
216 /* Establish the interrupt vector base */ 216 /* Establish the interrupt vector base */
217 lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ 217 lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
@@ -578,7 +578,7 @@ interrupt_base:
578 b InstructionStorage 578 b InstructionStorage
579 579
580 /* Debug Interrupt */ 580 /* Debug Interrupt */
581 DEBUG_EXCEPTION 581 DEBUG_CRIT_EXCEPTION
582 582
583/* 583/*
584 * Local functions 584 * Local functions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index d3aee08e6814..215973a2c8d5 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -36,8 +36,7 @@
36#include <asm/firmware.h> 36#include <asm/firmware.h>
37#include <asm/page_64.h> 37#include <asm/page_64.h>
38#include <asm/exception.h> 38#include <asm/exception.h>
39 39#include <asm/irqflags.h>
40#define DO_SOFT_DISABLE
41 40
42/* 41/*
43 * We layout physical memory as follows: 42 * We layout physical memory as follows:
@@ -450,8 +449,8 @@ bad_stack:
450 */ 449 */
451fast_exc_return_irq: /* restores irq state too */ 450fast_exc_return_irq: /* restores irq state too */
452 ld r3,SOFTE(r1) 451 ld r3,SOFTE(r1)
452 TRACE_AND_RESTORE_IRQ(r3);
453 ld r12,_MSR(r1) 453 ld r12,_MSR(r1)
454 stb r3,PACASOFTIRQEN(r13) /* restore paca->soft_enabled */
455 rldicl r4,r12,49,63 /* get MSR_EE to LSB */ 454 rldicl r4,r12,49,63 /* get MSR_EE to LSB */
456 stb r4,PACAHARDIRQEN(r13) /* restore paca->hard_enabled */ 455 stb r4,PACAHARDIRQEN(r13) /* restore paca->hard_enabled */
457 b 1f 456 b 1f
@@ -621,7 +620,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
621 mtlr r10 620 mtlr r10
622 621
623 andi. r10,r12,MSR_RI /* check for unrecoverable exception */ 622 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
624 beq- unrecov_slb 623 beq- 2f
625 624
626.machine push 625.machine push
627.machine "power4" 626.machine "power4"
@@ -643,6 +642,22 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
643 rfid 642 rfid
644 b . /* prevent speculative execution */ 643 b . /* prevent speculative execution */
645 644
6452:
646#ifdef CONFIG_PPC_ISERIES
647BEGIN_FW_FTR_SECTION
648 b unrecov_slb
649END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
650#endif /* CONFIG_PPC_ISERIES */
651 mfspr r11,SPRN_SRR0
652 clrrdi r10,r13,32
653 LOAD_HANDLER(r10,unrecov_slb)
654 mtspr SPRN_SRR0,r10
655 mfmsr r10
656 ori r10,r10,MSR_IR|MSR_DR|MSR_RI
657 mtspr SPRN_SRR1,r10
658 rfid
659 b .
660
646unrecov_slb: 661unrecov_slb:
647 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) 662 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
648 DISABLE_INTS 663 DISABLE_INTS
@@ -808,7 +823,7 @@ _STATIC(load_up_altivec)
808 * Hash table stuff 823 * Hash table stuff
809 */ 824 */
810 .align 7 825 .align 7
811_GLOBAL(do_hash_page) 826_STATIC(do_hash_page)
812 std r3,_DAR(r1) 827 std r3,_DAR(r1)
813 std r4,_DSISR(r1) 828 std r4,_DSISR(r1)
814 829
@@ -820,6 +835,27 @@ BEGIN_FTR_SECTION
820END_FTR_SECTION_IFCLR(CPU_FTR_SLB) 835END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
821 836
822 /* 837 /*
838 * On iSeries, we soft-disable interrupts here, then
839 * hard-enable interrupts so that the hash_page code can spin on
840 * the hash_table_lock without problems on a shared processor.
841 */
842 DISABLE_INTS
843
844 /*
845 * Currently, trace_hardirqs_off() will be called by DISABLE_INTS
846 * and will clobber volatile registers when irq tracing is enabled
847 * so we need to reload them. It may be possible to be smarter here
848 * and move the irq tracing elsewhere but let's keep it simple for
849 * now
850 */
851#ifdef CONFIG_TRACE_IRQFLAGS
852 ld r3,_DAR(r1)
853 ld r4,_DSISR(r1)
854 ld r5,_TRAP(r1)
855 ld r12,_MSR(r1)
856 clrrdi r5,r5,4
857#endif /* CONFIG_TRACE_IRQFLAGS */
858 /*
823 * We need to set the _PAGE_USER bit if MSR_PR is set or if we are 859 * We need to set the _PAGE_USER bit if MSR_PR is set or if we are
824 * accessing a userspace segment (even from the kernel). We assume 860 * accessing a userspace segment (even from the kernel). We assume
825 * kernel addresses always have the high bit set. 861 * kernel addresses always have the high bit set.
@@ -832,13 +868,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
832 rlwimi r4,r5,22+2,31-2,31-2 /* Set _PAGE_EXEC if trap is 0x400 */ 868 rlwimi r4,r5,22+2,31-2,31-2 /* Set _PAGE_EXEC if trap is 0x400 */
833 869
834 /* 870 /*
835 * On iSeries, we soft-disable interrupts here, then
836 * hard-enable interrupts so that the hash_page code can spin on
837 * the hash_table_lock without problems on a shared processor.
838 */
839 DISABLE_INTS
840
841 /*
842 * r3 contains the faulting address 871 * r3 contains the faulting address
843 * r4 contains the required access permissions 872 * r4 contains the required access permissions
844 * r5 contains the trap number 873 * r5 contains the trap number
@@ -848,7 +877,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
848 bl .hash_page /* build HPTE if possible */ 877 bl .hash_page /* build HPTE if possible */
849 cmpdi r3,0 /* see if hash_page succeeded */ 878 cmpdi r3,0 /* see if hash_page succeeded */
850 879
851#ifdef DO_SOFT_DISABLE
852BEGIN_FW_FTR_SECTION 880BEGIN_FW_FTR_SECTION
853 /* 881 /*
854 * If we had interrupts soft-enabled at the point where the 882 * If we had interrupts soft-enabled at the point where the
@@ -860,7 +888,7 @@ BEGIN_FW_FTR_SECTION
860 */ 888 */
861 beq 13f 889 beq 13f
862END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) 890END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
863#endif 891
864BEGIN_FW_FTR_SECTION 892BEGIN_FW_FTR_SECTION
865 /* 893 /*
866 * Here we have interrupts hard-disabled, so it is sufficient 894 * Here we have interrupts hard-disabled, so it is sufficient
@@ -874,11 +902,12 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES)
874 902
875 /* 903 /*
876 * hash_page couldn't handle it, set soft interrupt enable back 904 * hash_page couldn't handle it, set soft interrupt enable back
877 * to what it was before the trap. Note that .local_irq_restore 905 * to what it was before the trap. Note that .raw_local_irq_restore
878 * handles any interrupts pending at this point. 906 * handles any interrupts pending at this point.
879 */ 907 */
880 ld r3,SOFTE(r1) 908 ld r3,SOFTE(r1)
881 bl .local_irq_restore 909 TRACE_AND_RESTORE_IRQ_PARTIAL(r3, 11f)
910 bl .raw_local_irq_restore
882 b 11f 911 b 11f
883 912
884/* Here we have a page fault that hash_page can't handle. */ 913/* Here we have a page fault that hash_page can't handle. */
@@ -1477,6 +1506,10 @@ _INIT_STATIC(start_here_multiplatform)
1477 addi r2,r2,0x4000 1506 addi r2,r2,0x4000
1478 add r2,r2,r26 1507 add r2,r2,r26
1479 1508
1509 /* Set initial ptr to current */
1510 LOAD_REG_IMMEDIATE(r4, init_task)
1511 std r4,PACACURRENT(r13)
1512
1480 /* Do very early kernel initializations, including initial hash table, 1513 /* Do very early kernel initializations, including initial hash table,
1481 * stab and slb setup before we turn on relocation. */ 1514 * stab and slb setup before we turn on relocation. */
1482 1515
@@ -1505,10 +1538,6 @@ _INIT_GLOBAL(start_here_common)
1505 li r0,0 1538 li r0,0
1506 stdu r0,-STACK_FRAME_OVERHEAD(r1) 1539 stdu r0,-STACK_FRAME_OVERHEAD(r1)
1507 1540
1508 /* ptr to current */
1509 LOAD_REG_IMMEDIATE(r4, init_task)
1510 std r4,PACACURRENT(r13)
1511
1512 /* Load the TOC */ 1541 /* Load the TOC */
1513 ld r2,PACATOC(r13) 1542 ld r2,PACATOC(r13)
1514 std r1,PACAKSAVE(r13) 1543 std r1,PACAKSAVE(r13)
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index ba9393f8e77a..aefafc6330c9 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -56,8 +56,17 @@
56 * is necessary since the MMU is always on, for Book-E parts, and the stacks 56 * is necessary since the MMU is always on, for Book-E parts, and the stacks
57 * are offset from KERNELBASE. 57 * are offset from KERNELBASE.
58 * 58 *
59 * There is some space optimization to be had here if desired. However
60 * to allow for a common kernel with support for debug exceptions either
61 * going to critical or their own debug level we aren't currently
62 * providing configurations that micro-optimize space usage.
59 */ 63 */
60#define BOOKE_EXCEPTION_STACK_SIZE (8192) 64#ifdef CONFIG_44x
65#define NUM_EXCEPTION_LVLS 2
66#else
67#define NUM_EXCEPTION_LVLS 3
68#endif
69#define BOOKE_EXCEPTION_STACK_SIZE (4096 * NUM_EXCEPTION_LVLS)
61 70
62/* CRIT_SPRG only used in critical exception handling */ 71/* CRIT_SPRG only used in critical exception handling */
63#define CRIT_SPRG SPRN_SPRG2 72#define CRIT_SPRG SPRN_SPRG2
@@ -68,7 +77,7 @@
68#define CRIT_STACK_TOP (exception_stack_top) 77#define CRIT_STACK_TOP (exception_stack_top)
69 78
70/* only on e200 for now */ 79/* only on e200 for now */
71#define DEBUG_STACK_TOP (exception_stack_top - 4096) 80#define DEBUG_STACK_TOP (exception_stack_top - 8192)
72#define DEBUG_SPRG SPRN_SPRG6W 81#define DEBUG_SPRG SPRN_SPRG6W
73 82
74#ifdef CONFIG_SMP 83#ifdef CONFIG_SMP
@@ -212,9 +221,8 @@ label:
212 * save (and later restore) the MSR via SPRN_CSRR1, which will still have 221 * save (and later restore) the MSR via SPRN_CSRR1, which will still have
213 * the MSR_DE bit set. 222 * the MSR_DE bit set.
214 */ 223 */
215#ifdef CONFIG_E200 224#define DEBUG_DEBUG_EXCEPTION \
216#define DEBUG_EXCEPTION \ 225 START_EXCEPTION(DebugDebug); \
217 START_EXCEPTION(Debug); \
218 DEBUG_EXCEPTION_PROLOG; \ 226 DEBUG_EXCEPTION_PROLOG; \
219 \ 227 \
220 /* \ 228 /* \
@@ -234,8 +242,8 @@ label:
234 cmplw r12,r10; \ 242 cmplw r12,r10; \
235 blt+ 2f; /* addr below exception vectors */ \ 243 blt+ 2f; /* addr below exception vectors */ \
236 \ 244 \
237 lis r10,Debug@h; \ 245 lis r10,DebugDebug@h; \
238 ori r10,r10,Debug@l; \ 246 ori r10,r10,DebugDebug@l; \
239 cmplw r12,r10; \ 247 cmplw r12,r10; \
240 bgt+ 2f; /* addr above exception vectors */ \ 248 bgt+ 2f; /* addr above exception vectors */ \
241 \ 249 \
@@ -265,9 +273,9 @@ label:
2652: mfspr r4,SPRN_DBSR; \ 2732: mfspr r4,SPRN_DBSR; \
266 addi r3,r1,STACK_FRAME_OVERHEAD; \ 274 addi r3,r1,STACK_FRAME_OVERHEAD; \
267 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) 275 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
268#else 276
269#define DEBUG_EXCEPTION \ 277#define DEBUG_CRIT_EXCEPTION \
270 START_EXCEPTION(Debug); \ 278 START_EXCEPTION(DebugCrit); \
271 CRITICAL_EXCEPTION_PROLOG; \ 279 CRITICAL_EXCEPTION_PROLOG; \
272 \ 280 \
273 /* \ 281 /* \
@@ -287,8 +295,8 @@ label:
287 cmplw r12,r10; \ 295 cmplw r12,r10; \
288 blt+ 2f; /* addr below exception vectors */ \ 296 blt+ 2f; /* addr below exception vectors */ \
289 \ 297 \
290 lis r10,Debug@h; \ 298 lis r10,DebugCrit@h; \
291 ori r10,r10,Debug@l; \ 299 ori r10,r10,DebugCrit@l; \
292 cmplw r12,r10; \ 300 cmplw r12,r10; \
293 bgt+ 2f; /* addr above exception vectors */ \ 301 bgt+ 2f; /* addr above exception vectors */ \
294 \ 302 \
@@ -318,7 +326,6 @@ label:
3182: mfspr r4,SPRN_DBSR; \ 3262: mfspr r4,SPRN_DBSR; \
319 addi r3,r1,STACK_FRAME_OVERHEAD; \ 327 addi r3,r1,STACK_FRAME_OVERHEAD; \
320 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) 328 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
321#endif
322 329
323#define INSTRUCTION_STORAGE_EXCEPTION \ 330#define INSTRUCTION_STORAGE_EXCEPTION \
324 START_EXCEPTION(InstructionStorage) \ 331 START_EXCEPTION(InstructionStorage) \
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index d9cc2c288d9e..4ff744143566 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -68,7 +68,9 @@ _ENTRY(_start);
68 mr r29,r5 68 mr r29,r5
69 mr r28,r6 69 mr r28,r6
70 mr r27,r7 70 mr r27,r7
71 li r25,0 /* phys kernel start (low) */
71 li r24,0 /* CPU number */ 72 li r24,0 /* CPU number */
73 li r23,0 /* phys kernel start (high) */
72 74
73/* We try to not make any assumptions about how the boot loader 75/* We try to not make any assumptions about how the boot loader
74 * setup or used the TLBs. We invalidate all mappings from the 76 * setup or used the TLBs. We invalidate all mappings from the
@@ -167,7 +169,28 @@ skpinv: addi r6,r6,1 /* Increment */
167 mtspr SPRN_MAS0,r7 169 mtspr SPRN_MAS0,r7
168 tlbre 170 tlbre
169 171
170 /* Just modify the entry ID, EPN and RPN for the temp mapping */ 172 /* grab and fixup the RPN */
173 mfspr r6,SPRN_MAS1 /* extract MAS1[SIZE] */
174 rlwinm r6,r6,25,27,30
175 li r8,-1
176 addi r6,r6,10
177 slw r6,r8,r6 /* convert to mask */
178
179 bl 1f /* Find our address */
1801: mflr r7
181
182 mfspr r8,SPRN_MAS3
183#ifdef CONFIG_PHYS_64BIT
184 mfspr r23,SPRN_MAS7
185#endif
186 and r8,r6,r8
187 subfic r9,r6,-4096
188 and r9,r9,r7
189
190 or r25,r8,r9
191 ori r8,r25,(MAS3_SX|MAS3_SW|MAS3_SR)
192
193 /* Just modify the entry ID and EPN for the temp mapping */
171 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */ 194 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
172 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ 195 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
173 mtspr SPRN_MAS0,r7 196 mtspr SPRN_MAS0,r7
@@ -177,12 +200,10 @@ skpinv: addi r6,r6,1 /* Increment */
177 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l 200 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
178 mtspr SPRN_MAS1,r6 201 mtspr SPRN_MAS1,r6
179 mfspr r6,SPRN_MAS2 202 mfspr r6,SPRN_MAS2
180 lis r7,PHYSICAL_START@h 203 li r7,0 /* temp EPN = 0 */
181 rlwimi r7,r6,0,20,31 204 rlwimi r7,r6,0,20,31
182 mtspr SPRN_MAS2,r7 205 mtspr SPRN_MAS2,r7
183 mfspr r6,SPRN_MAS3 206 mtspr SPRN_MAS3,r8
184 rlwimi r7,r6,0,20,31
185 mtspr SPRN_MAS3,r7
186 tlbwe 207 tlbwe
187 208
188 xori r6,r4,1 209 xori r6,r4,1
@@ -232,8 +253,7 @@ skpinv: addi r6,r6,1 /* Increment */
232 ori r6,r6,PAGE_OFFSET@l 253 ori r6,r6,PAGE_OFFSET@l
233 rlwimi r6,r7,0,20,31 254 rlwimi r6,r7,0,20,31
234 mtspr SPRN_MAS2,r6 255 mtspr SPRN_MAS2,r6
235 li r7,(MAS3_SX|MAS3_SW|MAS3_SR) 256 mtspr SPRN_MAS3,r8
236 mtspr SPRN_MAS3,r7
237 tlbwe 257 tlbwe
238 258
239/* 7. Jump to KERNELBASE mapping */ 259/* 7. Jump to KERNELBASE mapping */
@@ -283,7 +303,10 @@ skpinv: addi r6,r6,1 /* Increment */
283 SET_IVOR(12, WatchdogTimer); 303 SET_IVOR(12, WatchdogTimer);
284 SET_IVOR(13, DataTLBError); 304 SET_IVOR(13, DataTLBError);
285 SET_IVOR(14, InstructionTLBError); 305 SET_IVOR(14, InstructionTLBError);
286 SET_IVOR(15, Debug); 306 SET_IVOR(15, DebugDebug);
307#if defined(CONFIG_E500)
308 SET_IVOR(15, DebugCrit);
309#endif
287 SET_IVOR(32, SPEUnavailable); 310 SET_IVOR(32, SPEUnavailable);
288 SET_IVOR(33, SPEFloatingPointData); 311 SET_IVOR(33, SPEFloatingPointData);
289 SET_IVOR(34, SPEFloatingPointRound); 312 SET_IVOR(34, SPEFloatingPointRound);
@@ -718,7 +741,10 @@ interrupt_base:
718 741
719 742
720 /* Debug Interrupt */ 743 /* Debug Interrupt */
721 DEBUG_EXCEPTION 744 DEBUG_DEBUG_EXCEPTION
745#if defined(CONFIG_E500)
746 DEBUG_CRIT_EXCEPTION
747#endif
722 748
723/* 749/*
724 * Local functions 750 * Local functions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 2f50bb5d00f9..9971159c8040 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -183,7 +183,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
183 ret = ibmebus_create_device(child); 183 ret = ibmebus_create_device(child);
184 if (ret) { 184 if (ret) {
185 printk(KERN_ERR "%s: failed to create device (%i)", 185 printk(KERN_ERR "%s: failed to create device (%i)",
186 __FUNCTION__, ret); 186 __func__, ret);
187 of_node_put(child); 187 of_node_put(child);
188 break; 188 break;
189 } 189 }
@@ -269,7 +269,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
269 if (bus_find_device(&ibmebus_bus_type, NULL, path, 269 if (bus_find_device(&ibmebus_bus_type, NULL, path,
270 ibmebus_match_path)) { 270 ibmebus_match_path)) {
271 printk(KERN_WARNING "%s: %s has already been probed\n", 271 printk(KERN_WARNING "%s: %s has already been probed\n",
272 __FUNCTION__, path); 272 __func__, path);
273 rc = -EEXIST; 273 rc = -EEXIST;
274 goto out; 274 goto out;
275 } 275 }
@@ -279,7 +279,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
279 of_node_put(dn); 279 of_node_put(dn);
280 } else { 280 } else {
281 printk(KERN_WARNING "%s: no such device node: %s\n", 281 printk(KERN_WARNING "%s: no such device node: %s\n",
282 __FUNCTION__, path); 282 __func__, path);
283 rc = -ENODEV; 283 rc = -ENODEV;
284 } 284 }
285 285
@@ -308,7 +308,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus,
308 return count; 308 return count;
309 } else { 309 } else {
310 printk(KERN_WARNING "%s: %s not on the bus\n", 310 printk(KERN_WARNING "%s: %s not on the bus\n",
311 __FUNCTION__, path); 311 __func__, path);
312 312
313 kfree(path); 313 kfree(path);
314 return -ENODEV; 314 return -ENODEV;
@@ -337,14 +337,14 @@ static int __init ibmebus_bus_init(void)
337 err = of_bus_type_init(&ibmebus_bus_type, "ibmebus"); 337 err = of_bus_type_init(&ibmebus_bus_type, "ibmebus");
338 if (err) { 338 if (err) {
339 printk(KERN_ERR "%s: failed to register IBM eBus.\n", 339 printk(KERN_ERR "%s: failed to register IBM eBus.\n",
340 __FUNCTION__); 340 __func__);
341 return err; 341 return err;
342 } 342 }
343 343
344 err = device_register(&ibmebus_bus_device); 344 err = device_register(&ibmebus_bus_device);
345 if (err) { 345 if (err) {
346 printk(KERN_WARNING "%s: device_register returned %i\n", 346 printk(KERN_WARNING "%s: device_register returned %i\n",
347 __FUNCTION__, err); 347 __func__, err);
348 bus_unregister(&ibmebus_bus_type); 348 bus_unregister(&ibmebus_bus_type);
349 349
350 return err; 350 return err;
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 8f1f4e539c4b..0c663669bc32 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -520,7 +520,7 @@ void iommu_free_table(struct iommu_table *tbl, const char *node_name)
520 unsigned int order; 520 unsigned int order;
521 521
522 if (!tbl || !tbl->it_map) { 522 if (!tbl || !tbl->it_map) {
523 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, 523 printk(KERN_ERR "%s: expected TCE map for %s\n", __func__,
524 node_name); 524 node_name);
525 return; 525 return;
526 } 526 }
@@ -530,7 +530,7 @@ void iommu_free_table(struct iommu_table *tbl, const char *node_name)
530 for (i = 0; i < (tbl->it_size/64); i++) { 530 for (i = 0; i < (tbl->it_size/64); i++) {
531 if (tbl->it_map[i] != 0) { 531 if (tbl->it_map[i] != 0) {
532 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", 532 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n",
533 __FUNCTION__, node_name); 533 __func__, node_name);
534 break; 534 break;
535 } 535 }
536 } 536 }
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 292163f5b39a..425616f92d18 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -114,7 +114,7 @@ static inline void set_soft_enabled(unsigned long enable)
114 : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled))); 114 : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled)));
115} 115}
116 116
117void local_irq_restore(unsigned long en) 117void raw_local_irq_restore(unsigned long en)
118{ 118{
119 /* 119 /*
120 * get_paca()->soft_enabled = en; 120 * get_paca()->soft_enabled = en;
@@ -174,6 +174,7 @@ void local_irq_restore(unsigned long en)
174 174
175 __hard_irq_enable(); 175 __hard_irq_enable();
176} 176}
177EXPORT_SYMBOL(raw_local_irq_restore);
177#endif /* CONFIG_PPC64 */ 178#endif /* CONFIG_PPC64 */
178 179
179int show_interrupts(struct seq_file *p, void *v) 180int show_interrupts(struct seq_file *p, void *v)
@@ -310,8 +311,21 @@ void do_IRQ(struct pt_regs *regs)
310 handler = &__do_IRQ; 311 handler = &__do_IRQ;
311 irqtp->task = curtp->task; 312 irqtp->task = curtp->task;
312 irqtp->flags = 0; 313 irqtp->flags = 0;
314
315 /* Copy the softirq bits in preempt_count so that the
316 * softirq checks work in the hardirq context.
317 */
318 irqtp->preempt_count =
319 (irqtp->preempt_count & ~SOFTIRQ_MASK) |
320 (curtp->preempt_count & SOFTIRQ_MASK);
321
313 call_handle_irq(irq, desc, irqtp, handler); 322 call_handle_irq(irq, desc, irqtp, handler);
314 irqtp->task = NULL; 323 irqtp->task = NULL;
324
325
326 /* Set any flag that may have been set on the
327 * alternate stack
328 */
315 if (irqtp->flags) 329 if (irqtp->flags)
316 set_bits(irqtp->flags, &curtp->flags); 330 set_bits(irqtp->flags, &curtp->flags);
317 } else 331 } else
@@ -357,7 +371,7 @@ void irq_ctx_init(void)
357 memset((void *)softirq_ctx[i], 0, THREAD_SIZE); 371 memset((void *)softirq_ctx[i], 0, THREAD_SIZE);
358 tp = softirq_ctx[i]; 372 tp = softirq_ctx[i];
359 tp->cpu = i; 373 tp->cpu = i;
360 tp->preempt_count = SOFTIRQ_OFFSET; 374 tp->preempt_count = 0;
361 375
362 memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); 376 memset((void *)hardirq_ctx[i], 0, THREAD_SIZE);
363 tp = hardirq_ctx[i]; 377 tp = hardirq_ctx[i];
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index ee172aa42aa7..289af348978d 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -80,13 +80,13 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
80 * (size depending on dev->n_addr_cells) 80 * (size depending on dev->n_addr_cells)
81 * cell 5: the size of the range 81 * cell 5: the size of the range
82 */ 82 */
83 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) { 83 if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) {
84 range++; 84 range++;
85 rlen -= sizeof(struct isa_range); 85 rlen -= sizeof(struct isa_range);
86 if (rlen < sizeof(struct isa_range)) 86 if (rlen < sizeof(struct isa_range))
87 goto inval_range; 87 goto inval_range;
88 } 88 }
89 if ((range->isa_addr.a_hi && ISA_SPACE_MASK) != ISA_SPACE_IO) 89 if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO)
90 goto inval_range; 90 goto inval_range;
91 91
92 isa_addr = range->isa_addr.a_lo; 92 isa_addr = range->isa_addr.a_lo;
@@ -99,7 +99,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
99 */ 99 */
100 if ((pci_addr != 0) || (isa_addr != 0)) { 100 if ((pci_addr != 0) || (isa_addr != 0)) {
101 printk(KERN_ERR "unexpected isa to pci mapping: %s\n", 101 printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
102 __FUNCTION__); 102 __func__);
103 return; 103 return;
104 } 104 }
105 105
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index dcb89a88df46..1ffacc698ffb 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -226,7 +226,7 @@ static void parse_system_parameter_string(struct seq_file *m)
226 unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 226 unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
227 if (!local_buffer) { 227 if (!local_buffer) {
228 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 228 printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
229 __FILE__, __FUNCTION__, __LINE__); 229 __FILE__, __func__, __LINE__);
230 return; 230 return;
231 } 231 }
232 232
@@ -243,14 +243,14 @@ static void parse_system_parameter_string(struct seq_file *m)
243 if (call_status != 0) { 243 if (call_status != 0) {
244 printk(KERN_INFO 244 printk(KERN_INFO
245 "%s %s Error calling get-system-parameter (0x%x)\n", 245 "%s %s Error calling get-system-parameter (0x%x)\n",
246 __FILE__, __FUNCTION__, call_status); 246 __FILE__, __func__, call_status);
247 } else { 247 } else {
248 int splpar_strlen; 248 int splpar_strlen;
249 int idx, w_idx; 249 int idx, w_idx;
250 char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 250 char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
251 if (!workbuffer) { 251 if (!workbuffer) {
252 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 252 printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
253 __FILE__, __FUNCTION__, __LINE__); 253 __FILE__, __func__, __LINE__);
254 kfree(local_buffer); 254 kfree(local_buffer);
255 return; 255 return;
256 } 256 }
@@ -484,10 +484,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
484 current_weight = (resource >> 5 * 8) & 0xFF; 484 current_weight = (resource >> 5 * 8) & 0xFF;
485 485
486 pr_debug("%s: current_entitled = %lu, current_weight = %u\n", 486 pr_debug("%s: current_entitled = %lu, current_weight = %u\n",
487 __FUNCTION__, current_entitled, current_weight); 487 __func__, current_entitled, current_weight);
488 488
489 pr_debug("%s: new_entitled = %lu, new_weight = %u\n", 489 pr_debug("%s: new_entitled = %lu, new_weight = %u\n",
490 __FUNCTION__, *new_entitled_ptr, *new_weight_ptr); 490 __func__, *new_entitled_ptr, *new_weight_ptr);
491 491
492 retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, 492 retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
493 *new_weight_ptr); 493 *new_weight_ptr);
@@ -502,7 +502,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
502 retval = -EINVAL; 502 retval = -EINVAL;
503 } else { 503 } else {
504 printk(KERN_WARNING "%s: received unknown hv return code %ld", 504 printk(KERN_WARNING "%s: received unknown hv return code %ld",
505 __FUNCTION__, retval); 505 __func__, retval);
506 retval = -EIO; 506 retval = -EIO;
507 } 507 }
508 508
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index c0c8e8c3ced9..2d202f274e73 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -12,8 +12,9 @@
12#include <linux/kexec.h> 12#include <linux/kexec.h>
13#include <linux/reboot.h> 13#include <linux/reboot.h>
14#include <linux/threads.h> 14#include <linux/threads.h>
15#include <linux/lmb.h>
15#include <asm/machdep.h> 16#include <asm/machdep.h>
16#include <asm/lmb.h> 17#include <asm/prom.h>
17 18
18void machine_crash_shutdown(struct pt_regs *regs) 19void machine_crash_shutdown(struct pt_regs *regs)
19{ 20{
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 55f1a25085cd..ac163bd46cfd 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -15,7 +15,6 @@
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/lppaca.h> 17#include <asm/lppaca.h>
18#include <asm/iseries/it_lp_reg_save.h>
19#include <asm/paca.h> 18#include <asm/paca.h>
20#include <asm/mmu.h> 19#include <asm/mmu.h>
21 20
@@ -25,13 +24,13 @@
25extern unsigned long __toc_start; 24extern unsigned long __toc_start;
26 25
27/* 26/*
28 * iSeries structure which the hypervisor knows about - this structure 27 * The structure which the hypervisor knows about - this structure
29 * should not cross a page boundary. The vpa_init/register_vpa call 28 * should not cross a page boundary. The vpa_init/register_vpa call
30 * is now known to fail if the lppaca structure crosses a page 29 * is now known to fail if the lppaca structure crosses a page
31 * boundary. The lppaca is also used on POWER5 pSeries boxes. The 30 * boundary. The lppaca is also used on legacy iSeries and POWER5
32 * lppaca is 640 bytes long, and cannot readily change since the 31 * pSeries boxes. The lppaca is 640 bytes long, and cannot readily
33 * hypervisor knows its layout, so a 1kB alignment will suffice to 32 * change since the hypervisor knows its layout, so a 1kB alignment
34 * ensure that it doesn't cross a page boundary. 33 * will suffice to ensure that it doesn't cross a page boundary.
35 */ 34 */
36struct lppaca lppaca[] = { 35struct lppaca lppaca[] = {
37 [0 ... (NR_CPUS-1)] = { 36 [0 ... (NR_CPUS-1)] = {
@@ -66,32 +65,17 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = {
66 * processors. The processor VPD array needs one entry per physical 65 * processors. The processor VPD array needs one entry per physical
67 * processor (not thread). 66 * processor (not thread).
68 */ 67 */
69#define PACA_INIT_COMMON(number) \ 68#define PACA_INIT(number) \
69{ \
70 .lppaca_ptr = &lppaca[number], \ 70 .lppaca_ptr = &lppaca[number], \
71 .lock_token = 0x8000, \ 71 .lock_token = 0x8000, \
72 .paca_index = (number), /* Paca Index */ \ 72 .paca_index = (number), /* Paca Index */ \
73 .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ 73 .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \
74 .hw_cpu_id = 0xffff, \ 74 .hw_cpu_id = 0xffff, \
75 .slb_shadow_ptr = &slb_shadow[number], 75 .slb_shadow_ptr = &slb_shadow[number], \
76 76 .__current = &init_task, \
77#ifdef CONFIG_PPC_ISERIES
78#define PACA_INIT_ISERIES(number) \
79 .reg_save_ptr = &iseries_reg_save[number],
80
81#define PACA_INIT(number) \
82{ \
83 PACA_INIT_COMMON(number) \
84 PACA_INIT_ISERIES(number) \
85} 77}
86 78
87#else
88#define PACA_INIT(number) \
89{ \
90 PACA_INIT_COMMON(number) \
91}
92
93#endif
94
95struct paca_struct paca[] = { 79struct paca_struct paca[] = {
96 PACA_INIT(0), 80 PACA_INIT(0),
97#if NR_CPUS > 1 81#if NR_CPUS > 1
diff --git a/arch/powerpc/kernel/ppc32.h b/arch/powerpc/kernel/ppc32.h
index 90e562771791..fda05e2211d6 100644
--- a/arch/powerpc/kernel/ppc32.h
+++ b/arch/powerpc/kernel/ppc32.h
@@ -135,4 +135,6 @@ struct ucontext32 {
135 struct mcontext32 uc_mcontext; 135 struct mcontext32 uc_mcontext;
136}; 136};
137 137
138extern int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s);
139
138#endif /* _PPC64_PPC32_H */ 140#endif /* _PPC64_PPC32_H */
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 65d14e6ddc3c..09fcb50c45ae 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -44,10 +44,6 @@
44#include <asm/signal.h> 44#include <asm/signal.h>
45#include <asm/dcr.h> 45#include <asm/dcr.h>
46 46
47#ifdef CONFIG_PPC64
48EXPORT_SYMBOL(local_irq_restore);
49#endif
50
51#ifdef CONFIG_PPC32 47#ifdef CONFIG_PPC32
52extern void transfer_to_handler(void); 48extern void transfer_to_handler(void);
53extern void do_IRQ(struct pt_regs *regs); 49extern void do_IRQ(struct pt_regs *regs);
@@ -57,7 +53,6 @@ extern void program_check_exception(struct pt_regs *regs);
57extern void single_step_exception(struct pt_regs *regs); 53extern void single_step_exception(struct pt_regs *regs);
58extern int sys_sigreturn(struct pt_regs *regs); 54extern int sys_sigreturn(struct pt_regs *regs);
59 55
60EXPORT_SYMBOL(empty_zero_page);
61EXPORT_SYMBOL(clear_pages); 56EXPORT_SYMBOL(clear_pages);
62EXPORT_SYMBOL(copy_page); 57EXPORT_SYMBOL(copy_page);
63EXPORT_SYMBOL(ISA_DMA_THRESHOLD); 58EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
@@ -78,6 +73,7 @@ EXPORT_SYMBOL(strncpy);
78EXPORT_SYMBOL(strcat); 73EXPORT_SYMBOL(strcat);
79EXPORT_SYMBOL(strlen); 74EXPORT_SYMBOL(strlen);
80EXPORT_SYMBOL(strcmp); 75EXPORT_SYMBOL(strcmp);
76EXPORT_SYMBOL(strncmp);
81 77
82EXPORT_SYMBOL(csum_partial); 78EXPORT_SYMBOL(csum_partial);
83EXPORT_SYMBOL(csum_partial_copy_generic); 79EXPORT_SYMBOL(csum_partial_copy_generic);
@@ -191,3 +187,4 @@ EXPORT_SYMBOL(intercept_table);
191EXPORT_SYMBOL(__mtdcr); 187EXPORT_SYMBOL(__mtdcr);
192EXPORT_SYMBOL(__mfdcr); 188EXPORT_SYMBOL(__mfdcr);
193#endif 189#endif
190EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 4ec605521504..703100d5e458 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -868,11 +868,6 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
868 flush_spe_to_thread(current); 868 flush_spe_to_thread(current);
869 error = do_execve(filename, (char __user * __user *) a1, 869 error = do_execve(filename, (char __user * __user *) a1,
870 (char __user * __user *) a2, regs); 870 (char __user * __user *) a2, regs);
871 if (error == 0) {
872 task_lock(current);
873 current->ptrace &= ~PT_DTRACE;
874 task_unlock(current);
875 }
876 putname(filename); 871 putname(filename);
877out: 872out:
878 return error; 873 return error;
@@ -919,20 +914,6 @@ int validate_sp(unsigned long sp, struct task_struct *p,
919 return valid_irq_stack(sp, p, nbytes); 914 return valid_irq_stack(sp, p, nbytes);
920} 915}
921 916
922#ifdef CONFIG_PPC64
923#define MIN_STACK_FRAME 112 /* same as STACK_FRAME_OVERHEAD, in fact */
924#define FRAME_LR_SAVE 2
925#define INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD + 288)
926#define REGS_MARKER 0x7265677368657265ul
927#define FRAME_MARKER 12
928#else
929#define MIN_STACK_FRAME 16
930#define FRAME_LR_SAVE 1
931#define INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD)
932#define REGS_MARKER 0x72656773ul
933#define FRAME_MARKER 2
934#endif
935
936EXPORT_SYMBOL(validate_sp); 917EXPORT_SYMBOL(validate_sp);
937 918
938unsigned long get_wchan(struct task_struct *p) 919unsigned long get_wchan(struct task_struct *p)
@@ -944,15 +925,15 @@ unsigned long get_wchan(struct task_struct *p)
944 return 0; 925 return 0;
945 926
946 sp = p->thread.ksp; 927 sp = p->thread.ksp;
947 if (!validate_sp(sp, p, MIN_STACK_FRAME)) 928 if (!validate_sp(sp, p, STACK_FRAME_OVERHEAD))
948 return 0; 929 return 0;
949 930
950 do { 931 do {
951 sp = *(unsigned long *)sp; 932 sp = *(unsigned long *)sp;
952 if (!validate_sp(sp, p, MIN_STACK_FRAME)) 933 if (!validate_sp(sp, p, STACK_FRAME_OVERHEAD))
953 return 0; 934 return 0;
954 if (count > 0) { 935 if (count > 0) {
955 ip = ((unsigned long *)sp)[FRAME_LR_SAVE]; 936 ip = ((unsigned long *)sp)[STACK_FRAME_LR_SAVE];
956 if (!in_sched_functions(ip)) 937 if (!in_sched_functions(ip))
957 return ip; 938 return ip;
958 } 939 }
@@ -981,12 +962,12 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
981 lr = 0; 962 lr = 0;
982 printk("Call Trace:\n"); 963 printk("Call Trace:\n");
983 do { 964 do {
984 if (!validate_sp(sp, tsk, MIN_STACK_FRAME)) 965 if (!validate_sp(sp, tsk, STACK_FRAME_OVERHEAD))
985 return; 966 return;
986 967
987 stack = (unsigned long *) sp; 968 stack = (unsigned long *) sp;
988 newsp = stack[0]; 969 newsp = stack[0];
989 ip = stack[FRAME_LR_SAVE]; 970 ip = stack[STACK_FRAME_LR_SAVE];
990 if (!firstframe || ip != lr) { 971 if (!firstframe || ip != lr) {
991 printk("["REG"] ["REG"] ", sp, ip); 972 printk("["REG"] ["REG"] ", sp, ip);
992 print_symbol("%s", ip); 973 print_symbol("%s", ip);
@@ -1000,8 +981,8 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
1000 * See if this is an exception frame. 981 * See if this is an exception frame.
1001 * We look for the "regshere" marker in the current frame. 982 * We look for the "regshere" marker in the current frame.
1002 */ 983 */
1003 if (validate_sp(sp, tsk, INT_FRAME_SIZE) 984 if (validate_sp(sp, tsk, STACK_INT_FRAME_SIZE)
1004 && stack[FRAME_MARKER] == REGS_MARKER) { 985 && stack[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) {
1005 struct pt_regs *regs = (struct pt_regs *) 986 struct pt_regs *regs = (struct pt_regs *)
1006 (sp + STACK_FRAME_OVERHEAD); 987 (sp + STACK_FRAME_OVERHEAD);
1007 printk("--- Exception: %lx", regs->trap); 988 printk("--- Exception: %lx", regs->trap);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index eac97f48b9b8..3bfe7837e820 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -31,10 +31,10 @@
31#include <linux/kexec.h> 31#include <linux/kexec.h>
32#include <linux/debugfs.h> 32#include <linux/debugfs.h>
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/lmb.h>
34 35
35#include <asm/prom.h> 36#include <asm/prom.h>
36#include <asm/rtas.h> 37#include <asm/rtas.h>
37#include <asm/lmb.h>
38#include <asm/page.h> 38#include <asm/page.h>
39#include <asm/processor.h> 39#include <asm/processor.h>
40#include <asm/irq.h> 40#include <asm/irq.h>
@@ -51,6 +51,7 @@
51#include <asm/machdep.h> 51#include <asm/machdep.h>
52#include <asm/pSeries_reconfig.h> 52#include <asm/pSeries_reconfig.h>
53#include <asm/pci-bridge.h> 53#include <asm/pci-bridge.h>
54#include <asm/phyp_dump.h>
54#include <asm/kexec.h> 55#include <asm/kexec.h>
55 56
56#ifdef DEBUG 57#ifdef DEBUG
@@ -436,7 +437,7 @@ early_param("mem", early_parse_mem);
436 * The device tree may be allocated beyond our memory limit, or inside the 437 * The device tree may be allocated beyond our memory limit, or inside the
437 * crash kernel region for kdump. If so, move it out of the way. 438 * crash kernel region for kdump. If so, move it out of the way.
438 */ 439 */
439static void move_device_tree(void) 440static void __init move_device_tree(void)
440{ 441{
441 unsigned long start, size; 442 unsigned long start, size;
442 void *p; 443 void *p;
@@ -1040,6 +1041,87 @@ static void __init early_reserve_mem(void)
1040#endif 1041#endif
1041} 1042}
1042 1043
1044#ifdef CONFIG_PHYP_DUMP
1045/**
1046 * phyp_dump_calculate_reserve_size() - reserve variable boot area 5% or arg
1047 *
1048 * Function to find the largest size we need to reserve
1049 * during early boot process.
1050 *
1051 * It either looks for boot param and returns that OR
1052 * returns larger of 256 or 5% rounded down to multiples of 256MB.
1053 *
1054 */
1055static inline unsigned long phyp_dump_calculate_reserve_size(void)
1056{
1057 unsigned long tmp;
1058
1059 if (phyp_dump_info->reserve_bootvar)
1060 return phyp_dump_info->reserve_bootvar;
1061
1062 /* divide by 20 to get 5% of value */
1063 tmp = lmb_end_of_DRAM();
1064 do_div(tmp, 20);
1065
1066 /* round it down in multiples of 256 */
1067 tmp = tmp & ~0x0FFFFFFFUL;
1068
1069 return (tmp > PHYP_DUMP_RMR_END ? tmp : PHYP_DUMP_RMR_END);
1070}
1071
1072/**
1073 * phyp_dump_reserve_mem() - reserve all not-yet-dumped mmemory
1074 *
1075 * This routine may reserve memory regions in the kernel only
1076 * if the system is supported and a dump was taken in last
1077 * boot instance or if the hardware is supported and the
1078 * scratch area needs to be setup. In other instances it returns
1079 * without reserving anything. The memory in case of dump being
1080 * active is freed when the dump is collected (by userland tools).
1081 */
1082static void __init phyp_dump_reserve_mem(void)
1083{
1084 unsigned long base, size;
1085 unsigned long variable_reserve_size;
1086
1087 if (!phyp_dump_info->phyp_dump_configured) {
1088 printk(KERN_ERR "Phyp-dump not supported on this hardware\n");
1089 return;
1090 }
1091
1092 if (!phyp_dump_info->phyp_dump_at_boot) {
1093 printk(KERN_INFO "Phyp-dump disabled at boot time\n");
1094 return;
1095 }
1096
1097 variable_reserve_size = phyp_dump_calculate_reserve_size();
1098
1099 if (phyp_dump_info->phyp_dump_is_active) {
1100 /* Reserve *everything* above RMR.Area freed by userland tools*/
1101 base = variable_reserve_size;
1102 size = lmb_end_of_DRAM() - base;
1103
1104 /* XXX crashed_ram_end is wrong, since it may be beyond
1105 * the memory_limit, it will need to be adjusted. */
1106 lmb_reserve(base, size);
1107
1108 phyp_dump_info->init_reserve_start = base;
1109 phyp_dump_info->init_reserve_size = size;
1110 } else {
1111 size = phyp_dump_info->cpu_state_size +
1112 phyp_dump_info->hpte_region_size +
1113 variable_reserve_size;
1114 base = lmb_end_of_DRAM() - size;
1115 lmb_reserve(base, size);
1116 phyp_dump_info->init_reserve_start = base;
1117 phyp_dump_info->init_reserve_size = size;
1118 }
1119}
1120#else
1121static inline void __init phyp_dump_reserve_mem(void) {}
1122#endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */
1123
1124
1043void __init early_init_devtree(void *params) 1125void __init early_init_devtree(void *params)
1044{ 1126{
1045 DBG(" -> early_init_devtree(%p)\n", params); 1127 DBG(" -> early_init_devtree(%p)\n", params);
@@ -1052,6 +1134,11 @@ void __init early_init_devtree(void *params)
1052 of_scan_flat_dt(early_init_dt_scan_rtas, NULL); 1134 of_scan_flat_dt(early_init_dt_scan_rtas, NULL);
1053#endif 1135#endif
1054 1136
1137#ifdef CONFIG_PHYP_DUMP
1138 /* scan tree to see if dump occured during last boot */
1139 of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL);
1140#endif
1141
1055 /* Retrieve various informations from the /chosen node of the 1142 /* Retrieve various informations from the /chosen node of the
1056 * device-tree, including the platform type, initrd location and 1143 * device-tree, including the platform type, initrd location and
1057 * size, TCE reserve, and more ... 1144 * size, TCE reserve, and more ...
@@ -1072,6 +1159,7 @@ void __init early_init_devtree(void *params)
1072 reserve_kdump_trampoline(); 1159 reserve_kdump_trampoline();
1073 reserve_crashkernel(); 1160 reserve_crashkernel();
1074 early_reserve_mem(); 1161 early_reserve_mem();
1162 phyp_dump_reserve_mem();
1075 1163
1076 lmb_enforce_memory_limit(memory_limit); 1164 lmb_enforce_memory_limit(memory_limit);
1077 lmb_analyze(); 1165 lmb_analyze();
@@ -1244,12 +1332,14 @@ EXPORT_SYMBOL(of_node_put);
1244 */ 1332 */
1245void of_attach_node(struct device_node *np) 1333void of_attach_node(struct device_node *np)
1246{ 1334{
1247 write_lock(&devtree_lock); 1335 unsigned long flags;
1336
1337 write_lock_irqsave(&devtree_lock, flags);
1248 np->sibling = np->parent->child; 1338 np->sibling = np->parent->child;
1249 np->allnext = allnodes; 1339 np->allnext = allnodes;
1250 np->parent->child = np; 1340 np->parent->child = np;
1251 allnodes = np; 1341 allnodes = np;
1252 write_unlock(&devtree_lock); 1342 write_unlock_irqrestore(&devtree_lock, flags);
1253} 1343}
1254 1344
1255/* 1345/*
@@ -1260,8 +1350,9 @@ void of_attach_node(struct device_node *np)
1260void of_detach_node(struct device_node *np) 1350void of_detach_node(struct device_node *np)
1261{ 1351{
1262 struct device_node *parent; 1352 struct device_node *parent;
1353 unsigned long flags;
1263 1354
1264 write_lock(&devtree_lock); 1355 write_lock_irqsave(&devtree_lock, flags);
1265 1356
1266 parent = np->parent; 1357 parent = np->parent;
1267 if (!parent) 1358 if (!parent)
@@ -1292,7 +1383,7 @@ void of_detach_node(struct device_node *np)
1292 of_node_set_flag(np, OF_DETACHED); 1383 of_node_set_flag(np, OF_DETACHED);
1293 1384
1294out_unlock: 1385out_unlock:
1295 write_unlock(&devtree_lock); 1386 write_unlock_irqrestore(&devtree_lock, flags);
1296} 1387}
1297 1388
1298#ifdef CONFIG_PPC_PSERIES 1389#ifdef CONFIG_PPC_PSERIES
@@ -1373,20 +1464,21 @@ __initcall(prom_reconfig_setup);
1373int prom_add_property(struct device_node* np, struct property* prop) 1464int prom_add_property(struct device_node* np, struct property* prop)
1374{ 1465{
1375 struct property **next; 1466 struct property **next;
1467 unsigned long flags;
1376 1468
1377 prop->next = NULL; 1469 prop->next = NULL;
1378 write_lock(&devtree_lock); 1470 write_lock_irqsave(&devtree_lock, flags);
1379 next = &np->properties; 1471 next = &np->properties;
1380 while (*next) { 1472 while (*next) {
1381 if (strcmp(prop->name, (*next)->name) == 0) { 1473 if (strcmp(prop->name, (*next)->name) == 0) {
1382 /* duplicate ! don't insert it */ 1474 /* duplicate ! don't insert it */
1383 write_unlock(&devtree_lock); 1475 write_unlock_irqrestore(&devtree_lock, flags);
1384 return -1; 1476 return -1;
1385 } 1477 }
1386 next = &(*next)->next; 1478 next = &(*next)->next;
1387 } 1479 }
1388 *next = prop; 1480 *next = prop;
1389 write_unlock(&devtree_lock); 1481 write_unlock_irqrestore(&devtree_lock, flags);
1390 1482
1391#ifdef CONFIG_PROC_DEVICETREE 1483#ifdef CONFIG_PROC_DEVICETREE
1392 /* try to add to proc as well if it was initialized */ 1484 /* try to add to proc as well if it was initialized */
@@ -1406,9 +1498,10 @@ int prom_add_property(struct device_node* np, struct property* prop)
1406int prom_remove_property(struct device_node *np, struct property *prop) 1498int prom_remove_property(struct device_node *np, struct property *prop)
1407{ 1499{
1408 struct property **next; 1500 struct property **next;
1501 unsigned long flags;
1409 int found = 0; 1502 int found = 0;
1410 1503
1411 write_lock(&devtree_lock); 1504 write_lock_irqsave(&devtree_lock, flags);
1412 next = &np->properties; 1505 next = &np->properties;
1413 while (*next) { 1506 while (*next) {
1414 if (*next == prop) { 1507 if (*next == prop) {
@@ -1421,7 +1514,7 @@ int prom_remove_property(struct device_node *np, struct property *prop)
1421 } 1514 }
1422 next = &(*next)->next; 1515 next = &(*next)->next;
1423 } 1516 }
1424 write_unlock(&devtree_lock); 1517 write_unlock_irqrestore(&devtree_lock, flags);
1425 1518
1426 if (!found) 1519 if (!found)
1427 return -ENODEV; 1520 return -ENODEV;
@@ -1447,9 +1540,10 @@ int prom_update_property(struct device_node *np,
1447 struct property *oldprop) 1540 struct property *oldprop)
1448{ 1541{
1449 struct property **next; 1542 struct property **next;
1543 unsigned long flags;
1450 int found = 0; 1544 int found = 0;
1451 1545
1452 write_lock(&devtree_lock); 1546 write_lock_irqsave(&devtree_lock, flags);
1453 next = &np->properties; 1547 next = &np->properties;
1454 while (*next) { 1548 while (*next) {
1455 if (*next == oldprop) { 1549 if (*next == oldprop) {
@@ -1463,7 +1557,7 @@ int prom_update_property(struct device_node *np,
1463 } 1557 }
1464 next = &(*next)->next; 1558 next = &(*next)->next;
1465 } 1559 }
1466 write_unlock(&devtree_lock); 1560 write_unlock_irqrestore(&devtree_lock, flags);
1467 1561
1468 if (!found) 1562 if (!found)
1469 return -ENODEV; 1563 return -ENODEV;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 5ab4c8466cc9..6d6df1e60325 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2240,6 +2240,14 @@ static void __init fixup_device_tree_efika(void)
2240 if (rv != PROM_ERROR && (strcmp(prop, "chrp") == 0)) 2240 if (rv != PROM_ERROR && (strcmp(prop, "chrp") == 0))
2241 prom_setprop(node, "/", "device_type", "efika", sizeof("efika")); 2241 prom_setprop(node, "/", "device_type", "efika", sizeof("efika"));
2242 2242
2243 /* CODEGEN,description is exposed in /proc/cpuinfo so
2244 fix that too */
2245 rv = prom_getprop(node, "CODEGEN,description", prop, sizeof(prop));
2246 if (rv != PROM_ERROR && (strstr(prop, "CHRP")))
2247 prom_setprop(node, "/", "CODEGEN,description",
2248 "Efika 5200B PowerPC System",
2249 sizeof("Efika 5200B PowerPC System"));
2250
2243 /* Fixup bestcomm interrupts property */ 2251 /* Fixup bestcomm interrupts property */
2244 node = call_prom("finddevice", 1, 1, ADDR("/builtin/bestcomm")); 2252 node = call_prom("finddevice", 1, 1, ADDR("/builtin/bestcomm"));
2245 if (PHANDLE_VALID(node)) { 2253 if (PHANDLE_VALID(node)) {
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 4c1de6af4c09..9d30e10970ac 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -29,12 +29,15 @@
29#include <linux/security.h> 29#include <linux/security.h>
30#include <linux/signal.h> 30#include <linux/signal.h>
31#include <linux/compat.h> 31#include <linux/compat.h>
32#include <linux/elf.h>
32 33
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
34#include <asm/page.h> 35#include <asm/page.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
36#include <asm/system.h> 37#include <asm/system.h>
37 38
39#include "ppc32.h"
40
38/* 41/*
39 * does not yet catch signals sent when the child dies. 42 * does not yet catch signals sent when the child dies.
40 * in exit.c or in signal.c. 43 * in exit.c or in signal.c.
@@ -64,6 +67,27 @@ static long compat_ptrace_old(struct task_struct *child, long request,
64 return -EPERM; 67 return -EPERM;
65} 68}
66 69
70static int compat_ptrace_getsiginfo(struct task_struct *child, compat_siginfo_t __user *data)
71{
72 siginfo_t lastinfo;
73 int error = -ESRCH;
74
75 read_lock(&tasklist_lock);
76 if (likely(child->sighand != NULL)) {
77 error = -EINVAL;
78 spin_lock_irq(&child->sighand->siglock);
79 if (likely(child->last_siginfo != NULL)) {
80 lastinfo = *child->last_siginfo;
81 error = 0;
82 }
83 spin_unlock_irq(&child->sighand->siglock);
84 }
85 read_unlock(&tasklist_lock);
86 if (!error)
87 return copy_siginfo_to_user32(data, &lastinfo);
88 return error;
89}
90
67long compat_arch_ptrace(struct task_struct *child, compat_long_t request, 91long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
68 compat_ulong_t caddr, compat_ulong_t cdata) 92 compat_ulong_t caddr, compat_ulong_t cdata)
69{ 93{
@@ -282,6 +306,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
282 0, PT_REGS_COUNT * sizeof(compat_long_t), 306 0, PT_REGS_COUNT * sizeof(compat_long_t),
283 compat_ptr(data)); 307 compat_ptr(data));
284 308
309 case PTRACE_GETSIGINFO:
310 return compat_ptrace_getsiginfo(child, compat_ptr(data));
311
285 case PTRACE_GETFPREGS: 312 case PTRACE_GETFPREGS:
286 case PTRACE_SETFPREGS: 313 case PTRACE_SETFPREGS:
287 case PTRACE_GETVRREGS: 314 case PTRACE_GETVRREGS:
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 52e95c2158c0..34843c318419 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -22,11 +22,11 @@
22#include <linux/smp.h> 22#include <linux/smp.h>
23#include <linux/completion.h> 23#include <linux/completion.h>
24#include <linux/cpumask.h> 24#include <linux/cpumask.h>
25#include <linux/lmb.h>
25 26
26#include <asm/prom.h> 27#include <asm/prom.h>
27#include <asm/rtas.h> 28#include <asm/rtas.h>
28#include <asm/hvcall.h> 29#include <asm/hvcall.h>
29#include <asm/semaphore.h>
30#include <asm/machdep.h> 30#include <asm/machdep.h>
31#include <asm/firmware.h> 31#include <asm/firmware.h>
32#include <asm/page.h> 32#include <asm/page.h>
@@ -34,7 +34,6 @@
34#include <asm/system.h> 34#include <asm/system.h>
35#include <asm/delay.h> 35#include <asm/delay.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/lmb.h>
38#include <asm/udbg.h> 37#include <asm/udbg.h>
39#include <asm/syscalls.h> 38#include <asm/syscalls.h>
40#include <asm/smp.h> 39#include <asm/smp.h>
@@ -507,7 +506,7 @@ int rtas_error_rc(int rtas_rc)
507 break; 506 break;
508 default: 507 default:
509 printk(KERN_ERR "%s: unexpected RTAS error %d\n", 508 printk(KERN_ERR "%s: unexpected RTAS error %d\n",
510 __FUNCTION__, rtas_rc); 509 __func__, rtas_rc);
511 rc = -ERANGE; 510 rc = -ERANGE;
512 break; 511 break;
513 } 512 }
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 538baf46f15f..627f126d1848 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -807,7 +807,7 @@ int __init rtas_flash_init(void)
807 rtas_block_ctor); 807 rtas_block_ctor);
808 if (!flash_block_cache) { 808 if (!flash_block_cache) {
809 printk(KERN_ERR "%s: failed to create block cache\n", 809 printk(KERN_ERR "%s: failed to create block cache\n",
810 __FUNCTION__); 810 __func__);
811 rc = -ENOMEM; 811 rc = -ENOMEM;
812 goto cleanup; 812 goto cleanup;
813 } 813 }
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 433a0a0949fb..3ab88a9dc70d 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -56,21 +56,6 @@ static inline int config_access_valid(struct pci_dn *dn, int where)
56 return 0; 56 return 0;
57} 57}
58 58
59static int of_device_available(struct device_node * dn)
60{
61 const char *status;
62
63 status = of_get_property(dn, "status", NULL);
64
65 if (!status)
66 return 1;
67
68 if (!strcmp(status, "okay"))
69 return 1;
70
71 return 0;
72}
73
74int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) 59int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val)
75{ 60{
76 int returnval = -1; 61 int returnval = -1;
@@ -117,7 +102,7 @@ static int rtas_pci_read_config(struct pci_bus *bus,
117 for (dn = busdn->child; dn; dn = dn->sibling) { 102 for (dn = busdn->child; dn; dn = dn->sibling) {
118 struct pci_dn *pdn = PCI_DN(dn); 103 struct pci_dn *pdn = PCI_DN(dn);
119 if (pdn && pdn->devfn == devfn 104 if (pdn && pdn->devfn == devfn
120 && of_device_available(dn)) 105 && of_device_is_available(dn))
121 return rtas_read_config(pdn, where, size, val); 106 return rtas_read_config(pdn, where, size, val);
122 } 107 }
123 108
@@ -164,7 +149,7 @@ static int rtas_pci_write_config(struct pci_bus *bus,
164 for (dn = busdn->child; dn; dn = dn->sibling) { 149 for (dn = busdn->child; dn; dn = dn->sibling) {
165 struct pci_dn *pdn = PCI_DN(dn); 150 struct pci_dn *pdn = PCI_DN(dn);
166 if (pdn && pdn->devfn == devfn 151 if (pdn && pdn->devfn == devfn
167 && of_device_available(dn)) 152 && of_device_is_available(dn))
168 return rtas_write_config(pdn, where, size, val); 153 return rtas_write_config(pdn, where, size, val);
169 } 154 }
170 return PCIBIOS_DEVICE_NOT_FOUND; 155 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -326,7 +311,7 @@ int pcibios_remove_root_bus(struct pci_controller *phb)
326 311
327 res = b->resource[0]; 312 res = b->resource[0];
328 if (!res->flags) { 313 if (!res->flags) {
329 printk(KERN_ERR "%s: no IO resource for PHB %s\n", __FUNCTION__, 314 printk(KERN_ERR "%s: no IO resource for PHB %s\n", __func__,
330 b->name); 315 b->name);
331 return 1; 316 return 1;
332 } 317 }
@@ -334,13 +319,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb)
334 rc = pcibios_unmap_io_space(b); 319 rc = pcibios_unmap_io_space(b);
335 if (rc) { 320 if (rc) {
336 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", 321 printk(KERN_ERR "%s: failed to unmap IO on bus %s\n",
337 __FUNCTION__, b->name); 322 __func__, b->name);
338 return 1; 323 return 1;
339 } 324 }
340 325
341 if (release_resource(res)) { 326 if (release_resource(res)) {
342 printk(KERN_ERR "%s: failed to release IO on bus %s\n", 327 printk(KERN_ERR "%s: failed to release IO on bus %s\n",
343 __FUNCTION__, b->name); 328 __func__, b->name);
344 return 1; 329 return 1;
345 } 330 }
346 331
@@ -348,13 +333,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb)
348 res = b->resource[i]; 333 res = b->resource[i];
349 if (!res->flags && i == 0) { 334 if (!res->flags && i == 0) {
350 printk(KERN_ERR "%s: no MEM resource for PHB %s\n", 335 printk(KERN_ERR "%s: no MEM resource for PHB %s\n",
351 __FUNCTION__, b->name); 336 __func__, b->name);
352 return 1; 337 return 1;
353 } 338 }
354 if (res->flags && release_resource(res)) { 339 if (res->flags && release_resource(res)) {
355 printk(KERN_ERR 340 printk(KERN_ERR
356 "%s: failed to release IO %d on bus %s\n", 341 "%s: failed to release IO %d on bus %s\n",
357 __FUNCTION__, i, b->name); 342 __func__, i, b->name);
358 return 1; 343 return 1;
359 } 344 }
360 } 345 }
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 6adb5a1e98bb..db540eab09f4 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -34,6 +34,7 @@
34#include <linux/serial_8250.h> 34#include <linux/serial_8250.h>
35#include <linux/debugfs.h> 35#include <linux/debugfs.h>
36#include <linux/percpu.h> 36#include <linux/percpu.h>
37#include <linux/lmb.h>
37#include <asm/io.h> 38#include <asm/io.h>
38#include <asm/prom.h> 39#include <asm/prom.h>
39#include <asm/processor.h> 40#include <asm/processor.h>
@@ -56,7 +57,6 @@
56#include <asm/cache.h> 57#include <asm/cache.h>
57#include <asm/page.h> 58#include <asm/page.h>
58#include <asm/mmu.h> 59#include <asm/mmu.h>
59#include <asm/lmb.h>
60#include <asm/xmon.h> 60#include <asm/xmon.h>
61#include <asm/cputhreads.h> 61#include <asm/cputhreads.h>
62 62
@@ -167,6 +167,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
167 unsigned short min; 167 unsigned short min;
168 168
169 if (cpu_id == NR_CPUS) { 169 if (cpu_id == NR_CPUS) {
170 struct device_node *root;
171 const char *model = NULL;
170#if defined(CONFIG_SMP) && defined(CONFIG_PPC32) 172#if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
171 unsigned long bogosum = 0; 173 unsigned long bogosum = 0;
172 int i; 174 int i;
@@ -178,6 +180,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
178 seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq); 180 seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
179 if (ppc_md.name) 181 if (ppc_md.name)
180 seq_printf(m, "platform\t: %s\n", ppc_md.name); 182 seq_printf(m, "platform\t: %s\n", ppc_md.name);
183 root = of_find_node_by_path("/");
184 if (root)
185 model = of_get_property(root, "model", NULL);
186 if (model)
187 seq_printf(m, "model\t\t: %s\n", model);
188 of_node_put(root);
189
181 if (ppc_md.show_cpuinfo != NULL) 190 if (ppc_md.show_cpuinfo != NULL)
182 ppc_md.show_cpuinfo(m); 191 ppc_md.show_cpuinfo(m);
183 192
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 06d918d94dd1..36f6779c88d4 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -164,6 +164,18 @@ int __init ppc_setup_l2cr(char *str)
164} 164}
165__setup("l2cr=", ppc_setup_l2cr); 165__setup("l2cr=", ppc_setup_l2cr);
166 166
167/* Checks "l3cr=xxxx" command-line option */
168int __init ppc_setup_l3cr(char *str)
169{
170 if (cpu_has_feature(CPU_FTR_L3CR)) {
171 unsigned long val = simple_strtoul(str, NULL, 0);
172 printk(KERN_INFO "l3cr set to %lx\n", val);
173 _set_L3CR(val); /* and enable it */
174 }
175 return 1;
176}
177__setup("l3cr=", ppc_setup_l3cr);
178
167#ifdef CONFIG_GENERIC_NVRAM 179#ifdef CONFIG_GENERIC_NVRAM
168 180
169/* Generic nvram hooks used by drivers/char/gen_nvram.c */ 181/* Generic nvram hooks used by drivers/char/gen_nvram.c */
@@ -269,7 +281,7 @@ void __init setup_arch(char **cmdline_p)
269 if (ppc_md.panic) 281 if (ppc_md.panic)
270 setup_panic(); 282 setup_panic();
271 283
272 init_mm.start_code = PAGE_OFFSET; 284 init_mm.start_code = (unsigned long)_stext;
273 init_mm.end_code = (unsigned long) _etext; 285 init_mm.end_code = (unsigned long) _etext;
274 init_mm.end_data = (unsigned long) _edata; 286 init_mm.end_data = (unsigned long) _edata;
275 init_mm.brk = klimit; 287 init_mm.brk = klimit;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3b1529c103ef..31ada9fdfc5c 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -33,6 +33,8 @@
33#include <linux/serial_8250.h> 33#include <linux/serial_8250.h>
34#include <linux/bootmem.h> 34#include <linux/bootmem.h>
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/lockdep.h>
37#include <linux/lmb.h>
36#include <asm/io.h> 38#include <asm/io.h>
37#include <asm/kdump.h> 39#include <asm/kdump.h>
38#include <asm/prom.h> 40#include <asm/prom.h>
@@ -55,7 +57,6 @@
55#include <asm/cache.h> 57#include <asm/cache.h>
56#include <asm/page.h> 58#include <asm/page.h>
57#include <asm/mmu.h> 59#include <asm/mmu.h>
58#include <asm/lmb.h>
59#include <asm/firmware.h> 60#include <asm/firmware.h>
60#include <asm/xmon.h> 61#include <asm/xmon.h>
61#include <asm/udbg.h> 62#include <asm/udbg.h>
@@ -178,6 +179,9 @@ void __init early_setup(unsigned long dt_ptr)
178 /* Enable early debugging if any specified (see udbg.h) */ 179 /* Enable early debugging if any specified (see udbg.h) */
179 udbg_early_init(); 180 udbg_early_init();
180 181
182 /* Initialize lockdep early or else spinlocks will blow */
183 lockdep_init();
184
181 DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr); 185 DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr);
182 186
183 /* 187 /*
@@ -510,7 +514,7 @@ void __init setup_arch(char **cmdline_p)
510 if (ppc_md.panic) 514 if (ppc_md.panic)
511 setup_panic(); 515 setup_panic();
512 516
513 init_mm.start_code = PAGE_OFFSET; 517 init_mm.start_code = (unsigned long)_stext;
514 init_mm.end_code = (unsigned long) _etext; 518 init_mm.end_code = (unsigned long) _etext;
515 init_mm.end_data = (unsigned long) _edata; 519 init_mm.end_data = (unsigned long) _edata;
516 init_mm.brk = klimit; 520 init_mm.brk = klimit;
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index d840bc772fd3..ad6943468ee9 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -621,6 +621,18 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s)
621 621
622#define copy_siginfo_to_user copy_siginfo_to_user32 622#define copy_siginfo_to_user copy_siginfo_to_user32
623 623
624int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from)
625{
626 memset(to, 0, sizeof *to);
627
628 if (copy_from_user(to, from, 3*sizeof(int)) ||
629 copy_from_user(to->_sifields._pad,
630 from->_sifields._pad, SI_PAD_SIZE32))
631 return -EFAULT;
632
633 return 0;
634}
635
624/* 636/*
625 * Note: it is necessary to treat pid and sig as unsigned ints, with the 637 * Note: it is necessary to treat pid and sig as unsigned ints, with the
626 * corresponding cast to a signed int to insure that the proper conversion 638 * corresponding cast to a signed int to insure that the proper conversion
@@ -634,9 +646,10 @@ long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo
634 int ret; 646 int ret;
635 mm_segment_t old_fs = get_fs(); 647 mm_segment_t old_fs = get_fs();
636 648
637 if (copy_from_user (&info, uinfo, 3*sizeof(int)) || 649 ret = copy_siginfo_from_user32(&info, uinfo);
638 copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE32)) 650 if (unlikely(ret))
639 return -EFAULT; 651 return ret;
652
640 set_fs (KERNEL_DS); 653 set_fs (KERNEL_DS);
641 /* The __user pointer cast is valid becasuse of the set_fs() */ 654 /* The __user pointer cast is valid becasuse of the set_fs() */
642 ret = sys_rt_sigqueueinfo((int)pid, (int)sig, (siginfo_t __user *) &info); 655 ret = sys_rt_sigqueueinfo((int)pid, (int)sig, (siginfo_t __user *) &info);
diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c
new file mode 100644
index 000000000000..e3638eeaaae7
--- /dev/null
+++ b/arch/powerpc/kernel/stacktrace.c
@@ -0,0 +1,47 @@
1/*
2 * Stack trace utility
3 *
4 * Copyright 2008 Christoph Hellwig, IBM Corp.
5 *
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#include <linux/sched.h>
14#include <linux/stacktrace.h>
15#include <asm/ptrace.h>
16#include <asm/asm-offsets.h>
17
18/*
19 * Save stack-backtrace addresses into a stack_trace buffer.
20 */
21void save_stack_trace(struct stack_trace *trace)
22{
23 unsigned long sp;
24
25 asm("mr %0,1" : "=r" (sp));
26
27 for (;;) {
28 unsigned long *stack = (unsigned long *) sp;
29 unsigned long newsp, ip;
30
31 if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD))
32 return;
33
34 newsp = stack[0];
35 ip = stack[STACK_FRAME_LR_SAVE];
36
37 if (!trace->skip)
38 trace->entries[trace->nr_entries++] = ip;
39 else
40 trace->skip--;
41
42 if (trace->nr_entries >= trace->max_entries)
43 return;
44
45 sp = newsp;
46 }
47}
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 4a4f5c6b560b..709f8cb8bfca 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -47,7 +47,6 @@
47#include <asm/types.h> 47#include <asm/types.h>
48#include <asm/uaccess.h> 48#include <asm/uaccess.h>
49#include <asm/unistd.h> 49#include <asm/unistd.h>
50#include <asm/semaphore.h>
51#include <asm/time.h> 50#include <asm/time.h>
52#include <asm/mmu_context.h> 51#include <asm/mmu_context.h>
53#include <asm/ppc-pci.h> 52#include <asm/ppc-pci.h>
@@ -368,11 +367,6 @@ long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
368 367
369 error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs); 368 error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs);
370 369
371 if (error == 0) {
372 task_lock(current);
373 current->ptrace &= ~PT_DTRACE;
374 task_unlock(current);
375 }
376 putname(filename); 370 putname(filename);
377 371
378out: 372out:
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 3b1d5dd65643..e722a4eeb5d0 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -38,7 +38,6 @@
38#include <linux/personality.h> 38#include <linux/personality.h>
39 39
40#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41#include <asm/semaphore.h>
42#include <asm/syscalls.h> 41#include <asm/syscalls.h>
43#include <asm/time.h> 42#include <asm/time.h>
44#include <asm/unistd.h> 43#include <asm/unistd.h>
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index d3437c4c4a6f..c21a626af676 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -21,13 +21,14 @@
21#include <linux/elf.h> 21#include <linux/elf.h>
22#include <linux/security.h> 22#include <linux/security.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/lmb.h>
24 25
25#include <asm/pgtable.h> 26#include <asm/pgtable.h>
26#include <asm/system.h> 27#include <asm/system.h>
27#include <asm/processor.h> 28#include <asm/processor.h>
28#include <asm/mmu.h> 29#include <asm/mmu.h>
29#include <asm/mmu_context.h> 30#include <asm/mmu_context.h>
30#include <asm/lmb.h> 31#include <asm/prom.h>
31#include <asm/machdep.h> 32#include <asm/machdep.h>
32#include <asm/cputable.h> 33#include <asm/cputable.h>
33#include <asm/sections.h> 34#include <asm/sections.h>
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index f98867252ee2..b77f8af7ddde 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -139,7 +139,7 @@ static int vio_bus_remove(struct device *dev)
139 */ 139 */
140int vio_register_driver(struct vio_driver *viodrv) 140int vio_register_driver(struct vio_driver *viodrv)
141{ 141{
142 printk(KERN_DEBUG "%s: driver %s registering\n", __FUNCTION__, 142 printk(KERN_DEBUG "%s: driver %s registering\n", __func__,
143 viodrv->driver.name); 143 viodrv->driver.name);
144 144
145 /* fill in 'struct driver' fields */ 145 /* fill in 'struct driver' fields */
@@ -184,7 +184,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
184 /* we need the 'device_type' property, in order to match with drivers */ 184 /* we need the 'device_type' property, in order to match with drivers */
185 if (of_node->type == NULL) { 185 if (of_node->type == NULL) {
186 printk(KERN_WARNING "%s: node %s missing 'device_type'\n", 186 printk(KERN_WARNING "%s: node %s missing 'device_type'\n",
187 __FUNCTION__, 187 __func__,
188 of_node->name ? of_node->name : "<unknown>"); 188 of_node->name ? of_node->name : "<unknown>");
189 return NULL; 189 return NULL;
190 } 190 }
@@ -192,7 +192,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
192 unit_address = of_get_property(of_node, "reg", NULL); 192 unit_address = of_get_property(of_node, "reg", NULL);
193 if (unit_address == NULL) { 193 if (unit_address == NULL) {
194 printk(KERN_WARNING "%s: node %s missing 'reg'\n", 194 printk(KERN_WARNING "%s: node %s missing 'reg'\n",
195 __FUNCTION__, 195 __func__,
196 of_node->name ? of_node->name : "<unknown>"); 196 of_node->name ? of_node->name : "<unknown>");
197 return NULL; 197 return NULL;
198 } 198 }
@@ -227,7 +227,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
227 /* register with generic device framework */ 227 /* register with generic device framework */
228 if (device_register(&viodev->dev)) { 228 if (device_register(&viodev->dev)) {
229 printk(KERN_ERR "%s: failed to register device %s\n", 229 printk(KERN_ERR "%s: failed to register device %s\n",
230 __FUNCTION__, viodev->dev.bus_id); 230 __func__, viodev->dev.bus_id);
231 /* XXX free TCE table */ 231 /* XXX free TCE table */
232 kfree(viodev); 232 kfree(viodev);
233 return NULL; 233 return NULL;
@@ -258,7 +258,7 @@ static int __init vio_bus_init(void)
258 err = device_register(&vio_bus_device.dev); 258 err = device_register(&vio_bus_device.dev);
259 if (err) { 259 if (err) {
260 printk(KERN_WARNING "%s: device_register returned %i\n", 260 printk(KERN_WARNING "%s: device_register returned %i\n",
261 __FUNCTION__, err); 261 __func__, err);
262 return err; 262 return err;
263 } 263 }
264 264
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 0afb9e31d2a0..0c3000bf8d75 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -1,11 +1,9 @@
1#ifdef CONFIG_PPC64 1#ifdef CONFIG_PPC64
2#include <asm/page.h>
3#define PROVIDE32(x) PROVIDE(__unused__##x) 2#define PROVIDE32(x) PROVIDE(__unused__##x)
4#else 3#else
5#define PAGE_SIZE 4096
6#define KERNELBASE CONFIG_KERNEL_START
7#define PROVIDE32(x) PROVIDE(x) 4#define PROVIDE32(x) PROVIDE(x)
8#endif 5#endif
6#include <asm/page.h>
9#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
10#include <asm/cache.h> 8#include <asm/cache.h>
11 9
@@ -33,7 +31,7 @@ SECTIONS
33 */ 31 */
34 32
35 /* Text and gots */ 33 /* Text and gots */
36 .text : { 34 .text : AT(ADDR(.text) - LOAD_OFFSET) {
37 ALIGN_FUNCTION(); 35 ALIGN_FUNCTION();
38 *(.text.head) 36 *(.text.head)
39 _text = .; 37 _text = .;
@@ -58,7 +56,7 @@ SECTIONS
58 RODATA 56 RODATA
59 57
60 /* Exception & bug tables */ 58 /* Exception & bug tables */
61 __ex_table : { 59 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
62 __start___ex_table = .; 60 __start___ex_table = .;
63 *(__ex_table) 61 *(__ex_table)
64 __stop___ex_table = .; 62 __stop___ex_table = .;
@@ -74,7 +72,7 @@ SECTIONS
74 . = ALIGN(PAGE_SIZE); 72 . = ALIGN(PAGE_SIZE);
75 __init_begin = .; 73 __init_begin = .;
76 74
77 .init.text : { 75 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
78 _sinittext = .; 76 _sinittext = .;
79 INIT_TEXT 77 INIT_TEXT
80 _einittext = .; 78 _einittext = .;
@@ -83,11 +81,11 @@ SECTIONS
83 /* .exit.text is discarded at runtime, not link time, 81 /* .exit.text is discarded at runtime, not link time,
84 * to deal with references from __bug_table 82 * to deal with references from __bug_table
85 */ 83 */
86 .exit.text : { 84 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
87 EXIT_TEXT 85 EXIT_TEXT
88 } 86 }
89 87
90 .init.data : { 88 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
91 INIT_DATA 89 INIT_DATA
92 __vtop_table_begin = .; 90 __vtop_table_begin = .;
93 *(.vtop_fixup); 91 *(.vtop_fixup);
@@ -103,19 +101,19 @@ SECTIONS
103 } 101 }
104 102
105 . = ALIGN(16); 103 . = ALIGN(16);
106 .init.setup : { 104 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
107 __setup_start = .; 105 __setup_start = .;
108 *(.init.setup) 106 *(.init.setup)
109 __setup_end = .; 107 __setup_end = .;
110 } 108 }
111 109
112 .initcall.init : { 110 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
113 __initcall_start = .; 111 __initcall_start = .;
114 INITCALLS 112 INITCALLS
115 __initcall_end = .; 113 __initcall_end = .;
116 } 114 }
117 115
118 .con_initcall.init : { 116 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
119 __con_initcall_start = .; 117 __con_initcall_start = .;
120 *(.con_initcall.init) 118 *(.con_initcall.init)
121 __con_initcall_end = .; 119 __con_initcall_end = .;
@@ -124,14 +122,14 @@ SECTIONS
124 SECURITY_INIT 122 SECURITY_INIT
125 123
126 . = ALIGN(8); 124 . = ALIGN(8);
127 __ftr_fixup : { 125 __ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
128 __start___ftr_fixup = .; 126 __start___ftr_fixup = .;
129 *(__ftr_fixup) 127 *(__ftr_fixup)
130 __stop___ftr_fixup = .; 128 __stop___ftr_fixup = .;
131 } 129 }
132#ifdef CONFIG_PPC64 130#ifdef CONFIG_PPC64
133 . = ALIGN(8); 131 . = ALIGN(8);
134 __fw_ftr_fixup : { 132 __fw_ftr_fixup : AT(ADDR(__fw_ftr_fixup) - LOAD_OFFSET) {
135 __start___fw_ftr_fixup = .; 133 __start___fw_ftr_fixup = .;
136 *(__fw_ftr_fixup) 134 *(__fw_ftr_fixup)
137 __stop___fw_ftr_fixup = .; 135 __stop___fw_ftr_fixup = .;
@@ -139,14 +137,14 @@ SECTIONS
139#endif 137#endif
140#ifdef CONFIG_BLK_DEV_INITRD 138#ifdef CONFIG_BLK_DEV_INITRD
141 . = ALIGN(PAGE_SIZE); 139 . = ALIGN(PAGE_SIZE);
142 .init.ramfs : { 140 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
143 __initramfs_start = .; 141 __initramfs_start = .;
144 *(.init.ramfs) 142 *(.init.ramfs)
145 __initramfs_end = .; 143 __initramfs_end = .;
146 } 144 }
147#endif 145#endif
148 . = ALIGN(PAGE_SIZE); 146 . = ALIGN(PAGE_SIZE);
149 .data.percpu : { 147 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
150 __per_cpu_start = .; 148 __per_cpu_start = .;
151 *(.data.percpu) 149 *(.data.percpu)
152 *(.data.percpu.shared_aligned) 150 *(.data.percpu.shared_aligned)
@@ -154,7 +152,7 @@ SECTIONS
154 } 152 }
155 153
156 . = ALIGN(8); 154 . = ALIGN(8);
157 .machine.desc : { 155 .machine.desc : AT(ADDR(.machine.desc) - LOAD_OFFSET) {
158 __machine_desc_start = . ; 156 __machine_desc_start = . ;
159 *(.machine.desc) 157 *(.machine.desc)
160 __machine_desc_end = . ; 158 __machine_desc_end = . ;
@@ -172,25 +170,24 @@ SECTIONS
172 _sdata = .; 170 _sdata = .;
173 171
174#ifdef CONFIG_PPC32 172#ifdef CONFIG_PPC32
175 .data : 173 .data : AT(ADDR(.data) - LOAD_OFFSET) {
176 {
177 DATA_DATA 174 DATA_DATA
178 *(.sdata) 175 *(.sdata)
179 *(.got.plt) *(.got) 176 *(.got.plt) *(.got)
180 } 177 }
181#else 178#else
182 .data : { 179 .data : AT(ADDR(.data) - LOAD_OFFSET) {
183 DATA_DATA 180 DATA_DATA
184 *(.data.rel*) 181 *(.data.rel*)
185 *(.toc1) 182 *(.toc1)
186 *(.branch_lt) 183 *(.branch_lt)
187 } 184 }
188 185
189 .opd : { 186 .opd : AT(ADDR(.opd) - LOAD_OFFSET) {
190 *(.opd) 187 *(.opd)
191 } 188 }
192 189
193 .got : { 190 .got : AT(ADDR(.got) - LOAD_OFFSET) {
194 __toc_start = .; 191 __toc_start = .;
195 *(.got) 192 *(.got)
196 *(.toc) 193 *(.toc)
@@ -207,26 +204,26 @@ SECTIONS
207#else 204#else
208 . = ALIGN(16384); 205 . = ALIGN(16384);
209#endif 206#endif
210 .data.init_task : { 207 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
211 *(.data.init_task) 208 *(.data.init_task)
212 } 209 }
213 210
214 . = ALIGN(PAGE_SIZE); 211 . = ALIGN(PAGE_SIZE);
215 .data.page_aligned : { 212 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
216 *(.data.page_aligned) 213 *(.data.page_aligned)
217 } 214 }
218 215
219 .data.cacheline_aligned : { 216 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
220 *(.data.cacheline_aligned) 217 *(.data.cacheline_aligned)
221 } 218 }
222 219
223 . = ALIGN(L1_CACHE_BYTES); 220 . = ALIGN(L1_CACHE_BYTES);
224 .data.read_mostly : { 221 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
225 *(.data.read_mostly) 222 *(.data.read_mostly)
226 } 223 }
227 224
228 . = ALIGN(PAGE_SIZE); 225 . = ALIGN(PAGE_SIZE);
229 __data_nosave : { 226 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
230 __nosave_begin = .; 227 __nosave_begin = .;
231 *(.data.nosave) 228 *(.data.nosave)
232 . = ALIGN(PAGE_SIZE); 229 . = ALIGN(PAGE_SIZE);
@@ -237,7 +234,7 @@ SECTIONS
237 * And finally the bss 234 * And finally the bss
238 */ 235 */
239 236
240 .bss : { 237 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
241 __bss_start = .; 238 __bss_start = .;
242 *(.sbss) *(.scommon) 239 *(.sbss) *(.scommon)
243 *(.dynbss) 240 *(.dynbss)
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 22c3b4f53de7..29b2941cada0 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -54,7 +54,7 @@ static int grow(rh_info_t * info, int max_blocks)
54 54
55 new_blocks = max_blocks - info->max_blocks; 55 new_blocks = max_blocks - info->max_blocks;
56 56
57 block = kmalloc(sizeof(rh_block_t) * max_blocks, GFP_KERNEL); 57 block = kmalloc(sizeof(rh_block_t) * max_blocks, GFP_ATOMIC);
58 if (block == NULL) 58 if (block == NULL)
59 return -ENOMEM; 59 return -ENOMEM;
60 60
@@ -258,7 +258,7 @@ rh_info_t *rh_create(unsigned int alignment)
258 if ((alignment & (alignment - 1)) != 0) 258 if ((alignment & (alignment - 1)) != 0)
259 return ERR_PTR(-EINVAL); 259 return ERR_PTR(-EINVAL);
260 260
261 info = kmalloc(sizeof(*info), GFP_KERNEL); 261 info = kmalloc(sizeof(*info), GFP_ATOMIC);
262 if (info == NULL) 262 if (info == NULL)
263 return ERR_PTR(-ENOMEM); 263 return ERR_PTR(-ENOMEM);
264 264
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
index c4c622d8e6ac..49eb1f1a2bb4 100644
--- a/arch/powerpc/lib/string.S
+++ b/arch/powerpc/lib/string.S
@@ -75,6 +75,20 @@ _GLOBAL(strcmp)
75 beq 1b 75 beq 1b
76 blr 76 blr
77 77
78_GLOBAL(strncmp)
79 PPC_LCMPI r5,0
80 beqlr
81 mtctr r5
82 addi r5,r3,-1
83 addi r4,r4,-1
841: lbzu r3,1(r5)
85 cmpwi 1,r3,0
86 lbzu r0,1(r4)
87 subf. r3,r0,r3
88 beqlr 1
89 bdnzt eq,1b
90 blr
91
78_GLOBAL(strlen) 92_GLOBAL(strlen)
79 addi r4,r3,-1 93 addi r4,r3,-1
801: lbzu r0,1(r4) 941: lbzu r0,1(r4)
diff --git a/arch/powerpc/math-emu/fabs.c b/arch/powerpc/math-emu/fabs.c
index 41f0617f3d3a..549baba5948f 100644
--- a/arch/powerpc/math-emu/fabs.c
+++ b/arch/powerpc/math-emu/fabs.c
@@ -9,7 +9,7 @@ fabs(u32 *frD, u32 *frB)
9 frD[1] = frB[1]; 9 frD[1] = frB[1];
10 10
11#ifdef DEBUG 11#ifdef DEBUG
12 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 12 printk("%s: D %p, B %p: ", __func__, frD, frB);
13 dump_double(frD); 13 dump_double(frD);
14 printk("\n"); 14 printk("\n");
15#endif 15#endif
diff --git a/arch/powerpc/math-emu/fadd.c b/arch/powerpc/math-emu/fadd.c
index fc8836488b64..7befbbf2c332 100644
--- a/arch/powerpc/math-emu/fadd.c
+++ b/arch/powerpc/math-emu/fadd.c
@@ -14,7 +14,7 @@ fadd(void *frD, void *frA, void *frB)
14 int ret = 0; 14 int ret = 0;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 17 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(A, frA); 20 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fadds.c b/arch/powerpc/math-emu/fadds.c
index 93025b6c8f3c..2b346b38b480 100644
--- a/arch/powerpc/math-emu/fadds.c
+++ b/arch/powerpc/math-emu/fadds.c
@@ -15,7 +15,7 @@ fadds(void *frD, void *frA, void *frB)
15 int ret = 0; 15 int ret = 0;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 18 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frA); 21 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fcmpo.c b/arch/powerpc/math-emu/fcmpo.c
index 4efac394b4cb..36d689044c63 100644
--- a/arch/powerpc/math-emu/fcmpo.c
+++ b/arch/powerpc/math-emu/fcmpo.c
@@ -15,7 +15,7 @@ fcmpo(u32 *ccr, int crfD, void *frA, void *frB)
15 int ret = 0; 15 int ret = 0;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: %p (%08x) %d %p %p\n", __FUNCTION__, ccr, *ccr, crfD, frA, frB); 18 printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frA); 21 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fcmpu.c b/arch/powerpc/math-emu/fcmpu.c
index b7e33176e618..53d93894f2a6 100644
--- a/arch/powerpc/math-emu/fcmpu.c
+++ b/arch/powerpc/math-emu/fcmpu.c
@@ -14,7 +14,7 @@ fcmpu(u32 *ccr, int crfD, void *frA, void *frB)
14 long cmp; 14 long cmp;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p (%08x) %d %p %p\n", __FUNCTION__, ccr, *ccr, crfD, frA, frB); 17 printk("%s: %p (%08x) %d %p %p\n", __func__, ccr, *ccr, crfD, frA, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(A, frA); 20 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fctiw.c b/arch/powerpc/math-emu/fctiw.c
index 3b3c98b840cf..fcd7a95e021d 100644
--- a/arch/powerpc/math-emu/fctiw.c
+++ b/arch/powerpc/math-emu/fctiw.c
@@ -16,7 +16,7 @@ fctiw(u32 *frD, void *frB)
16 frD[1] = r; 16 frD[1] = r;
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 19 printk("%s: D %p, B %p: ", __func__, frD, frB);
20 dump_double(frD); 20 dump_double(frD);
21 printk("\n"); 21 printk("\n");
22#endif 22#endif
diff --git a/arch/powerpc/math-emu/fctiwz.c b/arch/powerpc/math-emu/fctiwz.c
index 7717eb6fcfb6..1514d59e146e 100644
--- a/arch/powerpc/math-emu/fctiwz.c
+++ b/arch/powerpc/math-emu/fctiwz.c
@@ -23,7 +23,7 @@ fctiwz(u32 *frD, void *frB)
23 __FPU_FPSCR = fpscr; 23 __FPU_FPSCR = fpscr;
24 24
25#ifdef DEBUG 25#ifdef DEBUG
26 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 26 printk("%s: D %p, B %p: ", __func__, frD, frB);
27 dump_double(frD); 27 dump_double(frD);
28 printk("\n"); 28 printk("\n");
29#endif 29#endif
diff --git a/arch/powerpc/math-emu/fdiv.c b/arch/powerpc/math-emu/fdiv.c
index f2fba825b2d0..18a20fe396b0 100644
--- a/arch/powerpc/math-emu/fdiv.c
+++ b/arch/powerpc/math-emu/fdiv.c
@@ -14,7 +14,7 @@ fdiv(void *frD, void *frA, void *frB)
14 int ret = 0; 14 int ret = 0;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 17 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(A, frA); 20 __FP_UNPACK_D(A, frA);
@@ -28,13 +28,13 @@ fdiv(void *frD, void *frA, void *frB)
28 if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { 28 if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) {
29 ret |= EFLAG_VXZDZ; 29 ret |= EFLAG_VXZDZ;
30#ifdef DEBUG 30#ifdef DEBUG
31 printk("%s: FPSCR_VXZDZ raised\n", __FUNCTION__); 31 printk("%s: FPSCR_VXZDZ raised\n", __func__);
32#endif 32#endif
33 } 33 }
34 if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { 34 if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) {
35 ret |= EFLAG_VXIDI; 35 ret |= EFLAG_VXIDI;
36#ifdef DEBUG 36#ifdef DEBUG
37 printk("%s: FPSCR_VXIDI raised\n", __FUNCTION__); 37 printk("%s: FPSCR_VXIDI raised\n", __func__);
38#endif 38#endif
39 } 39 }
40 40
diff --git a/arch/powerpc/math-emu/fdivs.c b/arch/powerpc/math-emu/fdivs.c
index b971196e3175..24feed689c35 100644
--- a/arch/powerpc/math-emu/fdivs.c
+++ b/arch/powerpc/math-emu/fdivs.c
@@ -15,7 +15,7 @@ fdivs(void *frD, void *frA, void *frB)
15 int ret = 0; 15 int ret = 0;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 18 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frA); 21 __FP_UNPACK_D(A, frA);
@@ -29,13 +29,13 @@ fdivs(void *frD, void *frA, void *frB)
29 if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) { 29 if (A_c == FP_CLS_ZERO && B_c == FP_CLS_ZERO) {
30 ret |= EFLAG_VXZDZ; 30 ret |= EFLAG_VXZDZ;
31#ifdef DEBUG 31#ifdef DEBUG
32 printk("%s: FPSCR_VXZDZ raised\n", __FUNCTION__); 32 printk("%s: FPSCR_VXZDZ raised\n", __func__);
33#endif 33#endif
34 } 34 }
35 if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) { 35 if (A_c == FP_CLS_INF && B_c == FP_CLS_INF) {
36 ret |= EFLAG_VXIDI; 36 ret |= EFLAG_VXIDI;
37#ifdef DEBUG 37#ifdef DEBUG
38 printk("%s: FPSCR_VXIDI raised\n", __FUNCTION__); 38 printk("%s: FPSCR_VXIDI raised\n", __func__);
39#endif 39#endif
40 } 40 }
41 41
diff --git a/arch/powerpc/math-emu/fmadd.c b/arch/powerpc/math-emu/fmadd.c
index 0a1dbce793e9..dedb465fdc68 100644
--- a/arch/powerpc/math-emu/fmadd.c
+++ b/arch/powerpc/math-emu/fmadd.c
@@ -16,7 +16,7 @@ fmadd(void *frD, void *frA, void *frB, void *frC)
16 int ret = 0; 16 int ret = 0;
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 19 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
20#endif 20#endif
21 21
22 __FP_UNPACK_D(A, frA); 22 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fmadds.c b/arch/powerpc/math-emu/fmadds.c
index 0f70bba9445e..6bbb56d5502c 100644
--- a/arch/powerpc/math-emu/fmadds.c
+++ b/arch/powerpc/math-emu/fmadds.c
@@ -17,7 +17,7 @@ fmadds(void *frD, void *frA, void *frB, void *frC)
17 int ret = 0; 17 int ret = 0;
18 18
19#ifdef DEBUG 19#ifdef DEBUG
20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 20 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
21#endif 21#endif
22 22
23 __FP_UNPACK_D(A, frA); 23 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fmr.c b/arch/powerpc/math-emu/fmr.c
index 28df700c0c7e..bd55384b8196 100644
--- a/arch/powerpc/math-emu/fmr.c
+++ b/arch/powerpc/math-emu/fmr.c
@@ -9,7 +9,7 @@ fmr(u32 *frD, u32 *frB)
9 frD[1] = frB[1]; 9 frD[1] = frB[1];
10 10
11#ifdef DEBUG 11#ifdef DEBUG
12 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 12 printk("%s: D %p, B %p: ", __func__, frD, frB);
13 dump_double(frD); 13 dump_double(frD);
14 printk("\n"); 14 printk("\n");
15#endif 15#endif
diff --git a/arch/powerpc/math-emu/fmsub.c b/arch/powerpc/math-emu/fmsub.c
index 203fd48a6fec..f311e2c7e67e 100644
--- a/arch/powerpc/math-emu/fmsub.c
+++ b/arch/powerpc/math-emu/fmsub.c
@@ -16,7 +16,7 @@ fmsub(void *frD, void *frA, void *frB, void *frC)
16 int ret = 0; 16 int ret = 0;
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 19 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
20#endif 20#endif
21 21
22 __FP_UNPACK_D(A, frA); 22 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fmsubs.c b/arch/powerpc/math-emu/fmsubs.c
index 8ce68624c189..81a716d3ee2e 100644
--- a/arch/powerpc/math-emu/fmsubs.c
+++ b/arch/powerpc/math-emu/fmsubs.c
@@ -17,7 +17,7 @@ fmsubs(void *frD, void *frA, void *frB, void *frC)
17 int ret = 0; 17 int ret = 0;
18 18
19#ifdef DEBUG 19#ifdef DEBUG
20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 20 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
21#endif 21#endif
22 22
23 __FP_UNPACK_D(A, frA); 23 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fmul.c b/arch/powerpc/math-emu/fmul.c
index 66c7e79aae2e..2f3d32784a04 100644
--- a/arch/powerpc/math-emu/fmul.c
+++ b/arch/powerpc/math-emu/fmul.c
@@ -14,7 +14,7 @@ fmul(void *frD, void *frA, void *frB)
14 int ret = 0; 14 int ret = 0;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 17 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(A, frA); 20 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fmuls.c b/arch/powerpc/math-emu/fmuls.c
index 26bc4278271c..962b5883f784 100644
--- a/arch/powerpc/math-emu/fmuls.c
+++ b/arch/powerpc/math-emu/fmuls.c
@@ -15,7 +15,7 @@ fmuls(void *frD, void *frA, void *frB)
15 int ret = 0; 15 int ret = 0;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 18 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frA); 21 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fnabs.c b/arch/powerpc/math-emu/fnabs.c
index c6b913d179e0..a7d34f3d9499 100644
--- a/arch/powerpc/math-emu/fnabs.c
+++ b/arch/powerpc/math-emu/fnabs.c
@@ -9,7 +9,7 @@ fnabs(u32 *frD, u32 *frB)
9 frD[1] = frB[1]; 9 frD[1] = frB[1];
10 10
11#ifdef DEBUG 11#ifdef DEBUG
12 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 12 printk("%s: D %p, B %p: ", __func__, frD, frB);
13 dump_double(frD); 13 dump_double(frD);
14 printk("\n"); 14 printk("\n");
15#endif 15#endif
diff --git a/arch/powerpc/math-emu/fneg.c b/arch/powerpc/math-emu/fneg.c
index fe9a98deff69..1e988cd9c6cc 100644
--- a/arch/powerpc/math-emu/fneg.c
+++ b/arch/powerpc/math-emu/fneg.c
@@ -9,7 +9,7 @@ fneg(u32 *frD, u32 *frB)
9 frD[1] = frB[1]; 9 frD[1] = frB[1];
10 10
11#ifdef DEBUG 11#ifdef DEBUG
12 printk("%s: D %p, B %p: ", __FUNCTION__, frD, frB); 12 printk("%s: D %p, B %p: ", __func__, frD, frB);
13 dump_double(frD); 13 dump_double(frD);
14 printk("\n"); 14 printk("\n");
15#endif 15#endif
diff --git a/arch/powerpc/math-emu/fnmadd.c b/arch/powerpc/math-emu/fnmadd.c
index 7f312276d920..8cf7827c4fb5 100644
--- a/arch/powerpc/math-emu/fnmadd.c
+++ b/arch/powerpc/math-emu/fnmadd.c
@@ -16,7 +16,7 @@ fnmadd(void *frD, void *frA, void *frB, void *frC)
16 int ret = 0; 16 int ret = 0;
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 19 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
20#endif 20#endif
21 21
22 __FP_UNPACK_D(A, frA); 22 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fnmadds.c b/arch/powerpc/math-emu/fnmadds.c
index 65454c9c70bc..f1c4f0f0d807 100644
--- a/arch/powerpc/math-emu/fnmadds.c
+++ b/arch/powerpc/math-emu/fnmadds.c
@@ -17,7 +17,7 @@ fnmadds(void *frD, void *frA, void *frB, void *frC)
17 int ret = 0; 17 int ret = 0;
18 18
19#ifdef DEBUG 19#ifdef DEBUG
20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 20 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
21#endif 21#endif
22 22
23 __FP_UNPACK_D(A, frA); 23 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fnmsub.c b/arch/powerpc/math-emu/fnmsub.c
index f1ca7482b5f0..98944e6e2601 100644
--- a/arch/powerpc/math-emu/fnmsub.c
+++ b/arch/powerpc/math-emu/fnmsub.c
@@ -16,7 +16,7 @@ fnmsub(void *frD, void *frA, void *frB, void *frC)
16 int ret = 0; 16 int ret = 0;
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 19 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
20#endif 20#endif
21 21
22 __FP_UNPACK_D(A, frA); 22 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fnmsubs.c b/arch/powerpc/math-emu/fnmsubs.c
index 5c9a09a87dc7..b20f4eb63fb9 100644
--- a/arch/powerpc/math-emu/fnmsubs.c
+++ b/arch/powerpc/math-emu/fnmsubs.c
@@ -17,7 +17,7 @@ fnmsubs(void *frD, void *frA, void *frB, void *frC)
17 int ret = 0; 17 int ret = 0;
18 18
19#ifdef DEBUG 19#ifdef DEBUG
20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 20 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
21#endif 21#endif
22 22
23 __FP_UNPACK_D(A, frA); 23 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fres.c b/arch/powerpc/math-emu/fres.c
index ec11e46d20af..10ecbd08b79e 100644
--- a/arch/powerpc/math-emu/fres.c
+++ b/arch/powerpc/math-emu/fres.c
@@ -6,7 +6,7 @@ int
6fres(void *frD, void *frB) 6fres(void *frD, void *frB)
7{ 7{
8#ifdef DEBUG 8#ifdef DEBUG
9 printk("%s: %p %p\n", __FUNCTION__, frD, frB); 9 printk("%s: %p %p\n", __func__, frD, frB);
10#endif 10#endif
11 return -ENOSYS; 11 return -ENOSYS;
12} 12}
diff --git a/arch/powerpc/math-emu/frsp.c b/arch/powerpc/math-emu/frsp.c
index d879b2a3d0c9..724ccbc0468e 100644
--- a/arch/powerpc/math-emu/frsp.c
+++ b/arch/powerpc/math-emu/frsp.c
@@ -12,7 +12,7 @@ frsp(void *frD, void *frB)
12 FP_DECL_D(B); 12 FP_DECL_D(B);
13 13
14#ifdef DEBUG 14#ifdef DEBUG
15 printk("%s: D %p, B %p\n", __FUNCTION__, frD, frB); 15 printk("%s: D %p, B %p\n", __func__, frD, frB);
16#endif 16#endif
17 17
18 __FP_UNPACK_D(B, frB); 18 __FP_UNPACK_D(B, frB);
diff --git a/arch/powerpc/math-emu/frsqrte.c b/arch/powerpc/math-emu/frsqrte.c
index a11ae1829850..1d0a3a0fd0e6 100644
--- a/arch/powerpc/math-emu/frsqrte.c
+++ b/arch/powerpc/math-emu/frsqrte.c
@@ -6,7 +6,7 @@ int
6frsqrte(void *frD, void *frB) 6frsqrte(void *frD, void *frB)
7{ 7{
8#ifdef DEBUG 8#ifdef DEBUG
9 printk("%s: %p %p\n", __FUNCTION__, frD, frB); 9 printk("%s: %p %p\n", __func__, frD, frB);
10#endif 10#endif
11 return 0; 11 return 0;
12} 12}
diff --git a/arch/powerpc/math-emu/fsel.c b/arch/powerpc/math-emu/fsel.c
index e36e6e72819a..ecb5f28eb1f3 100644
--- a/arch/powerpc/math-emu/fsel.c
+++ b/arch/powerpc/math-emu/fsel.c
@@ -11,7 +11,7 @@ fsel(u32 *frD, void *frA, u32 *frB, u32 *frC)
11 FP_DECL_D(A); 11 FP_DECL_D(A);
12 12
13#ifdef DEBUG 13#ifdef DEBUG
14 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC); 14 printk("%s: %p %p %p %p\n", __func__, frD, frA, frB, frC);
15#endif 15#endif
16 16
17 __FP_UNPACK_D(A, frA); 17 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fsqrt.c b/arch/powerpc/math-emu/fsqrt.c
index 6f8319f64a8a..38ec2b752e9d 100644
--- a/arch/powerpc/math-emu/fsqrt.c
+++ b/arch/powerpc/math-emu/fsqrt.c
@@ -13,7 +13,7 @@ fsqrt(void *frD, void *frB)
13 int ret = 0; 13 int ret = 0;
14 14
15#ifdef DEBUG 15#ifdef DEBUG
16 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB); 16 printk("%s: %p %p %p %p\n", __func__, frD, frB);
17#endif 17#endif
18 18
19 __FP_UNPACK_D(B, frB); 19 __FP_UNPACK_D(B, frB);
diff --git a/arch/powerpc/math-emu/fsqrts.c b/arch/powerpc/math-emu/fsqrts.c
index 3b2b1cf55c12..335263e06ee5 100644
--- a/arch/powerpc/math-emu/fsqrts.c
+++ b/arch/powerpc/math-emu/fsqrts.c
@@ -14,7 +14,7 @@ fsqrts(void *frD, void *frB)
14 int ret = 0; 14 int ret = 0;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frB); 17 printk("%s: %p %p %p %p\n", __func__, frD, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(B, frB); 20 __FP_UNPACK_D(B, frB);
diff --git a/arch/powerpc/math-emu/fsub.c b/arch/powerpc/math-emu/fsub.c
index 956679042bb2..208d20fc52a5 100644
--- a/arch/powerpc/math-emu/fsub.c
+++ b/arch/powerpc/math-emu/fsub.c
@@ -14,7 +14,7 @@ fsub(void *frD, void *frA, void *frB)
14 int ret = 0; 14 int ret = 0;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 17 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
18#endif 18#endif
19 19
20 __FP_UNPACK_D(A, frA); 20 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/fsubs.c b/arch/powerpc/math-emu/fsubs.c
index 3428117dfe8c..0e61b808c44b 100644
--- a/arch/powerpc/math-emu/fsubs.c
+++ b/arch/powerpc/math-emu/fsubs.c
@@ -15,7 +15,7 @@ fsubs(void *frD, void *frA, void *frB)
15 int ret = 0; 15 int ret = 0;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: %p %p %p\n", __FUNCTION__, frD, frA, frB); 18 printk("%s: %p %p %p\n", __func__, frD, frA, frB);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frA); 21 __FP_UNPACK_D(A, frA);
diff --git a/arch/powerpc/math-emu/lfd.c b/arch/powerpc/math-emu/lfd.c
index 7d38101c329b..6ec90b57c61a 100644
--- a/arch/powerpc/math-emu/lfd.c
+++ b/arch/powerpc/math-emu/lfd.c
@@ -11,7 +11,7 @@ lfd(void *frD, void *ea)
11 if (copy_from_user(frD, ea, sizeof(double))) 11 if (copy_from_user(frD, ea, sizeof(double)))
12 return -EFAULT; 12 return -EFAULT;
13#ifdef DEBUG 13#ifdef DEBUG
14 printk("%s: D %p, ea %p: ", __FUNCTION__, frD, ea); 14 printk("%s: D %p, ea %p: ", __func__, frD, ea);
15 dump_double(frD); 15 dump_double(frD);
16 printk("\n"); 16 printk("\n");
17#endif 17#endif
diff --git a/arch/powerpc/math-emu/lfs.c b/arch/powerpc/math-emu/lfs.c
index c86dee3d7655..6f18ebe3a7ff 100644
--- a/arch/powerpc/math-emu/lfs.c
+++ b/arch/powerpc/math-emu/lfs.c
@@ -14,7 +14,7 @@ lfs(void *frD, void *ea)
14 float f; 14 float f;
15 15
16#ifdef DEBUG 16#ifdef DEBUG
17 printk("%s: D %p, ea %p\n", __FUNCTION__, frD, ea); 17 printk("%s: D %p, ea %p\n", __func__, frD, ea);
18#endif 18#endif
19 19
20 if (copy_from_user(&f, ea, sizeof(float))) 20 if (copy_from_user(&f, ea, sizeof(float)))
diff --git a/arch/powerpc/math-emu/mcrfs.c b/arch/powerpc/math-emu/mcrfs.c
index 106dd912914b..41ba247faf89 100644
--- a/arch/powerpc/math-emu/mcrfs.c
+++ b/arch/powerpc/math-emu/mcrfs.c
@@ -10,7 +10,7 @@ mcrfs(u32 *ccr, u32 crfD, u32 crfS)
10 u32 value, clear; 10 u32 value, clear;
11 11
12#ifdef DEBUG 12#ifdef DEBUG
13 printk("%s: %p (%08x) %d %d\n", __FUNCTION__, ccr, *ccr, crfD, crfS); 13 printk("%s: %p (%08x) %d %d\n", __func__, ccr, *ccr, crfD, crfS);
14#endif 14#endif
15 15
16 clear = 15 << ((7 - crfS) << 2); 16 clear = 15 << ((7 - crfS) << 2);
@@ -24,7 +24,7 @@ mcrfs(u32 *ccr, u32 crfD, u32 crfS)
24 *ccr |= (value << ((7 - crfD) << 2)); 24 *ccr |= (value << ((7 - crfD) << 2));
25 25
26#ifdef DEBUG 26#ifdef DEBUG
27 printk("CR: %08x\n", __FUNCTION__, *ccr); 27 printk("CR: %08x\n", __func__, *ccr);
28#endif 28#endif
29 29
30 return 0; 30 return 0;
diff --git a/arch/powerpc/math-emu/mffs.c b/arch/powerpc/math-emu/mffs.c
index f477c9170e75..b0e2106e6eb6 100644
--- a/arch/powerpc/math-emu/mffs.c
+++ b/arch/powerpc/math-emu/mffs.c
@@ -10,7 +10,7 @@ mffs(u32 *frD)
10 frD[1] = __FPU_FPSCR; 10 frD[1] = __FPU_FPSCR;
11 11
12#ifdef DEBUG 12#ifdef DEBUG
13 printk("%s: frD %p: %08x.%08x\n", __FUNCTION__, frD, frD[0], frD[1]); 13 printk("%s: frD %p: %08x.%08x\n", __func__, frD, frD[0], frD[1]);
14#endif 14#endif
15 15
16 return 0; 16 return 0;
diff --git a/arch/powerpc/math-emu/mtfsb0.c b/arch/powerpc/math-emu/mtfsb0.c
index 99bfd80f4af3..d3062350ea21 100644
--- a/arch/powerpc/math-emu/mtfsb0.c
+++ b/arch/powerpc/math-emu/mtfsb0.c
@@ -11,7 +11,7 @@ mtfsb0(int crbD)
11 __FPU_FPSCR &= ~(1 << (31 - crbD)); 11 __FPU_FPSCR &= ~(1 << (31 - crbD));
12 12
13#ifdef DEBUG 13#ifdef DEBUG
14 printk("%s: %d %08lx\n", __FUNCTION__, crbD, __FPU_FPSCR); 14 printk("%s: %d %08lx\n", __func__, crbD, __FPU_FPSCR);
15#endif 15#endif
16 16
17 return 0; 17 return 0;
diff --git a/arch/powerpc/math-emu/mtfsb1.c b/arch/powerpc/math-emu/mtfsb1.c
index 3d9e7ed92d2b..2e948704b56e 100644
--- a/arch/powerpc/math-emu/mtfsb1.c
+++ b/arch/powerpc/math-emu/mtfsb1.c
@@ -11,7 +11,7 @@ mtfsb1(int crbD)
11 __FPU_FPSCR |= (1 << (31 - crbD)); 11 __FPU_FPSCR |= (1 << (31 - crbD));
12 12
13#ifdef DEBUG 13#ifdef DEBUG
14 printk("%s: %d %08lx\n", __FUNCTION__, crbD, __FPU_FPSCR); 14 printk("%s: %d %08lx\n", __func__, crbD, __FPU_FPSCR);
15#endif 15#endif
16 16
17 return 0; 17 return 0;
diff --git a/arch/powerpc/math-emu/mtfsf.c b/arch/powerpc/math-emu/mtfsf.c
index d70cf714994c..48014d8e3af1 100644
--- a/arch/powerpc/math-emu/mtfsf.c
+++ b/arch/powerpc/math-emu/mtfsf.c
@@ -38,7 +38,7 @@ mtfsf(unsigned int FM, u32 *frB)
38 __FPU_FPSCR |= (frB[1] & mask); 38 __FPU_FPSCR |= (frB[1] & mask);
39 39
40#ifdef DEBUG 40#ifdef DEBUG
41 printk("%s: %02x %p: %08lx\n", __FUNCTION__, FM, frB, __FPU_FPSCR); 41 printk("%s: %02x %p: %08lx\n", __func__, FM, frB, __FPU_FPSCR);
42#endif 42#endif
43 43
44 return 0; 44 return 0;
diff --git a/arch/powerpc/math-emu/mtfsfi.c b/arch/powerpc/math-emu/mtfsfi.c
index 71df854baa7e..031e20093549 100644
--- a/arch/powerpc/math-emu/mtfsfi.c
+++ b/arch/powerpc/math-emu/mtfsfi.c
@@ -16,7 +16,7 @@ mtfsfi(unsigned int crfD, unsigned int IMM)
16 __FPU_FPSCR |= (IMM & 0xf) << ((7 - crfD) << 2); 16 __FPU_FPSCR |= (IMM & 0xf) << ((7 - crfD) << 2);
17 17
18#ifdef DEBUG 18#ifdef DEBUG
19 printk("%s: %d %x: %08lx\n", __FUNCTION__, crfD, IMM, __FPU_FPSCR); 19 printk("%s: %d %x: %08lx\n", __func__, crfD, IMM, __FPU_FPSCR);
20#endif 20#endif
21 21
22 return 0; 22 return 0;
diff --git a/arch/powerpc/math-emu/stfd.c b/arch/powerpc/math-emu/stfd.c
index 3f8c2558a9e8..33a165c8df0f 100644
--- a/arch/powerpc/math-emu/stfd.c
+++ b/arch/powerpc/math-emu/stfd.c
@@ -7,7 +7,7 @@ stfd(void *frS, void *ea)
7{ 7{
8#if 0 8#if 0
9#ifdef DEBUG 9#ifdef DEBUG
10 printk("%s: S %p, ea %p: ", __FUNCTION__, frS, ea); 10 printk("%s: S %p, ea %p: ", __func__, frS, ea);
11 dump_double(frS); 11 dump_double(frS);
12 printk("\n"); 12 printk("\n");
13#endif 13#endif
diff --git a/arch/powerpc/math-emu/stfiwx.c b/arch/powerpc/math-emu/stfiwx.c
index 95caaeec6a08..f15a35f67e2c 100644
--- a/arch/powerpc/math-emu/stfiwx.c
+++ b/arch/powerpc/math-emu/stfiwx.c
@@ -6,7 +6,7 @@ int
6stfiwx(u32 *frS, void *ea) 6stfiwx(u32 *frS, void *ea)
7{ 7{
8#ifdef DEBUG 8#ifdef DEBUG
9 printk("%s: %p %p\n", __FUNCTION__, frS, ea); 9 printk("%s: %p %p\n", __func__, frS, ea);
10#endif 10#endif
11 11
12 if (copy_to_user(ea, &frS[1], sizeof(frS[1]))) 12 if (copy_to_user(ea, &frS[1], sizeof(frS[1])))
diff --git a/arch/powerpc/math-emu/stfs.c b/arch/powerpc/math-emu/stfs.c
index e87ca23c6dc3..8689aa48ef69 100644
--- a/arch/powerpc/math-emu/stfs.c
+++ b/arch/powerpc/math-emu/stfs.c
@@ -15,7 +15,7 @@ stfs(void *frS, void *ea)
15 int err; 15 int err;
16 16
17#ifdef DEBUG 17#ifdef DEBUG
18 printk("%s: S %p, ea %p\n", __FUNCTION__, frS, ea); 18 printk("%s: S %p, ea %p\n", __func__, frS, ea);
19#endif 19#endif
20 20
21 __FP_UNPACK_D(A, frS); 21 __FP_UNPACK_D(A, frS);
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index 3899ea97fbdf..cecbbc76f624 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -97,7 +97,7 @@ unsigned long __init mmu_mapin_ram(void)
97 phys_addr_t p; 97 phys_addr_t p;
98 98
99 v = KERNELBASE; 99 v = KERNELBASE;
100 p = PPC_MEMSTART; 100 p = 0;
101 s = total_lowmem; 101 s = total_lowmem;
102 102
103 if (__map_without_ltlbs) 103 if (__map_without_ltlbs)
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 04dc08798d3d..953fb919eb06 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -67,7 +67,7 @@ unsigned long __init mmu_mapin_ram(void)
67 67
68 /* Pin in enough TLBs to cover any lowmem not covered by the 68 /* Pin in enough TLBs to cover any lowmem not covered by the
69 * initial 256M mapping established in head_44x.S */ 69 * initial 256M mapping established in head_44x.S */
70 for (addr = PPC_PIN_SIZE; addr < total_lowmem; 70 for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr;
71 addr += PPC_PIN_SIZE) 71 addr += PPC_PIN_SIZE)
72 ppc44x_pin_tlb(addr + PAGE_OFFSET, addr); 72 ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
73 73
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 41649a5d3602..1c00e0196f6c 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -6,7 +6,7 @@ ifeq ($(CONFIG_PPC64),y)
6EXTRA_CFLAGS += -mno-minimal-toc 6EXTRA_CFLAGS += -mno-minimal-toc
7endif 7endif
8 8
9obj-y := fault.o mem.o lmb.o \ 9obj-y := fault.o mem.o \
10 init_$(CONFIG_WORD_SIZE).o \ 10 init_$(CONFIG_WORD_SIZE).o \
11 pgtable_$(CONFIG_WORD_SIZE).o \ 11 pgtable_$(CONFIG_WORD_SIZE).o \
12 mmu_context_$(CONFIG_WORD_SIZE).o 12 mmu_context_$(CONFIG_WORD_SIZE).o
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index c93a966b7e4b..ada249bf9779 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -49,18 +49,15 @@
49#include <asm/mmu.h> 49#include <asm/mmu.h>
50#include <asm/uaccess.h> 50#include <asm/uaccess.h>
51#include <asm/smp.h> 51#include <asm/smp.h>
52#include <asm/bootx.h>
53#include <asm/machdep.h> 52#include <asm/machdep.h>
54#include <asm/setup.h> 53#include <asm/setup.h>
55 54
55#include "mmu_decl.h"
56
56extern void loadcam_entry(unsigned int index); 57extern void loadcam_entry(unsigned int index);
57unsigned int tlbcam_index; 58unsigned int tlbcam_index;
58unsigned int num_tlbcam_entries; 59unsigned int num_tlbcam_entries;
59static unsigned long __cam0, __cam1, __cam2; 60static unsigned long __cam0, __cam1, __cam2;
60extern unsigned long total_lowmem;
61extern unsigned long __max_low_memory;
62extern unsigned long __initial_memory_limit;
63#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE
64 61
65#define NUM_TLBCAMS (16) 62#define NUM_TLBCAMS (16)
66 63
@@ -165,15 +162,15 @@ void invalidate_tlbcam_entry(int index)
165void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1, 162void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
166 unsigned long cam2) 163 unsigned long cam2)
167{ 164{
168 settlbcam(0, PAGE_OFFSET, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0); 165 settlbcam(0, PAGE_OFFSET, memstart_addr, cam0, _PAGE_KERNEL, 0);
169 tlbcam_index++; 166 tlbcam_index++;
170 if (cam1) { 167 if (cam1) {
171 tlbcam_index++; 168 tlbcam_index++;
172 settlbcam(1, PAGE_OFFSET+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0); 169 settlbcam(1, PAGE_OFFSET+cam0, memstart_addr+cam0, cam1, _PAGE_KERNEL, 0);
173 } 170 }
174 if (cam2) { 171 if (cam2) {
175 tlbcam_index++; 172 tlbcam_index++;
176 settlbcam(2, PAGE_OFFSET+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0); 173 settlbcam(2, PAGE_OFFSET+cam0+cam1, memstart_addr+cam0+cam1, cam2, _PAGE_KERNEL, 0);
177 } 174 }
178} 175}
179 176
@@ -196,35 +193,32 @@ unsigned long __init mmu_mapin_ram(void)
196void __init 193void __init
197adjust_total_lowmem(void) 194adjust_total_lowmem(void)
198{ 195{
199 unsigned long max_low_mem = MAX_LOW_MEM; 196 phys_addr_t max_lowmem_size = __max_low_memory;
200 unsigned long cam_max = 0x10000000; 197 phys_addr_t cam_max_size = 0x10000000;
201 unsigned long ram; 198 phys_addr_t ram;
202 199
203 /* adjust CAM size to max_low_mem */ 200 /* adjust CAM size to max_lowmem_size */
204 if (max_low_mem < cam_max) 201 if (max_lowmem_size < cam_max_size)
205 cam_max = max_low_mem; 202 cam_max_size = max_lowmem_size;
206 203
207 /* adjust lowmem size to max_low_mem */ 204 /* adjust lowmem size to max_lowmem_size */
208 if (max_low_mem < total_lowmem) 205 ram = min(max_lowmem_size, total_lowmem);
209 ram = max_low_mem;
210 else
211 ram = total_lowmem;
212 206
213 /* Calculate CAM values */ 207 /* Calculate CAM values */
214 __cam0 = 1UL << 2 * (__ilog2(ram) / 2); 208 __cam0 = 1UL << 2 * (__ilog2(ram) / 2);
215 if (__cam0 > cam_max) 209 if (__cam0 > cam_max_size)
216 __cam0 = cam_max; 210 __cam0 = cam_max_size;
217 ram -= __cam0; 211 ram -= __cam0;
218 if (ram) { 212 if (ram) {
219 __cam1 = 1UL << 2 * (__ilog2(ram) / 2); 213 __cam1 = 1UL << 2 * (__ilog2(ram) / 2);
220 if (__cam1 > cam_max) 214 if (__cam1 > cam_max_size)
221 __cam1 = cam_max; 215 __cam1 = cam_max_size;
222 ram -= __cam1; 216 ram -= __cam1;
223 } 217 }
224 if (ram) { 218 if (ram) {
225 __cam2 = 1UL << 2 * (__ilog2(ram) / 2); 219 __cam2 = 1UL << 2 * (__ilog2(ram) / 2);
226 if (__cam2 > cam_max) 220 if (__cam2 > cam_max_size)
227 __cam2 = cam_max; 221 __cam2 = cam_max_size;
228 ram -= __cam2; 222 ram -= __cam2;
229 } 223 }
230 224
@@ -232,6 +226,6 @@ adjust_total_lowmem(void)
232 " CAM2=%ldMb residual: %ldMb\n", 226 " CAM2=%ldMb residual: %ldMb\n",
233 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20, 227 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
234 (total_lowmem - __cam0 - __cam1 - __cam2) >> 20); 228 (total_lowmem - __cam0 - __cam1 - __cam2) >> 20);
235 __max_low_memory = max_low_mem = __cam0 + __cam1 + __cam2; 229 __max_low_memory = __cam0 + __cam1 + __cam2;
236 __initial_memory_limit = __max_low_memory; 230 __initial_memory_limit_addr = memstart_addr + __max_low_memory;
237} 231}
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index a83dfa3cf40c..2b5a399f6fa6 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -31,6 +31,7 @@
31#include <linux/cache.h> 31#include <linux/cache.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/signal.h> 33#include <linux/signal.h>
34#include <linux/lmb.h>
34 35
35#include <asm/processor.h> 36#include <asm/processor.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
@@ -41,7 +42,7 @@
41#include <asm/system.h> 42#include <asm/system.h>
42#include <asm/uaccess.h> 43#include <asm/uaccess.h>
43#include <asm/machdep.h> 44#include <asm/machdep.h>
44#include <asm/lmb.h> 45#include <asm/prom.h>
45#include <asm/abs_addr.h> 46#include <asm/abs_addr.h>
46#include <asm/tlbflush.h> 47#include <asm/tlbflush.h>
47#include <asm/io.h> 48#include <asm/io.h>
@@ -191,6 +192,29 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
191 return ret < 0 ? ret : 0; 192 return ret < 0 ? ret : 0;
192} 193}
193 194
195#ifdef CONFIG_MEMORY_HOTPLUG
196static int htab_remove_mapping(unsigned long vstart, unsigned long vend,
197 int psize, int ssize)
198{
199 unsigned long vaddr;
200 unsigned int step, shift;
201
202 shift = mmu_psize_defs[psize].shift;
203 step = 1 << shift;
204
205 if (!ppc_md.hpte_removebolted) {
206 printk(KERN_WARNING "Platform doesn't implement "
207 "hpte_removebolted\n");
208 return -EINVAL;
209 }
210
211 for (vaddr = vstart; vaddr < vend; vaddr += step)
212 ppc_md.hpte_removebolted(vaddr, psize, ssize);
213
214 return 0;
215}
216#endif /* CONFIG_MEMORY_HOTPLUG */
217
194static int __init htab_dt_scan_seg_sizes(unsigned long node, 218static int __init htab_dt_scan_seg_sizes(unsigned long node,
195 const char *uname, int depth, 219 const char *uname, int depth,
196 void *data) 220 void *data)
@@ -434,6 +458,12 @@ void create_section_mapping(unsigned long start, unsigned long end)
434 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, 458 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX,
435 mmu_linear_psize, mmu_kernel_ssize)); 459 mmu_linear_psize, mmu_kernel_ssize));
436} 460}
461
462int remove_section_mapping(unsigned long start, unsigned long end)
463{
464 return htab_remove_mapping(start, end, mmu_linear_psize,
465 mmu_kernel_ssize);
466}
437#endif /* CONFIG_MEMORY_HOTPLUG */ 467#endif /* CONFIG_MEMORY_HOTPLUG */
438 468
439static inline void make_bl(unsigned int *insn_addr, void *func) 469static inline void make_bl(unsigned int *insn_addr, void *func)
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 977cb1ee5e72..47325f23c51f 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -30,6 +30,7 @@
30#include <linux/highmem.h> 30#include <linux/highmem.h>
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32#include <linux/pagemap.h> 32#include <linux/pagemap.h>
33#include <linux/lmb.h>
33 34
34#include <asm/pgalloc.h> 35#include <asm/pgalloc.h>
35#include <asm/prom.h> 36#include <asm/prom.h>
@@ -41,7 +42,6 @@
41#include <asm/machdep.h> 42#include <asm/machdep.h>
42#include <asm/btext.h> 43#include <asm/btext.h>
43#include <asm/tlb.h> 44#include <asm/tlb.h>
44#include <asm/lmb.h>
45#include <asm/sections.h> 45#include <asm/sections.h>
46 46
47#include "mmu_decl.h" 47#include "mmu_decl.h"
@@ -59,8 +59,8 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
59unsigned long total_memory; 59unsigned long total_memory;
60unsigned long total_lowmem; 60unsigned long total_lowmem;
61 61
62unsigned long ppc_memstart; 62phys_addr_t memstart_addr;
63unsigned long ppc_memoffset = PAGE_OFFSET; 63phys_addr_t lowmem_end_addr;
64 64
65int boot_mapsize; 65int boot_mapsize;
66#ifdef CONFIG_PPC_PMAC 66#ifdef CONFIG_PPC_PMAC
@@ -95,10 +95,10 @@ int __map_without_ltlbs;
95unsigned long __max_low_memory = MAX_LOW_MEM; 95unsigned long __max_low_memory = MAX_LOW_MEM;
96 96
97/* 97/*
98 * limit of what is accessible with initial MMU setup - 98 * address of the limit of what is accessible with initial MMU setup -
99 * 256MB usually, but only 16MB on 601. 99 * 256MB usually, but only 16MB on 601.
100 */ 100 */
101unsigned long __initial_memory_limit = 0x10000000; 101phys_addr_t __initial_memory_limit_addr = (phys_addr_t)0x10000000;
102 102
103/* 103/*
104 * Check for command-line options that affect what MMU_init will do. 104 * Check for command-line options that affect what MMU_init will do.
@@ -131,10 +131,10 @@ void __init MMU_init(void)
131 131
132 /* 601 can only access 16MB at the moment */ 132 /* 601 can only access 16MB at the moment */
133 if (PVR_VER(mfspr(SPRN_PVR)) == 1) 133 if (PVR_VER(mfspr(SPRN_PVR)) == 1)
134 __initial_memory_limit = 0x01000000; 134 __initial_memory_limit_addr = 0x01000000;
135 /* 8xx can only access 8MB at the moment */ 135 /* 8xx can only access 8MB at the moment */
136 if (PVR_VER(mfspr(SPRN_PVR)) == 0x50) 136 if (PVR_VER(mfspr(SPRN_PVR)) == 0x50)
137 __initial_memory_limit = 0x00800000; 137 __initial_memory_limit_addr = 0x00800000;
138 138
139 /* parse args from command line */ 139 /* parse args from command line */
140 MMU_setup(); 140 MMU_setup();
@@ -145,8 +145,8 @@ void __init MMU_init(void)
145 printk(KERN_WARNING "Only using first contiguous memory region"); 145 printk(KERN_WARNING "Only using first contiguous memory region");
146 } 146 }
147 147
148 total_memory = lmb_end_of_DRAM(); 148 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr;
149 total_lowmem = total_memory; 149 lowmem_end_addr = memstart_addr + total_lowmem;
150 150
151#ifdef CONFIG_FSL_BOOKE 151#ifdef CONFIG_FSL_BOOKE
152 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB 152 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB
@@ -157,9 +157,10 @@ void __init MMU_init(void)
157 157
158 if (total_lowmem > __max_low_memory) { 158 if (total_lowmem > __max_low_memory) {
159 total_lowmem = __max_low_memory; 159 total_lowmem = __max_low_memory;
160 lowmem_end_addr = memstart_addr + total_lowmem;
160#ifndef CONFIG_HIGHMEM 161#ifndef CONFIG_HIGHMEM
161 total_memory = total_lowmem; 162 total_memory = total_lowmem;
162 lmb_enforce_memory_limit(total_lowmem); 163 lmb_enforce_memory_limit(lowmem_end_addr);
163 lmb_analyze(); 164 lmb_analyze();
164#endif /* CONFIG_HIGHMEM */ 165#endif /* CONFIG_HIGHMEM */
165 } 166 }
@@ -184,8 +185,6 @@ void __init MMU_init(void)
184 /* Map in I/O resources */ 185 /* Map in I/O resources */
185 if (ppc_md.progress) 186 if (ppc_md.progress)
186 ppc_md.progress("MMU:setio", 0x302); 187 ppc_md.progress("MMU:setio", 0x302);
187 if (ppc_md.setup_io_mappings)
188 ppc_md.setup_io_mappings();
189 188
190 /* Initialize the context management stuff */ 189 /* Initialize the context management stuff */
191 mmu_context_init(); 190 mmu_context_init();
@@ -208,7 +207,7 @@ void __init *early_get_page(void)
208 p = alloc_bootmem_pages(PAGE_SIZE); 207 p = alloc_bootmem_pages(PAGE_SIZE);
209 } else { 208 } else {
210 p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE, 209 p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE,
211 __initial_memory_limit)); 210 __initial_memory_limit_addr));
212 } 211 }
213 return p; 212 return p;
214} 213}
@@ -276,7 +275,7 @@ static int __init setup_kcore(void)
276 275
277 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); 276 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
278 if (!kcore_mem) 277 if (!kcore_mem)
279 panic("%s: kmalloc failed\n", __FUNCTION__); 278 panic("%s: kmalloc failed\n", __func__);
280 279
281 /* must stay under 32 bits */ 280 /* must stay under 32 bits */
282 if ( 0xfffffffful - (unsigned long)__va(base) < size) { 281 if ( 0xfffffffful - (unsigned long)__va(base) < size) {
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index c0f5cff77035..698bd000f98b 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -38,11 +38,11 @@
38#include <linux/nodemask.h> 38#include <linux/nodemask.h>
39#include <linux/module.h> 39#include <linux/module.h>
40#include <linux/poison.h> 40#include <linux/poison.h>
41#include <linux/lmb.h>
41 42
42#include <asm/pgalloc.h> 43#include <asm/pgalloc.h>
43#include <asm/page.h> 44#include <asm/page.h>
44#include <asm/prom.h> 45#include <asm/prom.h>
45#include <asm/lmb.h>
46#include <asm/rtas.h> 46#include <asm/rtas.h>
47#include <asm/io.h> 47#include <asm/io.h>
48#include <asm/mmu_context.h> 48#include <asm/mmu_context.h>
@@ -72,8 +72,7 @@
72#warning TASK_SIZE is smaller than it needs to be. 72#warning TASK_SIZE is smaller than it needs to be.
73#endif 73#endif
74 74
75/* max amount of RAM to use */ 75phys_addr_t memstart_addr;
76unsigned long __max_memory;
77 76
78void free_initmem(void) 77void free_initmem(void)
79{ 78{
@@ -122,7 +121,7 @@ static int __init setup_kcore(void)
122 /* GFP_ATOMIC to avoid might_sleep warnings during boot */ 121 /* GFP_ATOMIC to avoid might_sleep warnings during boot */
123 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); 122 kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
124 if (!kcore_mem) 123 if (!kcore_mem)
125 panic("%s: kmalloc failed\n", __FUNCTION__); 124 panic("%s: kmalloc failed\n", __func__);
126 125
127 kclist_add(kcore_mem, __va(base), size); 126 kclist_add(kcore_mem, __va(base), size);
128 } 127 }
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
deleted file mode 100644
index 4ce23bcf8a57..000000000000
--- a/arch/powerpc/mm/lmb.c
+++ /dev/null
@@ -1,357 +0,0 @@
1/*
2 * Procedures for maintaining information about logical memory blocks.
3 *
4 * Peter Bergner, IBM Corp. June 2001.
5 * Copyright (C) 2001 Peter Bergner.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/bitops.h>
16#include <asm/types.h>
17#include <asm/page.h>
18#include <asm/prom.h>
19#include <asm/lmb.h>
20#ifdef CONFIG_PPC32
21#include "mmu_decl.h" /* for __max_low_memory */
22#endif
23
24#undef DEBUG
25
26#ifdef DEBUG
27#include <asm/udbg.h>
28#define DBG(fmt...) udbg_printf(fmt)
29#else
30#define DBG(fmt...)
31#endif
32
33#define LMB_ALLOC_ANYWHERE 0
34
35struct lmb lmb;
36
37void lmb_dump_all(void)
38{
39#ifdef DEBUG
40 unsigned long i;
41
42 DBG("lmb_dump_all:\n");
43 DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt);
44 DBG(" memory.size = 0x%lx\n", lmb.memory.size);
45 for (i=0; i < lmb.memory.cnt ;i++) {
46 DBG(" memory.region[0x%x].base = 0x%lx\n",
47 i, lmb.memory.region[i].base);
48 DBG(" .size = 0x%lx\n",
49 lmb.memory.region[i].size);
50 }
51
52 DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
53 DBG(" reserved.size = 0x%lx\n", lmb.reserved.size);
54 for (i=0; i < lmb.reserved.cnt ;i++) {
55 DBG(" reserved.region[0x%x].base = 0x%lx\n",
56 i, lmb.reserved.region[i].base);
57 DBG(" .size = 0x%lx\n",
58 lmb.reserved.region[i].size);
59 }
60#endif /* DEBUG */
61}
62
63static unsigned long __init lmb_addrs_overlap(unsigned long base1,
64 unsigned long size1, unsigned long base2, unsigned long size2)
65{
66 return ((base1 < (base2+size2)) && (base2 < (base1+size1)));
67}
68
69static long __init lmb_addrs_adjacent(unsigned long base1, unsigned long size1,
70 unsigned long base2, unsigned long size2)
71{
72 if (base2 == base1 + size1)
73 return 1;
74 else if (base1 == base2 + size2)
75 return -1;
76
77 return 0;
78}
79
80static long __init lmb_regions_adjacent(struct lmb_region *rgn,
81 unsigned long r1, unsigned long r2)
82{
83 unsigned long base1 = rgn->region[r1].base;
84 unsigned long size1 = rgn->region[r1].size;
85 unsigned long base2 = rgn->region[r2].base;
86 unsigned long size2 = rgn->region[r2].size;
87
88 return lmb_addrs_adjacent(base1, size1, base2, size2);
89}
90
91static void __init lmb_remove_region(struct lmb_region *rgn, unsigned long r)
92{
93 unsigned long i;
94
95 for (i = r; i < rgn->cnt - 1; i++) {
96 rgn->region[i].base = rgn->region[i + 1].base;
97 rgn->region[i].size = rgn->region[i + 1].size;
98 }
99 rgn->cnt--;
100}
101
102/* Assumption: base addr of region 1 < base addr of region 2 */
103static void __init lmb_coalesce_regions(struct lmb_region *rgn,
104 unsigned long r1, unsigned long r2)
105{
106 rgn->region[r1].size += rgn->region[r2].size;
107 lmb_remove_region(rgn, r2);
108}
109
110/* This routine called with relocation disabled. */
111void __init lmb_init(void)
112{
113 /* Create a dummy zero size LMB which will get coalesced away later.
114 * This simplifies the lmb_add() code below...
115 */
116 lmb.memory.region[0].base = 0;
117 lmb.memory.region[0].size = 0;
118 lmb.memory.cnt = 1;
119
120 /* Ditto. */
121 lmb.reserved.region[0].base = 0;
122 lmb.reserved.region[0].size = 0;
123 lmb.reserved.cnt = 1;
124}
125
126/* This routine may be called with relocation disabled. */
127void __init lmb_analyze(void)
128{
129 int i;
130
131 lmb.memory.size = 0;
132
133 for (i = 0; i < lmb.memory.cnt; i++)
134 lmb.memory.size += lmb.memory.region[i].size;
135}
136
137/* This routine called with relocation disabled. */
138static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
139 unsigned long size)
140{
141 unsigned long coalesced = 0;
142 long adjacent, i;
143
144 /* First try and coalesce this LMB with another. */
145 for (i=0; i < rgn->cnt; i++) {
146 unsigned long rgnbase = rgn->region[i].base;
147 unsigned long rgnsize = rgn->region[i].size;
148
149 if ((rgnbase == base) && (rgnsize == size))
150 /* Already have this region, so we're done */
151 return 0;
152
153 adjacent = lmb_addrs_adjacent(base,size,rgnbase,rgnsize);
154 if ( adjacent > 0 ) {
155 rgn->region[i].base -= size;
156 rgn->region[i].size += size;
157 coalesced++;
158 break;
159 }
160 else if ( adjacent < 0 ) {
161 rgn->region[i].size += size;
162 coalesced++;
163 break;
164 }
165 }
166
167 if ((i < rgn->cnt-1) && lmb_regions_adjacent(rgn, i, i+1) ) {
168 lmb_coalesce_regions(rgn, i, i+1);
169 coalesced++;
170 }
171
172 if (coalesced)
173 return coalesced;
174 if (rgn->cnt >= MAX_LMB_REGIONS)
175 return -1;
176
177 /* Couldn't coalesce the LMB, so add it to the sorted table. */
178 for (i = rgn->cnt-1; i >= 0; i--) {
179 if (base < rgn->region[i].base) {
180 rgn->region[i+1].base = rgn->region[i].base;
181 rgn->region[i+1].size = rgn->region[i].size;
182 } else {
183 rgn->region[i+1].base = base;
184 rgn->region[i+1].size = size;
185 break;
186 }
187 }
188 rgn->cnt++;
189
190 return 0;
191}
192
193/* This routine may be called with relocation disabled. */
194long __init lmb_add(unsigned long base, unsigned long size)
195{
196 struct lmb_region *_rgn = &(lmb.memory);
197
198 /* On pSeries LPAR systems, the first LMB is our RMO region. */
199 if (base == 0)
200 lmb.rmo_size = size;
201
202 return lmb_add_region(_rgn, base, size);
203
204}
205
206long __init lmb_reserve(unsigned long base, unsigned long size)
207{
208 struct lmb_region *_rgn = &(lmb.reserved);
209
210 BUG_ON(0 == size);
211
212 return lmb_add_region(_rgn, base, size);
213}
214
215long __init lmb_overlaps_region(struct lmb_region *rgn, unsigned long base,
216 unsigned long size)
217{
218 unsigned long i;
219
220 for (i=0; i < rgn->cnt; i++) {
221 unsigned long rgnbase = rgn->region[i].base;
222 unsigned long rgnsize = rgn->region[i].size;
223 if ( lmb_addrs_overlap(base,size,rgnbase,rgnsize) ) {
224 break;
225 }
226 }
227
228 return (i < rgn->cnt) ? i : -1;
229}
230
231unsigned long __init lmb_alloc(unsigned long size, unsigned long align)
232{
233 return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE);
234}
235
236unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
237 unsigned long max_addr)
238{
239 unsigned long alloc;
240
241 alloc = __lmb_alloc_base(size, align, max_addr);
242
243 if (alloc == 0)
244 panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n",
245 size, max_addr);
246
247 return alloc;
248}
249
250unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align,
251 unsigned long max_addr)
252{
253 long i, j;
254 unsigned long base = 0;
255
256 BUG_ON(0 == size);
257
258#ifdef CONFIG_PPC32
259 /* On 32-bit, make sure we allocate lowmem */
260 if (max_addr == LMB_ALLOC_ANYWHERE)
261 max_addr = __max_low_memory;
262#endif
263 for (i = lmb.memory.cnt-1; i >= 0; i--) {
264 unsigned long lmbbase = lmb.memory.region[i].base;
265 unsigned long lmbsize = lmb.memory.region[i].size;
266
267 if (max_addr == LMB_ALLOC_ANYWHERE)
268 base = _ALIGN_DOWN(lmbbase + lmbsize - size, align);
269 else if (lmbbase < max_addr) {
270 base = min(lmbbase + lmbsize, max_addr);
271 base = _ALIGN_DOWN(base - size, align);
272 } else
273 continue;
274
275 while ((lmbbase <= base) &&
276 ((j = lmb_overlaps_region(&lmb.reserved, base, size)) >= 0) )
277 base = _ALIGN_DOWN(lmb.reserved.region[j].base - size,
278 align);
279
280 if ((base != 0) && (lmbbase <= base))
281 break;
282 }
283
284 if (i < 0)
285 return 0;
286
287 lmb_add_region(&lmb.reserved, base, size);
288
289 return base;
290}
291
292/* You must call lmb_analyze() before this. */
293unsigned long __init lmb_phys_mem_size(void)
294{
295 return lmb.memory.size;
296}
297
298unsigned long __init lmb_end_of_DRAM(void)
299{
300 int idx = lmb.memory.cnt - 1;
301
302 return (lmb.memory.region[idx].base + lmb.memory.region[idx].size);
303}
304
305/* You must call lmb_analyze() after this. */
306void __init lmb_enforce_memory_limit(unsigned long memory_limit)
307{
308 unsigned long i, limit;
309 struct lmb_property *p;
310
311 if (! memory_limit)
312 return;
313
314 /* Truncate the lmb regions to satisfy the memory limit. */
315 limit = memory_limit;
316 for (i = 0; i < lmb.memory.cnt; i++) {
317 if (limit > lmb.memory.region[i].size) {
318 limit -= lmb.memory.region[i].size;
319 continue;
320 }
321
322 lmb.memory.region[i].size = limit;
323 lmb.memory.cnt = i + 1;
324 break;
325 }
326
327 if (lmb.memory.region[0].size < lmb.rmo_size)
328 lmb.rmo_size = lmb.memory.region[0].size;
329
330 /* And truncate any reserves above the limit also. */
331 for (i = 0; i < lmb.reserved.cnt; i++) {
332 p = &lmb.reserved.region[i];
333
334 if (p->base > memory_limit)
335 p->size = 0;
336 else if ((p->base + p->size) > memory_limit)
337 p->size = memory_limit - p->base;
338
339 if (p->size == 0) {
340 lmb_remove_region(&lmb.reserved, i);
341 i--;
342 }
343 }
344}
345
346int __init lmb_is_reserved(unsigned long addr)
347{
348 int i;
349
350 for (i = 0; i < lmb.reserved.cnt; i++) {
351 unsigned long upper = lmb.reserved.region[i].base +
352 lmb.reserved.region[i].size - 1;
353 if ((addr >= lmb.reserved.region[i].base) && (addr <= upper))
354 return 1;
355 }
356 return 0;
357}
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index be5c506779a7..16def4dcff6d 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -31,6 +31,7 @@
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32#include <linux/pagemap.h> 32#include <linux/pagemap.h>
33#include <linux/suspend.h> 33#include <linux/suspend.h>
34#include <linux/lmb.h>
34 35
35#include <asm/pgalloc.h> 36#include <asm/pgalloc.h>
36#include <asm/prom.h> 37#include <asm/prom.h>
@@ -42,7 +43,6 @@
42#include <asm/machdep.h> 43#include <asm/machdep.h>
43#include <asm/btext.h> 44#include <asm/btext.h>
44#include <asm/tlb.h> 45#include <asm/tlb.h>
45#include <asm/lmb.h>
46#include <asm/sections.h> 46#include <asm/sections.h>
47#include <asm/vdso.h> 47#include <asm/vdso.h>
48 48
@@ -111,7 +111,7 @@ int memory_add_physaddr_to_nid(u64 start)
111} 111}
112#endif 112#endif
113 113
114int __devinit arch_add_memory(int nid, u64 start, u64 size) 114int arch_add_memory(int nid, u64 start, u64 size)
115{ 115{
116 struct pglist_data *pgdata; 116 struct pglist_data *pgdata;
117 struct zone *zone; 117 struct zone *zone;
@@ -175,7 +175,6 @@ void show_mem(void)
175 175
176 printk("Mem-info:\n"); 176 printk("Mem-info:\n");
177 show_free_areas(); 177 show_free_areas();
178 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
179 for_each_online_pgdat(pgdat) { 178 for_each_online_pgdat(pgdat) {
180 unsigned long flags; 179 unsigned long flags;
181 pgdat_resize_lock(pgdat, &flags); 180 pgdat_resize_lock(pgdat, &flags);
@@ -217,9 +216,11 @@ void __init do_init_bootmem(void)
217 unsigned long total_pages; 216 unsigned long total_pages;
218 int boot_mapsize; 217 int boot_mapsize;
219 218
220 max_pfn = total_pages = lmb_end_of_DRAM() >> PAGE_SHIFT; 219 max_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
220 total_pages = (lmb_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT;
221#ifdef CONFIG_HIGHMEM 221#ifdef CONFIG_HIGHMEM
222 total_pages = total_lowmem >> PAGE_SHIFT; 222 total_pages = total_lowmem >> PAGE_SHIFT;
223 max_low_pfn = lowmem_end_addr >> PAGE_SHIFT;
223#endif 224#endif
224 225
225 /* 226 /*
@@ -245,18 +246,18 @@ void __init do_init_bootmem(void)
245 * present. 246 * present.
246 */ 247 */
247#ifdef CONFIG_HIGHMEM 248#ifdef CONFIG_HIGHMEM
248 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT); 249 free_bootmem_with_active_regions(0, lowmem_end_addr >> PAGE_SHIFT);
249 250
250 /* reserve the sections we're already using */ 251 /* reserve the sections we're already using */
251 for (i = 0; i < lmb.reserved.cnt; i++) { 252 for (i = 0; i < lmb.reserved.cnt; i++) {
252 unsigned long addr = lmb.reserved.region[i].base + 253 unsigned long addr = lmb.reserved.region[i].base +
253 lmb_size_bytes(&lmb.reserved, i) - 1; 254 lmb_size_bytes(&lmb.reserved, i) - 1;
254 if (addr < total_lowmem) 255 if (addr < lowmem_end_addr)
255 reserve_bootmem(lmb.reserved.region[i].base, 256 reserve_bootmem(lmb.reserved.region[i].base,
256 lmb_size_bytes(&lmb.reserved, i), 257 lmb_size_bytes(&lmb.reserved, i),
257 BOOTMEM_DEFAULT); 258 BOOTMEM_DEFAULT);
258 else if (lmb.reserved.region[i].base < total_lowmem) { 259 else if (lmb.reserved.region[i].base < lowmem_end_addr) {
259 unsigned long adjusted_size = total_lowmem - 260 unsigned long adjusted_size = lowmem_end_addr -
260 lmb.reserved.region[i].base; 261 lmb.reserved.region[i].base;
261 reserve_bootmem(lmb.reserved.region[i].base, 262 reserve_bootmem(lmb.reserved.region[i].base,
262 adjusted_size, BOOTMEM_DEFAULT); 263 adjusted_size, BOOTMEM_DEFAULT);
@@ -326,7 +327,7 @@ void __init paging_init(void)
326 (top_of_ram - total_ram) >> 20); 327 (top_of_ram - total_ram) >> 20);
327 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 328 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
328#ifdef CONFIG_HIGHMEM 329#ifdef CONFIG_HIGHMEM
329 max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT; 330 max_zone_pfns[ZONE_DMA] = lowmem_end_addr >> PAGE_SHIFT;
330 max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT; 331 max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT;
331#else 332#else
332 max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT; 333 max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT;
@@ -381,7 +382,7 @@ void __init mem_init(void)
381 { 382 {
382 unsigned long pfn, highmem_mapnr; 383 unsigned long pfn, highmem_mapnr;
383 384
384 highmem_mapnr = total_lowmem >> PAGE_SHIFT; 385 highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT;
385 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) { 386 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
386 struct page *page = pfn_to_page(pfn); 387 struct page *page = pfn_to_page(pfn);
387 if (lmb_is_reserved(pfn << PAGE_SHIFT)) 388 if (lmb_is_reserved(pfn << PAGE_SHIFT))
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index ebfd13dc9d19..04802252a64f 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -48,9 +48,11 @@ extern unsigned int num_tlbcam_entries;
48 48
49extern unsigned long ioremap_bot; 49extern unsigned long ioremap_bot;
50extern unsigned long __max_low_memory; 50extern unsigned long __max_low_memory;
51extern unsigned long __initial_memory_limit; 51extern phys_addr_t __initial_memory_limit_addr;
52extern unsigned long total_memory; 52extern unsigned long total_memory;
53extern unsigned long total_lowmem; 53extern unsigned long total_lowmem;
54extern phys_addr_t memstart_addr;
55extern phys_addr_t lowmem_end_addr;
54 56
55/* ...and now those things that may be slightly different between processor 57/* ...and now those things that may be slightly different between processor
56 * architectures. -- Dan 58 * architectures. -- Dan
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index a300d254aac6..1efd631211ef 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -17,8 +17,9 @@
17#include <linux/nodemask.h> 17#include <linux/nodemask.h>
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/notifier.h> 19#include <linux/notifier.h>
20#include <linux/lmb.h>
20#include <asm/sparsemem.h> 21#include <asm/sparsemem.h>
21#include <asm/lmb.h> 22#include <asm/prom.h>
22#include <asm/system.h> 23#include <asm/system.h>
23#include <asm/smp.h> 24#include <asm/smp.h>
24 25
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index ac3390f81900..64c44bcc68de 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -281,12 +281,13 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
281 */ 281 */
282void __init mapin_ram(void) 282void __init mapin_ram(void)
283{ 283{
284 unsigned long v, p, s, f; 284 unsigned long v, s, f;
285 phys_addr_t p;
285 int ktext; 286 int ktext;
286 287
287 s = mmu_mapin_ram(); 288 s = mmu_mapin_ram();
288 v = KERNELBASE + s; 289 v = KERNELBASE + s;
289 p = PPC_MEMSTART + s; 290 p = memstart_addr + s;
290 for (; s < total_lowmem; s += PAGE_SIZE) { 291 for (; s < total_lowmem; s += PAGE_SIZE) {
291 ktext = ((char *) v >= _stext && (char *) v < etext); 292 ktext = ((char *) v >= _stext && (char *) v < etext);
292 f = ktext ?_PAGE_RAM_TEXT : _PAGE_RAM; 293 f = ktext ?_PAGE_RAM_TEXT : _PAGE_RAM;
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 5c45d474cfcc..cef9f156874b 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -26,11 +26,11 @@
26#include <linux/mm.h> 26#include <linux/mm.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/prom.h> 31#include <asm/prom.h>
31#include <asm/mmu.h> 32#include <asm/mmu.h>
32#include <asm/machdep.h> 33#include <asm/machdep.h>
33#include <asm/lmb.h>
34 34
35#include "mmu_decl.h" 35#include "mmu_decl.h"
36 36
@@ -82,7 +82,6 @@ unsigned long __init mmu_mapin_ram(void)
82#else 82#else
83 unsigned long tot, bl, done; 83 unsigned long tot, bl, done;
84 unsigned long max_size = (256<<20); 84 unsigned long max_size = (256<<20);
85 unsigned long align;
86 85
87 if (__map_without_bats) { 86 if (__map_without_bats) {
88 printk(KERN_DEBUG "RAM mapped without BATs\n"); 87 printk(KERN_DEBUG "RAM mapped without BATs\n");
@@ -93,19 +92,13 @@ unsigned long __init mmu_mapin_ram(void)
93 92
94 /* Make sure we don't map a block larger than the 93 /* Make sure we don't map a block larger than the
95 smallest alignment of the physical address. */ 94 smallest alignment of the physical address. */
96 /* alignment of PPC_MEMSTART */
97 align = ~(PPC_MEMSTART-1) & PPC_MEMSTART;
98 /* set BAT block size to MIN(max_size, align) */
99 if (align && align < max_size)
100 max_size = align;
101
102 tot = total_lowmem; 95 tot = total_lowmem;
103 for (bl = 128<<10; bl < max_size; bl <<= 1) { 96 for (bl = 128<<10; bl < max_size; bl <<= 1) {
104 if (bl * 2 > tot) 97 if (bl * 2 > tot)
105 break; 98 break;
106 } 99 }
107 100
108 setbat(2, KERNELBASE, PPC_MEMSTART, bl, _PAGE_RAM); 101 setbat(2, KERNELBASE, 0, bl, _PAGE_RAM);
109 done = (unsigned long)bat_addrs[2].limit - KERNELBASE + 1; 102 done = (unsigned long)bat_addrs[2].limit - KERNELBASE + 1;
110 if ((done < tot) && !bat_addrs[3].limit) { 103 if ((done < tot) && !bat_addrs[3].limit) {
111 /* use BAT3 to cover a bit more */ 104 /* use BAT3 to cover a bit more */
@@ -113,7 +106,7 @@ unsigned long __init mmu_mapin_ram(void)
113 for (bl = 128<<10; bl < max_size; bl <<= 1) 106 for (bl = 128<<10; bl < max_size; bl <<= 1)
114 if (bl * 2 > tot) 107 if (bl * 2 > tot)
115 break; 108 break;
116 setbat(3, KERNELBASE+done, PPC_MEMSTART+done, bl, _PAGE_RAM); 109 setbat(3, KERNELBASE+done, done, bl, _PAGE_RAM);
117 done = (unsigned long)bat_addrs[3].limit - KERNELBASE + 1; 110 done = (unsigned long)bat_addrs[3].limit - KERNELBASE + 1;
118 } 111 }
119 112
@@ -240,7 +233,7 @@ void __init MMU_init_hw(void)
240 */ 233 */
241 if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322); 234 if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
242 Hash = __va(lmb_alloc_base(Hash_size, Hash_size, 235 Hash = __va(lmb_alloc_base(Hash_size, Hash_size,
243 __initial_memory_limit)); 236 __initial_memory_limit_addr));
244 cacheable_memzero(Hash, Hash_size); 237 cacheable_memzero(Hash, Hash_size);
245 _SDR1 = __pa(Hash) | SDR1_LOW_BITS; 238 _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
246 239
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 50448d5de9d2..efbbd13d93e5 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -12,12 +12,14 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/lmb.h>
16
15#include <asm/pgtable.h> 17#include <asm/pgtable.h>
16#include <asm/mmu.h> 18#include <asm/mmu.h>
17#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
18#include <asm/paca.h> 20#include <asm/paca.h>
19#include <asm/cputable.h> 21#include <asm/cputable.h>
20#include <asm/lmb.h> 22#include <asm/prom.h>
21#include <asm/abs_addr.h> 23#include <asm/abs_addr.h>
22#include <asm/firmware.h> 24#include <asm/firmware.h>
23#include <asm/iseries/hv_call.h> 25#include <asm/iseries/hv_call.h>
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index 257b13cb18af..2a9b4a049329 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -68,7 +68,7 @@ static struct cached_info *get_cached_info(struct spu *the_spu, int spu_num)
68 if (spu_num >= num_spu_nodes) { 68 if (spu_num >= num_spu_nodes) {
69 printk(KERN_ERR "SPU_PROF: " 69 printk(KERN_ERR "SPU_PROF: "
70 "%s, line %d: Invalid index %d into spu info cache\n", 70 "%s, line %d: Invalid index %d into spu info cache\n",
71 __FUNCTION__, __LINE__, spu_num); 71 __func__, __LINE__, spu_num);
72 ret_info = NULL; 72 ret_info = NULL;
73 goto out; 73 goto out;
74 } 74 }
@@ -115,7 +115,7 @@ prepare_cached_spu_info(struct spu *spu, unsigned long objectId)
115 if (!info) { 115 if (!info) {
116 printk(KERN_ERR "SPU_PROF: " 116 printk(KERN_ERR "SPU_PROF: "
117 "%s, line %d: create vma_map failed\n", 117 "%s, line %d: create vma_map failed\n",
118 __FUNCTION__, __LINE__); 118 __func__, __LINE__);
119 retval = -ENOMEM; 119 retval = -ENOMEM;
120 goto err_alloc; 120 goto err_alloc;
121 } 121 }
@@ -123,7 +123,7 @@ prepare_cached_spu_info(struct spu *spu, unsigned long objectId)
123 if (!new_map) { 123 if (!new_map) {
124 printk(KERN_ERR "SPU_PROF: " 124 printk(KERN_ERR "SPU_PROF: "
125 "%s, line %d: create vma_map failed\n", 125 "%s, line %d: create vma_map failed\n",
126 __FUNCTION__, __LINE__); 126 __func__, __LINE__);
127 retval = -ENOMEM; 127 retval = -ENOMEM;
128 goto err_alloc; 128 goto err_alloc;
129 } 129 }
@@ -171,7 +171,7 @@ static int release_cached_info(int spu_index)
171 printk(KERN_ERR "SPU_PROF: " 171 printk(KERN_ERR "SPU_PROF: "
172 "%s, line %d: " 172 "%s, line %d: "
173 "Invalid index %d into spu info cache\n", 173 "Invalid index %d into spu info cache\n",
174 __FUNCTION__, __LINE__, spu_index); 174 __func__, __LINE__, spu_index);
175 goto out; 175 goto out;
176 } 176 }
177 end = spu_index + 1; 177 end = spu_index + 1;
@@ -273,7 +273,7 @@ fail_no_image_cookie:
273 273
274 printk(KERN_ERR "SPU_PROF: " 274 printk(KERN_ERR "SPU_PROF: "
275 "%s, line %d: Cannot find dcookie for SPU binary\n", 275 "%s, line %d: Cannot find dcookie for SPU binary\n",
276 __FUNCTION__, __LINE__); 276 __func__, __LINE__);
277 goto out; 277 goto out;
278} 278}
279 279
@@ -467,7 +467,7 @@ int spu_sync_stop(void)
467 if (ret) { 467 if (ret) {
468 printk(KERN_ERR "SPU_PROF: " 468 printk(KERN_ERR "SPU_PROF: "
469 "%s, line %d: spu_switch_event_unregister returned %d\n", 469 "%s, line %d: spu_switch_event_unregister returned %d\n",
470 __FUNCTION__, __LINE__, ret); 470 __func__, __LINE__, ret);
471 goto out; 471 goto out;
472 } 472 }
473 473
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c
index 9a932177e70e..fff66662d021 100644
--- a/arch/powerpc/oprofile/cell/vma_map.c
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -72,7 +72,7 @@ vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma,
72 kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL); 72 kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL);
73 if (!new) { 73 if (!new) {
74 printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n", 74 printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n",
75 __FUNCTION__, __LINE__); 75 __func__, __LINE__);
76 vma_map_free(map); 76 vma_map_free(map);
77 return NULL; 77 return NULL;
78 } 78 }
@@ -134,19 +134,19 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
134 if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { 134 if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) {
135 printk(KERN_ERR "SPU_PROF: " 135 printk(KERN_ERR "SPU_PROF: "
136 "%s, line %d: Unexpected e_ident parsing SPU ELF\n", 136 "%s, line %d: Unexpected e_ident parsing SPU ELF\n",
137 __FUNCTION__, __LINE__); 137 __func__, __LINE__);
138 goto fail; 138 goto fail;
139 } 139 }
140 if (ehdr.e_machine != EM_SPU) { 140 if (ehdr.e_machine != EM_SPU) {
141 printk(KERN_ERR "SPU_PROF: " 141 printk(KERN_ERR "SPU_PROF: "
142 "%s, line %d: Unexpected e_machine parsing SPU ELF\n", 142 "%s, line %d: Unexpected e_machine parsing SPU ELF\n",
143 __FUNCTION__, __LINE__); 143 __func__, __LINE__);
144 goto fail; 144 goto fail;
145 } 145 }
146 if (ehdr.e_type != ET_EXEC) { 146 if (ehdr.e_type != ET_EXEC) {
147 printk(KERN_ERR "SPU_PROF: " 147 printk(KERN_ERR "SPU_PROF: "
148 "%s, line %d: Unexpected e_type parsing SPU ELF\n", 148 "%s, line %d: Unexpected e_type parsing SPU ELF\n",
149 __FUNCTION__, __LINE__); 149 __func__, __LINE__);
150 goto fail; 150 goto fail;
151 } 151 }
152 phdr_start = spu_elf_start + ehdr.e_phoff; 152 phdr_start = spu_elf_start + ehdr.e_phoff;
@@ -232,7 +232,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
232 if (overlay_tbl_offset < 0) { 232 if (overlay_tbl_offset < 0) {
233 printk(KERN_ERR "SPU_PROF: " 233 printk(KERN_ERR "SPU_PROF: "
234 "%s, line %d: Error finding SPU overlay table\n", 234 "%s, line %d: Error finding SPU overlay table\n",
235 __FUNCTION__, __LINE__); 235 __func__, __LINE__);
236 goto fail; 236 goto fail;
237 } 237 }
238 ovly_table = spu_elf_start + overlay_tbl_offset; 238 ovly_table = spu_elf_start + overlay_tbl_offset;
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index 9eed1f68fcab..5ff4de3eb3be 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -216,7 +216,7 @@ static void pm_rtas_reset_signals(u32 node)
216 * failure to stop OProfile. 216 * failure to stop OProfile.
217 */ 217 */
218 printk(KERN_WARNING "%s: rtas returned: %d\n", 218 printk(KERN_WARNING "%s: rtas returned: %d\n",
219 __FUNCTION__, ret); 219 __func__, ret);
220} 220}
221 221
222static int pm_rtas_activate_signals(u32 node, u32 count) 222static int pm_rtas_activate_signals(u32 node, u32 count)
@@ -255,7 +255,7 @@ static int pm_rtas_activate_signals(u32 node, u32 count)
255 255
256 if (unlikely(ret)) { 256 if (unlikely(ret)) {
257 printk(KERN_WARNING "%s: rtas returned: %d\n", 257 printk(KERN_WARNING "%s: rtas returned: %d\n",
258 __FUNCTION__, ret); 258 __func__, ret);
259 return -EIO; 259 return -EIO;
260 } 260 }
261 } 261 }
@@ -560,7 +560,7 @@ static int cell_reg_setup(struct op_counter_config *ctr,
560 if (unlikely(spu_rtas_token == RTAS_UNKNOWN_SERVICE)) { 560 if (unlikely(spu_rtas_token == RTAS_UNKNOWN_SERVICE)) {
561 printk(KERN_ERR 561 printk(KERN_ERR
562 "%s: rtas token ibm,cbe-spu-perftools unknown\n", 562 "%s: rtas token ibm,cbe-spu-perftools unknown\n",
563 __FUNCTION__); 563 __func__);
564 return -EIO; 564 return -EIO;
565 } 565 }
566 } 566 }
@@ -576,7 +576,7 @@ static int cell_reg_setup(struct op_counter_config *ctr,
576 if (unlikely(pm_rtas_token == RTAS_UNKNOWN_SERVICE)) { 576 if (unlikely(pm_rtas_token == RTAS_UNKNOWN_SERVICE)) {
577 printk(KERN_ERR 577 printk(KERN_ERR
578 "%s: rtas token ibm,cbe-perftools unknown\n", 578 "%s: rtas token ibm,cbe-perftools unknown\n",
579 __FUNCTION__); 579 __func__);
580 return -EIO; 580 return -EIO;
581 } 581 }
582 582
@@ -853,7 +853,7 @@ static int pm_rtas_activate_spu_profiling(u32 node)
853 853
854 if (unlikely(ret)) { 854 if (unlikely(ret)) {
855 printk(KERN_WARNING "%s: rtas returned: %d\n", 855 printk(KERN_WARNING "%s: rtas returned: %d\n",
856 __FUNCTION__, ret); 856 __func__, ret);
857 return -EIO; 857 return -EIO;
858 } 858 }
859 859
@@ -949,7 +949,7 @@ static int cell_global_start_spu(struct op_counter_config *ctr)
949 if (unlikely(ret != 0)) { 949 if (unlikely(ret != 0)) {
950 printk(KERN_ERR 950 printk(KERN_ERR
951 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", 951 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n",
952 __FUNCTION__, ret); 952 __func__, ret);
953 rtas_error = -EIO; 953 rtas_error = -EIO;
954 goto out; 954 goto out;
955 } 955 }
@@ -1061,7 +1061,7 @@ static void cell_global_stop_spu(void)
1061 if (unlikely(rtn_value != 0)) { 1061 if (unlikely(rtn_value != 0)) {
1062 printk(KERN_ERR 1062 printk(KERN_ERR
1063 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n", 1063 "%s: rtas call ibm,cbe-spu-perftools failed, return = %d\n",
1064 __FUNCTION__, rtn_value); 1064 __func__, rtn_value);
1065 } 1065 }
1066 1066
1067 /* Deactivate the signals */ 1067 /* Deactivate the signals */
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c
index 13d1345026da..ae2e7f67c18e 100644
--- a/arch/powerpc/platforms/40x/ep405.c
+++ b/arch/powerpc/platforms/40x/ep405.c
@@ -29,6 +29,7 @@
29#include <asm/time.h> 29#include <asm/time.h>
30#include <asm/uic.h> 30#include <asm/uic.h>
31#include <asm/pci-bridge.h> 31#include <asm/pci-bridge.h>
32#include <asm/ppc4xx.h>
32 33
33static struct device_node *bcsr_node; 34static struct device_node *bcsr_node;
34static void __iomem *bcsr_regs; 35static void __iomem *bcsr_regs;
@@ -119,5 +120,6 @@ define_machine(ep405) {
119 .progress = udbg_progress, 120 .progress = udbg_progress,
120 .init_IRQ = uic_init_tree, 121 .init_IRQ = uic_init_tree,
121 .get_irq = uic_get_irq, 122 .get_irq = uic_get_irq,
123 .restart = ppc4xx_reset_system,
122 .calibrate_decr = generic_calibrate_decr, 124 .calibrate_decr = generic_calibrate_decr,
123}; 125};
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c
index f9206a7fede0..1dd24ffc0dc1 100644
--- a/arch/powerpc/platforms/40x/kilauea.c
+++ b/arch/powerpc/platforms/40x/kilauea.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Kilauea board specific routines 2 * Kilauea board specific routines
3 * 3 *
4 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de> 4 * Copyright 2007-2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 * 5 *
6 * Based on the Walnut code by 6 * Based on the Walnut code by
7 * Josh Boyer <jwboyer@linux.vnet.ibm.com> 7 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
@@ -20,6 +20,7 @@
20#include <asm/time.h> 20#include <asm/time.h>
21#include <asm/uic.h> 21#include <asm/uic.h>
22#include <asm/pci-bridge.h> 22#include <asm/pci-bridge.h>
23#include <asm/ppc4xx.h>
23 24
24static __initdata struct of_device_id kilauea_of_bus[] = { 25static __initdata struct of_device_id kilauea_of_bus[] = {
25 { .compatible = "ibm,plb4", }, 26 { .compatible = "ibm,plb4", },
@@ -54,5 +55,6 @@ define_machine(kilauea) {
54 .progress = udbg_progress, 55 .progress = udbg_progress,
55 .init_IRQ = uic_init_tree, 56 .init_IRQ = uic_init_tree,
56 .get_irq = uic_get_irq, 57 .get_irq = uic_get_irq,
58 .restart = ppc4xx_reset_system,
57 .calibrate_decr = generic_calibrate_decr, 59 .calibrate_decr = generic_calibrate_decr,
58}; 60};
diff --git a/arch/powerpc/platforms/40x/makalu.c b/arch/powerpc/platforms/40x/makalu.c
index 4e4df72fc9cd..a6a1d6017b71 100644
--- a/arch/powerpc/platforms/40x/makalu.c
+++ b/arch/powerpc/platforms/40x/makalu.c
@@ -20,6 +20,7 @@
20#include <asm/time.h> 20#include <asm/time.h>
21#include <asm/uic.h> 21#include <asm/uic.h>
22#include <asm/pci-bridge.h> 22#include <asm/pci-bridge.h>
23#include <asm/ppc4xx.h>
23 24
24static __initdata struct of_device_id makalu_of_bus[] = { 25static __initdata struct of_device_id makalu_of_bus[] = {
25 { .compatible = "ibm,plb4", }, 26 { .compatible = "ibm,plb4", },
@@ -54,5 +55,6 @@ define_machine(makalu) {
54 .progress = udbg_progress, 55 .progress = udbg_progress,
55 .init_IRQ = uic_init_tree, 56 .init_IRQ = uic_init_tree,
56 .get_irq = uic_get_irq, 57 .get_irq = uic_get_irq,
58 .restart = ppc4xx_reset_system,
57 .calibrate_decr = generic_calibrate_decr, 59 .calibrate_decr = generic_calibrate_decr,
58}; 60};
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index 0422590040db..fc7fb001276c 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -14,6 +14,7 @@
14#include <asm/prom.h> 14#include <asm/prom.h>
15#include <asm/time.h> 15#include <asm/time.h>
16#include <asm/xilinx_intc.h> 16#include <asm/xilinx_intc.h>
17#include <asm/ppc4xx.h>
17 18
18static struct of_device_id xilinx_of_bus_ids[] __initdata = { 19static struct of_device_id xilinx_of_bus_ids[] __initdata = {
19 { .compatible = "xlnx,plb-v46-1.00.a", }, 20 { .compatible = "xlnx,plb-v46-1.00.a", },
@@ -48,5 +49,6 @@ define_machine(virtex) {
48 .probe = virtex_probe, 49 .probe = virtex_probe,
49 .init_IRQ = xilinx_intc_init_tree, 50 .init_IRQ = xilinx_intc_init_tree,
50 .get_irq = xilinx_intc_get_irq, 51 .get_irq = xilinx_intc_get_irq,
52 .restart = ppc4xx_reset_system,
51 .calibrate_decr = generic_calibrate_decr, 53 .calibrate_decr = generic_calibrate_decr,
52}; 54};
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index b8b257efeb77..335df91fbee5 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -26,6 +26,7 @@
26#include <asm/time.h> 26#include <asm/time.h>
27#include <asm/uic.h> 27#include <asm/uic.h>
28#include <asm/pci-bridge.h> 28#include <asm/pci-bridge.h>
29#include <asm/ppc4xx.h>
29 30
30static __initdata struct of_device_id walnut_of_bus[] = { 31static __initdata struct of_device_id walnut_of_bus[] = {
31 { .compatible = "ibm,plb3", }, 32 { .compatible = "ibm,plb3", },
@@ -61,5 +62,6 @@ define_machine(walnut) {
61 .progress = udbg_progress, 62 .progress = udbg_progress,
62 .init_IRQ = uic_init_tree, 63 .init_IRQ = uic_init_tree,
63 .get_irq = uic_get_irq, 64 .get_irq = uic_get_irq,
64 .calibrate_decr = generic_calibrate_decr, 65 .restart = ppc4xx_reset_system,
66 .calibrate_decr = generic_calibrate_decr,
65}; 67};
diff --git a/arch/powerpc/platforms/44x/44x.h b/arch/powerpc/platforms/44x/44x.h
index 42eabf87fea3..dbc4d2b4301a 100644
--- a/arch/powerpc/platforms/44x/44x.h
+++ b/arch/powerpc/platforms/44x/44x.h
@@ -3,6 +3,5 @@
3 3
4extern u8 as1_readb(volatile u8 __iomem *addr); 4extern u8 as1_readb(volatile u8 __iomem *addr);
5extern void as1_writeb(u8 data, volatile u8 __iomem *addr); 5extern void as1_writeb(u8 data, volatile u8 __iomem *addr);
6extern void ppc44x_reset_system(char *cmd);
7 6
8#endif /* __POWERPC_PLATFORMS_44X_44X_H */ 7#endif /* __POWERPC_PLATFORMS_44X_44X_H */
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 1bfb2191010a..6abe91357eee 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -67,6 +67,25 @@ config WARP
67 See http://www.pikatechnologies.com/ and follow the "PIKA for Computer 67 See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
68 Telephony Developers" link for more information. 68 Telephony Developers" link for more information.
69 69
70config CANYONLANDS
71 bool "Canyonlands"
72 depends on 44x
73 default n
74 select 460EX
75 select PCI
76 select PPC4xx_PCI_EXPRESS
77 help
78 This option enables support for the AMCC PPC460EX evaluation board.
79
80config YOSEMITE
81 bool "Yosemite"
82 depends on 44x
83 default n
84 select 440EP
85 select PCI
86 help
87 This option enables support for the AMCC PPC440EP evaluation board.
88
70#config LUAN 89#config LUAN
71# bool "Luan" 90# bool "Luan"
72# depends on 44x 91# depends on 44x
@@ -122,6 +141,14 @@ config 440SPe
122 bool 141 bool
123 select IBM_NEW_EMAC_EMAC4 142 select IBM_NEW_EMAC_EMAC4
124 143
144config 460EX
145 bool
146 select PPC_FPU
147 select IBM_NEW_EMAC_EMAC4
148 select IBM_NEW_EMAC_RGMII
149 select IBM_NEW_EMAC_ZMII
150 select IBM_NEW_EMAC_TAH
151
125# 44x errata/workaround config symbols, selected by the CPU models above 152# 44x errata/workaround config symbols, selected by the CPU models above
126config IBM440EP_ERR42 153config IBM440EP_ERR42
127 bool 154 bool
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile
index 0864d4f1cbc2..774165f9acdd 100644
--- a/arch/powerpc/platforms/44x/Makefile
+++ b/arch/powerpc/platforms/44x/Makefile
@@ -1,9 +1,11 @@
1obj-$(CONFIG_44x) := misc_44x.o 1obj-$(CONFIG_44x) := misc_44x.o idle.o
2obj-$(CONFIG_EBONY) += ebony.o 2obj-$(CONFIG_EBONY) += ebony.o
3obj-$(CONFIG_TAISHAN) += taishan.o 3obj-$(CONFIG_TAISHAN) += taishan.o
4obj-$(CONFIG_BAMBOO) += bamboo.o 4obj-$(CONFIG_BAMBOO) += bamboo.o
5obj-$(CONFIG_YOSEMITE) += bamboo.o
5obj-$(CONFIG_SEQUOIA) += sequoia.o 6obj-$(CONFIG_SEQUOIA) += sequoia.o
6obj-$(CONFIG_KATMAI) += katmai.o 7obj-$(CONFIG_KATMAI) += katmai.o
7obj-$(CONFIG_RAINIER) += rainier.o 8obj-$(CONFIG_RAINIER) += rainier.o
8obj-$(CONFIG_WARP) += warp.o 9obj-$(CONFIG_WARP) += warp.o
9obj-$(CONFIG_WARP) += warp-nand.o 10obj-$(CONFIG_WARP) += warp-nand.o
11obj-$(CONFIG_CANYONLANDS) += canyonlands.o
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index fb9a22a7e8d0..cef169e95156 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -22,8 +22,7 @@
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h> 24#include <asm/pci-bridge.h>
25 25#include <asm/ppc4xx.h>
26#include "44x.h"
27 26
28static __initdata struct of_device_id bamboo_of_bus[] = { 27static __initdata struct of_device_id bamboo_of_bus[] = {
29 { .compatible = "ibm,plb4", }, 28 { .compatible = "ibm,plb4", },
@@ -53,11 +52,11 @@ static int __init bamboo_probe(void)
53} 52}
54 53
55define_machine(bamboo) { 54define_machine(bamboo) {
56 .name = "Bamboo", 55 .name = "Bamboo",
57 .probe = bamboo_probe, 56 .probe = bamboo_probe,
58 .progress = udbg_progress, 57 .progress = udbg_progress,
59 .init_IRQ = uic_init_tree, 58 .init_IRQ = uic_init_tree,
60 .get_irq = uic_get_irq, 59 .get_irq = uic_get_irq,
61 .restart = ppc44x_reset_system, 60 .restart = ppc4xx_reset_system,
62 .calibrate_decr = generic_calibrate_decr, 61 .calibrate_decr = generic_calibrate_decr,
63}; 62};
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c
new file mode 100644
index 000000000000..3949289f51df
--- /dev/null
+++ b/arch/powerpc/platforms/44x/canyonlands.c
@@ -0,0 +1,63 @@
1/*
2 * Canyonlands board specific routines
3 *
4 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * Based on the Katmai code by
7 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
8 * Copyright 2007 IBM Corp.
9 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
10 * Copyright 2007 IBM Corporation
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#include <linux/init.h>
18#include <linux/of_platform.h>
19
20#include <asm/machdep.h>
21#include <asm/prom.h>
22#include <asm/udbg.h>
23#include <asm/time.h>
24#include <asm/uic.h>
25#include <asm/pci-bridge.h>
26#include <asm/ppc4xx.h>
27
28static __initdata struct of_device_id canyonlands_of_bus[] = {
29 { .compatible = "ibm,plb4", },
30 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", },
32 {},
33};
34
35static int __init canyonlands_device_probe(void)
36{
37 of_platform_bus_probe(NULL, canyonlands_of_bus, NULL);
38
39 return 0;
40}
41machine_device_initcall(canyonlands, canyonlands_device_probe);
42
43static int __init canyonlands_probe(void)
44{
45 unsigned long root = of_get_flat_dt_root();
46
47 if (!of_flat_dt_is_compatible(root, "amcc,canyonlands"))
48 return 0;
49
50 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
51
52 return 1;
53}
54
55define_machine(canyonlands) {
56 .name = "Canyonlands",
57 .probe = canyonlands_probe,
58 .progress = udbg_progress,
59 .init_IRQ = uic_init_tree,
60 .get_irq = uic_get_irq,
61 .restart = ppc4xx_reset_system,
62 .calibrate_decr = generic_calibrate_decr,
63};
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 1a8d467bff85..a0e8fe4662f6 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -26,8 +26,7 @@
26#include <asm/time.h> 26#include <asm/time.h>
27#include <asm/uic.h> 27#include <asm/uic.h>
28#include <asm/pci-bridge.h> 28#include <asm/pci-bridge.h>
29 29#include <asm/ppc4xx.h>
30#include "44x.h"
31 30
32static __initdata struct of_device_id ebony_of_bus[] = { 31static __initdata struct of_device_id ebony_of_bus[] = {
33 { .compatible = "ibm,plb4", }, 32 { .compatible = "ibm,plb4", },
@@ -66,6 +65,6 @@ define_machine(ebony) {
66 .progress = udbg_progress, 65 .progress = udbg_progress,
67 .init_IRQ = uic_init_tree, 66 .init_IRQ = uic_init_tree,
68 .get_irq = uic_get_irq, 67 .get_irq = uic_get_irq,
69 .restart = ppc44x_reset_system, 68 .restart = ppc4xx_reset_system,
70 .calibrate_decr = generic_calibrate_decr, 69 .calibrate_decr = generic_calibrate_decr,
71}; 70};
diff --git a/arch/powerpc/platforms/44x/idle.c b/arch/powerpc/platforms/44x/idle.c
new file mode 100644
index 000000000000..7a81f921fef9
--- /dev/null
+++ b/arch/powerpc/platforms/44x/idle.c
@@ -0,0 +1,67 @@
1/*
2 * Copyright 2008 IBM Corp.
3 *
4 * Based on arch/powerpc/platforms/pasemi/idle.c:
5 * Copyright (C) 2006-2007 PA Semi, Inc
6 *
7 * Added by: Jerone Young <jyoung5@us.ibm.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#include <linux/of.h>
25#include <linux/kernel.h>
26#include <asm/machdep.h>
27
28static int mode_spin;
29
30static void ppc44x_idle(void)
31{
32 unsigned long msr_save;
33
34 msr_save = mfmsr();
35 /* set wait state MSR */
36 mtmsr(msr_save|MSR_WE|MSR_EE|MSR_CE|MSR_DE);
37 isync();
38 /* return to initial state */
39 mtmsr(msr_save);
40 isync();
41}
42
43int __init ppc44x_idle_init(void)
44{
45 if (!mode_spin) {
46 /* If we are not setting spin mode
47 then we set to wait mode */
48 ppc_md.power_save = &ppc44x_idle;
49 }
50
51 return 0;
52}
53
54arch_initcall(ppc44x_idle_init);
55
56static int __init idle_param(char *p)
57{
58
59 if (!strcmp("spin", p)) {
60 mode_spin = 1;
61 ppc_md.power_save = NULL;
62 }
63
64 return 0;
65}
66
67early_param("idle", idle_param);
diff --git a/arch/powerpc/platforms/44x/katmai.c b/arch/powerpc/platforms/44x/katmai.c
index 11134121f272..44f4b3a00ced 100644
--- a/arch/powerpc/platforms/44x/katmai.c
+++ b/arch/powerpc/platforms/44x/katmai.c
@@ -22,8 +22,7 @@
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h> 24#include <asm/pci-bridge.h>
25 25#include <asm/ppc4xx.h>
26#include "44x.h"
27 26
28static __initdata struct of_device_id katmai_of_bus[] = { 27static __initdata struct of_device_id katmai_of_bus[] = {
29 { .compatible = "ibm,plb4", }, 28 { .compatible = "ibm,plb4", },
@@ -58,6 +57,6 @@ define_machine(katmai) {
58 .progress = udbg_progress, 57 .progress = udbg_progress,
59 .init_IRQ = uic_init_tree, 58 .init_IRQ = uic_init_tree,
60 .get_irq = uic_get_irq, 59 .get_irq = uic_get_irq,
61 .restart = ppc44x_reset_system, 60 .restart = ppc4xx_reset_system,
62 .calibrate_decr = generic_calibrate_decr, 61 .calibrate_decr = generic_calibrate_decr,
63}; 62};
diff --git a/arch/powerpc/platforms/44x/misc_44x.S b/arch/powerpc/platforms/44x/misc_44x.S
index 3bce71d5d756..dc12b8009e48 100644
--- a/arch/powerpc/platforms/44x/misc_44x.S
+++ b/arch/powerpc/platforms/44x/misc_44x.S
@@ -44,14 +44,3 @@ _GLOBAL(as1_writeb)
44 sync 44 sync
45 isync 45 isync
46 blr 46 blr
47
48/*
49 * void ppc44x_reset_system(char *cmd)
50 *
51 * At present, this routine just applies a system reset.
52 */
53_GLOBAL(ppc44x_reset_system)
54 mfspr r13,SPRN_DBCR0
55 oris r13,r13,DBCR0_RST_SYSTEM@h
56 mtspr SPRN_DBCR0,r13
57 b . /* Just in case the reset doesn't work */
diff --git a/arch/powerpc/platforms/44x/rainier.c b/arch/powerpc/platforms/44x/rainier.c
index a7fae1cf69c1..4f1ff84c4b63 100644
--- a/arch/powerpc/platforms/44x/rainier.c
+++ b/arch/powerpc/platforms/44x/rainier.c
@@ -22,7 +22,7 @@
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h> 24#include <asm/pci-bridge.h>
25#include "44x.h" 25#include <asm/ppc4xx.h>
26 26
27static __initdata struct of_device_id rainier_of_bus[] = { 27static __initdata struct of_device_id rainier_of_bus[] = {
28 { .compatible = "ibm,plb4", }, 28 { .compatible = "ibm,plb4", },
@@ -57,6 +57,6 @@ define_machine(rainier) {
57 .progress = udbg_progress, 57 .progress = udbg_progress,
58 .init_IRQ = uic_init_tree, 58 .init_IRQ = uic_init_tree,
59 .get_irq = uic_get_irq, 59 .get_irq = uic_get_irq,
60 .restart = ppc44x_reset_system, 60 .restart = ppc4xx_reset_system,
61 .calibrate_decr = generic_calibrate_decr, 61 .calibrate_decr = generic_calibrate_decr,
62}; 62};
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index d279db42c896..49eb73daacdf 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -23,7 +23,7 @@
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h> 24#include <asm/pci-bridge.h>
25 25
26#include "44x.h" 26#include <asm/ppc4xx.h>
27 27
28static __initdata struct of_device_id sequoia_of_bus[] = { 28static __initdata struct of_device_id sequoia_of_bus[] = {
29 { .compatible = "ibm,plb4", }, 29 { .compatible = "ibm,plb4", },
@@ -58,6 +58,6 @@ define_machine(sequoia) {
58 .progress = udbg_progress, 58 .progress = udbg_progress,
59 .init_IRQ = uic_init_tree, 59 .init_IRQ = uic_init_tree,
60 .get_irq = uic_get_irq, 60 .get_irq = uic_get_irq,
61 .restart = ppc44x_reset_system, 61 .restart = ppc4xx_reset_system,
62 .calibrate_decr = generic_calibrate_decr, 62 .calibrate_decr = generic_calibrate_decr,
63}; 63};
diff --git a/arch/powerpc/platforms/44x/taishan.c b/arch/powerpc/platforms/44x/taishan.c
index 28ab7e2e02c3..49c78b2098b4 100644
--- a/arch/powerpc/platforms/44x/taishan.c
+++ b/arch/powerpc/platforms/44x/taishan.c
@@ -29,8 +29,7 @@
29#include <asm/time.h> 29#include <asm/time.h>
30#include <asm/uic.h> 30#include <asm/uic.h>
31#include <asm/pci-bridge.h> 31#include <asm/pci-bridge.h>
32 32#include <asm/ppc4xx.h>
33#include "44x.h"
34 33
35static __initdata struct of_device_id taishan_of_bus[] = { 34static __initdata struct of_device_id taishan_of_bus[] = {
36 { .compatible = "ibm,plb4", }, 35 { .compatible = "ibm,plb4", },
@@ -68,6 +67,6 @@ define_machine(taishan) {
68 .progress = udbg_progress, 67 .progress = udbg_progress,
69 .init_IRQ = uic_init_tree, 68 .init_IRQ = uic_init_tree,
70 .get_irq = uic_get_irq, 69 .get_irq = uic_get_irq,
71 .restart = ppc44x_reset_system, 70 .restart = ppc4xx_reset_system,
72 .calibrate_decr = generic_calibrate_decr, 71 .calibrate_decr = generic_calibrate_decr,
73}; 72};
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
index 84ab78ff8c03..9150318cfc56 100644
--- a/arch/powerpc/platforms/44x/warp-nand.c
+++ b/arch/powerpc/platforms/44x/warp-nand.c
@@ -11,6 +11,7 @@
11#include <linux/mtd/partitions.h> 11#include <linux/mtd/partitions.h>
12#include <linux/mtd/nand.h> 12#include <linux/mtd/nand.h>
13#include <linux/mtd/ndfc.h> 13#include <linux/mtd/ndfc.h>
14#include <asm/machdep.h>
14 15
15#ifdef CONFIG_MTD_NAND_NDFC 16#ifdef CONFIG_MTD_NAND_NDFC
16 17
@@ -100,6 +101,6 @@ static int warp_setup_nand_flash(void)
100 101
101 return 0; 102 return 0;
102} 103}
103device_initcall(warp_setup_nand_flash); 104machine_device_initcall(warp, warp_setup_nand_flash);
104 105
105#endif 106#endif
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index da5b7b7599db..39cf6150a72b 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -18,9 +18,7 @@
18#include <asm/udbg.h> 18#include <asm/udbg.h>
19#include <asm/time.h> 19#include <asm/time.h>
20#include <asm/uic.h> 20#include <asm/uic.h>
21 21#include <asm/ppc4xx.h>
22#include "44x.h"
23
24 22
25static __initdata struct of_device_id warp_of_bus[] = { 23static __initdata struct of_device_id warp_of_bus[] = {
26 { .compatible = "ibm,plb4", }, 24 { .compatible = "ibm,plb4", },
@@ -49,7 +47,7 @@ define_machine(warp) {
49 .progress = udbg_progress, 47 .progress = udbg_progress,
50 .init_IRQ = uic_init_tree, 48 .init_IRQ = uic_init_tree,
51 .get_irq = uic_get_irq, 49 .get_irq = uic_get_irq,
52 .restart = ppc44x_reset_system, 50 .restart = ppc4xx_reset_system,
53 .calibrate_decr = generic_calibrate_decr, 51 .calibrate_decr = generic_calibrate_decr,
54}; 52};
55 53
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 956f459e175c..6d584f4e3c9a 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -63,7 +63,7 @@ lite5200_fix_clock_config(void)
63 of_node_put(np); 63 of_node_put(np);
64 if (!cdm) { 64 if (!cdm) {
65 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", 65 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
66 __FUNCTION__); 66 __func__);
67 return; 67 return;
68 } 68 }
69 69
@@ -98,7 +98,7 @@ lite5200_fix_port_config(void)
98 of_node_put(np); 98 of_node_put(np);
99 if (!gpio) { 99 if (!gpio) {
100 printk(KERN_ERR "%s() failed. expect abnormal behavior\n", 100 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
101 __FUNCTION__); 101 __func__);
102 return; 102 return;
103 } 103 }
104 104
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index 4fad6c7bf9f1..917ac8891555 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -11,7 +11,6 @@ config MPC8272_ADS
11 select 8260 11 select 8260
12 select FSL_SOC 12 select FSL_SOC
13 select PQ2_ADS_PCI_PIC if PCI 13 select PQ2_ADS_PCI_PIC if PCI
14 select PPC_CPM_NEW_BINDING
15 help 14 help
16 This option enables support for the MPC8272 ADS board 15 This option enables support for the MPC8272 ADS board
17 16
@@ -22,7 +21,6 @@ config PQ2FADS
22 select 8260 21 select 8260
23 select FSL_SOC 22 select FSL_SOC
24 select PQ2_ADS_PCI_PIC if PCI 23 select PQ2_ADS_PCI_PIC if PCI
25 select PPC_CPM_NEW_BINDING
26 help 24 help
27 This option enables support for the PQ2FADS board 25 This option enables support for the PQ2FADS board
28 26
@@ -31,7 +29,6 @@ config EP8248E
31 select 8272 29 select 8272
32 select 8260 30 select 8260
33 select FSL_SOC 31 select FSL_SOC
34 select PPC_CPM_NEW_BINDING
35 select MDIO_BITBANG 32 select MDIO_BITBANG
36 help 33 help
37 This enables support for the Embedded Planet EP8248E board. 34 This enables support for the Embedded Planet EP8248E board.
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 2293ae51383d..c00356bdb1dd 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -46,6 +46,7 @@ static void __init mpc837x_rdb_setup_arch(void)
46static struct of_device_id mpc837x_ids[] = { 46static struct of_device_id mpc837x_ids[] = {
47 { .type = "soc", }, 47 { .type = "soc", },
48 { .compatible = "soc", }, 48 { .compatible = "soc", },
49 { .compatible = "simple-bus", },
49 {}, 50 {},
50}; 51};
51 52
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 68065e62fc3d..88a3b5cabb18 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -16,6 +16,7 @@
16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000 16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
17#define MPC8315_SCCR_USB_MASK 0x00c00000 17#define MPC8315_SCCR_USB_MASK 0x00c00000
18#define MPC8315_SCCR_USB_DRCM_11 0x00c00000 18#define MPC8315_SCCR_USB_DRCM_11 0x00c00000
19#define MPC8315_SCCR_USB_DRCM_01 0x00400000
19#define MPC837X_SCCR_USB_DRCM_11 0x00c00000 20#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
20 21
21/* system i/o configuration register low */ 22/* system i/o configuration register low */
@@ -37,6 +38,7 @@
37/* USB Control Register */ 38/* USB Control Register */
38#define FSL_USB2_CONTROL_OFFS 0x500 39#define FSL_USB2_CONTROL_OFFS 0x500
39#define CONTROL_UTMI_PHY_EN 0x00000200 40#define CONTROL_UTMI_PHY_EN 0x00000200
41#define CONTROL_REFSEL_24MHZ 0x00000040
40#define CONTROL_REFSEL_48MHZ 0x00000080 42#define CONTROL_REFSEL_48MHZ 0x00000080
41#define CONTROL_PHY_CLK_SEL_ULPI 0x00000400 43#define CONTROL_PHY_CLK_SEL_ULPI 0x00000400
42#define CONTROL_OTG_PORT 0x00000020 44#define CONTROL_OTG_PORT 0x00000020
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 471fdd8f4108..64bcf0a33c71 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -129,7 +129,7 @@ int mpc831x_usb_cfg(void)
129 if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) 129 if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
130 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, 130 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
131 MPC8315_SCCR_USB_MASK, 131 MPC8315_SCCR_USB_MASK,
132 MPC8315_SCCR_USB_DRCM_11); 132 MPC8315_SCCR_USB_DRCM_01);
133 else 133 else
134 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, 134 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
135 MPC83XX_SCCR_USB_MASK, 135 MPC83XX_SCCR_USB_MASK,
@@ -164,9 +164,15 @@ int mpc831x_usb_cfg(void)
164 /* Using on-chip PHY */ 164 /* Using on-chip PHY */
165 if (prop && (!strcmp(prop, "utmi_wide") || 165 if (prop && (!strcmp(prop, "utmi_wide") ||
166 !strcmp(prop, "utmi"))) { 166 !strcmp(prop, "utmi"))) {
167 /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ 167 u32 refsel;
168
169 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
170 refsel = CONTROL_REFSEL_24MHZ;
171 else
172 refsel = CONTROL_REFSEL_48MHZ;
173 /* Set UTMI_PHY_EN and REFSEL */
168 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, 174 out_be32(usb_regs + FSL_USB2_CONTROL_OFFS,
169 CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); 175 CONTROL_UTMI_PHY_EN | refsel);
170 /* Using external UPLI PHY */ 176 /* Using external UPLI PHY */
171 } else if (prop && !strcmp(prop, "ulpi")) { 177 } else if (prop && !strcmp(prop, "ulpi")) {
172 /* Set PHY_CLK_SEL to ULPI */ 178 /* Set PHY_CLK_SEL to ULPI */
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 7e76ddbd5821..7ff29d53dc2d 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -19,7 +19,6 @@ config MPC8540_ADS
19config MPC8560_ADS 19config MPC8560_ADS
20 bool "Freescale MPC8560 ADS" 20 bool "Freescale MPC8560 ADS"
21 select DEFAULT_UIMAGE 21 select DEFAULT_UIMAGE
22 select PPC_CPM_NEW_BINDING
23 select CPM2 22 select CPM2
24 help 23 help
25 This option enables support for the MPC 8560 ADS board 24 This option enables support for the MPC 8560 ADS board
@@ -46,6 +45,12 @@ config MPC85xx_DS
46 help 45 help
47 This option enables support for the MPC85xx DS (MPC8544 DS) board 46 This option enables support for the MPC85xx DS (MPC8544 DS) board
48 47
48config KSI8560
49 bool "Emerson KSI8560"
50 select DEFAULT_UIMAGE
51 help
52 This option enables support for the Emerson KSI8560 board
53
49config STX_GP3 54config STX_GP3
50 bool "Silicon Turnkey Express GP3" 55 bool "Silicon Turnkey Express GP3"
51 help 56 help
@@ -53,14 +58,12 @@ config STX_GP3
53 board. 58 board.
54 select CPM2 59 select CPM2
55 select DEFAULT_UIMAGE 60 select DEFAULT_UIMAGE
56 select PPC_CPM_NEW_BINDING
57 61
58config TQM8540 62config TQM8540
59 bool "TQ Components TQM8540" 63 bool "TQ Components TQM8540"
60 help 64 help
61 This option enables support for the TQ Components TQM8540 board. 65 This option enables support for the TQ Components TQM8540 board.
62 select DEFAULT_UIMAGE 66 select DEFAULT_UIMAGE
63 select PPC_CPM_NEW_BINDING
64 select TQM85xx 67 select TQM85xx
65 68
66config TQM8541 69config TQM8541
@@ -68,7 +71,6 @@ config TQM8541
68 help 71 help
69 This option enables support for the TQ Components TQM8541 board. 72 This option enables support for the TQ Components TQM8541 board.
70 select DEFAULT_UIMAGE 73 select DEFAULT_UIMAGE
71 select PPC_CPM_NEW_BINDING
72 select TQM85xx 74 select TQM85xx
73 select CPM2 75 select CPM2
74 76
@@ -77,7 +79,6 @@ config TQM8555
77 help 79 help
78 This option enables support for the TQ Components TQM8555 board. 80 This option enables support for the TQ Components TQM8555 board.
79 select DEFAULT_UIMAGE 81 select DEFAULT_UIMAGE
80 select PPC_CPM_NEW_BINDING
81 select TQM85xx 82 select TQM85xx
82 select CPM2 83 select CPM2
83 84
@@ -86,7 +87,6 @@ config TQM8560
86 help 87 help
87 This option enables support for the TQ Components TQM8560 board. 88 This option enables support for the TQ Components TQM8560 board.
88 select DEFAULT_UIMAGE 89 select DEFAULT_UIMAGE
89 select PPC_CPM_NEW_BINDING
90 select TQM85xx 90 select TQM85xx
91 select CPM2 91 select CPM2
92 92
@@ -99,7 +99,6 @@ config SBC8548
99config SBC8560 99config SBC8560
100 bool "Wind River SBC8560" 100 bool "Wind River SBC8560"
101 select DEFAULT_UIMAGE 101 select DEFAULT_UIMAGE
102 select PPC_CPM_NEW_BINDING if CPM2
103 help 102 help
104 This option enables support for the Wind River SBC8560 board 103 This option enables support for the Wind River SBC8560 board
105 104
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index cb7af4ebd75f..6cea185f62b2 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_STX_GP3) += stx_gp3.o
10obj-$(CONFIG_TQM85xx) += tqm85xx.o 10obj-$(CONFIG_TQM85xx) += tqm85xx.o
11obj-$(CONFIG_SBC8560) += sbc8560.o 11obj-$(CONFIG_SBC8560) += sbc8560.o
12obj-$(CONFIG_SBC8548) += sbc8548.o 12obj-$(CONFIG_SBC8548) += sbc8548.o
13obj-$(CONFIG_KSI8560) += ksi8560.o
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
new file mode 100644
index 000000000000..2145adeb220c
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -0,0 +1,257 @@
1/*
2 * Board setup routines for the Emerson KSI8560
3 *
4 * Author: Alexandr Smirnov <asmirnov@ru.mvista.com>
5 *
6 * Based on mpc85xx_ads.c maintained by Kumar Gala
7 *
8 * 2008 (c) MontaVista, Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 *
13 */
14
15#include <linux/stddef.h>
16#include <linux/kernel.h>
17#include <linux/pci.h>
18#include <linux/kdev_t.h>
19#include <linux/delay.h>
20#include <linux/seq_file.h>
21#include <linux/of_platform.h>
22
23#include <asm/system.h>
24#include <asm/time.h>
25#include <asm/machdep.h>
26#include <asm/pci-bridge.h>
27#include <asm/mpic.h>
28#include <mm/mmu_decl.h>
29#include <asm/udbg.h>
30#include <asm/prom.h>
31
32#include <sysdev/fsl_soc.h>
33#include <sysdev/fsl_pci.h>
34
35#include <asm/cpm2.h>
36#include <sysdev/cpm2_pic.h>
37
38
39#define KSI8560_CPLD_HVR 0x04 /* Hardware Version Register */
40#define KSI8560_CPLD_PVR 0x08 /* PLD Version Register */
41#define KSI8560_CPLD_RCR1 0x30 /* Reset Command Register 1 */
42
43#define KSI8560_CPLD_RCR1_CPUHR 0x80 /* CPU Hard Reset */
44
45static void __iomem *cpld_base = NULL;
46
47static void machine_restart(char *cmd)
48{
49 if (cpld_base)
50 out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR);
51 else
52 printk(KERN_ERR "Can't find CPLD base, hang forever\n");
53
54 for (;;);
55}
56
57static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
58{
59 int cascade_irq;
60
61 while ((cascade_irq = cpm2_get_irq()) >= 0)
62 generic_handle_irq(cascade_irq);
63
64 desc->chip->eoi(irq);
65}
66
67static void __init ksi8560_pic_init(void)
68{
69 struct mpic *mpic;
70 struct resource r;
71 struct device_node *np;
72#ifdef CONFIG_CPM2
73 int irq;
74#endif
75
76 np = of_find_node_by_type(NULL, "open-pic");
77
78 if (np == NULL) {
79 printk(KERN_ERR "Could not find open-pic node\n");
80 return;
81 }
82
83 if (of_address_to_resource(np, 0, &r)) {
84 printk(KERN_ERR "Could not map mpic register space\n");
85 of_node_put(np);
86 return;
87 }
88
89 mpic = mpic_alloc(np, r.start,
90 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
91 0, 256, " OpenPIC ");
92 BUG_ON(mpic == NULL);
93 of_node_put(np);
94
95 mpic_init(mpic);
96
97#ifdef CONFIG_CPM2
98 /* Setup CPM2 PIC */
99 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
100 if (np == NULL) {
101 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
102 return;
103 }
104 irq = irq_of_parse_and_map(np, 0);
105
106 cpm2_pic_init(np);
107 of_node_put(np);
108 set_irq_chained_handler(irq, cpm2_cascade);
109
110 setup_irq(0, NULL);
111#endif
112}
113
114#ifdef CONFIG_CPM2
115/*
116 * Setup I/O ports
117 */
118struct cpm_pin {
119 int port, pin, flags;
120};
121
122static struct cpm_pin __initdata ksi8560_pins[] = {
123 /* SCC1 */
124 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
125 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
126 {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
127
128 /* SCC2 */
129 {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
130 {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
131 {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
132
133 /* FCC1 */
134 {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
135 {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
136 {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
137 {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
138 {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
139 {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
140 {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
141 {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
142 {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
143 {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
144 {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
145 {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
146 {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
147 {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
148 {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK9 */
149 {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK10 */
150
151};
152
153static void __init init_ioports(void)
154{
155 int i;
156
157 for (i = 0; i < ARRAY_SIZE(ksi8560_pins); i++) {
158 struct cpm_pin *pin = &ksi8560_pins[i];
159 cpm2_set_pin(pin->port, pin->pin, pin->flags);
160 }
161
162 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
163 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
164 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX);
165 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX);
166 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_RX);
167 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX);
168}
169#endif
170
171/*
172 * Setup the architecture
173 */
174static void __init ksi8560_setup_arch(void)
175{
176 struct device_node *cpld;
177
178 cpld = of_find_compatible_node(NULL, NULL, "emerson,KSI8560-cpld");
179 if (cpld)
180 cpld_base = of_iomap(cpld, 0);
181 else
182 printk(KERN_ERR "Can't find CPLD in device tree\n");
183
184 if (ppc_md.progress)
185 ppc_md.progress("ksi8560_setup_arch()", 0);
186
187#ifdef CONFIG_CPM2
188 cpm2_reset();
189 init_ioports();
190#endif
191}
192
193static void ksi8560_show_cpuinfo(struct seq_file *m)
194{
195 uint pvid, svid, phid1;
196 uint memsize = total_memory;
197
198 pvid = mfspr(SPRN_PVR);
199 svid = mfspr(SPRN_SVR);
200
201 seq_printf(m, "Vendor\t\t: Emerson Network Power\n");
202 seq_printf(m, "Board\t\t: KSI8560\n");
203
204 if (cpld_base) {
205 seq_printf(m, "Hardware rev\t: %d\n",
206 in_8(cpld_base + KSI8560_CPLD_HVR));
207 seq_printf(m, "CPLD rev\t: %d\n",
208 in_8(cpld_base + KSI8560_CPLD_PVR));
209 } else
210 seq_printf(m, "Unknown Hardware and CPLD revs\n");
211
212 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
213 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
214
215 /* Display cpu Pll setting */
216 phid1 = mfspr(SPRN_HID1);
217 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
218
219 /* Display the amount of memory */
220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
221}
222
223static struct of_device_id __initdata of_bus_ids[] = {
224 { .type = "soc", },
225 { .name = "cpm", },
226 { .name = "localbus", },
227 {},
228};
229
230static int __init declare_of_platform_devices(void)
231{
232 of_platform_bus_probe(NULL, of_bus_ids, NULL);
233
234 return 0;
235}
236machine_device_initcall(ksi8560, declare_of_platform_devices);
237
238/*
239 * Called very early, device-tree isn't unflattened
240 */
241static int __init ksi8560_probe(void)
242{
243 unsigned long root = of_get_flat_dt_root();
244
245 return of_flat_dt_is_compatible(root, "emerson,KSI8560");
246}
247
248define_machine(ksi8560) {
249 .name = "KSI8560",
250 .probe = ksi8560_probe,
251 .setup_arch = ksi8560_setup_arch,
252 .init_IRQ = ksi8560_pic_init,
253 .show_cpuinfo = ksi8560_show_cpuinfo,
254 .get_irq = mpic_get_irq,
255 .restart = machine_restart,
256 .calibrate_decr = generic_calibrate_decr,
257};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 4e0305096114..3582c841844b 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -165,7 +165,7 @@ static void __init init_ioports(void)
165 int i; 165 int i;
166 166
167 for (i = 0; i < ARRAY_SIZE(mpc8560_ads_pins); i++) { 167 for (i = 0; i < ARRAY_SIZE(mpc8560_ads_pins); i++) {
168 struct cpm_pin *pin = &mpc8560_ads_pins[i]; 168 const struct cpm_pin *pin = &mpc8560_ads_pins[i];
169 cpm2_set_pin(pin->port, pin->pin, pin->flags); 169 cpm2_set_pin(pin->port, pin->pin, pin->flags);
170 } 170 }
171 171
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index bdb3d0b38cd2..dfd8b4ad9b28 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -19,6 +19,7 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/of_platform.h>
22 23
23#include <asm/system.h> 24#include <asm/system.h>
24#include <asm/time.h> 25#include <asm/time.h>
@@ -36,7 +37,7 @@
36#undef DEBUG 37#undef DEBUG
37 38
38#ifdef DEBUG 39#ifdef DEBUG
39#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) 40#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
40#else 41#else
41#define DBG(fmt, args...) 42#define DBG(fmt, args...)
42#endif 43#endif
@@ -183,6 +184,18 @@ static int __init mpc8544_ds_probe(void)
183 } 184 }
184} 185}
185 186
187static struct of_device_id mpc85xxds_ids[] = {
188 { .type = "soc", },
189 { .compatible = "soc", },
190 {},
191};
192
193static int __init mpc85xxds_publish_devices(void)
194{
195 return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL);
196}
197machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);
198
186/* 199/*
187 * Called very early, device-tree isn't unflattened 200 * Called very early, device-tree isn't unflattened
188 */ 201 */
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 21d113536b86..7442c58d44f5 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -11,6 +11,12 @@ config MPC8641_HPCN
11 help 11 help
12 This option enables support for the MPC8641 HPCN board. 12 This option enables support for the MPC8641 HPCN board.
13 13
14config SBC8641D
15 bool "Wind River SBC8641D"
16 select DEFAULT_UIMAGE
17 help
18 This option enables support for the WRS SBC8641D board.
19
14config MPC8610_HPCD 20config MPC8610_HPCD
15 bool "Freescale MPC8610 HPCD" 21 bool "Freescale MPC8610 HPCD"
16 select DEFAULT_UIMAGE 22 select DEFAULT_UIMAGE
@@ -24,7 +30,7 @@ config MPC8641
24 select FSL_PCI if PCI 30 select FSL_PCI if PCI
25 select PPC_UDBG_16550 31 select PPC_UDBG_16550
26 select MPIC 32 select MPIC
27 default y if MPC8641_HPCN 33 default y if MPC8641_HPCN || SBC8641D
28 34
29config MPC8610 35config MPC8610
30 bool 36 bool
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index c96706327eaa..1b9b4a9b2525 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -4,4 +4,5 @@
4 4
5obj-$(CONFIG_SMP) += mpc86xx_smp.o 5obj-$(CONFIG_SMP) += mpc86xx_smp.o
6obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o 6obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o
7obj-$(CONFIG_SBC8641D) += sbc8641d.o
7obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o 8obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 0b07485641fe..18b8ebe930d5 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -52,7 +52,7 @@ static int __init mpc8610_declare_of_platform_devices(void)
52} 52}
53machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); 53machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
54 54
55void __init 55static void __init
56mpc86xx_hpcd_init_irq(void) 56mpc86xx_hpcd_init_irq(void)
57{ 57{
58 struct mpic *mpic1; 58 struct mpic *mpic1;
@@ -200,7 +200,7 @@ static int __init mpc86xx_hpcd_probe(void)
200 return 0; 200 return 0;
201} 201}
202 202
203long __init 203static long __init
204mpc86xx_time_init(void) 204mpc86xx_time_init(void)
205{ 205{
206 unsigned int temp; 206 unsigned int temp;
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index cfbe8c52e263..f947f555fd46 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -55,7 +55,7 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
55} 55}
56#endif /* CONFIG_PCI */ 56#endif /* CONFIG_PCI */
57 57
58void __init 58static void __init
59mpc86xx_hpcn_init_irq(void) 59mpc86xx_hpcn_init_irq(void)
60{ 60{
61 struct mpic *mpic1; 61 struct mpic *mpic1;
@@ -162,7 +162,7 @@ mpc86xx_hpcn_setup_arch(void)
162} 162}
163 163
164 164
165void 165static void
166mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) 166mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
167{ 167{
168 struct device_node *root; 168 struct device_node *root;
@@ -190,13 +190,19 @@ static int __init mpc86xx_hpcn_probe(void)
190{ 190{
191 unsigned long root = of_get_flat_dt_root(); 191 unsigned long root = of_get_flat_dt_root();
192 192
193 if (of_flat_dt_is_compatible(root, "mpc86xx")) 193 if (of_flat_dt_is_compatible(root, "fsl,mpc8641hpcn"))
194 return 1; /* Looks good */ 194 return 1; /* Looks good */
195 195
196 /* Be nice and don't give silent boot death. Delete this in 2.6.27 */
197 if (of_flat_dt_is_compatible(root, "mpc86xx")) {
198 pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n");
199 return 1;
200 }
201
196 return 0; 202 return 0;
197} 203}
198 204
199long __init 205static long __init
200mpc86xx_time_init(void) 206mpc86xx_time_init(void)
201{ 207{
202 unsigned int temp; 208 unsigned int temp;
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c
new file mode 100644
index 000000000000..510a06ef0b55
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/sbc8641d.c
@@ -0,0 +1,164 @@
1/*
2 * SBC8641D board specific routines
3 *
4 * Copyright 2008 Wind River Systems Inc.
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the 8641 HPCN support by Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/stddef.h>
17#include <linux/kernel.h>
18#include <linux/pci.h>
19#include <linux/kdev_t.h>
20#include <linux/delay.h>
21#include <linux/seq_file.h>
22#include <linux/of_platform.h>
23
24#include <asm/system.h>
25#include <asm/time.h>
26#include <asm/machdep.h>
27#include <asm/pci-bridge.h>
28#include <asm/mpc86xx.h>
29#include <asm/prom.h>
30#include <mm/mmu_decl.h>
31#include <asm/udbg.h>
32
33#include <asm/mpic.h>
34
35#include <sysdev/fsl_pci.h>
36#include <sysdev/fsl_soc.h>
37
38#include "mpc86xx.h"
39
40static void __init
41sbc8641_init_irq(void)
42{
43 struct mpic *mpic1;
44 struct device_node *np;
45 struct resource res;
46
47 /* Determine PIC address. */
48 np = of_find_node_by_type(NULL, "open-pic");
49 if (np == NULL)
50 return;
51 of_address_to_resource(np, 0, &res);
52
53 /* Alloc mpic structure and per isu has 16 INT entries. */
54 mpic1 = mpic_alloc(np, res.start,
55 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
56 0, 256, " MPIC ");
57 of_node_put(np);
58 BUG_ON(mpic1 == NULL);
59
60 mpic_init(mpic1);
61}
62
63static void __init
64sbc8641_setup_arch(void)
65{
66#ifdef CONFIG_PCI
67 struct device_node *np;
68#endif
69
70 if (ppc_md.progress)
71 ppc_md.progress("sbc8641_setup_arch()", 0);
72
73#ifdef CONFIG_PCI
74 for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie")
75 fsl_add_bridge(np, 0);
76#endif
77
78 printk("SBC8641 board from Wind River\n");
79
80#ifdef CONFIG_SMP
81 mpc86xx_smp_init();
82#endif
83}
84
85
86static void
87sbc8641_show_cpuinfo(struct seq_file *m)
88{
89 struct device_node *root;
90 uint memsize = total_memory;
91 const char *model = "";
92 uint svid = mfspr(SPRN_SVR);
93
94 seq_printf(m, "Vendor\t\t: Wind River Systems\n");
95
96 root = of_find_node_by_path("/");
97 if (root)
98 model = of_get_property(root, "model", NULL);
99 seq_printf(m, "Machine\t\t: %s\n", model);
100 of_node_put(root);
101
102 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
103 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
104}
105
106
107/*
108 * Called very early, device-tree isn't unflattened
109 */
110static int __init sbc8641_probe(void)
111{
112 unsigned long root = of_get_flat_dt_root();
113
114 if (of_flat_dt_is_compatible(root, "wind,sbc8641"))
115 return 1; /* Looks good */
116
117 return 0;
118}
119
120static long __init
121mpc86xx_time_init(void)
122{
123 unsigned int temp;
124
125 /* Set the time base to zero */
126 mtspr(SPRN_TBWL, 0);
127 mtspr(SPRN_TBWU, 0);
128
129 temp = mfspr(SPRN_HID0);
130 temp |= HID0_TBEN;
131 mtspr(SPRN_HID0, temp);
132 asm volatile("isync");
133
134 return 0;
135}
136
137static __initdata struct of_device_id of_bus_ids[] = {
138 { .compatible = "simple-bus", },
139 {},
140};
141
142static int __init declare_of_platform_devices(void)
143{
144 of_platform_bus_probe(NULL, of_bus_ids, NULL);
145
146 return 0;
147}
148machine_device_initcall(sbc8641, declare_of_platform_devices);
149
150define_machine(sbc8641) {
151 .name = "SBC8641D",
152 .probe = sbc8641_probe,
153 .setup_arch = sbc8641_setup_arch,
154 .init_IRQ = sbc8641_init_irq,
155 .show_cpuinfo = sbc8641_show_cpuinfo,
156 .get_irq = mpic_get_irq,
157 .restart = fsl_rstcr_restart,
158 .time_init = mpc86xx_time_init,
159 .calibrate_decr = generic_calibrate_decr,
160 .progress = udbg_progress,
161#ifdef CONFIG_PCI
162 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
163#endif
164};
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index 7fd224ca233d..6fc849e51e48 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -18,7 +18,6 @@ config MPC8XXFADS
18config MPC86XADS 18config MPC86XADS
19 bool "MPC86XADS" 19 bool "MPC86XADS"
20 select CPM1 20 select CPM1
21 select PPC_CPM_NEW_BINDING
22 help 21 help
23 MPC86x Application Development System by Freescale Semiconductor. 22 MPC86x Application Development System by Freescale Semiconductor.
24 The MPC86xADS is meant to serve as a platform for s/w and h/w 23 The MPC86xADS is meant to serve as a platform for s/w and h/w
@@ -27,7 +26,6 @@ config MPC86XADS
27config MPC885ADS 26config MPC885ADS
28 bool "MPC885ADS" 27 bool "MPC885ADS"
29 select CPM1 28 select CPM1
30 select PPC_CPM_NEW_BINDING
31 help 29 help
32 Freescale Semiconductor MPC885 Application Development System (ADS). 30 Freescale Semiconductor MPC885 Application Development System (ADS).
33 Also known as DUET. 31 Also known as DUET.
@@ -37,7 +35,6 @@ config MPC885ADS
37config PPC_EP88XC 35config PPC_EP88XC
38 bool "Embedded Planet EP88xC (a.k.a. CWH-PPC-885XN-VE)" 36 bool "Embedded Planet EP88xC (a.k.a. CWH-PPC-885XN-VE)"
39 select CPM1 37 select CPM1
40 select PPC_CPM_NEW_BINDING
41 help 38 help
42 This enables support for the Embedded Planet EP88xC board. 39 This enables support for the Embedded Planet EP88xC board.
43 40
@@ -47,7 +44,6 @@ config PPC_EP88XC
47config PPC_ADDER875 44config PPC_ADDER875
48 bool "Analogue & Micro Adder 875" 45 bool "Analogue & Micro Adder 875"
49 select CPM1 46 select CPM1
50 select PPC_CPM_NEW_BINDING
51 select REDBOOT 47 select REDBOOT
52 help 48 help
53 This enables support for the Analogue & Micro Adder 875 49 This enables support for the Analogue & Micro Adder 875
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index 184f998d1be2..0d9f75c74f8c 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -111,17 +111,12 @@ void __init mpc8xx_calibrate_decr(void)
111 111
112 /* Processor frequency is MHz. 112 /* Processor frequency is MHz.
113 */ 113 */
114 ppc_tb_freq = 50000000;
115 if (!get_freq("bus-frequency", &ppc_tb_freq)) {
116 printk(KERN_ERR "WARNING: Estimating decrementer frequency "
117 "(not found)\n");
118 }
119 ppc_tb_freq /= 16;
120 ppc_proc_freq = 50000000; 114 ppc_proc_freq = 50000000;
121 if (!get_freq("clock-frequency", &ppc_proc_freq)) 115 if (!get_freq("clock-frequency", &ppc_proc_freq))
122 printk(KERN_ERR "WARNING: Estimating processor frequency " 116 printk(KERN_ERR "WARNING: Estimating processor frequency "
123 "(not found)\n"); 117 "(not found)\n");
124 118
119 ppc_tb_freq = ppc_proc_freq / 16;
125 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); 120 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
126 121
127 /* Perform some more timer/timebase initialization. This used 122 /* Perform some more timer/timebase initialization. This used
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index a578b966ecbc..f38c50b4ce56 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -290,13 +290,7 @@ config CPM2
290config PPC_CPM_NEW_BINDING 290config PPC_CPM_NEW_BINDING
291 bool 291 bool
292 depends on CPM1 || CPM2 292 depends on CPM1 || CPM2
293 help 293 default y
294 Select this if your board has been converted to use the new
295 device tree bindings for CPM, and no longer needs the
296 ioport callbacks or the platform device glue code.
297
298 The fs_enet and cpm_uart drivers will be built as
299 of_platform devices.
300 294
301config AXON_RAM 295config AXON_RAM
302 tristate "Axon DDR2 memory device driver" 296 tristate "Axon DDR2 memory device driver"
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 0c3face0ddbb..5fc7fac10e93 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -41,11 +41,13 @@ config 40x
41 bool "AMCC 40x" 41 bool "AMCC 40x"
42 select PPC_DCR_NATIVE 42 select PPC_DCR_NATIVE
43 select PPC_UDBG_16550 43 select PPC_UDBG_16550
44 select 4xx_SOC
44 45
45config 44x 46config 44x
46 bool "AMCC 44x" 47 bool "AMCC 44x"
47 select PPC_DCR_NATIVE 48 select PPC_DCR_NATIVE
48 select PPC_UDBG_16550 49 select PPC_UDBG_16550
50 select 4xx_SOC
49 51
50config E200 52config E200
51 bool "Freescale e200" 53 bool "Freescale e200"
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index d75ccded7f10..45646b2b4af4 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -28,13 +28,13 @@
28#include <linux/notifier.h> 28#include <linux/notifier.h>
29#include <linux/of.h> 29#include <linux/of.h>
30#include <linux/of_platform.h> 30#include <linux/of_platform.h>
31#include <linux/lmb.h>
31 32
32#include <asm/prom.h> 33#include <asm/prom.h>
33#include <asm/iommu.h> 34#include <asm/iommu.h>
34#include <asm/machdep.h> 35#include <asm/machdep.h>
35#include <asm/pci-bridge.h> 36#include <asm/pci-bridge.h>
36#include <asm/udbg.h> 37#include <asm/udbg.h>
37#include <asm/lmb.h>
38#include <asm/firmware.h> 38#include <asm/firmware.h>
39#include <asm/cell-regs.h> 39#include <asm/cell-regs.h>
40 40
@@ -316,7 +316,7 @@ static void cell_iommu_setup_stab(struct cbe_iommu *iommu,
316 segments = max(dbase + dsize, fbase + fsize) >> IO_SEGMENT_SHIFT; 316 segments = max(dbase + dsize, fbase + fsize) >> IO_SEGMENT_SHIFT;
317 317
318 pr_debug("%s: iommu[%d]: segments: %lu\n", 318 pr_debug("%s: iommu[%d]: segments: %lu\n",
319 __FUNCTION__, iommu->nid, segments); 319 __func__, iommu->nid, segments);
320 320
321 /* set up the segment table */ 321 /* set up the segment table */
322 stab_size = segments * sizeof(unsigned long); 322 stab_size = segments * sizeof(unsigned long);
@@ -343,7 +343,7 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu,
343 (1 << 12) / sizeof(unsigned long)); 343 (1 << 12) / sizeof(unsigned long));
344 344
345 ptab_size = segments * pages_per_segment * sizeof(unsigned long); 345 ptab_size = segments * pages_per_segment * sizeof(unsigned long);
346 pr_debug("%s: iommu[%d]: ptab_size: %lu, order: %d\n", __FUNCTION__, 346 pr_debug("%s: iommu[%d]: ptab_size: %lu, order: %d\n", __func__,
347 iommu->nid, ptab_size, get_order(ptab_size)); 347 iommu->nid, ptab_size, get_order(ptab_size));
348 page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(ptab_size)); 348 page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(ptab_size));
349 BUG_ON(!page); 349 BUG_ON(!page);
@@ -355,7 +355,7 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu,
355 n_pte_pages = (pages_per_segment * sizeof(unsigned long)) >> 12; 355 n_pte_pages = (pages_per_segment * sizeof(unsigned long)) >> 12;
356 356
357 pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n", 357 pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n",
358 __FUNCTION__, iommu->nid, iommu->stab, ptab, 358 __func__, iommu->nid, iommu->stab, ptab,
359 n_pte_pages); 359 n_pte_pages);
360 360
361 /* initialise the STEs */ 361 /* initialise the STEs */
@@ -394,7 +394,7 @@ static void cell_iommu_enable_hardware(struct cbe_iommu *iommu)
394 394
395 if (cell_iommu_find_ioc(iommu->nid, &xlate_base)) 395 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
396 panic("%s: missing IOC register mappings for node %d\n", 396 panic("%s: missing IOC register mappings for node %d\n",
397 __FUNCTION__, iommu->nid); 397 __func__, iommu->nid);
398 398
399 iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size); 399 iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size);
400 iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset; 400 iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset;
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index 0304589c0a80..8a3631ce912b 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -65,7 +65,7 @@ static void cbe_power_save(void)
65 break; 65 break;
66 default: 66 default:
67 printk(KERN_WARNING "%s: unknown configuration\n", 67 printk(KERN_WARNING "%s: unknown configuration\n",
68 __FUNCTION__); 68 __func__);
69 break; 69 break;
70 } 70 }
71 mtspr(SPRN_TSC_CELL, thread_switch_control); 71 mtspr(SPRN_TSC_CELL, thread_switch_control);
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index e43024c0392e..655704ad03cf 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -132,7 +132,7 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
132 (unsigned int)(addr >> 32), 132 (unsigned int)(addr >> 32),
133 (unsigned int)(addr & 0xffffffff))) { 133 (unsigned int)(addr & 0xffffffff))) {
134 printk(KERN_ERR "%s: error enabling PTCAL on node %d!\n", 134 printk(KERN_ERR "%s: error enabling PTCAL on node %d!\n",
135 __FUNCTION__, nid); 135 __func__, nid);
136 goto out_free_pages; 136 goto out_free_pages;
137 } 137 }
138 138
@@ -162,7 +162,7 @@ static int __init cbe_ptcal_enable(void)
162 if (!size) 162 if (!size)
163 return -ENODEV; 163 return -ENODEV;
164 164
165 pr_debug("%s: enabling PTCAL, size = 0x%x\n", __FUNCTION__, *size); 165 pr_debug("%s: enabling PTCAL, size = 0x%x\n", __func__, *size);
166 order = get_order(*size); 166 order = get_order(*size);
167 of_node_put(np); 167 of_node_put(np);
168 168
@@ -180,7 +180,7 @@ static int __init cbe_ptcal_enable(void)
180 const u32 *nid = of_get_property(np, "node-id", NULL); 180 const u32 *nid = of_get_property(np, "node-id", NULL);
181 if (!nid) { 181 if (!nid) {
182 printk(KERN_ERR "%s: node %s is missing node-id?\n", 182 printk(KERN_ERR "%s: node %s is missing node-id?\n",
183 __FUNCTION__, np->full_name); 183 __func__, np->full_name);
184 continue; 184 continue;
185 } 185 }
186 cbe_ptcal_enable_on_node(*nid, order); 186 cbe_ptcal_enable_on_node(*nid, order);
@@ -195,13 +195,13 @@ static int cbe_ptcal_disable(void)
195 struct ptcal_area *area, *tmp; 195 struct ptcal_area *area, *tmp;
196 int ret = 0; 196 int ret = 0;
197 197
198 pr_debug("%s: disabling PTCAL\n", __FUNCTION__); 198 pr_debug("%s: disabling PTCAL\n", __func__);
199 199
200 list_for_each_entry_safe(area, tmp, &ptcal_list, list) { 200 list_for_each_entry_safe(area, tmp, &ptcal_list, list) {
201 /* disable ptcal on this node */ 201 /* disable ptcal on this node */
202 if (rtas_call(ptcal_stop_tok, 1, 1, NULL, area->nid)) { 202 if (rtas_call(ptcal_stop_tok, 1, 1, NULL, area->nid)) {
203 printk(KERN_ERR "%s: error disabling PTCAL " 203 printk(KERN_ERR "%s: error disabling PTCAL "
204 "on node %d!\n", __FUNCTION__, 204 "on node %d!\n", __func__,
205 area->nid); 205 area->nid);
206 ret = -EIO; 206 ret = -EIO;
207 continue; 207 continue;
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 712001f6b7da..6bab44b7716b 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -165,7 +165,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
165 struct spu_slb slb; 165 struct spu_slb slb;
166 int psize; 166 int psize;
167 167
168 pr_debug("%s\n", __FUNCTION__); 168 pr_debug("%s\n", __func__);
169 169
170 slb.esid = (ea & ESID_MASK) | SLB_ESID_V; 170 slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
171 171
@@ -215,7 +215,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
215extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX 215extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX
216static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) 216static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr)
217{ 217{
218 pr_debug("%s, %lx, %lx\n", __FUNCTION__, dsisr, ea); 218 pr_debug("%s, %lx, %lx\n", __func__, dsisr, ea);
219 219
220 /* Handle kernel space hash faults immediately. 220 /* Handle kernel space hash faults immediately.
221 User hash faults need to be deferred to process context. */ 221 User hash faults need to be deferred to process context. */
@@ -351,7 +351,7 @@ spu_irq_class_1(int irq, void *data)
351 __spu_trap_data_seg(spu, dar); 351 __spu_trap_data_seg(spu, dar);
352 352
353 spin_unlock(&spu->register_lock); 353 spin_unlock(&spu->register_lock);
354 pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat, 354 pr_debug("%s: %lx %lx %lx %lx\n", __func__, mask, stat,
355 dar, dsisr); 355 dar, dsisr);
356 356
357 if (stat & CLASS1_STORAGE_FAULT_INTR) 357 if (stat & CLASS1_STORAGE_FAULT_INTR)
@@ -726,7 +726,7 @@ static int __init init_spu_base(void)
726 726
727 if (ret < 0) { 727 if (ret < 0) {
728 printk(KERN_WARNING "%s: Error initializing spus\n", 728 printk(KERN_WARNING "%s: Error initializing spus\n",
729 __FUNCTION__); 729 __func__);
730 goto out_unregister_sysdev_class; 730 goto out_unregister_sysdev_class;
731 } 731 }
732 732
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c
index dceb8b6a9382..19f6bfdbb933 100644
--- a/arch/powerpc/platforms/cell/spu_callbacks.c
+++ b/arch/powerpc/platforms/cell/spu_callbacks.c
@@ -54,7 +54,7 @@ long spu_sys_callback(struct spu_syscall_block *s)
54 long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); 54 long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);
55 55
56 if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) { 56 if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) {
57 pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); 57 pr_debug("%s: invalid syscall #%ld", __func__, s->nr_ret);
58 return -ENOSYS; 58 return -ENOSYS;
59 } 59 }
60 60
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index d351bdebf5f1..4c506c1463cd 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -92,7 +92,7 @@ static int __init spu_map_interrupts_old(struct spu *spu,
92 92
93 tmp = of_get_property(np->parent->parent, "node-id", NULL); 93 tmp = of_get_property(np->parent->parent, "node-id", NULL);
94 if (!tmp) { 94 if (!tmp) {
95 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__); 95 printk(KERN_WARNING "%s: can't find node-id\n", __func__);
96 nid = spu->node; 96 nid = spu->node;
97 } else 97 } else
98 nid = tmp[0]; 98 nid = tmp[0];
@@ -296,7 +296,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
296 ret = fn(node); 296 ret = fn(node);
297 if (ret) { 297 if (ret) {
298 printk(KERN_WARNING "%s: Error initializing %s\n", 298 printk(KERN_WARNING "%s: Error initializing %s\n",
299 __FUNCTION__, node->name); 299 __func__, node->name);
300 break; 300 break;
301 } 301 }
302 n++; 302 n++;
@@ -327,7 +327,7 @@ static int __init of_create_spu(struct spu *spu, void *data)
327 if (!legacy_map) { 327 if (!legacy_map) {
328 legacy_map = 1; 328 legacy_map = 1;
329 printk(KERN_WARNING "%s: Legacy device tree found, " 329 printk(KERN_WARNING "%s: Legacy device tree found, "
330 "trying to map old style\n", __FUNCTION__); 330 "trying to map old style\n", __func__);
331 } 331 }
332 ret = spu_map_device_old(spu); 332 ret = spu_map_device_old(spu);
333 if (ret) { 333 if (ret) {
@@ -342,7 +342,7 @@ static int __init of_create_spu(struct spu *spu, void *data)
342 if (!legacy_irq) { 342 if (!legacy_irq) {
343 legacy_irq = 1; 343 legacy_irq = 1;
344 printk(KERN_WARNING "%s: Legacy device tree found, " 344 printk(KERN_WARNING "%s: Legacy device tree found, "
345 "trying old style irq\n", __FUNCTION__); 345 "trying old style irq\n", __func__);
346 } 346 }
347 ret = spu_map_interrupts_old(spu, spe); 347 ret = spu_map_interrupts_old(spu, spe);
348 if (ret) { 348 if (ret) {
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index 0c6a96b82b2d..b962c3ab470c 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -133,8 +133,6 @@ static struct spu_context *coredump_next_context(int *fd)
133 if (ctx->flags & SPU_CREATE_NOSCHED) 133 if (ctx->flags & SPU_CREATE_NOSCHED)
134 continue; 134 continue;
135 135
136 /* start searching the next fd next time we're called */
137 (*fd)++;
138 break; 136 break;
139 } 137 }
140 138
@@ -157,6 +155,9 @@ int spufs_coredump_extra_notes_size(void)
157 break; 155 break;
158 156
159 size += rc; 157 size += rc;
158
159 /* start searching the next fd next time */
160 fd++;
160 } 161 }
161 162
162 return size; 163 return size;
@@ -239,6 +240,9 @@ int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset)
239 } 240 }
240 241
241 spu_release_saved(ctx); 242 spu_release_saved(ctx);
243
244 /* start searching the next fd next time */
245 fd++;
242 } 246 }
243 247
244 return 0; 248 return 0;
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index f7a7e8635fb6..08f44d1971ac 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -32,7 +32,6 @@
32#include <linux/marker.h> 32#include <linux/marker.h>
33 33
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/semaphore.h>
36#include <asm/spu.h> 35#include <asm/spu.h>
37#include <asm/spu_info.h> 36#include <asm/spu_info.h>
38#include <asm/uaccess.h> 37#include <asm/uaccess.h>
@@ -1337,7 +1336,7 @@ static u64 spufs_signal1_type_get(struct spu_context *ctx)
1337 return ctx->ops->signal1_type_get(ctx); 1336 return ctx->ops->signal1_type_get(ctx);
1338} 1337}
1339DEFINE_SPUFS_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get, 1338DEFINE_SPUFS_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get,
1340 spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE); 1339 spufs_signal1_type_set, "%llu\n", SPU_ATTR_ACQUIRE);
1341 1340
1342 1341
1343static int spufs_signal2_type_set(void *data, u64 val) 1342static int spufs_signal2_type_set(void *data, u64 val)
@@ -1359,7 +1358,7 @@ static u64 spufs_signal2_type_get(struct spu_context *ctx)
1359 return ctx->ops->signal2_type_get(ctx); 1358 return ctx->ops->signal2_type_get(ctx);
1360} 1359}
1361DEFINE_SPUFS_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get, 1360DEFINE_SPUFS_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
1362 spufs_signal2_type_set, "%llu", SPU_ATTR_ACQUIRE); 1361 spufs_signal2_type_set, "%llu\n", SPU_ATTR_ACQUIRE);
1363 1362
1364#if SPUFS_MMAP_4K 1363#if SPUFS_MMAP_4K
1365static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma, 1364static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma,
@@ -1556,7 +1555,7 @@ void spufs_mfc_callback(struct spu *spu)
1556 1555
1557 wake_up_all(&ctx->mfc_wq); 1556 wake_up_all(&ctx->mfc_wq);
1558 1557
1559 pr_debug("%s %s\n", __FUNCTION__, spu->name); 1558 pr_debug("%s %s\n", __func__, spu->name);
1560 if (ctx->mfc_fasync) { 1559 if (ctx->mfc_fasync) {
1561 u32 free_elements, tagstatus; 1560 u32 free_elements, tagstatus;
1562 unsigned int mask; 1561 unsigned int mask;
@@ -1790,7 +1789,7 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
1790 if (tagstatus & ctx->tagwait) 1789 if (tagstatus & ctx->tagwait)
1791 mask |= POLLIN | POLLRDNORM; 1790 mask |= POLLIN | POLLRDNORM;
1792 1791
1793 pr_debug("%s: free %d tagstatus %d tagwait %d\n", __FUNCTION__, 1792 pr_debug("%s: free %d tagstatus %d tagwait %d\n", __func__,
1794 free_elements, tagstatus, ctx->tagwait); 1793 free_elements, tagstatus, ctx->tagwait);
1795 1794
1796 return mask; 1795 return mask;
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 6d1228c66c5e..0c32a05ab068 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -35,7 +35,6 @@
35#include <linux/parser.h> 35#include <linux/parser.h>
36 36
37#include <asm/prom.h> 37#include <asm/prom.h>
38#include <asm/semaphore.h>
39#include <asm/spu.h> 38#include <asm/spu.h>
40#include <asm/spu_priv1.h> 39#include <asm/spu_priv1.h>
41#include <asm/uaccess.h> 40#include <asm/uaccess.h>
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index cac69e116776..96bf7c2b86fc 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -98,7 +98,7 @@ static int spu_setup_isolated(struct spu_context *ctx)
98 != MFC_CNTL_PURGE_DMA_COMPLETE) { 98 != MFC_CNTL_PURGE_DMA_COMPLETE) {
99 if (time_after(jiffies, timeout)) { 99 if (time_after(jiffies, timeout)) {
100 printk(KERN_ERR "%s: timeout flushing MFC DMA queue\n", 100 printk(KERN_ERR "%s: timeout flushing MFC DMA queue\n",
101 __FUNCTION__); 101 __func__);
102 ret = -EIO; 102 ret = -EIO;
103 goto out; 103 goto out;
104 } 104 }
@@ -124,7 +124,7 @@ static int spu_setup_isolated(struct spu_context *ctx)
124 status_loading) { 124 status_loading) {
125 if (time_after(jiffies, timeout)) { 125 if (time_after(jiffies, timeout)) {
126 printk(KERN_ERR "%s: timeout waiting for loader\n", 126 printk(KERN_ERR "%s: timeout waiting for loader\n",
127 __FUNCTION__); 127 __func__);
128 ret = -EIO; 128 ret = -EIO;
129 goto out_drop_priv; 129 goto out_drop_priv;
130 } 130 }
@@ -134,7 +134,7 @@ static int spu_setup_isolated(struct spu_context *ctx)
134 if (!(status & SPU_STATUS_RUNNING)) { 134 if (!(status & SPU_STATUS_RUNNING)) {
135 /* If isolated LOAD has failed: run SPU, we will get a stop-and 135 /* If isolated LOAD has failed: run SPU, we will get a stop-and
136 * signal later. */ 136 * signal later. */
137 pr_debug("%s: isolated LOAD failed\n", __FUNCTION__); 137 pr_debug("%s: isolated LOAD failed\n", __func__);
138 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); 138 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE);
139 ret = -EACCES; 139 ret = -EACCES;
140 goto out_drop_priv; 140 goto out_drop_priv;
@@ -142,7 +142,7 @@ static int spu_setup_isolated(struct spu_context *ctx)
142 142
143 if (!(status & SPU_STATUS_ISOLATED_STATE)) { 143 if (!(status & SPU_STATUS_ISOLATED_STATE)) {
144 /* This isn't allowed by the CBEA, but check anyway */ 144 /* This isn't allowed by the CBEA, but check anyway */
145 pr_debug("%s: SPU fell out of isolated mode?\n", __FUNCTION__); 145 pr_debug("%s: SPU fell out of isolated mode?\n", __func__);
146 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_STOP); 146 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_STOP);
147 ret = -EINVAL; 147 ret = -EINVAL;
148 goto out_drop_priv; 148 goto out_drop_priv;
@@ -282,7 +282,7 @@ static int spu_handle_restartsys(struct spu_context *ctx, long *spu_ret,
282 break; 282 break;
283 default: 283 default:
284 printk(KERN_WARNING "%s: unexpected return code %ld\n", 284 printk(KERN_WARNING "%s: unexpected return code %ld\n",
285 __FUNCTION__, *spu_ret); 285 __func__, *spu_ret);
286 ret = 0; 286 ret = 0;
287 } 287 }
288 return ret; 288 return ret;
@@ -323,6 +323,10 @@ static int spu_process_callback(struct spu_context *ctx)
323 return -EINTR; 323 return -EINTR;
324 } 324 }
325 325
326 /* need to re-get the ls, as it may have changed when we released the
327 * spu */
328 ls = (void __iomem *)ctx->ops->get_ls(ctx);
329
326 /* write result, jump over indirect pointer */ 330 /* write result, jump over indirect pointer */
327 memcpy_toio(ls + ls_pointer, &spu_ret, sizeof(spu_ret)); 331 memcpy_toio(ls + ls_pointer, &spu_ret, sizeof(spu_ret));
328 ctx->ops->npc_write(ctx, npc); 332 ctx->ops->npc_write(ctx, npc);
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index e9dc7a55d1b9..d2a1249d36dd 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -1815,6 +1815,7 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
1815 save_mfc_csr_ato(prev, spu); /* Step 24. */ 1815 save_mfc_csr_ato(prev, spu); /* Step 24. */
1816 save_mfc_tclass_id(prev, spu); /* Step 25. */ 1816 save_mfc_tclass_id(prev, spu); /* Step 25. */
1817 set_mfc_tclass_id(prev, spu); /* Step 26. */ 1817 set_mfc_tclass_id(prev, spu); /* Step 26. */
1818 save_mfc_cmd(prev, spu); /* Step 26a - moved from 44. */
1818 purge_mfc_queue(prev, spu); /* Step 27. */ 1819 purge_mfc_queue(prev, spu); /* Step 27. */
1819 wait_purge_complete(prev, spu); /* Step 28. */ 1820 wait_purge_complete(prev, spu); /* Step 28. */
1820 setup_mfc_sr1(prev, spu); /* Step 30. */ 1821 setup_mfc_sr1(prev, spu); /* Step 30. */
@@ -1831,7 +1832,6 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
1831 save_ppuint_mb(prev, spu); /* Step 41. */ 1832 save_ppuint_mb(prev, spu); /* Step 41. */
1832 save_ch_part1(prev, spu); /* Step 42. */ 1833 save_ch_part1(prev, spu); /* Step 42. */
1833 save_spu_mb(prev, spu); /* Step 43. */ 1834 save_spu_mb(prev, spu); /* Step 43. */
1834 save_mfc_cmd(prev, spu); /* Step 44. */
1835 reset_ch(prev, spu); /* Step 45. */ 1835 reset_ch(prev, spu); /* Step 45. */
1836} 1836}
1837 1837
diff --git a/arch/powerpc/platforms/celleb/beat.c b/arch/powerpc/platforms/celleb/beat.c
index 93ebb7d85120..b64b171f245b 100644
--- a/arch/powerpc/platforms/celleb/beat.c
+++ b/arch/powerpc/platforms/celleb/beat.c
@@ -48,6 +48,7 @@ void beat_power_off(void)
48} 48}
49 49
50u64 beat_halt_code = 0x1000000000000000UL; 50u64 beat_halt_code = 0x1000000000000000UL;
51EXPORT_SYMBOL(beat_halt_code);
51 52
52void beat_halt(void) 53void beat_halt(void)
53{ 54{
@@ -94,9 +95,8 @@ ssize_t beat_nvram_read(char *buf, size_t count, loff_t *index)
94 len = count; 95 len = count;
95 if (len > BEAT_NVRW_CNT) 96 if (len > BEAT_NVRW_CNT)
96 len = BEAT_NVRW_CNT; 97 len = BEAT_NVRW_CNT;
97 if (beat_eeprom_read(i, len, p)) { 98 if (beat_eeprom_read(i, len, p))
98 return -EIO; 99 return -EIO;
99 }
100 100
101 p += len; 101 p += len;
102 i += len; 102 i += len;
@@ -121,9 +121,8 @@ ssize_t beat_nvram_write(char *buf, size_t count, loff_t *index)
121 len = count; 121 len = count;
122 if (len > BEAT_NVRW_CNT) 122 if (len > BEAT_NVRW_CNT)
123 len = BEAT_NVRW_CNT; 123 len = BEAT_NVRW_CNT;
124 if (beat_eeprom_write(i, len, p)) { 124 if (beat_eeprom_write(i, len, p))
125 return -EIO; 125 return -EIO;
126 }
127 126
128 p += len; 127 p += len;
129 i += len; 128 i += len;
@@ -149,13 +148,14 @@ int64_t beat_get_term_char(u64 vterm, u64 *len, u64 *t1, u64 *t2)
149 u64 db[2]; 148 u64 db[2];
150 s64 ret; 149 s64 ret;
151 150
152 ret = beat_get_characters_from_console(vterm, len, (u8*)db); 151 ret = beat_get_characters_from_console(vterm, len, (u8 *)db);
153 if (ret == 0) { 152 if (ret == 0) {
154 *t1 = db[0]; 153 *t1 = db[0];
155 *t2 = db[1]; 154 *t2 = db[1];
156 } 155 }
157 return ret; 156 return ret;
158} 157}
158EXPORT_SYMBOL(beat_get_term_char);
159 159
160int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2) 160int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2)
161{ 161{
@@ -163,8 +163,9 @@ int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2)
163 163
164 db[0] = t1; 164 db[0] = t1;
165 db[1] = t2; 165 db[1] = t2;
166 return beat_put_characters_to_console(vterm, len, (u8*)db); 166 return beat_put_characters_to_console(vterm, len, (u8 *)db);
167} 167}
168EXPORT_SYMBOL(beat_put_term_char);
168 169
169void beat_power_save(void) 170void beat_power_save(void)
170{ 171{
@@ -261,7 +262,3 @@ static int __init beat_event_init(void)
261} 262}
262 263
263device_initcall(beat_event_init); 264device_initcall(beat_event_init);
264
265EXPORT_SYMBOL(beat_get_term_char);
266EXPORT_SYMBOL(beat_put_term_char);
267EXPORT_SYMBOL(beat_halt_code);
diff --git a/arch/powerpc/platforms/celleb/beat.h b/arch/powerpc/platforms/celleb/beat.h
index ac82ac35b991..32c8efcedc80 100644
--- a/arch/powerpc/platforms/celleb/beat.h
+++ b/arch/powerpc/platforms/celleb/beat.h
@@ -21,8 +21,8 @@
21#ifndef _CELLEB_BEAT_H 21#ifndef _CELLEB_BEAT_H
22#define _CELLEB_BEAT_H 22#define _CELLEB_BEAT_H
23 23
24int64_t beat_get_term_char(uint64_t,uint64_t*,uint64_t*,uint64_t*); 24int64_t beat_get_term_char(uint64_t, uint64_t *, uint64_t *, uint64_t *);
25int64_t beat_put_term_char(uint64_t,uint64_t,uint64_t,uint64_t); 25int64_t beat_put_term_char(uint64_t, uint64_t, uint64_t, uint64_t);
26int64_t beat_repository_encode(int, const char *, uint64_t[4]); 26int64_t beat_repository_encode(int, const char *, uint64_t[4]);
27void beat_restart(char *); 27void beat_restart(char *);
28void beat_power_off(void); 28void beat_power_off(void);
diff --git a/arch/powerpc/platforms/celleb/beat_wrapper.h b/arch/powerpc/platforms/celleb/beat_wrapper.h
index cbc1487df7de..b47dfda48d06 100644
--- a/arch/powerpc/platforms/celleb/beat_wrapper.h
+++ b/arch/powerpc/platforms/celleb/beat_wrapper.h
@@ -197,7 +197,8 @@ static inline s64 beat_put_characters_to_console(u64 termno, u64 len,
197 u64 b[2]; 197 u64 b[2];
198 198
199 memcpy(b, buffer, len); 199 memcpy(b, buffer, len);
200 return beat_hcall_norets(HV_put_characters_to_console, termno, len, b[0], b[1]); 200 return beat_hcall_norets(HV_put_characters_to_console, termno, len,
201 b[0], b[1]);
201} 202}
202 203
203static inline s64 beat_get_spe_privileged_state_1_registers( 204static inline s64 beat_get_spe_privileged_state_1_registers(
diff --git a/arch/powerpc/platforms/celleb/htab.c b/arch/powerpc/platforms/celleb/htab.c
index fbf27c74ebda..81467ff055c8 100644
--- a/arch/powerpc/platforms/celleb/htab.c
+++ b/arch/powerpc/platforms/celleb/htab.c
@@ -35,9 +35,9 @@
35#include "beat_wrapper.h" 35#include "beat_wrapper.h"
36 36
37#ifdef DEBUG_LOW 37#ifdef DEBUG_LOW
38#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) 38#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while (0)
39#else 39#else
40#define DBG_LOW(fmt...) do { } while(0) 40#define DBG_LOW(fmt...) do { } while (0)
41#endif 41#endif
42 42
43static DEFINE_SPINLOCK(beat_htab_lock); 43static DEFINE_SPINLOCK(beat_htab_lock);
@@ -116,7 +116,8 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
116 hpte_r &= ~_PAGE_COHERENT; 116 hpte_r &= ~_PAGE_COHERENT;
117 117
118 spin_lock(&beat_htab_lock); 118 spin_lock(&beat_htab_lock);
119 if ((lpar_rc = beat_read_mask(hpte_group)) == 0) { 119 lpar_rc = beat_read_mask(hpte_group);
120 if (lpar_rc == 0) {
120 if (!(vflags & HPTE_V_BOLTED)) 121 if (!(vflags & HPTE_V_BOLTED))
121 DBG_LOW(" full\n"); 122 DBG_LOW(" full\n");
122 spin_unlock(&beat_htab_lock); 123 spin_unlock(&beat_htab_lock);
diff --git a/arch/powerpc/platforms/celleb/interrupt.c b/arch/powerpc/platforms/celleb/interrupt.c
index c7c68ca70c82..69562a867876 100644
--- a/arch/powerpc/platforms/celleb/interrupt.c
+++ b/arch/powerpc/platforms/celleb/interrupt.c
@@ -34,7 +34,7 @@ static DEFINE_SPINLOCK(beatic_irq_mask_lock);
34static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64]; 34static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
35static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64]; 35static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
36 36
37static struct irq_host *beatic_host = NULL; 37static struct irq_host *beatic_host;
38 38
39/* 39/*
40 * In this implementation, "virq" == "IRQ plug number", 40 * In this implementation, "virq" == "IRQ plug number",
@@ -49,13 +49,13 @@ static inline void beatic_update_irq_mask(unsigned int irq_plug)
49 49
50 off = (irq_plug / 256) * 4; 50 off = (irq_plug / 256) * 4;
51 masks[0] = beatic_irq_mask_enable[off + 0] 51 masks[0] = beatic_irq_mask_enable[off + 0]
52 & beatic_irq_mask_ack[off + 0]; 52 & beatic_irq_mask_ack[off + 0];
53 masks[1] = beatic_irq_mask_enable[off + 1] 53 masks[1] = beatic_irq_mask_enable[off + 1]
54 & beatic_irq_mask_ack[off + 1]; 54 & beatic_irq_mask_ack[off + 1];
55 masks[2] = beatic_irq_mask_enable[off + 2] 55 masks[2] = beatic_irq_mask_enable[off + 2]
56 & beatic_irq_mask_ack[off + 2]; 56 & beatic_irq_mask_ack[off + 2];
57 masks[3] = beatic_irq_mask_enable[off + 3] 57 masks[3] = beatic_irq_mask_enable[off + 3]
58 & beatic_irq_mask_ack[off + 3]; 58 & beatic_irq_mask_ack[off + 3];
59 if (beat_set_interrupt_mask(irq_plug&~255UL, 59 if (beat_set_interrupt_mask(irq_plug&~255UL,
60 masks[0], masks[1], masks[2], masks[3]) != 0) 60 masks[0], masks[1], masks[2], masks[3]) != 0)
61 panic("Failed to set mask IRQ!"); 61 panic("Failed to set mask IRQ!");
@@ -96,7 +96,8 @@ static void beatic_end_irq(unsigned int irq_plug)
96 s64 err; 96 s64 err;
97 unsigned long flags; 97 unsigned long flags;
98 98
99 if ((err = beat_downcount_of_interrupt(irq_plug)) != 0) { 99 err = beat_downcount_of_interrupt(irq_plug);
100 if (err != 0) {
100 if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */ 101 if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */
101 panic("Failed to downcount IRQ! Error = %16lx", err); 102 panic("Failed to downcount IRQ! Error = %16lx", err);
102 103
@@ -138,7 +139,8 @@ static int beatic_pic_host_map(struct irq_host *h, unsigned int virq,
138 struct irq_desc *desc = get_irq_desc(virq); 139 struct irq_desc *desc = get_irq_desc(virq);
139 int64_t err; 140 int64_t err;
140 141
141 if ((err = beat_construct_and_connect_irq_plug(virq, hw)) < 0) 142 err = beat_construct_and_connect_irq_plug(virq, hw);
143 if (err < 0)
142 return -EIO; 144 return -EIO;
143 145
144 desc->status |= IRQ_LEVEL; 146 desc->status |= IRQ_LEVEL;
@@ -202,22 +204,22 @@ static inline unsigned int beatic_get_irq_plug(void)
202 beat_detect_pending_interrupts(i, pending); 204 beat_detect_pending_interrupts(i, pending);
203 __asm__ ("cntlzd %0,%1":"=r"(ub): 205 __asm__ ("cntlzd %0,%1":"=r"(ub):
204 "r"(pending[0] & beatic_irq_mask_enable[i/64+0] 206 "r"(pending[0] & beatic_irq_mask_enable[i/64+0]
205 & beatic_irq_mask_ack[i/64+0])); 207 & beatic_irq_mask_ack[i/64+0]));
206 if (ub != 64) 208 if (ub != 64)
207 return i + ub + 0; 209 return i + ub + 0;
208 __asm__ ("cntlzd %0,%1":"=r"(ub): 210 __asm__ ("cntlzd %0,%1":"=r"(ub):
209 "r"(pending[1] & beatic_irq_mask_enable[i/64+1] 211 "r"(pending[1] & beatic_irq_mask_enable[i/64+1]
210 & beatic_irq_mask_ack[i/64+1])); 212 & beatic_irq_mask_ack[i/64+1]));
211 if (ub != 64) 213 if (ub != 64)
212 return i + ub + 64; 214 return i + ub + 64;
213 __asm__ ("cntlzd %0,%1":"=r"(ub): 215 __asm__ ("cntlzd %0,%1":"=r"(ub):
214 "r"(pending[2] & beatic_irq_mask_enable[i/64+2] 216 "r"(pending[2] & beatic_irq_mask_enable[i/64+2]
215 & beatic_irq_mask_ack[i/64+2])); 217 & beatic_irq_mask_ack[i/64+2]));
216 if (ub != 64) 218 if (ub != 64)
217 return i + ub + 128; 219 return i + ub + 128;
218 __asm__ ("cntlzd %0,%1":"=r"(ub): 220 __asm__ ("cntlzd %0,%1":"=r"(ub):
219 "r"(pending[3] & beatic_irq_mask_enable[i/64+3] 221 "r"(pending[3] & beatic_irq_mask_enable[i/64+3]
220 & beatic_irq_mask_ack[i/64+3])); 222 & beatic_irq_mask_ack[i/64+3]));
221 if (ub != 64) 223 if (ub != 64)
222 return i + ub + 192; 224 return i + ub + 192;
223 } 225 }
@@ -250,7 +252,7 @@ void __init beatic_init_IRQ(void)
250 252
251 /* Allocate an irq host */ 253 /* Allocate an irq host */
252 beatic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, 254 beatic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0,
253 &beatic_pic_host_ops, 255 &beatic_pic_host_ops,
254 0); 256 0);
255 BUG_ON(beatic_host == NULL); 257 BUG_ON(beatic_host == NULL);
256 irq_set_default_host(beatic_host); 258 irq_set_default_host(beatic_host);
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c
index a3c7cfbcb323..a999b393f6f6 100644
--- a/arch/powerpc/platforms/celleb/scc_epci.c
+++ b/arch/powerpc/platforms/celleb/scc_epci.c
@@ -161,9 +161,9 @@ static PCI_IO_ADDR celleb_epci_make_config_addr(
161 if (bus != hose->bus) 161 if (bus != hose->bus)
162 addr = celleb_epci_get_epci_cfg(hose) + 162 addr = celleb_epci_get_epci_cfg(hose) +
163 (((bus->number & 0xff) << 16) 163 (((bus->number & 0xff) << 16)
164 | ((devfn & 0xff) << 8) 164 | ((devfn & 0xff) << 8)
165 | (where & 0xff) 165 | (where & 0xff)
166 | 0x01000000); 166 | 0x01000000);
167 else 167 else
168 addr = celleb_epci_get_epci_cfg(hose) + 168 addr = celleb_epci_get_epci_cfg(hose) +
169 (((devfn & 0xff) << 8) | (where & 0xff)); 169 (((devfn & 0xff) << 8) | (where & 0xff));
@@ -174,7 +174,7 @@ static PCI_IO_ADDR celleb_epci_make_config_addr(
174} 174}
175 175
176static int celleb_epci_read_config(struct pci_bus *bus, 176static int celleb_epci_read_config(struct pci_bus *bus,
177 unsigned int devfn, int where, int size, u32 * val) 177 unsigned int devfn, int where, int size, u32 *val)
178{ 178{
179 PCI_IO_ADDR epci_base; 179 PCI_IO_ADDR epci_base;
180 PCI_IO_ADDR addr; 180 PCI_IO_ADDR addr;
diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c
index 610008211ca1..3a16c5b3c464 100644
--- a/arch/powerpc/platforms/celleb/scc_sio.c
+++ b/arch/powerpc/platforms/celleb/scc_sio.c
@@ -28,7 +28,7 @@
28 28
29/* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024 29/* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024
30 mmio=0xfff000-0x1000,0xff2000-0x1000 */ 30 mmio=0xfff000-0x1000,0xff2000-0x1000 */
31static int txx9_serial_bitmap __initdata = 0; 31static int txx9_serial_bitmap __initdata;
32 32
33static struct { 33static struct {
34 uint32_t offset; 34 uint32_t offset;
@@ -84,7 +84,7 @@ static int __init txx9_serial_config(char *ptr)
84 int i; 84 int i;
85 85
86 for (;;) { 86 for (;;) {
87 switch(get_option(&ptr, &i)) { 87 switch (get_option(&ptr, &i)) {
88 default: 88 default:
89 return 0; 89 return 0;
90 case 2: 90 case 2:
diff --git a/arch/powerpc/platforms/celleb/spu_priv1.c b/arch/powerpc/platforms/celleb/spu_priv1.c
index 2bf6700f747a..bcc17f7fe8ad 100644
--- a/arch/powerpc/platforms/celleb/spu_priv1.c
+++ b/arch/powerpc/platforms/celleb/spu_priv1.c
@@ -183,8 +183,7 @@ static u64 resource_allocation_enable_get(struct spu *spu)
183 return enable; 183 return enable;
184} 184}
185 185
186const struct spu_priv1_ops spu_priv1_beat_ops = 186const struct spu_priv1_ops spu_priv1_beat_ops = {
187{
188 .int_mask_and = int_mask_and, 187 .int_mask_and = int_mask_and,
189 .int_mask_or = int_mask_or, 188 .int_mask_or = int_mask_or,
190 .int_mask_set = int_mask_set, 189 .int_mask_set = int_mask_set,
diff --git a/arch/powerpc/platforms/celleb/udbg_beat.c b/arch/powerpc/platforms/celleb/udbg_beat.c
index d888c4674c62..6b418f6b6175 100644
--- a/arch/powerpc/platforms/celleb/udbg_beat.c
+++ b/arch/powerpc/platforms/celleb/udbg_beat.c
@@ -54,7 +54,8 @@ static int udbg_getc_poll_beat(void)
54 if (inbuflen == 0) { 54 if (inbuflen == 0) {
55 /* get some more chars. */ 55 /* get some more chars. */
56 inbuflen = 0; 56 inbuflen = 0;
57 rc = beat_get_term_char(celleb_vtermno, &inbuflen, inbuf+0, inbuf+1); 57 rc = beat_get_term_char(celleb_vtermno, &inbuflen,
58 inbuf+0, inbuf+1);
58 if (rc != 0) 59 if (rc != 0)
59 inbuflen = 0; /* otherwise inbuflen is garbage */ 60 inbuflen = 0; /* otherwise inbuflen is garbage */
60 } 61 }
@@ -78,7 +79,7 @@ static int udbg_getc_beat(void)
78 if (ch == -1) { 79 if (ch == -1) {
79 /* This shouldn't be needed...but... */ 80 /* This shouldn't be needed...but... */
80 volatile unsigned long delay; 81 volatile unsigned long delay;
81 for (delay=0; delay < 2000000; delay++) 82 for (delay = 0; delay < 2000000; delay++)
82 ; 83 ;
83 } else { 84 } else {
84 return ch; 85 return ch;
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index d4f8bf581e3a..84e2d78b9a62 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -117,11 +117,11 @@ static void __init mpc7448_hpc2_init_IRQ(void)
117 } 117 }
118 118
119 if (mpic_paddr == 0) { 119 if (mpic_paddr == 0) {
120 printk("%s: No tsi108 PIC found !\n", __FUNCTION__); 120 printk("%s: No tsi108 PIC found !\n", __func__);
121 return; 121 return;
122 } 122 }
123 123
124 DBG("%s: tsi108 pic phys_addr = 0x%x\n", __FUNCTION__, 124 DBG("%s: tsi108 pic phys_addr = 0x%x\n", __func__,
125 (u32) mpic_paddr); 125 (u32) mpic_paddr);
126 126
127 mpic = mpic_alloc(tsi_pic, mpic_paddr, 127 mpic = mpic_alloc(tsi_pic, mpic_paddr,
@@ -140,17 +140,17 @@ static void __init mpc7448_hpc2_init_IRQ(void)
140#ifdef CONFIG_PCI 140#ifdef CONFIG_PCI
141 tsi_pci = of_find_node_by_type(NULL, "pci"); 141 tsi_pci = of_find_node_by_type(NULL, "pci");
142 if (tsi_pci == NULL) { 142 if (tsi_pci == NULL) {
143 printk("%s: No tsi108 pci node found !\n", __FUNCTION__); 143 printk("%s: No tsi108 pci node found !\n", __func__);
144 return; 144 return;
145 } 145 }
146 cascade_node = of_find_node_by_type(NULL, "pic-router"); 146 cascade_node = of_find_node_by_type(NULL, "pic-router");
147 if (cascade_node == NULL) { 147 if (cascade_node == NULL) {
148 printk("%s: No tsi108 pci cascade node found !\n", __FUNCTION__); 148 printk("%s: No tsi108 pci cascade node found !\n", __func__);
149 return; 149 return;
150 } 150 }
151 151
152 cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0); 152 cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0);
153 DBG("%s: tsi108 cascade_pci_irq = 0x%x\n", __FUNCTION__, 153 DBG("%s: tsi108 cascade_pci_irq = 0x%x\n", __func__,
154 (u32) cascade_pci_irq); 154 (u32) cascade_pci_irq);
155 tsi108_pci_int_init(cascade_node); 155 tsi108_pci_int_init(cascade_node);
156 set_irq_data(cascade_pci_irq, mpic); 156 set_irq_data(cascade_pci_irq, mpic);
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
index 653a5eb91c90..5a19b9a1457c 100644
--- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -49,13 +49,13 @@ static void __init prpmc2800_setup_arch(void)
49 * ioremap mpp and gpp registers in case they are later 49 * ioremap mpp and gpp registers in case they are later
50 * needed by prpmc2800_reset_board(). 50 * needed by prpmc2800_reset_board().
51 */ 51 */
52 np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-mpp"); 52 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-mpp");
53 reg = of_get_property(np, "reg", NULL); 53 reg = of_get_property(np, "reg", NULL);
54 paddr = of_translate_address(np, reg); 54 paddr = of_translate_address(np, reg);
55 of_node_put(np); 55 of_node_put(np);
56 mv64x60_mpp_reg_base = ioremap(paddr, reg[1]); 56 mv64x60_mpp_reg_base = ioremap(paddr, reg[1]);
57 57
58 np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp"); 58 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp");
59 reg = of_get_property(np, "reg", NULL); 59 reg = of_get_property(np, "reg", NULL);
60 paddr = of_translate_address(np, reg); 60 paddr = of_translate_address(np, reg);
61 of_node_put(np); 61 of_node_put(np);
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S
index 5381038f0881..c775cd4b3d6e 100644
--- a/arch/powerpc/platforms/iseries/exception.S
+++ b/arch/powerpc/platforms/iseries/exception.S
@@ -38,11 +38,19 @@
38 38
39 .globl system_reset_iSeries 39 .globl system_reset_iSeries
40system_reset_iSeries: 40system_reset_iSeries:
41 mfspr r13,SPRN_SPRG3 /* Get paca address */ 41 mfspr r13,SPRN_SPRG3 /* Get alpaca address */
42 LOAD_REG_IMMEDIATE(r23, alpaca)
43 li r0,ALPACA_SIZE
44 sub r23,r13,r23
45 divdu r23,r23,r0 /* r23 has cpu number */
46 LOAD_REG_IMMEDIATE(r13, paca)
47 mulli r0,r23,PACA_SIZE
48 add r13,r13,r0
49 mtspr SPRN_SPRG3,r13 /* Save it away for the future */
42 mfmsr r24 50 mfmsr r24
43 ori r24,r24,MSR_RI 51 ori r24,r24,MSR_RI
44 mtmsrd r24 /* RI on */ 52 mtmsrd r24 /* RI on */
45 lhz r24,PACAPACAINDEX(r13) /* Get processor # */ 53 mr r24,r23
46 cmpwi 0,r24,0 /* Are we processor 0? */ 54 cmpwi 0,r24,0 /* Are we processor 0? */
47 bne 1f 55 bne 1f
48 b .__start_initialization_iSeries /* Start up the first processor */ 56 b .__start_initialization_iSeries /* Start up the first processor */
diff --git a/arch/powerpc/platforms/iseries/ipl_parms.h b/arch/powerpc/platforms/iseries/ipl_parms.h
index 77c135ddbf1b..83e4ca42fc57 100644
--- a/arch/powerpc/platforms/iseries/ipl_parms.h
+++ b/arch/powerpc/platforms/iseries/ipl_parms.h
@@ -65,6 +65,4 @@ struct ItIplParmsReal {
65 u64 xRsvd13; // Reserved x38-x3F 65 u64 xRsvd13; // Reserved x38-x3F
66}; 66};
67 67
68extern struct ItIplParmsReal xItIplParmsReal;
69
70#endif /* _ISERIES_IPL_PARMS_H */ 68#endif /* _ISERIES_IPL_PARMS_H */
diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c
index 8162049bb04d..98bd2d37038a 100644
--- a/arch/powerpc/platforms/iseries/lpardata.c
+++ b/arch/powerpc/platforms/iseries/lpardata.c
@@ -14,10 +14,10 @@
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/abs_addr.h> 15#include <asm/abs_addr.h>
16#include <asm/lppaca.h> 16#include <asm/lppaca.h>
17#include <asm/iseries/it_lp_reg_save.h>
18#include <asm/paca.h> 17#include <asm/paca.h>
19#include <asm/iseries/lpar_map.h> 18#include <asm/iseries/lpar_map.h>
20#include <asm/iseries/it_lp_queue.h> 19#include <asm/iseries/it_lp_queue.h>
20#include <asm/iseries/alpaca.h>
21 21
22#include "naca.h" 22#include "naca.h"
23#include "vpd_areas.h" 23#include "vpd_areas.h"
@@ -31,7 +31,7 @@
31/* The HvReleaseData is the root of the information shared between 31/* The HvReleaseData is the root of the information shared between
32 * the hypervisor and Linux. 32 * the hypervisor and Linux.
33 */ 33 */
34struct HvReleaseData hvReleaseData = { 34const struct HvReleaseData hvReleaseData = {
35 .xDesc = 0xc8a5d9c4, /* "HvRD" ebcdic */ 35 .xDesc = 0xc8a5d9c4, /* "HvRD" ebcdic */
36 .xSize = sizeof(struct HvReleaseData), 36 .xSize = sizeof(struct HvReleaseData),
37 .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas), 37 .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas),
@@ -61,6 +61,63 @@ struct naca_struct naca = {
61 .xRamDiskSize = 0, 61 .xRamDiskSize = 0,
62}; 62};
63 63
64struct ItLpRegSave {
65 u32 xDesc; // Eye catcher "LpRS" ebcdic 000-003
66 u16 xSize; // Size of this class 004-005
67 u8 xInUse; // Area is live 006-007
68 u8 xRsvd1[9]; // Reserved 007-00F
69
70 u8 xFixedRegSave[352]; // Fixed Register Save Area 010-16F
71 u32 xCTRL; // Control Register 170-173
72 u32 xDEC; // Decrementer 174-177
73 u32 xFPSCR; // FP Status and Control Reg 178-17B
74 u32 xPVR; // Processor Version Number 17C-17F
75
76 u64 xMMCR0; // Monitor Mode Control Reg 0 180-187
77 u32 xPMC1; // Perf Monitor Counter 1 188-18B
78 u32 xPMC2; // Perf Monitor Counter 2 18C-18F
79 u32 xPMC3; // Perf Monitor Counter 3 190-193
80 u32 xPMC4; // Perf Monitor Counter 4 194-197
81 u32 xPIR; // Processor ID Reg 198-19B
82
83 u32 xMMCR1; // Monitor Mode Control Reg 1 19C-19F
84 u32 xMMCRA; // Monitor Mode Control Reg A 1A0-1A3
85 u32 xPMC5; // Perf Monitor Counter 5 1A4-1A7
86 u32 xPMC6; // Perf Monitor Counter 6 1A8-1AB
87 u32 xPMC7; // Perf Monitor Counter 7 1AC-1AF
88 u32 xPMC8; // Perf Monitor Counter 8 1B0-1B3
89 u32 xTSC; // Thread Switch Control 1B4-1B7
90 u32 xTST; // Thread Switch Timeout 1B8-1BB
91 u32 xRsvd; // Reserved 1BC-1BF
92
93 u64 xACCR; // Address Compare Control Reg 1C0-1C7
94 u64 xIMR; // Instruction Match Register 1C8-1CF
95 u64 xSDR1; // Storage Description Reg 1 1D0-1D7
96 u64 xSPRG0; // Special Purpose Reg General0 1D8-1DF
97 u64 xSPRG1; // Special Purpose Reg General1 1E0-1E7
98 u64 xSPRG2; // Special Purpose Reg General2 1E8-1EF
99 u64 xSPRG3; // Special Purpose Reg General3 1F0-1F7
100 u64 xTB; // Time Base Register 1F8-1FF
101
102 u64 xFPR[32]; // Floating Point Registers 200-2FF
103
104 u64 xMSR; // Machine State Register 300-307
105 u64 xNIA; // Next Instruction Address 308-30F
106
107 u64 xDABR; // Data Address Breakpoint Reg 310-317
108 u64 xIABR; // Inst Address Breakpoint Reg 318-31F
109
110 u64 xHID0; // HW Implementation Dependent0 320-327
111
112 u64 xHID4; // HW Implementation Dependent4 328-32F
113 u64 xSCOMd; // SCON Data Reg (SPRG4) 330-337
114 u64 xSCOMc; // SCON Command Reg (SPRG5) 338-33F
115 u64 xSDAR; // Sample Data Address Register 340-347
116 u64 xSIAR; // Sample Inst Address Register 348-34F
117
118 u8 xRsvd3[176]; // Reserved 350-3FF
119};
120
64extern void system_reset_iSeries(void); 121extern void system_reset_iSeries(void);
65extern void machine_check_iSeries(void); 122extern void machine_check_iSeries(void);
66extern void data_access_iSeries(void); 123extern void data_access_iSeries(void);
@@ -129,7 +186,7 @@ struct ItLpNaca itLpNaca = {
129}; 186};
130 187
131/* May be filled in by the hypervisor so cannot end up in the BSS */ 188/* May be filled in by the hypervisor so cannot end up in the BSS */
132struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data"))); 189static struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data")));
133 190
134/* May be filled in by the hypervisor so cannot end up in the BSS */ 191/* May be filled in by the hypervisor so cannot end up in the BSS */
135struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data"))); 192struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data")));
@@ -152,13 +209,54 @@ u64 xMsVpd[3400] __attribute__((__section__(".data")));
152 209
153/* Space for Recovery Log Buffer */ 210/* Space for Recovery Log Buffer */
154/* May be filled in by the hypervisor so cannot end up in the BSS */ 211/* May be filled in by the hypervisor so cannot end up in the BSS */
155u64 xRecoveryLogBuffer[32] __attribute__((__section__(".data"))); 212static u64 xRecoveryLogBuffer[32] __attribute__((__section__(".data")));
156 213
157struct SpCommArea xSpCommArea = { 214static const struct SpCommArea xSpCommArea = {
158 .xDesc = 0xE2D7C3C2, 215 .xDesc = 0xE2D7C3C2,
159 .xFormat = 1, 216 .xFormat = 1,
160}; 217};
161 218
219static const struct ItLpRegSave iseries_reg_save[] = {
220 [0 ... (NR_CPUS-1)] = {
221 .xDesc = 0xd397d9e2, /* "LpRS" */
222 .xSize = sizeof(struct ItLpRegSave),
223 },
224};
225
226#define ALPACA_INIT(number) \
227{ \
228 .lppaca_ptr = &lppaca[number], \
229 .reg_save_ptr = &iseries_reg_save[number], \
230}
231
232const struct alpaca alpaca[] = {
233 ALPACA_INIT( 0),
234#if NR_CPUS > 1
235 ALPACA_INIT( 1), ALPACA_INIT( 2), ALPACA_INIT( 3),
236#if NR_CPUS > 4
237 ALPACA_INIT( 4), ALPACA_INIT( 5), ALPACA_INIT( 6), ALPACA_INIT( 7),
238#if NR_CPUS > 8
239 ALPACA_INIT( 8), ALPACA_INIT( 9), ALPACA_INIT(10), ALPACA_INIT(11),
240 ALPACA_INIT(12), ALPACA_INIT(13), ALPACA_INIT(14), ALPACA_INIT(15),
241 ALPACA_INIT(16), ALPACA_INIT(17), ALPACA_INIT(18), ALPACA_INIT(19),
242 ALPACA_INIT(20), ALPACA_INIT(21), ALPACA_INIT(22), ALPACA_INIT(23),
243 ALPACA_INIT(24), ALPACA_INIT(25), ALPACA_INIT(26), ALPACA_INIT(27),
244 ALPACA_INIT(28), ALPACA_INIT(29), ALPACA_INIT(30), ALPACA_INIT(31),
245#if NR_CPUS > 32
246 ALPACA_INIT(32), ALPACA_INIT(33), ALPACA_INIT(34), ALPACA_INIT(35),
247 ALPACA_INIT(36), ALPACA_INIT(37), ALPACA_INIT(38), ALPACA_INIT(39),
248 ALPACA_INIT(40), ALPACA_INIT(41), ALPACA_INIT(42), ALPACA_INIT(43),
249 ALPACA_INIT(44), ALPACA_INIT(45), ALPACA_INIT(46), ALPACA_INIT(47),
250 ALPACA_INIT(48), ALPACA_INIT(49), ALPACA_INIT(50), ALPACA_INIT(51),
251 ALPACA_INIT(52), ALPACA_INIT(53), ALPACA_INIT(54), ALPACA_INIT(55),
252 ALPACA_INIT(56), ALPACA_INIT(57), ALPACA_INIT(58), ALPACA_INIT(59),
253 ALPACA_INIT(60), ALPACA_INIT(61), ALPACA_INIT(62), ALPACA_INIT(63),
254#endif
255#endif
256#endif
257#endif
258};
259
162/* The LparMap data is now located at offset 0x6000 in head.S 260/* The LparMap data is now located at offset 0x6000 in head.S
163 * It was put there so that the HvReleaseData could address it 261 * It was put there so that the HvReleaseData could address it
164 * with a 32-bit offset as required by the iSeries hypervisor 262 * with a 32-bit offset as required by the iSeries hypervisor
@@ -167,7 +265,7 @@ struct SpCommArea xSpCommArea = {
167 * the Naca via the HvReleaseData area. The HvReleaseData has the 265 * the Naca via the HvReleaseData area. The HvReleaseData has the
168 * offset into the Naca of the pointer to the ItVpdAreas. 266 * offset into the Naca of the pointer to the ItVpdAreas.
169 */ 267 */
170struct ItVpdAreas itVpdAreas = { 268const struct ItVpdAreas itVpdAreas = {
171 .xSlicDesc = 0xc9a3e5c1, /* "ItVA" */ 269 .xSlicDesc = 0xc9a3e5c1, /* "ItVA" */
172 .xSlicSize = sizeof(struct ItVpdAreas), 270 .xSlicSize = sizeof(struct ItVpdAreas),
173 .xSlicVpdEntries = ItVpdMaxEntries, /* # VPD array entries */ 271 .xSlicVpdEntries = ItVpdMaxEntries, /* # VPD array entries */
@@ -185,7 +283,7 @@ struct ItVpdAreas itVpdAreas = {
185 .xSlicVpdLens = { /* VPD lengths */ 283 .xSlicVpdLens = { /* VPD lengths */
186 0,0,0, /* 0 - 2 */ 284 0,0,0, /* 0 - 2 */
187 sizeof(xItExtVpdPanel), /* 3 Extended VPD */ 285 sizeof(xItExtVpdPanel), /* 3 Extended VPD */
188 sizeof(struct paca_struct), /* 4 length of Paca */ 286 sizeof(struct alpaca), /* 4 length of (fake) Paca */
189 0, /* 5 */ 287 0, /* 5 */
190 sizeof(struct ItIplParmsReal),/* 6 length of IPL parms */ 288 sizeof(struct ItIplParmsReal),/* 6 length of IPL parms */
191 26992, /* 7 length of MS VPD */ 289 26992, /* 7 length of MS VPD */
@@ -203,7 +301,7 @@ struct ItVpdAreas itVpdAreas = {
203 .xSlicVpdAdrs = { /* VPD addresses */ 301 .xSlicVpdAdrs = { /* VPD addresses */
204 0,0,0, /* 0 - 2 */ 302 0,0,0, /* 0 - 2 */
205 &xItExtVpdPanel, /* 3 Extended VPD */ 303 &xItExtVpdPanel, /* 3 Extended VPD */
206 &paca[0], /* 4 first Paca */ 304 &alpaca[0], /* 4 first (fake) Paca */
207 0, /* 5 */ 305 0, /* 5 */
208 &xItIplParmsReal, /* 6 IPL parms */ 306 &xItIplParmsReal, /* 6 IPL parms */
209 &xMsVpd, /* 7 MS Vpd */ 307 &xMsVpd, /* 7 MS Vpd */
@@ -219,10 +317,3 @@ struct ItVpdAreas itVpdAreas = {
219 0,0 317 0,0
220 } 318 }
221}; 319};
222
223struct ItLpRegSave iseries_reg_save[] = {
224 [0 ... (NR_CPUS-1)] = {
225 .xDesc = 0xd397d9e2, /* "LpRS" */
226 .xSize = sizeof(struct ItLpRegSave),
227 },
228};
diff --git a/arch/powerpc/platforms/iseries/naca.h b/arch/powerpc/platforms/iseries/naca.h
index ab2372eb8d2e..f01708e12862 100644
--- a/arch/powerpc/platforms/iseries/naca.h
+++ b/arch/powerpc/platforms/iseries/naca.h
@@ -14,7 +14,7 @@
14 14
15struct naca_struct { 15struct naca_struct {
16 /* Kernel only data - undefined for user space */ 16 /* Kernel only data - undefined for user space */
17 void *xItVpdAreas; /* VPD Data 0x00 */ 17 const void *xItVpdAreas; /* VPD Data 0x00 */
18 void *xRamDisk; /* iSeries ramdisk 0x08 */ 18 void *xRamDisk; /* iSeries ramdisk 0x08 */
19 u64 xRamDiskSize; /* In pages 0x10 */ 19 u64 xRamDiskSize; /* In pages 0x10 */
20}; 20};
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index cc562e4c2f32..02a634faedbe 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -23,6 +23,7 @@
23 23
24#undef DEBUG 24#undef DEBUG
25 25
26#include <linux/jiffies.h>
26#include <linux/kernel.h> 27#include <linux/kernel.h>
27#include <linux/list.h> 28#include <linux/list.h>
28#include <linux/string.h> 29#include <linux/string.h>
@@ -586,7 +587,7 @@ static inline struct device_node *xlate_iomm_address(
586 static unsigned long last_jiffies; 587 static unsigned long last_jiffies;
587 static int num_printed; 588 static int num_printed;
588 589
589 if ((jiffies - last_jiffies) > 60 * HZ) { 590 if (time_after(jiffies, last_jiffies + 60 * HZ)) {
590 last_jiffies = jiffies; 591 last_jiffies = jiffies;
591 num_printed = 0; 592 num_printed = 0;
592 } 593 }
diff --git a/arch/powerpc/platforms/iseries/release_data.h b/arch/powerpc/platforms/iseries/release_data.h
index 66189fd2e32d..6ad7d843e8fc 100644
--- a/arch/powerpc/platforms/iseries/release_data.h
+++ b/arch/powerpc/platforms/iseries/release_data.h
@@ -58,6 +58,6 @@ struct HvReleaseData {
58 char xRsvd3[20]; /* Reserved x2C-x3F */ 58 char xRsvd3[20]; /* Reserved x2C-x3F */
59}; 59};
60 60
61extern struct HvReleaseData hvReleaseData; 61extern const struct HvReleaseData hvReleaseData;
62 62
63#endif /* _ISERIES_RELEASE_DATA_H */ 63#endif /* _ISERIES_RELEASE_DATA_H */
diff --git a/arch/powerpc/platforms/iseries/spcomm_area.h b/arch/powerpc/platforms/iseries/spcomm_area.h
index 6e3b685115c9..598b7c14573a 100644
--- a/arch/powerpc/platforms/iseries/spcomm_area.h
+++ b/arch/powerpc/platforms/iseries/spcomm_area.h
@@ -31,6 +31,4 @@ struct SpCommArea {
31 u8 xRsvd2[80]; // Reserved 030-07F 31 u8 xRsvd2[80]; // Reserved 030-07F
32}; 32};
33 33
34extern struct SpCommArea xSpCommArea;
35
36#endif /* _ISERIES_SPCOMM_AREA_H */ 34#endif /* _ISERIES_SPCOMM_AREA_H */
diff --git a/arch/powerpc/platforms/iseries/vpd_areas.h b/arch/powerpc/platforms/iseries/vpd_areas.h
index 601e6dd860ed..feb001f3a5fe 100644
--- a/arch/powerpc/platforms/iseries/vpd_areas.h
+++ b/arch/powerpc/platforms/iseries/vpd_areas.h
@@ -80,9 +80,9 @@ struct ItVpdAreas {
80 u32 xPlicDmaLens[ItDmaMaxEntries];// Array of DMA lengths 080-0A7 80 u32 xPlicDmaLens[ItDmaMaxEntries];// Array of DMA lengths 080-0A7
81 u32 xPlicDmaToks[ItDmaMaxEntries];// Array of DMA tokens 0A8-0CF 81 u32 xPlicDmaToks[ItDmaMaxEntries];// Array of DMA tokens 0A8-0CF
82 u32 xSlicVpdLens[ItVpdMaxEntries];// Array of VPD lengths 0D0-12F 82 u32 xSlicVpdLens[ItVpdMaxEntries];// Array of VPD lengths 0D0-12F
83 void *xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers 130-1EF 83 const void *xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers 130-1EF
84}; 84};
85 85
86extern struct ItVpdAreas itVpdAreas; 86extern const struct ItVpdAreas itVpdAreas;
87 87
88#endif /* _ISERIES_VPD_AREAS_H */ 88#endif /* _ISERIES_VPD_AREAS_H */
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 3ffa0ac170ee..301855263b81 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -592,50 +592,3 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
592 } 592 }
593 return irq; 593 return irq;
594} 594}
595
596/* XXX: To remove once all firmwares are ok */
597static void fixup_maple_ide(struct pci_dev* dev)
598{
599 if (!machine_is(maple))
600 return;
601
602#if 0 /* Enable this to enable IDE port 0 */
603 {
604 u8 v;
605
606 pci_read_config_byte(dev, 0x40, &v);
607 v |= 2;
608 pci_write_config_byte(dev, 0x40, v);
609 }
610#endif
611#if 0 /* fix bus master base */
612 pci_write_config_dword(dev, 0x20, 0xcc01);
613 printk("old ide resource: %lx -> %lx \n",
614 dev->resource[4].start, dev->resource[4].end);
615 dev->resource[4].start = 0xcc00;
616 dev->resource[4].end = 0xcc10;
617#endif
618#if 0 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */
619 {
620 struct pci_dev *apicdev;
621 u32 v;
622
623 apicdev = pci_get_slot (dev->bus, PCI_DEVFN(5,0));
624 if (apicdev == NULL)
625 printk("IDE Fixup IRQ: Can't find IO-APIC !\n");
626 else {
627 pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*14);
628 pci_read_config_dword(apicdev, 0xf4, &v);
629 v &= ~0x00000022;
630 pci_write_config_dword(apicdev, 0xf4, v);
631 pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*15);
632 pci_read_config_dword(apicdev, 0xf4, &v);
633 v &= ~0x00000022;
634 pci_write_config_dword(apicdev, 0xf4, v);
635 pci_dev_put(apicdev);
636 }
637 }
638#endif
639}
640DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE,
641 fixup_maple_ide);
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 3ce2d73b4177..364714757cf1 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -43,6 +43,7 @@
43#include <linux/smp.h> 43#include <linux/smp.h>
44#include <linux/bitops.h> 44#include <linux/bitops.h>
45#include <linux/of_device.h> 45#include <linux/of_device.h>
46#include <linux/lmb.h>
46 47
47#include <asm/processor.h> 48#include <asm/processor.h>
48#include <asm/sections.h> 49#include <asm/sections.h>
@@ -57,7 +58,6 @@
57#include <asm/dma.h> 58#include <asm/dma.h>
58#include <asm/cputable.h> 59#include <asm/cputable.h>
59#include <asm/time.h> 60#include <asm/time.h>
60#include <asm/lmb.h>
61#include <asm/mpic.h> 61#include <asm/mpic.h>
62#include <asm/rtas.h> 62#include <asm/rtas.h>
63#include <asm/udbg.h> 63#include <asm/udbg.h>
@@ -319,7 +319,7 @@ static int __init maple_probe(void)
319 return 1; 319 return 1;
320} 320}
321 321
322define_machine(maple_md) { 322define_machine(maple) {
323 .name = "Maple", 323 .name = "Maple",
324 .probe = maple_probe, 324 .probe = maple_probe,
325 .setup_arch = maple_setup_arch, 325 .setup_arch = maple_setup_arch,
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c
index c529d8dff395..217af321b0ca 100644
--- a/arch/powerpc/platforms/pasemi/dma_lib.c
+++ b/arch/powerpc/platforms/pasemi/dma_lib.c
@@ -17,6 +17,7 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/kernel.h>
20#include <linux/init.h> 21#include <linux/init.h>
21#include <linux/module.h> 22#include <linux/module.h>
22#include <linux/pci.h> 23#include <linux/pci.h>
@@ -26,6 +27,8 @@
26 27
27#define MAX_TXCH 64 28#define MAX_TXCH 64
28#define MAX_RXCH 64 29#define MAX_RXCH 64
30#define MAX_FLAGS 64
31#define MAX_FUN 8
29 32
30static struct pasdma_status *dma_status; 33static struct pasdma_status *dma_status;
31 34
@@ -43,6 +46,8 @@ static struct pci_dev *dma_pdev;
43 46
44static DECLARE_BITMAP(txch_free, MAX_TXCH); 47static DECLARE_BITMAP(txch_free, MAX_TXCH);
45static DECLARE_BITMAP(rxch_free, MAX_RXCH); 48static DECLARE_BITMAP(rxch_free, MAX_RXCH);
49static DECLARE_BITMAP(flags_free, MAX_FLAGS);
50static DECLARE_BITMAP(fun_free, MAX_FUN);
46 51
47/* pasemi_read_iob_reg - read IOB register 52/* pasemi_read_iob_reg - read IOB register
48 * @reg: Register to read (offset into PCI CFG space) 53 * @reg: Register to read (offset into PCI CFG space)
@@ -373,6 +378,106 @@ void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size,
373} 378}
374EXPORT_SYMBOL(pasemi_dma_free_buf); 379EXPORT_SYMBOL(pasemi_dma_free_buf);
375 380
381/* pasemi_dma_alloc_flag - Allocate a flag (event) for channel syncronization
382 *
383 * Allocates a flag for use with channel syncronization (event descriptors).
384 * Returns allocated flag (0-63), < 0 on error.
385 */
386int pasemi_dma_alloc_flag(void)
387{
388 int bit;
389
390retry:
391 bit = find_next_bit(flags_free, MAX_FLAGS, 0);
392 if (bit >= MAX_FLAGS)
393 return -ENOSPC;
394 if (!test_and_clear_bit(bit, flags_free))
395 goto retry;
396
397 return bit;
398}
399EXPORT_SYMBOL(pasemi_dma_alloc_flag);
400
401
402/* pasemi_dma_free_flag - Deallocates a flag (event)
403 * @flag: Flag number to deallocate
404 *
405 * Frees up a flag so it can be reused for other purposes.
406 */
407void pasemi_dma_free_flag(int flag)
408{
409 BUG_ON(test_bit(flag, flags_free));
410 BUG_ON(flag >= MAX_FLAGS);
411 set_bit(flag, flags_free);
412}
413EXPORT_SYMBOL(pasemi_dma_free_flag);
414
415
416/* pasemi_dma_set_flag - Sets a flag (event) to 1
417 * @flag: Flag number to set active
418 *
419 * Sets the flag provided to 1.
420 */
421void pasemi_dma_set_flag(int flag)
422{
423 BUG_ON(flag >= MAX_FLAGS);
424 if (flag < 32)
425 pasemi_write_dma_reg(PAS_DMA_TXF_SFLG0, 1 << flag);
426 else
427 pasemi_write_dma_reg(PAS_DMA_TXF_SFLG1, 1 << flag);
428}
429EXPORT_SYMBOL(pasemi_dma_set_flag);
430
431/* pasemi_dma_clear_flag - Sets a flag (event) to 0
432 * @flag: Flag number to set inactive
433 *
434 * Sets the flag provided to 0.
435 */
436void pasemi_dma_clear_flag(int flag)
437{
438 BUG_ON(flag >= MAX_FLAGS);
439 if (flag < 32)
440 pasemi_write_dma_reg(PAS_DMA_TXF_CFLG0, 1 << flag);
441 else
442 pasemi_write_dma_reg(PAS_DMA_TXF_CFLG1, 1 << flag);
443}
444EXPORT_SYMBOL(pasemi_dma_clear_flag);
445
446/* pasemi_dma_alloc_fun - Allocate a function engine
447 *
448 * Allocates a function engine to use for crypto/checksum offload
449 * Returns allocated engine (0-8), < 0 on error.
450 */
451int pasemi_dma_alloc_fun(void)
452{
453 int bit;
454
455retry:
456 bit = find_next_bit(fun_free, MAX_FLAGS, 0);
457 if (bit >= MAX_FLAGS)
458 return -ENOSPC;
459 if (!test_and_clear_bit(bit, fun_free))
460 goto retry;
461
462 return bit;
463}
464EXPORT_SYMBOL(pasemi_dma_alloc_fun);
465
466
467/* pasemi_dma_free_fun - Deallocates a function engine
468 * @flag: Engine number to deallocate
469 *
470 * Frees up a function engine so it can be used for other purposes.
471 */
472void pasemi_dma_free_fun(int fun)
473{
474 BUG_ON(test_bit(fun, fun_free));
475 BUG_ON(fun >= MAX_FLAGS);
476 set_bit(fun, fun_free);
477}
478EXPORT_SYMBOL(pasemi_dma_free_fun);
479
480
376static void *map_onedev(struct pci_dev *p, int index) 481static void *map_onedev(struct pci_dev *p, int index)
377{ 482{
378 struct device_node *dn; 483 struct device_node *dn;
@@ -410,6 +515,7 @@ int pasemi_dma_init(void)
410 struct resource res; 515 struct resource res;
411 struct device_node *dn; 516 struct device_node *dn;
412 int i, intf, err = 0; 517 int i, intf, err = 0;
518 unsigned long timeout;
413 u32 tmp; 519 u32 tmp;
414 520
415 if (!machine_is(pasemi)) 521 if (!machine_is(pasemi))
@@ -478,6 +584,44 @@ int pasemi_dma_init(void)
478 for (i = 0; i < MAX_RXCH; i++) 584 for (i = 0; i < MAX_RXCH; i++)
479 __set_bit(i, rxch_free); 585 __set_bit(i, rxch_free);
480 586
587 timeout = jiffies + HZ;
588 pasemi_write_dma_reg(PAS_DMA_COM_RXCMD, 0);
589 while (pasemi_read_dma_reg(PAS_DMA_COM_RXSTA) & 1) {
590 if (time_after(jiffies, timeout)) {
591 pr_warning("Warning: Could not disable RX section\n");
592 break;
593 }
594 }
595
596 timeout = jiffies + HZ;
597 pasemi_write_dma_reg(PAS_DMA_COM_TXCMD, 0);
598 while (pasemi_read_dma_reg(PAS_DMA_COM_TXSTA) & 1) {
599 if (time_after(jiffies, timeout)) {
600 pr_warning("Warning: Could not disable TX section\n");
601 break;
602 }
603 }
604
605 /* setup resource allocations for the different DMA sections */
606 tmp = pasemi_read_dma_reg(PAS_DMA_COM_CFG);
607 pasemi_write_dma_reg(PAS_DMA_COM_CFG, tmp | 0x18000000);
608
609 /* enable tx section */
610 pasemi_write_dma_reg(PAS_DMA_COM_TXCMD, PAS_DMA_COM_TXCMD_EN);
611
612 /* enable rx section */
613 pasemi_write_dma_reg(PAS_DMA_COM_RXCMD, PAS_DMA_COM_RXCMD_EN);
614
615 for (i = 0; i < MAX_FLAGS; i++)
616 __set_bit(i, flags_free);
617
618 for (i = 0; i < MAX_FUN; i++)
619 __set_bit(i, fun_free);
620
621 /* clear all status flags */
622 pasemi_write_dma_reg(PAS_DMA_TXF_CFLG0, 0xffffffff);
623 pasemi_write_dma_reg(PAS_DMA_TXF_CFLG1, 0xffffffff);
624
481 printk(KERN_INFO "PA Semi PWRficient DMA library initialized " 625 printk(KERN_INFO "PA Semi PWRficient DMA library initialized "
482 "(%d tx, %d rx channels)\n", num_txch, num_rxch); 626 "(%d tx, %d rx channels)\n", num_txch, num_rxch);
483 627
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 5803f11c77fc..86967bdd8774 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2005-2007, PA Semi, Inc 2 * Copyright (C) 2005-2008, PA Semi, Inc
3 * 3 *
4 * Maintained by: Olof Johansson <olof@lixom.net> 4 * Maintained by: Olof Johansson <olof@lixom.net>
5 * 5 *
@@ -27,7 +27,6 @@
27#include <asm/abs_addr.h> 27#include <asm/abs_addr.h>
28#include <asm/firmware.h> 28#include <asm/firmware.h>
29 29
30
31#define IOBMAP_PAGE_SHIFT 12 30#define IOBMAP_PAGE_SHIFT 12
32#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT) 31#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
33#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1) 32#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
@@ -35,13 +34,13 @@
35#define IOB_BASE 0xe0000000 34#define IOB_BASE 0xe0000000
36#define IOB_SIZE 0x3000 35#define IOB_SIZE 0x3000
37/* Configuration registers */ 36/* Configuration registers */
38#define IOBCAP_REG 0x10 37#define IOBCAP_REG 0x40
39#define IOBCOM_REG 0x40 38#define IOBCOM_REG 0x100
40/* Enable IOB address translation */ 39/* Enable IOB address translation */
41#define IOBCOM_ATEN 0x00000100 40#define IOBCOM_ATEN 0x00000100
42 41
43/* Address decode configuration register */ 42/* Address decode configuration register */
44#define IOB_AD_REG 0x53 43#define IOB_AD_REG 0x14c
45/* IOBCOM_AD_REG fields */ 44/* IOBCOM_AD_REG fields */
46#define IOB_AD_VGPRT 0x00000e00 45#define IOB_AD_VGPRT 0x00000e00
47#define IOB_AD_VGAEN 0x00000100 46#define IOB_AD_VGAEN 0x00000100
@@ -56,13 +55,13 @@
56#define IOB_AD_TRNG_2G 0x00000001 55#define IOB_AD_TRNG_2G 0x00000001
57#define IOB_AD_TRNG_128G 0x00000003 56#define IOB_AD_TRNG_128G 0x00000003
58 57
59#define IOB_TABLEBASE_REG 0x55 58#define IOB_TABLEBASE_REG 0x154
60 59
61/* Base of the 64 4-byte L1 registers */ 60/* Base of the 64 4-byte L1 registers */
62#define IOB_XLT_L1_REGBASE 0xac0 61#define IOB_XLT_L1_REGBASE 0x2b00
63 62
64/* Register to invalidate TLB entries */ 63/* Register to invalidate TLB entries */
65#define IOB_AT_INVAL_TLB_REG 0xb40 64#define IOB_AT_INVAL_TLB_REG 0x2d00
66 65
67/* The top two bits of the level 1 entry contains valid and type flags */ 66/* The top two bits of the level 1 entry contains valid and type flags */
68#define IOBMAP_L1E_V 0x40000000 67#define IOBMAP_L1E_V 0x40000000
@@ -76,7 +75,7 @@
76#define IOBMAP_L2E_V 0x80000000 75#define IOBMAP_L2E_V 0x80000000
77#define IOBMAP_L2E_V_CACHED 0xc0000000 76#define IOBMAP_L2E_V_CACHED 0xc0000000
78 77
79static u32 __iomem *iob; 78static void __iomem *iob;
80static u32 iob_l1_emptyval; 79static u32 iob_l1_emptyval;
81static u32 iob_l2_emptyval; 80static u32 iob_l2_emptyval;
82static u32 *iob_l2_base; 81static u32 *iob_l2_base;
@@ -219,7 +218,7 @@ int __init iob_init(struct device_node *dn)
219 for (i = 0; i < 64; i++) { 218 for (i = 0; i < 64; i++) {
220 /* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */ 219 /* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */
221 regword = IOBMAP_L1E_V | (__pa(iob_l2_base + i*0x2000) >> 12); 220 regword = IOBMAP_L1E_V | (__pa(iob_l2_base + i*0x2000) >> 12);
222 out_le32(iob+IOB_XLT_L1_REGBASE+i, regword); 221 out_le32(iob+IOB_XLT_L1_REGBASE+i*4, regword);
223 } 222 }
224 223
225 /* set 2GB translation window, based at 0 */ 224 /* set 2GB translation window, based at 0 */
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 85434231ae14..96d5ce50364e 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -12,7 +12,6 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/mutex.h> 13#include <linux/mutex.h>
14 14
15#include <asm/semaphore.h>
16#include <asm/prom.h> 15#include <asm/prom.h>
17#include <asm/pmac_pfunc.h> 16#include <asm/pmac_pfunc.h>
18 17
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 2693fc371eab..bf44c5441a36 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -53,6 +53,7 @@
53#include <linux/suspend.h> 53#include <linux/suspend.h>
54#include <linux/of_device.h> 54#include <linux/of_device.h>
55#include <linux/of_platform.h> 55#include <linux/of_platform.h>
56#include <linux/lmb.h>
56 57
57#include <asm/reg.h> 58#include <asm/reg.h>
58#include <asm/sections.h> 59#include <asm/sections.h>
@@ -74,7 +75,6 @@
74#include <asm/iommu.h> 75#include <asm/iommu.h>
75#include <asm/smu.h> 76#include <asm/smu.h>
76#include <asm/pmc.h> 77#include <asm/pmc.h>
77#include <asm/lmb.h>
78#include <asm/udbg.h> 78#include <asm/udbg.h>
79 79
80#include "pmac.h" 80#include "pmac.h"
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index 9d251d0ca8c6..3866debfa3c4 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -499,41 +499,14 @@ static int __init ps3_register_graphics_devices(void)
499} 499}
500 500
501/** 501/**
502 * ps3_register_repository_device - Register a device from the repositiory info. 502 * ps3_setup_dynamic_device - Setup a dynamic device from the repository
503 *
504 */ 503 */
505 504
506static int ps3_register_repository_device( 505static int ps3_setup_dynamic_device(const struct ps3_repository_device *repo)
507 const struct ps3_repository_device *repo)
508{ 506{
509 int result; 507 int result;
510 508
511 switch (repo->dev_type) { 509 switch (repo->dev_type) {
512 case PS3_DEV_TYPE_SB_GELIC:
513 result = ps3_setup_gelic_device(repo);
514 if (result) {
515 pr_debug("%s:%d ps3_setup_gelic_device failed\n",
516 __func__, __LINE__);
517 }
518 break;
519 case PS3_DEV_TYPE_SB_USB:
520
521 /* Each USB device has both an EHCI and an OHCI HC */
522
523 result = ps3_setup_ehci_device(repo);
524
525 if (result) {
526 pr_debug("%s:%d ps3_setup_ehci_device failed\n",
527 __func__, __LINE__);
528 }
529
530 result = ps3_setup_ohci_device(repo);
531
532 if (result) {
533 pr_debug("%s:%d ps3_setup_ohci_device failed\n",
534 __func__, __LINE__);
535 }
536 break;
537 case PS3_DEV_TYPE_STOR_DISK: 510 case PS3_DEV_TYPE_STOR_DISK:
538 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK); 511 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK);
539 512
@@ -572,6 +545,48 @@ static int ps3_register_repository_device(
572 return result; 545 return result;
573} 546}
574 547
548/**
549 * ps3_setup_static_device - Setup a static device from the repository
550 */
551
552static int __init ps3_setup_static_device(const struct ps3_repository_device *repo)
553{
554 int result;
555
556 switch (repo->dev_type) {
557 case PS3_DEV_TYPE_SB_GELIC:
558 result = ps3_setup_gelic_device(repo);
559 if (result) {
560 pr_debug("%s:%d ps3_setup_gelic_device failed\n",
561 __func__, __LINE__);
562 }
563 break;
564 case PS3_DEV_TYPE_SB_USB:
565
566 /* Each USB device has both an EHCI and an OHCI HC */
567
568 result = ps3_setup_ehci_device(repo);
569
570 if (result) {
571 pr_debug("%s:%d ps3_setup_ehci_device failed\n",
572 __func__, __LINE__);
573 }
574
575 result = ps3_setup_ohci_device(repo);
576
577 if (result) {
578 pr_debug("%s:%d ps3_setup_ohci_device failed\n",
579 __func__, __LINE__);
580 }
581 break;
582
583 default:
584 return ps3_setup_dynamic_device(repo);
585 }
586
587 return result;
588}
589
575static void ps3_find_and_add_device(u64 bus_id, u64 dev_id) 590static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
576{ 591{
577 struct ps3_repository_device repo; 592 struct ps3_repository_device repo;
@@ -601,7 +616,7 @@ found:
601 pr_debug("%s:%u: device %lu:%lu found after %u retries\n", 616 pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
602 __func__, __LINE__, bus_id, dev_id, retries); 617 __func__, __LINE__, bus_id, dev_id, retries);
603 618
604 ps3_register_repository_device(&repo); 619 ps3_setup_dynamic_device(&repo);
605 return; 620 return;
606} 621}
607 622
@@ -905,8 +920,7 @@ static int __init ps3_register_devices(void)
905 920
906 ps3_register_graphics_devices(); 921 ps3_register_graphics_devices();
907 922
908 ps3_repository_find_devices(PS3_BUS_TYPE_SB, 923 ps3_repository_find_devices(PS3_BUS_TYPE_SB, ps3_setup_static_device);
909 ps3_register_repository_device);
910 924
911 ps3_register_sound_devices(); 925 ps3_register_sound_devices();
912 926
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index 7382f195c4f8..1cf901fa9031 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -19,9 +19,10 @@
19 */ 19 */
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/lmb.h>
22 23
23#include <asm/machdep.h> 24#include <asm/machdep.h>
24#include <asm/lmb.h> 25#include <asm/prom.h>
25#include <asm/udbg.h> 26#include <asm/udbg.h>
26#include <asm/lv1call.h> 27#include <asm/lv1call.h>
27#include <asm/ps3fb.h> 28#include <asm/ps3fb.h>
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 3a6db04aa940..a14e5cdc2fed 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -709,7 +709,7 @@ static unsigned int ps3_get_irq(void)
709 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x)); 709 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x));
710 plug &= 0x3f; 710 plug &= 0x3f;
711 711
712 if (unlikely(plug) == NO_IRQ) { 712 if (unlikely(plug == NO_IRQ)) {
713 pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__, 713 pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
714 __LINE__, pd->thread_id); 714 __LINE__, pd->thread_id);
715 dump_bmp(&per_cpu(ps3_private, 0)); 715 dump_bmp(&per_cpu(ps3_private, 0));
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 68900476c842..5b3fb2b321ab 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -21,9 +21,10 @@
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/memory_hotplug.h> 23#include <linux/memory_hotplug.h>
24#include <linux/lmb.h>
24 25
25#include <asm/firmware.h> 26#include <asm/firmware.h>
26#include <asm/lmb.h> 27#include <asm/prom.h>
27#include <asm/udbg.h> 28#include <asm/udbg.h>
28#include <asm/lv1call.h> 29#include <asm/lv1call.h>
29 30
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index b9ea09d9d2fb..c73379ec9141 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -24,8 +24,9 @@
24#include <linux/fs.h> 24#include <linux/fs.h>
25#include <linux/syscalls.h> 25#include <linux/syscalls.h>
26#include <linux/ctype.h> 26#include <linux/ctype.h>
27#include <linux/lmb.h>
27 28
28#include <asm/lmb.h> 29#include <asm/prom.h>
29 30
30#include "platform.h" 31#include "platform.h"
31 32
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 5c2cbb08eb52..a413abbd4123 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -95,6 +95,14 @@ static void ps3_power_off(void)
95 ps3_sys_manager_power_off(); /* never returns */ 95 ps3_sys_manager_power_off(); /* never returns */
96} 96}
97 97
98static void ps3_halt(void)
99{
100 DBG("%s:%d\n", __func__, __LINE__);
101
102 smp_send_stop();
103 ps3_sys_manager_halt(); /* never returns */
104}
105
98static void ps3_panic(char *str) 106static void ps3_panic(char *str)
99{ 107{
100 DBG("%s:%d %s\n", __func__, __LINE__, str); 108 DBG("%s:%d %s\n", __func__, __LINE__, str);
@@ -105,7 +113,8 @@ static void ps3_panic(char *str)
105 printk(" Please press POWER button.\n"); 113 printk(" Please press POWER button.\n");
106 printk("\n"); 114 printk("\n");
107 115
108 while(1); 116 while(1)
117 lv1_pause(1);
109} 118}
110 119
111#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ 120#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
@@ -117,7 +126,7 @@ static void __init prealloc(struct ps3_prealloc *p)
117 126
118 p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS)); 127 p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS));
119 if (!p->address) { 128 if (!p->address) {
120 printk(KERN_ERR "%s: Cannot allocate %s\n", __FUNCTION__, 129 printk(KERN_ERR "%s: Cannot allocate %s\n", __func__,
121 p->name); 130 p->name);
122 return; 131 return;
123 } 132 }
@@ -266,6 +275,7 @@ define_machine(ps3) {
266 .progress = ps3_progress, 275 .progress = ps3_progress,
267 .restart = ps3_restart, 276 .restart = ps3_restart,
268 .power_off = ps3_power_off, 277 .power_off = ps3_power_off,
278 .halt = ps3_halt,
269#if defined(CONFIG_KEXEC) 279#if defined(CONFIG_KEXEC)
270 .kexec_cpu_down = ps3_kexec_cpu_down, 280 .kexec_cpu_down = ps3_kexec_cpu_down,
271 .machine_kexec = default_machine_kexec, 281 .machine_kexec = default_machine_kexec,
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 5ad41189b494..d135cef9ed6a 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -27,6 +27,7 @@
27#include <asm/spu.h> 27#include <asm/spu.h>
28#include <asm/spu_priv1.h> 28#include <asm/spu_priv1.h>
29#include <asm/lv1call.h> 29#include <asm/lv1call.h>
30#include <asm/ps3.h>
30 31
31#include "../cell/spufs/spufs.h" 32#include "../cell/spufs/spufs.h"
32#include "platform.h" 33#include "platform.h"
@@ -140,6 +141,12 @@ static void _dump_areas(unsigned int spe_id, unsigned long priv2,
140 pr_debug("%s:%d: shadow: %lxh\n", func, line, shadow); 141 pr_debug("%s:%d: shadow: %lxh\n", func, line, shadow);
141} 142}
142 143
144inline u64 ps3_get_spe_id(void *arg)
145{
146 return spu_pdata(arg)->spe_id;
147}
148EXPORT_SYMBOL_GPL(ps3_get_spe_id);
149
143static unsigned long get_vas_id(void) 150static unsigned long get_vas_id(void)
144{ 151{
145 unsigned long id; 152 unsigned long id;
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 992ba6753cf2..bdae04bb7a01 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -18,3 +18,4 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
18obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o 18obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o
19obj-$(CONFIG_HVCS) += hvcserver.o 19obj-$(CONFIG_HVCS) += hvcserver.o
20obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o 20obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o
21obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 9eb539ee5f9a..550b2f7d2cc1 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -945,7 +945,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
945 unsigned int rets[3]; 945 unsigned int rets[3];
946 struct eeh_early_enable_info *info = data; 946 struct eeh_early_enable_info *info = data;
947 int ret; 947 int ret;
948 const char *status = of_get_property(dn, "status", NULL);
949 const u32 *class_code = of_get_property(dn, "class-code", NULL); 948 const u32 *class_code = of_get_property(dn, "class-code", NULL);
950 const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL); 949 const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
951 const u32 *device_id = of_get_property(dn, "device-id", NULL); 950 const u32 *device_id = of_get_property(dn, "device-id", NULL);
@@ -959,8 +958,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
959 pdn->eeh_freeze_count = 0; 958 pdn->eeh_freeze_count = 0;
960 pdn->eeh_false_positives = 0; 959 pdn->eeh_false_positives = 0;
961 960
962 if (status && strncmp(status, "ok", 2) != 0) 961 if (!of_device_is_available(dn))
963 return NULL; /* ignore devices with bad status */ 962 return NULL;
964 963
965 /* Ignore bad nodes. */ 964 /* Ignore bad nodes. */
966 if (!class_code || !vendor_id || !device_id) 965 if (!class_code || !vendor_id || !device_id)
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 9a455d46379d..9235c469449e 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -40,6 +40,7 @@
40#include <asm/smp.h> 40#include <asm/smp.h>
41 41
42#include "plpar_wrappers.h" 42#include "plpar_wrappers.h"
43#include "pseries.h"
43 44
44#ifdef DEBUG_LOW 45#ifdef DEBUG_LOW
45#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) 46#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0)
@@ -203,7 +204,6 @@ void __init find_udbg_vterm(void)
203 struct device_node *stdout_node; 204 struct device_node *stdout_node;
204 const u32 *termno; 205 const u32 *termno;
205 const char *name; 206 const char *name;
206 int add_console;
207 207
208 /* find the boot console from /chosen/stdout */ 208 /* find the boot console from /chosen/stdout */
209 if (!of_chosen) 209 if (!of_chosen)
@@ -219,8 +219,6 @@ void __init find_udbg_vterm(void)
219 printk(KERN_WARNING "stdout node missing 'name' property!\n"); 219 printk(KERN_WARNING "stdout node missing 'name' property!\n");
220 goto out; 220 goto out;
221 } 221 }
222 /* The user has requested a console so this is already set up. */
223 add_console = !strstr(cmd_line, "console=");
224 222
225 /* Check if it's a virtual terminal */ 223 /* Check if it's a virtual terminal */
226 if (strncmp(name, "vty", 3) != 0) 224 if (strncmp(name, "vty", 3) != 0)
@@ -234,15 +232,13 @@ void __init find_udbg_vterm(void)
234 udbg_putc = udbg_putcLP; 232 udbg_putc = udbg_putcLP;
235 udbg_getc = udbg_getcLP; 233 udbg_getc = udbg_getcLP;
236 udbg_getc_poll = udbg_getc_pollLP; 234 udbg_getc_poll = udbg_getc_pollLP;
237 if (add_console) 235 add_preferred_console("hvc", termno[0] & 0xff, NULL);
238 add_preferred_console("hvc", termno[0] & 0xff, NULL);
239 } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { 236 } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) {
240 vtermno = termno[0]; 237 vtermno = termno[0];
241 udbg_putc = udbg_hvsi_putc; 238 udbg_putc = udbg_hvsi_putc;
242 udbg_getc = udbg_hvsi_getc; 239 udbg_getc = udbg_hvsi_getc;
243 udbg_getc_poll = udbg_hvsi_getc_poll; 240 udbg_getc_poll = udbg_hvsi_getc_poll;
244 if (add_console) 241 add_preferred_console("hvsi", termno[0] & 0xff, NULL);
245 add_preferred_console("hvsi", termno[0] & 0xff, NULL);
246 } 242 }
247out: 243out:
248 of_node_put(stdout_node); 244 of_node_put(stdout_node);
@@ -520,6 +516,20 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
520 BUG_ON(lpar_rc != H_SUCCESS); 516 BUG_ON(lpar_rc != H_SUCCESS);
521} 517}
522 518
519static void pSeries_lpar_hpte_removebolted(unsigned long ea,
520 int psize, int ssize)
521{
522 unsigned long slot, vsid, va;
523
524 vsid = get_kernel_vsid(ea, ssize);
525 va = hpt_va(ea, vsid, ssize);
526
527 slot = pSeries_lpar_hpte_find(va, psize, ssize);
528 BUG_ON(slot == -1);
529
530 pSeries_lpar_hpte_invalidate(slot, va, psize, ssize, 0);
531}
532
523/* Flag bits for H_BULK_REMOVE */ 533/* Flag bits for H_BULK_REMOVE */
524#define HBR_REQUEST 0x4000000000000000UL 534#define HBR_REQUEST 0x4000000000000000UL
525#define HBR_RESPONSE 0x8000000000000000UL 535#define HBR_RESPONSE 0x8000000000000000UL
@@ -597,6 +607,7 @@ void __init hpte_init_lpar(void)
597 ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp; 607 ppc_md.hpte_updateboltedpp = pSeries_lpar_hpte_updateboltedpp;
598 ppc_md.hpte_insert = pSeries_lpar_hpte_insert; 608 ppc_md.hpte_insert = pSeries_lpar_hpte_insert;
599 ppc_md.hpte_remove = pSeries_lpar_hpte_remove; 609 ppc_md.hpte_remove = pSeries_lpar_hpte_remove;
610 ppc_md.hpte_removebolted = pSeries_lpar_hpte_removebolted;
600 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; 611 ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
601 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; 612 ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear;
602} 613}
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 5a5a19e40bb4..0d7229cde0e9 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -123,7 +123,7 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
123 /* Add to children of PCI bridge dev->bus */ 123 /* Add to children of PCI bridge dev->bus */
124 child_bus = pci_add_new_bus(dev->bus, dev, sec_busno); 124 child_bus = pci_add_new_bus(dev->bus, dev, sec_busno);
125 if (!child_bus) { 125 if (!child_bus) {
126 printk (KERN_ERR "%s: could not add second bus\n", __FUNCTION__); 126 printk (KERN_ERR "%s: could not add second bus\n", __func__);
127 return -EIO; 127 return -EIO;
128 } 128 }
129 sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number); 129 sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number);
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c
new file mode 100644
index 000000000000..edbc012c2ebc
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/phyp_dump.c
@@ -0,0 +1,507 @@
1/*
2 * Hypervisor-assisted dump
3 *
4 * Linas Vepstas, Manish Ahuja 2008
5 * Copyright 2008 IBM Corp.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 *
12 */
13
14#include <linux/init.h>
15#include <linux/kobject.h>
16#include <linux/mm.h>
17#include <linux/of.h>
18#include <linux/pfn.h>
19#include <linux/swap.h>
20#include <linux/sysfs.h>
21
22#include <asm/page.h>
23#include <asm/phyp_dump.h>
24#include <asm/machdep.h>
25#include <asm/prom.h>
26#include <asm/rtas.h>
27
28/* Variables, used to communicate data between early boot and late boot */
29static struct phyp_dump phyp_dump_vars;
30struct phyp_dump *phyp_dump_info = &phyp_dump_vars;
31
32static int ibm_configure_kernel_dump;
33/* ------------------------------------------------- */
34/* RTAS interfaces to declare the dump regions */
35
36struct dump_section {
37 u32 dump_flags;
38 u16 source_type;
39 u16 error_flags;
40 u64 source_address;
41 u64 source_length;
42 u64 length_copied;
43 u64 destination_address;
44};
45
46struct phyp_dump_header {
47 u32 version;
48 u16 num_of_sections;
49 u16 status;
50
51 u32 first_offset_section;
52 u32 dump_disk_section;
53 u64 block_num_dd;
54 u64 num_of_blocks_dd;
55 u32 offset_dd;
56 u32 maxtime_to_auto;
57 /* No dump disk path string used */
58
59 struct dump_section cpu_data;
60 struct dump_section hpte_data;
61 struct dump_section kernel_data;
62};
63
64/* The dump header *must be* in low memory, so .bss it */
65static struct phyp_dump_header phdr;
66
67#define NUM_DUMP_SECTIONS 3
68#define DUMP_HEADER_VERSION 0x1
69#define DUMP_REQUEST_FLAG 0x1
70#define DUMP_SOURCE_CPU 0x0001
71#define DUMP_SOURCE_HPTE 0x0002
72#define DUMP_SOURCE_RMO 0x0011
73#define DUMP_ERROR_FLAG 0x2000
74#define DUMP_TRIGGERED 0x4000
75#define DUMP_PERFORMED 0x8000
76
77
78/**
79 * init_dump_header() - initialize the header declaring a dump
80 * Returns: length of dump save area.
81 *
82 * When the hypervisor saves crashed state, it needs to put
83 * it somewhere. The dump header tells the hypervisor where
84 * the data can be saved.
85 */
86static unsigned long init_dump_header(struct phyp_dump_header *ph)
87{
88 unsigned long addr_offset = 0;
89
90 /* Set up the dump header */
91 ph->version = DUMP_HEADER_VERSION;
92 ph->num_of_sections = NUM_DUMP_SECTIONS;
93 ph->status = 0;
94
95 ph->first_offset_section =
96 (u32)offsetof(struct phyp_dump_header, cpu_data);
97 ph->dump_disk_section = 0;
98 ph->block_num_dd = 0;
99 ph->num_of_blocks_dd = 0;
100 ph->offset_dd = 0;
101
102 ph->maxtime_to_auto = 0; /* disabled */
103
104 /* The first two sections are mandatory */
105 ph->cpu_data.dump_flags = DUMP_REQUEST_FLAG;
106 ph->cpu_data.source_type = DUMP_SOURCE_CPU;
107 ph->cpu_data.source_address = 0;
108 ph->cpu_data.source_length = phyp_dump_info->cpu_state_size;
109 ph->cpu_data.destination_address = addr_offset;
110 addr_offset += phyp_dump_info->cpu_state_size;
111
112 ph->hpte_data.dump_flags = DUMP_REQUEST_FLAG;
113 ph->hpte_data.source_type = DUMP_SOURCE_HPTE;
114 ph->hpte_data.source_address = 0;
115 ph->hpte_data.source_length = phyp_dump_info->hpte_region_size;
116 ph->hpte_data.destination_address = addr_offset;
117 addr_offset += phyp_dump_info->hpte_region_size;
118
119 /* This section describes the low kernel region */
120 ph->kernel_data.dump_flags = DUMP_REQUEST_FLAG;
121 ph->kernel_data.source_type = DUMP_SOURCE_RMO;
122 ph->kernel_data.source_address = PHYP_DUMP_RMR_START;
123 ph->kernel_data.source_length = PHYP_DUMP_RMR_END;
124 ph->kernel_data.destination_address = addr_offset;
125 addr_offset += ph->kernel_data.source_length;
126
127 return addr_offset;
128}
129
130static void print_dump_header(const struct phyp_dump_header *ph)
131{
132#ifdef DEBUG
133 printk(KERN_INFO "dump header:\n");
134 /* setup some ph->sections required */
135 printk(KERN_INFO "version = %d\n", ph->version);
136 printk(KERN_INFO "Sections = %d\n", ph->num_of_sections);
137 printk(KERN_INFO "Status = 0x%x\n", ph->status);
138
139 /* No ph->disk, so all should be set to 0 */
140 printk(KERN_INFO "Offset to first section 0x%x\n",
141 ph->first_offset_section);
142 printk(KERN_INFO "dump disk sections should be zero\n");
143 printk(KERN_INFO "dump disk section = %d\n", ph->dump_disk_section);
144 printk(KERN_INFO "block num = %ld\n", ph->block_num_dd);
145 printk(KERN_INFO "number of blocks = %ld\n", ph->num_of_blocks_dd);
146 printk(KERN_INFO "dump disk offset = %d\n", ph->offset_dd);
147 printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto);
148
149 /*set cpu state and hpte states as well scratch pad area */
150 printk(KERN_INFO " CPU AREA \n");
151 printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags);
152 printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type);
153 printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags);
154 printk(KERN_INFO "cpu source_address =%lx\n",
155 ph->cpu_data.source_address);
156 printk(KERN_INFO "cpu source_length =%lx\n",
157 ph->cpu_data.source_length);
158 printk(KERN_INFO "cpu length_copied =%lx\n",
159 ph->cpu_data.length_copied);
160
161 printk(KERN_INFO " HPTE AREA \n");
162 printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags);
163 printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type);
164 printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags);
165 printk(KERN_INFO "HPTE source_address =%lx\n",
166 ph->hpte_data.source_address);
167 printk(KERN_INFO "HPTE source_length =%lx\n",
168 ph->hpte_data.source_length);
169 printk(KERN_INFO "HPTE length_copied =%lx\n",
170 ph->hpte_data.length_copied);
171
172 printk(KERN_INFO " SRSD AREA \n");
173 printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags);
174 printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type);
175 printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags);
176 printk(KERN_INFO "SRSD source_address =%lx\n",
177 ph->kernel_data.source_address);
178 printk(KERN_INFO "SRSD source_length =%lx\n",
179 ph->kernel_data.source_length);
180 printk(KERN_INFO "SRSD length_copied =%lx\n",
181 ph->kernel_data.length_copied);
182#endif
183}
184
185static ssize_t show_phyp_dump_active(struct kobject *kobj,
186 struct kobj_attribute *attr, char *buf)
187{
188
189 /* create filesystem entry so kdump is phyp-dump aware */
190 return sprintf(buf, "%lx\n", phyp_dump_info->phyp_dump_at_boot);
191}
192
193static struct kobj_attribute pdl = __ATTR(phyp_dump_active, 0600,
194 show_phyp_dump_active,
195 NULL);
196
197static void register_dump_area(struct phyp_dump_header *ph, unsigned long addr)
198{
199 int rc;
200
201 /* Add addr value if not initialized before */
202 if (ph->cpu_data.destination_address == 0) {
203 ph->cpu_data.destination_address += addr;
204 ph->hpte_data.destination_address += addr;
205 ph->kernel_data.destination_address += addr;
206 }
207
208 /* ToDo Invalidate kdump and free memory range. */
209
210 do {
211 rc = rtas_call(ibm_configure_kernel_dump, 3, 1, NULL,
212 1, ph, sizeof(struct phyp_dump_header));
213 } while (rtas_busy_delay(rc));
214
215 if (rc) {
216 printk(KERN_ERR "phyp-dump: unexpected error (%d) on "
217 "register\n", rc);
218 print_dump_header(ph);
219 return;
220 }
221
222 rc = sysfs_create_file(kernel_kobj, &pdl.attr);
223 if (rc)
224 printk(KERN_ERR "phyp-dump: unable to create sysfs"
225 " file (%d)\n", rc);
226}
227
228static
229void invalidate_last_dump(struct phyp_dump_header *ph, unsigned long addr)
230{
231 int rc;
232
233 /* Add addr value if not initialized before */
234 if (ph->cpu_data.destination_address == 0) {
235 ph->cpu_data.destination_address += addr;
236 ph->hpte_data.destination_address += addr;
237 ph->kernel_data.destination_address += addr;
238 }
239
240 do {
241 rc = rtas_call(ibm_configure_kernel_dump, 3, 1, NULL,
242 2, ph, sizeof(struct phyp_dump_header));
243 } while (rtas_busy_delay(rc));
244
245 if (rc) {
246 printk(KERN_ERR "phyp-dump: unexpected error (%d) "
247 "on invalidate\n", rc);
248 print_dump_header(ph);
249 }
250}
251
252/* ------------------------------------------------- */
253/**
254 * release_memory_range -- release memory previously lmb_reserved
255 * @start_pfn: starting physical frame number
256 * @nr_pages: number of pages to free.
257 *
258 * This routine will release memory that had been previously
259 * lmb_reserved in early boot. The released memory becomes
260 * available for genreal use.
261 */
262static void release_memory_range(unsigned long start_pfn,
263 unsigned long nr_pages)
264{
265 struct page *rpage;
266 unsigned long end_pfn;
267 long i;
268
269 end_pfn = start_pfn + nr_pages;
270
271 for (i = start_pfn; i <= end_pfn; i++) {
272 rpage = pfn_to_page(i);
273 if (PageReserved(rpage)) {
274 ClearPageReserved(rpage);
275 init_page_count(rpage);
276 __free_page(rpage);
277 totalram_pages++;
278 }
279 }
280}
281
282/**
283 * track_freed_range -- Counts the range being freed.
284 * Once the counter goes to zero, it re-registers dump for
285 * future use.
286 */
287static void
288track_freed_range(unsigned long addr, unsigned long length)
289{
290 static unsigned long scratch_area_size, reserved_area_size;
291
292 if (addr < phyp_dump_info->init_reserve_start)
293 return;
294
295 if ((addr >= phyp_dump_info->init_reserve_start) &&
296 (addr <= phyp_dump_info->init_reserve_start +
297 phyp_dump_info->init_reserve_size))
298 reserved_area_size += length;
299
300 if ((addr >= phyp_dump_info->reserved_scratch_addr) &&
301 (addr <= phyp_dump_info->reserved_scratch_addr +
302 phyp_dump_info->reserved_scratch_size))
303 scratch_area_size += length;
304
305 if ((reserved_area_size == phyp_dump_info->init_reserve_size) &&
306 (scratch_area_size == phyp_dump_info->reserved_scratch_size)) {
307
308 invalidate_last_dump(&phdr,
309 phyp_dump_info->reserved_scratch_addr);
310 register_dump_area(&phdr,
311 phyp_dump_info->reserved_scratch_addr);
312 }
313}
314
315/* ------------------------------------------------- */
316/**
317 * sysfs_release_region -- sysfs interface to release memory range.
318 *
319 * Usage:
320 * "echo <start addr> <length> > /sys/kernel/release_region"
321 *
322 * Example:
323 * "echo 0x40000000 0x10000000 > /sys/kernel/release_region"
324 *
325 * will release 256MB starting at 1GB.
326 */
327static ssize_t store_release_region(struct kobject *kobj,
328 struct kobj_attribute *attr,
329 const char *buf, size_t count)
330{
331 unsigned long start_addr, length, end_addr;
332 unsigned long start_pfn, nr_pages;
333 ssize_t ret;
334
335 ret = sscanf(buf, "%lx %lx", &start_addr, &length);
336 if (ret != 2)
337 return -EINVAL;
338
339 track_freed_range(start_addr, length);
340
341 /* Range-check - don't free any reserved memory that
342 * wasn't reserved for phyp-dump */
343 if (start_addr < phyp_dump_info->init_reserve_start)
344 start_addr = phyp_dump_info->init_reserve_start;
345
346 end_addr = phyp_dump_info->init_reserve_start +
347 phyp_dump_info->init_reserve_size;
348 if (start_addr+length > end_addr)
349 length = end_addr - start_addr;
350
351 /* Release the region of memory assed in by user */
352 start_pfn = PFN_DOWN(start_addr);
353 nr_pages = PFN_DOWN(length);
354 release_memory_range(start_pfn, nr_pages);
355
356 return count;
357}
358
359static ssize_t show_release_region(struct kobject *kobj,
360 struct kobj_attribute *attr, char *buf)
361{
362 u64 second_addr_range;
363
364 /* total reserved size - start of scratch area */
365 second_addr_range = phyp_dump_info->init_reserve_size -
366 phyp_dump_info->reserved_scratch_size;
367 return sprintf(buf, "CPU:0x%lx-0x%lx: HPTE:0x%lx-0x%lx:"
368 " DUMP:0x%lx-0x%lx, 0x%lx-0x%lx:\n",
369 phdr.cpu_data.destination_address,
370 phdr.cpu_data.length_copied,
371 phdr.hpte_data.destination_address,
372 phdr.hpte_data.length_copied,
373 phdr.kernel_data.destination_address,
374 phdr.kernel_data.length_copied,
375 phyp_dump_info->init_reserve_start,
376 second_addr_range);
377}
378
379static struct kobj_attribute rr = __ATTR(release_region, 0600,
380 show_release_region,
381 store_release_region);
382
383static int __init phyp_dump_setup(void)
384{
385 struct device_node *rtas;
386 const struct phyp_dump_header *dump_header = NULL;
387 unsigned long dump_area_start;
388 unsigned long dump_area_length;
389 int header_len = 0;
390 int rc;
391
392 /* If no memory was reserved in early boot, there is nothing to do */
393 if (phyp_dump_info->init_reserve_size == 0)
394 return 0;
395
396 /* Return if phyp dump not supported */
397 if (!phyp_dump_info->phyp_dump_configured)
398 return -ENOSYS;
399
400 /* Is there dump data waiting for us? If there isn't,
401 * then register a new dump area, and release all of
402 * the rest of the reserved ram.
403 *
404 * The /rtas/ibm,kernel-dump rtas node is present only
405 * if there is dump data waiting for us.
406 */
407 rtas = of_find_node_by_path("/rtas");
408 if (rtas) {
409 dump_header = of_get_property(rtas, "ibm,kernel-dump",
410 &header_len);
411 of_node_put(rtas);
412 }
413
414 print_dump_header(dump_header);
415 dump_area_length = init_dump_header(&phdr);
416 /* align down */
417 dump_area_start = phyp_dump_info->init_reserve_start & PAGE_MASK;
418
419 if (dump_header == NULL) {
420 register_dump_area(&phdr, dump_area_start);
421 return 0;
422 }
423
424 /* re-register the dump area, if old dump was invalid */
425 if ((dump_header) && (dump_header->status & DUMP_ERROR_FLAG)) {
426 invalidate_last_dump(&phdr, dump_area_start);
427 register_dump_area(&phdr, dump_area_start);
428 return 0;
429 }
430
431 if (dump_header) {
432 phyp_dump_info->reserved_scratch_addr =
433 dump_header->cpu_data.destination_address;
434 phyp_dump_info->reserved_scratch_size =
435 dump_header->cpu_data.source_length +
436 dump_header->hpte_data.source_length +
437 dump_header->kernel_data.source_length;
438 }
439
440 /* Should we create a dump_subsys, analogous to s390/ipl.c ? */
441 rc = sysfs_create_file(kernel_kobj, &rr.attr);
442 if (rc)
443 printk(KERN_ERR "phyp-dump: unable to create sysfs file (%d)\n",
444 rc);
445
446 /* ToDo: re-register the dump area, for next time. */
447 return 0;
448}
449machine_subsys_initcall(pseries, phyp_dump_setup);
450
451int __init early_init_dt_scan_phyp_dump(unsigned long node,
452 const char *uname, int depth, void *data)
453{
454 const unsigned int *sizes;
455
456 phyp_dump_info->phyp_dump_configured = 0;
457 phyp_dump_info->phyp_dump_is_active = 0;
458
459 if (depth != 1 || strcmp(uname, "rtas") != 0)
460 return 0;
461
462 if (of_get_flat_dt_prop(node, "ibm,configure-kernel-dump", NULL))
463 phyp_dump_info->phyp_dump_configured++;
464
465 if (of_get_flat_dt_prop(node, "ibm,dump-kernel", NULL))
466 phyp_dump_info->phyp_dump_is_active++;
467
468 sizes = of_get_flat_dt_prop(node, "ibm,configure-kernel-dump-sizes",
469 NULL);
470 if (!sizes)
471 return 0;
472
473 if (sizes[0] == 1)
474 phyp_dump_info->cpu_state_size = *((unsigned long *)&sizes[1]);
475
476 if (sizes[3] == 2)
477 phyp_dump_info->hpte_region_size =
478 *((unsigned long *)&sizes[4]);
479 return 1;
480}
481
482/* Look for phyp_dump= cmdline option */
483static int __init early_phyp_dump_enabled(char *p)
484{
485 phyp_dump_info->phyp_dump_at_boot = 1;
486
487 if (!p)
488 return 0;
489
490 if (strncmp(p, "1", 1) == 0)
491 phyp_dump_info->phyp_dump_at_boot = 1;
492 else if (strncmp(p, "0", 1) == 0)
493 phyp_dump_info->phyp_dump_at_boot = 0;
494
495 return 0;
496}
497early_param("phyp_dump", early_phyp_dump_enabled);
498
499/* Look for phyp_dump_reserve_size= cmdline option */
500static int __init early_phyp_dump_reserve_size(char *p)
501{
502 if (p)
503 phyp_dump_info->reserve_bootvar = memparse(p, &p);
504
505 return 0;
506}
507early_param("phyp_dump_reserve_size", early_phyp_dump_reserve_size);
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 61136d019554..9e17c0d2a0c8 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -38,4 +38,6 @@ extern void pSeries_final_fixup(void);
38/* Poweron flag used for enabling auto ups restart */ 38/* Poweron flag used for enabling auto ups restart */
39extern unsigned long rtas_poweron_auto; 39extern unsigned long rtas_poweron_auto;
40 40
41extern void find_udbg_vterm(void);
42
41#endif /* _PSERIES_PSERIES_H */ 43#endif /* _PSERIES_PSERIES_H */
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 2800fced8c7c..ac75c10de278 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -222,14 +222,14 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length
222 tmp = strchr(buf, ' '); 222 tmp = strchr(buf, ' ');
223 if (!tmp) { 223 if (!tmp) {
224 printk(KERN_ERR "property parse failed in %s at line %d\n", 224 printk(KERN_ERR "property parse failed in %s at line %d\n",
225 __FUNCTION__, __LINE__); 225 __func__, __LINE__);
226 return NULL; 226 return NULL;
227 } 227 }
228 *tmp = '\0'; 228 *tmp = '\0';
229 229
230 if (++tmp >= end) { 230 if (++tmp >= end) {
231 printk(KERN_ERR "property parse failed in %s at line %d\n", 231 printk(KERN_ERR "property parse failed in %s at line %d\n",
232 __FUNCTION__, __LINE__); 232 __func__, __LINE__);
233 return NULL; 233 return NULL;
234 } 234 }
235 235
@@ -238,12 +238,12 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length
238 *length = simple_strtoul(tmp, &tmp, 10); 238 *length = simple_strtoul(tmp, &tmp, 10);
239 if (*length == -1) { 239 if (*length == -1) {
240 printk(KERN_ERR "property parse failed in %s at line %d\n", 240 printk(KERN_ERR "property parse failed in %s at line %d\n",
241 __FUNCTION__, __LINE__); 241 __func__, __LINE__);
242 return NULL; 242 return NULL;
243 } 243 }
244 if (*tmp != ' ' || ++tmp >= end) { 244 if (*tmp != ' ' || ++tmp >= end) {
245 printk(KERN_ERR "property parse failed in %s at line %d\n", 245 printk(KERN_ERR "property parse failed in %s at line %d\n",
246 __FUNCTION__, __LINE__); 246 __func__, __LINE__);
247 return NULL; 247 return NULL;
248 } 248 }
249 249
@@ -252,12 +252,12 @@ static char * parse_next_property(char *buf, char *end, char **name, int *length
252 tmp += *length; 252 tmp += *length;
253 if (tmp > end) { 253 if (tmp > end) {
254 printk(KERN_ERR "property parse failed in %s at line %d\n", 254 printk(KERN_ERR "property parse failed in %s at line %d\n",
255 __FUNCTION__, __LINE__); 255 __func__, __LINE__);
256 return NULL; 256 return NULL;
257 } 257 }
258 else if (tmp < end && *tmp != ' ' && *tmp != '\0') { 258 else if (tmp < end && *tmp != ' ' && *tmp != '\0') {
259 printk(KERN_ERR "property parse failed in %s at line %d\n", 259 printk(KERN_ERR "property parse failed in %s at line %d\n",
260 __FUNCTION__, __LINE__); 260 __func__, __LINE__);
261 return NULL; 261 return NULL;
262 } 262 }
263 tmp++; 263 tmp++;
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 8e1ef168e2dd..e5b0ea870164 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -195,31 +195,30 @@ const struct file_operations scanlog_fops = {
195static int __init scanlog_init(void) 195static int __init scanlog_init(void)
196{ 196{
197 struct proc_dir_entry *ent; 197 struct proc_dir_entry *ent;
198 void *data;
199 int err = -ENOMEM;
198 200
199 ibm_scan_log_dump = rtas_token("ibm,scan-log-dump"); 201 ibm_scan_log_dump = rtas_token("ibm,scan-log-dump");
200 if (ibm_scan_log_dump == RTAS_UNKNOWN_SERVICE) { 202 if (ibm_scan_log_dump == RTAS_UNKNOWN_SERVICE)
201 printk(KERN_ERR "scan-log-dump not implemented on this system\n"); 203 return -ENODEV;
202 return -EIO;
203 }
204 204
205 ent = create_proc_entry("ppc64/rtas/scan-log-dump", S_IRUSR, NULL); 205 /* Ideally we could allocate a buffer < 4G */
206 if (ent) { 206 data = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
207 ent->proc_fops = &scanlog_fops; 207 if (!data)
208 /* Ideally we could allocate a buffer < 4G */ 208 goto err;
209 ent->data = kmalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL); 209
210 if (!ent->data) { 210 ent = proc_create("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
211 printk(KERN_ERR "Failed to allocate a buffer\n"); 211 &scanlog_fops);
212 remove_proc_entry("scan-log-dump", ent->parent); 212 if (!ent)
213 return -ENOMEM; 213 goto err;
214 } 214
215 ((unsigned int *)ent->data)[0] = 0; 215 ent->data = data;
216 } else {
217 printk(KERN_ERR "Failed to create ppc64/scan-log-dump proc entry\n");
218 return -EIO;
219 }
220 proc_ppc64_scan_log_dump = ent; 216 proc_ppc64_scan_log_dump = ent;
221 217
222 return 0; 218 return 0;
219err:
220 kfree(data);
221 return err;
223} 222}
224 223
225static void __exit scanlog_cleanup(void) 224static void __exit scanlog_cleanup(void)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index fdb9b1c8f977..f66aa9c3b135 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -76,9 +76,6 @@
76#define DBG(fmt...) 76#define DBG(fmt...)
77#endif 77#endif
78 78
79/* move those away to a .h */
80extern void find_udbg_vterm(void);
81
82int fwnmi_active; /* TRUE if an FWNMI handler is present */ 79int fwnmi_active; /* TRUE if an FWNMI handler is present */
83 80
84static void pseries_shared_idle_sleep(void); 81static void pseries_shared_idle_sleep(void);
@@ -127,14 +124,60 @@ void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
127 desc->chip->eoi(irq); 124 desc->chip->eoi(irq);
128} 125}
129 126
130static void __init pseries_mpic_init_IRQ(void) 127static void __init pseries_setup_i8259_cascade(void)
131{ 128{
132 struct device_node *np, *old, *cascade = NULL; 129 struct device_node *np, *old, *found = NULL;
133 const unsigned int *addrp; 130 unsigned int cascade;
131 const u32 *addrp;
134 unsigned long intack = 0; 132 unsigned long intack = 0;
133 int naddr;
134
135 for_each_node_by_type(np, "interrupt-controller") {
136 if (of_device_is_compatible(np, "chrp,iic")) {
137 found = np;
138 break;
139 }
140 }
141
142 if (found == NULL) {
143 printk(KERN_DEBUG "pic: no ISA interrupt controller\n");
144 return;
145 }
146
147 cascade = irq_of_parse_and_map(found, 0);
148 if (cascade == NO_IRQ) {
149 printk(KERN_ERR "pic: failed to map cascade interrupt");
150 return;
151 }
152 pr_debug("pic: cascade mapped to irq %d\n", cascade);
153
154 for (old = of_node_get(found); old != NULL ; old = np) {
155 np = of_get_parent(old);
156 of_node_put(old);
157 if (np == NULL)
158 break;
159 if (strcmp(np->name, "pci") != 0)
160 continue;
161 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL);
162 if (addrp == NULL)
163 continue;
164 naddr = of_n_addr_cells(np);
165 intack = addrp[naddr-1];
166 if (naddr > 1)
167 intack |= ((unsigned long)addrp[naddr-2]) << 32;
168 }
169 if (intack)
170 printk(KERN_DEBUG "pic: PCI 8259 intack at 0x%016lx\n", intack);
171 i8259_init(found, intack);
172 of_node_put(found);
173 set_irq_chained_handler(cascade, pseries_8259_cascade);
174}
175
176static void __init pseries_mpic_init_IRQ(void)
177{
178 struct device_node *np;
135 const unsigned int *opprop; 179 const unsigned int *opprop;
136 unsigned long openpic_addr = 0; 180 unsigned long openpic_addr = 0;
137 unsigned int cascade_irq;
138 int naddr, n, i, opplen; 181 int naddr, n, i, opplen;
139 struct mpic *mpic; 182 struct mpic *mpic;
140 183
@@ -167,43 +210,13 @@ static void __init pseries_mpic_init_IRQ(void)
167 mpic_init(mpic); 210 mpic_init(mpic);
168 211
169 /* Look for cascade */ 212 /* Look for cascade */
170 for_each_node_by_type(np, "interrupt-controller") 213 pseries_setup_i8259_cascade();
171 if (of_device_is_compatible(np, "chrp,iic")) { 214}
172 cascade = np;
173 break;
174 }
175 if (cascade == NULL)
176 return;
177
178 cascade_irq = irq_of_parse_and_map(cascade, 0);
179 if (cascade_irq == NO_IRQ) {
180 printk(KERN_ERR "mpic: failed to map cascade interrupt");
181 return;
182 }
183 215
184 /* Check ACK type */ 216static void __init pseries_xics_init_IRQ(void)
185 for (old = of_node_get(cascade); old != NULL ; old = np) { 217{
186 np = of_get_parent(old); 218 xics_init_IRQ();
187 of_node_put(old); 219 pseries_setup_i8259_cascade();
188 if (np == NULL)
189 break;
190 if (strcmp(np->name, "pci") != 0)
191 continue;
192 addrp = of_get_property(np, "8259-interrupt-acknowledge",
193 NULL);
194 if (addrp == NULL)
195 continue;
196 naddr = of_n_addr_cells(np);
197 intack = addrp[naddr-1];
198 if (naddr > 1)
199 intack |= ((unsigned long)addrp[naddr-2]) << 32;
200 }
201 if (intack)
202 printk(KERN_DEBUG "mpic: PCI 8259 intack at 0x%016lx\n",
203 intack);
204 i8259_init(cascade, intack);
205 of_node_put(cascade);
206 set_irq_chained_handler(cascade_irq, pseries_8259_cascade);
207} 220}
208 221
209static void pseries_lpar_enable_pmcs(void) 222static void pseries_lpar_enable_pmcs(void)
@@ -235,7 +248,7 @@ static void __init pseries_discover_pic(void)
235 smp_init_pseries_mpic(); 248 smp_init_pseries_mpic();
236 return; 249 return;
237 } else if (strstr(typep, "ppc-xicp")) { 250 } else if (strstr(typep, "ppc-xicp")) {
238 ppc_md.init_IRQ = xics_init_IRQ; 251 ppc_md.init_IRQ = pseries_xics_init_IRQ;
239 setup_kexec_cpu_down_xics(); 252 setup_kexec_cpu_down_xics();
240 smp_init_pseries_xics(); 253 smp_init_pseries_xics();
241 return; 254 return;
@@ -393,6 +406,7 @@ static void pseries_dedicated_idle_sleep(void)
393{ 406{
394 unsigned int cpu = smp_processor_id(); 407 unsigned int cpu = smp_processor_id();
395 unsigned long start_snooze; 408 unsigned long start_snooze;
409 unsigned long in_purr, out_purr;
396 410
397 /* 411 /*
398 * Indicate to the HV that we are idle. Now would be 412 * Indicate to the HV that we are idle. Now would be
@@ -400,6 +414,7 @@ static void pseries_dedicated_idle_sleep(void)
400 */ 414 */
401 get_lppaca()->idle = 1; 415 get_lppaca()->idle = 1;
402 get_lppaca()->donate_dedicated_cpu = 1; 416 get_lppaca()->donate_dedicated_cpu = 1;
417 in_purr = mfspr(SPRN_PURR);
403 418
404 /* 419 /*
405 * We come in with interrupts disabled, and need_resched() 420 * We come in with interrupts disabled, and need_resched()
@@ -432,6 +447,8 @@ static void pseries_dedicated_idle_sleep(void)
432 447
433out: 448out:
434 HMT_medium(); 449 HMT_medium();
450 out_purr = mfspr(SPRN_PURR);
451 get_lppaca()->wait_state_cycles += out_purr - in_purr;
435 get_lppaca()->donate_dedicated_cpu = 0; 452 get_lppaca()->donate_dedicated_cpu = 0;
436 get_lppaca()->idle = 0; 453 get_lppaca()->idle = 0;
437} 454}
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index a977f200db89..43df53c30aa0 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -516,6 +516,8 @@ static struct irq_chip xics_pic_lpar = {
516 .set_affinity = xics_set_affinity 516 .set_affinity = xics_set_affinity
517}; 517};
518 518
519/* Points to the irq_chip we're actually using */
520static struct irq_chip *xics_irq_chip;
519 521
520static int xics_host_match(struct irq_host *h, struct device_node *node) 522static int xics_host_match(struct irq_host *h, struct device_node *node)
521{ 523{
@@ -526,23 +528,13 @@ static int xics_host_match(struct irq_host *h, struct device_node *node)
526 return !of_device_is_compatible(node, "chrp,iic"); 528 return !of_device_is_compatible(node, "chrp,iic");
527} 529}
528 530
529static int xics_host_map_direct(struct irq_host *h, unsigned int virq, 531static int xics_host_map(struct irq_host *h, unsigned int virq,
530 irq_hw_number_t hw) 532 irq_hw_number_t hw)
531{ 533{
532 pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw); 534 pr_debug("xics: map virq %d, hwirq 0x%lx\n", virq, hw);
533 535
534 get_irq_desc(virq)->status |= IRQ_LEVEL; 536 get_irq_desc(virq)->status |= IRQ_LEVEL;
535 set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq); 537 set_irq_chip_and_handler(virq, xics_irq_chip, handle_fasteoi_irq);
536 return 0;
537}
538
539static int xics_host_map_lpar(struct irq_host *h, unsigned int virq,
540 irq_hw_number_t hw)
541{
542 pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
543
544 get_irq_desc(virq)->status |= IRQ_LEVEL;
545 set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq);
546 return 0; 538 return 0;
547} 539}
548 540
@@ -561,27 +553,20 @@ static int xics_host_xlate(struct irq_host *h, struct device_node *ct,
561 return 0; 553 return 0;
562} 554}
563 555
564static struct irq_host_ops xics_host_direct_ops = { 556static struct irq_host_ops xics_host_ops = {
565 .match = xics_host_match, 557 .match = xics_host_match,
566 .map = xics_host_map_direct, 558 .map = xics_host_map,
567 .xlate = xics_host_xlate,
568};
569
570static struct irq_host_ops xics_host_lpar_ops = {
571 .match = xics_host_match,
572 .map = xics_host_map_lpar,
573 .xlate = xics_host_xlate, 559 .xlate = xics_host_xlate,
574}; 560};
575 561
576static void __init xics_init_host(void) 562static void __init xics_init_host(void)
577{ 563{
578 struct irq_host_ops *ops;
579
580 if (firmware_has_feature(FW_FEATURE_LPAR)) 564 if (firmware_has_feature(FW_FEATURE_LPAR))
581 ops = &xics_host_lpar_ops; 565 xics_irq_chip = &xics_pic_lpar;
582 else 566 else
583 ops = &xics_host_direct_ops; 567 xics_irq_chip = &xics_pic_direct;
584 xics_host = irq_alloc_host(NULL, IRQ_HOST_MAP_TREE, 0, ops, 568
569 xics_host = irq_alloc_host(NULL, IRQ_HOST_MAP_TREE, 0, &xics_host_ops,
585 XICS_IRQ_SPURIOUS); 570 XICS_IRQ_SPURIOUS);
586 BUG_ON(xics_host == NULL); 571 BUG_ON(xics_host == NULL);
587 irq_set_default_host(xics_host); 572 irq_set_default_host(xics_host);
@@ -655,52 +640,6 @@ static void __init xics_init_one_node(struct device_node *np,
655 } 640 }
656} 641}
657 642
658
659static void __init xics_setup_8259_cascade(void)
660{
661 struct device_node *np, *old, *found = NULL;
662 int cascade, naddr;
663 const u32 *addrp;
664 unsigned long intack = 0;
665
666 for_each_node_by_type(np, "interrupt-controller")
667 if (of_device_is_compatible(np, "chrp,iic")) {
668 found = np;
669 break;
670 }
671 if (found == NULL) {
672 printk(KERN_DEBUG "xics: no ISA interrupt controller\n");
673 return;
674 }
675 cascade = irq_of_parse_and_map(found, 0);
676 if (cascade == NO_IRQ) {
677 printk(KERN_ERR "xics: failed to map cascade interrupt");
678 return;
679 }
680 pr_debug("xics: cascade mapped to irq %d\n", cascade);
681
682 for (old = of_node_get(found); old != NULL ; old = np) {
683 np = of_get_parent(old);
684 of_node_put(old);
685 if (np == NULL)
686 break;
687 if (strcmp(np->name, "pci") != 0)
688 continue;
689 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL);
690 if (addrp == NULL)
691 continue;
692 naddr = of_n_addr_cells(np);
693 intack = addrp[naddr-1];
694 if (naddr > 1)
695 intack |= ((unsigned long)addrp[naddr-2]) << 32;
696 }
697 if (intack)
698 printk(KERN_DEBUG "xics: PCI 8259 intack at 0x%016lx\n", intack);
699 i8259_init(found, intack);
700 of_node_put(found);
701 set_irq_chained_handler(cascade, pseries_8259_cascade);
702}
703
704void __init xics_init_IRQ(void) 643void __init xics_init_IRQ(void)
705{ 644{
706 struct device_node *np; 645 struct device_node *np;
@@ -733,8 +672,6 @@ void __init xics_init_IRQ(void)
733 672
734 xics_setup_cpu(); 673 xics_setup_cpu();
735 674
736 xics_setup_8259_cascade();
737
738 ppc64_boot_msg(0x21, "XICS Done"); 675 ppc64_boot_msg(0x21, "XICS Done");
739} 676}
740 677
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index c26bcff47b6d..1c5321ae8f2f 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -28,7 +28,4 @@ struct xics_ipi_struct {
28 28
29extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; 29extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
30 30
31struct irq_desc;
32extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc);
33
34#endif /* _POWERPC_KERNEL_XICS_H */ 31#endif /* _POWERPC_KERNEL_XICS_H */
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 15f3e8527d77..6d386d0071a0 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_U3_DART) += dart_iommu.o
12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
13obj-$(CONFIG_FSL_SOC) += fsl_soc.o 13obj-$(CONFIG_FSL_SOC) += fsl_soc.o
14obj-$(CONFIG_FSL_PCI) += fsl_pci.o 14obj-$(CONFIG_FSL_PCI) += fsl_pci.o
15obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
15obj-$(CONFIG_RAPIDIO) += fsl_rio.o 16obj-$(CONFIG_RAPIDIO) += fsl_rio.o
16obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 17obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
17obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ 18obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
@@ -27,6 +28,7 @@ obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
27obj-$(CONFIG_PPC_I8259) += i8259.o 28obj-$(CONFIG_PPC_I8259) += i8259.o
28obj-$(CONFIG_IPIC) += ipic.o 29obj-$(CONFIG_IPIC) += ipic.o
29obj-$(CONFIG_4xx) += uic.o 30obj-$(CONFIG_4xx) += uic.o
31obj-$(CONFIG_4xx_SOC) += ppc4xx_soc.o
30obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o 32obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o
31obj-$(CONFIG_OF_RTC) += of_rtc.o 33obj-$(CONFIG_OF_RTC) += of_rtc.o
32ifeq ($(CONFIG_PCI),y) 34ifeq ($(CONFIG_PCI),y)
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c
index df8bd2b64796..58292a086c16 100644
--- a/arch/powerpc/sysdev/cpm1.c
+++ b/arch/powerpc/sysdev/cpm1.c
@@ -44,9 +44,6 @@
44 44
45#define CPM_MAP_SIZE (0x4000) 45#define CPM_MAP_SIZE (0x4000)
46 46
47#ifndef CONFIG_PPC_CPM_NEW_BINDING
48static void m8xx_cpm_dpinit(void);
49#endif
50cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ 47cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */
51immap_t __iomem *mpc8xx_immr; 48immap_t __iomem *mpc8xx_immr;
52static cpic8xx_t __iomem *cpic_reg; 49static cpic8xx_t __iomem *cpic_reg;
@@ -229,12 +226,7 @@ void __init cpm_reset(void)
229 out_be32(&siu_conf->sc_sdcr, 1); 226 out_be32(&siu_conf->sc_sdcr, 1);
230 immr_unmap(siu_conf); 227 immr_unmap(siu_conf);
231 228
232#ifdef CONFIG_PPC_CPM_NEW_BINDING
233 cpm_muram_init(); 229 cpm_muram_init();
234#else
235 /* Reclaim the DP memory for our use. */
236 m8xx_cpm_dpinit();
237#endif
238} 230}
239 231
240static DEFINE_SPINLOCK(cmd_lock); 232static DEFINE_SPINLOCK(cmd_lock);
@@ -257,7 +249,7 @@ int cpm_command(u32 command, u8 opcode)
257 if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) 249 if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
258 goto out; 250 goto out;
259 251
260 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); 252 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __func__);
261 ret = -EIO; 253 ret = -EIO;
262out: 254out:
263 spin_unlock_irqrestore(&cmd_lock, flags); 255 spin_unlock_irqrestore(&cmd_lock, flags);
@@ -293,110 +285,6 @@ cpm_setbrg(uint brg, uint rate)
293 CPM_BRG_EN | CPM_BRG_DIV16); 285 CPM_BRG_EN | CPM_BRG_DIV16);
294} 286}
295 287
296#ifndef CONFIG_PPC_CPM_NEW_BINDING
297/*
298 * dpalloc / dpfree bits.
299 */
300static spinlock_t cpm_dpmem_lock;
301/*
302 * 16 blocks should be enough to satisfy all requests
303 * until the memory subsystem goes up...
304 */
305static rh_block_t cpm_boot_dpmem_rh_block[16];
306static rh_info_t cpm_dpmem_info;
307
308#define CPM_DPMEM_ALIGNMENT 8
309static u8 __iomem *dpram_vbase;
310static phys_addr_t dpram_pbase;
311
312static void m8xx_cpm_dpinit(void)
313{
314 spin_lock_init(&cpm_dpmem_lock);
315
316 dpram_vbase = cpmp->cp_dpmem;
317 dpram_pbase = get_immrbase() + offsetof(immap_t, im_cpm.cp_dpmem);
318
319 /* Initialize the info header */
320 rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
321 sizeof(cpm_boot_dpmem_rh_block) /
322 sizeof(cpm_boot_dpmem_rh_block[0]),
323 cpm_boot_dpmem_rh_block);
324
325 /*
326 * Attach the usable dpmem area.
327 * XXX: This is actually crap. CPM_DATAONLY_BASE and
328 * CPM_DATAONLY_SIZE are a subset of the available dparm. It varies
329 * with the processor and the microcode patches applied / activated.
330 * But the following should be at least safe.
331 */
332 rh_attach_region(&cpm_dpmem_info, CPM_DATAONLY_BASE, CPM_DATAONLY_SIZE);
333}
334
335/*
336 * Allocate the requested size worth of DP memory.
337 * This function returns an offset into the DPRAM area.
338 * Use cpm_dpram_addr() to get the virtual address of the area.
339 */
340unsigned long cpm_dpalloc(uint size, uint align)
341{
342 unsigned long start;
343 unsigned long flags;
344
345 spin_lock_irqsave(&cpm_dpmem_lock, flags);
346 cpm_dpmem_info.alignment = align;
347 start = rh_alloc(&cpm_dpmem_info, size, "commproc");
348 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
349
350 return (uint)start;
351}
352EXPORT_SYMBOL(cpm_dpalloc);
353
354int cpm_dpfree(unsigned long offset)
355{
356 int ret;
357 unsigned long flags;
358
359 spin_lock_irqsave(&cpm_dpmem_lock, flags);
360 ret = rh_free(&cpm_dpmem_info, offset);
361 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
362
363 return ret;
364}
365EXPORT_SYMBOL(cpm_dpfree);
366
367unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align)
368{
369 unsigned long start;
370 unsigned long flags;
371
372 spin_lock_irqsave(&cpm_dpmem_lock, flags);
373 cpm_dpmem_info.alignment = align;
374 start = rh_alloc_fixed(&cpm_dpmem_info, offset, size, "commproc");
375 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
376
377 return start;
378}
379EXPORT_SYMBOL(cpm_dpalloc_fixed);
380
381void cpm_dpdump(void)
382{
383 rh_dump(&cpm_dpmem_info);
384}
385EXPORT_SYMBOL(cpm_dpdump);
386
387void *cpm_dpram_addr(unsigned long offset)
388{
389 return (void *)(dpram_vbase + offset);
390}
391EXPORT_SYMBOL(cpm_dpram_addr);
392
393uint cpm_dpram_phys(u8 *addr)
394{
395 return (dpram_pbase + (uint)(addr - dpram_vbase));
396}
397EXPORT_SYMBOL(cpm_dpram_phys);
398#endif /* !CONFIG_PPC_CPM_NEW_BINDING */
399
400struct cpm_ioport16 { 288struct cpm_ioport16 {
401 __be16 dir, par, odr_sor, dat, intr; 289 __be16 dir, par, odr_sor, dat, intr;
402 __be16 res[3]; 290 __be16 res[3];
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c
index dd066bb1d562..5a6c5dfc53ef 100644
--- a/arch/powerpc/sysdev/cpm2.c
+++ b/arch/powerpc/sysdev/cpm2.c
@@ -46,10 +46,6 @@
46 46
47#include <sysdev/fsl_soc.h> 47#include <sysdev/fsl_soc.h>
48 48
49#ifndef CONFIG_PPC_CPM_NEW_BINDING
50static void cpm2_dpinit(void);
51#endif
52
53cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */ 49cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */
54 50
55/* We allocate this here because it is used almost exclusively for 51/* We allocate this here because it is used almost exclusively for
@@ -71,15 +67,17 @@ void __init cpm2_reset(void)
71 67
72 /* Reclaim the DP memory for our use. 68 /* Reclaim the DP memory for our use.
73 */ 69 */
74#ifdef CONFIG_PPC_CPM_NEW_BINDING
75 cpm_muram_init(); 70 cpm_muram_init();
76#else
77 cpm2_dpinit();
78#endif
79 71
80 /* Tell everyone where the comm processor resides. 72 /* Tell everyone where the comm processor resides.
81 */ 73 */
82 cpmp = &cpm2_immr->im_cpm; 74 cpmp = &cpm2_immr->im_cpm;
75
76#ifndef CONFIG_PPC_EARLY_DEBUG_CPM
77 /* Reset the CPM.
78 */
79 cpm_command(CPM_CR_RST, 0);
80#endif
83} 81}
84 82
85static DEFINE_SPINLOCK(cmd_lock); 83static DEFINE_SPINLOCK(cmd_lock);
@@ -99,7 +97,7 @@ int cpm_command(u32 command, u8 opcode)
99 if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) 97 if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
100 goto out; 98 goto out;
101 99
102 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); 100 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __func__);
103 ret = -EIO; 101 ret = -EIO;
104out: 102out:
105 spin_unlock_irqrestore(&cmd_lock, flags); 103 spin_unlock_irqrestore(&cmd_lock, flags);
@@ -347,95 +345,6 @@ int cpm2_smc_clk_setup(enum cpm_clk_target target, int clock)
347 return ret; 345 return ret;
348} 346}
349 347
350#ifndef CONFIG_PPC_CPM_NEW_BINDING
351/*
352 * dpalloc / dpfree bits.
353 */
354static spinlock_t cpm_dpmem_lock;
355/* 16 blocks should be enough to satisfy all requests
356 * until the memory subsystem goes up... */
357static rh_block_t cpm_boot_dpmem_rh_block[16];
358static rh_info_t cpm_dpmem_info;
359static u8 __iomem *im_dprambase;
360
361static void cpm2_dpinit(void)
362{
363 spin_lock_init(&cpm_dpmem_lock);
364
365 /* initialize the info header */
366 rh_init(&cpm_dpmem_info, 1,
367 sizeof(cpm_boot_dpmem_rh_block) /
368 sizeof(cpm_boot_dpmem_rh_block[0]),
369 cpm_boot_dpmem_rh_block);
370
371 im_dprambase = cpm2_immr;
372
373 /* Attach the usable dpmem area */
374 /* XXX: This is actually crap. CPM_DATAONLY_BASE and
375 * CPM_DATAONLY_SIZE is only a subset of the available dpram. It
376 * varies with the processor and the microcode patches activated.
377 * But the following should be at least safe.
378 */
379 rh_attach_region(&cpm_dpmem_info, CPM_DATAONLY_BASE, CPM_DATAONLY_SIZE);
380}
381
382/* This function returns an index into the DPRAM area.
383 */
384unsigned long cpm_dpalloc(uint size, uint align)
385{
386 unsigned long start;
387 unsigned long flags;
388
389 spin_lock_irqsave(&cpm_dpmem_lock, flags);
390 cpm_dpmem_info.alignment = align;
391 start = rh_alloc(&cpm_dpmem_info, size, "commproc");
392 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
393
394 return (uint)start;
395}
396EXPORT_SYMBOL(cpm_dpalloc);
397
398int cpm_dpfree(unsigned long offset)
399{
400 int ret;
401 unsigned long flags;
402
403 spin_lock_irqsave(&cpm_dpmem_lock, flags);
404 ret = rh_free(&cpm_dpmem_info, offset);
405 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
406
407 return ret;
408}
409EXPORT_SYMBOL(cpm_dpfree);
410
411/* not sure if this is ever needed */
412unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align)
413{
414 unsigned long start;
415 unsigned long flags;
416
417 spin_lock_irqsave(&cpm_dpmem_lock, flags);
418 cpm_dpmem_info.alignment = align;
419 start = rh_alloc_fixed(&cpm_dpmem_info, offset, size, "commproc");
420 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
421
422 return start;
423}
424EXPORT_SYMBOL(cpm_dpalloc_fixed);
425
426void cpm_dpdump(void)
427{
428 rh_dump(&cpm_dpmem_info);
429}
430EXPORT_SYMBOL(cpm_dpdump);
431
432void *cpm_dpram_addr(unsigned long offset)
433{
434 return (void *)(im_dprambase + offset);
435}
436EXPORT_SYMBOL(cpm_dpram_addr);
437#endif /* !CONFIG_PPC_CPM_NEW_BINDING */
438
439struct cpm2_ioports { 348struct cpm2_ioports {
440 u32 dir, par, sor, odr, dat; 349 u32 dir, par, sor, odr, dat;
441 u32 res[3]; 350 u32 res[3];
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index 165981c87786..cb7df2dce44f 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -58,7 +58,6 @@ void __init udbg_init_cpm(void)
58} 58}
59#endif 59#endif
60 60
61#ifdef CONFIG_PPC_CPM_NEW_BINDING
62static spinlock_t cpm_muram_lock; 61static spinlock_t cpm_muram_lock;
63static rh_block_t cpm_boot_muram_rh_block[16]; 62static rh_block_t cpm_boot_muram_rh_block[16];
64static rh_info_t cpm_muram_info; 63static rh_info_t cpm_muram_info;
@@ -199,5 +198,3 @@ dma_addr_t cpm_muram_dma(void __iomem *addr)
199 return muram_pbase + ((u8 __iomem *)addr - muram_vbase); 198 return muram_pbase + ((u8 __iomem *)addr - muram_vbase);
200} 199}
201EXPORT_SYMBOL(cpm_muram_dma); 200EXPORT_SYMBOL(cpm_muram_dma);
202
203#endif /* CONFIG_PPC_CPM_NEW_BINDING */
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index e0e24b01e3a6..005c2ecf976f 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -37,6 +37,7 @@
37#include <linux/dma-mapping.h> 37#include <linux/dma-mapping.h>
38#include <linux/vmalloc.h> 38#include <linux/vmalloc.h>
39#include <linux/suspend.h> 39#include <linux/suspend.h>
40#include <linux/lmb.h>
40#include <asm/io.h> 41#include <asm/io.h>
41#include <asm/prom.h> 42#include <asm/prom.h>
42#include <asm/iommu.h> 43#include <asm/iommu.h>
@@ -44,7 +45,6 @@
44#include <asm/machdep.h> 45#include <asm/machdep.h>
45#include <asm/abs_addr.h> 46#include <asm/abs_addr.h>
46#include <asm/cacheflush.h> 47#include <asm/cacheflush.h>
47#include <asm/lmb.h>
48#include <asm/ppc-pci.h> 48#include <asm/ppc-pci.h>
49 49
50#include "dart.h" 50#include "dart.h"
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
new file mode 100644
index 000000000000..422c8faef593
--- /dev/null
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -0,0 +1,129 @@
1/*
2 * Freescale LBC and UPM routines.
3 *
4 * Copyright (c) 2007-2008 MontaVista Software, Inc.
5 *
6 * Author: Anton Vorontsov <avorontsov@ru.mvista.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
14#include <linux/kernel.h>
15#include <linux/of.h>
16#include <asm/fsl_lbc.h>
17
18spinlock_t fsl_lbc_lock = __SPIN_LOCK_UNLOCKED(fsl_lbc_lock);
19
20struct fsl_lbc_regs __iomem *fsl_lbc_regs;
21EXPORT_SYMBOL(fsl_lbc_regs);
22
23static char __initdata *compat_lbc[] = {
24 "fsl,pq2-localbus",
25 "fsl,pq2pro-localbus",
26 "fsl,pq3-localbus",
27 "fsl,elbc",
28};
29
30static int __init fsl_lbc_init(void)
31{
32 struct device_node *lbus;
33 int i;
34
35 for (i = 0; i < ARRAY_SIZE(compat_lbc); i++) {
36 lbus = of_find_compatible_node(NULL, NULL, compat_lbc[i]);
37 if (lbus)
38 goto found;
39 }
40 return -ENODEV;
41
42found:
43 fsl_lbc_regs = of_iomap(lbus, 0);
44 of_node_put(lbus);
45 if (!fsl_lbc_regs)
46 return -ENOMEM;
47 return 0;
48}
49arch_initcall(fsl_lbc_init);
50
51/**
52 * fsl_lbc_find - find Localbus bank
53 * @addr_base: base address of the memory bank
54 *
55 * This function walks LBC banks comparing "Base address" field of the BR
56 * registers with the supplied addr_base argument. When bases match this
57 * function returns bank number (starting with 0), otherwise it returns
58 * appropriate errno value.
59 */
60int fsl_lbc_find(phys_addr_t addr_base)
61{
62 int i;
63
64 if (!fsl_lbc_regs)
65 return -ENODEV;
66
67 for (i = 0; i < ARRAY_SIZE(fsl_lbc_regs->bank); i++) {
68 __be32 br = in_be32(&fsl_lbc_regs->bank[i].br);
69 __be32 or = in_be32(&fsl_lbc_regs->bank[i].or);
70
71 if (br & BR_V && (br & or & BR_BA) == addr_base)
72 return i;
73 }
74
75 return -ENOENT;
76}
77EXPORT_SYMBOL(fsl_lbc_find);
78
79/**
80 * fsl_upm_find - find pre-programmed UPM via base address
81 * @addr_base: base address of the memory bank controlled by the UPM
82 * @upm: pointer to the allocated fsl_upm structure
83 *
84 * This function fills fsl_upm structure so you can use it with the rest of
85 * UPM API. On success this function returns 0, otherwise it returns
86 * appropriate errno value.
87 */
88int fsl_upm_find(phys_addr_t addr_base, struct fsl_upm *upm)
89{
90 int bank;
91 __be32 br;
92
93 bank = fsl_lbc_find(addr_base);
94 if (bank < 0)
95 return bank;
96
97 br = in_be32(&fsl_lbc_regs->bank[bank].br);
98
99 switch (br & BR_MSEL) {
100 case BR_MS_UPMA:
101 upm->mxmr = &fsl_lbc_regs->mamr;
102 break;
103 case BR_MS_UPMB:
104 upm->mxmr = &fsl_lbc_regs->mbmr;
105 break;
106 case BR_MS_UPMC:
107 upm->mxmr = &fsl_lbc_regs->mcmr;
108 break;
109 default:
110 return -EINVAL;
111 }
112
113 switch (br & BR_PS) {
114 case BR_PS_8:
115 upm->width = 8;
116 break;
117 case BR_PS_16:
118 upm->width = 16;
119 break;
120 case BR_PS_32:
121 upm->width = 32;
122 break;
123 default:
124 return -EINVAL;
125 }
126
127 return 0;
128}
129EXPORT_SYMBOL(fsl_upm_find);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3581416905ea..5c1b246aaccc 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -75,6 +75,33 @@ phys_addr_t get_immrbase(void)
75 75
76EXPORT_SYMBOL(get_immrbase); 76EXPORT_SYMBOL(get_immrbase);
77 77
78static u32 sysfreq = -1;
79
80u32 fsl_get_sys_freq(void)
81{
82 struct device_node *soc;
83 const u32 *prop;
84 int size;
85
86 if (sysfreq != -1)
87 return sysfreq;
88
89 soc = of_find_node_by_type(NULL, "soc");
90 if (!soc)
91 return -1;
92
93 prop = of_get_property(soc, "clock-frequency", &size);
94 if (!prop || size != sizeof(*prop) || *prop == 0)
95 prop = of_get_property(soc, "bus-frequency", &size);
96
97 if (prop && size == sizeof(*prop))
98 sysfreq = *prop;
99
100 of_node_put(soc);
101 return sysfreq;
102}
103EXPORT_SYMBOL(fsl_get_sys_freq);
104
78#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx) 105#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
79 106
80static u32 brgfreq = -1; 107static u32 brgfreq = -1;
@@ -517,9 +544,9 @@ arch_initcall(fsl_i2c_of_init);
517static int __init mpc83xx_wdt_init(void) 544static int __init mpc83xx_wdt_init(void)
518{ 545{
519 struct resource r; 546 struct resource r;
520 struct device_node *soc, *np; 547 struct device_node *np;
521 struct platform_device *dev; 548 struct platform_device *dev;
522 const unsigned int *freq; 549 u32 freq = fsl_get_sys_freq();
523 int ret; 550 int ret;
524 551
525 np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt"); 552 np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt");
@@ -529,19 +556,6 @@ static int __init mpc83xx_wdt_init(void)
529 goto nodev; 556 goto nodev;
530 } 557 }
531 558
532 soc = of_find_node_by_type(NULL, "soc");
533
534 if (!soc) {
535 ret = -ENODEV;
536 goto nosoc;
537 }
538
539 freq = of_get_property(soc, "bus-frequency", NULL);
540 if (!freq) {
541 ret = -ENODEV;
542 goto err;
543 }
544
545 memset(&r, 0, sizeof(r)); 559 memset(&r, 0, sizeof(r));
546 560
547 ret = of_address_to_resource(np, 0, &r); 561 ret = of_address_to_resource(np, 0, &r);
@@ -554,20 +568,16 @@ static int __init mpc83xx_wdt_init(void)
554 goto err; 568 goto err;
555 } 569 }
556 570
557 ret = platform_device_add_data(dev, freq, sizeof(int)); 571 ret = platform_device_add_data(dev, &freq, sizeof(freq));
558 if (ret) 572 if (ret)
559 goto unreg; 573 goto unreg;
560 574
561 of_node_put(soc);
562 of_node_put(np); 575 of_node_put(np);
563
564 return 0; 576 return 0;
565 577
566unreg: 578unreg:
567 platform_device_unregister(dev); 579 platform_device_unregister(dev);
568err: 580err:
569 of_node_put(soc);
570nosoc:
571 of_node_put(np); 581 of_node_put(np);
572nodev: 582nodev:
573 return ret; 583 return ret;
@@ -736,547 +746,6 @@ err:
736 746
737arch_initcall(fsl_usb_of_init); 747arch_initcall(fsl_usb_of_init);
738 748
739#ifndef CONFIG_PPC_CPM_NEW_BINDING
740#ifdef CONFIG_CPM2
741
742extern void init_scc_ioports(struct fs_uart_platform_info*);
743
744static const char fcc_regs[] = "fcc_regs";
745static const char fcc_regs_c[] = "fcc_regs_c";
746static const char fcc_pram[] = "fcc_pram";
747static char bus_id[9][BUS_ID_SIZE];
748
749static int __init fs_enet_of_init(void)
750{
751 struct device_node *np;
752 unsigned int i;
753 struct platform_device *fs_enet_dev;
754 struct resource res;
755 int ret;
756
757 for (np = NULL, i = 0;
758 (np = of_find_compatible_node(np, "network", "fs_enet")) != NULL;
759 i++) {
760 struct resource r[4];
761 struct device_node *phy, *mdio;
762 struct fs_platform_info fs_enet_data;
763 const unsigned int *id, *phy_addr, *phy_irq;
764 const void *mac_addr;
765 const phandle *ph;
766 const char *model;
767
768 memset(r, 0, sizeof(r));
769 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
770
771 ret = of_address_to_resource(np, 0, &r[0]);
772 if (ret)
773 goto err;
774 r[0].name = fcc_regs;
775
776 ret = of_address_to_resource(np, 1, &r[1]);
777 if (ret)
778 goto err;
779 r[1].name = fcc_pram;
780
781 ret = of_address_to_resource(np, 2, &r[2]);
782 if (ret)
783 goto err;
784 r[2].name = fcc_regs_c;
785 fs_enet_data.fcc_regs_c = r[2].start;
786
787 of_irq_to_resource(np, 0, &r[3]);
788
789 fs_enet_dev =
790 platform_device_register_simple("fsl-cpm-fcc", i, &r[0], 4);
791
792 if (IS_ERR(fs_enet_dev)) {
793 ret = PTR_ERR(fs_enet_dev);
794 goto err;
795 }
796
797 model = of_get_property(np, "model", NULL);
798 if (model == NULL) {
799 ret = -ENODEV;
800 goto unreg;
801 }
802
803 mac_addr = of_get_mac_address(np);
804 if (mac_addr)
805 memcpy(fs_enet_data.macaddr, mac_addr, 6);
806
807 ph = of_get_property(np, "phy-handle", NULL);
808 phy = of_find_node_by_phandle(*ph);
809
810 if (phy == NULL) {
811 ret = -ENODEV;
812 goto unreg;
813 }
814
815 phy_addr = of_get_property(phy, "reg", NULL);
816 fs_enet_data.phy_addr = *phy_addr;
817
818 phy_irq = of_get_property(phy, "interrupts", NULL);
819
820 id = of_get_property(np, "device-id", NULL);
821 fs_enet_data.fs_no = *id;
822 strcpy(fs_enet_data.fs_type, model);
823
824 mdio = of_get_parent(phy);
825 ret = of_address_to_resource(mdio, 0, &res);
826 if (ret) {
827 of_node_put(phy);
828 of_node_put(mdio);
829 goto unreg;
830 }
831
832 fs_enet_data.clk_rx = *((u32 *)of_get_property(np,
833 "rx-clock", NULL));
834 fs_enet_data.clk_tx = *((u32 *)of_get_property(np,
835 "tx-clock", NULL));
836
837 if (strstr(model, "FCC")) {
838 int fcc_index = *id - 1;
839 const unsigned char *mdio_bb_prop;
840
841 fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
842 fs_enet_data.rx_ring = 32;
843 fs_enet_data.tx_ring = 32;
844 fs_enet_data.rx_copybreak = 240;
845 fs_enet_data.use_napi = 0;
846 fs_enet_data.napi_weight = 17;
847 fs_enet_data.mem_offset = FCC_MEM_OFFSET(fcc_index);
848 fs_enet_data.cp_page = CPM_CR_FCC_PAGE(fcc_index);
849 fs_enet_data.cp_block = CPM_CR_FCC_SBLOCK(fcc_index);
850
851 snprintf((char*)&bus_id[(*id)], BUS_ID_SIZE, "%x:%02x",
852 (u32)res.start, fs_enet_data.phy_addr);
853 fs_enet_data.bus_id = (char*)&bus_id[(*id)];
854 fs_enet_data.init_ioports = init_fcc_ioports;
855
856 mdio_bb_prop = of_get_property(phy, "bitbang", NULL);
857 if (mdio_bb_prop) {
858 struct platform_device *fs_enet_mdio_bb_dev;
859 struct fs_mii_bb_platform_info fs_enet_mdio_bb_data;
860
861 fs_enet_mdio_bb_dev =
862 platform_device_register_simple("fsl-bb-mdio",
863 i, NULL, 0);
864 memset(&fs_enet_mdio_bb_data, 0,
865 sizeof(struct fs_mii_bb_platform_info));
866 fs_enet_mdio_bb_data.mdio_dat.bit =
867 mdio_bb_prop[0];
868 fs_enet_mdio_bb_data.mdio_dir.bit =
869 mdio_bb_prop[1];
870 fs_enet_mdio_bb_data.mdc_dat.bit =
871 mdio_bb_prop[2];
872 fs_enet_mdio_bb_data.mdio_port =
873 mdio_bb_prop[3];
874 fs_enet_mdio_bb_data.mdc_port =
875 mdio_bb_prop[4];
876 fs_enet_mdio_bb_data.delay =
877 mdio_bb_prop[5];
878
879 fs_enet_mdio_bb_data.irq[0] = phy_irq[0];
880 fs_enet_mdio_bb_data.irq[1] = -1;
881 fs_enet_mdio_bb_data.irq[2] = -1;
882 fs_enet_mdio_bb_data.irq[3] = phy_irq[0];
883 fs_enet_mdio_bb_data.irq[31] = -1;
884
885 fs_enet_mdio_bb_data.mdio_dat.offset =
886 (u32)&cpm2_immr->im_ioport.iop_pdatc;
887 fs_enet_mdio_bb_data.mdio_dir.offset =
888 (u32)&cpm2_immr->im_ioport.iop_pdirc;
889 fs_enet_mdio_bb_data.mdc_dat.offset =
890 (u32)&cpm2_immr->im_ioport.iop_pdatc;
891
892 ret = platform_device_add_data(
893 fs_enet_mdio_bb_dev,
894 &fs_enet_mdio_bb_data,
895 sizeof(struct fs_mii_bb_platform_info));
896 if (ret)
897 goto unreg;
898 }
899
900 of_node_put(phy);
901 of_node_put(mdio);
902
903 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
904 sizeof(struct
905 fs_platform_info));
906 if (ret)
907 goto unreg;
908 }
909 }
910 return 0;
911
912unreg:
913 platform_device_unregister(fs_enet_dev);
914err:
915 return ret;
916}
917
918arch_initcall(fs_enet_of_init);
919
920static const char scc_regs[] = "regs";
921static const char scc_pram[] = "pram";
922
923static int __init cpm_uart_of_init(void)
924{
925 struct device_node *np;
926 unsigned int i;
927 struct platform_device *cpm_uart_dev;
928 int ret;
929
930 for (np = NULL, i = 0;
931 (np = of_find_compatible_node(np, "serial", "cpm_uart")) != NULL;
932 i++) {
933 struct resource r[3];
934 struct fs_uart_platform_info cpm_uart_data;
935 const int *id;
936 const char *model;
937
938 memset(r, 0, sizeof(r));
939 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
940
941 ret = of_address_to_resource(np, 0, &r[0]);
942 if (ret)
943 goto err;
944
945 r[0].name = scc_regs;
946
947 ret = of_address_to_resource(np, 1, &r[1]);
948 if (ret)
949 goto err;
950 r[1].name = scc_pram;
951
952 of_irq_to_resource(np, 0, &r[2]);
953
954 cpm_uart_dev =
955 platform_device_register_simple("fsl-cpm-scc:uart", i, &r[0], 3);
956
957 if (IS_ERR(cpm_uart_dev)) {
958 ret = PTR_ERR(cpm_uart_dev);
959 goto err;
960 }
961
962 id = of_get_property(np, "device-id", NULL);
963 cpm_uart_data.fs_no = *id;
964
965 model = of_get_property(np, "model", NULL);
966 strcpy(cpm_uart_data.fs_type, model);
967
968 cpm_uart_data.uart_clk = ppc_proc_freq;
969
970 cpm_uart_data.tx_num_fifo = 4;
971 cpm_uart_data.tx_buf_size = 32;
972 cpm_uart_data.rx_num_fifo = 4;
973 cpm_uart_data.rx_buf_size = 32;
974 cpm_uart_data.clk_rx = *((u32 *)of_get_property(np,
975 "rx-clock", NULL));
976 cpm_uart_data.clk_tx = *((u32 *)of_get_property(np,
977 "tx-clock", NULL));
978
979 ret =
980 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
981 sizeof(struct
982 fs_uart_platform_info));
983 if (ret)
984 goto unreg;
985 }
986
987 return 0;
988
989unreg:
990 platform_device_unregister(cpm_uart_dev);
991err:
992 return ret;
993}
994
995arch_initcall(cpm_uart_of_init);
996#endif /* CONFIG_CPM2 */
997
998#ifdef CONFIG_8xx
999
1000extern void init_scc_ioports(struct fs_platform_info*);
1001extern int platform_device_skip(const char *model, int id);
1002
1003static int __init fs_enet_mdio_of_init(void)
1004{
1005 struct device_node *np;
1006 unsigned int i;
1007 struct platform_device *mdio_dev;
1008 struct resource res;
1009 int ret;
1010
1011 for (np = NULL, i = 0;
1012 (np = of_find_compatible_node(np, "mdio", "fs_enet")) != NULL;
1013 i++) {
1014 struct fs_mii_fec_platform_info mdio_data;
1015
1016 memset(&res, 0, sizeof(res));
1017 memset(&mdio_data, 0, sizeof(mdio_data));
1018
1019 ret = of_address_to_resource(np, 0, &res);
1020 if (ret)
1021 goto err;
1022
1023 mdio_dev =
1024 platform_device_register_simple("fsl-cpm-fec-mdio",
1025 res.start, &res, 1);
1026 if (IS_ERR(mdio_dev)) {
1027 ret = PTR_ERR(mdio_dev);
1028 goto err;
1029 }
1030
1031 mdio_data.mii_speed = ((((ppc_proc_freq + 4999999) / 2500000) / 2) & 0x3F) << 1;
1032
1033 ret =
1034 platform_device_add_data(mdio_dev, &mdio_data,
1035 sizeof(struct fs_mii_fec_platform_info));
1036 if (ret)
1037 goto unreg;
1038 }
1039 return 0;
1040
1041unreg:
1042 platform_device_unregister(mdio_dev);
1043err:
1044 return ret;
1045}
1046
1047arch_initcall(fs_enet_mdio_of_init);
1048
1049static const char *enet_regs = "regs";
1050static const char *enet_pram = "pram";
1051static const char *enet_irq = "interrupt";
1052static char bus_id[9][BUS_ID_SIZE];
1053
1054static int __init fs_enet_of_init(void)
1055{
1056 struct device_node *np;
1057 unsigned int i;
1058 struct platform_device *fs_enet_dev = NULL;
1059 struct resource res;
1060 int ret;
1061
1062 for (np = NULL, i = 0;
1063 (np = of_find_compatible_node(np, "network", "fs_enet")) != NULL;
1064 i++) {
1065 struct resource r[4];
1066 struct device_node *phy = NULL, *mdio = NULL;
1067 struct fs_platform_info fs_enet_data;
1068 const unsigned int *id;
1069 const unsigned int *phy_addr;
1070 const void *mac_addr;
1071 const phandle *ph;
1072 const char *model;
1073
1074 memset(r, 0, sizeof(r));
1075 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
1076
1077 model = of_get_property(np, "model", NULL);
1078 if (model == NULL) {
1079 ret = -ENODEV;
1080 goto unreg;
1081 }
1082
1083 id = of_get_property(np, "device-id", NULL);
1084 fs_enet_data.fs_no = *id;
1085
1086 if (platform_device_skip(model, *id))
1087 continue;
1088
1089 ret = of_address_to_resource(np, 0, &r[0]);
1090 if (ret)
1091 goto err;
1092 r[0].name = enet_regs;
1093
1094 mac_addr = of_get_mac_address(np);
1095 if (mac_addr)
1096 memcpy(fs_enet_data.macaddr, mac_addr, 6);
1097
1098 ph = of_get_property(np, "phy-handle", NULL);
1099 if (ph != NULL)
1100 phy = of_find_node_by_phandle(*ph);
1101
1102 if (phy != NULL) {
1103 phy_addr = of_get_property(phy, "reg", NULL);
1104 fs_enet_data.phy_addr = *phy_addr;
1105 fs_enet_data.has_phy = 1;
1106
1107 mdio = of_get_parent(phy);
1108 ret = of_address_to_resource(mdio, 0, &res);
1109 if (ret) {
1110 of_node_put(phy);
1111 of_node_put(mdio);
1112 goto unreg;
1113 }
1114 }
1115
1116 model = of_get_property(np, "model", NULL);
1117 strcpy(fs_enet_data.fs_type, model);
1118
1119 if (strstr(model, "FEC")) {
1120 r[1].start = r[1].end = irq_of_parse_and_map(np, 0);
1121 r[1].flags = IORESOURCE_IRQ;
1122 r[1].name = enet_irq;
1123
1124 fs_enet_dev =
1125 platform_device_register_simple("fsl-cpm-fec", i, &r[0], 2);
1126
1127 if (IS_ERR(fs_enet_dev)) {
1128 ret = PTR_ERR(fs_enet_dev);
1129 goto err;
1130 }
1131
1132 fs_enet_data.rx_ring = 128;
1133 fs_enet_data.tx_ring = 16;
1134 fs_enet_data.rx_copybreak = 240;
1135 fs_enet_data.use_napi = 1;
1136 fs_enet_data.napi_weight = 17;
1137
1138 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%x:%02x",
1139 (u32)res.start, fs_enet_data.phy_addr);
1140 fs_enet_data.bus_id = (char*)&bus_id[i];
1141 fs_enet_data.init_ioports = init_fec_ioports;
1142 }
1143 if (strstr(model, "SCC")) {
1144 ret = of_address_to_resource(np, 1, &r[1]);
1145 if (ret)
1146 goto err;
1147 r[1].name = enet_pram;
1148
1149 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
1150 r[2].flags = IORESOURCE_IRQ;
1151 r[2].name = enet_irq;
1152
1153 fs_enet_dev =
1154 platform_device_register_simple("fsl-cpm-scc", i, &r[0], 3);
1155
1156 if (IS_ERR(fs_enet_dev)) {
1157 ret = PTR_ERR(fs_enet_dev);
1158 goto err;
1159 }
1160
1161 fs_enet_data.rx_ring = 64;
1162 fs_enet_data.tx_ring = 8;
1163 fs_enet_data.rx_copybreak = 240;
1164 fs_enet_data.use_napi = 1;
1165 fs_enet_data.napi_weight = 17;
1166
1167 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%s", "fixed@10:1");
1168 fs_enet_data.bus_id = (char*)&bus_id[i];
1169 fs_enet_data.init_ioports = init_scc_ioports;
1170 }
1171
1172 of_node_put(phy);
1173 of_node_put(mdio);
1174
1175 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
1176 sizeof(struct
1177 fs_platform_info));
1178 if (ret)
1179 goto unreg;
1180 }
1181 return 0;
1182
1183unreg:
1184 platform_device_unregister(fs_enet_dev);
1185err:
1186 return ret;
1187}
1188
1189arch_initcall(fs_enet_of_init);
1190
1191static int __init fsl_pcmcia_of_init(void)
1192{
1193 struct device_node *np;
1194 /*
1195 * Register all the devices which type is "pcmcia"
1196 */
1197 for_each_compatible_node(np, "pcmcia", "fsl,pq-pcmcia")
1198 of_platform_device_create(np, "m8xx-pcmcia", NULL);
1199 return 0;
1200}
1201
1202arch_initcall(fsl_pcmcia_of_init);
1203
1204static const char *smc_regs = "regs";
1205static const char *smc_pram = "pram";
1206
1207static int __init cpm_smc_uart_of_init(void)
1208{
1209 struct device_node *np;
1210 unsigned int i;
1211 struct platform_device *cpm_uart_dev;
1212 int ret;
1213
1214 for (np = NULL, i = 0;
1215 (np = of_find_compatible_node(np, "serial", "cpm_uart")) != NULL;
1216 i++) {
1217 struct resource r[3];
1218 struct fs_uart_platform_info cpm_uart_data;
1219 const int *id;
1220 const char *model;
1221
1222 memset(r, 0, sizeof(r));
1223 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
1224
1225 ret = of_address_to_resource(np, 0, &r[0]);
1226 if (ret)
1227 goto err;
1228
1229 r[0].name = smc_regs;
1230
1231 ret = of_address_to_resource(np, 1, &r[1]);
1232 if (ret)
1233 goto err;
1234 r[1].name = smc_pram;
1235
1236 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
1237 r[2].flags = IORESOURCE_IRQ;
1238
1239 cpm_uart_dev =
1240 platform_device_register_simple("fsl-cpm-smc:uart", i, &r[0], 3);
1241
1242 if (IS_ERR(cpm_uart_dev)) {
1243 ret = PTR_ERR(cpm_uart_dev);
1244 goto err;
1245 }
1246
1247 model = of_get_property(np, "model", NULL);
1248 strcpy(cpm_uart_data.fs_type, model);
1249
1250 id = of_get_property(np, "device-id", NULL);
1251 cpm_uart_data.fs_no = *id;
1252 cpm_uart_data.uart_clk = ppc_proc_freq;
1253
1254 cpm_uart_data.tx_num_fifo = 4;
1255 cpm_uart_data.tx_buf_size = 32;
1256 cpm_uart_data.rx_num_fifo = 4;
1257 cpm_uart_data.rx_buf_size = 32;
1258
1259 ret =
1260 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
1261 sizeof(struct
1262 fs_uart_platform_info));
1263 if (ret)
1264 goto unreg;
1265 }
1266
1267 return 0;
1268
1269unreg:
1270 platform_device_unregister(cpm_uart_dev);
1271err:
1272 return ret;
1273}
1274
1275arch_initcall(cpm_smc_uart_of_init);
1276
1277#endif /* CONFIG_8xx */
1278#endif /* CONFIG_PPC_CPM_NEW_BINDING */
1279
1280static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk, 749static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
1281 struct spi_board_info *board_infos, 750 struct spi_board_info *board_infos,
1282 unsigned int num_board_infos, 751 unsigned int num_board_infos,
@@ -1372,25 +841,9 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
1372 sysclk = get_brgfreq(); 841 sysclk = get_brgfreq();
1373#endif 842#endif
1374 if (sysclk == -1) { 843 if (sysclk == -1) {
1375 struct device_node *np; 844 sysclk = fsl_get_sys_freq();
1376 const u32 *freq; 845 if (sysclk == -1)
1377 int size;
1378
1379 np = of_find_node_by_type(NULL, "soc");
1380 if (!np)
1381 return -ENODEV; 846 return -ENODEV;
1382
1383 freq = of_get_property(np, "clock-frequency", &size);
1384 if (!freq || size != sizeof(*freq) || *freq == 0) {
1385 freq = of_get_property(np, "bus-frequency", &size);
1386 if (!freq || size != sizeof(*freq) || *freq == 0) {
1387 of_node_put(np);
1388 return -ENODEV;
1389 }
1390 }
1391
1392 sysclk = *freq;
1393 of_node_put(np);
1394 } 847 }
1395 848
1396 ret = of_fsl_spi_probe(NULL, "fsl,spi", sysclk, board_infos, 849 ret = of_fsl_spi_probe(NULL, "fsl,spi", sysclk, board_infos,
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 63e7db30a4cd..74c4a9657b33 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -7,6 +7,7 @@
7extern phys_addr_t get_immrbase(void); 7extern phys_addr_t get_immrbase(void);
8extern u32 get_brgfreq(void); 8extern u32 get_brgfreq(void);
9extern u32 get_baudrate(void); 9extern u32 get_baudrate(void);
10extern u32 fsl_get_sys_freq(void);
10 11
11struct spi_board_info; 12struct spi_board_info;
12 13
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 6ffdda244bb1..8619f2a3f1f6 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -175,13 +175,16 @@ static inline void _mpic_write(enum mpic_reg_type type,
175 switch(type) { 175 switch(type) {
176#ifdef CONFIG_PPC_DCR 176#ifdef CONFIG_PPC_DCR
177 case mpic_access_dcr: 177 case mpic_access_dcr:
178 return dcr_write(rb->dhost, reg, value); 178 dcr_write(rb->dhost, reg, value);
179 break;
179#endif 180#endif
180 case mpic_access_mmio_be: 181 case mpic_access_mmio_be:
181 return out_be32(rb->base + (reg >> 2), value); 182 out_be32(rb->base + (reg >> 2), value);
183 break;
182 case mpic_access_mmio_le: 184 case mpic_access_mmio_le:
183 default: 185 default:
184 return out_le32(rb->base + (reg >> 2), value); 186 out_le32(rb->base + (reg >> 2), value);
187 break;
185 } 188 }
186} 189}
187 190
@@ -1000,7 +1003,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1000 const char *name) 1003 const char *name)
1001{ 1004{
1002 struct mpic *mpic; 1005 struct mpic *mpic;
1003 u32 reg; 1006 u32 greg_feature;
1004 const char *vers; 1007 const char *vers;
1005 int i; 1008 int i;
1006 int intvec_top; 1009 int intvec_top;
@@ -1064,7 +1067,8 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1064 1067
1065 /* Look for protected sources */ 1068 /* Look for protected sources */
1066 if (node) { 1069 if (node) {
1067 unsigned int psize, bits, mapsize; 1070 int psize;
1071 unsigned int bits, mapsize;
1068 const u32 *psrc = 1072 const u32 *psrc =
1069 of_get_property(node, "protected-sources", &psize); 1073 of_get_property(node, "protected-sources", &psize);
1070 if (psrc) { 1074 if (psrc) {
@@ -1107,8 +1111,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1107 * in, try to obtain one 1111 * in, try to obtain one
1108 */ 1112 */
1109 if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) { 1113 if (paddr == 0 && !(mpic->flags & MPIC_USES_DCR)) {
1110 const u32 *reg; 1114 const u32 *reg = of_get_property(node, "reg", NULL);
1111 reg = of_get_property(node, "reg", NULL);
1112 BUG_ON(reg == NULL); 1115 BUG_ON(reg == NULL);
1113 paddr = of_translate_address(node, reg); 1116 paddr = of_translate_address(node, reg);
1114 BUG_ON(paddr == OF_BAD_ADDR); 1117 BUG_ON(paddr == OF_BAD_ADDR);
@@ -1137,12 +1140,13 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1137 * MPICs, num sources as well. On ISU MPICs, sources are counted 1140 * MPICs, num sources as well. On ISU MPICs, sources are counted
1138 * as ISUs are added 1141 * as ISUs are added
1139 */ 1142 */
1140 reg = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0)); 1143 greg_feature = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0));
1141 mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) 1144 mpic->num_cpus = ((greg_feature & MPIC_GREG_FEATURE_LAST_CPU_MASK)
1142 >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; 1145 >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1;
1143 if (isu_size == 0) 1146 if (isu_size == 0)
1144 mpic->num_sources = ((reg & MPIC_GREG_FEATURE_LAST_SRC_MASK) 1147 mpic->num_sources =
1145 >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1; 1148 ((greg_feature & MPIC_GREG_FEATURE_LAST_SRC_MASK)
1149 >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1;
1146 1150
1147 /* Map the per-CPU registers */ 1151 /* Map the per-CPU registers */
1148 for (i = 0; i < mpic->num_cpus; i++) { 1152 for (i = 0; i < mpic->num_cpus; i++) {
@@ -1161,7 +1165,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1161 mpic->isu_mask = (1 << mpic->isu_shift) - 1; 1165 mpic->isu_mask = (1 << mpic->isu_shift) - 1;
1162 1166
1163 /* Display version */ 1167 /* Display version */
1164 switch (reg & MPIC_GREG_FEATURE_VERSION_MASK) { 1168 switch (greg_feature & MPIC_GREG_FEATURE_VERSION_MASK) {
1165 case 1: 1169 case 1:
1166 vers = "1.0"; 1170 vers = "1.0";
1167 break; 1171 break;
@@ -1321,7 +1325,7 @@ void __init mpic_set_serial_int(struct mpic *mpic, int enable)
1321 1325
1322void mpic_irq_set_priority(unsigned int irq, unsigned int pri) 1326void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1323{ 1327{
1324 int is_ipi; 1328 unsigned int is_ipi;
1325 struct mpic *mpic = mpic_find(irq, &is_ipi); 1329 struct mpic *mpic = mpic_find(irq, &is_ipi);
1326 unsigned int src = mpic_irq_to_hw(irq); 1330 unsigned int src = mpic_irq_to_hw(irq);
1327 unsigned long flags; 1331 unsigned long flags;
@@ -1344,7 +1348,7 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1344 1348
1345unsigned int mpic_irq_get_priority(unsigned int irq) 1349unsigned int mpic_irq_get_priority(unsigned int irq)
1346{ 1350{
1347 int is_ipi; 1351 unsigned int is_ipi;
1348 struct mpic *mpic = mpic_find(irq, &is_ipi); 1352 struct mpic *mpic = mpic_find(irq, &is_ipi);
1349 unsigned int src = mpic_irq_to_hw(irq); 1353 unsigned int src = mpic_irq_to_hw(irq);
1350 unsigned long flags; 1354 unsigned long flags;
@@ -1406,11 +1410,6 @@ void mpic_cpu_set_priority(int prio)
1406 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), prio); 1410 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), prio);
1407} 1411}
1408 1412
1409/*
1410 * XXX: someone who knows mpic should check this.
1411 * do we need to eoi the ipi including for kexec cpu here (see xics comments)?
1412 * or can we reset the mpic in the new kernel?
1413 */
1414void mpic_teardown_this_cpu(int secondary) 1413void mpic_teardown_this_cpu(int secondary)
1415{ 1414{
1416 struct mpic *mpic = mpic_primary; 1415 struct mpic *mpic = mpic_primary;
@@ -1430,6 +1429,10 @@ void mpic_teardown_this_cpu(int secondary)
1430 1429
1431 /* Set current processor priority to max */ 1430 /* Set current processor priority to max */
1432 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf); 1431 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf);
1432 /* We need to EOI the IPI since not all platforms reset the MPIC
1433 * on boot and new interrupts wouldn't get delivered otherwise.
1434 */
1435 mpic_eoi(mpic);
1433 1436
1434 spin_unlock_irqrestore(&mpic_lock, flags); 1437 spin_unlock_irqrestore(&mpic_lock, flags);
1435} 1438}
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index efda0028909d..047b31027fa6 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -127,7 +127,7 @@ static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id)
127 if (err) 127 if (err)
128 return err; 128 return err;
129 129
130 prop = of_get_property(np, "block-index", NULL); 130 prop = of_get_property(np, "cell-index", NULL);
131 if (!prop) 131 if (!prop)
132 return -ENODEV; 132 return -ENODEV;
133 port_number = *(int *)prop; 133 port_number = *(int *)prop;
@@ -136,6 +136,7 @@ static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id)
136 136
137 pdata.cache_mgmt = 1; /* All current revs need this set */ 137 pdata.cache_mgmt = 1; /* All current revs need this set */
138 138
139 pdata.max_idle = 40; /* default */
139 prop = of_get_property(np, "max_idle", NULL); 140 prop = of_get_property(np, "max_idle", NULL);
140 if (prop) 141 if (prop)
141 pdata.max_idle = *prop; 142 pdata.max_idle = *prop;
@@ -205,30 +206,24 @@ error:
205/* 206/*
206 * Create mv64x60_eth platform devices 207 * Create mv64x60_eth platform devices
207 */ 208 */
208static int __init eth_register_shared_pdev(struct device_node *np) 209static struct platform_device * __init mv64x60_eth_register_shared_pdev(
210 struct device_node *np, int id)
209{ 211{
210 struct platform_device *pdev; 212 struct platform_device *pdev;
211 struct resource r[1]; 213 struct resource r[1];
212 int err; 214 int err;
213 215
214 np = of_get_parent(np);
215 if (!np)
216 return -ENODEV;
217
218 err = of_address_to_resource(np, 0, &r[0]); 216 err = of_address_to_resource(np, 0, &r[0]);
219 of_node_put(np);
220 if (err) 217 if (err)
221 return err; 218 return ERR_PTR(err);
222 219
223 pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, 0, 220 pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, id,
224 r, 1); 221 r, 1);
225 if (IS_ERR(pdev)) 222 return pdev;
226 return PTR_ERR(pdev);
227
228 return 0;
229} 223}
230 224
231static int __init mv64x60_eth_device_setup(struct device_node *np, int id) 225static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
226 struct platform_device *shared_pdev)
232{ 227{
233 struct resource r[1]; 228 struct resource r[1];
234 struct mv643xx_eth_platform_data pdata; 229 struct mv643xx_eth_platform_data pdata;
@@ -239,16 +234,12 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
239 const phandle *ph; 234 const phandle *ph;
240 int err; 235 int err;
241 236
242 /* only register the shared platform device the first time through */
243 if (id == 0 && (err = eth_register_shared_pdev(np)))
244 return err;
245
246 memset(r, 0, sizeof(r)); 237 memset(r, 0, sizeof(r));
247 of_irq_to_resource(np, 0, &r[0]); 238 of_irq_to_resource(np, 0, &r[0]);
248 239
249 memset(&pdata, 0, sizeof(pdata)); 240 memset(&pdata, 0, sizeof(pdata));
250 241
251 prop = of_get_property(np, "block-index", NULL); 242 prop = of_get_property(np, "reg", NULL);
252 if (!prop) 243 if (!prop)
253 return -ENODEV; 244 return -ENODEV;
254 pdata.port_number = *prop; 245 pdata.port_number = *prop;
@@ -301,7 +292,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
301 292
302 of_node_put(phy); 293 of_node_put(phy);
303 294
304 pdev = platform_device_alloc(MV643XX_ETH_NAME, pdata.port_number); 295 pdev = platform_device_alloc(MV643XX_ETH_NAME, id);
305 if (!pdev) 296 if (!pdev)
306 return -ENOMEM; 297 return -ENOMEM;
307 298
@@ -345,21 +336,19 @@ static int __init mv64x60_i2c_device_setup(struct device_node *np, int id)
345 336
346 memset(&pdata, 0, sizeof(pdata)); 337 memset(&pdata, 0, sizeof(pdata));
347 338
339 pdata.freq_m = 8; /* default */
348 prop = of_get_property(np, "freq_m", NULL); 340 prop = of_get_property(np, "freq_m", NULL);
349 if (!prop) 341 if (!prop)
350 return -ENODEV; 342 return -ENODEV;
351 pdata.freq_m = *prop; 343 pdata.freq_m = *prop;
352 344
345 pdata.freq_m = 3; /* default */
353 prop = of_get_property(np, "freq_n", NULL); 346 prop = of_get_property(np, "freq_n", NULL);
354 if (!prop) 347 if (!prop)
355 return -ENODEV; 348 return -ENODEV;
356 pdata.freq_n = *prop; 349 pdata.freq_n = *prop;
357 350
358 prop = of_get_property(np, "timeout", NULL); 351 pdata.timeout = 1000; /* default: 1 second */
359 if (prop)
360 pdata.timeout = *prop;
361 else
362 pdata.timeout = 1000; /* 1 second */
363 352
364 pdev = platform_device_alloc(MV64XXX_I2C_CTLR_NAME, id); 353 pdev = platform_device_alloc(MV64XXX_I2C_CTLR_NAME, id);
365 if (!pdev) 354 if (!pdev)
@@ -401,10 +390,7 @@ static int __init mv64x60_wdt_device_setup(struct device_node *np, int id)
401 390
402 memset(&pdata, 0, sizeof(pdata)); 391 memset(&pdata, 0, sizeof(pdata));
403 392
404 prop = of_get_property(np, "timeout", NULL); 393 pdata.timeout = 10; /* Default: 10 seconds */
405 if (!prop)
406 return -ENODEV;
407 pdata.timeout = *prop;
408 394
409 np = of_get_parent(np); 395 np = of_get_parent(np);
410 if (!np) 396 if (!np)
@@ -441,27 +427,43 @@ error:
441 427
442static int __init mv64x60_device_setup(void) 428static int __init mv64x60_device_setup(void)
443{ 429{
444 struct device_node *np = NULL; 430 struct device_node *np, *np2;
445 int id; 431 struct platform_device *pdev;
432 int id, id2;
446 int err; 433 int err;
447 434
448 id = 0; 435 id = 0;
449 for_each_compatible_node(np, "serial", "marvell,mpsc") 436 for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc")
450 if ((err = mv64x60_mpsc_device_setup(np, id++))) 437 if ((err = mv64x60_mpsc_device_setup(np, id++)))
451 goto error; 438 goto error;
452 439
453 id = 0; 440 id = 0;
454 for_each_compatible_node(np, "network", "marvell,mv64x60-eth") 441 id2 = 0;
455 if ((err = mv64x60_eth_device_setup(np, id++))) 442 for_each_compatible_node(np, NULL, "marvell,mv64360-eth-group") {
443 pdev = mv64x60_eth_register_shared_pdev(np, id++);
444 if (IS_ERR(pdev)) {
445 err = PTR_ERR(pdev);
456 goto error; 446 goto error;
447 }
448 for_each_child_of_node(np, np2) {
449 if (!of_device_is_compatible(np2,
450 "marvell,mv64360-eth"))
451 continue;
452 err = mv64x60_eth_device_setup(np2, id2++, pdev);
453 if (err) {
454 of_node_put(np2);
455 goto error;
456 }
457 }
458 }
457 459
458 id = 0; 460 id = 0;
459 for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c") 461 for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c")
460 if ((err = mv64x60_i2c_device_setup(np, id++))) 462 if ((err = mv64x60_i2c_device_setup(np, id++)))
461 goto error; 463 goto error;
462 464
463 /* support up to one watchdog timer */ 465 /* support up to one watchdog timer */
464 np = of_find_compatible_node(np, NULL, "marvell,mv64x60-wdt"); 466 np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt");
465 if (np) { 467 if (np) {
466 if ((err = mv64x60_wdt_device_setup(np, id))) 468 if ((err = mv64x60_wdt_device_setup(np, id)))
467 goto error; 469 goto error;
@@ -489,10 +491,10 @@ static int __init mv64x60_add_mpsc_console(void)
489 if (!np) 491 if (!np)
490 goto not_mpsc; 492 goto not_mpsc;
491 493
492 if (!of_device_is_compatible(np, "marvell,mpsc")) 494 if (!of_device_is_compatible(np, "marvell,mv64360-mpsc"))
493 goto not_mpsc; 495 goto not_mpsc;
494 496
495 prop = of_get_property(np, "block-index", NULL); 497 prop = of_get_property(np, "cell-index", NULL);
496 if (!prop) 498 if (!prop)
497 goto not_mpsc; 499 goto not_mpsc;
498 500
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index d21ab8fa4993..1456015a22d8 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -86,14 +86,14 @@ static int __init mv64x60_sysfs_init(void)
86 struct platform_device *pdev; 86 struct platform_device *pdev;
87 const unsigned int *prop; 87 const unsigned int *prop;
88 88
89 np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60"); 89 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360");
90 if (!np) 90 if (!np)
91 return 0; 91 return 0;
92 92
93 prop = of_get_property(np, "hs_reg_valid", NULL); 93 prop = of_get_property(np, "hs_reg_valid", NULL);
94 of_node_put(np); 94 of_node_put(np);
95 95
96 pdev = platform_device_register_simple("marvell,mv64x60", 0, NULL, 0); 96 pdev = platform_device_register_simple("marvell,mv64360", 0, NULL, 0);
97 if (IS_ERR(pdev)) 97 if (IS_ERR(pdev))
98 return PTR_ERR(pdev); 98 return PTR_ERR(pdev);
99 99
@@ -166,6 +166,6 @@ void __init mv64x60_pci_init(void)
166{ 166{
167 struct device_node *np; 167 struct device_node *np;
168 168
169 for_each_compatible_node(np, "pci", "marvell,mv64x60-pci") 169 for_each_compatible_node(np, "pci", "marvell,mv64360-pci")
170 mv64x60_add_bridge(np); 170 mv64x60_add_bridge(np);
171} 171}
diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64x60_pic.c
index 19e6ef263797..2aa4ed066db1 100644
--- a/arch/powerpc/sysdev/mv64x60_pic.c
+++ b/arch/powerpc/sysdev/mv64x60_pic.c
@@ -238,13 +238,13 @@ void __init mv64x60_init_irq(void)
238 const unsigned int *reg; 238 const unsigned int *reg;
239 unsigned long flags; 239 unsigned long flags;
240 240
241 np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp"); 241 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp");
242 reg = of_get_property(np, "reg", &size); 242 reg = of_get_property(np, "reg", &size);
243 paddr = of_translate_address(np, reg); 243 paddr = of_translate_address(np, reg);
244 mv64x60_gpp_reg_base = ioremap(paddr, reg[1]); 244 mv64x60_gpp_reg_base = ioremap(paddr, reg[1]);
245 of_node_put(np); 245 of_node_put(np);
246 246
247 np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-pic"); 247 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-pic");
248 reg = of_get_property(np, "reg", &size); 248 reg = of_get_property(np, "reg", &size);
249 paddr = of_translate_address(np, reg); 249 paddr = of_translate_address(np, reg);
250 mv64x60_irq_reg_base = ioremap(paddr, reg[1]); 250 mv64x60_irq_reg_base = ioremap(paddr, reg[1]);
diff --git a/arch/powerpc/sysdev/mv64x60_udbg.c b/arch/powerpc/sysdev/mv64x60_udbg.c
index 35c77c7d0616..ccdb3b0418fc 100644
--- a/arch/powerpc/sysdev/mv64x60_udbg.c
+++ b/arch/powerpc/sysdev/mv64x60_udbg.c
@@ -85,7 +85,7 @@ static void mv64x60_udbg_init(void)
85 if (!stdout) 85 if (!stdout)
86 return; 86 return;
87 87
88 for_each_compatible_node(np, "serial", "marvell,mpsc") { 88 for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") {
89 if (np == stdout) 89 if (np == stdout)
90 break; 90 break;
91 } 91 }
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index 5abfcd157483..1814adbd2236 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -527,6 +527,7 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
527 * 527 *
528 * ibm,plb-pciex-440spe 528 * ibm,plb-pciex-440spe
529 * ibm,plb-pciex-405ex 529 * ibm,plb-pciex-405ex
530 * ibm,plb-pciex-460ex
530 * 531 *
531 * Anything else will be rejected for now as they are all subtly 532 * Anything else will be rejected for now as they are all subtly
532 * different unfortunately. 533 * different unfortunately.
@@ -645,7 +646,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np)
645 int time_out = 20; 646 int time_out = 20;
646 647
647 /* Set PLL clock receiver to LVPECL */ 648 /* Set PLL clock receiver to LVPECL */
648 mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28); 649 dcri_clrset(SDR0, PESDR0_PLLLCT1, 0, 1 << 28);
649 650
650 /* Shouldn't we do all the calibration stuff etc... here ? */ 651 /* Shouldn't we do all the calibration stuff etc... here ? */
651 if (ppc440spe_pciex_check_reset(np)) 652 if (ppc440spe_pciex_check_reset(np))
@@ -659,8 +660,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np)
659 } 660 }
660 661
661 /* De-assert reset of PCIe PLL, wait for lock */ 662 /* De-assert reset of PCIe PLL, wait for lock */
662 mtdcri(SDR0, PESDR0_PLLLCT1, 663 dcri_clrset(SDR0, PESDR0_PLLLCT1, 1 << 24, 0);
663 mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24));
664 udelay(3); 664 udelay(3);
665 665
666 while (time_out) { 666 while (time_out) {
@@ -712,9 +712,8 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
712 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1, 712 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1,
713 0x35000000); 713 0x35000000);
714 } 714 }
715 val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET); 715 dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET,
716 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 716 (1 << 24) | (1 << 16), 1 << 12);
717 (val & ~(1 << 24 | 1 << 16)) | 1 << 12);
718 717
719 return 0; 718 return 0;
720} 719}
@@ -775,6 +774,115 @@ static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata =
775 .setup_utl = ppc440speB_pciex_init_utl, 774 .setup_utl = ppc440speB_pciex_init_utl,
776}; 775};
777 776
777static int __init ppc460ex_pciex_core_init(struct device_node *np)
778{
779 /* Nothing to do, return 2 ports */
780 return 2;
781}
782
783static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
784{
785 u32 val;
786 u32 utlset1;
787
788 if (port->endpoint)
789 val = PTYPE_LEGACY_ENDPOINT << 20;
790 else
791 val = PTYPE_ROOT_PORT << 20;
792
793 if (port->index == 0) {
794 val |= LNKW_X1 << 12;
795 utlset1 = 0x20000000;
796 } else {
797 val |= LNKW_X4 << 12;
798 utlset1 = 0x20101101;
799 }
800
801 mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val);
802 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, utlset1);
803 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01210000);
804
805 switch (port->index) {
806 case 0:
807 mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x00003230);
808 mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000136);
809 mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006);
810
811 mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST,0x10000000);
812 break;
813
814 case 1:
815 mtdcri(SDR0, PESDR1_460EX_L0CDRCTL, 0x00003230);
816 mtdcri(SDR0, PESDR1_460EX_L1CDRCTL, 0x00003230);
817 mtdcri(SDR0, PESDR1_460EX_L2CDRCTL, 0x00003230);
818 mtdcri(SDR0, PESDR1_460EX_L3CDRCTL, 0x00003230);
819 mtdcri(SDR0, PESDR1_460EX_L0DRV, 0x00000136);
820 mtdcri(SDR0, PESDR1_460EX_L1DRV, 0x00000136);
821 mtdcri(SDR0, PESDR1_460EX_L2DRV, 0x00000136);
822 mtdcri(SDR0, PESDR1_460EX_L3DRV, 0x00000136);
823 mtdcri(SDR0, PESDR1_460EX_L0CLK, 0x00000006);
824 mtdcri(SDR0, PESDR1_460EX_L1CLK, 0x00000006);
825 mtdcri(SDR0, PESDR1_460EX_L2CLK, 0x00000006);
826 mtdcri(SDR0, PESDR1_460EX_L3CLK, 0x00000006);
827
828 mtdcri(SDR0, PESDR1_460EX_PHY_CTL_RST,0x10000000);
829 break;
830 }
831
832 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
833 mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) |
834 (PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTPYN));
835
836 /* Poll for PHY reset */
837 /* XXX FIXME add timeout */
838 switch (port->index) {
839 case 0:
840 while (!(mfdcri(SDR0, PESDR0_460EX_RSTSTA) & 0x1))
841 udelay(10);
842 break;
843 case 1:
844 while (!(mfdcri(SDR0, PESDR1_460EX_RSTSTA) & 0x1))
845 udelay(10);
846 break;
847 }
848
849 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
850 (mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) &
851 ~(PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTDL)) |
852 PESDRx_RCSSET_RSTPYN);
853
854 port->has_ibpre = 1;
855
856 return 0;
857}
858
859static int ppc460ex_pciex_init_utl(struct ppc4xx_pciex_port *port)
860{
861 dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0);
862
863 /*
864 * Set buffer allocations and then assert VRB and TXE.
865 */
866 out_be32(port->utl_base + PEUTL_PBCTL, 0x0800000c);
867 out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000);
868 out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
869 out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000);
870 out_be32(port->utl_base + PEUTL_PBBSZ, 0x00000000);
871 out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000);
872 out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000);
873 out_be32(port->utl_base + PEUTL_RCIRQEN,0x00f00000);
874 out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
875
876 return 0;
877}
878
879static struct ppc4xx_pciex_hwops ppc460ex_pcie_hwops __initdata =
880{
881 .core_init = ppc460ex_pciex_core_init,
882 .port_init_hw = ppc460ex_pciex_init_port_hw,
883 .setup_utl = ppc460ex_pciex_init_utl,
884};
885
778#endif /* CONFIG_44x */ 886#endif /* CONFIG_44x */
779 887
780#ifdef CONFIG_40x 888#ifdef CONFIG_40x
@@ -830,17 +938,9 @@ static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
830 * PCIe boards don't show this problem. 938 * PCIe boards don't show this problem.
831 * This has to be re-tested and fixed in a later release! 939 * This has to be re-tested and fixed in a later release!
832 */ 940 */
833#if 0 /* XXX FIXME: Not resetting the PHY will leave all resources
834 * configured as done previously by U-Boot. Then Linux will currently
835 * not reassign them. So the PHY reset is now done always. This will
836 * lead to problems with the Atheros PCIe board again.
837 */
838 val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP); 941 val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
839 if (!(val & 0x00001000)) 942 if (!(val & 0x00001000))
840 ppc405ex_pcie_phy_reset(port); 943 ppc405ex_pcie_phy_reset(port);
841#else
842 ppc405ex_pcie_phy_reset(port);
843#endif
844 944
845 dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */ 945 dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */
846 946
@@ -896,6 +996,8 @@ static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
896 else 996 else
897 ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops; 997 ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops;
898 } 998 }
999 if (of_device_is_compatible(np, "ibm,plb-pciex-460ex"))
1000 ppc4xx_pciex_hwops = &ppc460ex_pcie_hwops;
899#endif /* CONFIG_44x */ 1001#endif /* CONFIG_44x */
900#ifdef CONFIG_40x 1002#ifdef CONFIG_40x
901 if (of_device_is_compatible(np, "ibm,plb-pciex-405ex")) 1003 if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
@@ -1042,8 +1144,7 @@ static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
1042 port->link = 0; 1144 port->link = 0;
1043 } 1145 }
1044 1146
1045 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 1147 dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, 0, 1 << 20);
1046 mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20);
1047 msleep(100); 1148 msleep(100);
1048 1149
1049 return 0; 1150 return 0;
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h
index 1c07908dc6ef..d04e40b306fb 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.h
+++ b/arch/powerpc/sysdev/ppc4xx_pci.h
@@ -271,6 +271,59 @@
271#define PESDR1_405EX_PHYSTA 0x044C 271#define PESDR1_405EX_PHYSTA 0x044C
272 272
273/* 273/*
274 * 460EX additional DCRs
275 */
276#define PESDR0_460EX_L0BIST 0x0308
277#define PESDR0_460EX_L0BISTSTS 0x0309
278#define PESDR0_460EX_L0CDRCTL 0x030A
279#define PESDR0_460EX_L0DRV 0x030B
280#define PESDR0_460EX_L0REC 0x030C
281#define PESDR0_460EX_L0LPB 0x030D
282#define PESDR0_460EX_L0CLK 0x030E
283#define PESDR0_460EX_PHY_CTL_RST 0x030F
284#define PESDR0_460EX_RSTSTA 0x0310
285#define PESDR0_460EX_OBS 0x0311
286#define PESDR0_460EX_L0ERRC 0x0320
287
288#define PESDR1_460EX_L0BIST 0x0348
289#define PESDR1_460EX_L1BIST 0x0349
290#define PESDR1_460EX_L2BIST 0x034A
291#define PESDR1_460EX_L3BIST 0x034B
292#define PESDR1_460EX_L0BISTSTS 0x034C
293#define PESDR1_460EX_L1BISTSTS 0x034D
294#define PESDR1_460EX_L2BISTSTS 0x034E
295#define PESDR1_460EX_L3BISTSTS 0x034F
296#define PESDR1_460EX_L0CDRCTL 0x0350
297#define PESDR1_460EX_L1CDRCTL 0x0351
298#define PESDR1_460EX_L2CDRCTL 0x0352
299#define PESDR1_460EX_L3CDRCTL 0x0353
300#define PESDR1_460EX_L0DRV 0x0354
301#define PESDR1_460EX_L1DRV 0x0355
302#define PESDR1_460EX_L2DRV 0x0356
303#define PESDR1_460EX_L3DRV 0x0357
304#define PESDR1_460EX_L0REC 0x0358
305#define PESDR1_460EX_L1REC 0x0359
306#define PESDR1_460EX_L2REC 0x035A
307#define PESDR1_460EX_L3REC 0x035B
308#define PESDR1_460EX_L0LPB 0x035C
309#define PESDR1_460EX_L1LPB 0x035D
310#define PESDR1_460EX_L2LPB 0x035E
311#define PESDR1_460EX_L3LPB 0x035F
312#define PESDR1_460EX_L0CLK 0x0360
313#define PESDR1_460EX_L1CLK 0x0361
314#define PESDR1_460EX_L2CLK 0x0362
315#define PESDR1_460EX_L3CLK 0x0363
316#define PESDR1_460EX_PHY_CTL_RST 0x0364
317#define PESDR1_460EX_RSTSTA 0x0365
318#define PESDR1_460EX_OBS 0x0366
319#define PESDR1_460EX_L0ERRC 0x0368
320#define PESDR1_460EX_L1ERRC 0x0369
321#define PESDR1_460EX_L2ERRC 0x036A
322#define PESDR1_460EX_L3ERRC 0x036B
323#define PESDR0_460EX_IHS1 0x036C
324#define PESDR0_460EX_IHS2 0x036D
325
326/*
274 * Of the above, some are common offsets from the base 327 * Of the above, some are common offsets from the base
275 */ 328 */
276#define PESDRn_UTLSET1 0x00 329#define PESDRn_UTLSET1 0x00
@@ -353,6 +406,12 @@
353#define PECFG_POM2LAL 0x390 406#define PECFG_POM2LAL 0x390
354#define PECFG_POM2LAH 0x394 407#define PECFG_POM2LAH 0x394
355 408
409/* SDR Bit Mappings */
410#define PESDRx_RCSSET_HLDPLB 0x10000000
411#define PESDRx_RCSSET_RSTGU 0x01000000
412#define PESDRx_RCSSET_RDY 0x00100000
413#define PESDRx_RCSSET_RSTDL 0x00010000
414#define PESDRx_RCSSET_RSTPYN 0x00001000
356 415
357enum 416enum
358{ 417{
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c
new file mode 100644
index 000000000000..5b32adc9a9b2
--- /dev/null
+++ b/arch/powerpc/sysdev/ppc4xx_soc.c
@@ -0,0 +1,200 @@
1/*
2 * IBM/AMCC PPC4xx SoC setup code
3 *
4 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * L2 cache routines cloned from arch/ppc/syslib/ibm440gx_common.c which is:
7 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
8 * Copyright (c) 2003 - 2006 Zultys Technologies
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 <linux/stddef.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/errno.h>
20#include <linux/interrupt.h>
21#include <linux/irq.h>
22#include <linux/of_platform.h>
23
24#include <asm/dcr.h>
25#include <asm/dcr-regs.h>
26#include <asm/reg.h>
27
28static u32 dcrbase_l2c;
29
30/*
31 * L2-cache
32 */
33
34/* Issue L2C diagnostic command */
35static inline u32 l2c_diag(u32 addr)
36{
37 mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, addr);
38 mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_DIAG);
39 while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC))
40 ;
41
42 return mfdcr(dcrbase_l2c + DCRN_L2C0_DATA);
43}
44
45static irqreturn_t l2c_error_handler(int irq, void *dev)
46{
47 u32 sr = mfdcr(dcrbase_l2c + DCRN_L2C0_SR);
48
49 if (sr & L2C_SR_CPE) {
50 /* Read cache trapped address */
51 u32 addr = l2c_diag(0x42000000);
52 printk(KERN_EMERG "L2C: Cache Parity Error, addr[16:26] = 0x%08x\n",
53 addr);
54 }
55 if (sr & L2C_SR_TPE) {
56 /* Read tag trapped address */
57 u32 addr = l2c_diag(0x82000000) >> 16;
58 printk(KERN_EMERG "L2C: Tag Parity Error, addr[16:26] = 0x%08x\n",
59 addr);
60 }
61
62 /* Clear parity errors */
63 if (sr & (L2C_SR_CPE | L2C_SR_TPE)){
64 mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0);
65 mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE);
66 } else {
67 printk(KERN_EMERG "L2C: LRU error\n");
68 }
69
70 return IRQ_HANDLED;
71}
72
73static int __init ppc4xx_l2c_probe(void)
74{
75 struct device_node *np;
76 u32 r;
77 unsigned long flags;
78 int irq;
79 const u32 *dcrreg;
80 u32 dcrbase_isram;
81 int len;
82 const u32 *prop;
83 u32 l2_size;
84
85 np = of_find_compatible_node(NULL, NULL, "ibm,l2-cache");
86 if (!np)
87 return 0;
88
89 /* Get l2 cache size */
90 prop = of_get_property(np, "cache-size", NULL);
91 if (prop == NULL) {
92 printk(KERN_ERR "%s: Can't get cache-size!\n", np->full_name);
93 of_node_put(np);
94 return -ENODEV;
95 }
96 l2_size = prop[0];
97
98 /* Map DCRs */
99 dcrreg = of_get_property(np, "dcr-reg", &len);
100 if (!dcrreg || (len != 4 * sizeof(u32))) {
101 printk(KERN_ERR "%s: Can't get DCR register base !",
102 np->full_name);
103 of_node_put(np);
104 return -ENODEV;
105 }
106 dcrbase_isram = dcrreg[0];
107 dcrbase_l2c = dcrreg[2];
108
109 /* Get and map irq number from device tree */
110 irq = irq_of_parse_and_map(np, 0);
111 if (irq == NO_IRQ) {
112 printk(KERN_ERR "irq_of_parse_and_map failed\n");
113 of_node_put(np);
114 return -ENODEV;
115 }
116
117 /* Install error handler */
118 if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) {
119 printk(KERN_ERR "Cannot install L2C error handler"
120 ", cache is not enabled\n");
121 of_node_put(np);
122 return -ENODEV;
123 }
124
125 local_irq_save(flags);
126 asm volatile ("sync" ::: "memory");
127
128 /* Disable SRAM */
129 mtdcr(dcrbase_isram + DCRN_SRAM0_DPC,
130 mfdcr(dcrbase_isram + DCRN_SRAM0_DPC) & ~SRAM_DPC_ENABLE);
131 mtdcr(dcrbase_isram + DCRN_SRAM0_SB0CR,
132 mfdcr(dcrbase_isram + DCRN_SRAM0_SB0CR) & ~SRAM_SBCR_BU_MASK);
133 mtdcr(dcrbase_isram + DCRN_SRAM0_SB1CR,
134 mfdcr(dcrbase_isram + DCRN_SRAM0_SB1CR) & ~SRAM_SBCR_BU_MASK);
135 mtdcr(dcrbase_isram + DCRN_SRAM0_SB2CR,
136 mfdcr(dcrbase_isram + DCRN_SRAM0_SB2CR) & ~SRAM_SBCR_BU_MASK);
137 mtdcr(dcrbase_isram + DCRN_SRAM0_SB3CR,
138 mfdcr(dcrbase_isram + DCRN_SRAM0_SB3CR) & ~SRAM_SBCR_BU_MASK);
139
140 /* Enable L2_MODE without ICU/DCU */
141 r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG) &
142 ~(L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_SS_MASK);
143 r |= L2C_CFG_L2M | L2C_CFG_SS_256;
144 mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r);
145
146 mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0);
147
148 /* Hardware Clear Command */
149 mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_HCC);
150 while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC))
151 ;
152
153 /* Clear Cache Parity and Tag Errors */
154 mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE);
155
156 /* Enable 64G snoop region starting at 0 */
157 r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP0) &
158 ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK);
159 r |= L2C_SNP_SSR_32G | L2C_SNP_ESR;
160 mtdcr(dcrbase_l2c + DCRN_L2C0_SNP0, r);
161
162 r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP1) &
163 ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK);
164 r |= 0x80000000 | L2C_SNP_SSR_32G | L2C_SNP_ESR;
165 mtdcr(dcrbase_l2c + DCRN_L2C0_SNP1, r);
166
167 asm volatile ("sync" ::: "memory");
168
169 /* Enable ICU/DCU ports */
170 r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG);
171 r &= ~(L2C_CFG_DCW_MASK | L2C_CFG_PMUX_MASK | L2C_CFG_PMIM
172 | L2C_CFG_TPEI | L2C_CFG_CPEI | L2C_CFG_NAM | L2C_CFG_NBRM);
173 r |= L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_TPC | L2C_CFG_CPC | L2C_CFG_FRAN
174 | L2C_CFG_CPIM | L2C_CFG_TPIM | L2C_CFG_LIM | L2C_CFG_SMCM;
175
176 /* Check for 460EX/GT special handling */
177 if (of_device_is_compatible(np, "ibm,l2-cache-460ex"))
178 r |= L2C_CFG_RDBW;
179
180 mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r);
181
182 asm volatile ("sync; isync" ::: "memory");
183 local_irq_restore(flags);
184
185 printk(KERN_INFO "%dk L2-cache enabled\n", l2_size >> 10);
186
187 of_node_put(np);
188 return 0;
189}
190arch_initcall(ppc4xx_l2c_probe);
191
192/*
193 * At present, this routine just applies a system reset.
194 */
195void ppc4xx_reset_system(char *cmd)
196{
197 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_RST_SYSTEM);
198 while (1)
199 ; /* Just in case the reset doesn't work */
200}
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index cc81fd1141b0..cff550eec7e8 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -55,7 +55,7 @@ struct qe_snum {
55/* We allocate this here because it is used almost exclusively for 55/* We allocate this here because it is used almost exclusively for
56 * the communication processor devices. 56 * the communication processor devices.
57 */ 57 */
58struct qe_immap *qe_immr = NULL; 58struct qe_immap __iomem *qe_immr;
59EXPORT_SYMBOL(qe_immr); 59EXPORT_SYMBOL(qe_immr);
60 60
61static struct qe_snum snums[QE_NUM_OF_SNUM]; /* Dynamically allocated SNUMs */ 61static struct qe_snum snums[QE_NUM_OF_SNUM]; /* Dynamically allocated SNUMs */
@@ -156,7 +156,7 @@ EXPORT_SYMBOL(qe_issue_cmd);
156 */ 156 */
157static unsigned int brg_clk = 0; 157static unsigned int brg_clk = 0;
158 158
159unsigned int get_brg_clk(void) 159unsigned int qe_get_brg_clk(void)
160{ 160{
161 struct device_node *qe; 161 struct device_node *qe;
162 unsigned int size; 162 unsigned int size;
@@ -180,6 +180,7 @@ unsigned int get_brg_clk(void)
180 180
181 return brg_clk; 181 return brg_clk;
182} 182}
183EXPORT_SYMBOL(qe_get_brg_clk);
183 184
184/* Program the BRG to the given sampling rate and multiplier 185/* Program the BRG to the given sampling rate and multiplier
185 * 186 *
@@ -197,7 +198,7 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
197 if ((brg < QE_BRG1) || (brg > QE_BRG16)) 198 if ((brg < QE_BRG1) || (brg > QE_BRG16))
198 return -EINVAL; 199 return -EINVAL;
199 200
200 divisor = get_brg_clk() / (rate * multiplier); 201 divisor = qe_get_brg_clk() / (rate * multiplier);
201 202
202 if (divisor > QE_BRGC_DIVISOR_MAX + 1) { 203 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
203 div16 = QE_BRGC_DIV16; 204 div16 = QE_BRGC_DIV16;
@@ -415,12 +416,6 @@ void qe_muram_dump(void)
415} 416}
416EXPORT_SYMBOL(qe_muram_dump); 417EXPORT_SYMBOL(qe_muram_dump);
417 418
418void *qe_muram_addr(unsigned long offset)
419{
420 return (void *)&qe_immr->muram[offset];
421}
422EXPORT_SYMBOL(qe_muram_addr);
423
424/* The maximum number of RISCs we support */ 419/* The maximum number of RISCs we support */
425#define MAX_QE_RISC 2 420#define MAX_QE_RISC 2
426 421
diff --git a/arch/powerpc/sysdev/qe_lib/qe_io.c b/arch/powerpc/sysdev/qe_lib/qe_io.c
index e53ea4d374a0..93916a48afec 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_io.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_io.c
@@ -22,6 +22,7 @@
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23 23
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/qe.h>
25#include <asm/prom.h> 26#include <asm/prom.h>
26#include <sysdev/fsl_soc.h> 27#include <sysdev/fsl_soc.h>
27 28
@@ -41,7 +42,7 @@ struct port_regs {
41#endif 42#endif
42}; 43};
43 44
44static struct port_regs *par_io = NULL; 45static struct port_regs __iomem *par_io;
45static int num_par_io_ports = 0; 46static int num_par_io_ports = 0;
46 47
47int par_io_init(struct device_node *np) 48int par_io_init(struct device_node *np)
@@ -165,7 +166,7 @@ int par_io_of_config(struct device_node *np)
165 } 166 }
166 167
167 ph = of_get_property(np, "pio-handle", NULL); 168 ph = of_get_property(np, "pio-handle", NULL);
168 if (ph == 0) { 169 if (ph == NULL) {
169 printk(KERN_ERR "pio-handle not available \n"); 170 printk(KERN_ERR "pio-handle not available \n");
170 return -1; 171 return -1;
171 } 172 }
@@ -200,7 +201,7 @@ static void dump_par_io(void)
200{ 201{
201 unsigned int i; 202 unsigned int i;
202 203
203 printk(KERN_INFO "%s: par_io=%p\n", __FUNCTION__, par_io); 204 printk(KERN_INFO "%s: par_io=%p\n", __func__, par_io);
204 for (i = 0; i < num_par_io_ports; i++) { 205 for (i = 0; i < num_par_io_ports; i++) {
205 printk(KERN_INFO " cpodr[%u]=%08x\n", i, 206 printk(KERN_INFO " cpodr[%u]=%08x\n", i,
206 in_be32(&par_io[i].cpodr)); 207 in_be32(&par_io[i].cpodr));
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index 3223acbc39e5..bcf88e6ce962 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -148,57 +148,57 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
148 148
149 /* check if the UCC port number is in range. */ 149 /* check if the UCC port number is in range. */
150 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { 150 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) {
151 printk(KERN_ERR "%s: illegal UCC number\n", __FUNCTION__); 151 printk(KERN_ERR "%s: illegal UCC number\n", __func__);
152 return -EINVAL; 152 return -EINVAL;
153 } 153 }
154 154
155 /* Check that 'max_rx_buf_length' is properly aligned (4). */ 155 /* Check that 'max_rx_buf_length' is properly aligned (4). */
156 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { 156 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) {
157 printk(KERN_ERR "%s: max_rx_buf_length not aligned\n", 157 printk(KERN_ERR "%s: max_rx_buf_length not aligned\n",
158 __FUNCTION__); 158 __func__);
159 return -EINVAL; 159 return -EINVAL;
160 } 160 }
161 161
162 /* Validate Virtual Fifo register values */ 162 /* Validate Virtual Fifo register values */
163 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { 163 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) {
164 printk(KERN_ERR "%s: urfs is too small\n", __FUNCTION__); 164 printk(KERN_ERR "%s: urfs is too small\n", __func__);
165 return -EINVAL; 165 return -EINVAL;
166 } 166 }
167 167
168 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 168 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
169 printk(KERN_ERR "%s: urfs is not aligned\n", __FUNCTION__); 169 printk(KERN_ERR "%s: urfs is not aligned\n", __func__);
170 return -EINVAL; 170 return -EINVAL;
171 } 171 }
172 172
173 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 173 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
174 printk(KERN_ERR "%s: urfet is not aligned.\n", __FUNCTION__); 174 printk(KERN_ERR "%s: urfet is not aligned.\n", __func__);
175 return -EINVAL; 175 return -EINVAL;
176 } 176 }
177 177
178 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 178 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
179 printk(KERN_ERR "%s: urfset is not aligned\n", __FUNCTION__); 179 printk(KERN_ERR "%s: urfset is not aligned\n", __func__);
180 return -EINVAL; 180 return -EINVAL;
181 } 181 }
182 182
183 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 183 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
184 printk(KERN_ERR "%s: utfs is not aligned\n", __FUNCTION__); 184 printk(KERN_ERR "%s: utfs is not aligned\n", __func__);
185 return -EINVAL; 185 return -EINVAL;
186 } 186 }
187 187
188 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 188 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
189 printk(KERN_ERR "%s: utfet is not aligned\n", __FUNCTION__); 189 printk(KERN_ERR "%s: utfet is not aligned\n", __func__);
190 return -EINVAL; 190 return -EINVAL;
191 } 191 }
192 192
193 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 193 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
194 printk(KERN_ERR "%s: utftt is not aligned\n", __FUNCTION__); 194 printk(KERN_ERR "%s: utftt is not aligned\n", __func__);
195 return -EINVAL; 195 return -EINVAL;
196 } 196 }
197 197
198 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); 198 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL);
199 if (!uccf) { 199 if (!uccf) {
200 printk(KERN_ERR "%s: Cannot allocate private data\n", 200 printk(KERN_ERR "%s: Cannot allocate private data\n",
201 __FUNCTION__); 201 __func__);
202 return -ENOMEM; 202 return -ENOMEM;
203 } 203 }
204 204
@@ -207,7 +207,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
207 /* Set the PHY base address */ 207 /* Set the PHY base address */
208 uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast)); 208 uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast));
209 if (uccf->uf_regs == NULL) { 209 if (uccf->uf_regs == NULL) {
210 printk(KERN_ERR "%s: Cannot map UCC registers\n", __FUNCTION__); 210 printk(KERN_ERR "%s: Cannot map UCC registers\n", __func__);
211 return -ENOMEM; 211 return -ENOMEM;
212 } 212 }
213 213
@@ -230,7 +230,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
230 /* Set UCC to fast type */ 230 /* Set UCC to fast type */
231 ret = ucc_set_type(uf_info->ucc_num, UCC_SPEED_TYPE_FAST); 231 ret = ucc_set_type(uf_info->ucc_num, UCC_SPEED_TYPE_FAST);
232 if (ret) { 232 if (ret) {
233 printk(KERN_ERR "%s: cannot set UCC type\n", __FUNCTION__); 233 printk(KERN_ERR "%s: cannot set UCC type\n", __func__);
234 ucc_fast_free(uccf); 234 ucc_fast_free(uccf);
235 return ret; 235 return ret;
236 } 236 }
@@ -270,7 +270,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
270 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 270 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
271 if (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { 271 if (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) {
272 printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO\n", 272 printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO\n",
273 __FUNCTION__); 273 __func__);
274 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; 274 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0;
275 ucc_fast_free(uccf); 275 ucc_fast_free(uccf);
276 return -ENOMEM; 276 return -ENOMEM;
@@ -283,7 +283,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
283 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 283 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
284 if (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { 284 if (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) {
285 printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO\n", 285 printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO\n",
286 __FUNCTION__); 286 __func__);
287 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; 287 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0;
288 ucc_fast_free(uccf); 288 ucc_fast_free(uccf);
289 return -ENOMEM; 289 return -ENOMEM;
@@ -314,7 +314,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
314 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock, 314 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock,
315 COMM_DIR_RX)) { 315 COMM_DIR_RX)) {
316 printk(KERN_ERR "%s: illegal value for RX clock\n", 316 printk(KERN_ERR "%s: illegal value for RX clock\n",
317 __FUNCTION__); 317 __func__);
318 ucc_fast_free(uccf); 318 ucc_fast_free(uccf);
319 return -EINVAL; 319 return -EINVAL;
320 } 320 }
@@ -323,7 +323,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
323 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock, 323 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock,
324 COMM_DIR_TX)) { 324 COMM_DIR_TX)) {
325 printk(KERN_ERR "%s: illegal value for TX clock\n", 325 printk(KERN_ERR "%s: illegal value for TX clock\n",
326 __FUNCTION__); 326 __func__);
327 ucc_fast_free(uccf); 327 ucc_fast_free(uccf);
328 return -EINVAL; 328 return -EINVAL;
329 } 329 }
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index b2870b208ddb..a578bc77b9d5 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -142,7 +142,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
142 142
143 /* check if the UCC port number is in range. */ 143 /* check if the UCC port number is in range. */
144 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { 144 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) {
145 printk(KERN_ERR "%s: illegal UCC number\n", __FUNCTION__); 145 printk(KERN_ERR "%s: illegal UCC number\n", __func__);
146 return -EINVAL; 146 return -EINVAL;
147 } 147 }
148 148
@@ -161,7 +161,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
161 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); 161 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL);
162 if (!uccs) { 162 if (!uccs) {
163 printk(KERN_ERR "%s: Cannot allocate private data\n", 163 printk(KERN_ERR "%s: Cannot allocate private data\n",
164 __FUNCTION__); 164 __func__);
165 return -ENOMEM; 165 return -ENOMEM;
166 } 166 }
167 167
@@ -170,7 +170,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
170 /* Set the PHY base address */ 170 /* Set the PHY base address */
171 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); 171 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow));
172 if (uccs->us_regs == NULL) { 172 if (uccs->us_regs == NULL) {
173 printk(KERN_ERR "%s: Cannot map UCC registers\n", __FUNCTION__); 173 printk(KERN_ERR "%s: Cannot map UCC registers\n", __func__);
174 return -ENOMEM; 174 return -ENOMEM;
175 } 175 }
176 176
@@ -189,7 +189,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
189 uccs->us_pram_offset = 189 uccs->us_pram_offset =
190 qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM); 190 qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM);
191 if (IS_ERR_VALUE(uccs->us_pram_offset)) { 191 if (IS_ERR_VALUE(uccs->us_pram_offset)) {
192 printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__); 192 printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __func__);
193 ucc_slow_free(uccs); 193 ucc_slow_free(uccs);
194 return -ENOMEM; 194 return -ENOMEM;
195 } 195 }
@@ -202,7 +202,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
202 /* Set UCC to slow type */ 202 /* Set UCC to slow type */
203 ret = ucc_set_type(us_info->ucc_num, UCC_SPEED_TYPE_SLOW); 203 ret = ucc_set_type(us_info->ucc_num, UCC_SPEED_TYPE_SLOW);
204 if (ret) { 204 if (ret) {
205 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); 205 printk(KERN_ERR "%s: cannot set UCC type", __func__);
206 ucc_slow_free(uccs); 206 ucc_slow_free(uccs);
207 return ret; 207 return ret;
208 } 208 }
@@ -216,7 +216,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
216 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), 216 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd),
217 QE_ALIGNMENT_OF_BD); 217 QE_ALIGNMENT_OF_BD);
218 if (IS_ERR_VALUE(uccs->rx_base_offset)) { 218 if (IS_ERR_VALUE(uccs->rx_base_offset)) {
219 printk(KERN_ERR "%s: cannot allocate %u RX BDs\n", __FUNCTION__, 219 printk(KERN_ERR "%s: cannot allocate %u RX BDs\n", __func__,
220 us_info->rx_bd_ring_len); 220 us_info->rx_bd_ring_len);
221 uccs->rx_base_offset = 0; 221 uccs->rx_base_offset = 0;
222 ucc_slow_free(uccs); 222 ucc_slow_free(uccs);
@@ -227,7 +227,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
227 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), 227 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd),
228 QE_ALIGNMENT_OF_BD); 228 QE_ALIGNMENT_OF_BD);
229 if (IS_ERR_VALUE(uccs->tx_base_offset)) { 229 if (IS_ERR_VALUE(uccs->tx_base_offset)) {
230 printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__); 230 printk(KERN_ERR "%s: cannot allocate TX BDs", __func__);
231 uccs->tx_base_offset = 0; 231 uccs->tx_base_offset = 0;
232 ucc_slow_free(uccs); 232 ucc_slow_free(uccs);
233 return -ENOMEM; 233 return -ENOMEM;
@@ -317,7 +317,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
317 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock, 317 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock,
318 COMM_DIR_RX)) { 318 COMM_DIR_RX)) {
319 printk(KERN_ERR "%s: illegal value for RX clock\n", 319 printk(KERN_ERR "%s: illegal value for RX clock\n",
320 __FUNCTION__); 320 __func__);
321 ucc_slow_free(uccs); 321 ucc_slow_free(uccs);
322 return -EINVAL; 322 return -EINVAL;
323 } 323 }
@@ -325,7 +325,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
325 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock, 325 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock,
326 COMM_DIR_TX)) { 326 COMM_DIR_TX)) {
327 printk(KERN_ERR "%s: illegal value for TX clock\n", 327 printk(KERN_ERR "%s: illegal value for TX clock\n",
328 __FUNCTION__); 328 __func__);
329 ucc_slow_free(uccs); 329 ucc_slow_free(uccs);
330 return -EINVAL; 330 return -EINVAL;
331 } 331 }
diff --git a/arch/powerpc/sysdev/rtc_cmos_setup.c b/arch/powerpc/sysdev/rtc_cmos_setup.c
index 0c9ac7ee08fb..c09ddc0dbeb3 100644
--- a/arch/powerpc/sysdev/rtc_cmos_setup.c
+++ b/arch/powerpc/sysdev/rtc_cmos_setup.c
@@ -56,3 +56,5 @@ static int __init add_rtc(void)
56 return 0; 56 return 0;
57} 57}
58fs_initcall(add_rtc); 58fs_initcall(add_rtc);
59
60MODULE_LICENSE("GPL");
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index be2808a292f7..d4d15aaf18fa 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -84,7 +84,7 @@ static int __init tsi108_eth_of_init(void)
84 84
85 ret = of_address_to_resource(np, 0, &r[0]); 85 ret = of_address_to_resource(np, 0, &r[0]);
86 DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", 86 DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
87 __FUNCTION__,r[0].name, r[0].start, r[0].end); 87 __func__,r[0].name, r[0].start, r[0].end);
88 if (ret) 88 if (ret)
89 goto err; 89 goto err;
90 90
@@ -93,7 +93,7 @@ static int __init tsi108_eth_of_init(void)
93 r[1].end = irq_of_parse_and_map(np, 0); 93 r[1].end = irq_of_parse_and_map(np, 0);
94 r[1].flags = IORESOURCE_IRQ; 94 r[1].flags = IORESOURCE_IRQ;
95 DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", 95 DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
96 __FUNCTION__,r[1].name, r[1].start, r[1].end); 96 __func__,r[1].name, r[1].start, r[1].end);
97 97
98 tsi_eth_dev = 98 tsi_eth_dev =
99 platform_device_register_simple("tsi-ethernet", i++, &r[0], 99 platform_device_register_simple("tsi-ethernet", i++, &r[0],
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 31d3d33d91fc..ac1a72dc21e5 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -207,7 +207,7 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
207 /* PCI Config mapping */ 207 /* PCI Config mapping */
208 tsi108_pci_cfg_base = (u32)ioremap(cfg_phys, TSI108_PCI_CFG_SIZE); 208 tsi108_pci_cfg_base = (u32)ioremap(cfg_phys, TSI108_PCI_CFG_SIZE);
209 tsi108_pci_cfg_phys = cfg_phys; 209 tsi108_pci_cfg_phys = cfg_phys;
210 DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __FUNCTION__, 210 DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __func__,
211 tsi108_pci_cfg_base); 211 tsi108_pci_cfg_base);
212 212
213 /* Fetch host bridge registers address */ 213 /* Fetch host bridge registers address */
@@ -395,7 +395,7 @@ static int pci_irq_host_xlate(struct irq_host *h, struct device_node *ct,
395static int pci_irq_host_map(struct irq_host *h, unsigned int virq, 395static int pci_irq_host_map(struct irq_host *h, unsigned int virq,
396 irq_hw_number_t hw) 396 irq_hw_number_t hw)
397{ unsigned int irq; 397{ unsigned int irq;
398 DBG("%s(%d, 0x%lx)\n", __FUNCTION__, virq, hw); 398 DBG("%s(%d, 0x%lx)\n", __func__, virq, hw);
399 if ((virq >= 1) && (virq <= 4)){ 399 if ((virq >= 1) && (virq <= 4)){
400 irq = virq + IRQ_PCI_INTAD_BASE - 1; 400 irq = virq + IRQ_PCI_INTAD_BASE - 1;
401 get_irq_desc(irq)->status |= IRQ_LEVEL; 401 get_irq_desc(irq)->status |= IRQ_LEVEL;
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index a34172ddc468..52c74780f403 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -45,7 +45,6 @@
45#ifdef CONFIG_PPC64 45#ifdef CONFIG_PPC64
46#include <asm/hvcall.h> 46#include <asm/hvcall.h>
47#include <asm/paca.h> 47#include <asm/paca.h>
48#include <asm/iseries/it_lp_reg_save.h>
49#endif 48#endif
50 49
51#include "nonstdio.h" 50#include "nonstdio.h"
@@ -1244,15 +1243,12 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp,
1244 1243
1245static int xmon_depth_to_print = 64; 1244static int xmon_depth_to_print = 64;
1246 1245
1247#ifdef CONFIG_PPC64 1246#define LRSAVE_OFFSET (STACK_FRAME_LR_SAVE * sizeof(unsigned long))
1248#define LRSAVE_OFFSET 0x10 1247#define MARKER_OFFSET (STACK_FRAME_MARKER * sizeof(unsigned long))
1249#define REG_FRAME_MARKER 0x7265677368657265ul /* "regshere" */ 1248
1250#define MARKER_OFFSET 0x60 1249#ifdef __powerpc64__
1251#define REGS_OFFSET 0x70 1250#define REGS_OFFSET 0x70
1252#else 1251#else
1253#define LRSAVE_OFFSET 4
1254#define REG_FRAME_MARKER 0x72656773
1255#define MARKER_OFFSET 8
1256#define REGS_OFFSET 16 1252#define REGS_OFFSET 16
1257#endif 1253#endif
1258 1254
@@ -1318,7 +1314,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr,
1318 /* Look for "regshere" marker to see if this is 1314 /* Look for "regshere" marker to see if this is
1319 an exception frame. */ 1315 an exception frame. */
1320 if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long)) 1316 if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long))
1321 && marker == REG_FRAME_MARKER) { 1317 && marker == STACK_FRAME_REGS_MARKER) {
1322 if (mread(sp + REGS_OFFSET, &regs, sizeof(regs)) 1318 if (mread(sp + REGS_OFFSET, &regs, sizeof(regs))
1323 != sizeof(regs)) { 1319 != sizeof(regs)) {
1324 printf("Couldn't read registers at %lx\n", 1320 printf("Couldn't read registers at %lx\n",
@@ -1598,7 +1594,6 @@ void super_regs(void)
1598 if (firmware_has_feature(FW_FEATURE_ISERIES)) { 1594 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
1599 struct paca_struct *ptrPaca; 1595 struct paca_struct *ptrPaca;
1600 struct lppaca *ptrLpPaca; 1596 struct lppaca *ptrLpPaca;
1601 struct ItLpRegSave *ptrLpRegSave;
1602 1597
1603 /* Dump out relevant Paca data areas. */ 1598 /* Dump out relevant Paca data areas. */
1604 printf("Paca: \n"); 1599 printf("Paca: \n");
@@ -1611,15 +1606,6 @@ void super_regs(void)
1611 printf(" Saved Gpr3=%.16lx Saved Gpr4=%.16lx \n", 1606 printf(" Saved Gpr3=%.16lx Saved Gpr4=%.16lx \n",
1612 ptrLpPaca->saved_gpr3, ptrLpPaca->saved_gpr4); 1607 ptrLpPaca->saved_gpr3, ptrLpPaca->saved_gpr4);
1613 printf(" Saved Gpr5=%.16lx \n", ptrLpPaca->saved_gpr5); 1608 printf(" Saved Gpr5=%.16lx \n", ptrLpPaca->saved_gpr5);
1614
1615 printf(" Local Processor Register Save Area (LpRegSave): \n");
1616 ptrLpRegSave = ptrPaca->reg_save_ptr;
1617 printf(" Saved Sprg0=%.16lx Saved Sprg1=%.16lx \n",
1618 ptrLpRegSave->xSPRG0, ptrLpRegSave->xSPRG0);
1619 printf(" Saved Sprg2=%.16lx Saved Sprg3=%.16lx \n",
1620 ptrLpRegSave->xSPRG2, ptrLpRegSave->xSPRG3);
1621 printf(" Saved Msr =%.16lx Saved Nia =%.16lx \n",
1622 ptrLpRegSave->xMSR, ptrLpRegSave->xNIA);
1623 } 1609 }
1624#endif 1610#endif
1625 1611
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 9d656de0f0f1..752443df5ecf 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -43,7 +43,7 @@
43({ \ 43({ \
44 u32 offset = offsetof(immap_t, member); \ 44 u32 offset = offsetof(immap_t, member); \
45 void *addr = ioremap (IMAP_ADDR + offset, \ 45 void *addr = ioremap (IMAP_ADDR + offset, \
46 sizeof( ((immap_t*)0)->member)); \ 46 FIELD_SIZEOF(immap_t, member)); \
47 addr; \ 47 addr; \
48}) 48})
49 49
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 11b0aa6ca97e..2c604d4f6e8b 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -199,7 +199,6 @@ static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
199#ifdef CONFIG_USE_MDIO 199#ifdef CONFIG_USE_MDIO
200static void fec_enet_mii(struct net_device *dev); 200static void fec_enet_mii(struct net_device *dev);
201#endif /* CONFIG_USE_MDIO */ 201#endif /* CONFIG_USE_MDIO */
202static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
203#ifdef CONFIG_FEC_PACKETHOOK 202#ifdef CONFIG_FEC_PACKETHOOK
204static void fec_enet_tx(struct net_device *dev, __u32 regval); 203static void fec_enet_tx(struct net_device *dev, __u32 regval);
205static void fec_enet_rx(struct net_device *dev, __u32 regval); 204static void fec_enet_rx(struct net_device *dev, __u32 regval);
@@ -472,7 +471,7 @@ fec_timeout(struct net_device *dev)
472 * This is called from the MPC core interrupt. 471 * This is called from the MPC core interrupt.
473 */ 472 */
474static irqreturn_t 473static irqreturn_t
475fec_enet_interrupt(int irq, void * dev_id) 474fec_enet_interrupt(int irq, void *dev_id)
476{ 475{
477 struct net_device *dev = dev_id; 476 struct net_device *dev = dev_id;
478 volatile fec_t *fecp; 477 volatile fec_t *fecp;
@@ -520,7 +519,7 @@ fec_enet_interrupt(int irq, void * dev_id)
520#ifdef CONFIG_USE_MDIO 519#ifdef CONFIG_USE_MDIO
521 fec_enet_mii(dev); 520 fec_enet_mii(dev);
522#else 521#else
523printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__,__LINE__,__FUNCTION__); 522printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__, __LINE__, __func__);
524#endif /* CONFIG_USE_MDIO */ 523#endif /* CONFIG_USE_MDIO */
525 } 524 }
526 525
@@ -1441,7 +1440,7 @@ irqreturn_t mii_link_interrupt(int irq, void * dev_id)
1441 fecp->fec_ecntrl = ecntrl; /* restore old settings */ 1440 fecp->fec_ecntrl = ecntrl; /* restore old settings */
1442 } 1441 }
1443#else 1442#else
1444printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__,__LINE__,__FUNCTION__); 1443printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__, __LINE__, __func__);
1445#endif /* CONFIG_USE_MDIO */ 1444#endif /* CONFIG_USE_MDIO */
1446 1445
1447#ifndef CONFIG_RPXCLASSIC 1446#ifndef CONFIG_RPXCLASSIC
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
index 1b0ec7202dd5..e7e642b95138 100644
--- a/arch/ppc/kernel/head.S
+++ b/arch/ppc/kernel/head.S
@@ -701,23 +701,6 @@ load_up_altivec:
701 b fast_exception_return 701 b fast_exception_return
702 702
703/* 703/*
704 * AltiVec unavailable trap from kernel - print a message, but let
705 * the task use AltiVec in the kernel until it returns to user mode.
706 */
707KernelAltiVec:
708 lwz r3,_MSR(r1)
709 oris r3,r3,MSR_VEC@h
710 stw r3,_MSR(r1) /* enable use of AltiVec after return */
711 lis r3,87f@h
712 ori r3,r3,87f@l
713 mr r4,r2 /* current */
714 lwz r5,_NIP(r1)
715 bl printk
716 b ret_from_except
71787: .string "AltiVec used in kernel (task=%p, pc=%x) \n"
718 .align 4,0
719
720/*
721 * giveup_altivec(tsk) 704 * giveup_altivec(tsk)
722 * Disable AltiVec for the task given as the argument, 705 * Disable AltiVec for the task given as the argument,
723 * and save the AltiVec registers in its thread_struct. 706 * and save the AltiVec registers in its thread_struct.
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index 7444df3889c5..1a63711081b5 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -109,7 +109,6 @@ void show_mem(void)
109 109
110 printk("Mem-info:\n"); 110 printk("Mem-info:\n");
111 show_free_areas(); 111 show_free_areas();
112 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
113 i = max_mapnr; 112 i = max_mapnr;
114 while (i-- > 0) { 113 while (i-- > 0) {
115 total++; 114 total++;
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index 179b4a99b5b5..f1dee1e87809 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -511,7 +511,7 @@ static void __init ppc7d_init_irq(void)
511{ 511{
512 int irq; 512 int irq;
513 513
514 pr_debug("%s\n", __FUNCTION__); 514 pr_debug("%s\n", __func__);
515 i8259_init(0, 0); 515 i8259_init(0, 0);
516 mv64360_init_irq(); 516 mv64360_init_irq();
517 517
@@ -568,7 +568,7 @@ static int __init ppc7d_map_irq(struct pci_dev *dev, unsigned char idsel,
568 }; 568 };
569 const long min_idsel = 10, max_idsel = 14, irqs_per_slot = 4; 569 const long min_idsel = 10, max_idsel = 14, irqs_per_slot = 4;
570 570
571 pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __FUNCTION__, 571 pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __func__,
572 dev->vendor, dev->device, PCI_FUNC(dev->devfn), idsel, pin); 572 dev->vendor, dev->device, PCI_FUNC(dev->devfn), idsel, pin);
573 573
574 return PCI_IRQ_TABLE_LOOKUP; 574 return PCI_IRQ_TABLE_LOOKUP;
@@ -1299,7 +1299,7 @@ static void ppc7d_init2(void)
1299 u32 data; 1299 u32 data;
1300 u8 data8; 1300 u8 data8;
1301 1301
1302 pr_debug("%s: enter\n", __FUNCTION__); 1302 pr_debug("%s: enter\n", __func__);
1303 1303
1304 /* Wait for debugger? */ 1304 /* Wait for debugger? */
1305 if (ppc7d_wait_debugger) { 1305 if (ppc7d_wait_debugger) {
@@ -1332,7 +1332,7 @@ static void ppc7d_init2(void)
1332 ppc_md.set_rtc_time = ppc7d_set_rtc_time; 1332 ppc_md.set_rtc_time = ppc7d_set_rtc_time;
1333 ppc_md.get_rtc_time = ppc7d_get_rtc_time; 1333 ppc_md.get_rtc_time = ppc7d_get_rtc_time;
1334 1334
1335 pr_debug("%s: exit\n", __FUNCTION__); 1335 pr_debug("%s: exit\n", __func__);
1336} 1336}
1337 1337
1338/* Called from machine_init(), early, before any of the __init functions 1338/* Called from machine_init(), early, before any of the __init functions
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index cc0935ccab7a..0df6aacb8237 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -121,8 +121,10 @@ struct hw_interrupt_type sbc82xx_i8259_ic = {
121 .end = sbc82xx_i8259_end_irq, 121 .end = sbc82xx_i8259_end_irq,
122}; 122};
123 123
124static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id) 124static irqreturn_t sbc82xx_i8259_demux(int dummy, void *dev_id)
125{ 125{
126 int irq;
127
126 spin_lock(&sbc82xx_i8259_lock); 128 spin_lock(&sbc82xx_i8259_lock);
127 129
128 sbc82xx_i8259_map[0] = 0x0c; /* OCW3: Read IR register on RD# pulse */ 130 sbc82xx_i8259_map[0] = 0x0c; /* OCW3: Read IR register on RD# pulse */
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
index 9f504fc7693e..ab0cf4ced9e5 100644
--- a/arch/ppc/syslib/mpc52xx_setup.c
+++ b/arch/ppc/syslib/mpc52xx_setup.c
@@ -279,7 +279,7 @@ int mpc52xx_match_psc_function(int psc_idx, const char *func)
279 279
280int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv) 280int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
281{ 281{
282 static spinlock_t lock = SPIN_LOCK_UNLOCKED; 282 static DEFINE_SPINLOCK(lock);
283 struct mpc52xx_cdm __iomem *cdm; 283 struct mpc52xx_cdm __iomem *cdm;
284 unsigned long flags; 284 unsigned long flags;
285 u16 mclken_div; 285 u16 mclken_div;
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c
index ac80370ed2f7..a6fb7dcfa738 100644
--- a/arch/ppc/syslib/ocp.c
+++ b/arch/ppc/syslib/ocp.c
@@ -49,7 +49,6 @@
49#include <asm/io.h> 49#include <asm/io.h>
50#include <asm/ocp.h> 50#include <asm/ocp.h>
51#include <asm/errno.h> 51#include <asm/errno.h>
52#include <asm/semaphore.h>
53 52
54//#define DBG(x) printk x 53//#define DBG(x) printk x
55#define DBG(x) 54#define DBG(x)
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 50b85d07ddd2..d7f22226fc4e 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -62,7 +62,6 @@
62 62
63#include <asm/types.h> 63#include <asm/types.h>
64#include <asm/uaccess.h> 64#include <asm/uaccess.h>
65#include <asm/semaphore.h>
66 65
67#include <net/scm.h> 66#include <net/scm.h>
68#include <net/sock.h> 67#include <net/sock.h>
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 1e7d4ac7068b..dff0568e67ec 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -17,7 +17,6 @@
17#include <linux/ctype.h> 17#include <linux/ctype.h>
18#include <linux/sysctl.h> 18#include <linux/sysctl.h>
19#include <asm/uaccess.h> 19#include <asm/uaccess.h>
20#include <asm/semaphore.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/fs.h> 22#include <linux/fs.h>
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8d2cd1de5726..6a679c3e15e8 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -167,6 +167,12 @@ config CPU_SUBTYPE_SH7263
167 select CPU_SH2A 167 select CPU_SH2A
168 select CPU_HAS_FPU 168 select CPU_HAS_FPU
169 169
170config CPU_SUBTYPE_MXG
171 bool "Support MX-G processor"
172 select CPU_SH2A
173 help
174 Select MX-G if running on an R8A03022BG part.
175
170# SH-3 Processor Support 176# SH-3 Processor Support
171 177
172config CPU_SUBTYPE_SH7705 178config CPU_SUBTYPE_SH7705
@@ -270,6 +276,15 @@ config CPU_SUBTYPE_SH4_202
270 276
271# SH-4A Processor Support 277# SH-4A Processor Support
272 278
279config CPU_SUBTYPE_SH7723
280 bool "Support SH7723 processor"
281 select CPU_SH4A
282 select CPU_SHX2
283 select ARCH_SPARSEMEM_ENABLE
284 select SYS_SUPPORTS_NUMA
285 help
286 Select SH7723 if you have an SH-MobileR2 CPU.
287
273config CPU_SUBTYPE_SH7763 288config CPU_SUBTYPE_SH7763
274 bool "Support SH7763 processor" 289 bool "Support SH7763 processor"
275 select CPU_SH4A 290 select CPU_SH4A
@@ -366,6 +381,14 @@ config SH_7619_SOLUTION_ENGINE
366 Select 7619 SolutionEngine if configuring for a Hitachi SH7619 381 Select 7619 SolutionEngine if configuring for a Hitachi SH7619
367 evaluation board. 382 evaluation board.
368 383
384config SH_7721_SOLUTION_ENGINE
385 bool "SolutionEngine7721"
386 select SOLUTION_ENGINE
387 depends on CPU_SUBTYPE_SH7721
388 help
389 Select 7721 SolutionEngine if configuring for a Hitachi SH7721
390 evaluation board.
391
369config SH_7722_SOLUTION_ENGINE 392config SH_7722_SOLUTION_ENGINE
370 bool "SolutionEngine7722" 393 bool "SolutionEngine7722"
371 select SOLUTION_ENGINE 394 select SOLUTION_ENGINE
@@ -560,7 +583,7 @@ config SH_TMU
560config SH_CMT 583config SH_CMT
561 def_bool y 584 def_bool y
562 prompt "CMT timer support" 585 prompt "CMT timer support"
563 depends on CPU_SH2 586 depends on CPU_SH2 && !CPU_SUBTYPE_MXG
564 help 587 help
565 This enables the use of the CMT as the system timer. 588 This enables the use of the CMT as the system timer.
566 589
@@ -578,6 +601,7 @@ config SH_TIMER_IRQ
578 default "86" if CPU_SUBTYPE_SH7619 601 default "86" if CPU_SUBTYPE_SH7619
579 default "140" if CPU_SUBTYPE_SH7206 602 default "140" if CPU_SUBTYPE_SH7206
580 default "142" if CPU_SUBTYPE_SH7203 603 default "142" if CPU_SUBTYPE_SH7203
604 default "238" if CPU_SUBTYPE_MXG
581 default "16" 605 default "16"
582 606
583config SH_PCLK_FREQ 607config SH_PCLK_FREQ
@@ -585,10 +609,10 @@ config SH_PCLK_FREQ
585 default "27000000" if CPU_SUBTYPE_SH7343 609 default "27000000" if CPU_SUBTYPE_SH7343
586 default "31250000" if CPU_SUBTYPE_SH7619 610 default "31250000" if CPU_SUBTYPE_SH7619
587 default "32000000" if CPU_SUBTYPE_SH7722 611 default "32000000" if CPU_SUBTYPE_SH7722
588 default "33333333" if CPU_SUBTYPE_SH7770 || \ 612 default "33333333" if CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7723 || \
589 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \ 613 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
590 CPU_SUBTYPE_SH7203 || CPU_SUBTYPE_SH7206 || \ 614 CPU_SUBTYPE_SH7203 || CPU_SUBTYPE_SH7206 || \
591 CPU_SUBTYPE_SH7263 615 CPU_SUBTYPE_SH7263 || CPU_SUBTYPE_MXG
592 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R 616 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
593 default "66000000" if CPU_SUBTYPE_SH4_202 617 default "66000000" if CPU_SUBTYPE_SH4_202
594 default "50000000" 618 default "50000000"
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 5dcb74b947a9..d9d28f9dd0db 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -29,16 +29,17 @@ config EARLY_SCIF_CONSOLE
29config EARLY_SCIF_CONSOLE_PORT 29config EARLY_SCIF_CONSOLE_PORT
30 hex 30 hex
31 depends on EARLY_SCIF_CONSOLE 31 depends on EARLY_SCIF_CONSOLE
32 default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763
33 default "0xffe00000" if CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366
34 default "0xffea0000" if CPU_SUBTYPE_SH7785
35 default "0xfffe8000" if CPU_SUBTYPE_SH7203
36 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
37 default "0xf8420000" if CPU_SUBTYPE_SH7619
38 default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705 32 default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
39 default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721 33 default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
34 default "0xf8420000" if CPU_SUBTYPE_SH7619
35 default "0xff804000" if CPU_SUBTYPE_MXG
40 default "0xffc30000" if CPU_SUBTYPE_SHX3 36 default "0xffc30000" if CPU_SUBTYPE_SHX3
37 default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
38 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366
41 default "0xffe80000" if CPU_SH4 39 default "0xffe80000" if CPU_SH4
40 default "0xffea0000" if CPU_SUBTYPE_SH7785
41 default "0xfffe8000" if CPU_SUBTYPE_SH7203
42 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
42 default "0x00000000" 43 default "0x00000000"
43 44
44config EARLY_PRINTK 45config EARLY_PRINTK
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index cffc92b1bf2e..bb06f83e6239 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -107,6 +107,7 @@ machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE) += se/7722
107machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) += se/7751 107machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) += se/7751
108machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) += se/7780 108machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE) += se/7780
109machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343 109machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343
110machdir-$(CONFIG_SH_7721_SOLUTION_ENGINE) += se/7721
110machdir-$(CONFIG_SH_HP6XX) += hp6xx 111machdir-$(CONFIG_SH_HP6XX) += hp6xx
111machdir-$(CONFIG_SH_DREAMCAST) += dreamcast 112machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
112machdir-$(CONFIG_SH_MPC1211) += mpc1211 113machdir-$(CONFIG_SH_MPC1211) += mpc1211
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c
index 21ab8c8fb590..00d52a20d8a5 100644
--- a/arch/sh/boards/renesas/migor/setup.c
+++ b/arch/sh/boards/renesas/migor/setup.c
@@ -10,8 +10,14 @@
10#include <linux/init.h> 10#include <linux/init.h>
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>
14#include <linux/mtd/physmap.h>
15#include <linux/mtd/nand.h>
16#include <linux/i2c.h>
13#include <asm/machvec.h> 17#include <asm/machvec.h>
14#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/sh_keysc.h>
20#include <asm/migor.h>
15 21
16/* Address IRQ Size Bus Description 22/* Address IRQ Size Bus Description
17 * 0x00000000 64MB 16 NOR Flash (SP29PL256N) 23 * 0x00000000 64MB 16 NOR Flash (SP29PL256N)
@@ -23,9 +29,9 @@
23 29
24static struct resource smc91x_eth_resources[] = { 30static struct resource smc91x_eth_resources[] = {
25 [0] = { 31 [0] = {
26 .name = "smc91x-regs" , 32 .name = "SMC91C111" ,
27 .start = P2SEGADDR(0x10000300), 33 .start = 0x10000300,
28 .end = P2SEGADDR(0x1000030f), 34 .end = 0x1000030f,
29 .flags = IORESOURCE_MEM, 35 .flags = IORESOURCE_MEM,
30 }, 36 },
31 [1] = { 37 [1] = {
@@ -40,19 +46,202 @@ static struct platform_device smc91x_eth_device = {
40 .resource = smc91x_eth_resources, 46 .resource = smc91x_eth_resources,
41}; 47};
42 48
49static struct sh_keysc_info sh_keysc_info = {
50 .mode = SH_KEYSC_MODE_2, /* KEYOUT0->4, KEYIN1->5 */
51 .scan_timing = 3,
52 .delay = 5,
53 .keycodes = {
54 0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_ENTER,
55 0, KEY_F, KEY_C, KEY_D, KEY_H, KEY_1,
56 0, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6,
57 0, KEY_7, KEY_8, KEY_9, KEY_S, KEY_0,
58 0, KEY_P, KEY_STOP, KEY_REWIND, KEY_PLAY, KEY_FASTFORWARD,
59 },
60};
61
62static struct resource sh_keysc_resources[] = {
63 [0] = {
64 .start = 0x044b0000,
65 .end = 0x044b000f,
66 .flags = IORESOURCE_MEM,
67 },
68 [1] = {
69 .start = 79,
70 .flags = IORESOURCE_IRQ,
71 },
72};
73
74static struct platform_device sh_keysc_device = {
75 .name = "sh_keysc",
76 .num_resources = ARRAY_SIZE(sh_keysc_resources),
77 .resource = sh_keysc_resources,
78 .dev = {
79 .platform_data = &sh_keysc_info,
80 },
81};
82
83static struct mtd_partition migor_nor_flash_partitions[] =
84{
85 {
86 .name = "uboot",
87 .offset = 0,
88 .size = (1 * 1024 * 1024),
89 .mask_flags = MTD_WRITEABLE, /* Read-only */
90 },
91 {
92 .name = "rootfs",
93 .offset = MTDPART_OFS_APPEND,
94 .size = (15 * 1024 * 1024),
95 },
96 {
97 .name = "other",
98 .offset = MTDPART_OFS_APPEND,
99 .size = MTDPART_SIZ_FULL,
100 },
101};
102
103static struct physmap_flash_data migor_nor_flash_data = {
104 .width = 2,
105 .parts = migor_nor_flash_partitions,
106 .nr_parts = ARRAY_SIZE(migor_nor_flash_partitions),
107};
108
109static struct resource migor_nor_flash_resources[] = {
110 [0] = {
111 .name = "NOR Flash",
112 .start = 0x00000000,
113 .end = 0x03ffffff,
114 .flags = IORESOURCE_MEM,
115 }
116};
117
118static struct platform_device migor_nor_flash_device = {
119 .name = "physmap-flash",
120 .resource = migor_nor_flash_resources,
121 .num_resources = ARRAY_SIZE(migor_nor_flash_resources),
122 .dev = {
123 .platform_data = &migor_nor_flash_data,
124 },
125};
126
127static struct mtd_partition migor_nand_flash_partitions[] = {
128 {
129 .name = "nanddata1",
130 .offset = 0x0,
131 .size = 512 * 1024 * 1024,
132 },
133 {
134 .name = "nanddata2",
135 .offset = MTDPART_OFS_APPEND,
136 .size = 512 * 1024 * 1024,
137 },
138};
139
140static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
141 unsigned int ctrl)
142{
143 struct nand_chip *chip = mtd->priv;
144
145 if (cmd == NAND_CMD_NONE)
146 return;
147
148 if (ctrl & NAND_CLE)
149 writeb(cmd, chip->IO_ADDR_W + 0x00400000);
150 else if (ctrl & NAND_ALE)
151 writeb(cmd, chip->IO_ADDR_W + 0x00800000);
152 else
153 writeb(cmd, chip->IO_ADDR_W);
154}
155
156static int migor_nand_flash_ready(struct mtd_info *mtd)
157{
158 return ctrl_inb(PORT_PADR) & 0x02; /* PTA1 */
159}
160
161struct platform_nand_data migor_nand_flash_data = {
162 .chip = {
163 .nr_chips = 1,
164 .partitions = migor_nand_flash_partitions,
165 .nr_partitions = ARRAY_SIZE(migor_nand_flash_partitions),
166 .chip_delay = 20,
167 .part_probe_types = (const char *[]) { "cmdlinepart", NULL },
168 },
169 .ctrl = {
170 .dev_ready = migor_nand_flash_ready,
171 .cmd_ctrl = migor_nand_flash_cmd_ctl,
172 },
173};
174
175static struct resource migor_nand_flash_resources[] = {
176 [0] = {
177 .name = "NAND Flash",
178 .start = 0x18000000,
179 .end = 0x18ffffff,
180 .flags = IORESOURCE_MEM,
181 },
182};
183
184static struct platform_device migor_nand_flash_device = {
185 .name = "gen_nand",
186 .resource = migor_nand_flash_resources,
187 .num_resources = ARRAY_SIZE(migor_nand_flash_resources),
188 .dev = {
189 .platform_data = &migor_nand_flash_data,
190 }
191};
192
43static struct platform_device *migor_devices[] __initdata = { 193static struct platform_device *migor_devices[] __initdata = {
44 &smc91x_eth_device, 194 &smc91x_eth_device,
195 &sh_keysc_device,
196 &migor_nor_flash_device,
197 &migor_nand_flash_device,
198};
199
200static struct i2c_board_info __initdata migor_i2c_devices[] = {
201 {
202 I2C_BOARD_INFO("rtc-rs5c372", 0x32),
203 .type = "rs5c372b",
204 },
205 {
206 I2C_BOARD_INFO("migor_ts", 0x51),
207 .irq = 38, /* IRQ6 */
208 },
45}; 209};
46 210
47static int __init migor_devices_setup(void) 211static int __init migor_devices_setup(void)
48{ 212{
213 i2c_register_board_info(0, migor_i2c_devices,
214 ARRAY_SIZE(migor_i2c_devices));
215
49 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); 216 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
50} 217}
51__initcall(migor_devices_setup); 218__initcall(migor_devices_setup);
52 219
53static void __init migor_setup(char **cmdline_p) 220static void __init migor_setup(char **cmdline_p)
54{ 221{
55 ctrl_outw(0x1000, 0xa4050110); /* Enable IRQ0 in PJCR */ 222 /* SMC91C111 - Enable IRQ0 */
223 ctrl_outw(ctrl_inw(PORT_PJCR) & ~0x0003, PORT_PJCR);
224
225 /* KEYSC */
226 ctrl_outw(ctrl_inw(PORT_PYCR) & ~0x0fff, PORT_PYCR);
227 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0x0ff0, PORT_PZCR);
228 ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
229 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
230 ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
231 ctrl_outl(ctrl_inl(MSTPCR2) & ~0x00004000, MSTPCR2);
232
233 /* NAND Flash */
234 ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
235 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
236 BSC_CS6ABCR);
237
238 /* I2C */
239 ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
240
241 /* Touch Panel - Enable IRQ6 */
242 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
243 ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
244 ctrl_outw((ctrl_inw(PORT_HIZCRC) & ~0x4000), PORT_HIZCRC);
56} 245}
57 246
58static struct sh_machine_vector mv_migor __initmv = { 247static struct sh_machine_vector mv_migor __initmv = {
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
index 1f8f073f27be..68f0ad1b637d 100644
--- a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
+++ b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
@@ -18,31 +18,44 @@ enum {
18 UNUSED = 0, 18 UNUSED = 0,
19 19
20 /* board specific interrupt sources */ 20 /* board specific interrupt sources */
21 AX88796, /* Ethernet controller */ 21 CF, /* Compact Flash */
22 CF, /* Compact Flash */ 22 TP, /* Touch panel */
23 PSW, /* Push Switch */ 23 SCIF1, /* FPGA SCIF1 */
24 EXT1, /* EXT1n IRQ */ 24 SCIF0, /* FPGA SCIF0 */
25 EXT4, /* EXT4n IRQ */ 25 SMBUS, /* SMBUS */
26 RTC, /* RTC Alarm */
27 AX88796, /* Ethernet controller */
28 PSW, /* Push Switch */
29
30 /* external bus connector */
31 EXT1, EXT2, EXT4, EXT5, EXT6,
26}; 32};
27 33
28static struct intc_vect vectors[] __initdata = { 34static struct intc_vect vectors[] __initdata = {
29 INTC_IRQ(CF, IRQ_CF), 35 INTC_IRQ(CF, IRQ_CF),
30 INTC_IRQ(PSW, IRQ_PSW), 36 INTC_IRQ(TP, IRQ_TP),
37 INTC_IRQ(SCIF1, IRQ_SCIF1),
38 INTC_IRQ(SCIF0, IRQ_SCIF0),
39 INTC_IRQ(SMBUS, IRQ_SMBUS),
40 INTC_IRQ(RTC, IRQ_RTC),
31 INTC_IRQ(AX88796, IRQ_AX88796), 41 INTC_IRQ(AX88796, IRQ_AX88796),
32 INTC_IRQ(EXT1, IRQ_EXT1), 42 INTC_IRQ(PSW, IRQ_PSW),
33 INTC_IRQ(EXT4, IRQ_EXT4), 43
44 INTC_IRQ(EXT1, IRQ_EXT1), INTC_IRQ(EXT2, IRQ_EXT2),
45 INTC_IRQ(EXT4, IRQ_EXT4), INTC_IRQ(EXT5, IRQ_EXT5),
46 INTC_IRQ(EXT6, IRQ_EXT6),
34}; 47};
35 48
36static struct intc_mask_reg mask_registers[] __initdata = { 49static struct intc_mask_reg mask_registers[] __initdata = {
37 { 0xa4000000, 0, 16, /* IRLMSK */ 50 { 0xa4000000, 0, 16, /* IRLMSK */
38 { 0, 0, 0, 0, CF, 0, 0, 0, 51 { SCIF0, SCIF1, RTC, 0, CF, 0, TP, SMBUS,
39 0, 0, 0, EXT4, 0, EXT1, PSW, AX88796 } }, 52 0, EXT6, EXT5, EXT4, EXT2, EXT1, PSW, AX88796 } },
40}; 53};
41 54
42static unsigned char irl2irq[HL_NR_IRL] __initdata = { 55static unsigned char irl2irq[HL_NR_IRL] __initdata = {
43 0, IRQ_CF, 0, 0, 56 0, IRQ_CF, IRQ_TP, IRQ_SCIF1,
44 0, 0, 0, 0, 57 IRQ_SCIF0, IRQ_SMBUS, IRQ_RTC, IRQ_EXT6,
45 0, IRQ_EXT4, 0, IRQ_EXT1, 58 IRQ_EXT5, IRQ_EXT4, IRQ_EXT2, IRQ_EXT1,
46 0, IRQ_AX88796, IRQ_PSW, 59 0, IRQ_AX88796, IRQ_PSW,
47}; 60};
48 61
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 2f68bea7890c..a5c5e9236501 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -4,7 +4,7 @@
4 * Renesas Solutions Highlander Support. 4 * Renesas Solutions Highlander Support.
5 * 5 *
6 * Copyright (C) 2002 Atom Create Engineering Co., Ltd. 6 * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
7 * Copyright (C) 2005 - 2007 Paul Mundt 7 * Copyright (C) 2005 - 2008 Paul Mundt
8 * 8 *
9 * This contains support for the R7780RP-1, R7780MP, and R7785RP 9 * This contains support for the R7780RP-1, R7780MP, and R7785RP
10 * Highlander modules. 10 * Highlander modules.
@@ -17,6 +17,7 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/ata_platform.h> 18#include <linux/ata_platform.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/i2c.h>
20#include <net/ax88796.h> 21#include <net/ax88796.h>
21#include <asm/machvec.h> 22#include <asm/machvec.h>
22#include <asm/r7780rp.h> 23#include <asm/r7780rp.h>
@@ -176,11 +177,38 @@ static struct platform_device ax88796_device = {
176 .resource = ax88796_resources, 177 .resource = ax88796_resources,
177}; 178};
178 179
180static struct resource smbus_resources[] = {
181 [0] = {
182 .start = PA_SMCR,
183 .end = PA_SMCR + 0x100 - 1,
184 .flags = IORESOURCE_MEM,
185 },
186 [1] = {
187 .start = IRQ_SMBUS,
188 .end = IRQ_SMBUS,
189 .flags = IORESOURCE_IRQ,
190 },
191};
192
193static struct platform_device smbus_device = {
194 .name = "i2c-highlander",
195 .id = 0,
196 .num_resources = ARRAY_SIZE(smbus_resources),
197 .resource = smbus_resources,
198};
199
200static struct i2c_board_info __initdata highlander_i2c_devices[] = {
201 {
202 I2C_BOARD_INFO("rtc-rs5c372", 0x32),
203 .type = "r2025sd",
204 },
205};
179 206
180static struct platform_device *r7780rp_devices[] __initdata = { 207static struct platform_device *r7780rp_devices[] __initdata = {
181 &r8a66597_usb_host_device, 208 &r8a66597_usb_host_device,
182 &m66592_usb_peripheral_device, 209 &m66592_usb_peripheral_device,
183 &heartbeat_device, 210 &heartbeat_device,
211 &smbus_device,
184#ifndef CONFIG_SH_R7780RP 212#ifndef CONFIG_SH_R7780RP
185 &ax88796_device, 213 &ax88796_device,
186#endif 214#endif
@@ -199,12 +227,20 @@ static struct trapped_io cf_trapped_io = {
199 227
200static int __init r7780rp_devices_setup(void) 228static int __init r7780rp_devices_setup(void)
201{ 229{
230 int ret = 0;
231
202#ifndef CONFIG_SH_R7780RP 232#ifndef CONFIG_SH_R7780RP
203 if (register_trapped_io(&cf_trapped_io) == 0) 233 if (register_trapped_io(&cf_trapped_io) == 0)
204 platform_device_register(&cf_ide_device); 234 ret |= platform_device_register(&cf_ide_device);
205#endif 235#endif
206 return platform_add_devices(r7780rp_devices, 236
237 ret |= platform_add_devices(r7780rp_devices,
207 ARRAY_SIZE(r7780rp_devices)); 238 ARRAY_SIZE(r7780rp_devices));
239
240 ret |= i2c_register_board_info(0, highlander_i2c_devices,
241 ARRAY_SIZE(highlander_i2c_devices));
242
243 return ret;
208} 244}
209device_initcall(r7780rp_devices_setup); 245device_initcall(r7780rp_devices_setup);
210 246
diff --git a/arch/sh/boards/se/7721/Makefile b/arch/sh/boards/se/7721/Makefile
new file mode 100644
index 000000000000..7f09030980b3
--- /dev/null
+++ b/arch/sh/boards/se/7721/Makefile
@@ -0,0 +1 @@
obj-y := setup.o irq.o
diff --git a/arch/sh/boards/se/7721/irq.c b/arch/sh/boards/se/7721/irq.c
new file mode 100644
index 000000000000..c4fdd622bf8b
--- /dev/null
+++ b/arch/sh/boards/se/7721/irq.c
@@ -0,0 +1,45 @@
1/*
2 * linux/arch/sh/boards/se/7721/irq.c
3 *
4 * Copyright (C) 2008 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/irq.h>
12#include <linux/interrupt.h>
13#include <linux/io.h>
14#include <asm/se7721.h>
15
16enum {
17 UNUSED = 0,
18
19 /* board specific interrupt sources */
20 MRSHPC,
21};
22
23static struct intc_vect vectors[] __initdata = {
24 INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
25};
26
27static struct intc_prio_reg prio_registers[] __initdata = {
28 { FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
29 { 0, MRSHPC } },
30};
31
32static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
33 NULL, NULL, prio_registers, NULL);
34
35/*
36 * Initialize IRQ setting
37 */
38void __init init_se7721_IRQ(void)
39{
40 /* PPCR */
41 ctrl_outw(ctrl_inw(0xa4050118) & ~0x00ff, 0xa4050118);
42
43 register_intc_controller(&intc_desc);
44 intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
45}
diff --git a/arch/sh/boards/se/7721/setup.c b/arch/sh/boards/se/7721/setup.c
new file mode 100644
index 000000000000..1be3e92752f7
--- /dev/null
+++ b/arch/sh/boards/se/7721/setup.c
@@ -0,0 +1,99 @@
1/*
2 * linux/arch/sh/boards/se/7721/setup.c
3 *
4 * Copyright (C) 2008 Renesas Solutions Corp.
5 *
6 * Hitachi UL SolutionEngine 7721 Support.
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 */
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <asm/machvec.h>
16#include <asm/se7721.h>
17#include <asm/io.h>
18#include <asm/heartbeat.h>
19
20static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
21
22static struct heartbeat_data heartbeat_data = {
23 .bit_pos = heartbeat_bit_pos,
24 .nr_bits = ARRAY_SIZE(heartbeat_bit_pos),
25 .regsize = 16,
26};
27
28static struct resource heartbeat_resources[] = {
29 [0] = {
30 .start = PA_LED,
31 .end = PA_LED,
32 .flags = IORESOURCE_MEM,
33 },
34};
35
36static struct platform_device heartbeat_device = {
37 .name = "heartbeat",
38 .id = -1,
39 .dev = {
40 .platform_data = &heartbeat_data,
41 },
42 .num_resources = ARRAY_SIZE(heartbeat_resources),
43 .resource = heartbeat_resources,
44};
45
46static struct resource cf_ide_resources[] = {
47 [0] = {
48 .start = PA_MRSHPC_IO + 0x1f0,
49 .end = PA_MRSHPC_IO + 0x1f0 + 8 ,
50 .flags = IORESOURCE_IO,
51 },
52 [1] = {
53 .start = PA_MRSHPC_IO + 0x1f0 + 0x206,
54 .end = PA_MRSHPC_IO + 0x1f0 + 8 + 0x206 + 8,
55 .flags = IORESOURCE_IO,
56 },
57 [2] = {
58 .start = MRSHPC_IRQ0,
59 .flags = IORESOURCE_IRQ,
60 },
61};
62
63static struct platform_device cf_ide_device = {
64 .name = "pata_platform",
65 .id = -1,
66 .num_resources = ARRAY_SIZE(cf_ide_resources),
67 .resource = cf_ide_resources,
68};
69
70static struct platform_device *se7721_devices[] __initdata = {
71 &cf_ide_device,
72 &heartbeat_device
73};
74
75static int __init se7721_devices_setup(void)
76{
77 return platform_add_devices(se7721_devices,
78 ARRAY_SIZE(se7721_devices));
79}
80device_initcall(se7721_devices_setup);
81
82static void __init se7721_setup(char **cmdline_p)
83{
84 /* for USB */
85 ctrl_outw(0x0000, 0xA405010C); /* PGCR */
86 ctrl_outw(0x0000, 0xA405010E); /* PHCR */
87 ctrl_outw(0x00AA, 0xA4050118); /* PPCR */
88 ctrl_outw(0x0000, 0xA4050124); /* PSELA */
89}
90
91/*
92 * The Machine Vector
93 */
94struct sh_machine_vector mv_se7721 __initmv = {
95 .mv_name = "Solution Engine 7721",
96 .mv_setup = se7721_setup,
97 .mv_nr_irqs = 109,
98 .mv_init_irq = init_se7721_IRQ,
99};
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index b1a3d9d0172f..33f6ee71f848 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -13,10 +13,12 @@
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/ata_platform.h> 15#include <linux/ata_platform.h>
16#include <linux/input.h>
16#include <asm/machvec.h> 17#include <asm/machvec.h>
17#include <asm/se7722.h> 18#include <asm/se7722.h>
18#include <asm/io.h> 19#include <asm/io.h>
19#include <asm/heartbeat.h> 20#include <asm/heartbeat.h>
21#include <asm/sh_keysc.h>
20 22
21/* Heartbeat */ 23/* Heartbeat */
22static struct heartbeat_data heartbeat_data = { 24static struct heartbeat_data heartbeat_data = {
@@ -92,10 +94,47 @@ static struct platform_device cf_ide_device = {
92 .resource = cf_ide_resources, 94 .resource = cf_ide_resources,
93}; 95};
94 96
97static struct sh_keysc_info sh_keysc_info = {
98 .mode = SH_KEYSC_MODE_1, /* KEYOUT0->5, KEYIN0->4 */
99 .scan_timing = 3,
100 .delay = 5,
101 .keycodes = { /* SW1 -> SW30 */
102 KEY_A, KEY_B, KEY_C, KEY_D, KEY_E,
103 KEY_F, KEY_G, KEY_H, KEY_I, KEY_J,
104 KEY_K, KEY_L, KEY_M, KEY_N, KEY_O,
105 KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T,
106 KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y,
107 KEY_Z,
108 KEY_HOME, KEY_SLEEP, KEY_WAKEUP, KEY_COFFEE, /* life */
109 },
110};
111
112static struct resource sh_keysc_resources[] = {
113 [0] = {
114 .start = 0x044b0000,
115 .end = 0x044b000f,
116 .flags = IORESOURCE_MEM,
117 },
118 [1] = {
119 .start = 79,
120 .flags = IORESOURCE_IRQ,
121 },
122};
123
124static struct platform_device sh_keysc_device = {
125 .name = "sh_keysc",
126 .num_resources = ARRAY_SIZE(sh_keysc_resources),
127 .resource = sh_keysc_resources,
128 .dev = {
129 .platform_data = &sh_keysc_info,
130 },
131};
132
95static struct platform_device *se7722_devices[] __initdata = { 133static struct platform_device *se7722_devices[] __initdata = {
96 &heartbeat_device, 134 &heartbeat_device,
97 &smc91x_eth_device, 135 &smc91x_eth_device,
98 &cf_ide_device, 136 &cf_ide_device,
137 &sh_keysc_device,
99}; 138};
100 139
101static int __init se7722_devices_setup(void) 140static int __init se7722_devices_setup(void)
@@ -136,6 +175,8 @@ static void __init se7722_setup(char **cmdline_p)
136 ctrl_outw(0x0A10, PORT_PSELA); /* BS,SHHID2 */ 175 ctrl_outw(0x0A10, PORT_PSELA); /* BS,SHHID2 */
137 ctrl_outw(0x0000, PORT_PYCR); 176 ctrl_outw(0x0000, PORT_PYCR);
138 ctrl_outw(0x0000, PORT_PZCR); 177 ctrl_outw(0x0000, PORT_PZCR);
178 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
179 ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
139} 180}
140 181
141/* 182/*
diff --git a/arch/sh/configs/se7721_defconfig b/arch/sh/configs/se7721_defconfig
new file mode 100644
index 000000000000..f3d4ca0caa46
--- /dev/null
+++ b/arch/sh/configs/se7721_defconfig
@@ -0,0 +1,1085 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc5
4# Fri Mar 21 12:05:31 2008
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y
10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_STACKTRACE_SUPPORT=y
17CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_ARCH_NO_VIRT_TO_BUS=y
21CONFIG_ARCH_SUPPORTS_AOUT=y
22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
23
24#
25# General setup
26#
27CONFIG_EXPERIMENTAL=y
28CONFIG_BROKEN_ON_SMP=y
29CONFIG_INIT_ENV_ARG_LIMIT=32
30CONFIG_LOCALVERSION=""
31# CONFIG_LOCALVERSION_AUTO is not set
32# CONFIG_SWAP is not set
33CONFIG_SYSVIPC=y
34CONFIG_SYSVIPC_SYSCTL=y
35CONFIG_POSIX_MQUEUE=y
36CONFIG_BSD_PROCESS_ACCT=y
37# CONFIG_BSD_PROCESS_ACCT_V3 is not set
38# CONFIG_TASKSTATS is not set
39# CONFIG_AUDIT is not set
40# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set
43CONFIG_GROUP_SCHED=y
44CONFIG_FAIR_GROUP_SCHED=y
45# CONFIG_RT_GROUP_SCHED is not set
46CONFIG_USER_SCHED=y
47# CONFIG_CGROUP_SCHED is not set
48CONFIG_SYSFS_DEPRECATED=y
49CONFIG_SYSFS_DEPRECATED_V2=y
50# CONFIG_RELAY is not set
51# CONFIG_NAMESPACES is not set
52# CONFIG_BLK_DEV_INITRD is not set
53# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
54CONFIG_SYSCTL=y
55CONFIG_EMBEDDED=y
56CONFIG_UID16=y
57CONFIG_SYSCTL_SYSCALL=y
58CONFIG_KALLSYMS=y
59CONFIG_KALLSYMS_ALL=y
60# CONFIG_KALLSYMS_EXTRA_PASS is not set
61CONFIG_HOTPLUG=y
62CONFIG_PRINTK=y
63# CONFIG_BUG is not set
64CONFIG_ELF_CORE=y
65CONFIG_COMPAT_BRK=y
66# CONFIG_BASE_FULL is not set
67CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y
71CONFIG_TIMERFD=y
72CONFIG_EVENTFD=y
73# CONFIG_SHMEM is not set
74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78# CONFIG_PROFILING is not set
79# CONFIG_MARKERS is not set
80CONFIG_HAVE_OPROFILE=y
81# CONFIG_HAVE_KPROBES is not set
82# CONFIG_HAVE_KRETPROBES is not set
83CONFIG_PROC_PAGE_MONITOR=y
84CONFIG_SLABINFO=y
85CONFIG_RT_MUTEXES=y
86CONFIG_TINY_SHMEM=y
87CONFIG_BASE_SMALL=1
88CONFIG_MODULES=y
89# CONFIG_MODULE_UNLOAD is not set
90# CONFIG_MODVERSIONS is not set
91# CONFIG_MODULE_SRCVERSION_ALL is not set
92# CONFIG_KMOD is not set
93CONFIG_BLOCK=y
94# CONFIG_LBD is not set
95# CONFIG_BLK_DEV_IO_TRACE is not set
96# CONFIG_LSF is not set
97# CONFIG_BLK_DEV_BSG is not set
98
99#
100# IO Schedulers
101#
102CONFIG_IOSCHED_NOOP=y
103# CONFIG_IOSCHED_AS is not set
104# CONFIG_IOSCHED_DEADLINE is not set
105# CONFIG_IOSCHED_CFQ is not set
106# CONFIG_DEFAULT_AS is not set
107# CONFIG_DEFAULT_DEADLINE is not set
108# CONFIG_DEFAULT_CFQ is not set
109CONFIG_DEFAULT_NOOP=y
110CONFIG_DEFAULT_IOSCHED="noop"
111CONFIG_CLASSIC_RCU=y
112
113#
114# System type
115#
116CONFIG_CPU_SH3=y
117# CONFIG_CPU_SUBTYPE_SH7619 is not set
118# CONFIG_CPU_SUBTYPE_SH7203 is not set
119# CONFIG_CPU_SUBTYPE_SH7206 is not set
120# CONFIG_CPU_SUBTYPE_SH7263 is not set
121# CONFIG_CPU_SUBTYPE_MXG is not set
122# CONFIG_CPU_SUBTYPE_SH7705 is not set
123# CONFIG_CPU_SUBTYPE_SH7706 is not set
124# CONFIG_CPU_SUBTYPE_SH7707 is not set
125# CONFIG_CPU_SUBTYPE_SH7708 is not set
126# CONFIG_CPU_SUBTYPE_SH7709 is not set
127# CONFIG_CPU_SUBTYPE_SH7710 is not set
128# CONFIG_CPU_SUBTYPE_SH7712 is not set
129# CONFIG_CPU_SUBTYPE_SH7720 is not set
130CONFIG_CPU_SUBTYPE_SH7721=y
131# CONFIG_CPU_SUBTYPE_SH7750 is not set
132# CONFIG_CPU_SUBTYPE_SH7091 is not set
133# CONFIG_CPU_SUBTYPE_SH7750R is not set
134# CONFIG_CPU_SUBTYPE_SH7750S is not set
135# CONFIG_CPU_SUBTYPE_SH7751 is not set
136# CONFIG_CPU_SUBTYPE_SH7751R is not set
137# CONFIG_CPU_SUBTYPE_SH7760 is not set
138# CONFIG_CPU_SUBTYPE_SH4_202 is not set
139# CONFIG_CPU_SUBTYPE_SH7763 is not set
140# CONFIG_CPU_SUBTYPE_SH7770 is not set
141# CONFIG_CPU_SUBTYPE_SH7780 is not set
142# CONFIG_CPU_SUBTYPE_SH7785 is not set
143# CONFIG_CPU_SUBTYPE_SHX3 is not set
144# CONFIG_CPU_SUBTYPE_SH7343 is not set
145# CONFIG_CPU_SUBTYPE_SH7722 is not set
146# CONFIG_CPU_SUBTYPE_SH7366 is not set
147# CONFIG_CPU_SUBTYPE_SH5_101 is not set
148# CONFIG_CPU_SUBTYPE_SH5_103 is not set
149
150#
151# Memory management options
152#
153CONFIG_QUICKLIST=y
154CONFIG_MMU=y
155CONFIG_PAGE_OFFSET=0x80000000
156CONFIG_MEMORY_START=0x0c000000
157CONFIG_MEMORY_SIZE=0x02000000
158CONFIG_29BIT=y
159CONFIG_VSYSCALL=y
160CONFIG_ARCH_FLATMEM_ENABLE=y
161CONFIG_ARCH_SPARSEMEM_ENABLE=y
162CONFIG_ARCH_SPARSEMEM_DEFAULT=y
163CONFIG_MAX_ACTIVE_REGIONS=1
164CONFIG_ARCH_POPULATES_NODE_MAP=y
165CONFIG_ARCH_SELECT_MEMORY_MODEL=y
166CONFIG_PAGE_SIZE_4KB=y
167# CONFIG_PAGE_SIZE_8KB is not set
168# CONFIG_PAGE_SIZE_64KB is not set
169CONFIG_SELECT_MEMORY_MODEL=y
170CONFIG_FLATMEM_MANUAL=y
171# CONFIG_DISCONTIGMEM_MANUAL is not set
172# CONFIG_SPARSEMEM_MANUAL is not set
173CONFIG_FLATMEM=y
174CONFIG_FLAT_NODE_MEM_MAP=y
175CONFIG_SPARSEMEM_STATIC=y
176# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
177CONFIG_SPLIT_PTLOCK_CPUS=4
178# CONFIG_RESOURCES_64BIT is not set
179CONFIG_ZONE_DMA_FLAG=0
180CONFIG_NR_QUICK=2
181
182#
183# Cache configuration
184#
185# CONFIG_SH_DIRECT_MAPPED is not set
186CONFIG_CACHE_WRITEBACK=y
187# CONFIG_CACHE_WRITETHROUGH is not set
188# CONFIG_CACHE_OFF is not set
189
190#
191# Processor features
192#
193CONFIG_CPU_LITTLE_ENDIAN=y
194# CONFIG_CPU_BIG_ENDIAN is not set
195# CONFIG_SH_FPU_EMU is not set
196# CONFIG_SH_DSP is not set
197# CONFIG_SH_ADC is not set
198CONFIG_CPU_HAS_INTEVT=y
199CONFIG_CPU_HAS_SR_RB=y
200CONFIG_CPU_HAS_DSP=y
201
202#
203# Board support
204#
205CONFIG_SOLUTION_ENGINE=y
206CONFIG_SH_7721_SOLUTION_ENGINE=y
207
208#
209# Timer and clock configuration
210#
211CONFIG_SH_TMU=y
212CONFIG_SH_TIMER_IRQ=16
213CONFIG_SH_PCLK_FREQ=33333333
214# CONFIG_TICK_ONESHOT is not set
215# CONFIG_NO_HZ is not set
216# CONFIG_HIGH_RES_TIMERS is not set
217CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
218
219#
220# CPU Frequency scaling
221#
222# CONFIG_CPU_FREQ is not set
223
224#
225# DMA support
226#
227# CONFIG_SH_DMA is not set
228
229#
230# Companion Chips
231#
232
233#
234# Additional SuperH Device Drivers
235#
236CONFIG_HEARTBEAT=y
237# CONFIG_PUSH_SWITCH is not set
238
239#
240# Kernel features
241#
242# CONFIG_HZ_100 is not set
243CONFIG_HZ_250=y
244# CONFIG_HZ_300 is not set
245# CONFIG_HZ_1000 is not set
246CONFIG_HZ=250
247# CONFIG_SCHED_HRTICK is not set
248# CONFIG_KEXEC is not set
249# CONFIG_CRASH_DUMP is not set
250# CONFIG_PREEMPT_NONE is not set
251CONFIG_PREEMPT_VOLUNTARY=y
252# CONFIG_PREEMPT is not set
253CONFIG_GUSA=y
254# CONFIG_GUSA_RB is not set
255
256#
257# Boot options
258#
259CONFIG_ZERO_PAGE_OFFSET=0x00001000
260CONFIG_BOOT_LINK_OFFSET=0x00800000
261CONFIG_CMDLINE_BOOL=y
262CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda2"
263
264#
265# Bus options
266#
267CONFIG_CF_ENABLER=y
268# CONFIG_CF_AREA5 is not set
269CONFIG_CF_AREA6=y
270CONFIG_CF_BASE_ADDR=0xb8000000
271# CONFIG_ARCH_SUPPORTS_MSI is not set
272# CONFIG_PCCARD is not set
273
274#
275# Executable file formats
276#
277CONFIG_BINFMT_ELF=y
278# CONFIG_BINFMT_MISC is not set
279
280#
281# Networking
282#
283CONFIG_NET=y
284
285#
286# Networking options
287#
288CONFIG_PACKET=y
289CONFIG_PACKET_MMAP=y
290CONFIG_UNIX=y
291CONFIG_XFRM=y
292# CONFIG_XFRM_USER is not set
293# CONFIG_XFRM_SUB_POLICY is not set
294# CONFIG_XFRM_MIGRATE is not set
295# CONFIG_XFRM_STATISTICS is not set
296CONFIG_NET_KEY=y
297# CONFIG_NET_KEY_MIGRATE is not set
298CONFIG_INET=y
299CONFIG_IP_MULTICAST=y
300CONFIG_IP_ADVANCED_ROUTER=y
301CONFIG_ASK_IP_FIB_HASH=y
302# CONFIG_IP_FIB_TRIE is not set
303CONFIG_IP_FIB_HASH=y
304CONFIG_IP_MULTIPLE_TABLES=y
305CONFIG_IP_ROUTE_MULTIPATH=y
306CONFIG_IP_ROUTE_VERBOSE=y
307CONFIG_IP_PNP=y
308CONFIG_IP_PNP_DHCP=y
309# CONFIG_IP_PNP_BOOTP is not set
310# CONFIG_IP_PNP_RARP is not set
311# CONFIG_NET_IPIP is not set
312# CONFIG_NET_IPGRE is not set
313CONFIG_IP_MROUTE=y
314CONFIG_IP_PIMSM_V1=y
315CONFIG_IP_PIMSM_V2=y
316# CONFIG_ARPD is not set
317CONFIG_SYN_COOKIES=y
318CONFIG_INET_AH=y
319CONFIG_INET_ESP=y
320CONFIG_INET_IPCOMP=y
321CONFIG_INET_XFRM_TUNNEL=y
322CONFIG_INET_TUNNEL=y
323CONFIG_INET_XFRM_MODE_TRANSPORT=y
324CONFIG_INET_XFRM_MODE_TUNNEL=y
325CONFIG_INET_XFRM_MODE_BEET=y
326# CONFIG_INET_LRO is not set
327# CONFIG_INET_DIAG is not set
328# CONFIG_TCP_CONG_ADVANCED is not set
329CONFIG_TCP_CONG_CUBIC=y
330CONFIG_DEFAULT_TCP_CONG="cubic"
331# CONFIG_TCP_MD5SIG is not set
332# CONFIG_IPV6 is not set
333# CONFIG_INET6_XFRM_TUNNEL is not set
334# CONFIG_INET6_TUNNEL is not set
335# CONFIG_NETWORK_SECMARK is not set
336# CONFIG_NETFILTER is not set
337# CONFIG_IP_DCCP is not set
338# CONFIG_IP_SCTP is not set
339# CONFIG_TIPC is not set
340# CONFIG_ATM is not set
341# CONFIG_BRIDGE is not set
342# CONFIG_VLAN_8021Q is not set
343# CONFIG_DECNET is not set
344# CONFIG_LLC2 is not set
345# CONFIG_IPX is not set
346# CONFIG_ATALK is not set
347# CONFIG_X25 is not set
348# CONFIG_LAPB is not set
349# CONFIG_ECONET is not set
350# CONFIG_WAN_ROUTER is not set
351CONFIG_NET_SCHED=y
352
353#
354# Queueing/Scheduling
355#
356CONFIG_NET_SCH_CBQ=y
357CONFIG_NET_SCH_HTB=y
358CONFIG_NET_SCH_HFSC=y
359CONFIG_NET_SCH_PRIO=y
360# CONFIG_NET_SCH_RR is not set
361CONFIG_NET_SCH_RED=y
362CONFIG_NET_SCH_SFQ=y
363CONFIG_NET_SCH_TEQL=y
364CONFIG_NET_SCH_TBF=y
365CONFIG_NET_SCH_GRED=y
366CONFIG_NET_SCH_DSMARK=y
367CONFIG_NET_SCH_NETEM=y
368
369#
370# Classification
371#
372CONFIG_NET_CLS=y
373# CONFIG_NET_CLS_BASIC is not set
374CONFIG_NET_CLS_TCINDEX=y
375CONFIG_NET_CLS_ROUTE4=y
376CONFIG_NET_CLS_ROUTE=y
377CONFIG_NET_CLS_FW=y
378# CONFIG_NET_CLS_U32 is not set
379# CONFIG_NET_CLS_RSVP is not set
380# CONFIG_NET_CLS_RSVP6 is not set
381# CONFIG_NET_CLS_FLOW is not set
382# CONFIG_NET_EMATCH is not set
383# CONFIG_NET_CLS_ACT is not set
384CONFIG_NET_CLS_IND=y
385CONFIG_NET_SCH_FIFO=y
386
387#
388# Network testing
389#
390# CONFIG_NET_PKTGEN is not set
391# CONFIG_HAMRADIO is not set
392# CONFIG_CAN is not set
393# CONFIG_IRDA is not set
394# CONFIG_BT is not set
395# CONFIG_AF_RXRPC is not set
396CONFIG_FIB_RULES=y
397
398#
399# Wireless
400#
401# CONFIG_CFG80211 is not set
402# CONFIG_WIRELESS_EXT is not set
403# CONFIG_MAC80211 is not set
404# CONFIG_IEEE80211 is not set
405# CONFIG_RFKILL is not set
406# CONFIG_NET_9P is not set
407
408#
409# Device Drivers
410#
411
412#
413# Generic Driver Options
414#
415CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
416CONFIG_STANDALONE=y
417CONFIG_PREVENT_FIRMWARE_BUILD=y
418CONFIG_FW_LOADER=y
419# CONFIG_DEBUG_DRIVER is not set
420# CONFIG_DEBUG_DEVRES is not set
421# CONFIG_SYS_HYPERVISOR is not set
422# CONFIG_CONNECTOR is not set
423CONFIG_MTD=y
424# CONFIG_MTD_DEBUG is not set
425CONFIG_MTD_CONCAT=y
426CONFIG_MTD_PARTITIONS=y
427# CONFIG_MTD_REDBOOT_PARTS is not set
428# CONFIG_MTD_CMDLINE_PARTS is not set
429
430#
431# User Modules And Translation Layers
432#
433CONFIG_MTD_CHAR=y
434CONFIG_MTD_BLKDEVS=y
435CONFIG_MTD_BLOCK=y
436# CONFIG_FTL is not set
437# CONFIG_NFTL is not set
438# CONFIG_INFTL is not set
439# CONFIG_RFD_FTL is not set
440# CONFIG_SSFDC is not set
441# CONFIG_MTD_OOPS is not set
442
443#
444# RAM/ROM/Flash chip drivers
445#
446CONFIG_MTD_CFI=y
447# CONFIG_MTD_JEDECPROBE is not set
448CONFIG_MTD_GEN_PROBE=y
449# CONFIG_MTD_CFI_ADV_OPTIONS is not set
450CONFIG_MTD_MAP_BANK_WIDTH_1=y
451CONFIG_MTD_MAP_BANK_WIDTH_2=y
452CONFIG_MTD_MAP_BANK_WIDTH_4=y
453# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
454# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
455# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
456CONFIG_MTD_CFI_I1=y
457CONFIG_MTD_CFI_I2=y
458# CONFIG_MTD_CFI_I4 is not set
459# CONFIG_MTD_CFI_I8 is not set
460# CONFIG_MTD_CFI_INTELEXT is not set
461CONFIG_MTD_CFI_AMDSTD=y
462# CONFIG_MTD_CFI_STAA is not set
463CONFIG_MTD_CFI_UTIL=y
464# CONFIG_MTD_RAM is not set
465# CONFIG_MTD_ROM is not set
466# CONFIG_MTD_ABSENT is not set
467
468#
469# Mapping drivers for chip access
470#
471# CONFIG_MTD_COMPLEX_MAPPINGS is not set
472# CONFIG_MTD_PHYSMAP is not set
473# CONFIG_MTD_PLATRAM is not set
474
475#
476# Self-contained MTD device drivers
477#
478# CONFIG_MTD_SLRAM is not set
479# CONFIG_MTD_PHRAM is not set
480# CONFIG_MTD_MTDRAM is not set
481# CONFIG_MTD_BLOCK2MTD is not set
482
483#
484# Disk-On-Chip Device Drivers
485#
486# CONFIG_MTD_DOC2000 is not set
487# CONFIG_MTD_DOC2001 is not set
488# CONFIG_MTD_DOC2001PLUS is not set
489# CONFIG_MTD_NAND is not set
490# CONFIG_MTD_ONENAND is not set
491
492#
493# UBI - Unsorted block images
494#
495# CONFIG_MTD_UBI is not set
496# CONFIG_PARPORT is not set
497CONFIG_BLK_DEV=y
498# CONFIG_BLK_DEV_COW_COMMON is not set
499# CONFIG_BLK_DEV_LOOP is not set
500# CONFIG_BLK_DEV_NBD is not set
501# CONFIG_BLK_DEV_UB is not set
502# CONFIG_BLK_DEV_RAM is not set
503# CONFIG_CDROM_PKTCDVD is not set
504# CONFIG_ATA_OVER_ETH is not set
505CONFIG_MISC_DEVICES=y
506# CONFIG_EEPROM_93CX6 is not set
507# CONFIG_ENCLOSURE_SERVICES is not set
508CONFIG_HAVE_IDE=y
509# CONFIG_IDE is not set
510
511#
512# SCSI device support
513#
514# CONFIG_RAID_ATTRS is not set
515CONFIG_SCSI=y
516CONFIG_SCSI_DMA=y
517# CONFIG_SCSI_TGT is not set
518# CONFIG_SCSI_NETLINK is not set
519CONFIG_SCSI_PROC_FS=y
520
521#
522# SCSI support type (disk, tape, CD-ROM)
523#
524CONFIG_BLK_DEV_SD=y
525# CONFIG_CHR_DEV_ST is not set
526# CONFIG_CHR_DEV_OSST is not set
527# CONFIG_BLK_DEV_SR is not set
528# CONFIG_CHR_DEV_SG is not set
529# CONFIG_CHR_DEV_SCH is not set
530
531#
532# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
533#
534CONFIG_SCSI_MULTI_LUN=y
535# CONFIG_SCSI_CONSTANTS is not set
536# CONFIG_SCSI_LOGGING is not set
537# CONFIG_SCSI_SCAN_ASYNC is not set
538CONFIG_SCSI_WAIT_SCAN=m
539
540#
541# SCSI Transports
542#
543# CONFIG_SCSI_SPI_ATTRS is not set
544# CONFIG_SCSI_FC_ATTRS is not set
545# CONFIG_SCSI_ISCSI_ATTRS is not set
546# CONFIG_SCSI_SAS_LIBSAS is not set
547# CONFIG_SCSI_SRP_ATTRS is not set
548# CONFIG_SCSI_LOWLEVEL is not set
549CONFIG_ATA=y
550# CONFIG_ATA_NONSTANDARD is not set
551# CONFIG_SATA_MV is not set
552CONFIG_PATA_PLATFORM=y
553# CONFIG_MD is not set
554CONFIG_NETDEVICES=y
555# CONFIG_NETDEVICES_MULTIQUEUE is not set
556# CONFIG_DUMMY is not set
557# CONFIG_BONDING is not set
558# CONFIG_MACVLAN is not set
559# CONFIG_EQUALIZER is not set
560# CONFIG_TUN is not set
561# CONFIG_VETH is not set
562# CONFIG_NET_ETHERNET is not set
563CONFIG_NETDEV_1000=y
564# CONFIG_E1000E_ENABLED is not set
565CONFIG_NETDEV_10000=y
566
567#
568# Wireless LAN
569#
570# CONFIG_WLAN_PRE80211 is not set
571# CONFIG_WLAN_80211 is not set
572
573#
574# USB Network Adapters
575#
576# CONFIG_USB_CATC is not set
577# CONFIG_USB_KAWETH is not set
578# CONFIG_USB_PEGASUS is not set
579# CONFIG_USB_RTL8150 is not set
580# CONFIG_USB_USBNET is not set
581# CONFIG_WAN is not set
582# CONFIG_PPP is not set
583# CONFIG_SLIP is not set
584# CONFIG_NETCONSOLE is not set
585# CONFIG_NETPOLL is not set
586# CONFIG_NET_POLL_CONTROLLER is not set
587# CONFIG_ISDN is not set
588# CONFIG_PHONE is not set
589
590#
591# Input device support
592#
593CONFIG_INPUT=y
594# CONFIG_INPUT_FF_MEMLESS is not set
595# CONFIG_INPUT_POLLDEV is not set
596
597#
598# Userland interfaces
599#
600CONFIG_INPUT_MOUSEDEV=y
601CONFIG_INPUT_MOUSEDEV_PSAUX=y
602CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
603CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
604# CONFIG_INPUT_JOYDEV is not set
605CONFIG_INPUT_EVDEV=y
606# CONFIG_INPUT_EVBUG is not set
607
608#
609# Input Device Drivers
610#
611CONFIG_INPUT_KEYBOARD=y
612# CONFIG_KEYBOARD_ATKBD is not set
613# CONFIG_KEYBOARD_SUNKBD is not set
614# CONFIG_KEYBOARD_LKKBD is not set
615# CONFIG_KEYBOARD_XTKBD is not set
616# CONFIG_KEYBOARD_NEWTON is not set
617# CONFIG_KEYBOARD_STOWAWAY is not set
618# CONFIG_KEYBOARD_SH_KEYSC is not set
619CONFIG_INPUT_MOUSE=y
620# CONFIG_MOUSE_PS2 is not set
621# CONFIG_MOUSE_SERIAL is not set
622# CONFIG_MOUSE_APPLETOUCH is not set
623# CONFIG_MOUSE_VSXXXAA is not set
624# CONFIG_INPUT_JOYSTICK is not set
625# CONFIG_INPUT_TABLET is not set
626# CONFIG_INPUT_TOUCHSCREEN is not set
627# CONFIG_INPUT_MISC is not set
628
629#
630# Hardware I/O ports
631#
632# CONFIG_SERIO is not set
633# CONFIG_GAMEPORT is not set
634
635#
636# Character devices
637#
638# CONFIG_VT is not set
639# CONFIG_SERIAL_NONSTANDARD is not set
640
641#
642# Serial drivers
643#
644# CONFIG_SERIAL_8250 is not set
645
646#
647# Non-8250 serial port support
648#
649CONFIG_SERIAL_SH_SCI=y
650CONFIG_SERIAL_SH_SCI_NR_UARTS=2
651CONFIG_SERIAL_SH_SCI_CONSOLE=y
652CONFIG_SERIAL_CORE=y
653CONFIG_SERIAL_CORE_CONSOLE=y
654CONFIG_UNIX98_PTYS=y
655# CONFIG_LEGACY_PTYS is not set
656# CONFIG_IPMI_HANDLER is not set
657# CONFIG_HW_RANDOM is not set
658# CONFIG_R3964 is not set
659# CONFIG_RAW_DRIVER is not set
660# CONFIG_TCG_TPM is not set
661# CONFIG_I2C is not set
662
663#
664# SPI support
665#
666# CONFIG_SPI is not set
667# CONFIG_SPI_MASTER is not set
668# CONFIG_W1 is not set
669# CONFIG_POWER_SUPPLY is not set
670# CONFIG_HWMON is not set
671CONFIG_THERMAL=y
672# CONFIG_WATCHDOG is not set
673
674#
675# Sonics Silicon Backplane
676#
677CONFIG_SSB_POSSIBLE=y
678# CONFIG_SSB is not set
679
680#
681# Multifunction device drivers
682#
683# CONFIG_MFD_SM501 is not set
684
685#
686# Multimedia devices
687#
688# CONFIG_VIDEO_DEV is not set
689# CONFIG_DVB_CORE is not set
690# CONFIG_DAB is not set
691
692#
693# Graphics support
694#
695# CONFIG_VGASTATE is not set
696# CONFIG_VIDEO_OUTPUT_CONTROL is not set
697# CONFIG_FB is not set
698# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
699
700#
701# Display device support
702#
703# CONFIG_DISPLAY_SUPPORT is not set
704
705#
706# Sound
707#
708# CONFIG_SOUND is not set
709CONFIG_HID_SUPPORT=y
710CONFIG_HID=y
711# CONFIG_HID_DEBUG is not set
712# CONFIG_HIDRAW is not set
713
714#
715# USB Input Devices
716#
717CONFIG_USB_HID=y
718# CONFIG_USB_HIDINPUT_POWERBOOK is not set
719# CONFIG_HID_FF is not set
720# CONFIG_USB_HIDDEV is not set
721CONFIG_USB_SUPPORT=y
722CONFIG_USB_ARCH_HAS_HCD=y
723CONFIG_USB_ARCH_HAS_OHCI=y
724# CONFIG_USB_ARCH_HAS_EHCI is not set
725CONFIG_USB=y
726# CONFIG_USB_DEBUG is not set
727# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
728
729#
730# Miscellaneous USB options
731#
732# CONFIG_USB_DEVICEFS is not set
733CONFIG_USB_DEVICE_CLASS=y
734# CONFIG_USB_DYNAMIC_MINORS is not set
735# CONFIG_USB_OTG is not set
736
737#
738# USB Host Controller Drivers
739#
740# CONFIG_USB_ISP116X_HCD is not set
741CONFIG_USB_OHCI_HCD=y
742# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
743# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
744CONFIG_USB_OHCI_LITTLE_ENDIAN=y
745# CONFIG_USB_SL811_HCD is not set
746# CONFIG_USB_R8A66597_HCD is not set
747
748#
749# USB Device Class drivers
750#
751# CONFIG_USB_ACM is not set
752# CONFIG_USB_PRINTER is not set
753
754#
755# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
756#
757
758#
759# may also be needed; see USB_STORAGE Help for more information
760#
761CONFIG_USB_STORAGE=y
762# CONFIG_USB_STORAGE_DEBUG is not set
763# CONFIG_USB_STORAGE_DATAFAB is not set
764# CONFIG_USB_STORAGE_FREECOM is not set
765# CONFIG_USB_STORAGE_ISD200 is not set
766# CONFIG_USB_STORAGE_DPCM is not set
767# CONFIG_USB_STORAGE_USBAT is not set
768# CONFIG_USB_STORAGE_SDDR09 is not set
769# CONFIG_USB_STORAGE_SDDR55 is not set
770# CONFIG_USB_STORAGE_JUMPSHOT is not set
771# CONFIG_USB_STORAGE_ALAUDA is not set
772# CONFIG_USB_STORAGE_ONETOUCH is not set
773# CONFIG_USB_STORAGE_KARMA is not set
774# CONFIG_USB_LIBUSUAL is not set
775
776#
777# USB Imaging devices
778#
779# CONFIG_USB_MDC800 is not set
780# CONFIG_USB_MICROTEK is not set
781CONFIG_USB_MON=y
782
783#
784# USB port drivers
785#
786# CONFIG_USB_SERIAL is not set
787
788#
789# USB Miscellaneous drivers
790#
791# CONFIG_USB_EMI62 is not set
792# CONFIG_USB_EMI26 is not set
793# CONFIG_USB_ADUTUX is not set
794# CONFIG_USB_AUERSWALD is not set
795# CONFIG_USB_RIO500 is not set
796# CONFIG_USB_LEGOTOWER is not set
797# CONFIG_USB_LCD is not set
798# CONFIG_USB_BERRY_CHARGE is not set
799# CONFIG_USB_LED is not set
800# CONFIG_USB_CYPRESS_CY7C63 is not set
801# CONFIG_USB_CYTHERM is not set
802# CONFIG_USB_PHIDGET is not set
803# CONFIG_USB_IDMOUSE is not set
804# CONFIG_USB_FTDI_ELAN is not set
805# CONFIG_USB_APPLEDISPLAY is not set
806# CONFIG_USB_LD is not set
807# CONFIG_USB_TRANCEVIBRATOR is not set
808# CONFIG_USB_IOWARRIOR is not set
809# CONFIG_USB_GADGET is not set
810# CONFIG_MMC is not set
811# CONFIG_MEMSTICK is not set
812CONFIG_NEW_LEDS=y
813CONFIG_LEDS_CLASS=y
814
815#
816# LED drivers
817#
818
819#
820# LED Triggers
821#
822CONFIG_LEDS_TRIGGERS=y
823# CONFIG_LEDS_TRIGGER_TIMER is not set
824# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
825# CONFIG_RTC_CLASS is not set
826
827#
828# Userspace I/O
829#
830# CONFIG_UIO is not set
831
832#
833# File systems
834#
835CONFIG_EXT2_FS=y
836CONFIG_EXT2_FS_XATTR=y
837CONFIG_EXT2_FS_POSIX_ACL=y
838CONFIG_EXT2_FS_SECURITY=y
839# CONFIG_EXT2_FS_XIP is not set
840CONFIG_EXT3_FS=y
841CONFIG_EXT3_FS_XATTR=y
842# CONFIG_EXT3_FS_POSIX_ACL is not set
843# CONFIG_EXT3_FS_SECURITY is not set
844# CONFIG_EXT4DEV_FS is not set
845CONFIG_JBD=y
846CONFIG_FS_MBCACHE=y
847# CONFIG_REISERFS_FS is not set
848# CONFIG_JFS_FS is not set
849CONFIG_FS_POSIX_ACL=y
850# CONFIG_XFS_FS is not set
851# CONFIG_GFS2_FS is not set
852# CONFIG_OCFS2_FS is not set
853# CONFIG_DNOTIFY is not set
854# CONFIG_INOTIFY is not set
855# CONFIG_QUOTA is not set
856# CONFIG_AUTOFS_FS is not set
857# CONFIG_AUTOFS4_FS is not set
858# CONFIG_FUSE_FS is not set
859
860#
861# CD-ROM/DVD Filesystems
862#
863# CONFIG_ISO9660_FS is not set
864# CONFIG_UDF_FS is not set
865
866#
867# DOS/FAT/NT Filesystems
868#
869CONFIG_FAT_FS=y
870CONFIG_MSDOS_FS=y
871CONFIG_VFAT_FS=y
872CONFIG_FAT_DEFAULT_CODEPAGE=437
873CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
874# CONFIG_NTFS_FS is not set
875
876#
877# Pseudo filesystems
878#
879CONFIG_PROC_FS=y
880# CONFIG_PROC_KCORE is not set
881CONFIG_PROC_SYSCTL=y
882CONFIG_SYSFS=y
883CONFIG_TMPFS=y
884# CONFIG_TMPFS_POSIX_ACL is not set
885# CONFIG_HUGETLBFS is not set
886# CONFIG_HUGETLB_PAGE is not set
887# CONFIG_CONFIGFS_FS is not set
888
889#
890# Miscellaneous filesystems
891#
892# CONFIG_ADFS_FS is not set
893# CONFIG_AFFS_FS is not set
894# CONFIG_HFS_FS is not set
895# CONFIG_HFSPLUS_FS is not set
896# CONFIG_BEFS_FS is not set
897# CONFIG_BFS_FS is not set
898# CONFIG_EFS_FS is not set
899CONFIG_JFFS2_FS=y
900CONFIG_JFFS2_FS_DEBUG=0
901CONFIG_JFFS2_FS_WRITEBUFFER=y
902# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
903# CONFIG_JFFS2_SUMMARY is not set
904# CONFIG_JFFS2_FS_XATTR is not set
905# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
906CONFIG_JFFS2_ZLIB=y
907# CONFIG_JFFS2_LZO is not set
908CONFIG_JFFS2_RTIME=y
909# CONFIG_JFFS2_RUBIN is not set
910CONFIG_CRAMFS=y
911# CONFIG_VXFS_FS is not set
912# CONFIG_MINIX_FS is not set
913# CONFIG_HPFS_FS is not set
914# CONFIG_QNX4FS_FS is not set
915# CONFIG_ROMFS_FS is not set
916# CONFIG_SYSV_FS is not set
917# CONFIG_UFS_FS is not set
918# CONFIG_NETWORK_FILESYSTEMS is not set
919
920#
921# Partition Types
922#
923# CONFIG_PARTITION_ADVANCED is not set
924CONFIG_MSDOS_PARTITION=y
925CONFIG_NLS=y
926CONFIG_NLS_DEFAULT="iso8859-1"
927CONFIG_NLS_CODEPAGE_437=y
928# CONFIG_NLS_CODEPAGE_737 is not set
929# CONFIG_NLS_CODEPAGE_775 is not set
930# CONFIG_NLS_CODEPAGE_850 is not set
931# CONFIG_NLS_CODEPAGE_852 is not set
932# CONFIG_NLS_CODEPAGE_855 is not set
933# CONFIG_NLS_CODEPAGE_857 is not set
934# CONFIG_NLS_CODEPAGE_860 is not set
935# CONFIG_NLS_CODEPAGE_861 is not set
936# CONFIG_NLS_CODEPAGE_862 is not set
937# CONFIG_NLS_CODEPAGE_863 is not set
938# CONFIG_NLS_CODEPAGE_864 is not set
939# CONFIG_NLS_CODEPAGE_865 is not set
940# CONFIG_NLS_CODEPAGE_866 is not set
941# CONFIG_NLS_CODEPAGE_869 is not set
942# CONFIG_NLS_CODEPAGE_936 is not set
943# CONFIG_NLS_CODEPAGE_950 is not set
944CONFIG_NLS_CODEPAGE_932=y
945# CONFIG_NLS_CODEPAGE_949 is not set
946# CONFIG_NLS_CODEPAGE_874 is not set
947# CONFIG_NLS_ISO8859_8 is not set
948# CONFIG_NLS_CODEPAGE_1250 is not set
949# CONFIG_NLS_CODEPAGE_1251 is not set
950# CONFIG_NLS_ASCII is not set
951CONFIG_NLS_ISO8859_1=y
952# CONFIG_NLS_ISO8859_2 is not set
953# CONFIG_NLS_ISO8859_3 is not set
954# CONFIG_NLS_ISO8859_4 is not set
955# CONFIG_NLS_ISO8859_5 is not set
956# CONFIG_NLS_ISO8859_6 is not set
957# CONFIG_NLS_ISO8859_7 is not set
958# CONFIG_NLS_ISO8859_9 is not set
959# CONFIG_NLS_ISO8859_13 is not set
960# CONFIG_NLS_ISO8859_14 is not set
961# CONFIG_NLS_ISO8859_15 is not set
962# CONFIG_NLS_KOI8_R is not set
963# CONFIG_NLS_KOI8_U is not set
964# CONFIG_NLS_UTF8 is not set
965# CONFIG_DLM is not set
966
967#
968# Kernel hacking
969#
970CONFIG_TRACE_IRQFLAGS_SUPPORT=y
971# CONFIG_PRINTK_TIME is not set
972CONFIG_ENABLE_WARN_DEPRECATED=y
973CONFIG_ENABLE_MUST_CHECK=y
974# CONFIG_MAGIC_SYSRQ is not set
975# CONFIG_UNUSED_SYMBOLS is not set
976# CONFIG_DEBUG_FS is not set
977# CONFIG_HEADERS_CHECK is not set
978CONFIG_DEBUG_KERNEL=y
979# CONFIG_DEBUG_SHIRQ is not set
980# CONFIG_DETECT_SOFTLOCKUP is not set
981CONFIG_SCHED_DEBUG=y
982# CONFIG_SCHEDSTATS is not set
983# CONFIG_TIMER_STATS is not set
984# CONFIG_DEBUG_SLAB is not set
985# CONFIG_DEBUG_RT_MUTEXES is not set
986# CONFIG_RT_MUTEX_TESTER is not set
987# CONFIG_DEBUG_SPINLOCK is not set
988# CONFIG_DEBUG_MUTEXES is not set
989# CONFIG_DEBUG_LOCK_ALLOC is not set
990# CONFIG_PROVE_LOCKING is not set
991# CONFIG_LOCK_STAT is not set
992# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
993# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
994# CONFIG_DEBUG_KOBJECT is not set
995CONFIG_DEBUG_INFO=y
996# CONFIG_DEBUG_VM is not set
997# CONFIG_DEBUG_LIST is not set
998# CONFIG_DEBUG_SG is not set
999CONFIG_FRAME_POINTER=y
1000# CONFIG_BOOT_PRINTK_DELAY is not set
1001# CONFIG_RCU_TORTURE_TEST is not set
1002# CONFIG_BACKTRACE_SELF_TEST is not set
1003# CONFIG_FAULT_INJECTION is not set
1004# CONFIG_SAMPLES is not set
1005# CONFIG_SH_STANDARD_BIOS is not set
1006# CONFIG_EARLY_SCIF_CONSOLE is not set
1007# CONFIG_DEBUG_BOOTMEM is not set
1008# CONFIG_DEBUG_STACKOVERFLOW is not set
1009# CONFIG_DEBUG_STACK_USAGE is not set
1010# CONFIG_4KSTACKS is not set
1011# CONFIG_IRQSTACKS is not set
1012# CONFIG_SH_KGDB is not set
1013
1014#
1015# Security options
1016#
1017# CONFIG_KEYS is not set
1018# CONFIG_SECURITY is not set
1019# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1020CONFIG_CRYPTO=y
1021CONFIG_CRYPTO_ALGAPI=y
1022CONFIG_CRYPTO_AEAD=y
1023CONFIG_CRYPTO_BLKCIPHER=y
1024# CONFIG_CRYPTO_SEQIV is not set
1025CONFIG_CRYPTO_HASH=y
1026CONFIG_CRYPTO_MANAGER=y
1027CONFIG_CRYPTO_HMAC=y
1028# CONFIG_CRYPTO_XCBC is not set
1029# CONFIG_CRYPTO_NULL is not set
1030# CONFIG_CRYPTO_MD4 is not set
1031CONFIG_CRYPTO_MD5=y
1032CONFIG_CRYPTO_SHA1=y
1033# CONFIG_CRYPTO_SHA256 is not set
1034# CONFIG_CRYPTO_SHA512 is not set
1035# CONFIG_CRYPTO_WP512 is not set
1036# CONFIG_CRYPTO_TGR192 is not set
1037# CONFIG_CRYPTO_GF128MUL is not set
1038# CONFIG_CRYPTO_ECB is not set
1039CONFIG_CRYPTO_CBC=y
1040# CONFIG_CRYPTO_PCBC is not set
1041# CONFIG_CRYPTO_LRW is not set
1042# CONFIG_CRYPTO_XTS is not set
1043# CONFIG_CRYPTO_CTR is not set
1044# CONFIG_CRYPTO_GCM is not set
1045# CONFIG_CRYPTO_CCM is not set
1046# CONFIG_CRYPTO_CRYPTD is not set
1047CONFIG_CRYPTO_DES=y
1048# CONFIG_CRYPTO_FCRYPT is not set
1049# CONFIG_CRYPTO_BLOWFISH is not set
1050# CONFIG_CRYPTO_TWOFISH is not set
1051# CONFIG_CRYPTO_SERPENT is not set
1052# CONFIG_CRYPTO_AES is not set
1053# CONFIG_CRYPTO_CAST5 is not set
1054# CONFIG_CRYPTO_CAST6 is not set
1055# CONFIG_CRYPTO_TEA is not set
1056# CONFIG_CRYPTO_ARC4 is not set
1057# CONFIG_CRYPTO_KHAZAD is not set
1058# CONFIG_CRYPTO_ANUBIS is not set
1059# CONFIG_CRYPTO_SEED is not set
1060# CONFIG_CRYPTO_SALSA20 is not set
1061CONFIG_CRYPTO_DEFLATE=y
1062# CONFIG_CRYPTO_MICHAEL_MIC is not set
1063# CONFIG_CRYPTO_CRC32C is not set
1064# CONFIG_CRYPTO_CAMELLIA is not set
1065# CONFIG_CRYPTO_TEST is not set
1066CONFIG_CRYPTO_AUTHENC=y
1067# CONFIG_CRYPTO_LZO is not set
1068CONFIG_CRYPTO_HW=y
1069
1070#
1071# Library routines
1072#
1073CONFIG_BITREVERSE=y
1074CONFIG_CRC_CCITT=y
1075# CONFIG_CRC16 is not set
1076# CONFIG_CRC_ITU_T is not set
1077CONFIG_CRC32=y
1078# CONFIG_CRC7 is not set
1079# CONFIG_LIBCRC32C is not set
1080CONFIG_ZLIB_INFLATE=y
1081CONFIG_ZLIB_DEFLATE=y
1082CONFIG_PLIST=y
1083CONFIG_HAS_IOMEM=y
1084CONFIG_HAS_IOPORT=y
1085CONFIG_HAS_DMA=y
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index 1c3b99642e1c..01ff4d05aab0 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -83,6 +83,8 @@ static int __init cf_init_default(void)
83#include <asm/se.h> 83#include <asm/se.h>
84#elif defined(CONFIG_SH_7722_SOLUTION_ENGINE) 84#elif defined(CONFIG_SH_7722_SOLUTION_ENGINE)
85#include <asm/se7722.h> 85#include <asm/se7722.h>
86#elif defined(CONFIG_SH_7721_SOLUTION_ENGINE)
87#include <asm/se7721.h>
86#endif 88#endif
87 89
88/* 90/*
@@ -99,7 +101,9 @@ static int __init cf_init_default(void)
99 * 0xB0600000 : I/O 101 * 0xB0600000 : I/O
100 */ 102 */
101 103
102#if defined(CONFIG_SH_SOLUTION_ENGINE) || defined(CONFIG_SH_7722_SOLUTION_ENGINE) 104#if defined(CONFIG_SH_SOLUTION_ENGINE) || \
105 defined(CONFIG_SH_7722_SOLUTION_ENGINE) || \
106 defined(CONFIG_SH_7721_SOLUTION_ENGINE)
103static int __init cf_init_se(void) 107static int __init cf_init_se(void)
104{ 108{
105 if ((ctrl_inw(MRSHPC_CSR) & 0x000c) != 0) 109 if ((ctrl_inw(MRSHPC_CSR) & 0x000c) != 0)
@@ -112,7 +116,7 @@ static int __init cf_init_se(void)
112 } 116 }
113 117
114 /* 118 /*
115 * PC-Card window open 119 * PC-Card window open
116 * flag == COMMON/ATTRIBUTE/IO 120 * flag == COMMON/ATTRIBUTE/IO
117 */ 121 */
118 /* common window open */ 122 /* common window open */
@@ -122,7 +126,7 @@ static int __init cf_init_se(void)
122 ctrl_outw(0x0b00, MRSHPC_MW0CR2); 126 ctrl_outw(0x0b00, MRSHPC_MW0CR2);
123 else 127 else
124 /* common mode & bus width 16bit SWAP = 0*/ 128 /* common mode & bus width 16bit SWAP = 0*/
125 ctrl_outw(0x0300, MRSHPC_MW0CR2); 129 ctrl_outw(0x0300, MRSHPC_MW0CR2);
126 130
127 /* attribute window open */ 131 /* attribute window open */
128 ctrl_outw(0x8a85, MRSHPC_MW1CR1); 132 ctrl_outw(0x8a85, MRSHPC_MW1CR1);
@@ -155,10 +159,9 @@ static int __init cf_init_se(void)
155 159
156int __init cf_init(void) 160int __init cf_init(void)
157{ 161{
158 if( mach_is_se() || mach_is_7722se() ){ 162 if (mach_is_se() || mach_is_7722se() || mach_is_7721se())
159 return cf_init_se(); 163 return cf_init_se();
160 } 164
161
162 return cf_init_default(); 165 return cf_init_default();
163} 166}
164 167
diff --git a/arch/sh/kernel/cpu/sh2a/Makefile b/arch/sh/kernel/cpu/sh2a/Makefile
index b279cdc3a233..7e2b90cfa7bf 100644
--- a/arch/sh/kernel/cpu/sh2a/Makefile
+++ b/arch/sh/kernel/cpu/sh2a/Makefile
@@ -8,6 +8,7 @@ common-y += $(addprefix ../sh2/, ex.o entry.o)
8 8
9obj-$(CONFIG_SH_FPU) += fpu.o 9obj-$(CONFIG_SH_FPU) += fpu.o
10 10
11obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o 11obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o
12obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o 13obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o
14obj-$(CONFIG_CPU_SUBTYPE_MXG) += setup-mxg.o clock-sh7206.o
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c
index 6910e2664468..6e79132f6f30 100644
--- a/arch/sh/kernel/cpu/sh2a/probe.c
+++ b/arch/sh/kernel/cpu/sh2a/probe.c
@@ -29,6 +29,9 @@ int __init detect_cpu_and_cache_system(void)
29 boot_cpu_data.type = CPU_SH7206; 29 boot_cpu_data.type = CPU_SH7206;
30 /* While SH7206 has a DSP.. */ 30 /* While SH7206 has a DSP.. */
31 boot_cpu_data.flags |= CPU_HAS_DSP; 31 boot_cpu_data.flags |= CPU_HAS_DSP;
32#elif defined(CONFIG_CPU_SUBTYPE_MXG)
33 boot_cpu_data.type = CPU_MXG;
34 boot_cpu_data.flags |= CPU_HAS_DSP;
32#endif 35#endif
33 36
34 boot_cpu_data.dcache.ways = 4; 37 boot_cpu_data.dcache.ways = 4;
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
new file mode 100644
index 000000000000..e611d79fac4c
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
@@ -0,0 +1,168 @@
1/*
2 * Renesas MX-G (R8A03022BG) Setup
3 *
4 * Copyright (C) 2008 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/platform_device.h>
11#include <linux/init.h>
12#include <linux/serial.h>
13#include <linux/serial_sci.h>
14
15enum {
16 UNUSED = 0,
17
18 /* interrupt sources */
19 IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
20 IRQ8, IRQ9, IRQ10, IRQ11, IRQ12, IRQ13, IRQ14, IRQ15,
21
22 PINT0, PINT1, PINT2, PINT3, PINT4, PINT5, PINT6, PINT7,
23
24 SINT8, SINT7, SINT6, SINT5, SINT4, SINT3, SINT2, SINT1,
25
26 SCIF0_BRI, SCIF0_ERI, SCIF0_RXI, SCIF0_TXI,
27 SCIF1_BRI, SCIF1_ERI, SCIF1_RXI, SCIF1_TXI,
28
29 MTU2_TGI0A, MTU2_TGI0B, MTU2_TGI0C, MTU2_TGI0D,
30 MTU2_TCI0V, MTU2_TGI0E, MTU2_TGI0F,
31 MTU2_TGI1A, MTU2_TGI1B, MTU2_TCI1V, MTU2_TCI1U,
32 MTU2_TGI2A, MTU2_TGI2B, MTU2_TCI2V, MTU2_TCI2U,
33 MTU2_TGI3A, MTU2_TGI3B, MTU2_TGI3C, MTU2_TGI3D, MTU2_TCI3V,
34 MTU2_TGI4A, MTU2_TGI4B, MTU2_TGI4C, MTU2_TGI4D, MTU2_TCI4V,
35 MTU2_TGI5U, MTU2_TGI5V, MTU2_TGI5W,
36
37 /* interrupt groups */
38 PINT, SCIF0, SCIF1,
39 MTU2_GROUP1, MTU2_GROUP2, MTU2_GROUP3, MTU2_GROUP4, MTU2_GROUP5
40};
41
42static struct intc_vect vectors[] __initdata = {
43 INTC_IRQ(IRQ0, 64), INTC_IRQ(IRQ1, 65),
44 INTC_IRQ(IRQ2, 66), INTC_IRQ(IRQ3, 67),
45 INTC_IRQ(IRQ4, 68), INTC_IRQ(IRQ5, 69),
46 INTC_IRQ(IRQ6, 70), INTC_IRQ(IRQ7, 71),
47 INTC_IRQ(IRQ8, 72), INTC_IRQ(IRQ9, 73),
48 INTC_IRQ(IRQ10, 74), INTC_IRQ(IRQ11, 75),
49 INTC_IRQ(IRQ12, 76), INTC_IRQ(IRQ13, 77),
50 INTC_IRQ(IRQ14, 78), INTC_IRQ(IRQ15, 79),
51
52 INTC_IRQ(PINT0, 80), INTC_IRQ(PINT1, 81),
53 INTC_IRQ(PINT2, 82), INTC_IRQ(PINT3, 83),
54 INTC_IRQ(PINT4, 84), INTC_IRQ(PINT5, 85),
55 INTC_IRQ(PINT6, 86), INTC_IRQ(PINT7, 87),
56
57 INTC_IRQ(SINT8, 94), INTC_IRQ(SINT7, 95),
58 INTC_IRQ(SINT6, 96), INTC_IRQ(SINT5, 97),
59 INTC_IRQ(SINT4, 98), INTC_IRQ(SINT3, 99),
60 INTC_IRQ(SINT2, 100), INTC_IRQ(SINT1, 101),
61
62 INTC_IRQ(SCIF0_RXI, 220), INTC_IRQ(SCIF0_TXI, 221),
63 INTC_IRQ(SCIF0_BRI, 222), INTC_IRQ(SCIF0_ERI, 223),
64 INTC_IRQ(SCIF1_RXI, 224), INTC_IRQ(SCIF1_TXI, 225),
65 INTC_IRQ(SCIF1_BRI, 226), INTC_IRQ(SCIF1_ERI, 227),
66
67 INTC_IRQ(MTU2_TGI0A, 228), INTC_IRQ(MTU2_TGI0B, 229),
68 INTC_IRQ(MTU2_TGI0C, 230), INTC_IRQ(MTU2_TGI0D, 231),
69 INTC_IRQ(MTU2_TCI0V, 232), INTC_IRQ(MTU2_TGI0E, 233),
70
71 INTC_IRQ(MTU2_TGI0F, 234), INTC_IRQ(MTU2_TGI1A, 235),
72 INTC_IRQ(MTU2_TGI1B, 236), INTC_IRQ(MTU2_TCI1V, 237),
73 INTC_IRQ(MTU2_TCI1U, 238), INTC_IRQ(MTU2_TGI2A, 239),
74
75 INTC_IRQ(MTU2_TGI2B, 240), INTC_IRQ(MTU2_TCI2V, 241),
76 INTC_IRQ(MTU2_TCI2U, 242), INTC_IRQ(MTU2_TGI3A, 243),
77
78 INTC_IRQ(MTU2_TGI3B, 244),
79 INTC_IRQ(MTU2_TGI3C, 245),
80
81 INTC_IRQ(MTU2_TGI3D, 246), INTC_IRQ(MTU2_TCI3V, 247),
82 INTC_IRQ(MTU2_TGI4A, 248), INTC_IRQ(MTU2_TGI4B, 249),
83 INTC_IRQ(MTU2_TGI4C, 250), INTC_IRQ(MTU2_TGI4D, 251),
84
85 INTC_IRQ(MTU2_TCI4V, 252), INTC_IRQ(MTU2_TGI5U, 253),
86 INTC_IRQ(MTU2_TGI5V, 254), INTC_IRQ(MTU2_TGI5W, 255),
87};
88
89static struct intc_group groups[] __initdata = {
90 INTC_GROUP(PINT, PINT0, PINT1, PINT2, PINT3,
91 PINT4, PINT5, PINT6, PINT7),
92 INTC_GROUP(MTU2_GROUP1, MTU2_TGI0A, MTU2_TGI0B, MTU2_TGI0C, MTU2_TGI0D,
93 MTU2_TCI0V, MTU2_TGI0E),
94 INTC_GROUP(MTU2_GROUP2, MTU2_TGI0F, MTU2_TGI1A, MTU2_TGI1B,
95 MTU2_TCI1V, MTU2_TCI1U, MTU2_TGI2A),
96 INTC_GROUP(MTU2_GROUP3, MTU2_TGI2B, MTU2_TCI2V, MTU2_TCI2U,
97 MTU2_TGI3A),
98 INTC_GROUP(MTU2_GROUP4, MTU2_TGI3D, MTU2_TCI3V, MTU2_TGI4A,
99 MTU2_TGI4B, MTU2_TGI4C, MTU2_TGI4D),
100 INTC_GROUP(MTU2_GROUP5, MTU2_TCI4V, MTU2_TGI5U, MTU2_TGI5V, MTU2_TGI5W),
101 INTC_GROUP(SCIF0, SCIF0_BRI, SCIF0_ERI, SCIF0_RXI, SCIF0_TXI),
102 INTC_GROUP(SCIF1, SCIF1_BRI, SCIF1_ERI, SCIF1_RXI, SCIF1_TXI),
103};
104
105static struct intc_prio_reg prio_registers[] __initdata = {
106 { 0xfffd9418, 0, 16, 4, /* IPR01 */ { IRQ0, IRQ1, IRQ2, IRQ3 } },
107 { 0xfffd941a, 0, 16, 4, /* IPR02 */ { IRQ4, IRQ5, IRQ6, IRQ7 } },
108 { 0xfffd941c, 0, 16, 4, /* IPR03 */ { IRQ8, IRQ9, IRQ10, IRQ11 } },
109 { 0xfffd941e, 0, 16, 4, /* IPR04 */ { IRQ12, IRQ13, IRQ14, IRQ15 } },
110 { 0xfffd9420, 0, 16, 4, /* IPR05 */ { PINT, 0, 0, 0 } },
111 { 0xfffd9800, 0, 16, 4, /* IPR06 */ { } },
112 { 0xfffd9802, 0, 16, 4, /* IPR07 */ { } },
113 { 0xfffd9804, 0, 16, 4, /* IPR08 */ { } },
114 { 0xfffd9806, 0, 16, 4, /* IPR09 */ { } },
115 { 0xfffd9808, 0, 16, 4, /* IPR10 */ { } },
116 { 0xfffd980a, 0, 16, 4, /* IPR11 */ { } },
117 { 0xfffd980c, 0, 16, 4, /* IPR12 */ { } },
118 { 0xfffd980e, 0, 16, 4, /* IPR13 */ { } },
119 { 0xfffd9810, 0, 16, 4, /* IPR14 */ { 0, 0, 0, SCIF0 } },
120 { 0xfffd9812, 0, 16, 4, /* IPR15 */
121 { SCIF1, MTU2_GROUP1, MTU2_GROUP2, MTU2_GROUP3 } },
122 { 0xfffd9814, 0, 16, 4, /* IPR16 */
123 { MTU2_TGI3B, MTU2_TGI3C, MTU2_GROUP4, MTU2_GROUP5 } },
124};
125
126static struct intc_mask_reg mask_registers[] __initdata = {
127 { 0xfffd9408, 0, 16, /* PINTER */
128 { 0, 0, 0, 0, 0, 0, 0, 0,
129 PINT7, PINT6, PINT5, PINT4, PINT3, PINT2, PINT1, PINT0 } },
130};
131
132static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
133 mask_registers, prio_registers, NULL);
134
135static struct plat_sci_port sci_platform_data[] = {
136 {
137 .mapbase = 0xff804000,
138 .flags = UPF_BOOT_AUTOCONF,
139 .type = PORT_SCIF,
140 .irqs = { 223, 220, 221, 222 },
141 }, {
142 .flags = 0,
143 }
144};
145
146static struct platform_device sci_device = {
147 .name = "sh-sci",
148 .id = -1,
149 .dev = {
150 .platform_data = sci_platform_data,
151 },
152};
153
154static struct platform_device *mxg_devices[] __initdata = {
155 &sci_device,
156};
157
158static int __init mxg_devices_setup(void)
159{
160 return platform_add_devices(mxg_devices,
161 ARRAY_SIZE(mxg_devices));
162}
163__initcall(mxg_devices_setup);
164
165void __init plat_irq_setup(void)
166{
167 register_intc_controller(&intc_desc);
168}
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 9e89984c4f1d..ebceb0dadff5 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -53,7 +53,7 @@ int __init detect_cpu_and_cache_system(void)
53 /* 53 /*
54 * Setup some generic flags we can probe on SH-4A parts 54 * Setup some generic flags we can probe on SH-4A parts
55 */ 55 */
56 if (((pvr >> 16) & 0xff) == 0x10) { 56 if (((pvr >> 24) & 0xff) == 0x10) {
57 if ((cvr & 0x10000000) == 0) 57 if ((cvr & 0x10000000) == 0)
58 boot_cpu_data.flags |= CPU_HAS_DSP; 58 boot_cpu_data.flags |= CPU_HAS_DSP;
59 59
@@ -126,17 +126,22 @@ int __init detect_cpu_and_cache_system(void)
126 CPU_HAS_LLSC; 126 CPU_HAS_LLSC;
127 break; 127 break;
128 case 0x3008: 128 case 0x3008:
129 if (prr == 0xa0 || prr == 0xa1) { 129 boot_cpu_data.icache.ways = 4;
130 boot_cpu_data.type = CPU_SH7722; 130 boot_cpu_data.dcache.ways = 4;
131 boot_cpu_data.icache.ways = 4; 131 boot_cpu_data.flags |= CPU_HAS_LLSC;
132 boot_cpu_data.dcache.ways = 4; 132
133 boot_cpu_data.flags |= CPU_HAS_LLSC; 133 switch (prr) {
134 } 134 case 0x50:
135 else if (prr == 0x70) { 135 boot_cpu_data.type = CPU_SH7723;
136 boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE;
137 break;
138 case 0x70:
136 boot_cpu_data.type = CPU_SH7366; 139 boot_cpu_data.type = CPU_SH7366;
137 boot_cpu_data.icache.ways = 4; 140 break;
138 boot_cpu_data.dcache.ways = 4; 141 case 0xa0:
139 boot_cpu_data.flags |= CPU_HAS_LLSC; 142 case 0xa1:
143 boot_cpu_data.type = CPU_SH7722;
144 break;
140 } 145 }
141 break; 146 break;
142 case 0x4000: /* 1st cut */ 147 case 0x4000: /* 1st cut */
@@ -215,6 +220,12 @@ int __init detect_cpu_and_cache_system(void)
215 * SH-4A's have an optional PIPT L2. 220 * SH-4A's have an optional PIPT L2.
216 */ 221 */
217 if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) { 222 if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) {
223 /* Bug if we can't decode the L2 info */
224 BUG_ON(!(cvr & 0xf));
225
226 /* Silicon and specifications have clearly never met.. */
227 cvr ^= 0xf;
228
218 /* 229 /*
219 * Size calculation is much more sensible 230 * Size calculation is much more sensible
220 * than it is for the L1. 231 * than it is for the L1.
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index 5d890ac8e793..a880e7968750 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o
9obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o 9obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o 10obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o
11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o 11obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o
12obj-$(CONFIG_CPU_SUBTYPE_SH7723) += setup-sh7723.o
12obj-$(CONFIG_CPU_SUBTYPE_SH7366) += setup-sh7366.o 13obj-$(CONFIG_CPU_SUBTYPE_SH7366) += setup-sh7366.o
13obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o 14obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o
14 15
@@ -22,6 +23,7 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
22clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o 23clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o
23clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o 24clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o
24clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o 25clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7722.o
26clock-$(CONFIG_CPU_SUBTYPE_SH7723) := clock-sh7722.o
25clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7722.o 27clock-$(CONFIG_CPU_SUBTYPE_SH7366) := clock-sh7722.o
26clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o 28clock-$(CONFIG_CPU_SUBTYPE_SHX3) := clock-shx3.o
27 29
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index b98b4bc93ec9..069314037049 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -16,13 +16,12 @@
16 16
17static struct resource usbf_resources[] = { 17static struct resource usbf_resources[] = {
18 [0] = { 18 [0] = {
19 .name = "m66592_udc", 19 .name = "USBF",
20 .start = 0xA4480000, 20 .start = 0x04480000,
21 .end = 0xA44800FF, 21 .end = 0x044800FF,
22 .flags = IORESOURCE_MEM, 22 .flags = IORESOURCE_MEM,
23 }, 23 },
24 [1] = { 24 [1] = {
25 .name = "m66592_udc",
26 .start = 65, 25 .start = 65,
27 .end = 65, 26 .end = 65,
28 .flags = IORESOURCE_IRQ, 27 .flags = IORESOURCE_IRQ,
@@ -40,6 +39,26 @@ static struct platform_device usbf_device = {
40 .resource = usbf_resources, 39 .resource = usbf_resources,
41}; 40};
42 41
42static struct resource iic_resources[] = {
43 [0] = {
44 .name = "IIC",
45 .start = 0x04470000,
46 .end = 0x04470017,
47 .flags = IORESOURCE_MEM,
48 },
49 [1] = {
50 .start = 96,
51 .end = 99,
52 .flags = IORESOURCE_IRQ,
53 },
54};
55
56static struct platform_device iic_device = {
57 .name = "i2c-sh_mobile",
58 .num_resources = ARRAY_SIZE(iic_resources),
59 .resource = iic_resources,
60};
61
43static struct plat_sci_port sci_platform_data[] = { 62static struct plat_sci_port sci_platform_data[] = {
44 { 63 {
45 .mapbase = 0xffe00000, 64 .mapbase = 0xffe00000,
@@ -74,6 +93,7 @@ static struct platform_device sci_device = {
74 93
75static struct platform_device *sh7722_devices[] __initdata = { 94static struct platform_device *sh7722_devices[] __initdata = {
76 &usbf_device, 95 &usbf_device,
96 &iic_device,
77 &sci_device, 97 &sci_device,
78}; 98};
79 99
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
new file mode 100644
index 000000000000..16925cf28db8
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -0,0 +1,300 @@
1/*
2 * SH7723 Setup
3 *
4 * Copyright (C) 2008 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/platform_device.h>
11#include <linux/init.h>
12#include <linux/serial.h>
13#include <linux/mm.h>
14#include <linux/serial_sci.h>
15#include <asm/mmzone.h>
16
17static struct plat_sci_port sci_platform_data[] = {
18 {
19 .mapbase = 0xa4e30000,
20 .flags = UPF_BOOT_AUTOCONF,
21 .type = PORT_SCI,
22 .irqs = { 56, 56, 56, 56 },
23 },{
24 .mapbase = 0xa4e40000,
25 .flags = UPF_BOOT_AUTOCONF,
26 .type = PORT_SCI,
27 .irqs = { 88, 88, 88, 88 },
28 },{
29 .mapbase = 0xa4e50000,
30 .flags = UPF_BOOT_AUTOCONF,
31 .type = PORT_SCI,
32 .irqs = { 109, 109, 109, 109 },
33 }, {
34 .flags = 0,
35 }
36};
37
38static struct platform_device sci_device = {
39 .name = "sh-sci",
40 .id = -1,
41 .dev = {
42 .platform_data = sci_platform_data,
43 },
44};
45
46static struct resource rtc_resources[] = {
47 [0] = {
48 .start = 0xa465fec0,
49 .end = 0xa465fec0 + 0x58 - 1,
50 .flags = IORESOURCE_IO,
51 },
52 [1] = {
53 /* Period IRQ */
54 .start = 69,
55 .flags = IORESOURCE_IRQ,
56 },
57 [2] = {
58 /* Carry IRQ */
59 .start = 70,
60 .flags = IORESOURCE_IRQ,
61 },
62 [3] = {
63 /* Alarm IRQ */
64 .start = 68,
65 .flags = IORESOURCE_IRQ,
66 },
67};
68
69static struct platform_device rtc_device = {
70 .name = "sh-rtc",
71 .id = -1,
72 .num_resources = ARRAY_SIZE(rtc_resources),
73 .resource = rtc_resources,
74};
75
76static struct platform_device *sh7723_devices[] __initdata = {
77 &sci_device,
78 &rtc_device,
79};
80
81static int __init sh7723_devices_setup(void)
82{
83 return platform_add_devices(sh7723_devices,
84 ARRAY_SIZE(sh7723_devices));
85}
86__initcall(sh7723_devices_setup);
87
88enum {
89 UNUSED=0,
90
91 /* interrupt sources */
92 IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
93 HUDI,
94 DMAC1A_DEI0,DMAC1A_DEI1,DMAC1A_DEI2,DMAC1A_DEI3,
95 _2DG_TRI,_2DG_INI,_2DG_CEI,
96 DMAC0A_DEI0,DMAC0A_DEI1,DMAC0A_DEI2,DMAC0A_DEI3,
97 VIO_CEUI,VIO_BEUI,VIO_VEU2HI,VIO_VOUI,
98 SCIFA_SCIFA0,
99 VPU_VPUI,
100 TPU_TPUI,
101 ADC_ADI,
102 USB_USI0,
103 RTC_ATI,RTC_PRI,RTC_CUI,
104 DMAC1B_DEI4,DMAC1B_DEI5,DMAC1B_DADERR,
105 DMAC0B_DEI4,DMAC0B_DEI5,DMAC0B_DADERR,
106 KEYSC_KEYI,
107 SCIF_SCIF0,SCIF_SCIF1,SCIF_SCIF2,
108 MSIOF_MSIOFI0,MSIOF_MSIOFI1,
109 SCIFA_SCIFA1,
110 FLCTL_FLSTEI,FLCTL_FLTENDI,FLCTL_FLTREQ0I,FLCTL_FLTREQ1I,
111 I2C_ALI,I2C_TACKI,I2C_WAITI,I2C_DTEI,
112 SDHI0_SDHII0,SDHI0_SDHII1,SDHI0_SDHII2,
113 CMT_CMTI,
114 TSIF_TSIFI,
115 SIU_SIUI,
116 SCIFA_SCIFA2,
117 TMU0_TUNI0, TMU0_TUNI1, TMU0_TUNI2,
118 IRDA_IRDAI,
119 ATAPI_ATAPII,
120 SDHI1_SDHII0,SDHI1_SDHII1,SDHI1_SDHII2,
121 VEU2H1_VEU2HI,
122 LCDC_LCDCI,
123 TMU1_TUNI0,TMU1_TUNI1,TMU1_TUNI2,
124
125 /* interrupt groups */
126 DMAC1A, DMAC0A, VIO, DMAC0B, FLCTL, I2C, _2DG,
127 SDHI1, RTC, DMAC1B, SDHI0,
128};
129
130static struct intc_vect vectors[] __initdata = {
131 INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620),
132 INTC_VECT(IRQ2, 0x640), INTC_VECT(IRQ3, 0x660),
133 INTC_VECT(IRQ4, 0x680), INTC_VECT(IRQ5, 0x6a0),
134 INTC_VECT(IRQ6, 0x6c0), INTC_VECT(IRQ7, 0x6e0),
135
136 INTC_VECT(DMAC1A_DEI0,0x700),
137 INTC_VECT(DMAC1A_DEI1,0x720),
138 INTC_VECT(DMAC1A_DEI2,0x740),
139 INTC_VECT(DMAC1A_DEI3,0x760),
140
141 INTC_VECT(_2DG_TRI, 0x780),
142 INTC_VECT(_2DG_INI, 0x7A0),
143 INTC_VECT(_2DG_CEI, 0x7C0),
144
145 INTC_VECT(DMAC0A_DEI0,0x800),
146 INTC_VECT(DMAC0A_DEI1,0x820),
147 INTC_VECT(DMAC0A_DEI2,0x840),
148 INTC_VECT(DMAC0A_DEI3,0x860),
149
150 INTC_VECT(VIO_CEUI,0x880),
151 INTC_VECT(VIO_BEUI,0x8A0),
152 INTC_VECT(VIO_VEU2HI,0x8C0),
153 INTC_VECT(VIO_VOUI,0x8E0),
154
155 INTC_VECT(SCIFA_SCIFA0,0x900),
156 INTC_VECT(VPU_VPUI,0x920),
157 INTC_VECT(TPU_TPUI,0x9A0),
158 INTC_VECT(ADC_ADI,0x9E0),
159 INTC_VECT(USB_USI0,0xA20),
160
161 INTC_VECT(RTC_ATI,0xA80),
162 INTC_VECT(RTC_PRI,0xAA0),
163 INTC_VECT(RTC_CUI,0xAC0),
164
165 INTC_VECT(DMAC1B_DEI4,0xB00),
166 INTC_VECT(DMAC1B_DEI5,0xB20),
167 INTC_VECT(DMAC1B_DADERR,0xB40),
168
169 INTC_VECT(DMAC0B_DEI4,0xB80),
170 INTC_VECT(DMAC0B_DEI5,0xBA0),
171 INTC_VECT(DMAC0B_DADERR,0xBC0),
172
173 INTC_VECT(KEYSC_KEYI,0xBE0),
174 INTC_VECT(SCIF_SCIF0,0xC00),
175 INTC_VECT(SCIF_SCIF1,0xC20),
176 INTC_VECT(SCIF_SCIF2,0xC40),
177 INTC_VECT(MSIOF_MSIOFI0,0xC80),
178 INTC_VECT(MSIOF_MSIOFI1,0xCA0),
179 INTC_VECT(SCIFA_SCIFA1,0xD00),
180
181 INTC_VECT(FLCTL_FLSTEI,0xD80),
182 INTC_VECT(FLCTL_FLTENDI,0xDA0),
183 INTC_VECT(FLCTL_FLTREQ0I,0xDC0),
184 INTC_VECT(FLCTL_FLTREQ1I,0xDE0),
185
186 INTC_VECT(I2C_ALI,0xE00),
187 INTC_VECT(I2C_TACKI,0xE20),
188 INTC_VECT(I2C_WAITI,0xE40),
189 INTC_VECT(I2C_DTEI,0xE60),
190
191 INTC_VECT(SDHI0_SDHII0,0xE80),
192 INTC_VECT(SDHI0_SDHII1,0xEA0),
193 INTC_VECT(SDHI0_SDHII2,0xEC0),
194
195 INTC_VECT(CMT_CMTI,0xF00),
196 INTC_VECT(TSIF_TSIFI,0xF20),
197 INTC_VECT(SIU_SIUI,0xF80),
198 INTC_VECT(SCIFA_SCIFA2,0xFA0),
199
200 INTC_VECT(TMU0_TUNI0,0x400),
201 INTC_VECT(TMU0_TUNI1,0x420),
202 INTC_VECT(TMU0_TUNI2,0x440),
203
204 INTC_VECT(IRDA_IRDAI,0x480),
205 INTC_VECT(ATAPI_ATAPII,0x4A0),
206
207 INTC_VECT(SDHI1_SDHII0,0x4E0),
208 INTC_VECT(SDHI1_SDHII1,0x500),
209 INTC_VECT(SDHI1_SDHII2,0x520),
210
211 INTC_VECT(VEU2H1_VEU2HI,0x560),
212 INTC_VECT(LCDC_LCDCI,0x580),
213
214 INTC_VECT(TMU1_TUNI0,0x920),
215 INTC_VECT(TMU1_TUNI1,0x940),
216 INTC_VECT(TMU1_TUNI2,0x960),
217
218};
219
220static struct intc_group groups[] __initdata = {
221 INTC_GROUP(DMAC1A,DMAC1A_DEI0,DMAC1A_DEI1,DMAC1A_DEI2,DMAC1A_DEI3),
222 INTC_GROUP(DMAC0A,DMAC0A_DEI0,DMAC0A_DEI1,DMAC0A_DEI2,DMAC0A_DEI3),
223 INTC_GROUP(VIO, VIO_CEUI,VIO_BEUI,VIO_VEU2HI,VIO_VOUI),
224 INTC_GROUP(DMAC0B, DMAC0B_DEI4,DMAC0B_DEI5,DMAC0B_DADERR),
225 INTC_GROUP(FLCTL,FLCTL_FLSTEI,FLCTL_FLTENDI,FLCTL_FLTREQ0I,FLCTL_FLTREQ1I),
226 INTC_GROUP(I2C,I2C_ALI,I2C_TACKI,I2C_WAITI,I2C_DTEI),
227 INTC_GROUP(_2DG, _2DG_TRI,_2DG_INI,_2DG_CEI),
228 INTC_GROUP(SDHI1, SDHI1_SDHII0,SDHI1_SDHII1,SDHI1_SDHII2),
229 INTC_GROUP(RTC, RTC_ATI,RTC_PRI,RTC_CUI),
230 INTC_GROUP(DMAC1B, DMAC1B_DEI4,DMAC1B_DEI5,DMAC1B_DADERR),
231 INTC_GROUP(SDHI0,SDHI0_SDHII0,SDHI0_SDHII1,SDHI0_SDHII2),
232};
233
234static struct intc_mask_reg mask_registers[] __initdata = {
235 { 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
236 { 0, TMU1_TUNI2,TMU1_TUNI1,TMU1_TUNI0,0,SDHI1_SDHII2,SDHI1_SDHII1,SDHI1_SDHII0} },
237 { 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
238 { VIO_VOUI, VIO_VEU2HI,VIO_BEUI,VIO_CEUI,DMAC0A_DEI3,DMAC0A_DEI2,DMAC0A_DEI1,DMAC0A_DEI0 } },
239 { 0xa4080088, 0xa40800c8, 8, /* IMR2 / IMCR2 */
240 { 0, 0, 0, VPU_VPUI,0,0,0,SCIFA_SCIFA0 } },
241 { 0xa408008c, 0xa40800cc, 8, /* IMR3 / IMCR3 */
242 { DMAC1A_DEI3,DMAC1A_DEI2,DMAC1A_DEI1,DMAC1A_DEI0,0,0,0,IRDA_IRDAI } },
243 { 0xa4080090, 0xa40800d0, 8, /* IMR4 / IMCR4 */
244 { 0,TMU0_TUNI2,TMU0_TUNI1,TMU0_TUNI0,VEU2H1_VEU2HI,0,0,LCDC_LCDCI } },
245 { 0xa4080094, 0xa40800d4, 8, /* IMR5 / IMCR5 */
246 { KEYSC_KEYI,DMAC0B_DADERR,DMAC0B_DEI5,DMAC0B_DEI4,0,SCIF_SCIF2,SCIF_SCIF1,SCIF_SCIF0 } },
247 { 0xa4080098, 0xa40800d8, 8, /* IMR6 / IMCR6 */
248 { 0,0,0,SCIFA_SCIFA1,ADC_ADI,0,MSIOF_MSIOFI1,MSIOF_MSIOFI0 } },
249 { 0xa408009c, 0xa40800dc, 8, /* IMR7 / IMCR7 */
250 { I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
251 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
252 { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
253 { 0,SDHI0_SDHII2,SDHI0_SDHII1,SDHI0_SDHII0,0,0,SCIFA_SCIFA2,SIU_SIUI } },
254 { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
255 { 0, 0, 0, CMT_CMTI, 0, 0, USB_USI0,0 } },
256 { 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
257 { 0, DMAC1B_DADERR,DMAC1B_DEI5,DMAC1B_DEI4,0,RTC_ATI,RTC_PRI,RTC_CUI } },
258 { 0xa40800ac, 0xa40800ec, 8, /* IMR11 / IMCR11 */
259 { 0,_2DG_CEI,_2DG_INI,_2DG_TRI,0,TPU_TPUI,0,TSIF_TSIFI } },
260 { 0xa40800b0, 0xa40800f0, 8, /* IMR12 / IMCR12 */
261 { 0,0,0,0,0,0,0,ATAPI_ATAPII } },
262 { 0xa4140044, 0xa4140064, 8, /* INTMSK00 / INTMSKCLR00 */
263 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
264};
265
266static struct intc_prio_reg prio_registers[] __initdata = {
267 { 0xa4080000, 0, 16, 4, /* IPRA */ { TMU0_TUNI0, TMU0_TUNI1, TMU0_TUNI2, IRDA_IRDAI } },
268 { 0xa4080004, 0, 16, 4, /* IPRB */ { VEU2H1_VEU2HI, LCDC_LCDCI, DMAC1A, 0} },
269 { 0xa4080008, 0, 16, 4, /* IPRC */ { TMU1_TUNI0, TMU1_TUNI1, TMU1_TUNI2, 0} },
270 { 0xa408000c, 0, 16, 4, /* IPRD */ { } },
271 { 0xa4080010, 0, 16, 4, /* IPRE */ { DMAC0A, VIO, SCIFA_SCIFA0, VPU_VPUI } },
272 { 0xa4080014, 0, 16, 4, /* IPRF */ { KEYSC_KEYI, DMAC0B, USB_USI0, CMT_CMTI } },
273 { 0xa4080018, 0, 16, 4, /* IPRG */ { SCIF_SCIF0, SCIF_SCIF1, SCIF_SCIF2,0 } },
274 { 0xa408001c, 0, 16, 4, /* IPRH */ { MSIOF_MSIOFI0,MSIOF_MSIOFI1, FLCTL, I2C } },
275 { 0xa4080020, 0, 16, 4, /* IPRI */ { SCIFA_SCIFA1,0,TSIF_TSIFI,_2DG } },
276 { 0xa4080024, 0, 16, 4, /* IPRJ */ { ADC_ADI,0,SIU_SIUI,SDHI1 } },
277 { 0xa4080028, 0, 16, 4, /* IPRK */ { RTC,DMAC1B,0,SDHI0 } },
278 { 0xa408002c, 0, 16, 4, /* IPRL */ { SCIFA_SCIFA2,0,TPU_TPUI,ATAPI_ATAPII } },
279 { 0xa4140010, 0, 32, 4, /* INTPRI00 */
280 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
281};
282
283static struct intc_sense_reg sense_registers[] __initdata = {
284 { 0xa414001c, 16, 2, /* ICR1 */
285 { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
286};
287
288static DECLARE_INTC_DESC(intc_desc, "sh7723", vectors, groups,
289 mask_registers, prio_registers, sense_registers);
290
291void __init plat_irq_setup(void)
292{
293 register_intc_controller(&intc_desc);
294}
295
296void __init plat_mem_setup(void)
297{
298 /* Register the URAM space as Node 1 */
299 setup_bootmem_node(1, 0x055f0000, 0x05610000);
300}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index 07c988dc9de6..ae2b22219f02 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -231,12 +231,6 @@ static struct intc_group groups[] __initdata = {
231 INTC_GROUP(GPIO, GPIO_CH0, GPIO_CH1, GPIO_CH2, GPIO_CH3), 231 INTC_GROUP(GPIO, GPIO_CH0, GPIO_CH1, GPIO_CH2, GPIO_CH3),
232}; 232};
233 233
234static struct intc_prio priorities[] __initdata = {
235 INTC_PRIO(SCIF0, 3),
236 INTC_PRIO(SCIF1, 3),
237 INTC_PRIO(SCIF2, 3),
238};
239
240static struct intc_mask_reg mask_registers[] __initdata = { 234static struct intc_mask_reg mask_registers[] __initdata = {
241 { 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */ 235 { 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */
242 { 0, 0, 0, 0, 0, 0, GPIO, 0, 236 { 0, 0, 0, 0, 0, 0, GPIO, 0,
@@ -270,11 +264,10 @@ static struct intc_prio_reg prio_registers[] __initdata = {
270 { 0xffd400b4, 0, 32, 8, /* INT2PRI13 */ { 0, 0, STIF1, STIF0 } }, 264 { 0xffd400b4, 0, 32, 8, /* INT2PRI13 */ { 0, 0, STIF1, STIF0 } },
271}; 265};
272 266
273static DECLARE_INTC_DESC(intc_desc, "sh7763", vectors, groups, priorities, 267static DECLARE_INTC_DESC(intc_desc, "sh7763", vectors, groups,
274 mask_registers, prio_registers, NULL); 268 mask_registers, prio_registers, NULL);
275 269
276/* Support for external interrupt pins in IRQ mode */ 270/* Support for external interrupt pins in IRQ mode */
277
278static struct intc_vect irq_vectors[] __initdata = { 271static struct intc_vect irq_vectors[] __initdata = {
279 INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280), 272 INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280),
280 INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300), 273 INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300),
@@ -302,7 +295,6 @@ static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors,
302 irq_sense_registers); 295 irq_sense_registers);
303 296
304/* External interrupt pins in IRL mode */ 297/* External interrupt pins in IRL mode */
305
306static struct intc_vect irl_vectors[] __initdata = { 298static struct intc_vect irl_vectors[] __initdata = {
307 INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220), 299 INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220),
308 INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260), 300 INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260),
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
index b9cec48b1808..b73578ee295d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * SH7770 Setup 2 * SH7770 Setup
3 * 3 *
4 * Copyright (C) 2006 Paul Mundt 4 * Copyright (C) 2006 - 2008 Paul Mundt
5 * 5 *
6 * This file is subject to the terms and conditions of the GNU General Public 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 7 * License. See the file "COPYING" in the main directory of this archive
@@ -29,6 +29,41 @@ static struct plat_sci_port sci_platform_data[] = {
29 .type = PORT_SCIF, 29 .type = PORT_SCIF,
30 .irqs = { 63, 63, 63, 63 }, 30 .irqs = { 63, 63, 63, 63 },
31 }, { 31 }, {
32 .mapbase = 0xff926000,
33 .flags = UPF_BOOT_AUTOCONF,
34 .type = PORT_SCIF,
35 .irqs = { 64, 64, 64, 64 },
36 }, {
37 .mapbase = 0xff927000,
38 .flags = UPF_BOOT_AUTOCONF,
39 .type = PORT_SCIF,
40 .irqs = { 65, 65, 65, 65 },
41 }, {
42 .mapbase = 0xff928000,
43 .flags = UPF_BOOT_AUTOCONF,
44 .type = PORT_SCIF,
45 .irqs = { 66, 66, 66, 66 },
46 }, {
47 .mapbase = 0xff929000,
48 .flags = UPF_BOOT_AUTOCONF,
49 .type = PORT_SCIF,
50 .irqs = { 67, 67, 67, 67 },
51 }, {
52 .mapbase = 0xff92a000,
53 .flags = UPF_BOOT_AUTOCONF,
54 .type = PORT_SCIF,
55 .irqs = { 68, 68, 68, 68 },
56 }, {
57 .mapbase = 0xff92b000,
58 .flags = UPF_BOOT_AUTOCONF,
59 .type = PORT_SCIF,
60 .irqs = { 69, 69, 69, 69 },
61 }, {
62 .mapbase = 0xff92c000,
63 .flags = UPF_BOOT_AUTOCONF,
64 .type = PORT_SCIF,
65 .irqs = { 70, 70, 70, 70 },
66 }, {
32 .flags = 0, 67 .flags = 0,
33 } 68 }
34}; 69};
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index ff4f54a47c07..284f66f1ebbe 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -23,6 +23,8 @@
23#include <linux/kexec.h> 23#include <linux/kexec.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/err.h>
27#include <linux/debugfs.h>
26#include <asm/uaccess.h> 28#include <asm/uaccess.h>
27#include <asm/io.h> 29#include <asm/io.h>
28#include <asm/page.h> 30#include <asm/page.h>
@@ -333,6 +335,7 @@ static const char *cpu_name[] = {
333 [CPU_SH7343] = "SH7343", [CPU_SH7785] = "SH7785", 335 [CPU_SH7343] = "SH7343", [CPU_SH7785] = "SH7785",
334 [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3", 336 [CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3",
335 [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103", 337 [CPU_SH5_101] = "SH5-101", [CPU_SH5_103] = "SH5-103",
338 [CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723",
336 [CPU_SH7366] = "SH7366", [CPU_SH_NONE] = "Unknown" 339 [CPU_SH7366] = "SH7366", [CPU_SH_NONE] = "Unknown"
337}; 340};
338 341
@@ -443,3 +446,15 @@ const struct seq_operations cpuinfo_op = {
443 .show = show_cpuinfo, 446 .show = show_cpuinfo,
444}; 447};
445#endif /* CONFIG_PROC_FS */ 448#endif /* CONFIG_PROC_FS */
449
450struct dentry *sh_debugfs_root;
451
452static int __init sh_debugfs_init(void)
453{
454 sh_debugfs_root = debugfs_create_dir("sh", NULL);
455 if (IS_ERR(sh_debugfs_root))
456 return PTR_ERR(sh_debugfs_root);
457
458 return 0;
459}
460arch_initcall(sh_debugfs_init);
diff --git a/arch/sh/lib/clear_page.S b/arch/sh/lib/clear_page.S
index 3539123fe517..8342bfbde64c 100644
--- a/arch/sh/lib/clear_page.S
+++ b/arch/sh/lib/clear_page.S
@@ -27,11 +27,11 @@ ENTRY(clear_page)
27 mov #0,r0 27 mov #0,r0
28 ! 28 !
291: 291:
30#if defined(CONFIG_CPU_SH3) 30#if defined(CONFIG_CPU_SH4)
31 mov.l r0,@r4
32#elif defined(CONFIG_CPU_SH4)
33 movca.l r0,@r4 31 movca.l r0,@r4
34 mov r4,r1 32 mov r4,r1
33#else
34 mov.l r0,@r4
35#endif 35#endif
36 add #32,r4 36 add #32,r4
37 mov.l r0,@-r4 37 mov.l r0,@-r4
diff --git a/arch/sh/lib/copy_page.S b/arch/sh/lib/copy_page.S
index e002b91c8752..5d12e657be34 100644
--- a/arch/sh/lib/copy_page.S
+++ b/arch/sh/lib/copy_page.S
@@ -41,11 +41,11 @@ ENTRY(copy_page)
41 mov.l @r11+,r5 41 mov.l @r11+,r5
42 mov.l @r11+,r6 42 mov.l @r11+,r6
43 mov.l @r11+,r7 43 mov.l @r11+,r7
44#if defined(CONFIG_CPU_SH3) 44#if defined(CONFIG_CPU_SH4)
45 mov.l r0,@r10
46#elif defined(CONFIG_CPU_SH4)
47 movca.l r0,@r10 45 movca.l r0,@r10
48 mov r10,r0 46 mov r10,r0
47#else
48 mov.l r0,@r10
49#endif 49#endif
50 add #32,r10 50 add #32,r10
51 mov.l r7,@-r10 51 mov.l r7,@-r10
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index db6d950b6f5e..c5b56d52b7d2 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -127,13 +127,13 @@ static int __init cache_debugfs_init(void)
127{ 127{
128 struct dentry *dcache_dentry, *icache_dentry; 128 struct dentry *dcache_dentry, *icache_dentry;
129 129
130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, NULL, 130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root,
131 (unsigned int *)CACHE_TYPE_DCACHE, 131 (unsigned int *)CACHE_TYPE_DCACHE,
132 &cache_debugfs_fops); 132 &cache_debugfs_fops);
133 if (IS_ERR(dcache_dentry)) 133 if (IS_ERR(dcache_dentry))
134 return PTR_ERR(dcache_dentry); 134 return PTR_ERR(dcache_dentry);
135 135
136 icache_dentry = debugfs_create_file("icache", S_IRUSR, NULL, 136 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root,
137 (unsigned int *)CACHE_TYPE_ICACHE, 137 (unsigned int *)CACHE_TYPE_ICACHE,
138 &cache_debugfs_fops); 138 &cache_debugfs_fops);
139 if (IS_ERR(icache_dentry)) { 139 if (IS_ERR(icache_dentry)) {
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index ab81c602295f..0b0ec6e04753 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -393,7 +393,7 @@ static int __init pmb_debugfs_init(void)
393 struct dentry *dentry; 393 struct dentry *dentry;
394 394
395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO, 395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO,
396 NULL, NULL, &pmb_debugfs_fops); 396 sh_debugfs_root, NULL, &pmb_debugfs_fops);
397 if (IS_ERR(dentry)) 397 if (IS_ERR(dentry))
398 return PTR_ERR(dentry); 398 return PTR_ERR(dentry);
399 399
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index d63b93da952d..987c6682bf99 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -21,8 +21,9 @@ HD64465 HD64465
217206SE SH_7206_SOLUTION_ENGINE 217206SE SH_7206_SOLUTION_ENGINE
227343SE SH_7343_SOLUTION_ENGINE 227343SE SH_7343_SOLUTION_ENGINE
237619SE SH_7619_SOLUTION_ENGINE 237619SE SH_7619_SOLUTION_ENGINE
247722SE SH_7722_SOLUTION_ENGINE 247721SE SH_7721_SOLUTION_ENGINE
257751SE SH_7751_SOLUTION_ENGINE 257722SE SH_7722_SOLUTION_ENGINE
267751SE SH_7751_SOLUTION_ENGINE
267780SE SH_7780_SOLUTION_ENGINE 277780SE SH_7780_SOLUTION_ENGINE
277751SYSTEMH SH_7751_SYSTEMH 287751SYSTEMH SH_7751_SYSTEMH
28HP6XX SH_HP6XX 29HP6XX SH_HP6XX
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index cfaf22c05bc4..53caacbb3982 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -105,7 +105,7 @@ __volatile__ unsigned int *master_l10_limit;
105 105
106#define TICK_SIZE (tick_nsec / 1000) 106#define TICK_SIZE (tick_nsec / 1000)
107 107
108irqreturn_t timer_interrupt(int irq, void *dev_id) 108static irqreturn_t timer_interrupt(int dummy, void *dev_id)
109{ 109{
110 /* last time the cmos clock got updated */ 110 /* last time the cmos clock got updated */
111 static long last_rtc_update; 111 static long last_rtc_update;
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 463d1be32c98..2667a9dee11d 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -16,6 +16,7 @@ config SPARC64
16 bool 16 bool
17 default y 17 default y
18 select HAVE_IDE 18 select HAVE_IDE
19 select HAVE_LMB
19 help 20 help
20 SPARC is a family of RISC microprocessors designed and marketed by 21 SPARC is a family of RISC microprocessors designed and marketed by
21 Sun Microsystems, incorporated. This port covers the newer 64-bit 22 Sun Microsystems, incorporated. This port covers the newer 64-bit
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 2455fa498876..c1a61e98899a 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -55,7 +55,6 @@
55#include <asm/types.h> 55#include <asm/types.h>
56#include <asm/uaccess.h> 56#include <asm/uaccess.h>
57#include <asm/fpumacro.h> 57#include <asm/fpumacro.h>
58#include <asm/semaphore.h>
59#include <asm/mmu_context.h> 58#include <asm/mmu_context.h>
60#include <asm/compat_signal.h> 59#include <asm/compat_signal.h>
61 60
diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c
index 0a4df4d6e05f..003db9c8c44a 100644
--- a/arch/v850/kernel/syscalls.c
+++ b/arch/v850/kernel/syscalls.c
@@ -30,7 +30,6 @@
30#include <linux/file.h> 30#include <linux/file.h>
31 31
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <asm/semaphore.h>
34#include <asm/unistd.h> 33#include <asm/unistd.h>
35 34
36/* 35/*
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2a59dbb28248..87a693cf2bb7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -117,6 +117,9 @@ config ARCH_HAS_CPU_RELAX
117config HAVE_SETUP_PER_CPU_AREA 117config HAVE_SETUP_PER_CPU_AREA
118 def_bool X86_64 || (X86_SMP && !X86_VOYAGER) 118 def_bool X86_64 || (X86_SMP && !X86_VOYAGER)
119 119
120config HAVE_CPUMASK_OF_CPU_MAP
121 def_bool X86_64_SMP
122
120config ARCH_HIBERNATION_POSSIBLE 123config ARCH_HIBERNATION_POSSIBLE
121 def_bool y 124 def_bool y
122 depends on !SMP || !X86_VOYAGER 125 depends on !SMP || !X86_VOYAGER
@@ -903,6 +906,15 @@ config X86_64_ACPI_NUMA
903 help 906 help
904 Enable ACPI SRAT based node topology detection. 907 Enable ACPI SRAT based node topology detection.
905 908
909# Some NUMA nodes have memory ranges that span
910# other nodes. Even though a pfn is valid and
911# between a node's start and end pfns, it may not
912# reside on that node. See memmap_init_zone()
913# for details.
914config NODES_SPAN_OTHER_NODES
915 def_bool y
916 depends on X86_64_ACPI_NUMA
917
906config NUMA_EMU 918config NUMA_EMU
907 bool "NUMA emulation" 919 bool "NUMA emulation"
908 depends on X86_64 && NUMA 920 depends on X86_64 && NUMA
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 31348d054fca..90943f83e84d 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/a20.c
13 *
14 * Enable A20 gate (return -1 on failure) 12 * Enable A20 gate (return -1 on failure)
15 */ 13 */
16 14
diff --git a/arch/x86/boot/apm.c b/arch/x86/boot/apm.c
index c117c7fb859c..7aa6033001f9 100644
--- a/arch/x86/boot/apm.c
+++ b/arch/x86/boot/apm.c
@@ -12,8 +12,6 @@
12 * ----------------------------------------------------------------------- */ 12 * ----------------------------------------------------------------------- */
13 13
14/* 14/*
15 * arch/i386/boot/apm.c
16 *
17 * Get APM BIOS information 15 * Get APM BIOS information
18 */ 16 */
19 17
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
index 8dcc8dc7db88..878e4b9940d9 100644
--- a/arch/x86/boot/bitops.h
+++ b/arch/x86/boot/bitops.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/bitops.h
13 *
14 * Very simple bitops for the boot code. 12 * Very simple bitops for the boot code.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 09578070bfba..a34b9982c7cb 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/boot.h
13 *
14 * Header file for the real-mode kernel code 12 * Header file for the real-mode kernel code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/cmdline.c b/arch/x86/boot/cmdline.c
index 680408a0f463..a1d35634bce0 100644
--- a/arch/x86/boot/cmdline.c
+++ b/arch/x86/boot/cmdline.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/cmdline.c
13 *
14 * Simple command-line parser for early boot. 12 * Simple command-line parser for early boot.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 036e635f18a3..ba7736cf2ec7 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -130,7 +130,7 @@ relocated:
130/* 130/*
131 * Setup the stack for the decompressor 131 * Setup the stack for the decompressor
132 */ 132 */
133 leal stack_end(%ebx), %esp 133 leal boot_stack_end(%ebx), %esp
134 134
135/* 135/*
136 * Do the decompression, and jump to the new kernel.. 136 * Do the decompression, and jump to the new kernel..
@@ -142,8 +142,8 @@ relocated:
142 pushl %eax # input_len 142 pushl %eax # input_len
143 leal input_data(%ebx), %eax 143 leal input_data(%ebx), %eax
144 pushl %eax # input_data 144 pushl %eax # input_data
145 leal _end(%ebx), %eax 145 leal boot_heap(%ebx), %eax
146 pushl %eax # end of the image as third argument 146 pushl %eax # heap area as third argument
147 pushl %esi # real mode pointer as second arg 147 pushl %esi # real mode pointer as second arg
148 call decompress_kernel 148 call decompress_kernel
149 addl $20, %esp 149 addl $20, %esp
@@ -181,7 +181,10 @@ relocated:
181 jmp *%ebp 181 jmp *%ebp
182 182
183.bss 183.bss
184/* Stack and heap for uncompression */
184.balign 4 185.balign 4
185stack: 186boot_heap:
186 .fill 4096, 1, 0 187 .fill BOOT_HEAP_SIZE, 1, 0
187stack_end: 188boot_stack:
189 .fill BOOT_STACK_SIZE, 1, 0
190boot_stack_end:
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index e8657b98c902..d8819efac81d 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -28,6 +28,7 @@
28#include <asm/segment.h> 28#include <asm/segment.h>
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/page.h> 30#include <asm/page.h>
31#include <asm/boot.h>
31#include <asm/msr.h> 32#include <asm/msr.h>
32#include <asm/asm-offsets.h> 33#include <asm/asm-offsets.h>
33 34
@@ -62,7 +63,7 @@ startup_32:
62 subl $1b, %ebp 63 subl $1b, %ebp
63 64
64/* setup a stack and make sure cpu supports long mode. */ 65/* setup a stack and make sure cpu supports long mode. */
65 movl $user_stack_end, %eax 66 movl $boot_stack_end, %eax
66 addl %ebp, %eax 67 addl %ebp, %eax
67 movl %eax, %esp 68 movl %eax, %esp
68 69
@@ -243,9 +244,9 @@ ENTRY(startup_64)
243/* Copy the compressed kernel to the end of our buffer 244/* Copy the compressed kernel to the end of our buffer
244 * where decompression in place becomes safe. 245 * where decompression in place becomes safe.
245 */ 246 */
246 leaq _end(%rip), %r8 247 leaq _end_before_pgt(%rip), %r8
247 leaq _end(%rbx), %r9 248 leaq _end_before_pgt(%rbx), %r9
248 movq $_end /* - $startup_32 */, %rcx 249 movq $_end_before_pgt /* - $startup_32 */, %rcx
2491: subq $8, %r8 2501: subq $8, %r8
250 subq $8, %r9 251 subq $8, %r9
251 movq 0(%r8), %rax 252 movq 0(%r8), %rax
@@ -267,14 +268,14 @@ relocated:
267 */ 268 */
268 xorq %rax, %rax 269 xorq %rax, %rax
269 leaq _edata(%rbx), %rdi 270 leaq _edata(%rbx), %rdi
270 leaq _end(%rbx), %rcx 271 leaq _end_before_pgt(%rbx), %rcx
271 subq %rdi, %rcx 272 subq %rdi, %rcx
272 cld 273 cld
273 rep 274 rep
274 stosb 275 stosb
275 276
276 /* Setup the stack */ 277 /* Setup the stack */
277 leaq user_stack_end(%rip), %rsp 278 leaq boot_stack_end(%rip), %rsp
278 279
279 /* zero EFLAGS after setting rsp */ 280 /* zero EFLAGS after setting rsp */
280 pushq $0 281 pushq $0
@@ -285,7 +286,7 @@ relocated:
285 */ 286 */
286 pushq %rsi # Save the real mode argument 287 pushq %rsi # Save the real mode argument
287 movq %rsi, %rdi # real mode address 288 movq %rsi, %rdi # real mode address
288 leaq _heap(%rip), %rsi # _heap 289 leaq boot_heap(%rip), %rsi # malloc area for uncompression
289 leaq input_data(%rip), %rdx # input_data 290 leaq input_data(%rip), %rdx # input_data
290 movl input_len(%rip), %eax 291 movl input_len(%rip), %eax
291 movq %rax, %rcx # input_len 292 movq %rax, %rcx # input_len
@@ -310,9 +311,12 @@ gdt:
310 .quad 0x0080890000000000 /* TS descriptor */ 311 .quad 0x0080890000000000 /* TS descriptor */
311 .quad 0x0000000000000000 /* TS continued */ 312 .quad 0x0000000000000000 /* TS continued */
312gdt_end: 313gdt_end:
313 .bss 314
314/* Stack for uncompression */ 315.bss
315 .balign 4 316/* Stack and heap for uncompression */
316user_stack: 317.balign 4
317 .fill 4096,4,0 318boot_heap:
318user_stack_end: 319 .fill BOOT_HEAP_SIZE, 1, 0
320boot_stack:
321 .fill BOOT_STACK_SIZE, 1, 0
322boot_stack_end:
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index dad4e699f5a3..90456cee47c3 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -217,12 +217,6 @@ static void putstr(const char *);
217static memptr free_mem_ptr; 217static memptr free_mem_ptr;
218static memptr free_mem_end_ptr; 218static memptr free_mem_end_ptr;
219 219
220#ifdef CONFIG_X86_64
221#define HEAP_SIZE 0x7000
222#else
223#define HEAP_SIZE 0x4000
224#endif
225
226static char *vidmem; 220static char *vidmem;
227static int vidport; 221static int vidport;
228static int lines, cols; 222static int lines, cols;
@@ -449,7 +443,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
449 443
450 window = output; /* Output buffer (Normally at 1M) */ 444 window = output; /* Output buffer (Normally at 1M) */
451 free_mem_ptr = heap; /* Heap */ 445 free_mem_ptr = heap; /* Heap */
452 free_mem_end_ptr = heap + HEAP_SIZE; 446 free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
453 inbuf = input_data; /* Input buffer */ 447 inbuf = input_data; /* Input buffer */
454 insize = input_len; 448 insize = input_len;
455 inptr = 0; 449 inptr = 0;
diff --git a/arch/x86/boot/compressed/vmlinux_64.lds b/arch/x86/boot/compressed/vmlinux_64.lds
index 7e5c7209f6cc..bef1ac891bce 100644
--- a/arch/x86/boot/compressed/vmlinux_64.lds
+++ b/arch/x86/boot/compressed/vmlinux_64.lds
@@ -39,10 +39,10 @@ SECTIONS
39 *(.bss.*) 39 *(.bss.*)
40 *(COMMON) 40 *(COMMON)
41 . = ALIGN(8); 41 . = ALIGN(8);
42 _end = . ; 42 _end_before_pgt = . ;
43 . = ALIGN(4096); 43 . = ALIGN(4096);
44 pgtable = . ; 44 pgtable = . ;
45 . = . + 4096 * 6; 45 . = . + 4096 * 6;
46 _heap = .; 46 _ebss = .;
47 } 47 }
48} 48}
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S
index ef127e56a3cf..ef50c84e8b4b 100644
--- a/arch/x86/boot/copy.S
+++ b/arch/x86/boot/copy.S
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/copy.S
13 *
14 * Memory copy routines 12 * Memory copy routines
15 */ 13 */
16 14
diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
index 2462c88689ed..7804389ee005 100644
--- a/arch/x86/boot/cpucheck.c
+++ b/arch/x86/boot/cpucheck.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/cpucheck.c
13 *
14 * Check for obligatory CPU features and abort if the features are not 12 * Check for obligatory CPU features and abort if the features are not
15 * present. This code should be compilable as 16-, 32- or 64-bit 13 * present. This code should be compilable as 16-, 32- or 64-bit
16 * code, so be very careful with types and inline assembly. 14 * code, so be very careful with types and inline assembly.
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c
index 8721dc46a0b6..d84a48ece785 100644
--- a/arch/x86/boot/edd.c
+++ b/arch/x86/boot/edd.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/edd.c
13 *
14 * Get EDD BIOS disk information 12 * Get EDD BIOS disk information
15 */ 13 */
16 14
diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
index 88d77761d01b..8d60ee15dfd9 100644
--- a/arch/x86/boot/install.sh
+++ b/arch/x86/boot/install.sh
@@ -1,7 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# arch/i386/boot/install.sh
4#
5# This file is subject to the terms and conditions of the GNU General Public 3# 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 4# License. See the file "COPYING" in the main directory of this archive
7# for more details. 5# for more details.
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index 7828da5cfd07..77569a4a3be1 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/main.c
13 *
14 * Main module for the real-mode kernel code 12 * Main module for the real-mode kernel code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/mca.c b/arch/x86/boot/mca.c
index 68222f2d4b67..911eaae5d696 100644
--- a/arch/x86/boot/mca.c
+++ b/arch/x86/boot/mca.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/mca.c
13 *
14 * Get the MCA system description table 12 * Get the MCA system description table
15 */ 13 */
16 14
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index e77d89f9e8aa..acad32eb4290 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/memory.c
13 *
14 * Memory detection code 12 * Memory detection code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index a93cb8bded4d..328956fdb59e 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/pm.c
13 *
14 * Prepare the machine for transition to protected mode. 12 * Prepare the machine for transition to protected mode.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index f5402d51f7c3..ab049d40a884 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/pmjump.S
13 *
14 * The actual transition into protected mode 12 * The actual transition into protected mode
15 */ 13 */
16 14
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index 7e7e890699be..c1d00c0274c4 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/printf.c
13 *
14 * Oh, it's a waste of space, but oh-so-yummy for debugging. This 12 * Oh, it's a waste of space, but oh-so-yummy for debugging. This
15 * version of printf() does not include 64-bit support. "Live with 13 * version of printf() does not include 64-bit support. "Live with
16 * it." 14 * it."
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index 481a22097781..f94b7a0c2abf 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/string.c
13 *
14 * Very basic string functions 12 * Very basic string functions
15 */ 13 */
16 14
diff --git a/arch/x86/boot/tty.c b/arch/x86/boot/tty.c
index f3f14bd26371..0be77b39328a 100644
--- a/arch/x86/boot/tty.c
+++ b/arch/x86/boot/tty.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/tty.c
13 *
14 * Very simple screen I/O 12 * Very simple screen I/O
15 * XXX: Probably should add very simple serial I/O? 13 * XXX: Probably should add very simple serial I/O?
16 */ 14 */
diff --git a/arch/x86/boot/version.c b/arch/x86/boot/version.c
index c61462f7d9a7..2723d9b5ce43 100644
--- a/arch/x86/boot/version.c
+++ b/arch/x86/boot/version.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/version.c
13 *
14 * Kernel version string 12 * Kernel version string
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video-bios.c b/arch/x86/boot/video-bios.c
index 39e247e96172..49f26aaaebc8 100644
--- a/arch/x86/boot/video-bios.c
+++ b/arch/x86/boot/video-bios.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-bios.c
13 *
14 * Standard video BIOS modes 12 * Standard video BIOS modes
15 * 13 *
16 * We have two options for this; silent and scanned. 14 * We have two options for this; silent and scanned.
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
index 5d5a3f6e8b5c..401ad998ad08 100644
--- a/arch/x86/boot/video-vesa.c
+++ b/arch/x86/boot/video-vesa.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-vesa.c
13 *
14 * VESA text modes 12 * VESA text modes
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index 330d6589a2ad..40ecb8d7688c 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-vga.c
13 *
14 * Common all-VGA modes 12 * Common all-VGA modes
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
index c1c47ba069ef..83598b23093a 100644
--- a/arch/x86/boot/video.c
+++ b/arch/x86/boot/video.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video.c
13 *
14 * Select video mode 12 * Select video mode
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video.h b/arch/x86/boot/video.h
index d69347f79e8e..ee63f5d14461 100644
--- a/arch/x86/boot/video.h
+++ b/arch/x86/boot/video.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video.h
13 *
14 * Header file for the real-mode video probing code 12 * Header file for the real-mode video probing code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/voyager.c b/arch/x86/boot/voyager.c
index 6499e3239b41..433909d61e5c 100644
--- a/arch/x86/boot/voyager.c
+++ b/arch/x86/boot/voyager.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/voyager.c
13 *
14 * Get the Voyager config information 12 * Get the Voyager config information
15 */ 13 */
16 14
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
index 7cede7a9e0dc..f00afdf61e67 100644
--- a/arch/x86/ia32/sys_ia32.c
+++ b/arch/x86/ia32/sys_ia32.c
@@ -43,7 +43,6 @@
43#include <asm/mman.h> 43#include <asm/mman.h>
44#include <asm/types.h> 44#include <asm/types.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm/semaphore.h>
47#include <asm/atomic.h> 46#include <asm/atomic.h>
48#include <asm/ia32.h> 47#include <asm/ia32.h>
49#include <asm/vgtod.h> 48#include <asm/vgtod.h>
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index c3920ea8ac56..90e092d0af0c 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -22,13 +22,14 @@ obj-y += setup_$(BITS).o i8259_$(BITS).o setup.o
22obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o 22obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o
23obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o 23obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
24obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o setup64.o 24obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o setup64.o
25obj-y += pci-dma_$(BITS).o bootflag.o e820_$(BITS).o 25obj-y += bootflag.o e820_$(BITS).o
26obj-y += quirks.o i8237.o topology.o kdebugfs.o 26obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
27obj-y += alternative.o i8253.o 27obj-y += alternative.o i8253.o pci-nommu.o
28obj-$(CONFIG_X86_64) += pci-nommu_64.o bugs_64.o 28obj-$(CONFIG_X86_64) += bugs_64.o
29obj-y += tsc_$(BITS).o io_delay.o rtc.o 29obj-y += tsc_$(BITS).o io_delay.o rtc.o
30 30
31obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o 31obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
32obj-y += process.o
32obj-y += i387.o 33obj-y += i387.o
33obj-y += ptrace.o 34obj-y += ptrace.o
34obj-y += ds.o 35obj-y += ds.o
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 8ca3557a6d59..c2502eb9aa83 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/i386/kernel/acpi/cstate.c
3 *
4 * Copyright (C) 2005 Intel Corporation 2 * Copyright (C) 2005 Intel Corporation
5 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 3 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
6 * - Added _PDC for SMP C-states on Intel CPUs 4 * - Added _PDC for SMP C-states on Intel CPUs
@@ -93,7 +91,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
93 91
94 /* Make sure we are running on right CPU */ 92 /* Make sure we are running on right CPU */
95 saved_mask = current->cpus_allowed; 93 saved_mask = current->cpus_allowed;
96 retval = set_cpus_allowed(current, cpumask_of_cpu(cpu)); 94 retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
97 if (retval) 95 if (retval)
98 return -1; 96 return -1;
99 97
@@ -130,7 +128,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
130 cx->address); 128 cx->address);
131 129
132out: 130out:
133 set_cpus_allowed(current, saved_mask); 131 set_cpus_allowed_ptr(current, &saved_mask);
134 return retval; 132 return retval;
135} 133}
136EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); 134EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
index 324eb0cab19c..de2d2e4ebad9 100644
--- a/arch/x86/kernel/acpi/processor.c
+++ b/arch/x86/kernel/acpi/processor.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/i386/kernel/acpi/processor.c
3 *
4 * Copyright (C) 2005 Intel Corporation 2 * Copyright (C) 2005 Intel Corporation
5 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 3 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
6 * - Added _PDC for platforms with Intel CPUs 4 * - Added _PDC for platforms with Intel CPUs
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index d999d7833bc2..35b4f6a9c8ef 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -5,7 +5,6 @@
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/percpu.h> 6#include <linux/percpu.h>
7#include <linux/bootmem.h> 7#include <linux/bootmem.h>
8#include <asm/semaphore.h>
9#include <asm/processor.h> 8#include <asm/processor.h>
10#include <asm/i387.h> 9#include <asm/i387.h>
11#include <asm/msr.h> 10#include <asm/msr.h>
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index a962dcb9c408..e2d870de837c 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -192,9 +192,9 @@ static void drv_read(struct drv_cmd *cmd)
192 cpumask_t saved_mask = current->cpus_allowed; 192 cpumask_t saved_mask = current->cpus_allowed;
193 cmd->val = 0; 193 cmd->val = 0;
194 194
195 set_cpus_allowed(current, cmd->mask); 195 set_cpus_allowed_ptr(current, &cmd->mask);
196 do_drv_read(cmd); 196 do_drv_read(cmd);
197 set_cpus_allowed(current, saved_mask); 197 set_cpus_allowed_ptr(current, &saved_mask);
198} 198}
199 199
200static void drv_write(struct drv_cmd *cmd) 200static void drv_write(struct drv_cmd *cmd)
@@ -203,30 +203,30 @@ static void drv_write(struct drv_cmd *cmd)
203 unsigned int i; 203 unsigned int i;
204 204
205 for_each_cpu_mask(i, cmd->mask) { 205 for_each_cpu_mask(i, cmd->mask) {
206 set_cpus_allowed(current, cpumask_of_cpu(i)); 206 set_cpus_allowed_ptr(current, &cpumask_of_cpu(i));
207 do_drv_write(cmd); 207 do_drv_write(cmd);
208 } 208 }
209 209
210 set_cpus_allowed(current, saved_mask); 210 set_cpus_allowed_ptr(current, &saved_mask);
211 return; 211 return;
212} 212}
213 213
214static u32 get_cur_val(cpumask_t mask) 214static u32 get_cur_val(const cpumask_t *mask)
215{ 215{
216 struct acpi_processor_performance *perf; 216 struct acpi_processor_performance *perf;
217 struct drv_cmd cmd; 217 struct drv_cmd cmd;
218 218
219 if (unlikely(cpus_empty(mask))) 219 if (unlikely(cpus_empty(*mask)))
220 return 0; 220 return 0;
221 221
222 switch (per_cpu(drv_data, first_cpu(mask))->cpu_feature) { 222 switch (per_cpu(drv_data, first_cpu(*mask))->cpu_feature) {
223 case SYSTEM_INTEL_MSR_CAPABLE: 223 case SYSTEM_INTEL_MSR_CAPABLE:
224 cmd.type = SYSTEM_INTEL_MSR_CAPABLE; 224 cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
225 cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; 225 cmd.addr.msr.reg = MSR_IA32_PERF_STATUS;
226 break; 226 break;
227 case SYSTEM_IO_CAPABLE: 227 case SYSTEM_IO_CAPABLE:
228 cmd.type = SYSTEM_IO_CAPABLE; 228 cmd.type = SYSTEM_IO_CAPABLE;
229 perf = per_cpu(drv_data, first_cpu(mask))->acpi_data; 229 perf = per_cpu(drv_data, first_cpu(*mask))->acpi_data;
230 cmd.addr.io.port = perf->control_register.address; 230 cmd.addr.io.port = perf->control_register.address;
231 cmd.addr.io.bit_width = perf->control_register.bit_width; 231 cmd.addr.io.bit_width = perf->control_register.bit_width;
232 break; 232 break;
@@ -234,7 +234,7 @@ static u32 get_cur_val(cpumask_t mask)
234 return 0; 234 return 0;
235 } 235 }
236 236
237 cmd.mask = mask; 237 cmd.mask = *mask;
238 238
239 drv_read(&cmd); 239 drv_read(&cmd);
240 240
@@ -271,7 +271,7 @@ static unsigned int get_measured_perf(unsigned int cpu)
271 unsigned int retval; 271 unsigned int retval;
272 272
273 saved_mask = current->cpus_allowed; 273 saved_mask = current->cpus_allowed;
274 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 274 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
275 if (get_cpu() != cpu) { 275 if (get_cpu() != cpu) {
276 /* We were not able to run on requested processor */ 276 /* We were not able to run on requested processor */
277 put_cpu(); 277 put_cpu();
@@ -329,7 +329,7 @@ static unsigned int get_measured_perf(unsigned int cpu)
329 retval = per_cpu(drv_data, cpu)->max_freq * perf_percent / 100; 329 retval = per_cpu(drv_data, cpu)->max_freq * perf_percent / 100;
330 330
331 put_cpu(); 331 put_cpu();
332 set_cpus_allowed(current, saved_mask); 332 set_cpus_allowed_ptr(current, &saved_mask);
333 333
334 dprintk("cpu %d: performance percent %d\n", cpu, perf_percent); 334 dprintk("cpu %d: performance percent %d\n", cpu, perf_percent);
335 return retval; 335 return retval;
@@ -347,13 +347,13 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
347 return 0; 347 return 0;
348 } 348 }
349 349
350 freq = extract_freq(get_cur_val(cpumask_of_cpu(cpu)), data); 350 freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data);
351 dprintk("cur freq = %u\n", freq); 351 dprintk("cur freq = %u\n", freq);
352 352
353 return freq; 353 return freq;
354} 354}
355 355
356static unsigned int check_freqs(cpumask_t mask, unsigned int freq, 356static unsigned int check_freqs(const cpumask_t *mask, unsigned int freq,
357 struct acpi_cpufreq_data *data) 357 struct acpi_cpufreq_data *data)
358{ 358{
359 unsigned int cur_freq; 359 unsigned int cur_freq;
@@ -449,7 +449,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
449 drv_write(&cmd); 449 drv_write(&cmd);
450 450
451 if (acpi_pstate_strict) { 451 if (acpi_pstate_strict) {
452 if (!check_freqs(cmd.mask, freqs.new, data)) { 452 if (!check_freqs(&cmd.mask, freqs.new, data)) {
453 dprintk("acpi_cpufreq_target failed (%d)\n", 453 dprintk("acpi_cpufreq_target failed (%d)\n",
454 policy->cpu); 454 policy->cpu);
455 return -EAGAIN; 455 return -EAGAIN;
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
index 14791ec55cfd..199e4e05e5dc 100644
--- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
@@ -289,8 +289,8 @@ static int __init cpufreq_p4_init(void)
289 if (c->x86_vendor != X86_VENDOR_INTEL) 289 if (c->x86_vendor != X86_VENDOR_INTEL)
290 return -ENODEV; 290 return -ENODEV;
291 291
292 if (!test_bit(X86_FEATURE_ACPI, c->x86_capability) || 292 if (!test_cpu_cap(c, X86_FEATURE_ACPI) ||
293 !test_bit(X86_FEATURE_ACC, c->x86_capability)) 293 !test_cpu_cap(c, X86_FEATURE_ACC))
294 return -ENODEV; 294 return -ENODEV;
295 295
296 ret = cpufreq_register_driver(&p4clockmod_driver); 296 ret = cpufreq_register_driver(&p4clockmod_driver);
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index c99d59d8ef2e..46d4034d9f37 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -478,12 +478,12 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi
478 478
479static int check_supported_cpu(unsigned int cpu) 479static int check_supported_cpu(unsigned int cpu)
480{ 480{
481 cpumask_t oldmask = CPU_MASK_ALL; 481 cpumask_t oldmask;
482 u32 eax, ebx, ecx, edx; 482 u32 eax, ebx, ecx, edx;
483 unsigned int rc = 0; 483 unsigned int rc = 0;
484 484
485 oldmask = current->cpus_allowed; 485 oldmask = current->cpus_allowed;
486 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 486 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
487 487
488 if (smp_processor_id() != cpu) { 488 if (smp_processor_id() != cpu) {
489 printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu); 489 printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu);
@@ -528,7 +528,7 @@ static int check_supported_cpu(unsigned int cpu)
528 rc = 1; 528 rc = 1;
529 529
530out: 530out:
531 set_cpus_allowed(current, oldmask); 531 set_cpus_allowed_ptr(current, &oldmask);
532 return rc; 532 return rc;
533} 533}
534 534
@@ -1015,7 +1015,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
1015/* Driver entry point to switch to the target frequency */ 1015/* Driver entry point to switch to the target frequency */
1016static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) 1016static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation)
1017{ 1017{
1018 cpumask_t oldmask = CPU_MASK_ALL; 1018 cpumask_t oldmask;
1019 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu); 1019 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
1020 u32 checkfid; 1020 u32 checkfid;
1021 u32 checkvid; 1021 u32 checkvid;
@@ -1030,7 +1030,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1030 1030
1031 /* only run on specific CPU from here on */ 1031 /* only run on specific CPU from here on */
1032 oldmask = current->cpus_allowed; 1032 oldmask = current->cpus_allowed;
1033 set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); 1033 set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
1034 1034
1035 if (smp_processor_id() != pol->cpu) { 1035 if (smp_processor_id() != pol->cpu) {
1036 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); 1036 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
@@ -1085,7 +1085,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1085 ret = 0; 1085 ret = 0;
1086 1086
1087err_out: 1087err_out:
1088 set_cpus_allowed(current, oldmask); 1088 set_cpus_allowed_ptr(current, &oldmask);
1089 return ret; 1089 return ret;
1090} 1090}
1091 1091
@@ -1104,7 +1104,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol)
1104static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) 1104static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1105{ 1105{
1106 struct powernow_k8_data *data; 1106 struct powernow_k8_data *data;
1107 cpumask_t oldmask = CPU_MASK_ALL; 1107 cpumask_t oldmask;
1108 int rc; 1108 int rc;
1109 1109
1110 if (!cpu_online(pol->cpu)) 1110 if (!cpu_online(pol->cpu))
@@ -1145,7 +1145,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1145 1145
1146 /* only run on specific CPU from here on */ 1146 /* only run on specific CPU from here on */
1147 oldmask = current->cpus_allowed; 1147 oldmask = current->cpus_allowed;
1148 set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); 1148 set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
1149 1149
1150 if (smp_processor_id() != pol->cpu) { 1150 if (smp_processor_id() != pol->cpu) {
1151 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); 1151 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
@@ -1164,7 +1164,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1164 fidvid_msr_init(); 1164 fidvid_msr_init();
1165 1165
1166 /* run on any CPU again */ 1166 /* run on any CPU again */
1167 set_cpus_allowed(current, oldmask); 1167 set_cpus_allowed_ptr(current, &oldmask);
1168 1168
1169 if (cpu_family == CPU_HW_PSTATE) 1169 if (cpu_family == CPU_HW_PSTATE)
1170 pol->cpus = cpumask_of_cpu(pol->cpu); 1170 pol->cpus = cpumask_of_cpu(pol->cpu);
@@ -1205,7 +1205,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1205 return 0; 1205 return 0;
1206 1206
1207err_out: 1207err_out:
1208 set_cpus_allowed(current, oldmask); 1208 set_cpus_allowed_ptr(current, &oldmask);
1209 powernow_k8_cpu_exit_acpi(data); 1209 powernow_k8_cpu_exit_acpi(data);
1210 1210
1211 kfree(data); 1211 kfree(data);
@@ -1242,10 +1242,11 @@ static unsigned int powernowk8_get (unsigned int cpu)
1242 if (!data) 1242 if (!data)
1243 return -EINVAL; 1243 return -EINVAL;
1244 1244
1245 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 1245 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
1246 if (smp_processor_id() != cpu) { 1246 if (smp_processor_id() != cpu) {
1247 printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); 1247 printk(KERN_ERR PFX
1248 set_cpus_allowed(current, oldmask); 1248 "limiting to CPU %d failed in powernowk8_get\n", cpu);
1249 set_cpus_allowed_ptr(current, &oldmask);
1249 return 0; 1250 return 0;
1250 } 1251 }
1251 1252
@@ -1253,13 +1254,14 @@ static unsigned int powernowk8_get (unsigned int cpu)
1253 goto out; 1254 goto out;
1254 1255
1255 if (cpu_family == CPU_HW_PSTATE) 1256 if (cpu_family == CPU_HW_PSTATE)
1256 khz = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); 1257 khz = find_khz_freq_from_pstate(data->powernow_table,
1258 data->currpstate);
1257 else 1259 else
1258 khz = find_khz_freq_from_fid(data->currfid); 1260 khz = find_khz_freq_from_fid(data->currfid);
1259 1261
1260 1262
1261out: 1263out:
1262 set_cpus_allowed(current, oldmask); 1264 set_cpus_allowed_ptr(current, &oldmask);
1263 return khz; 1265 return khz;
1264} 1266}
1265 1267
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
index 3031f1196192..908dd347c67e 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -315,7 +315,7 @@ static unsigned int get_cur_freq(unsigned int cpu)
315 cpumask_t saved_mask; 315 cpumask_t saved_mask;
316 316
317 saved_mask = current->cpus_allowed; 317 saved_mask = current->cpus_allowed;
318 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 318 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
319 if (smp_processor_id() != cpu) 319 if (smp_processor_id() != cpu)
320 return 0; 320 return 0;
321 321
@@ -333,7 +333,7 @@ static unsigned int get_cur_freq(unsigned int cpu)
333 clock_freq = extract_clock(l, cpu, 1); 333 clock_freq = extract_clock(l, cpu, 1);
334 } 334 }
335 335
336 set_cpus_allowed(current, saved_mask); 336 set_cpus_allowed_ptr(current, &saved_mask);
337 return clock_freq; 337 return clock_freq;
338} 338}
339 339
@@ -487,7 +487,7 @@ static int centrino_target (struct cpufreq_policy *policy,
487 else 487 else
488 cpu_set(j, set_mask); 488 cpu_set(j, set_mask);
489 489
490 set_cpus_allowed(current, set_mask); 490 set_cpus_allowed_ptr(current, &set_mask);
491 preempt_disable(); 491 preempt_disable();
492 if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { 492 if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) {
493 dprintk("couldn't limit to CPUs in this domain\n"); 493 dprintk("couldn't limit to CPUs in this domain\n");
@@ -555,7 +555,8 @@ static int centrino_target (struct cpufreq_policy *policy,
555 555
556 if (!cpus_empty(covered_cpus)) { 556 if (!cpus_empty(covered_cpus)) {
557 for_each_cpu_mask(j, covered_cpus) { 557 for_each_cpu_mask(j, covered_cpus) {
558 set_cpus_allowed(current, cpumask_of_cpu(j)); 558 set_cpus_allowed_ptr(current,
559 &cpumask_of_cpu(j));
559 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); 560 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h);
560 } 561 }
561 } 562 }
@@ -569,12 +570,12 @@ static int centrino_target (struct cpufreq_policy *policy,
569 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 570 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
570 } 571 }
571 } 572 }
572 set_cpus_allowed(current, saved_mask); 573 set_cpus_allowed_ptr(current, &saved_mask);
573 return 0; 574 return 0;
574 575
575migrate_end: 576migrate_end:
576 preempt_enable(); 577 preempt_enable();
577 set_cpus_allowed(current, saved_mask); 578 set_cpus_allowed_ptr(current, &saved_mask);
578 return 0; 579 return 0;
579} 580}
580 581
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
index 14d68aa301ee..1b50244b1fdf 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
@@ -229,22 +229,22 @@ static unsigned int speedstep_detect_chipset (void)
229 return 0; 229 return 0;
230} 230}
231 231
232static unsigned int _speedstep_get(cpumask_t cpus) 232static unsigned int _speedstep_get(const cpumask_t *cpus)
233{ 233{
234 unsigned int speed; 234 unsigned int speed;
235 cpumask_t cpus_allowed; 235 cpumask_t cpus_allowed;
236 236
237 cpus_allowed = current->cpus_allowed; 237 cpus_allowed = current->cpus_allowed;
238 set_cpus_allowed(current, cpus); 238 set_cpus_allowed_ptr(current, cpus);
239 speed = speedstep_get_processor_frequency(speedstep_processor); 239 speed = speedstep_get_processor_frequency(speedstep_processor);
240 set_cpus_allowed(current, cpus_allowed); 240 set_cpus_allowed_ptr(current, &cpus_allowed);
241 dprintk("detected %u kHz as current frequency\n", speed); 241 dprintk("detected %u kHz as current frequency\n", speed);
242 return speed; 242 return speed;
243} 243}
244 244
245static unsigned int speedstep_get(unsigned int cpu) 245static unsigned int speedstep_get(unsigned int cpu)
246{ 246{
247 return _speedstep_get(cpumask_of_cpu(cpu)); 247 return _speedstep_get(&cpumask_of_cpu(cpu));
248} 248}
249 249
250/** 250/**
@@ -267,7 +267,7 @@ static int speedstep_target (struct cpufreq_policy *policy,
267 if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate)) 267 if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate))
268 return -EINVAL; 268 return -EINVAL;
269 269
270 freqs.old = _speedstep_get(policy->cpus); 270 freqs.old = _speedstep_get(&policy->cpus);
271 freqs.new = speedstep_freqs[newstate].frequency; 271 freqs.new = speedstep_freqs[newstate].frequency;
272 freqs.cpu = policy->cpu; 272 freqs.cpu = policy->cpu;
273 273
@@ -285,12 +285,12 @@ static int speedstep_target (struct cpufreq_policy *policy,
285 } 285 }
286 286
287 /* switch to physical CPU where state is to be changed */ 287 /* switch to physical CPU where state is to be changed */
288 set_cpus_allowed(current, policy->cpus); 288 set_cpus_allowed_ptr(current, &policy->cpus);
289 289
290 speedstep_set_state(newstate); 290 speedstep_set_state(newstate);
291 291
292 /* allow to be run on all CPUs */ 292 /* allow to be run on all CPUs */
293 set_cpus_allowed(current, cpus_allowed); 293 set_cpus_allowed_ptr(current, &cpus_allowed);
294 294
295 for_each_cpu_mask(i, policy->cpus) { 295 for_each_cpu_mask(i, policy->cpus) {
296 freqs.cpu = i; 296 freqs.cpu = i;
@@ -326,7 +326,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
326#endif 326#endif
327 327
328 cpus_allowed = current->cpus_allowed; 328 cpus_allowed = current->cpus_allowed;
329 set_cpus_allowed(current, policy->cpus); 329 set_cpus_allowed_ptr(current, &policy->cpus);
330 330
331 /* detect low and high frequency and transition latency */ 331 /* detect low and high frequency and transition latency */
332 result = speedstep_get_freqs(speedstep_processor, 332 result = speedstep_get_freqs(speedstep_processor,
@@ -334,12 +334,12 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
334 &speedstep_freqs[SPEEDSTEP_HIGH].frequency, 334 &speedstep_freqs[SPEEDSTEP_HIGH].frequency,
335 &policy->cpuinfo.transition_latency, 335 &policy->cpuinfo.transition_latency,
336 &speedstep_set_state); 336 &speedstep_set_state);
337 set_cpus_allowed(current, cpus_allowed); 337 set_cpus_allowed_ptr(current, &cpus_allowed);
338 if (result) 338 if (result)
339 return result; 339 return result;
340 340
341 /* get current speed setting */ 341 /* get current speed setting */
342 speed = _speedstep_get(policy->cpus); 342 speed = _speedstep_get(&policy->cpus);
343 if (!speed) 343 if (!speed)
344 return -EIO; 344 return -EIO;
345 345
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 1b889860eb73..26d615dcb149 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -129,7 +129,7 @@ struct _cpuid4_info {
129 union _cpuid4_leaf_ebx ebx; 129 union _cpuid4_leaf_ebx ebx;
130 union _cpuid4_leaf_ecx ecx; 130 union _cpuid4_leaf_ecx ecx;
131 unsigned long size; 131 unsigned long size;
132 cpumask_t shared_cpu_map; 132 cpumask_t shared_cpu_map; /* future?: only cpus/node is needed */
133}; 133};
134 134
135unsigned short num_cache_leaves; 135unsigned short num_cache_leaves;
@@ -451,8 +451,8 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
451} 451}
452 452
453/* pointer to _cpuid4_info array (for each cache leaf) */ 453/* pointer to _cpuid4_info array (for each cache leaf) */
454static struct _cpuid4_info *cpuid4_info[NR_CPUS]; 454static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info);
455#define CPUID4_INFO_IDX(x,y) (&((cpuid4_info[x])[y])) 455#define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y]))
456 456
457#ifdef CONFIG_SMP 457#ifdef CONFIG_SMP
458static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) 458static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
@@ -474,7 +474,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
474 if (cpu_data(i).apicid >> index_msb == 474 if (cpu_data(i).apicid >> index_msb ==
475 c->apicid >> index_msb) { 475 c->apicid >> index_msb) {
476 cpu_set(i, this_leaf->shared_cpu_map); 476 cpu_set(i, this_leaf->shared_cpu_map);
477 if (i != cpu && cpuid4_info[i]) { 477 if (i != cpu && per_cpu(cpuid4_info, i)) {
478 sibling_leaf = CPUID4_INFO_IDX(i, index); 478 sibling_leaf = CPUID4_INFO_IDX(i, index);
479 cpu_set(cpu, sibling_leaf->shared_cpu_map); 479 cpu_set(cpu, sibling_leaf->shared_cpu_map);
480 } 480 }
@@ -505,8 +505,8 @@ static void __cpuinit free_cache_attributes(unsigned int cpu)
505 for (i = 0; i < num_cache_leaves; i++) 505 for (i = 0; i < num_cache_leaves; i++)
506 cache_remove_shared_cpu_map(cpu, i); 506 cache_remove_shared_cpu_map(cpu, i);
507 507
508 kfree(cpuid4_info[cpu]); 508 kfree(per_cpu(cpuid4_info, cpu));
509 cpuid4_info[cpu] = NULL; 509 per_cpu(cpuid4_info, cpu) = NULL;
510} 510}
511 511
512static int __cpuinit detect_cache_attributes(unsigned int cpu) 512static int __cpuinit detect_cache_attributes(unsigned int cpu)
@@ -519,13 +519,13 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
519 if (num_cache_leaves == 0) 519 if (num_cache_leaves == 0)
520 return -ENOENT; 520 return -ENOENT;
521 521
522 cpuid4_info[cpu] = kzalloc( 522 per_cpu(cpuid4_info, cpu) = kzalloc(
523 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL); 523 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
524 if (cpuid4_info[cpu] == NULL) 524 if (per_cpu(cpuid4_info, cpu) == NULL)
525 return -ENOMEM; 525 return -ENOMEM;
526 526
527 oldmask = current->cpus_allowed; 527 oldmask = current->cpus_allowed;
528 retval = set_cpus_allowed(current, cpumask_of_cpu(cpu)); 528 retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
529 if (retval) 529 if (retval)
530 goto out; 530 goto out;
531 531
@@ -542,12 +542,12 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
542 } 542 }
543 cache_shared_cpu_map_setup(cpu, j); 543 cache_shared_cpu_map_setup(cpu, j);
544 } 544 }
545 set_cpus_allowed(current, oldmask); 545 set_cpus_allowed_ptr(current, &oldmask);
546 546
547out: 547out:
548 if (retval) { 548 if (retval) {
549 kfree(cpuid4_info[cpu]); 549 kfree(per_cpu(cpuid4_info, cpu));
550 cpuid4_info[cpu] = NULL; 550 per_cpu(cpuid4_info, cpu) = NULL;
551 } 551 }
552 552
553 return retval; 553 return retval;
@@ -561,7 +561,7 @@ out:
561extern struct sysdev_class cpu_sysdev_class; /* from drivers/base/cpu.c */ 561extern struct sysdev_class cpu_sysdev_class; /* from drivers/base/cpu.c */
562 562
563/* pointer to kobject for cpuX/cache */ 563/* pointer to kobject for cpuX/cache */
564static struct kobject * cache_kobject[NR_CPUS]; 564static DEFINE_PER_CPU(struct kobject *, cache_kobject);
565 565
566struct _index_kobject { 566struct _index_kobject {
567 struct kobject kobj; 567 struct kobject kobj;
@@ -570,8 +570,8 @@ struct _index_kobject {
570}; 570};
571 571
572/* pointer to array of kobjects for cpuX/cache/indexY */ 572/* pointer to array of kobjects for cpuX/cache/indexY */
573static struct _index_kobject *index_kobject[NR_CPUS]; 573static DEFINE_PER_CPU(struct _index_kobject *, index_kobject);
574#define INDEX_KOBJECT_PTR(x,y) (&((index_kobject[x])[y])) 574#define INDEX_KOBJECT_PTR(x, y) (&((per_cpu(index_kobject, x))[y]))
575 575
576#define show_one_plus(file_name, object, val) \ 576#define show_one_plus(file_name, object, val) \
577static ssize_t show_##file_name \ 577static ssize_t show_##file_name \
@@ -591,11 +591,32 @@ static ssize_t show_size(struct _cpuid4_info *this_leaf, char *buf)
591 return sprintf (buf, "%luK\n", this_leaf->size / 1024); 591 return sprintf (buf, "%luK\n", this_leaf->size / 1024);
592} 592}
593 593
594static ssize_t show_shared_cpu_map(struct _cpuid4_info *this_leaf, char *buf) 594static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf,
595 int type, char *buf)
595{ 596{
596 char mask_str[NR_CPUS]; 597 ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf;
597 cpumask_scnprintf(mask_str, NR_CPUS, this_leaf->shared_cpu_map); 598 int n = 0;
598 return sprintf(buf, "%s\n", mask_str); 599
600 if (len > 1) {
601 cpumask_t *mask = &this_leaf->shared_cpu_map;
602
603 n = type?
604 cpulist_scnprintf(buf, len-2, *mask):
605 cpumask_scnprintf(buf, len-2, *mask);
606 buf[n++] = '\n';
607 buf[n] = '\0';
608 }
609 return n;
610}
611
612static inline ssize_t show_shared_cpu_map(struct _cpuid4_info *leaf, char *buf)
613{
614 return show_shared_cpu_map_func(leaf, 0, buf);
615}
616
617static inline ssize_t show_shared_cpu_list(struct _cpuid4_info *leaf, char *buf)
618{
619 return show_shared_cpu_map_func(leaf, 1, buf);
599} 620}
600 621
601static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf) { 622static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf) {
@@ -633,6 +654,7 @@ define_one_ro(ways_of_associativity);
633define_one_ro(number_of_sets); 654define_one_ro(number_of_sets);
634define_one_ro(size); 655define_one_ro(size);
635define_one_ro(shared_cpu_map); 656define_one_ro(shared_cpu_map);
657define_one_ro(shared_cpu_list);
636 658
637static struct attribute * default_attrs[] = { 659static struct attribute * default_attrs[] = {
638 &type.attr, 660 &type.attr,
@@ -643,6 +665,7 @@ static struct attribute * default_attrs[] = {
643 &number_of_sets.attr, 665 &number_of_sets.attr,
644 &size.attr, 666 &size.attr,
645 &shared_cpu_map.attr, 667 &shared_cpu_map.attr,
668 &shared_cpu_list.attr,
646 NULL 669 NULL
647}; 670};
648 671
@@ -684,10 +707,10 @@ static struct kobj_type ktype_percpu_entry = {
684 707
685static void __cpuinit cpuid4_cache_sysfs_exit(unsigned int cpu) 708static void __cpuinit cpuid4_cache_sysfs_exit(unsigned int cpu)
686{ 709{
687 kfree(cache_kobject[cpu]); 710 kfree(per_cpu(cache_kobject, cpu));
688 kfree(index_kobject[cpu]); 711 kfree(per_cpu(index_kobject, cpu));
689 cache_kobject[cpu] = NULL; 712 per_cpu(cache_kobject, cpu) = NULL;
690 index_kobject[cpu] = NULL; 713 per_cpu(index_kobject, cpu) = NULL;
691 free_cache_attributes(cpu); 714 free_cache_attributes(cpu);
692} 715}
693 716
@@ -703,13 +726,14 @@ static int __cpuinit cpuid4_cache_sysfs_init(unsigned int cpu)
703 return err; 726 return err;
704 727
705 /* Allocate all required memory */ 728 /* Allocate all required memory */
706 cache_kobject[cpu] = kzalloc(sizeof(struct kobject), GFP_KERNEL); 729 per_cpu(cache_kobject, cpu) =
707 if (unlikely(cache_kobject[cpu] == NULL)) 730 kzalloc(sizeof(struct kobject), GFP_KERNEL);
731 if (unlikely(per_cpu(cache_kobject, cpu) == NULL))
708 goto err_out; 732 goto err_out;
709 733
710 index_kobject[cpu] = kzalloc( 734 per_cpu(index_kobject, cpu) = kzalloc(
711 sizeof(struct _index_kobject ) * num_cache_leaves, GFP_KERNEL); 735 sizeof(struct _index_kobject ) * num_cache_leaves, GFP_KERNEL);
712 if (unlikely(index_kobject[cpu] == NULL)) 736 if (unlikely(per_cpu(index_kobject, cpu) == NULL))
713 goto err_out; 737 goto err_out;
714 738
715 return 0; 739 return 0;
@@ -733,7 +757,8 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
733 if (unlikely(retval < 0)) 757 if (unlikely(retval < 0))
734 return retval; 758 return retval;
735 759
736 retval = kobject_init_and_add(cache_kobject[cpu], &ktype_percpu_entry, 760 retval = kobject_init_and_add(per_cpu(cache_kobject, cpu),
761 &ktype_percpu_entry,
737 &sys_dev->kobj, "%s", "cache"); 762 &sys_dev->kobj, "%s", "cache");
738 if (retval < 0) { 763 if (retval < 0) {
739 cpuid4_cache_sysfs_exit(cpu); 764 cpuid4_cache_sysfs_exit(cpu);
@@ -745,13 +770,14 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
745 this_object->cpu = cpu; 770 this_object->cpu = cpu;
746 this_object->index = i; 771 this_object->index = i;
747 retval = kobject_init_and_add(&(this_object->kobj), 772 retval = kobject_init_and_add(&(this_object->kobj),
748 &ktype_cache, cache_kobject[cpu], 773 &ktype_cache,
774 per_cpu(cache_kobject, cpu),
749 "index%1lu", i); 775 "index%1lu", i);
750 if (unlikely(retval)) { 776 if (unlikely(retval)) {
751 for (j = 0; j < i; j++) { 777 for (j = 0; j < i; j++) {
752 kobject_put(&(INDEX_KOBJECT_PTR(cpu,j)->kobj)); 778 kobject_put(&(INDEX_KOBJECT_PTR(cpu,j)->kobj));
753 } 779 }
754 kobject_put(cache_kobject[cpu]); 780 kobject_put(per_cpu(cache_kobject, cpu));
755 cpuid4_cache_sysfs_exit(cpu); 781 cpuid4_cache_sysfs_exit(cpu);
756 break; 782 break;
757 } 783 }
@@ -760,7 +786,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
760 if (!retval) 786 if (!retval)
761 cpu_set(cpu, cache_dev_map); 787 cpu_set(cpu, cache_dev_map);
762 788
763 kobject_uevent(cache_kobject[cpu], KOBJ_ADD); 789 kobject_uevent(per_cpu(cache_kobject, cpu), KOBJ_ADD);
764 return retval; 790 return retval;
765} 791}
766 792
@@ -769,7 +795,7 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
769 unsigned int cpu = sys_dev->id; 795 unsigned int cpu = sys_dev->id;
770 unsigned long i; 796 unsigned long i;
771 797
772 if (cpuid4_info[cpu] == NULL) 798 if (per_cpu(cpuid4_info, cpu) == NULL)
773 return; 799 return;
774 if (!cpu_isset(cpu, cache_dev_map)) 800 if (!cpu_isset(cpu, cache_dev_map))
775 return; 801 return;
@@ -777,7 +803,7 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
777 803
778 for (i = 0; i < num_cache_leaves; i++) 804 for (i = 0; i < num_cache_leaves; i++)
779 kobject_put(&(INDEX_KOBJECT_PTR(cpu,i)->kobj)); 805 kobject_put(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));
780 kobject_put(cache_kobject[cpu]); 806 kobject_put(per_cpu(cache_kobject, cpu));
781 cpuid4_cache_sysfs_exit(cpu); 807 cpuid4_cache_sysfs_exit(cpu);
782} 808}
783 809
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index 32671da8184e..7c9a813e1193 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -251,18 +251,18 @@ struct threshold_attr {
251 ssize_t(*store) (struct threshold_block *, const char *, size_t count); 251 ssize_t(*store) (struct threshold_block *, const char *, size_t count);
252}; 252};
253 253
254static cpumask_t affinity_set(unsigned int cpu) 254static void affinity_set(unsigned int cpu, cpumask_t *oldmask,
255 cpumask_t *newmask)
255{ 256{
256 cpumask_t oldmask = current->cpus_allowed; 257 *oldmask = current->cpus_allowed;
257 cpumask_t newmask = CPU_MASK_NONE; 258 cpus_clear(*newmask);
258 cpu_set(cpu, newmask); 259 cpu_set(cpu, *newmask);
259 set_cpus_allowed(current, newmask); 260 set_cpus_allowed_ptr(current, newmask);
260 return oldmask;
261} 261}
262 262
263static void affinity_restore(cpumask_t oldmask) 263static void affinity_restore(const cpumask_t *oldmask)
264{ 264{
265 set_cpus_allowed(current, oldmask); 265 set_cpus_allowed_ptr(current, oldmask);
266} 266}
267 267
268#define SHOW_FIELDS(name) \ 268#define SHOW_FIELDS(name) \
@@ -277,15 +277,15 @@ static ssize_t store_interrupt_enable(struct threshold_block *b,
277 const char *buf, size_t count) 277 const char *buf, size_t count)
278{ 278{
279 char *end; 279 char *end;
280 cpumask_t oldmask; 280 cpumask_t oldmask, newmask;
281 unsigned long new = simple_strtoul(buf, &end, 0); 281 unsigned long new = simple_strtoul(buf, &end, 0);
282 if (end == buf) 282 if (end == buf)
283 return -EINVAL; 283 return -EINVAL;
284 b->interrupt_enable = !!new; 284 b->interrupt_enable = !!new;
285 285
286 oldmask = affinity_set(b->cpu); 286 affinity_set(b->cpu, &oldmask, &newmask);
287 threshold_restart_bank(b, 0, 0); 287 threshold_restart_bank(b, 0, 0);
288 affinity_restore(oldmask); 288 affinity_restore(&oldmask);
289 289
290 return end - buf; 290 return end - buf;
291} 291}
@@ -294,7 +294,7 @@ static ssize_t store_threshold_limit(struct threshold_block *b,
294 const char *buf, size_t count) 294 const char *buf, size_t count)
295{ 295{
296 char *end; 296 char *end;
297 cpumask_t oldmask; 297 cpumask_t oldmask, newmask;
298 u16 old; 298 u16 old;
299 unsigned long new = simple_strtoul(buf, &end, 0); 299 unsigned long new = simple_strtoul(buf, &end, 0);
300 if (end == buf) 300 if (end == buf)
@@ -306,9 +306,9 @@ static ssize_t store_threshold_limit(struct threshold_block *b,
306 old = b->threshold_limit; 306 old = b->threshold_limit;
307 b->threshold_limit = new; 307 b->threshold_limit = new;
308 308
309 oldmask = affinity_set(b->cpu); 309 affinity_set(b->cpu, &oldmask, &newmask);
310 threshold_restart_bank(b, 0, old); 310 threshold_restart_bank(b, 0, old);
311 affinity_restore(oldmask); 311 affinity_restore(&oldmask);
312 312
313 return end - buf; 313 return end - buf;
314} 314}
@@ -316,10 +316,10 @@ static ssize_t store_threshold_limit(struct threshold_block *b,
316static ssize_t show_error_count(struct threshold_block *b, char *buf) 316static ssize_t show_error_count(struct threshold_block *b, char *buf)
317{ 317{
318 u32 high, low; 318 u32 high, low;
319 cpumask_t oldmask; 319 cpumask_t oldmask, newmask;
320 oldmask = affinity_set(b->cpu); 320 affinity_set(b->cpu, &oldmask, &newmask);
321 rdmsr(b->address, low, high); 321 rdmsr(b->address, low, high);
322 affinity_restore(oldmask); 322 affinity_restore(&oldmask);
323 return sprintf(buf, "%x\n", 323 return sprintf(buf, "%x\n",
324 (high & 0xFFF) - (THRESHOLD_MAX - b->threshold_limit)); 324 (high & 0xFFF) - (THRESHOLD_MAX - b->threshold_limit));
325} 325}
@@ -327,10 +327,10 @@ static ssize_t show_error_count(struct threshold_block *b, char *buf)
327static ssize_t store_error_count(struct threshold_block *b, 327static ssize_t store_error_count(struct threshold_block *b,
328 const char *buf, size_t count) 328 const char *buf, size_t count)
329{ 329{
330 cpumask_t oldmask; 330 cpumask_t oldmask, newmask;
331 oldmask = affinity_set(b->cpu); 331 affinity_set(b->cpu, &oldmask, &newmask);
332 threshold_restart_bank(b, 1, 0); 332 threshold_restart_bank(b, 1, 0);
333 affinity_restore(oldmask); 333 affinity_restore(&oldmask);
334 return 1; 334 return 1;
335} 335}
336 336
@@ -468,7 +468,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
468{ 468{
469 int i, err = 0; 469 int i, err = 0;
470 struct threshold_bank *b = NULL; 470 struct threshold_bank *b = NULL;
471 cpumask_t oldmask = CPU_MASK_NONE; 471 cpumask_t oldmask, newmask;
472 char name[32]; 472 char name[32];
473 473
474 sprintf(name, "threshold_bank%i", bank); 474 sprintf(name, "threshold_bank%i", bank);
@@ -519,10 +519,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
519 519
520 per_cpu(threshold_banks, cpu)[bank] = b; 520 per_cpu(threshold_banks, cpu)[bank] = b;
521 521
522 oldmask = affinity_set(cpu); 522 affinity_set(cpu, &oldmask, &newmask);
523 err = allocate_threshold_blocks(cpu, bank, 0, 523 err = allocate_threshold_blocks(cpu, bank, 0,
524 MSR_IA32_MC0_MISC + bank * 4); 524 MSR_IA32_MC0_MISC + bank * 4);
525 affinity_restore(oldmask); 525 affinity_restore(&oldmask);
526 526
527 if (err) 527 if (err)
528 goto out_free; 528 goto out_free;
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 9b7e01daa1ca..1f4cc48c14c6 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * linux/arch/i386/kernel/cpu/mcheck/therm_throt.c
3 * 2 *
4 * Thermal throttle event support code (such as syslog messaging and rate 3 * Thermal throttle event support code (such as syslog messaging and rate
5 * limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c). 4 * limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c).
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 0978a4a39418..0d0d9057e7c0 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -1,7 +1,6 @@
1#include <linux/smp.h> 1#include <linux/smp.h>
2#include <linux/timex.h> 2#include <linux/timex.h>
3#include <linux/string.h> 3#include <linux/string.h>
4#include <asm/semaphore.h>
5#include <linux/seq_file.h> 4#include <linux/seq_file.h>
6#include <linux/cpufreq.h> 5#include <linux/cpufreq.h>
7 6
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 288e7a6598ac..daff52a62248 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -154,12 +154,10 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
154 err = cpuid_device_create(cpu); 154 err = cpuid_device_create(cpu);
155 break; 155 break;
156 case CPU_UP_CANCELED: 156 case CPU_UP_CANCELED:
157 case CPU_UP_CANCELED_FROZEN:
157 case CPU_DEAD: 158 case CPU_DEAD:
158 cpuid_device_destroy(cpu); 159 cpuid_device_destroy(cpu);
159 break; 160 break;
160 case CPU_UP_CANCELED_FROZEN:
161 destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
162 break;
163 } 161 }
164 return err ? NOTIFY_BAD : NOTIFY_OK; 162 return err ? NOTIFY_BAD : NOTIFY_OK;
165} 163}
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c
index 0240cd778365..ed733e7cf4e6 100644
--- a/arch/x86/kernel/e820_32.c
+++ b/arch/x86/kernel/e820_32.c
@@ -475,7 +475,7 @@ int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
475/* 475/*
476 * Find the highest page frame number we have available 476 * Find the highest page frame number we have available
477 */ 477 */
478void __init find_max_pfn(void) 478void __init propagate_e820_map(void)
479{ 479{
480 int i; 480 int i;
481 481
@@ -704,7 +704,7 @@ static int __init parse_memmap(char *arg)
704 * size before original memory map is 704 * size before original memory map is
705 * reset. 705 * reset.
706 */ 706 */
707 find_max_pfn(); 707 propagate_e820_map();
708 saved_max_pfn = max_pfn; 708 saved_max_pfn = max_pfn;
709#endif 709#endif
710 e820.nr_map = 0; 710 e820.nr_map = 0;
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 7f6c0c85c8f6..cbd42e51cb08 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -96,7 +96,7 @@ void __init early_res_to_bootmem(void)
96} 96}
97 97
98/* Check for already reserved areas */ 98/* Check for already reserved areas */
99static inline int 99static inline int __init
100bad_addr(unsigned long *addrp, unsigned long size, unsigned long align) 100bad_addr(unsigned long *addrp, unsigned long size, unsigned long align)
101{ 101{
102 int i; 102 int i;
@@ -116,7 +116,7 @@ again:
116} 116}
117 117
118/* Check for already reserved areas */ 118/* Check for already reserved areas */
119static inline int 119static inline int __init
120bad_addr_size(unsigned long *addrp, unsigned long *sizep, unsigned long align) 120bad_addr_size(unsigned long *addrp, unsigned long *sizep, unsigned long align)
121{ 121{
122 int i; 122 int i;
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 759e02bec070..77d424cf68b3 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -383,6 +383,7 @@ static void __init runtime_code_page_mkexec(void)
383{ 383{
384 efi_memory_desc_t *md; 384 efi_memory_desc_t *md;
385 void *p; 385 void *p;
386 u64 addr, npages;
386 387
387 /* Make EFI runtime service code area executable */ 388 /* Make EFI runtime service code area executable */
388 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { 389 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
@@ -391,7 +392,10 @@ static void __init runtime_code_page_mkexec(void)
391 if (md->type != EFI_RUNTIME_SERVICES_CODE) 392 if (md->type != EFI_RUNTIME_SERVICES_CODE)
392 continue; 393 continue;
393 394
394 set_memory_x(md->virt_addr, md->num_pages); 395 addr = md->virt_addr;
396 npages = md->num_pages;
397 memrange_efi_to_native(&addr, &npages);
398 set_memory_x(addr, npages);
395 } 399 }
396} 400}
397 401
@@ -408,7 +412,7 @@ void __init efi_enter_virtual_mode(void)
408 efi_memory_desc_t *md; 412 efi_memory_desc_t *md;
409 efi_status_t status; 413 efi_status_t status;
410 unsigned long size; 414 unsigned long size;
411 u64 end, systab; 415 u64 end, systab, addr, npages;
412 void *p, *va; 416 void *p, *va;
413 417
414 efi.systab = NULL; 418 efi.systab = NULL;
@@ -420,7 +424,7 @@ void __init efi_enter_virtual_mode(void)
420 size = md->num_pages << EFI_PAGE_SHIFT; 424 size = md->num_pages << EFI_PAGE_SHIFT;
421 end = md->phys_addr + size; 425 end = md->phys_addr + size;
422 426
423 if ((end >> PAGE_SHIFT) <= max_pfn_mapped) 427 if (PFN_UP(end) <= max_pfn_mapped)
424 va = __va(md->phys_addr); 428 va = __va(md->phys_addr);
425 else 429 else
426 va = efi_ioremap(md->phys_addr, size); 430 va = efi_ioremap(md->phys_addr, size);
@@ -433,8 +437,12 @@ void __init efi_enter_virtual_mode(void)
433 continue; 437 continue;
434 } 438 }
435 439
436 if (!(md->attribute & EFI_MEMORY_WB)) 440 if (!(md->attribute & EFI_MEMORY_WB)) {
437 set_memory_uc(md->virt_addr, md->num_pages); 441 addr = md->virt_addr;
442 npages = md->num_pages;
443 memrange_efi_to_native(&addr, &npages);
444 set_memory_uc(addr, npages);
445 }
438 446
439 systab = (u64) (unsigned long) efi_phys.systab; 447 systab = (u64) (unsigned long) efi_phys.systab;
440 if (md->phys_addr <= systab && systab < end) { 448 if (md->phys_addr <= systab && systab < end) {
diff --git a/arch/x86/kernel/efi_64.c b/arch/x86/kernel/efi_64.c
index d143a1e76b30..d0060fdcccac 100644
--- a/arch/x86/kernel/efi_64.c
+++ b/arch/x86/kernel/efi_64.c
@@ -105,14 +105,14 @@ void __init efi_reserve_bootmem(void)
105 105
106void __iomem * __init efi_ioremap(unsigned long phys_addr, unsigned long size) 106void __iomem * __init efi_ioremap(unsigned long phys_addr, unsigned long size)
107{ 107{
108 static unsigned pages_mapped; 108 static unsigned pages_mapped __initdata;
109 unsigned i, pages; 109 unsigned i, pages;
110 unsigned long offset;
110 111
111 /* phys_addr and size must be page aligned */ 112 pages = PFN_UP(phys_addr + size) - PFN_DOWN(phys_addr);
112 if ((phys_addr & ~PAGE_MASK) || (size & ~PAGE_MASK)) 113 offset = phys_addr & ~PAGE_MASK;
113 return NULL; 114 phys_addr &= PAGE_MASK;
114 115
115 pages = size >> PAGE_SHIFT;
116 if (pages_mapped + pages > MAX_EFI_IO_PAGES) 116 if (pages_mapped + pages > MAX_EFI_IO_PAGES)
117 return NULL; 117 return NULL;
118 118
@@ -124,5 +124,5 @@ void __iomem * __init efi_ioremap(unsigned long phys_addr, unsigned long size)
124 } 124 }
125 125
126 return (void __iomem *)__fix_to_virt(FIX_EFI_IO_MAP_FIRST_PAGE - \ 126 return (void __iomem *)__fix_to_virt(FIX_EFI_IO_MAP_FIRST_PAGE - \
127 (pages_mapped - pages)); 127 (pages_mapped - pages)) + offset;
128} 128}
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 9ba49a26dff8..f0f8934fc303 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1,5 +1,4 @@
1/* 1/*
2 * linux/arch/i386/entry.S
3 * 2 *
4 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 4 */
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 5d77c9cd8e15..ebf13908a743 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -61,26 +61,31 @@ int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip)
61 val = (1UL << UVH_IPI_INT_SEND_SHFT) | 61 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
62 (phys_apicid << UVH_IPI_INT_APIC_ID_SHFT) | 62 (phys_apicid << UVH_IPI_INT_APIC_ID_SHFT) |
63 (((long)start_rip << UVH_IPI_INT_VECTOR_SHFT) >> 12) | 63 (((long)start_rip << UVH_IPI_INT_VECTOR_SHFT) >> 12) |
64 (6 << UVH_IPI_INT_DELIVERY_MODE_SHFT); 64 APIC_DM_INIT;
65 uv_write_global_mmr64(nasid, UVH_IPI_INT, val);
66 mdelay(10);
67
68 val = (1UL << UVH_IPI_INT_SEND_SHFT) |
69 (phys_apicid << UVH_IPI_INT_APIC_ID_SHFT) |
70 (((long)start_rip << UVH_IPI_INT_VECTOR_SHFT) >> 12) |
71 APIC_DM_STARTUP;
65 uv_write_global_mmr64(nasid, UVH_IPI_INT, val); 72 uv_write_global_mmr64(nasid, UVH_IPI_INT, val);
66 return 0; 73 return 0;
67} 74}
68 75
69static void uv_send_IPI_one(int cpu, int vector) 76static void uv_send_IPI_one(int cpu, int vector)
70{ 77{
71 unsigned long val, apicid; 78 unsigned long val, apicid, lapicid;
72 int nasid; 79 int nasid;
73 80
74 apicid = per_cpu(x86_cpu_to_apicid, cpu); /* ZZZ - cache node-local ? */ 81 apicid = per_cpu(x86_cpu_to_apicid, cpu); /* ZZZ - cache node-local ? */
82 lapicid = apicid & 0x3f; /* ZZZ macro needed */
75 nasid = uv_apicid_to_nasid(apicid); 83 nasid = uv_apicid_to_nasid(apicid);
76 val = 84 val =
77 (1UL << UVH_IPI_INT_SEND_SHFT) | (apicid << 85 (1UL << UVH_IPI_INT_SEND_SHFT) | (lapicid <<
78 UVH_IPI_INT_APIC_ID_SHFT) | 86 UVH_IPI_INT_APIC_ID_SHFT) |
79 (vector << UVH_IPI_INT_VECTOR_SHFT); 87 (vector << UVH_IPI_INT_VECTOR_SHFT);
80 uv_write_global_mmr64(nasid, UVH_IPI_INT, val); 88 uv_write_global_mmr64(nasid, UVH_IPI_INT, val);
81 printk(KERN_DEBUG
82 "UV: IPI to cpu %d, apicid 0x%lx, vec %d, nasid%d, val 0x%lx\n",
83 cpu, apicid, vector, nasid, val);
84} 89}
85 90
86static void uv_send_IPI_mask(cpumask_t mask, int vector) 91static void uv_send_IPI_mask(cpumask_t mask, int vector)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index d6d54faa84df..993c76773256 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -146,6 +146,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
146 146
147 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); 147 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");
148 148
149#ifdef CONFIG_BLK_DEV_INITRD
149 /* Reserve INITRD */ 150 /* Reserve INITRD */
150 if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { 151 if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
151 unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; 152 unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
@@ -153,6 +154,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
153 unsigned long ramdisk_end = ramdisk_image + ramdisk_size; 154 unsigned long ramdisk_end = ramdisk_image + ramdisk_size;
154 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 155 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
155 } 156 }
157#endif
156 158
157 reserve_ebda_region(); 159 reserve_ebda_region();
158 160
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 826988a6e964..90f038af3adc 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -1,5 +1,4 @@
1/* 1/*
2 * linux/arch/i386/kernel/head.S -- the 32-bit startup code.
3 * 2 *
4 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 1991, 1992 Linus Torvalds
5 * 4 *
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 8f8102d967b3..db6839b53195 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -35,17 +35,18 @@
35#endif 35#endif
36 36
37static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; 37static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu;
38unsigned int xstate_size;
39static struct i387_fxsave_struct fx_scratch __cpuinitdata;
38 40
39void mxcsr_feature_mask_init(void) 41void __cpuinit mxcsr_feature_mask_init(void)
40{ 42{
41 unsigned long mask = 0; 43 unsigned long mask = 0;
42 44
43 clts(); 45 clts();
44 if (cpu_has_fxsr) { 46 if (cpu_has_fxsr) {
45 memset(&current->thread.i387.fxsave, 0, 47 memset(&fx_scratch, 0, sizeof(struct i387_fxsave_struct));
46 sizeof(struct i387_fxsave_struct)); 48 asm volatile("fxsave %0" : : "m" (fx_scratch));
47 asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave)); 49 mask = fx_scratch.mxcsr_mask;
48 mask = current->thread.i387.fxsave.mxcsr_mask;
49 if (mask == 0) 50 if (mask == 0)
50 mask = 0x0000ffbf; 51 mask = 0x0000ffbf;
51 } 52 }
@@ -53,6 +54,16 @@ void mxcsr_feature_mask_init(void)
53 stts(); 54 stts();
54} 55}
55 56
57void __init init_thread_xstate(void)
58{
59 if (cpu_has_fxsr)
60 xstate_size = sizeof(struct i387_fxsave_struct);
61#ifdef CONFIG_X86_32
62 else
63 xstate_size = sizeof(struct i387_fsave_struct);
64#endif
65}
66
56#ifdef CONFIG_X86_64 67#ifdef CONFIG_X86_64
57/* 68/*
58 * Called at bootup to set up the initial FPU state that is later cloned 69 * Called at bootup to set up the initial FPU state that is later cloned
@@ -61,10 +72,6 @@ void mxcsr_feature_mask_init(void)
61void __cpuinit fpu_init(void) 72void __cpuinit fpu_init(void)
62{ 73{
63 unsigned long oldcr0 = read_cr0(); 74 unsigned long oldcr0 = read_cr0();
64 extern void __bad_fxsave_alignment(void);
65
66 if (offsetof(struct task_struct, thread.i387.fxsave) & 15)
67 __bad_fxsave_alignment();
68 75
69 set_in_cr4(X86_CR4_OSFXSR); 76 set_in_cr4(X86_CR4_OSFXSR);
70 set_in_cr4(X86_CR4_OSXMMEXCPT); 77 set_in_cr4(X86_CR4_OSXMMEXCPT);
@@ -84,32 +91,44 @@ void __cpuinit fpu_init(void)
84 * value at reset if we support XMM instructions and then 91 * value at reset if we support XMM instructions and then
85 * remeber the current task has used the FPU. 92 * remeber the current task has used the FPU.
86 */ 93 */
87void init_fpu(struct task_struct *tsk) 94int init_fpu(struct task_struct *tsk)
88{ 95{
89 if (tsk_used_math(tsk)) { 96 if (tsk_used_math(tsk)) {
90 if (tsk == current) 97 if (tsk == current)
91 unlazy_fpu(tsk); 98 unlazy_fpu(tsk);
92 return; 99 return 0;
100 }
101
102 /*
103 * Memory allocation at the first usage of the FPU and other state.
104 */
105 if (!tsk->thread.xstate) {
106 tsk->thread.xstate = kmem_cache_alloc(task_xstate_cachep,
107 GFP_KERNEL);
108 if (!tsk->thread.xstate)
109 return -ENOMEM;
93 } 110 }
94 111
95 if (cpu_has_fxsr) { 112 if (cpu_has_fxsr) {
96 memset(&tsk->thread.i387.fxsave, 0, 113 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
97 sizeof(struct i387_fxsave_struct)); 114
98 tsk->thread.i387.fxsave.cwd = 0x37f; 115 memset(fx, 0, xstate_size);
116 fx->cwd = 0x37f;
99 if (cpu_has_xmm) 117 if (cpu_has_xmm)
100 tsk->thread.i387.fxsave.mxcsr = MXCSR_DEFAULT; 118 fx->mxcsr = MXCSR_DEFAULT;
101 } else { 119 } else {
102 memset(&tsk->thread.i387.fsave, 0, 120 struct i387_fsave_struct *fp = &tsk->thread.xstate->fsave;
103 sizeof(struct i387_fsave_struct)); 121 memset(fp, 0, xstate_size);
104 tsk->thread.i387.fsave.cwd = 0xffff037fu; 122 fp->cwd = 0xffff037fu;
105 tsk->thread.i387.fsave.swd = 0xffff0000u; 123 fp->swd = 0xffff0000u;
106 tsk->thread.i387.fsave.twd = 0xffffffffu; 124 fp->twd = 0xffffffffu;
107 tsk->thread.i387.fsave.fos = 0xffff0000u; 125 fp->fos = 0xffff0000u;
108 } 126 }
109 /* 127 /*
110 * Only the device not available exception or ptrace can call init_fpu. 128 * Only the device not available exception or ptrace can call init_fpu.
111 */ 129 */
112 set_stopped_child_used_math(tsk); 130 set_stopped_child_used_math(tsk);
131 return 0;
113} 132}
114 133
115int fpregs_active(struct task_struct *target, const struct user_regset *regset) 134int fpregs_active(struct task_struct *target, const struct user_regset *regset)
@@ -126,13 +145,17 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
126 unsigned int pos, unsigned int count, 145 unsigned int pos, unsigned int count,
127 void *kbuf, void __user *ubuf) 146 void *kbuf, void __user *ubuf)
128{ 147{
148 int ret;
149
129 if (!cpu_has_fxsr) 150 if (!cpu_has_fxsr)
130 return -ENODEV; 151 return -ENODEV;
131 152
132 init_fpu(target); 153 ret = init_fpu(target);
154 if (ret)
155 return ret;
133 156
134 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, 157 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
135 &target->thread.i387.fxsave, 0, -1); 158 &target->thread.xstate->fxsave, 0, -1);
136} 159}
137 160
138int xfpregs_set(struct task_struct *target, const struct user_regset *regset, 161int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
@@ -144,16 +167,19 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
144 if (!cpu_has_fxsr) 167 if (!cpu_has_fxsr)
145 return -ENODEV; 168 return -ENODEV;
146 169
147 init_fpu(target); 170 ret = init_fpu(target);
171 if (ret)
172 return ret;
173
148 set_stopped_child_used_math(target); 174 set_stopped_child_used_math(target);
149 175
150 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 176 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
151 &target->thread.i387.fxsave, 0, -1); 177 &target->thread.xstate->fxsave, 0, -1);
152 178
153 /* 179 /*
154 * mxcsr reserved bits must be masked to zero for security reasons. 180 * mxcsr reserved bits must be masked to zero for security reasons.
155 */ 181 */
156 target->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask; 182 target->thread.xstate->fxsave.mxcsr &= mxcsr_feature_mask;
157 183
158 return ret; 184 return ret;
159} 185}
@@ -233,7 +259,7 @@ static inline u32 twd_fxsr_to_i387(struct i387_fxsave_struct *fxsave)
233static void 259static void
234convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk) 260convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk)
235{ 261{
236 struct i387_fxsave_struct *fxsave = &tsk->thread.i387.fxsave; 262 struct i387_fxsave_struct *fxsave = &tsk->thread.xstate->fxsave;
237 struct _fpreg *to = (struct _fpreg *) &env->st_space[0]; 263 struct _fpreg *to = (struct _fpreg *) &env->st_space[0];
238 struct _fpxreg *from = (struct _fpxreg *) &fxsave->st_space[0]; 264 struct _fpxreg *from = (struct _fpxreg *) &fxsave->st_space[0];
239 int i; 265 int i;
@@ -273,7 +299,7 @@ static void convert_to_fxsr(struct task_struct *tsk,
273 const struct user_i387_ia32_struct *env) 299 const struct user_i387_ia32_struct *env)
274 300
275{ 301{
276 struct i387_fxsave_struct *fxsave = &tsk->thread.i387.fxsave; 302 struct i387_fxsave_struct *fxsave = &tsk->thread.xstate->fxsave;
277 struct _fpreg *from = (struct _fpreg *) &env->st_space[0]; 303 struct _fpreg *from = (struct _fpreg *) &env->st_space[0];
278 struct _fpxreg *to = (struct _fpxreg *) &fxsave->st_space[0]; 304 struct _fpxreg *to = (struct _fpxreg *) &fxsave->st_space[0];
279 int i; 305 int i;
@@ -302,15 +328,19 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset,
302 void *kbuf, void __user *ubuf) 328 void *kbuf, void __user *ubuf)
303{ 329{
304 struct user_i387_ia32_struct env; 330 struct user_i387_ia32_struct env;
331 int ret;
305 332
306 if (!HAVE_HWFP) 333 if (!HAVE_HWFP)
307 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); 334 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);
308 335
309 init_fpu(target); 336 ret = init_fpu(target);
337 if (ret)
338 return ret;
310 339
311 if (!cpu_has_fxsr) { 340 if (!cpu_has_fxsr) {
312 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, 341 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
313 &target->thread.i387.fsave, 0, -1); 342 &target->thread.xstate->fsave, 0,
343 -1);
314 } 344 }
315 345
316 if (kbuf && pos == 0 && count == sizeof(env)) { 346 if (kbuf && pos == 0 && count == sizeof(env)) {
@@ -333,12 +363,15 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
333 if (!HAVE_HWFP) 363 if (!HAVE_HWFP)
334 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); 364 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
335 365
336 init_fpu(target); 366 ret = init_fpu(target);
367 if (ret)
368 return ret;
369
337 set_stopped_child_used_math(target); 370 set_stopped_child_used_math(target);
338 371
339 if (!cpu_has_fxsr) { 372 if (!cpu_has_fxsr) {
340 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, 373 return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
341 &target->thread.i387.fsave, 0, -1); 374 &target->thread.xstate->fsave, 0, -1);
342 } 375 }
343 376
344 if (pos > 0 || count < sizeof(env)) 377 if (pos > 0 || count < sizeof(env))
@@ -358,11 +391,11 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
358static inline int save_i387_fsave(struct _fpstate_ia32 __user *buf) 391static inline int save_i387_fsave(struct _fpstate_ia32 __user *buf)
359{ 392{
360 struct task_struct *tsk = current; 393 struct task_struct *tsk = current;
394 struct i387_fsave_struct *fp = &tsk->thread.xstate->fsave;
361 395
362 unlazy_fpu(tsk); 396 unlazy_fpu(tsk);
363 tsk->thread.i387.fsave.status = tsk->thread.i387.fsave.swd; 397 fp->status = fp->swd;
364 if (__copy_to_user(buf, &tsk->thread.i387.fsave, 398 if (__copy_to_user(buf, fp, sizeof(struct i387_fsave_struct)))
365 sizeof(struct i387_fsave_struct)))
366 return -1; 399 return -1;
367 return 1; 400 return 1;
368} 401}
@@ -370,6 +403,7 @@ static inline int save_i387_fsave(struct _fpstate_ia32 __user *buf)
370static int save_i387_fxsave(struct _fpstate_ia32 __user *buf) 403static int save_i387_fxsave(struct _fpstate_ia32 __user *buf)
371{ 404{
372 struct task_struct *tsk = current; 405 struct task_struct *tsk = current;
406 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
373 struct user_i387_ia32_struct env; 407 struct user_i387_ia32_struct env;
374 int err = 0; 408 int err = 0;
375 409
@@ -379,12 +413,12 @@ static int save_i387_fxsave(struct _fpstate_ia32 __user *buf)
379 if (__copy_to_user(buf, &env, sizeof(env))) 413 if (__copy_to_user(buf, &env, sizeof(env)))
380 return -1; 414 return -1;
381 415
382 err |= __put_user(tsk->thread.i387.fxsave.swd, &buf->status); 416 err |= __put_user(fx->swd, &buf->status);
383 err |= __put_user(X86_FXSR_MAGIC, &buf->magic); 417 err |= __put_user(X86_FXSR_MAGIC, &buf->magic);
384 if (err) 418 if (err)
385 return -1; 419 return -1;
386 420
387 if (__copy_to_user(&buf->_fxsr_env[0], &tsk->thread.i387.fxsave, 421 if (__copy_to_user(&buf->_fxsr_env[0], fx,
388 sizeof(struct i387_fxsave_struct))) 422 sizeof(struct i387_fxsave_struct)))
389 return -1; 423 return -1;
390 return 1; 424 return 1;
@@ -417,7 +451,7 @@ static inline int restore_i387_fsave(struct _fpstate_ia32 __user *buf)
417 struct task_struct *tsk = current; 451 struct task_struct *tsk = current;
418 452
419 clear_fpu(tsk); 453 clear_fpu(tsk);
420 return __copy_from_user(&tsk->thread.i387.fsave, buf, 454 return __copy_from_user(&tsk->thread.xstate->fsave, buf,
421 sizeof(struct i387_fsave_struct)); 455 sizeof(struct i387_fsave_struct));
422} 456}
423 457
@@ -428,10 +462,10 @@ static int restore_i387_fxsave(struct _fpstate_ia32 __user *buf)
428 int err; 462 int err;
429 463
430 clear_fpu(tsk); 464 clear_fpu(tsk);
431 err = __copy_from_user(&tsk->thread.i387.fxsave, &buf->_fxsr_env[0], 465 err = __copy_from_user(&tsk->thread.xstate->fxsave, &buf->_fxsr_env[0],
432 sizeof(struct i387_fxsave_struct)); 466 sizeof(struct i387_fxsave_struct));
433 /* mxcsr reserved bits must be masked to zero for security reasons */ 467 /* mxcsr reserved bits must be masked to zero for security reasons */
434 tsk->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask; 468 tsk->thread.xstate->fxsave.mxcsr &= mxcsr_feature_mask;
435 if (err || __copy_from_user(&env, buf, sizeof(env))) 469 if (err || __copy_from_user(&env, buf, sizeof(env)))
436 return 1; 470 return 1;
437 convert_to_fxsr(tsk, &env); 471 convert_to_fxsr(tsk, &env);
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index b54464b26658..9ba11d07920f 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -785,7 +785,7 @@ static void __clear_irq_vector(int irq)
785 per_cpu(vector_irq, cpu)[vector] = -1; 785 per_cpu(vector_irq, cpu)[vector] = -1;
786 786
787 cfg->vector = 0; 787 cfg->vector = 0;
788 cfg->domain = CPU_MASK_NONE; 788 cpus_clear(cfg->domain);
789} 789}
790 790
791void __setup_vector_irq(int cpu) 791void __setup_vector_irq(int cpu)
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 24362ecf5f9a..f47f0eb886b8 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -46,11 +46,7 @@
46#include <asm/apicdef.h> 46#include <asm/apicdef.h>
47#include <asm/system.h> 47#include <asm/system.h>
48 48
49#ifdef CONFIG_X86_32 49#include <mach_ipi.h>
50# include <mach_ipi.h>
51#else
52# include <asm/mach_apic.h>
53#endif
54 50
55/* 51/*
56 * Put the error code here just in case the user cares: 52 * Put the error code here just in case the user cares:
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 25cf6dee4e56..69729e38b78a 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -402,7 +402,7 @@ static int do_microcode_update (void)
402 402
403 if (!uci->valid) 403 if (!uci->valid)
404 continue; 404 continue;
405 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 405 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
406 error = get_maching_microcode(new_mc, cpu); 406 error = get_maching_microcode(new_mc, cpu);
407 if (error < 0) 407 if (error < 0)
408 goto out; 408 goto out;
@@ -416,7 +416,7 @@ out:
416 vfree(new_mc); 416 vfree(new_mc);
417 if (cursor < 0) 417 if (cursor < 0)
418 error = cursor; 418 error = cursor;
419 set_cpus_allowed(current, old); 419 set_cpus_allowed_ptr(current, &old);
420 return error; 420 return error;
421} 421}
422 422
@@ -579,7 +579,7 @@ static int apply_microcode_check_cpu(int cpu)
579 return 0; 579 return 0;
580 580
581 old = current->cpus_allowed; 581 old = current->cpus_allowed;
582 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 582 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
583 583
584 /* Check if the microcode we have in memory matches the CPU */ 584 /* Check if the microcode we have in memory matches the CPU */
585 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || 585 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
@@ -610,7 +610,7 @@ static int apply_microcode_check_cpu(int cpu)
610 " sig=0x%x, pf=0x%x, rev=0x%x\n", 610 " sig=0x%x, pf=0x%x, rev=0x%x\n",
611 cpu, uci->sig, uci->pf, uci->rev); 611 cpu, uci->sig, uci->pf, uci->rev);
612 612
613 set_cpus_allowed(current, old); 613 set_cpus_allowed_ptr(current, &old);
614 return err; 614 return err;
615} 615}
616 616
@@ -621,13 +621,13 @@ static void microcode_init_cpu(int cpu, int resume)
621 621
622 old = current->cpus_allowed; 622 old = current->cpus_allowed;
623 623
624 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 624 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
625 mutex_lock(&microcode_mutex); 625 mutex_lock(&microcode_mutex);
626 collect_cpu_info(cpu); 626 collect_cpu_info(cpu);
627 if (uci->valid && system_state == SYSTEM_RUNNING && !resume) 627 if (uci->valid && system_state == SYSTEM_RUNNING && !resume)
628 cpu_request_microcode(cpu); 628 cpu_request_microcode(cpu);
629 mutex_unlock(&microcode_mutex); 629 mutex_unlock(&microcode_mutex);
630 set_cpus_allowed(current, old); 630 set_cpus_allowed_ptr(current, &old);
631} 631}
632 632
633static void microcode_fini_cpu(int cpu) 633static void microcode_fini_cpu(int cpu)
@@ -657,14 +657,14 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz)
657 old = current->cpus_allowed; 657 old = current->cpus_allowed;
658 658
659 get_online_cpus(); 659 get_online_cpus();
660 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 660 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
661 661
662 mutex_lock(&microcode_mutex); 662 mutex_lock(&microcode_mutex);
663 if (uci->valid) 663 if (uci->valid)
664 err = cpu_request_microcode(cpu); 664 err = cpu_request_microcode(cpu);
665 mutex_unlock(&microcode_mutex); 665 mutex_unlock(&microcode_mutex);
666 put_online_cpus(); 666 put_online_cpus();
667 set_cpus_allowed(current, old); 667 set_cpus_allowed_ptr(current, &old);
668 } 668 }
669 if (err) 669 if (err)
670 return err; 670 return err;
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 4dfb40530057..1f3abe048e93 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -162,12 +162,10 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
162 err = msr_device_create(cpu); 162 err = msr_device_create(cpu);
163 break; 163 break;
164 case CPU_UP_CANCELED: 164 case CPU_UP_CANCELED:
165 case CPU_UP_CANCELED_FROZEN:
165 case CPU_DEAD: 166 case CPU_DEAD:
166 msr_device_destroy(cpu); 167 msr_device_destroy(cpu);
167 break; 168 break;
168 case CPU_UP_CANCELED_FROZEN:
169 destroy_suspended_device(msr_class, MKDEV(MSR_MAJOR, cpu));
170 break;
171 } 169 }
172 return err ? NOTIFY_BAD : NOTIFY_OK; 170 return err ? NOTIFY_BAD : NOTIFY_OK;
173} 171}
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index 8421d0ac6f22..11b14bbaa61e 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -321,7 +321,8 @@ EXPORT_SYMBOL(touch_nmi_watchdog);
321 321
322extern void die_nmi(struct pt_regs *, const char *msg); 322extern void die_nmi(struct pt_regs *, const char *msg);
323 323
324__kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) 324notrace __kprobes int
325nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
325{ 326{
326 327
327 /* 328 /*
diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c
index 11f9130ac513..5a29ded994fa 100644
--- a/arch/x86/kernel/nmi_64.c
+++ b/arch/x86/kernel/nmi_64.c
@@ -313,7 +313,8 @@ void touch_nmi_watchdog(void)
313} 313}
314EXPORT_SYMBOL(touch_nmi_watchdog); 314EXPORT_SYMBOL(touch_nmi_watchdog);
315 315
316int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) 316notrace __kprobes int
317nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
317{ 318{
318 int sum; 319 int sum;
319 int touched = 0; 320 int touched = 0;
@@ -384,7 +385,8 @@ int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
384 385
385static unsigned ignore_nmis; 386static unsigned ignore_nmis;
386 387
387asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) 388asmlinkage notrace __kprobes void
389do_nmi(struct pt_regs *regs, long error_code)
388{ 390{
389 nmi_enter(); 391 nmi_enter();
390 add_pda(__nmi_count,1); 392 add_pda(__nmi_count,1);
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 1b5464c2434f..adb91e4b62da 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -470,10 +470,11 @@ error:
470 return 0; 470 return 0;
471} 471}
472 472
473static dma_addr_t calgary_map_single(struct device *dev, void *vaddr, 473static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr,
474 size_t size, int direction) 474 size_t size, int direction)
475{ 475{
476 dma_addr_t dma_handle = bad_dma_address; 476 dma_addr_t dma_handle = bad_dma_address;
477 void *vaddr = phys_to_virt(paddr);
477 unsigned long uaddr; 478 unsigned long uaddr;
478 unsigned int npages; 479 unsigned int npages;
479 struct iommu_table *tbl = find_iommu_table(dev); 480 struct iommu_table *tbl = find_iommu_table(dev);
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma.c
index ada5a0604992..388b113a7d88 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -1,61 +1,370 @@
1/* 1#include <linux/dma-mapping.h>
2 * Dynamic DMA mapping support.
3 */
4
5#include <linux/types.h>
6#include <linux/mm.h>
7#include <linux/string.h>
8#include <linux/pci.h>
9#include <linux/module.h>
10#include <linux/dmar.h> 2#include <linux/dmar.h>
11#include <asm/io.h> 3#include <linux/bootmem.h>
4#include <linux/pci.h>
5
6#include <asm/proto.h>
7#include <asm/dma.h>
12#include <asm/gart.h> 8#include <asm/gart.h>
13#include <asm/calgary.h> 9#include <asm/calgary.h>
14 10
15int iommu_merge __read_mostly = 0; 11int forbid_dac __read_mostly;
16 12EXPORT_SYMBOL(forbid_dac);
17dma_addr_t bad_dma_address __read_mostly;
18EXPORT_SYMBOL(bad_dma_address);
19 13
20/* This tells the BIO block layer to assume merging. Default to off 14const struct dma_mapping_ops *dma_ops;
21 because we cannot guarantee merging later. */ 15EXPORT_SYMBOL(dma_ops);
22int iommu_bio_merge __read_mostly = 0;
23EXPORT_SYMBOL(iommu_bio_merge);
24 16
25static int iommu_sac_force __read_mostly = 0; 17int iommu_sac_force __read_mostly = 0;
26 18
27int no_iommu __read_mostly;
28#ifdef CONFIG_IOMMU_DEBUG 19#ifdef CONFIG_IOMMU_DEBUG
29int panic_on_overflow __read_mostly = 1; 20int panic_on_overflow __read_mostly = 1;
30int force_iommu __read_mostly = 1; 21int force_iommu __read_mostly = 1;
31#else 22#else
32int panic_on_overflow __read_mostly = 0; 23int panic_on_overflow __read_mostly = 0;
33int force_iommu __read_mostly= 0; 24int force_iommu __read_mostly = 0;
34#endif 25#endif
35 26
27int iommu_merge __read_mostly = 0;
28
29int no_iommu __read_mostly;
36/* Set this to 1 if there is a HW IOMMU in the system */ 30/* Set this to 1 if there is a HW IOMMU in the system */
37int iommu_detected __read_mostly = 0; 31int iommu_detected __read_mostly = 0;
38 32
33/* This tells the BIO block layer to assume merging. Default to off
34 because we cannot guarantee merging later. */
35int iommu_bio_merge __read_mostly = 0;
36EXPORT_SYMBOL(iommu_bio_merge);
37
38dma_addr_t bad_dma_address __read_mostly = 0;
39EXPORT_SYMBOL(bad_dma_address);
40
39/* Dummy device used for NULL arguments (normally ISA). Better would 41/* Dummy device used for NULL arguments (normally ISA). Better would
40 be probably a smaller DMA mask, but this is bug-to-bug compatible 42 be probably a smaller DMA mask, but this is bug-to-bug compatible
41 to i386. */ 43 to older i386. */
42struct device fallback_dev = { 44struct device fallback_dev = {
43 .bus_id = "fallback device", 45 .bus_id = "fallback device",
44 .coherent_dma_mask = DMA_32BIT_MASK, 46 .coherent_dma_mask = DMA_32BIT_MASK,
45 .dma_mask = &fallback_dev.coherent_dma_mask, 47 .dma_mask = &fallback_dev.coherent_dma_mask,
46}; 48};
47 49
50int dma_set_mask(struct device *dev, u64 mask)
51{
52 if (!dev->dma_mask || !dma_supported(dev, mask))
53 return -EIO;
54
55 *dev->dma_mask = mask;
56
57 return 0;
58}
59EXPORT_SYMBOL(dma_set_mask);
60
61#ifdef CONFIG_X86_64
62static __initdata void *dma32_bootmem_ptr;
63static unsigned long dma32_bootmem_size __initdata = (128ULL<<20);
64
65static int __init parse_dma32_size_opt(char *p)
66{
67 if (!p)
68 return -EINVAL;
69 dma32_bootmem_size = memparse(p, &p);
70 return 0;
71}
72early_param("dma32_size", parse_dma32_size_opt);
73
74void __init dma32_reserve_bootmem(void)
75{
76 unsigned long size, align;
77 if (end_pfn <= MAX_DMA32_PFN)
78 return;
79
80 align = 64ULL<<20;
81 size = round_up(dma32_bootmem_size, align);
82 dma32_bootmem_ptr = __alloc_bootmem_nopanic(size, align,
83 __pa(MAX_DMA_ADDRESS));
84 if (dma32_bootmem_ptr)
85 dma32_bootmem_size = size;
86 else
87 dma32_bootmem_size = 0;
88}
89static void __init dma32_free_bootmem(void)
90{
91 int node;
92
93 if (end_pfn <= MAX_DMA32_PFN)
94 return;
95
96 if (!dma32_bootmem_ptr)
97 return;
98
99 for_each_online_node(node)
100 free_bootmem_node(NODE_DATA(node), __pa(dma32_bootmem_ptr),
101 dma32_bootmem_size);
102
103 dma32_bootmem_ptr = NULL;
104 dma32_bootmem_size = 0;
105}
106
107void __init pci_iommu_alloc(void)
108{
109 /* free the range so iommu could get some range less than 4G */
110 dma32_free_bootmem();
111 /*
112 * The order of these functions is important for
113 * fall-back/fail-over reasons
114 */
115#ifdef CONFIG_GART_IOMMU
116 gart_iommu_hole_init();
117#endif
118
119#ifdef CONFIG_CALGARY_IOMMU
120 detect_calgary();
121#endif
122
123 detect_intel_iommu();
124
125#ifdef CONFIG_SWIOTLB
126 pci_swiotlb_init();
127#endif
128}
129#endif
130
131/*
132 * See <Documentation/x86_64/boot-options.txt> for the iommu kernel parameter
133 * documentation.
134 */
135static __init int iommu_setup(char *p)
136{
137 iommu_merge = 1;
138
139 if (!p)
140 return -EINVAL;
141
142 while (*p) {
143 if (!strncmp(p, "off", 3))
144 no_iommu = 1;
145 /* gart_parse_options has more force support */
146 if (!strncmp(p, "force", 5))
147 force_iommu = 1;
148 if (!strncmp(p, "noforce", 7)) {
149 iommu_merge = 0;
150 force_iommu = 0;
151 }
152
153 if (!strncmp(p, "biomerge", 8)) {
154 iommu_bio_merge = 4096;
155 iommu_merge = 1;
156 force_iommu = 1;
157 }
158 if (!strncmp(p, "panic", 5))
159 panic_on_overflow = 1;
160 if (!strncmp(p, "nopanic", 7))
161 panic_on_overflow = 0;
162 if (!strncmp(p, "merge", 5)) {
163 iommu_merge = 1;
164 force_iommu = 1;
165 }
166 if (!strncmp(p, "nomerge", 7))
167 iommu_merge = 0;
168 if (!strncmp(p, "forcesac", 8))
169 iommu_sac_force = 1;
170 if (!strncmp(p, "allowdac", 8))
171 forbid_dac = 0;
172 if (!strncmp(p, "nodac", 5))
173 forbid_dac = -1;
174 if (!strncmp(p, "usedac", 6)) {
175 forbid_dac = -1;
176 return 1;
177 }
178#ifdef CONFIG_SWIOTLB
179 if (!strncmp(p, "soft", 4))
180 swiotlb = 1;
181#endif
182
183#ifdef CONFIG_GART_IOMMU
184 gart_parse_options(p);
185#endif
186
187#ifdef CONFIG_CALGARY_IOMMU
188 if (!strncmp(p, "calgary", 7))
189 use_calgary = 1;
190#endif /* CONFIG_CALGARY_IOMMU */
191
192 p += strcspn(p, ",");
193 if (*p == ',')
194 ++p;
195 }
196 return 0;
197}
198early_param("iommu", iommu_setup);
199
200#ifdef CONFIG_X86_32
201int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
202 dma_addr_t device_addr, size_t size, int flags)
203{
204 void __iomem *mem_base = NULL;
205 int pages = size >> PAGE_SHIFT;
206 int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long);
207
208 if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
209 goto out;
210 if (!size)
211 goto out;
212 if (dev->dma_mem)
213 goto out;
214
215 /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
216
217 mem_base = ioremap(bus_addr, size);
218 if (!mem_base)
219 goto out;
220
221 dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
222 if (!dev->dma_mem)
223 goto out;
224 dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
225 if (!dev->dma_mem->bitmap)
226 goto free1_out;
227
228 dev->dma_mem->virt_base = mem_base;
229 dev->dma_mem->device_base = device_addr;
230 dev->dma_mem->size = pages;
231 dev->dma_mem->flags = flags;
232
233 if (flags & DMA_MEMORY_MAP)
234 return DMA_MEMORY_MAP;
235
236 return DMA_MEMORY_IO;
237
238 free1_out:
239 kfree(dev->dma_mem);
240 out:
241 if (mem_base)
242 iounmap(mem_base);
243 return 0;
244}
245EXPORT_SYMBOL(dma_declare_coherent_memory);
246
247void dma_release_declared_memory(struct device *dev)
248{
249 struct dma_coherent_mem *mem = dev->dma_mem;
250
251 if (!mem)
252 return;
253 dev->dma_mem = NULL;
254 iounmap(mem->virt_base);
255 kfree(mem->bitmap);
256 kfree(mem);
257}
258EXPORT_SYMBOL(dma_release_declared_memory);
259
260void *dma_mark_declared_memory_occupied(struct device *dev,
261 dma_addr_t device_addr, size_t size)
262{
263 struct dma_coherent_mem *mem = dev->dma_mem;
264 int pos, err;
265 int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1);
266
267 pages >>= PAGE_SHIFT;
268
269 if (!mem)
270 return ERR_PTR(-EINVAL);
271
272 pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
273 err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
274 if (err != 0)
275 return ERR_PTR(err);
276 return mem->virt_base + (pos << PAGE_SHIFT);
277}
278EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
279
280static int dma_alloc_from_coherent_mem(struct device *dev, ssize_t size,
281 dma_addr_t *dma_handle, void **ret)
282{
283 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
284 int order = get_order(size);
285
286 if (mem) {
287 int page = bitmap_find_free_region(mem->bitmap, mem->size,
288 order);
289 if (page >= 0) {
290 *dma_handle = mem->device_base + (page << PAGE_SHIFT);
291 *ret = mem->virt_base + (page << PAGE_SHIFT);
292 memset(*ret, 0, size);
293 }
294 if (mem->flags & DMA_MEMORY_EXCLUSIVE)
295 *ret = NULL;
296 }
297 return (mem != NULL);
298}
299
300static int dma_release_coherent(struct device *dev, int order, void *vaddr)
301{
302 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
303
304 if (mem && vaddr >= mem->virt_base && vaddr <
305 (mem->virt_base + (mem->size << PAGE_SHIFT))) {
306 int page = (vaddr - mem->virt_base) >> PAGE_SHIFT;
307
308 bitmap_release_region(mem->bitmap, page, order);
309 return 1;
310 }
311 return 0;
312}
313#else
314#define dma_alloc_from_coherent_mem(dev, size, handle, ret) (0)
315#define dma_release_coherent(dev, order, vaddr) (0)
316#endif /* CONFIG_X86_32 */
317
318int dma_supported(struct device *dev, u64 mask)
319{
320#ifdef CONFIG_PCI
321 if (mask > 0xffffffff && forbid_dac > 0) {
322 printk(KERN_INFO "PCI: Disallowing DAC for device %s\n",
323 dev->bus_id);
324 return 0;
325 }
326#endif
327
328 if (dma_ops->dma_supported)
329 return dma_ops->dma_supported(dev, mask);
330
331 /* Copied from i386. Doesn't make much sense, because it will
332 only work for pci_alloc_coherent.
333 The caller just has to use GFP_DMA in this case. */
334 if (mask < DMA_24BIT_MASK)
335 return 0;
336
337 /* Tell the device to use SAC when IOMMU force is on. This
338 allows the driver to use cheaper accesses in some cases.
339
340 Problem with this is that if we overflow the IOMMU area and
341 return DAC as fallback address the device may not handle it
342 correctly.
343
344 As a special case some controllers have a 39bit address
345 mode that is as efficient as 32bit (aic79xx). Don't force
346 SAC for these. Assume all masks <= 40 bits are of this
347 type. Normally this doesn't make any difference, but gives
348 more gentle handling of IOMMU overflow. */
349 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
350 printk(KERN_INFO "%s: Force SAC with mask %Lx\n",
351 dev->bus_id, mask);
352 return 0;
353 }
354
355 return 1;
356}
357EXPORT_SYMBOL(dma_supported);
358
48/* Allocate DMA memory on node near device */ 359/* Allocate DMA memory on node near device */
49noinline static void * 360noinline struct page *
50dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) 361dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
51{ 362{
52 struct page *page;
53 int node; 363 int node;
54 364
55 node = dev_to_node(dev); 365 node = dev_to_node(dev);
56 366
57 page = alloc_pages_node(node, gfp, order); 367 return alloc_pages_node(node, gfp, order);
58 return page ? page_address(page) : NULL;
59} 368}
60 369
61/* 370/*
@@ -65,9 +374,16 @@ void *
65dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 374dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
66 gfp_t gfp) 375 gfp_t gfp)
67{ 376{
68 void *memory; 377 void *memory = NULL;
378 struct page *page;
69 unsigned long dma_mask = 0; 379 unsigned long dma_mask = 0;
70 u64 bus; 380 dma_addr_t bus;
381
382 /* ignore region specifiers */
383 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
384
385 if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &memory))
386 return memory;
71 387
72 if (!dev) 388 if (!dev)
73 dev = &fallback_dev; 389 dev = &fallback_dev;
@@ -82,26 +398,25 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
82 /* Don't invoke OOM killer */ 398 /* Don't invoke OOM killer */
83 gfp |= __GFP_NORETRY; 399 gfp |= __GFP_NORETRY;
84 400
85 /* Kludge to make it bug-to-bug compatible with i386. i386 401#ifdef CONFIG_X86_64
86 uses the normal dma_mask for alloc_coherent. */
87 dma_mask &= *dev->dma_mask;
88
89 /* Why <=? Even when the mask is smaller than 4GB it is often 402 /* Why <=? Even when the mask is smaller than 4GB it is often
90 larger than 16MB and in this case we have a chance of 403 larger than 16MB and in this case we have a chance of
91 finding fitting memory in the next higher zone first. If 404 finding fitting memory in the next higher zone first. If
92 not retry with true GFP_DMA. -AK */ 405 not retry with true GFP_DMA. -AK */
93 if (dma_mask <= DMA_32BIT_MASK) 406 if (dma_mask <= DMA_32BIT_MASK)
94 gfp |= GFP_DMA32; 407 gfp |= GFP_DMA32;
408#endif
95 409
96 again: 410 again:
97 memory = dma_alloc_pages(dev, gfp, get_order(size)); 411 page = dma_alloc_pages(dev, gfp, get_order(size));
98 if (memory == NULL) 412 if (page == NULL)
99 return NULL; 413 return NULL;
100 414
101 { 415 {
102 int high, mmu; 416 int high, mmu;
103 bus = virt_to_bus(memory); 417 bus = page_to_phys(page);
104 high = (bus + size) >= dma_mask; 418 memory = page_address(page);
419 high = (bus + size) >= dma_mask;
105 mmu = high; 420 mmu = high;
106 if (force_iommu && !(gfp & GFP_DMA)) 421 if (force_iommu && !(gfp & GFP_DMA))
107 mmu = 1; 422 mmu = 1;
@@ -127,7 +442,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
127 442
128 memset(memory, 0, size); 443 memset(memory, 0, size);
129 if (!mmu) { 444 if (!mmu) {
130 *dma_handle = virt_to_bus(memory); 445 *dma_handle = bus;
131 return memory; 446 return memory;
132 } 447 }
133 } 448 }
@@ -139,7 +454,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
139 } 454 }
140 455
141 if (dma_ops->map_simple) { 456 if (dma_ops->map_simple) {
142 *dma_handle = dma_ops->map_simple(dev, memory, 457 *dma_handle = dma_ops->map_simple(dev, virt_to_phys(memory),
143 size, 458 size,
144 PCI_DMA_BIDIRECTIONAL); 459 PCI_DMA_BIDIRECTIONAL);
145 if (*dma_handle != bad_dma_address) 460 if (*dma_handle != bad_dma_address)
@@ -147,7 +462,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
147 } 462 }
148 463
149 if (panic_on_overflow) 464 if (panic_on_overflow)
150 panic("dma_alloc_coherent: IOMMU overflow by %lu bytes\n",size); 465 panic("dma_alloc_coherent: IOMMU overflow by %lu bytes\n",
466 (unsigned long)size);
151 free_pages((unsigned long)memory, get_order(size)); 467 free_pages((unsigned long)memory, get_order(size));
152 return NULL; 468 return NULL;
153} 469}
@@ -160,153 +476,16 @@ EXPORT_SYMBOL(dma_alloc_coherent);
160void dma_free_coherent(struct device *dev, size_t size, 476void dma_free_coherent(struct device *dev, size_t size,
161 void *vaddr, dma_addr_t bus) 477 void *vaddr, dma_addr_t bus)
162{ 478{
479 int order = get_order(size);
163 WARN_ON(irqs_disabled()); /* for portability */ 480 WARN_ON(irqs_disabled()); /* for portability */
481 if (dma_release_coherent(dev, order, vaddr))
482 return;
164 if (dma_ops->unmap_single) 483 if (dma_ops->unmap_single)
165 dma_ops->unmap_single(dev, bus, size, 0); 484 dma_ops->unmap_single(dev, bus, size, 0);
166 free_pages((unsigned long)vaddr, get_order(size)); 485 free_pages((unsigned long)vaddr, order);
167} 486}
168EXPORT_SYMBOL(dma_free_coherent); 487EXPORT_SYMBOL(dma_free_coherent);
169 488
170static int forbid_dac __read_mostly;
171
172int dma_supported(struct device *dev, u64 mask)
173{
174#ifdef CONFIG_PCI
175 if (mask > 0xffffffff && forbid_dac > 0) {
176
177
178
179 printk(KERN_INFO "PCI: Disallowing DAC for device %s\n", dev->bus_id);
180 return 0;
181 }
182#endif
183
184 if (dma_ops->dma_supported)
185 return dma_ops->dma_supported(dev, mask);
186
187 /* Copied from i386. Doesn't make much sense, because it will
188 only work for pci_alloc_coherent.
189 The caller just has to use GFP_DMA in this case. */
190 if (mask < DMA_24BIT_MASK)
191 return 0;
192
193 /* Tell the device to use SAC when IOMMU force is on. This
194 allows the driver to use cheaper accesses in some cases.
195
196 Problem with this is that if we overflow the IOMMU area and
197 return DAC as fallback address the device may not handle it
198 correctly.
199
200 As a special case some controllers have a 39bit address
201 mode that is as efficient as 32bit (aic79xx). Don't force
202 SAC for these. Assume all masks <= 40 bits are of this
203 type. Normally this doesn't make any difference, but gives
204 more gentle handling of IOMMU overflow. */
205 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
206 printk(KERN_INFO "%s: Force SAC with mask %Lx\n", dev->bus_id,mask);
207 return 0;
208 }
209
210 return 1;
211}
212EXPORT_SYMBOL(dma_supported);
213
214int dma_set_mask(struct device *dev, u64 mask)
215{
216 if (!dev->dma_mask || !dma_supported(dev, mask))
217 return -EIO;
218 *dev->dma_mask = mask;
219 return 0;
220}
221EXPORT_SYMBOL(dma_set_mask);
222
223/*
224 * See <Documentation/x86_64/boot-options.txt> for the iommu kernel parameter
225 * documentation.
226 */
227static __init int iommu_setup(char *p)
228{
229 iommu_merge = 1;
230
231 if (!p)
232 return -EINVAL;
233
234 while (*p) {
235 if (!strncmp(p, "off", 3))
236 no_iommu = 1;
237 /* gart_parse_options has more force support */
238 if (!strncmp(p, "force", 5))
239 force_iommu = 1;
240 if (!strncmp(p, "noforce", 7)) {
241 iommu_merge = 0;
242 force_iommu = 0;
243 }
244
245 if (!strncmp(p, "biomerge", 8)) {
246 iommu_bio_merge = 4096;
247 iommu_merge = 1;
248 force_iommu = 1;
249 }
250 if (!strncmp(p, "panic", 5))
251 panic_on_overflow = 1;
252 if (!strncmp(p, "nopanic", 7))
253 panic_on_overflow = 0;
254 if (!strncmp(p, "merge", 5)) {
255 iommu_merge = 1;
256 force_iommu = 1;
257 }
258 if (!strncmp(p, "nomerge", 7))
259 iommu_merge = 0;
260 if (!strncmp(p, "forcesac", 8))
261 iommu_sac_force = 1;
262 if (!strncmp(p, "allowdac", 8))
263 forbid_dac = 0;
264 if (!strncmp(p, "nodac", 5))
265 forbid_dac = -1;
266
267#ifdef CONFIG_SWIOTLB
268 if (!strncmp(p, "soft", 4))
269 swiotlb = 1;
270#endif
271
272#ifdef CONFIG_GART_IOMMU
273 gart_parse_options(p);
274#endif
275
276#ifdef CONFIG_CALGARY_IOMMU
277 if (!strncmp(p, "calgary", 7))
278 use_calgary = 1;
279#endif /* CONFIG_CALGARY_IOMMU */
280
281 p += strcspn(p, ",");
282 if (*p == ',')
283 ++p;
284 }
285 return 0;
286}
287early_param("iommu", iommu_setup);
288
289void __init pci_iommu_alloc(void)
290{
291 /*
292 * The order of these functions is important for
293 * fall-back/fail-over reasons
294 */
295#ifdef CONFIG_GART_IOMMU
296 gart_iommu_hole_init();
297#endif
298
299#ifdef CONFIG_CALGARY_IOMMU
300 detect_calgary();
301#endif
302
303 detect_intel_iommu();
304
305#ifdef CONFIG_SWIOTLB
306 pci_swiotlb_init();
307#endif
308}
309
310static int __init pci_iommu_init(void) 489static int __init pci_iommu_init(void)
311{ 490{
312#ifdef CONFIG_CALGARY_IOMMU 491#ifdef CONFIG_CALGARY_IOMMU
@@ -327,6 +506,8 @@ void pci_iommu_shutdown(void)
327{ 506{
328 gart_iommu_shutdown(); 507 gart_iommu_shutdown();
329} 508}
509/* Must execute after PCI subsystem */
510fs_initcall(pci_iommu_init);
330 511
331#ifdef CONFIG_PCI 512#ifdef CONFIG_PCI
332/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ 513/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
@@ -334,11 +515,10 @@ void pci_iommu_shutdown(void)
334static __devinit void via_no_dac(struct pci_dev *dev) 515static __devinit void via_no_dac(struct pci_dev *dev)
335{ 516{
336 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { 517 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
337 printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n"); 518 printk(KERN_INFO "PCI: VIA PCI bridge detected."
519 "Disabling DAC.\n");
338 forbid_dac = 1; 520 forbid_dac = 1;
339 } 521 }
340} 522}
341DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); 523DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
342#endif 524#endif
343/* Must execute after PCI subsystem */
344fs_initcall(pci_iommu_init);
diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c
deleted file mode 100644
index 51330321a5d3..000000000000
--- a/arch/x86/kernel/pci-dma_32.c
+++ /dev/null
@@ -1,177 +0,0 @@
1/*
2 * Dynamic DMA mapping support.
3 *
4 * On i386 there is no hardware dynamic DMA address translation,
5 * so consistent alloc/free are merely page allocation/freeing.
6 * The rest of the dynamic DMA mapping interface is implemented
7 * in asm/pci.h.
8 */
9
10#include <linux/types.h>
11#include <linux/mm.h>
12#include <linux/string.h>
13#include <linux/pci.h>
14#include <linux/module.h>
15#include <asm/io.h>
16
17struct dma_coherent_mem {
18 void *virt_base;
19 u32 device_base;
20 int size;
21 int flags;
22 unsigned long *bitmap;
23};
24
25void *dma_alloc_coherent(struct device *dev, size_t size,
26 dma_addr_t *dma_handle, gfp_t gfp)
27{
28 void *ret;
29 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
30 int order = get_order(size);
31 /* ignore region specifiers */
32 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
33
34 if (mem) {
35 int page = bitmap_find_free_region(mem->bitmap, mem->size,
36 order);
37 if (page >= 0) {
38 *dma_handle = mem->device_base + (page << PAGE_SHIFT);
39 ret = mem->virt_base + (page << PAGE_SHIFT);
40 memset(ret, 0, size);
41 return ret;
42 }
43 if (mem->flags & DMA_MEMORY_EXCLUSIVE)
44 return NULL;
45 }
46
47 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
48 gfp |= GFP_DMA;
49
50 ret = (void *)__get_free_pages(gfp, order);
51
52 if (ret != NULL) {
53 memset(ret, 0, size);
54 *dma_handle = virt_to_phys(ret);
55 }
56 return ret;
57}
58EXPORT_SYMBOL(dma_alloc_coherent);
59
60void dma_free_coherent(struct device *dev, size_t size,
61 void *vaddr, dma_addr_t dma_handle)
62{
63 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
64 int order = get_order(size);
65
66 WARN_ON(irqs_disabled()); /* for portability */
67 if (mem && vaddr >= mem->virt_base && vaddr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
68 int page = (vaddr - mem->virt_base) >> PAGE_SHIFT;
69
70 bitmap_release_region(mem->bitmap, page, order);
71 } else
72 free_pages((unsigned long)vaddr, order);
73}
74EXPORT_SYMBOL(dma_free_coherent);
75
76int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
77 dma_addr_t device_addr, size_t size, int flags)
78{
79 void __iomem *mem_base = NULL;
80 int pages = size >> PAGE_SHIFT;
81 int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long);
82
83 if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
84 goto out;
85 if (!size)
86 goto out;
87 if (dev->dma_mem)
88 goto out;
89
90 /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
91
92 mem_base = ioremap(bus_addr, size);
93 if (!mem_base)
94 goto out;
95
96 dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
97 if (!dev->dma_mem)
98 goto out;
99 dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
100 if (!dev->dma_mem->bitmap)
101 goto free1_out;
102
103 dev->dma_mem->virt_base = mem_base;
104 dev->dma_mem->device_base = device_addr;
105 dev->dma_mem->size = pages;
106 dev->dma_mem->flags = flags;
107
108 if (flags & DMA_MEMORY_MAP)
109 return DMA_MEMORY_MAP;
110
111 return DMA_MEMORY_IO;
112
113 free1_out:
114 kfree(dev->dma_mem);
115 out:
116 if (mem_base)
117 iounmap(mem_base);
118 return 0;
119}
120EXPORT_SYMBOL(dma_declare_coherent_memory);
121
122void dma_release_declared_memory(struct device *dev)
123{
124 struct dma_coherent_mem *mem = dev->dma_mem;
125
126 if(!mem)
127 return;
128 dev->dma_mem = NULL;
129 iounmap(mem->virt_base);
130 kfree(mem->bitmap);
131 kfree(mem);
132}
133EXPORT_SYMBOL(dma_release_declared_memory);
134
135void *dma_mark_declared_memory_occupied(struct device *dev,
136 dma_addr_t device_addr, size_t size)
137{
138 struct dma_coherent_mem *mem = dev->dma_mem;
139 int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1) >> PAGE_SHIFT;
140 int pos, err;
141
142 if (!mem)
143 return ERR_PTR(-EINVAL);
144
145 pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
146 err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
147 if (err != 0)
148 return ERR_PTR(err);
149 return mem->virt_base + (pos << PAGE_SHIFT);
150}
151EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
152
153#ifdef CONFIG_PCI
154/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
155
156int forbid_dac;
157EXPORT_SYMBOL(forbid_dac);
158
159static __devinit void via_no_dac(struct pci_dev *dev)
160{
161 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
162 printk(KERN_INFO "PCI: VIA PCI bridge detected. Disabling DAC.\n");
163 forbid_dac = 1;
164 }
165}
166DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
167
168static int check_iommu(char *s)
169{
170 if (!strcmp(s, "usedac")) {
171 forbid_dac = -1;
172 return 1;
173 }
174 return 0;
175}
176__setup("iommu=", check_iommu);
177#endif
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 700e4647dd30..c07455d1695f 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -264,9 +264,9 @@ static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem,
264} 264}
265 265
266static dma_addr_t 266static dma_addr_t
267gart_map_simple(struct device *dev, char *buf, size_t size, int dir) 267gart_map_simple(struct device *dev, phys_addr_t paddr, size_t size, int dir)
268{ 268{
269 dma_addr_t map = dma_map_area(dev, virt_to_bus(buf), size, dir); 269 dma_addr_t map = dma_map_area(dev, paddr, size, dir);
270 270
271 flush_gart(); 271 flush_gart();
272 272
@@ -275,18 +275,17 @@ gart_map_simple(struct device *dev, char *buf, size_t size, int dir)
275 275
276/* Map a single area into the IOMMU */ 276/* Map a single area into the IOMMU */
277static dma_addr_t 277static dma_addr_t
278gart_map_single(struct device *dev, void *addr, size_t size, int dir) 278gart_map_single(struct device *dev, phys_addr_t paddr, size_t size, int dir)
279{ 279{
280 unsigned long phys_mem, bus; 280 unsigned long bus;
281 281
282 if (!dev) 282 if (!dev)
283 dev = &fallback_dev; 283 dev = &fallback_dev;
284 284
285 phys_mem = virt_to_phys(addr); 285 if (!need_iommu(dev, paddr, size))
286 if (!need_iommu(dev, phys_mem, size)) 286 return paddr;
287 return phys_mem;
288 287
289 bus = gart_map_simple(dev, addr, size, dir); 288 bus = gart_map_simple(dev, paddr, size, dir);
290 289
291 return bus; 290 return bus;
292} 291}
diff --git a/arch/x86/kernel/pci-nommu_64.c b/arch/x86/kernel/pci-nommu.c
index ab08e1832228..aec43d56f49c 100644
--- a/arch/x86/kernel/pci-nommu_64.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -14,7 +14,7 @@
14static int 14static int
15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) 15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
16{ 16{
17 if (hwdev && bus + size > *hwdev->dma_mask) { 17 if (hwdev && bus + size > *hwdev->dma_mask) {
18 if (*hwdev->dma_mask >= DMA_32BIT_MASK) 18 if (*hwdev->dma_mask >= DMA_32BIT_MASK)
19 printk(KERN_ERR 19 printk(KERN_ERR
20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n", 20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
@@ -26,19 +26,17 @@ check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
26} 26}
27 27
28static dma_addr_t 28static dma_addr_t
29nommu_map_single(struct device *hwdev, void *ptr, size_t size, 29nommu_map_single(struct device *hwdev, phys_addr_t paddr, size_t size,
30 int direction) 30 int direction)
31{ 31{
32 dma_addr_t bus = virt_to_bus(ptr); 32 dma_addr_t bus = paddr;
33 WARN_ON(size == 0);
33 if (!check_addr("map_single", hwdev, bus, size)) 34 if (!check_addr("map_single", hwdev, bus, size))
34 return bad_dma_address; 35 return bad_dma_address;
36 flush_write_buffers();
35 return bus; 37 return bus;
36} 38}
37 39
38static void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
39 int direction)
40{
41}
42 40
43/* Map a set of buffers described by scatterlist in streaming 41/* Map a set of buffers described by scatterlist in streaming
44 * mode for DMA. This is the scatter-gather version of the 42 * mode for DMA. This is the scatter-gather version of the
@@ -61,30 +59,34 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
61 struct scatterlist *s; 59 struct scatterlist *s;
62 int i; 60 int i;
63 61
62 WARN_ON(nents == 0 || sg[0].length == 0);
63
64 for_each_sg(sg, s, nents, i) { 64 for_each_sg(sg, s, nents, i) {
65 BUG_ON(!sg_page(s)); 65 BUG_ON(!sg_page(s));
66 s->dma_address = virt_to_bus(sg_virt(s)); 66 s->dma_address = sg_phys(s);
67 if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) 67 if (!check_addr("map_sg", hwdev, s->dma_address, s->length))
68 return 0; 68 return 0;
69 s->dma_length = s->length; 69 s->dma_length = s->length;
70 } 70 }
71 flush_write_buffers();
71 return nents; 72 return nents;
72} 73}
73 74
74/* Unmap a set of streaming mode DMA translations. 75/* Make sure we keep the same behaviour */
75 * Again, cpu read rules concerning calls here are the same as for 76static int nommu_mapping_error(dma_addr_t dma_addr)
76 * pci_unmap_single() above.
77 */
78static void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
79 int nents, int dir)
80{ 77{
78#ifdef CONFIG_X86_32
79 return 0;
80#else
81 return (dma_addr == bad_dma_address);
82#endif
81} 83}
82 84
85
83const struct dma_mapping_ops nommu_dma_ops = { 86const struct dma_mapping_ops nommu_dma_ops = {
84 .map_single = nommu_map_single, 87 .map_single = nommu_map_single,
85 .unmap_single = nommu_unmap_single,
86 .map_sg = nommu_map_sg, 88 .map_sg = nommu_map_sg,
87 .unmap_sg = nommu_unmap_sg, 89 .mapping_error = nommu_mapping_error,
88 .is_phys = 1, 90 .is_phys = 1,
89}; 91};
90 92
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c
index 82a0a674a003..490da7f4b8d0 100644
--- a/arch/x86/kernel/pci-swiotlb_64.c
+++ b/arch/x86/kernel/pci-swiotlb_64.c
@@ -11,11 +11,18 @@
11 11
12int swiotlb __read_mostly; 12int swiotlb __read_mostly;
13 13
14static dma_addr_t
15swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size,
16 int direction)
17{
18 return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction);
19}
20
14const struct dma_mapping_ops swiotlb_dma_ops = { 21const struct dma_mapping_ops swiotlb_dma_ops = {
15 .mapping_error = swiotlb_dma_mapping_error, 22 .mapping_error = swiotlb_dma_mapping_error,
16 .alloc_coherent = swiotlb_alloc_coherent, 23 .alloc_coherent = swiotlb_alloc_coherent,
17 .free_coherent = swiotlb_free_coherent, 24 .free_coherent = swiotlb_free_coherent,
18 .map_single = swiotlb_map_single, 25 .map_single = swiotlb_map_single_phys,
19 .unmap_single = swiotlb_unmap_single, 26 .unmap_single = swiotlb_unmap_single,
20 .sync_single_for_cpu = swiotlb_sync_single_for_cpu, 27 .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
21 .sync_single_for_device = swiotlb_sync_single_for_device, 28 .sync_single_for_device = swiotlb_sync_single_for_device,
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
new file mode 100644
index 000000000000..3004d716539d
--- /dev/null
+++ b/arch/x86/kernel/process.c
@@ -0,0 +1,44 @@
1#include <linux/errno.h>
2#include <linux/kernel.h>
3#include <linux/mm.h>
4#include <linux/smp.h>
5#include <linux/slab.h>
6#include <linux/sched.h>
7
8struct kmem_cache *task_xstate_cachep;
9
10int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
11{
12 *dst = *src;
13 if (src->thread.xstate) {
14 dst->thread.xstate = kmem_cache_alloc(task_xstate_cachep,
15 GFP_KERNEL);
16 if (!dst->thread.xstate)
17 return -ENOMEM;
18 WARN_ON((unsigned long)dst->thread.xstate & 15);
19 memcpy(dst->thread.xstate, src->thread.xstate, xstate_size);
20 }
21 return 0;
22}
23
24void free_thread_xstate(struct task_struct *tsk)
25{
26 if (tsk->thread.xstate) {
27 kmem_cache_free(task_xstate_cachep, tsk->thread.xstate);
28 tsk->thread.xstate = NULL;
29 }
30}
31
32void free_thread_info(struct thread_info *ti)
33{
34 free_thread_xstate(ti->task);
35 free_pages((unsigned long)ti, get_order(THREAD_SIZE));
36}
37
38void arch_task_cache_init(void)
39{
40 task_xstate_cachep =
41 kmem_cache_create("task_xstate", xstate_size,
42 __alignof__(union thread_xstate),
43 SLAB_PANIC, NULL);
44}
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 3903a8f2eb97..7adad088e373 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -36,6 +36,7 @@
36#include <linux/personality.h> 36#include <linux/personality.h>
37#include <linux/tick.h> 37#include <linux/tick.h>
38#include <linux/percpu.h> 38#include <linux/percpu.h>
39#include <linux/prctl.h>
39 40
40#include <asm/uaccess.h> 41#include <asm/uaccess.h>
41#include <asm/pgtable.h> 42#include <asm/pgtable.h>
@@ -45,7 +46,6 @@
45#include <asm/processor.h> 46#include <asm/processor.h>
46#include <asm/i387.h> 47#include <asm/i387.h>
47#include <asm/desc.h> 48#include <asm/desc.h>
48#include <asm/vm86.h>
49#ifdef CONFIG_MATH_EMULATION 49#ifdef CONFIG_MATH_EMULATION
50#include <asm/math_emu.h> 50#include <asm/math_emu.h>
51#endif 51#endif
@@ -521,14 +521,18 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
521 regs->cs = __USER_CS; 521 regs->cs = __USER_CS;
522 regs->ip = new_ip; 522 regs->ip = new_ip;
523 regs->sp = new_sp; 523 regs->sp = new_sp;
524 /*
525 * Free the old FP and other extended state
526 */
527 free_thread_xstate(current);
524} 528}
525EXPORT_SYMBOL_GPL(start_thread); 529EXPORT_SYMBOL_GPL(start_thread);
526 530
527#ifdef CONFIG_SECCOMP
528static void hard_disable_TSC(void) 531static void hard_disable_TSC(void)
529{ 532{
530 write_cr4(read_cr4() | X86_CR4_TSD); 533 write_cr4(read_cr4() | X86_CR4_TSD);
531} 534}
535
532void disable_TSC(void) 536void disable_TSC(void)
533{ 537{
534 preempt_disable(); 538 preempt_disable();
@@ -540,11 +544,47 @@ void disable_TSC(void)
540 hard_disable_TSC(); 544 hard_disable_TSC();
541 preempt_enable(); 545 preempt_enable();
542} 546}
547
543static void hard_enable_TSC(void) 548static void hard_enable_TSC(void)
544{ 549{
545 write_cr4(read_cr4() & ~X86_CR4_TSD); 550 write_cr4(read_cr4() & ~X86_CR4_TSD);
546} 551}
547#endif /* CONFIG_SECCOMP */ 552
553void enable_TSC(void)
554{
555 preempt_disable();
556 if (test_and_clear_thread_flag(TIF_NOTSC))
557 /*
558 * Must flip the CPU state synchronously with
559 * TIF_NOTSC in the current running context.
560 */
561 hard_enable_TSC();
562 preempt_enable();
563}
564
565int get_tsc_mode(unsigned long adr)
566{
567 unsigned int val;
568
569 if (test_thread_flag(TIF_NOTSC))
570 val = PR_TSC_SIGSEGV;
571 else
572 val = PR_TSC_ENABLE;
573
574 return put_user(val, (unsigned int __user *)adr);
575}
576
577int set_tsc_mode(unsigned int val)
578{
579 if (val == PR_TSC_SIGSEGV)
580 disable_TSC();
581 else if (val == PR_TSC_ENABLE)
582 enable_TSC();
583 else
584 return -EINVAL;
585
586 return 0;
587}
548 588
549static noinline void 589static noinline void
550__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, 590__switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
@@ -578,7 +618,6 @@ __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
578 set_debugreg(next->debugreg7, 7); 618 set_debugreg(next->debugreg7, 7);
579 } 619 }
580 620
581#ifdef CONFIG_SECCOMP
582 if (test_tsk_thread_flag(prev_p, TIF_NOTSC) ^ 621 if (test_tsk_thread_flag(prev_p, TIF_NOTSC) ^
583 test_tsk_thread_flag(next_p, TIF_NOTSC)) { 622 test_tsk_thread_flag(next_p, TIF_NOTSC)) {
584 /* prev and next are different */ 623 /* prev and next are different */
@@ -587,7 +626,6 @@ __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
587 else 626 else
588 hard_enable_TSC(); 627 hard_enable_TSC();
589 } 628 }
590#endif
591 629
592#ifdef X86_BTS 630#ifdef X86_BTS
593 if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS)) 631 if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS))
@@ -669,7 +707,7 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
669 707
670 /* we're going to use this soon, after a few expensive things */ 708 /* we're going to use this soon, after a few expensive things */
671 if (next_p->fpu_counter > 5) 709 if (next_p->fpu_counter > 5)
672 prefetch(&next->i387.fxsave); 710 prefetch(next->xstate);
673 711
674 /* 712 /*
675 * Reload esp0. 713 * Reload esp0.
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index e75ccc8a2b87..891af1a1b48a 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -36,6 +36,7 @@
36#include <linux/kprobes.h> 36#include <linux/kprobes.h>
37#include <linux/kdebug.h> 37#include <linux/kdebug.h>
38#include <linux/tick.h> 38#include <linux/tick.h>
39#include <linux/prctl.h>
39 40
40#include <asm/uaccess.h> 41#include <asm/uaccess.h>
41#include <asm/pgtable.h> 42#include <asm/pgtable.h>
@@ -532,9 +533,71 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
532 regs->ss = __USER_DS; 533 regs->ss = __USER_DS;
533 regs->flags = 0x200; 534 regs->flags = 0x200;
534 set_fs(USER_DS); 535 set_fs(USER_DS);
536 /*
537 * Free the old FP and other extended state
538 */
539 free_thread_xstate(current);
535} 540}
536EXPORT_SYMBOL_GPL(start_thread); 541EXPORT_SYMBOL_GPL(start_thread);
537 542
543static void hard_disable_TSC(void)
544{
545 write_cr4(read_cr4() | X86_CR4_TSD);
546}
547
548void disable_TSC(void)
549{
550 preempt_disable();
551 if (!test_and_set_thread_flag(TIF_NOTSC))
552 /*
553 * Must flip the CPU state synchronously with
554 * TIF_NOTSC in the current running context.
555 */
556 hard_disable_TSC();
557 preempt_enable();
558}
559
560static void hard_enable_TSC(void)
561{
562 write_cr4(read_cr4() & ~X86_CR4_TSD);
563}
564
565void enable_TSC(void)
566{
567 preempt_disable();
568 if (test_and_clear_thread_flag(TIF_NOTSC))
569 /*
570 * Must flip the CPU state synchronously with
571 * TIF_NOTSC in the current running context.
572 */
573 hard_enable_TSC();
574 preempt_enable();
575}
576
577int get_tsc_mode(unsigned long adr)
578{
579 unsigned int val;
580
581 if (test_thread_flag(TIF_NOTSC))
582 val = PR_TSC_SIGSEGV;
583 else
584 val = PR_TSC_ENABLE;
585
586 return put_user(val, (unsigned int __user *)adr);
587}
588
589int set_tsc_mode(unsigned int val)
590{
591 if (val == PR_TSC_SIGSEGV)
592 disable_TSC();
593 else if (val == PR_TSC_ENABLE)
594 enable_TSC();
595 else
596 return -EINVAL;
597
598 return 0;
599}
600
538/* 601/*
539 * This special macro can be used to load a debugging register 602 * This special macro can be used to load a debugging register
540 */ 603 */
@@ -572,6 +635,15 @@ static inline void __switch_to_xtra(struct task_struct *prev_p,
572 loaddebug(next, 7); 635 loaddebug(next, 7);
573 } 636 }
574 637
638 if (test_tsk_thread_flag(prev_p, TIF_NOTSC) ^
639 test_tsk_thread_flag(next_p, TIF_NOTSC)) {
640 /* prev and next are different */
641 if (test_tsk_thread_flag(next_p, TIF_NOTSC))
642 hard_disable_TSC();
643 else
644 hard_enable_TSC();
645 }
646
575 if (test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { 647 if (test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) {
576 /* 648 /*
577 * Copy the relevant range of the IO bitmap. 649 * Copy the relevant range of the IO bitmap.
@@ -614,7 +686,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
614 686
615 /* we're going to use this soon, after a few expensive things */ 687 /* we're going to use this soon, after a few expensive things */
616 if (next_p->fpu_counter>5) 688 if (next_p->fpu_counter>5)
617 prefetch(&next->i387.fxsave); 689 prefetch(next->xstate);
618 690
619 /* 691 /*
620 * Reload esp0, LDT and the page table pointer: 692 * Reload esp0, LDT and the page table pointer:
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 9692202d3bfb..19c9386ac118 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -420,7 +420,7 @@ static void native_machine_shutdown(void)
420 reboot_cpu_id = smp_processor_id(); 420 reboot_cpu_id = smp_processor_id();
421 421
422 /* Make certain I only run on the appropriate processor */ 422 /* Make certain I only run on the appropriate processor */
423 set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id)); 423 set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id));
424 424
425 /* O.K Now that I'm on the appropriate processor, 425 /* O.K Now that I'm on the appropriate processor,
426 * stop all of the others. 426 * stop all of the others.
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index ed157c90412e..0d1f44ae6eea 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -54,6 +54,24 @@ static void __init setup_per_cpu_maps(void)
54#endif 54#endif
55} 55}
56 56
57#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP
58cpumask_t *cpumask_of_cpu_map __read_mostly;
59EXPORT_SYMBOL(cpumask_of_cpu_map);
60
61/* requires nr_cpu_ids to be initialized */
62static void __init setup_cpumask_of_cpu(void)
63{
64 int i;
65
66 /* alloc_bootmem zeroes memory */
67 cpumask_of_cpu_map = alloc_bootmem_low(sizeof(cpumask_t) * nr_cpu_ids);
68 for (i = 0; i < nr_cpu_ids; i++)
69 cpu_set(i, cpumask_of_cpu_map[i]);
70}
71#else
72static inline void setup_cpumask_of_cpu(void) { }
73#endif
74
57#ifdef CONFIG_X86_32 75#ifdef CONFIG_X86_32
58/* 76/*
59 * Great future not-so-futuristic plan: make i386 and x86_64 do it 77 * Great future not-so-futuristic plan: make i386 and x86_64 do it
@@ -70,7 +88,7 @@ EXPORT_SYMBOL(__per_cpu_offset);
70 */ 88 */
71void __init setup_per_cpu_areas(void) 89void __init setup_per_cpu_areas(void)
72{ 90{
73 int i; 91 int i, highest_cpu = 0;
74 unsigned long size; 92 unsigned long size;
75 93
76#ifdef CONFIG_HOTPLUG_CPU 94#ifdef CONFIG_HOTPLUG_CPU
@@ -104,10 +122,18 @@ void __init setup_per_cpu_areas(void)
104 __per_cpu_offset[i] = ptr - __per_cpu_start; 122 __per_cpu_offset[i] = ptr - __per_cpu_start;
105#endif 123#endif
106 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); 124 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
125
126 highest_cpu = i;
107 } 127 }
108 128
129 nr_cpu_ids = highest_cpu + 1;
130 printk(KERN_DEBUG "NR_CPUS: %d, nr_cpu_ids: %d\n", NR_CPUS, nr_cpu_ids);
131
109 /* Setup percpu data maps */ 132 /* Setup percpu data maps */
110 setup_per_cpu_maps(); 133 setup_per_cpu_maps();
134
135 /* Setup cpumask_of_cpu map */
136 setup_cpumask_of_cpu();
111} 137}
112 138
113#endif 139#endif
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c
index 9042fb0e36f5..aee0e8200777 100644
--- a/arch/x86/kernel/setup64.c
+++ b/arch/x86/kernel/setup64.c
@@ -74,8 +74,8 @@ int force_personality32 = 0;
74Control non executable heap for 32bit processes. 74Control non executable heap for 32bit processes.
75To control the stack too use noexec=off 75To control the stack too use noexec=off
76 76
77on PROT_READ does not imply PROT_EXEC for 32bit processes 77on PROT_READ does not imply PROT_EXEC for 32bit processes (default)
78off PROT_READ implies PROT_EXEC (default) 78off PROT_READ implies PROT_EXEC
79*/ 79*/
80static int __init nonx32_setup(char *str) 80static int __init nonx32_setup(char *str)
81{ 81{
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 5b0bffb7fcc9..78828b0f604f 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -39,6 +39,7 @@
39#include <linux/efi.h> 39#include <linux/efi.h>
40#include <linux/init.h> 40#include <linux/init.h>
41#include <linux/edd.h> 41#include <linux/edd.h>
42#include <linux/iscsi_ibft.h>
42#include <linux/nodemask.h> 43#include <linux/nodemask.h>
43#include <linux/kexec.h> 44#include <linux/kexec.h>
44#include <linux/crash_dump.h> 45#include <linux/crash_dump.h>
@@ -689,6 +690,8 @@ void __init setup_bootmem_allocator(void)
689#endif 690#endif
690 numa_kva_reserve(); 691 numa_kva_reserve();
691 reserve_crashkernel(); 692 reserve_crashkernel();
693
694 reserve_ibft_region();
692} 695}
693 696
694/* 697/*
@@ -812,10 +815,10 @@ void __init setup_arch(char **cmdline_p)
812 efi_init(); 815 efi_init();
813 816
814 /* update e820 for memory not covered by WB MTRRs */ 817 /* update e820 for memory not covered by WB MTRRs */
815 find_max_pfn(); 818 propagate_e820_map();
816 mtrr_bp_init(); 819 mtrr_bp_init();
817 if (mtrr_trim_uncached_memory(max_pfn)) 820 if (mtrr_trim_uncached_memory(max_pfn))
818 find_max_pfn(); 821 propagate_e820_map();
819 822
820 max_low_pfn = setup_memory(); 823 max_low_pfn = setup_memory();
821 824
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 674ef3510cdf..c2ec3dcb6b99 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -33,6 +33,7 @@
33#include <linux/acpi.h> 33#include <linux/acpi.h>
34#include <linux/kallsyms.h> 34#include <linux/kallsyms.h>
35#include <linux/edd.h> 35#include <linux/edd.h>
36#include <linux/iscsi_ibft.h>
36#include <linux/mmzone.h> 37#include <linux/mmzone.h>
37#include <linux/kexec.h> 38#include <linux/kexec.h>
38#include <linux/cpufreq.h> 39#include <linux/cpufreq.h>
@@ -398,6 +399,8 @@ void __init setup_arch(char **cmdline_p)
398 399
399 early_res_to_bootmem(); 400 early_res_to_bootmem();
400 401
402 dma32_reserve_bootmem();
403
401#ifdef CONFIG_ACPI_SLEEP 404#ifdef CONFIG_ACPI_SLEEP
402 /* 405 /*
403 * Reserve low memory region for sleep support. 406 * Reserve low memory region for sleep support.
@@ -420,11 +423,14 @@ void __init setup_arch(char **cmdline_p)
420 unsigned long end_of_mem = end_pfn << PAGE_SHIFT; 423 unsigned long end_of_mem = end_pfn << PAGE_SHIFT;
421 424
422 if (ramdisk_end <= end_of_mem) { 425 if (ramdisk_end <= end_of_mem) {
423 reserve_bootmem_generic(ramdisk_image, ramdisk_size); 426 /*
427 * don't need to reserve again, already reserved early
428 * in x86_64_start_kernel, and early_res_to_bootmem
429 * convert that to reserved in bootmem
430 */
424 initrd_start = ramdisk_image + PAGE_OFFSET; 431 initrd_start = ramdisk_image + PAGE_OFFSET;
425 initrd_end = initrd_start+ramdisk_size; 432 initrd_end = initrd_start+ramdisk_size;
426 } else { 433 } else {
427 /* Assumes everything on node 0 */
428 free_bootmem(ramdisk_image, ramdisk_size); 434 free_bootmem(ramdisk_image, ramdisk_size);
429 printk(KERN_ERR "initrd extends beyond end of memory " 435 printk(KERN_ERR "initrd extends beyond end of memory "
430 "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 436 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
@@ -434,6 +440,9 @@ void __init setup_arch(char **cmdline_p)
434 } 440 }
435#endif 441#endif
436 reserve_crashkernel(); 442 reserve_crashkernel();
443
444 reserve_ibft_region();
445
437 paging_init(); 446 paging_init();
438 map_vsyscall(); 447 map_vsyscall();
439 448
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e6abe8a49b1f..6a925394bc7e 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -61,6 +61,7 @@
61#include <asm/mtrr.h> 61#include <asm/mtrr.h>
62#include <asm/nmi.h> 62#include <asm/nmi.h>
63#include <asm/vmi.h> 63#include <asm/vmi.h>
64#include <asm/genapic.h>
64#include <linux/mc146818rtc.h> 65#include <linux/mc146818rtc.h>
65 66
66#include <mach_apic.h> 67#include <mach_apic.h>
@@ -677,6 +678,12 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
677 unsigned long send_status, accept_status = 0; 678 unsigned long send_status, accept_status = 0;
678 int maxlvt, num_starts, j; 679 int maxlvt, num_starts, j;
679 680
681 if (get_uv_system_type() == UV_NON_UNIQUE_APIC) {
682 send_status = uv_wakeup_secondary(phys_apicid, start_eip);
683 atomic_set(&init_deasserted, 1);
684 return send_status;
685 }
686
680 /* 687 /*
681 * Be paranoid about clearing APIC errors. 688 * Be paranoid about clearing APIC errors.
682 */ 689 */
@@ -918,16 +925,19 @@ do_rest:
918 925
919 atomic_set(&init_deasserted, 0); 926 atomic_set(&init_deasserted, 0);
920 927
921 Dprintk("Setting warm reset code and vector.\n"); 928 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
922 929
923 store_NMI_vector(&nmi_high, &nmi_low); 930 Dprintk("Setting warm reset code and vector.\n");
924 931
925 smpboot_setup_warm_reset_vector(start_ip); 932 store_NMI_vector(&nmi_high, &nmi_low);
926 /* 933
927 * Be paranoid about clearing APIC errors. 934 smpboot_setup_warm_reset_vector(start_ip);
928 */ 935 /*
929 apic_write(APIC_ESR, 0); 936 * Be paranoid about clearing APIC errors.
930 apic_read(APIC_ESR); 937 */
938 apic_write(APIC_ESR, 0);
939 apic_read(APIC_ESR);
940 }
931 941
932 /* 942 /*
933 * Starting actual IPI sequence... 943 * Starting actual IPI sequence...
@@ -966,7 +976,8 @@ do_rest:
966 else 976 else
967 /* trampoline code not run */ 977 /* trampoline code not run */
968 printk(KERN_ERR "Not responding.\n"); 978 printk(KERN_ERR "Not responding.\n");
969 inquire_remote_apic(apicid); 979 if (get_uv_system_type() != UV_NON_UNIQUE_APIC)
980 inquire_remote_apic(apicid);
970 } 981 }
971 } 982 }
972 983
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 65791ca2824a..471e694d6713 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -681,7 +681,7 @@ gp_in_kernel:
681 } 681 }
682} 682}
683 683
684static __kprobes void 684static notrace __kprobes void
685mem_parity_error(unsigned char reason, struct pt_regs *regs) 685mem_parity_error(unsigned char reason, struct pt_regs *regs)
686{ 686{
687 printk(KERN_EMERG 687 printk(KERN_EMERG
@@ -707,7 +707,7 @@ mem_parity_error(unsigned char reason, struct pt_regs *regs)
707 clear_mem_error(reason); 707 clear_mem_error(reason);
708} 708}
709 709
710static __kprobes void 710static notrace __kprobes void
711io_check_error(unsigned char reason, struct pt_regs *regs) 711io_check_error(unsigned char reason, struct pt_regs *regs)
712{ 712{
713 unsigned long i; 713 unsigned long i;
@@ -727,7 +727,7 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
727 outb(reason, 0x61); 727 outb(reason, 0x61);
728} 728}
729 729
730static __kprobes void 730static notrace __kprobes void
731unknown_nmi_error(unsigned char reason, struct pt_regs *regs) 731unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
732{ 732{
733 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) 733 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
@@ -755,7 +755,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
755 755
756static DEFINE_SPINLOCK(nmi_print_lock); 756static DEFINE_SPINLOCK(nmi_print_lock);
757 757
758void __kprobes die_nmi(struct pt_regs *regs, const char *msg) 758void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg)
759{ 759{
760 if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP) 760 if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP)
761 return; 761 return;
@@ -786,7 +786,7 @@ void __kprobes die_nmi(struct pt_regs *regs, const char *msg)
786 do_exit(SIGSEGV); 786 do_exit(SIGSEGV);
787} 787}
788 788
789static __kprobes void default_do_nmi(struct pt_regs *regs) 789static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
790{ 790{
791 unsigned char reason = 0; 791 unsigned char reason = 0;
792 792
@@ -828,7 +828,7 @@ static __kprobes void default_do_nmi(struct pt_regs *regs)
828 828
829static int ignore_nmis; 829static int ignore_nmis;
830 830
831__kprobes void do_nmi(struct pt_regs *regs, long error_code) 831notrace __kprobes void do_nmi(struct pt_regs *regs, long error_code)
832{ 832{
833 int cpu; 833 int cpu;
834 834
@@ -1148,9 +1148,22 @@ asmlinkage void math_state_restore(void)
1148 struct thread_info *thread = current_thread_info(); 1148 struct thread_info *thread = current_thread_info();
1149 struct task_struct *tsk = thread->task; 1149 struct task_struct *tsk = thread->task;
1150 1150
1151 if (!tsk_used_math(tsk)) {
1152 local_irq_enable();
1153 /*
1154 * does a slab alloc which can sleep
1155 */
1156 if (init_fpu(tsk)) {
1157 /*
1158 * ran out of memory!
1159 */
1160 do_group_exit(SIGKILL);
1161 return;
1162 }
1163 local_irq_disable();
1164 }
1165
1151 clts(); /* Allow maths ops (or we recurse) */ 1166 clts(); /* Allow maths ops (or we recurse) */
1152 if (!tsk_used_math(tsk))
1153 init_fpu(tsk);
1154 restore_fpu(tsk); 1167 restore_fpu(tsk);
1155 thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ 1168 thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
1156 tsk->fpu_counter++; 1169 tsk->fpu_counter++;
@@ -1208,11 +1221,6 @@ void __init trap_init(void)
1208#endif 1221#endif
1209 set_trap_gate(19, &simd_coprocessor_error); 1222 set_trap_gate(19, &simd_coprocessor_error);
1210 1223
1211 /*
1212 * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
1213 * Generate a build-time error if the alignment is wrong.
1214 */
1215 BUILD_BUG_ON(offsetof(struct task_struct, thread.i387.fxsave) & 15);
1216 if (cpu_has_fxsr) { 1224 if (cpu_has_fxsr) {
1217 printk(KERN_INFO "Enabling fast FPU save and restore... "); 1225 printk(KERN_INFO "Enabling fast FPU save and restore... ");
1218 set_in_cr4(X86_CR4_OSFXSR); 1226 set_in_cr4(X86_CR4_OSFXSR);
@@ -1233,6 +1241,7 @@ void __init trap_init(void)
1233 1241
1234 set_bit(SYSCALL_VECTOR, used_vectors); 1242 set_bit(SYSCALL_VECTOR, used_vectors);
1235 1243
1244 init_thread_xstate();
1236 /* 1245 /*
1237 * Should be a barrier for any external CPU state: 1246 * Should be a barrier for any external CPU state:
1238 */ 1247 */
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 79aa6fc0815c..adff76ea97c4 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -600,7 +600,8 @@ void die(const char * str, struct pt_regs * regs, long err)
600 oops_end(flags, regs, SIGSEGV); 600 oops_end(flags, regs, SIGSEGV);
601} 601}
602 602
603void __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic) 603notrace __kprobes void
604die_nmi(char *str, struct pt_regs *regs, int do_panic)
604{ 605{
605 unsigned long flags; 606 unsigned long flags;
606 607
@@ -772,7 +773,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
772 die("general protection fault", regs, error_code); 773 die("general protection fault", regs, error_code);
773} 774}
774 775
775static __kprobes void 776static notrace __kprobes void
776mem_parity_error(unsigned char reason, struct pt_regs * regs) 777mem_parity_error(unsigned char reason, struct pt_regs * regs)
777{ 778{
778 printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x.\n", 779 printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x.\n",
@@ -796,7 +797,7 @@ mem_parity_error(unsigned char reason, struct pt_regs * regs)
796 outb(reason, 0x61); 797 outb(reason, 0x61);
797} 798}
798 799
799static __kprobes void 800static notrace __kprobes void
800io_check_error(unsigned char reason, struct pt_regs * regs) 801io_check_error(unsigned char reason, struct pt_regs * regs)
801{ 802{
802 printk("NMI: IOCK error (debug interrupt?)\n"); 803 printk("NMI: IOCK error (debug interrupt?)\n");
@@ -810,7 +811,7 @@ io_check_error(unsigned char reason, struct pt_regs * regs)
810 outb(reason, 0x61); 811 outb(reason, 0x61);
811} 812}
812 813
813static __kprobes void 814static notrace __kprobes void
814unknown_nmi_error(unsigned char reason, struct pt_regs * regs) 815unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
815{ 816{
816 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) 817 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
@@ -827,7 +828,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
827 828
828/* Runs on IST stack. This code must keep interrupts off all the time. 829/* Runs on IST stack. This code must keep interrupts off all the time.
829 Nested NMIs are prevented by the CPU. */ 830 Nested NMIs are prevented by the CPU. */
830asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs) 831asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
831{ 832{
832 unsigned char reason = 0; 833 unsigned char reason = 0;
833 int cpu; 834 int cpu;
@@ -1123,11 +1124,24 @@ asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void)
1123asmlinkage void math_state_restore(void) 1124asmlinkage void math_state_restore(void)
1124{ 1125{
1125 struct task_struct *me = current; 1126 struct task_struct *me = current;
1126 clts(); /* Allow maths ops (or we recurse) */
1127 1127
1128 if (!used_math()) 1128 if (!used_math()) {
1129 init_fpu(me); 1129 local_irq_enable();
1130 restore_fpu_checking(&me->thread.i387.fxsave); 1130 /*
1131 * does a slab alloc which can sleep
1132 */
1133 if (init_fpu(me)) {
1134 /*
1135 * ran out of memory!
1136 */
1137 do_group_exit(SIGKILL);
1138 return;
1139 }
1140 local_irq_disable();
1141 }
1142
1143 clts(); /* Allow maths ops (or we recurse) */
1144 restore_fpu_checking(&me->thread.xstate->fxsave);
1131 task_thread_info(me)->status |= TS_USEDFPU; 1145 task_thread_info(me)->status |= TS_USEDFPU;
1132 me->fpu_counter++; 1146 me->fpu_counter++;
1133} 1147}
@@ -1163,6 +1177,10 @@ void __init trap_init(void)
1163#endif 1177#endif
1164 1178
1165 /* 1179 /*
1180 * initialize the per thread extended state:
1181 */
1182 init_thread_xstate();
1183 /*
1166 * Should be a barrier for any external CPU state. 1184 * Should be a barrier for any external CPU state.
1167 */ 1185 */
1168 cpu_init(); 1186 cpu_init();
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 3d7e6e9fa6c2..e4790728b224 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -221,9 +221,9 @@ EXPORT_SYMBOL(recalibrate_cpu_khz);
221 * if the CPU frequency is scaled, TSC-based delays will need a different 221 * if the CPU frequency is scaled, TSC-based delays will need a different
222 * loops_per_jiffy value to function properly. 222 * loops_per_jiffy value to function properly.
223 */ 223 */
224static unsigned int ref_freq = 0; 224static unsigned int ref_freq;
225static unsigned long loops_per_jiffy_ref = 0; 225static unsigned long loops_per_jiffy_ref;
226static unsigned long cpu_khz_ref = 0; 226static unsigned long cpu_khz_ref;
227 227
228static int 228static int
229time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) 229time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data)
@@ -283,15 +283,28 @@ core_initcall(cpufreq_tsc);
283 283
284/* clock source code */ 284/* clock source code */
285 285
286static unsigned long current_tsc_khz = 0; 286static unsigned long current_tsc_khz;
287static struct clocksource clocksource_tsc;
287 288
289/*
290 * We compare the TSC to the cycle_last value in the clocksource
291 * structure to avoid a nasty time-warp issue. This can be observed in
292 * a very small window right after one CPU updated cycle_last under
293 * xtime lock and the other CPU reads a TSC value which is smaller
294 * than the cycle_last reference value due to a TSC which is slighty
295 * behind. This delta is nowhere else observable, but in that case it
296 * results in a forward time jump in the range of hours due to the
297 * unsigned delta calculation of the time keeping core code, which is
298 * necessary to support wrapping clocksources like pm timer.
299 */
288static cycle_t read_tsc(void) 300static cycle_t read_tsc(void)
289{ 301{
290 cycle_t ret; 302 cycle_t ret;
291 303
292 rdtscll(ret); 304 rdtscll(ret);
293 305
294 return ret; 306 return ret >= clocksource_tsc.cycle_last ?
307 ret : clocksource_tsc.cycle_last;
295} 308}
296 309
297static struct clocksource clocksource_tsc = { 310static struct clocksource clocksource_tsc = {
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
index ceeba01e7f47..fcc16e58609e 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
@@ -11,6 +11,7 @@
11#include <asm/hpet.h> 11#include <asm/hpet.h>
12#include <asm/timex.h> 12#include <asm/timex.h>
13#include <asm/timer.h> 13#include <asm/timer.h>
14#include <asm/vgtod.h>
14 15
15static int notsc __initdata = 0; 16static int notsc __initdata = 0;
16 17
@@ -287,18 +288,34 @@ int __init notsc_setup(char *s)
287 288
288__setup("notsc", notsc_setup); 289__setup("notsc", notsc_setup);
289 290
291static struct clocksource clocksource_tsc;
290 292
291/* clock source code: */ 293/*
294 * We compare the TSC to the cycle_last value in the clocksource
295 * structure to avoid a nasty time-warp. This can be observed in a
296 * very small window right after one CPU updated cycle_last under
297 * xtime/vsyscall_gtod lock and the other CPU reads a TSC value which
298 * is smaller than the cycle_last reference value due to a TSC which
299 * is slighty behind. This delta is nowhere else observable, but in
300 * that case it results in a forward time jump in the range of hours
301 * due to the unsigned delta calculation of the time keeping core
302 * code, which is necessary to support wrapping clocksources like pm
303 * timer.
304 */
292static cycle_t read_tsc(void) 305static cycle_t read_tsc(void)
293{ 306{
294 cycle_t ret = (cycle_t)get_cycles(); 307 cycle_t ret = (cycle_t)get_cycles();
295 return ret; 308
309 return ret >= clocksource_tsc.cycle_last ?
310 ret : clocksource_tsc.cycle_last;
296} 311}
297 312
298static cycle_t __vsyscall_fn vread_tsc(void) 313static cycle_t __vsyscall_fn vread_tsc(void)
299{ 314{
300 cycle_t ret = (cycle_t)vget_cycles(); 315 cycle_t ret = (cycle_t)vget_cycles();
301 return ret; 316
317 return ret >= __vsyscall_gtod_data.clock.cycle_last ?
318 ret : __vsyscall_gtod_data.clock.cycle_last;
302} 319}
303 320
304static struct clocksource clocksource_tsc = { 321static struct clocksource clocksource_tsc = {
diff --git a/arch/x86/mach-visws/visws_apic.c b/arch/x86/mach-visws/visws_apic.c
index 710faf71a650..cef9cb1d15ac 100644
--- a/arch/x86/mach-visws/visws_apic.c
+++ b/arch/x86/mach-visws/visws_apic.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/i386/mach-visws/visws_apic.c
3 *
4 * Copyright (C) 1999 Bent Hagemark, Ingo Molnar 2 * Copyright (C) 1999 Bent Hagemark, Ingo Molnar
5 * 3 *
6 * SGI Visual Workstation interrupt controller 4 * SGI Visual Workstation interrupt controller
diff --git a/arch/x86/mach-voyager/voyager_basic.c b/arch/x86/mach-voyager/voyager_basic.c
index 6a949e4edde8..46d6f8067690 100644
--- a/arch/x86/mach-voyager/voyager_basic.c
+++ b/arch/x86/mach-voyager/voyager_basic.c
@@ -2,8 +2,6 @@
2 * 2 *
3 * Author: J.E.J.Bottomley@HansenPartnership.com 3 * Author: J.E.J.Bottomley@HansenPartnership.com
4 * 4 *
5 * linux/arch/i386/kernel/voyager.c
6 *
7 * This file contains all the voyager specific routines for getting 5 * This file contains all the voyager specific routines for getting
8 * initialisation of the architecture to function. For additional 6 * initialisation of the architecture to function. For additional
9 * features see: 7 * features see:
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c
index 17a7904f75b1..ecab9fff0fd1 100644
--- a/arch/x86/mach-voyager/voyager_cat.c
+++ b/arch/x86/mach-voyager/voyager_cat.c
@@ -4,8 +4,6 @@
4 * 4 *
5 * Author: J.E.J.Bottomley@HansenPartnership.com 5 * Author: J.E.J.Bottomley@HansenPartnership.com
6 * 6 *
7 * linux/arch/i386/kernel/voyager_cat.c
8 *
9 * This file contains all the logic for manipulating the CAT bus 7 * This file contains all the logic for manipulating the CAT bus
10 * in a level 5 machine. 8 * in a level 5 machine.
11 * 9 *
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index be7235bf105d..96f60c7cd124 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -4,8 +4,6 @@
4 * 4 *
5 * Author: J.E.J.Bottomley@HansenPartnership.com 5 * Author: J.E.J.Bottomley@HansenPartnership.com
6 * 6 *
7 * linux/arch/i386/kernel/voyager_smp.c
8 *
9 * This file provides all the same external entries as smp.c but uses 7 * This file provides all the same external entries as smp.c but uses
10 * the voyager hal to provide the functionality 8 * the voyager hal to provide the functionality
11 */ 9 */
diff --git a/arch/x86/mach-voyager/voyager_thread.c b/arch/x86/mach-voyager/voyager_thread.c
index c69c931818ed..15464a20fb38 100644
--- a/arch/x86/mach-voyager/voyager_thread.c
+++ b/arch/x86/mach-voyager/voyager_thread.c
@@ -4,8 +4,6 @@
4 * 4 *
5 * Author: J.E.J.Bottomley@HansenPartnership.com 5 * Author: J.E.J.Bottomley@HansenPartnership.com
6 * 6 *
7 * linux/arch/i386/kernel/voyager_thread.c
8 *
9 * This module provides the machine status monitor thread for the 7 * This module provides the machine status monitor thread for the
10 * voyager architecture. This allows us to monitor the machine 8 * voyager architecture. This allows us to monitor the machine
11 * environment (temp, voltage, fan function) and the front panel and 9 * environment (temp, voltage, fan function) and the front panel and
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c
index 4bab3b145392..6e38d877ea77 100644
--- a/arch/x86/math-emu/fpu_entry.c
+++ b/arch/x86/math-emu/fpu_entry.c
@@ -678,7 +678,7 @@ int fpregs_soft_set(struct task_struct *target,
678 unsigned int pos, unsigned int count, 678 unsigned int pos, unsigned int count,
679 const void *kbuf, const void __user *ubuf) 679 const void *kbuf, const void __user *ubuf)
680{ 680{
681 struct i387_soft_struct *s387 = &target->thread.i387.soft; 681 struct i387_soft_struct *s387 = &target->thread.xstate->soft;
682 void *space = s387->st_space; 682 void *space = s387->st_space;
683 int ret; 683 int ret;
684 int offset, other, i, tags, regnr, tag, newtop; 684 int offset, other, i, tags, regnr, tag, newtop;
@@ -730,7 +730,7 @@ int fpregs_soft_get(struct task_struct *target,
730 unsigned int pos, unsigned int count, 730 unsigned int pos, unsigned int count,
731 void *kbuf, void __user *ubuf) 731 void *kbuf, void __user *ubuf)
732{ 732{
733 struct i387_soft_struct *s387 = &target->thread.i387.soft; 733 struct i387_soft_struct *s387 = &target->thread.xstate->soft;
734 const void *space = s387->st_space; 734 const void *space = s387->st_space;
735 int ret; 735 int ret;
736 int offset = (S387->ftop & 7) * 10, other = 80 - offset; 736 int offset = (S387->ftop & 7) * 10, other = 80 - offset;
diff --git a/arch/x86/math-emu/fpu_system.h b/arch/x86/math-emu/fpu_system.h
index a3ae28c49ddd..13488fa153e0 100644
--- a/arch/x86/math-emu/fpu_system.h
+++ b/arch/x86/math-emu/fpu_system.h
@@ -35,8 +35,8 @@
35#define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \ 35#define SEG_EXPAND_DOWN(s) (((s).b & ((1 << 11) | (1 << 10))) \
36 == (1 << 10)) 36 == (1 << 10))
37 37
38#define I387 (current->thread.i387) 38#define I387 (current->thread.xstate)
39#define FPU_info (I387.soft.info) 39#define FPU_info (I387->soft.info)
40 40
41#define FPU_CS (*(unsigned short *) &(FPU_info->___cs)) 41#define FPU_CS (*(unsigned short *) &(FPU_info->___cs))
42#define FPU_SS (*(unsigned short *) &(FPU_info->___ss)) 42#define FPU_SS (*(unsigned short *) &(FPU_info->___ss))
@@ -46,25 +46,25 @@
46#define FPU_EIP (FPU_info->___eip) 46#define FPU_EIP (FPU_info->___eip)
47#define FPU_ORIG_EIP (FPU_info->___orig_eip) 47#define FPU_ORIG_EIP (FPU_info->___orig_eip)
48 48
49#define FPU_lookahead (I387.soft.lookahead) 49#define FPU_lookahead (I387->soft.lookahead)
50 50
51/* nz if ip_offset and cs_selector are not to be set for the current 51/* nz if ip_offset and cs_selector are not to be set for the current
52 instruction. */ 52 instruction. */
53#define no_ip_update (*(u_char *)&(I387.soft.no_update)) 53#define no_ip_update (*(u_char *)&(I387->soft.no_update))
54#define FPU_rm (*(u_char *)&(I387.soft.rm)) 54#define FPU_rm (*(u_char *)&(I387->soft.rm))
55 55
56/* Number of bytes of data which can be legally accessed by the current 56/* Number of bytes of data which can be legally accessed by the current
57 instruction. This only needs to hold a number <= 108, so a byte will do. */ 57 instruction. This only needs to hold a number <= 108, so a byte will do. */
58#define access_limit (*(u_char *)&(I387.soft.alimit)) 58#define access_limit (*(u_char *)&(I387->soft.alimit))
59 59
60#define partial_status (I387.soft.swd) 60#define partial_status (I387->soft.swd)
61#define control_word (I387.soft.cwd) 61#define control_word (I387->soft.cwd)
62#define fpu_tag_word (I387.soft.twd) 62#define fpu_tag_word (I387->soft.twd)
63#define registers (I387.soft.st_space) 63#define registers (I387->soft.st_space)
64#define top (I387.soft.ftop) 64#define top (I387->soft.ftop)
65 65
66#define instruction_address (*(struct address *)&I387.soft.fip) 66#define instruction_address (*(struct address *)&I387->soft.fip)
67#define operand_address (*(struct address *)&I387.soft.foo) 67#define operand_address (*(struct address *)&I387->soft.foo)
68 68
69#define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ 69#define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \
70 math_abort(FPU_info,SIGSEGV) 70 math_abort(FPU_info,SIGSEGV)
diff --git a/arch/x86/math-emu/reg_ld_str.c b/arch/x86/math-emu/reg_ld_str.c
index 02af772a24db..d597fe7423c9 100644
--- a/arch/x86/math-emu/reg_ld_str.c
+++ b/arch/x86/math-emu/reg_ld_str.c
@@ -1180,8 +1180,8 @@ u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d)
1180 control_word |= 0xffff0040; 1180 control_word |= 0xffff0040;
1181 partial_status = status_word() | 0xffff0000; 1181 partial_status = status_word() | 0xffff0000;
1182 fpu_tag_word |= 0xffff0000; 1182 fpu_tag_word |= 0xffff0000;
1183 I387.soft.fcs &= ~0xf8000000; 1183 I387->soft.fcs &= ~0xf8000000;
1184 I387.soft.fos |= 0xffff0000; 1184 I387->soft.fos |= 0xffff0000;
1185#endif /* PECULIAR_486 */ 1185#endif /* PECULIAR_486 */
1186 if (__copy_to_user(d, &control_word, 7 * 4)) 1186 if (__copy_to_user(d, &control_word, 7 * 4))
1187 FPU_abort; 1187 FPU_abort;
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index eba0bbede7a6..18378850e25a 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -120,7 +120,7 @@ int __init get_memcfg_numa_flat(void)
120 printk("NUMA - single node, flat memory mode\n"); 120 printk("NUMA - single node, flat memory mode\n");
121 121
122 /* Run the memory configuration and find the top of memory. */ 122 /* Run the memory configuration and find the top of memory. */
123 find_max_pfn(); 123 propagate_e820_map();
124 node_start_pfn[0] = 0; 124 node_start_pfn[0] = 0;
125 node_end_pfn[0] = max_pfn; 125 node_end_pfn[0] = max_pfn;
126 memory_present(0, 0, max_pfn); 126 memory_present(0, 0, max_pfn);
@@ -134,7 +134,7 @@ int __init get_memcfg_numa_flat(void)
134/* 134/*
135 * Find the highest page frame number we have available for the node 135 * Find the highest page frame number we have available for the node
136 */ 136 */
137static void __init find_max_pfn_node(int nid) 137static void __init propagate_e820_map_node(int nid)
138{ 138{
139 if (node_end_pfn[nid] > max_pfn) 139 if (node_end_pfn[nid] > max_pfn)
140 node_end_pfn[nid] = max_pfn; 140 node_end_pfn[nid] = max_pfn;
@@ -379,7 +379,7 @@ unsigned long __init setup_memory(void)
379 printk("High memory starts at vaddr %08lx\n", 379 printk("High memory starts at vaddr %08lx\n",
380 (ulong) pfn_to_kaddr(highstart_pfn)); 380 (ulong) pfn_to_kaddr(highstart_pfn));
381 for_each_online_node(nid) 381 for_each_online_node(nid)
382 find_max_pfn_node(nid); 382 propagate_e820_map_node(nid);
383 383
384 memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); 384 memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
385 NODE_DATA(0)->bdata = &node0_bdata; 385 NODE_DATA(0)->bdata = &node0_bdata;
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 1500dc8d63e4..9ec62da85fd7 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * linux/arch/i386/mm/init.c
3 * 2 *
4 * Copyright (C) 1995 Linus Torvalds 3 * Copyright (C) 1995 Linus Torvalds
5 * 4 *
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 1076097dcab2..1ff7906a9a4d 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -47,9 +47,6 @@
47#include <asm/numa.h> 47#include <asm/numa.h>
48#include <asm/cacheflush.h> 48#include <asm/cacheflush.h>
49 49
50const struct dma_mapping_ops *dma_ops;
51EXPORT_SYMBOL(dma_ops);
52
53static unsigned long dma_reserve __initdata; 50static unsigned long dma_reserve __initdata;
54 51
55DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 52DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index c590fd200e29..3a4baf95e24d 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -134,7 +134,7 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
134 134
135 if (!phys_addr_valid(phys_addr)) { 135 if (!phys_addr_valid(phys_addr)) {
136 printk(KERN_WARNING "ioremap: invalid physical address %llx\n", 136 printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
137 phys_addr); 137 (unsigned long long)phys_addr);
138 WARN_ON_ONCE(1); 138 WARN_ON_ONCE(1);
139 return NULL; 139 return NULL;
140 } 140 }
@@ -187,7 +187,8 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
187 new_prot_val == _PAGE_CACHE_WB)) { 187 new_prot_val == _PAGE_CACHE_WB)) {
188 pr_debug( 188 pr_debug(
189 "ioremap error for 0x%llx-0x%llx, requested 0x%lx, got 0x%lx\n", 189 "ioremap error for 0x%llx-0x%llx, requested 0x%lx, got 0x%lx\n",
190 phys_addr, phys_addr + size, 190 (unsigned long long)phys_addr,
191 (unsigned long long)(phys_addr + size),
191 prot_val, new_prot_val); 192 prot_val, new_prot_val);
192 free_memtype(phys_addr, phys_addr + size); 193 free_memtype(phys_addr, phys_addr + size);
193 return NULL; 194 return NULL;
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c
index 7a2ebce87df5..86808e666f9c 100644
--- a/arch/x86/mm/k8topology_64.c
+++ b/arch/x86/mm/k8topology_64.c
@@ -164,7 +164,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
164 if (!found) 164 if (!found)
165 return -1; 165 return -1;
166 166
167 memnode_shift = compute_hash_shift(nodes, 8); 167 memnode_shift = compute_hash_shift(nodes, 8, NULL);
168 if (memnode_shift < 0) { 168 if (memnode_shift < 0) {
169 printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); 169 printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n");
170 return -1; 170 return -1;
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 2ea56f48f29b..9a6892200b27 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -60,7 +60,7 @@ unsigned long __initdata nodemap_size;
60 * -1 if node overlap or lost ram (shift too big) 60 * -1 if node overlap or lost ram (shift too big)
61 */ 61 */
62static int __init populate_memnodemap(const struct bootnode *nodes, 62static int __init populate_memnodemap(const struct bootnode *nodes,
63 int numnodes, int shift) 63 int numnodes, int shift, int *nodeids)
64{ 64{
65 unsigned long addr, end; 65 unsigned long addr, end;
66 int i, res = -1; 66 int i, res = -1;
@@ -76,7 +76,12 @@ static int __init populate_memnodemap(const struct bootnode *nodes,
76 do { 76 do {
77 if (memnodemap[addr >> shift] != NUMA_NO_NODE) 77 if (memnodemap[addr >> shift] != NUMA_NO_NODE)
78 return -1; 78 return -1;
79 memnodemap[addr >> shift] = i; 79
80 if (!nodeids)
81 memnodemap[addr >> shift] = i;
82 else
83 memnodemap[addr >> shift] = nodeids[i];
84
80 addr += (1UL << shift); 85 addr += (1UL << shift);
81 } while (addr < end); 86 } while (addr < end);
82 res = 1; 87 res = 1;
@@ -139,7 +144,8 @@ static int __init extract_lsb_from_nodes(const struct bootnode *nodes,
139 return i; 144 return i;
140} 145}
141 146
142int __init compute_hash_shift(struct bootnode *nodes, int numnodes) 147int __init compute_hash_shift(struct bootnode *nodes, int numnodes,
148 int *nodeids)
143{ 149{
144 int shift; 150 int shift;
145 151
@@ -149,7 +155,7 @@ int __init compute_hash_shift(struct bootnode *nodes, int numnodes)
149 printk(KERN_DEBUG "NUMA: Using %d for the hash shift.\n", 155 printk(KERN_DEBUG "NUMA: Using %d for the hash shift.\n",
150 shift); 156 shift);
151 157
152 if (populate_memnodemap(nodes, numnodes, shift) != 1) { 158 if (populate_memnodemap(nodes, numnodes, shift, nodeids) != 1) {
153 printk(KERN_INFO "Your memory is not aligned you need to " 159 printk(KERN_INFO "Your memory is not aligned you need to "
154 "rebuild your kernel with a bigger NODEMAPSIZE " 160 "rebuild your kernel with a bigger NODEMAPSIZE "
155 "shift=%d\n", shift); 161 "shift=%d\n", shift);
@@ -380,9 +386,10 @@ static int __init split_nodes_by_size(struct bootnode *nodes, u64 *addr,
380 * Sets up the system RAM area from start_pfn to end_pfn according to the 386 * Sets up the system RAM area from start_pfn to end_pfn according to the
381 * numa=fake command-line option. 387 * numa=fake command-line option.
382 */ 388 */
389static struct bootnode nodes[MAX_NUMNODES] __initdata;
390
383static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn) 391static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
384{ 392{
385 struct bootnode nodes[MAX_NUMNODES];
386 u64 size, addr = start_pfn << PAGE_SHIFT; 393 u64 size, addr = start_pfn << PAGE_SHIFT;
387 u64 max_addr = end_pfn << PAGE_SHIFT; 394 u64 max_addr = end_pfn << PAGE_SHIFT;
388 int num_nodes = 0, num = 0, coeff_flag, coeff = -1, i; 395 int num_nodes = 0, num = 0, coeff_flag, coeff = -1, i;
@@ -462,7 +469,7 @@ done:
462 } 469 }
463 } 470 }
464out: 471out:
465 memnode_shift = compute_hash_shift(nodes, num_nodes); 472 memnode_shift = compute_hash_shift(nodes, num_nodes, NULL);
466 if (memnode_shift < 0) { 473 if (memnode_shift < 0) {
467 memnode_shift = 0; 474 memnode_shift = 0;
468 printk(KERN_ERR "No NUMA hash function found. NUMA emulation " 475 printk(KERN_ERR "No NUMA hash function found. NUMA emulation "
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
index 3165ec0672bd..6fb9e7c6893f 100644
--- a/arch/x86/mm/pgtable_32.c
+++ b/arch/x86/mm/pgtable_32.c
@@ -1,7 +1,3 @@
1/*
2 * linux/arch/i386/mm/pgtable.c
3 */
4
5#include <linux/sched.h> 1#include <linux/sched.h>
6#include <linux/kernel.h> 2#include <linux/kernel.h>
7#include <linux/errno.h> 3#include <linux/errno.h>
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 1bae9c855ceb..fb43d89f46f3 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -32,6 +32,10 @@ static struct bootnode nodes_add[MAX_NUMNODES];
32static int found_add_area __initdata; 32static int found_add_area __initdata;
33int hotadd_percent __initdata = 0; 33int hotadd_percent __initdata = 0;
34 34
35static int num_node_memblks __initdata;
36static struct bootnode node_memblk_range[NR_NODE_MEMBLKS] __initdata;
37static int memblk_nodeid[NR_NODE_MEMBLKS] __initdata;
38
35/* Too small nodes confuse the VM badly. Usually they result 39/* Too small nodes confuse the VM badly. Usually they result
36 from BIOS bugs. */ 40 from BIOS bugs. */
37#define NODE_MIN_SIZE (4*1024*1024) 41#define NODE_MIN_SIZE (4*1024*1024)
@@ -41,17 +45,17 @@ static __init int setup_node(int pxm)
41 return acpi_map_pxm_to_node(pxm); 45 return acpi_map_pxm_to_node(pxm);
42} 46}
43 47
44static __init int conflicting_nodes(unsigned long start, unsigned long end) 48static __init int conflicting_memblks(unsigned long start, unsigned long end)
45{ 49{
46 int i; 50 int i;
47 for_each_node_mask(i, nodes_parsed) { 51 for (i = 0; i < num_node_memblks; i++) {
48 struct bootnode *nd = &nodes[i]; 52 struct bootnode *nd = &node_memblk_range[i];
49 if (nd->start == nd->end) 53 if (nd->start == nd->end)
50 continue; 54 continue;
51 if (nd->end > start && nd->start < end) 55 if (nd->end > start && nd->start < end)
52 return i; 56 return memblk_nodeid[i];
53 if (nd->end == end && nd->start == start) 57 if (nd->end == end && nd->start == start)
54 return i; 58 return memblk_nodeid[i];
55 } 59 }
56 return -1; 60 return -1;
57} 61}
@@ -258,7 +262,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
258 bad_srat(); 262 bad_srat();
259 return; 263 return;
260 } 264 }
261 i = conflicting_nodes(start, end); 265 i = conflicting_memblks(start, end);
262 if (i == node) { 266 if (i == node) {
263 printk(KERN_WARNING 267 printk(KERN_WARNING
264 "SRAT: Warning: PXM %d (%lx-%lx) overlaps with itself (%Lx-%Lx)\n", 268 "SRAT: Warning: PXM %d (%lx-%lx) overlaps with itself (%Lx-%Lx)\n",
@@ -283,10 +287,10 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
283 nd->end = end; 287 nd->end = end;
284 } 288 }
285 289
286 printk(KERN_INFO "SRAT: Node %u PXM %u %Lx-%Lx\n", node, pxm, 290 printk(KERN_INFO "SRAT: Node %u PXM %u %lx-%lx\n", node, pxm,
287 nd->start, nd->end); 291 start, end);
288 e820_register_active_regions(node, nd->start >> PAGE_SHIFT, 292 e820_register_active_regions(node, start >> PAGE_SHIFT,
289 nd->end >> PAGE_SHIFT); 293 end >> PAGE_SHIFT);
290 push_node_boundaries(node, nd->start >> PAGE_SHIFT, 294 push_node_boundaries(node, nd->start >> PAGE_SHIFT,
291 nd->end >> PAGE_SHIFT); 295 nd->end >> PAGE_SHIFT);
292 296
@@ -298,6 +302,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
298 if ((nd->start | nd->end) == 0) 302 if ((nd->start | nd->end) == 0)
299 node_clear(node, nodes_parsed); 303 node_clear(node, nodes_parsed);
300 } 304 }
305
306 node_memblk_range[num_node_memblks].start = start;
307 node_memblk_range[num_node_memblks].end = end;
308 memblk_nodeid[num_node_memblks] = node;
309 num_node_memblks++;
301} 310}
302 311
303/* Sanity check to catch more bad SRATs (they are amazingly common). 312/* Sanity check to catch more bad SRATs (they are amazingly common).
@@ -368,7 +377,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
368 return -1; 377 return -1;
369 } 378 }
370 379
371 memnode_shift = compute_hash_shift(nodes, MAX_NUMNODES); 380 memnode_shift = compute_hash_shift(node_memblk_range, num_node_memblks,
381 memblk_nodeid);
372 if (memnode_shift < 0) { 382 if (memnode_shift < 0) {
373 printk(KERN_ERR 383 printk(KERN_ERR
374 "SRAT: No NUMA node hash function found. Contact maintainer\n"); 384 "SRAT: No NUMA node hash function found. Contact maintainer\n");
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 1f11cf0a307f..cc48d3fde545 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -23,8 +23,8 @@
23#include "op_x86_model.h" 23#include "op_x86_model.h"
24 24
25static struct op_x86_model_spec const *model; 25static struct op_x86_model_spec const *model;
26static struct op_msrs cpu_msrs[NR_CPUS]; 26static DEFINE_PER_CPU(struct op_msrs, cpu_msrs);
27static unsigned long saved_lvtpc[NR_CPUS]; 27static DEFINE_PER_CPU(unsigned long, saved_lvtpc);
28 28
29static int nmi_start(void); 29static int nmi_start(void);
30static void nmi_stop(void); 30static void nmi_stop(void);
@@ -89,7 +89,7 @@ static int profile_exceptions_notify(struct notifier_block *self,
89 89
90 switch (val) { 90 switch (val) {
91 case DIE_NMI: 91 case DIE_NMI:
92 if (model->check_ctrs(args->regs, &cpu_msrs[cpu])) 92 if (model->check_ctrs(args->regs, &per_cpu(cpu_msrs, cpu)))
93 ret = NOTIFY_STOP; 93 ret = NOTIFY_STOP;
94 break; 94 break;
95 default: 95 default:
@@ -126,7 +126,7 @@ static void nmi_cpu_save_registers(struct op_msrs *msrs)
126static void nmi_save_registers(void *dummy) 126static void nmi_save_registers(void *dummy)
127{ 127{
128 int cpu = smp_processor_id(); 128 int cpu = smp_processor_id();
129 struct op_msrs *msrs = &cpu_msrs[cpu]; 129 struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu);
130 nmi_cpu_save_registers(msrs); 130 nmi_cpu_save_registers(msrs);
131} 131}
132 132
@@ -134,10 +134,10 @@ static void free_msrs(void)
134{ 134{
135 int i; 135 int i;
136 for_each_possible_cpu(i) { 136 for_each_possible_cpu(i) {
137 kfree(cpu_msrs[i].counters); 137 kfree(per_cpu(cpu_msrs, i).counters);
138 cpu_msrs[i].counters = NULL; 138 per_cpu(cpu_msrs, i).counters = NULL;
139 kfree(cpu_msrs[i].controls); 139 kfree(per_cpu(cpu_msrs, i).controls);
140 cpu_msrs[i].controls = NULL; 140 per_cpu(cpu_msrs, i).controls = NULL;
141 } 141 }
142} 142}
143 143
@@ -149,13 +149,15 @@ static int allocate_msrs(void)
149 149
150 int i; 150 int i;
151 for_each_possible_cpu(i) { 151 for_each_possible_cpu(i) {
152 cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL); 152 per_cpu(cpu_msrs, i).counters = kmalloc(counters_size,
153 if (!cpu_msrs[i].counters) { 153 GFP_KERNEL);
154 if (!per_cpu(cpu_msrs, i).counters) {
154 success = 0; 155 success = 0;
155 break; 156 break;
156 } 157 }
157 cpu_msrs[i].controls = kmalloc(controls_size, GFP_KERNEL); 158 per_cpu(cpu_msrs, i).controls = kmalloc(controls_size,
158 if (!cpu_msrs[i].controls) { 159 GFP_KERNEL);
160 if (!per_cpu(cpu_msrs, i).controls) {
159 success = 0; 161 success = 0;
160 break; 162 break;
161 } 163 }
@@ -170,11 +172,11 @@ static int allocate_msrs(void)
170static void nmi_cpu_setup(void *dummy) 172static void nmi_cpu_setup(void *dummy)
171{ 173{
172 int cpu = smp_processor_id(); 174 int cpu = smp_processor_id();
173 struct op_msrs *msrs = &cpu_msrs[cpu]; 175 struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu);
174 spin_lock(&oprofilefs_lock); 176 spin_lock(&oprofilefs_lock);
175 model->setup_ctrs(msrs); 177 model->setup_ctrs(msrs);
176 spin_unlock(&oprofilefs_lock); 178 spin_unlock(&oprofilefs_lock);
177 saved_lvtpc[cpu] = apic_read(APIC_LVTPC); 179 per_cpu(saved_lvtpc, cpu) = apic_read(APIC_LVTPC);
178 apic_write(APIC_LVTPC, APIC_DM_NMI); 180 apic_write(APIC_LVTPC, APIC_DM_NMI);
179} 181}
180 182
@@ -203,13 +205,15 @@ static int nmi_setup(void)
203 */ 205 */
204 206
205 /* Assume saved/restored counters are the same on all CPUs */ 207 /* Assume saved/restored counters are the same on all CPUs */
206 model->fill_in_addresses(&cpu_msrs[0]); 208 model->fill_in_addresses(&per_cpu(cpu_msrs, 0));
207 for_each_possible_cpu(cpu) { 209 for_each_possible_cpu(cpu) {
208 if (cpu != 0) { 210 if (cpu != 0) {
209 memcpy(cpu_msrs[cpu].counters, cpu_msrs[0].counters, 211 memcpy(per_cpu(cpu_msrs, cpu).counters,
212 per_cpu(cpu_msrs, 0).counters,
210 sizeof(struct op_msr) * model->num_counters); 213 sizeof(struct op_msr) * model->num_counters);
211 214
212 memcpy(cpu_msrs[cpu].controls, cpu_msrs[0].controls, 215 memcpy(per_cpu(cpu_msrs, cpu).controls,
216 per_cpu(cpu_msrs, 0).controls,
213 sizeof(struct op_msr) * model->num_controls); 217 sizeof(struct op_msr) * model->num_controls);
214 } 218 }
215 219
@@ -249,7 +253,7 @@ static void nmi_cpu_shutdown(void *dummy)
249{ 253{
250 unsigned int v; 254 unsigned int v;
251 int cpu = smp_processor_id(); 255 int cpu = smp_processor_id();
252 struct op_msrs *msrs = &cpu_msrs[cpu]; 256 struct op_msrs *msrs = &__get_cpu_var(cpu_msrs);
253 257
254 /* restoring APIC_LVTPC can trigger an apic error because the delivery 258 /* restoring APIC_LVTPC can trigger an apic error because the delivery
255 * mode and vector nr combination can be illegal. That's by design: on 259 * mode and vector nr combination can be illegal. That's by design: on
@@ -258,23 +262,24 @@ static void nmi_cpu_shutdown(void *dummy)
258 */ 262 */
259 v = apic_read(APIC_LVTERR); 263 v = apic_read(APIC_LVTERR);
260 apic_write(APIC_LVTERR, v | APIC_LVT_MASKED); 264 apic_write(APIC_LVTERR, v | APIC_LVT_MASKED);
261 apic_write(APIC_LVTPC, saved_lvtpc[cpu]); 265 apic_write(APIC_LVTPC, per_cpu(saved_lvtpc, cpu));
262 apic_write(APIC_LVTERR, v); 266 apic_write(APIC_LVTERR, v);
263 nmi_restore_registers(msrs); 267 nmi_restore_registers(msrs);
264} 268}
265 269
266static void nmi_shutdown(void) 270static void nmi_shutdown(void)
267{ 271{
272 struct op_msrs *msrs = &__get_cpu_var(cpu_msrs);
268 nmi_enabled = 0; 273 nmi_enabled = 0;
269 on_each_cpu(nmi_cpu_shutdown, NULL, 0, 1); 274 on_each_cpu(nmi_cpu_shutdown, NULL, 0, 1);
270 unregister_die_notifier(&profile_exceptions_nb); 275 unregister_die_notifier(&profile_exceptions_nb);
271 model->shutdown(cpu_msrs); 276 model->shutdown(msrs);
272 free_msrs(); 277 free_msrs();
273} 278}
274 279
275static void nmi_cpu_start(void *dummy) 280static void nmi_cpu_start(void *dummy)
276{ 281{
277 struct op_msrs const *msrs = &cpu_msrs[smp_processor_id()]; 282 struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs);
278 model->start(msrs); 283 model->start(msrs);
279} 284}
280 285
@@ -286,7 +291,7 @@ static int nmi_start(void)
286 291
287static void nmi_cpu_stop(void *dummy) 292static void nmi_cpu_stop(void *dummy)
288{ 293{
289 struct op_msrs const *msrs = &cpu_msrs[smp_processor_id()]; 294 struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs);
290 model->stop(msrs); 295 model->stop(msrs);
291} 296}
292 297
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 17a6b057856b..b7ad9f89d21f 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -37,7 +37,8 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
37$(obj)/%.so: $(obj)/%.so.dbg FORCE 37$(obj)/%.so: $(obj)/%.so.dbg FORCE
38 $(call if_changed,objcopy) 38 $(call if_changed,objcopy)
39 39
40CFL := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64 40CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
41 $(filter -g%,$(KBUILD_CFLAGS))
41 42
42$(vobjs): KBUILD_CFLAGS += $(CFL) 43$(vobjs): KBUILD_CFLAGS += $(CFL)
43 44
diff --git a/arch/x86/video/fbdev.c b/arch/x86/video/fbdev.c
index 48fb38d7d2c0..4db42bff8c60 100644
--- a/arch/x86/video/fbdev.c
+++ b/arch/x86/video/fbdev.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * arch/i386/video/fbdev.c - i386 Framebuffer
3 * 2 *
4 * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com> 3 * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
5 * 4 *