aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig4
-rw-r--r--arch/alpha/kernel/pci.c4
-rw-r--r--arch/alpha/kernel/setup.c6
-rw-r--r--arch/alpha/kernel/time.c11
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S2
-rw-r--r--arch/arm/Kconfig80
-rw-r--r--arch/arm/Makefile18
-rw-r--r--arch/arm/boot/.gitignore2
-rw-r--r--arch/arm/boot/compressed/.gitignore1
-rw-r--r--arch/arm/common/dmabounce.c87
-rw-r--r--arch/arm/common/gic.c109
-rw-r--r--arch/arm/common/rtctime.c2
-rw-r--r--arch/arm/common/sharpsl_pm.c2
-rw-r--r--arch/arm/configs/at91sam9263ek_defconfig1184
-rw-r--r--arch/arm/configs/ateb9200_defconfig2
-rw-r--r--arch/arm/configs/csb337_defconfig8
-rw-r--r--arch/arm/configs/csb637_defconfig6
-rw-r--r--arch/arm/configs/kafa_defconfig2
-rw-r--r--arch/arm/configs/ns9xxx_defconfig621
-rw-r--r--arch/arm/configs/s3c2410_defconfig142
-rw-r--r--arch/arm/kernel/Makefile2
-rw-r--r--arch/arm/kernel/apm.c672
-rw-r--r--arch/arm/kernel/calls.S1
-rw-r--r--arch/arm/kernel/crunch.c1
-rw-r--r--arch/arm/kernel/ecard.c2
-rw-r--r--arch/arm/kernel/entry-armv.S2
-rw-r--r--arch/arm/kernel/entry-common.S7
-rw-r--r--arch/arm/kernel/irq.c3
-rw-r--r--arch/arm/kernel/isa.c2
-rw-r--r--arch/arm/kernel/machine_kexec.c78
-rw-r--r--arch/arm/kernel/process.c8
-rw-r--r--arch/arm/kernel/relocate_kernel.S74
-rw-r--r--arch/arm/kernel/setup.c9
-rw-r--r--arch/arm/kernel/time.c14
-rw-r--r--arch/arm/kernel/traps.c17
-rw-r--r--arch/arm/kernel/vmlinux.lds.S2
-rw-r--r--arch/arm/mach-at91/Kconfig (renamed from arch/arm/mach-at91rm9200/Kconfig)39
-rw-r--r--arch/arm/mach-at91/Makefile (renamed from arch/arm/mach-at91rm9200/Makefile)4
-rw-r--r--arch/arm/mach-at91/Makefile.boot (renamed from arch/arm/mach-at91rm9200/Makefile.boot)0
-rw-r--r--arch/arm/mach-at91/at91rm9200.c (renamed from arch/arm/mach-at91rm9200/at91rm9200.c)39
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c (renamed from arch/arm/mach-at91rm9200/at91rm9200_devices.c)10
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c (renamed from arch/arm/mach-at91rm9200/at91rm9200_time.c)2
-rw-r--r--arch/arm/mach-at91/at91sam9260.c (renamed from arch/arm/mach-at91rm9200/at91sam9260.c)90
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c (renamed from arch/arm/mach-at91rm9200/at91sam9260_devices.c)16
-rw-r--r--arch/arm/mach-at91/at91sam9261.c (renamed from arch/arm/mach-at91rm9200/at91sam9261.c)23
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c (renamed from arch/arm/mach-at91rm9200/at91sam9261_devices.c)10
-rw-r--r--arch/arm/mach-at91/at91sam9263.c313
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c818
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c (renamed from arch/arm/mach-at91rm9200/at91sam926x_time.c)5
-rw-r--r--arch/arm/mach-at91/board-1arm.c (renamed from arch/arm/mach-at91rm9200/board-1arm.c)2
-rw-r--r--arch/arm/mach-at91/board-carmeva.c (renamed from arch/arm/mach-at91rm9200/board-carmeva.c)4
-rw-r--r--arch/arm/mach-at91/board-csb337.c (renamed from arch/arm/mach-at91rm9200/board-csb337.c)43
-rw-r--r--arch/arm/mach-at91/board-csb637.c (renamed from arch/arm/mach-at91rm9200/board-csb637.c)41
-rw-r--r--arch/arm/mach-at91/board-dk.c (renamed from arch/arm/mach-at91rm9200/board-dk.c)4
-rw-r--r--arch/arm/mach-at91/board-eb9200.c (renamed from arch/arm/mach-at91rm9200/board-eb9200.c)4
-rw-r--r--arch/arm/mach-at91/board-ek.c (renamed from arch/arm/mach-at91rm9200/board-ek.c)4
-rw-r--r--arch/arm/mach-at91/board-kafa.c (renamed from arch/arm/mach-at91rm9200/board-kafa.c)2
-rw-r--r--arch/arm/mach-at91/board-kb9202.c (renamed from arch/arm/mach-at91rm9200/board-kb9202.c)4
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c (renamed from arch/arm/mach-at91rm9200/board-sam9260ek.c)6
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c (renamed from arch/arm/mach-at91rm9200/board-sam9261ek.c)4
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c176
-rw-r--r--arch/arm/mach-at91/clock.c (renamed from arch/arm/mach-at91rm9200/clock.c)66
-rw-r--r--arch/arm/mach-at91/clock.h (renamed from arch/arm/mach-at91rm9200/clock.h)2
-rw-r--r--arch/arm/mach-at91/generic.h (renamed from arch/arm/mach-at91rm9200/generic.h)4
-rw-r--r--arch/arm/mach-at91/gpio.c (renamed from arch/arm/mach-at91rm9200/gpio.c)50
-rw-r--r--arch/arm/mach-at91/irq.c (renamed from arch/arm/mach-at91rm9200/irq.c)2
-rw-r--r--arch/arm/mach-at91/leds.c (renamed from arch/arm/mach-at91rm9200/leds.c)4
-rw-r--r--arch/arm/mach-at91/pm.c (renamed from arch/arm/mach-at91rm9200/pm.c)4
-rw-r--r--arch/arm/mach-ep93xx/Kconfig25
-rw-r--r--arch/arm/mach-ep93xx/Makefile1
-rw-r--r--arch/arm/mach-ep93xx/clock.c6
-rw-r--r--arch/arm/mach-ep93xx/core.c115
-rw-r--r--arch/arm/mach-ep93xx/micro9.c157
-rw-r--r--arch/arm/mach-imx/time.c2
-rw-r--r--arch/arm/mach-iop13xx/Makefile1
-rw-r--r--arch/arm/mach-iop13xx/iq81340mc.c5
-rw-r--r--arch/arm/mach-iop13xx/iq81340sc.c5
-rw-r--r--arch/arm/mach-iop13xx/irq.c22
-rw-r--r--arch/arm/mach-iop13xx/setup.c1
-rw-r--r--arch/arm/mach-iop13xx/time.c102
-rw-r--r--arch/arm/mach-iop32x/glantank.c5
-rw-r--r--arch/arm/mach-iop32x/iq31244.c8
-rw-r--r--arch/arm/mach-iop32x/iq80321.c5
-rw-r--r--arch/arm/mach-iop32x/irq.c6
-rw-r--r--arch/arm/mach-iop32x/n2100.c19
-rw-r--r--arch/arm/mach-iop33x/iq80331.c7
-rw-r--r--arch/arm/mach-iop33x/iq80332.c7
-rw-r--r--arch/arm/mach-iop33x/irq.c14
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig12
-rw-r--r--arch/arm/mach-ixp4xx/Makefile2
-rw-r--r--arch/arm/mach-ixp4xx/avila-pci.c78
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c192
-rw-r--r--arch/arm/mach-ixp4xx/common.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c20
-rw-r--r--arch/arm/mach-netx/time.c2
-rw-r--r--arch/arm/mach-ns9xxx/Kconfig21
-rw-r--r--arch/arm/mach-ns9xxx/Makefile5
-rw-r--r--arch/arm/mach-ns9xxx/Makefile.boot2
-rw-r--r--arch/arm/mach-ns9xxx/board-a9m9750dev.c199
-rw-r--r--arch/arm/mach-ns9xxx/board-a9m9750dev.h15
-rw-r--r--arch/arm/mach-ns9xxx/generic.c42
-rw-r--r--arch/arm/mach-ns9xxx/generic.h19
-rw-r--r--arch/arm/mach-ns9xxx/irq.c94
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360dev.c41
-rw-r--r--arch/arm/mach-ns9xxx/time.c88
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c2
-rw-r--r--arch/arm/mach-pxa/generic.c52
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c2
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c2
-rw-r--r--arch/arm/mach-pxa/time.c2
-rw-r--r--arch/arm/mach-realview/Kconfig11
-rw-r--r--arch/arm/mach-realview/platsmp.c4
-rw-r--r--arch/arm/mach-realview/realview_eb.c38
-rw-r--r--arch/arm/mach-s3c2400/Kconfig13
-rw-r--r--arch/arm/mach-s3c2400/Makefile15
-rw-r--r--arch/arm/mach-s3c2400/gpio.c (renamed from arch/arm/mach-s3c2410/s3c2400-gpio.c)2
-rw-r--r--arch/arm/mach-s3c2410/Kconfig338
-rw-r--r--arch/arm/mach-s3c2410/Makefile103
-rw-r--r--arch/arm/mach-s3c2410/bast-irq.c2
-rw-r--r--arch/arm/mach-s3c2410/bast.h2
-rw-r--r--arch/arm/mach-s3c2410/clock.c565
-rw-r--r--arch/arm/mach-s3c2410/clock.h63
-rw-r--r--arch/arm/mach-s3c2410/common-smdk.h15
-rw-r--r--arch/arm/mach-s3c2410/cpu.h69
-rw-r--r--arch/arm/mach-s3c2410/devs.h51
-rw-r--r--arch/arm/mach-s3c2410/dma.c1546
-rw-r--r--arch/arm/mach-s3c2410/dma.h45
-rw-r--r--arch/arm/mach-s3c2410/gpio.c165
-rw-r--r--arch/arm/mach-s3c2410/irq.c775
-rw-r--r--arch/arm/mach-s3c2410/irq.h107
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c14
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c6
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c64
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c9
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c448
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c6
-rw-r--r--arch/arm/mach-s3c2410/pm.c653
-rw-r--r--arch/arm/mach-s3c2410/pm.h73
-rw-r--r--arch/arm/mach-s3c2410/s3c2400.h31
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-clock.c276
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-dma.c161
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-gpio.c71
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-irq.c48
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-pm.c156
-rw-r--r--arch/arm/mach-s3c2410/s3c2410-sleep.S68
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c10
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.h31
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.h29
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.h17
-rw-r--r--arch/arm/mach-s3c2410/s3c2442.h17
-rw-r--r--arch/arm/mach-s3c2410/sleep.S151
-rw-r--r--arch/arm/mach-s3c2410/usb-simtec.c2
-rw-r--r--arch/arm/mach-s3c2412/Kconfig58
-rw-r--r--arch/arm/mach-s3c2412/Makefile21
-rw-r--r--arch/arm/mach-s3c2412/clock.c (renamed from arch/arm/mach-s3c2410/s3c2412-clock.c)8
-rw-r--r--arch/arm/mach-s3c2412/dma.c (renamed from arch/arm/mach-s3c2410/s3c2412-dma.c)7
-rw-r--r--arch/arm/mach-s3c2412/irq.c (renamed from arch/arm/mach-s3c2410/s3c2412-irq.c)8
-rw-r--r--arch/arm/mach-s3c2412/mach-smdk2413.c (renamed from arch/arm/mach-s3c2410/mach-smdk2413.c)68
-rw-r--r--arch/arm/mach-s3c2412/mach-vstms.c (renamed from arch/arm/mach-s3c2410/mach-vstms.c)13
-rw-r--r--arch/arm/mach-s3c2412/pm.c (renamed from arch/arm/mach-s3c2410/s3c2412-pm.c)8
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c (renamed from arch/arm/mach-s3c2410/s3c2412.c)12
-rw-r--r--arch/arm/mach-s3c2440/Kconfig71
-rw-r--r--arch/arm/mach-s3c2440/Makefile23
-rw-r--r--arch/arm/mach-s3c2440/clock.c (renamed from arch/arm/mach-s3c2410/s3c2440-clock.c)6
-rw-r--r--arch/arm/mach-s3c2440/dma.c (renamed from arch/arm/mach-s3c2410/s3c2440-dma.c)51
-rw-r--r--arch/arm/mach-s3c2440/dsc.c (renamed from arch/arm/mach-s3c2410/s3c2440-dsc.c)6
-rw-r--r--arch/arm/mach-s3c2440/irq.c (renamed from arch/arm/mach-s3c2410/s3c2440-irq.c)8
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c (renamed from arch/arm/mach-s3c2410/mach-anubis.c)8
-rw-r--r--arch/arm/mach-s3c2440/mach-nexcoder.c (renamed from arch/arm/mach-s3c2410/mach-nexcoder.c)12
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c (renamed from arch/arm/mach-s3c2410/mach-osiris.c)8
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c (renamed from arch/arm/mach-s3c2410/mach-rx3715.c)11
-rw-r--r--arch/arm/mach-s3c2440/mach-smdk2440.c (renamed from arch/arm/mach-s3c2410/mach-smdk2440.c)17
-rw-r--r--arch/arm/mach-s3c2440/s3c2440.c (renamed from arch/arm/mach-s3c2410/s3c2440.c)8
-rw-r--r--arch/arm/mach-s3c2442/Kconfig27
-rw-r--r--arch/arm/mach-s3c2442/Makefile16
-rw-r--r--arch/arm/mach-s3c2442/clock.c (renamed from arch/arm/mach-s3c2410/s3c2442-clock.c)6
-rw-r--r--arch/arm/mach-s3c2442/s3c2442.c (renamed from arch/arm/mach-s3c2410/s3c2442.c)6
-rw-r--r--arch/arm/mach-s3c2443/Kconfig29
-rw-r--r--arch/arm/mach-s3c2443/Makefile20
-rw-r--r--arch/arm/mach-s3c2443/clock.c1007
-rw-r--r--arch/arm/mach-s3c2443/dma.c180
-rw-r--r--arch/arm/mach-s3c2443/irq.c290
-rw-r--r--arch/arm/mach-s3c2443/mach-smdk2443.c137
-rw-r--r--arch/arm/mach-s3c2443/s3c2443.c97
-rw-r--r--arch/arm/mach-sa1100/generic.c30
-rw-r--r--arch/arm/mach-sa1100/jornada720.c6
-rw-r--r--arch/arm/mm/Kconfig13
-rw-r--r--arch/arm/mm/Makefile2
-rw-r--r--arch/arm/mm/cache-l2x0.c104
-rw-r--r--arch/arm/mm/consistent.c17
-rw-r--r--arch/arm/mm/context.c12
-rw-r--r--arch/arm/mm/fault-armv.c2
-rw-r--r--arch/arm/mm/mmu.c3
-rw-r--r--arch/arm/mm/proc-v6.S22
-rw-r--r--arch/arm/mm/proc-xsc3.S151
-rw-r--r--arch/arm/mm/tlb-v6.S4
-rw-r--r--arch/arm/oprofile/Kconfig19
-rw-r--r--arch/arm/oprofile/Makefile4
-rw-r--r--arch/arm/oprofile/common.c8
-rw-r--r--arch/arm/oprofile/op_arm_model.h3
-rw-r--r--arch/arm/oprofile/op_model_arm11_core.c162
-rw-r--r--arch/arm/oprofile/op_model_arm11_core.h45
-rw-r--r--arch/arm/oprofile/op_model_mpcore.c296
-rw-r--r--arch/arm/oprofile/op_model_mpcore.h61
-rw-r--r--arch/arm/oprofile/op_model_v6.c67
-rw-r--r--arch/arm/plat-iop/Makefile31
-rw-r--r--arch/arm/plat-iop/cp6.c50
-rw-r--r--arch/arm/plat-iop/io.c58
-rw-r--r--arch/arm/plat-iop/pci.c6
-rw-r--r--arch/arm/plat-iop/time.c66
-rw-r--r--arch/arm/plat-s3c24xx/Kconfig100
-rw-r--r--arch/arm/plat-s3c24xx/Makefile30
-rw-r--r--arch/arm/plat-s3c24xx/clock.c449
-rw-r--r--arch/arm/plat-s3c24xx/common-smdk.c (renamed from arch/arm/mach-s3c2410/common-smdk.c)8
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c (renamed from arch/arm/mach-s3c2410/cpu.c)29
-rw-r--r--arch/arm/plat-s3c24xx/devs.c (renamed from arch/arm/mach-s3c2410/devs.c)21
-rw-r--r--arch/arm/plat-s3c24xx/dma.c1499
-rw-r--r--arch/arm/plat-s3c24xx/gpio.c188
-rw-r--r--arch/arm/plat-s3c24xx/irq.c801
-rw-r--r--arch/arm/plat-s3c24xx/pm-simtec.c (renamed from arch/arm/mach-s3c2410/pm-simtec.c)4
-rw-r--r--arch/arm/plat-s3c24xx/pm.c659
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x-irq.c (renamed from arch/arm/mach-s3c2410/s3c244x-irq.c)8
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x.c (renamed from arch/arm/mach-s3c2410/s3c244x.c)16
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x.h (renamed from arch/arm/mach-s3c2410/s3c244x.h)2
-rw-r--r--arch/arm/plat-s3c24xx/sleep.S157
-rw-r--r--arch/arm/plat-s3c24xx/time.c (renamed from arch/arm/mach-s3c2410/time.c)6
-rw-r--r--arch/arm26/Kconfig4
-rw-r--r--arch/arm26/kernel/ecard.c2
-rw-r--r--arch/arm26/kernel/setup.c6
-rw-r--r--arch/arm26/kernel/time.c8
-rw-r--r--arch/arm26/kernel/vmlinux-arm26-xip.lds.in2
-rw-r--r--arch/arm26/kernel/vmlinux-arm26.lds.in2
-rw-r--r--arch/avr32/boards/atstk1000/Makefile2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c52
-rw-r--r--arch/avr32/boards/atstk1000/spi.c27
-rw-r--r--arch/avr32/kernel/cpu.c1
-rw-r--r--arch/avr32/kernel/irq.c1
-rw-r--r--arch/avr32/kernel/setup.c10
-rw-r--r--arch/avr32/kernel/syscall_table.S22
-rw-r--r--arch/avr32/kernel/time.c11
-rw-r--r--arch/avr32/kernel/vmlinux.lds.c2
-rw-r--r--arch/avr32/lib/libgcc.h33
-rw-r--r--arch/avr32/lib/longlong.h98
-rw-r--r--arch/avr32/mach-at32ap/Makefile2
-rw-r--r--arch/avr32/mach-at32ap/at32ap7000.c172
-rw-r--r--arch/avr32/mach-at32ap/clock.c8
-rw-r--r--arch/avr32/mach-at32ap/clock.h2
-rw-r--r--arch/avr32/mach-at32ap/extint.c36
-rw-r--r--arch/avr32/mach-at32ap/pio.c255
-rw-r--r--arch/avr32/mm/cache.c32
-rw-r--r--arch/avr32/mm/tlb.c2
-rw-r--r--arch/cris/Kconfig7
-rw-r--r--arch/cris/arch-v10/drivers/axisflashmap.c3
-rw-r--r--arch/cris/arch-v10/drivers/ds1302.c2
-rw-r--r--arch/cris/arch-v10/drivers/eeprom.c2
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c2
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c2
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c4
-rw-r--r--arch/cris/arch-v10/kernel/time.c1
-rw-r--r--arch/cris/arch-v10/mm/tlb.c9
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S4
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c2
-rw-r--r--arch/cris/arch-v32/drivers/gpio.c2
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c2
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c4
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c2
-rw-r--r--arch/cris/arch-v32/mm/tlb.c9
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S2
-rw-r--r--arch/cris/kernel/profile.c2
-rw-r--r--arch/cris/kernel/setup.c6
-rw-r--r--arch/cris/kernel/time.c9
-rw-r--r--arch/cris/mm/tlb.c3
-rw-r--r--arch/frv/Kconfig4
-rw-r--r--arch/frv/kernel/pm.c53
-rw-r--r--arch/frv/kernel/setup.c6
-rw-r--r--arch/frv/kernel/sysctl.c32
-rw-r--r--arch/frv/kernel/vmlinux.lds.S2
-rw-r--r--arch/h8300/Kconfig7
-rw-r--r--arch/h8300/kernel/Makefile4
-rw-r--r--arch/h8300/kernel/ints.c1
-rw-r--r--arch/h8300/kernel/setup.c6
-rw-r--r--arch/h8300/kernel/time.c6
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S2
-rw-r--r--arch/h8300/platform/h8s/ints.c1
-rw-r--r--arch/i386/Kconfig37
-rw-r--r--arch/i386/Kconfig.cpu5
-rw-r--r--arch/i386/Kconfig.debug2
-rw-r--r--arch/i386/boot/compressed/relocs.c9
-rw-r--r--arch/i386/defconfig48
-rw-r--r--arch/i386/kernel/Makefile6
-rw-r--r--arch/i386/kernel/acpi/boot.c249
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c4
-rw-r--r--arch/i386/kernel/apic.c1627
-rw-r--r--arch/i386/kernel/apm.c72
-rw-r--r--arch/i386/kernel/asm-offsets.c2
-rw-r--r--arch/i386/kernel/cpu/common.c14
-rw-r--r--arch/i386/kernel/cpu/cpufreq/Kconfig9
-rw-r--r--arch/i386/kernel/cpu/cpufreq/Makefile1
-rw-r--r--arch/i386/kernel/cpu/cpufreq/e_powersaver.c334
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c374
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.h153
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c6
-rw-r--r--arch/i386/kernel/cpu/cyrix.c52
-rw-r--r--arch/i386/kernel/cpu/mcheck/mce.c1
-rw-r--r--arch/i386/kernel/cpu/mcheck/mce.h2
-rw-r--r--arch/i386/kernel/cpu/mtrr/if.c32
-rw-r--r--arch/i386/kernel/cpu/mtrr/main.c6
-rw-r--r--arch/i386/kernel/cpu/mtrr/mtrr.h2
-rw-r--r--arch/i386/kernel/cpu/proc.c14
-rw-r--r--arch/i386/kernel/cpu/transmeta.c5
-rw-r--r--arch/i386/kernel/cpuid.c9
-rw-r--r--arch/i386/kernel/e820.c18
-rw-r--r--arch/i386/kernel/entry.S78
-rw-r--r--arch/i386/kernel/head.S40
-rw-r--r--arch/i386/kernel/hpet.c499
-rw-r--r--arch/i386/kernel/i8253.c96
-rw-r--r--arch/i386/kernel/i8259.c7
-rw-r--r--arch/i386/kernel/io_apic.c43
-rw-r--r--arch/i386/kernel/irq.c22
-rw-r--r--arch/i386/kernel/kprobes.c6
-rw-r--r--arch/i386/kernel/microcode.c4
-rw-r--r--arch/i386/kernel/mpparse.c4
-rw-r--r--arch/i386/kernel/msr.c15
-rw-r--r--arch/i386/kernel/nmi.c107
-rw-r--r--arch/i386/kernel/paravirt.c116
-rw-r--r--arch/i386/kernel/pcspeaker.c20
-rw-r--r--arch/i386/kernel/process.c49
-rw-r--r--arch/i386/kernel/ptrace.c16
-rw-r--r--arch/i386/kernel/setup.c39
-rw-r--r--arch/i386/kernel/signal.c16
-rw-r--r--arch/i386/kernel/smp.c5
-rw-r--r--arch/i386/kernel/smpboot.c203
-rw-r--r--arch/i386/kernel/srat.c84
-rw-r--r--arch/i386/kernel/sysenter.c55
-rw-r--r--arch/i386/kernel/time.c138
-rw-r--r--arch/i386/kernel/topology.c2
-rw-r--r--arch/i386/kernel/traps.c27
-rw-r--r--arch/i386/kernel/tsc.c195
-rw-r--r--arch/i386/kernel/tsc_sync.c1
-rw-r--r--arch/i386/kernel/vm86.c33
-rw-r--r--arch/i386/kernel/vmi.c949
-rw-r--r--arch/i386/kernel/vmitime.c499
-rw-r--r--arch/i386/kernel/vmlinux.lds.S9
-rw-r--r--arch/i386/mach-default/setup.c8
-rw-r--r--arch/i386/mach-es7000/es7000.h9
-rw-r--r--arch/i386/mach-es7000/es7000plat.c53
-rw-r--r--arch/i386/math-emu/get_address.c14
-rw-r--r--arch/i386/math-emu/status_w.h8
-rw-r--r--arch/i386/mm/discontig.c1
-rw-r--r--arch/i386/mm/fault.c44
-rw-r--r--arch/i386/mm/highmem.c7
-rw-r--r--arch/i386/mm/init.c4
-rw-r--r--arch/i386/mm/pageattr.c4
-rw-r--r--arch/i386/mm/pgtable.c26
-rw-r--r--arch/i386/oprofile/nmi_int.c14
-rw-r--r--arch/i386/oprofile/op_model_ppro.c9
-rw-r--r--arch/i386/pci/Makefile2
-rw-r--r--arch/i386/pci/common.c88
-rw-r--r--arch/i386/pci/mmconfig-shared.c264
-rw-r--r--arch/i386/pci/mmconfig.c102
-rw-r--r--arch/i386/pci/pci.h10
-rw-r--r--arch/ia64/Kconfig14
-rw-r--r--arch/ia64/hp/common/hwsw_iommu.c4
-rw-r--r--arch/ia64/hp/common/sba_iommu.c2
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c13
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/ia32/sys_ia32.c68
-rw-r--r--arch/ia64/kernel/acpi.c200
-rw-r--r--arch/ia64/kernel/crash.c20
-rw-r--r--arch/ia64/kernel/crash_dump.c3
-rw-r--r--arch/ia64/kernel/efi.c5
-rw-r--r--arch/ia64/kernel/entry.S2
-rw-r--r--arch/ia64/kernel/iosapic.c5
-rw-r--r--arch/ia64/kernel/irq_ia64.c2
-rw-r--r--arch/ia64/kernel/machine_kexec.c15
-rw-r--r--arch/ia64/kernel/msi_ia64.c21
-rw-r--r--arch/ia64/kernel/perfmon.c69
-rw-r--r--arch/ia64/kernel/process.c16
-rw-r--r--arch/ia64/kernel/ptrace.c14
-rw-r--r--arch/ia64/kernel/sal.c3
-rw-r--r--arch/ia64/kernel/salinfo.c4
-rw-r--r--arch/ia64/kernel/setup.c35
-rw-r--r--arch/ia64/kernel/smp.c4
-rw-r--r--arch/ia64/kernel/traps.c30
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S3
-rw-r--r--arch/ia64/mm/contig.c80
-rw-r--r--arch/ia64/mm/discontig.c52
-rw-r--r--arch/ia64/mm/init.c46
-rw-r--r--arch/ia64/sn/kernel/huberror.c16
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c314
-rw-r--r--arch/ia64/sn/kernel/io_common.c90
-rw-r--r--arch/ia64/sn/kernel/io_init.c54
-rw-r--r--arch/ia64/sn/kernel/iomv.c5
-rw-r--r--arch/ia64/sn/kernel/msi_sn.c22
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c2
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c2
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_proc_fs.c105
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c88
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c6
-rw-r--r--arch/m32r/Kconfig7
-rw-r--r--arch/m32r/Makefile2
-rw-r--r--arch/m32r/defconfig525
-rw-r--r--arch/m32r/kernel/head.S2
-rw-r--r--arch/m32r/kernel/process.c2
-rw-r--r--arch/m32r/kernel/setup.c6
-rw-r--r--arch/m32r/kernel/signal.c26
-rw-r--r--arch/m32r/kernel/time.c8
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S9
-rw-r--r--arch/m32r/lib/ashxdi3.S3
-rw-r--r--arch/m32r/lib/checksum.S3
-rw-r--r--arch/m32r/lib/delay.c2
-rw-r--r--arch/m32r/lib/memcpy.S2
-rw-r--r--arch/m32r/lib/memset.S2
-rw-r--r--arch/m32r/lib/strlen.S2
-rw-r--r--arch/m32r/lib/usercopy.c4
-rw-r--r--arch/m32r/m32104ut/defconfig.m32104ut752
-rw-r--r--arch/m32r/m32700ut/defconfig.m32700ut.smp519
-rw-r--r--arch/m32r/m32700ut/defconfig.m32700ut.up516
-rw-r--r--arch/m32r/mappi/defconfig.nommu366
-rw-r--r--arch/m32r/mappi/defconfig.smp382
-rw-r--r--arch/m32r/mappi/defconfig.up380
-rw-r--r--arch/m32r/mappi2/defconfig.opsp883
-rw-r--r--arch/m32r/mappi2/defconfig.vdec2388
-rw-r--r--arch/m32r/mappi3/defconfig.smp373
-rw-r--r--arch/m32r/mm/fault-nommu.c29
-rw-r--r--arch/m32r/mm/fault.c66
-rw-r--r--arch/m32r/mm/mmu.S5
-rw-r--r--arch/m32r/oaks32r/defconfig.nommu348
-rw-r--r--arch/m32r/opsput/defconfig.opsput383
-rw-r--r--arch/m68k/Kconfig7
-rw-r--r--arch/m68k/atari/stdma.c2
-rw-r--r--arch/m68k/bvme6000/rtc.c2
-rw-r--r--arch/m68k/kernel/Makefile4
-rw-r--r--arch/m68k/kernel/ints.c1
-rw-r--r--arch/m68k/kernel/ptrace.c4
-rw-r--r--arch/m68k/kernel/setup.c2
-rw-r--r--arch/m68k/kernel/time.c9
-rw-r--r--arch/m68k/kernel/traps.c2
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds2
-rw-r--r--arch/m68k/mvme16x/rtc.c2
-rw-r--r--arch/m68knommu/Kconfig7
-rw-r--r--arch/m68knommu/kernel/ptrace.c4
-rw-r--r--arch/m68knommu/kernel/setup.c6
-rw-r--r--arch/m68knommu/kernel/time.c14
-rw-r--r--arch/m68knommu/kernel/traps.c2
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S12
-rw-r--r--arch/m68knommu/platform/5206/config.c2
-rw-r--r--arch/m68knommu/platform/5206e/config.c2
-rw-r--r--arch/m68knommu/platform/520x/config.c3
-rw-r--r--arch/m68knommu/platform/523x/config.c2
-rw-r--r--arch/m68knommu/platform/5249/config.c3
-rw-r--r--arch/m68knommu/platform/5272/config.c2
-rw-r--r--arch/m68knommu/platform/527x/config.c2
-rw-r--r--arch/m68knommu/platform/528x/config.c2
-rw-r--r--arch/m68knommu/platform/5307/config.c2
-rw-r--r--arch/m68knommu/platform/5307/ints.c1
-rw-r--r--arch/m68knommu/platform/5307/pit.c2
-rw-r--r--arch/m68knommu/platform/5307/timers.c7
-rw-r--r--arch/m68knommu/platform/532x/config.c2
-rw-r--r--arch/m68knommu/platform/5407/config.c2
-rw-r--r--arch/m68knommu/platform/68328/config.c2
-rw-r--r--arch/mips/Kconfig185
-rw-r--r--arch/mips/Kconfig.debug13
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/mips/arc/identify.c2
-rw-r--r--arch/mips/arc/memory.c18
-rw-r--r--arch/mips/au1000/common/irq.c8
-rw-r--r--arch/mips/au1000/common/pci.c18
-rw-r--r--arch/mips/au1000/common/power.c46
-rw-r--r--arch/mips/au1000/common/prom.c3
-rw-r--r--arch/mips/au1000/common/setup.c19
-rw-r--r--arch/mips/au1000/pb1100/board_setup.c93
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c32
-rw-r--r--arch/mips/basler/excite/excite_irq.c6
-rw-r--r--arch/mips/cobalt/Makefile1
-rw-r--r--arch/mips/cobalt/irq.c2
-rw-r--r--arch/mips/cobalt/mtd.c61
-rw-r--r--arch/mips/cobalt/setup.c17
-rw-r--r--arch/mips/configs/atlas_defconfig235
-rw-r--r--arch/mips/configs/bigsur_defconfig87
-rw-r--r--arch/mips/configs/capcella_defconfig162
-rw-r--r--arch/mips/configs/cobalt_defconfig214
-rw-r--r--arch/mips/configs/db1000_defconfig158
-rw-r--r--arch/mips/configs/db1100_defconfig158
-rw-r--r--arch/mips/configs/db1200_defconfig189
-rw-r--r--arch/mips/configs/db1500_defconfig198
-rw-r--r--arch/mips/configs/db1550_defconfig172
-rw-r--r--arch/mips/configs/ddb5477_defconfig129
-rw-r--r--arch/mips/configs/decstation_defconfig94
-rw-r--r--arch/mips/configs/e55_defconfig92
-rw-r--r--arch/mips/configs/emma2rh_defconfig279
-rw-r--r--arch/mips/configs/ev64120_defconfig128
-rw-r--r--arch/mips/configs/excite_defconfig178
-rw-r--r--arch/mips/configs/ip22_defconfig210
-rw-r--r--arch/mips/configs/ip27_defconfig142
-rw-r--r--arch/mips/configs/ip32_defconfig147
-rw-r--r--arch/mips/configs/jaguar-atx_defconfig109
-rw-r--r--arch/mips/configs/jazz_defconfig153
-rw-r--r--arch/mips/configs/jmr3927_defconfig129
-rw-r--r--arch/mips/configs/lasat200_defconfig137
-rw-r--r--arch/mips/configs/malta_defconfig174
-rw-r--r--arch/mips/configs/mipssim_defconfig116
-rw-r--r--arch/mips/configs/mpc30x_defconfig140
-rw-r--r--arch/mips/configs/ocelot_3_defconfig196
-rw-r--r--arch/mips/configs/ocelot_c_defconfig130
-rw-r--r--arch/mips/configs/ocelot_defconfig126
-rw-r--r--arch/mips/configs/ocelot_g_defconfig144
-rw-r--r--arch/mips/configs/pb1100_defconfig158
-rw-r--r--arch/mips/configs/pb1500_defconfig171
-rw-r--r--arch/mips/configs/pb1550_defconfig171
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig114
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig84
-rw-r--r--arch/mips/configs/pnx8550-v2pci_defconfig150
-rw-r--r--arch/mips/configs/qemu_defconfig96
-rw-r--r--arch/mips/configs/rbhma4500_defconfig202
-rw-r--r--arch/mips/configs/rm200_defconfig265
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig126
-rw-r--r--arch/mips/configs/sead_defconfig83
-rw-r--r--arch/mips/configs/tb0226_defconfig196
-rw-r--r--arch/mips/configs/tb0229_defconfig180
-rw-r--r--arch/mips/configs/tb0287_defconfig147
-rw-r--r--arch/mips/configs/workpad_defconfig150
-rw-r--r--arch/mips/configs/wrppmc_defconfig153
-rw-r--r--arch/mips/configs/yosemite_defconfig113
-rw-r--r--arch/mips/ddb5xxx/common/prom.c3
-rw-r--r--arch/mips/ddb5xxx/ddb5477/irq.c9
-rw-r--r--arch/mips/ddb5xxx/ddb5477/irq_5477.c2
-rw-r--r--arch/mips/dec/Makefile1
-rw-r--r--arch/mips/dec/int-handler.S4
-rw-r--r--arch/mips/dec/ioasic-irq.c4
-rw-r--r--arch/mips/dec/kn02-irq.c2
-rw-r--r--arch/mips/dec/prom/identify.c3
-rw-r--r--arch/mips/dec/prom/memory.c17
-rw-r--r--arch/mips/dec/setup.c14
-rw-r--r--arch/mips/dec/tc.c95
-rw-r--r--arch/mips/defconfig210
-rw-r--r--arch/mips/emma2rh/common/irq.c1
-rw-r--r--arch/mips/emma2rh/common/irq_emma2rh.c2
-rw-r--r--arch/mips/emma2rh/markeins/irq.c3
-rw-r--r--arch/mips/emma2rh/markeins/irq_markeins.c4
-rw-r--r--arch/mips/gt64120/ev64120/irq.c2
-rw-r--r--arch/mips/gt64120/ev64120/setup.c3
-rw-r--r--arch/mips/gt64120/momenco_ocelot/dbg_io.c4
-rw-r--r--arch/mips/gt64120/momenco_ocelot/irq.c4
-rw-r--r--arch/mips/gt64120/momenco_ocelot/prom.c3
-rw-r--r--arch/mips/gt64120/wrppmc/irq.c2
-rw-r--r--arch/mips/gt64120/wrppmc/setup.c3
-rw-r--r--arch/mips/jazz/irq.c2
-rw-r--r--arch/mips/jmr3927/common/prom.c3
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c2
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c2
-rw-r--r--arch/mips/kernel/Makefile6
-rw-r--r--arch/mips/kernel/apm.c604
-rw-r--r--arch/mips/kernel/asm-offsets.c9
-rw-r--r--arch/mips/kernel/cpu-probe.c5
-rw-r--r--arch/mips/kernel/entry.S19
-rw-r--r--arch/mips/kernel/gdb-stub.c6
-rw-r--r--arch/mips/kernel/head.S25
-rw-r--r--arch/mips/kernel/i8259.c37
-rw-r--r--arch/mips/kernel/irixelf.c331
-rw-r--r--arch/mips/kernel/irq-msc01.c4
-rw-r--r--arch/mips/kernel/irq-mv6434x.c14
-rw-r--r--arch/mips/kernel/irq-rm7000.c13
-rw-r--r--arch/mips/kernel/irq-rm9000.c24
-rw-r--r--arch/mips/kernel/irq_cpu.c21
-rw-r--r--arch/mips/kernel/linux32.c101
-rw-r--r--arch/mips/kernel/machine_kexec.c4
-rw-r--r--arch/mips/kernel/mips-mt.c28
-rw-r--r--arch/mips/kernel/proc.c8
-rw-r--r--arch/mips/kernel/process.c41
-rw-r--r--arch/mips/kernel/ptrace.c10
-rw-r--r--arch/mips/kernel/r4k_fpu.S19
-rw-r--r--arch/mips/kernel/rtlx.c29
-rw-r--r--arch/mips/kernel/scall64-64.S2
-rw-r--r--arch/mips/kernel/scall64-n32.S6
-rw-r--r--arch/mips/kernel/scall64-o32.S4
-rw-r--r--arch/mips/kernel/setup.c53
-rw-r--r--arch/mips/kernel/signal-common.h174
-rw-r--r--arch/mips/kernel/signal.c279
-rw-r--r--arch/mips/kernel/signal32.c507
-rw-r--r--arch/mips/kernel/signal_n32.c55
-rw-r--r--arch/mips/kernel/smp-mt.c9
-rw-r--r--arch/mips/kernel/smp.c25
-rw-r--r--arch/mips/kernel/smtc.c54
-rw-r--r--arch/mips/kernel/sysirix.c4
-rw-r--r--arch/mips/kernel/time.c7
-rw-r--r--arch/mips/kernel/traps.c15
-rw-r--r--arch/mips/kernel/vmlinux.lds.S2
-rw-r--r--arch/mips/kernel/vpe.c60
-rw-r--r--arch/mips/lasat/interrupt.c2
-rw-r--r--arch/mips/lasat/prom.c3
-rw-r--r--arch/mips/lasat/sysctl.c147
-rw-r--r--arch/mips/lib-32/Makefile2
-rw-r--r--arch/mips/lib-64/Makefile2
-rw-r--r--arch/mips/lib-64/memset.S142
-rw-r--r--arch/mips/lib/Makefile5
-rw-r--r--arch/mips/lib/iomap-pci.c74
-rw-r--r--arch/mips/lib/iomap.c253
-rw-r--r--arch/mips/lib/memcpy-inatomic.S436
-rw-r--r--arch/mips/lib/memset.S (renamed from arch/mips/lib-32/memset.S)35
-rw-r--r--arch/mips/lib/uncached.c4
-rw-r--r--arch/mips/mips-boards/atlas/atlas_int.c9
-rw-r--r--arch/mips/mips-boards/generic/memory.c18
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c7
-rw-r--r--arch/mips/mips-boards/sead/sead_int.c2
-rw-r--r--arch/mips/mips-boards/sim/sim_int.c6
-rw-r--r--arch/mips/mips-boards/sim/sim_mem.c16
-rw-r--r--arch/mips/mm/Makefile14
-rw-r--r--arch/mips/mm/c-sb1.c6
-rw-r--r--arch/mips/mm/cache.c2
-rw-r--r--arch/mips/mm/dma-coherent.c254
-rw-r--r--arch/mips/mm/dma-default.c (renamed from arch/mips/mm/dma-noncoherent.c)209
-rw-r--r--arch/mips/mm/dma-ip27.c257
-rw-r--r--arch/mips/mm/dma-ip32.c383
-rw-r--r--arch/mips/mm/init.c56
-rw-r--r--arch/mips/mm/ioremap.c96
-rw-r--r--arch/mips/mm/pgtable-32.c1
-rw-r--r--arch/mips/mm/pgtable-64.c1
-rw-r--r--arch/mips/momentum/jaguar_atx/Makefile2
-rw-r--r--arch/mips/momentum/jaguar_atx/irq.c4
-rw-r--r--arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h6
-rw-r--r--arch/mips/momentum/jaguar_atx/platform.c214
-rw-r--r--arch/mips/momentum/jaguar_atx/prom.c58
-rw-r--r--arch/mips/momentum/ocelot_3/irq.c2
-rw-r--r--arch/mips/momentum/ocelot_3/platform.c25
-rw-r--r--arch/mips/momentum/ocelot_3/prom.c3
-rw-r--r--arch/mips/momentum/ocelot_c/cpci-irq.c2
-rw-r--r--arch/mips/momentum/ocelot_c/dbg_io.c4
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c2
-rw-r--r--arch/mips/momentum/ocelot_c/platform.c16
-rw-r--r--arch/mips/momentum/ocelot_c/prom.c3
-rw-r--r--arch/mips/momentum/ocelot_c/uart-irq.c2
-rw-r--r--arch/mips/momentum/ocelot_g/dbg_io.c4
-rw-r--r--arch/mips/momentum/ocelot_g/irq.c4
-rw-r--r--arch/mips/momentum/ocelot_g/prom.c3
-rw-r--r--arch/mips/oprofile/Kconfig2
-rw-r--r--arch/mips/pci/Makefile2
-rw-r--r--arch/mips/pci/fixup-sni.c66
-rw-r--r--arch/mips/pci/fixup-vr4133.c16
-rw-r--r--arch/mips/pci/ops-sni.c77
-rw-r--r--arch/mips/pci/pci-dac.c79
-rw-r--r--arch/mips/pci/pci.c8
-rw-r--r--arch/mips/philips/pnx8550/common/int.c2
-rw-r--r--arch/mips/philips/pnx8550/common/proc.c7
-rw-r--r--arch/mips/philips/pnx8550/common/prom.c3
-rw-r--r--arch/mips/pmc-sierra/yosemite/dbg_io.c2
-rw-r--r--arch/mips/pmc-sierra/yosemite/irq.c6
-rw-r--r--arch/mips/pmc-sierra/yosemite/prom.c3
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c2
-rw-r--r--arch/mips/qemu/q-mem.c3
-rw-r--r--arch/mips/sgi-ip22/ip22-eisa.c4
-rw-r--r--arch/mips/sgi-ip22/ip22-int.c13
-rw-r--r--arch/mips/sgi-ip22/ip22-mc.c3
-rw-r--r--arch/mips/sgi-ip27/ip27-irq.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c5
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c4
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c10
-rw-r--r--arch/mips/sgi-ip32/ip32-memory.c3
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c2
-rw-r--r--arch/mips/sibyte/cfe/setup.c3
-rw-r--r--arch/mips/sibyte/sb1250/bcm1250_tbprof.c2
-rw-r--r--arch/mips/sibyte/sb1250/irq.c2
-rw-r--r--arch/mips/sibyte/sb1250/prom.c3
-rw-r--r--arch/mips/sni/Makefile2
-rw-r--r--arch/mips/sni/a20r.c227
-rw-r--r--arch/mips/sni/ds1216.c81
-rw-r--r--arch/mips/sni/irq.c188
-rw-r--r--arch/mips/sni/pcimt.c390
-rw-r--r--arch/mips/sni/pcit.c351
-rw-r--r--arch/mips/sni/reset.c9
-rw-r--r--arch/mips/sni/rm200.c186
-rw-r--r--arch/mips/sni/setup.c242
-rw-r--r--arch/mips/sni/sniprom.c132
-rw-r--r--arch/mips/sni/time.c148
-rw-r--r--arch/mips/tx4927/common/tx4927_irq.c4
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c12
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c3
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c2
-rw-r--r--arch/mips/tx4938/common/irq.c4
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/irq.c2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/prom.c3
-rw-r--r--arch/mips/vr41xx/common/icu.c31
-rw-r--r--arch/mips/vr41xx/common/init.c3
-rw-r--r--arch/mips/vr41xx/common/irq.c18
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/irq.c53
-rw-r--r--arch/parisc/Kconfig3
-rw-r--r--arch/parisc/kernel/perf.c2
-rw-r--r--arch/parisc/kernel/setup.c8
-rw-r--r--arch/parisc/kernel/sys_parisc32.c64
-rw-r--r--arch/parisc/kernel/syscall_table.S2
-rw-r--r--arch/parisc/kernel/time.c11
-rw-r--r--arch/parisc/kernel/topology.c2
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S2
-rw-r--r--arch/parisc/mm/init.c7
-rw-r--r--arch/powerpc/Kconfig69
-rw-r--r--arch/powerpc/Kconfig.debug18
-rw-r--r--arch/powerpc/boot/Makefile1
-rw-r--r--arch/powerpc/boot/dts/kuroboxHD.dts147
-rw-r--r--arch/powerpc/boot/dts/kuroboxHG.dts1
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts135
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts135
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts56
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts215
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts333
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts60
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts184
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts (renamed from arch/powerpc/boot/dts/mpc8349emds.dts)170
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts (renamed from arch/powerpc/boot/dts/mpc8360emds.dts)124
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts142
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts129
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts168
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts362
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts194
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts161
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts184
-rw-r--r--arch/powerpc/configs/cell_defconfig1
-rw-r--r--arch/powerpc/configs/celleb_defconfig1408
-rw-r--r--arch/powerpc/configs/linkstation_defconfig118
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig848
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig1409
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig (renamed from arch/powerpc/configs/mpc8360emds_defconfig)8
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig237
-rw-r--r--arch/powerpc/configs/mpc834x_itxgp_defconfig1174
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig10
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig1099
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig1010
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig829
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig827
-rw-r--r--arch/powerpc/configs/pasemi_defconfig1722
-rw-r--r--arch/powerpc/configs/ppc64_defconfig4
-rw-r--r--arch/powerpc/configs/ps3_defconfig269
-rw-r--r--arch/powerpc/configs/pseries_defconfig4
-rw-r--r--arch/powerpc/kernel/Makefile1
-rw-r--r--arch/powerpc/kernel/btext.c9
-rw-r--r--arch/powerpc/kernel/cpu_setup_pa6t.S44
-rw-r--r--arch/powerpc/kernel/cputable.c21
-rw-r--r--arch/powerpc/kernel/entry_64.S59
-rw-r--r--arch/powerpc/kernel/head_32.S5
-rw-r--r--arch/powerpc/kernel/head_44x.S2
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S7
-rw-r--r--arch/powerpc/kernel/idle.c13
-rw-r--r--arch/powerpc/kernel/iomap.c20
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/kprobes.c8
-rw-r--r--arch/powerpc/kernel/legacy_serial.c17
-rw-r--r--arch/powerpc/kernel/lparcfg.c13
-rw-r--r--arch/powerpc/kernel/misc_64.S40
-rw-r--r--arch/powerpc/kernel/module_32.c7
-rw-r--r--arch/powerpc/kernel/nvram_64.c2
-rw-r--r--arch/powerpc/kernel/pci_32.c1
-rw-r--r--arch/powerpc/kernel/pci_64.c3
-rw-r--r--arch/powerpc/kernel/pmc.c37
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c1
-rw-r--r--arch/powerpc/kernel/proc_ppc64.c3
-rw-r--r--arch/powerpc/kernel/prom.c21
-rw-r--r--arch/powerpc/kernel/prom_init.c81
-rw-r--r--arch/powerpc/kernel/prom_parse.c40
-rw-r--r--arch/powerpc/kernel/ptrace.c24
-rw-r--r--arch/powerpc/kernel/rtas-proc.c14
-rw-r--r--arch/powerpc/kernel/rtas.c2
-rw-r--r--arch/powerpc/kernel/rtas_flash.c9
-rw-r--r--arch/powerpc/kernel/setup_32.c9
-rw-r--r--arch/powerpc/kernel/smp.c23
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c67
-rw-r--r--arch/powerpc/kernel/sysfs.c141
-rw-r--r--arch/powerpc/kernel/traps.c117
-rw-r--r--arch/powerpc/kernel/udbg.c8
-rw-r--r--arch/powerpc/kernel/udbg_16550.c24
-rw-r--r--arch/powerpc/kernel/vdso.c124
-rw-r--r--arch/powerpc/kernel/vio.c6
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S4
-rw-r--r--arch/powerpc/lib/Makefile4
-rw-r--r--arch/powerpc/lib/dma-noncoherent.c (renamed from arch/ppc/kernel/dma-mapping.c)24
-rw-r--r--arch/powerpc/lib/rheap.c6
-rw-r--r--arch/powerpc/mm/hugetlbpage.c3
-rw-r--r--arch/powerpc/mm/mem.c27
-rw-r--r--arch/powerpc/mm/numa.c2
-rw-r--r--arch/powerpc/mm/pgtable_32.c5
-rw-r--r--arch/powerpc/mm/pgtable_64.c2
-rw-r--r--arch/powerpc/oprofile/common.c2
-rw-r--r--arch/powerpc/oprofile/op_model_7450.c10
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c149
-rw-r--r--arch/powerpc/oprofile/op_model_fsl_booke.c81
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c10
-rw-r--r--arch/powerpc/oprofile/op_model_rs64.c10
-rw-r--r--arch/powerpc/platforms/52xx/Makefile3
-rw-r--r--arch/powerpc/platforms/52xx/efika-pci.c119
-rw-r--r--arch/powerpc/platforms/52xx/efika-setup.c150
-rw-r--r--arch/powerpc/platforms/52xx/efika.c243
-rw-r--r--arch/powerpc/platforms/52xx/efika.h19
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c35
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c4
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c412
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c10
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx.c2
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c2
-rw-r--r--arch/powerpc/platforms/82xx/pq2ads.h5
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig32
-rw-r--r--arch/powerpc/platforms/83xx/Makefile5
-rw-r--r--arch/powerpc/platforms/83xx/misc.c29
-rw-r--r--arch/powerpc/platforms/83xx/mpc8313_rdb.c92
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c68
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c27
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c (renamed from arch/powerpc/platforms/83xx/mpc834x_sys.c)118
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.h23
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c (renamed from arch/powerpc/platforms/83xx/mpc8360e_pb.c)98
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h18
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig13
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c21
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c234
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c9
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_smp.c1
-rw-r--r--arch/powerpc/platforms/8xx/Kconfig300
-rw-r--r--arch/powerpc/platforms/8xx/Makefile6
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c303
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads.h95
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads_setup.c301
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads.h95
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c387
-rw-r--r--arch/powerpc/platforms/Makefile5
-rw-r--r--arch/powerpc/platforms/cell/Makefile7
-rw-r--r--arch/powerpc/platforms/cell/iommu.c5
-rw-r--r--arch/powerpc/platforms/cell/pmu.c14
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c3
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c366
-rw-r--r--arch/powerpc/platforms/cell/spu_priv1_mmio.c422
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c137
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c184
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c16
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c386
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h52
-rw-r--r--arch/powerpc/platforms/celleb/Makefile8
-rw-r--r--arch/powerpc/platforms/celleb/beat.c163
-rw-r--r--arch/powerpc/platforms/celleb/beat.h40
-rw-r--r--arch/powerpc/platforms/celleb/beat_syscall.h160
-rw-r--r--arch/powerpc/platforms/celleb/beat_wrapper.h220
-rw-r--r--arch/powerpc/platforms/celleb/htab.c308
-rw-r--r--arch/powerpc/platforms/celleb/hvCall.S287
-rw-r--r--arch/powerpc/platforms/celleb/interrupt.c274
-rw-r--r--arch/powerpc/platforms/celleb/interrupt.h33
-rw-r--r--arch/powerpc/platforms/celleb/iommu.c104
-rw-r--r--arch/powerpc/platforms/celleb/pci.c481
-rw-r--r--arch/powerpc/platforms/celleb/pci.h35
-rw-r--r--arch/powerpc/platforms/celleb/scc.h145
-rw-r--r--arch/powerpc/platforms/celleb/scc_epci.c409
-rw-r--r--arch/powerpc/platforms/celleb/scc_sio.c101
-rw-r--r--arch/powerpc/platforms/celleb/scc_uhc.c94
-rw-r--r--arch/powerpc/platforms/celleb/setup.c193
-rw-r--r--arch/powerpc/platforms/celleb/smp.c124
-rw-r--r--arch/powerpc/platforms/celleb/spu_priv1.c208
-rw-r--r--arch/powerpc/platforms/celleb/udbg_beat.c97
-rw-r--r--arch/powerpc/platforms/chrp/setup.c4
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c12
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c2
-rw-r--r--arch/powerpc/platforms/iseries/mf.c6
-rw-r--r--arch/powerpc/platforms/iseries/proc.c2
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/maple/pci.c23
-rw-r--r--arch/powerpc/platforms/maple/setup.c3
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig10
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile3
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c88
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c281
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h12
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c13
-rw-r--r--arch/powerpc/platforms/pasemi/powersave.S80
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c105
-rw-r--r--arch/powerpc/platforms/powermac/backlight.c27
-rw-r--r--arch/powerpc/platforms/powermac/pic.c2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c4
-rw-r--r--arch/powerpc/platforms/powermac/smp.c1
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig21
-rw-r--r--arch/powerpc/platforms/ps3/Makefile1
-rw-r--r--arch/powerpc/platforms/ps3/htab.c7
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c444
-rw-r--r--arch/powerpc/platforms/ps3/mm.c1
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c22
-rw-r--r--arch/powerpc/platforms/ps3/platform.h151
-rw-r--r--arch/powerpc/platforms/ps3/repository.c220
-rw-r--r--arch/powerpc/platforms/ps3/setup.c86
-rw-r--r--arch/powerpc/platforms/ps3/smp.c3
-rw-r--r--arch/powerpc/platforms/ps3/spu.c62
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c384
-rw-r--r--arch/powerpc/platforms/pseries/Makefile3
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c21
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c3
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c1
-rw-r--r--arch/powerpc/platforms/pseries/firmware.h17
-rw-r--r--arch/powerpc/platforms/pseries/hvCall_inst.c2
-rw-r--r--arch/powerpc/platforms/pseries/kexec.c72
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c55
-rw-r--r--arch/powerpc/platforms/pseries/pci.c6
-rw-r--r--arch/powerpc/platforms/pseries/power.c87
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h39
-rw-r--r--arch/powerpc/platforms/pseries/ras.c2
-rw-r--r--arch/powerpc/platforms/pseries/ras.h9
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c3
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c2
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c90
-rw-r--r--arch/powerpc/platforms/pseries/smp.c1
-rw-r--r--arch/powerpc/sysdev/Makefile3
-rw-r--r--arch/powerpc/sysdev/commproc.c398
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.c154
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.h2
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c367
-rw-r--r--arch/powerpc/sysdev/grackle.c2
-rw-r--r--arch/powerpc/sysdev/ipic.c17
-rw-r--r--arch/powerpc/sysdev/micropatch.c743
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.c197
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.h12
-rw-r--r--arch/powerpc/sysdev/mpic.c89
-rw-r--r--arch/powerpc/sysdev/pmi.c305
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c6
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c163
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c141
-rw-r--r--arch/powerpc/xmon/ppc-opc.c7
-rw-r--r--arch/powerpc/xmon/spu-dis.c2
-rw-r--r--arch/powerpc/xmon/spu-opc.c4
-rw-r--r--arch/powerpc/xmon/xmon.c1
-rw-r--r--arch/ppc/8xx_io/cs4218_tdm.c7
-rw-r--r--arch/ppc/Kconfig28
-rw-r--r--arch/ppc/boot/simple/Makefile4
-rw-r--r--arch/ppc/boot/simple/misc.c15
-rw-r--r--arch/ppc/configs/gemini_defconfig618
-rw-r--r--arch/ppc/configs/taishan_defconfig1077
-rw-r--r--arch/ppc/kernel/Makefile1
-rw-r--r--arch/ppc/kernel/head.S18
-rw-r--r--arch/ppc/kernel/head_fsl_booke.S7
-rw-r--r--arch/ppc/kernel/ppc_htab.c13
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c3
-rw-r--r--arch/ppc/kernel/setup.c2
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S2
-rw-r--r--arch/ppc/lib/rheap.c3
-rw-r--r--arch/ppc/mm/pgtable.c5
-rw-r--r--arch/ppc/platforms/4xx/Kconfig10
-rw-r--r--arch/ppc/platforms/4xx/Makefile1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c395
-rw-r--r--arch/ppc/platforms/4xx/taishan.h67
-rw-r--r--arch/ppc/platforms/Makefile1
-rw-r--r--arch/ppc/platforms/gemini.h165
-rw-r--r--arch/ppc/platforms/gemini_pci.c41
-rw-r--r--arch/ppc/platforms/gemini_prom.S90
-rw-r--r--arch/ppc/platforms/gemini_serial.h40
-rw-r--r--arch/ppc/platforms/gemini_setup.c577
-rw-r--r--arch/ppc/platforms/lopec.c2
-rw-r--r--arch/ppc/platforms/mpc866ads_setup.c2
-rw-r--r--arch/ppc/platforms/pplus.c2
-rw-r--r--arch/ppc/platforms/prep_setup.c4
-rw-r--r--arch/ppc/syslib/Makefile2
-rw-r--r--arch/ppc/syslib/i8259.c2
-rw-r--r--arch/ppc/syslib/m8260_pci_erratum9.c3
-rw-r--r--arch/ppc/syslib/m8xx_setup.c2
-rw-r--r--arch/ppc/syslib/ppc85xx_rio.c2
-rw-r--r--arch/ppc/xmon/ppc-opc.c7
-rw-r--r--arch/ppc/xmon/start.c5
-rw-r--r--arch/s390/Kconfig36
-rw-r--r--arch/s390/Makefile12
-rw-r--r--arch/s390/appldata/appldata.h3
-rw-r--r--arch/s390/appldata/appldata_base.c6
-rw-r--r--arch/s390/appldata/appldata_mem.c2
-rw-r--r--arch/s390/appldata/appldata_net_sum.c2
-rw-r--r--arch/s390/crypto/Kconfig60
-rw-r--r--arch/s390/crypto/Makefile3
-rw-r--r--arch/s390/crypto/aes_s390.c47
-rw-r--r--arch/s390/crypto/crypt_s390.h281
-rw-r--r--arch/s390/crypto/crypt_s390_query.c129
-rw-r--r--arch/s390/crypto/des_check_key.c6
-rw-r--r--arch/s390/crypto/des_s390.c8
-rw-r--r--arch/s390/crypto/prng.c213
-rw-r--r--arch/s390/crypto/sha1_s390.c83
-rw-r--r--arch/s390/crypto/sha256_s390.c11
-rw-r--r--arch/s390/defconfig36
-rw-r--r--arch/s390/hypfs/Makefile2
-rw-r--r--arch/s390/hypfs/hypfs.h9
-rw-r--r--arch/s390/hypfs/hypfs_diag.h16
-rw-r--r--arch/s390/hypfs/hypfs_vm.c231
-rw-r--r--arch/s390/hypfs/inode.c35
-rw-r--r--arch/s390/kernel/Makefile4
-rw-r--r--arch/s390/kernel/base.S150
-rw-r--r--arch/s390/kernel/binfmt_elf32.c2
-rw-r--r--arch/s390/kernel/compat_exec_domain.c5
-rw-r--r--arch/s390/kernel/compat_linux.c67
-rw-r--r--arch/s390/kernel/compat_linux.h31
-rw-r--r--arch/s390/kernel/compat_signal.c8
-rw-r--r--arch/s390/kernel/compat_wrapper.S6
-rw-r--r--arch/s390/kernel/cpcmd.c14
-rw-r--r--arch/s390/kernel/crash.c1
-rw-r--r--arch/s390/kernel/debug.c23
-rw-r--r--arch/s390/kernel/early.c307
-rw-r--r--arch/s390/kernel/ebcdic.c1
-rw-r--r--arch/s390/kernel/head31.S209
-rw-r--r--arch/s390/kernel/head64.S209
-rw-r--r--arch/s390/kernel/ipl.c139
-rw-r--r--arch/s390/kernel/irq.c15
-rw-r--r--arch/s390/kernel/kprobes.c32
-rw-r--r--arch/s390/kernel/machine_kexec.c1
-rw-r--r--arch/s390/kernel/module.c5
-rw-r--r--arch/s390/kernel/process.c4
-rw-r--r--arch/s390/kernel/profile.c20
-rw-r--r--arch/s390/kernel/ptrace.c46
-rw-r--r--arch/s390/kernel/reset.S90
-rw-r--r--arch/s390/kernel/s390_ext.c8
-rw-r--r--arch/s390/kernel/setup.c167
-rw-r--r--arch/s390/kernel/signal.c2
-rw-r--r--arch/s390/kernel/smp.c215
-rw-r--r--arch/s390/kernel/stacktrace.c10
-rw-r--r--arch/s390/kernel/syscalls.S2
-rw-r--r--arch/s390/kernel/time.c1195
-rw-r--r--arch/s390/kernel/traps.c24
-rw-r--r--arch/s390/kernel/vmlinux.lds.S16
-rw-r--r--arch/s390/kernel/vtime.c10
-rw-r--r--arch/s390/lib/Makefile2
-rw-r--r--arch/s390/lib/delay.c55
-rw-r--r--arch/s390/lib/qrnnd.S77
-rw-r--r--arch/s390/lib/uaccess.h23
-rw-r--r--arch/s390/lib/uaccess_mvcos.c78
-rw-r--r--arch/s390/lib/uaccess_pt.c329
-rw-r--r--arch/s390/lib/uaccess_std.c23
-rw-r--r--arch/s390/math-emu/Makefile2
-rw-r--r--arch/s390/math-emu/math.c2
-rw-r--r--arch/s390/math-emu/qrnnd.S77
-rw-r--r--arch/s390/math-emu/sfp-util.h66
-rw-r--r--arch/s390/mm/Makefile2
-rw-r--r--arch/s390/mm/cmm.c10
-rw-r--r--arch/s390/mm/extmem.c66
-rw-r--r--arch/s390/mm/fault.c97
-rw-r--r--arch/s390/mm/init.c22
-rw-r--r--arch/s390/mm/ioremap.c58
-rw-r--r--arch/s390/mm/vmem.c14
-rw-r--r--arch/sh/Kconfig24
-rw-r--r--arch/sh/Makefile3
-rw-r--r--arch/sh/boards/bigsur/Makefile6
-rw-r--r--arch/sh/boards/bigsur/io.c120
-rw-r--r--arch/sh/boards/bigsur/irq.c334
-rw-r--r--arch/sh/boards/bigsur/led.c54
-rw-r--r--arch/sh/boards/bigsur/setup.c88
-rw-r--r--arch/sh/boards/ec3104/Makefile6
-rw-r--r--arch/sh/boards/ec3104/io.c81
-rw-r--r--arch/sh/boards/ec3104/irq.c196
-rw-r--r--arch/sh/boards/ec3104/setup.c65
-rw-r--r--arch/sh/boards/hp6xx/hp6xx_apm.c68
-rw-r--r--arch/sh/boards/landisk/landisk_pwb.c2
-rw-r--r--arch/sh/boards/mpc1211/Makefile2
-rw-r--r--arch/sh/boards/mpc1211/led.c63
-rw-r--r--arch/sh/boards/mpc1211/setup.c31
-rw-r--r--arch/sh/boards/renesas/r7780rp/Makefile1
-rw-r--r--arch/sh/boards/renesas/r7780rp/io.c152
-rw-r--r--arch/sh/boards/renesas/r7780rp/led.c43
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c49
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/Makefile3
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/io.c302
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/irq.c80
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/led.c44
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c142
-rw-r--r--arch/sh/boards/se/7206/Makefile2
-rw-r--r--arch/sh/boards/se/7206/led.c57
-rw-r--r--arch/sh/boards/se/7206/setup.c34
-rw-r--r--arch/sh/boards/se/7300/Makefile2
-rw-r--r--arch/sh/boards/se/7300/led.c54
-rw-r--r--arch/sh/boards/se/7300/setup.c36
-rw-r--r--arch/sh/boards/se/73180/Makefile2
-rw-r--r--arch/sh/boards/se/73180/led.c53
-rw-r--r--arch/sh/boards/se/73180/setup.c31
-rw-r--r--arch/sh/boards/se/7343/Makefile2
-rw-r--r--arch/sh/boards/se/7343/led.c44
-rw-r--r--arch/sh/boards/se/7343/setup.c26
-rw-r--r--arch/sh/boards/se/770x/Makefile1
-rw-r--r--arch/sh/boards/se/770x/irq.c108
-rw-r--r--arch/sh/boards/se/770x/led.c52
-rw-r--r--arch/sh/boards/se/770x/setup.c43
-rw-r--r--arch/sh/boards/se/7751/Makefile1
-rw-r--r--arch/sh/boards/se/7751/led.c51
-rw-r--r--arch/sh/boards/se/7751/setup.c36
-rw-r--r--arch/sh/boards/sh03/Makefile1
-rw-r--r--arch/sh/boards/sh03/led.c48
-rw-r--r--arch/sh/boards/sh03/setup.c30
-rw-r--r--arch/sh/boards/shmin/setup.c12
-rw-r--r--arch/sh/cchips/voyagergx/irq.c70
-rw-r--r--arch/sh/cchips/voyagergx/setup.c4
-rw-r--r--arch/sh/configs/rts7751r2d_defconfig308
-rw-r--r--arch/sh/configs/se7750_defconfig140
-rw-r--r--arch/sh/drivers/Makefile1
-rw-r--r--arch/sh/drivers/dma/dma-sh.c45
-rw-r--r--arch/sh/drivers/heartbeat.c132
-rw-r--r--arch/sh/drivers/pci/Makefile1
-rw-r--r--arch/sh/drivers/pci/ops-bigsur.c83
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c9
-rw-r--r--arch/sh/kernel/Makefile4
-rw-r--r--arch/sh/kernel/apm.c538
-rw-r--r--arch/sh/kernel/cpu/init.c41
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c19
-rw-r--r--arch/sh/kernel/cpu/sh2/clock-sh7619.c4
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S12
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c32
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c62
-rw-r--r--arch/sh/kernel/cpu/sh2a/clock-sh7206.c4
-rw-r--r--arch/sh/kernel/cpu/sh2a/probe.c16
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c89
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S207
-rw-r--r--arch/sh/kernel/cpu/sh3/probe.c42
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7709.c21
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c183
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c4
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c66
-rw-r--r--arch/sh/kernel/debugtraps.S41
-rw-r--r--arch/sh/kernel/early_printk.c24
-rw-r--r--arch/sh/kernel/entry-common.S119
-rw-r--r--arch/sh/kernel/io_generic.c12
-rw-r--r--arch/sh/kernel/kgdb_stub.c7
-rw-r--r--arch/sh/kernel/process.c95
-rw-r--r--arch/sh/kernel/setup.c55
-rw-r--r--arch/sh/kernel/sh_ksyms.c1
-rw-r--r--arch/sh/kernel/signal.c6
-rw-r--r--arch/sh/kernel/syscalls.S8
-rw-r--r--arch/sh/kernel/time.c8
-rw-r--r--arch/sh/kernel/traps.c4
-rw-r--r--arch/sh/kernel/vmlinux.lds.S4
-rw-r--r--arch/sh/kernel/vsyscall/vsyscall.c58
-rw-r--r--arch/sh/mm/Kconfig5
-rw-r--r--arch/sh/mm/cache-debugfs.c6
-rw-r--r--arch/sh/mm/cache-sh3.c8
-rw-r--r--arch/sh/mm/cache-sh4.c77
-rw-r--r--arch/sh/mm/cache-sh7705.c29
-rw-r--r--arch/sh/mm/fault.c87
-rw-r--r--arch/sh/mm/init.c24
-rw-r--r--arch/sh/mm/ioremap.c6
-rw-r--r--arch/sh/mm/pg-sh4.c28
-rw-r--r--arch/sh/mm/pg-sh7705.c37
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--arch/sh/mm/tlb-flush.c101
-rw-r--r--arch/sh/mm/tlb-nommu.c19
-rw-r--r--arch/sh/mm/tlb-sh3.c67
-rw-r--r--arch/sh/mm/tlb-sh4.c70
-rw-r--r--arch/sh/oprofile/op_model_sh7750.c4
-rw-r--r--arch/sh/tools/mach-types1
-rw-r--r--arch/sh64/Kconfig3
-rw-r--r--arch/sh64/kernel/setup.c6
-rw-r--r--arch/sh64/kernel/time.c9
-rw-r--r--arch/sh64/kernel/traps.c51
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S4
-rw-r--r--arch/sh64/mm/init.c5
-rw-r--r--arch/sparc/Kconfig4
-rw-r--r--arch/sparc/kernel/Makefile4
-rw-r--r--arch/sparc/kernel/apc.c2
-rw-r--r--arch/sparc/kernel/setup.c2
-rw-r--r--arch/sparc/kernel/sunos_ioctl.c1
-rw-r--r--arch/sparc/kernel/sys_sunos.c10
-rw-r--r--arch/sparc/kernel/time.c9
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S4
-rw-r--r--arch/sparc64/Kconfig4
-rw-r--r--arch/sparc64/defconfig76
-rw-r--r--arch/sparc64/kernel/irq.c146
-rw-r--r--arch/sparc64/kernel/pci.c35
-rw-r--r--arch/sparc64/kernel/pci_common.c25
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c444
-rw-r--r--arch/sparc64/kernel/pci_sun4v.h61
-rw-r--r--arch/sparc64/kernel/pci_sun4v_asm.S266
-rw-r--r--arch/sparc64/kernel/setup.c2
-rw-r--r--arch/sparc64/kernel/sunos_ioctl32.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c64
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c11
-rw-r--r--arch/sparc64/kernel/systbls.S2
-rw-r--r--arch/sparc64/kernel/time.c2
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S4
-rw-r--r--arch/sparc64/mm/init.c8
-rw-r--r--arch/sparc64/solaris/socksys.c2
-rw-r--r--arch/um/Kconfig3
-rw-r--r--arch/um/drivers/chan_kern.c103
-rw-r--r--arch/um/drivers/harddog_kern.c58
-rw-r--r--arch/um/drivers/harddog_user.c23
-rw-r--r--arch/um/drivers/hostaudio_kern.c169
-rw-r--r--arch/um/drivers/line.c209
-rw-r--r--arch/um/drivers/mconsole_kern.c62
-rw-r--r--arch/um/drivers/mconsole_user.c2
-rw-r--r--arch/um/drivers/net_kern.c172
-rw-r--r--arch/um/drivers/port_kern.c50
-rw-r--r--arch/um/drivers/port_user.c51
-rw-r--r--arch/um/drivers/random.c1
-rw-r--r--arch/um/drivers/ssl.c44
-rw-r--r--arch/um/drivers/stdio_console.c51
-rw-r--r--arch/um/drivers/ubd_kern.c231
-rw-r--r--arch/um/include/chan_kern.h5
-rw-r--r--arch/um/include/chan_user.h21
-rw-r--r--arch/um/include/kern_util.h5
-rw-r--r--arch/um/include/line.h57
-rw-r--r--arch/um/include/mconsole_kern.h17
-rw-r--r--arch/um/include/net_kern.h14
-rw-r--r--arch/um/include/os.h3
-rw-r--r--arch/um/include/sigio.h11
-rw-r--r--arch/um/include/tempfile.h10
-rw-r--r--arch/um/include/umid.h22
-rw-r--r--arch/um/include/user_util.h2
-rw-r--r--arch/um/kernel/Makefile2
-rw-r--r--arch/um/kernel/exec.c2
-rw-r--r--arch/um/kernel/irq.c7
-rw-r--r--arch/um/kernel/mem.c90
-rw-r--r--arch/um/kernel/physmem.c74
-rw-r--r--arch/um/kernel/ptrace.c7
-rw-r--r--arch/um/kernel/resource.c23
-rw-r--r--arch/um/kernel/sigio.c7
-rw-r--r--arch/um/kernel/skas/mem.c6
-rw-r--r--arch/um/kernel/syscall.c16
-rw-r--r--arch/um/kernel/sysrq.c2
-rw-r--r--arch/um/kernel/time.c24
-rw-r--r--arch/um/kernel/trap.c28
-rw-r--r--arch/um/kernel/tt/gdb.c4
-rw-r--r--arch/um/kernel/tt/gdb_kern.c5
-rw-r--r--arch/um/kernel/um_arch.c9
-rw-r--r--arch/um/kernel/umid.c4
-rw-r--r--arch/um/os-Linux/aio.c16
-rw-r--r--arch/um/os-Linux/elf_aux.c3
-rw-r--r--arch/um/os-Linux/file.c19
-rw-r--r--arch/um/os-Linux/irq.c6
-rw-r--r--arch/um/os-Linux/mem.c16
-rw-r--r--arch/um/os-Linux/sigio.c38
-rw-r--r--arch/um/os-Linux/start_up.c207
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c14
-rw-r--r--arch/um/os-Linux/sys-x86_64/Makefile2
-rw-r--r--arch/um/os-Linux/sys-x86_64/prctl.c12
-rw-r--r--arch/um/os-Linux/sys-x86_64/registers.c6
-rw-r--r--arch/um/os-Linux/umid.c3
-rw-r--r--arch/um/sys-x86_64/ptrace.c5
-rw-r--r--arch/um/sys-x86_64/syscalls.c75
-rw-r--r--arch/um/sys-x86_64/tls.c11
-rw-r--r--arch/v850/Kconfig5
-rw-r--r--arch/v850/kernel/anna.c2
-rw-r--r--arch/v850/kernel/as85ep1.c2
-rw-r--r--arch/v850/kernel/fpga85e2c.c2
-rw-r--r--arch/v850/kernel/gbus_int.c6
-rw-r--r--arch/v850/kernel/ma.c2
-rw-r--r--arch/v850/kernel/me2.c2
-rw-r--r--arch/v850/kernel/rte_cb.c4
-rw-r--r--arch/v850/kernel/rte_cb_leds.c2
-rw-r--r--arch/v850/kernel/rte_mb_a_pci.c3
-rw-r--r--arch/v850/kernel/rte_me2_cb.c3
-rw-r--r--arch/v850/kernel/setup.c6
-rw-r--r--arch/v850/kernel/teg.c2
-rw-r--r--arch/v850/kernel/time.c8
-rw-r--r--arch/v850/kernel/vmlinux.lds.S4
-rw-r--r--arch/x86_64/Kconfig34
-rw-r--r--arch/x86_64/defconfig45
-rw-r--r--arch/x86_64/ia32/ia32_binfmt.c34
-rw-r--r--arch/x86_64/ia32/ia32_signal.c11
-rw-r--r--arch/x86_64/ia32/ia32entry.S3
-rw-r--r--arch/x86_64/ia32/sys_ia32.c66
-rw-r--r--arch/x86_64/ia32/syscall32.c59
-rw-r--r--arch/x86_64/kernel/Makefile6
-rw-r--r--arch/x86_64/kernel/acpi/sleep.c2
-rw-r--r--arch/x86_64/kernel/apic.c5
-rw-r--r--arch/x86_64/kernel/e820.c38
-rw-r--r--arch/x86_64/kernel/early-quirks.c6
-rw-r--r--arch/x86_64/kernel/entry.S3
-rw-r--r--arch/x86_64/kernel/genapic.c4
-rw-r--r--arch/x86_64/kernel/head.S20
-rw-r--r--arch/x86_64/kernel/head64.c4
-rw-r--r--arch/x86_64/kernel/hpet.c (renamed from arch/i386/kernel/time_hpet.c)406
-rw-r--r--arch/x86_64/kernel/i8259.c53
-rw-r--r--arch/x86_64/kernel/io_apic.c476
-rw-r--r--arch/x86_64/kernel/ioport.c2
-rw-r--r--arch/x86_64/kernel/irq.c12
-rw-r--r--arch/x86_64/kernel/mce.c68
-rw-r--r--arch/x86_64/kernel/mce_amd.c46
-rw-r--r--arch/x86_64/kernel/mpparse.c2
-rw-r--r--arch/x86_64/kernel/nmi.c75
-rw-r--r--arch/x86_64/kernel/pci-calgary.c17
-rw-r--r--arch/x86_64/kernel/pci-dma.c28
-rw-r--r--arch/x86_64/kernel/pci-gart.c4
-rw-r--r--arch/x86_64/kernel/pci-swiotlb.c2
-rw-r--r--arch/x86_64/kernel/pmtimer.c58
-rw-r--r--arch/x86_64/kernel/ptrace.c8
-rw-r--r--arch/x86_64/kernel/setup.c175
-rw-r--r--arch/x86_64/kernel/setup64.c1
-rw-r--r--arch/x86_64/kernel/smpboot.c231
-rw-r--r--arch/x86_64/kernel/stacktrace.c5
-rw-r--r--arch/x86_64/kernel/time.c973
-rw-r--r--arch/x86_64/kernel/tsc.c226
-rw-r--r--arch/x86_64/kernel/tsc_sync.c187
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S32
-rw-r--r--arch/x86_64/kernel/vsyscall.c127
-rw-r--r--arch/x86_64/kernel/x8664_ksyms.c5
-rw-r--r--arch/x86_64/lib/Makefile2
-rw-r--r--arch/x86_64/lib/copy_user_nocache.S217
-rw-r--r--arch/x86_64/mm/fault.c39
-rw-r--r--arch/x86_64/mm/init.c24
-rw-r--r--arch/x86_64/mm/numa.c202
-rw-r--r--arch/x86_64/mm/pageattr.c4
-rw-r--r--arch/x86_64/mm/srat.c48
-rw-r--r--arch/x86_64/pci/Makefile3
-rw-r--r--arch/x86_64/pci/mmconfig.c123
-rw-r--r--arch/xtensa/Kconfig7
-rw-r--r--arch/xtensa/kernel/setup.c6
-rw-r--r--arch/xtensa/kernel/time.c9
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S2
1307 files changed, 71280 insertions, 31604 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 84caf50725b5..770f717bd250 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -41,6 +41,10 @@ config GENERIC_CALIBRATE_DELAY
41 bool 41 bool
42 default y 42 default y
43 43
44config ZONE_DMA
45 bool
46 default y
47
44config GENERIC_ISA_DMA 48config GENERIC_ISA_DMA
45 bool 49 bool
46 default y 50 default y
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 3c10b9a1ddf5..ab642a4f08de 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -575,3 +575,7 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
575 575
576EXPORT_SYMBOL(pci_iomap); 576EXPORT_SYMBOL(pci_iomap);
577EXPORT_SYMBOL(pci_iounmap); 577EXPORT_SYMBOL(pci_iounmap);
578
579/* FIXME: Some boxes have multiple ISA bridges! */
580struct pci_dev *isa_bridge;
581EXPORT_SYMBOL(isa_bridge);
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 1aea7c7c683c..d352c2b05f1a 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -122,7 +122,7 @@ static void get_sysnames(unsigned long, unsigned long, unsigned long,
122 char **, char **); 122 char **, char **);
123static void determine_cpu_caches (unsigned int); 123static void determine_cpu_caches (unsigned int);
124 124
125static char command_line[COMMAND_LINE_SIZE]; 125static char __initdata command_line[COMMAND_LINE_SIZE];
126 126
127/* 127/*
128 * The format of "screen_info" is strange, and due to early 128 * The format of "screen_info" is strange, and due to early
@@ -547,7 +547,7 @@ setup_arch(char **cmdline_p)
547 } else { 547 } else {
548 strlcpy(command_line, COMMAND_LINE, sizeof command_line); 548 strlcpy(command_line, COMMAND_LINE, sizeof command_line);
549 } 549 }
550 strcpy(saved_command_line, command_line); 550 strcpy(boot_command_line, command_line);
551 *cmdline_p = command_line; 551 *cmdline_p = command_line;
552 552
553 /* 553 /*
@@ -589,7 +589,7 @@ setup_arch(char **cmdline_p)
589 } 589 }
590 590
591 /* Replace the command line, now that we've killed it with strsep. */ 591 /* Replace the command line, now that we've killed it with strsep. */
592 strcpy(command_line, saved_command_line); 592 strcpy(command_line, boot_command_line);
593 593
594 /* If we want SRM console printk echoing early, do it now. */ 594 /* If we want SRM console printk echoing early, do it now. */
595 if (alpha_using_srm && srmcons_output) { 595 if (alpha_using_srm && srmcons_output) {
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index d7053eb4ffcf..4748e14a28bc 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -91,17 +91,6 @@ static inline __u32 rpcc(void)
91} 91}
92 92
93/* 93/*
94 * Scheduler clock - returns current time in nanosec units.
95 *
96 * Copied from ARM code for expediency... ;-}
97 */
98unsigned long long sched_clock(void)
99{
100 return (unsigned long long)jiffies * (1000000000 / HZ);
101}
102
103
104/*
105 * timer_interrupt() needs to keep up the real-time clock, 94 * timer_interrupt() needs to keep up the real-time clock,
106 * as well as call the "do_timer()" routine every clocktick 95 * as well as call the "do_timer()" routine every clocktick
107 */ 96 */
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 76bf071e376c..4cc44bd33d33 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -52,10 +52,12 @@ SECTIONS
52 } 52 }
53 __initcall_end = .; 53 __initcall_end = .;
54 54
55#ifdef CONFIG_BLK_DEV_INITRD
55 . = ALIGN(8192); 56 . = ALIGN(8192);
56 __initramfs_start = .; 57 __initramfs_start = .;
57 .init.ramfs : { *(.init.ramfs) } 58 .init.ramfs : { *(.init.ramfs) }
58 __initramfs_end = .; 59 __initramfs_end = .;
60#endif
59 61
60 . = ALIGN(8); 62 . = ALIGN(8);
61 .con_initcall.init : { 63 .con_initcall.init : {
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6783c2e5512d..4409561ea32c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -9,6 +9,7 @@ config ARM
9 bool 9 bool
10 default y 10 default y
11 select RTC_LIB 11 select RTC_LIB
12 select SYS_SUPPORTS_APM_EMULATION
12 help 13 help
13 The ARM series is a line of low-power-consumption RISC chip designs 14 The ARM series is a line of low-power-consumption RISC chip designs
14 licensed by ARM Ltd and targeted at embedded applications and 15 licensed by ARM Ltd and targeted at embedded applications and
@@ -17,6 +18,9 @@ config ARM
17 Europe. There is an ARM Linux project with a web page at 18 Europe. There is an ARM Linux project with a web page at
18 <http://www.arm.linux.org.uk/>. 19 <http://www.arm.linux.org.uk/>.
19 20
21config SYS_SUPPORTS_APM_EMULATION
22 bool
23
20config GENERIC_TIME 24config GENERIC_TIME
21 bool 25 bool
22 default n 26 default n
@@ -25,6 +29,10 @@ config MMU
25 bool 29 bool
26 default y 30 default y
27 31
32config NO_IOPORT
33 bool
34 default n
35
28config EISA 36config EISA
29 bool 37 bool
30 ---help--- 38 ---help---
@@ -96,6 +104,10 @@ config GENERIC_BUST_SPINLOCK
96config ARCH_MAY_HAVE_PC_FDC 104config ARCH_MAY_HAVE_PC_FDC
97 bool 105 bool
98 106
107config ZONE_DMA
108 bool
109 default y
110
99config GENERIC_ISA_DMA 111config GENERIC_ISA_DMA
100 bool 112 bool
101 113
@@ -233,6 +245,8 @@ config ARCH_IOP33X
233 245
234config ARCH_IOP13XX 246config ARCH_IOP13XX
235 bool "IOP13xx-based" 247 bool "IOP13xx-based"
248 depends on MMU
249 select PLAT_IOP
236 select PCI 250 select PCI
237 help 251 help
238 Support for Intel's IOP13XX (XScale) family of processors. 252 Support for Intel's IOP13XX (XScale) family of processors.
@@ -271,6 +285,14 @@ config ARCH_L7200
271 If you have any questions or comments about the Linux kernel port 285 If you have any questions or comments about the Linux kernel port
272 to this board, send e-mail to <sjhill@cotw.com>. 286 to this board, send e-mail to <sjhill@cotw.com>.
273 287
288config ARCH_NS9XXX
289 bool "NetSilicon NS9xxx"
290 help
291 Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
292 System.
293
294 <http://www.digi.com/products/microprocessors/index.jsp>
295
274config ARCH_PNX4008 296config ARCH_PNX4008
275 bool "Philips Nexperia PNX4008 Mobile" 297 bool "Philips Nexperia PNX4008 Mobile"
276 help 298 help
@@ -280,6 +302,7 @@ config ARCH_PXA
280 bool "PXA2xx-based" 302 bool "PXA2xx-based"
281 depends on MMU 303 depends on MMU
282 select ARCH_MTD_XIP 304 select ARCH_MTD_XIP
305 select GENERIC_TIME
283 help 306 help
284 Support for Intel's PXA2XX processor line. 307 Support for Intel's PXA2XX processor line.
285 308
@@ -290,6 +313,7 @@ config ARCH_RPC
290 select TIMER_ACORN 313 select TIMER_ACORN
291 select ARCH_MAY_HAVE_PC_FDC 314 select ARCH_MAY_HAVE_PC_FDC
292 select ISA_DMA_API 315 select ISA_DMA_API
316 select NO_IOPORT
293 help 317 help
294 On the Acorn Risc-PC, Linux can support the internal IDE disk and 318 On the Acorn Risc-PC, Linux can support the internal IDE disk and
295 CD-ROM interface, serial and parallel port, and the floppy drive. 319 CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -303,7 +327,7 @@ config ARCH_SA1100
303 Support for StrongARM 11x0 based boards. 327 Support for StrongARM 11x0 based boards.
304 328
305config ARCH_S3C2410 329config ARCH_S3C2410
306 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442" 330 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
307 help 331 help
308 Samsung S3C2410X CPU based systems, such as the Simtec Electronics 332 Samsung S3C2410X CPU based systems, such as the Simtec Electronics
309 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or 333 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -363,7 +387,16 @@ source "arch/arm/mach-omap1/Kconfig"
363 387
364source "arch/arm/mach-omap2/Kconfig" 388source "arch/arm/mach-omap2/Kconfig"
365 389
390source "arch/arm/plat-s3c24xx/Kconfig"
391
392if ARCH_S3C2410
393source "arch/arm/mach-s3c2400/Kconfig"
366source "arch/arm/mach-s3c2410/Kconfig" 394source "arch/arm/mach-s3c2410/Kconfig"
395source "arch/arm/mach-s3c2412/Kconfig"
396source "arch/arm/mach-s3c2440/Kconfig"
397source "arch/arm/mach-s3c2442/Kconfig"
398source "arch/arm/mach-s3c2443/Kconfig"
399endif
367 400
368source "arch/arm/mach-lh7a40x/Kconfig" 401source "arch/arm/mach-lh7a40x/Kconfig"
369 402
@@ -377,10 +410,12 @@ source "arch/arm/mach-aaec2000/Kconfig"
377 410
378source "arch/arm/mach-realview/Kconfig" 411source "arch/arm/mach-realview/Kconfig"
379 412
380source "arch/arm/mach-at91rm9200/Kconfig" 413source "arch/arm/mach-at91/Kconfig"
381 414
382source "arch/arm/mach-netx/Kconfig" 415source "arch/arm/mach-netx/Kconfig"
383 416
417source "arch/arm/mach-ns9xxx/Kconfig"
418
384# Definitions to make life easier 419# Definitions to make life easier
385config ARCH_ACORN 420config ARCH_ACORN
386 bool 421 bool
@@ -392,7 +427,7 @@ source arch/arm/mm/Kconfig
392 427
393config IWMMXT 428config IWMMXT
394 bool "Enable iWMMXt support" 429 bool "Enable iWMMXt support"
395 depends CPU_XSCALE || CPU_XSC3 430 depends on CPU_XSCALE || CPU_XSC3
396 default y if PXA27x 431 default y if PXA27x
397 help 432 help
398 Enable support for iWMMXt context switching at run time if 433 Enable support for iWMMXt context switching at run time if
@@ -738,6 +773,20 @@ config XIP_PHYS_ADDR
738 be linked for and stored to. This address is dependent on your 773 be linked for and stored to. This address is dependent on your
739 own flash usage. 774 own flash usage.
740 775
776config KEXEC
777 bool "Kexec system call (EXPERIMENTAL)"
778 depends on EXPERIMENTAL
779 help
780 kexec is a system call that implements the ability to shutdown your
781 current kernel, and to start another kernel. It is like a reboot
782 but it is indepedent of the system firmware. And like a reboot
783 you can start any kernel with it, not just Linux.
784
785 It is an ongoing process to be certain the hardware in a machine
786 is properly shutdown, so do not be surprised if this code does not
787 initially work for you. It may help to enable device hotplugging
788 support.
789
741endmenu 790endmenu
742 791
743if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX ) 792if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )
@@ -856,31 +905,6 @@ menu "Power management options"
856 905
857source "kernel/power/Kconfig" 906source "kernel/power/Kconfig"
858 907
859config APM
860 tristate "Advanced Power Management Emulation"
861 ---help---
862 APM is a BIOS specification for saving power using several different
863 techniques. This is mostly useful for battery powered laptops with
864 APM compliant BIOSes. If you say Y here, the system time will be
865 reset after a RESUME operation, the /proc/apm device will provide
866 battery status information, and user-space programs will receive
867 notification of APM "events" (e.g. battery status change).
868
869 In order to use APM, you will need supporting software. For location
870 and more information, read <file:Documentation/pm.txt> and the
871 Battery Powered Linux mini-HOWTO, available from
872 <http://www.tldp.org/docs.html#howto>.
873
874 This driver does not spin down disk drives (see the hdparm(8)
875 manpage ("man 8 hdparm") for that), and it doesn't turn off
876 VESA-compliant "green" monitors.
877
878 Generally, if you don't have a battery in your machine, there isn't
879 much point in using this driver and you should say N. If you get
880 random kernel OOPSes or reboots that don't seem to be related to
881 anything, try disabling/enabling this option (or disabling/enabling
882 APM in your BIOS).
883
884endmenu 908endmenu
885 909
886source "net/Kconfig" 910source "net/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 000f1100b553..ab9f2d4bd04e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -124,10 +124,12 @@ endif
124 machine-$(CONFIG_ARCH_H720X) := h720x 124 machine-$(CONFIG_ARCH_H720X) := h720x
125 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 125 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
126 machine-$(CONFIG_ARCH_REALVIEW) := realview 126 machine-$(CONFIG_ARCH_REALVIEW) := realview
127 machine-$(CONFIG_ARCH_AT91) := at91rm9200 127 machine-$(CONFIG_ARCH_AT91) := at91
128 machine-$(CONFIG_ARCH_EP93XX) := ep93xx 128 machine-$(CONFIG_ARCH_EP93XX) := ep93xx
129 machine-$(CONFIG_ARCH_PNX4008) := pnx4008 129 machine-$(CONFIG_ARCH_PNX4008) := pnx4008
130 machine-$(CONFIG_ARCH_NETX) := netx 130 machine-$(CONFIG_ARCH_NETX) := netx
131 machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
132 textofs-$(CONFIG_ARCH_NS9XXX) := 0x00108000
131 133
132ifeq ($(CONFIG_ARCH_EBSA110),y) 134ifeq ($(CONFIG_ARCH_EBSA110),y)
133# This is what happens if you forget the IOCS16 line. 135# This is what happens if you forget the IOCS16 line.
@@ -149,7 +151,7 @@ MACHINE := arch/arm/mach-$(machine-y)/
149else 151else
150MACHINE := 152MACHINE :=
151endif 153endif
152 154
153export TEXT_OFFSET GZFLAGS MMUEXT 155export TEXT_OFFSET GZFLAGS MMUEXT
154 156
155# Do we have FASTFPE? 157# Do we have FASTFPE?
@@ -161,6 +163,11 @@ endif
161# If we have a machine-specific directory, then include it in the build. 163# If we have a machine-specific directory, then include it in the build.
162core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ 164core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
163core-y += $(MACHINE) 165core-y += $(MACHINE)
166core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2400/
167core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2412/
168core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2440/
169core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2442/
170core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2443/
164core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ 171core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
165core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 172core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
166core-$(CONFIG_VFP) += arch/arm/vfp/ 173core-$(CONFIG_VFP) += arch/arm/vfp/
@@ -168,6 +175,7 @@ core-$(CONFIG_VFP) += arch/arm/vfp/
168# If we have a common platform directory, then include it in the build. 175# If we have a common platform directory, then include it in the build.
169core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/ 176core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/
170core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ 177core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
178core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/
171 179
172drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 180drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
173drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ 181drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
new file mode 100644
index 000000000000..171a0853caf8
--- /dev/null
+++ b/arch/arm/boot/.gitignore
@@ -0,0 +1,2 @@
1Image
2zImage
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
new file mode 100644
index 000000000000..aefee20cbf98
--- /dev/null
+++ b/arch/arm/boot/compressed/.gitignore
@@ -0,0 +1 @@
piggy.gz
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 2e635b814c14..6fbe7722aa44 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -32,7 +32,6 @@
32 32
33#include <asm/cacheflush.h> 33#include <asm/cacheflush.h>
34 34
35#undef DEBUG
36#undef STATS 35#undef STATS
37 36
38#ifdef STATS 37#ifdef STATS
@@ -66,14 +65,13 @@ struct dmabounce_pool {
66}; 65};
67 66
68struct dmabounce_device_info { 67struct dmabounce_device_info {
69 struct list_head node;
70
71 struct device *dev; 68 struct device *dev;
72 struct list_head safe_buffers; 69 struct list_head safe_buffers;
73#ifdef STATS 70#ifdef STATS
74 unsigned long total_allocs; 71 unsigned long total_allocs;
75 unsigned long map_op_count; 72 unsigned long map_op_count;
76 unsigned long bounce_count; 73 unsigned long bounce_count;
74 int attr_res;
77#endif 75#endif
78 struct dmabounce_pool small; 76 struct dmabounce_pool small;
79 struct dmabounce_pool large; 77 struct dmabounce_pool large;
@@ -81,33 +79,23 @@ struct dmabounce_device_info {
81 rwlock_t lock; 79 rwlock_t lock;
82}; 80};
83 81
84static LIST_HEAD(dmabounce_devs);
85
86#ifdef STATS 82#ifdef STATS
87static void print_alloc_stats(struct dmabounce_device_info *device_info) 83static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr,
84 char *buf)
88{ 85{
89 printk(KERN_INFO 86 struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
90 "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", 87 return sprintf(buf, "%lu %lu %lu %lu %lu %lu\n",
91 device_info->dev->bus_id, 88 device_info->small.allocs,
92 device_info->small.allocs, device_info->large.allocs, 89 device_info->large.allocs,
93 device_info->total_allocs - device_info->small.allocs - 90 device_info->total_allocs - device_info->small.allocs -
94 device_info->large.allocs, 91 device_info->large.allocs,
95 device_info->total_allocs); 92 device_info->total_allocs,
93 device_info->map_op_count,
94 device_info->bounce_count);
96} 95}
97#endif
98
99/* find the given device in the dmabounce device list */
100static inline struct dmabounce_device_info *
101find_dmabounce_dev(struct device *dev)
102{
103 struct dmabounce_device_info *d;
104 96
105 list_for_each_entry(d, &dmabounce_devs, node) 97static DEVICE_ATTR(dmabounce_stats, 0400, dmabounce_show, NULL);
106 if (d->dev == dev) 98#endif
107 return d;
108
109 return NULL;
110}
111 99
112 100
113/* allocate a 'safe' buffer and keep track of it */ 101/* allocate a 'safe' buffer and keep track of it */
@@ -162,8 +150,6 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
162 if (pool) 150 if (pool)
163 pool->allocs++; 151 pool->allocs++;
164 device_info->total_allocs++; 152 device_info->total_allocs++;
165 if (device_info->total_allocs % 1000 == 0)
166 print_alloc_stats(device_info);
167#endif 153#endif
168 154
169 write_lock_irqsave(&device_info->lock, flags); 155 write_lock_irqsave(&device_info->lock, flags);
@@ -218,20 +204,11 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
218 204
219/* ************************************************** */ 205/* ************************************************** */
220 206
221#ifdef STATS
222static void print_map_stats(struct dmabounce_device_info *device_info)
223{
224 dev_info(device_info->dev,
225 "dmabounce: map_op_count=%lu, bounce_count=%lu\n",
226 device_info->map_op_count, device_info->bounce_count);
227}
228#endif
229
230static inline dma_addr_t 207static inline dma_addr_t
231map_single(struct device *dev, void *ptr, size_t size, 208map_single(struct device *dev, void *ptr, size_t size,
232 enum dma_data_direction dir) 209 enum dma_data_direction dir)
233{ 210{
234 struct dmabounce_device_info *device_info = find_dmabounce_dev(dev); 211 struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
235 dma_addr_t dma_addr; 212 dma_addr_t dma_addr;
236 int needs_bounce = 0; 213 int needs_bounce = 0;
237 214
@@ -281,10 +258,14 @@ map_single(struct device *dev, void *ptr, size_t size,
281 ptr = buf->safe; 258 ptr = buf->safe;
282 259
283 dma_addr = buf->safe_dma_addr; 260 dma_addr = buf->safe_dma_addr;
261 } else {
262 /*
263 * We don't need to sync the DMA buffer since
264 * it was allocated via the coherent allocators.
265 */
266 consistent_sync(ptr, size, dir);
284 } 267 }
285 268
286 consistent_sync(ptr, size, dir);
287
288 return dma_addr; 269 return dma_addr;
289} 270}
290 271
@@ -292,7 +273,7 @@ static inline void
292unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 273unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
293 enum dma_data_direction dir) 274 enum dma_data_direction dir)
294{ 275{
295 struct dmabounce_device_info *device_info = find_dmabounce_dev(dev); 276 struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
296 struct safe_buffer *buf = NULL; 277 struct safe_buffer *buf = NULL;
297 278
298 /* 279 /*
@@ -317,12 +298,12 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
317 DO_STATS ( device_info->bounce_count++ ); 298 DO_STATS ( device_info->bounce_count++ );
318 299
319 if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) { 300 if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
320 unsigned long ptr; 301 void *ptr = buf->ptr;
321 302
322 dev_dbg(dev, 303 dev_dbg(dev,
323 "%s: copy back safe %p to unsafe %p size %d\n", 304 "%s: copy back safe %p to unsafe %p size %d\n",
324 __func__, buf->safe, buf->ptr, size); 305 __func__, buf->safe, ptr, size);
325 memcpy(buf->ptr, buf->safe, size); 306 memcpy(ptr, buf->safe, size);
326 307
327 /* 308 /*
328 * DMA buffers must have the same cache properties 309 * DMA buffers must have the same cache properties
@@ -332,8 +313,8 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
332 * bidirectional case because we know the cache 313 * bidirectional case because we know the cache
333 * lines will be coherent with the data written. 314 * lines will be coherent with the data written.
334 */ 315 */
335 ptr = (unsigned long)buf->ptr;
336 dmac_clean_range(ptr, ptr + size); 316 dmac_clean_range(ptr, ptr + size);
317 outer_clean_range(__pa(ptr), __pa(ptr) + size);
337 } 318 }
338 free_safe_buffer(device_info, buf); 319 free_safe_buffer(device_info, buf);
339 } 320 }
@@ -343,7 +324,7 @@ static inline void
343sync_single(struct device *dev, dma_addr_t dma_addr, size_t size, 324sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
344 enum dma_data_direction dir) 325 enum dma_data_direction dir)
345{ 326{
346 struct dmabounce_device_info *device_info = find_dmabounce_dev(dev); 327 struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
347 struct safe_buffer *buf = NULL; 328 struct safe_buffer *buf = NULL;
348 329
349 if (device_info) 330 if (device_info)
@@ -397,7 +378,10 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
397 default: 378 default:
398 BUG(); 379 BUG();
399 } 380 }
400 consistent_sync(buf->safe, size, dir); 381 /*
382 * No need to sync the safe buffer - it was allocated
383 * via the coherent allocators.
384 */
401 } else { 385 } else {
402 consistent_sync(dma_to_virt(dev, dma_addr), size, dir); 386 consistent_sync(dma_to_virt(dev, dma_addr), size, dir);
403 } 387 }
@@ -604,9 +588,10 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
604 device_info->total_allocs = 0; 588 device_info->total_allocs = 0;
605 device_info->map_op_count = 0; 589 device_info->map_op_count = 0;
606 device_info->bounce_count = 0; 590 device_info->bounce_count = 0;
591 device_info->attr_res = device_create_file(dev, &dev_attr_dmabounce_stats);
607#endif 592#endif
608 593
609 list_add(&device_info->node, &dmabounce_devs); 594 dev->archdata.dmabounce = device_info;
610 595
611 printk(KERN_INFO "dmabounce: registered device %s on %s bus\n", 596 printk(KERN_INFO "dmabounce: registered device %s on %s bus\n",
612 dev->bus_id, dev->bus->name); 597 dev->bus_id, dev->bus->name);
@@ -623,7 +608,9 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
623void 608void
624dmabounce_unregister_dev(struct device *dev) 609dmabounce_unregister_dev(struct device *dev)
625{ 610{
626 struct dmabounce_device_info *device_info = find_dmabounce_dev(dev); 611 struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
612
613 dev->archdata.dmabounce = NULL;
627 614
628 if (!device_info) { 615 if (!device_info) {
629 printk(KERN_WARNING 616 printk(KERN_WARNING
@@ -645,12 +632,10 @@ dmabounce_unregister_dev(struct device *dev)
645 dma_pool_destroy(device_info->large.pool); 632 dma_pool_destroy(device_info->large.pool);
646 633
647#ifdef STATS 634#ifdef STATS
648 print_alloc_stats(device_info); 635 if (device_info->attr_res == 0)
649 print_map_stats(device_info); 636 device_remove_file(dev, &dev_attr_dmabounce_stats);
650#endif 637#endif
651 638
652 list_del(&device_info->node);
653
654 kfree(device_info); 639 kfree(device_info);
655 640
656 printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n", 641 printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n",
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 09b9d1b6844c..4deece5fbdf4 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -14,7 +14,9 @@
14 * 14 *
15 * o There is one CPU Interface per CPU, which sends interrupts sent 15 * o There is one CPU Interface per CPU, which sends interrupts sent
16 * by the Distributor, and interrupts generated locally, to the 16 * by the Distributor, and interrupts generated locally, to the
17 * associated CPU. 17 * associated CPU. The base address of the CPU interface is usually
18 * aliased so that the same address points to different chips depending
19 * on the CPU it is accessed from.
18 * 20 *
19 * Note that IRQs 0-31 are special - they are local to each CPU. 21 * Note that IRQs 0-31 are special - they are local to each CPU.
20 * As such, the enable set/clear, pending set/clear and active bit 22 * As such, the enable set/clear, pending set/clear and active bit
@@ -31,10 +33,38 @@
31#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
32#include <asm/hardware/gic.h> 34#include <asm/hardware/gic.h>
33 35
34static void __iomem *gic_dist_base;
35static void __iomem *gic_cpu_base;
36static DEFINE_SPINLOCK(irq_controller_lock); 36static DEFINE_SPINLOCK(irq_controller_lock);
37 37
38struct gic_chip_data {
39 unsigned int irq_offset;
40 void __iomem *dist_base;
41 void __iomem *cpu_base;
42};
43
44#ifndef MAX_GIC_NR
45#define MAX_GIC_NR 1
46#endif
47
48static struct gic_chip_data gic_data[MAX_GIC_NR];
49
50static inline void __iomem *gic_dist_base(unsigned int irq)
51{
52 struct gic_chip_data *gic_data = get_irq_chip_data(irq);
53 return gic_data->dist_base;
54}
55
56static inline void __iomem *gic_cpu_base(unsigned int irq)
57{
58 struct gic_chip_data *gic_data = get_irq_chip_data(irq);
59 return gic_data->cpu_base;
60}
61
62static inline unsigned int gic_irq(unsigned int irq)
63{
64 struct gic_chip_data *gic_data = get_irq_chip_data(irq);
65 return irq - gic_data->irq_offset;
66}
67
38/* 68/*
39 * Routines to acknowledge, disable and enable interrupts 69 * Routines to acknowledge, disable and enable interrupts
40 * 70 *
@@ -55,8 +85,8 @@ static void gic_ack_irq(unsigned int irq)
55 u32 mask = 1 << (irq % 32); 85 u32 mask = 1 << (irq % 32);
56 86
57 spin_lock(&irq_controller_lock); 87 spin_lock(&irq_controller_lock);
58 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); 88 writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4);
59 writel(irq, gic_cpu_base + GIC_CPU_EOI); 89 writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI);
60 spin_unlock(&irq_controller_lock); 90 spin_unlock(&irq_controller_lock);
61} 91}
62 92
@@ -65,7 +95,7 @@ static void gic_mask_irq(unsigned int irq)
65 u32 mask = 1 << (irq % 32); 95 u32 mask = 1 << (irq % 32);
66 96
67 spin_lock(&irq_controller_lock); 97 spin_lock(&irq_controller_lock);
68 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); 98 writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4);
69 spin_unlock(&irq_controller_lock); 99 spin_unlock(&irq_controller_lock);
70} 100}
71 101
@@ -74,14 +104,14 @@ static void gic_unmask_irq(unsigned int irq)
74 u32 mask = 1 << (irq % 32); 104 u32 mask = 1 << (irq % 32);
75 105
76 spin_lock(&irq_controller_lock); 106 spin_lock(&irq_controller_lock);
77 writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4); 107 writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_SET + (gic_irq(irq) / 32) * 4);
78 spin_unlock(&irq_controller_lock); 108 spin_unlock(&irq_controller_lock);
79} 109}
80 110
81#ifdef CONFIG_SMP 111#ifdef CONFIG_SMP
82static void gic_set_cpu(unsigned int irq, cpumask_t mask_val) 112static void gic_set_cpu(unsigned int irq, cpumask_t mask_val)
83{ 113{
84 void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3); 114 void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3);
85 unsigned int shift = (irq % 4) * 8; 115 unsigned int shift = (irq % 4) * 8;
86 unsigned int cpu = first_cpu(mask_val); 116 unsigned int cpu = first_cpu(mask_val);
87 u32 val; 117 u32 val;
@@ -95,6 +125,37 @@ static void gic_set_cpu(unsigned int irq, cpumask_t mask_val)
95} 125}
96#endif 126#endif
97 127
128static void fastcall gic_handle_cascade_irq(unsigned int irq,
129 struct irq_desc *desc)
130{
131 struct gic_chip_data *chip_data = get_irq_data(irq);
132 struct irq_chip *chip = get_irq_chip(irq);
133 unsigned int cascade_irq;
134 unsigned long status;
135
136 /* primary controller ack'ing */
137 chip->ack(irq);
138
139 spin_lock(&irq_controller_lock);
140 status = readl(chip_data->cpu_base + GIC_CPU_INTACK);
141 spin_unlock(&irq_controller_lock);
142
143 cascade_irq = (status & 0x3ff);
144 if (cascade_irq > 1020)
145 goto out;
146 if (cascade_irq < 32 || cascade_irq >= NR_IRQS) {
147 do_bad_IRQ(cascade_irq, desc);
148 goto out;
149 }
150
151 cascade_irq += chip_data->irq_offset;
152 generic_handle_irq(cascade_irq);
153
154 out:
155 /* primary controller unmasking */
156 chip->unmask(irq);
157}
158
98static struct irq_chip gic_chip = { 159static struct irq_chip gic_chip = {
99 .name = "GIC", 160 .name = "GIC",
100 .ack = gic_ack_irq, 161 .ack = gic_ack_irq,
@@ -105,15 +166,29 @@ static struct irq_chip gic_chip = {
105#endif 166#endif
106}; 167};
107 168
108void __init gic_dist_init(void __iomem *base) 169void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
170{
171 if (gic_nr >= MAX_GIC_NR)
172 BUG();
173 if (set_irq_data(irq, &gic_data[gic_nr]) != 0)
174 BUG();
175 set_irq_chained_handler(irq, gic_handle_cascade_irq);
176}
177
178void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
179 unsigned int irq_start)
109{ 180{
110 unsigned int max_irq, i; 181 unsigned int max_irq, i;
111 u32 cpumask = 1 << smp_processor_id(); 182 u32 cpumask = 1 << smp_processor_id();
112 183
184 if (gic_nr >= MAX_GIC_NR)
185 BUG();
186
113 cpumask |= cpumask << 8; 187 cpumask |= cpumask << 8;
114 cpumask |= cpumask << 16; 188 cpumask |= cpumask << 16;
115 189
116 gic_dist_base = base; 190 gic_data[gic_nr].dist_base = base;
191 gic_data[gic_nr].irq_offset = (irq_start - 1) & ~31;
117 192
118 writel(0, base + GIC_DIST_CTRL); 193 writel(0, base + GIC_DIST_CTRL);
119 194
@@ -158,8 +233,9 @@ void __init gic_dist_init(void __iomem *base)
158 /* 233 /*
159 * Setup the Linux IRQ subsystem. 234 * Setup the Linux IRQ subsystem.
160 */ 235 */
161 for (i = 29; i < max_irq; i++) { 236 for (i = irq_start; i < gic_data[gic_nr].irq_offset + max_irq; i++) {
162 set_irq_chip(i, &gic_chip); 237 set_irq_chip(i, &gic_chip);
238 set_irq_chip_data(i, &gic_data[gic_nr]);
163 set_irq_handler(i, handle_level_irq); 239 set_irq_handler(i, handle_level_irq);
164 set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 240 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
165 } 241 }
@@ -167,9 +243,13 @@ void __init gic_dist_init(void __iomem *base)
167 writel(1, base + GIC_DIST_CTRL); 243 writel(1, base + GIC_DIST_CTRL);
168} 244}
169 245
170void __cpuinit gic_cpu_init(void __iomem *base) 246void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
171{ 247{
172 gic_cpu_base = base; 248 if (gic_nr >= MAX_GIC_NR)
249 BUG();
250
251 gic_data[gic_nr].cpu_base = base;
252
173 writel(0xf0, base + GIC_CPU_PRIMASK); 253 writel(0xf0, base + GIC_CPU_PRIMASK);
174 writel(1, base + GIC_CPU_CTRL); 254 writel(1, base + GIC_CPU_CTRL);
175} 255}
@@ -179,6 +259,7 @@ void gic_raise_softirq(cpumask_t cpumask, unsigned int irq)
179{ 259{
180 unsigned long map = *cpus_addr(cpumask); 260 unsigned long map = *cpus_addr(cpumask);
181 261
182 writel(map << 16 | irq, gic_dist_base + GIC_DIST_SOFTINT); 262 /* this always happens on GIC0 */
263 writel(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
183} 264}
184#endif 265#endif
diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c
index 4e5445cfb0ea..bf1075e1f571 100644
--- a/arch/arm/common/rtctime.c
+++ b/arch/arm/common/rtctime.c
@@ -329,7 +329,7 @@ static int rtc_fasync(int fd, struct file *file, int on)
329 return fasync_helper(fd, file, on, &rtc_async_queue); 329 return fasync_helper(fd, file, on, &rtc_async_queue);
330} 330}
331 331
332static struct file_operations rtc_fops = { 332static const struct file_operations rtc_fops = {
333 .owner = THIS_MODULE, 333 .owner = THIS_MODULE,
334 .llseek = no_llseek, 334 .llseek = no_llseek,
335 .read = rtc_read, 335 .read = rtc_read,
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index b3599743093b..a9bc5b52218f 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -23,11 +23,11 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/leds.h> 25#include <linux/leds.h>
26#include <linux/apm-emulation.h>
26 27
27#include <asm/hardware.h> 28#include <asm/hardware.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <asm/irq.h> 30#include <asm/irq.h>
30#include <asm/apm.h>
31#include <asm/arch/pm.h> 31#include <asm/arch/pm.h>
32#include <asm/arch/pxa-regs.h> 32#include <asm/arch/pxa-regs.h>
33#include <asm/arch/sharpsl.h> 33#include <asm/arch/sharpsl.h>
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
new file mode 100644
index 000000000000..c72ab82873d5
--- /dev/null
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -0,0 +1,1184 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc1
4# Mon Jan 8 16:06:54 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=""
32# CONFIG_LOCALVERSION_AUTO is not set
33# CONFIG_SWAP is not set
34CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set
39# CONFIG_UTS_NS is not set
40# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y
43# CONFIG_RELAY is not set
44CONFIG_INITRAMFS_SOURCE=""
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SYSCTL=y
47# CONFIG_EMBEDDED is not set
48CONFIG_UID16=y
49CONFIG_SYSCTL_SYSCALL=y
50CONFIG_KALLSYMS=y
51# CONFIG_KALLSYMS_ALL is not set
52# CONFIG_KALLSYMS_EXTRA_PASS is not set
53CONFIG_HOTPLUG=y
54CONFIG_PRINTK=y
55CONFIG_BUG=y
56CONFIG_ELF_CORE=y
57CONFIG_BASE_FULL=y
58CONFIG_FUTEX=y
59CONFIG_EPOLL=y
60CONFIG_SHMEM=y
61CONFIG_SLAB=y
62CONFIG_VM_EVENT_COUNTERS=y
63CONFIG_RT_MUTEXES=y
64# CONFIG_TINY_SHMEM is not set
65CONFIG_BASE_SMALL=0
66# CONFIG_SLOB is not set
67
68#
69# Loadable module support
70#
71CONFIG_MODULES=y
72CONFIG_MODULE_UNLOAD=y
73# CONFIG_MODULE_FORCE_UNLOAD is not set
74# CONFIG_MODVERSIONS is not set
75# CONFIG_MODULE_SRCVERSION_ALL is not set
76CONFIG_KMOD=y
77
78#
79# Block layer
80#
81CONFIG_BLOCK=y
82# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85
86#
87# IO Schedulers
88#
89CONFIG_IOSCHED_NOOP=y
90CONFIG_IOSCHED_AS=y
91# CONFIG_IOSCHED_DEADLINE is not set
92# CONFIG_IOSCHED_CFQ is not set
93CONFIG_DEFAULT_AS=y
94# CONFIG_DEFAULT_DEADLINE is not set
95# CONFIG_DEFAULT_CFQ is not set
96# CONFIG_DEFAULT_NOOP is not set
97CONFIG_DEFAULT_IOSCHED="anticipatory"
98
99#
100# System Type
101#
102# CONFIG_ARCH_AAEC2000 is not set
103# CONFIG_ARCH_INTEGRATOR is not set
104# CONFIG_ARCH_REALVIEW is not set
105# CONFIG_ARCH_VERSATILE is not set
106CONFIG_ARCH_AT91=y
107# CONFIG_ARCH_CLPS7500 is not set
108# CONFIG_ARCH_CLPS711X is not set
109# CONFIG_ARCH_CO285 is not set
110# CONFIG_ARCH_EBSA110 is not set
111# CONFIG_ARCH_EP93XX is not set
112# CONFIG_ARCH_FOOTBRIDGE is not set
113# CONFIG_ARCH_NETX is not set
114# CONFIG_ARCH_H720X is not set
115# CONFIG_ARCH_IMX is not set
116# CONFIG_ARCH_IOP32X is not set
117# 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
122# CONFIG_ARCH_L7200 is not set
123# CONFIG_ARCH_PNX4008 is not set
124# CONFIG_ARCH_PXA is not set
125# CONFIG_ARCH_RPC is not set
126# CONFIG_ARCH_SA1100 is not set
127# CONFIG_ARCH_S3C2410 is not set
128# CONFIG_ARCH_SHARK is not set
129# CONFIG_ARCH_LH7A40X is not set
130# CONFIG_ARCH_OMAP is not set
131
132#
133# Atmel AT91 System-on-Chip
134#
135# CONFIG_ARCH_AT91RM9200 is not set
136# CONFIG_ARCH_AT91SAM9260 is not set
137# CONFIG_ARCH_AT91SAM9261 is not set
138CONFIG_ARCH_AT91SAM9263=y
139
140#
141# AT91SAM9263 Board Type
142#
143CONFIG_MACH_AT91SAM9263EK=y
144
145#
146# AT91 Board Options
147#
148CONFIG_MTD_AT91_DATAFLASH_CARD=y
149# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
150
151#
152# AT91 Feature Selections
153#
154# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
155
156#
157# Processor Type
158#
159CONFIG_CPU_32=y
160CONFIG_CPU_ARM926T=y
161CONFIG_CPU_32v5=y
162CONFIG_CPU_ABRT_EV5TJ=y
163CONFIG_CPU_CACHE_VIVT=y
164CONFIG_CPU_COPY_V4WB=y
165CONFIG_CPU_TLB_V4WBI=y
166CONFIG_CPU_CP15=y
167CONFIG_CPU_CP15_MMU=y
168
169#
170# Processor Features
171#
172# CONFIG_ARM_THUMB is not set
173# CONFIG_CPU_ICACHE_DISABLE is not set
174# CONFIG_CPU_DCACHE_DISABLE is not set
175# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
176# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
177
178#
179# Bus support
180#
181
182#
183# PCCARD (PCMCIA/CardBus) support
184#
185# CONFIG_PCCARD is not set
186
187#
188# Kernel Features
189#
190# CONFIG_PREEMPT is not set
191# CONFIG_NO_IDLE_HZ is not set
192CONFIG_HZ=100
193# CONFIG_AEABI is not set
194# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
195CONFIG_SELECT_MEMORY_MODEL=y
196CONFIG_FLATMEM_MANUAL=y
197# CONFIG_DISCONTIGMEM_MANUAL is not set
198# CONFIG_SPARSEMEM_MANUAL is not set
199CONFIG_FLATMEM=y
200CONFIG_FLAT_NODE_MEM_MAP=y
201# CONFIG_SPARSEMEM_STATIC is not set
202CONFIG_SPLIT_PTLOCK_CPUS=4096
203# CONFIG_RESOURCES_64BIT is not set
204# CONFIG_LEDS is not set
205CONFIG_ALIGNMENT_TRAP=y
206
207#
208# Boot options
209#
210CONFIG_ZBOOT_ROM_TEXT=0x0
211CONFIG_ZBOOT_ROM_BSS=0x0
212CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
213# CONFIG_XIP_KERNEL is not set
214
215#
216# Floating point emulation
217#
218
219#
220# At least one emulation must be selected
221#
222CONFIG_FPE_NWFPE=y
223# CONFIG_FPE_NWFPE_XP is not set
224# CONFIG_FPE_FASTFPE is not set
225# CONFIG_VFP is not set
226
227#
228# Userspace binary formats
229#
230CONFIG_BINFMT_ELF=y
231# CONFIG_BINFMT_AOUT is not set
232# CONFIG_BINFMT_MISC is not set
233# CONFIG_ARTHUR is not set
234
235#
236# Power management options
237#
238# CONFIG_PM is not set
239# CONFIG_APM is not set
240
241#
242# Networking
243#
244CONFIG_NET=y
245
246#
247# Networking options
248#
249# CONFIG_NETDEBUG is not set
250CONFIG_PACKET=y
251# CONFIG_PACKET_MMAP is not set
252CONFIG_UNIX=y
253# CONFIG_NET_KEY is not set
254CONFIG_INET=y
255# CONFIG_IP_MULTICAST is not set
256# CONFIG_IP_ADVANCED_ROUTER is not set
257CONFIG_IP_FIB_HASH=y
258CONFIG_IP_PNP=y
259# CONFIG_IP_PNP_DHCP is not set
260CONFIG_IP_PNP_BOOTP=y
261CONFIG_IP_PNP_RARP=y
262# CONFIG_NET_IPIP is not set
263# CONFIG_NET_IPGRE is not set
264# CONFIG_ARPD is not set
265# CONFIG_SYN_COOKIES is not set
266# CONFIG_INET_AH is not set
267# CONFIG_INET_ESP is not set
268# CONFIG_INET_IPCOMP is not set
269# CONFIG_INET_XFRM_TUNNEL is not set
270# CONFIG_INET_TUNNEL is not set
271# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
272# CONFIG_INET_XFRM_MODE_TUNNEL is not set
273# CONFIG_INET_XFRM_MODE_BEET is not set
274# CONFIG_INET_DIAG is not set
275# CONFIG_TCP_CONG_ADVANCED is not set
276CONFIG_TCP_CONG_CUBIC=y
277CONFIG_DEFAULT_TCP_CONG="cubic"
278# CONFIG_TCP_MD5SIG is not set
279# CONFIG_IPV6 is not set
280# CONFIG_INET6_XFRM_TUNNEL is not set
281# CONFIG_INET6_TUNNEL is not set
282# CONFIG_NETWORK_SECMARK is not set
283# CONFIG_NETFILTER is not set
284
285#
286# DCCP Configuration (EXPERIMENTAL)
287#
288# CONFIG_IP_DCCP is not set
289
290#
291# SCTP Configuration (EXPERIMENTAL)
292#
293# CONFIG_IP_SCTP is not set
294
295#
296# TIPC Configuration (EXPERIMENTAL)
297#
298# CONFIG_TIPC is not set
299# CONFIG_ATM is not set
300# CONFIG_BRIDGE is not set
301# CONFIG_VLAN_8021Q is not set
302# CONFIG_DECNET is not set
303# CONFIG_LLC2 is not set
304# CONFIG_IPX is not set
305# CONFIG_ATALK is not set
306# CONFIG_X25 is not set
307# CONFIG_LAPB is not set
308# CONFIG_ECONET is not set
309# CONFIG_WAN_ROUTER is not set
310
311#
312# QoS and/or fair queueing
313#
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# CONFIG_IEEE80211 is not set
324
325#
326# Device Drivers
327#
328
329#
330# Generic Driver Options
331#
332CONFIG_STANDALONE=y
333CONFIG_PREVENT_FIRMWARE_BUILD=y
334# CONFIG_FW_LOADER is not set
335# CONFIG_DEBUG_DRIVER is not set
336# CONFIG_SYS_HYPERVISOR is not set
337
338#
339# Connector - unified userspace <-> kernelspace linker
340#
341# CONFIG_CONNECTOR is not set
342
343#
344# Memory Technology Devices (MTD)
345#
346CONFIG_MTD=y
347# CONFIG_MTD_DEBUG is not set
348# CONFIG_MTD_CONCAT is not set
349CONFIG_MTD_PARTITIONS=y
350# CONFIG_MTD_REDBOOT_PARTS is not set
351CONFIG_MTD_CMDLINE_PARTS=y
352# CONFIG_MTD_AFS_PARTS is not set
353
354#
355# User Modules And Translation Layers
356#
357CONFIG_MTD_CHAR=y
358CONFIG_MTD_BLKDEVS=y
359CONFIG_MTD_BLOCK=y
360# CONFIG_FTL is not set
361# CONFIG_NFTL is not set
362# CONFIG_INFTL is not set
363# CONFIG_RFD_FTL is not set
364# CONFIG_SSFDC is not set
365
366#
367# RAM/ROM/Flash chip drivers
368#
369# CONFIG_MTD_CFI is not set
370# CONFIG_MTD_JEDECPROBE is not set
371CONFIG_MTD_MAP_BANK_WIDTH_1=y
372CONFIG_MTD_MAP_BANK_WIDTH_2=y
373CONFIG_MTD_MAP_BANK_WIDTH_4=y
374# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
375# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
376# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
377CONFIG_MTD_CFI_I1=y
378CONFIG_MTD_CFI_I2=y
379# CONFIG_MTD_CFI_I4 is not set
380# CONFIG_MTD_CFI_I8 is not set
381# CONFIG_MTD_RAM is not set
382# CONFIG_MTD_ROM is not set
383# CONFIG_MTD_ABSENT is not set
384# CONFIG_MTD_OBSOLETE_CHIPS is not set
385
386#
387# Mapping drivers for chip access
388#
389# CONFIG_MTD_COMPLEX_MAPPINGS is not set
390# CONFIG_MTD_PLATRAM is not set
391
392#
393# Self-contained MTD device drivers
394#
395CONFIG_MTD_DATAFLASH=y
396# CONFIG_MTD_M25P80 is not set
397# CONFIG_MTD_SLRAM is not set
398# CONFIG_MTD_PHRAM is not set
399# CONFIG_MTD_MTDRAM is not set
400# CONFIG_MTD_BLOCK2MTD is not set
401
402#
403# Disk-On-Chip Device Drivers
404#
405# CONFIG_MTD_DOC2000 is not set
406# CONFIG_MTD_DOC2001 is not set
407# CONFIG_MTD_DOC2001PLUS is not set
408
409#
410# NAND Flash Device Drivers
411#
412CONFIG_MTD_NAND=y
413# CONFIG_MTD_NAND_VERIFY_WRITE is not set
414# CONFIG_MTD_NAND_ECC_SMC is not set
415CONFIG_MTD_NAND_IDS=y
416# CONFIG_MTD_NAND_DISKONCHIP is not set
417CONFIG_MTD_NAND_AT91=y
418# CONFIG_MTD_NAND_NANDSIM is not set
419
420#
421# OneNAND Flash Device Drivers
422#
423# CONFIG_MTD_ONENAND is not set
424
425#
426# Parallel port support
427#
428# CONFIG_PARPORT is not set
429
430#
431# Plug and Play support
432#
433
434#
435# Block devices
436#
437# CONFIG_BLK_DEV_COW_COMMON is not set
438CONFIG_BLK_DEV_LOOP=y
439# CONFIG_BLK_DEV_CRYPTOLOOP is not set
440# CONFIG_BLK_DEV_NBD is not set
441# CONFIG_BLK_DEV_UB is not set
442CONFIG_BLK_DEV_RAM=y
443CONFIG_BLK_DEV_RAM_COUNT=16
444CONFIG_BLK_DEV_RAM_SIZE=8192
445CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
446CONFIG_BLK_DEV_INITRD=y
447# CONFIG_CDROM_PKTCDVD is not set
448# CONFIG_ATA_OVER_ETH is not set
449
450#
451# SCSI device support
452#
453# CONFIG_RAID_ATTRS is not set
454CONFIG_SCSI=y
455# CONFIG_SCSI_TGT is not set
456# CONFIG_SCSI_NETLINK is not set
457CONFIG_SCSI_PROC_FS=y
458
459#
460# SCSI support type (disk, tape, CD-ROM)
461#
462CONFIG_BLK_DEV_SD=y
463# CONFIG_CHR_DEV_ST is not set
464# CONFIG_CHR_DEV_OSST is not set
465# CONFIG_BLK_DEV_SR is not set
466# CONFIG_CHR_DEV_SG is not set
467# CONFIG_CHR_DEV_SCH is not set
468
469#
470# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
471#
472CONFIG_SCSI_MULTI_LUN=y
473# CONFIG_SCSI_CONSTANTS is not set
474# CONFIG_SCSI_LOGGING is not set
475# CONFIG_SCSI_SCAN_ASYNC is not set
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_ATTRS is not set
484# CONFIG_SCSI_SAS_LIBSAS is not set
485
486#
487# SCSI low-level drivers
488#
489# CONFIG_ISCSI_TCP is not set
490# CONFIG_SCSI_DEBUG is not set
491
492#
493# Serial ATA (prod) and Parallel ATA (experimental) drivers
494#
495# CONFIG_ATA is not set
496
497#
498# Multi-device support (RAID and LVM)
499#
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
519# CONFIG_DUMMY is not set
520# CONFIG_BONDING is not set
521# CONFIG_EQUALIZER is not set
522# CONFIG_TUN is not set
523
524#
525# PHY device support
526#
527# CONFIG_PHYLIB is not set
528
529#
530# Ethernet (10 or 100Mbit)
531#
532CONFIG_NET_ETHERNET=y
533CONFIG_MII=y
534# CONFIG_SMC91X is not set
535# CONFIG_DM9000 is not set
536
537#
538# Ethernet (1000 Mbit)
539#
540
541#
542# Ethernet (10000 Mbit)
543#
544
545#
546# Token Ring devices
547#
548
549#
550# Wireless LAN (non-hamradio)
551#
552# CONFIG_NET_RADIO is not set
553
554#
555# Wan interfaces
556#
557# CONFIG_WAN is not set
558# CONFIG_PPP is not set
559# CONFIG_SLIP is not set
560# CONFIG_SHAPER is not set
561# CONFIG_NETCONSOLE is not set
562# CONFIG_NETPOLL is not set
563# CONFIG_NET_POLL_CONTROLLER is not set
564
565#
566# ISDN subsystem
567#
568# CONFIG_ISDN is not set
569
570#
571# Input device support
572#
573CONFIG_INPUT=y
574# CONFIG_INPUT_FF_MEMLESS is not set
575
576#
577# Userland interfaces
578#
579CONFIG_INPUT_MOUSEDEV=y
580# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
581CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
582CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
583# 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
588# CONFIG_INPUT_EVBUG is not set
589
590#
591# Input Device Drivers
592#
593# CONFIG_INPUT_KEYBOARD is not set
594# CONFIG_INPUT_MOUSE is not set
595# CONFIG_INPUT_JOYSTICK is not set
596CONFIG_INPUT_TOUCHSCREEN=y
597CONFIG_TOUCHSCREEN_ADS7846=y
598# CONFIG_TOUCHSCREEN_GUNZE is not set
599# CONFIG_TOUCHSCREEN_ELO is not set
600# CONFIG_TOUCHSCREEN_MTOUCH is not set
601# CONFIG_TOUCHSCREEN_MK712 is not set
602# CONFIG_TOUCHSCREEN_PENMOUNT is not set
603# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
604# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
605# CONFIG_TOUCHSCREEN_UCB1400 is not set
606# CONFIG_INPUT_MISC is not set
607
608#
609# Hardware I/O ports
610#
611# CONFIG_SERIO is not set
612# CONFIG_GAMEPORT is not set
613
614#
615# Character devices
616#
617CONFIG_VT=y
618CONFIG_VT_CONSOLE=y
619CONFIG_HW_CONSOLE=y
620# CONFIG_VT_HW_CONSOLE_BINDING is not set
621# CONFIG_SERIAL_NONSTANDARD is not set
622
623#
624# Serial drivers
625#
626# CONFIG_SERIAL_8250 is not set
627
628#
629# Non-8250 serial port support
630#
631CONFIG_SERIAL_ATMEL=y
632CONFIG_SERIAL_ATMEL_CONSOLE=y
633# CONFIG_SERIAL_ATMEL_TTYAT is not set
634CONFIG_SERIAL_CORE=y
635CONFIG_SERIAL_CORE_CONSOLE=y
636CONFIG_UNIX98_PTYS=y
637CONFIG_LEGACY_PTYS=y
638CONFIG_LEGACY_PTY_COUNT=256
639
640#
641# IPMI
642#
643# 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
661# CONFIG_NVRAM is not set
662# CONFIG_DTLK is not set
663# CONFIG_R3964 is not set
664# CONFIG_RAW_DRIVER is not set
665
666#
667# TPM devices
668#
669# CONFIG_TCG_TPM is not set
670
671#
672# I2C support
673#
674CONFIG_I2C=y
675CONFIG_I2C_CHARDEV=y
676
677#
678# I2C Algorithms
679#
680# CONFIG_I2C_ALGOBIT is not set
681# CONFIG_I2C_ALGOPCF is not set
682# CONFIG_I2C_ALGOPCA is not set
683
684#
685# I2C Hardware Bus support
686#
687CONFIG_I2C_AT91=y
688# CONFIG_I2C_OCORES is not set
689# CONFIG_I2C_PARPORT_LIGHT is not set
690# CONFIG_I2C_STUB is not set
691# CONFIG_I2C_PCA is not set
692# CONFIG_I2C_PCA_ISA is not set
693
694#
695# Miscellaneous I2C Chip support
696#
697# CONFIG_SENSORS_DS1337 is not set
698# CONFIG_SENSORS_DS1374 is not set
699# CONFIG_SENSORS_EEPROM is not set
700# CONFIG_SENSORS_PCF8574 is not set
701# CONFIG_SENSORS_PCA9539 is not set
702# CONFIG_SENSORS_PCF8591 is not set
703# CONFIG_SENSORS_MAX6875 is not set
704# CONFIG_I2C_DEBUG_CORE is not set
705# CONFIG_I2C_DEBUG_ALGO is not set
706# CONFIG_I2C_DEBUG_BUS is not set
707# CONFIG_I2C_DEBUG_CHIP is not set
708
709#
710# SPI support
711#
712CONFIG_SPI=y
713# CONFIG_SPI_DEBUG is not set
714CONFIG_SPI_MASTER=y
715
716#
717# SPI Master Controller Drivers
718#
719CONFIG_SPI_ATMEL=y
720# CONFIG_SPI_BITBANG is not set
721
722#
723# SPI Protocol Masters
724#
725
726#
727# Dallas's 1-wire bus
728#
729# CONFIG_W1 is not set
730
731#
732# Hardware Monitoring support
733#
734# CONFIG_HWMON is not set
735# CONFIG_HWMON_VID is not set
736
737#
738# Misc devices
739#
740# CONFIG_TIFM_CORE is not set
741
742#
743# LED devices
744#
745# CONFIG_NEW_LEDS is not set
746
747#
748# LED drivers
749#
750
751#
752# LED Triggers
753#
754
755#
756# Multimedia devices
757#
758# CONFIG_VIDEO_DEV is not set
759
760#
761# Digital Video Broadcasting Devices
762#
763# CONFIG_DVB is not set
764# CONFIG_USB_DABUSB is not set
765
766#
767# Graphics support
768#
769# CONFIG_FIRMWARE_EDID is not set
770CONFIG_FB=y
771# CONFIG_FB_CFB_FILLRECT is not set
772# CONFIG_FB_CFB_COPYAREA is not set
773# CONFIG_FB_CFB_IMAGEBLIT is not set
774# CONFIG_FB_MACMODES is not set
775# CONFIG_FB_BACKLIGHT is not set
776# CONFIG_FB_MODE_HELPERS is not set
777# CONFIG_FB_TILEBLITTING is not set
778# CONFIG_FB_S1D13XXX is not set
779# CONFIG_FB_VIRTUAL is not set
780
781#
782# Console display driver support
783#
784# CONFIG_VGA_CONSOLE is not set
785CONFIG_DUMMY_CONSOLE=y
786# CONFIG_FRAMEBUFFER_CONSOLE is not set
787
788#
789# Logo configuration
790#
791# CONFIG_LOGO is not set
792# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
793
794#
795# Sound
796#
797# CONFIG_SOUND is not set
798
799#
800# HID Devices
801#
802CONFIG_HID=y
803
804#
805# USB support
806#
807CONFIG_USB_ARCH_HAS_HCD=y
808CONFIG_USB_ARCH_HAS_OHCI=y
809# CONFIG_USB_ARCH_HAS_EHCI is not set
810CONFIG_USB=y
811# CONFIG_USB_DEBUG is not set
812
813#
814# Miscellaneous USB options
815#
816CONFIG_USB_DEVICEFS=y
817# CONFIG_USB_BANDWIDTH is not set
818# CONFIG_USB_DYNAMIC_MINORS is not set
819# CONFIG_USB_MULTITHREAD_PROBE is not set
820# CONFIG_USB_OTG is not set
821
822#
823# USB Host Controller Drivers
824#
825# CONFIG_USB_ISP116X_HCD is not set
826CONFIG_USB_OHCI_HCD=y
827# CONFIG_USB_OHCI_BIG_ENDIAN is not set
828CONFIG_USB_OHCI_LITTLE_ENDIAN=y
829# CONFIG_USB_SL811_HCD is not set
830
831#
832# USB Device Class drivers
833#
834# CONFIG_USB_ACM is not set
835# CONFIG_USB_PRINTER is not set
836
837#
838# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
839#
840
841#
842# may also be needed; see USB_STORAGE Help for more information
843#
844CONFIG_USB_STORAGE=y
845# CONFIG_USB_STORAGE_DEBUG is not set
846# CONFIG_USB_STORAGE_DATAFAB is not set
847# CONFIG_USB_STORAGE_FREECOM is not set
848# CONFIG_USB_STORAGE_DPCM is not set
849# CONFIG_USB_STORAGE_USBAT is not set
850# CONFIG_USB_STORAGE_SDDR09 is not set
851# CONFIG_USB_STORAGE_SDDR55 is not set
852# CONFIG_USB_STORAGE_JUMPSHOT is not set
853# CONFIG_USB_STORAGE_ALAUDA is not set
854# CONFIG_USB_STORAGE_ONETOUCH is not set
855# CONFIG_USB_STORAGE_KARMA is not set
856# CONFIG_USB_LIBUSUAL is not set
857
858#
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
883#
884# CONFIG_USB_MDC800 is not set
885# 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
897
898#
899# USB port drivers
900#
901
902#
903# USB Serial Converter support
904#
905# CONFIG_USB_SERIAL is not set
906
907#
908# USB Miscellaneous drivers
909#
910# CONFIG_USB_EMI62 is not set
911# CONFIG_USB_EMI26 is not set
912# CONFIG_USB_ADUTUX is not set
913# CONFIG_USB_AUERSWALD is not set
914# CONFIG_USB_RIO500 is not set
915# CONFIG_USB_LEGOTOWER is not set
916# CONFIG_USB_LCD is not set
917# CONFIG_USB_LED is not set
918# CONFIG_USB_CYPRESS_CY7C63 is not set
919# CONFIG_USB_CYTHERM is not set
920# CONFIG_USB_PHIDGET is not set
921# CONFIG_USB_IDMOUSE is not set
922# CONFIG_USB_FTDI_ELAN is not set
923# CONFIG_USB_APPLEDISPLAY is not set
924# CONFIG_USB_LD is not set
925# CONFIG_USB_TRANCEVIBRATOR is not set
926# CONFIG_USB_TEST is not set
927
928#
929# USB DSL modem support
930#
931
932#
933# USB Gadget Support
934#
935CONFIG_USB_GADGET=y
936# CONFIG_USB_GADGET_DEBUG_FILES is not set
937CONFIG_USB_GADGET_SELECTED=y
938# CONFIG_USB_GADGET_NET2280 is not set
939# CONFIG_USB_GADGET_PXA2XX is not set
940# CONFIG_USB_GADGET_GOKU is not set
941# CONFIG_USB_GADGET_LH7A40X is not set
942# CONFIG_USB_GADGET_OMAP is not set
943CONFIG_USB_GADGET_AT91=y
944CONFIG_USB_AT91=y
945# CONFIG_USB_GADGET_DUMMY_HCD is not set
946# CONFIG_USB_GADGET_DUALSPEED is not set
947CONFIG_USB_ZERO=m
948# CONFIG_USB_ETH is not set
949CONFIG_USB_GADGETFS=m
950CONFIG_USB_FILE_STORAGE=m
951# CONFIG_USB_FILE_STORAGE_TEST is not set
952CONFIG_USB_G_SERIAL=m
953# CONFIG_USB_MIDI_GADGET is not set
954
955#
956# MMC/SD Card support
957#
958CONFIG_MMC=y
959# CONFIG_MMC_DEBUG is not set
960CONFIG_MMC_BLOCK=y
961CONFIG_MMC_AT91=m
962# CONFIG_MMC_TIFM_SD is not set
963
964#
965# Real Time Clock
966#
967CONFIG_RTC_LIB=y
968# CONFIG_RTC_CLASS is not set
969
970#
971# File systems
972#
973CONFIG_EXT2_FS=y
974# CONFIG_EXT2_FS_XATTR is not set
975# CONFIG_EXT2_FS_XIP is not set
976# CONFIG_EXT3_FS is not set
977# CONFIG_EXT4DEV_FS is not set
978# CONFIG_REISERFS_FS is not set
979# CONFIG_JFS_FS is not set
980# CONFIG_FS_POSIX_ACL is not set
981# CONFIG_XFS_FS is not set
982# CONFIG_GFS2_FS is not set
983# CONFIG_OCFS2_FS is not set
984# CONFIG_MINIX_FS is not set
985# CONFIG_ROMFS_FS is not set
986CONFIG_INOTIFY=y
987CONFIG_INOTIFY_USER=y
988# CONFIG_QUOTA is not set
989CONFIG_DNOTIFY=y
990# CONFIG_AUTOFS_FS is not set
991# CONFIG_AUTOFS4_FS is not set
992# CONFIG_FUSE_FS is not set
993
994#
995# CD-ROM/DVD Filesystems
996#
997# CONFIG_ISO9660_FS is not set
998# CONFIG_UDF_FS is not set
999
1000#
1001# DOS/FAT/NT Filesystems
1002#
1003CONFIG_FAT_FS=y
1004# CONFIG_MSDOS_FS is not set
1005CONFIG_VFAT_FS=y
1006CONFIG_FAT_DEFAULT_CODEPAGE=437
1007CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1008# CONFIG_NTFS_FS is not set
1009
1010#
1011# Pseudo filesystems
1012#
1013CONFIG_PROC_FS=y
1014CONFIG_PROC_SYSCTL=y
1015CONFIG_SYSFS=y
1016CONFIG_TMPFS=y
1017# CONFIG_TMPFS_POSIX_ACL is not set
1018# CONFIG_HUGETLB_PAGE is not set
1019CONFIG_RAMFS=y
1020# CONFIG_CONFIGFS_FS is not set
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_JFFS2_FS=y
1033CONFIG_JFFS2_FS_DEBUG=0
1034CONFIG_JFFS2_FS_WRITEBUFFER=y
1035# CONFIG_JFFS2_SUMMARY is not set
1036# CONFIG_JFFS2_FS_XATTR is not set
1037# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1038CONFIG_JFFS2_ZLIB=y
1039CONFIG_JFFS2_RTIME=y
1040# CONFIG_JFFS2_RUBIN is not set
1041CONFIG_CRAMFS=y
1042# CONFIG_VXFS_FS is not set
1043# CONFIG_HPFS_FS is not set
1044# CONFIG_QNX4FS_FS is not set
1045# CONFIG_SYSV_FS is not set
1046# CONFIG_UFS_FS is not set
1047
1048#
1049# Network File Systems
1050#
1051CONFIG_NFS_FS=y
1052# CONFIG_NFS_V3 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_NFS_COMMON=y
1059CONFIG_SUNRPC=y
1060# CONFIG_RPCSEC_GSS_KRB5 is not set
1061# CONFIG_RPCSEC_GSS_SPKM3 is not set
1062# CONFIG_SMB_FS is not set
1063# CONFIG_CIFS is not set
1064# CONFIG_NCP_FS is not set
1065# CONFIG_CODA_FS is not set
1066# CONFIG_AFS_FS is not set
1067# CONFIG_9P_FS is not set
1068
1069#
1070# Partition Types
1071#
1072# CONFIG_PARTITION_ADVANCED is not set
1073CONFIG_MSDOS_PARTITION=y
1074
1075#
1076# Native Language Support
1077#
1078CONFIG_NLS=y
1079CONFIG_NLS_DEFAULT="iso8859-1"
1080CONFIG_NLS_CODEPAGE_437=y
1081# CONFIG_NLS_CODEPAGE_737 is not set
1082# CONFIG_NLS_CODEPAGE_775 is not set
1083CONFIG_NLS_CODEPAGE_850=y
1084# CONFIG_NLS_CODEPAGE_852 is not set
1085# CONFIG_NLS_CODEPAGE_855 is not set
1086# CONFIG_NLS_CODEPAGE_857 is not set
1087# CONFIG_NLS_CODEPAGE_860 is not set
1088# CONFIG_NLS_CODEPAGE_861 is not set
1089# CONFIG_NLS_CODEPAGE_862 is not set
1090# CONFIG_NLS_CODEPAGE_863 is not set
1091# CONFIG_NLS_CODEPAGE_864 is not set
1092# CONFIG_NLS_CODEPAGE_865 is not set
1093# CONFIG_NLS_CODEPAGE_866 is not set
1094# CONFIG_NLS_CODEPAGE_869 is not set
1095# CONFIG_NLS_CODEPAGE_936 is not set
1096# CONFIG_NLS_CODEPAGE_950 is not set
1097# CONFIG_NLS_CODEPAGE_932 is not set
1098# CONFIG_NLS_CODEPAGE_949 is not set
1099# CONFIG_NLS_CODEPAGE_874 is not set
1100# CONFIG_NLS_ISO8859_8 is not set
1101# CONFIG_NLS_CODEPAGE_1250 is not set
1102# CONFIG_NLS_CODEPAGE_1251 is not set
1103# CONFIG_NLS_ASCII is not set
1104CONFIG_NLS_ISO8859_1=y
1105# CONFIG_NLS_ISO8859_2 is not set
1106# CONFIG_NLS_ISO8859_3 is not set
1107# CONFIG_NLS_ISO8859_4 is not set
1108# CONFIG_NLS_ISO8859_5 is not set
1109# CONFIG_NLS_ISO8859_6 is not set
1110# CONFIG_NLS_ISO8859_7 is not set
1111# CONFIG_NLS_ISO8859_9 is not set
1112# CONFIG_NLS_ISO8859_13 is not set
1113# CONFIG_NLS_ISO8859_14 is not set
1114# CONFIG_NLS_ISO8859_15 is not set
1115# CONFIG_NLS_KOI8_R is not set
1116# CONFIG_NLS_KOI8_U is not set
1117# CONFIG_NLS_UTF8 is not set
1118
1119#
1120# Distributed Lock Manager
1121#
1122# CONFIG_DLM is not set
1123
1124#
1125# Profiling support
1126#
1127# CONFIG_PROFILING is not set
1128
1129#
1130# Kernel hacking
1131#
1132# CONFIG_PRINTK_TIME is not set
1133CONFIG_ENABLE_MUST_CHECK=y
1134# CONFIG_MAGIC_SYSRQ is not set
1135# CONFIG_UNUSED_SYMBOLS is not set
1136# CONFIG_DEBUG_FS is not set
1137# CONFIG_HEADERS_CHECK is not set
1138CONFIG_DEBUG_KERNEL=y
1139CONFIG_LOG_BUF_SHIFT=14
1140CONFIG_DETECT_SOFTLOCKUP=y
1141# CONFIG_SCHEDSTATS is not set
1142# CONFIG_DEBUG_SLAB is not set
1143# CONFIG_DEBUG_RT_MUTEXES is not set
1144# CONFIG_RT_MUTEX_TESTER is not set
1145# CONFIG_DEBUG_SPINLOCK is not set
1146# CONFIG_DEBUG_MUTEXES is not set
1147# CONFIG_DEBUG_RWSEMS is not set
1148# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1149# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1150# CONFIG_DEBUG_KOBJECT is not set
1151CONFIG_DEBUG_BUGVERBOSE=y
1152# CONFIG_DEBUG_INFO is not set
1153# CONFIG_DEBUG_VM is not set
1154# CONFIG_DEBUG_LIST is not set
1155CONFIG_FRAME_POINTER=y
1156CONFIG_FORCED_INLINING=y
1157# CONFIG_RCU_TORTURE_TEST is not set
1158CONFIG_DEBUG_USER=y
1159# CONFIG_DEBUG_ERRORS is not set
1160CONFIG_DEBUG_LL=y
1161# CONFIG_DEBUG_ICEDCC is not set
1162
1163#
1164# Security options
1165#
1166# CONFIG_KEYS is not set
1167# CONFIG_SECURITY is not set
1168
1169#
1170# Cryptographic options
1171#
1172# CONFIG_CRYPTO is not set
1173
1174#
1175# Library routines
1176#
1177CONFIG_BITREVERSE=y
1178# CONFIG_CRC_CCITT is not set
1179# CONFIG_CRC16 is not set
1180CONFIG_CRC32=y
1181# CONFIG_LIBCRC32C is not set
1182CONFIG_ZLIB_INFLATE=y
1183CONFIG_PLIST=y
1184CONFIG_IOMAP_COPY=y
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig
index 3de5c643848c..baa97698c744 100644
--- a/arch/arm/configs/ateb9200_defconfig
+++ b/arch/arm/configs/ateb9200_defconfig
@@ -1066,7 +1066,7 @@ CONFIG_RTC_INTF_DEV=y
1066# CONFIG_RTC_DRV_PCF8563 is not set 1066# CONFIG_RTC_DRV_PCF8563 is not set
1067# CONFIG_RTC_DRV_RS5C372 is not set 1067# CONFIG_RTC_DRV_RS5C372 is not set
1068# CONFIG_RTC_DRV_M48T86 is not set 1068# CONFIG_RTC_DRV_M48T86 is not set
1069CONFIG_RTC_DRV_AT91=y 1069CONFIG_RTC_DRV_AT91RM9200=y
1070# CONFIG_RTC_DRV_TEST is not set 1070# CONFIG_RTC_DRV_TEST is not set
1071 1071
1072# 1072#
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig
index 2cadd51506bb..88e5d28aeec7 100644
--- a/arch/arm/configs/csb337_defconfig
+++ b/arch/arm/configs/csb337_defconfig
@@ -355,10 +355,12 @@ CONFIG_MTD_CFI_UTIL=y
355# Mapping drivers for chip access 355# Mapping drivers for chip access
356# 356#
357# CONFIG_MTD_COMPLEX_MAPPINGS is not set 357# CONFIG_MTD_COMPLEX_MAPPINGS is not set
358# CONFIG_MTD_PHYSMAP is not set 358CONFIG_MTD_PHYSMAP=y
359CONFIG_MTD_PHYSMAP_START=0
360CONFIG_MTD_PHYSMAP_LEN=0
361CONFIG_MTD_PHYSMAP_BANKWIDTH=0
359# CONFIG_MTD_ARM_INTEGRATOR is not set 362# CONFIG_MTD_ARM_INTEGRATOR is not set
360# CONFIG_MTD_PLATRAM is not set 363# CONFIG_MTD_PLATRAM is not set
361CONFIG_MTD_CSB337=y
362 364
363# 365#
364# Self-contained MTD device drivers 366# Self-contained MTD device drivers
@@ -986,7 +988,7 @@ CONFIG_RTC_DRV_DS1307=y
986# CONFIG_RTC_DRV_PCF8583 is not set 988# CONFIG_RTC_DRV_PCF8583 is not set
987# CONFIG_RTC_DRV_RS5C372 is not set 989# CONFIG_RTC_DRV_RS5C372 is not set
988# CONFIG_RTC_DRV_M48T86 is not set 990# CONFIG_RTC_DRV_M48T86 is not set
989CONFIG_RTC_DRV_AT91=y 991CONFIG_RTC_DRV_AT91RM9200=y
990# CONFIG_RTC_DRV_TEST is not set 992# CONFIG_RTC_DRV_TEST is not set
991# CONFIG_RTC_DRV_V3020 is not set 993# CONFIG_RTC_DRV_V3020 is not set
992 994
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig
index 94908c1df4cf..669f035896f9 100644
--- a/arch/arm/configs/csb637_defconfig
+++ b/arch/arm/configs/csb637_defconfig
@@ -355,10 +355,12 @@ CONFIG_MTD_CFI_UTIL=y
355# Mapping drivers for chip access 355# Mapping drivers for chip access
356# 356#
357# CONFIG_MTD_COMPLEX_MAPPINGS is not set 357# CONFIG_MTD_COMPLEX_MAPPINGS is not set
358# CONFIG_MTD_PHYSMAP is not set 358CONFIG_MTD_PHYSMAP=y
359CONFIG_MTD_PHYSMAP_START=0
360CONFIG_MTD_PHYSMAP_LEN=0
361CONFIG_MTD_PHYSMAP_BANKWIDTH=0
359# CONFIG_MTD_ARM_INTEGRATOR is not set 362# CONFIG_MTD_ARM_INTEGRATOR is not set
360# CONFIG_MTD_PLATRAM is not set 363# CONFIG_MTD_PLATRAM is not set
361CONFIG_MTD_CSB637=y
362 364
363# 365#
364# Self-contained MTD device drivers 366# Self-contained MTD device drivers
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig
index a4cdafc1548a..a0f48d54fbcc 100644
--- a/arch/arm/configs/kafa_defconfig
+++ b/arch/arm/configs/kafa_defconfig
@@ -718,7 +718,7 @@ CONFIG_RTC_INTF_DEV=y
718# CONFIG_RTC_DRV_PCF8563 is not set 718# CONFIG_RTC_DRV_PCF8563 is not set
719# CONFIG_RTC_DRV_RS5C372 is not set 719# CONFIG_RTC_DRV_RS5C372 is not set
720# CONFIG_RTC_DRV_M48T86 is not set 720# CONFIG_RTC_DRV_M48T86 is not set
721CONFIG_RTC_DRV_AT91=y 721CONFIG_RTC_DRV_AT91RM9200=y
722# CONFIG_RTC_DRV_TEST is not set 722# CONFIG_RTC_DRV_TEST is not set
723 723
724# 724#
diff --git a/arch/arm/configs/ns9xxx_defconfig b/arch/arm/configs/ns9xxx_defconfig
new file mode 100644
index 000000000000..0e5794c6a48e
--- /dev/null
+++ b/arch/arm/configs/ns9xxx_defconfig
@@ -0,0 +1,621 @@
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
39CONFIG_IKCONFIG_PROC=y
40CONFIG_SYSFS_DEPRECATED=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
70CONFIG_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
89# CONFIG_IOSCHED_DEADLINE is not set
90# 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
122# CONFIG_ARCH_PNX4008 is not set
123# CONFIG_ARCH_PXA is not set
124# CONFIG_ARCH_RPC is not set
125# CONFIG_ARCH_SA1100 is not set
126# CONFIG_ARCH_S3C2410 is not set
127# CONFIG_ARCH_SHARK is not set
128# CONFIG_ARCH_LH7A40X is not set
129# CONFIG_ARCH_OMAP is not set
130
131#
132# NS9xxx Implementations
133#
134CONFIG_MACH_CC9P9360DEV=y
135CONFIG_PROCESSOR_NS9360=y
136CONFIG_BOARD_A9M9750DEV=y
137
138#
139# Processor Type
140#
141CONFIG_CPU_32=y
142CONFIG_CPU_ARM926T=y
143CONFIG_CPU_32v5=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
204# CONFIG_FPE_NWFPE_XP is not set
205# CONFIG_FPE_FASTFPE is not set
206# CONFIG_VFP is not set
207
208#
209# Userspace binary formats
210#
211CONFIG_BINFMT_ELF=y
212# CONFIG_BINFMT_AOUT is not set
213# CONFIG_BINFMT_MISC is not set
214# CONFIG_ARTHUR is not set
215
216#
217# Power management options
218#
219# CONFIG_PM is not set
220# CONFIG_APM is not set
221
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
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
350CONFIG_SERIAL_8250_CONSOLE=y
351CONFIG_SERIAL_8250_NR_UARTS=4
352CONFIG_SERIAL_8250_RUNTIME_UARTS=4
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
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
377# CONFIG_NVRAM is not set
378# CONFIG_DTLK is not set
379# CONFIG_R3964 is not set
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
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
446CONFIG_DUMMY_CONSOLE=y
447# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
448
449#
450# Sound
451#
452# CONFIG_SOUND is not set
453
454#
455# HID Devices
456#
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
530# CONFIG_TMPFS_POSIX_ACL is not set
531# CONFIG_HUGETLB_PAGE is not set
532CONFIG_RAMFS=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
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
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
591CONFIG_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
598CONFIG_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/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 3b31a33d0080..df19e3632038 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_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.19-rc4 3# Linux kernel version: 2.6.20
4# Fri Nov 3 17:41:31 2006 4# Thu Feb 15 11:26:24 2007
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7# CONFIG_GENERIC_TIME is not set 7# CONFIG_GENERIC_TIME is not set
@@ -11,6 +11,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
11CONFIG_HARDIRQS_SW_RESEND=y 11CONFIG_HARDIRQS_SW_RESEND=y
12CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_RWSEM_GENERIC_SPINLOCK=y 13CONFIG_RWSEM_GENERIC_SPINLOCK=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_HWEIGHT=y 16CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y 17CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_VECTORS_BASE=0xffff0000 18CONFIG_VECTORS_BASE=0xffff0000
@@ -37,13 +39,14 @@ CONFIG_SYSVIPC=y
37# CONFIG_UTS_NS is not set 39# CONFIG_UTS_NS is not set
38# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
39# CONFIG_IKCONFIG is not set 41# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 43# CONFIG_RELAY is not set
41CONFIG_INITRAMFS_SOURCE="" 44CONFIG_INITRAMFS_SOURCE=""
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y 45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
43CONFIG_SYSCTL=y 46CONFIG_SYSCTL=y
44# CONFIG_EMBEDDED is not set 47# CONFIG_EMBEDDED is not set
45CONFIG_UID16=y 48CONFIG_UID16=y
46# CONFIG_SYSCTL_SYSCALL is not set 49CONFIG_SYSCTL_SYSCALL=y
47CONFIG_KALLSYMS=y 50CONFIG_KALLSYMS=y
48# CONFIG_KALLSYMS_ALL is not set 51# CONFIG_KALLSYMS_ALL is not set
49# CONFIG_KALLSYMS_EXTRA_PASS is not set 52# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -76,7 +79,9 @@ CONFIG_KMOD=y
76# Block layer 79# Block layer
77# 80#
78CONFIG_BLOCK=y 81CONFIG_BLOCK=y
82# CONFIG_LBD is not set
79# CONFIG_BLK_DEV_IO_TRACE is not set 83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
80 85
81# 86#
82# IO Schedulers 87# IO Schedulers
@@ -110,6 +115,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
110# CONFIG_ARCH_IMX is not set 115# CONFIG_ARCH_IMX is not set
111# CONFIG_ARCH_IOP32X is not set 116# CONFIG_ARCH_IOP32X is not set
112# CONFIG_ARCH_IOP33X is not set 117# CONFIG_ARCH_IOP33X is not set
118# CONFIG_ARCH_IOP13XX is not set
113# CONFIG_ARCH_IXP4XX is not set 119# CONFIG_ARCH_IXP4XX is not set
114# CONFIG_ARCH_IXP2000 is not set 120# CONFIG_ARCH_IXP2000 is not set
115# CONFIG_ARCH_IXP23XX is not set 121# CONFIG_ARCH_IXP23XX is not set
@@ -122,54 +128,73 @@ CONFIG_ARCH_S3C2410=y
122# CONFIG_ARCH_SHARK is not set 128# CONFIG_ARCH_SHARK is not set
123# CONFIG_ARCH_LH7A40X is not set 129# CONFIG_ARCH_LH7A40X is not set
124# CONFIG_ARCH_OMAP is not set 130# CONFIG_ARCH_OMAP is not set
131CONFIG_PLAT_S3C24XX=y
132CONFIG_CPU_S3C244X=y
133CONFIG_PM_SIMTEC=y
134# CONFIG_S3C2410_BOOT_WATCHDOG is not set
135# CONFIG_S3C2410_BOOT_ERROR_RESET is not set
136# CONFIG_S3C2410_PM_DEBUG is not set
137# CONFIG_S3C2410_PM_CHECK is not set
138CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
139CONFIG_S3C2410_DMA=y
140# CONFIG_S3C2410_DMA_DEBUG is not set
141CONFIG_MACH_SMDK=y
125 142
126# 143#
127# S3C24XX Implementations 144# S3C2400 Machines
128# 145#
129# CONFIG_MACH_AML_M5900 is not set 146CONFIG_CPU_S3C2410=y
130CONFIG_MACH_ANUBIS=y 147CONFIG_CPU_S3C2410_DMA=y
131CONFIG_MACH_OSIRIS=y 148CONFIG_S3C2410_PM=y
132CONFIG_ARCH_BAST=y 149CONFIG_S3C2410_GPIO=y
133CONFIG_BAST_PC104_IRQ=y 150CONFIG_S3C2410_CLOCK=y
151
152#
153# S3C2410 Machines
154#
155CONFIG_ARCH_SMDK2410=y
134CONFIG_ARCH_H1940=y 156CONFIG_ARCH_H1940=y
157CONFIG_PM_H1940=y
135CONFIG_MACH_N30=y 158CONFIG_MACH_N30=y
136CONFIG_MACH_SMDK=y 159CONFIG_ARCH_BAST=y
137CONFIG_ARCH_SMDK2410=y
138CONFIG_ARCH_S3C2440=y
139CONFIG_SMDK2440_CPU2440=y
140CONFIG_SMDK2440_CPU2442=y
141CONFIG_MACH_S3C2413=y
142CONFIG_MACH_SMDK2413=y
143CONFIG_MACH_VR1000=y
144CONFIG_MACH_RX3715=y
145CONFIG_MACH_OTOM=y 160CONFIG_MACH_OTOM=y
146CONFIG_MACH_NEXCODER_2440=y 161CONFIG_MACH_AML_M5900=y
147CONFIG_MACH_VSTMS=y 162CONFIG_BAST_PC104_IRQ=y
148CONFIG_S3C2410_CLOCK=y 163CONFIG_MACH_VR1000=y
149CONFIG_S3C2410_PM=y
150CONFIG_CPU_S3C2410_DMA=y
151CONFIG_CPU_S3C2410=y
152CONFIG_S3C2412_PM=y
153CONFIG_CPU_S3C2412=y 164CONFIG_CPU_S3C2412=y
154CONFIG_CPU_S3C244X=y 165CONFIG_S3C2412_DMA=y
166CONFIG_S3C2412_PM=y
167
168#
169# S3C2412 Machines
170#
171CONFIG_MACH_SMDK2413=y
172CONFIG_MACH_S3C2413=y
173CONFIG_MACH_VSTMS=y
155CONFIG_CPU_S3C2440=y 174CONFIG_CPU_S3C2440=y
175CONFIG_S3C2440_DMA=y
176
177#
178# S3C2440 Machines
179#
180CONFIG_MACH_ANUBIS=y
181CONFIG_MACH_OSIRIS=y
182CONFIG_MACH_RX3715=y
183CONFIG_ARCH_S3C2440=y
184CONFIG_MACH_NEXCODER_2440=y
185CONFIG_SMDK2440_CPU2440=y
156CONFIG_CPU_S3C2442=y 186CONFIG_CPU_S3C2442=y
157 187
158# 188#
159# S3C2410 Boot 189# S3C2442 Machines
160# 190#
161# CONFIG_S3C2410_BOOT_WATCHDOG is not set 191CONFIG_SMDK2440_CPU2442=y
162# CONFIG_S3C2410_BOOT_ERROR_RESET is not set 192CONFIG_CPU_S3C2443=y
163 193
164# 194#
165# S3C2410 Setup 195# S3C2443 Machines
166# 196#
167CONFIG_S3C2410_DMA=y 197CONFIG_MACH_SMDK2443=y
168# CONFIG_S3C2410_DMA_DEBUG is not set
169# CONFIG_S3C2410_PM_DEBUG is not set
170# CONFIG_S3C2410_PM_CHECK is not set
171CONFIG_PM_SIMTEC=y
172CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
173 198
174# 199#
175# Processor Type 200# Processor Type
@@ -196,6 +221,7 @@ CONFIG_CPU_CP15_MMU=y
196# CONFIG_CPU_DCACHE_DISABLE is not set 221# CONFIG_CPU_DCACHE_DISABLE is not set
197# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 222# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
198# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 223# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
224# CONFIG_OUTER_CACHE is not set
199 225
200# 226#
201# Bus support 227# Bus support
@@ -303,6 +329,7 @@ CONFIG_INET_TCP_DIAG=y
303# CONFIG_TCP_CONG_ADVANCED is not set 329# CONFIG_TCP_CONG_ADVANCED is not set
304CONFIG_TCP_CONG_CUBIC=y 330CONFIG_TCP_CONG_CUBIC=y
305CONFIG_DEFAULT_TCP_CONG="cubic" 331CONFIG_DEFAULT_TCP_CONG="cubic"
332# CONFIG_TCP_MD5SIG is not set
306# CONFIG_IPV6 is not set 333# CONFIG_IPV6 is not set
307# CONFIG_INET6_XFRM_TUNNEL is not set 334# CONFIG_INET6_XFRM_TUNNEL is not set
308# CONFIG_INET6_TUNNEL is not set 335# CONFIG_INET6_TUNNEL is not set
@@ -385,6 +412,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
385# User Modules And Translation Layers 412# User Modules And Translation Layers
386# 413#
387CONFIG_MTD_CHAR=y 414CONFIG_MTD_CHAR=y
415CONFIG_MTD_BLKDEVS=y
388CONFIG_MTD_BLOCK=y 416CONFIG_MTD_BLOCK=y
389# CONFIG_FTL is not set 417# CONFIG_FTL is not set
390# CONFIG_NFTL is not set 418# CONFIG_NFTL is not set
@@ -531,6 +559,11 @@ CONFIG_BLK_DEV_IDE_BAST=y
531# CONFIG_SCSI_NETLINK is not set 559# CONFIG_SCSI_NETLINK is not set
532 560
533# 561#
562# Serial ATA (prod) and Parallel ATA (experimental) drivers
563#
564# CONFIG_ATA is not set
565
566#
534# Multi-device support (RAID and LVM) 567# Multi-device support (RAID and LVM)
535# 568#
536# CONFIG_MD is not set 569# CONFIG_MD is not set
@@ -682,7 +715,7 @@ CONFIG_SERIAL_NONSTANDARD=y
682# CONFIG_DIGIEPCA is not set 715# CONFIG_DIGIEPCA is not set
683# CONFIG_MOXA_INTELLIO is not set 716# CONFIG_MOXA_INTELLIO is not set
684# CONFIG_MOXA_SMARTIO is not set 717# CONFIG_MOXA_SMARTIO is not set
685# CONFIG_ISI is not set 718# CONFIG_MOXA_SMARTIO_NEW is not set
686# CONFIG_SYNCLINKMP is not set 719# CONFIG_SYNCLINKMP is not set
687# CONFIG_N_HDLC is not set 720# CONFIG_N_HDLC is not set
688# CONFIG_RISCOM8 is not set 721# CONFIG_RISCOM8 is not set
@@ -700,13 +733,14 @@ CONFIG_SERIAL_8250_NR_UARTS=8
700CONFIG_SERIAL_8250_RUNTIME_UARTS=4 733CONFIG_SERIAL_8250_RUNTIME_UARTS=4
701CONFIG_SERIAL_8250_EXTENDED=y 734CONFIG_SERIAL_8250_EXTENDED=y
702CONFIG_SERIAL_8250_MANY_PORTS=y 735CONFIG_SERIAL_8250_MANY_PORTS=y
703CONFIG_SERIAL_8250_SHARE_IRQ=y
704# CONFIG_SERIAL_8250_DETECT_IRQ is not set
705# CONFIG_SERIAL_8250_RSA is not set
706# CONFIG_SERIAL_8250_FOURPORT is not set 736# CONFIG_SERIAL_8250_FOURPORT is not set
707# CONFIG_SERIAL_8250_ACCENT is not set 737# CONFIG_SERIAL_8250_ACCENT is not set
708# CONFIG_SERIAL_8250_BOCA is not set 738# CONFIG_SERIAL_8250_BOCA is not set
739# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
709# CONFIG_SERIAL_8250_HUB6 is not set 740# CONFIG_SERIAL_8250_HUB6 is not set
741CONFIG_SERIAL_8250_SHARE_IRQ=y
742# CONFIG_SERIAL_8250_DETECT_IRQ is not set
743# CONFIG_SERIAL_8250_RSA is not set
710 744
711# 745#
712# Non-8250 serial port support 746# Non-8250 serial port support
@@ -755,10 +789,6 @@ CONFIG_HW_RANDOM=y
755# CONFIG_NVRAM is not set 789# CONFIG_NVRAM is not set
756# CONFIG_DTLK is not set 790# CONFIG_DTLK is not set
757# CONFIG_R3964 is not set 791# CONFIG_R3964 is not set
758
759#
760# Ftape, the floppy tape device driver
761#
762# CONFIG_RAW_DRIVER is not set 792# CONFIG_RAW_DRIVER is not set
763 793
764# 794#
@@ -863,6 +893,7 @@ CONFIG_SENSORS_LM85=m
863# CONFIG_SENSORS_LM92 is not set 893# CONFIG_SENSORS_LM92 is not set
864# CONFIG_SENSORS_MAX1619 is not set 894# CONFIG_SENSORS_MAX1619 is not set
865# CONFIG_SENSORS_PC87360 is not set 895# CONFIG_SENSORS_PC87360 is not set
896# CONFIG_SENSORS_PC87427 is not set
866# CONFIG_SENSORS_SMSC47M1 is not set 897# CONFIG_SENSORS_SMSC47M1 is not set
867# CONFIG_SENSORS_SMSC47M192 is not set 898# CONFIG_SENSORS_SMSC47M192 is not set
868# CONFIG_SENSORS_SMSC47B397 is not set 899# CONFIG_SENSORS_SMSC47B397 is not set
@@ -870,6 +901,7 @@ CONFIG_SENSORS_LM85=m
870# CONFIG_SENSORS_W83781D is not set 901# CONFIG_SENSORS_W83781D is not set
871# CONFIG_SENSORS_W83791D is not set 902# CONFIG_SENSORS_W83791D is not set
872# CONFIG_SENSORS_W83792D is not set 903# CONFIG_SENSORS_W83792D is not set
904# CONFIG_SENSORS_W83793 is not set
873# CONFIG_SENSORS_W83L785TS is not set 905# CONFIG_SENSORS_W83L785TS is not set
874# CONFIG_SENSORS_W83627HF is not set 906# CONFIG_SENSORS_W83627HF is not set
875# CONFIG_SENSORS_W83627EHF is not set 907# CONFIG_SENSORS_W83627EHF is not set
@@ -952,6 +984,11 @@ CONFIG_FONT_8x16=y
952# CONFIG_SOUND is not set 984# CONFIG_SOUND is not set
953 985
954# 986#
987# HID Devices
988#
989CONFIG_HID=y
990
991#
955# USB support 992# USB support
956# 993#
957CONFIG_USB_ARCH_HAS_HCD=y 994CONFIG_USB_ARCH_HAS_HCD=y
@@ -1028,6 +1065,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1028# CONFIG_USB_KAWETH is not set 1065# CONFIG_USB_KAWETH is not set
1029# CONFIG_USB_PEGASUS is not set 1066# CONFIG_USB_PEGASUS is not set
1030# CONFIG_USB_RTL8150 is not set 1067# CONFIG_USB_RTL8150 is not set
1068# CONFIG_USB_USBNET_MII is not set
1031# CONFIG_USB_USBNET is not set 1069# CONFIG_USB_USBNET is not set
1032CONFIG_USB_MON=y 1070CONFIG_USB_MON=y
1033 1071
@@ -1179,9 +1217,6 @@ CONFIG_RAMFS=y
1179# CONFIG_BEFS_FS is not set 1217# CONFIG_BEFS_FS is not set
1180# CONFIG_BFS_FS is not set 1218# CONFIG_BFS_FS is not set
1181# CONFIG_EFS_FS is not set 1219# CONFIG_EFS_FS is not set
1182CONFIG_JFFS_FS=y
1183CONFIG_JFFS_FS_VERBOSE=0
1184# CONFIG_JFFS_PROC_FS is not set
1185CONFIG_JFFS2_FS=y 1220CONFIG_JFFS2_FS=y
1186CONFIG_JFFS2_FS_DEBUG=0 1221CONFIG_JFFS2_FS_DEBUG=0
1187CONFIG_JFFS2_FS_WRITEBUFFER=y 1222CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1191,7 +1226,7 @@ CONFIG_JFFS2_FS_WRITEBUFFER=y
1191CONFIG_JFFS2_ZLIB=y 1226CONFIG_JFFS2_ZLIB=y
1192CONFIG_JFFS2_RTIME=y 1227CONFIG_JFFS2_RTIME=y
1193# CONFIG_JFFS2_RUBIN is not set 1228# CONFIG_JFFS2_RUBIN is not set
1194# CONFIG_CRAMFS is not set 1229CONFIG_CRAMFS=y
1195# CONFIG_VXFS_FS is not set 1230# CONFIG_VXFS_FS is not set
1196# CONFIG_HPFS_FS is not set 1231# CONFIG_HPFS_FS is not set
1197# CONFIG_QNX4FS_FS is not set 1232# CONFIG_QNX4FS_FS is not set
@@ -1285,6 +1320,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1285# CONFIG_NLS_UTF8 is not set 1320# CONFIG_NLS_UTF8 is not set
1286 1321
1287# 1322#
1323# Distributed Lock Manager
1324#
1325# CONFIG_DLM is not set
1326
1327#
1288# Profiling support 1328# Profiling support
1289# 1329#
1290# CONFIG_PROFILING is not set 1330# CONFIG_PROFILING is not set
@@ -1296,6 +1336,8 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1296CONFIG_ENABLE_MUST_CHECK=y 1336CONFIG_ENABLE_MUST_CHECK=y
1297CONFIG_MAGIC_SYSRQ=y 1337CONFIG_MAGIC_SYSRQ=y
1298# CONFIG_UNUSED_SYMBOLS is not set 1338# CONFIG_UNUSED_SYMBOLS is not set
1339# CONFIG_DEBUG_FS is not set
1340# CONFIG_HEADERS_CHECK is not set
1299CONFIG_DEBUG_KERNEL=y 1341CONFIG_DEBUG_KERNEL=y
1300CONFIG_LOG_BUF_SHIFT=16 1342CONFIG_LOG_BUF_SHIFT=16
1301CONFIG_DETECT_SOFTLOCKUP=y 1343CONFIG_DETECT_SOFTLOCKUP=y
@@ -1311,12 +1353,10 @@ CONFIG_DEBUG_MUTEXES=y
1311# CONFIG_DEBUG_KOBJECT is not set 1353# CONFIG_DEBUG_KOBJECT is not set
1312CONFIG_DEBUG_BUGVERBOSE=y 1354CONFIG_DEBUG_BUGVERBOSE=y
1313CONFIG_DEBUG_INFO=y 1355CONFIG_DEBUG_INFO=y
1314# CONFIG_DEBUG_FS is not set
1315# CONFIG_DEBUG_VM is not set 1356# CONFIG_DEBUG_VM is not set
1316# CONFIG_DEBUG_LIST is not set 1357# CONFIG_DEBUG_LIST is not set
1317CONFIG_FRAME_POINTER=y 1358CONFIG_FRAME_POINTER=y
1318CONFIG_FORCED_INLINING=y 1359CONFIG_FORCED_INLINING=y
1319# CONFIG_HEADERS_CHECK is not set
1320# CONFIG_RCU_TORTURE_TEST is not set 1360# CONFIG_RCU_TORTURE_TEST is not set
1321CONFIG_DEBUG_USER=y 1361CONFIG_DEBUG_USER=y
1322# CONFIG_DEBUG_ERRORS is not set 1362# CONFIG_DEBUG_ERRORS is not set
@@ -1339,6 +1379,7 @@ CONFIG_DEBUG_S3C2410_UART=0
1339# 1379#
1340# Library routines 1380# Library routines
1341# 1381#
1382CONFIG_BITREVERSE=y
1342# CONFIG_CRC_CCITT is not set 1383# CONFIG_CRC_CCITT is not set
1343# CONFIG_CRC16 is not set 1384# CONFIG_CRC16 is not set
1344CONFIG_CRC32=y 1385CONFIG_CRC32=y
@@ -1346,3 +1387,4 @@ CONFIG_CRC32=y
1346CONFIG_ZLIB_INFLATE=y 1387CONFIG_ZLIB_INFLATE=y
1347CONFIG_ZLIB_DEFLATE=y 1388CONFIG_ZLIB_DEFLATE=y
1348CONFIG_PLIST=y 1389CONFIG_PLIST=y
1390CONFIG_IOMAP_COPY=y
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index ab06a86e85d5..bb28087bf818 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -10,7 +10,6 @@ obj-y := compat.o entry-armv.o entry-common.o irq.o \
10 process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ 10 process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
11 time.o traps.o 11 time.o traps.o
12 12
13obj-$(CONFIG_APM) += apm.o
14obj-$(CONFIG_ISA_DMA_API) += dma.o 13obj-$(CONFIG_ISA_DMA_API) += dma.o
15obj-$(CONFIG_ARCH_ACORN) += ecard.o 14obj-$(CONFIG_ARCH_ACORN) += ecard.o
16obj-$(CONFIG_FIQ) += fiq.o 15obj-$(CONFIG_FIQ) += fiq.o
@@ -19,6 +18,7 @@ obj-$(CONFIG_ARTHUR) += arthur.o
19obj-$(CONFIG_ISA_DMA) += dma-isa.o 18obj-$(CONFIG_ISA_DMA) += dma-isa.o
20obj-$(CONFIG_PCI) += bios32.o isa.o 19obj-$(CONFIG_PCI) += bios32.o isa.o
21obj-$(CONFIG_SMP) += smp.o 20obj-$(CONFIG_SMP) += smp.o
21obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
22obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o 22obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
23 23
24obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 24obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
deleted file mode 100644
index 2c37b70b17ab..000000000000
--- a/arch/arm/kernel/apm.c
+++ /dev/null
@@ -1,672 +0,0 @@
1/*
2 * bios-less APM driver for ARM Linux
3 * Jamey Hicks <jamey@crl.dec.com>
4 * adapted from the APM BIOS driver for Linux by Stephen Rothwell (sfr@linuxcare.com)
5 *
6 * APM 1.2 Reference:
7 * Intel Corporation, Microsoft Corporation. Advanced Power Management
8 * (APM) BIOS Interface Specification, Revision 1.2, February 1996.
9 *
10 * [This document is available from Microsoft at:
11 * http://www.microsoft.com/hwdev/busbios/amp_12.htm]
12 */
13#include <linux/module.h>
14#include <linux/poll.h>
15#include <linux/slab.h>
16#include <linux/proc_fs.h>
17#include <linux/miscdevice.h>
18#include <linux/apm_bios.h>
19#include <linux/capability.h>
20#include <linux/sched.h>
21#include <linux/pm.h>
22#include <linux/device.h>
23#include <linux/kernel.h>
24#include <linux/list.h>
25#include <linux/init.h>
26#include <linux/completion.h>
27#include <linux/kthread.h>
28#include <linux/delay.h>
29
30#include <asm/apm.h> /* apm_power_info */
31#include <asm/system.h>
32
33/*
34 * The apm_bios device is one of the misc char devices.
35 * This is its minor number.
36 */
37#define APM_MINOR_DEV 134
38
39/*
40 * See Documentation/Config.help for the configuration options.
41 *
42 * Various options can be changed at boot time as follows:
43 * (We allow underscores for compatibility with the modules code)
44 * apm=on/off enable/disable APM
45 */
46
47/*
48 * Maximum number of events stored
49 */
50#define APM_MAX_EVENTS 16
51
52struct apm_queue {
53 unsigned int event_head;
54 unsigned int event_tail;
55 apm_event_t events[APM_MAX_EVENTS];
56};
57
58/*
59 * The per-file APM data
60 */
61struct apm_user {
62 struct list_head list;
63
64 unsigned int suser: 1;
65 unsigned int writer: 1;
66 unsigned int reader: 1;
67
68 int suspend_result;
69 unsigned int suspend_state;
70#define SUSPEND_NONE 0 /* no suspend pending */
71#define SUSPEND_PENDING 1 /* suspend pending read */
72#define SUSPEND_READ 2 /* suspend read, pending ack */
73#define SUSPEND_ACKED 3 /* suspend acked */
74#define SUSPEND_WAIT 4 /* waiting for suspend */
75#define SUSPEND_DONE 5 /* suspend completed */
76
77 struct apm_queue queue;
78};
79
80/*
81 * Local variables
82 */
83static int suspends_pending;
84static int apm_disabled;
85static struct task_struct *kapmd_tsk;
86
87static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
88static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
89
90/*
91 * This is a list of everyone who has opened /dev/apm_bios
92 */
93static DECLARE_RWSEM(user_list_lock);
94static LIST_HEAD(apm_user_list);
95
96/*
97 * kapmd info. kapmd provides us a process context to handle
98 * "APM" events within - specifically necessary if we're going
99 * to be suspending the system.
100 */
101static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
102static DEFINE_SPINLOCK(kapmd_queue_lock);
103static struct apm_queue kapmd_queue;
104
105static DEFINE_MUTEX(state_lock);
106
107static const char driver_version[] = "1.13"; /* no spaces */
108
109
110
111/*
112 * Compatibility cruft until the IPAQ people move over to the new
113 * interface.
114 */
115static void __apm_get_power_status(struct apm_power_info *info)
116{
117}
118
119/*
120 * This allows machines to provide their own "apm get power status" function.
121 */
122void (*apm_get_power_status)(struct apm_power_info *) = __apm_get_power_status;
123EXPORT_SYMBOL(apm_get_power_status);
124
125
126/*
127 * APM event queue management.
128 */
129static inline int queue_empty(struct apm_queue *q)
130{
131 return q->event_head == q->event_tail;
132}
133
134static inline apm_event_t queue_get_event(struct apm_queue *q)
135{
136 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
137 return q->events[q->event_tail];
138}
139
140static void queue_add_event(struct apm_queue *q, apm_event_t event)
141{
142 q->event_head = (q->event_head + 1) % APM_MAX_EVENTS;
143 if (q->event_head == q->event_tail) {
144 static int notified;
145
146 if (notified++ == 0)
147 printk(KERN_ERR "apm: an event queue overflowed\n");
148 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
149 }
150 q->events[q->event_head] = event;
151}
152
153static void queue_event(apm_event_t event)
154{
155 struct apm_user *as;
156
157 down_read(&user_list_lock);
158 list_for_each_entry(as, &apm_user_list, list) {
159 if (as->reader)
160 queue_add_event(&as->queue, event);
161 }
162 up_read(&user_list_lock);
163 wake_up_interruptible(&apm_waitqueue);
164}
165
166/*
167 * queue_suspend_event - queue an APM suspend event.
168 *
169 * Check that we're in a state where we can suspend. If not,
170 * return -EBUSY. Otherwise, queue an event to all "writer"
171 * users. If there are no "writer" users, return '1' to
172 * indicate that we can immediately suspend.
173 */
174static int queue_suspend_event(apm_event_t event, struct apm_user *sender)
175{
176 struct apm_user *as;
177 int ret = 1;
178
179 mutex_lock(&state_lock);
180 down_read(&user_list_lock);
181
182 /*
183 * If a thread is still processing, we can't suspend, so reject
184 * the request.
185 */
186 list_for_each_entry(as, &apm_user_list, list) {
187 if (as != sender && as->reader && as->writer && as->suser &&
188 as->suspend_state != SUSPEND_NONE) {
189 ret = -EBUSY;
190 goto out;
191 }
192 }
193
194 list_for_each_entry(as, &apm_user_list, list) {
195 if (as != sender && as->reader && as->writer && as->suser) {
196 as->suspend_state = SUSPEND_PENDING;
197 suspends_pending++;
198 queue_add_event(&as->queue, event);
199 ret = 0;
200 }
201 }
202 out:
203 up_read(&user_list_lock);
204 mutex_unlock(&state_lock);
205 wake_up_interruptible(&apm_waitqueue);
206 return ret;
207}
208
209static void apm_suspend(void)
210{
211 struct apm_user *as;
212 int err = pm_suspend(PM_SUSPEND_MEM);
213
214 /*
215 * Anyone on the APM queues will think we're still suspended.
216 * Send a message so everyone knows we're now awake again.
217 */
218 queue_event(APM_NORMAL_RESUME);
219
220 /*
221 * Finally, wake up anyone who is sleeping on the suspend.
222 */
223 mutex_lock(&state_lock);
224 down_read(&user_list_lock);
225 list_for_each_entry(as, &apm_user_list, list) {
226 if (as->suspend_state == SUSPEND_WAIT ||
227 as->suspend_state == SUSPEND_ACKED) {
228 as->suspend_result = err;
229 as->suspend_state = SUSPEND_DONE;
230 }
231 }
232 up_read(&user_list_lock);
233 mutex_unlock(&state_lock);
234
235 wake_up(&apm_suspend_waitqueue);
236}
237
238static ssize_t apm_read(struct file *fp, char __user *buf, size_t count, loff_t *ppos)
239{
240 struct apm_user *as = fp->private_data;
241 apm_event_t event;
242 int i = count, ret = 0;
243
244 if (count < sizeof(apm_event_t))
245 return -EINVAL;
246
247 if (queue_empty(&as->queue) && fp->f_flags & O_NONBLOCK)
248 return -EAGAIN;
249
250 wait_event_interruptible(apm_waitqueue, !queue_empty(&as->queue));
251
252 while ((i >= sizeof(event)) && !queue_empty(&as->queue)) {
253 event = queue_get_event(&as->queue);
254
255 ret = -EFAULT;
256 if (copy_to_user(buf, &event, sizeof(event)))
257 break;
258
259 mutex_lock(&state_lock);
260 if (as->suspend_state == SUSPEND_PENDING &&
261 (event == APM_SYS_SUSPEND || event == APM_USER_SUSPEND))
262 as->suspend_state = SUSPEND_READ;
263 mutex_unlock(&state_lock);
264
265 buf += sizeof(event);
266 i -= sizeof(event);
267 }
268
269 if (i < count)
270 ret = count - i;
271
272 return ret;
273}
274
275static unsigned int apm_poll(struct file *fp, poll_table * wait)
276{
277 struct apm_user *as = fp->private_data;
278
279 poll_wait(fp, &apm_waitqueue, wait);
280 return queue_empty(&as->queue) ? 0 : POLLIN | POLLRDNORM;
281}
282
283/*
284 * apm_ioctl - handle APM ioctl
285 *
286 * APM_IOC_SUSPEND
287 * This IOCTL is overloaded, and performs two functions. It is used to:
288 * - initiate a suspend
289 * - acknowledge a suspend read from /dev/apm_bios.
290 * Only when everyone who has opened /dev/apm_bios with write permission
291 * has acknowledge does the actual suspend happen.
292 */
293static int
294apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
295{
296 struct apm_user *as = filp->private_data;
297 unsigned long flags;
298 int err = -EINVAL;
299
300 if (!as->suser || !as->writer)
301 return -EPERM;
302
303 switch (cmd) {
304 case APM_IOC_SUSPEND:
305 mutex_lock(&state_lock);
306
307 as->suspend_result = -EINTR;
308
309 if (as->suspend_state == SUSPEND_READ) {
310 int pending;
311
312 /*
313 * If we read a suspend command from /dev/apm_bios,
314 * then the corresponding APM_IOC_SUSPEND ioctl is
315 * interpreted as an acknowledge.
316 */
317 as->suspend_state = SUSPEND_ACKED;
318 suspends_pending--;
319 pending = suspends_pending == 0;
320 mutex_unlock(&state_lock);
321
322 /*
323 * If there are no further acknowledges required,
324 * suspend the system.
325 */
326 if (pending)
327 apm_suspend();
328
329 /*
330 * Wait for the suspend/resume to complete. If there
331 * are pending acknowledges, we wait here for them.
332 *
333 * Note: we need to ensure that the PM subsystem does
334 * not kick us out of the wait when it suspends the
335 * threads.
336 */
337 flags = current->flags;
338 current->flags |= PF_NOFREEZE;
339
340 wait_event(apm_suspend_waitqueue,
341 as->suspend_state == SUSPEND_DONE);
342 } else {
343 as->suspend_state = SUSPEND_WAIT;
344 mutex_unlock(&state_lock);
345
346 /*
347 * Otherwise it is a request to suspend the system.
348 * Queue an event for all readers, and expect an
349 * acknowledge from all writers who haven't already
350 * acknowledged.
351 */
352 err = queue_suspend_event(APM_USER_SUSPEND, as);
353 if (err < 0) {
354 /*
355 * Avoid taking the lock here - this
356 * should be fine.
357 */
358 as->suspend_state = SUSPEND_NONE;
359 break;
360 }
361
362 if (err > 0)
363 apm_suspend();
364
365 /*
366 * Wait for the suspend/resume to complete. If there
367 * are pending acknowledges, we wait here for them.
368 *
369 * Note: we need to ensure that the PM subsystem does
370 * not kick us out of the wait when it suspends the
371 * threads.
372 */
373 flags = current->flags;
374 current->flags |= PF_NOFREEZE;
375
376 wait_event_interruptible(apm_suspend_waitqueue,
377 as->suspend_state == SUSPEND_DONE);
378 }
379
380 current->flags = flags;
381
382 mutex_lock(&state_lock);
383 err = as->suspend_result;
384 as->suspend_state = SUSPEND_NONE;
385 mutex_unlock(&state_lock);
386 break;
387 }
388
389 return err;
390}
391
392static int apm_release(struct inode * inode, struct file * filp)
393{
394 struct apm_user *as = filp->private_data;
395 int pending = 0;
396
397 filp->private_data = NULL;
398
399 down_write(&user_list_lock);
400 list_del(&as->list);
401 up_write(&user_list_lock);
402
403 /*
404 * We are now unhooked from the chain. As far as new
405 * events are concerned, we no longer exist. However, we
406 * need to balance suspends_pending, which means the
407 * possibility of sleeping.
408 */
409 mutex_lock(&state_lock);
410 if (as->suspend_state != SUSPEND_NONE) {
411 suspends_pending -= 1;
412 pending = suspends_pending == 0;
413 }
414 mutex_unlock(&state_lock);
415 if (pending)
416 apm_suspend();
417
418 kfree(as);
419 return 0;
420}
421
422static int apm_open(struct inode * inode, struct file * filp)
423{
424 struct apm_user *as;
425
426 as = kzalloc(sizeof(*as), GFP_KERNEL);
427 if (as) {
428 /*
429 * XXX - this is a tiny bit broken, when we consider BSD
430 * process accounting. If the device is opened by root, we
431 * instantly flag that we used superuser privs. Who knows,
432 * we might close the device immediately without doing a
433 * privileged operation -- cevans
434 */
435 as->suser = capable(CAP_SYS_ADMIN);
436 as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE;
437 as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ;
438
439 down_write(&user_list_lock);
440 list_add(&as->list, &apm_user_list);
441 up_write(&user_list_lock);
442
443 filp->private_data = as;
444 }
445
446 return as ? 0 : -ENOMEM;
447}
448
449static struct file_operations apm_bios_fops = {
450 .owner = THIS_MODULE,
451 .read = apm_read,
452 .poll = apm_poll,
453 .ioctl = apm_ioctl,
454 .open = apm_open,
455 .release = apm_release,
456};
457
458static struct miscdevice apm_device = {
459 .minor = APM_MINOR_DEV,
460 .name = "apm_bios",
461 .fops = &apm_bios_fops
462};
463
464
465#ifdef CONFIG_PROC_FS
466/*
467 * Arguments, with symbols from linux/apm_bios.h.
468 *
469 * 0) Linux driver version (this will change if format changes)
470 * 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2.
471 * 2) APM flags from APM Installation Check (0x00):
472 * bit 0: APM_16_BIT_SUPPORT
473 * bit 1: APM_32_BIT_SUPPORT
474 * bit 2: APM_IDLE_SLOWS_CLOCK
475 * bit 3: APM_BIOS_DISABLED
476 * bit 4: APM_BIOS_DISENGAGED
477 * 3) AC line status
478 * 0x00: Off-line
479 * 0x01: On-line
480 * 0x02: On backup power (BIOS >= 1.1 only)
481 * 0xff: Unknown
482 * 4) Battery status
483 * 0x00: High
484 * 0x01: Low
485 * 0x02: Critical
486 * 0x03: Charging
487 * 0x04: Selected battery not present (BIOS >= 1.2 only)
488 * 0xff: Unknown
489 * 5) Battery flag
490 * bit 0: High
491 * bit 1: Low
492 * bit 2: Critical
493 * bit 3: Charging
494 * bit 7: No system battery
495 * 0xff: Unknown
496 * 6) Remaining battery life (percentage of charge):
497 * 0-100: valid
498 * -1: Unknown
499 * 7) Remaining battery life (time units):
500 * Number of remaining minutes or seconds
501 * -1: Unknown
502 * 8) min = minutes; sec = seconds
503 */
504static int apm_get_info(char *buf, char **start, off_t fpos, int length)
505{
506 struct apm_power_info info;
507 char *units;
508 int ret;
509
510 info.ac_line_status = 0xff;
511 info.battery_status = 0xff;
512 info.battery_flag = 0xff;
513 info.battery_life = -1;
514 info.time = -1;
515 info.units = -1;
516
517 if (apm_get_power_status)
518 apm_get_power_status(&info);
519
520 switch (info.units) {
521 default: units = "?"; break;
522 case 0: units = "min"; break;
523 case 1: units = "sec"; break;
524 }
525
526 ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
527 driver_version, APM_32_BIT_SUPPORT,
528 info.ac_line_status, info.battery_status,
529 info.battery_flag, info.battery_life,
530 info.time, units);
531
532 return ret;
533}
534#endif
535
536static int kapmd(void *arg)
537{
538 do {
539 apm_event_t event;
540 int ret;
541
542 wait_event_interruptible(kapmd_wait,
543 !queue_empty(&kapmd_queue) || kthread_should_stop());
544
545 if (kthread_should_stop())
546 break;
547
548 spin_lock_irq(&kapmd_queue_lock);
549 event = 0;
550 if (!queue_empty(&kapmd_queue))
551 event = queue_get_event(&kapmd_queue);
552 spin_unlock_irq(&kapmd_queue_lock);
553
554 switch (event) {
555 case 0:
556 break;
557
558 case APM_LOW_BATTERY:
559 case APM_POWER_STATUS_CHANGE:
560 queue_event(event);
561 break;
562
563 case APM_USER_SUSPEND:
564 case APM_SYS_SUSPEND:
565 ret = queue_suspend_event(event, NULL);
566 if (ret < 0) {
567 /*
568 * We were busy. Try again in 50ms.
569 */
570 queue_add_event(&kapmd_queue, event);
571 msleep(50);
572 }
573 if (ret > 0)
574 apm_suspend();
575 break;
576
577 case APM_CRITICAL_SUSPEND:
578 apm_suspend();
579 break;
580 }
581 } while (1);
582
583 return 0;
584}
585
586static int __init apm_init(void)
587{
588 int ret;
589
590 if (apm_disabled) {
591 printk(KERN_NOTICE "apm: disabled on user request.\n");
592 return -ENODEV;
593 }
594
595 kapmd_tsk = kthread_create(kapmd, NULL, "kapmd");
596 if (IS_ERR(kapmd_tsk)) {
597 ret = PTR_ERR(kapmd_tsk);
598 kapmd_tsk = NULL;
599 return ret;
600 }
601 kapmd_tsk->flags |= PF_NOFREEZE;
602 wake_up_process(kapmd_tsk);
603
604#ifdef CONFIG_PROC_FS
605 create_proc_info_entry("apm", 0, NULL, apm_get_info);
606#endif
607
608 ret = misc_register(&apm_device);
609 if (ret != 0) {
610 remove_proc_entry("apm", NULL);
611 kthread_stop(kapmd_tsk);
612 }
613
614 return ret;
615}
616
617static void __exit apm_exit(void)
618{
619 misc_deregister(&apm_device);
620 remove_proc_entry("apm", NULL);
621
622 kthread_stop(kapmd_tsk);
623}
624
625module_init(apm_init);
626module_exit(apm_exit);
627
628MODULE_AUTHOR("Stephen Rothwell");
629MODULE_DESCRIPTION("Advanced Power Management");
630MODULE_LICENSE("GPL");
631
632#ifndef MODULE
633static int __init apm_setup(char *str)
634{
635 while ((str != NULL) && (*str != '\0')) {
636 if (strncmp(str, "off", 3) == 0)
637 apm_disabled = 1;
638 if (strncmp(str, "on", 2) == 0)
639 apm_disabled = 0;
640 str = strchr(str, ',');
641 if (str != NULL)
642 str += strspn(str, ", \t");
643 }
644 return 1;
645}
646
647__setup("apm=", apm_setup);
648#endif
649
650/**
651 * apm_queue_event - queue an APM event for kapmd
652 * @event: APM event
653 *
654 * Queue an APM event for kapmd to process and ultimately take the
655 * appropriate action. Only a subset of events are handled:
656 * %APM_LOW_BATTERY
657 * %APM_POWER_STATUS_CHANGE
658 * %APM_USER_SUSPEND
659 * %APM_SYS_SUSPEND
660 * %APM_CRITICAL_SUSPEND
661 */
662void apm_queue_event(apm_event_t event)
663{
664 unsigned long flags;
665
666 spin_lock_irqsave(&kapmd_queue_lock, flags);
667 queue_add_event(&kapmd_queue, event);
668 spin_unlock_irqrestore(&kapmd_queue_lock, flags);
669
670 wake_up_interruptible(&kapmd_wait);
671}
672EXPORT_SYMBOL(apm_queue_event);
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index f7598cbc7ec5..ae89cdd82b16 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -356,6 +356,7 @@
356 CALL(sys_move_pages) 356 CALL(sys_move_pages)
357/* 345 */ CALL(sys_getcpu) 357/* 345 */ CALL(sys_getcpu)
358 CALL(sys_ni_syscall) /* eventually epoll_pwait */ 358 CALL(sys_ni_syscall) /* eventually epoll_pwait */
359 CALL(sys_kexec_load)
359#ifndef syscalls_counted 360#ifndef syscalls_counted
360.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 361.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
361#define syscalls_counted 362#define syscalls_counted
diff --git a/arch/arm/kernel/crunch.c b/arch/arm/kernel/crunch.c
index cec83783206e..627d79414c9d 100644
--- a/arch/arm/kernel/crunch.c
+++ b/arch/arm/kernel/crunch.c
@@ -75,6 +75,7 @@ static struct notifier_block crunch_notifier_block = {
75static int __init crunch_init(void) 75static int __init crunch_init(void)
76{ 76{
77 thread_register_notifier(&crunch_notifier_block); 77 thread_register_notifier(&crunch_notifier_block);
78 elf_hwcap |= HWCAP_CRUNCH;
78 79
79 return 0; 80 return 0;
80} 81}
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 71257e3d513f..f1c0fb974177 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -1009,7 +1009,7 @@ ecard_probe(int slot, card_type_t type)
1009 ec->fiqmask = 4; 1009 ec->fiqmask = 4;
1010 } 1010 }
1011 1011
1012 for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) 1012 for (i = 0; i < ARRAY_SIZE(blacklist); i++)
1013 if (blacklist[i].manufacturer == ec->cid.manufacturer && 1013 if (blacklist[i].manufacturer == ec->cid.manufacturer &&
1014 blacklist[i].product == ec->cid.product) { 1014 blacklist[i].product == ec->cid.product) {
1015 ec->card_desc = blacklist[i].type; 1015 ec->card_desc = blacklist[i].type;
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 8517c3c3eb33..d645897652c2 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -27,6 +27,7 @@
27 * Interrupt handling. Preserves r7, r8, r9 27 * Interrupt handling. Preserves r7, r8, r9
28 */ 28 */
29 .macro irq_handler 29 .macro irq_handler
30 get_irqnr_preamble r5, lr
301: get_irqnr_and_base r0, r6, r5, lr 311: get_irqnr_and_base r0, r6, r5, lr
31 movne r1, sp 32 movne r1, sp
32 @ 33 @
@@ -99,7 +100,6 @@ common_invalid:
99 @ cpsr_<exception>, "old_r0" 100 @ cpsr_<exception>, "old_r0"
100 101
101 mov r0, sp 102 mov r0, sp
102 and r2, r6, #0x1f
103 b bad_mode 103 b bad_mode
104 104
105/* 105/*
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 6f5e7c50d42f..c589dc3ecd1a 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -9,6 +9,7 @@
9 */ 9 */
10 10
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include <asm/arch/entry-macro.S>
12 13
13#include "entry-header.S" 14#include "entry-header.S"
14 15
@@ -25,6 +26,9 @@ ret_fast_syscall:
25 tst r1, #_TIF_WORK_MASK 26 tst r1, #_TIF_WORK_MASK
26 bne fast_work_pending 27 bne fast_work_pending
27 28
29 /* perform architecture specific actions before user return */
30 arch_ret_to_user r1, lr
31
28 @ fast_restore_user_regs 32 @ fast_restore_user_regs
29 ldr r1, [sp, #S_OFF + S_PSR] @ get calling cpsr 33 ldr r1, [sp, #S_OFF + S_PSR] @ get calling cpsr
30 ldr lr, [sp, #S_OFF + S_PC]! @ get pc 34 ldr lr, [sp, #S_OFF + S_PC]! @ get pc
@@ -61,6 +65,9 @@ ret_slow_syscall:
61 tst r1, #_TIF_WORK_MASK 65 tst r1, #_TIF_WORK_MASK
62 bne work_pending 66 bne work_pending
63no_work_pending: 67no_work_pending:
68 /* perform architecture specific actions before user return */
69 arch_ret_to_user r1, lr
70
64 @ slow_restore_user_regs 71 @ slow_restore_user_regs
65 ldr r1, [sp, #S_PSR] @ get calling cpsr 72 ldr r1, [sp, #S_PSR] @ get calling cpsr
66 ldr lr, [sp, #S_PC]! @ get pc 73 ldr lr, [sp, #S_PC]! @ get pc
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index ec01f08f5642..e101846ab7dd 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -159,8 +159,7 @@ void __init init_IRQ(void)
159 int irq; 159 int irq;
160 160
161 for (irq = 0; irq < NR_IRQS; irq++) 161 for (irq = 0; irq < NR_IRQS; irq++)
162 irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE | 162 irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;
163 IRQ_NOPROBE;
164 163
165#ifdef CONFIG_SMP 164#ifdef CONFIG_SMP
166 bad_irq_desc.affinity = CPU_MASK_ALL; 165 bad_irq_desc.affinity = CPU_MASK_ALL;
diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 54bbd9fe255c..50a30bc91872 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -70,5 +70,5 @@ register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int por
70 isa_membase = membase; 70 isa_membase = membase;
71 isa_portbase = portbase; 71 isa_portbase = portbase;
72 isa_portshift = portshift; 72 isa_portshift = portshift;
73 isa_sysctl_header = register_sysctl_table(ctl_bus, 0); 73 isa_sysctl_header = register_sysctl_table(ctl_bus);
74} 74}
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
new file mode 100644
index 000000000000..863c66454f2b
--- /dev/null
+++ b/arch/arm/kernel/machine_kexec.c
@@ -0,0 +1,78 @@
1/*
2 * machine_kexec.c - handle transition of Linux booting another kernel
3 */
4
5#include <linux/mm.h>
6#include <linux/kexec.h>
7#include <linux/delay.h>
8#include <linux/reboot.h>
9#include <asm/pgtable.h>
10#include <asm/pgalloc.h>
11#include <asm/mmu_context.h>
12#include <asm/io.h>
13#include <asm/cacheflush.h>
14#include <asm/mach-types.h>
15
16const extern unsigned char relocate_new_kernel[];
17const extern unsigned int relocate_new_kernel_size;
18
19extern void setup_mm_for_reboot(char mode);
20
21extern unsigned long kexec_start_address;
22extern unsigned long kexec_indirection_page;
23extern unsigned long kexec_mach_type;
24
25/*
26 * Provide a dummy crash_notes definition while crash dump arrives to arm.
27 * This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
28 */
29
30int machine_kexec_prepare(struct kimage *image)
31{
32 return 0;
33}
34
35void machine_kexec_cleanup(struct kimage *image)
36{
37}
38
39void machine_shutdown(void)
40{
41}
42
43void machine_crash_shutdown(struct pt_regs *regs)
44{
45}
46
47void machine_kexec(struct kimage *image)
48{
49 unsigned long page_list;
50 unsigned long reboot_code_buffer_phys;
51 void *reboot_code_buffer;
52
53
54 page_list = image->head & PAGE_MASK;
55
56 /* we need both effective and real address here */
57 reboot_code_buffer_phys =
58 page_to_pfn(image->control_code_page) << PAGE_SHIFT;
59 reboot_code_buffer = page_address(image->control_code_page);
60
61 /* Prepare parameters for reboot_code_buffer*/
62 kexec_start_address = image->start;
63 kexec_indirection_page = page_list;
64 kexec_mach_type = machine_arch_type;
65
66 /* copy our kernel relocation code to the control code page */
67 memcpy(reboot_code_buffer,
68 relocate_new_kernel, relocate_new_kernel_size);
69
70
71 flush_icache_range((unsigned long) reboot_code_buffer,
72 (unsigned long) reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE);
73 printk(KERN_INFO "Bye!\n");
74
75 cpu_proc_fin();
76 setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
77 cpu_reset(reboot_code_buffer_phys);
78}
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index a9e8f7e55fd6..782af3cb213f 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -36,7 +36,13 @@
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/mach/time.h> 37#include <asm/mach/time.h>
38 38
39extern const char *processor_modes[]; 39static const char *processor_modes[] = {
40 "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
41 "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
42 "USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" ,
43 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
44};
45
40extern void setup_mm_for_reboot(char mode); 46extern void setup_mm_for_reboot(char mode);
41 47
42static volatile int hlt_counter; 48static volatile int hlt_counter;
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S
new file mode 100644
index 000000000000..7baadae7cb27
--- /dev/null
+++ b/arch/arm/kernel/relocate_kernel.S
@@ -0,0 +1,74 @@
1/*
2 * relocate_kernel.S - put the kernel image in place to boot
3 */
4
5#include <asm/kexec.h>
6
7 .globl relocate_new_kernel
8relocate_new_kernel:
9
10 ldr r0,kexec_indirection_page
11 ldr r1,kexec_start_address
12
13
140: /* top, read another word for the indirection page */
15 ldr r3, [r0],#4
16
17 /* Is it a destination page. Put destination address to r4 */
18 tst r3,#1,0
19 beq 1f
20 bic r4,r3,#1
21 b 0b
221:
23 /* Is it an indirection page */
24 tst r3,#2,0
25 beq 1f
26 bic r0,r3,#2
27 b 0b
281:
29
30 /* are we done ? */
31 tst r3,#4,0
32 beq 1f
33 b 2f
34
351:
36 /* is it source ? */
37 tst r3,#8,0
38 beq 0b
39 bic r3,r3,#8
40 mov r6,#1024
419:
42 ldr r5,[r3],#4
43 str r5,[r4],#4
44 subs r6,r6,#1
45 bne 9b
46 b 0b
47
482:
49 /* Jump to relocated kernel */
50 mov lr,r1
51 mov r0,#0
52 ldr r1,kexec_mach_type
53 mov r2,#0
54 mov pc,lr
55
56 .globl kexec_start_address
57kexec_start_address:
58 .long 0x0
59
60 .globl kexec_indirection_page
61kexec_indirection_page:
62 .long 0x0
63
64 .globl kexec_mach_type
65kexec_mach_type:
66 .long 0x0
67
68relocate_new_kernel_end:
69
70 .globl relocate_new_kernel_size
71relocate_new_kernel_size:
72 .long relocate_new_kernel_end - relocate_new_kernel
73
74
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index bbab134cd82d..03e37af315d7 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -88,6 +88,9 @@ struct cpu_user_fns cpu_user;
88#ifdef MULTI_CACHE 88#ifdef MULTI_CACHE
89struct cpu_cache_fns cpu_cache; 89struct cpu_cache_fns cpu_cache;
90#endif 90#endif
91#ifdef CONFIG_OUTER_CACHE
92struct outer_cache_fns outer_cache;
93#endif
91 94
92struct stack { 95struct stack {
93 u32 irq[3]; 96 u32 irq[3];
@@ -106,7 +109,7 @@ unsigned long phys_initrd_size __initdata = 0;
106static struct meminfo meminfo __initdata = { 0, }; 109static struct meminfo meminfo __initdata = { 0, };
107static const char *cpu_name; 110static const char *cpu_name;
108static const char *machine_name; 111static const char *machine_name;
109static char command_line[COMMAND_LINE_SIZE]; 112static char __initdata command_line[COMMAND_LINE_SIZE];
110 113
111static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; 114static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
112static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; 115static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
@@ -803,8 +806,8 @@ void __init setup_arch(char **cmdline_p)
803 init_mm.end_data = (unsigned long) &_edata; 806 init_mm.end_data = (unsigned long) &_edata;
804 init_mm.brk = (unsigned long) &_end; 807 init_mm.brk = (unsigned long) &_end;
805 808
806 memcpy(saved_command_line, from, COMMAND_LINE_SIZE); 809 memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
807 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 810 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
808 parse_cmdline(cmdline_p, from); 811 parse_cmdline(cmdline_p, from);
809 paging_init(&meminfo, mdesc); 812 paging_init(&meminfo, mdesc);
810 request_standard_resources(&meminfo, mdesc); 813 request_standard_resources(&meminfo, mdesc);
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 3c8cdcfe8d4a..f61decb89ba2 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -40,12 +40,14 @@
40 */ 40 */
41struct sys_timer *system_timer; 41struct sys_timer *system_timer;
42 42
43#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
43/* this needs a better home */ 44/* this needs a better home */
44DEFINE_SPINLOCK(rtc_lock); 45DEFINE_SPINLOCK(rtc_lock);
45 46
46#ifdef CONFIG_SA1100_RTC_MODULE 47#ifdef CONFIG_RTC_DRV_CMOS_MODULE
47EXPORT_SYMBOL(rtc_lock); 48EXPORT_SYMBOL(rtc_lock);
48#endif 49#endif
50#endif /* pc-style 'CMOS' RTC support */
49 51
50/* change this if you have some constant time drift */ 52/* change this if you have some constant time drift */
51#define USECS_PER_JIFFY (1000000/HZ) 53#define USECS_PER_JIFFY (1000000/HZ)
@@ -78,16 +80,6 @@ static unsigned long dummy_gettimeoffset(void)
78#endif 80#endif
79 81
80/* 82/*
81 * Scheduler clock - returns current time in nanosec units.
82 * This is the default implementation. Sub-architecture
83 * implementations can override this.
84 */
85unsigned long long __attribute__((weak)) sched_clock(void)
86{
87 return (unsigned long long)jiffies * (1000000000 / HZ);
88}
89
90/*
91 * An implementation of printk_clock() independent from 83 * An implementation of printk_clock() independent from
92 * sched_clock(). This avoids non-bootable kernels when 84 * sched_clock(). This avoids non-bootable kernels when
93 * printk_clock is enabled. 85 * printk_clock is enabled.
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 908915675edc..24095601359b 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -32,13 +32,6 @@
32#include "ptrace.h" 32#include "ptrace.h"
33#include "signal.h" 33#include "signal.h"
34 34
35const char *processor_modes[]=
36{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
37 "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
38 "USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" ,
39 "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
40};
41
42static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; 35static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
43 36
44#ifdef CONFIG_DEBUG_USER 37#ifdef CONFIG_DEBUG_USER
@@ -289,7 +282,10 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
289 regs->ARM_pc -= correction; 282 regs->ARM_pc -= correction;
290 283
291 pc = (void __user *)instruction_pointer(regs); 284 pc = (void __user *)instruction_pointer(regs);
292 if (thumb_mode(regs)) { 285
286 if (processor_mode(regs) == SVC_MODE) {
287 instr = *(u32 *) pc;
288 } else if (thumb_mode(regs)) {
293 get_user(instr, (u16 __user *)pc); 289 get_user(instr, (u16 __user *)pc);
294 } else { 290 } else {
295 get_user(instr, (u32 __user *)pc); 291 get_user(instr, (u32 __user *)pc);
@@ -337,12 +333,11 @@ asmlinkage void do_unexp_fiq (struct pt_regs *regs)
337 * It never returns, and never tries to sync. We hope that we can at least 333 * It never returns, and never tries to sync. We hope that we can at least
338 * dump out some state information... 334 * dump out some state information...
339 */ 335 */
340asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode) 336asmlinkage void bad_mode(struct pt_regs *regs, int reason)
341{ 337{
342 console_verbose(); 338 console_verbose();
343 339
344 printk(KERN_CRIT "Bad mode in %s handler detected: mode %s\n", 340 printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]);
345 handler[reason], processor_modes[proc_mode]);
346 341
347 die("Oops - bad mode", regs, 0); 342 die("Oops - bad mode", regs, 0);
348 local_irq_disable(); 343 local_irq_disable();
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index a8fa75ea07a9..b929a60f7547 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -53,10 +53,12 @@ SECTIONS
53 __security_initcall_start = .; 53 __security_initcall_start = .;
54 *(.security_initcall.init) 54 *(.security_initcall.init)
55 __security_initcall_end = .; 55 __security_initcall_end = .;
56#ifdef CONFIG_BLK_DEV_INITRD
56 . = ALIGN(32); 57 . = ALIGN(32);
57 __initramfs_start = .; 58 __initramfs_start = .;
58 usr/built-in.o(.init.ramfs) 59 usr/built-in.o(.init.ramfs)
59 __initramfs_end = .; 60 __initramfs_end = .;
61#endif
60 . = ALIGN(64); 62 . = ALIGN(64);
61 __per_cpu_start = .; 63 __per_cpu_start = .;
62 *(.data.percpu) 64 *(.data.percpu)
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91/Kconfig
index 9f11db8af233..bf0d96272e3a 100644
--- a/arch/arm/mach-at91rm9200/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -9,11 +9,14 @@ config ARCH_AT91RM9200
9 bool "AT91RM9200" 9 bool "AT91RM9200"
10 10
11config ARCH_AT91SAM9260 11config ARCH_AT91SAM9260
12 bool "AT91SAM9260" 12 bool "AT91SAM9260 or AT91SAM9XE"
13 13
14config ARCH_AT91SAM9261 14config ARCH_AT91SAM9261
15 bool "AT91SAM9261" 15 bool "AT91SAM9261"
16 16
17config ARCH_AT91SAM9263
18 bool "AT91SAM9263"
19
17endchoice 20endchoice
18 21
19# ---------------------------------------------------------- 22# ----------------------------------------------------------
@@ -90,13 +93,22 @@ endif
90 93
91if ARCH_AT91SAM9260 94if ARCH_AT91SAM9260
92 95
93comment "AT91SAM9260 Board Type" 96comment "AT91SAM9260 Variants"
97
98config ARCH_AT91SAM9260_SAM9XE
99 bool "AT91SAM9XE"
100 depends on ARCH_AT91SAM9260
101 help
102 Select this if you are using Atmel's AT91SAM9XE System-on-Chip.
103 They are basicaly AT91SAM9260s with various sizes of embedded Flash.
104
105comment "AT91SAM9260 / AT91SAM9XE Board Type"
94 106
95config MACH_AT91SAM9260EK 107config MACH_AT91SAM9260EK
96 bool "Atmel AT91SAM9260-EK Evaluation Kit" 108 bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit"
97 depends on ARCH_AT91SAM9260 109 depends on ARCH_AT91SAM9260
98 help 110 help
99 Select this if you are using Atmel's AT91SAM9260-EK Evaluation Kit. 111 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
100 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> 112 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
101 113
102endif 114endif
@@ -118,17 +130,32 @@ endif
118 130
119# ---------------------------------------------------------- 131# ----------------------------------------------------------
120 132
133if ARCH_AT91SAM9263
134
135comment "AT91SAM9263 Board Type"
136
137config MACH_AT91SAM9263EK
138 bool "Atmel AT91SAM9263-EK Evaluation Kit"
139 depends on ARCH_AT91SAM9263
140 help
141 Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
142 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
143
144endif
145
146# ----------------------------------------------------------
147
121comment "AT91 Board Options" 148comment "AT91 Board Options"
122 149
123config MTD_AT91_DATAFLASH_CARD 150config MTD_AT91_DATAFLASH_CARD
124 bool "Enable DataFlash Card support" 151 bool "Enable DataFlash Card support"
125 depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK) 152 depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK)
126 help 153 help
127 Enable support for the DataFlash card. 154 Enable support for the DataFlash card.
128 155
129config MTD_NAND_AT91_BUSWIDTH_16 156config MTD_NAND_AT91_BUSWIDTH_16
130 bool "Enable 16-bit data bus interface to NAND flash" 157 bool "Enable 16-bit data bus interface to NAND flash"
131 depends on (MACH_AT91SAM9261EK || MACH_AT91SAM9260EK) 158 depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK)
132 help 159 help
133 On AT91SAM926x boards both types of NAND flash can be present 160 On AT91SAM926x boards both types of NAND flash can be present
134 (8 and 16 bit data bus width). 161 (8 and 16 bit data bus width).
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91/Makefile
index cf777007847a..05de6cdc88f1 100644
--- a/arch/arm/mach-at91rm9200/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_PM) += pm.o
13obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o 13obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
14obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o 14obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o
15obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o 15obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o
16obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o
16 17
17# AT91RM9200 board-specific support 18# AT91RM9200 board-specific support
18obj-$(CONFIG_MACH_ONEARM) += board-1arm.o 19obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
@@ -31,6 +32,9 @@ obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
31# AT91SAM9261 board-specific support 32# AT91SAM9261 board-specific support
32obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o 33obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
33 34
35# AT91SAM9263 board-specific support
36obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
37
34# LEDs support 38# LEDs support
35led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o 39led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
36led-$(CONFIG_MACH_AT91RM9200EK) += leds.o 40led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
diff --git a/arch/arm/mach-at91rm9200/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index e667dcc7cd34..e667dcc7cd34 100644
--- a/arch/arm/mach-at91rm9200/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index a92e9a495b07..2ddcdd69df7d 100644
--- a/arch/arm/mach-at91rm9200/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91rm9200.c 2 * arch/arm/mach-at91/at91rm9200.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -117,6 +117,36 @@ static struct clk pioD_clk = {
117 .pmc_mask = 1 << AT91RM9200_ID_PIOD, 117 .pmc_mask = 1 << AT91RM9200_ID_PIOD,
118 .type = CLK_TYPE_PERIPHERAL, 118 .type = CLK_TYPE_PERIPHERAL,
119}; 119};
120static struct clk tc0_clk = {
121 .name = "tc0_clk",
122 .pmc_mask = 1 << AT91RM9200_ID_TC0,
123 .type = CLK_TYPE_PERIPHERAL,
124};
125static struct clk tc1_clk = {
126 .name = "tc1_clk",
127 .pmc_mask = 1 << AT91RM9200_ID_TC1,
128 .type = CLK_TYPE_PERIPHERAL,
129};
130static struct clk tc2_clk = {
131 .name = "tc2_clk",
132 .pmc_mask = 1 << AT91RM9200_ID_TC2,
133 .type = CLK_TYPE_PERIPHERAL,
134};
135static struct clk tc3_clk = {
136 .name = "tc3_clk",
137 .pmc_mask = 1 << AT91RM9200_ID_TC3,
138 .type = CLK_TYPE_PERIPHERAL,
139};
140static struct clk tc4_clk = {
141 .name = "tc4_clk",
142 .pmc_mask = 1 << AT91RM9200_ID_TC4,
143 .type = CLK_TYPE_PERIPHERAL,
144};
145static struct clk tc5_clk = {
146 .name = "tc5_clk",
147 .pmc_mask = 1 << AT91RM9200_ID_TC5,
148 .type = CLK_TYPE_PERIPHERAL,
149};
120 150
121static struct clk *periph_clocks[] __initdata = { 151static struct clk *periph_clocks[] __initdata = {
122 &pioA_clk, 152 &pioA_clk,
@@ -132,7 +162,12 @@ static struct clk *periph_clocks[] __initdata = {
132 &twi_clk, 162 &twi_clk,
133 &spi_clk, 163 &spi_clk,
134 // ssc 0 .. ssc2 164 // ssc 0 .. ssc2
135 // tc0 .. tc5 165 &tc0_clk,
166 &tc1_clk,
167 &tc2_clk,
168 &tc3_clk,
169 &tc4_clk,
170 &tc5_clk,
136 &ohci_clk, 171 &ohci_clk,
137 &ether_clk, 172 &ether_clk,
138 // irq0 .. irq6 173 // irq0 .. irq6
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 57fac7203fe4..2624a4f22d61 100644
--- a/arch/arm/mach-at91rm9200/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91rm9200_devices.c 2 * arch/arm/mach-at91/at91rm9200_devices.c
3 * 3 *
4 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> 4 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
5 * Copyright (C) 2005 David Brownell 5 * Copyright (C) 2005 David Brownell
@@ -315,7 +315,7 @@ static struct platform_device at91rm9200_mmc_device = {
315 .num_resources = ARRAY_SIZE(mmc_resources), 315 .num_resources = ARRAY_SIZE(mmc_resources),
316}; 316};
317 317
318void __init at91_add_device_mmc(struct at91_mmc_data *data) 318void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
319{ 319{
320 if (!data) 320 if (!data)
321 return; 321 return;
@@ -361,7 +361,7 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data)
361 platform_device_register(&at91rm9200_mmc_device); 361 platform_device_register(&at91rm9200_mmc_device);
362} 362}
363#else 363#else
364void __init at91_add_device_mmc(struct at91_mmc_data *data) {} 364void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
365#endif 365#endif
366 366
367 367
@@ -594,6 +594,10 @@ u8 at91_leds_timer;
594 594
595void __init at91_init_leds(u8 cpu_led, u8 timer_led) 595void __init at91_init_leds(u8 cpu_led, u8 timer_led)
596{ 596{
597 /* Enable GPIO to access the LEDs */
598 at91_set_gpio_output(cpu_led, 1);
599 at91_set_gpio_output(timer_led, 1);
600
597 at91_leds_cpu = cpu_led; 601 at91_leds_cpu = cpu_led;
598 at91_leds_timer = timer_led; 602 at91_leds_timer = timer_led;
599} 603}
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index b999e192a7e9..949199a244c7 100644
--- a/arch/arm/mach-at91rm9200/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/at91rm9200_time.c 2 * linux/arch/arm/mach-at91/at91rm9200_time.c
3 * 3 *
4 * Copyright (C) 2003 SAN People 4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL 5 * Copyright (C) 2003 ATMEL
diff --git a/arch/arm/mach-at91rm9200/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index b14871adc300..6ea41d8266cb 100644
--- a/arch/arm/mach-at91rm9200/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91sam9260.c 2 * arch/arm/mach-at91/at91sam9260.c
3 * 3 *
4 * Copyright (C) 2006 SAN People 4 * Copyright (C) 2006 SAN People
5 * 5 *
@@ -14,6 +14,7 @@
14 14
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/cpu.h>
17#include <asm/arch/at91sam9260.h> 18#include <asm/arch/at91sam9260.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>
@@ -27,7 +28,11 @@ static struct map_desc at91sam9260_io_desc[] __initdata = {
27 .pfn = __phys_to_pfn(AT91_BASE_SYS), 28 .pfn = __phys_to_pfn(AT91_BASE_SYS),
28 .length = SZ_16K, 29 .length = SZ_16K,
29 .type = MT_DEVICE, 30 .type = MT_DEVICE,
30 }, { 31 }
32};
33
34static struct map_desc at91sam9260_sram_desc[] __initdata = {
35 {
31 .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE, 36 .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE,
32 .pfn = __phys_to_pfn(AT91SAM9260_SRAM0_BASE), 37 .pfn = __phys_to_pfn(AT91SAM9260_SRAM0_BASE),
33 .length = AT91SAM9260_SRAM0_SIZE, 38 .length = AT91SAM9260_SRAM0_SIZE,
@@ -37,7 +42,14 @@ static struct map_desc at91sam9260_io_desc[] __initdata = {
37 .pfn = __phys_to_pfn(AT91SAM9260_SRAM1_BASE), 42 .pfn = __phys_to_pfn(AT91SAM9260_SRAM1_BASE),
38 .length = AT91SAM9260_SRAM1_SIZE, 43 .length = AT91SAM9260_SRAM1_SIZE,
39 .type = MT_DEVICE, 44 .type = MT_DEVICE,
40 }, 45 }
46};
47
48static struct map_desc at91sam9xe_sram_desc[] __initdata = {
49 {
50 .pfn = __phys_to_pfn(AT91SAM9XE_SRAM_BASE),
51 .type = MT_DEVICE,
52 }
41}; 53};
42 54
43/* -------------------------------------------------------------------- 55/* --------------------------------------------------------------------
@@ -107,13 +119,28 @@ static struct clk spi1_clk = {
107 .pmc_mask = 1 << AT91SAM9260_ID_SPI1, 119 .pmc_mask = 1 << AT91SAM9260_ID_SPI1,
108 .type = CLK_TYPE_PERIPHERAL, 120 .type = CLK_TYPE_PERIPHERAL,
109}; 121};
122static struct clk tc0_clk = {
123 .name = "tc0_clk",
124 .pmc_mask = 1 << AT91SAM9260_ID_TC0,
125 .type = CLK_TYPE_PERIPHERAL,
126};
127static struct clk tc1_clk = {
128 .name = "tc1_clk",
129 .pmc_mask = 1 << AT91SAM9260_ID_TC1,
130 .type = CLK_TYPE_PERIPHERAL,
131};
132static struct clk tc2_clk = {
133 .name = "tc2_clk",
134 .pmc_mask = 1 << AT91SAM9260_ID_TC2,
135 .type = CLK_TYPE_PERIPHERAL,
136};
110static struct clk ohci_clk = { 137static struct clk ohci_clk = {
111 .name = "ohci_clk", 138 .name = "ohci_clk",
112 .pmc_mask = 1 << AT91SAM9260_ID_UHP, 139 .pmc_mask = 1 << AT91SAM9260_ID_UHP,
113 .type = CLK_TYPE_PERIPHERAL, 140 .type = CLK_TYPE_PERIPHERAL,
114}; 141};
115static struct clk ether_clk = { 142static struct clk macb_clk = {
116 .name = "ether_clk", 143 .name = "macb_clk",
117 .pmc_mask = 1 << AT91SAM9260_ID_EMAC, 144 .pmc_mask = 1 << AT91SAM9260_ID_EMAC,
118 .type = CLK_TYPE_PERIPHERAL, 145 .type = CLK_TYPE_PERIPHERAL,
119}; 146};
@@ -137,6 +164,21 @@ static struct clk usart5_clk = {
137 .pmc_mask = 1 << AT91SAM9260_ID_US5, 164 .pmc_mask = 1 << AT91SAM9260_ID_US5,
138 .type = CLK_TYPE_PERIPHERAL, 165 .type = CLK_TYPE_PERIPHERAL,
139}; 166};
167static struct clk tc3_clk = {
168 .name = "tc3_clk",
169 .pmc_mask = 1 << AT91SAM9260_ID_TC3,
170 .type = CLK_TYPE_PERIPHERAL,
171};
172static struct clk tc4_clk = {
173 .name = "tc4_clk",
174 .pmc_mask = 1 << AT91SAM9260_ID_TC4,
175 .type = CLK_TYPE_PERIPHERAL,
176};
177static struct clk tc5_clk = {
178 .name = "tc5_clk",
179 .pmc_mask = 1 << AT91SAM9260_ID_TC5,
180 .type = CLK_TYPE_PERIPHERAL,
181};
140 182
141static struct clk *periph_clocks[] __initdata = { 183static struct clk *periph_clocks[] __initdata = {
142 &pioA_clk, 184 &pioA_clk,
@@ -152,14 +194,18 @@ static struct clk *periph_clocks[] __initdata = {
152 &spi0_clk, 194 &spi0_clk,
153 &spi1_clk, 195 &spi1_clk,
154 // ssc 196 // ssc
155 // tc0 .. tc2 197 &tc0_clk,
198 &tc1_clk,
199 &tc2_clk,
156 &ohci_clk, 200 &ohci_clk,
157 &ether_clk, 201 &macb_clk,
158 &isi_clk, 202 &isi_clk,
159 &usart3_clk, 203 &usart3_clk,
160 &usart4_clk, 204 &usart4_clk,
161 &usart5_clk, 205 &usart5_clk,
162 // tc3 .. tc5 206 &tc3_clk,
207 &tc4_clk,
208 &tc5_clk,
163 // irq0 .. irq2 209 // irq0 .. irq2
164}; 210};
165 211
@@ -213,7 +259,7 @@ static struct at91_gpio_bank at91sam9260_gpio[] = {
213 259
214static void at91sam9260_reset(void) 260static void at91sam9260_reset(void)
215{ 261{
216 at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 262 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
217} 263}
218 264
219 265
@@ -221,11 +267,37 @@ static void at91sam9260_reset(void)
221 * AT91SAM9260 processor initialization 267 * AT91SAM9260 processor initialization
222 * -------------------------------------------------------------------- */ 268 * -------------------------------------------------------------------- */
223 269
270static void __init at91sam9xe_initialize(void)
271{
272 unsigned long cidr, sram_size;
273
274 cidr = at91_sys_read(AT91_DBGU_CIDR);
275
276 switch (cidr & AT91_CIDR_SRAMSIZ) {
277 case AT91_CIDR_SRAMSIZ_32K:
278 sram_size = 2 * SZ_16K;
279 break;
280 case AT91_CIDR_SRAMSIZ_16K:
281 default:
282 sram_size = SZ_16K;
283 }
284
285 at91sam9xe_sram_desc->virtual = AT91_IO_VIRT_BASE - sram_size;
286 at91sam9xe_sram_desc->length = sram_size;
287
288 iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc));
289}
290
224void __init at91sam9260_initialize(unsigned long main_clock) 291void __init at91sam9260_initialize(unsigned long main_clock)
225{ 292{
226 /* Map peripherals */ 293 /* Map peripherals */
227 iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc)); 294 iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc));
228 295
296 if (cpu_is_at91sam9xe())
297 at91sam9xe_initialize();
298 else
299 iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
300
229 at91_arch_reset = at91sam9260_reset; 301 at91_arch_reset = at91sam9260_reset;
230 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) 302 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
231 | (1 << AT91SAM9260_ID_IRQ2); 303 | (1 << AT91SAM9260_ID_IRQ2);
diff --git a/arch/arm/mach-at91rm9200/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index f42d3a40ec3c..f7d342ccbebf 100644
--- a/arch/arm/mach-at91rm9200/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91sam9260_devices.c 2 * arch/arm/mach-at91/at91sam9260_devices.c
3 * 3 *
4 * Copyright (C) 2006 Atmel 4 * Copyright (C) 2006 Atmel
5 * 5 *
@@ -128,7 +128,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
128 128
129#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) 129#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
130static u64 eth_dmamask = 0xffffffffUL; 130static u64 eth_dmamask = 0xffffffffUL;
131static struct eth_platform_data eth_data; 131static struct at91_eth_data eth_data;
132 132
133static struct resource eth_resources[] = { 133static struct resource eth_resources[] = {
134 [0] = { 134 [0] = {
@@ -155,7 +155,7 @@ static struct platform_device at91sam9260_eth_device = {
155 .num_resources = ARRAY_SIZE(eth_resources), 155 .num_resources = ARRAY_SIZE(eth_resources),
156}; 156};
157 157
158void __init at91_add_device_eth(struct eth_platform_data *data) 158void __init at91_add_device_eth(struct at91_eth_data *data)
159{ 159{
160 if (!data) 160 if (!data)
161 return; 161 return;
@@ -192,7 +192,7 @@ void __init at91_add_device_eth(struct eth_platform_data *data)
192 platform_device_register(&at91sam9260_eth_device); 192 platform_device_register(&at91sam9260_eth_device);
193} 193}
194#else 194#else
195void __init at91_add_device_eth(struct eth_platform_data *data) {} 195void __init at91_add_device_eth(struct at91_eth_data *data) {}
196#endif 196#endif
197 197
198 198
@@ -229,7 +229,7 @@ static struct platform_device at91sam9260_mmc_device = {
229 .num_resources = ARRAY_SIZE(mmc_resources), 229 .num_resources = ARRAY_SIZE(mmc_resources),
230}; 230};
231 231
232void __init at91_add_device_mmc(struct at91_mmc_data *data) 232void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
233{ 233{
234 if (!data) 234 if (!data)
235 return; 235 return;
@@ -275,7 +275,7 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data)
275 platform_device_register(&at91sam9260_mmc_device); 275 platform_device_register(&at91sam9260_mmc_device);
276} 276}
277#else 277#else
278void __init at91_add_device_mmc(struct at91_mmc_data *data) {} 278void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
279#endif 279#endif
280 280
281 281
@@ -515,6 +515,10 @@ u8 at91_leds_timer;
515 515
516void __init at91_init_leds(u8 cpu_led, u8 timer_led) 516void __init at91_init_leds(u8 cpu_led, u8 timer_led)
517{ 517{
518 /* Enable GPIO to access the LEDs */
519 at91_set_gpio_output(cpu_led, 1);
520 at91_set_gpio_output(timer_led, 1);
521
518 at91_leds_cpu = cpu_led; 522 at91_leds_cpu = cpu_led;
519 at91_leds_timer = timer_led; 523 at91_leds_timer = timer_led;
520} 524}
diff --git a/arch/arm/mach-at91rm9200/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index d242bb885c6d..784d1e682d6d 100644
--- a/arch/arm/mach-at91rm9200/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91sam9261.c 2 * arch/arm/mach-at91/at91sam9261.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -97,6 +97,21 @@ static struct clk spi1_clk = {
97 .pmc_mask = 1 << AT91SAM9261_ID_SPI1, 97 .pmc_mask = 1 << AT91SAM9261_ID_SPI1,
98 .type = CLK_TYPE_PERIPHERAL, 98 .type = CLK_TYPE_PERIPHERAL,
99}; 99};
100static struct clk tc0_clk = {
101 .name = "tc0_clk",
102 .pmc_mask = 1 << AT91SAM9261_ID_TC0,
103 .type = CLK_TYPE_PERIPHERAL,
104};
105static struct clk tc1_clk = {
106 .name = "tc1_clk",
107 .pmc_mask = 1 << AT91SAM9261_ID_TC1,
108 .type = CLK_TYPE_PERIPHERAL,
109};
110static struct clk tc2_clk = {
111 .name = "tc2_clk",
112 .pmc_mask = 1 << AT91SAM9261_ID_TC2,
113 .type = CLK_TYPE_PERIPHERAL,
114};
100static struct clk ohci_clk = { 115static struct clk ohci_clk = {
101 .name = "ohci_clk", 116 .name = "ohci_clk",
102 .pmc_mask = 1 << AT91SAM9261_ID_UHP, 117 .pmc_mask = 1 << AT91SAM9261_ID_UHP,
@@ -121,7 +136,9 @@ static struct clk *periph_clocks[] __initdata = {
121 &spi0_clk, 136 &spi0_clk,
122 &spi1_clk, 137 &spi1_clk,
123 // ssc 0 .. ssc2 138 // ssc 0 .. ssc2
124 // tc0 .. tc2 139 &tc0_clk,
140 &tc1_clk,
141 &tc2_clk,
125 &ohci_clk, 142 &ohci_clk,
126 &lcdc_clk, 143 &lcdc_clk,
127 // irq0 .. irq2 144 // irq0 .. irq2
@@ -208,7 +225,7 @@ static struct at91_gpio_bank at91sam9261_gpio[] = {
208 225
209static void at91sam9261_reset(void) 226static void at91sam9261_reset(void)
210{ 227{
211 at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 228 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
212} 229}
213 230
214 231
diff --git a/arch/arm/mach-at91rm9200/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index ed1d79081b35..e1504766fd64 100644
--- a/arch/arm/mach-at91rm9200/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/at91sam9261_devices.c 2 * arch/arm/mach-at91/at91sam9261_devices.c
3 * 3 *
4 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> 4 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
5 * Copyright (C) 2005 David Brownell 5 * Copyright (C) 2005 David Brownell
@@ -159,7 +159,7 @@ static struct platform_device at91sam9261_mmc_device = {
159 .num_resources = ARRAY_SIZE(mmc_resources), 159 .num_resources = ARRAY_SIZE(mmc_resources),
160}; 160};
161 161
162void __init at91_add_device_mmc(struct at91_mmc_data *data) 162void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
163{ 163{
164 if (!data) 164 if (!data)
165 return; 165 return;
@@ -192,7 +192,7 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data)
192 platform_device_register(&at91sam9261_mmc_device); 192 platform_device_register(&at91sam9261_mmc_device);
193} 193}
194#else 194#else
195void __init at91_add_device_mmc(struct at91_mmc_data *data) {} 195void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
196#endif 196#endif
197 197
198 198
@@ -513,6 +513,10 @@ u8 at91_leds_timer;
513 513
514void __init at91_init_leds(u8 cpu_led, u8 timer_led) 514void __init at91_init_leds(u8 cpu_led, u8 timer_led)
515{ 515{
516 /* Enable GPIO to access the LEDs */
517 at91_set_gpio_output(cpu_led, 1);
518 at91_set_gpio_output(timer_led, 1);
519
516 at91_leds_cpu = cpu_led; 520 at91_leds_cpu = cpu_led;
517 at91_leds_timer = timer_led; 521 at91_leds_timer = timer_led;
518} 522}
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
new file mode 100644
index 000000000000..6aa342e8f1b1
--- /dev/null
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -0,0 +1,313 @@
1/*
2 * arch/arm/mach-at91/at91sam9263.c
3 *
4 * Copyright (C) 2007 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#include <linux/module.h>
14
15#include <asm/mach/arch.h>
16#include <asm/mach/map.h>
17#include <asm/arch/at91sam9263.h>
18#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h>
20
21#include "generic.h"
22#include "clock.h"
23
24static struct map_desc at91sam9263_io_desc[] __initdata = {
25 {
26 .virtual = AT91_VA_BASE_SYS,
27 .pfn = __phys_to_pfn(AT91_BASE_SYS),
28 .length = SZ_16K,
29 .type = MT_DEVICE,
30 }, {
31 .virtual = AT91_IO_VIRT_BASE - AT91SAM9263_SRAM0_SIZE,
32 .pfn = __phys_to_pfn(AT91SAM9263_SRAM0_BASE),
33 .length = AT91SAM9263_SRAM0_SIZE,
34 .type = MT_DEVICE,
35 }, {
36 .virtual = AT91_IO_VIRT_BASE - AT91SAM9263_SRAM0_SIZE - AT91SAM9263_SRAM1_SIZE,
37 .pfn = __phys_to_pfn(AT91SAM9263_SRAM1_BASE),
38 .length = AT91SAM9263_SRAM1_SIZE,
39 .type = MT_DEVICE,
40 },
41};
42
43/* --------------------------------------------------------------------
44 * Clocks
45 * -------------------------------------------------------------------- */
46
47/*
48 * The peripheral clocks.
49 */
50static struct clk pioA_clk = {
51 .name = "pioA_clk",
52 .pmc_mask = 1 << AT91SAM9263_ID_PIOA,
53 .type = CLK_TYPE_PERIPHERAL,
54};
55static struct clk pioB_clk = {
56 .name = "pioB_clk",
57 .pmc_mask = 1 << AT91SAM9263_ID_PIOB,
58 .type = CLK_TYPE_PERIPHERAL,
59};
60static struct clk pioCDE_clk = {
61 .name = "pioCDE_clk",
62 .pmc_mask = 1 << AT91SAM9263_ID_PIOCDE,
63 .type = CLK_TYPE_PERIPHERAL,
64};
65static struct clk usart0_clk = {
66 .name = "usart0_clk",
67 .pmc_mask = 1 << AT91SAM9263_ID_US0,
68 .type = CLK_TYPE_PERIPHERAL,
69};
70static struct clk usart1_clk = {
71 .name = "usart1_clk",
72 .pmc_mask = 1 << AT91SAM9263_ID_US1,
73 .type = CLK_TYPE_PERIPHERAL,
74};
75static struct clk usart2_clk = {
76 .name = "usart2_clk",
77 .pmc_mask = 1 << AT91SAM9263_ID_US2,
78 .type = CLK_TYPE_PERIPHERAL,
79};
80static struct clk mmc0_clk = {
81 .name = "mci0_clk",
82 .pmc_mask = 1 << AT91SAM9263_ID_MCI0,
83 .type = CLK_TYPE_PERIPHERAL,
84};
85static struct clk mmc1_clk = {
86 .name = "mci1_clk",
87 .pmc_mask = 1 << AT91SAM9263_ID_MCI1,
88 .type = CLK_TYPE_PERIPHERAL,
89};
90static struct clk twi_clk = {
91 .name = "twi_clk",
92 .pmc_mask = 1 << AT91SAM9263_ID_TWI,
93 .type = CLK_TYPE_PERIPHERAL,
94};
95static struct clk spi0_clk = {
96 .name = "spi0_clk",
97 .pmc_mask = 1 << AT91SAM9263_ID_SPI0,
98 .type = CLK_TYPE_PERIPHERAL,
99};
100static struct clk spi1_clk = {
101 .name = "spi1_clk",
102 .pmc_mask = 1 << AT91SAM9263_ID_SPI1,
103 .type = CLK_TYPE_PERIPHERAL,
104};
105static struct clk tcb_clk = {
106 .name = "tcb_clk",
107 .pmc_mask = 1 << AT91SAM9263_ID_TCB,
108 .type = CLK_TYPE_PERIPHERAL,
109};
110static struct clk macb_clk = {
111 .name = "macb_clk",
112 .pmc_mask = 1 << AT91SAM9263_ID_EMAC,
113 .type = CLK_TYPE_PERIPHERAL,
114};
115static struct clk udc_clk = {
116 .name = "udc_clk",
117 .pmc_mask = 1 << AT91SAM9263_ID_UDP,
118 .type = CLK_TYPE_PERIPHERAL,
119};
120static struct clk isi_clk = {
121 .name = "isi_clk",
122 .pmc_mask = 1 << AT91SAM9263_ID_ISI,
123 .type = CLK_TYPE_PERIPHERAL,
124};
125static struct clk lcdc_clk = {
126 .name = "lcdc_clk",
127 .pmc_mask = 1 << AT91SAM9263_ID_ISI,
128 .type = CLK_TYPE_PERIPHERAL,
129};
130static struct clk ohci_clk = {
131 .name = "ohci_clk",
132 .pmc_mask = 1 << AT91SAM9263_ID_UHP,
133 .type = CLK_TYPE_PERIPHERAL,
134};
135
136static struct clk *periph_clocks[] __initdata = {
137 &pioA_clk,
138 &pioB_clk,
139 &pioCDE_clk,
140 &usart0_clk,
141 &usart1_clk,
142 &usart2_clk,
143 &mmc0_clk,
144 &mmc1_clk,
145 // can
146 &twi_clk,
147 &spi0_clk,
148 &spi1_clk,
149 // ssc0 .. ssc1
150 // ac97
151 &tcb_clk,
152 // pwmc
153 &macb_clk,
154 // 2dge
155 &udc_clk,
156 &isi_clk,
157 &lcdc_clk,
158 // dma
159 &ohci_clk,
160 // irq0 .. irq1
161};
162
163/*
164 * The four programmable clocks.
165 * You must configure pin multiplexing to bring these signals out.
166 */
167static struct clk pck0 = {
168 .name = "pck0",
169 .pmc_mask = AT91_PMC_PCK0,
170 .type = CLK_TYPE_PROGRAMMABLE,
171 .id = 0,
172};
173static struct clk pck1 = {
174 .name = "pck1",
175 .pmc_mask = AT91_PMC_PCK1,
176 .type = CLK_TYPE_PROGRAMMABLE,
177 .id = 1,
178};
179static struct clk pck2 = {
180 .name = "pck2",
181 .pmc_mask = AT91_PMC_PCK2,
182 .type = CLK_TYPE_PROGRAMMABLE,
183 .id = 2,
184};
185static struct clk pck3 = {
186 .name = "pck3",
187 .pmc_mask = AT91_PMC_PCK3,
188 .type = CLK_TYPE_PROGRAMMABLE,
189 .id = 3,
190};
191
192static void __init at91sam9263_register_clocks(void)
193{
194 int i;
195
196 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
197 clk_register(periph_clocks[i]);
198
199 clk_register(&pck0);
200 clk_register(&pck1);
201 clk_register(&pck2);
202 clk_register(&pck3);
203}
204
205/* --------------------------------------------------------------------
206 * GPIO
207 * -------------------------------------------------------------------- */
208
209static struct at91_gpio_bank at91sam9263_gpio[] = {
210 {
211 .id = AT91SAM9263_ID_PIOA,
212 .offset = AT91_PIOA,
213 .clock = &pioA_clk,
214 }, {
215 .id = AT91SAM9263_ID_PIOB,
216 .offset = AT91_PIOB,
217 .clock = &pioB_clk,
218 }, {
219 .id = AT91SAM9263_ID_PIOCDE,
220 .offset = AT91_PIOC,
221 .clock = &pioCDE_clk,
222 }, {
223 .id = AT91SAM9263_ID_PIOCDE,
224 .offset = AT91_PIOD,
225 .clock = &pioCDE_clk,
226 }, {
227 .id = AT91SAM9263_ID_PIOCDE,
228 .offset = AT91_PIOE,
229 .clock = &pioCDE_clk,
230 }
231};
232
233static void at91sam9263_reset(void)
234{
235 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
236}
237
238
239/* --------------------------------------------------------------------
240 * AT91SAM9263 processor initialization
241 * -------------------------------------------------------------------- */
242
243void __init at91sam9263_initialize(unsigned long main_clock)
244{
245 /* Map peripherals */
246 iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc));
247
248 at91_arch_reset = at91sam9263_reset;
249 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
250
251 /* Init clock subsystem */
252 at91_clock_init(main_clock);
253
254 /* Register the processor-specific clocks */
255 at91sam9263_register_clocks();
256
257 /* Register GPIO subsystem */
258 at91_gpio_init(at91sam9263_gpio, 5);
259}
260
261/* --------------------------------------------------------------------
262 * Interrupt initialization
263 * -------------------------------------------------------------------- */
264
265/*
266 * The default interrupt priority levels (0 = lowest, 7 = highest).
267 */
268static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
269 7, /* Advanced Interrupt Controller (FIQ) */
270 7, /* System Peripherals */
271 0, /* Parallel IO Controller A */
272 0, /* Parallel IO Controller B */
273 0, /* Parallel IO Controller C, D and E */
274 0,
275 0,
276 6, /* USART 0 */
277 6, /* USART 1 */
278 6, /* USART 2 */
279 0, /* Multimedia Card Interface 0 */
280 0, /* Multimedia Card Interface 1 */
281 4, /* CAN */
282 0, /* Two-Wire Interface */
283 6, /* Serial Peripheral Interface 0 */
284 6, /* Serial Peripheral Interface 1 */
285 5, /* Serial Synchronous Controller 0 */
286 5, /* Serial Synchronous Controller 1 */
287 6, /* AC97 Controller */
288 0, /* Timer Counter 0, 1 and 2 */
289 0, /* Pulse Width Modulation Controller */
290 3, /* Ethernet */
291 0,
292 0, /* 2D Graphic Engine */
293 3, /* USB Device Port */
294 0, /* Image Sensor Interface */
295 3, /* LDC Controller */
296 0, /* DMA Controller */
297 0,
298 3, /* USB Host port */
299 0, /* Advanced Interrupt Controller (IRQ0) */
300 0, /* Advanced Interrupt Controller (IRQ1) */
301};
302
303void __init at91sam9263_init_interrupts(unsigned int priority[NR_AIC_IRQS])
304{
305 if (!priority)
306 priority = at91sam9263_default_irq_priority;
307
308 /* Initialize the AIC interrupt controller */
309 at91_aic_init(priority);
310
311 /* Enable GPIO interrupts */
312 at91_gpio_irq_setup();
313}
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
new file mode 100644
index 000000000000..d9af7ca58bce
--- /dev/null
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -0,0 +1,818 @@
1/*
2 * arch/arm/mach-at91/at91sam9263_devices.c
3 *
4 * Copyright (C) 2007 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12#include <asm/mach/arch.h>
13#include <asm/mach/map.h>
14
15#include <linux/platform_device.h>
16
17#include <asm/arch/board.h>
18#include <asm/arch/gpio.h>
19#include <asm/arch/at91sam9263.h>
20#include <asm/arch/at91sam926x_mc.h>
21#include <asm/arch/at91sam9263_matrix.h>
22
23#include "generic.h"
24
25#define SZ_512 0x00000200
26#define SZ_256 0x00000100
27#define SZ_16 0x00000010
28
29/* --------------------------------------------------------------------
30 * USB Host
31 * -------------------------------------------------------------------- */
32
33#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
34static u64 ohci_dmamask = 0xffffffffUL;
35static struct at91_usbh_data usbh_data;
36
37static struct resource usbh_resources[] = {
38 [0] = {
39 .start = AT91SAM9263_UHP_BASE,
40 .end = AT91SAM9263_UHP_BASE + SZ_1M - 1,
41 .flags = IORESOURCE_MEM,
42 },
43 [1] = {
44 .start = AT91SAM9263_ID_UHP,
45 .end = AT91SAM9263_ID_UHP,
46 .flags = IORESOURCE_IRQ,
47 },
48};
49
50static struct platform_device at91_usbh_device = {
51 .name = "at91_ohci",
52 .id = -1,
53 .dev = {
54 .dma_mask = &ohci_dmamask,
55 .coherent_dma_mask = 0xffffffff,
56 .platform_data = &usbh_data,
57 },
58 .resource = usbh_resources,
59 .num_resources = ARRAY_SIZE(usbh_resources),
60};
61
62void __init at91_add_device_usbh(struct at91_usbh_data *data)
63{
64 int i;
65
66 if (!data)
67 return;
68
69 /* Enable VBus control for UHP ports */
70 for (i = 0; i < data->ports; i++) {
71 if (data->vbus_pin[i])
72 at91_set_gpio_output(data->vbus_pin[i], 0);
73 }
74
75 usbh_data = *data;
76 platform_device_register(&at91_usbh_device);
77}
78#else
79void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
80#endif
81
82
83/* --------------------------------------------------------------------
84 * USB Device (Gadget)
85 * -------------------------------------------------------------------- */
86
87#ifdef CONFIG_USB_GADGET_AT91
88static struct at91_udc_data udc_data;
89
90static struct resource udc_resources[] = {
91 [0] = {
92 .start = AT91SAM9263_BASE_UDP,
93 .end = AT91SAM9263_BASE_UDP + SZ_16K - 1,
94 .flags = IORESOURCE_MEM,
95 },
96 [1] = {
97 .start = AT91SAM9263_ID_UDP,
98 .end = AT91SAM9263_ID_UDP,
99 .flags = IORESOURCE_IRQ,
100 },
101};
102
103static struct platform_device at91_udc_device = {
104 .name = "at91_udc",
105 .id = -1,
106 .dev = {
107 .platform_data = &udc_data,
108 },
109 .resource = udc_resources,
110 .num_resources = ARRAY_SIZE(udc_resources),
111};
112
113void __init at91_add_device_udc(struct at91_udc_data *data)
114{
115 if (!data)
116 return;
117
118 if (data->vbus_pin) {
119 at91_set_gpio_input(data->vbus_pin, 0);
120 at91_set_deglitch(data->vbus_pin, 1);
121 }
122
123 /* Pullup pin is handled internally by USB device peripheral */
124
125 udc_data = *data;
126 platform_device_register(&at91_udc_device);
127}
128#else
129void __init at91_add_device_udc(struct at91_udc_data *data) {}
130#endif
131
132
133/* --------------------------------------------------------------------
134 * Ethernet
135 * -------------------------------------------------------------------- */
136
137#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
138static u64 eth_dmamask = 0xffffffffUL;
139static struct at91_eth_data eth_data;
140
141static struct resource eth_resources[] = {
142 [0] = {
143 .start = AT91SAM9263_BASE_EMAC,
144 .end = AT91SAM9263_BASE_EMAC + SZ_16K - 1,
145 .flags = IORESOURCE_MEM,
146 },
147 [1] = {
148 .start = AT91SAM9263_ID_EMAC,
149 .end = AT91SAM9263_ID_EMAC,
150 .flags = IORESOURCE_IRQ,
151 },
152};
153
154static struct platform_device at91sam9263_eth_device = {
155 .name = "macb",
156 .id = -1,
157 .dev = {
158 .dma_mask = &eth_dmamask,
159 .coherent_dma_mask = 0xffffffff,
160 .platform_data = &eth_data,
161 },
162 .resource = eth_resources,
163 .num_resources = ARRAY_SIZE(eth_resources),
164};
165
166void __init at91_add_device_eth(struct at91_eth_data *data)
167{
168 if (!data)
169 return;
170
171 if (data->phy_irq_pin) {
172 at91_set_gpio_input(data->phy_irq_pin, 0);
173 at91_set_deglitch(data->phy_irq_pin, 1);
174 }
175
176 /* Pins used for MII and RMII */
177 at91_set_A_periph(AT91_PIN_PE21, 0); /* ETXCK_EREFCK */
178 at91_set_B_periph(AT91_PIN_PC25, 0); /* ERXDV */
179 at91_set_A_periph(AT91_PIN_PE25, 0); /* ERX0 */
180 at91_set_A_periph(AT91_PIN_PE26, 0); /* ERX1 */
181 at91_set_A_periph(AT91_PIN_PE27, 0); /* ERXER */
182 at91_set_A_periph(AT91_PIN_PE28, 0); /* ETXEN */
183 at91_set_A_periph(AT91_PIN_PE23, 0); /* ETX0 */
184 at91_set_A_periph(AT91_PIN_PE24, 0); /* ETX1 */
185 at91_set_A_periph(AT91_PIN_PE30, 0); /* EMDIO */
186 at91_set_A_periph(AT91_PIN_PE29, 0); /* EMDC */
187
188 if (!data->is_rmii) {
189 at91_set_A_periph(AT91_PIN_PE22, 0); /* ECRS */
190 at91_set_B_periph(AT91_PIN_PC26, 0); /* ECOL */
191 at91_set_B_periph(AT91_PIN_PC22, 0); /* ERX2 */
192 at91_set_B_periph(AT91_PIN_PC23, 0); /* ERX3 */
193 at91_set_B_periph(AT91_PIN_PC27, 0); /* ERXCK */
194 at91_set_B_periph(AT91_PIN_PC20, 0); /* ETX2 */
195 at91_set_B_periph(AT91_PIN_PC21, 0); /* ETX3 */
196 at91_set_B_periph(AT91_PIN_PC24, 0); /* ETXER */
197 }
198
199 eth_data = *data;
200 platform_device_register(&at91sam9263_eth_device);
201}
202#else
203void __init at91_add_device_eth(struct at91_eth_data *data) {}
204#endif
205
206
207/* --------------------------------------------------------------------
208 * MMC / SD
209 * -------------------------------------------------------------------- */
210
211#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
212static u64 mmc_dmamask = 0xffffffffUL;
213static struct at91_mmc_data mmc0_data, mmc1_data;
214
215static struct resource mmc0_resources[] = {
216 [0] = {
217 .start = AT91SAM9263_BASE_MCI0,
218 .end = AT91SAM9263_BASE_MCI0 + SZ_16K - 1,
219 .flags = IORESOURCE_MEM,
220 },
221 [1] = {
222 .start = AT91SAM9263_ID_MCI0,
223 .end = AT91SAM9263_ID_MCI0,
224 .flags = IORESOURCE_IRQ,
225 },
226};
227
228static struct platform_device at91sam9263_mmc0_device = {
229 .name = "at91_mci",
230 .id = 0,
231 .dev = {
232 .dma_mask = &mmc_dmamask,
233 .coherent_dma_mask = 0xffffffff,
234 .platform_data = &mmc0_data,
235 },
236 .resource = mmc0_resources,
237 .num_resources = ARRAY_SIZE(mmc0_resources),
238};
239
240static struct resource mmc1_resources[] = {
241 [0] = {
242 .start = AT91SAM9263_BASE_MCI1,
243 .end = AT91SAM9263_BASE_MCI1 + SZ_16K - 1,
244 .flags = IORESOURCE_MEM,
245 },
246 [1] = {
247 .start = AT91SAM9263_ID_MCI1,
248 .end = AT91SAM9263_ID_MCI1,
249 .flags = IORESOURCE_IRQ,
250 },
251};
252
253static struct platform_device at91sam9263_mmc1_device = {
254 .name = "at91_mci",
255 .id = 1,
256 .dev = {
257 .dma_mask = &mmc_dmamask,
258 .coherent_dma_mask = 0xffffffff,
259 .platform_data = &mmc1_data,
260 },
261 .resource = mmc1_resources,
262 .num_resources = ARRAY_SIZE(mmc1_resources),
263};
264
265void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
266{
267 if (!data)
268 return;
269
270 /* input/irq */
271 if (data->det_pin) {
272 at91_set_gpio_input(data->det_pin, 1);
273 at91_set_deglitch(data->det_pin, 1);
274 }
275 if (data->wp_pin)
276 at91_set_gpio_input(data->wp_pin, 1);
277 if (data->vcc_pin)
278 at91_set_gpio_output(data->vcc_pin, 0);
279
280 if (mmc_id == 0) { /* MCI0 */
281 /* CLK */
282 at91_set_A_periph(AT91_PIN_PA12, 0);
283
284 if (data->slot_b) {
285 /* CMD */
286 at91_set_A_periph(AT91_PIN_PA16, 1);
287
288 /* DAT0, maybe DAT1..DAT3 */
289 at91_set_A_periph(AT91_PIN_PA17, 1);
290 if (data->wire4) {
291 at91_set_A_periph(AT91_PIN_PA18, 1);
292 at91_set_A_periph(AT91_PIN_PA19, 1);
293 at91_set_A_periph(AT91_PIN_PA20, 1);
294 }
295 } else {
296 /* CMD */
297 at91_set_A_periph(AT91_PIN_PA1, 1);
298
299 /* DAT0, maybe DAT1..DAT3 */
300 at91_set_A_periph(AT91_PIN_PA0, 1);
301 if (data->wire4) {
302 at91_set_A_periph(AT91_PIN_PA3, 1);
303 at91_set_A_periph(AT91_PIN_PA4, 1);
304 at91_set_A_periph(AT91_PIN_PA5, 1);
305 }
306 }
307
308 mmc0_data = *data;
309 at91_clock_associate("mci0_clk", &at91sam9263_mmc1_device.dev, "mci_clk");
310 platform_device_register(&at91sam9263_mmc0_device);
311 } else { /* MCI1 */
312 /* CLK */
313 at91_set_A_periph(AT91_PIN_PA6, 0);
314
315 if (data->slot_b) {
316 /* CMD */
317 at91_set_A_periph(AT91_PIN_PA21, 1);
318
319 /* DAT0, maybe DAT1..DAT3 */
320 at91_set_A_periph(AT91_PIN_PA22, 1);
321 if (data->wire4) {
322 at91_set_A_periph(AT91_PIN_PA23, 1);
323 at91_set_A_periph(AT91_PIN_PA24, 1);
324 at91_set_A_periph(AT91_PIN_PA25, 1);
325 }
326 } else {
327 /* CMD */
328 at91_set_A_periph(AT91_PIN_PA7, 1);
329
330 /* DAT0, maybe DAT1..DAT3 */
331 at91_set_A_periph(AT91_PIN_PA8, 1);
332 if (data->wire4) {
333 at91_set_A_periph(AT91_PIN_PA9, 1);
334 at91_set_A_periph(AT91_PIN_PA10, 1);
335 at91_set_A_periph(AT91_PIN_PA11, 1);
336 }
337 }
338
339 mmc1_data = *data;
340 at91_clock_associate("mci1_clk", &at91sam9263_mmc1_device.dev, "mci_clk");
341 platform_device_register(&at91sam9263_mmc1_device);
342 }
343}
344#else
345void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
346#endif
347
348
349/* --------------------------------------------------------------------
350 * NAND / SmartMedia
351 * -------------------------------------------------------------------- */
352
353#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
354static struct at91_nand_data nand_data;
355
356#define NAND_BASE AT91_CHIPSELECT_3
357
358static struct resource nand_resources[] = {
359 {
360 .start = NAND_BASE,
361 .end = NAND_BASE + SZ_256M - 1,
362 .flags = IORESOURCE_MEM,
363 }
364};
365
366static struct platform_device at91sam9263_nand_device = {
367 .name = "at91_nand",
368 .id = -1,
369 .dev = {
370 .platform_data = &nand_data,
371 },
372 .resource = nand_resources,
373 .num_resources = ARRAY_SIZE(nand_resources),
374};
375
376void __init at91_add_device_nand(struct at91_nand_data *data)
377{
378 unsigned long csa, mode;
379
380 if (!data)
381 return;
382
383 csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
384 at91_sys_write(AT91_MATRIX_EBI0CSA, csa | AT91_MATRIX_EBI0_CS3A_SMC);
385
386 /* set the bus interface characteristics */
387 at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0)
388 | AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
389
390 at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3)
391 | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
392
393 at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
394
395 if (data->bus_width_16)
396 mode = AT91_SMC_DBW_16;
397 else
398 mode = AT91_SMC_DBW_8;
399 at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2));
400
401 /* enable pin */
402 if (data->enable_pin)
403 at91_set_gpio_output(data->enable_pin, 1);
404
405 /* ready/busy pin */
406 if (data->rdy_pin)
407 at91_set_gpio_input(data->rdy_pin, 1);
408
409 /* card detect pin */
410 if (data->det_pin)
411 at91_set_gpio_input(data->det_pin, 1);
412
413 nand_data = *data;
414 platform_device_register(&at91sam9263_nand_device);
415}
416#else
417void __init at91_add_device_nand(struct at91_nand_data *data) {}
418#endif
419
420
421/* --------------------------------------------------------------------
422 * TWI (i2c)
423 * -------------------------------------------------------------------- */
424
425#if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE)
426
427static struct resource twi_resources[] = {
428 [0] = {
429 .start = AT91SAM9263_BASE_TWI,
430 .end = AT91SAM9263_BASE_TWI + SZ_16K - 1,
431 .flags = IORESOURCE_MEM,
432 },
433 [1] = {
434 .start = AT91SAM9263_ID_TWI,
435 .end = AT91SAM9263_ID_TWI,
436 .flags = IORESOURCE_IRQ,
437 },
438};
439
440static struct platform_device at91sam9263_twi_device = {
441 .name = "at91_i2c",
442 .id = -1,
443 .resource = twi_resources,
444 .num_resources = ARRAY_SIZE(twi_resources),
445};
446
447void __init at91_add_device_i2c(void)
448{
449 /* pins used for TWI interface */
450 at91_set_A_periph(AT91_PIN_PB4, 0); /* TWD */
451 at91_set_multi_drive(AT91_PIN_PB4, 1);
452
453 at91_set_A_periph(AT91_PIN_PB5, 0); /* TWCK */
454 at91_set_multi_drive(AT91_PIN_PB5, 1);
455
456 platform_device_register(&at91sam9263_twi_device);
457}
458#else
459void __init at91_add_device_i2c(void) {}
460#endif
461
462
463/* --------------------------------------------------------------------
464 * SPI
465 * -------------------------------------------------------------------- */
466
467#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
468static u64 spi_dmamask = 0xffffffffUL;
469
470static struct resource spi0_resources[] = {
471 [0] = {
472 .start = AT91SAM9263_BASE_SPI0,
473 .end = AT91SAM9263_BASE_SPI0 + SZ_16K - 1,
474 .flags = IORESOURCE_MEM,
475 },
476 [1] = {
477 .start = AT91SAM9263_ID_SPI0,
478 .end = AT91SAM9263_ID_SPI0,
479 .flags = IORESOURCE_IRQ,
480 },
481};
482
483static struct platform_device at91sam9263_spi0_device = {
484 .name = "atmel_spi",
485 .id = 0,
486 .dev = {
487 .dma_mask = &spi_dmamask,
488 .coherent_dma_mask = 0xffffffff,
489 },
490 .resource = spi0_resources,
491 .num_resources = ARRAY_SIZE(spi0_resources),
492};
493
494static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA5, AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PB11 };
495
496static struct resource spi1_resources[] = {
497 [0] = {
498 .start = AT91SAM9263_BASE_SPI1,
499 .end = AT91SAM9263_BASE_SPI1 + SZ_16K - 1,
500 .flags = IORESOURCE_MEM,
501 },
502 [1] = {
503 .start = AT91SAM9263_ID_SPI1,
504 .end = AT91SAM9263_ID_SPI1,
505 .flags = IORESOURCE_IRQ,
506 },
507};
508
509static struct platform_device at91sam9263_spi1_device = {
510 .name = "atmel_spi",
511 .id = 1,
512 .dev = {
513 .dma_mask = &spi_dmamask,
514 .coherent_dma_mask = 0xffffffff,
515 },
516 .resource = spi1_resources,
517 .num_resources = ARRAY_SIZE(spi1_resources),
518};
519
520static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB15, AT91_PIN_PB16, AT91_PIN_PB17, AT91_PIN_PB18 };
521
522void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
523{
524 int i;
525 unsigned long cs_pin;
526 short enable_spi0 = 0;
527 short enable_spi1 = 0;
528
529 /* Choose SPI chip-selects */
530 for (i = 0; i < nr_devices; i++) {
531 if (devices[i].controller_data)
532 cs_pin = (unsigned long) devices[i].controller_data;
533 else if (devices[i].bus_num == 0)
534 cs_pin = spi0_standard_cs[devices[i].chip_select];
535 else
536 cs_pin = spi1_standard_cs[devices[i].chip_select];
537
538 if (devices[i].bus_num == 0)
539 enable_spi0 = 1;
540 else
541 enable_spi1 = 1;
542
543 /* enable chip-select pin */
544 at91_set_gpio_output(cs_pin, 1);
545
546 /* pass chip-select pin to driver */
547 devices[i].controller_data = (void *) cs_pin;
548 }
549
550 spi_register_board_info(devices, nr_devices);
551
552 /* Configure SPI bus(es) */
553 if (enable_spi0) {
554 at91_set_B_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */
555 at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
556 at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */
557
558 at91_clock_associate("spi0_clk", &at91sam9263_spi0_device.dev, "spi_clk");
559 platform_device_register(&at91sam9263_spi0_device);
560 }
561 if (enable_spi1) {
562 at91_set_A_periph(AT91_PIN_PB12, 0); /* SPI1_MISO */
563 at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */
564 at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */
565
566 at91_clock_associate("spi1_clk", &at91sam9263_spi1_device.dev, "spi_clk");
567 platform_device_register(&at91sam9263_spi1_device);
568 }
569}
570#else
571void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
572#endif
573
574
575/* --------------------------------------------------------------------
576 * LEDs
577 * -------------------------------------------------------------------- */
578
579#if defined(CONFIG_LEDS)
580u8 at91_leds_cpu;
581u8 at91_leds_timer;
582
583void __init at91_init_leds(u8 cpu_led, u8 timer_led)
584{
585 /* Enable GPIO to access the LEDs */
586 at91_set_gpio_output(cpu_led, 1);
587 at91_set_gpio_output(timer_led, 1);
588
589 at91_leds_cpu = cpu_led;
590 at91_leds_timer = timer_led;
591}
592#else
593void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
594#endif
595
596
597/* --------------------------------------------------------------------
598 * UART
599 * -------------------------------------------------------------------- */
600
601#if defined(CONFIG_SERIAL_ATMEL)
602
603static struct resource dbgu_resources[] = {
604 [0] = {
605 .start = AT91_VA_BASE_SYS + AT91_DBGU,
606 .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
607 .flags = IORESOURCE_MEM,
608 },
609 [1] = {
610 .start = AT91_ID_SYS,
611 .end = AT91_ID_SYS,
612 .flags = IORESOURCE_IRQ,
613 },
614};
615
616static struct atmel_uart_data dbgu_data = {
617 .use_dma_tx = 0,
618 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
619 .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
620};
621
622static struct platform_device at91sam9263_dbgu_device = {
623 .name = "atmel_usart",
624 .id = 0,
625 .dev = {
626 .platform_data = &dbgu_data,
627 .coherent_dma_mask = 0xffffffff,
628 },
629 .resource = dbgu_resources,
630 .num_resources = ARRAY_SIZE(dbgu_resources),
631};
632
633static inline void configure_dbgu_pins(void)
634{
635 at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */
636 at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */
637}
638
639static struct resource uart0_resources[] = {
640 [0] = {
641 .start = AT91SAM9263_BASE_US0,
642 .end = AT91SAM9263_BASE_US0 + SZ_16K - 1,
643 .flags = IORESOURCE_MEM,
644 },
645 [1] = {
646 .start = AT91SAM9263_ID_US0,
647 .end = AT91SAM9263_ID_US0,
648 .flags = IORESOURCE_IRQ,
649 },
650};
651
652static struct atmel_uart_data uart0_data = {
653 .use_dma_tx = 1,
654 .use_dma_rx = 1,
655};
656
657static struct platform_device at91sam9263_uart0_device = {
658 .name = "atmel_usart",
659 .id = 1,
660 .dev = {
661 .platform_data = &uart0_data,
662 .coherent_dma_mask = 0xffffffff,
663 },
664 .resource = uart0_resources,
665 .num_resources = ARRAY_SIZE(uart0_resources),
666};
667
668static inline void configure_usart0_pins(void)
669{
670 at91_set_A_periph(AT91_PIN_PA26, 1); /* TXD0 */
671 at91_set_A_periph(AT91_PIN_PA27, 0); /* RXD0 */
672 at91_set_A_periph(AT91_PIN_PA28, 0); /* RTS0 */
673 at91_set_A_periph(AT91_PIN_PA29, 0); /* CTS0 */
674}
675
676static struct resource uart1_resources[] = {
677 [0] = {
678 .start = AT91SAM9263_BASE_US1,
679 .end = AT91SAM9263_BASE_US1 + SZ_16K - 1,
680 .flags = IORESOURCE_MEM,
681 },
682 [1] = {
683 .start = AT91SAM9263_ID_US1,
684 .end = AT91SAM9263_ID_US1,
685 .flags = IORESOURCE_IRQ,
686 },
687};
688
689static struct atmel_uart_data uart1_data = {
690 .use_dma_tx = 1,
691 .use_dma_rx = 1,
692};
693
694static struct platform_device at91sam9263_uart1_device = {
695 .name = "atmel_usart",
696 .id = 2,
697 .dev = {
698 .platform_data = &uart1_data,
699 .coherent_dma_mask = 0xffffffff,
700 },
701 .resource = uart1_resources,
702 .num_resources = ARRAY_SIZE(uart1_resources),
703};
704
705static inline void configure_usart1_pins(void)
706{
707 at91_set_A_periph(AT91_PIN_PD0, 1); /* TXD1 */
708 at91_set_A_periph(AT91_PIN_PD1, 0); /* RXD1 */
709 at91_set_B_periph(AT91_PIN_PD7, 0); /* RTS1 */
710 at91_set_B_periph(AT91_PIN_PD8, 0); /* CTS1 */
711}
712
713static struct resource uart2_resources[] = {
714 [0] = {
715 .start = AT91SAM9263_BASE_US2,
716 .end = AT91SAM9263_BASE_US2 + SZ_16K - 1,
717 .flags = IORESOURCE_MEM,
718 },
719 [1] = {
720 .start = AT91SAM9263_ID_US2,
721 .end = AT91SAM9263_ID_US2,
722 .flags = IORESOURCE_IRQ,
723 },
724};
725
726static struct atmel_uart_data uart2_data = {
727 .use_dma_tx = 1,
728 .use_dma_rx = 1,
729};
730
731static struct platform_device at91sam9263_uart2_device = {
732 .name = "atmel_usart",
733 .id = 3,
734 .dev = {
735 .platform_data = &uart2_data,
736 .coherent_dma_mask = 0xffffffff,
737 },
738 .resource = uart2_resources,
739 .num_resources = ARRAY_SIZE(uart2_resources),
740};
741
742static inline void configure_usart2_pins(void)
743{
744 at91_set_A_periph(AT91_PIN_PD2, 1); /* TXD2 */
745 at91_set_A_periph(AT91_PIN_PD3, 0); /* RXD2 */
746 at91_set_B_periph(AT91_PIN_PD5, 0); /* RTS2 */
747 at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */
748}
749
750struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
751struct platform_device *atmel_default_console_device; /* the serial console device */
752
753void __init at91_init_serial(struct at91_uart_config *config)
754{
755 int i;
756
757 /* Fill in list of supported UARTs */
758 for (i = 0; i < config->nr_tty; i++) {
759 switch (config->tty_map[i]) {
760 case 0:
761 configure_usart0_pins();
762 at91_uarts[i] = &at91sam9263_uart0_device;
763 at91_clock_associate("usart0_clk", &at91sam9263_uart0_device.dev, "usart");
764 break;
765 case 1:
766 configure_usart1_pins();
767 at91_uarts[i] = &at91sam9263_uart1_device;
768 at91_clock_associate("usart1_clk", &at91sam9263_uart1_device.dev, "usart");
769 break;
770 case 2:
771 configure_usart2_pins();
772 at91_uarts[i] = &at91sam9263_uart2_device;
773 at91_clock_associate("usart2_clk", &at91sam9263_uart2_device.dev, "usart");
774 break;
775 case 3:
776 configure_dbgu_pins();
777 at91_uarts[i] = &at91sam9263_dbgu_device;
778 at91_clock_associate("mck", &at91sam9263_dbgu_device.dev, "usart");
779 break;
780 default:
781 continue;
782 }
783 at91_uarts[i]->id = i; /* update ID number to mapped ID */
784 }
785
786 /* Set serial console device */
787 if (config->console_tty < ATMEL_MAX_UART)
788 atmel_default_console_device = at91_uarts[config->console_tty];
789 if (!atmel_default_console_device)
790 printk(KERN_INFO "AT91: No default serial console defined.\n");
791}
792
793void __init at91_add_device_serial(void)
794{
795 int i;
796
797 for (i = 0; i < ATMEL_MAX_UART; i++) {
798 if (at91_uarts[i])
799 platform_device_register(at91_uarts[i]);
800 }
801}
802#else
803void __init at91_init_serial(struct at91_uart_config *config) {}
804void __init at91_add_device_serial(void) {}
805#endif
806
807
808/* -------------------------------------------------------------------- */
809/*
810 * These devices are always present and don't need any board-specific
811 * setup.
812 */
813static int __init at91_add_standard_devices(void)
814{
815 return 0;
816}
817
818arch_initcall(at91_add_standard_devices);
diff --git a/arch/arm/mach-at91rm9200/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 99df5f6ee42e..a4dded27fa16 100644
--- a/arch/arm/mach-at91rm9200/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/at91sam926x_time.c 2 * linux/arch/arm/mach-at91/at91sam926x_time.c
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
@@ -30,7 +30,6 @@
30 * Returns number of microseconds since last timer interrupt. Note that interrupts 30 * Returns number of microseconds since last timer interrupt. Note that interrupts
31 * will have been disabled by do_gettimeofday() 31 * will have been disabled by do_gettimeofday()
32 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. 32 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
33 * 'tick' is usecs per jiffy (linux/timex.h).
34 */ 33 */
35static unsigned long at91sam926x_gettimeoffset(void) 34static unsigned long at91sam926x_gettimeoffset(void)
36{ 35{
@@ -39,7 +38,7 @@ static unsigned long at91sam926x_gettimeoffset(void)
39 38
40 elapsed = (PIT_PICNT(t) * LATCH) + PIT_CPIV(t); /* hardware clock cycles */ 39 elapsed = (PIT_PICNT(t) * LATCH) + PIT_CPIV(t); /* hardware clock cycles */
41 40
42 return (unsigned long)(elapsed * 1000000) / LATCH; 41 return (unsigned long)(elapsed * jiffies_to_usecs(1)) / LATCH;
43} 42}
44 43
45/* 44/*
diff --git a/arch/arm/mach-at91rm9200/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 971c3e2d8e36..2d3d4b6f7b02 100644
--- a/arch/arm/mach-at91rm9200/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-1arm.c 2 * linux/arch/arm/mach-at91/board-1arm.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 654f0379550a..b4518619063a 100644
--- a/arch/arm/mach-at91rm9200/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-carmeva.c 2 * linux/arch/arm/mach-at91/board-carmeva.c
3 * 3 *
4 * Copyright (c) 2005 Peer Georgi 4 * Copyright (c) 2005 Peer Georgi
5 * Conitec Datasystems 5 * Conitec Datasystems
@@ -134,7 +134,7 @@ static void __init carmeva_board_init(void)
134 /* Compact Flash */ 134 /* Compact Flash */
135// at91_add_device_cf(&carmeva_cf_data); 135// at91_add_device_cf(&carmeva_cf_data);
136 /* MMC */ 136 /* MMC */
137 at91_add_device_mmc(&carmeva_mmc_data); 137 at91_add_device_mmc(0, &carmeva_mmc_data);
138} 138}
139 139
140MACHINE_START(CARMEVA, "Carmeva") 140MACHINE_START(CARMEVA, "Carmeva")
diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index b8bb8052607a..e18a41e61f0c 100644
--- a/arch/arm/mach-at91rm9200/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-csb337.c 2 * linux/arch/arm/mach-at91/board-csb337.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -24,6 +24,7 @@
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/mtd/physmap.h>
27 28
28#include <asm/hardware.h> 29#include <asm/hardware.h>
29#include <asm/setup.h> 30#include <asm/setup.h>
@@ -112,6 +113,42 @@ static struct spi_board_info csb337_spi_devices[] = {
112 }, 113 },
113}; 114};
114 115
116#define CSB_FLASH_BASE AT91_CHIPSELECT_0
117#define CSB_FLASH_SIZE 0x800000
118
119static struct mtd_partition csb_flash_partitions[] = {
120 {
121 .name = "uMON flash",
122 .offset = 0,
123 .size = MTDPART_SIZ_FULL,
124 .mask_flags = MTD_WRITEABLE, /* read only */
125 }
126};
127
128static struct physmap_flash_data csb_flash_data = {
129 .width = 2,
130 .parts = csb_flash_partitions,
131 .nr_parts = ARRAY_SIZE(csb_flash_partitions),
132};
133
134static struct resource csb_flash_resources[] = {
135 {
136 .start = CSB_FLASH_BASE,
137 .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1,
138 .flags = IORESOURCE_MEM,
139 }
140};
141
142static struct platform_device csb_flash = {
143 .name = "physmap-flash",
144 .id = 0,
145 .dev = {
146 .platform_data = &csb_flash_data,
147 },
148 .resource = csb_flash_resources,
149 .num_resources = ARRAY_SIZE(csb_flash_resources),
150};
151
115static void __init csb337_board_init(void) 152static void __init csb337_board_init(void)
116{ 153{
117 /* Serial */ 154 /* Serial */
@@ -130,7 +167,9 @@ static void __init csb337_board_init(void)
130 /* SPI */ 167 /* SPI */
131 at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices)); 168 at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
132 /* MMC */ 169 /* MMC */
133 at91_add_device_mmc(&csb337_mmc_data); 170 at91_add_device_mmc(0, &csb337_mmc_data);
171 /* NOR flash */
172 platform_device_register(&csb_flash);
134} 173}
135 174
136MACHINE_START(CSB337, "Cogent CSB337") 175MACHINE_START(CSB337, "Cogent CSB337")
diff --git a/arch/arm/mach-at91rm9200/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index a29fa0e822ce..77f04b935b3a 100644
--- a/arch/arm/mach-at91rm9200/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-csb637.c 2 * linux/arch/arm/mach-at91/board-csb637.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -23,6 +23,7 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h>
26 27
27#include <asm/hardware.h> 28#include <asm/hardware.h>
28#include <asm/setup.h> 29#include <asm/setup.h>
@@ -81,6 +82,42 @@ static struct at91_udc_data __initdata csb637_udc_data = {
81 .pullup_pin = AT91_PIN_PB1, 82 .pullup_pin = AT91_PIN_PB1,
82}; 83};
83 84
85#define CSB_FLASH_BASE AT91_CHIPSELECT_0
86#define CSB_FLASH_SIZE 0x1000000
87
88static struct mtd_partition csb_flash_partitions[] = {
89 {
90 .name = "uMON flash",
91 .offset = 0,
92 .size = MTDPART_SIZ_FULL,
93 .mask_flags = MTD_WRITEABLE, /* read only */
94 }
95};
96
97static struct physmap_flash_data csb_flash_data = {
98 .width = 2,
99 .parts = csb_flash_partitions,
100 .nr_parts = ARRAY_SIZE(csb_flash_partitions),
101};
102
103static struct resource csb_flash_resources[] = {
104 {
105 .start = CSB_FLASH_BASE,
106 .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1,
107 .flags = IORESOURCE_MEM,
108 }
109};
110
111static struct platform_device csb_flash = {
112 .name = "physmap-flash",
113 .id = 0,
114 .dev = {
115 .platform_data = &csb_flash_data,
116 },
117 .resource = csb_flash_resources,
118 .num_resources = ARRAY_SIZE(csb_flash_resources),
119};
120
84static void __init csb637_board_init(void) 121static void __init csb637_board_init(void)
85{ 122{
86 /* Serial */ 123 /* Serial */
@@ -95,6 +132,8 @@ static void __init csb637_board_init(void)
95 at91_add_device_i2c(); 132 at91_add_device_i2c();
96 /* SPI */ 133 /* SPI */
97 at91_add_device_spi(NULL, 0); 134 at91_add_device_spi(NULL, 0);
135 /* NOR flash */
136 platform_device_register(&csb_flash);
98} 137}
99 138
100MACHINE_START(CSB637, "Cogent CSB637") 139MACHINE_START(CSB637, "Cogent CSB637")
diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91/board-dk.c
index 7522bf91bce8..6043c38c0a9e 100644
--- a/arch/arm/mach-at91rm9200/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-dk.c 2 * linux/arch/arm/mach-at91/board-dk.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -194,7 +194,7 @@ static void __init dk_board_init(void)
194#else 194#else
195 /* MMC */ 195 /* MMC */
196 at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ 196 at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
197 at91_add_device_mmc(&dk_mmc_data); 197 at91_add_device_mmc(0, &dk_mmc_data);
198#endif 198#endif
199 /* NAND */ 199 /* NAND */
200 at91_add_device_nand(&dk_nand_data); 200 at91_add_device_nand(&dk_nand_data);
diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index 80b72cf7264c..20458b5548f0 100644
--- a/arch/arm/mach-at91rm9200/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-eb9200.c 2 * linux/arch/arm/mach-at91/board-eb9200.c
3 * 3 *
4 * Copyright (C) 2005 SAN People, adapted for ATEB9200 from Embest 4 * Copyright (C) 2005 SAN People, adapted for ATEB9200 from Embest
5 * by Andrew Patrikalakis 5 * by Andrew Patrikalakis
@@ -109,7 +109,7 @@ static void __init eb9200_board_init(void)
109 at91_add_device_spi(NULL, 0); 109 at91_add_device_spi(NULL, 0);
110 /* MMC */ 110 /* MMC */
111 /* only supports 1 or 4 bit interface, not wired through to SPI */ 111 /* only supports 1 or 4 bit interface, not wired through to SPI */
112 at91_add_device_mmc(&eb9200_mmc_data); 112 at91_add_device_mmc(0, &eb9200_mmc_data);
113} 113}
114 114
115MACHINE_START(ATEB9200, "Embest ATEB9200") 115MACHINE_START(ATEB9200, "Embest ATEB9200")
diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91/board-ek.c
index c4fdb415f20e..322fdd75a1e4 100644
--- a/arch/arm/mach-at91rm9200/board-ek.c
+++ b/arch/arm/mach-at91/board-ek.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-ek.c 2 * linux/arch/arm/mach-at91/board-ek.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -154,7 +154,7 @@ static void __init ek_board_init(void)
154#else 154#else
155 /* MMC */ 155 /* MMC */
156 at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ 156 at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
157 at91_add_device_mmc(&ek_mmc_data); 157 at91_add_device_mmc(0, &ek_mmc_data);
158#endif 158#endif
159 /* NOR Flash */ 159 /* NOR Flash */
160 platform_device_register(&ek_flash); 160 platform_device_register(&ek_flash);
diff --git a/arch/arm/mach-at91rm9200/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index 6ef3c4879829..c77d84ce9cae 100644
--- a/arch/arm/mach-at91rm9200/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-kafa.c 2 * linux/arch/arm/mach-at91/board-kafa.c
3 * 3 *
4 * Copyright (C) 2006 Sperry-Sun 4 * Copyright (C) 2006 Sperry-Sun
5 * 5 *
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 759d8191854f..76f6e1e553ea 100644
--- a/arch/arm/mach-at91rm9200/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-kb9202.c 2 * linux/arch/arm/mach-at91/board-kb9202.c
3 * 3 *
4 * Copyright (c) 2005 kb_admin 4 * Copyright (c) 2005 kb_admin
5 * KwikByte, Inc. 5 * KwikByte, Inc.
@@ -122,7 +122,7 @@ static void __init kb9202_board_init(void)
122 /* USB Device */ 122 /* USB Device */
123 at91_add_device_udc(&kb9202_udc_data); 123 at91_add_device_udc(&kb9202_udc_data);
124 /* MMC */ 124 /* MMC */
125 at91_add_device_mmc(&kb9202_mmc_data); 125 at91_add_device_mmc(0, &kb9202_mmc_data);
126 /* I2C */ 126 /* I2C */
127 at91_add_device_i2c(); 127 at91_add_device_i2c();
128 /* SPI */ 128 /* SPI */
diff --git a/arch/arm/mach-at91rm9200/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index da5d58ac870b..57fb4499d969 100644
--- a/arch/arm/mach-at91rm9200/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-ek.c 2 * linux/arch/arm/mach-at91/board-sam9260ek.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2006 Atmel 5 * Copyright (C) 2006 Atmel
@@ -118,7 +118,7 @@ static struct spi_board_info ek_spi_devices[] = {
118/* 118/*
119 * MACB Ethernet device 119 * MACB Ethernet device
120 */ 120 */
121static struct __initdata eth_platform_data ek_macb_data = { 121static struct __initdata at91_eth_data ek_macb_data = {
122 .phy_irq_pin = AT91_PIN_PA7, 122 .phy_irq_pin = AT91_PIN_PA7,
123 .is_rmii = 1, 123 .is_rmii = 1,
124}; 124};
@@ -187,7 +187,7 @@ static void __init ek_board_init(void)
187 /* Ethernet */ 187 /* Ethernet */
188 at91_add_device_eth(&ek_macb_data); 188 at91_add_device_eth(&ek_macb_data);
189 /* MMC */ 189 /* MMC */
190 at91_add_device_mmc(&ek_mmc_data); 190 at91_add_device_mmc(0, &ek_mmc_data);
191} 191}
192 192
193MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") 193MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
diff --git a/arch/arm/mach-at91rm9200/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 30b490d8886b..b7e772467cf6 100644
--- a/arch/arm/mach-at91rm9200/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/board-ek.c 2 * linux/arch/arm/mach-at91/board-sam9261ek.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2006 Atmel 5 * Copyright (C) 2006 Atmel
@@ -243,7 +243,7 @@ static void __init ek_board_init(void)
243 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); 243 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
244#else 244#else
245 /* MMC */ 245 /* MMC */
246 at91_add_device_mmc(&ek_mmc_data); 246 at91_add_device_mmc(0, &ek_mmc_data);
247#endif 247#endif
248} 248}
249 249
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
new file mode 100644
index 000000000000..8fdce11a880c
--- /dev/null
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -0,0 +1,176 @@
1/*
2 * linux/arch/arm/mach-at91/board-sam9263ek.c
3 *
4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2007 Atmel Corporation.
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
29#include <asm/hardware.h>
30#include <asm/setup.h>
31#include <asm/mach-types.h>
32#include <asm/irq.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37
38#include <asm/arch/board.h>
39#include <asm/arch/gpio.h>
40#include <asm/arch/at91sam926x_mc.h>
41
42#include "generic.h"
43
44
45/*
46 * Serial port configuration.
47 * 0 .. 2 = USART0 .. USART2
48 * 3 = DBGU
49 */
50static struct at91_uart_config __initdata ek_uart_config = {
51 .console_tty = 0, /* ttyS0 */
52 .nr_tty = 2,
53 .tty_map = { 3, 0, -1, -1, } /* ttyS0, ..., ttyS3 */
54};
55
56static void __init ek_map_io(void)
57{
58 /* Initialize processor: 16.367 MHz crystal */
59 at91sam9263_initialize(16367660);
60
61 /* Setup the serial ports and console */
62 at91_init_serial(&ek_uart_config);
63}
64
65static void __init ek_init_irq(void)
66{
67 at91sam9263_init_interrupts(NULL);
68}
69
70
71/*
72 * USB Host port
73 */
74static struct at91_usbh_data __initdata ek_usbh_data = {
75 .ports = 2,
76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 },
77};
78
79/*
80 * USB Device port
81 */
82static struct at91_udc_data __initdata ek_udc_data = {
83 .vbus_pin = AT91_PIN_PA25,
84 .pullup_pin = 0, /* pull-up driven by UDC */
85};
86
87
88/*
89 * SPI devices.
90 */
91static struct spi_board_info ek_spi_devices[] = {
92#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
93 { /* DataFlash card */
94 .modalias = "mtd_dataflash",
95 .chip_select = 0,
96 .max_speed_hz = 15 * 1000 * 1000,
97 .bus_num = 0,
98 },
99#endif
100};
101
102
103/*
104 * MCI (SD/MMC)
105 */
106static struct at91_mmc_data __initdata ek_mmc_data = {
107 .wire4 = 1,
108 .det_pin = AT91_PIN_PE18,
109 .wp_pin = AT91_PIN_PE19,
110// .vcc_pin = ... not connected
111};
112
113
114/*
115 * NAND flash
116 */
117static struct mtd_partition __initdata ek_nand_partition[] = {
118 {
119 .name = "Partition 1",
120 .offset = 0,
121 .size = 64 * 1024 * 1024,
122 },
123 {
124 .name = "Partition 2",
125 .offset = 64 * 1024 * 1024,
126 .size = MTDPART_SIZ_FULL,
127 },
128};
129
130static struct mtd_partition *nand_partitions(int size, int *num_partitions)
131{
132 *num_partitions = ARRAY_SIZE(ek_nand_partition);
133 return ek_nand_partition;
134}
135
136static struct at91_nand_data __initdata ek_nand_data = {
137 .ale = 21,
138 .cle = 22,
139// .det_pin = ... not connected
140 .rdy_pin = AT91_PIN_PA22,
141 .enable_pin = AT91_PIN_PD15,
142 .partition_info = nand_partitions,
143#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
144 .bus_width_16 = 1,
145#else
146 .bus_width_16 = 0,
147#endif
148};
149
150
151static void __init ek_board_init(void)
152{
153 /* Serial */
154 at91_add_device_serial();
155 /* USB Host */
156 at91_add_device_usbh(&ek_usbh_data);
157 /* USB Device */
158 at91_add_device_udc(&ek_udc_data);
159 /* SPI */
160 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
161 /* MMC */
162 at91_add_device_mmc(1, &ek_mmc_data);
163 /* NAND */
164 at91_add_device_nand(&ek_nand_data);
165}
166
167MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
168 /* Maintainer: Atmel */
169 .phys_io = AT91_BASE_SYS,
170 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
171 .boot_params = AT91_SDRAM_BASE + 0x100,
172 .timer = &at91sam926x_timer,
173 .map_io = ek_map_io,
174 .init_irq = ek_init_irq,
175 .init_machine = ek_board_init,
176MACHINE_END
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91/clock.c
index 4dee21fefe5a..06c9a0507d0d 100644
--- a/arch/arm/mach-at91rm9200/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/clock.c 2 * linux/arch/arm/mach-at91/clock.c
3 * 3 *
4 * Copyright (C) 2005 David Brownell 4 * Copyright (C) 2005 David Brownell
5 * Copyright (C) 2005 Ivan Kokshaysky 5 * Copyright (C) 2005 Ivan Kokshaysky
@@ -407,7 +407,7 @@ static int at91_clk_open(struct inode *inode, struct file *file)
407 return single_open(file, at91_clk_show, NULL); 407 return single_open(file, at91_clk_show, NULL);
408} 408}
409 409
410static struct file_operations at91_clk_operations = { 410static const struct file_operations at91_clk_operations = {
411 .open = at91_clk_open, 411 .open = at91_clk_open,
412 .read = seq_read, 412 .read = seq_read,
413 .llseek = seq_lseek, 413 .llseek = seq_lseek,
@@ -525,27 +525,6 @@ fail:
525 return 0; 525 return 0;
526} 526}
527 527
528/*
529 * Several unused clocks may be active. Turn them off.
530 */
531static void __init at91_periphclk_reset(void)
532{
533 unsigned long reg;
534 struct clk *clk;
535
536 reg = at91_sys_read(AT91_PMC_PCSR);
537
538 list_for_each_entry(clk, &clocks, node) {
539 if (clk->mode != pmc_periph_mode)
540 continue;
541
542 if (clk->users > 0)
543 reg &= ~clk->pmc_mask;
544 }
545
546 at91_sys_write(AT91_PMC_PCDR, reg);
547}
548
549static struct clk *const standard_pmc_clocks[] __initdata = { 528static struct clk *const standard_pmc_clocks[] __initdata = {
550 /* four primary clocks */ 529 /* four primary clocks */
551 &clk32k, 530 &clk32k,
@@ -586,7 +565,7 @@ int __init at91_clock_init(unsigned long main_clock)
586 pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000); 565 pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
587 566
588 /* 567 /*
589 * USB clock init: choose 48 MHz PLLB value, turn all clocks off, 568 * USB clock init: choose 48 MHz PLLB value,
590 * disable 48MHz clock during usb peripheral suspend. 569 * disable 48MHz clock during usb peripheral suspend.
591 * 570 *
592 * REVISIT: assumes MCK doesn't derive from PLLB! 571 * REVISIT: assumes MCK doesn't derive from PLLB!
@@ -596,16 +575,10 @@ int __init at91_clock_init(unsigned long main_clock)
596 if (cpu_is_at91rm9200()) { 575 if (cpu_is_at91rm9200()) {
597 uhpck.pmc_mask = AT91RM9200_PMC_UHP; 576 uhpck.pmc_mask = AT91RM9200_PMC_UHP;
598 udpck.pmc_mask = AT91RM9200_PMC_UDP; 577 udpck.pmc_mask = AT91RM9200_PMC_UDP;
599 at91_sys_write(AT91_PMC_SCDR, AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP);
600 at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); 578 at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP);
601 } else if (cpu_is_at91sam9260()) { 579 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()) {
602 uhpck.pmc_mask = AT91SAM926x_PMC_UHP; 580 uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
603 udpck.pmc_mask = AT91SAM926x_PMC_UDP; 581 udpck.pmc_mask = AT91SAM926x_PMC_UDP;
604 at91_sys_write(AT91_PMC_SCDR, AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP);
605 } else if (cpu_is_at91sam9261()) {
606 uhpck.pmc_mask = (AT91SAM926x_PMC_UHP | AT91_PMC_HCK0);
607 udpck.pmc_mask = AT91SAM926x_PMC_UDP;
608 at91_sys_write(AT91_PMC_SCDR, AT91SAM926x_PMC_UHP | AT91_PMC_HCK0 | AT91SAM926x_PMC_UDP);
609 } 582 }
610 at91_sys_write(AT91_CKGR_PLLBR, 0); 583 at91_sys_write(AT91_CKGR_PLLBR, 0);
611 584
@@ -634,11 +607,34 @@ int __init at91_clock_init(unsigned long main_clock)
634 (unsigned) main_clock / 1000000, 607 (unsigned) main_clock / 1000000,
635 ((unsigned) main_clock % 1000000) / 1000); 608 ((unsigned) main_clock % 1000000) / 1000);
636 609
637 /* disable all programmable clocks */ 610 return 0;
638 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3); 611}
612
613/*
614 * Several unused clocks may be active. Turn them off.
615 */
616static int __init at91_clock_reset(void)
617{
618 unsigned long pcdr = 0;
619 unsigned long scdr = 0;
620 struct clk *clk;
621
622 list_for_each_entry(clk, &clocks, node) {
623 if (clk->users > 0)
624 continue;
625
626 if (clk->mode == pmc_periph_mode)
627 pcdr |= clk->pmc_mask;
628
629 if (clk->mode == pmc_sys_mode)
630 scdr |= clk->pmc_mask;
631
632 pr_debug("Clocks: disable unused %s\n", clk->name);
633 }
639 634
640 /* disable all other unused peripheral clocks */ 635 at91_sys_write(AT91_PMC_PCDR, pcdr);
641 at91_periphclk_reset(); 636 at91_sys_write(AT91_PMC_SCDR, scdr);
642 637
643 return 0; 638 return 0;
644} 639}
640late_initcall(at91_clock_reset);
diff --git a/arch/arm/mach-at91rm9200/clock.h b/arch/arm/mach-at91/clock.h
index b5c7a2eb2d1d..1ba3b95ff359 100644
--- a/arch/arm/mach-at91rm9200/clock.h
+++ b/arch/arm/mach-at91/clock.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/clock.h 2 * linux/arch/arm/mach-at91/clock.h
3 * 3 *
4 * 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
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91/generic.h
index 8c4d5a77d485..bda26221c522 100644
--- a/arch/arm/mach-at91rm9200/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/generic.h 2 * linux/arch/arm/mach-at91/generic.h
3 * 3 *
4 * Copyright (C) 2005 David Brownell 4 * Copyright (C) 2005 David Brownell
5 * 5 *
@@ -12,11 +12,13 @@
12extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks); 12extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks);
13extern void __init at91sam9260_initialize(unsigned long main_clock); 13extern void __init at91sam9260_initialize(unsigned long main_clock);
14extern void __init at91sam9261_initialize(unsigned long main_clock); 14extern void __init at91sam9261_initialize(unsigned long main_clock);
15extern void __init at91sam9263_initialize(unsigned long main_clock);
15 16
16 /* Interrupts */ 17 /* Interrupts */
17extern void __init at91rm9200_init_interrupts(unsigned int priority[]); 18extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
18extern void __init at91sam9260_init_interrupts(unsigned int priority[]); 19extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
19extern void __init at91sam9261_init_interrupts(unsigned int priority[]); 20extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
21extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
20extern void __init at91_aic_init(unsigned int priority[]); 22extern void __init at91_aic_init(unsigned int priority[]);
21 23
22 /* Timer */ 24 /* Timer */
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91/gpio.c
index af22659c8a28..7b87f3f101b7 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/gpio.c 2 * linux/arch/arm/mach-at91/gpio.c
3 * 3 *
4 * Copyright (C) 2005 HP Labs 4 * Copyright (C) 2005 HP Labs
5 * 5 *
@@ -65,6 +65,24 @@ static inline unsigned pin_to_mask(unsigned pin)
65 65
66 66
67/* 67/*
68 * mux the pin to the "GPIO" peripheral role.
69 */
70int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup)
71{
72 void __iomem *pio = pin_to_controller(pin);
73 unsigned mask = pin_to_mask(pin);
74
75 if (!pio)
76 return -EINVAL;
77 __raw_writel(mask, pio + PIO_IDR);
78 __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
79 __raw_writel(mask, pio + PIO_PER);
80 return 0;
81}
82EXPORT_SYMBOL(at91_set_GPIO_periph);
83
84
85/*
68 * mux the pin to the "A" internal peripheral role. 86 * mux the pin to the "A" internal peripheral role.
69 */ 87 */
70int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup) 88int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup)
@@ -181,6 +199,36 @@ EXPORT_SYMBOL(at91_set_multi_drive);
181 199
182/*--------------------------------------------------------------------------*/ 200/*--------------------------------------------------------------------------*/
183 201
202/* new-style GPIO calls; these expect at91_set_GPIO_periph to have been
203 * called, and maybe at91_set_multi_drive() for putout pins.
204 */
205
206int gpio_direction_input(unsigned pin)
207{
208 void __iomem *pio = pin_to_controller(pin);
209 unsigned mask = pin_to_mask(pin);
210
211 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
212 return -EINVAL;
213 __raw_writel(mask, pio + PIO_OER);
214 return 0;
215}
216EXPORT_SYMBOL(gpio_direction_input);
217
218int gpio_direction_output(unsigned pin)
219{
220 void __iomem *pio = pin_to_controller(pin);
221 unsigned mask = pin_to_mask(pin);
222
223 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
224 return -EINVAL;
225 __raw_writel(mask, pio + PIO_OER);
226 return 0;
227}
228EXPORT_SYMBOL(gpio_direction_output);
229
230/*--------------------------------------------------------------------------*/
231
184/* 232/*
185 * assuming the pin is muxed as a gpio output, set its value. 233 * assuming the pin is muxed as a gpio output, set its value.
186 */ 234 */
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91/irq.c
index 2148daafd29c..78a5cdb746dc 100644
--- a/arch/arm/mach-at91rm9200/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/irq.c 2 * linux/arch/arm/mach-at91/irq.c
3 * 3 *
4 * Copyright (C) 2004 SAN People 4 * Copyright (C) 2004 SAN People
5 * Copyright (C) 2004 ATMEL 5 * Copyright (C) 2004 ATMEL
diff --git a/arch/arm/mach-at91rm9200/leds.c b/arch/arm/mach-at91/leds.c
index 1a333730466e..0d5144973988 100644
--- a/arch/arm/mach-at91rm9200/leds.c
+++ b/arch/arm/mach-at91/leds.c
@@ -86,10 +86,6 @@ static int __init leds_init(void)
86 if (!at91_leds_timer || !at91_leds_cpu) 86 if (!at91_leds_timer || !at91_leds_cpu)
87 return -ENODEV; 87 return -ENODEV;
88 88
89 /* Enable PIO to access the LEDs */
90 at91_set_gpio_output(at91_leds_timer, 1);
91 at91_set_gpio_output(at91_leds_cpu, 1);
92
93 leds_event = at91_leds_event; 89 leds_event = at91_leds_event;
94 90
95 leds_event(led_start); 91 leds_event(led_start);
diff --git a/arch/arm/mach-at91rm9200/pm.c b/arch/arm/mach-at91/pm.c
index 67aa5572a3ea..b49bfda53d7f 100644
--- a/arch/arm/mach-at91rm9200/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/pm.c 2 * arch/arm/mach-at91/pm.c
3 * AT91 Power Management 3 * AT91 Power Management
4 * 4 *
5 * Copyright (C) 2005 David Brownell 5 * Copyright (C) 2005 David Brownell
@@ -80,6 +80,8 @@ static int at91_pm_verify_clocks(void)
80#warning "Check SAM9260 USB clocks" 80#warning "Check SAM9260 USB clocks"
81 } else if (cpu_is_at91sam9261()) { 81 } else if (cpu_is_at91sam9261()) {
82#warning "Check SAM9261 USB clocks" 82#warning "Check SAM9261 USB clocks"
83 } else if (cpu_is_at91sam9263()) {
84#warning "Check SAM9263 USB clocks"
83 } 85 }
84 86
85#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS 87#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index af7904b3d0a8..575a21dabd2f 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -51,6 +51,31 @@ config MACH_GESBC9312
51 Say 'Y' here if you want your kernel to support the Glomation 51 Say 'Y' here if you want your kernel to support the Glomation
52 GESBC-9312-sx board. 52 GESBC-9312-sx board.
53 53
54config MACH_MICRO9
55 bool
56 default n
57
58config MACH_MICRO9H
59 bool "Support Contec Hypercontrol Micro9-H"
60 select MACH_MICRO9
61 help
62 Say 'Y' here if you want your kernel to support the
63 Contec Hypercontrol Micro9-H board.
64
65config MACH_MICRO9M
66 bool "Support Contec Hypercontrol Micro9-M"
67 select MACH_MICRO9
68 help
69 Say 'Y' here if you want your kernel to support the
70 Contec Hypercontrol Micro9-M board.
71
72config MACH_MICRO9L
73 bool "Support Contec Hypercontrol Micro9-L"
74 select MACH_MICRO9
75 help
76 Say 'Y' here if you want your kernel to support the
77 Contec Hypercontrol Micro9-L board.
78
54config MACH_TS72XX 79config MACH_TS72XX
55 bool "Support Technologic Systems TS-72xx SBC" 80 bool "Support Technologic Systems TS-72xx SBC"
56 help 81 help
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index b06641dd450d..0d3bf932654e 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -13,4 +13,5 @@ obj-$(CONFIG_MACH_EDB9312) += edb9312.o
13obj-$(CONFIG_MACH_EDB9315) += edb9315.o 13obj-$(CONFIG_MACH_EDB9315) += edb9315.o
14obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o 14obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o
15obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o 15obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
16obj-$(CONFIG_MACH_MICRO9) += micro9.o
16obj-$(CONFIG_MACH_TS72XX) += ts72xx.o 17obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 08ad782c1649..f174d1a3b11c 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -13,6 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/module.h>
16#include <linux/string.h> 17#include <linux/string.h>
17#include <asm/div64.h> 18#include <asm/div64.h>
18#include <asm/hardware.h> 19#include <asm/hardware.h>
@@ -124,7 +125,7 @@ static unsigned long calc_pll_rate(u32 config_word)
124 return (unsigned long)rate; 125 return (unsigned long)rate;
125} 126}
126 127
127void ep93xx_clock_init(void) 128static int __init ep93xx_clock_init(void)
128{ 129{
129 u32 value; 130 u32 value;
130 131
@@ -153,4 +154,7 @@ void ep93xx_clock_init(void)
153 printk(KERN_INFO "ep93xx: FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", 154 printk(KERN_INFO "ep93xx: FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n",
154 clk_f.rate / 1000000, clk_h.rate / 1000000, 155 clk_f.rate / 1000000, clk_h.rate / 1000000,
155 clk_p.rate / 1000000); 156 clk_p.rate / 1000000);
157
158 return 0;
156} 159}
160arch_initcall(ep93xx_clock_init);
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 6b26346191c0..829aed696d98 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -152,22 +152,30 @@ struct sys_timer ep93xx_timer = {
152/************************************************************************* 152/*************************************************************************
153 * GPIO handling for EP93xx 153 * GPIO handling for EP93xx
154 *************************************************************************/ 154 *************************************************************************/
155static unsigned char gpio_int_enable[2]; 155static unsigned char gpio_int_unmasked[3];
156static unsigned char gpio_int_type1[2]; 156static unsigned char gpio_int_enabled[3];
157static unsigned char gpio_int_type2[2]; 157static unsigned char gpio_int_type1[3];
158static unsigned char gpio_int_type2[3];
158 159
159static void update_gpio_ab_int_params(int port) 160static void update_gpio_int_params(int abf)
160{ 161{
161 if (port == 0) { 162 if (abf == 0) {
162 __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE); 163 __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE);
163 __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2); 164 __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2);
164 __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1); 165 __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1);
165 __raw_writeb(gpio_int_enable[0], EP93XX_GPIO_A_INT_ENABLE); 166 __raw_writeb(gpio_int_unmasked[0] & gpio_int_enabled[0], EP93XX_GPIO_A_INT_ENABLE);
166 } else if (port == 1) { 167 } else if (abf == 1) {
167 __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE); 168 __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE);
168 __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2); 169 __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2);
169 __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1); 170 __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1);
170 __raw_writeb(gpio_int_enable[1], EP93XX_GPIO_B_INT_ENABLE); 171 __raw_writeb(gpio_int_unmasked[1] & gpio_int_enabled[1], EP93XX_GPIO_B_INT_ENABLE);
172 } else if (abf == 2) {
173 __raw_writeb(0, EP93XX_GPIO_F_INT_ENABLE);
174 __raw_writeb(gpio_int_type2[2], EP93XX_GPIO_F_INT_TYPE2);
175 __raw_writeb(gpio_int_type1[2], EP93XX_GPIO_F_INT_TYPE1);
176 __raw_writeb(gpio_int_unmasked[2] & gpio_int_enabled[2], EP93XX_GPIO_F_INT_ENABLE);
177 } else {
178 BUG();
171 } 179 }
172} 180}
173 181
@@ -192,8 +200,13 @@ void gpio_line_config(int line, int direction)
192 local_irq_save(flags); 200 local_irq_save(flags);
193 if (direction == GPIO_OUT) { 201 if (direction == GPIO_OUT) {
194 if (line >= 0 && line < 16) { 202 if (line >= 0 && line < 16) {
195 gpio_int_enable[line >> 3] &= ~(1 << (line & 7)); 203 /* Port A/B. */
196 update_gpio_ab_int_params(line >> 3); 204 gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7));
205 update_gpio_int_params(line >> 3);
206 } else if (line >= 40 && line < 48) {
207 /* Port F. */
208 gpio_int_unmasked[2] &= ~(1 << (line & 7));
209 update_gpio_int_params(2);
197 } 210 }
198 211
199 v = __raw_readb(data_direction_register); 212 v = __raw_readb(data_direction_register);
@@ -244,8 +257,7 @@ EXPORT_SYMBOL(gpio_line_set);
244/************************************************************************* 257/*************************************************************************
245 * EP93xx IRQ handling 258 * EP93xx IRQ handling
246 *************************************************************************/ 259 *************************************************************************/
247static void ep93xx_gpio_ab_irq_handler(unsigned int irq, 260static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
248 struct irq_desc *desc)
249{ 261{
250 unsigned char status; 262 unsigned char status;
251 int i; 263 int i;
@@ -267,37 +279,46 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq,
267 } 279 }
268} 280}
269 281
270static void ep93xx_gpio_ab_irq_mask_ack(unsigned int irq) 282static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
283{
284 int gpio_irq = IRQ_EP93XX_GPIO(16) + (((irq + 1) & 7) ^ 4);
285
286 desc_handle_irq(gpio_irq, irq_desc + gpio_irq);
287}
288
289static void ep93xx_gpio_irq_mask_ack(unsigned int irq)
271{ 290{
272 int line = irq - IRQ_EP93XX_GPIO(0); 291 int line = irq - IRQ_EP93XX_GPIO(0);
273 int port = line >> 3; 292 int port = line >> 3;
274 293
275 gpio_int_enable[port] &= ~(1 << (line & 7)); 294 gpio_int_unmasked[port] &= ~(1 << (line & 7));
276 update_gpio_ab_int_params(port); 295 update_gpio_int_params(port);
277 296
278 if (line >> 3) { 297 if (port == 0) {
279 __raw_writel(1 << (line & 7), EP93XX_GPIO_B_INT_ACK);
280 } else {
281 __raw_writel(1 << (line & 7), EP93XX_GPIO_A_INT_ACK); 298 __raw_writel(1 << (line & 7), EP93XX_GPIO_A_INT_ACK);
299 } else if (port == 1) {
300 __raw_writel(1 << (line & 7), EP93XX_GPIO_B_INT_ACK);
301 } else if (port == 2) {
302 __raw_writel(1 << (line & 7), EP93XX_GPIO_F_INT_ACK);
282 } 303 }
283} 304}
284 305
285static void ep93xx_gpio_ab_irq_mask(unsigned int irq) 306static void ep93xx_gpio_irq_mask(unsigned int irq)
286{ 307{
287 int line = irq - IRQ_EP93XX_GPIO(0); 308 int line = irq - IRQ_EP93XX_GPIO(0);
288 int port = line >> 3; 309 int port = line >> 3;
289 310
290 gpio_int_enable[port] &= ~(1 << (line & 7)); 311 gpio_int_unmasked[port] &= ~(1 << (line & 7));
291 update_gpio_ab_int_params(port); 312 update_gpio_int_params(port);
292} 313}
293 314
294static void ep93xx_gpio_ab_irq_unmask(unsigned int irq) 315static void ep93xx_gpio_irq_unmask(unsigned int irq)
295{ 316{
296 int line = irq - IRQ_EP93XX_GPIO(0); 317 int line = irq - IRQ_EP93XX_GPIO(0);
297 int port = line >> 3; 318 int port = line >> 3;
298 319
299 gpio_int_enable[port] |= 1 << (line & 7); 320 gpio_int_unmasked[port] |= 1 << (line & 7);
300 update_gpio_ab_int_params(port); 321 update_gpio_int_params(port);
301} 322}
302 323
303 324
@@ -306,40 +327,51 @@ static void ep93xx_gpio_ab_irq_unmask(unsigned int irq)
306 * edge (1) triggered, while gpio_int_type2 controls whether it 327 * edge (1) triggered, while gpio_int_type2 controls whether it
307 * triggers on low/falling (0) or high/rising (1). 328 * triggers on low/falling (0) or high/rising (1).
308 */ 329 */
309static int ep93xx_gpio_ab_irq_type(unsigned int irq, unsigned int type) 330static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
310{ 331{
311 int port; 332 int port;
312 int line; 333 int line;
313 334
314 line = irq - IRQ_EP93XX_GPIO(0); 335 line = irq - IRQ_EP93XX_GPIO(0);
315 gpio_line_config(line, GPIO_IN); 336 if (line >= 0 && line < 16) {
337 gpio_line_config(line, GPIO_IN);
338 } else {
339 gpio_line_config(EP93XX_GPIO_LINE_F(line), GPIO_IN);
340 }
316 341
317 port = line >> 3; 342 port = line >> 3;
318 line &= 7; 343 line &= 7;
319 344
320 if (type & IRQT_RISING) { 345 if (type & IRQT_RISING) {
346 gpio_int_enabled[port] |= 1 << line;
321 gpio_int_type1[port] |= 1 << line; 347 gpio_int_type1[port] |= 1 << line;
322 gpio_int_type2[port] |= 1 << line; 348 gpio_int_type2[port] |= 1 << line;
323 } else if (type & IRQT_FALLING) { 349 } else if (type & IRQT_FALLING) {
350 gpio_int_enabled[port] |= 1 << line;
324 gpio_int_type1[port] |= 1 << line; 351 gpio_int_type1[port] |= 1 << line;
325 gpio_int_type2[port] &= ~(1 << line); 352 gpio_int_type2[port] &= ~(1 << line);
326 } else if (type & IRQT_HIGH) { 353 } else if (type & IRQT_HIGH) {
354 gpio_int_enabled[port] |= 1 << line;
327 gpio_int_type1[port] &= ~(1 << line); 355 gpio_int_type1[port] &= ~(1 << line);
328 gpio_int_type2[port] |= 1 << line; 356 gpio_int_type2[port] |= 1 << line;
329 } else if (type & IRQT_LOW) { 357 } else if (type & IRQT_LOW) {
358 gpio_int_enabled[port] |= 1 << line;
330 gpio_int_type1[port] &= ~(1 << line); 359 gpio_int_type1[port] &= ~(1 << line);
331 gpio_int_type2[port] &= ~(1 << line); 360 gpio_int_type2[port] &= ~(1 << line);
361 } else {
362 gpio_int_enabled[port] &= ~(1 << line);
332 } 363 }
333 update_gpio_ab_int_params(port); 364 update_gpio_int_params(port);
334 365
335 return 0; 366 return 0;
336} 367}
337 368
338static struct irq_chip ep93xx_gpio_ab_irq_chip = { 369static struct irq_chip ep93xx_gpio_irq_chip = {
339 .ack = ep93xx_gpio_ab_irq_mask_ack, 370 .name = "GPIO",
340 .mask = ep93xx_gpio_ab_irq_mask, 371 .ack = ep93xx_gpio_irq_mask_ack,
341 .unmask = ep93xx_gpio_ab_irq_unmask, 372 .mask = ep93xx_gpio_irq_mask,
342 .set_type = ep93xx_gpio_ab_irq_type, 373 .unmask = ep93xx_gpio_irq_unmask,
374 .set_type = ep93xx_gpio_irq_type,
343}; 375};
344 376
345 377
@@ -350,12 +382,21 @@ void __init ep93xx_init_irq(void)
350 vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK); 382 vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK);
351 vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK); 383 vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK);
352 384
353 for (irq = IRQ_EP93XX_GPIO(0) ; irq <= IRQ_EP93XX_GPIO(15); irq++) { 385 for (irq = IRQ_EP93XX_GPIO(0); irq <= IRQ_EP93XX_GPIO(23); irq++) {
354 set_irq_chip(irq, &ep93xx_gpio_ab_irq_chip); 386 set_irq_chip(irq, &ep93xx_gpio_irq_chip);
355 set_irq_handler(irq, handle_level_irq); 387 set_irq_handler(irq, handle_level_irq);
356 set_irq_flags(irq, IRQF_VALID); 388 set_irq_flags(irq, IRQF_VALID);
357 } 389 }
390
358 set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler); 391 set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler);
392 set_irq_chained_handler(IRQ_EP93XX_GPIO0MUX, ep93xx_gpio_f_irq_handler);
393 set_irq_chained_handler(IRQ_EP93XX_GPIO1MUX, ep93xx_gpio_f_irq_handler);
394 set_irq_chained_handler(IRQ_EP93XX_GPIO2MUX, ep93xx_gpio_f_irq_handler);
395 set_irq_chained_handler(IRQ_EP93XX_GPIO3MUX, ep93xx_gpio_f_irq_handler);
396 set_irq_chained_handler(IRQ_EP93XX_GPIO4MUX, ep93xx_gpio_f_irq_handler);
397 set_irq_chained_handler(IRQ_EP93XX_GPIO5MUX, ep93xx_gpio_f_irq_handler);
398 set_irq_chained_handler(IRQ_EP93XX_GPIO6MUX, ep93xx_gpio_f_irq_handler);
399 set_irq_chained_handler(IRQ_EP93XX_GPIO7MUX, ep93xx_gpio_f_irq_handler);
359} 400}
360 401
361 402
@@ -461,8 +502,6 @@ void __init ep93xx_init_devices(void)
461{ 502{
462 unsigned int v; 503 unsigned int v;
463 504
464 ep93xx_clock_init();
465
466 /* 505 /*
467 * Disallow access to MaverickCrunch initially. 506 * Disallow access to MaverickCrunch initially.
468 */ 507 */
@@ -477,8 +516,4 @@ void __init ep93xx_init_devices(void)
477 516
478 platform_device_register(&ep93xx_rtc_device); 517 platform_device_register(&ep93xx_rtc_device);
479 platform_device_register(&ep93xx_ohci_device); 518 platform_device_register(&ep93xx_ohci_device);
480
481#ifdef CONFIG_CRUNCH
482 elf_hwcap |= HWCAP_CRUNCH;
483#endif
484} 519}
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
new file mode 100644
index 000000000000..f28c1294cae1
--- /dev/null
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -0,0 +1,157 @@
1/*
2 * linux/arch/arm/mach-ep93xx/micro9.c
3 *
4 * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH
5 * Manfred Gruber <manfred.gruber@contec.at>
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/init.h>
13#include <linux/interrupt.h>
14#include <linux/ioport.h>
15#include <linux/kernel.h>
16#include <linux/mm.h>
17#include <linux/platform_device.h>
18#include <linux/sched.h>
19
20#include <linux/mtd/physmap.h>
21
22#include <asm/io.h>
23#include <asm/hardware.h>
24
25#include <asm/mach/arch.h>
26#include <asm/mach-types.h>
27
28static struct ep93xx_eth_data micro9_eth_data = {
29 .phy_id = 0x1f,
30};
31
32static struct resource micro9_eth_resource[] = {
33 {
34 .start = EP93XX_ETHERNET_PHYS_BASE,
35 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = IRQ_EP93XX_ETHERNET,
39 .end = IRQ_EP93XX_ETHERNET,
40 .flags = IORESOURCE_IRQ,
41 }
42};
43
44static struct platform_device micro9_eth_device = {
45 .name = "ep93xx-eth",
46 .id = -1,
47 .dev = {
48 .platform_data = &micro9_eth_data,
49 },
50 .num_resources = ARRAY_SIZE(micro9_eth_resource),
51 .resource = micro9_eth_resource,
52};
53
54static void __init micro9_eth_init(void)
55{
56 memcpy(micro9_eth_data.dev_addr,
57 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
58 platform_device_register(&micro9_eth_device);
59}
60
61static void __init micro9_init(void)
62{
63 micro9_eth_init();
64}
65
66/*
67 * Micro9-H
68 */
69#ifdef CONFIG_MACH_MICRO9H
70static struct physmap_flash_data micro9h_flash_data = {
71 .width = 4,
72};
73
74static struct resource micro9h_flash_resource = {
75 .start = 0x10000000,
76 .end = 0x13ffffff,
77 .flags = IORESOURCE_MEM,
78};
79
80static struct platform_device micro9h_flash = {
81 .name = "physmap-flash",
82 .id = 0,
83 .dev = {
84 .platform_data = &micro9h_flash_data,
85 },
86 .num_resources = 1,
87 .resource = &micro9h_flash_resource,
88};
89
90static void __init micro9h_init(void)
91{
92 platform_device_register(&micro9h_flash);
93}
94
95static void __init micro9h_init_machine(void)
96{
97 ep93xx_init_devices();
98 micro9_init();
99 micro9h_init();
100}
101
102MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
103 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
104 .phys_io = EP93XX_APB_PHYS_BASE,
105 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
106 .boot_params = 0x00000100,
107 .map_io = ep93xx_map_io,
108 .init_irq = ep93xx_init_irq,
109 .timer = &ep93xx_timer,
110 .init_machine = micro9h_init_machine,
111MACHINE_END
112#endif
113
114/*
115 * Micro9-M
116 */
117#ifdef CONFIG_MACH_MICRO9M
118static void __init micro9m_init_machine(void)
119{
120 ep93xx_init_devices();
121 micro9_init();
122}
123
124MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
125 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
126 .phys_io = EP93XX_APB_PHYS_BASE,
127 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
128 .boot_params = 0x00000100,
129 .map_io = ep93xx_map_io,
130 .init_irq = ep93xx_init_irq,
131 .timer = &ep93xx_timer,
132 .init_machine = micro9m_init_machine,
133MACHINE_END
134#endif
135
136/*
137 * Micro9-L
138 */
139#ifdef CONFIG_MACH_MICRO9L
140static void __init micro9l_init_machine(void)
141{
142 ep93xx_init_devices();
143 micro9_init();
144}
145
146MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
147 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
148 .phys_io = EP93XX_APB_PHYS_BASE,
149 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
150 .boot_params = 0x00000100,
151 .map_io = ep93xx_map_io,
152 .init_irq = ep93xx_init_irq,
153 .timer = &ep93xx_timer,
154 .init_machine = micro9l_init_machine,
155MACHINE_END
156#endif
157
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 40039b2a90b3..2703a730baf7 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -87,7 +87,7 @@ static struct clocksource clocksource_imx = {
87 .read = imx_get_cycles, 87 .read = imx_get_cycles,
88 .mask = 0xFFFFFFFF, 88 .mask = 0xFFFFFFFF,
89 .shift = 20, 89 .shift = 20,
90 .is_continuous = 1, 90 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
91}; 91};
92 92
93static int __init imx_clocksource_init(void) 93static int __init imx_clocksource_init(void)
diff --git a/arch/arm/mach-iop13xx/Makefile b/arch/arm/mach-iop13xx/Makefile
index c3d6c08f2d4c..4185e0586c33 100644
--- a/arch/arm/mach-iop13xx/Makefile
+++ b/arch/arm/mach-iop13xx/Makefile
@@ -5,7 +5,6 @@ obj- :=
5 5
6obj-$(CONFIG_ARCH_IOP13XX) += setup.o 6obj-$(CONFIG_ARCH_IOP13XX) += setup.o
7obj-$(CONFIG_ARCH_IOP13XX) += irq.o 7obj-$(CONFIG_ARCH_IOP13XX) += irq.o
8obj-$(CONFIG_ARCH_IOP13XX) += time.o
9obj-$(CONFIG_ARCH_IOP13XX) += pci.o 8obj-$(CONFIG_ARCH_IOP13XX) += pci.o
10obj-$(CONFIG_ARCH_IOP13XX) += io.o 9obj-$(CONFIG_ARCH_IOP13XX) += io.o
11obj-$(CONFIG_MACH_IQ81340SC) += iq81340sc.o 10obj-$(CONFIG_MACH_IQ81340SC) += iq81340sc.o
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index 2a1bbfe9896f..a519d707571c 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -25,6 +25,7 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/arch/pci.h> 26#include <asm/arch/pci.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/time.h>
28 29
29extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ 30extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */
30 31
@@ -78,12 +79,12 @@ static void __init iq81340mc_init(void)
78 79
79static void __init iq81340mc_timer_init(void) 80static void __init iq81340mc_timer_init(void)
80{ 81{
81 iop13xx_init_time(400000000); 82 iop_init_time(400000000);
82} 83}
83 84
84static struct sys_timer iq81340mc_timer = { 85static struct sys_timer iq81340mc_timer = {
85 .init = iq81340mc_timer_init, 86 .init = iq81340mc_timer_init,
86 .offset = iop13xx_gettimeoffset, 87 .offset = iop_gettimeoffset,
87}; 88};
88 89
89MACHINE_START(IQ81340MC, "Intel IQ81340MC") 90MACHINE_START(IQ81340MC, "Intel IQ81340MC")
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index 5ad2b62c9bfd..0e71fbcabe00 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -25,6 +25,7 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/arch/pci.h> 26#include <asm/arch/pci.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/time.h>
28 29
29extern int init_atu; 30extern int init_atu;
30 31
@@ -80,12 +81,12 @@ static void __init iq81340sc_init(void)
80 81
81static void __init iq81340sc_timer_init(void) 82static void __init iq81340sc_timer_init(void)
82{ 83{
83 iop13xx_init_time(400000000); 84 iop_init_time(400000000);
84} 85}
85 86
86static struct sys_timer iq81340sc_timer = { 87static struct sys_timer iq81340sc_timer = {
87 .init = iq81340sc_timer_init, 88 .init = iq81340sc_timer_init,
88 .offset = iop13xx_gettimeoffset, 89 .offset = iop_gettimeoffset,
89}; 90};
90 91
91MACHINE_START(IQ81340SC, "Intel IQ81340SC") 92MACHINE_START(IQ81340SC, "Intel IQ81340SC")
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c
index dbbc07c38b14..b2eb0b961031 100644
--- a/arch/arm/mach-iop13xx/irq.c
+++ b/arch/arm/mach-iop13xx/irq.c
@@ -161,65 +161,49 @@ static void write_intsize(u32 val)
161static void 161static void
162iop13xx_irq_mask0 (unsigned int irq) 162iop13xx_irq_mask0 (unsigned int irq)
163{ 163{
164 u32 cp_flags = iop13xx_cp6_save();
165 write_intctl_0(read_intctl_0() & ~(1 << (irq - 0))); 164 write_intctl_0(read_intctl_0() & ~(1 << (irq - 0)));
166 iop13xx_cp6_restore(cp_flags);
167} 165}
168 166
169static void 167static void
170iop13xx_irq_mask1 (unsigned int irq) 168iop13xx_irq_mask1 (unsigned int irq)
171{ 169{
172 u32 cp_flags = iop13xx_cp6_save();
173 write_intctl_1(read_intctl_1() & ~(1 << (irq - 32))); 170 write_intctl_1(read_intctl_1() & ~(1 << (irq - 32)));
174 iop13xx_cp6_restore(cp_flags);
175} 171}
176 172
177static void 173static void
178iop13xx_irq_mask2 (unsigned int irq) 174iop13xx_irq_mask2 (unsigned int irq)
179{ 175{
180 u32 cp_flags = iop13xx_cp6_save();
181 write_intctl_2(read_intctl_2() & ~(1 << (irq - 64))); 176 write_intctl_2(read_intctl_2() & ~(1 << (irq - 64)));
182 iop13xx_cp6_restore(cp_flags);
183} 177}
184 178
185static void 179static void
186iop13xx_irq_mask3 (unsigned int irq) 180iop13xx_irq_mask3 (unsigned int irq)
187{ 181{
188 u32 cp_flags = iop13xx_cp6_save();
189 write_intctl_3(read_intctl_3() & ~(1 << (irq - 96))); 182 write_intctl_3(read_intctl_3() & ~(1 << (irq - 96)));
190 iop13xx_cp6_restore(cp_flags);
191} 183}
192 184
193static void 185static void
194iop13xx_irq_unmask0(unsigned int irq) 186iop13xx_irq_unmask0(unsigned int irq)
195{ 187{
196 u32 cp_flags = iop13xx_cp6_save();
197 write_intctl_0(read_intctl_0() | (1 << (irq - 0))); 188 write_intctl_0(read_intctl_0() | (1 << (irq - 0)));
198 iop13xx_cp6_restore(cp_flags);
199} 189}
200 190
201static void 191static void
202iop13xx_irq_unmask1(unsigned int irq) 192iop13xx_irq_unmask1(unsigned int irq)
203{ 193{
204 u32 cp_flags = iop13xx_cp6_save();
205 write_intctl_1(read_intctl_1() | (1 << (irq - 32))); 194 write_intctl_1(read_intctl_1() | (1 << (irq - 32)));
206 iop13xx_cp6_restore(cp_flags);
207} 195}
208 196
209static void 197static void
210iop13xx_irq_unmask2(unsigned int irq) 198iop13xx_irq_unmask2(unsigned int irq)
211{ 199{
212 u32 cp_flags = iop13xx_cp6_save();
213 write_intctl_2(read_intctl_2() | (1 << (irq - 64))); 200 write_intctl_2(read_intctl_2() | (1 << (irq - 64)));
214 iop13xx_cp6_restore(cp_flags);
215} 201}
216 202
217static void 203static void
218iop13xx_irq_unmask3(unsigned int irq) 204iop13xx_irq_unmask3(unsigned int irq)
219{ 205{
220 u32 cp_flags = iop13xx_cp6_save();
221 write_intctl_3(read_intctl_3() | (1 << (irq - 96))); 206 write_intctl_3(read_intctl_3() | (1 << (irq - 96)));
222 iop13xx_cp6_restore(cp_flags);
223} 207}
224 208
225static struct irq_chip iop13xx_irqchip1 = { 209static struct irq_chip iop13xx_irqchip1 = {
@@ -250,11 +234,13 @@ static struct irq_chip iop13xx_irqchip4 = {
250 .unmask = iop13xx_irq_unmask3, 234 .unmask = iop13xx_irq_unmask3,
251}; 235};
252 236
237extern void iop_init_cp6_handler(void);
238
253void __init iop13xx_init_irq(void) 239void __init iop13xx_init_irq(void)
254{ 240{
255 unsigned int i; 241 unsigned int i;
256 242
257 u32 cp_flags = iop13xx_cp6_save(); 243 iop_init_cp6_handler();
258 244
259 /* disable all interrupts */ 245 /* disable all interrupts */
260 write_intctl_0(0); 246 write_intctl_0(0);
@@ -285,6 +271,4 @@ void __init iop13xx_init_irq(void)
285 set_irq_handler(i, handle_level_irq); 271 set_irq_handler(i, handle_level_irq);
286 set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 272 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
287 } 273 }
288
289 iop13xx_cp6_restore(cp_flags);
290} 274}
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index 5fbeb28d04bb..9a46bcd5f18e 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -24,6 +24,7 @@
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/hardware.h> 25#include <asm/hardware.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/io.h>
27 28
28#define IOP13XX_UART_XTAL 33334000 29#define IOP13XX_UART_XTAL 33334000
29#define IOP13XX_SETUP_DEBUG 0 30#define IOP13XX_SETUP_DEBUG 0
diff --git a/arch/arm/mach-iop13xx/time.c b/arch/arm/mach-iop13xx/time.c
deleted file mode 100644
index 8b21365f653f..000000000000
--- a/arch/arm/mach-iop13xx/time.c
+++ /dev/null
@@ -1,102 +0,0 @@
1/*
2 * arch/arm/mach-iop13xx/time.c
3 *
4 * Timer code for IOP13xx (copied from IOP32x/IOP33x implementation)
5 *
6 * Author: Deepak Saxena <dsaxena@mvista.com>
7 *
8 * Copyright 2002-2003 MontaVista Software Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/kernel.h>
17#include <linux/interrupt.h>
18#include <linux/time.h>
19#include <linux/init.h>
20#include <linux/timex.h>
21#include <asm/io.h>
22#include <asm/irq.h>
23#include <asm/uaccess.h>
24#include <asm/mach/irq.h>
25#include <asm/mach/time.h>
26
27static unsigned long ticks_per_jiffy;
28static unsigned long ticks_per_usec;
29static unsigned long next_jiffy_time;
30
31static inline u32 read_tcr1(void)
32{
33 u32 val;
34 asm volatile("mrc p6, 0, %0, c3, c9, 0" : "=r" (val));
35 return val;
36}
37
38unsigned long iop13xx_gettimeoffset(void)
39{
40 unsigned long offset;
41 u32 cp_flags;
42
43 cp_flags = iop13xx_cp6_save();
44 offset = next_jiffy_time - read_tcr1();
45 iop13xx_cp6_restore(cp_flags);
46
47 return offset / ticks_per_usec;
48}
49
50static irqreturn_t
51iop13xx_timer_interrupt(int irq, void *dev_id)
52{
53 u32 cp_flags = iop13xx_cp6_save();
54
55 write_seqlock(&xtime_lock);
56
57 asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (1));
58
59 while ((signed long)(next_jiffy_time - read_tcr1())
60 >= ticks_per_jiffy) {
61 timer_tick();
62 next_jiffy_time -= ticks_per_jiffy;
63 }
64
65 write_sequnlock(&xtime_lock);
66
67 iop13xx_cp6_restore(cp_flags);
68
69 return IRQ_HANDLED;
70}
71
72static struct irqaction iop13xx_timer_irq = {
73 .name = "IOP13XX Timer Tick",
74 .handler = iop13xx_timer_interrupt,
75 .flags = IRQF_DISABLED | IRQF_TIMER,
76};
77
78void __init iop13xx_init_time(unsigned long tick_rate)
79{
80 u32 timer_ctl;
81 u32 cp_flags;
82
83 ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
84 ticks_per_usec = tick_rate / 1000000;
85 next_jiffy_time = 0xffffffff;
86
87 timer_ctl = IOP13XX_TMR_EN | IOP13XX_TMR_PRIVILEGED |
88 IOP13XX_TMR_RELOAD | IOP13XX_TMR_RATIO_1_1;
89
90 /*
91 * We use timer 0 for our timer interrupt, and timer 1 as
92 * monotonic counter for tracking missed jiffies.
93 */
94 cp_flags = iop13xx_cp6_save();
95 asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (ticks_per_jiffy - 1));
96 asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (timer_ctl));
97 asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (0xffffffff));
98 asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (timer_ctl));
99 iop13xx_cp6_restore(cp_flags);
100
101 setup_irq(IRQ_IOP13XX_TIMER0, &iop13xx_timer_irq);
102}
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index b9b765057dbe..45f4f13ae11b 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -31,6 +31,7 @@
31#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/arch/time.h>
34 35
35/* 36/*
36 * GLAN Tank timer tick configuration. 37 * GLAN Tank timer tick configuration.
@@ -38,12 +39,12 @@
38static void __init glantank_timer_init(void) 39static void __init glantank_timer_init(void)
39{ 40{
40 /* 33.333 MHz crystal. */ 41 /* 33.333 MHz crystal. */
41 iop3xx_init_time(200000000); 42 iop_init_time(200000000);
42} 43}
43 44
44static struct sys_timer glantank_timer = { 45static struct sys_timer glantank_timer = {
45 .init = glantank_timer_init, 46 .init = glantank_timer_init,
46 .offset = iop3xx_gettimeoffset, 47 .offset = iop_gettimeoffset,
47}; 48};
48 49
49 50
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index be4aedfa0de6..571ac35bc2c7 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -36,7 +36,7 @@
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/page.h> 37#include <asm/page.h>
38#include <asm/pgtable.h> 38#include <asm/pgtable.h>
39 39#include <asm/arch/time.h>
40 40
41/* 41/*
42 * The EP80219 and IQ31244 use the same machine ID. To find out 42 * The EP80219 and IQ31244 use the same machine ID. To find out
@@ -56,16 +56,16 @@ static void __init iq31244_timer_init(void)
56{ 56{
57 if (is_80219()) { 57 if (is_80219()) {
58 /* 33.333 MHz crystal. */ 58 /* 33.333 MHz crystal. */
59 iop3xx_init_time(200000000); 59 iop_init_time(200000000);
60 } else { 60 } else {
61 /* 33.000 MHz crystal. */ 61 /* 33.000 MHz crystal. */
62 iop3xx_init_time(198000000); 62 iop_init_time(198000000);
63 } 63 }
64} 64}
65 65
66static struct sys_timer iq31244_timer = { 66static struct sys_timer iq31244_timer = {
67 .init = iq31244_timer_init, 67 .init = iq31244_timer_init,
68 .offset = iop3xx_gettimeoffset, 68 .offset = iop_gettimeoffset,
69}; 69};
70 70
71 71
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 1f37b5501888..361c70c0f64c 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -33,6 +33,7 @@
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/pgtable.h> 35#include <asm/pgtable.h>
36#include <asm/arch/time.h>
36 37
37/* 38/*
38 * IQ80321 timer tick configuration. 39 * IQ80321 timer tick configuration.
@@ -40,12 +41,12 @@
40static void __init iq80321_timer_init(void) 41static void __init iq80321_timer_init(void)
41{ 42{
42 /* 33.333 MHz crystal. */ 43 /* 33.333 MHz crystal. */
43 iop3xx_init_time(200000000); 44 iop_init_time(200000000);
44} 45}
45 46
46static struct sys_timer iq80321_timer = { 47static struct sys_timer iq80321_timer = {
47 .init = iq80321_timer_init, 48 .init = iq80321_timer_init,
48 .offset = iop3xx_gettimeoffset, 49 .offset = iop_gettimeoffset,
49}; 50};
50 51
51 52
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c
index 3ec1cd5c4f99..82598dc18d80 100644
--- a/arch/arm/mach-iop32x/irq.c
+++ b/arch/arm/mach-iop32x/irq.c
@@ -23,16 +23,12 @@ static u32 iop32x_mask;
23 23
24static inline void intctl_write(u32 val) 24static inline void intctl_write(u32 val)
25{ 25{
26 iop3xx_cp6_enable();
27 asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val)); 26 asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val));
28 iop3xx_cp6_disable();
29} 27}
30 28
31static inline void intstr_write(u32 val) 29static inline void intstr_write(u32 val)
32{ 30{
33 iop3xx_cp6_enable();
34 asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (val)); 31 asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (val));
35 iop3xx_cp6_disable();
36} 32}
37 33
38static void 34static void
@@ -60,6 +56,8 @@ void __init iop32x_init_irq(void)
60{ 56{
61 int i; 57 int i;
62 58
59 iop_init_cp6_handler();
60
63 intctl_write(0); 61 intctl_write(0);
64 intstr_write(0); 62 intstr_write(0);
65 if (machine_is_glantank() || 63 if (machine_is_glantank() ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 2499a7707e3c..5f07344d96f3 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -37,6 +37,7 @@
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38#include <asm/page.h> 38#include <asm/page.h>
39#include <asm/pgtable.h> 39#include <asm/pgtable.h>
40#include <asm/arch/time.h>
40 41
41/* 42/*
42 * N2100 timer tick configuration. 43 * N2100 timer tick configuration.
@@ -44,12 +45,12 @@
44static void __init n2100_timer_init(void) 45static void __init n2100_timer_init(void)
45{ 46{
46 /* 33.000 MHz crystal. */ 47 /* 33.000 MHz crystal. */
47 iop3xx_init_time(198000000); 48 iop_init_time(198000000);
48} 49}
49 50
50static struct sys_timer n2100_timer = { 51static struct sys_timer n2100_timer = {
51 .init = n2100_timer_init, 52 .init = n2100_timer_init,
52 .offset = iop3xx_gettimeoffset, 53 .offset = iop_gettimeoffset,
53}; 54};
54 55
55 56
@@ -120,6 +121,20 @@ static struct hw_pci n2100_pci __initdata = {
120 .map_irq = n2100_pci_map_irq, 121 .map_irq = n2100_pci_map_irq,
121}; 122};
122 123
124/*
125 * Both r8169 chips on the n2100 exhibit PCI parity problems. Set
126 * the ->broken_parity_status flag for both ports so that the r8169
127 * driver knows it should ignore error interrupts.
128 */
129static void n2100_fixup_r8169(struct pci_dev *dev)
130{
131 if (dev->bus->number == 0 &&
132 (dev->devfn == PCI_DEVFN(1, 0) ||
133 dev->devfn == PCI_DEVFN(2, 0)))
134 dev->broken_parity_status = 1;
135}
136DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169);
137
123static int __init n2100_pci_init(void) 138static int __init n2100_pci_init(void)
124{ 139{
125 if (machine_is_n2100()) 140 if (machine_is_n2100())
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 97a7b7488264..1a9e36138d80 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -32,6 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/arch/time.h>
35 36
36/* 37/*
37 * IQ80331 timer tick configuration. 38 * IQ80331 timer tick configuration.
@@ -40,14 +41,14 @@ static void __init iq80331_timer_init(void)
40{ 41{
41 /* D-Step parts run at a higher internal bus frequency */ 42 /* D-Step parts run at a higher internal bus frequency */
42 if (*IOP3XX_ATURID >= 0xa) 43 if (*IOP3XX_ATURID >= 0xa)
43 iop3xx_init_time(333000000); 44 iop_init_time(333000000);
44 else 45 else
45 iop3xx_init_time(266000000); 46 iop_init_time(266000000);
46} 47}
47 48
48static struct sys_timer iq80331_timer = { 49static struct sys_timer iq80331_timer = {
49 .init = iq80331_timer_init, 50 .init = iq80331_timer_init,
50 .offset = iop3xx_gettimeoffset, 51 .offset = iop_gettimeoffset,
51}; 52};
52 53
53 54
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 9887bfc1c078..96d6f0f3cd21 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -32,6 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/arch/time.h>
35 36
36/* 37/*
37 * IQ80332 timer tick configuration. 38 * IQ80332 timer tick configuration.
@@ -40,14 +41,14 @@ static void __init iq80332_timer_init(void)
40{ 41{
41 /* D-Step parts and the iop333 run at a higher internal bus frequency */ 42 /* D-Step parts and the iop333 run at a higher internal bus frequency */
42 if (*IOP3XX_ATURID >= 0xa || *IOP3XX_ATUDID == 0x374) 43 if (*IOP3XX_ATURID >= 0xa || *IOP3XX_ATUDID == 0x374)
43 iop3xx_init_time(333000000); 44 iop_init_time(333000000);
44 else 45 else
45 iop3xx_init_time(266000000); 46 iop_init_time(266000000);
46} 47}
47 48
48static struct sys_timer iq80332_timer = { 49static struct sys_timer iq80332_timer = {
49 .init = iq80332_timer_init, 50 .init = iq80332_timer_init,
50 .offset = iop3xx_gettimeoffset, 51 .offset = iop_gettimeoffset,
51}; 52};
52 53
53 54
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c
index 00b37f32d72e..c65ea78a2427 100644
--- a/arch/arm/mach-iop33x/irq.c
+++ b/arch/arm/mach-iop33x/irq.c
@@ -24,44 +24,32 @@ static u32 iop33x_mask1;
24 24
25static inline void intctl0_write(u32 val) 25static inline void intctl0_write(u32 val)
26{ 26{
27 iop3xx_cp6_enable();
28 asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val)); 27 asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val));
29 iop3xx_cp6_disable();
30} 28}
31 29
32static inline void intctl1_write(u32 val) 30static inline void intctl1_write(u32 val)
33{ 31{
34 iop3xx_cp6_enable();
35 asm volatile("mcr p6, 0, %0, c1, c0, 0" : : "r" (val)); 32 asm volatile("mcr p6, 0, %0, c1, c0, 0" : : "r" (val));
36 iop3xx_cp6_disable();
37} 33}
38 34
39static inline void intstr0_write(u32 val) 35static inline void intstr0_write(u32 val)
40{ 36{
41 iop3xx_cp6_enable();
42 asm volatile("mcr p6, 0, %0, c2, c0, 0" : : "r" (val)); 37 asm volatile("mcr p6, 0, %0, c2, c0, 0" : : "r" (val));
43 iop3xx_cp6_disable();
44} 38}
45 39
46static inline void intstr1_write(u32 val) 40static inline void intstr1_write(u32 val)
47{ 41{
48 iop3xx_cp6_enable();
49 asm volatile("mcr p6, 0, %0, c3, c0, 0" : : "r" (val)); 42 asm volatile("mcr p6, 0, %0, c3, c0, 0" : : "r" (val));
50 iop3xx_cp6_disable();
51} 43}
52 44
53static inline void intbase_write(u32 val) 45static inline void intbase_write(u32 val)
54{ 46{
55 iop3xx_cp6_enable();
56 asm volatile("mcr p6, 0, %0, c12, c0, 0" : : "r" (val)); 47 asm volatile("mcr p6, 0, %0, c12, c0, 0" : : "r" (val));
57 iop3xx_cp6_disable();
58} 48}
59 49
60static inline void intsize_write(u32 val) 50static inline void intsize_write(u32 val)
61{ 51{
62 iop3xx_cp6_enable();
63 asm volatile("mcr p6, 0, %0, c13, c0, 0" : : "r" (val)); 52 asm volatile("mcr p6, 0, %0, c13, c0, 0" : : "r" (val));
64 iop3xx_cp6_disable();
65} 53}
66 54
67static void 55static void
@@ -110,6 +98,8 @@ void __init iop33x_init_irq(void)
110{ 98{
111 int i; 99 int i;
112 100
101 iop_init_cp6_handler();
102
113 intctl0_write(0); 103 intctl0_write(0);
114 intctl1_write(0); 104 intctl1_write(0);
115 intstr0_write(0); 105 intstr0_write(0);
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index e316bd93313f..8a339cdfe222 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -17,7 +17,7 @@ config MACH_NSLU2
17 NSLU2 NAS device. For more information on this platform, 17 NSLU2 NAS device. For more information on this platform,
18 see http://www.nslu2-linux.org 18 see http://www.nslu2-linux.org
19 19
20config ARCH_AVILA 20config MACH_AVILA
21 bool "Avila" 21 bool "Avila"
22 select PCI 22 select PCI
23 help 23 help
@@ -25,6 +25,14 @@ config ARCH_AVILA
25 Avila Network Platform. For more information on this platform, 25 Avila Network Platform. For more information on this platform,
26 see <file:Documentation/arm/IXP4xx>. 26 see <file:Documentation/arm/IXP4xx>.
27 27
28config MACH_LOFT
29 bool "Loft"
30 depends on MACH_AVILA
31 help
32 Say 'Y' here if you want your kernel to support the Giant
33 Shoulder Inc Loft board (a minor variation on the standard
34 Gateworks Avila Network Platform).
35
28config ARCH_ADI_COYOTE 36config ARCH_ADI_COYOTE
29 bool "Coyote" 37 bool "Coyote"
30 select PCI 38 select PCI
@@ -86,7 +94,7 @@ config MACH_NAS100D
86# 94#
87config ARCH_IXDP4XX 95config ARCH_IXDP4XX
88 bool 96 bool
89 depends on ARCH_IXDP425 || ARCH_AVILA || MACH_IXDP465 97 depends on ARCH_IXDP425 || MACH_IXDP465
90 default y 98 default y
91 99
92# 100#
diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
index 640315d8b96a..746e297284ed 100644
--- a/arch/arm/mach-ixp4xx/Makefile
+++ b/arch/arm/mach-ixp4xx/Makefile
@@ -6,6 +6,7 @@ obj-pci-y :=
6obj-pci-n := 6obj-pci-n :=
7 7
8obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o 8obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o
9obj-pci-$(CONFIG_MACH_AVILA) += avila-pci.o
9obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o 10obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o
10obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o 11obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o
11obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o 12obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o
@@ -15,6 +16,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
15obj-y += common.o 16obj-y += common.o
16 17
17obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o 18obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o
19obj-$(CONFIG_MACH_AVILA) += avila-setup.o
18obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o 20obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o
19obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o 21obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o
20obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o 22obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c
new file mode 100644
index 000000000000..3f867691d9f2
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/avila-pci.c
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-ixp4xx/avila-pci.c
3 *
4 * Gateworks Avila board-level PCI initialization
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp-pci.c
9 * Copyright (C) 2002 Intel Corporation.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 *
18 */
19
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/init.h>
23#include <linux/irq.h>
24#include <linux/delay.h>
25
26#include <asm/mach/pci.h>
27#include <asm/irq.h>
28#include <asm/hardware.h>
29#include <asm/mach-types.h>
30
31void __init avila_pci_preinit(void)
32{
33 set_irq_type(IRQ_AVILA_PCI_INTA, IRQT_LOW);
34 set_irq_type(IRQ_AVILA_PCI_INTB, IRQT_LOW);
35 set_irq_type(IRQ_AVILA_PCI_INTC, IRQT_LOW);
36 set_irq_type(IRQ_AVILA_PCI_INTD, IRQT_LOW);
37
38 ixp4xx_pci_preinit();
39}
40
41static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
42{
43 static int pci_irq_table[AVILA_PCI_IRQ_LINES] = {
44 IRQ_AVILA_PCI_INTA,
45 IRQ_AVILA_PCI_INTB,
46 IRQ_AVILA_PCI_INTC,
47 IRQ_AVILA_PCI_INTD
48 };
49
50 int irq = -1;
51
52 if (slot >= 1 &&
53 slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) &&
54 pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) {
55 irq = pci_irq_table[(slot + pin - 2) % 4];
56 }
57
58 return irq;
59}
60
61struct hw_pci avila_pci __initdata = {
62 .nr_controllers = 1,
63 .preinit = avila_pci_preinit,
64 .swizzle = pci_std_swizzle,
65 .setup = ixp4xx_setup,
66 .scan = ixp4xx_scan_bus,
67 .map_irq = avila_map_irq,
68};
69
70int __init avila_pci_init(void)
71{
72 if (machine_is_avila() || machine_is_loft())
73 pci_common_init(&avila_pci);
74 return 0;
75}
76
77subsys_initcall(avila_pci_init);
78
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
new file mode 100644
index 000000000000..d59b8dc7dc7a
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -0,0 +1,192 @@
1/*
2 * arch/arm/mach-ixp4xx/avila-setup.c
3 *
4 * Gateworks Avila board-setup
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp-setup.c
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Deepak Saxena <dsaxena@plexity.net>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/device.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/slab.h>
21
22#include <asm/types.h>
23#include <asm/setup.h>
24#include <asm/memory.h>
25#include <asm/hardware.h>
26#include <asm/mach-types.h>
27#include <asm/irq.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/flash.h>
30
31static struct flash_platform_data avila_flash_data = {
32 .map_name = "cfi_probe",
33 .width = 2,
34};
35
36static struct resource avila_flash_resource = {
37 .flags = IORESOURCE_MEM,
38};
39
40static struct platform_device avila_flash = {
41 .name = "IXP4XX-Flash",
42 .id = 0,
43 .dev = {
44 .platform_data = &avila_flash_data,
45 },
46 .num_resources = 1,
47 .resource = &avila_flash_resource,
48};
49
50static struct ixp4xx_i2c_pins avila_i2c_gpio_pins = {
51 .sda_pin = AVILA_SDA_PIN,
52 .scl_pin = AVILA_SCL_PIN,
53};
54
55static struct platform_device avila_i2c_controller = {
56 .name = "IXP4XX-I2C",
57 .id = 0,
58 .dev = {
59 .platform_data = &avila_i2c_gpio_pins,
60 },
61 .num_resources = 0
62};
63
64static struct resource avila_uart_resources[] = {
65 {
66 .start = IXP4XX_UART1_BASE_PHYS,
67 .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
68 .flags = IORESOURCE_MEM
69 },
70 {
71 .start = IXP4XX_UART2_BASE_PHYS,
72 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
73 .flags = IORESOURCE_MEM
74 }
75};
76
77static struct plat_serial8250_port avila_uart_data[] = {
78 {
79 .mapbase = IXP4XX_UART1_BASE_PHYS,
80 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
81 .irq = IRQ_IXP4XX_UART1,
82 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
83 .iotype = UPIO_MEM,
84 .regshift = 2,
85 .uartclk = IXP4XX_UART_XTAL,
86 },
87 {
88 .mapbase = IXP4XX_UART2_BASE_PHYS,
89 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
90 .irq = IRQ_IXP4XX_UART2,
91 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
92 .iotype = UPIO_MEM,
93 .regshift = 2,
94 .uartclk = IXP4XX_UART_XTAL,
95 },
96 { },
97};
98
99static struct platform_device avila_uart = {
100 .name = "serial8250",
101 .id = PLAT8250_DEV_PLATFORM,
102 .dev.platform_data = avila_uart_data,
103 .num_resources = 2,
104 .resource = avila_uart_resources
105};
106
107static struct resource avila_pata_resources[] = {
108 {
109 .flags = IORESOURCE_MEM
110 },
111 {
112 .flags = IORESOURCE_MEM,
113 },
114 {
115 .name = "intrq",
116 .start = IRQ_IXP4XX_GPIO12,
117 .end = IRQ_IXP4XX_GPIO12,
118 .flags = IORESOURCE_IRQ,
119 },
120};
121
122static struct ixp4xx_pata_data avila_pata_data = {
123 .cs0_bits = 0xbfff0043,
124 .cs1_bits = 0xbfff0043,
125};
126
127static struct platform_device avila_pata = {
128 .name = "pata_ixp4xx_cf",
129 .id = 0,
130 .dev.platform_data = &avila_pata_data,
131 .num_resources = ARRAY_SIZE(avila_pata_resources),
132 .resource = avila_pata_resources,
133};
134
135static struct platform_device *avila_devices[] __initdata = {
136 &avila_i2c_controller,
137 &avila_flash,
138 &avila_uart
139};
140
141static void __init avila_init(void)
142{
143 ixp4xx_sys_init();
144
145 avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
146 avila_flash_resource.end =
147 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
148
149 platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices));
150
151 avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
152 avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
153
154 avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
155 avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
156
157 avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
158 avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
159
160 platform_device_register(&avila_pata);
161
162}
163
164MACHINE_START(AVILA, "Gateworks Avila Network Platform")
165 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
166 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
167 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
168 .map_io = ixp4xx_map_io,
169 .init_irq = ixp4xx_init_irq,
170 .timer = &ixp4xx_timer,
171 .boot_params = 0x0100,
172 .init_machine = avila_init,
173MACHINE_END
174
175 /*
176 * Loft is functionally equivalent to Avila except that it has a
177 * different number for the maximum PCI devices. The MACHINE
178 * structure below is identical to Avila except for the comment.
179 */
180#ifdef CONFIG_MACH_LOFT
181MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
182 /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */
183 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
184 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
185 .map_io = ixp4xx_map_io,
186 .init_irq = ixp4xx_init_irq,
187 .timer = &ixp4xx_timer,
188 .boot_params = 0x0100,
189 .init_machine = avila_init,
190MACHINE_END
191#endif
192
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 2ec9a9e9a04d..45068c3d8dcc 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -395,7 +395,7 @@ static struct clocksource clocksource_ixp4xx = {
395 .read = ixp4xx_get_cycles, 395 .read = ixp4xx_get_cycles,
396 .mask = CLOCKSOURCE_MASK(32), 396 .mask = CLOCKSOURCE_MASK(32),
397 .shift = 20, 397 .shift = 20,
398 .is_continuous = 1, 398 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
399}; 399};
400 400
401unsigned long ixp4xx_timer_freq = FREQ; 401unsigned long ixp4xx_timer_freq = FREQ;
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index d5156c043f0b..99c1dc8033c8 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -66,7 +66,7 @@ struct hw_pci ixdp425_pci __initdata = {
66int __init ixdp425_pci_init(void) 66int __init ixdp425_pci_init(void)
67{ 67{
68 if (machine_is_ixdp425() || machine_is_ixcdp1100() || 68 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
69 machine_is_avila() || machine_is_ixdp465()) 69 machine_is_ixdp465())
70 pci_common_init(&ixdp425_pci); 70 pci_common_init(&ixdp425_pci);
71 return 0; 71 return 0;
72} 72}
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index da72383ee301..04b1d56396a0 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -156,23 +156,3 @@ MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
156 .init_machine = ixdp425_init, 156 .init_machine = ixdp425_init,
157MACHINE_END 157MACHINE_END
158#endif 158#endif
159
160/*
161 * Avila is functionally equivalent to IXDP425 except that it adds
162 * a CF IDE slot hanging off the expansion bus. When we have a
163 * driver for IXP4xx CF IDE with driver model support we'll move
164 * Avila to it's own setup file.
165 */
166#ifdef CONFIG_ARCH_AVILA
167MACHINE_START(AVILA, "Gateworks Avila Network Platform")
168 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
169 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
170 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
171 .map_io = ixp4xx_map_io,
172 .init_irq = ixp4xx_init_irq,
173 .timer = &ixp4xx_timer,
174 .boot_params = 0x0100,
175 .init_machine = ixdp425_init,
176MACHINE_END
177#endif
178
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index 5773b55ef4a6..7e132fcccd47 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -62,7 +62,7 @@ static struct clocksource clocksource_netx = {
62 .read = netx_get_cycles, 62 .read = netx_get_cycles,
63 .mask = CLOCKSOURCE_MASK(32), 63 .mask = CLOCKSOURCE_MASK(32),
64 .shift = 20, 64 .shift = 20,
65 .is_continuous = 1, 65 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
66}; 66};
67 67
68/* 68/*
diff --git a/arch/arm/mach-ns9xxx/Kconfig b/arch/arm/mach-ns9xxx/Kconfig
new file mode 100644
index 000000000000..8175ba92a2fa
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/Kconfig
@@ -0,0 +1,21 @@
1if ARCH_NS9XXX
2
3menu "NS9xxx Implementations"
4
5config MACH_CC9P9360DEV
6 bool "Connect Core 9P 9360 on an A9M9750 Devboard"
7 select PROCESSOR_NS9360
8 select BOARD_A9M9750DEV
9 help
10 Say Y here if you are using the Digi Connect Core 9P 9360
11 on an A9M9750 Development Board.
12
13config PROCESSOR_NS9360
14 bool
15
16config BOARD_A9M9750DEV
17 bool
18
19endmenu
20
21endif
diff --git a/arch/arm/mach-ns9xxx/Makefile b/arch/arm/mach-ns9xxx/Makefile
new file mode 100644
index 000000000000..91e945f5e16d
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/Makefile
@@ -0,0 +1,5 @@
1obj-y := irq.o time.o generic.o
2
3obj-$(CONFIG_MACH_CC9P9360DEV) += mach-cc9p9360dev.o
4
5obj-$(CONFIG_BOARD_A9M9750DEV) += board-a9m9750dev.o
diff --git a/arch/arm/mach-ns9xxx/Makefile.boot b/arch/arm/mach-ns9xxx/Makefile.boot
new file mode 100644
index 000000000000..75ed64e90fa4
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/Makefile.boot
@@ -0,0 +1,2 @@
1zreladdr-y := 0x108000
2params_phys-y := 0x100
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
new file mode 100644
index 000000000000..25289884a607
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
@@ -0,0 +1,199 @@
1/*
2 * arch/arm/mach-ns9xxx/board-a9m9750dev.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/platform_device.h>
12#include <linux/serial_8250.h>
13#include <linux/irq.h>
14
15#include <asm/mach/map.h>
16
17#include <asm/arch-ns9xxx/board.h>
18#include <asm/arch-ns9xxx/regs-sys.h>
19#include <asm/arch-ns9xxx/regs-mem.h>
20#include <asm/arch-ns9xxx/regs-bbu.h>
21#include <asm/arch-ns9xxx/regs-board-a9m9750dev.h>
22
23#include "board-a9m9750dev.h"
24
25static struct map_desc board_a9m9750dev_io_desc[] __initdata = {
26 { /* FPGA on CS0 */
27 .virtual = io_p2v(NS9XXX_CSxSTAT_PHYS(0)),
28 .pfn = __phys_to_pfn(NS9XXX_CSxSTAT_PHYS(0)),
29 .length = NS9XXX_CS0STAT_LENGTH,
30 .type = MT_DEVICE,
31 },
32};
33
34void __init board_a9m9750dev_map_io(void)
35{
36 iotable_init(board_a9m9750dev_io_desc,
37 ARRAY_SIZE(board_a9m9750dev_io_desc));
38}
39
40static void a9m9750dev_fpga_ack_irq(unsigned int irq)
41{
42 /* nothing */
43}
44
45static void a9m9750dev_fpga_mask_irq(unsigned int irq)
46{
47 FPGA_IER &= ~(1 << (irq - FPGA_IRQ(0)));
48}
49
50static void a9m9750dev_fpga_maskack_irq(unsigned int irq)
51{
52 a9m9750dev_fpga_mask_irq(irq);
53 a9m9750dev_fpga_ack_irq(irq);
54}
55
56static void a9m9750dev_fpga_unmask_irq(unsigned int irq)
57{
58 FPGA_IER |= 1 << (irq - FPGA_IRQ(0));
59}
60
61static struct irq_chip a9m9750dev_fpga_chip = {
62 .ack = a9m9750dev_fpga_ack_irq,
63 .mask = a9m9750dev_fpga_mask_irq,
64 .mask_ack = a9m9750dev_fpga_maskack_irq,
65 .unmask = a9m9750dev_fpga_unmask_irq,
66};
67
68static void a9m9750dev_fpga_demux_handler(unsigned int irq,
69 struct irq_desc *desc)
70{
71 int stat = FPGA_ISR;
72
73 while (stat != 0) {
74 int irqno = fls(stat) - 1;
75
76 stat &= ~(1 << irqno);
77
78 desc = irq_desc + FPGA_IRQ(irqno);
79
80 desc_handle_irq(irqno, desc);
81 }
82}
83
84void __init board_a9m9750dev_init_irq(void)
85{
86 u32 reg;
87 int i;
88
89 /*
90 * configure gpio for IRQ_EXT2
91 * use GPIO 11, because GPIO 32 is used for the LCD
92 */
93 /* XXX: proper GPIO handling */
94 BBU_GC(2) &= ~0x2000;
95
96 for (i = FPGA_IRQ(0); i <= FPGA_IRQ(7); ++i) {
97 set_irq_chip(i, &a9m9750dev_fpga_chip);
98 set_irq_handler(i, handle_level_irq);
99 set_irq_flags(i, IRQF_VALID);
100 }
101
102 /* IRQ_EXT2: level sensitive + active low */
103 reg = SYS_EIC(2);
104 REGSET(reg, SYS_EIC, PLTY, AL);
105 REGSET(reg, SYS_EIC, LVEDG, LEVEL);
106 SYS_EIC(2) = reg;
107
108 set_irq_chained_handler(IRQ_EXT2,
109 a9m9750dev_fpga_demux_handler);
110}
111
112static struct plat_serial8250_port board_a9m9750dev_serial8250_port[] = {
113 {
114 .iobase = FPGA_UARTA_BASE,
115 .membase = (unsigned char*)FPGA_UARTA_BASE,
116 .mapbase = FPGA_UARTA_BASE,
117 .irq = IRQ_FPGA_UARTA,
118 .iotype = UPIO_MEM,
119 .uartclk = 18432000,
120 .regshift = 0,
121 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
122 }, {
123 .iobase = FPGA_UARTB_BASE,
124 .membase = (unsigned char*)FPGA_UARTB_BASE,
125 .mapbase = FPGA_UARTB_BASE,
126 .irq = IRQ_FPGA_UARTB,
127 .iotype = UPIO_MEM,
128 .uartclk = 18432000,
129 .regshift = 0,
130 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
131 }, {
132 .iobase = FPGA_UARTC_BASE,
133 .membase = (unsigned char*)FPGA_UARTC_BASE,
134 .mapbase = FPGA_UARTC_BASE,
135 .irq = IRQ_FPGA_UARTC,
136 .iotype = UPIO_MEM,
137 .uartclk = 18432000,
138 .regshift = 0,
139 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
140 }, {
141 .iobase = FPGA_UARTD_BASE,
142 .membase = (unsigned char*)FPGA_UARTD_BASE,
143 .mapbase = FPGA_UARTD_BASE,
144 .irq = IRQ_FPGA_UARTD,
145 .iotype = UPIO_MEM,
146 .uartclk = 18432000,
147 .regshift = 0,
148 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
149 }, {
150 /* end marker */
151 },
152};
153
154static struct platform_device board_a9m9750dev_serial_device = {
155 .name = "serial8250",
156 .dev = {
157 .platform_data = board_a9m9750dev_serial8250_port,
158 },
159};
160
161static struct platform_device *board_a9m9750dev_devices[] __initdata = {
162 &board_a9m9750dev_serial_device,
163};
164
165void __init board_a9m9750dev_init_machine(void)
166{
167 u32 reg;
168
169 /* setup static CS0: memory base ... */
170 REGSETIM(SYS_SMCSSMB(0), SYS_SMCSSMB, CSxB,
171 NS9XXX_CSxSTAT_PHYS(0) >> 12);
172
173 /* ... and mask */
174 reg = SYS_SMCSSMM(0);
175 REGSETIM(reg, SYS_SMCSSMM, CSxM, 0xfffff);
176 REGSET(reg, SYS_SMCSSMM, CSEx, EN);
177 SYS_SMCSSMM(0) = reg;
178
179 /* setup static CS0: memory configuration */
180 reg = MEM_SMC(0);
181 REGSET(reg, MEM_SMC, WSMC, OFF);
182 REGSET(reg, MEM_SMC, BSMC, OFF);
183 REGSET(reg, MEM_SMC, EW, OFF);
184 REGSET(reg, MEM_SMC, PB, 1);
185 REGSET(reg, MEM_SMC, PC, AL);
186 REGSET(reg, MEM_SMC, PM, DIS);
187 REGSET(reg, MEM_SMC, MW, 8);
188 MEM_SMC(0) = reg;
189
190 /* setup static CS0: timing */
191 MEM_SMWED(0) = 0x2;
192 MEM_SMOED(0) = 0x2;
193 MEM_SMRD(0) = 0x6;
194 MEM_SMWD(0) = 0x6;
195
196 platform_add_devices(board_a9m9750dev_devices,
197 ARRAY_SIZE(board_a9m9750dev_devices));
198}
199
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.h b/arch/arm/mach-ns9xxx/board-a9m9750dev.h
new file mode 100644
index 000000000000..edc75abbc5dd
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.h
@@ -0,0 +1,15 @@
1/*
2 * arch/arm/mach-ns9xxx/board-a9m9750dev.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/init.h>
12
13void __init board_a9m9750dev_map_io(void);
14void __init board_a9m9750dev_init_machine(void);
15void __init board_a9m9750dev_init_irq(void);
diff --git a/arch/arm/mach-ns9xxx/generic.c b/arch/arm/mach-ns9xxx/generic.c
new file mode 100644
index 000000000000..83e2b6532b22
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/generic.c
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-ns9xxx/generic.c
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/kernel.h>
12#include <linux/init.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
21static struct map_desc standard_io_desc[] __initdata = {
22 { /* BBus */
23 .virtual = io_p2v(0x90000000),
24 .pfn = __phys_to_pfn(0x90000000),
25 .length = 0x00700000,
26 .type = MT_DEVICE,
27 }, { /* AHB */
28 .virtual = io_p2v(0xa0100000),
29 .pfn = __phys_to_pfn(0xa0100000),
30 .length = 0x00900000,
31 .type = MT_DEVICE,
32 },
33};
34
35void __init ns9xxx_map_io(void)
36{
37 iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
38}
39
40void __init ns9xxx_init_machine(void)
41{
42}
diff --git a/arch/arm/mach-ns9xxx/generic.h b/arch/arm/mach-ns9xxx/generic.h
new file mode 100644
index 000000000000..687e291773f4
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/generic.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-ns9xxx/generic.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/time.h>
12#include <asm/mach/time.h>
13#include <linux/init.h>
14
15void __init ns9xxx_init_irq(void);
16void __init ns9xxx_map_io(void);
17void __init ns9xxx_init_machine(void);
18
19extern struct sys_timer ns9xxx_timer;
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
new file mode 100644
index 000000000000..83d92724a971
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -0,0 +1,94 @@
1/*
2 * arch/arm/mach-ns9xxx/irq.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/interrupt.h>
12#include <asm/mach/irq.h>
13#include <asm/mach-types.h>
14#include <asm/arch-ns9xxx/regs-sys.h>
15#include <asm/arch-ns9xxx/irqs.h>
16#include <asm/arch-ns9xxx/board.h>
17
18#include "generic.h"
19
20static void ns9xxx_ack_irq_timer(unsigned int irq)
21{
22 u32 tc = SYS_TC(irq - IRQ_TIMER0);
23
24 REGSET(tc, SYS_TCx, INTC, SET);
25 SYS_TC(irq - IRQ_TIMER0) = tc;
26
27 REGSET(tc, SYS_TCx, INTC, UNSET);
28 SYS_TC(irq - IRQ_TIMER0) = tc;
29}
30
31void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
32 [IRQ_TIMER0] = ns9xxx_ack_irq_timer,
33 [IRQ_TIMER1] = ns9xxx_ack_irq_timer,
34 [IRQ_TIMER2] = ns9xxx_ack_irq_timer,
35 [IRQ_TIMER3] = ns9xxx_ack_irq_timer,
36};
37
38static void ns9xxx_mask_irq(unsigned int irq)
39{
40 /* XXX: better use cpp symbols */
41 SYS_IC(irq / 4) &= ~(1 << (7 + 8 * (3 - (irq & 3))));
42}
43
44static void ns9xxx_ack_irq(unsigned int irq)
45{
46 if (!ns9xxx_ack_irq_functions[irq]) {
47 printk(KERN_ERR "no ack function for irq %u\n", irq);
48 BUG();
49 }
50
51 ns9xxx_ack_irq_functions[irq](irq);
52 SYS_ISRADDR = 0;
53}
54
55static void ns9xxx_maskack_irq(unsigned int irq)
56{
57 ns9xxx_mask_irq(irq);
58 ns9xxx_ack_irq(irq);
59}
60
61static void ns9xxx_unmask_irq(unsigned int irq)
62{
63 /* XXX: better use cpp symbols */
64 SYS_IC(irq / 4) |= 1 << (7 + 8 * (3 - (irq & 3)));
65}
66
67static struct irq_chip ns9xxx_chip = {
68 .ack = ns9xxx_ack_irq,
69 .mask = ns9xxx_mask_irq,
70 .mask_ack = ns9xxx_maskack_irq,
71 .unmask = ns9xxx_unmask_irq,
72};
73
74void __init ns9xxx_init_irq(void)
75{
76 int i;
77
78 /* disable all IRQs */
79 for (i = 0; i < 8; ++i)
80 SYS_IC(i) = (4 * i) << 24 | (4 * i + 1) << 16 |
81 (4 * i + 2) << 8 | (4 * i + 3);
82
83 /* simple interrupt prio table:
84 * prio(x) < prio(y) <=> x < y
85 */
86 for (i = 0; i < 32; ++i)
87 SYS_IVA(i) = i;
88
89 for (i = IRQ_WATCHDOG; i <= IRQ_EXT3; ++i) {
90 set_irq_chip(i, &ns9xxx_chip);
91 set_irq_handler(i, handle_level_irq);
92 set_irq_flags(i, IRQF_VALID);
93 }
94}
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
new file mode 100644
index 000000000000..a193dd931512
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <asm/mach/arch.h>
12#include <asm/mach-types.h>
13
14#include "board-a9m9750dev.h"
15#include "generic.h"
16
17static void __init mach_cc9p9360dev_map_io(void)
18{
19 ns9xxx_map_io();
20 board_a9m9750dev_map_io();
21}
22
23static void __init mach_cc9p9360dev_init_irq(void)
24{
25 ns9xxx_init_irq();
26 board_a9m9750dev_init_irq();
27}
28
29static void __init mach_cc9p9360dev_init_machine(void)
30{
31 ns9xxx_init_machine();
32 board_a9m9750dev_init_machine();
33}
34
35MACHINE_START(CC9P9360DEV, "Connect Core 9P 9360 on an A9M9750 Devboard")
36 .map_io = mach_cc9p9360dev_map_io,
37 .init_irq = mach_cc9p9360dev_init_irq,
38 .init_machine = mach_cc9p9360dev_init_machine,
39 .timer = &ns9xxx_timer,
40 .boot_params = 0x100,
41MACHINE_END
diff --git a/arch/arm/mach-ns9xxx/time.c b/arch/arm/mach-ns9xxx/time.c
new file mode 100644
index 000000000000..eec05f18714a
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/time.c
@@ -0,0 +1,88 @@
1/*
2 * arch/arm/mach-ns9xxx/time.c
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <linux/jiffies.h>
12#include <linux/interrupt.h>
13#include <linux/irq.h>
14#include <asm/arch-ns9xxx/regs-sys.h>
15#include <asm/arch-ns9xxx/clock.h>
16#include <asm/arch-ns9xxx/irqs.h>
17#include <asm/arch/system.h>
18#include "generic.h"
19
20#define TIMERCLOCKSELECT 64
21
22static u32 usecs_per_tick;
23
24static irqreturn_t
25ns9xxx_timer_interrupt(int irq, void *dev_id)
26{
27 write_seqlock(&xtime_lock);
28 timer_tick();
29 write_sequnlock(&xtime_lock);
30
31 return IRQ_HANDLED;
32}
33
34static unsigned long ns9xxx_timer_gettimeoffset(void)
35{
36 /* return the microseconds which have passed since the last interrupt
37 * was _serviced_. That is, if an interrupt is pending or the counter
38 * reloads, return one periode more. */
39
40 u32 counter1 = SYS_TR(0);
41 int pending = SYS_ISR & (1 << IRQ_TIMER0);
42 u32 counter2 = SYS_TR(0);
43 u32 elapsed;
44
45 if (pending || counter2 > counter1)
46 elapsed = 2 * SYS_TRC(0) - counter2;
47 else
48 elapsed = SYS_TRC(0) - counter1;
49
50 return (elapsed * usecs_per_tick) >> 16;
51
52}
53
54static struct irqaction ns9xxx_timer_irq = {
55 .name = "NS9xxx Timer Tick",
56 .flags = IRQF_DISABLED | IRQF_TIMER,
57 .handler = ns9xxx_timer_interrupt,
58};
59
60static void __init ns9xxx_timer_init(void)
61{
62 int tc;
63
64 usecs_per_tick =
65 SH_DIV(1000000 * TIMERCLOCKSELECT, ns9xxx_cpuclock(), 16);
66
67 /* disable timer */
68 if ((tc = SYS_TC(0)) & SYS_TCx_TEN)
69 SYS_TC(0) = tc & ~SYS_TCx_TEN;
70
71 SYS_TRC(0) = SH_DIV(ns9xxx_cpuclock(), (TIMERCLOCKSELECT * HZ), 0);
72
73 REGSET(tc, SYS_TCx, TEN, EN);
74 REGSET(tc, SYS_TCx, TLCS, DIV64); /* This must match TIMERCLOCKSELECT */
75 REGSET(tc, SYS_TCx, INTS, EN);
76 REGSET(tc, SYS_TCx, UDS, DOWN);
77 REGSET(tc, SYS_TCx, TDBG, STOP);
78 REGSET(tc, SYS_TCx, TSZ, 32);
79 REGSET(tc, SYS_TCx, REN, EN);
80 SYS_TC(0) = tc;
81
82 setup_irq(IRQ_TIMER0, &ns9xxx_timer_irq);
83}
84
85struct sys_timer ns9xxx_timer = {
86 .init = ns9xxx_timer_init,
87 .offset = ns9xxx_timer_gettimeoffset,
88};
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index 4c3de4008a43..165017de8d0d 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -16,7 +16,7 @@
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <asm/apm.h> 19#include <asm/apm-emulation.h>
20#include <asm/irq.h> 20#include <asm/irq.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/hardware.h> 22#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 9de1278d234f..b8cb79f899d5 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -36,6 +36,7 @@
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37 37
38#include <asm/arch/pxa-regs.h> 38#include <asm/arch/pxa-regs.h>
39#include <asm/arch/gpio.h>
39#include <asm/arch/udc.h> 40#include <asm/arch/udc.h>
40#include <asm/arch/pxafb.h> 41#include <asm/arch/pxafb.h>
41#include <asm/arch/mmc.h> 42#include <asm/arch/mmc.h>
@@ -106,13 +107,16 @@ unsigned long long sched_clock(void)
106 * Handy function to set GPIO alternate functions 107 * Handy function to set GPIO alternate functions
107 */ 108 */
108 109
109void pxa_gpio_mode(int gpio_mode) 110int pxa_gpio_mode(int gpio_mode)
110{ 111{
111 unsigned long flags; 112 unsigned long flags;
112 int gpio = gpio_mode & GPIO_MD_MASK_NR; 113 int gpio = gpio_mode & GPIO_MD_MASK_NR;
113 int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; 114 int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
114 int gafr; 115 int gafr;
115 116
117 if (gpio > PXA_LAST_GPIO)
118 return -EINVAL;
119
116 local_irq_save(flags); 120 local_irq_save(flags);
117 if (gpio_mode & GPIO_DFLT_LOW) 121 if (gpio_mode & GPIO_DFLT_LOW)
118 GPCR(gpio) = GPIO_bit(gpio); 122 GPCR(gpio) = GPIO_bit(gpio);
@@ -125,11 +129,33 @@ void pxa_gpio_mode(int gpio_mode)
125 gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); 129 gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
126 GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); 130 GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
127 local_irq_restore(flags); 131 local_irq_restore(flags);
132
133 return 0;
128} 134}
129 135
130EXPORT_SYMBOL(pxa_gpio_mode); 136EXPORT_SYMBOL(pxa_gpio_mode);
131 137
132/* 138/*
139 * Return GPIO level
140 */
141int pxa_gpio_get_value(unsigned gpio)
142{
143 return __gpio_get_value(gpio);
144}
145
146EXPORT_SYMBOL(pxa_gpio_get_value);
147
148/*
149 * Set output GPIO level
150 */
151void pxa_gpio_set_value(unsigned gpio, int value)
152{
153 __gpio_set_value(gpio, value);
154}
155
156EXPORT_SYMBOL(pxa_gpio_set_value);
157
158/*
133 * Routine to safely enable or disable a clock in the CKEN 159 * Routine to safely enable or disable a clock in the CKEN
134 */ 160 */
135void pxa_set_cken(int clock, int enable) 161void pxa_set_cken(int clock, int enable)
@@ -338,6 +364,27 @@ static struct platform_device i2c_device = {
338 .num_resources = ARRAY_SIZE(i2c_resources), 364 .num_resources = ARRAY_SIZE(i2c_resources),
339}; 365};
340 366
367#ifdef CONFIG_PXA27x
368static struct resource i2c_power_resources[] = {
369 {
370 .start = 0x40f00180,
371 .end = 0x40f001a3,
372 .flags = IORESOURCE_MEM,
373 }, {
374 .start = IRQ_PWRI2C,
375 .end = IRQ_PWRI2C,
376 .flags = IORESOURCE_IRQ,
377 },
378};
379
380static struct platform_device i2c_power_device = {
381 .name = "pxa2xx-i2c",
382 .id = 1,
383 .resource = i2c_power_resources,
384 .num_resources = ARRAY_SIZE(i2c_resources),
385};
386#endif
387
341void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 388void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
342{ 389{
343 i2c_device.dev.platform_data = info; 390 i2c_device.dev.platform_data = info;
@@ -392,6 +439,9 @@ static struct platform_device *devices[] __initdata = {
392 &stuart_device, 439 &stuart_device,
393 &pxaficp_device, 440 &pxaficp_device,
394 &i2c_device, 441 &i2c_device,
442#ifdef CONFIG_PXA27x
443 &i2c_power_device,
444#endif
395 &i2s_device, 445 &i2s_device,
396 &pxartc_device, 446 &pxartc_device,
397}; 447};
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index db6e8f56a75f..b1d8cfca245a 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -23,7 +23,7 @@
23 23
24#include <asm/hardware.h> 24#include <asm/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/apm.h> 26#include <asm/apm-emulation.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/sharpsl.h> 29#include <asm/arch/sharpsl.h>
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 40be833079c7..b97d543d9364 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -16,7 +16,7 @@
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <asm/apm.h> 19#include <asm/apm-emulation.h>
20#include <asm/irq.h> 20#include <asm/irq.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/hardware.h> 22#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index ee2beb400414..fc3b82a740a0 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -112,7 +112,7 @@ static struct clocksource clocksource_pxa = {
112 .read = pxa_get_cycles, 112 .read = pxa_get_cycles,
113 .mask = CLOCKSOURCE_MASK(32), 113 .mask = CLOCKSOURCE_MASK(32),
114 .shift = 20, 114 .shift = 20,
115 .is_continuous = 1, 115 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
116}; 116};
117 117
118static void __init pxa_timer_init(void) 118static void __init pxa_timer_init(void)
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index 17f5f4439fe7..35156ca39df7 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -10,10 +10,21 @@ config MACH_REALVIEW_EB
10config REALVIEW_MPCORE 10config REALVIEW_MPCORE
11 bool "Support MPcore tile" 11 bool "Support MPcore tile"
12 depends on MACH_REALVIEW_EB 12 depends on MACH_REALVIEW_EB
13 select CACHE_L2X0
13 help 14 help
14 Enable support for the MPCore tile on the Realview platform. 15 Enable support for the MPCore tile on the Realview platform.
15 Since there are device address and interrupt differences, a 16 Since there are device address and interrupt differences, a
16 kernel built with this option enabled is not compatible with 17 kernel built with this option enabled is not compatible with
17 other tiles. 18 other tiles.
18 19
20config REALVIEW_MPCORE_REVB
21 bool "Support MPcore RevB tile"
22 depends on REALVIEW_MPCORE
23 default n
24 help
25 Enable support for the MPCore RevB tile on the Realview platform.
26 Since there are device address differences, a
27 kernel built with this option enabled is not compatible with
28 other tiles.
29
19endmenu 30endmenu
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index b8484e15dacb..fce3596f9950 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -52,13 +52,14 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
52 * core (e.g. timer irq), then they will not have been enabled 52 * core (e.g. timer irq), then they will not have been enabled
53 * for us: do so 53 * for us: do so
54 */ 54 */
55 gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE)); 55 gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE));
56 56
57 /* 57 /*
58 * let the primary processor know we're out of the 58 * let the primary processor know we're out of the
59 * pen, then head off into the C entry point 59 * pen, then head off into the C entry point
60 */ 60 */
61 pen_release = -1; 61 pen_release = -1;
62 smp_wmb();
62 63
63 /* 64 /*
64 * Synchronise with the boot thread. 65 * Synchronise with the boot thread.
@@ -102,6 +103,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
102 103
103 timeout = jiffies + (1 * HZ); 104 timeout = jiffies + (1 * HZ);
104 while (time_before(jiffies, timeout)) { 105 while (time_before(jiffies, timeout)) {
106 smp_rmb();
105 if (pen_release == -1) 107 if (pen_release == -1)
106 break; 108 break;
107 109
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 9741b4d3c9cf..3dba666151db 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -31,6 +31,7 @@
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/hardware/gic.h> 32#include <asm/hardware/gic.h>
33#include <asm/hardware/icst307.h> 33#include <asm/hardware/icst307.h>
34#include <asm/hardware/cache-l2x0.h>
34 35
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
@@ -57,7 +58,26 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
57 .pfn = __phys_to_pfn(REALVIEW_GIC_DIST_BASE), 58 .pfn = __phys_to_pfn(REALVIEW_GIC_DIST_BASE),
58 .length = SZ_4K, 59 .length = SZ_4K,
59 .type = MT_DEVICE, 60 .type = MT_DEVICE,
61 },
62#ifdef CONFIG_REALVIEW_MPCORE
63 {
64 .virtual = IO_ADDRESS(REALVIEW_GIC1_CPU_BASE),
65 .pfn = __phys_to_pfn(REALVIEW_GIC1_CPU_BASE),
66 .length = SZ_4K,
67 .type = MT_DEVICE,
68 }, {
69 .virtual = IO_ADDRESS(REALVIEW_GIC1_DIST_BASE),
70 .pfn = __phys_to_pfn(REALVIEW_GIC1_DIST_BASE),
71 .length = SZ_4K,
72 .type = MT_DEVICE,
60 }, { 73 }, {
74 .virtual = IO_ADDRESS(REALVIEW_MPCORE_L220_BASE),
75 .pfn = __phys_to_pfn(REALVIEW_MPCORE_L220_BASE),
76 .length = SZ_8K,
77 .type = MT_DEVICE,
78 },
79#endif
80 {
61 .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), 81 .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE),
62 .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE), 82 .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE),
63 .length = SZ_4K, 83 .length = SZ_4K,
@@ -138,19 +158,29 @@ static void __init gic_init_irq(void)
138#ifdef CONFIG_REALVIEW_MPCORE 158#ifdef CONFIG_REALVIEW_MPCORE
139 unsigned int pldctrl; 159 unsigned int pldctrl;
140 writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK)); 160 writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK));
141 pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + 0xd8); 161 pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + REALVIEW_MPCORE_SYS_PLD_CTRL1);
142 pldctrl |= 0x00800000; /* New irq mode */ 162 pldctrl |= 0x00800000; /* New irq mode */
143 writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + 0xd8); 163 writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + REALVIEW_MPCORE_SYS_PLD_CTRL1);
144 writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); 164 writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
145#endif 165#endif
146 gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE)); 166 gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29);
147 gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE)); 167 gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE));
168#ifdef CONFIG_REALVIEW_MPCORE
169 gic_dist_init(1, __io_address(REALVIEW_GIC1_DIST_BASE), 64);
170 gic_cpu_init(1, __io_address(REALVIEW_GIC1_CPU_BASE));
171 gic_cascade_irq(1, IRQ_EB_IRQ1);
172#endif
148} 173}
149 174
150static void __init realview_eb_init(void) 175static void __init realview_eb_init(void)
151{ 176{
152 int i; 177 int i;
153 178
179#ifdef CONFIG_REALVIEW_MPCORE
180 /* 1MB (128KB/way), 8-way associativity, evmon/parity/share enabled
181 * Bits: .... ...0 0111 1001 0000 .... .... .... */
182 l2x0_init(__io_address(REALVIEW_MPCORE_L220_BASE), 0x00790000, 0xfe000fff);
183#endif
154 clk_register(&realview_clcd_clk); 184 clk_register(&realview_clcd_clk);
155 185
156 platform_device_register(&realview_flash_device); 186 platform_device_register(&realview_flash_device);
diff --git a/arch/arm/mach-s3c2400/Kconfig b/arch/arm/mach-s3c2400/Kconfig
new file mode 100644
index 000000000000..deab0722836e
--- /dev/null
+++ b/arch/arm/mach-s3c2400/Kconfig
@@ -0,0 +1,13 @@
1# arch/arm/mach-s3c2400/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7
8
9menu "S3C2400 Machines"
10
11
12endmenu
13
diff --git a/arch/arm/mach-s3c2400/Makefile b/arch/arm/mach-s3c2400/Makefile
new file mode 100644
index 000000000000..7e23f4e13766
--- /dev/null
+++ b/arch/arm/mach-s3c2400/Makefile
@@ -0,0 +1,15 @@
1# arch/arm/mach-s3c2400/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2400) += gpio.o
13
14# Machine support
15
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2400/gpio.c
index 1576d01d5f82..758e160410e9 100644
--- a/arch/arm/mach-s3c2410/s3c2400-gpio.c
+++ b/arch/arm/mach-s3c2400/gpio.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2400-gpio.c 1/* linux/arch/arm/mach-s3c2400/gpio.c
2 * 2 *
3 * Copyright (c) 2006 Lucas Correia Villa Real <lucasvr@gobolinux.org> 3 * Copyright (c) 2006 Lucas Correia Villa Real <lucasvr@gobolinux.org>
4 * 4 *
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index eb4ec411312b..d4b013b283c3 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -1,54 +1,51 @@
1if ARCH_S3C2410 1# arch/arm/mach-s3c2410/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
2 6
3menu "S3C24XX Implementations" 7config CPU_S3C2410
8 bool
9 depends on ARCH_S3C2410
10 select S3C2410_CLOCK
11 select S3C2410_GPIO
12 select S3C2410_PM if PM
13 help
14 Support for S3C2410 and S3C2410A family from the S3C24XX line
15 of Samsung Mobile CPUs.
4 16
5config MACH_AML_M5900 17config CPU_S3C2410_DMA
6 bool "AML M5900 Series" 18 bool
7 select CPU_S3C2410 19 depends on S3C2410_DMA && (CPU_S3C2410 || CPU_S3C2442)
8 select PM_SIMTEC if PM 20 default y if CPU_S3C2410 || CPU_S3C2442
9 help 21 help
10 Say Y here if you are using the American Microsystems M5900 Series 22 DMA device selection for S3C2410 and compatible CPUs
11 <http://www.amltd.com>
12 23
13config MACH_ANUBIS 24config S3C2410_PM
14 bool "Simtec Electronics ANUBIS" 25 bool
15 select CPU_S3C2440
16 select PM_SIMTEC if PM
17 help 26 help
18 Say Y here if you are using the Simtec Electronics ANUBIS 27 Power Management code common to S3C2410 and better
19 development system
20 28
21config MACH_OSIRIS 29config S3C2410_GPIO
22 bool "Simtec IM2440D20 (OSIRIS) module" 30 bool
23 select CPU_S3C2440
24 select PM_SIMTEC if PM
25 help 31 help
26 Say Y here if you are using the Simtec IM2440D20 module, also 32 GPIO code for S3C2410 and similar processors
27 known as the Osiris.
28 33
29config ARCH_BAST 34config S3C2410_CLOCK
30 bool "Simtec Electronics BAST (EB2410ITX)" 35 bool
31 select CPU_S3C2410
32 select PM_SIMTEC if PM
33 select ISA
34 help 36 help
35 Say Y here if you are using the Simtec Electronics EB2410ITX 37 Clock code for the S3C2410, and similar processors
36 development board (also known as BAST)
37 38
38 Product page: <http://www.simtec.co.uk/products/EB2410ITX/>.
39 39
40config BAST_PC104_IRQ 40menu "S3C2410 Machines"
41 bool "BAST PC104 IRQ support"
42 depends on ARCH_BAST
43 default y
44 help
45 Say Y here to enable the PC104 IRQ routing on the
46 Simtec BAST (EB2410ITX)
47 41
48config PM_H1940 42config ARCH_SMDK2410
49 bool 43 bool "SMDK2410/A9M2410"
44 select CPU_S3C2410
45 select MACH_SMDK
50 help 46 help
51 Internal node for H1940 and related PM 47 Say Y here if you are using the SMDK2410 or the derived module A9M2410
48 <http://www.fsforth.de>
52 49
53config ARCH_H1940 50config ARCH_H1940
54 bool "IPAQ H1940" 51 bool "IPAQ H1940"
@@ -57,7 +54,10 @@ config ARCH_H1940
57 help 54 help
58 Say Y here if you are using the HP IPAQ H1940 55 Say Y here if you are using the HP IPAQ H1940
59 56
60 <http://www.handhelds.org/projects/h1940.html>. 57config PM_H1940
58 bool
59 help
60 Internal node for H1940 and related PM
61 61
62config MACH_N30 62config MACH_N30
63 bool "Acer N30" 63 bool "Acer N30"
@@ -65,53 +65,36 @@ config MACH_N30
65 help 65 help
66 Say Y here if you are using the Acer N30 66 Say Y here if you are using the Acer N30
67 67
68 <http://zoo.weinigel.se/n30>. 68config ARCH_BAST
69 69 bool "Simtec Electronics BAST (EB2410ITX)"
70config MACH_SMDK
71 bool
72 help
73 Common machine code for SMDK2410 and SMDK2440
74
75config ARCH_SMDK2410
76 bool "SMDK2410/A9M2410"
77 select CPU_S3C2410 70 select CPU_S3C2410
78 select MACH_SMDK 71 select PM_SIMTEC if PM
72 select ISA
79 help 73 help
80 Say Y here if you are using the SMDK2410 or the derived module A9M2410 74 Say Y here if you are using the Simtec Electronics EB2410ITX
81 <http://www.fsforth.de> 75 development board (also known as BAST)
82 76
83config ARCH_S3C2440 77config MACH_OTOM
84 bool "SMDK2440" 78 bool "NexVision OTOM Board"
85 select CPU_S3C2440 79 select CPU_S3C2410
86 select MACH_SMDK
87 help 80 help
88 Say Y here if you are using the SMDK2440. 81 Say Y here if you are using the Nex Vision OTOM board
89
90config SMDK2440_CPU2440
91 bool "SMDK2440 with S3C2440 CPU module"
92 depends on ARCH_S3C2440
93 default y if ARCH_S3C2440
94 select CPU_S3C2440
95
96config SMDK2440_CPU2442
97 bool "SMDM2440 with S3C2442 CPU module"
98 depends on ARCH_S3C2440
99 select CPU_S3C2442
100 82
101config MACH_S3C2413 83config MACH_AML_M5900
102 bool 84 bool "AML M5900 Series"
85 select CPU_S3C2410
86 select PM_SIMTEC if PM
103 help 87 help
104 Internal node for S3C2413 version of SMDK2413, so that 88 Say Y here if you are using the American Microsystems M5900 Series
105 machine_is_s3c2413() will work when MACH_SMDK2413 is 89 <http://www.amltd.com>
106 selected
107 90
108config MACH_SMDK2413 91config BAST_PC104_IRQ
109 bool "SMDK2413" 92 bool "BAST PC104 IRQ support"
110 select CPU_S3C2412 93 depends on ARCH_BAST
111 select MACH_S3C2413 94 default y
112 select MACH_SMDK
113 help 95 help
114 Say Y here if you are using an SMDK2413 96 Say Y here to enable the PC104 IRQ routing on the
97 Simtec BAST (EB2410ITX)
115 98
116config MACH_VR1000 99config MACH_VR1000
117 bool "Thorcom VR1000" 100 bool "Thorcom VR1000"
@@ -120,202 +103,11 @@ config MACH_VR1000
120 help 103 help
121 Say Y here if you are using the Thorcom VR1000 board. 104 Say Y here if you are using the Thorcom VR1000 board.
122 105
123 This linux port is currently being maintained by Simtec, on behalf 106config MACH_QT2410
124 of Thorcom. Any queries, please contact Thorcom first. 107 bool "QT2410"
125 108 select CPU_S3C2410
126config MACH_RX3715
127 bool "HP iPAQ rx3715"
128 select CPU_S3C2440
129 select PM_H1940 if PM
130 help
131 Say Y here if you are using the HP iPAQ rx3715.
132
133 See <http://www.handhelds.org/projects/rx3715.html> for more
134 information on this project
135
136config MACH_OTOM
137 bool "NexVision OTOM Board"
138 select CPU_S3C2410
139 help
140 Say Y here if you are using the Nex Vision OTOM board
141
142config MACH_NEXCODER_2440
143 bool "NexVision NEXCODER 2440 Light Board"
144 select CPU_S3C2440
145 help
146 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
147
148config MACH_VSTMS
149 bool "VMSTMS"
150 select CPU_S3C2412
151 help 109 help
152 Say Y here if you are using an VSTMS board 110 Say Y here if you are using the Armzone QT2410
153 111
154endmenu 112endmenu
155 113
156config S3C2410_CLOCK
157 bool
158 help
159 Clock code for the S3C2410, and similar processors
160
161config S3C2410_PM
162 bool
163 help
164 Power Management code common to S3C2410 and better
165
166config CPU_S3C2410_DMA
167 bool
168 depends on S3C2410_DMA && (CPU_S3C2410 || CPU_S3C2442)
169 default y if CPU_S3C2410 || CPU_S3C2442
170 help
171 DMA device selection for S3C2410 and compatible CPUs
172
173config CPU_S3C2410
174 bool
175 depends on ARCH_S3C2410
176 select S3C2410_CLOCK
177 select S3C2410_PM if PM
178 help
179 Support for S3C2410 and S3C2410A family from the S3C24XX line
180 of Samsung Mobile CPUs.
181
182# internal node to signify if we are only dealing with an S3C2412
183
184config CPU_S3C2412_ONLY
185 bool
186 depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \
187 !CPU_S3C2440 && !CPU_S3C2442 && CPU_S3C2412
188 default y if CPU_S3C2412
189
190config S3C2412_PM
191 bool
192 help
193 Internal config node to apply S3C2412 power management
194
195config CPU_S3C2412
196 bool
197 depends on ARCH_S3C2410
198 select S3C2412_PM if PM
199 help
200 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
201
202config CPU_S3C244X
203 bool
204 depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442)
205 help
206 Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems.
207
208config CPU_S3C2440
209 bool
210 depends on ARCH_S3C2410
211 select S3C2410_CLOCK
212 select S3C2410_PM if PM
213 select CPU_S3C244X
214 help
215 Support for S3C2440 Samsung Mobile CPU based systems.
216
217config CPU_S3C2442
218 bool
219 depends on ARCH_S3C2420
220 select S3C2410_CLOCK
221 select S3C2410_PM if PM
222 select CPU_S3C244X
223 help
224 Support for S3C2442 Samsung Mobile CPU based systems.
225
226comment "S3C2410 Boot"
227
228config S3C2410_BOOT_WATCHDOG
229 bool "S3C2410 Initialisation watchdog"
230 depends on ARCH_S3C2410 && S3C2410_WATCHDOG
231 help
232 Say y to enable the watchdog during the kernel decompression
233 stage. If the kernel fails to uncompress, then the watchdog
234 will trigger a reset and the system should restart.
235
236 Although this uses the same hardware unit as the kernel watchdog
237 driver, it is not a replacement for it. If you use this option,
238 you will have to use the watchdg driver to either stop the timeout
239 or restart it. If you do not, then your kernel will reboot after
240 startup.
241
242 The driver uses a fixed timeout value, so the exact time till the
243 system resets depends on the value of PCLK. The timeout on an
244 200MHz s3c2410 should be about 30 seconds.
245
246config S3C2410_BOOT_ERROR_RESET
247 bool "S3C2410 Reboot on decompression error"
248 depends on ARCH_S3C2410
249 help
250 Say y here to use the watchdog to reset the system if the
251 kernel decompressor detects an error during decompression.
252
253
254comment "S3C2410 Setup"
255
256config S3C2410_DMA
257 bool "S3C2410 DMA support"
258 depends on ARCH_S3C2410
259 help
260 S3C2410 DMA support. This is needed for drivers like sound which
261 use the S3C2410's DMA system to move data to and from the
262 peripheral blocks.
263
264config S3C2410_DMA_DEBUG
265 bool "S3C2410 DMA support debug"
266 depends on ARCH_S3C2410 && S3C2410_DMA
267 help
268 Enable debugging output for the DMA code. This option sends info
269 to the kernel log, at priority KERN_DEBUG.
270
271 Note, it is easy to create and fill the log buffer in a small
272 amount of time, as well as using an significant percentage of
273 the CPU time doing so.
274
275
276config S3C2410_PM_DEBUG
277 bool "S3C2410 PM Suspend debug"
278 depends on ARCH_S3C2410 && PM
279 help
280 Say Y here if you want verbose debugging from the PM Suspend and
281 Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
282 for more information.
283
284config S3C2410_PM_CHECK
285 bool "S3C2410 PM Suspend Memory CRC"
286 depends on ARCH_S3C2410 && PM && CRC32
287 help
288 Enable the PM code's memory area checksum over sleep. This option
289 will generate CRCs of all blocks of memory, and store them before
290 going to sleep. The blocks are then checked on resume for any
291 errors.
292
293config S3C2410_PM_CHECK_CHUNKSIZE
294 int "S3C2410 PM Suspend CRC Chunksize (KiB)"
295 depends on ARCH_S3C2410 && PM && S3C2410_PM_CHECK
296 default 64
297 help
298 Set the chunksize in Kilobytes of the CRC for checking memory
299 corruption over suspend and resume. A smaller value will mean that
300 the CRC data block will take more memory, but wil identify any
301 faults with better precision.
302
303config PM_SIMTEC
304 bool
305 help
306 Common power management code for systems that are
307 compatible with the Simtec style of power management
308
309config S3C2410_LOWLEVEL_UART_PORT
310 int "S3C2410 UART to use for low-level messages"
311 default 0
312 help
313 Choice of which UART port to use for the low-level messages,
314 such as the `Uncompressing...` at start time. The value of
315 this configuration should be between zero and two. The port
316 must have been initialised by the boot-loader before use.
317
318 Note, this does not affect the port used by the debug messages,
319 which is a separate configuration.
320
321endif
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 27663e28cc88..9a3d3d24c084 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -1,92 +1,31 @@
1 1# arch/arm/mach-s3c2410/Makefile
2# 2#
3# Makefile for the linux kernel. 3# Copyright 2007 Simtec Electronics
4# 4#
5# Licensed under GPLv2
5 6
6# Object file lists. 7obj-y :=
7 8obj-m :=
8obj-y := cpu.o irq.o time.o gpio.o clock.o devs.o 9obj-n :=
9obj-m := 10obj- :=
10obj-n :=
11obj- :=
12obj-dma-y :=
13obj-dma-n :=
14
15# DMA
16obj-$(CONFIG_S3C2410_DMA) += dma.o
17
18# S3C2400 support files
19obj-$(CONFIG_CPU_S3C2400) += s3c2400-gpio.o
20
21# S3C2410 support files
22 11
23obj-$(CONFIG_CPU_S3C2410) += s3c2410.o 12obj-$(CONFIG_CPU_S3C2410) += s3c2410.o
24obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o 13obj-$(CONFIG_CPU_S3C2410) += irq.o
25obj-$(CONFIG_CPU_S3C2410) += s3c2410-irq.o 14obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o
26 15obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o
27obj-$(CONFIG_S3C2410_PM) += s3c2410-pm.o s3c2410-sleep.o 16obj-$(CONFIG_S3C2410_PM) += pm.o sleep.o
28obj-$(CONFIG_CPU_S3C2410_DMA) += s3c2410-dma.o 17obj-$(CONFIG_S3C2410_GPIO) += gpio.o
29 18obj-$(CONFIG_S3C2410_CLOCK) += clock.o
30# Power Management support
31
32obj-$(CONFIG_PM) += pm.o sleep.o
33obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
34obj-$(CONFIG_PM_H1940) += pm-h1940.o
35
36# S3C2412 support
37obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
38obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o
39obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o
40obj-dma-$(CONFIG_CPU_S3C2412) += s3c2412-dma.o
41
42obj-$(CONFIG_S3C2412_PM) += s3c2412-pm.o
43
44#
45# S3C244X support
46
47obj-$(CONFIG_CPU_S3C244X) += s3c244x.o
48obj-$(CONFIG_CPU_S3C244X) += s3c244x-irq.o
49
50# Clock control
51
52obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o
53
54# S3C2440 support
55
56obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o
57obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o
58obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o
59obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o
60obj-dma-$(CONFIG_CPU_S3C2440) += s3c2440-dma.o
61 19
62# S3C2442 support 20# Machine support
63 21
64obj-$(CONFIG_CPU_S3C2442) += s3c2442.o 22obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o
65obj-$(CONFIG_CPU_S3C2442) += s3c2442-clock.o
66
67# bast extras
68
69obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
70
71# merge in dma objects
72
73obj-y += $(obj-dma-y)
74
75# machine specific support
76
77obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
78obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
79obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o
80obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
81obj-$(CONFIG_ARCH_H1940) += mach-h1940.o 23obj-$(CONFIG_ARCH_H1940) += mach-h1940.o
24obj-$(CONFIG_PM_H1940) += pm-h1940.o
82obj-$(CONFIG_MACH_N30) += mach-n30.o 25obj-$(CONFIG_MACH_N30) += mach-n30.o
83obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o 26obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
84obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
85obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o
86obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
87obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o
88obj-$(CONFIG_MACH_OTOM) += mach-otom.o 27obj-$(CONFIG_MACH_OTOM) += mach-otom.o
89obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o 28obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
90obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o 29obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
91 30obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
92obj-$(CONFIG_MACH_SMDK) += common-smdk.o \ No newline at end of file 31obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c
index 379efe70778c..daeba427d781 100644
--- a/arch/arm/mach-s3c2410/bast-irq.c
+++ b/arch/arm/mach-s3c2410/bast-irq.c
@@ -39,7 +39,7 @@
39#include <asm/arch/bast-map.h> 39#include <asm/arch/bast-map.h>
40#include <asm/arch/bast-irq.h> 40#include <asm/arch/bast-irq.h>
41 41
42#include "irq.h" 42#include <asm/plat-s3c24xx/irq.h>
43 43
44#if 0 44#if 0
45#include <asm/debug-ll.h> 45#include <asm/debug-ll.h>
diff --git a/arch/arm/mach-s3c2410/bast.h b/arch/arm/mach-s3c2410/bast.h
index e5d03311752c..e98543742eb9 100644
--- a/arch/arm/mach-s3c2410/bast.h
+++ b/arch/arm/mach-s3c2410/bast.h
@@ -1,2 +1,2 @@
1 1/* linux/arch/arm/mach-s3c2410/bast.h
2extern void bast_init_irq(void); 2extern void bast_init_irq(void);
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index e13fb6778890..5b4831c4c1d8 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -1,15 +1,9 @@
1/* linux/arch/arm/mach-s3c2410/clock.c 1/* linux/arch/arm/mach-s3c2410/clock.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C24XX Core clock control support 6 * S3C2410,S3C2440,S3C2442 Clock control support
7 *
8 * Based on, and code from linux/arch/arm/mach-versatile/clock.c
9 **
10 ** Copyright (C) 2004 ARM Limited.
11 ** Written by Deep Blue Solutions Limited.
12 *
13 * 7 *
14 * 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
15 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -32,418 +26,251 @@
32#include <linux/list.h> 26#include <linux/list.h>
33#include <linux/errno.h> 27#include <linux/errno.h>
34#include <linux/err.h> 28#include <linux/err.h>
35#include <linux/platform_device.h>
36#include <linux/sysdev.h> 29#include <linux/sysdev.h>
37#include <linux/interrupt.h>
38#include <linux/ioport.h>
39#include <linux/clk.h> 30#include <linux/clk.h>
40#include <linux/mutex.h> 31#include <linux/mutex.h>
41#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/serial_core.h>
34
35#include <asm/mach/map.h>
42 36
43#include <asm/hardware.h> 37#include <asm/hardware.h>
44#include <asm/irq.h>
45#include <asm/io.h> 38#include <asm/io.h>
46 39
40#include <asm/arch/regs-serial.h>
47#include <asm/arch/regs-clock.h> 41#include <asm/arch/regs-clock.h>
48#include <asm/arch/regs-gpio.h> 42#include <asm/arch/regs-gpio.h>
49 43
50#include "clock.h" 44#include <asm/plat-s3c24xx/s3c2410.h>
51#include "cpu.h" 45#include <asm/plat-s3c24xx/clock.h>
52 46#include <asm/plat-s3c24xx/cpu.h>
53/* clock information */
54 47
55static LIST_HEAD(clocks); 48int s3c2410_clkcon_enable(struct clk *clk, int enable)
56
57DEFINE_MUTEX(clocks_mutex);
58
59/* enable and disable calls for use with the clk struct */
60
61static int clk_null_enable(struct clk *clk, int enable)
62{ 49{
63 return 0; 50 unsigned int clocks = clk->ctrlbit;
64} 51 unsigned long clkcon;
65
66/* Clock API calls */
67 52
68struct clk *clk_get(struct device *dev, const char *id) 53 clkcon = __raw_readl(S3C2410_CLKCON);
69{
70 struct clk *p;
71 struct clk *clk = ERR_PTR(-ENOENT);
72 int idno;
73 54
74 if (dev == NULL || dev->bus != &platform_bus_type) 55 if (enable)
75 idno = -1; 56 clkcon |= clocks;
76 else 57 else
77 idno = to_platform_device(dev)->id; 58 clkcon &= ~clocks;
78
79 mutex_lock(&clocks_mutex);
80
81 list_for_each_entry(p, &clocks, list) {
82 if (p->id == idno &&
83 strcmp(id, p->name) == 0 &&
84 try_module_get(p->owner)) {
85 clk = p;
86 break;
87 }
88 }
89
90 /* check for the case where a device was supplied, but the
91 * clock that was being searched for is not device specific */
92
93 if (IS_ERR(clk)) {
94 list_for_each_entry(p, &clocks, list) {
95 if (p->id == -1 && strcmp(id, p->name) == 0 &&
96 try_module_get(p->owner)) {
97 clk = p;
98 break;
99 }
100 }
101 }
102 59
103 mutex_unlock(&clocks_mutex); 60 /* ensure none of the special function bits set */
104 return clk; 61 clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER);
105}
106 62
107void clk_put(struct clk *clk) 63 __raw_writel(clkcon, S3C2410_CLKCON);
108{
109 module_put(clk->owner);
110}
111 64
112int clk_enable(struct clk *clk)
113{
114 if (IS_ERR(clk) || clk == NULL)
115 return -EINVAL;
116
117 clk_enable(clk->parent);
118
119 mutex_lock(&clocks_mutex);
120
121 if ((clk->usage++) == 0)
122 (clk->enable)(clk, 1);
123
124 mutex_unlock(&clocks_mutex);
125 return 0; 65 return 0;
126} 66}
127 67
128void clk_disable(struct clk *clk) 68static int s3c2410_upll_enable(struct clk *clk, int enable)
129{
130 if (IS_ERR(clk) || clk == NULL)
131 return;
132
133 mutex_lock(&clocks_mutex);
134
135 if ((--clk->usage) == 0)
136 (clk->enable)(clk, 0);
137
138 mutex_unlock(&clocks_mutex);
139 clk_disable(clk->parent);
140}
141
142
143unsigned long clk_get_rate(struct clk *clk)
144{
145 if (IS_ERR(clk))
146 return 0;
147
148 if (clk->rate != 0)
149 return clk->rate;
150
151 if (clk->get_rate != NULL)
152 return (clk->get_rate)(clk);
153
154 if (clk->parent != NULL)
155 return clk_get_rate(clk->parent);
156
157 return clk->rate;
158}
159
160long clk_round_rate(struct clk *clk, unsigned long rate)
161{
162 if (!IS_ERR(clk) && clk->round_rate)
163 return (clk->round_rate)(clk, rate);
164
165 return rate;
166}
167
168int clk_set_rate(struct clk *clk, unsigned long rate)
169{
170 int ret;
171
172 if (IS_ERR(clk))
173 return -EINVAL;
174
175 mutex_lock(&clocks_mutex);
176 ret = (clk->set_rate)(clk, rate);
177 mutex_unlock(&clocks_mutex);
178
179 return ret;
180}
181
182struct clk *clk_get_parent(struct clk *clk)
183{ 69{
184 return clk->parent; 70 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
185} 71 unsigned long orig = clkslow;
186
187int clk_set_parent(struct clk *clk, struct clk *parent)
188{
189 int ret = 0;
190
191 if (IS_ERR(clk))
192 return -EINVAL;
193
194 mutex_lock(&clocks_mutex);
195
196 if (clk->set_parent)
197 ret = (clk->set_parent)(clk, parent);
198
199 mutex_unlock(&clocks_mutex);
200
201 return ret;
202}
203
204EXPORT_SYMBOL(clk_get);
205EXPORT_SYMBOL(clk_put);
206EXPORT_SYMBOL(clk_enable);
207EXPORT_SYMBOL(clk_disable);
208EXPORT_SYMBOL(clk_get_rate);
209EXPORT_SYMBOL(clk_round_rate);
210EXPORT_SYMBOL(clk_set_rate);
211EXPORT_SYMBOL(clk_get_parent);
212EXPORT_SYMBOL(clk_set_parent);
213
214/* base clocks */
215
216struct clk clk_xtal = {
217 .name = "xtal",
218 .id = -1,
219 .rate = 0,
220 .parent = NULL,
221 .ctrlbit = 0,
222};
223
224struct clk clk_mpll = {
225 .name = "mpll",
226 .id = -1,
227};
228
229struct clk clk_upll = {
230 .name = "upll",
231 .id = -1,
232 .parent = NULL,
233 .ctrlbit = 0,
234};
235
236struct clk clk_f = {
237 .name = "fclk",
238 .id = -1,
239 .rate = 0,
240 .parent = &clk_mpll,
241 .ctrlbit = 0,
242};
243
244struct clk clk_h = {
245 .name = "hclk",
246 .id = -1,
247 .rate = 0,
248 .parent = NULL,
249 .ctrlbit = 0,
250};
251
252struct clk clk_p = {
253 .name = "pclk",
254 .id = -1,
255 .rate = 0,
256 .parent = NULL,
257 .ctrlbit = 0,
258};
259
260struct clk clk_usb_bus = {
261 .name = "usb-bus",
262 .id = -1,
263 .rate = 0,
264 .parent = &clk_upll,
265};
266
267/* clocks that could be registered by external code */
268
269static int s3c24xx_dclk_enable(struct clk *clk, int enable)
270{
271 unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON);
272 72
273 if (enable) 73 if (enable)
274 dclkcon |= clk->ctrlbit; 74 clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF;
275 else 75 else
276 dclkcon &= ~clk->ctrlbit; 76 clkslow |= S3C2410_CLKSLOW_UCLK_OFF;
277 77
278 __raw_writel(dclkcon, S3C24XX_DCLKCON); 78 __raw_writel(clkslow, S3C2410_CLKSLOW);
279 79
280 return 0; 80 /* if we started the UPLL, then allow to settle */
281}
282 81
283static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) 82 if (enable && (orig & S3C2410_CLKSLOW_UCLK_OFF))
284{ 83 udelay(200);
285 unsigned long dclkcon;
286 unsigned int uclk;
287
288 if (parent == &clk_upll)
289 uclk = 1;
290 else if (parent == &clk_p)
291 uclk = 0;
292 else
293 return -EINVAL;
294
295 clk->parent = parent;
296
297 dclkcon = __raw_readl(S3C24XX_DCLKCON);
298
299 if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) {
300 if (uclk)
301 dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK;
302 else
303 dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK;
304 } else {
305 if (uclk)
306 dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK;
307 else
308 dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK;
309 }
310
311 __raw_writel(dclkcon, S3C24XX_DCLKCON);
312 84
313 return 0; 85 return 0;
314} 86}
315 87
316 88/* standard clock definitions */
317static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) 89
318{ 90static struct clk init_clocks_disable[] = {
319 unsigned long mask; 91 {
320 unsigned long source; 92 .name = "nand",
321 93 .id = -1,
322 /* calculate the MISCCR setting for the clock */ 94 .parent = &clk_h,
323 95 .enable = s3c2410_clkcon_enable,
324 if (parent == &clk_xtal) 96 .ctrlbit = S3C2410_CLKCON_NAND,
325 source = S3C2410_MISCCR_CLK0_MPLL; 97 }, {
326 else if (parent == &clk_upll) 98 .name = "sdi",
327 source = S3C2410_MISCCR_CLK0_UPLL; 99 .id = -1,
328 else if (parent == &clk_f) 100 .parent = &clk_p,
329 source = S3C2410_MISCCR_CLK0_FCLK; 101 .enable = s3c2410_clkcon_enable,
330 else if (parent == &clk_h) 102 .ctrlbit = S3C2410_CLKCON_SDI,
331 source = S3C2410_MISCCR_CLK0_HCLK; 103 }, {
332 else if (parent == &clk_p) 104 .name = "adc",
333 source = S3C2410_MISCCR_CLK0_PCLK; 105 .id = -1,
334 else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) 106 .parent = &clk_p,
335 source = S3C2410_MISCCR_CLK0_DCLK0; 107 .enable = s3c2410_clkcon_enable,
336 else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1) 108 .ctrlbit = S3C2410_CLKCON_ADC,
337 source = S3C2410_MISCCR_CLK0_DCLK0; 109 }, {
338 else 110 .name = "i2c",
339 return -EINVAL; 111 .id = -1,
340 112 .parent = &clk_p,
341 clk->parent = parent; 113 .enable = s3c2410_clkcon_enable,
342 114 .ctrlbit = S3C2410_CLKCON_IIC,
343 if (clk == &s3c24xx_dclk0) 115 }, {
344 mask = S3C2410_MISCCR_CLK0_MASK; 116 .name = "iis",
345 else { 117 .id = -1,
346 source <<= 4; 118 .parent = &clk_p,
347 mask = S3C2410_MISCCR_CLK1_MASK; 119 .enable = s3c2410_clkcon_enable,
120 .ctrlbit = S3C2410_CLKCON_IIS,
121 }, {
122 .name = "spi",
123 .id = -1,
124 .parent = &clk_p,
125 .enable = s3c2410_clkcon_enable,
126 .ctrlbit = S3C2410_CLKCON_SPI,
348 } 127 }
349
350 s3c2410_modify_misccr(mask, source);
351 return 0;
352}
353
354/* external clock definitions */
355
356struct clk s3c24xx_dclk0 = {
357 .name = "dclk0",
358 .id = -1,
359 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
360 .enable = s3c24xx_dclk_enable,
361 .set_parent = s3c24xx_dclk_setparent,
362};
363
364struct clk s3c24xx_dclk1 = {
365 .name = "dclk1",
366 .id = -1,
367 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
368 .enable = s3c24xx_dclk_enable,
369 .set_parent = s3c24xx_dclk_setparent,
370}; 128};
371 129
372struct clk s3c24xx_clkout0 = { 130static struct clk init_clocks[] = {
373 .name = "clkout0", 131 {
374 .id = -1, 132 .name = "lcd",
375 .set_parent = s3c24xx_clkout_setparent, 133 .id = -1,
134 .parent = &clk_h,
135 .enable = s3c2410_clkcon_enable,
136 .ctrlbit = S3C2410_CLKCON_LCDC,
137 }, {
138 .name = "gpio",
139 .id = -1,
140 .parent = &clk_p,
141 .enable = s3c2410_clkcon_enable,
142 .ctrlbit = S3C2410_CLKCON_GPIO,
143 }, {
144 .name = "usb-host",
145 .id = -1,
146 .parent = &clk_h,
147 .enable = s3c2410_clkcon_enable,
148 .ctrlbit = S3C2410_CLKCON_USBH,
149 }, {
150 .name = "usb-device",
151 .id = -1,
152 .parent = &clk_h,
153 .enable = s3c2410_clkcon_enable,
154 .ctrlbit = S3C2410_CLKCON_USBD,
155 }, {
156 .name = "timers",
157 .id = -1,
158 .parent = &clk_p,
159 .enable = s3c2410_clkcon_enable,
160 .ctrlbit = S3C2410_CLKCON_PWMT,
161 }, {
162 .name = "uart",
163 .id = 0,
164 .parent = &clk_p,
165 .enable = s3c2410_clkcon_enable,
166 .ctrlbit = S3C2410_CLKCON_UART0,
167 }, {
168 .name = "uart",
169 .id = 1,
170 .parent = &clk_p,
171 .enable = s3c2410_clkcon_enable,
172 .ctrlbit = S3C2410_CLKCON_UART1,
173 }, {
174 .name = "uart",
175 .id = 2,
176 .parent = &clk_p,
177 .enable = s3c2410_clkcon_enable,
178 .ctrlbit = S3C2410_CLKCON_UART2,
179 }, {
180 .name = "rtc",
181 .id = -1,
182 .parent = &clk_p,
183 .enable = s3c2410_clkcon_enable,
184 .ctrlbit = S3C2410_CLKCON_RTC,
185 }, {
186 .name = "watchdog",
187 .id = -1,
188 .parent = &clk_p,
189 .ctrlbit = 0,
190 }, {
191 .name = "usb-bus-host",
192 .id = -1,
193 .parent = &clk_usb_bus,
194 }, {
195 .name = "usb-bus-gadget",
196 .id = -1,
197 .parent = &clk_usb_bus,
198 },
376}; 199};
377 200
378struct clk s3c24xx_clkout1 = { 201/* s3c2410_baseclk_add()
379 .name = "clkout1", 202 *
380 .id = -1, 203 * Add all the clocks used by the s3c2410 or compatible CPUs
381 .set_parent = s3c24xx_clkout_setparent, 204 * such as the S3C2440 and S3C2442.
382}; 205 *
383 206 * We cannot use a system device as we are needed before any
384struct clk s3c24xx_uclk = { 207 * of the init-calls that initialise the devices are actually
385 .name = "uclk", 208 * done.
386 .id = -1, 209*/
387};
388
389/* initialise the clock system */
390
391int s3c24xx_register_clock(struct clk *clk)
392{
393 clk->owner = THIS_MODULE;
394
395 if (clk->enable == NULL)
396 clk->enable = clk_null_enable;
397
398 /* add to the list of available clocks */
399
400 mutex_lock(&clocks_mutex);
401 list_add(&clk->list, &clocks);
402 mutex_unlock(&clocks_mutex);
403
404 return 0;
405}
406
407/* initalise all the clocks */
408 210
409int __init s3c24xx_setup_clocks(unsigned long xtal, 211int __init s3c2410_baseclk_add(void)
410 unsigned long fclk,
411 unsigned long hclk,
412 unsigned long pclk)
413{ 212{
414 printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); 213 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
214 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
215 struct clk *clkp;
216 struct clk *xtal;
217 int ret;
218 int ptr;
415 219
416 /* initialise the main system clocks */ 220 clk_upll.enable = s3c2410_upll_enable;
417 221
418 clk_xtal.rate = xtal; 222 if (s3c24xx_register_clock(&clk_usb_bus) < 0)
419 clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); 223 printk(KERN_ERR "failed to register usb bus clock\n");
420 224
421 clk_mpll.rate = fclk; 225 /* register clocks from clock array */
422 clk_h.rate = hclk;
423 clk_p.rate = pclk;
424 clk_f.rate = fclk;
425 226
426 /* assume uart clocks are correctly setup */ 227 clkp = init_clocks;
228 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
229 /* ensure that we note the clock state */
427 230
428 /* register our clocks */ 231 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
429 232
430 if (s3c24xx_register_clock(&clk_xtal) < 0) 233 ret = s3c24xx_register_clock(clkp);
431 printk(KERN_ERR "failed to register master xtal\n"); 234 if (ret < 0) {
235 printk(KERN_ERR "Failed to register clock %s (%d)\n",
236 clkp->name, ret);
237 }
238 }
432 239
433 if (s3c24xx_register_clock(&clk_mpll) < 0) 240 /* We must be careful disabling the clocks we are not intending to
434 printk(KERN_ERR "failed to register mpll clock\n"); 241 * be using at boot time, as subsytems such as the LCD which do
242 * their own DMA requests to the bus can cause the system to lockup
243 * if they where in the middle of requesting bus access.
244 *
245 * Disabling the LCD clock if the LCD is active is very dangerous,
246 * and therefore the bootloader should be careful to not enable
247 * the LCD clock if it is not needed.
248 */
249
250 /* install (and disable) the clocks we do not need immediately */
251
252 clkp = init_clocks_disable;
253 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) {
254
255 ret = s3c24xx_register_clock(clkp);
256 if (ret < 0) {
257 printk(KERN_ERR "Failed to register clock %s (%d)\n",
258 clkp->name, ret);
259 }
435 260
436 if (s3c24xx_register_clock(&clk_upll) < 0) 261 s3c2410_clkcon_enable(clkp, 0);
437 printk(KERN_ERR "failed to register upll clock\n"); 262 }
438 263
439 if (s3c24xx_register_clock(&clk_f) < 0) 264 /* show the clock-slow value */
440 printk(KERN_ERR "failed to register cpu fclk\n");
441 265
442 if (s3c24xx_register_clock(&clk_h) < 0) 266 xtal = clk_get(NULL, "xtal");
443 printk(KERN_ERR "failed to register cpu hclk\n");
444 267
445 if (s3c24xx_register_clock(&clk_p) < 0) 268 printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n",
446 printk(KERN_ERR "failed to register cpu pclk\n"); 269 print_mhz(clk_get_rate(xtal) /
270 ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))),
271 (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast",
272 (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
273 (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
447 274
448 return 0; 275 return 0;
449} 276}
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h
deleted file mode 100644
index 7f0ea03e1d49..000000000000
--- a/arch/arm/mach-s3c2410/clock.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/arch/arm/mach-s3c2410/clock.h
3 *
4 * Copyright (c) 2004-2005 Simtec Electronics
5 * http://www.simtec.co.uk/products/SWLINUX/
6 * Written by Ben Dooks, <ben@simtec.co.uk>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13struct clk {
14 struct list_head list;
15 struct module *owner;
16 struct clk *parent;
17 const char *name;
18 int id;
19 int usage;
20 unsigned long rate;
21 unsigned long ctrlbit;
22
23 int (*enable)(struct clk *, int enable);
24 int (*set_rate)(struct clk *c, unsigned long rate);
25 unsigned long (*get_rate)(struct clk *c);
26 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
27 int (*set_parent)(struct clk *c, struct clk *parent);
28};
29
30/* other clocks which may be registered by board support */
31
32extern struct clk s3c24xx_dclk0;
33extern struct clk s3c24xx_dclk1;
34extern struct clk s3c24xx_clkout0;
35extern struct clk s3c24xx_clkout1;
36extern struct clk s3c24xx_uclk;
37
38extern struct clk clk_usb_bus;
39
40/* core clock support */
41
42extern struct clk clk_f;
43extern struct clk clk_h;
44extern struct clk clk_p;
45extern struct clk clk_mpll;
46extern struct clk clk_upll;
47extern struct clk clk_xtal;
48
49/* exports for arch/arm/mach-s3c2410
50 *
51 * Please DO NOT use these outside of arch/arm/mach-s3c2410
52*/
53
54extern struct mutex clocks_mutex;
55
56extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
57
58extern int s3c24xx_register_clock(struct clk *clk);
59
60extern int s3c24xx_setup_clocks(unsigned long xtal,
61 unsigned long fclk,
62 unsigned long hclk,
63 unsigned long pclk);
diff --git a/arch/arm/mach-s3c2410/common-smdk.h b/arch/arm/mach-s3c2410/common-smdk.h
deleted file mode 100644
index 0e3a3be330a3..000000000000
--- a/arch/arm/mach-s3c2410/common-smdk.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/common-smdk.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Common code for SMDK2410 and SMDK2440 boards
7 *
8 * http://www.fluff.org/ben/smdk2440/
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
15extern void smdk_machine_init(void);
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
deleted file mode 100644
index be42e4032a6d..000000000000
--- a/arch/arm/mach-s3c2410/cpu.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/* arch/arm/mach-s3c2410/cpu.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* todo - fix when rmk changes iodescs to use `void __iomem *` */
14
15#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
16
17#ifndef MHZ
18#define MHZ (1000*1000)
19#endif
20
21#define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000)
22
23/* forward declaration */
24struct s3c24xx_uart_resources;
25struct platform_device;
26struct s3c2410_uartcfg;
27struct map_desc;
28
29/* core initialisation functions */
30
31extern void s3c24xx_init_irq(void);
32
33extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
34
35extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
36
37extern void s3c24xx_init_clocks(int xtal);
38
39extern void s3c24xx_init_uartdevs(char *name,
40 struct s3c24xx_uart_resources *res,
41 struct s3c2410_uartcfg *cfg, int no);
42
43/* the board structure is used at first initialsation time
44 * to get info such as the devices to register for this
45 * board. This is done because platfrom_add_devices() cannot
46 * be called from the map_io entry.
47*/
48
49struct s3c24xx_board {
50 struct platform_device **devices;
51 unsigned int devices_count;
52
53 struct clk **clocks;
54 unsigned int clocks_count;
55};
56
57extern void s3c24xx_set_board(struct s3c24xx_board *board);
58
59/* timer for 2410/2440 */
60
61struct sys_timer;
62extern struct sys_timer s3c24xx_timer;
63
64/* system device classes */
65
66extern struct sysdev_class s3c2410_sysclass;
67extern struct sysdev_class s3c2412_sysclass;
68extern struct sysdev_class s3c2440_sysclass;
69extern struct sysdev_class s3c2442_sysclass;
diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h
deleted file mode 100644
index 14fb0bade716..000000000000
--- a/arch/arm/mach-s3c2410/devs.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/* arch/arm/mach-s3c2410/devs.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2410 standard platform devices
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12#include <linux/platform_device.h>
13
14struct s3c24xx_uart_resources {
15 struct resource *resources;
16 unsigned long nr_resources;
17};
18
19extern struct s3c24xx_uart_resources s3c2410_uart_resources[];
20
21extern struct platform_device *s3c24xx_uart_devs[];
22extern struct platform_device *s3c24xx_uart_src[];
23
24extern struct platform_device s3c_device_usb;
25extern struct platform_device s3c_device_lcd;
26extern struct platform_device s3c_device_wdt;
27extern struct platform_device s3c_device_i2c;
28extern struct platform_device s3c_device_iis;
29extern struct platform_device s3c_device_rtc;
30extern struct platform_device s3c_device_adc;
31extern struct platform_device s3c_device_sdi;
32
33extern struct platform_device s3c_device_spi0;
34extern struct platform_device s3c_device_spi1;
35
36extern struct platform_device s3c_device_nand;
37
38extern struct platform_device s3c_device_timer0;
39extern struct platform_device s3c_device_timer1;
40extern struct platform_device s3c_device_timer2;
41extern struct platform_device s3c_device_timer3;
42
43extern struct platform_device s3c_device_usbgadget;
44
45/* s3c2440 specific devices */
46
47#ifdef CONFIG_CPU_S3C2440
48
49extern struct platform_device s3c_device_camif;
50
51#endif
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index fa860e716b4f..67d1ad363973 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -1,9 +1,9 @@
1/* linux/arch/arm/mach-s3c2410/dma.c 1/* linux/arch/arm/mach-s3c2410/dma.c
2 * 2 *
3 * Copyright (c) 2003-2005,2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2410 DMA core 6 * S3C2410 DMA selection
7 * 7 *
8 * http://armlinux.simtec.co.uk/ 8 * http://armlinux.simtec.co.uk/
9 * 9 *
@@ -12,1430 +12,170 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13*/ 13*/
14 14
15 15#include <linux/kernel.h>
16#ifdef CONFIG_S3C2410_DMA_DEBUG
17#define DEBUG
18#endif
19
20#include <linux/module.h>
21#include <linux/init.h> 16#include <linux/init.h>
22#include <linux/sched.h>
23#include <linux/spinlock.h>
24#include <linux/interrupt.h>
25#include <linux/sysdev.h> 17#include <linux/sysdev.h>
26#include <linux/slab.h> 18#include <linux/serial_core.h>
27#include <linux/errno.h>
28#include <linux/delay.h>
29 19
30#include <asm/system.h>
31#include <asm/irq.h>
32#include <asm/hardware.h>
33#include <asm/io.h>
34#include <asm/dma.h> 20#include <asm/dma.h>
35 21#include <asm/arch/dma.h>
36#include <asm/mach/dma.h> 22
37#include <asm/arch/map.h> 23#include <asm/plat-s3c24xx/cpu.h>
38 24#include <asm/plat-s3c24xx/dma.h>
39#include "dma.h" 25
40 26#include <asm/arch/regs-serial.h>
41/* io map for dma */ 27#include <asm/arch/regs-gpio.h>
42static void __iomem *dma_base; 28#include <asm/arch/regs-ac97.h>
43static struct kmem_cache *dma_kmem; 29#include <asm/arch/regs-mem.h>
44 30#include <asm/arch/regs-lcd.h>
45struct s3c24xx_dma_selection dma_sel; 31#include <asm/arch/regs-sdi.h>
46 32#include <asm/arch/regs-iis.h>
47/* dma channel state information */ 33#include <asm/arch/regs-spi.h>
48struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; 34
49 35static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = {
50/* debugging functions */ 36 [DMACH_XD0] = {
51 37 .name = "xdreq0",
52#define BUF_MAGIC (0xcafebabe) 38 .channels[0] = S3C2410_DCON_CH0_XDREQ0 | DMA_CH_VALID,
53 39 },
54#define dmawarn(fmt...) printk(KERN_DEBUG fmt) 40 [DMACH_XD1] = {
55 41 .name = "xdreq1",
56#define dma_regaddr(chan, reg) ((chan)->regs + (reg)) 42 .channels[1] = S3C2410_DCON_CH1_XDREQ1 | DMA_CH_VALID,
57 43 },
58#if 1 44 [DMACH_SDI] = {
59#define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg)) 45 .name = "sdi",
60#else 46 .channels[0] = S3C2410_DCON_CH0_SDI | DMA_CH_VALID,
61static inline void 47 .channels[2] = S3C2410_DCON_CH2_SDI | DMA_CH_VALID,
62dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val) 48 .channels[3] = S3C2410_DCON_CH3_SDI | DMA_CH_VALID,
63{ 49 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
64 pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); 50 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
65 writel(val, dma_regaddr(chan, reg)); 51 },
66} 52 [DMACH_SPI0] = {
67#endif 53 .name = "spi0",
68 54 .channels[1] = S3C2410_DCON_CH1_SPI | DMA_CH_VALID,
69#define dma_rdreg(chan, reg) readl((chan)->regs + (reg)) 55 .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT,
70 56 .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT,
71/* captured register state for debug */ 57 },
72 58 [DMACH_SPI1] = {
73struct s3c2410_dma_regstate { 59 .name = "spi1",
74 unsigned long dcsrc; 60 .channels[3] = S3C2410_DCON_CH3_SPI | DMA_CH_VALID,
75 unsigned long disrc; 61 .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT,
76 unsigned long dstat; 62 .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT,
77 unsigned long dcon; 63 },
78 unsigned long dmsktrig; 64 [DMACH_UART0] = {
65 .name = "uart0",
66 .channels[0] = S3C2410_DCON_CH0_UART0 | DMA_CH_VALID,
67 .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
68 .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH,
69 },
70 [DMACH_UART1] = {
71 .name = "uart1",
72 .channels[1] = S3C2410_DCON_CH1_UART1 | DMA_CH_VALID,
73 .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
74 .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH,
75 },
76 [DMACH_UART2] = {
77 .name = "uart2",
78 .channels[3] = S3C2410_DCON_CH3_UART2 | DMA_CH_VALID,
79 .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
80 .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH,
81 },
82 [DMACH_TIMER] = {
83 .name = "timer",
84 .channels[0] = S3C2410_DCON_CH0_TIMER | DMA_CH_VALID,
85 .channels[2] = S3C2410_DCON_CH2_TIMER | DMA_CH_VALID,
86 .channels[3] = S3C2410_DCON_CH3_TIMER | DMA_CH_VALID,
87 },
88 [DMACH_I2S_IN] = {
89 .name = "i2s-sdi",
90 .channels[1] = S3C2410_DCON_CH1_I2SSDI | DMA_CH_VALID,
91 .channels[2] = S3C2410_DCON_CH2_I2SSDI | DMA_CH_VALID,
92 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
93 },
94 [DMACH_I2S_OUT] = {
95 .name = "i2s-sdo",
96 .channels[2] = S3C2410_DCON_CH2_I2SSDO | DMA_CH_VALID,
97 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
98 },
99 [DMACH_USB_EP1] = {
100 .name = "usb-ep1",
101 .channels[0] = S3C2410_DCON_CH0_USBEP1 | DMA_CH_VALID,
102 },
103 [DMACH_USB_EP2] = {
104 .name = "usb-ep2",
105 .channels[1] = S3C2410_DCON_CH1_USBEP2 | DMA_CH_VALID,
106 },
107 [DMACH_USB_EP3] = {
108 .name = "usb-ep3",
109 .channels[2] = S3C2410_DCON_CH2_USBEP3 | DMA_CH_VALID,
110 },
111 [DMACH_USB_EP4] = {
112 .name = "usb-ep4",
113 .channels[3] =S3C2410_DCON_CH3_USBEP4 | DMA_CH_VALID,
114 },
79}; 115};
80 116
81#ifdef CONFIG_S3C2410_DMA_DEBUG 117static void s3c2410_dma_select(struct s3c2410_dma_chan *chan,
82 118 struct s3c24xx_dma_map *map)
83/* dmadbg_showregs
84 *
85 * simple debug routine to print the current state of the dma registers
86*/
87
88static void
89dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs)
90{
91 regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC);
92 regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC);
93 regs->dstat = dma_rdreg(chan, S3C2410_DMA_DSTAT);
94 regs->dcon = dma_rdreg(chan, S3C2410_DMA_DCON);
95 regs->dmsktrig = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
96}
97
98static void
99dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan,
100 struct s3c2410_dma_regstate *regs)
101{
102 printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n",
103 chan->number, fname, line,
104 regs->dcsrc, regs->disrc, regs->dstat, regs->dmsktrig,
105 regs->dcon);
106}
107
108static void
109dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan)
110{
111 struct s3c2410_dma_regstate state;
112
113 dmadbg_capture(chan, &state);
114
115 printk(KERN_DEBUG "dma%d: %s:%d: ls=%d, cur=%p, %p %p\n",
116 chan->number, fname, line, chan->load_state,
117 chan->curr, chan->next, chan->end);
118
119 dmadbg_dumpregs(fname, line, chan, &state);
120}
121
122static void
123dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan)
124{
125 struct s3c2410_dma_regstate state;
126
127 dmadbg_capture(chan, &state);
128 dmadbg_dumpregs(fname, line, chan, &state);
129}
130
131#define dbg_showregs(chan) dmadbg_showregs(__FUNCTION__, __LINE__, (chan))
132#define dbg_showchan(chan) dmadbg_showchan(__FUNCTION__, __LINE__, (chan))
133#else
134#define dbg_showregs(chan) do { } while(0)
135#define dbg_showchan(chan) do { } while(0)
136#endif /* CONFIG_S3C2410_DMA_DEBUG */
137
138static struct s3c2410_dma_chan *dma_chan_map[DMACH_MAX];
139
140/* lookup_dma_channel
141 *
142 * change the dma channel number given into a real dma channel id
143*/
144
145static struct s3c2410_dma_chan *lookup_dma_channel(unsigned int channel)
146{
147 if (channel & DMACH_LOW_LEVEL)
148 return &s3c2410_chans[channel & ~DMACH_LOW_LEVEL];
149 else
150 return dma_chan_map[channel];
151}
152
153/* s3c2410_dma_stats_timeout
154 *
155 * Update DMA stats from timeout info
156*/
157
158static void
159s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val)
160{ 119{
161 if (stats == NULL) 120 chan->dcon = map->channels[chan->number] & ~DMA_CH_VALID;
162 return;
163
164 if (val > stats->timeout_longest)
165 stats->timeout_longest = val;
166 if (val < stats->timeout_shortest)
167 stats->timeout_shortest = val;
168
169 stats->timeout_avg += val;
170} 121}
171 122
172/* s3c2410_dma_waitforload 123static struct s3c24xx_dma_selection __initdata s3c2410_dma_sel = {
173 * 124 .select = s3c2410_dma_select,
174 * wait for the DMA engine to load a buffer, and update the state accordingly 125 .dcon_mask = 7 << 24,
175*/ 126 .map = s3c2410_dma_mappings,
176 127 .map_size = ARRAY_SIZE(s3c2410_dma_mappings),
177static int 128};
178s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line)
179{
180 int timeout = chan->load_timeout;
181 int took;
182
183 if (chan->load_state != S3C2410_DMALOAD_1LOADED) {
184 printk(KERN_ERR "dma%d: s3c2410_dma_waitforload() called in loadstate %d from line %d\n", chan->number, chan->load_state, line);
185 return 0;
186 }
187
188 if (chan->stats != NULL)
189 chan->stats->loads++;
190
191 while (--timeout > 0) {
192 if ((dma_rdreg(chan, S3C2410_DMA_DSTAT) << (32-20)) != 0) {
193 took = chan->load_timeout - timeout;
194
195 s3c2410_dma_stats_timeout(chan->stats, took);
196
197 switch (chan->load_state) {
198 case S3C2410_DMALOAD_1LOADED:
199 chan->load_state = S3C2410_DMALOAD_1RUNNING;
200 break;
201
202 default:
203 printk(KERN_ERR "dma%d: unknown load_state in s3c2410_dma_waitforload() %d\n", chan->number, chan->load_state);
204 }
205
206 return 1;
207 }
208 }
209
210 if (chan->stats != NULL) {
211 chan->stats->timeout_failed++;
212 }
213
214 return 0;
215}
216
217
218
219/* s3c2410_dma_loadbuffer
220 *
221 * load a buffer, and update the channel state
222*/
223
224static inline int
225s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
226 struct s3c2410_dma_buf *buf)
227{
228 unsigned long reload;
229
230 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
231 buf, (unsigned long)buf->data, buf->size);
232
233 if (buf == NULL) {
234 dmawarn("buffer is NULL\n");
235 return -EINVAL;
236 }
237
238 /* check the state of the channel before we do anything */
239
240 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
241 dmawarn("load_state is S3C2410_DMALOAD_1LOADED\n");
242 }
243
244 if (chan->load_state == S3C2410_DMALOAD_1LOADED_1RUNNING) {
245 dmawarn("state is S3C2410_DMALOAD_1LOADED_1RUNNING\n");
246 }
247
248 /* it would seem sensible if we are the last buffer to not bother
249 * with the auto-reload bit, so that the DMA engine will not try
250 * and load another transfer after this one has finished...
251 */
252 if (chan->load_state == S3C2410_DMALOAD_NONE) {
253 pr_debug("load_state is none, checking for noreload (next=%p)\n",
254 buf->next);
255 reload = (buf->next == NULL) ? S3C2410_DCON_NORELOAD : 0;
256 } else {
257 //pr_debug("load_state is %d => autoreload\n", chan->load_state);
258 reload = S3C2410_DCON_AUTORELOAD;
259 }
260
261 if ((buf->data & 0xf0000000) != 0x30000000) {
262 dmawarn("dmaload: buffer is %p\n", (void *)buf->data);
263 }
264
265 writel(buf->data, chan->addr_reg);
266
267 dma_wrreg(chan, S3C2410_DMA_DCON,
268 chan->dcon | reload | (buf->size/chan->xfer_unit));
269
270 chan->next = buf->next;
271
272 /* update the state of the channel */
273
274 switch (chan->load_state) {
275 case S3C2410_DMALOAD_NONE:
276 chan->load_state = S3C2410_DMALOAD_1LOADED;
277 break;
278
279 case S3C2410_DMALOAD_1RUNNING:
280 chan->load_state = S3C2410_DMALOAD_1LOADED_1RUNNING;
281 break;
282
283 default:
284 dmawarn("dmaload: unknown state %d in loadbuffer\n",
285 chan->load_state);
286 break;
287 }
288
289 return 0;
290}
291
292/* s3c2410_dma_call_op
293 *
294 * small routine to call the op routine with the given op if it has been
295 * registered
296*/
297
298static void
299s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op)
300{
301 if (chan->op_fn != NULL) {
302 (chan->op_fn)(chan, op);
303 }
304}
305
306/* s3c2410_dma_buffdone
307 *
308 * small wrapper to check if callback routine needs to be called, and
309 * if so, call it
310*/
311
312static inline void
313s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf,
314 enum s3c2410_dma_buffresult result)
315{
316#if 0
317 pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n",
318 chan->callback_fn, buf, buf->id, buf->size, result);
319#endif
320
321 if (chan->callback_fn != NULL) {
322 (chan->callback_fn)(chan, buf->id, buf->size, result);
323 }
324}
325
326/* s3c2410_dma_start
327 *
328 * start a dma channel going
329*/
330
331static int s3c2410_dma_start(struct s3c2410_dma_chan *chan)
332{
333 unsigned long tmp;
334 unsigned long flags;
335
336 pr_debug("s3c2410_start_dma: channel=%d\n", chan->number);
337
338 local_irq_save(flags);
339
340 if (chan->state == S3C2410_DMA_RUNNING) {
341 pr_debug("s3c2410_start_dma: already running (%d)\n", chan->state);
342 local_irq_restore(flags);
343 return 0;
344 }
345
346 chan->state = S3C2410_DMA_RUNNING;
347
348 /* check wether there is anything to load, and if not, see
349 * if we can find anything to load
350 */
351
352 if (chan->load_state == S3C2410_DMALOAD_NONE) {
353 if (chan->next == NULL) {
354 printk(KERN_ERR "dma%d: channel has nothing loaded\n",
355 chan->number);
356 chan->state = S3C2410_DMA_IDLE;
357 local_irq_restore(flags);
358 return -EINVAL;
359 }
360
361 s3c2410_dma_loadbuffer(chan, chan->next);
362 }
363
364 dbg_showchan(chan);
365
366 /* enable the channel */
367
368 if (!chan->irq_enabled) {
369 enable_irq(chan->irq);
370 chan->irq_enabled = 1;
371 }
372
373 /* start the channel going */
374
375 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
376 tmp &= ~S3C2410_DMASKTRIG_STOP;
377 tmp |= S3C2410_DMASKTRIG_ON;
378 dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp);
379
380 pr_debug("dma%d: %08lx to DMASKTRIG\n", chan->number, tmp);
381
382#if 0
383 /* the dma buffer loads should take care of clearing the AUTO
384 * reloading feature */
385 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
386 tmp &= ~S3C2410_DCON_NORELOAD;
387 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
388#endif
389
390 s3c2410_dma_call_op(chan, S3C2410_DMAOP_START);
391
392 dbg_showchan(chan);
393
394 /* if we've only loaded one buffer onto the channel, then chec
395 * to see if we have another, and if so, try and load it so when
396 * the first buffer is finished, the new one will be loaded onto
397 * the channel */
398
399 if (chan->next != NULL) {
400 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
401
402 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
403 pr_debug("%s: buff not yet loaded, no more todo\n",
404 __FUNCTION__);
405 } else {
406 chan->load_state = S3C2410_DMALOAD_1RUNNING;
407 s3c2410_dma_loadbuffer(chan, chan->next);
408 }
409
410 } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) {
411 s3c2410_dma_loadbuffer(chan, chan->next);
412 }
413 }
414
415
416 local_irq_restore(flags);
417
418 return 0;
419}
420
421/* s3c2410_dma_canload
422 *
423 * work out if we can queue another buffer into the DMA engine
424*/
425
426static int
427s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
428{
429 if (chan->load_state == S3C2410_DMALOAD_NONE ||
430 chan->load_state == S3C2410_DMALOAD_1RUNNING)
431 return 1;
432
433 return 0;
434}
435
436/* s3c2410_dma_enqueue
437 *
438 * queue an given buffer for dma transfer.
439 *
440 * id the device driver's id information for this buffer
441 * data the physical address of the buffer data
442 * size the size of the buffer in bytes
443 *
444 * If the channel is not running, then the flag S3C2410_DMAF_AUTOSTART
445 * is checked, and if set, the channel is started. If this flag isn't set,
446 * then an error will be returned.
447 *
448 * It is possible to queue more than one DMA buffer onto a channel at
449 * once, and the code will deal with the re-loading of the next buffer
450 * when necessary.
451*/
452
453int s3c2410_dma_enqueue(unsigned int channel, void *id,
454 dma_addr_t data, int size)
455{
456 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
457 struct s3c2410_dma_buf *buf;
458 unsigned long flags;
459
460 if (chan == NULL)
461 return -EINVAL;
462
463 pr_debug("%s: id=%p, data=%08x, size=%d\n",
464 __FUNCTION__, id, (unsigned int)data, size);
465
466 buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC);
467 if (buf == NULL) {
468 pr_debug("%s: out of memory (%ld alloc)\n",
469 __FUNCTION__, (long)sizeof(*buf));
470 return -ENOMEM;
471 }
472
473 //pr_debug("%s: new buffer %p\n", __FUNCTION__, buf);
474 //dbg_showchan(chan);
475
476 buf->next = NULL;
477 buf->data = buf->ptr = data;
478 buf->size = size;
479 buf->id = id;
480 buf->magic = BUF_MAGIC;
481
482 local_irq_save(flags);
483
484 if (chan->curr == NULL) {
485 /* we've got nothing loaded... */
486 pr_debug("%s: buffer %p queued onto empty channel\n",
487 __FUNCTION__, buf);
488
489 chan->curr = buf;
490 chan->end = buf;
491 chan->next = NULL;
492 } else {
493 pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n",
494 chan->number, __FUNCTION__, buf);
495
496 if (chan->end == NULL)
497 pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n",
498 chan->number, __FUNCTION__, chan);
499
500 chan->end->next = buf;
501 chan->end = buf;
502 }
503
504 /* if necessary, update the next buffer field */
505 if (chan->next == NULL)
506 chan->next = buf;
507
508 /* check to see if we can load a buffer */
509 if (chan->state == S3C2410_DMA_RUNNING) {
510 if (chan->load_state == S3C2410_DMALOAD_1LOADED && 1) {
511 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
512 printk(KERN_ERR "dma%d: loadbuffer:"
513 "timeout loading buffer\n",
514 chan->number);
515 dbg_showchan(chan);
516 local_irq_restore(flags);
517 return -EINVAL;
518 }
519 }
520
521 while (s3c2410_dma_canload(chan) && chan->next != NULL) {
522 s3c2410_dma_loadbuffer(chan, chan->next);
523 }
524 } else if (chan->state == S3C2410_DMA_IDLE) {
525 if (chan->flags & S3C2410_DMAF_AUTOSTART) {
526 s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_START);
527 }
528 }
529
530 local_irq_restore(flags);
531 return 0;
532}
533
534EXPORT_SYMBOL(s3c2410_dma_enqueue);
535
536static inline void
537s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf)
538{
539 int magicok = (buf->magic == BUF_MAGIC);
540
541 buf->magic = -1;
542
543 if (magicok) {
544 kmem_cache_free(dma_kmem, buf);
545 } else {
546 printk("s3c2410_dma_freebuf: buff %p with bad magic\n", buf);
547 }
548}
549
550/* s3c2410_dma_lastxfer
551 *
552 * called when the system is out of buffers, to ensure that the channel
553 * is prepared for shutdown.
554*/
555
556static inline void
557s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
558{
559#if 0
560 pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n",
561 chan->number, chan->load_state);
562#endif
563
564 switch (chan->load_state) {
565 case S3C2410_DMALOAD_NONE:
566 break;
567
568 case S3C2410_DMALOAD_1LOADED:
569 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
570 /* flag error? */
571 printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
572 chan->number, __FUNCTION__);
573 return;
574 }
575 break;
576
577 case S3C2410_DMALOAD_1LOADED_1RUNNING:
578 /* I belive in this case we do not have anything to do
579 * until the next buffer comes along, and we turn off the
580 * reload */
581 return;
582
583 default:
584 pr_debug("dma%d: lastxfer: unhandled load_state %d with no next\n",
585 chan->number, chan->load_state);
586 return;
587
588 }
589
590 /* hopefully this'll shut the damned thing up after the transfer... */
591 dma_wrreg(chan, S3C2410_DMA_DCON, chan->dcon | S3C2410_DCON_NORELOAD);
592}
593
594
595#define dmadbg2(x...)
596
597static irqreturn_t
598s3c2410_dma_irq(int irq, void *devpw)
599{
600 struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
601 struct s3c2410_dma_buf *buf;
602
603 buf = chan->curr;
604
605 dbg_showchan(chan);
606
607 /* modify the channel state */
608
609 switch (chan->load_state) {
610 case S3C2410_DMALOAD_1RUNNING:
611 /* TODO - if we are running only one buffer, we probably
612 * want to reload here, and then worry about the buffer
613 * callback */
614
615 chan->load_state = S3C2410_DMALOAD_NONE;
616 break;
617
618 case S3C2410_DMALOAD_1LOADED:
619 /* iirc, we should go back to NONE loaded here, we
620 * had a buffer, and it was never verified as being
621 * loaded.
622 */
623
624 chan->load_state = S3C2410_DMALOAD_NONE;
625 break;
626
627 case S3C2410_DMALOAD_1LOADED_1RUNNING:
628 /* we'll worry about checking to see if another buffer is
629 * ready after we've called back the owner. This should
630 * ensure we do not wait around too long for the DMA
631 * engine to start the next transfer
632 */
633
634 chan->load_state = S3C2410_DMALOAD_1LOADED;
635 break;
636
637 case S3C2410_DMALOAD_NONE:
638 printk(KERN_ERR "dma%d: IRQ with no loaded buffer?\n",
639 chan->number);
640 break;
641
642 default:
643 printk(KERN_ERR "dma%d: IRQ in invalid load_state %d\n",
644 chan->number, chan->load_state);
645 break;
646 }
647
648 if (buf != NULL) {
649 /* update the chain to make sure that if we load any more
650 * buffers when we call the callback function, things should
651 * work properly */
652
653 chan->curr = buf->next;
654 buf->next = NULL;
655
656 if (buf->magic != BUF_MAGIC) {
657 printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n",
658 chan->number, __FUNCTION__, buf);
659 return IRQ_HANDLED;
660 }
661
662 s3c2410_dma_buffdone(chan, buf, S3C2410_RES_OK);
663
664 /* free resouces */
665 s3c2410_dma_freebuf(buf);
666 } else {
667 }
668
669 /* only reload if the channel is still running... our buffer done
670 * routine may have altered the state by requesting the dma channel
671 * to stop or shutdown... */
672
673 /* todo: check that when the channel is shut-down from inside this
674 * function, we cope with unsetting reload, etc */
675
676 if (chan->next != NULL && chan->state != S3C2410_DMA_IDLE) {
677 unsigned long flags;
678
679 switch (chan->load_state) {
680 case S3C2410_DMALOAD_1RUNNING:
681 /* don't need to do anything for this state */
682 break;
683
684 case S3C2410_DMALOAD_NONE:
685 /* can load buffer immediately */
686 break;
687
688 case S3C2410_DMALOAD_1LOADED:
689 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
690 /* flag error? */
691 printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
692 chan->number, __FUNCTION__);
693 return IRQ_HANDLED;
694 }
695
696 break;
697
698 case S3C2410_DMALOAD_1LOADED_1RUNNING:
699 goto no_load;
700
701 default:
702 printk(KERN_ERR "dma%d: unknown load_state in irq, %d\n",
703 chan->number, chan->load_state);
704 return IRQ_HANDLED;
705 }
706
707 local_irq_save(flags);
708 s3c2410_dma_loadbuffer(chan, chan->next);
709 local_irq_restore(flags);
710 } else {
711 s3c2410_dma_lastxfer(chan);
712
713 /* see if we can stop this channel.. */
714 if (chan->load_state == S3C2410_DMALOAD_NONE) {
715 pr_debug("dma%d: end of transfer, stopping channel (%ld)\n",
716 chan->number, jiffies);
717 s3c2410_dma_ctrl(chan->number | DMACH_LOW_LEVEL,
718 S3C2410_DMAOP_STOP);
719 }
720 }
721
722 no_load:
723 return IRQ_HANDLED;
724}
725
726static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel);
727
728/* s3c2410_request_dma
729 *
730 * get control of an dma channel
731*/
732
733int s3c2410_dma_request(unsigned int channel,
734 struct s3c2410_dma_client *client,
735 void *dev)
736{
737 struct s3c2410_dma_chan *chan;
738 unsigned long flags;
739 int err;
740
741 pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n",
742 channel, client->name, dev);
743
744 local_irq_save(flags);
745
746 chan = s3c2410_dma_map_channel(channel);
747 if (chan == NULL) {
748 local_irq_restore(flags);
749 return -EBUSY;
750 }
751
752 dbg_showchan(chan);
753
754 chan->client = client;
755 chan->in_use = 1;
756
757 if (!chan->irq_claimed) {
758 pr_debug("dma%d: %s : requesting irq %d\n",
759 channel, __FUNCTION__, chan->irq);
760
761 chan->irq_claimed = 1;
762 local_irq_restore(flags);
763
764 err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED,
765 client->name, (void *)chan);
766
767 local_irq_save(flags);
768
769 if (err) {
770 chan->in_use = 0;
771 chan->irq_claimed = 0;
772 local_irq_restore(flags);
773
774 printk(KERN_ERR "%s: cannot get IRQ %d for DMA %d\n",
775 client->name, chan->irq, chan->number);
776 return err;
777 }
778
779 chan->irq_enabled = 1;
780 }
781
782 local_irq_restore(flags);
783
784 /* need to setup */
785
786 pr_debug("%s: channel initialised, %p\n", __FUNCTION__, chan);
787
788 return 0;
789}
790
791EXPORT_SYMBOL(s3c2410_dma_request);
792 129
793/* s3c2410_dma_free 130static struct s3c24xx_dma_order __initdata s3c2410_dma_order = {
794 * 131 .channels = {
795 * release the given channel back to the system, will stop and flush 132 [DMACH_SDI] = {
796 * any outstanding transfers, and ensure the channel is ready for the 133 .list = {
797 * next claimant. 134 [0] = 3 | DMA_CH_VALID,
798 * 135 [1] = 2 | DMA_CH_VALID,
799 * Note, although a warning is currently printed if the freeing client 136 [2] = 0 | DMA_CH_VALID,
800 * info is not the same as the registrant's client info, the free is still 137 },
801 * allowed to go through. 138 },
802*/ 139 [DMACH_I2S_IN] = {
140 .list = {
141 [0] = 1 | DMA_CH_VALID,
142 [1] = 2 | DMA_CH_VALID,
143 },
144 },
145 },
146};
803 147
804int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) 148static int s3c2410_dma_add(struct sys_device *sysdev)
805{ 149{
806 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); 150 s3c2410_dma_init();
807 unsigned long flags; 151 s3c24xx_dma_order_set(&s3c2410_dma_order);
808 152 return s3c24xx_dma_init_map(&s3c2410_dma_sel);
809 if (chan == NULL)
810 return -EINVAL;
811
812 local_irq_save(flags);
813
814 if (chan->client != client) {
815 printk(KERN_WARNING "dma%d: possible free from different client (channel %p, passed %p)\n",
816 channel, chan->client, client);
817 }
818
819 /* sort out stopping and freeing the channel */
820
821 if (chan->state != S3C2410_DMA_IDLE) {
822 pr_debug("%s: need to stop dma channel %p\n",
823 __FUNCTION__, chan);
824
825 /* possibly flush the channel */
826 s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STOP);
827 }
828
829 chan->client = NULL;
830 chan->in_use = 0;
831
832 if (chan->irq_claimed)
833 free_irq(chan->irq, (void *)chan);
834
835 chan->irq_claimed = 0;
836
837 if (!(channel & DMACH_LOW_LEVEL))
838 dma_chan_map[channel] = NULL;
839
840 local_irq_restore(flags);
841
842 return 0;
843} 153}
844 154
845EXPORT_SYMBOL(s3c2410_dma_free); 155#if defined(CONFIG_CPU_S3C2410)
846 156static struct sysdev_driver s3c2410_dma_driver = {
847static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) 157 .add = s3c2410_dma_add,
848{ 158};
849 unsigned long flags;
850 unsigned long tmp;
851
852 pr_debug("%s:\n", __FUNCTION__);
853
854 dbg_showchan(chan);
855
856 local_irq_save(flags);
857
858 s3c2410_dma_call_op(chan, S3C2410_DMAOP_STOP);
859
860 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
861 tmp |= S3C2410_DMASKTRIG_STOP;
862 //tmp &= ~S3C2410_DMASKTRIG_ON;
863 dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp);
864
865#if 0
866 /* should also clear interrupts, according to WinCE BSP */
867 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
868 tmp |= S3C2410_DCON_NORELOAD;
869 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
870#endif
871
872 /* should stop do this, or should we wait for flush? */
873 chan->state = S3C2410_DMA_IDLE;
874 chan->load_state = S3C2410_DMALOAD_NONE;
875
876 local_irq_restore(flags);
877
878 return 0;
879}
880 159
881void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan) 160static int __init s3c2410_dma_drvinit(void)
882{ 161{
883 unsigned long tmp; 162 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver);
884 unsigned int timeout = 0x10000;
885
886 while (timeout-- > 0) {
887 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
888
889 if (!(tmp & S3C2410_DMASKTRIG_ON))
890 return;
891 }
892
893 pr_debug("dma%d: failed to stop?\n", chan->number);
894} 163}
895 164
896 165arch_initcall(s3c2410_dma_drvinit);
897/* s3c2410_dma_flush
898 *
899 * stop the channel, and remove all current and pending transfers
900*/
901
902static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
903{
904 struct s3c2410_dma_buf *buf, *next;
905 unsigned long flags;
906
907 pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number);
908
909 dbg_showchan(chan);
910
911 local_irq_save(flags);
912
913 if (chan->state != S3C2410_DMA_IDLE) {
914 pr_debug("%s: stopping channel...\n", __FUNCTION__ );
915 s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP);
916 }
917
918 buf = chan->curr;
919 if (buf == NULL)
920 buf = chan->next;
921
922 chan->curr = chan->next = chan->end = NULL;
923
924 if (buf != NULL) {
925 for ( ; buf != NULL; buf = next) {
926 next = buf->next;
927
928 pr_debug("%s: free buffer %p, next %p\n",
929 __FUNCTION__, buf, buf->next);
930
931 s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT);
932 s3c2410_dma_freebuf(buf);
933 }
934 }
935
936 dbg_showregs(chan);
937
938 s3c2410_dma_waitforstop(chan);
939
940#if 0
941 /* should also clear interrupts, according to WinCE BSP */
942 {
943 unsigned long tmp;
944
945 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
946 tmp |= S3C2410_DCON_NORELOAD;
947 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
948 }
949#endif 166#endif
950 167
951 dbg_showregs(chan); 168#if defined(CONFIG_CPU_S3C2442)
952 169/* S3C2442 DMA contains the same selection table as the S3C2410 */
953 local_irq_restore(flags); 170static struct sysdev_driver s3c2442_dma_driver = {
954 171 .add = s3c2410_dma_add,
955 return 0;
956}
957
958int
959s3c2410_dma_started(struct s3c2410_dma_chan *chan)
960{
961 unsigned long flags;
962
963 local_irq_save(flags);
964
965 dbg_showchan(chan);
966
967 /* if we've only loaded one buffer onto the channel, then chec
968 * to see if we have another, and if so, try and load it so when
969 * the first buffer is finished, the new one will be loaded onto
970 * the channel */
971
972 if (chan->next != NULL) {
973 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
974
975 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
976 pr_debug("%s: buff not yet loaded, no more todo\n",
977 __FUNCTION__);
978 } else {
979 chan->load_state = S3C2410_DMALOAD_1RUNNING;
980 s3c2410_dma_loadbuffer(chan, chan->next);
981 }
982
983 } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) {
984 s3c2410_dma_loadbuffer(chan, chan->next);
985 }
986 }
987
988
989 local_irq_restore(flags);
990
991 return 0;
992
993}
994
995int
996s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op)
997{
998 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
999
1000 if (chan == NULL)
1001 return -EINVAL;
1002
1003 switch (op) {
1004 case S3C2410_DMAOP_START:
1005 return s3c2410_dma_start(chan);
1006
1007 case S3C2410_DMAOP_STOP:
1008 return s3c2410_dma_dostop(chan);
1009
1010 case S3C2410_DMAOP_PAUSE:
1011 case S3C2410_DMAOP_RESUME:
1012 return -ENOENT;
1013
1014 case S3C2410_DMAOP_FLUSH:
1015 return s3c2410_dma_flush(chan);
1016
1017 case S3C2410_DMAOP_STARTED:
1018 return s3c2410_dma_started(chan);
1019
1020 case S3C2410_DMAOP_TIMEOUT:
1021 return 0;
1022
1023 }
1024
1025 return -ENOENT; /* unknown, don't bother */
1026}
1027
1028EXPORT_SYMBOL(s3c2410_dma_ctrl);
1029
1030/* DMA configuration for each channel
1031 *
1032 * DISRCC -> source of the DMA (AHB,APB)
1033 * DISRC -> source address of the DMA
1034 * DIDSTC -> destination of the DMA (AHB,APD)
1035 * DIDST -> destination address of the DMA
1036*/
1037
1038/* s3c2410_dma_config
1039 *
1040 * xfersize: size of unit in bytes (1,2,4)
1041 * dcon: base value of the DCONx register
1042*/
1043
1044int s3c2410_dma_config(dmach_t channel,
1045 int xferunit,
1046 int dcon)
1047{
1048 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1049
1050 pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
1051 __FUNCTION__, channel, xferunit, dcon);
1052
1053 if (chan == NULL)
1054 return -EINVAL;
1055
1056 pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon);
1057
1058 dcon |= chan->dcon & dma_sel.dcon_mask;
1059
1060 pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon);
1061
1062 switch (xferunit) {
1063 case 1:
1064 dcon |= S3C2410_DCON_BYTE;
1065 break;
1066
1067 case 2:
1068 dcon |= S3C2410_DCON_HALFWORD;
1069 break;
1070
1071 case 4:
1072 dcon |= S3C2410_DCON_WORD;
1073 break;
1074
1075 default:
1076 pr_debug("%s: bad transfer size %d\n", __FUNCTION__, xferunit);
1077 return -EINVAL;
1078 }
1079
1080 dcon |= S3C2410_DCON_HWTRIG;
1081 dcon |= S3C2410_DCON_INTREQ;
1082
1083 pr_debug("%s: dcon now %08x\n", __FUNCTION__, dcon);
1084
1085 chan->dcon = dcon;
1086 chan->xfer_unit = xferunit;
1087
1088 return 0;
1089}
1090
1091EXPORT_SYMBOL(s3c2410_dma_config);
1092
1093int s3c2410_dma_setflags(dmach_t channel, unsigned int flags)
1094{
1095 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1096
1097 if (chan == NULL)
1098 return -EINVAL;
1099
1100 pr_debug("%s: chan=%p, flags=%08x\n", __FUNCTION__, chan, flags);
1101
1102 chan->flags = flags;
1103
1104 return 0;
1105}
1106
1107EXPORT_SYMBOL(s3c2410_dma_setflags);
1108
1109
1110/* do we need to protect the settings of the fields from
1111 * irq?
1112*/
1113
1114int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn)
1115{
1116 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1117
1118 if (chan == NULL)
1119 return -EINVAL;
1120
1121 pr_debug("%s: chan=%p, op rtn=%p\n", __FUNCTION__, chan, rtn);
1122
1123 chan->op_fn = rtn;
1124
1125 return 0;
1126}
1127
1128EXPORT_SYMBOL(s3c2410_dma_set_opfn);
1129
1130int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn)
1131{
1132 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1133
1134 if (chan == NULL)
1135 return -EINVAL;
1136
1137 pr_debug("%s: chan=%p, callback rtn=%p\n", __FUNCTION__, chan, rtn);
1138
1139 chan->callback_fn = rtn;
1140
1141 return 0;
1142}
1143
1144EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);
1145
1146/* s3c2410_dma_devconfig
1147 *
1148 * configure the dma source/destination hardware type and address
1149 *
1150 * source: S3C2410_DMASRC_HW: source is hardware
1151 * S3C2410_DMASRC_MEM: source is memory
1152 *
1153 * hwcfg: the value for xxxSTCn register,
1154 * bit 0: 0=increment pointer, 1=leave pointer
1155 * bit 1: 0=soucre is AHB, 1=soucre is APB
1156 *
1157 * devaddr: physical address of the source
1158*/
1159
1160int s3c2410_dma_devconfig(int channel,
1161 enum s3c2410_dmasrc source,
1162 int hwcfg,
1163 unsigned long devaddr)
1164{
1165 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1166
1167 if (chan == NULL)
1168 return -EINVAL;
1169
1170 pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n",
1171 __FUNCTION__, (int)source, hwcfg, devaddr);
1172
1173 chan->source = source;
1174 chan->dev_addr = devaddr;
1175
1176 switch (source) {
1177 case S3C2410_DMASRC_HW:
1178 /* source is hardware */
1179 pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n",
1180 __FUNCTION__, devaddr, hwcfg);
1181 dma_wrreg(chan, S3C2410_DMA_DISRCC, hwcfg & 3);
1182 dma_wrreg(chan, S3C2410_DMA_DISRC, devaddr);
1183 dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0));
1184
1185 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST);
1186 return 0;
1187
1188 case S3C2410_DMASRC_MEM:
1189 /* source is memory */
1190 pr_debug( "%s: mem source, devaddr=%08lx, hwcfg=%d\n",
1191 __FUNCTION__, devaddr, hwcfg);
1192 dma_wrreg(chan, S3C2410_DMA_DISRCC, (0<<1) | (0<<0));
1193 dma_wrreg(chan, S3C2410_DMA_DIDST, devaddr);
1194 dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3);
1195
1196 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DISRC);
1197 return 0;
1198 }
1199
1200 printk(KERN_ERR "dma%d: invalid source type (%d)\n", channel, source);
1201 return -EINVAL;
1202}
1203
1204EXPORT_SYMBOL(s3c2410_dma_devconfig);
1205
1206/* s3c2410_dma_getposition
1207 *
1208 * returns the current transfer points for the dma source and destination
1209*/
1210
1211int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
1212{
1213 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1214
1215 if (chan == NULL)
1216 return -EINVAL;
1217
1218 if (src != NULL)
1219 *src = dma_rdreg(chan, S3C2410_DMA_DCSRC);
1220
1221 if (dst != NULL)
1222 *dst = dma_rdreg(chan, S3C2410_DMA_DCDST);
1223
1224 return 0;
1225}
1226
1227EXPORT_SYMBOL(s3c2410_dma_getposition);
1228
1229
1230/* system device class */
1231
1232#ifdef CONFIG_PM
1233
1234static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
1235{
1236 struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev);
1237
1238 printk(KERN_DEBUG "suspending dma channel %d\n", cp->number);
1239
1240 if (dma_rdreg(cp, S3C2410_DMA_DMASKTRIG) & S3C2410_DMASKTRIG_ON) {
1241 /* the dma channel is still working, which is probably
1242 * a bad thing to do over suspend/resume. We stop the
1243 * channel and assume that the client is either going to
1244 * retry after resume, or that it is broken.
1245 */
1246
1247 printk(KERN_INFO "dma: stopping channel %d due to suspend\n",
1248 cp->number);
1249
1250 s3c2410_dma_dostop(cp);
1251 }
1252
1253 return 0;
1254}
1255
1256static int s3c2410_dma_resume(struct sys_device *dev)
1257{
1258 return 0;
1259}
1260
1261#else
1262#define s3c2410_dma_suspend NULL
1263#define s3c2410_dma_resume NULL
1264#endif /* CONFIG_PM */
1265
1266struct sysdev_class dma_sysclass = {
1267 set_kset_name("s3c24xx-dma"),
1268 .suspend = s3c2410_dma_suspend,
1269 .resume = s3c2410_dma_resume,
1270}; 172};
1271 173
1272/* kmem cache implementation */ 174static int __init s3c2442_dma_drvinit(void)
1273
1274static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
1275{
1276 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1277}
1278
1279/* initialisation code */
1280
1281static int __init s3c2410_init_dma(void)
1282{
1283 struct s3c2410_dma_chan *cp;
1284 int channel;
1285 int ret;
1286
1287 printk("S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics\n");
1288
1289 dma_base = ioremap(S3C24XX_PA_DMA, 0x200);
1290 if (dma_base == NULL) {
1291 printk(KERN_ERR "dma failed to remap register block\n");
1292 return -ENOMEM;
1293 }
1294
1295 printk("Registering sysclass\n");
1296
1297 ret = sysdev_class_register(&dma_sysclass);
1298 if (ret != 0) {
1299 printk(KERN_ERR "dma sysclass registration failed\n");
1300 goto err;
1301 }
1302
1303 dma_kmem = kmem_cache_create("dma_desc", sizeof(struct s3c2410_dma_buf), 0,
1304 SLAB_HWCACHE_ALIGN,
1305 s3c2410_dma_cache_ctor, NULL);
1306
1307 if (dma_kmem == NULL) {
1308 printk(KERN_ERR "dma failed to make kmem cache\n");
1309 ret = -ENOMEM;
1310 goto err;
1311 }
1312
1313 for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) {
1314 cp = &s3c2410_chans[channel];
1315
1316 memset(cp, 0, sizeof(struct s3c2410_dma_chan));
1317
1318 /* dma channel irqs are in order.. */
1319 cp->number = channel;
1320 cp->irq = channel + IRQ_DMA0;
1321 cp->regs = dma_base + (channel*0x40);
1322
1323 /* point current stats somewhere */
1324 cp->stats = &cp->stats_store;
1325 cp->stats_store.timeout_shortest = LONG_MAX;
1326
1327 /* basic channel configuration */
1328
1329 cp->load_timeout = 1<<18;
1330
1331 /* register system device */
1332
1333 cp->dev.cls = &dma_sysclass;
1334 cp->dev.id = channel;
1335 ret = sysdev_register(&cp->dev);
1336
1337 printk("DMA channel %d at %p, irq %d\n",
1338 cp->number, cp->regs, cp->irq);
1339 }
1340
1341 return 0;
1342
1343 err:
1344 kmem_cache_destroy(dma_kmem);
1345 iounmap(dma_base);
1346 dma_base = NULL;
1347 return ret;
1348}
1349
1350core_initcall(s3c2410_init_dma);
1351
1352static inline int is_channel_valid(unsigned int channel)
1353{ 175{
1354 return (channel & DMA_CH_VALID); 176 return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver);
1355} 177}
1356 178
1357/* s3c2410_dma_map_channel() 179arch_initcall(s3c2442_dma_drvinit);
1358 * 180#endif
1359 * turn the virtual channel number into a real, and un-used hardware
1360 * channel.
1361 *
1362 * currently this code uses first-free channel from the specified harware
1363 * map, not taking into account anything that the board setup code may
1364 * have to say about the likely peripheral set to be in use.
1365*/
1366
1367struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel)
1368{
1369 struct s3c24xx_dma_map *ch_map;
1370 struct s3c2410_dma_chan *dmach;
1371 int ch;
1372
1373 if (dma_sel.map == NULL || channel > dma_sel.map_size)
1374 return NULL;
1375
1376 ch_map = dma_sel.map + channel;
1377
1378 for (ch = 0; ch < S3C2410_DMA_CHANNELS; ch++) {
1379 if (!is_channel_valid(ch_map->channels[ch]))
1380 continue;
1381
1382 if (s3c2410_chans[ch].in_use == 0) {
1383 printk("mapped channel %d to %d\n", channel, ch);
1384 break;
1385 }
1386 }
1387
1388 if (ch >= S3C2410_DMA_CHANNELS)
1389 return NULL;
1390
1391 /* update our channel mapping */
1392
1393 dmach = &s3c2410_chans[ch];
1394 dma_chan_map[channel] = dmach;
1395
1396 /* select the channel */
1397
1398 (dma_sel.select)(dmach, ch_map);
1399
1400 return dmach;
1401}
1402
1403static void s3c24xx_dma_show_ch(struct s3c24xx_dma_map *map, int ch)
1404{
1405 /* show the channel configuration */
1406
1407 printk("%2d: %20s, channels %c%c%c%c\n", ch, map->name,
1408 (is_channel_valid(map->channels[0]) ? '0' : '-'),
1409 (is_channel_valid(map->channels[1]) ? '1' : '-'),
1410 (is_channel_valid(map->channels[2]) ? '2' : '-'),
1411 (is_channel_valid(map->channels[3]) ? '3' : '-'));
1412}
1413
1414static int s3c24xx_dma_check_entry(struct s3c24xx_dma_map *map, int ch)
1415{
1416 if (1)
1417 s3c24xx_dma_show_ch(map, ch);
1418
1419 return 0;
1420}
1421
1422int __init s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel)
1423{
1424 struct s3c24xx_dma_map *nmap;
1425 size_t map_sz = sizeof(*nmap) * sel->map_size;
1426 int ptr;
1427
1428 nmap = kmalloc(map_sz, GFP_KERNEL);
1429 if (nmap == NULL)
1430 return -ENOMEM;
1431
1432 memcpy(nmap, sel->map, map_sz);
1433 memcpy(&dma_sel, sel, sizeof(*sel));
1434
1435 dma_sel.map = nmap;
1436
1437 for (ptr = 0; ptr < sel->map_size; ptr++)
1438 s3c24xx_dma_check_entry(nmap+ptr, ptr);
1439 181
1440 return 0;
1441}
diff --git a/arch/arm/mach-s3c2410/dma.h b/arch/arm/mach-s3c2410/dma.h
deleted file mode 100644
index 0ebfe0aab80b..000000000000
--- a/arch/arm/mach-s3c2410/dma.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/* arch/arm/mach-s3c2410/dma.h
2 *
3 * Copyright (C) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C24XX DMA support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13extern struct sysdev_class dma_sysclass;
14extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
15
16#define DMA_CH_VALID (1<<31)
17
18struct s3c24xx_dma_addr {
19 unsigned long from;
20 unsigned long to;
21};
22
23/* struct s3c24xx_dma_map
24 *
25 * this holds the mapping information for the channel selected
26 * to be connected to the specified device
27*/
28
29struct s3c24xx_dma_map {
30 const char *name;
31 struct s3c24xx_dma_addr hw_addr;
32
33 unsigned long channels[S3C2410_DMA_CHANNELS];
34};
35
36struct s3c24xx_dma_selection {
37 struct s3c24xx_dma_map *map;
38 unsigned long map_size;
39 unsigned long dcon_mask;
40
41 void (*select)(struct s3c2410_dma_chan *chan,
42 struct s3c24xx_dma_map *map);
43};
44
45extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
index f6fb215bb48c..01e795d1146e 100644
--- a/arch/arm/mach-s3c2410/gpio.c
+++ b/arch/arm/mach-s3c2410/gpio.c
@@ -1,9 +1,9 @@
1/* linux/arch/arm/mach-s3c2410/gpio.c 1/* linux/arch/arm/mach-s3c2410/gpio.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C24XX GPIO support 6 * S3C2410 GPIO support
7 * 7 *
8 * 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
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@
18 * You should have received a copy of the GNU General Public License 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 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 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/ 21 */
22
23 22
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/init.h> 24#include <linux/init.h>
@@ -33,156 +32,40 @@
33 32
34#include <asm/arch/regs-gpio.h> 33#include <asm/arch/regs-gpio.h>
35 34
36void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) 35int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
37{ 36 unsigned int config)
38 void __iomem *base = S3C24XX_GPIO_BASE(pin);
39 unsigned long mask;
40 unsigned long con;
41 unsigned long flags;
42
43 if (pin < S3C2410_GPIO_BANKB) {
44 mask = 1 << S3C2410_GPIO_OFFSET(pin);
45 } else {
46 mask = 3 << S3C2410_GPIO_OFFSET(pin)*2;
47 }
48
49 switch (function) {
50 case S3C2410_GPIO_LEAVE:
51 mask = 0;
52 function = 0;
53 break;
54
55 case S3C2410_GPIO_INPUT:
56 case S3C2410_GPIO_OUTPUT:
57 case S3C2410_GPIO_SFN2:
58 case S3C2410_GPIO_SFN3:
59 if (pin < S3C2410_GPIO_BANKB) {
60 function -= 1;
61 function &= 1;
62 function <<= S3C2410_GPIO_OFFSET(pin);
63 } else {
64 function &= 3;
65 function <<= S3C2410_GPIO_OFFSET(pin)*2;
66 }
67 }
68
69 /* modify the specified register wwith IRQs off */
70
71 local_irq_save(flags);
72
73 con = __raw_readl(base + 0x00);
74 con &= ~mask;
75 con |= function;
76
77 __raw_writel(con, base + 0x00);
78
79 local_irq_restore(flags);
80}
81
82EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
83
84unsigned int s3c2410_gpio_getcfg(unsigned int pin)
85{
86 void __iomem *base = S3C24XX_GPIO_BASE(pin);
87 unsigned long val = __raw_readl(base);
88
89 if (pin < S3C2410_GPIO_BANKB) {
90 val >>= S3C2410_GPIO_OFFSET(pin);
91 val &= 1;
92 val += 1;
93 } else {
94 val >>= S3C2410_GPIO_OFFSET(pin)*2;
95 val &= 3;
96 }
97
98 return val | S3C2410_GPIO_INPUT;
99}
100
101EXPORT_SYMBOL(s3c2410_gpio_getcfg);
102
103void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
104{ 37{
105 void __iomem *base = S3C24XX_GPIO_BASE(pin); 38 void __iomem *reg = S3C24XX_EINFLT0;
106 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
107 unsigned long flags; 39 unsigned long flags;
108 unsigned long up; 40 unsigned long val;
109
110 if (pin < S3C2410_GPIO_BANKB)
111 return;
112
113 local_irq_save(flags);
114
115 up = __raw_readl(base + 0x08);
116 up &= ~(1L << offs);
117 up |= to << offs;
118 __raw_writel(up, base + 0x08);
119 41
120 local_irq_restore(flags); 42 if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15)
121} 43 return -1;
122 44
123EXPORT_SYMBOL(s3c2410_gpio_pullup); 45 config &= 0xff;
124 46
125void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) 47 pin -= S3C2410_GPG8;
126{ 48 reg += pin & ~3;
127 void __iomem *base = S3C24XX_GPIO_BASE(pin);
128 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
129 unsigned long flags;
130 unsigned long dat;
131 49
132 local_irq_save(flags); 50 local_irq_save(flags);
133 51
134 dat = __raw_readl(base + 0x04); 52 /* update filter width and clock source */
135 dat &= ~(1 << offs);
136 dat |= to << offs;
137 __raw_writel(dat, base + 0x04);
138
139 local_irq_restore(flags);
140}
141
142EXPORT_SYMBOL(s3c2410_gpio_setpin);
143
144unsigned int s3c2410_gpio_getpin(unsigned int pin)
145{
146 void __iomem *base = S3C24XX_GPIO_BASE(pin);
147 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
148 53
149 return __raw_readl(base + 0x04) & (1<< offs); 54 val = __raw_readl(reg);
150} 55 val &= ~(0xff << ((pin & 3) * 8));
56 val |= config << ((pin & 3) * 8);
57 __raw_writel(val, reg);
151 58
152EXPORT_SYMBOL(s3c2410_gpio_getpin); 59 /* update filter enable */
153 60
154unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change) 61 val = __raw_readl(S3C24XX_EXTINT2);
155{ 62 val &= ~(1 << ((pin * 4) + 3));
156 unsigned long flags; 63 val |= on << ((pin * 4) + 3);
157 unsigned long misccr; 64 __raw_writel(val, S3C24XX_EXTINT2);
158 65
159 local_irq_save(flags);
160 misccr = __raw_readl(S3C24XX_MISCCR);
161 misccr &= ~clear;
162 misccr ^= change;
163 __raw_writel(misccr, S3C24XX_MISCCR);
164 local_irq_restore(flags); 66 local_irq_restore(flags);
165 67
166 return misccr; 68 return 0;
167}
168
169EXPORT_SYMBOL(s3c2410_modify_misccr);
170
171int s3c2410_gpio_getirq(unsigned int pin)
172{
173 if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15)
174 return -1; /* not valid interrupts */
175
176 if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7)
177 return -1; /* not valid pin */
178
179 if (pin < S3C2410_GPF4)
180 return (pin - S3C2410_GPF0) + IRQ_EINT0;
181
182 if (pin < S3C2410_GPG0)
183 return (pin - S3C2410_GPF4) + IRQ_EINT4;
184
185 return (pin - S3C2410_GPG0) + IRQ_EINT8;
186} 69}
187 70
188EXPORT_SYMBOL(s3c2410_gpio_getirq); 71EXPORT_SYMBOL(s3c2410_gpio_irqfilter);
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
index 3c0ed7871c55..53cbdaa43ac6 100644
--- a/arch/arm/mach-s3c2410/irq.c
+++ b/arch/arm/mach-s3c2410/irq.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/mach-s3c2410/irq.c 1/* linux/arch/arm/mach-s3c2410/irq.c
2 * 2 *
3 * Copyright (c) 2003,2004 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
@@ -17,37 +17,6 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * 19 *
20 * Changelog:
21 *
22 * 22-Jul-2004 Ben Dooks <ben@simtec.co.uk>
23 * Fixed compile warnings
24 *
25 * 22-Jul-2004 Roc Wu <cooloney@yahoo.com.cn>
26 * Fixed s3c_extirq_type
27 *
28 * 21-Jul-2004 Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
29 * Addition of ADC/TC demux
30 *
31 * 04-Oct-2004 Klaus Fetscher <k.fetscher@fetron.de>
32 * Fix for set_irq_type() on low EINT numbers
33 *
34 * 05-Oct-2004 Ben Dooks <ben@simtec.co.uk>
35 * Tidy up KF's patch and sort out new release
36 *
37 * 05-Oct-2004 Ben Dooks <ben@simtec.co.uk>
38 * Add support for power management controls
39 *
40 * 04-Nov-2004 Ben Dooks
41 * Fix standard IRQ wake for EINT0..4 and RTC
42 *
43 * 22-Feb-2005 Ben Dooks
44 * Fixed edge-triggering on ADC IRQ
45 *
46 * 28-Jun-2005 Ben Dooks
47 * Mark IRQ_LCD valid
48 *
49 * 25-Jul-2005 Ben Dooks
50 * Split the S3C2440 IRQ code to seperate file
51*/ 20*/
52 21
53#include <linux/init.h> 22#include <linux/init.h>
@@ -57,745 +26,23 @@
57#include <linux/ptrace.h> 26#include <linux/ptrace.h>
58#include <linux/sysdev.h> 27#include <linux/sysdev.h>
59 28
60#include <asm/hardware.h> 29#include <asm/plat-s3c24xx/cpu.h>
61#include <asm/irq.h> 30#include <asm/plat-s3c24xx/pm.h>
62#include <asm/io.h>
63
64#include <asm/mach/irq.h>
65
66#include <asm/arch/regs-irq.h>
67#include <asm/arch/regs-gpio.h>
68
69#include "cpu.h"
70#include "pm.h"
71#include "irq.h"
72
73/* wakeup irq control */
74
75#ifdef CONFIG_PM
76
77/* state for IRQs over sleep */
78
79/* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources
80 *
81 * set bit to 1 in allow bitfield to enable the wakeup settings on it
82*/
83
84unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL;
85unsigned long s3c_irqwake_intmask = 0xffffffffL;
86unsigned long s3c_irqwake_eintallow = 0x0000fff0L;
87unsigned long s3c_irqwake_eintmask = 0xffffffffL;
88
89int
90s3c_irq_wake(unsigned int irqno, unsigned int state)
91{
92 unsigned long irqbit = 1 << (irqno - IRQ_EINT0);
93
94 if (!(s3c_irqwake_intallow & irqbit))
95 return -ENOENT;
96
97 printk(KERN_INFO "wake %s for irq %d\n",
98 state ? "enabled" : "disabled", irqno);
99
100 if (!state)
101 s3c_irqwake_intmask |= irqbit;
102 else
103 s3c_irqwake_intmask &= ~irqbit;
104
105 return 0;
106}
107
108static int
109s3c_irqext_wake(unsigned int irqno, unsigned int state)
110{
111 unsigned long bit = 1L << (irqno - EXTINT_OFF);
112
113 if (!(s3c_irqwake_eintallow & bit))
114 return -ENOENT;
115
116 printk(KERN_INFO "wake %s for irq %d\n",
117 state ? "enabled" : "disabled", irqno);
118
119 if (!state)
120 s3c_irqwake_eintmask |= bit;
121 else
122 s3c_irqwake_eintmask &= ~bit;
123
124 return 0;
125}
126
127#else
128#define s3c_irqext_wake NULL
129#define s3c_irq_wake NULL
130#endif
131
132
133static void
134s3c_irq_mask(unsigned int irqno)
135{
136 unsigned long mask;
137
138 irqno -= IRQ_EINT0;
139
140 mask = __raw_readl(S3C2410_INTMSK);
141 mask |= 1UL << irqno;
142 __raw_writel(mask, S3C2410_INTMSK);
143}
144
145static inline void
146s3c_irq_ack(unsigned int irqno)
147{
148 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
149
150 __raw_writel(bitval, S3C2410_SRCPND);
151 __raw_writel(bitval, S3C2410_INTPND);
152}
153
154static inline void
155s3c_irq_maskack(unsigned int irqno)
156{
157 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
158 unsigned long mask;
159
160 mask = __raw_readl(S3C2410_INTMSK);
161 __raw_writel(mask|bitval, S3C2410_INTMSK);
162
163 __raw_writel(bitval, S3C2410_SRCPND);
164 __raw_writel(bitval, S3C2410_INTPND);
165}
166
167
168static void
169s3c_irq_unmask(unsigned int irqno)
170{
171 unsigned long mask;
172
173 if (irqno != IRQ_TIMER4 && irqno != IRQ_EINT8t23)
174 irqdbf2("s3c_irq_unmask %d\n", irqno);
175
176 irqno -= IRQ_EINT0;
177
178 mask = __raw_readl(S3C2410_INTMSK);
179 mask &= ~(1UL << irqno);
180 __raw_writel(mask, S3C2410_INTMSK);
181}
182
183struct irq_chip s3c_irq_level_chip = {
184 .name = "s3c-level",
185 .ack = s3c_irq_maskack,
186 .mask = s3c_irq_mask,
187 .unmask = s3c_irq_unmask,
188 .set_wake = s3c_irq_wake
189};
190
191static struct irq_chip s3c_irq_chip = {
192 .name = "s3c",
193 .ack = s3c_irq_ack,
194 .mask = s3c_irq_mask,
195 .unmask = s3c_irq_unmask,
196 .set_wake = s3c_irq_wake
197};
198
199static void
200s3c_irqext_mask(unsigned int irqno)
201{
202 unsigned long mask;
203
204 irqno -= EXTINT_OFF;
205
206 mask = __raw_readl(S3C24XX_EINTMASK);
207 mask |= ( 1UL << irqno);
208 __raw_writel(mask, S3C24XX_EINTMASK);
209}
210
211static void
212s3c_irqext_ack(unsigned int irqno)
213{
214 unsigned long req;
215 unsigned long bit;
216 unsigned long mask;
217 31
218 bit = 1UL << (irqno - EXTINT_OFF); 32static int s3c2410_irq_add(struct sys_device *sysdev)
219
220 mask = __raw_readl(S3C24XX_EINTMASK);
221
222 __raw_writel(bit, S3C24XX_EINTPEND);
223
224 req = __raw_readl(S3C24XX_EINTPEND);
225 req &= ~mask;
226
227 /* not sure if we should be acking the parent irq... */
228
229 if (irqno <= IRQ_EINT7 ) {
230 if ((req & 0xf0) == 0)
231 s3c_irq_ack(IRQ_EINT4t7);
232 } else {
233 if ((req >> 8) == 0)
234 s3c_irq_ack(IRQ_EINT8t23);
235 }
236}
237
238static void
239s3c_irqext_unmask(unsigned int irqno)
240{ 33{
241 unsigned long mask;
242
243 irqno -= EXTINT_OFF;
244
245 mask = __raw_readl(S3C24XX_EINTMASK);
246 mask &= ~( 1UL << irqno);
247 __raw_writel(mask, S3C24XX_EINTMASK);
248}
249
250int
251s3c_irqext_type(unsigned int irq, unsigned int type)
252{
253 void __iomem *extint_reg;
254 void __iomem *gpcon_reg;
255 unsigned long gpcon_offset, extint_offset;
256 unsigned long newvalue = 0, value;
257
258 if ((irq >= IRQ_EINT0) && (irq <= IRQ_EINT3))
259 {
260 gpcon_reg = S3C2410_GPFCON;
261 extint_reg = S3C24XX_EXTINT0;
262 gpcon_offset = (irq - IRQ_EINT0) * 2;
263 extint_offset = (irq - IRQ_EINT0) * 4;
264 }
265 else if ((irq >= IRQ_EINT4) && (irq <= IRQ_EINT7))
266 {
267 gpcon_reg = S3C2410_GPFCON;
268 extint_reg = S3C24XX_EXTINT0;
269 gpcon_offset = (irq - (EXTINT_OFF)) * 2;
270 extint_offset = (irq - (EXTINT_OFF)) * 4;
271 }
272 else if ((irq >= IRQ_EINT8) && (irq <= IRQ_EINT15))
273 {
274 gpcon_reg = S3C2410_GPGCON;
275 extint_reg = S3C24XX_EXTINT1;
276 gpcon_offset = (irq - IRQ_EINT8) * 2;
277 extint_offset = (irq - IRQ_EINT8) * 4;
278 }
279 else if ((irq >= IRQ_EINT16) && (irq <= IRQ_EINT23))
280 {
281 gpcon_reg = S3C2410_GPGCON;
282 extint_reg = S3C24XX_EXTINT2;
283 gpcon_offset = (irq - IRQ_EINT8) * 2;
284 extint_offset = (irq - IRQ_EINT16) * 4;
285 } else
286 return -1;
287
288 /* Set the GPIO to external interrupt mode */
289 value = __raw_readl(gpcon_reg);
290 value = (value & ~(3 << gpcon_offset)) | (0x02 << gpcon_offset);
291 __raw_writel(value, gpcon_reg);
292
293 /* Set the external interrupt to pointed trigger type */
294 switch (type)
295 {
296 case IRQT_NOEDGE:
297 printk(KERN_WARNING "No edge setting!\n");
298 break;
299
300 case IRQT_RISING:
301 newvalue = S3C2410_EXTINT_RISEEDGE;
302 break;
303
304 case IRQT_FALLING:
305 newvalue = S3C2410_EXTINT_FALLEDGE;
306 break;
307
308 case IRQT_BOTHEDGE:
309 newvalue = S3C2410_EXTINT_BOTHEDGE;
310 break;
311
312 case IRQT_LOW:
313 newvalue = S3C2410_EXTINT_LOWLEV;
314 break;
315
316 case IRQT_HIGH:
317 newvalue = S3C2410_EXTINT_HILEV;
318 break;
319
320 default:
321 printk(KERN_ERR "No such irq type %d", type);
322 return -1;
323 }
324
325 value = __raw_readl(extint_reg);
326 value = (value & ~(7 << extint_offset)) | (newvalue << extint_offset);
327 __raw_writel(value, extint_reg);
328
329 return 0; 34 return 0;
330} 35}
331 36
332static struct irq_chip s3c_irqext_chip = { 37static struct sysdev_driver s3c2410_irq_driver = {
333 .name = "s3c-ext", 38 .add = s3c2410_irq_add,
334 .mask = s3c_irqext_mask, 39 .suspend = s3c24xx_irq_suspend,
335 .unmask = s3c_irqext_unmask, 40 .resume = s3c24xx_irq_resume,
336 .ack = s3c_irqext_ack,
337 .set_type = s3c_irqext_type,
338 .set_wake = s3c_irqext_wake
339};
340
341static struct irq_chip s3c_irq_eint0t4 = {
342 .name = "s3c-ext0",
343 .ack = s3c_irq_ack,
344 .mask = s3c_irq_mask,
345 .unmask = s3c_irq_unmask,
346 .set_wake = s3c_irq_wake,
347 .set_type = s3c_irqext_type,
348};
349
350/* mask values for the parent registers for each of the interrupt types */
351
352#define INTMSK_UART0 (1UL << (IRQ_UART0 - IRQ_EINT0))
353#define INTMSK_UART1 (1UL << (IRQ_UART1 - IRQ_EINT0))
354#define INTMSK_UART2 (1UL << (IRQ_UART2 - IRQ_EINT0))
355#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))
356
357
358/* UART0 */
359
360static void
361s3c_irq_uart0_mask(unsigned int irqno)
362{
363 s3c_irqsub_mask(irqno, INTMSK_UART0, 7);
364}
365
366static void
367s3c_irq_uart0_unmask(unsigned int irqno)
368{
369 s3c_irqsub_unmask(irqno, INTMSK_UART0);
370}
371
372static void
373s3c_irq_uart0_ack(unsigned int irqno)
374{
375 s3c_irqsub_maskack(irqno, INTMSK_UART0, 7);
376}
377
378static struct irq_chip s3c_irq_uart0 = {
379 .name = "s3c-uart0",
380 .mask = s3c_irq_uart0_mask,
381 .unmask = s3c_irq_uart0_unmask,
382 .ack = s3c_irq_uart0_ack,
383};
384
385/* UART1 */
386
387static void
388s3c_irq_uart1_mask(unsigned int irqno)
389{
390 s3c_irqsub_mask(irqno, INTMSK_UART1, 7 << 3);
391}
392
393static void
394s3c_irq_uart1_unmask(unsigned int irqno)
395{
396 s3c_irqsub_unmask(irqno, INTMSK_UART1);
397}
398
399static void
400s3c_irq_uart1_ack(unsigned int irqno)
401{
402 s3c_irqsub_maskack(irqno, INTMSK_UART1, 7 << 3);
403}
404
405static struct irq_chip s3c_irq_uart1 = {
406 .name = "s3c-uart1",
407 .mask = s3c_irq_uart1_mask,
408 .unmask = s3c_irq_uart1_unmask,
409 .ack = s3c_irq_uart1_ack,
410};
411
412/* UART2 */
413
414static void
415s3c_irq_uart2_mask(unsigned int irqno)
416{
417 s3c_irqsub_mask(irqno, INTMSK_UART2, 7 << 6);
418}
419
420static void
421s3c_irq_uart2_unmask(unsigned int irqno)
422{
423 s3c_irqsub_unmask(irqno, INTMSK_UART2);
424}
425
426static void
427s3c_irq_uart2_ack(unsigned int irqno)
428{
429 s3c_irqsub_maskack(irqno, INTMSK_UART2, 7 << 6);
430}
431
432static struct irq_chip s3c_irq_uart2 = {
433 .name = "s3c-uart2",
434 .mask = s3c_irq_uart2_mask,
435 .unmask = s3c_irq_uart2_unmask,
436 .ack = s3c_irq_uart2_ack,
437};
438
439/* ADC and Touchscreen */
440
441static void
442s3c_irq_adc_mask(unsigned int irqno)
443{
444 s3c_irqsub_mask(irqno, INTMSK_ADCPARENT, 3 << 9);
445}
446
447static void
448s3c_irq_adc_unmask(unsigned int irqno)
449{
450 s3c_irqsub_unmask(irqno, INTMSK_ADCPARENT);
451}
452
453static void
454s3c_irq_adc_ack(unsigned int irqno)
455{
456 s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9);
457}
458
459static struct irq_chip s3c_irq_adc = {
460 .name = "s3c-adc",
461 .mask = s3c_irq_adc_mask,
462 .unmask = s3c_irq_adc_unmask,
463 .ack = s3c_irq_adc_ack,
464};
465
466/* irq demux for adc */
467static void s3c_irq_demux_adc(unsigned int irq,
468 struct irq_desc *desc)
469{
470 unsigned int subsrc, submsk;
471 unsigned int offset = 9;
472 struct irq_desc *mydesc;
473
474 /* read the current pending interrupts, and the mask
475 * for what it is available */
476
477 subsrc = __raw_readl(S3C2410_SUBSRCPND);
478 submsk = __raw_readl(S3C2410_INTSUBMSK);
479
480 subsrc &= ~submsk;
481 subsrc >>= offset;
482 subsrc &= 3;
483
484 if (subsrc != 0) {
485 if (subsrc & 1) {
486 mydesc = irq_desc + IRQ_TC;
487 desc_handle_irq(IRQ_TC, mydesc);
488 }
489 if (subsrc & 2) {
490 mydesc = irq_desc + IRQ_ADC;
491 desc_handle_irq(IRQ_ADC, mydesc);
492 }
493 }
494}
495
496static void s3c_irq_demux_uart(unsigned int start)
497{
498 unsigned int subsrc, submsk;
499 unsigned int offset = start - IRQ_S3CUART_RX0;
500 struct irq_desc *desc;
501
502 /* read the current pending interrupts, and the mask
503 * for what it is available */
504
505 subsrc = __raw_readl(S3C2410_SUBSRCPND);
506 submsk = __raw_readl(S3C2410_INTSUBMSK);
507
508 irqdbf2("s3c_irq_demux_uart: start=%d (%d), subsrc=0x%08x,0x%08x\n",
509 start, offset, subsrc, submsk);
510
511 subsrc &= ~submsk;
512 subsrc >>= offset;
513 subsrc &= 7;
514
515 if (subsrc != 0) {
516 desc = irq_desc + start;
517
518 if (subsrc & 1)
519 desc_handle_irq(start, desc);
520
521 desc++;
522
523 if (subsrc & 2)
524 desc_handle_irq(start+1, desc);
525
526 desc++;
527
528 if (subsrc & 4)
529 desc_handle_irq(start+2, desc);
530 }
531}
532
533/* uart demux entry points */
534
535static void
536s3c_irq_demux_uart0(unsigned int irq,
537 struct irq_desc *desc)
538{
539 irq = irq;
540 s3c_irq_demux_uart(IRQ_S3CUART_RX0);
541}
542
543static void
544s3c_irq_demux_uart1(unsigned int irq,
545 struct irq_desc *desc)
546{
547 irq = irq;
548 s3c_irq_demux_uart(IRQ_S3CUART_RX1);
549}
550
551static void
552s3c_irq_demux_uart2(unsigned int irq,
553 struct irq_desc *desc)
554{
555 irq = irq;
556 s3c_irq_demux_uart(IRQ_S3CUART_RX2);
557}
558
559static void
560s3c_irq_demux_extint8(unsigned int irq,
561 struct irq_desc *desc)
562{
563 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
564 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
565
566 eintpnd &= ~eintmsk;
567 eintpnd &= ~0xff; /* ignore lower irqs */
568
569 /* we may as well handle all the pending IRQs here */
570
571 while (eintpnd) {
572 irq = __ffs(eintpnd);
573 eintpnd &= ~(1<<irq);
574
575 irq += (IRQ_EINT4 - 4);
576 desc_handle_irq(irq, irq_desc + irq);
577 }
578
579}
580
581static void
582s3c_irq_demux_extint4t7(unsigned int irq,
583 struct irq_desc *desc)
584{
585 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
586 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
587
588 eintpnd &= ~eintmsk;
589 eintpnd &= 0xff; /* only lower irqs */
590
591 /* we may as well handle all the pending IRQs here */
592
593 while (eintpnd) {
594 irq = __ffs(eintpnd);
595 eintpnd &= ~(1<<irq);
596
597 irq += (IRQ_EINT4 - 4);
598
599 desc_handle_irq(irq, irq_desc + irq);
600 }
601}
602
603#ifdef CONFIG_PM
604
605static struct sleep_save irq_save[] = {
606 SAVE_ITEM(S3C2410_INTMSK),
607 SAVE_ITEM(S3C2410_INTSUBMSK),
608}; 41};
609 42
610/* the extint values move between the s3c2410/s3c2440 and the s3c2412 43static int s3c2410_irq_init(void)
611 * so we use an array to hold them, and to calculate the address of
612 * the register at run-time
613*/
614
615static unsigned long save_extint[3];
616static unsigned long save_eintflt[4];
617static unsigned long save_eintmask;
618
619int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state)
620{ 44{
621 unsigned int i; 45 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_irq_driver);
622
623 for (i = 0; i < ARRAY_SIZE(save_extint); i++)
624 save_extint[i] = __raw_readl(S3C24XX_EXTINT0 + (i*4));
625
626 for (i = 0; i < ARRAY_SIZE(save_eintflt); i++)
627 save_eintflt[i] = __raw_readl(S3C24XX_EINFLT0 + (i*4));
628
629 s3c2410_pm_do_save(irq_save, ARRAY_SIZE(irq_save));
630 save_eintmask = __raw_readl(S3C24XX_EINTMASK);
631
632 return 0;
633} 46}
634 47
635int s3c24xx_irq_resume(struct sys_device *dev) 48arch_initcall(s3c2410_irq_init);
636{
637 unsigned int i;
638
639 for (i = 0; i < ARRAY_SIZE(save_extint); i++)
640 __raw_writel(save_extint[i], S3C24XX_EXTINT0 + (i*4));
641
642 for (i = 0; i < ARRAY_SIZE(save_eintflt); i++)
643 __raw_writel(save_eintflt[i], S3C24XX_EINFLT0 + (i*4));
644
645 s3c2410_pm_do_restore(irq_save, ARRAY_SIZE(irq_save));
646 __raw_writel(save_eintmask, S3C24XX_EINTMASK);
647
648 return 0;
649}
650
651#else
652#define s3c24xx_irq_suspend NULL
653#define s3c24xx_irq_resume NULL
654#endif
655
656/* s3c24xx_init_irq
657 *
658 * Initialise S3C2410 IRQ system
659*/
660
661void __init s3c24xx_init_irq(void)
662{
663 unsigned long pend;
664 unsigned long last;
665 int irqno;
666 int i;
667
668 irqdbf("s3c2410_init_irq: clearing interrupt status flags\n");
669
670 /* first, clear all interrupts pending... */
671
672 last = 0;
673 for (i = 0; i < 4; i++) {
674 pend = __raw_readl(S3C24XX_EINTPEND);
675
676 if (pend == 0 || pend == last)
677 break;
678
679 __raw_writel(pend, S3C24XX_EINTPEND);
680 printk("irq: clearing pending ext status %08x\n", (int)pend);
681 last = pend;
682 }
683
684 last = 0;
685 for (i = 0; i < 4; i++) {
686 pend = __raw_readl(S3C2410_INTPND);
687
688 if (pend == 0 || pend == last)
689 break;
690
691 __raw_writel(pend, S3C2410_SRCPND);
692 __raw_writel(pend, S3C2410_INTPND);
693 printk("irq: clearing pending status %08x\n", (int)pend);
694 last = pend;
695 }
696
697 last = 0;
698 for (i = 0; i < 4; i++) {
699 pend = __raw_readl(S3C2410_SUBSRCPND);
700
701 if (pend == 0 || pend == last)
702 break;
703
704 printk("irq: clearing subpending status %08x\n", (int)pend);
705 __raw_writel(pend, S3C2410_SUBSRCPND);
706 last = pend;
707 }
708
709 /* register the main interrupts */
710
711 irqdbf("s3c2410_init_irq: registering s3c2410 interrupt handlers\n");
712
713 for (irqno = IRQ_EINT4t7; irqno <= IRQ_ADCPARENT; irqno++) {
714 /* set all the s3c2410 internal irqs */
715
716 switch (irqno) {
717 /* deal with the special IRQs (cascaded) */
718
719 case IRQ_EINT4t7:
720 case IRQ_EINT8t23:
721 case IRQ_UART0:
722 case IRQ_UART1:
723 case IRQ_UART2:
724 case IRQ_ADCPARENT:
725 set_irq_chip(irqno, &s3c_irq_level_chip);
726 set_irq_handler(irqno, handle_level_irq);
727 break;
728
729 case IRQ_RESERVED6:
730 case IRQ_RESERVED24:
731 /* no IRQ here */
732 break;
733
734 default:
735 //irqdbf("registering irq %d (s3c irq)\n", irqno);
736 set_irq_chip(irqno, &s3c_irq_chip);
737 set_irq_handler(irqno, handle_edge_irq);
738 set_irq_flags(irqno, IRQF_VALID);
739 }
740 }
741
742 /* setup the cascade irq handlers */
743
744 set_irq_chained_handler(IRQ_EINT4t7, s3c_irq_demux_extint4t7);
745 set_irq_chained_handler(IRQ_EINT8t23, s3c_irq_demux_extint8);
746
747 set_irq_chained_handler(IRQ_UART0, s3c_irq_demux_uart0);
748 set_irq_chained_handler(IRQ_UART1, s3c_irq_demux_uart1);
749 set_irq_chained_handler(IRQ_UART2, s3c_irq_demux_uart2);
750 set_irq_chained_handler(IRQ_ADCPARENT, s3c_irq_demux_adc);
751
752 /* external interrupts */
753
754 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
755 irqdbf("registering irq %d (ext int)\n", irqno);
756 set_irq_chip(irqno, &s3c_irq_eint0t4);
757 set_irq_handler(irqno, handle_edge_irq);
758 set_irq_flags(irqno, IRQF_VALID);
759 }
760
761 for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) {
762 irqdbf("registering irq %d (extended s3c irq)\n", irqno);
763 set_irq_chip(irqno, &s3c_irqext_chip);
764 set_irq_handler(irqno, handle_edge_irq);
765 set_irq_flags(irqno, IRQF_VALID);
766 }
767
768 /* register the uart interrupts */
769
770 irqdbf("s3c2410: registering external interrupts\n");
771
772 for (irqno = IRQ_S3CUART_RX0; irqno <= IRQ_S3CUART_ERR0; irqno++) {
773 irqdbf("registering irq %d (s3c uart0 irq)\n", irqno);
774 set_irq_chip(irqno, &s3c_irq_uart0);
775 set_irq_handler(irqno, handle_level_irq);
776 set_irq_flags(irqno, IRQF_VALID);
777 }
778
779 for (irqno = IRQ_S3CUART_RX1; irqno <= IRQ_S3CUART_ERR1; irqno++) {
780 irqdbf("registering irq %d (s3c uart1 irq)\n", irqno);
781 set_irq_chip(irqno, &s3c_irq_uart1);
782 set_irq_handler(irqno, handle_level_irq);
783 set_irq_flags(irqno, IRQF_VALID);
784 }
785
786 for (irqno = IRQ_S3CUART_RX2; irqno <= IRQ_S3CUART_ERR2; irqno++) {
787 irqdbf("registering irq %d (s3c uart2 irq)\n", irqno);
788 set_irq_chip(irqno, &s3c_irq_uart2);
789 set_irq_handler(irqno, handle_level_irq);
790 set_irq_flags(irqno, IRQF_VALID);
791 }
792
793 for (irqno = IRQ_TC; irqno <= IRQ_ADC; irqno++) {
794 irqdbf("registering irq %d (s3c adc irq)\n", irqno);
795 set_irq_chip(irqno, &s3c_irq_adc);
796 set_irq_handler(irqno, handle_edge_irq);
797 set_irq_flags(irqno, IRQF_VALID);
798 }
799
800 irqdbf("s3c2410: registered interrupt handlers\n");
801}
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
deleted file mode 100644
index e5913da3b919..000000000000
--- a/arch/arm/mach-s3c2410/irq.h
+++ /dev/null
@@ -1,107 +0,0 @@
1/* arch/arm/mach-s3c2410/irq.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU IRQ support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#define irqdbf(x...)
14#define irqdbf2(x...)
15
16#define EXTINT_OFF (IRQ_EINT4 - 4)
17
18extern struct irq_chip s3c_irq_level_chip;
19
20static inline void
21s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
22 int subcheck)
23{
24 unsigned long mask;
25 unsigned long submask;
26
27 submask = __raw_readl(S3C2410_INTSUBMSK);
28 mask = __raw_readl(S3C2410_INTMSK);
29
30 submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
31
32 /* check to see if we need to mask the parent IRQ */
33
34 if ((submask & subcheck) == subcheck) {
35 __raw_writel(mask | parentbit, S3C2410_INTMSK);
36 }
37
38 /* write back masks */
39 __raw_writel(submask, S3C2410_INTSUBMSK);
40
41}
42
43static inline void
44s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
45{
46 unsigned long mask;
47 unsigned long submask;
48
49 submask = __raw_readl(S3C2410_INTSUBMSK);
50 mask = __raw_readl(S3C2410_INTMSK);
51
52 submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
53 mask &= ~parentbit;
54
55 /* write back masks */
56 __raw_writel(submask, S3C2410_INTSUBMSK);
57 __raw_writel(mask, S3C2410_INTMSK);
58}
59
60
61static inline void
62s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
63{
64 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
65
66 s3c_irqsub_mask(irqno, parentmask, group);
67
68 __raw_writel(bit, S3C2410_SUBSRCPND);
69
70 /* only ack parent if we've got all the irqs (seems we must
71 * ack, all and hope that the irq system retriggers ok when
72 * the interrupt goes off again)
73 */
74
75 if (1) {
76 __raw_writel(parentmask, S3C2410_SRCPND);
77 __raw_writel(parentmask, S3C2410_INTPND);
78 }
79}
80
81static inline void
82s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
83{
84 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
85
86 __raw_writel(bit, S3C2410_SUBSRCPND);
87
88 /* only ack parent if we've got all the irqs (seems we must
89 * ack, all and hope that the irq system retriggers ok when
90 * the interrupt goes off again)
91 */
92
93 if (1) {
94 __raw_writel(parentmask, S3C2410_SRCPND);
95 __raw_writel(parentmask, S3C2410_INTPND);
96 }
97}
98
99/* exported for use in arch/arm/mach-s3c2410 */
100
101#ifdef CONFIG_PM
102extern int s3c_irq_wake(unsigned int irqno, unsigned int state);
103#else
104#define s3c_irq_wake NULL
105#endif
106
107extern int s3c_irqext_type(unsigned int irq, unsigned int type);
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c
index 817e2c684410..72f2cc4fcd03 100644
--- a/arch/arm/mach-s3c2410/mach-amlm5900.c
+++ b/arch/arm/mach-s3c2410/mach-amlm5900.c
@@ -1,4 +1,4 @@
1/*********************************************************************** 1/* linux/arch/arm/mach-s3c2410/mach-amlm5900.c
2 * 2 *
3 * linux/arch/arm/mach-s3c2410/mach-amlm5900.c 3 * linux/arch/arm/mach-s3c2410/mach-amlm5900.c
4 * 4 *
@@ -35,7 +35,7 @@
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/platform_device.h> 36#include <linux/platform_device.h>
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38 38#include <linux/serial_core.h>
39 39
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
@@ -52,8 +52,8 @@
52#include <asm/arch/regs-lcd.h> 52#include <asm/arch/regs-lcd.h>
53#include <asm/arch/regs-gpio.h> 53#include <asm/arch/regs-gpio.h>
54 54
55#include "devs.h" 55#include <asm/plat-s3c24xx/devs.h>
56#include "cpu.h" 56#include <asm/plat-s3c24xx/cpu.h>
57 57
58#ifdef CONFIG_MTD_PARTITIONS 58#ifdef CONFIG_MTD_PARTITIONS
59 59
@@ -113,12 +113,6 @@ static struct platform_device amlm5900_device_nor = {
113#endif 113#endif
114 114
115static struct map_desc amlm5900_iodesc[] __initdata = { 115static struct map_desc amlm5900_iodesc[] __initdata = {
116 {
117 .virtual = (u32)S3C24XX_VA_SPI,
118 .pfn = __phys_to_pfn(S3C2410_PA_SPI),
119 .length = SZ_1M,
120 .type = MT_DEVICE
121 }
122}; 116};
123 117
124#define UCON S3C2410_UCON_DEFAULT 118#define UCON S3C2410_UCON_DEFAULT
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index b8b76757ec54..7b81296427eb 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -50,9 +50,9 @@
50 50
51#include <linux/serial_8250.h> 51#include <linux/serial_8250.h>
52 52
53#include "clock.h" 53#include <asm/plat-s3c24xx/clock.h>
54#include "devs.h" 54#include <asm/plat-s3c24xx/devs.h>
55#include "cpu.h" 55#include <asm/plat-s3c24xx/cpu.h>
56#include "usb-simtec.h" 56#include "usb-simtec.h"
57 57
58#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics" 58#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics"
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 15b625eae499..01c60d0923cd 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -25,23 +25,24 @@
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <asm/hardware.h> 27#include <asm/hardware.h>
28#include <asm/hardware/iomd.h>
29#include <asm/io.h> 28#include <asm/io.h>
30#include <asm/irq.h> 29#include <asm/irq.h>
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32 31
33
34#include <asm/arch/regs-serial.h> 32#include <asm/arch/regs-serial.h>
35#include <asm/arch/regs-lcd.h> 33#include <asm/arch/regs-lcd.h>
34#include <asm/arch/regs-gpio.h>
35#include <asm/arch/regs-clock.h>
36 36
37#include <asm/arch/h1940.h> 37#include <asm/arch/h1940.h>
38#include <asm/arch/h1940-latch.h> 38#include <asm/arch/h1940-latch.h>
39#include <asm/arch/fb.h> 39#include <asm/arch/fb.h>
40#include <asm/arch/udc.h>
40 41
41#include "clock.h" 42#include <asm/plat-s3c24xx/clock.h>
42#include "devs.h" 43#include <asm/plat-s3c24xx/devs.h>
43#include "cpu.h" 44#include <asm/plat-s3c24xx/cpu.h>
44#include "pm.h" 45#include <asm/plat-s3c24xx/pm.h>
45 46
46static struct map_desc h1940_iodesc[] __initdata = { 47static struct map_desc h1940_iodesc[] __initdata = {
47 [0] = { 48 [0] = {
@@ -102,6 +103,32 @@ void h1940_latch_control(unsigned int clear, unsigned int set)
102 103
103EXPORT_SYMBOL_GPL(h1940_latch_control); 104EXPORT_SYMBOL_GPL(h1940_latch_control);
104 105
106static void h1940_udc_pullup(enum s3c2410_udc_cmd_e cmd)
107{
108 printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);
109
110 switch (cmd)
111 {
112 case S3C2410_UDC_P_ENABLE :
113 h1940_latch_control(0, H1940_LATCH_USB_DP);
114 break;
115 case S3C2410_UDC_P_DISABLE :
116 h1940_latch_control(H1940_LATCH_USB_DP, 0);
117 break;
118 case S3C2410_UDC_P_RESET :
119 break;
120 default:
121 break;
122 }
123}
124
125static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = {
126 .udc_command = h1940_udc_pullup,
127 .vbus_pin = S3C2410_GPG5,
128 .vbus_pin_inverted = 1,
129};
130
131
105 132
106/** 133/**
107 * Set lcd on or off 134 * Set lcd on or off
@@ -146,12 +173,19 @@ static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = {
146 .bpp= {16,16,16}, 173 .bpp= {16,16,16},
147}; 174};
148 175
176static struct platform_device s3c_device_leds = {
177 .name = "h1940-leds",
178 .id = -1,
179};
180
149static struct platform_device *h1940_devices[] __initdata = { 181static struct platform_device *h1940_devices[] __initdata = {
150 &s3c_device_usb, 182 &s3c_device_usb,
151 &s3c_device_lcd, 183 &s3c_device_lcd,
152 &s3c_device_wdt, 184 &s3c_device_wdt,
153 &s3c_device_i2c, 185 &s3c_device_i2c,
154 &s3c_device_iis, 186 &s3c_device_iis,
187 &s3c_device_usbgadget,
188 &s3c_device_leds,
155}; 189};
156 190
157static struct s3c24xx_board h1940_board __initdata = { 191static struct s3c24xx_board h1940_board __initdata = {
@@ -179,7 +213,23 @@ static void __init h1940_init_irq(void)
179 213
180static void __init h1940_init(void) 214static void __init h1940_init(void)
181{ 215{
216 u32 tmp;
217
182 s3c24xx_fb_set_platdata(&h1940_lcdcfg); 218 s3c24xx_fb_set_platdata(&h1940_lcdcfg);
219 s3c24xx_udc_set_platdata(&h1940_udc_cfg);
220
221 /* Turn off suspend on both USB ports, and switch the
222 * selectable USB port to USB device mode. */
223
224 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
225 S3C2410_MISCCR_USBSUSPND0 |
226 S3C2410_MISCCR_USBSUSPND1, 0x0);
227
228 tmp = (
229 0x78 << S3C2410_PLLCON_MDIVSHIFT)
230 | (0x02 << S3C2410_PLLCON_PDIVSHIFT)
231 | (0x03 << S3C2410_PLLCON_SDIVSHIFT);
232 writel(tmp, S3C2410_UPLLCON);
183} 233}
184 234
185MACHINE_START(H1940, "IPAQ-H1940") 235MACHINE_START(H1940, "IPAQ-H1940")
@@ -189,6 +239,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
189 .boot_params = S3C2410_SDRAM_PA + 0x100, 239 .boot_params = S3C2410_SDRAM_PA + 0x100,
190 .map_io = h1940_map_io, 240 .map_io = h1940_map_io,
191 .init_irq = h1940_init_irq, 241 .init_irq = h1940_init_irq,
192 .init_machine = h1940_init, 242 .init_machine = h1940_init,
193 .timer = &s3c24xx_timer, 243 .timer = &s3c24xx_timer,
194MACHINE_END 244MACHINE_END
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 0411e9adb54d..261aa4cc0770 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -29,7 +29,6 @@
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <asm/hardware.h> 31#include <asm/hardware.h>
32#include <asm/hardware/iomd.h>
33#include <asm/io.h> 32#include <asm/io.h>
34#include <asm/irq.h> 33#include <asm/irq.h>
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
@@ -38,10 +37,10 @@
38#include <asm/arch/regs-gpio.h> 37#include <asm/arch/regs-gpio.h>
39#include <asm/arch/iic.h> 38#include <asm/arch/iic.h>
40 39
41#include "s3c2410.h" 40#include <asm/plat-s3c24xx/s3c2410.h>
42#include "clock.h" 41#include <asm/plat-s3c24xx/clock.h>
43#include "devs.h" 42#include <asm/plat-s3c24xx/devs.h>
44#include "cpu.h" 43#include <asm/plat-s3c24xx/cpu.h>
45 44
46static struct map_desc n30_iodesc[] __initdata = { 45static struct map_desc n30_iodesc[] __initdata = {
47 /* nothing here yet */ 46 /* nothing here yet */
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
index 2c738b375e4d..c78ab75b44f3 100644
--- a/arch/arm/mach-s3c2410/mach-otom.c
+++ b/arch/arm/mach-s3c2410/mach-otom.c
@@ -32,10 +32,10 @@
32#include <asm/arch/regs-serial.h> 32#include <asm/arch/regs-serial.h>
33#include <asm/arch/regs-gpio.h> 33#include <asm/arch/regs-gpio.h>
34 34
35#include "s3c2410.h" 35#include <asm/plat-s3c24xx/s3c2410.h>
36#include "clock.h" 36#include <asm/plat-s3c24xx/clock.h>
37#include "devs.h" 37#include <asm/plat-s3c24xx/devs.h>
38#include "cpu.h" 38#include <asm/plat-s3c24xx/cpu.h>
39 39
40static struct map_desc otom11_iodesc[] __initdata = { 40static struct map_desc otom11_iodesc[] __initdata = {
41 /* Device area */ 41 /* Device area */
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c
new file mode 100644
index 000000000000..c6a41593de21
--- /dev/null
+++ b/arch/arm/mach-s3c2410/mach-qt2410.c
@@ -0,0 +1,448 @@
1/* linux/arch/arm/mach-s3c2410/mach-qt2410.c
2 *
3 * Copyright (C) 2006 by OpenMoko, Inc.
4 * Author: Harald Welte <laforge@openmoko.org>
5 * All rights reserved.
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 as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (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,
20 * MA 02111-1307 USA
21 *
22 */
23
24#include <linux/kernel.h>
25#include <linux/types.h>
26#include <linux/interrupt.h>
27#include <linux/list.h>
28#include <linux/timer.h>
29#include <linux/init.h>
30#include <linux/platform_device.h>
31#include <linux/serial_core.h>
32#include <linux/mmc/protocol.h>
33#include <linux/spi/spi.h>
34#include <linux/spi/spi_bitbang.h>
35
36#include <linux/mtd/mtd.h>
37#include <linux/mtd/nand.h>
38#include <linux/mtd/nand_ecc.h>
39#include <linux/mtd/partitions.h>
40
41#include <asm/mach/arch.h>
42#include <asm/mach/map.h>
43#include <asm/mach/irq.h>
44
45#include <asm/hardware.h>
46#include <asm/io.h>
47#include <asm/irq.h>
48#include <asm/mach-types.h>
49
50#include <asm/arch/regs-gpio.h>
51#include <asm/arch/leds-gpio.h>
52#include <asm/arch/regs-serial.h>
53#include <asm/arch/fb.h>
54#include <asm/arch/nand.h>
55#include <asm/arch/udc.h>
56#include <asm/arch/spi.h>
57#include <asm/arch/spi-gpio.h>
58
59#include <asm/plat-s3c24xx/common-smdk.h>
60#include <asm/plat-s3c24xx/devs.h>
61#include <asm/plat-s3c24xx/cpu.h>
62#include <asm/plat-s3c24xx/pm.h>
63
64static struct map_desc qt2410_iodesc[] __initdata = {
65 { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE }
66};
67
68#define UCON S3C2410_UCON_DEFAULT
69#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
70#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
71
72static struct s3c2410_uartcfg smdk2410_uartcfgs[] = {
73 [0] = {
74 .hwport = 0,
75 .flags = 0,
76 .ucon = UCON,
77 .ulcon = ULCON,
78 .ufcon = UFCON,
79 },
80 [1] = {
81 .hwport = 1,
82 .flags = 0,
83 .ucon = UCON,
84 .ulcon = ULCON,
85 .ufcon = UFCON,
86 },
87 [2] = {
88 .hwport = 2,
89 .flags = 0,
90 .ucon = UCON,
91 .ulcon = ULCON,
92 .ufcon = UFCON,
93 }
94};
95
96/* LCD driver info */
97
98/* Configuration for 640x480 SHARP LQ080V3DG01 */
99static struct s3c2410fb_mach_info qt2410_biglcd_cfg __initdata = {
100 .regs = {
101
102 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
103 S3C2410_LCDCON1_TFT |
104 S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/4 */
105
106 .lcdcon2 = S3C2410_LCDCON2_VBPD(18) | /* 19 */
107 S3C2410_LCDCON2_LINEVAL(479) |
108 S3C2410_LCDCON2_VFPD(10) | /* 11 */
109 S3C2410_LCDCON2_VSPW(14), /* 15 */
110
111 .lcdcon3 = S3C2410_LCDCON3_HBPD(43) | /* 44 */
112 S3C2410_LCDCON3_HOZVAL(639) | /* 640 */
113 S3C2410_LCDCON3_HFPD(115), /* 116 */
114
115 .lcdcon4 = S3C2410_LCDCON4_MVAL(0) |
116 S3C2410_LCDCON4_HSPW(95), /* 96 */
117
118 .lcdcon5 = S3C2410_LCDCON5_FRM565 |
119 S3C2410_LCDCON5_INVVLINE |
120 S3C2410_LCDCON5_INVVFRAME |
121 S3C2410_LCDCON5_PWREN |
122 S3C2410_LCDCON5_HWSWP,
123 },
124
125 .lpcsel = ((0xCE6) & ~7) | 1<<4,
126
127 .width = 640,
128 .height = 480,
129
130 .xres = {
131 .min = 640,
132 .max = 640,
133 .defval = 640,
134 },
135
136 .yres = {
137 .min = 480,
138 .max = 480,
139 .defval = 480,
140 },
141
142 .bpp = {
143 .min = 16,
144 .max = 16,
145 .defval = 16,
146 },
147};
148
149/* Configuration for 480x640 toppoly TD028TTEC1 */
150static struct s3c2410fb_mach_info qt2410_prodlcd_cfg __initdata = {
151 .regs = {
152
153 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
154 S3C2410_LCDCON1_TFT |
155 S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/4 */
156
157 .lcdcon2 = S3C2410_LCDCON2_VBPD(1) | /* 2 */
158 S3C2410_LCDCON2_LINEVAL(639) |/* 640 */
159 S3C2410_LCDCON2_VFPD(3) | /* 4 */
160 S3C2410_LCDCON2_VSPW(1), /* 2 */
161
162 .lcdcon3 = S3C2410_LCDCON3_HBPD(7) | /* 8 */
163 S3C2410_LCDCON3_HOZVAL(479) | /* 479 */
164 S3C2410_LCDCON3_HFPD(23), /* 24 */
165
166 .lcdcon4 = S3C2410_LCDCON4_MVAL(0) |
167 S3C2410_LCDCON4_HSPW(7), /* 8 */
168
169 .lcdcon5 = S3C2410_LCDCON5_FRM565 |
170 S3C2410_LCDCON5_INVVLINE |
171 S3C2410_LCDCON5_INVVFRAME |
172 S3C2410_LCDCON5_PWREN |
173 S3C2410_LCDCON5_HWSWP,
174 },
175
176 .lpcsel = ((0xCE6) & ~7) | 1<<4,
177
178 .width = 480,
179 .height = 640,
180
181 .xres = {
182 .min = 480,
183 .max = 480,
184 .defval = 480,
185 },
186
187 .yres = {
188 .min = 640,
189 .max = 640,
190 .defval = 640,
191 },
192
193 .bpp = {
194 .min = 16,
195 .max = 16,
196 .defval = 16,
197 },
198};
199
200/* Config for 240x320 LCD */
201static struct s3c2410fb_mach_info qt2410_lcd_cfg __initdata = {
202 .regs = {
203
204 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
205 S3C2410_LCDCON1_TFT |
206 S3C2410_LCDCON1_CLKVAL(0x04),
207
208 .lcdcon2 = S3C2410_LCDCON2_VBPD(1) |
209 S3C2410_LCDCON2_LINEVAL(319) |
210 S3C2410_LCDCON2_VFPD(6) |
211 S3C2410_LCDCON2_VSPW(3),
212
213 .lcdcon3 = S3C2410_LCDCON3_HBPD(12) |
214 S3C2410_LCDCON3_HOZVAL(239) |
215 S3C2410_LCDCON3_HFPD(7),
216
217 .lcdcon4 = S3C2410_LCDCON4_MVAL(0) |
218 S3C2410_LCDCON4_HSPW(3),
219
220 .lcdcon5 = S3C2410_LCDCON5_FRM565 |
221 S3C2410_LCDCON5_INVVLINE |
222 S3C2410_LCDCON5_INVVFRAME |
223 S3C2410_LCDCON5_PWREN |
224 S3C2410_LCDCON5_HWSWP,
225 },
226
227 .lpcsel = ((0xCE6) & ~7) | 1<<4,
228
229 .width = 240,
230 .height = 320,
231
232 .xres = {
233 .min = 240,
234 .max = 240,
235 .defval = 240,
236 },
237
238 .yres = {
239 .min = 320,
240 .max = 320,
241 .defval = 320,
242 },
243
244 .bpp = {
245 .min = 16,
246 .max = 16,
247 .defval = 16,
248 },
249};
250
251/* CS8900 */
252
253static struct resource qt2410_cs89x0_resources[] = {
254 [0] = {
255 .start = 0x19000000,
256 .end = 0x19000000 + 16,
257 .flags = IORESOURCE_MEM,
258 },
259 [1] = {
260 .start = IRQ_EINT9,
261 .end = IRQ_EINT9,
262 .flags = IORESOURCE_IRQ,
263 },
264};
265
266static struct platform_device qt2410_cs89x0 = {
267 .name = "cirrus-cs89x0",
268 .num_resources = ARRAY_SIZE(qt2410_cs89x0_resources),
269 .resource = qt2410_cs89x0_resources,
270};
271
272/* LED */
273
274static struct s3c24xx_led_platdata qt2410_pdata_led = {
275 .gpio = S3C2410_GPB0,
276 .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
277 .name = "led",
278 .def_trigger = "timer",
279};
280
281static struct platform_device qt2410_led = {
282 .name = "s3c24xx_led",
283 .id = 0,
284 .dev = {
285 .platform_data = &qt2410_pdata_led,
286 },
287};
288
289/* SPI */
290
291static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs)
292{
293 switch (cs) {
294 case BITBANG_CS_ACTIVE:
295 s3c2410_gpio_setpin(S3C2410_GPB5, 0);
296 break;
297 case BITBANG_CS_INACTIVE:
298 s3c2410_gpio_setpin(S3C2410_GPB5, 1);
299 break;
300 }
301}
302
303static struct s3c2410_spigpio_info spi_gpio_cfg = {
304 .pin_clk = S3C2410_GPG7,
305 .pin_mosi = S3C2410_GPG6,
306 .pin_miso = S3C2410_GPG5,
307 .chip_select = &spi_gpio_cs,
308};
309
310
311static struct platform_device qt2410_spi = {
312 .name = "s3c24xx-spi-gpio",
313 .id = 1,
314 .dev = {
315 .platform_data = &spi_gpio_cfg,
316 },
317};
318
319/* Board devices */
320
321static struct platform_device *qt2410_devices[] __initdata = {
322 &s3c_device_usb,
323 &s3c_device_lcd,
324 &s3c_device_wdt,
325 &s3c_device_i2c,
326 &s3c_device_iis,
327 &s3c_device_sdi,
328 &s3c_device_usbgadget,
329 &qt2410_spi,
330 &qt2410_cs89x0,
331 &qt2410_led,
332};
333
334static struct s3c24xx_board qt2410_board __initdata = {
335 .devices = qt2410_devices,
336 .devices_count = ARRAY_SIZE(qt2410_devices)
337};
338
339static struct mtd_partition qt2410_nand_part[] = {
340 [0] = {
341 .name = "U-Boot",
342 .size = 0x30000,
343 .offset = 0,
344 },
345 [1] = {
346 .name = "U-Boot environment",
347 .offset = 0x30000,
348 .size = 0x4000,
349 },
350 [2] = {
351 .name = "kernel",
352 .offset = 0x34000,
353 .size = SZ_2M,
354 },
355 [3] = {
356 .name = "initrd",
357 .offset = 0x234000,
358 .size = SZ_4M,
359 },
360 [4] = {
361 .name = "jffs2",
362 .offset = 0x634000,
363 .size = 0x39cc000,
364 },
365};
366
367static struct s3c2410_nand_set qt2410_nand_sets[] = {
368 [0] = {
369 .name = "NAND",
370 .nr_chips = 1,
371 .nr_partitions = ARRAY_SIZE(qt2410_nand_part),
372 .partitions = qt2410_nand_part,
373 },
374};
375
376/* choose a set of timings which should suit most 512Mbit
377 * chips and beyond.
378 */
379
380static struct s3c2410_platform_nand qt2410_nand_info = {
381 .tacls = 20,
382 .twrph0 = 60,
383 .twrph1 = 20,
384 .nr_sets = ARRAY_SIZE(qt2410_nand_sets),
385 .sets = qt2410_nand_sets,
386};
387
388/* UDC */
389
390static struct s3c2410_udc_mach_info qt2410_udc_cfg = {
391};
392
393static char tft_type = 's';
394
395static int __init qt2410_tft_setup(char *str)
396{
397 tft_type = str[0];
398 return 1;
399}
400
401__setup("tft=", qt2410_tft_setup);
402
403static void __init qt2410_map_io(void)
404{
405 s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
406 s3c24xx_init_clocks(12*1000*1000);
407 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
408 s3c24xx_set_board(&qt2410_board);
409}
410
411static void __init qt2410_machine_init(void)
412{
413 s3c_device_nand.dev.platform_data = &qt2410_nand_info;
414
415 switch (tft_type) {
416 case 'p': /* production */
417 s3c24xx_fb_set_platdata(&qt2410_prodlcd_cfg);
418 break;
419 case 'b': /* big */
420 s3c24xx_fb_set_platdata(&qt2410_biglcd_cfg);
421 break;
422 case 's': /* small */
423 default:
424 s3c24xx_fb_set_platdata(&qt2410_lcd_cfg);
425 break;
426 }
427
428 s3c2410_gpio_cfgpin(S3C2410_GPB0, S3C2410_GPIO_OUTPUT);
429 s3c2410_gpio_setpin(S3C2410_GPB0, 1);
430
431 s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
432
433 s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT);
434
435 s3c2410_pm_init();
436}
437
438MACHINE_START(QT2410, "QT2410")
439 .phys_io = S3C2410_PA_UART,
440 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
441 .boot_params = S3C2410_SDRAM_PA + 0x100,
442 .map_io = qt2410_map_io,
443 .init_irq = s3c24xx_init_irq,
444 .init_machine = qt2410_machine_init,
445 .timer = &s3c24xx_timer,
446MACHINE_END
447
448
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index 01c0c986d827..57b8a80f33d0 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -1,4 +1,4 @@
1/*********************************************************************** 1/* linux/arch/arm/mach-s3c2410/mach-smdk2410.c
2 * 2 *
3 * linux/arch/arm/mach-s3c2410/mach-smdk2410.c 3 * linux/arch/arm/mach-s3c2410/mach-smdk2410.c
4 * 4 *
@@ -49,10 +49,10 @@
49 49
50#include <asm/arch/regs-serial.h> 50#include <asm/arch/regs-serial.h>
51 51
52#include "devs.h" 52#include <asm/plat-s3c24xx/devs.h>
53#include "cpu.h" 53#include <asm/plat-s3c24xx/cpu.h>
54 54
55#include "common-smdk.h" 55#include <asm/plat-s3c24xx/common-smdk.h>
56 56
57static struct map_desc smdk2410_iodesc[] __initdata = { 57static struct map_desc smdk2410_iodesc[] __initdata = {
58 /* nothing here yet */ 58 /* nothing here yet */
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index a382fc095110..c947c75bcbf0 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -43,9 +43,9 @@
43#include <asm/arch/regs-gpio.h> 43#include <asm/arch/regs-gpio.h>
44#include <asm/arch/leds-gpio.h> 44#include <asm/arch/leds-gpio.h>
45 45
46#include "clock.h" 46#include <asm/plat-s3c24xx/clock.h>
47#include "devs.h" 47#include <asm/plat-s3c24xx/devs.h>
48#include "cpu.h" 48#include <asm/plat-s3c24xx/cpu.h>
49#include "usb-simtec.h" 49#include "usb-simtec.h"
50 50
51/* macros for virtual address mods for the io space entries */ 51/* macros for virtual address mods for the io space entries */
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index ebf294dd31da..3b3a7db4e0dd 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -1,11 +1,9 @@
1/* linux/arch/arm/mach-s3c2410/pm.c 1/* linux/arch/arm/mach-s3c2410/pm.c
2 * 2 *
3 * Copyright (c) 2004,2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C24XX Power Manager (Suspend-To-RAM) support 6 * S3C2410 (and compatible) Power Manager (Suspend-To-RAM) support
7 *
8 * See Documentation/arm/Samsung-S3C24XX/Suspend.txt for more information
9 * 7 *
10 * 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
11 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -20,640 +18,139 @@
20 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * Parts based on arch/arm/mach-pxa/pm.c
25 *
26 * Thanks to Dimitry Andric for debugging
27*/ 21*/
28 22
29#include <linux/init.h> 23#include <linux/init.h>
30#include <linux/suspend.h> 24#include <linux/suspend.h>
31#include <linux/errno.h> 25#include <linux/errno.h>
32#include <linux/time.h> 26#include <linux/time.h>
33#include <linux/interrupt.h> 27#include <linux/sysdev.h>
34#include <linux/crc32.h>
35#include <linux/ioport.h>
36#include <linux/delay.h>
37#include <linux/serial_core.h>
38 28
39#include <asm/cacheflush.h>
40#include <asm/hardware.h> 29#include <asm/hardware.h>
41#include <asm/io.h> 30#include <asm/io.h>
42 31
43#include <asm/arch/regs-serial.h> 32#include <asm/mach-types.h>
44#include <asm/arch/regs-clock.h>
45#include <asm/arch/regs-gpio.h>
46#include <asm/arch/regs-mem.h>
47#include <asm/arch/regs-irq.h>
48
49#include <asm/mach/time.h>
50
51#include "pm.h"
52
53/* for external use */
54
55unsigned long s3c_pm_flags;
56
57#define PFX "s3c24xx-pm: "
58
59static struct sleep_save core_save[] = {
60 SAVE_ITEM(S3C2410_LOCKTIME),
61 SAVE_ITEM(S3C2410_CLKCON),
62
63 /* we restore the timings here, with the proviso that the board
64 * brings the system up in an slower, or equal frequency setting
65 * to the original system.
66 *
67 * if we cannot guarantee this, then things are going to go very
68 * wrong here, as we modify the refresh and both pll settings.
69 */
70
71 SAVE_ITEM(S3C2410_BWSCON),
72 SAVE_ITEM(S3C2410_BANKCON0),
73 SAVE_ITEM(S3C2410_BANKCON1),
74 SAVE_ITEM(S3C2410_BANKCON2),
75 SAVE_ITEM(S3C2410_BANKCON3),
76 SAVE_ITEM(S3C2410_BANKCON4),
77 SAVE_ITEM(S3C2410_BANKCON5),
78
79 SAVE_ITEM(S3C2410_CLKDIVN),
80 SAVE_ITEM(S3C2410_MPLLCON),
81 SAVE_ITEM(S3C2410_UPLLCON),
82 SAVE_ITEM(S3C2410_CLKSLOW),
83 SAVE_ITEM(S3C2410_REFRESH),
84};
85
86static struct sleep_save gpio_save[] = {
87 SAVE_ITEM(S3C2410_GPACON),
88 SAVE_ITEM(S3C2410_GPADAT),
89
90 SAVE_ITEM(S3C2410_GPBCON),
91 SAVE_ITEM(S3C2410_GPBDAT),
92 SAVE_ITEM(S3C2410_GPBUP),
93
94 SAVE_ITEM(S3C2410_GPCCON),
95 SAVE_ITEM(S3C2410_GPCDAT),
96 SAVE_ITEM(S3C2410_GPCUP),
97
98 SAVE_ITEM(S3C2410_GPDCON),
99 SAVE_ITEM(S3C2410_GPDDAT),
100 SAVE_ITEM(S3C2410_GPDUP),
101
102 SAVE_ITEM(S3C2410_GPECON),
103 SAVE_ITEM(S3C2410_GPEDAT),
104 SAVE_ITEM(S3C2410_GPEUP),
105
106 SAVE_ITEM(S3C2410_GPFCON),
107 SAVE_ITEM(S3C2410_GPFDAT),
108 SAVE_ITEM(S3C2410_GPFUP),
109 33
110 SAVE_ITEM(S3C2410_GPGCON), 34#include <asm/arch/regs-gpio.h>
111 SAVE_ITEM(S3C2410_GPGDAT), 35#include <asm/arch/h1940.h>
112 SAVE_ITEM(S3C2410_GPGUP),
113
114 SAVE_ITEM(S3C2410_GPHCON),
115 SAVE_ITEM(S3C2410_GPHDAT),
116 SAVE_ITEM(S3C2410_GPHUP),
117 36
118 SAVE_ITEM(S3C2410_DCLKCON), 37#include <asm/plat-s3c24xx/cpu.h>
119}; 38#include <asm/plat-s3c24xx/pm.h>
120 39
121#ifdef CONFIG_S3C2410_PM_DEBUG 40#ifdef CONFIG_S3C2410_PM_DEBUG
122 41extern void pm_dbg(const char *fmt, ...);
123#define SAVE_UART(va) \
124 SAVE_ITEM((va) + S3C2410_ULCON), \
125 SAVE_ITEM((va) + S3C2410_UCON), \
126 SAVE_ITEM((va) + S3C2410_UFCON), \
127 SAVE_ITEM((va) + S3C2410_UMCON), \
128 SAVE_ITEM((va) + S3C2410_UBRDIV)
129
130static struct sleep_save uart_save[] = {
131 SAVE_UART(S3C24XX_VA_UART0),
132 SAVE_UART(S3C24XX_VA_UART1),
133#ifndef CONFIG_CPU_S3C2400
134 SAVE_UART(S3C24XX_VA_UART2),
135#endif
136};
137
138/* debug
139 *
140 * we send the debug to printascii() to allow it to be seen if the
141 * system never wakes up from the sleep
142*/
143
144extern void printascii(const char *);
145
146void pm_dbg(const char *fmt, ...)
147{
148 va_list va;
149 char buff[256];
150
151 va_start(va, fmt);
152 vsprintf(buff, fmt, va);
153 va_end(va);
154
155 printascii(buff);
156}
157
158static void s3c2410_pm_debug_init(void)
159{
160 unsigned long tmp = __raw_readl(S3C2410_CLKCON);
161
162 /* re-start uart clocks */
163 tmp |= S3C2410_CLKCON_UART0;
164 tmp |= S3C2410_CLKCON_UART1;
165 tmp |= S3C2410_CLKCON_UART2;
166
167 __raw_writel(tmp, S3C2410_CLKCON);
168 udelay(10);
169}
170
171#define DBG(fmt...) pm_dbg(fmt) 42#define DBG(fmt...) pm_dbg(fmt)
172#else 43#else
173#define DBG(fmt...) printk(KERN_DEBUG fmt) 44#define DBG(fmt...) printk(KERN_DEBUG fmt)
174
175#define s3c2410_pm_debug_init() do { } while(0)
176
177static struct sleep_save uart_save[] = {};
178#endif 45#endif
179 46
180#if defined(CONFIG_S3C2410_PM_CHECK) && CONFIG_S3C2410_PM_CHECK_CHUNKSIZE != 0 47static void s3c2410_pm_prepare(void)
181
182/* suspend checking code...
183 *
184 * this next area does a set of crc checks over all the installed
185 * memory, so the system can verify if the resume was ok.
186 *
187 * CONFIG_S3C2410_PM_CHECK_CHUNKSIZE defines the block-size for the CRC,
188 * increasing it will mean that the area corrupted will be less easy to spot,
189 * and reducing the size will cause the CRC save area to grow
190*/
191
192#define CHECK_CHUNKSIZE (CONFIG_S3C2410_PM_CHECK_CHUNKSIZE * 1024)
193
194static u32 crc_size; /* size needed for the crc block */
195static u32 *crcs; /* allocated over suspend/resume */
196
197typedef u32 *(run_fn_t)(struct resource *ptr, u32 *arg);
198
199/* s3c2410_pm_run_res
200 *
201 * go thorugh the given resource list, and look for system ram
202*/
203
204static void s3c2410_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg)
205{
206 while (ptr != NULL) {
207 if (ptr->child != NULL)
208 s3c2410_pm_run_res(ptr->child, fn, arg);
209
210 if ((ptr->flags & IORESOURCE_MEM) &&
211 strcmp(ptr->name, "System RAM") == 0) {
212 DBG("Found system RAM at %08lx..%08lx\n",
213 ptr->start, ptr->end);
214 arg = (fn)(ptr, arg);
215 }
216
217 ptr = ptr->sibling;
218 }
219}
220
221static void s3c2410_pm_run_sysram(run_fn_t fn, u32 *arg)
222{
223 s3c2410_pm_run_res(&iomem_resource, fn, arg);
224}
225
226static u32 *s3c2410_pm_countram(struct resource *res, u32 *val)
227{
228 u32 size = (u32)(res->end - res->start)+1;
229
230 size += CHECK_CHUNKSIZE-1;
231 size /= CHECK_CHUNKSIZE;
232
233 DBG("Area %08lx..%08lx, %d blocks\n", res->start, res->end, size);
234
235 *val += size * sizeof(u32);
236 return val;
237}
238
239/* s3c2410_pm_prepare_check
240 *
241 * prepare the necessary information for creating the CRCs. This
242 * must be done before the final save, as it will require memory
243 * allocating, and thus touching bits of the kernel we do not
244 * know about.
245*/
246
247static void s3c2410_pm_check_prepare(void)
248{ 48{
249 crc_size = 0; 49 /* ensure at least GSTATUS3 has the resume address */
250 50
251 s3c2410_pm_run_sysram(s3c2410_pm_countram, &crc_size); 51 __raw_writel(virt_to_phys(s3c2410_cpu_resume), S3C2410_GSTATUS3);
252 52
253 DBG("s3c2410_pm_prepare_check: %u checks needed\n", crc_size); 53 DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
54 DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));
254 55
255 crcs = kmalloc(crc_size+4, GFP_KERNEL); 56 if (machine_is_h1940()) {
256 if (crcs == NULL) 57 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
257 printk(KERN_ERR "Cannot allocated CRC save area\n"); 58 unsigned long ptr;
258} 59 unsigned long calc = 0;
259 60
260static u32 *s3c2410_pm_makecheck(struct resource *res, u32 *val) 61 /* generate check for the bootloader to check on resume */
261{
262 unsigned long addr, left;
263 62
264 for (addr = res->start; addr < res->end; 63 for (ptr = 0; ptr < 0x40000; ptr += 0x400)
265 addr += CHECK_CHUNKSIZE) { 64 calc += __raw_readl(base+ptr);
266 left = res->end - addr;
267 65
268 if (left > CHECK_CHUNKSIZE) 66 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
269 left = CHECK_CHUNKSIZE;
270
271 *val = crc32_le(~0, phys_to_virt(addr), left);
272 val++;
273 } 67 }
274 68
275 return val; 69 /* the RX3715 uses similar code and the same H1940 and the
276} 70 * same offsets for resume and checksum pointers */
277
278/* s3c2410_pm_check_store
279 *
280 * compute the CRC values for the memory blocks before the final
281 * sleep.
282*/
283
284static void s3c2410_pm_check_store(void)
285{
286 if (crcs != NULL)
287 s3c2410_pm_run_sysram(s3c2410_pm_makecheck, crcs);
288}
289
290/* in_region
291 *
292 * return TRUE if the area defined by ptr..ptr+size contatins the
293 * what..what+whatsz
294*/
295
296static inline int in_region(void *ptr, int size, void *what, size_t whatsz)
297{
298 if ((what+whatsz) < ptr)
299 return 0;
300
301 if (what > (ptr+size))
302 return 0;
303
304 return 1;
305}
306
307static u32 *s3c2410_pm_runcheck(struct resource *res, u32 *val)
308{
309 void *save_at = phys_to_virt(s3c2410_sleep_save_phys);
310 unsigned long addr;
311 unsigned long left;
312 void *ptr;
313 u32 calc;
314
315 for (addr = res->start; addr < res->end;
316 addr += CHECK_CHUNKSIZE) {
317 left = res->end - addr;
318 71
319 if (left > CHECK_CHUNKSIZE) 72 if (machine_is_rx3715()) {
320 left = CHECK_CHUNKSIZE; 73 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
74 unsigned long ptr;
75 unsigned long calc = 0;
321 76
322 ptr = phys_to_virt(addr); 77 /* generate check for the bootloader to check on resume */
323 78
324 if (in_region(ptr, left, crcs, crc_size)) { 79 for (ptr = 0; ptr < 0x40000; ptr += 0x4)
325 DBG("skipping %08lx, has crc block in\n", addr); 80 calc += __raw_readl(base+ptr);
326 goto skip_check;
327 }
328 81
329 if (in_region(ptr, left, save_at, 32*4 )) { 82 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
330 DBG("skipping %08lx, has save block in\n", addr);
331 goto skip_check;
332 }
333
334 /* calculate and check the checksum */
335
336 calc = crc32_le(~0, ptr, left);
337 if (calc != *val) {
338 printk(KERN_ERR PFX "Restore CRC error at "
339 "%08lx (%08x vs %08x)\n", addr, calc, *val);
340
341 DBG("Restore CRC error at %08lx (%08x vs %08x)\n",
342 addr, calc, *val);
343 }
344
345 skip_check:
346 val++;
347 } 83 }
348 84
349 return val; 85 if ( machine_is_aml_m5900() )
350} 86 s3c2410_gpio_setpin(S3C2410_GPF2, 1);
351 87
352/* s3c2410_pm_check_restore
353 *
354 * check the CRCs after the restore event and free the memory used
355 * to hold them
356*/
357
358static void s3c2410_pm_check_restore(void)
359{
360 if (crcs != NULL) {
361 s3c2410_pm_run_sysram(s3c2410_pm_runcheck, crcs);
362 kfree(crcs);
363 crcs = NULL;
364 }
365} 88}
366 89
367#else 90static int s3c2410_pm_resume(struct sys_device *dev)
368
369#define s3c2410_pm_check_prepare() do { } while(0)
370#define s3c2410_pm_check_restore() do { } while(0)
371#define s3c2410_pm_check_store() do { } while(0)
372#endif
373
374/* helper functions to save and restore register state */
375
376void s3c2410_pm_do_save(struct sleep_save *ptr, int count)
377{ 91{
378 for (; count > 0; count--, ptr++) { 92 unsigned long tmp;
379 ptr->val = __raw_readl(ptr->reg);
380 DBG("saved %p value %08lx\n", ptr->reg, ptr->val);
381 }
382}
383 93
384/* s3c2410_pm_do_restore 94 /* unset the return-from-sleep flag, to ensure reset */
385 *
386 * restore the system from the given list of saved registers
387 *
388 * Note, we do not use DBG() in here, as the system may not have
389 * restore the UARTs state yet
390*/
391 95
392void s3c2410_pm_do_restore(struct sleep_save *ptr, int count) 96 tmp = __raw_readl(S3C2410_GSTATUS2);
393{ 97 tmp &= S3C2410_GSTATUS2_OFFRESET;
394 for (; count > 0; count--, ptr++) { 98 __raw_writel(tmp, S3C2410_GSTATUS2);
395 printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n",
396 ptr->reg, ptr->val, __raw_readl(ptr->reg));
397
398 __raw_writel(ptr->val, ptr->reg);
399 }
400}
401 99
402/* s3c2410_pm_do_restore_core 100 if ( machine_is_aml_m5900() )
403 * 101 s3c2410_gpio_setpin(S3C2410_GPF2, 0);
404 * similar to s3c2410_pm_do_restore_core
405 *
406 * WARNING: Do not put any debug in here that may effect memory or use
407 * peripherals, as things may be changing!
408*/
409 102
410static void s3c2410_pm_do_restore_core(struct sleep_save *ptr, int count) 103 return 0;
411{
412 for (; count > 0; count--, ptr++) {
413 __raw_writel(ptr->val, ptr->reg);
414 }
415} 104}
416 105
417/* s3c2410_pm_show_resume_irqs 106static int s3c2410_pm_add(struct sys_device *dev)
418 *
419 * print any IRQs asserted at resume time (ie, we woke from)
420*/
421
422static void s3c2410_pm_show_resume_irqs(int start, unsigned long which,
423 unsigned long mask)
424{ 107{
425 int i; 108 pm_cpu_prep = s3c2410_pm_prepare;
109 pm_cpu_sleep = s3c2410_cpu_suspend;
426 110
427 which &= ~mask; 111 return 0;
428
429 for (i = 0; i <= 31; i++) {
430 if ((which) & (1L<<i)) {
431 DBG("IRQ %d asserted at resume\n", start+i);
432 }
433 }
434} 112}
435 113
436/* s3c2410_pm_check_resume_pin 114#if defined(CONFIG_CPU_S3C2410)
437 * 115static struct sysdev_driver s3c2410_pm_driver = {
438 * check to see if the pin is configured correctly for sleep mode, and 116 .add = s3c2410_pm_add,
439 * make any necessary adjustments if it is not 117 .resume = s3c2410_pm_resume,
440*/ 118};
441
442static void s3c2410_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
443{
444 unsigned long irqstate;
445 unsigned long pinstate;
446 int irq = s3c2410_gpio_getirq(pin);
447
448 if (irqoffs < 4)
449 irqstate = s3c_irqwake_intmask & (1L<<irqoffs);
450 else
451 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs);
452
453 pinstate = s3c2410_gpio_getcfg(pin);
454
455 if (!irqstate) {
456 if (pinstate == S3C2410_GPIO_IRQ)
457 DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin);
458 } else {
459 if (pinstate == S3C2410_GPIO_IRQ) {
460 DBG("Disabling IRQ %d (pin %d)\n", irq, pin);
461 s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT);
462 }
463 }
464}
465 119
466/* s3c2410_pm_configure_extint 120/* register ourselves */
467 *
468 * configure all external interrupt pins
469*/
470 121
471static void s3c2410_pm_configure_extint(void) 122static int __init s3c2410_pm_drvinit(void)
472{ 123{
473 int pin; 124 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver);
474
475 /* for each of the external interrupts (EINT0..EINT15) we
476 * need to check wether it is an external interrupt source,
477 * and then configure it as an input if it is not
478 */
479
480 for (pin = S3C2410_GPF0; pin <= S3C2410_GPF7; pin++) {
481 s3c2410_pm_check_resume_pin(pin, pin - S3C2410_GPF0);
482 }
483
484 for (pin = S3C2410_GPG0; pin <= S3C2410_GPG7; pin++) {
485 s3c2410_pm_check_resume_pin(pin, (pin - S3C2410_GPG0)+8);
486 }
487} 125}
488 126
489void (*pm_cpu_prep)(void); 127arch_initcall(s3c2410_pm_drvinit);
490void (*pm_cpu_sleep)(void); 128#endif
491
492#define any_allowed(mask, allow) (((mask) & (allow)) != (allow))
493
494/* s3c2410_pm_enter
495 *
496 * central control for sleep/resume process
497*/
498
499static int s3c2410_pm_enter(suspend_state_t state)
500{
501 unsigned long regs_save[16];
502
503 /* ensure the debug is initialised (if enabled) */
504
505 s3c2410_pm_debug_init();
506
507 DBG("s3c2410_pm_enter(%d)\n", state);
508
509 if (pm_cpu_prep == NULL || pm_cpu_sleep == NULL) {
510 printk(KERN_ERR PFX "error: no cpu sleep functions set\n");
511 return -EINVAL;
512 }
513
514 if (state != PM_SUSPEND_MEM) {
515 printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n");
516 return -EINVAL;
517 }
518
519 /* check if we have anything to wake-up with... bad things seem
520 * to happen if you suspend with no wakeup (system will often
521 * require a full power-cycle)
522 */
523
524 if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&
525 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) {
526 printk(KERN_ERR PFX "No sources enabled for wake-up!\n");
527 printk(KERN_ERR PFX "Aborting sleep\n");
528 return -EINVAL;
529 }
530
531 /* prepare check area if configured */
532
533 s3c2410_pm_check_prepare();
534
535 /* store the physical address of the register recovery block */
536
537 s3c2410_sleep_save_phys = virt_to_phys(regs_save);
538
539 DBG("s3c2410_sleep_save_phys=0x%08lx\n", s3c2410_sleep_save_phys);
540
541 /* save all necessary core registers not covered by the drivers */
542
543 s3c2410_pm_do_save(gpio_save, ARRAY_SIZE(gpio_save));
544 s3c2410_pm_do_save(core_save, ARRAY_SIZE(core_save));
545 s3c2410_pm_do_save(uart_save, ARRAY_SIZE(uart_save));
546
547 /* set the irq configuration for wake */
548
549 s3c2410_pm_configure_extint();
550
551 DBG("sleep: irq wakeup masks: %08lx,%08lx\n",
552 s3c_irqwake_intmask, s3c_irqwake_eintmask);
553
554 __raw_writel(s3c_irqwake_intmask, S3C2410_INTMSK);
555 __raw_writel(s3c_irqwake_eintmask, S3C2410_EINTMASK);
556
557 /* ack any outstanding external interrupts before we go to sleep */
558
559 __raw_writel(__raw_readl(S3C2410_EINTPEND), S3C2410_EINTPEND);
560 __raw_writel(__raw_readl(S3C2410_INTPND), S3C2410_INTPND);
561 __raw_writel(__raw_readl(S3C2410_SRCPND), S3C2410_SRCPND);
562
563 /* call cpu specific preperation */
564
565 pm_cpu_prep();
566
567 /* flush cache back to ram */
568
569 flush_cache_all();
570
571 s3c2410_pm_check_store();
572
573 /* send the cpu to sleep... */
574
575 __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */
576
577 /* s3c2410_cpu_save will also act as our return point from when
578 * we resume as it saves its own register state, so use the return
579 * code to differentiate return from save and return from sleep */
580
581 if (s3c2410_cpu_save(regs_save) == 0) {
582 flush_cache_all();
583 pm_cpu_sleep();
584 }
585
586 /* restore the cpu state */
587
588 cpu_init();
589
590 /* restore the system state */
591
592 s3c2410_pm_do_restore_core(core_save, ARRAY_SIZE(core_save));
593 s3c2410_pm_do_restore(gpio_save, ARRAY_SIZE(gpio_save));
594 s3c2410_pm_do_restore(uart_save, ARRAY_SIZE(uart_save));
595
596 s3c2410_pm_debug_init();
597
598 /* check what irq (if any) restored the system */
599
600 DBG("post sleep: IRQs 0x%08x, 0x%08x\n",
601 __raw_readl(S3C2410_SRCPND),
602 __raw_readl(S3C2410_EINTPEND));
603
604 s3c2410_pm_show_resume_irqs(IRQ_EINT0, __raw_readl(S3C2410_SRCPND),
605 s3c_irqwake_intmask);
606
607 s3c2410_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND),
608 s3c_irqwake_eintmask);
609
610 DBG("post sleep, preparing to return\n");
611
612 s3c2410_pm_check_restore();
613
614 /* ok, let's return from sleep */
615 129
616 DBG("S3C2410 PM Resume (post-restore)\n"); 130#if defined(CONFIG_CPU_S3C2440)
617 return 0; 131static struct sysdev_driver s3c2440_pm_driver = {
618} 132 .add = s3c2410_pm_add,
133 .resume = s3c2410_pm_resume,
134};
619 135
620/* 136static int __init s3c2440_pm_drvinit(void)
621 * Called after processes are frozen, but before we shut down devices.
622 */
623static int s3c2410_pm_prepare(suspend_state_t state)
624{ 137{
625 return 0; 138 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver);
626} 139}
627 140
628/* 141arch_initcall(s3c2440_pm_drvinit);
629 * Called after devices are re-setup, but before processes are thawed. 142#endif
630 */
631static int s3c2410_pm_finish(suspend_state_t state)
632{
633 return 0;
634}
635 143
636/* 144#if defined(CONFIG_CPU_S3C2442)
637 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. 145static struct sysdev_driver s3c2442_pm_driver = {
638 */ 146 .add = s3c2410_pm_add,
639static struct pm_ops s3c2410_pm_ops = { 147 .resume = s3c2410_pm_resume,
640 .pm_disk_mode = PM_DISK_FIRMWARE,
641 .prepare = s3c2410_pm_prepare,
642 .enter = s3c2410_pm_enter,
643 .finish = s3c2410_pm_finish,
644}; 148};
645 149
646/* s3c2410_pm_init 150static int __init s3c2442_pm_drvinit(void)
647 *
648 * Attach the power management functions. This should be called
649 * from the board specific initialisation if the board supports
650 * it.
651*/
652
653int __init s3c2410_pm_init(void)
654{ 151{
655 printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n"); 152 return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver);
656
657 pm_set_ops(&s3c2410_pm_ops);
658 return 0;
659} 153}
154
155arch_initcall(s3c2442_pm_drvinit);
156#endif
diff --git a/arch/arm/mach-s3c2410/pm.h b/arch/arm/mach-s3c2410/pm.h
deleted file mode 100644
index ffe197a119fb..000000000000
--- a/arch/arm/mach-s3c2410/pm.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/pm.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Written by Ben Dooks, <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11/* s3c2410_pm_init
12 *
13 * called from board at initialisation time to setup the power
14 * management
15*/
16
17#ifdef CONFIG_PM
18
19extern __init int s3c2410_pm_init(void);
20
21#else
22
23static inline int s3c2410_pm_init(void)
24{
25 return 0;
26}
27#endif
28
29/* configuration for the IRQ mask over sleep */
30extern unsigned long s3c_irqwake_intmask;
31extern unsigned long s3c_irqwake_eintmask;
32
33/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
34extern unsigned long s3c_irqwake_intallow;
35extern unsigned long s3c_irqwake_eintallow;
36
37/* per-cpu sleep functions */
38
39extern void (*pm_cpu_prep)(void);
40extern void (*pm_cpu_sleep)(void);
41
42/* Flags for PM Control */
43
44extern unsigned long s3c_pm_flags;
45
46/* from sleep.S */
47
48extern int s3c2410_cpu_save(unsigned long *saveblk);
49extern void s3c2410_cpu_suspend(void);
50extern void s3c2410_cpu_resume(void);
51
52extern unsigned long s3c2410_sleep_save_phys;
53
54/* sleep save info */
55
56struct sleep_save {
57 void __iomem *reg;
58 unsigned long val;
59};
60
61#define SAVE_ITEM(x) \
62 { .reg = (x) }
63
64extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count);
65extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count);
66
67#ifdef CONFIG_PM
68extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state);
69extern int s3c24xx_irq_resume(struct sys_device *dev);
70#else
71#define s3c24xx_irq_suspend NULL
72#define s3c24xx_irq_resume NULL
73#endif
diff --git a/arch/arm/mach-s3c2410/s3c2400.h b/arch/arm/mach-s3c2410/s3c2400.h
deleted file mode 100644
index 8b2394e1ed40..000000000000
--- a/arch/arm/mach-s3c2410/s3c2400.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* arch/arm/mach-s3c2410/s3c2400.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C2400 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 09-Fev-2006 LCVR First version, based on s3c2410.h
14*/
15
16#ifdef CONFIG_CPU_S3C2400
17
18extern int s3c2400_init(void);
19
20extern void s3c2400_map_io(struct map_desc *mach_desc, int size);
21
22extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no);
23
24extern void s3c2400_init_clocks(int xtal);
25
26#else
27#define s3c2400_init_clocks NULL
28#define s3c2400_init_uarts NULL
29#define s3c2400_map_io NULL
30#define s3c2400_init NULL
31#endif
diff --git a/arch/arm/mach-s3c2410/s3c2410-clock.c b/arch/arm/mach-s3c2410/s3c2410-clock.c
deleted file mode 100644
index 992cc6af230e..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-clock.c
+++ /dev/null
@@ -1,276 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-clock.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410,S3C2440,S3C2442 Clock control support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License 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/init.h>
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/list.h>
27#include <linux/errno.h>
28#include <linux/err.h>
29#include <linux/sysdev.h>
30#include <linux/clk.h>
31#include <linux/mutex.h>
32#include <linux/delay.h>
33#include <linux/serial_core.h>
34
35#include <asm/mach/map.h>
36
37#include <asm/hardware.h>
38#include <asm/io.h>
39
40#include <asm/arch/regs-serial.h>
41#include <asm/arch/regs-clock.h>
42#include <asm/arch/regs-gpio.h>
43
44#include "s3c2410.h"
45#include "clock.h"
46#include "cpu.h"
47
48int s3c2410_clkcon_enable(struct clk *clk, int enable)
49{
50 unsigned int clocks = clk->ctrlbit;
51 unsigned long clkcon;
52
53 clkcon = __raw_readl(S3C2410_CLKCON);
54
55 if (enable)
56 clkcon |= clocks;
57 else
58 clkcon &= ~clocks;
59
60 /* ensure none of the special function bits set */
61 clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER);
62
63 __raw_writel(clkcon, S3C2410_CLKCON);
64
65 return 0;
66}
67
68static int s3c2410_upll_enable(struct clk *clk, int enable)
69{
70 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
71 unsigned long orig = clkslow;
72
73 if (enable)
74 clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF;
75 else
76 clkslow |= S3C2410_CLKSLOW_UCLK_OFF;
77
78 __raw_writel(clkslow, S3C2410_CLKSLOW);
79
80 /* if we started the UPLL, then allow to settle */
81
82 if (enable && (orig & S3C2410_CLKSLOW_UCLK_OFF))
83 udelay(200);
84
85 return 0;
86}
87
88/* standard clock definitions */
89
90static struct clk init_clocks_disable[] = {
91 {
92 .name = "nand",
93 .id = -1,
94 .parent = &clk_h,
95 .enable = s3c2410_clkcon_enable,
96 .ctrlbit = S3C2410_CLKCON_NAND,
97 }, {
98 .name = "sdi",
99 .id = -1,
100 .parent = &clk_p,
101 .enable = s3c2410_clkcon_enable,
102 .ctrlbit = S3C2410_CLKCON_SDI,
103 }, {
104 .name = "adc",
105 .id = -1,
106 .parent = &clk_p,
107 .enable = s3c2410_clkcon_enable,
108 .ctrlbit = S3C2410_CLKCON_ADC,
109 }, {
110 .name = "i2c",
111 .id = -1,
112 .parent = &clk_p,
113 .enable = s3c2410_clkcon_enable,
114 .ctrlbit = S3C2410_CLKCON_IIC,
115 }, {
116 .name = "iis",
117 .id = -1,
118 .parent = &clk_p,
119 .enable = s3c2410_clkcon_enable,
120 .ctrlbit = S3C2410_CLKCON_IIS,
121 }, {
122 .name = "spi",
123 .id = -1,
124 .parent = &clk_p,
125 .enable = s3c2410_clkcon_enable,
126 .ctrlbit = S3C2410_CLKCON_SPI,
127 }
128};
129
130static struct clk init_clocks[] = {
131 {
132 .name = "lcd",
133 .id = -1,
134 .parent = &clk_h,
135 .enable = s3c2410_clkcon_enable,
136 .ctrlbit = S3C2410_CLKCON_LCDC,
137 }, {
138 .name = "gpio",
139 .id = -1,
140 .parent = &clk_p,
141 .enable = s3c2410_clkcon_enable,
142 .ctrlbit = S3C2410_CLKCON_GPIO,
143 }, {
144 .name = "usb-host",
145 .id = -1,
146 .parent = &clk_h,
147 .enable = s3c2410_clkcon_enable,
148 .ctrlbit = S3C2410_CLKCON_USBH,
149 }, {
150 .name = "usb-device",
151 .id = -1,
152 .parent = &clk_h,
153 .enable = s3c2410_clkcon_enable,
154 .ctrlbit = S3C2410_CLKCON_USBD,
155 }, {
156 .name = "timers",
157 .id = -1,
158 .parent = &clk_p,
159 .enable = s3c2410_clkcon_enable,
160 .ctrlbit = S3C2410_CLKCON_PWMT,
161 }, {
162 .name = "uart",
163 .id = 0,
164 .parent = &clk_p,
165 .enable = s3c2410_clkcon_enable,
166 .ctrlbit = S3C2410_CLKCON_UART0,
167 }, {
168 .name = "uart",
169 .id = 1,
170 .parent = &clk_p,
171 .enable = s3c2410_clkcon_enable,
172 .ctrlbit = S3C2410_CLKCON_UART1,
173 }, {
174 .name = "uart",
175 .id = 2,
176 .parent = &clk_p,
177 .enable = s3c2410_clkcon_enable,
178 .ctrlbit = S3C2410_CLKCON_UART2,
179 }, {
180 .name = "rtc",
181 .id = -1,
182 .parent = &clk_p,
183 .enable = s3c2410_clkcon_enable,
184 .ctrlbit = S3C2410_CLKCON_RTC,
185 }, {
186 .name = "watchdog",
187 .id = -1,
188 .parent = &clk_p,
189 .ctrlbit = 0,
190 }, {
191 .name = "usb-bus-host",
192 .id = -1,
193 .parent = &clk_usb_bus,
194 }, {
195 .name = "usb-bus-gadget",
196 .id = -1,
197 .parent = &clk_usb_bus,
198 },
199};
200
201/* s3c2410_baseclk_add()
202 *
203 * Add all the clocks used by the s3c2410 or compatible CPUs
204 * such as the S3C2440 and S3C2442.
205 *
206 * We cannot use a system device as we are needed before any
207 * of the init-calls that initialise the devices are actually
208 * done.
209*/
210
211int __init s3c2410_baseclk_add(void)
212{
213 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
214 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
215 struct clk *clkp;
216 struct clk *xtal;
217 int ret;
218 int ptr;
219
220 clk_upll.enable = s3c2410_upll_enable;
221
222 if (s3c24xx_register_clock(&clk_usb_bus) < 0)
223 printk(KERN_ERR "failed to register usb bus clock\n");
224
225 /* register clocks from clock array */
226
227 clkp = init_clocks;
228 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
229 /* ensure that we note the clock state */
230
231 clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
232
233 ret = s3c24xx_register_clock(clkp);
234 if (ret < 0) {
235 printk(KERN_ERR "Failed to register clock %s (%d)\n",
236 clkp->name, ret);
237 }
238 }
239
240 /* We must be careful disabling the clocks we are not intending to
241 * be using at boot time, as subsytems such as the LCD which do
242 * their own DMA requests to the bus can cause the system to lockup
243 * if they where in the middle of requesting bus access.
244 *
245 * Disabling the LCD clock if the LCD is active is very dangerous,
246 * and therefore the bootloader should be careful to not enable
247 * the LCD clock if it is not needed.
248 */
249
250 /* install (and disable) the clocks we do not need immediately */
251
252 clkp = init_clocks_disable;
253 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) {
254
255 ret = s3c24xx_register_clock(clkp);
256 if (ret < 0) {
257 printk(KERN_ERR "Failed to register clock %s (%d)\n",
258 clkp->name, ret);
259 }
260
261 s3c2410_clkcon_enable(clkp, 0);
262 }
263
264 /* show the clock-slow value */
265
266 xtal = clk_get(NULL, "xtal");
267
268 printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n",
269 print_mhz(clk_get_rate(xtal) /
270 ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))),
271 (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast",
272 (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
273 (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
274
275 return 0;
276}
diff --git a/arch/arm/mach-s3c2410/s3c2410-dma.c b/arch/arm/mach-s3c2410/s3c2410-dma.c
deleted file mode 100644
index e67ba3911f11..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-dma.c
+++ /dev/null
@@ -1,161 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-dma.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 DMA selection
7 *
8 * http://armlinux.simtec.co.uk/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/sysdev.h>
18#include <linux/serial_core.h>
19
20#include <asm/dma.h>
21#include <asm/arch/dma.h>
22#include "dma.h"
23
24#include "cpu.h"
25
26#include <asm/arch/regs-serial.h>
27#include <asm/arch/regs-gpio.h>
28#include <asm/arch/regs-ac97.h>
29#include <asm/arch/regs-mem.h>
30#include <asm/arch/regs-lcd.h>
31#include <asm/arch/regs-sdi.h>
32#include <asm/arch/regs-iis.h>
33#include <asm/arch/regs-spi.h>
34
35static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = {
36 [DMACH_XD0] = {
37 .name = "xdreq0",
38 .channels[0] = S3C2410_DCON_CH0_XDREQ0 | DMA_CH_VALID,
39 },
40 [DMACH_XD1] = {
41 .name = "xdreq1",
42 .channels[1] = S3C2410_DCON_CH1_XDREQ1 | DMA_CH_VALID,
43 },
44 [DMACH_SDI] = {
45 .name = "sdi",
46 .channels[0] = S3C2410_DCON_CH0_SDI | DMA_CH_VALID,
47 .channels[2] = S3C2410_DCON_CH2_SDI | DMA_CH_VALID,
48 .channels[3] = S3C2410_DCON_CH3_SDI | DMA_CH_VALID,
49 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
50 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
51 },
52 [DMACH_SPI0] = {
53 .name = "spi0",
54 .channels[1] = S3C2410_DCON_CH1_SPI | DMA_CH_VALID,
55 .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT,
56 .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT,
57 },
58 [DMACH_SPI1] = {
59 .name = "spi1",
60 .channels[3] = S3C2410_DCON_CH3_SPI | DMA_CH_VALID,
61 .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT,
62 .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT,
63 },
64 [DMACH_UART0] = {
65 .name = "uart0",
66 .channels[0] = S3C2410_DCON_CH0_UART0 | DMA_CH_VALID,
67 .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
68 .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH,
69 },
70 [DMACH_UART1] = {
71 .name = "uart1",
72 .channels[1] = S3C2410_DCON_CH1_UART1 | DMA_CH_VALID,
73 .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
74 .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH,
75 },
76 [DMACH_UART2] = {
77 .name = "uart2",
78 .channels[3] = S3C2410_DCON_CH3_UART2 | DMA_CH_VALID,
79 .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
80 .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH,
81 },
82 [DMACH_TIMER] = {
83 .name = "timer",
84 .channels[0] = S3C2410_DCON_CH0_TIMER | DMA_CH_VALID,
85 .channels[2] = S3C2410_DCON_CH2_TIMER | DMA_CH_VALID,
86 .channels[3] = S3C2410_DCON_CH3_TIMER | DMA_CH_VALID,
87 },
88 [DMACH_I2S_IN] = {
89 .name = "i2s-sdi",
90 .channels[1] = S3C2410_DCON_CH1_I2SSDI | DMA_CH_VALID,
91 .channels[2] = S3C2410_DCON_CH2_I2SSDI | DMA_CH_VALID,
92 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
93 },
94 [DMACH_I2S_OUT] = {
95 .name = "i2s-sdo",
96 .channels[2] = S3C2410_DCON_CH2_I2SSDO | DMA_CH_VALID,
97 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
98 },
99 [DMACH_USB_EP1] = {
100 .name = "usb-ep1",
101 .channels[0] = S3C2410_DCON_CH0_USBEP1 | DMA_CH_VALID,
102 },
103 [DMACH_USB_EP2] = {
104 .name = "usb-ep2",
105 .channels[1] = S3C2410_DCON_CH1_USBEP2 | DMA_CH_VALID,
106 },
107 [DMACH_USB_EP3] = {
108 .name = "usb-ep3",
109 .channels[2] = S3C2410_DCON_CH2_USBEP3 | DMA_CH_VALID,
110 },
111 [DMACH_USB_EP4] = {
112 .name = "usb-ep4",
113 .channels[3] =S3C2410_DCON_CH3_USBEP4 | DMA_CH_VALID,
114 },
115};
116
117static void s3c2410_dma_select(struct s3c2410_dma_chan *chan,
118 struct s3c24xx_dma_map *map)
119{
120 chan->dcon = map->channels[chan->number] & ~DMA_CH_VALID;
121}
122
123static struct s3c24xx_dma_selection __initdata s3c2410_dma_sel = {
124 .select = s3c2410_dma_select,
125 .dcon_mask = 7 << 24,
126 .map = s3c2410_dma_mappings,
127 .map_size = ARRAY_SIZE(s3c2410_dma_mappings),
128};
129
130static int s3c2410_dma_add(struct sys_device *sysdev)
131{
132 return s3c24xx_dma_init_map(&s3c2410_dma_sel);
133}
134
135#if defined(CONFIG_CPU_S3C2410)
136static struct sysdev_driver s3c2410_dma_driver = {
137 .add = s3c2410_dma_add,
138};
139
140static int __init s3c2410_dma_init(void)
141{
142 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver);
143}
144
145arch_initcall(s3c2410_dma_init);
146#endif
147
148#if defined(CONFIG_CPU_S3C2442)
149/* S3C2442 DMA contains the same selection table as the S3C2410 */
150static struct sysdev_driver s3c2442_dma_driver = {
151 .add = s3c2410_dma_add,
152};
153
154static int __init s3c2442_dma_init(void)
155{
156 return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver);
157}
158
159arch_initcall(s3c2442_dma_init);
160#endif
161
diff --git a/arch/arm/mach-s3c2410/s3c2410-gpio.c b/arch/arm/mach-s3c2410/s3c2410-gpio.c
deleted file mode 100644
index ec3a276cc3cf..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-gpio.c
+++ /dev/null
@@ -1,71 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-gpio.c
2 *
3 * Copyright (c) 2004-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 GPIO support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License 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/kernel.h>
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/interrupt.h>
27#include <linux/ioport.h>
28
29#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/io.h>
32
33#include <asm/arch/regs-gpio.h>
34
35int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
36 unsigned int config)
37{
38 void __iomem *reg = S3C24XX_EINFLT0;
39 unsigned long flags;
40 unsigned long val;
41
42 if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15)
43 return -1;
44
45 config &= 0xff;
46
47 pin -= S3C2410_GPG8;
48 reg += pin & ~3;
49
50 local_irq_save(flags);
51
52 /* update filter width and clock source */
53
54 val = __raw_readl(reg);
55 val &= ~(0xff << ((pin & 3) * 8));
56 val |= config << ((pin & 3) * 8);
57 __raw_writel(val, reg);
58
59 /* update filter enable */
60
61 val = __raw_readl(S3C24XX_EXTINT2);
62 val &= ~(1 << ((pin * 4) + 3));
63 val |= on << ((pin * 4) + 3);
64 __raw_writel(val, S3C24XX_EXTINT2);
65
66 local_irq_restore(flags);
67
68 return 0;
69}
70
71EXPORT_SYMBOL(s3c2410_gpio_irqfilter);
diff --git a/arch/arm/mach-s3c2410/s3c2410-irq.c b/arch/arm/mach-s3c2410/s3c2410-irq.c
deleted file mode 100644
index c796c9c76e78..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-irq.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-irq.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20*/
21
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/interrupt.h>
25#include <linux/ioport.h>
26#include <linux/ptrace.h>
27#include <linux/sysdev.h>
28
29#include "cpu.h"
30#include "pm.h"
31
32static int s3c2410_irq_add(struct sys_device *sysdev)
33{
34 return 0;
35}
36
37static struct sysdev_driver s3c2410_irq_driver = {
38 .add = s3c2410_irq_add,
39 .suspend = s3c24xx_irq_suspend,
40 .resume = s3c24xx_irq_resume,
41};
42
43static int s3c2410_irq_init(void)
44{
45 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_irq_driver);
46}
47
48arch_initcall(s3c2410_irq_init);
diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c b/arch/arm/mach-s3c2410/s3c2410-pm.c
deleted file mode 100644
index 8bb6e5e21f59..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-pm.c
+++ /dev/null
@@ -1,156 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-pm.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 (and compatible) Power Manager (Suspend-To-RAM) support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License 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/init.h>
24#include <linux/suspend.h>
25#include <linux/errno.h>
26#include <linux/time.h>
27#include <linux/sysdev.h>
28
29#include <asm/hardware.h>
30#include <asm/io.h>
31
32#include <asm/mach-types.h>
33
34#include <asm/arch/regs-gpio.h>
35#include <asm/arch/h1940.h>
36
37#include "cpu.h"
38#include "pm.h"
39
40#ifdef CONFIG_S3C2410_PM_DEBUG
41extern void pm_dbg(const char *fmt, ...);
42#define DBG(fmt...) pm_dbg(fmt)
43#else
44#define DBG(fmt...) printk(KERN_DEBUG fmt)
45#endif
46
47static void s3c2410_pm_prepare(void)
48{
49 /* ensure at least GSTATUS3 has the resume address */
50
51 __raw_writel(virt_to_phys(s3c2410_cpu_resume), S3C2410_GSTATUS3);
52
53 DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
54 DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));
55
56 if (machine_is_h1940()) {
57 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
58 unsigned long ptr;
59 unsigned long calc = 0;
60
61 /* generate check for the bootloader to check on resume */
62
63 for (ptr = 0; ptr < 0x40000; ptr += 0x400)
64 calc += __raw_readl(base+ptr);
65
66 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
67 }
68
69 /* the RX3715 uses similar code and the same H1940 and the
70 * same offsets for resume and checksum pointers */
71
72 if (machine_is_rx3715()) {
73 void *base = phys_to_virt(H1940_SUSPEND_CHECK);
74 unsigned long ptr;
75 unsigned long calc = 0;
76
77 /* generate check for the bootloader to check on resume */
78
79 for (ptr = 0; ptr < 0x40000; ptr += 0x4)
80 calc += __raw_readl(base+ptr);
81
82 __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
83 }
84
85 if ( machine_is_aml_m5900() )
86 s3c2410_gpio_setpin(S3C2410_GPF2, 1);
87
88}
89
90static int s3c2410_pm_resume(struct sys_device *dev)
91{
92 unsigned long tmp;
93
94 /* unset the return-from-sleep flag, to ensure reset */
95
96 tmp = __raw_readl(S3C2410_GSTATUS2);
97 tmp &= S3C2410_GSTATUS2_OFFRESET;
98 __raw_writel(tmp, S3C2410_GSTATUS2);
99
100 if ( machine_is_aml_m5900() )
101 s3c2410_gpio_setpin(S3C2410_GPF2, 0);
102
103 return 0;
104}
105
106static int s3c2410_pm_add(struct sys_device *dev)
107{
108 pm_cpu_prep = s3c2410_pm_prepare;
109 pm_cpu_sleep = s3c2410_cpu_suspend;
110
111 return 0;
112}
113
114#if defined(CONFIG_CPU_S3C2410)
115static struct sysdev_driver s3c2410_pm_driver = {
116 .add = s3c2410_pm_add,
117 .resume = s3c2410_pm_resume,
118};
119
120/* register ourselves */
121
122static int __init s3c2410_pm_drvinit(void)
123{
124 return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver);
125}
126
127arch_initcall(s3c2410_pm_drvinit);
128#endif
129
130#if defined(CONFIG_CPU_S3C2440)
131static struct sysdev_driver s3c2440_pm_driver = {
132 .add = s3c2410_pm_add,
133 .resume = s3c2410_pm_resume,
134};
135
136static int __init s3c2440_pm_drvinit(void)
137{
138 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver);
139}
140
141arch_initcall(s3c2440_pm_drvinit);
142#endif
143
144#if defined(CONFIG_CPU_S3C2442)
145static struct sysdev_driver s3c2442_pm_driver = {
146 .add = s3c2410_pm_add,
147 .resume = s3c2410_pm_resume,
148};
149
150static int __init s3c2442_pm_drvinit(void)
151{
152 return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver);
153}
154
155arch_initcall(s3c2442_pm_drvinit);
156#endif
diff --git a/arch/arm/mach-s3c2410/s3c2410-sleep.S b/arch/arm/mach-s3c2410/s3c2410-sleep.S
deleted file mode 100644
index 9179a1024588..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410-sleep.S
+++ /dev/null
@@ -1,68 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/s3c2410-sleep.S
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 Power Manager (Suspend-To-RAM) support
7 *
8 * Based on PXA/SA1100 sleep code by:
9 * Nicolas Pitre, (c) 2002 Monta Vista Software Inc
10 * Cliff Brake, (c) 2001
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25*/
26
27#include <linux/linkage.h>
28#include <asm/assembler.h>
29#include <asm/hardware.h>
30#include <asm/arch/map.h>
31
32#include <asm/arch/regs-gpio.h>
33#include <asm/arch/regs-clock.h>
34#include <asm/arch/regs-mem.h>
35#include <asm/arch/regs-serial.h>
36
37 /* s3c2410_cpu_suspend
38 *
39 * put the cpu into sleep mode
40 */
41
42ENTRY(s3c2410_cpu_suspend)
43 @@ prepare cpu to sleep
44
45 ldr r4, =S3C2410_REFRESH
46 ldr r5, =S3C24XX_MISCCR
47 ldr r6, =S3C2410_CLKCON
48 ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB)
49 ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB)
50 ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB)
51
52 orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command
53 orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals
54 orr r9, r9, #S3C2410_CLKCON_POWER @ power down command
55
56 teq pc, #0 @ first as a trial-run to load cache
57 bl s3c2410_do_sleep
58 teq r0, r0 @ now do it for real
59 b s3c2410_do_sleep @
60
61 @@ align next bit of code to cache line
62 .align 8
63s3c2410_do_sleep:
64 streq r7, [ r4 ] @ SDRAM sleep command
65 streq r8, [ r5 ] @ SDRAM power-down config
66 streq r9, [ r6 ] @ CPU sleep
671: beq 1b
68 mov pc, r14
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 4cdc0d70c19f..1a86a9803753 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -31,10 +31,10 @@
31#include <asm/arch/regs-clock.h> 31#include <asm/arch/regs-clock.h>
32#include <asm/arch/regs-serial.h> 32#include <asm/arch/regs-serial.h>
33 33
34#include "s3c2410.h" 34#include <asm/plat-s3c24xx/s3c2410.h>
35#include "cpu.h" 35#include <asm/plat-s3c24xx/cpu.h>
36#include "devs.h" 36#include <asm/plat-s3c24xx/devs.h>
37#include "clock.h" 37#include <asm/plat-s3c24xx/clock.h>
38 38
39/* Initial IO mappings */ 39/* Initial IO mappings */
40 40
@@ -110,7 +110,7 @@ static struct sys_device s3c2410_sysdev = {
110 110
111/* need to register class before we actually register the device, and 111/* need to register class before we actually register the device, and
112 * we also need to ensure that it has been initialised before any of the 112 * we also need to ensure that it has been initialised before any of the
113 * drivers even try to use it (even if not on an s3c2440 based system) 113 * drivers even try to use it (even if not on an s3c2410 based system)
114 * as a driver which may support both 2410 and 2440 may try and use it. 114 * as a driver which may support both 2410 and 2440 may try and use it.
115*/ 115*/
116 116
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h
deleted file mode 100644
index fbed084f26d0..000000000000
--- a/arch/arm/mach-s3c2410/s3c2410.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* arch/arm/mach-s3c2410/s3c2410.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2410 machine directory
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#ifdef CONFIG_CPU_S3C2410
15
16extern int s3c2410_init(void);
17
18extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
19
20extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
21
22extern void s3c2410_init_clocks(int xtal);
23
24extern int s3c2410_baseclk_add(void);
25
26#else
27#define s3c2410_init_clocks NULL
28#define s3c2410_init_uarts NULL
29#define s3c2410_map_io NULL
30#define s3c2410_init NULL
31#endif
diff --git a/arch/arm/mach-s3c2410/s3c2412.h b/arch/arm/mach-s3c2410/s3c2412.h
deleted file mode 100644
index c6e56032a6e7..000000000000
--- a/arch/arm/mach-s3c2410/s3c2412.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* arch/arm/mach-s3c2410/s3c2412.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2412 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2412
14
15extern int s3c2412_init(void);
16
17extern void s3c2412_map_io(struct map_desc *mach_desc, int size);
18
19extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
20
21extern void s3c2412_init_clocks(int xtal);
22
23extern int s3c2412_baseclk_add(void);
24#else
25#define s3c2412_init_clocks NULL
26#define s3c2412_init_uarts NULL
27#define s3c2412_map_io NULL
28#define s3c2412_init NULL
29#endif
diff --git a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h
deleted file mode 100644
index dcd316076c59..000000000000
--- a/arch/arm/mach-s3c2410/s3c2440.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* arch/arm/mach-s3c2410/s3c2440.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2440 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2440
14extern int s3c2440_init(void);
15#else
16#define s3c2440_init NULL
17#endif
diff --git a/arch/arm/mach-s3c2410/s3c2442.h b/arch/arm/mach-s3c2410/s3c2442.h
deleted file mode 100644
index 0ae37d24866c..000000000000
--- a/arch/arm/mach-s3c2410/s3c2442.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* arch/arm/mach-s3c2410/s3c2442.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2442 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2442
14extern int s3c2442_init(void);
15#else
16#define s3c2442_init NULL
17#endif
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S
index 2018c2e1dcc5..637aaba65390 100644
--- a/arch/arm/mach-s3c2410/sleep.S
+++ b/arch/arm/mach-s3c2410/sleep.S
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/sleep.S 1/* linux/arch/arm/mach-s3c2410/s3c2410-sleep.S
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -34,126 +34,35 @@
34#include <asm/arch/regs-mem.h> 34#include <asm/arch/regs-mem.h>
35#include <asm/arch/regs-serial.h> 35#include <asm/arch/regs-serial.h>
36 36
37/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not 37 /* s3c2410_cpu_suspend
38 * reset the UART configuration, only enable if you really need this!
39*/
40//#define CONFIG_DEBUG_RESUME
41
42 .text
43
44 /* s3c2410_cpu_save
45 *
46 * save enough of the CPU state to allow us to re-start
47 * pm.c code. as we store items like the sp/lr, we will
48 * end up returning from this function when the cpu resumes
49 * so the return value is set to mark this.
50 *
51 * This arangement means we avoid having to flush the cache
52 * from this code.
53 *
54 * entry:
55 * r0 = pointer to save block
56 *
57 * exit:
58 * r0 = 0 => we stored everything
59 * 1 => resumed from sleep
60 */
61
62ENTRY(s3c2410_cpu_save)
63 stmfd sp!, { r4 - r12, lr }
64
65 @@ store co-processor registers
66
67 mrc p15, 0, r4, c15, c1, 0 @ CP access register
68 mrc p15, 0, r5, c13, c0, 0 @ PID
69 mrc p15, 0, r6, c3, c0, 0 @ Domain ID
70 mrc p15, 0, r7, c2, c0, 0 @ translation table base address
71 mrc p15, 0, r8, c1, c0, 0 @ control register
72
73 stmia r0, { r4 - r13 }
74
75 mov r0, #0
76 ldmfd sp, { r4 - r12, pc }
77
78 @@ return to the caller, after having the MMU
79 @@ turned on, this restores the last bits from the
80 @@ stack
81resume_with_mmu:
82 mov r0, #1
83 ldmfd sp!, { r4 - r12, pc }
84
85 .ltorg
86
87 @@ the next bits sit in the .data segment, even though they
88 @@ happen to be code... the s3c2410_sleep_save_phys needs to be
89 @@ accessed by the resume code before it can restore the MMU.
90 @@ This means that the variable has to be close enough for the
91 @@ code to read it... since the .text segment needs to be RO,
92 @@ the data segment can be the only place to put this code.
93
94 .data
95
96 .global s3c2410_sleep_save_phys
97s3c2410_sleep_save_phys:
98 .word 0
99
100 /* s3c2410_cpu_resume
101 * 38 *
102 * resume code entry for bootloader to call 39 * put the cpu into sleep mode
103 *
104 * we must put this code here in the data segment as we have no
105 * other way of restoring the stack pointer after sleep, and we
106 * must not write to the code segment (code is read-only)
107 */ 40 */
108 41
109ENTRY(s3c2410_cpu_resume) 42ENTRY(s3c2410_cpu_suspend)
110 mov r0, #PSR_I_BIT | PSR_F_BIT | SVC_MODE 43 @@ prepare cpu to sleep
111 msr cpsr_c, r0 44
112 45 ldr r4, =S3C2410_REFRESH
113 @@ load UART to allow us to print the two characters for 46 ldr r5, =S3C24XX_MISCCR
114 @@ resume debug 47 ldr r6, =S3C2410_CLKCON
115 48 ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB)
116 mov r2, #S3C24XX_PA_UART & 0xff000000 49 ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB)
117 orr r2, r2, #S3C24XX_PA_UART & 0xff000 50 ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB)
118 51
119#if 0 52 orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command
120 /* SMDK2440 LED set */ 53 orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals
121 mov r14, #S3C24XX_PA_GPIO 54 orr r9, r9, #S3C2410_CLKCON_POWER @ power down command
122 ldr r12, [ r14, #0x54 ] 55
123 bic r12, r12, #3<<4 56 teq pc, #0 @ first as a trial-run to load cache
124 orr r12, r12, #1<<7 57 bl s3c2410_do_sleep
125 str r12, [ r14, #0x54 ] 58 teq r0, r0 @ now do it for real
126#endif 59 b s3c2410_do_sleep @
127 60
128#ifdef CONFIG_DEBUG_RESUME 61 @@ align next bit of code to cache line
129 mov r3, #'L' 62 .align 5
130 strb r3, [ r2, #S3C2410_UTXH ] 63s3c2410_do_sleep:
1311001: 64 streq r7, [ r4 ] @ SDRAM sleep command
132 ldrb r14, [ r3, #S3C2410_UTRSTAT ] 65 streq r8, [ r5 ] @ SDRAM power-down config
133 tst r14, #S3C2410_UTRSTAT_TXE 66 streq r9, [ r6 ] @ CPU sleep
134 beq 1001b 671: beq 1b
135#endif /* CONFIG_DEBUG_RESUME */ 68 mov pc, r14
136
137 mov r1, #0
138 mcr p15, 0, r1, c8, c7, 0 @@ invalidate I & D TLBs
139 mcr p15, 0, r1, c7, c7, 0 @@ invalidate I & D caches
140
141 ldr r0, s3c2410_sleep_save_phys @ address of restore block
142 ldmia r0, { r4 - r13 }
143
144 mcr p15, 0, r4, c15, c1, 0 @ CP access register
145 mcr p15, 0, r5, c13, c0, 0 @ PID
146 mcr p15, 0, r6, c3, c0, 0 @ Domain ID
147 mcr p15, 0, r7, c2, c0, 0 @ translation table base
148
149#ifdef CONFIG_DEBUG_RESUME
150 mov r3, #'R'
151 strb r3, [ r2, #S3C2410_UTXH ]
152#endif
153
154 ldr r2, =resume_with_mmu
155 mcr p15, 0, r8, c1, c0, 0 @ turn on MMU, etc
156 nop @ second-to-last before mmu
157 mov pc, r2 @ go back to virtual address
158
159 .ltorg
diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c
index 22b0e1cdd4bf..bcd562ac1d3d 100644
--- a/arch/arm/mach-s3c2410/usb-simtec.c
+++ b/arch/arm/mach-s3c2410/usb-simtec.c
@@ -35,7 +35,7 @@
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37 37
38#include "devs.h" 38#include <asm/plat-s3c24xx/devs.h>
39#include "usb-simtec.h" 39#include "usb-simtec.h"
40 40
41/* control power and monitor over-current events on various Simtec 41/* control power and monitor over-current events on various Simtec
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
new file mode 100644
index 000000000000..befc5fdbb613
--- /dev/null
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -0,0 +1,58 @@
1# arch/arm/mach-s3c2412/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7config CPU_S3C2412
8 bool
9 depends on ARCH_S3C2410
10 select S3C2412_PM if PM
11 select S3C2412_DMA if S3C2410_DMA
12 help
13 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
14
15config CPU_S3C2412_ONLY
16 bool
17 depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \
18 !CPU_S3C2440 && !CPU_S3C2442 && !CPU_S3C2443 && CPU_S3C2412
19 default y if CPU_S3C2412
20
21config S3C2412_DMA
22 bool
23 depends on CPU_S3C2412
24 help
25 Internal config node for S3C2412 DMA support
26
27config S3C2412_PM
28 bool
29 help
30 Internal config node to apply S3C2412 power management
31
32
33menu "S3C2412 Machines"
34
35config MACH_SMDK2413
36 bool "SMDK2413"
37 select CPU_S3C2412
38 select MACH_S3C2413
39 select MACH_SMDK
40 help
41 Say Y here if you are using an SMDK2413
42
43config MACH_S3C2413
44 bool
45 help
46 Internal node for S3C2413 version of SMDK2413, so that
47 machine_is_s3c2413() will work when MACH_SMDK2413 is
48 selected
49
50config MACH_VSTMS
51 bool "VMSTMS"
52 select CPU_S3C2412
53 help
54 Say Y here if you are using an VSTMS board
55
56
57endmenu
58
diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile
new file mode 100644
index 000000000000..f8e011691b31
--- /dev/null
+++ b/arch/arm/mach-s3c2412/Makefile
@@ -0,0 +1,21 @@
1# arch/arm/mach-s3c2412/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
13obj-$(CONFIG_CPU_S3C2412) += irq.o
14obj-$(CONFIG_CPU_S3C2412) += clock.o
15obj-$(CONFIG_S3C2412_DMA) += dma.o
16obj-$(CONFIG_S3C2412_PM) += pm.o
17
18# Machine support
19
20obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
21obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o
diff --git a/arch/arm/mach-s3c2410/s3c2412-clock.c b/arch/arm/mach-s3c2412/clock.c
index 8f94ad83901d..6a8e4448770b 100644
--- a/arch/arm/mach-s3c2410/s3c2412-clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2412-clock.c 1/* linux/arch/arm/mach-s3c2412/clock.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -41,9 +41,9 @@
41#include <asm/arch/regs-clock.h> 41#include <asm/arch/regs-clock.h>
42#include <asm/arch/regs-gpio.h> 42#include <asm/arch/regs-gpio.h>
43 43
44#include "s3c2412.h" 44#include <asm/plat-s3c24xx/s3c2412.h>
45#include "clock.h" 45#include <asm/plat-s3c24xx/clock.h>
46#include "cpu.h" 46#include <asm/plat-s3c24xx/cpu.h>
47 47
48/* We currently have to assume that the system is running 48/* We currently have to assume that the system is running
49 * from the XTPll input, and that all ***REFCLKs are being 49 * from the XTPll input, and that all ***REFCLKs are being
diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c b/arch/arm/mach-s3c2412/dma.c
index 138f726ac6bf..d0f4695c09d9 100644
--- a/arch/arm/mach-s3c2410/s3c2412-dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2412-dma.c 1/* linux/arch/arm/mach-s3c2412/dma.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -21,8 +21,8 @@
21#include <asm/arch/dma.h> 21#include <asm/arch/dma.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24#include "dma.h" 24#include <asm/plat-s3c24xx/dma.h>
25#include "cpu.h" 25#include <asm/plat-s3c24xx/cpu.h>
26 26
27#include <asm/arch/regs-serial.h> 27#include <asm/arch/regs-serial.h>
28#include <asm/arch/regs-gpio.h> 28#include <asm/arch/regs-gpio.h>
@@ -146,6 +146,7 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = {
146 146
147static int s3c2412_dma_add(struct sys_device *sysdev) 147static int s3c2412_dma_add(struct sys_device *sysdev)
148{ 148{
149 s3c2410_dma_init();
149 return s3c24xx_dma_init_map(&s3c2412_dma_sel); 150 return s3c24xx_dma_init_map(&s3c2412_dma_sel);
150} 151}
151 152
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2412/irq.c
index ffcc30b23a80..e89dbdcb1b7b 100644
--- a/arch/arm/mach-s3c2410/s3c2412-irq.c
+++ b/arch/arm/mach-s3c2412/irq.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2412/s3c2412-irq.c 1/* linux/arch/arm/mach-s3c2412/irq.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -35,9 +35,9 @@
35#include <asm/arch/regs-irq.h> 35#include <asm/arch/regs-irq.h>
36#include <asm/arch/regs-gpio.h> 36#include <asm/arch/regs-gpio.h>
37 37
38#include "cpu.h" 38#include <asm/plat-s3c24xx/cpu.h>
39#include "irq.h" 39#include <asm/plat-s3c24xx/irq.h>
40#include "pm.h" 40#include <asm/plat-s3c24xx/pm.h>
41 41
42/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by 42/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by
43 * having them turn up in both the INT* and the EINT* registers. Whilst 43 * having them turn up in both the INT* and the EINT* registers. Whilst
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index 4f89abd7a6df..b5befce6c8d3 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-smdk2413.c 1/* linux/arch/arm/mach-s3c2412/mach-smdk2413.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -37,15 +37,16 @@
37#include <asm/arch/regs-lcd.h> 37#include <asm/arch/regs-lcd.h>
38 38
39#include <asm/arch/idle.h> 39#include <asm/arch/idle.h>
40#include <asm/arch/udc.h>
40#include <asm/arch/fb.h> 41#include <asm/arch/fb.h>
41 42
42#include "s3c2410.h" 43#include <asm/plat-s3c24xx/s3c2410.h>
43#include "s3c2412.h" 44#include <asm/plat-s3c24xx/s3c2412.h>
44#include "clock.h" 45#include <asm/plat-s3c24xx/clock.h>
45#include "devs.h" 46#include <asm/plat-s3c24xx/devs.h>
46#include "cpu.h" 47#include <asm/plat-s3c24xx/cpu.h>
47 48
48#include "common-smdk.h" 49#include <asm/plat-s3c24xx/common-smdk.h>
49 50
50static struct map_desc smdk2413_iodesc[] __initdata = { 51static struct map_desc smdk2413_iodesc[] __initdata = {
51}; 52};
@@ -75,12 +76,38 @@ static struct s3c2410_uartcfg smdk2413_uartcfgs[] __initdata = {
75 } 76 }
76}; 77};
77 78
79static void smdk2413_udc_pullup(enum s3c2410_udc_cmd_e cmd)
80{
81 printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);
82
83 switch (cmd)
84 {
85 case S3C2410_UDC_P_ENABLE :
86 s3c2410_gpio_setpin(S3C2410_GPF2, 1);
87 break;
88 case S3C2410_UDC_P_DISABLE :
89 s3c2410_gpio_setpin(S3C2410_GPF2, 0);
90 break;
91 case S3C2410_UDC_P_RESET :
92 break;
93 default:
94 break;
95 }
96}
97
98
99static struct s3c2410_udc_mach_info smdk2413_udc_cfg __initdata = {
100 .udc_command = smdk2413_udc_pullup,
101};
102
103
78static struct platform_device *smdk2413_devices[] __initdata = { 104static struct platform_device *smdk2413_devices[] __initdata = {
79 &s3c_device_usb, 105 &s3c_device_usb,
80 //&s3c_device_lcd, 106 //&s3c_device_lcd,
81 &s3c_device_wdt, 107 &s3c_device_wdt,
82 &s3c_device_i2c, 108 &s3c_device_i2c,
83 &s3c_device_iis, 109 &s3c_device_iis,
110 &s3c_device_usbgadget,
84}; 111};
85 112
86static struct s3c24xx_board smdk2413_board __initdata = { 113static struct s3c24xx_board smdk2413_board __initdata = {
@@ -109,7 +136,19 @@ static void __init smdk2413_map_io(void)
109} 136}
110 137
111static void __init smdk2413_machine_init(void) 138static void __init smdk2413_machine_init(void)
112{ 139{ /* Turn off suspend on both USB ports, and switch the
140 * selectable USB port to USB device mode. */
141
142 s3c2410_gpio_setpin(S3C2410_GPF2, 0);
143 s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPIO_OUTPUT);
144
145 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
146 S3C2410_MISCCR_USBSUSPND0 |
147 S3C2410_MISCCR_USBSUSPND1, 0x0);
148
149
150 s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
151
113 smdk_machine_init(); 152 smdk_machine_init();
114} 153}
115 154
@@ -126,6 +165,19 @@ MACHINE_START(S3C2413, "S3C2413")
126 .timer = &s3c24xx_timer, 165 .timer = &s3c24xx_timer,
127MACHINE_END 166MACHINE_END
128 167
168MACHINE_START(SMDK2412, "SMDK2412")
169 /* Maintainer: Ben Dooks <ben@fluff.org> */
170 .phys_io = S3C2410_PA_UART,
171 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
172 .boot_params = S3C2410_SDRAM_PA + 0x100,
173
174 .fixup = smdk2413_fixup,
175 .init_irq = s3c24xx_init_irq,
176 .map_io = smdk2413_map_io,
177 .init_machine = smdk2413_machine_init,
178 .timer = &s3c24xx_timer,
179MACHINE_END
180
129MACHINE_START(SMDK2413, "SMDK2413") 181MACHINE_START(SMDK2413, "SMDK2413")
130 /* Maintainer: Ben Dooks <ben@fluff.org> */ 182 /* Maintainer: Ben Dooks <ben@fluff.org> */
131 .phys_io = S3C2410_PA_UART, 183 .phys_io = S3C2410_PA_UART,
diff --git a/arch/arm/mach-s3c2410/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 0360e1055bcd..4231b549d797 100644
--- a/arch/arm/mach-s3c2410/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-vstms.c 1/* linux/arch/arm/mach-s3c2412/mach-vstms.c
2 * 2 *
3 * (C) 2006 Thomas Gleixner <tglx@linutronix.de> 3 * (C) 2006 Thomas Gleixner <tglx@linutronix.de>
4 * 4 *
@@ -28,7 +28,6 @@
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/hardware.h> 30#include <asm/hardware.h>
31#include <asm/hardware/iomd.h>
32#include <asm/setup.h> 31#include <asm/setup.h>
33#include <asm/io.h> 32#include <asm/io.h>
34#include <asm/irq.h> 33#include <asm/irq.h>
@@ -43,11 +42,11 @@
43 42
44#include <asm/arch/nand.h> 43#include <asm/arch/nand.h>
45 44
46#include "s3c2410.h" 45#include <asm/plat-s3c24xx/s3c2410.h>
47#include "s3c2412.h" 46#include <asm/plat-s3c24xx/s3c2412.h>
48#include "clock.h" 47#include <asm/plat-s3c24xx/clock.h>
49#include "devs.h" 48#include <asm/plat-s3c24xx/devs.h>
50#include "cpu.h" 49#include <asm/plat-s3c24xx/cpu.h>
51 50
52 51
53static struct map_desc vstms_iodesc[] __initdata = { 52static struct map_desc vstms_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c2410/s3c2412-pm.c b/arch/arm/mach-s3c2412/pm.c
index 19b63322d259..8988dac388a9 100644
--- a/arch/arm/mach-s3c2410/s3c2412-pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2412-pm.c 1/* linux/arch/arm/mach-s3c2412/pm.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -28,10 +28,10 @@
28#include <asm/arch/regs-gpio.h> 28#include <asm/arch/regs-gpio.h>
29#include <asm/arch/regs-dsc.h> 29#include <asm/arch/regs-dsc.h>
30 30
31#include "cpu.h" 31#include <asm/plat-s3c24xx/cpu.h>
32#include "pm.h" 32#include <asm/plat-s3c24xx/pm.h>
33 33
34#include "s3c2412.h" 34#include <asm/plat-s3c24xx/s3c2412.h>
35 35
36static void s3c2412_cpu_suspend(void) 36static void s3c2412_cpu_suspend(void)
37{ 37{
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index 2f651a811ecd..aafe0bc593f1 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2412.c 1/* linux/arch/arm/mach-s3c2412/s3c2412.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -38,11 +38,11 @@
38#include <asm/arch/regs-gpioj.h> 38#include <asm/arch/regs-gpioj.h>
39#include <asm/arch/regs-dsc.h> 39#include <asm/arch/regs-dsc.h>
40 40
41#include "s3c2412.h" 41#include <asm/plat-s3c24xx/s3c2412.h>
42#include "cpu.h" 42#include <asm/plat-s3c24xx/cpu.h>
43#include "devs.h" 43#include <asm/plat-s3c24xx/devs.h>
44#include "clock.h" 44#include <asm/plat-s3c24xx/clock.h>
45#include "pm.h" 45#include <asm/plat-s3c24xx/pm.h>
46 46
47#ifndef CONFIG_CPU_S3C2412_ONLY 47#ifndef CONFIG_CPU_S3C2412_ONLY
48void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; 48void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
new file mode 100644
index 000000000000..e3bfda098c0f
--- /dev/null
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -0,0 +1,71 @@
1# arch/arm/mach-s3c2440/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7config CPU_S3C2440
8 bool
9 depends on ARCH_S3C2410
10 select S3C2410_CLOCK
11 select S3C2410_PM if PM
12 select S3C2410_GPIO
13 select S3C2440_DMA if S3C2410_DMA
14 select CPU_S3C244X
15 help
16 Support for S3C2440 Samsung Mobile CPU based systems.
17
18config S3C2440_DMA
19 bool
20 depends on ARCH_S3C2410 && CPU_S3C24405B
21 help
22 Support for S3C2440 specific DMA code5A
23
24
25menu "S3C2440 Machines"
26
27config MACH_ANUBIS
28 bool "Simtec Electronics ANUBIS"
29 select CPU_S3C2440
30 select PM_SIMTEC if PM
31 help
32 Say Y here if you are using the Simtec Electronics ANUBIS
33 development system
34
35config MACH_OSIRIS
36 bool "Simtec IM2440D20 (OSIRIS) module"
37 select CPU_S3C2440
38 select PM_SIMTEC if PM
39 help
40 Say Y here if you are using the Simtec IM2440D20 module, also
41 known as the Osiris.
42
43config MACH_RX3715
44 bool "HP iPAQ rx3715"
45 select CPU_S3C2440
46 select PM_H1940 if PM
47 help
48 Say Y here if you are using the HP iPAQ rx3715.
49
50config ARCH_S3C2440
51 bool "SMDK2440"
52 select CPU_S3C2440
53 select MACH_SMDK
54 help
55 Say Y here if you are using the SMDK2440.
56
57config MACH_NEXCODER_2440
58 bool "NexVision NEXCODER 2440 Light Board"
59 select CPU_S3C2440
60 help
61 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
62
63config SMDK2440_CPU2440
64 bool "SMDK2440 with S3C2440 CPU module"
65 depends on ARCH_S3C2440
66 default y if ARCH_S3C2440
67 select CPU_S3C2440
68
69
70endmenu
71
diff --git a/arch/arm/mach-s3c2440/Makefile b/arch/arm/mach-s3c2440/Makefile
new file mode 100644
index 000000000000..c81ed6248dcb
--- /dev/null
+++ b/arch/arm/mach-s3c2440/Makefile
@@ -0,0 +1,23 @@
1# arch/arm/mach-s3c2440/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2440) += s3c2440.o dsc.o
13obj-$(CONFIG_CPU_S3C2440) += irq.o
14obj-$(CONFIG_CPU_S3C2440) += clock.o
15obj-$(CONFIG_S3C2440_DMA) += dma.o
16
17# Machine support
18
19obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
20obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o
21obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o
22obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o
23obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2440/clock.c
index ba13c1d079d1..79e2ea4adaf3 100644
--- a/arch/arm/mach-s3c2410/s3c2440-clock.c
+++ b/arch/arm/mach-s3c2440/clock.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-clock.c 1/* linux/arch/arm/mach-s3c2440/clock.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -41,8 +41,8 @@
41 41
42#include <asm/arch/regs-clock.h> 42#include <asm/arch/regs-clock.h>
43 43
44#include "clock.h" 44#include <asm/plat-s3c24xx/clock.h>
45#include "cpu.h" 45#include <asm/plat-s3c24xx/cpu.h>
46 46
47/* S3C2440 extended clock support */ 47/* S3C2440 extended clock support */
48 48
diff --git a/arch/arm/mach-s3c2410/s3c2440-dma.c b/arch/arm/mach-s3c2440/dma.c
index 47b861b9443d..cd035a3ec878 100644
--- a/arch/arm/mach-s3c2410/s3c2440-dma.c
+++ b/arch/arm/mach-s3c2440/dma.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-dma.c 1/* linux/arch/arm/mach-s3c2440/dma.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -19,9 +19,9 @@
19 19
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/arch/dma.h> 21#include <asm/arch/dma.h>
22#include "dma.h"
23 22
24#include "cpu.h" 23#include <asm/plat-s3c24xx/dma.h>
24#include <asm/plat-s3c24xx/cpu.h>
25 25
26#include <asm/arch/regs-serial.h> 26#include <asm/arch/regs-serial.h>
27#include <asm/arch/regs-gpio.h> 27#include <asm/arch/regs-gpio.h>
@@ -147,8 +147,53 @@ static struct s3c24xx_dma_selection __initdata s3c2440_dma_sel = {
147 .map_size = ARRAY_SIZE(s3c2440_dma_mappings), 147 .map_size = ARRAY_SIZE(s3c2440_dma_mappings),
148}; 148};
149 149
150static struct s3c24xx_dma_order __initdata s3c2440_dma_order = {
151 .channels = {
152 [DMACH_SDI] = {
153 .list = {
154 [0] = 3 | DMA_CH_VALID,
155 [1] = 2 | DMA_CH_VALID,
156 [2] = 1 | DMA_CH_VALID,
157 [3] = 0 | DMA_CH_VALID,
158 },
159 },
160 [DMACH_I2S_IN] = {
161 .list = {
162 [0] = 1 | DMA_CH_VALID,
163 [1] = 2 | DMA_CH_VALID,
164 },
165 },
166 [DMACH_I2S_OUT] = {
167 .list = {
168 [0] = 2 | DMA_CH_VALID,
169 [1] = 1 | DMA_CH_VALID,
170 },
171 },
172 [DMACH_PCM_IN] = {
173 .list = {
174 [0] = 2 | DMA_CH_VALID,
175 [1] = 1 | DMA_CH_VALID,
176 },
177 },
178 [DMACH_PCM_OUT] = {
179 .list = {
180 [0] = 1 | DMA_CH_VALID,
181 [1] = 3 | DMA_CH_VALID,
182 },
183 },
184 [DMACH_MIC_IN] = {
185 .list = {
186 [0] = 3 | DMA_CH_VALID,
187 [1] = 2 | DMA_CH_VALID,
188 },
189 },
190 },
191};
192
150static int s3c2440_dma_add(struct sys_device *sysdev) 193static int s3c2440_dma_add(struct sys_device *sysdev)
151{ 194{
195 s3c2410_dma_init();
196 s3c24xx_dma_order_set(&s3c2440_dma_order);
152 return s3c24xx_dma_init_map(&s3c2440_dma_sel); 197 return s3c24xx_dma_init_map(&s3c2440_dma_sel);
153} 198}
154 199
diff --git a/arch/arm/mach-s3c2410/s3c2440-dsc.c b/arch/arm/mach-s3c2440/dsc.c
index c92ea66ba45e..2995ff5681bb 100644
--- a/arch/arm/mach-s3c2410/s3c2440-dsc.c
+++ b/arch/arm/mach-s3c2440/dsc.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-dsc.c 1/* linux/arch/arm/mach-s3c2440/dsc.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -27,8 +27,8 @@
27#include <asm/arch/regs-gpio.h> 27#include <asm/arch/regs-gpio.h>
28#include <asm/arch/regs-dsc.h> 28#include <asm/arch/regs-dsc.h>
29 29
30#include "cpu.h" 30#include <asm/plat-s3c24xx/cpu.h>
31#include "s3c2440.h" 31#include <asm/plat-s3c24xx/s3c2440.h>
32 32
33int s3c2440_set_dsc(unsigned int pin, unsigned int value) 33int s3c2440_set_dsc(unsigned int pin, unsigned int value)
34{ 34{
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2440/irq.c
index 1ba19b27ab05..1069d13d8c57 100644
--- a/arch/arm/mach-s3c2410/s3c2440-irq.c
+++ b/arch/arm/mach-s3c2440/irq.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-irq.c 1/* linux/arch/arm/mach-s3c2440/irq.c
2 * 2 *
3 * Copyright (c) 2003,2004 Simtec Electronics 3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -35,9 +35,9 @@
35#include <asm/arch/regs-irq.h> 35#include <asm/arch/regs-irq.h>
36#include <asm/arch/regs-gpio.h> 36#include <asm/arch/regs-gpio.h>
37 37
38#include "cpu.h" 38#include <asm/plat-s3c24xx/cpu.h>
39#include "pm.h" 39#include <asm/plat-s3c24xx/pm.h>
40#include "irq.h" 40#include <asm/plat-s3c24xx/irq.h>
41 41
42/* WDT/AC97 */ 42/* WDT/AC97 */
43 43
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 0fad0c2fe07b..3f0288eb1ed5 100644
--- a/arch/arm/mach-s3c2410/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-anubis.c 1/* linux/arch/arm/mach-s3c2440/mach-anubis.c
2 * 2 *
3 * Copyright (c) 2003-2005 Simtec Electronics 3 * Copyright (c) 2003-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -42,9 +42,9 @@
42#include <linux/mtd/nand_ecc.h> 42#include <linux/mtd/nand_ecc.h>
43#include <linux/mtd/partitions.h> 43#include <linux/mtd/partitions.h>
44 44
45#include "clock.h" 45#include <asm/plat-s3c24xx/clock.h>
46#include "devs.h" 46#include <asm/plat-s3c24xx/devs.h>
47#include "cpu.h" 47#include <asm/plat-s3c24xx/cpu.h>
48 48
49#define COPYRIGHT ", (c) 2005 Simtec Electronics" 49#define COPYRIGHT ", (c) 2005 Simtec Electronics"
50 50
diff --git a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c
index d6dfdad8c90b..6d551d88330b 100644
--- a/arch/arm/mach-s3c2410/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2440/mach-nexcoder.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-nexcoder.c 1/* linux/arch/arm/mach-s3c2440/mach-nexcoder.c
2 * 2 *
3 * Copyright (c) 2004 Nex Vision 3 * Copyright (c) 2004 Nex Vision
4 * Guillaume GOURAT <guillaume.gourat@nexvision.tv> 4 * Guillaume GOURAT <guillaume.gourat@nexvision.tv>
@@ -38,11 +38,11 @@
38#include <asm/arch/regs-gpio.h> 38#include <asm/arch/regs-gpio.h>
39#include <asm/arch/regs-serial.h> 39#include <asm/arch/regs-serial.h>
40 40
41#include "s3c2410.h" 41#include <asm/plat-s3c24xx/s3c2410.h>
42#include "s3c2440.h" 42#include <asm/plat-s3c24xx/s3c2440.h>
43#include "clock.h" 43#include <asm/plat-s3c24xx/clock.h>
44#include "devs.h" 44#include <asm/plat-s3c24xx/devs.h>
45#include "cpu.h" 45#include <asm/plat-s3c24xx/cpu.h>
46 46
47static struct map_desc nexcoder_iodesc[] __initdata = { 47static struct map_desc nexcoder_iodesc[] __initdata = {
48 /* nothing here yet */ 48 /* nothing here yet */
diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 37b40850c9b9..2ed8e51f20c8 100644
--- a/arch/arm/mach-s3c2410/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-osiris.c 1/* linux/arch/arm/mach-s3c2440/mach-osiris.c
2 * 2 *
3 * Copyright (c) 2005 Simtec Electronics 3 * Copyright (c) 2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -41,9 +41,9 @@
41#include <linux/mtd/nand_ecc.h> 41#include <linux/mtd/nand_ecc.h>
42#include <linux/mtd/partitions.h> 42#include <linux/mtd/partitions.h>
43 43
44#include "clock.h" 44#include <asm/plat-s3c24xx/clock.h>
45#include "devs.h" 45#include <asm/plat-s3c24xx/devs.h>
46#include "cpu.h" 46#include <asm/plat-s3c24xx/cpu.h>
47 47
48/* onboard perihpheral map */ 48/* onboard perihpheral map */
49 49
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index ecbcdf79d739..480ccde63fb4 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-rx3715.c 1/* linux/arch/arm/mach-s3c2440/mach-rx3715.c
2 * 2 *
3 * Copyright (c) 2003,2004 Simtec Electronics 3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -33,7 +33,6 @@
33#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
34 34
35#include <asm/hardware.h> 35#include <asm/hardware.h>
36#include <asm/hardware/iomd.h>
37#include <asm/io.h> 36#include <asm/io.h>
38#include <asm/irq.h> 37#include <asm/irq.h>
39#include <asm/mach-types.h> 38#include <asm/mach-types.h>
@@ -46,10 +45,10 @@
46#include <asm/arch/nand.h> 45#include <asm/arch/nand.h>
47#include <asm/arch/fb.h> 46#include <asm/arch/fb.h>
48 47
49#include "clock.h" 48#include <asm/plat-s3c24xx/clock.h>
50#include "devs.h" 49#include <asm/plat-s3c24xx/devs.h>
51#include "cpu.h" 50#include <asm/plat-s3c24xx/cpu.h>
52#include "pm.h" 51#include <asm/plat-s3c24xx/pm.h>
53 52
54static struct map_desc rx3715_iodesc[] __initdata = { 53static struct map_desc rx3715_iodesc[] __initdata = {
55 /* dump ISA space somewhere unused */ 54 /* dump ISA space somewhere unused */
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c
index 2b61f4ed1da4..c17eb5b1f6b4 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2440/mach-smdk2440.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-smdk2440.c 1/* linux/arch/arm/mach-s3c2440/mach-smdk2440.c
2 * 2 *
3 * Copyright (c) 2004,2005 Simtec Electronics 3 * Copyright (c) 2004,2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -27,12 +27,10 @@
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/hardware.h> 29#include <asm/hardware.h>
30#include <asm/hardware/iomd.h>
31#include <asm/io.h> 30#include <asm/io.h>
32#include <asm/irq.h> 31#include <asm/irq.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34 33
35//#include <asm/debug-ll.h>
36#include <asm/arch/regs-serial.h> 34#include <asm/arch/regs-serial.h>
37#include <asm/arch/regs-gpio.h> 35#include <asm/arch/regs-gpio.h>
38#include <asm/arch/regs-lcd.h> 36#include <asm/arch/regs-lcd.h>
@@ -40,13 +38,13 @@
40#include <asm/arch/idle.h> 38#include <asm/arch/idle.h>
41#include <asm/arch/fb.h> 39#include <asm/arch/fb.h>
42 40
43#include "s3c2410.h" 41#include <asm/plat-s3c24xx/s3c2410.h>
44#include "s3c2440.h" 42#include <asm/plat-s3c24xx/s3c2440.h>
45#include "clock.h" 43#include <asm/plat-s3c24xx/clock.h>
46#include "devs.h" 44#include <asm/plat-s3c24xx/devs.h>
47#include "cpu.h" 45#include <asm/plat-s3c24xx/cpu.h>
48 46
49#include "common-smdk.h" 47#include <asm/plat-s3c24xx/common-smdk.h>
50 48
51static struct map_desc smdk2440_iodesc[] __initdata = { 49static struct map_desc smdk2440_iodesc[] __initdata = {
52 /* ISA IO Space map (memory space selected by A24) */ 50 /* ISA IO Space map (memory space selected by A24) */
@@ -144,6 +142,7 @@ static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {
144#endif 142#endif
145 143
146 .lpcsel = ((0xCE6) & ~7) | 1<<4, 144 .lpcsel = ((0xCE6) & ~7) | 1<<4,
145 .type = S3C2410_LCDCON1_TFT16BPP,
147 146
148 .width = 240, 147 .width = 240,
149 .height = 320, 148 .height = 320,
diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c
index 344eb27cca48..90e1da61fbc3 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2440/s3c2440.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440.c 1/* linux/arch/arm/mach-s3c2440/s3c2440.c
2 * 2 *
3 * Copyright (c) 2004-2006 Simtec Electronics 3 * Copyright (c) 2004-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -29,9 +29,9 @@
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32#include "s3c2440.h" 32#include <asm/plat-s3c24xx/s3c2440.h>
33#include "devs.h" 33#include <asm/plat-s3c24xx/devs.h>
34#include "cpu.h" 34#include <asm/plat-s3c24xx/cpu.h>
35 35
36static struct sys_device s3c2440_sysdev = { 36static struct sys_device s3c2440_sysdev = {
37 .cls = &s3c2440_sysclass, 37 .cls = &s3c2440_sysclass,
diff --git a/arch/arm/mach-s3c2442/Kconfig b/arch/arm/mach-s3c2442/Kconfig
new file mode 100644
index 000000000000..bf8d87abfab3
--- /dev/null
+++ b/arch/arm/mach-s3c2442/Kconfig
@@ -0,0 +1,27 @@
1# arch/arm/mach-s3c2442/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7config CPU_S3C2442
8 bool
9 depends on ARCH_S3C2420
10 select S3C2410_CLOCK
11 select S3C2410_GPIO
12 select S3C2410_PM if PM
13 select CPU_S3C244X
14 help
15 Support for S3C2442 Samsung Mobile CPU based systems.
16
17
18menu "S3C2442 Machines"
19
20config SMDK2440_CPU2442
21 bool "SMDM2440 with S3C2442 CPU module"
22 depends on ARCH_S3C2440
23 select CPU_S3C2442
24
25
26endmenu
27
diff --git a/arch/arm/mach-s3c2442/Makefile b/arch/arm/mach-s3c2442/Makefile
new file mode 100644
index 000000000000..2a909c6c5798
--- /dev/null
+++ b/arch/arm/mach-s3c2442/Makefile
@@ -0,0 +1,16 @@
1# arch/arm/mach-s3c2442/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2442) += s3c2442.o
13obj-$(CONFIG_CPU_S3C2442) += clock.o
14
15# Machine support
16
diff --git a/arch/arm/mach-s3c2410/s3c2442-clock.c b/arch/arm/mach-s3c2442/clock.c
index 4e292ca7c9be..5b9e830ac4d3 100644
--- a/arch/arm/mach-s3c2410/s3c2442-clock.c
+++ b/arch/arm/mach-s3c2442/clock.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2442-clock.c 1/* linux/arch/arm/mach-s3c2442/clock.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -41,8 +41,8 @@
41 41
42#include <asm/arch/regs-clock.h> 42#include <asm/arch/regs-clock.h>
43 43
44#include "clock.h" 44#include <asm/plat-s3c24xx/clock.h>
45#include "cpu.h" 45#include <asm/plat-s3c24xx/cpu.h>
46 46
47/* S3C2442 extended clock support */ 47/* S3C2442 extended clock support */
48 48
diff --git a/arch/arm/mach-s3c2410/s3c2442.c b/arch/arm/mach-s3c2442/s3c2442.c
index 428732ee68c4..fbf8264249da 100644
--- a/arch/arm/mach-s3c2410/s3c2442.c
+++ b/arch/arm/mach-s3c2442/s3c2442.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c2442.c 1/* linux/arch/arm/mach-s3c2442/s3c2442.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -19,8 +19,8 @@
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/sysdev.h> 20#include <linux/sysdev.h>
21 21
22#include "s3c2442.h" 22#include <asm/plat-s3c24xx/s3c2442.h>
23#include "cpu.h" 23#include <asm/plat-s3c24xx/cpu.h>
24 24
25static struct sys_device s3c2442_sysdev = { 25static struct sys_device s3c2442_sysdev = {
26 .cls = &s3c2442_sysclass, 26 .cls = &s3c2442_sysclass,
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
new file mode 100644
index 000000000000..c649bb2e7ce8
--- /dev/null
+++ b/arch/arm/mach-s3c2443/Kconfig
@@ -0,0 +1,29 @@
1# arch/arm/mach-s3c2443/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7config CPU_S3C2443
8 bool
9 depends on ARCH_S3C2410
10 select S3C2443_DMA if S3C2410_DMA
11 help
12 Support for the S3C2443 SoC from the S3C24XX line
13
14config S3C2443_DMA
15 bool
16 depends on CPU_S3C2443
17 help
18 Internal config node for S3C2443 DMA support
19
20menu "S3C2443 Machines"
21
22config MACH_SMDK2443
23 bool "SMDK2443"
24 select CPU_S3C2443
25 select MACH_SMDK
26 help
27 Say Y here if you are using an SMDK2443
28
29endmenu
diff --git a/arch/arm/mach-s3c2443/Makefile b/arch/arm/mach-s3c2443/Makefile
new file mode 100644
index 000000000000..d1843c9eb8bd
--- /dev/null
+++ b/arch/arm/mach-s3c2443/Makefile
@@ -0,0 +1,20 @@
1# arch/arm/mach-s3c2443/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12obj-$(CONFIG_CPU_S3C2443) += s3c2443.o
13obj-$(CONFIG_CPU_S3C2443) += irq.o
14obj-$(CONFIG_CPU_S3C2443) += clock.o
15
16obj-$(CONFIG_S3C2443_DMA) += dma.o
17
18# Machine support
19
20obj-$(CONFIG_MACH_SMDK2443) += mach-smdk2443.o
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c
new file mode 100644
index 000000000000..dd2272fb1131
--- /dev/null
+++ b/arch/arm/mach-s3c2443/clock.c
@@ -0,0 +1,1007 @@
1/* linux/arch/arm/mach-s3c2443/clock.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2443 Clock control support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License 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/init.h>
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/list.h>
27#include <linux/errno.h>
28#include <linux/err.h>
29#include <linux/sysdev.h>
30#include <linux/clk.h>
31#include <linux/mutex.h>
32#include <linux/delay.h>
33#include <linux/serial_core.h>
34
35#include <asm/mach/map.h>
36
37#include <asm/hardware.h>
38#include <asm/io.h>
39
40#include <asm/arch/regs-s3c2443-clock.h>
41
42#include <asm/plat-s3c24xx/s3c2443.h>
43#include <asm/plat-s3c24xx/clock.h>
44#include <asm/plat-s3c24xx/cpu.h>
45
46/* We currently have to assume that the system is running
47 * from the XTPll input, and that all ***REFCLKs are being
48 * fed from it, as we cannot read the state of OM[4] from
49 * software.
50 *
51 * It would be possible for each board initialisation to
52 * set the correct muxing at initialisation
53*/
54
55static int s3c2443_clkcon_enable_h(struct clk *clk, int enable)
56{
57 unsigned int clocks = clk->ctrlbit;
58 unsigned long clkcon;
59
60 clkcon = __raw_readl(S3C2443_HCLKCON);
61
62 if (enable)
63 clkcon |= clocks;
64 else
65 clkcon &= ~clocks;
66
67 __raw_writel(clkcon, S3C2443_HCLKCON);
68
69 return 0;
70}
71
72static int s3c2443_clkcon_enable_p(struct clk *clk, int enable)
73{
74 unsigned int clocks = clk->ctrlbit;
75 unsigned long clkcon;
76
77 clkcon = __raw_readl(S3C2443_PCLKCON);
78
79 if (enable)
80 clkcon |= clocks;
81 else
82 clkcon &= ~clocks;
83
84 __raw_writel(clkcon, S3C2443_HCLKCON);
85
86 return 0;
87}
88
89static int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
90{
91 unsigned int clocks = clk->ctrlbit;
92 unsigned long clkcon;
93
94 clkcon = __raw_readl(S3C2443_SCLKCON);
95
96 if (enable)
97 clkcon |= clocks;
98 else
99 clkcon &= ~clocks;
100
101 __raw_writel(clkcon, S3C2443_SCLKCON);
102
103 return 0;
104}
105
106static unsigned long s3c2443_roundrate_clksrc(struct clk *clk,
107 unsigned long rate,
108 unsigned int max)
109{
110 unsigned long parent_rate = clk_get_rate(clk->parent);
111 int div;
112
113 if (rate > parent_rate)
114 return parent_rate;
115
116 /* note, we remove the +/- 1 calculations as they cancel out */
117
118 div = (rate / parent_rate);
119
120 if (div < 1)
121 div = 1;
122 else if (div > max)
123 div = max;
124
125 return parent_rate / div;
126}
127
128static unsigned long s3c2443_roundrate_clksrc4(struct clk *clk,
129 unsigned long rate)
130{
131 return s3c2443_roundrate_clksrc(clk, rate, 4);
132}
133
134static unsigned long s3c2443_roundrate_clksrc16(struct clk *clk,
135 unsigned long rate)
136{
137 return s3c2443_roundrate_clksrc(clk, rate, 16);
138}
139
140static unsigned long s3c2443_roundrate_clksrc256(struct clk *clk,
141 unsigned long rate)
142{
143 return s3c2443_roundrate_clksrc(clk, rate, 256);
144}
145
146/* clock selections */
147
148/* CPU EXTCLK input */
149static struct clk clk_ext = {
150 .name = "ext",
151 .id = -1,
152};
153
154static struct clk clk_mpllref = {
155 .name = "mpllref",
156 .parent = &clk_xtal,
157 .id = -1,
158};
159
160#if 0
161static struct clk clk_mpll = {
162 .name = "mpll",
163 .parent = &clk_mpllref,
164 .id = -1,
165};
166#endif
167
168static struct clk clk_epllref;
169
170static struct clk clk_epll = {
171 .name = "epll",
172 .parent = &clk_epllref,
173 .id = -1,
174};
175
176static struct clk clk_i2s_ext = {
177 .name = "i2s-ext",
178 .id = -1,
179};
180
181static int s3c2443_setparent_epllref(struct clk *clk, struct clk *parent)
182{
183 unsigned long clksrc = __raw_readl(S3C2443_CLKSRC);
184
185 clksrc &= ~S3C2443_CLKSRC_EPLLREF_MASK;
186
187 if (parent == &clk_xtal)
188 clksrc |= S3C2443_CLKSRC_EPLLREF_XTAL;
189 else if (parent == &clk_ext)
190 clksrc |= S3C2443_CLKSRC_EPLLREF_EXTCLK;
191 else if (parent != &clk_mpllref)
192 return -EINVAL;
193
194 __raw_writel(clksrc, S3C2443_CLKSRC);
195 clk->parent = parent;
196
197 return 0;
198}
199
200static struct clk clk_epllref = {
201 .name = "epllref",
202 .id = -1,
203 .set_parent = s3c2443_setparent_epllref,
204};
205
206static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
207{
208 unsigned long parent_rate = clk_get_rate(clk->parent);
209 unsigned long div = __raw_readl(S3C2443_CLKDIV0);
210
211 div &= S3C2443_CLKDIV0_EXTDIV_MASK;
212 div >>= (S3C2443_CLKDIV0_EXTDIV_SHIFT-1); /* x2 */
213
214 return parent_rate / (div + 1);
215}
216
217static struct clk clk_mdivclk = {
218 .name = "mdivclk",
219 .parent = &clk_mpllref,
220 .id = -1,
221 .get_rate = s3c2443_getrate_mdivclk,
222};
223
224
225static int s3c2443_setparent_msysclk(struct clk *clk, struct clk *parent)
226{
227 unsigned long clksrc = __raw_readl(S3C2443_CLKSRC);
228
229 clksrc &= ~(S3C2443_CLKSRC_MSYSCLK_MPLL |
230 S3C2443_CLKSRC_EXTCLK_DIV);
231
232 if (parent == &clk_mpll)
233 clksrc |= S3C2443_CLKSRC_MSYSCLK_MPLL;
234 else if (parent == &clk_mdivclk)
235 clksrc |= S3C2443_CLKSRC_EXTCLK_DIV;
236 else if (parent != &clk_mpllref)
237 return -EINVAL;
238
239 __raw_writel(clksrc, S3C2443_CLKSRC);
240 clk->parent = parent;
241
242 return 0;
243}
244
245static struct clk clk_msysclk = {
246 .name = "msysclk",
247 .parent = &clk_xtal,
248 .id = -1,
249 .set_parent = s3c2443_setparent_msysclk,
250};
251
252
253/* esysclk
254 *
255 * this is sourced from either the EPLL or the EPLLref clock
256*/
257
258static int s3c2443_setparent_esysclk(struct clk *clk, struct clk *parent)
259{
260 unsigned long clksrc = __raw_readl(S3C2443_CLKSRC);
261
262 if (parent == &clk_epll)
263 clksrc |= S3C2443_CLKSRC_ESYSCLK_EPLL;
264 else if (parent == &clk_epllref)
265 clksrc &= ~S3C2443_CLKSRC_ESYSCLK_EPLL;
266 else
267 return -EINVAL;
268
269 __raw_writel(clksrc, S3C2443_CLKSRC);
270 clk->parent = parent;
271
272 return 0;
273}
274
275static struct clk clk_esysclk = {
276 .name = "esysclk",
277 .parent = &clk_epll,
278 .id = -1,
279 .set_parent = s3c2443_setparent_esysclk,
280};
281
282/* uartclk
283 *
284 * UART baud-rate clock sourced from esysclk via a divisor
285*/
286
287static unsigned long s3c2443_getrate_uart(struct clk *clk)
288{
289 unsigned long parent_rate = clk_get_rate(clk->parent);
290 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
291
292 div &= S3C2443_CLKDIV1_UARTDIV_MASK;
293 div >>= S3C2443_CLKDIV1_UARTDIV_SHIFT;
294
295 return parent_rate / (div + 1);
296}
297
298
299static int s3c2443_setrate_uart(struct clk *clk, unsigned long rate)
300{
301 unsigned long parent_rate = clk_get_rate(clk->parent);
302 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
303
304 rate = s3c2443_roundrate_clksrc16(clk, rate);
305 rate = parent_rate / rate;
306
307 clkdivn &= ~S3C2443_CLKDIV1_UARTDIV_MASK;
308 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_UARTDIV_SHIFT;
309
310 __raw_writel(clkdivn, S3C2443_CLKDIV1);
311 return 0;
312}
313
314static struct clk clk_uart = {
315 .name = "uartclk",
316 .id = -1,
317 .parent = &clk_esysclk,
318 .get_rate = s3c2443_getrate_uart,
319 .set_rate = s3c2443_setrate_uart,
320 .round_rate = s3c2443_roundrate_clksrc16,
321};
322
323/* hsspi
324 *
325 * high-speed spi clock, sourced from esysclk
326*/
327
328static unsigned long s3c2443_getrate_hsspi(struct clk *clk)
329{
330 unsigned long parent_rate = clk_get_rate(clk->parent);
331 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
332
333 div &= S3C2443_CLKDIV1_HSSPIDIV_MASK;
334 div >>= S3C2443_CLKDIV1_HSSPIDIV_SHIFT;
335
336 return parent_rate / (div + 1);
337}
338
339
340static int s3c2443_setrate_hsspi(struct clk *clk, unsigned long rate)
341{
342 unsigned long parent_rate = clk_get_rate(clk->parent);
343 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
344
345 rate = s3c2443_roundrate_clksrc4(clk, rate);
346 rate = parent_rate / rate;
347
348 clkdivn &= ~S3C2443_CLKDIV1_HSSPIDIV_MASK;
349 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_HSSPIDIV_SHIFT;
350
351 __raw_writel(clkdivn, S3C2443_CLKDIV1);
352 return 0;
353}
354
355static struct clk clk_hsspi = {
356 .name = "hsspi",
357 .id = -1,
358 .parent = &clk_esysclk,
359 .ctrlbit = S3C2443_SCLKCON_HSSPICLK,
360 .enable = s3c2443_clkcon_enable_s,
361 .get_rate = s3c2443_getrate_hsspi,
362 .set_rate = s3c2443_setrate_hsspi,
363 .round_rate = s3c2443_roundrate_clksrc4,
364};
365
366/* usbhost
367 *
368 * usb host bus-clock, usually 48MHz to provide USB bus clock timing
369*/
370
371static unsigned long s3c2443_getrate_usbhost(struct clk *clk)
372{
373 unsigned long parent_rate = clk_get_rate(clk->parent);
374 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
375
376 div &= S3C2443_CLKDIV1_USBHOSTDIV_MASK;
377 div >>= S3C2443_CLKDIV1_USBHOSTDIV_SHIFT;
378
379 return parent_rate / (div + 1);
380}
381
382static int s3c2443_setrate_usbhost(struct clk *clk, unsigned long rate)
383{
384 unsigned long parent_rate = clk_get_rate(clk->parent);
385 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
386
387 rate = s3c2443_roundrate_clksrc4(clk, rate);
388 rate = parent_rate / rate;
389
390 clkdivn &= ~S3C2443_CLKDIV1_USBHOSTDIV_MASK;
391 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_USBHOSTDIV_SHIFT;
392
393 __raw_writel(clkdivn, S3C2443_CLKDIV1);
394 return 0;
395}
396
397struct clk clk_usb_bus_host = {
398 .name = "usb-bus-host-parent",
399 .id = -1,
400 .parent = &clk_esysclk,
401 .ctrlbit = S3C2443_SCLKCON_USBHOST,
402 .enable = s3c2443_clkcon_enable_s,
403 .get_rate = s3c2443_getrate_usbhost,
404 .set_rate = s3c2443_setrate_usbhost,
405 .round_rate = s3c2443_roundrate_clksrc4,
406};
407
408/* clk_hsmcc_div
409 *
410 * this clock is sourced from epll, and is fed through a divider,
411 * to a mux controlled by sclkcon where either it or a extclk can
412 * be fed to the hsmmc block
413*/
414
415static unsigned long s3c2443_getrate_hsmmc_div(struct clk *clk)
416{
417 unsigned long parent_rate = clk_get_rate(clk->parent);
418 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
419
420 div &= S3C2443_CLKDIV1_HSMMCDIV_MASK;
421 div >>= S3C2443_CLKDIV1_HSMMCDIV_SHIFT;
422
423 return parent_rate / (div + 1);
424}
425
426static int s3c2443_setrate_hsmmc_div(struct clk *clk, unsigned long rate)
427{
428 unsigned long parent_rate = clk_get_rate(clk->parent);
429 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
430
431 rate = s3c2443_roundrate_clksrc4(clk, rate);
432 rate = parent_rate / rate;
433
434 clkdivn &= ~S3C2443_CLKDIV1_HSMMCDIV_MASK;
435 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_HSMMCDIV_SHIFT;
436
437 __raw_writel(clkdivn, S3C2443_CLKDIV1);
438 return 0;
439}
440
441static struct clk clk_hsmmc_div = {
442 .name = "hsmmc-div",
443 .id = -1,
444 .parent = &clk_esysclk,
445 .get_rate = s3c2443_getrate_hsmmc_div,
446 .set_rate = s3c2443_setrate_hsmmc_div,
447 .round_rate = s3c2443_roundrate_clksrc4,
448};
449
450static int s3c2443_setparent_hsmmc(struct clk *clk, struct clk *parent)
451{
452 unsigned long clksrc = __raw_readl(S3C2443_SCLKCON);
453
454 clksrc &= ~(S3C2443_SCLKCON_HSMMCCLK_EXT |
455 S3C2443_SCLKCON_HSMMCCLK_EPLL);
456
457 if (parent == &clk_epll)
458 clksrc |= S3C2443_SCLKCON_HSMMCCLK_EPLL;
459 else if (parent == &clk_ext)
460 clksrc |= S3C2443_SCLKCON_HSMMCCLK_EXT;
461 else
462 return -EINVAL;
463
464 if (clk->usage > 0) {
465 __raw_writel(clksrc, S3C2443_SCLKCON);
466 }
467
468 clk->parent = parent;
469 return 0;
470}
471
472static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
473{
474 return s3c2443_setparent_hsmmc(clk, clk->parent);
475}
476
477static struct clk clk_hsmmc = {
478 .name = "hsmmc-if",
479 .id = -1,
480 .parent = &clk_hsmmc_div,
481 .enable = s3c2443_enable_hsmmc,
482 .set_parent = s3c2443_setparent_hsmmc,
483};
484
485/* i2s_eplldiv
486 *
487 * this clock is the output from the i2s divisor of esysclk
488*/
489
490static unsigned long s3c2443_getrate_i2s_eplldiv(struct clk *clk)
491{
492 unsigned long parent_rate = clk_get_rate(clk->parent);
493 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
494
495 div &= S3C2443_CLKDIV1_I2SDIV_MASK;
496 div >>= S3C2443_CLKDIV1_I2SDIV_SHIFT;
497
498 return parent_rate / (div + 1);
499}
500
501static int s3c2443_setrate_i2s_eplldiv(struct clk *clk, unsigned long rate)
502{
503 unsigned long parent_rate = clk_get_rate(clk->parent);
504 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
505
506 rate = s3c2443_roundrate_clksrc16(clk, rate);
507 rate = parent_rate / rate;
508
509 clkdivn &= ~S3C2443_CLKDIV1_I2SDIV_MASK;
510 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_I2SDIV_SHIFT;
511
512 __raw_writel(clkdivn, S3C2443_CLKDIV1);
513 return 0;
514}
515
516static struct clk clk_i2s_eplldiv = {
517 .name = "i2s-eplldiv",
518 .id = -1,
519 .parent = &clk_esysclk,
520 .get_rate = s3c2443_getrate_i2s_eplldiv,
521 .set_rate = s3c2443_setrate_i2s_eplldiv,
522 .round_rate = s3c2443_roundrate_clksrc16,
523};
524
525/* i2s-ref
526 *
527 * i2s bus reference clock, selectable from external, esysclk or epllref
528*/
529
530static int s3c2443_setparent_i2s(struct clk *clk, struct clk *parent)
531{
532 unsigned long clksrc = __raw_readl(S3C2443_CLKSRC);
533
534 clksrc &= ~S3C2443_CLKSRC_I2S_MASK;
535
536 if (parent == &clk_epllref)
537 clksrc |= S3C2443_CLKSRC_I2S_EPLLREF;
538 else if (parent == &clk_i2s_ext)
539 clksrc |= S3C2443_CLKSRC_I2S_EXT;
540 else if (parent != &clk_i2s_eplldiv)
541 return -EINVAL;
542
543 clk->parent = parent;
544 __raw_writel(clksrc, S3C2443_CLKSRC);
545
546 return 0;
547}
548
549static struct clk clk_i2s = {
550 .name = "i2s-if",
551 .id = -1,
552 .parent = &clk_i2s_eplldiv,
553 .ctrlbit = S3C2443_SCLKCON_I2SCLK,
554 .enable = s3c2443_clkcon_enable_s,
555 .set_parent = s3c2443_setparent_i2s,
556};
557
558/* cam-if
559 *
560 * camera interface bus-clock, divided down from esysclk
561*/
562
563static unsigned long s3c2443_getrate_cam(struct clk *clk)
564{
565 unsigned long parent_rate = clk_get_rate(clk->parent);
566 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
567
568 div &= S3C2443_CLKDIV1_CAMDIV_MASK;
569 div >>= S3C2443_CLKDIV1_CAMDIV_SHIFT;
570
571 return parent_rate / (div + 1);
572}
573
574static int s3c2443_setrate_cam(struct clk *clk, unsigned long rate)
575{
576 unsigned long parent_rate = clk_get_rate(clk->parent);
577 unsigned long clkdiv1 = __raw_readl(S3C2443_CLKDIV1);
578
579 rate = s3c2443_roundrate_clksrc16(clk, rate);
580 rate = parent_rate / rate;
581
582 clkdiv1 &= ~S3C2443_CLKDIV1_CAMDIV_MASK;
583 clkdiv1 |= (rate - 1) << S3C2443_CLKDIV1_CAMDIV_SHIFT;
584
585 __raw_writel(clkdiv1, S3C2443_CLKDIV1);
586 return 0;
587}
588
589static struct clk clk_cam = {
590 .name = "camif-upll", /* same as 2440 name */
591 .id = -1,
592 .parent = &clk_esysclk,
593 .ctrlbit = S3C2443_SCLKCON_CAMCLK,
594 .enable = s3c2443_clkcon_enable_s,
595 .get_rate = s3c2443_getrate_cam,
596 .set_rate = s3c2443_setrate_cam,
597 .round_rate = s3c2443_roundrate_clksrc16,
598};
599
600/* display-if
601 *
602 * display interface clock, divided from esysclk
603*/
604
605static unsigned long s3c2443_getrate_display(struct clk *clk)
606{
607 unsigned long parent_rate = clk_get_rate(clk->parent);
608 unsigned long div = __raw_readl(S3C2443_CLKDIV1);
609
610 div &= S3C2443_CLKDIV1_DISPDIV_MASK;
611 div >>= S3C2443_CLKDIV1_DISPDIV_SHIFT;
612
613 return parent_rate / (div + 1);
614}
615
616static int s3c2443_setrate_display(struct clk *clk, unsigned long rate)
617{
618 unsigned long parent_rate = clk_get_rate(clk->parent);
619 unsigned long clkdivn = __raw_readl(S3C2443_CLKDIV1);
620
621 rate = s3c2443_roundrate_clksrc256(clk, rate);
622 rate = parent_rate / rate;
623
624 clkdivn &= ~S3C2443_CLKDIV1_UARTDIV_MASK;
625 clkdivn |= (rate - 1) << S3C2443_CLKDIV1_UARTDIV_SHIFT;
626
627 __raw_writel(clkdivn, S3C2443_CLKDIV1);
628 return 0;
629}
630
631static struct clk clk_display = {
632 .name = "display-if",
633 .id = -1,
634 .parent = &clk_esysclk,
635 .ctrlbit = S3C2443_SCLKCON_DISPCLK,
636 .enable = s3c2443_clkcon_enable_s,
637 .get_rate = s3c2443_getrate_display,
638 .set_rate = s3c2443_setrate_display,
639 .round_rate = s3c2443_roundrate_clksrc256,
640};
641
642/* standard clock definitions */
643
644static struct clk init_clocks_disable[] = {
645 {
646 .name = "nand",
647 .id = -1,
648 .parent = &clk_h,
649 }, {
650 .name = "sdi",
651 .id = -1,
652 .parent = &clk_p,
653 .enable = s3c2443_clkcon_enable_p,
654 .ctrlbit = S3C2443_PCLKCON_SDI,
655 }, {
656 .name = "adc",
657 .id = -1,
658 .parent = &clk_p,
659 .enable = s3c2443_clkcon_enable_p,
660 .ctrlbit = S3C2443_PCLKCON_ADC,
661 }, {
662 .name = "i2c",
663 .id = -1,
664 .parent = &clk_p,
665 .enable = s3c2443_clkcon_enable_p,
666 .ctrlbit = S3C2443_PCLKCON_IIC,
667 }, {
668 .name = "iis",
669 .id = -1,
670 .parent = &clk_p,
671 .enable = s3c2443_clkcon_enable_p,
672 .ctrlbit = S3C2443_PCLKCON_IIS,
673 }, {
674 .name = "spi",
675 .id = 0,
676 .parent = &clk_p,
677 .enable = s3c2443_clkcon_enable_p,
678 .ctrlbit = S3C2443_PCLKCON_SPI0,
679 }, {
680 .name = "spi",
681 .id = 1,
682 .parent = &clk_p,
683 .enable = s3c2443_clkcon_enable_p,
684 .ctrlbit = S3C2443_PCLKCON_SPI1,
685 }
686};
687
688static struct clk init_clocks[] = {
689 {
690 .name = "dma",
691 .id = 0,
692 .parent = &clk_h,
693 .enable = s3c2443_clkcon_enable_h,
694 .ctrlbit = S3C2443_HCLKCON_DMA0,
695 }, {
696 .name = "dma",
697 .id = 1,
698 .parent = &clk_h,
699 .enable = s3c2443_clkcon_enable_h,
700 .ctrlbit = S3C2443_HCLKCON_DMA1,
701 }, {
702 .name = "dma",
703 .id = 2,
704 .parent = &clk_h,
705 .enable = s3c2443_clkcon_enable_h,
706 .ctrlbit = S3C2443_HCLKCON_DMA2,
707 }, {
708 .name = "dma",
709 .id = 3,
710 .parent = &clk_h,
711 .enable = s3c2443_clkcon_enable_h,
712 .ctrlbit = S3C2443_HCLKCON_DMA3,
713 }, {
714 .name = "dma",
715 .id = 4,
716 .parent = &clk_h,
717 .enable = s3c2443_clkcon_enable_h,
718 .ctrlbit = S3C2443_HCLKCON_DMA4,
719 }, {
720 .name = "dma",
721 .id = 5,
722 .parent = &clk_h,
723 .enable = s3c2443_clkcon_enable_h,
724 .ctrlbit = S3C2443_HCLKCON_DMA5,
725 }, {
726 .name = "lcd",
727 .id = -1,
728 .parent = &clk_h,
729 .enable = s3c2443_clkcon_enable_h,
730 .ctrlbit = S3C2443_HCLKCON_LCDC,
731 }, {
732 .name = "gpio",
733 .id = -1,
734 .parent = &clk_p,
735 .enable = s3c2443_clkcon_enable_p,
736 .ctrlbit = S3C2443_PCLKCON_GPIO,
737 }, {
738 .name = "usb-host",
739 .id = -1,
740 .parent = &clk_h,
741 .enable = s3c2443_clkcon_enable_h,
742 .ctrlbit = S3C2443_HCLKCON_USBH,
743 }, {
744 .name = "usb-device",
745 .id = -1,
746 .parent = &clk_h,
747 .enable = s3c2443_clkcon_enable_h,
748 .ctrlbit = S3C2443_HCLKCON_USBD,
749 }, {
750 .name = "timers",
751 .id = -1,
752 .parent = &clk_p,
753 .enable = s3c2443_clkcon_enable_p,
754 .ctrlbit = S3C2443_PCLKCON_PWMT,
755 }, {
756 .name = "uart",
757 .id = 0,
758 .parent = &clk_p,
759 .enable = s3c2443_clkcon_enable_p,
760 .ctrlbit = S3C2443_PCLKCON_UART0,
761 }, {
762 .name = "uart",
763 .id = 1,
764 .parent = &clk_p,
765 .enable = s3c2443_clkcon_enable_p,
766 .ctrlbit = S3C2443_PCLKCON_UART1,
767 }, {
768 .name = "uart",
769 .id = 2,
770 .parent = &clk_p,
771 .enable = s3c2443_clkcon_enable_p,
772 .ctrlbit = S3C2443_PCLKCON_UART2,
773 }, {
774 .name = "uart",
775 .id = 3,
776 .parent = &clk_p,
777 .enable = s3c2443_clkcon_enable_p,
778 .ctrlbit = S3C2443_PCLKCON_UART3,
779 }, {
780 .name = "rtc",
781 .id = -1,
782 .parent = &clk_p,
783 .enable = s3c2443_clkcon_enable_p,
784 .ctrlbit = S3C2443_PCLKCON_RTC,
785 }, {
786 .name = "watchdog",
787 .id = -1,
788 .parent = &clk_p,
789 .ctrlbit = S3C2443_PCLKCON_WDT,
790 }, {
791 .name = "usb-bus-host",
792 .id = -1,
793 .parent = &clk_usb_bus_host,
794 }
795};
796
797/* clocks to add where we need to check their parentage */
798
799/* s3c2443_clk_initparents
800 *
801 * Initialise the parents for the clocks that we get at start-time
802*/
803
804static int __init clk_init_set_parent(struct clk *clk, struct clk *parent)
805{
806 printk(KERN_DEBUG "clock %s: parent %s\n", clk->name, parent->name);
807 return clk_set_parent(clk, parent);
808}
809
810static void __init s3c2443_clk_initparents(void)
811{
812 unsigned long clksrc = __raw_readl(S3C2443_CLKSRC);
813 struct clk *parent;
814
815 switch (clksrc & S3C2443_CLKSRC_EPLLREF_MASK) {
816 case S3C2443_CLKSRC_EPLLREF_EXTCLK:
817 parent = &clk_ext;
818 break;
819
820 case S3C2443_CLKSRC_EPLLREF_XTAL:
821 default:
822 parent = &clk_xtal;
823 break;
824
825 case S3C2443_CLKSRC_EPLLREF_MPLLREF:
826 case S3C2443_CLKSRC_EPLLREF_MPLLREF2:
827 parent = &clk_mpllref;
828 break;
829 }
830
831 clk_init_set_parent(&clk_epllref, parent);
832
833 switch (clksrc & S3C2443_CLKSRC_I2S_MASK) {
834 case S3C2443_CLKSRC_I2S_EXT:
835 parent = &clk_i2s_ext;
836 break;
837
838 case S3C2443_CLKSRC_I2S_EPLLDIV:
839 default:
840 parent = &clk_i2s_eplldiv;
841 break;
842
843 case S3C2443_CLKSRC_I2S_EPLLREF:
844 case S3C2443_CLKSRC_I2S_EPLLREF3:
845 parent = &clk_epllref;
846 }
847
848 clk_init_set_parent(&clk_i2s, &clk_epllref);
849
850 /* esysclk source */
851
852 parent = (clksrc & S3C2443_CLKSRC_ESYSCLK_EPLL) ?
853 &clk_epll : &clk_epllref;
854
855 clk_init_set_parent(&clk_esysclk, parent);
856
857 /* msysclk source */
858
859 if (clksrc & S3C2443_CLKSRC_MSYSCLK_MPLL) {
860 parent = &clk_mpll;
861 } else {
862 parent = (clksrc & S3C2443_CLKSRC_EXTCLK_DIV) ?
863 &clk_mdivclk : &clk_mpllref;
864 }
865
866 clk_init_set_parent(&clk_msysclk, parent);
867}
868
869/* armdiv divisor table */
870
871static unsigned int armdiv[16] = {
872 [S3C2443_CLKDIV0_ARMDIV_1 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 1,
873 [S3C2443_CLKDIV0_ARMDIV_2 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 2,
874 [S3C2443_CLKDIV0_ARMDIV_3 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 3,
875 [S3C2443_CLKDIV0_ARMDIV_4 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 4,
876 [S3C2443_CLKDIV0_ARMDIV_6 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 6,
877 [S3C2443_CLKDIV0_ARMDIV_8 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 8,
878 [S3C2443_CLKDIV0_ARMDIV_12 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 12,
879 [S3C2443_CLKDIV0_ARMDIV_16 >> S3C2443_CLKDIV0_ARMDIV_SHIFT] = 16,
880};
881
882static inline unsigned int s3c2443_fclk_div(unsigned long clkcon0)
883{
884 clkcon0 &= S3C2443_CLKDIV0_ARMDIV_MASK;
885
886 return armdiv[clkcon0 >> S3C2443_CLKDIV0_ARMDIV_SHIFT];
887}
888
889static inline unsigned long s3c2443_get_prediv(unsigned long clkcon0)
890{
891 clkcon0 &= S3C2443_CLKDIV0_PREDIV_MASK;
892 clkcon0 >>= S3C2443_CLKDIV0_PREDIV_SHIFT;
893
894 return clkcon0 + 1;
895}
896
897/* clocks to add straight away */
898
899static struct clk *clks[] __initdata = {
900 &clk_ext,
901 &clk_epll,
902 &clk_usb_bus_host,
903 &clk_usb_bus,
904 &clk_esysclk,
905 &clk_epllref,
906 &clk_mpllref,
907 &clk_msysclk,
908 &clk_uart,
909 &clk_display,
910 &clk_cam,
911 &clk_i2s_eplldiv,
912 &clk_i2s,
913 &clk_hsspi,
914 &clk_hsmmc_div,
915 &clk_hsmmc,
916};
917
918void __init s3c2443_init_clocks(int xtal)
919{
920 unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
921 unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON);
922 unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0);
923 unsigned long pll;
924 unsigned long fclk;
925 unsigned long hclk;
926 unsigned long pclk;
927 struct clk *clkp;
928 int ret;
929 int ptr;
930
931 pll = s3c2443_get_mpll(mpllcon, xtal);
932
933 fclk = pll / s3c2443_fclk_div(clkdiv0);
934 hclk = fclk / s3c2443_get_prediv(clkdiv0);
935 hclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_HCLK) ? 2 : 1);
936 pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1);
937
938 s3c24xx_setup_clocks(xtal, fclk, hclk, pclk);
939
940 printk("S3C2443: mpll %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
941 (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on",
942 print_mhz(pll), print_mhz(fclk),
943 print_mhz(hclk), print_mhz(pclk));
944
945 s3c2443_clk_initparents();
946
947 for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) {
948 clkp = clks[ptr];
949
950 ret = s3c24xx_register_clock(clkp);
951 if (ret < 0) {
952 printk(KERN_ERR "Failed to register clock %s (%d)\n",
953 clkp->name, ret);
954 }
955 }
956
957 clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
958
959 clk_usb_bus.parent = &clk_usb_bus_host;
960
961 /* ensure usb bus clock is within correct rate of 48MHz */
962
963 if (clk_get_rate(&clk_usb_bus_host) != (48 * 1000 * 1000)) {
964 printk(KERN_INFO "Warning: USB host bus not at 48MHz\n");
965 clk_set_rate(&clk_usb_bus_host, 48*1000*1000);
966 }
967
968 printk("S3C2443: epll %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
969 (epllcon & S3C2443_PLLCON_OFF) ? "off":"on",
970 print_mhz(clk_get_rate(&clk_epll)),
971 print_mhz(clk_get_rate(&clk_usb_bus)));
972
973 /* register clocks from clock array */
974
975 clkp = init_clocks;
976 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
977 ret = s3c24xx_register_clock(clkp);
978 if (ret < 0) {
979 printk(KERN_ERR "Failed to register clock %s (%d)\n",
980 clkp->name, ret);
981 }
982 }
983
984 /* We must be careful disabling the clocks we are not intending to
985 * be using at boot time, as subsytems such as the LCD which do
986 * their own DMA requests to the bus can cause the system to lockup
987 * if they where in the middle of requesting bus access.
988 *
989 * Disabling the LCD clock if the LCD is active is very dangerous,
990 * and therefore the bootloader should be careful to not enable
991 * the LCD clock if it is not needed.
992 */
993
994 /* install (and disable) the clocks we do not need immediately */
995
996 clkp = init_clocks_disable;
997 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) {
998
999 ret = s3c24xx_register_clock(clkp);
1000 if (ret < 0) {
1001 printk(KERN_ERR "Failed to register clock %s (%d)\n",
1002 clkp->name, ret);
1003 }
1004
1005 (clkp->enable)(clkp, 0);
1006 }
1007}
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c
new file mode 100644
index 000000000000..f70e8ccffc3d
--- /dev/null
+++ b/arch/arm/mach-s3c2443/dma.c
@@ -0,0 +1,180 @@
1/* linux/arch/arm/mach-s3c2443/dma.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2443 DMA selection
7 *
8 * http://armlinux.simtec.co.uk/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/sysdev.h>
18#include <linux/serial_core.h>
19
20#include <asm/dma.h>
21#include <asm/arch/dma.h>
22#include <asm/io.h>
23
24#include <asm/plat-s3c24xx/dma.h>
25#include <asm/plat-s3c24xx/cpu.h>
26
27#include <asm/arch/regs-serial.h>
28#include <asm/arch/regs-gpio.h>
29#include <asm/arch/regs-ac97.h>
30#include <asm/arch/regs-mem.h>
31#include <asm/arch/regs-lcd.h>
32#include <asm/arch/regs-sdi.h>
33#include <asm/arch/regs-iis.h>
34#include <asm/arch/regs-spi.h>
35
36#define MAP(x) { \
37 [0] = (x) | DMA_CH_VALID, \
38 [1] = (x) | DMA_CH_VALID, \
39 [2] = (x) | DMA_CH_VALID, \
40 [3] = (x) | DMA_CH_VALID, \
41 [4] = (x) | DMA_CH_VALID, \
42 [5] = (x) | DMA_CH_VALID, \
43 }
44
45static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
46 [DMACH_XD0] = {
47 .name = "xdreq0",
48 .channels = MAP(S3C2443_DMAREQSEL_XDREQ0),
49 },
50 [DMACH_XD1] = {
51 .name = "xdreq1",
52 .channels = MAP(S3C2443_DMAREQSEL_XDREQ1),
53 },
54 [DMACH_SDI] = {
55 .name = "sdi",
56 .channels = MAP(S3C2443_DMAREQSEL_SDI),
57 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
58 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
59 },
60 [DMACH_SPI0] = {
61 .name = "spi0",
62 .channels = MAP(S3C2443_DMAREQSEL_SPI0TX),
63 .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT,
64 .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT,
65 },
66 [DMACH_SPI1] = {
67 .name = "spi1",
68 .channels = MAP(S3C2443_DMAREQSEL_SPI1TX),
69 .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT,
70 .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT,
71 },
72 [DMACH_UART0] = {
73 .name = "uart0",
74 .channels = MAP(S3C2443_DMAREQSEL_UART0_0),
75 .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
76 .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH,
77 },
78 [DMACH_UART1] = {
79 .name = "uart1",
80 .channels = MAP(S3C2443_DMAREQSEL_UART1_0),
81 .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
82 .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH,
83 },
84 [DMACH_UART2] = {
85 .name = "uart2",
86 .channels = MAP(S3C2443_DMAREQSEL_UART2_0),
87 .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
88 .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH,
89 },
90 [DMACH_UART3] = {
91 .name = "uart3",
92 .channels = MAP(S3C2443_DMAREQSEL_UART3_0),
93 .hw_addr.to = S3C2443_PA_UART3 + S3C2410_UTXH,
94 .hw_addr.from = S3C2443_PA_UART3 + S3C2410_URXH,
95 },
96 [DMACH_UART0_SRC2] = {
97 .name = "uart0",
98 .channels = MAP(S3C2443_DMAREQSEL_UART0_1),
99 .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
100 .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH,
101 },
102 [DMACH_UART1_SRC2] = {
103 .name = "uart1",
104 .channels = MAP(S3C2443_DMAREQSEL_UART1_1),
105 .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
106 .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH,
107 },
108 [DMACH_UART2_SRC2] = {
109 .name = "uart2",
110 .channels = MAP(S3C2443_DMAREQSEL_UART2_1),
111 .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
112 .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH,
113 },
114 [DMACH_UART3_SRC2] = {
115 .name = "uart3",
116 .channels = MAP(S3C2443_DMAREQSEL_UART3_1),
117 .hw_addr.to = S3C2443_PA_UART3 + S3C2410_UTXH,
118 .hw_addr.from = S3C2443_PA_UART3 + S3C2410_URXH,
119 },
120 [DMACH_TIMER] = {
121 .name = "timer",
122 .channels = MAP(S3C2443_DMAREQSEL_TIMER),
123 },
124 [DMACH_I2S_IN] = {
125 .name = "i2s-sdi",
126 .channels = MAP(S3C2443_DMAREQSEL_I2SRX),
127 .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO,
128 },
129 [DMACH_I2S_OUT] = {
130 .name = "i2s-sdo",
131 .channels = MAP(S3C2443_DMAREQSEL_I2STX),
132 .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
133 },
134 [DMACH_PCM_IN] = {
135 .name = "pcm-in",
136 .channels = MAP(S3C2443_DMAREQSEL_PCMIN),
137 .hw_addr.from = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA,
138 },
139 [DMACH_PCM_OUT] = {
140 .name = "pcm-out",
141 .channels = MAP(S3C2443_DMAREQSEL_PCMOUT),
142 .hw_addr.to = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA,
143 },
144 [DMACH_MIC_IN] = {
145 .name = "mic-in",
146 .channels = MAP(S3C2443_DMAREQSEL_MICIN),
147 .hw_addr.from = S3C2440_PA_AC97 + S3C_AC97_MIC_DATA,
148 },
149};
150
151static void s3c2443_dma_select(struct s3c2410_dma_chan *chan,
152 struct s3c24xx_dma_map *map)
153{
154 writel(map->channels[0] | S3C2443_DMAREQSEL_HW,
155 chan->regs + S3C2443_DMA_DMAREQSEL);
156}
157
158static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = {
159 .select = s3c2443_dma_select,
160 .dcon_mask = 0,
161 .map = s3c2443_dma_mappings,
162 .map_size = ARRAY_SIZE(s3c2443_dma_mappings),
163};
164
165static int s3c2443_dma_add(struct sys_device *sysdev)
166{
167 s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100);
168 return s3c24xx_dma_init_map(&s3c2443_dma_sel);
169}
170
171static struct sysdev_driver s3c2443_dma_driver = {
172 .add = s3c2443_dma_add,
173};
174
175static int __init s3c2443_dma_init(void)
176{
177 return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_dma_driver);
178}
179
180arch_initcall(s3c2443_dma_init);
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c
new file mode 100644
index 000000000000..7a45b6dcb73e
--- /dev/null
+++ b/arch/arm/mach-s3c2443/irq.c
@@ -0,0 +1,290 @@
1/* linux/arch/arm/mach-s3c2443/irq.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20*/
21
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/interrupt.h>
25#include <linux/ioport.h>
26#include <linux/ptrace.h>
27#include <linux/sysdev.h>
28
29#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/io.h>
32
33#include <asm/mach/irq.h>
34
35#include <asm/arch/regs-irq.h>
36#include <asm/arch/regs-gpio.h>
37
38#include <asm/plat-s3c24xx/cpu.h>
39#include <asm/plat-s3c24xx/pm.h>
40#include <asm/plat-s3c24xx/irq.h>
41
42#define INTMSK(start, end) ((1 << ((end) + 1 - (start))) - 1)
43
44static inline void s3c2443_irq_demux(unsigned int irq, unsigned int len)
45{
46 unsigned int subsrc, submsk;
47 unsigned int end;
48 struct irq_desc *mydesc;
49
50 /* read the current pending interrupts, and the mask
51 * for what it is available */
52
53 subsrc = __raw_readl(S3C2410_SUBSRCPND);
54 submsk = __raw_readl(S3C2410_INTSUBMSK);
55
56 subsrc &= ~submsk;
57 subsrc >>= (irq - S3C2410_IRQSUB(0));
58 subsrc &= (1 << len)-1;
59
60 end = len + irq;
61 mydesc = irq_desc + irq;
62
63 for (; irq < end && subsrc; irq++) {
64 if (subsrc & 1)
65 desc_handle_irq(irq, mydesc);
66
67 mydesc++;
68 subsrc >>= 1;
69 }
70}
71
72/* WDT/AC97 sub interrupts */
73
74static void s3c2443_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc)
75{
76 s3c2443_irq_demux(IRQ_S3C2443_WDT, 4);
77}
78
79#define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0))
80#define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97)
81
82static void s3c2443_irq_wdtac97_mask(unsigned int irqno)
83{
84 s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97);
85}
86
87static void s3c2443_irq_wdtac97_unmask(unsigned int irqno)
88{
89 s3c_irqsub_unmask(irqno, INTMSK_WDTAC97);
90}
91
92static void s3c2443_irq_wdtac97_ack(unsigned int irqno)
93{
94 s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97);
95}
96
97static struct irq_chip s3c2443_irq_wdtac97 = {
98 .mask = s3c2443_irq_wdtac97_mask,
99 .unmask = s3c2443_irq_wdtac97_unmask,
100 .ack = s3c2443_irq_wdtac97_ack,
101};
102
103
104/* LCD sub interrupts */
105
106static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc)
107{
108 s3c2443_irq_demux(IRQ_S3C2443_LCD1, 4);
109}
110
111#define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0))
112#define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4)
113
114static void s3c2443_irq_lcd_mask(unsigned int irqno)
115{
116 s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD);
117}
118
119static void s3c2443_irq_lcd_unmask(unsigned int irqno)
120{
121 s3c_irqsub_unmask(irqno, INTMSK_LCD);
122}
123
124static void s3c2443_irq_lcd_ack(unsigned int irqno)
125{
126 s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD);
127}
128
129static struct irq_chip s3c2443_irq_lcd = {
130 .mask = s3c2443_irq_lcd_mask,
131 .unmask = s3c2443_irq_lcd_unmask,
132 .ack = s3c2443_irq_lcd_ack,
133};
134
135
136/* DMA sub interrupts */
137
138static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc)
139{
140 s3c2443_irq_demux(IRQ_S3C2443_DMA1, 6);
141}
142
143#define INTMSK_DMA (1UL << (IRQ_S3C2443_DMA - IRQ_EINT0))
144#define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5)
145
146
147static void s3c2443_irq_dma_mask(unsigned int irqno)
148{
149 s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA);
150}
151
152static void s3c2443_irq_dma_unmask(unsigned int irqno)
153{
154 s3c_irqsub_unmask(irqno, INTMSK_DMA);
155}
156
157static void s3c2443_irq_dma_ack(unsigned int irqno)
158{
159 s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA);
160}
161
162static struct irq_chip s3c2443_irq_dma = {
163 .mask = s3c2443_irq_dma_mask,
164 .unmask = s3c2443_irq_dma_unmask,
165 .ack = s3c2443_irq_dma_ack,
166};
167
168
169/* UART3 sub interrupts */
170
171static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
172{
173 s3c2443_irq_demux(IRQ_S3C2443_UART3, 3);
174}
175
176#define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
177#define SUBMSK_UART3 (0xf << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
178
179
180static void s3c2443_irq_uart3_mask(unsigned int irqno)
181{
182 s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3);
183}
184
185static void s3c2443_irq_uart3_unmask(unsigned int irqno)
186{
187 s3c_irqsub_unmask(irqno, INTMSK_UART3);
188}
189
190static void s3c2443_irq_uart3_ack(unsigned int irqno)
191{
192 s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3);
193}
194
195static struct irq_chip s3c2443_irq_uart3 = {
196 .mask = s3c2443_irq_uart3_mask,
197 .unmask = s3c2443_irq_uart3_unmask,
198 .ack = s3c2443_irq_uart3_ack,
199};
200
201
202/* CAM sub interrupts */
203
204static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc)
205{
206 s3c2443_irq_demux(IRQ_S3C2440_CAM_C, 4);
207}
208
209#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))
210#define SUBMSK_CAM INTMSK(IRQ_S3C2440_CAM_C, IRQ_S3C2440_CAM_P)
211
212static void s3c2443_irq_cam_mask(unsigned int irqno)
213{
214 s3c_irqsub_mask(irqno, INTMSK_CAM, SUBMSK_CAM);
215}
216
217static void s3c2443_irq_cam_unmask(unsigned int irqno)
218{
219 s3c_irqsub_unmask(irqno, INTMSK_CAM);
220}
221
222static void s3c2443_irq_cam_ack(unsigned int irqno)
223{
224 s3c_irqsub_maskack(irqno, INTMSK_CAM, SUBMSK_CAM);
225}
226
227static struct irq_chip s3c2443_irq_cam = {
228 .mask = s3c2443_irq_cam_mask,
229 .unmask = s3c2443_irq_cam_unmask,
230 .ack = s3c2443_irq_cam_ack,
231};
232
233/* IRQ initialisation code */
234
235static int __init s3c2443_add_sub(unsigned int base,
236 void (*demux)(unsigned int,
237 struct irq_desc *),
238 struct irq_chip *chip,
239 unsigned int start, unsigned int end)
240{
241 unsigned int irqno;
242
243 set_irq_chip(base, &s3c_irq_level_chip);
244 set_irq_handler(base, handle_level_irq);
245 set_irq_chained_handler(base, demux);
246
247 for (irqno = start; irqno <= end; irqno++) {
248 set_irq_chip(irqno, chip);
249 set_irq_handler(irqno, handle_level_irq);
250 set_irq_flags(irqno, IRQF_VALID);
251 }
252
253 return 0;
254}
255
256static int s3c2443_irq_add(struct sys_device *sysdev)
257{
258 printk("S3C2443: IRQ Support\n");
259
260 s3c2443_add_sub(IRQ_CAM, s3c2443_irq_demux_cam, &s3c2443_irq_cam,
261 IRQ_S3C2440_CAM_C, IRQ_S3C2440_CAM_P);
262
263 s3c2443_add_sub(IRQ_LCD, s3c2443_irq_demux_lcd, &s3c2443_irq_lcd,
264 IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4);
265
266 s3c2443_add_sub(IRQ_S3C2443_DMA, s3c2443_irq_demux_dma,
267 &s3c2443_irq_dma, IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5);
268
269 s3c2443_add_sub(IRQ_S3C2443_UART3, s3c2443_irq_demux_uart3,
270 &s3c2443_irq_uart3,
271 IRQ_S3C2443_RX3, IRQ_S3C2443_ERR3);
272
273 s3c2443_add_sub(IRQ_WDT, s3c2443_irq_demux_wdtac97,
274 &s3c2443_irq_wdtac97,
275 IRQ_S3C2443_WDT, IRQ_S3C2443_AC97);
276
277 return 0;
278}
279
280static struct sysdev_driver s3c2443_irq_driver = {
281 .add = s3c2443_irq_add,
282};
283
284static int s3c2443_irq_init(void)
285{
286 return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver);
287}
288
289arch_initcall(s3c2443_irq_init);
290
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c
new file mode 100644
index 000000000000..e82aaff7dee4
--- /dev/null
+++ b/arch/arm/mach-s3c2443/mach-smdk2443.c
@@ -0,0 +1,137 @@
1/* linux/arch/arm/mach-s3c2443/mach-smdk2443.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * http://www.fluff.org/ben/smdk2443/
7 *
8 * Thanks to Samsung for the loan of an SMDK2443
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14*/
15
16#include <linux/kernel.h>
17#include <linux/types.h>
18#include <linux/interrupt.h>
19#include <linux/list.h>
20#include <linux/timer.h>
21#include <linux/init.h>
22#include <linux/serial_core.h>
23#include <linux/platform_device.h>
24
25#include <asm/mach/arch.h>
26#include <asm/mach/map.h>
27#include <asm/mach/irq.h>
28
29#include <asm/hardware.h>
30#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/mach-types.h>
33
34#include <asm/arch/regs-serial.h>
35#include <asm/arch/regs-gpio.h>
36#include <asm/arch/regs-lcd.h>
37
38#include <asm/arch/idle.h>
39#include <asm/arch/fb.h>
40
41#include <asm/plat-s3c24xx/s3c2410.h>
42#include <asm/plat-s3c24xx/s3c2440.h>
43#include <asm/plat-s3c24xx/clock.h>
44#include <asm/plat-s3c24xx/devs.h>
45#include <asm/plat-s3c24xx/cpu.h>
46
47#include <asm/plat-s3c24xx/common-smdk.h>
48
49static struct map_desc smdk2443_iodesc[] __initdata = {
50 /* ISA IO Space map (memory space selected by A24) */
51
52 {
53 .virtual = (u32)S3C24XX_VA_ISA_WORD,
54 .pfn = __phys_to_pfn(S3C2410_CS2),
55 .length = 0x10000,
56 .type = MT_DEVICE,
57 }, {
58 .virtual = (u32)S3C24XX_VA_ISA_WORD + 0x10000,
59 .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)),
60 .length = SZ_4M,
61 .type = MT_DEVICE,
62 }, {
63 .virtual = (u32)S3C24XX_VA_ISA_BYTE,
64 .pfn = __phys_to_pfn(S3C2410_CS2),
65 .length = 0x10000,
66 .type = MT_DEVICE,
67 }, {
68 .virtual = (u32)S3C24XX_VA_ISA_BYTE + 0x10000,
69 .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)),
70 .length = SZ_4M,
71 .type = MT_DEVICE,
72 }
73};
74
75#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
76#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
77#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
78
79static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {
80 [0] = {
81 .hwport = 0,
82 .flags = 0,
83 .ucon = 0x3c5,
84 .ulcon = 0x03,
85 .ufcon = 0x51,
86 },
87 [1] = {
88 .hwport = 1,
89 .flags = 0,
90 .ucon = 0x3c5,
91 .ulcon = 0x03,
92 .ufcon = 0x51,
93 },
94 /* IR port */
95 [2] = {
96 .hwport = 2,
97 .flags = 0,
98 .ucon = 0x3c5,
99 .ulcon = 0x43,
100 .ufcon = 0x51,
101 }
102};
103
104static struct platform_device *smdk2443_devices[] __initdata = {
105 &s3c_device_wdt,
106 &s3c_device_i2c,
107};
108
109static struct s3c24xx_board smdk2443_board __initdata = {
110 .devices = smdk2443_devices,
111 .devices_count = ARRAY_SIZE(smdk2443_devices)
112};
113
114static void __init smdk2443_map_io(void)
115{
116 s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc));
117 s3c24xx_init_clocks(12000000);
118 s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs));
119 s3c24xx_set_board(&smdk2443_board);
120}
121
122static void __init smdk2443_machine_init(void)
123{
124 smdk_machine_init();
125}
126
127MACHINE_START(SMDK2443, "SMDK2443")
128 /* Maintainer: Ben Dooks <ben@fluff.org> */
129 .phys_io = S3C2410_PA_UART,
130 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
131 .boot_params = S3C2410_SDRAM_PA + 0x100,
132
133 .init_irq = s3c24xx_init_irq,
134 .map_io = smdk2443_map_io,
135 .init_machine = smdk2443_machine_init,
136 .timer = &s3c24xx_timer,
137MACHINE_END
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c
new file mode 100644
index 000000000000..11b1d0b310c3
--- /dev/null
+++ b/arch/arm/mach-s3c2443/s3c2443.c
@@ -0,0 +1,97 @@
1/* linux/arch/arm/mach-s3c2443/s3c2443.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C2443 Mobile CPU support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/interrupt.h>
16#include <linux/list.h>
17#include <linux/timer.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/serial_core.h>
21#include <linux/sysdev.h>
22#include <linux/clk.h>
23
24#include <asm/mach/arch.h>
25#include <asm/mach/map.h>
26#include <asm/mach/irq.h>
27
28#include <asm/hardware.h>
29#include <asm/io.h>
30#include <asm/irq.h>
31
32#include <asm/arch/regs-s3c2443-clock.h>
33#include <asm/arch/reset.h>
34
35#include <asm/plat-s3c24xx/s3c2443.h>
36#include <asm/plat-s3c24xx/devs.h>
37#include <asm/plat-s3c24xx/cpu.h>
38
39static struct map_desc s3c2443_iodesc[] __initdata = {
40 IODESC_ENT(WATCHDOG),
41 IODESC_ENT(CLKPWR),
42 IODESC_ENT(TIMER),
43};
44
45struct sysdev_class s3c2443_sysclass = {
46 set_kset_name("s3c2443-core"),
47};
48
49static struct sys_device s3c2443_sysdev = {
50 .cls = &s3c2443_sysclass,
51};
52
53static void s3c2443_hard_reset(void)
54{
55 __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
56}
57
58int __init s3c2443_init(void)
59{
60 printk("S3C2443: Initialising architecture\n");
61
62 s3c24xx_reset_hook = s3c2443_hard_reset;
63
64 s3c_device_nand.name = "s3c2412-nand";
65
66 return sysdev_register(&s3c2443_sysdev);
67}
68
69void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no)
70{
71 s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no);
72}
73
74/* s3c2443_map_io
75 *
76 * register the standard cpu IO areas, and any passed in from the
77 * machine specific initialisation.
78 */
79
80void __init s3c2443_map_io(struct map_desc *mach_desc, int mach_size)
81{
82 iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
83 iotable_init(mach_desc, mach_size);
84}
85
86/* need to register class before we actually register the device, and
87 * we also need to ensure that it has been initialised before any of the
88 * drivers even try to use it (even if not on an s3c2443 based system)
89 * as a driver which may support both 2443 and 2440 may try and use it.
90*/
91
92static int __init s3c2443_core_init(void)
93{
94 return sysdev_class_register(&s3c2443_sysclass);
95}
96
97core_initcall(s3c2443_core_init);
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index e510295c2580..192a5a26cf2b 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -138,6 +138,36 @@ unsigned long long sched_clock(void)
138 return v; 138 return v;
139} 139}
140 140
141int gpio_direction_input(unsigned gpio)
142{
143 unsigned long flags;
144
145 if (gpio > GPIO_MAX)
146 return -EINVAL;
147
148 local_irq_save(flags);
149 GPDR &= ~GPIO_GPIO(gpio);
150 local_irq_restore(flags);
151 return 0;
152}
153
154EXPORT_SYMBOL(gpio_direction_input);
155
156int gpio_direction_output(unsigned gpio)
157{
158 unsigned long flags;
159
160 if (gpio > GPIO_MAX)
161 return -EINVAL;
162
163 local_irq_save(flags);
164 GPDR |= GPIO_GPIO(gpio);
165 local_irq_restore(flags);
166 return 0;
167}
168
169EXPORT_SYMBOL(gpio_direction_output);
170
141/* 171/*
142 * Default power-off for SA1100 172 * Default power-off for SA1100
143 */ 173 */
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 54ecdaa373d6..64067cd58d36 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -231,12 +231,6 @@ static struct platform_device *devices[] __initdata = {
231 &s1d13xxxfb_device, 231 &s1d13xxxfb_device,
232}; 232};
233 233
234/* a stub for now, we theoretically cannot suspend without a flashboard */
235int pm_suspend(suspend_state_t state)
236{
237 return -1;
238}
239
240static int __init jornada720_init(void) 234static int __init jornada720_init(void)
241{ 235{
242 int ret = -ENODEV; 236 int ret = -ENODEV;
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index aade2f72c920..e684e9b38216 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -171,8 +171,8 @@ config CPU_ARM925T
171# ARM926T 171# ARM926T
172config CPU_ARM926T 172config CPU_ARM926T
173 bool "Support ARM926T processor" 173 bool "Support ARM926T processor"
174 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 174 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_NS9XXX
175 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 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_NS9XXX
176 select CPU_32v5 176 select CPU_32v5
177 select CPU_ABRT_EV5TJ 177 select CPU_ABRT_EV5TJ
178 select CPU_CACHE_VIVT 178 select CPU_CACHE_VIVT
@@ -525,7 +525,7 @@ config CPU_BIG_ENDIAN
525 of your chipset/board/processor. 525 of your chipset/board/processor.
526 526
527config CPU_HIGH_VECTOR 527config CPU_HIGH_VECTOR
528 depends !MMU && CPU_CP15 && !CPU_ARM740T 528 depends on !MMU && CPU_CP15 && !CPU_ARM740T
529 bool "Select the High exception vector" 529 bool "Select the High exception vector"
530 default n 530 default n
531 help 531 help
@@ -609,3 +609,10 @@ config NEEDS_SYSCALL_FOR_CMPXCHG
609 Forget about fast user space cmpxchg support. 609 Forget about fast user space cmpxchg support.
610 It is just not possible. 610 It is just not possible.
611 611
612config OUTER_CACHE
613 bool
614 default n
615
616config CACHE_L2X0
617 bool
618 select OUTER_CACHE
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index d2f5672ecf62..2f8b95947774 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -66,3 +66,5 @@ obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o
66obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o 66obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o
67obj-$(CONFIG_CPU_XSC3) += proc-xsc3.o 67obj-$(CONFIG_CPU_XSC3) += proc-xsc3.o
68obj-$(CONFIG_CPU_V6) += proc-v6.o 68obj-$(CONFIG_CPU_V6) += proc-v6.o
69
70obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
new file mode 100644
index 000000000000..08a36f1b35d2
--- /dev/null
+++ b/arch/arm/mm/cache-l2x0.c
@@ -0,0 +1,104 @@
1/*
2 * arch/arm/mm/cache-l2x0.c - L210/L220 cache controller support
3 *
4 * Copyright (C) 2007 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#include <linux/init.h>
20
21#include <asm/cacheflush.h>
22#include <asm/io.h>
23#include <asm/hardware/cache-l2x0.h>
24
25#define CACHE_LINE_SIZE 32
26
27static void __iomem *l2x0_base;
28
29static inline void sync_writel(unsigned long val, unsigned long reg,
30 unsigned long complete_mask)
31{
32 writel(val, l2x0_base + reg);
33 /* wait for the operation to complete */
34 while (readl(l2x0_base + reg) & complete_mask)
35 ;
36}
37
38static inline void cache_sync(void)
39{
40 sync_writel(0, L2X0_CACHE_SYNC, 1);
41}
42
43static inline void l2x0_inv_all(void)
44{
45 /* invalidate all ways */
46 sync_writel(0xff, L2X0_INV_WAY, 0xff);
47 cache_sync();
48}
49
50static void l2x0_inv_range(unsigned long start, unsigned long end)
51{
52 unsigned long addr;
53
54 start &= ~(CACHE_LINE_SIZE - 1);
55 for (addr = start; addr < end; addr += CACHE_LINE_SIZE)
56 sync_writel(addr, L2X0_INV_LINE_PA, 1);
57 cache_sync();
58}
59
60static void l2x0_clean_range(unsigned long start, unsigned long end)
61{
62 unsigned long addr;
63
64 start &= ~(CACHE_LINE_SIZE - 1);
65 for (addr = start; addr < end; addr += CACHE_LINE_SIZE)
66 sync_writel(addr, L2X0_CLEAN_LINE_PA, 1);
67 cache_sync();
68}
69
70static void l2x0_flush_range(unsigned long start, unsigned long end)
71{
72 unsigned long addr;
73
74 start &= ~(CACHE_LINE_SIZE - 1);
75 for (addr = start; addr < end; addr += CACHE_LINE_SIZE)
76 sync_writel(addr, L2X0_CLEAN_INV_LINE_PA, 1);
77 cache_sync();
78}
79
80void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
81{
82 __u32 aux;
83
84 l2x0_base = base;
85
86 /* disable L2X0 */
87 writel(0, l2x0_base + L2X0_CTRL);
88
89 aux = readl(l2x0_base + L2X0_AUX_CTRL);
90 aux &= aux_mask;
91 aux |= aux_val;
92 writel(aux, l2x0_base + L2X0_AUX_CTRL);
93
94 l2x0_inv_all();
95
96 /* enable L2X0 */
97 writel(1, l2x0_base + L2X0_CTRL);
98
99 outer_cache.inv_range = l2x0_inv_range;
100 outer_cache.clean_range = l2x0_clean_range;
101 outer_cache.flush_range = l2x0_flush_range;
102
103 printk(KERN_INFO "L2X0 cache controller enabled\n");
104}
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 6a9c362fef5e..1f9f94f9af4b 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -205,9 +205,10 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
205 * kernel direct-mapped region for device DMA. 205 * kernel direct-mapped region for device DMA.
206 */ 206 */
207 { 207 {
208 unsigned long kaddr = (unsigned long)page_address(page); 208 void *ptr = page_address(page);
209 memset(page_address(page), 0, size); 209 memset(ptr, 0, size);
210 dmac_flush_range(kaddr, kaddr + size); 210 dmac_flush_range(ptr, ptr + size);
211 outer_flush_range(__pa(ptr), __pa(ptr) + size);
211 } 212 }
212 213
213 /* 214 /*
@@ -480,20 +481,24 @@ core_initcall(consistent_init);
480 * platforms with CONFIG_DMABOUNCE. 481 * platforms with CONFIG_DMABOUNCE.
481 * Use the driver DMA support - see dma-mapping.h (dma_sync_*) 482 * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
482 */ 483 */
483void consistent_sync(void *vaddr, size_t size, int direction) 484void consistent_sync(const void *start, size_t size, int direction)
484{ 485{
485 unsigned long start = (unsigned long)vaddr; 486 const void *end = start + size;
486 unsigned long end = start + size; 487
488 BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end - 1));
487 489
488 switch (direction) { 490 switch (direction) {
489 case DMA_FROM_DEVICE: /* invalidate only */ 491 case DMA_FROM_DEVICE: /* invalidate only */
490 dmac_inv_range(start, end); 492 dmac_inv_range(start, end);
493 outer_inv_range(__pa(start), __pa(end));
491 break; 494 break;
492 case DMA_TO_DEVICE: /* writeback only */ 495 case DMA_TO_DEVICE: /* writeback only */
493 dmac_clean_range(start, end); 496 dmac_clean_range(start, end);
497 outer_clean_range(__pa(start), __pa(end));
494 break; 498 break;
495 case DMA_BIDIRECTIONAL: /* writeback and invalidate */ 499 case DMA_BIDIRECTIONAL: /* writeback and invalidate */
496 dmac_flush_range(start, end); 500 dmac_flush_range(start, end);
501 outer_flush_range(__pa(start), __pa(end));
497 break; 502 break;
498 default: 503 default:
499 BUG(); 504 BUG();
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 79e800202424..9da43a0fdcdf 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -19,7 +19,8 @@ unsigned int cpu_last_asid = { 1 << ASID_BITS };
19/* 19/*
20 * We fork()ed a process, and we need a new context for the child 20 * We fork()ed a process, and we need a new context for the child
21 * to run in. We reserve version 0 for initial tasks so we will 21 * to run in. We reserve version 0 for initial tasks so we will
22 * always allocate an ASID. 22 * always allocate an ASID. The ASID 0 is reserved for the TTBR
23 * register changing sequence.
23 */ 24 */
24void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) 25void __init_new_context(struct task_struct *tsk, struct mm_struct *mm)
25{ 26{
@@ -38,8 +39,15 @@ void __new_context(struct mm_struct *mm)
38 * If we've used up all our ASIDs, we need 39 * If we've used up all our ASIDs, we need
39 * to start a new version and flush the TLB. 40 * to start a new version and flush the TLB.
40 */ 41 */
41 if ((asid & ~ASID_MASK) == 0) 42 if ((asid & ~ASID_MASK) == 0) {
43 asid = ++cpu_last_asid;
44 /* set the reserved ASID before flushing the TLB */
45 asm("mcr p15, 0, %0, c13, c0, 1 @ set reserved context ID\n"
46 :
47 : "r" (0));
48 isb();
42 flush_tlb_all(); 49 flush_tlb_all();
50 }
43 51
44 mm->context.id = asid; 52 mm->context.id = asid;
45} 53}
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index cf95c5d0ce4c..44558d5f9313 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -119,8 +119,6 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigne
119 flush_cache_page(vma, addr, pfn); 119 flush_cache_page(vma, addr, pfn);
120} 120}
121 121
122void __flush_dcache_page(struct address_space *mapping, struct page *page);
123
124/* 122/*
125 * Take care of architecture specific things when placing a new PTE into 123 * Take care of architecture specific things when placing a new PTE into
126 * a page table, or changing an existing PTE. Basically, there are two 124 * a page table, or changing an existing PTE. Basically, there are two
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 655c8376f0b5..94fd4bf5cb9e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -49,8 +49,10 @@ pmd_t *top_pmd;
49 49
50static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; 50static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK;
51static unsigned int ecc_mask __initdata = 0; 51static unsigned int ecc_mask __initdata = 0;
52pgprot_t pgprot_user;
52pgprot_t pgprot_kernel; 53pgprot_t pgprot_kernel;
53 54
55EXPORT_SYMBOL(pgprot_user);
54EXPORT_SYMBOL(pgprot_kernel); 56EXPORT_SYMBOL(pgprot_kernel);
55 57
56struct cachepolicy { 58struct cachepolicy {
@@ -345,6 +347,7 @@ static void __init build_mem_type_table(void)
345 mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); 347 mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
346 } 348 }
347 349
350 pgprot_user = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot);
348 pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | 351 pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
349 L_PTE_DIRTY | L_PTE_WRITE | 352 L_PTE_DIRTY | L_PTE_WRITE |
350 L_PTE_EXEC | kern_pgprot); 353 L_PTE_EXEC | kern_pgprot);
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 7b1843befb9c..eb42e5b94863 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -14,10 +14,13 @@
14#include <asm/assembler.h> 14#include <asm/assembler.h>
15#include <asm/asm-offsets.h> 15#include <asm/asm-offsets.h>
16#include <asm/elf.h> 16#include <asm/elf.h>
17#include <asm/hardware/arm_scu.h>
18#include <asm/pgtable-hwdef.h> 17#include <asm/pgtable-hwdef.h>
19#include <asm/pgtable.h> 18#include <asm/pgtable.h>
20 19
20#ifdef CONFIG_SMP
21#include <asm/hardware/arm_scu.h>
22#endif
23
21#include "proc-macros.S" 24#include "proc-macros.S"
22 25
23#define D_CACHE_LINE_SIZE 32 26#define D_CACHE_LINE_SIZE 32
@@ -30,6 +33,12 @@
30#define TTB_RGN_WT (2 << 3) 33#define TTB_RGN_WT (2 << 3)
31#define TTB_RGN_WB (3 << 3) 34#define TTB_RGN_WB (3 << 3)
32 35
36#ifndef CONFIG_SMP
37#define TTB_FLAGS TTB_RGN_WBWA
38#else
39#define TTB_FLAGS TTB_RGN_WBWA|TTB_S
40#endif
41
33ENTRY(cpu_v6_proc_init) 42ENTRY(cpu_v6_proc_init)
34 mov pc, lr 43 mov pc, lr
35 44
@@ -92,9 +101,7 @@ ENTRY(cpu_v6_switch_mm)
92#ifdef CONFIG_MMU 101#ifdef CONFIG_MMU
93 mov r2, #0 102 mov r2, #0
94 ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id 103 ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
95#ifdef CONFIG_SMP 104 orr r0, r0, #TTB_FLAGS
96 orr r0, r0, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable
97#endif
98 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB 105 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
99 mcr p15, 0, r2, c7, c10, 4 @ drain write buffer 106 mcr p15, 0, r2, c7, c10, 4 @ drain write buffer
100 mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 107 mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
@@ -183,8 +190,7 @@ __v6_setup:
183 /* Set up the SCU on core 0 only */ 190 /* Set up the SCU on core 0 only */
184 mrc p15, 0, r0, c0, c0, 5 @ CPU core number 191 mrc p15, 0, r0, c0, c0, 5 @ CPU core number
185 ands r0, r0, #15 192 ands r0, r0, #15
186 moveq r0, #0x10000000 @ SCU_BASE 193 ldreq r0, =SCU_BASE
187 orreq r0, r0, #0x00100000
188 ldreq r5, [r0, #SCU_CTRL] 194 ldreq r5, [r0, #SCU_CTRL]
189 orreq r5, r5, #1 195 orreq r5, r5, #1
190 streq r5, [r0, #SCU_CTRL] 196 streq r5, [r0, #SCU_CTRL]
@@ -204,9 +210,7 @@ __v6_setup:
204#ifdef CONFIG_MMU 210#ifdef CONFIG_MMU
205 mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs 211 mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
206 mcr p15, 0, r0, c2, c0, 2 @ TTB control register 212 mcr p15, 0, r0, c2, c0, 2 @ TTB control register
207#ifdef CONFIG_SMP 213 orr r4, r4, #TTB_FLAGS
208 orr r4, r4, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable
209#endif
210 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 214 mcr p15, 0, r4, c2, c0, 1 @ load TTB1
211#endif /* CONFIG_MMU */ 215#endif /* CONFIG_MMU */
212 adr r5, v6_crval 216 adr r5, v6_crval
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 94a58455f346..d95921a2ab99 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -5,23 +5,23 @@
5 * Current Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> 5 * Current Maintainer: Lennert Buytenhek <buytenh@wantstofly.org>
6 * 6 *
7 * Copyright 2004 (C) Intel Corp. 7 * Copyright 2004 (C) Intel Corp.
8 * Copyright 2005 (c) MontaVista Software, Inc. 8 * Copyright 2005 (C) MontaVista Software, Inc.
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 version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 * 13 *
14 * MMU functions for the Intel XScale3 Core (XSC3). The XSC3 core is an 14 * MMU functions for the Intel XScale3 Core (XSC3). The XSC3 core is
15 * extension to Intel's original XScale core that adds the following 15 * an extension to Intel's original XScale core that adds the following
16 * features: 16 * features:
17 * 17 *
18 * - ARMv6 Supersections 18 * - ARMv6 Supersections
19 * - Low Locality Reference pages (replaces mini-cache) 19 * - Low Locality Reference pages (replaces mini-cache)
20 * - 36-bit addressing 20 * - 36-bit addressing
21 * - L2 cache 21 * - L2 cache
22 * - Cache-coherency if chipset supports it 22 * - Cache coherency if chipset supports it
23 * 23 *
24 * Based on orignal XScale code by Nicolas Pitre 24 * Based on original XScale code by Nicolas Pitre.
25 */ 25 */
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
@@ -42,12 +42,12 @@
42#define MAX_AREA_SIZE 32768 42#define MAX_AREA_SIZE 32768
43 43
44/* 44/*
45 * The cache line size of the I and D cache. 45 * The cache line size of the L1 I, L1 D and unified L2 cache.
46 */ 46 */
47#define CACHELINESIZE 32 47#define CACHELINESIZE 32
48 48
49/* 49/*
50 * The size of the data cache. 50 * The size of the L1 D cache.
51 */ 51 */
52#define CACHESIZE 32768 52#define CACHESIZE 32768
53 53
@@ -57,9 +57,9 @@
57#define L2_CACHE_ENABLE 1 57#define L2_CACHE_ENABLE 1
58 58
59/* 59/*
60 * This macro is used to wait for a CP15 write and is needed 60 * This macro is used to wait for a CP15 write and is needed when we
61 * when we have to ensure that the last operation to the co-pro 61 * have to ensure that the last operation to the coprocessor was
62 * was completed before continuing with operation. 62 * completed before continuing with operation.
63 */ 63 */
64 .macro cpwait_ret, lr, rd 64 .macro cpwait_ret, lr, rd
65 mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15 65 mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15
@@ -68,13 +68,13 @@
68 .endm 68 .endm
69 69
70/* 70/*
71 * This macro cleans & invalidates the entire xsc3 dcache by set & way. 71 * This macro cleans and invalidates the entire L1 D cache.
72 */ 72 */
73 73
74 .macro clean_d_cache rd, rs 74 .macro clean_d_cache rd, rs
75 mov \rd, #0x1f00 75 mov \rd, #0x1f00
76 orr \rd, \rd, #0x00e0 76 orr \rd, \rd, #0x00e0
771: mcr p15, 0, \rd, c7, c14, 2 @ clean/inv set/way 771: mcr p15, 0, \rd, c7, c14, 2 @ clean/invalidate L1 D line
78 adds \rd, \rd, #0x40000000 78 adds \rd, \rd, #0x40000000
79 bcc 1b 79 bcc 1b
80 subs \rd, \rd, #0x20 80 subs \rd, \rd, #0x20
@@ -119,15 +119,15 @@ ENTRY(cpu_xsc3_reset)
119 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 119 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
120 msr cpsr_c, r1 @ reset CPSR 120 msr cpsr_c, r1 @ reset CPSR
121 mrc p15, 0, r1, c1, c0, 0 @ ctrl register 121 mrc p15, 0, r1, c1, c0, 0 @ ctrl register
122 bic r1, r1, #0x0086 @ ........B....CA.
123 bic r1, r1, #0x3900 @ ..VIZ..S........ 122 bic r1, r1, #0x3900 @ ..VIZ..S........
123 bic r1, r1, #0x0086 @ ........B....CA.
124 mcr p15, 0, r1, c1, c0, 0 @ ctrl register 124 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
125 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB 125 mcr p15, 0, ip, c7, c7, 0 @ invalidate L1 caches and BTB
126 bic r1, r1, #0x0001 @ ...............M 126 bic r1, r1, #0x0001 @ ...............M
127 mcr p15, 0, r1, c1, c0, 0 @ ctrl register 127 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
128 @ CAUTION: MMU turned off from this point. We count on the pipeline 128 @ CAUTION: MMU turned off from this point. We count on the pipeline
129 @ already containing those two last instructions to survive. 129 @ already containing those two last instructions to survive.
130 mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs 130 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
131 mov pc, r0 131 mov pc, r0
132 132
133/* 133/*
@@ -139,14 +139,12 @@ ENTRY(cpu_xsc3_reset)
139 * 139 *
140 * XScale supports clock switching, but using idle mode support 140 * XScale supports clock switching, but using idle mode support
141 * allows external hardware to react to system state changes. 141 * allows external hardware to react to system state changes.
142
143 MMG: Come back to this one.
144 */ 142 */
145 .align 5 143 .align 5
146 144
147ENTRY(cpu_xsc3_do_idle) 145ENTRY(cpu_xsc3_do_idle)
148 mov r0, #1 146 mov r0, #1
149 mcr p14, 0, r0, c7, c0, 0 @ Go to IDLE 147 mcr p14, 0, r0, c7, c0, 0 @ go to idle
150 mov pc, lr 148 mov pc, lr
151 149
152/* ================================= CACHE ================================ */ 150/* ================================= CACHE ================================ */
@@ -171,9 +169,9 @@ ENTRY(xsc3_flush_kern_cache_all)
171__flush_whole_cache: 169__flush_whole_cache:
172 clean_d_cache r0, r1 170 clean_d_cache r0, r1
173 tst r2, #VM_EXEC 171 tst r2, #VM_EXEC
174 mcrne p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB 172 mcrne p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB
175 mcrne p15, 0, ip, c7, c10, 4 @ Drain Write Buffer 173 mcrne p15, 0, ip, c7, c10, 4 @ data write barrier
176 mcrne p15, 0, ip, c7, c5, 4 @ Prefetch Flush 174 mcrne p15, 0, ip, c7, c5, 4 @ prefetch flush
177 mov pc, lr 175 mov pc, lr
178 176
179/* 177/*
@@ -194,21 +192,21 @@ ENTRY(xsc3_flush_user_cache_range)
194 bhs __flush_whole_cache 192 bhs __flush_whole_cache
195 193
1961: tst r2, #VM_EXEC 1941: tst r2, #VM_EXEC
197 mcrne p15, 0, r0, c7, c5, 1 @ Invalidate I cache line 195 mcrne p15, 0, r0, c7, c5, 1 @ invalidate L1 I line
198 mcr p15, 0, r0, c7, c14, 1 @ Clean/invalidate D cache line 196 mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
199 add r0, r0, #CACHELINESIZE 197 add r0, r0, #CACHELINESIZE
200 cmp r0, r1 198 cmp r0, r1
201 blo 1b 199 blo 1b
202 tst r2, #VM_EXEC 200 tst r2, #VM_EXEC
203 mcrne p15, 0, ip, c7, c5, 6 @ Invalidate BTB 201 mcrne p15, 0, ip, c7, c5, 6 @ invalidate BTB
204 mcrne p15, 0, ip, c7, c10, 4 @ Drain Write Buffer 202 mcrne p15, 0, ip, c7, c10, 4 @ data write barrier
205 mcrne p15, 0, ip, c7, c5, 4 @ Prefetch Flush 203 mcrne p15, 0, ip, c7, c5, 4 @ prefetch flush
206 mov pc, lr 204 mov pc, lr
207 205
208/* 206/*
209 * coherent_kern_range(start, end) 207 * coherent_kern_range(start, end)
210 * 208 *
211 * Ensure coherency between the Icache and the Dcache in the 209 * Ensure coherency between the I cache and the D cache in the
212 * region described by start. If you have non-snooping 210 * region described by start. If you have non-snooping
213 * Harvard caches, you need to implement this function. 211 * Harvard caches, you need to implement this function.
214 * 212 *
@@ -222,34 +220,34 @@ ENTRY(xsc3_coherent_kern_range)
222/* FALLTHROUGH */ 220/* FALLTHROUGH */
223ENTRY(xsc3_coherent_user_range) 221ENTRY(xsc3_coherent_user_range)
224 bic r0, r0, #CACHELINESIZE - 1 222 bic r0, r0, #CACHELINESIZE - 1
2251: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2231: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
226 add r0, r0, #CACHELINESIZE 224 add r0, r0, #CACHELINESIZE
227 cmp r0, r1 225 cmp r0, r1
228 blo 1b 226 blo 1b
229 mov r0, #0 227 mov r0, #0
230 mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB 228 mcr p15, 0, r0, c7, c5, 0 @ invalidate L1 I cache and BTB
231 mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer 229 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
232 mcr p15, 0, r0, c7, c5, 4 @ Prefetch Flush 230 mcr p15, 0, r0, c7, c5, 4 @ prefetch flush
233 mov pc, lr 231 mov pc, lr
234 232
235/* 233/*
236 * flush_kern_dcache_page(void *page) 234 * flush_kern_dcache_page(void *page)
237 * 235 *
238 * Ensure no D cache aliasing occurs, either with itself or 236 * Ensure no D cache aliasing occurs, either with itself or
239 * the I cache 237 * the I cache.
240 * 238 *
241 * - addr - page aligned address 239 * - addr - page aligned address
242 */ 240 */
243ENTRY(xsc3_flush_kern_dcache_page) 241ENTRY(xsc3_flush_kern_dcache_page)
244 add r1, r0, #PAGE_SZ 242 add r1, r0, #PAGE_SZ
2451: mcr p15, 0, r0, c7, c14, 1 @ Clean/Invalidate D Cache line 2431: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
246 add r0, r0, #CACHELINESIZE 244 add r0, r0, #CACHELINESIZE
247 cmp r0, r1 245 cmp r0, r1
248 blo 1b 246 blo 1b
249 mov r0, #0 247 mov r0, #0
250 mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB 248 mcr p15, 0, r0, c7, c5, 0 @ invalidate L1 I cache and BTB
251 mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer 249 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
252 mcr p15, 0, r0, c7, c5, 4 @ Prefetch Flush 250 mcr p15, 0, r0, c7, c5, 4 @ prefetch flush
253 mov pc, lr 251 mov pc, lr
254 252
255/* 253/*
@@ -266,17 +264,17 @@ ENTRY(xsc3_flush_kern_dcache_page)
266ENTRY(xsc3_dma_inv_range) 264ENTRY(xsc3_dma_inv_range)
267 tst r0, #CACHELINESIZE - 1 265 tst r0, #CACHELINESIZE - 1
268 bic r0, r0, #CACHELINESIZE - 1 266 bic r0, r0, #CACHELINESIZE - 1
269 mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D entry 267 mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line
270 mcrne p15, 1, r0, c7, c11, 1 @ clean L2 D entry 268 mcrne p15, 1, r0, c7, c11, 1 @ clean L2 line
271 tst r1, #CACHELINESIZE - 1 269 tst r1, #CACHELINESIZE - 1
272 mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D entry 270 mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D line
273 mcrne p15, 1, r1, c7, c11, 1 @ clean L2 D entry 271 mcrne p15, 1, r1, c7, c11, 1 @ clean L2 line
2741: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D entry 2721: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D line
275 mcr p15, 1, r0, c7, c7, 1 @ Invalidate L2 D cache line 273 mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line
276 add r0, r0, #CACHELINESIZE 274 add r0, r0, #CACHELINESIZE
277 cmp r0, r1 275 cmp r0, r1
278 blo 1b 276 blo 1b
279 mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer 277 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
280 mov pc, lr 278 mov pc, lr
281 279
282/* 280/*
@@ -289,12 +287,12 @@ ENTRY(xsc3_dma_inv_range)
289 */ 287 */
290ENTRY(xsc3_dma_clean_range) 288ENTRY(xsc3_dma_clean_range)
291 bic r0, r0, #CACHELINESIZE - 1 289 bic r0, r0, #CACHELINESIZE - 1
2921: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D entry 2901: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
293 mcr p15, 1, r0, c7, c11, 1 @ clean L2 D entry 291 mcr p15, 1, r0, c7, c11, 1 @ clean L2 line
294 add r0, r0, #CACHELINESIZE 292 add r0, r0, #CACHELINESIZE
295 cmp r0, r1 293 cmp r0, r1
296 blo 1b 294 blo 1b
297 mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer 295 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
298 mov pc, lr 296 mov pc, lr
299 297
300/* 298/*
@@ -307,13 +305,13 @@ ENTRY(xsc3_dma_clean_range)
307 */ 305 */
308ENTRY(xsc3_dma_flush_range) 306ENTRY(xsc3_dma_flush_range)
309 bic r0, r0, #CACHELINESIZE - 1 307 bic r0, r0, #CACHELINESIZE - 1
3101: mcr p15, 0, r0, c7, c14, 1 @ Clean/invalidate L1 D cache line 3081: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
311 mcr p15, 1, r0, c7, c11, 1 @ Clean L2 D cache line 309 mcr p15, 1, r0, c7, c11, 1 @ clean L2 line
312 mcr p15, 1, r0, c7, c7, 1 @ Invalidate L2 D cache line 310 mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line
313 add r0, r0, #CACHELINESIZE 311 add r0, r0, #CACHELINESIZE
314 cmp r0, r1 312 cmp r0, r1
315 blo 1b 313 blo 1b
316 mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer 314 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
317 mov pc, lr 315 mov pc, lr
318 316
319ENTRY(xsc3_cache_fns) 317ENTRY(xsc3_cache_fns)
@@ -328,7 +326,7 @@ ENTRY(xsc3_cache_fns)
328 .long xsc3_dma_flush_range 326 .long xsc3_dma_flush_range
329 327
330ENTRY(cpu_xsc3_dcache_clean_area) 328ENTRY(cpu_xsc3_dcache_clean_area)
3311: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 3291: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
332 add r0, r0, #CACHELINESIZE 330 add r0, r0, #CACHELINESIZE
333 subs r1, r1, #CACHELINESIZE 331 subs r1, r1, #CACHELINESIZE
334 bhi 1b 332 bhi 1b
@@ -346,14 +344,14 @@ ENTRY(cpu_xsc3_dcache_clean_area)
346 .align 5 344 .align 5
347ENTRY(cpu_xsc3_switch_mm) 345ENTRY(cpu_xsc3_switch_mm)
348 clean_d_cache r1, r2 346 clean_d_cache r1, r2
349 mcr p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB 347 mcr p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB
350 mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer 348 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
351 mcr p15, 0, ip, c7, c5, 4 @ Prefetch Flush 349 mcr p15, 0, ip, c7, c5, 4 @ prefetch flush
352#ifdef L2_CACHE_ENABLE 350#ifdef L2_CACHE_ENABLE
353 orr r0, r0, #0x18 @ cache the page table in L2 351 orr r0, r0, #0x18 @ cache the page table in L2
354#endif 352#endif
355 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer 353 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
356 mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs 354 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
357 cpwait_ret lr, ip 355 cpwait_ret lr, ip
358 356
359/* 357/*
@@ -366,34 +364,34 @@ ENTRY(cpu_xsc3_switch_mm)
366ENTRY(cpu_xsc3_set_pte_ext) 364ENTRY(cpu_xsc3_set_pte_ext)
367 str r1, [r0], #-2048 @ linux version 365 str r1, [r0], #-2048 @ linux version
368 366
369 bic r2, r1, #0xff0 @ Keep C, B bits 367 bic r2, r1, #0xff0 @ keep C, B bits
370 orr r2, r2, #PTE_TYPE_EXT @ extended page 368 orr r2, r2, #PTE_TYPE_EXT @ extended page
371 tst r1, #L_PTE_SHARED @ Shared? 369 tst r1, #L_PTE_SHARED @ shared?
372 orrne r2, r2, #0x200 370 orrne r2, r2, #0x200
373 371
374 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY 372 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
375 373
376 tst r3, #L_PTE_USER @ User? 374 tst r3, #L_PTE_USER @ user?
377 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w 375 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w
378 376
379 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty? 377 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty?
380 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w 378 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w
381 @ combined with user -> user r/w 379 @ combined with user -> user r/w
382 380
383#if L2_CACHE_ENABLE 381#if L2_CACHE_ENABLE
384 @ If its cacheable it needs to be in L2 also. 382 @ If it's cacheable, it needs to be in L2 also.
385 eor ip, r1, #L_PTE_CACHEABLE 383 eor ip, r1, #L_PTE_CACHEABLE
386 tst ip, #L_PTE_CACHEABLE 384 tst ip, #L_PTE_CACHEABLE
387 orreq r2, r2, #PTE_EXT_TEX(0x5) 385 orreq r2, r2, #PTE_EXT_TEX(0x5)
388#endif 386#endif
389 387
390 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? 388 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young?
391 movne r2, #0 @ no -> fault 389 movne r2, #0 @ no -> fault
392 390
393 str r2, [r0] @ hardware version 391 str r2, [r0] @ hardware version
394 mov ip, #0 392 mov ip, #0
395 mcr p15, 0, r0, c7, c10, 1 @ Clean D cache line mcr 393 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
396 mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer 394 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
397 mov pc, lr 395 mov pc, lr
398 396
399 .ltorg 397 .ltorg
@@ -406,17 +404,18 @@ ENTRY(cpu_xsc3_set_pte_ext)
406__xsc3_setup: 404__xsc3_setup:
407 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 405 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
408 msr cpsr_c, r0 406 msr cpsr_c, r0
409 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB 407 mcr p15, 0, ip, c7, c7, 0 @ invalidate L1 caches and BTB
410 mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer 408 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
411 mcr p15, 0, ip, c7, c5, 4 @ Prefetch Flush 409 mcr p15, 0, ip, c7, c5, 4 @ prefetch flush
412 mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs 410 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
413#if L2_CACHE_ENABLE 411#if L2_CACHE_ENABLE
414 orr r4, r4, #0x18 @ cache the page table in L2 412 orr r4, r4, #0x18 @ cache the page table in L2
415#endif 413#endif
416 mcr p15, 0, r4, c2, c0, 0 @ load page table pointer 414 mcr p15, 0, r4, c2, c0, 0 @ load page table pointer
417 mov r0, #1 @ Allow access to CP0 and CP13 415
418 orr r0, r0, #1 << 13 @ Its undefined whether this 416 mov r0, #0 @ don't allow CP access
419 mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes 417 mcr p15, 0, r0, c15, c1, 0 @ write CP access register
418
420 mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg 419 mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg
421 and r0, r0, #2 @ preserve bit P bit setting 420 and r0, r0, #2 @ preserve bit P bit setting
422#if L2_CACHE_ENABLE 421#if L2_CACHE_ENABLE
@@ -427,9 +426,9 @@ __xsc3_setup:
427 adr r5, xsc3_crval 426 adr r5, xsc3_crval
428 ldmia r5, {r5, r6} 427 ldmia r5, {r5, r6}
429 mrc p15, 0, r0, c1, c0, 0 @ get control register 428 mrc p15, 0, r0, c1, c0, 0 @ get control register
430 bic r0, r0, r5 @ .... .... .... ..A. 429 bic r0, r0, r5 @ ..V. ..R. .... ..A.
431 orr r0, r0, r6 @ .... .... .... .C.M 430 orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu)
432 orr r0, r0, #0x00000800 @ ..VI Z..S .... .... 431 @ ...I Z..S .... .... (uc)
433#if L2_CACHE_ENABLE 432#if L2_CACHE_ENABLE
434 orr r0, r0, #0x04000000 @ L2 enable 433 orr r0, r0, #0x04000000 @ L2 enable
435#endif 434#endif
@@ -439,7 +438,7 @@ __xsc3_setup:
439 438
440 .type xsc3_crval, #object 439 .type xsc3_crval, #object
441xsc3_crval: 440xsc3_crval:
442 crval clear=0x04003b02, mmuset=0x00003105, ucset=0x00001100 441 crval clear=0x04002202, mmuset=0x00003905, ucset=0x00001900
443 442
444 __INITDATA 443 __INITDATA
445 444
@@ -474,7 +473,7 @@ cpu_elf_name:
474 473
475 .type cpu_xsc3_name, #object 474 .type cpu_xsc3_name, #object
476cpu_xsc3_name: 475cpu_xsc3_name:
477 .asciz "XScale-Core3" 476 .asciz "XScale-V3 based processor"
478 .size cpu_xsc3_name, . - cpu_xsc3_name 477 .size cpu_xsc3_name, . - cpu_xsc3_name
479 478
480 .align 479 .align
@@ -490,7 +489,7 @@ __xsc3_proc_info:
490 PMD_SECT_CACHEABLE | \ 489 PMD_SECT_CACHEABLE | \
491 PMD_SECT_AP_WRITE | \ 490 PMD_SECT_AP_WRITE | \
492 PMD_SECT_AP_READ 491 PMD_SECT_AP_READ
493 .long PMD_TYPE_SECT | \ 492 .long PMD_TYPE_SECT | \
494 PMD_SECT_AP_WRITE | \ 493 PMD_SECT_AP_WRITE | \
495 PMD_SECT_AP_READ 494 PMD_SECT_AP_READ
496 b __xsc3_setup 495 b __xsc3_setup
diff --git a/arch/arm/mm/tlb-v6.S b/arch/arm/mm/tlb-v6.S
index fd6adde39091..20f84bbaa9bb 100644
--- a/arch/arm/mm/tlb-v6.S
+++ b/arch/arm/mm/tlb-v6.S
@@ -53,6 +53,8 @@ ENTRY(v6wbi_flush_user_tlb_range)
53 add r0, r0, #PAGE_SZ 53 add r0, r0, #PAGE_SZ
54 cmp r0, r1 54 cmp r0, r1
55 blo 1b 55 blo 1b
56 mcr p15, 0, ip, c7, c5, 6 @ flush BTAC/BTB
57 mcr p15, 0, ip, c7, c10, 4 @ data synchronization barrier
56 mov pc, lr 58 mov pc, lr
57 59
58/* 60/*
@@ -80,7 +82,9 @@ ENTRY(v6wbi_flush_kern_tlb_range)
80 add r0, r0, #PAGE_SZ 82 add r0, r0, #PAGE_SZ
81 cmp r0, r1 83 cmp r0, r1
82 blo 1b 84 blo 1b
85 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
83 mcr p15, 0, r2, c7, c10, 4 @ data synchronization barrier 86 mcr p15, 0, r2, c7, c10, 4 @ data synchronization barrier
87 mcr p15, 0, r2, c7, c5, 4 @ prefetch flush
84 mov pc, lr 88 mov pc, lr
85 89
86 .section ".text.init", #alloc, #execinstr 90 .section ".text.init", #alloc, #execinstr
diff --git a/arch/arm/oprofile/Kconfig b/arch/arm/oprofile/Kconfig
index 19d37730b664..afd93ad02feb 100644
--- a/arch/arm/oprofile/Kconfig
+++ b/arch/arm/oprofile/Kconfig
@@ -19,5 +19,24 @@ config OPROFILE
19 19
20 If unsure, say N. 20 If unsure, say N.
21 21
22if OPROFILE
23
24config OPROFILE_ARMV6
25 bool
26 depends on CPU_V6 && !SMP
27 default y
28 select OPROFILE_ARM11_CORE
29
30config OPROFILE_MPCORE
31 bool
32 depends on CPU_V6 && SMP
33 default y
34 select OPROFILE_ARM11_CORE
35
36config OPROFILE_ARM11_CORE
37 bool
38
39endif
40
22endmenu 41endmenu
23 42
diff --git a/arch/arm/oprofile/Makefile b/arch/arm/oprofile/Makefile
index 6a94e54848fd..e61d0cc520b7 100644
--- a/arch/arm/oprofile/Makefile
+++ b/arch/arm/oprofile/Makefile
@@ -8,4 +8,6 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
8 8
9oprofile-y := $(DRIVER_OBJS) common.o backtrace.o 9oprofile-y := $(DRIVER_OBJS) common.o backtrace.o
10oprofile-$(CONFIG_CPU_XSCALE) += op_model_xscale.o 10oprofile-$(CONFIG_CPU_XSCALE) += op_model_xscale.o
11 11oprofile-$(CONFIG_OPROFILE_ARM11_CORE) += op_model_arm11_core.o
12oprofile-$(CONFIG_OPROFILE_ARMV6) += op_model_v6.o
13oprofile-$(CONFIG_OPROFILE_MPCORE) += op_model_mpcore.o
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 6f833358cd06..0a007b931f63 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -135,6 +135,14 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
135 spec = &op_xscale_spec; 135 spec = &op_xscale_spec;
136#endif 136#endif
137 137
138#ifdef CONFIG_OPROFILE_ARMV6
139 spec = &op_armv6_spec;
140#endif
141
142#ifdef CONFIG_OPROFILE_MPCORE
143 spec = &op_mpcore_spec;
144#endif
145
138 if (spec) { 146 if (spec) {
139 ret = spec->init(); 147 ret = spec->init();
140 if (ret < 0) 148 if (ret < 0)
diff --git a/arch/arm/oprofile/op_arm_model.h b/arch/arm/oprofile/op_arm_model.h
index 38c6ad158547..4899c629aa03 100644
--- a/arch/arm/oprofile/op_arm_model.h
+++ b/arch/arm/oprofile/op_arm_model.h
@@ -24,6 +24,9 @@ struct op_arm_model_spec {
24extern struct op_arm_model_spec op_xscale_spec; 24extern struct op_arm_model_spec op_xscale_spec;
25#endif 25#endif
26 26
27extern struct op_arm_model_spec op_armv6_spec;
28extern struct op_arm_model_spec op_mpcore_spec;
29
27extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth); 30extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth);
28 31
29extern int __init op_arm_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec); 32extern int __init op_arm_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec);
diff --git a/arch/arm/oprofile/op_model_arm11_core.c b/arch/arm/oprofile/op_model_arm11_core.c
new file mode 100644
index 000000000000..ad80752cb9fb
--- /dev/null
+++ b/arch/arm/oprofile/op_model_arm11_core.c
@@ -0,0 +1,162 @@
1/**
2 * @file op_model_arm11_core.c
3 * ARM11 Event Monitor Driver
4 * @remark Copyright 2004 ARM SMP Development Team
5 */
6#include <linux/types.h>
7#include <linux/errno.h>
8#include <linux/oprofile.h>
9#include <linux/interrupt.h>
10#include <linux/irq.h>
11#include <linux/smp.h>
12
13#include "op_counter.h"
14#include "op_arm_model.h"
15#include "op_model_arm11_core.h"
16
17/*
18 * ARM11 PMU support
19 */
20static inline void arm11_write_pmnc(u32 val)
21{
22 /* upper 4bits and 7, 11 are write-as-0 */
23 val &= 0x0ffff77f;
24 asm volatile("mcr p15, 0, %0, c15, c12, 0" : : "r" (val));
25}
26
27static inline u32 arm11_read_pmnc(void)
28{
29 u32 val;
30 asm volatile("mrc p15, 0, %0, c15, c12, 0" : "=r" (val));
31 return val;
32}
33
34static void arm11_reset_counter(unsigned int cnt)
35{
36 u32 val = -(u32)counter_config[CPU_COUNTER(smp_processor_id(), cnt)].count;
37 switch (cnt) {
38 case CCNT:
39 asm volatile("mcr p15, 0, %0, c15, c12, 1" : : "r" (val));
40 break;
41
42 case PMN0:
43 asm volatile("mcr p15, 0, %0, c15, c12, 2" : : "r" (val));
44 break;
45
46 case PMN1:
47 asm volatile("mcr p15, 0, %0, c15, c12, 3" : : "r" (val));
48 break;
49 }
50}
51
52int arm11_setup_pmu(void)
53{
54 unsigned int cnt;
55 u32 pmnc;
56
57 if (arm11_read_pmnc() & PMCR_E) {
58 printk(KERN_ERR "oprofile: CPU%u PMU still enabled when setup new event counter.\n", smp_processor_id());
59 return -EBUSY;
60 }
61
62 /* initialize PMNC, reset overflow, D bit, C bit and P bit. */
63 arm11_write_pmnc(PMCR_OFL_PMN0 | PMCR_OFL_PMN1 | PMCR_OFL_CCNT |
64 PMCR_C | PMCR_P);
65
66 for (pmnc = 0, cnt = PMN0; cnt <= CCNT; cnt++) {
67 unsigned long event;
68
69 if (!counter_config[CPU_COUNTER(smp_processor_id(), cnt)].enabled)
70 continue;
71
72 event = counter_config[CPU_COUNTER(smp_processor_id(), cnt)].event & 255;
73
74 /*
75 * Set event (if destined for PMNx counters)
76 */
77 if (cnt == PMN0) {
78 pmnc |= event << 20;
79 } else if (cnt == PMN1) {
80 pmnc |= event << 12;
81 }
82
83 /*
84 * We don't need to set the event if it's a cycle count
85 * Enable interrupt for this counter
86 */
87 pmnc |= PMCR_IEN_PMN0 << cnt;
88 arm11_reset_counter(cnt);
89 }
90 arm11_write_pmnc(pmnc);
91
92 return 0;
93}
94
95int arm11_start_pmu(void)
96{
97 arm11_write_pmnc(arm11_read_pmnc() | PMCR_E);
98 return 0;
99}
100
101int arm11_stop_pmu(void)
102{
103 unsigned int cnt;
104
105 arm11_write_pmnc(arm11_read_pmnc() & ~PMCR_E);
106
107 for (cnt = PMN0; cnt <= CCNT; cnt++)
108 arm11_reset_counter(cnt);
109
110 return 0;
111}
112
113/*
114 * CPU counters' IRQ handler (one IRQ per CPU)
115 */
116static irqreturn_t arm11_pmu_interrupt(int irq, void *arg)
117{
118 struct pt_regs *regs = get_irq_regs();
119 unsigned int cnt;
120 u32 pmnc;
121
122 pmnc = arm11_read_pmnc();
123
124 for (cnt = PMN0; cnt <= CCNT; cnt++) {
125 if ((pmnc & (PMCR_OFL_PMN0 << cnt)) && (pmnc & (PMCR_IEN_PMN0 << cnt))) {
126 arm11_reset_counter(cnt);
127 oprofile_add_sample(regs, CPU_COUNTER(smp_processor_id(), cnt));
128 }
129 }
130 /* Clear counter flag(s) */
131 arm11_write_pmnc(pmnc);
132 return IRQ_HANDLED;
133}
134
135int arm11_request_interrupts(int *irqs, int nr)
136{
137 unsigned int i;
138 int ret = 0;
139
140 for(i = 0; i < nr; i++) {
141 ret = request_irq(irqs[i], arm11_pmu_interrupt, IRQF_DISABLED, "CP15 PMU", NULL);
142 if (ret != 0) {
143 printk(KERN_ERR "oprofile: unable to request IRQ%u for MPCORE-EM\n",
144 irqs[i]);
145 break;
146 }
147 }
148
149 if (i != nr)
150 while (i-- != 0)
151 free_irq(irqs[i], NULL);
152
153 return ret;
154}
155
156void arm11_release_interrupts(int *irqs, int nr)
157{
158 unsigned int i;
159
160 for (i = 0; i < nr; i++)
161 free_irq(irqs[i], NULL);
162}
diff --git a/arch/arm/oprofile/op_model_arm11_core.h b/arch/arm/oprofile/op_model_arm11_core.h
new file mode 100644
index 000000000000..6f8538e5a960
--- /dev/null
+++ b/arch/arm/oprofile/op_model_arm11_core.h
@@ -0,0 +1,45 @@
1/**
2 * @file op_model_arm11_core.h
3 * ARM11 Event Monitor Driver
4 * @remark Copyright 2004 ARM SMP Development Team
5 * @remark Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
6 * @remark Copyright 2000-2004 MontaVista Software Inc
7 * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
8 * @remark Copyright 2004 Intel Corporation
9 * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
10 * @remark Copyright 2004 Oprofile Authors
11 *
12 * @remark Read the file COPYING
13 *
14 * @author Zwane Mwaikambo
15 */
16#ifndef OP_MODEL_ARM11_CORE_H
17#define OP_MODEL_ARM11_CORE_H
18
19/*
20 * Per-CPU PMCR
21 */
22#define PMCR_E (1 << 0) /* Enable */
23#define PMCR_P (1 << 1) /* Count reset */
24#define PMCR_C (1 << 2) /* Cycle counter reset */
25#define PMCR_D (1 << 3) /* Cycle counter counts every 64th cpu cycle */
26#define PMCR_IEN_PMN0 (1 << 4) /* Interrupt enable count reg 0 */
27#define PMCR_IEN_PMN1 (1 << 5) /* Interrupt enable count reg 1 */
28#define PMCR_IEN_CCNT (1 << 6) /* Interrupt enable cycle counter */
29#define PMCR_OFL_PMN0 (1 << 8) /* Count reg 0 overflow */
30#define PMCR_OFL_PMN1 (1 << 9) /* Count reg 1 overflow */
31#define PMCR_OFL_CCNT (1 << 10) /* Cycle counter overflow */
32
33#define PMN0 0
34#define PMN1 1
35#define CCNT 2
36
37#define CPU_COUNTER(cpu, counter) ((cpu) * 3 + (counter))
38
39int arm11_setup_pmu(void);
40int arm11_start_pmu(void);
41int arm11_stop_pmu(void);
42int arm11_request_interrupts(int *, int);
43void arm11_release_interrupts(int *, int);
44
45#endif
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c
new file mode 100644
index 000000000000..898500718249
--- /dev/null
+++ b/arch/arm/oprofile/op_model_mpcore.c
@@ -0,0 +1,296 @@
1/**
2 * @file op_model_mpcore.c
3 * MPCORE Event Monitor Driver
4 * @remark Copyright 2004 ARM SMP Development Team
5 * @remark Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
6 * @remark Copyright 2000-2004 MontaVista Software Inc
7 * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
8 * @remark Copyright 2004 Intel Corporation
9 * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
10 * @remark Copyright 2004 Oprofile Authors
11 *
12 * @remark Read the file COPYING
13 *
14 * @author Zwane Mwaikambo
15 *
16 * Counters:
17 * 0: PMN0 on CPU0, per-cpu configurable event counter
18 * 1: PMN1 on CPU0, per-cpu configurable event counter
19 * 2: CCNT on CPU0
20 * 3: PMN0 on CPU1
21 * 4: PMN1 on CPU1
22 * 5: CCNT on CPU1
23 * 6: PMN0 on CPU1
24 * 7: PMN1 on CPU1
25 * 8: CCNT on CPU1
26 * 9: PMN0 on CPU1
27 * 10: PMN1 on CPU1
28 * 11: CCNT on CPU1
29 * 12-19: configurable SCU event counters
30 */
31
32/* #define DEBUG */
33#include <linux/types.h>
34#include <linux/errno.h>
35#include <linux/sched.h>
36#include <linux/oprofile.h>
37#include <linux/interrupt.h>
38#include <linux/smp.h>
39
40#include <asm/io.h>
41#include <asm/irq.h>
42#include <asm/mach/irq.h>
43#include <asm/hardware.h>
44#include <asm/system.h>
45
46#include "op_counter.h"
47#include "op_arm_model.h"
48#include "op_model_arm11_core.h"
49#include "op_model_mpcore.h"
50
51/*
52 * MPCore SCU event monitor support
53 */
54#define SCU_EVENTMONITORS_VA_BASE __io_address(REALVIEW_MPCORE_SCU_BASE + 0x10)
55
56/*
57 * Bitmask of used SCU counters
58 */
59static unsigned int scu_em_used;
60
61/*
62 * 2 helper fns take a counter number from 0-7 (not the userspace-visible counter number)
63 */
64static inline void scu_reset_counter(struct eventmonitor __iomem *emc, unsigned int n)
65{
66 writel(-(u32)counter_config[SCU_COUNTER(n)].count, &emc->MC[n]);
67}
68
69static inline void scu_set_event(struct eventmonitor __iomem *emc, unsigned int n, u32 event)
70{
71 event &= 0xff;
72 writeb(event, &emc->MCEB[n]);
73}
74
75/*
76 * SCU counters' IRQ handler (one IRQ per counter => 2 IRQs per CPU)
77 */
78static irqreturn_t scu_em_interrupt(int irq, void *arg)
79{
80 struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE;
81 unsigned int cnt;
82
83 cnt = irq - IRQ_PMU_SCU0;
84 oprofile_add_sample(get_irq_regs(), SCU_COUNTER(cnt));
85 scu_reset_counter(emc, cnt);
86
87 /* Clear overflow flag for this counter */
88 writel(1 << (cnt + 16), &emc->PMCR);
89
90 return IRQ_HANDLED;
91}
92
93/* Configure just the SCU counters that the user has requested */
94static void scu_setup(void)
95{
96 struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE;
97 unsigned int i;
98
99 scu_em_used = 0;
100
101 for (i = 0; i < NUM_SCU_COUNTERS; i++) {
102 if (counter_config[SCU_COUNTER(i)].enabled &&
103 counter_config[SCU_COUNTER(i)].event) {
104 scu_set_event(emc, i, 0); /* disable counter for now */
105 scu_em_used |= 1 << i;
106 }
107 }
108}
109
110static int scu_start(void)
111{
112 struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE;
113 unsigned int temp, i;
114 unsigned long event;
115 int ret = 0;
116
117 /*
118 * request the SCU counter interrupts that we need
119 */
120 for (i = 0; i < NUM_SCU_COUNTERS; i++) {
121 if (scu_em_used & (1 << i)) {
122 ret = request_irq(IRQ_PMU_SCU0 + i, scu_em_interrupt, IRQF_DISABLED, "SCU PMU", NULL);
123 if (ret) {
124 printk(KERN_ERR "oprofile: unable to request IRQ%u for SCU Event Monitor\n",
125 IRQ_PMU_SCU0 + i);
126 goto err_free_scu;
127 }
128 }
129 }
130
131 /*
132 * clear overflow and enable interrupt for all used counters
133 */
134 temp = readl(&emc->PMCR);
135 for (i = 0; i < NUM_SCU_COUNTERS; i++) {
136 if (scu_em_used & (1 << i)) {
137 scu_reset_counter(emc, i);
138 event = counter_config[SCU_COUNTER(i)].event;
139 scu_set_event(emc, i, event);
140
141 /* clear overflow/interrupt */
142 temp |= 1 << (i + 16);
143 /* enable interrupt*/
144 temp |= 1 << (i + 8);
145 }
146 }
147
148 /* Enable all 8 counters */
149 temp |= PMCR_E;
150 writel(temp, &emc->PMCR);
151
152 return 0;
153
154 err_free_scu:
155 while (i--)
156 free_irq(IRQ_PMU_SCU0 + i, NULL);
157 return ret;
158}
159
160static void scu_stop(void)
161{
162 struct eventmonitor __iomem *emc = SCU_EVENTMONITORS_VA_BASE;
163 unsigned int temp, i;
164
165 /* Disable counter interrupts */
166 /* Don't disable all 8 counters (with the E bit) as they may be in use */
167 temp = readl(&emc->PMCR);
168 for (i = 0; i < NUM_SCU_COUNTERS; i++) {
169 if (scu_em_used & (1 << i))
170 temp &= ~(1 << (i + 8));
171 }
172 writel(temp, &emc->PMCR);
173
174 /* Free counter interrupts and reset counters */
175 for (i = 0; i < NUM_SCU_COUNTERS; i++) {
176 if (scu_em_used & (1 << i)) {
177 scu_reset_counter(emc, i);
178 free_irq(IRQ_PMU_SCU0 + i, NULL);
179 }
180 }
181}
182
183struct em_function_data {
184 int (*fn)(void);
185 int ret;
186};
187
188static void em_func(void *data)
189{
190 struct em_function_data *d = data;
191 int ret = d->fn();
192 if (ret)
193 d->ret = ret;
194}
195
196static int em_call_function(int (*fn)(void))
197{
198 struct em_function_data data;
199
200 data.fn = fn;
201 data.ret = 0;
202
203 smp_call_function(em_func, &data, 1, 1);
204 em_func(&data);
205
206 return data.ret;
207}
208
209/*
210 * Glue to stick the individual ARM11 PMUs and the SCU
211 * into the oprofile framework.
212 */
213static int em_setup_ctrs(void)
214{
215 int ret;
216
217 /* Configure CPU counters by cross-calling to the other CPUs */
218 ret = em_call_function(arm11_setup_pmu);
219 if (ret == 0)
220 scu_setup();
221
222 return 0;
223}
224
225static int arm11_irqs[] = {
226 [0] = IRQ_PMU_CPU0,
227 [1] = IRQ_PMU_CPU1,
228 [2] = IRQ_PMU_CPU2,
229 [3] = IRQ_PMU_CPU3
230};
231
232static int em_start(void)
233{
234 int ret;
235
236 ret = arm11_request_interrupts(arm11_irqs, ARRAY_SIZE(arm11_irqs));
237 if (ret == 0) {
238 em_call_function(arm11_start_pmu);
239
240 ret = scu_start();
241 if (ret)
242 arm11_release_interrupts(arm11_irqs, ARRAY_SIZE(arm11_irqs));
243 }
244 return ret;
245}
246
247static void em_stop(void)
248{
249 em_call_function(arm11_stop_pmu);
250 arm11_release_interrupts(arm11_irqs, ARRAY_SIZE(arm11_irqs));
251 scu_stop();
252}
253
254/*
255 * Why isn't there a function to route an IRQ to a specific CPU in
256 * genirq?
257 */
258static void em_route_irq(int irq, unsigned int cpu)
259{
260 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
261 irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu));
262}
263
264static int em_setup(void)
265{
266 /*
267 * Send SCU PMU interrupts to the "owner" CPU.
268 */
269 em_route_irq(IRQ_PMU_SCU0, 0);
270 em_route_irq(IRQ_PMU_SCU1, 0);
271 em_route_irq(IRQ_PMU_SCU2, 1);
272 em_route_irq(IRQ_PMU_SCU3, 1);
273 em_route_irq(IRQ_PMU_SCU4, 2);
274 em_route_irq(IRQ_PMU_SCU5, 2);
275 em_route_irq(IRQ_PMU_SCU6, 3);
276 em_route_irq(IRQ_PMU_SCU7, 3);
277
278 /*
279 * Send CP15 PMU interrupts to the owner CPU.
280 */
281 em_route_irq(IRQ_PMU_CPU0, 0);
282 em_route_irq(IRQ_PMU_CPU1, 1);
283 em_route_irq(IRQ_PMU_CPU2, 2);
284 em_route_irq(IRQ_PMU_CPU3, 3);
285
286 return 0;
287}
288
289struct op_arm_model_spec op_mpcore_spec = {
290 .init = em_setup,
291 .num_counters = MPCORE_NUM_COUNTERS,
292 .setup_ctrs = em_setup_ctrs,
293 .start = em_start,
294 .stop = em_stop,
295 .name = "arm/mpcore",
296};
diff --git a/arch/arm/oprofile/op_model_mpcore.h b/arch/arm/oprofile/op_model_mpcore.h
new file mode 100644
index 000000000000..73d811023688
--- /dev/null
+++ b/arch/arm/oprofile/op_model_mpcore.h
@@ -0,0 +1,61 @@
1/**
2 * @file op_model_mpcore.c
3 * MPCORE Event Monitor Driver
4 * @remark Copyright 2004 ARM SMP Development Team
5 * @remark Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
6 * @remark Copyright 2000-2004 MontaVista Software Inc
7 * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
8 * @remark Copyright 2004 Intel Corporation
9 * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
10 * @remark Copyright 2004 Oprofile Authors
11 *
12 * @remark Read the file COPYING
13 *
14 * @author Zwane Mwaikambo
15 */
16#ifndef OP_MODEL_MPCORE_H
17#define OP_MODEL_MPCORE_H
18
19struct eventmonitor {
20 unsigned long PMCR;
21 unsigned char MCEB[8];
22 unsigned long MC[8];
23};
24
25/*
26 * List of userspace counter numbers: note that the structure is important.
27 * The code relies on CPUn's counters being CPU0's counters + 3n
28 * and on CPU0's counters starting at 0
29 */
30
31#define COUNTER_CPU0_PMN0 0
32#define COUNTER_CPU0_PMN1 1
33#define COUNTER_CPU0_CCNT 2
34
35#define COUNTER_CPU1_PMN0 3
36#define COUNTER_CPU1_PMN1 4
37#define COUNTER_CPU1_CCNT 5
38
39#define COUNTER_CPU2_PMN0 6
40#define COUNTER_CPU2_PMN1 7
41#define COUNTER_CPU2_CCNT 8
42
43#define COUNTER_CPU3_PMN0 9
44#define COUNTER_CPU3_PMN1 10
45#define COUNTER_CPU3_CCNT 11
46
47#define COUNTER_SCU_MN0 12
48#define COUNTER_SCU_MN1 13
49#define COUNTER_SCU_MN2 14
50#define COUNTER_SCU_MN3 15
51#define COUNTER_SCU_MN4 16
52#define COUNTER_SCU_MN5 17
53#define COUNTER_SCU_MN6 18
54#define COUNTER_SCU_MN7 19
55#define NUM_SCU_COUNTERS 8
56
57#define SCU_COUNTER(number) ((number) + COUNTER_SCU_MN0)
58
59#define MPCORE_NUM_COUNTERS SCU_COUNTER(NUM_SCU_COUNTERS)
60
61#endif
diff --git a/arch/arm/oprofile/op_model_v6.c b/arch/arm/oprofile/op_model_v6.c
new file mode 100644
index 000000000000..fe581383d3e2
--- /dev/null
+++ b/arch/arm/oprofile/op_model_v6.c
@@ -0,0 +1,67 @@
1/**
2 * @file op_model_v6.c
3 * ARM11 Performance Monitor Driver
4 *
5 * Based on op_model_xscale.c
6 *
7 * @remark Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
8 * @remark Copyright 2000-2004 MontaVista Software Inc
9 * @remark Copyright 2004 Dave Jiang <dave.jiang@intel.com>
10 * @remark Copyright 2004 Intel Corporation
11 * @remark Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
12 * @remark Copyright 2004 OProfile Authors
13 *
14 * @remark Read the file COPYING
15 *
16 * @author Tony Lindgren <tony@atomide.com>
17 */
18
19/* #define DEBUG */
20#include <linux/types.h>
21#include <linux/errno.h>
22#include <linux/sched.h>
23#include <linux/oprofile.h>
24#include <linux/interrupt.h>
25#include <asm/irq.h>
26#include <asm/system.h>
27
28#include "op_counter.h"
29#include "op_arm_model.h"
30#include "op_model_arm11_core.h"
31
32static int irqs[] = {
33#ifdef CONFIG_ARCH_OMAP2
34 3,
35#endif
36};
37
38static void armv6_pmu_stop(void)
39{
40 arm11_stop_pmu();
41 arm11_release_interrupts(irqs, ARRAY_SIZE(irqs));
42}
43
44static int armv6_pmu_start(void)
45{
46 int ret;
47
48 ret = arm11_request_interrupts(irqs, ARRAY_SIZE(irqs));
49 if (ret >= 0)
50 ret = arm11_start_pmu();
51
52 return ret;
53}
54
55static int armv6_detect_pmu(void)
56{
57 return 0;
58}
59
60struct op_arm_model_spec op_armv6_spec = {
61 .init = armv6_detect_pmu,
62 .num_counters = 3,
63 .setup_ctrs = arm11_setup_pmu,
64 .start = armv6_pmu_start,
65 .stop = armv6_pmu_stop,
66 .name = "arm/armv6",
67};
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
index 23da00b11517..4d2b1da3cd82 100644
--- a/arch/arm/plat-iop/Makefile
+++ b/arch/arm/plat-iop/Makefile
@@ -2,7 +2,30 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5obj-y := gpio.o i2c.o pci.o setup.o time.o 5obj-y :=
6obj-m := 6
7obj-n := 7# IOP32X
8obj- := 8obj-$(CONFIG_ARCH_IOP32X) += gpio.o
9obj-$(CONFIG_ARCH_IOP32X) += i2c.o
10obj-$(CONFIG_ARCH_IOP32X) += pci.o
11obj-$(CONFIG_ARCH_IOP32X) += setup.o
12obj-$(CONFIG_ARCH_IOP32X) += time.o
13obj-$(CONFIG_ARCH_IOP32X) += io.o
14obj-$(CONFIG_ARCH_IOP32X) += cp6.o
15
16# IOP33X
17obj-$(CONFIG_ARCH_IOP33X) += gpio.o
18obj-$(CONFIG_ARCH_IOP33X) += i2c.o
19obj-$(CONFIG_ARCH_IOP33X) += pci.o
20obj-$(CONFIG_ARCH_IOP33X) += setup.o
21obj-$(CONFIG_ARCH_IOP33X) += time.o
22obj-$(CONFIG_ARCH_IOP33X) += io.o
23obj-$(CONFIG_ARCH_IOP33X) += cp6.o
24
25# IOP13XX
26obj-$(CONFIG_ARCH_IOP13XX) += cp6.o
27obj-$(CONFIG_ARCH_IOP13XX) += time.o
28
29obj-m :=
30obj-n :=
31obj- :=
diff --git a/arch/arm/plat-iop/cp6.c b/arch/arm/plat-iop/cp6.c
new file mode 100644
index 000000000000..9612a87e2a88
--- /dev/null
+++ b/arch/arm/plat-iop/cp6.c
@@ -0,0 +1,50 @@
1/*
2 * IOP Coprocessor-6 access handler
3 * Copyright (c) 2006, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 */
19#include <linux/init.h>
20#include <asm/traps.h>
21
22static int cp6_trap(struct pt_regs *regs, unsigned int instr)
23{
24 u32 temp;
25
26 /* enable cp6 access */
27 asm volatile (
28 "mrc p15, 0, %0, c15, c1, 0\n\t"
29 "orr %0, %0, #(1 << 6)\n\t"
30 "mcr p15, 0, %0, c15, c1, 0\n\t"
31 : "=r"(temp));
32
33 return 0;
34}
35
36/* permit kernel space cp6 access
37 * deny user space cp6 access
38 */
39static struct undef_hook cp6_hook = {
40 .instr_mask = 0x0f000ff0,
41 .instr_val = 0x0e000610,
42 .cpsr_mask = MODE_MASK,
43 .cpsr_val = SVC_MODE,
44 .fn = cp6_trap,
45};
46
47void __init iop_init_cp6_handler(void)
48{
49 register_undef_hook(&cp6_hook);
50}
diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c
new file mode 100644
index 000000000000..f7eccecf2e47
--- /dev/null
+++ b/arch/arm/plat-iop/io.c
@@ -0,0 +1,58 @@
1/*
2 * iop3xx custom ioremap implementation
3 * Copyright (c) 2006, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 */
19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <asm/hardware.h>
22#include <asm/io.h>
23
24void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
25 unsigned long flags)
26{
27 void __iomem * retval;
28
29 switch (cookie) {
30 case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA:
31 retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie);
32 break;
33 case IOP3XX_PERIPHERAL_PHYS_BASE ... IOP3XX_PERIPHERAL_UPPER_PA:
34 retval = (void *) IOP3XX_PMMR_PHYS_TO_VIRT(cookie);
35 break;
36 default:
37 retval = __ioremap(cookie, size, flags);
38 }
39
40 return retval;
41}
42EXPORT_SYMBOL(__iop3xx_ioremap);
43
44void __iop3xx_iounmap(void __iomem *addr)
45{
46 extern void __iounmap(volatile void __iomem *addr);
47
48 switch ((u32) addr) {
49 case IOP3XX_PCI_LOWER_IO_VA ... IOP3XX_PCI_UPPER_IO_VA:
50 case IOP3XX_PERIPHERAL_VIRT_BASE ... IOP3XX_PERIPHERAL_UPPER_VA:
51 goto skip;
52 }
53 __iounmap(addr);
54
55skip:
56 return;
57}
58EXPORT_SYMBOL(__iop3xx_iounmap);
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c
index e647812654f2..b5f6ec35aafb 100644
--- a/arch/arm/plat-iop/pci.c
+++ b/arch/arm/plat-iop/pci.c
@@ -196,8 +196,8 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys)
196 if (!res) 196 if (!res)
197 panic("PCI: unable to alloc resources"); 197 panic("PCI: unable to alloc resources");
198 198
199 res[0].start = IOP3XX_PCI_LOWER_IO_VA; 199 res[0].start = IOP3XX_PCI_LOWER_IO_PA;
200 res[0].end = IOP3XX_PCI_LOWER_IO_VA + IOP3XX_PCI_IO_WINDOW_SIZE - 1; 200 res[0].end = IOP3XX_PCI_LOWER_IO_PA + IOP3XX_PCI_IO_WINDOW_SIZE - 1;
201 res[0].name = "IOP3XX PCI I/O Space"; 201 res[0].name = "IOP3XX PCI I/O Space";
202 res[0].flags = IORESOURCE_IO; 202 res[0].flags = IORESOURCE_IO;
203 request_resource(&ioport_resource, &res[0]); 203 request_resource(&ioport_resource, &res[0]);
@@ -209,7 +209,7 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys)
209 request_resource(&iomem_resource, &res[1]); 209 request_resource(&iomem_resource, &res[1]);
210 210
211 sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA; 211 sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA;
212 sys->io_offset = IOP3XX_PCI_LOWER_IO_VA - IOP3XX_PCI_LOWER_IO_BA; 212 sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - IOP3XX_PCI_LOWER_IO_BA;
213 213
214 sys->resource[0] = &res[0]; 214 sys->resource[0] = &res[0];
215 sys->resource[1] = &res[1]; 215 sys->resource[1] = &res[1];
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index f530abdaa7a1..16300adfb4de 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -24,39 +24,45 @@
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27 27#include <asm/arch/time.h>
28#ifdef CONFIG_ARCH_IOP32X
29#define IRQ_IOP3XX_TIMER0 IRQ_IOP32X_TIMER0
30#else
31#ifdef CONFIG_ARCH_IOP33X
32#define IRQ_IOP3XX_TIMER0 IRQ_IOP33X_TIMER0
33#endif
34#endif
35 28
36static unsigned long ticks_per_jiffy; 29static unsigned long ticks_per_jiffy;
37static unsigned long ticks_per_usec; 30static unsigned long ticks_per_usec;
38static unsigned long next_jiffy_time; 31static unsigned long next_jiffy_time;
39 32
40unsigned long iop3xx_gettimeoffset(void) 33unsigned long iop_gettimeoffset(void)
41{ 34{
42 unsigned long offset; 35 unsigned long offset, temp1, temp2;
43 36
44 offset = next_jiffy_time - *IOP3XX_TU_TCR1; 37 /* enable cp6, if necessary, to avoid taking the overhead of an
38 * undefined instruction trap
39 */
40 asm volatile (
41 "mrc p15, 0, %0, c15, c1, 0\n\t"
42 "ands %1, %0, #(1 << 6)\n\t"
43 "orreq %0, %0, #(1 << 6)\n\t"
44 "mcreq p15, 0, %0, c15, c1, 0\n\t"
45#ifdef CONFIG_XSCALE
46 "mrceq p15, 0, %0, c15, c1, 0\n\t"
47 "moveq %0, %0\n\t"
48 "subeq pc, pc, #4\n\t"
49#endif
50 : "=r"(temp1), "=r"(temp2) : : "cc");
51
52 offset = next_jiffy_time - read_tcr1();
45 53
46 return offset / ticks_per_usec; 54 return offset / ticks_per_usec;
47} 55}
48 56
49static irqreturn_t 57static irqreturn_t
50iop3xx_timer_interrupt(int irq, void *dev_id) 58iop_timer_interrupt(int irq, void *dev_id)
51{ 59{
52 write_seqlock(&xtime_lock); 60 write_seqlock(&xtime_lock);
53 61
54 iop3xx_cp6_enable(); 62 write_tisr(1);
55 asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (1));
56 iop3xx_cp6_disable();
57 63
58 while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) 64 while ((signed long)(next_jiffy_time - read_tcr1())
59 >= ticks_per_jiffy) { 65 >= ticks_per_jiffy) {
60 timer_tick(); 66 timer_tick();
61 next_jiffy_time -= ticks_per_jiffy; 67 next_jiffy_time -= ticks_per_jiffy;
62 } 68 }
@@ -66,13 +72,13 @@ iop3xx_timer_interrupt(int irq, void *dev_id)
66 return IRQ_HANDLED; 72 return IRQ_HANDLED;
67} 73}
68 74
69static struct irqaction iop3xx_timer_irq = { 75static struct irqaction iop_timer_irq = {
70 .name = "IOP3XX Timer Tick", 76 .name = "IOP Timer Tick",
71 .handler = iop3xx_timer_interrupt, 77 .handler = iop_timer_interrupt,
72 .flags = IRQF_DISABLED | IRQF_TIMER, 78 .flags = IRQF_DISABLED | IRQF_TIMER,
73}; 79};
74 80
75void __init iop3xx_init_time(unsigned long tick_rate) 81void __init iop_init_time(unsigned long tick_rate)
76{ 82{
77 u32 timer_ctl; 83 u32 timer_ctl;
78 84
@@ -80,19 +86,17 @@ void __init iop3xx_init_time(unsigned long tick_rate)
80 ticks_per_usec = tick_rate / 1000000; 86 ticks_per_usec = tick_rate / 1000000;
81 next_jiffy_time = 0xffffffff; 87 next_jiffy_time = 0xffffffff;
82 88
83 timer_ctl = IOP3XX_TMR_EN | IOP3XX_TMR_PRIVILEGED | 89 timer_ctl = IOP_TMR_EN | IOP_TMR_PRIVILEGED |
84 IOP3XX_TMR_RELOAD | IOP3XX_TMR_RATIO_1_1; 90 IOP_TMR_RELOAD | IOP_TMR_RATIO_1_1;
85 91
86 /* 92 /*
87 * We use timer 0 for our timer interrupt, and timer 1 as 93 * We use timer 0 for our timer interrupt, and timer 1 as
88 * monotonic counter for tracking missed jiffies. 94 * monotonic counter for tracking missed jiffies.
89 */ 95 */
90 iop3xx_cp6_enable(); 96 write_trr0(ticks_per_jiffy - 1);
91 asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (ticks_per_jiffy - 1)); 97 write_tmr0(timer_ctl);
92 asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); 98 write_trr1(0xffffffff);
93 asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (0xffffffff)); 99 write_tmr1(timer_ctl);
94 asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); 100
95 iop3xx_cp6_disable(); 101 setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq);
96
97 setup_irq(IRQ_IOP3XX_TIMER0, &iop3xx_timer_irq);
98} 102}
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
new file mode 100644
index 000000000000..860869528f4c
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -0,0 +1,100 @@
1# arch/arm/plat-s3c24xx/Kconfig
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7config PLAT_S3C24XX
8 bool
9 depends on ARCH_S3C2410
10 default y if ARCH_S3C2410
11 select NO_IOPORT
12 help
13 Base platform code for any Samsung S3C device
14
15if PLAT_S3C24XX
16
17config CPU_S3C244X
18 bool
19 depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442)
20 help
21 Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems.
22
23config PM_SIMTEC
24 bool
25 help
26 Common power management code for systems that are
27 compatible with the Simtec style of power management
28
29config S3C2410_BOOT_WATCHDOG
30 bool "S3C2410 Initialisation watchdog"
31 depends on ARCH_S3C2410 && S3C2410_WATCHDOG
32 help
33 Say y to enable the watchdog during the kernel decompression
34 stage. If the kernel fails to uncompress, then the watchdog
35 will trigger a reset and the system should restart.
36
37config S3C2410_BOOT_ERROR_RESET
38 bool "S3C2410 Reboot on decompression error"
39 depends on ARCH_S3C2410
40 help
41 Say y here to use the watchdog to reset the system if the
42 kernel decompressor detects an error during decompression.
43
44config S3C2410_PM_DEBUG
45 bool "S3C2410 PM Suspend debug"
46 depends on ARCH_S3C2410 && PM
47 help
48 Say Y here if you want verbose debugging from the PM Suspend and
49 Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
50 for more information.
51
52config S3C2410_PM_CHECK
53 bool "S3C2410 PM Suspend Memory CRC"
54 depends on ARCH_S3C2410 && PM && CRC32
55 help
56 Enable the PM code's memory area checksum over sleep. This option
57 will generate CRCs of all blocks of memory, and store them before
58 going to sleep. The blocks are then checked on resume for any
59 errors.
60
61config S3C2410_PM_CHECK_CHUNKSIZE
62 int "S3C2410 PM Suspend CRC Chunksize (KiB)"
63 depends on ARCH_S3C2410 && PM && S3C2410_PM_CHECK
64 default 64
65 help
66 Set the chunksize in Kilobytes of the CRC for checking memory
67 corruption over suspend and resume. A smaller value will mean that
68 the CRC data block will take more memory, but wil identify any
69 faults with better precision.
70
71config S3C2410_LOWLEVEL_UART_PORT
72 int "S3C2410 UART to use for low-level messages"
73 default 0
74 help
75 Choice of which UART port to use for the low-level messages,
76 such as the `Uncompressing...` at start time. The value of
77 this configuration should be between zero and two. The port
78 must have been initialised by the boot-loader before use.
79
80config S3C2410_DMA
81 bool "S3C2410 DMA support"
82 depends on ARCH_S3C2410
83 help
84 S3C2410 DMA support. This is needed for drivers like sound which
85 use the S3C2410's DMA system to move data to and from the
86 peripheral blocks.
87
88config S3C2410_DMA_DEBUG
89 bool "S3C2410 DMA support debug"
90 depends on ARCH_S3C2410 && S3C2410_DMA
91 help
92 Enable debugging output for the DMA code. This option sends info
93 to the kernel log, at priority KERN_DEBUG.
94
95config MACH_SMDK
96 bool
97 help
98 Common machine code for SMDK2410 and SMDK2440
99
100endif
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
new file mode 100644
index 000000000000..8e5ccaa1f03c
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -0,0 +1,30 @@
1# arch/arm/plat-s3c24xx/Makefile
2#
3# Copyright 2007 Simtec Electronics
4#
5# Licensed under GPLv2
6
7obj-y :=
8obj-m :=
9obj-n :=
10obj- :=
11
12
13# Core files
14
15obj-y += cpu.o
16obj-y += irq.o
17obj-y += devs.o
18obj-y += gpio.o
19obj-y += time.o
20obj-y += clock.o
21
22# Architecture dependant builds
23
24obj-$(CONFIG_CPU_S3C244X) += s3c244x.o
25obj-$(CONFIG_CPU_S3C244X) += s3c244x-irq.o
26obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
27obj-$(CONFIG_PM) += pm.o
28obj-$(CONFIG_PM) += sleep.o
29obj-$(CONFIG_S3C2410_DMA) += dma.o
30obj-$(CONFIG_MACH_SMDK) += common-smdk.o
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c
new file mode 100644
index 000000000000..d3dc03a7383a
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/clock.c
@@ -0,0 +1,449 @@
1/* linux/arch/arm/plat-s3c24xx/clock.c
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C24XX Core clock control support
7 *
8 * Based on, and code from linux/arch/arm/mach-versatile/clock.c
9 **
10 ** Copyright (C) 2004 ARM Limited.
11 ** Written by Deep Blue Solutions Limited.
12 *
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27*/
28
29#include <linux/init.h>
30#include <linux/module.h>
31#include <linux/kernel.h>
32#include <linux/list.h>
33#include <linux/errno.h>
34#include <linux/err.h>
35#include <linux/platform_device.h>
36#include <linux/sysdev.h>
37#include <linux/interrupt.h>
38#include <linux/ioport.h>
39#include <linux/clk.h>
40#include <linux/mutex.h>
41#include <linux/delay.h>
42
43#include <asm/hardware.h>
44#include <asm/irq.h>
45#include <asm/io.h>
46
47#include <asm/arch/regs-clock.h>
48#include <asm/arch/regs-gpio.h>
49
50#include <asm/plat-s3c24xx/clock.h>
51#include <asm/plat-s3c24xx/cpu.h>
52
53/* clock information */
54
55static LIST_HEAD(clocks);
56
57DEFINE_MUTEX(clocks_mutex);
58
59/* enable and disable calls for use with the clk struct */
60
61static int clk_null_enable(struct clk *clk, int enable)
62{
63 return 0;
64}
65
66/* Clock API calls */
67
68struct clk *clk_get(struct device *dev, const char *id)
69{
70 struct clk *p;
71 struct clk *clk = ERR_PTR(-ENOENT);
72 int idno;
73
74 if (dev == NULL || dev->bus != &platform_bus_type)
75 idno = -1;
76 else
77 idno = to_platform_device(dev)->id;
78
79 mutex_lock(&clocks_mutex);
80
81 list_for_each_entry(p, &clocks, list) {
82 if (p->id == idno &&
83 strcmp(id, p->name) == 0 &&
84 try_module_get(p->owner)) {
85 clk = p;
86 break;
87 }
88 }
89
90 /* check for the case where a device was supplied, but the
91 * clock that was being searched for is not device specific */
92
93 if (IS_ERR(clk)) {
94 list_for_each_entry(p, &clocks, list) {
95 if (p->id == -1 && strcmp(id, p->name) == 0 &&
96 try_module_get(p->owner)) {
97 clk = p;
98 break;
99 }
100 }
101 }
102
103 mutex_unlock(&clocks_mutex);
104 return clk;
105}
106
107void clk_put(struct clk *clk)
108{
109 module_put(clk->owner);
110}
111
112int clk_enable(struct clk *clk)
113{
114 if (IS_ERR(clk) || clk == NULL)
115 return -EINVAL;
116
117 clk_enable(clk->parent);
118
119 mutex_lock(&clocks_mutex);
120
121 if ((clk->usage++) == 0)
122 (clk->enable)(clk, 1);
123
124 mutex_unlock(&clocks_mutex);
125 return 0;
126}
127
128void clk_disable(struct clk *clk)
129{
130 if (IS_ERR(clk) || clk == NULL)
131 return;
132
133 mutex_lock(&clocks_mutex);
134
135 if ((--clk->usage) == 0)
136 (clk->enable)(clk, 0);
137
138 mutex_unlock(&clocks_mutex);
139 clk_disable(clk->parent);
140}
141
142
143unsigned long clk_get_rate(struct clk *clk)
144{
145 if (IS_ERR(clk))
146 return 0;
147
148 if (clk->rate != 0)
149 return clk->rate;
150
151 if (clk->get_rate != NULL)
152 return (clk->get_rate)(clk);
153
154 if (clk->parent != NULL)
155 return clk_get_rate(clk->parent);
156
157 return clk->rate;
158}
159
160long clk_round_rate(struct clk *clk, unsigned long rate)
161{
162 if (!IS_ERR(clk) && clk->round_rate)
163 return (clk->round_rate)(clk, rate);
164
165 return rate;
166}
167
168int clk_set_rate(struct clk *clk, unsigned long rate)
169{
170 int ret;
171
172 if (IS_ERR(clk))
173 return -EINVAL;
174
175 mutex_lock(&clocks_mutex);
176 ret = (clk->set_rate)(clk, rate);
177 mutex_unlock(&clocks_mutex);
178
179 return ret;
180}
181
182struct clk *clk_get_parent(struct clk *clk)
183{
184 return clk->parent;
185}
186
187int clk_set_parent(struct clk *clk, struct clk *parent)
188{
189 int ret = 0;
190
191 if (IS_ERR(clk))
192 return -EINVAL;
193
194 mutex_lock(&clocks_mutex);
195
196 if (clk->set_parent)
197 ret = (clk->set_parent)(clk, parent);
198
199 mutex_unlock(&clocks_mutex);
200
201 return ret;
202}
203
204EXPORT_SYMBOL(clk_get);
205EXPORT_SYMBOL(clk_put);
206EXPORT_SYMBOL(clk_enable);
207EXPORT_SYMBOL(clk_disable);
208EXPORT_SYMBOL(clk_get_rate);
209EXPORT_SYMBOL(clk_round_rate);
210EXPORT_SYMBOL(clk_set_rate);
211EXPORT_SYMBOL(clk_get_parent);
212EXPORT_SYMBOL(clk_set_parent);
213
214/* base clocks */
215
216struct clk clk_xtal = {
217 .name = "xtal",
218 .id = -1,
219 .rate = 0,
220 .parent = NULL,
221 .ctrlbit = 0,
222};
223
224struct clk clk_mpll = {
225 .name = "mpll",
226 .id = -1,
227};
228
229struct clk clk_upll = {
230 .name = "upll",
231 .id = -1,
232 .parent = NULL,
233 .ctrlbit = 0,
234};
235
236struct clk clk_f = {
237 .name = "fclk",
238 .id = -1,
239 .rate = 0,
240 .parent = &clk_mpll,
241 .ctrlbit = 0,
242};
243
244struct clk clk_h = {
245 .name = "hclk",
246 .id = -1,
247 .rate = 0,
248 .parent = NULL,
249 .ctrlbit = 0,
250};
251
252struct clk clk_p = {
253 .name = "pclk",
254 .id = -1,
255 .rate = 0,
256 .parent = NULL,
257 .ctrlbit = 0,
258};
259
260struct clk clk_usb_bus = {
261 .name = "usb-bus",
262 .id = -1,
263 .rate = 0,
264 .parent = &clk_upll,
265};
266
267/* clocks that could be registered by external code */
268
269static int s3c24xx_dclk_enable(struct clk *clk, int enable)
270{
271 unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON);
272
273 if (enable)
274 dclkcon |= clk->ctrlbit;
275 else
276 dclkcon &= ~clk->ctrlbit;
277
278 __raw_writel(dclkcon, S3C24XX_DCLKCON);
279
280 return 0;
281}
282
283static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent)
284{
285 unsigned long dclkcon;
286 unsigned int uclk;
287
288 if (parent == &clk_upll)
289 uclk = 1;
290 else if (parent == &clk_p)
291 uclk = 0;
292 else
293 return -EINVAL;
294
295 clk->parent = parent;
296
297 dclkcon = __raw_readl(S3C24XX_DCLKCON);
298
299 if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) {
300 if (uclk)
301 dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK;
302 else
303 dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK;
304 } else {
305 if (uclk)
306 dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK;
307 else
308 dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK;
309 }
310
311 __raw_writel(dclkcon, S3C24XX_DCLKCON);
312
313 return 0;
314}
315
316
317static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
318{
319 unsigned long mask;
320 unsigned long source;
321
322 /* calculate the MISCCR setting for the clock */
323
324 if (parent == &clk_xtal)
325 source = S3C2410_MISCCR_CLK0_MPLL;
326 else if (parent == &clk_upll)
327 source = S3C2410_MISCCR_CLK0_UPLL;
328 else if (parent == &clk_f)
329 source = S3C2410_MISCCR_CLK0_FCLK;
330 else if (parent == &clk_h)
331 source = S3C2410_MISCCR_CLK0_HCLK;
332 else if (parent == &clk_p)
333 source = S3C2410_MISCCR_CLK0_PCLK;
334 else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0)
335 source = S3C2410_MISCCR_CLK0_DCLK0;
336 else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1)
337 source = S3C2410_MISCCR_CLK0_DCLK0;
338 else
339 return -EINVAL;
340
341 clk->parent = parent;
342
343 if (clk == &s3c24xx_dclk0)
344 mask = S3C2410_MISCCR_CLK0_MASK;
345 else {
346 source <<= 4;
347 mask = S3C2410_MISCCR_CLK1_MASK;
348 }
349
350 s3c2410_modify_misccr(mask, source);
351 return 0;
352}
353
354/* external clock definitions */
355
356struct clk s3c24xx_dclk0 = {
357 .name = "dclk0",
358 .id = -1,
359 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
360 .enable = s3c24xx_dclk_enable,
361 .set_parent = s3c24xx_dclk_setparent,
362};
363
364struct clk s3c24xx_dclk1 = {
365 .name = "dclk1",
366 .id = -1,
367 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
368 .enable = s3c24xx_dclk_enable,
369 .set_parent = s3c24xx_dclk_setparent,
370};
371
372struct clk s3c24xx_clkout0 = {
373 .name = "clkout0",
374 .id = -1,
375 .set_parent = s3c24xx_clkout_setparent,
376};
377
378struct clk s3c24xx_clkout1 = {
379 .name = "clkout1",
380 .id = -1,
381 .set_parent = s3c24xx_clkout_setparent,
382};
383
384struct clk s3c24xx_uclk = {
385 .name = "uclk",
386 .id = -1,
387};
388
389/* initialise the clock system */
390
391int s3c24xx_register_clock(struct clk *clk)
392{
393 clk->owner = THIS_MODULE;
394
395 if (clk->enable == NULL)
396 clk->enable = clk_null_enable;
397
398 /* add to the list of available clocks */
399
400 mutex_lock(&clocks_mutex);
401 list_add(&clk->list, &clocks);
402 mutex_unlock(&clocks_mutex);
403
404 return 0;
405}
406
407/* initalise all the clocks */
408
409int __init s3c24xx_setup_clocks(unsigned long xtal,
410 unsigned long fclk,
411 unsigned long hclk,
412 unsigned long pclk)
413{
414 printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n");
415
416 /* initialise the main system clocks */
417
418 clk_xtal.rate = xtal;
419 clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal);
420
421 clk_mpll.rate = fclk;
422 clk_h.rate = hclk;
423 clk_p.rate = pclk;
424 clk_f.rate = fclk;
425
426 /* assume uart clocks are correctly setup */
427
428 /* register our clocks */
429
430 if (s3c24xx_register_clock(&clk_xtal) < 0)
431 printk(KERN_ERR "failed to register master xtal\n");
432
433 if (s3c24xx_register_clock(&clk_mpll) < 0)
434 printk(KERN_ERR "failed to register mpll clock\n");
435
436 if (s3c24xx_register_clock(&clk_upll) < 0)
437 printk(KERN_ERR "failed to register upll clock\n");
438
439 if (s3c24xx_register_clock(&clk_f) < 0)
440 printk(KERN_ERR "failed to register cpu fclk\n");
441
442 if (s3c24xx_register_clock(&clk_h) < 0)
443 printk(KERN_ERR "failed to register cpu hclk\n");
444
445 if (s3c24xx_register_clock(&clk_p) < 0)
446 printk(KERN_ERR "failed to register cpu pclk\n");
447
448 return 0;
449}
diff --git a/arch/arm/mach-s3c2410/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c
index a40eaa656177..908efa7d745f 100644
--- a/arch/arm/mach-s3c2410/common-smdk.c
+++ b/arch/arm/plat-s3c24xx/common-smdk.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/common-smdk.c 1/* linux/arch/arm/plat-s3c24xx/common-smdk.c
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics 3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -38,9 +38,9 @@
38 38
39#include <asm/arch/nand.h> 39#include <asm/arch/nand.h>
40 40
41#include "common-smdk.h" 41#include <asm/plat-s3c24xx/common-smdk.h>
42#include "devs.h" 42#include <asm/plat-s3c24xx/devs.h>
43#include "pm.h" 43#include <asm/plat-s3c24xx/pm.h>
44 44
45/* LED devices */ 45/* LED devices */
46 46
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index ae1f5bb63f7a..6a2d1070e5a0 100644
--- a/arch/arm/mach-s3c2410/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/cpu.c 1/* linux/arch/arm/plat-s3c24xx/cpu.c
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
@@ -40,15 +40,16 @@
40#include <asm/arch/regs-gpio.h> 40#include <asm/arch/regs-gpio.h>
41#include <asm/arch/regs-serial.h> 41#include <asm/arch/regs-serial.h>
42 42
43#include "cpu.h" 43#include <asm/plat-s3c24xx/cpu.h>
44#include "devs.h" 44#include <asm/plat-s3c24xx/devs.h>
45#include "clock.h" 45#include <asm/plat-s3c24xx/clock.h>
46#include "s3c2400.h" 46#include <asm/plat-s3c24xx/s3c2400.h>
47#include "s3c2410.h" 47#include <asm/plat-s3c24xx/s3c2410.h>
48#include "s3c2412.h" 48#include <asm/plat-s3c24xx/s3c2412.h>
49#include "s3c244x.h" 49#include "s3c244x.h"
50#include "s3c2440.h" 50#include <asm/plat-s3c24xx/s3c2440.h>
51#include "s3c2442.h" 51#include <asm/plat-s3c24xx/s3c2442.h>
52#include <asm/plat-s3c24xx/s3c2443.h>
52 53
53struct cpu_table { 54struct cpu_table {
54 unsigned long idcode; 55 unsigned long idcode;
@@ -67,6 +68,7 @@ static const char name_s3c2410[] = "S3C2410";
67static const char name_s3c2412[] = "S3C2412"; 68static const char name_s3c2412[] = "S3C2412";
68static const char name_s3c2440[] = "S3C2440"; 69static const char name_s3c2440[] = "S3C2440";
69static const char name_s3c2442[] = "S3C2442"; 70static const char name_s3c2442[] = "S3C2442";
71static const char name_s3c2443[] = "S3C2443";
70static const char name_s3c2410a[] = "S3C2410A"; 72static const char name_s3c2410a[] = "S3C2410A";
71static const char name_s3c2440a[] = "S3C2440A"; 73static const char name_s3c2440a[] = "S3C2440A";
72 74
@@ -135,6 +137,15 @@ static struct cpu_table cpu_ids[] __initdata = {
135 .name = name_s3c2412, 137 .name = name_s3c2412,
136 }, 138 },
137 { 139 {
140 .idcode = 0x32443001,
141 .idmask = 0xffffffff,
142 .map_io = s3c2443_map_io,
143 .init_clocks = s3c2443_init_clocks,
144 .init_uarts = s3c2443_init_uarts,
145 .init = s3c2443_init,
146 .name = name_s3c2443,
147 },
148 {
138 .idcode = 0x0, /* S3C2400 doesn't have an idcode */ 149 .idcode = 0x0, /* S3C2400 doesn't have an idcode */
139 .idmask = 0xffffffff, 150 .idmask = 0xffffffff,
140 .map_io = s3c2400_map_io, 151 .map_io = s3c2400_map_io,
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/plat-s3c24xx/devs.c
index faccde2092d2..0fe53b39cb2f 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/devs.c 1/* linux/arch/arm/plat-s3c24xx/devs.c
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -29,9 +29,10 @@
29#include <asm/irq.h> 29#include <asm/irq.h>
30 30
31#include <asm/arch/regs-serial.h> 31#include <asm/arch/regs-serial.h>
32#include <asm/arch/udc.h>
32 33
33#include "devs.h" 34#include <asm/plat-s3c24xx/devs.h>
34#include "cpu.h" 35#include <asm/plat-s3c24xx/cpu.h>
35 36
36/* Serial port registrations */ 37/* Serial port registrations */
37 38
@@ -230,6 +231,20 @@ struct platform_device s3c_device_usbgadget = {
230 231
231EXPORT_SYMBOL(s3c_device_usbgadget); 232EXPORT_SYMBOL(s3c_device_usbgadget);
232 233
234void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
235{
236 struct s3c2410_udc_mach_info *npd;
237
238 npd = kmalloc(sizeof(*npd), GFP_KERNEL);
239 if (npd) {
240 memcpy(npd, pd, sizeof(*npd));
241 s3c_device_usbgadget.dev.platform_data = npd;
242 } else {
243 printk(KERN_ERR "no memory for udc platform data\n");
244 }
245}
246
247
233/* Watchdog */ 248/* Watchdog */
234 249
235static struct resource s3c_wdt_resource[] = { 250static struct resource s3c_wdt_resource[] = {
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
new file mode 100644
index 000000000000..4540a806f522
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -0,0 +1,1499 @@
1/* linux/arch/arm/plat-s3c24xx/dma.c
2 *
3 * Copyright (c) 2003-2005,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 DMA core
7 *
8 * http://armlinux.simtec.co.uk/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15
16#ifdef CONFIG_S3C2410_DMA_DEBUG
17#define DEBUG
18#endif
19
20#include <linux/module.h>
21#include <linux/init.h>
22#include <linux/sched.h>
23#include <linux/spinlock.h>
24#include <linux/interrupt.h>
25#include <linux/sysdev.h>
26#include <linux/slab.h>
27#include <linux/errno.h>
28#include <linux/delay.h>
29
30#include <asm/system.h>
31#include <asm/irq.h>
32#include <asm/hardware.h>
33#include <asm/io.h>
34#include <asm/dma.h>
35
36#include <asm/mach/dma.h>
37#include <asm/arch/map.h>
38
39#include <asm/plat-s3c24xx/dma.h>
40
41/* io map for dma */
42static void __iomem *dma_base;
43static struct kmem_cache *dma_kmem;
44
45static int dma_channels;
46
47struct s3c24xx_dma_selection dma_sel;
48
49/* dma channel state information */
50struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
51
52/* debugging functions */
53
54#define BUF_MAGIC (0xcafebabe)
55
56#define dmawarn(fmt...) printk(KERN_DEBUG fmt)
57
58#define dma_regaddr(chan, reg) ((chan)->regs + (reg))
59
60#if 1
61#define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg))
62#else
63static inline void
64dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val)
65{
66 pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg);
67 writel(val, dma_regaddr(chan, reg));
68}
69#endif
70
71#define dma_rdreg(chan, reg) readl((chan)->regs + (reg))
72
73/* captured register state for debug */
74
75struct s3c2410_dma_regstate {
76 unsigned long dcsrc;
77 unsigned long disrc;
78 unsigned long dstat;
79 unsigned long dcon;
80 unsigned long dmsktrig;
81};
82
83#ifdef CONFIG_S3C2410_DMA_DEBUG
84
85/* dmadbg_showregs
86 *
87 * simple debug routine to print the current state of the dma registers
88*/
89
90static void
91dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs)
92{
93 regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC);
94 regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC);
95 regs->dstat = dma_rdreg(chan, S3C2410_DMA_DSTAT);
96 regs->dcon = dma_rdreg(chan, S3C2410_DMA_DCON);
97 regs->dmsktrig = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
98}
99
100static void
101dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan,
102 struct s3c2410_dma_regstate *regs)
103{
104 printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n",
105 chan->number, fname, line,
106 regs->dcsrc, regs->disrc, regs->dstat, regs->dmsktrig,
107 regs->dcon);
108}
109
110static void
111dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan)
112{
113 struct s3c2410_dma_regstate state;
114
115 dmadbg_capture(chan, &state);
116
117 printk(KERN_DEBUG "dma%d: %s:%d: ls=%d, cur=%p, %p %p\n",
118 chan->number, fname, line, chan->load_state,
119 chan->curr, chan->next, chan->end);
120
121 dmadbg_dumpregs(fname, line, chan, &state);
122}
123
124static void
125dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan)
126{
127 struct s3c2410_dma_regstate state;
128
129 dmadbg_capture(chan, &state);
130 dmadbg_dumpregs(fname, line, chan, &state);
131}
132
133#define dbg_showregs(chan) dmadbg_showregs(__FUNCTION__, __LINE__, (chan))
134#define dbg_showchan(chan) dmadbg_showchan(__FUNCTION__, __LINE__, (chan))
135#else
136#define dbg_showregs(chan) do { } while(0)
137#define dbg_showchan(chan) do { } while(0)
138#endif /* CONFIG_S3C2410_DMA_DEBUG */
139
140static struct s3c2410_dma_chan *dma_chan_map[DMACH_MAX];
141
142/* lookup_dma_channel
143 *
144 * change the dma channel number given into a real dma channel id
145*/
146
147static struct s3c2410_dma_chan *lookup_dma_channel(unsigned int channel)
148{
149 if (channel & DMACH_LOW_LEVEL)
150 return &s3c2410_chans[channel & ~DMACH_LOW_LEVEL];
151 else
152 return dma_chan_map[channel];
153}
154
155/* s3c2410_dma_stats_timeout
156 *
157 * Update DMA stats from timeout info
158*/
159
160static void
161s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val)
162{
163 if (stats == NULL)
164 return;
165
166 if (val > stats->timeout_longest)
167 stats->timeout_longest = val;
168 if (val < stats->timeout_shortest)
169 stats->timeout_shortest = val;
170
171 stats->timeout_avg += val;
172}
173
174/* s3c2410_dma_waitforload
175 *
176 * wait for the DMA engine to load a buffer, and update the state accordingly
177*/
178
179static int
180s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line)
181{
182 int timeout = chan->load_timeout;
183 int took;
184
185 if (chan->load_state != S3C2410_DMALOAD_1LOADED) {
186 printk(KERN_ERR "dma%d: s3c2410_dma_waitforload() called in loadstate %d from line %d\n", chan->number, chan->load_state, line);
187 return 0;
188 }
189
190 if (chan->stats != NULL)
191 chan->stats->loads++;
192
193 while (--timeout > 0) {
194 if ((dma_rdreg(chan, S3C2410_DMA_DSTAT) << (32-20)) != 0) {
195 took = chan->load_timeout - timeout;
196
197 s3c2410_dma_stats_timeout(chan->stats, took);
198
199 switch (chan->load_state) {
200 case S3C2410_DMALOAD_1LOADED:
201 chan->load_state = S3C2410_DMALOAD_1RUNNING;
202 break;
203
204 default:
205 printk(KERN_ERR "dma%d: unknown load_state in s3c2410_dma_waitforload() %d\n", chan->number, chan->load_state);
206 }
207
208 return 1;
209 }
210 }
211
212 if (chan->stats != NULL) {
213 chan->stats->timeout_failed++;
214 }
215
216 return 0;
217}
218
219
220
221/* s3c2410_dma_loadbuffer
222 *
223 * load a buffer, and update the channel state
224*/
225
226static inline int
227s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
228 struct s3c2410_dma_buf *buf)
229{
230 unsigned long reload;
231
232 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
233 buf, (unsigned long)buf->data, buf->size);
234
235 if (buf == NULL) {
236 dmawarn("buffer is NULL\n");
237 return -EINVAL;
238 }
239
240 /* check the state of the channel before we do anything */
241
242 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
243 dmawarn("load_state is S3C2410_DMALOAD_1LOADED\n");
244 }
245
246 if (chan->load_state == S3C2410_DMALOAD_1LOADED_1RUNNING) {
247 dmawarn("state is S3C2410_DMALOAD_1LOADED_1RUNNING\n");
248 }
249
250 /* it would seem sensible if we are the last buffer to not bother
251 * with the auto-reload bit, so that the DMA engine will not try
252 * and load another transfer after this one has finished...
253 */
254 if (chan->load_state == S3C2410_DMALOAD_NONE) {
255 pr_debug("load_state is none, checking for noreload (next=%p)\n",
256 buf->next);
257 reload = (buf->next == NULL) ? S3C2410_DCON_NORELOAD : 0;
258 } else {
259 //pr_debug("load_state is %d => autoreload\n", chan->load_state);
260 reload = S3C2410_DCON_AUTORELOAD;
261 }
262
263 if ((buf->data & 0xf0000000) != 0x30000000) {
264 dmawarn("dmaload: buffer is %p\n", (void *)buf->data);
265 }
266
267 writel(buf->data, chan->addr_reg);
268
269 dma_wrreg(chan, S3C2410_DMA_DCON,
270 chan->dcon | reload | (buf->size/chan->xfer_unit));
271
272 chan->next = buf->next;
273
274 /* update the state of the channel */
275
276 switch (chan->load_state) {
277 case S3C2410_DMALOAD_NONE:
278 chan->load_state = S3C2410_DMALOAD_1LOADED;
279 break;
280
281 case S3C2410_DMALOAD_1RUNNING:
282 chan->load_state = S3C2410_DMALOAD_1LOADED_1RUNNING;
283 break;
284
285 default:
286 dmawarn("dmaload: unknown state %d in loadbuffer\n",
287 chan->load_state);
288 break;
289 }
290
291 return 0;
292}
293
294/* s3c2410_dma_call_op
295 *
296 * small routine to call the op routine with the given op if it has been
297 * registered
298*/
299
300static void
301s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op)
302{
303 if (chan->op_fn != NULL) {
304 (chan->op_fn)(chan, op);
305 }
306}
307
308/* s3c2410_dma_buffdone
309 *
310 * small wrapper to check if callback routine needs to be called, and
311 * if so, call it
312*/
313
314static inline void
315s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf,
316 enum s3c2410_dma_buffresult result)
317{
318#if 0
319 pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n",
320 chan->callback_fn, buf, buf->id, buf->size, result);
321#endif
322
323 if (chan->callback_fn != NULL) {
324 (chan->callback_fn)(chan, buf->id, buf->size, result);
325 }
326}
327
328/* s3c2410_dma_start
329 *
330 * start a dma channel going
331*/
332
333static int s3c2410_dma_start(struct s3c2410_dma_chan *chan)
334{
335 unsigned long tmp;
336 unsigned long flags;
337
338 pr_debug("s3c2410_start_dma: channel=%d\n", chan->number);
339
340 local_irq_save(flags);
341
342 if (chan->state == S3C2410_DMA_RUNNING) {
343 pr_debug("s3c2410_start_dma: already running (%d)\n", chan->state);
344 local_irq_restore(flags);
345 return 0;
346 }
347
348 chan->state = S3C2410_DMA_RUNNING;
349
350 /* check wether there is anything to load, and if not, see
351 * if we can find anything to load
352 */
353
354 if (chan->load_state == S3C2410_DMALOAD_NONE) {
355 if (chan->next == NULL) {
356 printk(KERN_ERR "dma%d: channel has nothing loaded\n",
357 chan->number);
358 chan->state = S3C2410_DMA_IDLE;
359 local_irq_restore(flags);
360 return -EINVAL;
361 }
362
363 s3c2410_dma_loadbuffer(chan, chan->next);
364 }
365
366 dbg_showchan(chan);
367
368 /* enable the channel */
369
370 if (!chan->irq_enabled) {
371 enable_irq(chan->irq);
372 chan->irq_enabled = 1;
373 }
374
375 /* start the channel going */
376
377 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
378 tmp &= ~S3C2410_DMASKTRIG_STOP;
379 tmp |= S3C2410_DMASKTRIG_ON;
380 dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp);
381
382 pr_debug("dma%d: %08lx to DMASKTRIG\n", chan->number, tmp);
383
384#if 0
385 /* the dma buffer loads should take care of clearing the AUTO
386 * reloading feature */
387 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
388 tmp &= ~S3C2410_DCON_NORELOAD;
389 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
390#endif
391
392 s3c2410_dma_call_op(chan, S3C2410_DMAOP_START);
393
394 dbg_showchan(chan);
395
396 /* if we've only loaded one buffer onto the channel, then chec
397 * to see if we have another, and if so, try and load it so when
398 * the first buffer is finished, the new one will be loaded onto
399 * the channel */
400
401 if (chan->next != NULL) {
402 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
403
404 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
405 pr_debug("%s: buff not yet loaded, no more todo\n",
406 __FUNCTION__);
407 } else {
408 chan->load_state = S3C2410_DMALOAD_1RUNNING;
409 s3c2410_dma_loadbuffer(chan, chan->next);
410 }
411
412 } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) {
413 s3c2410_dma_loadbuffer(chan, chan->next);
414 }
415 }
416
417
418 local_irq_restore(flags);
419
420 return 0;
421}
422
423/* s3c2410_dma_canload
424 *
425 * work out if we can queue another buffer into the DMA engine
426*/
427
428static int
429s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
430{
431 if (chan->load_state == S3C2410_DMALOAD_NONE ||
432 chan->load_state == S3C2410_DMALOAD_1RUNNING)
433 return 1;
434
435 return 0;
436}
437
438/* s3c2410_dma_enqueue
439 *
440 * queue an given buffer for dma transfer.
441 *
442 * id the device driver's id information for this buffer
443 * data the physical address of the buffer data
444 * size the size of the buffer in bytes
445 *
446 * If the channel is not running, then the flag S3C2410_DMAF_AUTOSTART
447 * is checked, and if set, the channel is started. If this flag isn't set,
448 * then an error will be returned.
449 *
450 * It is possible to queue more than one DMA buffer onto a channel at
451 * once, and the code will deal with the re-loading of the next buffer
452 * when necessary.
453*/
454
455int s3c2410_dma_enqueue(unsigned int channel, void *id,
456 dma_addr_t data, int size)
457{
458 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
459 struct s3c2410_dma_buf *buf;
460 unsigned long flags;
461
462 if (chan == NULL)
463 return -EINVAL;
464
465 pr_debug("%s: id=%p, data=%08x, size=%d\n",
466 __FUNCTION__, id, (unsigned int)data, size);
467
468 buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC);
469 if (buf == NULL) {
470 pr_debug("%s: out of memory (%ld alloc)\n",
471 __FUNCTION__, (long)sizeof(*buf));
472 return -ENOMEM;
473 }
474
475 //pr_debug("%s: new buffer %p\n", __FUNCTION__, buf);
476 //dbg_showchan(chan);
477
478 buf->next = NULL;
479 buf->data = buf->ptr = data;
480 buf->size = size;
481 buf->id = id;
482 buf->magic = BUF_MAGIC;
483
484 local_irq_save(flags);
485
486 if (chan->curr == NULL) {
487 /* we've got nothing loaded... */
488 pr_debug("%s: buffer %p queued onto empty channel\n",
489 __FUNCTION__, buf);
490
491 chan->curr = buf;
492 chan->end = buf;
493 chan->next = NULL;
494 } else {
495 pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n",
496 chan->number, __FUNCTION__, buf);
497
498 if (chan->end == NULL)
499 pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n",
500 chan->number, __FUNCTION__, chan);
501
502 chan->end->next = buf;
503 chan->end = buf;
504 }
505
506 /* if necessary, update the next buffer field */
507 if (chan->next == NULL)
508 chan->next = buf;
509
510 /* check to see if we can load a buffer */
511 if (chan->state == S3C2410_DMA_RUNNING) {
512 if (chan->load_state == S3C2410_DMALOAD_1LOADED && 1) {
513 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
514 printk(KERN_ERR "dma%d: loadbuffer:"
515 "timeout loading buffer\n",
516 chan->number);
517 dbg_showchan(chan);
518 local_irq_restore(flags);
519 return -EINVAL;
520 }
521 }
522
523 while (s3c2410_dma_canload(chan) && chan->next != NULL) {
524 s3c2410_dma_loadbuffer(chan, chan->next);
525 }
526 } else if (chan->state == S3C2410_DMA_IDLE) {
527 if (chan->flags & S3C2410_DMAF_AUTOSTART) {
528 s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_START);
529 }
530 }
531
532 local_irq_restore(flags);
533 return 0;
534}
535
536EXPORT_SYMBOL(s3c2410_dma_enqueue);
537
538static inline void
539s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf)
540{
541 int magicok = (buf->magic == BUF_MAGIC);
542
543 buf->magic = -1;
544
545 if (magicok) {
546 kmem_cache_free(dma_kmem, buf);
547 } else {
548 printk("s3c2410_dma_freebuf: buff %p with bad magic\n", buf);
549 }
550}
551
552/* s3c2410_dma_lastxfer
553 *
554 * called when the system is out of buffers, to ensure that the channel
555 * is prepared for shutdown.
556*/
557
558static inline void
559s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
560{
561#if 0
562 pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n",
563 chan->number, chan->load_state);
564#endif
565
566 switch (chan->load_state) {
567 case S3C2410_DMALOAD_NONE:
568 break;
569
570 case S3C2410_DMALOAD_1LOADED:
571 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
572 /* flag error? */
573 printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
574 chan->number, __FUNCTION__);
575 return;
576 }
577 break;
578
579 case S3C2410_DMALOAD_1LOADED_1RUNNING:
580 /* I belive in this case we do not have anything to do
581 * until the next buffer comes along, and we turn off the
582 * reload */
583 return;
584
585 default:
586 pr_debug("dma%d: lastxfer: unhandled load_state %d with no next\n",
587 chan->number, chan->load_state);
588 return;
589
590 }
591
592 /* hopefully this'll shut the damned thing up after the transfer... */
593 dma_wrreg(chan, S3C2410_DMA_DCON, chan->dcon | S3C2410_DCON_NORELOAD);
594}
595
596
597#define dmadbg2(x...)
598
599static irqreturn_t
600s3c2410_dma_irq(int irq, void *devpw)
601{
602 struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
603 struct s3c2410_dma_buf *buf;
604
605 buf = chan->curr;
606
607 dbg_showchan(chan);
608
609 /* modify the channel state */
610
611 switch (chan->load_state) {
612 case S3C2410_DMALOAD_1RUNNING:
613 /* TODO - if we are running only one buffer, we probably
614 * want to reload here, and then worry about the buffer
615 * callback */
616
617 chan->load_state = S3C2410_DMALOAD_NONE;
618 break;
619
620 case S3C2410_DMALOAD_1LOADED:
621 /* iirc, we should go back to NONE loaded here, we
622 * had a buffer, and it was never verified as being
623 * loaded.
624 */
625
626 chan->load_state = S3C2410_DMALOAD_NONE;
627 break;
628
629 case S3C2410_DMALOAD_1LOADED_1RUNNING:
630 /* we'll worry about checking to see if another buffer is
631 * ready after we've called back the owner. This should
632 * ensure we do not wait around too long for the DMA
633 * engine to start the next transfer
634 */
635
636 chan->load_state = S3C2410_DMALOAD_1LOADED;
637 break;
638
639 case S3C2410_DMALOAD_NONE:
640 printk(KERN_ERR "dma%d: IRQ with no loaded buffer?\n",
641 chan->number);
642 break;
643
644 default:
645 printk(KERN_ERR "dma%d: IRQ in invalid load_state %d\n",
646 chan->number, chan->load_state);
647 break;
648 }
649
650 if (buf != NULL) {
651 /* update the chain to make sure that if we load any more
652 * buffers when we call the callback function, things should
653 * work properly */
654
655 chan->curr = buf->next;
656 buf->next = NULL;
657
658 if (buf->magic != BUF_MAGIC) {
659 printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n",
660 chan->number, __FUNCTION__, buf);
661 return IRQ_HANDLED;
662 }
663
664 s3c2410_dma_buffdone(chan, buf, S3C2410_RES_OK);
665
666 /* free resouces */
667 s3c2410_dma_freebuf(buf);
668 } else {
669 }
670
671 /* only reload if the channel is still running... our buffer done
672 * routine may have altered the state by requesting the dma channel
673 * to stop or shutdown... */
674
675 /* todo: check that when the channel is shut-down from inside this
676 * function, we cope with unsetting reload, etc */
677
678 if (chan->next != NULL && chan->state != S3C2410_DMA_IDLE) {
679 unsigned long flags;
680
681 switch (chan->load_state) {
682 case S3C2410_DMALOAD_1RUNNING:
683 /* don't need to do anything for this state */
684 break;
685
686 case S3C2410_DMALOAD_NONE:
687 /* can load buffer immediately */
688 break;
689
690 case S3C2410_DMALOAD_1LOADED:
691 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
692 /* flag error? */
693 printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
694 chan->number, __FUNCTION__);
695 return IRQ_HANDLED;
696 }
697
698 break;
699
700 case S3C2410_DMALOAD_1LOADED_1RUNNING:
701 goto no_load;
702
703 default:
704 printk(KERN_ERR "dma%d: unknown load_state in irq, %d\n",
705 chan->number, chan->load_state);
706 return IRQ_HANDLED;
707 }
708
709 local_irq_save(flags);
710 s3c2410_dma_loadbuffer(chan, chan->next);
711 local_irq_restore(flags);
712 } else {
713 s3c2410_dma_lastxfer(chan);
714
715 /* see if we can stop this channel.. */
716 if (chan->load_state == S3C2410_DMALOAD_NONE) {
717 pr_debug("dma%d: end of transfer, stopping channel (%ld)\n",
718 chan->number, jiffies);
719 s3c2410_dma_ctrl(chan->number | DMACH_LOW_LEVEL,
720 S3C2410_DMAOP_STOP);
721 }
722 }
723
724 no_load:
725 return IRQ_HANDLED;
726}
727
728static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel);
729
730/* s3c2410_request_dma
731 *
732 * get control of an dma channel
733*/
734
735int s3c2410_dma_request(unsigned int channel,
736 struct s3c2410_dma_client *client,
737 void *dev)
738{
739 struct s3c2410_dma_chan *chan;
740 unsigned long flags;
741 int err;
742
743 pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n",
744 channel, client->name, dev);
745
746 local_irq_save(flags);
747
748 chan = s3c2410_dma_map_channel(channel);
749 if (chan == NULL) {
750 local_irq_restore(flags);
751 return -EBUSY;
752 }
753
754 dbg_showchan(chan);
755
756 chan->client = client;
757 chan->in_use = 1;
758
759 if (!chan->irq_claimed) {
760 pr_debug("dma%d: %s : requesting irq %d\n",
761 channel, __FUNCTION__, chan->irq);
762
763 chan->irq_claimed = 1;
764 local_irq_restore(flags);
765
766 err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED,
767 client->name, (void *)chan);
768
769 local_irq_save(flags);
770
771 if (err) {
772 chan->in_use = 0;
773 chan->irq_claimed = 0;
774 local_irq_restore(flags);
775
776 printk(KERN_ERR "%s: cannot get IRQ %d for DMA %d\n",
777 client->name, chan->irq, chan->number);
778 return err;
779 }
780
781 chan->irq_enabled = 1;
782 }
783
784 local_irq_restore(flags);
785
786 /* need to setup */
787
788 pr_debug("%s: channel initialised, %p\n", __FUNCTION__, chan);
789
790 return 0;
791}
792
793EXPORT_SYMBOL(s3c2410_dma_request);
794
795/* s3c2410_dma_free
796 *
797 * release the given channel back to the system, will stop and flush
798 * any outstanding transfers, and ensure the channel is ready for the
799 * next claimant.
800 *
801 * Note, although a warning is currently printed if the freeing client
802 * info is not the same as the registrant's client info, the free is still
803 * allowed to go through.
804*/
805
806int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client)
807{
808 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
809 unsigned long flags;
810
811 if (chan == NULL)
812 return -EINVAL;
813
814 local_irq_save(flags);
815
816 if (chan->client != client) {
817 printk(KERN_WARNING "dma%d: possible free from different client (channel %p, passed %p)\n",
818 channel, chan->client, client);
819 }
820
821 /* sort out stopping and freeing the channel */
822
823 if (chan->state != S3C2410_DMA_IDLE) {
824 pr_debug("%s: need to stop dma channel %p\n",
825 __FUNCTION__, chan);
826
827 /* possibly flush the channel */
828 s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STOP);
829 }
830
831 chan->client = NULL;
832 chan->in_use = 0;
833
834 if (chan->irq_claimed)
835 free_irq(chan->irq, (void *)chan);
836
837 chan->irq_claimed = 0;
838
839 if (!(channel & DMACH_LOW_LEVEL))
840 dma_chan_map[channel] = NULL;
841
842 local_irq_restore(flags);
843
844 return 0;
845}
846
847EXPORT_SYMBOL(s3c2410_dma_free);
848
849static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan)
850{
851 unsigned long flags;
852 unsigned long tmp;
853
854 pr_debug("%s:\n", __FUNCTION__);
855
856 dbg_showchan(chan);
857
858 local_irq_save(flags);
859
860 s3c2410_dma_call_op(chan, S3C2410_DMAOP_STOP);
861
862 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
863 tmp |= S3C2410_DMASKTRIG_STOP;
864 //tmp &= ~S3C2410_DMASKTRIG_ON;
865 dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp);
866
867#if 0
868 /* should also clear interrupts, according to WinCE BSP */
869 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
870 tmp |= S3C2410_DCON_NORELOAD;
871 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
872#endif
873
874 /* should stop do this, or should we wait for flush? */
875 chan->state = S3C2410_DMA_IDLE;
876 chan->load_state = S3C2410_DMALOAD_NONE;
877
878 local_irq_restore(flags);
879
880 return 0;
881}
882
883void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan)
884{
885 unsigned long tmp;
886 unsigned int timeout = 0x10000;
887
888 while (timeout-- > 0) {
889 tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
890
891 if (!(tmp & S3C2410_DMASKTRIG_ON))
892 return;
893 }
894
895 pr_debug("dma%d: failed to stop?\n", chan->number);
896}
897
898
899/* s3c2410_dma_flush
900 *
901 * stop the channel, and remove all current and pending transfers
902*/
903
904static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
905{
906 struct s3c2410_dma_buf *buf, *next;
907 unsigned long flags;
908
909 pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number);
910
911 dbg_showchan(chan);
912
913 local_irq_save(flags);
914
915 if (chan->state != S3C2410_DMA_IDLE) {
916 pr_debug("%s: stopping channel...\n", __FUNCTION__ );
917 s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP);
918 }
919
920 buf = chan->curr;
921 if (buf == NULL)
922 buf = chan->next;
923
924 chan->curr = chan->next = chan->end = NULL;
925
926 if (buf != NULL) {
927 for ( ; buf != NULL; buf = next) {
928 next = buf->next;
929
930 pr_debug("%s: free buffer %p, next %p\n",
931 __FUNCTION__, buf, buf->next);
932
933 s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT);
934 s3c2410_dma_freebuf(buf);
935 }
936 }
937
938 dbg_showregs(chan);
939
940 s3c2410_dma_waitforstop(chan);
941
942#if 0
943 /* should also clear interrupts, according to WinCE BSP */
944 {
945 unsigned long tmp;
946
947 tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
948 tmp |= S3C2410_DCON_NORELOAD;
949 dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
950 }
951#endif
952
953 dbg_showregs(chan);
954
955 local_irq_restore(flags);
956
957 return 0;
958}
959
960int
961s3c2410_dma_started(struct s3c2410_dma_chan *chan)
962{
963 unsigned long flags;
964
965 local_irq_save(flags);
966
967 dbg_showchan(chan);
968
969 /* if we've only loaded one buffer onto the channel, then chec
970 * to see if we have another, and if so, try and load it so when
971 * the first buffer is finished, the new one will be loaded onto
972 * the channel */
973
974 if (chan->next != NULL) {
975 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
976
977 if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
978 pr_debug("%s: buff not yet loaded, no more todo\n",
979 __FUNCTION__);
980 } else {
981 chan->load_state = S3C2410_DMALOAD_1RUNNING;
982 s3c2410_dma_loadbuffer(chan, chan->next);
983 }
984
985 } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) {
986 s3c2410_dma_loadbuffer(chan, chan->next);
987 }
988 }
989
990
991 local_irq_restore(flags);
992
993 return 0;
994
995}
996
997int
998s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op)
999{
1000 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1001
1002 if (chan == NULL)
1003 return -EINVAL;
1004
1005 switch (op) {
1006 case S3C2410_DMAOP_START:
1007 return s3c2410_dma_start(chan);
1008
1009 case S3C2410_DMAOP_STOP:
1010 return s3c2410_dma_dostop(chan);
1011
1012 case S3C2410_DMAOP_PAUSE:
1013 case S3C2410_DMAOP_RESUME:
1014 return -ENOENT;
1015
1016 case S3C2410_DMAOP_FLUSH:
1017 return s3c2410_dma_flush(chan);
1018
1019 case S3C2410_DMAOP_STARTED:
1020 return s3c2410_dma_started(chan);
1021
1022 case S3C2410_DMAOP_TIMEOUT:
1023 return 0;
1024
1025 }
1026
1027 return -ENOENT; /* unknown, don't bother */
1028}
1029
1030EXPORT_SYMBOL(s3c2410_dma_ctrl);
1031
1032/* DMA configuration for each channel
1033 *
1034 * DISRCC -> source of the DMA (AHB,APB)
1035 * DISRC -> source address of the DMA
1036 * DIDSTC -> destination of the DMA (AHB,APD)
1037 * DIDST -> destination address of the DMA
1038*/
1039
1040/* s3c2410_dma_config
1041 *
1042 * xfersize: size of unit in bytes (1,2,4)
1043 * dcon: base value of the DCONx register
1044*/
1045
1046int s3c2410_dma_config(dmach_t channel,
1047 int xferunit,
1048 int dcon)
1049{
1050 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1051
1052 pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
1053 __FUNCTION__, channel, xferunit, dcon);
1054
1055 if (chan == NULL)
1056 return -EINVAL;
1057
1058 pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon);
1059
1060 dcon |= chan->dcon & dma_sel.dcon_mask;
1061
1062 pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon);
1063
1064 switch (xferunit) {
1065 case 1:
1066 dcon |= S3C2410_DCON_BYTE;
1067 break;
1068
1069 case 2:
1070 dcon |= S3C2410_DCON_HALFWORD;
1071 break;
1072
1073 case 4:
1074 dcon |= S3C2410_DCON_WORD;
1075 break;
1076
1077 default:
1078 pr_debug("%s: bad transfer size %d\n", __FUNCTION__, xferunit);
1079 return -EINVAL;
1080 }
1081
1082 dcon |= S3C2410_DCON_HWTRIG;
1083 dcon |= S3C2410_DCON_INTREQ;
1084
1085 pr_debug("%s: dcon now %08x\n", __FUNCTION__, dcon);
1086
1087 chan->dcon = dcon;
1088 chan->xfer_unit = xferunit;
1089
1090 return 0;
1091}
1092
1093EXPORT_SYMBOL(s3c2410_dma_config);
1094
1095int s3c2410_dma_setflags(dmach_t channel, unsigned int flags)
1096{
1097 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1098
1099 if (chan == NULL)
1100 return -EINVAL;
1101
1102 pr_debug("%s: chan=%p, flags=%08x\n", __FUNCTION__, chan, flags);
1103
1104 chan->flags = flags;
1105
1106 return 0;
1107}
1108
1109EXPORT_SYMBOL(s3c2410_dma_setflags);
1110
1111
1112/* do we need to protect the settings of the fields from
1113 * irq?
1114*/
1115
1116int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn)
1117{
1118 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1119
1120 if (chan == NULL)
1121 return -EINVAL;
1122
1123 pr_debug("%s: chan=%p, op rtn=%p\n", __FUNCTION__, chan, rtn);
1124
1125 chan->op_fn = rtn;
1126
1127 return 0;
1128}
1129
1130EXPORT_SYMBOL(s3c2410_dma_set_opfn);
1131
1132int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn)
1133{
1134 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1135
1136 if (chan == NULL)
1137 return -EINVAL;
1138
1139 pr_debug("%s: chan=%p, callback rtn=%p\n", __FUNCTION__, chan, rtn);
1140
1141 chan->callback_fn = rtn;
1142
1143 return 0;
1144}
1145
1146EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);
1147
1148/* s3c2410_dma_devconfig
1149 *
1150 * configure the dma source/destination hardware type and address
1151 *
1152 * source: S3C2410_DMASRC_HW: source is hardware
1153 * S3C2410_DMASRC_MEM: source is memory
1154 *
1155 * hwcfg: the value for xxxSTCn register,
1156 * bit 0: 0=increment pointer, 1=leave pointer
1157 * bit 1: 0=soucre is AHB, 1=soucre is APB
1158 *
1159 * devaddr: physical address of the source
1160*/
1161
1162int s3c2410_dma_devconfig(int channel,
1163 enum s3c2410_dmasrc source,
1164 int hwcfg,
1165 unsigned long devaddr)
1166{
1167 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1168
1169 if (chan == NULL)
1170 return -EINVAL;
1171
1172 pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n",
1173 __FUNCTION__, (int)source, hwcfg, devaddr);
1174
1175 chan->source = source;
1176 chan->dev_addr = devaddr;
1177
1178 switch (source) {
1179 case S3C2410_DMASRC_HW:
1180 /* source is hardware */
1181 pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n",
1182 __FUNCTION__, devaddr, hwcfg);
1183 dma_wrreg(chan, S3C2410_DMA_DISRCC, hwcfg & 3);
1184 dma_wrreg(chan, S3C2410_DMA_DISRC, devaddr);
1185 dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0));
1186
1187 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST);
1188 return 0;
1189
1190 case S3C2410_DMASRC_MEM:
1191 /* source is memory */
1192 pr_debug( "%s: mem source, devaddr=%08lx, hwcfg=%d\n",
1193 __FUNCTION__, devaddr, hwcfg);
1194 dma_wrreg(chan, S3C2410_DMA_DISRCC, (0<<1) | (0<<0));
1195 dma_wrreg(chan, S3C2410_DMA_DIDST, devaddr);
1196 dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3);
1197
1198 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DISRC);
1199 return 0;
1200 }
1201
1202 printk(KERN_ERR "dma%d: invalid source type (%d)\n", channel, source);
1203 return -EINVAL;
1204}
1205
1206EXPORT_SYMBOL(s3c2410_dma_devconfig);
1207
1208/* s3c2410_dma_getposition
1209 *
1210 * returns the current transfer points for the dma source and destination
1211*/
1212
1213int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
1214{
1215 struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
1216
1217 if (chan == NULL)
1218 return -EINVAL;
1219
1220 if (src != NULL)
1221 *src = dma_rdreg(chan, S3C2410_DMA_DCSRC);
1222
1223 if (dst != NULL)
1224 *dst = dma_rdreg(chan, S3C2410_DMA_DCDST);
1225
1226 return 0;
1227}
1228
1229EXPORT_SYMBOL(s3c2410_dma_getposition);
1230
1231
1232/* system device class */
1233
1234#ifdef CONFIG_PM
1235
1236static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
1237{
1238 struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev);
1239
1240 printk(KERN_DEBUG "suspending dma channel %d\n", cp->number);
1241
1242 if (dma_rdreg(cp, S3C2410_DMA_DMASKTRIG) & S3C2410_DMASKTRIG_ON) {
1243 /* the dma channel is still working, which is probably
1244 * a bad thing to do over suspend/resume. We stop the
1245 * channel and assume that the client is either going to
1246 * retry after resume, or that it is broken.
1247 */
1248
1249 printk(KERN_INFO "dma: stopping channel %d due to suspend\n",
1250 cp->number);
1251
1252 s3c2410_dma_dostop(cp);
1253 }
1254
1255 return 0;
1256}
1257
1258static int s3c2410_dma_resume(struct sys_device *dev)
1259{
1260 return 0;
1261}
1262
1263#else
1264#define s3c2410_dma_suspend NULL
1265#define s3c2410_dma_resume NULL
1266#endif /* CONFIG_PM */
1267
1268struct sysdev_class dma_sysclass = {
1269 set_kset_name("s3c24xx-dma"),
1270 .suspend = s3c2410_dma_suspend,
1271 .resume = s3c2410_dma_resume,
1272};
1273
1274/* kmem cache implementation */
1275
1276static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
1277{
1278 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1279}
1280
1281/* initialisation code */
1282
1283int __init s3c24xx_dma_sysclass_init(void)
1284{
1285 int ret = sysdev_class_register(&dma_sysclass);
1286
1287 if (ret != 0)
1288 printk(KERN_ERR "dma sysclass registration failed\n");
1289
1290 return ret;
1291}
1292
1293core_initcall(s3c24xx_dma_sysclass_init);
1294
1295int __init s3c24xx_dma_sysdev_register(void)
1296{
1297 struct s3c2410_dma_chan *cp = s3c2410_chans;
1298 int channel, ret;
1299
1300 for (channel = 0; channel < dma_channels; cp++, channel++) {
1301 cp->dev.cls = &dma_sysclass;
1302 cp->dev.id = channel;
1303 ret = sysdev_register(&cp->dev);
1304
1305 if (ret) {
1306 printk(KERN_ERR "error registering dev for dma %d\n",
1307 channel);
1308 return ret;
1309 }
1310 }
1311
1312 return 0;
1313}
1314
1315late_initcall(s3c24xx_dma_sysdev_register);
1316
1317int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
1318 unsigned int stride)
1319{
1320 struct s3c2410_dma_chan *cp;
1321 int channel;
1322 int ret;
1323
1324 printk("S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics\n");
1325
1326 dma_channels = channels;
1327
1328 dma_base = ioremap(S3C24XX_PA_DMA, stride * channels);
1329 if (dma_base == NULL) {
1330 printk(KERN_ERR "dma failed to remap register block\n");
1331 return -ENOMEM;
1332 }
1333
1334 dma_kmem = kmem_cache_create("dma_desc",
1335 sizeof(struct s3c2410_dma_buf), 0,
1336 SLAB_HWCACHE_ALIGN,
1337 s3c2410_dma_cache_ctor, NULL);
1338
1339 if (dma_kmem == NULL) {
1340 printk(KERN_ERR "dma failed to make kmem cache\n");
1341 ret = -ENOMEM;
1342 goto err;
1343 }
1344
1345 for (channel = 0; channel < channels; channel++) {
1346 cp = &s3c2410_chans[channel];
1347
1348 memset(cp, 0, sizeof(struct s3c2410_dma_chan));
1349
1350 /* dma channel irqs are in order.. */
1351 cp->number = channel;
1352 cp->irq = channel + irq;
1353 cp->regs = dma_base + (channel * stride);
1354
1355 /* point current stats somewhere */
1356 cp->stats = &cp->stats_store;
1357 cp->stats_store.timeout_shortest = LONG_MAX;
1358
1359 /* basic channel configuration */
1360
1361 cp->load_timeout = 1<<18;
1362
1363 printk("DMA channel %d at %p, irq %d\n",
1364 cp->number, cp->regs, cp->irq);
1365 }
1366
1367 return 0;
1368
1369 err:
1370 kmem_cache_destroy(dma_kmem);
1371 iounmap(dma_base);
1372 dma_base = NULL;
1373 return ret;
1374}
1375
1376int s3c2410_dma_init(void)
1377{
1378 return s3c24xx_dma_init(4, IRQ_DMA0, 0x40);
1379}
1380
1381static inline int is_channel_valid(unsigned int channel)
1382{
1383 return (channel & DMA_CH_VALID);
1384}
1385
1386static struct s3c24xx_dma_order *dma_order;
1387
1388
1389/* s3c2410_dma_map_channel()
1390 *
1391 * turn the virtual channel number into a real, and un-used hardware
1392 * channel.
1393 *
1394 * first, try the dma ordering given to us by either the relevant
1395 * dma code, or the board. Then just find the first usable free
1396 * channel
1397*/
1398
1399struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel)
1400{
1401 struct s3c24xx_dma_order_ch *ord = NULL;
1402 struct s3c24xx_dma_map *ch_map;
1403 struct s3c2410_dma_chan *dmach;
1404 int ch;
1405
1406 if (dma_sel.map == NULL || channel > dma_sel.map_size)
1407 return NULL;
1408
1409 ch_map = dma_sel.map + channel;
1410
1411 /* first, try the board mapping */
1412
1413 if (dma_order) {
1414 ord = &dma_order->channels[channel];
1415
1416 for (ch = 0; ch < dma_channels; ch++) {
1417 if (!is_channel_valid(ord->list[ch]))
1418 continue;
1419
1420 if (s3c2410_chans[ord->list[ch]].in_use == 0) {
1421 ch = ord->list[ch] & ~DMA_CH_VALID;
1422 goto found;
1423 }
1424 }
1425
1426 if (ord->flags & DMA_CH_NEVER)
1427 return NULL;
1428 }
1429
1430 /* second, search the channel map for first free */
1431
1432 for (ch = 0; ch < dma_channels; ch++) {
1433 if (!is_channel_valid(ch_map->channels[ch]))
1434 continue;
1435
1436 if (s3c2410_chans[ch].in_use == 0) {
1437 printk("mapped channel %d to %d\n", channel, ch);
1438 break;
1439 }
1440 }
1441
1442 if (ch >= dma_channels)
1443 return NULL;
1444
1445 /* update our channel mapping */
1446
1447 found:
1448 dmach = &s3c2410_chans[ch];
1449 dma_chan_map[channel] = dmach;
1450
1451 /* select the channel */
1452
1453 (dma_sel.select)(dmach, ch_map);
1454
1455 return dmach;
1456}
1457
1458static int s3c24xx_dma_check_entry(struct s3c24xx_dma_map *map, int ch)
1459{
1460 return 0;
1461}
1462
1463int __init s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel)
1464{
1465 struct s3c24xx_dma_map *nmap;
1466 size_t map_sz = sizeof(*nmap) * sel->map_size;
1467 int ptr;
1468
1469 nmap = kmalloc(map_sz, GFP_KERNEL);
1470 if (nmap == NULL)
1471 return -ENOMEM;
1472
1473 memcpy(nmap, sel->map, map_sz);
1474 memcpy(&dma_sel, sel, sizeof(*sel));
1475
1476 dma_sel.map = nmap;
1477
1478 for (ptr = 0; ptr < sel->map_size; ptr++)
1479 s3c24xx_dma_check_entry(nmap+ptr, ptr);
1480
1481 return 0;
1482}
1483
1484int __init s3c24xx_dma_order_set(struct s3c24xx_dma_order *ord)
1485{
1486 struct s3c24xx_dma_order *nord = dma_order;
1487
1488 if (nord == NULL)
1489 nord = kmalloc(sizeof(struct s3c24xx_dma_order), GFP_KERNEL);
1490
1491 if (nord == NULL) {
1492 printk(KERN_ERR "no memory to store dma channel order\n");
1493 return -ENOMEM;
1494 }
1495
1496 dma_order = nord;
1497 memcpy(nord, ord, sizeof(struct s3c24xx_dma_order));
1498 return 0;
1499}
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
new file mode 100644
index 000000000000..ec3a09c4d181
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -0,0 +1,188 @@
1/* linux/arch/arm/plat-s3c24xx/gpio.c
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C24XX GPIO support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/
22
23
24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/module.h>
27#include <linux/interrupt.h>
28#include <linux/ioport.h>
29
30#include <asm/hardware.h>
31#include <asm/irq.h>
32#include <asm/io.h>
33
34#include <asm/arch/regs-gpio.h>
35
36void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
37{
38 void __iomem *base = S3C24XX_GPIO_BASE(pin);
39 unsigned long mask;
40 unsigned long con;
41 unsigned long flags;
42
43 if (pin < S3C2410_GPIO_BANKB) {
44 mask = 1 << S3C2410_GPIO_OFFSET(pin);
45 } else {
46 mask = 3 << S3C2410_GPIO_OFFSET(pin)*2;
47 }
48
49 switch (function) {
50 case S3C2410_GPIO_LEAVE:
51 mask = 0;
52 function = 0;
53 break;
54
55 case S3C2410_GPIO_INPUT:
56 case S3C2410_GPIO_OUTPUT:
57 case S3C2410_GPIO_SFN2:
58 case S3C2410_GPIO_SFN3:
59 if (pin < S3C2410_GPIO_BANKB) {
60 function -= 1;
61 function &= 1;
62 function <<= S3C2410_GPIO_OFFSET(pin);
63 } else {
64 function &= 3;
65 function <<= S3C2410_GPIO_OFFSET(pin)*2;
66 }
67 }
68
69 /* modify the specified register wwith IRQs off */
70
71 local_irq_save(flags);
72
73 con = __raw_readl(base + 0x00);
74 con &= ~mask;
75 con |= function;
76
77 __raw_writel(con, base + 0x00);
78
79 local_irq_restore(flags);
80}
81
82EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
83
84unsigned int s3c2410_gpio_getcfg(unsigned int pin)
85{
86 void __iomem *base = S3C24XX_GPIO_BASE(pin);
87 unsigned long val = __raw_readl(base);
88
89 if (pin < S3C2410_GPIO_BANKB) {
90 val >>= S3C2410_GPIO_OFFSET(pin);
91 val &= 1;
92 val += 1;
93 } else {
94 val >>= S3C2410_GPIO_OFFSET(pin)*2;
95 val &= 3;
96 }
97
98 return val | S3C2410_GPIO_INPUT;
99}
100
101EXPORT_SYMBOL(s3c2410_gpio_getcfg);
102
103void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
104{
105 void __iomem *base = S3C24XX_GPIO_BASE(pin);
106 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
107 unsigned long flags;
108 unsigned long up;
109
110 if (pin < S3C2410_GPIO_BANKB)
111 return;
112
113 local_irq_save(flags);
114
115 up = __raw_readl(base + 0x08);
116 up &= ~(1L << offs);
117 up |= to << offs;
118 __raw_writel(up, base + 0x08);
119
120 local_irq_restore(flags);
121}
122
123EXPORT_SYMBOL(s3c2410_gpio_pullup);
124
125void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
126{
127 void __iomem *base = S3C24XX_GPIO_BASE(pin);
128 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
129 unsigned long flags;
130 unsigned long dat;
131
132 local_irq_save(flags);
133
134 dat = __raw_readl(base + 0x04);
135 dat &= ~(1 << offs);
136 dat |= to << offs;
137 __raw_writel(dat, base + 0x04);
138
139 local_irq_restore(flags);
140}
141
142EXPORT_SYMBOL(s3c2410_gpio_setpin);
143
144unsigned int s3c2410_gpio_getpin(unsigned int pin)
145{
146 void __iomem *base = S3C24XX_GPIO_BASE(pin);
147 unsigned long offs = S3C2410_GPIO_OFFSET(pin);
148
149 return __raw_readl(base + 0x04) & (1<< offs);
150}
151
152EXPORT_SYMBOL(s3c2410_gpio_getpin);
153
154unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
155{
156 unsigned long flags;
157 unsigned long misccr;
158
159 local_irq_save(flags);
160 misccr = __raw_readl(S3C24XX_MISCCR);
161 misccr &= ~clear;
162 misccr ^= change;
163 __raw_writel(misccr, S3C24XX_MISCCR);
164 local_irq_restore(flags);
165
166 return misccr;
167}
168
169EXPORT_SYMBOL(s3c2410_modify_misccr);
170
171int s3c2410_gpio_getirq(unsigned int pin)
172{
173 if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15)
174 return -1; /* not valid interrupts */
175
176 if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7)
177 return -1; /* not valid pin */
178
179 if (pin < S3C2410_GPF4)
180 return (pin - S3C2410_GPF0) + IRQ_EINT0;
181
182 if (pin < S3C2410_GPG0)
183 return (pin - S3C2410_GPF4) + IRQ_EINT4;
184
185 return (pin - S3C2410_GPG0) + IRQ_EINT8;
186}
187
188EXPORT_SYMBOL(s3c2410_gpio_getirq);
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
new file mode 100644
index 000000000000..ce186398e3fd
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -0,0 +1,801 @@
1/* linux/arch/arm/plat-s3c24xx/irq.c
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * Changelog:
21 *
22 * 22-Jul-2004 Ben Dooks <ben@simtec.co.uk>
23 * Fixed compile warnings
24 *
25 * 22-Jul-2004 Roc Wu <cooloney@yahoo.com.cn>
26 * Fixed s3c_extirq_type
27 *
28 * 21-Jul-2004 Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
29 * Addition of ADC/TC demux
30 *
31 * 04-Oct-2004 Klaus Fetscher <k.fetscher@fetron.de>
32 * Fix for set_irq_type() on low EINT numbers
33 *
34 * 05-Oct-2004 Ben Dooks <ben@simtec.co.uk>
35 * Tidy up KF's patch and sort out new release
36 *
37 * 05-Oct-2004 Ben Dooks <ben@simtec.co.uk>
38 * Add support for power management controls
39 *
40 * 04-Nov-2004 Ben Dooks
41 * Fix standard IRQ wake for EINT0..4 and RTC
42 *
43 * 22-Feb-2005 Ben Dooks
44 * Fixed edge-triggering on ADC IRQ
45 *
46 * 28-Jun-2005 Ben Dooks
47 * Mark IRQ_LCD valid
48 *
49 * 25-Jul-2005 Ben Dooks
50 * Split the S3C2440 IRQ code to seperate file
51*/
52
53#include <linux/init.h>
54#include <linux/module.h>
55#include <linux/interrupt.h>
56#include <linux/ioport.h>
57#include <linux/ptrace.h>
58#include <linux/sysdev.h>
59
60#include <asm/hardware.h>
61#include <asm/irq.h>
62#include <asm/io.h>
63
64#include <asm/mach/irq.h>
65
66#include <asm/arch/regs-irq.h>
67#include <asm/arch/regs-gpio.h>
68
69#include <asm/plat-s3c24xx/cpu.h>
70#include <asm/plat-s3c24xx/pm.h>
71#include <asm/plat-s3c24xx/irq.h>
72
73/* wakeup irq control */
74
75#ifdef CONFIG_PM
76
77/* state for IRQs over sleep */
78
79/* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources
80 *
81 * set bit to 1 in allow bitfield to enable the wakeup settings on it
82*/
83
84unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL;
85unsigned long s3c_irqwake_intmask = 0xffffffffL;
86unsigned long s3c_irqwake_eintallow = 0x0000fff0L;
87unsigned long s3c_irqwake_eintmask = 0xffffffffL;
88
89int
90s3c_irq_wake(unsigned int irqno, unsigned int state)
91{
92 unsigned long irqbit = 1 << (irqno - IRQ_EINT0);
93
94 if (!(s3c_irqwake_intallow & irqbit))
95 return -ENOENT;
96
97 printk(KERN_INFO "wake %s for irq %d\n",
98 state ? "enabled" : "disabled", irqno);
99
100 if (!state)
101 s3c_irqwake_intmask |= irqbit;
102 else
103 s3c_irqwake_intmask &= ~irqbit;
104
105 return 0;
106}
107
108static int
109s3c_irqext_wake(unsigned int irqno, unsigned int state)
110{
111 unsigned long bit = 1L << (irqno - EXTINT_OFF);
112
113 if (!(s3c_irqwake_eintallow & bit))
114 return -ENOENT;
115
116 printk(KERN_INFO "wake %s for irq %d\n",
117 state ? "enabled" : "disabled", irqno);
118
119 if (!state)
120 s3c_irqwake_eintmask |= bit;
121 else
122 s3c_irqwake_eintmask &= ~bit;
123
124 return 0;
125}
126
127#else
128#define s3c_irqext_wake NULL
129#define s3c_irq_wake NULL
130#endif
131
132
133static void
134s3c_irq_mask(unsigned int irqno)
135{
136 unsigned long mask;
137
138 irqno -= IRQ_EINT0;
139
140 mask = __raw_readl(S3C2410_INTMSK);
141 mask |= 1UL << irqno;
142 __raw_writel(mask, S3C2410_INTMSK);
143}
144
145static inline void
146s3c_irq_ack(unsigned int irqno)
147{
148 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
149
150 __raw_writel(bitval, S3C2410_SRCPND);
151 __raw_writel(bitval, S3C2410_INTPND);
152}
153
154static inline void
155s3c_irq_maskack(unsigned int irqno)
156{
157 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
158 unsigned long mask;
159
160 mask = __raw_readl(S3C2410_INTMSK);
161 __raw_writel(mask|bitval, S3C2410_INTMSK);
162
163 __raw_writel(bitval, S3C2410_SRCPND);
164 __raw_writel(bitval, S3C2410_INTPND);
165}
166
167
168static void
169s3c_irq_unmask(unsigned int irqno)
170{
171 unsigned long mask;
172
173 if (irqno != IRQ_TIMER4 && irqno != IRQ_EINT8t23)
174 irqdbf2("s3c_irq_unmask %d\n", irqno);
175
176 irqno -= IRQ_EINT0;
177
178 mask = __raw_readl(S3C2410_INTMSK);
179 mask &= ~(1UL << irqno);
180 __raw_writel(mask, S3C2410_INTMSK);
181}
182
183struct irq_chip s3c_irq_level_chip = {
184 .name = "s3c-level",
185 .ack = s3c_irq_maskack,
186 .mask = s3c_irq_mask,
187 .unmask = s3c_irq_unmask,
188 .set_wake = s3c_irq_wake
189};
190
191static struct irq_chip s3c_irq_chip = {
192 .name = "s3c",
193 .ack = s3c_irq_ack,
194 .mask = s3c_irq_mask,
195 .unmask = s3c_irq_unmask,
196 .set_wake = s3c_irq_wake
197};
198
199static void
200s3c_irqext_mask(unsigned int irqno)
201{
202 unsigned long mask;
203
204 irqno -= EXTINT_OFF;
205
206 mask = __raw_readl(S3C24XX_EINTMASK);
207 mask |= ( 1UL << irqno);
208 __raw_writel(mask, S3C24XX_EINTMASK);
209}
210
211static void
212s3c_irqext_ack(unsigned int irqno)
213{
214 unsigned long req;
215 unsigned long bit;
216 unsigned long mask;
217
218 bit = 1UL << (irqno - EXTINT_OFF);
219
220 mask = __raw_readl(S3C24XX_EINTMASK);
221
222 __raw_writel(bit, S3C24XX_EINTPEND);
223
224 req = __raw_readl(S3C24XX_EINTPEND);
225 req &= ~mask;
226
227 /* not sure if we should be acking the parent irq... */
228
229 if (irqno <= IRQ_EINT7 ) {
230 if ((req & 0xf0) == 0)
231 s3c_irq_ack(IRQ_EINT4t7);
232 } else {
233 if ((req >> 8) == 0)
234 s3c_irq_ack(IRQ_EINT8t23);
235 }
236}
237
238static void
239s3c_irqext_unmask(unsigned int irqno)
240{
241 unsigned long mask;
242
243 irqno -= EXTINT_OFF;
244
245 mask = __raw_readl(S3C24XX_EINTMASK);
246 mask &= ~( 1UL << irqno);
247 __raw_writel(mask, S3C24XX_EINTMASK);
248}
249
250int
251s3c_irqext_type(unsigned int irq, unsigned int type)
252{
253 void __iomem *extint_reg;
254 void __iomem *gpcon_reg;
255 unsigned long gpcon_offset, extint_offset;
256 unsigned long newvalue = 0, value;
257
258 if ((irq >= IRQ_EINT0) && (irq <= IRQ_EINT3))
259 {
260 gpcon_reg = S3C2410_GPFCON;
261 extint_reg = S3C24XX_EXTINT0;
262 gpcon_offset = (irq - IRQ_EINT0) * 2;
263 extint_offset = (irq - IRQ_EINT0) * 4;
264 }
265 else if ((irq >= IRQ_EINT4) && (irq <= IRQ_EINT7))
266 {
267 gpcon_reg = S3C2410_GPFCON;
268 extint_reg = S3C24XX_EXTINT0;
269 gpcon_offset = (irq - (EXTINT_OFF)) * 2;
270 extint_offset = (irq - (EXTINT_OFF)) * 4;
271 }
272 else if ((irq >= IRQ_EINT8) && (irq <= IRQ_EINT15))
273 {
274 gpcon_reg = S3C2410_GPGCON;
275 extint_reg = S3C24XX_EXTINT1;
276 gpcon_offset = (irq - IRQ_EINT8) * 2;
277 extint_offset = (irq - IRQ_EINT8) * 4;
278 }
279 else if ((irq >= IRQ_EINT16) && (irq <= IRQ_EINT23))
280 {
281 gpcon_reg = S3C2410_GPGCON;
282 extint_reg = S3C24XX_EXTINT2;
283 gpcon_offset = (irq - IRQ_EINT8) * 2;
284 extint_offset = (irq - IRQ_EINT16) * 4;
285 } else
286 return -1;
287
288 /* Set the GPIO to external interrupt mode */
289 value = __raw_readl(gpcon_reg);
290 value = (value & ~(3 << gpcon_offset)) | (0x02 << gpcon_offset);
291 __raw_writel(value, gpcon_reg);
292
293 /* Set the external interrupt to pointed trigger type */
294 switch (type)
295 {
296 case IRQT_NOEDGE:
297 printk(KERN_WARNING "No edge setting!\n");
298 break;
299
300 case IRQT_RISING:
301 newvalue = S3C2410_EXTINT_RISEEDGE;
302 break;
303
304 case IRQT_FALLING:
305 newvalue = S3C2410_EXTINT_FALLEDGE;
306 break;
307
308 case IRQT_BOTHEDGE:
309 newvalue = S3C2410_EXTINT_BOTHEDGE;
310 break;
311
312 case IRQT_LOW:
313 newvalue = S3C2410_EXTINT_LOWLEV;
314 break;
315
316 case IRQT_HIGH:
317 newvalue = S3C2410_EXTINT_HILEV;
318 break;
319
320 default:
321 printk(KERN_ERR "No such irq type %d", type);
322 return -1;
323 }
324
325 value = __raw_readl(extint_reg);
326 value = (value & ~(7 << extint_offset)) | (newvalue << extint_offset);
327 __raw_writel(value, extint_reg);
328
329 return 0;
330}
331
332static struct irq_chip s3c_irqext_chip = {
333 .name = "s3c-ext",
334 .mask = s3c_irqext_mask,
335 .unmask = s3c_irqext_unmask,
336 .ack = s3c_irqext_ack,
337 .set_type = s3c_irqext_type,
338 .set_wake = s3c_irqext_wake
339};
340
341static struct irq_chip s3c_irq_eint0t4 = {
342 .name = "s3c-ext0",
343 .ack = s3c_irq_ack,
344 .mask = s3c_irq_mask,
345 .unmask = s3c_irq_unmask,
346 .set_wake = s3c_irq_wake,
347 .set_type = s3c_irqext_type,
348};
349
350/* mask values for the parent registers for each of the interrupt types */
351
352#define INTMSK_UART0 (1UL << (IRQ_UART0 - IRQ_EINT0))
353#define INTMSK_UART1 (1UL << (IRQ_UART1 - IRQ_EINT0))
354#define INTMSK_UART2 (1UL << (IRQ_UART2 - IRQ_EINT0))
355#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))
356
357
358/* UART0 */
359
360static void
361s3c_irq_uart0_mask(unsigned int irqno)
362{
363 s3c_irqsub_mask(irqno, INTMSK_UART0, 7);
364}
365
366static void
367s3c_irq_uart0_unmask(unsigned int irqno)
368{
369 s3c_irqsub_unmask(irqno, INTMSK_UART0);
370}
371
372static void
373s3c_irq_uart0_ack(unsigned int irqno)
374{
375 s3c_irqsub_maskack(irqno, INTMSK_UART0, 7);
376}
377
378static struct irq_chip s3c_irq_uart0 = {
379 .name = "s3c-uart0",
380 .mask = s3c_irq_uart0_mask,
381 .unmask = s3c_irq_uart0_unmask,
382 .ack = s3c_irq_uart0_ack,
383};
384
385/* UART1 */
386
387static void
388s3c_irq_uart1_mask(unsigned int irqno)
389{
390 s3c_irqsub_mask(irqno, INTMSK_UART1, 7 << 3);
391}
392
393static void
394s3c_irq_uart1_unmask(unsigned int irqno)
395{
396 s3c_irqsub_unmask(irqno, INTMSK_UART1);
397}
398
399static void
400s3c_irq_uart1_ack(unsigned int irqno)
401{
402 s3c_irqsub_maskack(irqno, INTMSK_UART1, 7 << 3);
403}
404
405static struct irq_chip s3c_irq_uart1 = {
406 .name = "s3c-uart1",
407 .mask = s3c_irq_uart1_mask,
408 .unmask = s3c_irq_uart1_unmask,
409 .ack = s3c_irq_uart1_ack,
410};
411
412/* UART2 */
413
414static void
415s3c_irq_uart2_mask(unsigned int irqno)
416{
417 s3c_irqsub_mask(irqno, INTMSK_UART2, 7 << 6);
418}
419
420static void
421s3c_irq_uart2_unmask(unsigned int irqno)
422{
423 s3c_irqsub_unmask(irqno, INTMSK_UART2);
424}
425
426static void
427s3c_irq_uart2_ack(unsigned int irqno)
428{
429 s3c_irqsub_maskack(irqno, INTMSK_UART2, 7 << 6);
430}
431
432static struct irq_chip s3c_irq_uart2 = {
433 .name = "s3c-uart2",
434 .mask = s3c_irq_uart2_mask,
435 .unmask = s3c_irq_uart2_unmask,
436 .ack = s3c_irq_uart2_ack,
437};
438
439/* ADC and Touchscreen */
440
441static void
442s3c_irq_adc_mask(unsigned int irqno)
443{
444 s3c_irqsub_mask(irqno, INTMSK_ADCPARENT, 3 << 9);
445}
446
447static void
448s3c_irq_adc_unmask(unsigned int irqno)
449{
450 s3c_irqsub_unmask(irqno, INTMSK_ADCPARENT);
451}
452
453static void
454s3c_irq_adc_ack(unsigned int irqno)
455{
456 s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9);
457}
458
459static struct irq_chip s3c_irq_adc = {
460 .name = "s3c-adc",
461 .mask = s3c_irq_adc_mask,
462 .unmask = s3c_irq_adc_unmask,
463 .ack = s3c_irq_adc_ack,
464};
465
466/* irq demux for adc */
467static void s3c_irq_demux_adc(unsigned int irq,
468 struct irq_desc *desc)
469{
470 unsigned int subsrc, submsk;
471 unsigned int offset = 9;
472 struct irq_desc *mydesc;
473
474 /* read the current pending interrupts, and the mask
475 * for what it is available */
476
477 subsrc = __raw_readl(S3C2410_SUBSRCPND);
478 submsk = __raw_readl(S3C2410_INTSUBMSK);
479
480 subsrc &= ~submsk;
481 subsrc >>= offset;
482 subsrc &= 3;
483
484 if (subsrc != 0) {
485 if (subsrc & 1) {
486 mydesc = irq_desc + IRQ_TC;
487 desc_handle_irq(IRQ_TC, mydesc);
488 }
489 if (subsrc & 2) {
490 mydesc = irq_desc + IRQ_ADC;
491 desc_handle_irq(IRQ_ADC, mydesc);
492 }
493 }
494}
495
496static void s3c_irq_demux_uart(unsigned int start)
497{
498 unsigned int subsrc, submsk;
499 unsigned int offset = start - IRQ_S3CUART_RX0;
500 struct irq_desc *desc;
501
502 /* read the current pending interrupts, and the mask
503 * for what it is available */
504
505 subsrc = __raw_readl(S3C2410_SUBSRCPND);
506 submsk = __raw_readl(S3C2410_INTSUBMSK);
507
508 irqdbf2("s3c_irq_demux_uart: start=%d (%d), subsrc=0x%08x,0x%08x\n",
509 start, offset, subsrc, submsk);
510
511 subsrc &= ~submsk;
512 subsrc >>= offset;
513 subsrc &= 7;
514
515 if (subsrc != 0) {
516 desc = irq_desc + start;
517
518 if (subsrc & 1)
519 desc_handle_irq(start, desc);
520
521 desc++;
522
523 if (subsrc & 2)
524 desc_handle_irq(start+1, desc);
525
526 desc++;
527
528 if (subsrc & 4)
529 desc_handle_irq(start+2, desc);
530 }
531}
532
533/* uart demux entry points */
534
535static void
536s3c_irq_demux_uart0(unsigned int irq,
537 struct irq_desc *desc)
538{
539 irq = irq;
540 s3c_irq_demux_uart(IRQ_S3CUART_RX0);
541}
542
543static void
544s3c_irq_demux_uart1(unsigned int irq,
545 struct irq_desc *desc)
546{
547 irq = irq;
548 s3c_irq_demux_uart(IRQ_S3CUART_RX1);
549}
550
551static void
552s3c_irq_demux_uart2(unsigned int irq,
553 struct irq_desc *desc)
554{
555 irq = irq;
556 s3c_irq_demux_uart(IRQ_S3CUART_RX2);
557}
558
559static void
560s3c_irq_demux_extint8(unsigned int irq,
561 struct irq_desc *desc)
562{
563 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
564 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
565
566 eintpnd &= ~eintmsk;
567 eintpnd &= ~0xff; /* ignore lower irqs */
568
569 /* we may as well handle all the pending IRQs here */
570
571 while (eintpnd) {
572 irq = __ffs(eintpnd);
573 eintpnd &= ~(1<<irq);
574
575 irq += (IRQ_EINT4 - 4);
576 desc_handle_irq(irq, irq_desc + irq);
577 }
578
579}
580
581static void
582s3c_irq_demux_extint4t7(unsigned int irq,
583 struct irq_desc *desc)
584{
585 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
586 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
587
588 eintpnd &= ~eintmsk;
589 eintpnd &= 0xff; /* only lower irqs */
590
591 /* we may as well handle all the pending IRQs here */
592
593 while (eintpnd) {
594 irq = __ffs(eintpnd);
595 eintpnd &= ~(1<<irq);
596
597 irq += (IRQ_EINT4 - 4);
598
599 desc_handle_irq(irq, irq_desc + irq);
600 }
601}
602
603#ifdef CONFIG_PM
604
605static struct sleep_save irq_save[] = {
606 SAVE_ITEM(S3C2410_INTMSK),
607 SAVE_ITEM(S3C2410_INTSUBMSK),
608};
609
610/* the extint values move between the s3c2410/s3c2440 and the s3c2412
611 * so we use an array to hold them, and to calculate the address of
612 * the register at run-time
613*/
614
615static unsigned long save_extint[3];
616static unsigned long save_eintflt[4];
617static unsigned long save_eintmask;
618
619int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state)
620{
621 unsigned int i;
622
623 for (i = 0; i < ARRAY_SIZE(save_extint); i++)
624 save_extint[i] = __raw_readl(S3C24XX_EXTINT0 + (i*4));
625
626 for (i = 0; i < ARRAY_SIZE(save_eintflt); i++)
627 save_eintflt[i] = __raw_readl(S3C24XX_EINFLT0 + (i*4));
628
629 s3c2410_pm_do_save(irq_save, ARRAY_SIZE(irq_save));
630 save_eintmask = __raw_readl(S3C24XX_EINTMASK);
631
632 return 0;
633}
634
635int s3c24xx_irq_resume(struct sys_device *dev)
636{
637 unsigned int i;
638
639 for (i = 0; i < ARRAY_SIZE(save_extint); i++)
640 __raw_writel(save_extint[i], S3C24XX_EXTINT0 + (i*4));
641
642 for (i = 0; i < ARRAY_SIZE(save_eintflt); i++)
643 __raw_writel(save_eintflt[i], S3C24XX_EINFLT0 + (i*4));
644
645 s3c2410_pm_do_restore(irq_save, ARRAY_SIZE(irq_save));
646 __raw_writel(save_eintmask, S3C24XX_EINTMASK);
647
648 return 0;
649}
650
651#else
652#define s3c24xx_irq_suspend NULL
653#define s3c24xx_irq_resume NULL
654#endif
655
656/* s3c24xx_init_irq
657 *
658 * Initialise S3C2410 IRQ system
659*/
660
661void __init s3c24xx_init_irq(void)
662{
663 unsigned long pend;
664 unsigned long last;
665 int irqno;
666 int i;
667
668 irqdbf("s3c2410_init_irq: clearing interrupt status flags\n");
669
670 /* first, clear all interrupts pending... */
671
672 last = 0;
673 for (i = 0; i < 4; i++) {
674 pend = __raw_readl(S3C24XX_EINTPEND);
675
676 if (pend == 0 || pend == last)
677 break;
678
679 __raw_writel(pend, S3C24XX_EINTPEND);
680 printk("irq: clearing pending ext status %08x\n", (int)pend);
681 last = pend;
682 }
683
684 last = 0;
685 for (i = 0; i < 4; i++) {
686 pend = __raw_readl(S3C2410_INTPND);
687
688 if (pend == 0 || pend == last)
689 break;
690
691 __raw_writel(pend, S3C2410_SRCPND);
692 __raw_writel(pend, S3C2410_INTPND);
693 printk("irq: clearing pending status %08x\n", (int)pend);
694 last = pend;
695 }
696
697 last = 0;
698 for (i = 0; i < 4; i++) {
699 pend = __raw_readl(S3C2410_SUBSRCPND);
700
701 if (pend == 0 || pend == last)
702 break;
703
704 printk("irq: clearing subpending status %08x\n", (int)pend);
705 __raw_writel(pend, S3C2410_SUBSRCPND);
706 last = pend;
707 }
708
709 /* register the main interrupts */
710
711 irqdbf("s3c2410_init_irq: registering s3c2410 interrupt handlers\n");
712
713 for (irqno = IRQ_EINT4t7; irqno <= IRQ_ADCPARENT; irqno++) {
714 /* set all the s3c2410 internal irqs */
715
716 switch (irqno) {
717 /* deal with the special IRQs (cascaded) */
718
719 case IRQ_EINT4t7:
720 case IRQ_EINT8t23:
721 case IRQ_UART0:
722 case IRQ_UART1:
723 case IRQ_UART2:
724 case IRQ_ADCPARENT:
725 set_irq_chip(irqno, &s3c_irq_level_chip);
726 set_irq_handler(irqno, handle_level_irq);
727 break;
728
729 case IRQ_RESERVED6:
730 case IRQ_RESERVED24:
731 /* no IRQ here */
732 break;
733
734 default:
735 //irqdbf("registering irq %d (s3c irq)\n", irqno);
736 set_irq_chip(irqno, &s3c_irq_chip);
737 set_irq_handler(irqno, handle_edge_irq);
738 set_irq_flags(irqno, IRQF_VALID);
739 }
740 }
741
742 /* setup the cascade irq handlers */
743
744 set_irq_chained_handler(IRQ_EINT4t7, s3c_irq_demux_extint4t7);
745 set_irq_chained_handler(IRQ_EINT8t23, s3c_irq_demux_extint8);
746
747 set_irq_chained_handler(IRQ_UART0, s3c_irq_demux_uart0);
748 set_irq_chained_handler(IRQ_UART1, s3c_irq_demux_uart1);
749 set_irq_chained_handler(IRQ_UART2, s3c_irq_demux_uart2);
750 set_irq_chained_handler(IRQ_ADCPARENT, s3c_irq_demux_adc);
751
752 /* external interrupts */
753
754 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
755 irqdbf("registering irq %d (ext int)\n", irqno);
756 set_irq_chip(irqno, &s3c_irq_eint0t4);
757 set_irq_handler(irqno, handle_edge_irq);
758 set_irq_flags(irqno, IRQF_VALID);
759 }
760
761 for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) {
762 irqdbf("registering irq %d (extended s3c irq)\n", irqno);
763 set_irq_chip(irqno, &s3c_irqext_chip);
764 set_irq_handler(irqno, handle_edge_irq);
765 set_irq_flags(irqno, IRQF_VALID);
766 }
767
768 /* register the uart interrupts */
769
770 irqdbf("s3c2410: registering external interrupts\n");
771
772 for (irqno = IRQ_S3CUART_RX0; irqno <= IRQ_S3CUART_ERR0; irqno++) {
773 irqdbf("registering irq %d (s3c uart0 irq)\n", irqno);
774 set_irq_chip(irqno, &s3c_irq_uart0);
775 set_irq_handler(irqno, handle_level_irq);
776 set_irq_flags(irqno, IRQF_VALID);
777 }
778
779 for (irqno = IRQ_S3CUART_RX1; irqno <= IRQ_S3CUART_ERR1; irqno++) {
780 irqdbf("registering irq %d (s3c uart1 irq)\n", irqno);
781 set_irq_chip(irqno, &s3c_irq_uart1);
782 set_irq_handler(irqno, handle_level_irq);
783 set_irq_flags(irqno, IRQF_VALID);
784 }
785
786 for (irqno = IRQ_S3CUART_RX2; irqno <= IRQ_S3CUART_ERR2; irqno++) {
787 irqdbf("registering irq %d (s3c uart2 irq)\n", irqno);
788 set_irq_chip(irqno, &s3c_irq_uart2);
789 set_irq_handler(irqno, handle_level_irq);
790 set_irq_flags(irqno, IRQF_VALID);
791 }
792
793 for (irqno = IRQ_TC; irqno <= IRQ_ADC; irqno++) {
794 irqdbf("registering irq %d (s3c adc irq)\n", irqno);
795 set_irq_chip(irqno, &s3c_irq_adc);
796 set_irq_handler(irqno, handle_edge_irq);
797 set_irq_flags(irqno, IRQF_VALID);
798 }
799
800 irqdbf("s3c2410: registered interrupt handlers\n");
801}
diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/plat-s3c24xx/pm-simtec.c
index 619133eb7168..bd965f2feeca 100644
--- a/arch/arm/mach-s3c2410/pm-simtec.c
+++ b/arch/arm/plat-s3c24xx/pm-simtec.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/pm-simtec.c 1/* linux/arch/arm/plat-s3c24xx/pm-simtec.c
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -32,7 +32,7 @@
32 32
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34 34
35#include "pm.h" 35#include <asm/plat-s3c24xx/pm.h>
36 36
37#define COPYRIGHT ", (c) 2005 Simtec Electronics" 37#define COPYRIGHT ", (c) 2005 Simtec Electronics"
38 38
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c
new file mode 100644
index 000000000000..ecf68d611904
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/pm.c
@@ -0,0 +1,659 @@
1/* linux/arch/arm/plat-s3c24xx/pm.c
2 *
3 * Copyright (c) 2004,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C24XX Power Manager (Suspend-To-RAM) support
7 *
8 * See Documentation/arm/Samsung-S3C24XX/Suspend.txt for more information
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 * Parts based on arch/arm/mach-pxa/pm.c
25 *
26 * Thanks to Dimitry Andric for debugging
27*/
28
29#include <linux/init.h>
30#include <linux/suspend.h>
31#include <linux/errno.h>
32#include <linux/time.h>
33#include <linux/interrupt.h>
34#include <linux/crc32.h>
35#include <linux/ioport.h>
36#include <linux/delay.h>
37#include <linux/serial_core.h>
38
39#include <asm/cacheflush.h>
40#include <asm/hardware.h>
41#include <asm/io.h>
42
43#include <asm/arch/regs-serial.h>
44#include <asm/arch/regs-clock.h>
45#include <asm/arch/regs-gpio.h>
46#include <asm/arch/regs-mem.h>
47#include <asm/arch/regs-irq.h>
48
49#include <asm/mach/time.h>
50
51#include <asm/plat-s3c24xx/pm.h>
52
53/* for external use */
54
55unsigned long s3c_pm_flags;
56
57#define PFX "s3c24xx-pm: "
58
59static struct sleep_save core_save[] = {
60 SAVE_ITEM(S3C2410_LOCKTIME),
61 SAVE_ITEM(S3C2410_CLKCON),
62
63 /* we restore the timings here, with the proviso that the board
64 * brings the system up in an slower, or equal frequency setting
65 * to the original system.
66 *
67 * if we cannot guarantee this, then things are going to go very
68 * wrong here, as we modify the refresh and both pll settings.
69 */
70
71 SAVE_ITEM(S3C2410_BWSCON),
72 SAVE_ITEM(S3C2410_BANKCON0),
73 SAVE_ITEM(S3C2410_BANKCON1),
74 SAVE_ITEM(S3C2410_BANKCON2),
75 SAVE_ITEM(S3C2410_BANKCON3),
76 SAVE_ITEM(S3C2410_BANKCON4),
77 SAVE_ITEM(S3C2410_BANKCON5),
78
79 SAVE_ITEM(S3C2410_CLKDIVN),
80 SAVE_ITEM(S3C2410_MPLLCON),
81 SAVE_ITEM(S3C2410_UPLLCON),
82 SAVE_ITEM(S3C2410_CLKSLOW),
83 SAVE_ITEM(S3C2410_REFRESH),
84};
85
86static struct sleep_save gpio_save[] = {
87 SAVE_ITEM(S3C2410_GPACON),
88 SAVE_ITEM(S3C2410_GPADAT),
89
90 SAVE_ITEM(S3C2410_GPBCON),
91 SAVE_ITEM(S3C2410_GPBDAT),
92 SAVE_ITEM(S3C2410_GPBUP),
93
94 SAVE_ITEM(S3C2410_GPCCON),
95 SAVE_ITEM(S3C2410_GPCDAT),
96 SAVE_ITEM(S3C2410_GPCUP),
97
98 SAVE_ITEM(S3C2410_GPDCON),
99 SAVE_ITEM(S3C2410_GPDDAT),
100 SAVE_ITEM(S3C2410_GPDUP),
101
102 SAVE_ITEM(S3C2410_GPECON),
103 SAVE_ITEM(S3C2410_GPEDAT),
104 SAVE_ITEM(S3C2410_GPEUP),
105
106 SAVE_ITEM(S3C2410_GPFCON),
107 SAVE_ITEM(S3C2410_GPFDAT),
108 SAVE_ITEM(S3C2410_GPFUP),
109
110 SAVE_ITEM(S3C2410_GPGCON),
111 SAVE_ITEM(S3C2410_GPGDAT),
112 SAVE_ITEM(S3C2410_GPGUP),
113
114 SAVE_ITEM(S3C2410_GPHCON),
115 SAVE_ITEM(S3C2410_GPHDAT),
116 SAVE_ITEM(S3C2410_GPHUP),
117
118 SAVE_ITEM(S3C2410_DCLKCON),
119};
120
121#ifdef CONFIG_S3C2410_PM_DEBUG
122
123#define SAVE_UART(va) \
124 SAVE_ITEM((va) + S3C2410_ULCON), \
125 SAVE_ITEM((va) + S3C2410_UCON), \
126 SAVE_ITEM((va) + S3C2410_UFCON), \
127 SAVE_ITEM((va) + S3C2410_UMCON), \
128 SAVE_ITEM((va) + S3C2410_UBRDIV)
129
130static struct sleep_save uart_save[] = {
131 SAVE_UART(S3C24XX_VA_UART0),
132 SAVE_UART(S3C24XX_VA_UART1),
133#ifndef CONFIG_CPU_S3C2400
134 SAVE_UART(S3C24XX_VA_UART2),
135#endif
136};
137
138/* debug
139 *
140 * we send the debug to printascii() to allow it to be seen if the
141 * system never wakes up from the sleep
142*/
143
144extern void printascii(const char *);
145
146void pm_dbg(const char *fmt, ...)
147{
148 va_list va;
149 char buff[256];
150
151 va_start(va, fmt);
152 vsprintf(buff, fmt, va);
153 va_end(va);
154
155 printascii(buff);
156}
157
158static void s3c2410_pm_debug_init(void)
159{
160 unsigned long tmp = __raw_readl(S3C2410_CLKCON);
161
162 /* re-start uart clocks */
163 tmp |= S3C2410_CLKCON_UART0;
164 tmp |= S3C2410_CLKCON_UART1;
165 tmp |= S3C2410_CLKCON_UART2;
166
167 __raw_writel(tmp, S3C2410_CLKCON);
168 udelay(10);
169}
170
171#define DBG(fmt...) pm_dbg(fmt)
172#else
173#define DBG(fmt...) printk(KERN_DEBUG fmt)
174
175#define s3c2410_pm_debug_init() do { } while(0)
176
177static struct sleep_save uart_save[] = {};
178#endif
179
180#if defined(CONFIG_S3C2410_PM_CHECK) && CONFIG_S3C2410_PM_CHECK_CHUNKSIZE != 0
181
182/* suspend checking code...
183 *
184 * this next area does a set of crc checks over all the installed
185 * memory, so the system can verify if the resume was ok.
186 *
187 * CONFIG_S3C2410_PM_CHECK_CHUNKSIZE defines the block-size for the CRC,
188 * increasing it will mean that the area corrupted will be less easy to spot,
189 * and reducing the size will cause the CRC save area to grow
190*/
191
192#define CHECK_CHUNKSIZE (CONFIG_S3C2410_PM_CHECK_CHUNKSIZE * 1024)
193
194static u32 crc_size; /* size needed for the crc block */
195static u32 *crcs; /* allocated over suspend/resume */
196
197typedef u32 *(run_fn_t)(struct resource *ptr, u32 *arg);
198
199/* s3c2410_pm_run_res
200 *
201 * go thorugh the given resource list, and look for system ram
202*/
203
204static void s3c2410_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg)
205{
206 while (ptr != NULL) {
207 if (ptr->child != NULL)
208 s3c2410_pm_run_res(ptr->child, fn, arg);
209
210 if ((ptr->flags & IORESOURCE_MEM) &&
211 strcmp(ptr->name, "System RAM") == 0) {
212 DBG("Found system RAM at %08lx..%08lx\n",
213 ptr->start, ptr->end);
214 arg = (fn)(ptr, arg);
215 }
216
217 ptr = ptr->sibling;
218 }
219}
220
221static void s3c2410_pm_run_sysram(run_fn_t fn, u32 *arg)
222{
223 s3c2410_pm_run_res(&iomem_resource, fn, arg);
224}
225
226static u32 *s3c2410_pm_countram(struct resource *res, u32 *val)
227{
228 u32 size = (u32)(res->end - res->start)+1;
229
230 size += CHECK_CHUNKSIZE-1;
231 size /= CHECK_CHUNKSIZE;
232
233 DBG("Area %08lx..%08lx, %d blocks\n", res->start, res->end, size);
234
235 *val += size * sizeof(u32);
236 return val;
237}
238
239/* s3c2410_pm_prepare_check
240 *
241 * prepare the necessary information for creating the CRCs. This
242 * must be done before the final save, as it will require memory
243 * allocating, and thus touching bits of the kernel we do not
244 * know about.
245*/
246
247static void s3c2410_pm_check_prepare(void)
248{
249 crc_size = 0;
250
251 s3c2410_pm_run_sysram(s3c2410_pm_countram, &crc_size);
252
253 DBG("s3c2410_pm_prepare_check: %u checks needed\n", crc_size);
254
255 crcs = kmalloc(crc_size+4, GFP_KERNEL);
256 if (crcs == NULL)
257 printk(KERN_ERR "Cannot allocated CRC save area\n");
258}
259
260static u32 *s3c2410_pm_makecheck(struct resource *res, u32 *val)
261{
262 unsigned long addr, left;
263
264 for (addr = res->start; addr < res->end;
265 addr += CHECK_CHUNKSIZE) {
266 left = res->end - addr;
267
268 if (left > CHECK_CHUNKSIZE)
269 left = CHECK_CHUNKSIZE;
270
271 *val = crc32_le(~0, phys_to_virt(addr), left);
272 val++;
273 }
274
275 return val;
276}
277
278/* s3c2410_pm_check_store
279 *
280 * compute the CRC values for the memory blocks before the final
281 * sleep.
282*/
283
284static void s3c2410_pm_check_store(void)
285{
286 if (crcs != NULL)
287 s3c2410_pm_run_sysram(s3c2410_pm_makecheck, crcs);
288}
289
290/* in_region
291 *
292 * return TRUE if the area defined by ptr..ptr+size contatins the
293 * what..what+whatsz
294*/
295
296static inline int in_region(void *ptr, int size, void *what, size_t whatsz)
297{
298 if ((what+whatsz) < ptr)
299 return 0;
300
301 if (what > (ptr+size))
302 return 0;
303
304 return 1;
305}
306
307static u32 *s3c2410_pm_runcheck(struct resource *res, u32 *val)
308{
309 void *save_at = phys_to_virt(s3c2410_sleep_save_phys);
310 unsigned long addr;
311 unsigned long left;
312 void *ptr;
313 u32 calc;
314
315 for (addr = res->start; addr < res->end;
316 addr += CHECK_CHUNKSIZE) {
317 left = res->end - addr;
318
319 if (left > CHECK_CHUNKSIZE)
320 left = CHECK_CHUNKSIZE;
321
322 ptr = phys_to_virt(addr);
323
324 if (in_region(ptr, left, crcs, crc_size)) {
325 DBG("skipping %08lx, has crc block in\n", addr);
326 goto skip_check;
327 }
328
329 if (in_region(ptr, left, save_at, 32*4 )) {
330 DBG("skipping %08lx, has save block in\n", addr);
331 goto skip_check;
332 }
333
334 /* calculate and check the checksum */
335
336 calc = crc32_le(~0, ptr, left);
337 if (calc != *val) {
338 printk(KERN_ERR PFX "Restore CRC error at "
339 "%08lx (%08x vs %08x)\n", addr, calc, *val);
340
341 DBG("Restore CRC error at %08lx (%08x vs %08x)\n",
342 addr, calc, *val);
343 }
344
345 skip_check:
346 val++;
347 }
348
349 return val;
350}
351
352/* s3c2410_pm_check_restore
353 *
354 * check the CRCs after the restore event and free the memory used
355 * to hold them
356*/
357
358static void s3c2410_pm_check_restore(void)
359{
360 if (crcs != NULL) {
361 s3c2410_pm_run_sysram(s3c2410_pm_runcheck, crcs);
362 kfree(crcs);
363 crcs = NULL;
364 }
365}
366
367#else
368
369#define s3c2410_pm_check_prepare() do { } while(0)
370#define s3c2410_pm_check_restore() do { } while(0)
371#define s3c2410_pm_check_store() do { } while(0)
372#endif
373
374/* helper functions to save and restore register state */
375
376void s3c2410_pm_do_save(struct sleep_save *ptr, int count)
377{
378 for (; count > 0; count--, ptr++) {
379 ptr->val = __raw_readl(ptr->reg);
380 DBG("saved %p value %08lx\n", ptr->reg, ptr->val);
381 }
382}
383
384/* s3c2410_pm_do_restore
385 *
386 * restore the system from the given list of saved registers
387 *
388 * Note, we do not use DBG() in here, as the system may not have
389 * restore the UARTs state yet
390*/
391
392void s3c2410_pm_do_restore(struct sleep_save *ptr, int count)
393{
394 for (; count > 0; count--, ptr++) {
395 printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n",
396 ptr->reg, ptr->val, __raw_readl(ptr->reg));
397
398 __raw_writel(ptr->val, ptr->reg);
399 }
400}
401
402/* s3c2410_pm_do_restore_core
403 *
404 * similar to s3c2410_pm_do_restore_core
405 *
406 * WARNING: Do not put any debug in here that may effect memory or use
407 * peripherals, as things may be changing!
408*/
409
410static void s3c2410_pm_do_restore_core(struct sleep_save *ptr, int count)
411{
412 for (; count > 0; count--, ptr++) {
413 __raw_writel(ptr->val, ptr->reg);
414 }
415}
416
417/* s3c2410_pm_show_resume_irqs
418 *
419 * print any IRQs asserted at resume time (ie, we woke from)
420*/
421
422static void s3c2410_pm_show_resume_irqs(int start, unsigned long which,
423 unsigned long mask)
424{
425 int i;
426
427 which &= ~mask;
428
429 for (i = 0; i <= 31; i++) {
430 if ((which) & (1L<<i)) {
431 DBG("IRQ %d asserted at resume\n", start+i);
432 }
433 }
434}
435
436/* s3c2410_pm_check_resume_pin
437 *
438 * check to see if the pin is configured correctly for sleep mode, and
439 * make any necessary adjustments if it is not
440*/
441
442static void s3c2410_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
443{
444 unsigned long irqstate;
445 unsigned long pinstate;
446 int irq = s3c2410_gpio_getirq(pin);
447
448 if (irqoffs < 4)
449 irqstate = s3c_irqwake_intmask & (1L<<irqoffs);
450 else
451 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs);
452
453 pinstate = s3c2410_gpio_getcfg(pin);
454
455 if (!irqstate) {
456 if (pinstate == S3C2410_GPIO_IRQ)
457 DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin);
458 } else {
459 if (pinstate == S3C2410_GPIO_IRQ) {
460 DBG("Disabling IRQ %d (pin %d)\n", irq, pin);
461 s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT);
462 }
463 }
464}
465
466/* s3c2410_pm_configure_extint
467 *
468 * configure all external interrupt pins
469*/
470
471static void s3c2410_pm_configure_extint(void)
472{
473 int pin;
474
475 /* for each of the external interrupts (EINT0..EINT15) we
476 * need to check wether it is an external interrupt source,
477 * and then configure it as an input if it is not
478 */
479
480 for (pin = S3C2410_GPF0; pin <= S3C2410_GPF7; pin++) {
481 s3c2410_pm_check_resume_pin(pin, pin - S3C2410_GPF0);
482 }
483
484 for (pin = S3C2410_GPG0; pin <= S3C2410_GPG7; pin++) {
485 s3c2410_pm_check_resume_pin(pin, (pin - S3C2410_GPG0)+8);
486 }
487}
488
489void (*pm_cpu_prep)(void);
490void (*pm_cpu_sleep)(void);
491
492#define any_allowed(mask, allow) (((mask) & (allow)) != (allow))
493
494/* s3c2410_pm_enter
495 *
496 * central control for sleep/resume process
497*/
498
499static int s3c2410_pm_enter(suspend_state_t state)
500{
501 unsigned long regs_save[16];
502
503 /* ensure the debug is initialised (if enabled) */
504
505 s3c2410_pm_debug_init();
506
507 DBG("s3c2410_pm_enter(%d)\n", state);
508
509 if (pm_cpu_prep == NULL || pm_cpu_sleep == NULL) {
510 printk(KERN_ERR PFX "error: no cpu sleep functions set\n");
511 return -EINVAL;
512 }
513
514 if (state != PM_SUSPEND_MEM) {
515 printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n");
516 return -EINVAL;
517 }
518
519 /* check if we have anything to wake-up with... bad things seem
520 * to happen if you suspend with no wakeup (system will often
521 * require a full power-cycle)
522 */
523
524 if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&
525 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) {
526 printk(KERN_ERR PFX "No sources enabled for wake-up!\n");
527 printk(KERN_ERR PFX "Aborting sleep\n");
528 return -EINVAL;
529 }
530
531 /* prepare check area if configured */
532
533 s3c2410_pm_check_prepare();
534
535 /* store the physical address of the register recovery block */
536
537 s3c2410_sleep_save_phys = virt_to_phys(regs_save);
538
539 DBG("s3c2410_sleep_save_phys=0x%08lx\n", s3c2410_sleep_save_phys);
540
541 /* save all necessary core registers not covered by the drivers */
542
543 s3c2410_pm_do_save(gpio_save, ARRAY_SIZE(gpio_save));
544 s3c2410_pm_do_save(core_save, ARRAY_SIZE(core_save));
545 s3c2410_pm_do_save(uart_save, ARRAY_SIZE(uart_save));
546
547 /* set the irq configuration for wake */
548
549 s3c2410_pm_configure_extint();
550
551 DBG("sleep: irq wakeup masks: %08lx,%08lx\n",
552 s3c_irqwake_intmask, s3c_irqwake_eintmask);
553
554 __raw_writel(s3c_irqwake_intmask, S3C2410_INTMSK);
555 __raw_writel(s3c_irqwake_eintmask, S3C2410_EINTMASK);
556
557 /* ack any outstanding external interrupts before we go to sleep */
558
559 __raw_writel(__raw_readl(S3C2410_EINTPEND), S3C2410_EINTPEND);
560 __raw_writel(__raw_readl(S3C2410_INTPND), S3C2410_INTPND);
561 __raw_writel(__raw_readl(S3C2410_SRCPND), S3C2410_SRCPND);
562
563 /* call cpu specific preperation */
564
565 pm_cpu_prep();
566
567 /* flush cache back to ram */
568
569 flush_cache_all();
570
571 s3c2410_pm_check_store();
572
573 /* send the cpu to sleep... */
574
575 __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */
576
577 /* s3c2410_cpu_save will also act as our return point from when
578 * we resume as it saves its own register state, so use the return
579 * code to differentiate return from save and return from sleep */
580
581 if (s3c2410_cpu_save(regs_save) == 0) {
582 flush_cache_all();
583 pm_cpu_sleep();
584 }
585
586 /* restore the cpu state */
587
588 cpu_init();
589
590 /* restore the system state */
591
592 s3c2410_pm_do_restore_core(core_save, ARRAY_SIZE(core_save));
593 s3c2410_pm_do_restore(gpio_save, ARRAY_SIZE(gpio_save));
594 s3c2410_pm_do_restore(uart_save, ARRAY_SIZE(uart_save));
595
596 s3c2410_pm_debug_init();
597
598 /* check what irq (if any) restored the system */
599
600 DBG("post sleep: IRQs 0x%08x, 0x%08x\n",
601 __raw_readl(S3C2410_SRCPND),
602 __raw_readl(S3C2410_EINTPEND));
603
604 s3c2410_pm_show_resume_irqs(IRQ_EINT0, __raw_readl(S3C2410_SRCPND),
605 s3c_irqwake_intmask);
606
607 s3c2410_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND),
608 s3c_irqwake_eintmask);
609
610 DBG("post sleep, preparing to return\n");
611
612 s3c2410_pm_check_restore();
613
614 /* ok, let's return from sleep */
615
616 DBG("S3C2410 PM Resume (post-restore)\n");
617 return 0;
618}
619
620/*
621 * Called after processes are frozen, but before we shut down devices.
622 */
623static int s3c2410_pm_prepare(suspend_state_t state)
624{
625 return 0;
626}
627
628/*
629 * Called after devices are re-setup, but before processes are thawed.
630 */
631static int s3c2410_pm_finish(suspend_state_t state)
632{
633 return 0;
634}
635
636/*
637 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
638 */
639static struct pm_ops s3c2410_pm_ops = {
640 .pm_disk_mode = PM_DISK_FIRMWARE,
641 .prepare = s3c2410_pm_prepare,
642 .enter = s3c2410_pm_enter,
643 .finish = s3c2410_pm_finish,
644};
645
646/* s3c2410_pm_init
647 *
648 * Attach the power management functions. This should be called
649 * from the board specific initialisation if the board supports
650 * it.
651*/
652
653int __init s3c2410_pm_init(void)
654{
655 printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n");
656
657 pm_set_ops(&s3c2410_pm_ops);
658 return 0;
659}
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/plat-s3c24xx/s3c244x-irq.c
index ede94636a72a..a0e39d894014 100644
--- a/arch/arm/mach-s3c2410/s3c244x-irq.c
+++ b/arch/arm/plat-s3c24xx/s3c244x-irq.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/s3c244x-irq.c 1/* linux/arch/arm/plat-s3c24xx/s3c244x-irq.c
2 * 2 *
3 * Copyright (c) 2003,2004 Simtec Electronics 3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -35,9 +35,9 @@
35#include <asm/arch/regs-irq.h> 35#include <asm/arch/regs-irq.h>
36#include <asm/arch/regs-gpio.h> 36#include <asm/arch/regs-gpio.h>
37 37
38#include "cpu.h" 38#include <asm/plat-s3c24xx/cpu.h>
39#include "pm.h" 39#include <asm/plat-s3c24xx/pm.h>
40#include "irq.h" 40#include <asm/plat-s3c24xx/irq.h>
41 41
42/* camera irq */ 42/* camera irq */
43 43
diff --git a/arch/arm/mach-s3c2410/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c
index 23c7494ad10d..767f2e9a3a55 100644
--- a/arch/arm/mach-s3c2410/s3c244x.c
+++ b/arch/arm/plat-s3c24xx/s3c244x.c
@@ -1,9 +1,9 @@
1/* linux/arch/arm/mach-s3c2410/s3c244x.c 1/* linux/arch/arm/plat-s3c24xx/s3c244x.c
2 * 2 *
3 * Copyright (c) 2004-2006 Simtec Electronics 3 * Copyright (c) 2004-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * Samsung S3C2440 and S3C2442 Mobile CPU support 6 * Samsung S3C2440 and S3C2442 Mobile CPU support (not S3C2443)
7 * 7 *
8 * 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
9 * 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
@@ -35,13 +35,13 @@
35#include <asm/arch/regs-gpioj.h> 35#include <asm/arch/regs-gpioj.h>
36#include <asm/arch/regs-dsc.h> 36#include <asm/arch/regs-dsc.h>
37 37
38#include "s3c2410.h" 38#include <asm/plat-s3c24xx/s3c2410.h>
39#include "s3c2440.h" 39#include <asm/plat-s3c24xx/s3c2440.h>
40#include "s3c244x.h" 40#include "s3c244x.h"
41#include "clock.h" 41#include <asm/plat-s3c24xx/clock.h>
42#include "devs.h" 42#include <asm/plat-s3c24xx/devs.h>
43#include "cpu.h" 43#include <asm/plat-s3c24xx/cpu.h>
44#include "pm.h" 44#include <asm/plat-s3c24xx/pm.h>
45 45
46static struct map_desc s3c244x_iodesc[] __initdata = { 46static struct map_desc s3c244x_iodesc[] __initdata = {
47 IODESC_ENT(CLKPWR), 47 IODESC_ENT(CLKPWR),
diff --git a/arch/arm/mach-s3c2410/s3c244x.h b/arch/arm/plat-s3c24xx/s3c244x.h
index 1488c1eb37e6..f8ed17676a35 100644
--- a/arch/arm/mach-s3c2410/s3c244x.h
+++ b/arch/arm/plat-s3c24xx/s3c244x.h
@@ -1,4 +1,4 @@
1/* arch/arm/mach-s3c2410/s3c244x.h 1/* linux/arch/arm/plat-s3c24xx/s3c244x.h
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
diff --git a/arch/arm/plat-s3c24xx/sleep.S b/arch/arm/plat-s3c24xx/sleep.S
new file mode 100644
index 000000000000..435349dc3243
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/sleep.S
@@ -0,0 +1,157 @@
1/* linux/arch/arm/mach-s3c2410/sleep.S
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 Power Manager (Suspend-To-RAM) support
7 *
8 * Based on PXA/SA1100 sleep code by:
9 * Nicolas Pitre, (c) 2002 Monta Vista Software Inc
10 * Cliff Brake, (c) 2001
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25*/
26
27#include <linux/linkage.h>
28#include <asm/assembler.h>
29#include <asm/hardware.h>
30#include <asm/arch/map.h>
31
32#include <asm/arch/regs-gpio.h>
33#include <asm/arch/regs-clock.h>
34#include <asm/arch/regs-mem.h>
35#include <asm/arch/regs-serial.h>
36
37/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not
38 * reset the UART configuration, only enable if you really need this!
39*/
40//#define CONFIG_DEBUG_RESUME
41
42 .text
43
44 /* s3c2410_cpu_save
45 *
46 * save enough of the CPU state to allow us to re-start
47 * pm.c code. as we store items like the sp/lr, we will
48 * end up returning from this function when the cpu resumes
49 * so the return value is set to mark this.
50 *
51 * This arangement means we avoid having to flush the cache
52 * from this code.
53 *
54 * entry:
55 * r0 = pointer to save block
56 *
57 * exit:
58 * r0 = 0 => we stored everything
59 * 1 => resumed from sleep
60 */
61
62ENTRY(s3c2410_cpu_save)
63 stmfd sp!, { r4 - r12, lr }
64
65 @@ store co-processor registers
66
67 mrc p15, 0, r4, c13, c0, 0 @ PID
68 mrc p15, 0, r5, c3, c0, 0 @ Domain ID
69 mrc p15, 0, r6, c2, c0, 0 @ translation table base address
70 mrc p15, 0, r7, c1, c0, 0 @ control register
71
72 stmia r0, { r4 - r13 }
73
74 mov r0, #0
75 ldmfd sp, { r4 - r12, pc }
76
77 @@ return to the caller, after having the MMU
78 @@ turned on, this restores the last bits from the
79 @@ stack
80resume_with_mmu:
81 mov r0, #1
82 ldmfd sp!, { r4 - r12, pc }
83
84 .ltorg
85
86 @@ the next bits sit in the .data segment, even though they
87 @@ happen to be code... the s3c2410_sleep_save_phys needs to be
88 @@ accessed by the resume code before it can restore the MMU.
89 @@ This means that the variable has to be close enough for the
90 @@ code to read it... since the .text segment needs to be RO,
91 @@ the data segment can be the only place to put this code.
92
93 .data
94
95 .global s3c2410_sleep_save_phys
96s3c2410_sleep_save_phys:
97 .word 0
98
99 /* s3c2410_cpu_resume
100 *
101 * resume code entry for bootloader to call
102 *
103 * we must put this code here in the data segment as we have no
104 * other way of restoring the stack pointer after sleep, and we
105 * must not write to the code segment (code is read-only)
106 */
107
108ENTRY(s3c2410_cpu_resume)
109 mov r0, #PSR_I_BIT | PSR_F_BIT | SVC_MODE
110 msr cpsr_c, r0
111
112 @@ load UART to allow us to print the two characters for
113 @@ resume debug
114
115 mov r2, #S3C24XX_PA_UART & 0xff000000
116 orr r2, r2, #S3C24XX_PA_UART & 0xff000
117
118#if 0
119 /* SMDK2440 LED set */
120 mov r14, #S3C24XX_PA_GPIO
121 ldr r12, [ r14, #0x54 ]
122 bic r12, r12, #3<<4
123 orr r12, r12, #1<<7
124 str r12, [ r14, #0x54 ]
125#endif
126
127#ifdef CONFIG_DEBUG_RESUME
128 mov r3, #'L'
129 strb r3, [ r2, #S3C2410_UTXH ]
1301001:
131 ldrb r14, [ r3, #S3C2410_UTRSTAT ]
132 tst r14, #S3C2410_UTRSTAT_TXE
133 beq 1001b
134#endif /* CONFIG_DEBUG_RESUME */
135
136 mov r1, #0
137 mcr p15, 0, r1, c8, c7, 0 @@ invalidate I & D TLBs
138 mcr p15, 0, r1, c7, c7, 0 @@ invalidate I & D caches
139
140 ldr r0, s3c2410_sleep_save_phys @ address of restore block
141 ldmia r0, { r4 - r13 }
142
143 mcr p15, 0, r4, c13, c0, 0 @ PID
144 mcr p15, 0, r5, c3, c0, 0 @ Domain ID
145 mcr p15, 0, r6, c2, c0, 0 @ translation table base
146
147#ifdef CONFIG_DEBUG_RESUME
148 mov r3, #'R'
149 strb r3, [ r2, #S3C2410_UTXH ]
150#endif
151
152 ldr r2, =resume_with_mmu
153 mcr p15, 0, r7, c1, c0, 0 @ turn on MMU, etc
154 nop @ second-to-last before mmu
155 mov pc, r2 @ go back to virtual address
156
157 .ltorg
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/plat-s3c24xx/time.c
index 9910bf0f2cea..c523d1c9cce5 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/plat-s3c24xx/time.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/time.c 1/* linux/arch/arm/plat-s3c24xx/time.c
2 * 2 *
3 * Copyright (C) 2003-2005 Simtec Electronics 3 * Copyright (C) 2003-2005 Simtec Electronics
4 * Ben Dooks, <ben@simtec.co.uk> 4 * Ben Dooks, <ben@simtec.co.uk>
@@ -37,8 +37,8 @@
37#include <asm/arch/regs-irq.h> 37#include <asm/arch/regs-irq.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39 39
40#include "clock.h" 40#include <asm/plat-s3c24xx/clock.h>
41#include "cpu.h" 41#include <asm/plat-s3c24xx/cpu.h>
42 42
43static unsigned long timer_startval; 43static unsigned long timer_startval;
44static unsigned long timer_usec_ticks; 44static unsigned long timer_usec_ticks;
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index 74eba8b5a8ca..989113dce415 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -60,6 +60,10 @@ config GENERIC_CALIBRATE_DELAY
60config GENERIC_BUST_SPINLOCK 60config GENERIC_BUST_SPINLOCK
61 bool 61 bool
62 62
63config ZONE_DMA
64 bool
65 default y
66
63config GENERIC_ISA_DMA 67config GENERIC_ISA_DMA
64 bool 68 bool
65 69
diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c
index 9dbc17247c6f..e2bcefc91cc3 100644
--- a/arch/arm26/kernel/ecard.c
+++ b/arch/arm26/kernel/ecard.c
@@ -665,7 +665,7 @@ ecard_probe(int slot, card_type_t type)
665 ec->fiqmask = 4; 665 ec->fiqmask = 4;
666 } 666 }
667 667
668 for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) 668 for (i = 0; i < ARRAY_SIZE(blacklist); i++)
669 if (blacklist[i].manufacturer == ec->cid.manufacturer && 669 if (blacklist[i].manufacturer == ec->cid.manufacturer &&
670 blacklist[i].product == ec->cid.product) { 670 blacklist[i].product == ec->cid.product) {
671 ec->card_desc = blacklist[i].type; 671 ec->card_desc = blacklist[i].type;
diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c
index 466ddb54b44f..0e006c6cd5a0 100644
--- a/arch/arm26/kernel/setup.c
+++ b/arch/arm26/kernel/setup.c
@@ -80,7 +80,7 @@ unsigned long phys_initrd_size __initdata = 0;
80static struct meminfo meminfo __initdata = { 0, }; 80static struct meminfo meminfo __initdata = { 0, };
81static struct proc_info_item proc_info; 81static struct proc_info_item proc_info;
82static const char *machine_name; 82static const char *machine_name;
83static char command_line[COMMAND_LINE_SIZE]; 83static char __initdata command_line[COMMAND_LINE_SIZE];
84 84
85static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; 85static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
86 86
@@ -492,8 +492,8 @@ void __init setup_arch(char **cmdline_p)
492 init_mm.end_data = (unsigned long) &_edata; 492 init_mm.end_data = (unsigned long) &_edata;
493 init_mm.brk = (unsigned long) &_end; 493 init_mm.brk = (unsigned long) &_end;
494 494
495 memcpy(saved_command_line, from, COMMAND_LINE_SIZE); 495 memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
496 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 496 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
497 parse_cmdline(&meminfo, cmdline_p, from); 497 parse_cmdline(&meminfo, cmdline_p, from);
498 bootmem_init(&meminfo); 498 bootmem_init(&meminfo);
499 paging_init(&meminfo); 499 paging_init(&meminfo);
diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c
index 1206469b2b86..0f1d57fbd3d7 100644
--- a/arch/arm26/kernel/time.c
+++ b/arch/arm26/kernel/time.c
@@ -89,14 +89,6 @@ static unsigned long gettimeoffset(void)
89 return (offset + LATCH/2) / LATCH; 89 return (offset + LATCH/2) / LATCH;
90} 90}
91 91
92/*
93 * Scheduler clock - returns current time in nanosec units.
94 */
95unsigned long long sched_clock(void)
96{
97 return (unsigned long long)jiffies * (1000000000 / HZ);
98}
99
100static unsigned long next_rtc_update; 92static unsigned long next_rtc_update;
101 93
102/* 94/*
diff --git a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
index ca61ec8218fe..046a85054018 100644
--- a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
+++ b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
@@ -46,10 +46,12 @@ SECTIONS
46 __con_initcall_start = .; 46 __con_initcall_start = .;
47 *(.con_initcall.init) 47 *(.con_initcall.init)
48 __con_initcall_end = .; 48 __con_initcall_end = .;
49#ifdef CONFIG_BLK_DEV_INITRD
49 . = ALIGN(32); 50 . = ALIGN(32);
50 __initramfs_start = .; 51 __initramfs_start = .;
51 usr/built-in.o(.init.ramfs) 52 usr/built-in.o(.init.ramfs)
52 __initramfs_end = .; 53 __initramfs_end = .;
54#endif
53 . = ALIGN(32768); 55 . = ALIGN(32768);
54 __init_end = .; 56 __init_end = .;
55 } 57 }
diff --git a/arch/arm26/kernel/vmlinux-arm26.lds.in b/arch/arm26/kernel/vmlinux-arm26.lds.in
index d1d3418d7eb6..1d2949e83be8 100644
--- a/arch/arm26/kernel/vmlinux-arm26.lds.in
+++ b/arch/arm26/kernel/vmlinux-arm26.lds.in
@@ -47,10 +47,12 @@ SECTIONS
47 __con_initcall_start = .; 47 __con_initcall_start = .;
48 *(.con_initcall.init) 48 *(.con_initcall.init)
49 __con_initcall_end = .; 49 __con_initcall_end = .;
50#ifdef CONFIG_BLK_DEV_INITRD
50 . = ALIGN(32); 51 . = ALIGN(32);
51 __initramfs_start = .; 52 __initramfs_start = .;
52 usr/built-in.o(.init.ramfs) 53 usr/built-in.o(.init.ramfs)
53 __initramfs_end = .; 54 __initramfs_end = .;
55#endif
54 . = ALIGN(32768); 56 . = ALIGN(32768);
55 __init_end = .; 57 __init_end = .;
56 } 58 }
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile
index df9499480530..8e0992201bb9 100644
--- a/arch/avr32/boards/atstk1000/Makefile
+++ b/arch/avr32/boards/atstk1000/Makefile
@@ -1,2 +1,2 @@
1obj-y += setup.o spi.o flash.o 1obj-y += setup.o flash.o
2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o 2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 32b361f31c2c..5974768a59e5 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -14,11 +14,17 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/spi/spi.h>
17 18
18#include <asm/io.h> 19#include <asm/io.h>
19#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/arch/at32ap7000.h>
20#include <asm/arch/board.h> 22#include <asm/arch/board.h>
21#include <asm/arch/init.h> 23#include <asm/arch/init.h>
24#include <asm/arch/portmux.h>
25
26
27#define SW2_DEFAULT /* MMCI and UART_A available */
22 28
23struct eth_addr { 29struct eth_addr {
24 u8 addr[6]; 30 u8 addr[6];
@@ -29,6 +35,15 @@ static struct eth_addr __initdata hw_addr[2];
29static struct eth_platform_data __initdata eth_data[2]; 35static struct eth_platform_data __initdata eth_data[2];
30extern struct lcdc_platform_data atstk1000_fb0_data; 36extern struct lcdc_platform_data atstk1000_fb0_data;
31 37
38static struct spi_board_info spi0_board_info[] __initdata = {
39 {
40 /* QVGA display */
41 .modalias = "ltv350qv",
42 .max_speed_hz = 16000000,
43 .chip_select = 1,
44 },
45};
46
32/* 47/*
33 * The next two functions should go away as the boot loader is 48 * The next two functions should go away as the boot loader is
34 * supposed to initialize the macb address registers with a valid 49 * supposed to initialize the macb address registers with a valid
@@ -86,24 +101,53 @@ static void __init set_hw_addr(struct platform_device *pdev)
86 101
87void __init setup_board(void) 102void __init setup_board(void)
88{ 103{
89 at32_map_usart(1, 0); /* /dev/ttyS0 */ 104#ifdef SW2_DEFAULT
90 at32_map_usart(2, 1); /* /dev/ttyS1 */ 105 at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
91 at32_map_usart(3, 2); /* /dev/ttyS2 */ 106#else
107 at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
108#endif
109 /* USART 2/unused: expansion connector */
110 at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
92 111
93 at32_setup_serial_console(0); 112 at32_setup_serial_console(0);
94} 113}
95 114
96static int __init atstk1002_init(void) 115static int __init atstk1002_init(void)
97{ 116{
117 /*
118 * ATSTK1000 uses 32-bit SDRAM interface. Reserve the
119 * SDRAM-specific pins so that nobody messes with them.
120 */
121 at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */
122 at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */
123 at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */
124 at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */
125 at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */
126 at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */
127 at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */
128 at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */
129 at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */
130 at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */
131 at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */
132 at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */
133 at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */
134 at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */
135 at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */
136 at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */
137 at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */
138
98 at32_add_system_devices(); 139 at32_add_system_devices();
99 140
141#ifdef SW2_DEFAULT
100 at32_add_device_usart(0); 142 at32_add_device_usart(0);
143#else
101 at32_add_device_usart(1); 144 at32_add_device_usart(1);
145#endif
102 at32_add_device_usart(2); 146 at32_add_device_usart(2);
103 147
104 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 148 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
105 149
106 at32_add_device_spi(0); 150 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
107 at32_add_device_lcdc(0, &atstk1000_fb0_data); 151 at32_add_device_lcdc(0, &atstk1000_fb0_data);
108 152
109 return 0; 153 return 0;
diff --git a/arch/avr32/boards/atstk1000/spi.c b/arch/avr32/boards/atstk1000/spi.c
deleted file mode 100644
index 567726c82c6e..000000000000
--- a/arch/avr32/boards/atstk1000/spi.c
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * ATSTK1000 SPI devices
3 *
4 * Copyright (C) 2005 Atmel Norway
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/device.h>
11#include <linux/spi/spi.h>
12
13static struct spi_board_info spi_board_info[] __initdata = {
14 {
15 .modalias = "ltv350qv",
16 .max_speed_hz = 16000000,
17 .bus_num = 0,
18 .chip_select = 1,
19 },
20};
21
22static int board_init_spi(void)
23{
24 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
25 return 0;
26}
27arch_initcall(board_init_spi);
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c
index 342452ba2049..2e72fd2699df 100644
--- a/arch/avr32/kernel/cpu.c
+++ b/arch/avr32/kernel/cpu.c
@@ -9,6 +9,7 @@
9#include <linux/sysdev.h> 9#include <linux/sysdev.h>
10#include <linux/seq_file.h> 10#include <linux/seq_file.h>
11#include <linux/cpu.h> 11#include <linux/cpu.h>
12#include <linux/module.h>
12#include <linux/percpu.h> 13#include <linux/percpu.h>
13#include <linux/param.h> 14#include <linux/param.h>
14#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c
index 856f3548e664..fd311248c143 100644
--- a/arch/avr32/kernel/irq.c
+++ b/arch/avr32/kernel/irq.c
@@ -57,6 +57,7 @@ int show_interrupts(struct seq_file *p, void *v)
57 seq_printf(p, "%3d: ", i); 57 seq_printf(p, "%3d: ", i);
58 for_each_online_cpu(cpu) 58 for_each_online_cpu(cpu)
59 seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]); 59 seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
60 seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
60 seq_printf(p, " %s", action->name); 61 seq_printf(p, " %s", action->name);
61 for (action = action->next; action; action = action->next) 62 for (action = action->next; action; action = action->next)
62 seq_printf(p, ", %s", action->name); 63 seq_printf(p, ", %s", action->name);
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index a34211601008..a1a7c3c3f522 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/root_dev.h> 17#include <linux/root_dev.h>
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/kernel.h>
19 20
20#include <asm/sections.h> 21#include <asm/sections.h>
21#include <asm/processor.h> 22#include <asm/processor.h>
@@ -44,7 +45,7 @@ struct avr32_cpuinfo boot_cpu_data = {
44}; 45};
45EXPORT_SYMBOL(boot_cpu_data); 46EXPORT_SYMBOL(boot_cpu_data);
46 47
47static char command_line[COMMAND_LINE_SIZE]; 48static char __initdata command_line[COMMAND_LINE_SIZE];
48 49
49/* 50/*
50 * Should be more than enough, but if you have a _really_ complex 51 * Should be more than enough, but if you have a _really_ complex
@@ -174,8 +175,7 @@ static int __init parse_tag_mem_range(struct tag *tag,
174 * Copy the data so the bootmem init code doesn't need to care 175 * Copy the data so the bootmem init code doesn't need to care
175 * about it. 176 * about it.
176 */ 177 */
177 if (mem_range_next_free >= 178 if (mem_range_next_free >= ARRAY_SIZE(mem_range_cache))
178 (sizeof(mem_range_cache) / sizeof(mem_range_cache[0])))
179 panic("Physical memory map too complex!\n"); 179 panic("Physical memory map too complex!\n");
180 180
181 new = &mem_range_cache[mem_range_next_free++]; 181 new = &mem_range_cache[mem_range_next_free++];
@@ -202,7 +202,7 @@ __tagtable(ATAG_MEM, parse_tag_mem);
202 202
203static int __init parse_tag_cmdline(struct tag *tag) 203static int __init parse_tag_cmdline(struct tag *tag)
204{ 204{
205 strlcpy(saved_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); 205 strlcpy(boot_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
206 return 0; 206 return 0;
207} 207}
208__tagtable(ATAG_CMDLINE, parse_tag_cmdline); 208__tagtable(ATAG_CMDLINE, parse_tag_cmdline);
@@ -294,7 +294,7 @@ void __init setup_arch (char **cmdline_p)
294 init_mm.end_data = (unsigned long) &_edata; 294 init_mm.end_data = (unsigned long) &_edata;
295 init_mm.brk = (unsigned long) &_end; 295 init_mm.brk = (unsigned long) &_end;
296 296
297 strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE); 297 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
298 *cmdline_p = command_line; 298 *cmdline_p = command_line;
299 parse_early_param(); 299 parse_early_param();
300 300
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S
index db8f8b55ffdf..7c279586fbba 100644
--- a/arch/avr32/kernel/syscall_table.S
+++ b/arch/avr32/kernel/syscall_table.S
@@ -8,14 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE)
12#define sys_nfsservctl sys_ni_syscall
13#endif
14
15#if !defined(CONFIG_SYSV_IPC)
16# define sys_ipc sys_ni_syscall
17#endif
18
19 .section .rodata,"a",@progbits 11 .section .rodata,"a",@progbits
20 .type sys_call_table,@object 12 .type sys_call_table,@object
21 .global sys_call_table 13 .global sys_call_table
@@ -129,7 +121,7 @@ sys_call_table:
129 .long sys_getitimer /* 105 */ 121 .long sys_getitimer /* 105 */
130 .long sys_swapoff 122 .long sys_swapoff
131 .long sys_sysinfo 123 .long sys_sysinfo
132 .long sys_ipc 124 .long sys_ni_syscall /* was sys_ipc briefly */
133 .long sys_sendfile 125 .long sys_sendfile
134 .long sys_setdomainname /* 110 */ 126 .long sys_setdomainname /* 110 */
135 .long sys_newuname 127 .long sys_newuname
@@ -287,4 +279,16 @@ sys_call_table:
287 .long sys_tee 279 .long sys_tee
288 .long sys_vmsplice 280 .long sys_vmsplice
289 .long __sys_epoll_pwait /* 265 */ 281 .long __sys_epoll_pwait /* 265 */
282 .long sys_msgget
283 .long sys_msgsnd
284 .long sys_msgrcv
285 .long sys_msgctl
286 .long sys_semget /* 270 */
287 .long sys_semop
288 .long sys_semctl
289 .long sys_semtimedop
290 .long sys_shmat
291 .long sys_shmget /* 275 */
292 .long sys_shmdt
293 .long sys_shmctl
290 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ 294 .long sys_ni_syscall /* r8 is saturated at nr_syscalls */
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 5a247ba71a72..c10833f2ee0c 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -37,7 +37,7 @@ static struct clocksource clocksource_avr32 = {
37 .read = read_cycle_count, 37 .read = read_cycle_count,
38 .mask = CLOCKSOURCE_MASK(32), 38 .mask = CLOCKSOURCE_MASK(32),
39 .shift = 16, 39 .shift = 16,
40 .is_continuous = 1, 40 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
41}; 41};
42 42
43/* 43/*
@@ -110,15 +110,6 @@ static void avr32_hpt_init(unsigned int count)
110} 110}
111 111
112/* 112/*
113 * Scheduler clock - returns current time in nanosec units.
114 */
115unsigned long long sched_clock(void)
116{
117 /* There must be better ways...? */
118 return (unsigned long long)jiffies * (1000000000 / HZ);
119}
120
121/*
122 * local_timer_interrupt() does profiling and process accounting on a 113 * local_timer_interrupt() does profiling and process accounting on a
123 * per-CPU basis. 114 * per-CPU basis.
124 * 115 *
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c
index 5c4424e362b5..ef13b7c78935 100644
--- a/arch/avr32/kernel/vmlinux.lds.c
+++ b/arch/avr32/kernel/vmlinux.lds.c
@@ -46,10 +46,12 @@ SECTIONS
46 __security_initcall_start = .; 46 __security_initcall_start = .;
47 *(.security_initcall.init) 47 *(.security_initcall.init)
48 __security_initcall_end = .; 48 __security_initcall_end = .;
49#ifdef CONFIG_BLK_DEV_INITRD
49 . = ALIGN(32); 50 . = ALIGN(32);
50 __initramfs_start = .; 51 __initramfs_start = .;
51 *(.init.ramfs) 52 *(.init.ramfs)
52 __initramfs_end = .; 53 __initramfs_end = .;
54#endif
53 . = ALIGN(4096); 55 . = ALIGN(4096);
54 __init_end = .; 56 __init_end = .;
55 } 57 }
diff --git a/arch/avr32/lib/libgcc.h b/arch/avr32/lib/libgcc.h
deleted file mode 100644
index 5a091b5e3618..000000000000
--- a/arch/avr32/lib/libgcc.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/* Definitions for various functions 'borrowed' from gcc-3.4.3 */
2
3#define BITS_PER_UNIT 8
4
5typedef int QItype __attribute__ ((mode (QI)));
6typedef unsigned int UQItype __attribute__ ((mode (QI)));
7typedef int HItype __attribute__ ((mode (HI)));
8typedef unsigned int UHItype __attribute__ ((mode (HI)));
9typedef int SItype __attribute__ ((mode (SI)));
10typedef unsigned int USItype __attribute__ ((mode (SI)));
11typedef int DItype __attribute__ ((mode (DI)));
12typedef unsigned int UDItype __attribute__ ((mode (DI)));
13typedef float SFtype __attribute__ ((mode (SF)));
14typedef float DFtype __attribute__ ((mode (DF)));
15typedef int word_type __attribute__ ((mode (__word__)));
16
17#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
18#define Wtype SItype
19#define UWtype USItype
20#define HWtype SItype
21#define UHWtype USItype
22#define DWtype DItype
23#define UDWtype UDItype
24#define __NW(a,b) __ ## a ## si ## b
25#define __NDW(a,b) __ ## a ## di ## b
26
27struct DWstruct {Wtype high, low;};
28
29typedef union
30{
31 struct DWstruct s;
32 DWtype ll;
33} DWunion;
diff --git a/arch/avr32/lib/longlong.h b/arch/avr32/lib/longlong.h
deleted file mode 100644
index cd5e369ac437..000000000000
--- a/arch/avr32/lib/longlong.h
+++ /dev/null
@@ -1,98 +0,0 @@
1/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
2 Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc.
4
5 This definition file is free software; you can redistribute it
6 and/or modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2, or (at your option) any later version.
9
10 This definition file is distributed in the hope that it will be
11 useful, but WITHOUT ANY WARRANTY; without even the implied
12 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the 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,
18 Boston, MA 02111-1307, USA. */
19
20/* Borrowed from gcc-3.4.3 */
21
22#define __BITS4 (W_TYPE_SIZE / 4)
23#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
24#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
25#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
26
27#define count_leading_zeros(count, x) ((count) = __builtin_clz(x))
28
29#define __udiv_qrnnd_c(q, r, n1, n0, d) \
30 do { \
31 UWtype __d1, __d0, __q1, __q0; \
32 UWtype __r1, __r0, __m; \
33 __d1 = __ll_highpart (d); \
34 __d0 = __ll_lowpart (d); \
35 \
36 __r1 = (n1) % __d1; \
37 __q1 = (n1) / __d1; \
38 __m = (UWtype) __q1 * __d0; \
39 __r1 = __r1 * __ll_B | __ll_highpart (n0); \
40 if (__r1 < __m) \
41 { \
42 __q1--, __r1 += (d); \
43 if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
44 if (__r1 < __m) \
45 __q1--, __r1 += (d); \
46 } \
47 __r1 -= __m; \
48 \
49 __r0 = __r1 % __d1; \
50 __q0 = __r1 / __d1; \
51 __m = (UWtype) __q0 * __d0; \
52 __r0 = __r0 * __ll_B | __ll_lowpart (n0); \
53 if (__r0 < __m) \
54 { \
55 __q0--, __r0 += (d); \
56 if (__r0 >= (d)) \
57 if (__r0 < __m) \
58 __q0--, __r0 += (d); \
59 } \
60 __r0 -= __m; \
61 \
62 (q) = (UWtype) __q1 * __ll_B | __q0; \
63 (r) = __r0; \
64 } while (0)
65
66#define udiv_qrnnd __udiv_qrnnd_c
67
68#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
69 do { \
70 UWtype __x; \
71 __x = (al) - (bl); \
72 (sh) = (ah) - (bh) - (__x > (al)); \
73 (sl) = __x; \
74 } while (0)
75
76#define umul_ppmm(w1, w0, u, v) \
77 do { \
78 UWtype __x0, __x1, __x2, __x3; \
79 UHWtype __ul, __vl, __uh, __vh; \
80 \
81 __ul = __ll_lowpart (u); \
82 __uh = __ll_highpart (u); \
83 __vl = __ll_lowpart (v); \
84 __vh = __ll_highpart (v); \
85 \
86 __x0 = (UWtype) __ul * __vl; \
87 __x1 = (UWtype) __ul * __vh; \
88 __x2 = (UWtype) __uh * __vl; \
89 __x3 = (UWtype) __uh * __vh; \
90 \
91 __x1 += __ll_highpart (__x0);/* this can't give carry */ \
92 __x1 += __x2; /* but this indeed can */ \
93 if (__x1 < __x2) /* did we get it? */ \
94 __x3 += __ll_B; /* yes, add it in the proper pos. */ \
95 \
96 (w1) = __x3 + __ll_highpart (__x1); \
97 (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
98 } while (0)
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile
index f62eb6915510..b21bea9af8b1 100644
--- a/arch/avr32/mach-at32ap/Makefile
+++ b/arch/avr32/mach-at32ap/Makefile
@@ -1,2 +1,2 @@
1obj-y += at32ap.o clock.o pio.o intc.o extint.o hsmc.o 1obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o
2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o 2obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c
index 48f4ef38c70e..bc235507c5c7 100644
--- a/arch/avr32/mach-at32ap/at32ap7000.c
+++ b/arch/avr32/mach-at32ap/at32ap7000.c
@@ -8,6 +8,7 @@
8#include <linux/clk.h> 8#include <linux/clk.h>
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/spi/spi.h>
11 12
12#include <asm/io.h> 13#include <asm/io.h>
13 14
@@ -310,8 +311,6 @@ static void genclk_mode(struct clk *clk, int enabled)
310{ 311{
311 u32 control; 312 u32 control;
312 313
313 BUG_ON(clk->index > 7);
314
315 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 314 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index);
316 if (enabled) 315 if (enabled)
317 control |= SM_BIT(CEN); 316 control |= SM_BIT(CEN);
@@ -325,11 +324,6 @@ static unsigned long genclk_get_rate(struct clk *clk)
325 u32 control; 324 u32 control;
326 unsigned long div = 1; 325 unsigned long div = 1;
327 326
328 BUG_ON(clk->index > 7);
329
330 if (!clk->parent)
331 return 0;
332
333 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 327 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index);
334 if (control & SM_BIT(DIVEN)) 328 if (control & SM_BIT(DIVEN))
335 div = 2 * (SM_BFEXT(DIV, control) + 1); 329 div = 2 * (SM_BFEXT(DIV, control) + 1);
@@ -342,11 +336,6 @@ static long genclk_set_rate(struct clk *clk, unsigned long rate, int apply)
342 u32 control; 336 u32 control;
343 unsigned long parent_rate, actual_rate, div; 337 unsigned long parent_rate, actual_rate, div;
344 338
345 BUG_ON(clk->index > 7);
346
347 if (!clk->parent)
348 return 0;
349
350 parent_rate = clk->parent->get_rate(clk->parent); 339 parent_rate = clk->parent->get_rate(clk->parent);
351 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 340 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index);
352 341
@@ -373,11 +362,8 @@ int genclk_set_parent(struct clk *clk, struct clk *parent)
373{ 362{
374 u32 control; 363 u32 control;
375 364
376 BUG_ON(clk->index > 7);
377
378 printk("clk %s: new parent %s (was %s)\n", 365 printk("clk %s: new parent %s (was %s)\n",
379 clk->name, parent->name, 366 clk->name, parent->name, clk->parent->name);
380 clk->parent ? clk->parent->name : "(null)");
381 367
382 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); 368 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index);
383 369
@@ -399,6 +385,22 @@ int genclk_set_parent(struct clk *clk, struct clk *parent)
399 return 0; 385 return 0;
400} 386}
401 387
388static void __init genclk_init_parent(struct clk *clk)
389{
390 u32 control;
391 struct clk *parent;
392
393 BUG_ON(clk->index > 7);
394
395 control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index);
396 if (control & SM_BIT(OSCSEL))
397 parent = (control & SM_BIT(PLLSEL)) ? &pll1 : &osc1;
398 else
399 parent = (control & SM_BIT(PLLSEL)) ? &pll0 : &osc0;
400
401 clk->parent = parent;
402}
403
402/* -------------------------------------------------------------------- 404/* --------------------------------------------------------------------
403 * System peripherals 405 * System peripherals
404 * -------------------------------------------------------------------- */ 406 * -------------------------------------------------------------------- */
@@ -496,9 +498,16 @@ static struct resource pio3_resource[] = {
496DEFINE_DEV(pio, 3); 498DEFINE_DEV(pio, 3);
497DEV_CLK(mck, pio3, pba, 13); 499DEV_CLK(mck, pio3, pba, 13);
498 500
501static struct resource pio4_resource[] = {
502 PBMEM(0xffe03800),
503 IRQ(17),
504};
505DEFINE_DEV(pio, 4);
506DEV_CLK(mck, pio4, pba, 14);
507
499void __init at32_add_system_devices(void) 508void __init at32_add_system_devices(void)
500{ 509{
501 system_manager.eim_first_irq = NR_INTERNAL_IRQS; 510 system_manager.eim_first_irq = EIM_IRQ_BASE;
502 511
503 platform_device_register(&at32_sm_device); 512 platform_device_register(&at32_sm_device);
504 platform_device_register(&at32_intc0_device); 513 platform_device_register(&at32_intc0_device);
@@ -509,6 +518,7 @@ void __init at32_add_system_devices(void)
509 platform_device_register(&pio1_device); 518 platform_device_register(&pio1_device);
510 platform_device_register(&pio2_device); 519 platform_device_register(&pio2_device);
511 platform_device_register(&pio3_device); 520 platform_device_register(&pio3_device);
521 platform_device_register(&pio4_device);
512} 522}
513 523
514/* -------------------------------------------------------------------- 524/* --------------------------------------------------------------------
@@ -521,7 +531,7 @@ static struct atmel_uart_data atmel_usart0_data = {
521}; 531};
522static struct resource atmel_usart0_resource[] = { 532static struct resource atmel_usart0_resource[] = {
523 PBMEM(0xffe00c00), 533 PBMEM(0xffe00c00),
524 IRQ(7), 534 IRQ(6),
525}; 535};
526DEFINE_DEV_DATA(atmel_usart, 0); 536DEFINE_DEV_DATA(atmel_usart, 0);
527DEV_CLK(usart, atmel_usart0, pba, 4); 537DEV_CLK(usart, atmel_usart0, pba, 4);
@@ -583,7 +593,7 @@ static inline void configure_usart3_pins(void)
583 select_peripheral(PB(17), PERIPH_B, 0); /* TXD */ 593 select_peripheral(PB(17), PERIPH_B, 0); /* TXD */
584} 594}
585 595
586static struct platform_device *at32_usarts[4]; 596static struct platform_device *__initdata at32_usarts[4];
587 597
588void __init at32_map_usart(unsigned int hw_id, unsigned int line) 598void __init at32_map_usart(unsigned int hw_id, unsigned int line)
589{ 599{
@@ -728,32 +738,79 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data)
728/* -------------------------------------------------------------------- 738/* --------------------------------------------------------------------
729 * SPI 739 * SPI
730 * -------------------------------------------------------------------- */ 740 * -------------------------------------------------------------------- */
731static struct resource spi0_resource[] = { 741static struct resource atmel_spi0_resource[] = {
732 PBMEM(0xffe00000), 742 PBMEM(0xffe00000),
733 IRQ(3), 743 IRQ(3),
734}; 744};
735DEFINE_DEV(spi, 0); 745DEFINE_DEV(atmel_spi, 0);
736DEV_CLK(mck, spi0, pba, 0); 746DEV_CLK(spi_clk, atmel_spi0, pba, 0);
747
748static struct resource atmel_spi1_resource[] = {
749 PBMEM(0xffe00400),
750 IRQ(4),
751};
752DEFINE_DEV(atmel_spi, 1);
753DEV_CLK(spi_clk, atmel_spi1, pba, 1);
737 754
738struct platform_device *__init at32_add_device_spi(unsigned int id) 755static void
756at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b,
757 unsigned int n, const u8 *pins)
739{ 758{
759 unsigned int pin, mode;
760
761 for (; n; n--, b++) {
762 b->bus_num = bus_num;
763 if (b->chip_select >= 4)
764 continue;
765 pin = (unsigned)b->controller_data;
766 if (!pin) {
767 pin = pins[b->chip_select];
768 b->controller_data = (void *)pin;
769 }
770 mode = AT32_GPIOF_OUTPUT;
771 if (!(b->mode & SPI_CS_HIGH))
772 mode |= AT32_GPIOF_HIGH;
773 at32_select_gpio(pin, mode);
774 }
775}
776
777struct platform_device *__init
778at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n)
779{
780 /*
781 * Manage the chipselects as GPIOs, normally using the same pins
782 * the SPI controller expects; but boards can use other pins.
783 */
784 static u8 __initdata spi0_pins[] =
785 { GPIO_PIN_PA(3), GPIO_PIN_PA(4),
786 GPIO_PIN_PA(5), GPIO_PIN_PA(20), };
787 static u8 __initdata spi1_pins[] =
788 { GPIO_PIN_PB(2), GPIO_PIN_PB(3),
789 GPIO_PIN_PB(4), GPIO_PIN_PA(27), };
740 struct platform_device *pdev; 790 struct platform_device *pdev;
741 791
742 switch (id) { 792 switch (id) {
743 case 0: 793 case 0:
744 pdev = &spi0_device; 794 pdev = &atmel_spi0_device;
745 select_peripheral(PA(0), PERIPH_A, 0); /* MISO */ 795 select_peripheral(PA(0), PERIPH_A, 0); /* MISO */
746 select_peripheral(PA(1), PERIPH_A, 0); /* MOSI */ 796 select_peripheral(PA(1), PERIPH_A, 0); /* MOSI */
747 select_peripheral(PA(2), PERIPH_A, 0); /* SCK */ 797 select_peripheral(PA(2), PERIPH_A, 0); /* SCK */
748 select_peripheral(PA(3), PERIPH_A, 0); /* NPCS0 */ 798 at32_spi_setup_slaves(0, b, n, spi0_pins);
749 select_peripheral(PA(4), PERIPH_A, 0); /* NPCS1 */ 799 break;
750 select_peripheral(PA(5), PERIPH_A, 0); /* NPCS2 */ 800
801 case 1:
802 pdev = &atmel_spi1_device;
803 select_peripheral(PB(0), PERIPH_B, 0); /* MISO */
804 select_peripheral(PB(1), PERIPH_B, 0); /* MOSI */
805 select_peripheral(PB(5), PERIPH_B, 0); /* SCK */
806 at32_spi_setup_slaves(1, b, n, spi1_pins);
751 break; 807 break;
752 808
753 default: 809 default:
754 return NULL; 810 return NULL;
755 } 811 }
756 812
813 spi_register_board_info(b, n);
757 platform_device_register(pdev); 814 platform_device_register(pdev);
758 return pdev; 815 return pdev;
759} 816}
@@ -837,6 +894,50 @@ at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data)
837 return pdev; 894 return pdev;
838} 895}
839 896
897/* --------------------------------------------------------------------
898 * GCLK
899 * -------------------------------------------------------------------- */
900static struct clk gclk0 = {
901 .name = "gclk0",
902 .mode = genclk_mode,
903 .get_rate = genclk_get_rate,
904 .set_rate = genclk_set_rate,
905 .set_parent = genclk_set_parent,
906 .index = 0,
907};
908static struct clk gclk1 = {
909 .name = "gclk1",
910 .mode = genclk_mode,
911 .get_rate = genclk_get_rate,
912 .set_rate = genclk_set_rate,
913 .set_parent = genclk_set_parent,
914 .index = 1,
915};
916static struct clk gclk2 = {
917 .name = "gclk2",
918 .mode = genclk_mode,
919 .get_rate = genclk_get_rate,
920 .set_rate = genclk_set_rate,
921 .set_parent = genclk_set_parent,
922 .index = 2,
923};
924static struct clk gclk3 = {
925 .name = "gclk3",
926 .mode = genclk_mode,
927 .get_rate = genclk_get_rate,
928 .set_rate = genclk_set_rate,
929 .set_parent = genclk_set_parent,
930 .index = 3,
931};
932static struct clk gclk4 = {
933 .name = "gclk4",
934 .mode = genclk_mode,
935 .get_rate = genclk_get_rate,
936 .set_rate = genclk_set_rate,
937 .set_parent = genclk_set_parent,
938 .index = 4,
939};
940
840struct clk *at32_clock_list[] = { 941struct clk *at32_clock_list[] = {
841 &osc32k, 942 &osc32k,
842 &osc0, 943 &osc0,
@@ -860,6 +961,7 @@ struct clk *at32_clock_list[] = {
860 &pio1_mck, 961 &pio1_mck,
861 &pio2_mck, 962 &pio2_mck,
862 &pio3_mck, 963 &pio3_mck,
964 &pio4_mck,
863 &atmel_usart0_usart, 965 &atmel_usart0_usart,
864 &atmel_usart1_usart, 966 &atmel_usart1_usart,
865 &atmel_usart2_usart, 967 &atmel_usart2_usart,
@@ -868,9 +970,15 @@ struct clk *at32_clock_list[] = {
868 &macb0_pclk, 970 &macb0_pclk,
869 &macb1_hclk, 971 &macb1_hclk,
870 &macb1_pclk, 972 &macb1_pclk,
871 &spi0_mck, 973 &atmel_spi0_spi_clk,
974 &atmel_spi1_spi_clk,
872 &lcdc0_hclk, 975 &lcdc0_hclk,
873 &lcdc0_pixclk, 976 &lcdc0_pixclk,
977 &gclk0,
978 &gclk1,
979 &gclk2,
980 &gclk3,
981 &gclk4,
874}; 982};
875unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list); 983unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list);
876 984
@@ -880,6 +988,7 @@ void __init at32_portmux_init(void)
880 at32_init_pio(&pio1_device); 988 at32_init_pio(&pio1_device);
881 at32_init_pio(&pio2_device); 989 at32_init_pio(&pio2_device);
882 at32_init_pio(&pio3_device); 990 at32_init_pio(&pio3_device);
991 at32_init_pio(&pio4_device);
883} 992}
884 993
885void __init at32_clock_init(void) 994void __init at32_clock_init(void)
@@ -898,6 +1007,13 @@ void __init at32_clock_init(void)
898 if (sm_readl(sm, PM_PLL1) & SM_BIT(PLLOSC)) 1007 if (sm_readl(sm, PM_PLL1) & SM_BIT(PLLOSC))
899 pll1.parent = &osc1; 1008 pll1.parent = &osc1;
900 1009
1010 genclk_init_parent(&gclk0);
1011 genclk_init_parent(&gclk1);
1012 genclk_init_parent(&gclk2);
1013 genclk_init_parent(&gclk3);
1014 genclk_init_parent(&gclk4);
1015 genclk_init_parent(&lcdc0_pixclk);
1016
901 /* 1017 /*
902 * Turn on all clocks that have at least one user already, and 1018 * Turn on all clocks that have at least one user already, and
903 * turn off everything else. We only do this for module 1019 * turn off everything else. We only do this for module
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c
index 3d0d1097389f..00c435452d7e 100644
--- a/arch/avr32/mach-at32ap/clock.c
+++ b/arch/avr32/mach-at32ap/clock.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2006 Atmel Corporation 4 * Copyright (C) 2006 Atmel Corporation
5 * 5 *
6 * Based on arch/arm/mach-at91rm9200/clock.c 6 * Based on arch/arm/mach-at91/clock.c
7 * Copyright (C) 2005 David Brownell 7 * Copyright (C) 2005 David Brownell
8 * Copyright (C) 2005 Ivan Kokshaysky 8 * Copyright (C) 2005 Ivan Kokshaysky
9 * 9 *
@@ -63,7 +63,11 @@ EXPORT_SYMBOL(clk_enable);
63 63
64static void __clk_disable(struct clk *clk) 64static void __clk_disable(struct clk *clk)
65{ 65{
66 BUG_ON(clk->users == 0); 66 if (clk->users == 0) {
67 printk(KERN_ERR "%s: mismatched disable\n", clk->name);
68 WARN_ON(1);
69 return;
70 }
67 71
68 if (--clk->users == 0 && clk->mode) 72 if (--clk->users == 0 && clk->mode)
69 clk->mode(clk, 0); 73 clk->mode(clk, 0);
diff --git a/arch/avr32/mach-at32ap/clock.h b/arch/avr32/mach-at32ap/clock.h
index f953f044ba4d..bb8e1f295835 100644
--- a/arch/avr32/mach-at32ap/clock.h
+++ b/arch/avr32/mach-at32ap/clock.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2006 Atmel Corporation 4 * Copyright (C) 2006 Atmel Corporation
5 * 5 *
6 * Based on arch/arm/mach-at91rm9200/clock.c 6 * Based on arch/arm/mach-at91/clock.c
7 * Copyright (C) 2005 David Brownell 7 * Copyright (C) 2005 David Brownell
8 * Copyright (C) 2005 Ivan Kokshaysky 8 * Copyright (C) 2005 Ivan Kokshaysky
9 * 9 *
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index b59272e81b9a..4a60eccfebd2 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -55,20 +55,11 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
55 unsigned long flags; 55 unsigned long flags;
56 int ret = 0; 56 int ret = 0;
57 57
58 flow_type &= IRQ_TYPE_SENSE_MASK;
58 if (flow_type == IRQ_TYPE_NONE) 59 if (flow_type == IRQ_TYPE_NONE)
59 flow_type = IRQ_TYPE_LEVEL_LOW; 60 flow_type = IRQ_TYPE_LEVEL_LOW;
60 61
61 desc = &irq_desc[irq]; 62 desc = &irq_desc[irq];
62 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
63 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
64
65 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) {
66 desc->status |= IRQ_LEVEL;
67 set_irq_handler(irq, handle_level_irq);
68 } else {
69 set_irq_handler(irq, handle_edge_irq);
70 }
71
72 spin_lock_irqsave(&sm->lock, flags); 63 spin_lock_irqsave(&sm->lock, flags);
73 64
74 mode = sm_readl(sm, EIM_MODE); 65 mode = sm_readl(sm, EIM_MODE);
@@ -97,9 +88,16 @@ static int eim_set_irq_type(unsigned int irq, unsigned int flow_type)
97 break; 88 break;
98 } 89 }
99 90
100 sm_writel(sm, EIM_MODE, mode); 91 if (ret == 0) {
101 sm_writel(sm, EIM_EDGE, edge); 92 sm_writel(sm, EIM_MODE, mode);
102 sm_writel(sm, EIM_LEVEL, level); 93 sm_writel(sm, EIM_EDGE, edge);
94 sm_writel(sm, EIM_LEVEL, level);
95
96 if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
97 flow_type |= IRQ_LEVEL;
98 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
99 desc->status |= flow_type;
100 }
103 101
104 spin_unlock_irqrestore(&sm->lock, flags); 102 spin_unlock_irqrestore(&sm->lock, flags);
105 103
@@ -122,8 +120,6 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc)
122 unsigned long status, pending; 120 unsigned long status, pending;
123 unsigned int i, ext_irq; 121 unsigned int i, ext_irq;
124 122
125 spin_lock(&sm->lock);
126
127 status = sm_readl(sm, EIM_ISR); 123 status = sm_readl(sm, EIM_ISR);
128 pending = status & sm_readl(sm, EIM_IMR); 124 pending = status & sm_readl(sm, EIM_IMR);
129 125
@@ -133,10 +129,11 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc)
133 129
134 ext_irq = i + sm->eim_first_irq; 130 ext_irq = i + sm->eim_first_irq;
135 ext_desc = irq_desc + ext_irq; 131 ext_desc = irq_desc + ext_irq;
136 ext_desc->handle_irq(ext_irq, ext_desc); 132 if (ext_desc->status & IRQ_LEVEL)
133 handle_level_irq(ext_irq, ext_desc);
134 else
135 handle_edge_irq(ext_irq, ext_desc);
137 } 136 }
138
139 spin_unlock(&sm->lock);
140} 137}
141 138
142static int __init eim_init(void) 139static int __init eim_init(void)
@@ -168,8 +165,9 @@ static int __init eim_init(void)
168 sm->eim_chip = &eim_chip; 165 sm->eim_chip = &eim_chip;
169 166
170 for (i = 0; i < nr_irqs; i++) { 167 for (i = 0; i < nr_irqs; i++) {
168 /* NOTE the handler we set here is ignored by the demux */
171 set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip, 169 set_irq_chip_and_handler(sm->eim_first_irq + i, &eim_chip,
172 handle_edge_irq); 170 handle_level_irq);
173 set_irq_chip_data(sm->eim_first_irq + i, sm); 171 set_irq_chip_data(sm->eim_first_irq + i, sm);
174 } 172 }
175 173
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index f1280ed8ed6d..9ba5654cde11 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -12,7 +12,9 @@
12#include <linux/debugfs.h> 12#include <linux/debugfs.h>
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/irq.h>
15 16
17#include <asm/gpio.h>
16#include <asm/io.h> 18#include <asm/io.h>
17 19
18#include <asm/arch/portmux.h> 20#include <asm/arch/portmux.h>
@@ -26,7 +28,8 @@ struct pio_device {
26 const struct platform_device *pdev; 28 const struct platform_device *pdev;
27 struct clk *clk; 29 struct clk *clk;
28 u32 pinmux_mask; 30 u32 pinmux_mask;
29 char name[32]; 31 u32 gpio_mask;
32 char name[8];
30}; 33};
31 34
32static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; 35static struct pio_device pio_dev[MAX_NR_PIO_DEVICES];
@@ -76,6 +79,9 @@ void __init at32_select_periph(unsigned int pin, unsigned int periph,
76 if (!(flags & AT32_GPIOF_PULLUP)) 79 if (!(flags & AT32_GPIOF_PULLUP))
77 pio_writel(pio, PUDR, mask); 80 pio_writel(pio, PUDR, mask);
78 81
82 /* gpio_request NOT allowed */
83 set_bit(pin_index, &pio->gpio_mask);
84
79 return; 85 return;
80 86
81fail: 87fail:
@@ -99,19 +105,52 @@ void __init at32_select_gpio(unsigned int pin, unsigned long flags)
99 goto fail; 105 goto fail;
100 } 106 }
101 107
102 pio_writel(pio, PUER, mask); 108 if (flags & AT32_GPIOF_OUTPUT) {
103 if (flags & AT32_GPIOF_HIGH) 109 if (flags & AT32_GPIOF_HIGH)
104 pio_writel(pio, SODR, mask); 110 pio_writel(pio, SODR, mask);
105 else 111 else
106 pio_writel(pio, CODR, mask); 112 pio_writel(pio, CODR, mask);
107 if (flags & AT32_GPIOF_OUTPUT) 113 pio_writel(pio, PUDR, mask);
108 pio_writel(pio, OER, mask); 114 pio_writel(pio, OER, mask);
109 else 115 } else {
116 if (flags & AT32_GPIOF_PULLUP)
117 pio_writel(pio, PUER, mask);
118 else
119 pio_writel(pio, PUDR, mask);
120 if (flags & AT32_GPIOF_DEGLITCH)
121 pio_writel(pio, IFER, mask);
122 else
123 pio_writel(pio, IFDR, mask);
110 pio_writel(pio, ODR, mask); 124 pio_writel(pio, ODR, mask);
125 }
111 126
112 pio_writel(pio, PER, mask); 127 pio_writel(pio, PER, mask);
113 if (!(flags & AT32_GPIOF_PULLUP)) 128
114 pio_writel(pio, PUDR, mask); 129 /* gpio_request now allowed */
130 clear_bit(pin_index, &pio->gpio_mask);
131
132 return;
133
134fail:
135 dump_stack();
136}
137
138/* Reserve a pin, preventing anyone else from changing its configuration. */
139void __init at32_reserve_pin(unsigned int pin)
140{
141 struct pio_device *pio;
142 unsigned int pin_index = pin & 0x1f;
143
144 pio = gpio_to_pio(pin);
145 if (unlikely(!pio)) {
146 printk("pio: invalid pin %u\n", pin);
147 goto fail;
148 }
149
150 if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) {
151 printk("%s: pin %u is busy\n", pio->name, pin_index);
152 goto fail;
153 }
115 154
116 return; 155 return;
117 156
@@ -119,20 +158,197 @@ fail:
119 dump_stack(); 158 dump_stack();
120} 159}
121 160
161/*--------------------------------------------------------------------------*/
162
163/* GPIO API */
164
165int gpio_request(unsigned int gpio, const char *label)
166{
167 struct pio_device *pio;
168 unsigned int pin;
169
170 pio = gpio_to_pio(gpio);
171 if (!pio)
172 return -ENODEV;
173
174 pin = gpio & 0x1f;
175 if (test_and_set_bit(pin, &pio->gpio_mask))
176 return -EBUSY;
177
178 return 0;
179}
180EXPORT_SYMBOL(gpio_request);
181
182void gpio_free(unsigned int gpio)
183{
184 struct pio_device *pio;
185 unsigned int pin;
186
187 pio = gpio_to_pio(gpio);
188 if (!pio) {
189 printk(KERN_ERR
190 "gpio: attempted to free invalid pin %u\n", gpio);
191 return;
192 }
193
194 pin = gpio & 0x1f;
195 if (!test_and_clear_bit(pin, &pio->gpio_mask))
196 printk(KERN_ERR "gpio: freeing free or non-gpio pin %s-%u\n",
197 pio->name, pin);
198}
199EXPORT_SYMBOL(gpio_free);
200
201int gpio_direction_input(unsigned int gpio)
202{
203 struct pio_device *pio;
204 unsigned int pin;
205
206 pio = gpio_to_pio(gpio);
207 if (!pio)
208 return -ENODEV;
209
210 pin = gpio & 0x1f;
211 pio_writel(pio, ODR, 1 << pin);
212
213 return 0;
214}
215EXPORT_SYMBOL(gpio_direction_input);
216
217int gpio_direction_output(unsigned int gpio)
218{
219 struct pio_device *pio;
220 unsigned int pin;
221
222 pio = gpio_to_pio(gpio);
223 if (!pio)
224 return -ENODEV;
225
226 pin = gpio & 0x1f;
227 pio_writel(pio, OER, 1 << pin);
228
229 return 0;
230}
231EXPORT_SYMBOL(gpio_direction_output);
232
233int gpio_get_value(unsigned int gpio)
234{
235 struct pio_device *pio = &pio_dev[gpio >> 5];
236
237 return (pio_readl(pio, PDSR) >> (gpio & 0x1f)) & 1;
238}
239EXPORT_SYMBOL(gpio_get_value);
240
241void gpio_set_value(unsigned int gpio, int value)
242{
243 struct pio_device *pio = &pio_dev[gpio >> 5];
244 u32 mask;
245
246 mask = 1 << (gpio & 0x1f);
247 if (value)
248 pio_writel(pio, SODR, mask);
249 else
250 pio_writel(pio, CODR, mask);
251}
252EXPORT_SYMBOL(gpio_set_value);
253
254/*--------------------------------------------------------------------------*/
255
256/* GPIO IRQ support */
257
258static void gpio_irq_mask(unsigned irq)
259{
260 unsigned gpio = irq_to_gpio(irq);
261 struct pio_device *pio = &pio_dev[gpio >> 5];
262
263 pio_writel(pio, IDR, 1 << (gpio & 0x1f));
264}
265
266static void gpio_irq_unmask(unsigned irq)
267{
268 unsigned gpio = irq_to_gpio(irq);
269 struct pio_device *pio = &pio_dev[gpio >> 5];
270
271 pio_writel(pio, IER, 1 << (gpio & 0x1f));
272}
273
274static int gpio_irq_type(unsigned irq, unsigned type)
275{
276 if (type != IRQ_TYPE_EDGE_BOTH && type != IRQ_TYPE_NONE)
277 return -EINVAL;
278
279 return 0;
280}
281
282static struct irq_chip gpio_irqchip = {
283 .name = "gpio",
284 .mask = gpio_irq_mask,
285 .unmask = gpio_irq_unmask,
286 .set_type = gpio_irq_type,
287};
288
289static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
290{
291 struct pio_device *pio = get_irq_chip_data(irq);
292 unsigned gpio_irq;
293
294 gpio_irq = (unsigned) get_irq_data(irq);
295 for (;;) {
296 u32 isr;
297 struct irq_desc *d;
298
299 /* ack pending GPIO interrupts */
300 isr = pio_readl(pio, ISR) & pio_readl(pio, IMR);
301 if (!isr)
302 break;
303 do {
304 int i;
305
306 i = ffs(isr) - 1;
307 isr &= ~(1 << i);
308
309 i += gpio_irq;
310 d = &irq_desc[i];
311
312 d->handle_irq(i, d);
313 } while (isr);
314 }
315}
316
317static void __init
318gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
319{
320 unsigned i;
321
322 set_irq_chip_data(irq, pio);
323 set_irq_data(irq, (void *) gpio_irq);
324
325 for (i = 0; i < 32; i++, gpio_irq++) {
326 set_irq_chip_data(gpio_irq, pio);
327 set_irq_chip_and_handler(gpio_irq, &gpio_irqchip,
328 handle_simple_irq);
329 }
330
331 set_irq_chained_handler(irq, gpio_irq_handler);
332}
333
334/*--------------------------------------------------------------------------*/
335
122static int __init pio_probe(struct platform_device *pdev) 336static int __init pio_probe(struct platform_device *pdev)
123{ 337{
124 struct pio_device *pio = NULL; 338 struct pio_device *pio = NULL;
339 int irq = platform_get_irq(pdev, 0);
340 int gpio_irq_base = GPIO_IRQ_BASE + pdev->id * 32;
125 341
126 BUG_ON(pdev->id >= MAX_NR_PIO_DEVICES); 342 BUG_ON(pdev->id >= MAX_NR_PIO_DEVICES);
127 pio = &pio_dev[pdev->id]; 343 pio = &pio_dev[pdev->id];
128 BUG_ON(!pio->regs); 344 BUG_ON(!pio->regs);
129 345
130 /* TODO: Interrupts */ 346 gpio_irq_setup(pio, irq, gpio_irq_base);
131 347
132 platform_set_drvdata(pdev, pio); 348 platform_set_drvdata(pdev, pio);
133 349
134 printk(KERN_INFO "%s: Atmel Port Multiplexer at 0x%p (irq %d)\n", 350 printk(KERN_DEBUG "%s: base 0x%p, irq %d chains %d..%d\n",
135 pio->name, pio->regs, platform_get_irq(pdev, 0)); 351 pio->name, pio->regs, irq, gpio_irq_base, gpio_irq_base + 31);
136 352
137 return 0; 353 return 0;
138} 354}
@@ -148,7 +364,7 @@ static int __init pio_init(void)
148{ 364{
149 return platform_driver_register(&pio_driver); 365 return platform_driver_register(&pio_driver);
150} 366}
151subsys_initcall(pio_init); 367postcore_initcall(pio_init);
152 368
153void __init at32_init_pio(struct platform_device *pdev) 369void __init at32_init_pio(struct platform_device *pdev)
154{ 370{
@@ -184,6 +400,13 @@ void __init at32_init_pio(struct platform_device *pdev)
184 pio->pdev = pdev; 400 pio->pdev = pdev;
185 pio->regs = ioremap(regs->start, regs->end - regs->start + 1); 401 pio->regs = ioremap(regs->start, regs->end - regs->start + 1);
186 402
187 pio_writel(pio, ODR, ~0UL); 403 /*
188 pio_writel(pio, PER, ~0UL); 404 * request_gpio() is only valid for pins that have been
405 * explicitly configured as GPIO and not previously requested
406 */
407 pio->gpio_mask = ~0UL;
408
409 /* start with irqs disabled and acked */
410 pio_writel(pio, IDR, ~0UL);
411 (void) pio_readl(pio, ISR);
189} 412}
diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c
index 450515b245a0..fb13f72e9a02 100644
--- a/arch/avr32/mm/cache.c
+++ b/arch/avr32/mm/cache.c
@@ -22,18 +22,34 @@
22 22
23void invalidate_dcache_region(void *start, size_t size) 23void invalidate_dcache_region(void *start, size_t size)
24{ 24{
25 unsigned long v, begin, end, linesz; 25 unsigned long v, begin, end, linesz, mask;
26 int flush = 0;
26 27
27 linesz = boot_cpu_data.dcache.linesz; 28 linesz = boot_cpu_data.dcache.linesz;
29 mask = linesz - 1;
30
31 /* when first and/or last cachelines are shared, flush them
32 * instead of invalidating ... never discard valid data!
33 */
34 begin = (unsigned long)start;
35 end = begin + size - 1;
36
37 if (begin & mask) {
38 flush_dcache_line(start);
39 begin += linesz;
40 flush = 1;
41 }
42 if ((end & mask) != mask) {
43 flush_dcache_line((void *)end);
44 end -= linesz;
45 flush = 1;
46 }
28 47
29 //printk("invalidate dcache: %p + %u\n", start, size); 48 /* remaining cachelines only need invalidation */
30 49 for (v = begin; v <= end; v += linesz)
31 /* You asked for it, you got it */
32 begin = (unsigned long)start & ~(linesz - 1);
33 end = ((unsigned long)start + size + linesz - 1) & ~(linesz - 1);
34
35 for (v = begin; v < end; v += linesz)
36 invalidate_dcache_line((void *)v); 50 invalidate_dcache_line((void *)v);
51 if (flush)
52 flush_write_buffer();
37} 53}
38 54
39void clean_dcache_region(void *start, size_t size) 55void clean_dcache_region(void *start, size_t size)
diff --git a/arch/avr32/mm/tlb.c b/arch/avr32/mm/tlb.c
index 7b073052203d..56672018e42f 100644
--- a/arch/avr32/mm/tlb.c
+++ b/arch/avr32/mm/tlb.c
@@ -360,7 +360,7 @@ static int tlb_open(struct inode *inode, struct file *file)
360 return seq_open(file, &tlb_ops); 360 return seq_open(file, &tlb_ops);
361} 361}
362 362
363static struct file_operations proc_tlb_operations = { 363static const struct file_operations proc_tlb_operations = {
364 .open = tlb_open, 364 .open = tlb_open,
365 .read = seq_read, 365 .read = seq_read,
366 .llseek = seq_lseek, 366 .llseek = seq_lseek,
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 3474309e049c..4b41248b61ad 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -9,6 +9,10 @@ config MMU
9 bool 9 bool
10 default y 10 default y
11 11
12config ZONE_DMA
13 bool
14 default y
15
12config RWSEM_GENERIC_SPINLOCK 16config RWSEM_GENERIC_SPINLOCK
13 bool 17 bool
14 default y 18 default y
@@ -40,6 +44,9 @@ config IRQ_PER_CPU
40 bool 44 bool
41 default y 45 default y
42 46
47config NO_IOPORT
48 def_bool y
49
43config CRIS 50config CRIS
44 bool 51 bool
45 default y 52 default y
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c
index ffade19a14e6..efd7b0f3a910 100644
--- a/arch/cris/arch-v10/drivers/axisflashmap.c
+++ b/arch/cris/arch-v10/drivers/axisflashmap.c
@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void)
359 * So we use the MTD concatenation layer instead of further 359 * So we use the MTD concatenation layer instead of further
360 * complicating the probing procedure. 360 * complicating the probing procedure.
361 */ 361 */
362 mtd_cse = mtd_concat_create(mtds, 362 mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds),
363 sizeof(mtds) / sizeof(mtds[0]),
364 "cse0+cse1"); 363 "cse0+cse1");
365#else 364#else
366 printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " 365 printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel "
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c
index 3cf4f23de1d0..88eff7f54ea6 100644
--- a/arch/cris/arch-v10/drivers/ds1302.c
+++ b/arch/cris/arch-v10/drivers/ds1302.c
@@ -499,7 +499,7 @@ print_rtc_status(void)
499 499
500/* The various file operations we support. */ 500/* The various file operations we support. */
501 501
502static struct file_operations rtc_fops = { 502static const struct file_operations rtc_fops = {
503 .owner = THIS_MODULE, 503 .owner = THIS_MODULE,
504 .ioctl = rtc_ioctl, 504 .ioctl = rtc_ioctl,
505}; 505};
diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c
index 284ebfda03f0..be35a70798aa 100644
--- a/arch/cris/arch-v10/drivers/eeprom.c
+++ b/arch/cris/arch-v10/drivers/eeprom.c
@@ -172,7 +172,7 @@ static const char eeprom_name[] = "eeprom";
172static struct eeprom_type eeprom; 172static struct eeprom_type eeprom;
173 173
174/* This is the exported file-operations structure for this device. */ 174/* This is the exported file-operations structure for this device. */
175struct file_operations eeprom_fops = 175const struct file_operations eeprom_fops =
176{ 176{
177 .llseek = eeprom_lseek, 177 .llseek = eeprom_lseek,
178 .read = eeprom_read, 178 .read = eeprom_read,
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index 9aba18b931dd..f389ed6998fe 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -838,7 +838,7 @@ gpio_leds_ioctl(unsigned int cmd, unsigned long arg)
838 return 0; 838 return 0;
839} 839}
840 840
841struct file_operations gpio_fops = { 841const struct file_operations gpio_fops = {
842 .owner = THIS_MODULE, 842 .owner = THIS_MODULE,
843 .poll = gpio_poll, 843 .poll = gpio_poll,
844 .ioctl = gpio_ioctl, 844 .ioctl = gpio_ioctl,
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index 092c724a645f..aca81ddaf60f 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -692,7 +692,7 @@ i2c_ioctl(struct inode *inode, struct file *file,
692 return 0; 692 return 0;
693} 693}
694 694
695static struct file_operations i2c_fops = { 695static const struct file_operations i2c_fops = {
696 .owner = THIS_MODULE, 696 .owner = THIS_MODULE,
697 .ioctl = i2c_ioctl, 697 .ioctl = i2c_ioctl,
698 .open = i2c_open, 698 .open = i2c_open,
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index 8c830eefc89c..d47cfbf98d6e 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -56,7 +56,7 @@ static const unsigned char days_in_month[] =
56 56
57int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long); 57int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
58 58
59static struct file_operations pcf8563_fops = { 59static const struct file_operations pcf8563_fops = {
60 .owner = THIS_MODULE, 60 .owner = THIS_MODULE,
61 .ioctl = pcf8563_ioctl, 61 .ioctl = pcf8563_ioctl,
62}; 62};
@@ -311,7 +311,7 @@ pcf8563_register(void)
311{ 311{
312 pcf8563_init(); 312 pcf8563_init();
313 if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) { 313 if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) {
314 printk(KERN_INFO "%s: Unable to get major numer %d for RTC device.\n", 314 printk(KERN_INFO "%s: Unable to get major number %d for RTC device.\n",
315 PCF8563_NAME, PCF8563_MAJOR); 315 PCF8563_NAME, PCF8563_MAJOR);
316 return -1; 316 return -1;
317 } 317 }
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index ebacf1457d91..077e973c33f0 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -38,7 +38,6 @@ unsigned long get_ns_in_jiffie(void)
38 unsigned long flags; 38 unsigned long flags;
39 39
40 local_irq_save(flags); 40 local_irq_save(flags);
41 local_irq_disable();
42 timer_count = *R_TIMER0_DATA; 41 timer_count = *R_TIMER0_DATA;
43 presc_count = *R_TIM_PRESC_STATUS; 42 presc_count = *R_TIM_PRESC_STATUS;
44 /* presc_count might be wrapped */ 43 /* presc_count might be wrapped */
diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c
index 70a5523eff78..7d9fec88dee5 100644
--- a/arch/cris/arch-v10/mm/tlb.c
+++ b/arch/cris/arch-v10/mm/tlb.c
@@ -42,8 +42,7 @@ flush_tlb_all(void)
42 * in the same 4-way entry group. details.. 42 * in the same 4-way entry group. details..
43 */ 43 */
44 44
45 local_save_flags(flags); 45 local_irq_save(flags);
46 local_irq_disable();
47 for(i = 0; i < NUM_TLB_ENTRIES; i++) { 46 for(i = 0; i < NUM_TLB_ENTRIES; i++) {
48 *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) ); 47 *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) );
49 *R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) | 48 *R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) |
@@ -78,8 +77,7 @@ flush_tlb_mm(struct mm_struct *mm)
78 * global pages. is it worth the extra I/O ? 77 * global pages. is it worth the extra I/O ?
79 */ 78 */
80 79
81 local_save_flags(flags); 80 local_irq_save(flags);
82 local_irq_disable();
83 for(i = 0; i < NUM_TLB_ENTRIES; i++) { 81 for(i = 0; i < NUM_TLB_ENTRIES; i++) {
84 *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); 82 *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
85 if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) { 83 if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) {
@@ -118,8 +116,7 @@ flush_tlb_page(struct vm_area_struct *vma,
118 * and the virtual address requested 116 * and the virtual address requested
119 */ 117 */
120 118
121 local_save_flags(flags); 119 local_irq_save(flags);
122 local_irq_disable();
123 for(i = 0; i < NUM_TLB_ENTRIES; i++) { 120 for(i = 0; i < NUM_TLB_ENTRIES; i++) {
124 unsigned long tlb_hi; 121 unsigned long tlb_hi;
125 *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); 122 *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S
index 689729a7e66e..4b348b38cf33 100644
--- a/arch/cris/arch-v10/vmlinux.lds.S
+++ b/arch/cris/arch-v10/vmlinux.lds.S
@@ -82,7 +82,8 @@ SECTIONS
82 __con_initcall_end = .; 82 __con_initcall_end = .;
83 } 83 }
84 SECURITY_INIT 84 SECURITY_INIT
85 85
86#ifdef CONFIG_BLK_DEV_INITRD
86 .init.ramfs : { 87 .init.ramfs : {
87 __initramfs_start = .; 88 __initramfs_start = .;
88 *(.init.ramfs) 89 *(.init.ramfs)
@@ -93,6 +94,7 @@ SECTIONS
93 FILL (0); 94 FILL (0);
94 . = ALIGN (8192); 95 . = ALIGN (8192);
95 } 96 }
97#endif
96 98
97 __vmlinux_end = .; /* last address of the physical file */ 99 __vmlinux_end = .; /* last address of the physical file */
98 __init_end = .; 100 __init_end = .;
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 2449637e6fc0..1a071f17446d 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -266,7 +266,7 @@ static void print_user_dma_lists(struct cryptocop_dma_list_operation *dma_op);
266 266
267 267
268 268
269struct file_operations cryptocop_fops = { 269const struct file_operations cryptocop_fops = {
270 owner: THIS_MODULE, 270 owner: THIS_MODULE,
271 open: cryptocop_open, 271 open: cryptocop_open,
272 release: cryptocop_release, 272 release: cryptocop_release,
diff --git a/arch/cris/arch-v32/drivers/gpio.c b/arch/cris/arch-v32/drivers/gpio.c
index 08d36f0955c6..d82c5c561135 100644
--- a/arch/cris/arch-v32/drivers/gpio.c
+++ b/arch/cris/arch-v32/drivers/gpio.c
@@ -705,7 +705,7 @@ gpio_leds_ioctl(unsigned int cmd, unsigned long arg)
705 return 0; 705 return 0;
706} 706}
707 707
708struct file_operations gpio_fops = { 708const struct file_operations gpio_fops = {
709 .owner = THIS_MODULE, 709 .owner = THIS_MODULE,
710 .poll = gpio_poll, 710 .poll = gpio_poll,
711 .ioctl = gpio_ioctl, 711 .ioctl = gpio_ioctl,
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 95f00188c628..5d6c52737df3 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -573,7 +573,7 @@ i2c_ioctl(struct inode *inode, struct file *file,
573 return 0; 573 return 0;
574} 574}
575 575
576static struct file_operations i2c_fops = { 576static const struct file_operations i2c_fops = {
577 owner: THIS_MODULE, 577 owner: THIS_MODULE,
578 ioctl: i2c_ioctl, 578 ioctl: i2c_ioctl,
579 open: i2c_open, 579 open: i2c_open,
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index 2fc7d75a35de..24b919b3821a 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -50,7 +50,7 @@ int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
50int pcf8563_open(struct inode *, struct file *); 50int pcf8563_open(struct inode *, struct file *);
51int pcf8563_release(struct inode *, struct file *); 51int pcf8563_release(struct inode *, struct file *);
52 52
53static struct file_operations pcf8563_fops = { 53static const struct file_operations pcf8563_fops = {
54 owner: THIS_MODULE, 54 owner: THIS_MODULE,
55 ioctl: pcf8563_ioctl, 55 ioctl: pcf8563_ioctl,
56 open: pcf8563_open, 56 open: pcf8563_open,
@@ -171,7 +171,7 @@ pcf8563_init(void)
171 goto err; 171 goto err;
172 172
173 if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) { 173 if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) {
174 printk(KERN_INFO "%s: Unable to get major numer %d for RTC device.\n", 174 printk(KERN_INFO "%s: Unable to get major number %d for RTC device.\n",
175 PCF8563_NAME, PCF8563_MAJOR); 175 PCF8563_NAME, PCF8563_MAJOR);
176 return -1; 176 return -1;
177 } 177 }
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index 424eb0eb1cd5..df89298aafc4 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -187,7 +187,7 @@ static struct sync_port ports[]=
187 187
188#define NUMBER_OF_PORTS (sizeof(ports)/sizeof(sync_port)) 188#define NUMBER_OF_PORTS (sizeof(ports)/sizeof(sync_port))
189 189
190static struct file_operations sync_serial_fops = { 190static const struct file_operations sync_serial_fops = {
191 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
192 .write = sync_serial_write, 192 .write = sync_serial_write,
193 .read = sync_serial_read, 193 .read = sync_serial_read,
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c
index 9d75d7692303..c2d12e9c40d7 100644
--- a/arch/cris/arch-v32/mm/tlb.c
+++ b/arch/cris/arch-v32/mm/tlb.c
@@ -54,8 +54,7 @@ __flush_tlb_all(void)
54 * Mask with 0xf so similar TLB entries aren't written in the same 4-way 54 * Mask with 0xf so similar TLB entries aren't written in the same 4-way
55 * entry group. 55 * entry group.
56 */ 56 */
57 local_save_flags(flags); 57 local_irq_save(flags);
58 local_irq_disable();
59 58
60 for (mmu = 1; mmu <= 2; mmu++) { 59 for (mmu = 1; mmu <= 2; mmu++) {
61 SUPP_BANK_SEL(mmu); /* Select the MMU */ 60 SUPP_BANK_SEL(mmu); /* Select the MMU */
@@ -92,8 +91,7 @@ __flush_tlb_mm(struct mm_struct *mm)
92 return; 91 return;
93 92
94 /* Mark the TLB entries that match the page_id as invalid. */ 93 /* Mark the TLB entries that match the page_id as invalid. */
95 local_save_flags(flags); 94 local_irq_save(flags);
96 local_irq_disable();
97 95
98 for (mmu = 1; mmu <= 2; mmu++) { 96 for (mmu = 1; mmu <= 2; mmu++) {
99 SUPP_BANK_SEL(mmu); 97 SUPP_BANK_SEL(mmu);
@@ -140,8 +138,7 @@ __flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
140 * Invalidate those TLB entries that match both the mm context and the 138 * Invalidate those TLB entries that match both the mm context and the
141 * requested virtual address. 139 * requested virtual address.
142 */ 140 */
143 local_save_flags(flags); 141 local_irq_save(flags);
144 local_irq_disable();
145 142
146 for (mmu = 1; mmu <= 2; mmu++) { 143 for (mmu = 1; mmu <= 2; mmu++) {
147 SUPP_BANK_SEL(mmu); 144 SUPP_BANK_SEL(mmu);
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index 472d4b3c4cf4..e124fcd766d5 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -95,6 +95,7 @@ SECTIONS
95 .data.percpu : { *(.data.percpu) } 95 .data.percpu : { *(.data.percpu) }
96 __per_cpu_end = .; 96 __per_cpu_end = .;
97 97
98#ifdef CONFIG_BLK_DEV_INITRD
98 .init.ramfs : { 99 .init.ramfs : {
99 __initramfs_start = .; 100 __initramfs_start = .;
100 *(.init.ramfs) 101 *(.init.ramfs)
@@ -107,6 +108,7 @@ SECTIONS
107 FILL (0); 108 FILL (0);
108 . = ALIGN (8192); 109 . = ALIGN (8192);
109 } 110 }
111#endif
110 112
111 __vmlinux_end = .; /* Last address of the physical file. */ 113 __vmlinux_end = .; /* Last address of the physical file. */
112 __init_end = .; 114 __init_end = .;
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index f60ab785f235..4cfcae620507 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -50,7 +50,7 @@ write_cris_profile(struct file *file, const char __user *buf,
50 memset(sample_buffer, 0, SAMPLE_BUFFER_SIZE); 50 memset(sample_buffer, 0, SAMPLE_BUFFER_SIZE);
51} 51}
52 52
53static struct file_operations cris_proc_profile_operations = { 53static const struct file_operations cris_proc_profile_operations = {
54 .read = read_cris_profile, 54 .read = read_cris_profile,
55 .write = write_cris_profile, 55 .write = write_cris_profile,
56}; 56};
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index ca8b45a0fe2e..65466c49d7a9 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -29,7 +29,7 @@ struct screen_info screen_info;
29extern int root_mountflags; 29extern int root_mountflags;
30extern char _etext, _edata, _end; 30extern char _etext, _edata, _end;
31 31
32char cris_command_line[COMMAND_LINE_SIZE] = { 0, }; 32char __initdata cris_command_line[COMMAND_LINE_SIZE] = { 0, };
33 33
34extern const unsigned long text_start, edata; /* set by the linker script */ 34extern const unsigned long text_start, edata; /* set by the linker script */
35extern unsigned long dram_start, dram_end; 35extern unsigned long dram_start, dram_end;
@@ -153,8 +153,8 @@ setup_arch(char **cmdline_p)
153#endif 153#endif
154 154
155 /* Save command line for future references. */ 155 /* Save command line for future references. */
156 memcpy(saved_command_line, cris_command_line, COMMAND_LINE_SIZE); 156 memcpy(boot_command_line, cris_command_line, COMMAND_LINE_SIZE);
157 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0'; 157 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
158 158
159 /* give credit for the CRIS port */ 159 /* give credit for the CRIS port */
160 show_etrax_copyright(); 160 show_etrax_copyright();
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c
index 0f9213cbd48e..acfd04559405 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -55,7 +55,6 @@ void do_gettimeofday(struct timeval *tv)
55 unsigned long flags; 55 unsigned long flags;
56 signed long usec, sec; 56 signed long usec, sec;
57 local_irq_save(flags); 57 local_irq_save(flags);
58 local_irq_disable();
59 usec = do_gettimeoffset(); 58 usec = do_gettimeoffset();
60 59
61 /* 60 /*
@@ -217,14 +216,6 @@ cris_do_profile(struct pt_regs* regs)
217#endif 216#endif
218} 217}
219 218
220/*
221 * Scheduler clock - returns current time in nanosec units.
222 */
223unsigned long long sched_clock(void)
224{
225 return (unsigned long long)jiffies * (1000000000 / HZ);
226}
227
228static int 219static int
229__init init_udelay(void) 220__init init_udelay(void)
230{ 221{
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c
index 0df390a656cd..c4a98e2e529e 100644
--- a/arch/cris/mm/tlb.c
+++ b/arch/cris/mm/tlb.c
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/kernel.h>
11#include <asm/tlb.h> 12#include <asm/tlb.h>
12 13
13#define D(x) 14#define D(x)
@@ -100,7 +101,7 @@ tlb_init(void)
100 101
101 /* clear the page_id map */ 102 /* clear the page_id map */
102 103
103 for (i = 1; i < sizeof (page_id_map) / sizeof (page_id_map[0]); i++) 104 for (i = 1; i < ARRAY_SIZE(page_id_map); i++)
104 page_id_map[i] = NULL; 105 page_id_map[i] = NULL;
105 106
106 /* invalidate the entire TLB */ 107 /* invalidate the entire TLB */
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 7561d7b72e75..cea237413aa2 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -6,6 +6,10 @@ config FRV
6 bool 6 bool
7 default y 7 default y
8 8
9config ZONE_DMA
10 bool
11 default y
12
9config RWSEM_GENERIC_SPINLOCK 13config RWSEM_GENERIC_SPINLOCK
10 bool 14 bool
11 default y 15 default y
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index ee677ced7b68..c57ce3f1f2e2 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -125,7 +125,6 @@ unsigned long sleep_phys_sp(void *sp)
125 * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 125 * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
126 * when all the PM interfaces exist nicely. 126 * when all the PM interfaces exist nicely.
127 */ 127 */
128#define CTL_PM 9899
129#define CTL_PM_SUSPEND 1 128#define CTL_PM_SUSPEND 1
130#define CTL_PM_CMODE 2 129#define CTL_PM_CMODE 2
131#define CTL_PM_P0 4 130#define CTL_PM_P0 4
@@ -402,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen,
402 401
403static struct ctl_table pm_table[] = 402static struct ctl_table pm_table[] =
404{ 403{
405 {CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend}, 404 {
406 {CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL}, 405 .ctl_name = CTL_PM_SUSPEND,
407 {CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL}, 406 .procname = "suspend",
408 {CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL}, 407 .data = NULL,
409 {0} 408 .maxlen = 0,
409 .mode = 0200,
410 .proc_handler = &sysctl_pm_do_suspend,
411 },
412 {
413 .ctl_name = CTL_PM_CMODE,
414 .procname = "cmode",
415 .data = &clock_cmode_current,
416 .maxlen = sizeof(int),
417 .mode = 0644,
418 .proc_handler = &cmode_procctl,
419 .strategy = &cmode_sysctl,
420 },
421 {
422 .ctl_name = CTL_PM_P0,
423 .procname = "p0",
424 .data = &clock_p0_current,
425 .maxlen = sizeof(int),
426 .mode = 0644,
427 .proc_handler = &p0_procctl,
428 .strategy = &p0_sysctl,
429 },
430 {
431 .ctl_name = CTL_PM_CM,
432 .procname = "cm",
433 .data = &clock_cm_current,
434 .maxlen = sizeof(int),
435 .mode = 0644,
436 .proc_handler = &cm_procctl,
437 .strategy = &cm_sysctl,
438 },
439 { .ctl_name = 0}
410}; 440};
411 441
412static struct ctl_table pm_dir_table[] = 442static struct ctl_table pm_dir_table[] =
413{ 443{
414 {CTL_PM, "pm", NULL, 0, 0555, pm_table}, 444 {
415 {0} 445 .ctl_name = CTL_PM,
446 .procname = "pm",
447 .mode = 0555,
448 .child = pm_table,
449 },
450 { .ctl_name = 0}
416}; 451};
417 452
418/* 453/*
@@ -420,7 +455,7 @@ static struct ctl_table pm_dir_table[] =
420 */ 455 */
421static int __init pm_init(void) 456static int __init pm_init(void)
422{ 457{
423 register_sysctl_table(pm_dir_table, 1); 458 register_sysctl_table(pm_dir_table);
424 return 0; 459 return 0;
425} 460}
426 461
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 1a5eb6c301c9..8ea3ca2aba62 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -110,7 +110,7 @@ unsigned long __initdata num_mappedpages;
110 110
111struct cpuinfo_frv __nongprelbss boot_cpu_data; 111struct cpuinfo_frv __nongprelbss boot_cpu_data;
112 112
113char command_line[COMMAND_LINE_SIZE]; 113char __initdata command_line[COMMAND_LINE_SIZE];
114char __initdata redboot_command_line[COMMAND_LINE_SIZE]; 114char __initdata redboot_command_line[COMMAND_LINE_SIZE];
115 115
116#ifdef CONFIG_PM 116#ifdef CONFIG_PM
@@ -762,7 +762,7 @@ void __init setup_arch(char **cmdline_p)
762 printk("uClinux FR-V port done by Red Hat Inc <dhowells@redhat.com>\n"); 762 printk("uClinux FR-V port done by Red Hat Inc <dhowells@redhat.com>\n");
763#endif 763#endif
764 764
765 memcpy(saved_command_line, redboot_command_line, COMMAND_LINE_SIZE); 765 memcpy(boot_command_line, redboot_command_line, COMMAND_LINE_SIZE);
766 766
767 determine_cpu(); 767 determine_cpu();
768 determine_clocks(1); 768 determine_clocks(1);
@@ -803,7 +803,7 @@ void __init setup_arch(char **cmdline_p)
803#endif 803#endif
804 804
805 /* deal with the command line - RedBoot may have passed one to the kernel */ 805 /* deal with the command line - RedBoot may have passed one to the kernel */
806 memcpy(command_line, saved_command_line, sizeof(command_line)); 806 memcpy(command_line, boot_command_line, sizeof(command_line));
807 *cmdline_p = &command_line[0]; 807 *cmdline_p = &command_line[0];
808 parse_cmdline_early(command_line); 808 parse_cmdline_early(command_line);
809 809
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index ce676803eb6f..3e9d7e03fb95 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -175,22 +175,40 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp,
175 */ 175 */
176static struct ctl_table frv_table[] = 176static struct ctl_table frv_table[] =
177{ 177{
178 { 1, "cache-mode", NULL, 0, 0644, NULL, &procctl_frv_cachemode }, 178 {
179 .ctl_name = 1,
180 .procname = "cache-mode",
181 .data = NULL,
182 .maxlen = 0,
183 .mode = 0644,
184 .proc_handler = &procctl_frv_cachemode,
185 },
179#ifdef CONFIG_MMU 186#ifdef CONFIG_MMU
180 { 2, "pin-cxnr", NULL, 0, 0644, NULL, &procctl_frv_pin_cxnr }, 187 {
188 .ctl_name = 2,
189 .procname = "pin-cxnr",
190 .data = NULL,
191 .maxlen = 0,
192 .mode = 0644,
193 .proc_handler = &procctl_frv_pin_cxnr
194 },
181#endif 195#endif
182 { 0 } 196 {}
183}; 197};
184 198
185/* 199/*
186 * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 200 * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6
187 * when all the PM interfaces exist nicely. 201 * when all the PM interfaces exist nicely.
188 */ 202 */
189#define CTL_FRV 9898
190static struct ctl_table frv_dir_table[] = 203static struct ctl_table frv_dir_table[] =
191{ 204{
192 {CTL_FRV, "frv", NULL, 0, 0555, frv_table}, 205 {
193 {0} 206 .ctl_name = CTL_FRV,
207 .procname = "frv",
208 .mode = 0555,
209 .child = frv_table
210 },
211 {}
194}; 212};
195 213
196/* 214/*
@@ -198,7 +216,7 @@ static struct ctl_table frv_dir_table[] =
198 */ 216 */
199static int __init frv_sysctl_init(void) 217static int __init frv_sysctl_init(void)
200{ 218{
201 register_sysctl_table(frv_dir_table, 1); 219 register_sysctl_table(frv_dir_table);
202 return 0; 220 return 0;
203} 221}
204 222
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 9c1fb12367fa..97910e016825 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -61,10 +61,12 @@ SECTIONS
61 .data.percpu : { *(.data.percpu) } 61 .data.percpu : { *(.data.percpu) }
62 __per_cpu_end = .; 62 __per_cpu_end = .;
63 63
64#ifdef CONFIG_BLK_DEV_INITRD
64 . = ALIGN(4096); 65 . = ALIGN(4096);
65 __initramfs_start = .; 66 __initramfs_start = .;
66 .init.ramfs : { *(.init.ramfs) } 67 .init.ramfs : { *(.init.ramfs) }
67 __initramfs_end = .; 68 __initramfs_end = .;
69#endif
68 70
69 . = ALIGN(THREAD_SIZE); 71 . = ALIGN(THREAD_SIZE);
70 __init_end = .; 72 __init_end = .;
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 34a84bc4baf5..1734d96422c6 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -17,6 +17,10 @@ config SWAP
17 bool 17 bool
18 default n 18 default n
19 19
20config ZONE_DMA
21 bool
22 default y
23
20config FPU 24config FPU
21 bool 25 bool
22 default n 26 default n
@@ -53,6 +57,9 @@ config TIME_LOW_RES
53 bool 57 bool
54 default y 58 default y
55 59
60config NO_IOPORT
61 def_bool y
62
56config ISA 63config ISA
57 bool 64 bool
58 default y 65 default y
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
index 71b6131e98b8..4edbc2ef6ca2 100644
--- a/arch/h8300/kernel/Makefile
+++ b/arch/h8300/kernel/Makefile
@@ -6,6 +6,8 @@ extra-y := vmlinux.lds
6 6
7obj-y := process.o traps.o ptrace.o ints.o \ 7obj-y := process.o traps.o ptrace.o ints.o \
8 sys_h8300.o time.o semaphore.o signal.o \ 8 sys_h8300.o time.o semaphore.o signal.o \
9 setup.o gpio.o init_task.o syscalls.o 9 setup.o gpio.o init_task.o syscalls.o devres.o
10
11devres-y = ../../../kernel/irq/devres.o
10 12
11obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o 13obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o
diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c
index 587ef7f4fcc7..3e4f479271c9 100644
--- a/arch/h8300/kernel/ints.c
+++ b/arch/h8300/kernel/ints.c
@@ -19,6 +19,7 @@
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/kernel_stat.h> 20#include <linux/kernel_stat.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/interrupt.h>
22#include <linux/init.h> 23#include <linux/init.h>
23#include <linux/random.h> 24#include <linux/random.h>
24#include <linux/bootmem.h> 25#include <linux/bootmem.h>
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index 6adf8f41d2a1..313cd8081044 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -54,7 +54,7 @@ unsigned long rom_length;
54unsigned long memory_start; 54unsigned long memory_start;
55unsigned long memory_end; 55unsigned long memory_end;
56 56
57char command_line[COMMAND_LINE_SIZE]; 57char __initdata command_line[COMMAND_LINE_SIZE];
58 58
59extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; 59extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
60extern int _ramstart, _ramend; 60extern int _ramstart, _ramend;
@@ -154,8 +154,8 @@ void __init setup_arch(char **cmdline_p)
154#endif 154#endif
155 /* Keep a copy of command line */ 155 /* Keep a copy of command line */
156 *cmdline_p = &command_line[0]; 156 *cmdline_p = &command_line[0];
157 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 157 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
158 saved_command_line[COMMAND_LINE_SIZE-1] = 0; 158 boot_command_line[COMMAND_LINE_SIZE-1] = 0;
159 159
160#ifdef DEBUG 160#ifdef DEBUG
161 if (strlen(*cmdline_p)) 161 if (strlen(*cmdline_p))
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c
index 8abab3bc2b6f..d1ef615ba895 100644
--- a/arch/h8300/kernel/time.c
+++ b/arch/h8300/kernel/time.c
@@ -118,9 +118,3 @@ int do_settimeofday(struct timespec *tv)
118} 118}
119 119
120EXPORT_SYMBOL(do_settimeofday); 120EXPORT_SYMBOL(do_settimeofday);
121
122unsigned long long sched_clock(void)
123{
124 return (unsigned long long)jiffies * (1000000000 / HZ);
125
126}
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index f05288be8878..65f1cdc5ee04 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -126,10 +126,12 @@ SECTIONS
126 ___con_initcall_end = .; 126 ___con_initcall_end = .;
127 *(.exit.text) 127 *(.exit.text)
128 *(.exit.data) 128 *(.exit.data)
129#if defined(CONFIG_BLK_DEV_INITRD)
129 . = ALIGN(4); 130 . = ALIGN(4);
130 ___initramfs_start = .; 131 ___initramfs_start = .;
131 *(.init.ramfs) 132 *(.init.ramfs)
132 ___initramfs_end = .; 133 ___initramfs_end = .;
134#endif
133 . = ALIGN(0x4) ; 135 . = ALIGN(0x4) ;
134 ___init_end = .; 136 ___init_end = .;
135 __edata = . ; 137 __edata = . ;
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c
index 567f681ddfec..a71d6e2a3919 100644
--- a/arch/h8300/platform/h8s/ints.c
+++ b/arch/h8300/platform/h8s/ints.c
@@ -20,6 +20,7 @@
20#include <linux/kernel_stat.h> 20#include <linux/kernel_stat.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/interrupt.h>
23#include <linux/bootmem.h> 24#include <linux/bootmem.h>
24#include <linux/random.h> 25#include <linux/random.h>
25#include <linux/hardirq.h> 26#include <linux/hardirq.h>
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 0dfee812811a..2f7672545fe9 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -18,6 +18,19 @@ config GENERIC_TIME
18 bool 18 bool
19 default y 19 default y
20 20
21config CLOCKSOURCE_WATCHDOG
22 bool
23 default y
24
25config GENERIC_CLOCKEVENTS
26 bool
27 default y
28
29config GENERIC_CLOCKEVENTS_BROADCAST
30 bool
31 default y
32 depends on X86_LOCAL_APIC
33
21config LOCKDEP_SUPPORT 34config LOCKDEP_SUPPORT
22 bool 35 bool
23 default y 36 default y
@@ -38,6 +51,10 @@ config MMU
38 bool 51 bool
39 default y 52 default y
40 53
54config ZONE_DMA
55 bool
56 default y
57
41config SBUS 58config SBUS
42 bool 59 bool
43 60
@@ -70,6 +87,8 @@ source "init/Kconfig"
70 87
71menu "Processor type and features" 88menu "Processor type and features"
72 89
90source "kernel/time/Kconfig"
91
73config SMP 92config SMP
74 bool "Symmetric multi-processing support" 93 bool "Symmetric multi-processing support"
75 ---help--- 94 ---help---
@@ -199,6 +218,15 @@ config PARAVIRT
199 However, when run without a hypervisor the kernel is 218 However, when run without a hypervisor the kernel is
200 theoretically slower. If in doubt, say N. 219 theoretically slower. If in doubt, say N.
201 220
221config VMI
222 bool "VMI Paravirt-ops support"
223 depends on PARAVIRT && !NO_HZ
224 default y
225 help
226 VMI provides a paravirtualized interface to multiple hypervisors
227 include VMware ESX server and Xen by connecting to a ROM module
228 provided by the hypervisor.
229
202config ACPI_SRAT 230config ACPI_SRAT
203 bool 231 bool
204 default y 232 default y
@@ -1259,3 +1287,12 @@ config X86_TRAMPOLINE
1259config KTIME_SCALAR 1287config KTIME_SCALAR
1260 bool 1288 bool
1261 default y 1289 default y
1290
1291config NO_IDLE_HZ
1292 bool
1293 depends on PARAVIRT
1294 default y
1295 help
1296 Switches the regular HZ timer off when the system is going idle.
1297 This helps a hypervisor detect that the Linux system is idle,
1298 reducing the overhead of idle systems.
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu
index 2aecfba4ac4f..b99c0e2a4e63 100644
--- a/arch/i386/Kconfig.cpu
+++ b/arch/i386/Kconfig.cpu
@@ -226,11 +226,6 @@ config X86_CMPXCHG
226 depends on !M386 226 depends on !M386
227 default y 227 default y
228 228
229config X86_XADD
230 bool
231 depends on !M386
232 default y
233
234config X86_L1_CACHE_SHIFT 229config X86_L1_CACHE_SHIFT
235 int 230 int
236 default "7" if MPENTIUM4 || X86_GENERIC 231 default "7" if MPENTIUM4 || X86_GENERIC
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug
index f68cc6f215f8..458bc1611933 100644
--- a/arch/i386/Kconfig.debug
+++ b/arch/i386/Kconfig.debug
@@ -87,7 +87,7 @@ config DOUBLEFAULT
87 87
88config DEBUG_PARAVIRT 88config DEBUG_PARAVIRT
89 bool "Enable some paravirtualization debugging" 89 bool "Enable some paravirtualization debugging"
90 default y 90 default n
91 depends on PARAVIRT && DEBUG_KERNEL 91 depends on PARAVIRT && DEBUG_KERNEL
92 help 92 help
93 Currently deliberately clobbers regs which are allowed to be 93 Currently deliberately clobbers regs which are allowed to be
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index 881951ca03e1..ce4fda261aaf 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -11,6 +11,7 @@
11#include <endian.h> 11#include <endian.h>
12 12
13#define MAX_SHDRS 100 13#define MAX_SHDRS 100
14#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
14static Elf32_Ehdr ehdr; 15static Elf32_Ehdr ehdr;
15static Elf32_Shdr shdr[MAX_SHDRS]; 16static Elf32_Shdr shdr[MAX_SHDRS];
16static Elf32_Sym *symtab[MAX_SHDRS]; 17static Elf32_Sym *symtab[MAX_SHDRS];
@@ -71,7 +72,7 @@ static const char *sym_type(unsigned type)
71#undef SYM_TYPE 72#undef SYM_TYPE
72 }; 73 };
73 const char *name = "unknown sym type name"; 74 const char *name = "unknown sym type name";
74 if (type < sizeof(type_name)/sizeof(type_name[0])) { 75 if (type < ARRAY_SIZE(type_name)) {
75 name = type_name[type]; 76 name = type_name[type];
76 } 77 }
77 return name; 78 return name;
@@ -87,7 +88,7 @@ static const char *sym_bind(unsigned bind)
87#undef SYM_BIND 88#undef SYM_BIND
88 }; 89 };
89 const char *name = "unknown sym bind name"; 90 const char *name = "unknown sym bind name";
90 if (bind < sizeof(bind_name)/sizeof(bind_name[0])) { 91 if (bind < ARRAY_SIZE(bind_name)) {
91 name = bind_name[bind]; 92 name = bind_name[bind];
92 } 93 }
93 return name; 94 return name;
@@ -104,7 +105,7 @@ static const char *sym_visibility(unsigned visibility)
104#undef SYM_VISIBILITY 105#undef SYM_VISIBILITY
105 }; 106 };
106 const char *name = "unknown sym visibility name"; 107 const char *name = "unknown sym visibility name";
107 if (visibility < sizeof(visibility_name)/sizeof(visibility_name[0])) { 108 if (visibility < ARRAY_SIZE(visibility_name)) {
108 name = visibility_name[visibility]; 109 name = visibility_name[visibility];
109 } 110 }
110 return name; 111 return name;
@@ -128,7 +129,7 @@ static const char *rel_type(unsigned type)
128#undef REL_TYPE 129#undef REL_TYPE
129 }; 130 };
130 const char *name = "unknown type rel type name"; 131 const char *name = "unknown type rel type name";
131 if (type < sizeof(type_name)/sizeof(type_name[0])) { 132 if (type < ARRAY_SIZE(type_name)) {
132 name = type_name[type]; 133 name = type_name[type];
133 } 134 }
134 return name; 135 return name;
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 5d80edfc61b7..5ae1e0bc8fd7 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/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.20-rc3 3# Linux kernel version: 2.6.20-git8
4# Fri Jan 5 11:54:46 2007 4# Tue Feb 13 11:25:18 2007
5# 5#
6CONFIG_X86_32=y 6CONFIG_X86_32=y
7CONFIG_GENERIC_TIME=y 7CONFIG_GENERIC_TIME=y
@@ -10,6 +10,7 @@ CONFIG_STACKTRACE_SUPPORT=y
10CONFIG_SEMAPHORE_SLEEPERS=y 10CONFIG_SEMAPHORE_SLEEPERS=y
11CONFIG_X86=y 11CONFIG_X86=y
12CONFIG_MMU=y 12CONFIG_MMU=y
13CONFIG_ZONE_DMA=y
13CONFIG_GENERIC_ISA_DMA=y 14CONFIG_GENERIC_ISA_DMA=y
14CONFIG_GENERIC_IOMAP=y 15CONFIG_GENERIC_IOMAP=y
15CONFIG_GENERIC_BUG=y 16CONFIG_GENERIC_BUG=y
@@ -139,7 +140,6 @@ CONFIG_MPENTIUMIII=y
139# CONFIG_MVIAC3_2 is not set 140# CONFIG_MVIAC3_2 is not set
140CONFIG_X86_GENERIC=y 141CONFIG_X86_GENERIC=y
141CONFIG_X86_CMPXCHG=y 142CONFIG_X86_CMPXCHG=y
142CONFIG_X86_XADD=y
143CONFIG_X86_L1_CACHE_SHIFT=7 143CONFIG_X86_L1_CACHE_SHIFT=7
144CONFIG_RWSEM_XCHGADD_ALGORITHM=y 144CONFIG_RWSEM_XCHGADD_ALGORITHM=y
145# CONFIG_ARCH_HAS_ILOG2_U32 is not set 145# CONFIG_ARCH_HAS_ILOG2_U32 is not set
@@ -198,6 +198,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
198# CONFIG_SPARSEMEM_STATIC is not set 198# CONFIG_SPARSEMEM_STATIC is not set
199CONFIG_SPLIT_PTLOCK_CPUS=4 199CONFIG_SPLIT_PTLOCK_CPUS=4
200CONFIG_RESOURCES_64BIT=y 200CONFIG_RESOURCES_64BIT=y
201CONFIG_ZONE_DMA_FLAG=1
201# CONFIG_HIGHPTE is not set 202# CONFIG_HIGHPTE is not set
202# CONFIG_MATH_EMULATION is not set 203# CONFIG_MATH_EMULATION is not set
203CONFIG_MTRR=y 204CONFIG_MTRR=y
@@ -211,6 +212,7 @@ CONFIG_HZ_250=y
211CONFIG_HZ=250 212CONFIG_HZ=250
212# CONFIG_KEXEC is not set 213# CONFIG_KEXEC is not set
213# CONFIG_CRASH_DUMP is not set 214# CONFIG_CRASH_DUMP is not set
215CONFIG_PHYSICAL_START=0x100000
214# CONFIG_RELOCATABLE is not set 216# CONFIG_RELOCATABLE is not set
215CONFIG_PHYSICAL_ALIGN=0x100000 217CONFIG_PHYSICAL_ALIGN=0x100000
216# CONFIG_HOTPLUG_CPU is not set 218# CONFIG_HOTPLUG_CPU is not set
@@ -229,13 +231,14 @@ CONFIG_PM_SYSFS_DEPRECATED=y
229# ACPI (Advanced Configuration and Power Interface) Support 231# ACPI (Advanced Configuration and Power Interface) Support
230# 232#
231CONFIG_ACPI=y 233CONFIG_ACPI=y
234CONFIG_ACPI_PROCFS=y
232CONFIG_ACPI_AC=y 235CONFIG_ACPI_AC=y
233CONFIG_ACPI_BATTERY=y 236CONFIG_ACPI_BATTERY=y
234CONFIG_ACPI_BUTTON=y 237CONFIG_ACPI_BUTTON=y
235# CONFIG_ACPI_VIDEO is not set
236# CONFIG_ACPI_HOTKEY is not set 238# CONFIG_ACPI_HOTKEY is not set
237CONFIG_ACPI_FAN=y 239CONFIG_ACPI_FAN=y
238# CONFIG_ACPI_DOCK is not set 240# CONFIG_ACPI_DOCK is not set
241# CONFIG_ACPI_BAY is not set
239CONFIG_ACPI_PROCESSOR=y 242CONFIG_ACPI_PROCESSOR=y
240CONFIG_ACPI_THERMAL=y 243CONFIG_ACPI_THERMAL=y
241# CONFIG_ACPI_ASUS is not set 244# CONFIG_ACPI_ASUS is not set
@@ -306,7 +309,6 @@ CONFIG_PCI_DIRECT=y
306CONFIG_PCI_MMCONFIG=y 309CONFIG_PCI_MMCONFIG=y
307# CONFIG_PCIEPORTBUS is not set 310# CONFIG_PCIEPORTBUS is not set
308CONFIG_PCI_MSI=y 311CONFIG_PCI_MSI=y
309# CONFIG_PCI_MULTITHREAD_PROBE is not set
310# CONFIG_PCI_DEBUG is not set 312# CONFIG_PCI_DEBUG is not set
311# CONFIG_HT_IRQ is not set 313# CONFIG_HT_IRQ is not set
312CONFIG_ISA_DMA_API=y 314CONFIG_ISA_DMA_API=y
@@ -347,6 +349,7 @@ CONFIG_UNIX=y
347CONFIG_XFRM=y 349CONFIG_XFRM=y
348# CONFIG_XFRM_USER is not set 350# CONFIG_XFRM_USER is not set
349# CONFIG_XFRM_SUB_POLICY is not set 351# CONFIG_XFRM_SUB_POLICY is not set
352# CONFIG_XFRM_MIGRATE is not set
350# CONFIG_NET_KEY is not set 353# CONFIG_NET_KEY is not set
351CONFIG_INET=y 354CONFIG_INET=y
352CONFIG_IP_MULTICAST=y 355CONFIG_IP_MULTICAST=y
@@ -446,6 +449,7 @@ CONFIG_STANDALONE=y
446CONFIG_PREVENT_FIRMWARE_BUILD=y 449CONFIG_PREVENT_FIRMWARE_BUILD=y
447CONFIG_FW_LOADER=y 450CONFIG_FW_LOADER=y
448# CONFIG_DEBUG_DRIVER is not set 451# CONFIG_DEBUG_DRIVER is not set
452# CONFIG_DEBUG_DEVRES is not set
449# CONFIG_SYS_HYPERVISOR is not set 453# CONFIG_SYS_HYPERVISOR is not set
450 454
451# 455#
@@ -514,6 +518,7 @@ CONFIG_BLK_DEV_IDECD=y
514# CONFIG_BLK_DEV_IDETAPE is not set 518# CONFIG_BLK_DEV_IDETAPE is not set
515# CONFIG_BLK_DEV_IDEFLOPPY is not set 519# CONFIG_BLK_DEV_IDEFLOPPY is not set
516# CONFIG_BLK_DEV_IDESCSI is not set 520# CONFIG_BLK_DEV_IDESCSI is not set
521CONFIG_BLK_DEV_IDEACPI=y
517# CONFIG_IDE_TASK_IOCTL is not set 522# CONFIG_IDE_TASK_IOCTL is not set
518 523
519# 524#
@@ -546,6 +551,7 @@ CONFIG_BLK_DEV_AMD74XX=y
546# CONFIG_BLK_DEV_JMICRON is not set 551# CONFIG_BLK_DEV_JMICRON is not set
547# CONFIG_BLK_DEV_SC1200 is not set 552# CONFIG_BLK_DEV_SC1200 is not set
548CONFIG_BLK_DEV_PIIX=y 553CONFIG_BLK_DEV_PIIX=y
554# CONFIG_BLK_DEV_IT8213 is not set
549# CONFIG_BLK_DEV_IT821X is not set 555# CONFIG_BLK_DEV_IT821X is not set
550# CONFIG_BLK_DEV_NS87415 is not set 556# CONFIG_BLK_DEV_NS87415 is not set
551# CONFIG_BLK_DEV_PDC202XX_OLD is not set 557# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -556,6 +562,7 @@ CONFIG_BLK_DEV_PIIX=y
556# CONFIG_BLK_DEV_SLC90E66 is not set 562# CONFIG_BLK_DEV_SLC90E66 is not set
557# CONFIG_BLK_DEV_TRM290 is not set 563# CONFIG_BLK_DEV_TRM290 is not set
558# CONFIG_BLK_DEV_VIA82CXXX is not set 564# CONFIG_BLK_DEV_VIA82CXXX is not set
565# CONFIG_BLK_DEV_TC86C001 is not set
559# CONFIG_IDE_ARM is not set 566# CONFIG_IDE_ARM is not set
560CONFIG_BLK_DEV_IDEDMA=y 567CONFIG_BLK_DEV_IDEDMA=y
561# CONFIG_IDEDMA_IVB is not set 568# CONFIG_IDEDMA_IVB is not set
@@ -654,6 +661,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
654# Serial ATA (prod) and Parallel ATA (experimental) drivers 661# Serial ATA (prod) and Parallel ATA (experimental) drivers
655# 662#
656CONFIG_ATA=y 663CONFIG_ATA=y
664# CONFIG_ATA_NONSTANDARD is not set
657CONFIG_SATA_AHCI=y 665CONFIG_SATA_AHCI=y
658CONFIG_SATA_SVW=y 666CONFIG_SATA_SVW=y
659CONFIG_ATA_PIIX=y 667CONFIG_ATA_PIIX=y
@@ -669,6 +677,7 @@ CONFIG_SATA_SIL=y
669# CONFIG_SATA_ULI is not set 677# CONFIG_SATA_ULI is not set
670CONFIG_SATA_VIA=y 678CONFIG_SATA_VIA=y
671# CONFIG_SATA_VITESSE is not set 679# CONFIG_SATA_VITESSE is not set
680# CONFIG_SATA_INIC162X is not set
672CONFIG_SATA_INTEL_COMBINED=y 681CONFIG_SATA_INTEL_COMBINED=y
673# CONFIG_PATA_ALI is not set 682# CONFIG_PATA_ALI is not set
674# CONFIG_PATA_AMD is not set 683# CONFIG_PATA_AMD is not set
@@ -686,6 +695,7 @@ CONFIG_SATA_INTEL_COMBINED=y
686# CONFIG_PATA_HPT3X2N is not set 695# CONFIG_PATA_HPT3X2N is not set
687# CONFIG_PATA_HPT3X3 is not set 696# CONFIG_PATA_HPT3X3 is not set
688# CONFIG_PATA_IT821X is not set 697# CONFIG_PATA_IT821X is not set
698# CONFIG_PATA_IT8213 is not set
689# CONFIG_PATA_JMICRON is not set 699# CONFIG_PATA_JMICRON is not set
690# CONFIG_PATA_TRIFLEX is not set 700# CONFIG_PATA_TRIFLEX is not set
691# CONFIG_PATA_MARVELL is not set 701# CONFIG_PATA_MARVELL is not set
@@ -738,9 +748,7 @@ CONFIG_IEEE1394=y
738# Subsystem Options 748# Subsystem Options
739# 749#
740# CONFIG_IEEE1394_VERBOSEDEBUG is not set 750# CONFIG_IEEE1394_VERBOSEDEBUG is not set
741# CONFIG_IEEE1394_OUI_DB is not set
742# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set 751# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
743# CONFIG_IEEE1394_EXPORT_FULL_API is not set
744 752
745# 753#
746# Device Drivers 754# Device Drivers
@@ -766,6 +774,11 @@ CONFIG_IEEE1394_RAWIO=y
766# CONFIG_I2O is not set 774# CONFIG_I2O is not set
767 775
768# 776#
777# Macintosh device drivers
778#
779# CONFIG_MAC_EMUMOUSEBTN is not set
780
781#
769# Network device support 782# Network device support
770# 783#
771CONFIG_NETDEVICES=y 784CONFIG_NETDEVICES=y
@@ -832,6 +845,7 @@ CONFIG_8139TOO=y
832# CONFIG_SUNDANCE is not set 845# CONFIG_SUNDANCE is not set
833# CONFIG_TLAN is not set 846# CONFIG_TLAN is not set
834# CONFIG_VIA_RHINE is not set 847# CONFIG_VIA_RHINE is not set
848# CONFIG_SC92031 is not set
835 849
836# 850#
837# Ethernet (1000 Mbit) 851# Ethernet (1000 Mbit)
@@ -854,11 +868,13 @@ CONFIG_SKY2=y
854CONFIG_TIGON3=y 868CONFIG_TIGON3=y
855CONFIG_BNX2=y 869CONFIG_BNX2=y
856# CONFIG_QLA3XXX is not set 870# CONFIG_QLA3XXX is not set
871# CONFIG_ATL1 is not set
857 872
858# 873#
859# Ethernet (10000 Mbit) 874# Ethernet (10000 Mbit)
860# 875#
861# CONFIG_CHELSIO_T1 is not set 876# CONFIG_CHELSIO_T1 is not set
877# CONFIG_CHELSIO_T3 is not set
862# CONFIG_IXGB is not set 878# CONFIG_IXGB is not set
863# CONFIG_S2IO is not set 879# CONFIG_S2IO is not set
864# CONFIG_MYRI10GE is not set 880# CONFIG_MYRI10GE is not set
@@ -1089,6 +1105,7 @@ CONFIG_SOUND=y
1089# Open Sound System 1105# Open Sound System
1090# 1106#
1091CONFIG_SOUND_PRIME=y 1107CONFIG_SOUND_PRIME=y
1108CONFIG_OBSOLETE_OSS=y
1092# CONFIG_SOUND_BT878 is not set 1109# CONFIG_SOUND_BT878 is not set
1093# CONFIG_SOUND_ES1371 is not set 1110# CONFIG_SOUND_ES1371 is not set
1094CONFIG_SOUND_ICH=y 1111CONFIG_SOUND_ICH=y
@@ -1102,6 +1119,7 @@ CONFIG_SOUND_ICH=y
1102# HID Devices 1119# HID Devices
1103# 1120#
1104CONFIG_HID=y 1121CONFIG_HID=y
1122# CONFIG_HID_DEBUG is not set
1105 1123
1106# 1124#
1107# USB support 1125# USB support
@@ -1116,10 +1134,8 @@ CONFIG_USB=y
1116# Miscellaneous USB options 1134# Miscellaneous USB options
1117# 1135#
1118CONFIG_USB_DEVICEFS=y 1136CONFIG_USB_DEVICEFS=y
1119# CONFIG_USB_BANDWIDTH is not set
1120# CONFIG_USB_DYNAMIC_MINORS is not set 1137# CONFIG_USB_DYNAMIC_MINORS is not set
1121# CONFIG_USB_SUSPEND is not set 1138# CONFIG_USB_SUSPEND is not set
1122# CONFIG_USB_MULTITHREAD_PROBE is not set
1123# CONFIG_USB_OTG is not set 1139# CONFIG_USB_OTG is not set
1124 1140
1125# 1141#
@@ -1129,9 +1145,11 @@ CONFIG_USB_EHCI_HCD=y
1129# CONFIG_USB_EHCI_SPLIT_ISO is not set 1145# CONFIG_USB_EHCI_SPLIT_ISO is not set
1130# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1146# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1131# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1147# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1148# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1132# CONFIG_USB_ISP116X_HCD is not set 1149# CONFIG_USB_ISP116X_HCD is not set
1133CONFIG_USB_OHCI_HCD=y 1150CONFIG_USB_OHCI_HCD=y
1134# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1151# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1152# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1135CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1153CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1136CONFIG_USB_UHCI_HCD=y 1154CONFIG_USB_UHCI_HCD=y
1137# CONFIG_USB_SL811_HCD is not set 1155# CONFIG_USB_SL811_HCD is not set
@@ -1182,6 +1200,7 @@ CONFIG_USB_HID=y
1182# CONFIG_USB_ATI_REMOTE2 is not set 1200# CONFIG_USB_ATI_REMOTE2 is not set
1183# CONFIG_USB_KEYSPAN_REMOTE is not set 1201# CONFIG_USB_KEYSPAN_REMOTE is not set
1184# CONFIG_USB_APPLETOUCH is not set 1202# CONFIG_USB_APPLETOUCH is not set
1203# CONFIG_USB_GTCO is not set
1185 1204
1186# 1205#
1187# USB Imaging devices 1206# USB Imaging devices
@@ -1287,6 +1306,10 @@ CONFIG_USB_MON=y
1287# 1306#
1288 1307
1289# 1308#
1309# Auxiliary Display support
1310#
1311
1312#
1290# Virtualization 1313# Virtualization
1291# 1314#
1292# CONFIG_KVM is not set 1315# CONFIG_KVM is not set
@@ -1479,6 +1502,7 @@ CONFIG_UNUSED_SYMBOLS=y
1479# CONFIG_DEBUG_FS is not set 1502# CONFIG_DEBUG_FS is not set
1480# CONFIG_HEADERS_CHECK is not set 1503# CONFIG_HEADERS_CHECK is not set
1481CONFIG_DEBUG_KERNEL=y 1504CONFIG_DEBUG_KERNEL=y
1505# CONFIG_DEBUG_SHIRQ is not set
1482CONFIG_LOG_BUF_SHIFT=18 1506CONFIG_LOG_BUF_SHIFT=18
1483CONFIG_DETECT_SOFTLOCKUP=y 1507CONFIG_DETECT_SOFTLOCKUP=y
1484# CONFIG_SCHEDSTATS is not set 1508# CONFIG_SCHEDSTATS is not set
@@ -1487,7 +1511,6 @@ CONFIG_DETECT_SOFTLOCKUP=y
1487# CONFIG_RT_MUTEX_TESTER is not set 1511# CONFIG_RT_MUTEX_TESTER is not set
1488# CONFIG_DEBUG_SPINLOCK is not set 1512# CONFIG_DEBUG_SPINLOCK is not set
1489# CONFIG_DEBUG_MUTEXES is not set 1513# CONFIG_DEBUG_MUTEXES is not set
1490# CONFIG_DEBUG_RWSEMS is not set
1491# CONFIG_DEBUG_LOCK_ALLOC is not set 1514# CONFIG_DEBUG_LOCK_ALLOC is not set
1492# CONFIG_PROVE_LOCKING is not set 1515# CONFIG_PROVE_LOCKING is not set
1493# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1516# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
@@ -1532,7 +1555,8 @@ CONFIG_CRC32=y
1532# CONFIG_LIBCRC32C is not set 1555# CONFIG_LIBCRC32C is not set
1533CONFIG_ZLIB_INFLATE=y 1556CONFIG_ZLIB_INFLATE=y
1534CONFIG_PLIST=y 1557CONFIG_PLIST=y
1535CONFIG_IOMAP_COPY=y 1558CONFIG_HAS_IOMEM=y
1559CONFIG_HAS_IOPORT=y
1536CONFIG_GENERIC_HARDIRQS=y 1560CONFIG_GENERIC_HARDIRQS=y
1537CONFIG_GENERIC_IRQ_PROBE=y 1561CONFIG_GENERIC_IRQ_PROBE=y
1538CONFIG_GENERIC_PENDING_IRQ=y 1562CONFIG_GENERIC_PENDING_IRQ=y
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 1e8988e558c5..4ae3dcf1d2f0 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_X86_MSR) += msr.o
18obj-$(CONFIG_X86_CPUID) += cpuid.o 18obj-$(CONFIG_X86_CPUID) += cpuid.o
19obj-$(CONFIG_MICROCODE) += microcode.o 19obj-$(CONFIG_MICROCODE) += microcode.o
20obj-$(CONFIG_APM) += apm.o 20obj-$(CONFIG_APM) += apm.o
21obj-$(CONFIG_X86_SMP) += smp.o smpboot.o 21obj-$(CONFIG_X86_SMP) += smp.o smpboot.o tsc_sync.o
22obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o 22obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
23obj-$(CONFIG_X86_MPPARSE) += mpparse.o 23obj-$(CONFIG_X86_MPPARSE) += mpparse.o
24obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o 24obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
@@ -32,7 +32,6 @@ obj-$(CONFIG_KPROBES) += kprobes.o
32obj-$(CONFIG_MODULES) += module.o 32obj-$(CONFIG_MODULES) += module.o
33obj-y += sysenter.o vsyscall.o 33obj-y += sysenter.o vsyscall.o
34obj-$(CONFIG_ACPI_SRAT) += srat.o 34obj-$(CONFIG_ACPI_SRAT) += srat.o
35obj-$(CONFIG_HPET_TIMER) += time_hpet.o
36obj-$(CONFIG_EFI) += efi.o efi_stub.o 35obj-$(CONFIG_EFI) += efi.o efi_stub.o
37obj-$(CONFIG_DOUBLEFAULT) += doublefault.o 36obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
38obj-$(CONFIG_VM86) += vm86.o 37obj-$(CONFIG_VM86) += vm86.o
@@ -40,8 +39,9 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
40obj-$(CONFIG_HPET_TIMER) += hpet.o 39obj-$(CONFIG_HPET_TIMER) += hpet.o
41obj-$(CONFIG_K8_NB) += k8.o 40obj-$(CONFIG_K8_NB) += k8.o
42 41
43# Make sure this is linked after any other paravirt_ops structs: see head.S 42obj-$(CONFIG_VMI) += vmi.o vmitime.o
44obj-$(CONFIG_PARAVIRT) += paravirt.o 43obj-$(CONFIG_PARAVIRT) += paravirt.o
44obj-y += pcspeaker.o
45 45
46EXTRA_AFLAGS := -traditional 46EXTRA_AFLAGS := -traditional
47 47
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index cbcb2c27f48b..e5eb97a910ed 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -25,6 +25,7 @@
25 25
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/acpi.h> 27#include <linux/acpi.h>
28#include <linux/acpi_pmtmr.h>
28#include <linux/efi.h> 29#include <linux/efi.h>
29#include <linux/cpumask.h> 30#include <linux/cpumask.h>
30#include <linux/module.h> 31#include <linux/module.h>
@@ -66,7 +67,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
66 67
67#define BAD_MADT_ENTRY(entry, end) ( \ 68#define BAD_MADT_ENTRY(entry, end) ( \
68 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 69 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \
69 ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) 70 ((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
70 71
71#define PREFIX "ACPI: " 72#define PREFIX "ACPI: "
72 73
@@ -79,7 +80,7 @@ int acpi_ioapic;
79int acpi_strict; 80int acpi_strict;
80EXPORT_SYMBOL(acpi_strict); 81EXPORT_SYMBOL(acpi_strict);
81 82
82acpi_interrupt_flags acpi_sci_flags __initdata; 83u8 acpi_sci_flags __initdata;
83int acpi_sci_override_gsi __initdata; 84int acpi_sci_override_gsi __initdata;
84int acpi_skip_timer_override __initdata; 85int acpi_skip_timer_override __initdata;
85int acpi_use_timer_override __initdata; 86int acpi_use_timer_override __initdata;
@@ -92,11 +93,6 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
92#warning ACPI uses CMPXCHG, i486 and later hardware 93#warning ACPI uses CMPXCHG, i486 and later hardware
93#endif 94#endif
94 95
95#define MAX_MADT_ENTRIES 256
96u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =
97 {[0 ... MAX_MADT_ENTRIES - 1] = 0xff };
98EXPORT_SYMBOL(x86_acpiid_to_apicid);
99
100/* -------------------------------------------------------------------------- 96/* --------------------------------------------------------------------------
101 Boot-time Configuration 97 Boot-time Configuration
102 -------------------------------------------------------------------------- */ 98 -------------------------------------------------------------------------- */
@@ -166,30 +162,26 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
166 162
167#ifdef CONFIG_PCI_MMCONFIG 163#ifdef CONFIG_PCI_MMCONFIG
168/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ 164/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */
169struct acpi_table_mcfg_config *pci_mmcfg_config; 165struct acpi_mcfg_allocation *pci_mmcfg_config;
170int pci_mmcfg_config_num; 166int pci_mmcfg_config_num;
171 167
172int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) 168int __init acpi_parse_mcfg(struct acpi_table_header *header)
173{ 169{
174 struct acpi_table_mcfg *mcfg; 170 struct acpi_table_mcfg *mcfg;
175 unsigned long i; 171 unsigned long i;
176 int config_size; 172 int config_size;
177 173
178 if (!phys_addr || !size) 174 if (!header)
179 return -EINVAL; 175 return -EINVAL;
180 176
181 mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); 177 mcfg = (struct acpi_table_mcfg *)header;
182 if (!mcfg) {
183 printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
184 return -ENODEV;
185 }
186 178
187 /* how many config structures do we have */ 179 /* how many config structures do we have */
188 pci_mmcfg_config_num = 0; 180 pci_mmcfg_config_num = 0;
189 i = size - sizeof(struct acpi_table_mcfg); 181 i = header->length - sizeof(struct acpi_table_mcfg);
190 while (i >= sizeof(struct acpi_table_mcfg_config)) { 182 while (i >= sizeof(struct acpi_mcfg_allocation)) {
191 ++pci_mmcfg_config_num; 183 ++pci_mmcfg_config_num;
192 i -= sizeof(struct acpi_table_mcfg_config); 184 i -= sizeof(struct acpi_mcfg_allocation);
193 }; 185 };
194 if (pci_mmcfg_config_num == 0) { 186 if (pci_mmcfg_config_num == 0) {
195 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); 187 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n");
@@ -204,9 +196,9 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
204 return -ENOMEM; 196 return -ENOMEM;
205 } 197 }
206 198
207 memcpy(pci_mmcfg_config, &mcfg->config, config_size); 199 memcpy(pci_mmcfg_config, &mcfg[1], config_size);
208 for (i = 0; i < pci_mmcfg_config_num; ++i) { 200 for (i = 0; i < pci_mmcfg_config_num; ++i) {
209 if (mcfg->config[i].base_reserved) { 201 if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
210 printk(KERN_ERR PREFIX 202 printk(KERN_ERR PREFIX
211 "MMCONFIG not in low 4GB of memory\n"); 203 "MMCONFIG not in low 4GB of memory\n");
212 kfree(pci_mmcfg_config); 204 kfree(pci_mmcfg_config);
@@ -220,24 +212,24 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
220#endif /* CONFIG_PCI_MMCONFIG */ 212#endif /* CONFIG_PCI_MMCONFIG */
221 213
222#ifdef CONFIG_X86_LOCAL_APIC 214#ifdef CONFIG_X86_LOCAL_APIC
223static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) 215static int __init acpi_parse_madt(struct acpi_table_header *table)
224{ 216{
225 struct acpi_table_madt *madt = NULL; 217 struct acpi_table_madt *madt = NULL;
226 218
227 if (!phys_addr || !size || !cpu_has_apic) 219 if (!cpu_has_apic)
228 return -EINVAL; 220 return -EINVAL;
229 221
230 madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); 222 madt = (struct acpi_table_madt *)table;
231 if (!madt) { 223 if (!madt) {
232 printk(KERN_WARNING PREFIX "Unable to map MADT\n"); 224 printk(KERN_WARNING PREFIX "Unable to map MADT\n");
233 return -ENODEV; 225 return -ENODEV;
234 } 226 }
235 227
236 if (madt->lapic_address) { 228 if (madt->address) {
237 acpi_lapic_addr = (u64) madt->lapic_address; 229 acpi_lapic_addr = (u64) madt->address;
238 230
239 printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n", 231 printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n",
240 madt->lapic_address); 232 madt->address);
241 } 233 }
242 234
243 acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); 235 acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
@@ -246,21 +238,17 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size)
246} 238}
247 239
248static int __init 240static int __init
249acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) 241acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
250{ 242{
251 struct acpi_table_lapic *processor = NULL; 243 struct acpi_madt_local_apic *processor = NULL;
252 244
253 processor = (struct acpi_table_lapic *)header; 245 processor = (struct acpi_madt_local_apic *)header;
254 246
255 if (BAD_MADT_ENTRY(processor, end)) 247 if (BAD_MADT_ENTRY(processor, end))
256 return -EINVAL; 248 return -EINVAL;
257 249
258 acpi_table_print_madt_entry(header); 250 acpi_table_print_madt_entry(header);
259 251
260 /* Record local apic id only when enabled */
261 if (processor->flags.enabled)
262 x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
263
264 /* 252 /*
265 * We need to register disabled CPU as well to permit 253 * We need to register disabled CPU as well to permit
266 * counting disabled CPUs. This allows us to size 254 * counting disabled CPUs. This allows us to size
@@ -269,18 +257,18 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
269 * when we use CPU hotplug. 257 * when we use CPU hotplug.
270 */ 258 */
271 mp_register_lapic(processor->id, /* APIC ID */ 259 mp_register_lapic(processor->id, /* APIC ID */
272 processor->flags.enabled); /* Enabled? */ 260 processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */
273 261
274 return 0; 262 return 0;
275} 263}
276 264
277static int __init 265static int __init
278acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, 266acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
279 const unsigned long end) 267 const unsigned long end)
280{ 268{
281 struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL; 269 struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL;
282 270
283 lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header; 271 lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header;
284 272
285 if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) 273 if (BAD_MADT_ENTRY(lapic_addr_ovr, end))
286 return -EINVAL; 274 return -EINVAL;
@@ -291,11 +279,11 @@ acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
291} 279}
292 280
293static int __init 281static int __init
294acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) 282acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end)
295{ 283{
296 struct acpi_table_lapic_nmi *lapic_nmi = NULL; 284 struct acpi_madt_local_apic_nmi *lapic_nmi = NULL;
297 285
298 lapic_nmi = (struct acpi_table_lapic_nmi *)header; 286 lapic_nmi = (struct acpi_madt_local_apic_nmi *)header;
299 287
300 if (BAD_MADT_ENTRY(lapic_nmi, end)) 288 if (BAD_MADT_ENTRY(lapic_nmi, end))
301 return -EINVAL; 289 return -EINVAL;
@@ -313,11 +301,11 @@ acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
313#ifdef CONFIG_X86_IO_APIC 301#ifdef CONFIG_X86_IO_APIC
314 302
315static int __init 303static int __init
316acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end) 304acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)
317{ 305{
318 struct acpi_table_ioapic *ioapic = NULL; 306 struct acpi_madt_io_apic *ioapic = NULL;
319 307
320 ioapic = (struct acpi_table_ioapic *)header; 308 ioapic = (struct acpi_madt_io_apic *)header;
321 309
322 if (BAD_MADT_ENTRY(ioapic, end)) 310 if (BAD_MADT_ENTRY(ioapic, end))
323 return -EINVAL; 311 return -EINVAL;
@@ -342,11 +330,11 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
342 polarity = 3; 330 polarity = 3;
343 331
344 /* Command-line over-ride via acpi_sci= */ 332 /* Command-line over-ride via acpi_sci= */
345 if (acpi_sci_flags.trigger) 333 if (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)
346 trigger = acpi_sci_flags.trigger; 334 trigger = (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2;
347 335
348 if (acpi_sci_flags.polarity) 336 if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK)
349 polarity = acpi_sci_flags.polarity; 337 polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
350 338
351 /* 339 /*
352 * mp_config_acpi_legacy_irqs() already setup IRQs < 16 340 * mp_config_acpi_legacy_irqs() already setup IRQs < 16
@@ -357,51 +345,52 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
357 345
358 /* 346 /*
359 * stash over-ride to indicate we've been here 347 * stash over-ride to indicate we've been here
360 * and for later update of acpi_fadt 348 * and for later update of acpi_gbl_FADT
361 */ 349 */
362 acpi_sci_override_gsi = gsi; 350 acpi_sci_override_gsi = gsi;
363 return; 351 return;
364} 352}
365 353
366static int __init 354static int __init
367acpi_parse_int_src_ovr(acpi_table_entry_header * header, 355acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
368 const unsigned long end) 356 const unsigned long end)
369{ 357{
370 struct acpi_table_int_src_ovr *intsrc = NULL; 358 struct acpi_madt_interrupt_override *intsrc = NULL;
371 359
372 intsrc = (struct acpi_table_int_src_ovr *)header; 360 intsrc = (struct acpi_madt_interrupt_override *)header;
373 361
374 if (BAD_MADT_ENTRY(intsrc, end)) 362 if (BAD_MADT_ENTRY(intsrc, end))
375 return -EINVAL; 363 return -EINVAL;
376 364
377 acpi_table_print_madt_entry(header); 365 acpi_table_print_madt_entry(header);
378 366
379 if (intsrc->bus_irq == acpi_fadt.sci_int) { 367 if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
380 acpi_sci_ioapic_setup(intsrc->global_irq, 368 acpi_sci_ioapic_setup(intsrc->global_irq,
381 intsrc->flags.polarity, 369 intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
382 intsrc->flags.trigger); 370 (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2);
383 return 0; 371 return 0;
384 } 372 }
385 373
386 if (acpi_skip_timer_override && 374 if (acpi_skip_timer_override &&
387 intsrc->bus_irq == 0 && intsrc->global_irq == 2) { 375 intsrc->source_irq == 0 && intsrc->global_irq == 2) {
388 printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); 376 printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
389 return 0; 377 return 0;
390 } 378 }
391 379
392 mp_override_legacy_irq(intsrc->bus_irq, 380 mp_override_legacy_irq(intsrc->source_irq,
393 intsrc->flags.polarity, 381 intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
394 intsrc->flags.trigger, intsrc->global_irq); 382 (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2,
383 intsrc->global_irq);
395 384
396 return 0; 385 return 0;
397} 386}
398 387
399static int __init 388static int __init
400acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) 389acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end)
401{ 390{
402 struct acpi_table_nmi_src *nmi_src = NULL; 391 struct acpi_madt_nmi_source *nmi_src = NULL;
403 392
404 nmi_src = (struct acpi_table_nmi_src *)header; 393 nmi_src = (struct acpi_madt_nmi_source *)header;
405 394
406 if (BAD_MADT_ENTRY(nmi_src, end)) 395 if (BAD_MADT_ENTRY(nmi_src, end))
407 return -EINVAL; 396 return -EINVAL;
@@ -417,7 +406,7 @@ acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end)
417 406
418/* 407/*
419 * acpi_pic_sci_set_trigger() 408 * acpi_pic_sci_set_trigger()
420 * 409 *
421 * use ELCR to set PIC-mode trigger type for SCI 410 * use ELCR to set PIC-mode trigger type for SCI
422 * 411 *
423 * If a PIC-mode SCI is not recognized or gives spurious IRQ7's 412 * If a PIC-mode SCI is not recognized or gives spurious IRQ7's
@@ -511,7 +500,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
511{ 500{
512 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 501 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
513 union acpi_object *obj; 502 union acpi_object *obj;
514 struct acpi_table_lapic *lapic; 503 struct acpi_madt_local_apic *lapic;
515 cpumask_t tmp_map, new_map; 504 cpumask_t tmp_map, new_map;
516 u8 physid; 505 u8 physid;
517 int cpu; 506 int cpu;
@@ -529,10 +518,10 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
529 return -EINVAL; 518 return -EINVAL;
530 } 519 }
531 520
532 lapic = (struct acpi_table_lapic *)obj->buffer.pointer; 521 lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer;
533 522
534 if ((lapic->header.type != ACPI_MADT_LAPIC) || 523 if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC ||
535 (!lapic->flags.enabled)) { 524 !(lapic->lapic_flags & ACPI_MADT_ENABLED)) {
536 kfree(buffer.pointer); 525 kfree(buffer.pointer);
537 return -EINVAL; 526 return -EINVAL;
538 } 527 }
@@ -544,7 +533,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
544 buffer.pointer = NULL; 533 buffer.pointer = NULL;
545 534
546 tmp_map = cpu_present_map; 535 tmp_map = cpu_present_map;
547 mp_register_lapic(physid, lapic->flags.enabled); 536 mp_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED);
548 537
549 /* 538 /*
550 * If mp_register_lapic successfully generates a new logical cpu 539 * If mp_register_lapic successfully generates a new logical cpu
@@ -566,14 +555,6 @@ EXPORT_SYMBOL(acpi_map_lsapic);
566 555
567int acpi_unmap_lsapic(int cpu) 556int acpi_unmap_lsapic(int cpu)
568{ 557{
569 int i;
570
571 for_each_possible_cpu(i) {
572 if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) {
573 x86_acpiid_to_apicid[i] = -1;
574 break;
575 }
576 }
577 x86_cpu_to_apicid[cpu] = -1; 558 x86_cpu_to_apicid[cpu] = -1;
578 cpu_clear(cpu, cpu_present_map); 559 cpu_clear(cpu, cpu_present_map);
579 num_processors--; 560 num_processors--;
@@ -619,42 +600,37 @@ acpi_scan_rsdp(unsigned long start, unsigned long length)
619 return 0; 600 return 0;
620} 601}
621 602
622static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) 603static int __init acpi_parse_sbf(struct acpi_table_header *table)
623{ 604{
624 struct acpi_table_sbf *sb; 605 struct acpi_table_boot *sb;
625
626 if (!phys_addr || !size)
627 return -EINVAL;
628 606
629 sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size); 607 sb = (struct acpi_table_boot *)table;
630 if (!sb) { 608 if (!sb) {
631 printk(KERN_WARNING PREFIX "Unable to map SBF\n"); 609 printk(KERN_WARNING PREFIX "Unable to map SBF\n");
632 return -ENODEV; 610 return -ENODEV;
633 } 611 }
634 612
635 sbf_port = sb->sbf_cmos; /* Save CMOS port */ 613 sbf_port = sb->cmos_index; /* Save CMOS port */
636 614
637 return 0; 615 return 0;
638} 616}
639 617
640#ifdef CONFIG_HPET_TIMER 618#ifdef CONFIG_HPET_TIMER
619#include <asm/hpet.h>
641 620
642static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) 621static int __init acpi_parse_hpet(struct acpi_table_header *table)
643{ 622{
644 struct acpi_table_hpet *hpet_tbl; 623 struct acpi_table_hpet *hpet_tbl;
645 struct resource *hpet_res; 624 struct resource *hpet_res;
646 resource_size_t res_start; 625 resource_size_t res_start;
647 626
648 if (!phys || !size) 627 hpet_tbl = (struct acpi_table_hpet *)table;
649 return -EINVAL;
650
651 hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size);
652 if (!hpet_tbl) { 628 if (!hpet_tbl) {
653 printk(KERN_WARNING PREFIX "Unable to map HPET\n"); 629 printk(KERN_WARNING PREFIX "Unable to map HPET\n");
654 return -ENODEV; 630 return -ENODEV;
655 } 631 }
656 632
657 if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) { 633 if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) {
658 printk(KERN_WARNING PREFIX "HPET timers must be located in " 634 printk(KERN_WARNING PREFIX "HPET timers must be located in "
659 "memory.\n"); 635 "memory.\n");
660 return -1; 636 return -1;
@@ -667,29 +643,15 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
667 hpet_res->name = (void *)&hpet_res[1]; 643 hpet_res->name = (void *)&hpet_res[1];
668 hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 644 hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
669 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, 645 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE,
670 "HPET %u", hpet_tbl->number); 646 "HPET %u", hpet_tbl->sequence);
671 hpet_res->end = (1 * 1024) - 1; 647 hpet_res->end = (1 * 1024) - 1;
672 } 648 }
673 649
674#ifdef CONFIG_X86_64 650 hpet_address = hpet_tbl->address.address;
675 vxtime.hpet_address = hpet_tbl->addr.addrl |
676 ((long)hpet_tbl->addr.addrh << 32);
677
678 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", 651 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
679 hpet_tbl->id, vxtime.hpet_address); 652 hpet_tbl->id, hpet_address);
680 653
681 res_start = vxtime.hpet_address; 654 res_start = hpet_address;
682#else /* X86 */
683 {
684 extern unsigned long hpet_address;
685
686 hpet_address = hpet_tbl->addr.addrl;
687 printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
688 hpet_tbl->id, hpet_address);
689
690 res_start = hpet_address;
691 }
692#endif /* X86 */
693 655
694 if (hpet_res) { 656 if (hpet_res) {
695 hpet_res->start = res_start; 657 hpet_res->start = res_start;
@@ -703,46 +665,28 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
703#define acpi_parse_hpet NULL 665#define acpi_parse_hpet NULL
704#endif 666#endif
705 667
706#ifdef CONFIG_X86_PM_TIMER 668static int __init acpi_parse_fadt(struct acpi_table_header *table)
707extern u32 pmtmr_ioport;
708#endif
709
710static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
711{ 669{
712 struct fadt_descriptor *fadt = NULL;
713
714 fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size);
715 if (!fadt) {
716 printk(KERN_WARNING PREFIX "Unable to map FADT\n");
717 return 0;
718 }
719 /* initialize sci_int early for INT_SRC_OVR MADT parsing */
720 acpi_fadt.sci_int = fadt->sci_int;
721
722 /* initialize rev and apic_phys_dest_mode for x86_64 genapic */
723 acpi_fadt.revision = fadt->revision;
724 acpi_fadt.force_apic_physical_destination_mode =
725 fadt->force_apic_physical_destination_mode;
726 670
727#ifdef CONFIG_X86_PM_TIMER 671#ifdef CONFIG_X86_PM_TIMER
728 /* detect the location of the ACPI PM Timer */ 672 /* detect the location of the ACPI PM Timer */
729 if (fadt->revision >= FADT2_REVISION_ID) { 673 if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {
730 /* FADT rev. 2 */ 674 /* FADT rev. 2 */
731 if (fadt->xpm_tmr_blk.address_space_id != 675 if (acpi_gbl_FADT.xpm_timer_block.space_id !=
732 ACPI_ADR_SPACE_SYSTEM_IO) 676 ACPI_ADR_SPACE_SYSTEM_IO)
733 return 0; 677 return 0;
734 678
735 pmtmr_ioport = fadt->xpm_tmr_blk.address; 679 pmtmr_ioport = acpi_gbl_FADT.xpm_timer_block.address;
736 /* 680 /*
737 * "X" fields are optional extensions to the original V1.0 681 * "X" fields are optional extensions to the original V1.0
738 * fields, so we must selectively expand V1.0 fields if the 682 * fields, so we must selectively expand V1.0 fields if the
739 * corresponding X field is zero. 683 * corresponding X field is zero.
740 */ 684 */
741 if (!pmtmr_ioport) 685 if (!pmtmr_ioport)
742 pmtmr_ioport = fadt->V1_pm_tmr_blk; 686 pmtmr_ioport = acpi_gbl_FADT.pm_timer_block;
743 } else { 687 } else {
744 /* FADT rev. 1 */ 688 /* FADT rev. 1 */
745 pmtmr_ioport = fadt->V1_pm_tmr_blk; 689 pmtmr_ioport = acpi_gbl_FADT.pm_timer_block;
746 } 690 }
747 if (pmtmr_ioport) 691 if (pmtmr_ioport)
748 printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", 692 printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n",
@@ -784,13 +728,13 @@ static int __init acpi_parse_madt_lapic_entries(void)
784 if (!cpu_has_apic) 728 if (!cpu_has_apic)
785 return -ENODEV; 729 return -ENODEV;
786 730
787 /* 731 /*
788 * Note that the LAPIC address is obtained from the MADT (32-bit value) 732 * Note that the LAPIC address is obtained from the MADT (32-bit value)
789 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). 733 * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
790 */ 734 */
791 735
792 count = 736 count =
793 acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, 737 acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE,
794 acpi_parse_lapic_addr_ovr, 0); 738 acpi_parse_lapic_addr_ovr, 0);
795 if (count < 0) { 739 if (count < 0) {
796 printk(KERN_ERR PREFIX 740 printk(KERN_ERR PREFIX
@@ -800,7 +744,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
800 744
801 mp_register_lapic_address(acpi_lapic_addr); 745 mp_register_lapic_address(acpi_lapic_addr);
802 746
803 count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic, 747 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic,
804 MAX_APICS); 748 MAX_APICS);
805 if (!count) { 749 if (!count) {
806 printk(KERN_ERR PREFIX "No LAPIC entries present\n"); 750 printk(KERN_ERR PREFIX "No LAPIC entries present\n");
@@ -813,7 +757,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
813 } 757 }
814 758
815 count = 759 count =
816 acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0); 760 acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0);
817 if (count < 0) { 761 if (count < 0) {
818 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); 762 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
819 /* TBD: Cleanup to allow fallback to MPS */ 763 /* TBD: Cleanup to allow fallback to MPS */
@@ -842,7 +786,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
842 return -ENODEV; 786 return -ENODEV;
843 } 787 }
844 788
845 if (!cpu_has_apic) 789 if (!cpu_has_apic)
846 return -ENODEV; 790 return -ENODEV;
847 791
848 /* 792 /*
@@ -855,7 +799,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
855 } 799 }
856 800
857 count = 801 count =
858 acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, 802 acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic,
859 MAX_IO_APICS); 803 MAX_IO_APICS);
860 if (!count) { 804 if (!count) {
861 printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); 805 printk(KERN_ERR PREFIX "No IOAPIC entries present\n");
@@ -866,7 +810,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
866 } 810 }
867 811
868 count = 812 count =
869 acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, 813 acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr,
870 NR_IRQ_VECTORS); 814 NR_IRQ_VECTORS);
871 if (count < 0) { 815 if (count < 0) {
872 printk(KERN_ERR PREFIX 816 printk(KERN_ERR PREFIX
@@ -880,13 +824,13 @@ static int __init acpi_parse_madt_ioapic_entries(void)
880 * pretend we got one so we can set the SCI flags. 824 * pretend we got one so we can set the SCI flags.
881 */ 825 */
882 if (!acpi_sci_override_gsi) 826 if (!acpi_sci_override_gsi)
883 acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); 827 acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0);
884 828
885 /* Fill in identity legacy mapings where no override */ 829 /* Fill in identity legacy mapings where no override */
886 mp_config_acpi_legacy_irqs(); 830 mp_config_acpi_legacy_irqs();
887 831
888 count = 832 count =
889 acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 833 acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src,
890 NR_IRQ_VECTORS); 834 NR_IRQ_VECTORS);
891 if (count < 0) { 835 if (count < 0) {
892 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); 836 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
@@ -906,10 +850,9 @@ static inline int acpi_parse_madt_ioapic_entries(void)
906static void __init acpi_process_madt(void) 850static void __init acpi_process_madt(void)
907{ 851{
908#ifdef CONFIG_X86_LOCAL_APIC 852#ifdef CONFIG_X86_LOCAL_APIC
909 int count, error; 853 int error;
910 854
911 count = acpi_table_parse(ACPI_APIC, acpi_parse_madt); 855 if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
912 if (count >= 1) {
913 856
914 /* 857 /*
915 * Parse MADT LAPIC entries 858 * Parse MADT LAPIC entries
@@ -1195,7 +1138,7 @@ int __init acpi_boot_table_init(void)
1195 if (acpi_disabled && !acpi_ht) 1138 if (acpi_disabled && !acpi_ht)
1196 return 1; 1139 return 1;
1197 1140
1198 /* 1141 /*
1199 * Initialize the ACPI boot-time table parser. 1142 * Initialize the ACPI boot-time table parser.
1200 */ 1143 */
1201 error = acpi_table_init(); 1144 error = acpi_table_init();
@@ -1204,7 +1147,7 @@ int __init acpi_boot_table_init(void)
1204 return error; 1147 return error;
1205 } 1148 }
1206 1149
1207 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); 1150 acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
1208 1151
1209 /* 1152 /*
1210 * blacklist may disable ACPI entirely 1153 * blacklist may disable ACPI entirely
@@ -1232,19 +1175,19 @@ int __init acpi_boot_init(void)
1232 if (acpi_disabled && !acpi_ht) 1175 if (acpi_disabled && !acpi_ht)
1233 return 1; 1176 return 1;
1234 1177
1235 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); 1178 acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
1236 1179
1237 /* 1180 /*
1238 * set sci_int and PM timer address 1181 * set sci_int and PM timer address
1239 */ 1182 */
1240 acpi_table_parse(ACPI_FADT, acpi_parse_fadt); 1183 acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt);
1241 1184
1242 /* 1185 /*
1243 * Process the Multiple APIC Description Table (MADT), if present 1186 * Process the Multiple APIC Description Table (MADT), if present
1244 */ 1187 */
1245 acpi_process_madt(); 1188 acpi_process_madt();
1246 1189
1247 acpi_table_parse(ACPI_HPET, acpi_parse_hpet); 1190 acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
1248 1191
1249 return 0; 1192 return 0;
1250} 1193}
@@ -1315,13 +1258,17 @@ static int __init setup_acpi_sci(char *s)
1315 if (!s) 1258 if (!s)
1316 return -EINVAL; 1259 return -EINVAL;
1317 if (!strcmp(s, "edge")) 1260 if (!strcmp(s, "edge"))
1318 acpi_sci_flags.trigger = 1; 1261 acpi_sci_flags = ACPI_MADT_TRIGGER_EDGE |
1262 (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
1319 else if (!strcmp(s, "level")) 1263 else if (!strcmp(s, "level"))
1320 acpi_sci_flags.trigger = 3; 1264 acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL |
1265 (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
1321 else if (!strcmp(s, "high")) 1266 else if (!strcmp(s, "high"))
1322 acpi_sci_flags.polarity = 1; 1267 acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH |
1268 (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
1323 else if (!strcmp(s, "low")) 1269 else if (!strcmp(s, "low"))
1324 acpi_sci_flags.polarity = 3; 1270 acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW |
1271 (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
1325 else 1272 else
1326 return -EINVAL; 1273 return -EINVAL;
1327 return 0; 1274 return 0;
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index 4b60af7f91dd..bf86f7662d8b 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -16,7 +16,7 @@
16 16
17static int nvidia_hpet_detected __initdata; 17static int nvidia_hpet_detected __initdata;
18 18
19static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) 19static int __init nvidia_hpet_check(struct acpi_table_header *header)
20{ 20{
21 nvidia_hpet_detected = 1; 21 nvidia_hpet_detected = 1;
22 return 0; 22 return 0;
@@ -30,7 +30,7 @@ static int __init check_bridge(int vendor, int device)
30 is enabled. */ 30 is enabled. */
31 if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { 31 if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
32 nvidia_hpet_detected = 0; 32 nvidia_hpet_detected = 0;
33 acpi_table_parse(ACPI_HPET, nvidia_hpet_check); 33 acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
34 if (nvidia_hpet_detected == 0) { 34 if (nvidia_hpet_detected == 0) {
35 acpi_skip_timer_override = 1; 35 acpi_skip_timer_override = 1;
36 printk(KERN_INFO "Nvidia board " 36 printk(KERN_INFO "Nvidia board "
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 776d9be26af9..7a2c9cbdb511 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -25,6 +25,8 @@
25#include <linux/kernel_stat.h> 25#include <linux/kernel_stat.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27#include <linux/cpu.h> 27#include <linux/cpu.h>
28#include <linux/clockchips.h>
29#include <linux/acpi_pmtmr.h>
28#include <linux/module.h> 30#include <linux/module.h>
29 31
30#include <asm/atomic.h> 32#include <asm/atomic.h>
@@ -44,128 +46,548 @@
44#include "io_ports.h" 46#include "io_ports.h"
45 47
46/* 48/*
47 * cpu_mask that denotes the CPUs that needs timer interrupt coming in as 49 * Sanity check
48 * IPIs in place of local APIC timers
49 */ 50 */
50static cpumask_t timer_bcast_ipi; 51#if (SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F
52# error SPURIOUS_APIC_VECTOR definition error
53#endif
51 54
52/* 55/*
53 * Knob to control our willingness to enable the local APIC. 56 * Knob to control our willingness to enable the local APIC.
57 *
58 * -1=force-disable, +1=force-enable
54 */ 59 */
55static int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ 60static int enable_local_apic __initdata = 0;
56
57static inline void lapic_disable(void)
58{
59 enable_local_apic = -1;
60 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
61}
62 61
63static inline void lapic_enable(void) 62/* Local APIC timer verification ok */
64{ 63static int local_apic_timer_verify_ok;
65 enable_local_apic = 1;
66}
67 64
68/* 65/*
69 * Debug level 66 * Debug level, exported for io_apic.c
70 */ 67 */
71int apic_verbosity; 68int apic_verbosity;
72 69
70static unsigned int calibration_result;
73 71
72static int lapic_next_event(unsigned long delta,
73 struct clock_event_device *evt);
74static void lapic_timer_setup(enum clock_event_mode mode,
75 struct clock_event_device *evt);
76static void lapic_timer_broadcast(cpumask_t mask);
74static void apic_pm_activate(void); 77static void apic_pm_activate(void);
75 78
79/*
80 * The local apic timer can be used for any function which is CPU local.
81 */
82static struct clock_event_device lapic_clockevent = {
83 .name = "lapic",
84 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT
85 | CLOCK_EVT_FEAT_C3STOP | CLOCK_EVT_FEAT_DUMMY,
86 .shift = 32,
87 .set_mode = lapic_timer_setup,
88 .set_next_event = lapic_next_event,
89 .broadcast = lapic_timer_broadcast,
90 .rating = 100,
91 .irq = -1,
92};
93static DEFINE_PER_CPU(struct clock_event_device, lapic_events);
94
95/* Local APIC was disabled by the BIOS and enabled by the kernel */
96static int enabled_via_apicbase;
97
98/*
99 * Get the LAPIC version
100 */
101static inline int lapic_get_version(void)
102{
103 return GET_APIC_VERSION(apic_read(APIC_LVR));
104}
105
106/*
107 * Check, if the APIC is integrated or a seperate chip
108 */
109static inline int lapic_is_integrated(void)
110{
111 return APIC_INTEGRATED(lapic_get_version());
112}
113
114/*
115 * Check, whether this is a modern or a first generation APIC
116 */
76static int modern_apic(void) 117static int modern_apic(void)
77{ 118{
78 unsigned int lvr, version;
79 /* AMD systems use old APIC versions, so check the CPU */ 119 /* AMD systems use old APIC versions, so check the CPU */
80 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && 120 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
81 boot_cpu_data.x86 >= 0xf) 121 boot_cpu_data.x86 >= 0xf)
82 return 1; 122 return 1;
83 lvr = apic_read(APIC_LVR); 123 return lapic_get_version() >= 0x14;
84 version = GET_APIC_VERSION(lvr);
85 return version >= 0x14;
86} 124}
87 125
126/**
127 * enable_NMI_through_LVT0 - enable NMI through local vector table 0
128 */
129void enable_NMI_through_LVT0 (void * dummy)
130{
131 unsigned int v = APIC_DM_NMI;
132
133 /* Level triggered for 82489DX */
134 if (!lapic_is_integrated())
135 v |= APIC_LVT_LEVEL_TRIGGER;
136 apic_write_around(APIC_LVT0, v);
137}
138
139/**
140 * get_physical_broadcast - Get number of physical broadcast IDs
141 */
142int get_physical_broadcast(void)
143{
144 return modern_apic() ? 0xff : 0xf;
145}
146
147/**
148 * lapic_get_maxlvt - get the maximum number of local vector table entries
149 */
150int lapic_get_maxlvt(void)
151{
152 unsigned int v = apic_read(APIC_LVR);
153
154 /* 82489DXs do not report # of LVT entries. */
155 return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
156}
157
158/*
159 * Local APIC timer
160 */
161
162/* Clock divisor is set to 16 */
163#define APIC_DIVISOR 16
164
88/* 165/*
89 * 'what should we do if we get a hw irq event on an illegal vector'. 166 * This function sets up the local APIC timer, with a timeout of
90 * each architecture has to answer this themselves. 167 * 'clocks' APIC bus clock. During calibration we actually call
168 * this function twice on the boot CPU, once with a bogus timeout
169 * value, second time for real. The other (noncalibrating) CPUs
170 * call this function only once, with the real, calibrated value.
171 *
172 * We do reads before writes even if unnecessary, to get around the
173 * P5 APIC double write bug.
91 */ 174 */
92void ack_bad_irq(unsigned int irq) 175static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
93{ 176{
94 printk("unexpected IRQ trap at vector %02x\n", irq); 177 unsigned int lvtt_value, tmp_value;
178
179 lvtt_value = LOCAL_TIMER_VECTOR;
180 if (!oneshot)
181 lvtt_value |= APIC_LVT_TIMER_PERIODIC;
182 if (!lapic_is_integrated())
183 lvtt_value |= SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV);
184
185 if (!irqen)
186 lvtt_value |= APIC_LVT_MASKED;
187
188 apic_write_around(APIC_LVTT, lvtt_value);
189
95 /* 190 /*
96 * Currently unexpected vectors happen only on SMP and APIC. 191 * Divide PICLK by 16
97 * We _must_ ack these because every local APIC has only N
98 * irq slots per priority level, and a 'hanging, unacked' IRQ
99 * holds up an irq slot - in excessive cases (when multiple
100 * unexpected vectors occur) that might lock up the APIC
101 * completely.
102 * But only ack when the APIC is enabled -AK
103 */ 192 */
104 if (cpu_has_apic) 193 tmp_value = apic_read(APIC_TDCR);
105 ack_APIC_irq(); 194 apic_write_around(APIC_TDCR, (tmp_value
195 & ~(APIC_TDR_DIV_1 | APIC_TDR_DIV_TMBASE))
196 | APIC_TDR_DIV_16);
197
198 if (!oneshot)
199 apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
106} 200}
107 201
108void __init apic_intr_init(void) 202/*
203 * Program the next event, relative to now
204 */
205static int lapic_next_event(unsigned long delta,
206 struct clock_event_device *evt)
207{
208 apic_write_around(APIC_TMICT, delta);
209 return 0;
210}
211
212/*
213 * Setup the lapic timer in periodic or oneshot mode
214 */
215static void lapic_timer_setup(enum clock_event_mode mode,
216 struct clock_event_device *evt)
217{
218 unsigned long flags;
219 unsigned int v;
220
221 /* Lapic used for broadcast ? */
222 if (!local_apic_timer_verify_ok)
223 return;
224
225 local_irq_save(flags);
226
227 switch (mode) {
228 case CLOCK_EVT_MODE_PERIODIC:
229 case CLOCK_EVT_MODE_ONESHOT:
230 __setup_APIC_LVTT(calibration_result,
231 mode != CLOCK_EVT_MODE_PERIODIC, 1);
232 break;
233 case CLOCK_EVT_MODE_UNUSED:
234 case CLOCK_EVT_MODE_SHUTDOWN:
235 v = apic_read(APIC_LVTT);
236 v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
237 apic_write_around(APIC_LVTT, v);
238 break;
239 }
240
241 local_irq_restore(flags);
242}
243
244/*
245 * Local APIC timer broadcast function
246 */
247static void lapic_timer_broadcast(cpumask_t mask)
109{ 248{
110#ifdef CONFIG_SMP 249#ifdef CONFIG_SMP
111 smp_intr_init(); 250 send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
112#endif 251#endif
113 /* self generated IPI for local APIC timer */ 252}
114 set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
115 253
116 /* IPI vectors for APIC spurious and error interrupts */ 254/*
117 set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt); 255 * Setup the local APIC timer for this CPU. Copy the initilized values
118 set_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 256 * of the boot CPU and register the clock event in the framework.
257 */
258static void __devinit setup_APIC_timer(void)
259{
260 struct clock_event_device *levt = &__get_cpu_var(lapic_events);
119 261
120 /* thermal monitor LVT interrupt */ 262 memcpy(levt, &lapic_clockevent, sizeof(*levt));
121#ifdef CONFIG_X86_MCE_P4THERMAL 263 levt->cpumask = cpumask_of_cpu(smp_processor_id());
122 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 264
123#endif 265 clockevents_register_device(levt);
124} 266}
125 267
126/* Using APIC to generate smp_local_timer_interrupt? */ 268/*
127int using_apic_timer __read_mostly = 0; 269 * In this functions we calibrate APIC bus clocks to the external timer.
270 *
271 * We want to do the calibration only once since we want to have local timer
272 * irqs syncron. CPUs connected by the same APIC bus have the very same bus
273 * frequency.
274 *
275 * This was previously done by reading the PIT/HPET and waiting for a wrap
276 * around to find out, that a tick has elapsed. I have a box, where the PIT
277 * readout is broken, so it never gets out of the wait loop again. This was
278 * also reported by others.
279 *
280 * Monitoring the jiffies value is inaccurate and the clockevents
281 * infrastructure allows us to do a simple substitution of the interrupt
282 * handler.
283 *
284 * The calibration routine also uses the pm_timer when possible, as the PIT
285 * happens to run way too slow (factor 2.3 on my VAIO CoreDuo, which goes
286 * back to normal later in the boot process).
287 */
288
289#define LAPIC_CAL_LOOPS (HZ/10)
128 290
129static int enabled_via_apicbase; 291static __initdata volatile int lapic_cal_loops = -1;
292static __initdata long lapic_cal_t1, lapic_cal_t2;
293static __initdata unsigned long long lapic_cal_tsc1, lapic_cal_tsc2;
294static __initdata unsigned long lapic_cal_pm1, lapic_cal_pm2;
295static __initdata unsigned long lapic_cal_j1, lapic_cal_j2;
130 296
131void enable_NMI_through_LVT0 (void * dummy) 297/*
298 * Temporary interrupt handler.
299 */
300static void __init lapic_cal_handler(struct clock_event_device *dev)
132{ 301{
133 unsigned int v, ver; 302 unsigned long long tsc = 0;
303 long tapic = apic_read(APIC_TMCCT);
304 unsigned long pm = acpi_pm_read_early();
134 305
135 ver = apic_read(APIC_LVR); 306 if (cpu_has_tsc)
136 ver = GET_APIC_VERSION(ver); 307 rdtscll(tsc);
137 v = APIC_DM_NMI; /* unmask and set to NMI */ 308
138 if (!APIC_INTEGRATED(ver)) /* 82489DX */ 309 switch (lapic_cal_loops++) {
139 v |= APIC_LVT_LEVEL_TRIGGER; 310 case 0:
140 apic_write_around(APIC_LVT0, v); 311 lapic_cal_t1 = tapic;
312 lapic_cal_tsc1 = tsc;
313 lapic_cal_pm1 = pm;
314 lapic_cal_j1 = jiffies;
315 break;
316
317 case LAPIC_CAL_LOOPS:
318 lapic_cal_t2 = tapic;
319 lapic_cal_tsc2 = tsc;
320 if (pm < lapic_cal_pm1)
321 pm += ACPI_PM_OVRRUN;
322 lapic_cal_pm2 = pm;
323 lapic_cal_j2 = jiffies;
324 break;
325 }
141} 326}
142 327
143int get_physical_broadcast(void) 328/*
329 * Setup the boot APIC
330 *
331 * Calibrate and verify the result.
332 */
333void __init setup_boot_APIC_clock(void)
144{ 334{
145 if (modern_apic()) 335 struct clock_event_device *levt = &__get_cpu_var(lapic_events);
146 return 0xff; 336 const long pm_100ms = PMTMR_TICKS_PER_SEC/10;
147 else 337 const long pm_thresh = pm_100ms/100;
148 return 0xf; 338 void (*real_handler)(struct clock_event_device *dev);
339 unsigned long deltaj;
340 long delta, deltapm;
341
342 apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
343 "calibrating APIC timer ...\n");
344
345 local_irq_disable();
346
347 /* Replace the global interrupt handler */
348 real_handler = global_clock_event->event_handler;
349 global_clock_event->event_handler = lapic_cal_handler;
350
351 /*
352 * Setup the APIC counter to 1e9. There is no way the lapic
353 * can underflow in the 100ms detection time frame
354 */
355 __setup_APIC_LVTT(1000000000, 0, 0);
356
357 /* Let the interrupts run */
358 local_irq_enable();
359
360 while(lapic_cal_loops <= LAPIC_CAL_LOOPS);
361
362 local_irq_disable();
363
364 /* Restore the real event handler */
365 global_clock_event->event_handler = real_handler;
366
367 /* Build delta t1-t2 as apic timer counts down */
368 delta = lapic_cal_t1 - lapic_cal_t2;
369 apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta);
370
371 /* Check, if the PM timer is available */
372 deltapm = lapic_cal_pm2 - lapic_cal_pm1;
373 apic_printk(APIC_VERBOSE, "... PM timer delta = %ld\n", deltapm);
374
375 if (deltapm) {
376 unsigned long mult;
377 u64 res;
378
379 mult = clocksource_hz2mult(PMTMR_TICKS_PER_SEC, 22);
380
381 if (deltapm > (pm_100ms - pm_thresh) &&
382 deltapm < (pm_100ms + pm_thresh)) {
383 apic_printk(APIC_VERBOSE, "... PM timer result ok\n");
384 } else {
385 res = (((u64) deltapm) * mult) >> 22;
386 do_div(res, 1000000);
387 printk(KERN_WARNING "APIC calibration not consistent "
388 "with PM Timer: %ldms instead of 100ms\n",
389 (long)res);
390 /* Correct the lapic counter value */
391 res = (((u64) delta ) * pm_100ms);
392 do_div(res, deltapm);
393 printk(KERN_INFO "APIC delta adjusted to PM-Timer: "
394 "%lu (%ld)\n", (unsigned long) res, delta);
395 delta = (long) res;
396 }
397 }
398
399 /* Calculate the scaled math multiplication factor */
400 lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS, 32);
401 lapic_clockevent.max_delta_ns =
402 clockevent_delta2ns(0x7FFFFF, &lapic_clockevent);
403 lapic_clockevent.min_delta_ns =
404 clockevent_delta2ns(0xF, &lapic_clockevent);
405
406 calibration_result = (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS;
407
408 apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta);
409 apic_printk(APIC_VERBOSE, "..... mult: %ld\n", lapic_clockevent.mult);
410 apic_printk(APIC_VERBOSE, "..... calibration result: %u\n",
411 calibration_result);
412
413 if (cpu_has_tsc) {
414 delta = (long)(lapic_cal_tsc2 - lapic_cal_tsc1);
415 apic_printk(APIC_VERBOSE, "..... CPU clock speed is "
416 "%ld.%04ld MHz.\n",
417 (delta / LAPIC_CAL_LOOPS) / (1000000 / HZ),
418 (delta / LAPIC_CAL_LOOPS) % (1000000 / HZ));
419 }
420
421 apic_printk(APIC_VERBOSE, "..... host bus clock speed is "
422 "%u.%04u MHz.\n",
423 calibration_result / (1000000 / HZ),
424 calibration_result % (1000000 / HZ));
425
426
427 apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
428
429 /*
430 * Setup the apic timer manually
431 */
432 local_apic_timer_verify_ok = 1;
433 levt->event_handler = lapic_cal_handler;
434 lapic_timer_setup(CLOCK_EVT_MODE_PERIODIC, levt);
435 lapic_cal_loops = -1;
436
437 /* Let the interrupts run */
438 local_irq_enable();
439
440 while(lapic_cal_loops <= LAPIC_CAL_LOOPS);
441
442 local_irq_disable();
443
444 /* Stop the lapic timer */
445 lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt);
446
447 local_irq_enable();
448
449 /* Jiffies delta */
450 deltaj = lapic_cal_j2 - lapic_cal_j1;
451 apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj);
452
453 /* Check, if the PM timer is available */
454 deltapm = lapic_cal_pm2 - lapic_cal_pm1;
455 apic_printk(APIC_VERBOSE, "... PM timer delta = %ld\n", deltapm);
456
457 local_apic_timer_verify_ok = 0;
458
459 if (deltapm) {
460 if (deltapm > (pm_100ms - pm_thresh) &&
461 deltapm < (pm_100ms + pm_thresh)) {
462 apic_printk(APIC_VERBOSE, "... PM timer result ok\n");
463 /* Check, if the jiffies result is consistent */
464 if (deltaj < LAPIC_CAL_LOOPS-2 ||
465 deltaj > LAPIC_CAL_LOOPS+2) {
466 /*
467 * Not sure, what we can do about this one.
468 * When high resultion timers are active
469 * and the lapic timer does not stop in C3
470 * we are fine. Otherwise more trouble might
471 * be waiting. -- tglx
472 */
473 printk(KERN_WARNING "Global event device %s "
474 "has wrong frequency "
475 "(%lu ticks instead of %d)\n",
476 global_clock_event->name, deltaj,
477 LAPIC_CAL_LOOPS);
478 }
479 local_apic_timer_verify_ok = 1;
480 }
481 } else {
482 /* Check, if the jiffies result is consistent */
483 if (deltaj >= LAPIC_CAL_LOOPS-2 &&
484 deltaj <= LAPIC_CAL_LOOPS+2) {
485 apic_printk(APIC_VERBOSE, "... jiffies result ok\n");
486 local_apic_timer_verify_ok = 1;
487 }
488 }
489
490 if (!local_apic_timer_verify_ok) {
491 printk(KERN_WARNING
492 "APIC timer disabled due to verification failure.\n");
493 /* No broadcast on UP ! */
494 if (num_possible_cpus() == 1)
495 return;
496 } else
497 lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
498
499 /* Setup the lapic or request the broadcast */
500 setup_APIC_timer();
501}
502
503void __devinit setup_secondary_APIC_clock(void)
504{
505 setup_APIC_timer();
149} 506}
150 507
151int get_maxlvt(void) 508/*
509 * The guts of the apic timer interrupt
510 */
511static void local_apic_timer_interrupt(void)
152{ 512{
153 unsigned int v, ver, maxlvt; 513 int cpu = smp_processor_id();
514 struct clock_event_device *evt = &per_cpu(lapic_events, cpu);
154 515
155 v = apic_read(APIC_LVR); 516 /*
156 ver = GET_APIC_VERSION(v); 517 * Normally we should not be here till LAPIC has been initialized but
157 /* 82489DXs do not report # of LVT entries. */ 518 * in some cases like kdump, its possible that there is a pending LAPIC
158 maxlvt = APIC_INTEGRATED(ver) ? GET_APIC_MAXLVT(v) : 2; 519 * timer interrupt from previous kernel's context and is delivered in
159 return maxlvt; 520 * new kernel the moment interrupts are enabled.
521 *
522 * Interrupts are enabled early and LAPIC is setup much later, hence
523 * its possible that when we get here evt->event_handler is NULL.
524 * Check for event_handler being NULL and discard the interrupt as
525 * spurious.
526 */
527 if (!evt->event_handler) {
528 printk(KERN_WARNING
529 "Spurious LAPIC timer interrupt on cpu %d\n", cpu);
530 /* Switch it off */
531 lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, evt);
532 return;
533 }
534
535 per_cpu(irq_stat, cpu).apic_timer_irqs++;
536
537 evt->event_handler(evt);
160} 538}
161 539
540/*
541 * Local APIC timer interrupt. This is the most natural way for doing
542 * local interrupts, but local timer interrupts can be emulated by
543 * broadcast interrupts too. [in case the hw doesn't support APIC timers]
544 *
545 * [ if a single-CPU system runs an SMP kernel then we call the local
546 * interrupt as well. Thus we cannot inline the local irq ... ]
547 */
548
549void fastcall smp_apic_timer_interrupt(struct pt_regs *regs)
550{
551 struct pt_regs *old_regs = set_irq_regs(regs);
552
553 /*
554 * NOTE! We'd better ACK the irq immediately,
555 * because timer handling can be slow.
556 */
557 ack_APIC_irq();
558 /*
559 * update_process_times() expects us to have done irq_enter().
560 * Besides, if we don't timer interrupts ignore the global
561 * interrupt lock, which is the WrongThing (tm) to do.
562 */
563 irq_enter();
564 local_apic_timer_interrupt();
565 irq_exit();
566
567 set_irq_regs(old_regs);
568}
569
570int setup_profiling_timer(unsigned int multiplier)
571{
572 return -EINVAL;
573}
574
575/*
576 * Local APIC start and shutdown
577 */
578
579/**
580 * clear_local_APIC - shutdown the local APIC
581 *
582 * This is called, when a CPU is disabled and before rebooting, so the state of
583 * the local APIC has no dangling leftovers. Also used to cleanout any BIOS
584 * leftovers during boot.
585 */
162void clear_local_APIC(void) 586void clear_local_APIC(void)
163{ 587{
164 int maxlvt; 588 int maxlvt = lapic_get_maxlvt();
165 unsigned long v; 589 unsigned long v;
166 590
167 maxlvt = get_maxlvt();
168
169 /* 591 /*
170 * Masking an LVT entry can trigger a local APIC error 592 * Masking an LVT entry can trigger a local APIC error
171 * if the vector is zero. Mask LVTERR first to prevent this. 593 * if the vector is zero. Mask LVTERR first to prevent this.
@@ -189,7 +611,7 @@ void clear_local_APIC(void)
189 apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED); 611 apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED);
190 } 612 }
191 613
192/* lets not touch this if we didn't frob it */ 614 /* lets not touch this if we didn't frob it */
193#ifdef CONFIG_X86_MCE_P4THERMAL 615#ifdef CONFIG_X86_MCE_P4THERMAL
194 if (maxlvt >= 5) { 616 if (maxlvt >= 5) {
195 v = apic_read(APIC_LVTTHMR); 617 v = apic_read(APIC_LVTTHMR);
@@ -211,85 +633,18 @@ void clear_local_APIC(void)
211 if (maxlvt >= 5) 633 if (maxlvt >= 5)
212 apic_write_around(APIC_LVTTHMR, APIC_LVT_MASKED); 634 apic_write_around(APIC_LVTTHMR, APIC_LVT_MASKED);
213#endif 635#endif
214 v = GET_APIC_VERSION(apic_read(APIC_LVR)); 636 /* Integrated APIC (!82489DX) ? */
215 if (APIC_INTEGRATED(v)) { /* !82489DX */ 637 if (lapic_is_integrated()) {
216 if (maxlvt > 3) /* Due to Pentium errata 3AP and 11AP. */ 638 if (maxlvt > 3)
639 /* Clear ESR due to Pentium errata 3AP and 11AP */
217 apic_write(APIC_ESR, 0); 640 apic_write(APIC_ESR, 0);
218 apic_read(APIC_ESR); 641 apic_read(APIC_ESR);
219 } 642 }
220} 643}
221 644
222void __init connect_bsp_APIC(void) 645/**
223{ 646 * disable_local_APIC - clear and disable the local APIC
224 if (pic_mode) { 647 */
225 /*
226 * Do not trust the local APIC being empty at bootup.
227 */
228 clear_local_APIC();
229 /*
230 * PIC mode, enable APIC mode in the IMCR, i.e.
231 * connect BSP's local APIC to INT and NMI lines.
232 */
233 apic_printk(APIC_VERBOSE, "leaving PIC mode, "
234 "enabling APIC mode.\n");
235 outb(0x70, 0x22);
236 outb(0x01, 0x23);
237 }
238 enable_apic_mode();
239}
240
241void disconnect_bsp_APIC(int virt_wire_setup)
242{
243 if (pic_mode) {
244 /*
245 * Put the board back into PIC mode (has an effect
246 * only on certain older boards). Note that APIC
247 * interrupts, including IPIs, won't work beyond
248 * this point! The only exception are INIT IPIs.
249 */
250 apic_printk(APIC_VERBOSE, "disabling APIC mode, "
251 "entering PIC mode.\n");
252 outb(0x70, 0x22);
253 outb(0x00, 0x23);
254 }
255 else {
256 /* Go back to Virtual Wire compatibility mode */
257 unsigned long value;
258
259 /* For the spurious interrupt use vector F, and enable it */
260 value = apic_read(APIC_SPIV);
261 value &= ~APIC_VECTOR_MASK;
262 value |= APIC_SPIV_APIC_ENABLED;
263 value |= 0xf;
264 apic_write_around(APIC_SPIV, value);
265
266 if (!virt_wire_setup) {
267 /* For LVT0 make it edge triggered, active high, external and enabled */
268 value = apic_read(APIC_LVT0);
269 value &= ~(APIC_MODE_MASK | APIC_SEND_PENDING |
270 APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR |
271 APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED );
272 value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING;
273 value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_EXTINT);
274 apic_write_around(APIC_LVT0, value);
275 }
276 else {
277 /* Disable LVT0 */
278 apic_write_around(APIC_LVT0, APIC_LVT_MASKED);
279 }
280
281 /* For LVT1 make it edge triggered, active high, nmi and enabled */
282 value = apic_read(APIC_LVT1);
283 value &= ~(
284 APIC_MODE_MASK | APIC_SEND_PENDING |
285 APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR |
286 APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED);
287 value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING;
288 value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_NMI);
289 apic_write_around(APIC_LVT1, value);
290 }
291}
292
293void disable_local_APIC(void) 648void disable_local_APIC(void)
294{ 649{
295 unsigned long value; 650 unsigned long value;
@@ -304,8 +659,13 @@ void disable_local_APIC(void)
304 value &= ~APIC_SPIV_APIC_ENABLED; 659 value &= ~APIC_SPIV_APIC_ENABLED;
305 apic_write_around(APIC_SPIV, value); 660 apic_write_around(APIC_SPIV, value);
306 661
662 /*
663 * When LAPIC was disabled by the BIOS and enabled by the kernel,
664 * restore the disabled state.
665 */
307 if (enabled_via_apicbase) { 666 if (enabled_via_apicbase) {
308 unsigned int l, h; 667 unsigned int l, h;
668
309 rdmsr(MSR_IA32_APICBASE, l, h); 669 rdmsr(MSR_IA32_APICBASE, l, h);
310 l &= ~MSR_IA32_APICBASE_ENABLE; 670 l &= ~MSR_IA32_APICBASE_ENABLE;
311 wrmsr(MSR_IA32_APICBASE, l, h); 671 wrmsr(MSR_IA32_APICBASE, l, h);
@@ -313,6 +673,28 @@ void disable_local_APIC(void)
313} 673}
314 674
315/* 675/*
676 * If Linux enabled the LAPIC against the BIOS default disable it down before
677 * re-entering the BIOS on shutdown. Otherwise the BIOS may get confused and
678 * not power-off. Additionally clear all LVT entries before disable_local_APIC
679 * for the case where Linux didn't enable the LAPIC.
680 */
681void lapic_shutdown(void)
682{
683 unsigned long flags;
684
685 if (!cpu_has_apic)
686 return;
687
688 local_irq_save(flags);
689 clear_local_APIC();
690
691 if (enabled_via_apicbase)
692 disable_local_APIC();
693
694 local_irq_restore(flags);
695}
696
697/*
316 * This is to verify that we're looking at a real local APIC. 698 * This is to verify that we're looking at a real local APIC.
317 * Check these against your board if the CPUs aren't getting 699 * Check these against your board if the CPUs aren't getting
318 * started for no apparent reason. 700 * started for no apparent reason.
@@ -344,7 +726,7 @@ int __init verify_local_APIC(void)
344 reg1 = GET_APIC_VERSION(reg0); 726 reg1 = GET_APIC_VERSION(reg0);
345 if (reg1 == 0x00 || reg1 == 0xff) 727 if (reg1 == 0x00 || reg1 == 0xff)
346 return 0; 728 return 0;
347 reg1 = get_maxlvt(); 729 reg1 = lapic_get_maxlvt();
348 if (reg1 < 0x02 || reg1 == 0xff) 730 if (reg1 < 0x02 || reg1 == 0xff)
349 return 0; 731 return 0;
350 732
@@ -367,10 +749,15 @@ int __init verify_local_APIC(void)
367 return 1; 749 return 1;
368} 750}
369 751
752/**
753 * sync_Arb_IDs - synchronize APIC bus arbitration IDs
754 */
370void __init sync_Arb_IDs(void) 755void __init sync_Arb_IDs(void)
371{ 756{
372 /* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 757 /*
373 And not needed on AMD */ 758 * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not
759 * needed on AMD.
760 */
374 if (modern_apic()) 761 if (modern_apic())
375 return; 762 return;
376 /* 763 /*
@@ -383,14 +770,12 @@ void __init sync_Arb_IDs(void)
383 | APIC_DM_INIT); 770 | APIC_DM_INIT);
384} 771}
385 772
386extern void __error_in_apic_c (void);
387
388/* 773/*
389 * An initial setup of the virtual wire mode. 774 * An initial setup of the virtual wire mode.
390 */ 775 */
391void __init init_bsp_APIC(void) 776void __init init_bsp_APIC(void)
392{ 777{
393 unsigned long value, ver; 778 unsigned long value;
394 779
395 /* 780 /*
396 * Don't do the setup now if we have a SMP BIOS as the 781 * Don't do the setup now if we have a SMP BIOS as the
@@ -399,9 +784,6 @@ void __init init_bsp_APIC(void)
399 if (smp_found_config || !cpu_has_apic) 784 if (smp_found_config || !cpu_has_apic)
400 return; 785 return;
401 786
402 value = apic_read(APIC_LVR);
403 ver = GET_APIC_VERSION(value);
404
405 /* 787 /*
406 * Do not trust the local APIC being empty at bootup. 788 * Do not trust the local APIC being empty at bootup.
407 */ 789 */
@@ -413,9 +795,10 @@ void __init init_bsp_APIC(void)
413 value = apic_read(APIC_SPIV); 795 value = apic_read(APIC_SPIV);
414 value &= ~APIC_VECTOR_MASK; 796 value &= ~APIC_VECTOR_MASK;
415 value |= APIC_SPIV_APIC_ENABLED; 797 value |= APIC_SPIV_APIC_ENABLED;
416 798
417 /* This bit is reserved on P4/Xeon and should be cleared */ 799 /* This bit is reserved on P4/Xeon and should be cleared */
418 if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 == 15)) 800 if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
801 (boot_cpu_data.x86 == 15))
419 value &= ~APIC_SPIV_FOCUS_DISABLED; 802 value &= ~APIC_SPIV_FOCUS_DISABLED;
420 else 803 else
421 value |= APIC_SPIV_FOCUS_DISABLED; 804 value |= APIC_SPIV_FOCUS_DISABLED;
@@ -427,14 +810,17 @@ void __init init_bsp_APIC(void)
427 */ 810 */
428 apic_write_around(APIC_LVT0, APIC_DM_EXTINT); 811 apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
429 value = APIC_DM_NMI; 812 value = APIC_DM_NMI;
430 if (!APIC_INTEGRATED(ver)) /* 82489DX */ 813 if (!lapic_is_integrated()) /* 82489DX */
431 value |= APIC_LVT_LEVEL_TRIGGER; 814 value |= APIC_LVT_LEVEL_TRIGGER;
432 apic_write_around(APIC_LVT1, value); 815 apic_write_around(APIC_LVT1, value);
433} 816}
434 817
818/**
819 * setup_local_APIC - setup the local APIC
820 */
435void __devinit setup_local_APIC(void) 821void __devinit setup_local_APIC(void)
436{ 822{
437 unsigned long oldvalue, value, ver, maxlvt; 823 unsigned long oldvalue, value, maxlvt, integrated;
438 int i, j; 824 int i, j;
439 825
440 /* Pound the ESR really hard over the head with a big hammer - mbligh */ 826 /* Pound the ESR really hard over the head with a big hammer - mbligh */
@@ -445,11 +831,7 @@ void __devinit setup_local_APIC(void)
445 apic_write(APIC_ESR, 0); 831 apic_write(APIC_ESR, 0);
446 } 832 }
447 833
448 value = apic_read(APIC_LVR); 834 integrated = lapic_is_integrated();
449 ver = GET_APIC_VERSION(value);
450
451 if ((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f)
452 __error_in_apic_c();
453 835
454 /* 836 /*
455 * Double-check whether this APIC is really registered. 837 * Double-check whether this APIC is really registered.
@@ -520,13 +902,10 @@ void __devinit setup_local_APIC(void)
520 * like LRU than MRU (the short-term load is more even across CPUs). 902 * like LRU than MRU (the short-term load is more even across CPUs).
521 * See also the comment in end_level_ioapic_irq(). --macro 903 * See also the comment in end_level_ioapic_irq(). --macro
522 */ 904 */
523#if 1 905
524 /* Enable focus processor (bit==0) */ 906 /* Enable focus processor (bit==0) */
525 value &= ~APIC_SPIV_FOCUS_DISABLED; 907 value &= ~APIC_SPIV_FOCUS_DISABLED;
526#else 908
527 /* Disable focus processor (bit==1) */
528 value |= APIC_SPIV_FOCUS_DISABLED;
529#endif
530 /* 909 /*
531 * Set spurious IRQ vector 910 * Set spurious IRQ vector
532 */ 911 */
@@ -562,17 +941,18 @@ void __devinit setup_local_APIC(void)
562 value = APIC_DM_NMI; 941 value = APIC_DM_NMI;
563 else 942 else
564 value = APIC_DM_NMI | APIC_LVT_MASKED; 943 value = APIC_DM_NMI | APIC_LVT_MASKED;
565 if (!APIC_INTEGRATED(ver)) /* 82489DX */ 944 if (!integrated) /* 82489DX */
566 value |= APIC_LVT_LEVEL_TRIGGER; 945 value |= APIC_LVT_LEVEL_TRIGGER;
567 apic_write_around(APIC_LVT1, value); 946 apic_write_around(APIC_LVT1, value);
568 947
569 if (APIC_INTEGRATED(ver) && !esr_disable) { /* !82489DX */ 948 if (integrated && !esr_disable) { /* !82489DX */
570 maxlvt = get_maxlvt(); 949 maxlvt = lapic_get_maxlvt();
571 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ 950 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
572 apic_write(APIC_ESR, 0); 951 apic_write(APIC_ESR, 0);
573 oldvalue = apic_read(APIC_ESR); 952 oldvalue = apic_read(APIC_ESR);
574 953
575 value = ERROR_APIC_VECTOR; // enables sending errors 954 /* enables sending errors */
955 value = ERROR_APIC_VECTOR;
576 apic_write_around(APIC_LVTERR, value); 956 apic_write_around(APIC_LVTERR, value);
577 /* 957 /*
578 * spec says clear errors after enabling vector. 958 * spec says clear errors after enabling vector.
@@ -585,207 +965,30 @@ void __devinit setup_local_APIC(void)
585 "vector: 0x%08lx after: 0x%08lx\n", 965 "vector: 0x%08lx after: 0x%08lx\n",
586 oldvalue, value); 966 oldvalue, value);
587 } else { 967 } else {
588 if (esr_disable) 968 if (esr_disable)
589 /* 969 /*
590 * Something untraceble is creating bad interrupts on 970 * Something untraceble is creating bad interrupts on
591 * secondary quads ... for the moment, just leave the 971 * secondary quads ... for the moment, just leave the
592 * ESR disabled - we can't do anything useful with the 972 * ESR disabled - we can't do anything useful with the
593 * errors anyway - mbligh 973 * errors anyway - mbligh
594 */ 974 */
595 printk("Leaving ESR disabled.\n"); 975 printk(KERN_INFO "Leaving ESR disabled.\n");
596 else 976 else
597 printk("No ESR for 82489DX.\n"); 977 printk(KERN_INFO "No ESR for 82489DX.\n");
598 } 978 }
599 979
980 /* Disable the local apic timer */
981 value = apic_read(APIC_LVTT);
982 value |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
983 apic_write_around(APIC_LVTT, value);
984
600 setup_apic_nmi_watchdog(NULL); 985 setup_apic_nmi_watchdog(NULL);
601 apic_pm_activate(); 986 apic_pm_activate();
602} 987}
603 988
604/* 989/*
605 * If Linux enabled the LAPIC against the BIOS default 990 * Detect and initialize APIC
606 * disable it down before re-entering the BIOS on shutdown.
607 * Otherwise the BIOS may get confused and not power-off.
608 * Additionally clear all LVT entries before disable_local_APIC
609 * for the case where Linux didn't enable the LAPIC.
610 */ 991 */
611void lapic_shutdown(void)
612{
613 unsigned long flags;
614
615 if (!cpu_has_apic)
616 return;
617
618 local_irq_save(flags);
619 clear_local_APIC();
620
621 if (enabled_via_apicbase)
622 disable_local_APIC();
623
624 local_irq_restore(flags);
625}
626
627#ifdef CONFIG_PM
628
629static struct {
630 int active;
631 /* r/w apic fields */
632 unsigned int apic_id;
633 unsigned int apic_taskpri;
634 unsigned int apic_ldr;
635 unsigned int apic_dfr;
636 unsigned int apic_spiv;
637 unsigned int apic_lvtt;
638 unsigned int apic_lvtpc;
639 unsigned int apic_lvt0;
640 unsigned int apic_lvt1;
641 unsigned int apic_lvterr;
642 unsigned int apic_tmict;
643 unsigned int apic_tdcr;
644 unsigned int apic_thmr;
645} apic_pm_state;
646
647static int lapic_suspend(struct sys_device *dev, pm_message_t state)
648{
649 unsigned long flags;
650 int maxlvt;
651
652 if (!apic_pm_state.active)
653 return 0;
654
655 maxlvt = get_maxlvt();
656
657 apic_pm_state.apic_id = apic_read(APIC_ID);
658 apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
659 apic_pm_state.apic_ldr = apic_read(APIC_LDR);
660 apic_pm_state.apic_dfr = apic_read(APIC_DFR);
661 apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
662 apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
663 if (maxlvt >= 4)
664 apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);
665 apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
666 apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
667 apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
668 apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
669 apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
670#ifdef CONFIG_X86_MCE_P4THERMAL
671 if (maxlvt >= 5)
672 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
673#endif
674
675 local_irq_save(flags);
676 disable_local_APIC();
677 local_irq_restore(flags);
678 return 0;
679}
680
681static int lapic_resume(struct sys_device *dev)
682{
683 unsigned int l, h;
684 unsigned long flags;
685 int maxlvt;
686
687 if (!apic_pm_state.active)
688 return 0;
689
690 maxlvt = get_maxlvt();
691
692 local_irq_save(flags);
693
694 /*
695 * Make sure the APICBASE points to the right address
696 *
697 * FIXME! This will be wrong if we ever support suspend on
698 * SMP! We'll need to do this as part of the CPU restore!
699 */
700 rdmsr(MSR_IA32_APICBASE, l, h);
701 l &= ~MSR_IA32_APICBASE_BASE;
702 l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
703 wrmsr(MSR_IA32_APICBASE, l, h);
704
705 apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
706 apic_write(APIC_ID, apic_pm_state.apic_id);
707 apic_write(APIC_DFR, apic_pm_state.apic_dfr);
708 apic_write(APIC_LDR, apic_pm_state.apic_ldr);
709 apic_write(APIC_TASKPRI, apic_pm_state.apic_taskpri);
710 apic_write(APIC_SPIV, apic_pm_state.apic_spiv);
711 apic_write(APIC_LVT0, apic_pm_state.apic_lvt0);
712 apic_write(APIC_LVT1, apic_pm_state.apic_lvt1);
713#ifdef CONFIG_X86_MCE_P4THERMAL
714 if (maxlvt >= 5)
715 apic_write(APIC_LVTTHMR, apic_pm_state.apic_thmr);
716#endif
717 if (maxlvt >= 4)
718 apic_write(APIC_LVTPC, apic_pm_state.apic_lvtpc);
719 apic_write(APIC_LVTT, apic_pm_state.apic_lvtt);
720 apic_write(APIC_TDCR, apic_pm_state.apic_tdcr);
721 apic_write(APIC_TMICT, apic_pm_state.apic_tmict);
722 apic_write(APIC_ESR, 0);
723 apic_read(APIC_ESR);
724 apic_write(APIC_LVTERR, apic_pm_state.apic_lvterr);
725 apic_write(APIC_ESR, 0);
726 apic_read(APIC_ESR);
727 local_irq_restore(flags);
728 return 0;
729}
730
731/*
732 * This device has no shutdown method - fully functioning local APICs
733 * are needed on every CPU up until machine_halt/restart/poweroff.
734 */
735
736static struct sysdev_class lapic_sysclass = {
737 set_kset_name("lapic"),
738 .resume = lapic_resume,
739 .suspend = lapic_suspend,
740};
741
742static struct sys_device device_lapic = {
743 .id = 0,
744 .cls = &lapic_sysclass,
745};
746
747static void __devinit apic_pm_activate(void)
748{
749 apic_pm_state.active = 1;
750}
751
752static int __init init_lapic_sysfs(void)
753{
754 int error;
755
756 if (!cpu_has_apic)
757 return 0;
758 /* XXX: remove suspend/resume procs if !apic_pm_state.active? */
759
760 error = sysdev_class_register(&lapic_sysclass);
761 if (!error)
762 error = sysdev_register(&device_lapic);
763 return error;
764}
765device_initcall(init_lapic_sysfs);
766
767#else /* CONFIG_PM */
768
769static void apic_pm_activate(void) { }
770
771#endif /* CONFIG_PM */
772
773/*
774 * Detect and enable local APICs on non-SMP boards.
775 * Original code written by Keir Fraser.
776 */
777
778static int __init apic_set_verbosity(char *str)
779{
780 if (strcmp("debug", str) == 0)
781 apic_verbosity = APIC_DEBUG;
782 else if (strcmp("verbose", str) == 0)
783 apic_verbosity = APIC_VERBOSE;
784 return 1;
785}
786
787__setup("apic=", apic_set_verbosity);
788
789static int __init detect_init_APIC (void) 992static int __init detect_init_APIC (void)
790{ 993{
791 u32 h, l, features; 994 u32 h, l, features;
@@ -797,7 +1000,7 @@ static int __init detect_init_APIC (void)
797 switch (boot_cpu_data.x86_vendor) { 1000 switch (boot_cpu_data.x86_vendor) {
798 case X86_VENDOR_AMD: 1001 case X86_VENDOR_AMD:
799 if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) || 1002 if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
800 (boot_cpu_data.x86 == 15)) 1003 (boot_cpu_data.x86 == 15))
801 break; 1004 break;
802 goto no_apic; 1005 goto no_apic;
803 case X86_VENDOR_INTEL: 1006 case X86_VENDOR_INTEL:
@@ -811,23 +1014,23 @@ static int __init detect_init_APIC (void)
811 1014
812 if (!cpu_has_apic) { 1015 if (!cpu_has_apic) {
813 /* 1016 /*
814 * Over-ride BIOS and try to enable the local 1017 * Over-ride BIOS and try to enable the local APIC only if
815 * APIC only if "lapic" specified. 1018 * "lapic" specified.
816 */ 1019 */
817 if (enable_local_apic <= 0) { 1020 if (enable_local_apic <= 0) {
818 printk("Local APIC disabled by BIOS -- " 1021 printk(KERN_INFO "Local APIC disabled by BIOS -- "
819 "you can enable it with \"lapic\"\n"); 1022 "you can enable it with \"lapic\"\n");
820 return -1; 1023 return -1;
821 } 1024 }
822 /* 1025 /*
823 * Some BIOSes disable the local APIC in the 1026 * Some BIOSes disable the local APIC in the APIC_BASE
824 * APIC_BASE MSR. This can only be done in 1027 * MSR. This can only be done in software for Intel P6 or later
825 * software for Intel P6 or later and AMD K7 1028 * and AMD K7 (Model > 1) or later.
826 * (Model > 1) or later.
827 */ 1029 */
828 rdmsr(MSR_IA32_APICBASE, l, h); 1030 rdmsr(MSR_IA32_APICBASE, l, h);
829 if (!(l & MSR_IA32_APICBASE_ENABLE)) { 1031 if (!(l & MSR_IA32_APICBASE_ENABLE)) {
830 printk("Local APIC disabled by BIOS -- reenabling.\n"); 1032 printk(KERN_INFO
1033 "Local APIC disabled by BIOS -- reenabling.\n");
831 l &= ~MSR_IA32_APICBASE_BASE; 1034 l &= ~MSR_IA32_APICBASE_BASE;
832 l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; 1035 l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
833 wrmsr(MSR_IA32_APICBASE, l, h); 1036 wrmsr(MSR_IA32_APICBASE, l, h);
@@ -840,7 +1043,7 @@ static int __init detect_init_APIC (void)
840 */ 1043 */
841 features = cpuid_edx(1); 1044 features = cpuid_edx(1);
842 if (!(features & (1 << X86_FEATURE_APIC))) { 1045 if (!(features & (1 << X86_FEATURE_APIC))) {
843 printk("Could not enable APIC!\n"); 1046 printk(KERN_WARNING "Could not enable APIC!\n");
844 return -1; 1047 return -1;
845 } 1048 }
846 set_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); 1049 set_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
@@ -854,17 +1057,20 @@ static int __init detect_init_APIC (void)
854 if (nmi_watchdog != NMI_NONE) 1057 if (nmi_watchdog != NMI_NONE)
855 nmi_watchdog = NMI_LOCAL_APIC; 1058 nmi_watchdog = NMI_LOCAL_APIC;
856 1059
857 printk("Found and enabled local APIC!\n"); 1060 printk(KERN_INFO "Found and enabled local APIC!\n");
858 1061
859 apic_pm_activate(); 1062 apic_pm_activate();
860 1063
861 return 0; 1064 return 0;
862 1065
863no_apic: 1066no_apic:
864 printk("No local APIC present or hardware disabled\n"); 1067 printk(KERN_INFO "No local APIC present or hardware disabled\n");
865 return -1; 1068 return -1;
866} 1069}
867 1070
1071/**
1072 * init_apic_mappings - initialize APIC mappings
1073 */
868void __init init_apic_mappings(void) 1074void __init init_apic_mappings(void)
869{ 1075{
870 unsigned long apic_phys; 1076 unsigned long apic_phys;
@@ -924,384 +1130,92 @@ fake_ioapic_page:
924} 1130}
925 1131
926/* 1132/*
927 * This part sets up the APIC 32 bit clock in LVTT1, with HZ interrupts 1133 * This initializes the IO-APIC and APIC hardware if this is
928 * per second. We assume that the caller has already set up the local 1134 * a UP kernel.
929 * APIC.
930 *
931 * The APIC timer is not exactly sync with the external timer chip, it
932 * closely follows bus clocks.
933 */
934
935/*
936 * The timer chip is already set up at HZ interrupts per second here,
937 * but we do not accept timer interrupts yet. We only allow the BP
938 * to calibrate.
939 */
940static unsigned int __devinit get_8254_timer_count(void)
941{
942 unsigned long flags;
943
944 unsigned int count;
945
946 spin_lock_irqsave(&i8253_lock, flags);
947
948 outb_p(0x00, PIT_MODE);
949 count = inb_p(PIT_CH0);
950 count |= inb_p(PIT_CH0) << 8;
951
952 spin_unlock_irqrestore(&i8253_lock, flags);
953
954 return count;
955}
956
957/* next tick in 8254 can be caught by catching timer wraparound */
958static void __devinit wait_8254_wraparound(void)
959{
960 unsigned int curr_count, prev_count;
961
962 curr_count = get_8254_timer_count();
963 do {
964 prev_count = curr_count;
965 curr_count = get_8254_timer_count();
966
967 /* workaround for broken Mercury/Neptune */
968 if (prev_count >= curr_count + 0x100)
969 curr_count = get_8254_timer_count();
970
971 } while (prev_count >= curr_count);
972}
973
974/*
975 * Default initialization for 8254 timers. If we use other timers like HPET,
976 * we override this later
977 */
978void (*wait_timer_tick)(void) __devinitdata = wait_8254_wraparound;
979
980/*
981 * This function sets up the local APIC timer, with a timeout of
982 * 'clocks' APIC bus clock. During calibration we actually call
983 * this function twice on the boot CPU, once with a bogus timeout
984 * value, second time for real. The other (noncalibrating) CPUs
985 * call this function only once, with the real, calibrated value.
986 *
987 * We do reads before writes even if unnecessary, to get around the
988 * P5 APIC double write bug.
989 */ 1135 */
990 1136int __init APIC_init_uniprocessor (void)
991#define APIC_DIVISOR 16
992
993static void __setup_APIC_LVTT(unsigned int clocks)
994{ 1137{
995 unsigned int lvtt_value, tmp_value, ver; 1138 if (enable_local_apic < 0)
996 int cpu = smp_processor_id(); 1139 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
997
998 ver = GET_APIC_VERSION(apic_read(APIC_LVR));
999 lvtt_value = APIC_LVT_TIMER_PERIODIC | LOCAL_TIMER_VECTOR;
1000 if (!APIC_INTEGRATED(ver))
1001 lvtt_value |= SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV);
1002
1003 if (cpu_isset(cpu, timer_bcast_ipi))
1004 lvtt_value |= APIC_LVT_MASKED;
1005 1140
1006 apic_write_around(APIC_LVTT, lvtt_value); 1141 if (!smp_found_config && !cpu_has_apic)
1142 return -1;
1007 1143
1008 /* 1144 /*
1009 * Divide PICLK by 16 1145 * Complain if the BIOS pretends there is one.
1010 */ 1146 */
1011 tmp_value = apic_read(APIC_TDCR); 1147 if (!cpu_has_apic &&
1012 apic_write_around(APIC_TDCR, (tmp_value 1148 APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
1013 & ~(APIC_TDR_DIV_1 | APIC_TDR_DIV_TMBASE)) 1149 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
1014 | APIC_TDR_DIV_16); 1150 boot_cpu_physical_apicid);
1015 1151 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
1016 apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR); 1152 return -1;
1017} 1153 }
1018 1154
1019static void __devinit setup_APIC_timer(unsigned int clocks) 1155 verify_local_APIC();
1020{
1021 unsigned long flags;
1022 1156
1023 local_irq_save(flags); 1157 connect_bsp_APIC();
1024 1158
1025 /* 1159 /*
1026 * Wait for IRQ0's slice: 1160 * Hack: In case of kdump, after a crash, kernel might be booting
1161 * on a cpu with non-zero lapic id. But boot_cpu_physical_apicid
1162 * might be zero if read from MP tables. Get it from LAPIC.
1027 */ 1163 */
1028 wait_timer_tick(); 1164#ifdef CONFIG_CRASH_DUMP
1165 boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
1166#endif
1167 phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
1029 1168
1030 __setup_APIC_LVTT(clocks); 1169 setup_local_APIC();
1031 1170
1032 local_irq_restore(flags); 1171#ifdef CONFIG_X86_IO_APIC
1172 if (smp_found_config)
1173 if (!skip_ioapic_setup && nr_ioapics)
1174 setup_IO_APIC();
1175#endif
1176 setup_boot_clock();
1177
1178 return 0;
1033} 1179}
1034 1180
1035/* 1181/*
1036 * In this function we calibrate APIC bus clocks to the external 1182 * APIC command line parameters
1037 * timer. Unfortunately we cannot use jiffies and the timer irq
1038 * to calibrate, since some later bootup code depends on getting
1039 * the first irq? Ugh.
1040 *
1041 * We want to do the calibration only once since we
1042 * want to have local timer irqs syncron. CPUs connected
1043 * by the same APIC bus have the very same bus frequency.
1044 * And we want to have irqs off anyways, no accidental
1045 * APIC irq that way.
1046 */ 1183 */
1047 1184static int __init parse_lapic(char *arg)
1048static int __init calibrate_APIC_clock(void)
1049{
1050 unsigned long long t1 = 0, t2 = 0;
1051 long tt1, tt2;
1052 long result;
1053 int i;
1054 const int LOOPS = HZ/10;
1055
1056 apic_printk(APIC_VERBOSE, "calibrating APIC timer ...\n");
1057
1058 /*
1059 * Put whatever arbitrary (but long enough) timeout
1060 * value into the APIC clock, we just want to get the
1061 * counter running for calibration.
1062 */
1063 __setup_APIC_LVTT(1000000000);
1064
1065 /*
1066 * The timer chip counts down to zero. Let's wait
1067 * for a wraparound to start exact measurement:
1068 * (the current tick might have been already half done)
1069 */
1070
1071 wait_timer_tick();
1072
1073 /*
1074 * We wrapped around just now. Let's start:
1075 */
1076 if (cpu_has_tsc)
1077 rdtscll(t1);
1078 tt1 = apic_read(APIC_TMCCT);
1079
1080 /*
1081 * Let's wait LOOPS wraprounds:
1082 */
1083 for (i = 0; i < LOOPS; i++)
1084 wait_timer_tick();
1085
1086 tt2 = apic_read(APIC_TMCCT);
1087 if (cpu_has_tsc)
1088 rdtscll(t2);
1089
1090 /*
1091 * The APIC bus clock counter is 32 bits only, it
1092 * might have overflown, but note that we use signed
1093 * longs, thus no extra care needed.
1094 *
1095 * underflown to be exact, as the timer counts down ;)
1096 */
1097
1098 result = (tt1-tt2)*APIC_DIVISOR/LOOPS;
1099
1100 if (cpu_has_tsc)
1101 apic_printk(APIC_VERBOSE, "..... CPU clock speed is "
1102 "%ld.%04ld MHz.\n",
1103 ((long)(t2-t1)/LOOPS)/(1000000/HZ),
1104 ((long)(t2-t1)/LOOPS)%(1000000/HZ));
1105
1106 apic_printk(APIC_VERBOSE, "..... host bus clock speed is "
1107 "%ld.%04ld MHz.\n",
1108 result/(1000000/HZ),
1109 result%(1000000/HZ));
1110
1111 return result;
1112}
1113
1114static unsigned int calibration_result;
1115
1116void __init setup_boot_APIC_clock(void)
1117{
1118 unsigned long flags;
1119 apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n");
1120 using_apic_timer = 1;
1121
1122 local_irq_save(flags);
1123
1124 calibration_result = calibrate_APIC_clock();
1125 /*
1126 * Now set up the timer for real.
1127 */
1128 setup_APIC_timer(calibration_result);
1129
1130 local_irq_restore(flags);
1131}
1132
1133void __devinit setup_secondary_APIC_clock(void)
1134{
1135 setup_APIC_timer(calibration_result);
1136}
1137
1138void disable_APIC_timer(void)
1139{
1140 if (using_apic_timer) {
1141 unsigned long v;
1142
1143 v = apic_read(APIC_LVTT);
1144 /*
1145 * When an illegal vector value (0-15) is written to an LVT
1146 * entry and delivery mode is Fixed, the APIC may signal an
1147 * illegal vector error, with out regard to whether the mask
1148 * bit is set or whether an interrupt is actually seen on input.
1149 *
1150 * Boot sequence might call this function when the LVTT has
1151 * '0' vector value. So make sure vector field is set to
1152 * valid value.
1153 */
1154 v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
1155 apic_write_around(APIC_LVTT, v);
1156 }
1157}
1158
1159void enable_APIC_timer(void)
1160{ 1185{
1161 int cpu = smp_processor_id(); 1186 enable_local_apic = 1;
1162 1187 return 0;
1163 if (using_apic_timer &&
1164 !cpu_isset(cpu, timer_bcast_ipi)) {
1165 unsigned long v;
1166
1167 v = apic_read(APIC_LVTT);
1168 apic_write_around(APIC_LVTT, v & ~APIC_LVT_MASKED);
1169 }
1170} 1188}
1189early_param("lapic", parse_lapic);
1171 1190
1172void switch_APIC_timer_to_ipi(void *cpumask) 1191static int __init parse_nolapic(char *arg)
1173{ 1192{
1174 cpumask_t mask = *(cpumask_t *)cpumask; 1193 enable_local_apic = -1;
1175 int cpu = smp_processor_id(); 1194 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
1176 1195 return 0;
1177 if (cpu_isset(cpu, mask) &&
1178 !cpu_isset(cpu, timer_bcast_ipi)) {
1179 disable_APIC_timer();
1180 cpu_set(cpu, timer_bcast_ipi);
1181 }
1182} 1196}
1183EXPORT_SYMBOL(switch_APIC_timer_to_ipi); 1197early_param("nolapic", parse_nolapic);
1184 1198
1185void switch_ipi_to_APIC_timer(void *cpumask) 1199static int __init apic_set_verbosity(char *str)
1186{ 1200{
1187 cpumask_t mask = *(cpumask_t *)cpumask; 1201 if (strcmp("debug", str) == 0)
1188 int cpu = smp_processor_id(); 1202 apic_verbosity = APIC_DEBUG;
1189 1203 else if (strcmp("verbose", str) == 0)
1190 if (cpu_isset(cpu, mask) && 1204 apic_verbosity = APIC_VERBOSE;
1191 cpu_isset(cpu, timer_bcast_ipi)) { 1205 return 1;
1192 cpu_clear(cpu, timer_bcast_ipi);
1193 enable_APIC_timer();
1194 }
1195} 1206}
1196EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
1197
1198#undef APIC_DIVISOR
1199 1207
1200/* 1208__setup("apic=", apic_set_verbosity);
1201 * Local timer interrupt handler. It does both profiling and
1202 * process statistics/rescheduling.
1203 *
1204 * We do profiling in every local tick, statistics/rescheduling
1205 * happen only every 'profiling multiplier' ticks. The default
1206 * multiplier is 1 and it can be changed by writing the new multiplier
1207 * value into /proc/profile.
1208 */
1209
1210inline void smp_local_timer_interrupt(void)
1211{
1212 profile_tick(CPU_PROFILING);
1213#ifdef CONFIG_SMP
1214 update_process_times(user_mode_vm(get_irq_regs()));
1215#endif
1216 1209
1217 /*
1218 * We take the 'long' return path, and there every subsystem
1219 * grabs the apropriate locks (kernel lock/ irq lock).
1220 *
1221 * we might want to decouple profiling from the 'long path',
1222 * and do the profiling totally in assembly.
1223 *
1224 * Currently this isn't too much of an issue (performance wise),
1225 * we can take more than 100K local irqs per second on a 100 MHz P5.
1226 */
1227}
1228 1210
1229/* 1211/*
1230 * Local APIC timer interrupt. This is the most natural way for doing 1212 * Local APIC interrupts
1231 * local interrupts, but local timer interrupts can be emulated by
1232 * broadcast interrupts too. [in case the hw doesn't support APIC timers]
1233 *
1234 * [ if a single-CPU system runs an SMP kernel then we call the local
1235 * interrupt as well. Thus we cannot inline the local irq ... ]
1236 */ 1213 */
1237 1214
1238fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
1239{
1240 struct pt_regs *old_regs = set_irq_regs(regs);
1241 int cpu = smp_processor_id();
1242
1243 /*
1244 * the NMI deadlock-detector uses this.
1245 */
1246 per_cpu(irq_stat, cpu).apic_timer_irqs++;
1247
1248 /*
1249 * NOTE! We'd better ACK the irq immediately,
1250 * because timer handling can be slow.
1251 */
1252 ack_APIC_irq();
1253 /*
1254 * update_process_times() expects us to have done irq_enter().
1255 * Besides, if we don't timer interrupts ignore the global
1256 * interrupt lock, which is the WrongThing (tm) to do.
1257 */
1258 irq_enter();
1259 smp_local_timer_interrupt();
1260 irq_exit();
1261 set_irq_regs(old_regs);
1262}
1263
1264#ifndef CONFIG_SMP
1265static void up_apic_timer_interrupt_call(void)
1266{
1267 int cpu = smp_processor_id();
1268
1269 /*
1270 * the NMI deadlock-detector uses this.
1271 */
1272 per_cpu(irq_stat, cpu).apic_timer_irqs++;
1273
1274 smp_local_timer_interrupt();
1275}
1276#endif
1277
1278void smp_send_timer_broadcast_ipi(void)
1279{
1280 cpumask_t mask;
1281
1282 cpus_and(mask, cpu_online_map, timer_bcast_ipi);
1283 if (!cpus_empty(mask)) {
1284#ifdef CONFIG_SMP
1285 send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
1286#else
1287 /*
1288 * We can directly call the apic timer interrupt handler
1289 * in UP case. Minus all irq related functions
1290 */
1291 up_apic_timer_interrupt_call();
1292#endif
1293 }
1294}
1295
1296int setup_profiling_timer(unsigned int multiplier)
1297{
1298 return -EINVAL;
1299}
1300
1301/* 1215/*
1302 * This interrupt should _never_ happen with our APIC/SMP architecture 1216 * This interrupt should _never_ happen with our APIC/SMP architecture
1303 */ 1217 */
1304fastcall void smp_spurious_interrupt(struct pt_regs *regs) 1218void smp_spurious_interrupt(struct pt_regs *regs)
1305{ 1219{
1306 unsigned long v; 1220 unsigned long v;
1307 1221
@@ -1316,16 +1230,15 @@ fastcall void smp_spurious_interrupt(struct pt_regs *regs)
1316 ack_APIC_irq(); 1230 ack_APIC_irq();
1317 1231
1318 /* see sw-dev-man vol 3, chapter 7.4.13.5 */ 1232 /* see sw-dev-man vol 3, chapter 7.4.13.5 */
1319 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should never happen.\n", 1233 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
1320 smp_processor_id()); 1234 "should never happen.\n", smp_processor_id());
1321 irq_exit(); 1235 irq_exit();
1322} 1236}
1323 1237
1324/* 1238/*
1325 * This interrupt should never happen with our APIC/SMP architecture 1239 * This interrupt should never happen with our APIC/SMP architecture
1326 */ 1240 */
1327 1241void smp_error_interrupt(struct pt_regs *regs)
1328fastcall void smp_error_interrupt(struct pt_regs *regs)
1329{ 1242{
1330 unsigned long v, v1; 1243 unsigned long v, v1;
1331 1244
@@ -1348,69 +1261,261 @@ fastcall void smp_error_interrupt(struct pt_regs *regs)
1348 7: Illegal register address 1261 7: Illegal register address
1349 */ 1262 */
1350 printk (KERN_DEBUG "APIC error on CPU%d: %02lx(%02lx)\n", 1263 printk (KERN_DEBUG "APIC error on CPU%d: %02lx(%02lx)\n",
1351 smp_processor_id(), v , v1); 1264 smp_processor_id(), v , v1);
1352 irq_exit(); 1265 irq_exit();
1353} 1266}
1354 1267
1355/* 1268/*
1356 * This initializes the IO-APIC and APIC hardware if this is 1269 * Initialize APIC interrupts
1357 * a UP kernel.
1358 */ 1270 */
1359int __init APIC_init_uniprocessor (void) 1271void __init apic_intr_init(void)
1360{ 1272{
1361 if (enable_local_apic < 0) 1273#ifdef CONFIG_SMP
1362 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); 1274 smp_intr_init();
1275#endif
1276 /* self generated IPI for local APIC timer */
1277 set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
1363 1278
1364 if (!smp_found_config && !cpu_has_apic) 1279 /* IPI vectors for APIC spurious and error interrupts */
1365 return -1; 1280 set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
1281 set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
1366 1282
1367 /* 1283 /* thermal monitor LVT interrupt */
1368 * Complain if the BIOS pretends there is one. 1284#ifdef CONFIG_X86_MCE_P4THERMAL
1369 */ 1285 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
1370 if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { 1286#endif
1371 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 1287}
1372 boot_cpu_physical_apicid); 1288
1373 clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); 1289/**
1374 return -1; 1290 * connect_bsp_APIC - attach the APIC to the interrupt system
1291 */
1292void __init connect_bsp_APIC(void)
1293{
1294 if (pic_mode) {
1295 /*
1296 * Do not trust the local APIC being empty at bootup.
1297 */
1298 clear_local_APIC();
1299 /*
1300 * PIC mode, enable APIC mode in the IMCR, i.e. connect BSP's
1301 * local APIC to INT and NMI lines.
1302 */
1303 apic_printk(APIC_VERBOSE, "leaving PIC mode, "
1304 "enabling APIC mode.\n");
1305 outb(0x70, 0x22);
1306 outb(0x01, 0x23);
1375 } 1307 }
1308 enable_apic_mode();
1309}
1376 1310
1377 verify_local_APIC(); 1311/**
1312 * disconnect_bsp_APIC - detach the APIC from the interrupt system
1313 * @virt_wire_setup: indicates, whether virtual wire mode is selected
1314 *
1315 * Virtual wire mode is necessary to deliver legacy interrupts even when the
1316 * APIC is disabled.
1317 */
1318void disconnect_bsp_APIC(int virt_wire_setup)
1319{
1320 if (pic_mode) {
1321 /*
1322 * Put the board back into PIC mode (has an effect only on
1323 * certain older boards). Note that APIC interrupts, including
1324 * IPIs, won't work beyond this point! The only exception are
1325 * INIT IPIs.
1326 */
1327 apic_printk(APIC_VERBOSE, "disabling APIC mode, "
1328 "entering PIC mode.\n");
1329 outb(0x70, 0x22);
1330 outb(0x00, 0x23);
1331 } else {
1332 /* Go back to Virtual Wire compatibility mode */
1333 unsigned long value;
1378 1334
1379 connect_bsp_APIC(); 1335 /* For the spurious interrupt use vector F, and enable it */
1336 value = apic_read(APIC_SPIV);
1337 value &= ~APIC_VECTOR_MASK;
1338 value |= APIC_SPIV_APIC_ENABLED;
1339 value |= 0xf;
1340 apic_write_around(APIC_SPIV, value);
1380 1341
1381 /* 1342 if (!virt_wire_setup) {
1382 * Hack: In case of kdump, after a crash, kernel might be booting 1343 /*
1383 * on a cpu with non-zero lapic id. But boot_cpu_physical_apicid 1344 * For LVT0 make it edge triggered, active high,
1384 * might be zero if read from MP tables. Get it from LAPIC. 1345 * external and enabled
1385 */ 1346 */
1386#ifdef CONFIG_CRASH_DUMP 1347 value = apic_read(APIC_LVT0);
1387 boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); 1348 value &= ~(APIC_MODE_MASK | APIC_SEND_PENDING |
1388#endif 1349 APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR |
1389 phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid); 1350 APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED );
1351 value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING;
1352 value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_EXTINT);
1353 apic_write_around(APIC_LVT0, value);
1354 } else {
1355 /* Disable LVT0 */
1356 apic_write_around(APIC_LVT0, APIC_LVT_MASKED);
1357 }
1390 1358
1391 setup_local_APIC(); 1359 /*
1360 * For LVT1 make it edge triggered, active high, nmi and
1361 * enabled
1362 */
1363 value = apic_read(APIC_LVT1);
1364 value &= ~(
1365 APIC_MODE_MASK | APIC_SEND_PENDING |
1366 APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR |
1367 APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED);
1368 value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING;
1369 value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_NMI);
1370 apic_write_around(APIC_LVT1, value);
1371 }
1372}
1392 1373
1393#ifdef CONFIG_X86_IO_APIC 1374/*
1394 if (smp_found_config) 1375 * Power management
1395 if (!skip_ioapic_setup && nr_ioapics) 1376 */
1396 setup_IO_APIC(); 1377#ifdef CONFIG_PM
1378
1379static struct {
1380 int active;
1381 /* r/w apic fields */
1382 unsigned int apic_id;
1383 unsigned int apic_taskpri;
1384 unsigned int apic_ldr;
1385 unsigned int apic_dfr;
1386 unsigned int apic_spiv;
1387 unsigned int apic_lvtt;
1388 unsigned int apic_lvtpc;
1389 unsigned int apic_lvt0;
1390 unsigned int apic_lvt1;
1391 unsigned int apic_lvterr;
1392 unsigned int apic_tmict;
1393 unsigned int apic_tdcr;
1394 unsigned int apic_thmr;
1395} apic_pm_state;
1396
1397static int lapic_suspend(struct sys_device *dev, pm_message_t state)
1398{
1399 unsigned long flags;
1400 int maxlvt;
1401
1402 if (!apic_pm_state.active)
1403 return 0;
1404
1405 maxlvt = lapic_get_maxlvt();
1406
1407 apic_pm_state.apic_id = apic_read(APIC_ID);
1408 apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
1409 apic_pm_state.apic_ldr = apic_read(APIC_LDR);
1410 apic_pm_state.apic_dfr = apic_read(APIC_DFR);
1411 apic_pm_state.apic_spiv = apic_read(APIC_SPIV);
1412 apic_pm_state.apic_lvtt = apic_read(APIC_LVTT);
1413 if (maxlvt >= 4)
1414 apic_pm_state.apic_lvtpc = apic_read(APIC_LVTPC);
1415 apic_pm_state.apic_lvt0 = apic_read(APIC_LVT0);
1416 apic_pm_state.apic_lvt1 = apic_read(APIC_LVT1);
1417 apic_pm_state.apic_lvterr = apic_read(APIC_LVTERR);
1418 apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
1419 apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
1420#ifdef CONFIG_X86_MCE_P4THERMAL
1421 if (maxlvt >= 5)
1422 apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
1397#endif 1423#endif
1398 setup_boot_APIC_clock();
1399 1424
1425 local_irq_save(flags);
1426 disable_local_APIC();
1427 local_irq_restore(flags);
1400 return 0; 1428 return 0;
1401} 1429}
1402 1430
1403static int __init parse_lapic(char *arg) 1431static int lapic_resume(struct sys_device *dev)
1404{ 1432{
1405 lapic_enable(); 1433 unsigned int l, h;
1434 unsigned long flags;
1435 int maxlvt;
1436
1437 if (!apic_pm_state.active)
1438 return 0;
1439
1440 maxlvt = lapic_get_maxlvt();
1441
1442 local_irq_save(flags);
1443
1444 /*
1445 * Make sure the APICBASE points to the right address
1446 *
1447 * FIXME! This will be wrong if we ever support suspend on
1448 * SMP! We'll need to do this as part of the CPU restore!
1449 */
1450 rdmsr(MSR_IA32_APICBASE, l, h);
1451 l &= ~MSR_IA32_APICBASE_BASE;
1452 l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr;
1453 wrmsr(MSR_IA32_APICBASE, l, h);
1454
1455 apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
1456 apic_write(APIC_ID, apic_pm_state.apic_id);
1457 apic_write(APIC_DFR, apic_pm_state.apic_dfr);
1458 apic_write(APIC_LDR, apic_pm_state.apic_ldr);
1459 apic_write(APIC_TASKPRI, apic_pm_state.apic_taskpri);
1460 apic_write(APIC_SPIV, apic_pm_state.apic_spiv);
1461 apic_write(APIC_LVT0, apic_pm_state.apic_lvt0);
1462 apic_write(APIC_LVT1, apic_pm_state.apic_lvt1);
1463#ifdef CONFIG_X86_MCE_P4THERMAL
1464 if (maxlvt >= 5)
1465 apic_write(APIC_LVTTHMR, apic_pm_state.apic_thmr);
1466#endif
1467 if (maxlvt >= 4)
1468 apic_write(APIC_LVTPC, apic_pm_state.apic_lvtpc);
1469 apic_write(APIC_LVTT, apic_pm_state.apic_lvtt);
1470 apic_write(APIC_TDCR, apic_pm_state.apic_tdcr);
1471 apic_write(APIC_TMICT, apic_pm_state.apic_tmict);
1472 apic_write(APIC_ESR, 0);
1473 apic_read(APIC_ESR);
1474 apic_write(APIC_LVTERR, apic_pm_state.apic_lvterr);
1475 apic_write(APIC_ESR, 0);
1476 apic_read(APIC_ESR);
1477 local_irq_restore(flags);
1406 return 0; 1478 return 0;
1407} 1479}
1408early_param("lapic", parse_lapic);
1409 1480
1410static int __init parse_nolapic(char *arg) 1481/*
1482 * This device has no shutdown method - fully functioning local APICs
1483 * are needed on every CPU up until machine_halt/restart/poweroff.
1484 */
1485
1486static struct sysdev_class lapic_sysclass = {
1487 set_kset_name("lapic"),
1488 .resume = lapic_resume,
1489 .suspend = lapic_suspend,
1490};
1491
1492static struct sys_device device_lapic = {
1493 .id = 0,
1494 .cls = &lapic_sysclass,
1495};
1496
1497static void __devinit apic_pm_activate(void)
1411{ 1498{
1412 lapic_disable(); 1499 apic_pm_state.active = 1;
1413 return 0;
1414} 1500}
1415early_param("nolapic", parse_nolapic);
1416 1501
1502static int __init init_lapic_sysfs(void)
1503{
1504 int error;
1505
1506 if (!cpu_has_apic)
1507 return 0;
1508 /* XXX: remove suspend/resume procs if !apic_pm_state.active? */
1509
1510 error = sysdev_class_register(&lapic_sysclass);
1511 if (!error)
1512 error = sysdev_register(&device_lapic);
1513 return error;
1514}
1515device_initcall(init_lapic_sysfs);
1516
1517#else /* CONFIG_PM */
1518
1519static void apic_pm_activate(void) { }
1520
1521#endif /* CONFIG_PM */
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 199016927541..064bbf2861f4 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -211,6 +211,7 @@
211#include <linux/slab.h> 211#include <linux/slab.h>
212#include <linux/stat.h> 212#include <linux/stat.h>
213#include <linux/proc_fs.h> 213#include <linux/proc_fs.h>
214#include <linux/seq_file.h>
214#include <linux/miscdevice.h> 215#include <linux/miscdevice.h>
215#include <linux/apm_bios.h> 216#include <linux/apm_bios.h>
216#include <linux/init.h> 217#include <linux/init.h>
@@ -235,7 +236,6 @@
235 236
236#include "io_ports.h" 237#include "io_ports.h"
237 238
238extern unsigned long get_cmos_time(void);
239extern void machine_real_restart(unsigned char *, int); 239extern void machine_real_restart(unsigned char *, int);
240 240
241#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) 241#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
@@ -1175,28 +1175,6 @@ out:
1175 spin_unlock(&user_list_lock); 1175 spin_unlock(&user_list_lock);
1176} 1176}
1177 1177
1178static void set_time(void)
1179{
1180 struct timespec ts;
1181 if (got_clock_diff) { /* Must know time zone in order to set clock */
1182 ts.tv_sec = get_cmos_time() + clock_cmos_diff;
1183 ts.tv_nsec = 0;
1184 do_settimeofday(&ts);
1185 }
1186}
1187
1188static void get_time_diff(void)
1189{
1190#ifndef CONFIG_APM_RTC_IS_GMT
1191 /*
1192 * Estimate time zone so that set_time can update the clock
1193 */
1194 clock_cmos_diff = -get_cmos_time();
1195 clock_cmos_diff += get_seconds();
1196 got_clock_diff = 1;
1197#endif
1198}
1199
1200static void reinit_timer(void) 1178static void reinit_timer(void)
1201{ 1179{
1202#ifdef INIT_TIMER_AFTER_SUSPEND 1180#ifdef INIT_TIMER_AFTER_SUSPEND
@@ -1236,19 +1214,6 @@ static int suspend(int vetoable)
1236 local_irq_disable(); 1214 local_irq_disable();
1237 device_power_down(PMSG_SUSPEND); 1215 device_power_down(PMSG_SUSPEND);
1238 1216
1239 /* serialize with the timer interrupt */
1240 write_seqlock(&xtime_lock);
1241
1242 /* protect against access to timer chip registers */
1243 spin_lock(&i8253_lock);
1244
1245 get_time_diff();
1246 /*
1247 * Irq spinlock must be dropped around set_system_power_state.
1248 * We'll undo any timer changes due to interrupts below.
1249 */
1250 spin_unlock(&i8253_lock);
1251 write_sequnlock(&xtime_lock);
1252 local_irq_enable(); 1217 local_irq_enable();
1253 1218
1254 save_processor_state(); 1219 save_processor_state();
@@ -1257,7 +1222,6 @@ static int suspend(int vetoable)
1257 restore_processor_state(); 1222 restore_processor_state();
1258 1223
1259 local_irq_disable(); 1224 local_irq_disable();
1260 set_time();
1261 reinit_timer(); 1225 reinit_timer();
1262 1226
1263 if (err == APM_NO_ERROR) 1227 if (err == APM_NO_ERROR)
@@ -1287,11 +1251,6 @@ static void standby(void)
1287 1251
1288 local_irq_disable(); 1252 local_irq_disable();
1289 device_power_down(PMSG_SUSPEND); 1253 device_power_down(PMSG_SUSPEND);
1290 /* serialize with the timer interrupt */
1291 write_seqlock(&xtime_lock);
1292 /* If needed, notify drivers here */
1293 get_time_diff();
1294 write_sequnlock(&xtime_lock);
1295 local_irq_enable(); 1254 local_irq_enable();
1296 1255
1297 err = set_system_power_state(APM_STATE_STANDBY); 1256 err = set_system_power_state(APM_STATE_STANDBY);
@@ -1385,7 +1344,6 @@ static void check_events(void)
1385 ignore_bounce = 1; 1344 ignore_bounce = 1;
1386 if ((event != APM_NORMAL_RESUME) 1345 if ((event != APM_NORMAL_RESUME)
1387 || (ignore_normal_resume == 0)) { 1346 || (ignore_normal_resume == 0)) {
1388 set_time();
1389 device_resume(); 1347 device_resume();
1390 pm_send_all(PM_RESUME, (void *)0); 1348 pm_send_all(PM_RESUME, (void *)0);
1391 queue_event(event, NULL); 1349 queue_event(event, NULL);
@@ -1401,7 +1359,6 @@ static void check_events(void)
1401 break; 1359 break;
1402 1360
1403 case APM_UPDATE_TIME: 1361 case APM_UPDATE_TIME:
1404 set_time();
1405 break; 1362 break;
1406 1363
1407 case APM_CRITICAL_SUSPEND: 1364 case APM_CRITICAL_SUSPEND:
@@ -1636,9 +1593,8 @@ static int do_open(struct inode * inode, struct file * filp)
1636 return 0; 1593 return 0;
1637} 1594}
1638 1595
1639static int apm_get_info(char *buf, char **start, off_t fpos, int length) 1596static int proc_apm_show(struct seq_file *m, void *v)
1640{ 1597{
1641 char * p;
1642 unsigned short bx; 1598 unsigned short bx;
1643 unsigned short cx; 1599 unsigned short cx;
1644 unsigned short dx; 1600 unsigned short dx;
@@ -1650,8 +1606,6 @@ static int apm_get_info(char *buf, char **start, off_t fpos, int length)
1650 int time_units = -1; 1606 int time_units = -1;
1651 char *units = "?"; 1607 char *units = "?";
1652 1608
1653 p = buf;
1654
1655 if ((num_online_cpus() == 1) && 1609 if ((num_online_cpus() == 1) &&
1656 !(error = apm_get_power_status(&bx, &cx, &dx))) { 1610 !(error = apm_get_power_status(&bx, &cx, &dx))) {
1657 ac_line_status = (bx >> 8) & 0xff; 1611 ac_line_status = (bx >> 8) & 0xff;
@@ -1705,7 +1659,7 @@ static int apm_get_info(char *buf, char **start, off_t fpos, int length)
1705 -1: Unknown 1659 -1: Unknown
1706 8) min = minutes; sec = seconds */ 1660 8) min = minutes; sec = seconds */
1707 1661
1708 p += sprintf(p, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", 1662 seq_printf(m, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
1709 driver_version, 1663 driver_version,
1710 (apm_info.bios.version >> 8) & 0xff, 1664 (apm_info.bios.version >> 8) & 0xff,
1711 apm_info.bios.version & 0xff, 1665 apm_info.bios.version & 0xff,
@@ -1716,10 +1670,22 @@ static int apm_get_info(char *buf, char **start, off_t fpos, int length)
1716 percentage, 1670 percentage,
1717 time_units, 1671 time_units,
1718 units); 1672 units);
1673 return 0;
1674}
1719 1675
1720 return p - buf; 1676static int proc_apm_open(struct inode *inode, struct file *file)
1677{
1678 return single_open(file, proc_apm_show, NULL);
1721} 1679}
1722 1680
1681static const struct file_operations apm_file_ops = {
1682 .owner = THIS_MODULE,
1683 .open = proc_apm_open,
1684 .read = seq_read,
1685 .llseek = seq_lseek,
1686 .release = single_release,
1687};
1688
1723static int apm(void *unused) 1689static int apm(void *unused)
1724{ 1690{
1725 unsigned short bx; 1691 unsigned short bx;
@@ -1894,7 +1860,7 @@ static int __init apm_setup(char *str)
1894__setup("apm=", apm_setup); 1860__setup("apm=", apm_setup);
1895#endif 1861#endif
1896 1862
1897static struct file_operations apm_bios_fops = { 1863static const struct file_operations apm_bios_fops = {
1898 .owner = THIS_MODULE, 1864 .owner = THIS_MODULE,
1899 .read = do_read, 1865 .read = do_read,
1900 .poll = do_poll, 1866 .poll = do_poll,
@@ -2341,9 +2307,9 @@ static int __init apm_init(void)
2341 set_base(gdt[APM_DS >> 3], 2307 set_base(gdt[APM_DS >> 3],
2342 __va((unsigned long)apm_info.bios.dseg << 4)); 2308 __va((unsigned long)apm_info.bios.dseg << 4));
2343 2309
2344 apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info); 2310 apm_proc = create_proc_entry("apm", 0, NULL);
2345 if (apm_proc) 2311 if (apm_proc)
2346 apm_proc->owner = THIS_MODULE; 2312 apm_proc->proc_fops = &apm_file_ops;
2347 2313
2348 kapmd_task = kthread_create(apm, NULL, "kapmd"); 2314 kapmd_task = kthread_create(apm, NULL, "kapmd");
2349 if (IS_ERR(kapmd_task)) { 2315 if (IS_ERR(kapmd_task)) {
diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c
index 1b2f3cd33270..c37535163bfc 100644
--- a/arch/i386/kernel/asm-offsets.c
+++ b/arch/i386/kernel/asm-offsets.c
@@ -72,7 +72,7 @@ void foo(void)
72 OFFSET(PT_EAX, pt_regs, eax); 72 OFFSET(PT_EAX, pt_regs, eax);
73 OFFSET(PT_DS, pt_regs, xds); 73 OFFSET(PT_DS, pt_regs, xds);
74 OFFSET(PT_ES, pt_regs, xes); 74 OFFSET(PT_ES, pt_regs, xes);
75 OFFSET(PT_GS, pt_regs, xgs); 75 OFFSET(PT_FS, pt_regs, xfs);
76 OFFSET(PT_ORIG_EAX, pt_regs, orig_eax); 76 OFFSET(PT_ORIG_EAX, pt_regs, orig_eax);
77 OFFSET(PT_EIP, pt_regs, eip); 77 OFFSET(PT_EIP, pt_regs, eip);
78 OFFSET(PT_CS, pt_regs, xcs); 78 OFFSET(PT_CS, pt_regs, xcs);
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 8a8bbdaaf38a..dcbbd0a8bfc2 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -605,7 +605,7 @@ void __init early_cpu_init(void)
605struct pt_regs * __devinit idle_regs(struct pt_regs *regs) 605struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
606{ 606{
607 memset(regs, 0, sizeof(struct pt_regs)); 607 memset(regs, 0, sizeof(struct pt_regs));
608 regs->xgs = __KERNEL_PDA; 608 regs->xfs = __KERNEL_PDA;
609 return regs; 609 return regs;
610} 610}
611 611
@@ -662,12 +662,12 @@ struct i386_pda boot_pda = {
662 .pcurrent = &init_task, 662 .pcurrent = &init_task,
663}; 663};
664 664
665static inline void set_kernel_gs(void) 665static inline void set_kernel_fs(void)
666{ 666{
667 /* Set %gs for this CPU's PDA. Memory clobber is to create a 667 /* Set %fs for this CPU's PDA. Memory clobber is to create a
668 barrier with respect to any PDA operations, so the compiler 668 barrier with respect to any PDA operations, so the compiler
669 doesn't move any before here. */ 669 doesn't move any before here. */
670 asm volatile ("mov %0, %%gs" : : "r" (__KERNEL_PDA) : "memory"); 670 asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory");
671} 671}
672 672
673/* Initialize the CPU's GDT and PDA. The boot CPU does this for 673/* Initialize the CPU's GDT and PDA. The boot CPU does this for
@@ -718,7 +718,7 @@ void __cpuinit cpu_set_gdt(int cpu)
718 the boot CPU, this will transition from the boot gdt+pda to 718 the boot CPU, this will transition from the boot gdt+pda to
719 the real ones). */ 719 the real ones). */
720 load_gdt(cpu_gdt_descr); 720 load_gdt(cpu_gdt_descr);
721 set_kernel_gs(); 721 set_kernel_fs();
722} 722}
723 723
724/* Common CPU init for both boot and secondary CPUs */ 724/* Common CPU init for both boot and secondary CPUs */
@@ -764,8 +764,8 @@ static void __cpuinit _cpu_init(int cpu, struct task_struct *curr)
764 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss); 764 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
765#endif 765#endif
766 766
767 /* Clear %fs. */ 767 /* Clear %gs. */
768 asm volatile ("mov %0, %%fs" : : "r" (0)); 768 asm volatile ("mov %0, %%gs" : : "r" (0));
769 769
770 /* Clear all 6 debug registers: */ 770 /* Clear all 6 debug registers: */
771 set_debugreg(0, 0); 771 set_debugreg(0, 0);
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig
index 5299c5bf4454..6c52182ca323 100644
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -217,6 +217,15 @@ config X86_LONGHAUL
217 217
218 If in doubt, say N. 218 If in doubt, say N.
219 219
220config X86_E_POWERSAVER
221 tristate "VIA C7 Enhanced PowerSaver (EXPERIMENTAL)"
222 select CPU_FREQ_TABLE
223 depends on EXPERIMENTAL
224 help
225 This adds the CPUFreq driver for VIA C7 processors.
226
227 If in doubt, say N.
228
220comment "shared options" 229comment "shared options"
221 230
222config X86_ACPI_CPUFREQ_PROC_INTF 231config X86_ACPI_CPUFREQ_PROC_INTF
diff --git a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile
index 8de3abe322a9..560f7760dae5 100644
--- a/arch/i386/kernel/cpu/cpufreq/Makefile
+++ b/arch/i386/kernel/cpu/cpufreq/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o
2obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o 2obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o
3obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o 3obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
4obj-$(CONFIG_X86_LONGHAUL) += longhaul.o 4obj-$(CONFIG_X86_LONGHAUL) += longhaul.o
5obj-$(CONFIG_X86_E_POWERSAVER) += e_powersaver.o
5obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o 6obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o
6obj-$(CONFIG_SC520_CPUFREQ) += sc520_freq.o 7obj-$(CONFIG_SC520_CPUFREQ) += sc520_freq.o
7obj-$(CONFIG_X86_LONGRUN) += longrun.o 8obj-$(CONFIG_X86_LONGRUN) += longrun.o
diff --git a/arch/i386/kernel/cpu/cpufreq/e_powersaver.c b/arch/i386/kernel/cpu/cpufreq/e_powersaver.c
new file mode 100644
index 000000000000..f43d98e11cc7
--- /dev/null
+++ b/arch/i386/kernel/cpu/cpufreq/e_powersaver.c
@@ -0,0 +1,334 @@
1/*
2 * Based on documentation provided by Dave Jones. Thanks!
3 *
4 * Licensed under the terms of the GNU GPL License version 2.
5 *
6 * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
7 */
8
9#include <linux/kernel.h>
10#include <linux/module.h>
11#include <linux/init.h>
12#include <linux/cpufreq.h>
13#include <linux/ioport.h>
14#include <linux/slab.h>
15
16#include <asm/msr.h>
17#include <asm/tsc.h>
18#include <asm/timex.h>
19#include <asm/io.h>
20#include <asm/delay.h>
21
22#define EPS_BRAND_C7M 0
23#define EPS_BRAND_C7 1
24#define EPS_BRAND_EDEN 2
25#define EPS_BRAND_C3 3
26
27struct eps_cpu_data {
28 u32 fsb;
29 struct cpufreq_frequency_table freq_table[];
30};
31
32static struct eps_cpu_data *eps_cpu[NR_CPUS];
33
34
35static unsigned int eps_get(unsigned int cpu)
36{
37 struct eps_cpu_data *centaur;
38 u32 lo, hi;
39
40 if (cpu)
41 return 0;
42 centaur = eps_cpu[cpu];
43 if (centaur == NULL)
44 return 0;
45
46 /* Return current frequency */
47 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
48 return centaur->fsb * ((lo >> 8) & 0xff);
49}
50
51static int eps_set_state(struct eps_cpu_data *centaur,
52 unsigned int cpu,
53 u32 dest_state)
54{
55 struct cpufreq_freqs freqs;
56 u32 lo, hi;
57 int err = 0;
58 int i;
59
60 freqs.old = eps_get(cpu);
61 freqs.new = centaur->fsb * ((dest_state >> 8) & 0xff);
62 freqs.cpu = cpu;
63 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
64
65 /* Wait while CPU is busy */
66 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
67 i = 0;
68 while (lo & ((1 << 16) | (1 << 17))) {
69 udelay(16);
70 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
71 i++;
72 if (unlikely(i > 64)) {
73 err = -ENODEV;
74 goto postchange;
75 }
76 }
77 /* Set new multiplier and voltage */
78 wrmsr(MSR_IA32_PERF_CTL, dest_state & 0xffff, 0);
79 /* Wait until transition end */
80 i = 0;
81 do {
82 udelay(16);
83 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
84 i++;
85 if (unlikely(i > 64)) {
86 err = -ENODEV;
87 goto postchange;
88 }
89 } while (lo & ((1 << 16) | (1 << 17)));
90
91 /* Return current frequency */
92postchange:
93 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
94 freqs.new = centaur->fsb * ((lo >> 8) & 0xff);
95
96 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
97 return err;
98}
99
100static int eps_target(struct cpufreq_policy *policy,
101 unsigned int target_freq,
102 unsigned int relation)
103{
104 struct eps_cpu_data *centaur;
105 unsigned int newstate = 0;
106 unsigned int cpu = policy->cpu;
107 unsigned int dest_state;
108 int ret;
109
110 if (unlikely(eps_cpu[cpu] == NULL))
111 return -ENODEV;
112 centaur = eps_cpu[cpu];
113
114 if (unlikely(cpufreq_frequency_table_target(policy,
115 &eps_cpu[cpu]->freq_table[0],
116 target_freq,
117 relation,
118 &newstate))) {
119 return -EINVAL;
120 }
121
122 /* Make frequency transition */
123 dest_state = centaur->freq_table[newstate].index & 0xffff;
124 ret = eps_set_state(centaur, cpu, dest_state);
125 if (ret)
126 printk(KERN_ERR "eps: Timeout!\n");
127 return ret;
128}
129
130static int eps_verify(struct cpufreq_policy *policy)
131{
132 return cpufreq_frequency_table_verify(policy,
133 &eps_cpu[policy->cpu]->freq_table[0]);
134}
135
136static int eps_cpu_init(struct cpufreq_policy *policy)
137{
138 unsigned int i;
139 u32 lo, hi;
140 u64 val;
141 u8 current_multiplier, current_voltage;
142 u8 max_multiplier, max_voltage;
143 u8 min_multiplier, min_voltage;
144 u8 brand;
145 u32 fsb;
146 struct eps_cpu_data *centaur;
147 struct cpufreq_frequency_table *f_table;
148 int k, step, voltage;
149 int ret;
150 int states;
151
152 if (policy->cpu != 0)
153 return -ENODEV;
154
155 /* Check brand */
156 printk("eps: Detected VIA ");
157 rdmsr(0x1153, lo, hi);
158 brand = (((lo >> 2) ^ lo) >> 18) & 3;
159 switch(brand) {
160 case EPS_BRAND_C7M:
161 printk("C7-M\n");
162 break;
163 case EPS_BRAND_C7:
164 printk("C7\n");
165 break;
166 case EPS_BRAND_EDEN:
167 printk("Eden\n");
168 break;
169 case EPS_BRAND_C3:
170 printk("C3\n");
171 return -ENODEV;
172 break;
173 }
174 /* Enable Enhanced PowerSaver */
175 rdmsrl(MSR_IA32_MISC_ENABLE, val);
176 if (!(val & 1 << 16)) {
177 val |= 1 << 16;
178 wrmsrl(MSR_IA32_MISC_ENABLE, val);
179 /* Can be locked at 0 */
180 rdmsrl(MSR_IA32_MISC_ENABLE, val);
181 if (!(val & 1 << 16)) {
182 printk("eps: Can't enable Enhanced PowerSaver\n");
183 return -ENODEV;
184 }
185 }
186
187 /* Print voltage and multiplier */
188 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
189 current_voltage = lo & 0xff;
190 printk("eps: Current voltage = %dmV\n", current_voltage * 16 + 700);
191 current_multiplier = (lo >> 8) & 0xff;
192 printk("eps: Current multiplier = %d\n", current_multiplier);
193
194 /* Print limits */
195 max_voltage = hi & 0xff;
196 printk("eps: Highest voltage = %dmV\n", max_voltage * 16 + 700);
197 max_multiplier = (hi >> 8) & 0xff;
198 printk("eps: Highest multiplier = %d\n", max_multiplier);
199 min_voltage = (hi >> 16) & 0xff;
200 printk("eps: Lowest voltage = %dmV\n", min_voltage * 16 + 700);
201 min_multiplier = (hi >> 24) & 0xff;
202 printk("eps: Lowest multiplier = %d\n", min_multiplier);
203
204 /* Sanity checks */
205 if (current_multiplier == 0 || max_multiplier == 0
206 || min_multiplier == 0)
207 return -EINVAL;
208 if (current_multiplier > max_multiplier
209 || max_multiplier <= min_multiplier)
210 return -EINVAL;
211 if (current_voltage > 0x1c || max_voltage > 0x1c)
212 return -EINVAL;
213 if (max_voltage < min_voltage)
214 return -EINVAL;
215
216 /* Calc FSB speed */
217 fsb = cpu_khz / current_multiplier;
218 /* Calc number of p-states supported */
219 if (brand == EPS_BRAND_C7M)
220 states = max_multiplier - min_multiplier + 1;
221 else
222 states = 2;
223
224 /* Allocate private data and frequency table for current cpu */
225 centaur = kzalloc(sizeof(struct eps_cpu_data)
226 + (states + 1) * sizeof(struct cpufreq_frequency_table),
227 GFP_KERNEL);
228 if (!centaur)
229 return -ENOMEM;
230 eps_cpu[0] = centaur;
231
232 /* Copy basic values */
233 centaur->fsb = fsb;
234
235 /* Fill frequency and MSR value table */
236 f_table = &centaur->freq_table[0];
237 if (brand != EPS_BRAND_C7M) {
238 f_table[0].frequency = fsb * min_multiplier;
239 f_table[0].index = (min_multiplier << 8) | min_voltage;
240 f_table[1].frequency = fsb * max_multiplier;
241 f_table[1].index = (max_multiplier << 8) | max_voltage;
242 f_table[2].frequency = CPUFREQ_TABLE_END;
243 } else {
244 k = 0;
245 step = ((max_voltage - min_voltage) * 256)
246 / (max_multiplier - min_multiplier);
247 for (i = min_multiplier; i <= max_multiplier; i++) {
248 voltage = (k * step) / 256 + min_voltage;
249 f_table[k].frequency = fsb * i;
250 f_table[k].index = (i << 8) | voltage;
251 k++;
252 }
253 f_table[k].frequency = CPUFREQ_TABLE_END;
254 }
255
256 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
257 policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */
258 policy->cur = fsb * current_multiplier;
259
260 ret = cpufreq_frequency_table_cpuinfo(policy, &centaur->freq_table[0]);
261 if (ret) {
262 kfree(centaur);
263 return ret;
264 }
265
266 cpufreq_frequency_table_get_attr(&centaur->freq_table[0], policy->cpu);
267 return 0;
268}
269
270static int eps_cpu_exit(struct cpufreq_policy *policy)
271{
272 unsigned int cpu = policy->cpu;
273 struct eps_cpu_data *centaur;
274 u32 lo, hi;
275
276 if (eps_cpu[cpu] == NULL)
277 return -ENODEV;
278 centaur = eps_cpu[cpu];
279
280 /* Get max frequency */
281 rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
282 /* Set max frequency */
283 eps_set_state(centaur, cpu, hi & 0xffff);
284 /* Bye */
285 cpufreq_frequency_table_put_attr(policy->cpu);
286 kfree(eps_cpu[cpu]);
287 eps_cpu[cpu] = NULL;
288 return 0;
289}
290
291static struct freq_attr* eps_attr[] = {
292 &cpufreq_freq_attr_scaling_available_freqs,
293 NULL,
294};
295
296static struct cpufreq_driver eps_driver = {
297 .verify = eps_verify,
298 .target = eps_target,
299 .init = eps_cpu_init,
300 .exit = eps_cpu_exit,
301 .get = eps_get,
302 .name = "e_powersaver",
303 .owner = THIS_MODULE,
304 .attr = eps_attr,
305};
306
307static int __init eps_init(void)
308{
309 struct cpuinfo_x86 *c = cpu_data;
310
311 /* This driver will work only on Centaur C7 processors with
312 * Enhanced SpeedStep/PowerSaver registers */
313 if (c->x86_vendor != X86_VENDOR_CENTAUR
314 || c->x86 != 6 || c->x86_model != 10)
315 return -ENODEV;
316 if (!cpu_has(c, X86_FEATURE_EST))
317 return -ENODEV;
318
319 if (cpufreq_register_driver(&eps_driver))
320 return -EINVAL;
321 return 0;
322}
323
324static void __exit eps_exit(void)
325{
326 cpufreq_unregister_driver(&eps_driver);
327}
328
329MODULE_AUTHOR("Rafa³ Bilski <rafalbilski@interia.pl>");
330MODULE_DESCRIPTION("Enhanced PowerSaver driver for VIA C7 CPU's.");
331MODULE_LICENSE("GPL");
332
333module_init(eps_init);
334module_exit(eps_exit);
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index e940e00b96c9..b59878a0d9b3 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -8,12 +8,11 @@
8 * VIA have currently 3 different versions of Longhaul. 8 * VIA have currently 3 different versions of Longhaul.
9 * Version 1 (Longhaul) uses the BCR2 MSR at 0x1147. 9 * Version 1 (Longhaul) uses the BCR2 MSR at 0x1147.
10 * It is present only in Samuel 1 (C5A), Samuel 2 (C5B) stepping 0. 10 * It is present only in Samuel 1 (C5A), Samuel 2 (C5B) stepping 0.
11 * Version 2 of longhaul is the same as v1, but adds voltage scaling. 11 * Version 2 of longhaul is backward compatible with v1, but adds
12 * Present in Samuel 2 (steppings 1-7 only) (C5B), and Ezra (C5C) 12 * LONGHAUL MSR for purpose of both frequency and voltage scaling.
13 * voltage scaling support has currently been disabled in this driver 13 * Present in Samuel 2 (steppings 1-7 only) (C5B), and Ezra (C5C).
14 * until we have code that gets it right.
15 * Version 3 of longhaul got renamed to Powersaver and redesigned 14 * Version 3 of longhaul got renamed to Powersaver and redesigned
16 * to use the POWERSAVER MSR at 0x110a. 15 * to use only the POWERSAVER MSR at 0x110a.
17 * It is present in Ezra-T (C5M), Nehemiah (C5X) and above. 16 * It is present in Ezra-T (C5M), Nehemiah (C5X) and above.
18 * It's pretty much the same feature wise to longhaul v2, though 17 * It's pretty much the same feature wise to longhaul v2, though
19 * there is provision for scaling FSB too, but this doesn't work 18 * there is provision for scaling FSB too, but this doesn't work
@@ -51,10 +50,12 @@
51#define CPU_EZRA 3 50#define CPU_EZRA 3
52#define CPU_EZRA_T 4 51#define CPU_EZRA_T 4
53#define CPU_NEHEMIAH 5 52#define CPU_NEHEMIAH 5
53#define CPU_NEHEMIAH_C 6
54 54
55/* Flags */ 55/* Flags */
56#define USE_ACPI_C3 (1 << 1) 56#define USE_ACPI_C3 (1 << 1)
57#define USE_NORTHBRIDGE (1 << 2) 57#define USE_NORTHBRIDGE (1 << 2)
58#define USE_VT8235 (1 << 3)
58 59
59static int cpu_model; 60static int cpu_model;
60static unsigned int numscales=16; 61static unsigned int numscales=16;
@@ -63,7 +64,8 @@ static unsigned int fsb;
63static struct mV_pos *vrm_mV_table; 64static struct mV_pos *vrm_mV_table;
64static unsigned char *mV_vrm_table; 65static unsigned char *mV_vrm_table;
65struct f_msr { 66struct f_msr {
66 unsigned char vrm; 67 u8 vrm;
68 u8 pos;
67}; 69};
68static struct f_msr f_msr_table[32]; 70static struct f_msr f_msr_table[32];
69 71
@@ -73,10 +75,10 @@ static int can_scale_voltage;
73static struct acpi_processor *pr = NULL; 75static struct acpi_processor *pr = NULL;
74static struct acpi_processor_cx *cx = NULL; 76static struct acpi_processor_cx *cx = NULL;
75static u8 longhaul_flags; 77static u8 longhaul_flags;
78static u8 longhaul_pos;
76 79
77/* Module parameters */ 80/* Module parameters */
78static int scale_voltage; 81static int scale_voltage;
79static int ignore_latency;
80 82
81#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) 83#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg)
82 84
@@ -164,41 +166,79 @@ static void do_longhaul1(unsigned int clock_ratio_index)
164static void do_powersaver(int cx_address, unsigned int clock_ratio_index) 166static void do_powersaver(int cx_address, unsigned int clock_ratio_index)
165{ 167{
166 union msr_longhaul longhaul; 168 union msr_longhaul longhaul;
169 u8 dest_pos;
167 u32 t; 170 u32 t;
168 171
172 dest_pos = f_msr_table[clock_ratio_index].pos;
173
169 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); 174 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
175 /* Setup new frequency */
170 longhaul.bits.RevisionKey = longhaul.bits.RevisionID; 176 longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
171 longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf; 177 longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
172 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; 178 longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
173 longhaul.bits.EnableSoftBusRatio = 1; 179 /* Setup new voltage */
174 180 if (can_scale_voltage)
175 if (can_scale_voltage) {
176 longhaul.bits.SoftVID = f_msr_table[clock_ratio_index].vrm; 181 longhaul.bits.SoftVID = f_msr_table[clock_ratio_index].vrm;
182 /* Sync to timer tick */
183 safe_halt();
184 /* Raise voltage if necessary */
185 if (can_scale_voltage && longhaul_pos < dest_pos) {
177 longhaul.bits.EnableSoftVID = 1; 186 longhaul.bits.EnableSoftVID = 1;
187 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
188 /* Change voltage */
189 if (!cx_address) {
190 ACPI_FLUSH_CPU_CACHE();
191 halt();
192 } else {
193 ACPI_FLUSH_CPU_CACHE();
194 /* Invoke C3 */
195 inb(cx_address);
196 /* Dummy op - must do something useless after P_LVL3
197 * read */
198 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
199 }
200 longhaul.bits.EnableSoftVID = 0;
201 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
202 longhaul_pos = dest_pos;
178 } 203 }
179 204
180 /* Sync to timer tick */
181 safe_halt();
182 /* Change frequency on next halt or sleep */ 205 /* Change frequency on next halt or sleep */
206 longhaul.bits.EnableSoftBusRatio = 1;
183 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 207 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
184 if (!cx_address) { 208 if (!cx_address) {
185 ACPI_FLUSH_CPU_CACHE(); 209 ACPI_FLUSH_CPU_CACHE();
186 /* Invoke C1 */
187 halt(); 210 halt();
188 } else { 211 } else {
189 ACPI_FLUSH_CPU_CACHE(); 212 ACPI_FLUSH_CPU_CACHE();
190 /* Invoke C3 */ 213 /* Invoke C3 */
191 inb(cx_address); 214 inb(cx_address);
192 /* Dummy op - must do something useless after P_LVL3 read */ 215 /* Dummy op - must do something useless after P_LVL3 read */
193 t = inl(acpi_fadt.xpm_tmr_blk.address); 216 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
194 } 217 }
195 /* Disable bus ratio bit */ 218 /* Disable bus ratio bit */
196 local_irq_disable();
197 longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
198 longhaul.bits.EnableSoftBusRatio = 0; 219 longhaul.bits.EnableSoftBusRatio = 0;
199 longhaul.bits.EnableSoftBSEL = 0;
200 longhaul.bits.EnableSoftVID = 0;
201 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); 220 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
221
222 /* Reduce voltage if necessary */
223 if (can_scale_voltage && longhaul_pos > dest_pos) {
224 longhaul.bits.EnableSoftVID = 1;
225 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
226 /* Change voltage */
227 if (!cx_address) {
228 ACPI_FLUSH_CPU_CACHE();
229 halt();
230 } else {
231 ACPI_FLUSH_CPU_CACHE();
232 /* Invoke C3 */
233 inb(cx_address);
234 /* Dummy op - must do something useless after P_LVL3
235 * read */
236 t = inl(acpi_gbl_FADT.xpm_timer_block.address);
237 }
238 longhaul.bits.EnableSoftVID = 0;
239 wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
240 longhaul_pos = dest_pos;
241 }
202} 242}
203 243
204/** 244/**
@@ -250,39 +290,30 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
250 outb(3, 0x22); 290 outb(3, 0x22);
251 } else if ((pr != NULL) && pr->flags.bm_control) { 291 } else if ((pr != NULL) && pr->flags.bm_control) {
252 /* Disable bus master arbitration */ 292 /* Disable bus master arbitration */
253 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, 293 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
254 ACPI_MTX_DO_NOT_LOCK);
255 } 294 }
256 switch (longhaul_version) { 295 switch (longhaul_version) {
257 296
258 /* 297 /*
259 * Longhaul v1. (Samuel[C5A] and Samuel2 stepping 0[C5B]) 298 * Longhaul v1. (Samuel[C5A] and Samuel2 stepping 0[C5B])
260 * Software controlled multipliers only. 299 * Software controlled multipliers only.
261 *
262 * *NB* Until we get voltage scaling working v1 & v2 are the same code.
263 * Longhaul v2 appears in Samuel2 Steppings 1->7 [C5b] and Ezra [C5C]
264 */ 300 */
265 case TYPE_LONGHAUL_V1: 301 case TYPE_LONGHAUL_V1:
266 case TYPE_LONGHAUL_V2:
267 do_longhaul1(clock_ratio_index); 302 do_longhaul1(clock_ratio_index);
268 break; 303 break;
269 304
270 /* 305 /*
306 * Longhaul v2 appears in Samuel2 Steppings 1->7 [C5B] and Ezra [C5C]
307 *
271 * Longhaul v3 (aka Powersaver). (Ezra-T [C5M] & Nehemiah [C5N]) 308 * Longhaul v3 (aka Powersaver). (Ezra-T [C5M] & Nehemiah [C5N])
272 * We can scale voltage with this too, but that's currently
273 * disabled until we come up with a decent 'match freq to voltage'
274 * algorithm.
275 * When we add voltage scaling, we will also need to do the
276 * voltage/freq setting in order depending on the direction
277 * of scaling (like we do in powernow-k7.c)
278 * Nehemiah can do FSB scaling too, but this has never been proven 309 * Nehemiah can do FSB scaling too, but this has never been proven
279 * to work in practice. 310 * to work in practice.
280 */ 311 */
312 case TYPE_LONGHAUL_V2:
281 case TYPE_POWERSAVER: 313 case TYPE_POWERSAVER:
282 if (longhaul_flags & USE_ACPI_C3) { 314 if (longhaul_flags & USE_ACPI_C3) {
283 /* Don't allow wakeup */ 315 /* Don't allow wakeup */
284 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, 316 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
285 ACPI_MTX_DO_NOT_LOCK);
286 do_powersaver(cx->address, clock_ratio_index); 317 do_powersaver(cx->address, clock_ratio_index);
287 } else { 318 } else {
288 do_powersaver(0, clock_ratio_index); 319 do_powersaver(0, clock_ratio_index);
@@ -295,8 +326,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
295 outb(0, 0x22); 326 outb(0, 0x22);
296 } else if ((pr != NULL) && pr->flags.bm_control) { 327 } else if ((pr != NULL) && pr->flags.bm_control) {
297 /* Enable bus master arbitration */ 328 /* Enable bus master arbitration */
298 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, 329 acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
299 ACPI_MTX_DO_NOT_LOCK);
300 } 330 }
301 outb(pic2_mask,0xA1); /* restore mask */ 331 outb(pic2_mask,0xA1); /* restore mask */
302 outb(pic1_mask,0x21); 332 outb(pic1_mask,0x21);
@@ -304,6 +334,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
304 local_irq_restore(flags); 334 local_irq_restore(flags);
305 preempt_enable(); 335 preempt_enable();
306 336
337 freqs.new = calc_speed(longhaul_get_cpu_mult());
307 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 338 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
308} 339}
309 340
@@ -318,31 +349,19 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
318 349
319#define ROUNDING 0xf 350#define ROUNDING 0xf
320 351
321static int _guess(int guess, int mult)
322{
323 int target;
324
325 target = ((mult/10)*guess);
326 if (mult%10 != 0)
327 target += (guess/2);
328 target += ROUNDING/2;
329 target &= ~ROUNDING;
330 return target;
331}
332
333
334static int guess_fsb(int mult) 352static int guess_fsb(int mult)
335{ 353{
336 int speed = (cpu_khz/1000); 354 int speed = cpu_khz / 1000;
337 int i; 355 int i;
338 int speeds[] = { 66, 100, 133, 200 }; 356 int speeds[] = { 666, 1000, 1333, 2000 };
339 357 int f_max, f_min;
340 speed += ROUNDING/2; 358
341 speed &= ~ROUNDING; 359 for (i = 0; i < 4; i++) {
342 360 f_max = ((speeds[i] * mult) + 50) / 100;
343 for (i=0; i<4; i++) { 361 f_max += (ROUNDING / 2);
344 if (_guess(speeds[i], mult) == speed) 362 f_min = f_max - ROUNDING;
345 return speeds[i]; 363 if ((speed <= f_max) && (speed >= f_min))
364 return speeds[i] / 10;
346 } 365 }
347 return 0; 366 return 0;
348} 367}
@@ -350,71 +369,44 @@ static int guess_fsb(int mult)
350 369
351static int __init longhaul_get_ranges(void) 370static int __init longhaul_get_ranges(void)
352{ 371{
353 unsigned long invalue;
354 unsigned int ezra_t_multipliers[32]= {
355 90, 30, 40, 100, 55, 35, 45, 95,
356 50, 70, 80, 60, 120, 75, 85, 65,
357 -1, 110, 120, -1, 135, 115, 125, 105,
358 130, 150, 160, 140, -1, 155, -1, 145 };
359 unsigned int j, k = 0; 372 unsigned int j, k = 0;
360 union msr_longhaul longhaul; 373 int mult;
361 int mult = 0;
362 374
363 switch (longhaul_version) { 375 /* Get current frequency */
364 case TYPE_LONGHAUL_V1: 376 mult = longhaul_get_cpu_mult();
365 case TYPE_LONGHAUL_V2: 377 if (mult == -1) {
366 /* Ugh, Longhaul v1 didn't have the min/max MSRs. 378 printk(KERN_INFO PFX "Invalid (reserved) multiplier!\n");
367 Assume min=3.0x & max = whatever we booted at. */ 379 return -EINVAL;
380 }
381 fsb = guess_fsb(mult);
382 if (fsb == 0) {
383 printk(KERN_INFO PFX "Invalid (reserved) FSB!\n");
384 return -EINVAL;
385 }
386 /* Get max multiplier - as we always did.
387 * Longhaul MSR is usefull only when voltage scaling is enabled.
388 * C3 is booting at max anyway. */
389 maxmult = mult;
390 /* Get min multiplier */
391 switch (cpu_model) {
392 case CPU_NEHEMIAH:
393 minmult = 50;
394 break;
395 case CPU_NEHEMIAH_C:
396 minmult = 40;
397 break;
398 default:
368 minmult = 30; 399 minmult = 30;
369 maxmult = mult = longhaul_get_cpu_mult();
370 break; 400 break;
371
372 case TYPE_POWERSAVER:
373 /* Ezra-T */
374 if (cpu_model==CPU_EZRA_T) {
375 minmult = 30;
376 rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
377 invalue = longhaul.bits.MaxMHzBR;
378 if (longhaul.bits.MaxMHzBR4)
379 invalue += 16;
380 maxmult = mult = ezra_t_multipliers[invalue];
381 break;
382 }
383
384 /* Nehemiah */
385 if (cpu_model==CPU_NEHEMIAH) {
386 rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
387
388 /*
389 * TODO: This code works, but raises a lot of questions.
390 * - Some Nehemiah's seem to have broken Min/MaxMHzBR's.
391 * We get around this by using a hardcoded multiplier of 4.0x
392 * for the minimimum speed, and the speed we booted up at for the max.
393 * This is done in longhaul_get_cpu_mult() by reading the EBLCR register.
394 * - According to some VIA documentation EBLCR is only
395 * in pre-Nehemiah C3s. How this still works is a mystery.
396 * We're possibly using something undocumented and unsupported,
397 * But it works, so we don't grumble.
398 */
399 minmult=40;
400 maxmult = mult = longhaul_get_cpu_mult();
401 break;
402 }
403 } 401 }
404 fsb = guess_fsb(mult);
405 402
406 dprintk ("MinMult:%d.%dx MaxMult:%d.%dx\n", 403 dprintk ("MinMult:%d.%dx MaxMult:%d.%dx\n",
407 minmult/10, minmult%10, maxmult/10, maxmult%10); 404 minmult/10, minmult%10, maxmult/10, maxmult%10);
408 405
409 if (fsb == 0) {
410 printk (KERN_INFO PFX "Invalid (reserved) FSB!\n");
411 return -EINVAL;
412 }
413
414 highest_speed = calc_speed(maxmult); 406 highest_speed = calc_speed(maxmult);
415 lowest_speed = calc_speed(minmult); 407 lowest_speed = calc_speed(minmult);
416 dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, 408 dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb,
417 print_speed(lowest_speed/1000), 409 print_speed(lowest_speed/1000),
418 print_speed(highest_speed/1000)); 410 print_speed(highest_speed/1000));
419 411
420 if (lowest_speed == highest_speed) { 412 if (lowest_speed == highest_speed) {
@@ -458,6 +450,7 @@ static void __init longhaul_setup_voltagescaling(void)
458 union msr_longhaul longhaul; 450 union msr_longhaul longhaul;
459 struct mV_pos minvid, maxvid; 451 struct mV_pos minvid, maxvid;
460 unsigned int j, speed, pos, kHz_step, numvscales; 452 unsigned int j, speed, pos, kHz_step, numvscales;
453 int min_vid_speed;
461 454
462 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); 455 rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
463 if (!(longhaul.bits.RevisionID & 1)) { 456 if (!(longhaul.bits.RevisionID & 1)) {
@@ -471,14 +464,14 @@ static void __init longhaul_setup_voltagescaling(void)
471 mV_vrm_table = &mV_vrm85[0]; 464 mV_vrm_table = &mV_vrm85[0];
472 } else { 465 } else {
473 printk (KERN_INFO PFX "Mobile VRM\n"); 466 printk (KERN_INFO PFX "Mobile VRM\n");
467 if (cpu_model < CPU_NEHEMIAH)
468 return;
474 vrm_mV_table = &mobilevrm_mV[0]; 469 vrm_mV_table = &mobilevrm_mV[0];
475 mV_vrm_table = &mV_mobilevrm[0]; 470 mV_vrm_table = &mV_mobilevrm[0];
476 } 471 }
477 472
478 minvid = vrm_mV_table[longhaul.bits.MinimumVID]; 473 minvid = vrm_mV_table[longhaul.bits.MinimumVID];
479 maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; 474 maxvid = vrm_mV_table[longhaul.bits.MaximumVID];
480 numvscales = maxvid.pos - minvid.pos + 1;
481 kHz_step = (highest_speed - lowest_speed) / numvscales;
482 475
483 if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { 476 if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) {
484 printk (KERN_INFO PFX "Bogus values Min:%d.%03d Max:%d.%03d. " 477 printk (KERN_INFO PFX "Bogus values Min:%d.%03d Max:%d.%03d. "
@@ -494,20 +487,59 @@ static void __init longhaul_setup_voltagescaling(void)
494 return; 487 return;
495 } 488 }
496 489
497 printk(KERN_INFO PFX "Max VID=%d.%03d Min VID=%d.%03d, %d possible voltage scales\n", 490 /* How many voltage steps */
491 numvscales = maxvid.pos - minvid.pos + 1;
492 printk(KERN_INFO PFX
493 "Max VID=%d.%03d "
494 "Min VID=%d.%03d, "
495 "%d possible voltage scales\n",
498 maxvid.mV/1000, maxvid.mV%1000, 496 maxvid.mV/1000, maxvid.mV%1000,
499 minvid.mV/1000, minvid.mV%1000, 497 minvid.mV/1000, minvid.mV%1000,
500 numvscales); 498 numvscales);
501 499
500 /* Calculate max frequency at min voltage */
501 j = longhaul.bits.MinMHzBR;
502 if (longhaul.bits.MinMHzBR4)
503 j += 16;
504 min_vid_speed = eblcr_table[j];
505 if (min_vid_speed == -1)
506 return;
507 switch (longhaul.bits.MinMHzFSB) {
508 case 0:
509 min_vid_speed *= 13333;
510 break;
511 case 1:
512 min_vid_speed *= 10000;
513 break;
514 case 3:
515 min_vid_speed *= 6666;
516 break;
517 default:
518 return;
519 break;
520 }
521 if (min_vid_speed >= highest_speed)
522 return;
523 /* Calculate kHz for one voltage step */
524 kHz_step = (highest_speed - min_vid_speed) / numvscales;
525
526
502 j = 0; 527 j = 0;
503 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { 528 while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) {
504 speed = longhaul_table[j].frequency; 529 speed = longhaul_table[j].frequency;
505 pos = (speed - lowest_speed) / kHz_step + minvid.pos; 530 if (speed > min_vid_speed)
531 pos = (speed - min_vid_speed) / kHz_step + minvid.pos;
532 else
533 pos = minvid.pos;
506 f_msr_table[longhaul_table[j].index].vrm = mV_vrm_table[pos]; 534 f_msr_table[longhaul_table[j].index].vrm = mV_vrm_table[pos];
535 f_msr_table[longhaul_table[j].index].pos = pos;
507 j++; 536 j++;
508 } 537 }
509 538
539 longhaul_pos = maxvid.pos;
510 can_scale_voltage = 1; 540 can_scale_voltage = 1;
541 printk(KERN_INFO PFX "Voltage scaling enabled. "
542 "Use of \"conservative\" governor is highly recommended.\n");
511} 543}
512 544
513 545
@@ -576,20 +608,51 @@ static int enable_arbiter_disable(void)
576 if (dev != NULL) { 608 if (dev != NULL) {
577 /* Enable access to port 0x22 */ 609 /* Enable access to port 0x22 */
578 pci_read_config_byte(dev, reg, &pci_cmd); 610 pci_read_config_byte(dev, reg, &pci_cmd);
579 if ( !(pci_cmd & 1<<7) ) { 611 if (!(pci_cmd & 1<<7)) {
580 pci_cmd |= 1<<7; 612 pci_cmd |= 1<<7;
581 pci_write_config_byte(dev, reg, pci_cmd); 613 pci_write_config_byte(dev, reg, pci_cmd);
614 pci_read_config_byte(dev, reg, &pci_cmd);
615 if (!(pci_cmd & 1<<7)) {
616 printk(KERN_ERR PFX
617 "Can't enable access to port 0x22.\n");
618 return 0;
619 }
582 } 620 }
583 return 1; 621 return 1;
584 } 622 }
585 return 0; 623 return 0;
586} 624}
587 625
626static int longhaul_setup_vt8235(void)
627{
628 struct pci_dev *dev;
629 u8 pci_cmd;
630
631 /* Find VT8235 southbridge */
632 dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, NULL);
633 if (dev != NULL) {
634 /* Set transition time to max */
635 pci_read_config_byte(dev, 0xec, &pci_cmd);
636 pci_cmd &= ~(1 << 2);
637 pci_write_config_byte(dev, 0xec, pci_cmd);
638 pci_read_config_byte(dev, 0xe4, &pci_cmd);
639 pci_cmd &= ~(1 << 7);
640 pci_write_config_byte(dev, 0xe4, pci_cmd);
641 pci_read_config_byte(dev, 0xe5, &pci_cmd);
642 pci_cmd |= 1 << 7;
643 pci_write_config_byte(dev, 0xe5, pci_cmd);
644 return 1;
645 }
646 return 0;
647}
648
588static int __init longhaul_cpu_init(struct cpufreq_policy *policy) 649static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
589{ 650{
590 struct cpuinfo_x86 *c = cpu_data; 651 struct cpuinfo_x86 *c = cpu_data;
591 char *cpuname=NULL; 652 char *cpuname=NULL;
592 int ret; 653 int ret;
654 u32 lo, hi;
655 int vt8235_present;
593 656
594 /* Check what we have on this motherboard */ 657 /* Check what we have on this motherboard */
595 switch (c->x86_model) { 658 switch (c->x86_model) {
@@ -602,16 +665,20 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
602 break; 665 break;
603 666
604 case 7: 667 case 7:
605 longhaul_version = TYPE_LONGHAUL_V1;
606 switch (c->x86_mask) { 668 switch (c->x86_mask) {
607 case 0: 669 case 0:
670 longhaul_version = TYPE_LONGHAUL_V1;
608 cpu_model = CPU_SAMUEL2; 671 cpu_model = CPU_SAMUEL2;
609 cpuname = "C3 'Samuel 2' [C5B]"; 672 cpuname = "C3 'Samuel 2' [C5B]";
610 /* Note, this is not a typo, early Samuel2's had Samuel1 ratios. */ 673 /* Note, this is not a typo, early Samuel2's had
611 memcpy (clock_ratio, samuel1_clock_ratio, sizeof(samuel1_clock_ratio)); 674 * Samuel1 ratios. */
612 memcpy (eblcr_table, samuel2_eblcr, sizeof(samuel2_eblcr)); 675 memcpy(clock_ratio, samuel1_clock_ratio,
676 sizeof(samuel1_clock_ratio));
677 memcpy(eblcr_table, samuel2_eblcr,
678 sizeof(samuel2_eblcr));
613 break; 679 break;
614 case 1 ... 15: 680 case 1 ... 15:
681 longhaul_version = TYPE_LONGHAUL_V2;
615 if (c->x86_mask < 8) { 682 if (c->x86_mask < 8) {
616 cpu_model = CPU_SAMUEL2; 683 cpu_model = CPU_SAMUEL2;
617 cpuname = "C3 'Samuel 2' [C5B]"; 684 cpuname = "C3 'Samuel 2' [C5B]";
@@ -619,8 +686,10 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
619 cpu_model = CPU_EZRA; 686 cpu_model = CPU_EZRA;
620 cpuname = "C3 'Ezra' [C5C]"; 687 cpuname = "C3 'Ezra' [C5C]";
621 } 688 }
622 memcpy (clock_ratio, ezra_clock_ratio, sizeof(ezra_clock_ratio)); 689 memcpy(clock_ratio, ezra_clock_ratio,
623 memcpy (eblcr_table, ezra_eblcr, sizeof(ezra_eblcr)); 690 sizeof(ezra_clock_ratio));
691 memcpy(eblcr_table, ezra_eblcr,
692 sizeof(ezra_eblcr));
624 break; 693 break;
625 } 694 }
626 break; 695 break;
@@ -635,24 +704,24 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
635 break; 704 break;
636 705
637 case 9: 706 case 9:
638 cpu_model = CPU_NEHEMIAH;
639 longhaul_version = TYPE_POWERSAVER; 707 longhaul_version = TYPE_POWERSAVER;
640 numscales=32; 708 numscales = 32;
709 memcpy(clock_ratio,
710 nehemiah_clock_ratio,
711 sizeof(nehemiah_clock_ratio));
712 memcpy(eblcr_table, nehemiah_eblcr, sizeof(nehemiah_eblcr));
641 switch (c->x86_mask) { 713 switch (c->x86_mask) {
642 case 0 ... 1: 714 case 0 ... 1:
643 cpuname = "C3 'Nehemiah A' [C5N]"; 715 cpu_model = CPU_NEHEMIAH;
644 memcpy (clock_ratio, nehemiah_a_clock_ratio, sizeof(nehemiah_a_clock_ratio)); 716 cpuname = "C3 'Nehemiah A' [C5XLOE]";
645 memcpy (eblcr_table, nehemiah_a_eblcr, sizeof(nehemiah_a_eblcr));
646 break; 717 break;
647 case 2 ... 4: 718 case 2 ... 4:
648 cpuname = "C3 'Nehemiah B' [C5N]"; 719 cpu_model = CPU_NEHEMIAH;
649 memcpy (clock_ratio, nehemiah_b_clock_ratio, sizeof(nehemiah_b_clock_ratio)); 720 cpuname = "C3 'Nehemiah B' [C5XLOH]";
650 memcpy (eblcr_table, nehemiah_b_eblcr, sizeof(nehemiah_b_eblcr));
651 break; 721 break;
652 case 5 ... 15: 722 case 5 ... 15:
653 cpuname = "C3 'Nehemiah C' [C5N]"; 723 cpu_model = CPU_NEHEMIAH_C;
654 memcpy (clock_ratio, nehemiah_c_clock_ratio, sizeof(nehemiah_c_clock_ratio)); 724 cpuname = "C3 'Nehemiah C' [C5P]";
655 memcpy (eblcr_table, nehemiah_c_eblcr, sizeof(nehemiah_c_eblcr));
656 break; 725 break;
657 } 726 }
658 break; 727 break;
@@ -661,6 +730,13 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
661 cpuname = "Unknown"; 730 cpuname = "Unknown";
662 break; 731 break;
663 } 732 }
733 /* Check Longhaul ver. 2 */
734 if (longhaul_version == TYPE_LONGHAUL_V2) {
735 rdmsr(MSR_VIA_LONGHAUL, lo, hi);
736 if (lo == 0 && hi == 0)
737 /* Looks like MSR isn't present */
738 longhaul_version = TYPE_LONGHAUL_V1;
739 }
664 740
665 printk (KERN_INFO PFX "VIA %s CPU detected. ", cpuname); 741 printk (KERN_INFO PFX "VIA %s CPU detected. ", cpuname);
666 switch (longhaul_version) { 742 switch (longhaul_version) {
@@ -673,15 +749,18 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
673 break; 749 break;
674 }; 750 };
675 751
752 /* Doesn't hurt */
753 vt8235_present = longhaul_setup_vt8235();
754
676 /* Find ACPI data for processor */ 755 /* Find ACPI data for processor */
677 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, 756 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
678 &longhaul_walk_callback, NULL, (void *)&pr); 757 ACPI_UINT32_MAX, &longhaul_walk_callback,
758 NULL, (void *)&pr);
679 759
680 /* Check ACPI support for C3 state */ 760 /* Check ACPI support for C3 state */
681 if ((pr != NULL) && (longhaul_version == TYPE_POWERSAVER)) { 761 if (pr != NULL && longhaul_version != TYPE_LONGHAUL_V1) {
682 cx = &pr->power.states[ACPI_STATE_C3]; 762 cx = &pr->power.states[ACPI_STATE_C3];
683 if (cx->address > 0 && 763 if (cx->address > 0 && cx->latency <= 1000) {
684 (cx->latency <= 1000 || ignore_latency != 0) ) {
685 longhaul_flags |= USE_ACPI_C3; 764 longhaul_flags |= USE_ACPI_C3;
686 goto print_support_type; 765 goto print_support_type;
687 } 766 }
@@ -691,8 +770,11 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
691 longhaul_flags |= USE_NORTHBRIDGE; 770 longhaul_flags |= USE_NORTHBRIDGE;
692 goto print_support_type; 771 goto print_support_type;
693 } 772 }
694 773 /* Use VT8235 southbridge if present */
695 /* No ACPI C3 or we can't use it */ 774 if (longhaul_version == TYPE_POWERSAVER && vt8235_present) {
775 longhaul_flags |= USE_VT8235;
776 goto print_support_type;
777 }
696 /* Check ACPI support for bus master arbiter disable */ 778 /* Check ACPI support for bus master arbiter disable */
697 if ((pr == NULL) || !(pr->flags.bm_control)) { 779 if ((pr == NULL) || !(pr->flags.bm_control)) {
698 printk(KERN_ERR PFX 780 printk(KERN_ERR PFX
@@ -701,18 +783,18 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
701 } 783 }
702 784
703print_support_type: 785print_support_type:
704 if (!(longhaul_flags & USE_NORTHBRIDGE)) { 786 if (longhaul_flags & USE_NORTHBRIDGE)
705 printk (KERN_INFO PFX "Using ACPI support.\n");
706 } else {
707 printk (KERN_INFO PFX "Using northbridge support.\n"); 787 printk (KERN_INFO PFX "Using northbridge support.\n");
708 } 788 else if (longhaul_flags & USE_VT8235)
789 printk (KERN_INFO PFX "Using VT8235 support.\n");
790 else
791 printk (KERN_INFO PFX "Using ACPI support.\n");
709 792
710 ret = longhaul_get_ranges(); 793 ret = longhaul_get_ranges();
711 if (ret != 0) 794 if (ret != 0)
712 return ret; 795 return ret;
713 796
714 if ((longhaul_version==TYPE_LONGHAUL_V2 || longhaul_version==TYPE_POWERSAVER) && 797 if ((longhaul_version != TYPE_LONGHAUL_V1) && (scale_voltage != 0))
715 (scale_voltage != 0))
716 longhaul_setup_voltagescaling(); 798 longhaul_setup_voltagescaling();
717 799
718 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 800 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
@@ -800,8 +882,6 @@ static void __exit longhaul_exit(void)
800 882
801module_param (scale_voltage, int, 0644); 883module_param (scale_voltage, int, 0644);
802MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); 884MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
803module_param(ignore_latency, int, 0644);
804MODULE_PARM_DESC(ignore_latency, "Skip ACPI C3 latency test");
805 885
806MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>"); 886MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>");
807MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors."); 887MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors.");
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h
index bc4682aad69b..bb0a04b1d1ab 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.h
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h
@@ -235,84 +235,14 @@ static int __initdata ezrat_eblcr[32] = {
235/* 235/*
236 * VIA C3 Nehemiah */ 236 * VIA C3 Nehemiah */
237 237
238static int __initdata nehemiah_a_clock_ratio[32] = { 238static int __initdata nehemiah_clock_ratio[32] = {
239 100, /* 0000 -> 10.0x */ 239 100, /* 0000 -> 10.0x */
240 160, /* 0001 -> 16.0x */ 240 160, /* 0001 -> 16.0x */
241 -1, /* 0010 -> RESERVED */ 241 40, /* 0010 -> 4.0x */
242 90, /* 0011 -> 9.0x */
243 95, /* 0100 -> 9.5x */
244 -1, /* 0101 -> RESERVED */
245 -1, /* 0110 -> RESERVED */
246 55, /* 0111 -> 5.5x */
247 60, /* 1000 -> 6.0x */
248 70, /* 1001 -> 7.0x */
249 80, /* 1010 -> 8.0x */
250 50, /* 1011 -> 5.0x */
251 65, /* 1100 -> 6.5x */
252 75, /* 1101 -> 7.5x */
253 85, /* 1110 -> 8.5x */
254 120, /* 1111 -> 12.0x */
255 100, /* 0000 -> 10.0x */
256 -1, /* 0001 -> RESERVED */
257 120, /* 0010 -> 12.0x */
258 90, /* 0011 -> 9.0x */
259 105, /* 0100 -> 10.5x */
260 115, /* 0101 -> 11.5x */
261 125, /* 0110 -> 12.5x */
262 135, /* 0111 -> 13.5x */
263 140, /* 1000 -> 14.0x */
264 150, /* 1001 -> 15.0x */
265 160, /* 1010 -> 16.0x */
266 130, /* 1011 -> 13.0x */
267 145, /* 1100 -> 14.5x */
268 155, /* 1101 -> 15.5x */
269 -1, /* 1110 -> RESERVED (13.0x) */
270 120, /* 1111 -> 12.0x */
271};
272
273static int __initdata nehemiah_b_clock_ratio[32] = {
274 100, /* 0000 -> 10.0x */
275 160, /* 0001 -> 16.0x */
276 -1, /* 0010 -> RESERVED */
277 90, /* 0011 -> 9.0x */
278 95, /* 0100 -> 9.5x */
279 -1, /* 0101 -> RESERVED */
280 -1, /* 0110 -> RESERVED */
281 55, /* 0111 -> 5.5x */
282 60, /* 1000 -> 6.0x */
283 70, /* 1001 -> 7.0x */
284 80, /* 1010 -> 8.0x */
285 50, /* 1011 -> 5.0x */
286 65, /* 1100 -> 6.5x */
287 75, /* 1101 -> 7.5x */
288 85, /* 1110 -> 8.5x */
289 120, /* 1111 -> 12.0x */
290 100, /* 0000 -> 10.0x */
291 110, /* 0001 -> 11.0x */
292 120, /* 0010 -> 12.0x */
293 90, /* 0011 -> 9.0x */
294 105, /* 0100 -> 10.5x */
295 115, /* 0101 -> 11.5x */
296 125, /* 0110 -> 12.5x */
297 135, /* 0111 -> 13.5x */
298 140, /* 1000 -> 14.0x */
299 150, /* 1001 -> 15.0x */
300 160, /* 1010 -> 16.0x */
301 130, /* 1011 -> 13.0x */
302 145, /* 1100 -> 14.5x */
303 155, /* 1101 -> 15.5x */
304 -1, /* 1110 -> RESERVED (13.0x) */
305 120, /* 1111 -> 12.0x */
306};
307
308static int __initdata nehemiah_c_clock_ratio[32] = {
309 100, /* 0000 -> 10.0x */
310 160, /* 0001 -> 16.0x */
311 40, /* 0010 -> RESERVED */
312 90, /* 0011 -> 9.0x */ 242 90, /* 0011 -> 9.0x */
313 95, /* 0100 -> 9.5x */ 243 95, /* 0100 -> 9.5x */
314 -1, /* 0101 -> RESERVED */ 244 -1, /* 0101 -> RESERVED */
315 45, /* 0110 -> RESERVED */ 245 45, /* 0110 -> 4.5x */
316 55, /* 0111 -> 5.5x */ 246 55, /* 0111 -> 5.5x */
317 60, /* 1000 -> 6.0x */ 247 60, /* 1000 -> 6.0x */
318 70, /* 1001 -> 7.0x */ 248 70, /* 1001 -> 7.0x */
@@ -340,84 +270,14 @@ static int __initdata nehemiah_c_clock_ratio[32] = {
340 120, /* 1111 -> 12.0x */ 270 120, /* 1111 -> 12.0x */
341}; 271};
342 272
343static int __initdata nehemiah_a_eblcr[32] = { 273static int __initdata nehemiah_eblcr[32] = {
344 50, /* 0000 -> 5.0x */
345 160, /* 0001 -> 16.0x */
346 -1, /* 0010 -> RESERVED */
347 100, /* 0011 -> 10.0x */
348 55, /* 0100 -> 5.5x */
349 -1, /* 0101 -> RESERVED */
350 -1, /* 0110 -> RESERVED */
351 95, /* 0111 -> 9.5x */
352 90, /* 1000 -> 9.0x */
353 70, /* 1001 -> 7.0x */
354 80, /* 1010 -> 8.0x */
355 60, /* 1011 -> 6.0x */
356 120, /* 1100 -> 12.0x */
357 75, /* 1101 -> 7.5x */
358 85, /* 1110 -> 8.5x */
359 65, /* 1111 -> 6.5x */
360 90, /* 0000 -> 9.0x */
361 -1, /* 0001 -> RESERVED */
362 120, /* 0010 -> 12.0x */
363 100, /* 0011 -> 10.0x */
364 135, /* 0100 -> 13.5x */
365 115, /* 0101 -> 11.5x */
366 125, /* 0110 -> 12.5x */
367 105, /* 0111 -> 10.5x */
368 130, /* 1000 -> 13.0x */
369 150, /* 1001 -> 15.0x */
370 160, /* 1010 -> 16.0x */
371 140, /* 1011 -> 14.0x */
372 120, /* 1100 -> 12.0x */
373 155, /* 1101 -> 15.5x */
374 -1, /* 1110 -> RESERVED (13.0x) */
375 145 /* 1111 -> 14.5x */
376 /* end of table */
377};
378static int __initdata nehemiah_b_eblcr[32] = {
379 50, /* 0000 -> 5.0x */
380 160, /* 0001 -> 16.0x */
381 -1, /* 0010 -> RESERVED */
382 100, /* 0011 -> 10.0x */
383 55, /* 0100 -> 5.5x */
384 -1, /* 0101 -> RESERVED */
385 -1, /* 0110 -> RESERVED */
386 95, /* 0111 -> 9.5x */
387 90, /* 1000 -> 9.0x */
388 70, /* 1001 -> 7.0x */
389 80, /* 1010 -> 8.0x */
390 60, /* 1011 -> 6.0x */
391 120, /* 1100 -> 12.0x */
392 75, /* 1101 -> 7.5x */
393 85, /* 1110 -> 8.5x */
394 65, /* 1111 -> 6.5x */
395 90, /* 0000 -> 9.0x */
396 110, /* 0001 -> 11.0x */
397 120, /* 0010 -> 12.0x */
398 100, /* 0011 -> 10.0x */
399 135, /* 0100 -> 13.5x */
400 115, /* 0101 -> 11.5x */
401 125, /* 0110 -> 12.5x */
402 105, /* 0111 -> 10.5x */
403 130, /* 1000 -> 13.0x */
404 150, /* 1001 -> 15.0x */
405 160, /* 1010 -> 16.0x */
406 140, /* 1011 -> 14.0x */
407 120, /* 1100 -> 12.0x */
408 155, /* 1101 -> 15.5x */
409 -1, /* 1110 -> RESERVED (13.0x) */
410 145 /* 1111 -> 14.5x */
411 /* end of table */
412};
413static int __initdata nehemiah_c_eblcr[32] = {
414 50, /* 0000 -> 5.0x */ 274 50, /* 0000 -> 5.0x */
415 160, /* 0001 -> 16.0x */ 275 160, /* 0001 -> 16.0x */
416 40, /* 0010 -> RESERVED */ 276 40, /* 0010 -> 4.0x */
417 100, /* 0011 -> 10.0x */ 277 100, /* 0011 -> 10.0x */
418 55, /* 0100 -> 5.5x */ 278 55, /* 0100 -> 5.5x */
419 -1, /* 0101 -> RESERVED */ 279 -1, /* 0101 -> RESERVED */
420 45, /* 0110 -> RESERVED */ 280 45, /* 0110 -> 4.5x */
421 95, /* 0111 -> 9.5x */ 281 95, /* 0111 -> 9.5x */
422 90, /* 1000 -> 9.0x */ 282 90, /* 1000 -> 9.0x */
423 70, /* 1001 -> 7.0x */ 283 70, /* 1001 -> 7.0x */
@@ -443,7 +303,6 @@ static int __initdata nehemiah_c_eblcr[32] = {
443 155, /* 1101 -> 15.5x */ 303 155, /* 1101 -> 15.5x */
444 -1, /* 1110 -> RESERVED (13.0x) */ 304 -1, /* 1110 -> RESERVED (13.0x) */
445 145 /* 1111 -> 14.5x */ 305 145 /* 1111 -> 14.5x */
446 /* end of table */
447}; 306};
448 307
449/* 308/*
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 2d6491672559..fe3b67005ebb 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1289,7 +1289,11 @@ static unsigned int powernowk8_get (unsigned int cpu)
1289 if (query_current_values_with_pending_wait(data)) 1289 if (query_current_values_with_pending_wait(data))
1290 goto out; 1290 goto out;
1291 1291
1292 khz = find_khz_freq_from_fid(data->currfid); 1292 if (cpu_family == CPU_HW_PSTATE)
1293 khz = find_khz_freq_from_fiddid(data->currfid, data->currdid);
1294 else
1295 khz = find_khz_freq_from_fid(data->currfid);
1296
1293 1297
1294out: 1298out:
1295 set_cpus_allowed(current, oldmask); 1299 set_cpus_allowed(current, oldmask);
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
index c0c3b59de32c..de27bd07bc9c 100644
--- a/arch/i386/kernel/cpu/cyrix.c
+++ b/arch/i386/kernel/cpu/cyrix.c
@@ -6,6 +6,7 @@
6#include <asm/io.h> 6#include <asm/io.h>
7#include <asm/processor.h> 7#include <asm/processor.h>
8#include <asm/timer.h> 8#include <asm/timer.h>
9#include <asm/pci-direct.h>
9 10
10#include "cpu.h" 11#include "cpu.h"
11 12
@@ -161,19 +162,19 @@ static void __cpuinit set_cx86_inc(void)
161static void __cpuinit geode_configure(void) 162static void __cpuinit geode_configure(void)
162{ 163{
163 unsigned long flags; 164 unsigned long flags;
164 u8 ccr3, ccr4; 165 u8 ccr3;
165 local_irq_save(flags); 166 local_irq_save(flags);
166 167
167 /* Suspend on halt power saving and enable #SUSP pin */ 168 /* Suspend on halt power saving and enable #SUSP pin */
168 setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); 169 setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
169 170
170 ccr3 = getCx86(CX86_CCR3); 171 ccr3 = getCx86(CX86_CCR3);
171 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* Enable */ 172 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
172
173 ccr4 = getCx86(CX86_CCR4);
174 ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */
175 173
176 setCx86(CX86_CCR3, ccr3); 174
175 /* FPU fast, DTE cache, Mem bypass */
176 setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
177 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
177 178
178 set_cx86_memwb(); 179 set_cx86_memwb();
179 set_cx86_reorder(); 180 set_cx86_reorder();
@@ -183,14 +184,6 @@ static void __cpuinit geode_configure(void)
183} 184}
184 185
185 186
186#ifdef CONFIG_PCI
187static struct pci_device_id __cpuinitdata cyrix_55x0[] = {
188 { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510) },
189 { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520) },
190 { },
191};
192#endif
193
194static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) 187static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
195{ 188{
196 unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0; 189 unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0;
@@ -258,6 +251,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
258 251
259 case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */ 252 case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */
260#ifdef CONFIG_PCI 253#ifdef CONFIG_PCI
254 {
255 u32 vendor, device;
261 /* It isn't really a PCI quirk directly, but the cure is the 256 /* It isn't really a PCI quirk directly, but the cure is the
262 same. The MediaGX has deep magic SMM stuff that handles the 257 same. The MediaGX has deep magic SMM stuff that handles the
263 SB emulation. It thows away the fifo on disable_dma() which 258 SB emulation. It thows away the fifo on disable_dma() which
@@ -273,22 +268,34 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
273 printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n"); 268 printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
274 isa_dma_bridge_buggy = 2; 269 isa_dma_bridge_buggy = 2;
275 270
271 /* We do this before the PCI layer is running. However we
272 are safe here as we know the bridge must be a Cyrix
273 companion and must be present */
274 vendor = read_pci_config_16(0, 0, 0x12, PCI_VENDOR_ID);
275 device = read_pci_config_16(0, 0, 0x12, PCI_DEVICE_ID);
276 276
277 /* 277 /*
278 * The 5510/5520 companion chips have a funky PIT. 278 * The 5510/5520 companion chips have a funky PIT.
279 */ 279 */
280 if (pci_dev_present(cyrix_55x0)) 280 if (vendor == PCI_VENDOR_ID_CYRIX &&
281 (device == PCI_DEVICE_ID_CYRIX_5510 || device == PCI_DEVICE_ID_CYRIX_5520))
281 pit_latch_buggy = 1; 282 pit_latch_buggy = 1;
283 }
282#endif 284#endif
283 c->x86_cache_size=16; /* Yep 16K integrated cache thats it */ 285 c->x86_cache_size=16; /* Yep 16K integrated cache thats it */
284 286
285 /* GXm supports extended cpuid levels 'ala' AMD */ 287 /* GXm supports extended cpuid levels 'ala' AMD */
286 if (c->cpuid_level == 2) { 288 if (c->cpuid_level == 2) {
287 /* Enable cxMMX extensions (GX1 Datasheet 54) */ 289 /* Enable cxMMX extensions (GX1 Datasheet 54) */
288 setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1); 290 setCx86(CX86_CCR7, getCx86(CX86_CCR7) | 1);
289 291
290 /* GXlv/GXm/GX1 */ 292 /*
291 if((dir1 >= 0x50 && dir1 <= 0x54) || dir1 >= 0x63) 293 * GXm : 0x30 ... 0x5f GXm datasheet 51
294 * GXlv: 0x6x GXlv datasheet 54
295 * ? : 0x7x
296 * GX1 : 0x8x GX1 datasheet 56
297 */
298 if((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <=dir1 && dir1 <= 0x8f))
292 geode_configure(); 299 geode_configure();
293 get_model_name(c); /* get CPU marketing name */ 300 get_model_name(c); /* get CPU marketing name */
294 return; 301 return;
@@ -415,15 +422,14 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 * c)
415 422
416 if (dir0 == 5 || dir0 == 3) 423 if (dir0 == 5 || dir0 == 3)
417 { 424 {
418 unsigned char ccr3, ccr4; 425 unsigned char ccr3;
419 unsigned long flags; 426 unsigned long flags;
420 printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n"); 427 printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
421 local_irq_save(flags); 428 local_irq_save(flags);
422 ccr3 = getCx86(CX86_CCR3); 429 ccr3 = getCx86(CX86_CCR3);
423 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ 430 setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
424 ccr4 = getCx86(CX86_CCR4); 431 setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80); /* enable cpuid */
425 setCx86(CX86_CCR4, ccr4 | 0x80); /* enable cpuid */ 432 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
426 setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
427 local_irq_restore(flags); 433 local_irq_restore(flags);
428 } 434 }
429 } 435 }
diff --git a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c
index d555bec0db99..4f10c62d180c 100644
--- a/arch/i386/kernel/cpu/mcheck/mce.c
+++ b/arch/i386/kernel/cpu/mcheck/mce.c
@@ -12,6 +12,7 @@
12 12
13#include <asm/processor.h> 13#include <asm/processor.h>
14#include <asm/system.h> 14#include <asm/system.h>
15#include <asm/mce.h>
15 16
16#include "mce.h" 17#include "mce.h"
17 18
diff --git a/arch/i386/kernel/cpu/mcheck/mce.h b/arch/i386/kernel/cpu/mcheck/mce.h
index 84fd4cf7d0fb..81fb6e2d35f3 100644
--- a/arch/i386/kernel/cpu/mcheck/mce.h
+++ b/arch/i386/kernel/cpu/mcheck/mce.h
@@ -1,4 +1,5 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <asm/mce.h>
2 3
3void amd_mcheck_init(struct cpuinfo_x86 *c); 4void amd_mcheck_init(struct cpuinfo_x86 *c);
4void intel_p4_mcheck_init(struct cpuinfo_x86 *c); 5void intel_p4_mcheck_init(struct cpuinfo_x86 *c);
@@ -9,6 +10,5 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c);
9/* Call the installed machine check handler for this CPU setup. */ 10/* Call the installed machine check handler for this CPU setup. */
10extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code); 11extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code);
11 12
12extern int mce_disabled;
13extern int nr_mce_banks; 13extern int nr_mce_banks;
14 14
diff --git a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c
index 5ae1705eafa6..c7d8f1756745 100644
--- a/arch/i386/kernel/cpu/mtrr/if.c
+++ b/arch/i386/kernel/cpu/mtrr/if.c
@@ -211,6 +211,9 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
211 default: 211 default:
212 return -ENOTTY; 212 return -ENOTTY;
213 case MTRRIOC_ADD_ENTRY: 213 case MTRRIOC_ADD_ENTRY:
214#ifdef CONFIG_COMPAT
215 case MTRRIOC32_ADD_ENTRY:
216#endif
214 if (!capable(CAP_SYS_ADMIN)) 217 if (!capable(CAP_SYS_ADMIN))
215 return -EPERM; 218 return -EPERM;
216 err = 219 err =
@@ -218,21 +221,33 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
218 file, 0); 221 file, 0);
219 break; 222 break;
220 case MTRRIOC_SET_ENTRY: 223 case MTRRIOC_SET_ENTRY:
224#ifdef CONFIG_COMPAT
225 case MTRRIOC32_SET_ENTRY:
226#endif
221 if (!capable(CAP_SYS_ADMIN)) 227 if (!capable(CAP_SYS_ADMIN))
222 return -EPERM; 228 return -EPERM;
223 err = mtrr_add(sentry.base, sentry.size, sentry.type, 0); 229 err = mtrr_add(sentry.base, sentry.size, sentry.type, 0);
224 break; 230 break;
225 case MTRRIOC_DEL_ENTRY: 231 case MTRRIOC_DEL_ENTRY:
232#ifdef CONFIG_COMPAT
233 case MTRRIOC32_DEL_ENTRY:
234#endif
226 if (!capable(CAP_SYS_ADMIN)) 235 if (!capable(CAP_SYS_ADMIN))
227 return -EPERM; 236 return -EPERM;
228 err = mtrr_file_del(sentry.base, sentry.size, file, 0); 237 err = mtrr_file_del(sentry.base, sentry.size, file, 0);
229 break; 238 break;
230 case MTRRIOC_KILL_ENTRY: 239 case MTRRIOC_KILL_ENTRY:
240#ifdef CONFIG_COMPAT
241 case MTRRIOC32_KILL_ENTRY:
242#endif
231 if (!capable(CAP_SYS_ADMIN)) 243 if (!capable(CAP_SYS_ADMIN))
232 return -EPERM; 244 return -EPERM;
233 err = mtrr_del(-1, sentry.base, sentry.size); 245 err = mtrr_del(-1, sentry.base, sentry.size);
234 break; 246 break;
235 case MTRRIOC_GET_ENTRY: 247 case MTRRIOC_GET_ENTRY:
248#ifdef CONFIG_COMPAT
249 case MTRRIOC32_GET_ENTRY:
250#endif
236 if (gentry.regnum >= num_var_ranges) 251 if (gentry.regnum >= num_var_ranges)
237 return -EINVAL; 252 return -EINVAL;
238 mtrr_if->get(gentry.regnum, &gentry.base, &size, &type); 253 mtrr_if->get(gentry.regnum, &gentry.base, &size, &type);
@@ -249,6 +264,9 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
249 264
250 break; 265 break;
251 case MTRRIOC_ADD_PAGE_ENTRY: 266 case MTRRIOC_ADD_PAGE_ENTRY:
267#ifdef CONFIG_COMPAT
268 case MTRRIOC32_ADD_PAGE_ENTRY:
269#endif
252 if (!capable(CAP_SYS_ADMIN)) 270 if (!capable(CAP_SYS_ADMIN))
253 return -EPERM; 271 return -EPERM;
254 err = 272 err =
@@ -256,21 +274,33 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
256 file, 1); 274 file, 1);
257 break; 275 break;
258 case MTRRIOC_SET_PAGE_ENTRY: 276 case MTRRIOC_SET_PAGE_ENTRY:
277#ifdef CONFIG_COMPAT
278 case MTRRIOC32_SET_PAGE_ENTRY:
279#endif
259 if (!capable(CAP_SYS_ADMIN)) 280 if (!capable(CAP_SYS_ADMIN))
260 return -EPERM; 281 return -EPERM;
261 err = mtrr_add_page(sentry.base, sentry.size, sentry.type, 0); 282 err = mtrr_add_page(sentry.base, sentry.size, sentry.type, 0);
262 break; 283 break;
263 case MTRRIOC_DEL_PAGE_ENTRY: 284 case MTRRIOC_DEL_PAGE_ENTRY:
285#ifdef CONFIG_COMPAT
286 case MTRRIOC32_DEL_PAGE_ENTRY:
287#endif
264 if (!capable(CAP_SYS_ADMIN)) 288 if (!capable(CAP_SYS_ADMIN))
265 return -EPERM; 289 return -EPERM;
266 err = mtrr_file_del(sentry.base, sentry.size, file, 1); 290 err = mtrr_file_del(sentry.base, sentry.size, file, 1);
267 break; 291 break;
268 case MTRRIOC_KILL_PAGE_ENTRY: 292 case MTRRIOC_KILL_PAGE_ENTRY:
293#ifdef CONFIG_COMPAT
294 case MTRRIOC32_KILL_PAGE_ENTRY:
295#endif
269 if (!capable(CAP_SYS_ADMIN)) 296 if (!capable(CAP_SYS_ADMIN))
270 return -EPERM; 297 return -EPERM;
271 err = mtrr_del_page(-1, sentry.base, sentry.size); 298 err = mtrr_del_page(-1, sentry.base, sentry.size);
272 break; 299 break;
273 case MTRRIOC_GET_PAGE_ENTRY: 300 case MTRRIOC_GET_PAGE_ENTRY:
301#ifdef CONFIG_COMPAT
302 case MTRRIOC32_GET_PAGE_ENTRY:
303#endif
274 if (gentry.regnum >= num_var_ranges) 304 if (gentry.regnum >= num_var_ranges)
275 return -EINVAL; 305 return -EINVAL;
276 mtrr_if->get(gentry.regnum, &gentry.base, &size, &type); 306 mtrr_if->get(gentry.regnum, &gentry.base, &size, &type);
@@ -339,7 +369,7 @@ static int mtrr_open(struct inode *inode, struct file *file)
339 return single_open(file, mtrr_seq_show, NULL); 369 return single_open(file, mtrr_seq_show, NULL);
340} 370}
341 371
342static struct file_operations mtrr_fops = { 372static const struct file_operations mtrr_fops = {
343 .owner = THIS_MODULE, 373 .owner = THIS_MODULE,
344 .open = mtrr_open, 374 .open = mtrr_open,
345 .read = seq_read, 375 .read = seq_read,
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index 16bb7ea87145..0acfb6a5a220 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -50,7 +50,7 @@ u32 num_var_ranges = 0;
50unsigned int *usage_table; 50unsigned int *usage_table;
51static DEFINE_MUTEX(mtrr_mutex); 51static DEFINE_MUTEX(mtrr_mutex);
52 52
53u32 size_or_mask, size_and_mask; 53u64 size_or_mask, size_and_mask;
54 54
55static struct mtrr_ops * mtrr_ops[X86_VENDOR_NUM] = {}; 55static struct mtrr_ops * mtrr_ops[X86_VENDOR_NUM] = {};
56 56
@@ -662,8 +662,8 @@ void __init mtrr_bp_init(void)
662 boot_cpu_data.x86_mask == 0x4)) 662 boot_cpu_data.x86_mask == 0x4))
663 phys_addr = 36; 663 phys_addr = 36;
664 664
665 size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1); 665 size_or_mask = ~((1ULL << (phys_addr - PAGE_SHIFT)) - 1);
666 size_and_mask = ~size_or_mask & 0xfff00000; 666 size_and_mask = ~size_or_mask & 0xfffff00000ULL;
667 } else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR && 667 } else if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR &&
668 boot_cpu_data.x86 == 6) { 668 boot_cpu_data.x86 == 6) {
669 /* VIA C* family have Intel style MTRRs, but 669 /* VIA C* family have Intel style MTRRs, but
diff --git a/arch/i386/kernel/cpu/mtrr/mtrr.h b/arch/i386/kernel/cpu/mtrr/mtrr.h
index d61ea9db6cfe..289dfe6030e3 100644
--- a/arch/i386/kernel/cpu/mtrr/mtrr.h
+++ b/arch/i386/kernel/cpu/mtrr/mtrr.h
@@ -84,7 +84,7 @@ void get_mtrr_state(void);
84 84
85extern void set_mtrr_ops(struct mtrr_ops * ops); 85extern void set_mtrr_ops(struct mtrr_ops * ops);
86 86
87extern u32 size_or_mask, size_and_mask; 87extern u64 size_or_mask, size_and_mask;
88extern struct mtrr_ops * mtrr_if; 88extern struct mtrr_ops * mtrr_if;
89 89
90#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd) 90#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c
index 6624d8583c42..47e3ebbfb28d 100644
--- a/arch/i386/kernel/cpu/proc.c
+++ b/arch/i386/kernel/cpu/proc.c
@@ -29,7 +29,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
29 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 29 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
30 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, 30 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
31 NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL, 31 NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL,
32 NULL, "fxsr_opt", "rdtscp", NULL, NULL, "lm", "3dnowext", "3dnow", 32 NULL, "fxsr_opt", "pdpe1gb", "rdtscp", NULL, "lm", "3dnowext", "3dnow",
33 33
34 /* Transmeta-defined */ 34 /* Transmeta-defined */
35 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, 35 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -47,7 +47,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
47 /* Intel-defined (#2) */ 47 /* Intel-defined (#2) */
48 "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est", 48 "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
49 "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL, 49 "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
50 NULL, NULL, "dca", NULL, NULL, NULL, NULL, NULL, 50 NULL, NULL, "dca", NULL, NULL, NULL, NULL, "popcnt",
51 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 51 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
52 52
53 /* VIA/Cyrix/Centaur-defined */ 53 /* VIA/Cyrix/Centaur-defined */
@@ -57,8 +57,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
57 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 57 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
58 58
59 /* AMD-defined (#2) */ 59 /* AMD-defined (#2) */
60 "lahf_lm", "cmp_legacy", "svm", NULL, "cr8legacy", NULL, NULL, NULL, 60 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8legacy", "abm",
61 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 61 "sse4a", "misalignsse",
62 "3dnowprefetch", "osvw", "ibs", NULL, NULL, NULL, NULL, NULL,
62 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 64 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
64 }; 65 };
@@ -69,8 +70,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
69 "ttp", /* thermal trip */ 70 "ttp", /* thermal trip */
70 "tm", 71 "tm",
71 "stc", 72 "stc",
73 "100mhzsteps",
74 "hwpstate",
72 NULL, 75 NULL,
73 /* nothing */ /* constant_tsc - moved to flags */ 76 NULL, /* constant_tsc - moved to flags */
77 /* nothing */
74 }; 78 };
75 struct cpuinfo_x86 *c = v; 79 struct cpuinfo_x86 *c = v;
76 int i, n = c - cpu_data; 80 int i, n = c - cpu_data;
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c
index 4056fb7d2cdf..5678d46863c6 100644
--- a/arch/i386/kernel/cpu/transmeta.c
+++ b/arch/i386/kernel/cpu/transmeta.c
@@ -9,7 +9,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
9{ 9{
10 unsigned int cap_mask, uk, max, dummy; 10 unsigned int cap_mask, uk, max, dummy;
11 unsigned int cms_rev1, cms_rev2; 11 unsigned int cms_rev1, cms_rev2;
12 unsigned int cpu_rev, cpu_freq, cpu_flags, new_cpu_rev; 12 unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev;
13 char cpu_info[65]; 13 char cpu_info[65];
14 14
15 get_model_name(c); /* Same as AMD/Cyrix */ 15 get_model_name(c); /* Same as AMD/Cyrix */
@@ -72,6 +72,9 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
72 wrmsr(0x80860004, ~0, uk); 72 wrmsr(0x80860004, ~0, uk);
73 c->x86_capability[0] = cpuid_edx(0x00000001); 73 c->x86_capability[0] = cpuid_edx(0x00000001);
74 wrmsr(0x80860004, cap_mask, uk); 74 wrmsr(0x80860004, cap_mask, uk);
75
76 /* All Transmeta CPUs have a constant TSC */
77 set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
75 78
76 /* If we can run i686 user-space code, call us an i686 */ 79 /* If we can run i686 user-space code, call us an i686 */
77#define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV) 80#define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV)
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
index 51130b39cd2e..eeae0d992337 100644
--- a/arch/i386/kernel/cpuid.c
+++ b/arch/i386/kernel/cpuid.c
@@ -48,7 +48,6 @@ static struct class *cpuid_class;
48#ifdef CONFIG_SMP 48#ifdef CONFIG_SMP
49 49
50struct cpuid_command { 50struct cpuid_command {
51 int cpu;
52 u32 reg; 51 u32 reg;
53 u32 *data; 52 u32 *data;
54}; 53};
@@ -57,8 +56,7 @@ static void cpuid_smp_cpuid(void *cmd_block)
57{ 56{
58 struct cpuid_command *cmd = (struct cpuid_command *)cmd_block; 57 struct cpuid_command *cmd = (struct cpuid_command *)cmd_block;
59 58
60 if (cmd->cpu == smp_processor_id()) 59 cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
61 cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
62 &cmd->data[3]); 60 &cmd->data[3]);
63} 61}
64 62
@@ -70,11 +68,10 @@ static inline void do_cpuid(int cpu, u32 reg, u32 * data)
70 if (cpu == smp_processor_id()) { 68 if (cpu == smp_processor_id()) {
71 cpuid(reg, &data[0], &data[1], &data[2], &data[3]); 69 cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
72 } else { 70 } else {
73 cmd.cpu = cpu;
74 cmd.reg = reg; 71 cmd.reg = reg;
75 cmd.data = data; 72 cmd.data = data;
76 73
77 smp_call_function(cpuid_smp_cpuid, &cmd, 1, 1); 74 smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1, 1);
78 } 75 }
79 preempt_enable(); 76 preempt_enable();
80} 77}
@@ -148,7 +145,7 @@ static int cpuid_open(struct inode *inode, struct file *file)
148/* 145/*
149 * File operations we support 146 * File operations we support
150 */ 147 */
151static struct file_operations cpuid_fops = { 148static const struct file_operations cpuid_fops = {
152 .owner = THIS_MODULE, 149 .owner = THIS_MODULE,
153 .llseek = cpuid_seek, 150 .llseek = cpuid_seek,
154 .read = cpuid_read, 151 .read = cpuid_read,
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index f391abcf7da9..70f39560846a 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -14,6 +14,7 @@
14#include <asm/pgtable.h> 14#include <asm/pgtable.h>
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/e820.h> 16#include <asm/e820.h>
17#include <asm/setup.h>
17 18
18#ifdef CONFIG_EFI 19#ifdef CONFIG_EFI
19int efi_enabled = 0; 20int efi_enabled = 0;
@@ -156,21 +157,22 @@ static struct resource standard_io_resources[] = { {
156 .flags = IORESOURCE_BUSY | IORESOURCE_IO 157 .flags = IORESOURCE_BUSY | IORESOURCE_IO
157} }; 158} };
158 159
159static int romsignature(const unsigned char *x) 160#define ROMSIGNATURE 0xaa55
161
162static int __init romsignature(const unsigned char *rom)
160{ 163{
161 unsigned short sig; 164 unsigned short sig;
162 int ret = 0; 165
163 if (probe_kernel_address((const unsigned short *)x, sig) == 0) 166 return probe_kernel_address((const unsigned short *)rom, sig) == 0 &&
164 ret = (sig == 0xaa55); 167 sig == ROMSIGNATURE;
165 return ret;
166} 168}
167 169
168static int __init romchecksum(unsigned char *rom, unsigned long length) 170static int __init romchecksum(unsigned char *rom, unsigned long length)
169{ 171{
170 unsigned char *p, sum = 0; 172 unsigned char sum;
171 173
172 for (p = rom; p < rom + length; p++) 174 for (sum = 0; length; length--)
173 sum += *p; 175 sum += *rom++;
174 return sum == 0; 176 return sum == 0;
175} 177}
176 178
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 5e47683fc63a..18bddcb8e9e8 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -30,7 +30,7 @@
30 * 18(%esp) - %eax 30 * 18(%esp) - %eax
31 * 1C(%esp) - %ds 31 * 1C(%esp) - %ds
32 * 20(%esp) - %es 32 * 20(%esp) - %es
33 * 24(%esp) - %gs 33 * 24(%esp) - %fs
34 * 28(%esp) - orig_eax 34 * 28(%esp) - orig_eax
35 * 2C(%esp) - %eip 35 * 2C(%esp) - %eip
36 * 30(%esp) - %cs 36 * 30(%esp) - %cs
@@ -99,9 +99,9 @@ VM_MASK = 0x00020000
99 99
100#define SAVE_ALL \ 100#define SAVE_ALL \
101 cld; \ 101 cld; \
102 pushl %gs; \ 102 pushl %fs; \
103 CFI_ADJUST_CFA_OFFSET 4;\ 103 CFI_ADJUST_CFA_OFFSET 4;\
104 /*CFI_REL_OFFSET gs, 0;*/\ 104 /*CFI_REL_OFFSET fs, 0;*/\
105 pushl %es; \ 105 pushl %es; \
106 CFI_ADJUST_CFA_OFFSET 4;\ 106 CFI_ADJUST_CFA_OFFSET 4;\
107 /*CFI_REL_OFFSET es, 0;*/\ 107 /*CFI_REL_OFFSET es, 0;*/\
@@ -133,7 +133,7 @@ VM_MASK = 0x00020000
133 movl %edx, %ds; \ 133 movl %edx, %ds; \
134 movl %edx, %es; \ 134 movl %edx, %es; \
135 movl $(__KERNEL_PDA), %edx; \ 135 movl $(__KERNEL_PDA), %edx; \
136 movl %edx, %gs 136 movl %edx, %fs
137 137
138#define RESTORE_INT_REGS \ 138#define RESTORE_INT_REGS \
139 popl %ebx; \ 139 popl %ebx; \
@@ -166,9 +166,9 @@ VM_MASK = 0x00020000
1662: popl %es; \ 1662: popl %es; \
167 CFI_ADJUST_CFA_OFFSET -4;\ 167 CFI_ADJUST_CFA_OFFSET -4;\
168 /*CFI_RESTORE es;*/\ 168 /*CFI_RESTORE es;*/\
1693: popl %gs; \ 1693: popl %fs; \
170 CFI_ADJUST_CFA_OFFSET -4;\ 170 CFI_ADJUST_CFA_OFFSET -4;\
171 /*CFI_RESTORE gs;*/\ 171 /*CFI_RESTORE fs;*/\
172.pushsection .fixup,"ax"; \ 172.pushsection .fixup,"ax"; \
1734: movl $0,(%esp); \ 1734: movl $0,(%esp); \
174 jmp 1b; \ 174 jmp 1b; \
@@ -227,6 +227,7 @@ ENTRY(ret_from_fork)
227 CFI_ADJUST_CFA_OFFSET -4 227 CFI_ADJUST_CFA_OFFSET -4
228 jmp syscall_exit 228 jmp syscall_exit
229 CFI_ENDPROC 229 CFI_ENDPROC
230END(ret_from_fork)
230 231
231/* 232/*
232 * Return to user mode is not as complex as all this looks, 233 * Return to user mode is not as complex as all this looks,
@@ -258,6 +259,7 @@ ENTRY(resume_userspace)
258 # int/exception return? 259 # int/exception return?
259 jne work_pending 260 jne work_pending
260 jmp restore_all 261 jmp restore_all
262END(ret_from_exception)
261 263
262#ifdef CONFIG_PREEMPT 264#ifdef CONFIG_PREEMPT
263ENTRY(resume_kernel) 265ENTRY(resume_kernel)
@@ -272,6 +274,7 @@ need_resched:
272 jz restore_all 274 jz restore_all
273 call preempt_schedule_irq 275 call preempt_schedule_irq
274 jmp need_resched 276 jmp need_resched
277END(resume_kernel)
275#endif 278#endif
276 CFI_ENDPROC 279 CFI_ENDPROC
277 280
@@ -349,16 +352,17 @@ sysenter_past_esp:
349 movl PT_OLDESP(%esp), %ecx 352 movl PT_OLDESP(%esp), %ecx
350 xorl %ebp,%ebp 353 xorl %ebp,%ebp
351 TRACE_IRQS_ON 354 TRACE_IRQS_ON
3521: mov PT_GS(%esp), %gs 3551: mov PT_FS(%esp), %fs
353 ENABLE_INTERRUPTS_SYSEXIT 356 ENABLE_INTERRUPTS_SYSEXIT
354 CFI_ENDPROC 357 CFI_ENDPROC
355.pushsection .fixup,"ax" 358.pushsection .fixup,"ax"
3562: movl $0,PT_GS(%esp) 3592: movl $0,PT_FS(%esp)
357 jmp 1b 360 jmp 1b
358.section __ex_table,"a" 361.section __ex_table,"a"
359 .align 4 362 .align 4
360 .long 1b,2b 363 .long 1b,2b
361.popsection 364.popsection
365ENDPROC(sysenter_entry)
362 366
363 # system call handler stub 367 # system call handler stub
364ENTRY(system_call) 368ENTRY(system_call)
@@ -459,6 +463,7 @@ ldt_ss:
459 CFI_ADJUST_CFA_OFFSET -8 463 CFI_ADJUST_CFA_OFFSET -8
460 jmp restore_nocheck 464 jmp restore_nocheck
461 CFI_ENDPROC 465 CFI_ENDPROC
466ENDPROC(system_call)
462 467
463 # perform work that needs to be done immediately before resumption 468 # perform work that needs to be done immediately before resumption
464 ALIGN 469 ALIGN
@@ -504,6 +509,7 @@ work_notifysig_v86:
504 xorl %edx, %edx 509 xorl %edx, %edx
505 call do_notify_resume 510 call do_notify_resume
506 jmp resume_userspace_sig 511 jmp resume_userspace_sig
512END(work_pending)
507 513
508 # perform syscall exit tracing 514 # perform syscall exit tracing
509 ALIGN 515 ALIGN
@@ -519,6 +525,7 @@ syscall_trace_entry:
519 cmpl $(nr_syscalls), %eax 525 cmpl $(nr_syscalls), %eax
520 jnae syscall_call 526 jnae syscall_call
521 jmp syscall_exit 527 jmp syscall_exit
528END(syscall_trace_entry)
522 529
523 # perform syscall exit tracing 530 # perform syscall exit tracing
524 ALIGN 531 ALIGN
@@ -532,6 +539,7 @@ syscall_exit_work:
532 movl $1, %edx 539 movl $1, %edx
533 call do_syscall_trace 540 call do_syscall_trace
534 jmp resume_userspace 541 jmp resume_userspace
542END(syscall_exit_work)
535 CFI_ENDPROC 543 CFI_ENDPROC
536 544
537 RING0_INT_FRAME # can't unwind into user space anyway 545 RING0_INT_FRAME # can't unwind into user space anyway
@@ -542,15 +550,17 @@ syscall_fault:
542 GET_THREAD_INFO(%ebp) 550 GET_THREAD_INFO(%ebp)
543 movl $-EFAULT,PT_EAX(%esp) 551 movl $-EFAULT,PT_EAX(%esp)
544 jmp resume_userspace 552 jmp resume_userspace
553END(syscall_fault)
545 554
546syscall_badsys: 555syscall_badsys:
547 movl $-ENOSYS,PT_EAX(%esp) 556 movl $-ENOSYS,PT_EAX(%esp)
548 jmp resume_userspace 557 jmp resume_userspace
558END(syscall_badsys)
549 CFI_ENDPROC 559 CFI_ENDPROC
550 560
551#define FIXUP_ESPFIX_STACK \ 561#define FIXUP_ESPFIX_STACK \
552 /* since we are on a wrong stack, we cant make it a C code :( */ \ 562 /* since we are on a wrong stack, we cant make it a C code :( */ \
553 movl %gs:PDA_cpu, %ebx; \ 563 movl %fs:PDA_cpu, %ebx; \
554 PER_CPU(cpu_gdt_descr, %ebx); \ 564 PER_CPU(cpu_gdt_descr, %ebx); \
555 movl GDS_address(%ebx), %ebx; \ 565 movl GDS_address(%ebx), %ebx; \
556 GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \ 566 GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \
@@ -581,9 +591,9 @@ syscall_badsys:
581ENTRY(interrupt) 591ENTRY(interrupt)
582.text 592.text
583 593
584vector=0
585ENTRY(irq_entries_start) 594ENTRY(irq_entries_start)
586 RING0_INT_FRAME 595 RING0_INT_FRAME
596vector=0
587.rept NR_IRQS 597.rept NR_IRQS
588 ALIGN 598 ALIGN
589 .if vector 599 .if vector
@@ -592,11 +602,16 @@ ENTRY(irq_entries_start)
5921: pushl $~(vector) 6021: pushl $~(vector)
593 CFI_ADJUST_CFA_OFFSET 4 603 CFI_ADJUST_CFA_OFFSET 4
594 jmp common_interrupt 604 jmp common_interrupt
595.data 605 .previous
596 .long 1b 606 .long 1b
597.text 607 .text
598vector=vector+1 608vector=vector+1
599.endr 609.endr
610END(irq_entries_start)
611
612.previous
613END(interrupt)
614.previous
600 615
601/* 616/*
602 * the CPU automatically disables interrupts when executing an IRQ vector, 617 * the CPU automatically disables interrupts when executing an IRQ vector,
@@ -609,6 +624,7 @@ common_interrupt:
609 movl %esp,%eax 624 movl %esp,%eax
610 call do_IRQ 625 call do_IRQ
611 jmp ret_from_intr 626 jmp ret_from_intr
627ENDPROC(common_interrupt)
612 CFI_ENDPROC 628 CFI_ENDPROC
613 629
614#define BUILD_INTERRUPT(name, nr) \ 630#define BUILD_INTERRUPT(name, nr) \
@@ -621,18 +637,24 @@ ENTRY(name) \
621 movl %esp,%eax; \ 637 movl %esp,%eax; \
622 call smp_/**/name; \ 638 call smp_/**/name; \
623 jmp ret_from_intr; \ 639 jmp ret_from_intr; \
624 CFI_ENDPROC 640 CFI_ENDPROC; \
641ENDPROC(name)
625 642
626/* The include is where all of the SMP etc. interrupts come from */ 643/* The include is where all of the SMP etc. interrupts come from */
627#include "entry_arch.h" 644#include "entry_arch.h"
628 645
646/* This alternate entry is needed because we hijack the apic LVTT */
647#if defined(CONFIG_VMI) && defined(CONFIG_X86_LOCAL_APIC)
648BUILD_INTERRUPT(apic_vmi_timer_interrupt,LOCAL_TIMER_VECTOR)
649#endif
650
629KPROBE_ENTRY(page_fault) 651KPROBE_ENTRY(page_fault)
630 RING0_EC_FRAME 652 RING0_EC_FRAME
631 pushl $do_page_fault 653 pushl $do_page_fault
632 CFI_ADJUST_CFA_OFFSET 4 654 CFI_ADJUST_CFA_OFFSET 4
633 ALIGN 655 ALIGN
634error_code: 656error_code:
635 /* the function address is in %gs's slot on the stack */ 657 /* the function address is in %fs's slot on the stack */
636 pushl %es 658 pushl %es
637 CFI_ADJUST_CFA_OFFSET 4 659 CFI_ADJUST_CFA_OFFSET 4
638 /*CFI_REL_OFFSET es, 0*/ 660 /*CFI_REL_OFFSET es, 0*/
@@ -661,20 +683,20 @@ error_code:
661 CFI_ADJUST_CFA_OFFSET 4 683 CFI_ADJUST_CFA_OFFSET 4
662 CFI_REL_OFFSET ebx, 0 684 CFI_REL_OFFSET ebx, 0
663 cld 685 cld
664 pushl %gs 686 pushl %fs
665 CFI_ADJUST_CFA_OFFSET 4 687 CFI_ADJUST_CFA_OFFSET 4
666 /*CFI_REL_OFFSET gs, 0*/ 688 /*CFI_REL_OFFSET fs, 0*/
667 movl $(__KERNEL_PDA), %ecx 689 movl $(__KERNEL_PDA), %ecx
668 movl %ecx, %gs 690 movl %ecx, %fs
669 UNWIND_ESPFIX_STACK 691 UNWIND_ESPFIX_STACK
670 popl %ecx 692 popl %ecx
671 CFI_ADJUST_CFA_OFFSET -4 693 CFI_ADJUST_CFA_OFFSET -4
672 /*CFI_REGISTER es, ecx*/ 694 /*CFI_REGISTER es, ecx*/
673 movl PT_GS(%esp), %edi # get the function address 695 movl PT_FS(%esp), %edi # get the function address
674 movl PT_ORIG_EAX(%esp), %edx # get the error code 696 movl PT_ORIG_EAX(%esp), %edx # get the error code
675 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart 697 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
676 mov %ecx, PT_GS(%esp) 698 mov %ecx, PT_FS(%esp)
677 /*CFI_REL_OFFSET gs, ES*/ 699 /*CFI_REL_OFFSET fs, ES*/
678 movl $(__USER_DS), %ecx 700 movl $(__USER_DS), %ecx
679 movl %ecx, %ds 701 movl %ecx, %ds
680 movl %ecx, %es 702 movl %ecx, %es
@@ -692,6 +714,7 @@ ENTRY(coprocessor_error)
692 CFI_ADJUST_CFA_OFFSET 4 714 CFI_ADJUST_CFA_OFFSET 4
693 jmp error_code 715 jmp error_code
694 CFI_ENDPROC 716 CFI_ENDPROC
717END(coprocessor_error)
695 718
696ENTRY(simd_coprocessor_error) 719ENTRY(simd_coprocessor_error)
697 RING0_INT_FRAME 720 RING0_INT_FRAME
@@ -701,6 +724,7 @@ ENTRY(simd_coprocessor_error)
701 CFI_ADJUST_CFA_OFFSET 4 724 CFI_ADJUST_CFA_OFFSET 4
702 jmp error_code 725 jmp error_code
703 CFI_ENDPROC 726 CFI_ENDPROC
727END(simd_coprocessor_error)
704 728
705ENTRY(device_not_available) 729ENTRY(device_not_available)
706 RING0_INT_FRAME 730 RING0_INT_FRAME
@@ -721,6 +745,7 @@ device_not_available_emulate:
721 CFI_ADJUST_CFA_OFFSET -4 745 CFI_ADJUST_CFA_OFFSET -4
722 jmp ret_from_exception 746 jmp ret_from_exception
723 CFI_ENDPROC 747 CFI_ENDPROC
748END(device_not_available)
724 749
725/* 750/*
726 * Debug traps and NMI can happen at the one SYSENTER instruction 751 * Debug traps and NMI can happen at the one SYSENTER instruction
@@ -864,10 +889,12 @@ ENTRY(native_iret)
864 .align 4 889 .align 4
865 .long 1b,iret_exc 890 .long 1b,iret_exc
866.previous 891.previous
892END(native_iret)
867 893
868ENTRY(native_irq_enable_sysexit) 894ENTRY(native_irq_enable_sysexit)
869 sti 895 sti
870 sysexit 896 sysexit
897END(native_irq_enable_sysexit)
871#endif 898#endif
872 899
873KPROBE_ENTRY(int3) 900KPROBE_ENTRY(int3)
@@ -890,6 +917,7 @@ ENTRY(overflow)
890 CFI_ADJUST_CFA_OFFSET 4 917 CFI_ADJUST_CFA_OFFSET 4
891 jmp error_code 918 jmp error_code
892 CFI_ENDPROC 919 CFI_ENDPROC
920END(overflow)
893 921
894ENTRY(bounds) 922ENTRY(bounds)
895 RING0_INT_FRAME 923 RING0_INT_FRAME
@@ -899,6 +927,7 @@ ENTRY(bounds)
899 CFI_ADJUST_CFA_OFFSET 4 927 CFI_ADJUST_CFA_OFFSET 4
900 jmp error_code 928 jmp error_code
901 CFI_ENDPROC 929 CFI_ENDPROC
930END(bounds)
902 931
903ENTRY(invalid_op) 932ENTRY(invalid_op)
904 RING0_INT_FRAME 933 RING0_INT_FRAME
@@ -908,6 +937,7 @@ ENTRY(invalid_op)
908 CFI_ADJUST_CFA_OFFSET 4 937 CFI_ADJUST_CFA_OFFSET 4
909 jmp error_code 938 jmp error_code
910 CFI_ENDPROC 939 CFI_ENDPROC
940END(invalid_op)
911 941
912ENTRY(coprocessor_segment_overrun) 942ENTRY(coprocessor_segment_overrun)
913 RING0_INT_FRAME 943 RING0_INT_FRAME
@@ -917,6 +947,7 @@ ENTRY(coprocessor_segment_overrun)
917 CFI_ADJUST_CFA_OFFSET 4 947 CFI_ADJUST_CFA_OFFSET 4
918 jmp error_code 948 jmp error_code
919 CFI_ENDPROC 949 CFI_ENDPROC
950END(coprocessor_segment_overrun)
920 951
921ENTRY(invalid_TSS) 952ENTRY(invalid_TSS)
922 RING0_EC_FRAME 953 RING0_EC_FRAME
@@ -924,6 +955,7 @@ ENTRY(invalid_TSS)
924 CFI_ADJUST_CFA_OFFSET 4 955 CFI_ADJUST_CFA_OFFSET 4
925 jmp error_code 956 jmp error_code
926 CFI_ENDPROC 957 CFI_ENDPROC
958END(invalid_TSS)
927 959
928ENTRY(segment_not_present) 960ENTRY(segment_not_present)
929 RING0_EC_FRAME 961 RING0_EC_FRAME
@@ -931,6 +963,7 @@ ENTRY(segment_not_present)
931 CFI_ADJUST_CFA_OFFSET 4 963 CFI_ADJUST_CFA_OFFSET 4
932 jmp error_code 964 jmp error_code
933 CFI_ENDPROC 965 CFI_ENDPROC
966END(segment_not_present)
934 967
935ENTRY(stack_segment) 968ENTRY(stack_segment)
936 RING0_EC_FRAME 969 RING0_EC_FRAME
@@ -938,6 +971,7 @@ ENTRY(stack_segment)
938 CFI_ADJUST_CFA_OFFSET 4 971 CFI_ADJUST_CFA_OFFSET 4
939 jmp error_code 972 jmp error_code
940 CFI_ENDPROC 973 CFI_ENDPROC
974END(stack_segment)
941 975
942KPROBE_ENTRY(general_protection) 976KPROBE_ENTRY(general_protection)
943 RING0_EC_FRAME 977 RING0_EC_FRAME
@@ -953,6 +987,7 @@ ENTRY(alignment_check)
953 CFI_ADJUST_CFA_OFFSET 4 987 CFI_ADJUST_CFA_OFFSET 4
954 jmp error_code 988 jmp error_code
955 CFI_ENDPROC 989 CFI_ENDPROC
990END(alignment_check)
956 991
957ENTRY(divide_error) 992ENTRY(divide_error)
958 RING0_INT_FRAME 993 RING0_INT_FRAME
@@ -962,6 +997,7 @@ ENTRY(divide_error)
962 CFI_ADJUST_CFA_OFFSET 4 997 CFI_ADJUST_CFA_OFFSET 4
963 jmp error_code 998 jmp error_code
964 CFI_ENDPROC 999 CFI_ENDPROC
1000END(divide_error)
965 1001
966#ifdef CONFIG_X86_MCE 1002#ifdef CONFIG_X86_MCE
967ENTRY(machine_check) 1003ENTRY(machine_check)
@@ -972,6 +1008,7 @@ ENTRY(machine_check)
972 CFI_ADJUST_CFA_OFFSET 4 1008 CFI_ADJUST_CFA_OFFSET 4
973 jmp error_code 1009 jmp error_code
974 CFI_ENDPROC 1010 CFI_ENDPROC
1011END(machine_check)
975#endif 1012#endif
976 1013
977ENTRY(spurious_interrupt_bug) 1014ENTRY(spurious_interrupt_bug)
@@ -982,6 +1019,7 @@ ENTRY(spurious_interrupt_bug)
982 CFI_ADJUST_CFA_OFFSET 4 1019 CFI_ADJUST_CFA_OFFSET 4
983 jmp error_code 1020 jmp error_code
984 CFI_ENDPROC 1021 CFI_ENDPROC
1022END(spurious_interrupt_bug)
985 1023
986ENTRY(kernel_thread_helper) 1024ENTRY(kernel_thread_helper)
987 pushl $0 # fake return address for unwinder 1025 pushl $0 # fake return address for unwinder
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index edef5084ce17..3fa7f9389afe 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -53,6 +53,7 @@
53 * any particular GDT layout, because we load our own as soon as we 53 * any particular GDT layout, because we load our own as soon as we
54 * can. 54 * can.
55 */ 55 */
56.section .text.head,"ax",@progbits
56ENTRY(startup_32) 57ENTRY(startup_32)
57 58
58#ifdef CONFIG_PARAVIRT 59#ifdef CONFIG_PARAVIRT
@@ -103,7 +104,7 @@ ENTRY(startup_32)
103 movzwl OLD_CL_OFFSET,%esi 104 movzwl OLD_CL_OFFSET,%esi
104 addl $(OLD_CL_BASE_ADDR),%esi 105 addl $(OLD_CL_BASE_ADDR),%esi
1052: 1062:
106 movl $(saved_command_line - __PAGE_OFFSET),%edi 107 movl $(boot_command_line - __PAGE_OFFSET),%edi
107 movl $(COMMAND_LINE_SIZE/4),%ecx 108 movl $(COMMAND_LINE_SIZE/4),%ecx
108 rep 109 rep
109 movsl 110 movsl
@@ -141,16 +142,25 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
141 jb 10b 142 jb 10b
142 movl %edi,(init_pg_tables_end - __PAGE_OFFSET) 143 movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
143 144
144#ifdef CONFIG_SMP
145 xorl %ebx,%ebx /* This is the boot CPU (BSP) */ 145 xorl %ebx,%ebx /* This is the boot CPU (BSP) */
146 jmp 3f 146 jmp 3f
147
148/* 147/*
149 * Non-boot CPU entry point; entered from trampoline.S 148 * Non-boot CPU entry point; entered from trampoline.S
150 * We can't lgdt here, because lgdt itself uses a data segment, but 149 * We can't lgdt here, because lgdt itself uses a data segment, but
151 * we know the trampoline has already loaded the boot_gdt_table GDT 150 * we know the trampoline has already loaded the boot_gdt_table GDT
152 * for us. 151 * for us.
152 *
153 * If cpu hotplug is not supported then this code can go in init section
154 * which will be freed later
153 */ 155 */
156
157#ifdef CONFIG_HOTPLUG_CPU
158.section .text,"ax",@progbits
159#else
160.section .init.text,"ax",@progbits
161#endif
162
163#ifdef CONFIG_SMP
154ENTRY(startup_32_smp) 164ENTRY(startup_32_smp)
155 cld 165 cld
156 movl $(__BOOT_DS),%eax 166 movl $(__BOOT_DS),%eax
@@ -208,8 +218,8 @@ ENTRY(startup_32_smp)
208 xorl %ebx,%ebx 218 xorl %ebx,%ebx
209 incl %ebx 219 incl %ebx
210 220
2113:
212#endif /* CONFIG_SMP */ 221#endif /* CONFIG_SMP */
2223:
213 223
214/* 224/*
215 * Enable paging 225 * Enable paging
@@ -309,7 +319,7 @@ is386: movl $2,%ecx # set MP
309 319
310 call check_x87 320 call check_x87
311 call setup_pda 321 call setup_pda
312 lgdt cpu_gdt_descr 322 lgdt early_gdt_descr
313 lidt idt_descr 323 lidt idt_descr
314 ljmp $(__KERNEL_CS),$1f 324 ljmp $(__KERNEL_CS),$1f
3151: movl $(__KERNEL_DS),%eax # reload all the segment registers 3251: movl $(__KERNEL_DS),%eax # reload all the segment registers
@@ -319,12 +329,12 @@ is386: movl $2,%ecx # set MP
319 movl %eax,%ds 329 movl %eax,%ds
320 movl %eax,%es 330 movl %eax,%es
321 331
322 xorl %eax,%eax # Clear FS and LDT 332 xorl %eax,%eax # Clear GS and LDT
323 movl %eax,%fs 333 movl %eax,%gs
324 lldt %ax 334 lldt %ax
325 335
326 movl $(__KERNEL_PDA),%eax 336 movl $(__KERNEL_PDA),%eax
327 mov %eax,%gs 337 mov %eax,%fs
328 338
329 cld # gcc2 wants the direction flag cleared at all times 339 cld # gcc2 wants the direction flag cleared at all times
330 pushl $0 # fake return address for unwinder 340 pushl $0 # fake return address for unwinder
@@ -360,12 +370,12 @@ check_x87:
360 * cpu_gdt_table and boot_pda; for secondary CPUs, these will be 370 * cpu_gdt_table and boot_pda; for secondary CPUs, these will be
361 * that CPU's GDT and PDA. 371 * that CPU's GDT and PDA.
362 */ 372 */
363setup_pda: 373ENTRY(setup_pda)
364 /* get the PDA pointer */ 374 /* get the PDA pointer */
365 movl start_pda, %eax 375 movl start_pda, %eax
366 376
367 /* slot the PDA address into the GDT */ 377 /* slot the PDA address into the GDT */
368 mov cpu_gdt_descr+2, %ecx 378 mov early_gdt_descr+2, %ecx
369 mov %ax, (__KERNEL_PDA+0+2)(%ecx) /* base & 0x0000ffff */ 379 mov %ax, (__KERNEL_PDA+0+2)(%ecx) /* base & 0x0000ffff */
370 shr $16, %eax 380 shr $16, %eax
371 mov %al, (__KERNEL_PDA+4+0)(%ecx) /* base & 0x00ff0000 */ 381 mov %al, (__KERNEL_PDA+4+0)(%ecx) /* base & 0x00ff0000 */
@@ -492,6 +502,7 @@ ignore_int:
492#endif 502#endif
493 iret 503 iret
494 504
505.section .text
495#ifdef CONFIG_PARAVIRT 506#ifdef CONFIG_PARAVIRT
496startup_paravirt: 507startup_paravirt:
497 cld 508 cld
@@ -502,10 +513,11 @@ startup_paravirt:
502 pushl %ecx 513 pushl %ecx
503 pushl %eax 514 pushl %eax
504 515
505 /* paravirt.o is last in link, and that probe fn never returns */
506 pushl $__start_paravirtprobe 516 pushl $__start_paravirtprobe
5071: 5171:
508 movl 0(%esp), %eax 518 movl 0(%esp), %eax
519 cmpl $__stop_paravirtprobe, %eax
520 je unhandled_paravirt
509 pushl (%eax) 521 pushl (%eax)
510 movl 8(%esp), %eax 522 movl 8(%esp), %eax
511 call *(%esp) 523 call *(%esp)
@@ -517,6 +529,10 @@ startup_paravirt:
517 529
518 addl $4, (%esp) 530 addl $4, (%esp)
519 jmp 1b 531 jmp 1b
532
533unhandled_paravirt:
534 /* Nothing wanted us: we're screwed. */
535 ud2
520#endif 536#endif
521 537
522/* 538/*
@@ -581,7 +597,7 @@ idt_descr:
581 597
582# boot GDT descriptor (later on used by CPU#0): 598# boot GDT descriptor (later on used by CPU#0):
583 .word 0 # 32 bit align gdt_desc.address 599 .word 0 # 32 bit align gdt_desc.address
584ENTRY(cpu_gdt_descr) 600ENTRY(early_gdt_descr)
585 .word GDT_ENTRIES*8-1 601 .word GDT_ENTRIES*8-1
586 .long cpu_gdt_table 602 .long cpu_gdt_table
587 603
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index 45a8685bb60b..e1006b7acc9e 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -1,4 +1,5 @@
1#include <linux/clocksource.h> 1#include <linux/clocksource.h>
2#include <linux/clockchips.h>
2#include <linux/errno.h> 3#include <linux/errno.h>
3#include <linux/hpet.h> 4#include <linux/hpet.h>
4#include <linux/init.h> 5#include <linux/init.h>
@@ -6,17 +7,278 @@
6#include <asm/hpet.h> 7#include <asm/hpet.h>
7#include <asm/io.h> 8#include <asm/io.h>
8 9
10extern struct clock_event_device *global_clock_event;
11
9#define HPET_MASK CLOCKSOURCE_MASK(32) 12#define HPET_MASK CLOCKSOURCE_MASK(32)
10#define HPET_SHIFT 22 13#define HPET_SHIFT 22
11 14
12/* FSEC = 10^-15 NSEC = 10^-9 */ 15/* FSEC = 10^-15 NSEC = 10^-9 */
13#define FSEC_PER_NSEC 1000000 16#define FSEC_PER_NSEC 1000000
14 17
15static void *hpet_ptr; 18/*
19 * HPET address is set in acpi/boot.c, when an ACPI entry exists
20 */
21unsigned long hpet_address;
22static void __iomem * hpet_virt_address;
23
24static inline unsigned long hpet_readl(unsigned long a)
25{
26 return readl(hpet_virt_address + a);
27}
28
29static inline void hpet_writel(unsigned long d, unsigned long a)
30{
31 writel(d, hpet_virt_address + a);
32}
33
34/*
35 * HPET command line enable / disable
36 */
37static int boot_hpet_disable;
38
39static int __init hpet_setup(char* str)
40{
41 if (str) {
42 if (!strncmp("disable", str, 7))
43 boot_hpet_disable = 1;
44 }
45 return 1;
46}
47__setup("hpet=", hpet_setup);
48
49static inline int is_hpet_capable(void)
50{
51 return (!boot_hpet_disable && hpet_address);
52}
53
54/*
55 * HPET timer interrupt enable / disable
56 */
57static int hpet_legacy_int_enabled;
58
59/**
60 * is_hpet_enabled - check whether the hpet timer interrupt is enabled
61 */
62int is_hpet_enabled(void)
63{
64 return is_hpet_capable() && hpet_legacy_int_enabled;
65}
66
67/*
68 * When the hpet driver (/dev/hpet) is enabled, we need to reserve
69 * timer 0 and timer 1 in case of RTC emulation.
70 */
71#ifdef CONFIG_HPET
72static void hpet_reserve_platform_timers(unsigned long id)
73{
74 struct hpet __iomem *hpet = hpet_virt_address;
75 struct hpet_timer __iomem *timer = &hpet->hpet_timers[2];
76 unsigned int nrtimers, i;
77 struct hpet_data hd;
78
79 nrtimers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT) + 1;
80
81 memset(&hd, 0, sizeof (hd));
82 hd.hd_phys_address = hpet_address;
83 hd.hd_address = hpet_virt_address;
84 hd.hd_nirqs = nrtimers;
85 hd.hd_flags = HPET_DATA_PLATFORM;
86 hpet_reserve_timer(&hd, 0);
87
88#ifdef CONFIG_HPET_EMULATE_RTC
89 hpet_reserve_timer(&hd, 1);
90#endif
91
92 hd.hd_irq[0] = HPET_LEGACY_8254;
93 hd.hd_irq[1] = HPET_LEGACY_RTC;
94
95 for (i = 2; i < nrtimers; timer++, i++)
96 hd.hd_irq[i] = (timer->hpet_config & Tn_INT_ROUTE_CNF_MASK) >>
97 Tn_INT_ROUTE_CNF_SHIFT;
98
99 hpet_alloc(&hd);
100
101}
102#else
103static void hpet_reserve_platform_timers(unsigned long id) { }
104#endif
105
106/*
107 * Common hpet info
108 */
109static unsigned long hpet_period;
110
111static void hpet_set_mode(enum clock_event_mode mode,
112 struct clock_event_device *evt);
113static int hpet_next_event(unsigned long delta,
114 struct clock_event_device *evt);
115
116/*
117 * The hpet clock event device
118 */
119static struct clock_event_device hpet_clockevent = {
120 .name = "hpet",
121 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
122 .set_mode = hpet_set_mode,
123 .set_next_event = hpet_next_event,
124 .shift = 32,
125 .irq = 0,
126};
127
128static void hpet_start_counter(void)
129{
130 unsigned long cfg = hpet_readl(HPET_CFG);
131
132 cfg &= ~HPET_CFG_ENABLE;
133 hpet_writel(cfg, HPET_CFG);
134 hpet_writel(0, HPET_COUNTER);
135 hpet_writel(0, HPET_COUNTER + 4);
136 cfg |= HPET_CFG_ENABLE;
137 hpet_writel(cfg, HPET_CFG);
138}
139
140static void hpet_enable_int(void)
141{
142 unsigned long cfg = hpet_readl(HPET_CFG);
143
144 cfg |= HPET_CFG_LEGACY;
145 hpet_writel(cfg, HPET_CFG);
146 hpet_legacy_int_enabled = 1;
147}
148
149static void hpet_set_mode(enum clock_event_mode mode,
150 struct clock_event_device *evt)
151{
152 unsigned long cfg, cmp, now;
153 uint64_t delta;
154
155 switch(mode) {
156 case CLOCK_EVT_MODE_PERIODIC:
157 delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;
158 delta >>= hpet_clockevent.shift;
159 now = hpet_readl(HPET_COUNTER);
160 cmp = now + (unsigned long) delta;
161 cfg = hpet_readl(HPET_T0_CFG);
162 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
163 HPET_TN_SETVAL | HPET_TN_32BIT;
164 hpet_writel(cfg, HPET_T0_CFG);
165 /*
166 * The first write after writing TN_SETVAL to the
167 * config register sets the counter value, the second
168 * write sets the period.
169 */
170 hpet_writel(cmp, HPET_T0_CMP);
171 udelay(1);
172 hpet_writel((unsigned long) delta, HPET_T0_CMP);
173 break;
174
175 case CLOCK_EVT_MODE_ONESHOT:
176 cfg = hpet_readl(HPET_T0_CFG);
177 cfg &= ~HPET_TN_PERIODIC;
178 cfg |= HPET_TN_ENABLE | HPET_TN_32BIT;
179 hpet_writel(cfg, HPET_T0_CFG);
180 break;
181
182 case CLOCK_EVT_MODE_UNUSED:
183 case CLOCK_EVT_MODE_SHUTDOWN:
184 cfg = hpet_readl(HPET_T0_CFG);
185 cfg &= ~HPET_TN_ENABLE;
186 hpet_writel(cfg, HPET_T0_CFG);
187 break;
188 }
189}
190
191static int hpet_next_event(unsigned long delta,
192 struct clock_event_device *evt)
193{
194 unsigned long cnt;
195
196 cnt = hpet_readl(HPET_COUNTER);
197 cnt += delta;
198 hpet_writel(cnt, HPET_T0_CMP);
199
200 return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
201}
202
203/*
204 * Try to setup the HPET timer
205 */
206int __init hpet_enable(void)
207{
208 unsigned long id;
209 uint64_t hpet_freq;
210
211 if (!is_hpet_capable())
212 return 0;
213
214 hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
215
216 /*
217 * Read the period and check for a sane value:
218 */
219 hpet_period = hpet_readl(HPET_PERIOD);
220 if (hpet_period < HPET_MIN_PERIOD || hpet_period > HPET_MAX_PERIOD)
221 goto out_nohpet;
222
223 /*
224 * The period is a femto seconds value. We need to calculate the
225 * scaled math multiplication factor for nanosecond to hpet tick
226 * conversion.
227 */
228 hpet_freq = 1000000000000000ULL;
229 do_div(hpet_freq, hpet_period);
230 hpet_clockevent.mult = div_sc((unsigned long) hpet_freq,
231 NSEC_PER_SEC, 32);
232 /* Calculate the min / max delta */
233 hpet_clockevent.max_delta_ns = clockevent_delta2ns(0x7FFFFFFF,
234 &hpet_clockevent);
235 hpet_clockevent.min_delta_ns = clockevent_delta2ns(0x30,
236 &hpet_clockevent);
237
238 /*
239 * Read the HPET ID register to retrieve the IRQ routing
240 * information and the number of channels
241 */
242 id = hpet_readl(HPET_ID);
243
244#ifdef CONFIG_HPET_EMULATE_RTC
245 /*
246 * The legacy routing mode needs at least two channels, tick timer
247 * and the rtc emulation channel.
248 */
249 if (!(id & HPET_ID_NUMBER))
250 goto out_nohpet;
251#endif
252
253 /* Start the counter */
254 hpet_start_counter();
255
256 if (id & HPET_ID_LEGSUP) {
257 hpet_enable_int();
258 hpet_reserve_platform_timers(id);
259 /*
260 * Start hpet with the boot cpu mask and make it
261 * global after the IO_APIC has been initialized.
262 */
263 hpet_clockevent.cpumask =cpumask_of_cpu(0);
264 clockevents_register_device(&hpet_clockevent);
265 global_clock_event = &hpet_clockevent;
266 return 1;
267 }
268 return 0;
16 269
270out_nohpet:
271 iounmap(hpet_virt_address);
272 hpet_virt_address = NULL;
273 return 0;
274}
275
276/*
277 * Clock source related code
278 */
17static cycle_t read_hpet(void) 279static cycle_t read_hpet(void)
18{ 280{
19 return (cycle_t)readl(hpet_ptr); 281 return (cycle_t)hpet_readl(HPET_COUNTER);
20} 282}
21 283
22static struct clocksource clocksource_hpet = { 284static struct clocksource clocksource_hpet = {
@@ -24,29 +286,17 @@ static struct clocksource clocksource_hpet = {
24 .rating = 250, 286 .rating = 250,
25 .read = read_hpet, 287 .read = read_hpet,
26 .mask = HPET_MASK, 288 .mask = HPET_MASK,
27 .mult = 0, /* set below */
28 .shift = HPET_SHIFT, 289 .shift = HPET_SHIFT,
29 .is_continuous = 1, 290 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
30}; 291};
31 292
32static int __init init_hpet_clocksource(void) 293static int __init init_hpet_clocksource(void)
33{ 294{
34 unsigned long hpet_period;
35 void __iomem* hpet_base;
36 u64 tmp; 295 u64 tmp;
37 int err;
38 296
39 if (!is_hpet_enabled()) 297 if (!hpet_virt_address)
40 return -ENODEV; 298 return -ENODEV;
41 299
42 /* calculate the hpet address: */
43 hpet_base =
44 (void __iomem*)ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
45 hpet_ptr = hpet_base + HPET_COUNTER;
46
47 /* calculate the frequency: */
48 hpet_period = readl(hpet_base + HPET_PERIOD);
49
50 /* 300 /*
51 * hpet period is in femto seconds per cycle 301 * hpet period is in femto seconds per cycle
52 * so we need to convert this to ns/cyc units 302 * so we need to convert this to ns/cyc units
@@ -62,11 +312,218 @@ static int __init init_hpet_clocksource(void)
62 do_div(tmp, FSEC_PER_NSEC); 312 do_div(tmp, FSEC_PER_NSEC);
63 clocksource_hpet.mult = (u32)tmp; 313 clocksource_hpet.mult = (u32)tmp;
64 314
65 err = clocksource_register(&clocksource_hpet); 315 return clocksource_register(&clocksource_hpet);
66 if (err)
67 iounmap(hpet_base);
68
69 return err;
70} 316}
71 317
72module_init(init_hpet_clocksource); 318module_init(init_hpet_clocksource);
319
320#ifdef CONFIG_HPET_EMULATE_RTC
321
322/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
323 * is enabled, we support RTC interrupt functionality in software.
324 * RTC has 3 kinds of interrupts:
325 * 1) Update Interrupt - generate an interrupt, every sec, when RTC clock
326 * is updated
327 * 2) Alarm Interrupt - generate an interrupt at a specific time of day
328 * 3) Periodic Interrupt - generate periodic interrupt, with frequencies
329 * 2Hz-8192Hz (2Hz-64Hz for non-root user) (all freqs in powers of 2)
330 * (1) and (2) above are implemented using polling at a frequency of
331 * 64 Hz. The exact frequency is a tradeoff between accuracy and interrupt
332 * overhead. (DEFAULT_RTC_INT_FREQ)
333 * For (3), we use interrupts at 64Hz or user specified periodic
334 * frequency, whichever is higher.
335 */
336#include <linux/mc146818rtc.h>
337#include <linux/rtc.h>
338
339#define DEFAULT_RTC_INT_FREQ 64
340#define DEFAULT_RTC_SHIFT 6
341#define RTC_NUM_INTS 1
342
343static unsigned long hpet_rtc_flags;
344static unsigned long hpet_prev_update_sec;
345static struct rtc_time hpet_alarm_time;
346static unsigned long hpet_pie_count;
347static unsigned long hpet_t1_cmp;
348static unsigned long hpet_default_delta;
349static unsigned long hpet_pie_delta;
350static unsigned long hpet_pie_limit;
351
352/*
353 * Timer 1 for RTC emulation. We use one shot mode, as periodic mode
354 * is not supported by all HPET implementations for timer 1.
355 *
356 * hpet_rtc_timer_init() is called when the rtc is initialized.
357 */
358int hpet_rtc_timer_init(void)
359{
360 unsigned long cfg, cnt, delta, flags;
361
362 if (!is_hpet_enabled())
363 return 0;
364
365 if (!hpet_default_delta) {
366 uint64_t clc;
367
368 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC;
369 clc >>= hpet_clockevent.shift + DEFAULT_RTC_SHIFT;
370 hpet_default_delta = (unsigned long) clc;
371 }
372
373 if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit)
374 delta = hpet_default_delta;
375 else
376 delta = hpet_pie_delta;
377
378 local_irq_save(flags);
379
380 cnt = delta + hpet_readl(HPET_COUNTER);
381 hpet_writel(cnt, HPET_T1_CMP);
382 hpet_t1_cmp = cnt;
383
384 cfg = hpet_readl(HPET_T1_CFG);
385 cfg &= ~HPET_TN_PERIODIC;
386 cfg |= HPET_TN_ENABLE | HPET_TN_32BIT;
387 hpet_writel(cfg, HPET_T1_CFG);
388
389 local_irq_restore(flags);
390
391 return 1;
392}
393
394/*
395 * The functions below are called from rtc driver.
396 * Return 0 if HPET is not being used.
397 * Otherwise do the necessary changes and return 1.
398 */
399int hpet_mask_rtc_irq_bit(unsigned long bit_mask)
400{
401 if (!is_hpet_enabled())
402 return 0;
403
404 hpet_rtc_flags &= ~bit_mask;
405 return 1;
406}
407
408int hpet_set_rtc_irq_bit(unsigned long bit_mask)
409{
410 unsigned long oldbits = hpet_rtc_flags;
411
412 if (!is_hpet_enabled())
413 return 0;
414
415 hpet_rtc_flags |= bit_mask;
416
417 if (!oldbits)
418 hpet_rtc_timer_init();
419
420 return 1;
421}
422
423int hpet_set_alarm_time(unsigned char hrs, unsigned char min,
424 unsigned char sec)
425{
426 if (!is_hpet_enabled())
427 return 0;
428
429 hpet_alarm_time.tm_hour = hrs;
430 hpet_alarm_time.tm_min = min;
431 hpet_alarm_time.tm_sec = sec;
432
433 return 1;
434}
435
436int hpet_set_periodic_freq(unsigned long freq)
437{
438 uint64_t clc;
439
440 if (!is_hpet_enabled())
441 return 0;
442
443 if (freq <= DEFAULT_RTC_INT_FREQ)
444 hpet_pie_limit = DEFAULT_RTC_INT_FREQ / freq;
445 else {
446 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC;
447 do_div(clc, freq);
448 clc >>= hpet_clockevent.shift;
449 hpet_pie_delta = (unsigned long) clc;
450 }
451 return 1;
452}
453
454int hpet_rtc_dropped_irq(void)
455{
456 return is_hpet_enabled();
457}
458
459static void hpet_rtc_timer_reinit(void)
460{
461 unsigned long cfg, delta;
462 int lost_ints = -1;
463
464 if (unlikely(!hpet_rtc_flags)) {
465 cfg = hpet_readl(HPET_T1_CFG);
466 cfg &= ~HPET_TN_ENABLE;
467 hpet_writel(cfg, HPET_T1_CFG);
468 return;
469 }
470
471 if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit)
472 delta = hpet_default_delta;
473 else
474 delta = hpet_pie_delta;
475
476 /*
477 * Increment the comparator value until we are ahead of the
478 * current count.
479 */
480 do {
481 hpet_t1_cmp += delta;
482 hpet_writel(hpet_t1_cmp, HPET_T1_CMP);
483 lost_ints++;
484 } while ((long)(hpet_readl(HPET_COUNTER) - hpet_t1_cmp) > 0);
485
486 if (lost_ints) {
487 if (hpet_rtc_flags & RTC_PIE)
488 hpet_pie_count += lost_ints;
489 if (printk_ratelimit())
490 printk(KERN_WARNING "rtc: lost %d interrupts\n",
491 lost_ints);
492 }
493}
494
495irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
496{
497 struct rtc_time curr_time;
498 unsigned long rtc_int_flag = 0;
499
500 hpet_rtc_timer_reinit();
501
502 if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
503 rtc_get_rtc_time(&curr_time);
504
505 if (hpet_rtc_flags & RTC_UIE &&
506 curr_time.tm_sec != hpet_prev_update_sec) {
507 rtc_int_flag = RTC_UF;
508 hpet_prev_update_sec = curr_time.tm_sec;
509 }
510
511 if (hpet_rtc_flags & RTC_PIE &&
512 ++hpet_pie_count >= hpet_pie_limit) {
513 rtc_int_flag |= RTC_PF;
514 hpet_pie_count = 0;
515 }
516
517 if (hpet_rtc_flags & RTC_PIE &&
518 (curr_time.tm_sec == hpet_alarm_time.tm_sec) &&
519 (curr_time.tm_min == hpet_alarm_time.tm_min) &&
520 (curr_time.tm_hour == hpet_alarm_time.tm_hour))
521 rtc_int_flag |= RTC_AF;
522
523 if (rtc_int_flag) {
524 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
525 rtc_interrupt(rtc_int_flag, dev_id);
526 }
527 return IRQ_HANDLED;
528}
529#endif
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index 9a0060b92e32..a6bc7bb38834 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -2,7 +2,7 @@
2 * i8253.c 8253/PIT functions 2 * i8253.c 8253/PIT functions
3 * 3 *
4 */ 4 */
5#include <linux/clocksource.h> 5#include <linux/clockchips.h>
6#include <linux/spinlock.h> 6#include <linux/spinlock.h>
7#include <linux/jiffies.h> 7#include <linux/jiffies.h>
8#include <linux/sysdev.h> 8#include <linux/sysdev.h>
@@ -19,17 +19,97 @@
19DEFINE_SPINLOCK(i8253_lock); 19DEFINE_SPINLOCK(i8253_lock);
20EXPORT_SYMBOL(i8253_lock); 20EXPORT_SYMBOL(i8253_lock);
21 21
22void setup_pit_timer(void) 22/*
23 * HPET replaces the PIT, when enabled. So we need to know, which of
24 * the two timers is used
25 */
26struct clock_event_device *global_clock_event;
27
28/*
29 * Initialize the PIT timer.
30 *
31 * This is also called after resume to bring the PIT into operation again.
32 */
33static void init_pit_timer(enum clock_event_mode mode,
34 struct clock_event_device *evt)
35{
36 unsigned long flags;
37
38 spin_lock_irqsave(&i8253_lock, flags);
39
40 switch(mode) {
41 case CLOCK_EVT_MODE_PERIODIC:
42 /* binary, mode 2, LSB/MSB, ch 0 */
43 outb_p(0x34, PIT_MODE);
44 udelay(10);
45 outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
46 udelay(10);
47 outb(LATCH >> 8 , PIT_CH0); /* MSB */
48 break;
49
50 case CLOCK_EVT_MODE_ONESHOT:
51 case CLOCK_EVT_MODE_SHUTDOWN:
52 case CLOCK_EVT_MODE_UNUSED:
53 /* One shot setup */
54 outb_p(0x38, PIT_MODE);
55 udelay(10);
56 break;
57 }
58 spin_unlock_irqrestore(&i8253_lock, flags);
59}
60
61/*
62 * Program the next event in oneshot mode
63 *
64 * Delta is given in PIT ticks
65 */
66static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
23{ 67{
24 unsigned long flags; 68 unsigned long flags;
25 69
26 spin_lock_irqsave(&i8253_lock, flags); 70 spin_lock_irqsave(&i8253_lock, flags);
27 outb_p(0x34,PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ 71 outb_p(delta & 0xff , PIT_CH0); /* LSB */
28 udelay(10); 72 outb(delta >> 8 , PIT_CH0); /* MSB */
29 outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
30 udelay(10);
31 outb(LATCH >> 8 , PIT_CH0); /* MSB */
32 spin_unlock_irqrestore(&i8253_lock, flags); 73 spin_unlock_irqrestore(&i8253_lock, flags);
74
75 return 0;
76}
77
78/*
79 * On UP the PIT can serve all of the possible timer functions. On SMP systems
80 * it can be solely used for the global tick.
81 *
82 * The profiling and update capabilites are switched off once the local apic is
83 * registered. This mechanism replaces the previous #ifdef LOCAL_APIC -
84 * !using_apic_timer decisions in do_timer_interrupt_hook()
85 */
86struct clock_event_device pit_clockevent = {
87 .name = "pit",
88 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
89 .set_mode = init_pit_timer,
90 .set_next_event = pit_next_event,
91 .shift = 32,
92 .irq = 0,
93};
94
95/*
96 * Initialize the conversion factor and the min/max deltas of the clock event
97 * structure and register the clock event source with the framework.
98 */
99void __init setup_pit_timer(void)
100{
101 /*
102 * Start pit with the boot cpu mask and make it global after the
103 * IO_APIC has been initialized.
104 */
105 pit_clockevent.cpumask = cpumask_of_cpu(0);
106 pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32);
107 pit_clockevent.max_delta_ns =
108 clockevent_delta2ns(0x7FFF, &pit_clockevent);
109 pit_clockevent.min_delta_ns =
110 clockevent_delta2ns(0xF, &pit_clockevent);
111 clockevents_register_device(&pit_clockevent);
112 global_clock_event = &pit_clockevent;
33} 113}
34 114
35/* 115/*
@@ -46,7 +126,7 @@ static cycle_t pit_read(void)
46 static u32 old_jifs; 126 static u32 old_jifs;
47 127
48 spin_lock_irqsave(&i8253_lock, flags); 128 spin_lock_irqsave(&i8253_lock, flags);
49 /* 129 /*
50 * Although our caller may have the read side of xtime_lock, 130 * Although our caller may have the read side of xtime_lock,
51 * this is now a seqlock, and we are cheating in this routine 131 * this is now a seqlock, and we are cheating in this routine
52 * by having side effects on state that we cannot undo if 132 * by having side effects on state that we cannot undo if
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
index c8d45821c788..03abfdb1a6e4 100644
--- a/arch/i386/kernel/i8259.c
+++ b/arch/i386/kernel/i8259.c
@@ -41,6 +41,7 @@ static void mask_and_ack_8259A(unsigned int);
41static struct irq_chip i8259A_chip = { 41static struct irq_chip i8259A_chip = {
42 .name = "XT-PIC", 42 .name = "XT-PIC",
43 .mask = disable_8259A_irq, 43 .mask = disable_8259A_irq,
44 .disable = disable_8259A_irq,
44 .unmask = enable_8259A_irq, 45 .unmask = enable_8259A_irq,
45 .mask_ack = mask_and_ack_8259A, 46 .mask_ack = mask_and_ack_8259A,
46}; 47};
@@ -410,12 +411,6 @@ void __init native_init_IRQ(void)
410 intr_init_hook(); 411 intr_init_hook();
411 412
412 /* 413 /*
413 * Set the clock to HZ Hz, we already have a valid
414 * vector now:
415 */
416 setup_pit_timer();
417
418 /*
419 * External FPU? Set up irq13 if so, for 414 * External FPU? Set up irq13 if so, for
420 * original braindamaged IBM FERR coupling. 415 * original braindamaged IBM FERR coupling.
421 */ 416 */
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 6a3875f81a0a..6fec4dab70bb 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -126,7 +126,7 @@ static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned i
126 */ 126 */
127static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value) 127static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
128{ 128{
129 volatile struct io_apic *io_apic = io_apic_base(apic); 129 volatile struct io_apic __iomem *io_apic = io_apic_base(apic);
130 if (sis_apic_bug) 130 if (sis_apic_bug)
131 writel(reg, &io_apic->index); 131 writel(reg, &io_apic->index);
132 writel(value, &io_apic->data); 132 writel(value, &io_apic->data);
@@ -343,7 +343,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
343 break; 343 break;
344 entry = irq_2_pin + entry->next; 344 entry = irq_2_pin + entry->next;
345 } 345 }
346 set_native_irq_info(irq, cpumask); 346 irq_desc[irq].affinity = cpumask;
347 spin_unlock_irqrestore(&ioapic_lock, flags); 347 spin_unlock_irqrestore(&ioapic_lock, flags);
348} 348}
349 349
@@ -482,8 +482,8 @@ static void do_irq_balance(void)
482 package_index = CPU_TO_PACKAGEINDEX(i); 482 package_index = CPU_TO_PACKAGEINDEX(i);
483 for (j = 0; j < NR_IRQS; j++) { 483 for (j = 0; j < NR_IRQS; j++) {
484 unsigned long value_now, delta; 484 unsigned long value_now, delta;
485 /* Is this an active IRQ? */ 485 /* Is this an active IRQ or balancing disabled ? */
486 if (!irq_desc[j].action) 486 if (!irq_desc[j].action || irq_balancing_disabled(j))
487 continue; 487 continue;
488 if ( package_index == i ) 488 if ( package_index == i )
489 IRQ_DELTA(package_index,j) = 0; 489 IRQ_DELTA(package_index,j) = 0;
@@ -1281,11 +1281,9 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
1281 trigger == IOAPIC_LEVEL) 1281 trigger == IOAPIC_LEVEL)
1282 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1282 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1283 handle_fasteoi_irq, "fasteoi"); 1283 handle_fasteoi_irq, "fasteoi");
1284 else { 1284 else
1285 irq_desc[irq].status |= IRQ_DELAYED_DISABLE;
1286 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1285 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1287 handle_edge_irq, "edge"); 1286 handle_edge_irq, "edge");
1288 }
1289 set_intr_gate(vector, interrupt[irq]); 1287 set_intr_gate(vector, interrupt[irq]);
1290} 1288}
1291 1289
@@ -1356,7 +1354,7 @@ static void __init setup_IO_APIC_irqs(void)
1356 } 1354 }
1357 spin_lock_irqsave(&ioapic_lock, flags); 1355 spin_lock_irqsave(&ioapic_lock, flags);
1358 __ioapic_write_entry(apic, pin, entry); 1356 __ioapic_write_entry(apic, pin, entry);
1359 set_native_irq_info(irq, TARGET_CPUS); 1357 irq_desc[irq].affinity = TARGET_CPUS;
1360 spin_unlock_irqrestore(&ioapic_lock, flags); 1358 spin_unlock_irqrestore(&ioapic_lock, flags);
1361 } 1359 }
1362 } 1360 }
@@ -1588,7 +1586,7 @@ void /*__init*/ print_local_APIC(void * dummy)
1588 v = apic_read(APIC_LVR); 1586 v = apic_read(APIC_LVR);
1589 printk(KERN_INFO "... APIC VERSION: %08x\n", v); 1587 printk(KERN_INFO "... APIC VERSION: %08x\n", v);
1590 ver = GET_APIC_VERSION(v); 1588 ver = GET_APIC_VERSION(v);
1591 maxlvt = get_maxlvt(); 1589 maxlvt = lapic_get_maxlvt();
1592 1590
1593 v = apic_read(APIC_TASKPRI); 1591 v = apic_read(APIC_TASKPRI);
1594 printk(KERN_DEBUG "... APIC TASKPRI: %08x (%02x)\n", v, v & APIC_TPRI_MASK); 1592 printk(KERN_DEBUG "... APIC TASKPRI: %08x (%02x)\n", v, v & APIC_TPRI_MASK);
@@ -1920,7 +1918,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
1920static void __init setup_ioapic_ids_from_mpc(void) { } 1918static void __init setup_ioapic_ids_from_mpc(void) { }
1921#endif 1919#endif
1922 1920
1923static int no_timer_check __initdata; 1921int no_timer_check __initdata;
1924 1922
1925static int __init notimercheck(char *s) 1923static int __init notimercheck(char *s)
1926{ 1924{
@@ -2310,7 +2308,7 @@ static inline void __init check_timer(void)
2310 2308
2311 disable_8259A_irq(0); 2309 disable_8259A_irq(0);
2312 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq, 2310 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq,
2313 "fasteio"); 2311 "fasteoi");
2314 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ 2312 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
2315 enable_8259A_irq(0); 2313 enable_8259A_irq(0);
2316 2314
@@ -2587,7 +2585,7 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
2587 msg.address_lo |= MSI_ADDR_DEST_ID(dest); 2585 msg.address_lo |= MSI_ADDR_DEST_ID(dest);
2588 2586
2589 write_msi_msg(irq, &msg); 2587 write_msi_msg(irq, &msg);
2590 set_native_irq_info(irq, mask); 2588 irq_desc[irq].affinity = mask;
2591} 2589}
2592#endif /* CONFIG_SMP */ 2590#endif /* CONFIG_SMP */
2593 2591
@@ -2606,25 +2604,32 @@ static struct irq_chip msi_chip = {
2606 .retrigger = ioapic_retrigger_irq, 2604 .retrigger = ioapic_retrigger_irq,
2607}; 2605};
2608 2606
2609int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev) 2607int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
2610{ 2608{
2611 struct msi_msg msg; 2609 struct msi_msg msg;
2612 int ret; 2610 int irq, ret;
2611 irq = create_irq();
2612 if (irq < 0)
2613 return irq;
2614
2615 set_irq_msi(irq, desc);
2613 ret = msi_compose_msg(dev, irq, &msg); 2616 ret = msi_compose_msg(dev, irq, &msg);
2614 if (ret < 0) 2617 if (ret < 0) {
2618 destroy_irq(irq);
2615 return ret; 2619 return ret;
2620 }
2616 2621
2617 write_msi_msg(irq, &msg); 2622 write_msi_msg(irq, &msg);
2618 2623
2619 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, 2624 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq,
2620 "edge"); 2625 "edge");
2621 2626
2622 return 0; 2627 return irq;
2623} 2628}
2624 2629
2625void arch_teardown_msi_irq(unsigned int irq) 2630void arch_teardown_msi_irq(unsigned int irq)
2626{ 2631{
2627 return; 2632 destroy_irq(irq);
2628} 2633}
2629 2634
2630#endif /* CONFIG_PCI_MSI */ 2635#endif /* CONFIG_PCI_MSI */
@@ -2664,7 +2669,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
2664 dest = cpu_mask_to_apicid(mask); 2669 dest = cpu_mask_to_apicid(mask);
2665 2670
2666 target_ht_irq(irq, dest); 2671 target_ht_irq(irq, dest);
2667 set_native_irq_info(irq, mask); 2672 irq_desc[irq].affinity = mask;
2668} 2673}
2669#endif 2674#endif
2670 2675
@@ -2870,7 +2875,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
2870 2875
2871 spin_lock_irqsave(&ioapic_lock, flags); 2876 spin_lock_irqsave(&ioapic_lock, flags);
2872 __ioapic_write_entry(ioapic, pin, entry); 2877 __ioapic_write_entry(ioapic, pin, entry);
2873 set_native_irq_info(irq, TARGET_CPUS); 2878 irq_desc[irq].affinity = TARGET_CPUS;
2874 spin_unlock_irqrestore(&ioapic_lock, flags); 2879 spin_unlock_irqrestore(&ioapic_lock, flags);
2875 2880
2876 return 0; 2881 return 0;
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index 3201d421090a..8db8d514c9c0 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -10,7 +10,6 @@
10 * io_apic.c.) 10 * io_apic.c.)
11 */ 11 */
12 12
13#include <asm/uaccess.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/seq_file.h> 14#include <linux/seq_file.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
@@ -19,19 +18,34 @@
19#include <linux/cpu.h> 18#include <linux/cpu.h>
20#include <linux/delay.h> 19#include <linux/delay.h>
21 20
21#include <asm/apic.h>
22#include <asm/uaccess.h>
23
22DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp; 24DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp;
23EXPORT_PER_CPU_SYMBOL(irq_stat); 25EXPORT_PER_CPU_SYMBOL(irq_stat);
24 26
25#ifndef CONFIG_X86_LOCAL_APIC
26/* 27/*
27 * 'what should we do if we get a hw irq event on an illegal vector'. 28 * 'what should we do if we get a hw irq event on an illegal vector'.
28 * each architecture has to answer this themselves. 29 * each architecture has to answer this themselves.
29 */ 30 */
30void ack_bad_irq(unsigned int irq) 31void ack_bad_irq(unsigned int irq)
31{ 32{
32 printk("unexpected IRQ trap at vector %02x\n", irq); 33 printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq);
33} 34
35#ifdef CONFIG_X86_LOCAL_APIC
36 /*
37 * Currently unexpected vectors happen only on SMP and APIC.
38 * We _must_ ack these because every local APIC has only N
39 * irq slots per priority level, and a 'hanging, unacked' IRQ
40 * holds up an irq slot - in excessive cases (when multiple
41 * unexpected vectors occur) that might lock up the APIC
42 * completely.
43 * But only ack when the APIC is enabled -AK
44 */
45 if (cpu_has_apic)
46 ack_APIC_irq();
34#endif 47#endif
48}
35 49
36#ifdef CONFIG_4KSTACKS 50#ifdef CONFIG_4KSTACKS
37/* 51/*
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c
index af1d53344993..b545bc746fce 100644
--- a/arch/i386/kernel/kprobes.c
+++ b/arch/i386/kernel/kprobes.c
@@ -363,7 +363,7 @@ no_kprobe:
363 " pushf\n" 363 " pushf\n"
364 /* skip cs, eip, orig_eax */ 364 /* skip cs, eip, orig_eax */
365 " subl $12, %esp\n" 365 " subl $12, %esp\n"
366 " pushl %gs\n" 366 " pushl %fs\n"
367 " pushl %ds\n" 367 " pushl %ds\n"
368 " pushl %es\n" 368 " pushl %es\n"
369 " pushl %eax\n" 369 " pushl %eax\n"
@@ -387,7 +387,7 @@ no_kprobe:
387 " popl %edi\n" 387 " popl %edi\n"
388 " popl %ebp\n" 388 " popl %ebp\n"
389 " popl %eax\n" 389 " popl %eax\n"
390 /* skip eip, orig_eax, es, ds, gs */ 390 /* skip eip, orig_eax, es, ds, fs */
391 " addl $20, %esp\n" 391 " addl $20, %esp\n"
392 " popf\n" 392 " popf\n"
393 " ret\n"); 393 " ret\n");
@@ -408,7 +408,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
408 spin_lock_irqsave(&kretprobe_lock, flags); 408 spin_lock_irqsave(&kretprobe_lock, flags);
409 head = kretprobe_inst_table_head(current); 409 head = kretprobe_inst_table_head(current);
410 /* fixup registers */ 410 /* fixup registers */
411 regs->xcs = __KERNEL_CS; 411 regs->xcs = __KERNEL_CS | get_kernel_rpl();
412 regs->eip = trampoline_address; 412 regs->eip = trampoline_address;
413 regs->orig_eax = 0xffffffff; 413 regs->orig_eax = 0xffffffff;
414 414
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index c8fa13721bcb..b8f16633a6ec 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -384,7 +384,7 @@ static int do_microcode_update (void)
384{ 384{
385 long cursor = 0; 385 long cursor = 0;
386 int error = 0; 386 int error = 0;
387 void *new_mc; 387 void *new_mc = NULL;
388 int cpu; 388 int cpu;
389 cpumask_t old; 389 cpumask_t old;
390 390
@@ -451,7 +451,7 @@ static ssize_t microcode_write (struct file *file, const char __user *buf, size_
451 return ret; 451 return ret;
452} 452}
453 453
454static struct file_operations microcode_fops = { 454static const struct file_operations microcode_fops = {
455 .owner = THIS_MODULE, 455 .owner = THIS_MODULE,
456 .write = microcode_write, 456 .write = microcode_write,
457 .open = microcode_open, 457 .open = microcode_open,
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index 49bff3596bff..4f5983c98669 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -1057,7 +1057,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
1057 static int gsi_to_irq[MAX_GSI_NUM]; 1057 static int gsi_to_irq[MAX_GSI_NUM];
1058 1058
1059 /* Don't set up the ACPI SCI because it's already set up */ 1059 /* Don't set up the ACPI SCI because it's already set up */
1060 if (acpi_fadt.sci_int == gsi) 1060 if (acpi_gbl_FADT.sci_interrupt == gsi)
1061 return gsi; 1061 return gsi;
1062 1062
1063 ioapic = mp_find_ioapic(gsi); 1063 ioapic = mp_find_ioapic(gsi);
@@ -1114,7 +1114,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
1114 /* 1114 /*
1115 * Don't assign IRQ used by ACPI SCI 1115 * Don't assign IRQ used by ACPI SCI
1116 */ 1116 */
1117 if (gsi == acpi_fadt.sci_int) 1117 if (gsi == acpi_gbl_FADT.sci_interrupt)
1118 gsi = pci_irq++; 1118 gsi = pci_irq++;
1119 gsi_to_irq[irq] = gsi; 1119 gsi_to_irq[irq] = gsi;
1120 } else { 1120 } else {
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c
index 4a472a17d1c6..bcaa6e9b6197 100644
--- a/arch/i386/kernel/msr.c
+++ b/arch/i386/kernel/msr.c
@@ -68,7 +68,6 @@ static inline int rdmsr_eio(u32 reg, u32 *eax, u32 *edx)
68#ifdef CONFIG_SMP 68#ifdef CONFIG_SMP
69 69
70struct msr_command { 70struct msr_command {
71 int cpu;
72 int err; 71 int err;
73 u32 reg; 72 u32 reg;
74 u32 data[2]; 73 u32 data[2];
@@ -78,16 +77,14 @@ static void msr_smp_wrmsr(void *cmd_block)
78{ 77{
79 struct msr_command *cmd = (struct msr_command *)cmd_block; 78 struct msr_command *cmd = (struct msr_command *)cmd_block;
80 79
81 if (cmd->cpu == smp_processor_id()) 80 cmd->err = wrmsr_eio(cmd->reg, cmd->data[0], cmd->data[1]);
82 cmd->err = wrmsr_eio(cmd->reg, cmd->data[0], cmd->data[1]);
83} 81}
84 82
85static void msr_smp_rdmsr(void *cmd_block) 83static void msr_smp_rdmsr(void *cmd_block)
86{ 84{
87 struct msr_command *cmd = (struct msr_command *)cmd_block; 85 struct msr_command *cmd = (struct msr_command *)cmd_block;
88 86
89 if (cmd->cpu == smp_processor_id()) 87 cmd->err = rdmsr_eio(cmd->reg, &cmd->data[0], &cmd->data[1]);
90 cmd->err = rdmsr_eio(cmd->reg, &cmd->data[0], &cmd->data[1]);
91} 88}
92 89
93static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx) 90static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx)
@@ -99,12 +96,11 @@ static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx)
99 if (cpu == smp_processor_id()) { 96 if (cpu == smp_processor_id()) {
100 ret = wrmsr_eio(reg, eax, edx); 97 ret = wrmsr_eio(reg, eax, edx);
101 } else { 98 } else {
102 cmd.cpu = cpu;
103 cmd.reg = reg; 99 cmd.reg = reg;
104 cmd.data[0] = eax; 100 cmd.data[0] = eax;
105 cmd.data[1] = edx; 101 cmd.data[1] = edx;
106 102
107 smp_call_function(msr_smp_wrmsr, &cmd, 1, 1); 103 smp_call_function_single(cpu, msr_smp_wrmsr, &cmd, 1, 1);
108 ret = cmd.err; 104 ret = cmd.err;
109 } 105 }
110 preempt_enable(); 106 preempt_enable();
@@ -120,10 +116,9 @@ static inline int do_rdmsr(int cpu, u32 reg, u32 * eax, u32 * edx)
120 if (cpu == smp_processor_id()) { 116 if (cpu == smp_processor_id()) {
121 ret = rdmsr_eio(reg, eax, edx); 117 ret = rdmsr_eio(reg, eax, edx);
122 } else { 118 } else {
123 cmd.cpu = cpu;
124 cmd.reg = reg; 119 cmd.reg = reg;
125 120
126 smp_call_function(msr_smp_rdmsr, &cmd, 1, 1); 121 smp_call_function_single(cpu, msr_smp_rdmsr, &cmd, 1, 1);
127 122
128 *eax = cmd.data[0]; 123 *eax = cmd.data[0];
129 *edx = cmd.data[1]; 124 *edx = cmd.data[1];
@@ -230,7 +225,7 @@ static int msr_open(struct inode *inode, struct file *file)
230/* 225/*
231 * File operations we support 226 * File operations we support
232 */ 227 */
233static struct file_operations msr_fops = { 228static const struct file_operations msr_fops = {
234 .owner = THIS_MODULE, 229 .owner = THIS_MODULE,
235 .llseek = msr_seek, 230 .llseek = msr_seek,
236 .read = msr_read, 231 .read = msr_read,
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 1a6f8bb8881c..821df34d2b3a 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -23,6 +23,7 @@
23#include <linux/dmi.h> 23#include <linux/dmi.h>
24#include <linux/kprobes.h> 24#include <linux/kprobes.h>
25#include <linux/cpumask.h> 25#include <linux/cpumask.h>
26#include <linux/kernel_stat.h>
26 27
27#include <asm/smp.h> 28#include <asm/smp.h>
28#include <asm/nmi.h> 29#include <asm/nmi.h>
@@ -185,7 +186,8 @@ static __cpuinit inline int nmi_known_cpu(void)
185{ 186{
186 switch (boot_cpu_data.x86_vendor) { 187 switch (boot_cpu_data.x86_vendor) {
187 case X86_VENDOR_AMD: 188 case X86_VENDOR_AMD:
188 return ((boot_cpu_data.x86 == 15) || (boot_cpu_data.x86 == 6)); 189 return ((boot_cpu_data.x86 == 15) || (boot_cpu_data.x86 == 6)
190 || (boot_cpu_data.x86 == 16));
189 case X86_VENDOR_INTEL: 191 case X86_VENDOR_INTEL:
190 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) 192 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
191 return 1; 193 return 1;
@@ -216,6 +218,28 @@ static __init void nmi_cpu_busy(void *data)
216} 218}
217#endif 219#endif
218 220
221static unsigned int adjust_for_32bit_ctr(unsigned int hz)
222{
223 u64 counter_val;
224 unsigned int retval = hz;
225
226 /*
227 * On Intel CPUs with P6/ARCH_PERFMON only 32 bits in the counter
228 * are writable, with higher bits sign extending from bit 31.
229 * So, we can only program the counter with 31 bit values and
230 * 32nd bit should be 1, for 33.. to be 1.
231 * Find the appropriate nmi_hz
232 */
233 counter_val = (u64)cpu_khz * 1000;
234 do_div(counter_val, retval);
235 if (counter_val > 0x7fffffffULL) {
236 u64 count = (u64)cpu_khz * 1000;
237 do_div(count, 0x7fffffffUL);
238 retval = count + 1;
239 }
240 return retval;
241}
242
219static int __init check_nmi_watchdog(void) 243static int __init check_nmi_watchdog(void)
220{ 244{
221 unsigned int *prev_nmi_count; 245 unsigned int *prev_nmi_count;
@@ -281,18 +305,10 @@ static int __init check_nmi_watchdog(void)
281 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 305 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
282 306
283 nmi_hz = 1; 307 nmi_hz = 1;
284 /* 308
285 * On Intel CPUs with ARCH_PERFMON only 32 bits in the counter 309 if (wd->perfctr_msr == MSR_P6_PERFCTR0 ||
286 * are writable, with higher bits sign extending from bit 31. 310 wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) {
287 * So, we can only program the counter with 31 bit values and 311 nmi_hz = adjust_for_32bit_ctr(nmi_hz);
288 * 32nd bit should be 1, for 33.. to be 1.
289 * Find the appropriate nmi_hz
290 */
291 if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0 &&
292 ((u64)cpu_khz * 1000) > 0x7fffffffULL) {
293 u64 count = (u64)cpu_khz * 1000;
294 do_div(count, 0x7fffffffUL);
295 nmi_hz = count + 1;
296 } 312 }
297 } 313 }
298 314
@@ -369,6 +385,34 @@ void enable_timer_nmi_watchdog(void)
369 } 385 }
370} 386}
371 387
388static void __acpi_nmi_disable(void *__unused)
389{
390 apic_write_around(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
391}
392
393/*
394 * Disable timer based NMIs on all CPUs:
395 */
396void acpi_nmi_disable(void)
397{
398 if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC)
399 on_each_cpu(__acpi_nmi_disable, NULL, 0, 1);
400}
401
402static void __acpi_nmi_enable(void *__unused)
403{
404 apic_write_around(APIC_LVT0, APIC_DM_NMI);
405}
406
407/*
408 * Enable timer based NMIs on all CPUs:
409 */
410void acpi_nmi_enable(void)
411{
412 if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC)
413 on_each_cpu(__acpi_nmi_enable, NULL, 0, 1);
414}
415
372#ifdef CONFIG_PM 416#ifdef CONFIG_PM
373 417
374static int nmi_pm_active; /* nmi_active before suspend */ 418static int nmi_pm_active; /* nmi_active before suspend */
@@ -442,6 +486,17 @@ static void write_watchdog_counter(unsigned int perfctr_msr, const char *descr)
442 wrmsrl(perfctr_msr, 0 - count); 486 wrmsrl(perfctr_msr, 0 - count);
443} 487}
444 488
489static void write_watchdog_counter32(unsigned int perfctr_msr,
490 const char *descr)
491{
492 u64 count = (u64)cpu_khz * 1000;
493
494 do_div(count, nmi_hz);
495 if(descr)
496 Dprintk("setting %s to -0x%08Lx\n", descr, count);
497 wrmsr(perfctr_msr, (u32)(-count), 0);
498}
499
445/* Note that these events don't tick when the CPU idles. This means 500/* Note that these events don't tick when the CPU idles. This means
446 the frequency varies with CPU load. */ 501 the frequency varies with CPU load. */
447 502
@@ -531,7 +586,8 @@ static int setup_p6_watchdog(void)
531 586
532 /* setup the timer */ 587 /* setup the timer */
533 wrmsr(evntsel_msr, evntsel, 0); 588 wrmsr(evntsel_msr, evntsel, 0);
534 write_watchdog_counter(perfctr_msr, "P6_PERFCTR0"); 589 nmi_hz = adjust_for_32bit_ctr(nmi_hz);
590 write_watchdog_counter32(perfctr_msr, "P6_PERFCTR0");
535 apic_write(APIC_LVTPC, APIC_DM_NMI); 591 apic_write(APIC_LVTPC, APIC_DM_NMI);
536 evntsel |= P6_EVNTSEL0_ENABLE; 592 evntsel |= P6_EVNTSEL0_ENABLE;
537 wrmsr(evntsel_msr, evntsel, 0); 593 wrmsr(evntsel_msr, evntsel, 0);
@@ -704,7 +760,8 @@ static int setup_intel_arch_watchdog(void)
704 760
705 /* setup the timer */ 761 /* setup the timer */
706 wrmsr(evntsel_msr, evntsel, 0); 762 wrmsr(evntsel_msr, evntsel, 0);
707 write_watchdog_counter(perfctr_msr, "INTEL_ARCH_PERFCTR0"); 763 nmi_hz = adjust_for_32bit_ctr(nmi_hz);
764 write_watchdog_counter32(perfctr_msr, "INTEL_ARCH_PERFCTR0");
708 apic_write(APIC_LVTPC, APIC_DM_NMI); 765 apic_write(APIC_LVTPC, APIC_DM_NMI);
709 evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE; 766 evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE;
710 wrmsr(evntsel_msr, evntsel, 0); 767 wrmsr(evntsel_msr, evntsel, 0);
@@ -762,7 +819,8 @@ void setup_apic_nmi_watchdog (void *unused)
762 if (nmi_watchdog == NMI_LOCAL_APIC) { 819 if (nmi_watchdog == NMI_LOCAL_APIC) {
763 switch (boot_cpu_data.x86_vendor) { 820 switch (boot_cpu_data.x86_vendor) {
764 case X86_VENDOR_AMD: 821 case X86_VENDOR_AMD:
765 if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15) 822 if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15 &&
823 boot_cpu_data.x86 != 16)
766 return; 824 return;
767 if (!setup_k7_watchdog()) 825 if (!setup_k7_watchdog())
768 return; 826 return;
@@ -916,9 +974,13 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
916 cpu_clear(cpu, backtrace_mask); 974 cpu_clear(cpu, backtrace_mask);
917 } 975 }
918 976
919 sum = per_cpu(irq_stat, cpu).apic_timer_irqs; 977 /*
978 * Take the local apic timer and PIT/HPET into account. We don't
979 * know which one is active, when we have highres/dyntick on
980 */
981 sum = per_cpu(irq_stat, cpu).apic_timer_irqs + kstat_irqs(0);
920 982
921 /* if the apic timer isn't firing, this cpu isn't doing much */ 983 /* if the none of the timers isn't firing, this cpu isn't doing much */
922 if (!touched && last_irq_sums[cpu] == sum) { 984 if (!touched && last_irq_sums[cpu] == sum) {
923 /* 985 /*
924 * Ayiee, looks like this CPU is stuck ... 986 * Ayiee, looks like this CPU is stuck ...
@@ -956,6 +1018,8 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
956 dummy &= ~P4_CCCR_OVF; 1018 dummy &= ~P4_CCCR_OVF;
957 wrmsrl(wd->cccr_msr, dummy); 1019 wrmsrl(wd->cccr_msr, dummy);
958 apic_write(APIC_LVTPC, APIC_DM_NMI); 1020 apic_write(APIC_LVTPC, APIC_DM_NMI);
1021 /* start the cycle over again */
1022 write_watchdog_counter(wd->perfctr_msr, NULL);
959 } 1023 }
960 else if (wd->perfctr_msr == MSR_P6_PERFCTR0 || 1024 else if (wd->perfctr_msr == MSR_P6_PERFCTR0 ||
961 wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { 1025 wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) {
@@ -964,9 +1028,12 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
964 * other P6 variant. 1028 * other P6 variant.
965 * ArchPerfom/Core Duo also needs this */ 1029 * ArchPerfom/Core Duo also needs this */
966 apic_write(APIC_LVTPC, APIC_DM_NMI); 1030 apic_write(APIC_LVTPC, APIC_DM_NMI);
1031 /* P6/ARCH_PERFMON has 32 bit counter write */
1032 write_watchdog_counter32(wd->perfctr_msr, NULL);
1033 } else {
1034 /* start the cycle over again */
1035 write_watchdog_counter(wd->perfctr_msr, NULL);
967 } 1036 }
968 /* start the cycle over again */
969 write_watchdog_counter(wd->perfctr_msr, NULL);
970 rc = 1; 1037 rc = 1;
971 } else if (nmi_watchdog == NMI_IO_APIC) { 1038 } else if (nmi_watchdog == NMI_IO_APIC) {
972 /* don't know how to accurately check for this. 1039 /* don't know how to accurately check for this.
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c
index e55fd05da0f5..c156ecfa3872 100644
--- a/arch/i386/kernel/paravirt.c
+++ b/arch/i386/kernel/paravirt.c
@@ -92,7 +92,7 @@ static unsigned native_patch(u8 type, u16 clobbers, void *insns, unsigned len)
92 return insn_len; 92 return insn_len;
93} 93}
94 94
95static fastcall unsigned long native_get_debugreg(int regno) 95static unsigned long native_get_debugreg(int regno)
96{ 96{
97 unsigned long val = 0; /* Damn you, gcc! */ 97 unsigned long val = 0; /* Damn you, gcc! */
98 98
@@ -115,7 +115,7 @@ static fastcall unsigned long native_get_debugreg(int regno)
115 return val; 115 return val;
116} 116}
117 117
118static fastcall void native_set_debugreg(int regno, unsigned long value) 118static void native_set_debugreg(int regno, unsigned long value)
119{ 119{
120 switch (regno) { 120 switch (regno) {
121 case 0: 121 case 0:
@@ -146,55 +146,55 @@ void init_IRQ(void)
146 paravirt_ops.init_IRQ(); 146 paravirt_ops.init_IRQ();
147} 147}
148 148
149static fastcall void native_clts(void) 149static void native_clts(void)
150{ 150{
151 asm volatile ("clts"); 151 asm volatile ("clts");
152} 152}
153 153
154static fastcall unsigned long native_read_cr0(void) 154static unsigned long native_read_cr0(void)
155{ 155{
156 unsigned long val; 156 unsigned long val;
157 asm volatile("movl %%cr0,%0\n\t" :"=r" (val)); 157 asm volatile("movl %%cr0,%0\n\t" :"=r" (val));
158 return val; 158 return val;
159} 159}
160 160
161static fastcall void native_write_cr0(unsigned long val) 161static void native_write_cr0(unsigned long val)
162{ 162{
163 asm volatile("movl %0,%%cr0": :"r" (val)); 163 asm volatile("movl %0,%%cr0": :"r" (val));
164} 164}
165 165
166static fastcall unsigned long native_read_cr2(void) 166static unsigned long native_read_cr2(void)
167{ 167{
168 unsigned long val; 168 unsigned long val;
169 asm volatile("movl %%cr2,%0\n\t" :"=r" (val)); 169 asm volatile("movl %%cr2,%0\n\t" :"=r" (val));
170 return val; 170 return val;
171} 171}
172 172
173static fastcall void native_write_cr2(unsigned long val) 173static void native_write_cr2(unsigned long val)
174{ 174{
175 asm volatile("movl %0,%%cr2": :"r" (val)); 175 asm volatile("movl %0,%%cr2": :"r" (val));
176} 176}
177 177
178static fastcall unsigned long native_read_cr3(void) 178static unsigned long native_read_cr3(void)
179{ 179{
180 unsigned long val; 180 unsigned long val;
181 asm volatile("movl %%cr3,%0\n\t" :"=r" (val)); 181 asm volatile("movl %%cr3,%0\n\t" :"=r" (val));
182 return val; 182 return val;
183} 183}
184 184
185static fastcall void native_write_cr3(unsigned long val) 185static void native_write_cr3(unsigned long val)
186{ 186{
187 asm volatile("movl %0,%%cr3": :"r" (val)); 187 asm volatile("movl %0,%%cr3": :"r" (val));
188} 188}
189 189
190static fastcall unsigned long native_read_cr4(void) 190static unsigned long native_read_cr4(void)
191{ 191{
192 unsigned long val; 192 unsigned long val;
193 asm volatile("movl %%cr4,%0\n\t" :"=r" (val)); 193 asm volatile("movl %%cr4,%0\n\t" :"=r" (val));
194 return val; 194 return val;
195} 195}
196 196
197static fastcall unsigned long native_read_cr4_safe(void) 197static unsigned long native_read_cr4_safe(void)
198{ 198{
199 unsigned long val; 199 unsigned long val;
200 /* This could fault if %cr4 does not exist */ 200 /* This could fault if %cr4 does not exist */
@@ -207,51 +207,51 @@ static fastcall unsigned long native_read_cr4_safe(void)
207 return val; 207 return val;
208} 208}
209 209
210static fastcall void native_write_cr4(unsigned long val) 210static void native_write_cr4(unsigned long val)
211{ 211{
212 asm volatile("movl %0,%%cr4": :"r" (val)); 212 asm volatile("movl %0,%%cr4": :"r" (val));
213} 213}
214 214
215static fastcall unsigned long native_save_fl(void) 215static unsigned long native_save_fl(void)
216{ 216{
217 unsigned long f; 217 unsigned long f;
218 asm volatile("pushfl ; popl %0":"=g" (f): /* no input */); 218 asm volatile("pushfl ; popl %0":"=g" (f): /* no input */);
219 return f; 219 return f;
220} 220}
221 221
222static fastcall void native_restore_fl(unsigned long f) 222static void native_restore_fl(unsigned long f)
223{ 223{
224 asm volatile("pushl %0 ; popfl": /* no output */ 224 asm volatile("pushl %0 ; popfl": /* no output */
225 :"g" (f) 225 :"g" (f)
226 :"memory", "cc"); 226 :"memory", "cc");
227} 227}
228 228
229static fastcall void native_irq_disable(void) 229static void native_irq_disable(void)
230{ 230{
231 asm volatile("cli": : :"memory"); 231 asm volatile("cli": : :"memory");
232} 232}
233 233
234static fastcall void native_irq_enable(void) 234static void native_irq_enable(void)
235{ 235{
236 asm volatile("sti": : :"memory"); 236 asm volatile("sti": : :"memory");
237} 237}
238 238
239static fastcall void native_safe_halt(void) 239static void native_safe_halt(void)
240{ 240{
241 asm volatile("sti; hlt": : :"memory"); 241 asm volatile("sti; hlt": : :"memory");
242} 242}
243 243
244static fastcall void native_halt(void) 244static void native_halt(void)
245{ 245{
246 asm volatile("hlt": : :"memory"); 246 asm volatile("hlt": : :"memory");
247} 247}
248 248
249static fastcall void native_wbinvd(void) 249static void native_wbinvd(void)
250{ 250{
251 asm volatile("wbinvd": : :"memory"); 251 asm volatile("wbinvd": : :"memory");
252} 252}
253 253
254static fastcall unsigned long long native_read_msr(unsigned int msr, int *err) 254static unsigned long long native_read_msr(unsigned int msr, int *err)
255{ 255{
256 unsigned long long val; 256 unsigned long long val;
257 257
@@ -270,7 +270,7 @@ static fastcall unsigned long long native_read_msr(unsigned int msr, int *err)
270 return val; 270 return val;
271} 271}
272 272
273static fastcall int native_write_msr(unsigned int msr, unsigned long long val) 273static int native_write_msr(unsigned int msr, unsigned long long val)
274{ 274{
275 int err; 275 int err;
276 asm volatile("2: wrmsr ; xorl %0,%0\n" 276 asm volatile("2: wrmsr ; xorl %0,%0\n"
@@ -288,53 +288,53 @@ static fastcall int native_write_msr(unsigned int msr, unsigned long long val)
288 return err; 288 return err;
289} 289}
290 290
291static fastcall unsigned long long native_read_tsc(void) 291static unsigned long long native_read_tsc(void)
292{ 292{
293 unsigned long long val; 293 unsigned long long val;
294 asm volatile("rdtsc" : "=A" (val)); 294 asm volatile("rdtsc" : "=A" (val));
295 return val; 295 return val;
296} 296}
297 297
298static fastcall unsigned long long native_read_pmc(void) 298static unsigned long long native_read_pmc(void)
299{ 299{
300 unsigned long long val; 300 unsigned long long val;
301 asm volatile("rdpmc" : "=A" (val)); 301 asm volatile("rdpmc" : "=A" (val));
302 return val; 302 return val;
303} 303}
304 304
305static fastcall void native_load_tr_desc(void) 305static void native_load_tr_desc(void)
306{ 306{
307 asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)); 307 asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8));
308} 308}
309 309
310static fastcall void native_load_gdt(const struct Xgt_desc_struct *dtr) 310static void native_load_gdt(const struct Xgt_desc_struct *dtr)
311{ 311{
312 asm volatile("lgdt %0"::"m" (*dtr)); 312 asm volatile("lgdt %0"::"m" (*dtr));
313} 313}
314 314
315static fastcall void native_load_idt(const struct Xgt_desc_struct *dtr) 315static void native_load_idt(const struct Xgt_desc_struct *dtr)
316{ 316{
317 asm volatile("lidt %0"::"m" (*dtr)); 317 asm volatile("lidt %0"::"m" (*dtr));
318} 318}
319 319
320static fastcall void native_store_gdt(struct Xgt_desc_struct *dtr) 320static void native_store_gdt(struct Xgt_desc_struct *dtr)
321{ 321{
322 asm ("sgdt %0":"=m" (*dtr)); 322 asm ("sgdt %0":"=m" (*dtr));
323} 323}
324 324
325static fastcall void native_store_idt(struct Xgt_desc_struct *dtr) 325static void native_store_idt(struct Xgt_desc_struct *dtr)
326{ 326{
327 asm ("sidt %0":"=m" (*dtr)); 327 asm ("sidt %0":"=m" (*dtr));
328} 328}
329 329
330static fastcall unsigned long native_store_tr(void) 330static unsigned long native_store_tr(void)
331{ 331{
332 unsigned long tr; 332 unsigned long tr;
333 asm ("str %0":"=r" (tr)); 333 asm ("str %0":"=r" (tr));
334 return tr; 334 return tr;
335} 335}
336 336
337static fastcall void native_load_tls(struct thread_struct *t, unsigned int cpu) 337static void native_load_tls(struct thread_struct *t, unsigned int cpu)
338{ 338{
339#define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] 339#define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i]
340 C(0); C(1); C(2); 340 C(0); C(1); C(2);
@@ -348,22 +348,22 @@ static inline void native_write_dt_entry(void *dt, int entry, u32 entry_low, u32
348 lp[1] = entry_high; 348 lp[1] = entry_high;
349} 349}
350 350
351static fastcall void native_write_ldt_entry(void *dt, int entrynum, u32 low, u32 high) 351static void native_write_ldt_entry(void *dt, int entrynum, u32 low, u32 high)
352{ 352{
353 native_write_dt_entry(dt, entrynum, low, high); 353 native_write_dt_entry(dt, entrynum, low, high);
354} 354}
355 355
356static fastcall void native_write_gdt_entry(void *dt, int entrynum, u32 low, u32 high) 356static void native_write_gdt_entry(void *dt, int entrynum, u32 low, u32 high)
357{ 357{
358 native_write_dt_entry(dt, entrynum, low, high); 358 native_write_dt_entry(dt, entrynum, low, high);
359} 359}
360 360
361static fastcall void native_write_idt_entry(void *dt, int entrynum, u32 low, u32 high) 361static void native_write_idt_entry(void *dt, int entrynum, u32 low, u32 high)
362{ 362{
363 native_write_dt_entry(dt, entrynum, low, high); 363 native_write_dt_entry(dt, entrynum, low, high);
364} 364}
365 365
366static fastcall void native_load_esp0(struct tss_struct *tss, 366static void native_load_esp0(struct tss_struct *tss,
367 struct thread_struct *thread) 367 struct thread_struct *thread)
368{ 368{
369 tss->esp0 = thread->esp0; 369 tss->esp0 = thread->esp0;
@@ -375,12 +375,12 @@ static fastcall void native_load_esp0(struct tss_struct *tss,
375 } 375 }
376} 376}
377 377
378static fastcall void native_io_delay(void) 378static void native_io_delay(void)
379{ 379{
380 asm volatile("outb %al,$0x80"); 380 asm volatile("outb %al,$0x80");
381} 381}
382 382
383static fastcall void native_flush_tlb(void) 383static void native_flush_tlb(void)
384{ 384{
385 __native_flush_tlb(); 385 __native_flush_tlb();
386} 386}
@@ -389,49 +389,49 @@ static fastcall void native_flush_tlb(void)
389 * Global pages have to be flushed a bit differently. Not a real 389 * Global pages have to be flushed a bit differently. Not a real
390 * performance problem because this does not happen often. 390 * performance problem because this does not happen often.
391 */ 391 */
392static fastcall void native_flush_tlb_global(void) 392static void native_flush_tlb_global(void)
393{ 393{
394 __native_flush_tlb_global(); 394 __native_flush_tlb_global();
395} 395}
396 396
397static fastcall void native_flush_tlb_single(u32 addr) 397static void native_flush_tlb_single(u32 addr)
398{ 398{
399 __native_flush_tlb_single(addr); 399 __native_flush_tlb_single(addr);
400} 400}
401 401
402#ifndef CONFIG_X86_PAE 402#ifndef CONFIG_X86_PAE
403static fastcall void native_set_pte(pte_t *ptep, pte_t pteval) 403static void native_set_pte(pte_t *ptep, pte_t pteval)
404{ 404{
405 *ptep = pteval; 405 *ptep = pteval;
406} 406}
407 407
408static fastcall void native_set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval) 408static void native_set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval)
409{ 409{
410 *ptep = pteval; 410 *ptep = pteval;
411} 411}
412 412
413static fastcall void native_set_pmd(pmd_t *pmdp, pmd_t pmdval) 413static void native_set_pmd(pmd_t *pmdp, pmd_t pmdval)
414{ 414{
415 *pmdp = pmdval; 415 *pmdp = pmdval;
416} 416}
417 417
418#else /* CONFIG_X86_PAE */ 418#else /* CONFIG_X86_PAE */
419 419
420static fastcall void native_set_pte(pte_t *ptep, pte_t pte) 420static void native_set_pte(pte_t *ptep, pte_t pte)
421{ 421{
422 ptep->pte_high = pte.pte_high; 422 ptep->pte_high = pte.pte_high;
423 smp_wmb(); 423 smp_wmb();
424 ptep->pte_low = pte.pte_low; 424 ptep->pte_low = pte.pte_low;
425} 425}
426 426
427static fastcall void native_set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pte) 427static void native_set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pte)
428{ 428{
429 ptep->pte_high = pte.pte_high; 429 ptep->pte_high = pte.pte_high;
430 smp_wmb(); 430 smp_wmb();
431 ptep->pte_low = pte.pte_low; 431 ptep->pte_low = pte.pte_low;
432} 432}
433 433
434static fastcall void native_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) 434static void native_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
435{ 435{
436 ptep->pte_low = 0; 436 ptep->pte_low = 0;
437 smp_wmb(); 437 smp_wmb();
@@ -440,29 +440,29 @@ static fastcall void native_set_pte_present(struct mm_struct *mm, unsigned long
440 ptep->pte_low = pte.pte_low; 440 ptep->pte_low = pte.pte_low;
441} 441}
442 442
443static fastcall void native_set_pte_atomic(pte_t *ptep, pte_t pteval) 443static void native_set_pte_atomic(pte_t *ptep, pte_t pteval)
444{ 444{
445 set_64bit((unsigned long long *)ptep,pte_val(pteval)); 445 set_64bit((unsigned long long *)ptep,pte_val(pteval));
446} 446}
447 447
448static fastcall void native_set_pmd(pmd_t *pmdp, pmd_t pmdval) 448static void native_set_pmd(pmd_t *pmdp, pmd_t pmdval)
449{ 449{
450 set_64bit((unsigned long long *)pmdp,pmd_val(pmdval)); 450 set_64bit((unsigned long long *)pmdp,pmd_val(pmdval));
451} 451}
452 452
453static fastcall void native_set_pud(pud_t *pudp, pud_t pudval) 453static void native_set_pud(pud_t *pudp, pud_t pudval)
454{ 454{
455 *pudp = pudval; 455 *pudp = pudval;
456} 456}
457 457
458static fastcall void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 458static void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
459{ 459{
460 ptep->pte_low = 0; 460 ptep->pte_low = 0;
461 smp_wmb(); 461 smp_wmb();
462 ptep->pte_high = 0; 462 ptep->pte_high = 0;
463} 463}
464 464
465static fastcall void native_pmd_clear(pmd_t *pmd) 465static void native_pmd_clear(pmd_t *pmd)
466{ 466{
467 u32 *tmp = (u32 *)pmd; 467 u32 *tmp = (u32 *)pmd;
468 *tmp = 0; 468 *tmp = 0;
@@ -472,8 +472,8 @@ static fastcall void native_pmd_clear(pmd_t *pmd)
472#endif /* CONFIG_X86_PAE */ 472#endif /* CONFIG_X86_PAE */
473 473
474/* These are in entry.S */ 474/* These are in entry.S */
475extern fastcall void native_iret(void); 475extern void native_iret(void);
476extern fastcall void native_irq_enable_sysexit(void); 476extern void native_irq_enable_sysexit(void);
477 477
478static int __init print_banner(void) 478static int __init print_banner(void)
479{ 479{
@@ -482,9 +482,6 @@ static int __init print_banner(void)
482} 482}
483core_initcall(print_banner); 483core_initcall(print_banner);
484 484
485/* We simply declare start_kernel to be the paravirt probe of last resort. */
486paravirt_probe(start_kernel);
487
488struct paravirt_ops paravirt_ops = { 485struct paravirt_ops paravirt_ops = {
489 .name = "bare hardware", 486 .name = "bare hardware",
490 .paravirt_enabled = 0, 487 .paravirt_enabled = 0,
@@ -544,12 +541,21 @@ struct paravirt_ops paravirt_ops = {
544 .apic_write = native_apic_write, 541 .apic_write = native_apic_write,
545 .apic_write_atomic = native_apic_write_atomic, 542 .apic_write_atomic = native_apic_write_atomic,
546 .apic_read = native_apic_read, 543 .apic_read = native_apic_read,
544 .setup_boot_clock = setup_boot_APIC_clock,
545 .setup_secondary_clock = setup_secondary_APIC_clock,
547#endif 546#endif
547 .set_lazy_mode = (void *)native_nop,
548 548
549 .flush_tlb_user = native_flush_tlb, 549 .flush_tlb_user = native_flush_tlb,
550 .flush_tlb_kernel = native_flush_tlb_global, 550 .flush_tlb_kernel = native_flush_tlb_global,
551 .flush_tlb_single = native_flush_tlb_single, 551 .flush_tlb_single = native_flush_tlb_single,
552 552
553 .alloc_pt = (void *)native_nop,
554 .alloc_pd = (void *)native_nop,
555 .alloc_pd_clone = (void *)native_nop,
556 .release_pt = (void *)native_nop,
557 .release_pd = (void *)native_nop,
558
553 .set_pte = native_set_pte, 559 .set_pte = native_set_pte,
554 .set_pte_at = native_set_pte_at, 560 .set_pte_at = native_set_pte_at,
555 .set_pmd = native_set_pmd, 561 .set_pmd = native_set_pmd,
@@ -565,6 +571,8 @@ struct paravirt_ops paravirt_ops = {
565 571
566 .irq_enable_sysexit = native_irq_enable_sysexit, 572 .irq_enable_sysexit = native_irq_enable_sysexit,
567 .iret = native_iret, 573 .iret = native_iret,
574
575 .startup_ipi_hook = (void *)native_nop,
568}; 576};
569 577
570/* 578/*
diff --git a/arch/i386/kernel/pcspeaker.c b/arch/i386/kernel/pcspeaker.c
new file mode 100644
index 000000000000..bc1f2d3ea277
--- /dev/null
+++ b/arch/i386/kernel/pcspeaker.c
@@ -0,0 +1,20 @@
1#include <linux/platform_device.h>
2#include <linux/errno.h>
3#include <linux/init.h>
4
5static __init int add_pcspkr(void)
6{
7 struct platform_device *pd;
8 int ret;
9
10 pd = platform_device_alloc("pcspkr", -1);
11 if (!pd)
12 return -ENOMEM;
13
14 ret = platform_device_add(pd);
15 if (ret)
16 platform_device_put(pd);
17
18 return ret;
19}
20device_initcall(add_pcspkr);
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index c641056233a6..393a67d5d943 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -38,6 +38,7 @@
38#include <linux/ptrace.h> 38#include <linux/ptrace.h>
39#include <linux/random.h> 39#include <linux/random.h>
40#include <linux/personality.h> 40#include <linux/personality.h>
41#include <linux/tick.h>
41 42
42#include <asm/uaccess.h> 43#include <asm/uaccess.h>
43#include <asm/pgtable.h> 44#include <asm/pgtable.h>
@@ -173,6 +174,7 @@ void cpu_idle(void)
173 174
174 /* endless idle loop with no priority at all */ 175 /* endless idle loop with no priority at all */
175 while (1) { 176 while (1) {
177 tick_nohz_stop_sched_tick();
176 while (!need_resched()) { 178 while (!need_resched()) {
177 void (*idle)(void); 179 void (*idle)(void);
178 180
@@ -191,6 +193,7 @@ void cpu_idle(void)
191 __get_cpu_var(irq_stat).idle_timestamp = jiffies; 193 __get_cpu_var(irq_stat).idle_timestamp = jiffies;
192 idle(); 194 idle();
193 } 195 }
196 tick_nohz_restart_sched_tick();
194 preempt_enable_no_resched(); 197 preempt_enable_no_resched();
195 schedule(); 198 schedule();
196 preempt_disable(); 199 preempt_disable();
@@ -308,8 +311,8 @@ void show_regs(struct pt_regs * regs)
308 regs->eax,regs->ebx,regs->ecx,regs->edx); 311 regs->eax,regs->ebx,regs->ecx,regs->edx);
309 printk("ESI: %08lx EDI: %08lx EBP: %08lx", 312 printk("ESI: %08lx EDI: %08lx EBP: %08lx",
310 regs->esi, regs->edi, regs->ebp); 313 regs->esi, regs->edi, regs->ebp);
311 printk(" DS: %04x ES: %04x GS: %04x\n", 314 printk(" DS: %04x ES: %04x FS: %04x\n",
312 0xffff & regs->xds,0xffff & regs->xes, 0xffff & regs->xgs); 315 0xffff & regs->xds,0xffff & regs->xes, 0xffff & regs->xfs);
313 316
314 cr0 = read_cr0(); 317 cr0 = read_cr0();
315 cr2 = read_cr2(); 318 cr2 = read_cr2();
@@ -340,7 +343,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
340 343
341 regs.xds = __USER_DS; 344 regs.xds = __USER_DS;
342 regs.xes = __USER_DS; 345 regs.xes = __USER_DS;
343 regs.xgs = __KERNEL_PDA; 346 regs.xfs = __KERNEL_PDA;
344 regs.orig_eax = -1; 347 regs.orig_eax = -1;
345 regs.eip = (unsigned long) kernel_thread_helper; 348 regs.eip = (unsigned long) kernel_thread_helper;
346 regs.xcs = __KERNEL_CS | get_kernel_rpl(); 349 regs.xcs = __KERNEL_CS | get_kernel_rpl();
@@ -425,7 +428,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
425 428
426 p->thread.eip = (unsigned long) ret_from_fork; 429 p->thread.eip = (unsigned long) ret_from_fork;
427 430
428 savesegment(fs,p->thread.fs); 431 savesegment(gs,p->thread.gs);
429 432
430 tsk = current; 433 tsk = current;
431 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { 434 if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
@@ -501,8 +504,8 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
501 dump->regs.eax = regs->eax; 504 dump->regs.eax = regs->eax;
502 dump->regs.ds = regs->xds; 505 dump->regs.ds = regs->xds;
503 dump->regs.es = regs->xes; 506 dump->regs.es = regs->xes;
504 savesegment(fs,dump->regs.fs); 507 dump->regs.fs = regs->xfs;
505 dump->regs.gs = regs->xgs; 508 savesegment(gs,dump->regs.gs);
506 dump->regs.orig_eax = regs->orig_eax; 509 dump->regs.orig_eax = regs->orig_eax;
507 dump->regs.eip = regs->eip; 510 dump->regs.eip = regs->eip;
508 dump->regs.cs = regs->xcs; 511 dump->regs.cs = regs->xcs;
@@ -653,7 +656,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
653 load_esp0(tss, next); 656 load_esp0(tss, next);
654 657
655 /* 658 /*
656 * Save away %fs. No need to save %gs, as it was saved on the 659 * Save away %gs. No need to save %fs, as it was saved on the
657 * stack on entry. No need to save %es and %ds, as those are 660 * stack on entry. No need to save %es and %ds, as those are
658 * always kernel segments while inside the kernel. Doing this 661 * always kernel segments while inside the kernel. Doing this
659 * before setting the new TLS descriptors avoids the situation 662 * before setting the new TLS descriptors avoids the situation
@@ -662,7 +665,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
662 * used %fs or %gs (it does not today), or if the kernel is 665 * used %fs or %gs (it does not today), or if the kernel is
663 * running inside of a hypervisor layer. 666 * running inside of a hypervisor layer.
664 */ 667 */
665 savesegment(fs, prev->fs); 668 savesegment(gs, prev->gs);
666 669
667 /* 670 /*
668 * Load the per-thread Thread-Local Storage descriptor. 671 * Load the per-thread Thread-Local Storage descriptor.
@@ -670,14 +673,13 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
670 load_TLS(next, cpu); 673 load_TLS(next, cpu);
671 674
672 /* 675 /*
673 * Restore %fs if needed. 676 * Restore IOPL if needed. In normal use, the flags restore
674 * 677 * in the switch assembly will handle this. But if the kernel
675 * Glibc normally makes %fs be zero. 678 * is running virtualized at a non-zero CPL, the popf will
679 * not restore flags, so it must be done in a separate step.
676 */ 680 */
677 if (unlikely(prev->fs | next->fs)) 681 if (get_kernel_rpl() && unlikely(prev->iopl != next->iopl))
678 loadsegment(fs, next->fs); 682 set_iopl_mask(next->iopl);
679
680 write_pda(pcurrent, next_p);
681 683
682 /* 684 /*
683 * Now maybe handle debug registers and/or IO bitmaps 685 * Now maybe handle debug registers and/or IO bitmaps
@@ -688,6 +690,15 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
688 690
689 disable_tsc(prev_p, next_p); 691 disable_tsc(prev_p, next_p);
690 692
693 /*
694 * Leave lazy mode, flushing any hypercalls made here.
695 * This must be done before restoring TLS segments so
696 * the GDT and LDT are properly updated, and must be
697 * done before math_state_restore, so the TS bit is up
698 * to date.
699 */
700 arch_leave_lazy_cpu_mode();
701
691 /* If the task has used fpu the last 5 timeslices, just do a full 702 /* If the task has used fpu the last 5 timeslices, just do a full
692 * restore of the math state immediately to avoid the trap; the 703 * restore of the math state immediately to avoid the trap; the
693 * chances of needing FPU soon are obviously high now 704 * chances of needing FPU soon are obviously high now
@@ -695,6 +706,14 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
695 if (next_p->fpu_counter > 5) 706 if (next_p->fpu_counter > 5)
696 math_state_restore(); 707 math_state_restore();
697 708
709 /*
710 * Restore %gs if needed (which is common)
711 */
712 if (prev->gs | next->gs)
713 loadsegment(gs, next->gs);
714
715 write_pda(pcurrent, next_p);
716
698 return prev_p; 717 return prev_p;
699} 718}
700 719
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index af8aabe85800..4a8f8a259723 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -89,14 +89,14 @@ static int putreg(struct task_struct *child,
89 unsigned long regno, unsigned long value) 89 unsigned long regno, unsigned long value)
90{ 90{
91 switch (regno >> 2) { 91 switch (regno >> 2) {
92 case FS: 92 case GS:
93 if (value && (value & 3) != 3) 93 if (value && (value & 3) != 3)
94 return -EIO; 94 return -EIO;
95 child->thread.fs = value; 95 child->thread.gs = value;
96 return 0; 96 return 0;
97 case DS: 97 case DS:
98 case ES: 98 case ES:
99 case GS: 99 case FS:
100 if (value && (value & 3) != 3) 100 if (value && (value & 3) != 3)
101 return -EIO; 101 return -EIO;
102 value &= 0xffff; 102 value &= 0xffff;
@@ -112,7 +112,7 @@ static int putreg(struct task_struct *child,
112 value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK; 112 value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
113 break; 113 break;
114 } 114 }
115 if (regno > ES*4) 115 if (regno > FS*4)
116 regno -= 1*4; 116 regno -= 1*4;
117 put_stack_long(child, regno, value); 117 put_stack_long(child, regno, value);
118 return 0; 118 return 0;
@@ -124,18 +124,18 @@ static unsigned long getreg(struct task_struct *child,
124 unsigned long retval = ~0UL; 124 unsigned long retval = ~0UL;
125 125
126 switch (regno >> 2) { 126 switch (regno >> 2) {
127 case FS: 127 case GS:
128 retval = child->thread.fs; 128 retval = child->thread.gs;
129 break; 129 break;
130 case DS: 130 case DS:
131 case ES: 131 case ES:
132 case GS: 132 case FS:
133 case SS: 133 case SS:
134 case CS: 134 case CS:
135 retval = 0xffff; 135 retval = 0xffff;
136 /* fall through */ 136 /* fall through */
137 default: 137 default:
138 if (regno > ES*4) 138 if (regno > FS*4)
139 regno -= 1*4; 139 regno -= 1*4;
140 retval &= get_stack_long(child, regno); 140 retval &= get_stack_long(child, regno);
141 } 141 }
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 4b31ad70c1ac..122623dcc6e1 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -33,7 +33,6 @@
33#include <linux/initrd.h> 33#include <linux/initrd.h>
34#include <linux/bootmem.h> 34#include <linux/bootmem.h>
35#include <linux/seq_file.h> 35#include <linux/seq_file.h>
36#include <linux/platform_device.h>
37#include <linux/console.h> 36#include <linux/console.h>
38#include <linux/mca.h> 37#include <linux/mca.h>
39#include <linux/root_dev.h> 38#include <linux/root_dev.h>
@@ -60,6 +59,7 @@
60#include <asm/io_apic.h> 59#include <asm/io_apic.h>
61#include <asm/ist.h> 60#include <asm/ist.h>
62#include <asm/io.h> 61#include <asm/io.h>
62#include <asm/vmi.h>
63#include <setup_arch.h> 63#include <setup_arch.h>
64#include <bios_ebda.h> 64#include <bios_ebda.h>
65 65
@@ -132,7 +132,7 @@ unsigned long saved_videomode;
132#define RAMDISK_PROMPT_FLAG 0x8000 132#define RAMDISK_PROMPT_FLAG 0x8000
133#define RAMDISK_LOAD_FLAG 0x4000 133#define RAMDISK_LOAD_FLAG 0x4000
134 134
135static char command_line[COMMAND_LINE_SIZE]; 135static char __initdata command_line[COMMAND_LINE_SIZE];
136 136
137unsigned char __initdata boot_params[PARAM_SIZE]; 137unsigned char __initdata boot_params[PARAM_SIZE];
138 138
@@ -576,11 +576,19 @@ void __init setup_arch(char **cmdline_p)
576 print_memory_map("user"); 576 print_memory_map("user");
577 } 577 }
578 578
579 strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE); 579 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
580 *cmdline_p = command_line; 580 *cmdline_p = command_line;
581 581
582 max_low_pfn = setup_memory(); 582 max_low_pfn = setup_memory();
583 583
584#ifdef CONFIG_VMI
585 /*
586 * Must be after max_low_pfn is determined, and before kernel
587 * pagetables are setup.
588 */
589 vmi_init();
590#endif
591
584 /* 592 /*
585 * NOTE: before this point _nobody_ is allowed to allocate 593 * NOTE: before this point _nobody_ is allowed to allocate
586 * any memory using the bootmem allocator. Although the 594 * any memory using the bootmem allocator. Although the
@@ -651,28 +659,3 @@ void __init setup_arch(char **cmdline_p)
651#endif 659#endif
652 tsc_init(); 660 tsc_init();
653} 661}
654
655static __init int add_pcspkr(void)
656{
657 struct platform_device *pd;
658 int ret;
659
660 pd = platform_device_alloc("pcspkr", -1);
661 if (!pd)
662 return -ENOMEM;
663
664 ret = platform_device_add(pd);
665 if (ret)
666 platform_device_put(pd);
667
668 return ret;
669}
670device_initcall(add_pcspkr);
671
672/*
673 * Local Variables:
674 * mode:c
675 * c-file-style:"k&r"
676 * c-basic-offset:8
677 * End:
678 */
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
index 65d7620eaa09..4f99e870c986 100644
--- a/arch/i386/kernel/signal.c
+++ b/arch/i386/kernel/signal.c
@@ -21,6 +21,7 @@
21#include <linux/suspend.h> 21#include <linux/suspend.h>
22#include <linux/ptrace.h> 22#include <linux/ptrace.h>
23#include <linux/elf.h> 23#include <linux/elf.h>
24#include <linux/binfmts.h>
24#include <asm/processor.h> 25#include <asm/processor.h>
25#include <asm/ucontext.h> 26#include <asm/ucontext.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
@@ -128,8 +129,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax
128 X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ 129 X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \
129 X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF) 130 X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF)
130 131
131 COPY_SEG(gs); 132 GET_SEG(gs);
132 GET_SEG(fs); 133 COPY_SEG(fs);
133 COPY_SEG(es); 134 COPY_SEG(es);
134 COPY_SEG(ds); 135 COPY_SEG(ds);
135 COPY(edi); 136 COPY(edi);
@@ -244,9 +245,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate,
244{ 245{
245 int tmp, err = 0; 246 int tmp, err = 0;
246 247
247 err |= __put_user(regs->xgs, (unsigned int __user *)&sc->gs); 248 err |= __put_user(regs->xfs, (unsigned int __user *)&sc->fs);
248 savesegment(fs, tmp); 249 savesegment(gs, tmp);
249 err |= __put_user(tmp, (unsigned int __user *)&sc->fs); 250 err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
250 251
251 err |= __put_user(regs->xes, (unsigned int __user *)&sc->es); 252 err |= __put_user(regs->xes, (unsigned int __user *)&sc->es);
252 err |= __put_user(regs->xds, (unsigned int __user *)&sc->ds); 253 err |= __put_user(regs->xds, (unsigned int __user *)&sc->ds);
@@ -349,7 +350,10 @@ static int setup_frame(int sig, struct k_sigaction *ka,
349 goto give_sigsegv; 350 goto give_sigsegv;
350 } 351 }
351 352
352 restorer = (void *)VDSO_SYM(&__kernel_sigreturn); 353 if (current->binfmt->hasvdso)
354 restorer = (void *)VDSO_SYM(&__kernel_sigreturn);
355 else
356 restorer = (void *)&frame->retcode;
353 if (ka->sa.sa_flags & SA_RESTORER) 357 if (ka->sa.sa_flags & SA_RESTORER)
354 restorer = ka->sa.sa_restorer; 358 restorer = ka->sa.sa_restorer;
355 359
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 5285aff8367f..0e8977871b1f 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -374,8 +374,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
374 /* 374 /*
375 * i'm not happy about this global shared spinlock in the 375 * i'm not happy about this global shared spinlock in the
376 * MM hot path, but we'll see how contended it is. 376 * MM hot path, but we'll see how contended it is.
377 * Temporarily this turns IRQs off, so that lockups are 377 * AK: x86-64 has a faster method that could be ported.
378 * detected by the NMI watchdog.
379 */ 378 */
380 spin_lock(&tlbstate_lock); 379 spin_lock(&tlbstate_lock);
381 380
@@ -400,7 +399,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
400 399
401 while (!cpus_empty(flush_cpumask)) 400 while (!cpus_empty(flush_cpumask))
402 /* nothing. lockup detection does not belong here */ 401 /* nothing. lockup detection does not belong here */
403 mb(); 402 cpu_relax();
404 403
405 flush_mm = NULL; 404 flush_mm = NULL;
406 flush_va = 0; 405 flush_va = 0;
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 8c6c8c52b95c..48bfcaa13ecc 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -63,6 +63,7 @@
63#include <mach_apic.h> 63#include <mach_apic.h>
64#include <mach_wakecpu.h> 64#include <mach_wakecpu.h>
65#include <smpboot_hooks.h> 65#include <smpboot_hooks.h>
66#include <asm/vmi.h>
66 67
67/* Set if we find a B stepping CPU */ 68/* Set if we find a B stepping CPU */
68static int __devinitdata smp_b_stepping; 69static int __devinitdata smp_b_stepping;
@@ -93,12 +94,6 @@ cpumask_t cpu_possible_map;
93EXPORT_SYMBOL(cpu_possible_map); 94EXPORT_SYMBOL(cpu_possible_map);
94static cpumask_t smp_commenced_mask; 95static cpumask_t smp_commenced_mask;
95 96
96/* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there
97 * is no way to resync one AP against BP. TBD: for prescott and above, we
98 * should use IA64's algorithm
99 */
100static int __devinitdata tsc_sync_disabled;
101
102/* Per CPU bogomips and other parameters */ 97/* Per CPU bogomips and other parameters */
103struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; 98struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
104EXPORT_SYMBOL(cpu_data); 99EXPORT_SYMBOL(cpu_data);
@@ -215,151 +210,6 @@ valid_k7:
215 ; 210 ;
216} 211}
217 212
218/*
219 * TSC synchronization.
220 *
221 * We first check whether all CPUs have their TSC's synchronized,
222 * then we print a warning if not, and always resync.
223 */
224
225static struct {
226 atomic_t start_flag;
227 atomic_t count_start;
228 atomic_t count_stop;
229 unsigned long long values[NR_CPUS];
230} tsc __cpuinitdata = {
231 .start_flag = ATOMIC_INIT(0),
232 .count_start = ATOMIC_INIT(0),
233 .count_stop = ATOMIC_INIT(0),
234};
235
236#define NR_LOOPS 5
237
238static void __init synchronize_tsc_bp(void)
239{
240 int i;
241 unsigned long long t0;
242 unsigned long long sum, avg;
243 long long delta;
244 unsigned int one_usec;
245 int buggy = 0;
246
247 printk(KERN_INFO "checking TSC synchronization across %u CPUs: ", num_booting_cpus());
248
249 /* convert from kcyc/sec to cyc/usec */
250 one_usec = cpu_khz / 1000;
251
252 atomic_set(&tsc.start_flag, 1);
253 wmb();
254
255 /*
256 * We loop a few times to get a primed instruction cache,
257 * then the last pass is more or less synchronized and
258 * the BP and APs set their cycle counters to zero all at
259 * once. This reduces the chance of having random offsets
260 * between the processors, and guarantees that the maximum
261 * delay between the cycle counters is never bigger than
262 * the latency of information-passing (cachelines) between
263 * two CPUs.
264 */
265 for (i = 0; i < NR_LOOPS; i++) {
266 /*
267 * all APs synchronize but they loop on '== num_cpus'
268 */
269 while (atomic_read(&tsc.count_start) != num_booting_cpus()-1)
270 cpu_relax();
271 atomic_set(&tsc.count_stop, 0);
272 wmb();
273 /*
274 * this lets the APs save their current TSC:
275 */
276 atomic_inc(&tsc.count_start);
277
278 rdtscll(tsc.values[smp_processor_id()]);
279 /*
280 * We clear the TSC in the last loop:
281 */
282 if (i == NR_LOOPS-1)
283 write_tsc(0, 0);
284
285 /*
286 * Wait for all APs to leave the synchronization point:
287 */
288 while (atomic_read(&tsc.count_stop) != num_booting_cpus()-1)
289 cpu_relax();
290 atomic_set(&tsc.count_start, 0);
291 wmb();
292 atomic_inc(&tsc.count_stop);
293 }
294
295 sum = 0;
296 for (i = 0; i < NR_CPUS; i++) {
297 if (cpu_isset(i, cpu_callout_map)) {
298 t0 = tsc.values[i];
299 sum += t0;
300 }
301 }
302 avg = sum;
303 do_div(avg, num_booting_cpus());
304
305 for (i = 0; i < NR_CPUS; i++) {
306 if (!cpu_isset(i, cpu_callout_map))
307 continue;
308 delta = tsc.values[i] - avg;
309 if (delta < 0)
310 delta = -delta;
311 /*
312 * We report bigger than 2 microseconds clock differences.
313 */
314 if (delta > 2*one_usec) {
315 long long realdelta;
316
317 if (!buggy) {
318 buggy = 1;
319 printk("\n");
320 }
321 realdelta = delta;
322 do_div(realdelta, one_usec);
323 if (tsc.values[i] < avg)
324 realdelta = -realdelta;
325
326 if (realdelta)
327 printk(KERN_INFO "CPU#%d had %Ld usecs TSC "
328 "skew, fixed it up.\n", i, realdelta);
329 }
330 }
331 if (!buggy)
332 printk("passed.\n");
333}
334
335static void __cpuinit synchronize_tsc_ap(void)
336{
337 int i;
338
339 /*
340 * Not every cpu is online at the time
341 * this gets called, so we first wait for the BP to
342 * finish SMP initialization:
343 */
344 while (!atomic_read(&tsc.start_flag))
345 cpu_relax();
346
347 for (i = 0; i < NR_LOOPS; i++) {
348 atomic_inc(&tsc.count_start);
349 while (atomic_read(&tsc.count_start) != num_booting_cpus())
350 cpu_relax();
351
352 rdtscll(tsc.values[smp_processor_id()]);
353 if (i == NR_LOOPS-1)
354 write_tsc(0, 0);
355
356 atomic_inc(&tsc.count_stop);
357 while (atomic_read(&tsc.count_stop) != num_booting_cpus())
358 cpu_relax();
359 }
360}
361#undef NR_LOOPS
362
363extern void calibrate_delay(void); 213extern void calibrate_delay(void);
364 214
365static atomic_t init_deasserted; 215static atomic_t init_deasserted;
@@ -437,20 +287,12 @@ static void __cpuinit smp_callin(void)
437 /* 287 /*
438 * Save our processor parameters 288 * Save our processor parameters
439 */ 289 */
440 smp_store_cpu_info(cpuid); 290 smp_store_cpu_info(cpuid);
441
442 disable_APIC_timer();
443 291
444 /* 292 /*
445 * Allow the master to continue. 293 * Allow the master to continue.
446 */ 294 */
447 cpu_set(cpuid, cpu_callin_map); 295 cpu_set(cpuid, cpu_callin_map);
448
449 /*
450 * Synchronize the TSC with the BP
451 */
452 if (cpu_has_tsc && cpu_khz && !tsc_sync_disabled)
453 synchronize_tsc_ap();
454} 296}
455 297
456static int cpucount; 298static int cpucount;
@@ -545,18 +387,25 @@ static void __cpuinit start_secondary(void *unused)
545 * booting is too fragile that we want to limit the 387 * booting is too fragile that we want to limit the
546 * things done here to the most necessary things. 388 * things done here to the most necessary things.
547 */ 389 */
390#ifdef CONFIG_VMI
391 vmi_bringup();
392#endif
548 secondary_cpu_init(); 393 secondary_cpu_init();
549 preempt_disable(); 394 preempt_disable();
550 smp_callin(); 395 smp_callin();
551 while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) 396 while (!cpu_isset(smp_processor_id(), smp_commenced_mask))
552 rep_nop(); 397 rep_nop();
553 setup_secondary_APIC_clock(); 398 /*
399 * Check TSC synchronization with the BP:
400 */
401 check_tsc_sync_target();
402
403 setup_secondary_clock();
554 if (nmi_watchdog == NMI_IO_APIC) { 404 if (nmi_watchdog == NMI_IO_APIC) {
555 disable_8259A_irq(0); 405 disable_8259A_irq(0);
556 enable_NMI_through_LVT0(NULL); 406 enable_NMI_through_LVT0(NULL);
557 enable_8259A_irq(0); 407 enable_8259A_irq(0);
558 } 408 }
559 enable_APIC_timer();
560 /* 409 /*
561 * low-memory mappings have been cleared, flush them from 410 * low-memory mappings have been cleared, flush them from
562 * the local TLBs too. 411 * the local TLBs too.
@@ -619,7 +468,6 @@ extern struct {
619 unsigned short ss; 468 unsigned short ss;
620} stack_start; 469} stack_start;
621extern struct i386_pda *start_pda; 470extern struct i386_pda *start_pda;
622extern struct Xgt_desc_struct cpu_gdt_descr;
623 471
624#ifdef CONFIG_NUMA 472#ifdef CONFIG_NUMA
625 473
@@ -749,7 +597,7 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
749 /* 597 /*
750 * Due to the Pentium erratum 3AP. 598 * Due to the Pentium erratum 3AP.
751 */ 599 */
752 maxlvt = get_maxlvt(); 600 maxlvt = lapic_get_maxlvt();
753 if (maxlvt > 3) { 601 if (maxlvt > 3) {
754 apic_read_around(APIC_SPIV); 602 apic_read_around(APIC_SPIV);
755 apic_write(APIC_ESR, 0); 603 apic_write(APIC_ESR, 0);
@@ -835,11 +683,18 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
835 num_starts = 0; 683 num_starts = 0;
836 684
837 /* 685 /*
686 * Paravirt / VMI wants a startup IPI hook here to set up the
687 * target processor state.
688 */
689 startup_ipi_hook(phys_apicid, (unsigned long) start_secondary,
690 (unsigned long) stack_start.esp);
691
692 /*
838 * Run STARTUP IPI loop. 693 * Run STARTUP IPI loop.
839 */ 694 */
840 Dprintk("#startup loops: %d.\n", num_starts); 695 Dprintk("#startup loops: %d.\n", num_starts);
841 696
842 maxlvt = get_maxlvt(); 697 maxlvt = lapic_get_maxlvt();
843 698
844 for (j = 1; j <= num_starts; j++) { 699 for (j = 1; j <= num_starts; j++) {
845 Dprintk("Sending STARTUP #%d.\n",j); 700 Dprintk("Sending STARTUP #%d.\n",j);
@@ -1115,8 +970,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
1115 info.cpu = cpu; 970 info.cpu = cpu;
1116 INIT_WORK(&info.task, do_warm_boot_cpu); 971 INIT_WORK(&info.task, do_warm_boot_cpu);
1117 972
1118 tsc_sync_disabled = 1;
1119
1120 /* init low mem mapping */ 973 /* init low mem mapping */
1121 clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, 974 clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
1122 min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); 975 min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS));
@@ -1124,7 +977,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
1124 schedule_work(&info.task); 977 schedule_work(&info.task);
1125 wait_for_completion(&done); 978 wait_for_completion(&done);
1126 979
1127 tsc_sync_disabled = 0;
1128 zap_low_mappings(); 980 zap_low_mappings();
1129 ret = 0; 981 ret = 0;
1130exit: 982exit:
@@ -1320,13 +1172,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
1320 1172
1321 smpboot_setup_io_apic(); 1173 smpboot_setup_io_apic();
1322 1174
1323 setup_boot_APIC_clock(); 1175 setup_boot_clock();
1324
1325 /*
1326 * Synchronize the TSC with the AP
1327 */
1328 if (cpu_has_tsc && cpucount && cpu_khz)
1329 synchronize_tsc_bp();
1330} 1176}
1331 1177
1332/* These are wrappers to interface to the new boot process. Someone 1178/* These are wrappers to interface to the new boot process. Someone
@@ -1461,9 +1307,16 @@ int __cpuinit __cpu_up(unsigned int cpu)
1461 } 1307 }
1462 1308
1463 local_irq_enable(); 1309 local_irq_enable();
1310
1464 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; 1311 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
1465 /* Unleash the CPU! */ 1312 /* Unleash the CPU! */
1466 cpu_set(cpu, smp_commenced_mask); 1313 cpu_set(cpu, smp_commenced_mask);
1314
1315 /*
1316 * Check TSC synchronization with the AP:
1317 */
1318 check_tsc_sync_source(cpu);
1319
1467 while (!cpu_isset(cpu, cpu_online_map)) 1320 while (!cpu_isset(cpu, cpu_online_map))
1468 cpu_relax(); 1321 cpu_relax();
1469 1322
diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c
index f7e735c077c3..2a8713ec0f9a 100644
--- a/arch/i386/kernel/srat.c
+++ b/arch/i386/kernel/srat.c
@@ -62,19 +62,19 @@ extern void * boot_ioremap(unsigned long, unsigned long);
62/* Identify CPU proximity domains */ 62/* Identify CPU proximity domains */
63static void __init parse_cpu_affinity_structure(char *p) 63static void __init parse_cpu_affinity_structure(char *p)
64{ 64{
65 struct acpi_table_processor_affinity *cpu_affinity = 65 struct acpi_srat_cpu_affinity *cpu_affinity =
66 (struct acpi_table_processor_affinity *) p; 66 (struct acpi_srat_cpu_affinity *) p;
67 67
68 if (!cpu_affinity->flags.enabled) 68 if ((cpu_affinity->flags & ACPI_SRAT_CPU_ENABLED) == 0)
69 return; /* empty entry */ 69 return; /* empty entry */
70 70
71 /* mark this node as "seen" in node bitmap */ 71 /* mark this node as "seen" in node bitmap */
72 BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain); 72 BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain_lo);
73 73
74 apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain; 74 apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain_lo;
75 75
76 printk("CPU 0x%02X in proximity domain 0x%02X\n", 76 printk("CPU 0x%02X in proximity domain 0x%02X\n",
77 cpu_affinity->apic_id, cpu_affinity->proximity_domain); 77 cpu_affinity->apic_id, cpu_affinity->proximity_domain_lo);
78} 78}
79 79
80/* 80/*
@@ -84,28 +84,27 @@ static void __init parse_cpu_affinity_structure(char *p)
84static void __init parse_memory_affinity_structure (char *sratp) 84static void __init parse_memory_affinity_structure (char *sratp)
85{ 85{
86 unsigned long long paddr, size; 86 unsigned long long paddr, size;
87 unsigned long start_pfn, end_pfn; 87 unsigned long start_pfn, end_pfn;
88 u8 pxm; 88 u8 pxm;
89 struct node_memory_chunk_s *p, *q, *pend; 89 struct node_memory_chunk_s *p, *q, *pend;
90 struct acpi_table_memory_affinity *memory_affinity = 90 struct acpi_srat_mem_affinity *memory_affinity =
91 (struct acpi_table_memory_affinity *) sratp; 91 (struct acpi_srat_mem_affinity *) sratp;
92 92
93 if (!memory_affinity->flags.enabled) 93 if ((memory_affinity->flags & ACPI_SRAT_MEM_ENABLED) == 0)
94 return; /* empty entry */ 94 return; /* empty entry */
95 95
96 pxm = memory_affinity->proximity_domain & 0xff;
97
96 /* mark this node as "seen" in node bitmap */ 98 /* mark this node as "seen" in node bitmap */
97 BMAP_SET(pxm_bitmap, memory_affinity->proximity_domain); 99 BMAP_SET(pxm_bitmap, pxm);
98 100
99 /* calculate info for memory chunk structure */ 101 /* calculate info for memory chunk structure */
100 paddr = memory_affinity->base_addr_hi; 102 paddr = memory_affinity->base_address;
101 paddr = (paddr << 32) | memory_affinity->base_addr_lo; 103 size = memory_affinity->length;
102 size = memory_affinity->length_hi; 104
103 size = (size << 32) | memory_affinity->length_lo;
104
105 start_pfn = paddr >> PAGE_SHIFT; 105 start_pfn = paddr >> PAGE_SHIFT;
106 end_pfn = (paddr + size) >> PAGE_SHIFT; 106 end_pfn = (paddr + size) >> PAGE_SHIFT;
107 107
108 pxm = memory_affinity->proximity_domain;
109 108
110 if (num_memory_chunks >= MAXCHUNKS) { 109 if (num_memory_chunks >= MAXCHUNKS) {
111 printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n", 110 printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n",
@@ -132,8 +131,8 @@ static void __init parse_memory_affinity_structure (char *sratp)
132 printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n", 131 printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n",
133 start_pfn, end_pfn, 132 start_pfn, end_pfn,
134 memory_affinity->memory_type, 133 memory_affinity->memory_type,
135 memory_affinity->proximity_domain, 134 pxm,
136 (memory_affinity->flags.hot_pluggable ? 135 ((memory_affinity->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
137 "enabled and removable" : "enabled" ) ); 136 "enabled and removable" : "enabled" ) );
138} 137}
139 138
@@ -185,10 +184,10 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp)
185 num_memory_chunks = 0; 184 num_memory_chunks = 0;
186 while (p < end) { 185 while (p < end) {
187 switch (*p) { 186 switch (*p) {
188 case ACPI_SRAT_PROCESSOR_AFFINITY: 187 case ACPI_SRAT_TYPE_CPU_AFFINITY:
189 parse_cpu_affinity_structure(p); 188 parse_cpu_affinity_structure(p);
190 break; 189 break;
191 case ACPI_SRAT_MEMORY_AFFINITY: 190 case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
192 parse_memory_affinity_structure(p); 191 parse_memory_affinity_structure(p);
193 break; 192 break;
194 default: 193 default:
@@ -262,31 +261,30 @@ out_fail:
262 return 0; 261 return 0;
263} 262}
264 263
264struct acpi_static_rsdt {
265 struct acpi_table_rsdt table;
266 u32 padding[7]; /* Allow for 7 more table entries */
267};
268
265int __init get_memcfg_from_srat(void) 269int __init get_memcfg_from_srat(void)
266{ 270{
267 struct acpi_table_header *header = NULL; 271 struct acpi_table_header *header = NULL;
268 struct acpi_table_rsdp *rsdp = NULL; 272 struct acpi_table_rsdp *rsdp = NULL;
269 struct acpi_table_rsdt *rsdt = NULL; 273 struct acpi_table_rsdt *rsdt = NULL;
270 struct acpi_pointer *rsdp_address = NULL; 274 acpi_native_uint rsdp_address = 0;
271 struct acpi_table_rsdt saved_rsdt; 275 struct acpi_static_rsdt saved_rsdt;
272 int tables = 0; 276 int tables = 0;
273 int i = 0; 277 int i = 0;
274 278
275 if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, 279 rsdp_address = acpi_find_rsdp();
276 rsdp_address))) { 280 if (!rsdp_address) {
277 printk("%s: System description tables not found\n", 281 printk("%s: System description tables not found\n",
278 __FUNCTION__); 282 __FUNCTION__);
279 goto out_err; 283 goto out_err;
280 } 284 }
281 285
282 if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) { 286 printk("%s: assigning address to rsdp\n", __FUNCTION__);
283 printk("%s: assigning address to rsdp\n", __FUNCTION__); 287 rsdp = (struct acpi_table_rsdp *)(u32)rsdp_address;
284 rsdp = (struct acpi_table_rsdp *)
285 (u32)rsdp_address->pointer.physical;
286 } else {
287 printk("%s: rsdp_address is not a physical pointer\n", __FUNCTION__);
288 goto out_err;
289 }
290 if (!rsdp) { 288 if (!rsdp) {
291 printk("%s: Didn't find ACPI root!\n", __FUNCTION__); 289 printk("%s: Didn't find ACPI root!\n", __FUNCTION__);
292 goto out_err; 290 goto out_err;
@@ -295,13 +293,13 @@ int __init get_memcfg_from_srat(void)
295 printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision, 293 printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision,
296 rsdp->oem_id); 294 rsdp->oem_id);
297 295
298 if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) { 296 if (strncmp(rsdp->signature, ACPI_SIG_RSDP,strlen(ACPI_SIG_RSDP))) {
299 printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__); 297 printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__);
300 goto out_err; 298 goto out_err;
301 } 299 }
302 300
303 rsdt = (struct acpi_table_rsdt *) 301 rsdt = (struct acpi_table_rsdt *)
304 boot_ioremap(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt)); 302 boot_ioremap(rsdp->rsdt_physical_address, sizeof(struct acpi_table_rsdt));
305 303
306 if (!rsdt) { 304 if (!rsdt) {
307 printk(KERN_WARNING 305 printk(KERN_WARNING
@@ -310,9 +308,9 @@ int __init get_memcfg_from_srat(void)
310 goto out_err; 308 goto out_err;
311 } 309 }
312 310
313 header = & rsdt->header; 311 header = &rsdt->header;
314 312
315 if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) { 313 if (strncmp(header->signature, ACPI_SIG_RSDT, strlen(ACPI_SIG_RSDT))) {
316 printk(KERN_WARNING "ACPI: RSDT signature incorrect\n"); 314 printk(KERN_WARNING "ACPI: RSDT signature incorrect\n");
317 goto out_err; 315 goto out_err;
318 } 316 }
@@ -330,9 +328,9 @@ int __init get_memcfg_from_srat(void)
330 328
331 memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt)); 329 memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt));
332 330
333 if (saved_rsdt.header.length > sizeof(saved_rsdt)) { 331 if (saved_rsdt.table.header.length > sizeof(saved_rsdt)) {
334 printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n", 332 printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n",
335 saved_rsdt.header.length); 333 saved_rsdt.table.header.length);
336 goto out_err; 334 goto out_err;
337 } 335 }
338 336
@@ -341,15 +339,15 @@ int __init get_memcfg_from_srat(void)
341 for (i = 0; i < tables; i++) { 339 for (i = 0; i < tables; i++) {
342 /* Map in header, then map in full table length. */ 340 /* Map in header, then map in full table length. */
343 header = (struct acpi_table_header *) 341 header = (struct acpi_table_header *)
344 boot_ioremap(saved_rsdt.entry[i], sizeof(struct acpi_table_header)); 342 boot_ioremap(saved_rsdt.table.table_offset_entry[i], sizeof(struct acpi_table_header));
345 if (!header) 343 if (!header)
346 break; 344 break;
347 header = (struct acpi_table_header *) 345 header = (struct acpi_table_header *)
348 boot_ioremap(saved_rsdt.entry[i], header->length); 346 boot_ioremap(saved_rsdt.table.table_offset_entry[i], header->length);
349 if (!header) 347 if (!header)
350 break; 348 break;
351 349
352 if (strncmp((char *) &header->signature, "SRAT", 4)) 350 if (strncmp((char *) &header->signature, ACPI_SIG_SRAT, 4))
353 continue; 351 continue;
354 352
355 /* we've found the srat table. don't need to look at any more tables */ 353 /* we've found the srat table. don't need to look at any more tables */
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 5da744204d10..13ca54a85a1c 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -70,14 +70,15 @@ void enable_sep_cpu(void)
70 */ 70 */
71extern const char vsyscall_int80_start, vsyscall_int80_end; 71extern const char vsyscall_int80_start, vsyscall_int80_end;
72extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; 72extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
73static void *syscall_page; 73static struct page *syscall_pages[1];
74 74
75int __init sysenter_setup(void) 75int __init sysenter_setup(void)
76{ 76{
77 syscall_page = (void *)get_zeroed_page(GFP_ATOMIC); 77 void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
78 syscall_pages[0] = virt_to_page(syscall_page);
78 79
79#ifdef CONFIG_COMPAT_VDSO 80#ifdef CONFIG_COMPAT_VDSO
80 __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); 81 __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY_EXEC);
81 printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); 82 printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
82#endif 83#endif
83 84
@@ -96,31 +97,12 @@ int __init sysenter_setup(void)
96} 97}
97 98
98#ifndef CONFIG_COMPAT_VDSO 99#ifndef CONFIG_COMPAT_VDSO
99static struct page *syscall_nopage(struct vm_area_struct *vma,
100 unsigned long adr, int *type)
101{
102 struct page *p = virt_to_page(adr - vma->vm_start + syscall_page);
103 get_page(p);
104 return p;
105}
106
107/* Prevent VMA merging */
108static void syscall_vma_close(struct vm_area_struct *vma)
109{
110}
111
112static struct vm_operations_struct syscall_vm_ops = {
113 .close = syscall_vma_close,
114 .nopage = syscall_nopage,
115};
116
117/* Defined in vsyscall-sysenter.S */ 100/* Defined in vsyscall-sysenter.S */
118extern void SYSENTER_RETURN; 101extern void SYSENTER_RETURN;
119 102
120/* Setup a VMA at program startup for the vsyscall page */ 103/* Setup a VMA at program startup for the vsyscall page */
121int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack) 104int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
122{ 105{
123 struct vm_area_struct *vma;
124 struct mm_struct *mm = current->mm; 106 struct mm_struct *mm = current->mm;
125 unsigned long addr; 107 unsigned long addr;
126 int ret; 108 int ret;
@@ -132,38 +114,25 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
132 goto up_fail; 114 goto up_fail;
133 } 115 }
134 116
135 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
136 if (!vma) {
137 ret = -ENOMEM;
138 goto up_fail;
139 }
140
141 vma->vm_start = addr;
142 vma->vm_end = addr + PAGE_SIZE;
143 /* MAYWRITE to allow gdb to COW and set breakpoints */
144 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
145 /* 117 /*
118 * MAYWRITE to allow gdb to COW and set breakpoints
119 *
146 * Make sure the vDSO gets into every core dump. 120 * Make sure the vDSO gets into every core dump.
147 * Dumping its contents makes post-mortem fully interpretable later 121 * Dumping its contents makes post-mortem fully interpretable later
148 * without matching up the same kernel and hardware config to see 122 * without matching up the same kernel and hardware config to see
149 * what PC values meant. 123 * what PC values meant.
150 */ 124 */
151 vma->vm_flags |= VM_ALWAYSDUMP; 125 ret = install_special_mapping(mm, addr, PAGE_SIZE,
152 vma->vm_flags |= mm->def_flags; 126 VM_READ|VM_EXEC|
153 vma->vm_page_prot = protection_map[vma->vm_flags & 7]; 127 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
154 vma->vm_ops = &syscall_vm_ops; 128 VM_ALWAYSDUMP,
155 vma->vm_mm = mm; 129 syscall_pages);
156 130 if (ret)
157 ret = insert_vm_struct(mm, vma);
158 if (unlikely(ret)) {
159 kmem_cache_free(vm_area_cachep, vma);
160 goto up_fail; 131 goto up_fail;
161 }
162 132
163 current->mm->context.vdso = (void *)addr; 133 current->mm->context.vdso = (void *)addr;
164 current_thread_info()->sysenter_return = 134 current_thread_info()->sysenter_return =
165 (void *)VDSO_SYM(&SYSENTER_RETURN); 135 (void *)VDSO_SYM(&SYSENTER_RETURN);
166 mm->total_vm++;
167up_fail: 136up_fail:
168 up_write(&mm->mmap_sem); 137 up_write(&mm->mmap_sem);
169 return ret; 138 return ret;
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index c505b16c0990..a5350059557a 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -131,15 +131,13 @@ unsigned long profile_pc(struct pt_regs *regs)
131 unsigned long pc = instruction_pointer(regs); 131 unsigned long pc = instruction_pointer(regs);
132 132
133#ifdef CONFIG_SMP 133#ifdef CONFIG_SMP
134 if (!user_mode_vm(regs) && in_lock_functions(pc)) { 134 if (!v8086_mode(regs) && SEGMENT_IS_KERNEL_CODE(regs->xcs) &&
135 in_lock_functions(pc)) {
135#ifdef CONFIG_FRAME_POINTER 136#ifdef CONFIG_FRAME_POINTER
136 return *(unsigned long *)(regs->ebp + 4); 137 return *(unsigned long *)(regs->ebp + 4);
137#else 138#else
138 unsigned long *sp; 139 unsigned long *sp = (unsigned long *)&regs->esp;
139 if ((regs->xcs & 3) == 0) 140
140 sp = (unsigned long *)&regs->esp;
141 else
142 sp = (unsigned long *)regs->esp;
143 /* Return address is either directly at stack pointer 141 /* Return address is either directly at stack pointer
144 or above a saved eflags. Eflags has bits 22-31 zero, 142 or above a saved eflags. Eflags has bits 22-31 zero,
145 kernel addresses don't. */ 143 kernel addresses don't. */
@@ -161,15 +159,6 @@ EXPORT_SYMBOL(profile_pc);
161 */ 159 */
162irqreturn_t timer_interrupt(int irq, void *dev_id) 160irqreturn_t timer_interrupt(int irq, void *dev_id)
163{ 161{
164 /*
165 * Here we are in the timer irq handler. We just have irqs locally
166 * disabled but we don't know if the timer_bh is running on the other
167 * CPU. We need to avoid to SMP race with it. NOTE: we don' t need
168 * the irq version of write_lock because as just said we have irq
169 * locally disabled. -arca
170 */
171 write_seqlock(&xtime_lock);
172
173#ifdef CONFIG_X86_IO_APIC 162#ifdef CONFIG_X86_IO_APIC
174 if (timer_ack) { 163 if (timer_ack) {
175 /* 164 /*
@@ -188,7 +177,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
188 177
189 do_timer_interrupt_hook(); 178 do_timer_interrupt_hook();
190 179
191
192 if (MCA_bus) { 180 if (MCA_bus) {
193 /* The PS/2 uses level-triggered interrupts. You can't 181 /* The PS/2 uses level-triggered interrupts. You can't
194 turn them off, nor would you want to (any attempt to 182 turn them off, nor would you want to (any attempt to
@@ -203,18 +191,11 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
203 outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ 191 outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */
204 } 192 }
205 193
206 write_sequnlock(&xtime_lock);
207
208#ifdef CONFIG_X86_LOCAL_APIC
209 if (using_apic_timer)
210 smp_send_timer_broadcast_ipi();
211#endif
212
213 return IRQ_HANDLED; 194 return IRQ_HANDLED;
214} 195}
215 196
216/* not static: needed by APM */ 197/* not static: needed by APM */
217unsigned long get_cmos_time(void) 198unsigned long read_persistent_clock(void)
218{ 199{
219 unsigned long retval; 200 unsigned long retval;
220 unsigned long flags; 201 unsigned long flags;
@@ -227,11 +208,11 @@ unsigned long get_cmos_time(void)
227 208
228 return retval; 209 return retval;
229} 210}
230EXPORT_SYMBOL(get_cmos_time);
231 211
232static void sync_cmos_clock(unsigned long dummy); 212static void sync_cmos_clock(unsigned long dummy);
233 213
234static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0); 214static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
215int no_sync_cmos_clock;
235 216
236static void sync_cmos_clock(unsigned long dummy) 217static void sync_cmos_clock(unsigned long dummy)
237{ 218{
@@ -275,117 +256,20 @@ static void sync_cmos_clock(unsigned long dummy)
275 256
276void notify_arch_cmos_timer(void) 257void notify_arch_cmos_timer(void)
277{ 258{
278 mod_timer(&sync_cmos_timer, jiffies + 1); 259 if (!no_sync_cmos_clock)
279} 260 mod_timer(&sync_cmos_timer, jiffies + 1);
280
281static long clock_cmos_diff;
282static unsigned long sleep_start;
283
284static int timer_suspend(struct sys_device *dev, pm_message_t state)
285{
286 /*
287 * Estimate time zone so that set_time can update the clock
288 */
289 unsigned long ctime = get_cmos_time();
290
291 clock_cmos_diff = -ctime;
292 clock_cmos_diff += get_seconds();
293 sleep_start = ctime;
294 return 0;
295}
296
297static int timer_resume(struct sys_device *dev)
298{
299 unsigned long flags;
300 unsigned long sec;
301 unsigned long ctime = get_cmos_time();
302 long sleep_length = (ctime - sleep_start) * HZ;
303 struct timespec ts;
304
305 if (sleep_length < 0) {
306 printk(KERN_WARNING "CMOS clock skew detected in timer resume!\n");
307 /* The time after the resume must not be earlier than the time
308 * before the suspend or some nasty things will happen
309 */
310 sleep_length = 0;
311 ctime = sleep_start;
312 }
313#ifdef CONFIG_HPET_TIMER
314 if (is_hpet_enabled())
315 hpet_reenable();
316#endif
317 setup_pit_timer();
318
319 sec = ctime + clock_cmos_diff;
320 ts.tv_sec = sec;
321 ts.tv_nsec = 0;
322 do_settimeofday(&ts);
323 write_seqlock_irqsave(&xtime_lock, flags);
324 jiffies_64 += sleep_length;
325 write_sequnlock_irqrestore(&xtime_lock, flags);
326 touch_softlockup_watchdog();
327 return 0;
328}
329
330static struct sysdev_class timer_sysclass = {
331 .resume = timer_resume,
332 .suspend = timer_suspend,
333 set_kset_name("timer"),
334};
335
336
337/* XXX this driverfs stuff should probably go elsewhere later -john */
338static struct sys_device device_timer = {
339 .id = 0,
340 .cls = &timer_sysclass,
341};
342
343static int time_init_device(void)
344{
345 int error = sysdev_class_register(&timer_sysclass);
346 if (!error)
347 error = sysdev_register(&device_timer);
348 return error;
349} 261}
350 262
351device_initcall(time_init_device);
352
353#ifdef CONFIG_HPET_TIMER
354extern void (*late_time_init)(void); 263extern void (*late_time_init)(void);
355/* Duplicate of time_init() below, with hpet_enable part added */ 264/* Duplicate of time_init() below, with hpet_enable part added */
356static void __init hpet_time_init(void) 265static void __init hpet_time_init(void)
357{ 266{
358 struct timespec ts; 267 if (!hpet_enable())
359 ts.tv_sec = get_cmos_time(); 268 setup_pit_timer();
360 ts.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
361
362 do_settimeofday(&ts);
363
364 if ((hpet_enable() >= 0) && hpet_use_timer) {
365 printk("Using HPET for base-timer\n");
366 }
367
368 do_time_init(); 269 do_time_init();
369} 270}
370#endif
371 271
372void __init time_init(void) 272void __init time_init(void)
373{ 273{
374 struct timespec ts; 274 late_time_init = hpet_time_init;
375#ifdef CONFIG_HPET_TIMER
376 if (is_hpet_capable()) {
377 /*
378 * HPET initialization needs to do memory-mapped io. So, let
379 * us do a late initialization after mem_init().
380 */
381 late_time_init = hpet_time_init;
382 return;
383 }
384#endif
385 ts.tv_sec = get_cmos_time();
386 ts.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
387
388 do_settimeofday(&ts);
389
390 do_time_init();
391} 275}
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c
index 79cf608e14ca..45782356a618 100644
--- a/arch/i386/kernel/topology.c
+++ b/arch/i386/kernel/topology.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/i386/kernel/topology.c - Populate driverfs with topology information 2 * arch/i386/kernel/topology.c - Populate sysfs with topology information
3 * 3 *
4 * Written by: Matthew Dobson, IBM Corporation 4 * Written by: Matthew Dobson, IBM Corporation
5 * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL 5 * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 0efad8aeb41a..af0d3f70a817 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -94,6 +94,7 @@ asmlinkage void spurious_interrupt_bug(void);
94asmlinkage void machine_check(void); 94asmlinkage void machine_check(void);
95 95
96int kstack_depth_to_print = 24; 96int kstack_depth_to_print = 24;
97static unsigned int code_bytes = 64;
97ATOMIC_NOTIFIER_HEAD(i386die_chain); 98ATOMIC_NOTIFIER_HEAD(i386die_chain);
98 99
99int register_die_notifier(struct notifier_block *nb) 100int register_die_notifier(struct notifier_block *nb)
@@ -291,10 +292,11 @@ void show_registers(struct pt_regs *regs)
291 int i; 292 int i;
292 int in_kernel = 1; 293 int in_kernel = 1;
293 unsigned long esp; 294 unsigned long esp;
294 unsigned short ss; 295 unsigned short ss, gs;
295 296
296 esp = (unsigned long) (&regs->esp); 297 esp = (unsigned long) (&regs->esp);
297 savesegment(ss, ss); 298 savesegment(ss, ss);
299 savesegment(gs, gs);
298 if (user_mode_vm(regs)) { 300 if (user_mode_vm(regs)) {
299 in_kernel = 0; 301 in_kernel = 0;
300 esp = regs->esp; 302 esp = regs->esp;
@@ -313,8 +315,8 @@ void show_registers(struct pt_regs *regs)
313 regs->eax, regs->ebx, regs->ecx, regs->edx); 315 regs->eax, regs->ebx, regs->ecx, regs->edx);
314 printk(KERN_EMERG "esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n", 316 printk(KERN_EMERG "esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n",
315 regs->esi, regs->edi, regs->ebp, esp); 317 regs->esi, regs->edi, regs->ebp, esp);
316 printk(KERN_EMERG "ds: %04x es: %04x ss: %04x\n", 318 printk(KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n",
317 regs->xds & 0xffff, regs->xes & 0xffff, ss); 319 regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss);
318 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", 320 printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)",
319 TASK_COMM_LEN, current->comm, current->pid, 321 TASK_COMM_LEN, current->comm, current->pid,
320 current_thread_info(), current, current->thread_info); 322 current_thread_info(), current, current->thread_info);
@@ -324,7 +326,8 @@ void show_registers(struct pt_regs *regs)
324 */ 326 */
325 if (in_kernel) { 327 if (in_kernel) {
326 u8 *eip; 328 u8 *eip;
327 int code_bytes = 64; 329 unsigned int code_prologue = code_bytes * 43 / 64;
330 unsigned int code_len = code_bytes;
328 unsigned char c; 331 unsigned char c;
329 332
330 printk("\n" KERN_EMERG "Stack: "); 333 printk("\n" KERN_EMERG "Stack: ");
@@ -332,14 +335,14 @@ void show_registers(struct pt_regs *regs)
332 335
333 printk(KERN_EMERG "Code: "); 336 printk(KERN_EMERG "Code: ");
334 337
335 eip = (u8 *)regs->eip - 43; 338 eip = (u8 *)regs->eip - code_prologue;
336 if (eip < (u8 *)PAGE_OFFSET || 339 if (eip < (u8 *)PAGE_OFFSET ||
337 probe_kernel_address(eip, c)) { 340 probe_kernel_address(eip, c)) {
338 /* try starting at EIP */ 341 /* try starting at EIP */
339 eip = (u8 *)regs->eip; 342 eip = (u8 *)regs->eip;
340 code_bytes = 32; 343 code_len = code_len - code_prologue + 1;
341 } 344 }
342 for (i = 0; i < code_bytes; i++, eip++) { 345 for (i = 0; i < code_len; i++, eip++) {
343 if (eip < (u8 *)PAGE_OFFSET || 346 if (eip < (u8 *)PAGE_OFFSET ||
344 probe_kernel_address(eip, c)) { 347 probe_kernel_address(eip, c)) {
345 printk(" Bad EIP value."); 348 printk(" Bad EIP value.");
@@ -1191,3 +1194,13 @@ static int __init kstack_setup(char *s)
1191 return 1; 1194 return 1;
1192} 1195}
1193__setup("kstack=", kstack_setup); 1196__setup("kstack=", kstack_setup);
1197
1198static int __init code_bytes_setup(char *s)
1199{
1200 code_bytes = simple_strtoul(s, NULL, 0);
1201 if (code_bytes > 8192)
1202 code_bytes = 8192;
1203
1204 return 1;
1205}
1206__setup("code_bytes=", code_bytes_setup);
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 2cfc7b09b925..3082a418635c 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -23,6 +23,7 @@
23 * an extra value to store the TSC freq 23 * an extra value to store the TSC freq
24 */ 24 */
25unsigned int tsc_khz; 25unsigned int tsc_khz;
26unsigned long long (*custom_sched_clock)(void);
26 27
27int tsc_disable; 28int tsc_disable;
28 29
@@ -59,12 +60,6 @@ static inline int check_tsc_unstable(void)
59 return tsc_unstable; 60 return tsc_unstable;
60} 61}
61 62
62void mark_tsc_unstable(void)
63{
64 tsc_unstable = 1;
65}
66EXPORT_SYMBOL_GPL(mark_tsc_unstable);
67
68/* Accellerators for sched_clock() 63/* Accellerators for sched_clock()
69 * convert from cycles(64bits) => nanoseconds (64bits) 64 * convert from cycles(64bits) => nanoseconds (64bits)
70 * basic equation: 65 * basic equation:
@@ -107,14 +102,14 @@ unsigned long long sched_clock(void)
107{ 102{
108 unsigned long long this_offset; 103 unsigned long long this_offset;
109 104
105 if (unlikely(custom_sched_clock))
106 return (*custom_sched_clock)();
107
110 /* 108 /*
111 * in the NUMA case we dont use the TSC as they are not 109 * Fall back to jiffies if there's no TSC available:
112 * synchronized across all CPUs.
113 */ 110 */
114#ifndef CONFIG_NUMA 111 if (unlikely(tsc_disable))
115 if (!cpu_khz || check_tsc_unstable()) 112 /* No locking but a rare wrong value is not a big deal: */
116#endif
117 /* no locking but a rare wrong value is not a big deal */
118 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); 113 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
119 114
120 /* read the Time Stamp Counter: */ 115 /* read the Time Stamp Counter: */
@@ -194,13 +189,13 @@ EXPORT_SYMBOL(recalibrate_cpu_khz);
194void __init tsc_init(void) 189void __init tsc_init(void)
195{ 190{
196 if (!cpu_has_tsc || tsc_disable) 191 if (!cpu_has_tsc || tsc_disable)
197 return; 192 goto out_no_tsc;
198 193
199 cpu_khz = calculate_cpu_khz(); 194 cpu_khz = calculate_cpu_khz();
200 tsc_khz = cpu_khz; 195 tsc_khz = cpu_khz;
201 196
202 if (!cpu_khz) 197 if (!cpu_khz)
203 return; 198 goto out_no_tsc;
204 199
205 printk("Detected %lu.%03lu MHz processor.\n", 200 printk("Detected %lu.%03lu MHz processor.\n",
206 (unsigned long)cpu_khz / 1000, 201 (unsigned long)cpu_khz / 1000,
@@ -208,37 +203,18 @@ void __init tsc_init(void)
208 203
209 set_cyc2ns_scale(cpu_khz); 204 set_cyc2ns_scale(cpu_khz);
210 use_tsc_delay(); 205 use_tsc_delay();
211} 206 return;
212 207
213#ifdef CONFIG_CPU_FREQ 208out_no_tsc:
214 209 /*
215static unsigned int cpufreq_delayed_issched = 0; 210 * Set the tsc_disable flag if there's no TSC support, this
216static unsigned int cpufreq_init = 0; 211 * makes it a fast flag for the kernel to see whether it
217static struct work_struct cpufreq_delayed_get_work; 212 * should be using the TSC.
218 213 */
219static void handle_cpufreq_delayed_get(struct work_struct *work) 214 tsc_disable = 1;
220{
221 unsigned int cpu;
222
223 for_each_online_cpu(cpu)
224 cpufreq_get(cpu);
225
226 cpufreq_delayed_issched = 0;
227} 215}
228 216
229/* 217#ifdef CONFIG_CPU_FREQ
230 * if we notice cpufreq oddness, schedule a call to cpufreq_get() as it tries
231 * to verify the CPU frequency the timing core thinks the CPU is running
232 * at is still correct.
233 */
234static inline void cpufreq_delayed_get(void)
235{
236 if (cpufreq_init && !cpufreq_delayed_issched) {
237 cpufreq_delayed_issched = 1;
238 printk(KERN_DEBUG "Checking if CPU frequency changed.\n");
239 schedule_work(&cpufreq_delayed_get_work);
240 }
241}
242 218
243/* 219/*
244 * if the CPU frequency is scaled, TSC-based delays will need a different 220 * if the CPU frequency is scaled, TSC-based delays will need a different
@@ -303,17 +279,9 @@ static struct notifier_block time_cpufreq_notifier_block = {
303 279
304static int __init cpufreq_tsc(void) 280static int __init cpufreq_tsc(void)
305{ 281{
306 int ret; 282 return cpufreq_register_notifier(&time_cpufreq_notifier_block,
307 283 CPUFREQ_TRANSITION_NOTIFIER);
308 INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get);
309 ret = cpufreq_register_notifier(&time_cpufreq_notifier_block,
310 CPUFREQ_TRANSITION_NOTIFIER);
311 if (!ret)
312 cpufreq_init = 1;
313
314 return ret;
315} 284}
316
317core_initcall(cpufreq_tsc); 285core_initcall(cpufreq_tsc);
318 286
319#endif 287#endif
@@ -321,7 +289,6 @@ core_initcall(cpufreq_tsc);
321/* clock source code */ 289/* clock source code */
322 290
323static unsigned long current_tsc_khz = 0; 291static unsigned long current_tsc_khz = 0;
324static int tsc_update_callback(void);
325 292
326static cycle_t read_tsc(void) 293static cycle_t read_tsc(void)
327{ 294{
@@ -339,37 +306,28 @@ static struct clocksource clocksource_tsc = {
339 .mask = CLOCKSOURCE_MASK(64), 306 .mask = CLOCKSOURCE_MASK(64),
340 .mult = 0, /* to be set */ 307 .mult = 0, /* to be set */
341 .shift = 22, 308 .shift = 22,
342 .update_callback = tsc_update_callback, 309 .flags = CLOCK_SOURCE_IS_CONTINUOUS |
343 .is_continuous = 1, 310 CLOCK_SOURCE_MUST_VERIFY,
344}; 311};
345 312
346static int tsc_update_callback(void) 313void mark_tsc_unstable(void)
347{ 314{
348 int change = 0; 315 if (!tsc_unstable) {
349 316 tsc_unstable = 1;
350 /* check to see if we should switch to the safe clocksource: */ 317 /* Can be called before registration */
351 if (clocksource_tsc.rating != 0 && check_tsc_unstable()) { 318 if (clocksource_tsc.mult)
352 clocksource_tsc.rating = 0; 319 clocksource_change_rating(&clocksource_tsc, 0);
353 clocksource_reselect(); 320 else
354 change = 1; 321 clocksource_tsc.rating = 0;
355 }
356
357 /* only update if tsc_khz has changed: */
358 if (current_tsc_khz != tsc_khz) {
359 current_tsc_khz = tsc_khz;
360 clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
361 clocksource_tsc.shift);
362 change = 1;
363 } 322 }
364
365 return change;
366} 323}
324EXPORT_SYMBOL_GPL(mark_tsc_unstable);
367 325
368static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) 326static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d)
369{ 327{
370 printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", 328 printk(KERN_NOTICE "%s detected: marking TSC unstable.\n",
371 d->ident); 329 d->ident);
372 mark_tsc_unstable(); 330 tsc_unstable = 1;
373 return 0; 331 return 0;
374} 332}
375 333
@@ -386,65 +344,44 @@ static struct dmi_system_id __initdata bad_tsc_dmi_table[] = {
386 {} 344 {}
387}; 345};
388 346
389#define TSC_FREQ_CHECK_INTERVAL (10*MSEC_PER_SEC) /* 10sec in MS */
390static struct timer_list verify_tsc_freq_timer;
391
392/* XXX - Probably should add locking */
393static void verify_tsc_freq(unsigned long unused)
394{
395 static u64 last_tsc;
396 static unsigned long last_jiffies;
397
398 u64 now_tsc, interval_tsc;
399 unsigned long now_jiffies, interval_jiffies;
400
401
402 if (check_tsc_unstable())
403 return;
404
405 rdtscll(now_tsc);
406 now_jiffies = jiffies;
407
408 if (!last_jiffies) {
409 goto out;
410 }
411
412 interval_jiffies = now_jiffies - last_jiffies;
413 interval_tsc = now_tsc - last_tsc;
414 interval_tsc *= HZ;
415 do_div(interval_tsc, cpu_khz*1000);
416
417 if (interval_tsc < (interval_jiffies * 3 / 4)) {
418 printk("TSC appears to be running slowly. "
419 "Marking it as unstable\n");
420 mark_tsc_unstable();
421 return;
422 }
423
424out:
425 last_tsc = now_tsc;
426 last_jiffies = now_jiffies;
427 /* set us up to go off on the next interval: */
428 mod_timer(&verify_tsc_freq_timer,
429 jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL));
430}
431
432/* 347/*
433 * Make an educated guess if the TSC is trustworthy and synchronized 348 * Make an educated guess if the TSC is trustworthy and synchronized
434 * over all CPUs. 349 * over all CPUs.
435 */ 350 */
436static __init int unsynchronized_tsc(void) 351__cpuinit int unsynchronized_tsc(void)
437{ 352{
353 if (!cpu_has_tsc || tsc_unstable)
354 return 1;
438 /* 355 /*
439 * Intel systems are normally all synchronized. 356 * Intel systems are normally all synchronized.
440 * Exceptions must mark TSC as unstable: 357 * Exceptions must mark TSC as unstable:
441 */ 358 */
442 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) 359 if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
443 return 0; 360 /* assume multi socket systems are not synchronized: */
361 if (num_possible_cpus() > 1)
362 tsc_unstable = 1;
363 }
364 return tsc_unstable;
365}
366
367/*
368 * Geode_LX - the OLPC CPU has a possibly a very reliable TSC
369 */
370#ifdef CONFIG_MGEODE_LX
371/* RTSC counts during suspend */
372#define RTSC_SUSP 0x100
373
374static void __init check_geode_tsc_reliable(void)
375{
376 unsigned long val;
444 377
445 /* assume multi socket systems are not synchronized: */ 378 rdmsrl(MSR_GEODE_BUSCONT_CONF0, val);
446 return num_possible_cpus() > 1; 379 if ((val & RTSC_SUSP))
380 clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
447} 381}
382#else
383static inline void check_geode_tsc_reliable(void) { }
384#endif
448 385
449static int __init init_tsc_clocksource(void) 386static int __init init_tsc_clocksource(void)
450{ 387{
@@ -453,20 +390,16 @@ static int __init init_tsc_clocksource(void)
453 /* check blacklist */ 390 /* check blacklist */
454 dmi_check_system(bad_tsc_dmi_table); 391 dmi_check_system(bad_tsc_dmi_table);
455 392
456 if (unsynchronized_tsc()) /* mark unstable if unsynced */ 393 unsynchronized_tsc();
457 mark_tsc_unstable(); 394 check_geode_tsc_reliable();
458 current_tsc_khz = tsc_khz; 395 current_tsc_khz = tsc_khz;
459 clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, 396 clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
460 clocksource_tsc.shift); 397 clocksource_tsc.shift);
461 /* lower the rating if we already know its unstable: */ 398 /* lower the rating if we already know its unstable: */
462 if (check_tsc_unstable()) 399 if (check_tsc_unstable()) {
463 clocksource_tsc.rating = 0; 400 clocksource_tsc.rating = 0;
464 401 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
465 init_timer(&verify_tsc_freq_timer); 402 }
466 verify_tsc_freq_timer.function = verify_tsc_freq;
467 verify_tsc_freq_timer.expires =
468 jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL);
469 add_timer(&verify_tsc_freq_timer);
470 403
471 return clocksource_register(&clocksource_tsc); 404 return clocksource_register(&clocksource_tsc);
472 } 405 }
diff --git a/arch/i386/kernel/tsc_sync.c b/arch/i386/kernel/tsc_sync.c
new file mode 100644
index 000000000000..12424629af87
--- /dev/null
+++ b/arch/i386/kernel/tsc_sync.c
@@ -0,0 +1 @@
#include "../../x86_64/kernel/tsc_sync.c"
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index be2f96e67f78..d1b8f2b7aea6 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -96,12 +96,12 @@ static int copy_vm86_regs_to_user(struct vm86_regs __user *user,
96{ 96{
97 int ret = 0; 97 int ret = 0;
98 98
99 /* kernel_vm86_regs is missing xfs, so copy everything up to 99 /* kernel_vm86_regs is missing xgs, so copy everything up to
100 (but not including) xgs, and then rest after xgs. */ 100 (but not including) orig_eax, and then rest including orig_eax. */
101 ret += copy_to_user(user, regs, offsetof(struct kernel_vm86_regs, pt.xgs)); 101 ret += copy_to_user(user, regs, offsetof(struct kernel_vm86_regs, pt.orig_eax));
102 ret += copy_to_user(&user->__null_gs, &regs->pt.xgs, 102 ret += copy_to_user(&user->orig_eax, &regs->pt.orig_eax,
103 sizeof(struct kernel_vm86_regs) - 103 sizeof(struct kernel_vm86_regs) -
104 offsetof(struct kernel_vm86_regs, pt.xgs)); 104 offsetof(struct kernel_vm86_regs, pt.orig_eax));
105 105
106 return ret; 106 return ret;
107} 107}
@@ -113,12 +113,13 @@ static int copy_vm86_regs_from_user(struct kernel_vm86_regs *regs,
113{ 113{
114 int ret = 0; 114 int ret = 0;
115 115
116 ret += copy_from_user(regs, user, offsetof(struct kernel_vm86_regs, pt.xgs)); 116 /* copy eax-xfs inclusive */
117 ret += copy_from_user(&regs->pt.xgs, &user->__null_gs, 117 ret += copy_from_user(regs, user, offsetof(struct kernel_vm86_regs, pt.orig_eax));
118 /* copy orig_eax-__gsh+extra */
119 ret += copy_from_user(&regs->pt.orig_eax, &user->orig_eax,
118 sizeof(struct kernel_vm86_regs) - 120 sizeof(struct kernel_vm86_regs) -
119 offsetof(struct kernel_vm86_regs, pt.xgs) + 121 offsetof(struct kernel_vm86_regs, pt.orig_eax) +
120 extra); 122 extra);
121
122 return ret; 123 return ret;
123} 124}
124 125
@@ -157,8 +158,8 @@ struct pt_regs * fastcall save_v86_state(struct kernel_vm86_regs * regs)
157 158
158 ret = KVM86->regs32; 159 ret = KVM86->regs32;
159 160
160 loadsegment(fs, current->thread.saved_fs); 161 ret->xfs = current->thread.saved_fs;
161 ret->xgs = current->thread.saved_gs; 162 loadsegment(gs, current->thread.saved_gs);
162 163
163 return ret; 164 return ret;
164} 165}
@@ -285,9 +286,9 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
285 */ 286 */
286 info->regs.pt.xds = 0; 287 info->regs.pt.xds = 0;
287 info->regs.pt.xes = 0; 288 info->regs.pt.xes = 0;
288 info->regs.pt.xgs = 0; 289 info->regs.pt.xfs = 0;
289 290
290/* we are clearing fs later just before "jmp resume_userspace", 291/* we are clearing gs later just before "jmp resume_userspace",
291 * because it is not saved/restored. 292 * because it is not saved/restored.
292 */ 293 */
293 294
@@ -321,8 +322,8 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
321 */ 322 */
322 info->regs32->eax = 0; 323 info->regs32->eax = 0;
323 tsk->thread.saved_esp0 = tsk->thread.esp0; 324 tsk->thread.saved_esp0 = tsk->thread.esp0;
324 savesegment(fs, tsk->thread.saved_fs); 325 tsk->thread.saved_fs = info->regs32->xfs;
325 tsk->thread.saved_gs = info->regs32->xgs; 326 savesegment(gs, tsk->thread.saved_gs);
326 327
327 tss = &per_cpu(init_tss, get_cpu()); 328 tss = &per_cpu(init_tss, get_cpu());
328 tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; 329 tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
@@ -342,7 +343,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
342 __asm__ __volatile__( 343 __asm__ __volatile__(
343 "movl %0,%%esp\n\t" 344 "movl %0,%%esp\n\t"
344 "movl %1,%%ebp\n\t" 345 "movl %1,%%ebp\n\t"
345 "mov %2, %%fs\n\t" 346 "mov %2, %%gs\n\t"
346 "jmp resume_userspace" 347 "jmp resume_userspace"
347 : /* no outputs */ 348 : /* no outputs */
348 :"r" (&info->regs), "r" (task_thread_info(tsk)), "r" (0)); 349 :"r" (&info->regs), "r" (task_thread_info(tsk)), "r" (0));
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
new file mode 100644
index 000000000000..bb5a7abf949c
--- /dev/null
+++ b/arch/i386/kernel/vmi.c
@@ -0,0 +1,949 @@
1/*
2 * VMI specific paravirt-ops implementation
3 *
4 * Copyright (C) 2005, VMware, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 * Send feedback to zach@vmware.com
22 *
23 */
24
25#include <linux/module.h>
26#include <linux/license.h>
27#include <linux/cpu.h>
28#include <linux/bootmem.h>
29#include <linux/mm.h>
30#include <asm/vmi.h>
31#include <asm/io.h>
32#include <asm/fixmap.h>
33#include <asm/apicdef.h>
34#include <asm/apic.h>
35#include <asm/processor.h>
36#include <asm/timer.h>
37#include <asm/vmi_time.h>
38
39/* Convenient for calling VMI functions indirectly in the ROM */
40typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void);
41typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
42
43#define call_vrom_func(rom,func) \
44 (((VROMFUNC *)(rom->func))())
45
46#define call_vrom_long_func(rom,func,arg) \
47 (((VROMLONGFUNC *)(rom->func)) (arg))
48
49static struct vrom_header *vmi_rom;
50static int license_gplok;
51static int disable_nodelay;
52static int disable_pge;
53static int disable_pse;
54static int disable_sep;
55static int disable_tsc;
56static int disable_mtrr;
57
58/* Cached VMI operations */
59struct {
60 void (*cpuid)(void /* non-c */);
61 void (*_set_ldt)(u32 selector);
62 void (*set_tr)(u32 selector);
63 void (*set_kernel_stack)(u32 selector, u32 esp0);
64 void (*allocate_page)(u32, u32, u32, u32, u32);
65 void (*release_page)(u32, u32);
66 void (*set_pte)(pte_t, pte_t *, unsigned);
67 void (*update_pte)(pte_t *, unsigned);
68 void (*set_linear_mapping)(int, u32, u32, u32);
69 void (*flush_tlb)(int);
70 void (*set_initial_ap_state)(int, int);
71 void (*halt)(void);
72} vmi_ops;
73
74/* XXX move this to alternative.h */
75extern struct paravirt_patch __start_parainstructions[],
76 __stop_parainstructions[];
77
78/*
79 * VMI patching routines.
80 */
81#define MNEM_CALL 0xe8
82#define MNEM_JMP 0xe9
83#define MNEM_RET 0xc3
84
85static char irq_save_disable_callout[] = {
86 MNEM_CALL, 0, 0, 0, 0,
87 MNEM_CALL, 0, 0, 0, 0,
88 MNEM_RET
89};
90#define IRQ_PATCH_INT_MASK 0
91#define IRQ_PATCH_DISABLE 5
92
93static inline void patch_offset(unsigned char *eip, unsigned char *dest)
94{
95 *(unsigned long *)(eip+1) = dest-eip-5;
96}
97
98static unsigned patch_internal(int call, unsigned len, void *insns)
99{
100 u64 reloc;
101 struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc;
102 reloc = call_vrom_long_func(vmi_rom, get_reloc, call);
103 switch(rel->type) {
104 case VMI_RELOCATION_CALL_REL:
105 BUG_ON(len < 5);
106 *(char *)insns = MNEM_CALL;
107 patch_offset(insns, rel->eip);
108 return 5;
109
110 case VMI_RELOCATION_JUMP_REL:
111 BUG_ON(len < 5);
112 *(char *)insns = MNEM_JMP;
113 patch_offset(insns, rel->eip);
114 return 5;
115
116 case VMI_RELOCATION_NOP:
117 /* obliterate the whole thing */
118 return 0;
119
120 case VMI_RELOCATION_NONE:
121 /* leave native code in place */
122 break;
123
124 default:
125 BUG();
126 }
127 return len;
128}
129
130/*
131 * Apply patch if appropriate, return length of new instruction
132 * sequence. The callee does nop padding for us.
133 */
134static unsigned vmi_patch(u8 type, u16 clobbers, void *insns, unsigned len)
135{
136 switch (type) {
137 case PARAVIRT_IRQ_DISABLE:
138 return patch_internal(VMI_CALL_DisableInterrupts, len, insns);
139 case PARAVIRT_IRQ_ENABLE:
140 return patch_internal(VMI_CALL_EnableInterrupts, len, insns);
141 case PARAVIRT_RESTORE_FLAGS:
142 return patch_internal(VMI_CALL_SetInterruptMask, len, insns);
143 case PARAVIRT_SAVE_FLAGS:
144 return patch_internal(VMI_CALL_GetInterruptMask, len, insns);
145 case PARAVIRT_SAVE_FLAGS_IRQ_DISABLE:
146 if (len >= 10) {
147 patch_internal(VMI_CALL_GetInterruptMask, len, insns);
148 patch_internal(VMI_CALL_DisableInterrupts, len-5, insns+5);
149 return 10;
150 } else {
151 /*
152 * You bastards didn't leave enough room to
153 * patch save_flags_irq_disable inline. Patch
154 * to a helper
155 */
156 BUG_ON(len < 5);
157 *(char *)insns = MNEM_CALL;
158 patch_offset(insns, irq_save_disable_callout);
159 return 5;
160 }
161 case PARAVIRT_INTERRUPT_RETURN:
162 return patch_internal(VMI_CALL_IRET, len, insns);
163 case PARAVIRT_STI_SYSEXIT:
164 return patch_internal(VMI_CALL_SYSEXIT, len, insns);
165 default:
166 break;
167 }
168 return len;
169}
170
171/* CPUID has non-C semantics, and paravirt-ops API doesn't match hardware ISA */
172static void vmi_cpuid(unsigned int *eax, unsigned int *ebx,
173 unsigned int *ecx, unsigned int *edx)
174{
175 int override = 0;
176 if (*eax == 1)
177 override = 1;
178 asm volatile ("call *%6"
179 : "=a" (*eax),
180 "=b" (*ebx),
181 "=c" (*ecx),
182 "=d" (*edx)
183 : "0" (*eax), "2" (*ecx), "r" (vmi_ops.cpuid));
184 if (override) {
185 if (disable_pse)
186 *edx &= ~X86_FEATURE_PSE;
187 if (disable_pge)
188 *edx &= ~X86_FEATURE_PGE;
189 if (disable_sep)
190 *edx &= ~X86_FEATURE_SEP;
191 if (disable_tsc)
192 *edx &= ~X86_FEATURE_TSC;
193 if (disable_mtrr)
194 *edx &= ~X86_FEATURE_MTRR;
195 }
196}
197
198static inline void vmi_maybe_load_tls(struct desc_struct *gdt, int nr, struct desc_struct *new)
199{
200 if (gdt[nr].a != new->a || gdt[nr].b != new->b)
201 write_gdt_entry(gdt, nr, new->a, new->b);
202}
203
204static void vmi_load_tls(struct thread_struct *t, unsigned int cpu)
205{
206 struct desc_struct *gdt = get_cpu_gdt_table(cpu);
207 vmi_maybe_load_tls(gdt, GDT_ENTRY_TLS_MIN + 0, &t->tls_array[0]);
208 vmi_maybe_load_tls(gdt, GDT_ENTRY_TLS_MIN + 1, &t->tls_array[1]);
209 vmi_maybe_load_tls(gdt, GDT_ENTRY_TLS_MIN + 2, &t->tls_array[2]);
210}
211
212static void vmi_set_ldt(const void *addr, unsigned entries)
213{
214 unsigned cpu = smp_processor_id();
215 u32 low, high;
216
217 pack_descriptor(&low, &high, (unsigned long)addr,
218 entries * sizeof(struct desc_struct) - 1,
219 DESCTYPE_LDT, 0);
220 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT, low, high);
221 vmi_ops._set_ldt(entries ? GDT_ENTRY_LDT*sizeof(struct desc_struct) : 0);
222}
223
224static void vmi_set_tr(void)
225{
226 vmi_ops.set_tr(GDT_ENTRY_TSS*sizeof(struct desc_struct));
227}
228
229static void vmi_load_esp0(struct tss_struct *tss,
230 struct thread_struct *thread)
231{
232 tss->esp0 = thread->esp0;
233
234 /* This can only happen when SEP is enabled, no need to test "SEP"arately */
235 if (unlikely(tss->ss1 != thread->sysenter_cs)) {
236 tss->ss1 = thread->sysenter_cs;
237 wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
238 }
239 vmi_ops.set_kernel_stack(__KERNEL_DS, tss->esp0);
240}
241
242static void vmi_flush_tlb_user(void)
243{
244 vmi_ops.flush_tlb(VMI_FLUSH_TLB);
245}
246
247static void vmi_flush_tlb_kernel(void)
248{
249 vmi_ops.flush_tlb(VMI_FLUSH_TLB | VMI_FLUSH_GLOBAL);
250}
251
252/* Stub to do nothing at all; used for delays and unimplemented calls */
253static void vmi_nop(void)
254{
255}
256
257/* For NO_IDLE_HZ, we stop the clock when halting the kernel */
258#ifdef CONFIG_NO_IDLE_HZ
259static fastcall void vmi_safe_halt(void)
260{
261 int idle = vmi_stop_hz_timer();
262 vmi_ops.halt();
263 if (idle) {
264 local_irq_disable();
265 vmi_account_time_restart_hz_timer();
266 local_irq_enable();
267 }
268}
269#endif
270
271#ifdef CONFIG_DEBUG_PAGE_TYPE
272
273#ifdef CONFIG_X86_PAE
274#define MAX_BOOT_PTS (2048+4+1)
275#else
276#define MAX_BOOT_PTS (1024+1)
277#endif
278
279/*
280 * During boot, mem_map is not yet available in paging_init, so stash
281 * all the boot page allocations here.
282 */
283static struct {
284 u32 pfn;
285 int type;
286} boot_page_allocations[MAX_BOOT_PTS];
287static int num_boot_page_allocations;
288static int boot_allocations_applied;
289
290void vmi_apply_boot_page_allocations(void)
291{
292 int i;
293 BUG_ON(!mem_map);
294 for (i = 0; i < num_boot_page_allocations; i++) {
295 struct page *page = pfn_to_page(boot_page_allocations[i].pfn);
296 page->type = boot_page_allocations[i].type;
297 page->type = boot_page_allocations[i].type &
298 ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
299 }
300 boot_allocations_applied = 1;
301}
302
303static void record_page_type(u32 pfn, int type)
304{
305 BUG_ON(num_boot_page_allocations >= MAX_BOOT_PTS);
306 boot_page_allocations[num_boot_page_allocations].pfn = pfn;
307 boot_page_allocations[num_boot_page_allocations].type = type;
308 num_boot_page_allocations++;
309}
310
311static void check_zeroed_page(u32 pfn, int type, struct page *page)
312{
313 u32 *ptr;
314 int i;
315 int limit = PAGE_SIZE / sizeof(int);
316
317 if (page_address(page))
318 ptr = (u32 *)page_address(page);
319 else
320 ptr = (u32 *)__va(pfn << PAGE_SHIFT);
321 /*
322 * When cloning the root in non-PAE mode, only the userspace
323 * pdes need to be zeroed.
324 */
325 if (type & VMI_PAGE_CLONE)
326 limit = USER_PTRS_PER_PGD;
327 for (i = 0; i < limit; i++)
328 BUG_ON(ptr[i]);
329}
330
331/*
332 * We stash the page type into struct page so we can verify the page
333 * types are used properly.
334 */
335static void vmi_set_page_type(u32 pfn, int type)
336{
337 /* PAE can have multiple roots per page - don't track */
338 if (PTRS_PER_PMD > 1 && (type & VMI_PAGE_PDP))
339 return;
340
341 if (boot_allocations_applied) {
342 struct page *page = pfn_to_page(pfn);
343 if (type != VMI_PAGE_NORMAL)
344 BUG_ON(page->type);
345 else
346 BUG_ON(page->type == VMI_PAGE_NORMAL);
347 page->type = type & ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
348 if (type & VMI_PAGE_ZEROED)
349 check_zeroed_page(pfn, type, page);
350 } else {
351 record_page_type(pfn, type);
352 }
353}
354
355static void vmi_check_page_type(u32 pfn, int type)
356{
357 /* PAE can have multiple roots per page - skip checks */
358 if (PTRS_PER_PMD > 1 && (type & VMI_PAGE_PDP))
359 return;
360
361 type &= ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
362 if (boot_allocations_applied) {
363 struct page *page = pfn_to_page(pfn);
364 BUG_ON((page->type ^ type) & VMI_PAGE_PAE);
365 BUG_ON(type == VMI_PAGE_NORMAL && page->type);
366 BUG_ON((type & page->type) == 0);
367 }
368}
369#else
370#define vmi_set_page_type(p,t) do { } while (0)
371#define vmi_check_page_type(p,t) do { } while (0)
372#endif
373
374static void vmi_allocate_pt(u32 pfn)
375{
376 vmi_set_page_type(pfn, VMI_PAGE_L1);
377 vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0);
378}
379
380static void vmi_allocate_pd(u32 pfn)
381{
382 /*
383 * This call comes in very early, before mem_map is setup.
384 * It is called only for swapper_pg_dir, which already has
385 * data on it.
386 */
387 vmi_set_page_type(pfn, VMI_PAGE_L2);
388 vmi_ops.allocate_page(pfn, VMI_PAGE_L2, 0, 0, 0);
389}
390
391static void vmi_allocate_pd_clone(u32 pfn, u32 clonepfn, u32 start, u32 count)
392{
393 vmi_set_page_type(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE);
394 vmi_check_page_type(clonepfn, VMI_PAGE_L2);
395 vmi_ops.allocate_page(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE, clonepfn, start, count);
396}
397
398static void vmi_release_pt(u32 pfn)
399{
400 vmi_ops.release_page(pfn, VMI_PAGE_L1);
401 vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
402}
403
404static void vmi_release_pd(u32 pfn)
405{
406 vmi_ops.release_page(pfn, VMI_PAGE_L2);
407 vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
408}
409
410/*
411 * Helper macros for MMU update flags. We can defer updates until a flush
412 * or page invalidation only if the update is to the current address space
413 * (otherwise, there is no flush). We must check against init_mm, since
414 * this could be a kernel update, which usually passes init_mm, although
415 * sometimes this check can be skipped if we know the particular function
416 * is only called on user mode PTEs. We could change the kernel to pass
417 * current->active_mm here, but in particular, I was unsure if changing
418 * mm/highmem.c to do this would still be correct on other architectures.
419 */
420#define is_current_as(mm, mustbeuser) ((mm) == current->active_mm || \
421 (!mustbeuser && (mm) == &init_mm))
422#define vmi_flags_addr(mm, addr, level, user) \
423 ((level) | (is_current_as(mm, user) ? \
424 (VMI_PAGE_CURRENT_AS | ((addr) & VMI_PAGE_VA_MASK)) : 0))
425#define vmi_flags_addr_defer(mm, addr, level, user) \
426 ((level) | (is_current_as(mm, user) ? \
427 (VMI_PAGE_DEFER | VMI_PAGE_CURRENT_AS | ((addr) & VMI_PAGE_VA_MASK)) : 0))
428
429static void vmi_update_pte(struct mm_struct *mm, u32 addr, pte_t *ptep)
430{
431 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
432 vmi_ops.update_pte(ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
433}
434
435static void vmi_update_pte_defer(struct mm_struct *mm, u32 addr, pte_t *ptep)
436{
437 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
438 vmi_ops.update_pte(ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 0));
439}
440
441static void vmi_set_pte(pte_t *ptep, pte_t pte)
442{
443 /* XXX because of set_pmd_pte, this can be called on PT or PD layers */
444 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE | VMI_PAGE_PD);
445 vmi_ops.set_pte(pte, ptep, VMI_PAGE_PT);
446}
447
448static void vmi_set_pte_at(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pte)
449{
450 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
451 vmi_ops.set_pte(pte, ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
452}
453
454static void vmi_set_pmd(pmd_t *pmdp, pmd_t pmdval)
455{
456#ifdef CONFIG_X86_PAE
457 const pte_t pte = { pmdval.pmd, pmdval.pmd >> 32 };
458 vmi_check_page_type(__pa(pmdp) >> PAGE_SHIFT, VMI_PAGE_PMD);
459#else
460 const pte_t pte = { pmdval.pud.pgd.pgd };
461 vmi_check_page_type(__pa(pmdp) >> PAGE_SHIFT, VMI_PAGE_PGD);
462#endif
463 vmi_ops.set_pte(pte, (pte_t *)pmdp, VMI_PAGE_PD);
464}
465
466#ifdef CONFIG_X86_PAE
467
468static void vmi_set_pte_atomic(pte_t *ptep, pte_t pteval)
469{
470 /*
471 * XXX This is called from set_pmd_pte, but at both PT
472 * and PD layers so the VMI_PAGE_PT flag is wrong. But
473 * it is only called for large page mapping changes,
474 * the Xen backend, doesn't support large pages, and the
475 * ESX backend doesn't depend on the flag.
476 */
477 set_64bit((unsigned long long *)ptep,pte_val(pteval));
478 vmi_ops.update_pte(ptep, VMI_PAGE_PT);
479}
480
481static void vmi_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
482{
483 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
484 vmi_ops.set_pte(pte, ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 1));
485}
486
487static void vmi_set_pud(pud_t *pudp, pud_t pudval)
488{
489 /* Um, eww */
490 const pte_t pte = { pudval.pgd.pgd, pudval.pgd.pgd >> 32 };
491 vmi_check_page_type(__pa(pudp) >> PAGE_SHIFT, VMI_PAGE_PGD);
492 vmi_ops.set_pte(pte, (pte_t *)pudp, VMI_PAGE_PDP);
493}
494
495static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
496{
497 const pte_t pte = { 0 };
498 vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
499 vmi_ops.set_pte(pte, ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
500}
501
502void vmi_pmd_clear(pmd_t *pmd)
503{
504 const pte_t pte = { 0 };
505 vmi_check_page_type(__pa(pmd) >> PAGE_SHIFT, VMI_PAGE_PMD);
506 vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD);
507}
508#endif
509
510#ifdef CONFIG_SMP
511struct vmi_ap_state ap;
512extern void setup_pda(void);
513
514static void __init /* XXX cpu hotplug */
515vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
516 unsigned long start_esp)
517{
518 /* Default everything to zero. This is fine for most GPRs. */
519 memset(&ap, 0, sizeof(struct vmi_ap_state));
520
521 ap.gdtr_limit = GDT_SIZE - 1;
522 ap.gdtr_base = (unsigned long) get_cpu_gdt_table(phys_apicid);
523
524 ap.idtr_limit = IDT_ENTRIES * 8 - 1;
525 ap.idtr_base = (unsigned long) idt_table;
526
527 ap.ldtr = 0;
528
529 ap.cs = __KERNEL_CS;
530 ap.eip = (unsigned long) start_eip;
531 ap.ss = __KERNEL_DS;
532 ap.esp = (unsigned long) start_esp;
533
534 ap.ds = __USER_DS;
535 ap.es = __USER_DS;
536 ap.fs = __KERNEL_PDA;
537 ap.gs = 0;
538
539 ap.eflags = 0;
540
541 setup_pda();
542
543#ifdef CONFIG_X86_PAE
544 /* efer should match BSP efer. */
545 if (cpu_has_nx) {
546 unsigned l, h;
547 rdmsr(MSR_EFER, l, h);
548 ap.efer = (unsigned long long) h << 32 | l;
549 }
550#endif
551
552 ap.cr3 = __pa(swapper_pg_dir);
553 /* Protected mode, paging, AM, WP, NE, MP. */
554 ap.cr0 = 0x80050023;
555 ap.cr4 = mmu_cr4_features;
556 vmi_ops.set_initial_ap_state(__pa(&ap), phys_apicid);
557}
558#endif
559
560static inline int __init check_vmi_rom(struct vrom_header *rom)
561{
562 struct pci_header *pci;
563 struct pnp_header *pnp;
564 const char *manufacturer = "UNKNOWN";
565 const char *product = "UNKNOWN";
566 const char *license = "unspecified";
567
568 if (rom->rom_signature != 0xaa55)
569 return 0;
570 if (rom->vrom_signature != VMI_SIGNATURE)
571 return 0;
572 if (rom->api_version_maj != VMI_API_REV_MAJOR ||
573 rom->api_version_min+1 < VMI_API_REV_MINOR+1) {
574 printk(KERN_WARNING "VMI: Found mismatched rom version %d.%d\n",
575 rom->api_version_maj,
576 rom->api_version_min);
577 return 0;
578 }
579
580 /*
581 * Relying on the VMI_SIGNATURE field is not 100% safe, so check
582 * the PCI header and device type to make sure this is really a
583 * VMI device.
584 */
585 if (!rom->pci_header_offs) {
586 printk(KERN_WARNING "VMI: ROM does not contain PCI header.\n");
587 return 0;
588 }
589
590 pci = (struct pci_header *)((char *)rom+rom->pci_header_offs);
591 if (pci->vendorID != PCI_VENDOR_ID_VMWARE ||
592 pci->deviceID != PCI_DEVICE_ID_VMWARE_VMI) {
593 /* Allow it to run... anyways, but warn */
594 printk(KERN_WARNING "VMI: ROM from unknown manufacturer\n");
595 }
596
597 if (rom->pnp_header_offs) {
598 pnp = (struct pnp_header *)((char *)rom+rom->pnp_header_offs);
599 if (pnp->manufacturer_offset)
600 manufacturer = (const char *)rom+pnp->manufacturer_offset;
601 if (pnp->product_offset)
602 product = (const char *)rom+pnp->product_offset;
603 }
604
605 if (rom->license_offs)
606 license = (char *)rom+rom->license_offs;
607
608 printk(KERN_INFO "VMI: Found %s %s, API version %d.%d, ROM version %d.%d\n",
609 manufacturer, product,
610 rom->api_version_maj, rom->api_version_min,
611 pci->rom_version_maj, pci->rom_version_min);
612
613 license_gplok = license_is_gpl_compatible(license);
614 if (!license_gplok) {
615 printk(KERN_WARNING "VMI: ROM license '%s' taints kernel... "
616 "inlining disabled\n",
617 license);
618 add_taint(TAINT_PROPRIETARY_MODULE);
619 }
620 return 1;
621}
622
623/*
624 * Probe for the VMI option ROM
625 */
626static inline int __init probe_vmi_rom(void)
627{
628 unsigned long base;
629
630 /* VMI ROM is in option ROM area, check signature */
631 for (base = 0xC0000; base < 0xE0000; base += 2048) {
632 struct vrom_header *romstart;
633 romstart = (struct vrom_header *)isa_bus_to_virt(base);
634 if (check_vmi_rom(romstart)) {
635 vmi_rom = romstart;
636 return 1;
637 }
638 }
639 return 0;
640}
641
642/*
643 * VMI setup common to all processors
644 */
645void vmi_bringup(void)
646{
647 /* We must establish the lowmem mapping for MMU ops to work */
648 if (vmi_rom)
649 vmi_ops.set_linear_mapping(0, __PAGE_OFFSET, max_low_pfn, 0);
650}
651
652/*
653 * Return a pointer to the VMI function or a NOP stub
654 */
655static void *vmi_get_function(int vmicall)
656{
657 u64 reloc;
658 const struct vmi_relocation_info *rel = (struct vmi_relocation_info *)&reloc;
659 reloc = call_vrom_long_func(vmi_rom, get_reloc, vmicall);
660 BUG_ON(rel->type == VMI_RELOCATION_JUMP_REL);
661 if (rel->type == VMI_RELOCATION_CALL_REL)
662 return (void *)rel->eip;
663 else
664 return (void *)vmi_nop;
665}
666
667/*
668 * Helper macro for making the VMI paravirt-ops fill code readable.
669 * For unimplemented operations, fall back to default.
670 */
671#define para_fill(opname, vmicall) \
672do { \
673 reloc = call_vrom_long_func(vmi_rom, get_reloc, \
674 VMI_CALL_##vmicall); \
675 if (rel->type != VMI_RELOCATION_NONE) { \
676 BUG_ON(rel->type != VMI_RELOCATION_CALL_REL); \
677 paravirt_ops.opname = (void *)rel->eip; \
678 } \
679} while (0)
680
681/*
682 * Activate the VMI interface and switch into paravirtualized mode
683 */
684static inline int __init activate_vmi(void)
685{
686 short kernel_cs;
687 u64 reloc;
688 const struct vmi_relocation_info *rel = (struct vmi_relocation_info *)&reloc;
689
690 if (call_vrom_func(vmi_rom, vmi_init) != 0) {
691 printk(KERN_ERR "VMI ROM failed to initialize!");
692 return 0;
693 }
694 savesegment(cs, kernel_cs);
695
696 paravirt_ops.paravirt_enabled = 1;
697 paravirt_ops.kernel_rpl = kernel_cs & SEGMENT_RPL_MASK;
698
699 paravirt_ops.patch = vmi_patch;
700 paravirt_ops.name = "vmi";
701
702 /*
703 * Many of these operations are ABI compatible with VMI.
704 * This means we can fill in the paravirt-ops with direct
705 * pointers into the VMI ROM. If the calling convention for
706 * these operations changes, this code needs to be updated.
707 *
708 * Exceptions
709 * CPUID paravirt-op uses pointers, not the native ISA
710 * halt has no VMI equivalent; all VMI halts are "safe"
711 * no MSR support yet - just trap and emulate. VMI uses the
712 * same ABI as the native ISA, but Linux wants exceptions
713 * from bogus MSR read / write handled
714 * rdpmc is not yet used in Linux
715 */
716
717 /* CPUID is special, so very special */
718 reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_CPUID);
719 if (rel->type != VMI_RELOCATION_NONE) {
720 BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
721 vmi_ops.cpuid = (void *)rel->eip;
722 paravirt_ops.cpuid = vmi_cpuid;
723 }
724
725 para_fill(clts, CLTS);
726 para_fill(get_debugreg, GetDR);
727 para_fill(set_debugreg, SetDR);
728 para_fill(read_cr0, GetCR0);
729 para_fill(read_cr2, GetCR2);
730 para_fill(read_cr3, GetCR3);
731 para_fill(read_cr4, GetCR4);
732 para_fill(write_cr0, SetCR0);
733 para_fill(write_cr2, SetCR2);
734 para_fill(write_cr3, SetCR3);
735 para_fill(write_cr4, SetCR4);
736 para_fill(save_fl, GetInterruptMask);
737 para_fill(restore_fl, SetInterruptMask);
738 para_fill(irq_disable, DisableInterrupts);
739 para_fill(irq_enable, EnableInterrupts);
740 /* irq_save_disable !!! sheer pain */
741 patch_offset(&irq_save_disable_callout[IRQ_PATCH_INT_MASK],
742 (char *)paravirt_ops.save_fl);
743 patch_offset(&irq_save_disable_callout[IRQ_PATCH_DISABLE],
744 (char *)paravirt_ops.irq_disable);
745#ifndef CONFIG_NO_IDLE_HZ
746 para_fill(safe_halt, Halt);
747#else
748 vmi_ops.halt = vmi_get_function(VMI_CALL_Halt);
749 paravirt_ops.safe_halt = vmi_safe_halt;
750#endif
751 para_fill(wbinvd, WBINVD);
752 /* paravirt_ops.read_msr = vmi_rdmsr */
753 /* paravirt_ops.write_msr = vmi_wrmsr */
754 para_fill(read_tsc, RDTSC);
755 /* paravirt_ops.rdpmc = vmi_rdpmc */
756
757 /* TR interface doesn't pass TR value */
758 reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_SetTR);
759 if (rel->type != VMI_RELOCATION_NONE) {
760 BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
761 vmi_ops.set_tr = (void *)rel->eip;
762 paravirt_ops.load_tr_desc = vmi_set_tr;
763 }
764
765 /* LDT is special, too */
766 reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_SetLDT);
767 if (rel->type != VMI_RELOCATION_NONE) {
768 BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
769 vmi_ops._set_ldt = (void *)rel->eip;
770 paravirt_ops.set_ldt = vmi_set_ldt;
771 }
772
773 para_fill(load_gdt, SetGDT);
774 para_fill(load_idt, SetIDT);
775 para_fill(store_gdt, GetGDT);
776 para_fill(store_idt, GetIDT);
777 para_fill(store_tr, GetTR);
778 paravirt_ops.load_tls = vmi_load_tls;
779 para_fill(write_ldt_entry, WriteLDTEntry);
780 para_fill(write_gdt_entry, WriteGDTEntry);
781 para_fill(write_idt_entry, WriteIDTEntry);
782 reloc = call_vrom_long_func(vmi_rom, get_reloc,
783 VMI_CALL_UpdateKernelStack);
784 if (rel->type != VMI_RELOCATION_NONE) {
785 BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
786 vmi_ops.set_kernel_stack = (void *)rel->eip;
787 paravirt_ops.load_esp0 = vmi_load_esp0;
788 }
789
790 para_fill(set_iopl_mask, SetIOPLMask);
791 paravirt_ops.io_delay = (void *)vmi_nop;
792 if (!disable_nodelay) {
793 paravirt_ops.const_udelay = (void *)vmi_nop;
794 }
795
796 para_fill(set_lazy_mode, SetLazyMode);
797
798 reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_FlushTLB);
799 if (rel->type != VMI_RELOCATION_NONE) {
800 vmi_ops.flush_tlb = (void *)rel->eip;
801 paravirt_ops.flush_tlb_user = vmi_flush_tlb_user;
802 paravirt_ops.flush_tlb_kernel = vmi_flush_tlb_kernel;
803 }
804 para_fill(flush_tlb_single, InvalPage);
805
806 /*
807 * Until a standard flag format can be agreed on, we need to
808 * implement these as wrappers in Linux. Get the VMI ROM
809 * function pointers for the two backend calls.
810 */
811#ifdef CONFIG_X86_PAE
812 vmi_ops.set_pte = vmi_get_function(VMI_CALL_SetPxELong);
813 vmi_ops.update_pte = vmi_get_function(VMI_CALL_UpdatePxELong);
814#else
815 vmi_ops.set_pte = vmi_get_function(VMI_CALL_SetPxE);
816 vmi_ops.update_pte = vmi_get_function(VMI_CALL_UpdatePxE);
817#endif
818 vmi_ops.set_linear_mapping = vmi_get_function(VMI_CALL_SetLinearMapping);
819 vmi_ops.allocate_page = vmi_get_function(VMI_CALL_AllocatePage);
820 vmi_ops.release_page = vmi_get_function(VMI_CALL_ReleasePage);
821
822 paravirt_ops.alloc_pt = vmi_allocate_pt;
823 paravirt_ops.alloc_pd = vmi_allocate_pd;
824 paravirt_ops.alloc_pd_clone = vmi_allocate_pd_clone;
825 paravirt_ops.release_pt = vmi_release_pt;
826 paravirt_ops.release_pd = vmi_release_pd;
827 paravirt_ops.set_pte = vmi_set_pte;
828 paravirt_ops.set_pte_at = vmi_set_pte_at;
829 paravirt_ops.set_pmd = vmi_set_pmd;
830 paravirt_ops.pte_update = vmi_update_pte;
831 paravirt_ops.pte_update_defer = vmi_update_pte_defer;
832#ifdef CONFIG_X86_PAE
833 paravirt_ops.set_pte_atomic = vmi_set_pte_atomic;
834 paravirt_ops.set_pte_present = vmi_set_pte_present;
835 paravirt_ops.set_pud = vmi_set_pud;
836 paravirt_ops.pte_clear = vmi_pte_clear;
837 paravirt_ops.pmd_clear = vmi_pmd_clear;
838#endif
839 /*
840 * These MUST always be patched. Don't support indirect jumps
841 * through these operations, as the VMI interface may use either
842 * a jump or a call to get to these operations, depending on
843 * the backend. They are performance critical anyway, so requiring
844 * a patch is not a big problem.
845 */
846 paravirt_ops.irq_enable_sysexit = (void *)0xfeedbab0;
847 paravirt_ops.iret = (void *)0xbadbab0;
848
849#ifdef CONFIG_SMP
850 paravirt_ops.startup_ipi_hook = vmi_startup_ipi_hook;
851 vmi_ops.set_initial_ap_state = vmi_get_function(VMI_CALL_SetInitialAPState);
852#endif
853
854#ifdef CONFIG_X86_LOCAL_APIC
855 paravirt_ops.apic_read = vmi_get_function(VMI_CALL_APICRead);
856 paravirt_ops.apic_write = vmi_get_function(VMI_CALL_APICWrite);
857 paravirt_ops.apic_write_atomic = vmi_get_function(VMI_CALL_APICWrite);
858#endif
859
860 /*
861 * Check for VMI timer functionality by probing for a cycle frequency method
862 */
863 reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_GetCycleFrequency);
864 if (rel->type != VMI_RELOCATION_NONE) {
865 vmi_timer_ops.get_cycle_frequency = (void *)rel->eip;
866 vmi_timer_ops.get_cycle_counter =
867 vmi_get_function(VMI_CALL_GetCycleCounter);
868 vmi_timer_ops.get_wallclock =
869 vmi_get_function(VMI_CALL_GetWallclockTime);
870 vmi_timer_ops.wallclock_updated =
871 vmi_get_function(VMI_CALL_WallclockUpdated);
872 vmi_timer_ops.set_alarm = vmi_get_function(VMI_CALL_SetAlarm);
873 vmi_timer_ops.cancel_alarm =
874 vmi_get_function(VMI_CALL_CancelAlarm);
875 paravirt_ops.time_init = vmi_time_init;
876 paravirt_ops.get_wallclock = vmi_get_wallclock;
877 paravirt_ops.set_wallclock = vmi_set_wallclock;
878#ifdef CONFIG_X86_LOCAL_APIC
879 paravirt_ops.setup_boot_clock = vmi_timer_setup_boot_alarm;
880 paravirt_ops.setup_secondary_clock = vmi_timer_setup_secondary_alarm;
881#endif
882 custom_sched_clock = vmi_sched_clock;
883 }
884
885 /*
886 * Alternative instruction rewriting doesn't happen soon enough
887 * to convert VMI_IRET to a call instead of a jump; so we have
888 * to do this before IRQs get reenabled. Fortunately, it is
889 * idempotent.
890 */
891 apply_paravirt(__start_parainstructions, __stop_parainstructions);
892
893 vmi_bringup();
894
895 return 1;
896}
897
898#undef para_fill
899
900void __init vmi_init(void)
901{
902 unsigned long flags;
903
904 if (!vmi_rom)
905 probe_vmi_rom();
906 else
907 check_vmi_rom(vmi_rom);
908
909 /* In case probing for or validating the ROM failed, basil */
910 if (!vmi_rom)
911 return;
912
913 reserve_top_address(-vmi_rom->virtual_top);
914
915 local_irq_save(flags);
916 activate_vmi();
917#ifdef CONFIG_SMP
918 no_timer_check = 1;
919#endif
920 local_irq_restore(flags & X86_EFLAGS_IF);
921}
922
923static int __init parse_vmi(char *arg)
924{
925 if (!arg)
926 return -EINVAL;
927
928 if (!strcmp(arg, "disable_nodelay"))
929 disable_nodelay = 1;
930 else if (!strcmp(arg, "disable_pge")) {
931 clear_bit(X86_FEATURE_PGE, boot_cpu_data.x86_capability);
932 disable_pge = 1;
933 } else if (!strcmp(arg, "disable_pse")) {
934 clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
935 disable_pse = 1;
936 } else if (!strcmp(arg, "disable_sep")) {
937 clear_bit(X86_FEATURE_SEP, boot_cpu_data.x86_capability);
938 disable_sep = 1;
939 } else if (!strcmp(arg, "disable_tsc")) {
940 clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability);
941 disable_tsc = 1;
942 } else if (!strcmp(arg, "disable_mtrr")) {
943 clear_bit(X86_FEATURE_MTRR, boot_cpu_data.x86_capability);
944 disable_mtrr = 1;
945 }
946 return 0;
947}
948
949early_param("vmi", parse_vmi);
diff --git a/arch/i386/kernel/vmitime.c b/arch/i386/kernel/vmitime.c
new file mode 100644
index 000000000000..76d2adcae5a3
--- /dev/null
+++ b/arch/i386/kernel/vmitime.c
@@ -0,0 +1,499 @@
1/*
2 * VMI paravirtual timer support routines.
3 *
4 * Copyright (C) 2005, VMware, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 * Send feedback to dhecht@vmware.com
22 *
23 */
24
25/*
26 * Portions of this code from arch/i386/kernel/timers/timer_tsc.c.
27 * Portions of the CONFIG_NO_IDLE_HZ code from arch/s390/kernel/time.c.
28 * See comments there for proper credits.
29 */
30
31#include <linux/spinlock.h>
32#include <linux/init.h>
33#include <linux/errno.h>
34#include <linux/jiffies.h>
35#include <linux/interrupt.h>
36#include <linux/kernel_stat.h>
37#include <linux/rcupdate.h>
38#include <linux/clocksource.h>
39
40#include <asm/timer.h>
41#include <asm/io.h>
42#include <asm/apic.h>
43#include <asm/div64.h>
44#include <asm/timer.h>
45#include <asm/desc.h>
46
47#include <asm/vmi.h>
48#include <asm/vmi_time.h>
49
50#include <mach_timer.h>
51#include <io_ports.h>
52
53#ifdef CONFIG_X86_LOCAL_APIC
54#define VMI_ALARM_WIRING VMI_ALARM_WIRED_LVTT
55#else
56#define VMI_ALARM_WIRING VMI_ALARM_WIRED_IRQ0
57#endif
58
59/* Cached VMI operations */
60struct vmi_timer_ops vmi_timer_ops;
61
62#ifdef CONFIG_NO_IDLE_HZ
63
64/* /proc/sys/kernel/hz_timer state. */
65int sysctl_hz_timer;
66
67/* Some stats */
68static DEFINE_PER_CPU(unsigned long, vmi_idle_no_hz_irqs);
69static DEFINE_PER_CPU(unsigned long, vmi_idle_no_hz_jiffies);
70static DEFINE_PER_CPU(unsigned long, idle_start_jiffies);
71
72#endif /* CONFIG_NO_IDLE_HZ */
73
74/* Number of alarms per second. By default this is CONFIG_VMI_ALARM_HZ. */
75static int alarm_hz = CONFIG_VMI_ALARM_HZ;
76
77/* Cache of the value get_cycle_frequency / HZ. */
78static signed long long cycles_per_jiffy;
79
80/* Cache of the value get_cycle_frequency / alarm_hz. */
81static signed long long cycles_per_alarm;
82
83/* The number of cycles accounted for by the 'jiffies'/'xtime' count.
84 * Protected by xtime_lock. */
85static unsigned long long real_cycles_accounted_system;
86
87/* The number of cycles accounted for by update_process_times(), per cpu. */
88static DEFINE_PER_CPU(unsigned long long, process_times_cycles_accounted_cpu);
89
90/* The number of stolen cycles accounted, per cpu. */
91static DEFINE_PER_CPU(unsigned long long, stolen_cycles_accounted_cpu);
92
93/* Clock source. */
94static cycle_t read_real_cycles(void)
95{
96 return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
97}
98
99static cycle_t read_available_cycles(void)
100{
101 return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_AVAILABLE);
102}
103
104#if 0
105static cycle_t read_stolen_cycles(void)
106{
107 return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_STOLEN);
108}
109#endif /* 0 */
110
111static struct clocksource clocksource_vmi = {
112 .name = "vmi-timer",
113 .rating = 450,
114 .read = read_real_cycles,
115 .mask = CLOCKSOURCE_MASK(64),
116 .mult = 0, /* to be set */
117 .shift = 22,
118 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
119};
120
121
122/* Timer interrupt handler. */
123static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id);
124
125static struct irqaction vmi_timer_irq = {
126 vmi_timer_interrupt,
127 SA_INTERRUPT,
128 CPU_MASK_NONE,
129 "VMI-alarm",
130 NULL,
131 NULL
132};
133
134/* Alarm rate */
135static int __init vmi_timer_alarm_rate_setup(char* str)
136{
137 int alarm_rate;
138 if (get_option(&str, &alarm_rate) == 1 && alarm_rate > 0) {
139 alarm_hz = alarm_rate;
140 printk(KERN_WARNING "VMI timer alarm HZ set to %d\n", alarm_hz);
141 }
142 return 1;
143}
144__setup("vmi_timer_alarm_hz=", vmi_timer_alarm_rate_setup);
145
146
147/* Initialization */
148static void vmi_get_wallclock_ts(struct timespec *ts)
149{
150 unsigned long long wallclock;
151 wallclock = vmi_timer_ops.get_wallclock(); // nsec units
152 ts->tv_nsec = do_div(wallclock, 1000000000);
153 ts->tv_sec = wallclock;
154}
155
156static void update_xtime_from_wallclock(void)
157{
158 struct timespec ts;
159 vmi_get_wallclock_ts(&ts);
160 do_settimeofday(&ts);
161}
162
163unsigned long vmi_get_wallclock(void)
164{
165 struct timespec ts;
166 vmi_get_wallclock_ts(&ts);
167 return ts.tv_sec;
168}
169
170int vmi_set_wallclock(unsigned long now)
171{
172 return -1;
173}
174
175unsigned long long vmi_sched_clock(void)
176{
177 return read_available_cycles();
178}
179
180void __init vmi_time_init(void)
181{
182 unsigned long long cycles_per_sec, cycles_per_msec;
183 unsigned long flags;
184
185 local_irq_save(flags);
186 setup_irq(0, &vmi_timer_irq);
187#ifdef CONFIG_X86_LOCAL_APIC
188 set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt);
189#endif
190
191 no_sync_cmos_clock = 1;
192
193 vmi_get_wallclock_ts(&xtime);
194 set_normalized_timespec(&wall_to_monotonic,
195 -xtime.tv_sec, -xtime.tv_nsec);
196
197 real_cycles_accounted_system = read_real_cycles();
198 update_xtime_from_wallclock();
199 per_cpu(process_times_cycles_accounted_cpu, 0) = read_available_cycles();
200
201 cycles_per_sec = vmi_timer_ops.get_cycle_frequency();
202
203 cycles_per_jiffy = cycles_per_sec;
204 (void)do_div(cycles_per_jiffy, HZ);
205 cycles_per_alarm = cycles_per_sec;
206 (void)do_div(cycles_per_alarm, alarm_hz);
207 cycles_per_msec = cycles_per_sec;
208 (void)do_div(cycles_per_msec, 1000);
209 cpu_khz = cycles_per_msec;
210
211 printk(KERN_WARNING "VMI timer cycles/sec = %llu ; cycles/jiffy = %llu ;"
212 "cycles/alarm = %llu\n", cycles_per_sec, cycles_per_jiffy,
213 cycles_per_alarm);
214
215 clocksource_vmi.mult = clocksource_khz2mult(cycles_per_msec,
216 clocksource_vmi.shift);
217 if (clocksource_register(&clocksource_vmi))
218 printk(KERN_WARNING "Error registering VMITIME clocksource.");
219
220 /* Disable PIT. */
221 outb_p(0x3a, PIT_MODE); /* binary, mode 5, LSB/MSB, ch 0 */
222
223 /* schedule the alarm. do this in phase with process_times_cycles_accounted_cpu
224 * reduce the latency calling update_process_times. */
225 vmi_timer_ops.set_alarm(
226 VMI_ALARM_WIRED_IRQ0 | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
227 per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
228 cycles_per_alarm);
229
230 local_irq_restore(flags);
231}
232
233#ifdef CONFIG_X86_LOCAL_APIC
234
235void __init vmi_timer_setup_boot_alarm(void)
236{
237 local_irq_disable();
238
239 /* Route the interrupt to the correct vector. */
240 apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
241
242 /* Cancel the IRQ0 wired alarm, and setup the LVTT alarm. */
243 vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
244 vmi_timer_ops.set_alarm(
245 VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
246 per_cpu(process_times_cycles_accounted_cpu, 0) + cycles_per_alarm,
247 cycles_per_alarm);
248 local_irq_enable();
249}
250
251/* Initialize the time accounting variables for an AP on an SMP system.
252 * Also, set the local alarm for the AP. */
253void __init vmi_timer_setup_secondary_alarm(void)
254{
255 int cpu = smp_processor_id();
256
257 /* Route the interrupt to the correct vector. */
258 apic_write_around(APIC_LVTT, LOCAL_TIMER_VECTOR);
259
260 per_cpu(process_times_cycles_accounted_cpu, cpu) = read_available_cycles();
261
262 vmi_timer_ops.set_alarm(
263 VMI_ALARM_WIRED_LVTT | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
264 per_cpu(process_times_cycles_accounted_cpu, cpu) + cycles_per_alarm,
265 cycles_per_alarm);
266}
267
268#endif
269
270/* Update system wide (real) time accounting (e.g. jiffies, xtime). */
271static void vmi_account_real_cycles(unsigned long long cur_real_cycles)
272{
273 long long cycles_not_accounted;
274
275 write_seqlock(&xtime_lock);
276
277 cycles_not_accounted = cur_real_cycles - real_cycles_accounted_system;
278 while (cycles_not_accounted >= cycles_per_jiffy) {
279 /* systems wide jiffies and wallclock. */
280 do_timer(1);
281
282 cycles_not_accounted -= cycles_per_jiffy;
283 real_cycles_accounted_system += cycles_per_jiffy;
284 }
285
286 if (vmi_timer_ops.wallclock_updated())
287 update_xtime_from_wallclock();
288
289 write_sequnlock(&xtime_lock);
290}
291
292/* Update per-cpu process times. */
293static void vmi_account_process_times_cycles(struct pt_regs *regs, int cpu,
294 unsigned long long cur_process_times_cycles)
295{
296 long long cycles_not_accounted;
297 cycles_not_accounted = cur_process_times_cycles -
298 per_cpu(process_times_cycles_accounted_cpu, cpu);
299
300 while (cycles_not_accounted >= cycles_per_jiffy) {
301 /* Account time to the current process. This includes
302 * calling into the scheduler to decrement the timeslice
303 * and possibly reschedule.*/
304 update_process_times(user_mode(regs));
305 /* XXX handle /proc/profile multiplier. */
306 profile_tick(CPU_PROFILING);
307
308 cycles_not_accounted -= cycles_per_jiffy;
309 per_cpu(process_times_cycles_accounted_cpu, cpu) += cycles_per_jiffy;
310 }
311}
312
313#ifdef CONFIG_NO_IDLE_HZ
314/* Update per-cpu idle times. Used when a no-hz halt is ended. */
315static void vmi_account_no_hz_idle_cycles(int cpu,
316 unsigned long long cur_process_times_cycles)
317{
318 long long cycles_not_accounted;
319 unsigned long no_idle_hz_jiffies = 0;
320
321 cycles_not_accounted = cur_process_times_cycles -
322 per_cpu(process_times_cycles_accounted_cpu, cpu);
323
324 while (cycles_not_accounted >= cycles_per_jiffy) {
325 no_idle_hz_jiffies++;
326 cycles_not_accounted -= cycles_per_jiffy;
327 per_cpu(process_times_cycles_accounted_cpu, cpu) += cycles_per_jiffy;
328 }
329 /* Account time to the idle process. */
330 account_steal_time(idle_task(cpu), jiffies_to_cputime(no_idle_hz_jiffies));
331}
332#endif
333
334/* Update per-cpu stolen time. */
335static void vmi_account_stolen_cycles(int cpu,
336 unsigned long long cur_real_cycles,
337 unsigned long long cur_avail_cycles)
338{
339 long long stolen_cycles_not_accounted;
340 unsigned long stolen_jiffies = 0;
341
342 if (cur_real_cycles < cur_avail_cycles)
343 return;
344
345 stolen_cycles_not_accounted = cur_real_cycles - cur_avail_cycles -
346 per_cpu(stolen_cycles_accounted_cpu, cpu);
347
348 while (stolen_cycles_not_accounted >= cycles_per_jiffy) {
349 stolen_jiffies++;
350 stolen_cycles_not_accounted -= cycles_per_jiffy;
351 per_cpu(stolen_cycles_accounted_cpu, cpu) += cycles_per_jiffy;
352 }
353 /* HACK: pass NULL to force time onto cpustat->steal. */
354 account_steal_time(NULL, jiffies_to_cputime(stolen_jiffies));
355}
356
357/* Body of either IRQ0 interrupt handler (UP no local-APIC) or
358 * local-APIC LVTT interrupt handler (UP & local-APIC or SMP). */
359static void vmi_local_timer_interrupt(int cpu)
360{
361 unsigned long long cur_real_cycles, cur_process_times_cycles;
362
363 cur_real_cycles = read_real_cycles();
364 cur_process_times_cycles = read_available_cycles();
365 /* Update system wide (real) time state (xtime, jiffies). */
366 vmi_account_real_cycles(cur_real_cycles);
367 /* Update per-cpu process times. */
368 vmi_account_process_times_cycles(get_irq_regs(), cpu, cur_process_times_cycles);
369 /* Update time stolen from this cpu by the hypervisor. */
370 vmi_account_stolen_cycles(cpu, cur_real_cycles, cur_process_times_cycles);
371}
372
373#ifdef CONFIG_NO_IDLE_HZ
374
375/* Must be called only from idle loop, with interrupts disabled. */
376int vmi_stop_hz_timer(void)
377{
378 /* Note that cpu_set, cpu_clear are (SMP safe) atomic on x86. */
379
380 unsigned long seq, next;
381 unsigned long long real_cycles_expiry;
382 int cpu = smp_processor_id();
383 int idle;
384
385 BUG_ON(!irqs_disabled());
386 if (sysctl_hz_timer != 0)
387 return 0;
388
389 cpu_set(cpu, nohz_cpu_mask);
390 smp_mb();
391 if (rcu_needs_cpu(cpu) || local_softirq_pending() ||
392 (next = next_timer_interrupt(), time_before_eq(next, jiffies))) {
393 cpu_clear(cpu, nohz_cpu_mask);
394 next = jiffies;
395 idle = 0;
396 } else
397 idle = 1;
398
399 /* Convert jiffies to the real cycle counter. */
400 do {
401 seq = read_seqbegin(&xtime_lock);
402 real_cycles_expiry = real_cycles_accounted_system +
403 (long)(next - jiffies) * cycles_per_jiffy;
404 } while (read_seqretry(&xtime_lock, seq));
405
406 /* This cpu is going idle. Disable the periodic alarm. */
407 if (idle) {
408 vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
409 per_cpu(idle_start_jiffies, cpu) = jiffies;
410 }
411
412 /* Set the real time alarm to expire at the next event. */
413 vmi_timer_ops.set_alarm(
414 VMI_ALARM_WIRING | VMI_ALARM_IS_ONESHOT | VMI_CYCLES_REAL,
415 real_cycles_expiry, 0);
416
417 return idle;
418}
419
420static void vmi_reenable_hz_timer(int cpu)
421{
422 /* For /proc/vmi/info idle_hz stat. */
423 per_cpu(vmi_idle_no_hz_jiffies, cpu) += jiffies - per_cpu(idle_start_jiffies, cpu);
424 per_cpu(vmi_idle_no_hz_irqs, cpu)++;
425
426 /* Don't bother explicitly cancelling the one-shot alarm -- at
427 * worse we will receive a spurious timer interrupt. */
428 vmi_timer_ops.set_alarm(
429 VMI_ALARM_WIRING | VMI_ALARM_IS_PERIODIC | VMI_CYCLES_AVAILABLE,
430 per_cpu(process_times_cycles_accounted_cpu, cpu) + cycles_per_alarm,
431 cycles_per_alarm);
432 /* Indicate this cpu is no longer nohz idle. */
433 cpu_clear(cpu, nohz_cpu_mask);
434}
435
436/* Called from interrupt handlers when (local) HZ timer is disabled. */
437void vmi_account_time_restart_hz_timer(void)
438{
439 unsigned long long cur_real_cycles, cur_process_times_cycles;
440 int cpu = smp_processor_id();
441
442 BUG_ON(!irqs_disabled());
443 /* Account the time during which the HZ timer was disabled. */
444 cur_real_cycles = read_real_cycles();
445 cur_process_times_cycles = read_available_cycles();
446 /* Update system wide (real) time state (xtime, jiffies). */
447 vmi_account_real_cycles(cur_real_cycles);
448 /* Update per-cpu idle times. */
449 vmi_account_no_hz_idle_cycles(cpu, cur_process_times_cycles);
450 /* Update time stolen from this cpu by the hypervisor. */
451 vmi_account_stolen_cycles(cpu, cur_real_cycles, cur_process_times_cycles);
452 /* Reenable the hz timer. */
453 vmi_reenable_hz_timer(cpu);
454}
455
456#endif /* CONFIG_NO_IDLE_HZ */
457
458/* UP (and no local-APIC) VMI-timer alarm interrupt handler.
459 * Handler for IRQ0. Not used when SMP or X86_LOCAL_APIC after
460 * APIC setup and setup_boot_vmi_alarm() is called. */
461static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id)
462{
463 vmi_local_timer_interrupt(smp_processor_id());
464 return IRQ_HANDLED;
465}
466
467#ifdef CONFIG_X86_LOCAL_APIC
468
469/* SMP VMI-timer alarm interrupt handler. Handler for LVTT vector.
470 * Also used in UP when CONFIG_X86_LOCAL_APIC.
471 * The wrapper code is from arch/i386/kernel/apic.c#smp_apic_timer_interrupt. */
472void smp_apic_vmi_timer_interrupt(struct pt_regs *regs)
473{
474 struct pt_regs *old_regs = set_irq_regs(regs);
475 int cpu = smp_processor_id();
476
477 /*
478 * the NMI deadlock-detector uses this.
479 */
480 per_cpu(irq_stat,cpu).apic_timer_irqs++;
481
482 /*
483 * NOTE! We'd better ACK the irq immediately,
484 * because timer handling can be slow.
485 */
486 ack_APIC_irq();
487
488 /*
489 * update_process_times() expects us to have done irq_enter().
490 * Besides, if we don't timer interrupts ignore the global
491 * interrupt lock, which is the WrongThing (tm) to do.
492 */
493 irq_enter();
494 vmi_local_timer_interrupt(cpu);
495 irq_exit();
496 set_irq_regs(old_regs);
497}
498
499#endif /* CONFIG_X86_LOCAL_APIC */
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index a53c8b1854b5..ca51610955df 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -37,9 +37,14 @@ SECTIONS
37{ 37{
38 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR; 38 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
39 phys_startup_32 = startup_32 - LOAD_OFFSET; 39 phys_startup_32 = startup_32 - LOAD_OFFSET;
40
41 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
42 _text = .; /* Text and read-only data */
43 *(.text.head)
44 } :text = 0x9090
45
40 /* read-only */ 46 /* read-only */
41 .text : AT(ADDR(.text) - LOAD_OFFSET) { 47 .text : AT(ADDR(.text) - LOAD_OFFSET) {
42 _text = .; /* Text and read-only data */
43 *(.text) 48 *(.text)
44 SCHED_TEXT 49 SCHED_TEXT
45 LOCK_TEXT 50 LOCK_TEXT
@@ -181,12 +186,14 @@ SECTIONS
181 from .altinstructions and .eh_frame */ 186 from .altinstructions and .eh_frame */
182 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 187 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
183 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 188 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
189#if defined(CONFIG_BLK_DEV_INITRD)
184 . = ALIGN(4096); 190 . = ALIGN(4096);
185 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 191 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
186 __initramfs_start = .; 192 __initramfs_start = .;
187 *(.init.ramfs) 193 *(.init.ramfs)
188 __initramfs_end = .; 194 __initramfs_end = .;
189 } 195 }
196#endif
190 . = ALIGN(L1_CACHE_BYTES); 197 . = ALIGN(L1_CACHE_BYTES);
191 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { 198 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
192 __per_cpu_start = .; 199 __per_cpu_start = .;
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index cc2f519b2f7f..c78816210706 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -79,7 +79,12 @@ void __init trap_init_hook(void)
79{ 79{
80} 80}
81 81
82static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; 82static struct irqaction irq0 = {
83 .handler = timer_interrupt,
84 .flags = IRQF_DISABLED | IRQF_NOBALANCING,
85 .mask = CPU_MASK_NONE,
86 .name = "timer"
87};
83 88
84/** 89/**
85 * time_init_hook - do any specific initialisations for the system timer. 90 * time_init_hook - do any specific initialisations for the system timer.
@@ -90,6 +95,7 @@ static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE,
90 **/ 95 **/
91void __init time_init_hook(void) 96void __init time_init_hook(void)
92{ 97{
98 irq0.mask = cpumask_of_cpu(0);
93 setup_irq(0, &irq0); 99 setup_irq(0, &irq0);
94} 100}
95 101
diff --git a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h
index 80566ca4a80a..c8d5aa132fa0 100644
--- a/arch/i386/mach-es7000/es7000.h
+++ b/arch/i386/mach-es7000/es7000.h
@@ -84,15 +84,6 @@ struct es7000_oem_table {
84}; 84};
85 85
86#ifdef CONFIG_ACPI 86#ifdef CONFIG_ACPI
87struct acpi_table_sdt {
88 unsigned long pa;
89 unsigned long count;
90 struct {
91 unsigned long pa;
92 enum acpi_table_id id;
93 unsigned long size;
94 } entry[50];
95};
96 87
97struct oem_table { 88struct oem_table {
98 struct acpi_table_header Header; 89 struct acpi_table_header Header;
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index 3d0fc853516d..9be6ceabf042 100644
--- a/arch/i386/mach-es7000/es7000plat.c
+++ b/arch/i386/mach-es7000/es7000plat.c
@@ -160,51 +160,14 @@ parse_unisys_oem (char *oemptr)
160int __init 160int __init
161find_unisys_acpi_oem_table(unsigned long *oem_addr) 161find_unisys_acpi_oem_table(unsigned long *oem_addr)
162{ 162{
163 struct acpi_table_rsdp *rsdp = NULL; 163 struct acpi_table_header *header = NULL;
164 unsigned long rsdp_phys = 0; 164 int i = 0;
165 struct acpi_table_header *header = NULL; 165 while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) {
166 int i; 166 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
167 struct acpi_table_sdt sdt; 167 struct oem_table *t = (struct oem_table *)header;
168 168 *oem_addr = (unsigned long)__acpi_map_table(t->OEMTableAddr,
169 rsdp_phys = acpi_find_rsdp(); 169 t->OEMTableSize);
170 rsdp = __va(rsdp_phys); 170 return 0;
171 if (rsdp->rsdt_address) {
172 struct acpi_table_rsdt *mapped_rsdt = NULL;
173 sdt.pa = rsdp->rsdt_address;
174
175 header = (struct acpi_table_header *)
176 __acpi_map_table(sdt.pa, sizeof(struct acpi_table_header));
177 if (!header)
178 return -ENODEV;
179
180 sdt.count = (header->length - sizeof(struct acpi_table_header)) >> 3;
181 mapped_rsdt = (struct acpi_table_rsdt *)
182 __acpi_map_table(sdt.pa, header->length);
183 if (!mapped_rsdt)
184 return -ENODEV;
185
186 header = &mapped_rsdt->header;
187
188 for (i = 0; i < sdt.count; i++)
189 sdt.entry[i].pa = (unsigned long) mapped_rsdt->entry[i];
190 };
191 for (i = 0; i < sdt.count; i++) {
192
193 header = (struct acpi_table_header *)
194 __acpi_map_table(sdt.entry[i].pa,
195 sizeof(struct acpi_table_header));
196 if (!header)
197 continue;
198 if (!strncmp((char *) &header->signature, "OEM1", 4)) {
199 if (!strncmp((char *) &header->oem_id, "UNISYS", 6)) {
200 void *addr;
201 struct oem_table *t;
202 acpi_table_print(header, sdt.entry[i].pa);
203 t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length);
204 addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize);
205 *oem_addr = (unsigned long) addr;
206 return 0;
207 }
208 } 171 }
209 } 172 }
210 return -1; 173 return -1;
diff --git a/arch/i386/math-emu/get_address.c b/arch/i386/math-emu/get_address.c
index 9819b705efa4..2e2c51a8bd3a 100644
--- a/arch/i386/math-emu/get_address.c
+++ b/arch/i386/math-emu/get_address.c
@@ -56,15 +56,14 @@ static int reg_offset_vm86[] = {
56#define VM86_REG_(x) (*(unsigned short *) \ 56#define VM86_REG_(x) (*(unsigned short *) \
57 (reg_offset_vm86[((unsigned)x)]+(u_char *) FPU_info)) 57 (reg_offset_vm86[((unsigned)x)]+(u_char *) FPU_info))
58 58
59/* These are dummy, fs and gs are not saved on the stack. */ 59/* This dummy, gs is not saved on the stack. */
60#define ___FS ___ds
61#define ___GS ___ds 60#define ___GS ___ds
62 61
63static int reg_offset_pm[] = { 62static int reg_offset_pm[] = {
64 offsetof(struct info,___cs), 63 offsetof(struct info,___cs),
65 offsetof(struct info,___ds), 64 offsetof(struct info,___ds),
66 offsetof(struct info,___es), 65 offsetof(struct info,___es),
67 offsetof(struct info,___FS), 66 offsetof(struct info,___fs),
68 offsetof(struct info,___GS), 67 offsetof(struct info,___GS),
69 offsetof(struct info,___ss), 68 offsetof(struct info,___ss),
70 offsetof(struct info,___ds) 69 offsetof(struct info,___ds)
@@ -169,13 +168,10 @@ static long pm_address(u_char FPU_modrm, u_char segment,
169 168
170 switch ( segment ) 169 switch ( segment )
171 { 170 {
172 /* fs and gs aren't used by the kernel, so they still have their 171 /* gs isn't used by the kernel, so it still has its
173 user-space values. */ 172 user-space value. */
174 case PREFIX_FS_-1:
175 /* N.B. - movl %seg, mem is a 2 byte write regardless of prefix */
176 savesegment(fs, addr->selector);
177 break;
178 case PREFIX_GS_-1: 173 case PREFIX_GS_-1:
174 /* N.B. - movl %seg, mem is a 2 byte write regardless of prefix */
179 savesegment(gs, addr->selector); 175 savesegment(gs, addr->selector);
180 break; 176 break;
181 default: 177 default:
diff --git a/arch/i386/math-emu/status_w.h b/arch/i386/math-emu/status_w.h
index 78d7b7689dd6..59e73302aa60 100644
--- a/arch/i386/math-emu/status_w.h
+++ b/arch/i386/math-emu/status_w.h
@@ -48,9 +48,11 @@
48 48
49#define status_word() \ 49#define status_word() \
50 ((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top)) 50 ((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top))
51#define setcc(cc) ({ \ 51static inline void setcc(int cc)
52 partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \ 52{
53 partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); }) 53 partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3);
54 partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3);
55}
54 56
55#ifdef PECULIAR_486 57#ifdef PECULIAR_486
56 /* Default, this conveys no information, but an 80486 does it. */ 58 /* Default, this conveys no information, but an 80486 does it. */
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index e0c390d6ceb5..aa58720f6871 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -101,7 +101,6 @@ extern void find_max_pfn(void);
101extern void add_one_highpage_init(struct page *, int, int); 101extern void add_one_highpage_init(struct page *, int, int);
102 102
103extern struct e820map e820; 103extern struct e820map e820;
104extern unsigned long init_pg_tables_end;
105extern unsigned long highend_pfn, highstart_pfn; 104extern unsigned long highend_pfn, highstart_pfn;
106extern unsigned long max_low_pfn; 105extern unsigned long max_low_pfn;
107extern unsigned long totalram_pages; 106extern unsigned long totalram_pages;
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index aaaa4d225f7e..b8c4e259fc8b 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -46,43 +46,17 @@ int unregister_page_fault_notifier(struct notifier_block *nb)
46} 46}
47EXPORT_SYMBOL_GPL(unregister_page_fault_notifier); 47EXPORT_SYMBOL_GPL(unregister_page_fault_notifier);
48 48
49static inline int notify_page_fault(enum die_val val, const char *str, 49static inline int notify_page_fault(struct pt_regs *regs, long err)
50 struct pt_regs *regs, long err, int trap, int sig)
51{ 50{
52 struct die_args args = { 51 struct die_args args = {
53 .regs = regs, 52 .regs = regs,
54 .str = str, 53 .str = "page fault",
55 .err = err, 54 .err = err,
56 .trapnr = trap, 55 .trapnr = 14,
57 .signr = sig 56 .signr = SIGSEGV
58 }; 57 };
59 return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args); 58 return atomic_notifier_call_chain(&notify_page_fault_chain,
60} 59 DIE_PAGE_FAULT, &args);
61
62/*
63 * Unlock any spinlocks which will prevent us from getting the
64 * message out
65 */
66void bust_spinlocks(int yes)
67{
68 int loglevel_save = console_loglevel;
69
70 if (yes) {
71 oops_in_progress = 1;
72 return;
73 }
74#ifdef CONFIG_VT
75 unblank_screen();
76#endif
77 oops_in_progress = 0;
78 /*
79 * OK, the message is on the console. Now we call printk()
80 * without oops_in_progress set so that printk will give klogd
81 * a poke. Hold onto your hats...
82 */
83 console_loglevel = 15; /* NMI oopser may have shut the console up */
84 printk(" ");
85 console_loglevel = loglevel_save;
86} 60}
87 61
88/* 62/*
@@ -353,8 +327,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
353 if (unlikely(address >= TASK_SIZE)) { 327 if (unlikely(address >= TASK_SIZE)) {
354 if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0) 328 if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0)
355 return; 329 return;
356 if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 330 if (notify_page_fault(regs, error_code) == NOTIFY_STOP)
357 SIGSEGV) == NOTIFY_STOP)
358 return; 331 return;
359 /* 332 /*
360 * Don't take the mm semaphore here. If we fixup a prefetch 333 * Don't take the mm semaphore here. If we fixup a prefetch
@@ -363,8 +336,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
363 goto bad_area_nosemaphore; 336 goto bad_area_nosemaphore;
364 } 337 }
365 338
366 if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 339 if (notify_page_fault(regs, error_code) == NOTIFY_STOP)
367 SIGSEGV) == NOTIFY_STOP)
368 return; 340 return;
369 341
370 /* It's safe to allow irq's after cr2 has been saved and the vmalloc 342 /* It's safe to allow irq's after cr2 has been saved and the vmalloc
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index e0fa6cb655a8..bb2de1089add 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -33,13 +33,14 @@ void *kmap_atomic(struct page *page, enum km_type type)
33 33
34 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ 34 /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
35 pagefault_disable(); 35 pagefault_disable();
36
37 idx = type + KM_TYPE_NR*smp_processor_id();
38 BUG_ON(!pte_none(*(kmap_pte-idx)));
39
36 if (!PageHighMem(page)) 40 if (!PageHighMem(page))
37 return page_address(page); 41 return page_address(page);
38 42
39 idx = type + KM_TYPE_NR*smp_processor_id();
40 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 43 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
41 if (!pte_none(*(kmap_pte-idx)))
42 BUG();
43 set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); 44 set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
44 45
45 return (void*) vaddr; 46 return (void*) vaddr;
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index c5c5ea700cc7..ae436882af7a 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -62,6 +62,7 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
62 62
63#ifdef CONFIG_X86_PAE 63#ifdef CONFIG_X86_PAE
64 pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); 64 pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
65 paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
65 set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT)); 66 set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
66 pud = pud_offset(pgd, 0); 67 pud = pud_offset(pgd, 0);
67 if (pmd_table != pmd_offset(pud, 0)) 68 if (pmd_table != pmd_offset(pud, 0))
@@ -82,6 +83,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
82{ 83{
83 if (pmd_none(*pmd)) { 84 if (pmd_none(*pmd)) {
84 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); 85 pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
86 paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT);
85 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); 87 set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
86 if (page_table != pte_offset_kernel(pmd, 0)) 88 if (page_table != pte_offset_kernel(pmd, 0))
87 BUG(); 89 BUG();
@@ -345,6 +347,8 @@ static void __init pagetable_init (void)
345 /* Init entries of the first-level page table to the zero page */ 347 /* Init entries of the first-level page table to the zero page */
346 for (i = 0; i < PTRS_PER_PGD; i++) 348 for (i = 0; i < PTRS_PER_PGD; i++)
347 set_pgd(pgd_base + i, __pgd(__pa(empty_zero_page) | _PAGE_PRESENT)); 349 set_pgd(pgd_base + i, __pgd(__pa(empty_zero_page) | _PAGE_PRESENT));
350#else
351 paravirt_alloc_pd(__pa(swapper_pg_dir) >> PAGE_SHIFT);
348#endif 352#endif
349 353
350 /* Enable PSE if available */ 354 /* Enable PSE if available */
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index ad91528bdc14..412ebbd8adb0 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -60,6 +60,7 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,
60 address = __pa(address); 60 address = __pa(address);
61 addr = address & LARGE_PAGE_MASK; 61 addr = address & LARGE_PAGE_MASK;
62 pbase = (pte_t *)page_address(base); 62 pbase = (pte_t *)page_address(base);
63 paravirt_alloc_pt(page_to_pfn(base));
63 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { 64 for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) {
64 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, 65 set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT,
65 addr == address ? prot : ref_prot)); 66 addr == address ? prot : ref_prot));
@@ -172,6 +173,7 @@ __change_page_attr(struct page *page, pgprot_t prot)
172 if (!PageReserved(kpte_page)) { 173 if (!PageReserved(kpte_page)) {
173 if (cpu_has_pse && (page_private(kpte_page) == 0)) { 174 if (cpu_has_pse && (page_private(kpte_page) == 0)) {
174 ClearPagePrivate(kpte_page); 175 ClearPagePrivate(kpte_page);
176 paravirt_release_pt(page_to_pfn(kpte_page));
175 list_add(&kpte_page->lru, &df_list); 177 list_add(&kpte_page->lru, &df_list);
176 revert_page(kpte_page, address); 178 revert_page(kpte_page, address);
177 } 179 }
@@ -224,7 +226,7 @@ void global_flush_tlb(void)
224 list_replace_init(&df_list, &l); 226 list_replace_init(&df_list, &l);
225 spin_unlock_irq(&cpa_lock); 227 spin_unlock_irq(&cpa_lock);
226 if (!cpu_has_clflush) 228 if (!cpu_has_clflush)
227 flush_map(0); 229 flush_map(NULL);
228 list_for_each_entry_safe(pg, next, &l, lru) { 230 list_for_each_entry_safe(pg, next, &l, lru) {
229 if (cpu_has_clflush) 231 if (cpu_has_clflush)
230 flush_map(page_address(pg)); 232 flush_map(page_address(pg));
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
index f349eaf450b0..fa0cfbd551e1 100644
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -171,6 +171,8 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
171void reserve_top_address(unsigned long reserve) 171void reserve_top_address(unsigned long reserve)
172{ 172{
173 BUG_ON(fixmaps > 0); 173 BUG_ON(fixmaps > 0);
174 printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
175 (int)-reserve);
174#ifdef CONFIG_COMPAT_VDSO 176#ifdef CONFIG_COMPAT_VDSO
175 BUG_ON(reserve != 0); 177 BUG_ON(reserve != 0);
176#else 178#else
@@ -248,9 +250,15 @@ void pgd_ctor(void *pgd, struct kmem_cache *cache, unsigned long unused)
248 clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, 250 clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
249 swapper_pg_dir + USER_PTRS_PER_PGD, 251 swapper_pg_dir + USER_PTRS_PER_PGD,
250 KERNEL_PGD_PTRS); 252 KERNEL_PGD_PTRS);
253
251 if (PTRS_PER_PMD > 1) 254 if (PTRS_PER_PMD > 1)
252 return; 255 return;
253 256
257 /* must happen under lock */
258 paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT,
259 __pa(swapper_pg_dir) >> PAGE_SHIFT,
260 USER_PTRS_PER_PGD, PTRS_PER_PGD - USER_PTRS_PER_PGD);
261
254 pgd_list_add(pgd); 262 pgd_list_add(pgd);
255 spin_unlock_irqrestore(&pgd_lock, flags); 263 spin_unlock_irqrestore(&pgd_lock, flags);
256} 264}
@@ -260,6 +268,7 @@ void pgd_dtor(void *pgd, struct kmem_cache *cache, unsigned long unused)
260{ 268{
261 unsigned long flags; /* can be called from interrupt context */ 269 unsigned long flags; /* can be called from interrupt context */
262 270
271 paravirt_release_pd(__pa(pgd) >> PAGE_SHIFT);
263 spin_lock_irqsave(&pgd_lock, flags); 272 spin_lock_irqsave(&pgd_lock, flags);
264 pgd_list_del(pgd); 273 pgd_list_del(pgd);
265 spin_unlock_irqrestore(&pgd_lock, flags); 274 spin_unlock_irqrestore(&pgd_lock, flags);
@@ -277,13 +286,18 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
277 pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL); 286 pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
278 if (!pmd) 287 if (!pmd)
279 goto out_oom; 288 goto out_oom;
289 paravirt_alloc_pd(__pa(pmd) >> PAGE_SHIFT);
280 set_pgd(&pgd[i], __pgd(1 + __pa(pmd))); 290 set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
281 } 291 }
282 return pgd; 292 return pgd;
283 293
284out_oom: 294out_oom:
285 for (i--; i >= 0; i--) 295 for (i--; i >= 0; i--) {
286 kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); 296 pgd_t pgdent = pgd[i];
297 void* pmd = (void *)__va(pgd_val(pgdent)-1);
298 paravirt_release_pd(__pa(pmd) >> PAGE_SHIFT);
299 kmem_cache_free(pmd_cache, pmd);
300 }
287 kmem_cache_free(pgd_cache, pgd); 301 kmem_cache_free(pgd_cache, pgd);
288 return NULL; 302 return NULL;
289} 303}
@@ -294,8 +308,12 @@ void pgd_free(pgd_t *pgd)
294 308
295 /* in the PAE case user pgd entries are overwritten before usage */ 309 /* in the PAE case user pgd entries are overwritten before usage */
296 if (PTRS_PER_PMD > 1) 310 if (PTRS_PER_PMD > 1)
297 for (i = 0; i < USER_PTRS_PER_PGD; ++i) 311 for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
298 kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); 312 pgd_t pgdent = pgd[i];
313 void* pmd = (void *)__va(pgd_val(pgdent)-1);
314 paravirt_release_pd(__pa(pmd) >> PAGE_SHIFT);
315 kmem_cache_free(pmd_cache, pmd);
316 }
299 /* in the non-PAE case, free_pgtables() clears user pgd entries */ 317 /* in the non-PAE case, free_pgtables() clears user pgd entries */
300 kmem_cache_free(pgd_cache, pgd); 318 kmem_cache_free(pgd_cache, pgd);
301} 319}
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
index 3700eef78743..8fda7be9dd4d 100644
--- a/arch/i386/oprofile/nmi_int.c
+++ b/arch/i386/oprofile/nmi_int.c
@@ -63,7 +63,7 @@ static struct sys_device device_oprofile = {
63}; 63};
64 64
65 65
66static int __init init_driverfs(void) 66static int __init init_sysfs(void)
67{ 67{
68 int error; 68 int error;
69 if (!(error = sysdev_class_register(&oprofile_sysclass))) 69 if (!(error = sysdev_class_register(&oprofile_sysclass)))
@@ -72,15 +72,15 @@ static int __init init_driverfs(void)
72} 72}
73 73
74 74
75static void exit_driverfs(void) 75static void exit_sysfs(void)
76{ 76{
77 sysdev_unregister(&device_oprofile); 77 sysdev_unregister(&device_oprofile);
78 sysdev_class_unregister(&oprofile_sysclass); 78 sysdev_class_unregister(&oprofile_sysclass);
79} 79}
80 80
81#else 81#else
82#define init_driverfs() do { } while (0) 82#define init_sysfs() do { } while (0)
83#define exit_driverfs() do { } while (0) 83#define exit_sysfs() do { } while (0)
84#endif /* CONFIG_PM */ 84#endif /* CONFIG_PM */
85 85
86static int profile_exceptions_notify(struct notifier_block *self, 86static int profile_exceptions_notify(struct notifier_block *self,
@@ -385,7 +385,7 @@ static int __init ppro_init(char ** cpu_type)
385 return 1; 385 return 1;
386} 386}
387 387
388/* in order to get driverfs right */ 388/* in order to get sysfs right */
389static int using_nmi; 389static int using_nmi;
390 390
391int __init op_nmi_init(struct oprofile_operations *ops) 391int __init op_nmi_init(struct oprofile_operations *ops)
@@ -440,7 +440,7 @@ int __init op_nmi_init(struct oprofile_operations *ops)
440 return -ENODEV; 440 return -ENODEV;
441 } 441 }
442 442
443 init_driverfs(); 443 init_sysfs();
444 using_nmi = 1; 444 using_nmi = 1;
445 ops->create_files = nmi_create_files; 445 ops->create_files = nmi_create_files;
446 ops->setup = nmi_setup; 446 ops->setup = nmi_setup;
@@ -456,5 +456,5 @@ int __init op_nmi_init(struct oprofile_operations *ops)
456void op_nmi_exit(void) 456void op_nmi_exit(void)
457{ 457{
458 if (using_nmi) 458 if (using_nmi)
459 exit_driverfs(); 459 exit_sysfs();
460} 460}
diff --git a/arch/i386/oprofile/op_model_ppro.c b/arch/i386/oprofile/op_model_ppro.c
index ca2447e05e15..c554f52cb808 100644
--- a/arch/i386/oprofile/op_model_ppro.c
+++ b/arch/i386/oprofile/op_model_ppro.c
@@ -24,7 +24,8 @@
24 24
25#define CTR_IS_RESERVED(msrs,c) (msrs->counters[(c)].addr ? 1 : 0) 25#define CTR_IS_RESERVED(msrs,c) (msrs->counters[(c)].addr ? 1 : 0)
26#define CTR_READ(l,h,msrs,c) do {rdmsr(msrs->counters[(c)].addr, (l), (h));} while (0) 26#define CTR_READ(l,h,msrs,c) do {rdmsr(msrs->counters[(c)].addr, (l), (h));} while (0)
27#define CTR_WRITE(l,msrs,c) do {wrmsr(msrs->counters[(c)].addr, -(u32)(l), -1);} while (0) 27#define CTR_32BIT_WRITE(l,msrs,c) \
28 do {wrmsr(msrs->counters[(c)].addr, -(u32)(l), 0);} while (0)
28#define CTR_OVERFLOWED(n) (!((n) & (1U<<31))) 29#define CTR_OVERFLOWED(n) (!((n) & (1U<<31)))
29 30
30#define CTRL_IS_RESERVED(msrs,c) (msrs->controls[(c)].addr ? 1 : 0) 31#define CTRL_IS_RESERVED(msrs,c) (msrs->controls[(c)].addr ? 1 : 0)
@@ -79,7 +80,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
79 for (i = 0; i < NUM_COUNTERS; ++i) { 80 for (i = 0; i < NUM_COUNTERS; ++i) {
80 if (unlikely(!CTR_IS_RESERVED(msrs,i))) 81 if (unlikely(!CTR_IS_RESERVED(msrs,i)))
81 continue; 82 continue;
82 CTR_WRITE(1, msrs, i); 83 CTR_32BIT_WRITE(1, msrs, i);
83 } 84 }
84 85
85 /* enable active counters */ 86 /* enable active counters */
@@ -87,7 +88,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
87 if ((counter_config[i].enabled) && (CTR_IS_RESERVED(msrs,i))) { 88 if ((counter_config[i].enabled) && (CTR_IS_RESERVED(msrs,i))) {
88 reset_value[i] = counter_config[i].count; 89 reset_value[i] = counter_config[i].count;
89 90
90 CTR_WRITE(counter_config[i].count, msrs, i); 91 CTR_32BIT_WRITE(counter_config[i].count, msrs, i);
91 92
92 CTRL_READ(low, high, msrs, i); 93 CTRL_READ(low, high, msrs, i);
93 CTRL_CLEAR(low); 94 CTRL_CLEAR(low);
@@ -116,7 +117,7 @@ static int ppro_check_ctrs(struct pt_regs * const regs,
116 CTR_READ(low, high, msrs, i); 117 CTR_READ(low, high, msrs, i);
117 if (CTR_OVERFLOWED(low)) { 118 if (CTR_OVERFLOWED(low)) {
118 oprofile_add_sample(regs, i); 119 oprofile_add_sample(regs, i);
119 CTR_WRITE(reset_value[i], msrs, i); 120 CTR_32BIT_WRITE(reset_value[i], msrs, i);
120 } 121 }
121 } 122 }
122 123
diff --git a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
index 1594d2f55c8f..44650e03308b 100644
--- a/arch/i386/pci/Makefile
+++ b/arch/i386/pci/Makefile
@@ -1,7 +1,7 @@
1obj-y := i386.o init.o 1obj-y := i386.o init.o
2 2
3obj-$(CONFIG_PCI_BIOS) += pcbios.o 3obj-$(CONFIG_PCI_BIOS) += pcbios.o
4obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 4obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o mmconfig-shared.o
5obj-$(CONFIG_PCI_DIRECT) += direct.o 5obj-$(CONFIG_PCI_DIRECT) += direct.o
6 6
7pci-y := fixup.o 7pci-y := fixup.o
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 53ca6e897984..1bb069372143 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -191,6 +191,94 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
191 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"), 191 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"),
192 }, 192 },
193 }, 193 },
194 {
195 .callback = set_bf_sort,
196 .ident = "HP ProLiant BL20p G3",
197 .matches = {
198 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
199 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G3"),
200 },
201 },
202 {
203 .callback = set_bf_sort,
204 .ident = "HP ProLiant BL20p G4",
205 .matches = {
206 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
207 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G4"),
208 },
209 },
210 {
211 .callback = set_bf_sort,
212 .ident = "HP ProLiant BL30p G1",
213 .matches = {
214 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
215 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL30p G1"),
216 },
217 },
218 {
219 .callback = set_bf_sort,
220 .ident = "HP ProLiant BL25p G1",
221 .matches = {
222 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
223 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL25p G1"),
224 },
225 },
226 {
227 .callback = set_bf_sort,
228 .ident = "HP ProLiant BL35p G1",
229 .matches = {
230 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
231 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL35p G1"),
232 },
233 },
234 {
235 .callback = set_bf_sort,
236 .ident = "HP ProLiant BL45p G1",
237 .matches = {
238 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
239 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G1"),
240 },
241 },
242 {
243 .callback = set_bf_sort,
244 .ident = "HP ProLiant BL45p G2",
245 .matches = {
246 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
247 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G2"),
248 },
249 },
250 {
251 .callback = set_bf_sort,
252 .ident = "HP ProLiant BL460c G1",
253 .matches = {
254 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
255 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL460c G1"),
256 },
257 },
258 {
259 .callback = set_bf_sort,
260 .ident = "HP ProLiant BL465c G1",
261 .matches = {
262 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
263 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL465c G1"),
264 },
265 },
266 {
267 .callback = set_bf_sort,
268 .ident = "HP ProLiant BL480c G1",
269 .matches = {
270 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
271 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL480c G1"),
272 },
273 },
274 {
275 .callback = set_bf_sort,
276 .ident = "HP ProLiant BL685c G1",
277 .matches = {
278 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
279 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL685c G1"),
280 },
281 },
194 {} 282 {}
195}; 283};
196 284
diff --git a/arch/i386/pci/mmconfig-shared.c b/arch/i386/pci/mmconfig-shared.c
new file mode 100644
index 000000000000..747d8c63b0c4
--- /dev/null
+++ b/arch/i386/pci/mmconfig-shared.c
@@ -0,0 +1,264 @@
1/*
2 * mmconfig-shared.c - Low-level direct PCI config space access via
3 * MMCONFIG - common code between i386 and x86-64.
4 *
5 * This code does:
6 * - known chipset handling
7 * - ACPI decoding and validation
8 *
9 * Per-architecture code takes care of the mappings and accesses
10 * themselves.
11 */
12
13#include <linux/pci.h>
14#include <linux/init.h>
15#include <linux/acpi.h>
16#include <linux/bitmap.h>
17#include <asm/e820.h>
18
19#include "pci.h"
20
21/* aperture is up to 256MB but BIOS may reserve less */
22#define MMCONFIG_APER_MIN (2 * 1024*1024)
23#define MMCONFIG_APER_MAX (256 * 1024*1024)
24
25DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS);
26
27/* K8 systems have some devices (typically in the builtin northbridge)
28 that are only accessible using type1
29 Normally this can be expressed in the MCFG by not listing them
30 and assigning suitable _SEGs, but this isn't implemented in some BIOS.
31 Instead try to discover all devices on bus 0 that are unreachable using MM
32 and fallback for them. */
33static void __init unreachable_devices(void)
34{
35 int i, bus;
36 /* Use the max bus number from ACPI here? */
37 for (bus = 0; bus < PCI_MMCFG_MAX_CHECK_BUS; bus++) {
38 for (i = 0; i < 32; i++) {
39 unsigned int devfn = PCI_DEVFN(i, 0);
40 u32 val1, val2;
41
42 pci_conf1_read(0, bus, devfn, 0, 4, &val1);
43 if (val1 == 0xffffffff)
44 continue;
45
46 if (pci_mmcfg_arch_reachable(0, bus, devfn)) {
47 raw_pci_ops->read(0, bus, devfn, 0, 4, &val2);
48 if (val1 == val2)
49 continue;
50 }
51 set_bit(i + 32 * bus, pci_mmcfg_fallback_slots);
52 printk(KERN_NOTICE "PCI: No mmconfig possible on device"
53 " %02x:%02x\n", bus, i);
54 }
55 }
56}
57
58static const char __init *pci_mmcfg_e7520(void)
59{
60 u32 win;
61 pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win);
62
63 pci_mmcfg_config_num = 1;
64 pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL);
65 if (!pci_mmcfg_config)
66 return NULL;
67 pci_mmcfg_config[0].address = (win & 0xf000) << 16;
68 pci_mmcfg_config[0].pci_segment = 0;
69 pci_mmcfg_config[0].start_bus_number = 0;
70 pci_mmcfg_config[0].end_bus_number = 255;
71
72 return "Intel Corporation E7520 Memory Controller Hub";
73}
74
75static const char __init *pci_mmcfg_intel_945(void)
76{
77 u32 pciexbar, mask = 0, len = 0;
78
79 pci_mmcfg_config_num = 1;
80
81 pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0x48, 4, &pciexbar);
82
83 /* Enable bit */
84 if (!(pciexbar & 1))
85 pci_mmcfg_config_num = 0;
86
87 /* Size bits */
88 switch ((pciexbar >> 1) & 3) {
89 case 0:
90 mask = 0xf0000000U;
91 len = 0x10000000U;
92 break;
93 case 1:
94 mask = 0xf8000000U;
95 len = 0x08000000U;
96 break;
97 case 2:
98 mask = 0xfc000000U;
99 len = 0x04000000U;
100 break;
101 default:
102 pci_mmcfg_config_num = 0;
103 }
104
105 /* Errata #2, things break when not aligned on a 256Mb boundary */
106 /* Can only happen in 64M/128M mode */
107
108 if ((pciexbar & mask) & 0x0fffffffU)
109 pci_mmcfg_config_num = 0;
110
111 if (pci_mmcfg_config_num) {
112 pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL);
113 if (!pci_mmcfg_config)
114 return NULL;
115 pci_mmcfg_config[0].address = pciexbar & mask;
116 pci_mmcfg_config[0].pci_segment = 0;
117 pci_mmcfg_config[0].start_bus_number = 0;
118 pci_mmcfg_config[0].end_bus_number = (len >> 20) - 1;
119 }
120
121 return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub";
122}
123
124struct pci_mmcfg_hostbridge_probe {
125 u32 vendor;
126 u32 device;
127 const char *(*probe)(void);
128};
129
130static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = {
131 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, pci_mmcfg_e7520 },
132 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945G_HB, pci_mmcfg_intel_945 },
133};
134
135static int __init pci_mmcfg_check_hostbridge(void)
136{
137 u32 l;
138 u16 vendor, device;
139 int i;
140 const char *name;
141
142 pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0, 4, &l);
143 vendor = l & 0xffff;
144 device = (l >> 16) & 0xffff;
145
146 pci_mmcfg_config_num = 0;
147 pci_mmcfg_config = NULL;
148 name = NULL;
149
150 for (i = 0; !name && i < ARRAY_SIZE(pci_mmcfg_probes); i++) {
151 if (pci_mmcfg_probes[i].vendor == vendor &&
152 pci_mmcfg_probes[i].device == device)
153 name = pci_mmcfg_probes[i].probe();
154 }
155
156 if (name) {
157 printk(KERN_INFO "PCI: Found %s %s MMCONFIG support.\n",
158 name, pci_mmcfg_config_num ? "with" : "without");
159 }
160
161 return name != NULL;
162}
163
164static void __init pci_mmcfg_insert_resources(void)
165{
166#define PCI_MMCFG_RESOURCE_NAME_LEN 19
167 int i;
168 struct resource *res;
169 char *names;
170 unsigned num_buses;
171
172 res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res),
173 pci_mmcfg_config_num, GFP_KERNEL);
174 if (!res) {
175 printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n");
176 return;
177 }
178
179 names = (void *)&res[pci_mmcfg_config_num];
180 for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
181 struct acpi_mcfg_allocation *cfg = &pci_mmcfg_config[i];
182 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
183 res->name = names;
184 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u",
185 cfg->pci_segment);
186 res->start = cfg->address;
187 res->end = res->start + (num_buses << 20) - 1;
188 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
189 insert_resource(&iomem_resource, res);
190 names += PCI_MMCFG_RESOURCE_NAME_LEN;
191 }
192}
193
194static void __init pci_mmcfg_reject_broken(int type)
195{
196 typeof(pci_mmcfg_config[0]) *cfg;
197
198 if ((pci_mmcfg_config_num == 0) ||
199 (pci_mmcfg_config == NULL) ||
200 (pci_mmcfg_config[0].address == 0))
201 return;
202
203 cfg = &pci_mmcfg_config[0];
204
205 /*
206 * Handle more broken MCFG tables on Asus etc.
207 * They only contain a single entry for bus 0-0.
208 */
209 if (pci_mmcfg_config_num == 1 &&
210 cfg->pci_segment == 0 &&
211 (cfg->start_bus_number | cfg->end_bus_number) == 0) {
212 printk(KERN_ERR "PCI: start and end of bus number is 0. "
213 "Rejected as broken MCFG.\n");
214 goto reject;
215 }
216
217 /*
218 * Only do this check when type 1 works. If it doesn't work
219 * assume we run on a Mac and always use MCFG
220 */
221 if (type == 1 && !e820_all_mapped(cfg->address,
222 cfg->address + MMCONFIG_APER_MIN,
223 E820_RESERVED)) {
224 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not"
225 " E820-reserved\n", cfg->address);
226 goto reject;
227 }
228 return;
229
230reject:
231 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
232 kfree(pci_mmcfg_config);
233 pci_mmcfg_config = NULL;
234 pci_mmcfg_config_num = 0;
235}
236
237void __init pci_mmcfg_init(int type)
238{
239 int known_bridge = 0;
240
241 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
242 return;
243
244 if (type == 1 && pci_mmcfg_check_hostbridge())
245 known_bridge = 1;
246
247 if (!known_bridge) {
248 acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
249 pci_mmcfg_reject_broken(type);
250 }
251
252 if ((pci_mmcfg_config_num == 0) ||
253 (pci_mmcfg_config == NULL) ||
254 (pci_mmcfg_config[0].address == 0))
255 return;
256
257 if (pci_mmcfg_arch_init()) {
258 if (type == 1)
259 unreachable_devices();
260 if (known_bridge)
261 pci_mmcfg_insert_resources();
262 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
263 }
264}
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index e2616a266e13..bb1afd9e589d 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -15,55 +15,33 @@
15#include <asm/e820.h> 15#include <asm/e820.h>
16#include "pci.h" 16#include "pci.h"
17 17
18/* aperture is up to 256MB but BIOS may reserve less */
19#define MMCONFIG_APER_MIN (2 * 1024*1024)
20#define MMCONFIG_APER_MAX (256 * 1024*1024)
21
22/* Assume systems with more busses have correct MCFG */ 18/* Assume systems with more busses have correct MCFG */
23#define MAX_CHECK_BUS 16
24
25#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) 19#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
26 20
27/* The base address of the last MMCONFIG device accessed */ 21/* The base address of the last MMCONFIG device accessed */
28static u32 mmcfg_last_accessed_device; 22static u32 mmcfg_last_accessed_device;
29static int mmcfg_last_accessed_cpu; 23static int mmcfg_last_accessed_cpu;
30 24
31static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32);
32
33/* 25/*
34 * Functions for accessing PCI configuration space with MMCONFIG accesses 26 * Functions for accessing PCI configuration space with MMCONFIG accesses
35 */ 27 */
36static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) 28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
37{ 29{
38 int cfg_num = -1; 30 struct acpi_mcfg_allocation *cfg;
39 struct acpi_table_mcfg_config *cfg; 31 int cfg_num;
40 32
41 if (seg == 0 && bus < MAX_CHECK_BUS && 33 if (seg == 0 && bus < PCI_MMCFG_MAX_CHECK_BUS &&
42 test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots)) 34 test_bit(PCI_SLOT(devfn) + 32*bus, pci_mmcfg_fallback_slots))
43 return 0; 35 return 0;
44 36
45 while (1) { 37 for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
46 ++cfg_num;
47 if (cfg_num >= pci_mmcfg_config_num) {
48 break;
49 }
50 cfg = &pci_mmcfg_config[cfg_num]; 38 cfg = &pci_mmcfg_config[cfg_num];
51 if (cfg->pci_segment_group_number != seg) 39 if (cfg->pci_segment == seg &&
52 continue; 40 (cfg->start_bus_number <= bus) &&
53 if ((cfg->start_bus_number <= bus) &&
54 (cfg->end_bus_number >= bus)) 41 (cfg->end_bus_number >= bus))
55 return cfg->base_address; 42 return cfg->address;
56 } 43 }
57 44
58 /* Handle more broken MCFG tables on Asus etc.
59 They only contain a single entry for bus 0-0. Assume
60 this applies to all busses. */
61 cfg = &pci_mmcfg_config[0];
62 if (pci_mmcfg_config_num == 1 &&
63 cfg->pci_segment_group_number == 0 &&
64 (cfg->start_bus_number | cfg->end_bus_number) == 0)
65 return cfg->base_address;
66
67 /* Fall back to type 0 */ 45 /* Fall back to type 0 */
68 return 0; 46 return 0;
69} 47}
@@ -125,7 +103,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
125 unsigned long flags; 103 unsigned long flags;
126 u32 base; 104 u32 base;
127 105
128 if ((bus > 255) || (devfn > 255) || (reg > 4095)) 106 if ((bus > 255) || (devfn > 255) || (reg > 4095))
129 return -EINVAL; 107 return -EINVAL;
130 108
131 base = get_base_addr(seg, bus, devfn); 109 base = get_base_addr(seg, bus, devfn);
@@ -158,67 +136,15 @@ static struct pci_raw_ops pci_mmcfg = {
158 .write = pci_mmcfg_write, 136 .write = pci_mmcfg_write,
159}; 137};
160 138
161/* K8 systems have some devices (typically in the builtin northbridge) 139int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
162 that are only accessible using type1 140 unsigned int devfn)
163 Normally this can be expressed in the MCFG by not listing them
164 and assigning suitable _SEGs, but this isn't implemented in some BIOS.
165 Instead try to discover all devices on bus 0 that are unreachable using MM
166 and fallback for them. */
167static __init void unreachable_devices(void)
168{ 141{
169 int i, k; 142 return get_base_addr(seg, bus, devfn) != 0;
170 unsigned long flags;
171
172 for (k = 0; k < MAX_CHECK_BUS; k++) {
173 for (i = 0; i < 32; i++) {
174 u32 val1;
175 u32 addr;
176
177 pci_conf1_read(0, k, PCI_DEVFN(i, 0), 0, 4, &val1);
178 if (val1 == 0xffffffff)
179 continue;
180
181 /* Locking probably not needed, but safer */
182 spin_lock_irqsave(&pci_config_lock, flags);
183 addr = get_base_addr(0, k, PCI_DEVFN(i, 0));
184 if (addr != 0)
185 pci_exp_set_dev_base(addr, k, PCI_DEVFN(i, 0));
186 if (addr == 0 ||
187 readl((u32 __iomem *)mmcfg_virt_addr) != val1) {
188 set_bit(i + 32*k, fallback_slots);
189 printk(KERN_NOTICE
190 "PCI: No mmconfig possible on %x:%x\n", k, i);
191 }
192 spin_unlock_irqrestore(&pci_config_lock, flags);
193 }
194 }
195} 143}
196 144
197void __init pci_mmcfg_init(int type) 145int __init pci_mmcfg_arch_init(void)
198{ 146{
199 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
200 return;
201
202 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
203 if ((pci_mmcfg_config_num == 0) ||
204 (pci_mmcfg_config == NULL) ||
205 (pci_mmcfg_config[0].base_address == 0))
206 return;
207
208 /* Only do this check when type 1 works. If it doesn't work
209 assume we run on a Mac and always use MCFG */
210 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
211 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
212 E820_RESERVED)) {
213 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
214 pci_mmcfg_config[0].base_address);
215 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
216 return;
217 }
218
219 printk(KERN_INFO "PCI: Using MMCONFIG\n"); 147 printk(KERN_INFO "PCI: Using MMCONFIG\n");
220 raw_pci_ops = &pci_mmcfg; 148 raw_pci_ops = &pci_mmcfg;
221 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 149 return 1;
222
223 unreachable_devices();
224} 150}
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
index a0a25180b61a..e58bae2076ad 100644
--- a/arch/i386/pci/pci.h
+++ b/arch/i386/pci/pci.h
@@ -94,3 +94,13 @@ extern void pci_pcbios_init(void);
94extern void pci_mmcfg_init(int type); 94extern void pci_mmcfg_init(int type);
95extern void pcibios_sort(void); 95extern void pcibios_sort(void);
96 96
97/* pci-mmconfig.c */
98
99/* Verify the first 16 busses. We assume that systems with more busses
100 get MCFG right. */
101#define PCI_MMCFG_MAX_CHECK_BUS 16
102extern DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS);
103
104extern int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
105 unsigned int devfn);
106extern int __init pci_mmcfg_arch_init(void);
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index fcacfe291b9b..d51f0f11f7f9 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -11,6 +11,8 @@ menu "Processor type and features"
11 11
12config IA64 12config IA64
13 bool 13 bool
14 select PCI if (!IA64_HP_SIM)
15 select ACPI if (!IA64_HP_SIM)
14 default y 16 default y
15 help 17 help
16 The Itanium Processor Family is Intel's 64-bit successor to 18 The Itanium Processor Family is Intel's 64-bit successor to
@@ -20,15 +22,19 @@ config IA64
20 22
21config 64BIT 23config 64BIT
22 bool 24 bool
25 select ATA_NONSTANDARD if ATA
23 default y 26 default y
24 27
28config ZONE_DMA
29 def_bool y
30 depends on !IA64_SGI_SN2
31
25config MMU 32config MMU
26 bool 33 bool
27 default y 34 default y
28 35
29config SWIOTLB 36config SWIOTLB
30 bool 37 bool
31 default y
32 38
33config RWSEM_XCHGADD_ALGORITHM 39config RWSEM_XCHGADD_ALGORITHM
34 bool 40 bool
@@ -84,10 +90,9 @@ choice
84 90
85config IA64_GENERIC 91config IA64_GENERIC
86 bool "generic" 92 bool "generic"
87 select ACPI
88 select PCI
89 select NUMA 93 select NUMA
90 select ACPI_NUMA 94 select ACPI_NUMA
95 select SWIOTLB
91 help 96 help
92 This selects the system type of your hardware. A "generic" kernel 97 This selects the system type of your hardware. A "generic" kernel
93 will run on any supported IA-64 system. However, if you configure 98 will run on any supported IA-64 system. However, if you configure
@@ -104,6 +109,7 @@ config IA64_GENERIC
104 109
105config IA64_DIG 110config IA64_DIG
106 bool "DIG-compliant" 111 bool "DIG-compliant"
112 select SWIOTLB
107 113
108config IA64_HP_ZX1 114config IA64_HP_ZX1
109 bool "HP-zx1/sx1000" 115 bool "HP-zx1/sx1000"
@@ -113,6 +119,7 @@ config IA64_HP_ZX1
113 119
114config IA64_HP_ZX1_SWIOTLB 120config IA64_HP_ZX1_SWIOTLB
115 bool "HP-zx1/sx1000 with software I/O TLB" 121 bool "HP-zx1/sx1000 with software I/O TLB"
122 select SWIOTLB
116 help 123 help
117 Build a kernel that runs on HP zx1 and sx1000 systems even when they 124 Build a kernel that runs on HP zx1 and sx1000 systems even when they
118 have broken PCI devices which cannot DMA to full 32 bits. Apart 125 have broken PCI devices which cannot DMA to full 32 bits. Apart
@@ -131,6 +138,7 @@ config IA64_SGI_SN2
131 138
132config IA64_HP_SIM 139config IA64_HP_SIM
133 bool "Ski-simulator" 140 bool "Ski-simulator"
141 select SWIOTLB
134 142
135endchoice 143endchoice
136 144
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
index a5a5637507be..2153bcacbe6c 100644
--- a/arch/ia64/hp/common/hwsw_iommu.c
+++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -192,3 +192,7 @@ EXPORT_SYMBOL(hwsw_unmap_sg);
192EXPORT_SYMBOL(hwsw_dma_supported); 192EXPORT_SYMBOL(hwsw_dma_supported);
193EXPORT_SYMBOL(hwsw_alloc_coherent); 193EXPORT_SYMBOL(hwsw_alloc_coherent);
194EXPORT_SYMBOL(hwsw_free_coherent); 194EXPORT_SYMBOL(hwsw_free_coherent);
195EXPORT_SYMBOL(hwsw_sync_single_for_cpu);
196EXPORT_SYMBOL(hwsw_sync_single_for_device);
197EXPORT_SYMBOL(hwsw_sync_sg_for_cpu);
198EXPORT_SYMBOL(hwsw_sync_sg_for_device);
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index ce49fe3a3b56..c1dca226b479 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1881,7 +1881,7 @@ ioc_open(struct inode *inode, struct file *file)
1881 return seq_open(file, &ioc_seq_ops); 1881 return seq_open(file, &ioc_seq_ops);
1882} 1882}
1883 1883
1884static struct file_operations ioc_fops = { 1884static const struct file_operations ioc_fops = {
1885 .open = ioc_open, 1885 .open = ioc_open,
1886 .read = seq_read, 1886 .read = seq_read,
1887 .llseek = seq_lseek, 1887 .llseek = seq_lseek,
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index 578737ec7629..c05bda662364 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -91,9 +91,8 @@ ia64_elf32_init (struct pt_regs *regs)
91 * it with privilege level 3 because the IVE uses non-privileged accesses to these 91 * it with privilege level 3 because the IVE uses non-privileged accesses to these
92 * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. 92 * tables. IA-32 segmentation is used to protect against IA-32 accesses to them.
93 */ 93 */
94 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 94 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
95 if (vma) { 95 if (vma) {
96 memset(vma, 0, sizeof(*vma));
97 vma->vm_mm = current->mm; 96 vma->vm_mm = current->mm;
98 vma->vm_start = IA32_GDT_OFFSET; 97 vma->vm_start = IA32_GDT_OFFSET;
99 vma->vm_end = vma->vm_start + PAGE_SIZE; 98 vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -117,9 +116,8 @@ ia64_elf32_init (struct pt_regs *regs)
117 * code is locked in specific gate page, which is pointed by pretcode 116 * code is locked in specific gate page, which is pointed by pretcode
118 * when setup_frame_ia32 117 * when setup_frame_ia32
119 */ 118 */
120 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 119 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
121 if (vma) { 120 if (vma) {
122 memset(vma, 0, sizeof(*vma));
123 vma->vm_mm = current->mm; 121 vma->vm_mm = current->mm;
124 vma->vm_start = IA32_GATE_OFFSET; 122 vma->vm_start = IA32_GATE_OFFSET;
125 vma->vm_end = vma->vm_start + PAGE_SIZE; 123 vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -142,9 +140,8 @@ ia64_elf32_init (struct pt_regs *regs)
142 * Install LDT as anonymous memory. This gives us all-zero segment descriptors 140 * Install LDT as anonymous memory. This gives us all-zero segment descriptors
143 * until a task modifies them via modify_ldt(). 141 * until a task modifies them via modify_ldt().
144 */ 142 */
145 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 143 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
146 if (vma) { 144 if (vma) {
147 memset(vma, 0, sizeof(*vma));
148 vma->vm_mm = current->mm; 145 vma->vm_mm = current->mm;
149 vma->vm_start = IA32_LDT_OFFSET; 146 vma->vm_start = IA32_LDT_OFFSET;
150 vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE); 147 vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE);
@@ -214,12 +211,10 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
214 bprm->loader += stack_base; 211 bprm->loader += stack_base;
215 bprm->exec += stack_base; 212 bprm->exec += stack_base;
216 213
217 mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 214 mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
218 if (!mpnt) 215 if (!mpnt)
219 return -ENOMEM; 216 return -ENOMEM;
220 217
221 memset(mpnt, 0, sizeof(*mpnt));
222
223 down_write(&current->mm->mmap_sem); 218 down_write(&current->mm->mmap_sem);
224 { 219 {
225 mpnt->vm_mm = current->mm; 220 mpnt->vm_mm = current->mm;
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index a32cd59b81ed..687e5fdc9683 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -326,7 +326,7 @@ ia32_syscall_table:
326 data8 sys_ni_syscall 326 data8 sys_ni_syscall
327 data8 compat_sys_wait4 327 data8 compat_sys_wait4
328 data8 sys_swapoff /* 115 */ 328 data8 sys_swapoff /* 115 */
329 data8 sys32_sysinfo 329 data8 compat_sys_sysinfo
330 data8 sys32_ipc 330 data8 sys32_ipc
331 data8 sys_fsync 331 data8 sys_fsync
332 data8 sys32_sigreturn 332 data8 sys32_sigreturn
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 957681c39ad9..d430d36ae49d 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -2209,74 +2209,6 @@ sys32_fstat64 (unsigned int fd, struct stat64 __user *statbuf)
2209 return ret; 2209 return ret;
2210} 2210}
2211 2211
2212struct sysinfo32 {
2213 s32 uptime;
2214 u32 loads[3];
2215 u32 totalram;
2216 u32 freeram;
2217 u32 sharedram;
2218 u32 bufferram;
2219 u32 totalswap;
2220 u32 freeswap;
2221 u16 procs;
2222 u16 pad;
2223 u32 totalhigh;
2224 u32 freehigh;
2225 u32 mem_unit;
2226 char _f[8];
2227};
2228
2229asmlinkage long
2230sys32_sysinfo (struct sysinfo32 __user *info)
2231{
2232 struct sysinfo s;
2233 long ret, err;
2234 int bitcount = 0;
2235 mm_segment_t old_fs = get_fs();
2236
2237 set_fs(KERNEL_DS);
2238 ret = sys_sysinfo((struct sysinfo __user *) &s);
2239 set_fs(old_fs);
2240 /* Check to see if any memory value is too large for 32-bit and
2241 * scale down if needed.
2242 */
2243 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
2244 while (s.mem_unit < PAGE_SIZE) {
2245 s.mem_unit <<= 1;
2246 bitcount++;
2247 }
2248 s.totalram >>= bitcount;
2249 s.freeram >>= bitcount;
2250 s.sharedram >>= bitcount;
2251 s.bufferram >>= bitcount;
2252 s.totalswap >>= bitcount;
2253 s.freeswap >>= bitcount;
2254 s.totalhigh >>= bitcount;
2255 s.freehigh >>= bitcount;
2256 }
2257
2258 if (!access_ok(VERIFY_WRITE, info, sizeof(*info)))
2259 return -EFAULT;
2260
2261 err = __put_user(s.uptime, &info->uptime);
2262 err |= __put_user(s.loads[0], &info->loads[0]);
2263 err |= __put_user(s.loads[1], &info->loads[1]);
2264 err |= __put_user(s.loads[2], &info->loads[2]);
2265 err |= __put_user(s.totalram, &info->totalram);
2266 err |= __put_user(s.freeram, &info->freeram);
2267 err |= __put_user(s.sharedram, &info->sharedram);
2268 err |= __put_user(s.bufferram, &info->bufferram);
2269 err |= __put_user(s.totalswap, &info->totalswap);
2270 err |= __put_user(s.freeswap, &info->freeswap);
2271 err |= __put_user(s.procs, &info->procs);
2272 err |= __put_user (s.totalhigh, &info->totalhigh);
2273 err |= __put_user (s.freehigh, &info->freehigh);
2274 err |= __put_user (s.mem_unit, &info->mem_unit);
2275 if (err)
2276 return -EFAULT;
2277 return ret;
2278}
2279
2280asmlinkage long 2212asmlinkage long
2281sys32_sched_rr_get_interval (pid_t pid, struct compat_timespec __user *interval) 2213sys32_sched_rr_get_interval (pid_t pid, struct compat_timespec __user *interval)
2282{ 2214{
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 29f05d4b68cd..3549c94467b8 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -55,7 +55,7 @@
55 55
56#define BAD_MADT_ENTRY(entry, end) ( \ 56#define BAD_MADT_ENTRY(entry, end) ( \
57 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 57 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \
58 ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) 58 ((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
59 59
60#define PREFIX "ACPI: " 60#define PREFIX "ACPI: "
61 61
@@ -67,16 +67,11 @@ EXPORT_SYMBOL(pm_power_off);
67unsigned int acpi_cpei_override; 67unsigned int acpi_cpei_override;
68unsigned int acpi_cpei_phys_cpuid; 68unsigned int acpi_cpei_phys_cpuid;
69 69
70#define MAX_SAPICS 256
71u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = {[0 ... MAX_SAPICS - 1] = -1 };
72
73EXPORT_SYMBOL(ia64_acpiid_to_sapicid);
74
75const char *acpi_get_sysname(void) 70const char *acpi_get_sysname(void)
76{ 71{
77#ifdef CONFIG_IA64_GENERIC 72#ifdef CONFIG_IA64_GENERIC
78 unsigned long rsdp_phys; 73 unsigned long rsdp_phys;
79 struct acpi20_table_rsdp *rsdp; 74 struct acpi_table_rsdp *rsdp;
80 struct acpi_table_xsdt *xsdt; 75 struct acpi_table_xsdt *xsdt;
81 struct acpi_table_header *hdr; 76 struct acpi_table_header *hdr;
82 77
@@ -87,16 +82,16 @@ const char *acpi_get_sysname(void)
87 return "dig"; 82 return "dig";
88 } 83 }
89 84
90 rsdp = (struct acpi20_table_rsdp *)__va(rsdp_phys); 85 rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys);
91 if (strncmp(rsdp->signature, RSDP_SIG, sizeof(RSDP_SIG) - 1)) { 86 if (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) {
92 printk(KERN_ERR 87 printk(KERN_ERR
93 "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n"); 88 "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n");
94 return "dig"; 89 return "dig";
95 } 90 }
96 91
97 xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_address); 92 xsdt = (struct acpi_table_xsdt *)__va(rsdp->xsdt_physical_address);
98 hdr = &xsdt->header; 93 hdr = &xsdt->header;
99 if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1)) { 94 if (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1)) {
100 printk(KERN_ERR 95 printk(KERN_ERR
101 "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n"); 96 "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n");
102 return "dig"; 97 return "dig";
@@ -169,12 +164,12 @@ struct acpi_table_madt *acpi_madt __initdata;
169static u8 has_8259; 164static u8 has_8259;
170 165
171static int __init 166static int __init
172acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, 167acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
173 const unsigned long end) 168 const unsigned long end)
174{ 169{
175 struct acpi_table_lapic_addr_ovr *lapic; 170 struct acpi_madt_local_apic_override *lapic;
176 171
177 lapic = (struct acpi_table_lapic_addr_ovr *)header; 172 lapic = (struct acpi_madt_local_apic_override *)header;
178 173
179 if (BAD_MADT_ENTRY(lapic, end)) 174 if (BAD_MADT_ENTRY(lapic, end))
180 return -EINVAL; 175 return -EINVAL;
@@ -187,22 +182,19 @@ acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header,
187} 182}
188 183
189static int __init 184static int __init
190acpi_parse_lsapic(acpi_table_entry_header * header, const unsigned long end) 185acpi_parse_lsapic(struct acpi_subtable_header * header, const unsigned long end)
191{ 186{
192 struct acpi_table_lsapic *lsapic; 187 struct acpi_madt_local_sapic *lsapic;
193 188
194 lsapic = (struct acpi_table_lsapic *)header; 189 lsapic = (struct acpi_madt_local_sapic *)header;
195 190
196 if (BAD_MADT_ENTRY(lsapic, end)) 191 /*Skip BAD_MADT_ENTRY check, as lsapic size could vary */
197 return -EINVAL;
198 192
199 if (lsapic->flags.enabled) { 193 if (lsapic->lapic_flags & ACPI_MADT_ENABLED) {
200#ifdef CONFIG_SMP 194#ifdef CONFIG_SMP
201 smp_boot_data.cpu_phys_id[available_cpus] = 195 smp_boot_data.cpu_phys_id[available_cpus] =
202 (lsapic->id << 8) | lsapic->eid; 196 (lsapic->id << 8) | lsapic->eid;
203#endif 197#endif
204 ia64_acpiid_to_sapicid[lsapic->acpi_id] =
205 (lsapic->id << 8) | lsapic->eid;
206 ++available_cpus; 198 ++available_cpus;
207 } 199 }
208 200
@@ -211,11 +203,11 @@ acpi_parse_lsapic(acpi_table_entry_header * header, const unsigned long end)
211} 203}
212 204
213static int __init 205static int __init
214acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) 206acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end)
215{ 207{
216 struct acpi_table_lapic_nmi *lacpi_nmi; 208 struct acpi_madt_local_apic_nmi *lacpi_nmi;
217 209
218 lacpi_nmi = (struct acpi_table_lapic_nmi *)header; 210 lacpi_nmi = (struct acpi_madt_local_apic_nmi *)header;
219 211
220 if (BAD_MADT_ENTRY(lacpi_nmi, end)) 212 if (BAD_MADT_ENTRY(lacpi_nmi, end))
221 return -EINVAL; 213 return -EINVAL;
@@ -225,11 +217,11 @@ acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end)
225} 217}
226 218
227static int __init 219static int __init
228acpi_parse_iosapic(acpi_table_entry_header * header, const unsigned long end) 220acpi_parse_iosapic(struct acpi_subtable_header * header, const unsigned long end)
229{ 221{
230 struct acpi_table_iosapic *iosapic; 222 struct acpi_madt_io_sapic *iosapic;
231 223
232 iosapic = (struct acpi_table_iosapic *)header; 224 iosapic = (struct acpi_madt_io_sapic *)header;
233 225
234 if (BAD_MADT_ENTRY(iosapic, end)) 226 if (BAD_MADT_ENTRY(iosapic, end))
235 return -EINVAL; 227 return -EINVAL;
@@ -240,13 +232,13 @@ acpi_parse_iosapic(acpi_table_entry_header * header, const unsigned long end)
240static unsigned int __initdata acpi_madt_rev; 232static unsigned int __initdata acpi_madt_rev;
241 233
242static int __init 234static int __init
243acpi_parse_plat_int_src(acpi_table_entry_header * header, 235acpi_parse_plat_int_src(struct acpi_subtable_header * header,
244 const unsigned long end) 236 const unsigned long end)
245{ 237{
246 struct acpi_table_plat_int_src *plintsrc; 238 struct acpi_madt_interrupt_source *plintsrc;
247 int vector; 239 int vector;
248 240
249 plintsrc = (struct acpi_table_plat_int_src *)header; 241 plintsrc = (struct acpi_madt_interrupt_source *)header;
250 242
251 if (BAD_MADT_ENTRY(plintsrc, end)) 243 if (BAD_MADT_ENTRY(plintsrc, end))
252 return -EINVAL; 244 return -EINVAL;
@@ -257,19 +249,19 @@ acpi_parse_plat_int_src(acpi_table_entry_header * header,
257 */ 249 */
258 vector = iosapic_register_platform_intr(plintsrc->type, 250 vector = iosapic_register_platform_intr(plintsrc->type,
259 plintsrc->global_irq, 251 plintsrc->global_irq,
260 plintsrc->iosapic_vector, 252 plintsrc->io_sapic_vector,
261 plintsrc->eid, 253 plintsrc->eid,
262 plintsrc->id, 254 plintsrc->id,
263 (plintsrc->flags.polarity == 255 ((plintsrc->inti_flags & ACPI_MADT_POLARITY_MASK) ==
264 1) ? IOSAPIC_POL_HIGH : 256 ACPI_MADT_POLARITY_ACTIVE_HIGH) ?
265 IOSAPIC_POL_LOW, 257 IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
266 (plintsrc->flags.trigger == 258 ((plintsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) ==
267 1) ? IOSAPIC_EDGE : 259 ACPI_MADT_TRIGGER_EDGE) ?
268 IOSAPIC_LEVEL); 260 IOSAPIC_EDGE : IOSAPIC_LEVEL);
269 261
270 platform_intr_list[plintsrc->type] = vector; 262 platform_intr_list[plintsrc->type] = vector;
271 if (acpi_madt_rev > 1) { 263 if (acpi_madt_rev > 1) {
272 acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag; 264 acpi_cpei_override = plintsrc->flags & ACPI_MADT_CPEI_OVERRIDE;
273 } 265 }
274 266
275 /* 267 /*
@@ -324,30 +316,32 @@ unsigned int get_cpei_target_cpu(void)
324} 316}
325 317
326static int __init 318static int __init
327acpi_parse_int_src_ovr(acpi_table_entry_header * header, 319acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
328 const unsigned long end) 320 const unsigned long end)
329{ 321{
330 struct acpi_table_int_src_ovr *p; 322 struct acpi_madt_interrupt_override *p;
331 323
332 p = (struct acpi_table_int_src_ovr *)header; 324 p = (struct acpi_madt_interrupt_override *)header;
333 325
334 if (BAD_MADT_ENTRY(p, end)) 326 if (BAD_MADT_ENTRY(p, end))
335 return -EINVAL; 327 return -EINVAL;
336 328
337 iosapic_override_isa_irq(p->bus_irq, p->global_irq, 329 iosapic_override_isa_irq(p->source_irq, p->global_irq,
338 (p->flags.polarity == 330 ((p->inti_flags & ACPI_MADT_POLARITY_MASK) ==
339 1) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW, 331 ACPI_MADT_POLARITY_ACTIVE_HIGH) ?
340 (p->flags.trigger == 332 IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
341 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); 333 ((p->inti_flags & ACPI_MADT_TRIGGER_MASK) ==
334 ACPI_MADT_TRIGGER_EDGE) ?
335 IOSAPIC_EDGE : IOSAPIC_LEVEL);
342 return 0; 336 return 0;
343} 337}
344 338
345static int __init 339static int __init
346acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) 340acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end)
347{ 341{
348 struct acpi_table_nmi_src *nmi_src; 342 struct acpi_madt_nmi_source *nmi_src;
349 343
350 nmi_src = (struct acpi_table_nmi_src *)header; 344 nmi_src = (struct acpi_madt_nmi_source *)header;
351 345
352 if (BAD_MADT_ENTRY(nmi_src, end)) 346 if (BAD_MADT_ENTRY(nmi_src, end))
353 return -EINVAL; 347 return -EINVAL;
@@ -371,12 +365,12 @@ static void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
371 } 365 }
372} 366}
373 367
374static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) 368static int __init acpi_parse_madt(struct acpi_table_header *table)
375{ 369{
376 if (!phys_addr || !size) 370 if (!table)
377 return -EINVAL; 371 return -EINVAL;
378 372
379 acpi_madt = (struct acpi_table_madt *)__va(phys_addr); 373 acpi_madt = (struct acpi_table_madt *)table;
380 374
381 acpi_madt_rev = acpi_madt->header.revision; 375 acpi_madt_rev = acpi_madt->header.revision;
382 376
@@ -384,14 +378,14 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size)
384#ifdef CONFIG_ITANIUM 378#ifdef CONFIG_ITANIUM
385 has_8259 = 1; /* Firmware on old Itanium systems is broken */ 379 has_8259 = 1; /* Firmware on old Itanium systems is broken */
386#else 380#else
387 has_8259 = acpi_madt->flags.pcat_compat; 381 has_8259 = acpi_madt->flags & ACPI_MADT_PCAT_COMPAT;
388#endif 382#endif
389 iosapic_system_init(has_8259); 383 iosapic_system_init(has_8259);
390 384
391 /* Get base address of IPI Message Block */ 385 /* Get base address of IPI Message Block */
392 386
393 if (acpi_madt->lapic_address) 387 if (acpi_madt->address)
394 ipi_base_addr = ioremap(acpi_madt->lapic_address, 0); 388 ipi_base_addr = ioremap(acpi_madt->address, 0);
395 389
396 printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr); 390 printk(KERN_INFO PREFIX "Local APIC address %p\n", ipi_base_addr);
397 391
@@ -413,23 +407,24 @@ static u32 __devinitdata pxm_flag[PXM_FLAG_LEN];
413#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) 407#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag))
414static struct acpi_table_slit __initdata *slit_table; 408static struct acpi_table_slit __initdata *slit_table;
415 409
416static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa) 410static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
417{ 411{
418 int pxm; 412 int pxm;
419 413
420 pxm = pa->proximity_domain; 414 pxm = pa->proximity_domain_lo;
421 if (ia64_platform_is("sn2")) 415 if (ia64_platform_is("sn2"))
422 pxm += pa->reserved[0] << 8; 416 pxm += pa->proximity_domain_hi[0] << 8;
423 return pxm; 417 return pxm;
424} 418}
425 419
426static int get_memory_proximity_domain(struct acpi_table_memory_affinity *ma) 420static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
427{ 421{
428 int pxm; 422 int pxm;
429 423
430 pxm = ma->proximity_domain; 424 pxm = ma->proximity_domain;
431 if (ia64_platform_is("sn2")) 425 if (!ia64_platform_is("sn2"))
432 pxm += ma->reserved1[0] << 8; 426 pxm &= 0xff;
427
433 return pxm; 428 return pxm;
434} 429}
435 430
@@ -442,7 +437,7 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
442 u32 len; 437 u32 len;
443 438
444 len = sizeof(struct acpi_table_header) + 8 439 len = sizeof(struct acpi_table_header) + 8
445 + slit->localities * slit->localities; 440 + slit->locality_count * slit->locality_count;
446 if (slit->header.length != len) { 441 if (slit->header.length != len) {
447 printk(KERN_ERR 442 printk(KERN_ERR
448 "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", 443 "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n",
@@ -454,11 +449,11 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
454} 449}
455 450
456void __init 451void __init
457acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) 452acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
458{ 453{
459 int pxm; 454 int pxm;
460 455
461 if (!pa->flags.enabled) 456 if (!(pa->flags & ACPI_SRAT_CPU_ENABLED))
462 return; 457 return;
463 458
464 pxm = get_processor_proximity_domain(pa); 459 pxm = get_processor_proximity_domain(pa);
@@ -467,14 +462,14 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
467 pxm_bit_set(pxm); 462 pxm_bit_set(pxm);
468 463
469 node_cpuid[srat_num_cpus].phys_id = 464 node_cpuid[srat_num_cpus].phys_id =
470 (pa->apic_id << 8) | (pa->lsapic_eid); 465 (pa->apic_id << 8) | (pa->local_sapic_eid);
471 /* nid should be overridden as logical node id later */ 466 /* nid should be overridden as logical node id later */
472 node_cpuid[srat_num_cpus].nid = pxm; 467 node_cpuid[srat_num_cpus].nid = pxm;
473 srat_num_cpus++; 468 srat_num_cpus++;
474} 469}
475 470
476void __init 471void __init
477acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) 472acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
478{ 473{
479 unsigned long paddr, size; 474 unsigned long paddr, size;
480 int pxm; 475 int pxm;
@@ -483,13 +478,11 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
483 pxm = get_memory_proximity_domain(ma); 478 pxm = get_memory_proximity_domain(ma);
484 479
485 /* fill node memory chunk structure */ 480 /* fill node memory chunk structure */
486 paddr = ma->base_addr_hi; 481 paddr = ma->base_address;
487 paddr = (paddr << 32) | ma->base_addr_lo; 482 size = ma->length;
488 size = ma->length_hi;
489 size = (size << 32) | ma->length_lo;
490 483
491 /* Ignore disabled entries */ 484 /* Ignore disabled entries */
492 if (!ma->flags.enabled) 485 if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
493 return; 486 return;
494 487
495 /* record this node in proximity bitmap */ 488 /* record this node in proximity bitmap */
@@ -560,16 +553,16 @@ void __init acpi_numa_arch_fixup(void)
560 if (!slit_table) 553 if (!slit_table)
561 return; 554 return;
562 memset(numa_slit, -1, sizeof(numa_slit)); 555 memset(numa_slit, -1, sizeof(numa_slit));
563 for (i = 0; i < slit_table->localities; i++) { 556 for (i = 0; i < slit_table->locality_count; i++) {
564 if (!pxm_bit_test(i)) 557 if (!pxm_bit_test(i))
565 continue; 558 continue;
566 node_from = pxm_to_node(i); 559 node_from = pxm_to_node(i);
567 for (j = 0; j < slit_table->localities; j++) { 560 for (j = 0; j < slit_table->locality_count; j++) {
568 if (!pxm_bit_test(j)) 561 if (!pxm_bit_test(j))
569 continue; 562 continue;
570 node_to = pxm_to_node(j); 563 node_to = pxm_to_node(j);
571 node_distance(node_from, node_to) = 564 node_distance(node_from, node_to) =
572 slit_table->entry[i * slit_table->localities + j]; 565 slit_table->entry[i * slit_table->locality_count + j];
573 } 566 }
574 } 567 }
575 568
@@ -617,21 +610,21 @@ void acpi_unregister_gsi(u32 gsi)
617 610
618EXPORT_SYMBOL(acpi_unregister_gsi); 611EXPORT_SYMBOL(acpi_unregister_gsi);
619 612
620static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size) 613static int __init acpi_parse_fadt(struct acpi_table_header *table)
621{ 614{
622 struct acpi_table_header *fadt_header; 615 struct acpi_table_header *fadt_header;
623 struct fadt_descriptor *fadt; 616 struct acpi_table_fadt *fadt;
624 617
625 if (!phys_addr || !size) 618 if (!table)
626 return -EINVAL; 619 return -EINVAL;
627 620
628 fadt_header = (struct acpi_table_header *)__va(phys_addr); 621 fadt_header = (struct acpi_table_header *)table;
629 if (fadt_header->revision != 3) 622 if (fadt_header->revision != 3)
630 return -ENODEV; /* Only deal with ACPI 2.0 FADT */ 623 return -ENODEV; /* Only deal with ACPI 2.0 FADT */
631 624
632 fadt = (struct fadt_descriptor *)fadt_header; 625 fadt = (struct acpi_table_fadt *)fadt_header;
633 626
634 acpi_register_gsi(fadt->sci_int, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); 627 acpi_register_gsi(fadt->sci_interrupt, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
635 return 0; 628 return 0;
636} 629}
637 630
@@ -658,7 +651,7 @@ int __init acpi_boot_init(void)
658 * information -- the successor to MPS tables. 651 * information -- the successor to MPS tables.
659 */ 652 */
660 653
661 if (acpi_table_parse(ACPI_APIC, acpi_parse_madt) < 1) { 654 if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
662 printk(KERN_ERR PREFIX "Can't find MADT\n"); 655 printk(KERN_ERR PREFIX "Can't find MADT\n");
663 goto skip_madt; 656 goto skip_madt;
664 } 657 }
@@ -666,40 +659,40 @@ int __init acpi_boot_init(void)
666 /* Local APIC */ 659 /* Local APIC */
667 660
668 if (acpi_table_parse_madt 661 if (acpi_table_parse_madt
669 (ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr, 0) < 0) 662 (ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, acpi_parse_lapic_addr_ovr, 0) < 0)
670 printk(KERN_ERR PREFIX 663 printk(KERN_ERR PREFIX
671 "Error parsing LAPIC address override entry\n"); 664 "Error parsing LAPIC address override entry\n");
672 665
673 if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_parse_lsapic, NR_CPUS) 666 if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, acpi_parse_lsapic, NR_CPUS)
674 < 1) 667 < 1)
675 printk(KERN_ERR PREFIX 668 printk(KERN_ERR PREFIX
676 "Error parsing MADT - no LAPIC entries\n"); 669 "Error parsing MADT - no LAPIC entries\n");
677 670
678 if (acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0) 671 if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0)
679 < 0) 672 < 0)
680 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); 673 printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
681 674
682 /* I/O APIC */ 675 /* I/O APIC */
683 676
684 if (acpi_table_parse_madt 677 if (acpi_table_parse_madt
685 (ACPI_MADT_IOSAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) 678 (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1)
686 printk(KERN_ERR PREFIX 679 printk(KERN_ERR PREFIX
687 "Error parsing MADT - no IOSAPIC entries\n"); 680 "Error parsing MADT - no IOSAPIC entries\n");
688 681
689 /* System-Level Interrupt Routing */ 682 /* System-Level Interrupt Routing */
690 683
691 if (acpi_table_parse_madt 684 if (acpi_table_parse_madt
692 (ACPI_MADT_PLAT_INT_SRC, acpi_parse_plat_int_src, 685 (ACPI_MADT_TYPE_INTERRUPT_SOURCE, acpi_parse_plat_int_src,
693 ACPI_MAX_PLATFORM_INTERRUPTS) < 0) 686 ACPI_MAX_PLATFORM_INTERRUPTS) < 0)
694 printk(KERN_ERR PREFIX 687 printk(KERN_ERR PREFIX
695 "Error parsing platform interrupt source entry\n"); 688 "Error parsing platform interrupt source entry\n");
696 689
697 if (acpi_table_parse_madt 690 if (acpi_table_parse_madt
698 (ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, 0) < 0) 691 (ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr, 0) < 0)
699 printk(KERN_ERR PREFIX 692 printk(KERN_ERR PREFIX
700 "Error parsing interrupt source overrides entry\n"); 693 "Error parsing interrupt source overrides entry\n");
701 694
702 if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 0) < 0) 695 if (acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src, 0) < 0)
703 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); 696 printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
704 skip_madt: 697 skip_madt:
705 698
@@ -709,7 +702,7 @@ int __init acpi_boot_init(void)
709 * gets interrupts such as power and sleep buttons. If it's not 702 * gets interrupts such as power and sleep buttons. If it's not
710 * on a Legacy interrupt, it needs to be setup. 703 * on a Legacy interrupt, it needs to be setup.
711 */ 704 */
712 if (acpi_table_parse(ACPI_FADT, acpi_parse_fadt) < 1) 705 if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
713 printk(KERN_ERR PREFIX "Can't find FADT\n"); 706 printk(KERN_ERR PREFIX "Can't find FADT\n");
714 707
715#ifdef CONFIG_SMP 708#ifdef CONFIG_SMP
@@ -842,7 +835,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
842{ 835{
843 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 836 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
844 union acpi_object *obj; 837 union acpi_object *obj;
845 struct acpi_table_lsapic *lsapic; 838 struct acpi_madt_local_sapic *lsapic;
846 cpumask_t tmp_map; 839 cpumask_t tmp_map;
847 long physid; 840 long physid;
848 int cpu; 841 int cpu;
@@ -854,16 +847,16 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
854 return -EINVAL; 847 return -EINVAL;
855 848
856 obj = buffer.pointer; 849 obj = buffer.pointer;
857 if (obj->type != ACPI_TYPE_BUFFER || 850 if (obj->type != ACPI_TYPE_BUFFER)
858 obj->buffer.length < sizeof(*lsapic)) { 851 {
859 kfree(buffer.pointer); 852 kfree(buffer.pointer);
860 return -EINVAL; 853 return -EINVAL;
861 } 854 }
862 855
863 lsapic = (struct acpi_table_lsapic *)obj->buffer.pointer; 856 lsapic = (struct acpi_madt_local_sapic *)obj->buffer.pointer;
864 857
865 if ((lsapic->header.type != ACPI_MADT_LSAPIC) || 858 if ((lsapic->header.type != ACPI_MADT_TYPE_LOCAL_SAPIC) ||
866 (!lsapic->flags.enabled)) { 859 (!lsapic->lapic_flags & ACPI_MADT_ENABLED)) {
867 kfree(buffer.pointer); 860 kfree(buffer.pointer);
868 return -EINVAL; 861 return -EINVAL;
869 } 862 }
@@ -883,7 +876,6 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
883 876
884 cpu_set(cpu, cpu_present_map); 877 cpu_set(cpu, cpu_present_map);
885 ia64_cpu_to_sapicid[cpu] = physid; 878 ia64_cpu_to_sapicid[cpu] = physid;
886 ia64_acpiid_to_sapicid[lsapic->acpi_id] = ia64_cpu_to_sapicid[cpu];
887 879
888 *pcpu = cpu; 880 *pcpu = cpu;
889 return (0); 881 return (0);
@@ -893,14 +885,6 @@ EXPORT_SYMBOL(acpi_map_lsapic);
893 885
894int acpi_unmap_lsapic(int cpu) 886int acpi_unmap_lsapic(int cpu)
895{ 887{
896 int i;
897
898 for (i = 0; i < MAX_SAPICS; i++) {
899 if (ia64_acpiid_to_sapicid[i] == ia64_cpu_to_sapicid[cpu]) {
900 ia64_acpiid_to_sapicid[i] = -1;
901 break;
902 }
903 }
904 ia64_cpu_to_sapicid[cpu] = -1; 888 ia64_cpu_to_sapicid[cpu] = -1;
905 cpu_clear(cpu, cpu_present_map); 889 cpu_clear(cpu, cpu_present_map);
906 890
@@ -920,7 +904,7 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
920{ 904{
921 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 905 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
922 union acpi_object *obj; 906 union acpi_object *obj;
923 struct acpi_table_iosapic *iosapic; 907 struct acpi_madt_io_sapic *iosapic;
924 unsigned int gsi_base; 908 unsigned int gsi_base;
925 int pxm, node; 909 int pxm, node;
926 910
@@ -938,9 +922,9 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
938 return AE_OK; 922 return AE_OK;
939 } 923 }
940 924
941 iosapic = (struct acpi_table_iosapic *)obj->buffer.pointer; 925 iosapic = (struct acpi_madt_io_sapic *)obj->buffer.pointer;
942 926
943 if (iosapic->header.type != ACPI_MADT_IOSAPIC) { 927 if (iosapic->header.type != ACPI_MADT_TYPE_IO_SAPIC) {
944 kfree(buffer.pointer); 928 kfree(buffer.pointer);
945 return AE_OK; 929 return AE_OK;
946 } 930 }
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index bc2f64d72244..5cdd2f5fa064 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -52,7 +52,7 @@ extern void ia64_dump_cpu_regs(void *);
52static DEFINE_PER_CPU(struct elf_prstatus, elf_prstatus); 52static DEFINE_PER_CPU(struct elf_prstatus, elf_prstatus);
53 53
54void 54void
55crash_save_this_cpu() 55crash_save_this_cpu(void)
56{ 56{
57 void *buf; 57 void *buf;
58 unsigned long cfm, sof, sol; 58 unsigned long cfm, sof, sol;
@@ -79,6 +79,7 @@ crash_save_this_cpu()
79 final_note(buf); 79 final_note(buf);
80} 80}
81 81
82#ifdef CONFIG_SMP
82static int 83static int
83kdump_wait_cpu_freeze(void) 84kdump_wait_cpu_freeze(void)
84{ 85{
@@ -91,6 +92,7 @@ kdump_wait_cpu_freeze(void)
91 } 92 }
92 return 1; 93 return 1;
93} 94}
95#endif
94 96
95void 97void
96machine_crash_shutdown(struct pt_regs *pt) 98machine_crash_shutdown(struct pt_regs *pt)
@@ -116,6 +118,11 @@ machine_crash_shutdown(struct pt_regs *pt)
116static void 118static void
117machine_kdump_on_init(void) 119machine_kdump_on_init(void)
118{ 120{
121 if (!ia64_kimage) {
122 printk(KERN_NOTICE "machine_kdump_on_init(): "
123 "kdump not configured\n");
124 return;
125 }
119 local_irq_disable(); 126 local_irq_disable();
120 kexec_disable_iosapic(); 127 kexec_disable_iosapic();
121 machine_kexec(ia64_kimage); 128 machine_kexec(ia64_kimage);
@@ -132,11 +139,12 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
132 atomic_inc(&kdump_cpu_freezed); 139 atomic_inc(&kdump_cpu_freezed);
133 kdump_status[cpuid] = 1; 140 kdump_status[cpuid] = 1;
134 mb(); 141 mb();
135 if (cpuid == 0) { 142#ifdef CONFIG_HOTPLUG_CPU
136 for (;;) 143 if (cpuid != 0)
137 cpu_relax();
138 } else
139 ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]); 144 ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]);
145#endif
146 for (;;)
147 cpu_relax();
140} 148}
141 149
142static int 150static int
@@ -214,7 +222,7 @@ machine_crash_setup(void)
214 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) 222 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
215 return ret; 223 return ret;
216#ifdef CONFIG_SYSCTL 224#ifdef CONFIG_SYSCTL
217 register_sysctl_table(sys_table, 0); 225 register_sysctl_table(sys_table);
218#endif 226#endif
219 return 0; 227 return 0;
220} 228}
diff --git a/arch/ia64/kernel/crash_dump.c b/arch/ia64/kernel/crash_dump.c
index 83b8c91c1408..da60e90eeeb1 100644
--- a/arch/ia64/kernel/crash_dump.c
+++ b/arch/ia64/kernel/crash_dump.c
@@ -9,7 +9,8 @@
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/types.h> 10#include <linux/types.h>
11 11
12#include <linux/uaccess.h> 12#include <asm/page.h>
13#include <asm/uaccess.h>
13 14
14/** 15/**
15 * copy_oldmem_page - copy one page from "oldmem" 16 * copy_oldmem_page - copy one page from "oldmem"
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 0b25a7d4e1e4..772ba6fe110f 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -380,7 +380,7 @@ efi_get_pal_addr (void)
380#endif 380#endif
381 return __va(md->phys_addr); 381 return __va(md->phys_addr);
382 } 382 }
383 printk(KERN_WARNING "%s: no PAL-code memory-descriptor found", 383 printk(KERN_WARNING "%s: no PAL-code memory-descriptor found\n",
384 __FUNCTION__); 384 __FUNCTION__);
385 return NULL; 385 return NULL;
386} 386}
@@ -413,11 +413,10 @@ efi_init (void)
413 efi_char16_t *c16; 413 efi_char16_t *c16;
414 u64 efi_desc_size; 414 u64 efi_desc_size;
415 char *cp, vendor[100] = "unknown"; 415 char *cp, vendor[100] = "unknown";
416 extern char saved_command_line[];
417 int i; 416 int i;
418 417
419 /* it's too early to be able to use the standard kernel command line support... */ 418 /* it's too early to be able to use the standard kernel command line support... */
420 for (cp = saved_command_line; *cp; ) { 419 for (cp = boot_command_line; *cp; ) {
421 if (memcmp(cp, "mem=", 4) == 0) { 420 if (memcmp(cp, "mem=", 4) == 0) {
422 mem_limit = memparse(cp + 4, &cp); 421 mem_limit = memparse(cp + 4, &cp);
423 } else if (memcmp(cp, "max_addr=", 9) == 0) { 422 } else if (memcmp(cp, "max_addr=", 9) == 0) {
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 15234ed3a341..e7873eeae448 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1610,5 +1610,7 @@ sys_call_table:
1610 data8 sys_sync_file_range // 1300 1610 data8 sys_sync_file_range // 1300
1611 data8 sys_tee 1611 data8 sys_tee
1612 data8 sys_vmsplice 1612 data8 sys_vmsplice
1613 data8 sys_ni_syscall // reserved for move_pages
1614 data8 sys_getcpu
1613 1615
1614 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1616 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 0fc5fb7865cf..d6aab40c6416 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -925,6 +925,11 @@ iosapic_unregister_intr (unsigned int gsi)
925 /* Clear the interrupt controller descriptor */ 925 /* Clear the interrupt controller descriptor */
926 idesc->chip = &no_irq_type; 926 idesc->chip = &no_irq_type;
927 927
928#ifdef CONFIG_SMP
929 /* Clear affinity */
930 cpus_setall(idesc->affinity);
931#endif
932
928 /* Clear the interrupt information */ 933 /* Clear the interrupt information */
929 memset(&iosapic_intr_info[vector], 0, 934 memset(&iosapic_intr_info[vector], 0,
930 sizeof(struct iosapic_intr_info)); 935 sizeof(struct iosapic_intr_info));
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index ba3ba8bc50be..456f57b087ca 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -275,7 +275,7 @@ static struct irqaction ipi_irqaction = {
275 275
276static struct irqaction resched_irqaction = { 276static struct irqaction resched_irqaction = {
277 .handler = dummy_handler, 277 .handler = dummy_handler,
278 .flags = SA_INTERRUPT, 278 .flags = IRQF_DISABLED,
279 .name = "resched" 279 .name = "resched"
280}; 280};
281#endif 281#endif
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index e2ccc9f660c5..4f0f3b8c1ee2 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -14,6 +14,7 @@
14#include <linux/kexec.h> 14#include <linux/kexec.h>
15#include <linux/cpu.h> 15#include <linux/cpu.h>
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/efi.h>
17#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
18#include <asm/setup.h> 19#include <asm/setup.h>
19#include <asm/delay.h> 20#include <asm/delay.h>
@@ -68,22 +69,10 @@ void machine_kexec_cleanup(struct kimage *image)
68{ 69{
69} 70}
70 71
71void machine_shutdown(void)
72{
73 int cpu;
74
75 for_each_online_cpu(cpu) {
76 if (cpu != smp_processor_id())
77 cpu_down(cpu);
78 }
79 kexec_disable_iosapic();
80}
81
82/* 72/*
83 * Do not allocate memory (or fail in any way) in machine_kexec(). 73 * Do not allocate memory (or fail in any way) in machine_kexec().
84 * We are past the point of no return, committed to rebooting now. 74 * We are past the point of no return, committed to rebooting now.
85 */ 75 */
86extern void *efi_get_pal_addr(void);
87static void ia64_machine_kexec(struct unw_frame_info *info, void *arg) 76static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
88{ 77{
89 struct kimage *image = arg; 78 struct kimage *image = arg;
@@ -93,6 +82,7 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
93 unsigned long vector; 82 unsigned long vector;
94 int ii; 83 int ii;
95 84
85 BUG_ON(!image);
96 if (image->type == KEXEC_TYPE_CRASH) { 86 if (image->type == KEXEC_TYPE_CRASH) {
97 crash_save_this_cpu(); 87 crash_save_this_cpu();
98 current->thread.ksp = (__u64)info->sw - 16; 88 current->thread.ksp = (__u64)info->sw - 16;
@@ -131,6 +121,7 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
131 121
132void machine_kexec(struct kimage *image) 122void machine_kexec(struct kimage *image)
133{ 123{
124 BUG_ON(!image);
134 unw_init_running(ia64_machine_kexec, image); 125 unw_init_running(ia64_machine_kexec, image);
135 for(;;); 126 for(;;);
136} 127}
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 822e59a1b822..e7220900ea14 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -60,16 +60,21 @@ static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
60 msg.address_lo = addr; 60 msg.address_lo = addr;
61 61
62 write_msi_msg(irq, &msg); 62 write_msi_msg(irq, &msg);
63 set_native_irq_info(irq, cpu_mask); 63 irq_desc[irq].affinity = cpu_mask;
64} 64}
65#endif /* CONFIG_SMP */ 65#endif /* CONFIG_SMP */
66 66
67int ia64_setup_msi_irq(unsigned int irq, struct pci_dev *pdev) 67int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
68{ 68{
69 struct msi_msg msg; 69 struct msi_msg msg;
70 unsigned long dest_phys_id; 70 unsigned long dest_phys_id;
71 unsigned int vector; 71 unsigned int irq, vector;
72 72
73 irq = create_irq();
74 if (irq < 0)
75 return irq;
76
77 set_irq_msi(irq, desc);
73 dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map)); 78 dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
74 vector = irq; 79 vector = irq;
75 80
@@ -89,12 +94,12 @@ int ia64_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
89 write_msi_msg(irq, &msg); 94 write_msi_msg(irq, &msg);
90 set_irq_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq); 95 set_irq_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
91 96
92 return 0; 97 return irq;
93} 98}
94 99
95void ia64_teardown_msi_irq(unsigned int irq) 100void ia64_teardown_msi_irq(unsigned int irq)
96{ 101{
97 return; /* no-op */ 102 destroy_irq(irq);
98} 103}
99 104
100static void ia64_ack_msi_irq(unsigned int irq) 105static void ia64_ack_msi_irq(unsigned int irq)
@@ -126,12 +131,12 @@ static struct irq_chip ia64_msi_chip = {
126}; 131};
127 132
128 133
129int arch_setup_msi_irq(unsigned int irq, struct pci_dev *pdev) 134int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
130{ 135{
131 if (platform_setup_msi_irq) 136 if (platform_setup_msi_irq)
132 return platform_setup_msi_irq(irq, pdev); 137 return platform_setup_msi_irq(pdev, desc);
133 138
134 return ia64_setup_msi_irq(irq, pdev); 139 return ia64_setup_msi_irq(pdev, desc);
135} 140}
136 141
137void arch_teardown_msi_irq(unsigned int irq) 142void arch_teardown_msi_irq(unsigned int irq)
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index aa94f60fa8e7..9ddf896a137a 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -147,7 +147,7 @@
147 * in UP: 147 * in UP:
148 * - we need to protect against PMU overflow interrupts (local_irq_disable) 148 * - we need to protect against PMU overflow interrupts (local_irq_disable)
149 * 149 *
150 * spin_lock_irqsave()/spin_lock_irqrestore(): 150 * spin_lock_irqsave()/spin_unlock_irqrestore():
151 * in SMP: local_irq_disable + spin_lock 151 * in SMP: local_irq_disable + spin_lock
152 * in UP : local_irq_disable 152 * in UP : local_irq_disable
153 * 153 *
@@ -521,19 +521,57 @@ pfm_sysctl_t pfm_sysctl;
521EXPORT_SYMBOL(pfm_sysctl); 521EXPORT_SYMBOL(pfm_sysctl);
522 522
523static ctl_table pfm_ctl_table[]={ 523static ctl_table pfm_ctl_table[]={
524 {1, "debug", &pfm_sysctl.debug, sizeof(int), 0666, NULL, &proc_dointvec, NULL,}, 524 {
525 {2, "debug_ovfl", &pfm_sysctl.debug_ovfl, sizeof(int), 0666, NULL, &proc_dointvec, NULL,}, 525 .ctl_name = CTL_UNNUMBERED,
526 {3, "fastctxsw", &pfm_sysctl.fastctxsw, sizeof(int), 0600, NULL, &proc_dointvec, NULL,}, 526 .procname = "debug",
527 {4, "expert_mode", &pfm_sysctl.expert_mode, sizeof(int), 0600, NULL, &proc_dointvec, NULL,}, 527 .data = &pfm_sysctl.debug,
528 { 0, }, 528 .maxlen = sizeof(int),
529 .mode = 0666,
530 .proc_handler = &proc_dointvec,
531 },
532 {
533 .ctl_name = CTL_UNNUMBERED,
534 .procname = "debug_ovfl",
535 .data = &pfm_sysctl.debug_ovfl,
536 .maxlen = sizeof(int),
537 .mode = 0666,
538 .proc_handler = &proc_dointvec,
539 },
540 {
541 .ctl_name = CTL_UNNUMBERED,
542 .procname = "fastctxsw",
543 .data = &pfm_sysctl.fastctxsw,
544 .maxlen = sizeof(int),
545 .mode = 0600,
546 .proc_handler = &proc_dointvec,
547 },
548 {
549 .ctl_name = CTL_UNNUMBERED,
550 .procname = "expert_mode",
551 .data = &pfm_sysctl.expert_mode,
552 .maxlen = sizeof(int),
553 .mode = 0600,
554 .proc_handler = &proc_dointvec,
555 },
556 {}
529}; 557};
530static ctl_table pfm_sysctl_dir[] = { 558static ctl_table pfm_sysctl_dir[] = {
531 {1, "perfmon", NULL, 0, 0755, pfm_ctl_table, }, 559 {
532 {0,}, 560 .ctl_name = CTL_UNNUMBERED,
561 .procname = "perfmon",
562 .mode = 0755,
563 .child = pfm_ctl_table,
564 },
565 {}
533}; 566};
534static ctl_table pfm_sysctl_root[] = { 567static ctl_table pfm_sysctl_root[] = {
535 {1, "kernel", NULL, 0, 0755, pfm_sysctl_dir, }, 568 {
536 {0,}, 569 .ctl_name = CTL_KERN,
570 .procname = "kernel",
571 .mode = 0755,
572 .child = pfm_sysctl_dir,
573 },
574 {}
537}; 575};
538static struct ctl_table_header *pfm_sysctl_header; 576static struct ctl_table_header *pfm_sysctl_header;
539 577
@@ -621,7 +659,7 @@ EXPORT_PER_CPU_SYMBOL_GPL(pfm_syst_info);
621 659
622 660
623/* forward declaration */ 661/* forward declaration */
624static struct file_operations pfm_file_ops; 662static const struct file_operations pfm_file_ops;
625 663
626/* 664/*
627 * forward declarations 665 * forward declarations
@@ -2126,7 +2164,7 @@ pfm_no_open(struct inode *irrelevant, struct file *dontcare)
2126 2164
2127 2165
2128 2166
2129static struct file_operations pfm_file_ops = { 2167static const struct file_operations pfm_file_ops = {
2130 .llseek = no_llseek, 2168 .llseek = no_llseek,
2131 .read = pfm_read, 2169 .read = pfm_read,
2132 .write = pfm_write, 2170 .write = pfm_write,
@@ -2301,12 +2339,11 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
2301 DPRINT(("smpl_buf @%p\n", smpl_buf)); 2339 DPRINT(("smpl_buf @%p\n", smpl_buf));
2302 2340
2303 /* allocate vma */ 2341 /* allocate vma */
2304 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 2342 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
2305 if (!vma) { 2343 if (!vma) {
2306 DPRINT(("Cannot allocate vma\n")); 2344 DPRINT(("Cannot allocate vma\n"));
2307 goto error_kmem; 2345 goto error_kmem;
2308 } 2346 }
2309 memset(vma, 0, sizeof(*vma));
2310 2347
2311 /* 2348 /*
2312 * partially initialize the vma for the sampling buffer 2349 * partially initialize the vma for the sampling buffer
@@ -6597,7 +6634,7 @@ found:
6597 return 0; 6634 return 0;
6598} 6635}
6599 6636
6600static struct file_operations pfm_proc_fops = { 6637static const struct file_operations pfm_proc_fops = {
6601 .open = pfm_proc_open, 6638 .open = pfm_proc_open,
6602 .read = seq_read, 6639 .read = seq_read,
6603 .llseek = seq_lseek, 6640 .llseek = seq_lseek,
@@ -6689,7 +6726,7 @@ pfm_init(void)
6689 /* 6726 /*
6690 * create /proc/sys/kernel/perfmon (for debugging purposes) 6727 * create /proc/sys/kernel/perfmon (for debugging purposes)
6691 */ 6728 */
6692 pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root, 0); 6729 pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root);
6693 6730
6694 /* 6731 /*
6695 * initialize all our spinlocks 6732 * initialize all our spinlocks
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 17685abaf496..ae96d4176995 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -34,6 +34,7 @@
34#include <asm/ia32.h> 34#include <asm/ia32.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
36#include <asm/kdebug.h> 36#include <asm/kdebug.h>
37#include <asm/kexec.h>
37#include <asm/pgalloc.h> 38#include <asm/pgalloc.h>
38#include <asm/processor.h> 39#include <asm/processor.h>
39#include <asm/sal.h> 40#include <asm/sal.h>
@@ -803,6 +804,21 @@ cpu_halt (void)
803 ia64_pal_halt(min_power_state); 804 ia64_pal_halt(min_power_state);
804} 805}
805 806
807void machine_shutdown(void)
808{
809#ifdef CONFIG_HOTPLUG_CPU
810 int cpu;
811
812 for_each_online_cpu(cpu) {
813 if (cpu != smp_processor_id())
814 cpu_down(cpu);
815 }
816#endif
817#ifdef CONFIG_KEXEC
818 kexec_disable_iosapic();
819#endif
820}
821
806void 822void
807machine_restart (char *restart_cmd) 823machine_restart (char *restart_cmd)
808{ 824{
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index aa705e46b974..3f8918782e0c 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
607 */ 607 */
608 list_for_each_safe(this, next, &current->children) { 608 list_for_each_safe(this, next, &current->children) {
609 p = list_entry(this, struct task_struct, sibling); 609 p = list_entry(this, struct task_struct, sibling);
610 if (p->mm != mm) 610 if (p->tgid != child->tgid)
611 continue; 611 continue;
612 if (thread_matches(p, addr)) { 612 if (thread_matches(p, addr)) {
613 child = p; 613 child = p;
@@ -1405,6 +1405,7 @@ ptrace_disable (struct task_struct *child)
1405 struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child)); 1405 struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
1406 1406
1407 /* make sure the single step/taken-branch trap bits are not set: */ 1407 /* make sure the single step/taken-branch trap bits are not set: */
1408 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
1408 child_psr->ss = 0; 1409 child_psr->ss = 0;
1409 child_psr->tb = 0; 1410 child_psr->tb = 0;
1410} 1411}
@@ -1525,6 +1526,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1525 * Make sure the single step/taken-branch trap bits 1526 * Make sure the single step/taken-branch trap bits
1526 * are not set: 1527 * are not set:
1527 */ 1528 */
1529 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
1528 ia64_psr(pt)->ss = 0; 1530 ia64_psr(pt)->ss = 0;
1529 ia64_psr(pt)->tb = 0; 1531 ia64_psr(pt)->tb = 0;
1530 1532
@@ -1556,6 +1558,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1556 goto out_tsk; 1558 goto out_tsk;
1557 1559
1558 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 1560 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
1561 set_tsk_thread_flag(child, TIF_SINGLESTEP);
1559 if (request == PTRACE_SINGLESTEP) { 1562 if (request == PTRACE_SINGLESTEP) {
1560 ia64_psr(pt)->ss = 1; 1563 ia64_psr(pt)->ss = 1;
1561 } else { 1564 } else {
@@ -1595,13 +1598,9 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1595} 1598}
1596 1599
1597 1600
1598void 1601static void
1599syscall_trace (void) 1602syscall_trace (void)
1600{ 1603{
1601 if (!test_thread_flag(TIF_SYSCALL_TRACE))
1602 return;
1603 if (!(current->ptrace & PT_PTRACED))
1604 return;
1605 /* 1604 /*
1606 * The 0x80 provides a way for the tracing parent to 1605 * The 0x80 provides a way for the tracing parent to
1607 * distinguish between a syscall stop and SIGTRAP delivery. 1606 * distinguish between a syscall stop and SIGTRAP delivery.
@@ -1664,7 +1663,8 @@ syscall_trace_leave (long arg0, long arg1, long arg2, long arg3,
1664 audit_syscall_exit(success, result); 1663 audit_syscall_exit(success, result);
1665 } 1664 }
1666 1665
1667 if (test_thread_flag(TIF_SYSCALL_TRACE) 1666 if ((test_thread_flag(TIF_SYSCALL_TRACE)
1667 || test_thread_flag(TIF_SINGLESTEP))
1668 && (current->ptrace & PT_PTRACED)) 1668 && (current->ptrace & PT_PTRACED))
1669 syscall_trace(); 1669 syscall_trace();
1670} 1670}
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index 20bad78b5073..37c876f95dba 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -194,9 +194,8 @@ static void __init
194chk_nointroute_opt(void) 194chk_nointroute_opt(void)
195{ 195{
196 char *cp; 196 char *cp;
197 extern char saved_command_line[];
198 197
199 for (cp = saved_command_line; *cp; ) { 198 for (cp = boot_command_line; *cp; ) {
200 if (memcmp(cp, "nointroute", 10) == 0) { 199 if (memcmp(cp, "nointroute", 10) == 0) {
201 no_int_routing = 1; 200 no_int_routing = 1;
202 printk ("no_int_routing on\n"); 201 printk ("no_int_routing on\n");
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index e375a2f0f2c3..af9f8754d847 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -352,7 +352,7 @@ retry:
352 return size; 352 return size;
353} 353}
354 354
355static struct file_operations salinfo_event_fops = { 355static const struct file_operations salinfo_event_fops = {
356 .open = salinfo_event_open, 356 .open = salinfo_event_open,
357 .read = salinfo_event_read, 357 .read = salinfo_event_read,
358}; 358};
@@ -568,7 +568,7 @@ salinfo_log_write(struct file *file, const char __user *buffer, size_t count, lo
568 return count; 568 return count;
569} 569}
570 570
571static struct file_operations salinfo_data_fops = { 571static const struct file_operations salinfo_data_fops = {
572 .open = salinfo_log_open, 572 .open = salinfo_log_open,
573 .release = salinfo_log_release, 573 .release = salinfo_log_release,
574 .read = salinfo_log_read, 574 .read = salinfo_log_read,
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index ad567b8d432e..5fa09d141ab7 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -262,7 +262,7 @@ reserve_memory (void)
262 * appropriate after a kernel panic. 262 * appropriate after a kernel panic.
263 */ 263 */
264 { 264 {
265 char *from = strstr(saved_command_line, "crashkernel="); 265 char *from = strstr(boot_command_line, "crashkernel=");
266 unsigned long base, size; 266 unsigned long base, size;
267 if (from) { 267 if (from) {
268 size = memparse(from + 12, &from); 268 size = memparse(from + 12, &from);
@@ -463,7 +463,7 @@ setup_arch (char **cmdline_p)
463 ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); 463 ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
464 464
465 *cmdline_p = __va(ia64_boot_param->command_line); 465 *cmdline_p = __va(ia64_boot_param->command_line);
466 strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE); 466 strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
467 467
468 efi_init(); 468 efi_init();
469 io_port_init(); 469 io_port_init();
@@ -569,34 +569,31 @@ show_cpuinfo (struct seq_file *m, void *v)
569 { 1UL << 1, "spontaneous deferral"}, 569 { 1UL << 1, "spontaneous deferral"},
570 { 1UL << 2, "16-byte atomic ops" } 570 { 1UL << 2, "16-byte atomic ops" }
571 }; 571 };
572 char features[128], *cp, sep; 572 char features[128], *cp, *sep;
573 struct cpuinfo_ia64 *c = v; 573 struct cpuinfo_ia64 *c = v;
574 unsigned long mask; 574 unsigned long mask;
575 unsigned long proc_freq; 575 unsigned long proc_freq;
576 int i; 576 int i, size;
577 577
578 mask = c->features; 578 mask = c->features;
579 579
580 /* build the feature string: */ 580 /* build the feature string: */
581 memcpy(features, " standard", 10); 581 memcpy(features, "standard", 9);
582 cp = features; 582 cp = features;
583 sep = 0; 583 size = sizeof(features);
584 for (i = 0; i < (int) ARRAY_SIZE(feature_bits); ++i) { 584 sep = "";
585 for (i = 0; i < ARRAY_SIZE(feature_bits) && size > 1; ++i) {
585 if (mask & feature_bits[i].mask) { 586 if (mask & feature_bits[i].mask) {
586 if (sep) 587 cp += snprintf(cp, size, "%s%s", sep,
587 *cp++ = sep; 588 feature_bits[i].feature_name),
588 sep = ','; 589 sep = ", ";
589 *cp++ = ' ';
590 strcpy(cp, feature_bits[i].feature_name);
591 cp += strlen(feature_bits[i].feature_name);
592 mask &= ~feature_bits[i].mask; 590 mask &= ~feature_bits[i].mask;
591 size = sizeof(features) - (cp - features);
593 } 592 }
594 } 593 }
595 if (mask) { 594 if (mask && size > 1) {
596 /* print unknown features as a hex value: */ 595 /* print unknown features as a hex value */
597 if (sep) 596 snprintf(cp, size, "%s0x%lx", sep, mask);
598 *cp++ = sep;
599 sprintf(cp, " 0x%lx", mask);
600 } 597 }
601 598
602 proc_freq = cpufreq_quick_get(cpunum); 599 proc_freq = cpufreq_quick_get(cpunum);
@@ -612,7 +609,7 @@ show_cpuinfo (struct seq_file *m, void *v)
612 "model name : %s\n" 609 "model name : %s\n"
613 "revision : %u\n" 610 "revision : %u\n"
614 "archrev : %u\n" 611 "archrev : %u\n"
615 "features :%s\n" /* don't change this---it _is_ right! */ 612 "features : %s\n"
616 "cpu number : %lu\n" 613 "cpu number : %lu\n"
617 "cpu regs : %u\n" 614 "cpu regs : %u\n"
618 "cpu MHz : %lu.%06lu\n" 615 "cpu MHz : %lu.%06lu\n"
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index f4c7f7769cf7..55ddd809b02d 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -221,13 +221,13 @@ send_IPI_self (int op)
221 221
222#ifdef CONFIG_KEXEC 222#ifdef CONFIG_KEXEC
223void 223void
224kdump_smp_send_stop() 224kdump_smp_send_stop(void)
225{ 225{
226 send_IPI_allbutself(IPI_KDUMP_CPU_STOP); 226 send_IPI_allbutself(IPI_KDUMP_CPU_STOP);
227} 227}
228 228
229void 229void
230kdump_smp_send_init() 230kdump_smp_send_init(void)
231{ 231{
232 unsigned int cpu, self_cpu; 232 unsigned int cpu, self_cpu;
233 self_cpu = smp_processor_id(); 233 self_cpu = smp_processor_id();
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index ab684747036f..765cbe5ba6ae 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -24,8 +24,6 @@
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25#include <asm/kdebug.h> 25#include <asm/kdebug.h>
26 26
27extern spinlock_t timerlist_lock;
28
29fpswa_interface_t *fpswa_interface; 27fpswa_interface_t *fpswa_interface;
30EXPORT_SYMBOL(fpswa_interface); 28EXPORT_SYMBOL(fpswa_interface);
31 29
@@ -53,34 +51,6 @@ trap_init (void)
53 fpswa_interface = __va(ia64_boot_param->fpswa); 51 fpswa_interface = __va(ia64_boot_param->fpswa);
54} 52}
55 53
56/*
57 * Unlock any spinlocks which will prevent us from getting the message out (timerlist_lock
58 * is acquired through the console unblank code)
59 */
60void
61bust_spinlocks (int yes)
62{
63 int loglevel_save = console_loglevel;
64
65 if (yes) {
66 oops_in_progress = 1;
67 return;
68 }
69
70#ifdef CONFIG_VT
71 unblank_screen();
72#endif
73 oops_in_progress = 0;
74 /*
75 * OK, the message is on the console. Now we call printk() without
76 * oops_in_progress set so that printk will give klogd a poke. Hold onto
77 * your hats...
78 */
79 console_loglevel = 15; /* NMI oopser may have shut the console up */
80 printk(" ");
81 console_loglevel = loglevel_save;
82}
83
84void 54void
85die (const char *str, struct pt_regs *regs, long err) 55die (const char *str, struct pt_regs *regs, long err)
86{ 56{
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index d6083a0936f4..25dd55e4db24 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -111,12 +111,14 @@ SECTIONS
111 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) 111 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
112 { *(.init.data) } 112 { *(.init.data) }
113 113
114#ifdef CONFIG_BLK_DEV_INITRD
114 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) 115 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
115 { 116 {
116 __initramfs_start = .; 117 __initramfs_start = .;
117 *(.init.ramfs) 118 *(.init.ramfs)
118 __initramfs_end = .; 119 __initramfs_end = .;
119 } 120 }
121#endif
120 122
121 . = ALIGN(16); 123 . = ALIGN(16);
122 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) 124 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
@@ -157,6 +159,7 @@ SECTIONS
157 } 159 }
158#endif 160#endif
159 161
162 . = ALIGN(8);
160 __con_initcall_start = .; 163 __con_initcall_start = .;
161 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) 164 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
162 { *(.con_initcall.init) } 165 { *(.con_initcall.init) }
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 1e79551231b9..ca4d41e5f177 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -30,47 +30,69 @@ static unsigned long max_gap;
30#endif 30#endif
31 31
32/** 32/**
33 * show_mem - display a memory statistics summary 33 * show_mem - give short summary of memory stats
34 * 34 *
35 * Just walks the pages in the system and describes where they're allocated. 35 * Shows a simple page count of reserved and used pages in the system.
36 * For discontig machines, it does this on a per-pgdat basis.
36 */ 37 */
37void 38void show_mem(void)
38show_mem (void)
39{ 39{
40 int i, total = 0, reserved = 0; 40 int i, total_reserved = 0;
41 int shared = 0, cached = 0; 41 int total_shared = 0, total_cached = 0;
42 unsigned long total_present = 0;
43 pg_data_t *pgdat;
42 44
43 printk(KERN_INFO "Mem-info:\n"); 45 printk(KERN_INFO "Mem-info:\n");
44 show_free_areas(); 46 show_free_areas();
45
46 printk(KERN_INFO "Free swap: %6ldkB\n", 47 printk(KERN_INFO "Free swap: %6ldkB\n",
47 nr_swap_pages<<(PAGE_SHIFT-10)); 48 nr_swap_pages<<(PAGE_SHIFT-10));
48 i = max_mapnr; 49 printk(KERN_INFO "Node memory in pages:\n");
49 for (i = 0; i < max_mapnr; i++) { 50 for_each_online_pgdat(pgdat) {
50 if (!pfn_valid(i)) { 51 unsigned long present;
52 unsigned long flags;
53 int shared = 0, cached = 0, reserved = 0;
54
55 pgdat_resize_lock(pgdat, &flags);
56 present = pgdat->node_present_pages;
57 for(i = 0; i < pgdat->node_spanned_pages; i++) {
58 struct page *page;
59 if (pfn_valid(pgdat->node_start_pfn + i))
60 page = pfn_to_page(pgdat->node_start_pfn + i);
61 else {
51#ifdef CONFIG_VIRTUAL_MEM_MAP 62#ifdef CONFIG_VIRTUAL_MEM_MAP
52 if (max_gap < LARGE_GAP) 63 if (max_gap < LARGE_GAP)
53 continue; 64 continue;
54 i = vmemmap_find_next_valid_pfn(0, i) - 1;
55#endif 65#endif
56 continue; 66 i = vmemmap_find_next_valid_pfn(pgdat->node_id,
67 i) - 1;
68 continue;
69 }
70 if (PageReserved(page))
71 reserved++;
72 else if (PageSwapCache(page))
73 cached++;
74 else if (page_count(page))
75 shared += page_count(page)-1;
57 } 76 }
58 total++; 77 pgdat_resize_unlock(pgdat, &flags);
59 if (PageReserved(mem_map+i)) 78 total_present += present;
60 reserved++; 79 total_reserved += reserved;
61 else if (PageSwapCache(mem_map+i)) 80 total_cached += cached;
62 cached++; 81 total_shared += shared;
63 else if (page_count(mem_map + i)) 82 printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, "
64 shared += page_count(mem_map + i) - 1; 83 "shrd: %10d, swpd: %10d\n", pgdat->node_id,
84 present, reserved, shared, cached);
65 } 85 }
66 printk(KERN_INFO "%d pages of RAM\n", total); 86 printk(KERN_INFO "%ld pages of RAM\n", total_present);
67 printk(KERN_INFO "%d reserved pages\n", reserved); 87 printk(KERN_INFO "%d reserved pages\n", total_reserved);
68 printk(KERN_INFO "%d pages shared\n", shared); 88 printk(KERN_INFO "%d pages shared\n", total_shared);
69 printk(KERN_INFO "%d pages swap cached\n", cached); 89 printk(KERN_INFO "%d pages swap cached\n", total_cached);
70 printk(KERN_INFO "%ld pages in page table cache\n", 90 printk(KERN_INFO "Total of %ld pages in page table cache\n",
71 pgtable_quicklist_total_size()); 91 pgtable_quicklist_total_size());
92 printk(KERN_INFO "%d free buffer pages\n", nr_free_buffer_pages());
72} 93}
73 94
95
74/* physical address where the bootmem map is located */ 96/* physical address where the bootmem map is located */
75unsigned long bootmap_start; 97unsigned long bootmap_start;
76 98
@@ -177,7 +199,7 @@ find_memory (void)
177 199
178#ifdef CONFIG_CRASH_DUMP 200#ifdef CONFIG_CRASH_DUMP
179 /* If we are doing a crash dump, we still need to know the real mem 201 /* If we are doing a crash dump, we still need to know the real mem
180 * size before original memory map is * reset. */ 202 * size before original memory map is reset. */
181 saved_max_pfn = max_pfn; 203 saved_max_pfn = max_pfn;
182#endif 204#endif
183} 205}
@@ -237,9 +259,11 @@ paging_init (void)
237 num_physpages = 0; 259 num_physpages = 0;
238 efi_memmap_walk(count_pages, &num_physpages); 260 efi_memmap_walk(count_pages, &num_physpages);
239 261
240 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
241 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 262 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
263#ifdef CONFIG_ZONE_DMA
264 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
242 max_zone_pfns[ZONE_DMA] = max_dma; 265 max_zone_pfns[ZONE_DMA] = max_dma;
266#endif
243 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 267 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
244 268
245#ifdef CONFIG_VIRTUAL_MEM_MAP 269#ifdef CONFIG_VIRTUAL_MEM_MAP
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 96722cb1b49d..16835108bb5b 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -37,7 +37,9 @@ struct early_node_data {
37 unsigned long pernode_size; 37 unsigned long pernode_size;
38 struct bootmem_data bootmem_data; 38 struct bootmem_data bootmem_data;
39 unsigned long num_physpages; 39 unsigned long num_physpages;
40#ifdef CONFIG_ZONE_DMA
40 unsigned long num_dma_physpages; 41 unsigned long num_dma_physpages;
42#endif
41 unsigned long min_pfn; 43 unsigned long min_pfn;
42 unsigned long max_pfn; 44 unsigned long max_pfn;
43}; 45};
@@ -412,37 +414,6 @@ static void __init memory_less_nodes(void)
412 return; 414 return;
413} 415}
414 416
415#ifdef CONFIG_SPARSEMEM
416/**
417 * register_sparse_mem - notify SPARSEMEM that this memory range exists.
418 * @start: physical start of range
419 * @end: physical end of range
420 * @arg: unused
421 *
422 * Simply calls SPARSEMEM to register memory section(s).
423 */
424static int __init register_sparse_mem(unsigned long start, unsigned long end,
425 void *arg)
426{
427 int nid;
428
429 start = __pa(start) >> PAGE_SHIFT;
430 end = __pa(end) >> PAGE_SHIFT;
431 nid = early_pfn_to_nid(start);
432 memory_present(nid, start, end);
433
434 return 0;
435}
436
437static void __init arch_sparse_init(void)
438{
439 efi_memmap_walk(register_sparse_mem, NULL);
440 sparse_init();
441}
442#else
443#define arch_sparse_init() do {} while (0)
444#endif
445
446/** 417/**
447 * find_memory - walk the EFI memory map and setup the bootmem allocator 418 * find_memory - walk the EFI memory map and setup the bootmem allocator
448 * 419 *
@@ -473,6 +444,9 @@ void __init find_memory(void)
473 node_clear(node, memory_less_mask); 444 node_clear(node, memory_less_mask);
474 mem_data[node].min_pfn = ~0UL; 445 mem_data[node].min_pfn = ~0UL;
475 } 446 }
447
448 efi_memmap_walk(register_active_ranges, NULL);
449
476 /* 450 /*
477 * Initialize the boot memory maps in reverse order since that's 451 * Initialize the boot memory maps in reverse order since that's
478 * what the bootmem allocator expects 452 * what the bootmem allocator expects
@@ -506,6 +480,12 @@ void __init find_memory(void)
506 max_pfn = max_low_pfn; 480 max_pfn = max_low_pfn;
507 481
508 find_initrd(); 482 find_initrd();
483
484#ifdef CONFIG_CRASH_DUMP
485 /* If we are doing a crash dump, we still need to know the real mem
486 * size before original memory map is reset. */
487 saved_max_pfn = max_pfn;
488#endif
509} 489}
510 490
511#ifdef CONFIG_SMP 491#ifdef CONFIG_SMP
@@ -654,11 +634,12 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n
654{ 634{
655 unsigned long end = start + len; 635 unsigned long end = start + len;
656 636
657 add_active_range(node, start >> PAGE_SHIFT, end >> PAGE_SHIFT);
658 mem_data[node].num_physpages += len >> PAGE_SHIFT; 637 mem_data[node].num_physpages += len >> PAGE_SHIFT;
638#ifdef CONFIG_ZONE_DMA
659 if (start <= __pa(MAX_DMA_ADDRESS)) 639 if (start <= __pa(MAX_DMA_ADDRESS))
660 mem_data[node].num_dma_physpages += 640 mem_data[node].num_dma_physpages +=
661 (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; 641 (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
642#endif
662 start = GRANULEROUNDDOWN(start); 643 start = GRANULEROUNDDOWN(start);
663 start = ORDERROUNDDOWN(start); 644 start = ORDERROUNDDOWN(start);
664 end = GRANULEROUNDUP(end); 645 end = GRANULEROUNDUP(end);
@@ -686,10 +667,11 @@ void __init paging_init(void)
686 667
687 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; 668 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
688 669
689 arch_sparse_init();
690
691 efi_memmap_walk(filter_rsvd_memory, count_node_pages); 670 efi_memmap_walk(filter_rsvd_memory, count_node_pages);
692 671
672 sparse_memory_present_with_active_regions(MAX_NUMNODES);
673 sparse_init();
674
693#ifdef CONFIG_VIRTUAL_MEM_MAP 675#ifdef CONFIG_VIRTUAL_MEM_MAP
694 vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * 676 vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
695 sizeof(struct page)); 677 sizeof(struct page));
@@ -710,7 +692,9 @@ void __init paging_init(void)
710 } 692 }
711 693
712 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 694 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
695#ifdef CONFIG_ZONE_DMA
713 max_zone_pfns[ZONE_DMA] = max_dma; 696 max_zone_pfns[ZONE_DMA] = max_dma;
697#endif
714 max_zone_pfns[ZONE_NORMAL] = max_pfn; 698 max_zone_pfns[ZONE_NORMAL] = max_pfn;
715 free_area_init_nodes(max_zone_pfns); 699 free_area_init_nodes(max_zone_pfns);
716 700
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 1373fae7657f..f225dd72968b 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -19,6 +19,7 @@
19#include <linux/swap.h> 19#include <linux/swap.h>
20#include <linux/proc_fs.h> 20#include <linux/proc_fs.h>
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22#include <linux/kexec.h>
22 23
23#include <asm/a.out.h> 24#include <asm/a.out.h>
24#include <asm/dma.h> 25#include <asm/dma.h>
@@ -67,7 +68,7 @@ max_pgt_pages(void)
67#ifndef CONFIG_NUMA 68#ifndef CONFIG_NUMA
68 node_free_pages = nr_free_pages(); 69 node_free_pages = nr_free_pages();
69#else 70#else
70 node_free_pages = nr_free_pages_pgdat(NODE_DATA(numa_node_id())); 71 node_free_pages = node_page_state(numa_node_id(), NR_FREE_PAGES);
71#endif 72#endif
72 max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM; 73 max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM;
73 max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES); 74 max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES);
@@ -128,6 +129,25 @@ lazy_mmu_prot_update (pte_t pte)
128 set_bit(PG_arch_1, &page->flags); /* mark page as clean */ 129 set_bit(PG_arch_1, &page->flags); /* mark page as clean */
129} 130}
130 131
132/*
133 * Since DMA is i-cache coherent, any (complete) pages that were written via
134 * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to
135 * flush them when they get mapped into an executable vm-area.
136 */
137void
138dma_mark_clean(void *addr, size_t size)
139{
140 unsigned long pg_addr, end;
141
142 pg_addr = PAGE_ALIGN((unsigned long) addr);
143 end = (unsigned long) addr + size;
144 while (pg_addr + PAGE_SIZE <= end) {
145 struct page *page = virt_to_page(pg_addr);
146 set_bit(PG_arch_1, &page->flags);
147 pg_addr += PAGE_SIZE;
148 }
149}
150
131inline void 151inline void
132ia64_set_rbs_bot (void) 152ia64_set_rbs_bot (void)
133{ 153{
@@ -156,9 +176,8 @@ ia64_init_addr_space (void)
156 * the problem. When the process attempts to write to the register backing store 176 * the problem. When the process attempts to write to the register backing store
157 * for the first time, it will get a SEGFAULT in this case. 177 * for the first time, it will get a SEGFAULT in this case.
158 */ 178 */
159 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 179 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
160 if (vma) { 180 if (vma) {
161 memset(vma, 0, sizeof(*vma));
162 vma->vm_mm = current->mm; 181 vma->vm_mm = current->mm;
163 vma->vm_start = current->thread.rbs_bot & PAGE_MASK; 182 vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
164 vma->vm_end = vma->vm_start + PAGE_SIZE; 183 vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -175,9 +194,8 @@ ia64_init_addr_space (void)
175 194
176 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ 195 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
177 if (!(current->personality & MMAP_PAGE_ZERO)) { 196 if (!(current->personality & MMAP_PAGE_ZERO)) {
178 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 197 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
179 if (vma) { 198 if (vma) {
180 memset(vma, 0, sizeof(*vma));
181 vma->vm_mm = current->mm; 199 vma->vm_mm = current->mm;
182 vma->vm_end = PAGE_SIZE; 200 vma->vm_end = PAGE_SIZE;
183 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); 201 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
@@ -595,13 +613,27 @@ find_largest_hole (u64 start, u64 end, void *arg)
595 return 0; 613 return 0;
596} 614}
597 615
616#endif /* CONFIG_VIRTUAL_MEM_MAP */
617
598int __init 618int __init
599register_active_ranges(u64 start, u64 end, void *arg) 619register_active_ranges(u64 start, u64 end, void *arg)
600{ 620{
601 add_active_range(0, __pa(start) >> PAGE_SHIFT, __pa(end) >> PAGE_SHIFT); 621 int nid = paddr_to_nid(__pa(start));
622
623 if (nid < 0)
624 nid = 0;
625#ifdef CONFIG_KEXEC
626 if (start > crashk_res.start && start < crashk_res.end)
627 start = crashk_res.end;
628 if (end > crashk_res.start && end < crashk_res.end)
629 end = crashk_res.start;
630#endif
631
632 if (start < end)
633 add_active_range(nid, __pa(start) >> PAGE_SHIFT,
634 __pa(end) >> PAGE_SHIFT);
602 return 0; 635 return 0;
603} 636}
604#endif /* CONFIG_VIRTUAL_MEM_MAP */
605 637
606static int __init 638static int __init
607count_reserved_pages (u64 start, u64 end, void *arg) 639count_reserved_pages (u64 start, u64 end, void *arg)
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c
index abca6bd7962f..fcf7f93c4b61 100644
--- a/arch/ia64/sn/kernel/huberror.c
+++ b/arch/ia64/sn/kernel/huberror.c
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1992 - 1997, 2000,2002-2005 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 1992 - 1997, 2000,2002-2007 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8 8
9#include <linux/types.h> 9#include <linux/types.h>
@@ -38,12 +38,20 @@ static irqreturn_t hub_eint_handler(int irq, void *arg)
38 (u64) nasid, 0, 0, 0, 0, 0, 0); 38 (u64) nasid, 0, 0, 0, 0, 0, 0);
39 39
40 if ((int)ret_stuff.v0) 40 if ((int)ret_stuff.v0)
41 panic("hubii_eint_handler(): Fatal TIO Error"); 41 panic("%s: Fatal %s Error", __FUNCTION__,
42 ((nasid & 1) ? "TIO" : "HUBII"));
42 43
43 if (!(nasid & 1)) /* Not a TIO, handle CRB errors */ 44 if (!(nasid & 1)) /* Not a TIO, handle CRB errors */
44 (void)hubiio_crb_error_handler(hubdev_info); 45 (void)hubiio_crb_error_handler(hubdev_info);
45 } else 46 } else
46 bte_error_handler((unsigned long)NODEPDA(nasid_to_cnodeid(nasid))); 47 if (nasid & 1) { /* TIO errors */
48 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_HUB_ERROR_INTERRUPT,
49 (u64) nasid, 0, 0, 0, 0, 0, 0);
50
51 if ((int)ret_stuff.v0)
52 panic("%s: Fatal TIO Error", __FUNCTION__);
53 } else
54 bte_error_handler((unsigned long)NODEPDA(nasid_to_cnodeid(nasid)));
47 55
48 return IRQ_HANDLED; 56 return IRQ_HANDLED;
49} 57}
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index cb96b4ea7df6..8c331ca6e5c9 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -13,6 +13,7 @@
13#include <asm/sn/sn_sal.h> 13#include <asm/sn/sn_sal.h>
14#include "xtalk/hubdev.h" 14#include "xtalk/hubdev.h"
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <acpi/acnamesp.h>
16 17
17 18
18/* 19/*
@@ -31,6 +32,12 @@ struct acpi_vendor_uuid sn_uuid = {
31 0xa2, 0x7c, 0x08, 0x00, 0x69, 0x13, 0xea, 0x51 }, 32 0xa2, 0x7c, 0x08, 0x00, 0x69, 0x13, 0xea, 0x51 },
32}; 33};
33 34
35struct sn_pcidev_match {
36 u8 bus;
37 unsigned int devfn;
38 acpi_handle handle;
39};
40
34/* 41/*
35 * Perform the early IO init in PROM. 42 * Perform the early IO init in PROM.
36 */ 43 */
@@ -119,9 +126,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
119 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, 126 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
120 &sn_uuid, &buffer); 127 &sn_uuid, &buffer);
121 if (ACPI_FAILURE(status)) { 128 if (ACPI_FAILURE(status)) {
122 printk(KERN_ERR "get_acpi_pcibus_ptr: " 129 printk(KERN_ERR "%s: "
123 "get_acpi_bussoft_info() failed: %d\n", 130 "acpi_get_vendor_resource() failed (0x%x) for: ",
124 status); 131 __FUNCTION__, status);
132 acpi_ns_print_node_pathname(handle, NULL);
133 printk("\n");
125 return NULL; 134 return NULL;
126 } 135 }
127 resource = buffer.pointer; 136 resource = buffer.pointer;
@@ -130,8 +139,8 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
130 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != 139 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
131 sizeof(struct pcibus_bussoft *)) { 140 sizeof(struct pcibus_bussoft *)) {
132 printk(KERN_ERR 141 printk(KERN_ERR
133 "get_acpi_bussoft_ptr: Invalid vendor data " 142 "%s: Invalid vendor data length %d\n",
134 "length %d\n", vendor->byte_length); 143 __FUNCTION__, vendor->byte_length);
135 kfree(buffer.pointer); 144 kfree(buffer.pointer);
136 return NULL; 145 return NULL;
137 } 146 }
@@ -143,34 +152,254 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
143} 152}
144 153
145/* 154/*
146 * sn_acpi_bus_fixup 155 * sn_extract_device_info - Extract the pcidev_info and the sn_irq_info
156 * pointers from the vendor resource using the
157 * provided acpi handle, and copy the structures
158 * into the argument buffers.
147 */ 159 */
148void 160static int
149sn_acpi_bus_fixup(struct pci_bus *bus) 161sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info,
162 struct sn_irq_info **sn_irq_info)
150{ 163{
151 struct pci_dev *pci_dev = NULL; 164 u64 addr;
152 struct pcibus_bussoft *prom_bussoft_ptr; 165 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
153 extern void sn_common_bus_fixup(struct pci_bus *, 166 struct sn_irq_info *irq_info, *irq_info_prom;
154 struct pcibus_bussoft *); 167 struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr;
168 struct acpi_resource *resource;
169 int ret = 0;
170 acpi_status status;
171 struct acpi_resource_vendor_typed *vendor;
155 172
156 if (!bus->parent) { /* If root bus */ 173 /*
157 prom_bussoft_ptr = sn_get_bussoft_ptr(bus); 174 * The pointer to this device's pcidev_info structure in
158 if (prom_bussoft_ptr == NULL) { 175 * the PROM, is in the vendor resource.
176 */
177 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
178 &sn_uuid, &buffer);
179 if (ACPI_FAILURE(status)) {
180 printk(KERN_ERR
181 "%s: acpi_get_vendor_resource() failed (0x%x) for: ",
182 __FUNCTION__, status);
183 acpi_ns_print_node_pathname(handle, NULL);
184 printk("\n");
185 return 1;
186 }
187
188 resource = buffer.pointer;
189 vendor = &resource->data.vendor_typed;
190 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
191 sizeof(struct pci_devdev_info *)) {
192 printk(KERN_ERR
193 "%s: Invalid vendor data length: %d for: ",
194 __FUNCTION__, vendor->byte_length);
195 acpi_ns_print_node_pathname(handle, NULL);
196 printk("\n");
197 ret = 1;
198 goto exit;
199 }
200
201 pcidev_ptr = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
202 if (!pcidev_ptr)
203 panic("%s: Unable to alloc memory for pcidev_info", __FUNCTION__);
204
205 memcpy(&addr, vendor->byte_data, sizeof(struct pcidev_info *));
206 pcidev_prom_ptr = __va(addr);
207 memcpy(pcidev_ptr, pcidev_prom_ptr, sizeof(struct pcidev_info));
208
209 /* Get the IRQ info */
210 irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
211 if (!irq_info)
212 panic("%s: Unable to alloc memory for sn_irq_info", __FUNCTION__);
213
214 if (pcidev_ptr->pdi_sn_irq_info) {
215 irq_info_prom = __va(pcidev_ptr->pdi_sn_irq_info);
216 memcpy(irq_info, irq_info_prom, sizeof(struct sn_irq_info));
217 }
218
219 *pcidev_info = pcidev_ptr;
220 *sn_irq_info = irq_info;
221
222exit:
223 kfree(buffer.pointer);
224 return ret;
225}
226
227static unsigned int
228get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
229{
230 unsigned long adr;
231 acpi_handle child;
232 unsigned int devfn;
233 int function;
234 acpi_handle parent;
235 int slot;
236 acpi_status status;
237
238 /*
239 * Do an upward search to find the root bus device, and
240 * obtain the host devfn from the previous child device.
241 */
242 child = device_handle;
243 while (child) {
244 status = acpi_get_parent(child, &parent);
245 if (ACPI_FAILURE(status)) {
246 printk(KERN_ERR "%s: acpi_get_parent() failed "
247 "(0x%x) for: ", __FUNCTION__, status);
248 acpi_ns_print_node_pathname(child, NULL);
249 printk("\n");
250 panic("%s: Unable to find host devfn\n", __FUNCTION__);
251 }
252 if (parent == rootbus_handle)
253 break;
254 child = parent;
255 }
256 if (!child) {
257 printk(KERN_ERR "%s: Unable to find root bus for: ",
258 __FUNCTION__);
259 acpi_ns_print_node_pathname(device_handle, NULL);
260 printk("\n");
261 BUG();
262 }
263
264 status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr);
265 if (ACPI_FAILURE(status)) {
266 printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ",
267 __FUNCTION__, status);
268 acpi_ns_print_node_pathname(child, NULL);
269 printk("\n");
270 panic("%s: Unable to find host devfn\n", __FUNCTION__);
271 }
272
273 slot = (adr >> 16) & 0xffff;
274 function = adr & 0xffff;
275 devfn = PCI_DEVFN(slot, function);
276 return devfn;
277}
278
279/*
280 * find_matching_device - Callback routine to find the ACPI device
281 * that matches up with our pci_dev device.
282 * Matching is done on bus number and devfn.
283 * To find the bus number for a particular
284 * ACPI device, we must look at the _BBN method
285 * of its parent.
286 */
287static acpi_status
288find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
289{
290 unsigned long bbn = -1;
291 unsigned long adr;
292 acpi_handle parent = NULL;
293 acpi_status status;
294 unsigned int devfn;
295 int function;
296 int slot;
297 struct sn_pcidev_match *info = context;
298
299 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
300 &adr);
301 if (ACPI_SUCCESS(status)) {
302 status = acpi_get_parent(handle, &parent);
303 if (ACPI_FAILURE(status)) {
159 printk(KERN_ERR 304 printk(KERN_ERR
160 "sn_pci_fixup_bus: 0x%04x:0x%02x Unable to " 305 "%s: acpi_get_parent() failed (0x%x) for: ",
161 "obtain prom_bussoft_ptr\n", 306 __FUNCTION__, status);
162 pci_domain_nr(bus), bus->number); 307 acpi_ns_print_node_pathname(handle, NULL);
163 return; 308 printk("\n");
309 return AE_OK;
310 }
311 status = acpi_evaluate_integer(parent, METHOD_NAME__BBN,
312 NULL, &bbn);
313 if (ACPI_FAILURE(status)) {
314 printk(KERN_ERR
315 "%s: Failed to find _BBN in parent of: ",
316 __FUNCTION__);
317 acpi_ns_print_node_pathname(handle, NULL);
318 printk("\n");
319 return AE_OK;
320 }
321
322 slot = (adr >> 16) & 0xffff;
323 function = adr & 0xffff;
324 devfn = PCI_DEVFN(slot, function);
325 if ((info->devfn == devfn) && (info->bus == bbn)) {
326 /* We have a match! */
327 info->handle = handle;
328 return 1;
164 } 329 }
165 sn_common_bus_fixup(bus, prom_bussoft_ptr);
166 } 330 }
167 list_for_each_entry(pci_dev, &bus->devices, bus_list) { 331 return AE_OK;
168 sn_pci_fixup_slot(pci_dev); 332}
333
334/*
335 * sn_acpi_get_pcidev_info - Search ACPI namespace for the acpi
336 * device matching the specified pci_dev,
337 * and return the pcidev info and irq info.
338 */
339int
340sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
341 struct sn_irq_info **sn_irq_info)
342{
343 unsigned int host_devfn;
344 struct sn_pcidev_match pcidev_match;
345 acpi_handle rootbus_handle;
346 unsigned long segment;
347 acpi_status status;
348
349 rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
350 status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
351 &segment);
352 if (ACPI_SUCCESS(status)) {
353 if (segment != pci_domain_nr(dev)) {
354 printk(KERN_ERR
355 "%s: Segment number mismatch, 0x%lx vs 0x%x for: ",
356 __FUNCTION__, segment, pci_domain_nr(dev));
357 acpi_ns_print_node_pathname(rootbus_handle, NULL);
358 printk("\n");
359 return 1;
360 }
361 } else {
362 printk(KERN_ERR "%s: Unable to get __SEG from: ",
363 __FUNCTION__);
364 acpi_ns_print_node_pathname(rootbus_handle, NULL);
365 printk("\n");
366 return 1;
367 }
368
369 /*
370 * We want to search all devices in this segment/domain
371 * of the ACPI namespace for the matching ACPI device,
372 * which holds the pcidev_info pointer in its vendor resource.
373 */
374 pcidev_match.bus = dev->bus->number;
375 pcidev_match.devfn = dev->devfn;
376 pcidev_match.handle = NULL;
377
378 acpi_walk_namespace(ACPI_TYPE_DEVICE, rootbus_handle, ACPI_UINT32_MAX,
379 find_matching_device, &pcidev_match, NULL);
380
381 if (!pcidev_match.handle) {
382 printk(KERN_ERR
383 "%s: Could not find matching ACPI device for %s.\n",
384 __FUNCTION__, pci_name(dev));
385 return 1;
169 } 386 }
387
388 if (sn_extract_device_info(pcidev_match.handle, pcidev_info, sn_irq_info))
389 return 1;
390
391 /* Build up the pcidev_info.pdi_slot_host_handle */
392 host_devfn = get_host_devfn(pcidev_match.handle, rootbus_handle);
393 (*pcidev_info)->pdi_slot_host_handle =
394 ((unsigned long) pci_domain_nr(dev) << 40) |
395 /* bus == 0 */
396 host_devfn;
397 return 0;
170} 398}
171 399
172/* 400/*
173 * sn_acpi_slot_fixup - Perform any SN specific slot fixup. 401 * sn_acpi_slot_fixup - Obtain the pcidev_info and sn_irq_info.
402 * Perform any SN specific slot fixup.
174 * At present there does not appear to be 403 * At present there does not appear to be
175 * any generic way to handle a ROM image 404 * any generic way to handle a ROM image
176 * that has been shadowed by the PROM, so 405 * that has been shadowed by the PROM, so
@@ -179,11 +408,18 @@ sn_acpi_bus_fixup(struct pci_bus *bus)
179 */ 408 */
180 409
181void 410void
182sn_acpi_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info) 411sn_acpi_slot_fixup(struct pci_dev *dev)
183{ 412{
184 void __iomem *addr; 413 void __iomem *addr;
414 struct pcidev_info *pcidev_info = NULL;
415 struct sn_irq_info *sn_irq_info = NULL;
185 size_t size; 416 size_t size;
186 417
418 if (sn_acpi_get_pcidev_info(dev, &pcidev_info, &sn_irq_info)) {
419 panic("%s: Failure obtaining pcidev_info for %s\n",
420 __FUNCTION__, pci_name(dev));
421 }
422
187 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) { 423 if (pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE]) {
188 /* 424 /*
189 * A valid ROM image exists and has been shadowed by the 425 * A valid ROM image exists and has been shadowed by the
@@ -200,8 +436,11 @@ sn_acpi_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info)
200 (unsigned long) addr + size; 436 (unsigned long) addr + size;
201 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY; 437 dev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_BIOS_COPY;
202 } 438 }
439 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
203} 440}
204 441
442EXPORT_SYMBOL(sn_acpi_slot_fixup);
443
205static struct acpi_driver acpi_sn_hubdev_driver = { 444static struct acpi_driver acpi_sn_hubdev_driver = {
206 .name = "SGI HUBDEV Driver", 445 .name = "SGI HUBDEV Driver",
207 .ids = "SGIHUB,SGITIO", 446 .ids = "SGIHUB,SGITIO",
@@ -212,6 +451,33 @@ static struct acpi_driver acpi_sn_hubdev_driver = {
212 451
213 452
214/* 453/*
454 * sn_acpi_bus_fixup - Perform SN specific setup of software structs
455 * (pcibus_bussoft, pcidev_info) and hardware
456 * registers, for the specified bus and devices under it.
457 */
458void
459sn_acpi_bus_fixup(struct pci_bus *bus)
460{
461 struct pci_dev *pci_dev = NULL;
462 struct pcibus_bussoft *prom_bussoft_ptr;
463
464 if (!bus->parent) { /* If root bus */
465 prom_bussoft_ptr = sn_get_bussoft_ptr(bus);
466 if (prom_bussoft_ptr == NULL) {
467 printk(KERN_ERR
468 "%s: 0x%04x:0x%02x Unable to "
469 "obtain prom_bussoft_ptr\n",
470 __FUNCTION__, pci_domain_nr(bus), bus->number);
471 return;
472 }
473 sn_common_bus_fixup(bus, prom_bussoft_ptr);
474 }
475 list_for_each_entry(pci_dev, &bus->devices, bus_list) {
476 sn_acpi_slot_fixup(pci_dev);
477 }
478}
479
480/*
215 * sn_io_acpi_init - PROM has ACPI support for IO, defining at a minimum the 481 * sn_io_acpi_init - PROM has ACPI support for IO, defining at a minimum the
216 * nodes and root buses in the DSDT. As a result, bus scanning 482 * nodes and root buses in the DSDT. As a result, bus scanning
217 * will be initiated by the Linux ACPI code. 483 * will be initiated by the Linux ACPI code.
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index d4dd8f4b6b8d..d48bcd83253c 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -26,14 +26,10 @@
26#include <linux/acpi.h> 26#include <linux/acpi.h>
27#include <asm/sn/sn2/sn_hwperf.h> 27#include <asm/sn/sn2/sn_hwperf.h>
28#include <asm/sn/acpi.h> 28#include <asm/sn/acpi.h>
29#include "acpi/acglobal.h"
29 30
30extern void sn_init_cpei_timer(void); 31extern void sn_init_cpei_timer(void);
31extern void register_sn_procfs(void); 32extern void register_sn_procfs(void);
32extern void sn_acpi_bus_fixup(struct pci_bus *);
33extern void sn_bus_fixup(struct pci_bus *);
34extern void sn_acpi_slot_fixup(struct pci_dev *, struct pcidev_info *);
35extern void sn_more_slot_fixup(struct pci_dev *, struct pcidev_info *);
36extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64);
37extern void sn_io_acpi_init(void); 33extern void sn_io_acpi_init(void);
38extern void sn_io_init(void); 34extern void sn_io_init(void);
39 35
@@ -48,6 +44,9 @@ struct sysdata_el {
48 44
49int sn_ioif_inited; /* SN I/O infrastructure initialized? */ 45int sn_ioif_inited; /* SN I/O infrastructure initialized? */
50 46
47int sn_acpi_rev; /* SN ACPI revision */
48EXPORT_SYMBOL_GPL(sn_acpi_rev);
49
51struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */ 50struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES]; /* indexed by asic type */
52 51
53/* 52/*
@@ -99,25 +98,6 @@ sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
99} 98}
100 99
101/* 100/*
102 * Retrieve the pci device information given the bus and device|function number.
103 */
104static inline u64
105sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
106 u64 sn_irq_info)
107{
108 struct ia64_sal_retval ret_stuff;
109 ret_stuff.status = 0;
110 ret_stuff.v0 = 0;
111
112 SAL_CALL_NOLOCK(ret_stuff,
113 (u64) SN_SAL_IOIF_GET_PCIDEV_INFO,
114 (u64) segment, (u64) bus_number, (u64) devfn,
115 (u64) pci_dev,
116 sn_irq_info, 0, 0);
117 return ret_stuff.v0;
118}
119
120/*
121 * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified 101 * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
122 * device. 102 * device.
123 */ 103 */
@@ -249,50 +229,25 @@ void sn_pci_unfixup_slot(struct pci_dev *dev)
249} 229}
250 230
251/* 231/*
252 * sn_pci_fixup_slot() - This routine sets up a slot's resources consistent 232 * sn_pci_fixup_slot()
253 * with the Linux PCI abstraction layer. Resources
254 * acquired from our PCI provider include PIO maps
255 * to BAR space and interrupt objects.
256 */ 233 */
257void sn_pci_fixup_slot(struct pci_dev *dev) 234void sn_pci_fixup_slot(struct pci_dev *dev, struct pcidev_info *pcidev_info,
235 struct sn_irq_info *sn_irq_info)
258{ 236{
259 int segment = pci_domain_nr(dev->bus); 237 int segment = pci_domain_nr(dev->bus);
260 int status = 0;
261 struct pcibus_bussoft *bs; 238 struct pcibus_bussoft *bs;
262 struct pci_bus *host_pci_bus; 239 struct pci_bus *host_pci_bus;
263 struct pci_dev *host_pci_dev; 240 struct pci_dev *host_pci_dev;
264 struct pcidev_info *pcidev_info; 241 unsigned int bus_no, devfn;
265 struct sn_irq_info *sn_irq_info;
266 unsigned int bus_no, devfn;
267 242
268 pci_dev_get(dev); /* for the sysdata pointer */ 243 pci_dev_get(dev); /* for the sysdata pointer */
269 pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
270 if (!pcidev_info)
271 BUG(); /* Cannot afford to run out of memory */
272
273 sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
274 if (!sn_irq_info)
275 BUG(); /* Cannot afford to run out of memory */
276
277 /* Call to retrieve pci device information needed by kernel. */
278 status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number,
279 dev->devfn,
280 (u64) __pa(pcidev_info),
281 (u64) __pa(sn_irq_info));
282 if (status)
283 BUG(); /* Cannot get platform pci device information */
284 244
285 /* Add pcidev_info to list in pci_controller.platform_data */ 245 /* Add pcidev_info to list in pci_controller.platform_data */
286 list_add_tail(&pcidev_info->pdi_list, 246 list_add_tail(&pcidev_info->pdi_list,
287 &(SN_PLATFORM_DATA(dev->bus)->pcidev_info)); 247 &(SN_PLATFORM_DATA(dev->bus)->pcidev_info));
288
289 if (SN_ACPI_BASE_SUPPORT())
290 sn_acpi_slot_fixup(dev, pcidev_info);
291 else
292 sn_more_slot_fixup(dev, pcidev_info);
293 /* 248 /*
294 * Using the PROMs values for the PCI host bus, get the Linux 249 * Using the PROMs values for the PCI host bus, get the Linux
295 * PCI host_pci_dev struct and set up host bus linkages 250 * PCI host_pci_dev struct and set up host bus linkages
296 */ 251 */
297 252
298 bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff; 253 bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
@@ -489,11 +444,6 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
489 sprintf(address, "%s^%d", address, geo_slot(geoid)); 444 sprintf(address, "%s^%d", address, geo_slot(geoid));
490} 445}
491 446
492/*
493 * sn_pci_fixup_bus() - Perform SN specific setup of software structs
494 * (pcibus_bussoft, pcidev_info) and hardware
495 * registers, for the specified bus and devices under it.
496 */
497void __devinit 447void __devinit
498sn_pci_fixup_bus(struct pci_bus *bus) 448sn_pci_fixup_bus(struct pci_bus *bus)
499{ 449{
@@ -519,6 +469,15 @@ sn_io_early_init(void)
519 if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM()) 469 if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
520 return 0; 470 return 0;
521 471
472 /* we set the acpi revision to that of the DSDT table OEM rev. */
473 {
474 struct acpi_table_header *header = NULL;
475
476 acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
477 BUG_ON(header == NULL);
478 sn_acpi_rev = header->oem_revision;
479 }
480
522 /* 481 /*
523 * prime sn_pci_provider[]. Individial provider init routines will 482 * prime sn_pci_provider[]. Individial provider init routines will
524 * override their respective default entries. 483 * override their respective default entries.
@@ -544,8 +503,12 @@ sn_io_early_init(void)
544 register_sn_procfs(); 503 register_sn_procfs();
545#endif 504#endif
546 505
547 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", 506 {
548 acpi_gbl_DSDT->oem_revision); 507 struct acpi_table_header *header;
508 (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
509 printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n",
510 header->oem_revision);
511 }
549 if (SN_ACPI_BASE_SUPPORT()) 512 if (SN_ACPI_BASE_SUPPORT())
550 sn_io_acpi_init(); 513 sn_io_acpi_init();
551 else 514 else
@@ -605,7 +568,6 @@ sn_io_late_init(void)
605 568
606fs_initcall(sn_io_late_init); 569fs_initcall(sn_io_late_init);
607 570
608EXPORT_SYMBOL(sn_pci_fixup_slot);
609EXPORT_SYMBOL(sn_pci_unfixup_slot); 571EXPORT_SYMBOL(sn_pci_unfixup_slot);
610EXPORT_SYMBOL(sn_bus_store_sysdata); 572EXPORT_SYMBOL(sn_bus_store_sysdata);
611EXPORT_SYMBOL(sn_bus_free_sysdata); 573EXPORT_SYMBOL(sn_bus_free_sysdata);
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 9ad843e0383b..600be3ebae05 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -56,6 +56,25 @@ static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
56 return ret_stuff.v0; 56 return ret_stuff.v0;
57} 57}
58 58
59/*
60 * Retrieve the pci device information given the bus and device|function number.
61 */
62static inline u64
63sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
64 u64 sn_irq_info)
65{
66 struct ia64_sal_retval ret_stuff;
67 ret_stuff.status = 0;
68 ret_stuff.v0 = 0;
69
70 SAL_CALL_NOLOCK(ret_stuff,
71 (u64) SN_SAL_IOIF_GET_PCIDEV_INFO,
72 (u64) segment, (u64) bus_number, (u64) devfn,
73 (u64) pci_dev,
74 sn_irq_info, 0, 0);
75 return ret_stuff.v0;
76}
77
59 78
60/* 79/*
61 * sn_fixup_ionodes() - This routine initializes the HUB data structure for 80 * sn_fixup_ionodes() - This routine initializes the HUB data structure for
@@ -172,18 +191,40 @@ sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
172} 191}
173 192
174/* 193/*
175 * sn_more_slot_fixup() - We are not running with an ACPI capable PROM, 194 * sn_io_slot_fixup() - We are not running with an ACPI capable PROM,
176 * and need to convert the pci_dev->resource 195 * and need to convert the pci_dev->resource
177 * 'start' and 'end' addresses to mapped addresses, 196 * 'start' and 'end' addresses to mapped addresses,
178 * and setup the pci_controller->window array entries. 197 * and setup the pci_controller->window array entries.
179 */ 198 */
180void 199void
181sn_more_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info) 200sn_io_slot_fixup(struct pci_dev *dev)
182{ 201{
183 unsigned int count = 0; 202 unsigned int count = 0;
184 int idx; 203 int idx;
185 s64 pci_addrs[PCI_ROM_RESOURCE + 1]; 204 s64 pci_addrs[PCI_ROM_RESOURCE + 1];
186 unsigned long addr, end, size, start; 205 unsigned long addr, end, size, start;
206 struct pcidev_info *pcidev_info;
207 struct sn_irq_info *sn_irq_info;
208 int status;
209
210 pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
211 if (!pcidev_info)
212 panic("%s: Unable to alloc memory for pcidev_info", __FUNCTION__);
213
214 sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
215 if (!sn_irq_info)
216 panic("%s: Unable to alloc memory for sn_irq_info", __FUNCTION__);
217
218 /* Call to retrieve pci device information needed by kernel. */
219 status = sal_get_pcidev_info((u64) pci_domain_nr(dev),
220 (u64) dev->bus->number,
221 dev->devfn,
222 (u64) __pa(pcidev_info),
223 (u64) __pa(sn_irq_info));
224
225 if (status)
226 BUG(); /* Cannot get platform pci device information */
227
187 228
188 /* Copy over PIO Mapped Addresses */ 229 /* Copy over PIO Mapped Addresses */
189 for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) { 230 for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
@@ -219,8 +260,12 @@ sn_more_slot_fixup(struct pci_dev *dev, struct pcidev_info *pcidev_info)
219 */ 260 */
220 if (count > 0) 261 if (count > 0)
221 sn_pci_window_fixup(dev, count, pci_addrs); 262 sn_pci_window_fixup(dev, count, pci_addrs);
263
264 sn_pci_fixup_slot(dev, pcidev_info, sn_irq_info);
222} 265}
223 266
267EXPORT_SYMBOL(sn_io_slot_fixup);
268
224/* 269/*
225 * sn_pci_controller_fixup() - This routine sets up a bus's resources 270 * sn_pci_controller_fixup() - This routine sets up a bus's resources
226 * consistent with the Linux PCI abstraction layer. 271 * consistent with the Linux PCI abstraction layer.
@@ -272,9 +317,6 @@ sn_bus_fixup(struct pci_bus *bus)
272{ 317{
273 struct pci_dev *pci_dev = NULL; 318 struct pci_dev *pci_dev = NULL;
274 struct pcibus_bussoft *prom_bussoft_ptr; 319 struct pcibus_bussoft *prom_bussoft_ptr;
275 extern void sn_common_bus_fixup(struct pci_bus *,
276 struct pcibus_bussoft *);
277
278 320
279 if (!bus->parent) { /* If root bus */ 321 if (!bus->parent) { /* If root bus */
280 prom_bussoft_ptr = PCI_CONTROLLER(bus)->platform_data; 322 prom_bussoft_ptr = PCI_CONTROLLER(bus)->platform_data;
@@ -291,7 +333,7 @@ sn_bus_fixup(struct pci_bus *bus)
291 prom_bussoft_ptr->bs_legacy_mem); 333 prom_bussoft_ptr->bs_legacy_mem);
292 } 334 }
293 list_for_each_entry(pci_dev, &bus->devices, bus_list) { 335 list_for_each_entry(pci_dev, &bus->devices, bus_list) {
294 sn_pci_fixup_slot(pci_dev); 336 sn_io_slot_fixup(pci_dev);
295 } 337 }
296 338
297} 339}
diff --git a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c
index 4aa4f301d56d..ab7e2fd40798 100644
--- a/arch/ia64/sn/kernel/iomv.c
+++ b/arch/ia64/sn/kernel/iomv.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * This file is subject to the terms and conditions of the GNU General Public 2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
@@ -26,9 +26,10 @@
26 * @port: port to convert 26 * @port: port to convert
27 * 27 *
28 * Legacy in/out instructions are converted to ld/st instructions 28 * Legacy in/out instructions are converted to ld/st instructions
29 * on IA64. This routine will convert a port number into a valid 29 * on IA64. This routine will convert a port number into a valid
30 * SN i/o address. Used by sn_in*() and sn_out*(). 30 * SN i/o address. Used by sn_in*() and sn_out*().
31 */ 31 */
32
32void *sn_io_addr(unsigned long port) 33void *sn_io_addr(unsigned long port)
33{ 34{
34 if (!IS_RUNNING_ON_SIMULATOR()) { 35 if (!IS_RUNNING_ON_SIMULATOR()) {
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c
index b3a435fd70fb..49873aa4a37d 100644
--- a/arch/ia64/sn/kernel/msi_sn.c
+++ b/arch/ia64/sn/kernel/msi_sn.c
@@ -59,13 +59,12 @@ void sn_teardown_msi_irq(unsigned int irq)
59 sn_intr_free(nasid, widget, sn_irq_info); 59 sn_intr_free(nasid, widget, sn_irq_info);
60 sn_msi_info[irq].sn_irq_info = NULL; 60 sn_msi_info[irq].sn_irq_info = NULL;
61 61
62 return; 62 destroy_irq(irq);
63} 63}
64 64
65int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev) 65int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry)
66{ 66{
67 struct msi_msg msg; 67 struct msi_msg msg;
68 struct msi_desc *entry;
69 int widget; 68 int widget;
70 int status; 69 int status;
71 nasid_t nasid; 70 nasid_t nasid;
@@ -73,8 +72,8 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
73 struct sn_irq_info *sn_irq_info; 72 struct sn_irq_info *sn_irq_info;
74 struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(pdev); 73 struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(pdev);
75 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); 74 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
75 int irq;
76 76
77 entry = get_irq_data(irq);
78 if (!entry->msi_attrib.is_64) 77 if (!entry->msi_attrib.is_64)
79 return -EINVAL; 78 return -EINVAL;
80 79
@@ -84,6 +83,11 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
84 if (provider == NULL || provider->dma_map_consistent == NULL) 83 if (provider == NULL || provider->dma_map_consistent == NULL)
85 return -EINVAL; 84 return -EINVAL;
86 85
86 irq = create_irq();
87 if (irq < 0)
88 return irq;
89
90 set_irq_msi(irq, entry);
87 /* 91 /*
88 * Set up the vector plumbing. Let the prom (via sn_intr_alloc) 92 * Set up the vector plumbing. Let the prom (via sn_intr_alloc)
89 * decide which cpu to direct this msi at by default. 93 * decide which cpu to direct this msi at by default.
@@ -95,12 +99,15 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
95 SWIN_WIDGETNUM(bussoft->bs_base); 99 SWIN_WIDGETNUM(bussoft->bs_base);
96 100
97 sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL); 101 sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
98 if (! sn_irq_info) 102 if (! sn_irq_info) {
103 destroy_irq(irq);
99 return -ENOMEM; 104 return -ENOMEM;
105 }
100 106
101 status = sn_intr_alloc(nasid, widget, sn_irq_info, irq, -1, -1); 107 status = sn_intr_alloc(nasid, widget, sn_irq_info, irq, -1, -1);
102 if (status) { 108 if (status) {
103 kfree(sn_irq_info); 109 kfree(sn_irq_info);
110 destroy_irq(irq);
104 return -ENOMEM; 111 return -ENOMEM;
105 } 112 }
106 113
@@ -121,6 +128,7 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
121 if (! bus_addr) { 128 if (! bus_addr) {
122 sn_intr_free(nasid, widget, sn_irq_info); 129 sn_intr_free(nasid, widget, sn_irq_info);
123 kfree(sn_irq_info); 130 kfree(sn_irq_info);
131 destroy_irq(irq);
124 return -ENOMEM; 132 return -ENOMEM;
125 } 133 }
126 134
@@ -139,7 +147,7 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
139 write_msi_msg(irq, &msg); 147 write_msi_msg(irq, &msg);
140 set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq); 148 set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq);
141 149
142 return 0; 150 return irq;
143} 151}
144 152
145#ifdef CONFIG_SMP 153#ifdef CONFIG_SMP
@@ -196,7 +204,7 @@ static void sn_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
196 msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff); 204 msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
197 205
198 write_msi_msg(irq, &msg); 206 write_msi_msg(irq, &msg);
199 set_native_irq_info(irq, cpu_mask); 207 irq_desc[irq].affinity = cpu_mask;
200} 208}
201#endif /* CONFIG_SMP */ 209#endif /* CONFIG_SMP */
202 210
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index d9d306c79f2d..601747b1e22a 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -455,7 +455,7 @@ static int sn2_ptc_proc_open(struct inode *inode, struct file *file)
455 return seq_open(file, &sn2_ptc_seq_ops); 455 return seq_open(file, &sn2_ptc_seq_ops);
456} 456}
457 457
458static struct file_operations proc_sn2_ptc_operations = { 458static const struct file_operations proc_sn2_ptc_operations = {
459 .open = sn2_ptc_proc_open, 459 .open = sn2_ptc_proc_open,
460 .read = seq_read, 460 .read = seq_read,
461 .llseek = seq_lseek, 461 .llseek = seq_lseek,
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 33367996d72d..6da9854751cd 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -865,7 +865,7 @@ error:
865 return r; 865 return r;
866} 866}
867 867
868static struct file_operations sn_hwperf_fops = { 868static const struct file_operations sn_hwperf_fops = {
869 .ioctl = sn_hwperf_ioctl, 869 .ioctl = sn_hwperf_ioctl,
870}; 870};
871 871
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
index 43ddc2eccb96..62b3e9a496ac 100644
--- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
+++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
@@ -89,61 +89,80 @@ static int coherence_id_open(struct inode *inode, struct file *file)
89 return single_open(file, coherence_id_show, NULL); 89 return single_open(file, coherence_id_show, NULL);
90} 90}
91 91
92static struct proc_dir_entry
93*sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent,
94 int (*openfunc)(struct inode *, struct file *),
95 int (*releasefunc)(struct inode *, struct file *),
96 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *))
97{
98 struct proc_dir_entry *e = create_proc_entry(name, 0444, parent);
99
100 if (e) {
101 struct file_operations *f;
102
103 f = kzalloc(sizeof(*f), GFP_KERNEL);
104 if (f) {
105 f->open = openfunc;
106 f->read = seq_read;
107 f->llseek = seq_lseek;
108 f->release = releasefunc;
109 f->write = write;
110 e->proc_fops = f;
111 }
112 }
113
114 return e;
115}
116
117/* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */ 92/* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */
118extern int sn_topology_open(struct inode *, struct file *); 93extern int sn_topology_open(struct inode *, struct file *);
119extern int sn_topology_release(struct inode *, struct file *); 94extern int sn_topology_release(struct inode *, struct file *);
120 95
96static const struct file_operations proc_partition_id_fops = {
97 .open = partition_id_open,
98 .read = seq_read,
99 .llseek = seq_lseek,
100 .release = single_release,
101};
102
103static const struct file_operations proc_system_sn_fops = {
104 .open = system_serial_number_open,
105 .read = seq_read,
106 .llseek = seq_lseek,
107 .release = single_release,
108};
109
110static const struct file_operations proc_license_id_fops = {
111 .open = licenseID_open,
112 .read = seq_read,
113 .llseek = seq_lseek,
114 .release = single_release,
115};
116
117static const struct file_operations proc_sn_force_intr_fops = {
118 .open = sn_force_interrupt_open,
119 .read = seq_read,
120 .write = sn_force_interrupt_write_proc,
121 .llseek = seq_lseek,
122 .release = single_release,
123};
124
125static const struct file_operations proc_coherence_id_fops = {
126 .open = coherence_id_open,
127 .read = seq_read,
128 .llseek = seq_lseek,
129 .release = single_release,
130};
131
132static const struct file_operations proc_sn_topo_fops = {
133 .open = sn_topology_open,
134 .read = seq_read,
135 .llseek = seq_lseek,
136 .release = sn_topology_release,
137};
138
121void register_sn_procfs(void) 139void register_sn_procfs(void)
122{ 140{
123 static struct proc_dir_entry *sgi_proc_dir = NULL; 141 static struct proc_dir_entry *sgi_proc_dir = NULL;
142 struct proc_dir_entry *pde;
124 143
125 BUG_ON(sgi_proc_dir != NULL); 144 BUG_ON(sgi_proc_dir != NULL);
126 if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) 145 if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL)))
127 return; 146 return;
128 147
129 sn_procfs_create_entry("partition_id", sgi_proc_dir, 148 pde = create_proc_entry("partition_id", 0444, sgi_proc_dir);
130 partition_id_open, single_release, NULL); 149 if (pde)
131 150 pde->proc_fops = &proc_partition_id_fops;
132 sn_procfs_create_entry("system_serial_number", sgi_proc_dir, 151 pde = create_proc_entry("system_serial_number", 0444, sgi_proc_dir);
133 system_serial_number_open, single_release, NULL); 152 if (pde)
134 153 pde->proc_fops = &proc_system_sn_fops;
135 sn_procfs_create_entry("licenseID", sgi_proc_dir, 154 pde = create_proc_entry("licenseID", 0444, sgi_proc_dir);
136 licenseID_open, single_release, NULL); 155 if (pde)
137 156 pde->proc_fops = &proc_license_id_fops;
138 sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, 157 pde = create_proc_entry("sn_force_interrupt", 0644, sgi_proc_dir);
139 sn_force_interrupt_open, single_release, 158 if (pde)
140 sn_force_interrupt_write_proc); 159 pde->proc_fops = &proc_sn_force_intr_fops;
141 160 pde = create_proc_entry("coherence_id", 0444, sgi_proc_dir);
142 sn_procfs_create_entry("coherence_id", sgi_proc_dir, 161 if (pde)
143 coherence_id_open, single_release, NULL); 162 pde->proc_fops = &proc_coherence_id_fops;
144 163 pde = create_proc_entry("sn_topology", 0444, sgi_proc_dir);
145 sn_procfs_create_entry("sn_topology", sgi_proc_dir, 164 if (pde)
146 sn_topology_open, sn_topology_release, NULL); 165 pde->proc_fops = &proc_sn_topo_fops;
147} 166}
148 167
149#endif /* CONFIG_PROC_FS */ 168#endif /* CONFIG_PROC_FS */
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 7a387d237363..68355ef6f841 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -101,67 +101,57 @@ static int xpc_disengage_request_max_timelimit = 120;
101 101
102static ctl_table xpc_sys_xpc_hb_dir[] = { 102static ctl_table xpc_sys_xpc_hb_dir[] = {
103 { 103 {
104 1, 104 .ctl_name = CTL_UNNUMBERED,
105 "hb_interval", 105 .procname = "hb_interval",
106 &xpc_hb_interval, 106 .data = &xpc_hb_interval,
107 sizeof(int), 107 .maxlen = sizeof(int),
108 0644, 108 .mode = 0644,
109 NULL, 109 .proc_handler = &proc_dointvec_minmax,
110 &proc_dointvec_minmax, 110 .strategy = &sysctl_intvec,
111 &sysctl_intvec, 111 .extra1 = &xpc_hb_min_interval,
112 NULL, 112 .extra2 = &xpc_hb_max_interval
113 &xpc_hb_min_interval,
114 &xpc_hb_max_interval
115 }, 113 },
116 { 114 {
117 2, 115 .ctl_name = CTL_UNNUMBERED,
118 "hb_check_interval", 116 .procname = "hb_check_interval",
119 &xpc_hb_check_interval, 117 .data = &xpc_hb_check_interval,
120 sizeof(int), 118 .maxlen = sizeof(int),
121 0644, 119 .mode = 0644,
122 NULL, 120 .proc_handler = &proc_dointvec_minmax,
123 &proc_dointvec_minmax, 121 .strategy = &sysctl_intvec,
124 &sysctl_intvec, 122 .extra1 = &xpc_hb_check_min_interval,
125 NULL, 123 .extra2 = &xpc_hb_check_max_interval
126 &xpc_hb_check_min_interval,
127 &xpc_hb_check_max_interval
128 }, 124 },
129 {0} 125 {}
130}; 126};
131static ctl_table xpc_sys_xpc_dir[] = { 127static ctl_table xpc_sys_xpc_dir[] = {
132 { 128 {
133 1, 129 .ctl_name = CTL_UNNUMBERED,
134 "hb", 130 .procname = "hb",
135 NULL, 131 .mode = 0555,
136 0, 132 .child = xpc_sys_xpc_hb_dir
137 0555,
138 xpc_sys_xpc_hb_dir
139 }, 133 },
140 { 134 {
141 2, 135 .ctl_name = CTL_UNNUMBERED,
142 "disengage_request_timelimit", 136 .procname = "disengage_request_timelimit",
143 &xpc_disengage_request_timelimit, 137 .data = &xpc_disengage_request_timelimit,
144 sizeof(int), 138 .maxlen = sizeof(int),
145 0644, 139 .mode = 0644,
146 NULL, 140 .proc_handler = &proc_dointvec_minmax,
147 &proc_dointvec_minmax, 141 .strategy = &sysctl_intvec,
148 &sysctl_intvec, 142 .extra1 = &xpc_disengage_request_min_timelimit,
149 NULL, 143 .extra2 = &xpc_disengage_request_max_timelimit
150 &xpc_disengage_request_min_timelimit,
151 &xpc_disengage_request_max_timelimit
152 }, 144 },
153 {0} 145 {}
154}; 146};
155static ctl_table xpc_sys_dir[] = { 147static ctl_table xpc_sys_dir[] = {
156 { 148 {
157 1, 149 .ctl_name = CTL_UNNUMBERED,
158 "xpc", 150 .procname = "xpc",
159 NULL, 151 .mode = 0555,
160 0, 152 .child = xpc_sys_xpc_dir
161 0555,
162 xpc_sys_xpc_dir
163 }, 153 },
164 {0} 154 {}
165}; 155};
166static struct ctl_table_header *xpc_sysctl; 156static struct ctl_table_header *xpc_sysctl;
167 157
@@ -1251,7 +1241,7 @@ xpc_init(void)
1251 snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); 1241 snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part");
1252 snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); 1242 snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan");
1253 1243
1254 xpc_sysctl = register_sysctl_table(xpc_sys_dir, 1); 1244 xpc_sysctl = register_sysctl_table(xpc_sys_dir);
1255 1245
1256 /* 1246 /*
1257 * The first few fields of each entry of xpc_partitions[] need to 1247 * The first few fields of each entry of xpc_partitions[] need to
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 6846dc9b432d..04a8256017eb 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -20,7 +20,8 @@
20#include "xtalk/hubdev.h" 20#include "xtalk/hubdev.h"
21 21
22int 22int
23sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp) 23sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp,
24 char **ssdt)
24{ 25{
25 struct ia64_sal_retval ret_stuff; 26 struct ia64_sal_retval ret_stuff;
26 u64 busnum; 27 u64 busnum;
@@ -32,7 +33,8 @@ sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp)
32 segment = soft->pbi_buscommon.bs_persist_segment; 33 segment = soft->pbi_buscommon.bs_persist_segment;
33 busnum = soft->pbi_buscommon.bs_persist_busnum; 34 busnum = soft->pbi_buscommon.bs_persist_busnum;
34 SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_ENABLE, segment, 35 SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_ENABLE, segment,
35 busnum, (u64) device, (u64) resp, 0, 0, 0); 36 busnum, (u64) device, (u64) resp, (u64)ia64_tpa(ssdt),
37 0, 0);
36 38
37 return (int)ret_stuff.v0; 39 return (int)ret_stuff.v0;
38} 40}
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index f383dab973f5..9740d6b8ae11 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -16,6 +16,10 @@ config GENERIC_ISA_DMA
16 bool 16 bool
17 default y 17 default y
18 18
19config ZONE_DMA
20 bool
21 default y
22
19config GENERIC_HARDIRQS 23config GENERIC_HARDIRQS
20 bool 24 bool
21 default y 25 default y
@@ -24,6 +28,9 @@ config GENERIC_IRQ_PROBE
24 bool 28 bool
25 default y 29 default y
26 30
31config NO_IOPORT
32 def_bool y
33
27source "init/Kconfig" 34source "init/Kconfig"
28 35
29 36
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index f219c47d334f..cdf63b210c53 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -7,7 +7,7 @@
7 7
8LDFLAGS := 8LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S 9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10LDFLAGS_vmlinux := -e startup_32 10LDFLAGS_vmlinux :=
11 11
12CFLAGS += -pipe -fno-schedule-insns 12CFLAGS += -pipe -fno-schedule-insns
13CFLAGS_KERNEL += -mmodel=medium 13CFLAGS_KERNEL += -mmodel=medium
diff --git a/arch/m32r/defconfig b/arch/m32r/defconfig
index 853093093168..13579917afef 100644
--- a/arch/m32r/defconfig
+++ b/arch/m32r/defconfig
@@ -1,20 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:20:11 2005 4# Tue Dec 12 17:52:38 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 16CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 17CONFIG_INIT_ENV_ARG_LIMIT=32
20 18
@@ -22,32 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# General setup 20# General setup
23# 21#
24CONFIG_LOCALVERSION="" 22CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 24CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
27# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 28CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y 30# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 32# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 33CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set 34CONFIG_IKCONFIG_PROC=y
35# CONFIG_CPUSETS is not set
36CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y
36CONFIG_EMBEDDED=y 41CONFIG_EMBEDDED=y
42CONFIG_SYSCTL_SYSCALL=y
37# CONFIG_KALLSYMS is not set 43# CONFIG_KALLSYMS is not set
44CONFIG_HOTPLUG=y
38CONFIG_PRINTK=y 45CONFIG_PRINTK=y
39CONFIG_BUG=y 46CONFIG_BUG=y
47CONFIG_ELF_CORE=y
40CONFIG_BASE_FULL=y 48CONFIG_BASE_FULL=y
41# CONFIG_FUTEX is not set 49# CONFIG_FUTEX is not set
42# CONFIG_EPOLL is not set 50# CONFIG_EPOLL is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SHMEM=y 51CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0 52CONFIG_SLAB=y
46CONFIG_CC_ALIGN_LABELS=0 53CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0 55CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -55,10 +61,29 @@ CONFIG_BASE_SMALL=0
55CONFIG_MODULES=y 61CONFIG_MODULES=y
56CONFIG_MODULE_UNLOAD=y 62CONFIG_MODULE_UNLOAD=y
57# CONFIG_MODULE_FORCE_UNLOAD is not set 63# CONFIG_MODULE_FORCE_UNLOAD is not set
58CONFIG_OBSOLETE_MODPARM=y
59# CONFIG_MODVERSIONS is not set 64# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set 65# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y 66CONFIG_KMOD=y
67CONFIG_STOP_MACHINE=y
68
69#
70# Block layer
71#
72CONFIG_BLOCK=y
73# CONFIG_BLK_DEV_IO_TRACE is not set
74
75#
76# IO Schedulers
77#
78CONFIG_IOSCHED_NOOP=y
79# CONFIG_IOSCHED_AS is not set
80CONFIG_IOSCHED_DEADLINE=y
81CONFIG_IOSCHED_CFQ=y
82# CONFIG_DEFAULT_AS is not set
83# CONFIG_DEFAULT_DEADLINE is not set
84CONFIG_DEFAULT_CFQ=y
85# CONFIG_DEFAULT_NOOP is not set
86CONFIG_DEFAULT_IOSCHED="cfq"
62 87
63# 88#
64# Processor type and features 89# Processor type and features
@@ -70,8 +95,10 @@ CONFIG_PLAT_M32700UT=y
70# CONFIG_PLAT_OAKS32R is not set 95# CONFIG_PLAT_OAKS32R is not set
71# CONFIG_PLAT_MAPPI2 is not set 96# CONFIG_PLAT_MAPPI2 is not set
72# CONFIG_PLAT_MAPPI3 is not set 97# CONFIG_PLAT_MAPPI3 is not set
98# CONFIG_PLAT_M32104UT is not set
73CONFIG_CHIP_M32700=y 99CONFIG_CHIP_M32700=y
74# CONFIG_CHIP_M32102 is not set 100# CONFIG_CHIP_M32102 is not set
101# CONFIG_CHIP_M32104 is not set
75# CONFIG_CHIP_VDEC2 is not set 102# CONFIG_CHIP_VDEC2 is not set
76# CONFIG_CHIP_OPSP is not set 103# CONFIG_CHIP_OPSP is not set
77CONFIG_MMU=y 104CONFIG_MMU=y
@@ -85,34 +112,39 @@ CONFIG_TIMER_DIVIDE=128
85CONFIG_MEMORY_START=0x08000000 112CONFIG_MEMORY_START=0x08000000
86CONFIG_MEMORY_SIZE=0x01000000 113CONFIG_MEMORY_SIZE=0x01000000
87CONFIG_NOHIGHMEM=y 114CONFIG_NOHIGHMEM=y
88# CONFIG_DISCONTIGMEM is not set 115CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
116CONFIG_SELECT_MEMORY_MODEL=y
117# CONFIG_FLATMEM_MANUAL is not set
118CONFIG_DISCONTIGMEM_MANUAL=y
119# CONFIG_SPARSEMEM_MANUAL is not set
120CONFIG_DISCONTIGMEM=y
121CONFIG_FLAT_NODE_MEM_MAP=y
122CONFIG_NEED_MULTIPLE_NODES=y
123# CONFIG_SPARSEMEM_STATIC is not set
124CONFIG_SPLIT_PTLOCK_CPUS=4
125# CONFIG_RESOURCES_64BIT is not set
126CONFIG_IRAM_START=0x00f00000
127CONFIG_IRAM_SIZE=0x00080000
89CONFIG_RWSEM_GENERIC_SPINLOCK=y 128CONFIG_RWSEM_GENERIC_SPINLOCK=y
90# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 129# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
130CONFIG_GENERIC_FIND_NEXT_BIT=y
131CONFIG_GENERIC_HWEIGHT=y
91CONFIG_GENERIC_CALIBRATE_DELAY=y 132CONFIG_GENERIC_CALIBRATE_DELAY=y
92CONFIG_PREEMPT=y 133CONFIG_PREEMPT=y
93# CONFIG_HAVE_DEC_LOCK is not set 134CONFIG_SMP=y
94# CONFIG_SMP is not set 135# CONFIG_CHIP_M32700_TS1 is not set
136CONFIG_NR_CPUS=2
137CONFIG_NODES_SHIFT=1
95 138
96# 139#
97# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 140# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
98# 141#
99# CONFIG_PCI is not set
100# CONFIG_ISA is not set 142# CONFIG_ISA is not set
101 143
102# 144#
103# PCCARD (PCMCIA/CardBus) support 145# PCCARD (PCMCIA/CardBus) support
104# 146#
105CONFIG_PCCARD=y 147# CONFIG_PCCARD is not set
106# CONFIG_PCMCIA_DEBUG is not set
107CONFIG_PCMCIA=y
108
109#
110# PC-card bridges
111#
112# CONFIG_TCIC is not set
113# CONFIG_M32R_PCC is not set
114CONFIG_M32R_CFC=y
115CONFIG_M32R_CFC_NUM=1
116 148
117# 149#
118# PCI Hotplug Support 150# PCI Hotplug Support
@@ -125,6 +157,94 @@ CONFIG_BINFMT_ELF=y
125# CONFIG_BINFMT_MISC is not set 157# CONFIG_BINFMT_MISC is not set
126 158
127# 159#
160# Networking
161#
162CONFIG_NET=y
163
164#
165# Networking options
166#
167# CONFIG_NETDEBUG is not set
168CONFIG_PACKET=y
169# CONFIG_PACKET_MMAP is not set
170CONFIG_UNIX=y
171CONFIG_XFRM=y
172# CONFIG_XFRM_USER is not set
173# CONFIG_XFRM_SUB_POLICY is not set
174# CONFIG_NET_KEY is not set
175CONFIG_INET=y
176# CONFIG_IP_MULTICAST is not set
177# CONFIG_IP_ADVANCED_ROUTER is not set
178CONFIG_IP_FIB_HASH=y
179CONFIG_IP_PNP=y
180CONFIG_IP_PNP_DHCP=y
181# CONFIG_IP_PNP_BOOTP is not set
182# CONFIG_IP_PNP_RARP is not set
183# CONFIG_NET_IPIP is not set
184# CONFIG_NET_IPGRE is not set
185# CONFIG_ARPD is not set
186# CONFIG_SYN_COOKIES is not set
187# CONFIG_INET_AH is not set
188# CONFIG_INET_ESP is not set
189# CONFIG_INET_IPCOMP is not set
190# CONFIG_INET_XFRM_TUNNEL is not set
191# CONFIG_INET_TUNNEL is not set
192CONFIG_INET_XFRM_MODE_TRANSPORT=y
193CONFIG_INET_XFRM_MODE_TUNNEL=y
194CONFIG_INET_XFRM_MODE_BEET=y
195CONFIG_INET_DIAG=y
196CONFIG_INET_TCP_DIAG=y
197# CONFIG_TCP_CONG_ADVANCED is not set
198CONFIG_TCP_CONG_CUBIC=y
199CONFIG_DEFAULT_TCP_CONG="cubic"
200# CONFIG_TCP_MD5SIG is not set
201# CONFIG_IPV6 is not set
202# CONFIG_INET6_XFRM_TUNNEL is not set
203# CONFIG_INET6_TUNNEL is not set
204# CONFIG_NETWORK_SECMARK is not set
205# CONFIG_NETFILTER is not set
206
207#
208# DCCP Configuration (EXPERIMENTAL)
209#
210# CONFIG_IP_DCCP is not set
211
212#
213# SCTP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_SCTP is not set
216
217#
218# TIPC Configuration (EXPERIMENTAL)
219#
220# CONFIG_TIPC is not set
221# CONFIG_ATM is not set
222# CONFIG_BRIDGE is not set
223# CONFIG_VLAN_8021Q is not set
224# CONFIG_DECNET is not set
225# CONFIG_LLC2 is not set
226# CONFIG_IPX is not set
227# CONFIG_ATALK is not set
228# CONFIG_X25 is not set
229# CONFIG_LAPB is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232
233#
234# QoS and/or fair queueing
235#
236# CONFIG_NET_SCHED is not set
237
238#
239# Network testing
240#
241# CONFIG_NET_PKTGEN is not set
242# CONFIG_HAMRADIO is not set
243# CONFIG_IRDA is not set
244# CONFIG_BT is not set
245# CONFIG_IEEE80211 is not set
246
247#
128# Device Drivers 248# Device Drivers
129# 249#
130 250
@@ -133,12 +253,100 @@ CONFIG_BINFMT_ELF=y
133# 253#
134CONFIG_STANDALONE=y 254CONFIG_STANDALONE=y
135CONFIG_PREVENT_FIRMWARE_BUILD=y 255CONFIG_PREVENT_FIRMWARE_BUILD=y
136# CONFIG_FW_LOADER is not set 256CONFIG_FW_LOADER=y
257# CONFIG_SYS_HYPERVISOR is not set
258
259#
260# Connector - unified userspace <-> kernelspace linker
261#
262# CONFIG_CONNECTOR is not set
137 263
138# 264#
139# Memory Technology Devices (MTD) 265# Memory Technology Devices (MTD)
140# 266#
141# CONFIG_MTD is not set 267CONFIG_MTD=y
268# CONFIG_MTD_DEBUG is not set
269# CONFIG_MTD_CONCAT is not set
270CONFIG_MTD_PARTITIONS=y
271CONFIG_MTD_REDBOOT_PARTS=y
272CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
273# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
274# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
275# CONFIG_MTD_CMDLINE_PARTS is not set
276
277#
278# User Modules And Translation Layers
279#
280# CONFIG_MTD_CHAR is not set
281CONFIG_MTD_BLOCK=y
282# CONFIG_FTL is not set
283# CONFIG_NFTL is not set
284# CONFIG_INFTL is not set
285# CONFIG_RFD_FTL is not set
286# CONFIG_SSFDC is not set
287
288#
289# RAM/ROM/Flash chip drivers
290#
291CONFIG_MTD_CFI=m
292CONFIG_MTD_JEDECPROBE=m
293CONFIG_MTD_GEN_PROBE=m
294CONFIG_MTD_CFI_ADV_OPTIONS=y
295# CONFIG_MTD_CFI_NOSWAP is not set
296CONFIG_MTD_CFI_BE_BYTE_SWAP=y
297# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
298CONFIG_MTD_CFI_GEOMETRY=y
299CONFIG_MTD_MAP_BANK_WIDTH_1=y
300CONFIG_MTD_MAP_BANK_WIDTH_2=y
301CONFIG_MTD_MAP_BANK_WIDTH_4=y
302# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
303# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
304# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
305CONFIG_MTD_CFI_I1=y
306# CONFIG_MTD_CFI_I2 is not set
307# CONFIG_MTD_CFI_I4 is not set
308# CONFIG_MTD_CFI_I8 is not set
309# CONFIG_MTD_OTP is not set
310# CONFIG_MTD_CFI_INTELEXT is not set
311CONFIG_MTD_CFI_AMDSTD=m
312# CONFIG_MTD_CFI_STAA is not set
313CONFIG_MTD_CFI_UTIL=m
314# CONFIG_MTD_RAM is not set
315# CONFIG_MTD_ROM is not set
316# CONFIG_MTD_ABSENT is not set
317# CONFIG_MTD_OBSOLETE_CHIPS is not set
318
319#
320# Mapping drivers for chip access
321#
322# CONFIG_MTD_COMPLEX_MAPPINGS is not set
323# CONFIG_MTD_PHYSMAP is not set
324# CONFIG_MTD_PLATRAM is not set
325
326#
327# Self-contained MTD device drivers
328#
329# CONFIG_MTD_SLRAM is not set
330# CONFIG_MTD_PHRAM is not set
331# CONFIG_MTD_MTDRAM is not set
332# CONFIG_MTD_BLOCK2MTD is not set
333
334#
335# Disk-On-Chip Device Drivers
336#
337# CONFIG_MTD_DOC2000 is not set
338# CONFIG_MTD_DOC2001 is not set
339# CONFIG_MTD_DOC2001PLUS is not set
340
341#
342# NAND Flash Device Drivers
343#
344# CONFIG_MTD_NAND is not set
345
346#
347# OneNAND Flash Device Drivers
348#
349# CONFIG_MTD_ONENAND is not set
142 350
143# 351#
144# Parallel port support 352# Parallel port support
@@ -152,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
152# 360#
153# Block devices 361# Block devices
154# 362#
155# CONFIG_BLK_DEV_FD is not set
156# CONFIG_BLK_DEV_COW_COMMON is not set 363# CONFIG_BLK_DEV_COW_COMMON is not set
157CONFIG_BLK_DEV_LOOP=y 364CONFIG_BLK_DEV_LOOP=y
158# CONFIG_BLK_DEV_CRYPTOLOOP is not set 365# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -160,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y
160CONFIG_BLK_DEV_RAM=y 367CONFIG_BLK_DEV_RAM=y
161CONFIG_BLK_DEV_RAM_COUNT=16 368CONFIG_BLK_DEV_RAM_COUNT=16
162CONFIG_BLK_DEV_RAM_SIZE=4096 369CONFIG_BLK_DEV_RAM_SIZE=4096
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
163# CONFIG_BLK_DEV_INITRD is not set 371# CONFIG_BLK_DEV_INITRD is not set
164CONFIG_INITRAMFS_SOURCE=""
165# CONFIG_CDROM_PKTCDVD is not set 372# CONFIG_CDROM_PKTCDVD is not set
373CONFIG_ATA_OVER_ETH=m
166 374
167# 375#
168# IO Schedulers 376# Misc devices
169# 377#
170CONFIG_IOSCHED_NOOP=y 378# CONFIG_TIFM_CORE is not set
171# CONFIG_IOSCHED_AS is not set
172CONFIG_IOSCHED_DEADLINE=y
173CONFIG_IOSCHED_CFQ=y
174# CONFIG_ATA_OVER_ETH is not set
175 379
176# 380#
177# ATA/ATAPI/MFM/RLL support 381# ATA/ATAPI/MFM/RLL support
178# 382#
179CONFIG_IDE=y 383CONFIG_IDE=y
384CONFIG_IDE_MAX_HWIFS=4
180CONFIG_BLK_DEV_IDE=y 385CONFIG_BLK_DEV_IDE=y
181 386
182# 387#
@@ -185,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y
185# CONFIG_BLK_DEV_IDE_SATA is not set 390# CONFIG_BLK_DEV_IDE_SATA is not set
186CONFIG_BLK_DEV_IDEDISK=y 391CONFIG_BLK_DEV_IDEDISK=y
187# CONFIG_IDEDISK_MULTI_MODE is not set 392# CONFIG_IDEDISK_MULTI_MODE is not set
188CONFIG_BLK_DEV_IDECS=y
189CONFIG_BLK_DEV_IDECD=m 393CONFIG_BLK_DEV_IDECD=m
190# CONFIG_BLK_DEV_IDETAPE is not set 394# CONFIG_BLK_DEV_IDETAPE is not set
191# CONFIG_BLK_DEV_IDEFLOPPY is not set 395# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -204,7 +408,9 @@ CONFIG_IDE_GENERIC=y
204# 408#
205# SCSI device support 409# SCSI device support
206# 410#
411# CONFIG_RAID_ATTRS is not set
207CONFIG_SCSI=m 412CONFIG_SCSI=m
413# CONFIG_SCSI_NETLINK is not set
208CONFIG_SCSI_PROC_FS=y 414CONFIG_SCSI_PROC_FS=y
209 415
210# 416#
@@ -216,6 +422,7 @@ CONFIG_BLK_DEV_SD=m
216CONFIG_BLK_DEV_SR=m 422CONFIG_BLK_DEV_SR=m
217# CONFIG_BLK_DEV_SR_VENDOR is not set 423# CONFIG_BLK_DEV_SR_VENDOR is not set
218CONFIG_CHR_DEV_SG=m 424CONFIG_CHR_DEV_SG=m
425# CONFIG_CHR_DEV_SCH is not set
219 426
220# 427#
221# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 428# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -225,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y
225# CONFIG_SCSI_LOGGING is not set 432# CONFIG_SCSI_LOGGING is not set
226 433
227# 434#
228# SCSI Transport Attributes 435# SCSI Transports
229# 436#
230# CONFIG_SCSI_SPI_ATTRS is not set 437# CONFIG_SCSI_SPI_ATTRS is not set
231# CONFIG_SCSI_FC_ATTRS is not set 438# CONFIG_SCSI_FC_ATTRS is not set
232# CONFIG_SCSI_ISCSI_ATTRS is not set 439# CONFIG_SCSI_ISCSI_ATTRS is not set
440# CONFIG_SCSI_SAS_ATTRS is not set
441# CONFIG_SCSI_SAS_LIBSAS is not set
233 442
234# 443#
235# SCSI low-level drivers 444# SCSI low-level drivers
236# 445#
237# CONFIG_SCSI_SATA is not set 446# CONFIG_ISCSI_TCP is not set
238# CONFIG_SCSI_DEBUG is not set 447# CONFIG_SCSI_DEBUG is not set
239 448
240# 449#
241# PCMCIA SCSI adapter support 450# Serial ATA (prod) and Parallel ATA (experimental) drivers
242# 451#
243# CONFIG_PCMCIA_AHA152X is not set
244# CONFIG_PCMCIA_FDOMAIN is not set
245# CONFIG_PCMCIA_NINJA_SCSI is not set
246# CONFIG_PCMCIA_QLOGIC is not set
247# CONFIG_PCMCIA_SYM53C500 is not set
248 452
249# 453#
250# Multi-device support (RAID and LVM) 454# Multi-device support (RAID and LVM)
@@ -254,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y
254# 458#
255# Fusion MPT device support 459# Fusion MPT device support
256# 460#
461# CONFIG_FUSION is not set
257 462
258# 463#
259# IEEE 1394 (FireWire) support 464# IEEE 1394 (FireWire) support
@@ -264,69 +469,8 @@ CONFIG_SCSI_MULTI_LUN=y
264# 469#
265 470
266# 471#
267# Networking support 472# Network device support
268#
269CONFIG_NET=y
270
271#
272# Networking options
273#
274CONFIG_PACKET=y
275# CONFIG_PACKET_MMAP is not set
276CONFIG_UNIX=y
277# CONFIG_NET_KEY is not set
278CONFIG_INET=y
279# CONFIG_IP_MULTICAST is not set
280# CONFIG_IP_ADVANCED_ROUTER is not set
281CONFIG_IP_PNP=y
282CONFIG_IP_PNP_DHCP=y
283# CONFIG_IP_PNP_BOOTP is not set
284# CONFIG_IP_PNP_RARP is not set
285# CONFIG_NET_IPIP is not set
286# CONFIG_NET_IPGRE is not set
287# CONFIG_ARPD is not set
288# CONFIG_SYN_COOKIES is not set
289# CONFIG_INET_AH is not set
290# CONFIG_INET_ESP is not set
291# CONFIG_INET_IPCOMP is not set
292# CONFIG_INET_TUNNEL is not set
293CONFIG_IP_TCPDIAG=y
294# CONFIG_IP_TCPDIAG_IPV6 is not set
295# CONFIG_IPV6 is not set
296# CONFIG_NETFILTER is not set
297
298#
299# SCTP Configuration (EXPERIMENTAL)
300#
301# CONFIG_IP_SCTP 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_NET_DIVERT is not set
312# CONFIG_ECONET is not set
313# CONFIG_WAN_ROUTER is not set
314
315#
316# QoS and/or fair queueing
317#
318# CONFIG_NET_SCHED is not set
319# CONFIG_NET_CLS_ROUTE is not set
320
321#
322# Network testing
323# 473#
324# CONFIG_NET_PKTGEN is not set
325# CONFIG_NETPOLL is not set
326# CONFIG_NET_POLL_CONTROLLER is not set
327# CONFIG_HAMRADIO is not set
328# CONFIG_IRDA is not set
329# CONFIG_BT is not set
330CONFIG_NETDEVICES=y 474CONFIG_NETDEVICES=y
331# CONFIG_DUMMY is not set 475# CONFIG_DUMMY is not set
332# CONFIG_BONDING is not set 476# CONFIG_BONDING is not set
@@ -334,6 +478,11 @@ CONFIG_NETDEVICES=y
334# CONFIG_TUN is not set 478# CONFIG_TUN is not set
335 479
336# 480#
481# PHY device support
482#
483# CONFIG_PHYLIB is not set
484
485#
337# Ethernet (10 or 100Mbit) 486# Ethernet (10 or 100Mbit)
338# 487#
339CONFIG_NET_ETHERNET=y 488CONFIG_NET_ETHERNET=y
@@ -359,11 +508,6 @@ CONFIG_SMC91X=y
359# CONFIG_NET_RADIO is not set 508# CONFIG_NET_RADIO is not set
360 509
361# 510#
362# PCMCIA network device support
363#
364# CONFIG_NET_PCMCIA is not set
365
366#
367# Wan interfaces 511# Wan interfaces
368# 512#
369# CONFIG_WAN is not set 513# CONFIG_WAN is not set
@@ -371,6 +515,8 @@ CONFIG_SMC91X=y
371# CONFIG_SLIP is not set 515# CONFIG_SLIP is not set
372# CONFIG_SHAPER is not set 516# CONFIG_SHAPER is not set
373# CONFIG_NETCONSOLE is not set 517# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set
374 520
375# 521#
376# ISDN subsystem 522# ISDN subsystem
@@ -386,6 +532,7 @@ CONFIG_SMC91X=y
386# Input device support 532# Input device support
387# 533#
388CONFIG_INPUT=y 534CONFIG_INPUT=y
535# CONFIG_INPUT_FF_MEMLESS is not set
389 536
390# 537#
391# Userland interfaces 538# Userland interfaces
@@ -414,7 +561,6 @@ CONFIG_SERIO_SERPORT=y
414# CONFIG_SERIO_LIBPS2 is not set 561# CONFIG_SERIO_LIBPS2 is not set
415# CONFIG_SERIO_RAW is not set 562# CONFIG_SERIO_RAW is not set
416# CONFIG_GAMEPORT is not set 563# CONFIG_GAMEPORT is not set
417CONFIG_SOUND_GAMEPORT=y
418 564
419# 565#
420# Character devices 566# Character devices
@@ -422,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y
422CONFIG_VT=y 568CONFIG_VT=y
423CONFIG_VT_CONSOLE=y 569CONFIG_VT_CONSOLE=y
424CONFIG_HW_CONSOLE=y 570CONFIG_HW_CONSOLE=y
571# CONFIG_VT_HW_CONSOLE_BINDING is not set
425# CONFIG_SERIAL_NONSTANDARD is not set 572# CONFIG_SERIAL_NONSTANDARD is not set
426 573
427# 574#
@@ -450,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256
450# Watchdog Cards 597# Watchdog Cards
451# 598#
452# CONFIG_WATCHDOG is not set 599# CONFIG_WATCHDOG is not set
600CONFIG_HW_RANDOM=y
453# CONFIG_RTC is not set 601# CONFIG_RTC is not set
454# CONFIG_GEN_RTC is not set
455CONFIG_DS1302=y 602CONFIG_DS1302=y
456# CONFIG_DTLK is not set 603# CONFIG_DTLK is not set
457# CONFIG_R3964 is not set 604# CONFIG_R3964 is not set
@@ -459,17 +606,12 @@ CONFIG_DS1302=y
459# 606#
460# Ftape, the floppy tape device driver 607# Ftape, the floppy tape device driver
461# 608#
462# CONFIG_DRM is not set
463
464#
465# PCMCIA character devices
466#
467# CONFIG_SYNCLINK_CS is not set
468# CONFIG_RAW_DRIVER is not set 609# CONFIG_RAW_DRIVER is not set
469 610
470# 611#
471# TPM devices 612# TPM devices
472# 613#
614# CONFIG_TCG_TPM is not set
473 615
474# 616#
475# I2C support 617# I2C support
@@ -477,34 +619,51 @@ CONFIG_DS1302=y
477# CONFIG_I2C is not set 619# CONFIG_I2C is not set
478 620
479# 621#
622# SPI support
623#
624# CONFIG_SPI is not set
625# CONFIG_SPI_MASTER is not set
626
627#
480# Dallas's 1-wire bus 628# Dallas's 1-wire bus
481# 629#
482# CONFIG_W1 is not set 630# CONFIG_W1 is not set
483 631
484# 632#
485# Misc devices 633# Hardware Monitoring support
486# 634#
635CONFIG_HWMON=y
636# CONFIG_HWMON_VID is not set
637# CONFIG_SENSORS_ABITUGURU is not set
638# CONFIG_SENSORS_F71805F is not set
639# CONFIG_SENSORS_VT1211 is not set
640# CONFIG_HWMON_DEBUG_CHIP is not set
487 641
488# 642#
489# Multimedia devices 643# Multimedia devices
490# 644#
491CONFIG_VIDEO_DEV=y 645CONFIG_VIDEO_DEV=m
646CONFIG_VIDEO_V4L1=y
647CONFIG_VIDEO_V4L1_COMPAT=y
648CONFIG_VIDEO_V4L2=y
492 649
493# 650#
494# Video For Linux 651# Video Capture Adapters
495# 652#
496 653
497# 654#
498# Video Adapters 655# Video Capture Adapters
499# 656#
657# CONFIG_VIDEO_ADV_DEBUG is not set
658CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
659# CONFIG_VIDEO_VIVI is not set
500# CONFIG_VIDEO_CPIA is not set 660# CONFIG_VIDEO_CPIA is not set
501CONFIG_VIDEO_M32R_AR=y 661CONFIG_VIDEO_M32R_AR=m
502CONFIG_VIDEO_M32R_AR_M64278=y 662CONFIG_VIDEO_M32R_AR_M64278=m
503 663
504# 664#
505# Radio Adapters 665# Radio Adapters
506# 666#
507# CONFIG_RADIO_MAESTRO is not set
508 667
509# 668#
510# Digital Video Broadcasting Devices 669# Digital Video Broadcasting Devices
@@ -514,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
514# 673#
515# Graphics support 674# Graphics support
516# 675#
676CONFIG_FIRMWARE_EDID=y
517CONFIG_FB=y 677CONFIG_FB=y
518# CONFIG_FB_CFB_FILLRECT is not set 678CONFIG_FB_CFB_FILLRECT=y
519# CONFIG_FB_CFB_COPYAREA is not set 679CONFIG_FB_CFB_COPYAREA=y
520# CONFIG_FB_CFB_IMAGEBLIT is not set 680CONFIG_FB_CFB_IMAGEBLIT=y
521# CONFIG_FB_SOFT_CURSOR is not set
522# CONFIG_FB_MACMODES is not set 681# CONFIG_FB_MACMODES is not set
682# CONFIG_FB_BACKLIGHT is not set
523# CONFIG_FB_MODE_HELPERS is not set 683# CONFIG_FB_MODE_HELPERS is not set
524# CONFIG_FB_TILEBLITTING is not set 684# CONFIG_FB_TILEBLITTING is not set
525# CONFIG_FB_S1D13XXX is not set 685CONFIG_FB_S1D13XXX=y
526# CONFIG_FB_VIRTUAL is not set 686# CONFIG_FB_VIRTUAL is not set
527 687
528# 688#
@@ -531,6 +691,7 @@ CONFIG_FB=y
531# CONFIG_VGA_CONSOLE is not set 691# CONFIG_VGA_CONSOLE is not set
532CONFIG_DUMMY_CONSOLE=y 692CONFIG_DUMMY_CONSOLE=y
533CONFIG_FRAMEBUFFER_CONSOLE=y 693CONFIG_FRAMEBUFFER_CONSOLE=y
694# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
534# CONFIG_FONTS is not set 695# CONFIG_FONTS is not set
535CONFIG_FONT_8x8=y 696CONFIG_FONT_8x8=y
536CONFIG_FONT_8x16=y 697CONFIG_FONT_8x16=y
@@ -542,6 +703,7 @@ CONFIG_LOGO=y
542CONFIG_LOGO_LINUX_MONO=y 703CONFIG_LOGO_LINUX_MONO=y
543CONFIG_LOGO_LINUX_VGA16=y 704CONFIG_LOGO_LINUX_VGA16=y
544CONFIG_LOGO_LINUX_CLUT224=y 705CONFIG_LOGO_LINUX_CLUT224=y
706CONFIG_LOGO_M32R_CLUT224=y
545# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 707# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
546 708
547# 709#
@@ -554,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
554# 716#
555# CONFIG_USB_ARCH_HAS_HCD is not set 717# CONFIG_USB_ARCH_HAS_HCD is not set
556# CONFIG_USB_ARCH_HAS_OHCI is not set 718# CONFIG_USB_ARCH_HAS_OHCI is not set
719# CONFIG_USB_ARCH_HAS_EHCI is not set
720
721#
722# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
723#
557 724
558# 725#
559# USB Gadget Support 726# USB Gadget Support
@@ -563,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
563# 730#
564# MMC/SD Card support 731# MMC/SD Card support
565# 732#
566# CONFIG_MMC is not set 733CONFIG_MMC=y
734CONFIG_MMC_DEBUG=y
735CONFIG_MMC_BLOCK=y
736# CONFIG_MMC_TIFM_SD is not set
737
738#
739# LED devices
740#
741# CONFIG_NEW_LEDS is not set
742
743#
744# LED drivers
745#
746
747#
748# LED Triggers
749#
567 750
568# 751#
569# InfiniBand support 752# InfiniBand support
570# 753#
571# CONFIG_INFINIBAND is not set 754
755#
756# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
757#
758
759#
760# Real Time Clock
761#
762# CONFIG_RTC_CLASS is not set
763
764#
765# DMA Engine support
766#
767# CONFIG_DMA_ENGINE is not set
768
769#
770# DMA Clients
771#
772
773#
774# DMA Devices
775#
572 776
573# 777#
574# File systems 778# File systems
575# 779#
576CONFIG_EXT2_FS=y 780CONFIG_EXT2_FS=y
577# CONFIG_EXT2_FS_XATTR is not set 781# CONFIG_EXT2_FS_XATTR is not set
578CONFIG_EXT3_FS=m 782# CONFIG_EXT2_FS_XIP is not set
783CONFIG_EXT3_FS=y
579CONFIG_EXT3_FS_XATTR=y 784CONFIG_EXT3_FS_XATTR=y
580# CONFIG_EXT3_FS_POSIX_ACL is not set 785# CONFIG_EXT3_FS_POSIX_ACL is not set
581# CONFIG_EXT3_FS_SECURITY is not set 786# CONFIG_EXT3_FS_SECURITY is not set
582CONFIG_JBD=m 787# CONFIG_EXT4DEV_FS is not set
788CONFIG_JBD=y
583CONFIG_JBD_DEBUG=y 789CONFIG_JBD_DEBUG=y
584CONFIG_FS_MBCACHE=y 790CONFIG_FS_MBCACHE=y
585CONFIG_REISERFS_FS=m 791CONFIG_REISERFS_FS=m
@@ -587,17 +793,19 @@ CONFIG_REISERFS_FS=m
587# CONFIG_REISERFS_PROC_INFO is not set 793# CONFIG_REISERFS_PROC_INFO is not set
588# CONFIG_REISERFS_FS_XATTR is not set 794# CONFIG_REISERFS_FS_XATTR is not set
589# CONFIG_JFS_FS is not set 795# CONFIG_JFS_FS is not set
590 796# CONFIG_FS_POSIX_ACL is not set
591#
592# XFS support
593#
594# CONFIG_XFS_FS is not set 797# CONFIG_XFS_FS is not set
798# CONFIG_GFS2_FS is not set
799# CONFIG_OCFS2_FS is not set
595# CONFIG_MINIX_FS is not set 800# CONFIG_MINIX_FS is not set
596# CONFIG_ROMFS_FS is not set 801# CONFIG_ROMFS_FS is not set
802CONFIG_INOTIFY=y
803CONFIG_INOTIFY_USER=y
597# CONFIG_QUOTA is not set 804# CONFIG_QUOTA is not set
598CONFIG_DNOTIFY=y 805CONFIG_DNOTIFY=y
599# CONFIG_AUTOFS_FS is not set 806# CONFIG_AUTOFS_FS is not set
600# CONFIG_AUTOFS4_FS is not set 807# CONFIG_AUTOFS4_FS is not set
808# CONFIG_FUSE_FS is not set
601 809
602# 810#
603# CD-ROM/DVD Filesystems 811# CD-ROM/DVD Filesystems
@@ -623,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
623# 831#
624CONFIG_PROC_FS=y 832CONFIG_PROC_FS=y
625CONFIG_PROC_KCORE=y 833CONFIG_PROC_KCORE=y
834CONFIG_PROC_SYSCTL=y
626CONFIG_SYSFS=y 835CONFIG_SYSFS=y
627CONFIG_DEVFS_FS=y
628CONFIG_DEVFS_MOUNT=y
629# CONFIG_DEVFS_DEBUG is not set
630# CONFIG_DEVPTS_FS_XATTR is not set
631CONFIG_TMPFS=y 836CONFIG_TMPFS=y
632# CONFIG_TMPFS_XATTR is not set 837# CONFIG_TMPFS_POSIX_ACL is not set
633# CONFIG_HUGETLB_PAGE is not set 838# CONFIG_HUGETLB_PAGE is not set
634CONFIG_RAMFS=y 839CONFIG_RAMFS=y
840# CONFIG_CONFIGFS_FS is not set
635 841
636# 842#
637# Miscellaneous filesystems 843# Miscellaneous filesystems
@@ -643,6 +849,8 @@ CONFIG_RAMFS=y
643# CONFIG_BEFS_FS is not set 849# CONFIG_BEFS_FS is not set
644# CONFIG_BFS_FS is not set 850# CONFIG_BFS_FS is not set
645# CONFIG_EFS_FS is not set 851# CONFIG_EFS_FS is not set
852# CONFIG_JFFS_FS is not set
853# CONFIG_JFFS2_FS is not set
646# CONFIG_CRAMFS is not set 854# CONFIG_CRAMFS is not set
647# CONFIG_VXFS_FS is not set 855# CONFIG_VXFS_FS is not set
648# CONFIG_HPFS_FS is not set 856# CONFIG_HPFS_FS is not set
@@ -655,12 +863,14 @@ CONFIG_RAMFS=y
655# 863#
656CONFIG_NFS_FS=y 864CONFIG_NFS_FS=y
657CONFIG_NFS_V3=y 865CONFIG_NFS_V3=y
866# CONFIG_NFS_V3_ACL is not set
658# CONFIG_NFS_V4 is not set 867# CONFIG_NFS_V4 is not set
659# CONFIG_NFS_DIRECTIO is not set 868# CONFIG_NFS_DIRECTIO is not set
660# CONFIG_NFSD is not set 869# CONFIG_NFSD is not set
661CONFIG_ROOT_NFS=y 870CONFIG_ROOT_NFS=y
662CONFIG_LOCKD=y 871CONFIG_LOCKD=y
663CONFIG_LOCKD_V4=y 872CONFIG_LOCKD_V4=y
873CONFIG_NFS_COMMON=y
664CONFIG_SUNRPC=y 874CONFIG_SUNRPC=y
665# CONFIG_RPCSEC_GSS_KRB5 is not set 875# CONFIG_RPCSEC_GSS_KRB5 is not set
666# CONFIG_RPCSEC_GSS_SPKM3 is not set 876# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -669,6 +879,7 @@ CONFIG_SUNRPC=y
669# CONFIG_NCP_FS is not set 879# CONFIG_NCP_FS is not set
670# CONFIG_CODA_FS is not set 880# CONFIG_CODA_FS is not set
671# CONFIG_AFS_FS is not set 881# CONFIG_AFS_FS is not set
882# CONFIG_9P_FS is not set
672 883
673# 884#
674# Partition Types 885# Partition Types
@@ -723,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
723# 934#
724# Profiling support 935# Profiling support
725# 936#
726# CONFIG_PROFILING is not set 937CONFIG_PROFILING=y
938CONFIG_OPROFILE=y
727 939
728# 940#
729# Kernel hacking 941# Kernel hacking
730# 942#
731# CONFIG_PRINTK_TIME is not set 943# CONFIG_PRINTK_TIME is not set
944CONFIG_ENABLE_MUST_CHECK=y
945# CONFIG_MAGIC_SYSRQ is not set
946# CONFIG_UNUSED_SYMBOLS is not set
732# CONFIG_DEBUG_KERNEL is not set 947# CONFIG_DEBUG_KERNEL is not set
733CONFIG_LOG_BUF_SHIFT=14 948CONFIG_LOG_BUF_SHIFT=15
734# CONFIG_DEBUG_BUGVERBOSE is not set 949# CONFIG_DEBUG_BUGVERBOSE is not set
950# CONFIG_DEBUG_FS is not set
735# CONFIG_FRAME_POINTER is not set 951# CONFIG_FRAME_POINTER is not set
952# CONFIG_UNWIND_INFO is not set
953# CONFIG_HEADERS_CHECK is not set
736 954
737# 955#
738# Security options 956# Security options
@@ -746,12 +964,9 @@ CONFIG_LOG_BUF_SHIFT=14
746# CONFIG_CRYPTO is not set 964# CONFIG_CRYPTO is not set
747 965
748# 966#
749# Hardware crypto devices
750#
751
752#
753# Library routines 967# Library routines
754# 968#
755# CONFIG_CRC_CCITT is not set 969# CONFIG_CRC_CCITT is not set
970# CONFIG_CRC16 is not set
756CONFIG_CRC32=y 971CONFIG_CRC32=y
757# CONFIG_LIBCRC32C is not set 972# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S
index 0d3c8ee0e03d..dab7436d7bbe 100644
--- a/arch/m32r/kernel/head.S
+++ b/arch/m32r/kernel/head.S
@@ -7,8 +7,6 @@
7 * Hitoshi Yamamoto 7 * Hitoshi Yamamoto
8 */ 8 */
9 9
10/* $Id$ */
11
12#include <linux/init.h> 10#include <linux/init.h>
13__INIT 11__INIT
14__INITDATA 12__INITDATA
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 44cbe0ce0f8f..a689e2978b6e 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs)
174 regs->acc1h, regs->acc1l); 174 regs->acc1h, regs->acc1l);
175#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) 175#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
176 printk("ACCH[%08lx]:ACCL[%08lx]\n", \ 176 printk("ACCH[%08lx]:ACCL[%08lx]\n", \
177 regs->acch, regs->accl); 177 regs->acc0h, regs->acc0l);
178#else 178#else
179#error unknown isa configuration 179#error unknown isa configuration
180#endif 180#endif
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
index 936205f7aba0..d64814385d70 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -64,7 +64,7 @@ struct screen_info screen_info = {
64 64
65extern int root_mountflags; 65extern int root_mountflags;
66 66
67static char command_line[COMMAND_LINE_SIZE]; 67static char __initdata command_line[COMMAND_LINE_SIZE];
68 68
69static struct resource data_resource = { 69static struct resource data_resource = {
70 .name = "Kernel data", 70 .name = "Kernel data",
@@ -95,8 +95,8 @@ static __inline__ void parse_mem_cmdline(char ** cmdline_p)
95 int usermem = 0; 95 int usermem = 0;
96 96
97 /* Save unparsed command line copy for /proc/cmdline */ 97 /* Save unparsed command line copy for /proc/cmdline */
98 memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); 98 memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
99 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 99 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
100 100
101 memory_start = (unsigned long)CONFIG_MEMORY_START+PAGE_OFFSET; 101 memory_start = (unsigned long)CONFIG_MEMORY_START+PAGE_OFFSET;
102 memory_end = memory_start+(unsigned long)CONFIG_MEMORY_SIZE; 102 memory_end = memory_start+(unsigned long)CONFIG_MEMORY_SIZE;
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index 092ea86bb079..4b156054baa6 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
109 COPY(r10); 109 COPY(r10);
110 COPY(r11); 110 COPY(r11);
111 COPY(r12); 111 COPY(r12);
112#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
113 COPY(acc0h); 112 COPY(acc0h);
114 COPY(acc0l); 113 COPY(acc0l);
115 COPY(acc1h); 114 COPY(acc1h); /* ISA_DSP_LEVEL2 only */
116 COPY(acc1l); 115 COPY(acc1l); /* ISA_DSP_LEVEL2 only */
117#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
118 COPY(acch);
119 COPY(accl);
120 COPY(dummy_acc1h);
121 COPY(dummy_acc1l);
122#else
123#error unknown isa configuration
124#endif
125 COPY(psw); 116 COPY(psw);
126 COPY(bpc); 117 COPY(bpc);
127 COPY(bbpsw); 118 COPY(bbpsw);
@@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
196 COPY(r10); 187 COPY(r10);
197 COPY(r11); 188 COPY(r11);
198 COPY(r12); 189 COPY(r12);
199#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
200 COPY(acc0h); 190 COPY(acc0h);
201 COPY(acc0l); 191 COPY(acc0l);
202 COPY(acc1h); 192 COPY(acc1h); /* ISA_DSP_LEVEL2 only */
203 COPY(acc1l); 193 COPY(acc1l); /* ISA_DSP_LEVEL2 only */
204#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
205 COPY(acch);
206 COPY(accl);
207 COPY(dummy_acc1h);
208 COPY(dummy_acc1l);
209#else
210#error unknown isa configuration
211#endif
212 COPY(psw); 194 COPY(psw);
213 COPY(bpc); 195 COPY(bpc);
214 COPY(bbpsw); 196 COPY(bbpsw);
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index a09038282c78..3858c9f39ba5 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -286,11 +286,3 @@ void __init time_init(void)
286#error no chip configuration 286#error no chip configuration
287#endif 287#endif
288} 288}
289
290/*
291 * Scheduler clock - returns current time in nanosec units.
292 */
293unsigned long long sched_clock(void)
294{
295 return (unsigned long long)jiffies * (1000000000 / HZ);
296}
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 358b9cee2c65..439cc257cd1d 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -6,12 +6,15 @@
6#include <asm/page.h> 6#include <asm/page.h>
7 7
8OUTPUT_ARCH(m32r) 8OUTPUT_ARCH(m32r)
9ENTRY(startup_32)
10#if defined(__LITTLE_ENDIAN__) 9#if defined(__LITTLE_ENDIAN__)
11 jiffies = jiffies_64; 10 jiffies = jiffies_64;
12#else 11#else
13 jiffies = jiffies_64 + 4; 12 jiffies = jiffies_64 + 4;
14#endif 13#endif
14
15kernel_entry = boot - 0x80000000;
16ENTRY(kernel_entry)
17
15SECTIONS 18SECTIONS
16{ 19{
17 . = CONFIG_MEMORY_START + __PAGE_OFFSET; 20 . = CONFIG_MEMORY_START + __PAGE_OFFSET;
@@ -99,10 +102,14 @@ SECTIONS
99 from .altinstructions and .eh_frame */ 102 from .altinstructions and .eh_frame */
100 .exit.text : { *(.exit.text) } 103 .exit.text : { *(.exit.text) }
101 .exit.data : { *(.exit.data) } 104 .exit.data : { *(.exit.data) }
105
106#ifdef CONFIG_BLK_DEV_INITRD
102 . = ALIGN(4096); 107 . = ALIGN(4096);
103 __initramfs_start = .; 108 __initramfs_start = .;
104 .init.ramfs : { *(.init.ramfs) } 109 .init.ramfs : { *(.init.ramfs) }
105 __initramfs_end = .; 110 __initramfs_end = .;
111#endif
112
106 . = ALIGN(32); 113 . = ALIGN(32);
107 __per_cpu_start = .; 114 __per_cpu_start = .;
108 .data.percpu : { *(.data.percpu) } 115 .data.percpu : { *(.data.percpu) }
diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S
index 107594b65d58..7fc0c19801ba 100644
--- a/arch/m32r/lib/ashxdi3.S
+++ b/arch/m32r/lib/ashxdi3.S
@@ -4,8 +4,6 @@
4 * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata 4 * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata
5 * 5 *
6 */ 6 */
7/* $Id$ */
8
9 7
10; 8;
11; input (r0,r1) src 9; input (r0,r1) src
@@ -293,4 +291,3 @@ __lshrdi3:
293#endif /* not CONFIG_ISA_DUAL_ISSUE */ 291#endif /* not CONFIG_ISA_DUAL_ISSUE */
294 292
295 .end 293 .end
296
diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/checksum.S
index cfbe00e5184a..0af0360c76d9 100644
--- a/arch/m32r/lib/checksum.S
+++ b/arch/m32r/lib/checksum.S
@@ -25,8 +25,6 @@
25 * as published by the Free Software Foundation; either version 25 * as published by the Free Software Foundation; either version
26 * 2 of the License, or (at your option) any later version. 26 * 2 of the License, or (at your option) any later version.
27 */ 27 */
28/* $Id$ */
29
30 28
31#include <linux/linkage.h> 29#include <linux/linkage.h>
32#include <asm/assembler.h> 30#include <asm/assembler.h>
@@ -319,3 +317,4 @@ ENTRY(csum_partial_copy_generic)
319 nop 317 nop
320 nop 318 nop
321 319
320 .end
diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c
index 06382a38c318..59bfc34e0d9f 100644
--- a/arch/m32r/lib/delay.c
+++ b/arch/m32r/lib/delay.c
@@ -5,8 +5,6 @@
5 * Copyright (c) 2004 Hirokazu Takata 5 * Copyright (c) 2004 Hirokazu Takata
6 */ 6 */
7 7
8/* $Id$ */
9
10#include <linux/param.h> 8#include <linux/param.h>
11#ifdef CONFIG_SMP 9#ifdef CONFIG_SMP
12#include <linux/sched.h> 10#include <linux/sched.h>
diff --git a/arch/m32r/lib/memcpy.S b/arch/m32r/lib/memcpy.S
index 2089a215314e..05987cd639ef 100644
--- a/arch/m32r/lib/memcpy.S
+++ b/arch/m32r/lib/memcpy.S
@@ -10,8 +10,6 @@
10 * src: r1 10 * src: r1
11 * n : r2 11 * n : r2
12 */ 12 */
13/* $Id$ */
14
15 13
16 .text 14 .text
17#include <linux/linkage.h> 15#include <linux/linkage.h>
diff --git a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S
index b47fa3537aa4..2b2831a37927 100644
--- a/arch/m32r/lib/memset.S
+++ b/arch/m32r/lib/memset.S
@@ -12,8 +12,6 @@
12 * ret: r0 12 * ret: r0
13 * 13 *
14 */ 14 */
15/* $Id$ */
16
17 15
18 .text 16 .text
19 .global memset 17 .global memset
diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S
index 5f41aacd7b3e..916de9e8f801 100644
--- a/arch/m32r/lib/strlen.S
+++ b/arch/m32r/lib/strlen.S
@@ -6,8 +6,6 @@
6 * size_t strlen(const char *s); 6 * size_t strlen(const char *s);
7 * 7 *
8 */ 8 */
9/* $Id$ */
10
11 9
12#include <linux/linkage.h> 10#include <linux/linkage.h>
13#include <asm/assembler.h> 11#include <asm/assembler.h>
diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c
index 896cef1aca5f..82abd159dbef 100644
--- a/arch/m32r/lib/usercopy.c
+++ b/arch/m32r/lib/usercopy.c
@@ -293,7 +293,7 @@ long strnlen_user(const char __user *s, long n)
293 : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101) 293 : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101)
294 : "r0", "r1", "cbit"); 294 : "r0", "r1", "cbit");
295 295
296 /* NOTE: strnlen_user() algorism: 296 /* NOTE: strnlen_user() algorithm:
297 * { 297 * {
298 * char *p; 298 * char *p;
299 * for (p = s; n-- && *p != '\0'; ++p) 299 * for (p = s; n-- && *p != '\0'; ++p)
@@ -369,7 +369,7 @@ long strnlen_user(const char __user *s, long n)
369 : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101) 369 : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101)
370 : "r0", "r1", "r2", "r3", "cbit"); 370 : "r0", "r1", "r2", "r3", "cbit");
371 371
372 /* NOTE: strnlen_user() algorism: 372 /* NOTE: strnlen_user() algorithm:
373 * { 373 * {
374 * char *p; 374 * char *p;
375 * for (p = s; n-- && *p != '\0'; ++p) 375 * for (p = s; n-- && *p != '\0'; ++p)
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/m32104ut/defconfig.m32104ut
index 454de336803a..7b68fe8d921e 100644
--- a/arch/m32r/m32104ut/defconfig.m32104ut
+++ b/arch/m32r/m32104ut/defconfig.m32104ut
@@ -1,20 +1,20 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.19
4# Wed Nov 9 16:04:51 2005 4# Wed Dec 13 17:22:20 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
17CONFIG_LOCK_KERNEL=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
@@ -22,33 +22,66 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y 24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
25# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
26# CONFIG_BSD_PROCESS_ACCT is not set 28# CONFIG_BSD_PROCESS_ACCT is not set
27CONFIG_SYSCTL=y 29# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set
28# CONFIG_AUDIT is not set 31# CONFIG_AUDIT is not set
29CONFIG_HOTPLUG=y 32CONFIG_IKCONFIG=y
30# CONFIG_KOBJECT_UEVENT is not set 33CONFIG_IKCONFIG_PROC=y
31# CONFIG_IKCONFIG is not set 34CONFIG_SYSFS_DEPRECATED=y
35# CONFIG_RELAY is not set
32CONFIG_INITRAMFS_SOURCE="" 36CONFIG_INITRAMFS_SOURCE=""
33CONFIG_EMBEDDED=y 37CONFIG_CC_OPTIMIZE_FOR_SIZE=y
34# CONFIG_KALLSYMS is not set 38CONFIG_SYSCTL=y
39# CONFIG_EMBEDDED is not set
40CONFIG_SYSCTL_SYSCALL=y
41CONFIG_KALLSYMS=y
42# CONFIG_KALLSYMS_EXTRA_PASS is not set
43CONFIG_HOTPLUG=y
35CONFIG_PRINTK=y 44CONFIG_PRINTK=y
36CONFIG_BUG=y 45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
37CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
38# CONFIG_FUTEX is not set 48CONFIG_FUTEX=y
39# CONFIG_EPOLL is not set 49CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 50CONFIG_SLAB=y
41CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_VM_EVENT_COUNTERS=y
42CONFIG_CC_ALIGN_LABELS=0 52CONFIG_RT_MUTEXES=y
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45CONFIG_TINY_SHMEM=y 53CONFIG_TINY_SHMEM=y
46CONFIG_BASE_SMALL=0 54CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
47 56
48# 57#
49# Loadable module support 58# Loadable module support
50# 59#
51# CONFIG_MODULES is not set 60CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y
62CONFIG_MODULE_FORCE_UNLOAD=y
63# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y
66
67#
68# Block layer
69#
70CONFIG_BLOCK=y
71# CONFIG_BLK_DEV_IO_TRACE is not set
72
73#
74# IO Schedulers
75#
76CONFIG_IOSCHED_NOOP=y
77CONFIG_IOSCHED_AS=y
78CONFIG_IOSCHED_DEADLINE=y
79CONFIG_IOSCHED_CFQ=y
80CONFIG_DEFAULT_AS=y
81# CONFIG_DEFAULT_DEADLINE is not set
82# CONFIG_DEFAULT_CFQ is not set
83# CONFIG_DEFAULT_NOOP is not set
84CONFIG_DEFAULT_IOSCHED="anticipatory"
52 85
53# 86#
54# Processor type and features 87# Processor type and features
@@ -70,40 +103,40 @@ CONFIG_ISA_M32R=y
70CONFIG_BUS_CLOCK=54000000 103CONFIG_BUS_CLOCK=54000000
71CONFIG_TIMER_DIVIDE=128 104CONFIG_TIMER_DIVIDE=128
72# CONFIG_CPU_LITTLE_ENDIAN is not set 105# CONFIG_CPU_LITTLE_ENDIAN is not set
73CONFIG_MEMORY_START=04000000 106CONFIG_MEMORY_START=0x04000000
74CONFIG_MEMORY_SIZE=01000000 107CONFIG_MEMORY_SIZE=0x01000000
75CONFIG_NOHIGHMEM=y 108CONFIG_NOHIGHMEM=y
76# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 109CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
77CONFIG_SELECT_MEMORY_MODEL=y 110CONFIG_SELECT_MEMORY_MODEL=y
78CONFIG_FLATMEM_MANUAL=y 111# CONFIG_FLATMEM_MANUAL is not set
79# CONFIG_DISCONTIGMEM_MANUAL is not set 112CONFIG_DISCONTIGMEM_MANUAL=y
80# CONFIG_SPARSEMEM_MANUAL is not set 113# CONFIG_SPARSEMEM_MANUAL is not set
81CONFIG_FLATMEM=y 114CONFIG_DISCONTIGMEM=y
82CONFIG_FLAT_NODE_MEM_MAP=y 115CONFIG_FLAT_NODE_MEM_MAP=y
116CONFIG_NEED_MULTIPLE_NODES=y
83# CONFIG_SPARSEMEM_STATIC is not set 117# CONFIG_SPARSEMEM_STATIC is not set
118CONFIG_SPLIT_PTLOCK_CPUS=4
119# CONFIG_RESOURCES_64BIT is not set
120CONFIG_IRAM_START=0x00700000
121CONFIG_IRAM_SIZE=0x00010000
84CONFIG_RWSEM_GENERIC_SPINLOCK=y 122CONFIG_RWSEM_GENERIC_SPINLOCK=y
85# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 123# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
124CONFIG_GENERIC_FIND_NEXT_BIT=y
125CONFIG_GENERIC_HWEIGHT=y
86CONFIG_GENERIC_CALIBRATE_DELAY=y 126CONFIG_GENERIC_CALIBRATE_DELAY=y
87# CONFIG_PREEMPT is not set 127CONFIG_PREEMPT=y
88# CONFIG_SMP is not set 128# CONFIG_SMP is not set
129CONFIG_NODES_SHIFT=1
89 130
90# 131#
91# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 132# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
92# 133#
93# CONFIG_ISA is not set 134CONFIG_ISA=y
94 135
95# 136#
96# PCCARD (PCMCIA/CardBus) support 137# PCCARD (PCMCIA/CardBus) support
97# 138#
98CONFIG_PCCARD=y 139# CONFIG_PCCARD is not set
99# CONFIG_PCMCIA_DEBUG is not set
100CONFIG_PCMCIA=y
101CONFIG_PCMCIA_LOAD_CIS=y
102CONFIG_PCMCIA_IOCTL=y
103
104#
105# PC-card bridges
106#
107 140
108# 141#
109# PCI Hotplug Support 142# PCI Hotplug Support
@@ -112,10 +145,8 @@ CONFIG_PCMCIA_IOCTL=y
112# 145#
113# Executable file formats 146# Executable file formats
114# 147#
115CONFIG_BINFMT_FLAT=y 148# CONFIG_BINFMT_FLAT is not set
116# CONFIG_BINFMT_ZFLAT is not set 149CONFIG_BINFMT_MISC=y
117# CONFIG_BINFMT_SHARED_FLAT is not set
118# CONFIG_BINFMT_MISC is not set
119 150
120# 151#
121# Networking 152# Networking
@@ -125,17 +156,19 @@ CONFIG_NET=y
125# 156#
126# Networking options 157# Networking options
127# 158#
128# CONFIG_PACKET is not set 159# CONFIG_NETDEBUG is not set
160CONFIG_PACKET=y
161# CONFIG_PACKET_MMAP is not set
129CONFIG_UNIX=y 162CONFIG_UNIX=y
163CONFIG_XFRM=y
164# CONFIG_XFRM_USER is not set
165# CONFIG_XFRM_SUB_POLICY is not set
130# CONFIG_NET_KEY is not set 166# CONFIG_NET_KEY is not set
131CONFIG_INET=y 167CONFIG_INET=y
132# CONFIG_IP_MULTICAST is not set 168# CONFIG_IP_MULTICAST is not set
133# CONFIG_IP_ADVANCED_ROUTER is not set 169# CONFIG_IP_ADVANCED_ROUTER is not set
134CONFIG_IP_FIB_HASH=y 170CONFIG_IP_FIB_HASH=y
135CONFIG_IP_PNP=y 171# CONFIG_IP_PNP is not set
136CONFIG_IP_PNP_DHCP=y
137# CONFIG_IP_PNP_BOOTP is not set
138# CONFIG_IP_PNP_RARP is not set
139# CONFIG_NET_IPIP is not set 172# CONFIG_NET_IPIP is not set
140# CONFIG_NET_IPGRE is not set 173# CONFIG_NET_IPGRE is not set
141# CONFIG_ARPD is not set 174# CONFIG_ARPD is not set
@@ -143,13 +176,87 @@ CONFIG_IP_PNP_DHCP=y
143# CONFIG_INET_AH is not set 176# CONFIG_INET_AH is not set
144# CONFIG_INET_ESP is not set 177# CONFIG_INET_ESP is not set
145# CONFIG_INET_IPCOMP is not set 178# CONFIG_INET_IPCOMP is not set
179# CONFIG_INET_XFRM_TUNNEL is not set
146# CONFIG_INET_TUNNEL is not set 180# CONFIG_INET_TUNNEL is not set
181CONFIG_INET_XFRM_MODE_TRANSPORT=y
182CONFIG_INET_XFRM_MODE_TUNNEL=y
183CONFIG_INET_XFRM_MODE_BEET=y
147CONFIG_INET_DIAG=y 184CONFIG_INET_DIAG=y
148CONFIG_INET_TCP_DIAG=y 185CONFIG_INET_TCP_DIAG=y
149# CONFIG_TCP_CONG_ADVANCED is not set 186# CONFIG_TCP_CONG_ADVANCED is not set
150CONFIG_TCP_CONG_BIC=y 187CONFIG_TCP_CONG_CUBIC=y
188CONFIG_DEFAULT_TCP_CONG="cubic"
189# CONFIG_TCP_MD5SIG is not set
190
191#
192# IP: Virtual Server Configuration
193#
194# CONFIG_IP_VS is not set
151# CONFIG_IPV6 is not set 195# CONFIG_IPV6 is not set
152# CONFIG_NETFILTER is not set 196# CONFIG_INET6_XFRM_TUNNEL is not set
197# CONFIG_INET6_TUNNEL is not set
198# CONFIG_NETWORK_SECMARK is not set
199CONFIG_NETFILTER=y
200# CONFIG_NETFILTER_DEBUG is not set
201
202#
203# Core Netfilter Configuration
204#
205CONFIG_NETFILTER_NETLINK=m
206CONFIG_NETFILTER_NETLINK_QUEUE=m
207CONFIG_NETFILTER_NETLINK_LOG=m
208# CONFIG_NF_CONNTRACK_ENABLED is not set
209CONFIG_NETFILTER_XTABLES=m
210CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
211# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
212CONFIG_NETFILTER_XT_TARGET_MARK=m
213CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
214# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
215CONFIG_NETFILTER_XT_MATCH_COMMENT=m
216CONFIG_NETFILTER_XT_MATCH_DCCP=m
217# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
218# CONFIG_NETFILTER_XT_MATCH_ESP is not set
219CONFIG_NETFILTER_XT_MATCH_LENGTH=m
220CONFIG_NETFILTER_XT_MATCH_LIMIT=m
221CONFIG_NETFILTER_XT_MATCH_MAC=m
222CONFIG_NETFILTER_XT_MATCH_MARK=m
223# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
224# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
225CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
226# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
227CONFIG_NETFILTER_XT_MATCH_REALM=m
228CONFIG_NETFILTER_XT_MATCH_SCTP=m
229# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
230CONFIG_NETFILTER_XT_MATCH_STRING=m
231CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
232# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
233
234#
235# IP: Netfilter Configuration
236#
237CONFIG_IP_NF_QUEUE=m
238CONFIG_IP_NF_IPTABLES=m
239CONFIG_IP_NF_MATCH_IPRANGE=m
240CONFIG_IP_NF_MATCH_TOS=m
241CONFIG_IP_NF_MATCH_RECENT=m
242CONFIG_IP_NF_MATCH_ECN=m
243# CONFIG_IP_NF_MATCH_AH is not set
244CONFIG_IP_NF_MATCH_TTL=m
245CONFIG_IP_NF_MATCH_OWNER=m
246CONFIG_IP_NF_MATCH_ADDRTYPE=m
247CONFIG_IP_NF_FILTER=m
248CONFIG_IP_NF_TARGET_REJECT=m
249CONFIG_IP_NF_TARGET_LOG=m
250CONFIG_IP_NF_TARGET_ULOG=m
251CONFIG_IP_NF_TARGET_TCPMSS=m
252CONFIG_IP_NF_MANGLE=m
253CONFIG_IP_NF_TARGET_TOS=m
254CONFIG_IP_NF_TARGET_ECN=m
255CONFIG_IP_NF_TARGET_TTL=m
256CONFIG_IP_NF_RAW=m
257CONFIG_IP_NF_ARPTABLES=m
258CONFIG_IP_NF_ARPFILTER=m
259CONFIG_IP_NF_ARP_MANGLE=m
153 260
154# 261#
155# DCCP Configuration (EXPERIMENTAL) 262# DCCP Configuration (EXPERIMENTAL)
@@ -160,6 +267,11 @@ CONFIG_TCP_CONG_BIC=y
160# SCTP Configuration (EXPERIMENTAL) 267# SCTP Configuration (EXPERIMENTAL)
161# 268#
162# CONFIG_IP_SCTP is not set 269# CONFIG_IP_SCTP is not set
270
271#
272# TIPC Configuration (EXPERIMENTAL)
273#
274# CONFIG_TIPC is not set
163# CONFIG_ATM is not set 275# CONFIG_ATM is not set
164# CONFIG_BRIDGE is not set 276# CONFIG_BRIDGE is not set
165# CONFIG_VLAN_8021Q is not set 277# CONFIG_VLAN_8021Q is not set
@@ -169,11 +281,14 @@ CONFIG_TCP_CONG_BIC=y
169# CONFIG_ATALK is not set 281# CONFIG_ATALK is not set
170# CONFIG_X25 is not set 282# CONFIG_X25 is not set
171# CONFIG_LAPB is not set 283# CONFIG_LAPB is not set
172# CONFIG_NET_DIVERT is not set
173# CONFIG_ECONET is not set 284# CONFIG_ECONET is not set
174# CONFIG_WAN_ROUTER is not set 285# CONFIG_WAN_ROUTER is not set
286
287#
288# QoS and/or fair queueing
289#
175# CONFIG_NET_SCHED is not set 290# CONFIG_NET_SCHED is not set
176# CONFIG_NET_CLS_ROUTE is not set 291CONFIG_NET_CLS_ROUTE=y
177 292
178# 293#
179# Network testing 294# Network testing
@@ -193,8 +308,8 @@ CONFIG_TCP_CONG_BIC=y
193# 308#
194CONFIG_STANDALONE=y 309CONFIG_STANDALONE=y
195CONFIG_PREVENT_FIRMWARE_BUILD=y 310CONFIG_PREVENT_FIRMWARE_BUILD=y
196CONFIG_FW_LOADER=y 311# CONFIG_FW_LOADER is not set
197# CONFIG_DEBUG_DRIVER is not set 312# CONFIG_SYS_HYPERVISOR is not set
198 313
199# 314#
200# Connector - unified userspace <-> kernelspace linker 315# Connector - unified userspace <-> kernelspace linker
@@ -209,11 +324,21 @@ CONFIG_FW_LOADER=y
209# 324#
210# Parallel port support 325# Parallel port support
211# 326#
212# CONFIG_PARPORT is not set 327CONFIG_PARPORT=m
328# CONFIG_PARPORT_GSC is not set
329# CONFIG_PARPORT_AX88796 is not set
330CONFIG_PARPORT_1284=y
213 331
214# 332#
215# Plug and Play support 333# Plug and Play support
216# 334#
335CONFIG_PNP=y
336# CONFIG_PNP_DEBUG is not set
337
338#
339# Protocols
340#
341CONFIG_ISAPNP=y
217 342
218# 343#
219# Block devices 344# Block devices
@@ -221,37 +346,130 @@ CONFIG_FW_LOADER=y
221# CONFIG_BLK_DEV_COW_COMMON is not set 346# CONFIG_BLK_DEV_COW_COMMON is not set
222CONFIG_BLK_DEV_LOOP=y 347CONFIG_BLK_DEV_LOOP=y
223# CONFIG_BLK_DEV_CRYPTOLOOP is not set 348# CONFIG_BLK_DEV_CRYPTOLOOP is not set
224CONFIG_BLK_DEV_NBD=y 349CONFIG_BLK_DEV_NBD=m
225CONFIG_BLK_DEV_RAM=y 350# CONFIG_BLK_DEV_RAM is not set
226CONFIG_BLK_DEV_RAM_COUNT=16 351# CONFIG_BLK_DEV_INITRD is not set
227CONFIG_BLK_DEV_RAM_SIZE=4096 352CONFIG_CDROM_PKTCDVD=m
228CONFIG_BLK_DEV_INITRD=y 353CONFIG_CDROM_PKTCDVD_BUFFERS=8
229# CONFIG_CDROM_PKTCDVD is not set 354CONFIG_CDROM_PKTCDVD_WCACHE=y
355# CONFIG_ATA_OVER_ETH is not set
230 356
231# 357#
232# IO Schedulers 358# Misc devices
233# 359#
234CONFIG_IOSCHED_NOOP=y 360# CONFIG_TIFM_CORE is not set
235# CONFIG_IOSCHED_AS is not set
236# CONFIG_IOSCHED_DEADLINE is not set
237# CONFIG_IOSCHED_CFQ is not set
238# CONFIG_ATA_OVER_ETH is not set
239 361
240# 362#
241# ATA/ATAPI/MFM/RLL support 363# ATA/ATAPI/MFM/RLL support
242# 364#
243# CONFIG_IDE is not set 365CONFIG_IDE=y
366CONFIG_BLK_DEV_IDE=y
367
368#
369# Please see Documentation/ide.txt for help/info on IDE drives
370#
371# CONFIG_BLK_DEV_IDE_SATA is not set
372CONFIG_BLK_DEV_IDEDISK=y
373# CONFIG_IDEDISK_MULTI_MODE is not set
374CONFIG_BLK_DEV_IDECD=y
375# CONFIG_BLK_DEV_IDETAPE is not set
376# CONFIG_BLK_DEV_IDEFLOPPY is not set
377# CONFIG_BLK_DEV_IDESCSI is not set
378# CONFIG_IDE_TASK_IOCTL is not set
379
380#
381# IDE chipset support/bugfixes
382#
383CONFIG_IDE_GENERIC=y
384# CONFIG_BLK_DEV_IDEPNP is not set
385# CONFIG_IDE_ARM is not set
386# CONFIG_IDE_CHIPSETS is not set
387# CONFIG_BLK_DEV_IDEDMA is not set
388# CONFIG_IDEDMA_AUTO is not set
389# CONFIG_BLK_DEV_HD is not set
244 390
245# 391#
246# SCSI device support 392# SCSI device support
247# 393#
248# CONFIG_RAID_ATTRS is not set 394# CONFIG_RAID_ATTRS is not set
249# CONFIG_SCSI is not set 395CONFIG_SCSI=y
396# CONFIG_SCSI_NETLINK is not set
397CONFIG_SCSI_PROC_FS=y
398
399#
400# SCSI support type (disk, tape, CD-ROM)
401#
402CONFIG_BLK_DEV_SD=y
403CONFIG_CHR_DEV_ST=m
404# CONFIG_CHR_DEV_OSST is not set
405CONFIG_BLK_DEV_SR=m
406# CONFIG_BLK_DEV_SR_VENDOR is not set
407CONFIG_CHR_DEV_SG=m
408# CONFIG_CHR_DEV_SCH is not set
409
410#
411# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
412#
413CONFIG_SCSI_MULTI_LUN=y
414CONFIG_SCSI_CONSTANTS=y
415# CONFIG_SCSI_LOGGING is not set
416
417#
418# SCSI Transports
419#
420CONFIG_SCSI_SPI_ATTRS=y
421# CONFIG_SCSI_FC_ATTRS is not set
422# CONFIG_SCSI_ISCSI_ATTRS is not set
423# CONFIG_SCSI_SAS_ATTRS is not set
424# CONFIG_SCSI_SAS_LIBSAS is not set
425
426#
427# SCSI low-level drivers
428#
429# CONFIG_ISCSI_TCP is not set
430# CONFIG_SCSI_AHA152X is not set
431# CONFIG_SCSI_AIC7XXX_OLD is not set
432# CONFIG_SCSI_IN2000 is not set
433# CONFIG_SCSI_DTC3280 is not set
434# CONFIG_SCSI_FUTURE_DOMAIN is not set
435# CONFIG_SCSI_GENERIC_NCR5380 is not set
436# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
437# CONFIG_SCSI_NCR53C406A is not set
438# CONFIG_SCSI_PAS16 is not set
439# CONFIG_SCSI_PSI240I is not set
440# CONFIG_SCSI_QLOGIC_FAS is not set
441# CONFIG_SCSI_SYM53C416 is not set
442# CONFIG_SCSI_T128 is not set
443# CONFIG_SCSI_DEBUG is not set
444
445#
446# Serial ATA (prod) and Parallel ATA (experimental) drivers
447#
448
449#
450# Old CD-ROM drivers (not SCSI, not IDE)
451#
452# CONFIG_CD_NO_IDESCSI is not set
250 453
251# 454#
252# Multi-device support (RAID and LVM) 455# Multi-device support (RAID and LVM)
253# 456#
254# CONFIG_MD is not set 457CONFIG_MD=y
458CONFIG_BLK_DEV_MD=y
459# CONFIG_MD_LINEAR is not set
460# CONFIG_MD_RAID0 is not set
461CONFIG_MD_RAID1=y
462# CONFIG_MD_RAID10 is not set
463# CONFIG_MD_RAID456 is not set
464# CONFIG_MD_MULTIPATH is not set
465# CONFIG_MD_FAULTY is not set
466CONFIG_BLK_DEV_DM=m
467# CONFIG_DM_DEBUG is not set
468CONFIG_DM_CRYPT=m
469CONFIG_DM_SNAPSHOT=m
470# CONFIG_DM_MIRROR is not set
471# CONFIG_DM_ZERO is not set
472# CONFIG_DM_MULTIPATH is not set
255 473
256# 474#
257# Fusion MPT device support 475# Fusion MPT device support
@@ -270,10 +488,16 @@ CONFIG_IOSCHED_NOOP=y
270# Network device support 488# Network device support
271# 489#
272CONFIG_NETDEVICES=y 490CONFIG_NETDEVICES=y
273CONFIG_DUMMY=y 491CONFIG_DUMMY=m
274# CONFIG_BONDING is not set 492# CONFIG_BONDING is not set
275# CONFIG_EQUALIZER is not set 493# CONFIG_EQUALIZER is not set
276# CONFIG_TUN is not set 494# CONFIG_TUN is not set
495# CONFIG_NET_SB1000 is not set
496
497#
498# ARCnet devices
499#
500# CONFIG_ARCNET is not set
277 501
278# 502#
279# PHY device support 503# PHY device support
@@ -285,8 +509,33 @@ CONFIG_DUMMY=y
285# 509#
286CONFIG_NET_ETHERNET=y 510CONFIG_NET_ETHERNET=y
287CONFIG_MII=y 511CONFIG_MII=y
288CONFIG_SMC91X=y 512CONFIG_NET_VENDOR_3COM=y
289# CONFIG_NE2000 is not set 513# CONFIG_EL1 is not set
514# CONFIG_EL2 is not set
515# CONFIG_EL16 is not set
516# CONFIG_EL3 is not set
517# CONFIG_NET_VENDOR_SMC is not set
518# CONFIG_SMC91X is not set
519# CONFIG_NET_VENDOR_RACAL is not set
520# CONFIG_AT1700 is not set
521# CONFIG_DEPCA is not set
522# CONFIG_HP100 is not set
523CONFIG_NET_ISA=y
524# CONFIG_E2100 is not set
525# CONFIG_EWRK3 is not set
526# CONFIG_EEXPRESS is not set
527# CONFIG_EEXPRESS_PRO is not set
528# CONFIG_HPLAN_PLUS is not set
529# CONFIG_HPLAN is not set
530# CONFIG_LP486E is not set
531# CONFIG_ETH16I is not set
532CONFIG_NE2000=m
533# CONFIG_SEEQ8005 is not set
534CONFIG_NET_PCI=y
535# CONFIG_AC3200 is not set
536# CONFIG_APRICOT is not set
537# CONFIG_CS89x0 is not set
538# CONFIG_NET_POCKET is not set
290 539
291# 540#
292# Ethernet (1000 Mbit) 541# Ethernet (1000 Mbit)
@@ -299,6 +548,7 @@ CONFIG_SMC91X=y
299# 548#
300# Token Ring devices 549# Token Ring devices
301# 550#
551# CONFIG_TR is not set
302 552
303# 553#
304# Wireless LAN (non-hamradio) 554# Wireless LAN (non-hamradio)
@@ -306,14 +556,10 @@ CONFIG_SMC91X=y
306# CONFIG_NET_RADIO is not set 556# CONFIG_NET_RADIO is not set
307 557
308# 558#
309# PCMCIA network device support
310#
311# CONFIG_NET_PCMCIA is not set
312
313#
314# Wan interfaces 559# Wan interfaces
315# 560#
316# CONFIG_WAN is not set 561# CONFIG_WAN is not set
562# CONFIG_PLIP is not set
317# CONFIG_PPP is not set 563# CONFIG_PPP is not set
318# CONFIG_SLIP is not set 564# CONFIG_SLIP is not set
319# CONFIG_SHAPER is not set 565# CONFIG_SHAPER is not set
@@ -334,35 +580,83 @@ CONFIG_SMC91X=y
334# 580#
335# Input device support 581# Input device support
336# 582#
337# CONFIG_INPUT is not set 583CONFIG_INPUT=y
584# CONFIG_INPUT_FF_MEMLESS is not set
585
586#
587# Userland interfaces
588#
589CONFIG_INPUT_MOUSEDEV=y
590CONFIG_INPUT_MOUSEDEV_PSAUX=y
591CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
592CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
593# CONFIG_INPUT_JOYDEV is not set
594# CONFIG_INPUT_TSDEV is not set
595# CONFIG_INPUT_EVDEV is not set
596# CONFIG_INPUT_EVBUG is not set
597
598#
599# Input Device Drivers
600#
601CONFIG_INPUT_KEYBOARD=y
602CONFIG_KEYBOARD_ATKBD=y
603# CONFIG_KEYBOARD_SUNKBD is not set
604# CONFIG_KEYBOARD_LKKBD is not set
605# CONFIG_KEYBOARD_XTKBD is not set
606# CONFIG_KEYBOARD_NEWTON is not set
607# CONFIG_KEYBOARD_STOWAWAY is not set
608CONFIG_INPUT_MOUSE=y
609CONFIG_MOUSE_PS2=y
610# CONFIG_MOUSE_SERIAL is not set
611# CONFIG_MOUSE_INPORT is not set
612# CONFIG_MOUSE_LOGIBM is not set
613# CONFIG_MOUSE_PC110PAD is not set
614# CONFIG_MOUSE_VSXXXAA is not set
615# CONFIG_INPUT_JOYSTICK is not set
616# CONFIG_INPUT_TOUCHSCREEN is not set
617# CONFIG_INPUT_MISC is not set
338 618
339# 619#
340# Hardware I/O ports 620# Hardware I/O ports
341# 621#
342# CONFIG_SERIO is not set 622CONFIG_SERIO=y
623CONFIG_SERIO_I8042=y
624CONFIG_SERIO_SERPORT=y
625# CONFIG_SERIO_PARKBD is not set
626CONFIG_SERIO_LIBPS2=y
627# CONFIG_SERIO_RAW is not set
343# CONFIG_GAMEPORT is not set 628# CONFIG_GAMEPORT is not set
344 629
345# 630#
346# Character devices 631# Character devices
347# 632#
348# CONFIG_VT is not set 633CONFIG_VT=y
634CONFIG_VT_CONSOLE=y
635CONFIG_HW_CONSOLE=y
636# CONFIG_VT_HW_CONSOLE_BINDING is not set
349# CONFIG_SERIAL_NONSTANDARD is not set 637# CONFIG_SERIAL_NONSTANDARD is not set
350 638
351# 639#
352# Serial drivers 640# Serial drivers
353# 641#
354# CONFIG_SERIAL_8250 is not set 642CONFIG_SERIAL_8250=m
643CONFIG_SERIAL_8250_PNP=m
644CONFIG_SERIAL_8250_NR_UARTS=4
645CONFIG_SERIAL_8250_RUNTIME_UARTS=4
646# CONFIG_SERIAL_8250_EXTENDED is not set
355 647
356# 648#
357# Non-8250 serial port support 649# Non-8250 serial port support
358# 650#
359CONFIG_SERIAL_CORE=y 651CONFIG_SERIAL_CORE=y
360CONFIG_SERIAL_CORE_CONSOLE=y
361CONFIG_SERIAL_M32R_SIO=y 652CONFIG_SERIAL_M32R_SIO=y
362CONFIG_SERIAL_M32R_SIO_CONSOLE=y 653# CONFIG_SERIAL_M32R_SIO_CONSOLE is not set
363CONFIG_UNIX98_PTYS=y 654CONFIG_UNIX98_PTYS=y
364CONFIG_LEGACY_PTYS=y 655CONFIG_LEGACY_PTYS=y
365CONFIG_LEGACY_PTY_COUNT=256 656CONFIG_LEGACY_PTY_COUNT=256
657# CONFIG_PRINTER is not set
658# CONFIG_PPDEV is not set
659# CONFIG_TIPAR is not set
366 660
367# 661#
368# IPMI 662# IPMI
@@ -372,13 +666,8 @@ CONFIG_LEGACY_PTY_COUNT=256
372# 666#
373# Watchdog Cards 667# Watchdog Cards
374# 668#
375CONFIG_WATCHDOG=y 669# CONFIG_WATCHDOG is not set
376# CONFIG_WATCHDOG_NOWAYOUT is not set 670# CONFIG_HW_RANDOM is not set
377
378#
379# Watchdog Device Drivers
380#
381CONFIG_SOFT_WATCHDOG=y
382# CONFIG_RTC is not set 671# CONFIG_RTC is not set
383# CONFIG_DTLK is not set 672# CONFIG_DTLK is not set
384# CONFIG_R3964 is not set 673# CONFIG_R3964 is not set
@@ -386,21 +675,57 @@ CONFIG_SOFT_WATCHDOG=y
386# 675#
387# Ftape, the floppy tape device driver 676# Ftape, the floppy tape device driver
388# 677#
389
390#
391# PCMCIA character devices
392#
393# CONFIG_SYNCLINK_CS is not set
394# CONFIG_RAW_DRIVER is not set 678# CONFIG_RAW_DRIVER is not set
395 679
396# 680#
397# TPM devices 681# TPM devices
398# 682#
683# CONFIG_TCG_TPM is not set
399 684
400# 685#
401# I2C support 686# I2C support
402# 687#
403# CONFIG_I2C is not set 688CONFIG_I2C=m
689CONFIG_I2C_CHARDEV=m
690
691#
692# I2C Algorithms
693#
694CONFIG_I2C_ALGOBIT=m
695CONFIG_I2C_ALGOPCF=m
696# CONFIG_I2C_ALGOPCA is not set
697
698#
699# I2C Hardware Bus support
700#
701CONFIG_I2C_ELEKTOR=m
702CONFIG_I2C_ISA=m
703# CONFIG_I2C_OCORES is not set
704# CONFIG_I2C_PARPORT is not set
705# CONFIG_I2C_PARPORT_LIGHT is not set
706# CONFIG_I2C_STUB is not set
707# CONFIG_I2C_PCA_ISA is not set
708
709#
710# Miscellaneous I2C Chip support
711#
712# CONFIG_SENSORS_DS1337 is not set
713# CONFIG_SENSORS_DS1374 is not set
714# CONFIG_SENSORS_EEPROM is not set
715# CONFIG_SENSORS_PCF8574 is not set
716# CONFIG_SENSORS_PCA9539 is not set
717# CONFIG_SENSORS_PCF8591 is not set
718# CONFIG_SENSORS_MAX6875 is not set
719# CONFIG_I2C_DEBUG_CORE is not set
720# CONFIG_I2C_DEBUG_ALGO is not set
721# CONFIG_I2C_DEBUG_BUS is not set
722# CONFIG_I2C_DEBUG_CHIP is not set
723
724#
725# SPI support
726#
727# CONFIG_SPI is not set
728# CONFIG_SPI_MASTER is not set
404 729
405# 730#
406# Dallas's 1-wire bus 731# Dallas's 1-wire bus
@@ -410,21 +735,89 @@ CONFIG_SOFT_WATCHDOG=y
410# 735#
411# Hardware Monitoring support 736# Hardware Monitoring support
412# 737#
413# CONFIG_HWMON is not set 738CONFIG_HWMON=y
414# CONFIG_HWMON_VID is not set 739CONFIG_HWMON_VID=m
740# CONFIG_SENSORS_ABITUGURU is not set
741CONFIG_SENSORS_ADM1021=m
742CONFIG_SENSORS_ADM1025=m
743# CONFIG_SENSORS_ADM1026 is not set
744CONFIG_SENSORS_ADM1031=m
745# CONFIG_SENSORS_ADM9240 is not set
746CONFIG_SENSORS_ASB100=m
747# CONFIG_SENSORS_ATXP1 is not set
748CONFIG_SENSORS_DS1621=m
749# CONFIG_SENSORS_F71805F is not set
750CONFIG_SENSORS_FSCHER=m
751# CONFIG_SENSORS_FSCPOS is not set
752CONFIG_SENSORS_GL518SM=m
753# CONFIG_SENSORS_GL520SM is not set
754CONFIG_SENSORS_IT87=m
755# CONFIG_SENSORS_LM63 is not set
756CONFIG_SENSORS_LM75=m
757CONFIG_SENSORS_LM77=m
758CONFIG_SENSORS_LM78=m
759CONFIG_SENSORS_LM80=m
760CONFIG_SENSORS_LM83=m
761CONFIG_SENSORS_LM85=m
762# CONFIG_SENSORS_LM87 is not set
763CONFIG_SENSORS_LM90=m
764# CONFIG_SENSORS_LM92 is not set
765CONFIG_SENSORS_MAX1619=m
766# CONFIG_SENSORS_PC87360 is not set
767CONFIG_SENSORS_SMSC47M1=m
768# CONFIG_SENSORS_SMSC47M192 is not set
769# CONFIG_SENSORS_SMSC47B397 is not set
770# CONFIG_SENSORS_VT1211 is not set
771CONFIG_SENSORS_W83781D=m
772# CONFIG_SENSORS_W83791D is not set
773# CONFIG_SENSORS_W83792D is not set
774CONFIG_SENSORS_W83L785TS=m
775CONFIG_SENSORS_W83627HF=m
776# CONFIG_SENSORS_W83627EHF is not set
777# CONFIG_HWMON_DEBUG_CHIP is not set
415 778
416# 779#
417# Misc devices 780# Multimedia devices
418# 781#
782CONFIG_VIDEO_DEV=m
783CONFIG_VIDEO_V4L1=y
784CONFIG_VIDEO_V4L1_COMPAT=y
785CONFIG_VIDEO_V4L2=y
419 786
420# 787#
421# Multimedia Capabilities Port drivers 788# Video Capture Adapters
422# 789#
423 790
424# 791#
425# Multimedia devices 792# Video Capture Adapters
426# 793#
427# CONFIG_VIDEO_DEV is not set 794# CONFIG_VIDEO_ADV_DEBUG is not set
795CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
796# CONFIG_VIDEO_VIVI is not set
797# CONFIG_VIDEO_PMS is not set
798CONFIG_VIDEO_BWQCAM=m
799CONFIG_VIDEO_CQCAM=m
800# CONFIG_VIDEO_W9966 is not set
801# CONFIG_VIDEO_CPIA is not set
802# CONFIG_VIDEO_SAA5246A is not set
803# CONFIG_VIDEO_SAA5249 is not set
804# CONFIG_TUNER_3036 is not set
805# CONFIG_VIDEO_M32R_AR is not set
806
807#
808# Radio Adapters
809#
810# CONFIG_RADIO_CADET is not set
811# CONFIG_RADIO_RTRACK is not set
812# CONFIG_RADIO_RTRACK2 is not set
813# CONFIG_RADIO_AZTECH is not set
814# CONFIG_RADIO_GEMTEK is not set
815# CONFIG_RADIO_SF16FMI is not set
816# CONFIG_RADIO_SF16FMR2 is not set
817# CONFIG_RADIO_TERRATEC is not set
818# CONFIG_RADIO_TRUST is not set
819# CONFIG_RADIO_TYPHOON is not set
820# CONFIG_RADIO_ZOLTRIX is not set
428 821
429# 822#
430# Digital Video Broadcasting Devices 823# Digital Video Broadcasting Devices
@@ -434,9 +827,19 @@ CONFIG_SOFT_WATCHDOG=y
434# 827#
435# Graphics support 828# Graphics support
436# 829#
830CONFIG_FIRMWARE_EDID=y
437# CONFIG_FB is not set 831# CONFIG_FB is not set
438 832
439# 833#
834# Console display driver support
835#
836CONFIG_VGA_CONSOLE=y
837# CONFIG_VGACON_SOFT_SCROLLBACK is not set
838# CONFIG_MDA_CONSOLE is not set
839CONFIG_DUMMY_CONSOLE=y
840# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
841
842#
440# Sound 843# Sound
441# 844#
442# CONFIG_SOUND is not set 845# CONFIG_SOUND is not set
@@ -446,6 +849,11 @@ CONFIG_SOFT_WATCHDOG=y
446# 849#
447# CONFIG_USB_ARCH_HAS_HCD is not set 850# CONFIG_USB_ARCH_HAS_HCD is not set
448# CONFIG_USB_ARCH_HAS_OHCI is not set 851# CONFIG_USB_ARCH_HAS_OHCI is not set
852# CONFIG_USB_ARCH_HAS_EHCI is not set
853
854#
855# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
856#
449 857
450# 858#
451# USB Gadget Support 859# USB Gadget Support
@@ -458,33 +866,69 @@ CONFIG_SOFT_WATCHDOG=y
458# CONFIG_MMC is not set 866# CONFIG_MMC is not set
459 867
460# 868#
869# LED devices
870#
871# CONFIG_NEW_LEDS is not set
872
873#
874# LED drivers
875#
876
877#
878# LED Triggers
879#
880
881#
461# InfiniBand support 882# InfiniBand support
462# 883#
463 884
464# 885#
465# SN Devices 886# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
887#
888
889#
890# Real Time Clock
891#
892# CONFIG_RTC_CLASS is not set
893
894#
895# DMA Engine support
896#
897# CONFIG_DMA_ENGINE is not set
898
899#
900# DMA Clients
901#
902
903#
904# DMA Devices
466# 905#
467 906
468# 907#
469# File systems 908# File systems
470# 909#
471CONFIG_EXT2_FS=y 910CONFIG_EXT2_FS=y
472# CONFIG_EXT2_FS_XATTR is not set 911CONFIG_EXT2_FS_XATTR=y
473# CONFIG_EXT2_FS_XIP is not set 912CONFIG_EXT2_FS_POSIX_ACL=y
913CONFIG_EXT2_FS_SECURITY=y
474CONFIG_EXT3_FS=y 914CONFIG_EXT3_FS=y
475CONFIG_EXT3_FS_XATTR=y 915CONFIG_EXT3_FS_XATTR=y
476CONFIG_EXT3_FS_POSIX_ACL=y 916CONFIG_EXT3_FS_POSIX_ACL=y
477# CONFIG_EXT3_FS_SECURITY is not set 917CONFIG_EXT3_FS_SECURITY=y
918# CONFIG_EXT4DEV_FS is not set
478CONFIG_JBD=y 919CONFIG_JBD=y
479# CONFIG_JBD_DEBUG is not set 920CONFIG_JBD_DEBUG=y
480CONFIG_FS_MBCACHE=y 921CONFIG_FS_MBCACHE=y
481# CONFIG_REISERFS_FS is not set 922# CONFIG_REISERFS_FS is not set
482# CONFIG_JFS_FS is not set 923# CONFIG_JFS_FS is not set
483CONFIG_FS_POSIX_ACL=y 924CONFIG_FS_POSIX_ACL=y
484# CONFIG_XFS_FS is not set 925# CONFIG_XFS_FS is not set
926# CONFIG_GFS2_FS is not set
927# CONFIG_OCFS2_FS is not set
485# CONFIG_MINIX_FS is not set 928# CONFIG_MINIX_FS is not set
486# CONFIG_ROMFS_FS is not set 929CONFIG_ROMFS_FS=y
487# CONFIG_INOTIFY is not set 930CONFIG_INOTIFY=y
931CONFIG_INOTIFY_USER=y
488# CONFIG_QUOTA is not set 932# CONFIG_QUOTA is not set
489CONFIG_DNOTIFY=y 933CONFIG_DNOTIFY=y
490# CONFIG_AUTOFS_FS is not set 934# CONFIG_AUTOFS_FS is not set
@@ -494,8 +938,11 @@ CONFIG_DNOTIFY=y
494# 938#
495# CD-ROM/DVD Filesystems 939# CD-ROM/DVD Filesystems
496# 940#
497# CONFIG_ISO9660_FS is not set 941CONFIG_ISO9660_FS=y
498# CONFIG_UDF_FS is not set 942CONFIG_JOLIET=y
943# CONFIG_ZISOFS is not set
944CONFIG_UDF_FS=m
945CONFIG_UDF_NLS=y
499 946
500# 947#
501# DOS/FAT/NT Filesystems 948# DOS/FAT/NT Filesystems
@@ -503,7 +950,7 @@ CONFIG_DNOTIFY=y
503CONFIG_FAT_FS=y 950CONFIG_FAT_FS=y
504CONFIG_MSDOS_FS=y 951CONFIG_MSDOS_FS=y
505CONFIG_VFAT_FS=y 952CONFIG_VFAT_FS=y
506CONFIG_FAT_DEFAULT_CODEPAGE=932 953CONFIG_FAT_DEFAULT_CODEPAGE=437
507CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 954CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
508# CONFIG_NTFS_FS is not set 955# CONFIG_NTFS_FS is not set
509 956
@@ -511,11 +958,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
511# Pseudo filesystems 958# Pseudo filesystems
512# 959#
513CONFIG_PROC_FS=y 960CONFIG_PROC_FS=y
961CONFIG_PROC_SYSCTL=y
514CONFIG_SYSFS=y 962CONFIG_SYSFS=y
515CONFIG_TMPFS=y 963CONFIG_TMPFS=y
964# CONFIG_TMPFS_POSIX_ACL is not set
516# CONFIG_HUGETLB_PAGE is not set 965# CONFIG_HUGETLB_PAGE is not set
517CONFIG_RAMFS=y 966CONFIG_RAMFS=y
518# CONFIG_RELAYFS_FS is not set 967CONFIG_CONFIGFS_FS=m
519 968
520# 969#
521# Miscellaneous filesystems 970# Miscellaneous filesystems
@@ -527,7 +976,7 @@ CONFIG_RAMFS=y
527# CONFIG_BEFS_FS is not set 976# CONFIG_BEFS_FS is not set
528# CONFIG_BFS_FS is not set 977# CONFIG_BFS_FS is not set
529# CONFIG_EFS_FS is not set 978# CONFIG_EFS_FS is not set
530CONFIG_CRAMFS=y 979# CONFIG_CRAMFS is not set
531# CONFIG_VXFS_FS is not set 980# CONFIG_VXFS_FS is not set
532# CONFIG_HPFS_FS is not set 981# CONFIG_HPFS_FS is not set
533# CONFIG_QNX4FS_FS is not set 982# CONFIG_QNX4FS_FS is not set
@@ -542,10 +991,14 @@ CONFIG_NFS_V3=y
542# CONFIG_NFS_V3_ACL is not set 991# CONFIG_NFS_V3_ACL is not set
543# CONFIG_NFS_V4 is not set 992# CONFIG_NFS_V4 is not set
544# CONFIG_NFS_DIRECTIO is not set 993# CONFIG_NFS_DIRECTIO is not set
545# CONFIG_NFSD is not set 994CONFIG_NFSD=m
546CONFIG_ROOT_NFS=y 995CONFIG_NFSD_V3=y
996# CONFIG_NFSD_V3_ACL is not set
997# CONFIG_NFSD_V4 is not set
998# CONFIG_NFSD_TCP is not set
547CONFIG_LOCKD=y 999CONFIG_LOCKD=y
548CONFIG_LOCKD_V4=y 1000CONFIG_LOCKD_V4=y
1001CONFIG_EXPORTFS=m
549CONFIG_NFS_COMMON=y 1002CONFIG_NFS_COMMON=y
550CONFIG_SUNRPC=y 1003CONFIG_SUNRPC=y
551# CONFIG_RPCSEC_GSS_KRB5 is not set 1004# CONFIG_RPCSEC_GSS_KRB5 is not set
@@ -567,7 +1020,7 @@ CONFIG_MSDOS_PARTITION=y
567# Native Language Support 1020# Native Language Support
568# 1021#
569CONFIG_NLS=y 1022CONFIG_NLS=y
570CONFIG_NLS_DEFAULT="iso8859-1" 1023CONFIG_NLS_DEFAULT="cp437"
571CONFIG_NLS_CODEPAGE_437=y 1024CONFIG_NLS_CODEPAGE_437=y
572# CONFIG_NLS_CODEPAGE_737 is not set 1025# CONFIG_NLS_CODEPAGE_737 is not set
573# CONFIG_NLS_CODEPAGE_775 is not set 1026# CONFIG_NLS_CODEPAGE_775 is not set
@@ -592,7 +1045,7 @@ CONFIG_NLS_CODEPAGE_932=y
592# CONFIG_NLS_CODEPAGE_1250 is not set 1045# CONFIG_NLS_CODEPAGE_1250 is not set
593# CONFIG_NLS_CODEPAGE_1251 is not set 1046# CONFIG_NLS_CODEPAGE_1251 is not set
594# CONFIG_NLS_ASCII is not set 1047# CONFIG_NLS_ASCII is not set
595# CONFIG_NLS_ISO8859_1 is not set 1048CONFIG_NLS_ISO8859_1=y
596# CONFIG_NLS_ISO8859_2 is not set 1049# CONFIG_NLS_ISO8859_2 is not set
597# CONFIG_NLS_ISO8859_3 is not set 1050# CONFIG_NLS_ISO8859_3 is not set
598# CONFIG_NLS_ISO8859_4 is not set 1051# CONFIG_NLS_ISO8859_4 is not set
@@ -605,32 +1058,28 @@ CONFIG_NLS_CODEPAGE_932=y
605# CONFIG_NLS_ISO8859_15 is not set 1058# CONFIG_NLS_ISO8859_15 is not set
606# CONFIG_NLS_KOI8_R is not set 1059# CONFIG_NLS_KOI8_R is not set
607# CONFIG_NLS_KOI8_U is not set 1060# CONFIG_NLS_KOI8_U is not set
608CONFIG_NLS_UTF8=y 1061# CONFIG_NLS_UTF8 is not set
609 1062
610# 1063#
611# Profiling support 1064# Profiling support
612# 1065#
613# CONFIG_PROFILING is not set 1066CONFIG_PROFILING=y
1067CONFIG_OPROFILE=m
614 1068
615# 1069#
616# Kernel hacking 1070# Kernel hacking
617# 1071#
618# CONFIG_PRINTK_TIME is not set 1072# CONFIG_PRINTK_TIME is not set
619CONFIG_DEBUG_KERNEL=y 1073CONFIG_ENABLE_MUST_CHECK=y
620CONFIG_MAGIC_SYSRQ=y 1074# CONFIG_MAGIC_SYSRQ is not set
1075# CONFIG_UNUSED_SYMBOLS is not set
1076# CONFIG_DEBUG_KERNEL is not set
621CONFIG_LOG_BUF_SHIFT=14 1077CONFIG_LOG_BUF_SHIFT=14
622CONFIG_DETECT_SOFTLOCKUP=y 1078CONFIG_DEBUG_BUGVERBOSE=y
623# CONFIG_SCHEDSTATS is not set
624# CONFIG_DEBUG_SLAB is not set
625# CONFIG_DEBUG_SPINLOCK is not set
626# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
627# CONFIG_DEBUG_KOBJECT is not set
628# CONFIG_DEBUG_BUGVERBOSE is not set
629CONFIG_DEBUG_INFO=y
630# CONFIG_DEBUG_FS is not set 1079# CONFIG_DEBUG_FS is not set
631# CONFIG_FRAME_POINTER is not set 1080# CONFIG_FRAME_POINTER is not set
632# CONFIG_DEBUG_STACKOVERFLOW is not set 1081# CONFIG_UNWIND_INFO is not set
633# CONFIG_DEBUG_STACK_USAGE is not set 1082# CONFIG_HEADERS_CHECK is not set
634 1083
635# 1084#
636# Security options 1085# Security options
@@ -641,7 +1090,38 @@ CONFIG_DEBUG_INFO=y
641# 1090#
642# Cryptographic options 1091# Cryptographic options
643# 1092#
644# CONFIG_CRYPTO is not set 1093CONFIG_CRYPTO=y
1094CONFIG_CRYPTO_ALGAPI=y
1095CONFIG_CRYPTO_BLKCIPHER=m
1096CONFIG_CRYPTO_HASH=y
1097CONFIG_CRYPTO_MANAGER=y
1098CONFIG_CRYPTO_HMAC=y
1099CONFIG_CRYPTO_NULL=m
1100CONFIG_CRYPTO_MD4=m
1101CONFIG_CRYPTO_MD5=m
1102CONFIG_CRYPTO_SHA1=m
1103CONFIG_CRYPTO_SHA256=m
1104CONFIG_CRYPTO_SHA512=m
1105CONFIG_CRYPTO_WP512=m
1106# CONFIG_CRYPTO_TGR192 is not set
1107CONFIG_CRYPTO_ECB=m
1108CONFIG_CRYPTO_CBC=m
1109CONFIG_CRYPTO_DES=m
1110CONFIG_CRYPTO_BLOWFISH=m
1111CONFIG_CRYPTO_TWOFISH=m
1112CONFIG_CRYPTO_TWOFISH_COMMON=m
1113CONFIG_CRYPTO_SERPENT=m
1114CONFIG_CRYPTO_AES=m
1115# CONFIG_CRYPTO_CAST5 is not set
1116# CONFIG_CRYPTO_CAST6 is not set
1117# CONFIG_CRYPTO_TEA is not set
1118# CONFIG_CRYPTO_ARC4 is not set
1119# CONFIG_CRYPTO_KHAZAD is not set
1120# CONFIG_CRYPTO_ANUBIS is not set
1121# CONFIG_CRYPTO_DEFLATE is not set
1122# CONFIG_CRYPTO_MICHAEL_MIC is not set
1123CONFIG_CRYPTO_CRC32C=m
1124# CONFIG_CRYPTO_TEST is not set
645 1125
646# 1126#
647# Hardware crypto devices 1127# Hardware crypto devices
@@ -650,8 +1130,12 @@ CONFIG_DEBUG_INFO=y
650# 1130#
651# Library routines 1131# Library routines
652# 1132#
653# CONFIG_CRC_CCITT is not set 1133CONFIG_CRC_CCITT=m
654# CONFIG_CRC16 is not set 1134CONFIG_CRC16=m
655CONFIG_CRC32=y 1135CONFIG_CRC32=y
656CONFIG_LIBCRC32C=y 1136CONFIG_LIBCRC32C=m
657CONFIG_ZLIB_INFLATE=y 1137CONFIG_TEXTSEARCH=y
1138CONFIG_TEXTSEARCH_KMP=m
1139CONFIG_TEXTSEARCH_BM=m
1140CONFIG_TEXTSEARCH_FSM=m
1141CONFIG_PLIST=y
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp
index 3e607d90b5f4..13579917afef 100644
--- a/arch/m32r/m32700ut/defconfig.m32700ut.smp
+++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:20:58 2005 4# Tue Dec 12 17:52:38 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_LOCK_KERNEL=y 16CONFIG_LOCK_KERNEL=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 17CONFIG_INIT_ENV_ARG_LIMIT=32
19 18
@@ -21,33 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 20# General setup
22# 21#
23CONFIG_LOCALVERSION="" 22CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 24CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
27CONFIG_BSD_PROCESS_ACCT=y 28CONFIG_BSD_PROCESS_ACCT=y
28# CONFIG_BSD_PROCESS_ACCT_V3 is not set 29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
29CONFIG_SYSCTL=y 30# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set
30# CONFIG_AUDIT is not set 32# CONFIG_AUDIT is not set
31CONFIG_HOTPLUG=y
32CONFIG_KOBJECT_UEVENT=y
33CONFIG_IKCONFIG=y 33CONFIG_IKCONFIG=y
34# CONFIG_IKCONFIG_PROC is not set 34CONFIG_IKCONFIG_PROC=y
35# CONFIG_CPUSETS is not set 35# CONFIG_CPUSETS is not set
36CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y
36CONFIG_EMBEDDED=y 41CONFIG_EMBEDDED=y
42CONFIG_SYSCTL_SYSCALL=y
37# CONFIG_KALLSYMS is not set 43# CONFIG_KALLSYMS is not set
44CONFIG_HOTPLUG=y
38CONFIG_PRINTK=y 45CONFIG_PRINTK=y
39CONFIG_BUG=y 46CONFIG_BUG=y
47CONFIG_ELF_CORE=y
40CONFIG_BASE_FULL=y 48CONFIG_BASE_FULL=y
41# CONFIG_FUTEX is not set 49# CONFIG_FUTEX is not set
42# CONFIG_EPOLL is not set 50# CONFIG_EPOLL is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SHMEM=y 51CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0 52CONFIG_SLAB=y
46CONFIG_CC_ALIGN_LABELS=0 53CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0 55CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -55,13 +61,31 @@ CONFIG_BASE_SMALL=0
55CONFIG_MODULES=y 61CONFIG_MODULES=y
56CONFIG_MODULE_UNLOAD=y 62CONFIG_MODULE_UNLOAD=y
57# CONFIG_MODULE_FORCE_UNLOAD is not set 63# CONFIG_MODULE_FORCE_UNLOAD is not set
58CONFIG_OBSOLETE_MODPARM=y
59# CONFIG_MODVERSIONS is not set 64# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set 65# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y 66CONFIG_KMOD=y
62CONFIG_STOP_MACHINE=y 67CONFIG_STOP_MACHINE=y
63 68
64# 69#
70# Block layer
71#
72CONFIG_BLOCK=y
73# CONFIG_BLK_DEV_IO_TRACE is not set
74
75#
76# IO Schedulers
77#
78CONFIG_IOSCHED_NOOP=y
79# CONFIG_IOSCHED_AS is not set
80CONFIG_IOSCHED_DEADLINE=y
81CONFIG_IOSCHED_CFQ=y
82# CONFIG_DEFAULT_AS is not set
83# CONFIG_DEFAULT_DEADLINE is not set
84CONFIG_DEFAULT_CFQ=y
85# CONFIG_DEFAULT_NOOP is not set
86CONFIG_DEFAULT_IOSCHED="cfq"
87
88#
65# Processor type and features 89# Processor type and features
66# 90#
67# CONFIG_PLAT_MAPPI is not set 91# CONFIG_PLAT_MAPPI is not set
@@ -71,8 +95,10 @@ CONFIG_PLAT_M32700UT=y
71# CONFIG_PLAT_OAKS32R is not set 95# CONFIG_PLAT_OAKS32R is not set
72# CONFIG_PLAT_MAPPI2 is not set 96# CONFIG_PLAT_MAPPI2 is not set
73# CONFIG_PLAT_MAPPI3 is not set 97# CONFIG_PLAT_MAPPI3 is not set
98# CONFIG_PLAT_M32104UT is not set
74CONFIG_CHIP_M32700=y 99CONFIG_CHIP_M32700=y
75# CONFIG_CHIP_M32102 is not set 100# CONFIG_CHIP_M32102 is not set
101# CONFIG_CHIP_M32104 is not set
76# CONFIG_CHIP_VDEC2 is not set 102# CONFIG_CHIP_VDEC2 is not set
77# CONFIG_CHIP_OPSP is not set 103# CONFIG_CHIP_OPSP is not set
78CONFIG_MMU=y 104CONFIG_MMU=y
@@ -86,37 +112,39 @@ CONFIG_TIMER_DIVIDE=128
86CONFIG_MEMORY_START=0x08000000 112CONFIG_MEMORY_START=0x08000000
87CONFIG_MEMORY_SIZE=0x01000000 113CONFIG_MEMORY_SIZE=0x01000000
88CONFIG_NOHIGHMEM=y 114CONFIG_NOHIGHMEM=y
89# CONFIG_DISCONTIGMEM is not set 115CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
116CONFIG_SELECT_MEMORY_MODEL=y
117# CONFIG_FLATMEM_MANUAL is not set
118CONFIG_DISCONTIGMEM_MANUAL=y
119# CONFIG_SPARSEMEM_MANUAL is not set
120CONFIG_DISCONTIGMEM=y
121CONFIG_FLAT_NODE_MEM_MAP=y
122CONFIG_NEED_MULTIPLE_NODES=y
123# CONFIG_SPARSEMEM_STATIC is not set
124CONFIG_SPLIT_PTLOCK_CPUS=4
125# CONFIG_RESOURCES_64BIT is not set
126CONFIG_IRAM_START=0x00f00000
127CONFIG_IRAM_SIZE=0x00080000
90CONFIG_RWSEM_GENERIC_SPINLOCK=y 128CONFIG_RWSEM_GENERIC_SPINLOCK=y
91# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 129# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
130CONFIG_GENERIC_FIND_NEXT_BIT=y
131CONFIG_GENERIC_HWEIGHT=y
92CONFIG_GENERIC_CALIBRATE_DELAY=y 132CONFIG_GENERIC_CALIBRATE_DELAY=y
93CONFIG_PREEMPT=y 133CONFIG_PREEMPT=y
94# CONFIG_HAVE_DEC_LOCK is not set
95CONFIG_SMP=y 134CONFIG_SMP=y
96CONFIG_CHIP_M32700_TS1=y 135# CONFIG_CHIP_M32700_TS1 is not set
97CONFIG_NR_CPUS=2 136CONFIG_NR_CPUS=2
98# CONFIG_NUMA is not set 137CONFIG_NODES_SHIFT=1
99 138
100# 139#
101# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 140# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
102# 141#
103# CONFIG_PCI is not set
104# CONFIG_ISA is not set 142# CONFIG_ISA is not set
105 143
106# 144#
107# PCCARD (PCMCIA/CardBus) support 145# PCCARD (PCMCIA/CardBus) support
108# 146#
109CONFIG_PCCARD=y 147# CONFIG_PCCARD is not set
110# CONFIG_PCMCIA_DEBUG is not set
111CONFIG_PCMCIA=y
112
113#
114# PC-card bridges
115#
116# CONFIG_TCIC is not set
117# CONFIG_M32R_PCC is not set
118CONFIG_M32R_CFC=y
119CONFIG_M32R_CFC_NUM=1
120 148
121# 149#
122# PCI Hotplug Support 150# PCI Hotplug Support
@@ -129,6 +157,94 @@ CONFIG_BINFMT_ELF=y
129# CONFIG_BINFMT_MISC is not set 157# CONFIG_BINFMT_MISC is not set
130 158
131# 159#
160# Networking
161#
162CONFIG_NET=y
163
164#
165# Networking options
166#
167# CONFIG_NETDEBUG is not set
168CONFIG_PACKET=y
169# CONFIG_PACKET_MMAP is not set
170CONFIG_UNIX=y
171CONFIG_XFRM=y
172# CONFIG_XFRM_USER is not set
173# CONFIG_XFRM_SUB_POLICY is not set
174# CONFIG_NET_KEY is not set
175CONFIG_INET=y
176# CONFIG_IP_MULTICAST is not set
177# CONFIG_IP_ADVANCED_ROUTER is not set
178CONFIG_IP_FIB_HASH=y
179CONFIG_IP_PNP=y
180CONFIG_IP_PNP_DHCP=y
181# CONFIG_IP_PNP_BOOTP is not set
182# CONFIG_IP_PNP_RARP is not set
183# CONFIG_NET_IPIP is not set
184# CONFIG_NET_IPGRE is not set
185# CONFIG_ARPD is not set
186# CONFIG_SYN_COOKIES is not set
187# CONFIG_INET_AH is not set
188# CONFIG_INET_ESP is not set
189# CONFIG_INET_IPCOMP is not set
190# CONFIG_INET_XFRM_TUNNEL is not set
191# CONFIG_INET_TUNNEL is not set
192CONFIG_INET_XFRM_MODE_TRANSPORT=y
193CONFIG_INET_XFRM_MODE_TUNNEL=y
194CONFIG_INET_XFRM_MODE_BEET=y
195CONFIG_INET_DIAG=y
196CONFIG_INET_TCP_DIAG=y
197# CONFIG_TCP_CONG_ADVANCED is not set
198CONFIG_TCP_CONG_CUBIC=y
199CONFIG_DEFAULT_TCP_CONG="cubic"
200# CONFIG_TCP_MD5SIG is not set
201# CONFIG_IPV6 is not set
202# CONFIG_INET6_XFRM_TUNNEL is not set
203# CONFIG_INET6_TUNNEL is not set
204# CONFIG_NETWORK_SECMARK is not set
205# CONFIG_NETFILTER is not set
206
207#
208# DCCP Configuration (EXPERIMENTAL)
209#
210# CONFIG_IP_DCCP is not set
211
212#
213# SCTP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_SCTP is not set
216
217#
218# TIPC Configuration (EXPERIMENTAL)
219#
220# CONFIG_TIPC is not set
221# CONFIG_ATM is not set
222# CONFIG_BRIDGE is not set
223# CONFIG_VLAN_8021Q is not set
224# CONFIG_DECNET is not set
225# CONFIG_LLC2 is not set
226# CONFIG_IPX is not set
227# CONFIG_ATALK is not set
228# CONFIG_X25 is not set
229# CONFIG_LAPB is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232
233#
234# QoS and/or fair queueing
235#
236# CONFIG_NET_SCHED is not set
237
238#
239# Network testing
240#
241# CONFIG_NET_PKTGEN is not set
242# CONFIG_HAMRADIO is not set
243# CONFIG_IRDA is not set
244# CONFIG_BT is not set
245# CONFIG_IEEE80211 is not set
246
247#
132# Device Drivers 248# Device Drivers
133# 249#
134 250
@@ -137,12 +253,100 @@ CONFIG_BINFMT_ELF=y
137# 253#
138CONFIG_STANDALONE=y 254CONFIG_STANDALONE=y
139CONFIG_PREVENT_FIRMWARE_BUILD=y 255CONFIG_PREVENT_FIRMWARE_BUILD=y
140# CONFIG_FW_LOADER is not set 256CONFIG_FW_LOADER=y
257# CONFIG_SYS_HYPERVISOR is not set
258
259#
260# Connector - unified userspace <-> kernelspace linker
261#
262# CONFIG_CONNECTOR is not set
141 263
142# 264#
143# Memory Technology Devices (MTD) 265# Memory Technology Devices (MTD)
144# 266#
145# CONFIG_MTD is not set 267CONFIG_MTD=y
268# CONFIG_MTD_DEBUG is not set
269# CONFIG_MTD_CONCAT is not set
270CONFIG_MTD_PARTITIONS=y
271CONFIG_MTD_REDBOOT_PARTS=y
272CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
273# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
274# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
275# CONFIG_MTD_CMDLINE_PARTS is not set
276
277#
278# User Modules And Translation Layers
279#
280# CONFIG_MTD_CHAR is not set
281CONFIG_MTD_BLOCK=y
282# CONFIG_FTL is not set
283# CONFIG_NFTL is not set
284# CONFIG_INFTL is not set
285# CONFIG_RFD_FTL is not set
286# CONFIG_SSFDC is not set
287
288#
289# RAM/ROM/Flash chip drivers
290#
291CONFIG_MTD_CFI=m
292CONFIG_MTD_JEDECPROBE=m
293CONFIG_MTD_GEN_PROBE=m
294CONFIG_MTD_CFI_ADV_OPTIONS=y
295# CONFIG_MTD_CFI_NOSWAP is not set
296CONFIG_MTD_CFI_BE_BYTE_SWAP=y
297# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
298CONFIG_MTD_CFI_GEOMETRY=y
299CONFIG_MTD_MAP_BANK_WIDTH_1=y
300CONFIG_MTD_MAP_BANK_WIDTH_2=y
301CONFIG_MTD_MAP_BANK_WIDTH_4=y
302# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
303# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
304# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
305CONFIG_MTD_CFI_I1=y
306# CONFIG_MTD_CFI_I2 is not set
307# CONFIG_MTD_CFI_I4 is not set
308# CONFIG_MTD_CFI_I8 is not set
309# CONFIG_MTD_OTP is not set
310# CONFIG_MTD_CFI_INTELEXT is not set
311CONFIG_MTD_CFI_AMDSTD=m
312# CONFIG_MTD_CFI_STAA is not set
313CONFIG_MTD_CFI_UTIL=m
314# CONFIG_MTD_RAM is not set
315# CONFIG_MTD_ROM is not set
316# CONFIG_MTD_ABSENT is not set
317# CONFIG_MTD_OBSOLETE_CHIPS is not set
318
319#
320# Mapping drivers for chip access
321#
322# CONFIG_MTD_COMPLEX_MAPPINGS is not set
323# CONFIG_MTD_PHYSMAP is not set
324# CONFIG_MTD_PLATRAM is not set
325
326#
327# Self-contained MTD device drivers
328#
329# CONFIG_MTD_SLRAM is not set
330# CONFIG_MTD_PHRAM is not set
331# CONFIG_MTD_MTDRAM is not set
332# CONFIG_MTD_BLOCK2MTD is not set
333
334#
335# Disk-On-Chip Device Drivers
336#
337# CONFIG_MTD_DOC2000 is not set
338# CONFIG_MTD_DOC2001 is not set
339# CONFIG_MTD_DOC2001PLUS is not set
340
341#
342# NAND Flash Device Drivers
343#
344# CONFIG_MTD_NAND is not set
345
346#
347# OneNAND Flash Device Drivers
348#
349# CONFIG_MTD_ONENAND is not set
146 350
147# 351#
148# Parallel port support 352# Parallel port support
@@ -156,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
156# 360#
157# Block devices 361# Block devices
158# 362#
159# CONFIG_BLK_DEV_FD is not set
160# CONFIG_BLK_DEV_COW_COMMON is not set 363# CONFIG_BLK_DEV_COW_COMMON is not set
161CONFIG_BLK_DEV_LOOP=y 364CONFIG_BLK_DEV_LOOP=y
162# CONFIG_BLK_DEV_CRYPTOLOOP is not set 365# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -164,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y
164CONFIG_BLK_DEV_RAM=y 367CONFIG_BLK_DEV_RAM=y
165CONFIG_BLK_DEV_RAM_COUNT=16 368CONFIG_BLK_DEV_RAM_COUNT=16
166CONFIG_BLK_DEV_RAM_SIZE=4096 369CONFIG_BLK_DEV_RAM_SIZE=4096
370CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
167# CONFIG_BLK_DEV_INITRD is not set 371# CONFIG_BLK_DEV_INITRD is not set
168CONFIG_INITRAMFS_SOURCE=""
169# CONFIG_CDROM_PKTCDVD is not set 372# CONFIG_CDROM_PKTCDVD is not set
373CONFIG_ATA_OVER_ETH=m
170 374
171# 375#
172# IO Schedulers 376# Misc devices
173# 377#
174CONFIG_IOSCHED_NOOP=y 378# CONFIG_TIFM_CORE is not set
175# CONFIG_IOSCHED_AS is not set
176CONFIG_IOSCHED_DEADLINE=y
177CONFIG_IOSCHED_CFQ=y
178# CONFIG_ATA_OVER_ETH is not set
179 379
180# 380#
181# ATA/ATAPI/MFM/RLL support 381# ATA/ATAPI/MFM/RLL support
182# 382#
183CONFIG_IDE=y 383CONFIG_IDE=y
384CONFIG_IDE_MAX_HWIFS=4
184CONFIG_BLK_DEV_IDE=y 385CONFIG_BLK_DEV_IDE=y
185 386
186# 387#
@@ -189,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y
189# CONFIG_BLK_DEV_IDE_SATA is not set 390# CONFIG_BLK_DEV_IDE_SATA is not set
190CONFIG_BLK_DEV_IDEDISK=y 391CONFIG_BLK_DEV_IDEDISK=y
191# CONFIG_IDEDISK_MULTI_MODE is not set 392# CONFIG_IDEDISK_MULTI_MODE is not set
192CONFIG_BLK_DEV_IDECS=y
193CONFIG_BLK_DEV_IDECD=m 393CONFIG_BLK_DEV_IDECD=m
194# CONFIG_BLK_DEV_IDETAPE is not set 394# CONFIG_BLK_DEV_IDETAPE is not set
195# CONFIG_BLK_DEV_IDEFLOPPY is not set 395# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -208,7 +408,9 @@ CONFIG_IDE_GENERIC=y
208# 408#
209# SCSI device support 409# SCSI device support
210# 410#
411# CONFIG_RAID_ATTRS is not set
211CONFIG_SCSI=m 412CONFIG_SCSI=m
413# CONFIG_SCSI_NETLINK is not set
212CONFIG_SCSI_PROC_FS=y 414CONFIG_SCSI_PROC_FS=y
213 415
214# 416#
@@ -220,6 +422,7 @@ CONFIG_BLK_DEV_SD=m
220CONFIG_BLK_DEV_SR=m 422CONFIG_BLK_DEV_SR=m
221# CONFIG_BLK_DEV_SR_VENDOR is not set 423# CONFIG_BLK_DEV_SR_VENDOR is not set
222CONFIG_CHR_DEV_SG=m 424CONFIG_CHR_DEV_SG=m
425# CONFIG_CHR_DEV_SCH is not set
223 426
224# 427#
225# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 428# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -229,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y
229# CONFIG_SCSI_LOGGING is not set 432# CONFIG_SCSI_LOGGING is not set
230 433
231# 434#
232# SCSI Transport Attributes 435# SCSI Transports
233# 436#
234# CONFIG_SCSI_SPI_ATTRS is not set 437# CONFIG_SCSI_SPI_ATTRS is not set
235# CONFIG_SCSI_FC_ATTRS is not set 438# CONFIG_SCSI_FC_ATTRS is not set
236# CONFIG_SCSI_ISCSI_ATTRS is not set 439# CONFIG_SCSI_ISCSI_ATTRS is not set
440# CONFIG_SCSI_SAS_ATTRS is not set
441# CONFIG_SCSI_SAS_LIBSAS is not set
237 442
238# 443#
239# SCSI low-level drivers 444# SCSI low-level drivers
240# 445#
241# CONFIG_SCSI_SATA is not set 446# CONFIG_ISCSI_TCP is not set
242# CONFIG_SCSI_DEBUG is not set 447# CONFIG_SCSI_DEBUG is not set
243 448
244# 449#
245# PCMCIA SCSI adapter support 450# Serial ATA (prod) and Parallel ATA (experimental) drivers
246# 451#
247# CONFIG_PCMCIA_AHA152X is not set
248# CONFIG_PCMCIA_FDOMAIN is not set
249# CONFIG_PCMCIA_NINJA_SCSI is not set
250# CONFIG_PCMCIA_QLOGIC is not set
251# CONFIG_PCMCIA_SYM53C500 is not set
252 452
253# 453#
254# Multi-device support (RAID and LVM) 454# Multi-device support (RAID and LVM)
@@ -258,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y
258# 458#
259# Fusion MPT device support 459# Fusion MPT device support
260# 460#
461# CONFIG_FUSION is not set
261 462
262# 463#
263# IEEE 1394 (FireWire) support 464# IEEE 1394 (FireWire) support
@@ -268,69 +469,8 @@ CONFIG_SCSI_MULTI_LUN=y
268# 469#
269 470
270# 471#
271# Networking support 472# Network device support
272#
273CONFIG_NET=y
274
275#
276# Networking options
277#
278CONFIG_PACKET=y
279# CONFIG_PACKET_MMAP is not set
280CONFIG_UNIX=y
281# CONFIG_NET_KEY is not set
282CONFIG_INET=y
283# CONFIG_IP_MULTICAST is not set
284# CONFIG_IP_ADVANCED_ROUTER is not set
285CONFIG_IP_PNP=y
286CONFIG_IP_PNP_DHCP=y
287# CONFIG_IP_PNP_BOOTP is not set
288# CONFIG_IP_PNP_RARP is not set
289# CONFIG_NET_IPIP is not set
290# CONFIG_NET_IPGRE is not set
291# CONFIG_ARPD is not set
292# CONFIG_SYN_COOKIES is not set
293# CONFIG_INET_AH is not set
294# CONFIG_INET_ESP is not set
295# CONFIG_INET_IPCOMP is not set
296# CONFIG_INET_TUNNEL is not set
297CONFIG_IP_TCPDIAG=y
298# CONFIG_IP_TCPDIAG_IPV6 is not set
299# CONFIG_IPV6 is not set
300# CONFIG_NETFILTER is not set
301
302#
303# SCTP Configuration (EXPERIMENTAL)
304#
305# CONFIG_IP_SCTP 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_NET_DIVERT is not set
316# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set
318
319#
320# QoS and/or fair queueing
321#
322# CONFIG_NET_SCHED is not set
323# CONFIG_NET_CLS_ROUTE is not set
324
325#
326# Network testing
327# 473#
328# CONFIG_NET_PKTGEN is not set
329# CONFIG_NETPOLL is not set
330# CONFIG_NET_POLL_CONTROLLER is not set
331# CONFIG_HAMRADIO is not set
332# CONFIG_IRDA is not set
333# CONFIG_BT is not set
334CONFIG_NETDEVICES=y 474CONFIG_NETDEVICES=y
335# CONFIG_DUMMY is not set 475# CONFIG_DUMMY is not set
336# CONFIG_BONDING is not set 476# CONFIG_BONDING is not set
@@ -338,6 +478,11 @@ CONFIG_NETDEVICES=y
338# CONFIG_TUN is not set 478# CONFIG_TUN is not set
339 479
340# 480#
481# PHY device support
482#
483# CONFIG_PHYLIB is not set
484
485#
341# Ethernet (10 or 100Mbit) 486# Ethernet (10 or 100Mbit)
342# 487#
343CONFIG_NET_ETHERNET=y 488CONFIG_NET_ETHERNET=y
@@ -363,11 +508,6 @@ CONFIG_SMC91X=y
363# CONFIG_NET_RADIO is not set 508# CONFIG_NET_RADIO is not set
364 509
365# 510#
366# PCMCIA network device support
367#
368# CONFIG_NET_PCMCIA is not set
369
370#
371# Wan interfaces 511# Wan interfaces
372# 512#
373# CONFIG_WAN is not set 513# CONFIG_WAN is not set
@@ -375,6 +515,8 @@ CONFIG_SMC91X=y
375# CONFIG_SLIP is not set 515# CONFIG_SLIP is not set
376# CONFIG_SHAPER is not set 516# CONFIG_SHAPER is not set
377# CONFIG_NETCONSOLE is not set 517# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set
378 520
379# 521#
380# ISDN subsystem 522# ISDN subsystem
@@ -390,6 +532,7 @@ CONFIG_SMC91X=y
390# Input device support 532# Input device support
391# 533#
392CONFIG_INPUT=y 534CONFIG_INPUT=y
535# CONFIG_INPUT_FF_MEMLESS is not set
393 536
394# 537#
395# Userland interfaces 538# Userland interfaces
@@ -418,7 +561,6 @@ CONFIG_SERIO_SERPORT=y
418# CONFIG_SERIO_LIBPS2 is not set 561# CONFIG_SERIO_LIBPS2 is not set
419# CONFIG_SERIO_RAW is not set 562# CONFIG_SERIO_RAW is not set
420# CONFIG_GAMEPORT is not set 563# CONFIG_GAMEPORT is not set
421CONFIG_SOUND_GAMEPORT=y
422 564
423# 565#
424# Character devices 566# Character devices
@@ -426,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y
426CONFIG_VT=y 568CONFIG_VT=y
427CONFIG_VT_CONSOLE=y 569CONFIG_VT_CONSOLE=y
428CONFIG_HW_CONSOLE=y 570CONFIG_HW_CONSOLE=y
571# CONFIG_VT_HW_CONSOLE_BINDING is not set
429# CONFIG_SERIAL_NONSTANDARD is not set 572# CONFIG_SERIAL_NONSTANDARD is not set
430 573
431# 574#
@@ -454,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256
454# Watchdog Cards 597# Watchdog Cards
455# 598#
456# CONFIG_WATCHDOG is not set 599# CONFIG_WATCHDOG is not set
600CONFIG_HW_RANDOM=y
457# CONFIG_RTC is not set 601# CONFIG_RTC is not set
458# CONFIG_GEN_RTC is not set
459CONFIG_DS1302=y 602CONFIG_DS1302=y
460# CONFIG_DTLK is not set 603# CONFIG_DTLK is not set
461# CONFIG_R3964 is not set 604# CONFIG_R3964 is not set
@@ -463,17 +606,12 @@ CONFIG_DS1302=y
463# 606#
464# Ftape, the floppy tape device driver 607# Ftape, the floppy tape device driver
465# 608#
466# CONFIG_DRM is not set
467
468#
469# PCMCIA character devices
470#
471# CONFIG_SYNCLINK_CS is not set
472# CONFIG_RAW_DRIVER is not set 609# CONFIG_RAW_DRIVER is not set
473 610
474# 611#
475# TPM devices 612# TPM devices
476# 613#
614# CONFIG_TCG_TPM is not set
477 615
478# 616#
479# I2C support 617# I2C support
@@ -481,34 +619,51 @@ CONFIG_DS1302=y
481# CONFIG_I2C is not set 619# CONFIG_I2C is not set
482 620
483# 621#
622# SPI support
623#
624# CONFIG_SPI is not set
625# CONFIG_SPI_MASTER is not set
626
627#
484# Dallas's 1-wire bus 628# Dallas's 1-wire bus
485# 629#
486# CONFIG_W1 is not set 630# CONFIG_W1 is not set
487 631
488# 632#
489# Misc devices 633# Hardware Monitoring support
490# 634#
635CONFIG_HWMON=y
636# CONFIG_HWMON_VID is not set
637# CONFIG_SENSORS_ABITUGURU is not set
638# CONFIG_SENSORS_F71805F is not set
639# CONFIG_SENSORS_VT1211 is not set
640# CONFIG_HWMON_DEBUG_CHIP is not set
491 641
492# 642#
493# Multimedia devices 643# Multimedia devices
494# 644#
495CONFIG_VIDEO_DEV=y 645CONFIG_VIDEO_DEV=m
646CONFIG_VIDEO_V4L1=y
647CONFIG_VIDEO_V4L1_COMPAT=y
648CONFIG_VIDEO_V4L2=y
496 649
497# 650#
498# Video For Linux 651# Video Capture Adapters
499# 652#
500 653
501# 654#
502# Video Adapters 655# Video Capture Adapters
503# 656#
657# CONFIG_VIDEO_ADV_DEBUG is not set
658CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
659# CONFIG_VIDEO_VIVI is not set
504# CONFIG_VIDEO_CPIA is not set 660# CONFIG_VIDEO_CPIA is not set
505CONFIG_VIDEO_M32R_AR=y 661CONFIG_VIDEO_M32R_AR=m
506CONFIG_VIDEO_M32R_AR_M64278=y 662CONFIG_VIDEO_M32R_AR_M64278=m
507 663
508# 664#
509# Radio Adapters 665# Radio Adapters
510# 666#
511# CONFIG_RADIO_MAESTRO is not set
512 667
513# 668#
514# Digital Video Broadcasting Devices 669# Digital Video Broadcasting Devices
@@ -518,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
518# 673#
519# Graphics support 674# Graphics support
520# 675#
676CONFIG_FIRMWARE_EDID=y
521CONFIG_FB=y 677CONFIG_FB=y
522# CONFIG_FB_CFB_FILLRECT is not set 678CONFIG_FB_CFB_FILLRECT=y
523# CONFIG_FB_CFB_COPYAREA is not set 679CONFIG_FB_CFB_COPYAREA=y
524# CONFIG_FB_CFB_IMAGEBLIT is not set 680CONFIG_FB_CFB_IMAGEBLIT=y
525# CONFIG_FB_SOFT_CURSOR is not set
526# CONFIG_FB_MACMODES is not set 681# CONFIG_FB_MACMODES is not set
682# CONFIG_FB_BACKLIGHT is not set
527# CONFIG_FB_MODE_HELPERS is not set 683# CONFIG_FB_MODE_HELPERS is not set
528# CONFIG_FB_TILEBLITTING is not set 684# CONFIG_FB_TILEBLITTING is not set
529# CONFIG_FB_S1D13XXX is not set 685CONFIG_FB_S1D13XXX=y
530# CONFIG_FB_VIRTUAL is not set 686# CONFIG_FB_VIRTUAL is not set
531 687
532# 688#
@@ -535,6 +691,7 @@ CONFIG_FB=y
535# CONFIG_VGA_CONSOLE is not set 691# CONFIG_VGA_CONSOLE is not set
536CONFIG_DUMMY_CONSOLE=y 692CONFIG_DUMMY_CONSOLE=y
537CONFIG_FRAMEBUFFER_CONSOLE=y 693CONFIG_FRAMEBUFFER_CONSOLE=y
694# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
538# CONFIG_FONTS is not set 695# CONFIG_FONTS is not set
539CONFIG_FONT_8x8=y 696CONFIG_FONT_8x8=y
540CONFIG_FONT_8x16=y 697CONFIG_FONT_8x16=y
@@ -546,6 +703,7 @@ CONFIG_LOGO=y
546CONFIG_LOGO_LINUX_MONO=y 703CONFIG_LOGO_LINUX_MONO=y
547CONFIG_LOGO_LINUX_VGA16=y 704CONFIG_LOGO_LINUX_VGA16=y
548CONFIG_LOGO_LINUX_CLUT224=y 705CONFIG_LOGO_LINUX_CLUT224=y
706CONFIG_LOGO_M32R_CLUT224=y
549# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 707# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
550 708
551# 709#
@@ -558,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
558# 716#
559# CONFIG_USB_ARCH_HAS_HCD is not set 717# CONFIG_USB_ARCH_HAS_HCD is not set
560# CONFIG_USB_ARCH_HAS_OHCI is not set 718# CONFIG_USB_ARCH_HAS_OHCI is not set
719# CONFIG_USB_ARCH_HAS_EHCI is not set
720
721#
722# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
723#
561 724
562# 725#
563# USB Gadget Support 726# USB Gadget Support
@@ -567,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
567# 730#
568# MMC/SD Card support 731# MMC/SD Card support
569# 732#
570# CONFIG_MMC is not set 733CONFIG_MMC=y
734CONFIG_MMC_DEBUG=y
735CONFIG_MMC_BLOCK=y
736# CONFIG_MMC_TIFM_SD is not set
737
738#
739# LED devices
740#
741# CONFIG_NEW_LEDS is not set
742
743#
744# LED drivers
745#
746
747#
748# LED Triggers
749#
571 750
572# 751#
573# InfiniBand support 752# InfiniBand support
574# 753#
575# CONFIG_INFINIBAND is not set 754
755#
756# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
757#
758
759#
760# Real Time Clock
761#
762# CONFIG_RTC_CLASS is not set
763
764#
765# DMA Engine support
766#
767# CONFIG_DMA_ENGINE is not set
768
769#
770# DMA Clients
771#
772
773#
774# DMA Devices
775#
576 776
577# 777#
578# File systems 778# File systems
579# 779#
580CONFIG_EXT2_FS=y 780CONFIG_EXT2_FS=y
581# CONFIG_EXT2_FS_XATTR is not set 781# CONFIG_EXT2_FS_XATTR is not set
582CONFIG_EXT3_FS=m 782# CONFIG_EXT2_FS_XIP is not set
783CONFIG_EXT3_FS=y
583CONFIG_EXT3_FS_XATTR=y 784CONFIG_EXT3_FS_XATTR=y
584# CONFIG_EXT3_FS_POSIX_ACL is not set 785# CONFIG_EXT3_FS_POSIX_ACL is not set
585# CONFIG_EXT3_FS_SECURITY is not set 786# CONFIG_EXT3_FS_SECURITY is not set
586CONFIG_JBD=m 787# CONFIG_EXT4DEV_FS is not set
788CONFIG_JBD=y
587CONFIG_JBD_DEBUG=y 789CONFIG_JBD_DEBUG=y
588CONFIG_FS_MBCACHE=y 790CONFIG_FS_MBCACHE=y
589CONFIG_REISERFS_FS=m 791CONFIG_REISERFS_FS=m
@@ -591,17 +793,19 @@ CONFIG_REISERFS_FS=m
591# CONFIG_REISERFS_PROC_INFO is not set 793# CONFIG_REISERFS_PROC_INFO is not set
592# CONFIG_REISERFS_FS_XATTR is not set 794# CONFIG_REISERFS_FS_XATTR is not set
593# CONFIG_JFS_FS is not set 795# CONFIG_JFS_FS is not set
594 796# CONFIG_FS_POSIX_ACL is not set
595#
596# XFS support
597#
598# CONFIG_XFS_FS is not set 797# CONFIG_XFS_FS is not set
798# CONFIG_GFS2_FS is not set
799# CONFIG_OCFS2_FS is not set
599# CONFIG_MINIX_FS is not set 800# CONFIG_MINIX_FS is not set
600# CONFIG_ROMFS_FS is not set 801# CONFIG_ROMFS_FS is not set
802CONFIG_INOTIFY=y
803CONFIG_INOTIFY_USER=y
601# CONFIG_QUOTA is not set 804# CONFIG_QUOTA is not set
602CONFIG_DNOTIFY=y 805CONFIG_DNOTIFY=y
603# CONFIG_AUTOFS_FS is not set 806# CONFIG_AUTOFS_FS is not set
604# CONFIG_AUTOFS4_FS is not set 807# CONFIG_AUTOFS4_FS is not set
808# CONFIG_FUSE_FS is not set
605 809
606# 810#
607# CD-ROM/DVD Filesystems 811# CD-ROM/DVD Filesystems
@@ -627,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
627# 831#
628CONFIG_PROC_FS=y 832CONFIG_PROC_FS=y
629CONFIG_PROC_KCORE=y 833CONFIG_PROC_KCORE=y
834CONFIG_PROC_SYSCTL=y
630CONFIG_SYSFS=y 835CONFIG_SYSFS=y
631CONFIG_DEVFS_FS=y
632CONFIG_DEVFS_MOUNT=y
633# CONFIG_DEVFS_DEBUG is not set
634# CONFIG_DEVPTS_FS_XATTR is not set
635CONFIG_TMPFS=y 836CONFIG_TMPFS=y
636# CONFIG_TMPFS_XATTR is not set 837# CONFIG_TMPFS_POSIX_ACL is not set
637# CONFIG_HUGETLB_PAGE is not set 838# CONFIG_HUGETLB_PAGE is not set
638CONFIG_RAMFS=y 839CONFIG_RAMFS=y
840# CONFIG_CONFIGFS_FS is not set
639 841
640# 842#
641# Miscellaneous filesystems 843# Miscellaneous filesystems
@@ -647,6 +849,8 @@ CONFIG_RAMFS=y
647# CONFIG_BEFS_FS is not set 849# CONFIG_BEFS_FS is not set
648# CONFIG_BFS_FS is not set 850# CONFIG_BFS_FS is not set
649# CONFIG_EFS_FS is not set 851# CONFIG_EFS_FS is not set
852# CONFIG_JFFS_FS is not set
853# CONFIG_JFFS2_FS is not set
650# CONFIG_CRAMFS is not set 854# CONFIG_CRAMFS is not set
651# CONFIG_VXFS_FS is not set 855# CONFIG_VXFS_FS is not set
652# CONFIG_HPFS_FS is not set 856# CONFIG_HPFS_FS is not set
@@ -659,12 +863,14 @@ CONFIG_RAMFS=y
659# 863#
660CONFIG_NFS_FS=y 864CONFIG_NFS_FS=y
661CONFIG_NFS_V3=y 865CONFIG_NFS_V3=y
866# CONFIG_NFS_V3_ACL is not set
662# CONFIG_NFS_V4 is not set 867# CONFIG_NFS_V4 is not set
663# CONFIG_NFS_DIRECTIO is not set 868# CONFIG_NFS_DIRECTIO is not set
664# CONFIG_NFSD is not set 869# CONFIG_NFSD is not set
665CONFIG_ROOT_NFS=y 870CONFIG_ROOT_NFS=y
666CONFIG_LOCKD=y 871CONFIG_LOCKD=y
667CONFIG_LOCKD_V4=y 872CONFIG_LOCKD_V4=y
873CONFIG_NFS_COMMON=y
668CONFIG_SUNRPC=y 874CONFIG_SUNRPC=y
669# CONFIG_RPCSEC_GSS_KRB5 is not set 875# CONFIG_RPCSEC_GSS_KRB5 is not set
670# CONFIG_RPCSEC_GSS_SPKM3 is not set 876# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -673,6 +879,7 @@ CONFIG_SUNRPC=y
673# CONFIG_NCP_FS is not set 879# CONFIG_NCP_FS is not set
674# CONFIG_CODA_FS is not set 880# CONFIG_CODA_FS is not set
675# CONFIG_AFS_FS is not set 881# CONFIG_AFS_FS is not set
882# CONFIG_9P_FS is not set
676 883
677# 884#
678# Partition Types 885# Partition Types
@@ -727,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
727# 934#
728# Profiling support 935# Profiling support
729# 936#
730# CONFIG_PROFILING is not set 937CONFIG_PROFILING=y
938CONFIG_OPROFILE=y
731 939
732# 940#
733# Kernel hacking 941# Kernel hacking
734# 942#
735# CONFIG_PRINTK_TIME is not set 943# CONFIG_PRINTK_TIME is not set
944CONFIG_ENABLE_MUST_CHECK=y
945# CONFIG_MAGIC_SYSRQ is not set
946# CONFIG_UNUSED_SYMBOLS is not set
736# CONFIG_DEBUG_KERNEL is not set 947# CONFIG_DEBUG_KERNEL is not set
737CONFIG_LOG_BUF_SHIFT=15 948CONFIG_LOG_BUF_SHIFT=15
738# CONFIG_DEBUG_BUGVERBOSE is not set 949# CONFIG_DEBUG_BUGVERBOSE is not set
950# CONFIG_DEBUG_FS is not set
739# CONFIG_FRAME_POINTER is not set 951# CONFIG_FRAME_POINTER is not set
952# CONFIG_UNWIND_INFO is not set
953# CONFIG_HEADERS_CHECK is not set
740 954
741# 955#
742# Security options 956# Security options
@@ -750,12 +964,9 @@ CONFIG_LOG_BUF_SHIFT=15
750# CONFIG_CRYPTO is not set 964# CONFIG_CRYPTO is not set
751 965
752# 966#
753# Hardware crypto devices
754#
755
756#
757# Library routines 967# Library routines
758# 968#
759# CONFIG_CRC_CCITT is not set 969# CONFIG_CRC_CCITT is not set
970# CONFIG_CRC16 is not set
760CONFIG_CRC32=y 971CONFIG_CRC32=y
761# CONFIG_LIBCRC32C is not set 972# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/m32700ut/defconfig.m32700ut.up
index 2d3e7cda8f46..190f961d33e2 100644
--- a/arch/m32r/m32700ut/defconfig.m32700ut.up
+++ b/arch/m32r/m32700ut/defconfig.m32700ut.up
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:21:34 2005 4# Tue Dec 12 12:07:08 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 17CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# General setup 21# General setup
23# 22#
24CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set
27# CONFIG_POSIX_MQUEUE is not set 28# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 29CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y 31# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 33# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 34CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set 35CONFIG_IKCONFIG_PROC=y
36CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y
36CONFIG_EMBEDDED=y 41CONFIG_EMBEDDED=y
42CONFIG_SYSCTL_SYSCALL=y
37# CONFIG_KALLSYMS is not set 43# CONFIG_KALLSYMS is not set
44CONFIG_HOTPLUG=y
38CONFIG_PRINTK=y 45CONFIG_PRINTK=y
39CONFIG_BUG=y 46CONFIG_BUG=y
47CONFIG_ELF_CORE=y
40CONFIG_BASE_FULL=y 48CONFIG_BASE_FULL=y
41# CONFIG_FUTEX is not set 49# CONFIG_FUTEX is not set
42# CONFIG_EPOLL is not set 50# CONFIG_EPOLL is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SHMEM=y 51CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0 52CONFIG_SLAB=y
46CONFIG_CC_ALIGN_LABELS=0 53CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0 55CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -55,12 +61,30 @@ CONFIG_BASE_SMALL=0
55CONFIG_MODULES=y 61CONFIG_MODULES=y
56CONFIG_MODULE_UNLOAD=y 62CONFIG_MODULE_UNLOAD=y
57# CONFIG_MODULE_FORCE_UNLOAD is not set 63# CONFIG_MODULE_FORCE_UNLOAD is not set
58CONFIG_OBSOLETE_MODPARM=y
59# CONFIG_MODVERSIONS is not set 64# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set 65# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y 66CONFIG_KMOD=y
62 67
63# 68#
69# Block layer
70#
71CONFIG_BLOCK=y
72# CONFIG_BLK_DEV_IO_TRACE is not set
73
74#
75# IO Schedulers
76#
77CONFIG_IOSCHED_NOOP=y
78# CONFIG_IOSCHED_AS is not set
79CONFIG_IOSCHED_DEADLINE=y
80CONFIG_IOSCHED_CFQ=y
81# CONFIG_DEFAULT_AS is not set
82# CONFIG_DEFAULT_DEADLINE is not set
83CONFIG_DEFAULT_CFQ=y
84# CONFIG_DEFAULT_NOOP is not set
85CONFIG_DEFAULT_IOSCHED="cfq"
86
87#
64# Processor type and features 88# Processor type and features
65# 89#
66# CONFIG_PLAT_MAPPI is not set 90# CONFIG_PLAT_MAPPI is not set
@@ -70,8 +94,10 @@ CONFIG_PLAT_M32700UT=y
70# CONFIG_PLAT_OAKS32R is not set 94# CONFIG_PLAT_OAKS32R is not set
71# CONFIG_PLAT_MAPPI2 is not set 95# CONFIG_PLAT_MAPPI2 is not set
72# CONFIG_PLAT_MAPPI3 is not set 96# CONFIG_PLAT_MAPPI3 is not set
97# CONFIG_PLAT_M32104UT is not set
73CONFIG_CHIP_M32700=y 98CONFIG_CHIP_M32700=y
74# CONFIG_CHIP_M32102 is not set 99# CONFIG_CHIP_M32102 is not set
100# CONFIG_CHIP_M32104 is not set
75# CONFIG_CHIP_VDEC2 is not set 101# CONFIG_CHIP_VDEC2 is not set
76# CONFIG_CHIP_OPSP is not set 102# CONFIG_CHIP_OPSP is not set
77CONFIG_MMU=y 103CONFIG_MMU=y
@@ -85,34 +111,37 @@ CONFIG_TIMER_DIVIDE=128
85CONFIG_MEMORY_START=0x08000000 111CONFIG_MEMORY_START=0x08000000
86CONFIG_MEMORY_SIZE=0x01000000 112CONFIG_MEMORY_SIZE=0x01000000
87CONFIG_NOHIGHMEM=y 113CONFIG_NOHIGHMEM=y
88# CONFIG_DISCONTIGMEM is not set 114CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
115CONFIG_SELECT_MEMORY_MODEL=y
116# CONFIG_FLATMEM_MANUAL is not set
117CONFIG_DISCONTIGMEM_MANUAL=y
118# CONFIG_SPARSEMEM_MANUAL is not set
119CONFIG_DISCONTIGMEM=y
120CONFIG_FLAT_NODE_MEM_MAP=y
121CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set
125CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00080000
89CONFIG_RWSEM_GENERIC_SPINLOCK=y 127CONFIG_RWSEM_GENERIC_SPINLOCK=y
90# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y
91CONFIG_GENERIC_CALIBRATE_DELAY=y 131CONFIG_GENERIC_CALIBRATE_DELAY=y
92CONFIG_PREEMPT=y 132CONFIG_PREEMPT=y
93# CONFIG_HAVE_DEC_LOCK is not set
94# CONFIG_SMP is not set 133# CONFIG_SMP is not set
134CONFIG_NODES_SHIFT=1
95 135
96# 136#
97# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 137# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
98# 138#
99# CONFIG_PCI is not set
100# CONFIG_ISA is not set 139# CONFIG_ISA is not set
101 140
102# 141#
103# PCCARD (PCMCIA/CardBus) support 142# PCCARD (PCMCIA/CardBus) support
104# 143#
105CONFIG_PCCARD=y 144# CONFIG_PCCARD is not set
106# CONFIG_PCMCIA_DEBUG is not set
107CONFIG_PCMCIA=y
108
109#
110# PC-card bridges
111#
112# CONFIG_TCIC is not set
113# CONFIG_M32R_PCC is not set
114CONFIG_M32R_CFC=y
115CONFIG_M32R_CFC_NUM=1
116 145
117# 146#
118# PCI Hotplug Support 147# PCI Hotplug Support
@@ -125,6 +154,94 @@ CONFIG_BINFMT_ELF=y
125# CONFIG_BINFMT_MISC is not set 154# CONFIG_BINFMT_MISC is not set
126 155
127# 156#
157# Networking
158#
159CONFIG_NET=y
160
161#
162# Networking options
163#
164# CONFIG_NETDEBUG is not set
165CONFIG_PACKET=y
166# CONFIG_PACKET_MMAP is not set
167CONFIG_UNIX=y
168CONFIG_XFRM=y
169# CONFIG_XFRM_USER is not set
170# CONFIG_XFRM_SUB_POLICY is not set
171# CONFIG_NET_KEY is not set
172CONFIG_INET=y
173# CONFIG_IP_MULTICAST is not set
174# CONFIG_IP_ADVANCED_ROUTER is not set
175CONFIG_IP_FIB_HASH=y
176CONFIG_IP_PNP=y
177CONFIG_IP_PNP_DHCP=y
178# CONFIG_IP_PNP_BOOTP is not set
179# CONFIG_IP_PNP_RARP is not set
180# CONFIG_NET_IPIP is not set
181# CONFIG_NET_IPGRE is not set
182# CONFIG_ARPD is not set
183# CONFIG_SYN_COOKIES is not set
184# CONFIG_INET_AH is not set
185# CONFIG_INET_ESP is not set
186# CONFIG_INET_IPCOMP is not set
187# CONFIG_INET_XFRM_TUNNEL is not set
188# CONFIG_INET_TUNNEL is not set
189CONFIG_INET_XFRM_MODE_TRANSPORT=y
190CONFIG_INET_XFRM_MODE_TUNNEL=y
191CONFIG_INET_XFRM_MODE_BEET=y
192CONFIG_INET_DIAG=y
193CONFIG_INET_TCP_DIAG=y
194# CONFIG_TCP_CONG_ADVANCED is not set
195CONFIG_TCP_CONG_CUBIC=y
196CONFIG_DEFAULT_TCP_CONG="cubic"
197# CONFIG_TCP_MD5SIG is not set
198# CONFIG_IPV6 is not set
199# CONFIG_INET6_XFRM_TUNNEL is not set
200# CONFIG_INET6_TUNNEL is not set
201# CONFIG_NETWORK_SECMARK is not set
202# CONFIG_NETFILTER is not set
203
204#
205# DCCP Configuration (EXPERIMENTAL)
206#
207# CONFIG_IP_DCCP is not set
208
209#
210# SCTP Configuration (EXPERIMENTAL)
211#
212# CONFIG_IP_SCTP is not set
213
214#
215# TIPC Configuration (EXPERIMENTAL)
216#
217# CONFIG_TIPC is not set
218# CONFIG_ATM is not set
219# CONFIG_BRIDGE is not set
220# CONFIG_VLAN_8021Q is not set
221# CONFIG_DECNET is not set
222# CONFIG_LLC2 is not set
223# CONFIG_IPX is not set
224# CONFIG_ATALK is not set
225# CONFIG_X25 is not set
226# CONFIG_LAPB is not set
227# CONFIG_ECONET is not set
228# CONFIG_WAN_ROUTER is not set
229
230#
231# QoS and/or fair queueing
232#
233# CONFIG_NET_SCHED is not set
234
235#
236# Network testing
237#
238# CONFIG_NET_PKTGEN is not set
239# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set
241# CONFIG_BT is not set
242# CONFIG_IEEE80211 is not set
243
244#
128# Device Drivers 245# Device Drivers
129# 246#
130 247
@@ -133,12 +250,100 @@ CONFIG_BINFMT_ELF=y
133# 250#
134CONFIG_STANDALONE=y 251CONFIG_STANDALONE=y
135CONFIG_PREVENT_FIRMWARE_BUILD=y 252CONFIG_PREVENT_FIRMWARE_BUILD=y
136# CONFIG_FW_LOADER is not set 253CONFIG_FW_LOADER=y
254# CONFIG_SYS_HYPERVISOR is not set
255
256#
257# Connector - unified userspace <-> kernelspace linker
258#
259# CONFIG_CONNECTOR is not set
137 260
138# 261#
139# Memory Technology Devices (MTD) 262# Memory Technology Devices (MTD)
140# 263#
141# CONFIG_MTD is not set 264CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set
266# CONFIG_MTD_CONCAT is not set
267CONFIG_MTD_PARTITIONS=y
268CONFIG_MTD_REDBOOT_PARTS=y
269CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
270# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
271# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
272# CONFIG_MTD_CMDLINE_PARTS is not set
273
274#
275# User Modules And Translation Layers
276#
277# CONFIG_MTD_CHAR is not set
278CONFIG_MTD_BLOCK=y
279# CONFIG_FTL is not set
280# CONFIG_NFTL is not set
281# CONFIG_INFTL is not set
282# CONFIG_RFD_FTL is not set
283# CONFIG_SSFDC is not set
284
285#
286# RAM/ROM/Flash chip drivers
287#
288CONFIG_MTD_CFI=m
289CONFIG_MTD_JEDECPROBE=m
290CONFIG_MTD_GEN_PROBE=m
291CONFIG_MTD_CFI_ADV_OPTIONS=y
292# CONFIG_MTD_CFI_NOSWAP is not set
293CONFIG_MTD_CFI_BE_BYTE_SWAP=y
294# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
295CONFIG_MTD_CFI_GEOMETRY=y
296CONFIG_MTD_MAP_BANK_WIDTH_1=y
297CONFIG_MTD_MAP_BANK_WIDTH_2=y
298CONFIG_MTD_MAP_BANK_WIDTH_4=y
299# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
300# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
301# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
302CONFIG_MTD_CFI_I1=y
303# CONFIG_MTD_CFI_I2 is not set
304# CONFIG_MTD_CFI_I4 is not set
305# CONFIG_MTD_CFI_I8 is not set
306# CONFIG_MTD_OTP is not set
307# CONFIG_MTD_CFI_INTELEXT is not set
308CONFIG_MTD_CFI_AMDSTD=m
309# CONFIG_MTD_CFI_STAA is not set
310CONFIG_MTD_CFI_UTIL=m
311# CONFIG_MTD_RAM is not set
312# CONFIG_MTD_ROM is not set
313# CONFIG_MTD_ABSENT is not set
314# CONFIG_MTD_OBSOLETE_CHIPS is not set
315
316#
317# Mapping drivers for chip access
318#
319# CONFIG_MTD_COMPLEX_MAPPINGS is not set
320# CONFIG_MTD_PHYSMAP is not set
321# CONFIG_MTD_PLATRAM is not set
322
323#
324# Self-contained MTD device drivers
325#
326# CONFIG_MTD_SLRAM is not set
327# CONFIG_MTD_PHRAM is not set
328# CONFIG_MTD_MTDRAM is not set
329# CONFIG_MTD_BLOCK2MTD is not set
330
331#
332# Disk-On-Chip Device Drivers
333#
334# CONFIG_MTD_DOC2000 is not set
335# CONFIG_MTD_DOC2001 is not set
336# CONFIG_MTD_DOC2001PLUS is not set
337
338#
339# NAND Flash Device Drivers
340#
341# CONFIG_MTD_NAND is not set
342
343#
344# OneNAND Flash Device Drivers
345#
346# CONFIG_MTD_ONENAND is not set
142 347
143# 348#
144# Parallel port support 349# Parallel port support
@@ -152,7 +357,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
152# 357#
153# Block devices 358# Block devices
154# 359#
155# CONFIG_BLK_DEV_FD is not set
156# CONFIG_BLK_DEV_COW_COMMON is not set 360# CONFIG_BLK_DEV_COW_COMMON is not set
157CONFIG_BLK_DEV_LOOP=y 361CONFIG_BLK_DEV_LOOP=y
158# CONFIG_BLK_DEV_CRYPTOLOOP is not set 362# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -160,23 +364,21 @@ CONFIG_BLK_DEV_NBD=y
160CONFIG_BLK_DEV_RAM=y 364CONFIG_BLK_DEV_RAM=y
161CONFIG_BLK_DEV_RAM_COUNT=16 365CONFIG_BLK_DEV_RAM_COUNT=16
162CONFIG_BLK_DEV_RAM_SIZE=4096 366CONFIG_BLK_DEV_RAM_SIZE=4096
367CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
163# CONFIG_BLK_DEV_INITRD is not set 368# CONFIG_BLK_DEV_INITRD is not set
164CONFIG_INITRAMFS_SOURCE=""
165# CONFIG_CDROM_PKTCDVD is not set 369# CONFIG_CDROM_PKTCDVD is not set
370CONFIG_ATA_OVER_ETH=m
166 371
167# 372#
168# IO Schedulers 373# Misc devices
169# 374#
170CONFIG_IOSCHED_NOOP=y 375# CONFIG_TIFM_CORE is not set
171# CONFIG_IOSCHED_AS is not set
172CONFIG_IOSCHED_DEADLINE=y
173CONFIG_IOSCHED_CFQ=y
174# CONFIG_ATA_OVER_ETH is not set
175 376
176# 377#
177# ATA/ATAPI/MFM/RLL support 378# ATA/ATAPI/MFM/RLL support
178# 379#
179CONFIG_IDE=y 380CONFIG_IDE=y
381CONFIG_IDE_MAX_HWIFS=4
180CONFIG_BLK_DEV_IDE=y 382CONFIG_BLK_DEV_IDE=y
181 383
182# 384#
@@ -185,7 +387,6 @@ CONFIG_BLK_DEV_IDE=y
185# CONFIG_BLK_DEV_IDE_SATA is not set 387# CONFIG_BLK_DEV_IDE_SATA is not set
186CONFIG_BLK_DEV_IDEDISK=y 388CONFIG_BLK_DEV_IDEDISK=y
187# CONFIG_IDEDISK_MULTI_MODE is not set 389# CONFIG_IDEDISK_MULTI_MODE is not set
188CONFIG_BLK_DEV_IDECS=y
189CONFIG_BLK_DEV_IDECD=m 390CONFIG_BLK_DEV_IDECD=m
190# CONFIG_BLK_DEV_IDETAPE is not set 391# CONFIG_BLK_DEV_IDETAPE is not set
191# CONFIG_BLK_DEV_IDEFLOPPY is not set 392# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -204,7 +405,9 @@ CONFIG_IDE_GENERIC=y
204# 405#
205# SCSI device support 406# SCSI device support
206# 407#
408# CONFIG_RAID_ATTRS is not set
207CONFIG_SCSI=m 409CONFIG_SCSI=m
410# CONFIG_SCSI_NETLINK is not set
208CONFIG_SCSI_PROC_FS=y 411CONFIG_SCSI_PROC_FS=y
209 412
210# 413#
@@ -216,6 +419,7 @@ CONFIG_BLK_DEV_SD=m
216CONFIG_BLK_DEV_SR=m 419CONFIG_BLK_DEV_SR=m
217# CONFIG_BLK_DEV_SR_VENDOR is not set 420# CONFIG_BLK_DEV_SR_VENDOR is not set
218CONFIG_CHR_DEV_SG=m 421CONFIG_CHR_DEV_SG=m
422# CONFIG_CHR_DEV_SCH is not set
219 423
220# 424#
221# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 425# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -225,26 +429,23 @@ CONFIG_SCSI_MULTI_LUN=y
225# CONFIG_SCSI_LOGGING is not set 429# CONFIG_SCSI_LOGGING is not set
226 430
227# 431#
228# SCSI Transport Attributes 432# SCSI Transports
229# 433#
230# CONFIG_SCSI_SPI_ATTRS is not set 434# CONFIG_SCSI_SPI_ATTRS is not set
231# CONFIG_SCSI_FC_ATTRS is not set 435# CONFIG_SCSI_FC_ATTRS is not set
232# CONFIG_SCSI_ISCSI_ATTRS is not set 436# CONFIG_SCSI_ISCSI_ATTRS is not set
437# CONFIG_SCSI_SAS_ATTRS is not set
438# CONFIG_SCSI_SAS_LIBSAS is not set
233 439
234# 440#
235# SCSI low-level drivers 441# SCSI low-level drivers
236# 442#
237# CONFIG_SCSI_SATA is not set 443# CONFIG_ISCSI_TCP is not set
238# CONFIG_SCSI_DEBUG is not set 444# CONFIG_SCSI_DEBUG is not set
239 445
240# 446#
241# PCMCIA SCSI adapter support 447# Serial ATA (prod) and Parallel ATA (experimental) drivers
242# 448#
243# CONFIG_PCMCIA_AHA152X is not set
244# CONFIG_PCMCIA_FDOMAIN is not set
245# CONFIG_PCMCIA_NINJA_SCSI is not set
246# CONFIG_PCMCIA_QLOGIC is not set
247# CONFIG_PCMCIA_SYM53C500 is not set
248 449
249# 450#
250# Multi-device support (RAID and LVM) 451# Multi-device support (RAID and LVM)
@@ -254,6 +455,7 @@ CONFIG_SCSI_MULTI_LUN=y
254# 455#
255# Fusion MPT device support 456# Fusion MPT device support
256# 457#
458# CONFIG_FUSION is not set
257 459
258# 460#
259# IEEE 1394 (FireWire) support 461# IEEE 1394 (FireWire) support
@@ -264,69 +466,8 @@ CONFIG_SCSI_MULTI_LUN=y
264# 466#
265 467
266# 468#
267# Networking support 469# Network device support
268#
269CONFIG_NET=y
270
271#
272# Networking options
273#
274CONFIG_PACKET=y
275# CONFIG_PACKET_MMAP is not set
276CONFIG_UNIX=y
277# CONFIG_NET_KEY is not set
278CONFIG_INET=y
279# CONFIG_IP_MULTICAST is not set
280# CONFIG_IP_ADVANCED_ROUTER is not set
281CONFIG_IP_PNP=y
282CONFIG_IP_PNP_DHCP=y
283# CONFIG_IP_PNP_BOOTP is not set
284# CONFIG_IP_PNP_RARP is not set
285# CONFIG_NET_IPIP is not set
286# CONFIG_NET_IPGRE is not set
287# CONFIG_ARPD is not set
288# CONFIG_SYN_COOKIES is not set
289# CONFIG_INET_AH is not set
290# CONFIG_INET_ESP is not set
291# CONFIG_INET_IPCOMP is not set
292# CONFIG_INET_TUNNEL is not set
293CONFIG_IP_TCPDIAG=y
294# CONFIG_IP_TCPDIAG_IPV6 is not set
295# CONFIG_IPV6 is not set
296# CONFIG_NETFILTER is not set
297
298#
299# SCTP Configuration (EXPERIMENTAL)
300#
301# CONFIG_IP_SCTP 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_NET_DIVERT is not set
312# CONFIG_ECONET is not set
313# CONFIG_WAN_ROUTER is not set
314
315#
316# QoS and/or fair queueing
317#
318# CONFIG_NET_SCHED is not set
319# CONFIG_NET_CLS_ROUTE is not set
320
321#
322# Network testing
323# 470#
324# CONFIG_NET_PKTGEN is not set
325# CONFIG_NETPOLL is not set
326# CONFIG_NET_POLL_CONTROLLER is not set
327# CONFIG_HAMRADIO is not set
328# CONFIG_IRDA is not set
329# CONFIG_BT is not set
330CONFIG_NETDEVICES=y 471CONFIG_NETDEVICES=y
331# CONFIG_DUMMY is not set 472# CONFIG_DUMMY is not set
332# CONFIG_BONDING is not set 473# CONFIG_BONDING is not set
@@ -334,6 +475,11 @@ CONFIG_NETDEVICES=y
334# CONFIG_TUN is not set 475# CONFIG_TUN is not set
335 476
336# 477#
478# PHY device support
479#
480# CONFIG_PHYLIB is not set
481
482#
337# Ethernet (10 or 100Mbit) 483# Ethernet (10 or 100Mbit)
338# 484#
339CONFIG_NET_ETHERNET=y 485CONFIG_NET_ETHERNET=y
@@ -359,11 +505,6 @@ CONFIG_SMC91X=y
359# CONFIG_NET_RADIO is not set 505# CONFIG_NET_RADIO is not set
360 506
361# 507#
362# PCMCIA network device support
363#
364# CONFIG_NET_PCMCIA is not set
365
366#
367# Wan interfaces 508# Wan interfaces
368# 509#
369# CONFIG_WAN is not set 510# CONFIG_WAN is not set
@@ -371,6 +512,8 @@ CONFIG_SMC91X=y
371# CONFIG_SLIP is not set 512# CONFIG_SLIP is not set
372# CONFIG_SHAPER is not set 513# CONFIG_SHAPER is not set
373# CONFIG_NETCONSOLE is not set 514# CONFIG_NETCONSOLE is not set
515# CONFIG_NETPOLL is not set
516# CONFIG_NET_POLL_CONTROLLER is not set
374 517
375# 518#
376# ISDN subsystem 519# ISDN subsystem
@@ -386,6 +529,7 @@ CONFIG_SMC91X=y
386# Input device support 529# Input device support
387# 530#
388CONFIG_INPUT=y 531CONFIG_INPUT=y
532# CONFIG_INPUT_FF_MEMLESS is not set
389 533
390# 534#
391# Userland interfaces 535# Userland interfaces
@@ -414,7 +558,6 @@ CONFIG_SERIO_SERPORT=y
414# CONFIG_SERIO_LIBPS2 is not set 558# CONFIG_SERIO_LIBPS2 is not set
415# CONFIG_SERIO_RAW is not set 559# CONFIG_SERIO_RAW is not set
416# CONFIG_GAMEPORT is not set 560# CONFIG_GAMEPORT is not set
417CONFIG_SOUND_GAMEPORT=y
418 561
419# 562#
420# Character devices 563# Character devices
@@ -422,6 +565,7 @@ CONFIG_SOUND_GAMEPORT=y
422CONFIG_VT=y 565CONFIG_VT=y
423CONFIG_VT_CONSOLE=y 566CONFIG_VT_CONSOLE=y
424CONFIG_HW_CONSOLE=y 567CONFIG_HW_CONSOLE=y
568# CONFIG_VT_HW_CONSOLE_BINDING is not set
425# CONFIG_SERIAL_NONSTANDARD is not set 569# CONFIG_SERIAL_NONSTANDARD is not set
426 570
427# 571#
@@ -450,8 +594,8 @@ CONFIG_LEGACY_PTY_COUNT=256
450# Watchdog Cards 594# Watchdog Cards
451# 595#
452# CONFIG_WATCHDOG is not set 596# CONFIG_WATCHDOG is not set
597CONFIG_HW_RANDOM=y
453# CONFIG_RTC is not set 598# CONFIG_RTC is not set
454# CONFIG_GEN_RTC is not set
455CONFIG_DS1302=y 599CONFIG_DS1302=y
456# CONFIG_DTLK is not set 600# CONFIG_DTLK is not set
457# CONFIG_R3964 is not set 601# CONFIG_R3964 is not set
@@ -459,17 +603,12 @@ CONFIG_DS1302=y
459# 603#
460# Ftape, the floppy tape device driver 604# Ftape, the floppy tape device driver
461# 605#
462# CONFIG_DRM is not set
463
464#
465# PCMCIA character devices
466#
467# CONFIG_SYNCLINK_CS is not set
468# CONFIG_RAW_DRIVER is not set 606# CONFIG_RAW_DRIVER is not set
469 607
470# 608#
471# TPM devices 609# TPM devices
472# 610#
611# CONFIG_TCG_TPM is not set
473 612
474# 613#
475# I2C support 614# I2C support
@@ -477,34 +616,51 @@ CONFIG_DS1302=y
477# CONFIG_I2C is not set 616# CONFIG_I2C is not set
478 617
479# 618#
619# SPI support
620#
621# CONFIG_SPI is not set
622# CONFIG_SPI_MASTER is not set
623
624#
480# Dallas's 1-wire bus 625# Dallas's 1-wire bus
481# 626#
482# CONFIG_W1 is not set 627# CONFIG_W1 is not set
483 628
484# 629#
485# Misc devices 630# Hardware Monitoring support
486# 631#
632CONFIG_HWMON=y
633# CONFIG_HWMON_VID is not set
634# CONFIG_SENSORS_ABITUGURU is not set
635# CONFIG_SENSORS_F71805F is not set
636# CONFIG_SENSORS_VT1211 is not set
637# CONFIG_HWMON_DEBUG_CHIP is not set
487 638
488# 639#
489# Multimedia devices 640# Multimedia devices
490# 641#
491CONFIG_VIDEO_DEV=y 642CONFIG_VIDEO_DEV=m
643CONFIG_VIDEO_V4L1=y
644CONFIG_VIDEO_V4L1_COMPAT=y
645CONFIG_VIDEO_V4L2=y
492 646
493# 647#
494# Video For Linux 648# Video Capture Adapters
495# 649#
496 650
497# 651#
498# Video Adapters 652# Video Capture Adapters
499# 653#
654# CONFIG_VIDEO_ADV_DEBUG is not set
655CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
656# CONFIG_VIDEO_VIVI is not set
500# CONFIG_VIDEO_CPIA is not set 657# CONFIG_VIDEO_CPIA is not set
501CONFIG_VIDEO_M32R_AR=y 658CONFIG_VIDEO_M32R_AR=m
502CONFIG_VIDEO_M32R_AR_M64278=y 659CONFIG_VIDEO_M32R_AR_M64278=m
503 660
504# 661#
505# Radio Adapters 662# Radio Adapters
506# 663#
507# CONFIG_RADIO_MAESTRO is not set
508 664
509# 665#
510# Digital Video Broadcasting Devices 666# Digital Video Broadcasting Devices
@@ -514,15 +670,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
514# 670#
515# Graphics support 671# Graphics support
516# 672#
673CONFIG_FIRMWARE_EDID=y
517CONFIG_FB=y 674CONFIG_FB=y
518# CONFIG_FB_CFB_FILLRECT is not set 675CONFIG_FB_CFB_FILLRECT=y
519# CONFIG_FB_CFB_COPYAREA is not set 676CONFIG_FB_CFB_COPYAREA=y
520# CONFIG_FB_CFB_IMAGEBLIT is not set 677CONFIG_FB_CFB_IMAGEBLIT=y
521# CONFIG_FB_SOFT_CURSOR is not set
522# CONFIG_FB_MACMODES is not set 678# CONFIG_FB_MACMODES is not set
679# CONFIG_FB_BACKLIGHT is not set
523# CONFIG_FB_MODE_HELPERS is not set 680# CONFIG_FB_MODE_HELPERS is not set
524# CONFIG_FB_TILEBLITTING is not set 681# CONFIG_FB_TILEBLITTING is not set
525# CONFIG_FB_S1D13XXX is not set 682CONFIG_FB_S1D13XXX=y
526# CONFIG_FB_VIRTUAL is not set 683# CONFIG_FB_VIRTUAL is not set
527 684
528# 685#
@@ -531,6 +688,7 @@ CONFIG_FB=y
531# CONFIG_VGA_CONSOLE is not set 688# CONFIG_VGA_CONSOLE is not set
532CONFIG_DUMMY_CONSOLE=y 689CONFIG_DUMMY_CONSOLE=y
533CONFIG_FRAMEBUFFER_CONSOLE=y 690CONFIG_FRAMEBUFFER_CONSOLE=y
691# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
534# CONFIG_FONTS is not set 692# CONFIG_FONTS is not set
535CONFIG_FONT_8x8=y 693CONFIG_FONT_8x8=y
536CONFIG_FONT_8x16=y 694CONFIG_FONT_8x16=y
@@ -542,6 +700,7 @@ CONFIG_LOGO=y
542CONFIG_LOGO_LINUX_MONO=y 700CONFIG_LOGO_LINUX_MONO=y
543CONFIG_LOGO_LINUX_VGA16=y 701CONFIG_LOGO_LINUX_VGA16=y
544CONFIG_LOGO_LINUX_CLUT224=y 702CONFIG_LOGO_LINUX_CLUT224=y
703CONFIG_LOGO_M32R_CLUT224=y
545# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
546 705
547# 706#
@@ -554,6 +713,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
554# 713#
555# CONFIG_USB_ARCH_HAS_HCD is not set 714# CONFIG_USB_ARCH_HAS_HCD is not set
556# CONFIG_USB_ARCH_HAS_OHCI is not set 715# CONFIG_USB_ARCH_HAS_OHCI is not set
716# CONFIG_USB_ARCH_HAS_EHCI is not set
717
718#
719# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
720#
557 721
558# 722#
559# USB Gadget Support 723# USB Gadget Support
@@ -563,23 +727,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
563# 727#
564# MMC/SD Card support 728# MMC/SD Card support
565# 729#
566# CONFIG_MMC is not set 730CONFIG_MMC=y
731CONFIG_MMC_DEBUG=y
732CONFIG_MMC_BLOCK=y
733# CONFIG_MMC_TIFM_SD is not set
734
735#
736# LED devices
737#
738# CONFIG_NEW_LEDS is not set
739
740#
741# LED drivers
742#
743
744#
745# LED Triggers
746#
567 747
568# 748#
569# InfiniBand support 749# InfiniBand support
570# 750#
571# CONFIG_INFINIBAND is not set 751
752#
753# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
754#
755
756#
757# Real Time Clock
758#
759# CONFIG_RTC_CLASS is not set
760
761#
762# DMA Engine support
763#
764# CONFIG_DMA_ENGINE is not set
765
766#
767# DMA Clients
768#
769
770#
771# DMA Devices
772#
572 773
573# 774#
574# File systems 775# File systems
575# 776#
576CONFIG_EXT2_FS=y 777CONFIG_EXT2_FS=y
577# CONFIG_EXT2_FS_XATTR is not set 778# CONFIG_EXT2_FS_XATTR is not set
578CONFIG_EXT3_FS=m 779# CONFIG_EXT2_FS_XIP is not set
780CONFIG_EXT3_FS=y
579CONFIG_EXT3_FS_XATTR=y 781CONFIG_EXT3_FS_XATTR=y
580# CONFIG_EXT3_FS_POSIX_ACL is not set 782# CONFIG_EXT3_FS_POSIX_ACL is not set
581# CONFIG_EXT3_FS_SECURITY is not set 783# CONFIG_EXT3_FS_SECURITY is not set
582CONFIG_JBD=m 784# CONFIG_EXT4DEV_FS is not set
785CONFIG_JBD=y
583CONFIG_JBD_DEBUG=y 786CONFIG_JBD_DEBUG=y
584CONFIG_FS_MBCACHE=y 787CONFIG_FS_MBCACHE=y
585CONFIG_REISERFS_FS=m 788CONFIG_REISERFS_FS=m
@@ -587,17 +790,19 @@ CONFIG_REISERFS_FS=m
587# CONFIG_REISERFS_PROC_INFO is not set 790# CONFIG_REISERFS_PROC_INFO is not set
588# CONFIG_REISERFS_FS_XATTR is not set 791# CONFIG_REISERFS_FS_XATTR is not set
589# CONFIG_JFS_FS is not set 792# CONFIG_JFS_FS is not set
590 793# CONFIG_FS_POSIX_ACL is not set
591#
592# XFS support
593#
594# CONFIG_XFS_FS is not set 794# CONFIG_XFS_FS is not set
795# CONFIG_GFS2_FS is not set
796# CONFIG_OCFS2_FS is not set
595# CONFIG_MINIX_FS is not set 797# CONFIG_MINIX_FS is not set
596# CONFIG_ROMFS_FS is not set 798# CONFIG_ROMFS_FS is not set
799CONFIG_INOTIFY=y
800CONFIG_INOTIFY_USER=y
597# CONFIG_QUOTA is not set 801# CONFIG_QUOTA is not set
598CONFIG_DNOTIFY=y 802CONFIG_DNOTIFY=y
599# CONFIG_AUTOFS_FS is not set 803# CONFIG_AUTOFS_FS is not set
600# CONFIG_AUTOFS4_FS is not set 804# CONFIG_AUTOFS4_FS is not set
805# CONFIG_FUSE_FS is not set
601 806
602# 807#
603# CD-ROM/DVD Filesystems 808# CD-ROM/DVD Filesystems
@@ -623,15 +828,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
623# 828#
624CONFIG_PROC_FS=y 829CONFIG_PROC_FS=y
625CONFIG_PROC_KCORE=y 830CONFIG_PROC_KCORE=y
831CONFIG_PROC_SYSCTL=y
626CONFIG_SYSFS=y 832CONFIG_SYSFS=y
627CONFIG_DEVFS_FS=y
628CONFIG_DEVFS_MOUNT=y
629# CONFIG_DEVFS_DEBUG is not set
630# CONFIG_DEVPTS_FS_XATTR is not set
631CONFIG_TMPFS=y 833CONFIG_TMPFS=y
632# CONFIG_TMPFS_XATTR is not set 834# CONFIG_TMPFS_POSIX_ACL is not set
633# CONFIG_HUGETLB_PAGE is not set 835# CONFIG_HUGETLB_PAGE is not set
634CONFIG_RAMFS=y 836CONFIG_RAMFS=y
837# CONFIG_CONFIGFS_FS is not set
635 838
636# 839#
637# Miscellaneous filesystems 840# Miscellaneous filesystems
@@ -643,6 +846,8 @@ CONFIG_RAMFS=y
643# CONFIG_BEFS_FS is not set 846# CONFIG_BEFS_FS is not set
644# CONFIG_BFS_FS is not set 847# CONFIG_BFS_FS is not set
645# CONFIG_EFS_FS is not set 848# CONFIG_EFS_FS is not set
849# CONFIG_JFFS_FS is not set
850# CONFIG_JFFS2_FS is not set
646# CONFIG_CRAMFS is not set 851# CONFIG_CRAMFS is not set
647# CONFIG_VXFS_FS is not set 852# CONFIG_VXFS_FS is not set
648# CONFIG_HPFS_FS is not set 853# CONFIG_HPFS_FS is not set
@@ -655,12 +860,14 @@ CONFIG_RAMFS=y
655# 860#
656CONFIG_NFS_FS=y 861CONFIG_NFS_FS=y
657CONFIG_NFS_V3=y 862CONFIG_NFS_V3=y
863# CONFIG_NFS_V3_ACL is not set
658# CONFIG_NFS_V4 is not set 864# CONFIG_NFS_V4 is not set
659# CONFIG_NFS_DIRECTIO is not set 865# CONFIG_NFS_DIRECTIO is not set
660# CONFIG_NFSD is not set 866# CONFIG_NFSD is not set
661CONFIG_ROOT_NFS=y 867CONFIG_ROOT_NFS=y
662CONFIG_LOCKD=y 868CONFIG_LOCKD=y
663CONFIG_LOCKD_V4=y 869CONFIG_LOCKD_V4=y
870CONFIG_NFS_COMMON=y
664CONFIG_SUNRPC=y 871CONFIG_SUNRPC=y
665# CONFIG_RPCSEC_GSS_KRB5 is not set 872# CONFIG_RPCSEC_GSS_KRB5 is not set
666# CONFIG_RPCSEC_GSS_SPKM3 is not set 873# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -669,6 +876,7 @@ CONFIG_SUNRPC=y
669# CONFIG_NCP_FS is not set 876# CONFIG_NCP_FS is not set
670# CONFIG_CODA_FS is not set 877# CONFIG_CODA_FS is not set
671# CONFIG_AFS_FS is not set 878# CONFIG_AFS_FS is not set
879# CONFIG_9P_FS is not set
672 880
673# 881#
674# Partition Types 882# Partition Types
@@ -723,16 +931,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
723# 931#
724# Profiling support 932# Profiling support
725# 933#
726# CONFIG_PROFILING is not set 934CONFIG_PROFILING=y
935CONFIG_OPROFILE=y
727 936
728# 937#
729# Kernel hacking 938# Kernel hacking
730# 939#
731# CONFIG_PRINTK_TIME is not set 940# CONFIG_PRINTK_TIME is not set
941CONFIG_ENABLE_MUST_CHECK=y
942# CONFIG_MAGIC_SYSRQ is not set
943# CONFIG_UNUSED_SYMBOLS is not set
732# CONFIG_DEBUG_KERNEL is not set 944# CONFIG_DEBUG_KERNEL is not set
733CONFIG_LOG_BUF_SHIFT=14 945CONFIG_LOG_BUF_SHIFT=14
734# CONFIG_DEBUG_BUGVERBOSE is not set 946# CONFIG_DEBUG_BUGVERBOSE is not set
947# CONFIG_DEBUG_FS is not set
735# CONFIG_FRAME_POINTER is not set 948# CONFIG_FRAME_POINTER is not set
949# CONFIG_UNWIND_INFO is not set
950# CONFIG_HEADERS_CHECK is not set
736 951
737# 952#
738# Security options 953# Security options
@@ -746,12 +961,9 @@ CONFIG_LOG_BUF_SHIFT=14
746# CONFIG_CRYPTO is not set 961# CONFIG_CRYPTO is not set
747 962
748# 963#
749# Hardware crypto devices
750#
751
752#
753# Library routines 964# Library routines
754# 965#
755# CONFIG_CRC_CCITT is not set 966# CONFIG_CRC_CCITT is not set
967# CONFIG_CRC16 is not set
756CONFIG_CRC32=y 968CONFIG_CRC32=y
757# CONFIG_LIBCRC32C is not set 969# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/mappi/defconfig.nommu
index a8425fba340b..fbf6c384c9d0 100644
--- a/arch/m32r/mappi/defconfig.nommu
+++ b/arch/m32r/mappi/defconfig.nommu
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:21:46 2005 4# Wed Dec 13 17:57:45 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 17CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,29 +21,36 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# General setup 21# General setup
23# 22#
24CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25# CONFIG_SYSVIPC is not set
25# CONFIG_POSIX_MQUEUE is not set 26# CONFIG_POSIX_MQUEUE is not set
26CONFIG_BSD_PROCESS_ACCT=y 27CONFIG_BSD_PROCESS_ACCT=y
27# CONFIG_BSD_PROCESS_ACCT_V3 is not set 28# CONFIG_BSD_PROCESS_ACCT_V3 is not set
28CONFIG_SYSCTL=y 29# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set
29# CONFIG_AUDIT is not set 31# CONFIG_AUDIT is not set
30CONFIG_HOTPLUG=y
31CONFIG_KOBJECT_UEVENT=y
32CONFIG_IKCONFIG=y 32CONFIG_IKCONFIG=y
33# CONFIG_IKCONFIG_PROC is not set 33# CONFIG_IKCONFIG_PROC is not set
34CONFIG_SYSFS_DEPRECATED=y
35# CONFIG_RELAY is not set
36CONFIG_INITRAMFS_SOURCE=""
37# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
38CONFIG_SYSCTL=y
34CONFIG_EMBEDDED=y 39CONFIG_EMBEDDED=y
40CONFIG_SYSCTL_SYSCALL=y
35# CONFIG_KALLSYMS is not set 41# CONFIG_KALLSYMS is not set
42CONFIG_HOTPLUG=y
36CONFIG_PRINTK=y 43CONFIG_PRINTK=y
37CONFIG_BUG=y 44CONFIG_BUG=y
45CONFIG_ELF_CORE=y
38CONFIG_BASE_FULL=y 46CONFIG_BASE_FULL=y
39# CONFIG_FUTEX is not set 47# CONFIG_FUTEX is not set
40# CONFIG_EPOLL is not set 48# CONFIG_EPOLL is not set
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 49CONFIG_SLAB=y
42CONFIG_CC_ALIGN_FUNCTIONS=0 50CONFIG_VM_EVENT_COUNTERS=y
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46CONFIG_TINY_SHMEM=y 51CONFIG_TINY_SHMEM=y
47CONFIG_BASE_SMALL=0 52CONFIG_BASE_SMALL=0
53# CONFIG_SLOB is not set
48 54
49# 55#
50# Loadable module support 56# Loadable module support
@@ -52,12 +58,30 @@ CONFIG_BASE_SMALL=0
52CONFIG_MODULES=y 58CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y 59CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set 60# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56# CONFIG_MODVERSIONS is not set 61# CONFIG_MODVERSIONS is not set
57# CONFIG_MODULE_SRCVERSION_ALL is not set 62# CONFIG_MODULE_SRCVERSION_ALL is not set
58CONFIG_KMOD=y 63CONFIG_KMOD=y
59 64
60# 65#
66# Block layer
67#
68CONFIG_BLOCK=y
69# CONFIG_BLK_DEV_IO_TRACE is not set
70
71#
72# IO Schedulers
73#
74CONFIG_IOSCHED_NOOP=y
75# CONFIG_IOSCHED_AS is not set
76CONFIG_IOSCHED_DEADLINE=y
77CONFIG_IOSCHED_CFQ=y
78# CONFIG_DEFAULT_AS is not set
79# CONFIG_DEFAULT_DEADLINE is not set
80CONFIG_DEFAULT_CFQ=y
81# CONFIG_DEFAULT_NOOP is not set
82CONFIG_DEFAULT_IOSCHED="cfq"
83
84#
61# Processor type and features 85# Processor type and features
62# 86#
63CONFIG_PLAT_MAPPI=y 87CONFIG_PLAT_MAPPI=y
@@ -67,8 +91,10 @@ CONFIG_PLAT_MAPPI=y
67# CONFIG_PLAT_OAKS32R is not set 91# CONFIG_PLAT_OAKS32R is not set
68# CONFIG_PLAT_MAPPI2 is not set 92# CONFIG_PLAT_MAPPI2 is not set
69# CONFIG_PLAT_MAPPI3 is not set 93# CONFIG_PLAT_MAPPI3 is not set
94# CONFIG_PLAT_M32104UT is not set
70CONFIG_CHIP_M32700=y 95CONFIG_CHIP_M32700=y
71# CONFIG_CHIP_M32102 is not set 96# CONFIG_CHIP_M32102 is not set
97# CONFIG_CHIP_M32104 is not set
72# CONFIG_CHIP_VDEC2 is not set 98# CONFIG_CHIP_VDEC2 is not set
73# CONFIG_CHIP_OPSP is not set 99# CONFIG_CHIP_OPSP is not set
74# CONFIG_MMU is not set 100# CONFIG_MMU is not set
@@ -82,18 +108,31 @@ CONFIG_TIMER_DIVIDE=128
82CONFIG_MEMORY_START=0x00000000 108CONFIG_MEMORY_START=0x00000000
83CONFIG_MEMORY_SIZE=0x00E00000 109CONFIG_MEMORY_SIZE=0x00E00000
84CONFIG_NOHIGHMEM=y 110CONFIG_NOHIGHMEM=y
85# CONFIG_DISCONTIGMEM is not set 111CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
112CONFIG_SELECT_MEMORY_MODEL=y
113# CONFIG_FLATMEM_MANUAL is not set
114CONFIG_DISCONTIGMEM_MANUAL=y
115# CONFIG_SPARSEMEM_MANUAL is not set
116CONFIG_DISCONTIGMEM=y
117CONFIG_FLAT_NODE_MEM_MAP=y
118CONFIG_NEED_MULTIPLE_NODES=y
119# CONFIG_SPARSEMEM_STATIC is not set
120CONFIG_SPLIT_PTLOCK_CPUS=4
121# CONFIG_RESOURCES_64BIT is not set
122CONFIG_IRAM_START=0x00f00000
123CONFIG_IRAM_SIZE=0x00080000
86CONFIG_RWSEM_GENERIC_SPINLOCK=y 124CONFIG_RWSEM_GENERIC_SPINLOCK=y
87# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 125# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
126CONFIG_GENERIC_FIND_NEXT_BIT=y
127CONFIG_GENERIC_HWEIGHT=y
88CONFIG_GENERIC_CALIBRATE_DELAY=y 128CONFIG_GENERIC_CALIBRATE_DELAY=y
89CONFIG_PREEMPT=y 129CONFIG_PREEMPT=y
90# CONFIG_HAVE_DEC_LOCK is not set
91# CONFIG_SMP is not set 130# CONFIG_SMP is not set
131CONFIG_NODES_SHIFT=1
92 132
93# 133#
94# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 134# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
95# 135#
96# CONFIG_PCI is not set
97# CONFIG_ISA is not set 136# CONFIG_ISA is not set
98 137
99# 138#
@@ -102,12 +141,14 @@ CONFIG_PREEMPT=y
102CONFIG_PCCARD=y 141CONFIG_PCCARD=y
103# CONFIG_PCMCIA_DEBUG is not set 142# CONFIG_PCMCIA_DEBUG is not set
104CONFIG_PCMCIA=y 143CONFIG_PCMCIA=y
144CONFIG_PCMCIA_LOAD_CIS=y
145CONFIG_PCMCIA_IOCTL=y
105 146
106# 147#
107# PC-card bridges 148# PC-card bridges
108# 149#
109# CONFIG_TCIC is not set
110CONFIG_M32R_PCC=y 150CONFIG_M32R_PCC=y
151CONFIG_PCCARD_NONSTATIC=y
111 152
112# 153#
113# PCI Hotplug Support 154# PCI Hotplug Support
@@ -122,6 +163,94 @@ CONFIG_BINFMT_FLAT=y
122# CONFIG_BINFMT_MISC is not set 163# CONFIG_BINFMT_MISC is not set
123 164
124# 165#
166# Networking
167#
168CONFIG_NET=y
169
170#
171# Networking options
172#
173# CONFIG_NETDEBUG is not set
174CONFIG_PACKET=y
175# CONFIG_PACKET_MMAP is not set
176CONFIG_UNIX=y
177CONFIG_XFRM=y
178# CONFIG_XFRM_USER is not set
179# CONFIG_XFRM_SUB_POLICY is not set
180# CONFIG_NET_KEY is not set
181CONFIG_INET=y
182# CONFIG_IP_MULTICAST is not set
183# CONFIG_IP_ADVANCED_ROUTER is not set
184CONFIG_IP_FIB_HASH=y
185CONFIG_IP_PNP=y
186CONFIG_IP_PNP_DHCP=y
187# CONFIG_IP_PNP_BOOTP is not set
188# CONFIG_IP_PNP_RARP is not set
189# CONFIG_NET_IPIP is not set
190# CONFIG_NET_IPGRE is not set
191# CONFIG_ARPD is not set
192# CONFIG_SYN_COOKIES is not set
193# CONFIG_INET_AH is not set
194# CONFIG_INET_ESP is not set
195# CONFIG_INET_IPCOMP is not set
196# CONFIG_INET_XFRM_TUNNEL is not set
197# CONFIG_INET_TUNNEL is not set
198CONFIG_INET_XFRM_MODE_TRANSPORT=y
199CONFIG_INET_XFRM_MODE_TUNNEL=y
200CONFIG_INET_XFRM_MODE_BEET=y
201CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y
203# CONFIG_TCP_CONG_ADVANCED is not set
204CONFIG_TCP_CONG_CUBIC=y
205CONFIG_DEFAULT_TCP_CONG="cubic"
206# CONFIG_TCP_MD5SIG is not set
207# CONFIG_IPV6 is not set
208# CONFIG_INET6_XFRM_TUNNEL is not set
209# CONFIG_INET6_TUNNEL is not set
210# CONFIG_NETWORK_SECMARK is not set
211# CONFIG_NETFILTER is not set
212
213#
214# DCCP Configuration (EXPERIMENTAL)
215#
216# CONFIG_IP_DCCP is not set
217
218#
219# SCTP Configuration (EXPERIMENTAL)
220#
221# CONFIG_IP_SCTP is not set
222
223#
224# TIPC Configuration (EXPERIMENTAL)
225#
226# CONFIG_TIPC is not set
227# CONFIG_ATM is not set
228# CONFIG_BRIDGE is not set
229# CONFIG_VLAN_8021Q is not set
230# CONFIG_DECNET is not set
231# CONFIG_LLC2 is not set
232# CONFIG_IPX is not set
233# CONFIG_ATALK is not set
234# CONFIG_X25 is not set
235# CONFIG_LAPB is not set
236# CONFIG_ECONET is not set
237# CONFIG_WAN_ROUTER is not set
238
239#
240# QoS and/or fair queueing
241#
242# CONFIG_NET_SCHED is not set
243
244#
245# Network testing
246#
247# CONFIG_NET_PKTGEN is not set
248# CONFIG_HAMRADIO is not set
249# CONFIG_IRDA is not set
250# CONFIG_BT is not set
251# CONFIG_IEEE80211 is not set
252
253#
125# Device Drivers 254# Device Drivers
126# 255#
127 256
@@ -130,7 +259,13 @@ CONFIG_BINFMT_FLAT=y
130# 259#
131CONFIG_STANDALONE=y 260CONFIG_STANDALONE=y
132CONFIG_PREVENT_FIRMWARE_BUILD=y 261CONFIG_PREVENT_FIRMWARE_BUILD=y
133# CONFIG_FW_LOADER is not set 262CONFIG_FW_LOADER=y
263# CONFIG_SYS_HYPERVISOR is not set
264
265#
266# Connector - unified userspace <-> kernelspace linker
267#
268# CONFIG_CONNECTOR is not set
134 269
135# 270#
136# Memory Technology Devices (MTD) 271# Memory Technology Devices (MTD)
@@ -149,7 +284,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
149# 284#
150# Block devices 285# Block devices
151# 286#
152# CONFIG_BLK_DEV_FD is not set
153# CONFIG_BLK_DEV_COW_COMMON is not set 287# CONFIG_BLK_DEV_COW_COMMON is not set
154CONFIG_BLK_DEV_LOOP=y 288CONFIG_BLK_DEV_LOOP=y
155# CONFIG_BLK_DEV_CRYPTOLOOP is not set 289# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -157,18 +291,15 @@ CONFIG_BLK_DEV_NBD=y
157CONFIG_BLK_DEV_RAM=y 291CONFIG_BLK_DEV_RAM=y
158CONFIG_BLK_DEV_RAM_COUNT=16 292CONFIG_BLK_DEV_RAM_COUNT=16
159CONFIG_BLK_DEV_RAM_SIZE=4096 293CONFIG_BLK_DEV_RAM_SIZE=4096
294CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
160# CONFIG_BLK_DEV_INITRD is not set 295# CONFIG_BLK_DEV_INITRD is not set
161CONFIG_INITRAMFS_SOURCE=""
162# CONFIG_CDROM_PKTCDVD is not set 296# CONFIG_CDROM_PKTCDVD is not set
297# CONFIG_ATA_OVER_ETH is not set
163 298
164# 299#
165# IO Schedulers 300# Misc devices
166# 301#
167CONFIG_IOSCHED_NOOP=y 302# CONFIG_TIFM_CORE is not set
168# CONFIG_IOSCHED_AS is not set
169CONFIG_IOSCHED_DEADLINE=y
170CONFIG_IOSCHED_CFQ=y
171# CONFIG_ATA_OVER_ETH is not set
172 303
173# 304#
174# ATA/ATAPI/MFM/RLL support 305# ATA/ATAPI/MFM/RLL support
@@ -178,7 +309,13 @@ CONFIG_IOSCHED_CFQ=y
178# 309#
179# SCSI device support 310# SCSI device support
180# 311#
312# CONFIG_RAID_ATTRS is not set
181# CONFIG_SCSI is not set 313# CONFIG_SCSI is not set
314# CONFIG_SCSI_NETLINK is not set
315
316#
317# Serial ATA (prod) and Parallel ATA (experimental) drivers
318#
182 319
183# 320#
184# Multi-device support (RAID and LVM) 321# Multi-device support (RAID and LVM)
@@ -188,6 +325,7 @@ CONFIG_IOSCHED_CFQ=y
188# 325#
189# Fusion MPT device support 326# Fusion MPT device support
190# 327#
328# CONFIG_FUSION is not set
191 329
192# 330#
193# IEEE 1394 (FireWire) support 331# IEEE 1394 (FireWire) support
@@ -198,69 +336,8 @@ CONFIG_IOSCHED_CFQ=y
198# 336#
199 337
200# 338#
201# Networking support 339# Network device support
202#
203CONFIG_NET=y
204
205#
206# Networking options
207#
208CONFIG_PACKET=y
209# CONFIG_PACKET_MMAP is not set
210CONFIG_UNIX=y
211# CONFIG_NET_KEY is not set
212CONFIG_INET=y
213# CONFIG_IP_MULTICAST is not set
214# CONFIG_IP_ADVANCED_ROUTER is not set
215CONFIG_IP_PNP=y
216CONFIG_IP_PNP_DHCP=y
217# CONFIG_IP_PNP_BOOTP is not set
218# CONFIG_IP_PNP_RARP is not set
219# CONFIG_NET_IPIP is not set
220# CONFIG_NET_IPGRE is not set
221# CONFIG_ARPD is not set
222# CONFIG_SYN_COOKIES is not set
223# CONFIG_INET_AH is not set
224# CONFIG_INET_ESP is not set
225# CONFIG_INET_IPCOMP is not set
226# CONFIG_INET_TUNNEL is not set
227CONFIG_IP_TCPDIAG=y
228# CONFIG_IP_TCPDIAG_IPV6 is not set
229# CONFIG_IPV6 is not set
230# CONFIG_NETFILTER is not set
231
232#
233# SCTP Configuration (EXPERIMENTAL)
234#
235# CONFIG_IP_SCTP is not set
236# CONFIG_ATM is not set
237# CONFIG_BRIDGE is not set
238# CONFIG_VLAN_8021Q is not set
239# CONFIG_DECNET is not set
240# CONFIG_LLC2 is not set
241# CONFIG_IPX is not set
242# CONFIG_ATALK is not set
243# CONFIG_X25 is not set
244# CONFIG_LAPB is not set
245# CONFIG_NET_DIVERT is not set
246# CONFIG_ECONET is not set
247# CONFIG_WAN_ROUTER is not set
248
249#
250# QoS and/or fair queueing
251#
252# CONFIG_NET_SCHED is not set
253# CONFIG_NET_CLS_ROUTE is not set
254
255#
256# Network testing
257# 340#
258# CONFIG_NET_PKTGEN is not set
259# CONFIG_NETPOLL is not set
260# CONFIG_NET_POLL_CONTROLLER is not set
261# CONFIG_HAMRADIO is not set
262# CONFIG_IRDA is not set
263# CONFIG_BT is not set
264CONFIG_NETDEVICES=y 341CONFIG_NETDEVICES=y
265# CONFIG_DUMMY is not set 342# CONFIG_DUMMY is not set
266# CONFIG_BONDING is not set 343# CONFIG_BONDING is not set
@@ -268,6 +345,10 @@ CONFIG_NETDEVICES=y
268# CONFIG_TUN is not set 345# CONFIG_TUN is not set
269 346
270# 347#
348# PHY device support
349#
350
351#
271# Ethernet (10 or 100Mbit) 352# Ethernet (10 or 100Mbit)
272# 353#
273# CONFIG_NET_ETHERNET is not set 354# CONFIG_NET_ETHERNET is not set
@@ -303,6 +384,8 @@ CONFIG_NE2000=y
303# CONFIG_SLIP is not set 384# CONFIG_SLIP is not set
304# CONFIG_SHAPER is not set 385# CONFIG_SHAPER is not set
305# CONFIG_NETCONSOLE is not set 386# CONFIG_NETCONSOLE is not set
387# CONFIG_NETPOLL is not set
388# CONFIG_NET_POLL_CONTROLLER is not set
306 389
307# 390#
308# ISDN subsystem 391# ISDN subsystem
@@ -318,6 +401,7 @@ CONFIG_NE2000=y
318# Input device support 401# Input device support
319# 402#
320CONFIG_INPUT=y 403CONFIG_INPUT=y
404# CONFIG_INPUT_FF_MEMLESS is not set
321 405
322# 406#
323# Userland interfaces 407# Userland interfaces
@@ -346,7 +430,6 @@ CONFIG_SERIO_SERPORT=y
346# CONFIG_SERIO_LIBPS2 is not set 430# CONFIG_SERIO_LIBPS2 is not set
347# CONFIG_SERIO_RAW is not set 431# CONFIG_SERIO_RAW is not set
348# CONFIG_GAMEPORT is not set 432# CONFIG_GAMEPORT is not set
349CONFIG_SOUND_GAMEPORT=y
350 433
351# 434#
352# Character devices 435# Character devices
@@ -366,7 +449,6 @@ CONFIG_SERIAL_CORE=y
366CONFIG_SERIAL_CORE_CONSOLE=y 449CONFIG_SERIAL_CORE_CONSOLE=y
367CONFIG_SERIAL_M32R_SIO=y 450CONFIG_SERIAL_M32R_SIO=y
368CONFIG_SERIAL_M32R_SIO_CONSOLE=y 451CONFIG_SERIAL_M32R_SIO_CONSOLE=y
369# CONFIG_SERIAL_M32R_PLDSIO is not set
370CONFIG_UNIX98_PTYS=y 452CONFIG_UNIX98_PTYS=y
371CONFIG_LEGACY_PTYS=y 453CONFIG_LEGACY_PTYS=y
372CONFIG_LEGACY_PTY_COUNT=256 454CONFIG_LEGACY_PTY_COUNT=256
@@ -380,25 +462,27 @@ CONFIG_LEGACY_PTY_COUNT=256
380# Watchdog Cards 462# Watchdog Cards
381# 463#
382# CONFIG_WATCHDOG is not set 464# CONFIG_WATCHDOG is not set
465CONFIG_HW_RANDOM=y
383# CONFIG_RTC is not set 466# CONFIG_RTC is not set
384# CONFIG_GEN_RTC is not set
385# CONFIG_DTLK is not set 467# CONFIG_DTLK is not set
386# CONFIG_R3964 is not set 468# CONFIG_R3964 is not set
387 469
388# 470#
389# Ftape, the floppy tape device driver 471# Ftape, the floppy tape device driver
390# 472#
391# CONFIG_DRM is not set
392 473
393# 474#
394# PCMCIA character devices 475# PCMCIA character devices
395# 476#
396# CONFIG_SYNCLINK_CS is not set 477# CONFIG_SYNCLINK_CS is not set
478# CONFIG_CARDMAN_4000 is not set
479# CONFIG_CARDMAN_4040 is not set
397# CONFIG_RAW_DRIVER is not set 480# CONFIG_RAW_DRIVER is not set
398 481
399# 482#
400# TPM devices 483# TPM devices
401# 484#
485# CONFIG_TCG_TPM is not set
402 486
403# 487#
404# I2C support 488# I2C support
@@ -406,13 +490,25 @@ CONFIG_LEGACY_PTY_COUNT=256
406# CONFIG_I2C is not set 490# CONFIG_I2C is not set
407 491
408# 492#
493# SPI support
494#
495# CONFIG_SPI is not set
496# CONFIG_SPI_MASTER is not set
497
498#
409# Dallas's 1-wire bus 499# Dallas's 1-wire bus
410# 500#
411# CONFIG_W1 is not set 501# CONFIG_W1 is not set
412 502
413# 503#
414# Misc devices 504# Hardware Monitoring support
415# 505#
506CONFIG_HWMON=y
507# CONFIG_HWMON_VID is not set
508# CONFIG_SENSORS_ABITUGURU is not set
509# CONFIG_SENSORS_F71805F is not set
510# CONFIG_SENSORS_VT1211 is not set
511# CONFIG_HWMON_DEBUG_CHIP is not set
416 512
417# 513#
418# Multimedia devices 514# Multimedia devices
@@ -427,7 +523,9 @@ CONFIG_LEGACY_PTY_COUNT=256
427# 523#
428# Graphics support 524# Graphics support
429# 525#
526CONFIG_FIRMWARE_EDID=y
430# CONFIG_FB is not set 527# CONFIG_FB is not set
528# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
431 529
432# 530#
433# Sound 531# Sound
@@ -439,6 +537,11 @@ CONFIG_LEGACY_PTY_COUNT=256
439# 537#
440# CONFIG_USB_ARCH_HAS_HCD is not set 538# CONFIG_USB_ARCH_HAS_HCD is not set
441# CONFIG_USB_ARCH_HAS_OHCI is not set 539# CONFIG_USB_ARCH_HAS_OHCI is not set
540# CONFIG_USB_ARCH_HAS_EHCI is not set
541
542#
543# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
544#
442 545
443# 546#
444# USB Gadget Support 547# USB Gadget Support
@@ -451,30 +554,72 @@ CONFIG_LEGACY_PTY_COUNT=256
451# CONFIG_MMC is not set 554# CONFIG_MMC is not set
452 555
453# 556#
557# LED devices
558#
559# CONFIG_NEW_LEDS is not set
560
561#
562# LED drivers
563#
564
565#
566# LED Triggers
567#
568
569#
454# InfiniBand support 570# InfiniBand support
455# 571#
456# CONFIG_INFINIBAND is not set 572
573#
574# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
575#
576
577#
578# Real Time Clock
579#
580# CONFIG_RTC_CLASS is not set
581
582#
583# DMA Engine support
584#
585# CONFIG_DMA_ENGINE is not set
586
587#
588# DMA Clients
589#
590
591#
592# DMA Devices
593#
457 594
458# 595#
459# File systems 596# File systems
460# 597#
461CONFIG_EXT2_FS=y 598CONFIG_EXT2_FS=y
462# CONFIG_EXT2_FS_XATTR is not set 599# CONFIG_EXT2_FS_XATTR is not set
463# CONFIG_EXT3_FS is not set 600CONFIG_EXT3_FS=y
464# CONFIG_JBD is not set 601CONFIG_EXT3_FS_XATTR=y
602# CONFIG_EXT3_FS_POSIX_ACL is not set
603# CONFIG_EXT3_FS_SECURITY is not set
604# CONFIG_EXT4DEV_FS is not set
605CONFIG_JBD=y
606# CONFIG_JBD_DEBUG is not set
607CONFIG_FS_MBCACHE=y
465# CONFIG_REISERFS_FS is not set 608# CONFIG_REISERFS_FS is not set
466# CONFIG_JFS_FS is not set 609# CONFIG_JFS_FS is not set
467 610# CONFIG_FS_POSIX_ACL is not set
468#
469# XFS support
470#
471# CONFIG_XFS_FS is not set 611# CONFIG_XFS_FS is not set
612# CONFIG_GFS2_FS is not set
613# CONFIG_OCFS2_FS is not set
472# CONFIG_MINIX_FS is not set 614# CONFIG_MINIX_FS is not set
473# CONFIG_ROMFS_FS is not set 615# CONFIG_ROMFS_FS is not set
616CONFIG_INOTIFY=y
617CONFIG_INOTIFY_USER=y
474# CONFIG_QUOTA is not set 618# CONFIG_QUOTA is not set
475CONFIG_DNOTIFY=y 619CONFIG_DNOTIFY=y
476# CONFIG_AUTOFS_FS is not set 620# CONFIG_AUTOFS_FS is not set
477# CONFIG_AUTOFS4_FS is not set 621# CONFIG_AUTOFS4_FS is not set
622# CONFIG_FUSE_FS is not set
478 623
479# 624#
480# CD-ROM/DVD Filesystems 625# CD-ROM/DVD Filesystems
@@ -493,15 +638,12 @@ CONFIG_DNOTIFY=y
493# Pseudo filesystems 638# Pseudo filesystems
494# 639#
495CONFIG_PROC_FS=y 640CONFIG_PROC_FS=y
641CONFIG_PROC_SYSCTL=y
496CONFIG_SYSFS=y 642CONFIG_SYSFS=y
497CONFIG_DEVFS_FS=y
498CONFIG_DEVFS_MOUNT=y
499# CONFIG_DEVFS_DEBUG is not set
500CONFIG_DEVPTS_FS_XATTR=y
501CONFIG_DEVPTS_FS_SECURITY=y
502# CONFIG_TMPFS is not set 643# CONFIG_TMPFS is not set
503# CONFIG_HUGETLB_PAGE is not set 644# CONFIG_HUGETLB_PAGE is not set
504CONFIG_RAMFS=y 645CONFIG_RAMFS=y
646# CONFIG_CONFIGFS_FS is not set
505 647
506# 648#
507# Miscellaneous filesystems 649# Miscellaneous filesystems
@@ -525,12 +667,14 @@ CONFIG_RAMFS=y
525# 667#
526CONFIG_NFS_FS=y 668CONFIG_NFS_FS=y
527CONFIG_NFS_V3=y 669CONFIG_NFS_V3=y
670# CONFIG_NFS_V3_ACL is not set
528# CONFIG_NFS_V4 is not set 671# CONFIG_NFS_V4 is not set
529# CONFIG_NFS_DIRECTIO is not set 672# CONFIG_NFS_DIRECTIO is not set
530# CONFIG_NFSD is not set 673# CONFIG_NFSD is not set
531CONFIG_ROOT_NFS=y 674CONFIG_ROOT_NFS=y
532CONFIG_LOCKD=y 675CONFIG_LOCKD=y
533CONFIG_LOCKD_V4=y 676CONFIG_LOCKD_V4=y
677CONFIG_NFS_COMMON=y
534CONFIG_SUNRPC=y 678CONFIG_SUNRPC=y
535# CONFIG_RPCSEC_GSS_KRB5 is not set 679# CONFIG_RPCSEC_GSS_KRB5 is not set
536# CONFIG_RPCSEC_GSS_SPKM3 is not set 680# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -539,6 +683,7 @@ CONFIG_SUNRPC=y
539# CONFIG_NCP_FS is not set 683# CONFIG_NCP_FS is not set
540# CONFIG_CODA_FS is not set 684# CONFIG_CODA_FS is not set
541# CONFIG_AFS_FS is not set 685# CONFIG_AFS_FS is not set
686# CONFIG_9P_FS is not set
542 687
543# 688#
544# Partition Types 689# Partition Types
@@ -599,10 +744,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
599# Kernel hacking 744# Kernel hacking
600# 745#
601# CONFIG_PRINTK_TIME is not set 746# CONFIG_PRINTK_TIME is not set
747CONFIG_ENABLE_MUST_CHECK=y
748# CONFIG_MAGIC_SYSRQ is not set
749# CONFIG_UNUSED_SYMBOLS is not set
602# CONFIG_DEBUG_KERNEL is not set 750# CONFIG_DEBUG_KERNEL is not set
603CONFIG_LOG_BUF_SHIFT=14 751CONFIG_LOG_BUF_SHIFT=14
604# CONFIG_DEBUG_BUGVERBOSE is not set 752# CONFIG_DEBUG_BUGVERBOSE is not set
753# CONFIG_DEBUG_FS is not set
605# CONFIG_FRAME_POINTER is not set 754# CONFIG_FRAME_POINTER is not set
755# CONFIG_UNWIND_INFO is not set
756# CONFIG_HEADERS_CHECK is not set
606 757
607# 758#
608# Security options 759# Security options
@@ -616,12 +767,9 @@ CONFIG_LOG_BUF_SHIFT=14
616# CONFIG_CRYPTO is not set 767# CONFIG_CRYPTO is not set
617 768
618# 769#
619# Hardware crypto devices
620#
621
622#
623# Library routines 770# Library routines
624# 771#
625# CONFIG_CRC_CCITT is not set 772# CONFIG_CRC_CCITT is not set
773# CONFIG_CRC16 is not set
626CONFIG_CRC32=y 774CONFIG_CRC32=y
627# CONFIG_LIBCRC32C is not set 775# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/mappi/defconfig.smp b/arch/m32r/mappi/defconfig.smp
index 1a7f3cd42246..168669202b94 100644
--- a/arch/m32r/mappi/defconfig.smp
+++ b/arch/m32r/mappi/defconfig.smp
@@ -1,21 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:21:52 2005 4# Wed Dec 13 17:50:59 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16# CONFIG_CLEAN_COMPILE is not set
17CONFIG_BROKEN=y
18CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 16CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32 17CONFIG_INIT_ENV_ARG_LIMIT=32
21 18
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
23# General setup 20# General setup
24# 21#
25CONFIG_LOCALVERSION="" 22CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y 24CONFIG_SWAP=y
27CONFIG_SYSVIPC=y 25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
28# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set 28# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y 29# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 31# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 32CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y 33CONFIG_IKCONFIG_PROC=y
36# CONFIG_CPUSETS is not set 34# CONFIG_CPUSETS is not set
35CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y
37CONFIG_EMBEDDED=y 40CONFIG_EMBEDDED=y
41CONFIG_SYSCTL_SYSCALL=y
38# CONFIG_KALLSYMS is not set 42# CONFIG_KALLSYMS is not set
43CONFIG_HOTPLUG=y
39CONFIG_PRINTK=y 44CONFIG_PRINTK=y
40CONFIG_BUG=y 45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
41CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
42# CONFIG_FUTEX is not set 48# CONFIG_FUTEX is not set
43# CONFIG_EPOLL is not set 49# CONFIG_EPOLL is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 50CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_SLAB=y
47CONFIG_CC_ALIGN_LABELS=0 52CONFIG_VM_EVENT_COUNTERS=y
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 53# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 54CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
52 56
53# 57#
54# Loadable module support 58# Loadable module support
@@ -56,13 +60,31 @@ CONFIG_BASE_SMALL=0
56CONFIG_MODULES=y 60CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y 61CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set 62# CONFIG_MODULE_FORCE_UNLOAD is not set
59CONFIG_OBSOLETE_MODPARM=y
60# CONFIG_MODVERSIONS is not set 63# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 64# CONFIG_MODULE_SRCVERSION_ALL is not set
62CONFIG_KMOD=y 65CONFIG_KMOD=y
63CONFIG_STOP_MACHINE=y 66CONFIG_STOP_MACHINE=y
64 67
65# 68#
69# Block layer
70#
71CONFIG_BLOCK=y
72# CONFIG_BLK_DEV_IO_TRACE is not set
73
74#
75# IO Schedulers
76#
77CONFIG_IOSCHED_NOOP=y
78# CONFIG_IOSCHED_AS is not set
79CONFIG_IOSCHED_DEADLINE=y
80CONFIG_IOSCHED_CFQ=y
81# CONFIG_DEFAULT_AS is not set
82# CONFIG_DEFAULT_DEADLINE is not set
83CONFIG_DEFAULT_CFQ=y
84# CONFIG_DEFAULT_NOOP is not set
85CONFIG_DEFAULT_IOSCHED="cfq"
86
87#
66# Processor type and features 88# Processor type and features
67# 89#
68CONFIG_PLAT_MAPPI=y 90CONFIG_PLAT_MAPPI=y
@@ -72,8 +94,10 @@ CONFIG_PLAT_MAPPI=y
72# CONFIG_PLAT_OAKS32R is not set 94# CONFIG_PLAT_OAKS32R is not set
73# CONFIG_PLAT_MAPPI2 is not set 95# CONFIG_PLAT_MAPPI2 is not set
74# CONFIG_PLAT_MAPPI3 is not set 96# CONFIG_PLAT_MAPPI3 is not set
97# CONFIG_PLAT_M32104UT is not set
75CONFIG_CHIP_M32700=y 98CONFIG_CHIP_M32700=y
76# CONFIG_CHIP_M32102 is not set 99# CONFIG_CHIP_M32102 is not set
100# CONFIG_CHIP_M32104 is not set
77# CONFIG_CHIP_VDEC2 is not set 101# CONFIG_CHIP_VDEC2 is not set
78# CONFIG_CHIP_OPSP is not set 102# CONFIG_CHIP_OPSP is not set
79CONFIG_MMU=y 103CONFIG_MMU=y
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128
87CONFIG_MEMORY_START=0x08000000 111CONFIG_MEMORY_START=0x08000000
88CONFIG_MEMORY_SIZE=0x04000000 112CONFIG_MEMORY_SIZE=0x04000000
89CONFIG_NOHIGHMEM=y 113CONFIG_NOHIGHMEM=y
114CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
115CONFIG_SELECT_MEMORY_MODEL=y
116# CONFIG_FLATMEM_MANUAL is not set
117CONFIG_DISCONTIGMEM_MANUAL=y
118# CONFIG_SPARSEMEM_MANUAL is not set
90CONFIG_DISCONTIGMEM=y 119CONFIG_DISCONTIGMEM=y
120CONFIG_FLAT_NODE_MEM_MAP=y
121CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set
91CONFIG_IRAM_START=0x00f00000 125CONFIG_IRAM_START=0x00f00000
92CONFIG_IRAM_SIZE=0x00080000 126CONFIG_IRAM_SIZE=0x00080000
93CONFIG_RWSEM_GENERIC_SPINLOCK=y 127CONFIG_RWSEM_GENERIC_SPINLOCK=y
94# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y
95CONFIG_GENERIC_CALIBRATE_DELAY=y 131CONFIG_GENERIC_CALIBRATE_DELAY=y
96CONFIG_PREEMPT=y 132CONFIG_PREEMPT=y
97# CONFIG_HAVE_DEC_LOCK is not set
98CONFIG_SMP=y 133CONFIG_SMP=y
99CONFIG_CHIP_M32700_TS1=y 134CONFIG_CHIP_M32700_TS1=y
100CONFIG_NR_CPUS=2 135CONFIG_NR_CPUS=2
101# CONFIG_NUMA is not set 136CONFIG_NODES_SHIFT=1
102 137
103# 138#
104# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 139# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
105# 140#
106# CONFIG_PCI is not set
107# CONFIG_ISA is not set 141# CONFIG_ISA is not set
108 142
109# 143#
@@ -112,12 +146,14 @@ CONFIG_NR_CPUS=2
112CONFIG_PCCARD=y 146CONFIG_PCCARD=y
113# CONFIG_PCMCIA_DEBUG is not set 147# CONFIG_PCMCIA_DEBUG is not set
114CONFIG_PCMCIA=y 148CONFIG_PCMCIA=y
149CONFIG_PCMCIA_LOAD_CIS=y
150CONFIG_PCMCIA_IOCTL=y
115 151
116# 152#
117# PC-card bridges 153# PC-card bridges
118# 154#
119# CONFIG_TCIC is not set
120CONFIG_M32R_PCC=y 155CONFIG_M32R_PCC=y
156CONFIG_PCCARD_NONSTATIC=y
121 157
122# 158#
123# PCI Hotplug Support 159# PCI Hotplug Support
@@ -130,6 +166,93 @@ CONFIG_BINFMT_ELF=y
130# CONFIG_BINFMT_MISC is not set 166# CONFIG_BINFMT_MISC is not set
131 167
132# 168#
169# Networking
170#
171CONFIG_NET=y
172
173#
174# Networking options
175#
176# CONFIG_NETDEBUG is not set
177# CONFIG_PACKET is not set
178CONFIG_UNIX=y
179CONFIG_XFRM=y
180# CONFIG_XFRM_USER is not set
181# CONFIG_XFRM_SUB_POLICY is not set
182# CONFIG_NET_KEY is not set
183CONFIG_INET=y
184# CONFIG_IP_MULTICAST is not set
185# CONFIG_IP_ADVANCED_ROUTER is not set
186CONFIG_IP_FIB_HASH=y
187CONFIG_IP_PNP=y
188CONFIG_IP_PNP_DHCP=y
189# CONFIG_IP_PNP_BOOTP is not set
190# CONFIG_IP_PNP_RARP is not set
191# CONFIG_NET_IPIP is not set
192# CONFIG_NET_IPGRE is not set
193# CONFIG_ARPD is not set
194# CONFIG_SYN_COOKIES is not set
195# CONFIG_INET_AH is not set
196# CONFIG_INET_ESP is not set
197# CONFIG_INET_IPCOMP is not set
198# CONFIG_INET_XFRM_TUNNEL is not set
199# CONFIG_INET_TUNNEL is not set
200CONFIG_INET_XFRM_MODE_TRANSPORT=y
201CONFIG_INET_XFRM_MODE_TUNNEL=y
202CONFIG_INET_XFRM_MODE_BEET=y
203CONFIG_INET_DIAG=y
204CONFIG_INET_TCP_DIAG=y
205# CONFIG_TCP_CONG_ADVANCED is not set
206CONFIG_TCP_CONG_CUBIC=y
207CONFIG_DEFAULT_TCP_CONG="cubic"
208# CONFIG_TCP_MD5SIG is not set
209# CONFIG_IPV6 is not set
210# CONFIG_INET6_XFRM_TUNNEL is not set
211# CONFIG_INET6_TUNNEL is not set
212# CONFIG_NETWORK_SECMARK is not set
213# CONFIG_NETFILTER is not set
214
215#
216# DCCP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_DCCP is not set
219
220#
221# SCTP Configuration (EXPERIMENTAL)
222#
223# CONFIG_IP_SCTP is not set
224
225#
226# TIPC Configuration (EXPERIMENTAL)
227#
228# CONFIG_TIPC is not set
229# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set
231# CONFIG_VLAN_8021Q is not set
232# CONFIG_DECNET is not set
233# CONFIG_LLC2 is not set
234# CONFIG_IPX is not set
235# CONFIG_ATALK is not set
236# CONFIG_X25 is not set
237# CONFIG_LAPB is not set
238# CONFIG_ECONET is not set
239# CONFIG_WAN_ROUTER is not set
240
241#
242# QoS and/or fair queueing
243#
244# CONFIG_NET_SCHED is not set
245
246#
247# Network testing
248#
249# CONFIG_NET_PKTGEN is not set
250# CONFIG_HAMRADIO is not set
251# CONFIG_IRDA is not set
252# CONFIG_BT is not set
253# CONFIG_IEEE80211 is not set
254
255#
133# Device Drivers 256# Device Drivers
134# 257#
135 258
@@ -138,7 +261,13 @@ CONFIG_BINFMT_ELF=y
138# 261#
139# CONFIG_STANDALONE is not set 262# CONFIG_STANDALONE is not set
140CONFIG_PREVENT_FIRMWARE_BUILD=y 263CONFIG_PREVENT_FIRMWARE_BUILD=y
141# CONFIG_FW_LOADER is not set 264CONFIG_FW_LOADER=y
265# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set
142 271
143# 272#
144# Memory Technology Devices (MTD) 273# Memory Technology Devices (MTD)
@@ -161,6 +290,8 @@ CONFIG_MTD_BLOCK=y
161# CONFIG_FTL is not set 290# CONFIG_FTL is not set
162# CONFIG_NFTL is not set 291# CONFIG_NFTL is not set
163# CONFIG_INFTL is not set 292# CONFIG_INFTL is not set
293# CONFIG_RFD_FTL is not set
294# CONFIG_SSFDC is not set
164 295
165# 296#
166# RAM/ROM/Flash chip drivers 297# RAM/ROM/Flash chip drivers
@@ -186,6 +317,7 @@ CONFIG_MTD_CFI_I2=y
186# Mapping drivers for chip access 317# Mapping drivers for chip access
187# 318#
188# CONFIG_MTD_COMPLEX_MAPPINGS is not set 319# CONFIG_MTD_COMPLEX_MAPPINGS is not set
320# CONFIG_MTD_PLATRAM is not set
189 321
190# 322#
191# Self-contained MTD device drivers 323# Self-contained MTD device drivers
@@ -193,7 +325,6 @@ CONFIG_MTD_CFI_I2=y
193# CONFIG_MTD_SLRAM is not set 325# CONFIG_MTD_SLRAM is not set
194# CONFIG_MTD_PHRAM is not set 326# CONFIG_MTD_PHRAM is not set
195# CONFIG_MTD_MTDRAM is not set 327# CONFIG_MTD_MTDRAM is not set
196# CONFIG_MTD_BLKMTD is not set
197# CONFIG_MTD_BLOCK2MTD is not set 328# CONFIG_MTD_BLOCK2MTD is not set
198 329
199# 330#
@@ -209,6 +340,11 @@ CONFIG_MTD_CFI_I2=y
209# CONFIG_MTD_NAND is not set 340# CONFIG_MTD_NAND is not set
210 341
211# 342#
343# OneNAND Flash Device Drivers
344#
345# CONFIG_MTD_ONENAND is not set
346
347#
212# Parallel port support 348# Parallel port support
213# 349#
214# CONFIG_PARPORT is not set 350# CONFIG_PARPORT is not set
@@ -220,7 +356,6 @@ CONFIG_MTD_CFI_I2=y
220# 356#
221# Block devices 357# Block devices
222# 358#
223# CONFIG_BLK_DEV_FD is not set
224# CONFIG_BLK_DEV_COW_COMMON is not set 359# CONFIG_BLK_DEV_COW_COMMON is not set
225CONFIG_BLK_DEV_LOOP=y 360CONFIG_BLK_DEV_LOOP=y
226# CONFIG_BLK_DEV_CRYPTOLOOP is not set 361# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -228,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m
228CONFIG_BLK_DEV_RAM=y 363CONFIG_BLK_DEV_RAM=y
229CONFIG_BLK_DEV_RAM_COUNT=16 364CONFIG_BLK_DEV_RAM_COUNT=16
230CONFIG_BLK_DEV_RAM_SIZE=4096 365CONFIG_BLK_DEV_RAM_SIZE=4096
366CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
231CONFIG_BLK_DEV_INITRD=y 367CONFIG_BLK_DEV_INITRD=y
232CONFIG_INITRAMFS_SOURCE=""
233# CONFIG_CDROM_PKTCDVD is not set 368# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set
234 370
235# 371#
236# IO Schedulers 372# Misc devices
237# 373#
238CONFIG_IOSCHED_NOOP=y 374# CONFIG_TIFM_CORE is not set
239# CONFIG_IOSCHED_AS is not set
240CONFIG_IOSCHED_DEADLINE=y
241CONFIG_IOSCHED_CFQ=y
242# CONFIG_ATA_OVER_ETH is not set
243 375
244# 376#
245# ATA/ATAPI/MFM/RLL support 377# ATA/ATAPI/MFM/RLL support
246# 378#
247CONFIG_IDE=m 379CONFIG_IDE=m
380CONFIG_IDE_MAX_HWIFS=4
248CONFIG_BLK_DEV_IDE=m 381CONFIG_BLK_DEV_IDE=m
249 382
250# 383#
@@ -271,7 +404,13 @@ CONFIG_IDE_GENERIC=m
271# 404#
272# SCSI device support 405# SCSI device support
273# 406#
407# CONFIG_RAID_ATTRS is not set
274# CONFIG_SCSI is not set 408# CONFIG_SCSI is not set
409# CONFIG_SCSI_NETLINK is not set
410
411#
412# Serial ATA (prod) and Parallel ATA (experimental) drivers
413#
275 414
276# 415#
277# Multi-device support (RAID and LVM) 416# Multi-device support (RAID and LVM)
@@ -281,79 +420,19 @@ CONFIG_IDE_GENERIC=m
281# 420#
282# Fusion MPT device support 421# Fusion MPT device support
283# 422#
423# CONFIG_FUSION is not set
284 424
285# 425#
286# IEEE 1394 (FireWire) support 426# IEEE 1394 (FireWire) support
287# 427#
288# CONFIG_IEEE1394 is not set
289 428
290# 429#
291# I2O device support 430# I2O device support
292# 431#
293 432
294# 433#
295# Networking support 434# Network device support
296# 435#
297CONFIG_NET=y
298
299#
300# Networking options
301#
302# CONFIG_PACKET is not set
303CONFIG_UNIX=y
304# CONFIG_NET_KEY is not set
305CONFIG_INET=y
306# CONFIG_IP_MULTICAST is not set
307# CONFIG_IP_ADVANCED_ROUTER is not set
308CONFIG_IP_PNP=y
309CONFIG_IP_PNP_DHCP=y
310# CONFIG_IP_PNP_BOOTP is not set
311# CONFIG_IP_PNP_RARP is not set
312# CONFIG_NET_IPIP is not set
313# CONFIG_NET_IPGRE is not set
314# CONFIG_ARPD is not set
315# CONFIG_SYN_COOKIES is not set
316# CONFIG_INET_AH is not set
317# CONFIG_INET_ESP is not set
318# CONFIG_INET_IPCOMP is not set
319# CONFIG_INET_TUNNEL is not set
320CONFIG_IP_TCPDIAG=y
321# CONFIG_IP_TCPDIAG_IPV6 is not set
322# CONFIG_IPV6 is not set
323# CONFIG_NETFILTER is not set
324
325#
326# SCTP Configuration (EXPERIMENTAL)
327#
328# CONFIG_IP_SCTP is not set
329# CONFIG_ATM is not set
330# CONFIG_BRIDGE is not set
331# CONFIG_VLAN_8021Q is not set
332# CONFIG_DECNET is not set
333# CONFIG_LLC2 is not set
334# CONFIG_IPX is not set
335# CONFIG_ATALK is not set
336# CONFIG_X25 is not set
337# CONFIG_LAPB is not set
338# CONFIG_NET_DIVERT is not set
339# CONFIG_ECONET is not set
340# CONFIG_WAN_ROUTER is not set
341
342#
343# QoS and/or fair queueing
344#
345# CONFIG_NET_SCHED is not set
346# CONFIG_NET_CLS_ROUTE is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_NETPOLL is not set
353# CONFIG_NET_POLL_CONTROLLER is not set
354# CONFIG_HAMRADIO is not set
355# CONFIG_IRDA is not set
356# CONFIG_BT is not set
357CONFIG_NETDEVICES=y 436CONFIG_NETDEVICES=y
358# CONFIG_DUMMY is not set 437# CONFIG_DUMMY is not set
359# CONFIG_BONDING is not set 438# CONFIG_BONDING is not set
@@ -361,6 +440,10 @@ CONFIG_NETDEVICES=y
361# CONFIG_TUN is not set 440# CONFIG_TUN is not set
362 441
363# 442#
443# PHY device support
444#
445
446#
364# Ethernet (10 or 100Mbit) 447# Ethernet (10 or 100Mbit)
365# 448#
366# CONFIG_NET_ETHERNET is not set 449# CONFIG_NET_ETHERNET is not set
@@ -396,6 +479,8 @@ CONFIG_NE2000=y
396# CONFIG_SLIP is not set 479# CONFIG_SLIP is not set
397# CONFIG_SHAPER is not set 480# CONFIG_SHAPER is not set
398# CONFIG_NETCONSOLE is not set 481# CONFIG_NETCONSOLE is not set
482# CONFIG_NETPOLL is not set
483# CONFIG_NET_POLL_CONTROLLER is not set
399 484
400# 485#
401# ISDN subsystem 486# ISDN subsystem
@@ -411,6 +496,7 @@ CONFIG_NE2000=y
411# Input device support 496# Input device support
412# 497#
413CONFIG_INPUT=y 498CONFIG_INPUT=y
499# CONFIG_INPUT_FF_MEMLESS is not set
414 500
415# 501#
416# Userland interfaces 502# Userland interfaces
@@ -442,7 +528,6 @@ CONFIG_SERIO=y
442# CONFIG_SERIO_LIBPS2 is not set 528# CONFIG_SERIO_LIBPS2 is not set
443# CONFIG_SERIO_RAW is not set 529# CONFIG_SERIO_RAW is not set
444# CONFIG_GAMEPORT is not set 530# CONFIG_GAMEPORT is not set
445CONFIG_SOUND_GAMEPORT=y
446 531
447# 532#
448# Character devices 533# Character devices
@@ -462,7 +547,6 @@ CONFIG_SERIAL_CORE=y
462CONFIG_SERIAL_CORE_CONSOLE=y 547CONFIG_SERIAL_CORE_CONSOLE=y
463CONFIG_SERIAL_M32R_SIO=y 548CONFIG_SERIAL_M32R_SIO=y
464CONFIG_SERIAL_M32R_SIO_CONSOLE=y 549CONFIG_SERIAL_M32R_SIO_CONSOLE=y
465# CONFIG_SERIAL_M32R_PLDSIO is not set
466CONFIG_UNIX98_PTYS=y 550CONFIG_UNIX98_PTYS=y
467CONFIG_LEGACY_PTYS=y 551CONFIG_LEGACY_PTYS=y
468CONFIG_LEGACY_PTY_COUNT=256 552CONFIG_LEGACY_PTY_COUNT=256
@@ -476,25 +560,27 @@ CONFIG_LEGACY_PTY_COUNT=256
476# Watchdog Cards 560# Watchdog Cards
477# 561#
478# CONFIG_WATCHDOG is not set 562# CONFIG_WATCHDOG is not set
563CONFIG_HW_RANDOM=y
479# CONFIG_RTC is not set 564# CONFIG_RTC is not set
480# CONFIG_GEN_RTC is not set
481# CONFIG_DTLK is not set 565# CONFIG_DTLK is not set
482# CONFIG_R3964 is not set 566# CONFIG_R3964 is not set
483 567
484# 568#
485# Ftape, the floppy tape device driver 569# Ftape, the floppy tape device driver
486# 570#
487# CONFIG_DRM is not set
488 571
489# 572#
490# PCMCIA character devices 573# PCMCIA character devices
491# 574#
492# CONFIG_SYNCLINK_CS is not set 575# CONFIG_SYNCLINK_CS is not set
576# CONFIG_CARDMAN_4000 is not set
577# CONFIG_CARDMAN_4040 is not set
493# CONFIG_RAW_DRIVER is not set 578# CONFIG_RAW_DRIVER is not set
494 579
495# 580#
496# TPM devices 581# TPM devices
497# 582#
583# CONFIG_TCG_TPM is not set
498 584
499# 585#
500# I2C support 586# I2C support
@@ -502,13 +588,25 @@ CONFIG_LEGACY_PTY_COUNT=256
502# CONFIG_I2C is not set 588# CONFIG_I2C is not set
503 589
504# 590#
591# SPI support
592#
593# CONFIG_SPI is not set
594# CONFIG_SPI_MASTER is not set
595
596#
505# Dallas's 1-wire bus 597# Dallas's 1-wire bus
506# 598#
507# CONFIG_W1 is not set 599# CONFIG_W1 is not set
508 600
509# 601#
510# Misc devices 602# Hardware Monitoring support
511# 603#
604CONFIG_HWMON=y
605# CONFIG_HWMON_VID is not set
606# CONFIG_SENSORS_ABITUGURU is not set
607# CONFIG_SENSORS_F71805F is not set
608# CONFIG_SENSORS_VT1211 is not set
609# CONFIG_HWMON_DEBUG_CHIP is not set
512 610
513# 611#
514# Multimedia devices 612# Multimedia devices
@@ -523,7 +621,9 @@ CONFIG_LEGACY_PTY_COUNT=256
523# 621#
524# Graphics support 622# Graphics support
525# 623#
624CONFIG_FIRMWARE_EDID=y
526# CONFIG_FB is not set 625# CONFIG_FB is not set
626# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
527 627
528# 628#
529# Sound 629# Sound
@@ -535,6 +635,11 @@ CONFIG_LEGACY_PTY_COUNT=256
535# 635#
536# CONFIG_USB_ARCH_HAS_HCD is not set 636# CONFIG_USB_ARCH_HAS_HCD is not set
537# CONFIG_USB_ARCH_HAS_OHCI is not set 637# CONFIG_USB_ARCH_HAS_OHCI is not set
638# CONFIG_USB_ARCH_HAS_EHCI is not set
639
640#
641# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
642#
538 643
539# 644#
540# USB Gadget Support 645# USB Gadget Support
@@ -547,30 +652,73 @@ CONFIG_LEGACY_PTY_COUNT=256
547# CONFIG_MMC is not set 652# CONFIG_MMC is not set
548 653
549# 654#
655# LED devices
656#
657# CONFIG_NEW_LEDS is not set
658
659#
660# LED drivers
661#
662
663#
664# LED Triggers
665#
666
667#
550# InfiniBand support 668# InfiniBand support
551# 669#
552# CONFIG_INFINIBAND is not set 670
671#
672# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
673#
674
675#
676# Real Time Clock
677#
678# CONFIG_RTC_CLASS is not set
679
680#
681# DMA Engine support
682#
683# CONFIG_DMA_ENGINE is not set
684
685#
686# DMA Clients
687#
688
689#
690# DMA Devices
691#
553 692
554# 693#
555# File systems 694# File systems
556# 695#
557CONFIG_EXT2_FS=y 696CONFIG_EXT2_FS=y
558# CONFIG_EXT2_FS_XATTR is not set 697# CONFIG_EXT2_FS_XATTR is not set
559# CONFIG_EXT3_FS is not set 698# CONFIG_EXT2_FS_XIP is not set
560# CONFIG_JBD is not set 699CONFIG_EXT3_FS=y
700CONFIG_EXT3_FS_XATTR=y
701# CONFIG_EXT3_FS_POSIX_ACL is not set
702# CONFIG_EXT3_FS_SECURITY is not set
703# CONFIG_EXT4DEV_FS is not set
704CONFIG_JBD=y
705# CONFIG_JBD_DEBUG is not set
706CONFIG_FS_MBCACHE=y
561# CONFIG_REISERFS_FS is not set 707# CONFIG_REISERFS_FS is not set
562# CONFIG_JFS_FS is not set 708# CONFIG_JFS_FS is not set
563 709# CONFIG_FS_POSIX_ACL is not set
564#
565# XFS support
566#
567# CONFIG_XFS_FS is not set 710# CONFIG_XFS_FS is not set
711# CONFIG_GFS2_FS is not set
712# CONFIG_OCFS2_FS is not set
568# CONFIG_MINIX_FS is not set 713# CONFIG_MINIX_FS is not set
569CONFIG_ROMFS_FS=y 714CONFIG_ROMFS_FS=y
715CONFIG_INOTIFY=y
716CONFIG_INOTIFY_USER=y
570# CONFIG_QUOTA is not set 717# CONFIG_QUOTA is not set
571CONFIG_DNOTIFY=y 718CONFIG_DNOTIFY=y
572# CONFIG_AUTOFS_FS is not set 719# CONFIG_AUTOFS_FS is not set
573# CONFIG_AUTOFS4_FS is not set 720# CONFIG_AUTOFS4_FS is not set
721# CONFIG_FUSE_FS is not set
574 722
575# 723#
576# CD-ROM/DVD Filesystems 724# CD-ROM/DVD Filesystems
@@ -595,16 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
595# 743#
596CONFIG_PROC_FS=y 744CONFIG_PROC_FS=y
597CONFIG_PROC_KCORE=y 745CONFIG_PROC_KCORE=y
746CONFIG_PROC_SYSCTL=y
598CONFIG_SYSFS=y 747CONFIG_SYSFS=y
599CONFIG_DEVFS_FS=y
600CONFIG_DEVFS_MOUNT=y
601# CONFIG_DEVFS_DEBUG is not set
602# CONFIG_DEVPTS_FS_XATTR is not set
603CONFIG_TMPFS=y 748CONFIG_TMPFS=y
604# CONFIG_TMPFS_XATTR is not set 749# CONFIG_TMPFS_POSIX_ACL is not set
605# CONFIG_HUGETLBFS is not set
606# CONFIG_HUGETLB_PAGE is not set 750# CONFIG_HUGETLB_PAGE is not set
607CONFIG_RAMFS=y 751CONFIG_RAMFS=y
752# CONFIG_CONFIGFS_FS is not set
608 753
609# 754#
610# Miscellaneous filesystems 755# Miscellaneous filesystems
@@ -621,8 +766,9 @@ CONFIG_JFFS_FS_VERBOSE=0
621CONFIG_JFFS_PROC_FS=y 766CONFIG_JFFS_PROC_FS=y
622CONFIG_JFFS2_FS=y 767CONFIG_JFFS2_FS=y
623CONFIG_JFFS2_FS_DEBUG=0 768CONFIG_JFFS2_FS_DEBUG=0
624# CONFIG_JFFS2_FS_NAND is not set 769CONFIG_JFFS2_FS_WRITEBUFFER=y
625# CONFIG_JFFS2_FS_NOR_ECC is not set 770# CONFIG_JFFS2_SUMMARY is not set
771# CONFIG_JFFS2_FS_XATTR is not set
626# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 772# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
627CONFIG_JFFS2_ZLIB=y 773CONFIG_JFFS2_ZLIB=y
628CONFIG_JFFS2_RTIME=y 774CONFIG_JFFS2_RTIME=y
@@ -639,12 +785,14 @@ CONFIG_JFFS2_RTIME=y
639# 785#
640CONFIG_NFS_FS=y 786CONFIG_NFS_FS=y
641CONFIG_NFS_V3=y 787CONFIG_NFS_V3=y
788# CONFIG_NFS_V3_ACL is not set
642# CONFIG_NFS_V4 is not set 789# CONFIG_NFS_V4 is not set
643# CONFIG_NFS_DIRECTIO is not set 790# CONFIG_NFS_DIRECTIO is not set
644# CONFIG_NFSD is not set 791# CONFIG_NFSD is not set
645CONFIG_ROOT_NFS=y 792CONFIG_ROOT_NFS=y
646CONFIG_LOCKD=y 793CONFIG_LOCKD=y
647CONFIG_LOCKD_V4=y 794CONFIG_LOCKD_V4=y
795CONFIG_NFS_COMMON=y
648CONFIG_SUNRPC=y 796CONFIG_SUNRPC=y
649# CONFIG_RPCSEC_GSS_KRB5 is not set 797# CONFIG_RPCSEC_GSS_KRB5 is not set
650# CONFIG_RPCSEC_GSS_SPKM3 is not set 798# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -653,6 +801,7 @@ CONFIG_SUNRPC=y
653# CONFIG_NCP_FS is not set 801# CONFIG_NCP_FS is not set
654# CONFIG_CODA_FS is not set 802# CONFIG_CODA_FS is not set
655# CONFIG_AFS_FS is not set 803# CONFIG_AFS_FS is not set
804# CONFIG_9P_FS is not set
656 805
657# 806#
658# Partition Types 807# Partition Types
@@ -713,10 +862,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
713# Kernel hacking 862# Kernel hacking
714# 863#
715# CONFIG_PRINTK_TIME is not set 864# CONFIG_PRINTK_TIME is not set
865CONFIG_ENABLE_MUST_CHECK=y
866# CONFIG_MAGIC_SYSRQ is not set
867# CONFIG_UNUSED_SYMBOLS is not set
716# CONFIG_DEBUG_KERNEL is not set 868# CONFIG_DEBUG_KERNEL is not set
717CONFIG_LOG_BUF_SHIFT=15 869CONFIG_LOG_BUF_SHIFT=15
718# CONFIG_DEBUG_BUGVERBOSE is not set 870# CONFIG_DEBUG_BUGVERBOSE is not set
871# CONFIG_DEBUG_FS is not set
719# CONFIG_FRAME_POINTER is not set 872# CONFIG_FRAME_POINTER is not set
873# CONFIG_UNWIND_INFO is not set
874# CONFIG_HEADERS_CHECK is not set
720 875
721# 876#
722# Security options 877# Security options
@@ -730,13 +885,10 @@ CONFIG_LOG_BUF_SHIFT=15
730# CONFIG_CRYPTO is not set 885# CONFIG_CRYPTO is not set
731 886
732# 887#
733# Hardware crypto devices
734#
735
736#
737# Library routines 888# Library routines
738# 889#
739# CONFIG_CRC_CCITT is not set 890# CONFIG_CRC_CCITT is not set
891# CONFIG_CRC16 is not set
740CONFIG_CRC32=y 892CONFIG_CRC32=y
741# CONFIG_LIBCRC32C is not set 893# CONFIG_LIBCRC32C is not set
742CONFIG_ZLIB_INFLATE=y 894CONFIG_ZLIB_INFLATE=y
diff --git a/arch/m32r/mappi/defconfig.up b/arch/m32r/mappi/defconfig.up
index 38910fb76692..5ba00603c1a0 100644
--- a/arch/m32r/mappi/defconfig.up
+++ b/arch/m32r/mappi/defconfig.up
@@ -1,20 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:21:59 2005 4# Wed Dec 13 17:51:20 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16# CONFIG_CLEAN_COMPILE is not set
17CONFIG_BROKEN=y
18CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 17CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -23,31 +21,38 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
23# General setup 21# General setup
24# 22#
25CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y 25CONFIG_SWAP=y
27CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set
28# CONFIG_POSIX_MQUEUE is not set 28# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set 29# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y 30# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 32# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 33CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y 34CONFIG_IKCONFIG_PROC=y
35CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y
36CONFIG_EMBEDDED=y 40CONFIG_EMBEDDED=y
41CONFIG_SYSCTL_SYSCALL=y
37# CONFIG_KALLSYMS is not set 42# CONFIG_KALLSYMS is not set
43CONFIG_HOTPLUG=y
38CONFIG_PRINTK=y 44CONFIG_PRINTK=y
39CONFIG_BUG=y 45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
40CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
41# CONFIG_FUTEX is not set 48# CONFIG_FUTEX is not set
42# CONFIG_EPOLL is not set 49# CONFIG_EPOLL is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SHMEM=y 50CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_SLAB=y
46CONFIG_CC_ALIGN_LABELS=0 52CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49# CONFIG_TINY_SHMEM is not set 53# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0 54CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
51 56
52# 57#
53# Loadable module support 58# Loadable module support
@@ -55,12 +60,30 @@ CONFIG_BASE_SMALL=0
55CONFIG_MODULES=y 60CONFIG_MODULES=y
56CONFIG_MODULE_UNLOAD=y 61CONFIG_MODULE_UNLOAD=y
57# CONFIG_MODULE_FORCE_UNLOAD is not set 62# CONFIG_MODULE_FORCE_UNLOAD is not set
58CONFIG_OBSOLETE_MODPARM=y
59# CONFIG_MODVERSIONS is not set 63# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set 64# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y 65CONFIG_KMOD=y
62 66
63# 67#
68# Block layer
69#
70CONFIG_BLOCK=y
71# CONFIG_BLK_DEV_IO_TRACE is not set
72
73#
74# IO Schedulers
75#
76CONFIG_IOSCHED_NOOP=y
77# CONFIG_IOSCHED_AS is not set
78CONFIG_IOSCHED_DEADLINE=y
79CONFIG_IOSCHED_CFQ=y
80# CONFIG_DEFAULT_AS is not set
81# CONFIG_DEFAULT_DEADLINE is not set
82CONFIG_DEFAULT_CFQ=y
83# CONFIG_DEFAULT_NOOP is not set
84CONFIG_DEFAULT_IOSCHED="cfq"
85
86#
64# Processor type and features 87# Processor type and features
65# 88#
66CONFIG_PLAT_MAPPI=y 89CONFIG_PLAT_MAPPI=y
@@ -70,8 +93,10 @@ CONFIG_PLAT_MAPPI=y
70# CONFIG_PLAT_OAKS32R is not set 93# CONFIG_PLAT_OAKS32R is not set
71# CONFIG_PLAT_MAPPI2 is not set 94# CONFIG_PLAT_MAPPI2 is not set
72# CONFIG_PLAT_MAPPI3 is not set 95# CONFIG_PLAT_MAPPI3 is not set
96# CONFIG_PLAT_M32104UT is not set
73CONFIG_CHIP_M32700=y 97CONFIG_CHIP_M32700=y
74# CONFIG_CHIP_M32102 is not set 98# CONFIG_CHIP_M32102 is not set
99# CONFIG_CHIP_M32104 is not set
75# CONFIG_CHIP_VDEC2 is not set 100# CONFIG_CHIP_VDEC2 is not set
76# CONFIG_CHIP_OPSP is not set 101# CONFIG_CHIP_OPSP is not set
77CONFIG_MMU=y 102CONFIG_MMU=y
@@ -85,20 +110,31 @@ CONFIG_TIMER_DIVIDE=128
85CONFIG_MEMORY_START=0x08000000 110CONFIG_MEMORY_START=0x08000000
86CONFIG_MEMORY_SIZE=0x04000000 111CONFIG_MEMORY_SIZE=0x04000000
87CONFIG_NOHIGHMEM=y 112CONFIG_NOHIGHMEM=y
113CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
114CONFIG_SELECT_MEMORY_MODEL=y
115# CONFIG_FLATMEM_MANUAL is not set
116CONFIG_DISCONTIGMEM_MANUAL=y
117# CONFIG_SPARSEMEM_MANUAL is not set
88CONFIG_DISCONTIGMEM=y 118CONFIG_DISCONTIGMEM=y
119CONFIG_FLAT_NODE_MEM_MAP=y
120CONFIG_NEED_MULTIPLE_NODES=y
121# CONFIG_SPARSEMEM_STATIC is not set
122CONFIG_SPLIT_PTLOCK_CPUS=4
123# CONFIG_RESOURCES_64BIT is not set
89CONFIG_IRAM_START=0x00f00000 124CONFIG_IRAM_START=0x00f00000
90CONFIG_IRAM_SIZE=0x00080000 125CONFIG_IRAM_SIZE=0x00080000
91CONFIG_RWSEM_GENERIC_SPINLOCK=y 126CONFIG_RWSEM_GENERIC_SPINLOCK=y
92# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 127# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
128CONFIG_GENERIC_FIND_NEXT_BIT=y
129CONFIG_GENERIC_HWEIGHT=y
93CONFIG_GENERIC_CALIBRATE_DELAY=y 130CONFIG_GENERIC_CALIBRATE_DELAY=y
94CONFIG_PREEMPT=y 131CONFIG_PREEMPT=y
95# CONFIG_HAVE_DEC_LOCK is not set
96# CONFIG_SMP is not set 132# CONFIG_SMP is not set
133CONFIG_NODES_SHIFT=1
97 134
98# 135#
99# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 136# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
100# 137#
101# CONFIG_PCI is not set
102# CONFIG_ISA is not set 138# CONFIG_ISA is not set
103 139
104# 140#
@@ -107,12 +143,14 @@ CONFIG_PREEMPT=y
107CONFIG_PCCARD=y 143CONFIG_PCCARD=y
108# CONFIG_PCMCIA_DEBUG is not set 144# CONFIG_PCMCIA_DEBUG is not set
109CONFIG_PCMCIA=y 145CONFIG_PCMCIA=y
146CONFIG_PCMCIA_LOAD_CIS=y
147CONFIG_PCMCIA_IOCTL=y
110 148
111# 149#
112# PC-card bridges 150# PC-card bridges
113# 151#
114# CONFIG_TCIC is not set
115CONFIG_M32R_PCC=y 152CONFIG_M32R_PCC=y
153CONFIG_PCCARD_NONSTATIC=y
116 154
117# 155#
118# PCI Hotplug Support 156# PCI Hotplug Support
@@ -125,6 +163,93 @@ CONFIG_BINFMT_ELF=y
125# CONFIG_BINFMT_MISC is not set 163# CONFIG_BINFMT_MISC is not set
126 164
127# 165#
166# Networking
167#
168CONFIG_NET=y
169
170#
171# Networking options
172#
173# CONFIG_NETDEBUG is not set
174# CONFIG_PACKET is not set
175CONFIG_UNIX=y
176CONFIG_XFRM=y
177# CONFIG_XFRM_USER is not set
178# CONFIG_XFRM_SUB_POLICY is not set
179# CONFIG_NET_KEY is not set
180CONFIG_INET=y
181# CONFIG_IP_MULTICAST is not set
182# CONFIG_IP_ADVANCED_ROUTER is not set
183CONFIG_IP_FIB_HASH=y
184CONFIG_IP_PNP=y
185CONFIG_IP_PNP_DHCP=y
186# CONFIG_IP_PNP_BOOTP is not set
187# CONFIG_IP_PNP_RARP is not set
188# CONFIG_NET_IPIP is not set
189# CONFIG_NET_IPGRE is not set
190# CONFIG_ARPD is not set
191# CONFIG_SYN_COOKIES is not set
192# CONFIG_INET_AH is not set
193# CONFIG_INET_ESP is not set
194# CONFIG_INET_IPCOMP is not set
195# CONFIG_INET_XFRM_TUNNEL is not set
196# CONFIG_INET_TUNNEL is not set
197CONFIG_INET_XFRM_MODE_TRANSPORT=y
198CONFIG_INET_XFRM_MODE_TUNNEL=y
199CONFIG_INET_XFRM_MODE_BEET=y
200CONFIG_INET_DIAG=y
201CONFIG_INET_TCP_DIAG=y
202# CONFIG_TCP_CONG_ADVANCED is not set
203CONFIG_TCP_CONG_CUBIC=y
204CONFIG_DEFAULT_TCP_CONG="cubic"
205# CONFIG_TCP_MD5SIG is not set
206# CONFIG_IPV6 is not set
207# CONFIG_INET6_XFRM_TUNNEL is not set
208# CONFIG_INET6_TUNNEL is not set
209# CONFIG_NETWORK_SECMARK is not set
210# CONFIG_NETFILTER is not set
211
212#
213# DCCP Configuration (EXPERIMENTAL)
214#
215# CONFIG_IP_DCCP is not set
216
217#
218# SCTP Configuration (EXPERIMENTAL)
219#
220# CONFIG_IP_SCTP is not set
221
222#
223# TIPC Configuration (EXPERIMENTAL)
224#
225# CONFIG_TIPC is not set
226# CONFIG_ATM is not set
227# CONFIG_BRIDGE is not set
228# CONFIG_VLAN_8021Q is not set
229# CONFIG_DECNET is not set
230# CONFIG_LLC2 is not set
231# CONFIG_IPX is not set
232# CONFIG_ATALK is not set
233# CONFIG_X25 is not set
234# CONFIG_LAPB is not set
235# CONFIG_ECONET is not set
236# CONFIG_WAN_ROUTER is not set
237
238#
239# QoS and/or fair queueing
240#
241# CONFIG_NET_SCHED is not set
242
243#
244# Network testing
245#
246# CONFIG_NET_PKTGEN is not set
247# CONFIG_HAMRADIO is not set
248# CONFIG_IRDA is not set
249# CONFIG_BT is not set
250# CONFIG_IEEE80211 is not set
251
252#
128# Device Drivers 253# Device Drivers
129# 254#
130 255
@@ -133,7 +258,13 @@ CONFIG_BINFMT_ELF=y
133# 258#
134# CONFIG_STANDALONE is not set 259# CONFIG_STANDALONE is not set
135CONFIG_PREVENT_FIRMWARE_BUILD=y 260CONFIG_PREVENT_FIRMWARE_BUILD=y
136# CONFIG_FW_LOADER is not set 261CONFIG_FW_LOADER=y
262# CONFIG_SYS_HYPERVISOR is not set
263
264#
265# Connector - unified userspace <-> kernelspace linker
266#
267# CONFIG_CONNECTOR is not set
137 268
138# 269#
139# Memory Technology Devices (MTD) 270# Memory Technology Devices (MTD)
@@ -156,6 +287,8 @@ CONFIG_MTD_BLOCK=y
156# CONFIG_FTL is not set 287# CONFIG_FTL is not set
157# CONFIG_NFTL is not set 288# CONFIG_NFTL is not set
158# CONFIG_INFTL is not set 289# CONFIG_INFTL is not set
290# CONFIG_RFD_FTL is not set
291# CONFIG_SSFDC is not set
159 292
160# 293#
161# RAM/ROM/Flash chip drivers 294# RAM/ROM/Flash chip drivers
@@ -181,6 +314,7 @@ CONFIG_MTD_CFI_I2=y
181# Mapping drivers for chip access 314# Mapping drivers for chip access
182# 315#
183# CONFIG_MTD_COMPLEX_MAPPINGS is not set 316# CONFIG_MTD_COMPLEX_MAPPINGS is not set
317# CONFIG_MTD_PLATRAM is not set
184 318
185# 319#
186# Self-contained MTD device drivers 320# Self-contained MTD device drivers
@@ -188,7 +322,6 @@ CONFIG_MTD_CFI_I2=y
188# CONFIG_MTD_SLRAM is not set 322# CONFIG_MTD_SLRAM is not set
189# CONFIG_MTD_PHRAM is not set 323# CONFIG_MTD_PHRAM is not set
190# CONFIG_MTD_MTDRAM is not set 324# CONFIG_MTD_MTDRAM is not set
191# CONFIG_MTD_BLKMTD is not set
192# CONFIG_MTD_BLOCK2MTD is not set 325# CONFIG_MTD_BLOCK2MTD is not set
193 326
194# 327#
@@ -204,6 +337,11 @@ CONFIG_MTD_CFI_I2=y
204# CONFIG_MTD_NAND is not set 337# CONFIG_MTD_NAND is not set
205 338
206# 339#
340# OneNAND Flash Device Drivers
341#
342# CONFIG_MTD_ONENAND is not set
343
344#
207# Parallel port support 345# Parallel port support
208# 346#
209# CONFIG_PARPORT is not set 347# CONFIG_PARPORT is not set
@@ -215,7 +353,6 @@ CONFIG_MTD_CFI_I2=y
215# 353#
216# Block devices 354# Block devices
217# 355#
218# CONFIG_BLK_DEV_FD is not set
219# CONFIG_BLK_DEV_COW_COMMON is not set 356# CONFIG_BLK_DEV_COW_COMMON is not set
220CONFIG_BLK_DEV_LOOP=y 357CONFIG_BLK_DEV_LOOP=y
221# CONFIG_BLK_DEV_CRYPTOLOOP is not set 358# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -223,23 +360,21 @@ CONFIG_BLK_DEV_NBD=m
223CONFIG_BLK_DEV_RAM=y 360CONFIG_BLK_DEV_RAM=y
224CONFIG_BLK_DEV_RAM_COUNT=16 361CONFIG_BLK_DEV_RAM_COUNT=16
225CONFIG_BLK_DEV_RAM_SIZE=4096 362CONFIG_BLK_DEV_RAM_SIZE=4096
363CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
226CONFIG_BLK_DEV_INITRD=y 364CONFIG_BLK_DEV_INITRD=y
227CONFIG_INITRAMFS_SOURCE=""
228# CONFIG_CDROM_PKTCDVD is not set 365# CONFIG_CDROM_PKTCDVD is not set
366# CONFIG_ATA_OVER_ETH is not set
229 367
230# 368#
231# IO Schedulers 369# Misc devices
232# 370#
233CONFIG_IOSCHED_NOOP=y 371# CONFIG_TIFM_CORE is not set
234# CONFIG_IOSCHED_AS is not set
235CONFIG_IOSCHED_DEADLINE=y
236CONFIG_IOSCHED_CFQ=y
237# CONFIG_ATA_OVER_ETH is not set
238 372
239# 373#
240# ATA/ATAPI/MFM/RLL support 374# ATA/ATAPI/MFM/RLL support
241# 375#
242CONFIG_IDE=m 376CONFIG_IDE=m
377CONFIG_IDE_MAX_HWIFS=4
243CONFIG_BLK_DEV_IDE=m 378CONFIG_BLK_DEV_IDE=m
244 379
245# 380#
@@ -266,7 +401,13 @@ CONFIG_IDE_GENERIC=m
266# 401#
267# SCSI device support 402# SCSI device support
268# 403#
404# CONFIG_RAID_ATTRS is not set
269# CONFIG_SCSI is not set 405# CONFIG_SCSI is not set
406# CONFIG_SCSI_NETLINK is not set
407
408#
409# Serial ATA (prod) and Parallel ATA (experimental) drivers
410#
270 411
271# 412#
272# Multi-device support (RAID and LVM) 413# Multi-device support (RAID and LVM)
@@ -276,79 +417,19 @@ CONFIG_IDE_GENERIC=m
276# 417#
277# Fusion MPT device support 418# Fusion MPT device support
278# 419#
420# CONFIG_FUSION is not set
279 421
280# 422#
281# IEEE 1394 (FireWire) support 423# IEEE 1394 (FireWire) support
282# 424#
283# CONFIG_IEEE1394 is not set
284 425
285# 426#
286# I2O device support 427# I2O device support
287# 428#
288 429
289# 430#
290# Networking support 431# Network device support
291# 432#
292CONFIG_NET=y
293
294#
295# Networking options
296#
297# CONFIG_PACKET is not set
298CONFIG_UNIX=y
299# CONFIG_NET_KEY is not set
300CONFIG_INET=y
301# CONFIG_IP_MULTICAST is not set
302# CONFIG_IP_ADVANCED_ROUTER is not set
303CONFIG_IP_PNP=y
304CONFIG_IP_PNP_DHCP=y
305# CONFIG_IP_PNP_BOOTP is not set
306# CONFIG_IP_PNP_RARP is not set
307# CONFIG_NET_IPIP is not set
308# CONFIG_NET_IPGRE is not set
309# CONFIG_ARPD is not set
310# CONFIG_SYN_COOKIES is not set
311# CONFIG_INET_AH is not set
312# CONFIG_INET_ESP is not set
313# CONFIG_INET_IPCOMP is not set
314# CONFIG_INET_TUNNEL is not set
315CONFIG_IP_TCPDIAG=y
316# CONFIG_IP_TCPDIAG_IPV6 is not set
317# CONFIG_IPV6 is not set
318# CONFIG_NETFILTER is not set
319
320#
321# SCTP Configuration (EXPERIMENTAL)
322#
323# CONFIG_IP_SCTP is not set
324# CONFIG_ATM is not set
325# CONFIG_BRIDGE is not set
326# CONFIG_VLAN_8021Q is not set
327# CONFIG_DECNET is not set
328# CONFIG_LLC2 is not set
329# CONFIG_IPX is not set
330# CONFIG_ATALK is not set
331# CONFIG_X25 is not set
332# CONFIG_LAPB is not set
333# CONFIG_NET_DIVERT is not set
334# CONFIG_ECONET is not set
335# CONFIG_WAN_ROUTER is not set
336
337#
338# QoS and/or fair queueing
339#
340# CONFIG_NET_SCHED is not set
341# CONFIG_NET_CLS_ROUTE is not set
342
343#
344# Network testing
345#
346# CONFIG_NET_PKTGEN is not set
347# CONFIG_NETPOLL is not set
348# CONFIG_NET_POLL_CONTROLLER is not set
349# CONFIG_HAMRADIO is not set
350# CONFIG_IRDA is not set
351# CONFIG_BT is not set
352CONFIG_NETDEVICES=y 433CONFIG_NETDEVICES=y
353# CONFIG_DUMMY is not set 434# CONFIG_DUMMY is not set
354# CONFIG_BONDING is not set 435# CONFIG_BONDING is not set
@@ -356,6 +437,10 @@ CONFIG_NETDEVICES=y
356# CONFIG_TUN is not set 437# CONFIG_TUN is not set
357 438
358# 439#
440# PHY device support
441#
442
443#
359# Ethernet (10 or 100Mbit) 444# Ethernet (10 or 100Mbit)
360# 445#
361# CONFIG_NET_ETHERNET is not set 446# CONFIG_NET_ETHERNET is not set
@@ -391,6 +476,8 @@ CONFIG_NE2000=y
391# CONFIG_SLIP is not set 476# CONFIG_SLIP is not set
392# CONFIG_SHAPER is not set 477# CONFIG_SHAPER is not set
393# CONFIG_NETCONSOLE is not set 478# CONFIG_NETCONSOLE is not set
479# CONFIG_NETPOLL is not set
480# CONFIG_NET_POLL_CONTROLLER is not set
394 481
395# 482#
396# ISDN subsystem 483# ISDN subsystem
@@ -406,6 +493,7 @@ CONFIG_NE2000=y
406# Input device support 493# Input device support
407# 494#
408CONFIG_INPUT=y 495CONFIG_INPUT=y
496# CONFIG_INPUT_FF_MEMLESS is not set
409 497
410# 498#
411# Userland interfaces 499# Userland interfaces
@@ -437,7 +525,6 @@ CONFIG_SERIO=y
437# CONFIG_SERIO_LIBPS2 is not set 525# CONFIG_SERIO_LIBPS2 is not set
438# CONFIG_SERIO_RAW is not set 526# CONFIG_SERIO_RAW is not set
439# CONFIG_GAMEPORT is not set 527# CONFIG_GAMEPORT is not set
440CONFIG_SOUND_GAMEPORT=y
441 528
442# 529#
443# Character devices 530# Character devices
@@ -457,7 +544,6 @@ CONFIG_SERIAL_CORE=y
457CONFIG_SERIAL_CORE_CONSOLE=y 544CONFIG_SERIAL_CORE_CONSOLE=y
458CONFIG_SERIAL_M32R_SIO=y 545CONFIG_SERIAL_M32R_SIO=y
459CONFIG_SERIAL_M32R_SIO_CONSOLE=y 546CONFIG_SERIAL_M32R_SIO_CONSOLE=y
460# CONFIG_SERIAL_M32R_PLDSIO is not set
461CONFIG_UNIX98_PTYS=y 547CONFIG_UNIX98_PTYS=y
462CONFIG_LEGACY_PTYS=y 548CONFIG_LEGACY_PTYS=y
463CONFIG_LEGACY_PTY_COUNT=256 549CONFIG_LEGACY_PTY_COUNT=256
@@ -471,25 +557,27 @@ CONFIG_LEGACY_PTY_COUNT=256
471# Watchdog Cards 557# Watchdog Cards
472# 558#
473# CONFIG_WATCHDOG is not set 559# CONFIG_WATCHDOG is not set
560CONFIG_HW_RANDOM=y
474# CONFIG_RTC is not set 561# CONFIG_RTC is not set
475# CONFIG_GEN_RTC is not set
476# CONFIG_DTLK is not set 562# CONFIG_DTLK is not set
477# CONFIG_R3964 is not set 563# CONFIG_R3964 is not set
478 564
479# 565#
480# Ftape, the floppy tape device driver 566# Ftape, the floppy tape device driver
481# 567#
482# CONFIG_DRM is not set
483 568
484# 569#
485# PCMCIA character devices 570# PCMCIA character devices
486# 571#
487# CONFIG_SYNCLINK_CS is not set 572# CONFIG_SYNCLINK_CS is not set
573# CONFIG_CARDMAN_4000 is not set
574# CONFIG_CARDMAN_4040 is not set
488# CONFIG_RAW_DRIVER is not set 575# CONFIG_RAW_DRIVER is not set
489 576
490# 577#
491# TPM devices 578# TPM devices
492# 579#
580# CONFIG_TCG_TPM is not set
493 581
494# 582#
495# I2C support 583# I2C support
@@ -497,13 +585,25 @@ CONFIG_LEGACY_PTY_COUNT=256
497# CONFIG_I2C is not set 585# CONFIG_I2C is not set
498 586
499# 587#
588# SPI support
589#
590# CONFIG_SPI is not set
591# CONFIG_SPI_MASTER is not set
592
593#
500# Dallas's 1-wire bus 594# Dallas's 1-wire bus
501# 595#
502# CONFIG_W1 is not set 596# CONFIG_W1 is not set
503 597
504# 598#
505# Misc devices 599# Hardware Monitoring support
506# 600#
601CONFIG_HWMON=y
602# CONFIG_HWMON_VID is not set
603# CONFIG_SENSORS_ABITUGURU is not set
604# CONFIG_SENSORS_F71805F is not set
605# CONFIG_SENSORS_VT1211 is not set
606# CONFIG_HWMON_DEBUG_CHIP is not set
507 607
508# 608#
509# Multimedia devices 609# Multimedia devices
@@ -518,7 +618,9 @@ CONFIG_LEGACY_PTY_COUNT=256
518# 618#
519# Graphics support 619# Graphics support
520# 620#
621CONFIG_FIRMWARE_EDID=y
521# CONFIG_FB is not set 622# CONFIG_FB is not set
623# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
522 624
523# 625#
524# Sound 626# Sound
@@ -530,6 +632,11 @@ CONFIG_LEGACY_PTY_COUNT=256
530# 632#
531# CONFIG_USB_ARCH_HAS_HCD is not set 633# CONFIG_USB_ARCH_HAS_HCD is not set
532# CONFIG_USB_ARCH_HAS_OHCI is not set 634# CONFIG_USB_ARCH_HAS_OHCI is not set
635# CONFIG_USB_ARCH_HAS_EHCI is not set
636
637#
638# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
639#
533 640
534# 641#
535# USB Gadget Support 642# USB Gadget Support
@@ -542,30 +649,73 @@ CONFIG_LEGACY_PTY_COUNT=256
542# CONFIG_MMC is not set 649# CONFIG_MMC is not set
543 650
544# 651#
652# LED devices
653#
654# CONFIG_NEW_LEDS is not set
655
656#
657# LED drivers
658#
659
660#
661# LED Triggers
662#
663
664#
545# InfiniBand support 665# InfiniBand support
546# 666#
547# CONFIG_INFINIBAND is not set 667
668#
669# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
670#
671
672#
673# Real Time Clock
674#
675# CONFIG_RTC_CLASS is not set
676
677#
678# DMA Engine support
679#
680# CONFIG_DMA_ENGINE is not set
681
682#
683# DMA Clients
684#
685
686#
687# DMA Devices
688#
548 689
549# 690#
550# File systems 691# File systems
551# 692#
552CONFIG_EXT2_FS=y 693CONFIG_EXT2_FS=y
553# CONFIG_EXT2_FS_XATTR is not set 694# CONFIG_EXT2_FS_XATTR is not set
554# CONFIG_EXT3_FS is not set 695# CONFIG_EXT2_FS_XIP is not set
555# CONFIG_JBD is not set 696CONFIG_EXT3_FS=y
697CONFIG_EXT3_FS_XATTR=y
698# CONFIG_EXT3_FS_POSIX_ACL is not set
699# CONFIG_EXT3_FS_SECURITY is not set
700# CONFIG_EXT4DEV_FS is not set
701CONFIG_JBD=y
702# CONFIG_JBD_DEBUG is not set
703CONFIG_FS_MBCACHE=y
556# CONFIG_REISERFS_FS is not set 704# CONFIG_REISERFS_FS is not set
557# CONFIG_JFS_FS is not set 705# CONFIG_JFS_FS is not set
558 706# CONFIG_FS_POSIX_ACL is not set
559#
560# XFS support
561#
562# CONFIG_XFS_FS is not set 707# CONFIG_XFS_FS is not set
708# CONFIG_GFS2_FS is not set
709# CONFIG_OCFS2_FS is not set
563# CONFIG_MINIX_FS is not set 710# CONFIG_MINIX_FS is not set
564CONFIG_ROMFS_FS=y 711CONFIG_ROMFS_FS=y
712CONFIG_INOTIFY=y
713CONFIG_INOTIFY_USER=y
565# CONFIG_QUOTA is not set 714# CONFIG_QUOTA is not set
566CONFIG_DNOTIFY=y 715CONFIG_DNOTIFY=y
567# CONFIG_AUTOFS_FS is not set 716# CONFIG_AUTOFS_FS is not set
568# CONFIG_AUTOFS4_FS is not set 717# CONFIG_AUTOFS4_FS is not set
718# CONFIG_FUSE_FS is not set
569 719
570# 720#
571# CD-ROM/DVD Filesystems 721# CD-ROM/DVD Filesystems
@@ -590,16 +740,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
590# 740#
591CONFIG_PROC_FS=y 741CONFIG_PROC_FS=y
592CONFIG_PROC_KCORE=y 742CONFIG_PROC_KCORE=y
743CONFIG_PROC_SYSCTL=y
593CONFIG_SYSFS=y 744CONFIG_SYSFS=y
594CONFIG_DEVFS_FS=y
595CONFIG_DEVFS_MOUNT=y
596# CONFIG_DEVFS_DEBUG is not set
597# CONFIG_DEVPTS_FS_XATTR is not set
598CONFIG_TMPFS=y 745CONFIG_TMPFS=y
599# CONFIG_TMPFS_XATTR is not set 746# CONFIG_TMPFS_POSIX_ACL is not set
600# CONFIG_HUGETLBFS is not set
601# CONFIG_HUGETLB_PAGE is not set 747# CONFIG_HUGETLB_PAGE is not set
602CONFIG_RAMFS=y 748CONFIG_RAMFS=y
749# CONFIG_CONFIGFS_FS is not set
603 750
604# 751#
605# Miscellaneous filesystems 752# Miscellaneous filesystems
@@ -616,8 +763,9 @@ CONFIG_JFFS_FS_VERBOSE=0
616CONFIG_JFFS_PROC_FS=y 763CONFIG_JFFS_PROC_FS=y
617CONFIG_JFFS2_FS=y 764CONFIG_JFFS2_FS=y
618CONFIG_JFFS2_FS_DEBUG=0 765CONFIG_JFFS2_FS_DEBUG=0
619# CONFIG_JFFS2_FS_NAND is not set 766CONFIG_JFFS2_FS_WRITEBUFFER=y
620# CONFIG_JFFS2_FS_NOR_ECC is not set 767# CONFIG_JFFS2_SUMMARY is not set
768# CONFIG_JFFS2_FS_XATTR is not set
621# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 769# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
622CONFIG_JFFS2_ZLIB=y 770CONFIG_JFFS2_ZLIB=y
623CONFIG_JFFS2_RTIME=y 771CONFIG_JFFS2_RTIME=y
@@ -634,12 +782,14 @@ CONFIG_JFFS2_RTIME=y
634# 782#
635CONFIG_NFS_FS=y 783CONFIG_NFS_FS=y
636CONFIG_NFS_V3=y 784CONFIG_NFS_V3=y
785# CONFIG_NFS_V3_ACL is not set
637# CONFIG_NFS_V4 is not set 786# CONFIG_NFS_V4 is not set
638# CONFIG_NFS_DIRECTIO is not set 787# CONFIG_NFS_DIRECTIO is not set
639# CONFIG_NFSD is not set 788# CONFIG_NFSD is not set
640CONFIG_ROOT_NFS=y 789CONFIG_ROOT_NFS=y
641CONFIG_LOCKD=y 790CONFIG_LOCKD=y
642CONFIG_LOCKD_V4=y 791CONFIG_LOCKD_V4=y
792CONFIG_NFS_COMMON=y
643CONFIG_SUNRPC=y 793CONFIG_SUNRPC=y
644# CONFIG_RPCSEC_GSS_KRB5 is not set 794# CONFIG_RPCSEC_GSS_KRB5 is not set
645# CONFIG_RPCSEC_GSS_SPKM3 is not set 795# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -648,6 +798,7 @@ CONFIG_SUNRPC=y
648# CONFIG_NCP_FS is not set 798# CONFIG_NCP_FS is not set
649# CONFIG_CODA_FS is not set 799# CONFIG_CODA_FS is not set
650# CONFIG_AFS_FS is not set 800# CONFIG_AFS_FS is not set
801# CONFIG_9P_FS is not set
651 802
652# 803#
653# Partition Types 804# Partition Types
@@ -708,10 +859,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
708# Kernel hacking 859# Kernel hacking
709# 860#
710# CONFIG_PRINTK_TIME is not set 861# CONFIG_PRINTK_TIME is not set
862CONFIG_ENABLE_MUST_CHECK=y
863# CONFIG_MAGIC_SYSRQ is not set
864# CONFIG_UNUSED_SYMBOLS is not set
711# CONFIG_DEBUG_KERNEL is not set 865# CONFIG_DEBUG_KERNEL is not set
712CONFIG_LOG_BUF_SHIFT=14 866CONFIG_LOG_BUF_SHIFT=14
713# CONFIG_DEBUG_BUGVERBOSE is not set 867# CONFIG_DEBUG_BUGVERBOSE is not set
868# CONFIG_DEBUG_FS is not set
714# CONFIG_FRAME_POINTER is not set 869# CONFIG_FRAME_POINTER is not set
870# CONFIG_UNWIND_INFO is not set
871# CONFIG_HEADERS_CHECK is not set
715 872
716# 873#
717# Security options 874# Security options
@@ -725,13 +882,10 @@ CONFIG_LOG_BUF_SHIFT=14
725# CONFIG_CRYPTO is not set 882# CONFIG_CRYPTO is not set
726 883
727# 884#
728# Hardware crypto devices
729#
730
731#
732# Library routines 885# Library routines
733# 886#
734# CONFIG_CRC_CCITT is not set 887# CONFIG_CRC_CCITT is not set
888# CONFIG_CRC16 is not set
735CONFIG_CRC32=y 889CONFIG_CRC32=y
736# CONFIG_LIBCRC32C is not set 890# CONFIG_LIBCRC32C is not set
737CONFIG_ZLIB_INFLATE=y 891CONFIG_ZLIB_INFLATE=y
diff --git a/arch/m32r/mappi2/defconfig.opsp b/arch/m32r/mappi2/defconfig.opsp
new file mode 100644
index 000000000000..b379ae96e6a7
--- /dev/null
+++ b/arch/m32r/mappi2/defconfig.opsp
@@ -0,0 +1,883 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19
4# Wed Dec 13 19:40:30 2006
5#
6CONFIG_M32R=y
7CONFIG_GENERIC_ISA_DMA=y
8CONFIG_GENERIC_HARDIRQS=y
9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11
12#
13# Code maturity level options
14#
15CONFIG_EXPERIMENTAL=y
16CONFIG_BROKEN_ON_SMP=y
17CONFIG_LOCK_KERNEL=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set
28# CONFIG_POSIX_MQUEUE is not set
29CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set
33# CONFIG_AUDIT is not set
34CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set
36CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y
41CONFIG_EMBEDDED=y
42CONFIG_SYSCTL_SYSCALL=y
43# CONFIG_KALLSYMS is not set
44CONFIG_HOTPLUG=y
45CONFIG_PRINTK=y
46CONFIG_BUG=y
47CONFIG_ELF_CORE=y
48CONFIG_BASE_FULL=y
49# CONFIG_FUTEX is not set
50# CONFIG_EPOLL is not set
51CONFIG_SHMEM=y
52CONFIG_SLAB=y
53CONFIG_VM_EVENT_COUNTERS=y
54# CONFIG_TINY_SHMEM is not set
55CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
57
58#
59# Loadable module support
60#
61CONFIG_MODULES=y
62CONFIG_MODULE_UNLOAD=y
63# CONFIG_MODULE_FORCE_UNLOAD is not set
64# CONFIG_MODVERSIONS is not set
65# CONFIG_MODULE_SRCVERSION_ALL is not set
66CONFIG_KMOD=y
67
68#
69# Block layer
70#
71CONFIG_BLOCK=y
72# CONFIG_BLK_DEV_IO_TRACE is not set
73
74#
75# IO Schedulers
76#
77CONFIG_IOSCHED_NOOP=y
78# CONFIG_IOSCHED_AS is not set
79CONFIG_IOSCHED_DEADLINE=y
80CONFIG_IOSCHED_CFQ=y
81# CONFIG_DEFAULT_AS is not set
82# CONFIG_DEFAULT_DEADLINE is not set
83CONFIG_DEFAULT_CFQ=y
84# CONFIG_DEFAULT_NOOP is not set
85CONFIG_DEFAULT_IOSCHED="cfq"
86
87#
88# Processor type and features
89#
90# CONFIG_PLAT_MAPPI is not set
91# CONFIG_PLAT_USRV is not set
92# CONFIG_PLAT_M32700UT is not set
93# CONFIG_PLAT_OPSPUT is not set
94# CONFIG_PLAT_OAKS32R is not set
95CONFIG_PLAT_MAPPI2=y
96# CONFIG_PLAT_MAPPI3 is not set
97# CONFIG_PLAT_M32104UT is not set
98# CONFIG_CHIP_M32700 is not set
99# CONFIG_CHIP_M32102 is not set
100# CONFIG_CHIP_M32104 is not set
101# CONFIG_CHIP_VDEC2 is not set
102CONFIG_CHIP_OPSP=y
103CONFIG_MMU=y
104CONFIG_TLB_ENTRIES=16
105CONFIG_ISA_M32R2=y
106CONFIG_ISA_DSP_LEVEL2=y
107CONFIG_ISA_DUAL_ISSUE=y
108CONFIG_BUS_CLOCK=50000000
109CONFIG_TIMER_DIVIDE=128
110# CONFIG_CPU_LITTLE_ENDIAN is not set
111CONFIG_MEMORY_START=0x08000000
112CONFIG_MEMORY_SIZE=0x01000000
113CONFIG_NOHIGHMEM=y
114CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
115CONFIG_SELECT_MEMORY_MODEL=y
116# CONFIG_FLATMEM_MANUAL is not set
117CONFIG_DISCONTIGMEM_MANUAL=y
118# CONFIG_SPARSEMEM_MANUAL is not set
119CONFIG_DISCONTIGMEM=y
120CONFIG_FLAT_NODE_MEM_MAP=y
121CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set
125CONFIG_IRAM_START=0x00f00000
126CONFIG_IRAM_SIZE=0x00008000
127CONFIG_RWSEM_GENERIC_SPINLOCK=y
128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y
131CONFIG_GENERIC_CALIBRATE_DELAY=y
132CONFIG_PREEMPT=y
133# CONFIG_SMP is not set
134CONFIG_NODES_SHIFT=1
135
136#
137# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
138#
139# CONFIG_ISA is not set
140
141#
142# PCCARD (PCMCIA/CardBus) support
143#
144CONFIG_PCCARD=y
145# CONFIG_PCMCIA_DEBUG is not set
146CONFIG_PCMCIA=y
147CONFIG_PCMCIA_LOAD_CIS=y
148CONFIG_PCMCIA_IOCTL=y
149
150#
151# PC-card bridges
152#
153# CONFIG_M32R_CFC is not set
154
155#
156# PCI Hotplug Support
157#
158
159#
160# Executable file formats
161#
162CONFIG_BINFMT_ELF=y
163# CONFIG_BINFMT_MISC is not set
164
165#
166# Networking
167#
168CONFIG_NET=y
169
170#
171# Networking options
172#
173# CONFIG_NETDEBUG is not set
174CONFIG_PACKET=y
175# CONFIG_PACKET_MMAP is not set
176CONFIG_UNIX=y
177CONFIG_XFRM=y
178# CONFIG_XFRM_USER is not set
179# CONFIG_XFRM_SUB_POLICY is not set
180# CONFIG_NET_KEY is not set
181CONFIG_INET=y
182# CONFIG_IP_MULTICAST is not set
183# CONFIG_IP_ADVANCED_ROUTER is not set
184CONFIG_IP_FIB_HASH=y
185CONFIG_IP_PNP=y
186CONFIG_IP_PNP_DHCP=y
187# CONFIG_IP_PNP_BOOTP is not set
188# CONFIG_IP_PNP_RARP is not set
189# CONFIG_NET_IPIP is not set
190# CONFIG_NET_IPGRE is not set
191# CONFIG_ARPD is not set
192# CONFIG_SYN_COOKIES is not set
193# CONFIG_INET_AH is not set
194# CONFIG_INET_ESP is not set
195# CONFIG_INET_IPCOMP is not set
196# CONFIG_INET_XFRM_TUNNEL is not set
197# CONFIG_INET_TUNNEL is not set
198CONFIG_INET_XFRM_MODE_TRANSPORT=y
199CONFIG_INET_XFRM_MODE_TUNNEL=y
200CONFIG_INET_XFRM_MODE_BEET=y
201CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y
203# CONFIG_TCP_CONG_ADVANCED is not set
204CONFIG_TCP_CONG_CUBIC=y
205CONFIG_DEFAULT_TCP_CONG="cubic"
206# CONFIG_TCP_MD5SIG is not set
207# CONFIG_IPV6 is not set
208# CONFIG_INET6_XFRM_TUNNEL is not set
209# CONFIG_INET6_TUNNEL is not set
210# CONFIG_NETWORK_SECMARK is not set
211# CONFIG_NETFILTER is not set
212
213#
214# DCCP Configuration (EXPERIMENTAL)
215#
216# CONFIG_IP_DCCP is not set
217
218#
219# SCTP Configuration (EXPERIMENTAL)
220#
221# CONFIG_IP_SCTP is not set
222
223#
224# TIPC Configuration (EXPERIMENTAL)
225#
226# CONFIG_TIPC is not set
227# CONFIG_ATM is not set
228# CONFIG_BRIDGE is not set
229# CONFIG_VLAN_8021Q is not set
230# CONFIG_DECNET is not set
231# CONFIG_LLC2 is not set
232# CONFIG_IPX is not set
233# CONFIG_ATALK is not set
234# CONFIG_X25 is not set
235# CONFIG_LAPB is not set
236# CONFIG_ECONET is not set
237# CONFIG_WAN_ROUTER is not set
238
239#
240# QoS and/or fair queueing
241#
242# CONFIG_NET_SCHED is not set
243
244#
245# Network testing
246#
247# CONFIG_NET_PKTGEN is not set
248# CONFIG_HAMRADIO is not set
249# CONFIG_IRDA is not set
250# CONFIG_BT is not set
251# CONFIG_IEEE80211 is not set
252
253#
254# Device Drivers
255#
256
257#
258# Generic Driver Options
259#
260CONFIG_STANDALONE=y
261CONFIG_PREVENT_FIRMWARE_BUILD=y
262CONFIG_FW_LOADER=y
263# CONFIG_SYS_HYPERVISOR is not set
264
265#
266# Connector - unified userspace <-> kernelspace linker
267#
268# CONFIG_CONNECTOR is not set
269
270#
271# Memory Technology Devices (MTD)
272#
273# CONFIG_MTD is not set
274
275#
276# Parallel port support
277#
278# CONFIG_PARPORT is not set
279
280#
281# Plug and Play support
282#
283
284#
285# Block devices
286#
287# CONFIG_BLK_DEV_COW_COMMON is not set
288CONFIG_BLK_DEV_LOOP=y
289# CONFIG_BLK_DEV_CRYPTOLOOP is not set
290CONFIG_BLK_DEV_NBD=y
291CONFIG_BLK_DEV_RAM=y
292CONFIG_BLK_DEV_RAM_COUNT=16
293CONFIG_BLK_DEV_RAM_SIZE=4096
294CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
295# CONFIG_BLK_DEV_INITRD is not set
296# CONFIG_CDROM_PKTCDVD is not set
297# CONFIG_ATA_OVER_ETH is not set
298
299#
300# Misc devices
301#
302# CONFIG_TIFM_CORE is not set
303
304#
305# ATA/ATAPI/MFM/RLL support
306#
307CONFIG_IDE=y
308CONFIG_IDE_MAX_HWIFS=4
309CONFIG_BLK_DEV_IDE=y
310
311#
312# Please see Documentation/ide.txt for help/info on IDE drives
313#
314# CONFIG_BLK_DEV_IDE_SATA is not set
315CONFIG_BLK_DEV_IDEDISK=y
316# CONFIG_IDEDISK_MULTI_MODE is not set
317CONFIG_BLK_DEV_IDECS=y
318CONFIG_BLK_DEV_IDECD=m
319# CONFIG_BLK_DEV_IDETAPE is not set
320# CONFIG_BLK_DEV_IDEFLOPPY is not set
321# CONFIG_BLK_DEV_IDESCSI is not set
322# CONFIG_IDE_TASK_IOCTL is not set
323
324#
325# IDE chipset support/bugfixes
326#
327CONFIG_IDE_GENERIC=y
328# CONFIG_IDE_ARM is not set
329# CONFIG_BLK_DEV_IDEDMA is not set
330# CONFIG_IDEDMA_AUTO is not set
331# CONFIG_BLK_DEV_HD is not set
332
333#
334# SCSI device support
335#
336# CONFIG_RAID_ATTRS is not set
337CONFIG_SCSI=m
338# CONFIG_SCSI_NETLINK is not set
339CONFIG_SCSI_PROC_FS=y
340
341#
342# SCSI support type (disk, tape, CD-ROM)
343#
344CONFIG_BLK_DEV_SD=m
345# CONFIG_CHR_DEV_ST is not set
346# CONFIG_CHR_DEV_OSST is not set
347CONFIG_BLK_DEV_SR=m
348# CONFIG_BLK_DEV_SR_VENDOR is not set
349CONFIG_CHR_DEV_SG=m
350# CONFIG_CHR_DEV_SCH is not set
351
352#
353# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
354#
355CONFIG_SCSI_MULTI_LUN=y
356# CONFIG_SCSI_CONSTANTS is not set
357# CONFIG_SCSI_LOGGING is not set
358
359#
360# SCSI Transports
361#
362# CONFIG_SCSI_SPI_ATTRS is not set
363# CONFIG_SCSI_FC_ATTRS is not set
364# CONFIG_SCSI_ISCSI_ATTRS is not set
365# CONFIG_SCSI_SAS_ATTRS is not set
366# CONFIG_SCSI_SAS_LIBSAS is not set
367
368#
369# SCSI low-level drivers
370#
371# CONFIG_ISCSI_TCP is not set
372# CONFIG_SCSI_DEBUG is not set
373
374#
375# PCMCIA SCSI adapter support
376#
377# CONFIG_PCMCIA_AHA152X is not set
378# CONFIG_PCMCIA_FDOMAIN is not set
379# CONFIG_PCMCIA_NINJA_SCSI is not set
380# CONFIG_PCMCIA_QLOGIC is not set
381# CONFIG_PCMCIA_SYM53C500 is not set
382
383#
384# Serial ATA (prod) and Parallel ATA (experimental) drivers
385#
386
387#
388# Multi-device support (RAID and LVM)
389#
390# CONFIG_MD is not set
391
392#
393# Fusion MPT device support
394#
395# CONFIG_FUSION is not set
396
397#
398# IEEE 1394 (FireWire) support
399#
400
401#
402# I2O device support
403#
404
405#
406# Network device support
407#
408CONFIG_NETDEVICES=y
409# CONFIG_DUMMY is not set
410# CONFIG_BONDING is not set
411# CONFIG_EQUALIZER is not set
412# CONFIG_TUN is not set
413
414#
415# PHY device support
416#
417# CONFIG_PHYLIB is not set
418
419#
420# Ethernet (10 or 100Mbit)
421#
422CONFIG_NET_ETHERNET=y
423CONFIG_MII=y
424CONFIG_SMC91X=y
425# CONFIG_NE2000 is not set
426
427#
428# Ethernet (1000 Mbit)
429#
430
431#
432# Ethernet (10000 Mbit)
433#
434
435#
436# Token Ring devices
437#
438
439#
440# Wireless LAN (non-hamradio)
441#
442# CONFIG_NET_RADIO is not set
443
444#
445# PCMCIA network device support
446#
447# CONFIG_NET_PCMCIA is not set
448
449#
450# Wan interfaces
451#
452# CONFIG_WAN is not set
453# CONFIG_PPP is not set
454# CONFIG_SLIP is not set
455# CONFIG_SHAPER is not set
456# CONFIG_NETCONSOLE is not set
457# CONFIG_NETPOLL is not set
458# CONFIG_NET_POLL_CONTROLLER is not set
459
460#
461# ISDN subsystem
462#
463# CONFIG_ISDN is not set
464
465#
466# Telephony Support
467#
468# CONFIG_PHONE is not set
469
470#
471# Input device support
472#
473CONFIG_INPUT=y
474# CONFIG_INPUT_FF_MEMLESS is not set
475
476#
477# Userland interfaces
478#
479# CONFIG_INPUT_MOUSEDEV is not set
480# CONFIG_INPUT_JOYDEV is not set
481# CONFIG_INPUT_TSDEV is not set
482# CONFIG_INPUT_EVDEV is not set
483# CONFIG_INPUT_EVBUG is not set
484
485#
486# Input Device Drivers
487#
488# CONFIG_INPUT_KEYBOARD is not set
489# CONFIG_INPUT_MOUSE is not set
490# CONFIG_INPUT_JOYSTICK is not set
491# CONFIG_INPUT_TOUCHSCREEN is not set
492# CONFIG_INPUT_MISC is not set
493
494#
495# Hardware I/O ports
496#
497CONFIG_SERIO=y
498# CONFIG_SERIO_I8042 is not set
499CONFIG_SERIO_SERPORT=y
500# CONFIG_SERIO_LIBPS2 is not set
501# CONFIG_SERIO_RAW is not set
502# CONFIG_GAMEPORT is not set
503
504#
505# Character devices
506#
507CONFIG_VT=y
508CONFIG_VT_CONSOLE=y
509CONFIG_HW_CONSOLE=y
510# CONFIG_VT_HW_CONSOLE_BINDING is not set
511# CONFIG_SERIAL_NONSTANDARD is not set
512
513#
514# Serial drivers
515#
516# CONFIG_SERIAL_8250 is not set
517
518#
519# Non-8250 serial port support
520#
521CONFIG_SERIAL_CORE=y
522CONFIG_SERIAL_CORE_CONSOLE=y
523CONFIG_SERIAL_M32R_SIO=y
524CONFIG_SERIAL_M32R_SIO_CONSOLE=y
525CONFIG_UNIX98_PTYS=y
526CONFIG_LEGACY_PTYS=y
527CONFIG_LEGACY_PTY_COUNT=256
528
529#
530# IPMI
531#
532# CONFIG_IPMI_HANDLER is not set
533
534#
535# Watchdog Cards
536#
537# CONFIG_WATCHDOG is not set
538CONFIG_HW_RANDOM=y
539# CONFIG_RTC is not set
540# CONFIG_DTLK is not set
541# CONFIG_R3964 is not set
542
543#
544# Ftape, the floppy tape device driver
545#
546
547#
548# PCMCIA character devices
549#
550# CONFIG_SYNCLINK_CS is not set
551# CONFIG_CARDMAN_4000 is not set
552# CONFIG_CARDMAN_4040 is not set
553# CONFIG_RAW_DRIVER is not set
554
555#
556# TPM devices
557#
558# CONFIG_TCG_TPM is not set
559
560#
561# I2C support
562#
563# CONFIG_I2C is not set
564
565#
566# SPI support
567#
568# CONFIG_SPI is not set
569# CONFIG_SPI_MASTER is not set
570
571#
572# Dallas's 1-wire bus
573#
574# CONFIG_W1 is not set
575
576#
577# Hardware Monitoring support
578#
579CONFIG_HWMON=y
580# CONFIG_HWMON_VID is not set
581# CONFIG_SENSORS_ABITUGURU is not set
582# CONFIG_SENSORS_F71805F is not set
583# CONFIG_SENSORS_VT1211 is not set
584# CONFIG_HWMON_DEBUG_CHIP is not set
585
586#
587# Multimedia devices
588#
589CONFIG_VIDEO_DEV=y
590CONFIG_VIDEO_V4L1=y
591CONFIG_VIDEO_V4L1_COMPAT=y
592CONFIG_VIDEO_V4L2=y
593
594#
595# Video Capture Adapters
596#
597
598#
599# Video Capture Adapters
600#
601# CONFIG_VIDEO_ADV_DEBUG is not set
602CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
603# CONFIG_VIDEO_VIVI is not set
604# CONFIG_VIDEO_CPIA is not set
605# CONFIG_VIDEO_M32R_AR is not set
606
607#
608# Radio Adapters
609#
610
611#
612# Digital Video Broadcasting Devices
613#
614# CONFIG_DVB is not set
615
616#
617# Graphics support
618#
619CONFIG_FIRMWARE_EDID=y
620# CONFIG_FB is not set
621
622#
623# Console display driver support
624#
625# CONFIG_VGA_CONSOLE is not set
626CONFIG_DUMMY_CONSOLE=y
627# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
628
629#
630# Sound
631#
632# CONFIG_SOUND is not set
633
634#
635# USB support
636#
637# CONFIG_USB_ARCH_HAS_HCD is not set
638# CONFIG_USB_ARCH_HAS_OHCI is not set
639# CONFIG_USB_ARCH_HAS_EHCI is not set
640
641#
642# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
643#
644
645#
646# USB Gadget Support
647#
648# CONFIG_USB_GADGET is not set
649
650#
651# MMC/SD Card support
652#
653# CONFIG_MMC is not set
654
655#
656# LED devices
657#
658# CONFIG_NEW_LEDS is not set
659
660#
661# LED drivers
662#
663
664#
665# LED Triggers
666#
667
668#
669# InfiniBand support
670#
671
672#
673# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
674#
675
676#
677# Real Time Clock
678#
679# CONFIG_RTC_CLASS is not set
680
681#
682# DMA Engine support
683#
684# CONFIG_DMA_ENGINE is not set
685
686#
687# DMA Clients
688#
689
690#
691# DMA Devices
692#
693
694#
695# File systems
696#
697CONFIG_EXT2_FS=y
698# CONFIG_EXT2_FS_XATTR is not set
699# CONFIG_EXT2_FS_XIP is not set
700CONFIG_EXT3_FS=y
701CONFIG_EXT3_FS_XATTR=y
702# CONFIG_EXT3_FS_POSIX_ACL is not set
703# CONFIG_EXT3_FS_SECURITY is not set
704# CONFIG_EXT4DEV_FS is not set
705CONFIG_JBD=y
706CONFIG_JBD_DEBUG=y
707CONFIG_FS_MBCACHE=y
708# CONFIG_REISERFS_FS is not set
709# CONFIG_JFS_FS is not set
710# CONFIG_FS_POSIX_ACL is not set
711# CONFIG_XFS_FS is not set
712# CONFIG_GFS2_FS is not set
713# CONFIG_OCFS2_FS is not set
714# CONFIG_MINIX_FS is not set
715# CONFIG_ROMFS_FS is not set
716CONFIG_INOTIFY=y
717CONFIG_INOTIFY_USER=y
718# CONFIG_QUOTA is not set
719CONFIG_DNOTIFY=y
720# CONFIG_AUTOFS_FS is not set
721# CONFIG_AUTOFS4_FS is not set
722# CONFIG_FUSE_FS is not set
723
724#
725# CD-ROM/DVD Filesystems
726#
727CONFIG_ISO9660_FS=m
728CONFIG_JOLIET=y
729# CONFIG_ZISOFS is not set
730CONFIG_UDF_FS=m
731CONFIG_UDF_NLS=y
732
733#
734# DOS/FAT/NT Filesystems
735#
736CONFIG_FAT_FS=m
737CONFIG_MSDOS_FS=m
738CONFIG_VFAT_FS=m
739CONFIG_FAT_DEFAULT_CODEPAGE=437
740CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
741# CONFIG_NTFS_FS is not set
742
743#
744# Pseudo filesystems
745#
746CONFIG_PROC_FS=y
747CONFIG_PROC_KCORE=y
748CONFIG_PROC_SYSCTL=y
749CONFIG_SYSFS=y
750CONFIG_TMPFS=y
751# CONFIG_TMPFS_POSIX_ACL is not set
752# CONFIG_HUGETLB_PAGE is not set
753CONFIG_RAMFS=y
754# CONFIG_CONFIGFS_FS is not set
755
756#
757# Miscellaneous filesystems
758#
759# CONFIG_ADFS_FS is not set
760# CONFIG_AFFS_FS is not set
761# CONFIG_HFS_FS is not set
762# CONFIG_HFSPLUS_FS is not set
763# CONFIG_BEFS_FS is not set
764# CONFIG_BFS_FS is not set
765# CONFIG_EFS_FS is not set
766# CONFIG_CRAMFS is not set
767# CONFIG_VXFS_FS is not set
768# CONFIG_HPFS_FS is not set
769# CONFIG_QNX4FS_FS is not set
770# CONFIG_SYSV_FS is not set
771# CONFIG_UFS_FS is not set
772
773#
774# Network File Systems
775#
776CONFIG_NFS_FS=y
777CONFIG_NFS_V3=y
778# CONFIG_NFS_V3_ACL is not set
779# CONFIG_NFS_V4 is not set
780# CONFIG_NFS_DIRECTIO is not set
781# CONFIG_NFSD is not set
782CONFIG_ROOT_NFS=y
783CONFIG_LOCKD=y
784CONFIG_LOCKD_V4=y
785CONFIG_NFS_COMMON=y
786CONFIG_SUNRPC=y
787# CONFIG_RPCSEC_GSS_KRB5 is not set
788# CONFIG_RPCSEC_GSS_SPKM3 is not set
789# CONFIG_SMB_FS is not set
790# CONFIG_CIFS is not set
791# CONFIG_NCP_FS is not set
792# CONFIG_CODA_FS is not set
793# CONFIG_AFS_FS is not set
794# CONFIG_9P_FS is not set
795
796#
797# Partition Types
798#
799# CONFIG_PARTITION_ADVANCED is not set
800CONFIG_MSDOS_PARTITION=y
801
802#
803# Native Language Support
804#
805CONFIG_NLS=y
806CONFIG_NLS_DEFAULT="iso8859-1"
807# CONFIG_NLS_CODEPAGE_437 is not set
808# CONFIG_NLS_CODEPAGE_737 is not set
809# CONFIG_NLS_CODEPAGE_775 is not set
810# CONFIG_NLS_CODEPAGE_850 is not set
811# CONFIG_NLS_CODEPAGE_852 is not set
812# CONFIG_NLS_CODEPAGE_855 is not set
813# CONFIG_NLS_CODEPAGE_857 is not set
814# CONFIG_NLS_CODEPAGE_860 is not set
815# CONFIG_NLS_CODEPAGE_861 is not set
816# CONFIG_NLS_CODEPAGE_862 is not set
817# CONFIG_NLS_CODEPAGE_863 is not set
818# CONFIG_NLS_CODEPAGE_864 is not set
819# CONFIG_NLS_CODEPAGE_865 is not set
820# CONFIG_NLS_CODEPAGE_866 is not set
821# CONFIG_NLS_CODEPAGE_869 is not set
822# CONFIG_NLS_CODEPAGE_936 is not set
823# CONFIG_NLS_CODEPAGE_950 is not set
824# CONFIG_NLS_CODEPAGE_932 is not set
825# CONFIG_NLS_CODEPAGE_949 is not set
826# CONFIG_NLS_CODEPAGE_874 is not set
827# CONFIG_NLS_ISO8859_8 is not set
828# CONFIG_NLS_CODEPAGE_1250 is not set
829# CONFIG_NLS_CODEPAGE_1251 is not set
830# CONFIG_NLS_ASCII is not set
831# CONFIG_NLS_ISO8859_1 is not set
832# CONFIG_NLS_ISO8859_2 is not set
833# CONFIG_NLS_ISO8859_3 is not set
834# CONFIG_NLS_ISO8859_4 is not set
835# CONFIG_NLS_ISO8859_5 is not set
836# CONFIG_NLS_ISO8859_6 is not set
837# CONFIG_NLS_ISO8859_7 is not set
838# CONFIG_NLS_ISO8859_9 is not set
839# CONFIG_NLS_ISO8859_13 is not set
840# CONFIG_NLS_ISO8859_14 is not set
841# CONFIG_NLS_ISO8859_15 is not set
842# CONFIG_NLS_KOI8_R is not set
843# CONFIG_NLS_KOI8_U is not set
844# CONFIG_NLS_UTF8 is not set
845
846#
847# Profiling support
848#
849# CONFIG_PROFILING is not set
850
851#
852# Kernel hacking
853#
854# CONFIG_PRINTK_TIME is not set
855CONFIG_ENABLE_MUST_CHECK=y
856# CONFIG_MAGIC_SYSRQ is not set
857# CONFIG_UNUSED_SYMBOLS is not set
858# CONFIG_DEBUG_KERNEL is not set
859CONFIG_LOG_BUF_SHIFT=14
860# CONFIG_DEBUG_BUGVERBOSE is not set
861# CONFIG_DEBUG_FS is not set
862# CONFIG_FRAME_POINTER is not set
863# CONFIG_UNWIND_INFO is not set
864# CONFIG_HEADERS_CHECK is not set
865
866#
867# Security options
868#
869# CONFIG_KEYS is not set
870# CONFIG_SECURITY is not set
871
872#
873# Cryptographic options
874#
875# CONFIG_CRYPTO is not set
876
877#
878# Library routines
879#
880# CONFIG_CRC_CCITT is not set
881# CONFIG_CRC16 is not set
882CONFIG_CRC32=y
883# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/mappi2/defconfig.vdec2
index 56f287b65898..fe5b2a63cd68 100644
--- a/arch/m32r/mappi2/defconfig.vdec2
+++ b/arch/m32r/mappi2/defconfig.vdec2
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:22:02 2005 4# Wed Dec 13 19:31:44 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 17CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# General setup 21# General setup
23# 22#
24CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
27# CONFIG_IPC_NS is not set
27# CONFIG_POSIX_MQUEUE is not set 28# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 29CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y 31# CONFIG_TASKSTATS is not set
32# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 33# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 34CONFIG_IKCONFIG=y
35# CONFIG_IKCONFIG_PROC is not set 35# CONFIG_IKCONFIG_PROC is not set
36CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set
38CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SYSCTL=y
36CONFIG_EMBEDDED=y 41CONFIG_EMBEDDED=y
42CONFIG_SYSCTL_SYSCALL=y
37# CONFIG_KALLSYMS is not set 43# CONFIG_KALLSYMS is not set
44CONFIG_HOTPLUG=y
38CONFIG_PRINTK=y 45CONFIG_PRINTK=y
39CONFIG_BUG=y 46CONFIG_BUG=y
47CONFIG_ELF_CORE=y
40CONFIG_BASE_FULL=y 48CONFIG_BASE_FULL=y
41# CONFIG_FUTEX is not set 49# CONFIG_FUTEX is not set
42# CONFIG_EPOLL is not set 50# CONFIG_EPOLL is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SHMEM=y 51CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0 52CONFIG_SLAB=y
46CONFIG_CC_ALIGN_LABELS=0 53CONFIG_VM_EVENT_COUNTERS=y
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0 55CONFIG_BASE_SMALL=0
56# CONFIG_SLOB is not set
51 57
52# 58#
53# Loadable module support 59# Loadable module support
@@ -55,12 +61,30 @@ CONFIG_BASE_SMALL=0
55CONFIG_MODULES=y 61CONFIG_MODULES=y
56CONFIG_MODULE_UNLOAD=y 62CONFIG_MODULE_UNLOAD=y
57# CONFIG_MODULE_FORCE_UNLOAD is not set 63# CONFIG_MODULE_FORCE_UNLOAD is not set
58CONFIG_OBSOLETE_MODPARM=y
59# CONFIG_MODVERSIONS is not set 64# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set 65# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y 66CONFIG_KMOD=y
62 67
63# 68#
69# Block layer
70#
71CONFIG_BLOCK=y
72# CONFIG_BLK_DEV_IO_TRACE is not set
73
74#
75# IO Schedulers
76#
77CONFIG_IOSCHED_NOOP=y
78# CONFIG_IOSCHED_AS is not set
79CONFIG_IOSCHED_DEADLINE=y
80CONFIG_IOSCHED_CFQ=y
81# CONFIG_DEFAULT_AS is not set
82# CONFIG_DEFAULT_DEADLINE is not set
83CONFIG_DEFAULT_CFQ=y
84# CONFIG_DEFAULT_NOOP is not set
85CONFIG_DEFAULT_IOSCHED="cfq"
86
87#
64# Processor type and features 88# Processor type and features
65# 89#
66# CONFIG_PLAT_MAPPI is not set 90# CONFIG_PLAT_MAPPI is not set
@@ -70,8 +94,10 @@ CONFIG_KMOD=y
70# CONFIG_PLAT_OAKS32R is not set 94# CONFIG_PLAT_OAKS32R is not set
71CONFIG_PLAT_MAPPI2=y 95CONFIG_PLAT_MAPPI2=y
72# CONFIG_PLAT_MAPPI3 is not set 96# CONFIG_PLAT_MAPPI3 is not set
97# CONFIG_PLAT_M32104UT is not set
73# CONFIG_CHIP_M32700 is not set 98# CONFIG_CHIP_M32700 is not set
74# CONFIG_CHIP_M32102 is not set 99# CONFIG_CHIP_M32102 is not set
100# CONFIG_CHIP_M32104 is not set
75CONFIG_CHIP_VDEC2=y 101CONFIG_CHIP_VDEC2=y
76# CONFIG_CHIP_OPSP is not set 102# CONFIG_CHIP_OPSP is not set
77CONFIG_MMU=y 103CONFIG_MMU=y
@@ -83,18 +109,31 @@ CONFIG_TIMER_DIVIDE=128
83CONFIG_MEMORY_START=0x08000000 109CONFIG_MEMORY_START=0x08000000
84CONFIG_MEMORY_SIZE=0x01000000 110CONFIG_MEMORY_SIZE=0x01000000
85CONFIG_NOHIGHMEM=y 111CONFIG_NOHIGHMEM=y
86# CONFIG_DISCONTIGMEM is not set 112CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
113CONFIG_SELECT_MEMORY_MODEL=y
114# CONFIG_FLATMEM_MANUAL is not set
115CONFIG_DISCONTIGMEM_MANUAL=y
116# CONFIG_SPARSEMEM_MANUAL is not set
117CONFIG_DISCONTIGMEM=y
118CONFIG_FLAT_NODE_MEM_MAP=y
119CONFIG_NEED_MULTIPLE_NODES=y
120# CONFIG_SPARSEMEM_STATIC is not set
121CONFIG_SPLIT_PTLOCK_CPUS=4
122# CONFIG_RESOURCES_64BIT is not set
123CONFIG_IRAM_START=0x00f00000
124CONFIG_IRAM_SIZE=0x00008000
87CONFIG_RWSEM_GENERIC_SPINLOCK=y 125CONFIG_RWSEM_GENERIC_SPINLOCK=y
88# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 126# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
127CONFIG_GENERIC_FIND_NEXT_BIT=y
128CONFIG_GENERIC_HWEIGHT=y
89CONFIG_GENERIC_CALIBRATE_DELAY=y 129CONFIG_GENERIC_CALIBRATE_DELAY=y
90CONFIG_PREEMPT=y 130CONFIG_PREEMPT=y
91# CONFIG_HAVE_DEC_LOCK is not set
92# CONFIG_SMP is not set 131# CONFIG_SMP is not set
132CONFIG_NODES_SHIFT=1
93 133
94# 134#
95# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 135# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
96# 136#
97# CONFIG_PCI is not set
98# CONFIG_ISA is not set 137# CONFIG_ISA is not set
99 138
100# 139#
@@ -103,11 +142,12 @@ CONFIG_PREEMPT=y
103CONFIG_PCCARD=y 142CONFIG_PCCARD=y
104# CONFIG_PCMCIA_DEBUG is not set 143# CONFIG_PCMCIA_DEBUG is not set
105CONFIG_PCMCIA=y 144CONFIG_PCMCIA=y
145CONFIG_PCMCIA_LOAD_CIS=y
146CONFIG_PCMCIA_IOCTL=y
106 147
107# 148#
108# PC-card bridges 149# PC-card bridges
109# 150#
110# CONFIG_TCIC is not set
111# CONFIG_M32R_CFC is not set 151# CONFIG_M32R_CFC is not set
112 152
113# 153#
@@ -121,6 +161,94 @@ CONFIG_BINFMT_ELF=y
121# CONFIG_BINFMT_MISC is not set 161# CONFIG_BINFMT_MISC is not set
122 162
123# 163#
164# Networking
165#
166CONFIG_NET=y
167
168#
169# Networking options
170#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y
173# CONFIG_PACKET_MMAP is not set
174CONFIG_UNIX=y
175CONFIG_XFRM=y
176# CONFIG_XFRM_USER is not set
177# CONFIG_XFRM_SUB_POLICY is not set
178# CONFIG_NET_KEY is not set
179CONFIG_INET=y
180# CONFIG_IP_MULTICAST is not set
181# CONFIG_IP_ADVANCED_ROUTER is not set
182CONFIG_IP_FIB_HASH=y
183CONFIG_IP_PNP=y
184CONFIG_IP_PNP_DHCP=y
185# CONFIG_IP_PNP_BOOTP is not set
186# CONFIG_IP_PNP_RARP is not set
187# CONFIG_NET_IPIP is not set
188# CONFIG_NET_IPGRE is not set
189# CONFIG_ARPD is not set
190# CONFIG_SYN_COOKIES is not set
191# CONFIG_INET_AH is not set
192# CONFIG_INET_ESP is not set
193# CONFIG_INET_IPCOMP is not set
194# CONFIG_INET_XFRM_TUNNEL is not set
195# CONFIG_INET_TUNNEL is not set
196CONFIG_INET_XFRM_MODE_TRANSPORT=y
197CONFIG_INET_XFRM_MODE_TUNNEL=y
198CONFIG_INET_XFRM_MODE_BEET=y
199CONFIG_INET_DIAG=y
200CONFIG_INET_TCP_DIAG=y
201# CONFIG_TCP_CONG_ADVANCED is not set
202CONFIG_TCP_CONG_CUBIC=y
203CONFIG_DEFAULT_TCP_CONG="cubic"
204# CONFIG_TCP_MD5SIG is not set
205# CONFIG_IPV6 is not set
206# CONFIG_INET6_XFRM_TUNNEL is not set
207# CONFIG_INET6_TUNNEL is not set
208# CONFIG_NETWORK_SECMARK is not set
209# CONFIG_NETFILTER is not set
210
211#
212# DCCP Configuration (EXPERIMENTAL)
213#
214# CONFIG_IP_DCCP is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set
220
221#
222# TIPC Configuration (EXPERIMENTAL)
223#
224# CONFIG_TIPC is not set
225# CONFIG_ATM is not set
226# CONFIG_BRIDGE is not set
227# CONFIG_VLAN_8021Q is not set
228# CONFIG_DECNET is not set
229# CONFIG_LLC2 is not set
230# CONFIG_IPX is not set
231# CONFIG_ATALK is not set
232# CONFIG_X25 is not set
233# CONFIG_LAPB is not set
234# CONFIG_ECONET is not set
235# CONFIG_WAN_ROUTER is not set
236
237#
238# QoS and/or fair queueing
239#
240# CONFIG_NET_SCHED is not set
241
242#
243# Network testing
244#
245# CONFIG_NET_PKTGEN is not set
246# CONFIG_HAMRADIO is not set
247# CONFIG_IRDA is not set
248# CONFIG_BT is not set
249# CONFIG_IEEE80211 is not set
250
251#
124# Device Drivers 252# Device Drivers
125# 253#
126 254
@@ -129,7 +257,13 @@ CONFIG_BINFMT_ELF=y
129# 257#
130CONFIG_STANDALONE=y 258CONFIG_STANDALONE=y
131CONFIG_PREVENT_FIRMWARE_BUILD=y 259CONFIG_PREVENT_FIRMWARE_BUILD=y
132# CONFIG_FW_LOADER is not set 260CONFIG_FW_LOADER=y
261# CONFIG_SYS_HYPERVISOR is not set
262
263#
264# Connector - unified userspace <-> kernelspace linker
265#
266# CONFIG_CONNECTOR is not set
133 267
134# 268#
135# Memory Technology Devices (MTD) 269# Memory Technology Devices (MTD)
@@ -148,7 +282,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
148# 282#
149# Block devices 283# Block devices
150# 284#
151# CONFIG_BLK_DEV_FD is not set
152# CONFIG_BLK_DEV_COW_COMMON is not set 285# CONFIG_BLK_DEV_COW_COMMON is not set
153CONFIG_BLK_DEV_LOOP=y 286CONFIG_BLK_DEV_LOOP=y
154# CONFIG_BLK_DEV_CRYPTOLOOP is not set 287# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -156,23 +289,21 @@ CONFIG_BLK_DEV_NBD=y
156CONFIG_BLK_DEV_RAM=y 289CONFIG_BLK_DEV_RAM=y
157CONFIG_BLK_DEV_RAM_COUNT=16 290CONFIG_BLK_DEV_RAM_COUNT=16
158CONFIG_BLK_DEV_RAM_SIZE=4096 291CONFIG_BLK_DEV_RAM_SIZE=4096
292CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
159# CONFIG_BLK_DEV_INITRD is not set 293# CONFIG_BLK_DEV_INITRD is not set
160CONFIG_INITRAMFS_SOURCE=""
161# CONFIG_CDROM_PKTCDVD is not set 294# CONFIG_CDROM_PKTCDVD is not set
295# CONFIG_ATA_OVER_ETH is not set
162 296
163# 297#
164# IO Schedulers 298# Misc devices
165# 299#
166CONFIG_IOSCHED_NOOP=y 300# CONFIG_TIFM_CORE is not set
167# CONFIG_IOSCHED_AS is not set
168CONFIG_IOSCHED_DEADLINE=y
169CONFIG_IOSCHED_CFQ=y
170# CONFIG_ATA_OVER_ETH is not set
171 301
172# 302#
173# ATA/ATAPI/MFM/RLL support 303# ATA/ATAPI/MFM/RLL support
174# 304#
175CONFIG_IDE=y 305CONFIG_IDE=y
306CONFIG_IDE_MAX_HWIFS=4
176CONFIG_BLK_DEV_IDE=y 307CONFIG_BLK_DEV_IDE=y
177 308
178# 309#
@@ -200,7 +331,9 @@ CONFIG_IDE_GENERIC=y
200# 331#
201# SCSI device support 332# SCSI device support
202# 333#
334# CONFIG_RAID_ATTRS is not set
203CONFIG_SCSI=m 335CONFIG_SCSI=m
336# CONFIG_SCSI_NETLINK is not set
204CONFIG_SCSI_PROC_FS=y 337CONFIG_SCSI_PROC_FS=y
205 338
206# 339#
@@ -212,6 +345,7 @@ CONFIG_BLK_DEV_SD=m
212CONFIG_BLK_DEV_SR=m 345CONFIG_BLK_DEV_SR=m
213# CONFIG_BLK_DEV_SR_VENDOR is not set 346# CONFIG_BLK_DEV_SR_VENDOR is not set
214CONFIG_CHR_DEV_SG=m 347CONFIG_CHR_DEV_SG=m
348# CONFIG_CHR_DEV_SCH is not set
215 349
216# 350#
217# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 351# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -221,16 +355,18 @@ CONFIG_SCSI_MULTI_LUN=y
221# CONFIG_SCSI_LOGGING is not set 355# CONFIG_SCSI_LOGGING is not set
222 356
223# 357#
224# SCSI Transport Attributes 358# SCSI Transports
225# 359#
226# CONFIG_SCSI_SPI_ATTRS is not set 360# CONFIG_SCSI_SPI_ATTRS is not set
227# CONFIG_SCSI_FC_ATTRS is not set 361# CONFIG_SCSI_FC_ATTRS is not set
228# CONFIG_SCSI_ISCSI_ATTRS is not set 362# CONFIG_SCSI_ISCSI_ATTRS is not set
363# CONFIG_SCSI_SAS_ATTRS is not set
364# CONFIG_SCSI_SAS_LIBSAS is not set
229 365
230# 366#
231# SCSI low-level drivers 367# SCSI low-level drivers
232# 368#
233# CONFIG_SCSI_SATA is not set 369# CONFIG_ISCSI_TCP is not set
234# CONFIG_SCSI_DEBUG is not set 370# CONFIG_SCSI_DEBUG is not set
235 371
236# 372#
@@ -243,6 +379,10 @@ CONFIG_SCSI_MULTI_LUN=y
243# CONFIG_PCMCIA_SYM53C500 is not set 379# CONFIG_PCMCIA_SYM53C500 is not set
244 380
245# 381#
382# Serial ATA (prod) and Parallel ATA (experimental) drivers
383#
384
385#
246# Multi-device support (RAID and LVM) 386# Multi-device support (RAID and LVM)
247# 387#
248# CONFIG_MD is not set 388# CONFIG_MD is not set
@@ -250,6 +390,7 @@ CONFIG_SCSI_MULTI_LUN=y
250# 390#
251# Fusion MPT device support 391# Fusion MPT device support
252# 392#
393# CONFIG_FUSION is not set
253 394
254# 395#
255# IEEE 1394 (FireWire) support 396# IEEE 1394 (FireWire) support
@@ -260,69 +401,8 @@ CONFIG_SCSI_MULTI_LUN=y
260# 401#
261 402
262# 403#
263# Networking support 404# Network device support
264#
265CONFIG_NET=y
266
267#
268# Networking options
269#
270CONFIG_PACKET=y
271# CONFIG_PACKET_MMAP is not set
272CONFIG_UNIX=y
273# CONFIG_NET_KEY is not set
274CONFIG_INET=y
275# CONFIG_IP_MULTICAST is not set
276# CONFIG_IP_ADVANCED_ROUTER is not set
277CONFIG_IP_PNP=y
278CONFIG_IP_PNP_DHCP=y
279# CONFIG_IP_PNP_BOOTP is not set
280# CONFIG_IP_PNP_RARP is not set
281# CONFIG_NET_IPIP is not set
282# CONFIG_NET_IPGRE is not set
283# CONFIG_ARPD is not set
284# CONFIG_SYN_COOKIES is not set
285# CONFIG_INET_AH is not set
286# CONFIG_INET_ESP is not set
287# CONFIG_INET_IPCOMP is not set
288# CONFIG_INET_TUNNEL is not set
289CONFIG_IP_TCPDIAG=y
290# CONFIG_IP_TCPDIAG_IPV6 is not set
291# CONFIG_IPV6 is not set
292# CONFIG_NETFILTER is not set
293
294#
295# SCTP Configuration (EXPERIMENTAL)
296#
297# CONFIG_IP_SCTP is not set
298# CONFIG_ATM is not set
299# CONFIG_BRIDGE is not set
300# CONFIG_VLAN_8021Q is not set
301# CONFIG_DECNET is not set
302# CONFIG_LLC2 is not set
303# CONFIG_IPX is not set
304# CONFIG_ATALK is not set
305# CONFIG_X25 is not set
306# CONFIG_LAPB is not set
307# CONFIG_NET_DIVERT is not set
308# CONFIG_ECONET is not set
309# CONFIG_WAN_ROUTER is not set
310
311#
312# QoS and/or fair queueing
313#
314# CONFIG_NET_SCHED is not set
315# CONFIG_NET_CLS_ROUTE is not set
316
317#
318# Network testing
319# 405#
320# CONFIG_NET_PKTGEN is not set
321# CONFIG_NETPOLL is not set
322# CONFIG_NET_POLL_CONTROLLER is not set
323# CONFIG_HAMRADIO is not set
324# CONFIG_IRDA is not set
325# CONFIG_BT is not set
326CONFIG_NETDEVICES=y 406CONFIG_NETDEVICES=y
327# CONFIG_DUMMY is not set 407# CONFIG_DUMMY is not set
328# CONFIG_BONDING is not set 408# CONFIG_BONDING is not set
@@ -330,6 +410,11 @@ CONFIG_NETDEVICES=y
330# CONFIG_TUN is not set 410# CONFIG_TUN is not set
331 411
332# 412#
413# PHY device support
414#
415# CONFIG_PHYLIB is not set
416
417#
333# Ethernet (10 or 100Mbit) 418# Ethernet (10 or 100Mbit)
334# 419#
335CONFIG_NET_ETHERNET=y 420CONFIG_NET_ETHERNET=y
@@ -367,6 +452,8 @@ CONFIG_SMC91X=y
367# CONFIG_SLIP is not set 452# CONFIG_SLIP is not set
368# CONFIG_SHAPER is not set 453# CONFIG_SHAPER is not set
369# CONFIG_NETCONSOLE is not set 454# CONFIG_NETCONSOLE is not set
455# CONFIG_NETPOLL is not set
456# CONFIG_NET_POLL_CONTROLLER is not set
370 457
371# 458#
372# ISDN subsystem 459# ISDN subsystem
@@ -382,6 +469,7 @@ CONFIG_SMC91X=y
382# Input device support 469# Input device support
383# 470#
384CONFIG_INPUT=y 471CONFIG_INPUT=y
472# CONFIG_INPUT_FF_MEMLESS is not set
385 473
386# 474#
387# Userland interfaces 475# Userland interfaces
@@ -410,7 +498,6 @@ CONFIG_SERIO_SERPORT=y
410# CONFIG_SERIO_LIBPS2 is not set 498# CONFIG_SERIO_LIBPS2 is not set
411# CONFIG_SERIO_RAW is not set 499# CONFIG_SERIO_RAW is not set
412# CONFIG_GAMEPORT is not set 500# CONFIG_GAMEPORT is not set
413CONFIG_SOUND_GAMEPORT=y
414 501
415# 502#
416# Character devices 503# Character devices
@@ -418,6 +505,7 @@ CONFIG_SOUND_GAMEPORT=y
418CONFIG_VT=y 505CONFIG_VT=y
419CONFIG_VT_CONSOLE=y 506CONFIG_VT_CONSOLE=y
420CONFIG_HW_CONSOLE=y 507CONFIG_HW_CONSOLE=y
508# CONFIG_VT_HW_CONSOLE_BINDING is not set
421# CONFIG_SERIAL_NONSTANDARD is not set 509# CONFIG_SERIAL_NONSTANDARD is not set
422 510
423# 511#
@@ -432,7 +520,6 @@ CONFIG_SERIAL_CORE=y
432CONFIG_SERIAL_CORE_CONSOLE=y 520CONFIG_SERIAL_CORE_CONSOLE=y
433CONFIG_SERIAL_M32R_SIO=y 521CONFIG_SERIAL_M32R_SIO=y
434CONFIG_SERIAL_M32R_SIO_CONSOLE=y 522CONFIG_SERIAL_M32R_SIO_CONSOLE=y
435# CONFIG_SERIAL_M32R_PLDSIO is not set
436CONFIG_UNIX98_PTYS=y 523CONFIG_UNIX98_PTYS=y
437CONFIG_LEGACY_PTYS=y 524CONFIG_LEGACY_PTYS=y
438CONFIG_LEGACY_PTY_COUNT=256 525CONFIG_LEGACY_PTY_COUNT=256
@@ -446,25 +533,27 @@ CONFIG_LEGACY_PTY_COUNT=256
446# Watchdog Cards 533# Watchdog Cards
447# 534#
448# CONFIG_WATCHDOG is not set 535# CONFIG_WATCHDOG is not set
536CONFIG_HW_RANDOM=y
449# CONFIG_RTC is not set 537# CONFIG_RTC is not set
450# CONFIG_GEN_RTC is not set
451# CONFIG_DTLK is not set 538# CONFIG_DTLK is not set
452# CONFIG_R3964 is not set 539# CONFIG_R3964 is not set
453 540
454# 541#
455# Ftape, the floppy tape device driver 542# Ftape, the floppy tape device driver
456# 543#
457# CONFIG_DRM is not set
458 544
459# 545#
460# PCMCIA character devices 546# PCMCIA character devices
461# 547#
462# CONFIG_SYNCLINK_CS is not set 548# CONFIG_SYNCLINK_CS is not set
549# CONFIG_CARDMAN_4000 is not set
550# CONFIG_CARDMAN_4040 is not set
463# CONFIG_RAW_DRIVER is not set 551# CONFIG_RAW_DRIVER is not set
464 552
465# 553#
466# TPM devices 554# TPM devices
467# 555#
556# CONFIG_TCG_TPM is not set
468 557
469# 558#
470# I2C support 559# I2C support
@@ -472,33 +561,50 @@ CONFIG_LEGACY_PTY_COUNT=256
472# CONFIG_I2C is not set 561# CONFIG_I2C is not set
473 562
474# 563#
564# SPI support
565#
566# CONFIG_SPI is not set
567# CONFIG_SPI_MASTER is not set
568
569#
475# Dallas's 1-wire bus 570# Dallas's 1-wire bus
476# 571#
477# CONFIG_W1 is not set 572# CONFIG_W1 is not set
478 573
479# 574#
480# Misc devices 575# Hardware Monitoring support
481# 576#
577CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set
580# CONFIG_SENSORS_F71805F is not set
581# CONFIG_SENSORS_VT1211 is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set
482 583
483# 584#
484# Multimedia devices 585# Multimedia devices
485# 586#
486CONFIG_VIDEO_DEV=y 587CONFIG_VIDEO_DEV=y
588CONFIG_VIDEO_V4L1=y
589CONFIG_VIDEO_V4L1_COMPAT=y
590CONFIG_VIDEO_V4L2=y
487 591
488# 592#
489# Video For Linux 593# Video Capture Adapters
490# 594#
491 595
492# 596#
493# Video Adapters 597# Video Capture Adapters
494# 598#
599# CONFIG_VIDEO_ADV_DEBUG is not set
600CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
601# CONFIG_VIDEO_VIVI is not set
495# CONFIG_VIDEO_CPIA is not set 602# CONFIG_VIDEO_CPIA is not set
496# CONFIG_VIDEO_M32R_AR is not set 603# CONFIG_VIDEO_M32R_AR is not set
497 604
498# 605#
499# Radio Adapters 606# Radio Adapters
500# 607#
501# CONFIG_RADIO_MAESTRO is not set
502 608
503# 609#
504# Digital Video Broadcasting Devices 610# Digital Video Broadcasting Devices
@@ -508,6 +614,7 @@ CONFIG_VIDEO_DEV=y
508# 614#
509# Graphics support 615# Graphics support
510# 616#
617CONFIG_FIRMWARE_EDID=y
511# CONFIG_FB is not set 618# CONFIG_FB is not set
512 619
513# 620#
@@ -515,6 +622,7 @@ CONFIG_VIDEO_DEV=y
515# 622#
516# CONFIG_VGA_CONSOLE is not set 623# CONFIG_VGA_CONSOLE is not set
517CONFIG_DUMMY_CONSOLE=y 624CONFIG_DUMMY_CONSOLE=y
625# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
518 626
519# 627#
520# Sound 628# Sound
@@ -526,6 +634,11 @@ CONFIG_DUMMY_CONSOLE=y
526# 634#
527# CONFIG_USB_ARCH_HAS_HCD is not set 635# CONFIG_USB_ARCH_HAS_HCD is not set
528# CONFIG_USB_ARCH_HAS_OHCI is not set 636# CONFIG_USB_ARCH_HAS_OHCI is not set
637# CONFIG_USB_ARCH_HAS_EHCI is not set
638
639#
640# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
641#
529 642
530# 643#
531# USB Gadget Support 644# USB Gadget Support
@@ -538,38 +651,73 @@ CONFIG_DUMMY_CONSOLE=y
538# CONFIG_MMC is not set 651# CONFIG_MMC is not set
539 652
540# 653#
654# LED devices
655#
656# CONFIG_NEW_LEDS is not set
657
658#
659# LED drivers
660#
661
662#
663# LED Triggers
664#
665
666#
541# InfiniBand support 667# InfiniBand support
542# 668#
543# CONFIG_INFINIBAND is not set 669
670#
671# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
672#
673
674#
675# Real Time Clock
676#
677# CONFIG_RTC_CLASS is not set
678
679#
680# DMA Engine support
681#
682# CONFIG_DMA_ENGINE is not set
683
684#
685# DMA Clients
686#
687
688#
689# DMA Devices
690#
544 691
545# 692#
546# File systems 693# File systems
547# 694#
548CONFIG_EXT2_FS=y 695CONFIG_EXT2_FS=y
549# CONFIG_EXT2_FS_XATTR is not set 696# CONFIG_EXT2_FS_XATTR is not set
550CONFIG_EXT3_FS=m 697# CONFIG_EXT2_FS_XIP is not set
698CONFIG_EXT3_FS=y
551CONFIG_EXT3_FS_XATTR=y 699CONFIG_EXT3_FS_XATTR=y
552# CONFIG_EXT3_FS_POSIX_ACL is not set 700# CONFIG_EXT3_FS_POSIX_ACL is not set
553# CONFIG_EXT3_FS_SECURITY is not set 701# CONFIG_EXT3_FS_SECURITY is not set
554CONFIG_JBD=m 702# CONFIG_EXT4DEV_FS is not set
703CONFIG_JBD=y
555CONFIG_JBD_DEBUG=y 704CONFIG_JBD_DEBUG=y
556CONFIG_FS_MBCACHE=y 705CONFIG_FS_MBCACHE=y
557CONFIG_REISERFS_FS=m 706# CONFIG_REISERFS_FS is not set
558# CONFIG_REISERFS_CHECK is not set
559# CONFIG_REISERFS_PROC_INFO is not set
560# CONFIG_REISERFS_FS_XATTR is not set
561# CONFIG_JFS_FS is not set 707# CONFIG_JFS_FS is not set
562 708# CONFIG_FS_POSIX_ACL is not set
563#
564# XFS support
565#
566# CONFIG_XFS_FS is not set 709# CONFIG_XFS_FS is not set
710# CONFIG_GFS2_FS is not set
711# CONFIG_OCFS2_FS is not set
567# CONFIG_MINIX_FS is not set 712# CONFIG_MINIX_FS is not set
568# CONFIG_ROMFS_FS is not set 713# CONFIG_ROMFS_FS is not set
714CONFIG_INOTIFY=y
715CONFIG_INOTIFY_USER=y
569# CONFIG_QUOTA is not set 716# CONFIG_QUOTA is not set
570CONFIG_DNOTIFY=y 717CONFIG_DNOTIFY=y
571# CONFIG_AUTOFS_FS is not set 718# CONFIG_AUTOFS_FS is not set
572# CONFIG_AUTOFS4_FS is not set 719# CONFIG_AUTOFS4_FS is not set
720# CONFIG_FUSE_FS is not set
573 721
574# 722#
575# CD-ROM/DVD Filesystems 723# CD-ROM/DVD Filesystems
@@ -595,15 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
595# 743#
596CONFIG_PROC_FS=y 744CONFIG_PROC_FS=y
597CONFIG_PROC_KCORE=y 745CONFIG_PROC_KCORE=y
746CONFIG_PROC_SYSCTL=y
598CONFIG_SYSFS=y 747CONFIG_SYSFS=y
599CONFIG_DEVFS_FS=y
600CONFIG_DEVFS_MOUNT=y
601# CONFIG_DEVFS_DEBUG is not set
602# CONFIG_DEVPTS_FS_XATTR is not set
603CONFIG_TMPFS=y 748CONFIG_TMPFS=y
604# CONFIG_TMPFS_XATTR is not set 749# CONFIG_TMPFS_POSIX_ACL is not set
605# CONFIG_HUGETLB_PAGE is not set 750# CONFIG_HUGETLB_PAGE is not set
606CONFIG_RAMFS=y 751CONFIG_RAMFS=y
752# CONFIG_CONFIGFS_FS is not set
607 753
608# 754#
609# Miscellaneous filesystems 755# Miscellaneous filesystems
@@ -627,12 +773,14 @@ CONFIG_RAMFS=y
627# 773#
628CONFIG_NFS_FS=y 774CONFIG_NFS_FS=y
629CONFIG_NFS_V3=y 775CONFIG_NFS_V3=y
776# CONFIG_NFS_V3_ACL is not set
630# CONFIG_NFS_V4 is not set 777# CONFIG_NFS_V4 is not set
631# CONFIG_NFS_DIRECTIO is not set 778# CONFIG_NFS_DIRECTIO is not set
632# CONFIG_NFSD is not set 779# CONFIG_NFSD is not set
633CONFIG_ROOT_NFS=y 780CONFIG_ROOT_NFS=y
634CONFIG_LOCKD=y 781CONFIG_LOCKD=y
635CONFIG_LOCKD_V4=y 782CONFIG_LOCKD_V4=y
783CONFIG_NFS_COMMON=y
636CONFIG_SUNRPC=y 784CONFIG_SUNRPC=y
637# CONFIG_RPCSEC_GSS_KRB5 is not set 785# CONFIG_RPCSEC_GSS_KRB5 is not set
638# CONFIG_RPCSEC_GSS_SPKM3 is not set 786# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -641,6 +789,7 @@ CONFIG_SUNRPC=y
641# CONFIG_NCP_FS is not set 789# CONFIG_NCP_FS is not set
642# CONFIG_CODA_FS is not set 790# CONFIG_CODA_FS is not set
643# CONFIG_AFS_FS is not set 791# CONFIG_AFS_FS is not set
792# CONFIG_9P_FS is not set
644 793
645# 794#
646# Partition Types 795# Partition Types
@@ -701,10 +850,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
701# Kernel hacking 850# Kernel hacking
702# 851#
703# CONFIG_PRINTK_TIME is not set 852# CONFIG_PRINTK_TIME is not set
853CONFIG_ENABLE_MUST_CHECK=y
854# CONFIG_MAGIC_SYSRQ is not set
855# CONFIG_UNUSED_SYMBOLS is not set
704# CONFIG_DEBUG_KERNEL is not set 856# CONFIG_DEBUG_KERNEL is not set
705CONFIG_LOG_BUF_SHIFT=14 857CONFIG_LOG_BUF_SHIFT=14
706# CONFIG_DEBUG_BUGVERBOSE is not set 858# CONFIG_DEBUG_BUGVERBOSE is not set
859# CONFIG_DEBUG_FS is not set
707# CONFIG_FRAME_POINTER is not set 860# CONFIG_FRAME_POINTER is not set
861# CONFIG_UNWIND_INFO is not set
862# CONFIG_HEADERS_CHECK is not set
708 863
709# 864#
710# Security options 865# Security options
@@ -718,12 +873,9 @@ CONFIG_LOG_BUF_SHIFT=14
718# CONFIG_CRYPTO is not set 873# CONFIG_CRYPTO is not set
719 874
720# 875#
721# Hardware crypto devices
722#
723
724#
725# Library routines 876# Library routines
726# 877#
727# CONFIG_CRC_CCITT is not set 878# CONFIG_CRC_CCITT is not set
879# CONFIG_CRC16 is not set
728CONFIG_CRC32=y 880CONFIG_CRC32=y
729# CONFIG_LIBCRC32C is not set 881# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/mappi3/defconfig.smp b/arch/m32r/mappi3/defconfig.smp
index 2eebe75fc071..2f352267a6d9 100644
--- a/arch/m32r/mappi3/defconfig.smp
+++ b/arch/m32r/mappi3/defconfig.smp
@@ -1,21 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Tue May 31 17:55:34 2005 4# Mon Dec 11 19:57:33 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16# CONFIG_CLEAN_COMPILE is not set
17CONFIG_BROKEN=y
18CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 16CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32 17CONFIG_INIT_ENV_ARG_LIMIT=32
21 18
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
23# General setup 20# General setup
24# 21#
25CONFIG_LOCALVERSION="" 22CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y 24CONFIG_SWAP=y
27CONFIG_SYSVIPC=y 25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
28# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set 28# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y 29# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set
31# CONFIG_AUDIT is not set 31# CONFIG_AUDIT is not set
32CONFIG_HOTPLUG=y
33CONFIG_KOBJECT_UEVENT=y
34CONFIG_IKCONFIG=y 32CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y 33CONFIG_IKCONFIG_PROC=y
36# CONFIG_CPUSETS is not set 34# CONFIG_CPUSETS is not set
35CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y
37CONFIG_EMBEDDED=y 40CONFIG_EMBEDDED=y
41CONFIG_SYSCTL_SYSCALL=y
38# CONFIG_KALLSYMS is not set 42# CONFIG_KALLSYMS is not set
43CONFIG_HOTPLUG=y
39CONFIG_PRINTK=y 44CONFIG_PRINTK=y
40CONFIG_BUG=y 45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
41CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
42# CONFIG_FUTEX is not set 48# CONFIG_FUTEX is not set
43# CONFIG_EPOLL is not set 49# CONFIG_EPOLL is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y 50CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_SLAB=y
47CONFIG_CC_ALIGN_LABELS=0 52CONFIG_VM_EVENT_COUNTERS=y
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 53# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 54CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
52 56
53# 57#
54# Loadable module support 58# Loadable module support
@@ -56,13 +60,31 @@ CONFIG_BASE_SMALL=0
56CONFIG_MODULES=y 60CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y 61CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set 62# CONFIG_MODULE_FORCE_UNLOAD is not set
59CONFIG_OBSOLETE_MODPARM=y
60# CONFIG_MODVERSIONS is not set 63# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 64# CONFIG_MODULE_SRCVERSION_ALL is not set
62CONFIG_KMOD=y 65CONFIG_KMOD=y
63CONFIG_STOP_MACHINE=y 66CONFIG_STOP_MACHINE=y
64 67
65# 68#
69# Block layer
70#
71CONFIG_BLOCK=y
72# CONFIG_BLK_DEV_IO_TRACE is not set
73
74#
75# IO Schedulers
76#
77CONFIG_IOSCHED_NOOP=y
78# CONFIG_IOSCHED_AS is not set
79CONFIG_IOSCHED_DEADLINE=y
80CONFIG_IOSCHED_CFQ=y
81# CONFIG_DEFAULT_AS is not set
82# CONFIG_DEFAULT_DEADLINE is not set
83CONFIG_DEFAULT_CFQ=y
84# CONFIG_DEFAULT_NOOP is not set
85CONFIG_DEFAULT_IOSCHED="cfq"
86
87#
66# Processor type and features 88# Processor type and features
67# 89#
68# CONFIG_PLAT_MAPPI is not set 90# CONFIG_PLAT_MAPPI is not set
@@ -72,8 +94,10 @@ CONFIG_STOP_MACHINE=y
72# CONFIG_PLAT_OAKS32R is not set 94# CONFIG_PLAT_OAKS32R is not set
73# CONFIG_PLAT_MAPPI2 is not set 95# CONFIG_PLAT_MAPPI2 is not set
74CONFIG_PLAT_MAPPI3=y 96CONFIG_PLAT_MAPPI3=y
97# CONFIG_PLAT_M32104UT is not set
75CONFIG_CHIP_M32700=y 98CONFIG_CHIP_M32700=y
76# CONFIG_CHIP_M32102 is not set 99# CONFIG_CHIP_M32102 is not set
100# CONFIG_CHIP_M32104 is not set
77# CONFIG_CHIP_VDEC2 is not set 101# CONFIG_CHIP_VDEC2 is not set
78# CONFIG_CHIP_OPSP is not set 102# CONFIG_CHIP_OPSP is not set
79CONFIG_MMU=y 103CONFIG_MMU=y
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128
87CONFIG_MEMORY_START=0x08000000 111CONFIG_MEMORY_START=0x08000000
88CONFIG_MEMORY_SIZE=0x08000000 112CONFIG_MEMORY_SIZE=0x08000000
89CONFIG_NOHIGHMEM=y 113CONFIG_NOHIGHMEM=y
114CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
115CONFIG_SELECT_MEMORY_MODEL=y
116# CONFIG_FLATMEM_MANUAL is not set
117CONFIG_DISCONTIGMEM_MANUAL=y
118# CONFIG_SPARSEMEM_MANUAL is not set
90CONFIG_DISCONTIGMEM=y 119CONFIG_DISCONTIGMEM=y
120CONFIG_FLAT_NODE_MEM_MAP=y
121CONFIG_NEED_MULTIPLE_NODES=y
122# CONFIG_SPARSEMEM_STATIC is not set
123CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set
91CONFIG_IRAM_START=0x00f00000 125CONFIG_IRAM_START=0x00f00000
92CONFIG_IRAM_SIZE=0x00080000 126CONFIG_IRAM_SIZE=0x00080000
93CONFIG_RWSEM_GENERIC_SPINLOCK=y 127CONFIG_RWSEM_GENERIC_SPINLOCK=y
94# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 128# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
129CONFIG_GENERIC_FIND_NEXT_BIT=y
130CONFIG_GENERIC_HWEIGHT=y
95CONFIG_GENERIC_CALIBRATE_DELAY=y 131CONFIG_GENERIC_CALIBRATE_DELAY=y
96CONFIG_PREEMPT=y 132CONFIG_PREEMPT=y
97# CONFIG_HAVE_DEC_LOCK is not set
98CONFIG_SMP=y 133CONFIG_SMP=y
99# CONFIG_CHIP_M32700_TS1 is not set 134# CONFIG_CHIP_M32700_TS1 is not set
100CONFIG_NR_CPUS=2 135CONFIG_NR_CPUS=2
101# CONFIG_NUMA is not set 136CONFIG_NODES_SHIFT=1
102 137
103# 138#
104# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 139# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
105# 140#
106# CONFIG_PCI is not set
107# CONFIG_ISA is not set 141# CONFIG_ISA is not set
108 142
109# 143#
@@ -112,11 +146,12 @@ CONFIG_NR_CPUS=2
112CONFIG_PCCARD=y 146CONFIG_PCCARD=y
113# CONFIG_PCMCIA_DEBUG is not set 147# CONFIG_PCMCIA_DEBUG is not set
114CONFIG_PCMCIA=y 148CONFIG_PCMCIA=y
149CONFIG_PCMCIA_LOAD_CIS=y
150CONFIG_PCMCIA_IOCTL=y
115 151
116# 152#
117# PC-card bridges 153# PC-card bridges
118# 154#
119# CONFIG_TCIC is not set
120# CONFIG_M32R_PCC is not set 155# CONFIG_M32R_PCC is not set
121# CONFIG_M32R_CFC is not set 156# CONFIG_M32R_CFC is not set
122 157
@@ -131,6 +166,93 @@ CONFIG_BINFMT_ELF=y
131# CONFIG_BINFMT_MISC is not set 166# CONFIG_BINFMT_MISC is not set
132 167
133# 168#
169# Networking
170#
171CONFIG_NET=y
172
173#
174# Networking options
175#
176# CONFIG_NETDEBUG is not set
177# CONFIG_PACKET is not set
178CONFIG_UNIX=y
179CONFIG_XFRM=y
180# CONFIG_XFRM_USER is not set
181# CONFIG_XFRM_SUB_POLICY is not set
182# CONFIG_NET_KEY is not set
183CONFIG_INET=y
184# CONFIG_IP_MULTICAST is not set
185# CONFIG_IP_ADVANCED_ROUTER is not set
186CONFIG_IP_FIB_HASH=y
187CONFIG_IP_PNP=y
188CONFIG_IP_PNP_DHCP=y
189# CONFIG_IP_PNP_BOOTP is not set
190# CONFIG_IP_PNP_RARP is not set
191# CONFIG_NET_IPIP is not set
192# CONFIG_NET_IPGRE is not set
193# CONFIG_ARPD is not set
194# CONFIG_SYN_COOKIES is not set
195# CONFIG_INET_AH is not set
196# CONFIG_INET_ESP is not set
197# CONFIG_INET_IPCOMP is not set
198# CONFIG_INET_XFRM_TUNNEL is not set
199# CONFIG_INET_TUNNEL is not set
200CONFIG_INET_XFRM_MODE_TRANSPORT=y
201CONFIG_INET_XFRM_MODE_TUNNEL=y
202CONFIG_INET_XFRM_MODE_BEET=y
203CONFIG_INET_DIAG=y
204CONFIG_INET_TCP_DIAG=y
205# CONFIG_TCP_CONG_ADVANCED is not set
206CONFIG_TCP_CONG_CUBIC=y
207CONFIG_DEFAULT_TCP_CONG="cubic"
208# CONFIG_TCP_MD5SIG is not set
209# CONFIG_IPV6 is not set
210# CONFIG_INET6_XFRM_TUNNEL is not set
211# CONFIG_INET6_TUNNEL is not set
212# CONFIG_NETWORK_SECMARK is not set
213# CONFIG_NETFILTER is not set
214
215#
216# DCCP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_DCCP is not set
219
220#
221# SCTP Configuration (EXPERIMENTAL)
222#
223# CONFIG_IP_SCTP is not set
224
225#
226# TIPC Configuration (EXPERIMENTAL)
227#
228# CONFIG_TIPC is not set
229# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set
231# CONFIG_VLAN_8021Q is not set
232# CONFIG_DECNET is not set
233# CONFIG_LLC2 is not set
234# CONFIG_IPX is not set
235# CONFIG_ATALK is not set
236# CONFIG_X25 is not set
237# CONFIG_LAPB is not set
238# CONFIG_ECONET is not set
239# CONFIG_WAN_ROUTER is not set
240
241#
242# QoS and/or fair queueing
243#
244# CONFIG_NET_SCHED is not set
245
246#
247# Network testing
248#
249# CONFIG_NET_PKTGEN is not set
250# CONFIG_HAMRADIO is not set
251# CONFIG_IRDA is not set
252# CONFIG_BT is not set
253# CONFIG_IEEE80211 is not set
254
255#
134# Device Drivers 256# Device Drivers
135# 257#
136 258
@@ -140,6 +262,12 @@ CONFIG_BINFMT_ELF=y
140CONFIG_STANDALONE=y 262CONFIG_STANDALONE=y
141CONFIG_PREVENT_FIRMWARE_BUILD=y 263CONFIG_PREVENT_FIRMWARE_BUILD=y
142CONFIG_FW_LOADER=y 264CONFIG_FW_LOADER=y
265# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set
143 271
144# 272#
145# Memory Technology Devices (MTD) 273# Memory Technology Devices (MTD)
@@ -162,6 +290,8 @@ CONFIG_MTD_BLOCK=y
162# CONFIG_FTL is not set 290# CONFIG_FTL is not set
163# CONFIG_NFTL is not set 291# CONFIG_NFTL is not set
164# CONFIG_INFTL is not set 292# CONFIG_INFTL is not set
293# CONFIG_RFD_FTL is not set
294# CONFIG_SSFDC is not set
165 295
166# 296#
167# RAM/ROM/Flash chip drivers 297# RAM/ROM/Flash chip drivers
@@ -187,6 +317,7 @@ CONFIG_MTD_CFI_I2=y
187# Mapping drivers for chip access 317# Mapping drivers for chip access
188# 318#
189# CONFIG_MTD_COMPLEX_MAPPINGS is not set 319# CONFIG_MTD_COMPLEX_MAPPINGS is not set
320# CONFIG_MTD_PLATRAM is not set
190 321
191# 322#
192# Self-contained MTD device drivers 323# Self-contained MTD device drivers
@@ -194,7 +325,6 @@ CONFIG_MTD_CFI_I2=y
194# CONFIG_MTD_SLRAM is not set 325# CONFIG_MTD_SLRAM is not set
195# CONFIG_MTD_PHRAM is not set 326# CONFIG_MTD_PHRAM is not set
196# CONFIG_MTD_MTDRAM is not set 327# CONFIG_MTD_MTDRAM is not set
197# CONFIG_MTD_BLKMTD is not set
198# CONFIG_MTD_BLOCK2MTD is not set 328# CONFIG_MTD_BLOCK2MTD is not set
199 329
200# 330#
@@ -210,6 +340,11 @@ CONFIG_MTD_CFI_I2=y
210# CONFIG_MTD_NAND is not set 340# CONFIG_MTD_NAND is not set
211 341
212# 342#
343# OneNAND Flash Device Drivers
344#
345# CONFIG_MTD_ONENAND is not set
346
347#
213# Parallel port support 348# Parallel port support
214# 349#
215# CONFIG_PARPORT is not set 350# CONFIG_PARPORT is not set
@@ -221,7 +356,6 @@ CONFIG_MTD_CFI_I2=y
221# 356#
222# Block devices 357# Block devices
223# 358#
224# CONFIG_BLK_DEV_FD is not set
225# CONFIG_BLK_DEV_COW_COMMON is not set 359# CONFIG_BLK_DEV_COW_COMMON is not set
226CONFIG_BLK_DEV_LOOP=y 360CONFIG_BLK_DEV_LOOP=y
227# CONFIG_BLK_DEV_CRYPTOLOOP is not set 361# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -229,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m
229CONFIG_BLK_DEV_RAM=y 363CONFIG_BLK_DEV_RAM=y
230CONFIG_BLK_DEV_RAM_COUNT=16 364CONFIG_BLK_DEV_RAM_COUNT=16
231CONFIG_BLK_DEV_RAM_SIZE=4096 365CONFIG_BLK_DEV_RAM_SIZE=4096
366CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
232CONFIG_BLK_DEV_INITRD=y 367CONFIG_BLK_DEV_INITRD=y
233CONFIG_INITRAMFS_SOURCE=""
234# CONFIG_CDROM_PKTCDVD is not set 368# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set
235 370
236# 371#
237# IO Schedulers 372# Misc devices
238# 373#
239CONFIG_IOSCHED_NOOP=y 374# CONFIG_TIFM_CORE is not set
240# CONFIG_IOSCHED_AS is not set
241CONFIG_IOSCHED_DEADLINE=y
242CONFIG_IOSCHED_CFQ=y
243# CONFIG_ATA_OVER_ETH is not set
244 375
245# 376#
246# ATA/ATAPI/MFM/RLL support 377# ATA/ATAPI/MFM/RLL support
247# 378#
248CONFIG_IDE=y 379CONFIG_IDE=y
380CONFIG_IDE_MAX_HWIFS=4
249CONFIG_BLK_DEV_IDE=y 381CONFIG_BLK_DEV_IDE=y
250 382
251# 383#
@@ -254,7 +386,7 @@ CONFIG_BLK_DEV_IDE=y
254# CONFIG_BLK_DEV_IDE_SATA is not set 386# CONFIG_BLK_DEV_IDE_SATA is not set
255CONFIG_BLK_DEV_IDEDISK=y 387CONFIG_BLK_DEV_IDEDISK=y
256# CONFIG_IDEDISK_MULTI_MODE is not set 388# CONFIG_IDEDISK_MULTI_MODE is not set
257CONFIG_BLK_DEV_IDECS=y 389CONFIG_BLK_DEV_IDECS=m
258CONFIG_BLK_DEV_IDECD=m 390CONFIG_BLK_DEV_IDECD=m
259# CONFIG_BLK_DEV_IDETAPE is not set 391# CONFIG_BLK_DEV_IDETAPE is not set
260# CONFIG_BLK_DEV_IDEFLOPPY is not set 392# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -272,7 +404,13 @@ CONFIG_IDE_GENERIC=y
272# 404#
273# SCSI device support 405# SCSI device support
274# 406#
407# CONFIG_RAID_ATTRS is not set
275# CONFIG_SCSI is not set 408# CONFIG_SCSI is not set
409# CONFIG_SCSI_NETLINK is not set
410
411#
412# Serial ATA (prod) and Parallel ATA (experimental) drivers
413#
276 414
277# 415#
278# Multi-device support (RAID and LVM) 416# Multi-device support (RAID and LVM)
@@ -282,79 +420,19 @@ CONFIG_IDE_GENERIC=y
282# 420#
283# Fusion MPT device support 421# Fusion MPT device support
284# 422#
423# CONFIG_FUSION is not set
285 424
286# 425#
287# IEEE 1394 (FireWire) support 426# IEEE 1394 (FireWire) support
288# 427#
289# CONFIG_IEEE1394 is not set
290 428
291# 429#
292# I2O device support 430# I2O device support
293# 431#
294 432
295# 433#
296# Networking support 434# Network device support
297# 435#
298CONFIG_NET=y
299
300#
301# Networking options
302#
303# CONFIG_PACKET is not set
304CONFIG_UNIX=y
305# CONFIG_NET_KEY is not set
306CONFIG_INET=y
307# CONFIG_IP_MULTICAST is not set
308# CONFIG_IP_ADVANCED_ROUTER is not set
309CONFIG_IP_PNP=y
310CONFIG_IP_PNP_DHCP=y
311# CONFIG_IP_PNP_BOOTP is not set
312# CONFIG_IP_PNP_RARP is not set
313# CONFIG_NET_IPIP is not set
314# CONFIG_NET_IPGRE is not set
315# CONFIG_ARPD is not set
316# CONFIG_SYN_COOKIES is not set
317# CONFIG_INET_AH is not set
318# CONFIG_INET_ESP is not set
319# CONFIG_INET_IPCOMP is not set
320# CONFIG_INET_TUNNEL is not set
321CONFIG_IP_TCPDIAG=y
322# CONFIG_IP_TCPDIAG_IPV6 is not set
323# CONFIG_IPV6 is not set
324# CONFIG_NETFILTER is not set
325
326#
327# SCTP Configuration (EXPERIMENTAL)
328#
329# CONFIG_IP_SCTP 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_NET_DIVERT is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347# CONFIG_NET_CLS_ROUTE is not set
348
349#
350# Network testing
351#
352# CONFIG_NET_PKTGEN is not set
353# CONFIG_NETPOLL is not set
354# CONFIG_NET_POLL_CONTROLLER is not set
355# CONFIG_HAMRADIO is not set
356# CONFIG_IRDA is not set
357# CONFIG_BT is not set
358CONFIG_NETDEVICES=y 436CONFIG_NETDEVICES=y
359# CONFIG_DUMMY is not set 437# CONFIG_DUMMY is not set
360# CONFIG_BONDING is not set 438# CONFIG_BONDING is not set
@@ -362,6 +440,11 @@ CONFIG_NETDEVICES=y
362# CONFIG_TUN is not set 440# CONFIG_TUN is not set
363 441
364# 442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set
446
447#
365# Ethernet (10 or 100Mbit) 448# Ethernet (10 or 100Mbit)
366# 449#
367CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
@@ -399,6 +482,8 @@ CONFIG_SMC91X=y
399# CONFIG_SLIP is not set 482# CONFIG_SLIP is not set
400# CONFIG_SHAPER is not set 483# CONFIG_SHAPER is not set
401# CONFIG_NETCONSOLE is not set 484# CONFIG_NETCONSOLE is not set
485# CONFIG_NETPOLL is not set
486# CONFIG_NET_POLL_CONTROLLER is not set
402 487
403# 488#
404# ISDN subsystem 489# ISDN subsystem
@@ -414,6 +499,7 @@ CONFIG_SMC91X=y
414# Input device support 499# Input device support
415# 500#
416CONFIG_INPUT=y 501CONFIG_INPUT=y
502# CONFIG_INPUT_FF_MEMLESS is not set
417 503
418# 504#
419# Userland interfaces 505# Userland interfaces
@@ -445,7 +531,6 @@ CONFIG_SERIO=y
445# CONFIG_SERIO_LIBPS2 is not set 531# CONFIG_SERIO_LIBPS2 is not set
446# CONFIG_SERIO_RAW is not set 532# CONFIG_SERIO_RAW is not set
447# CONFIG_GAMEPORT is not set 533# CONFIG_GAMEPORT is not set
448CONFIG_SOUND_GAMEPORT=y
449 534
450# 535#
451# Character devices 536# Character devices
@@ -465,7 +550,6 @@ CONFIG_SERIAL_CORE=y
465CONFIG_SERIAL_CORE_CONSOLE=y 550CONFIG_SERIAL_CORE_CONSOLE=y
466CONFIG_SERIAL_M32R_SIO=y 551CONFIG_SERIAL_M32R_SIO=y
467CONFIG_SERIAL_M32R_SIO_CONSOLE=y 552CONFIG_SERIAL_M32R_SIO_CONSOLE=y
468# CONFIG_SERIAL_M32R_PLDSIO is not set
469CONFIG_UNIX98_PTYS=y 553CONFIG_UNIX98_PTYS=y
470CONFIG_LEGACY_PTYS=y 554CONFIG_LEGACY_PTYS=y
471CONFIG_LEGACY_PTY_COUNT=256 555CONFIG_LEGACY_PTY_COUNT=256
@@ -479,25 +563,27 @@ CONFIG_LEGACY_PTY_COUNT=256
479# Watchdog Cards 563# Watchdog Cards
480# 564#
481# CONFIG_WATCHDOG is not set 565# CONFIG_WATCHDOG is not set
566CONFIG_HW_RANDOM=y
482# CONFIG_RTC is not set 567# CONFIG_RTC is not set
483# CONFIG_GEN_RTC is not set
484# CONFIG_DTLK is not set 568# CONFIG_DTLK is not set
485# CONFIG_R3964 is not set 569# CONFIG_R3964 is not set
486 570
487# 571#
488# Ftape, the floppy tape device driver 572# Ftape, the floppy tape device driver
489# 573#
490# CONFIG_DRM is not set
491 574
492# 575#
493# PCMCIA character devices 576# PCMCIA character devices
494# 577#
495# CONFIG_SYNCLINK_CS is not set 578# CONFIG_SYNCLINK_CS is not set
579# CONFIG_CARDMAN_4000 is not set
580# CONFIG_CARDMAN_4040 is not set
496# CONFIG_RAW_DRIVER is not set 581# CONFIG_RAW_DRIVER is not set
497 582
498# 583#
499# TPM devices 584# TPM devices
500# 585#
586# CONFIG_TCG_TPM is not set
501 587
502# 588#
503# I2C support 589# I2C support
@@ -505,13 +591,25 @@ CONFIG_LEGACY_PTY_COUNT=256
505# CONFIG_I2C is not set 591# CONFIG_I2C is not set
506 592
507# 593#
594# SPI support
595#
596# CONFIG_SPI is not set
597# CONFIG_SPI_MASTER is not set
598
599#
508# Dallas's 1-wire bus 600# Dallas's 1-wire bus
509# 601#
510# CONFIG_W1 is not set 602# CONFIG_W1 is not set
511 603
512# 604#
513# Misc devices 605# Hardware Monitoring support
514# 606#
607CONFIG_HWMON=y
608# CONFIG_HWMON_VID is not set
609# CONFIG_SENSORS_ABITUGURU is not set
610# CONFIG_SENSORS_F71805F is not set
611# CONFIG_SENSORS_VT1211 is not set
612# CONFIG_HWMON_DEBUG_CHIP is not set
515 613
516# 614#
517# Multimedia devices 615# Multimedia devices
@@ -526,7 +624,9 @@ CONFIG_LEGACY_PTY_COUNT=256
526# 624#
527# Graphics support 625# Graphics support
528# 626#
627CONFIG_FIRMWARE_EDID=y
529# CONFIG_FB is not set 628# CONFIG_FB is not set
629# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
530 630
531# 631#
532# Sound 632# Sound
@@ -538,6 +638,11 @@ CONFIG_LEGACY_PTY_COUNT=256
538# 638#
539# CONFIG_USB_ARCH_HAS_HCD is not set 639# CONFIG_USB_ARCH_HAS_HCD is not set
540# CONFIG_USB_ARCH_HAS_OHCI is not set 640# CONFIG_USB_ARCH_HAS_OHCI is not set
641# CONFIG_USB_ARCH_HAS_EHCI is not set
642
643#
644# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
645#
541 646
542# 647#
543# USB Gadget Support 648# USB Gadget Support
@@ -550,35 +655,73 @@ CONFIG_LEGACY_PTY_COUNT=256
550# CONFIG_MMC is not set 655# CONFIG_MMC is not set
551 656
552# 657#
658# LED devices
659#
660# CONFIG_NEW_LEDS is not set
661
662#
663# LED drivers
664#
665
666#
667# LED Triggers
668#
669
670#
553# InfiniBand support 671# InfiniBand support
554# 672#
555# CONFIG_INFINIBAND is not set 673
674#
675# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
676#
677
678#
679# Real Time Clock
680#
681# CONFIG_RTC_CLASS is not set
682
683#
684# DMA Engine support
685#
686# CONFIG_DMA_ENGINE is not set
687
688#
689# DMA Clients
690#
691
692#
693# DMA Devices
694#
556 695
557# 696#
558# File systems 697# File systems
559# 698#
560CONFIG_EXT2_FS=y 699CONFIG_EXT2_FS=y
561# CONFIG_EXT2_FS_XATTR is not set 700# CONFIG_EXT2_FS_XATTR is not set
701# CONFIG_EXT2_FS_XIP is not set
562CONFIG_EXT3_FS=y 702CONFIG_EXT3_FS=y
563CONFIG_EXT3_FS_XATTR=y 703CONFIG_EXT3_FS_XATTR=y
564# CONFIG_EXT3_FS_POSIX_ACL is not set 704# CONFIG_EXT3_FS_POSIX_ACL is not set
565# CONFIG_EXT3_FS_SECURITY is not set 705# CONFIG_EXT3_FS_SECURITY is not set
706# CONFIG_EXT4DEV_FS is not set
566CONFIG_JBD=y 707CONFIG_JBD=y
567# CONFIG_JBD_DEBUG is not set 708# CONFIG_JBD_DEBUG is not set
568CONFIG_FS_MBCACHE=y 709CONFIG_FS_MBCACHE=y
569# CONFIG_REISERFS_FS is not set 710# CONFIG_REISERFS_FS is not set
570# CONFIG_JFS_FS is not set 711# CONFIG_JFS_FS is not set
571 712# CONFIG_FS_POSIX_ACL is not set
572#
573# XFS support
574#
575# CONFIG_XFS_FS is not set 713# CONFIG_XFS_FS is not set
714# CONFIG_GFS2_FS is not set
715# CONFIG_OCFS2_FS is not set
576# CONFIG_MINIX_FS is not set 716# CONFIG_MINIX_FS is not set
577CONFIG_ROMFS_FS=y 717CONFIG_ROMFS_FS=y
718CONFIG_INOTIFY=y
719CONFIG_INOTIFY_USER=y
578# CONFIG_QUOTA is not set 720# CONFIG_QUOTA is not set
579CONFIG_DNOTIFY=y 721CONFIG_DNOTIFY=y
580# CONFIG_AUTOFS_FS is not set 722# CONFIG_AUTOFS_FS is not set
581# CONFIG_AUTOFS4_FS is not set 723# CONFIG_AUTOFS4_FS is not set
724# CONFIG_FUSE_FS is not set
582 725
583# 726#
584# CD-ROM/DVD Filesystems 727# CD-ROM/DVD Filesystems
@@ -603,16 +746,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
603# 746#
604CONFIG_PROC_FS=y 747CONFIG_PROC_FS=y
605CONFIG_PROC_KCORE=y 748CONFIG_PROC_KCORE=y
749CONFIG_PROC_SYSCTL=y
606CONFIG_SYSFS=y 750CONFIG_SYSFS=y
607CONFIG_DEVFS_FS=y
608CONFIG_DEVFS_MOUNT=y
609# CONFIG_DEVFS_DEBUG is not set
610# CONFIG_DEVPTS_FS_XATTR is not set
611CONFIG_TMPFS=y 751CONFIG_TMPFS=y
612# CONFIG_TMPFS_XATTR is not set 752# CONFIG_TMPFS_POSIX_ACL is not set
613# CONFIG_HUGETLBFS is not set
614# CONFIG_HUGETLB_PAGE is not set 753# CONFIG_HUGETLB_PAGE is not set
615CONFIG_RAMFS=y 754CONFIG_RAMFS=y
755# CONFIG_CONFIGFS_FS is not set
616 756
617# 757#
618# Miscellaneous filesystems 758# Miscellaneous filesystems
@@ -629,8 +769,9 @@ CONFIG_JFFS_FS_VERBOSE=0
629CONFIG_JFFS_PROC_FS=y 769CONFIG_JFFS_PROC_FS=y
630CONFIG_JFFS2_FS=y 770CONFIG_JFFS2_FS=y
631CONFIG_JFFS2_FS_DEBUG=0 771CONFIG_JFFS2_FS_DEBUG=0
632# CONFIG_JFFS2_FS_NAND is not set 772CONFIG_JFFS2_FS_WRITEBUFFER=y
633# CONFIG_JFFS2_FS_NOR_ECC is not set 773# CONFIG_JFFS2_SUMMARY is not set
774# CONFIG_JFFS2_FS_XATTR is not set
634# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 775# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
635CONFIG_JFFS2_ZLIB=y 776CONFIG_JFFS2_ZLIB=y
636CONFIG_JFFS2_RTIME=y 777CONFIG_JFFS2_RTIME=y
@@ -647,12 +788,14 @@ CONFIG_JFFS2_RTIME=y
647# 788#
648CONFIG_NFS_FS=y 789CONFIG_NFS_FS=y
649CONFIG_NFS_V3=y 790CONFIG_NFS_V3=y
791# CONFIG_NFS_V3_ACL is not set
650# CONFIG_NFS_V4 is not set 792# CONFIG_NFS_V4 is not set
651# CONFIG_NFS_DIRECTIO is not set 793# CONFIG_NFS_DIRECTIO is not set
652# CONFIG_NFSD is not set 794# CONFIG_NFSD is not set
653CONFIG_ROOT_NFS=y 795CONFIG_ROOT_NFS=y
654CONFIG_LOCKD=y 796CONFIG_LOCKD=y
655CONFIG_LOCKD_V4=y 797CONFIG_LOCKD_V4=y
798CONFIG_NFS_COMMON=y
656CONFIG_SUNRPC=y 799CONFIG_SUNRPC=y
657# CONFIG_RPCSEC_GSS_KRB5 is not set 800# CONFIG_RPCSEC_GSS_KRB5 is not set
658# CONFIG_RPCSEC_GSS_SPKM3 is not set 801# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -661,6 +804,7 @@ CONFIG_SUNRPC=y
661# CONFIG_NCP_FS is not set 804# CONFIG_NCP_FS is not set
662# CONFIG_CODA_FS is not set 805# CONFIG_CODA_FS is not set
663# CONFIG_AFS_FS is not set 806# CONFIG_AFS_FS is not set
807# CONFIG_9P_FS is not set
664 808
665# 809#
666# Partition Types 810# Partition Types
@@ -721,10 +865,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
721# Kernel hacking 865# Kernel hacking
722# 866#
723# CONFIG_PRINTK_TIME is not set 867# CONFIG_PRINTK_TIME is not set
868CONFIG_ENABLE_MUST_CHECK=y
869# CONFIG_MAGIC_SYSRQ is not set
870# CONFIG_UNUSED_SYMBOLS is not set
724# CONFIG_DEBUG_KERNEL is not set 871# CONFIG_DEBUG_KERNEL is not set
725CONFIG_LOG_BUF_SHIFT=15 872CONFIG_LOG_BUF_SHIFT=15
726# CONFIG_DEBUG_BUGVERBOSE is not set 873# CONFIG_DEBUG_BUGVERBOSE is not set
874# CONFIG_DEBUG_FS is not set
727# CONFIG_FRAME_POINTER is not set 875# CONFIG_FRAME_POINTER is not set
876# CONFIG_UNWIND_INFO is not set
877# CONFIG_HEADERS_CHECK is not set
728 878
729# 879#
730# Security options 880# Security options
@@ -738,13 +888,10 @@ CONFIG_LOG_BUF_SHIFT=15
738# CONFIG_CRYPTO is not set 888# CONFIG_CRYPTO is not set
739 889
740# 890#
741# Hardware crypto devices
742#
743
744#
745# Library routines 891# Library routines
746# 892#
747# CONFIG_CRC_CCITT is not set 893# CONFIG_CRC_CCITT is not set
894# CONFIG_CRC16 is not set
748CONFIG_CRC32=y 895CONFIG_CRC32=y
749# CONFIG_LIBCRC32C is not set 896# CONFIG_LIBCRC32C is not set
750CONFIG_ZLIB_INFLATE=y 897CONFIG_ZLIB_INFLATE=y
diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c
index 03fc4c858e0e..9880abac3f54 100644
--- a/arch/m32r/mm/fault-nommu.c
+++ b/arch/m32r/mm/fault-nommu.c
@@ -7,8 +7,6 @@
7 * Copyright (C) 1995 Linus Torvalds 7 * Copyright (C) 1995 Linus Torvalds
8 */ 8 */
9 9
10/* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */
11
12#include <linux/signal.h> 10#include <linux/signal.h>
13#include <linux/sched.h> 11#include <linux/sched.h>
14#include <linux/kernel.h> 12#include <linux/kernel.h>
@@ -46,32 +44,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
46#define tlb_entry_d tlb_entry_d_dat[smp_processor_id()] 44#define tlb_entry_d tlb_entry_d_dat[smp_processor_id()]
47#endif 45#endif
48 46
49/*
50 * Unlock any spinlocks which will prevent us from getting the
51 * message out
52 */
53void bust_spinlocks(int yes)
54{
55 int loglevel_save = console_loglevel;
56
57 if (yes) {
58 oops_in_progress = 1;
59 return;
60 }
61#ifdef CONFIG_VT
62 unblank_screen();
63#endif
64 oops_in_progress = 0;
65 /*
66 * OK, the message is on the console. Now we call printk()
67 * without oops_in_progress set so that printk will give klogd
68 * a poke. Hold onto your hats...
69 */
70 console_loglevel = 15; /* NMI oopser may have shut the console up */
71 printk(" ");
72 console_loglevel = loglevel_save;
73}
74
75void do_BUG(const char *file, int line) 47void do_BUG(const char *file, int line)
76{ 48{
77 bust_spinlocks(1); 49 bust_spinlocks(1);
@@ -161,4 +133,3 @@ void local_flush_tlb_all(void)
161{ 133{
162 BUG(); 134 BUG();
163} 135}
164
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index 9b9feb0f1610..037d58e82fb5 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -49,32 +49,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
49 49
50extern void init_tlb(void); 50extern void init_tlb(void);
51 51
52/*
53 * Unlock any spinlocks which will prevent us from getting the
54 * message out
55 */
56void bust_spinlocks(int yes)
57{
58 int loglevel_save = console_loglevel;
59
60 if (yes) {
61 oops_in_progress = 1;
62 return;
63 }
64#ifdef CONFIG_VT
65 unblank_screen();
66#endif
67 oops_in_progress = 0;
68 /*
69 * OK, the message is on the console. Now we call printk()
70 * without oops_in_progress set so that printk will give klogd
71 * a poke. Hold onto your hats...
72 */
73 console_loglevel = 15; /* NMI oopser may have shut the console up */
74 printk(" ");
75 console_loglevel = loglevel_save;
76}
77
78/*======================================================================* 52/*======================================================================*
79 * do_page_fault() 53 * do_page_fault()
80 *======================================================================* 54 *======================================================================*
@@ -362,8 +336,10 @@ vmalloc_fault:
362 if (!pte_present(*pte_k)) 336 if (!pte_present(*pte_k))
363 goto no_context; 337 goto no_context;
364 338
365 addr = (address & PAGE_MASK) | (error_code & ACE_INSTRUCTION); 339 addr = (address & PAGE_MASK);
340 set_thread_fault_code(error_code);
366 update_mmu_cache(NULL, addr, *pte_k); 341 update_mmu_cache(NULL, addr, *pte_k);
342 set_thread_fault_code(0);
367 return; 343 return;
368 } 344 }
369} 345}
@@ -377,7 +353,7 @@ vmalloc_fault:
377void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, 353void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
378 pte_t pte) 354 pte_t pte)
379{ 355{
380 unsigned long *entry1, *entry2; 356 volatile unsigned long *entry1, *entry2;
381 unsigned long pte_data, flags; 357 unsigned long pte_data, flags;
382 unsigned int *entry_dat; 358 unsigned int *entry_dat;
383 int inst = get_thread_fault_code() & ACE_INSTRUCTION; 359 int inst = get_thread_fault_code() & ACE_INSTRUCTION;
@@ -391,30 +367,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
391 367
392 vaddr = (vaddr & PAGE_MASK) | get_asid(); 368 vaddr = (vaddr & PAGE_MASK) | get_asid();
393 369
370 pte_data = pte_val(pte);
371
394#ifdef CONFIG_CHIP_OPSP 372#ifdef CONFIG_CHIP_OPSP
395 entry1 = (unsigned long *)ITLB_BASE; 373 entry1 = (unsigned long *)ITLB_BASE;
396 for(i = 0 ; i < NR_TLB_ENTRIES; i++) { 374 for (i = 0; i < NR_TLB_ENTRIES; i++) {
397 if(*entry1++ == vaddr) { 375 if (*entry1++ == vaddr) {
398 pte_data = pte_val(pte); 376 set_tlb_data(entry1, pte_data);
399 set_tlb_data(entry1, pte_data); 377 break;
400 break; 378 }
401 } 379 entry1++;
402 entry1++;
403 } 380 }
404 entry2 = (unsigned long *)DTLB_BASE; 381 entry2 = (unsigned long *)DTLB_BASE;
405 for(i = 0 ; i < NR_TLB_ENTRIES ; i++) { 382 for (i = 0; i < NR_TLB_ENTRIES; i++) {
406 if(*entry2++ == vaddr) { 383 if (*entry2++ == vaddr) {
407 pte_data = pte_val(pte); 384 set_tlb_data(entry2, pte_data);
408 set_tlb_data(entry2, pte_data); 385 break;
409 break; 386 }
410 } 387 entry2++;
411 entry2++;
412 } 388 }
413 local_irq_restore(flags);
414 return;
415#else 389#else
416 pte_data = pte_val(pte);
417
418 /* 390 /*
419 * Update TLB entries 391 * Update TLB entries
420 * entry1: ITLB entry address 392 * entry1: ITLB entry address
@@ -439,6 +411,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
439 "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset) 411 "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset)
440 : "r4", "memory" 412 : "r4", "memory"
441 ); 413 );
414#endif
442 415
443 if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END)) 416 if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END))
444 goto notfound; 417 goto notfound;
@@ -482,7 +455,6 @@ notfound:
482 set_tlb_data(entry1, pte_data); 455 set_tlb_data(entry1, pte_data);
483 456
484 goto found; 457 goto found;
485#endif
486} 458}
487 459
488/*======================================================================* 460/*======================================================================*
diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S
index 9a4d40b3d6a2..8bb74b10dca7 100644
--- a/arch/m32r/mm/mmu.S
+++ b/arch/m32r/mm/mmu.S
@@ -4,8 +4,6 @@
4 * Copyright (C) 2001 by Hiroyuki Kondo 4 * Copyright (C) 2001 by Hiroyuki Kondo
5 */ 5 */
6 6
7/* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */
8
9#include <linux/linkage.h> 7#include <linux/linkage.h>
10#include <asm/assembler.h> 8#include <asm/assembler.h>
11#include <asm/smp.h> 9#include <asm/smp.h>
@@ -345,5 +343,4 @@ ENTRY(m32r_otlb_entrys)
345 343
346#endif /* CONFIG_MMU */ 344#endif /* CONFIG_MMU */
347 345
348.end 346 .end
349
diff --git a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu
index 3f9fe519acb2..aaa00828e0d3 100644
--- a/arch/m32r/oaks32r/defconfig.nommu
+++ b/arch/m32r/oaks32r/defconfig.nommu
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:22:04 2005 4# Tue Dec 12 12:09:17 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 17CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 18CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,28 +21,35 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
22# General setup 21# General setup
23# 22#
24CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25# CONFIG_SYSVIPC is not set
25# CONFIG_POSIX_MQUEUE is not set 26# CONFIG_POSIX_MQUEUE is not set
26CONFIG_BSD_PROCESS_ACCT=y 27CONFIG_BSD_PROCESS_ACCT=y
27# CONFIG_BSD_PROCESS_ACCT_V3 is not set 28# CONFIG_BSD_PROCESS_ACCT_V3 is not set
28CONFIG_SYSCTL=y 29# CONFIG_TASKSTATS is not set
30# CONFIG_UTS_NS is not set
29# CONFIG_AUDIT is not set 31# CONFIG_AUDIT is not set
30CONFIG_HOTPLUG=y
31CONFIG_KOBJECT_UEVENT=y
32# CONFIG_IKCONFIG is not set 32# CONFIG_IKCONFIG is not set
33CONFIG_SYSFS_DEPRECATED=y
34# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE=""
36# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
37CONFIG_SYSCTL=y
33CONFIG_EMBEDDED=y 38CONFIG_EMBEDDED=y
39CONFIG_SYSCTL_SYSCALL=y
34# CONFIG_KALLSYMS is not set 40# CONFIG_KALLSYMS is not set
41CONFIG_HOTPLUG=y
35CONFIG_PRINTK=y 42CONFIG_PRINTK=y
36CONFIG_BUG=y 43CONFIG_BUG=y
44CONFIG_ELF_CORE=y
37CONFIG_BASE_FULL=y 45CONFIG_BASE_FULL=y
38# CONFIG_FUTEX is not set 46# CONFIG_FUTEX is not set
39# CONFIG_EPOLL is not set 47# CONFIG_EPOLL is not set
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 48CONFIG_SLAB=y
41CONFIG_CC_ALIGN_FUNCTIONS=0 49CONFIG_VM_EVENT_COUNTERS=y
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45CONFIG_TINY_SHMEM=y 50CONFIG_TINY_SHMEM=y
46CONFIG_BASE_SMALL=0 51CONFIG_BASE_SMALL=0
52# CONFIG_SLOB is not set
47 53
48# 54#
49# Loadable module support 55# Loadable module support
@@ -51,12 +57,30 @@ CONFIG_BASE_SMALL=0
51CONFIG_MODULES=y 57CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y 58CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set 59# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55# CONFIG_MODVERSIONS is not set 60# CONFIG_MODVERSIONS is not set
56# CONFIG_MODULE_SRCVERSION_ALL is not set 61# CONFIG_MODULE_SRCVERSION_ALL is not set
57CONFIG_KMOD=y 62CONFIG_KMOD=y
58 63
59# 64#
65# Block layer
66#
67CONFIG_BLOCK=y
68# CONFIG_BLK_DEV_IO_TRACE is not set
69
70#
71# IO Schedulers
72#
73CONFIG_IOSCHED_NOOP=y
74# CONFIG_IOSCHED_AS is not set
75CONFIG_IOSCHED_DEADLINE=y
76CONFIG_IOSCHED_CFQ=y
77# CONFIG_DEFAULT_AS is not set
78# CONFIG_DEFAULT_DEADLINE is not set
79CONFIG_DEFAULT_CFQ=y
80# CONFIG_DEFAULT_NOOP is not set
81CONFIG_DEFAULT_IOSCHED="cfq"
82
83#
60# Processor type and features 84# Processor type and features
61# 85#
62# CONFIG_PLAT_MAPPI is not set 86# CONFIG_PLAT_MAPPI is not set
@@ -66,8 +90,10 @@ CONFIG_KMOD=y
66CONFIG_PLAT_OAKS32R=y 90CONFIG_PLAT_OAKS32R=y
67# CONFIG_PLAT_MAPPI2 is not set 91# CONFIG_PLAT_MAPPI2 is not set
68# CONFIG_PLAT_MAPPI3 is not set 92# CONFIG_PLAT_MAPPI3 is not set
93# CONFIG_PLAT_M32104UT is not set
69# CONFIG_CHIP_M32700 is not set 94# CONFIG_CHIP_M32700 is not set
70CONFIG_CHIP_M32102=y 95CONFIG_CHIP_M32102=y
96# CONFIG_CHIP_M32104 is not set
71# CONFIG_CHIP_VDEC2 is not set 97# CONFIG_CHIP_VDEC2 is not set
72# CONFIG_CHIP_OPSP is not set 98# CONFIG_CHIP_OPSP is not set
73CONFIG_ISA_M32R=y 99CONFIG_ISA_M32R=y
@@ -77,18 +103,31 @@ CONFIG_TIMER_DIVIDE=128
77CONFIG_MEMORY_START=0x01000000 103CONFIG_MEMORY_START=0x01000000
78CONFIG_MEMORY_SIZE=0x00800000 104CONFIG_MEMORY_SIZE=0x00800000
79CONFIG_NOHIGHMEM=y 105CONFIG_NOHIGHMEM=y
80# CONFIG_DISCONTIGMEM is not set 106CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
107CONFIG_SELECT_MEMORY_MODEL=y
108# CONFIG_FLATMEM_MANUAL is not set
109CONFIG_DISCONTIGMEM_MANUAL=y
110# CONFIG_SPARSEMEM_MANUAL is not set
111CONFIG_DISCONTIGMEM=y
112CONFIG_FLAT_NODE_MEM_MAP=y
113CONFIG_NEED_MULTIPLE_NODES=y
114# CONFIG_SPARSEMEM_STATIC is not set
115CONFIG_SPLIT_PTLOCK_CPUS=4
116# CONFIG_RESOURCES_64BIT is not set
117CONFIG_IRAM_START=0x00f00000
118CONFIG_IRAM_SIZE=0x00010000
81CONFIG_RWSEM_GENERIC_SPINLOCK=y 119CONFIG_RWSEM_GENERIC_SPINLOCK=y
82# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 120# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
121CONFIG_GENERIC_FIND_NEXT_BIT=y
122CONFIG_GENERIC_HWEIGHT=y
83CONFIG_GENERIC_CALIBRATE_DELAY=y 123CONFIG_GENERIC_CALIBRATE_DELAY=y
84CONFIG_PREEMPT=y 124CONFIG_PREEMPT=y
85# CONFIG_HAVE_DEC_LOCK is not set
86# CONFIG_SMP is not set 125# CONFIG_SMP is not set
126CONFIG_NODES_SHIFT=1
87 127
88# 128#
89# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 129# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
90# 130#
91# CONFIG_PCI is not set
92# CONFIG_ISA is not set 131# CONFIG_ISA is not set
93 132
94# 133#
@@ -109,6 +148,94 @@ CONFIG_BINFMT_FLAT=y
109# CONFIG_BINFMT_MISC is not set 148# CONFIG_BINFMT_MISC is not set
110 149
111# 150#
151# Networking
152#
153CONFIG_NET=y
154
155#
156# Networking options
157#
158# CONFIG_NETDEBUG is not set
159CONFIG_PACKET=y
160# CONFIG_PACKET_MMAP is not set
161CONFIG_UNIX=y
162CONFIG_XFRM=y
163# CONFIG_XFRM_USER is not set
164# CONFIG_XFRM_SUB_POLICY is not set
165# CONFIG_NET_KEY is not set
166CONFIG_INET=y
167# CONFIG_IP_MULTICAST is not set
168# CONFIG_IP_ADVANCED_ROUTER is not set
169CONFIG_IP_FIB_HASH=y
170CONFIG_IP_PNP=y
171CONFIG_IP_PNP_DHCP=y
172# CONFIG_IP_PNP_BOOTP is not set
173# CONFIG_IP_PNP_RARP is not set
174# CONFIG_NET_IPIP is not set
175# CONFIG_NET_IPGRE is not set
176# CONFIG_ARPD is not set
177# CONFIG_SYN_COOKIES is not set
178# CONFIG_INET_AH is not set
179# CONFIG_INET_ESP is not set
180# CONFIG_INET_IPCOMP is not set
181# CONFIG_INET_XFRM_TUNNEL is not set
182# CONFIG_INET_TUNNEL is not set
183CONFIG_INET_XFRM_MODE_TRANSPORT=y
184CONFIG_INET_XFRM_MODE_TUNNEL=y
185CONFIG_INET_XFRM_MODE_BEET=y
186CONFIG_INET_DIAG=y
187CONFIG_INET_TCP_DIAG=y
188# CONFIG_TCP_CONG_ADVANCED is not set
189CONFIG_TCP_CONG_CUBIC=y
190CONFIG_DEFAULT_TCP_CONG="cubic"
191# CONFIG_TCP_MD5SIG is not set
192# CONFIG_IPV6 is not set
193# CONFIG_INET6_XFRM_TUNNEL is not set
194# CONFIG_INET6_TUNNEL is not set
195# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set
212# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set
214# CONFIG_VLAN_8021Q is not set
215# CONFIG_DECNET is not set
216# CONFIG_LLC2 is not set
217# CONFIG_IPX is not set
218# CONFIG_ATALK is not set
219# CONFIG_X25 is not set
220# CONFIG_LAPB is not set
221# CONFIG_ECONET is not set
222# CONFIG_WAN_ROUTER is not set
223
224#
225# QoS and/or fair queueing
226#
227# CONFIG_NET_SCHED is not set
228
229#
230# Network testing
231#
232# CONFIG_NET_PKTGEN is not set
233# CONFIG_HAMRADIO is not set
234# CONFIG_IRDA is not set
235# CONFIG_BT is not set
236# CONFIG_IEEE80211 is not set
237
238#
112# Device Drivers 239# Device Drivers
113# 240#
114 241
@@ -118,6 +245,12 @@ CONFIG_BINFMT_FLAT=y
118CONFIG_STANDALONE=y 245CONFIG_STANDALONE=y
119CONFIG_PREVENT_FIRMWARE_BUILD=y 246CONFIG_PREVENT_FIRMWARE_BUILD=y
120# CONFIG_FW_LOADER is not set 247# CONFIG_FW_LOADER is not set
248# CONFIG_SYS_HYPERVISOR is not set
249
250#
251# Connector - unified userspace <-> kernelspace linker
252#
253# CONFIG_CONNECTOR is not set
121 254
122# 255#
123# Memory Technology Devices (MTD) 256# Memory Technology Devices (MTD)
@@ -136,7 +269,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
136# 269#
137# Block devices 270# Block devices
138# 271#
139# CONFIG_BLK_DEV_FD is not set
140# CONFIG_BLK_DEV_COW_COMMON is not set 272# CONFIG_BLK_DEV_COW_COMMON is not set
141CONFIG_BLK_DEV_LOOP=y 273CONFIG_BLK_DEV_LOOP=y
142# CONFIG_BLK_DEV_CRYPTOLOOP is not set 274# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -144,18 +276,15 @@ CONFIG_BLK_DEV_NBD=y
144CONFIG_BLK_DEV_RAM=y 276CONFIG_BLK_DEV_RAM=y
145CONFIG_BLK_DEV_RAM_COUNT=16 277CONFIG_BLK_DEV_RAM_COUNT=16
146CONFIG_BLK_DEV_RAM_SIZE=4096 278CONFIG_BLK_DEV_RAM_SIZE=4096
279CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
147# CONFIG_BLK_DEV_INITRD is not set 280# CONFIG_BLK_DEV_INITRD is not set
148CONFIG_INITRAMFS_SOURCE=""
149# CONFIG_CDROM_PKTCDVD is not set 281# CONFIG_CDROM_PKTCDVD is not set
282# CONFIG_ATA_OVER_ETH is not set
150 283
151# 284#
152# IO Schedulers 285# Misc devices
153# 286#
154CONFIG_IOSCHED_NOOP=y 287# CONFIG_TIFM_CORE is not set
155# CONFIG_IOSCHED_AS is not set
156CONFIG_IOSCHED_DEADLINE=y
157CONFIG_IOSCHED_CFQ=y
158# CONFIG_ATA_OVER_ETH is not set
159 288
160# 289#
161# ATA/ATAPI/MFM/RLL support 290# ATA/ATAPI/MFM/RLL support
@@ -165,7 +294,13 @@ CONFIG_IOSCHED_CFQ=y
165# 294#
166# SCSI device support 295# SCSI device support
167# 296#
297# CONFIG_RAID_ATTRS is not set
168# CONFIG_SCSI is not set 298# CONFIG_SCSI is not set
299# CONFIG_SCSI_NETLINK is not set
300
301#
302# Serial ATA (prod) and Parallel ATA (experimental) drivers
303#
169 304
170# 305#
171# Multi-device support (RAID and LVM) 306# Multi-device support (RAID and LVM)
@@ -175,6 +310,7 @@ CONFIG_IOSCHED_CFQ=y
175# 310#
176# Fusion MPT device support 311# Fusion MPT device support
177# 312#
313# CONFIG_FUSION is not set
178 314
179# 315#
180# IEEE 1394 (FireWire) support 316# IEEE 1394 (FireWire) support
@@ -185,69 +321,8 @@ CONFIG_IOSCHED_CFQ=y
185# 321#
186 322
187# 323#
188# Networking support 324# Network device support
189#
190CONFIG_NET=y
191
192#
193# Networking options
194#
195CONFIG_PACKET=y
196# CONFIG_PACKET_MMAP is not set
197CONFIG_UNIX=y
198# CONFIG_NET_KEY is not set
199CONFIG_INET=y
200# CONFIG_IP_MULTICAST is not set
201# CONFIG_IP_ADVANCED_ROUTER is not set
202CONFIG_IP_PNP=y
203CONFIG_IP_PNP_DHCP=y
204# CONFIG_IP_PNP_BOOTP is not set
205# CONFIG_IP_PNP_RARP is not set
206# CONFIG_NET_IPIP is not set
207# CONFIG_NET_IPGRE is not set
208# CONFIG_ARPD is not set
209# CONFIG_SYN_COOKIES is not set
210# CONFIG_INET_AH is not set
211# CONFIG_INET_ESP is not set
212# CONFIG_INET_IPCOMP is not set
213# CONFIG_INET_TUNNEL is not set
214CONFIG_IP_TCPDIAG=y
215# CONFIG_IP_TCPDIAG_IPV6 is not set
216# CONFIG_IPV6 is not set
217# CONFIG_NETFILTER is not set
218
219#
220# SCTP Configuration (EXPERIMENTAL)
221#
222# CONFIG_IP_SCTP is not set
223# CONFIG_ATM is not set
224# CONFIG_BRIDGE is not set
225# CONFIG_VLAN_8021Q is not set
226# CONFIG_DECNET is not set
227# CONFIG_LLC2 is not set
228# CONFIG_IPX is not set
229# CONFIG_ATALK is not set
230# CONFIG_X25 is not set
231# CONFIG_LAPB is not set
232# CONFIG_NET_DIVERT is not set
233# CONFIG_ECONET is not set
234# CONFIG_WAN_ROUTER is not set
235
236#
237# QoS and/or fair queueing
238#
239# CONFIG_NET_SCHED is not set
240# CONFIG_NET_CLS_ROUTE is not set
241
242#
243# Network testing
244# 325#
245# CONFIG_NET_PKTGEN is not set
246# CONFIG_NETPOLL is not set
247# CONFIG_NET_POLL_CONTROLLER is not set
248# CONFIG_HAMRADIO is not set
249# CONFIG_IRDA is not set
250# CONFIG_BT is not set
251CONFIG_NETDEVICES=y 326CONFIG_NETDEVICES=y
252# CONFIG_DUMMY is not set 327# CONFIG_DUMMY is not set
253# CONFIG_BONDING is not set 328# CONFIG_BONDING is not set
@@ -255,6 +330,10 @@ CONFIG_NETDEVICES=y
255# CONFIG_TUN is not set 330# CONFIG_TUN is not set
256 331
257# 332#
333# PHY device support
334#
335
336#
258# Ethernet (10 or 100Mbit) 337# Ethernet (10 or 100Mbit)
259# 338#
260# CONFIG_NET_ETHERNET is not set 339# CONFIG_NET_ETHERNET is not set
@@ -285,6 +364,8 @@ CONFIG_NE2000=y
285# CONFIG_SLIP is not set 364# CONFIG_SLIP is not set
286# CONFIG_SHAPER is not set 365# CONFIG_SHAPER is not set
287# CONFIG_NETCONSOLE is not set 366# CONFIG_NETCONSOLE is not set
367# CONFIG_NETPOLL is not set
368# CONFIG_NET_POLL_CONTROLLER is not set
288 369
289# 370#
290# ISDN subsystem 371# ISDN subsystem
@@ -300,6 +381,7 @@ CONFIG_NE2000=y
300# Input device support 381# Input device support
301# 382#
302CONFIG_INPUT=y 383CONFIG_INPUT=y
384# CONFIG_INPUT_FF_MEMLESS is not set
303 385
304# 386#
305# Userland interfaces 387# Userland interfaces
@@ -328,7 +410,6 @@ CONFIG_SERIO_SERPORT=y
328# CONFIG_SERIO_LIBPS2 is not set 410# CONFIG_SERIO_LIBPS2 is not set
329# CONFIG_SERIO_RAW is not set 411# CONFIG_SERIO_RAW is not set
330# CONFIG_GAMEPORT is not set 412# CONFIG_GAMEPORT is not set
331CONFIG_SOUND_GAMEPORT=y
332 413
333# 414#
334# Character devices 415# Character devices
@@ -348,7 +429,6 @@ CONFIG_SERIAL_CORE=y
348CONFIG_SERIAL_CORE_CONSOLE=y 429CONFIG_SERIAL_CORE_CONSOLE=y
349CONFIG_SERIAL_M32R_SIO=y 430CONFIG_SERIAL_M32R_SIO=y
350CONFIG_SERIAL_M32R_SIO_CONSOLE=y 431CONFIG_SERIAL_M32R_SIO_CONSOLE=y
351# CONFIG_SERIAL_M32R_PLDSIO is not set
352CONFIG_UNIX98_PTYS=y 432CONFIG_UNIX98_PTYS=y
353CONFIG_LEGACY_PTYS=y 433CONFIG_LEGACY_PTYS=y
354CONFIG_LEGACY_PTY_COUNT=256 434CONFIG_LEGACY_PTY_COUNT=256
@@ -362,20 +442,20 @@ CONFIG_LEGACY_PTY_COUNT=256
362# Watchdog Cards 442# Watchdog Cards
363# 443#
364# CONFIG_WATCHDOG is not set 444# CONFIG_WATCHDOG is not set
445CONFIG_HW_RANDOM=y
365# CONFIG_RTC is not set 446# CONFIG_RTC is not set
366# CONFIG_GEN_RTC is not set
367# CONFIG_DTLK is not set 447# CONFIG_DTLK is not set
368# CONFIG_R3964 is not set 448# CONFIG_R3964 is not set
369 449
370# 450#
371# Ftape, the floppy tape device driver 451# Ftape, the floppy tape device driver
372# 452#
373# CONFIG_DRM is not set
374# CONFIG_RAW_DRIVER is not set 453# CONFIG_RAW_DRIVER is not set
375 454
376# 455#
377# TPM devices 456# TPM devices
378# 457#
458# CONFIG_TCG_TPM is not set
379 459
380# 460#
381# I2C support 461# I2C support
@@ -383,13 +463,25 @@ CONFIG_LEGACY_PTY_COUNT=256
383# CONFIG_I2C is not set 463# CONFIG_I2C is not set
384 464
385# 465#
466# SPI support
467#
468# CONFIG_SPI is not set
469# CONFIG_SPI_MASTER is not set
470
471#
386# Dallas's 1-wire bus 472# Dallas's 1-wire bus
387# 473#
388# CONFIG_W1 is not set 474# CONFIG_W1 is not set
389 475
390# 476#
391# Misc devices 477# Hardware Monitoring support
392# 478#
479CONFIG_HWMON=y
480# CONFIG_HWMON_VID is not set
481# CONFIG_SENSORS_ABITUGURU is not set
482# CONFIG_SENSORS_F71805F is not set
483# CONFIG_SENSORS_VT1211 is not set
484# CONFIG_HWMON_DEBUG_CHIP is not set
393 485
394# 486#
395# Multimedia devices 487# Multimedia devices
@@ -404,7 +496,9 @@ CONFIG_LEGACY_PTY_COUNT=256
404# 496#
405# Graphics support 497# Graphics support
406# 498#
499CONFIG_FIRMWARE_EDID=y
407# CONFIG_FB is not set 500# CONFIG_FB is not set
501# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
408 502
409# 503#
410# Sound 504# Sound
@@ -416,6 +510,11 @@ CONFIG_LEGACY_PTY_COUNT=256
416# 510#
417# CONFIG_USB_ARCH_HAS_HCD is not set 511# CONFIG_USB_ARCH_HAS_HCD is not set
418# CONFIG_USB_ARCH_HAS_OHCI is not set 512# CONFIG_USB_ARCH_HAS_OHCI is not set
513# CONFIG_USB_ARCH_HAS_EHCI is not set
514
515#
516# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
517#
419 518
420# 519#
421# USB Gadget Support 520# USB Gadget Support
@@ -428,9 +527,43 @@ CONFIG_LEGACY_PTY_COUNT=256
428# CONFIG_MMC is not set 527# CONFIG_MMC is not set
429 528
430# 529#
530# LED devices
531#
532# CONFIG_NEW_LEDS is not set
533
534#
535# LED drivers
536#
537
538#
539# LED Triggers
540#
541
542#
431# InfiniBand support 543# InfiniBand support
432# 544#
433# CONFIG_INFINIBAND is not set 545
546#
547# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
548#
549
550#
551# Real Time Clock
552#
553# CONFIG_RTC_CLASS is not set
554
555#
556# DMA Engine support
557#
558# CONFIG_DMA_ENGINE is not set
559
560#
561# DMA Clients
562#
563
564#
565# DMA Devices
566#
434 567
435# 568#
436# File systems 569# File systems
@@ -438,20 +571,22 @@ CONFIG_LEGACY_PTY_COUNT=256
438CONFIG_EXT2_FS=y 571CONFIG_EXT2_FS=y
439# CONFIG_EXT2_FS_XATTR is not set 572# CONFIG_EXT2_FS_XATTR is not set
440# CONFIG_EXT3_FS is not set 573# CONFIG_EXT3_FS is not set
441# CONFIG_JBD is not set 574# CONFIG_EXT4DEV_FS is not set
442# CONFIG_REISERFS_FS is not set 575# CONFIG_REISERFS_FS is not set
443# CONFIG_JFS_FS is not set 576# CONFIG_JFS_FS is not set
444 577# CONFIG_FS_POSIX_ACL is not set
445#
446# XFS support
447#
448# CONFIG_XFS_FS is not set 578# CONFIG_XFS_FS is not set
579# CONFIG_GFS2_FS is not set
580# CONFIG_OCFS2_FS is not set
449# CONFIG_MINIX_FS is not set 581# CONFIG_MINIX_FS is not set
450# CONFIG_ROMFS_FS is not set 582# CONFIG_ROMFS_FS is not set
583CONFIG_INOTIFY=y
584CONFIG_INOTIFY_USER=y
451# CONFIG_QUOTA is not set 585# CONFIG_QUOTA is not set
452CONFIG_DNOTIFY=y 586CONFIG_DNOTIFY=y
453# CONFIG_AUTOFS_FS is not set 587# CONFIG_AUTOFS_FS is not set
454# CONFIG_AUTOFS4_FS is not set 588# CONFIG_AUTOFS4_FS is not set
589# CONFIG_FUSE_FS is not set
455 590
456# 591#
457# CD-ROM/DVD Filesystems 592# CD-ROM/DVD Filesystems
@@ -470,13 +605,12 @@ CONFIG_DNOTIFY=y
470# Pseudo filesystems 605# Pseudo filesystems
471# 606#
472CONFIG_PROC_FS=y 607CONFIG_PROC_FS=y
608CONFIG_PROC_SYSCTL=y
473CONFIG_SYSFS=y 609CONFIG_SYSFS=y
474# CONFIG_DEVFS_FS is not set
475CONFIG_DEVPTS_FS_XATTR=y
476CONFIG_DEVPTS_FS_SECURITY=y
477# CONFIG_TMPFS is not set 610# CONFIG_TMPFS is not set
478# CONFIG_HUGETLB_PAGE is not set 611# CONFIG_HUGETLB_PAGE is not set
479CONFIG_RAMFS=y 612CONFIG_RAMFS=y
613# CONFIG_CONFIGFS_FS is not set
480 614
481# 615#
482# Miscellaneous filesystems 616# Miscellaneous filesystems
@@ -500,12 +634,14 @@ CONFIG_RAMFS=y
500# 634#
501CONFIG_NFS_FS=y 635CONFIG_NFS_FS=y
502CONFIG_NFS_V3=y 636CONFIG_NFS_V3=y
637# CONFIG_NFS_V3_ACL is not set
503# CONFIG_NFS_V4 is not set 638# CONFIG_NFS_V4 is not set
504# CONFIG_NFS_DIRECTIO is not set 639# CONFIG_NFS_DIRECTIO is not set
505# CONFIG_NFSD is not set 640# CONFIG_NFSD is not set
506CONFIG_ROOT_NFS=y 641CONFIG_ROOT_NFS=y
507CONFIG_LOCKD=y 642CONFIG_LOCKD=y
508CONFIG_LOCKD_V4=y 643CONFIG_LOCKD_V4=y
644CONFIG_NFS_COMMON=y
509CONFIG_SUNRPC=y 645CONFIG_SUNRPC=y
510# CONFIG_RPCSEC_GSS_KRB5 is not set 646# CONFIG_RPCSEC_GSS_KRB5 is not set
511# CONFIG_RPCSEC_GSS_SPKM3 is not set 647# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -514,6 +650,7 @@ CONFIG_SUNRPC=y
514# CONFIG_NCP_FS is not set 650# CONFIG_NCP_FS is not set
515# CONFIG_CODA_FS is not set 651# CONFIG_CODA_FS is not set
516# CONFIG_AFS_FS is not set 652# CONFIG_AFS_FS is not set
653# CONFIG_9P_FS is not set
517 654
518# 655#
519# Partition Types 656# Partition Types
@@ -574,10 +711,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
574# Kernel hacking 711# Kernel hacking
575# 712#
576# CONFIG_PRINTK_TIME is not set 713# CONFIG_PRINTK_TIME is not set
714CONFIG_ENABLE_MUST_CHECK=y
715# CONFIG_MAGIC_SYSRQ is not set
716# CONFIG_UNUSED_SYMBOLS is not set
577# CONFIG_DEBUG_KERNEL is not set 717# CONFIG_DEBUG_KERNEL is not set
578CONFIG_LOG_BUF_SHIFT=14 718CONFIG_LOG_BUF_SHIFT=14
579# CONFIG_DEBUG_BUGVERBOSE is not set 719# CONFIG_DEBUG_BUGVERBOSE is not set
720# CONFIG_DEBUG_FS is not set
580# CONFIG_FRAME_POINTER is not set 721# CONFIG_FRAME_POINTER is not set
722# CONFIG_UNWIND_INFO is not set
723# CONFIG_HEADERS_CHECK is not set
581 724
582# 725#
583# Security options 726# Security options
@@ -591,12 +734,9 @@ CONFIG_LOG_BUF_SHIFT=14
591# CONFIG_CRYPTO is not set 734# CONFIG_CRYPTO is not set
592 735
593# 736#
594# Hardware crypto devices
595#
596
597#
598# Library routines 737# Library routines
599# 738#
600# CONFIG_CRC_CCITT is not set 739# CONFIG_CRC_CCITT is not set
740# CONFIG_CRC16 is not set
601CONFIG_CRC32=y 741CONFIG_CRC32=y
602# CONFIG_LIBCRC32C is not set 742# CONFIG_LIBCRC32C is not set
diff --git a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/opsput/defconfig.opsput
index 66adec6a701a..461f95e72d17 100644
--- a/arch/m32r/opsput/defconfig.opsput
+++ b/arch/m32r/opsput/defconfig.opsput
@@ -1,19 +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.12-rc5 3# Linux kernel version: 2.6.19
4# Fri Jun 3 16:22:06 2005 4# Wed Dec 13 18:34:36 2006
5# 5#
6CONFIG_M32R=y 6CONFIG_M32R=y
7# CONFIG_UID16 is not set
8CONFIG_GENERIC_ISA_DMA=y 7CONFIG_GENERIC_ISA_DMA=y
9CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
10CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 11
12# 12#
13# Code maturity level options 13# Code maturity level options
14# 14#
15CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 16CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 17CONFIG_INIT_ENV_ARG_LIMIT=32
19 18
@@ -21,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 20# General setup
22# 21#
23CONFIG_LOCALVERSION="" 22CONFIG_LOCALVERSION=""
23CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 24CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 25CONFIG_SYSVIPC=y
26# CONFIG_IPC_NS is not set
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
27CONFIG_BSD_PROCESS_ACCT=y 28CONFIG_BSD_PROCESS_ACCT=y
28# CONFIG_BSD_PROCESS_ACCT_V3 is not set 29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
29CONFIG_SYSCTL=y 30# CONFIG_TASKSTATS is not set
31# CONFIG_UTS_NS is not set
30# CONFIG_AUDIT is not set 32# CONFIG_AUDIT is not set
31CONFIG_HOTPLUG=y
32CONFIG_KOBJECT_UEVENT=y
33CONFIG_IKCONFIG=y 33CONFIG_IKCONFIG=y
34# CONFIG_IKCONFIG_PROC is not set 34# CONFIG_IKCONFIG_PROC is not set
35CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y
35CONFIG_EMBEDDED=y 40CONFIG_EMBEDDED=y
41CONFIG_SYSCTL_SYSCALL=y
36# CONFIG_KALLSYMS is not set 42# CONFIG_KALLSYMS is not set
43CONFIG_HOTPLUG=y
37CONFIG_PRINTK=y 44CONFIG_PRINTK=y
38CONFIG_BUG=y 45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
39CONFIG_BASE_FULL=y 47CONFIG_BASE_FULL=y
40# CONFIG_FUTEX is not set 48# CONFIG_FUTEX is not set
41# CONFIG_EPOLL is not set 49# CONFIG_EPOLL is not set
42# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
43CONFIG_SHMEM=y 50CONFIG_SHMEM=y
44CONFIG_CC_ALIGN_FUNCTIONS=0 51CONFIG_SLAB=y
45CONFIG_CC_ALIGN_LABELS=0 52CONFIG_VM_EVENT_COUNTERS=y
46CONFIG_CC_ALIGN_LOOPS=0
47CONFIG_CC_ALIGN_JUMPS=0
48# CONFIG_TINY_SHMEM is not set 53# CONFIG_TINY_SHMEM is not set
49CONFIG_BASE_SMALL=0 54CONFIG_BASE_SMALL=0
55# CONFIG_SLOB is not set
50 56
51# 57#
52# Loadable module support 58# Loadable module support
@@ -54,12 +60,30 @@ CONFIG_BASE_SMALL=0
54CONFIG_MODULES=y 60CONFIG_MODULES=y
55CONFIG_MODULE_UNLOAD=y 61CONFIG_MODULE_UNLOAD=y
56# CONFIG_MODULE_FORCE_UNLOAD is not set 62# CONFIG_MODULE_FORCE_UNLOAD is not set
57CONFIG_OBSOLETE_MODPARM=y
58# CONFIG_MODVERSIONS is not set 63# CONFIG_MODVERSIONS is not set
59# CONFIG_MODULE_SRCVERSION_ALL is not set 64# CONFIG_MODULE_SRCVERSION_ALL is not set
60CONFIG_KMOD=y 65CONFIG_KMOD=y
61 66
62# 67#
68# Block layer
69#
70CONFIG_BLOCK=y
71# CONFIG_BLK_DEV_IO_TRACE is not set
72
73#
74# IO Schedulers
75#
76CONFIG_IOSCHED_NOOP=y
77# CONFIG_IOSCHED_AS is not set
78CONFIG_IOSCHED_DEADLINE=y
79CONFIG_IOSCHED_CFQ=y
80# CONFIG_DEFAULT_AS is not set
81# CONFIG_DEFAULT_DEADLINE is not set
82CONFIG_DEFAULT_CFQ=y
83# CONFIG_DEFAULT_NOOP is not set
84CONFIG_DEFAULT_IOSCHED="cfq"
85
86#
63# Processor type and features 87# Processor type and features
64# 88#
65# CONFIG_PLAT_MAPPI is not set 89# CONFIG_PLAT_MAPPI is not set
@@ -69,8 +93,10 @@ CONFIG_PLAT_OPSPUT=y
69# CONFIG_PLAT_OAKS32R is not set 93# CONFIG_PLAT_OAKS32R is not set
70# CONFIG_PLAT_MAPPI2 is not set 94# CONFIG_PLAT_MAPPI2 is not set
71# CONFIG_PLAT_MAPPI3 is not set 95# CONFIG_PLAT_MAPPI3 is not set
96# CONFIG_PLAT_M32104UT is not set
72# CONFIG_CHIP_M32700 is not set 97# CONFIG_CHIP_M32700 is not set
73# CONFIG_CHIP_M32102 is not set 98# CONFIG_CHIP_M32102 is not set
99# CONFIG_CHIP_M32104 is not set
74# CONFIG_CHIP_VDEC2 is not set 100# CONFIG_CHIP_VDEC2 is not set
75CONFIG_CHIP_OPSP=y 101CONFIG_CHIP_OPSP=y
76CONFIG_MMU=y 102CONFIG_MMU=y
@@ -84,17 +110,31 @@ CONFIG_TIMER_DIVIDE=128
84CONFIG_MEMORY_START=0x08000000 110CONFIG_MEMORY_START=0x08000000
85CONFIG_MEMORY_SIZE=0x01000000 111CONFIG_MEMORY_SIZE=0x01000000
86CONFIG_NOHIGHMEM=y 112CONFIG_NOHIGHMEM=y
87# CONFIG_DISCONTIGMEM is not set 113CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
114CONFIG_SELECT_MEMORY_MODEL=y
115# CONFIG_FLATMEM_MANUAL is not set
116CONFIG_DISCONTIGMEM_MANUAL=y
117# CONFIG_SPARSEMEM_MANUAL is not set
118CONFIG_DISCONTIGMEM=y
119CONFIG_FLAT_NODE_MEM_MAP=y
120CONFIG_NEED_MULTIPLE_NODES=y
121# CONFIG_SPARSEMEM_STATIC is not set
122CONFIG_SPLIT_PTLOCK_CPUS=4
123# CONFIG_RESOURCES_64BIT is not set
124CONFIG_IRAM_START=0x00f00000
125CONFIG_IRAM_SIZE=0x00010000
88CONFIG_RWSEM_GENERIC_SPINLOCK=y 126CONFIG_RWSEM_GENERIC_SPINLOCK=y
89# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 127# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
128CONFIG_GENERIC_FIND_NEXT_BIT=y
129CONFIG_GENERIC_HWEIGHT=y
90CONFIG_GENERIC_CALIBRATE_DELAY=y 130CONFIG_GENERIC_CALIBRATE_DELAY=y
91# CONFIG_PREEMPT is not set 131# CONFIG_PREEMPT is not set
92# CONFIG_SMP is not set 132# CONFIG_SMP is not set
133CONFIG_NODES_SHIFT=1
93 134
94# 135#
95# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 136# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
96# 137#
97# CONFIG_PCI is not set
98# CONFIG_ISA is not set 138# CONFIG_ISA is not set
99 139
100# 140#
@@ -103,13 +143,15 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
103CONFIG_PCCARD=y 143CONFIG_PCCARD=y
104# CONFIG_PCMCIA_DEBUG is not set 144# CONFIG_PCMCIA_DEBUG is not set
105CONFIG_PCMCIA=y 145CONFIG_PCMCIA=y
146CONFIG_PCMCIA_LOAD_CIS=y
147CONFIG_PCMCIA_IOCTL=y
106 148
107# 149#
108# PC-card bridges 150# PC-card bridges
109# 151#
110# CONFIG_TCIC is not set
111CONFIG_M32R_CFC=y 152CONFIG_M32R_CFC=y
112CONFIG_M32R_CFC_NUM=1 153CONFIG_M32R_CFC_NUM=1
154CONFIG_PCCARD_NONSTATIC=y
113 155
114# 156#
115# PCI Hotplug Support 157# PCI Hotplug Support
@@ -122,6 +164,94 @@ CONFIG_BINFMT_ELF=y
122# CONFIG_BINFMT_MISC is not set 164# CONFIG_BINFMT_MISC is not set
123 165
124# 166#
167# Networking
168#
169CONFIG_NET=y
170
171#
172# Networking options
173#
174# CONFIG_NETDEBUG is not set
175CONFIG_PACKET=y
176# CONFIG_PACKET_MMAP is not set
177CONFIG_UNIX=y
178CONFIG_XFRM=y
179# CONFIG_XFRM_USER is not set
180# CONFIG_XFRM_SUB_POLICY is not set
181# CONFIG_NET_KEY is not set
182CONFIG_INET=y
183# CONFIG_IP_MULTICAST is not set
184# CONFIG_IP_ADVANCED_ROUTER is not set
185CONFIG_IP_FIB_HASH=y
186CONFIG_IP_PNP=y
187CONFIG_IP_PNP_DHCP=y
188# CONFIG_IP_PNP_BOOTP is not set
189# CONFIG_IP_PNP_RARP is not set
190# CONFIG_NET_IPIP is not set
191# CONFIG_NET_IPGRE is not set
192# CONFIG_ARPD is not set
193# CONFIG_SYN_COOKIES is not set
194# CONFIG_INET_AH is not set
195# CONFIG_INET_ESP is not set
196# CONFIG_INET_IPCOMP is not set
197# CONFIG_INET_XFRM_TUNNEL is not set
198# CONFIG_INET_TUNNEL is not set
199CONFIG_INET_XFRM_MODE_TRANSPORT=y
200CONFIG_INET_XFRM_MODE_TUNNEL=y
201CONFIG_INET_XFRM_MODE_BEET=y
202CONFIG_INET_DIAG=y
203CONFIG_INET_TCP_DIAG=y
204# CONFIG_TCP_CONG_ADVANCED is not set
205CONFIG_TCP_CONG_CUBIC=y
206CONFIG_DEFAULT_TCP_CONG="cubic"
207# CONFIG_TCP_MD5SIG is not set
208# CONFIG_IPV6 is not set
209# CONFIG_INET6_XFRM_TUNNEL is not set
210# CONFIG_INET6_TUNNEL is not set
211# CONFIG_NETWORK_SECMARK is not set
212# CONFIG_NETFILTER is not set
213
214#
215# DCCP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_DCCP is not set
218
219#
220# SCTP Configuration (EXPERIMENTAL)
221#
222# CONFIG_IP_SCTP is not set
223
224#
225# TIPC Configuration (EXPERIMENTAL)
226#
227# CONFIG_TIPC is not set
228# CONFIG_ATM is not set
229# CONFIG_BRIDGE is not set
230# CONFIG_VLAN_8021Q is not set
231# CONFIG_DECNET is not set
232# CONFIG_LLC2 is not set
233# CONFIG_IPX is not set
234# CONFIG_ATALK is not set
235# CONFIG_X25 is not set
236# CONFIG_LAPB is not set
237# CONFIG_ECONET is not set
238# CONFIG_WAN_ROUTER is not set
239
240#
241# QoS and/or fair queueing
242#
243# CONFIG_NET_SCHED is not set
244
245#
246# Network testing
247#
248# CONFIG_NET_PKTGEN is not set
249# CONFIG_HAMRADIO is not set
250# CONFIG_IRDA is not set
251# CONFIG_BT is not set
252# CONFIG_IEEE80211 is not set
253
254#
125# Device Drivers 255# Device Drivers
126# 256#
127 257
@@ -130,8 +260,14 @@ CONFIG_BINFMT_ELF=y
130# 260#
131CONFIG_STANDALONE=y 261CONFIG_STANDALONE=y
132CONFIG_PREVENT_FIRMWARE_BUILD=y 262CONFIG_PREVENT_FIRMWARE_BUILD=y
133# CONFIG_FW_LOADER is not set 263CONFIG_FW_LOADER=y
134# CONFIG_DEBUG_DRIVER is not set 264# CONFIG_DEBUG_DRIVER is not set
265# CONFIG_SYS_HYPERVISOR is not set
266
267#
268# Connector - unified userspace <-> kernelspace linker
269#
270# CONFIG_CONNECTOR is not set
135 271
136# 272#
137# Memory Technology Devices (MTD) 273# Memory Technology Devices (MTD)
@@ -150,7 +286,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
150# 286#
151# Block devices 287# Block devices
152# 288#
153# CONFIG_BLK_DEV_FD is not set
154# CONFIG_BLK_DEV_COW_COMMON is not set 289# CONFIG_BLK_DEV_COW_COMMON is not set
155CONFIG_BLK_DEV_LOOP=y 290CONFIG_BLK_DEV_LOOP=y
156# CONFIG_BLK_DEV_CRYPTOLOOP is not set 291# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -158,18 +293,15 @@ CONFIG_BLK_DEV_LOOP=y
158CONFIG_BLK_DEV_RAM=y 293CONFIG_BLK_DEV_RAM=y
159CONFIG_BLK_DEV_RAM_COUNT=16 294CONFIG_BLK_DEV_RAM_COUNT=16
160CONFIG_BLK_DEV_RAM_SIZE=4096 295CONFIG_BLK_DEV_RAM_SIZE=4096
296CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
161# CONFIG_BLK_DEV_INITRD is not set 297# CONFIG_BLK_DEV_INITRD is not set
162CONFIG_INITRAMFS_SOURCE=""
163# CONFIG_CDROM_PKTCDVD is not set 298# CONFIG_CDROM_PKTCDVD is not set
299# CONFIG_ATA_OVER_ETH is not set
164 300
165# 301#
166# IO Schedulers 302# Misc devices
167# 303#
168CONFIG_IOSCHED_NOOP=y 304# CONFIG_TIFM_CORE is not set
169# CONFIG_IOSCHED_AS is not set
170CONFIG_IOSCHED_DEADLINE=y
171CONFIG_IOSCHED_CFQ=y
172# CONFIG_ATA_OVER_ETH is not set
173 305
174# 306#
175# ATA/ATAPI/MFM/RLL support 307# ATA/ATAPI/MFM/RLL support
@@ -179,7 +311,9 @@ CONFIG_IOSCHED_CFQ=y
179# 311#
180# SCSI device support 312# SCSI device support
181# 313#
314# CONFIG_RAID_ATTRS is not set
182CONFIG_SCSI=m 315CONFIG_SCSI=m
316# CONFIG_SCSI_NETLINK is not set
183CONFIG_SCSI_PROC_FS=y 317CONFIG_SCSI_PROC_FS=y
184 318
185# 319#
@@ -191,6 +325,7 @@ CONFIG_BLK_DEV_SD=m
191CONFIG_BLK_DEV_SR=m 325CONFIG_BLK_DEV_SR=m
192# CONFIG_BLK_DEV_SR_VENDOR is not set 326# CONFIG_BLK_DEV_SR_VENDOR is not set
193CONFIG_CHR_DEV_SG=m 327CONFIG_CHR_DEV_SG=m
328# CONFIG_CHR_DEV_SCH is not set
194 329
195# 330#
196# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 331# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -200,16 +335,18 @@ CONFIG_SCSI_MULTI_LUN=y
200# CONFIG_SCSI_LOGGING is not set 335# CONFIG_SCSI_LOGGING is not set
201 336
202# 337#
203# SCSI Transport Attributes 338# SCSI Transports
204# 339#
205# CONFIG_SCSI_SPI_ATTRS is not set 340# CONFIG_SCSI_SPI_ATTRS is not set
206# CONFIG_SCSI_FC_ATTRS is not set 341# CONFIG_SCSI_FC_ATTRS is not set
207# CONFIG_SCSI_ISCSI_ATTRS is not set 342# CONFIG_SCSI_ISCSI_ATTRS is not set
343# CONFIG_SCSI_SAS_ATTRS is not set
344# CONFIG_SCSI_SAS_LIBSAS is not set
208 345
209# 346#
210# SCSI low-level drivers 347# SCSI low-level drivers
211# 348#
212# CONFIG_SCSI_SATA is not set 349# CONFIG_ISCSI_TCP is not set
213# CONFIG_SCSI_DEBUG is not set 350# CONFIG_SCSI_DEBUG is not set
214 351
215# 352#
@@ -222,6 +359,10 @@ CONFIG_SCSI_MULTI_LUN=y
222# CONFIG_PCMCIA_SYM53C500 is not set 359# CONFIG_PCMCIA_SYM53C500 is not set
223 360
224# 361#
362# Serial ATA (prod) and Parallel ATA (experimental) drivers
363#
364
365#
225# Multi-device support (RAID and LVM) 366# Multi-device support (RAID and LVM)
226# 367#
227# CONFIG_MD is not set 368# CONFIG_MD is not set
@@ -229,6 +370,7 @@ CONFIG_SCSI_MULTI_LUN=y
229# 370#
230# Fusion MPT device support 371# Fusion MPT device support
231# 372#
373# CONFIG_FUSION is not set
232 374
233# 375#
234# IEEE 1394 (FireWire) support 376# IEEE 1394 (FireWire) support
@@ -239,69 +381,8 @@ CONFIG_SCSI_MULTI_LUN=y
239# 381#
240 382
241# 383#
242# Networking support 384# Network device support
243#
244CONFIG_NET=y
245
246#
247# Networking options
248#
249CONFIG_PACKET=y
250# CONFIG_PACKET_MMAP is not set
251CONFIG_UNIX=y
252# CONFIG_NET_KEY is not set
253CONFIG_INET=y
254# CONFIG_IP_MULTICAST is not set
255# CONFIG_IP_ADVANCED_ROUTER is not set
256CONFIG_IP_PNP=y
257CONFIG_IP_PNP_DHCP=y
258# CONFIG_IP_PNP_BOOTP is not set
259# CONFIG_IP_PNP_RARP is not set
260# CONFIG_NET_IPIP is not set
261# CONFIG_NET_IPGRE is not set
262# CONFIG_ARPD is not set
263# CONFIG_SYN_COOKIES is not set
264# CONFIG_INET_AH is not set
265# CONFIG_INET_ESP is not set
266# CONFIG_INET_IPCOMP is not set
267# CONFIG_INET_TUNNEL is not set
268CONFIG_IP_TCPDIAG=y
269# CONFIG_IP_TCPDIAG_IPV6 is not set
270# CONFIG_IPV6 is not set
271# CONFIG_NETFILTER is not set
272
273#
274# SCTP Configuration (EXPERIMENTAL)
275# 385#
276# CONFIG_IP_SCTP is not set
277# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set
279# CONFIG_VLAN_8021Q is not set
280# CONFIG_DECNET is not set
281# CONFIG_LLC2 is not set
282# CONFIG_IPX is not set
283# CONFIG_ATALK is not set
284# CONFIG_X25 is not set
285# CONFIG_LAPB is not set
286# CONFIG_NET_DIVERT is not set
287# CONFIG_ECONET is not set
288# CONFIG_WAN_ROUTER is not set
289
290#
291# QoS and/or fair queueing
292#
293# CONFIG_NET_SCHED is not set
294# CONFIG_NET_CLS_ROUTE is not set
295
296#
297# Network testing
298#
299# CONFIG_NET_PKTGEN is not set
300# CONFIG_NETPOLL is not set
301# CONFIG_NET_POLL_CONTROLLER is not set
302# CONFIG_HAMRADIO is not set
303# CONFIG_IRDA is not set
304# CONFIG_BT is not set
305CONFIG_NETDEVICES=y 386CONFIG_NETDEVICES=y
306# CONFIG_DUMMY is not set 387# CONFIG_DUMMY is not set
307# CONFIG_BONDING is not set 388# CONFIG_BONDING is not set
@@ -309,6 +390,11 @@ CONFIG_NETDEVICES=y
309# CONFIG_TUN is not set 390# CONFIG_TUN is not set
310 391
311# 392#
393# PHY device support
394#
395# CONFIG_PHYLIB is not set
396
397#
312# Ethernet (10 or 100Mbit) 398# Ethernet (10 or 100Mbit)
313# 399#
314CONFIG_NET_ETHERNET=y 400CONFIG_NET_ETHERNET=y
@@ -346,6 +432,8 @@ CONFIG_SMC91X=y
346# CONFIG_SLIP is not set 432# CONFIG_SLIP is not set
347# CONFIG_SHAPER is not set 433# CONFIG_SHAPER is not set
348# CONFIG_NETCONSOLE is not set 434# CONFIG_NETCONSOLE is not set
435# CONFIG_NETPOLL is not set
436# CONFIG_NET_POLL_CONTROLLER is not set
349 437
350# 438#
351# ISDN subsystem 439# ISDN subsystem
@@ -361,6 +449,7 @@ CONFIG_SMC91X=y
361# Input device support 449# Input device support
362# 450#
363CONFIG_INPUT=y 451CONFIG_INPUT=y
452# CONFIG_INPUT_FF_MEMLESS is not set
364 453
365# 454#
366# Userland interfaces 455# Userland interfaces
@@ -389,7 +478,6 @@ CONFIG_SERIO_SERPORT=y
389# CONFIG_SERIO_LIBPS2 is not set 478# CONFIG_SERIO_LIBPS2 is not set
390# CONFIG_SERIO_RAW is not set 479# CONFIG_SERIO_RAW is not set
391# CONFIG_GAMEPORT is not set 480# CONFIG_GAMEPORT is not set
392CONFIG_SOUND_GAMEPORT=y
393 481
394# 482#
395# Character devices 483# Character devices
@@ -423,8 +511,8 @@ CONFIG_LEGACY_PTY_COUNT=256
423# Watchdog Cards 511# Watchdog Cards
424# 512#
425# CONFIG_WATCHDOG is not set 513# CONFIG_WATCHDOG is not set
514CONFIG_HW_RANDOM=y
426# CONFIG_RTC is not set 515# CONFIG_RTC is not set
427# CONFIG_GEN_RTC is not set
428CONFIG_DS1302=y 516CONFIG_DS1302=y
429# CONFIG_DTLK is not set 517# CONFIG_DTLK is not set
430# CONFIG_R3964 is not set 518# CONFIG_R3964 is not set
@@ -432,17 +520,19 @@ CONFIG_DS1302=y
432# 520#
433# Ftape, the floppy tape device driver 521# Ftape, the floppy tape device driver
434# 522#
435# CONFIG_DRM is not set
436 523
437# 524#
438# PCMCIA character devices 525# PCMCIA character devices
439# 526#
440# CONFIG_SYNCLINK_CS is not set 527# CONFIG_SYNCLINK_CS is not set
528# CONFIG_CARDMAN_4000 is not set
529# CONFIG_CARDMAN_4040 is not set
441# CONFIG_RAW_DRIVER is not set 530# CONFIG_RAW_DRIVER is not set
442 531
443# 532#
444# TPM devices 533# TPM devices
445# 534#
535# CONFIG_TCG_TPM is not set
446 536
447# 537#
448# I2C support 538# I2C support
@@ -450,13 +540,25 @@ CONFIG_DS1302=y
450# CONFIG_I2C is not set 540# CONFIG_I2C is not set
451 541
452# 542#
543# SPI support
544#
545# CONFIG_SPI is not set
546# CONFIG_SPI_MASTER is not set
547
548#
453# Dallas's 1-wire bus 549# Dallas's 1-wire bus
454# 550#
455# CONFIG_W1 is not set 551# CONFIG_W1 is not set
456 552
457# 553#
458# Misc devices 554# Hardware Monitoring support
459# 555#
556CONFIG_HWMON=y
557# CONFIG_HWMON_VID is not set
558# CONFIG_SENSORS_ABITUGURU is not set
559# CONFIG_SENSORS_F71805F is not set
560# CONFIG_SENSORS_VT1211 is not set
561# CONFIG_HWMON_DEBUG_CHIP is not set
460 562
461# 563#
462# Multimedia devices 564# Multimedia devices
@@ -471,7 +573,9 @@ CONFIG_DS1302=y
471# 573#
472# Graphics support 574# Graphics support
473# 575#
576CONFIG_FIRMWARE_EDID=y
474# CONFIG_FB is not set 577# CONFIG_FB is not set
578# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
475 579
476# 580#
477# Sound 581# Sound
@@ -483,6 +587,11 @@ CONFIG_DS1302=y
483# 587#
484# CONFIG_USB_ARCH_HAS_HCD is not set 588# CONFIG_USB_ARCH_HAS_HCD is not set
485# CONFIG_USB_ARCH_HAS_OHCI is not set 589# CONFIG_USB_ARCH_HAS_OHCI is not set
590# CONFIG_USB_ARCH_HAS_EHCI is not set
591
592#
593# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
594#
486 595
487# 596#
488# USB Gadget Support 597# USB Gadget Support
@@ -495,38 +604,73 @@ CONFIG_DS1302=y
495# CONFIG_MMC is not set 604# CONFIG_MMC is not set
496 605
497# 606#
607# LED devices
608#
609# CONFIG_NEW_LEDS is not set
610
611#
612# LED drivers
613#
614
615#
616# LED Triggers
617#
618
619#
498# InfiniBand support 620# InfiniBand support
499# 621#
500# CONFIG_INFINIBAND is not set 622
623#
624# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
625#
626
627#
628# Real Time Clock
629#
630# CONFIG_RTC_CLASS is not set
631
632#
633# DMA Engine support
634#
635# CONFIG_DMA_ENGINE is not set
636
637#
638# DMA Clients
639#
640
641#
642# DMA Devices
643#
501 644
502# 645#
503# File systems 646# File systems
504# 647#
505CONFIG_EXT2_FS=y 648CONFIG_EXT2_FS=y
506# CONFIG_EXT2_FS_XATTR is not set 649# CONFIG_EXT2_FS_XATTR is not set
507CONFIG_EXT3_FS=m 650# CONFIG_EXT2_FS_XIP is not set
651CONFIG_EXT3_FS=y
508CONFIG_EXT3_FS_XATTR=y 652CONFIG_EXT3_FS_XATTR=y
509# CONFIG_EXT3_FS_POSIX_ACL is not set 653# CONFIG_EXT3_FS_POSIX_ACL is not set
510# CONFIG_EXT3_FS_SECURITY is not set 654# CONFIG_EXT3_FS_SECURITY is not set
511CONFIG_JBD=m 655# CONFIG_EXT4DEV_FS is not set
656CONFIG_JBD=y
512CONFIG_JBD_DEBUG=y 657CONFIG_JBD_DEBUG=y
513CONFIG_FS_MBCACHE=y 658CONFIG_FS_MBCACHE=y
514CONFIG_REISERFS_FS=m 659# CONFIG_REISERFS_FS is not set
515# CONFIG_REISERFS_CHECK is not set
516# CONFIG_REISERFS_PROC_INFO is not set
517# CONFIG_REISERFS_FS_XATTR is not set
518# CONFIG_JFS_FS is not set 660# CONFIG_JFS_FS is not set
519 661# CONFIG_FS_POSIX_ACL is not set
520#
521# XFS support
522#
523# CONFIG_XFS_FS is not set 662# CONFIG_XFS_FS is not set
663# CONFIG_GFS2_FS is not set
664# CONFIG_OCFS2_FS is not set
524# CONFIG_MINIX_FS is not set 665# CONFIG_MINIX_FS is not set
525# CONFIG_ROMFS_FS is not set 666# CONFIG_ROMFS_FS is not set
667CONFIG_INOTIFY=y
668CONFIG_INOTIFY_USER=y
526# CONFIG_QUOTA is not set 669# CONFIG_QUOTA is not set
527CONFIG_DNOTIFY=y 670CONFIG_DNOTIFY=y
528# CONFIG_AUTOFS_FS is not set 671# CONFIG_AUTOFS_FS is not set
529# CONFIG_AUTOFS4_FS is not set 672# CONFIG_AUTOFS4_FS is not set
673# CONFIG_FUSE_FS is not set
530 674
531# 675#
532# CD-ROM/DVD Filesystems 676# CD-ROM/DVD Filesystems
@@ -552,15 +696,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
552# 696#
553CONFIG_PROC_FS=y 697CONFIG_PROC_FS=y
554CONFIG_PROC_KCORE=y 698CONFIG_PROC_KCORE=y
699CONFIG_PROC_SYSCTL=y
555CONFIG_SYSFS=y 700CONFIG_SYSFS=y
556CONFIG_DEVFS_FS=y
557CONFIG_DEVFS_MOUNT=y
558# CONFIG_DEVFS_DEBUG is not set
559# CONFIG_DEVPTS_FS_XATTR is not set
560CONFIG_TMPFS=y 701CONFIG_TMPFS=y
561# CONFIG_TMPFS_XATTR is not set 702# CONFIG_TMPFS_POSIX_ACL is not set
562# CONFIG_HUGETLB_PAGE is not set 703# CONFIG_HUGETLB_PAGE is not set
563CONFIG_RAMFS=y 704CONFIG_RAMFS=y
705# CONFIG_CONFIGFS_FS is not set
564 706
565# 707#
566# Miscellaneous filesystems 708# Miscellaneous filesystems
@@ -584,12 +726,14 @@ CONFIG_RAMFS=y
584# 726#
585CONFIG_NFS_FS=y 727CONFIG_NFS_FS=y
586CONFIG_NFS_V3=y 728CONFIG_NFS_V3=y
729# CONFIG_NFS_V3_ACL is not set
587# CONFIG_NFS_V4 is not set 730# CONFIG_NFS_V4 is not set
588# CONFIG_NFS_DIRECTIO is not set 731# CONFIG_NFS_DIRECTIO is not set
589# CONFIG_NFSD is not set 732# CONFIG_NFSD is not set
590CONFIG_ROOT_NFS=y 733CONFIG_ROOT_NFS=y
591CONFIG_LOCKD=y 734CONFIG_LOCKD=y
592CONFIG_LOCKD_V4=y 735CONFIG_LOCKD_V4=y
736CONFIG_NFS_COMMON=y
593CONFIG_SUNRPC=y 737CONFIG_SUNRPC=y
594# CONFIG_RPCSEC_GSS_KRB5 is not set 738# CONFIG_RPCSEC_GSS_KRB5 is not set
595# CONFIG_RPCSEC_GSS_SPKM3 is not set 739# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -598,6 +742,7 @@ CONFIG_SUNRPC=y
598# CONFIG_NCP_FS is not set 742# CONFIG_NCP_FS is not set
599# CONFIG_CODA_FS is not set 743# CONFIG_CODA_FS is not set
600# CONFIG_AFS_FS is not set 744# CONFIG_AFS_FS is not set
745# CONFIG_9P_FS is not set
601 746
602# 747#
603# Partition Types 748# Partition Types
@@ -658,21 +803,32 @@ CONFIG_NLS_DEFAULT="iso8859-1"
658# Kernel hacking 803# Kernel hacking
659# 804#
660# CONFIG_PRINTK_TIME is not set 805# CONFIG_PRINTK_TIME is not set
661CONFIG_DEBUG_KERNEL=y 806CONFIG_ENABLE_MUST_CHECK=y
662# CONFIG_MAGIC_SYSRQ is not set 807# CONFIG_MAGIC_SYSRQ is not set
808# CONFIG_UNUSED_SYMBOLS is not set
809CONFIG_DEBUG_KERNEL=y
663CONFIG_LOG_BUF_SHIFT=14 810CONFIG_LOG_BUF_SHIFT=14
811CONFIG_DETECT_SOFTLOCKUP=y
664# CONFIG_SCHEDSTATS is not set 812# CONFIG_SCHEDSTATS is not set
665# CONFIG_DEBUG_SLAB is not set 813# CONFIG_DEBUG_SLAB is not set
666# CONFIG_DEBUG_SPINLOCK is not set 814# CONFIG_DEBUG_SPINLOCK is not set
815# CONFIG_DEBUG_MUTEXES is not set
816# CONFIG_DEBUG_RWSEMS is not set
667# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 817# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
818# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
668# CONFIG_DEBUG_KOBJECT is not set 819# CONFIG_DEBUG_KOBJECT is not set
669# CONFIG_DEBUG_BUGVERBOSE is not set 820# CONFIG_DEBUG_BUGVERBOSE is not set
670CONFIG_DEBUG_INFO=y 821CONFIG_DEBUG_INFO=y
671# CONFIG_DEBUG_FS is not set 822# CONFIG_DEBUG_FS is not set
823# CONFIG_DEBUG_VM is not set
824# CONFIG_DEBUG_LIST is not set
672# CONFIG_FRAME_POINTER is not set 825# CONFIG_FRAME_POINTER is not set
826# CONFIG_UNWIND_INFO is not set
827CONFIG_FORCED_INLINING=y
828# CONFIG_HEADERS_CHECK is not set
829# CONFIG_RCU_TORTURE_TEST is not set
673# CONFIG_DEBUG_STACKOVERFLOW is not set 830# CONFIG_DEBUG_STACKOVERFLOW is not set
674# CONFIG_DEBUG_STACK_USAGE is not set 831# CONFIG_DEBUG_STACK_USAGE is not set
675# CONFIG_DEBUG_PAGEALLOC is not set
676 832
677# 833#
678# Security options 834# Security options
@@ -686,12 +842,9 @@ CONFIG_DEBUG_INFO=y
686# CONFIG_CRYPTO is not set 842# CONFIG_CRYPTO is not set
687 843
688# 844#
689# Hardware crypto devices
690#
691
692#
693# Library routines 845# Library routines
694# 846#
695# CONFIG_CRC_CCITT is not set 847# CONFIG_CRC_CCITT is not set
848# CONFIG_CRC16 is not set
696CONFIG_CRC32=y 849CONFIG_CRC32=y
697# CONFIG_LIBCRC32C is not set 850# CONFIG_LIBCRC32C is not set
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 70a577c89c7c..a8e1e604dfa8 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -42,6 +42,9 @@ config ARCH_MAY_HAVE_PC_FDC
42 depends on Q40 || (BROKEN && SUN3X) 42 depends on Q40 || (BROKEN && SUN3X)
43 default y 43 default y
44 44
45config NO_IOPORT
46 def_bool y
47
45mainmenu "Linux/68k Kernel Configuration" 48mainmenu "Linux/68k Kernel Configuration"
46 49
47source "init/Kconfig" 50source "init/Kconfig"
@@ -439,6 +442,10 @@ config GENERIC_ISA_DMA
439 depends on Q40 || AMIGA_PCMCIA || GG2 442 depends on Q40 || AMIGA_PCMCIA || GG2
440 default y 443 default y
441 444
445config ZONE_DMA
446 bool
447 default y
448
442source "drivers/pci/Kconfig" 449source "drivers/pci/Kconfig"
443 450
444source "drivers/zorro/Kconfig" 451source "drivers/zorro/Kconfig"
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c
index d01deb46ebbc..ab3fd5202b24 100644
--- a/arch/m68k/atari/stdma.c
+++ b/arch/m68k/atari/stdma.c
@@ -174,7 +174,7 @@ int stdma_islocked(void)
174void __init stdma_init(void) 174void __init stdma_init(void)
175{ 175{
176 stdma_isr = NULL; 176 stdma_isr = NULL;
177 request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | SA_SHIRQ, 177 request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | IRQF_SHARED,
178 "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); 178 "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int);
179} 179}
180 180
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c
index 15c16b62dff5..a812d03879f8 100644
--- a/arch/m68k/bvme6000/rtc.c
+++ b/arch/m68k/bvme6000/rtc.c
@@ -159,7 +159,7 @@ static int rtc_release(struct inode *inode, struct file *file)
159 * The various file operations we support. 159 * The various file operations we support.
160 */ 160 */
161 161
162static struct file_operations rtc_fops = { 162static const struct file_operations rtc_fops = {
163 .ioctl = rtc_ioctl, 163 .ioctl = rtc_ioctl,
164 .open = rtc_open, 164 .open = rtc_open,
165 .release = rtc_release, 165 .release = rtc_release,
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index 1c9ecaa473d5..0b68ab8d63d1 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -10,7 +10,9 @@ endif
10extra-y += vmlinux.lds 10extra-y += vmlinux.lds
11 11
12obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \ 12obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
13 sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o 13 sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o devres.o
14
15devres-y = ../../../kernel/irq/devres.o
14 16
15obj-$(CONFIG_PCI) += bios32.o 17obj-$(CONFIG_PCI) += bios32.o
16obj-$(CONFIG_MODULES) += module.o 18obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 84aceca6c05c..b66c97c904b3 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -28,6 +28,7 @@
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/types.h> 29#include <linux/types.h>
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/interrupt.h>
31#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
32#include <linux/errno.h> 33#include <linux/errno.h>
33#include <linux/init.h> 34#include <linux/init.h>
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index ef89060ea328..7fd2720c3841 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -76,7 +76,7 @@ static inline long get_reg(struct task_struct *task, int regno)
76 76
77 if (regno == PT_USP) 77 if (regno == PT_USP)
78 addr = &task->thread.usp; 78 addr = &task->thread.usp;
79 else if (regno < sizeof(regoff)/sizeof(regoff[0])) 79 else if (regno < ARRAY_SIZE(regoff))
80 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); 80 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
81 else 81 else
82 return 0; 82 return 0;
@@ -93,7 +93,7 @@ static inline int put_reg(struct task_struct *task, int regno,
93 93
94 if (regno == PT_USP) 94 if (regno == PT_USP)
95 addr = &task->thread.usp; 95 addr = &task->thread.usp;
96 else if (regno < sizeof(regoff)/sizeof(regoff[0])) 96 else if (regno < ARRAY_SIZE(regoff))
97 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); 97 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
98 else 98 else
99 return -1; 99 return -1;
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 9af3ee0e555d..42b8fd09ea8f 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -256,7 +256,7 @@ void __init setup_arch(char **cmdline_p)
256 init_mm.brk = (unsigned long) &_end; 256 init_mm.brk = (unsigned long) &_end;
257 257
258 *cmdline_p = m68k_command_line; 258 *cmdline_p = m68k_command_line;
259 memcpy(saved_command_line, *cmdline_p, CL_SIZE); 259 memcpy(boot_command_line, *cmdline_p, CL_SIZE);
260 260
261 /* Parse the command line for arch-specific options. 261 /* Parse the command line for arch-specific options.
262 * For the m68k, this is currently only "debug=xxx" to enable printing 262 * For the m68k, this is currently only "debug=xxx" to enable printing
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 2a599c3ed787..4c065f9ceffc 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -159,12 +159,3 @@ int do_settimeofday(struct timespec *tv)
159} 159}
160 160
161EXPORT_SYMBOL(do_settimeofday); 161EXPORT_SYMBOL(do_settimeofday);
162
163/*
164 * Scheduler clock - returns current time in ns units.
165 */
166unsigned long long sched_clock(void)
167{
168 return (unsigned long long)jiffies*(1000000000/HZ);
169}
170
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index 759fa244e6cd..a27a4fa33296 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(dump_stack);
1011void bad_super_trap (struct frame *fp) 1011void bad_super_trap (struct frame *fp)
1012{ 1012{
1013 console_verbose(); 1013 console_verbose();
1014 if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) 1014 if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names))
1015 printk ("*** %s *** FORMAT=%X\n", 1015 printk ("*** %s *** FORMAT=%X\n",
1016 vec_names[(fp->ptregs.vector) >> 2], 1016 vec_names[(fp->ptregs.vector) >> 2],
1017 fp->ptregs.format); 1017 fp->ptregs.format);
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index d2794452b195..437b4f8d86c5 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -61,10 +61,12 @@ SECTIONS
61 .con_initcall.init : { *(.con_initcall.init) } 61 .con_initcall.init : { *(.con_initcall.init) }
62 __con_initcall_end = .; 62 __con_initcall_end = .;
63 SECURITY_INIT 63 SECURITY_INIT
64#ifdef CONFIG_BLK_DEV_INITRD
64 . = ALIGN(8192); 65 . = ALIGN(8192);
65 __initramfs_start = .; 66 __initramfs_start = .;
66 .init.ramfs : { *(.init.ramfs) } 67 .init.ramfs : { *(.init.ramfs) }
67 __initramfs_end = .; 68 __initramfs_end = .;
69#endif
68 . = ALIGN(8192); 70 . = ALIGN(8192);
69 __init_end = .; 71 __init_end = .;
70 72
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index 8c7eccbfc982..2868e206fc76 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -55,10 +55,12 @@ __init_begin = .;
55 .con_initcall.init : { *(.con_initcall.init) } 55 .con_initcall.init : { *(.con_initcall.init) }
56 __con_initcall_end = .; 56 __con_initcall_end = .;
57 SECURITY_INIT 57 SECURITY_INIT
58#ifdef CONFIG_BLK_DEV_INITRD
58 . = ALIGN(8192); 59 . = ALIGN(8192);
59 __initramfs_start = .; 60 __initramfs_start = .;
60 .init.ramfs : { *(.init.ramfs) } 61 .init.ramfs : { *(.init.ramfs) }
61 __initramfs_end = .; 62 __initramfs_end = .;
63#endif
62 . = ALIGN(8192); 64 . = ALIGN(8192);
63 __init_end = .; 65 __init_end = .;
64 .data.init.task : { *(.data.init_task) } 66 .data.init.task : { *(.data.init_task) }
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c
index b0e4c084df8a..272d47eac58d 100644
--- a/arch/m68k/mvme16x/rtc.c
+++ b/arch/m68k/mvme16x/rtc.c
@@ -147,7 +147,7 @@ static int rtc_release(struct inode *inode, struct file *file)
147 * The various file operations we support. 147 * The various file operations we support.
148 */ 148 */
149 149
150static struct file_operations rtc_fops = { 150static const struct file_operations rtc_fops = {
151 .ioctl = rtc_ioctl, 151 .ioctl = rtc_ioctl,
152 .open = rtc_open, 152 .open = rtc_open,
153 .release = rtc_release, 153 .release = rtc_release,
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 25993c2a8fbb..823f73736bb5 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -17,6 +17,10 @@ config FPU
17 bool 17 bool
18 default n 18 default n
19 19
20config ZONE_DMA
21 bool
22 default y
23
20config RWSEM_GENERIC_SPINLOCK 24config RWSEM_GENERIC_SPINLOCK
21 bool 25 bool
22 default y 26 default y
@@ -49,6 +53,9 @@ config TIME_LOW_RES
49 bool 53 bool
50 default y 54 default y
51 55
56config NO_IOPORT
57 def_bool y
58
52source "init/Kconfig" 59source "init/Kconfig"
53 60
54menu "Processor type and features" 61menu "Processor type and features"
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index 9130119537b9..72d349623575 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -62,7 +62,7 @@ static inline long get_reg(struct task_struct *task, int regno)
62 62
63 if (regno == PT_USP) 63 if (regno == PT_USP)
64 addr = &task->thread.usp; 64 addr = &task->thread.usp;
65 else if (regno < sizeof(regoff)/sizeof(regoff[0])) 65 else if (regno < ARRAY_SIZE(regoff))
66 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); 66 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
67 else 67 else
68 return 0; 68 return 0;
@@ -79,7 +79,7 @@ static inline int put_reg(struct task_struct *task, int regno,
79 79
80 if (regno == PT_USP) 80 if (regno == PT_USP)
81 addr = &task->thread.usp; 81 addr = &task->thread.usp;
82 else if (regno < sizeof(regoff)/sizeof(regoff[0])) 82 else if (regno < ARRAY_SIZE(regoff))
83 addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); 83 addr = (unsigned long *) (task->thread.esp0 + regoff[regno]);
84 else 84 else
85 return -1; 85 return -1;
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 9cf2e4d1fc77..d5c25d27b64d 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -44,7 +44,7 @@ unsigned long memory_end;
44EXPORT_SYMBOL(memory_start); 44EXPORT_SYMBOL(memory_start);
45EXPORT_SYMBOL(memory_end); 45EXPORT_SYMBOL(memory_end);
46 46
47char command_line[COMMAND_LINE_SIZE]; 47char __initdata command_line[COMMAND_LINE_SIZE];
48 48
49/* setup some dummy routines */ 49/* setup some dummy routines */
50static void dummy_waitbut(void) 50static void dummy_waitbut(void)
@@ -231,8 +231,8 @@ void setup_arch(char **cmdline_p)
231 231
232 /* Keep a copy of command line */ 232 /* Keep a copy of command line */
233 *cmdline_p = &command_line[0]; 233 *cmdline_p = &command_line[0];
234 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 234 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
235 saved_command_line[COMMAND_LINE_SIZE-1] = 0; 235 boot_command_line[COMMAND_LINE_SIZE-1] = 0;
236 236
237#ifdef DEBUG 237#ifdef DEBUG
238 if (strlen(*cmdline_p)) 238 if (strlen(*cmdline_p))
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index 9226264abf1a..467053da2d08 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -23,6 +23,7 @@
23 23
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/irq_regs.h>
26 27
27#define TICK_SIZE (tick_nsec / 1000) 28#define TICK_SIZE (tick_nsec / 1000)
28 29
@@ -38,7 +39,7 @@ static inline int set_rtc_mmss(unsigned long nowtime)
38 * timer_interrupt() needs to keep up the real-time clock, 39 * timer_interrupt() needs to keep up the real-time clock,
39 * as well as call the "do_timer()" routine every clocktick 40 * as well as call the "do_timer()" routine every clocktick
40 */ 41 */
41static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) 42static irqreturn_t timer_interrupt(int irq, void *dummy)
42{ 43{
43 /* last time the cmos clock got updated */ 44 /* last time the cmos clock got updated */
44 static long last_rtc_update=0; 45 static long last_rtc_update=0;
@@ -51,7 +52,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
51 52
52 do_timer(1); 53 do_timer(1);
53#ifndef CONFIG_SMP 54#ifndef CONFIG_SMP
54 update_process_times(user_mode(regs)); 55 update_process_times(user_mode(get_irq_regs()));
55#endif 56#endif
56 if (current->pid) 57 if (current->pid)
57 profile_tick(CPU_PROFILING); 58 profile_tick(CPU_PROFILING);
@@ -173,13 +174,4 @@ int do_settimeofday(struct timespec *tv)
173 clock_was_set(); 174 clock_was_set();
174 return 0; 175 return 0;
175} 176}
176
177/*
178 * Scheduler clock - returns current time in nanosec units.
179 */
180unsigned long long sched_clock(void)
181{
182 return (unsigned long long)jiffies * (1000000000 / HZ);
183}
184
185EXPORT_SYMBOL(do_settimeofday); 177EXPORT_SYMBOL(do_settimeofday);
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 9129b3a5258b..bed5f47bf568 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -158,7 +158,7 @@ void show_stack(struct task_struct *task, unsigned long *stack)
158void bad_super_trap(struct frame *fp) 158void bad_super_trap(struct frame *fp)
159{ 159{
160 console_verbose(); 160 console_verbose();
161 if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) 161 if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names))
162 printk (KERN_WARNING "*** %s *** FORMAT=%X\n", 162 printk (KERN_WARNING "*** %s *** FORMAT=%X\n",
163 vec_names[(fp->ptregs.vector) >> 2], 163 vec_names[(fp->ptregs.vector) >> 2],
164 fp->ptregs.format); 164 fp->ptregs.format);
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 2b2a10da64a4..c86a1bf589d4 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -87,6 +87,16 @@ SECTIONS {
87 *(__ksymtab_gpl) 87 *(__ksymtab_gpl)
88 __stop___ksymtab_gpl = .; 88 __stop___ksymtab_gpl = .;
89 89
90 /* Kernel symbol table: Normal unused symbols */
91 __start___ksymtab_unused = .;
92 *(__ksymtab_unused)
93 __stop___ksymtab_unused = .;
94
95 /* Kernel symbol table: GPL-only unused symbols */
96 __start___ksymtab_unused_gpl = .;
97 *(__ksymtab_unused_gpl)
98 __stop___ksymtab_unused_gpl = .;
99
90 /* Kernel symbol table: GPL-future symbols */ 100 /* Kernel symbol table: GPL-future symbols */
91 __start___ksymtab_gpl_future = .; 101 __start___ksymtab_gpl_future = .;
92 *(__ksymtab_gpl_future) 102 *(__ksymtab_gpl_future)
@@ -149,10 +159,12 @@ SECTIONS {
149 __security_initcall_start = .; 159 __security_initcall_start = .;
150 *(.security_initcall.init) 160 *(.security_initcall.init)
151 __security_initcall_end = .; 161 __security_initcall_end = .;
162#ifdef CONFIG_BLK_DEV_INITRD
152 . = ALIGN(4); 163 . = ALIGN(4);
153 __initramfs_start = .; 164 __initramfs_start = .;
154 *(.init.ramfs) 165 *(.init.ramfs)
155 __initramfs_end = .; 166 __initramfs_end = .;
167#endif
156 . = ALIGN(4096); 168 . = ALIGN(4096);
157 __init_end = .; 169 __init_end = .;
158 } > INIT 170 } > INIT
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index 34657f85e702..3343830aad10 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -26,7 +26,7 @@
26/***************************************************************************/ 26/***************************************************************************/
27 27
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void); 31void coldfire_trap_init(void);
32void coldfire_reset(void); 32void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 48e4d6266507..0f67320b4031 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -25,7 +25,7 @@
25/***************************************************************************/ 25/***************************************************************************/
26 26
27void coldfire_tick(void); 27void coldfire_tick(void);
28void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 28void coldfire_timer_init(irq_handler_t handler);
29unsigned long coldfire_timer_offset(void); 29unsigned long coldfire_timer_offset(void);
30void coldfire_trap_init(void); 30void coldfire_trap_init(void);
31void coldfire_reset(void); 31void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 823f561f35b0..58b2878deb61 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/param.h> 15#include <linux/param.h>
16#include <linux/interrupt.h>
16#include <asm/machdep.h> 17#include <asm/machdep.h>
17#include <asm/dma.h> 18#include <asm/dma.h>
18 19
@@ -27,7 +28,7 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
27/***************************************************************************/ 28/***************************************************************************/
28 29
29void coldfire_pit_tick(void); 30void coldfire_pit_tick(void);
30void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 31void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 32unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void); 33void coldfire_trap_init(void);
33void coldfire_reset(void); 34void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 85de817e9ec5..9b054e6caee2 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -27,7 +27,7 @@
27/***************************************************************************/ 27/***************************************************************************/
28 28
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void); 32void coldfire_trap_init(void);
33void coldfire_reset(void); 33void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index 9d19d5bdb8af..d6706079d64a 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -12,6 +12,7 @@
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/param.h> 13#include <linux/param.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/interrupt.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
16#include <asm/dma.h> 17#include <asm/dma.h>
17#include <asm/traps.h> 18#include <asm/traps.h>
@@ -24,7 +25,7 @@
24/***************************************************************************/ 25/***************************************************************************/
25 26
26void coldfire_tick(void); 27void coldfire_tick(void);
27void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 28void coldfire_timer_init(irq_handler_t handler);
28unsigned long coldfire_timer_offset(void); 29unsigned long coldfire_timer_offset(void);
29void coldfire_trap_init(void); 30void coldfire_trap_init(void);
30void coldfire_reset(void); 31void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index d500e27eda57..6b437cc97776 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -26,7 +26,7 @@
26/***************************************************************************/ 26/***************************************************************************/
27 27
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void); 31void coldfire_trap_init(void);
32void coldfire_reset(void); 32void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index bbae51597457..28e7d964eef1 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -27,7 +27,7 @@
27/***************************************************************************/ 27/***************************************************************************/
28 28
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void); 32void coldfire_trap_init(void);
33void coldfire_reset(void); 33void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 18dad9046144..805b4f74ff19 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -27,7 +27,7 @@
27/***************************************************************************/ 27/***************************************************************************/
28 28
29void coldfire_pit_tick(void); 29void coldfire_pit_tick(void);
30void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void); 31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void); 32void coldfire_trap_init(void);
33void coldfire_reset(void); 33void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index 8074ac56f479..e04b84deb57d 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -27,7 +27,7 @@
27/***************************************************************************/ 27/***************************************************************************/
28 28
29void coldfire_tick(void); 29void coldfire_tick(void);
30void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 30void coldfire_timer_init(irq_handler_t handler);
31unsigned long coldfire_timer_offset(void); 31unsigned long coldfire_timer_offset(void);
32void coldfire_trap_init(void); 32void coldfire_trap_init(void);
33void coldfire_reset(void); 33void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
index a57239ec6c8c..20f12a19a522 100644
--- a/arch/m68knommu/platform/5307/ints.c
+++ b/arch/m68knommu/platform/5307/ints.c
@@ -19,6 +19,7 @@
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/interrupt.h>
22#include <linux/kernel_stat.h> 23#include <linux/kernel_stat.h>
23#include <linux/errno.h> 24#include <linux/errno.h>
24#include <linux/seq_file.h> 25#include <linux/seq_file.h>
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index 9dc5688f71b5..aa15beeb36ca 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -43,7 +43,7 @@ void coldfire_pit_tick(void)
43 43
44/***************************************************************************/ 44/***************************************************************************/
45 45
46void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) 46void coldfire_pit_init(irq_handler_t handler)
47{ 47{
48 volatile unsigned char *icrp; 48 volatile unsigned char *icrp;
49 volatile unsigned long *imrp; 49 volatile unsigned long *imrp;
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index e5668af19789..92e58070b016 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -62,7 +62,7 @@ void coldfire_tick(void)
62 62
63/***************************************************************************/ 63/***************************************************************************/
64 64
65void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) 65void coldfire_timer_init(irq_handler_t handler)
66{ 66{
67 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 67 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
68 __raw_writetrr(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR)); 68 __raw_writetrr(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR));
@@ -104,19 +104,20 @@ unsigned long coldfire_timer_offset(void)
104 104
105/* 105/*
106 * Choose a reasonably fast profile timer. Make it an odd value to 106 * Choose a reasonably fast profile timer. Make it an odd value to
107 * try and get good coverage of kernal operations. 107 * try and get good coverage of kernel operations.
108 */ 108 */
109#define PROFILEHZ 1013 109#define PROFILEHZ 1013
110 110
111/* 111/*
112 * Use the other timer to provide high accuracy profiling info. 112 * Use the other timer to provide high accuracy profiling info.
113 */ 113 */
114void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs) 114irqreturn_t coldfire_profile_tick(int irq, void *dummy)
115{ 115{
116 /* Reset ColdFire timer2 */ 116 /* Reset ColdFire timer2 */
117 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER)); 117 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER));
118 if (current->pid) 118 if (current->pid)
119 profile_tick(CPU_PROFILING, regs); 119 profile_tick(CPU_PROFILING, regs);
120 return IRQ_HANDLED;
120} 121}
121 122
122/***************************************************************************/ 123/***************************************************************************/
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index c7d6ad513820..664c3a12b0c1 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -35,7 +35,7 @@
35/***************************************************************************/ 35/***************************************************************************/
36 36
37void coldfire_tick(void); 37void coldfire_tick(void);
38void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 38void coldfire_timer_init(irq_handler_t handler);
39unsigned long coldfire_timer_offset(void); 39unsigned long coldfire_timer_offset(void);
40void coldfire_trap_init(void); 40void coldfire_trap_init(void);
41void coldfire_reset(void); 41void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 5aad2645f0f1..036f62876241 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -26,7 +26,7 @@
26/***************************************************************************/ 26/***************************************************************************/
27 27
28void coldfire_tick(void); 28void coldfire_tick(void);
29void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void); 30unsigned long coldfire_timer_offset(void);
31void coldfire_trap_init(void); 31void coldfire_trap_init(void);
32void coldfire_reset(void); 32void coldfire_reset(void);
diff --git a/arch/m68knommu/platform/68328/config.c b/arch/m68knommu/platform/68328/config.c
index 26ffeba28642..e5c537d14dfb 100644
--- a/arch/m68knommu/platform/68328/config.c
+++ b/arch/m68knommu/platform/68328/config.c
@@ -34,7 +34,7 @@
34 34
35/***************************************************************************/ 35/***************************************************************************/
36 36
37void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *)); 37void m68328_timer_init(irq_handler_t timer_routine);
38void m68328_timer_tick(void); 38void m68328_timer_tick(void);
39unsigned long m68328_timer_gettimeoffset(void); 39unsigned long m68328_timer_gettimeoffset(void);
40void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec); 40void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec);
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index bbd386f572d9..58e97886d771 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -8,6 +8,10 @@ mainmenu "Linux/MIPS Kernel Configuration"
8 8
9menu "Machine selection" 9menu "Machine selection"
10 10
11config ZONE_DMA
12 bool
13 default y
14
11choice 15choice
12 prompt "System type" 16 prompt "System type"
13 default SGI_IP22 17 default SGI_IP22
@@ -140,6 +144,7 @@ config BASLER_EXCITE
140 select SYS_SUPPORTS_32BIT_KERNEL 144 select SYS_SUPPORTS_32BIT_KERNEL
141 select SYS_SUPPORTS_64BIT_KERNEL 145 select SYS_SUPPORTS_64BIT_KERNEL
142 select SYS_SUPPORTS_BIG_ENDIAN 146 select SYS_SUPPORTS_BIG_ENDIAN
147 select SYS_SUPPORTS_KGDB
143 help 148 help
144 The eXcite is a smart camera platform manufactured by 149 The eXcite is a smart camera platform manufactured by
145 Basler Vision Technologies AG 150 Basler Vision Technologies AG
@@ -206,6 +211,7 @@ config MIPS_EV64120
206 select SYS_SUPPORTS_32BIT_KERNEL 211 select SYS_SUPPORTS_32BIT_KERNEL
207 select SYS_SUPPORTS_64BIT_KERNEL 212 select SYS_SUPPORTS_64BIT_KERNEL
208 select SYS_SUPPORTS_BIG_ENDIAN 213 select SYS_SUPPORTS_BIG_ENDIAN
214 select SYS_SUPPORTS_KGDB
209 help 215 help
210 This is an evaluation board based on the Galileo GT-64120 216 This is an evaluation board based on the Galileo GT-64120
211 single-chip system controller that contains a MIPS R5000 compatible 217 single-chip system controller that contains a MIPS R5000 compatible
@@ -268,6 +274,7 @@ config MIPS_ATLAS
268 select SYS_SUPPORTS_BIG_ENDIAN 274 select SYS_SUPPORTS_BIG_ENDIAN
269 select SYS_SUPPORTS_LITTLE_ENDIAN 275 select SYS_SUPPORTS_LITTLE_ENDIAN
270 select SYS_SUPPORTS_MULTITHREADING if EXPERIMENTAL 276 select SYS_SUPPORTS_MULTITHREADING if EXPERIMENTAL
277 select SYS_SUPPORTS_SMARTMIPS
271 select GENERIC_HARDIRQS_NO__DO_IRQ 278 select GENERIC_HARDIRQS_NO__DO_IRQ
272 help 279 help
273 This enables support for the MIPS Technologies Atlas evaluation 280 This enables support for the MIPS Technologies Atlas evaluation
@@ -299,6 +306,7 @@ config MIPS_MALTA
299 select SYS_SUPPORTS_BIG_ENDIAN 306 select SYS_SUPPORTS_BIG_ENDIAN
300 select SYS_SUPPORTS_LITTLE_ENDIAN 307 select SYS_SUPPORTS_LITTLE_ENDIAN
301 select SYS_SUPPORTS_MULTITHREADING 308 select SYS_SUPPORTS_MULTITHREADING
309 select SYS_SUPPORTS_SMARTMIPS
302 help 310 help
303 This enables support for the MIPS Technologies Malta evaluation 311 This enables support for the MIPS Technologies Malta evaluation
304 board. 312 board.
@@ -316,6 +324,7 @@ config MIPS_SEAD
316 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 324 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
317 select SYS_SUPPORTS_BIG_ENDIAN 325 select SYS_SUPPORTS_BIG_ENDIAN
318 select SYS_SUPPORTS_LITTLE_ENDIAN 326 select SYS_SUPPORTS_LITTLE_ENDIAN
327 select SYS_SUPPORTS_SMARTMIPS
319 help 328 help
320 This enables support for the MIPS Technologies SEAD evaluation 329 This enables support for the MIPS Technologies SEAD evaluation
321 board. 330 board.
@@ -370,6 +379,7 @@ config MOMENCO_JAGUAR_ATX
370 select SYS_SUPPORTS_32BIT_KERNEL 379 select SYS_SUPPORTS_32BIT_KERNEL
371 select SYS_SUPPORTS_64BIT_KERNEL 380 select SYS_SUPPORTS_64BIT_KERNEL
372 select SYS_SUPPORTS_BIG_ENDIAN 381 select SYS_SUPPORTS_BIG_ENDIAN
382 select SYS_SUPPORTS_KGDB
373 help 383 help
374 The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by 384 The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by
375 Momentum Computer <http://www.momenco.com/>. 385 Momentum Computer <http://www.momenco.com/>.
@@ -387,6 +397,7 @@ config MOMENCO_OCELOT
387 select SYS_SUPPORTS_32BIT_KERNEL 397 select SYS_SUPPORTS_32BIT_KERNEL
388 select SYS_SUPPORTS_64BIT_KERNEL 398 select SYS_SUPPORTS_64BIT_KERNEL
389 select SYS_SUPPORTS_BIG_ENDIAN 399 select SYS_SUPPORTS_BIG_ENDIAN
400 select SYS_SUPPORTS_KGDB
390 help 401 help
391 The Ocelot is a MIPS-based Single Board Computer (SBC) made by 402 The Ocelot is a MIPS-based Single Board Computer (SBC) made by
392 Momentum Computer <http://www.momenco.com/>. 403 Momentum Computer <http://www.momenco.com/>.
@@ -476,6 +487,8 @@ config DDB5477
476 select SYS_HAS_CPU_R5432 487 select SYS_HAS_CPU_R5432
477 select SYS_SUPPORTS_32BIT_KERNEL 488 select SYS_SUPPORTS_32BIT_KERNEL
478 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 489 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
490 select SYS_SUPPORTS_KGDB
491 select SYS_SUPPORTS_KGDB
479 select SYS_SUPPORTS_LITTLE_ENDIAN 492 select SYS_SUPPORTS_LITTLE_ENDIAN
480 help 493 help
481 This enables support for the R5432-based NEC DDB Vrc-5477, 494 This enables support for the R5432-based NEC DDB Vrc-5477,
@@ -504,6 +517,7 @@ config PMC_YOSEMITE
504 select SYS_SUPPORTS_64BIT_KERNEL 517 select SYS_SUPPORTS_64BIT_KERNEL
505 select SYS_SUPPORTS_BIG_ENDIAN 518 select SYS_SUPPORTS_BIG_ENDIAN
506 select SYS_SUPPORTS_HIGHMEM 519 select SYS_SUPPORTS_HIGHMEM
520 select SYS_SUPPORTS_KGDB
507 select SYS_SUPPORTS_SMP 521 select SYS_SUPPORTS_SMP
508 help 522 help
509 Yosemite is an evaluation board for the RM9000x2 processor 523 Yosemite is an evaluation board for the RM9000x2 processor
@@ -575,10 +589,12 @@ config SGI_IP27
575 select DMA_IP27 589 select DMA_IP27
576 select EARLY_PRINTK 590 select EARLY_PRINTK
577 select HW_HAS_PCI 591 select HW_HAS_PCI
592 select NR_CPUS_DEFAULT_64
578 select PCI_DOMAINS 593 select PCI_DOMAINS
579 select SYS_HAS_CPU_R10000 594 select SYS_HAS_CPU_R10000
580 select SYS_SUPPORTS_64BIT_KERNEL 595 select SYS_SUPPORTS_64BIT_KERNEL
581 select SYS_SUPPORTS_BIG_ENDIAN 596 select SYS_SUPPORTS_BIG_ENDIAN
597 select SYS_SUPPORTS_KGDB
582 select SYS_SUPPORTS_NUMA 598 select SYS_SUPPORTS_NUMA
583 select SYS_SUPPORTS_SMP 599 select SYS_SUPPORTS_SMP
584 select GENERIC_HARDIRQS_NO__DO_IRQ 600 select GENERIC_HARDIRQS_NO__DO_IRQ
@@ -593,8 +609,6 @@ config SGI_IP32
593 select ARC 609 select ARC
594 select ARC32 610 select ARC32
595 select BOOT_ELF32 611 select BOOT_ELF32
596 select OWN_DMA
597 select DMA_IP32
598 select DMA_NONCOHERENT 612 select DMA_NONCOHERENT
599 select HW_HAS_PCI 613 select HW_HAS_PCI
600 select R5000_CPU_SCACHE 614 select R5000_CPU_SCACHE
@@ -612,6 +626,7 @@ config SIBYTE_BIGSUR
612 bool "Sibyte BCM91480B-BigSur" 626 bool "Sibyte BCM91480B-BigSur"
613 select BOOT_ELF32 627 select BOOT_ELF32
614 select DMA_COHERENT 628 select DMA_COHERENT
629 select NR_CPUS_DEFAULT_4
615 select PCI_DOMAINS 630 select PCI_DOMAINS
616 select SIBYTE_BCM1x80 631 select SIBYTE_BCM1x80
617 select SWAP_IO_SPACE 632 select SWAP_IO_SPACE
@@ -623,11 +638,13 @@ config SIBYTE_SWARM
623 bool "Sibyte BCM91250A-SWARM" 638 bool "Sibyte BCM91250A-SWARM"
624 select BOOT_ELF32 639 select BOOT_ELF32
625 select DMA_COHERENT 640 select DMA_COHERENT
641 select NR_CPUS_DEFAULT_2
626 select SIBYTE_SB1250 642 select SIBYTE_SB1250
627 select SWAP_IO_SPACE 643 select SWAP_IO_SPACE
628 select SYS_HAS_CPU_SB1 644 select SYS_HAS_CPU_SB1
629 select SYS_SUPPORTS_BIG_ENDIAN 645 select SYS_SUPPORTS_BIG_ENDIAN
630 select SYS_SUPPORTS_HIGHMEM 646 select SYS_SUPPORTS_HIGHMEM
647 select SYS_SUPPORTS_KGDB
631 select SYS_SUPPORTS_LITTLE_ENDIAN 648 select SYS_SUPPORTS_LITTLE_ENDIAN
632 649
633config SIBYTE_SENTOSA 650config SIBYTE_SENTOSA
@@ -635,6 +652,7 @@ config SIBYTE_SENTOSA
635 depends on EXPERIMENTAL 652 depends on EXPERIMENTAL
636 select BOOT_ELF32 653 select BOOT_ELF32
637 select DMA_COHERENT 654 select DMA_COHERENT
655 select NR_CPUS_DEFAULT_2
638 select SIBYTE_SB1250 656 select SIBYTE_SB1250
639 select SWAP_IO_SPACE 657 select SWAP_IO_SPACE
640 select SYS_HAS_CPU_SB1 658 select SYS_HAS_CPU_SB1
@@ -668,6 +686,7 @@ config SIBYTE_PTSWARM
668 depends on EXPERIMENTAL 686 depends on EXPERIMENTAL
669 select BOOT_ELF32 687 select BOOT_ELF32
670 select DMA_COHERENT 688 select DMA_COHERENT
689 select NR_CPUS_DEFAULT_2
671 select SIBYTE_SB1250 690 select SIBYTE_SB1250
672 select SWAP_IO_SPACE 691 select SWAP_IO_SPACE
673 select SYS_HAS_CPU_SB1 692 select SYS_HAS_CPU_SB1
@@ -680,6 +699,7 @@ config SIBYTE_LITTLESUR
680 depends on EXPERIMENTAL 699 depends on EXPERIMENTAL
681 select BOOT_ELF32 700 select BOOT_ELF32
682 select DMA_COHERENT 701 select DMA_COHERENT
702 select NR_CPUS_DEFAULT_2
683 select SIBYTE_SB1250 703 select SIBYTE_SB1250
684 select SWAP_IO_SPACE 704 select SWAP_IO_SPACE
685 select SYS_HAS_CPU_SB1 705 select SYS_HAS_CPU_SB1
@@ -718,15 +738,16 @@ config SNI_RM
718 select BOOT_ELF32 738 select BOOT_ELF32
719 select DMA_NONCOHERENT 739 select DMA_NONCOHERENT
720 select GENERIC_ISA_DMA 740 select GENERIC_ISA_DMA
721 select HAVE_STD_PC_SERIAL_PORT
722 select HW_HAS_EISA 741 select HW_HAS_EISA
723 select HW_HAS_PCI 742 select HW_HAS_PCI
743 select IRQ_CPU
724 select I8253 744 select I8253
725 select I8259 745 select I8259
726 select ISA 746 select ISA
727 select SWAP_IO_SPACE if CPU_BIG_ENDIAN 747 select SWAP_IO_SPACE if CPU_BIG_ENDIAN
728 select SYS_HAS_CPU_R4X00 748 select SYS_HAS_CPU_R4X00
729 select SYS_HAS_CPU_R5000 749 select SYS_HAS_CPU_R5000
750 select SYS_HAS_CPU_R10000
730 select R5000_CPU_SCACHE 751 select R5000_CPU_SCACHE
731 select SYS_SUPPORTS_32BIT_KERNEL 752 select SYS_SUPPORTS_32BIT_KERNEL
732 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 753 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
@@ -747,6 +768,7 @@ config TOSHIBA_JMR3927
747 select SWAP_IO_SPACE 768 select SWAP_IO_SPACE
748 select SYS_HAS_CPU_TX39XX 769 select SYS_HAS_CPU_TX39XX
749 select SYS_SUPPORTS_32BIT_KERNEL 770 select SYS_SUPPORTS_32BIT_KERNEL
771 select SYS_SUPPORTS_LITTLE_ENDIAN
750 select SYS_SUPPORTS_BIG_ENDIAN 772 select SYS_SUPPORTS_BIG_ENDIAN
751 select TOSHIBA_BOARDS 773 select TOSHIBA_BOARDS
752 774
@@ -761,7 +783,9 @@ config TOSHIBA_RBTX4927
761 select SYS_HAS_CPU_TX49XX 783 select SYS_HAS_CPU_TX49XX
762 select SYS_SUPPORTS_32BIT_KERNEL 784 select SYS_SUPPORTS_32BIT_KERNEL
763 select SYS_SUPPORTS_64BIT_KERNEL 785 select SYS_SUPPORTS_64BIT_KERNEL
786 select SYS_SUPPORTS_LITTLE_ENDIAN
764 select SYS_SUPPORTS_BIG_ENDIAN 787 select SYS_SUPPORTS_BIG_ENDIAN
788 select SYS_SUPPORTS_KGDB
765 select TOSHIBA_BOARDS 789 select TOSHIBA_BOARDS
766 select GENERIC_HARDIRQS_NO__DO_IRQ 790 select GENERIC_HARDIRQS_NO__DO_IRQ
767 help 791 help
@@ -782,6 +806,7 @@ config TOSHIBA_RBTX4938
782 select SYS_SUPPORTS_32BIT_KERNEL 806 select SYS_SUPPORTS_32BIT_KERNEL
783 select SYS_SUPPORTS_LITTLE_ENDIAN 807 select SYS_SUPPORTS_LITTLE_ENDIAN
784 select SYS_SUPPORTS_BIG_ENDIAN 808 select SYS_SUPPORTS_BIG_ENDIAN
809 select SYS_SUPPORTS_KGDB
785 select TOSHIBA_BOARDS 810 select TOSHIBA_BOARDS
786 select GENERIC_HARDIRQS_NO__DO_IRQ 811 select GENERIC_HARDIRQS_NO__DO_IRQ
787 help 812 help
@@ -790,23 +815,6 @@ config TOSHIBA_RBTX4938
790 815
791endchoice 816endchoice
792 817
793config KEXEC
794 bool "Kexec system call (EXPERIMENTAL)"
795 depends on EXPERIMENTAL
796 help
797 kexec is a system call that implements the ability to shutdown your
798 current kernel, and to start another kernel. It is like a reboot
799 but it is indepedent of the system firmware. And like a reboot
800 you can start any kernel with it, not just Linux.
801
802 The name comes from the similiarity to the exec system call.
803
804 It is an ongoing process to be certain the hardware in a machine
805 is properly shutdown, so do not be surprised if this code does not
806 initially work for you. It may help to enable device hotplugging
807 support. As of this writing the exact hardware interface is
808 strongly in flux, so no good recommendation can be made.
809
810source "arch/mips/ddb5xxx/Kconfig" 818source "arch/mips/ddb5xxx/Kconfig"
811source "arch/mips/gt64120/ev64120/Kconfig" 819source "arch/mips/gt64120/ev64120/Kconfig"
812source "arch/mips/jazz/Kconfig" 820source "arch/mips/jazz/Kconfig"
@@ -888,9 +896,6 @@ config DMA_NONCOHERENT
888config DMA_NEED_PCI_MAP_STATE 896config DMA_NEED_PCI_MAP_STATE
889 bool 897 bool
890 898
891config OWN_DMA
892 bool
893
894config EARLY_PRINTK 899config EARLY_PRINTK
895 bool 900 bool
896 901
@@ -945,6 +950,9 @@ config CPU_LITTLE_ENDIAN
945 950
946endchoice 951endchoice
947 952
953config SYS_SUPPORTS_APM_EMULATION
954 bool
955
948config SYS_SUPPORTS_BIG_ENDIAN 956config SYS_SUPPORTS_BIG_ENDIAN
949 bool 957 bool
950 958
@@ -965,6 +973,7 @@ config IRQ_MV64340
965 973
966config DDB5XXX_COMMON 974config DDB5XXX_COMMON
967 bool 975 bool
976 select SYS_SUPPORTS_KGDB
968 977
969config MIPS_BOARDS_GEN 978config MIPS_BOARDS_GEN
970 bool 979 bool
@@ -1012,6 +1021,8 @@ config SOC_AU1X00
1012 bool 1021 bool
1013 select SYS_HAS_CPU_MIPS32_R1 1022 select SYS_HAS_CPU_MIPS32_R1
1014 select SYS_SUPPORTS_32BIT_KERNEL 1023 select SYS_SUPPORTS_32BIT_KERNEL
1024 select SYS_SUPPORTS_APM_EMULATION
1025 select SYS_SUPPORTS_KGDB
1015 1026
1016config PNX8550 1027config PNX8550
1017 bool 1028 bool
@@ -1024,6 +1035,7 @@ config SOC_PNX8550
1024 select SYS_HAS_CPU_MIPS32_R1 1035 select SYS_HAS_CPU_MIPS32_R1
1025 select SYS_SUPPORTS_32BIT_KERNEL 1036 select SYS_SUPPORTS_32BIT_KERNEL
1026 select GENERIC_HARDIRQS_NO__DO_IRQ 1037 select GENERIC_HARDIRQS_NO__DO_IRQ
1038 select SYS_SUPPORTS_KGDB
1027 1039
1028config SWAP_IO_SPACE 1040config SWAP_IO_SPACE
1029 bool 1041 bool
@@ -1072,7 +1084,7 @@ config BOOT_ELF32
1072 1084
1073config MIPS_L1_CACHE_SHIFT 1085config MIPS_L1_CACHE_SHIFT
1074 int 1086 int
1075 default "4" if MACH_DECSTATION 1087 default "4" if MACH_DECSTATION || SNI_RM
1076 default "7" if SGI_IP27 1088 default "7" if SGI_IP27
1077 default "5" 1089 default "5"
1078 1090
@@ -1541,6 +1553,8 @@ config MIPS_MT_SMTC
1541 select CPU_MIPSR2_IRQ_VI 1553 select CPU_MIPSR2_IRQ_VI
1542 select CPU_MIPSR2_SRS 1554 select CPU_MIPSR2_SRS
1543 select MIPS_MT 1555 select MIPS_MT
1556 select NR_CPUS_DEFAULT_2
1557 select NR_CPUS_DEFAULT_8
1544 select SMP 1558 select SMP
1545 select SYS_SUPPORTS_SMP 1559 select SYS_SUPPORTS_SMP
1546 help 1560 help
@@ -1630,6 +1644,18 @@ config 64BIT_PHYS_ADDR
1630config CPU_HAS_LLSC 1644config CPU_HAS_LLSC
1631 bool 1645 bool
1632 1646
1647config CPU_HAS_SMARTMIPS
1648 depends on SYS_SUPPORTS_SMARTMIPS
1649 bool "Support for the SmartMIPS ASE"
1650 help
1651 SmartMIPS is a extension of the MIPS32 architecture aimed at
1652 increased security at both hardware and software level for
1653 smartcards. Enabling this option will allow proper use of the
1654 SmartMIPS instructions by Linux applications. However a kernel with
1655 this option will not work on a MIPS core without SmartMIPS core. If
1656 you don't know you probably don't have SmartMIPS and should say N
1657 here.
1658
1633config CPU_HAS_WB 1659config CPU_HAS_WB
1634 bool 1660 bool
1635 1661
@@ -1693,6 +1719,9 @@ config CPU_SUPPORTS_HIGHMEM
1693config SYS_SUPPORTS_HIGHMEM 1719config SYS_SUPPORTS_HIGHMEM
1694 bool 1720 bool
1695 1721
1722config SYS_SUPPORTS_SMARTMIPS
1723 bool
1724
1696config ARCH_FLATMEM_ENABLE 1725config ARCH_FLATMEM_ENABLE
1697 def_bool y 1726 def_bool y
1698 depends on !NUMA 1727 depends on !NUMA
@@ -1756,13 +1785,34 @@ config SMP
1756config SYS_SUPPORTS_SMP 1785config SYS_SUPPORTS_SMP
1757 bool 1786 bool
1758 1787
1788config NR_CPUS_DEFAULT_2
1789 bool
1790
1791config NR_CPUS_DEFAULT_4
1792 bool
1793
1794config NR_CPUS_DEFAULT_8
1795 bool
1796
1797config NR_CPUS_DEFAULT_16
1798 bool
1799
1800config NR_CPUS_DEFAULT_32
1801 bool
1802
1803config NR_CPUS_DEFAULT_64
1804 bool
1805
1759config NR_CPUS 1806config NR_CPUS
1760 int "Maximum number of CPUs (2-64)" 1807 int "Maximum number of CPUs (2-64)"
1761 range 2 64 1808 range 2 64
1762 depends on SMP 1809 depends on SMP
1763 default "64" if SGI_IP27 1810 default "2" if NR_CPUS_DEFAULT_2
1764 default "2" 1811 default "4" if NR_CPUS_DEFAULT_4
1765 default "8" if MIPS_MT_SMTC 1812 default "8" if NR_CPUS_DEFAULT_8
1813 default "16" if NR_CPUS_DEFAULT_16
1814 default "32" if NR_CPUS_DEFAULT_32
1815 default "64" if NR_CPUS_DEFAULT_64
1766 help 1816 help
1767 This allows you to specify the maximum number of CPUs which this 1817 This allows you to specify the maximum number of CPUs which this
1768 kernel will support. The maximum supported value is 32 for 32-bit 1818 kernel will support. The maximum supported value is 32 for 32-bit
@@ -1859,6 +1909,40 @@ config MIPS_INSANE_LARGE
1859 This will result in additional memory usage, so it is not 1909 This will result in additional memory usage, so it is not
1860 recommended for normal users. 1910 recommended for normal users.
1861 1911
1912config KEXEC
1913 bool "Kexec system call (EXPERIMENTAL)"
1914 depends on EXPERIMENTAL
1915 help
1916 kexec is a system call that implements the ability to shutdown your
1917 current kernel, and to start another kernel. It is like a reboot
1918 but it is indepedent of the system firmware. And like a reboot
1919 you can start any kernel with it, not just Linux.
1920
1921 The name comes from the similiarity to the exec system call.
1922
1923 It is an ongoing process to be certain the hardware in a machine
1924 is properly shutdown, so do not be surprised if this code does not
1925 initially work for you. It may help to enable device hotplugging
1926 support. As of this writing the exact hardware interface is
1927 strongly in flux, so no good recommendation can be made.
1928
1929config SECCOMP
1930 bool "Enable seccomp to safely compute untrusted bytecode"
1931 depends on PROC_FS && BROKEN
1932 default y
1933 help
1934 This kernel feature is useful for number crunching applications
1935 that may need to compute untrusted bytecode during their
1936 execution. By using pipes or other transports made available to
1937 the process as file descriptors supporting the read/write
1938 syscalls, it's possible to isolate those applications in
1939 their own address space using seccomp. Once seccomp is
1940 enabled via /proc/<pid>/seccomp, it cannot be disabled
1941 and the task is only allowed to execute a few safe syscalls
1942 defined by each seccomp mode.
1943
1944 If unsure, say Y. Only embedded should say N here.
1945
1862endmenu 1946endmenu
1863 1947
1864config RWSEM_GENERIC_SPINLOCK 1948config RWSEM_GENERIC_SPINLOCK
@@ -2025,52 +2109,11 @@ config BINFMT_ELF32
2025 bool 2109 bool
2026 default y if MIPS32_O32 || MIPS32_N32 2110 default y if MIPS32_O32 || MIPS32_N32
2027 2111
2028config SECCOMP 2112endmenu
2029 bool "Enable seccomp to safely compute untrusted bytecode"
2030 depends on PROC_FS && BROKEN
2031 default y
2032 help
2033 This kernel feature is useful for number crunching applications
2034 that may need to compute untrusted bytecode during their
2035 execution. By using pipes or other transports made available to
2036 the process as file descriptors supporting the read/write
2037 syscalls, it's possible to isolate those applications in
2038 their own address space using seccomp. Once seccomp is
2039 enabled via /proc/<pid>/seccomp, it cannot be disabled
2040 and the task is only allowed to execute a few safe syscalls
2041 defined by each seccomp mode.
2042 2113
2043 If unsure, say Y. Only embedded should say N here. 2114menu "Power management options"
2044 2115
2045config PM 2116source "kernel/power/Kconfig"
2046 bool "Power Management support (EXPERIMENTAL)"
2047 depends on EXPERIMENTAL && SOC_AU1X00
2048
2049config APM
2050 tristate "Advanced Power Management Emulation"
2051 depends on PM
2052 ---help---
2053 APM is a BIOS specification for saving power using several different
2054 techniques. This is mostly useful for battery powered systems with
2055 APM compliant BIOSes. If you say Y here, the system time will be
2056 reset after a RESUME operation, the /proc/apm device will provide
2057 battery status information, and user-space programs will receive
2058 notification of APM "events" (e.g. battery status change).
2059
2060 In order to use APM, you will need supporting software. For location
2061 and more information, read <file:Documentation/pm.txt> and the
2062 Battery Powered Linux mini-HOWTO, available from
2063 <http://www.tldp.org/docs.html#howto>.
2064
2065 This driver does not spin down disk drives (see the hdparm(8)
2066 manpage ("man 8 hdparm") for that), and it doesn't turn off
2067 VESA-compliant "green" monitors.
2068
2069 Generally, if you don't have a battery in your machine, there isn't
2070 much point in using this driver and you should say N. If you get
2071 random kernel OOPSes or reboots that don't seem to be related to
2072 anything, try disabling/enabling this option (or disabling/enabling
2073 APM in your BIOS).
2074 2117
2075endmenu 2118endmenu
2076 2119
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 5d6afb52d904..d5e60a0c1ded 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -22,10 +22,10 @@ config CMDLINE
22 string "Default kernel command string" 22 string "Default kernel command string"
23 default "" 23 default ""
24 help 24 help
25 On some platforms, there is currently no way for the boot loader to 25 On some platforms, there is currently no way for the boot loader to
26 pass arguments to the kernel. For these platforms, you can supply 26 pass arguments to the kernel. For these platforms, you can supply
27 some command-line options at build time by entering them here. In 27 some command-line options at build time by entering them here. In
28 other cases you can specify kernel args so that you don't have 28 other cases you can specify kernel args so that you don't have
29 to set them up in board prom initialization routines. 29 to set them up in board prom initialization routines.
30 30
31config DEBUG_STACK_USAGE 31config DEBUG_STACK_USAGE
@@ -39,7 +39,7 @@ config DEBUG_STACK_USAGE
39 39
40config KGDB 40config KGDB
41 bool "Remote GDB kernel debugging" 41 bool "Remote GDB kernel debugging"
42 depends on DEBUG_KERNEL 42 depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB
43 select DEBUG_INFO 43 select DEBUG_INFO
44 help 44 help
45 If you say Y here, it will be possible to remotely debug the MIPS 45 If you say Y here, it will be possible to remotely debug the MIPS
@@ -48,6 +48,9 @@ config KGDB
48 better 32 MB RAM to avoid excessive linking time. This is only 48 better 32 MB RAM to avoid excessive linking time. This is only
49 useful for kernel hackers. If unsure, say N. 49 useful for kernel hackers. If unsure, say N.
50 50
51config SYS_SUPPORTS_KGDB
52 bool
53
51config GDB_CONSOLE 54config GDB_CONSOLE
52 bool "Console output to GDB" 55 bool "Console output to GDB"
53 depends on KGDB 56 depends on KGDB
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index c68b5d3e5d18..92bca6ad6ab1 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -103,6 +103,8 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
103cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) 103cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
104cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) 104cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
105 105
106cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips)
107
106cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ 108cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
107 -fno-omit-frame-pointer 109 -fno-omit-frame-pointer
108 110
diff --git a/arch/mips/arc/identify.c b/arch/mips/arc/identify.c
index 3ba7c47f9f23..4b907369b0f9 100644
--- a/arch/mips/arc/identify.c
+++ b/arch/mips/arc/identify.c
@@ -77,7 +77,7 @@ static struct smatch * __init string_to_mach(const char *s)
77{ 77{
78 int i; 78 int i;
79 79
80 for (i = 0; i < (sizeof(mach_table) / sizeof (mach_table[0])); i++) { 80 for (i = 0; i < ARRAY_SIZE(mach_table); i++) {
81 if (!strcmp(s, mach_table[i].arcname)) 81 if (!strcmp(s, mach_table[i].arcname))
82 return &mach_table[i]; 82 return &mach_table[i];
83 } 83 }
diff --git a/arch/mips/arc/memory.c b/arch/mips/arc/memory.c
index 8a9ef58cc399..456cb81a32d9 100644
--- a/arch/mips/arc/memory.c
+++ b/arch/mips/arc/memory.c
@@ -141,30 +141,20 @@ void __init prom_meminit(void)
141 } 141 }
142} 142}
143 143
144unsigned long __init prom_free_prom_memory(void) 144void __init prom_free_prom_memory(void)
145{ 145{
146 unsigned long freed = 0;
147 unsigned long addr; 146 unsigned long addr;
148 int i; 147 int i;
149 148
150 if (prom_flags & PROM_FLAG_DONT_FREE_TEMP) 149 if (prom_flags & PROM_FLAG_DONT_FREE_TEMP)
151 return 0; 150 return;
152 151
153 for (i = 0; i < boot_mem_map.nr_map; i++) { 152 for (i = 0; i < boot_mem_map.nr_map; i++) {
154 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) 153 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
155 continue; 154 continue;
156 155
157 addr = boot_mem_map.map[i].addr; 156 addr = boot_mem_map.map[i].addr;
158 while (addr < boot_mem_map.map[i].addr 157 free_init_pages("prom memory",
159 + boot_mem_map.map[i].size) { 158 addr, addr + boot_mem_map.map[i].size);
160 ClearPageReserved(virt_to_page(__va(addr)));
161 init_page_count(virt_to_page(__va(addr)));
162 free_page((unsigned long)__va(addr));
163 addr += PAGE_SIZE;
164 freed += PAGE_SIZE;
165 }
166 } 159 }
167 printk(KERN_INFO "Freeing prom memory: %ldkb freed\n", freed >> 10);
168
169 return freed;
170} 160}
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 9cf7b6715836..ea6e99fbe2f7 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -233,7 +233,7 @@ void restore_local_and_enable(int controller, unsigned long mask)
233 233
234 234
235static struct irq_chip rise_edge_irq_type = { 235static struct irq_chip rise_edge_irq_type = {
236 .typename = "Au1000 Rise Edge", 236 .name = "Au1000 Rise Edge",
237 .ack = mask_and_ack_rise_edge_irq, 237 .ack = mask_and_ack_rise_edge_irq,
238 .mask = local_disable_irq, 238 .mask = local_disable_irq,
239 .mask_ack = mask_and_ack_rise_edge_irq, 239 .mask_ack = mask_and_ack_rise_edge_irq,
@@ -242,7 +242,7 @@ static struct irq_chip rise_edge_irq_type = {
242}; 242};
243 243
244static struct irq_chip fall_edge_irq_type = { 244static struct irq_chip fall_edge_irq_type = {
245 .typename = "Au1000 Fall Edge", 245 .name = "Au1000 Fall Edge",
246 .ack = mask_and_ack_fall_edge_irq, 246 .ack = mask_and_ack_fall_edge_irq,
247 .mask = local_disable_irq, 247 .mask = local_disable_irq,
248 .mask_ack = mask_and_ack_fall_edge_irq, 248 .mask_ack = mask_and_ack_fall_edge_irq,
@@ -251,7 +251,7 @@ static struct irq_chip fall_edge_irq_type = {
251}; 251};
252 252
253static struct irq_chip either_edge_irq_type = { 253static struct irq_chip either_edge_irq_type = {
254 .typename = "Au1000 Rise or Fall Edge", 254 .name = "Au1000 Rise or Fall Edge",
255 .ack = mask_and_ack_either_edge_irq, 255 .ack = mask_and_ack_either_edge_irq,
256 .mask = local_disable_irq, 256 .mask = local_disable_irq,
257 .mask_ack = mask_and_ack_either_edge_irq, 257 .mask_ack = mask_and_ack_either_edge_irq,
@@ -260,7 +260,7 @@ static struct irq_chip either_edge_irq_type = {
260}; 260};
261 261
262static struct irq_chip level_irq_type = { 262static struct irq_chip level_irq_type = {
263 .typename = "Au1000 Level", 263 .name = "Au1000 Level",
264 .ack = mask_and_ack_level_irq, 264 .ack = mask_and_ack_level_irq,
265 .mask = local_disable_irq, 265 .mask = local_disable_irq,
266 .mask_ack = mask_and_ack_level_irq, 266 .mask_ack = mask_and_ack_level_irq,
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index 9f8ce08e173b..6c25e6c09f78 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -76,13 +76,17 @@ static int __init au1x_pci_setup(void)
76 } 76 }
77 77
78#ifdef CONFIG_DMA_NONCOHERENT 78#ifdef CONFIG_DMA_NONCOHERENT
79 /* 79 {
80 * Set the NC bit in controller for Au1500 pre-AC silicon 80 /*
81 */ 81 * Set the NC bit in controller for Au1500 pre-AC silicon
82 u32 prid = read_c0_prid(); 82 */
83 if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) { 83 u32 prid = read_c0_prid();
84 au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG); 84
85 printk("Non-coherent PCI accesses enabled\n"); 85 if ((prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
86 au_writel((1 << 16) | au_readl(Au1500_PCI_CFG),
87 Au1500_PCI_CFG);
88 printk("Non-coherent PCI accesses enabled\n");
89 }
86 } 90 }
87#endif 91#endif
88 92
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index 7504a6364616..3901e8e04755 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -62,12 +62,6 @@ extern unsigned long save_local_and_disable(int controller);
62extern void restore_local_and_enable(int controller, unsigned long mask); 62extern void restore_local_and_enable(int controller, unsigned long mask);
63extern void local_enable_irq(unsigned int irq_nr); 63extern void local_enable_irq(unsigned int irq_nr);
64 64
65/* Quick acpi hack. This will have to change! */
66#define CTL_ACPI 9999
67#define ACPI_S1_SLP_TYP 19
68#define ACPI_SLEEP 21
69
70
71static DEFINE_SPINLOCK(pm_lock); 65static DEFINE_SPINLOCK(pm_lock);
72 66
73/* We need to save/restore a bunch of core registers that are 67/* We need to save/restore a bunch of core registers that are
@@ -425,15 +419,41 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
425 419
426 420
427static struct ctl_table pm_table[] = { 421static struct ctl_table pm_table[] = {
428 {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend}, 422 {
429 {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep}, 423 .ctl_name = CTL_UNNUMBERED,
430 {CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq}, 424 .procname = "suspend",
431 {0} 425 .data = NULL,
426 .maxlen = 0,
427 .mode = 0600,
428 .proc_handler = &pm_do_suspend
429 },
430 {
431 .ctl_name = CTL_UNNUMBERED,
432 .procname = "sleep",
433 .data = NULL,
434 .maxlen = 0,
435 .mode = 0600,
436 .proc_handler = &pm_do_sleep
437 },
438 {
439 .ctl_name = CTL_UNNUMBERED,
440 .procname = "freq",
441 .data = NULL,
442 .maxlen = 0,
443 .mode = 0600,
444 .proc_handler = &pm_do_freq
445 },
446 {}
432}; 447};
433 448
434static struct ctl_table pm_dir_table[] = { 449static struct ctl_table pm_dir_table[] = {
435 {CTL_ACPI, "pm", NULL, 0, 0555, pm_table}, 450 {
436 {0} 451 .ctl_name = CTL_UNNUMBERED,
452 .procname = "pm",
453 .mode = 0555,
454 .child = pm_table
455 },
456 {}
437}; 457};
438 458
439/* 459/*
@@ -441,7 +461,7 @@ static struct ctl_table pm_dir_table[] = {
441 */ 461 */
442static int __init pm_init(void) 462static int __init pm_init(void)
443{ 463{
444 register_sysctl_table(pm_dir_table, 1); 464 register_sysctl_table(pm_dir_table);
445 return 0; 465 return 0;
446} 466}
447 467
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c
index 6fce60af005d..a8637cdb5b4b 100644
--- a/arch/mips/au1000/common/prom.c
+++ b/arch/mips/au1000/common/prom.c
@@ -149,9 +149,8 @@ int get_ethernet_addr(char *ethernet_addr)
149 return 0; 149 return 0;
150} 150}
151 151
152unsigned long __init prom_free_prom_memory(void) 152void __init prom_free_prom_memory(void)
153{ 153{
154 return 0;
155} 154}
156 155
157EXPORT_SYMBOL(prom_getcmdline); 156EXPORT_SYMBOL(prom_getcmdline);
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index 919172db560c..13fe187f35d6 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -141,17 +141,20 @@ void __init plat_mem_setup(void)
141/* This routine should be valid for all Au1x based boards */ 141/* This routine should be valid for all Au1x based boards */
142phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) 142phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
143{ 143{
144 u32 start, end;
145
146 /* Don't fixup 36 bit addresses */ 144 /* Don't fixup 36 bit addresses */
147 if ((phys_addr >> 32) != 0) return phys_addr; 145 if ((phys_addr >> 32) != 0)
146 return phys_addr;
148 147
149#ifdef CONFIG_PCI 148#ifdef CONFIG_PCI
150 start = (u32)Au1500_PCI_MEM_START; 149 {
151 end = (u32)Au1500_PCI_MEM_END; 150 u32 start, end;
152 /* check for pci memory window */ 151
153 if ((phys_addr >= start) && ((phys_addr + size) < end)) { 152 start = (u32)Au1500_PCI_MEM_START;
154 return (phys_t)((phys_addr - start) + Au1500_PCI_MEM_START); 153 end = (u32)Au1500_PCI_MEM_END;
154 /* check for pci memory window */
155 if ((phys_addr >= start) && ((phys_addr + size) < end))
156 return (phys_t)
157 ((phys_addr - start) + Au1500_PCI_MEM_START);
155 } 158 }
156#endif 159#endif
157 160
diff --git a/arch/mips/au1000/pb1100/board_setup.c b/arch/mips/au1000/pb1100/board_setup.c
index 2d1533f116c0..6bc1f8e1b608 100644
--- a/arch/mips/au1000/pb1100/board_setup.c
+++ b/arch/mips/au1000/pb1100/board_setup.c
@@ -47,8 +47,7 @@ void board_reset (void)
47 47
48void __init board_setup(void) 48void __init board_setup(void)
49{ 49{
50 u32 pin_func; 50 volatile void __iomem * base = (volatile void __iomem *) 0xac000000UL;
51 u32 sys_freqctrl, sys_clksrc;
52 51
53 // set AUX clock to 12MHz * 8 = 96 MHz 52 // set AUX clock to 12MHz * 8 = 96 MHz
54 au_writel(8, SYS_AUXPLL); 53 au_writel(8, SYS_AUXPLL);
@@ -56,58 +55,62 @@ void __init board_setup(void)
56 udelay(100); 55 udelay(100);
57 56
58#ifdef CONFIG_USB_OHCI 57#ifdef CONFIG_USB_OHCI
59 // configure pins GPIO[14:9] as GPIO 58 {
60 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80); 59 u32 pin_func, sys_freqctrl, sys_clksrc;
61 60
62 /* zero and disable FREQ2 */ 61 // configure pins GPIO[14:9] as GPIO
63 sys_freqctrl = au_readl(SYS_FREQCTRL0); 62 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
64 sys_freqctrl &= ~0xFFF00000; 63
65 au_writel(sys_freqctrl, SYS_FREQCTRL0); 64 /* zero and disable FREQ2 */
66 65 sys_freqctrl = au_readl(SYS_FREQCTRL0);
67 /* zero and disable USBH/USBD/IrDA clock */ 66 sys_freqctrl &= ~0xFFF00000;
68 sys_clksrc = au_readl(SYS_CLKSRC); 67 au_writel(sys_freqctrl, SYS_FREQCTRL0);
69 sys_clksrc &= ~0x0000001F; 68
70 au_writel(sys_clksrc, SYS_CLKSRC); 69 /* zero and disable USBH/USBD/IrDA clock */
71 70 sys_clksrc = au_readl(SYS_CLKSRC);
72 sys_freqctrl = au_readl(SYS_FREQCTRL0); 71 sys_clksrc &= ~0x0000001F;
73 sys_freqctrl &= ~0xFFF00000; 72 au_writel(sys_clksrc, SYS_CLKSRC);
74 73
75 sys_clksrc = au_readl(SYS_CLKSRC); 74 sys_freqctrl = au_readl(SYS_FREQCTRL0);
76 sys_clksrc &= ~0x0000001F; 75 sys_freqctrl &= ~0xFFF00000;
77 76
78 // FREQ2 = aux/2 = 48 MHz 77 sys_clksrc = au_readl(SYS_CLKSRC);
79 sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20)); 78 sys_clksrc &= ~0x0000001F;
80 au_writel(sys_freqctrl, SYS_FREQCTRL0); 79
81 80 // FREQ2 = aux/2 = 48 MHz
82 /* 81 sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20));
83 * Route 48MHz FREQ2 into USBH/USBD/IrDA 82 au_writel(sys_freqctrl, SYS_FREQCTRL0);
84 */ 83
85 sys_clksrc |= ((4<<2) | (0<<1) | 0 ); 84 /*
86 au_writel(sys_clksrc, SYS_CLKSRC); 85 * Route 48MHz FREQ2 into USBH/USBD/IrDA
87 86 */
88 /* setup the static bus controller */ 87 sys_clksrc |= ((4<<2) | (0<<1) | 0 );
89 au_writel(0x00000002, MEM_STCFG3); /* type = PCMCIA */ 88 au_writel(sys_clksrc, SYS_CLKSRC);
90 au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */ 89
91 au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */ 90 /* setup the static bus controller */
92 91 au_writel(0x00000002, MEM_STCFG3); /* type = PCMCIA */
93 // get USB Functionality pin state (device vs host drive pins) 92 au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */
94 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); 93 au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */
95 // 2nd USB port is USB host 94
96 pin_func |= 0x8000; 95 // get USB Functionality pin state (device vs host drive pins)
97 au_writel(pin_func, SYS_PINFUNC); 96 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
97 // 2nd USB port is USB host
98 pin_func |= 0x8000;
99 au_writel(pin_func, SYS_PINFUNC);
100 }
98#endif // defined (CONFIG_USB_OHCI) 101#endif // defined (CONFIG_USB_OHCI)
99 102
100 /* Enable sys bus clock divider when IDLE state or no bus activity. */ 103 /* Enable sys bus clock divider when IDLE state or no bus activity. */
101 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); 104 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
102 105
103 // Enable the RTC if not already enabled 106 // Enable the RTC if not already enabled
104 if (!(readb(0xac000028) & 0x20)) { 107 if (!(readb(base + 0x28) & 0x20)) {
105 writeb(readb(0xac000028) | 0x20, 0xac000028); 108 writeb(readb(base + 0x28) | 0x20, base + 0x28);
106 au_sync(); 109 au_sync();
107 } 110 }
108 // Put the clock in BCD mode 111 // Put the clock in BCD mode
109 if (readb(0xac00002C) & 0x4) { /* reg B */ 112 if (readb(base + 0x2C) & 0x4) { /* reg B */
110 writeb(readb(0xac00002c) & ~0x4, 0xac00002c); 113 writeb(readb(base + 0x2c) & ~0x4, base + 0x2c);
111 au_sync(); 114 au_sync();
112 } 115 }
113} 116}
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index 91983ba407c4..b73b2d18bf56 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -137,33 +137,20 @@ static void pb1200_shutdown_irq( unsigned int irq_nr )
137 return; 137 return;
138} 138}
139 139
140static inline void pb1200_mask_and_ack_irq(unsigned int irq_nr)
141{
142 pb1200_disable_irq( irq_nr );
143}
144
145static void pb1200_end_irq(unsigned int irq_nr)
146{
147 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
148 pb1200_enable_irq(irq_nr);
149 }
150}
151
152static struct irq_chip external_irq_type = 140static struct irq_chip external_irq_type =
153{ 141{
154#ifdef CONFIG_MIPS_PB1200 142#ifdef CONFIG_MIPS_PB1200
155 "Pb1200 Ext", 143 .name = "Pb1200 Ext",
156#endif 144#endif
157#ifdef CONFIG_MIPS_DB1200 145#ifdef CONFIG_MIPS_DB1200
158 "Db1200 Ext", 146 .name = "Db1200 Ext",
159#endif 147#endif
160 pb1200_startup_irq, 148 .startup = pb1200_startup_irq,
161 pb1200_shutdown_irq, 149 .shutdown = pb1200_shutdown_irq,
162 pb1200_enable_irq, 150 .ack = pb1200_disable_irq,
163 pb1200_disable_irq, 151 .mask = pb1200_disable_irq,
164 pb1200_mask_and_ack_irq, 152 .mask_ack = pb1200_disable_irq,
165 pb1200_end_irq, 153 .unmask = pb1200_enable_irq,
166 NULL
167}; 154};
168 155
169void _board_init_irq(void) 156void _board_init_irq(void)
@@ -172,7 +159,8 @@ void _board_init_irq(void)
172 159
173 for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) 160 for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++)
174 { 161 {
175 irq_desc[irq_nr].chip = &external_irq_type; 162 set_irq_chip_and_handler(irq_nr, &external_irq_type,
163 handle_level_irq);
176 pb1200_disable_irq(irq_nr); 164 pb1200_disable_irq(irq_nr);
177 } 165 }
178 166
diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c
index 2e2061a286c5..1ecab6350421 100644
--- a/arch/mips/basler/excite/excite_irq.c
+++ b/arch/mips/basler/excite/excite_irq.c
@@ -47,9 +47,9 @@ extern asmlinkage void excite_handle_int(void);
47 */ 47 */
48void __init arch_init_irq(void) 48void __init arch_init_irq(void)
49{ 49{
50 mips_cpu_irq_init(0); 50 mips_cpu_irq_init();
51 rm7k_cpu_irq_init(8); 51 rm7k_cpu_irq_init();
52 rm9k_cpu_irq_init(12); 52 rm9k_cpu_irq_init();
53 53
54#ifdef CONFIG_KGDB 54#ifdef CONFIG_KGDB
55 excite_kgdb_init(); 55 excite_kgdb_init();
diff --git a/arch/mips/cobalt/Makefile b/arch/mips/cobalt/Makefile
index 225ac8f34ccd..12589a1ff048 100644
--- a/arch/mips/cobalt/Makefile
+++ b/arch/mips/cobalt/Makefile
@@ -5,5 +5,6 @@
5obj-y := irq.o reset.o setup.o 5obj-y := irq.o reset.o setup.o
6 6
7obj-$(CONFIG_EARLY_PRINTK) += console.o 7obj-$(CONFIG_EARLY_PRINTK) += console.o
8obj-$(CONFIG_MTD_PHYSMAP) += mtd.o
8 9
9EXTRA_AFLAGS := $(CFLAGS) 10EXTRA_AFLAGS := $(CFLAGS)
diff --git a/arch/mips/cobalt/irq.c b/arch/mips/cobalt/irq.c
index 4c46f0e73783..fe93b846923b 100644
--- a/arch/mips/cobalt/irq.c
+++ b/arch/mips/cobalt/irq.c
@@ -104,7 +104,7 @@ void __init arch_init_irq(void)
104 GT_WRITE(GT_INTRMASK_OFS, 0); 104 GT_WRITE(GT_INTRMASK_OFS, 0);
105 105
106 init_i8259_irqs(); /* 0 ... 15 */ 106 init_i8259_irqs(); /* 0 ... 15 */
107 mips_cpu_irq_init(COBALT_CPU_IRQ); /* 16 ... 23 */ 107 mips_cpu_irq_init(); /* 16 ... 23 */
108 108
109 /* 109 /*
110 * Mask all cpu interrupts 110 * Mask all cpu interrupts
diff --git a/arch/mips/cobalt/mtd.c b/arch/mips/cobalt/mtd.c
new file mode 100644
index 000000000000..2b088ef3839a
--- /dev/null
+++ b/arch/mips/cobalt/mtd.c
@@ -0,0 +1,61 @@
1/*
2 * Registration of Cobalt MTD device.
3 *
4 * Copyright (C) 2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/init.h>
21#include <linux/platform_device.h>
22#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h>
24
25static struct mtd_partition cobalt_mtd_partitions[] = {
26 {
27 .name = "firmware",
28 .offset = 0x0,
29 .size = 0x80000,
30 },
31};
32
33static struct physmap_flash_data cobalt_flash_data = {
34 .width = 1,
35 .nr_parts = 1,
36 .parts = cobalt_mtd_partitions,
37};
38
39static struct resource cobalt_mtd_resource = {
40 .start = 0x1fc00000,
41 .end = 0x1fc7ffff,
42 .flags = IORESOURCE_MEM,
43};
44
45static struct platform_device cobalt_mtd = {
46 .name = "physmap-flash",
47 .dev = {
48 .platform_data = &cobalt_flash_data,
49 },
50 .num_resources = 1,
51 .resource = &cobalt_mtd_resource,
52};
53
54static int __init cobalt_mtd_init(void)
55{
56 platform_device_register(&cobalt_mtd);
57
58 return 0;
59}
60
61module_init(cobalt_mtd_init);
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index e8f0f20b852d..415ff8710b55 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -130,7 +130,7 @@ void __init plat_mem_setup(void)
130 130
131 set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE)); 131 set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE));
132 132
133 /* I/O port resource must include UART and LCD/buttons */ 133 /* I/O port resource must include LCD/buttons */
134 ioport_resource.end = 0x0fffffff; 134 ioport_resource.end = 0x0fffffff;
135 135
136 /* request I/O space for devices used on all i[345]86 PCs */ 136 /* request I/O space for devices used on all i[345]86 PCs */
@@ -149,24 +149,24 @@ void __init plat_mem_setup(void)
149 register_pci_controller(&cobalt_pci_controller); 149 register_pci_controller(&cobalt_pci_controller);
150#endif 150#endif
151 151
152#ifdef CONFIG_SERIAL_8250
153 if (cobalt_board_id > COBALT_BRD_ID_RAQ1) { 152 if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
154
155#ifdef CONFIG_EARLY_PRINTK 153#ifdef CONFIG_EARLY_PRINTK
156 cobalt_early_console(); 154 cobalt_early_console();
157#endif 155#endif
158 156
157#ifdef CONFIG_SERIAL_8250
159 uart.line = 0; 158 uart.line = 0;
160 uart.type = PORT_UNKNOWN; 159 uart.type = PORT_UNKNOWN;
161 uart.uartclk = 18432000; 160 uart.uartclk = 18432000;
162 uart.irq = COBALT_SERIAL_IRQ; 161 uart.irq = COBALT_SERIAL_IRQ;
163 uart.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 162 uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF |
164 uart.iobase = 0xc800000; 163 UPF_SKIP_TEST;
165 uart.iotype = UPIO_PORT; 164 uart.iotype = UPIO_MEM;
165 uart.mapbase = 0x1c800000;
166 166
167 early_serial_setup(&uart); 167 early_serial_setup(&uart);
168 }
169#endif 168#endif
169 }
170} 170}
171 171
172/* 172/*
@@ -204,8 +204,7 @@ void __init prom_init(void)
204 add_memory_region(0x0, memsz, BOOT_MEM_RAM); 204 add_memory_region(0x0, memsz, BOOT_MEM_RAM);
205} 205}
206 206
207unsigned long __init prom_free_prom_memory(void) 207void __init prom_free_prom_memory(void)
208{ 208{
209 /* Nothing to do! */ 209 /* Nothing to do! */
210 return 0;
211} 210}
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig
index ac1891687520..458894933a4c 100644
--- a/arch/mips/configs/atlas_defconfig
+++ b/arch/mips/configs/atlas_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 09:59:39 2006 4# Sun Feb 18 21:27:35 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32CONFIG_MIPS_ATLAS=y 31CONFIG_MIPS_ATLAS=y
@@ -42,6 +41,7 @@ CONFIG_MIPS_ATLAS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MIPS_ATLAS=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_MIPS_BONITO64=y 77CONFIG_MIPS_BONITO64=y
@@ -129,16 +133,18 @@ CONFIG_BOARD_SCACHE=y
129CONFIG_RM7000_CPU_SCACHE=y 133CONFIG_RM7000_CPU_SCACHE=y
130CONFIG_CPU_HAS_PREFETCH=y 134CONFIG_CPU_HAS_PREFETCH=y
131CONFIG_MIPS_MT_DISABLED=y 135CONFIG_MIPS_MT_DISABLED=y
132# CONFIG_MIPS_MT_SMTC is not set
133# CONFIG_MIPS_MT_SMP is not set 136# CONFIG_MIPS_MT_SMP is not set
137# CONFIG_MIPS_MT_SMTC is not set
134# CONFIG_MIPS_VPE_LOADER is not set 138# CONFIG_MIPS_VPE_LOADER is not set
135CONFIG_SYS_SUPPORTS_MULTITHREADING=y 139CONFIG_SYS_SUPPORTS_MULTITHREADING=y
136# CONFIG_64BIT_PHYS_ADDR is not set 140# CONFIG_64BIT_PHYS_ADDR is not set
137CONFIG_CPU_HAS_LLSC=y 141CONFIG_CPU_HAS_LLSC=y
142# CONFIG_CPU_HAS_SMARTMIPS is not set
138CONFIG_CPU_HAS_SYNC=y 143CONFIG_CPU_HAS_SYNC=y
139CONFIG_GENERIC_HARDIRQS=y 144CONFIG_GENERIC_HARDIRQS=y
140CONFIG_GENERIC_IRQ_PROBE=y 145CONFIG_GENERIC_IRQ_PROBE=y
141CONFIG_CPU_SUPPORTS_HIGHMEM=y 146CONFIG_CPU_SUPPORTS_HIGHMEM=y
147CONFIG_SYS_SUPPORTS_SMARTMIPS=y
142CONFIG_ARCH_FLATMEM_ENABLE=y 148CONFIG_ARCH_FLATMEM_ENABLE=y
143CONFIG_SELECT_MEMORY_MODEL=y 149CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y 150CONFIG_FLATMEM_MANUAL=y
@@ -149,6 +155,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
149# CONFIG_SPARSEMEM_STATIC is not set 155# CONFIG_SPARSEMEM_STATIC is not set
150CONFIG_SPLIT_PTLOCK_CPUS=4 156CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set 157# CONFIG_RESOURCES_64BIT is not set
158CONFIG_ZONE_DMA_FLAG=1
152# CONFIG_HZ_48 is not set 159# CONFIG_HZ_48 is not set
153CONFIG_HZ_100=y 160CONFIG_HZ_100=y
154# CONFIG_HZ_128 is not set 161# CONFIG_HZ_128 is not set
@@ -161,6 +168,7 @@ CONFIG_HZ=100
161CONFIG_PREEMPT_NONE=y 168CONFIG_PREEMPT_NONE=y
162# CONFIG_PREEMPT_VOLUNTARY is not set 169# CONFIG_PREEMPT_VOLUNTARY is not set
163# CONFIG_PREEMPT is not set 170# CONFIG_PREEMPT is not set
171# CONFIG_KEXEC is not set
164CONFIG_LOCKDEP_SUPPORT=y 172CONFIG_LOCKDEP_SUPPORT=y
165CONFIG_STACKTRACE_SUPPORT=y 173CONFIG_STACKTRACE_SUPPORT=y
166CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 174CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -179,15 +187,20 @@ CONFIG_LOCALVERSION=""
179CONFIG_LOCALVERSION_AUTO=y 187CONFIG_LOCALVERSION_AUTO=y
180CONFIG_SWAP=y 188CONFIG_SWAP=y
181CONFIG_SYSVIPC=y 189CONFIG_SYSVIPC=y
190# CONFIG_IPC_NS is not set
191CONFIG_SYSVIPC_SYSCTL=y
182# CONFIG_POSIX_MQUEUE is not set 192# CONFIG_POSIX_MQUEUE is not set
183# CONFIG_BSD_PROCESS_ACCT is not set 193# CONFIG_BSD_PROCESS_ACCT is not set
184CONFIG_SYSCTL=y 194# CONFIG_TASKSTATS is not set
195# CONFIG_UTS_NS is not set
185# CONFIG_AUDIT is not set 196# CONFIG_AUDIT is not set
186# CONFIG_IKCONFIG is not set 197# CONFIG_IKCONFIG is not set
198CONFIG_SYSFS_DEPRECATED=y
187CONFIG_RELAY=y 199CONFIG_RELAY=y
188CONFIG_INITRAMFS_SOURCE=""
189# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 200# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
201CONFIG_SYSCTL=y
190CONFIG_EMBEDDED=y 202CONFIG_EMBEDDED=y
203CONFIG_SYSCTL_SYSCALL=y
191CONFIG_KALLSYMS=y 204CONFIG_KALLSYMS=y
192# CONFIG_KALLSYMS_EXTRA_PASS is not set 205# CONFIG_KALLSYMS_EXTRA_PASS is not set
193CONFIG_HOTPLUG=y 206CONFIG_HOTPLUG=y
@@ -195,12 +208,12 @@ CONFIG_PRINTK=y
195CONFIG_BUG=y 208CONFIG_BUG=y
196CONFIG_ELF_CORE=y 209CONFIG_ELF_CORE=y
197CONFIG_BASE_FULL=y 210CONFIG_BASE_FULL=y
198CONFIG_RT_MUTEXES=y
199CONFIG_FUTEX=y 211CONFIG_FUTEX=y
200CONFIG_EPOLL=y 212CONFIG_EPOLL=y
201CONFIG_SHMEM=y 213CONFIG_SHMEM=y
202CONFIG_SLAB=y 214CONFIG_SLAB=y
203CONFIG_VM_EVENT_COUNTERS=y 215CONFIG_VM_EVENT_COUNTERS=y
216CONFIG_RT_MUTEXES=y
204# CONFIG_TINY_SHMEM is not set 217# CONFIG_TINY_SHMEM is not set
205CONFIG_BASE_SMALL=0 218CONFIG_BASE_SMALL=0
206# CONFIG_SLOB is not set 219# CONFIG_SLOB is not set
@@ -218,6 +231,7 @@ CONFIG_KMOD=y
218# 231#
219# Block layer 232# Block layer
220# 233#
234CONFIG_BLOCK=y
221# CONFIG_LBD is not set 235# CONFIG_LBD is not set
222# CONFIG_BLK_DEV_IO_TRACE is not set 236# CONFIG_BLK_DEV_IO_TRACE is not set
223# CONFIG_LSF is not set 237# CONFIG_LSF is not set
@@ -260,6 +274,14 @@ CONFIG_BINFMT_ELF=y
260CONFIG_TRAD_SIGNALS=y 274CONFIG_TRAD_SIGNALS=y
261 275
262# 276#
277# Power management options
278#
279CONFIG_PM=y
280# CONFIG_PM_LEGACY is not set
281# CONFIG_PM_DEBUG is not set
282# CONFIG_PM_SYSFS_DEPRECATED is not set
283
284#
263# Networking 285# Networking
264# 286#
265CONFIG_NET=y 287CONFIG_NET=y
@@ -273,7 +295,10 @@ CONFIG_PACKET_MMAP=y
273CONFIG_UNIX=y 295CONFIG_UNIX=y
274CONFIG_XFRM=y 296CONFIG_XFRM=y
275CONFIG_XFRM_USER=m 297CONFIG_XFRM_USER=m
298# CONFIG_XFRM_SUB_POLICY is not set
299CONFIG_XFRM_MIGRATE=y
276CONFIG_NET_KEY=y 300CONFIG_NET_KEY=y
301CONFIG_NET_KEY_MIGRATE=y
277CONFIG_INET=y 302CONFIG_INET=y
278CONFIG_IP_MULTICAST=y 303CONFIG_IP_MULTICAST=y
279CONFIG_IP_ADVANCED_ROUTER=y 304CONFIG_IP_ADVANCED_ROUTER=y
@@ -281,7 +306,6 @@ CONFIG_ASK_IP_FIB_HASH=y
281# CONFIG_IP_FIB_TRIE is not set 306# CONFIG_IP_FIB_TRIE is not set
282CONFIG_IP_FIB_HASH=y 307CONFIG_IP_FIB_HASH=y
283CONFIG_IP_MULTIPLE_TABLES=y 308CONFIG_IP_MULTIPLE_TABLES=y
284CONFIG_IP_ROUTE_FWMARK=y
285CONFIG_IP_ROUTE_MULTIPATH=y 309CONFIG_IP_ROUTE_MULTIPATH=y
286# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set 310# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
287CONFIG_IP_ROUTE_VERBOSE=y 311CONFIG_IP_ROUTE_VERBOSE=y
@@ -304,10 +328,13 @@ CONFIG_INET_XFRM_TUNNEL=m
304CONFIG_INET_TUNNEL=m 328CONFIG_INET_TUNNEL=m
305CONFIG_INET_XFRM_MODE_TRANSPORT=m 329CONFIG_INET_XFRM_MODE_TRANSPORT=m
306CONFIG_INET_XFRM_MODE_TUNNEL=m 330CONFIG_INET_XFRM_MODE_TUNNEL=m
331CONFIG_INET_XFRM_MODE_BEET=m
307CONFIG_INET_DIAG=y 332CONFIG_INET_DIAG=y
308CONFIG_INET_TCP_DIAG=y 333CONFIG_INET_TCP_DIAG=y
309# CONFIG_TCP_CONG_ADVANCED is not set 334# CONFIG_TCP_CONG_ADVANCED is not set
310CONFIG_TCP_CONG_BIC=y 335CONFIG_TCP_CONG_CUBIC=y
336CONFIG_DEFAULT_TCP_CONG="cubic"
337CONFIG_TCP_MD5SIG=y
311 338
312# 339#
313# IP: Virtual Server Configuration 340# IP: Virtual Server Configuration
@@ -349,11 +376,17 @@ CONFIG_IPV6_ROUTE_INFO=y
349CONFIG_INET6_AH=m 376CONFIG_INET6_AH=m
350CONFIG_INET6_ESP=m 377CONFIG_INET6_ESP=m
351CONFIG_INET6_IPCOMP=m 378CONFIG_INET6_IPCOMP=m
379CONFIG_IPV6_MIP6=y
352CONFIG_INET6_XFRM_TUNNEL=m 380CONFIG_INET6_XFRM_TUNNEL=m
353CONFIG_INET6_TUNNEL=m 381CONFIG_INET6_TUNNEL=m
354CONFIG_INET6_XFRM_MODE_TRANSPORT=m 382CONFIG_INET6_XFRM_MODE_TRANSPORT=m
355CONFIG_INET6_XFRM_MODE_TUNNEL=m 383CONFIG_INET6_XFRM_MODE_TUNNEL=m
384CONFIG_INET6_XFRM_MODE_BEET=m
385CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
386CONFIG_IPV6_SIT=m
356CONFIG_IPV6_TUNNEL=m 387CONFIG_IPV6_TUNNEL=m
388CONFIG_IPV6_MULTIPLE_TABLES=y
389CONFIG_IPV6_SUBTREES=y
357CONFIG_NETWORK_SECMARK=y 390CONFIG_NETWORK_SECMARK=y
358CONFIG_NETFILTER=y 391CONFIG_NETFILTER=y
359# CONFIG_NETFILTER_DEBUG is not set 392# CONFIG_NETFILTER_DEBUG is not set
@@ -365,19 +398,43 @@ CONFIG_BRIDGE_NETFILTER=y
365CONFIG_NETFILTER_NETLINK=m 398CONFIG_NETFILTER_NETLINK=m
366CONFIG_NETFILTER_NETLINK_QUEUE=m 399CONFIG_NETFILTER_NETLINK_QUEUE=m
367CONFIG_NETFILTER_NETLINK_LOG=m 400CONFIG_NETFILTER_NETLINK_LOG=m
401CONFIG_NF_CONNTRACK_ENABLED=m
402CONFIG_NF_CONNTRACK_SUPPORT=y
403# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
404CONFIG_NF_CONNTRACK=m
405CONFIG_NF_CT_ACCT=y
406CONFIG_NF_CONNTRACK_MARK=y
407CONFIG_NF_CONNTRACK_SECMARK=y
408CONFIG_NF_CONNTRACK_EVENTS=y
409CONFIG_NF_CT_PROTO_GRE=m
410CONFIG_NF_CT_PROTO_SCTP=m
411CONFIG_NF_CONNTRACK_AMANDA=m
412CONFIG_NF_CONNTRACK_FTP=m
413CONFIG_NF_CONNTRACK_H323=m
414CONFIG_NF_CONNTRACK_IRC=m
415# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
416CONFIG_NF_CONNTRACK_PPTP=m
417CONFIG_NF_CONNTRACK_SANE=m
418CONFIG_NF_CONNTRACK_SIP=m
419CONFIG_NF_CONNTRACK_TFTP=m
420CONFIG_NF_CT_NETLINK=m
368CONFIG_NETFILTER_XTABLES=m 421CONFIG_NETFILTER_XTABLES=m
369CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 422CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
370CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 423CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
424CONFIG_NETFILTER_XT_TARGET_DSCP=m
371CONFIG_NETFILTER_XT_TARGET_MARK=m 425CONFIG_NETFILTER_XT_TARGET_MARK=m
372CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 426CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
427CONFIG_NETFILTER_XT_TARGET_NFLOG=m
373CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 428CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
374CONFIG_NETFILTER_XT_TARGET_SECMARK=m 429CONFIG_NETFILTER_XT_TARGET_SECMARK=m
375CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 430CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
431CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
376CONFIG_NETFILTER_XT_MATCH_COMMENT=m 432CONFIG_NETFILTER_XT_MATCH_COMMENT=m
377CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 433CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
378CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 434CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
379CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 435CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
380CONFIG_NETFILTER_XT_MATCH_DCCP=m 436CONFIG_NETFILTER_XT_MATCH_DCCP=m
437CONFIG_NETFILTER_XT_MATCH_DSCP=m
381CONFIG_NETFILTER_XT_MATCH_ESP=m 438CONFIG_NETFILTER_XT_MATCH_ESP=m
382CONFIG_NETFILTER_XT_MATCH_HELPER=m 439CONFIG_NETFILTER_XT_MATCH_HELPER=m
383CONFIG_NETFILTER_XT_MATCH_LENGTH=m 440CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -395,60 +452,45 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
395CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 452CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
396CONFIG_NETFILTER_XT_MATCH_STRING=m 453CONFIG_NETFILTER_XT_MATCH_STRING=m
397CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 454CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
455CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
398 456
399# 457#
400# IP: Netfilter Configuration 458# IP: Netfilter Configuration
401# 459#
402CONFIG_IP_NF_CONNTRACK=m 460CONFIG_NF_CONNTRACK_IPV4=m
403CONFIG_IP_NF_CT_ACCT=y 461CONFIG_NF_CONNTRACK_PROC_COMPAT=y
404CONFIG_IP_NF_CONNTRACK_MARK=y
405CONFIG_IP_NF_CONNTRACK_SECMARK=y
406CONFIG_IP_NF_CONNTRACK_EVENTS=y
407CONFIG_IP_NF_CONNTRACK_NETLINK=m
408CONFIG_IP_NF_CT_PROTO_SCTP=m
409CONFIG_IP_NF_FTP=m
410CONFIG_IP_NF_IRC=m
411# CONFIG_IP_NF_NETBIOS_NS is not set
412CONFIG_IP_NF_TFTP=m
413CONFIG_IP_NF_AMANDA=m
414CONFIG_IP_NF_PPTP=m
415CONFIG_IP_NF_H323=m
416CONFIG_IP_NF_SIP=m
417CONFIG_IP_NF_QUEUE=m 462CONFIG_IP_NF_QUEUE=m
418CONFIG_IP_NF_IPTABLES=m 463CONFIG_IP_NF_IPTABLES=m
419CONFIG_IP_NF_MATCH_IPRANGE=m 464CONFIG_IP_NF_MATCH_IPRANGE=m
420CONFIG_IP_NF_MATCH_TOS=m 465CONFIG_IP_NF_MATCH_TOS=m
421CONFIG_IP_NF_MATCH_RECENT=m 466CONFIG_IP_NF_MATCH_RECENT=m
422CONFIG_IP_NF_MATCH_ECN=m 467CONFIG_IP_NF_MATCH_ECN=m
423CONFIG_IP_NF_MATCH_DSCP=m
424CONFIG_IP_NF_MATCH_AH=m 468CONFIG_IP_NF_MATCH_AH=m
425CONFIG_IP_NF_MATCH_TTL=m 469CONFIG_IP_NF_MATCH_TTL=m
426CONFIG_IP_NF_MATCH_OWNER=m 470CONFIG_IP_NF_MATCH_OWNER=m
427CONFIG_IP_NF_MATCH_ADDRTYPE=m 471CONFIG_IP_NF_MATCH_ADDRTYPE=m
428CONFIG_IP_NF_MATCH_HASHLIMIT=m
429CONFIG_IP_NF_FILTER=m 472CONFIG_IP_NF_FILTER=m
430CONFIG_IP_NF_TARGET_REJECT=m 473CONFIG_IP_NF_TARGET_REJECT=m
431CONFIG_IP_NF_TARGET_LOG=m 474CONFIG_IP_NF_TARGET_LOG=m
432CONFIG_IP_NF_TARGET_ULOG=m 475CONFIG_IP_NF_TARGET_ULOG=m
433CONFIG_IP_NF_TARGET_TCPMSS=m 476CONFIG_NF_NAT=m
434CONFIG_IP_NF_NAT=m 477CONFIG_NF_NAT_NEEDED=y
435CONFIG_IP_NF_NAT_NEEDED=y
436CONFIG_IP_NF_TARGET_MASQUERADE=m 478CONFIG_IP_NF_TARGET_MASQUERADE=m
437CONFIG_IP_NF_TARGET_REDIRECT=m 479CONFIG_IP_NF_TARGET_REDIRECT=m
438CONFIG_IP_NF_TARGET_NETMAP=m 480CONFIG_IP_NF_TARGET_NETMAP=m
439CONFIG_IP_NF_TARGET_SAME=m 481CONFIG_IP_NF_TARGET_SAME=m
440# CONFIG_IP_NF_NAT_SNMP_BASIC is not set 482CONFIG_NF_NAT_SNMP_BASIC=m
441CONFIG_IP_NF_NAT_IRC=m 483CONFIG_NF_NAT_PROTO_GRE=m
442CONFIG_IP_NF_NAT_FTP=m 484CONFIG_NF_NAT_FTP=m
443CONFIG_IP_NF_NAT_TFTP=m 485CONFIG_NF_NAT_IRC=m
444CONFIG_IP_NF_NAT_AMANDA=m 486CONFIG_NF_NAT_TFTP=m
445CONFIG_IP_NF_NAT_PPTP=m 487CONFIG_NF_NAT_AMANDA=m
446CONFIG_IP_NF_NAT_H323=m 488CONFIG_NF_NAT_PPTP=m
447CONFIG_IP_NF_NAT_SIP=m 489CONFIG_NF_NAT_H323=m
490CONFIG_NF_NAT_SIP=m
448CONFIG_IP_NF_MANGLE=m 491CONFIG_IP_NF_MANGLE=m
449CONFIG_IP_NF_TARGET_TOS=m 492CONFIG_IP_NF_TARGET_TOS=m
450CONFIG_IP_NF_TARGET_ECN=m 493CONFIG_IP_NF_TARGET_ECN=m
451CONFIG_IP_NF_TARGET_DSCP=m
452CONFIG_IP_NF_TARGET_TTL=m 494CONFIG_IP_NF_TARGET_TTL=m
453# CONFIG_IP_NF_TARGET_CLUSTERIP is not set 495# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
454CONFIG_IP_NF_RAW=m 496CONFIG_IP_NF_RAW=m
@@ -459,6 +501,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
459# 501#
460# IPv6: Netfilter Configuration (EXPERIMENTAL) 502# IPv6: Netfilter Configuration (EXPERIMENTAL)
461# 503#
504CONFIG_NF_CONNTRACK_IPV6=m
462CONFIG_IP6_NF_QUEUE=m 505CONFIG_IP6_NF_QUEUE=m
463CONFIG_IP6_NF_IPTABLES=m 506CONFIG_IP6_NF_IPTABLES=m
464CONFIG_IP6_NF_MATCH_RT=m 507CONFIG_IP6_NF_MATCH_RT=m
@@ -468,6 +511,7 @@ CONFIG_IP6_NF_MATCH_HL=m
468CONFIG_IP6_NF_MATCH_OWNER=m 511CONFIG_IP6_NF_MATCH_OWNER=m
469CONFIG_IP6_NF_MATCH_IPV6HEADER=m 512CONFIG_IP6_NF_MATCH_IPV6HEADER=m
470CONFIG_IP6_NF_MATCH_AH=m 513CONFIG_IP6_NF_MATCH_AH=m
514CONFIG_IP6_NF_MATCH_MH=m
471CONFIG_IP6_NF_MATCH_EUI64=m 515CONFIG_IP6_NF_MATCH_EUI64=m
472CONFIG_IP6_NF_FILTER=m 516CONFIG_IP6_NF_FILTER=m
473CONFIG_IP6_NF_TARGET_LOG=m 517CONFIG_IP6_NF_TARGET_LOG=m
@@ -527,13 +571,12 @@ CONFIG_LLC=m
527# CONFIG_LLC2 is not set 571# CONFIG_LLC2 is not set
528# CONFIG_IPX is not set 572# CONFIG_IPX is not set
529CONFIG_ATALK=m 573CONFIG_ATALK=m
530CONFIG_DEV_APPLETALK=y 574CONFIG_DEV_APPLETALK=m
531CONFIG_IPDDP=m 575CONFIG_IPDDP=m
532CONFIG_IPDDP_ENCAP=y 576CONFIG_IPDDP_ENCAP=y
533CONFIG_IPDDP_DECAP=y 577CONFIG_IPDDP_DECAP=y
534# CONFIG_X25 is not set 578# CONFIG_X25 is not set
535# CONFIG_LAPB is not set 579# CONFIG_LAPB is not set
536CONFIG_NET_DIVERT=y
537# CONFIG_ECONET is not set 580# CONFIG_ECONET is not set
538# CONFIG_WAN_ROUTER is not set 581# CONFIG_WAN_ROUTER is not set
539 582
@@ -541,6 +584,7 @@ CONFIG_NET_DIVERT=y
541# QoS and/or fair queueing 584# QoS and/or fair queueing
542# 585#
543CONFIG_NET_SCHED=y 586CONFIG_NET_SCHED=y
587CONFIG_NET_SCH_FIFO=y
544CONFIG_NET_SCH_CLK_JIFFIES=y 588CONFIG_NET_SCH_CLK_JIFFIES=y
545# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 589# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
546# CONFIG_NET_SCH_CLK_CPU is not set 590# CONFIG_NET_SCH_CLK_CPU is not set
@@ -595,6 +639,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
595CONFIG_IEEE80211_SOFTMAC=m 639CONFIG_IEEE80211_SOFTMAC=m
596# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 640# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
597CONFIG_WIRELESS_EXT=y 641CONFIG_WIRELESS_EXT=y
642CONFIG_FIB_RULES=y
598 643
599# 644#
600# Device Drivers 645# Device Drivers
@@ -642,6 +687,7 @@ CONFIG_BLK_DEV_NBD=m
642CONFIG_BLK_DEV_RAM=y 687CONFIG_BLK_DEV_RAM=y
643CONFIG_BLK_DEV_RAM_COUNT=16 688CONFIG_BLK_DEV_RAM_COUNT=16
644CONFIG_BLK_DEV_RAM_SIZE=4096 689CONFIG_BLK_DEV_RAM_SIZE=4096
690CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
645# CONFIG_BLK_DEV_INITRD is not set 691# CONFIG_BLK_DEV_INITRD is not set
646CONFIG_CDROM_PKTCDVD=m 692CONFIG_CDROM_PKTCDVD=m
647CONFIG_CDROM_PKTCDVD_BUFFERS=8 693CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -649,9 +695,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
649CONFIG_ATA_OVER_ETH=m 695CONFIG_ATA_OVER_ETH=m
650 696
651# 697#
698# Misc devices
699#
700CONFIG_SGI_IOC4=m
701# CONFIG_TIFM_CORE is not set
702
703#
652# ATA/ATAPI/MFM/RLL support 704# ATA/ATAPI/MFM/RLL support
653# 705#
654CONFIG_IDE=y 706CONFIG_IDE=y
707CONFIG_IDE_MAX_HWIFS=4
655CONFIG_BLK_DEV_IDE=y 708CONFIG_BLK_DEV_IDE=y
656 709
657# 710#
@@ -681,6 +734,8 @@ CONFIG_IDE_GENERIC=y
681# 734#
682CONFIG_RAID_ATTRS=m 735CONFIG_RAID_ATTRS=m
683CONFIG_SCSI=y 736CONFIG_SCSI=y
737CONFIG_SCSI_TGT=m
738CONFIG_SCSI_NETLINK=y
684CONFIG_SCSI_PROC_FS=y 739CONFIG_SCSI_PROC_FS=y
685 740
686# 741#
@@ -700,14 +755,17 @@ CONFIG_CHR_DEV_SCH=m
700CONFIG_SCSI_MULTI_LUN=y 755CONFIG_SCSI_MULTI_LUN=y
701CONFIG_SCSI_CONSTANTS=y 756CONFIG_SCSI_CONSTANTS=y
702CONFIG_SCSI_LOGGING=y 757CONFIG_SCSI_LOGGING=y
758CONFIG_SCSI_SCAN_ASYNC=y
703 759
704# 760#
705# SCSI Transport Attributes 761# SCSI Transports
706# 762#
707CONFIG_SCSI_SPI_ATTRS=y 763CONFIG_SCSI_SPI_ATTRS=y
708CONFIG_SCSI_FC_ATTRS=y 764CONFIG_SCSI_FC_ATTRS=y
709CONFIG_SCSI_ISCSI_ATTRS=m 765CONFIG_SCSI_ISCSI_ATTRS=m
710CONFIG_SCSI_SAS_ATTRS=m 766CONFIG_SCSI_SAS_ATTRS=m
767CONFIG_SCSI_SAS_LIBSAS=m
768CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
711 769
712# 770#
713# SCSI low-level drivers 771# SCSI low-level drivers
@@ -720,30 +778,39 @@ CONFIG_ISCSI_TCP=m
720# CONFIG_SCSI_AIC7XXX is not set 778# CONFIG_SCSI_AIC7XXX is not set
721# CONFIG_SCSI_AIC7XXX_OLD is not set 779# CONFIG_SCSI_AIC7XXX_OLD is not set
722# CONFIG_SCSI_AIC79XX is not set 780# CONFIG_SCSI_AIC79XX is not set
781CONFIG_SCSI_AIC94XX=m
782# CONFIG_AIC94XX_DEBUG is not set
723# CONFIG_SCSI_DPT_I2O is not set 783# CONFIG_SCSI_DPT_I2O is not set
784# CONFIG_SCSI_ARCMSR is not set
724# CONFIG_MEGARAID_NEWGEN is not set 785# CONFIG_MEGARAID_NEWGEN is not set
725# CONFIG_MEGARAID_LEGACY is not set 786# CONFIG_MEGARAID_LEGACY is not set
726# CONFIG_MEGARAID_SAS is not set 787# CONFIG_MEGARAID_SAS is not set
727# CONFIG_SCSI_SATA is not set
728# CONFIG_SCSI_HPTIOP is not set 788# CONFIG_SCSI_HPTIOP is not set
729# CONFIG_SCSI_DMX3191D is not set 789# CONFIG_SCSI_DMX3191D is not set
730# CONFIG_SCSI_FUTURE_DOMAIN is not set 790# CONFIG_SCSI_FUTURE_DOMAIN is not set
731# CONFIG_SCSI_IPS is not set 791# CONFIG_SCSI_IPS is not set
732# CONFIG_SCSI_INITIO is not set 792# CONFIG_SCSI_INITIO is not set
733# CONFIG_SCSI_INIA100 is not set 793# CONFIG_SCSI_INIA100 is not set
794# CONFIG_SCSI_STEX is not set
734CONFIG_SCSI_SYM53C8XX_2=y 795CONFIG_SCSI_SYM53C8XX_2=y
735CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 796CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
736CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 797CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
737CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 798CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
738CONFIG_SCSI_SYM53C8XX_MMIO=y 799CONFIG_SCSI_SYM53C8XX_MMIO=y
739# CONFIG_SCSI_IPR is not set
740# CONFIG_SCSI_QLOGIC_1280 is not set 800# CONFIG_SCSI_QLOGIC_1280 is not set
741# CONFIG_SCSI_QLA_FC is not set 801# CONFIG_SCSI_QLA_FC is not set
802# CONFIG_SCSI_QLA_ISCSI is not set
742# CONFIG_SCSI_LPFC is not set 803# CONFIG_SCSI_LPFC is not set
743# CONFIG_SCSI_DC395x is not set 804# CONFIG_SCSI_DC395x is not set
744# CONFIG_SCSI_DC390T is not set 805# CONFIG_SCSI_DC390T is not set
745# CONFIG_SCSI_NSP32 is not set 806# CONFIG_SCSI_NSP32 is not set
746# CONFIG_SCSI_DEBUG is not set 807# CONFIG_SCSI_DEBUG is not set
808# CONFIG_SCSI_SRP is not set
809
810#
811# Serial ATA (prod) and Parallel ATA (experimental) drivers
812#
813# CONFIG_ATA is not set
747 814
748# 815#
749# Multi-device support (RAID and LVM) 816# Multi-device support (RAID and LVM)
@@ -759,6 +826,7 @@ CONFIG_MD_RAID5_RESHAPE=y
759CONFIG_MD_MULTIPATH=m 826CONFIG_MD_MULTIPATH=m
760CONFIG_MD_FAULTY=m 827CONFIG_MD_FAULTY=m
761CONFIG_BLK_DEV_DM=m 828CONFIG_BLK_DEV_DM=m
829# CONFIG_DM_DEBUG is not set
762CONFIG_DM_CRYPT=m 830CONFIG_DM_CRYPT=m
763CONFIG_DM_SNAPSHOT=m 831CONFIG_DM_SNAPSHOT=m
764CONFIG_DM_MIRROR=m 832CONFIG_DM_MIRROR=m
@@ -813,6 +881,8 @@ CONFIG_LXT_PHY=m
813CONFIG_CICADA_PHY=m 881CONFIG_CICADA_PHY=m
814CONFIG_VITESSE_PHY=m 882CONFIG_VITESSE_PHY=m
815CONFIG_SMSC_PHY=m 883CONFIG_SMSC_PHY=m
884# CONFIG_BROADCOM_PHY is not set
885# CONFIG_FIXED_PHY is not set
816 886
817# 887#
818# Ethernet (10 or 100Mbit) 888# Ethernet (10 or 100Mbit)
@@ -832,6 +902,7 @@ CONFIG_MII=y
832# CONFIG_HP100 is not set 902# CONFIG_HP100 is not set
833CONFIG_NET_PCI=y 903CONFIG_NET_PCI=y
834CONFIG_PCNET32=y 904CONFIG_PCNET32=y
905# CONFIG_PCNET32_NAPI is not set
835# CONFIG_AMD8111_ETH is not set 906# CONFIG_AMD8111_ETH is not set
836# CONFIG_ADAPTEC_STARFIRE is not set 907# CONFIG_ADAPTEC_STARFIRE is not set
837# CONFIG_B44 is not set 908# CONFIG_B44 is not set
@@ -850,6 +921,7 @@ CONFIG_PCNET32=y
850# CONFIG_TLAN is not set 921# CONFIG_TLAN is not set
851# CONFIG_VIA_RHINE is not set 922# CONFIG_VIA_RHINE is not set
852CONFIG_LAN_SAA9730=y 923CONFIG_LAN_SAA9730=y
924# CONFIG_SC92031 is not set
853 925
854# 926#
855# Ethernet (1000 Mbit) 927# Ethernet (1000 Mbit)
@@ -868,14 +940,18 @@ CONFIG_LAN_SAA9730=y
868# CONFIG_VIA_VELOCITY is not set 940# CONFIG_VIA_VELOCITY is not set
869# CONFIG_TIGON3 is not set 941# CONFIG_TIGON3 is not set
870# CONFIG_BNX2 is not set 942# CONFIG_BNX2 is not set
943CONFIG_QLA3XXX=m
944# CONFIG_ATL1 is not set
871 945
872# 946#
873# Ethernet (10000 Mbit) 947# Ethernet (10000 Mbit)
874# 948#
875# CONFIG_CHELSIO_T1 is not set 949# CONFIG_CHELSIO_T1 is not set
950CONFIG_CHELSIO_T3=m
876# CONFIG_IXGB is not set 951# CONFIG_IXGB is not set
877# CONFIG_S2IO is not set 952# CONFIG_S2IO is not set
878# CONFIG_MYRI10GE is not set 953# CONFIG_MYRI10GE is not set
954CONFIG_NETXEN_NIC=m
879 955
880# 956#
881# Token Ring devices 957# Token Ring devices
@@ -915,6 +991,7 @@ CONFIG_LAN_SAA9730=y
915# Input device support 991# Input device support
916# 992#
917CONFIG_INPUT=y 993CONFIG_INPUT=y
994# CONFIG_INPUT_FF_MEMLESS is not set
918 995
919# 996#
920# Userland interfaces 997# Userland interfaces
@@ -995,10 +1072,6 @@ CONFIG_LEGACY_PTY_COUNT=256
995# CONFIG_DTLK is not set 1072# CONFIG_DTLK is not set
996# CONFIG_R3964 is not set 1073# CONFIG_R3964 is not set
997# CONFIG_APPLICOM is not set 1074# CONFIG_APPLICOM is not set
998
999#
1000# Ftape, the floppy tape device driver
1001#
1002# CONFIG_DRM is not set 1075# CONFIG_DRM is not set
1003# CONFIG_RAW_DRIVER is not set 1076# CONFIG_RAW_DRIVER is not set
1004 1077
@@ -1006,7 +1079,6 @@ CONFIG_LEGACY_PTY_COUNT=256
1006# TPM devices 1079# TPM devices
1007# 1080#
1008# CONFIG_TCG_TPM is not set 1081# CONFIG_TCG_TPM is not set
1009# CONFIG_TELCLOCK is not set
1010 1082
1011# 1083#
1012# I2C support 1084# I2C support
@@ -1031,14 +1103,9 @@ CONFIG_LEGACY_PTY_COUNT=256
1031# CONFIG_HWMON_VID is not set 1103# CONFIG_HWMON_VID is not set
1032 1104
1033# 1105#
1034# Misc devices
1035#
1036
1037#
1038# Multimedia devices 1106# Multimedia devices
1039# 1107#
1040# CONFIG_VIDEO_DEV is not set 1108# CONFIG_VIDEO_DEV is not set
1041CONFIG_VIDEO_V4L2=y
1042 1109
1043# 1110#
1044# Digital Video Broadcasting Devices 1111# Digital Video Broadcasting Devices
@@ -1056,6 +1123,7 @@ CONFIG_VIDEO_V4L2=y
1056# 1123#
1057# CONFIG_VGA_CONSOLE is not set 1124# CONFIG_VGA_CONSOLE is not set
1058CONFIG_DUMMY_CONSOLE=y 1125CONFIG_DUMMY_CONSOLE=y
1126# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1059 1127
1060# 1128#
1061# Sound 1129# Sound
@@ -1063,6 +1131,12 @@ CONFIG_DUMMY_CONSOLE=y
1063# CONFIG_SOUND is not set 1131# CONFIG_SOUND is not set
1064 1132
1065# 1133#
1134# HID Devices
1135#
1136CONFIG_HID=y
1137# CONFIG_HID_DEBUG is not set
1138
1139#
1066# USB support 1140# USB support
1067# 1141#
1068CONFIG_USB_ARCH_HAS_HCD=y 1142CONFIG_USB_ARCH_HAS_HCD=y
@@ -1125,6 +1199,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1125# 1199#
1126 1200
1127# 1201#
1202# Auxiliary Display support
1203#
1204
1205#
1206# Virtualization
1207#
1208
1209#
1128# File systems 1210# File systems
1129# 1211#
1130CONFIG_EXT2_FS=y 1212CONFIG_EXT2_FS=y
@@ -1134,6 +1216,7 @@ CONFIG_EXT3_FS=y
1134CONFIG_EXT3_FS_XATTR=y 1216CONFIG_EXT3_FS_XATTR=y
1135# CONFIG_EXT3_FS_POSIX_ACL is not set 1217# CONFIG_EXT3_FS_POSIX_ACL is not set
1136# CONFIG_EXT3_FS_SECURITY is not set 1218# CONFIG_EXT3_FS_SECURITY is not set
1219# CONFIG_EXT4DEV_FS is not set
1137CONFIG_JBD=y 1220CONFIG_JBD=y
1138# CONFIG_JBD_DEBUG is not set 1221# CONFIG_JBD_DEBUG is not set
1139CONFIG_FS_MBCACHE=y 1222CONFIG_FS_MBCACHE=y
@@ -1154,6 +1237,7 @@ CONFIG_XFS_QUOTA=y
1154CONFIG_XFS_SECURITY=y 1237CONFIG_XFS_SECURITY=y
1155CONFIG_XFS_POSIX_ACL=y 1238CONFIG_XFS_POSIX_ACL=y
1156# CONFIG_XFS_RT is not set 1239# CONFIG_XFS_RT is not set
1240# CONFIG_GFS2_FS is not set
1157# CONFIG_OCFS2_FS is not set 1241# CONFIG_OCFS2_FS is not set
1158CONFIG_MINIX_FS=m 1242CONFIG_MINIX_FS=m
1159CONFIG_ROMFS_FS=m 1243CONFIG_ROMFS_FS=m
@@ -1167,6 +1251,7 @@ CONFIG_DNOTIFY=y
1167CONFIG_AUTOFS_FS=y 1251CONFIG_AUTOFS_FS=y
1168# CONFIG_AUTOFS4_FS is not set 1252# CONFIG_AUTOFS4_FS is not set
1169CONFIG_FUSE_FS=m 1253CONFIG_FUSE_FS=m
1254CONFIG_GENERIC_ACL=y
1170 1255
1171# 1256#
1172# CD-ROM/DVD Filesystems 1257# CD-ROM/DVD Filesystems
@@ -1174,7 +1259,6 @@ CONFIG_FUSE_FS=m
1174CONFIG_ISO9660_FS=m 1259CONFIG_ISO9660_FS=m
1175CONFIG_JOLIET=y 1260CONFIG_JOLIET=y
1176CONFIG_ZISOFS=y 1261CONFIG_ZISOFS=y
1177CONFIG_ZISOFS_FS=m
1178CONFIG_UDF_FS=m 1262CONFIG_UDF_FS=m
1179CONFIG_UDF_NLS=y 1263CONFIG_UDF_NLS=y
1180 1264
@@ -1193,11 +1277,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1193# 1277#
1194CONFIG_PROC_FS=y 1278CONFIG_PROC_FS=y
1195CONFIG_PROC_KCORE=y 1279CONFIG_PROC_KCORE=y
1280CONFIG_PROC_SYSCTL=y
1196CONFIG_SYSFS=y 1281CONFIG_SYSFS=y
1197CONFIG_TMPFS=y 1282CONFIG_TMPFS=y
1283CONFIG_TMPFS_POSIX_ACL=y
1198# CONFIG_HUGETLB_PAGE is not set 1284# CONFIG_HUGETLB_PAGE is not set
1199CONFIG_RAMFS=y 1285CONFIG_RAMFS=y
1200# CONFIG_CONFIGFS_FS is not set 1286CONFIG_CONFIGFS_FS=m
1201 1287
1202# 1288#
1203# Miscellaneous filesystems 1289# Miscellaneous filesystems
@@ -1242,7 +1328,6 @@ CONFIG_SUNRPC=y
1242# CONFIG_RPCSEC_GSS_SPKM3 is not set 1328# CONFIG_RPCSEC_GSS_SPKM3 is not set
1243# CONFIG_SMB_FS is not set 1329# CONFIG_SMB_FS is not set
1244# CONFIG_CIFS is not set 1330# CONFIG_CIFS is not set
1245# CONFIG_CIFS_DEBUG2 is not set
1246# CONFIG_NCP_FS is not set 1331# CONFIG_NCP_FS is not set
1247# CONFIG_CODA_FS is not set 1332# CONFIG_CODA_FS is not set
1248# CONFIG_AFS_FS is not set 1333# CONFIG_AFS_FS is not set
@@ -1299,6 +1384,14 @@ CONFIG_NLS_KOI8_U=m
1299CONFIG_NLS_UTF8=m 1384CONFIG_NLS_UTF8=m
1300 1385
1301# 1386#
1387# Distributed Lock Manager
1388#
1389CONFIG_DLM=m
1390CONFIG_DLM_TCP=y
1391# CONFIG_DLM_SCTP is not set
1392# CONFIG_DLM_DEBUG is not set
1393
1394#
1302# Profiling support 1395# Profiling support
1303# 1396#
1304# CONFIG_PROFILING is not set 1397# CONFIG_PROFILING is not set
@@ -1308,11 +1401,13 @@ CONFIG_NLS_UTF8=m
1308# 1401#
1309CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1402CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1310# CONFIG_PRINTK_TIME is not set 1403# CONFIG_PRINTK_TIME is not set
1404CONFIG_ENABLE_MUST_CHECK=y
1311# CONFIG_MAGIC_SYSRQ is not set 1405# CONFIG_MAGIC_SYSRQ is not set
1312# CONFIG_UNUSED_SYMBOLS is not set 1406# CONFIG_UNUSED_SYMBOLS is not set
1407# CONFIG_DEBUG_FS is not set
1408# CONFIG_HEADERS_CHECK is not set
1313# CONFIG_DEBUG_KERNEL is not set 1409# CONFIG_DEBUG_KERNEL is not set
1314CONFIG_LOG_BUF_SHIFT=14 1410CONFIG_LOG_BUF_SHIFT=14
1315# CONFIG_DEBUG_FS is not set
1316CONFIG_CROSSCOMPILE=y 1411CONFIG_CROSSCOMPILE=y
1317CONFIG_CMDLINE="" 1412CONFIG_CMDLINE=""
1318 1413
@@ -1326,18 +1421,30 @@ CONFIG_CMDLINE=""
1326# Cryptographic options 1421# Cryptographic options
1327# 1422#
1328CONFIG_CRYPTO=y 1423CONFIG_CRYPTO=y
1424CONFIG_CRYPTO_ALGAPI=y
1425CONFIG_CRYPTO_BLKCIPHER=m
1426CONFIG_CRYPTO_HASH=y
1427CONFIG_CRYPTO_MANAGER=y
1329CONFIG_CRYPTO_HMAC=y 1428CONFIG_CRYPTO_HMAC=y
1429CONFIG_CRYPTO_XCBC=m
1330CONFIG_CRYPTO_NULL=m 1430CONFIG_CRYPTO_NULL=m
1331CONFIG_CRYPTO_MD4=m 1431CONFIG_CRYPTO_MD4=m
1332CONFIG_CRYPTO_MD5=m 1432CONFIG_CRYPTO_MD5=y
1333CONFIG_CRYPTO_SHA1=m 1433CONFIG_CRYPTO_SHA1=m
1334CONFIG_CRYPTO_SHA256=m 1434CONFIG_CRYPTO_SHA256=m
1335CONFIG_CRYPTO_SHA512=m 1435CONFIG_CRYPTO_SHA512=m
1336CONFIG_CRYPTO_WP512=m 1436CONFIG_CRYPTO_WP512=m
1337CONFIG_CRYPTO_TGR192=m 1437CONFIG_CRYPTO_TGR192=m
1438CONFIG_CRYPTO_GF128MUL=m
1439CONFIG_CRYPTO_ECB=m
1440CONFIG_CRYPTO_CBC=m
1441CONFIG_CRYPTO_PCBC=m
1442CONFIG_CRYPTO_LRW=m
1338CONFIG_CRYPTO_DES=m 1443CONFIG_CRYPTO_DES=m
1444CONFIG_CRYPTO_FCRYPT=m
1339CONFIG_CRYPTO_BLOWFISH=m 1445CONFIG_CRYPTO_BLOWFISH=m
1340CONFIG_CRYPTO_TWOFISH=m 1446CONFIG_CRYPTO_TWOFISH=m
1447CONFIG_CRYPTO_TWOFISH_COMMON=m
1341CONFIG_CRYPTO_SERPENT=m 1448CONFIG_CRYPTO_SERPENT=m
1342CONFIG_CRYPTO_AES=m 1449CONFIG_CRYPTO_AES=m
1343CONFIG_CRYPTO_CAST5=m 1450CONFIG_CRYPTO_CAST5=m
@@ -1349,6 +1456,7 @@ CONFIG_CRYPTO_ANUBIS=m
1349CONFIG_CRYPTO_DEFLATE=m 1456CONFIG_CRYPTO_DEFLATE=m
1350CONFIG_CRYPTO_MICHAEL_MIC=m 1457CONFIG_CRYPTO_MICHAEL_MIC=m
1351CONFIG_CRYPTO_CRC32C=m 1458CONFIG_CRYPTO_CRC32C=m
1459CONFIG_CRYPTO_CAMELLIA=m
1352# CONFIG_CRYPTO_TEST is not set 1460# CONFIG_CRYPTO_TEST is not set
1353 1461
1354# 1462#
@@ -1358,6 +1466,7 @@ CONFIG_CRYPTO_CRC32C=m
1358# 1466#
1359# Library routines 1467# Library routines
1360# 1468#
1469CONFIG_BITREVERSE=y
1361# CONFIG_CRC_CCITT is not set 1470# CONFIG_CRC_CCITT is not set
1362CONFIG_CRC16=m 1471CONFIG_CRC16=m
1363CONFIG_CRC32=y 1472CONFIG_CRC32=y
@@ -1369,9 +1478,5 @@ CONFIG_TEXTSEARCH_KMP=m
1369CONFIG_TEXTSEARCH_BM=m 1478CONFIG_TEXTSEARCH_BM=m
1370CONFIG_TEXTSEARCH_FSM=m 1479CONFIG_TEXTSEARCH_FSM=m
1371CONFIG_PLIST=y 1480CONFIG_PLIST=y
1372CONFIG_RIO=n 1481CONFIG_HAS_IOMEM=y
1373CONFIG_I2C_OCORES=n 1482CONFIG_HAS_IOPORT=y
1374CONFIG_DEBUG_RT_MUTEXES=n
1375CONFIG_RT_MUTEX_TESTER=n
1376CONFIG_DEBUG_RWSEMS=n
1377CONFIG_DEBUG_LOCKING_API_SELFTESTS=n
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 9554257c6f3a..aa05e294ea62 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc1 3# Linux kernel version: 2.6.20
4# Wed Oct 11 01:41:41 2006 4# Tue Feb 20 21:47:22 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MIPS=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
42# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -78,11 +80,14 @@ CONFIG_SIBYTE_CFE=y
78# CONFIG_SIBYTE_SB1250_PROF is not set 80# CONFIG_SIBYTE_SB1250_PROF is not set
79# CONFIG_SIBYTE_TBPROF is not set 81# CONFIG_SIBYTE_TBPROF is not set
80CONFIG_RWSEM_GENERIC_SPINLOCK=y 82CONFIG_RWSEM_GENERIC_SPINLOCK=y
83# CONFIG_ARCH_HAS_ILOG2_U32 is not set
84# CONFIG_ARCH_HAS_ILOG2_U64 is not set
81CONFIG_GENERIC_FIND_NEXT_BIT=y 85CONFIG_GENERIC_FIND_NEXT_BIT=y
82CONFIG_GENERIC_HWEIGHT=y 86CONFIG_GENERIC_HWEIGHT=y
83CONFIG_GENERIC_CALIBRATE_DELAY=y 87CONFIG_GENERIC_CALIBRATE_DELAY=y
84CONFIG_GENERIC_TIME=y 88CONFIG_GENERIC_TIME=y
85CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 89CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
90# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
86CONFIG_DMA_COHERENT=y 91CONFIG_DMA_COHERENT=y
87CONFIG_CPU_BIG_ENDIAN=y 92CONFIG_CPU_BIG_ENDIAN=y
88# CONFIG_CPU_LITTLE_ENDIAN is not set 93# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -115,6 +120,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
115# CONFIG_CPU_RM9000 is not set 120# CONFIG_CPU_RM9000 is not set
116CONFIG_CPU_SB1=y 121CONFIG_CPU_SB1=y
117CONFIG_SYS_HAS_CPU_SB1=y 122CONFIG_SYS_HAS_CPU_SB1=y
123CONFIG_WEAK_ORDERING=y
118CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 124CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
119CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 125CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
120CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 126CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -150,8 +156,10 @@ CONFIG_FLAT_NODE_MEM_MAP=y
150# CONFIG_SPARSEMEM_STATIC is not set 156# CONFIG_SPARSEMEM_STATIC is not set
151CONFIG_SPLIT_PTLOCK_CPUS=4 157CONFIG_SPLIT_PTLOCK_CPUS=4
152CONFIG_RESOURCES_64BIT=y 158CONFIG_RESOURCES_64BIT=y
159CONFIG_ZONE_DMA_FLAG=1
153CONFIG_SMP=y 160CONFIG_SMP=y
154CONFIG_SYS_SUPPORTS_SMP=y 161CONFIG_SYS_SUPPORTS_SMP=y
162CONFIG_NR_CPUS_DEFAULT_4=y
155CONFIG_NR_CPUS=4 163CONFIG_NR_CPUS=4
156# CONFIG_HZ_48 is not set 164# CONFIG_HZ_48 is not set
157# CONFIG_HZ_100 is not set 165# CONFIG_HZ_100 is not set
@@ -166,6 +174,7 @@ CONFIG_PREEMPT_NONE=y
166# CONFIG_PREEMPT_VOLUNTARY is not set 174# CONFIG_PREEMPT_VOLUNTARY is not set
167# CONFIG_PREEMPT is not set 175# CONFIG_PREEMPT is not set
168# CONFIG_PREEMPT_BKL is not set 176# CONFIG_PREEMPT_BKL is not set
177# CONFIG_KEXEC is not set
169CONFIG_LOCKDEP_SUPPORT=y 178CONFIG_LOCKDEP_SUPPORT=y
170CONFIG_STACKTRACE_SUPPORT=y 179CONFIG_STACKTRACE_SUPPORT=y
171CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 180CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -185,6 +194,7 @@ CONFIG_LOCALVERSION_AUTO=y
185CONFIG_SWAP=y 194CONFIG_SWAP=y
186CONFIG_SYSVIPC=y 195CONFIG_SYSVIPC=y
187# CONFIG_IPC_NS is not set 196# CONFIG_IPC_NS is not set
197CONFIG_SYSVIPC_SYSCTL=y
188# CONFIG_POSIX_MQUEUE is not set 198# CONFIG_POSIX_MQUEUE is not set
189# CONFIG_BSD_PROCESS_ACCT is not set 199# CONFIG_BSD_PROCESS_ACCT is not set
190# CONFIG_TASKSTATS is not set 200# CONFIG_TASKSTATS is not set
@@ -193,6 +203,7 @@ CONFIG_SYSVIPC=y
193CONFIG_IKCONFIG=y 203CONFIG_IKCONFIG=y
194CONFIG_IKCONFIG_PROC=y 204CONFIG_IKCONFIG_PROC=y
195# CONFIG_CPUSETS is not set 205# CONFIG_CPUSETS is not set
206CONFIG_SYSFS_DEPRECATED=y
196# CONFIG_RELAY is not set 207# CONFIG_RELAY is not set
197CONFIG_INITRAMFS_SOURCE="" 208CONFIG_INITRAMFS_SOURCE=""
198# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 209# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -253,7 +264,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
253CONFIG_HW_HAS_PCI=y 264CONFIG_HW_HAS_PCI=y
254CONFIG_PCI=y 265CONFIG_PCI=y
255CONFIG_PCI_DOMAINS=y 266CONFIG_PCI_DOMAINS=y
256# CONFIG_PCI_MULTITHREAD_PROBE is not set
257CONFIG_PCI_DEBUG=y 267CONFIG_PCI_DEBUG=y
258CONFIG_MMU=y 268CONFIG_MMU=y
259 269
@@ -273,11 +283,20 @@ CONFIG_BINFMT_ELF=y
273# CONFIG_BUILD_ELF64 is not set 283# CONFIG_BUILD_ELF64 is not set
274CONFIG_MIPS32_COMPAT=y 284CONFIG_MIPS32_COMPAT=y
275CONFIG_COMPAT=y 285CONFIG_COMPAT=y
286CONFIG_SYSVIPC_COMPAT=y
276CONFIG_MIPS32_O32=y 287CONFIG_MIPS32_O32=y
277CONFIG_MIPS32_N32=y 288CONFIG_MIPS32_N32=y
278CONFIG_BINFMT_ELF32=y 289CONFIG_BINFMT_ELF32=y
279 290
280# 291#
292# Power management options
293#
294CONFIG_PM=y
295# CONFIG_PM_LEGACY is not set
296# CONFIG_PM_DEBUG is not set
297# CONFIG_PM_SYSFS_DEPRECATED is not set
298
299#
281# Networking 300# Networking
282# 301#
283CONFIG_NET=y 302CONFIG_NET=y
@@ -292,7 +311,9 @@ CONFIG_UNIX=y
292CONFIG_XFRM=y 311CONFIG_XFRM=y
293CONFIG_XFRM_USER=m 312CONFIG_XFRM_USER=m
294# CONFIG_XFRM_SUB_POLICY is not set 313# CONFIG_XFRM_SUB_POLICY is not set
314CONFIG_XFRM_MIGRATE=y
295CONFIG_NET_KEY=y 315CONFIG_NET_KEY=y
316CONFIG_NET_KEY_MIGRATE=y
296CONFIG_INET=y 317CONFIG_INET=y
297# CONFIG_IP_MULTICAST is not set 318# CONFIG_IP_MULTICAST is not set
298# CONFIG_IP_ADVANCED_ROUTER is not set 319# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -318,6 +339,7 @@ CONFIG_INET_TCP_DIAG=y
318# CONFIG_TCP_CONG_ADVANCED is not set 339# CONFIG_TCP_CONG_ADVANCED is not set
319CONFIG_TCP_CONG_CUBIC=y 340CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic" 341CONFIG_DEFAULT_TCP_CONG="cubic"
342CONFIG_TCP_MD5SIG=y
321# CONFIG_IPV6 is not set 343# CONFIG_IPV6 is not set
322# CONFIG_INET6_XFRM_TUNNEL is not set 344# CONFIG_INET6_XFRM_TUNNEL is not set
323# CONFIG_INET6_TUNNEL is not set 345# CONFIG_INET6_TUNNEL is not set
@@ -374,6 +396,7 @@ CONFIG_NETWORK_SECMARK=y
374CONFIG_STANDALONE=y 396CONFIG_STANDALONE=y
375CONFIG_PREVENT_FIRMWARE_BUILD=y 397CONFIG_PREVENT_FIRMWARE_BUILD=y
376# CONFIG_DEBUG_DRIVER is not set 398# CONFIG_DEBUG_DRIVER is not set
399# CONFIG_DEBUG_DEVRES is not set
377# CONFIG_SYS_HYPERVISOR is not set 400# CONFIG_SYS_HYPERVISOR is not set
378 401
379# 402#
@@ -394,6 +417,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
394# 417#
395# Plug and Play support 418# Plug and Play support
396# 419#
420# CONFIG_PNPACPI is not set
397 421
398# 422#
399# Block devices 423# Block devices
@@ -413,6 +437,12 @@ CONFIG_BLK_DEV_INITRD=y
413# CONFIG_ATA_OVER_ETH is not set 437# CONFIG_ATA_OVER_ETH is not set
414 438
415# 439#
440# Misc devices
441#
442CONFIG_SGI_IOC4=m
443# CONFIG_TIFM_CORE is not set
444
445#
416# ATA/ATAPI/MFM/RLL support 446# ATA/ATAPI/MFM/RLL support
417# 447#
418CONFIG_IDE=y 448CONFIG_IDE=y
@@ -455,6 +485,7 @@ CONFIG_BLK_DEV_CMD64X=y
455# CONFIG_BLK_DEV_JMICRON is not set 485# CONFIG_BLK_DEV_JMICRON is not set
456# CONFIG_BLK_DEV_SC1200 is not set 486# CONFIG_BLK_DEV_SC1200 is not set
457# CONFIG_BLK_DEV_PIIX is not set 487# CONFIG_BLK_DEV_PIIX is not set
488CONFIG_BLK_DEV_IT8213=m
458# CONFIG_BLK_DEV_IT821X is not set 489# CONFIG_BLK_DEV_IT821X is not set
459# CONFIG_BLK_DEV_NS87415 is not set 490# CONFIG_BLK_DEV_NS87415 is not set
460# CONFIG_BLK_DEV_PDC202XX_OLD is not set 491# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -464,6 +495,7 @@ CONFIG_BLK_DEV_CMD64X=y
464# CONFIG_BLK_DEV_SLC90E66 is not set 495# CONFIG_BLK_DEV_SLC90E66 is not set
465# CONFIG_BLK_DEV_TRM290 is not set 496# CONFIG_BLK_DEV_TRM290 is not set
466# CONFIG_BLK_DEV_VIA82CXXX is not set 497# CONFIG_BLK_DEV_VIA82CXXX is not set
498CONFIG_BLK_DEV_TC86C001=m
467# CONFIG_BLK_DEV_IDE_SWARM is not set 499# CONFIG_BLK_DEV_IDE_SWARM is not set
468# CONFIG_IDE_ARM is not set 500# CONFIG_IDE_ARM is not set
469CONFIG_BLK_DEV_IDEDMA=y 501CONFIG_BLK_DEV_IDEDMA=y
@@ -558,14 +590,17 @@ CONFIG_NET_SB1250_MAC=y
558# CONFIG_TIGON3 is not set 590# CONFIG_TIGON3 is not set
559# CONFIG_BNX2 is not set 591# CONFIG_BNX2 is not set
560# CONFIG_QLA3XXX is not set 592# CONFIG_QLA3XXX is not set
593# CONFIG_ATL1 is not set
561 594
562# 595#
563# Ethernet (10000 Mbit) 596# Ethernet (10000 Mbit)
564# 597#
565# CONFIG_CHELSIO_T1 is not set 598# CONFIG_CHELSIO_T1 is not set
599CONFIG_CHELSIO_T3=m
566# CONFIG_IXGB is not set 600# CONFIG_IXGB is not set
567# CONFIG_S2IO is not set 601# CONFIG_S2IO is not set
568# CONFIG_MYRI10GE is not set 602# CONFIG_MYRI10GE is not set
603CONFIG_NETXEN_NIC=m
569 604
570# 605#
571# Token Ring devices 606# Token Ring devices
@@ -627,6 +662,7 @@ CONFIG_SERIAL_NONSTANDARD=y
627# CONFIG_DIGIEPCA is not set 662# CONFIG_DIGIEPCA is not set
628# CONFIG_MOXA_INTELLIO is not set 663# CONFIG_MOXA_INTELLIO is not set
629# CONFIG_MOXA_SMARTIO is not set 664# CONFIG_MOXA_SMARTIO is not set
665CONFIG_MOXA_SMARTIO_NEW=m
630# CONFIG_ISI is not set 666# CONFIG_ISI is not set
631# CONFIG_SYNCLINKMP is not set 667# CONFIG_SYNCLINKMP is not set
632# CONFIG_SYNCLINK_GT is not set 668# CONFIG_SYNCLINK_GT is not set
@@ -667,10 +703,6 @@ CONFIG_GEN_RTC=y
667# CONFIG_DTLK is not set 703# CONFIG_DTLK is not set
668# CONFIG_R3964 is not set 704# CONFIG_R3964 is not set
669# CONFIG_APPLICOM is not set 705# CONFIG_APPLICOM is not set
670
671#
672# Ftape, the floppy tape device driver
673#
674# CONFIG_DRM is not set 706# CONFIG_DRM is not set
675# CONFIG_RAW_DRIVER is not set 707# CONFIG_RAW_DRIVER is not set
676 708
@@ -678,7 +710,6 @@ CONFIG_GEN_RTC=y
678# TPM devices 710# TPM devices
679# 711#
680# CONFIG_TCG_TPM is not set 712# CONFIG_TCG_TPM is not set
681# CONFIG_TELCLOCK is not set
682 713
683# 714#
684# I2C support 715# I2C support
@@ -707,6 +738,7 @@ CONFIG_I2C_CHARDEV=y
707# CONFIG_I2C_NFORCE2 is not set 738# CONFIG_I2C_NFORCE2 is not set
708# CONFIG_I2C_OCORES is not set 739# CONFIG_I2C_OCORES is not set
709# CONFIG_I2C_PARPORT_LIGHT is not set 740# CONFIG_I2C_PARPORT_LIGHT is not set
741# CONFIG_I2C_PASEMI is not set
710# CONFIG_I2C_PROSAVAGE is not set 742# CONFIG_I2C_PROSAVAGE is not set
711# CONFIG_I2C_SAVAGE4 is not set 743# CONFIG_I2C_SAVAGE4 is not set
712CONFIG_I2C_SIBYTE=y 744CONFIG_I2C_SIBYTE=y
@@ -743,6 +775,7 @@ CONFIG_I2C_DEBUG_CHIP=y
743# 775#
744# Dallas's 1-wire bus 776# Dallas's 1-wire bus
745# 777#
778# CONFIG_W1 is not set
746 779
747# 780#
748# Hardware Monitoring support 781# Hardware Monitoring support
@@ -751,11 +784,6 @@ CONFIG_I2C_DEBUG_CHIP=y
751# CONFIG_HWMON_VID is not set 784# CONFIG_HWMON_VID is not set
752 785
753# 786#
754# Misc devices
755#
756# CONFIG_TIFM_CORE is not set
757
758#
759# Multimedia devices 787# Multimedia devices
760# 788#
761# CONFIG_VIDEO_DEV is not set 789# CONFIG_VIDEO_DEV is not set
@@ -840,6 +868,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
840# 868#
841 869
842# 870#
871# Auxiliary Display support
872#
873
874#
875# Virtualization
876#
877
878#
843# File systems 879# File systems
844# 880#
845CONFIG_EXT2_FS=y 881CONFIG_EXT2_FS=y
@@ -848,6 +884,7 @@ CONFIG_EXT2_FS_POSIX_ACL=y
848CONFIG_EXT2_FS_SECURITY=y 884CONFIG_EXT2_FS_SECURITY=y
849# CONFIG_EXT2_FS_XIP is not set 885# CONFIG_EXT2_FS_XIP is not set
850# CONFIG_EXT3_FS is not set 886# CONFIG_EXT3_FS is not set
887# CONFIG_EXT4DEV_FS is not set
851CONFIG_FS_MBCACHE=y 888CONFIG_FS_MBCACHE=y
852# CONFIG_REISERFS_FS is not set 889# CONFIG_REISERFS_FS is not set
853# CONFIG_JFS_FS is not set 890# CONFIG_JFS_FS is not set
@@ -889,7 +926,7 @@ CONFIG_TMPFS=y
889# CONFIG_TMPFS_POSIX_ACL is not set 926# CONFIG_TMPFS_POSIX_ACL is not set
890# CONFIG_HUGETLB_PAGE is not set 927# CONFIG_HUGETLB_PAGE is not set
891CONFIG_RAMFS=y 928CONFIG_RAMFS=y
892# CONFIG_CONFIGFS_FS is not set 929CONFIG_CONFIGFS_FS=m
893 930
894# 931#
895# Miscellaneous filesystems 932# Miscellaneous filesystems
@@ -946,6 +983,10 @@ CONFIG_MSDOS_PARTITION=y
946# 983#
947# Distributed Lock Manager 984# Distributed Lock Manager
948# 985#
986CONFIG_DLM=m
987CONFIG_DLM_TCP=y
988# CONFIG_DLM_SCTP is not set
989# CONFIG_DLM_DEBUG is not set
949 990
950# 991#
951# Profiling support 992# Profiling support
@@ -960,23 +1001,25 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
960CONFIG_ENABLE_MUST_CHECK=y 1001CONFIG_ENABLE_MUST_CHECK=y
961CONFIG_MAGIC_SYSRQ=y 1002CONFIG_MAGIC_SYSRQ=y
962# CONFIG_UNUSED_SYMBOLS is not set 1003# CONFIG_UNUSED_SYMBOLS is not set
1004# CONFIG_DEBUG_FS is not set
1005# CONFIG_HEADERS_CHECK is not set
963CONFIG_DEBUG_KERNEL=y 1006CONFIG_DEBUG_KERNEL=y
1007# CONFIG_DEBUG_SHIRQ is not set
964CONFIG_LOG_BUF_SHIFT=16 1008CONFIG_LOG_BUF_SHIFT=16
965CONFIG_DETECT_SOFTLOCKUP=y 1009CONFIG_DETECT_SOFTLOCKUP=y
966# CONFIG_SCHEDSTATS is not set 1010# CONFIG_SCHEDSTATS is not set
1011# CONFIG_TIMER_STATS is not set
967# CONFIG_DEBUG_SLAB is not set 1012# CONFIG_DEBUG_SLAB is not set
968# CONFIG_DEBUG_RT_MUTEXES is not set 1013# CONFIG_DEBUG_RT_MUTEXES is not set
969# CONFIG_RT_MUTEX_TESTER is not set 1014# CONFIG_RT_MUTEX_TESTER is not set
970# CONFIG_DEBUG_SPINLOCK is not set 1015# CONFIG_DEBUG_SPINLOCK is not set
971CONFIG_DEBUG_MUTEXES=y 1016CONFIG_DEBUG_MUTEXES=y
972# CONFIG_DEBUG_RWSEMS is not set
973# CONFIG_DEBUG_LOCK_ALLOC is not set 1017# CONFIG_DEBUG_LOCK_ALLOC is not set
974# CONFIG_PROVE_LOCKING is not set 1018# CONFIG_PROVE_LOCKING is not set
975# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1019# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
976# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1020# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
977# CONFIG_DEBUG_KOBJECT is not set 1021# CONFIG_DEBUG_KOBJECT is not set
978# CONFIG_DEBUG_INFO is not set 1022# CONFIG_DEBUG_INFO is not set
979# CONFIG_DEBUG_FS is not set
980# CONFIG_DEBUG_VM is not set 1023# CONFIG_DEBUG_VM is not set
981# CONFIG_DEBUG_LIST is not set 1024# CONFIG_DEBUG_LIST is not set
982CONFIG_FORCED_INLINING=y 1025CONFIG_FORCED_INLINING=y
@@ -984,7 +1027,6 @@ CONFIG_FORCED_INLINING=y
984CONFIG_CROSSCOMPILE=y 1027CONFIG_CROSSCOMPILE=y
985CONFIG_CMDLINE="" 1028CONFIG_CMDLINE=""
986# CONFIG_DEBUG_STACK_USAGE is not set 1029# CONFIG_DEBUG_STACK_USAGE is not set
987# CONFIG_KGDB is not set
988# CONFIG_SB1XXX_CORELIS is not set 1030# CONFIG_SB1XXX_CORELIS is not set
989# CONFIG_RUNTIME_DEBUG is not set 1031# CONFIG_RUNTIME_DEBUG is not set
990 1032
@@ -1002,8 +1044,9 @@ CONFIG_CRYPTO=y
1002CONFIG_CRYPTO_ALGAPI=y 1044CONFIG_CRYPTO_ALGAPI=y
1003CONFIG_CRYPTO_BLKCIPHER=m 1045CONFIG_CRYPTO_BLKCIPHER=m
1004CONFIG_CRYPTO_HASH=y 1046CONFIG_CRYPTO_HASH=y
1005CONFIG_CRYPTO_MANAGER=m 1047CONFIG_CRYPTO_MANAGER=y
1006CONFIG_CRYPTO_HMAC=y 1048CONFIG_CRYPTO_HMAC=y
1049CONFIG_CRYPTO_XCBC=m
1007CONFIG_CRYPTO_NULL=y 1050CONFIG_CRYPTO_NULL=y
1008CONFIG_CRYPTO_MD4=y 1051CONFIG_CRYPTO_MD4=y
1009CONFIG_CRYPTO_MD5=y 1052CONFIG_CRYPTO_MD5=y
@@ -1012,9 +1055,13 @@ CONFIG_CRYPTO_SHA256=y
1012CONFIG_CRYPTO_SHA512=y 1055CONFIG_CRYPTO_SHA512=y
1013CONFIG_CRYPTO_WP512=m 1056CONFIG_CRYPTO_WP512=m
1014CONFIG_CRYPTO_TGR192=m 1057CONFIG_CRYPTO_TGR192=m
1058CONFIG_CRYPTO_GF128MUL=m
1015CONFIG_CRYPTO_ECB=m 1059CONFIG_CRYPTO_ECB=m
1016CONFIG_CRYPTO_CBC=m 1060CONFIG_CRYPTO_CBC=m
1061CONFIG_CRYPTO_PCBC=m
1062CONFIG_CRYPTO_LRW=m
1017CONFIG_CRYPTO_DES=y 1063CONFIG_CRYPTO_DES=y
1064CONFIG_CRYPTO_FCRYPT=m
1018CONFIG_CRYPTO_BLOWFISH=y 1065CONFIG_CRYPTO_BLOWFISH=y
1019CONFIG_CRYPTO_TWOFISH=y 1066CONFIG_CRYPTO_TWOFISH=y
1020CONFIG_CRYPTO_TWOFISH_COMMON=y 1067CONFIG_CRYPTO_TWOFISH_COMMON=y
@@ -1029,6 +1076,7 @@ CONFIG_CRYPTO_ANUBIS=m
1029CONFIG_CRYPTO_DEFLATE=y 1076CONFIG_CRYPTO_DEFLATE=y
1030CONFIG_CRYPTO_MICHAEL_MIC=y 1077CONFIG_CRYPTO_MICHAEL_MIC=y
1031# CONFIG_CRYPTO_CRC32C is not set 1078# CONFIG_CRYPTO_CRC32C is not set
1079CONFIG_CRYPTO_CAMELLIA=m
1032# CONFIG_CRYPTO_TEST is not set 1080# CONFIG_CRYPTO_TEST is not set
1033 1081
1034# 1082#
@@ -1038,6 +1086,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=y
1038# 1086#
1039# Library routines 1087# Library routines
1040# 1088#
1089CONFIG_BITREVERSE=y
1041# CONFIG_CRC_CCITT is not set 1090# CONFIG_CRC_CCITT is not set
1042# CONFIG_CRC16 is not set 1091# CONFIG_CRC16 is not set
1043CONFIG_CRC32=y 1092CONFIG_CRC32=y
@@ -1045,3 +1094,5 @@ CONFIG_CRC32=y
1045CONFIG_ZLIB_INFLATE=y 1094CONFIG_ZLIB_INFLATE=y
1046CONFIG_ZLIB_DEFLATE=y 1095CONFIG_ZLIB_DEFLATE=y
1047CONFIG_PLIST=y 1096CONFIG_PLIST=y
1097CONFIG_HAS_IOMEM=y
1098CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index 49590d443712..b2594fa556f3 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:24 2006 4# Tue Feb 20 21:47:22 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -70,12 +70,15 @@ CONFIG_MACH_VR41XX=y
70# CONFIG_VICTOR_MPC30X is not set 70# CONFIG_VICTOR_MPC30X is not set
71CONFIG_ZAO_CAPCELLA=y 71CONFIG_ZAO_CAPCELLA=y
72CONFIG_PCI_VR41XX=y 72CONFIG_PCI_VR41XX=y
73# CONFIG_VRC4173 is not set
74CONFIG_RWSEM_GENERIC_SPINLOCK=y 73CONFIG_RWSEM_GENERIC_SPINLOCK=y
74# CONFIG_ARCH_HAS_ILOG2_U32 is not set
75# CONFIG_ARCH_HAS_ILOG2_U64 is not set
75CONFIG_GENERIC_FIND_NEXT_BIT=y 76CONFIG_GENERIC_FIND_NEXT_BIT=y
76CONFIG_GENERIC_HWEIGHT=y 77CONFIG_GENERIC_HWEIGHT=y
77CONFIG_GENERIC_CALIBRATE_DELAY=y 78CONFIG_GENERIC_CALIBRATE_DELAY=y
79CONFIG_GENERIC_TIME=y
78CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 80CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
81CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
79CONFIG_DMA_NONCOHERENT=y 82CONFIG_DMA_NONCOHERENT=y
80CONFIG_DMA_NEED_PCI_MAP_STATE=y 83CONFIG_DMA_NEED_PCI_MAP_STATE=y
81# CONFIG_CPU_BIG_ENDIAN is not set 84# CONFIG_CPU_BIG_ENDIAN is not set
@@ -108,6 +111,7 @@ CONFIG_CPU_VR41XX=y
108# CONFIG_CPU_SB1 is not set 111# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_VR41XX=y 112CONFIG_SYS_HAS_CPU_VR41XX=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 113CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
114CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 115CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 116CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
113 117
@@ -121,8 +125,8 @@ CONFIG_PAGE_SIZE_4KB=y
121# CONFIG_PAGE_SIZE_16KB is not set 125# CONFIG_PAGE_SIZE_16KB is not set
122# CONFIG_PAGE_SIZE_64KB is not set 126# CONFIG_PAGE_SIZE_64KB is not set
123CONFIG_MIPS_MT_DISABLED=y 127CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_MT_SMP is not set 128# CONFIG_MIPS_MT_SMP is not set
129# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_VPE_LOADER is not set 130# CONFIG_MIPS_VPE_LOADER is not set
127CONFIG_CPU_HAS_SYNC=y 131CONFIG_CPU_HAS_SYNC=y
128CONFIG_GENERIC_HARDIRQS=y 132CONFIG_GENERIC_HARDIRQS=y
@@ -137,6 +141,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
137# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
138CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
139# CONFIG_RESOURCES_64BIT is not set 143# CONFIG_RESOURCES_64BIT is not set
144CONFIG_ZONE_DMA_FLAG=1
140# CONFIG_HZ_48 is not set 145# CONFIG_HZ_48 is not set
141# CONFIG_HZ_100 is not set 146# CONFIG_HZ_100 is not set
142# CONFIG_HZ_128 is not set 147# CONFIG_HZ_128 is not set
@@ -149,6 +154,7 @@ CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y 154CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set 155# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set 156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
152CONFIG_LOCKDEP_SUPPORT=y 158CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 159CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -167,15 +173,20 @@ CONFIG_LOCALVERSION=""
167CONFIG_LOCALVERSION_AUTO=y 173CONFIG_LOCALVERSION_AUTO=y
168CONFIG_SWAP=y 174CONFIG_SWAP=y
169CONFIG_SYSVIPC=y 175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
170# CONFIG_POSIX_MQUEUE is not set 178# CONFIG_POSIX_MQUEUE is not set
171# CONFIG_BSD_PROCESS_ACCT is not set 179# CONFIG_BSD_PROCESS_ACCT is not set
172CONFIG_SYSCTL=y 180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
173# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
174# CONFIG_IKCONFIG is not set 183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
175# CONFIG_RELAY is not set 185# CONFIG_RELAY is not set
176CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
178CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
179CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
180# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
181CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -183,12 +194,12 @@ CONFIG_PRINTK=y
183CONFIG_BUG=y 194CONFIG_BUG=y
184CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
185CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
186CONFIG_RT_MUTEXES=y
187CONFIG_FUTEX=y 197CONFIG_FUTEX=y
188CONFIG_EPOLL=y 198CONFIG_EPOLL=y
189CONFIG_SHMEM=y 199CONFIG_SHMEM=y
190CONFIG_SLAB=y 200CONFIG_SLAB=y
191CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
192# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
193CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
194# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -206,6 +217,7 @@ CONFIG_KMOD=y
206# 217#
207# Block layer 218# Block layer
208# 219#
220CONFIG_BLOCK=y
209# CONFIG_LBD is not set 221# CONFIG_LBD is not set
210# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
211# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -248,6 +260,14 @@ CONFIG_BINFMT_ELF=y
248CONFIG_TRAD_SIGNALS=y 260CONFIG_TRAD_SIGNALS=y
249 261
250# 262#
263# Power management options
264#
265CONFIG_PM=y
266# CONFIG_PM_LEGACY is not set
267# CONFIG_PM_DEBUG is not set
268# CONFIG_PM_SYSFS_DEPRECATED is not set
269
270#
251# Networking 271# Networking
252# 272#
253CONFIG_NET=y 273CONFIG_NET=y
@@ -261,7 +281,10 @@ CONFIG_PACKET_MMAP=y
261CONFIG_UNIX=y 281CONFIG_UNIX=y
262CONFIG_XFRM=y 282CONFIG_XFRM=y
263CONFIG_XFRM_USER=m 283CONFIG_XFRM_USER=m
284# CONFIG_XFRM_SUB_POLICY is not set
285CONFIG_XFRM_MIGRATE=y
264CONFIG_NET_KEY=y 286CONFIG_NET_KEY=y
287CONFIG_NET_KEY_MIGRATE=y
265CONFIG_INET=y 288CONFIG_INET=y
266CONFIG_IP_MULTICAST=y 289CONFIG_IP_MULTICAST=y
267# CONFIG_IP_ADVANCED_ROUTER is not set 290# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -282,10 +305,13 @@ CONFIG_IP_PNP_BOOTP=y
282# CONFIG_INET_TUNNEL is not set 305# CONFIG_INET_TUNNEL is not set
283CONFIG_INET_XFRM_MODE_TRANSPORT=m 306CONFIG_INET_XFRM_MODE_TRANSPORT=m
284CONFIG_INET_XFRM_MODE_TUNNEL=m 307CONFIG_INET_XFRM_MODE_TUNNEL=m
308CONFIG_INET_XFRM_MODE_BEET=m
285CONFIG_INET_DIAG=y 309CONFIG_INET_DIAG=y
286CONFIG_INET_TCP_DIAG=y 310CONFIG_INET_TCP_DIAG=y
287# CONFIG_TCP_CONG_ADVANCED is not set 311# CONFIG_TCP_CONG_ADVANCED is not set
288CONFIG_TCP_CONG_BIC=y 312CONFIG_TCP_CONG_CUBIC=y
313CONFIG_DEFAULT_TCP_CONG="cubic"
314CONFIG_TCP_MD5SIG=y
289# CONFIG_IPV6 is not set 315# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set 316# CONFIG_INET6_XFRM_TUNNEL is not set
291# CONFIG_INET6_TUNNEL is not set 317# CONFIG_INET6_TUNNEL is not set
@@ -315,7 +341,6 @@ CONFIG_NETWORK_SECMARK=y
315# CONFIG_ATALK is not set 341# CONFIG_ATALK is not set
316# CONFIG_X25 is not set 342# CONFIG_X25 is not set
317# CONFIG_LAPB is not set 343# CONFIG_LAPB is not set
318# CONFIG_NET_DIVERT is not set
319# CONFIG_ECONET is not set 344# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set 345# CONFIG_WAN_ROUTER is not set
321 346
@@ -363,6 +388,7 @@ CONFIG_CONNECTOR=m
363# 388#
364# Plug and Play support 389# Plug and Play support
365# 390#
391# CONFIG_PNPACPI is not set
366 392
367# 393#
368# Block devices 394# Block devices
@@ -378,14 +404,22 @@ CONFIG_CONNECTOR=m
378CONFIG_BLK_DEV_RAM=y 404CONFIG_BLK_DEV_RAM=y
379CONFIG_BLK_DEV_RAM_COUNT=16 405CONFIG_BLK_DEV_RAM_COUNT=16
380CONFIG_BLK_DEV_RAM_SIZE=4096 406CONFIG_BLK_DEV_RAM_SIZE=4096
407CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
381# CONFIG_BLK_DEV_INITRD is not set 408# CONFIG_BLK_DEV_INITRD is not set
382# CONFIG_CDROM_PKTCDVD is not set 409# CONFIG_CDROM_PKTCDVD is not set
383# CONFIG_ATA_OVER_ETH is not set 410# CONFIG_ATA_OVER_ETH is not set
384 411
385# 412#
413# Misc devices
414#
415CONFIG_SGI_IOC4=m
416# CONFIG_TIFM_CORE is not set
417
418#
386# ATA/ATAPI/MFM/RLL support 419# ATA/ATAPI/MFM/RLL support
387# 420#
388CONFIG_IDE=y 421CONFIG_IDE=y
422CONFIG_IDE_MAX_HWIFS=4
389CONFIG_BLK_DEV_IDE=y 423CONFIG_BLK_DEV_IDE=y
390 424
391# 425#
@@ -414,6 +448,12 @@ CONFIG_IDE_GENERIC=y
414# 448#
415# CONFIG_RAID_ATTRS is not set 449# CONFIG_RAID_ATTRS is not set
416# CONFIG_SCSI is not set 450# CONFIG_SCSI is not set
451# CONFIG_SCSI_NETLINK is not set
452
453#
454# Serial ATA (prod) and Parallel ATA (experimental) drivers
455#
456# CONFIG_ATA is not set
417 457
418# 458#
419# Multi-device support (RAID and LVM) 459# Multi-device support (RAID and LVM)
@@ -464,6 +504,8 @@ CONFIG_LXT_PHY=m
464CONFIG_CICADA_PHY=m 504CONFIG_CICADA_PHY=m
465CONFIG_VITESSE_PHY=m 505CONFIG_VITESSE_PHY=m
466CONFIG_SMSC_PHY=m 506CONFIG_SMSC_PHY=m
507# CONFIG_BROADCOM_PHY is not set
508# CONFIG_FIXED_PHY is not set
467 509
468# 510#
469# Ethernet (10 or 100Mbit) 511# Ethernet (10 or 100Mbit)
@@ -504,7 +546,7 @@ CONFIG_8139TOO_PIO=y
504# CONFIG_SUNDANCE is not set 546# CONFIG_SUNDANCE is not set
505# CONFIG_TLAN is not set 547# CONFIG_TLAN is not set
506# CONFIG_VIA_RHINE is not set 548# CONFIG_VIA_RHINE is not set
507# CONFIG_LAN_SAA9730 is not set 549# CONFIG_SC92031 is not set
508 550
509# 551#
510# Ethernet (1000 Mbit) 552# Ethernet (1000 Mbit)
@@ -523,14 +565,18 @@ CONFIG_8139TOO_PIO=y
523# CONFIG_VIA_VELOCITY is not set 565# CONFIG_VIA_VELOCITY is not set
524# CONFIG_TIGON3 is not set 566# CONFIG_TIGON3 is not set
525# CONFIG_BNX2 is not set 567# CONFIG_BNX2 is not set
568CONFIG_QLA3XXX=m
569# CONFIG_ATL1 is not set
526 570
527# 571#
528# Ethernet (10000 Mbit) 572# Ethernet (10000 Mbit)
529# 573#
530# CONFIG_CHELSIO_T1 is not set 574# CONFIG_CHELSIO_T1 is not set
575CONFIG_CHELSIO_T3=m
531# CONFIG_IXGB is not set 576# CONFIG_IXGB is not set
532# CONFIG_S2IO is not set 577# CONFIG_S2IO is not set
533# CONFIG_MYRI10GE is not set 578# CONFIG_MYRI10GE is not set
579CONFIG_NETXEN_NIC=m
534 580
535# 581#
536# Token Ring devices 582# Token Ring devices
@@ -569,6 +615,7 @@ CONFIG_8139TOO_PIO=y
569# Input device support 615# Input device support
570# 616#
571CONFIG_INPUT=y 617CONFIG_INPUT=y
618# CONFIG_INPUT_FF_MEMLESS is not set
572 619
573# 620#
574# Userland interfaces 621# Userland interfaces
@@ -635,10 +682,6 @@ CONFIG_LEGACY_PTY_COUNT=256
635# CONFIG_DTLK is not set 682# CONFIG_DTLK is not set
636# CONFIG_R3964 is not set 683# CONFIG_R3964 is not set
637# CONFIG_APPLICOM is not set 684# CONFIG_APPLICOM is not set
638
639#
640# Ftape, the floppy tape device driver
641#
642# CONFIG_DRM is not set 685# CONFIG_DRM is not set
643CONFIG_GPIO_VR41XX=y 686CONFIG_GPIO_VR41XX=y
644# CONFIG_RAW_DRIVER is not set 687# CONFIG_RAW_DRIVER is not set
@@ -647,7 +690,6 @@ CONFIG_GPIO_VR41XX=y
647# TPM devices 690# TPM devices
648# 691#
649# CONFIG_TCG_TPM is not set 692# CONFIG_TCG_TPM is not set
650# CONFIG_TELCLOCK is not set
651 693
652# 694#
653# I2C support 695# I2C support
@@ -672,14 +714,9 @@ CONFIG_GPIO_VR41XX=y
672# CONFIG_HWMON_VID is not set 714# CONFIG_HWMON_VID is not set
673 715
674# 716#
675# Misc devices
676#
677
678#
679# Multimedia devices 717# Multimedia devices
680# 718#
681# CONFIG_VIDEO_DEV is not set 719# CONFIG_VIDEO_DEV is not set
682CONFIG_VIDEO_V4L2=y
683 720
684# 721#
685# Digital Video Broadcasting Devices 722# Digital Video Broadcasting Devices
@@ -697,6 +734,7 @@ CONFIG_VIDEO_V4L2=y
697# 734#
698# CONFIG_VGA_CONSOLE is not set 735# CONFIG_VGA_CONSOLE is not set
699CONFIG_DUMMY_CONSOLE=y 736CONFIG_DUMMY_CONSOLE=y
737# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
700 738
701# 739#
702# Sound 740# Sound
@@ -704,6 +742,11 @@ CONFIG_DUMMY_CONSOLE=y
704# CONFIG_SOUND is not set 742# CONFIG_SOUND is not set
705 743
706# 744#
745# HID Devices
746#
747# CONFIG_HID is not set
748
749#
707# USB support 750# USB support
708# 751#
709CONFIG_USB_ARCH_HAS_HCD=y 752CONFIG_USB_ARCH_HAS_HCD=y
@@ -754,6 +797,7 @@ CONFIG_RTC_LIB=y
754CONFIG_RTC_CLASS=y 797CONFIG_RTC_CLASS=y
755CONFIG_RTC_HCTOSYS=y 798CONFIG_RTC_HCTOSYS=y
756CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 799CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
800# CONFIG_RTC_DEBUG is not set
757 801
758# 802#
759# RTC interfaces 803# RTC interfaces
@@ -787,16 +831,26 @@ CONFIG_RTC_DRV_VR41XX=y
787# 831#
788 832
789# 833#
834# Auxiliary Display support
835#
836
837#
838# Virtualization
839#
840
841#
790# File systems 842# File systems
791# 843#
792CONFIG_EXT2_FS=y 844CONFIG_EXT2_FS=y
793# CONFIG_EXT2_FS_XATTR is not set 845# CONFIG_EXT2_FS_XATTR is not set
794# CONFIG_EXT2_FS_XIP is not set 846# CONFIG_EXT2_FS_XIP is not set
795# CONFIG_EXT3_FS is not set 847# CONFIG_EXT3_FS is not set
848# CONFIG_EXT4DEV_FS is not set
796# CONFIG_REISERFS_FS is not set 849# CONFIG_REISERFS_FS is not set
797# CONFIG_JFS_FS is not set 850# CONFIG_JFS_FS is not set
798# CONFIG_FS_POSIX_ACL is not set 851CONFIG_FS_POSIX_ACL=y
799# CONFIG_XFS_FS is not set 852# CONFIG_XFS_FS is not set
853# CONFIG_GFS2_FS is not set
800# CONFIG_OCFS2_FS is not set 854# CONFIG_OCFS2_FS is not set
801# CONFIG_MINIX_FS is not set 855# CONFIG_MINIX_FS is not set
802# CONFIG_ROMFS_FS is not set 856# CONFIG_ROMFS_FS is not set
@@ -807,6 +861,7 @@ CONFIG_DNOTIFY=y
807# CONFIG_AUTOFS_FS is not set 861# CONFIG_AUTOFS_FS is not set
808CONFIG_AUTOFS4_FS=y 862CONFIG_AUTOFS4_FS=y
809CONFIG_FUSE_FS=m 863CONFIG_FUSE_FS=m
864CONFIG_GENERIC_ACL=y
810 865
811# 866#
812# CD-ROM/DVD Filesystems 867# CD-ROM/DVD Filesystems
@@ -826,11 +881,13 @@ CONFIG_FUSE_FS=m
826# 881#
827CONFIG_PROC_FS=y 882CONFIG_PROC_FS=y
828CONFIG_PROC_KCORE=y 883CONFIG_PROC_KCORE=y
884CONFIG_PROC_SYSCTL=y
829CONFIG_SYSFS=y 885CONFIG_SYSFS=y
830CONFIG_TMPFS=y 886CONFIG_TMPFS=y
887CONFIG_TMPFS_POSIX_ACL=y
831# CONFIG_HUGETLB_PAGE is not set 888# CONFIG_HUGETLB_PAGE is not set
832CONFIG_RAMFS=y 889CONFIG_RAMFS=y
833# CONFIG_CONFIGFS_FS is not set 890CONFIG_CONFIGFS_FS=m
834 891
835# 892#
836# Miscellaneous filesystems 893# Miscellaneous filesystems
@@ -868,7 +925,6 @@ CONFIG_SUNRPC=y
868# CONFIG_RPCSEC_GSS_SPKM3 is not set 925# CONFIG_RPCSEC_GSS_SPKM3 is not set
869# CONFIG_SMB_FS is not set 926# CONFIG_SMB_FS is not set
870# CONFIG_CIFS is not set 927# CONFIG_CIFS is not set
871# CONFIG_CIFS_DEBUG2 is not set
872# CONFIG_NCP_FS is not set 928# CONFIG_NCP_FS is not set
873# CONFIG_CODA_FS is not set 929# CONFIG_CODA_FS is not set
874# CONFIG_AFS_FS is not set 930# CONFIG_AFS_FS is not set
@@ -886,6 +942,14 @@ CONFIG_MSDOS_PARTITION=y
886# CONFIG_NLS is not set 942# CONFIG_NLS is not set
887 943
888# 944#
945# Distributed Lock Manager
946#
947CONFIG_DLM=m
948CONFIG_DLM_TCP=y
949# CONFIG_DLM_SCTP is not set
950# CONFIG_DLM_DEBUG is not set
951
952#
889# Profiling support 953# Profiling support
890# 954#
891# CONFIG_PROFILING is not set 955# CONFIG_PROFILING is not set
@@ -895,11 +959,13 @@ CONFIG_MSDOS_PARTITION=y
895# 959#
896CONFIG_TRACE_IRQFLAGS_SUPPORT=y 960CONFIG_TRACE_IRQFLAGS_SUPPORT=y
897# CONFIG_PRINTK_TIME is not set 961# CONFIG_PRINTK_TIME is not set
962CONFIG_ENABLE_MUST_CHECK=y
898# CONFIG_MAGIC_SYSRQ is not set 963# CONFIG_MAGIC_SYSRQ is not set
899# CONFIG_UNUSED_SYMBOLS is not set 964# CONFIG_UNUSED_SYMBOLS is not set
965# CONFIG_DEBUG_FS is not set
966# CONFIG_HEADERS_CHECK is not set
900# CONFIG_DEBUG_KERNEL is not set 967# CONFIG_DEBUG_KERNEL is not set
901CONFIG_LOG_BUF_SHIFT=14 968CONFIG_LOG_BUF_SHIFT=14
902# CONFIG_DEBUG_FS is not set
903CONFIG_CROSSCOMPILE=y 969CONFIG_CROSSCOMPILE=y
904CONFIG_CMDLINE="mem=32M console=ttyVR0,38400" 970CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
905 971
@@ -912,7 +978,44 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
912# 978#
913# Cryptographic options 979# Cryptographic options
914# 980#
915# CONFIG_CRYPTO is not set 981CONFIG_CRYPTO=y
982CONFIG_CRYPTO_ALGAPI=y
983CONFIG_CRYPTO_BLKCIPHER=m
984CONFIG_CRYPTO_HASH=m
985CONFIG_CRYPTO_MANAGER=m
986CONFIG_CRYPTO_HMAC=m
987CONFIG_CRYPTO_XCBC=m
988CONFIG_CRYPTO_NULL=m
989CONFIG_CRYPTO_MD4=m
990CONFIG_CRYPTO_MD5=y
991CONFIG_CRYPTO_SHA1=m
992CONFIG_CRYPTO_SHA256=m
993CONFIG_CRYPTO_SHA512=m
994CONFIG_CRYPTO_WP512=m
995CONFIG_CRYPTO_TGR192=m
996CONFIG_CRYPTO_GF128MUL=m
997CONFIG_CRYPTO_ECB=m
998CONFIG_CRYPTO_CBC=m
999CONFIG_CRYPTO_PCBC=m
1000CONFIG_CRYPTO_LRW=m
1001CONFIG_CRYPTO_DES=m
1002CONFIG_CRYPTO_FCRYPT=m
1003CONFIG_CRYPTO_BLOWFISH=m
1004CONFIG_CRYPTO_TWOFISH=m
1005CONFIG_CRYPTO_TWOFISH_COMMON=m
1006CONFIG_CRYPTO_SERPENT=m
1007CONFIG_CRYPTO_AES=m
1008CONFIG_CRYPTO_CAST5=m
1009CONFIG_CRYPTO_CAST6=m
1010CONFIG_CRYPTO_TEA=m
1011CONFIG_CRYPTO_ARC4=m
1012CONFIG_CRYPTO_KHAZAD=m
1013CONFIG_CRYPTO_ANUBIS=m
1014CONFIG_CRYPTO_DEFLATE=m
1015CONFIG_CRYPTO_MICHAEL_MIC=m
1016# CONFIG_CRYPTO_CRC32C is not set
1017CONFIG_CRYPTO_CAMELLIA=m
1018# CONFIG_CRYPTO_TEST is not set
916 1019
917# 1020#
918# Hardware crypto devices 1021# Hardware crypto devices
@@ -921,8 +1024,13 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
921# 1024#
922# Library routines 1025# Library routines
923# 1026#
1027CONFIG_BITREVERSE=y
924# CONFIG_CRC_CCITT is not set 1028# CONFIG_CRC_CCITT is not set
925# CONFIG_CRC16 is not set 1029# CONFIG_CRC16 is not set
926CONFIG_CRC32=y 1030CONFIG_CRC32=y
927# CONFIG_LIBCRC32C is not set 1031# CONFIG_LIBCRC32C is not set
1032CONFIG_ZLIB_INFLATE=m
1033CONFIG_ZLIB_DEFLATE=m
928CONFIG_PLIST=y 1034CONFIG_PLIST=y
1035CONFIG_HAS_IOMEM=y
1036CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 0607fc239087..9090a7aba6c1 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:25 2006 4# Tue Feb 20 21:47:24 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25CONFIG_MIPS_COBALT=y 26CONFIG_MIPS_COBALT=y
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_COBALT=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_MIPS_COBALT=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_EARLY_PRINTK=y 66CONFIG_EARLY_PRINTK=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
74CONFIG_I8259=y 78CONFIG_I8259=y
@@ -117,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_16KB is not set 121# CONFIG_PAGE_SIZE_16KB is not set
118# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
119CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_CPU_HAS_LLSC=y 127CONFIG_CPU_HAS_LLSC=y
124CONFIG_CPU_HAS_SYNC=y 128CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +138,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 138# CONFIG_SPARSEMEM_STATIC is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 139CONFIG_SPLIT_PTLOCK_CPUS=4
136# CONFIG_RESOURCES_64BIT is not set 140# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1
137# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -146,6 +151,7 @@ CONFIG_HZ=1000
146CONFIG_PREEMPT_NONE=y 151CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 152# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 153# CONFIG_PREEMPT is not set
154# CONFIG_KEXEC is not set
149CONFIG_LOCKDEP_SUPPORT=y 155CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 156CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -164,15 +170,20 @@ CONFIG_LOCALVERSION=""
164CONFIG_LOCALVERSION_AUTO=y 170CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 171CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 172CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set
174CONFIG_SYSVIPC_SYSCTL=y
167# CONFIG_POSIX_MQUEUE is not set 175# CONFIG_POSIX_MQUEUE is not set
168# CONFIG_BSD_PROCESS_ACCT is not set 176# CONFIG_BSD_PROCESS_ACCT is not set
169CONFIG_SYSCTL=y 177# CONFIG_TASKSTATS is not set
178# CONFIG_UTS_NS is not set
170# CONFIG_AUDIT is not set 179# CONFIG_AUDIT is not set
171# CONFIG_IKCONFIG is not set 180# CONFIG_IKCONFIG is not set
181CONFIG_SYSFS_DEPRECATED=y
172CONFIG_RELAY=y 182CONFIG_RELAY=y
173CONFIG_INITRAMFS_SOURCE=""
174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 183# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
184CONFIG_SYSCTL=y
175CONFIG_EMBEDDED=y 185CONFIG_EMBEDDED=y
186CONFIG_SYSCTL_SYSCALL=y
176CONFIG_KALLSYMS=y 187CONFIG_KALLSYMS=y
177# CONFIG_KALLSYMS_EXTRA_PASS is not set 188# CONFIG_KALLSYMS_EXTRA_PASS is not set
178CONFIG_HOTPLUG=y 189CONFIG_HOTPLUG=y
@@ -180,12 +191,12 @@ CONFIG_PRINTK=y
180CONFIG_BUG=y 191CONFIG_BUG=y
181CONFIG_ELF_CORE=y 192CONFIG_ELF_CORE=y
182CONFIG_BASE_FULL=y 193CONFIG_BASE_FULL=y
183CONFIG_RT_MUTEXES=y
184CONFIG_FUTEX=y 194CONFIG_FUTEX=y
185CONFIG_EPOLL=y 195CONFIG_EPOLL=y
186CONFIG_SHMEM=y 196CONFIG_SHMEM=y
187CONFIG_SLAB=y 197CONFIG_SLAB=y
188CONFIG_VM_EVENT_COUNTERS=y 198CONFIG_VM_EVENT_COUNTERS=y
199CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 200# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 201CONFIG_BASE_SMALL=0
191# CONFIG_SLOB is not set 202# CONFIG_SLOB is not set
@@ -198,6 +209,7 @@ CONFIG_BASE_SMALL=0
198# 209#
199# Block layer 210# Block layer
200# 211#
212CONFIG_BLOCK=y
201# CONFIG_LBD is not set 213# CONFIG_LBD is not set
202# CONFIG_BLK_DEV_IO_TRACE is not set 214# CONFIG_BLK_DEV_IO_TRACE is not set
203# CONFIG_LSF is not set 215# CONFIG_LSF is not set
@@ -240,6 +252,14 @@ CONFIG_BINFMT_ELF=y
240CONFIG_TRAD_SIGNALS=y 252CONFIG_TRAD_SIGNALS=y
241 253
242# 254#
255# Power management options
256#
257CONFIG_PM=y
258# CONFIG_PM_LEGACY is not set
259# CONFIG_PM_DEBUG is not set
260# CONFIG_PM_SYSFS_DEPRECATED is not set
261
262#
243# Networking 263# Networking
244# 264#
245CONFIG_NET=y 265CONFIG_NET=y
@@ -253,7 +273,10 @@ CONFIG_PACKET=y
253CONFIG_UNIX=y 273CONFIG_UNIX=y
254CONFIG_XFRM=y 274CONFIG_XFRM=y
255CONFIG_XFRM_USER=y 275CONFIG_XFRM_USER=y
276# CONFIG_XFRM_SUB_POLICY is not set
277CONFIG_XFRM_MIGRATE=y
256CONFIG_NET_KEY=y 278CONFIG_NET_KEY=y
279CONFIG_NET_KEY_MIGRATE=y
257CONFIG_INET=y 280CONFIG_INET=y
258# CONFIG_IP_MULTICAST is not set 281# CONFIG_IP_MULTICAST is not set
259# CONFIG_IP_ADVANCED_ROUTER is not set 282# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +293,13 @@ CONFIG_IP_FIB_HASH=y
270# CONFIG_INET_TUNNEL is not set 293# CONFIG_INET_TUNNEL is not set
271CONFIG_INET_XFRM_MODE_TRANSPORT=y 294CONFIG_INET_XFRM_MODE_TRANSPORT=y
272CONFIG_INET_XFRM_MODE_TUNNEL=y 295CONFIG_INET_XFRM_MODE_TUNNEL=y
296CONFIG_INET_XFRM_MODE_BEET=y
273CONFIG_INET_DIAG=y 297CONFIG_INET_DIAG=y
274CONFIG_INET_TCP_DIAG=y 298CONFIG_INET_TCP_DIAG=y
275# CONFIG_TCP_CONG_ADVANCED is not set 299# CONFIG_TCP_CONG_ADVANCED is not set
276CONFIG_TCP_CONG_BIC=y 300CONFIG_TCP_CONG_CUBIC=y
301CONFIG_DEFAULT_TCP_CONG="cubic"
302CONFIG_TCP_MD5SIG=y
277# CONFIG_IPV6 is not set 303# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set 304# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set 305# CONFIG_INET6_TUNNEL is not set
@@ -303,7 +329,6 @@ CONFIG_NETWORK_SECMARK=y
303# CONFIG_ATALK is not set 329# CONFIG_ATALK is not set
304# CONFIG_X25 is not set 330# CONFIG_X25 is not set
305# CONFIG_LAPB is not set 331# CONFIG_LAPB is not set
306# CONFIG_NET_DIVERT is not set
307# CONFIG_ECONET is not set 332# CONFIG_ECONET is not set
308# CONFIG_WAN_ROUTER is not set 333# CONFIG_WAN_ROUTER is not set
309 334
@@ -348,7 +373,87 @@ CONFIG_PROC_EVENTS=y
348# 373#
349# Memory Technology Devices (MTD) 374# Memory Technology Devices (MTD)
350# 375#
351# CONFIG_MTD is not set 376CONFIG_MTD=y
377# CONFIG_MTD_DEBUG is not set
378# CONFIG_MTD_CONCAT is not set
379CONFIG_MTD_PARTITIONS=y
380# CONFIG_MTD_REDBOOT_PARTS is not set
381# CONFIG_MTD_CMDLINE_PARTS is not set
382
383#
384# User Modules And Translation Layers
385#
386CONFIG_MTD_CHAR=y
387CONFIG_MTD_BLKDEVS=y
388# CONFIG_MTD_BLOCK is not set
389# CONFIG_MTD_BLOCK_RO is not set
390# CONFIG_FTL is not set
391# CONFIG_NFTL is not set
392# CONFIG_INFTL is not set
393# CONFIG_RFD_FTL is not set
394# CONFIG_SSFDC is not set
395
396#
397# RAM/ROM/Flash chip drivers
398#
399# CONFIG_MTD_CFI is not set
400CONFIG_MTD_JEDECPROBE=y
401CONFIG_MTD_GEN_PROBE=y
402# CONFIG_MTD_CFI_ADV_OPTIONS is not set
403CONFIG_MTD_MAP_BANK_WIDTH_1=y
404CONFIG_MTD_MAP_BANK_WIDTH_2=y
405CONFIG_MTD_MAP_BANK_WIDTH_4=y
406# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
407# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
408# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
409CONFIG_MTD_CFI_I1=y
410CONFIG_MTD_CFI_I2=y
411# CONFIG_MTD_CFI_I4 is not set
412# CONFIG_MTD_CFI_I8 is not set
413# CONFIG_MTD_CFI_INTELEXT is not set
414CONFIG_MTD_CFI_AMDSTD=y
415# CONFIG_MTD_CFI_STAA is not set
416CONFIG_MTD_CFI_UTIL=y
417# CONFIG_MTD_RAM is not set
418# CONFIG_MTD_ROM is not set
419# CONFIG_MTD_ABSENT is not set
420# CONFIG_MTD_OBSOLETE_CHIPS is not set
421
422#
423# Mapping drivers for chip access
424#
425# CONFIG_MTD_COMPLEX_MAPPINGS is not set
426CONFIG_MTD_PHYSMAP=y
427CONFIG_MTD_PHYSMAP_START=0x0
428CONFIG_MTD_PHYSMAP_LEN=0x0
429CONFIG_MTD_PHYSMAP_BANKWIDTH=0
430# CONFIG_MTD_PLATRAM is not set
431
432#
433# Self-contained MTD device drivers
434#
435# CONFIG_MTD_PMC551 is not set
436# CONFIG_MTD_SLRAM is not set
437# CONFIG_MTD_PHRAM is not set
438# CONFIG_MTD_MTDRAM is not set
439# CONFIG_MTD_BLOCK2MTD is not set
440
441#
442# Disk-On-Chip Device Drivers
443#
444# CONFIG_MTD_DOC2000 is not set
445# CONFIG_MTD_DOC2001 is not set
446# CONFIG_MTD_DOC2001PLUS is not set
447
448#
449# NAND Flash Device Drivers
450#
451# CONFIG_MTD_NAND is not set
452
453#
454# OneNAND Flash Device Drivers
455#
456# CONFIG_MTD_ONENAND is not set
352 457
353# 458#
354# Parallel port support 459# Parallel port support
@@ -358,6 +463,7 @@ CONFIG_PROC_EVENTS=y
358# 463#
359# Plug and Play support 464# Plug and Play support
360# 465#
466# CONFIG_PNPACPI is not set
361 467
362# 468#
363# Block devices 469# Block devices
@@ -379,9 +485,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
379CONFIG_ATA_OVER_ETH=y 485CONFIG_ATA_OVER_ETH=y
380 486
381# 487#
488# Misc devices
489#
490CONFIG_SGI_IOC4=y
491# CONFIG_TIFM_CORE is not set
492
493#
382# ATA/ATAPI/MFM/RLL support 494# ATA/ATAPI/MFM/RLL support
383# 495#
384CONFIG_IDE=y 496CONFIG_IDE=y
497CONFIG_IDE_MAX_HWIFS=4
385CONFIG_BLK_DEV_IDE=y 498CONFIG_BLK_DEV_IDE=y
386 499
387# 500#
@@ -417,8 +530,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
417# CONFIG_BLK_DEV_CS5530 is not set 530# CONFIG_BLK_DEV_CS5530 is not set
418# CONFIG_BLK_DEV_HPT34X is not set 531# CONFIG_BLK_DEV_HPT34X is not set
419# CONFIG_BLK_DEV_HPT366 is not set 532# CONFIG_BLK_DEV_HPT366 is not set
533# CONFIG_BLK_DEV_JMICRON is not set
420# CONFIG_BLK_DEV_SC1200 is not set 534# CONFIG_BLK_DEV_SC1200 is not set
421# CONFIG_BLK_DEV_PIIX is not set 535# CONFIG_BLK_DEV_PIIX is not set
536CONFIG_BLK_DEV_IT8213=y
422# CONFIG_BLK_DEV_IT821X is not set 537# CONFIG_BLK_DEV_IT821X is not set
423# CONFIG_BLK_DEV_NS87415 is not set 538# CONFIG_BLK_DEV_NS87415 is not set
424# CONFIG_BLK_DEV_PDC202XX_OLD is not set 539# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -428,6 +543,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
428# CONFIG_BLK_DEV_SLC90E66 is not set 543# CONFIG_BLK_DEV_SLC90E66 is not set
429# CONFIG_BLK_DEV_TRM290 is not set 544# CONFIG_BLK_DEV_TRM290 is not set
430CONFIG_BLK_DEV_VIA82CXXX=y 545CONFIG_BLK_DEV_VIA82CXXX=y
546CONFIG_BLK_DEV_TC86C001=y
431# CONFIG_IDE_ARM is not set 547# CONFIG_IDE_ARM is not set
432CONFIG_BLK_DEV_IDEDMA=y 548CONFIG_BLK_DEV_IDEDMA=y
433# CONFIG_IDEDMA_IVB is not set 549# CONFIG_IDEDMA_IVB is not set
@@ -439,6 +555,12 @@ CONFIG_BLK_DEV_IDEDMA=y
439# 555#
440CONFIG_RAID_ATTRS=y 556CONFIG_RAID_ATTRS=y
441# CONFIG_SCSI is not set 557# CONFIG_SCSI is not set
558# CONFIG_SCSI_NETLINK is not set
559
560#
561# Serial ATA (prod) and Parallel ATA (experimental) drivers
562#
563# CONFIG_ATA is not set
442 564
443# 565#
444# Multi-device support (RAID and LVM) 566# Multi-device support (RAID and LVM)
@@ -489,6 +611,8 @@ CONFIG_LXT_PHY=y
489CONFIG_CICADA_PHY=y 611CONFIG_CICADA_PHY=y
490CONFIG_VITESSE_PHY=y 612CONFIG_VITESSE_PHY=y
491CONFIG_SMSC_PHY=y 613CONFIG_SMSC_PHY=y
614# CONFIG_BROADCOM_PHY is not set
615# CONFIG_FIXED_PHY is not set
492 616
493# 617#
494# Ethernet (10 or 100Mbit) 618# Ethernet (10 or 100Mbit)
@@ -533,14 +657,18 @@ CONFIG_TULIP=y
533# CONFIG_SK98LIN is not set 657# CONFIG_SK98LIN is not set
534# CONFIG_TIGON3 is not set 658# CONFIG_TIGON3 is not set
535# CONFIG_BNX2 is not set 659# CONFIG_BNX2 is not set
660CONFIG_QLA3XXX=y
661# CONFIG_ATL1 is not set
536 662
537# 663#
538# Ethernet (10000 Mbit) 664# Ethernet (10000 Mbit)
539# 665#
540# CONFIG_CHELSIO_T1 is not set 666# CONFIG_CHELSIO_T1 is not set
667CONFIG_CHELSIO_T3=y
541# CONFIG_IXGB is not set 668# CONFIG_IXGB is not set
542# CONFIG_S2IO is not set 669# CONFIG_S2IO is not set
543# CONFIG_MYRI10GE is not set 670# CONFIG_MYRI10GE is not set
671CONFIG_NETXEN_NIC=y
544 672
545# 673#
546# Token Ring devices 674# Token Ring devices
@@ -579,6 +707,7 @@ CONFIG_TULIP=y
579# Input device support 707# Input device support
580# 708#
581CONFIG_INPUT=y 709CONFIG_INPUT=y
710# CONFIG_INPUT_FF_MEMLESS is not set
582 711
583# 712#
584# Userland interfaces 713# Userland interfaces
@@ -656,10 +785,6 @@ CONFIG_COBALT_LCD=y
656# CONFIG_DTLK is not set 785# CONFIG_DTLK is not set
657# CONFIG_R3964 is not set 786# CONFIG_R3964 is not set
658# CONFIG_APPLICOM is not set 787# CONFIG_APPLICOM is not set
659
660#
661# Ftape, the floppy tape device driver
662#
663# CONFIG_DRM is not set 788# CONFIG_DRM is not set
664# CONFIG_RAW_DRIVER is not set 789# CONFIG_RAW_DRIVER is not set
665 790
@@ -667,7 +792,6 @@ CONFIG_COBALT_LCD=y
667# TPM devices 792# TPM devices
668# 793#
669# CONFIG_TCG_TPM is not set 794# CONFIG_TCG_TPM is not set
670# CONFIG_TELCLOCK is not set
671 795
672# 796#
673# I2C support 797# I2C support
@@ -692,14 +816,9 @@ CONFIG_COBALT_LCD=y
692# CONFIG_HWMON_VID is not set 816# CONFIG_HWMON_VID is not set
693 817
694# 818#
695# Misc devices
696#
697
698#
699# Multimedia devices 819# Multimedia devices
700# 820#
701# CONFIG_VIDEO_DEV is not set 821# CONFIG_VIDEO_DEV is not set
702CONFIG_VIDEO_V4L2=y
703 822
704# 823#
705# Digital Video Broadcasting Devices 824# Digital Video Broadcasting Devices
@@ -717,6 +836,7 @@ CONFIG_VIDEO_V4L2=y
717# 836#
718# CONFIG_VGA_CONSOLE is not set 837# CONFIG_VGA_CONSOLE is not set
719CONFIG_DUMMY_CONSOLE=y 838CONFIG_DUMMY_CONSOLE=y
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
720 840
721# 841#
722# Sound 842# Sound
@@ -724,6 +844,11 @@ CONFIG_DUMMY_CONSOLE=y
724# CONFIG_SOUND is not set 844# CONFIG_SOUND is not set
725 845
726# 846#
847# HID Devices
848#
849# CONFIG_HID is not set
850
851#
727# USB support 852# USB support
728# 853#
729CONFIG_USB_ARCH_HAS_HCD=y 854CONFIG_USB_ARCH_HAS_HCD=y
@@ -786,6 +911,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
786# 911#
787 912
788# 913#
914# Auxiliary Display support
915#
916
917#
918# Virtualization
919#
920
921#
789# File systems 922# File systems
790# 923#
791CONFIG_EXT2_FS=y 924CONFIG_EXT2_FS=y
@@ -794,11 +927,13 @@ CONFIG_EXT2_FS_POSIX_ACL=y
794CONFIG_EXT2_FS_SECURITY=y 927CONFIG_EXT2_FS_SECURITY=y
795# CONFIG_EXT2_FS_XIP is not set 928# CONFIG_EXT2_FS_XIP is not set
796# CONFIG_EXT3_FS is not set 929# CONFIG_EXT3_FS is not set
930# CONFIG_EXT4DEV_FS is not set
797CONFIG_FS_MBCACHE=y 931CONFIG_FS_MBCACHE=y
798# CONFIG_REISERFS_FS is not set 932# CONFIG_REISERFS_FS is not set
799# CONFIG_JFS_FS is not set 933# CONFIG_JFS_FS is not set
800CONFIG_FS_POSIX_ACL=y 934CONFIG_FS_POSIX_ACL=y
801# CONFIG_XFS_FS is not set 935# CONFIG_XFS_FS is not set
936# CONFIG_GFS2_FS is not set
802# CONFIG_OCFS2_FS is not set 937# CONFIG_OCFS2_FS is not set
803# CONFIG_MINIX_FS is not set 938# CONFIG_MINIX_FS is not set
804# CONFIG_ROMFS_FS is not set 939# CONFIG_ROMFS_FS is not set
@@ -809,6 +944,7 @@ CONFIG_DNOTIFY=y
809# CONFIG_AUTOFS_FS is not set 944# CONFIG_AUTOFS_FS is not set
810# CONFIG_AUTOFS4_FS is not set 945# CONFIG_AUTOFS4_FS is not set
811CONFIG_FUSE_FS=y 946CONFIG_FUSE_FS=y
947CONFIG_GENERIC_ACL=y
812 948
813# 949#
814# CD-ROM/DVD Filesystems 950# CD-ROM/DVD Filesystems
@@ -828,22 +964,26 @@ CONFIG_FUSE_FS=y
828# 964#
829CONFIG_PROC_FS=y 965CONFIG_PROC_FS=y
830CONFIG_PROC_KCORE=y 966CONFIG_PROC_KCORE=y
967CONFIG_PROC_SYSCTL=y
831CONFIG_SYSFS=y 968CONFIG_SYSFS=y
832CONFIG_TMPFS=y 969CONFIG_TMPFS=y
970CONFIG_TMPFS_POSIX_ACL=y
833# CONFIG_HUGETLB_PAGE is not set 971# CONFIG_HUGETLB_PAGE is not set
834CONFIG_RAMFS=y 972CONFIG_RAMFS=y
835# CONFIG_CONFIGFS_FS is not set 973CONFIG_CONFIGFS_FS=y
836 974
837# 975#
838# Miscellaneous filesystems 976# Miscellaneous filesystems
839# 977#
840# CONFIG_ADFS_FS is not set 978# CONFIG_ADFS_FS is not set
841# CONFIG_AFFS_FS is not set 979# CONFIG_AFFS_FS is not set
980# CONFIG_ECRYPT_FS is not set
842# CONFIG_HFS_FS is not set 981# CONFIG_HFS_FS is not set
843# CONFIG_HFSPLUS_FS is not set 982# CONFIG_HFSPLUS_FS is not set
844# CONFIG_BEFS_FS is not set 983# CONFIG_BEFS_FS is not set
845# CONFIG_BFS_FS is not set 984# CONFIG_BFS_FS is not set
846# CONFIG_EFS_FS is not set 985# CONFIG_EFS_FS is not set
986# CONFIG_JFFS2_FS is not set
847# CONFIG_CRAMFS is not set 987# CONFIG_CRAMFS is not set
848# CONFIG_VXFS_FS is not set 988# CONFIG_VXFS_FS is not set
849# CONFIG_HPFS_FS is not set 989# CONFIG_HPFS_FS is not set
@@ -866,7 +1006,6 @@ CONFIG_SUNRPC=y
866# CONFIG_RPCSEC_GSS_SPKM3 is not set 1006# CONFIG_RPCSEC_GSS_SPKM3 is not set
867# CONFIG_SMB_FS is not set 1007# CONFIG_SMB_FS is not set
868# CONFIG_CIFS is not set 1008# CONFIG_CIFS is not set
869# CONFIG_CIFS_DEBUG2 is not set
870# CONFIG_NCP_FS is not set 1009# CONFIG_NCP_FS is not set
871# CONFIG_CODA_FS is not set 1010# CONFIG_CODA_FS is not set
872# CONFIG_AFS_FS is not set 1011# CONFIG_AFS_FS is not set
@@ -884,6 +1023,14 @@ CONFIG_MSDOS_PARTITION=y
884# CONFIG_NLS is not set 1023# CONFIG_NLS is not set
885 1024
886# 1025#
1026# Distributed Lock Manager
1027#
1028CONFIG_DLM=y
1029CONFIG_DLM_TCP=y
1030# CONFIG_DLM_SCTP is not set
1031# CONFIG_DLM_DEBUG is not set
1032
1033#
887# Profiling support 1034# Profiling support
888# 1035#
889# CONFIG_PROFILING is not set 1036# CONFIG_PROFILING is not set
@@ -893,12 +1040,13 @@ CONFIG_MSDOS_PARTITION=y
893# 1040#
894CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1041CONFIG_TRACE_IRQFLAGS_SUPPORT=y
895# CONFIG_PRINTK_TIME is not set 1042# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_MUST_CHECK=y
896# CONFIG_MAGIC_SYSRQ is not set 1044# CONFIG_MAGIC_SYSRQ is not set
897# CONFIG_UNUSED_SYMBOLS is not set 1045# CONFIG_UNUSED_SYMBOLS is not set
1046# CONFIG_DEBUG_FS is not set
1047# CONFIG_HEADERS_CHECK is not set
898# CONFIG_DEBUG_KERNEL is not set 1048# CONFIG_DEBUG_KERNEL is not set
899CONFIG_LOG_BUF_SHIFT=14 1049CONFIG_LOG_BUF_SHIFT=14
900# CONFIG_DEBUG_FS is not set
901# CONFIG_UNWIND_INFO is not set
902CONFIG_CROSSCOMPILE=y 1050CONFIG_CROSSCOMPILE=y
903CONFIG_CMDLINE="" 1051CONFIG_CMDLINE=""
904 1052
@@ -913,7 +1061,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
913# Cryptographic options 1061# Cryptographic options
914# 1062#
915CONFIG_CRYPTO=y 1063CONFIG_CRYPTO=y
1064CONFIG_CRYPTO_ALGAPI=y
1065CONFIG_CRYPTO_BLKCIPHER=y
1066CONFIG_CRYPTO_HASH=y
1067CONFIG_CRYPTO_MANAGER=y
916CONFIG_CRYPTO_HMAC=y 1068CONFIG_CRYPTO_HMAC=y
1069CONFIG_CRYPTO_XCBC=y
917CONFIG_CRYPTO_NULL=y 1070CONFIG_CRYPTO_NULL=y
918CONFIG_CRYPTO_MD4=y 1071CONFIG_CRYPTO_MD4=y
919CONFIG_CRYPTO_MD5=y 1072CONFIG_CRYPTO_MD5=y
@@ -922,9 +1075,16 @@ CONFIG_CRYPTO_SHA256=y
922CONFIG_CRYPTO_SHA512=y 1075CONFIG_CRYPTO_SHA512=y
923CONFIG_CRYPTO_WP512=y 1076CONFIG_CRYPTO_WP512=y
924CONFIG_CRYPTO_TGR192=y 1077CONFIG_CRYPTO_TGR192=y
1078CONFIG_CRYPTO_GF128MUL=y
1079CONFIG_CRYPTO_ECB=y
1080CONFIG_CRYPTO_CBC=y
1081CONFIG_CRYPTO_PCBC=y
1082CONFIG_CRYPTO_LRW=y
925CONFIG_CRYPTO_DES=y 1083CONFIG_CRYPTO_DES=y
1084CONFIG_CRYPTO_FCRYPT=y
926CONFIG_CRYPTO_BLOWFISH=y 1085CONFIG_CRYPTO_BLOWFISH=y
927CONFIG_CRYPTO_TWOFISH=y 1086CONFIG_CRYPTO_TWOFISH=y
1087CONFIG_CRYPTO_TWOFISH_COMMON=y
928CONFIG_CRYPTO_SERPENT=y 1088CONFIG_CRYPTO_SERPENT=y
929CONFIG_CRYPTO_AES=y 1089CONFIG_CRYPTO_AES=y
930CONFIG_CRYPTO_CAST5=y 1090CONFIG_CRYPTO_CAST5=y
@@ -936,6 +1096,7 @@ CONFIG_CRYPTO_ANUBIS=y
936CONFIG_CRYPTO_DEFLATE=y 1096CONFIG_CRYPTO_DEFLATE=y
937CONFIG_CRYPTO_MICHAEL_MIC=y 1097CONFIG_CRYPTO_MICHAEL_MIC=y
938CONFIG_CRYPTO_CRC32C=y 1098CONFIG_CRYPTO_CRC32C=y
1099CONFIG_CRYPTO_CAMELLIA=y
939 1100
940# 1101#
941# Hardware crypto devices 1102# Hardware crypto devices
@@ -944,6 +1105,7 @@ CONFIG_CRYPTO_CRC32C=y
944# 1105#
945# Library routines 1106# Library routines
946# 1107#
1108CONFIG_BITREVERSE=y
947# CONFIG_CRC_CCITT is not set 1109# CONFIG_CRC_CCITT is not set
948CONFIG_CRC16=y 1110CONFIG_CRC16=y
949CONFIG_CRC32=y 1111CONFIG_CRC32=y
@@ -951,3 +1113,5 @@ CONFIG_LIBCRC32C=y
951CONFIG_ZLIB_INFLATE=y 1113CONFIG_ZLIB_INFLATE=y
952CONFIG_ZLIB_DEFLATE=y 1114CONFIG_ZLIB_DEFLATE=y
953CONFIG_PLIST=y 1115CONFIG_PLIST=y
1116CONFIG_HAS_IOMEM=y
1117CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 1a57b3375483..4cb8cf4255a2 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:33 2006 4# Tue Feb 20 21:47:24 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_DB1000=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_DB1000=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,14 +64,19 @@ CONFIG_MIPS_DB1000=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
74CONFIG_CPU_LITTLE_ENDIAN=y 78CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_APM_EMULATION=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1000=y 81CONFIG_SOC_AU1000=y
77CONFIG_SOC_AU1X00=y 82CONFIG_SOC_AU1X00=y
@@ -116,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
117CONFIG_CPU_HAS_PREFETCH=y 122CONFIG_CPU_HAS_PREFETCH=y
118CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_64BIT_PHYS_ADDR=y 127CONFIG_64BIT_PHYS_ADDR=y
123CONFIG_CPU_HAS_LLSC=y 128CONFIG_CPU_HAS_LLSC=y
@@ -135,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,15 +172,20 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
170CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
171# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
172# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
173CONFIG_RELAY=y 184CONFIG_RELAY=y
174CONFIG_INITRAMFS_SOURCE=""
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
177CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
178# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
179CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
@@ -181,12 +193,12 @@ CONFIG_PRINTK=y
181CONFIG_BUG=y 193CONFIG_BUG=y
182CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
183CONFIG_BASE_FULL=y 195CONFIG_BASE_FULL=y
184CONFIG_RT_MUTEXES=y
185CONFIG_FUTEX=y 196CONFIG_FUTEX=y
186CONFIG_EPOLL=y 197CONFIG_EPOLL=y
187CONFIG_SHMEM=y 198CONFIG_SHMEM=y
188CONFIG_SLAB=y 199CONFIG_SLAB=y
189CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_RT_MUTEXES=y
190# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
191CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
192# CONFIG_SLOB is not set 204# CONFIG_SLOB is not set
@@ -204,6 +216,7 @@ CONFIG_KMOD=y
204# 216#
205# Block layer 217# Block layer
206# 218#
219CONFIG_BLOCK=y
207# CONFIG_LBD is not set 220# CONFIG_LBD is not set
208# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
209# CONFIG_LSF is not set 222# CONFIG_LSF is not set
@@ -252,6 +265,10 @@ CONFIG_PCMCIA_IOCTL=y
252CONFIG_BINFMT_ELF=y 265CONFIG_BINFMT_ELF=y
253# CONFIG_BINFMT_MISC is not set 266# CONFIG_BINFMT_MISC is not set
254CONFIG_TRAD_SIGNALS=y 267CONFIG_TRAD_SIGNALS=y
268
269#
270# Power management options
271#
255# CONFIG_PM is not set 272# CONFIG_PM is not set
256 273
257# 274#
@@ -268,7 +285,10 @@ CONFIG_PACKET=y
268CONFIG_UNIX=y 285CONFIG_UNIX=y
269CONFIG_XFRM=y 286CONFIG_XFRM=y
270CONFIG_XFRM_USER=m 287CONFIG_XFRM_USER=m
288# CONFIG_XFRM_SUB_POLICY is not set
289CONFIG_XFRM_MIGRATE=y
271CONFIG_NET_KEY=y 290CONFIG_NET_KEY=y
291CONFIG_NET_KEY_MIGRATE=y
272CONFIG_INET=y 292CONFIG_INET=y
273CONFIG_IP_MULTICAST=y 293CONFIG_IP_MULTICAST=y
274# CONFIG_IP_ADVANCED_ROUTER is not set 294# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -289,10 +309,13 @@ CONFIG_IP_PNP_BOOTP=y
289# CONFIG_INET_TUNNEL is not set 309# CONFIG_INET_TUNNEL is not set
290CONFIG_INET_XFRM_MODE_TRANSPORT=m 310CONFIG_INET_XFRM_MODE_TRANSPORT=m
291CONFIG_INET_XFRM_MODE_TUNNEL=m 311CONFIG_INET_XFRM_MODE_TUNNEL=m
312CONFIG_INET_XFRM_MODE_BEET=m
292CONFIG_INET_DIAG=y 313CONFIG_INET_DIAG=y
293CONFIG_INET_TCP_DIAG=y 314CONFIG_INET_TCP_DIAG=y
294# CONFIG_TCP_CONG_ADVANCED is not set 315# CONFIG_TCP_CONG_ADVANCED is not set
295CONFIG_TCP_CONG_BIC=y 316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y
296 319
297# 320#
298# IP: Virtual Server Configuration 321# IP: Virtual Server Configuration
@@ -311,15 +334,42 @@ CONFIG_NETFILTER=y
311CONFIG_NETFILTER_NETLINK=m 334CONFIG_NETFILTER_NETLINK=m
312CONFIG_NETFILTER_NETLINK_QUEUE=m 335CONFIG_NETFILTER_NETLINK_QUEUE=m
313CONFIG_NETFILTER_NETLINK_LOG=m 336CONFIG_NETFILTER_NETLINK_LOG=m
314# CONFIG_NF_CONNTRACK is not set 337CONFIG_NF_CONNTRACK_ENABLED=m
338CONFIG_NF_CONNTRACK_SUPPORT=y
339# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
340CONFIG_NF_CONNTRACK=m
341CONFIG_NF_CT_ACCT=y
342CONFIG_NF_CONNTRACK_MARK=y
343CONFIG_NF_CONNTRACK_SECMARK=y
344CONFIG_NF_CONNTRACK_EVENTS=y
345CONFIG_NF_CT_PROTO_GRE=m
346CONFIG_NF_CT_PROTO_SCTP=m
347CONFIG_NF_CONNTRACK_AMANDA=m
348CONFIG_NF_CONNTRACK_FTP=m
349CONFIG_NF_CONNTRACK_H323=m
350CONFIG_NF_CONNTRACK_IRC=m
351# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
352CONFIG_NF_CONNTRACK_PPTP=m
353CONFIG_NF_CONNTRACK_SANE=m
354CONFIG_NF_CONNTRACK_SIP=m
355CONFIG_NF_CONNTRACK_TFTP=m
356CONFIG_NF_CT_NETLINK=m
315CONFIG_NETFILTER_XTABLES=m 357CONFIG_NETFILTER_XTABLES=m
316CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 358CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
317CONFIG_NETFILTER_XT_TARGET_MARK=m 359CONFIG_NETFILTER_XT_TARGET_MARK=m
318CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 360CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
361CONFIG_NETFILTER_XT_TARGET_NFLOG=m
319CONFIG_NETFILTER_XT_TARGET_SECMARK=m 362CONFIG_NETFILTER_XT_TARGET_SECMARK=m
363CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
364CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
320CONFIG_NETFILTER_XT_MATCH_COMMENT=m 365CONFIG_NETFILTER_XT_MATCH_COMMENT=m
366CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
367CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
368CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
321CONFIG_NETFILTER_XT_MATCH_DCCP=m 369CONFIG_NETFILTER_XT_MATCH_DCCP=m
370CONFIG_NETFILTER_XT_MATCH_DSCP=m
322CONFIG_NETFILTER_XT_MATCH_ESP=m 371CONFIG_NETFILTER_XT_MATCH_ESP=m
372CONFIG_NETFILTER_XT_MATCH_HELPER=m
323CONFIG_NETFILTER_XT_MATCH_LENGTH=m 373CONFIG_NETFILTER_XT_MATCH_LENGTH=m
324CONFIG_NETFILTER_XT_MATCH_LIMIT=m 374CONFIG_NETFILTER_XT_MATCH_LIMIT=m
325CONFIG_NETFILTER_XT_MATCH_MAC=m 375CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -330,14 +380,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
330CONFIG_NETFILTER_XT_MATCH_QUOTA=m 380CONFIG_NETFILTER_XT_MATCH_QUOTA=m
331CONFIG_NETFILTER_XT_MATCH_REALM=m 381CONFIG_NETFILTER_XT_MATCH_REALM=m
332CONFIG_NETFILTER_XT_MATCH_SCTP=m 382CONFIG_NETFILTER_XT_MATCH_SCTP=m
383CONFIG_NETFILTER_XT_MATCH_STATE=m
333CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 384CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
334CONFIG_NETFILTER_XT_MATCH_STRING=m 385CONFIG_NETFILTER_XT_MATCH_STRING=m
335CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 386CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
387CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
336 388
337# 389#
338# IP: Netfilter Configuration 390# IP: Netfilter Configuration
339# 391#
340# CONFIG_IP_NF_CONNTRACK is not set 392CONFIG_NF_CONNTRACK_IPV4=m
393CONFIG_NF_CONNTRACK_PROC_COMPAT=y
341# CONFIG_IP_NF_QUEUE is not set 394# CONFIG_IP_NF_QUEUE is not set
342# CONFIG_IP_NF_IPTABLES is not set 395# CONFIG_IP_NF_IPTABLES is not set
343# CONFIG_IP_NF_ARPTABLES is not set 396# CONFIG_IP_NF_ARPTABLES is not set
@@ -365,7 +418,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
365# CONFIG_ATALK is not set 418# CONFIG_ATALK is not set
366# CONFIG_X25 is not set 419# CONFIG_X25 is not set
367# CONFIG_LAPB is not set 420# CONFIG_LAPB is not set
368# CONFIG_NET_DIVERT is not set
369# CONFIG_ECONET is not set 421# CONFIG_ECONET is not set
370# CONFIG_WAN_ROUTER is not set 422# CONFIG_WAN_ROUTER is not set
371 423
@@ -421,11 +473,13 @@ CONFIG_MTD_PARTITIONS=y
421# User Modules And Translation Layers 473# User Modules And Translation Layers
422# 474#
423CONFIG_MTD_CHAR=y 475CONFIG_MTD_CHAR=y
476CONFIG_MTD_BLKDEVS=y
424CONFIG_MTD_BLOCK=y 477CONFIG_MTD_BLOCK=y
425# CONFIG_FTL is not set 478# CONFIG_FTL is not set
426# CONFIG_NFTL is not set 479# CONFIG_NFTL is not set
427# CONFIG_INFTL is not set 480# CONFIG_INFTL is not set
428# CONFIG_RFD_FTL is not set 481# CONFIG_RFD_FTL is not set
482# CONFIG_SSFDC is not set
429 483
430# 484#
431# RAM/ROM/Flash chip drivers 485# RAM/ROM/Flash chip drivers
@@ -494,6 +548,7 @@ CONFIG_MTD_ALCHEMY=y
494# 548#
495# Plug and Play support 549# Plug and Play support
496# 550#
551# CONFIG_PNPACPI is not set
497 552
498# 553#
499# Block devices 554# Block devices
@@ -510,6 +565,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
510CONFIG_ATA_OVER_ETH=m 565CONFIG_ATA_OVER_ETH=m
511 566
512# 567#
568# Misc devices
569#
570
571#
513# ATA/ATAPI/MFM/RLL support 572# ATA/ATAPI/MFM/RLL support
514# 573#
515# CONFIG_IDE is not set 574# CONFIG_IDE is not set
@@ -519,6 +578,12 @@ CONFIG_ATA_OVER_ETH=m
519# 578#
520CONFIG_RAID_ATTRS=m 579CONFIG_RAID_ATTRS=m
521# CONFIG_SCSI is not set 580# CONFIG_SCSI is not set
581# CONFIG_SCSI_NETLINK is not set
582
583#
584# Serial ATA (prod) and Parallel ATA (experimental) drivers
585#
586# CONFIG_ATA is not set
522 587
523# 588#
524# Multi-device support (RAID and LVM) 589# Multi-device support (RAID and LVM)
@@ -562,6 +627,8 @@ CONFIG_LXT_PHY=m
562CONFIG_CICADA_PHY=m 627CONFIG_CICADA_PHY=m
563CONFIG_VITESSE_PHY=m 628CONFIG_VITESSE_PHY=m
564CONFIG_SMSC_PHY=m 629CONFIG_SMSC_PHY=m
630# CONFIG_BROADCOM_PHY is not set
631# CONFIG_FIXED_PHY is not set
565 632
566# 633#
567# Ethernet (10 or 100Mbit) 634# Ethernet (10 or 100Mbit)
@@ -616,6 +683,7 @@ CONFIG_PPP_DEFLATE=m
616CONFIG_PPP_MPPE=m 683CONFIG_PPP_MPPE=m
617CONFIG_PPPOE=m 684CONFIG_PPPOE=m
618# CONFIG_SLIP is not set 685# CONFIG_SLIP is not set
686CONFIG_SLHC=m
619# CONFIG_SHAPER is not set 687# CONFIG_SHAPER is not set
620# CONFIG_NETCONSOLE is not set 688# CONFIG_NETCONSOLE is not set
621# CONFIG_NETPOLL is not set 689# CONFIG_NETPOLL is not set
@@ -635,6 +703,7 @@ CONFIG_PPPOE=m
635# Input device support 703# Input device support
636# 704#
637CONFIG_INPUT=y 705CONFIG_INPUT=y
706# CONFIG_INPUT_FF_MEMLESS is not set
638 707
639# 708#
640# Userland interfaces 709# Userland interfaces
@@ -714,10 +783,6 @@ CONFIG_LEGACY_PTY_COUNT=256
714# CONFIG_R3964 is not set 783# CONFIG_R3964 is not set
715 784
716# 785#
717# Ftape, the floppy tape device driver
718#
719
720#
721# PCMCIA character devices 786# PCMCIA character devices
722# 787#
723CONFIG_SYNCLINK_CS=m 788CONFIG_SYNCLINK_CS=m
@@ -729,7 +794,6 @@ CONFIG_SYNCLINK_CS=m
729# TPM devices 794# TPM devices
730# 795#
731# CONFIG_TCG_TPM is not set 796# CONFIG_TCG_TPM is not set
732# CONFIG_TELCLOCK is not set
733 797
734# 798#
735# I2C support 799# I2C support
@@ -754,14 +818,9 @@ CONFIG_SYNCLINK_CS=m
754# CONFIG_HWMON_VID is not set 818# CONFIG_HWMON_VID is not set
755 819
756# 820#
757# Misc devices
758#
759
760#
761# Multimedia devices 821# Multimedia devices
762# 822#
763# CONFIG_VIDEO_DEV is not set 823# CONFIG_VIDEO_DEV is not set
764CONFIG_VIDEO_V4L2=y
765 824
766# 825#
767# Digital Video Broadcasting Devices 826# Digital Video Broadcasting Devices
@@ -779,6 +838,7 @@ CONFIG_VIDEO_V4L2=y
779# 838#
780# CONFIG_VGA_CONSOLE is not set 839# CONFIG_VGA_CONSOLE is not set
781CONFIG_DUMMY_CONSOLE=y 840CONFIG_DUMMY_CONSOLE=y
841# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
782 842
783# 843#
784# Sound 844# Sound
@@ -786,6 +846,11 @@ CONFIG_DUMMY_CONSOLE=y
786# CONFIG_SOUND is not set 846# CONFIG_SOUND is not set
787 847
788# 848#
849# HID Devices
850#
851# CONFIG_HID is not set
852
853#
789# USB support 854# USB support
790# 855#
791CONFIG_USB_ARCH_HAS_HCD=y 856CONFIG_USB_ARCH_HAS_HCD=y
@@ -847,6 +912,14 @@ CONFIG_USB_ARCH_HAS_OHCI=y
847# 912#
848 913
849# 914#
915# Auxiliary Display support
916#
917
918#
919# Virtualization
920#
921
922#
850# File systems 923# File systems
851# 924#
852CONFIG_EXT2_FS=y 925CONFIG_EXT2_FS=y
@@ -858,6 +931,7 @@ CONFIG_EXT3_FS=y
858CONFIG_EXT3_FS_XATTR=y 931CONFIG_EXT3_FS_XATTR=y
859CONFIG_EXT3_FS_POSIX_ACL=y 932CONFIG_EXT3_FS_POSIX_ACL=y
860CONFIG_EXT3_FS_SECURITY=y 933CONFIG_EXT3_FS_SECURITY=y
934# CONFIG_EXT4DEV_FS is not set
861CONFIG_JBD=y 935CONFIG_JBD=y
862# CONFIG_JBD_DEBUG is not set 936# CONFIG_JBD_DEBUG is not set
863CONFIG_FS_MBCACHE=y 937CONFIG_FS_MBCACHE=y
@@ -870,6 +944,7 @@ CONFIG_REISERFS_FS_SECURITY=y
870# CONFIG_JFS_FS is not set 944# CONFIG_JFS_FS is not set
871CONFIG_FS_POSIX_ACL=y 945CONFIG_FS_POSIX_ACL=y
872# CONFIG_XFS_FS is not set 946# CONFIG_XFS_FS is not set
947# CONFIG_GFS2_FS is not set
873# CONFIG_OCFS2_FS is not set 948# CONFIG_OCFS2_FS is not set
874# CONFIG_MINIX_FS is not set 949# CONFIG_MINIX_FS is not set
875# CONFIG_ROMFS_FS is not set 950# CONFIG_ROMFS_FS is not set
@@ -880,6 +955,7 @@ CONFIG_DNOTIFY=y
880CONFIG_AUTOFS_FS=m 955CONFIG_AUTOFS_FS=m
881CONFIG_AUTOFS4_FS=m 956CONFIG_AUTOFS4_FS=m
882CONFIG_FUSE_FS=m 957CONFIG_FUSE_FS=m
958CONFIG_GENERIC_ACL=y
883 959
884# 960#
885# CD-ROM/DVD Filesystems 961# CD-ROM/DVD Filesystems
@@ -899,23 +975,25 @@ CONFIG_FUSE_FS=m
899# 975#
900CONFIG_PROC_FS=y 976CONFIG_PROC_FS=y
901CONFIG_PROC_KCORE=y 977CONFIG_PROC_KCORE=y
978CONFIG_PROC_SYSCTL=y
902CONFIG_SYSFS=y 979CONFIG_SYSFS=y
903CONFIG_TMPFS=y 980CONFIG_TMPFS=y
981CONFIG_TMPFS_POSIX_ACL=y
904# CONFIG_HUGETLB_PAGE is not set 982# CONFIG_HUGETLB_PAGE is not set
905CONFIG_RAMFS=y 983CONFIG_RAMFS=y
906# CONFIG_CONFIGFS_FS is not set 984CONFIG_CONFIGFS_FS=m
907 985
908# 986#
909# Miscellaneous filesystems 987# Miscellaneous filesystems
910# 988#
911# CONFIG_ADFS_FS is not set 989# CONFIG_ADFS_FS is not set
912# CONFIG_AFFS_FS is not set 990# CONFIG_AFFS_FS is not set
991# CONFIG_ECRYPT_FS is not set
913# CONFIG_HFS_FS is not set 992# CONFIG_HFS_FS is not set
914# CONFIG_HFSPLUS_FS is not set 993# CONFIG_HFSPLUS_FS is not set
915# CONFIG_BEFS_FS is not set 994# CONFIG_BEFS_FS is not set
916# CONFIG_BFS_FS is not set 995# CONFIG_BFS_FS is not set
917# CONFIG_EFS_FS is not set 996# CONFIG_EFS_FS is not set
918# CONFIG_JFFS_FS is not set
919# CONFIG_JFFS2_FS is not set 997# CONFIG_JFFS2_FS is not set
920CONFIG_CRAMFS=m 998CONFIG_CRAMFS=m
921# CONFIG_VXFS_FS is not set 999# CONFIG_VXFS_FS is not set
@@ -944,7 +1022,6 @@ CONFIG_SUNRPC=y
944CONFIG_SMB_FS=m 1022CONFIG_SMB_FS=m
945# CONFIG_SMB_NLS_DEFAULT is not set 1023# CONFIG_SMB_NLS_DEFAULT is not set
946# CONFIG_CIFS is not set 1024# CONFIG_CIFS is not set
947# CONFIG_CIFS_DEBUG2 is not set
948# CONFIG_NCP_FS is not set 1025# CONFIG_NCP_FS is not set
949# CONFIG_CODA_FS is not set 1026# CONFIG_CODA_FS is not set
950# CONFIG_AFS_FS is not set 1027# CONFIG_AFS_FS is not set
@@ -1001,6 +1078,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1001# CONFIG_NLS_UTF8 is not set 1078# CONFIG_NLS_UTF8 is not set
1002 1079
1003# 1080#
1081# Distributed Lock Manager
1082#
1083CONFIG_DLM=m
1084CONFIG_DLM_TCP=y
1085# CONFIG_DLM_SCTP is not set
1086# CONFIG_DLM_DEBUG is not set
1087
1088#
1004# Profiling support 1089# Profiling support
1005# 1090#
1006# CONFIG_PROFILING is not set 1091# CONFIG_PROFILING is not set
@@ -1010,13 +1095,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1010# 1095#
1011CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1096CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1012# CONFIG_PRINTK_TIME is not set 1097# CONFIG_PRINTK_TIME is not set
1098CONFIG_ENABLE_MUST_CHECK=y
1013# CONFIG_MAGIC_SYSRQ is not set 1099# CONFIG_MAGIC_SYSRQ is not set
1014# CONFIG_UNUSED_SYMBOLS is not set 1100# CONFIG_UNUSED_SYMBOLS is not set
1101# CONFIG_DEBUG_FS is not set
1102# CONFIG_HEADERS_CHECK is not set
1015# CONFIG_DEBUG_KERNEL is not set 1103# CONFIG_DEBUG_KERNEL is not set
1016CONFIG_LOG_BUF_SHIFT=14 1104CONFIG_LOG_BUF_SHIFT=14
1017# CONFIG_DEBUG_FS is not set
1018CONFIG_CROSSCOMPILE=y 1105CONFIG_CROSSCOMPILE=y
1019CONFIG_CMDLINE="" 1106CONFIG_CMDLINE=""
1107CONFIG_SYS_SUPPORTS_KGDB=y
1020 1108
1021# 1109#
1022# Security options 1110# Security options
@@ -1029,18 +1117,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1029# Cryptographic options 1117# Cryptographic options
1030# 1118#
1031CONFIG_CRYPTO=y 1119CONFIG_CRYPTO=y
1120CONFIG_CRYPTO_ALGAPI=y
1121CONFIG_CRYPTO_BLKCIPHER=m
1122CONFIG_CRYPTO_HASH=y
1123CONFIG_CRYPTO_MANAGER=y
1032CONFIG_CRYPTO_HMAC=y 1124CONFIG_CRYPTO_HMAC=y
1125CONFIG_CRYPTO_XCBC=m
1033CONFIG_CRYPTO_NULL=m 1126CONFIG_CRYPTO_NULL=m
1034CONFIG_CRYPTO_MD4=m 1127CONFIG_CRYPTO_MD4=m
1035CONFIG_CRYPTO_MD5=m 1128CONFIG_CRYPTO_MD5=y
1036CONFIG_CRYPTO_SHA1=m 1129CONFIG_CRYPTO_SHA1=m
1037CONFIG_CRYPTO_SHA256=m 1130CONFIG_CRYPTO_SHA256=m
1038CONFIG_CRYPTO_SHA512=m 1131CONFIG_CRYPTO_SHA512=m
1039CONFIG_CRYPTO_WP512=m 1132CONFIG_CRYPTO_WP512=m
1040CONFIG_CRYPTO_TGR192=m 1133CONFIG_CRYPTO_TGR192=m
1134CONFIG_CRYPTO_GF128MUL=m
1135CONFIG_CRYPTO_ECB=m
1136CONFIG_CRYPTO_CBC=m
1137CONFIG_CRYPTO_PCBC=m
1138CONFIG_CRYPTO_LRW=m
1041CONFIG_CRYPTO_DES=m 1139CONFIG_CRYPTO_DES=m
1140CONFIG_CRYPTO_FCRYPT=m
1042CONFIG_CRYPTO_BLOWFISH=m 1141CONFIG_CRYPTO_BLOWFISH=m
1043CONFIG_CRYPTO_TWOFISH=m 1142CONFIG_CRYPTO_TWOFISH=m
1143CONFIG_CRYPTO_TWOFISH_COMMON=m
1044CONFIG_CRYPTO_SERPENT=m 1144CONFIG_CRYPTO_SERPENT=m
1045CONFIG_CRYPTO_AES=m 1145CONFIG_CRYPTO_AES=m
1046CONFIG_CRYPTO_CAST5=m 1146CONFIG_CRYPTO_CAST5=m
@@ -1052,6 +1152,7 @@ CONFIG_CRYPTO_ANUBIS=m
1052CONFIG_CRYPTO_DEFLATE=m 1152CONFIG_CRYPTO_DEFLATE=m
1053CONFIG_CRYPTO_MICHAEL_MIC=m 1153CONFIG_CRYPTO_MICHAEL_MIC=m
1054CONFIG_CRYPTO_CRC32C=m 1154CONFIG_CRYPTO_CRC32C=m
1155CONFIG_CRYPTO_CAMELLIA=m
1055# CONFIG_CRYPTO_TEST is not set 1156# CONFIG_CRYPTO_TEST is not set
1056 1157
1057# 1158#
@@ -1061,6 +1162,7 @@ CONFIG_CRYPTO_CRC32C=m
1061# 1162#
1062# Library routines 1163# Library routines
1063# 1164#
1165CONFIG_BITREVERSE=y
1064CONFIG_CRC_CCITT=m 1166CONFIG_CRC_CCITT=m
1065CONFIG_CRC16=m 1167CONFIG_CRC16=m
1066CONFIG_CRC32=y 1168CONFIG_CRC32=y
@@ -1072,3 +1174,5 @@ CONFIG_TEXTSEARCH_KMP=m
1072CONFIG_TEXTSEARCH_BM=m 1174CONFIG_TEXTSEARCH_BM=m
1073CONFIG_TEXTSEARCH_FSM=m 1175CONFIG_TEXTSEARCH_FSM=m
1074CONFIG_PLIST=y 1176CONFIG_PLIST=y
1177CONFIG_HAS_IOMEM=y
1178CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index 0055ec41f207..d86dedf27fc4 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:34 2006 4# Tue Feb 20 21:47:24 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_DB1100=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_DB1100=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,14 +64,19 @@ CONFIG_MIPS_DB1100=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
74CONFIG_CPU_LITTLE_ENDIAN=y 78CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_APM_EMULATION=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1100=y 81CONFIG_SOC_AU1100=y
77CONFIG_SOC_AU1X00=y 82CONFIG_SOC_AU1X00=y
@@ -116,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
117CONFIG_CPU_HAS_PREFETCH=y 122CONFIG_CPU_HAS_PREFETCH=y
118CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_64BIT_PHYS_ADDR=y 127CONFIG_64BIT_PHYS_ADDR=y
123CONFIG_CPU_HAS_LLSC=y 128CONFIG_CPU_HAS_LLSC=y
@@ -135,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,15 +172,20 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
170CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
171# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
172# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
173CONFIG_RELAY=y 184CONFIG_RELAY=y
174CONFIG_INITRAMFS_SOURCE=""
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
177CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
178# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
179CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
@@ -181,12 +193,12 @@ CONFIG_PRINTK=y
181CONFIG_BUG=y 193CONFIG_BUG=y
182CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
183CONFIG_BASE_FULL=y 195CONFIG_BASE_FULL=y
184CONFIG_RT_MUTEXES=y
185CONFIG_FUTEX=y 196CONFIG_FUTEX=y
186CONFIG_EPOLL=y 197CONFIG_EPOLL=y
187CONFIG_SHMEM=y 198CONFIG_SHMEM=y
188CONFIG_SLAB=y 199CONFIG_SLAB=y
189CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_RT_MUTEXES=y
190# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
191CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
192# CONFIG_SLOB is not set 204# CONFIG_SLOB is not set
@@ -204,6 +216,7 @@ CONFIG_KMOD=y
204# 216#
205# Block layer 217# Block layer
206# 218#
219CONFIG_BLOCK=y
207# CONFIG_LBD is not set 220# CONFIG_LBD is not set
208# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
209# CONFIG_LSF is not set 222# CONFIG_LSF is not set
@@ -241,6 +254,10 @@ CONFIG_MMU=y
241CONFIG_BINFMT_ELF=y 254CONFIG_BINFMT_ELF=y
242# CONFIG_BINFMT_MISC is not set 255# CONFIG_BINFMT_MISC is not set
243CONFIG_TRAD_SIGNALS=y 256CONFIG_TRAD_SIGNALS=y
257
258#
259# Power management options
260#
244# CONFIG_PM is not set 261# CONFIG_PM is not set
245 262
246# 263#
@@ -257,7 +274,10 @@ CONFIG_PACKET=y
257CONFIG_UNIX=y 274CONFIG_UNIX=y
258CONFIG_XFRM=y 275CONFIG_XFRM=y
259CONFIG_XFRM_USER=m 276CONFIG_XFRM_USER=m
277# CONFIG_XFRM_SUB_POLICY is not set
278CONFIG_XFRM_MIGRATE=y
260CONFIG_NET_KEY=y 279CONFIG_NET_KEY=y
280CONFIG_NET_KEY_MIGRATE=y
261CONFIG_INET=y 281CONFIG_INET=y
262CONFIG_IP_MULTICAST=y 282CONFIG_IP_MULTICAST=y
263# CONFIG_IP_ADVANCED_ROUTER is not set 283# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -278,10 +298,13 @@ CONFIG_IP_PNP_BOOTP=y
278# CONFIG_INET_TUNNEL is not set 298# CONFIG_INET_TUNNEL is not set
279CONFIG_INET_XFRM_MODE_TRANSPORT=m 299CONFIG_INET_XFRM_MODE_TRANSPORT=m
280CONFIG_INET_XFRM_MODE_TUNNEL=m 300CONFIG_INET_XFRM_MODE_TUNNEL=m
301CONFIG_INET_XFRM_MODE_BEET=m
281CONFIG_INET_DIAG=y 302CONFIG_INET_DIAG=y
282CONFIG_INET_TCP_DIAG=y 303CONFIG_INET_TCP_DIAG=y
283# CONFIG_TCP_CONG_ADVANCED is not set 304# CONFIG_TCP_CONG_ADVANCED is not set
284CONFIG_TCP_CONG_BIC=y 305CONFIG_TCP_CONG_CUBIC=y
306CONFIG_DEFAULT_TCP_CONG="cubic"
307CONFIG_TCP_MD5SIG=y
285 308
286# 309#
287# IP: Virtual Server Configuration 310# IP: Virtual Server Configuration
@@ -300,15 +323,42 @@ CONFIG_NETFILTER=y
300CONFIG_NETFILTER_NETLINK=m 323CONFIG_NETFILTER_NETLINK=m
301CONFIG_NETFILTER_NETLINK_QUEUE=m 324CONFIG_NETFILTER_NETLINK_QUEUE=m
302CONFIG_NETFILTER_NETLINK_LOG=m 325CONFIG_NETFILTER_NETLINK_LOG=m
303# CONFIG_NF_CONNTRACK is not set 326CONFIG_NF_CONNTRACK_ENABLED=m
327CONFIG_NF_CONNTRACK_SUPPORT=y
328# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
329CONFIG_NF_CONNTRACK=m
330CONFIG_NF_CT_ACCT=y
331CONFIG_NF_CONNTRACK_MARK=y
332CONFIG_NF_CONNTRACK_SECMARK=y
333CONFIG_NF_CONNTRACK_EVENTS=y
334CONFIG_NF_CT_PROTO_GRE=m
335CONFIG_NF_CT_PROTO_SCTP=m
336CONFIG_NF_CONNTRACK_AMANDA=m
337CONFIG_NF_CONNTRACK_FTP=m
338CONFIG_NF_CONNTRACK_H323=m
339CONFIG_NF_CONNTRACK_IRC=m
340# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
341CONFIG_NF_CONNTRACK_PPTP=m
342CONFIG_NF_CONNTRACK_SANE=m
343CONFIG_NF_CONNTRACK_SIP=m
344CONFIG_NF_CONNTRACK_TFTP=m
345CONFIG_NF_CT_NETLINK=m
304CONFIG_NETFILTER_XTABLES=m 346CONFIG_NETFILTER_XTABLES=m
305CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 347CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
306CONFIG_NETFILTER_XT_TARGET_MARK=m 348CONFIG_NETFILTER_XT_TARGET_MARK=m
307CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 349CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
350CONFIG_NETFILTER_XT_TARGET_NFLOG=m
308CONFIG_NETFILTER_XT_TARGET_SECMARK=m 351CONFIG_NETFILTER_XT_TARGET_SECMARK=m
352CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
353CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
309CONFIG_NETFILTER_XT_MATCH_COMMENT=m 354CONFIG_NETFILTER_XT_MATCH_COMMENT=m
355CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
356CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
357CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
310CONFIG_NETFILTER_XT_MATCH_DCCP=m 358CONFIG_NETFILTER_XT_MATCH_DCCP=m
359CONFIG_NETFILTER_XT_MATCH_DSCP=m
311CONFIG_NETFILTER_XT_MATCH_ESP=m 360CONFIG_NETFILTER_XT_MATCH_ESP=m
361CONFIG_NETFILTER_XT_MATCH_HELPER=m
312CONFIG_NETFILTER_XT_MATCH_LENGTH=m 362CONFIG_NETFILTER_XT_MATCH_LENGTH=m
313CONFIG_NETFILTER_XT_MATCH_LIMIT=m 363CONFIG_NETFILTER_XT_MATCH_LIMIT=m
314CONFIG_NETFILTER_XT_MATCH_MAC=m 364CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -319,14 +369,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
319CONFIG_NETFILTER_XT_MATCH_QUOTA=m 369CONFIG_NETFILTER_XT_MATCH_QUOTA=m
320CONFIG_NETFILTER_XT_MATCH_REALM=m 370CONFIG_NETFILTER_XT_MATCH_REALM=m
321CONFIG_NETFILTER_XT_MATCH_SCTP=m 371CONFIG_NETFILTER_XT_MATCH_SCTP=m
372CONFIG_NETFILTER_XT_MATCH_STATE=m
322CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 373CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
323CONFIG_NETFILTER_XT_MATCH_STRING=m 374CONFIG_NETFILTER_XT_MATCH_STRING=m
324CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 375CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
376CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
325 377
326# 378#
327# IP: Netfilter Configuration 379# IP: Netfilter Configuration
328# 380#
329# CONFIG_IP_NF_CONNTRACK is not set 381CONFIG_NF_CONNTRACK_IPV4=m
382CONFIG_NF_CONNTRACK_PROC_COMPAT=y
330# CONFIG_IP_NF_QUEUE is not set 383# CONFIG_IP_NF_QUEUE is not set
331# CONFIG_IP_NF_IPTABLES is not set 384# CONFIG_IP_NF_IPTABLES is not set
332# CONFIG_IP_NF_ARPTABLES is not set 385# CONFIG_IP_NF_ARPTABLES is not set
@@ -354,7 +407,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
354# CONFIG_ATALK is not set 407# CONFIG_ATALK is not set
355# CONFIG_X25 is not set 408# CONFIG_X25 is not set
356# CONFIG_LAPB is not set 409# CONFIG_LAPB is not set
357# CONFIG_NET_DIVERT is not set
358# CONFIG_ECONET is not set 410# CONFIG_ECONET is not set
359# CONFIG_WAN_ROUTER is not set 411# CONFIG_WAN_ROUTER is not set
360 412
@@ -410,11 +462,13 @@ CONFIG_MTD_PARTITIONS=y
410# User Modules And Translation Layers 462# User Modules And Translation Layers
411# 463#
412CONFIG_MTD_CHAR=y 464CONFIG_MTD_CHAR=y
465CONFIG_MTD_BLKDEVS=y
413CONFIG_MTD_BLOCK=y 466CONFIG_MTD_BLOCK=y
414# CONFIG_FTL is not set 467# CONFIG_FTL is not set
415# CONFIG_NFTL is not set 468# CONFIG_NFTL is not set
416# CONFIG_INFTL is not set 469# CONFIG_INFTL is not set
417# CONFIG_RFD_FTL is not set 470# CONFIG_RFD_FTL is not set
471# CONFIG_SSFDC is not set
418 472
419# 473#
420# RAM/ROM/Flash chip drivers 474# RAM/ROM/Flash chip drivers
@@ -483,6 +537,7 @@ CONFIG_MTD_ALCHEMY=y
483# 537#
484# Plug and Play support 538# Plug and Play support
485# 539#
540# CONFIG_PNPACPI is not set
486 541
487# 542#
488# Block devices 543# Block devices
@@ -499,6 +554,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
499CONFIG_ATA_OVER_ETH=m 554CONFIG_ATA_OVER_ETH=m
500 555
501# 556#
557# Misc devices
558#
559
560#
502# ATA/ATAPI/MFM/RLL support 561# ATA/ATAPI/MFM/RLL support
503# 562#
504# CONFIG_IDE is not set 563# CONFIG_IDE is not set
@@ -508,6 +567,12 @@ CONFIG_ATA_OVER_ETH=m
508# 567#
509CONFIG_RAID_ATTRS=m 568CONFIG_RAID_ATTRS=m
510# CONFIG_SCSI is not set 569# CONFIG_SCSI is not set
570# CONFIG_SCSI_NETLINK is not set
571
572#
573# Serial ATA (prod) and Parallel ATA (experimental) drivers
574#
575# CONFIG_ATA is not set
511 576
512# 577#
513# Multi-device support (RAID and LVM) 578# Multi-device support (RAID and LVM)
@@ -551,6 +616,8 @@ CONFIG_LXT_PHY=m
551CONFIG_CICADA_PHY=m 616CONFIG_CICADA_PHY=m
552CONFIG_VITESSE_PHY=m 617CONFIG_VITESSE_PHY=m
553CONFIG_SMSC_PHY=m 618CONFIG_SMSC_PHY=m
619# CONFIG_BROADCOM_PHY is not set
620# CONFIG_FIXED_PHY is not set
554 621
555# 622#
556# Ethernet (10 or 100Mbit) 623# Ethernet (10 or 100Mbit)
@@ -592,6 +659,7 @@ CONFIG_PPP_DEFLATE=m
592CONFIG_PPP_MPPE=m 659CONFIG_PPP_MPPE=m
593CONFIG_PPPOE=m 660CONFIG_PPPOE=m
594# CONFIG_SLIP is not set 661# CONFIG_SLIP is not set
662CONFIG_SLHC=m
595# CONFIG_SHAPER is not set 663# CONFIG_SHAPER is not set
596# CONFIG_NETCONSOLE is not set 664# CONFIG_NETCONSOLE is not set
597# CONFIG_NETPOLL is not set 665# CONFIG_NETPOLL is not set
@@ -611,6 +679,7 @@ CONFIG_PPPOE=m
611# Input device support 679# Input device support
612# 680#
613CONFIG_INPUT=y 681CONFIG_INPUT=y
682# CONFIG_INPUT_FF_MEMLESS is not set
614 683
615# 684#
616# Userland interfaces 685# Userland interfaces
@@ -687,17 +756,12 @@ CONFIG_LEGACY_PTY_COUNT=256
687# CONFIG_GEN_RTC is not set 756# CONFIG_GEN_RTC is not set
688# CONFIG_DTLK is not set 757# CONFIG_DTLK is not set
689# CONFIG_R3964 is not set 758# CONFIG_R3964 is not set
690
691#
692# Ftape, the floppy tape device driver
693#
694# CONFIG_RAW_DRIVER is not set 759# CONFIG_RAW_DRIVER is not set
695 760
696# 761#
697# TPM devices 762# TPM devices
698# 763#
699# CONFIG_TCG_TPM is not set 764# CONFIG_TCG_TPM is not set
700# CONFIG_TELCLOCK is not set
701 765
702# 766#
703# I2C support 767# I2C support
@@ -722,14 +786,9 @@ CONFIG_LEGACY_PTY_COUNT=256
722# CONFIG_HWMON_VID is not set 786# CONFIG_HWMON_VID is not set
723 787
724# 788#
725# Misc devices
726#
727
728#
729# Multimedia devices 789# Multimedia devices
730# 790#
731# CONFIG_VIDEO_DEV is not set 791# CONFIG_VIDEO_DEV is not set
732CONFIG_VIDEO_V4L2=y
733 792
734# 793#
735# Digital Video Broadcasting Devices 794# Digital Video Broadcasting Devices
@@ -744,6 +803,7 @@ CONFIG_FB=y
744CONFIG_FB_CFB_FILLRECT=y 803CONFIG_FB_CFB_FILLRECT=y
745CONFIG_FB_CFB_COPYAREA=y 804CONFIG_FB_CFB_COPYAREA=y
746CONFIG_FB_CFB_IMAGEBLIT=y 805CONFIG_FB_CFB_IMAGEBLIT=y
806# CONFIG_FB_SVGALIB is not set
747# CONFIG_FB_MACMODES is not set 807# CONFIG_FB_MACMODES is not set
748# CONFIG_FB_BACKLIGHT is not set 808# CONFIG_FB_BACKLIGHT is not set
749# CONFIG_FB_MODE_HELPERS is not set 809# CONFIG_FB_MODE_HELPERS is not set
@@ -786,6 +846,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
786# CONFIG_SOUND is not set 846# CONFIG_SOUND is not set
787 847
788# 848#
849# HID Devices
850#
851# CONFIG_HID is not set
852
853#
789# USB support 854# USB support
790# 855#
791CONFIG_USB_ARCH_HAS_HCD=y 856CONFIG_USB_ARCH_HAS_HCD=y
@@ -847,6 +912,14 @@ CONFIG_USB_ARCH_HAS_OHCI=y
847# 912#
848 913
849# 914#
915# Auxiliary Display support
916#
917
918#
919# Virtualization
920#
921
922#
850# File systems 923# File systems
851# 924#
852CONFIG_EXT2_FS=y 925CONFIG_EXT2_FS=y
@@ -858,6 +931,7 @@ CONFIG_EXT3_FS=y
858CONFIG_EXT3_FS_XATTR=y 931CONFIG_EXT3_FS_XATTR=y
859CONFIG_EXT3_FS_POSIX_ACL=y 932CONFIG_EXT3_FS_POSIX_ACL=y
860CONFIG_EXT3_FS_SECURITY=y 933CONFIG_EXT3_FS_SECURITY=y
934# CONFIG_EXT4DEV_FS is not set
861CONFIG_JBD=y 935CONFIG_JBD=y
862# CONFIG_JBD_DEBUG is not set 936# CONFIG_JBD_DEBUG is not set
863CONFIG_FS_MBCACHE=y 937CONFIG_FS_MBCACHE=y
@@ -870,6 +944,7 @@ CONFIG_REISERFS_FS_SECURITY=y
870# CONFIG_JFS_FS is not set 944# CONFIG_JFS_FS is not set
871CONFIG_FS_POSIX_ACL=y 945CONFIG_FS_POSIX_ACL=y
872# CONFIG_XFS_FS is not set 946# CONFIG_XFS_FS is not set
947# CONFIG_GFS2_FS is not set
873# CONFIG_OCFS2_FS is not set 948# CONFIG_OCFS2_FS is not set
874# CONFIG_MINIX_FS is not set 949# CONFIG_MINIX_FS is not set
875# CONFIG_ROMFS_FS is not set 950# CONFIG_ROMFS_FS is not set
@@ -880,6 +955,7 @@ CONFIG_DNOTIFY=y
880CONFIG_AUTOFS_FS=m 955CONFIG_AUTOFS_FS=m
881CONFIG_AUTOFS4_FS=m 956CONFIG_AUTOFS4_FS=m
882CONFIG_FUSE_FS=m 957CONFIG_FUSE_FS=m
958CONFIG_GENERIC_ACL=y
883 959
884# 960#
885# CD-ROM/DVD Filesystems 961# CD-ROM/DVD Filesystems
@@ -899,23 +975,25 @@ CONFIG_FUSE_FS=m
899# 975#
900CONFIG_PROC_FS=y 976CONFIG_PROC_FS=y
901CONFIG_PROC_KCORE=y 977CONFIG_PROC_KCORE=y
978CONFIG_PROC_SYSCTL=y
902CONFIG_SYSFS=y 979CONFIG_SYSFS=y
903CONFIG_TMPFS=y 980CONFIG_TMPFS=y
981CONFIG_TMPFS_POSIX_ACL=y
904# CONFIG_HUGETLB_PAGE is not set 982# CONFIG_HUGETLB_PAGE is not set
905CONFIG_RAMFS=y 983CONFIG_RAMFS=y
906# CONFIG_CONFIGFS_FS is not set 984CONFIG_CONFIGFS_FS=m
907 985
908# 986#
909# Miscellaneous filesystems 987# Miscellaneous filesystems
910# 988#
911# CONFIG_ADFS_FS is not set 989# CONFIG_ADFS_FS is not set
912# CONFIG_AFFS_FS is not set 990# CONFIG_AFFS_FS is not set
991# CONFIG_ECRYPT_FS is not set
913# CONFIG_HFS_FS is not set 992# CONFIG_HFS_FS is not set
914# CONFIG_HFSPLUS_FS is not set 993# CONFIG_HFSPLUS_FS is not set
915# CONFIG_BEFS_FS is not set 994# CONFIG_BEFS_FS is not set
916# CONFIG_BFS_FS is not set 995# CONFIG_BFS_FS is not set
917# CONFIG_EFS_FS is not set 996# CONFIG_EFS_FS is not set
918# CONFIG_JFFS_FS is not set
919# CONFIG_JFFS2_FS is not set 997# CONFIG_JFFS2_FS is not set
920CONFIG_CRAMFS=m 998CONFIG_CRAMFS=m
921# CONFIG_VXFS_FS is not set 999# CONFIG_VXFS_FS is not set
@@ -944,7 +1022,6 @@ CONFIG_SUNRPC=y
944CONFIG_SMB_FS=m 1022CONFIG_SMB_FS=m
945# CONFIG_SMB_NLS_DEFAULT is not set 1023# CONFIG_SMB_NLS_DEFAULT is not set
946# CONFIG_CIFS is not set 1024# CONFIG_CIFS is not set
947# CONFIG_CIFS_DEBUG2 is not set
948# CONFIG_NCP_FS is not set 1025# CONFIG_NCP_FS is not set
949# CONFIG_CODA_FS is not set 1026# CONFIG_CODA_FS is not set
950# CONFIG_AFS_FS is not set 1027# CONFIG_AFS_FS is not set
@@ -1001,6 +1078,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1001# CONFIG_NLS_UTF8 is not set 1078# CONFIG_NLS_UTF8 is not set
1002 1079
1003# 1080#
1081# Distributed Lock Manager
1082#
1083CONFIG_DLM=m
1084CONFIG_DLM_TCP=y
1085# CONFIG_DLM_SCTP is not set
1086# CONFIG_DLM_DEBUG is not set
1087
1088#
1004# Profiling support 1089# Profiling support
1005# 1090#
1006# CONFIG_PROFILING is not set 1091# CONFIG_PROFILING is not set
@@ -1010,13 +1095,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1010# 1095#
1011CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1096CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1012# CONFIG_PRINTK_TIME is not set 1097# CONFIG_PRINTK_TIME is not set
1098CONFIG_ENABLE_MUST_CHECK=y
1013# CONFIG_MAGIC_SYSRQ is not set 1099# CONFIG_MAGIC_SYSRQ is not set
1014# CONFIG_UNUSED_SYMBOLS is not set 1100# CONFIG_UNUSED_SYMBOLS is not set
1101# CONFIG_DEBUG_FS is not set
1102# CONFIG_HEADERS_CHECK is not set
1015# CONFIG_DEBUG_KERNEL is not set 1103# CONFIG_DEBUG_KERNEL is not set
1016CONFIG_LOG_BUF_SHIFT=14 1104CONFIG_LOG_BUF_SHIFT=14
1017# CONFIG_DEBUG_FS is not set
1018CONFIG_CROSSCOMPILE=y 1105CONFIG_CROSSCOMPILE=y
1019CONFIG_CMDLINE="" 1106CONFIG_CMDLINE=""
1107CONFIG_SYS_SUPPORTS_KGDB=y
1020 1108
1021# 1109#
1022# Security options 1110# Security options
@@ -1029,18 +1117,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1029# Cryptographic options 1117# Cryptographic options
1030# 1118#
1031CONFIG_CRYPTO=y 1119CONFIG_CRYPTO=y
1120CONFIG_CRYPTO_ALGAPI=y
1121CONFIG_CRYPTO_BLKCIPHER=m
1122CONFIG_CRYPTO_HASH=y
1123CONFIG_CRYPTO_MANAGER=y
1032CONFIG_CRYPTO_HMAC=y 1124CONFIG_CRYPTO_HMAC=y
1125CONFIG_CRYPTO_XCBC=m
1033CONFIG_CRYPTO_NULL=m 1126CONFIG_CRYPTO_NULL=m
1034CONFIG_CRYPTO_MD4=m 1127CONFIG_CRYPTO_MD4=m
1035CONFIG_CRYPTO_MD5=m 1128CONFIG_CRYPTO_MD5=y
1036CONFIG_CRYPTO_SHA1=m 1129CONFIG_CRYPTO_SHA1=m
1037CONFIG_CRYPTO_SHA256=m 1130CONFIG_CRYPTO_SHA256=m
1038CONFIG_CRYPTO_SHA512=m 1131CONFIG_CRYPTO_SHA512=m
1039CONFIG_CRYPTO_WP512=m 1132CONFIG_CRYPTO_WP512=m
1040CONFIG_CRYPTO_TGR192=m 1133CONFIG_CRYPTO_TGR192=m
1134CONFIG_CRYPTO_GF128MUL=m
1135CONFIG_CRYPTO_ECB=m
1136CONFIG_CRYPTO_CBC=m
1137CONFIG_CRYPTO_PCBC=m
1138CONFIG_CRYPTO_LRW=m
1041CONFIG_CRYPTO_DES=m 1139CONFIG_CRYPTO_DES=m
1140CONFIG_CRYPTO_FCRYPT=m
1042CONFIG_CRYPTO_BLOWFISH=m 1141CONFIG_CRYPTO_BLOWFISH=m
1043CONFIG_CRYPTO_TWOFISH=m 1142CONFIG_CRYPTO_TWOFISH=m
1143CONFIG_CRYPTO_TWOFISH_COMMON=m
1044CONFIG_CRYPTO_SERPENT=m 1144CONFIG_CRYPTO_SERPENT=m
1045CONFIG_CRYPTO_AES=m 1145CONFIG_CRYPTO_AES=m
1046CONFIG_CRYPTO_CAST5=m 1146CONFIG_CRYPTO_CAST5=m
@@ -1052,6 +1152,7 @@ CONFIG_CRYPTO_ANUBIS=m
1052CONFIG_CRYPTO_DEFLATE=m 1152CONFIG_CRYPTO_DEFLATE=m
1053CONFIG_CRYPTO_MICHAEL_MIC=m 1153CONFIG_CRYPTO_MICHAEL_MIC=m
1054CONFIG_CRYPTO_CRC32C=m 1154CONFIG_CRYPTO_CRC32C=m
1155CONFIG_CRYPTO_CAMELLIA=m
1055# CONFIG_CRYPTO_TEST is not set 1156# CONFIG_CRYPTO_TEST is not set
1056 1157
1057# 1158#
@@ -1061,6 +1162,7 @@ CONFIG_CRYPTO_CRC32C=m
1061# 1162#
1062# Library routines 1163# Library routines
1063# 1164#
1165CONFIG_BITREVERSE=y
1064CONFIG_CRC_CCITT=m 1166CONFIG_CRC_CCITT=m
1065CONFIG_CRC16=m 1167CONFIG_CRC16=m
1066CONFIG_CRC32=y 1168CONFIG_CRC32=y
@@ -1072,3 +1174,5 @@ CONFIG_TEXTSEARCH_KMP=m
1072CONFIG_TEXTSEARCH_BM=m 1174CONFIG_TEXTSEARCH_BM=m
1073CONFIG_TEXTSEARCH_FSM=m 1175CONFIG_TEXTSEARCH_FSM=m
1074CONFIG_PLIST=y 1176CONFIG_PLIST=y
1177CONFIG_HAS_IOMEM=y
1178CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index c41823b81be0..c24b6008345e 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:43 2006 4# Tue Feb 20 21:47:25 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_DB1200=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_DB1200=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,14 +64,19 @@ CONFIG_MIPS_DB1200=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_COHERENT=y 75CONFIG_DMA_COHERENT=y
72CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y 76CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
74CONFIG_CPU_LITTLE_ENDIAN=y 78CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_APM_EMULATION=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1200=y 81CONFIG_SOC_AU1200=y
77CONFIG_SOC_AU1X00=y 82CONFIG_SOC_AU1X00=y
@@ -116,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
117CONFIG_CPU_HAS_PREFETCH=y 122CONFIG_CPU_HAS_PREFETCH=y
118CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_64BIT_PHYS_ADDR=y 127CONFIG_64BIT_PHYS_ADDR=y
123CONFIG_CPU_HAS_LLSC=y 128CONFIG_CPU_HAS_LLSC=y
@@ -135,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,16 +172,21 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
170CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
171# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
172CONFIG_IKCONFIG=y 182CONFIG_IKCONFIG=y
173CONFIG_IKCONFIG_PROC=y 183CONFIG_IKCONFIG_PROC=y
184CONFIG_SYSFS_DEPRECATED=y
174# CONFIG_RELAY is not set 185# CONFIG_RELAY is not set
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -182,12 +194,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 194CONFIG_BUG=y
183CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 197CONFIG_FUTEX=y
187CONFIG_EPOLL=y 198CONFIG_EPOLL=y
188CONFIG_SHMEM=y 199CONFIG_SHMEM=y
189CONFIG_SLAB=y 200CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -205,6 +217,7 @@ CONFIG_KMOD=y
205# 217#
206# Block layer 218# Block layer
207# 219#
220CONFIG_BLOCK=y
208# CONFIG_LBD is not set 221# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -251,6 +264,10 @@ CONFIG_PCMCIA_AU1X00=m
251CONFIG_BINFMT_ELF=y 264CONFIG_BINFMT_ELF=y
252# CONFIG_BINFMT_MISC is not set 265# CONFIG_BINFMT_MISC is not set
253CONFIG_TRAD_SIGNALS=y 266CONFIG_TRAD_SIGNALS=y
267
268#
269# Power management options
270#
254# CONFIG_PM is not set 271# CONFIG_PM is not set
255 272
256# 273#
@@ -267,7 +284,10 @@ CONFIG_PACKET=y
267CONFIG_UNIX=y 284CONFIG_UNIX=y
268CONFIG_XFRM=y 285CONFIG_XFRM=y
269CONFIG_XFRM_USER=m 286CONFIG_XFRM_USER=m
287# CONFIG_XFRM_SUB_POLICY is not set
288CONFIG_XFRM_MIGRATE=y
270CONFIG_NET_KEY=y 289CONFIG_NET_KEY=y
290CONFIG_NET_KEY_MIGRATE=y
271CONFIG_INET=y 291CONFIG_INET=y
272CONFIG_IP_MULTICAST=y 292CONFIG_IP_MULTICAST=y
273# CONFIG_IP_ADVANCED_ROUTER is not set 293# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -285,10 +305,13 @@ CONFIG_IP_FIB_HASH=y
285# CONFIG_INET_TUNNEL is not set 305# CONFIG_INET_TUNNEL is not set
286CONFIG_INET_XFRM_MODE_TRANSPORT=m 306CONFIG_INET_XFRM_MODE_TRANSPORT=m
287CONFIG_INET_XFRM_MODE_TUNNEL=m 307CONFIG_INET_XFRM_MODE_TUNNEL=m
308CONFIG_INET_XFRM_MODE_BEET=m
288CONFIG_INET_DIAG=y 309CONFIG_INET_DIAG=y
289CONFIG_INET_TCP_DIAG=y 310CONFIG_INET_TCP_DIAG=y
290# CONFIG_TCP_CONG_ADVANCED is not set 311# CONFIG_TCP_CONG_ADVANCED is not set
291CONFIG_TCP_CONG_BIC=y 312CONFIG_TCP_CONG_CUBIC=y
313CONFIG_DEFAULT_TCP_CONG="cubic"
314CONFIG_TCP_MD5SIG=y
292 315
293# 316#
294# IP: Virtual Server Configuration 317# IP: Virtual Server Configuration
@@ -305,15 +328,41 @@ CONFIG_NETFILTER=y
305# Core Netfilter Configuration 328# Core Netfilter Configuration
306# 329#
307# CONFIG_NETFILTER_NETLINK is not set 330# CONFIG_NETFILTER_NETLINK is not set
308# CONFIG_NF_CONNTRACK is not set 331CONFIG_NF_CONNTRACK_ENABLED=m
332CONFIG_NF_CONNTRACK_SUPPORT=y
333# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
334CONFIG_NF_CONNTRACK=m
335CONFIG_NF_CT_ACCT=y
336CONFIG_NF_CONNTRACK_MARK=y
337CONFIG_NF_CONNTRACK_SECMARK=y
338CONFIG_NF_CONNTRACK_EVENTS=y
339CONFIG_NF_CT_PROTO_GRE=m
340CONFIG_NF_CT_PROTO_SCTP=m
341CONFIG_NF_CONNTRACK_AMANDA=m
342CONFIG_NF_CONNTRACK_FTP=m
343CONFIG_NF_CONNTRACK_H323=m
344CONFIG_NF_CONNTRACK_IRC=m
345# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
346CONFIG_NF_CONNTRACK_PPTP=m
347CONFIG_NF_CONNTRACK_SANE=m
348CONFIG_NF_CONNTRACK_SIP=m
349CONFIG_NF_CONNTRACK_TFTP=m
309CONFIG_NETFILTER_XTABLES=m 350CONFIG_NETFILTER_XTABLES=m
310CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 351CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
311CONFIG_NETFILTER_XT_TARGET_MARK=m 352CONFIG_NETFILTER_XT_TARGET_MARK=m
312CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
354CONFIG_NETFILTER_XT_TARGET_NFLOG=m
313CONFIG_NETFILTER_XT_TARGET_SECMARK=m 355CONFIG_NETFILTER_XT_TARGET_SECMARK=m
356CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
357CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
314CONFIG_NETFILTER_XT_MATCH_COMMENT=m 358CONFIG_NETFILTER_XT_MATCH_COMMENT=m
359CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
360CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
361CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
315CONFIG_NETFILTER_XT_MATCH_DCCP=m 362CONFIG_NETFILTER_XT_MATCH_DCCP=m
363CONFIG_NETFILTER_XT_MATCH_DSCP=m
316CONFIG_NETFILTER_XT_MATCH_ESP=m 364CONFIG_NETFILTER_XT_MATCH_ESP=m
365CONFIG_NETFILTER_XT_MATCH_HELPER=m
317CONFIG_NETFILTER_XT_MATCH_LENGTH=m 366CONFIG_NETFILTER_XT_MATCH_LENGTH=m
318CONFIG_NETFILTER_XT_MATCH_LIMIT=m 367CONFIG_NETFILTER_XT_MATCH_LIMIT=m
319CONFIG_NETFILTER_XT_MATCH_MAC=m 368CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -324,14 +373,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
324CONFIG_NETFILTER_XT_MATCH_QUOTA=m 373CONFIG_NETFILTER_XT_MATCH_QUOTA=m
325CONFIG_NETFILTER_XT_MATCH_REALM=m 374CONFIG_NETFILTER_XT_MATCH_REALM=m
326CONFIG_NETFILTER_XT_MATCH_SCTP=m 375CONFIG_NETFILTER_XT_MATCH_SCTP=m
376CONFIG_NETFILTER_XT_MATCH_STATE=m
327CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 377CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
328CONFIG_NETFILTER_XT_MATCH_STRING=m 378CONFIG_NETFILTER_XT_MATCH_STRING=m
329CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 379CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
380CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
330 381
331# 382#
332# IP: Netfilter Configuration 383# IP: Netfilter Configuration
333# 384#
334# CONFIG_IP_NF_CONNTRACK is not set 385CONFIG_NF_CONNTRACK_IPV4=m
386CONFIG_NF_CONNTRACK_PROC_COMPAT=y
335# CONFIG_IP_NF_QUEUE is not set 387# CONFIG_IP_NF_QUEUE is not set
336# CONFIG_IP_NF_IPTABLES is not set 388# CONFIG_IP_NF_IPTABLES is not set
337# CONFIG_IP_NF_ARPTABLES is not set 389# CONFIG_IP_NF_ARPTABLES is not set
@@ -359,7 +411,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
359# CONFIG_ATALK is not set 411# CONFIG_ATALK is not set
360# CONFIG_X25 is not set 412# CONFIG_X25 is not set
361# CONFIG_LAPB is not set 413# CONFIG_LAPB is not set
362# CONFIG_NET_DIVERT is not set
363# CONFIG_ECONET is not set 414# CONFIG_ECONET is not set
364# CONFIG_WAN_ROUTER is not set 415# CONFIG_WAN_ROUTER is not set
365 416
@@ -409,11 +460,13 @@ CONFIG_MTD_PARTITIONS=y
409# User Modules And Translation Layers 460# User Modules And Translation Layers
410# 461#
411CONFIG_MTD_CHAR=y 462CONFIG_MTD_CHAR=y
463CONFIG_MTD_BLKDEVS=y
412CONFIG_MTD_BLOCK=y 464CONFIG_MTD_BLOCK=y
413# CONFIG_FTL is not set 465# CONFIG_FTL is not set
414# CONFIG_NFTL is not set 466# CONFIG_NFTL is not set
415# CONFIG_INFTL is not set 467# CONFIG_INFTL is not set
416# CONFIG_RFD_FTL is not set 468# CONFIG_RFD_FTL is not set
469# CONFIG_SSFDC is not set
417 470
418# 471#
419# RAM/ROM/Flash chip drivers 472# RAM/ROM/Flash chip drivers
@@ -488,6 +541,7 @@ CONFIG_MTD_NAND_IDS=y
488# 541#
489# Plug and Play support 542# Plug and Play support
490# 543#
544# CONFIG_PNPACPI is not set
491 545
492# 546#
493# Block devices 547# Block devices
@@ -499,14 +553,20 @@ CONFIG_BLK_DEV_LOOP=y
499CONFIG_BLK_DEV_RAM=y 553CONFIG_BLK_DEV_RAM=y
500CONFIG_BLK_DEV_RAM_COUNT=16 554CONFIG_BLK_DEV_RAM_COUNT=16
501CONFIG_BLK_DEV_RAM_SIZE=4096 555CONFIG_BLK_DEV_RAM_SIZE=4096
556CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
502# CONFIG_BLK_DEV_INITRD is not set 557# CONFIG_BLK_DEV_INITRD is not set
503# CONFIG_CDROM_PKTCDVD is not set 558# CONFIG_CDROM_PKTCDVD is not set
504# CONFIG_ATA_OVER_ETH is not set 559# CONFIG_ATA_OVER_ETH is not set
505 560
506# 561#
562# Misc devices
563#
564
565#
507# ATA/ATAPI/MFM/RLL support 566# ATA/ATAPI/MFM/RLL support
508# 567#
509CONFIG_IDE=y 568CONFIG_IDE=y
569CONFIG_IDE_MAX_HWIFS=4
510CONFIG_BLK_DEV_IDE=y 570CONFIG_BLK_DEV_IDE=y
511 571
512# 572#
@@ -540,6 +600,8 @@ CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
540# 600#
541# CONFIG_RAID_ATTRS is not set 601# CONFIG_RAID_ATTRS is not set
542CONFIG_SCSI=y 602CONFIG_SCSI=y
603CONFIG_SCSI_TGT=m
604# CONFIG_SCSI_NETLINK is not set
543CONFIG_SCSI_PROC_FS=y 605CONFIG_SCSI_PROC_FS=y
544 606
545# 607#
@@ -559,20 +621,21 @@ CONFIG_CHR_DEV_SG=y
559CONFIG_SCSI_MULTI_LUN=y 621CONFIG_SCSI_MULTI_LUN=y
560# CONFIG_SCSI_CONSTANTS is not set 622# CONFIG_SCSI_CONSTANTS is not set
561# CONFIG_SCSI_LOGGING is not set 623# CONFIG_SCSI_LOGGING is not set
624CONFIG_SCSI_SCAN_ASYNC=y
562 625
563# 626#
564# SCSI Transport Attributes 627# SCSI Transports
565# 628#
566# CONFIG_SCSI_SPI_ATTRS is not set 629# CONFIG_SCSI_SPI_ATTRS is not set
567# CONFIG_SCSI_FC_ATTRS is not set 630# CONFIG_SCSI_FC_ATTRS is not set
568# CONFIG_SCSI_ISCSI_ATTRS is not set 631# CONFIG_SCSI_ISCSI_ATTRS is not set
569# CONFIG_SCSI_SAS_ATTRS is not set 632# CONFIG_SCSI_SAS_ATTRS is not set
633# CONFIG_SCSI_SAS_LIBSAS is not set
570 634
571# 635#
572# SCSI low-level drivers 636# SCSI low-level drivers
573# 637#
574# CONFIG_ISCSI_TCP is not set 638# CONFIG_ISCSI_TCP is not set
575# CONFIG_SCSI_SATA is not set
576# CONFIG_SCSI_DEBUG is not set 639# CONFIG_SCSI_DEBUG is not set
577 640
578# 641#
@@ -585,6 +648,11 @@ CONFIG_SCSI_MULTI_LUN=y
585# CONFIG_PCMCIA_SYM53C500 is not set 648# CONFIG_PCMCIA_SYM53C500 is not set
586 649
587# 650#
651# Serial ATA (prod) and Parallel ATA (experimental) drivers
652#
653# CONFIG_ATA is not set
654
655#
588# Multi-device support (RAID and LVM) 656# Multi-device support (RAID and LVM)
589# 657#
590# CONFIG_MD is not set 658# CONFIG_MD is not set
@@ -672,6 +740,7 @@ CONFIG_MII=m
672# Input device support 740# Input device support
673# 741#
674CONFIG_INPUT=y 742CONFIG_INPUT=y
743# CONFIG_INPUT_FF_MEMLESS is not set
675 744
676# 745#
677# Userland interfaces 746# Userland interfaces
@@ -751,10 +820,6 @@ CONFIG_LEGACY_PTY_COUNT=256
751# CONFIG_R3964 is not set 820# CONFIG_R3964 is not set
752 821
753# 822#
754# Ftape, the floppy tape device driver
755#
756
757#
758# PCMCIA character devices 823# PCMCIA character devices
759# 824#
760# CONFIG_SYNCLINK_CS is not set 825# CONFIG_SYNCLINK_CS is not set
@@ -766,7 +831,6 @@ CONFIG_LEGACY_PTY_COUNT=256
766# TPM devices 831# TPM devices
767# 832#
768# CONFIG_TCG_TPM is not set 833# CONFIG_TCG_TPM is not set
769# CONFIG_TELCLOCK is not set
770 834
771# 835#
772# I2C support 836# I2C support
@@ -782,6 +846,7 @@ CONFIG_LEGACY_PTY_COUNT=256
782# 846#
783# Dallas's 1-wire bus 847# Dallas's 1-wire bus
784# 848#
849# CONFIG_W1 is not set
785 850
786# 851#
787# Hardware Monitoring support 852# Hardware Monitoring support
@@ -790,14 +855,9 @@ CONFIG_LEGACY_PTY_COUNT=256
790# CONFIG_HWMON_VID is not set 855# CONFIG_HWMON_VID is not set
791 856
792# 857#
793# Misc devices
794#
795
796#
797# Multimedia devices 858# Multimedia devices
798# 859#
799# CONFIG_VIDEO_DEV is not set 860# CONFIG_VIDEO_DEV is not set
800CONFIG_VIDEO_V4L2=y
801 861
802# 862#
803# Digital Video Broadcasting Devices 863# Digital Video Broadcasting Devices
@@ -812,6 +872,7 @@ CONFIG_FB=y
812CONFIG_FB_CFB_FILLRECT=y 872CONFIG_FB_CFB_FILLRECT=y
813CONFIG_FB_CFB_COPYAREA=y 873CONFIG_FB_CFB_COPYAREA=y
814CONFIG_FB_CFB_IMAGEBLIT=y 874CONFIG_FB_CFB_IMAGEBLIT=y
875# CONFIG_FB_SVGALIB is not set
815# CONFIG_FB_MACMODES is not set 876# CONFIG_FB_MACMODES is not set
816# CONFIG_FB_BACKLIGHT is not set 877# CONFIG_FB_BACKLIGHT is not set
817# CONFIG_FB_MODE_HELPERS is not set 878# CONFIG_FB_MODE_HELPERS is not set
@@ -843,6 +904,12 @@ CONFIG_LOGO_LINUX_CLUT224=y
843# CONFIG_SOUND is not set 904# CONFIG_SOUND is not set
844 905
845# 906#
907# HID Devices
908#
909CONFIG_HID=y
910# CONFIG_HID_DEBUG is not set
911
912#
846# USB support 913# USB support
847# 914#
848CONFIG_USB_ARCH_HAS_HCD=y 915CONFIG_USB_ARCH_HAS_HCD=y
@@ -916,6 +983,14 @@ CONFIG_MMC_AU1X=y
916# 983#
917 984
918# 985#
986# Auxiliary Display support
987#
988
989#
990# Virtualization
991#
992
993#
919# File systems 994# File systems
920# 995#
921CONFIG_EXT2_FS=y 996CONFIG_EXT2_FS=y
@@ -927,6 +1002,7 @@ CONFIG_EXT3_FS=y
927CONFIG_EXT3_FS_XATTR=y 1002CONFIG_EXT3_FS_XATTR=y
928CONFIG_EXT3_FS_POSIX_ACL=y 1003CONFIG_EXT3_FS_POSIX_ACL=y
929CONFIG_EXT3_FS_SECURITY=y 1004CONFIG_EXT3_FS_SECURITY=y
1005# CONFIG_EXT4DEV_FS is not set
930CONFIG_JBD=y 1006CONFIG_JBD=y
931# CONFIG_JBD_DEBUG is not set 1007# CONFIG_JBD_DEBUG is not set
932CONFIG_FS_MBCACHE=y 1008CONFIG_FS_MBCACHE=y
@@ -938,6 +1014,7 @@ CONFIG_JFS_FS=y
938# CONFIG_JFS_STATISTICS is not set 1014# CONFIG_JFS_STATISTICS is not set
939CONFIG_FS_POSIX_ACL=y 1015CONFIG_FS_POSIX_ACL=y
940# CONFIG_XFS_FS is not set 1016# CONFIG_XFS_FS is not set
1017# CONFIG_GFS2_FS is not set
941# CONFIG_OCFS2_FS is not set 1018# CONFIG_OCFS2_FS is not set
942# CONFIG_MINIX_FS is not set 1019# CONFIG_MINIX_FS is not set
943# CONFIG_ROMFS_FS is not set 1020# CONFIG_ROMFS_FS is not set
@@ -948,6 +1025,7 @@ CONFIG_DNOTIFY=y
948# CONFIG_AUTOFS_FS is not set 1025# CONFIG_AUTOFS_FS is not set
949# CONFIG_AUTOFS4_FS is not set 1026# CONFIG_AUTOFS4_FS is not set
950# CONFIG_FUSE_FS is not set 1027# CONFIG_FUSE_FS is not set
1028CONFIG_GENERIC_ACL=y
951 1029
952# 1030#
953# CD-ROM/DVD Filesystems 1031# CD-ROM/DVD Filesystems
@@ -955,7 +1033,6 @@ CONFIG_DNOTIFY=y
955CONFIG_ISO9660_FS=m 1033CONFIG_ISO9660_FS=m
956CONFIG_JOLIET=y 1034CONFIG_JOLIET=y
957CONFIG_ZISOFS=y 1035CONFIG_ZISOFS=y
958CONFIG_ZISOFS_FS=m
959CONFIG_UDF_FS=m 1036CONFIG_UDF_FS=m
960CONFIG_UDF_NLS=y 1037CONFIG_UDF_NLS=y
961 1038
@@ -974,23 +1051,25 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
974# 1051#
975CONFIG_PROC_FS=y 1052CONFIG_PROC_FS=y
976CONFIG_PROC_KCORE=y 1053CONFIG_PROC_KCORE=y
1054CONFIG_PROC_SYSCTL=y
977CONFIG_SYSFS=y 1055CONFIG_SYSFS=y
978CONFIG_TMPFS=y 1056CONFIG_TMPFS=y
1057CONFIG_TMPFS_POSIX_ACL=y
979# CONFIG_HUGETLB_PAGE is not set 1058# CONFIG_HUGETLB_PAGE is not set
980CONFIG_RAMFS=y 1059CONFIG_RAMFS=y
981# CONFIG_CONFIGFS_FS is not set 1060CONFIG_CONFIGFS_FS=m
982 1061
983# 1062#
984# Miscellaneous filesystems 1063# Miscellaneous filesystems
985# 1064#
986# CONFIG_ADFS_FS is not set 1065# CONFIG_ADFS_FS is not set
987# CONFIG_AFFS_FS is not set 1066# CONFIG_AFFS_FS is not set
1067# CONFIG_ECRYPT_FS is not set
988# CONFIG_HFS_FS is not set 1068# CONFIG_HFS_FS is not set
989# CONFIG_HFSPLUS_FS is not set 1069# CONFIG_HFSPLUS_FS is not set
990# CONFIG_BEFS_FS is not set 1070# CONFIG_BEFS_FS is not set
991# CONFIG_BFS_FS is not set 1071# CONFIG_BFS_FS is not set
992# CONFIG_EFS_FS is not set 1072# CONFIG_EFS_FS is not set
993# CONFIG_JFFS_FS is not set
994CONFIG_JFFS2_FS=y 1073CONFIG_JFFS2_FS=y
995CONFIG_JFFS2_FS_DEBUG=0 1074CONFIG_JFFS2_FS_DEBUG=0
996CONFIG_JFFS2_FS_WRITEBUFFER=y 1075CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1025,7 +1104,6 @@ CONFIG_SUNRPC=y
1025CONFIG_SMB_FS=y 1104CONFIG_SMB_FS=y
1026# CONFIG_SMB_NLS_DEFAULT is not set 1105# CONFIG_SMB_NLS_DEFAULT is not set
1027# CONFIG_CIFS is not set 1106# CONFIG_CIFS is not set
1028# CONFIG_CIFS_DEBUG2 is not set
1029# CONFIG_NCP_FS is not set 1107# CONFIG_NCP_FS is not set
1030# CONFIG_CODA_FS is not set 1108# CONFIG_CODA_FS is not set
1031# CONFIG_AFS_FS is not set 1109# CONFIG_AFS_FS is not set
@@ -1082,6 +1160,14 @@ CONFIG_NLS_KOI8_U=m
1082CONFIG_NLS_UTF8=m 1160CONFIG_NLS_UTF8=m
1083 1161
1084# 1162#
1163# Distributed Lock Manager
1164#
1165CONFIG_DLM=m
1166CONFIG_DLM_TCP=y
1167# CONFIG_DLM_SCTP is not set
1168# CONFIG_DLM_DEBUG is not set
1169
1170#
1085# Profiling support 1171# Profiling support
1086# 1172#
1087# CONFIG_PROFILING is not set 1173# CONFIG_PROFILING is not set
@@ -1091,13 +1177,16 @@ CONFIG_NLS_UTF8=m
1091# 1177#
1092CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1178CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1093# CONFIG_PRINTK_TIME is not set 1179# CONFIG_PRINTK_TIME is not set
1180CONFIG_ENABLE_MUST_CHECK=y
1094# CONFIG_MAGIC_SYSRQ is not set 1181# CONFIG_MAGIC_SYSRQ is not set
1095# CONFIG_UNUSED_SYMBOLS is not set 1182# CONFIG_UNUSED_SYMBOLS is not set
1183# CONFIG_DEBUG_FS is not set
1184# CONFIG_HEADERS_CHECK is not set
1096# CONFIG_DEBUG_KERNEL is not set 1185# CONFIG_DEBUG_KERNEL is not set
1097CONFIG_LOG_BUF_SHIFT=14 1186CONFIG_LOG_BUF_SHIFT=14
1098# CONFIG_DEBUG_FS is not set
1099CONFIG_CROSSCOMPILE=y 1187CONFIG_CROSSCOMPILE=y
1100CONFIG_CMDLINE="mem=48M" 1188CONFIG_CMDLINE="mem=48M"
1189CONFIG_SYS_SUPPORTS_KGDB=y
1101 1190
1102# 1191#
1103# Security options 1192# Security options
@@ -1109,7 +1198,44 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1109# 1198#
1110# Cryptographic options 1199# Cryptographic options
1111# 1200#
1112# CONFIG_CRYPTO is not set 1201CONFIG_CRYPTO=y
1202CONFIG_CRYPTO_ALGAPI=y
1203CONFIG_CRYPTO_BLKCIPHER=m
1204CONFIG_CRYPTO_HASH=m
1205CONFIG_CRYPTO_MANAGER=m
1206CONFIG_CRYPTO_HMAC=m
1207CONFIG_CRYPTO_XCBC=m
1208CONFIG_CRYPTO_NULL=m
1209CONFIG_CRYPTO_MD4=m
1210CONFIG_CRYPTO_MD5=y
1211CONFIG_CRYPTO_SHA1=m
1212CONFIG_CRYPTO_SHA256=m
1213CONFIG_CRYPTO_SHA512=m
1214CONFIG_CRYPTO_WP512=m
1215CONFIG_CRYPTO_TGR192=m
1216CONFIG_CRYPTO_GF128MUL=m
1217CONFIG_CRYPTO_ECB=m
1218CONFIG_CRYPTO_CBC=m
1219CONFIG_CRYPTO_PCBC=m
1220CONFIG_CRYPTO_LRW=m
1221CONFIG_CRYPTO_DES=m
1222CONFIG_CRYPTO_FCRYPT=m
1223CONFIG_CRYPTO_BLOWFISH=m
1224CONFIG_CRYPTO_TWOFISH=m
1225CONFIG_CRYPTO_TWOFISH_COMMON=m
1226CONFIG_CRYPTO_SERPENT=m
1227CONFIG_CRYPTO_AES=m
1228CONFIG_CRYPTO_CAST5=m
1229CONFIG_CRYPTO_CAST6=m
1230CONFIG_CRYPTO_TEA=m
1231CONFIG_CRYPTO_ARC4=m
1232CONFIG_CRYPTO_KHAZAD=m
1233CONFIG_CRYPTO_ANUBIS=m
1234CONFIG_CRYPTO_DEFLATE=m
1235CONFIG_CRYPTO_MICHAEL_MIC=m
1236CONFIG_CRYPTO_CRC32C=m
1237CONFIG_CRYPTO_CAMELLIA=m
1238# CONFIG_CRYPTO_TEST is not set
1113 1239
1114# 1240#
1115# Hardware crypto devices 1241# Hardware crypto devices
@@ -1118,6 +1244,7 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1118# 1244#
1119# Library routines 1245# Library routines
1120# 1246#
1247CONFIG_BITREVERSE=y
1121CONFIG_CRC_CCITT=y 1248CONFIG_CRC_CCITT=y
1122# CONFIG_CRC16 is not set 1249# CONFIG_CRC16 is not set
1123CONFIG_CRC32=y 1250CONFIG_CRC32=y
@@ -1129,3 +1256,5 @@ CONFIG_TEXTSEARCH_KMP=m
1129CONFIG_TEXTSEARCH_BM=m 1256CONFIG_TEXTSEARCH_BM=m
1130CONFIG_TEXTSEARCH_FSM=m 1257CONFIG_TEXTSEARCH_FSM=m
1131CONFIG_PLIST=y 1258CONFIG_PLIST=y
1259CONFIG_HAS_IOMEM=y
1260CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index 7d6d92187880..baad2c5223ba 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:56 2006 4# Tue Feb 20 21:47:26 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_DB1500=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_DB1500=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,15 +64,20 @@ CONFIG_MIPS_DB1500=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y 77CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
74# CONFIG_CPU_BIG_ENDIAN is not set 78# CONFIG_CPU_BIG_ENDIAN is not set
75CONFIG_CPU_LITTLE_ENDIAN=y 79CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_APM_EMULATION=y
76CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 81CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
77CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 82CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
78CONFIG_SOC_AU1500=y 83CONFIG_SOC_AU1500=y
@@ -118,8 +123,8 @@ CONFIG_PAGE_SIZE_4KB=y
118# CONFIG_PAGE_SIZE_64KB is not set 123# CONFIG_PAGE_SIZE_64KB is not set
119CONFIG_CPU_HAS_PREFETCH=y 124CONFIG_CPU_HAS_PREFETCH=y
120CONFIG_MIPS_MT_DISABLED=y 125CONFIG_MIPS_MT_DISABLED=y
121# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_MT_SMP is not set 126# CONFIG_MIPS_MT_SMP is not set
127# CONFIG_MIPS_MT_SMTC is not set
123# CONFIG_MIPS_VPE_LOADER is not set 128# CONFIG_MIPS_VPE_LOADER is not set
124CONFIG_64BIT_PHYS_ADDR=y 129CONFIG_64BIT_PHYS_ADDR=y
125CONFIG_CPU_HAS_LLSC=y 130CONFIG_CPU_HAS_LLSC=y
@@ -136,7 +141,8 @@ CONFIG_FLATMEM=y
136CONFIG_FLAT_NODE_MEM_MAP=y 141CONFIG_FLAT_NODE_MEM_MAP=y
137# CONFIG_SPARSEMEM_STATIC is not set 142# CONFIG_SPARSEMEM_STATIC is not set
138CONFIG_SPLIT_PTLOCK_CPUS=4 143CONFIG_SPLIT_PTLOCK_CPUS=4
139# CONFIG_RESOURCES_64BIT is not set 144CONFIG_RESOURCES_64BIT=y
145CONFIG_ZONE_DMA_FLAG=1
140# CONFIG_HZ_48 is not set 146# CONFIG_HZ_48 is not set
141# CONFIG_HZ_100 is not set 147# CONFIG_HZ_100 is not set
142# CONFIG_HZ_128 is not set 148# CONFIG_HZ_128 is not set
@@ -149,6 +155,7 @@ CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y 155CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set 156# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set 157# CONFIG_PREEMPT is not set
158# CONFIG_KEXEC is not set
152CONFIG_LOCKDEP_SUPPORT=y 159CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 160CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 161CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -167,15 +174,20 @@ CONFIG_LOCALVERSION=""
167CONFIG_LOCALVERSION_AUTO=y 174CONFIG_LOCALVERSION_AUTO=y
168CONFIG_SWAP=y 175CONFIG_SWAP=y
169CONFIG_SYSVIPC=y 176CONFIG_SYSVIPC=y
177# CONFIG_IPC_NS is not set
178CONFIG_SYSVIPC_SYSCTL=y
170# CONFIG_POSIX_MQUEUE is not set 179# CONFIG_POSIX_MQUEUE is not set
171# CONFIG_BSD_PROCESS_ACCT is not set 180# CONFIG_BSD_PROCESS_ACCT is not set
172CONFIG_SYSCTL=y 181# CONFIG_TASKSTATS is not set
182# CONFIG_UTS_NS is not set
173# CONFIG_AUDIT is not set 183# CONFIG_AUDIT is not set
174# CONFIG_IKCONFIG is not set 184# CONFIG_IKCONFIG is not set
185CONFIG_SYSFS_DEPRECATED=y
175CONFIG_RELAY=y 186CONFIG_RELAY=y
176CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 187# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
188CONFIG_SYSCTL=y
178CONFIG_EMBEDDED=y 189CONFIG_EMBEDDED=y
190CONFIG_SYSCTL_SYSCALL=y
179CONFIG_KALLSYMS=y 191CONFIG_KALLSYMS=y
180# CONFIG_KALLSYMS_EXTRA_PASS is not set 192# CONFIG_KALLSYMS_EXTRA_PASS is not set
181CONFIG_HOTPLUG=y 193CONFIG_HOTPLUG=y
@@ -183,12 +195,12 @@ CONFIG_PRINTK=y
183CONFIG_BUG=y 195CONFIG_BUG=y
184CONFIG_ELF_CORE=y 196CONFIG_ELF_CORE=y
185CONFIG_BASE_FULL=y 197CONFIG_BASE_FULL=y
186CONFIG_RT_MUTEXES=y
187CONFIG_FUTEX=y 198CONFIG_FUTEX=y
188CONFIG_EPOLL=y 199CONFIG_EPOLL=y
189CONFIG_SHMEM=y 200CONFIG_SHMEM=y
190CONFIG_SLAB=y 201CONFIG_SLAB=y
191CONFIG_VM_EVENT_COUNTERS=y 202CONFIG_VM_EVENT_COUNTERS=y
203CONFIG_RT_MUTEXES=y
192# CONFIG_TINY_SHMEM is not set 204# CONFIG_TINY_SHMEM is not set
193CONFIG_BASE_SMALL=0 205CONFIG_BASE_SMALL=0
194# CONFIG_SLOB is not set 206# CONFIG_SLOB is not set
@@ -206,6 +218,7 @@ CONFIG_KMOD=y
206# 218#
207# Block layer 219# Block layer
208# 220#
221CONFIG_BLOCK=y
209# CONFIG_LBD is not set 222# CONFIG_LBD is not set
210# CONFIG_BLK_DEV_IO_TRACE is not set 223# CONFIG_BLK_DEV_IO_TRACE is not set
211# CONFIG_LSF is not set 224# CONFIG_LSF is not set
@@ -259,6 +272,10 @@ CONFIG_PCMCIA_AU1X00=m
259CONFIG_BINFMT_ELF=y 272CONFIG_BINFMT_ELF=y
260# CONFIG_BINFMT_MISC is not set 273# CONFIG_BINFMT_MISC is not set
261CONFIG_TRAD_SIGNALS=y 274CONFIG_TRAD_SIGNALS=y
275
276#
277# Power management options
278#
262# CONFIG_PM is not set 279# CONFIG_PM is not set
263 280
264# 281#
@@ -275,7 +292,10 @@ CONFIG_PACKET=y
275CONFIG_UNIX=y 292CONFIG_UNIX=y
276CONFIG_XFRM=y 293CONFIG_XFRM=y
277CONFIG_XFRM_USER=m 294CONFIG_XFRM_USER=m
295# CONFIG_XFRM_SUB_POLICY is not set
296CONFIG_XFRM_MIGRATE=y
278CONFIG_NET_KEY=y 297CONFIG_NET_KEY=y
298CONFIG_NET_KEY_MIGRATE=y
279CONFIG_INET=y 299CONFIG_INET=y
280CONFIG_IP_MULTICAST=y 300CONFIG_IP_MULTICAST=y
281# CONFIG_IP_ADVANCED_ROUTER is not set 301# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -296,10 +316,13 @@ CONFIG_IP_PNP_BOOTP=y
296# CONFIG_INET_TUNNEL is not set 316# CONFIG_INET_TUNNEL is not set
297CONFIG_INET_XFRM_MODE_TRANSPORT=m 317CONFIG_INET_XFRM_MODE_TRANSPORT=m
298CONFIG_INET_XFRM_MODE_TUNNEL=m 318CONFIG_INET_XFRM_MODE_TUNNEL=m
319CONFIG_INET_XFRM_MODE_BEET=m
299CONFIG_INET_DIAG=y 320CONFIG_INET_DIAG=y
300CONFIG_INET_TCP_DIAG=y 321CONFIG_INET_TCP_DIAG=y
301# CONFIG_TCP_CONG_ADVANCED is not set 322# CONFIG_TCP_CONG_ADVANCED is not set
302CONFIG_TCP_CONG_BIC=y 323CONFIG_TCP_CONG_CUBIC=y
324CONFIG_DEFAULT_TCP_CONG="cubic"
325CONFIG_TCP_MD5SIG=y
303 326
304# 327#
305# IP: Virtual Server Configuration 328# IP: Virtual Server Configuration
@@ -318,15 +341,42 @@ CONFIG_NETFILTER=y
318CONFIG_NETFILTER_NETLINK=m 341CONFIG_NETFILTER_NETLINK=m
319CONFIG_NETFILTER_NETLINK_QUEUE=m 342CONFIG_NETFILTER_NETLINK_QUEUE=m
320CONFIG_NETFILTER_NETLINK_LOG=m 343CONFIG_NETFILTER_NETLINK_LOG=m
321# CONFIG_NF_CONNTRACK is not set 344CONFIG_NF_CONNTRACK_ENABLED=m
345CONFIG_NF_CONNTRACK_SUPPORT=y
346# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
347CONFIG_NF_CONNTRACK=m
348CONFIG_NF_CT_ACCT=y
349CONFIG_NF_CONNTRACK_MARK=y
350CONFIG_NF_CONNTRACK_SECMARK=y
351CONFIG_NF_CONNTRACK_EVENTS=y
352CONFIG_NF_CT_PROTO_GRE=m
353CONFIG_NF_CT_PROTO_SCTP=m
354CONFIG_NF_CONNTRACK_AMANDA=m
355CONFIG_NF_CONNTRACK_FTP=m
356CONFIG_NF_CONNTRACK_H323=m
357CONFIG_NF_CONNTRACK_IRC=m
358# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
359CONFIG_NF_CONNTRACK_PPTP=m
360CONFIG_NF_CONNTRACK_SANE=m
361CONFIG_NF_CONNTRACK_SIP=m
362CONFIG_NF_CONNTRACK_TFTP=m
363CONFIG_NF_CT_NETLINK=m
322CONFIG_NETFILTER_XTABLES=m 364CONFIG_NETFILTER_XTABLES=m
323CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 365CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
324CONFIG_NETFILTER_XT_TARGET_MARK=m 366CONFIG_NETFILTER_XT_TARGET_MARK=m
325CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 367CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
368CONFIG_NETFILTER_XT_TARGET_NFLOG=m
326CONFIG_NETFILTER_XT_TARGET_SECMARK=m 369CONFIG_NETFILTER_XT_TARGET_SECMARK=m
370CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
371CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
327CONFIG_NETFILTER_XT_MATCH_COMMENT=m 372CONFIG_NETFILTER_XT_MATCH_COMMENT=m
373CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
374CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
375CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
328CONFIG_NETFILTER_XT_MATCH_DCCP=m 376CONFIG_NETFILTER_XT_MATCH_DCCP=m
377CONFIG_NETFILTER_XT_MATCH_DSCP=m
329CONFIG_NETFILTER_XT_MATCH_ESP=m 378CONFIG_NETFILTER_XT_MATCH_ESP=m
379CONFIG_NETFILTER_XT_MATCH_HELPER=m
330CONFIG_NETFILTER_XT_MATCH_LENGTH=m 380CONFIG_NETFILTER_XT_MATCH_LENGTH=m
331CONFIG_NETFILTER_XT_MATCH_LIMIT=m 381CONFIG_NETFILTER_XT_MATCH_LIMIT=m
332CONFIG_NETFILTER_XT_MATCH_MAC=m 382CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -337,14 +387,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
337CONFIG_NETFILTER_XT_MATCH_QUOTA=m 387CONFIG_NETFILTER_XT_MATCH_QUOTA=m
338CONFIG_NETFILTER_XT_MATCH_REALM=m 388CONFIG_NETFILTER_XT_MATCH_REALM=m
339CONFIG_NETFILTER_XT_MATCH_SCTP=m 389CONFIG_NETFILTER_XT_MATCH_SCTP=m
390CONFIG_NETFILTER_XT_MATCH_STATE=m
340CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 391CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
341CONFIG_NETFILTER_XT_MATCH_STRING=m 392CONFIG_NETFILTER_XT_MATCH_STRING=m
342CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 393CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
394CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
343 395
344# 396#
345# IP: Netfilter Configuration 397# IP: Netfilter Configuration
346# 398#
347# CONFIG_IP_NF_CONNTRACK is not set 399CONFIG_NF_CONNTRACK_IPV4=m
400CONFIG_NF_CONNTRACK_PROC_COMPAT=y
348# CONFIG_IP_NF_QUEUE is not set 401# CONFIG_IP_NF_QUEUE is not set
349# CONFIG_IP_NF_IPTABLES is not set 402# CONFIG_IP_NF_IPTABLES is not set
350# CONFIG_IP_NF_ARPTABLES is not set 403# CONFIG_IP_NF_ARPTABLES is not set
@@ -372,7 +425,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
372# CONFIG_ATALK is not set 425# CONFIG_ATALK is not set
373# CONFIG_X25 is not set 426# CONFIG_X25 is not set
374# CONFIG_LAPB is not set 427# CONFIG_LAPB is not set
375# CONFIG_NET_DIVERT is not set
376# CONFIG_ECONET is not set 428# CONFIG_ECONET is not set
377# CONFIG_WAN_ROUTER is not set 429# CONFIG_WAN_ROUTER is not set
378 430
@@ -428,11 +480,13 @@ CONFIG_MTD_PARTITIONS=y
428# User Modules And Translation Layers 480# User Modules And Translation Layers
429# 481#
430CONFIG_MTD_CHAR=y 482CONFIG_MTD_CHAR=y
483CONFIG_MTD_BLKDEVS=y
431CONFIG_MTD_BLOCK=y 484CONFIG_MTD_BLOCK=y
432# CONFIG_FTL is not set 485# CONFIG_FTL is not set
433# CONFIG_NFTL is not set 486# CONFIG_NFTL is not set
434# CONFIG_INFTL is not set 487# CONFIG_INFTL is not set
435# CONFIG_RFD_FTL is not set 488# CONFIG_RFD_FTL is not set
489# CONFIG_SSFDC is not set
436 490
437# 491#
438# RAM/ROM/Flash chip drivers 492# RAM/ROM/Flash chip drivers
@@ -502,6 +556,7 @@ CONFIG_MTD_ALCHEMY=y
502# 556#
503# Plug and Play support 557# Plug and Play support
504# 558#
559# CONFIG_PNPACPI is not set
505 560
506# 561#
507# Block devices 562# Block devices
@@ -524,9 +579,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
524CONFIG_ATA_OVER_ETH=m 579CONFIG_ATA_OVER_ETH=m
525 580
526# 581#
582# Misc devices
583#
584CONFIG_SGI_IOC4=m
585# CONFIG_TIFM_CORE is not set
586
587#
527# ATA/ATAPI/MFM/RLL support 588# ATA/ATAPI/MFM/RLL support
528# 589#
529CONFIG_IDE=y 590CONFIG_IDE=y
591CONFIG_IDE_MAX_HWIFS=4
530CONFIG_BLK_DEV_IDE=y 592CONFIG_BLK_DEV_IDE=y
531 593
532# 594#
@@ -536,6 +598,7 @@ CONFIG_BLK_DEV_IDE=y
536CONFIG_BLK_DEV_IDEDISK=y 598CONFIG_BLK_DEV_IDEDISK=y
537# CONFIG_IDEDISK_MULTI_MODE is not set 599# CONFIG_IDEDISK_MULTI_MODE is not set
538CONFIG_BLK_DEV_IDECS=m 600CONFIG_BLK_DEV_IDECS=m
601# CONFIG_BLK_DEV_DELKIN is not set
539# CONFIG_BLK_DEV_IDECD is not set 602# CONFIG_BLK_DEV_IDECD is not set
540# CONFIG_BLK_DEV_IDETAPE is not set 603# CONFIG_BLK_DEV_IDETAPE is not set
541# CONFIG_BLK_DEV_IDEFLOPPY is not set 604# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -556,6 +619,12 @@ CONFIG_BLK_DEV_IDECS=m
556# 619#
557CONFIG_RAID_ATTRS=m 620CONFIG_RAID_ATTRS=m
558# CONFIG_SCSI is not set 621# CONFIG_SCSI is not set
622# CONFIG_SCSI_NETLINK is not set
623
624#
625# Serial ATA (prod) and Parallel ATA (experimental) drivers
626#
627# CONFIG_ATA is not set
559 628
560# 629#
561# Multi-device support (RAID and LVM) 630# Multi-device support (RAID and LVM)
@@ -606,6 +675,8 @@ CONFIG_LXT_PHY=m
606CONFIG_CICADA_PHY=m 675CONFIG_CICADA_PHY=m
607CONFIG_VITESSE_PHY=m 676CONFIG_VITESSE_PHY=m
608CONFIG_SMSC_PHY=m 677CONFIG_SMSC_PHY=m
678# CONFIG_BROADCOM_PHY is not set
679# CONFIG_FIXED_PHY is not set
609 680
610# 681#
611# Ethernet (10 or 100Mbit) 682# Ethernet (10 or 100Mbit)
@@ -643,14 +714,18 @@ CONFIG_MIPS_AU1X00_ENET=y
643# CONFIG_SK98LIN is not set 714# CONFIG_SK98LIN is not set
644# CONFIG_TIGON3 is not set 715# CONFIG_TIGON3 is not set
645# CONFIG_BNX2 is not set 716# CONFIG_BNX2 is not set
717CONFIG_QLA3XXX=m
718# CONFIG_ATL1 is not set
646 719
647# 720#
648# Ethernet (10000 Mbit) 721# Ethernet (10000 Mbit)
649# 722#
650# CONFIG_CHELSIO_T1 is not set 723# CONFIG_CHELSIO_T1 is not set
724CONFIG_CHELSIO_T3=m
651# CONFIG_IXGB is not set 725# CONFIG_IXGB is not set
652# CONFIG_S2IO is not set 726# CONFIG_S2IO is not set
653# CONFIG_MYRI10GE is not set 727# CONFIG_MYRI10GE is not set
728CONFIG_NETXEN_NIC=m
654 729
655# 730#
656# Token Ring devices 731# Token Ring devices
@@ -683,6 +758,7 @@ CONFIG_PPP_DEFLATE=m
683CONFIG_PPP_MPPE=m 758CONFIG_PPP_MPPE=m
684CONFIG_PPPOE=m 759CONFIG_PPPOE=m
685# CONFIG_SLIP is not set 760# CONFIG_SLIP is not set
761CONFIG_SLHC=m
686# CONFIG_SHAPER is not set 762# CONFIG_SHAPER is not set
687# CONFIG_NETCONSOLE is not set 763# CONFIG_NETCONSOLE is not set
688# CONFIG_NETPOLL is not set 764# CONFIG_NETPOLL is not set
@@ -702,6 +778,7 @@ CONFIG_PPPOE=m
702# Input device support 778# Input device support
703# 779#
704CONFIG_INPUT=y 780CONFIG_INPUT=y
781# CONFIG_INPUT_FF_MEMLESS is not set
705 782
706# 783#
707# Userland interfaces 784# Userland interfaces
@@ -780,10 +857,6 @@ CONFIG_LEGACY_PTY_COUNT=256
780# CONFIG_DTLK is not set 857# CONFIG_DTLK is not set
781# CONFIG_R3964 is not set 858# CONFIG_R3964 is not set
782# CONFIG_APPLICOM is not set 859# CONFIG_APPLICOM is not set
783
784#
785# Ftape, the floppy tape device driver
786#
787# CONFIG_DRM is not set 860# CONFIG_DRM is not set
788 861
789# 862#
@@ -798,7 +871,6 @@ CONFIG_SYNCLINK_CS=m
798# TPM devices 871# TPM devices
799# 872#
800# CONFIG_TCG_TPM is not set 873# CONFIG_TCG_TPM is not set
801# CONFIG_TELCLOCK is not set
802 874
803# 875#
804# I2C support 876# I2C support
@@ -823,14 +895,9 @@ CONFIG_SYNCLINK_CS=m
823# CONFIG_HWMON_VID is not set 895# CONFIG_HWMON_VID is not set
824 896
825# 897#
826# Misc devices
827#
828
829#
830# Multimedia devices 898# Multimedia devices
831# 899#
832# CONFIG_VIDEO_DEV is not set 900# CONFIG_VIDEO_DEV is not set
833CONFIG_VIDEO_V4L2=y
834 901
835# 902#
836# Digital Video Broadcasting Devices 903# Digital Video Broadcasting Devices
@@ -843,6 +910,7 @@ CONFIG_VIDEO_V4L2=y
843# 910#
844# CONFIG_FIRMWARE_EDID is not set 911# CONFIG_FIRMWARE_EDID is not set
845# CONFIG_FB is not set 912# CONFIG_FB is not set
913# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
846 914
847# 915#
848# Sound 916# Sound
@@ -873,7 +941,6 @@ CONFIG_SND_VERBOSE_PROCFS=y
873# Generic devices 941# Generic devices
874# 942#
875CONFIG_SND_AC97_CODEC=m 943CONFIG_SND_AC97_CODEC=m
876CONFIG_SND_AC97_BUS=m
877# CONFIG_SND_DUMMY is not set 944# CONFIG_SND_DUMMY is not set
878CONFIG_SND_VIRMIDI=m 945CONFIG_SND_VIRMIDI=m
879CONFIG_SND_MTPAV=m 946CONFIG_SND_MTPAV=m
@@ -938,6 +1005,7 @@ CONFIG_SND_MTPAV=m
938# CONFIG_SND_VIA82XX_MODEM is not set 1005# CONFIG_SND_VIA82XX_MODEM is not set
939# CONFIG_SND_VX222 is not set 1006# CONFIG_SND_VX222 is not set
940# CONFIG_SND_YMFPCI is not set 1007# CONFIG_SND_YMFPCI is not set
1008# CONFIG_SND_AC97_POWER_SAVE is not set
941 1009
942# 1010#
943# ALSA MIPS devices 1011# ALSA MIPS devices
@@ -956,18 +1024,28 @@ CONFIG_SND_AU1X00=m
956# CONFIG_SND_PDAUDIOCF is not set 1024# CONFIG_SND_PDAUDIOCF is not set
957 1025
958# 1026#
1027# SoC audio support
1028#
1029# CONFIG_SND_SOC is not set
1030
1031#
959# Open Sound System 1032# Open Sound System
960# 1033#
961CONFIG_SOUND_PRIME=y 1034CONFIG_SOUND_PRIME=y
1035# CONFIG_OBSOLETE_OSS is not set
962# CONFIG_SOUND_BT878 is not set 1036# CONFIG_SOUND_BT878 is not set
963# CONFIG_SOUND_EMU10K1 is not set
964# CONFIG_SOUND_FUSION is not set
965# CONFIG_SOUND_ES1371 is not set
966# CONFIG_SOUND_ICH is not set 1037# CONFIG_SOUND_ICH is not set
967# CONFIG_SOUND_TRIDENT is not set 1038# CONFIG_SOUND_TRIDENT is not set
968# CONFIG_SOUND_MSNDCLAS is not set 1039# CONFIG_SOUND_MSNDCLAS is not set
969# CONFIG_SOUND_MSNDPIN is not set 1040# CONFIG_SOUND_MSNDPIN is not set
970# CONFIG_SOUND_VIA82CXXX is not set 1041# CONFIG_SOUND_VIA82CXXX is not set
1042CONFIG_AC97_BUS=m
1043
1044#
1045# HID Devices
1046#
1047CONFIG_HID=y
1048# CONFIG_HID_DEBUG is not set
971 1049
972# 1050#
973# USB support 1051# USB support
@@ -982,7 +1060,6 @@ CONFIG_USB=y
982# Miscellaneous USB options 1060# Miscellaneous USB options
983# 1061#
984# CONFIG_USB_DEVICEFS is not set 1062# CONFIG_USB_DEVICEFS is not set
985# CONFIG_USB_BANDWIDTH is not set
986# CONFIG_USB_DYNAMIC_MINORS is not set 1063# CONFIG_USB_DYNAMIC_MINORS is not set
987# CONFIG_USB_OTG is not set 1064# CONFIG_USB_OTG is not set
988 1065
@@ -992,7 +1069,8 @@ CONFIG_USB=y
992# CONFIG_USB_EHCI_HCD is not set 1069# CONFIG_USB_EHCI_HCD is not set
993# CONFIG_USB_ISP116X_HCD is not set 1070# CONFIG_USB_ISP116X_HCD is not set
994CONFIG_USB_OHCI_HCD=y 1071CONFIG_USB_OHCI_HCD=y
995# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1072# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1073# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
996CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1074CONFIG_USB_OHCI_LITTLE_ENDIAN=y
997# CONFIG_USB_UHCI_HCD is not set 1075# CONFIG_USB_UHCI_HCD is not set
998# CONFIG_USB_SL811_HCD is not set 1076# CONFIG_USB_SL811_HCD is not set
@@ -1010,14 +1088,12 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1010# 1088#
1011# may also be needed; see USB_STORAGE Help for more information 1089# may also be needed; see USB_STORAGE Help for more information
1012# 1090#
1013# CONFIG_USB_STORAGE is not set
1014# CONFIG_USB_LIBUSUAL is not set 1091# CONFIG_USB_LIBUSUAL is not set
1015 1092
1016# 1093#
1017# USB Input Devices 1094# USB Input Devices
1018# 1095#
1019CONFIG_USB_HID=y 1096CONFIG_USB_HID=y
1020CONFIG_USB_HIDINPUT=y
1021# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1097# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1022# CONFIG_HID_FF is not set 1098# CONFIG_HID_FF is not set
1023# CONFIG_USB_HIDDEV is not set 1099# CONFIG_USB_HIDDEV is not set
@@ -1033,6 +1109,7 @@ CONFIG_USB_YEALINK=m
1033# CONFIG_USB_ATI_REMOTE2 is not set 1109# CONFIG_USB_ATI_REMOTE2 is not set
1034# CONFIG_USB_KEYSPAN_REMOTE is not set 1110# CONFIG_USB_KEYSPAN_REMOTE is not set
1035# CONFIG_USB_APPLETOUCH is not set 1111# CONFIG_USB_APPLETOUCH is not set
1112# CONFIG_USB_GTCO is not set
1036 1113
1037# 1114#
1038# USB Imaging devices 1115# USB Imaging devices
@@ -1046,6 +1123,7 @@ CONFIG_USB_YEALINK=m
1046# CONFIG_USB_KAWETH is not set 1123# CONFIG_USB_KAWETH is not set
1047# CONFIG_USB_PEGASUS is not set 1124# CONFIG_USB_PEGASUS is not set
1048# CONFIG_USB_RTL8150 is not set 1125# CONFIG_USB_RTL8150 is not set
1126# CONFIG_USB_USBNET_MII is not set
1049# CONFIG_USB_USBNET is not set 1127# CONFIG_USB_USBNET is not set
1050CONFIG_USB_MON=y 1128CONFIG_USB_MON=y
1051 1129
@@ -1063,18 +1141,21 @@ CONFIG_USB_MON=y
1063# 1141#
1064# CONFIG_USB_EMI62 is not set 1142# CONFIG_USB_EMI62 is not set
1065# CONFIG_USB_EMI26 is not set 1143# CONFIG_USB_EMI26 is not set
1144# CONFIG_USB_ADUTUX is not set
1066# CONFIG_USB_AUERSWALD is not set 1145# CONFIG_USB_AUERSWALD is not set
1067# CONFIG_USB_RIO500 is not set 1146# CONFIG_USB_RIO500 is not set
1068# CONFIG_USB_LEGOTOWER is not set 1147# CONFIG_USB_LEGOTOWER is not set
1069# CONFIG_USB_LCD is not set 1148# CONFIG_USB_LCD is not set
1149# CONFIG_USB_BERRY_CHARGE is not set
1070# CONFIG_USB_LED is not set 1150# CONFIG_USB_LED is not set
1071# CONFIG_USB_CY7C63 is not set 1151# CONFIG_USB_CYPRESS_CY7C63 is not set
1072# CONFIG_USB_CYTHERM is not set 1152# CONFIG_USB_CYTHERM is not set
1073# CONFIG_USB_PHIDGETKIT is not set 1153# CONFIG_USB_PHIDGET is not set
1074# CONFIG_USB_PHIDGETSERVO is not set
1075# CONFIG_USB_IDMOUSE is not set 1154# CONFIG_USB_IDMOUSE is not set
1155# CONFIG_USB_FTDI_ELAN is not set
1076# CONFIG_USB_APPLEDISPLAY is not set 1156# CONFIG_USB_APPLEDISPLAY is not set
1077CONFIG_USB_LD=m 1157CONFIG_USB_LD=m
1158# CONFIG_USB_TRANCEVIBRATOR is not set
1078 1159
1079# 1160#
1080# USB DSL modem support 1161# USB DSL modem support
@@ -1131,6 +1212,14 @@ CONFIG_USB_LD=m
1131# 1212#
1132 1213
1133# 1214#
1215# Auxiliary Display support
1216#
1217
1218#
1219# Virtualization
1220#
1221
1222#
1134# File systems 1223# File systems
1135# 1224#
1136CONFIG_EXT2_FS=y 1225CONFIG_EXT2_FS=y
@@ -1142,6 +1231,7 @@ CONFIG_EXT3_FS=y
1142CONFIG_EXT3_FS_XATTR=y 1231CONFIG_EXT3_FS_XATTR=y
1143CONFIG_EXT3_FS_POSIX_ACL=y 1232CONFIG_EXT3_FS_POSIX_ACL=y
1144CONFIG_EXT3_FS_SECURITY=y 1233CONFIG_EXT3_FS_SECURITY=y
1234# CONFIG_EXT4DEV_FS is not set
1145CONFIG_JBD=y 1235CONFIG_JBD=y
1146# CONFIG_JBD_DEBUG is not set 1236# CONFIG_JBD_DEBUG is not set
1147CONFIG_FS_MBCACHE=y 1237CONFIG_FS_MBCACHE=y
@@ -1154,6 +1244,7 @@ CONFIG_REISERFS_FS_SECURITY=y
1154# CONFIG_JFS_FS is not set 1244# CONFIG_JFS_FS is not set
1155CONFIG_FS_POSIX_ACL=y 1245CONFIG_FS_POSIX_ACL=y
1156# CONFIG_XFS_FS is not set 1246# CONFIG_XFS_FS is not set
1247# CONFIG_GFS2_FS is not set
1157# CONFIG_OCFS2_FS is not set 1248# CONFIG_OCFS2_FS is not set
1158# CONFIG_MINIX_FS is not set 1249# CONFIG_MINIX_FS is not set
1159# CONFIG_ROMFS_FS is not set 1250# CONFIG_ROMFS_FS is not set
@@ -1164,6 +1255,7 @@ CONFIG_DNOTIFY=y
1164CONFIG_AUTOFS_FS=m 1255CONFIG_AUTOFS_FS=m
1165CONFIG_AUTOFS4_FS=m 1256CONFIG_AUTOFS4_FS=m
1166CONFIG_FUSE_FS=m 1257CONFIG_FUSE_FS=m
1258CONFIG_GENERIC_ACL=y
1167 1259
1168# 1260#
1169# CD-ROM/DVD Filesystems 1261# CD-ROM/DVD Filesystems
@@ -1183,23 +1275,25 @@ CONFIG_FUSE_FS=m
1183# 1275#
1184CONFIG_PROC_FS=y 1276CONFIG_PROC_FS=y
1185CONFIG_PROC_KCORE=y 1277CONFIG_PROC_KCORE=y
1278CONFIG_PROC_SYSCTL=y
1186CONFIG_SYSFS=y 1279CONFIG_SYSFS=y
1187CONFIG_TMPFS=y 1280CONFIG_TMPFS=y
1281CONFIG_TMPFS_POSIX_ACL=y
1188# CONFIG_HUGETLB_PAGE is not set 1282# CONFIG_HUGETLB_PAGE is not set
1189CONFIG_RAMFS=y 1283CONFIG_RAMFS=y
1190# CONFIG_CONFIGFS_FS is not set 1284CONFIG_CONFIGFS_FS=m
1191 1285
1192# 1286#
1193# Miscellaneous filesystems 1287# Miscellaneous filesystems
1194# 1288#
1195# CONFIG_ADFS_FS is not set 1289# CONFIG_ADFS_FS is not set
1196# CONFIG_AFFS_FS is not set 1290# CONFIG_AFFS_FS is not set
1291# CONFIG_ECRYPT_FS is not set
1197# CONFIG_HFS_FS is not set 1292# CONFIG_HFS_FS is not set
1198# CONFIG_HFSPLUS_FS is not set 1293# CONFIG_HFSPLUS_FS is not set
1199# CONFIG_BEFS_FS is not set 1294# CONFIG_BEFS_FS is not set
1200# CONFIG_BFS_FS is not set 1295# CONFIG_BFS_FS is not set
1201# CONFIG_EFS_FS is not set 1296# CONFIG_EFS_FS is not set
1202# CONFIG_JFFS_FS is not set
1203# CONFIG_JFFS2_FS is not set 1297# CONFIG_JFFS2_FS is not set
1204CONFIG_CRAMFS=m 1298CONFIG_CRAMFS=m
1205# CONFIG_VXFS_FS is not set 1299# CONFIG_VXFS_FS is not set
@@ -1228,7 +1322,6 @@ CONFIG_SUNRPC=y
1228CONFIG_SMB_FS=m 1322CONFIG_SMB_FS=m
1229# CONFIG_SMB_NLS_DEFAULT is not set 1323# CONFIG_SMB_NLS_DEFAULT is not set
1230# CONFIG_CIFS is not set 1324# CONFIG_CIFS is not set
1231# CONFIG_CIFS_DEBUG2 is not set
1232# CONFIG_NCP_FS is not set 1325# CONFIG_NCP_FS is not set
1233# CONFIG_CODA_FS is not set 1326# CONFIG_CODA_FS is not set
1234# CONFIG_AFS_FS is not set 1327# CONFIG_AFS_FS is not set
@@ -1285,6 +1378,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1285# CONFIG_NLS_UTF8 is not set 1378# CONFIG_NLS_UTF8 is not set
1286 1379
1287# 1380#
1381# Distributed Lock Manager
1382#
1383CONFIG_DLM=m
1384CONFIG_DLM_TCP=y
1385# CONFIG_DLM_SCTP is not set
1386# CONFIG_DLM_DEBUG is not set
1387
1388#
1288# Profiling support 1389# Profiling support
1289# 1390#
1290# CONFIG_PROFILING is not set 1391# CONFIG_PROFILING is not set
@@ -1294,13 +1395,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1294# 1395#
1295CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1396CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1296# CONFIG_PRINTK_TIME is not set 1397# CONFIG_PRINTK_TIME is not set
1398CONFIG_ENABLE_MUST_CHECK=y
1297# CONFIG_MAGIC_SYSRQ is not set 1399# CONFIG_MAGIC_SYSRQ is not set
1298# CONFIG_UNUSED_SYMBOLS is not set 1400# CONFIG_UNUSED_SYMBOLS is not set
1401# CONFIG_DEBUG_FS is not set
1402# CONFIG_HEADERS_CHECK is not set
1299# CONFIG_DEBUG_KERNEL is not set 1403# CONFIG_DEBUG_KERNEL is not set
1300CONFIG_LOG_BUF_SHIFT=14 1404CONFIG_LOG_BUF_SHIFT=14
1301# CONFIG_DEBUG_FS is not set
1302CONFIG_CROSSCOMPILE=y 1405CONFIG_CROSSCOMPILE=y
1303CONFIG_CMDLINE="" 1406CONFIG_CMDLINE=""
1407CONFIG_SYS_SUPPORTS_KGDB=y
1304 1408
1305# 1409#
1306# Security options 1410# Security options
@@ -1313,18 +1417,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1313# Cryptographic options 1417# Cryptographic options
1314# 1418#
1315CONFIG_CRYPTO=y 1419CONFIG_CRYPTO=y
1420CONFIG_CRYPTO_ALGAPI=y
1421CONFIG_CRYPTO_BLKCIPHER=m
1422CONFIG_CRYPTO_HASH=y
1423CONFIG_CRYPTO_MANAGER=y
1316CONFIG_CRYPTO_HMAC=y 1424CONFIG_CRYPTO_HMAC=y
1425CONFIG_CRYPTO_XCBC=m
1317CONFIG_CRYPTO_NULL=m 1426CONFIG_CRYPTO_NULL=m
1318CONFIG_CRYPTO_MD4=m 1427CONFIG_CRYPTO_MD4=m
1319CONFIG_CRYPTO_MD5=m 1428CONFIG_CRYPTO_MD5=y
1320CONFIG_CRYPTO_SHA1=m 1429CONFIG_CRYPTO_SHA1=m
1321CONFIG_CRYPTO_SHA256=m 1430CONFIG_CRYPTO_SHA256=m
1322CONFIG_CRYPTO_SHA512=m 1431CONFIG_CRYPTO_SHA512=m
1323CONFIG_CRYPTO_WP512=m 1432CONFIG_CRYPTO_WP512=m
1324CONFIG_CRYPTO_TGR192=m 1433CONFIG_CRYPTO_TGR192=m
1434CONFIG_CRYPTO_GF128MUL=m
1435CONFIG_CRYPTO_ECB=m
1436CONFIG_CRYPTO_CBC=m
1437CONFIG_CRYPTO_PCBC=m
1438CONFIG_CRYPTO_LRW=m
1325CONFIG_CRYPTO_DES=m 1439CONFIG_CRYPTO_DES=m
1440CONFIG_CRYPTO_FCRYPT=m
1326CONFIG_CRYPTO_BLOWFISH=m 1441CONFIG_CRYPTO_BLOWFISH=m
1327CONFIG_CRYPTO_TWOFISH=m 1442CONFIG_CRYPTO_TWOFISH=m
1443CONFIG_CRYPTO_TWOFISH_COMMON=m
1328CONFIG_CRYPTO_SERPENT=m 1444CONFIG_CRYPTO_SERPENT=m
1329CONFIG_CRYPTO_AES=m 1445CONFIG_CRYPTO_AES=m
1330CONFIG_CRYPTO_CAST5=m 1446CONFIG_CRYPTO_CAST5=m
@@ -1336,6 +1452,7 @@ CONFIG_CRYPTO_ANUBIS=m
1336CONFIG_CRYPTO_DEFLATE=m 1452CONFIG_CRYPTO_DEFLATE=m
1337CONFIG_CRYPTO_MICHAEL_MIC=m 1453CONFIG_CRYPTO_MICHAEL_MIC=m
1338CONFIG_CRYPTO_CRC32C=m 1454CONFIG_CRYPTO_CRC32C=m
1455CONFIG_CRYPTO_CAMELLIA=m
1339# CONFIG_CRYPTO_TEST is not set 1456# CONFIG_CRYPTO_TEST is not set
1340 1457
1341# 1458#
@@ -1345,6 +1462,7 @@ CONFIG_CRYPTO_CRC32C=m
1345# 1462#
1346# Library routines 1463# Library routines
1347# 1464#
1465CONFIG_BITREVERSE=y
1348CONFIG_CRC_CCITT=m 1466CONFIG_CRC_CCITT=m
1349CONFIG_CRC16=m 1467CONFIG_CRC16=m
1350CONFIG_CRC32=y 1468CONFIG_CRC32=y
@@ -1356,3 +1474,5 @@ CONFIG_TEXTSEARCH_KMP=m
1356CONFIG_TEXTSEARCH_BM=m 1474CONFIG_TEXTSEARCH_BM=m
1357CONFIG_TEXTSEARCH_FSM=m 1475CONFIG_TEXTSEARCH_FSM=m
1358CONFIG_PLIST=y 1476CONFIG_PLIST=y
1477CONFIG_HAS_IOMEM=y
1478CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index c681c91763aa..c29fdab0423a 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:03:59 2006 4# Tue Feb 20 21:47:27 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_DB1550=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_DB1550=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,15 +64,20 @@ CONFIG_MIPS_DB1550=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y 77CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
74# CONFIG_CPU_BIG_ENDIAN is not set 78# CONFIG_CPU_BIG_ENDIAN is not set
75CONFIG_CPU_LITTLE_ENDIAN=y 79CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_APM_EMULATION=y
76CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
77CONFIG_SOC_AU1550=y 82CONFIG_SOC_AU1550=y
78CONFIG_SOC_AU1X00=y 83CONFIG_SOC_AU1X00=y
@@ -117,8 +122,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 123CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 124CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 127# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_64BIT_PHYS_ADDR=y 128CONFIG_64BIT_PHYS_ADDR=y
124CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
@@ -135,7 +140,8 @@ CONFIG_FLATMEM=y
135CONFIG_FLAT_NODE_MEM_MAP=y 140CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 143CONFIG_RESOURCES_64BIT=y
144CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 145# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 146# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 147# CONFIG_HZ_128 is not set
@@ -148,6 +154,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 154CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 155# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 158CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 159CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,15 +173,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 173CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 174CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 178# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 179# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y 180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
174CONFIG_RELAY=y 185CONFIG_RELAY=y
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -182,12 +194,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 194CONFIG_BUG=y
183CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 197CONFIG_FUTEX=y
187CONFIG_EPOLL=y 198CONFIG_EPOLL=y
188CONFIG_SHMEM=y 199CONFIG_SHMEM=y
189CONFIG_SLAB=y 200CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -205,6 +217,7 @@ CONFIG_KMOD=y
205# 217#
206# Block layer 218# Block layer
207# 219#
220CONFIG_BLOCK=y
208# CONFIG_LBD is not set 221# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -258,6 +271,10 @@ CONFIG_PCMCIA_AU1X00=m
258CONFIG_BINFMT_ELF=y 271CONFIG_BINFMT_ELF=y
259# CONFIG_BINFMT_MISC is not set 272# CONFIG_BINFMT_MISC is not set
260CONFIG_TRAD_SIGNALS=y 273CONFIG_TRAD_SIGNALS=y
274
275#
276# Power management options
277#
261# CONFIG_PM is not set 278# CONFIG_PM is not set
262 279
263# 280#
@@ -274,7 +291,10 @@ CONFIG_PACKET=y
274CONFIG_UNIX=y 291CONFIG_UNIX=y
275CONFIG_XFRM=y 292CONFIG_XFRM=y
276CONFIG_XFRM_USER=m 293CONFIG_XFRM_USER=m
294# CONFIG_XFRM_SUB_POLICY is not set
295CONFIG_XFRM_MIGRATE=y
277CONFIG_NET_KEY=y 296CONFIG_NET_KEY=y
297CONFIG_NET_KEY_MIGRATE=y
278CONFIG_INET=y 298CONFIG_INET=y
279CONFIG_IP_MULTICAST=y 299CONFIG_IP_MULTICAST=y
280# CONFIG_IP_ADVANCED_ROUTER is not set 300# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -295,10 +315,13 @@ CONFIG_IP_PNP_BOOTP=y
295# CONFIG_INET_TUNNEL is not set 315# CONFIG_INET_TUNNEL is not set
296CONFIG_INET_XFRM_MODE_TRANSPORT=m 316CONFIG_INET_XFRM_MODE_TRANSPORT=m
297CONFIG_INET_XFRM_MODE_TUNNEL=m 317CONFIG_INET_XFRM_MODE_TUNNEL=m
318CONFIG_INET_XFRM_MODE_BEET=m
298CONFIG_INET_DIAG=y 319CONFIG_INET_DIAG=y
299CONFIG_INET_TCP_DIAG=y 320CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set 321# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_BIC=y 322CONFIG_TCP_CONG_CUBIC=y
323CONFIG_DEFAULT_TCP_CONG="cubic"
324CONFIG_TCP_MD5SIG=y
302 325
303# 326#
304# IP: Virtual Server Configuration 327# IP: Virtual Server Configuration
@@ -317,15 +340,42 @@ CONFIG_NETFILTER=y
317CONFIG_NETFILTER_NETLINK=m 340CONFIG_NETFILTER_NETLINK=m
318CONFIG_NETFILTER_NETLINK_QUEUE=m 341CONFIG_NETFILTER_NETLINK_QUEUE=m
319CONFIG_NETFILTER_NETLINK_LOG=m 342CONFIG_NETFILTER_NETLINK_LOG=m
320# CONFIG_NF_CONNTRACK is not set 343CONFIG_NF_CONNTRACK_ENABLED=m
344CONFIG_NF_CONNTRACK_SUPPORT=y
345# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
346CONFIG_NF_CONNTRACK=m
347CONFIG_NF_CT_ACCT=y
348CONFIG_NF_CONNTRACK_MARK=y
349CONFIG_NF_CONNTRACK_SECMARK=y
350CONFIG_NF_CONNTRACK_EVENTS=y
351CONFIG_NF_CT_PROTO_GRE=m
352CONFIG_NF_CT_PROTO_SCTP=m
353CONFIG_NF_CONNTRACK_AMANDA=m
354CONFIG_NF_CONNTRACK_FTP=m
355CONFIG_NF_CONNTRACK_H323=m
356CONFIG_NF_CONNTRACK_IRC=m
357# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
358CONFIG_NF_CONNTRACK_PPTP=m
359CONFIG_NF_CONNTRACK_SANE=m
360CONFIG_NF_CONNTRACK_SIP=m
361CONFIG_NF_CONNTRACK_TFTP=m
362CONFIG_NF_CT_NETLINK=m
321CONFIG_NETFILTER_XTABLES=m 363CONFIG_NETFILTER_XTABLES=m
322CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 364CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
323CONFIG_NETFILTER_XT_TARGET_MARK=m 365CONFIG_NETFILTER_XT_TARGET_MARK=m
324CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 366CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
367CONFIG_NETFILTER_XT_TARGET_NFLOG=m
325CONFIG_NETFILTER_XT_TARGET_SECMARK=m 368CONFIG_NETFILTER_XT_TARGET_SECMARK=m
369CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
370CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
326CONFIG_NETFILTER_XT_MATCH_COMMENT=m 371CONFIG_NETFILTER_XT_MATCH_COMMENT=m
372CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
373CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
374CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
327CONFIG_NETFILTER_XT_MATCH_DCCP=m 375CONFIG_NETFILTER_XT_MATCH_DCCP=m
376CONFIG_NETFILTER_XT_MATCH_DSCP=m
328CONFIG_NETFILTER_XT_MATCH_ESP=m 377CONFIG_NETFILTER_XT_MATCH_ESP=m
378CONFIG_NETFILTER_XT_MATCH_HELPER=m
329CONFIG_NETFILTER_XT_MATCH_LENGTH=m 379CONFIG_NETFILTER_XT_MATCH_LENGTH=m
330CONFIG_NETFILTER_XT_MATCH_LIMIT=m 380CONFIG_NETFILTER_XT_MATCH_LIMIT=m
331CONFIG_NETFILTER_XT_MATCH_MAC=m 381CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -336,14 +386,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
336CONFIG_NETFILTER_XT_MATCH_QUOTA=m 386CONFIG_NETFILTER_XT_MATCH_QUOTA=m
337CONFIG_NETFILTER_XT_MATCH_REALM=m 387CONFIG_NETFILTER_XT_MATCH_REALM=m
338CONFIG_NETFILTER_XT_MATCH_SCTP=m 388CONFIG_NETFILTER_XT_MATCH_SCTP=m
389CONFIG_NETFILTER_XT_MATCH_STATE=m
339CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 390CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
340CONFIG_NETFILTER_XT_MATCH_STRING=m 391CONFIG_NETFILTER_XT_MATCH_STRING=m
341CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 392CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
393CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
342 394
343# 395#
344# IP: Netfilter Configuration 396# IP: Netfilter Configuration
345# 397#
346# CONFIG_IP_NF_CONNTRACK is not set 398CONFIG_NF_CONNTRACK_IPV4=m
399CONFIG_NF_CONNTRACK_PROC_COMPAT=y
347# CONFIG_IP_NF_QUEUE is not set 400# CONFIG_IP_NF_QUEUE is not set
348# CONFIG_IP_NF_IPTABLES is not set 401# CONFIG_IP_NF_IPTABLES is not set
349# CONFIG_IP_NF_ARPTABLES is not set 402# CONFIG_IP_NF_ARPTABLES is not set
@@ -371,7 +424,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
371# CONFIG_ATALK is not set 424# CONFIG_ATALK is not set
372# CONFIG_X25 is not set 425# CONFIG_X25 is not set
373# CONFIG_LAPB is not set 426# CONFIG_LAPB is not set
374# CONFIG_NET_DIVERT is not set
375# CONFIG_ECONET is not set 427# CONFIG_ECONET is not set
376# CONFIG_WAN_ROUTER is not set 428# CONFIG_WAN_ROUTER is not set
377 429
@@ -427,11 +479,13 @@ CONFIG_MTD_PARTITIONS=y
427# User Modules And Translation Layers 479# User Modules And Translation Layers
428# 480#
429CONFIG_MTD_CHAR=y 481CONFIG_MTD_CHAR=y
482CONFIG_MTD_BLKDEVS=y
430CONFIG_MTD_BLOCK=y 483CONFIG_MTD_BLOCK=y
431# CONFIG_FTL is not set 484# CONFIG_FTL is not set
432# CONFIG_NFTL is not set 485# CONFIG_NFTL is not set
433# CONFIG_INFTL is not set 486# CONFIG_INFTL is not set
434# CONFIG_RFD_FTL is not set 487# CONFIG_RFD_FTL is not set
488# CONFIG_SSFDC is not set
435 489
436# 490#
437# RAM/ROM/Flash chip drivers 491# RAM/ROM/Flash chip drivers
@@ -492,6 +546,7 @@ CONFIG_MTD_NAND=m
492CONFIG_MTD_NAND_IDS=m 546CONFIG_MTD_NAND_IDS=m
493CONFIG_MTD_NAND_AU1550=m 547CONFIG_MTD_NAND_AU1550=m
494# CONFIG_MTD_NAND_DISKONCHIP is not set 548# CONFIG_MTD_NAND_DISKONCHIP is not set
549# CONFIG_MTD_NAND_CAFE is not set
495# CONFIG_MTD_NAND_NANDSIM is not set 550# CONFIG_MTD_NAND_NANDSIM is not set
496 551
497# 552#
@@ -507,6 +562,7 @@ CONFIG_MTD_NAND_AU1550=m
507# 562#
508# Plug and Play support 563# Plug and Play support
509# 564#
565# CONFIG_PNPACPI is not set
510 566
511# 567#
512# Block devices 568# Block devices
@@ -528,9 +584,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
528CONFIG_ATA_OVER_ETH=m 584CONFIG_ATA_OVER_ETH=m
529 585
530# 586#
587# Misc devices
588#
589CONFIG_SGI_IOC4=m
590# CONFIG_TIFM_CORE is not set
591
592#
531# ATA/ATAPI/MFM/RLL support 593# ATA/ATAPI/MFM/RLL support
532# 594#
533CONFIG_IDE=y 595CONFIG_IDE=y
596CONFIG_IDE_MAX_HWIFS=4
534CONFIG_BLK_DEV_IDE=y 597CONFIG_BLK_DEV_IDE=y
535 598
536# 599#
@@ -540,6 +603,7 @@ CONFIG_BLK_DEV_IDE=y
540CONFIG_BLK_DEV_IDEDISK=y 603CONFIG_BLK_DEV_IDEDISK=y
541# CONFIG_IDEDISK_MULTI_MODE is not set 604# CONFIG_IDEDISK_MULTI_MODE is not set
542CONFIG_BLK_DEV_IDECS=m 605CONFIG_BLK_DEV_IDECS=m
606# CONFIG_BLK_DEV_DELKIN is not set
543# CONFIG_BLK_DEV_IDECD is not set 607# CONFIG_BLK_DEV_IDECD is not set
544# CONFIG_BLK_DEV_IDETAPE is not set 608# CONFIG_BLK_DEV_IDETAPE is not set
545# CONFIG_BLK_DEV_IDEFLOPPY is not set 609# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -567,8 +631,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
567# CONFIG_BLK_DEV_CS5530 is not set 631# CONFIG_BLK_DEV_CS5530 is not set
568# CONFIG_BLK_DEV_HPT34X is not set 632# CONFIG_BLK_DEV_HPT34X is not set
569# CONFIG_BLK_DEV_HPT366 is not set 633# CONFIG_BLK_DEV_HPT366 is not set
634# CONFIG_BLK_DEV_JMICRON is not set
570# CONFIG_BLK_DEV_SC1200 is not set 635# CONFIG_BLK_DEV_SC1200 is not set
571# CONFIG_BLK_DEV_PIIX is not set 636# CONFIG_BLK_DEV_PIIX is not set
637CONFIG_BLK_DEV_IT8213=m
572# CONFIG_BLK_DEV_IT821X is not set 638# CONFIG_BLK_DEV_IT821X is not set
573# CONFIG_BLK_DEV_NS87415 is not set 639# CONFIG_BLK_DEV_NS87415 is not set
574# CONFIG_BLK_DEV_PDC202XX_OLD is not set 640# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -578,6 +644,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
578# CONFIG_BLK_DEV_SLC90E66 is not set 644# CONFIG_BLK_DEV_SLC90E66 is not set
579# CONFIG_BLK_DEV_TRM290 is not set 645# CONFIG_BLK_DEV_TRM290 is not set
580# CONFIG_BLK_DEV_VIA82CXXX is not set 646# CONFIG_BLK_DEV_VIA82CXXX is not set
647CONFIG_BLK_DEV_TC86C001=m
581# CONFIG_IDE_ARM is not set 648# CONFIG_IDE_ARM is not set
582CONFIG_BLK_DEV_IDEDMA=y 649CONFIG_BLK_DEV_IDEDMA=y
583# CONFIG_IDEDMA_IVB is not set 650# CONFIG_IDEDMA_IVB is not set
@@ -589,6 +656,12 @@ CONFIG_BLK_DEV_IDEDMA=y
589# 656#
590CONFIG_RAID_ATTRS=m 657CONFIG_RAID_ATTRS=m
591# CONFIG_SCSI is not set 658# CONFIG_SCSI is not set
659# CONFIG_SCSI_NETLINK is not set
660
661#
662# Serial ATA (prod) and Parallel ATA (experimental) drivers
663#
664# CONFIG_ATA is not set
592 665
593# 666#
594# Multi-device support (RAID and LVM) 667# Multi-device support (RAID and LVM)
@@ -639,6 +712,8 @@ CONFIG_LXT_PHY=m
639CONFIG_CICADA_PHY=m 712CONFIG_CICADA_PHY=m
640CONFIG_VITESSE_PHY=m 713CONFIG_VITESSE_PHY=m
641CONFIG_SMSC_PHY=m 714CONFIG_SMSC_PHY=m
715# CONFIG_BROADCOM_PHY is not set
716# CONFIG_FIXED_PHY is not set
642 717
643# 718#
644# Ethernet (10 or 100Mbit) 719# Ethernet (10 or 100Mbit)
@@ -676,14 +751,18 @@ CONFIG_MIPS_AU1X00_ENET=y
676# CONFIG_SK98LIN is not set 751# CONFIG_SK98LIN is not set
677# CONFIG_TIGON3 is not set 752# CONFIG_TIGON3 is not set
678# CONFIG_BNX2 is not set 753# CONFIG_BNX2 is not set
754CONFIG_QLA3XXX=m
755# CONFIG_ATL1 is not set
679 756
680# 757#
681# Ethernet (10000 Mbit) 758# Ethernet (10000 Mbit)
682# 759#
683# CONFIG_CHELSIO_T1 is not set 760# CONFIG_CHELSIO_T1 is not set
761CONFIG_CHELSIO_T3=m
684# CONFIG_IXGB is not set 762# CONFIG_IXGB is not set
685# CONFIG_S2IO is not set 763# CONFIG_S2IO is not set
686# CONFIG_MYRI10GE is not set 764# CONFIG_MYRI10GE is not set
765CONFIG_NETXEN_NIC=m
687 766
688# 767#
689# Token Ring devices 768# Token Ring devices
@@ -724,6 +803,7 @@ CONFIG_PPP_DEFLATE=m
724CONFIG_PPP_MPPE=m 803CONFIG_PPP_MPPE=m
725CONFIG_PPPOE=m 804CONFIG_PPPOE=m
726# CONFIG_SLIP is not set 805# CONFIG_SLIP is not set
806CONFIG_SLHC=m
727# CONFIG_SHAPER is not set 807# CONFIG_SHAPER is not set
728# CONFIG_NETCONSOLE is not set 808# CONFIG_NETCONSOLE is not set
729# CONFIG_NETPOLL is not set 809# CONFIG_NETPOLL is not set
@@ -743,6 +823,7 @@ CONFIG_PPPOE=m
743# Input device support 823# Input device support
744# 824#
745CONFIG_INPUT=y 825CONFIG_INPUT=y
826# CONFIG_INPUT_FF_MEMLESS is not set
746 827
747# 828#
748# Userland interfaces 829# Userland interfaces
@@ -821,10 +902,6 @@ CONFIG_LEGACY_PTY_COUNT=256
821# CONFIG_DTLK is not set 902# CONFIG_DTLK is not set
822# CONFIG_R3964 is not set 903# CONFIG_R3964 is not set
823# CONFIG_APPLICOM is not set 904# CONFIG_APPLICOM is not set
824
825#
826# Ftape, the floppy tape device driver
827#
828# CONFIG_DRM is not set 905# CONFIG_DRM is not set
829 906
830# 907#
@@ -839,7 +916,6 @@ CONFIG_SYNCLINK_CS=m
839# TPM devices 916# TPM devices
840# 917#
841# CONFIG_TCG_TPM is not set 918# CONFIG_TCG_TPM is not set
842# CONFIG_TELCLOCK is not set
843 919
844# 920#
845# I2C support 921# I2C support
@@ -864,14 +940,9 @@ CONFIG_SYNCLINK_CS=m
864# CONFIG_HWMON_VID is not set 940# CONFIG_HWMON_VID is not set
865 941
866# 942#
867# Misc devices
868#
869
870#
871# Multimedia devices 943# Multimedia devices
872# 944#
873# CONFIG_VIDEO_DEV is not set 945# CONFIG_VIDEO_DEV is not set
874CONFIG_VIDEO_V4L2=y
875 946
876# 947#
877# Digital Video Broadcasting Devices 948# Digital Video Broadcasting Devices
@@ -883,6 +954,7 @@ CONFIG_VIDEO_V4L2=y
883# 954#
884# CONFIG_FIRMWARE_EDID is not set 955# CONFIG_FIRMWARE_EDID is not set
885# CONFIG_FB is not set 956# CONFIG_FB is not set
957# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
886 958
887# 959#
888# Sound 960# Sound
@@ -890,6 +962,11 @@ CONFIG_VIDEO_V4L2=y
890# CONFIG_SOUND is not set 962# CONFIG_SOUND is not set
891 963
892# 964#
965# HID Devices
966#
967# CONFIG_HID is not set
968
969#
893# USB support 970# USB support
894# 971#
895CONFIG_USB_ARCH_HAS_HCD=y 972CONFIG_USB_ARCH_HAS_HCD=y
@@ -952,6 +1029,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
952# 1029#
953 1030
954# 1031#
1032# Auxiliary Display support
1033#
1034
1035#
1036# Virtualization
1037#
1038
1039#
955# File systems 1040# File systems
956# 1041#
957CONFIG_EXT2_FS=y 1042CONFIG_EXT2_FS=y
@@ -963,6 +1048,7 @@ CONFIG_EXT3_FS=y
963CONFIG_EXT3_FS_XATTR=y 1048CONFIG_EXT3_FS_XATTR=y
964CONFIG_EXT3_FS_POSIX_ACL=y 1049CONFIG_EXT3_FS_POSIX_ACL=y
965CONFIG_EXT3_FS_SECURITY=y 1050CONFIG_EXT3_FS_SECURITY=y
1051# CONFIG_EXT4DEV_FS is not set
966CONFIG_JBD=y 1052CONFIG_JBD=y
967# CONFIG_JBD_DEBUG is not set 1053# CONFIG_JBD_DEBUG is not set
968CONFIG_FS_MBCACHE=y 1054CONFIG_FS_MBCACHE=y
@@ -975,6 +1061,7 @@ CONFIG_REISERFS_FS_SECURITY=y
975# CONFIG_JFS_FS is not set 1061# CONFIG_JFS_FS is not set
976CONFIG_FS_POSIX_ACL=y 1062CONFIG_FS_POSIX_ACL=y
977# CONFIG_XFS_FS is not set 1063# CONFIG_XFS_FS is not set
1064# CONFIG_GFS2_FS is not set
978# CONFIG_OCFS2_FS is not set 1065# CONFIG_OCFS2_FS is not set
979# CONFIG_MINIX_FS is not set 1066# CONFIG_MINIX_FS is not set
980# CONFIG_ROMFS_FS is not set 1067# CONFIG_ROMFS_FS is not set
@@ -985,6 +1072,7 @@ CONFIG_DNOTIFY=y
985CONFIG_AUTOFS_FS=m 1072CONFIG_AUTOFS_FS=m
986CONFIG_AUTOFS4_FS=m 1073CONFIG_AUTOFS4_FS=m
987CONFIG_FUSE_FS=m 1074CONFIG_FUSE_FS=m
1075CONFIG_GENERIC_ACL=y
988 1076
989# 1077#
990# CD-ROM/DVD Filesystems 1078# CD-ROM/DVD Filesystems
@@ -1004,23 +1092,25 @@ CONFIG_FUSE_FS=m
1004# 1092#
1005CONFIG_PROC_FS=y 1093CONFIG_PROC_FS=y
1006CONFIG_PROC_KCORE=y 1094CONFIG_PROC_KCORE=y
1095CONFIG_PROC_SYSCTL=y
1007CONFIG_SYSFS=y 1096CONFIG_SYSFS=y
1008CONFIG_TMPFS=y 1097CONFIG_TMPFS=y
1098CONFIG_TMPFS_POSIX_ACL=y
1009# CONFIG_HUGETLB_PAGE is not set 1099# CONFIG_HUGETLB_PAGE is not set
1010CONFIG_RAMFS=y 1100CONFIG_RAMFS=y
1011# CONFIG_CONFIGFS_FS is not set 1101CONFIG_CONFIGFS_FS=m
1012 1102
1013# 1103#
1014# Miscellaneous filesystems 1104# Miscellaneous filesystems
1015# 1105#
1016# CONFIG_ADFS_FS is not set 1106# CONFIG_ADFS_FS is not set
1017# CONFIG_AFFS_FS is not set 1107# CONFIG_AFFS_FS is not set
1108# CONFIG_ECRYPT_FS is not set
1018# CONFIG_HFS_FS is not set 1109# CONFIG_HFS_FS is not set
1019# CONFIG_HFSPLUS_FS is not set 1110# CONFIG_HFSPLUS_FS is not set
1020# CONFIG_BEFS_FS is not set 1111# CONFIG_BEFS_FS is not set
1021# CONFIG_BFS_FS is not set 1112# CONFIG_BFS_FS is not set
1022# CONFIG_EFS_FS is not set 1113# CONFIG_EFS_FS is not set
1023# CONFIG_JFFS_FS is not set
1024# CONFIG_JFFS2_FS is not set 1114# CONFIG_JFFS2_FS is not set
1025CONFIG_CRAMFS=m 1115CONFIG_CRAMFS=m
1026# CONFIG_VXFS_FS is not set 1116# CONFIG_VXFS_FS is not set
@@ -1049,7 +1139,6 @@ CONFIG_SUNRPC=y
1049CONFIG_SMB_FS=m 1139CONFIG_SMB_FS=m
1050# CONFIG_SMB_NLS_DEFAULT is not set 1140# CONFIG_SMB_NLS_DEFAULT is not set
1051# CONFIG_CIFS is not set 1141# CONFIG_CIFS is not set
1052# CONFIG_CIFS_DEBUG2 is not set
1053# CONFIG_NCP_FS is not set 1142# CONFIG_NCP_FS is not set
1054# CONFIG_CODA_FS is not set 1143# CONFIG_CODA_FS is not set
1055# CONFIG_AFS_FS is not set 1144# CONFIG_AFS_FS is not set
@@ -1106,6 +1195,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1106# CONFIG_NLS_UTF8 is not set 1195# CONFIG_NLS_UTF8 is not set
1107 1196
1108# 1197#
1198# Distributed Lock Manager
1199#
1200CONFIG_DLM=m
1201CONFIG_DLM_TCP=y
1202# CONFIG_DLM_SCTP is not set
1203# CONFIG_DLM_DEBUG is not set
1204
1205#
1109# Profiling support 1206# Profiling support
1110# 1207#
1111# CONFIG_PROFILING is not set 1208# CONFIG_PROFILING is not set
@@ -1115,13 +1212,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1115# 1212#
1116CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1213CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1117# CONFIG_PRINTK_TIME is not set 1214# CONFIG_PRINTK_TIME is not set
1215CONFIG_ENABLE_MUST_CHECK=y
1118# CONFIG_MAGIC_SYSRQ is not set 1216# CONFIG_MAGIC_SYSRQ is not set
1119# CONFIG_UNUSED_SYMBOLS is not set 1217# CONFIG_UNUSED_SYMBOLS is not set
1218# CONFIG_DEBUG_FS is not set
1219# CONFIG_HEADERS_CHECK is not set
1120# CONFIG_DEBUG_KERNEL is not set 1220# CONFIG_DEBUG_KERNEL is not set
1121CONFIG_LOG_BUF_SHIFT=14 1221CONFIG_LOG_BUF_SHIFT=14
1122# CONFIG_DEBUG_FS is not set
1123CONFIG_CROSSCOMPILE=y 1222CONFIG_CROSSCOMPILE=y
1124CONFIG_CMDLINE="" 1223CONFIG_CMDLINE=""
1224CONFIG_SYS_SUPPORTS_KGDB=y
1125 1225
1126# 1226#
1127# Security options 1227# Security options
@@ -1134,18 +1234,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1134# Cryptographic options 1234# Cryptographic options
1135# 1235#
1136CONFIG_CRYPTO=y 1236CONFIG_CRYPTO=y
1237CONFIG_CRYPTO_ALGAPI=y
1238CONFIG_CRYPTO_BLKCIPHER=m
1239CONFIG_CRYPTO_HASH=y
1240CONFIG_CRYPTO_MANAGER=y
1137CONFIG_CRYPTO_HMAC=y 1241CONFIG_CRYPTO_HMAC=y
1242CONFIG_CRYPTO_XCBC=m
1138CONFIG_CRYPTO_NULL=m 1243CONFIG_CRYPTO_NULL=m
1139CONFIG_CRYPTO_MD4=m 1244CONFIG_CRYPTO_MD4=m
1140CONFIG_CRYPTO_MD5=m 1245CONFIG_CRYPTO_MD5=y
1141CONFIG_CRYPTO_SHA1=m 1246CONFIG_CRYPTO_SHA1=m
1142CONFIG_CRYPTO_SHA256=m 1247CONFIG_CRYPTO_SHA256=m
1143CONFIG_CRYPTO_SHA512=m 1248CONFIG_CRYPTO_SHA512=m
1144CONFIG_CRYPTO_WP512=m 1249CONFIG_CRYPTO_WP512=m
1145CONFIG_CRYPTO_TGR192=m 1250CONFIG_CRYPTO_TGR192=m
1251CONFIG_CRYPTO_GF128MUL=m
1252CONFIG_CRYPTO_ECB=m
1253CONFIG_CRYPTO_CBC=m
1254CONFIG_CRYPTO_PCBC=m
1255CONFIG_CRYPTO_LRW=m
1146CONFIG_CRYPTO_DES=m 1256CONFIG_CRYPTO_DES=m
1257CONFIG_CRYPTO_FCRYPT=m
1147CONFIG_CRYPTO_BLOWFISH=m 1258CONFIG_CRYPTO_BLOWFISH=m
1148CONFIG_CRYPTO_TWOFISH=m 1259CONFIG_CRYPTO_TWOFISH=m
1260CONFIG_CRYPTO_TWOFISH_COMMON=m
1149CONFIG_CRYPTO_SERPENT=m 1261CONFIG_CRYPTO_SERPENT=m
1150CONFIG_CRYPTO_AES=m 1262CONFIG_CRYPTO_AES=m
1151CONFIG_CRYPTO_CAST5=m 1263CONFIG_CRYPTO_CAST5=m
@@ -1157,6 +1269,7 @@ CONFIG_CRYPTO_ANUBIS=m
1157CONFIG_CRYPTO_DEFLATE=m 1269CONFIG_CRYPTO_DEFLATE=m
1158CONFIG_CRYPTO_MICHAEL_MIC=m 1270CONFIG_CRYPTO_MICHAEL_MIC=m
1159CONFIG_CRYPTO_CRC32C=m 1271CONFIG_CRYPTO_CRC32C=m
1272CONFIG_CRYPTO_CAMELLIA=m
1160# CONFIG_CRYPTO_TEST is not set 1273# CONFIG_CRYPTO_TEST is not set
1161 1274
1162# 1275#
@@ -1166,6 +1279,7 @@ CONFIG_CRYPTO_CRC32C=m
1166# 1279#
1167# Library routines 1280# Library routines
1168# 1281#
1282CONFIG_BITREVERSE=y
1169CONFIG_CRC_CCITT=m 1283CONFIG_CRC_CCITT=m
1170CONFIG_CRC16=m 1284CONFIG_CRC16=m
1171CONFIG_CRC32=y 1285CONFIG_CRC32=y
@@ -1177,3 +1291,5 @@ CONFIG_TEXTSEARCH_KMP=m
1177CONFIG_TEXTSEARCH_BM=m 1291CONFIG_TEXTSEARCH_BM=m
1178CONFIG_TEXTSEARCH_FSM=m 1292CONFIG_TEXTSEARCH_FSM=m
1179CONFIG_PLIST=y 1293CONFIG_PLIST=y
1294CONFIG_HAS_IOMEM=y
1295CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig
index dd4bb0080211..f4b316d2cd70 100644
--- a/arch/mips/configs/ddb5477_defconfig
+++ b/arch/mips/configs/ddb5477_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:00 2006 4# Tue Feb 20 21:47:28 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45CONFIG_DDB5477=y 45CONFIG_DDB5477=y
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_DDB5477=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_DDB5477_BUS_FREQUENCY=0 66CONFIG_DDB5477_BUS_FREQUENCY=0
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
74CONFIG_I8259=y 78CONFIG_I8259=y
@@ -117,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_16KB is not set 121# CONFIG_PAGE_SIZE_16KB is not set
118# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
119CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_CPU_HAS_LLSC=y 127CONFIG_CPU_HAS_LLSC=y
124CONFIG_CPU_HAS_SYNC=y 128CONFIG_CPU_HAS_SYNC=y
@@ -134,6 +138,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 138# CONFIG_SPARSEMEM_STATIC is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 139CONFIG_SPLIT_PTLOCK_CPUS=4
136# CONFIG_RESOURCES_64BIT is not set 140# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1
137# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -146,6 +151,7 @@ CONFIG_HZ=1000
146CONFIG_PREEMPT_NONE=y 151CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 152# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 153# CONFIG_PREEMPT is not set
154# CONFIG_KEXEC is not set
149CONFIG_LOCKDEP_SUPPORT=y 155CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 156CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -164,15 +170,20 @@ CONFIG_LOCALVERSION=""
164CONFIG_LOCALVERSION_AUTO=y 170CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 171CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 172CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set
174CONFIG_SYSVIPC_SYSCTL=y
167# CONFIG_POSIX_MQUEUE is not set 175# CONFIG_POSIX_MQUEUE is not set
168# CONFIG_BSD_PROCESS_ACCT is not set 176# CONFIG_BSD_PROCESS_ACCT is not set
169CONFIG_SYSCTL=y 177# CONFIG_TASKSTATS is not set
178# CONFIG_UTS_NS is not set
170# CONFIG_AUDIT is not set 179# CONFIG_AUDIT is not set
171# CONFIG_IKCONFIG is not set 180# CONFIG_IKCONFIG is not set
181CONFIG_SYSFS_DEPRECATED=y
172CONFIG_RELAY=y 182CONFIG_RELAY=y
173CONFIG_INITRAMFS_SOURCE=""
174# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 183# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
184CONFIG_SYSCTL=y
175CONFIG_EMBEDDED=y 185CONFIG_EMBEDDED=y
186CONFIG_SYSCTL_SYSCALL=y
176CONFIG_KALLSYMS=y 187CONFIG_KALLSYMS=y
177# CONFIG_KALLSYMS_EXTRA_PASS is not set 188# CONFIG_KALLSYMS_EXTRA_PASS is not set
178CONFIG_HOTPLUG=y 189CONFIG_HOTPLUG=y
@@ -180,12 +191,12 @@ CONFIG_PRINTK=y
180CONFIG_BUG=y 191CONFIG_BUG=y
181CONFIG_ELF_CORE=y 192CONFIG_ELF_CORE=y
182CONFIG_BASE_FULL=y 193CONFIG_BASE_FULL=y
183CONFIG_RT_MUTEXES=y
184CONFIG_FUTEX=y 194CONFIG_FUTEX=y
185CONFIG_EPOLL=y 195CONFIG_EPOLL=y
186CONFIG_SHMEM=y 196CONFIG_SHMEM=y
187CONFIG_SLAB=y 197CONFIG_SLAB=y
188CONFIG_VM_EVENT_COUNTERS=y 198CONFIG_VM_EVENT_COUNTERS=y
199CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 200# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 201CONFIG_BASE_SMALL=0
191# CONFIG_SLOB is not set 202# CONFIG_SLOB is not set
@@ -198,6 +209,7 @@ CONFIG_BASE_SMALL=0
198# 209#
199# Block layer 210# Block layer
200# 211#
212CONFIG_BLOCK=y
201# CONFIG_LBD is not set 213# CONFIG_LBD is not set
202# CONFIG_BLK_DEV_IO_TRACE is not set 214# CONFIG_BLK_DEV_IO_TRACE is not set
203# CONFIG_LSF is not set 215# CONFIG_LSF is not set
@@ -240,6 +252,14 @@ CONFIG_BINFMT_ELF=y
240CONFIG_TRAD_SIGNALS=y 252CONFIG_TRAD_SIGNALS=y
241 253
242# 254#
255# Power management options
256#
257CONFIG_PM=y
258# CONFIG_PM_LEGACY is not set
259# CONFIG_PM_DEBUG is not set
260# CONFIG_PM_SYSFS_DEPRECATED is not set
261
262#
243# Networking 263# Networking
244# 264#
245CONFIG_NET=y 265CONFIG_NET=y
@@ -253,7 +273,10 @@ CONFIG_PACKET=y
253CONFIG_UNIX=y 273CONFIG_UNIX=y
254CONFIG_XFRM=y 274CONFIG_XFRM=y
255CONFIG_XFRM_USER=y 275CONFIG_XFRM_USER=y
276# CONFIG_XFRM_SUB_POLICY is not set
277CONFIG_XFRM_MIGRATE=y
256CONFIG_NET_KEY=y 278CONFIG_NET_KEY=y
279CONFIG_NET_KEY_MIGRATE=y
257CONFIG_INET=y 280CONFIG_INET=y
258# CONFIG_IP_MULTICAST is not set 281# CONFIG_IP_MULTICAST is not set
259# CONFIG_IP_ADVANCED_ROUTER is not set 282# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -273,10 +296,13 @@ CONFIG_IP_PNP_BOOTP=y
273# CONFIG_INET_TUNNEL is not set 296# CONFIG_INET_TUNNEL is not set
274CONFIG_INET_XFRM_MODE_TRANSPORT=y 297CONFIG_INET_XFRM_MODE_TRANSPORT=y
275CONFIG_INET_XFRM_MODE_TUNNEL=y 298CONFIG_INET_XFRM_MODE_TUNNEL=y
299CONFIG_INET_XFRM_MODE_BEET=y
276CONFIG_INET_DIAG=y 300CONFIG_INET_DIAG=y
277CONFIG_INET_TCP_DIAG=y 301CONFIG_INET_TCP_DIAG=y
278# CONFIG_TCP_CONG_ADVANCED is not set 302# CONFIG_TCP_CONG_ADVANCED is not set
279CONFIG_TCP_CONG_BIC=y 303CONFIG_TCP_CONG_CUBIC=y
304CONFIG_DEFAULT_TCP_CONG="cubic"
305CONFIG_TCP_MD5SIG=y
280# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
281# CONFIG_INET6_XFRM_TUNNEL is not set 307# CONFIG_INET6_XFRM_TUNNEL is not set
282# CONFIG_INET6_TUNNEL is not set 308# CONFIG_INET6_TUNNEL is not set
@@ -306,7 +332,6 @@ CONFIG_NETWORK_SECMARK=y
306# CONFIG_ATALK is not set 332# CONFIG_ATALK is not set
307# CONFIG_X25 is not set 333# CONFIG_X25 is not set
308# CONFIG_LAPB is not set 334# CONFIG_LAPB is not set
309# CONFIG_NET_DIVERT is not set
310# CONFIG_ECONET is not set 335# CONFIG_ECONET is not set
311# CONFIG_WAN_ROUTER is not set 336# CONFIG_WAN_ROUTER is not set
312 337
@@ -361,6 +386,7 @@ CONFIG_PROC_EVENTS=y
361# 386#
362# Plug and Play support 387# Plug and Play support
363# 388#
389# CONFIG_PNPACPI is not set
364 390
365# 391#
366# Block devices 392# Block devices
@@ -381,6 +407,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
381CONFIG_ATA_OVER_ETH=y 407CONFIG_ATA_OVER_ETH=y
382 408
383# 409#
410# Misc devices
411#
412CONFIG_SGI_IOC4=y
413# CONFIG_TIFM_CORE is not set
414
415#
384# ATA/ATAPI/MFM/RLL support 416# ATA/ATAPI/MFM/RLL support
385# 417#
386# CONFIG_IDE is not set 418# CONFIG_IDE is not set
@@ -390,6 +422,12 @@ CONFIG_ATA_OVER_ETH=y
390# 422#
391CONFIG_RAID_ATTRS=y 423CONFIG_RAID_ATTRS=y
392# CONFIG_SCSI is not set 424# CONFIG_SCSI is not set
425# CONFIG_SCSI_NETLINK is not set
426
427#
428# Serial ATA (prod) and Parallel ATA (experimental) drivers
429#
430# CONFIG_ATA is not set
393 431
394# 432#
395# Multi-device support (RAID and LVM) 433# Multi-device support (RAID and LVM)
@@ -440,6 +478,8 @@ CONFIG_LXT_PHY=y
440CONFIG_CICADA_PHY=y 478CONFIG_CICADA_PHY=y
441CONFIG_VITESSE_PHY=y 479CONFIG_VITESSE_PHY=y
442CONFIG_SMSC_PHY=y 480CONFIG_SMSC_PHY=y
481# CONFIG_BROADCOM_PHY is not set
482# CONFIG_FIXED_PHY is not set
443 483
444# 484#
445# Ethernet (10 or 100Mbit) 485# Ethernet (10 or 100Mbit)
@@ -459,6 +499,7 @@ CONFIG_MII=y
459# CONFIG_HP100 is not set 499# CONFIG_HP100 is not set
460CONFIG_NET_PCI=y 500CONFIG_NET_PCI=y
461CONFIG_PCNET32=y 501CONFIG_PCNET32=y
502# CONFIG_PCNET32_NAPI is not set
462# CONFIG_AMD8111_ETH is not set 503# CONFIG_AMD8111_ETH is not set
463# CONFIG_ADAPTEC_STARFIRE is not set 504# CONFIG_ADAPTEC_STARFIRE is not set
464# CONFIG_B44 is not set 505# CONFIG_B44 is not set
@@ -476,7 +517,7 @@ CONFIG_PCNET32=y
476# CONFIG_SUNDANCE is not set 517# CONFIG_SUNDANCE is not set
477# CONFIG_TLAN is not set 518# CONFIG_TLAN is not set
478# CONFIG_VIA_RHINE is not set 519# CONFIG_VIA_RHINE is not set
479# CONFIG_LAN_SAA9730 is not set 520# CONFIG_SC92031 is not set
480 521
481# 522#
482# Ethernet (1000 Mbit) 523# Ethernet (1000 Mbit)
@@ -495,14 +536,18 @@ CONFIG_PCNET32=y
495# CONFIG_VIA_VELOCITY is not set 536# CONFIG_VIA_VELOCITY is not set
496# CONFIG_TIGON3 is not set 537# CONFIG_TIGON3 is not set
497# CONFIG_BNX2 is not set 538# CONFIG_BNX2 is not set
539CONFIG_QLA3XXX=y
540# CONFIG_ATL1 is not set
498 541
499# 542#
500# Ethernet (10000 Mbit) 543# Ethernet (10000 Mbit)
501# 544#
502# CONFIG_CHELSIO_T1 is not set 545# CONFIG_CHELSIO_T1 is not set
546CONFIG_CHELSIO_T3=y
503# CONFIG_IXGB is not set 547# CONFIG_IXGB is not set
504# CONFIG_S2IO is not set 548# CONFIG_S2IO is not set
505# CONFIG_MYRI10GE is not set 549# CONFIG_MYRI10GE is not set
550CONFIG_NETXEN_NIC=y
506 551
507# 552#
508# Token Ring devices 553# Token Ring devices
@@ -541,6 +586,7 @@ CONFIG_PCNET32=y
541# Input device support 586# Input device support
542# 587#
543CONFIG_INPUT=y 588CONFIG_INPUT=y
589# CONFIG_INPUT_FF_MEMLESS is not set
544 590
545# 591#
546# Userland interfaces 592# Userland interfaces
@@ -618,10 +664,6 @@ CONFIG_LEGACY_PTY_COUNT=256
618# CONFIG_DTLK is not set 664# CONFIG_DTLK is not set
619# CONFIG_R3964 is not set 665# CONFIG_R3964 is not set
620# CONFIG_APPLICOM is not set 666# CONFIG_APPLICOM is not set
621
622#
623# Ftape, the floppy tape device driver
624#
625# CONFIG_DRM is not set 667# CONFIG_DRM is not set
626# CONFIG_RAW_DRIVER is not set 668# CONFIG_RAW_DRIVER is not set
627 669
@@ -629,7 +671,6 @@ CONFIG_LEGACY_PTY_COUNT=256
629# TPM devices 671# TPM devices
630# 672#
631# CONFIG_TCG_TPM is not set 673# CONFIG_TCG_TPM is not set
632# CONFIG_TELCLOCK is not set
633 674
634# 675#
635# I2C support 676# I2C support
@@ -654,14 +695,9 @@ CONFIG_LEGACY_PTY_COUNT=256
654# CONFIG_HWMON_VID is not set 695# CONFIG_HWMON_VID is not set
655 696
656# 697#
657# Misc devices
658#
659
660#
661# Multimedia devices 698# Multimedia devices
662# 699#
663# CONFIG_VIDEO_DEV is not set 700# CONFIG_VIDEO_DEV is not set
664CONFIG_VIDEO_V4L2=y
665 701
666# 702#
667# Digital Video Broadcasting Devices 703# Digital Video Broadcasting Devices
@@ -679,6 +715,7 @@ CONFIG_VIDEO_V4L2=y
679# 715#
680# CONFIG_VGA_CONSOLE is not set 716# CONFIG_VGA_CONSOLE is not set
681CONFIG_DUMMY_CONSOLE=y 717CONFIG_DUMMY_CONSOLE=y
718# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
682 719
683# 720#
684# Sound 721# Sound
@@ -686,6 +723,11 @@ CONFIG_DUMMY_CONSOLE=y
686# CONFIG_SOUND is not set 723# CONFIG_SOUND is not set
687 724
688# 725#
726# HID Devices
727#
728# CONFIG_HID is not set
729
730#
689# USB support 731# USB support
690# 732#
691CONFIG_USB_ARCH_HAS_HCD=y 733CONFIG_USB_ARCH_HAS_HCD=y
@@ -748,16 +790,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
748# 790#
749 791
750# 792#
793# Auxiliary Display support
794#
795
796#
797# Virtualization
798#
799
800#
751# File systems 801# File systems
752# 802#
753CONFIG_EXT2_FS=y 803CONFIG_EXT2_FS=y
754# CONFIG_EXT2_FS_XATTR is not set 804# CONFIG_EXT2_FS_XATTR is not set
755# CONFIG_EXT2_FS_XIP is not set 805# CONFIG_EXT2_FS_XIP is not set
756# CONFIG_EXT3_FS is not set 806# CONFIG_EXT3_FS is not set
807# CONFIG_EXT4DEV_FS is not set
757# CONFIG_REISERFS_FS is not set 808# CONFIG_REISERFS_FS is not set
758# CONFIG_JFS_FS is not set 809# CONFIG_JFS_FS is not set
759# CONFIG_FS_POSIX_ACL is not set 810# CONFIG_FS_POSIX_ACL is not set
760# CONFIG_XFS_FS is not set 811# CONFIG_XFS_FS is not set
812# CONFIG_GFS2_FS is not set
761# CONFIG_OCFS2_FS is not set 813# CONFIG_OCFS2_FS is not set
762# CONFIG_MINIX_FS is not set 814# CONFIG_MINIX_FS is not set
763# CONFIG_ROMFS_FS is not set 815# CONFIG_ROMFS_FS is not set
@@ -787,17 +839,19 @@ CONFIG_FUSE_FS=y
787# 839#
788CONFIG_PROC_FS=y 840CONFIG_PROC_FS=y
789CONFIG_PROC_KCORE=y 841CONFIG_PROC_KCORE=y
842CONFIG_PROC_SYSCTL=y
790CONFIG_SYSFS=y 843CONFIG_SYSFS=y
791# CONFIG_TMPFS is not set 844# CONFIG_TMPFS is not set
792# CONFIG_HUGETLB_PAGE is not set 845# CONFIG_HUGETLB_PAGE is not set
793CONFIG_RAMFS=y 846CONFIG_RAMFS=y
794# CONFIG_CONFIGFS_FS is not set 847CONFIG_CONFIGFS_FS=y
795 848
796# 849#
797# Miscellaneous filesystems 850# Miscellaneous filesystems
798# 851#
799# CONFIG_ADFS_FS is not set 852# CONFIG_ADFS_FS is not set
800# CONFIG_AFFS_FS is not set 853# CONFIG_AFFS_FS is not set
854# CONFIG_ECRYPT_FS is not set
801# CONFIG_HFS_FS is not set 855# CONFIG_HFS_FS is not set
802# CONFIG_HFSPLUS_FS is not set 856# CONFIG_HFSPLUS_FS is not set
803# CONFIG_BEFS_FS is not set 857# CONFIG_BEFS_FS is not set
@@ -829,7 +883,6 @@ CONFIG_SUNRPC=y
829# CONFIG_RPCSEC_GSS_SPKM3 is not set 883# CONFIG_RPCSEC_GSS_SPKM3 is not set
830# CONFIG_SMB_FS is not set 884# CONFIG_SMB_FS is not set
831# CONFIG_CIFS is not set 885# CONFIG_CIFS is not set
832# CONFIG_CIFS_DEBUG2 is not set
833# CONFIG_NCP_FS is not set 886# CONFIG_NCP_FS is not set
834# CONFIG_CODA_FS is not set 887# CONFIG_CODA_FS is not set
835# CONFIG_AFS_FS is not set 888# CONFIG_AFS_FS is not set
@@ -847,6 +900,14 @@ CONFIG_MSDOS_PARTITION=y
847# CONFIG_NLS is not set 900# CONFIG_NLS is not set
848 901
849# 902#
903# Distributed Lock Manager
904#
905CONFIG_DLM=y
906CONFIG_DLM_TCP=y
907# CONFIG_DLM_SCTP is not set
908# CONFIG_DLM_DEBUG is not set
909
910#
850# Profiling support 911# Profiling support
851# 912#
852# CONFIG_PROFILING is not set 913# CONFIG_PROFILING is not set
@@ -856,14 +917,16 @@ CONFIG_MSDOS_PARTITION=y
856# 917#
857CONFIG_TRACE_IRQFLAGS_SUPPORT=y 918CONFIG_TRACE_IRQFLAGS_SUPPORT=y
858# CONFIG_PRINTK_TIME is not set 919# CONFIG_PRINTK_TIME is not set
920CONFIG_ENABLE_MUST_CHECK=y
859# CONFIG_MAGIC_SYSRQ is not set 921# CONFIG_MAGIC_SYSRQ is not set
860# CONFIG_UNUSED_SYMBOLS is not set 922# CONFIG_UNUSED_SYMBOLS is not set
923# CONFIG_DEBUG_FS is not set
924# CONFIG_HEADERS_CHECK is not set
861# CONFIG_DEBUG_KERNEL is not set 925# CONFIG_DEBUG_KERNEL is not set
862CONFIG_LOG_BUF_SHIFT=14 926CONFIG_LOG_BUF_SHIFT=14
863# CONFIG_DEBUG_FS is not set
864# CONFIG_UNWIND_INFO is not set
865CONFIG_CROSSCOMPILE=y 927CONFIG_CROSSCOMPILE=y
866CONFIG_CMDLINE="ip=any" 928CONFIG_CMDLINE="ip=any"
929CONFIG_SYS_SUPPORTS_KGDB=y
867 930
868# 931#
869# Security options 932# Security options
@@ -876,7 +939,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
876# Cryptographic options 939# Cryptographic options
877# 940#
878CONFIG_CRYPTO=y 941CONFIG_CRYPTO=y
942CONFIG_CRYPTO_ALGAPI=y
943CONFIG_CRYPTO_BLKCIPHER=y
944CONFIG_CRYPTO_HASH=y
945CONFIG_CRYPTO_MANAGER=y
879CONFIG_CRYPTO_HMAC=y 946CONFIG_CRYPTO_HMAC=y
947CONFIG_CRYPTO_XCBC=y
880CONFIG_CRYPTO_NULL=y 948CONFIG_CRYPTO_NULL=y
881CONFIG_CRYPTO_MD4=y 949CONFIG_CRYPTO_MD4=y
882CONFIG_CRYPTO_MD5=y 950CONFIG_CRYPTO_MD5=y
@@ -885,9 +953,16 @@ CONFIG_CRYPTO_SHA256=y
885CONFIG_CRYPTO_SHA512=y 953CONFIG_CRYPTO_SHA512=y
886CONFIG_CRYPTO_WP512=y 954CONFIG_CRYPTO_WP512=y
887CONFIG_CRYPTO_TGR192=y 955CONFIG_CRYPTO_TGR192=y
956CONFIG_CRYPTO_GF128MUL=y
957CONFIG_CRYPTO_ECB=y
958CONFIG_CRYPTO_CBC=y
959CONFIG_CRYPTO_PCBC=y
960CONFIG_CRYPTO_LRW=y
888CONFIG_CRYPTO_DES=y 961CONFIG_CRYPTO_DES=y
962CONFIG_CRYPTO_FCRYPT=y
889CONFIG_CRYPTO_BLOWFISH=y 963CONFIG_CRYPTO_BLOWFISH=y
890CONFIG_CRYPTO_TWOFISH=y 964CONFIG_CRYPTO_TWOFISH=y
965CONFIG_CRYPTO_TWOFISH_COMMON=y
891CONFIG_CRYPTO_SERPENT=y 966CONFIG_CRYPTO_SERPENT=y
892CONFIG_CRYPTO_AES=y 967CONFIG_CRYPTO_AES=y
893CONFIG_CRYPTO_CAST5=y 968CONFIG_CRYPTO_CAST5=y
@@ -899,6 +974,7 @@ CONFIG_CRYPTO_ANUBIS=y
899CONFIG_CRYPTO_DEFLATE=y 974CONFIG_CRYPTO_DEFLATE=y
900CONFIG_CRYPTO_MICHAEL_MIC=y 975CONFIG_CRYPTO_MICHAEL_MIC=y
901CONFIG_CRYPTO_CRC32C=y 976CONFIG_CRYPTO_CRC32C=y
977CONFIG_CRYPTO_CAMELLIA=y
902 978
903# 979#
904# Hardware crypto devices 980# Hardware crypto devices
@@ -907,6 +983,7 @@ CONFIG_CRYPTO_CRC32C=y
907# 983#
908# Library routines 984# Library routines
909# 985#
986CONFIG_BITREVERSE=y
910# CONFIG_CRC_CCITT is not set 987# CONFIG_CRC_CCITT is not set
911CONFIG_CRC16=y 988CONFIG_CRC16=y
912CONFIG_CRC32=y 989CONFIG_CRC32=y
@@ -914,3 +991,5 @@ CONFIG_LIBCRC32C=y
914CONFIG_ZLIB_INFLATE=y 991CONFIG_ZLIB_INFLATE=y
915CONFIG_ZLIB_DEFLATE=y 992CONFIG_ZLIB_DEFLATE=y
916CONFIG_PLIST=y 993CONFIG_PLIST=y
994CONFIG_HAS_IOMEM=y
995CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 8a31ce4be12c..9c38e5c77761 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18 3# Linux kernel version: 2.6.20
4# Tue Oct 3 11:57:53 2006 4# Tue Feb 20 21:47:28 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26CONFIG_MACH_DECSTATION=y 27CONFIG_MACH_DECSTATION=y
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MACH_DECSTATION=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_MACH_DECSTATION=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_EARLY_PRINTK=y 66CONFIG_EARLY_PRINTK=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
74# CONFIG_CPU_BIG_ENDIAN is not set 78# CONFIG_CPU_BIG_ENDIAN is not set
@@ -116,8 +120,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_16KB is not set 120# CONFIG_PAGE_SIZE_16KB is not set
117# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_MIPS_MT_DISABLED=y 122CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 123# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 125# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_CPU_HAS_WB=y 126CONFIG_CPU_HAS_WB=y
123CONFIG_GENERIC_HARDIRQS=y 127CONFIG_GENERIC_HARDIRQS=y
@@ -133,6 +137,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
133# CONFIG_SPARSEMEM_STATIC is not set 137# CONFIG_SPARSEMEM_STATIC is not set
134CONFIG_SPLIT_PTLOCK_CPUS=4 138CONFIG_SPLIT_PTLOCK_CPUS=4
135# CONFIG_RESOURCES_64BIT is not set 139# CONFIG_RESOURCES_64BIT is not set
140CONFIG_ZONE_DMA_FLAG=1
136# CONFIG_HZ_48 is not set 141# CONFIG_HZ_48 is not set
137# CONFIG_HZ_100 is not set 142# CONFIG_HZ_100 is not set
138CONFIG_HZ_128=y 143CONFIG_HZ_128=y
@@ -147,6 +152,7 @@ CONFIG_HZ=128
147CONFIG_PREEMPT_NONE=y 152CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 153# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 156CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 157CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,13 +171,16 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 171CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 172CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 173CONFIG_SYSVIPC=y
174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 176# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 177# CONFIG_BSD_PROCESS_ACCT is not set
170# CONFIG_TASKSTATS is not set 178# CONFIG_TASKSTATS is not set
179# CONFIG_UTS_NS is not set
171# CONFIG_AUDIT is not set 180# CONFIG_AUDIT is not set
172# CONFIG_IKCONFIG is not set 181# CONFIG_IKCONFIG is not set
182CONFIG_SYSFS_DEPRECATED=y
173# CONFIG_RELAY is not set 183# CONFIG_RELAY is not set
174CONFIG_INITRAMFS_SOURCE=""
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
176CONFIG_SYSCTL=y 185CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 186CONFIG_EMBEDDED=y
@@ -246,6 +255,14 @@ CONFIG_BINFMT_ELF=y
246CONFIG_TRAD_SIGNALS=y 255CONFIG_TRAD_SIGNALS=y
247 256
248# 257#
258# Power management options
259#
260CONFIG_PM=y
261# CONFIG_PM_LEGACY is not set
262# CONFIG_PM_DEBUG is not set
263# CONFIG_PM_SYSFS_DEPRECATED is not set
264
265#
249# Networking 266# Networking
250# 267#
251CONFIG_NET=y 268CONFIG_NET=y
@@ -260,7 +277,9 @@ CONFIG_UNIX=y
260CONFIG_XFRM=y 277CONFIG_XFRM=y
261# CONFIG_XFRM_USER is not set 278# CONFIG_XFRM_USER is not set
262# CONFIG_XFRM_SUB_POLICY is not set 279# CONFIG_XFRM_SUB_POLICY is not set
280CONFIG_XFRM_MIGRATE=y
263CONFIG_NET_KEY=m 281CONFIG_NET_KEY=m
282CONFIG_NET_KEY_MIGRATE=y
264CONFIG_INET=y 283CONFIG_INET=y
265CONFIG_IP_MULTICAST=y 284CONFIG_IP_MULTICAST=y
266# CONFIG_IP_ADVANCED_ROUTER is not set 285# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -281,11 +300,13 @@ CONFIG_INET_XFRM_TUNNEL=m
281CONFIG_INET_TUNNEL=m 300CONFIG_INET_TUNNEL=m
282CONFIG_INET_XFRM_MODE_TRANSPORT=m 301CONFIG_INET_XFRM_MODE_TRANSPORT=m
283CONFIG_INET_XFRM_MODE_TUNNEL=m 302CONFIG_INET_XFRM_MODE_TUNNEL=m
303CONFIG_INET_XFRM_MODE_BEET=m
284CONFIG_INET_DIAG=y 304CONFIG_INET_DIAG=y
285CONFIG_INET_TCP_DIAG=y 305CONFIG_INET_TCP_DIAG=y
286# CONFIG_TCP_CONG_ADVANCED is not set 306# CONFIG_TCP_CONG_ADVANCED is not set
287CONFIG_TCP_CONG_CUBIC=y 307CONFIG_TCP_CONG_CUBIC=y
288CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
309CONFIG_TCP_MD5SIG=y
289CONFIG_IPV6=m 310CONFIG_IPV6=m
290CONFIG_IPV6_PRIVACY=y 311CONFIG_IPV6_PRIVACY=y
291CONFIG_IPV6_ROUTER_PREF=y 312CONFIG_IPV6_ROUTER_PREF=y
@@ -298,10 +319,12 @@ CONFIG_INET6_XFRM_TUNNEL=m
298CONFIG_INET6_TUNNEL=m 319CONFIG_INET6_TUNNEL=m
299CONFIG_INET6_XFRM_MODE_TRANSPORT=m 320CONFIG_INET6_XFRM_MODE_TRANSPORT=m
300CONFIG_INET6_XFRM_MODE_TUNNEL=m 321CONFIG_INET6_XFRM_MODE_TUNNEL=m
322CONFIG_INET6_XFRM_MODE_BEET=m
301CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m 323CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
324CONFIG_IPV6_SIT=m
302# CONFIG_IPV6_TUNNEL is not set 325# CONFIG_IPV6_TUNNEL is not set
303CONFIG_IPV6_SUBTREES=y
304CONFIG_IPV6_MULTIPLE_TABLES=y 326CONFIG_IPV6_MULTIPLE_TABLES=y
327CONFIG_IPV6_SUBTREES=y
305CONFIG_NETWORK_SECMARK=y 328CONFIG_NETWORK_SECMARK=y
306# CONFIG_NETFILTER is not set 329# CONFIG_NETFILTER is not set
307 330
@@ -375,6 +398,7 @@ CONFIG_CONNECTOR=m
375# 398#
376# Plug and Play support 399# Plug and Play support
377# 400#
401# CONFIG_PNPACPI is not set
378 402
379# 403#
380# Block devices 404# Block devices
@@ -389,6 +413,10 @@ CONFIG_BLK_DEV_LOOP=m
389# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
390 414
391# 415#
416# Misc devices
417#
418
419#
392# ATA/ATAPI/MFM/RLL support 420# ATA/ATAPI/MFM/RLL support
393# 421#
394# CONFIG_IDE is not set 422# CONFIG_IDE is not set
@@ -398,6 +426,7 @@ CONFIG_BLK_DEV_LOOP=m
398# 426#
399# CONFIG_RAID_ATTRS is not set 427# CONFIG_RAID_ATTRS is not set
400CONFIG_SCSI=y 428CONFIG_SCSI=y
429CONFIG_SCSI_TGT=m
401# CONFIG_SCSI_NETLINK is not set 430# CONFIG_SCSI_NETLINK is not set
402CONFIG_SCSI_PROC_FS=y 431CONFIG_SCSI_PROC_FS=y
403 432
@@ -418,6 +447,7 @@ CONFIG_CHR_DEV_SG=m
418# CONFIG_SCSI_MULTI_LUN is not set 447# CONFIG_SCSI_MULTI_LUN is not set
419CONFIG_SCSI_CONSTANTS=y 448CONFIG_SCSI_CONSTANTS=y
420# CONFIG_SCSI_LOGGING is not set 449# CONFIG_SCSI_LOGGING is not set
450CONFIG_SCSI_SCAN_ASYNC=y
421 451
422# 452#
423# SCSI Transports 453# SCSI Transports
@@ -502,6 +532,9 @@ CONFIG_DECLANCE=y
502# Wan interfaces 532# Wan interfaces
503# 533#
504# CONFIG_WAN is not set 534# CONFIG_WAN is not set
535CONFIG_FDDI=y
536CONFIG_DEFXX=m
537CONFIG_DEFXX_MMIO=y
505# CONFIG_PPP is not set 538# CONFIG_PPP is not set
506# CONFIG_SLIP is not set 539# CONFIG_SLIP is not set
507# CONFIG_SHAPER is not set 540# CONFIG_SHAPER is not set
@@ -565,17 +598,12 @@ CONFIG_LEGACY_PTY_COUNT=256
565CONFIG_RTC=y 598CONFIG_RTC=y
566# CONFIG_DTLK is not set 599# CONFIG_DTLK is not set
567# CONFIG_R3964 is not set 600# CONFIG_R3964 is not set
568
569#
570# Ftape, the floppy tape device driver
571#
572# CONFIG_RAW_DRIVER is not set 601# CONFIG_RAW_DRIVER is not set
573 602
574# 603#
575# TPM devices 604# TPM devices
576# 605#
577# CONFIG_TCG_TPM is not set 606# CONFIG_TCG_TPM is not set
578# CONFIG_TELCLOCK is not set
579 607
580# 608#
581# I2C support 609# I2C support
@@ -600,14 +628,9 @@ CONFIG_RTC=y
600# CONFIG_HWMON_VID is not set 628# CONFIG_HWMON_VID is not set
601 629
602# 630#
603# Misc devices
604#
605
606#
607# Multimedia devices 631# Multimedia devices
608# 632#
609# CONFIG_VIDEO_DEV is not set 633# CONFIG_VIDEO_DEV is not set
610CONFIG_VIDEO_V4L2=y
611 634
612# 635#
613# Digital Video Broadcasting Devices 636# Digital Video Broadcasting Devices
@@ -622,6 +645,7 @@ CONFIG_FB=y
622CONFIG_FB_CFB_FILLRECT=y 645CONFIG_FB_CFB_FILLRECT=y
623CONFIG_FB_CFB_COPYAREA=y 646CONFIG_FB_CFB_COPYAREA=y
624CONFIG_FB_CFB_IMAGEBLIT=y 647CONFIG_FB_CFB_IMAGEBLIT=y
648# CONFIG_FB_SVGALIB is not set
625# CONFIG_FB_MACMODES is not set 649# CONFIG_FB_MACMODES is not set
626# CONFIG_FB_BACKLIGHT is not set 650# CONFIG_FB_BACKLIGHT is not set
627# CONFIG_FB_MODE_HELPERS is not set 651# CONFIG_FB_MODE_HELPERS is not set
@@ -709,6 +733,14 @@ CONFIG_LOGO_DEC_CLUT224=y
709# 733#
710 734
711# 735#
736# Auxiliary Display support
737#
738
739#
740# Virtualization
741#
742
743#
712# File systems 744# File systems
713# 745#
714CONFIG_EXT2_FS=y 746CONFIG_EXT2_FS=y
@@ -720,6 +752,7 @@ CONFIG_EXT3_FS=y
720CONFIG_EXT3_FS_XATTR=y 752CONFIG_EXT3_FS_XATTR=y
721CONFIG_EXT3_FS_POSIX_ACL=y 753CONFIG_EXT3_FS_POSIX_ACL=y
722CONFIG_EXT3_FS_SECURITY=y 754CONFIG_EXT3_FS_SECURITY=y
755# CONFIG_EXT4DEV_FS is not set
723CONFIG_JBD=y 756CONFIG_JBD=y
724# CONFIG_JBD_DEBUG is not set 757# CONFIG_JBD_DEBUG is not set
725CONFIG_FS_MBCACHE=y 758CONFIG_FS_MBCACHE=y
@@ -727,6 +760,7 @@ CONFIG_FS_MBCACHE=y
727# CONFIG_JFS_FS is not set 760# CONFIG_JFS_FS is not set
728CONFIG_FS_POSIX_ACL=y 761CONFIG_FS_POSIX_ACL=y
729# CONFIG_XFS_FS is not set 762# CONFIG_XFS_FS is not set
763# CONFIG_GFS2_FS is not set
730# CONFIG_OCFS2_FS is not set 764# CONFIG_OCFS2_FS is not set
731# CONFIG_MINIX_FS is not set 765# CONFIG_MINIX_FS is not set
732# CONFIG_ROMFS_FS is not set 766# CONFIG_ROMFS_FS is not set
@@ -737,6 +771,7 @@ CONFIG_DNOTIFY=y
737# CONFIG_AUTOFS_FS is not set 771# CONFIG_AUTOFS_FS is not set
738# CONFIG_AUTOFS4_FS is not set 772# CONFIG_AUTOFS4_FS is not set
739CONFIG_FUSE_FS=m 773CONFIG_FUSE_FS=m
774CONFIG_GENERIC_ACL=y
740 775
741# 776#
742# CD-ROM/DVD Filesystems 777# CD-ROM/DVD Filesystems
@@ -806,7 +841,6 @@ CONFIG_SUNRPC=y
806# CONFIG_CODA_FS is not set 841# CONFIG_CODA_FS is not set
807# CONFIG_AFS_FS is not set 842# CONFIG_AFS_FS is not set
808# CONFIG_9P_FS is not set 843# CONFIG_9P_FS is not set
809CONFIG_GENERIC_ACL=y
810 844
811# 845#
812# Partition Types 846# Partition Types
@@ -835,6 +869,14 @@ CONFIG_ULTRIX_PARTITION=y
835# CONFIG_NLS is not set 869# CONFIG_NLS is not set
836 870
837# 871#
872# Distributed Lock Manager
873#
874CONFIG_DLM=m
875CONFIG_DLM_TCP=y
876# CONFIG_DLM_SCTP is not set
877# CONFIG_DLM_DEBUG is not set
878
879#
838# Profiling support 880# Profiling support
839# 881#
840# CONFIG_PROFILING is not set 882# CONFIG_PROFILING is not set
@@ -847,9 +889,10 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
847CONFIG_ENABLE_MUST_CHECK=y 889CONFIG_ENABLE_MUST_CHECK=y
848CONFIG_MAGIC_SYSRQ=y 890CONFIG_MAGIC_SYSRQ=y
849# CONFIG_UNUSED_SYMBOLS is not set 891# CONFIG_UNUSED_SYMBOLS is not set
892# CONFIG_DEBUG_FS is not set
893# CONFIG_HEADERS_CHECK is not set
850# CONFIG_DEBUG_KERNEL is not set 894# CONFIG_DEBUG_KERNEL is not set
851CONFIG_LOG_BUF_SHIFT=14 895CONFIG_LOG_BUF_SHIFT=14
852# CONFIG_DEBUG_FS is not set
853CONFIG_CROSSCOMPILE=y 896CONFIG_CROSSCOMPILE=y
854CONFIG_CMDLINE="" 897CONFIG_CMDLINE=""
855 898
@@ -866,19 +909,24 @@ CONFIG_CRYPTO=y
866CONFIG_CRYPTO_ALGAPI=y 909CONFIG_CRYPTO_ALGAPI=y
867CONFIG_CRYPTO_BLKCIPHER=m 910CONFIG_CRYPTO_BLKCIPHER=m
868CONFIG_CRYPTO_HASH=y 911CONFIG_CRYPTO_HASH=y
869CONFIG_CRYPTO_MANAGER=m 912CONFIG_CRYPTO_MANAGER=y
870CONFIG_CRYPTO_HMAC=y 913CONFIG_CRYPTO_HMAC=y
914CONFIG_CRYPTO_XCBC=m
871CONFIG_CRYPTO_NULL=m 915CONFIG_CRYPTO_NULL=m
872CONFIG_CRYPTO_MD4=m 916CONFIG_CRYPTO_MD4=m
873CONFIG_CRYPTO_MD5=m 917CONFIG_CRYPTO_MD5=y
874CONFIG_CRYPTO_SHA1=m 918CONFIG_CRYPTO_SHA1=m
875CONFIG_CRYPTO_SHA256=m 919CONFIG_CRYPTO_SHA256=m
876CONFIG_CRYPTO_SHA512=m 920CONFIG_CRYPTO_SHA512=m
877CONFIG_CRYPTO_WP512=m 921CONFIG_CRYPTO_WP512=m
878CONFIG_CRYPTO_TGR192=m 922CONFIG_CRYPTO_TGR192=m
923CONFIG_CRYPTO_GF128MUL=m
879CONFIG_CRYPTO_ECB=m 924CONFIG_CRYPTO_ECB=m
880CONFIG_CRYPTO_CBC=m 925CONFIG_CRYPTO_CBC=m
926CONFIG_CRYPTO_PCBC=m
927CONFIG_CRYPTO_LRW=m
881CONFIG_CRYPTO_DES=m 928CONFIG_CRYPTO_DES=m
929CONFIG_CRYPTO_FCRYPT=m
882CONFIG_CRYPTO_BLOWFISH=m 930CONFIG_CRYPTO_BLOWFISH=m
883CONFIG_CRYPTO_TWOFISH=m 931CONFIG_CRYPTO_TWOFISH=m
884CONFIG_CRYPTO_TWOFISH_COMMON=m 932CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -893,6 +941,7 @@ CONFIG_CRYPTO_ANUBIS=m
893CONFIG_CRYPTO_DEFLATE=m 941CONFIG_CRYPTO_DEFLATE=m
894CONFIG_CRYPTO_MICHAEL_MIC=m 942CONFIG_CRYPTO_MICHAEL_MIC=m
895CONFIG_CRYPTO_CRC32C=m 943CONFIG_CRYPTO_CRC32C=m
944CONFIG_CRYPTO_CAMELLIA=m
896# CONFIG_CRYPTO_TEST is not set 945# CONFIG_CRYPTO_TEST is not set
897 946
898# 947#
@@ -902,6 +951,7 @@ CONFIG_CRYPTO_CRC32C=m
902# 951#
903# Library routines 952# Library routines
904# 953#
954CONFIG_BITREVERSE=y
905# CONFIG_CRC_CCITT is not set 955# CONFIG_CRC_CCITT is not set
906# CONFIG_CRC16 is not set 956# CONFIG_CRC16 is not set
907CONFIG_CRC32=y 957CONFIG_CRC32=y
@@ -909,3 +959,5 @@ CONFIG_LIBCRC32C=m
909CONFIG_ZLIB_INFLATE=m 959CONFIG_ZLIB_INFLATE=m
910CONFIG_ZLIB_DEFLATE=m 960CONFIG_ZLIB_DEFLATE=m
911CONFIG_PLIST=y 961CONFIG_PLIST=y
962CONFIG_HAS_IOMEM=y
963CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index 6fa4f914f6e4..922af379aa41 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc2 3# Linux kernel version: 2.6.20
4# Tue Jul 25 23:15:03 2006 4# Tue Feb 20 21:47:28 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -70,10 +70,14 @@ CONFIG_CASIO_E55=y
70# CONFIG_VICTOR_MPC30X is not set 70# CONFIG_VICTOR_MPC30X is not set
71# CONFIG_ZAO_CAPCELLA is not set 71# CONFIG_ZAO_CAPCELLA is not set
72CONFIG_RWSEM_GENERIC_SPINLOCK=y 72CONFIG_RWSEM_GENERIC_SPINLOCK=y
73# CONFIG_ARCH_HAS_ILOG2_U32 is not set
74# CONFIG_ARCH_HAS_ILOG2_U64 is not set
73CONFIG_GENERIC_FIND_NEXT_BIT=y 75CONFIG_GENERIC_FIND_NEXT_BIT=y
74CONFIG_GENERIC_HWEIGHT=y 76CONFIG_GENERIC_HWEIGHT=y
75CONFIG_GENERIC_CALIBRATE_DELAY=y 77CONFIG_GENERIC_CALIBRATE_DELAY=y
78CONFIG_GENERIC_TIME=y
76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
80CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
77CONFIG_DMA_NONCOHERENT=y 81CONFIG_DMA_NONCOHERENT=y
78CONFIG_DMA_NEED_PCI_MAP_STATE=y 82CONFIG_DMA_NEED_PCI_MAP_STATE=y
79# CONFIG_CPU_BIG_ENDIAN is not set 83# CONFIG_CPU_BIG_ENDIAN is not set
@@ -106,6 +110,7 @@ CONFIG_CPU_VR41XX=y
106# CONFIG_CPU_SB1 is not set 110# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_VR41XX=y 111CONFIG_SYS_HAS_CPU_VR41XX=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
113CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
109CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 114CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 115CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
111 116
@@ -119,8 +124,8 @@ CONFIG_PAGE_SIZE_4KB=y
119# CONFIG_PAGE_SIZE_16KB is not set 124# CONFIG_PAGE_SIZE_16KB is not set
120# CONFIG_PAGE_SIZE_64KB is not set 125# CONFIG_PAGE_SIZE_64KB is not set
121CONFIG_MIPS_MT_DISABLED=y 126CONFIG_MIPS_MT_DISABLED=y
122# CONFIG_MIPS_MT_SMTC is not set
123# CONFIG_MIPS_MT_SMP is not set 127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_VPE_LOADER is not set 129# CONFIG_MIPS_VPE_LOADER is not set
125CONFIG_CPU_HAS_SYNC=y 130CONFIG_CPU_HAS_SYNC=y
126CONFIG_GENERIC_HARDIRQS=y 131CONFIG_GENERIC_HARDIRQS=y
@@ -135,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,13 +172,17 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_BSD_PROCESS_ACCT is not set 177# CONFIG_BSD_PROCESS_ACCT is not set
169CONFIG_SYSCTL=y 178# CONFIG_UTS_NS is not set
170# CONFIG_IKCONFIG is not set 179# CONFIG_IKCONFIG is not set
180CONFIG_SYSFS_DEPRECATED=y
171# CONFIG_RELAY is not set 181# CONFIG_RELAY is not set
172CONFIG_INITRAMFS_SOURCE=""
173# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
183CONFIG_SYSCTL=y
174CONFIG_EMBEDDED=y 184CONFIG_EMBEDDED=y
185CONFIG_SYSCTL_SYSCALL=y
175CONFIG_KALLSYMS=y 186CONFIG_KALLSYMS=y
176# CONFIG_KALLSYMS_EXTRA_PASS is not set 187# CONFIG_KALLSYMS_EXTRA_PASS is not set
177# CONFIG_HOTPLUG is not set 188# CONFIG_HOTPLUG is not set
@@ -179,12 +190,12 @@ CONFIG_PRINTK=y
179CONFIG_BUG=y 190CONFIG_BUG=y
180CONFIG_ELF_CORE=y 191CONFIG_ELF_CORE=y
181CONFIG_BASE_FULL=y 192CONFIG_BASE_FULL=y
182CONFIG_RT_MUTEXES=y
183CONFIG_FUTEX=y 193CONFIG_FUTEX=y
184CONFIG_EPOLL=y 194CONFIG_EPOLL=y
185CONFIG_SHMEM=y 195CONFIG_SHMEM=y
186CONFIG_SLAB=y 196CONFIG_SLAB=y
187CONFIG_VM_EVENT_COUNTERS=y 197CONFIG_VM_EVENT_COUNTERS=y
198CONFIG_RT_MUTEXES=y
188# CONFIG_TINY_SHMEM is not set 199# CONFIG_TINY_SHMEM is not set
189CONFIG_BASE_SMALL=0 200CONFIG_BASE_SMALL=0
190# CONFIG_SLOB is not set 201# CONFIG_SLOB is not set
@@ -202,6 +213,7 @@ CONFIG_KMOD=y
202# 213#
203# Block layer 214# Block layer
204# 215#
216CONFIG_BLOCK=y
205# CONFIG_LBD is not set 217# CONFIG_LBD is not set
206# CONFIG_BLK_DEV_IO_TRACE is not set 218# CONFIG_BLK_DEV_IO_TRACE is not set
207# CONFIG_LSF is not set 219# CONFIG_LSF is not set
@@ -241,6 +253,14 @@ CONFIG_BINFMT_ELF=y
241CONFIG_TRAD_SIGNALS=y 253CONFIG_TRAD_SIGNALS=y
242 254
243# 255#
256# Power management options
257#
258CONFIG_PM=y
259# CONFIG_PM_LEGACY is not set
260# CONFIG_PM_DEBUG is not set
261# CONFIG_PM_SYSFS_DEPRECATED is not set
262
263#
244# Networking 264# Networking
245# 265#
246# CONFIG_NET is not set 266# CONFIG_NET is not set
@@ -274,6 +294,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
274# Plug and Play support 294# Plug and Play support
275# 295#
276# CONFIG_PNP is not set 296# CONFIG_PNP is not set
297# CONFIG_PNPACPI is not set
277 298
278# 299#
279# Block devices 300# Block devices
@@ -288,9 +309,14 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
288# CONFIG_CDROM_PKTCDVD is not set 309# CONFIG_CDROM_PKTCDVD is not set
289 310
290# 311#
312# Misc devices
313#
314
315#
291# ATA/ATAPI/MFM/RLL support 316# ATA/ATAPI/MFM/RLL support
292# 317#
293CONFIG_IDE=y 318CONFIG_IDE=y
319CONFIG_IDE_MAX_HWIFS=4
294CONFIG_BLK_DEV_IDE=y 320CONFIG_BLK_DEV_IDE=y
295 321
296# 322#
@@ -319,6 +345,12 @@ CONFIG_IDE_GENERIC=y
319# 345#
320# CONFIG_RAID_ATTRS is not set 346# CONFIG_RAID_ATTRS is not set
321# CONFIG_SCSI is not set 347# CONFIG_SCSI is not set
348# CONFIG_SCSI_NETLINK is not set
349
350#
351# Serial ATA (prod) and Parallel ATA (experimental) drivers
352#
353# CONFIG_ATA is not set
322 354
323# 355#
324# Old CD-ROM drivers (not SCSI, not IDE) 356# Old CD-ROM drivers (not SCSI, not IDE)
@@ -356,6 +388,7 @@ CONFIG_IDE_GENERIC=y
356# Input device support 388# Input device support
357# 389#
358CONFIG_INPUT=y 390CONFIG_INPUT=y
391# CONFIG_INPUT_FF_MEMLESS is not set
359 392
360# 393#
361# Userland interfaces 394# Userland interfaces
@@ -436,10 +469,6 @@ CONFIG_WATCHDOG=y
436# CONFIG_GEN_RTC is not set 469# CONFIG_GEN_RTC is not set
437# CONFIG_DTLK is not set 470# CONFIG_DTLK is not set
438# CONFIG_R3964 is not set 471# CONFIG_R3964 is not set
439
440#
441# Ftape, the floppy tape device driver
442#
443CONFIG_GPIO_VR41XX=y 472CONFIG_GPIO_VR41XX=y
444# CONFIG_RAW_DRIVER is not set 473# CONFIG_RAW_DRIVER is not set
445 474
@@ -447,7 +476,6 @@ CONFIG_GPIO_VR41XX=y
447# TPM devices 476# TPM devices
448# 477#
449# CONFIG_TCG_TPM is not set 478# CONFIG_TCG_TPM is not set
450# CONFIG_TELCLOCK is not set
451 479
452# 480#
453# I2C support 481# I2C support
@@ -463,6 +491,7 @@ CONFIG_GPIO_VR41XX=y
463# 491#
464# Dallas's 1-wire bus 492# Dallas's 1-wire bus
465# 493#
494# CONFIG_W1 is not set
466 495
467# 496#
468# Hardware Monitoring support 497# Hardware Monitoring support
@@ -471,14 +500,9 @@ CONFIG_GPIO_VR41XX=y
471# CONFIG_HWMON_VID is not set 500# CONFIG_HWMON_VID is not set
472 501
473# 502#
474# Misc devices
475#
476
477#
478# Multimedia devices 503# Multimedia devices
479# 504#
480# CONFIG_VIDEO_DEV is not set 505# CONFIG_VIDEO_DEV is not set
481CONFIG_VIDEO_V4L2=y
482 506
483# 507#
484# Digital Video Broadcasting Devices 508# Digital Video Broadcasting Devices
@@ -496,6 +520,7 @@ CONFIG_VIDEO_V4L2=y
496# CONFIG_VGA_CONSOLE is not set 520# CONFIG_VGA_CONSOLE is not set
497# CONFIG_MDA_CONSOLE is not set 521# CONFIG_MDA_CONSOLE is not set
498CONFIG_DUMMY_CONSOLE=y 522CONFIG_DUMMY_CONSOLE=y
523# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
499 524
500# 525#
501# Sound 526# Sound
@@ -503,6 +528,12 @@ CONFIG_DUMMY_CONSOLE=y
503# CONFIG_SOUND is not set 528# CONFIG_SOUND is not set
504 529
505# 530#
531# HID Devices
532#
533CONFIG_HID=y
534# CONFIG_HID_DEBUG is not set
535
536#
506# USB support 537# USB support
507# 538#
508# CONFIG_USB_ARCH_HAS_HCD is not set 539# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -563,16 +594,26 @@ CONFIG_DUMMY_CONSOLE=y
563# 594#
564 595
565# 596#
597# Auxiliary Display support
598#
599
600#
601# Virtualization
602#
603
604#
566# File systems 605# File systems
567# 606#
568CONFIG_EXT2_FS=y 607CONFIG_EXT2_FS=y
569# CONFIG_EXT2_FS_XATTR is not set 608# CONFIG_EXT2_FS_XATTR is not set
570# CONFIG_EXT2_FS_XIP is not set 609# CONFIG_EXT2_FS_XIP is not set
571# CONFIG_EXT3_FS is not set 610# CONFIG_EXT3_FS is not set
611# CONFIG_EXT4DEV_FS is not set
572# CONFIG_REISERFS_FS is not set 612# CONFIG_REISERFS_FS is not set
573# CONFIG_JFS_FS is not set 613# CONFIG_JFS_FS is not set
574# CONFIG_FS_POSIX_ACL is not set 614CONFIG_FS_POSIX_ACL=y
575# CONFIG_XFS_FS is not set 615# CONFIG_XFS_FS is not set
616# CONFIG_GFS2_FS is not set
576# CONFIG_MINIX_FS is not set 617# CONFIG_MINIX_FS is not set
577# CONFIG_ROMFS_FS is not set 618# CONFIG_ROMFS_FS is not set
578CONFIG_INOTIFY=y 619CONFIG_INOTIFY=y
@@ -582,6 +623,7 @@ CONFIG_DNOTIFY=y
582# CONFIG_AUTOFS_FS is not set 623# CONFIG_AUTOFS_FS is not set
583CONFIG_AUTOFS4_FS=y 624CONFIG_AUTOFS4_FS=y
584CONFIG_FUSE_FS=m 625CONFIG_FUSE_FS=m
626CONFIG_GENERIC_ACL=y
585 627
586# 628#
587# CD-ROM/DVD Filesystems 629# CD-ROM/DVD Filesystems
@@ -601,8 +643,10 @@ CONFIG_FUSE_FS=m
601# 643#
602CONFIG_PROC_FS=y 644CONFIG_PROC_FS=y
603CONFIG_PROC_KCORE=y 645CONFIG_PROC_KCORE=y
646CONFIG_PROC_SYSCTL=y
604CONFIG_SYSFS=y 647CONFIG_SYSFS=y
605CONFIG_TMPFS=y 648CONFIG_TMPFS=y
649CONFIG_TMPFS_POSIX_ACL=y
606# CONFIG_HUGETLB_PAGE is not set 650# CONFIG_HUGETLB_PAGE is not set
607CONFIG_RAMFS=y 651CONFIG_RAMFS=y
608# CONFIG_CONFIGFS_FS is not set 652# CONFIG_CONFIGFS_FS is not set
@@ -645,11 +689,13 @@ CONFIG_MSDOS_PARTITION=y
645# 689#
646CONFIG_TRACE_IRQFLAGS_SUPPORT=y 690CONFIG_TRACE_IRQFLAGS_SUPPORT=y
647# CONFIG_PRINTK_TIME is not set 691# CONFIG_PRINTK_TIME is not set
692CONFIG_ENABLE_MUST_CHECK=y
648# CONFIG_MAGIC_SYSRQ is not set 693# CONFIG_MAGIC_SYSRQ is not set
649# CONFIG_UNUSED_SYMBOLS is not set 694# CONFIG_UNUSED_SYMBOLS is not set
695# CONFIG_DEBUG_FS is not set
696# CONFIG_HEADERS_CHECK is not set
650# CONFIG_DEBUG_KERNEL is not set 697# CONFIG_DEBUG_KERNEL is not set
651CONFIG_LOG_BUF_SHIFT=14 698CONFIG_LOG_BUF_SHIFT=14
652# CONFIG_DEBUG_FS is not set
653CONFIG_CROSSCOMPILE=y 699CONFIG_CROSSCOMPILE=y
654CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M" 700CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
655 701
@@ -665,10 +711,6 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
665# CONFIG_CRYPTO is not set 711# CONFIG_CRYPTO is not set
666 712
667# 713#
668# Hardware crypto devices
669#
670
671#
672# Library routines 714# Library routines
673# 715#
674# CONFIG_CRC_CCITT is not set 716# CONFIG_CRC_CCITT is not set
@@ -676,3 +718,5 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
676# CONFIG_CRC32 is not set 718# CONFIG_CRC32 is not set
677# CONFIG_LIBCRC32C is not set 719# CONFIG_LIBCRC32C is not set
678CONFIG_PLIST=y 720CONFIG_PLIST=y
721CONFIG_HAS_IOMEM=y
722CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig
index 4c9d0405a5df..c0db8f14713d 100644
--- a/arch/mips/configs/emma2rh_defconfig
+++ b/arch/mips/configs/emma2rh_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:05 2006 4# Tue Feb 20 21:47:29 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MARKEINS=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -116,8 +120,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_16KB is not set 120# CONFIG_PAGE_SIZE_16KB is not set
117# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_MIPS_MT_DISABLED=y 122CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 123# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 125# CONFIG_MIPS_VPE_LOADER is not set
122# CONFIG_64BIT_PHYS_ADDR is not set 126# CONFIG_64BIT_PHYS_ADDR is not set
123CONFIG_CPU_HAS_LLSC=y 127CONFIG_CPU_HAS_LLSC=y
@@ -134,6 +138,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 138# CONFIG_SPARSEMEM_STATIC is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 139CONFIG_SPLIT_PTLOCK_CPUS=4
136# CONFIG_RESOURCES_64BIT is not set 140# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1
137# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -147,6 +152,7 @@ CONFIG_HZ=1000
147# CONFIG_PREEMPT_VOLUNTARY is not set 152# CONFIG_PREEMPT_VOLUNTARY is not set
148CONFIG_PREEMPT=y 153CONFIG_PREEMPT=y
149CONFIG_PREEMPT_BKL=y 154CONFIG_PREEMPT_BKL=y
155# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 156CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 157CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,17 +172,22 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 173CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
169CONFIG_POSIX_MQUEUE=y 177CONFIG_POSIX_MQUEUE=y
170CONFIG_BSD_PROCESS_ACCT=y 178CONFIG_BSD_PROCESS_ACCT=y
171# CONFIG_BSD_PROCESS_ACCT_V3 is not set 179# CONFIG_BSD_PROCESS_ACCT_V3 is not set
172CONFIG_SYSCTL=y 180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
173# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
174CONFIG_IKCONFIG=y 183CONFIG_IKCONFIG=y
175CONFIG_IKCONFIG_PROC=y 184CONFIG_IKCONFIG_PROC=y
185CONFIG_SYSFS_DEPRECATED=y
176# CONFIG_RELAY is not set 186# CONFIG_RELAY is not set
177CONFIG_INITRAMFS_SOURCE=""
178# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 187# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
188CONFIG_SYSCTL=y
179CONFIG_EMBEDDED=y 189CONFIG_EMBEDDED=y
190CONFIG_SYSCTL_SYSCALL=y
180CONFIG_KALLSYMS=y 191CONFIG_KALLSYMS=y
181# CONFIG_KALLSYMS_EXTRA_PASS is not set 192# CONFIG_KALLSYMS_EXTRA_PASS is not set
182CONFIG_HOTPLUG=y 193CONFIG_HOTPLUG=y
@@ -184,12 +195,12 @@ CONFIG_PRINTK=y
184CONFIG_BUG=y 195CONFIG_BUG=y
185CONFIG_ELF_CORE=y 196CONFIG_ELF_CORE=y
186CONFIG_BASE_FULL=y 197CONFIG_BASE_FULL=y
187CONFIG_RT_MUTEXES=y
188CONFIG_FUTEX=y 198CONFIG_FUTEX=y
189CONFIG_EPOLL=y 199CONFIG_EPOLL=y
190CONFIG_SHMEM=y 200CONFIG_SHMEM=y
191CONFIG_SLAB=y 201CONFIG_SLAB=y
192CONFIG_VM_EVENT_COUNTERS=y 202CONFIG_VM_EVENT_COUNTERS=y
203CONFIG_RT_MUTEXES=y
193# CONFIG_TINY_SHMEM is not set 204# CONFIG_TINY_SHMEM is not set
194CONFIG_BASE_SMALL=0 205CONFIG_BASE_SMALL=0
195# CONFIG_SLOB is not set 206# CONFIG_SLOB is not set
@@ -207,6 +218,7 @@ CONFIG_KMOD=y
207# 218#
208# Block layer 219# Block layer
209# 220#
221CONFIG_BLOCK=y
210CONFIG_LBD=y 222CONFIG_LBD=y
211# CONFIG_BLK_DEV_IO_TRACE is not set 223# CONFIG_BLK_DEV_IO_TRACE is not set
212# CONFIG_LSF is not set 224# CONFIG_LSF is not set
@@ -249,6 +261,14 @@ CONFIG_BINFMT_ELF=y
249CONFIG_TRAD_SIGNALS=y 261CONFIG_TRAD_SIGNALS=y
250 262
251# 263#
264# Power management options
265#
266CONFIG_PM=y
267# CONFIG_PM_LEGACY is not set
268# CONFIG_PM_DEBUG is not set
269# CONFIG_PM_SYSFS_DEPRECATED is not set
270
271#
252# Networking 272# Networking
253# 273#
254CONFIG_NET=y 274CONFIG_NET=y
@@ -262,7 +282,10 @@ CONFIG_PACKET_MMAP=y
262CONFIG_UNIX=y 282CONFIG_UNIX=y
263CONFIG_XFRM=y 283CONFIG_XFRM=y
264# CONFIG_XFRM_USER is not set 284# CONFIG_XFRM_USER is not set
285# CONFIG_XFRM_SUB_POLICY is not set
286CONFIG_XFRM_MIGRATE=y
265CONFIG_NET_KEY=y 287CONFIG_NET_KEY=y
288CONFIG_NET_KEY_MIGRATE=y
266CONFIG_INET=y 289CONFIG_INET=y
267CONFIG_IP_MULTICAST=y 290CONFIG_IP_MULTICAST=y
268CONFIG_IP_ADVANCED_ROUTER=y 291CONFIG_IP_ADVANCED_ROUTER=y
@@ -270,7 +293,6 @@ CONFIG_ASK_IP_FIB_HASH=y
270# CONFIG_IP_FIB_TRIE is not set 293# CONFIG_IP_FIB_TRIE is not set
271CONFIG_IP_FIB_HASH=y 294CONFIG_IP_FIB_HASH=y
272CONFIG_IP_MULTIPLE_TABLES=y 295CONFIG_IP_MULTIPLE_TABLES=y
273# CONFIG_IP_ROUTE_FWMARK is not set
274CONFIG_IP_ROUTE_MULTIPATH=y 296CONFIG_IP_ROUTE_MULTIPATH=y
275# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set 297# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
276CONFIG_IP_ROUTE_VERBOSE=y 298CONFIG_IP_ROUTE_VERBOSE=y
@@ -287,13 +309,16 @@ CONFIG_SYN_COOKIES=y
287# CONFIG_INET_ESP is not set 309# CONFIG_INET_ESP is not set
288# CONFIG_INET_IPCOMP is not set 310# CONFIG_INET_IPCOMP is not set
289# CONFIG_INET_XFRM_TUNNEL is not set 311# CONFIG_INET_XFRM_TUNNEL is not set
290# CONFIG_INET_TUNNEL is not set 312CONFIG_INET_TUNNEL=m
291CONFIG_INET_XFRM_MODE_TRANSPORT=m 313CONFIG_INET_XFRM_MODE_TRANSPORT=m
292CONFIG_INET_XFRM_MODE_TUNNEL=m 314CONFIG_INET_XFRM_MODE_TUNNEL=m
315CONFIG_INET_XFRM_MODE_BEET=m
293CONFIG_INET_DIAG=y 316CONFIG_INET_DIAG=y
294CONFIG_INET_TCP_DIAG=y 317CONFIG_INET_TCP_DIAG=y
295# CONFIG_TCP_CONG_ADVANCED is not set 318# CONFIG_TCP_CONG_ADVANCED is not set
296CONFIG_TCP_CONG_BIC=y 319CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic"
321CONFIG_TCP_MD5SIG=y
297 322
298# 323#
299# IP: Virtual Server Configuration 324# IP: Virtual Server Configuration
@@ -305,11 +330,17 @@ CONFIG_IPV6=m
305# CONFIG_INET6_AH is not set 330# CONFIG_INET6_AH is not set
306# CONFIG_INET6_ESP is not set 331# CONFIG_INET6_ESP is not set
307# CONFIG_INET6_IPCOMP is not set 332# CONFIG_INET6_IPCOMP is not set
333CONFIG_IPV6_MIP6=y
308# CONFIG_INET6_XFRM_TUNNEL is not set 334# CONFIG_INET6_XFRM_TUNNEL is not set
309# CONFIG_INET6_TUNNEL is not set 335# CONFIG_INET6_TUNNEL is not set
310CONFIG_INET6_XFRM_MODE_TRANSPORT=m 336CONFIG_INET6_XFRM_MODE_TRANSPORT=m
311CONFIG_INET6_XFRM_MODE_TUNNEL=m 337CONFIG_INET6_XFRM_MODE_TUNNEL=m
338CONFIG_INET6_XFRM_MODE_BEET=m
339CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
340CONFIG_IPV6_SIT=m
312# CONFIG_IPV6_TUNNEL is not set 341# CONFIG_IPV6_TUNNEL is not set
342CONFIG_IPV6_MULTIPLE_TABLES=y
343CONFIG_IPV6_SUBTREES=y
313CONFIG_NETWORK_SECMARK=y 344CONFIG_NETWORK_SECMARK=y
314CONFIG_NETFILTER=y 345CONFIG_NETFILTER=y
315# CONFIG_NETFILTER_DEBUG is not set 346# CONFIG_NETFILTER_DEBUG is not set
@@ -318,19 +349,125 @@ CONFIG_NETFILTER=y
318# Core Netfilter Configuration 349# Core Netfilter Configuration
319# 350#
320# CONFIG_NETFILTER_NETLINK is not set 351# CONFIG_NETFILTER_NETLINK is not set
321# CONFIG_NF_CONNTRACK is not set 352CONFIG_NF_CONNTRACK_ENABLED=m
322# CONFIG_NETFILTER_XTABLES is not set 353CONFIG_NF_CONNTRACK_SUPPORT=y
354# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
355CONFIG_NF_CONNTRACK=m
356CONFIG_NF_CT_ACCT=y
357CONFIG_NF_CONNTRACK_MARK=y
358CONFIG_NF_CONNTRACK_SECMARK=y
359CONFIG_NF_CONNTRACK_EVENTS=y
360CONFIG_NF_CT_PROTO_GRE=m
361CONFIG_NF_CT_PROTO_SCTP=m
362CONFIG_NF_CONNTRACK_AMANDA=m
363CONFIG_NF_CONNTRACK_FTP=m
364CONFIG_NF_CONNTRACK_H323=m
365CONFIG_NF_CONNTRACK_IRC=m
366# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
367CONFIG_NF_CONNTRACK_PPTP=m
368CONFIG_NF_CONNTRACK_SANE=m
369CONFIG_NF_CONNTRACK_SIP=m
370CONFIG_NF_CONNTRACK_TFTP=m
371CONFIG_NETFILTER_XTABLES=m
372CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
373CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
374CONFIG_NETFILTER_XT_TARGET_DSCP=m
375CONFIG_NETFILTER_XT_TARGET_MARK=m
376CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
377CONFIG_NETFILTER_XT_TARGET_NFLOG=m
378CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
379CONFIG_NETFILTER_XT_TARGET_SECMARK=m
380CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
381CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
382CONFIG_NETFILTER_XT_MATCH_COMMENT=m
383CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
384CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
385CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
386CONFIG_NETFILTER_XT_MATCH_DCCP=m
387CONFIG_NETFILTER_XT_MATCH_DSCP=m
388CONFIG_NETFILTER_XT_MATCH_ESP=m
389CONFIG_NETFILTER_XT_MATCH_HELPER=m
390CONFIG_NETFILTER_XT_MATCH_LENGTH=m
391CONFIG_NETFILTER_XT_MATCH_LIMIT=m
392CONFIG_NETFILTER_XT_MATCH_MAC=m
393CONFIG_NETFILTER_XT_MATCH_MARK=m
394CONFIG_NETFILTER_XT_MATCH_POLICY=m
395CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
396CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
397CONFIG_NETFILTER_XT_MATCH_QUOTA=m
398CONFIG_NETFILTER_XT_MATCH_REALM=m
399CONFIG_NETFILTER_XT_MATCH_SCTP=m
400CONFIG_NETFILTER_XT_MATCH_STATE=m
401CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
402CONFIG_NETFILTER_XT_MATCH_STRING=m
403CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
404CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
323 405
324# 406#
325# IP: Netfilter Configuration 407# IP: Netfilter Configuration
326# 408#
327# CONFIG_IP_NF_CONNTRACK is not set 409CONFIG_NF_CONNTRACK_IPV4=m
410CONFIG_NF_CONNTRACK_PROC_COMPAT=y
328# CONFIG_IP_NF_QUEUE is not set 411# CONFIG_IP_NF_QUEUE is not set
412CONFIG_IP_NF_IPTABLES=m
413CONFIG_IP_NF_MATCH_IPRANGE=m
414CONFIG_IP_NF_MATCH_TOS=m
415CONFIG_IP_NF_MATCH_RECENT=m
416CONFIG_IP_NF_MATCH_ECN=m
417CONFIG_IP_NF_MATCH_AH=m
418CONFIG_IP_NF_MATCH_TTL=m
419CONFIG_IP_NF_MATCH_OWNER=m
420CONFIG_IP_NF_MATCH_ADDRTYPE=m
421CONFIG_IP_NF_FILTER=m
422CONFIG_IP_NF_TARGET_REJECT=m
423CONFIG_IP_NF_TARGET_LOG=m
424CONFIG_IP_NF_TARGET_ULOG=m
425CONFIG_NF_NAT=m
426CONFIG_NF_NAT_NEEDED=y
427CONFIG_IP_NF_TARGET_MASQUERADE=m
428CONFIG_IP_NF_TARGET_REDIRECT=m
429CONFIG_IP_NF_TARGET_NETMAP=m
430CONFIG_IP_NF_TARGET_SAME=m
431CONFIG_NF_NAT_SNMP_BASIC=m
432CONFIG_NF_NAT_PROTO_GRE=m
433CONFIG_NF_NAT_FTP=m
434CONFIG_NF_NAT_IRC=m
435CONFIG_NF_NAT_TFTP=m
436CONFIG_NF_NAT_AMANDA=m
437CONFIG_NF_NAT_PPTP=m
438CONFIG_NF_NAT_H323=m
439CONFIG_NF_NAT_SIP=m
440CONFIG_IP_NF_MANGLE=m
441CONFIG_IP_NF_TARGET_TOS=m
442CONFIG_IP_NF_TARGET_ECN=m
443CONFIG_IP_NF_TARGET_TTL=m
444CONFIG_IP_NF_TARGET_CLUSTERIP=m
445CONFIG_IP_NF_RAW=m
446CONFIG_IP_NF_ARPTABLES=m
447CONFIG_IP_NF_ARPFILTER=m
448CONFIG_IP_NF_ARP_MANGLE=m
329 449
330# 450#
331# IPv6: Netfilter Configuration (EXPERIMENTAL) 451# IPv6: Netfilter Configuration (EXPERIMENTAL)
332# 452#
453CONFIG_NF_CONNTRACK_IPV6=m
333# CONFIG_IP6_NF_QUEUE is not set 454# CONFIG_IP6_NF_QUEUE is not set
455CONFIG_IP6_NF_IPTABLES=m
456CONFIG_IP6_NF_MATCH_RT=m
457CONFIG_IP6_NF_MATCH_OPTS=m
458CONFIG_IP6_NF_MATCH_FRAG=m
459CONFIG_IP6_NF_MATCH_HL=m
460CONFIG_IP6_NF_MATCH_OWNER=m
461CONFIG_IP6_NF_MATCH_IPV6HEADER=m
462CONFIG_IP6_NF_MATCH_AH=m
463CONFIG_IP6_NF_MATCH_MH=m
464CONFIG_IP6_NF_MATCH_EUI64=m
465CONFIG_IP6_NF_FILTER=m
466CONFIG_IP6_NF_TARGET_LOG=m
467CONFIG_IP6_NF_TARGET_REJECT=m
468CONFIG_IP6_NF_MANGLE=m
469CONFIG_IP6_NF_TARGET_HL=m
470CONFIG_IP6_NF_RAW=m
334 471
335# 472#
336# DCCP Configuration (EXPERIMENTAL) 473# DCCP Configuration (EXPERIMENTAL)
@@ -360,7 +497,6 @@ CONFIG_SCTP_HMAC_MD5=y
360# CONFIG_ATALK is not set 497# CONFIG_ATALK is not set
361# CONFIG_X25 is not set 498# CONFIG_X25 is not set
362# CONFIG_LAPB is not set 499# CONFIG_LAPB is not set
363# CONFIG_NET_DIVERT is not set
364# CONFIG_ECONET is not set 500# CONFIG_ECONET is not set
365# CONFIG_WAN_ROUTER is not set 501# CONFIG_WAN_ROUTER is not set
366 502
@@ -368,6 +504,7 @@ CONFIG_SCTP_HMAC_MD5=y
368# QoS and/or fair queueing 504# QoS and/or fair queueing
369# 505#
370# CONFIG_NET_SCHED is not set 506# CONFIG_NET_SCHED is not set
507CONFIG_NET_CLS_ROUTE=y
371 508
372# 509#
373# Network testing 510# Network testing
@@ -377,6 +514,7 @@ CONFIG_SCTP_HMAC_MD5=y
377# CONFIG_IRDA is not set 514# CONFIG_IRDA is not set
378# CONFIG_BT is not set 515# CONFIG_BT is not set
379# CONFIG_IEEE80211 is not set 516# CONFIG_IEEE80211 is not set
517CONFIG_FIB_RULES=y
380 518
381# 519#
382# Device Drivers 520# Device Drivers
@@ -387,7 +525,7 @@ CONFIG_SCTP_HMAC_MD5=y
387# 525#
388CONFIG_STANDALONE=y 526CONFIG_STANDALONE=y
389CONFIG_PREVENT_FIRMWARE_BUILD=y 527CONFIG_PREVENT_FIRMWARE_BUILD=y
390# CONFIG_FW_LOADER is not set 528CONFIG_FW_LOADER=m
391# CONFIG_SYS_HYPERVISOR is not set 529# CONFIG_SYS_HYPERVISOR is not set
392 530
393# 531#
@@ -409,11 +547,13 @@ CONFIG_MTD_CMDLINE_PARTS=y
409# User Modules And Translation Layers 547# User Modules And Translation Layers
410# 548#
411CONFIG_MTD_CHAR=y 549CONFIG_MTD_CHAR=y
550CONFIG_MTD_BLKDEVS=y
412CONFIG_MTD_BLOCK=y 551CONFIG_MTD_BLOCK=y
413# CONFIG_FTL is not set 552# CONFIG_FTL is not set
414# CONFIG_NFTL is not set 553# CONFIG_NFTL is not set
415# CONFIG_INFTL is not set 554# CONFIG_INFTL is not set
416# CONFIG_RFD_FTL is not set 555# CONFIG_RFD_FTL is not set
556# CONFIG_SSFDC is not set
417 557
418# 558#
419# RAM/ROM/Flash chip drivers 559# RAM/ROM/Flash chip drivers
@@ -485,6 +625,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
485# 625#
486# Plug and Play support 626# Plug and Play support
487# 627#
628# CONFIG_PNPACPI is not set
488 629
489# 630#
490# Block devices 631# Block devices
@@ -504,6 +645,12 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
504# CONFIG_ATA_OVER_ETH is not set 645# CONFIG_ATA_OVER_ETH is not set
505 646
506# 647#
648# Misc devices
649#
650CONFIG_SGI_IOC4=m
651# CONFIG_TIFM_CORE is not set
652
653#
507# ATA/ATAPI/MFM/RLL support 654# ATA/ATAPI/MFM/RLL support
508# 655#
509# CONFIG_IDE is not set 656# CONFIG_IDE is not set
@@ -513,6 +660,8 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
513# 660#
514# CONFIG_RAID_ATTRS is not set 661# CONFIG_RAID_ATTRS is not set
515CONFIG_SCSI=m 662CONFIG_SCSI=m
663CONFIG_SCSI_TGT=m
664# CONFIG_SCSI_NETLINK is not set
516# CONFIG_SCSI_PROC_FS is not set 665# CONFIG_SCSI_PROC_FS is not set
517 666
518# 667#
@@ -531,14 +680,17 @@ CONFIG_CHR_DEV_SG=m
531# CONFIG_SCSI_MULTI_LUN is not set 680# CONFIG_SCSI_MULTI_LUN is not set
532# CONFIG_SCSI_CONSTANTS is not set 681# CONFIG_SCSI_CONSTANTS is not set
533# CONFIG_SCSI_LOGGING is not set 682# CONFIG_SCSI_LOGGING is not set
683CONFIG_SCSI_SCAN_ASYNC=y
534 684
535# 685#
536# SCSI Transport Attributes 686# SCSI Transports
537# 687#
538# CONFIG_SCSI_SPI_ATTRS is not set 688# CONFIG_SCSI_SPI_ATTRS is not set
539# CONFIG_SCSI_FC_ATTRS is not set 689# CONFIG_SCSI_FC_ATTRS is not set
540# CONFIG_SCSI_ISCSI_ATTRS is not set 690# CONFIG_SCSI_ISCSI_ATTRS is not set
541# CONFIG_SCSI_SAS_ATTRS is not set 691CONFIG_SCSI_SAS_ATTRS=m
692CONFIG_SCSI_SAS_LIBSAS=m
693# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
542 694
543# 695#
544# SCSI low-level drivers 696# SCSI low-level drivers
@@ -551,26 +703,35 @@ CONFIG_CHR_DEV_SG=m
551# CONFIG_SCSI_AIC7XXX is not set 703# CONFIG_SCSI_AIC7XXX is not set
552# CONFIG_SCSI_AIC7XXX_OLD is not set 704# CONFIG_SCSI_AIC7XXX_OLD is not set
553# CONFIG_SCSI_AIC79XX is not set 705# CONFIG_SCSI_AIC79XX is not set
706CONFIG_SCSI_AIC94XX=m
707# CONFIG_AIC94XX_DEBUG is not set
554# CONFIG_SCSI_DPT_I2O is not set 708# CONFIG_SCSI_DPT_I2O is not set
709# CONFIG_SCSI_ARCMSR is not set
555# CONFIG_MEGARAID_NEWGEN is not set 710# CONFIG_MEGARAID_NEWGEN is not set
556# CONFIG_MEGARAID_LEGACY is not set 711# CONFIG_MEGARAID_LEGACY is not set
557# CONFIG_MEGARAID_SAS is not set 712# CONFIG_MEGARAID_SAS is not set
558# CONFIG_SCSI_SATA is not set
559# CONFIG_SCSI_HPTIOP is not set 713# CONFIG_SCSI_HPTIOP is not set
560# CONFIG_SCSI_DMX3191D is not set 714# CONFIG_SCSI_DMX3191D is not set
561# CONFIG_SCSI_FUTURE_DOMAIN is not set 715# CONFIG_SCSI_FUTURE_DOMAIN is not set
562# CONFIG_SCSI_IPS is not set 716# CONFIG_SCSI_IPS is not set
563# CONFIG_SCSI_INITIO is not set 717# CONFIG_SCSI_INITIO is not set
564# CONFIG_SCSI_INIA100 is not set 718# CONFIG_SCSI_INIA100 is not set
719# CONFIG_SCSI_STEX is not set
565# CONFIG_SCSI_SYM53C8XX_2 is not set 720# CONFIG_SCSI_SYM53C8XX_2 is not set
566# CONFIG_SCSI_IPR is not set
567# CONFIG_SCSI_QLOGIC_1280 is not set 721# CONFIG_SCSI_QLOGIC_1280 is not set
568# CONFIG_SCSI_QLA_FC is not set 722# CONFIG_SCSI_QLA_FC is not set
723# CONFIG_SCSI_QLA_ISCSI is not set
569# CONFIG_SCSI_LPFC is not set 724# CONFIG_SCSI_LPFC is not set
570# CONFIG_SCSI_DC395x is not set 725# CONFIG_SCSI_DC395x is not set
571# CONFIG_SCSI_DC390T is not set 726# CONFIG_SCSI_DC390T is not set
572# CONFIG_SCSI_NSP32 is not set 727# CONFIG_SCSI_NSP32 is not set
573# CONFIG_SCSI_DEBUG is not set 728# CONFIG_SCSI_DEBUG is not set
729# CONFIG_SCSI_SRP is not set
730
731#
732# Serial ATA (prod) and Parallel ATA (experimental) drivers
733#
734# CONFIG_ATA is not set
574 735
575# 736#
576# Multi-device support (RAID and LVM) 737# Multi-device support (RAID and LVM)
@@ -649,7 +810,7 @@ CONFIG_NATSEMI=y
649# CONFIG_SUNDANCE is not set 810# CONFIG_SUNDANCE is not set
650# CONFIG_TLAN is not set 811# CONFIG_TLAN is not set
651# CONFIG_VIA_RHINE is not set 812# CONFIG_VIA_RHINE is not set
652# CONFIG_LAN_SAA9730 is not set 813# CONFIG_SC92031 is not set
653 814
654# 815#
655# Ethernet (1000 Mbit) 816# Ethernet (1000 Mbit)
@@ -668,14 +829,18 @@ CONFIG_NATSEMI=y
668# CONFIG_VIA_VELOCITY is not set 829# CONFIG_VIA_VELOCITY is not set
669# CONFIG_TIGON3 is not set 830# CONFIG_TIGON3 is not set
670# CONFIG_BNX2 is not set 831# CONFIG_BNX2 is not set
832CONFIG_QLA3XXX=m
833# CONFIG_ATL1 is not set
671 834
672# 835#
673# Ethernet (10000 Mbit) 836# Ethernet (10000 Mbit)
674# 837#
675# CONFIG_CHELSIO_T1 is not set 838# CONFIG_CHELSIO_T1 is not set
839CONFIG_CHELSIO_T3=m
676# CONFIG_IXGB is not set 840# CONFIG_IXGB is not set
677# CONFIG_S2IO is not set 841# CONFIG_S2IO is not set
678# CONFIG_MYRI10GE is not set 842# CONFIG_MYRI10GE is not set
843CONFIG_NETXEN_NIC=m
679 844
680# 845#
681# Token Ring devices 846# Token Ring devices
@@ -703,6 +868,7 @@ CONFIG_PPP_DEFLATE=m
703# CONFIG_PPP_MPPE is not set 868# CONFIG_PPP_MPPE is not set
704# CONFIG_PPPOE is not set 869# CONFIG_PPPOE is not set
705# CONFIG_SLIP is not set 870# CONFIG_SLIP is not set
871CONFIG_SLHC=m
706# CONFIG_NET_FC is not set 872# CONFIG_NET_FC is not set
707# CONFIG_SHAPER is not set 873# CONFIG_SHAPER is not set
708# CONFIG_NETCONSOLE is not set 874# CONFIG_NETCONSOLE is not set
@@ -723,6 +889,7 @@ CONFIG_PPP_DEFLATE=m
723# Input device support 889# Input device support
724# 890#
725CONFIG_INPUT=y 891CONFIG_INPUT=y
892# CONFIG_INPUT_FF_MEMLESS is not set
726 893
727# 894#
728# Userland interfaces 895# Userland interfaces
@@ -790,10 +957,6 @@ CONFIG_GEN_RTC_X=y
790# CONFIG_DTLK is not set 957# CONFIG_DTLK is not set
791# CONFIG_R3964 is not set 958# CONFIG_R3964 is not set
792# CONFIG_APPLICOM is not set 959# CONFIG_APPLICOM is not set
793
794#
795# Ftape, the floppy tape device driver
796#
797# CONFIG_DRM is not set 960# CONFIG_DRM is not set
798# CONFIG_RAW_DRIVER is not set 961# CONFIG_RAW_DRIVER is not set
799 962
@@ -801,7 +964,6 @@ CONFIG_GEN_RTC_X=y
801# TPM devices 964# TPM devices
802# 965#
803# CONFIG_TCG_TPM is not set 966# CONFIG_TCG_TPM is not set
804# CONFIG_TELCLOCK is not set
805 967
806# 968#
807# I2C support 969# I2C support
@@ -830,6 +992,7 @@ CONFIG_I2C_CHARDEV=y
830# CONFIG_I2C_NFORCE2 is not set 992# CONFIG_I2C_NFORCE2 is not set
831# CONFIG_I2C_OCORES is not set 993# CONFIG_I2C_OCORES is not set
832# CONFIG_I2C_PARPORT_LIGHT is not set 994# CONFIG_I2C_PARPORT_LIGHT is not set
995# CONFIG_I2C_PASEMI is not set
833# CONFIG_I2C_PROSAVAGE is not set 996# CONFIG_I2C_PROSAVAGE is not set
834# CONFIG_I2C_SAVAGE4 is not set 997# CONFIG_I2C_SAVAGE4 is not set
835# CONFIG_I2C_SIS5595 is not set 998# CONFIG_I2C_SIS5595 is not set
@@ -865,6 +1028,7 @@ CONFIG_I2C_DEBUG_BUS=y
865# 1028#
866# Dallas's 1-wire bus 1029# Dallas's 1-wire bus
867# 1030#
1031# CONFIG_W1 is not set
868 1032
869# 1033#
870# Hardware Monitoring support 1034# Hardware Monitoring support
@@ -875,6 +1039,7 @@ CONFIG_HWMON=y
875# CONFIG_SENSORS_ADM1021 is not set 1039# CONFIG_SENSORS_ADM1021 is not set
876# CONFIG_SENSORS_ADM1025 is not set 1040# CONFIG_SENSORS_ADM1025 is not set
877# CONFIG_SENSORS_ADM1026 is not set 1041# CONFIG_SENSORS_ADM1026 is not set
1042# CONFIG_SENSORS_ADM1029 is not set
878# CONFIG_SENSORS_ADM1031 is not set 1043# CONFIG_SENSORS_ADM1031 is not set
879# CONFIG_SENSORS_ADM9240 is not set 1044# CONFIG_SENSORS_ADM9240 is not set
880# CONFIG_SENSORS_ASB100 is not set 1045# CONFIG_SENSORS_ASB100 is not set
@@ -898,29 +1063,27 @@ CONFIG_HWMON=y
898# CONFIG_SENSORS_LM92 is not set 1063# CONFIG_SENSORS_LM92 is not set
899# CONFIG_SENSORS_MAX1619 is not set 1064# CONFIG_SENSORS_MAX1619 is not set
900# CONFIG_SENSORS_PC87360 is not set 1065# CONFIG_SENSORS_PC87360 is not set
1066# CONFIG_SENSORS_PC87427 is not set
901# CONFIG_SENSORS_SIS5595 is not set 1067# CONFIG_SENSORS_SIS5595 is not set
902# CONFIG_SENSORS_SMSC47M1 is not set 1068# CONFIG_SENSORS_SMSC47M1 is not set
903# CONFIG_SENSORS_SMSC47M192 is not set 1069# CONFIG_SENSORS_SMSC47M192 is not set
904# CONFIG_SENSORS_SMSC47B397 is not set 1070# CONFIG_SENSORS_SMSC47B397 is not set
905# CONFIG_SENSORS_VIA686A is not set 1071# CONFIG_SENSORS_VIA686A is not set
1072# CONFIG_SENSORS_VT1211 is not set
906# CONFIG_SENSORS_VT8231 is not set 1073# CONFIG_SENSORS_VT8231 is not set
907# CONFIG_SENSORS_W83781D is not set 1074# CONFIG_SENSORS_W83781D is not set
908# CONFIG_SENSORS_W83791D is not set 1075# CONFIG_SENSORS_W83791D is not set
909# CONFIG_SENSORS_W83792D is not set 1076# CONFIG_SENSORS_W83792D is not set
1077# CONFIG_SENSORS_W83793 is not set
910# CONFIG_SENSORS_W83L785TS is not set 1078# CONFIG_SENSORS_W83L785TS is not set
911# CONFIG_SENSORS_W83627HF is not set 1079# CONFIG_SENSORS_W83627HF is not set
912# CONFIG_SENSORS_W83627EHF is not set 1080# CONFIG_SENSORS_W83627EHF is not set
913# CONFIG_HWMON_DEBUG_CHIP is not set 1081# CONFIG_HWMON_DEBUG_CHIP is not set
914 1082
915# 1083#
916# Misc devices
917#
918
919#
920# Multimedia devices 1084# Multimedia devices
921# 1085#
922# CONFIG_VIDEO_DEV is not set 1086# CONFIG_VIDEO_DEV is not set
923CONFIG_VIDEO_V4L2=y
924 1087
925# 1088#
926# Digital Video Broadcasting Devices 1089# Digital Video Broadcasting Devices
@@ -932,6 +1095,7 @@ CONFIG_VIDEO_V4L2=y
932# 1095#
933# CONFIG_FIRMWARE_EDID is not set 1096# CONFIG_FIRMWARE_EDID is not set
934# CONFIG_FB is not set 1097# CONFIG_FB is not set
1098# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
935 1099
936# 1100#
937# Sound 1101# Sound
@@ -939,6 +1103,11 @@ CONFIG_VIDEO_V4L2=y
939# CONFIG_SOUND is not set 1103# CONFIG_SOUND is not set
940 1104
941# 1105#
1106# HID Devices
1107#
1108# CONFIG_HID is not set
1109
1110#
942# USB support 1111# USB support
943# 1112#
944CONFIG_USB_ARCH_HAS_HCD=y 1113CONFIG_USB_ARCH_HAS_HCD=y
@@ -1001,6 +1170,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1001# 1170#
1002 1171
1003# 1172#
1173# Auxiliary Display support
1174#
1175
1176#
1177# Virtualization
1178#
1179
1180#
1004# File systems 1181# File systems
1005# 1182#
1006CONFIG_EXT2_FS=y 1183CONFIG_EXT2_FS=y
@@ -1012,6 +1189,7 @@ CONFIG_EXT3_FS=m
1012CONFIG_EXT3_FS_XATTR=y 1189CONFIG_EXT3_FS_XATTR=y
1013# CONFIG_EXT3_FS_POSIX_ACL is not set 1190# CONFIG_EXT3_FS_POSIX_ACL is not set
1014# CONFIG_EXT3_FS_SECURITY is not set 1191# CONFIG_EXT3_FS_SECURITY is not set
1192# CONFIG_EXT4DEV_FS is not set
1015CONFIG_JBD=m 1193CONFIG_JBD=m
1016# CONFIG_JBD_DEBUG is not set 1194# CONFIG_JBD_DEBUG is not set
1017CONFIG_FS_MBCACHE=y 1195CONFIG_FS_MBCACHE=y
@@ -1023,6 +1201,7 @@ CONFIG_XFS_FS=m
1023# CONFIG_XFS_SECURITY is not set 1201# CONFIG_XFS_SECURITY is not set
1024# CONFIG_XFS_POSIX_ACL is not set 1202# CONFIG_XFS_POSIX_ACL is not set
1025# CONFIG_XFS_RT is not set 1203# CONFIG_XFS_RT is not set
1204# CONFIG_GFS2_FS is not set
1026# CONFIG_OCFS2_FS is not set 1205# CONFIG_OCFS2_FS is not set
1027# CONFIG_MINIX_FS is not set 1206# CONFIG_MINIX_FS is not set
1028# CONFIG_ROMFS_FS is not set 1207# CONFIG_ROMFS_FS is not set
@@ -1033,6 +1212,7 @@ CONFIG_INOTIFY_USER=y
1033# CONFIG_AUTOFS_FS is not set 1212# CONFIG_AUTOFS_FS is not set
1034CONFIG_AUTOFS4_FS=m 1213CONFIG_AUTOFS4_FS=m
1035# CONFIG_FUSE_FS is not set 1214# CONFIG_FUSE_FS is not set
1215CONFIG_GENERIC_ACL=y
1036 1216
1037# 1217#
1038# CD-ROM/DVD Filesystems 1218# CD-ROM/DVD Filesystems
@@ -1057,11 +1237,13 @@ CONFIG_NTFS_FS=m
1057# 1237#
1058CONFIG_PROC_FS=y 1238CONFIG_PROC_FS=y
1059CONFIG_PROC_KCORE=y 1239CONFIG_PROC_KCORE=y
1240CONFIG_PROC_SYSCTL=y
1060CONFIG_SYSFS=y 1241CONFIG_SYSFS=y
1061CONFIG_TMPFS=y 1242CONFIG_TMPFS=y
1243CONFIG_TMPFS_POSIX_ACL=y
1062# CONFIG_HUGETLB_PAGE is not set 1244# CONFIG_HUGETLB_PAGE is not set
1063CONFIG_RAMFS=y 1245CONFIG_RAMFS=y
1064# CONFIG_CONFIGFS_FS is not set 1246CONFIG_CONFIGFS_FS=m
1065 1247
1066# 1248#
1067# Miscellaneous filesystems 1249# Miscellaneous filesystems
@@ -1073,7 +1255,6 @@ CONFIG_RAMFS=y
1073# CONFIG_BEFS_FS is not set 1255# CONFIG_BEFS_FS is not set
1074# CONFIG_BFS_FS is not set 1256# CONFIG_BFS_FS is not set
1075# CONFIG_EFS_FS is not set 1257# CONFIG_EFS_FS is not set
1076# CONFIG_JFFS_FS is not set
1077CONFIG_JFFS2_FS=y 1258CONFIG_JFFS2_FS=y
1078CONFIG_JFFS2_FS_DEBUG=0 1259CONFIG_JFFS2_FS_DEBUG=0
1079CONFIG_JFFS2_FS_WRITEBUFFER=y 1260CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1118,7 +1299,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1118CONFIG_SMB_FS=m 1299CONFIG_SMB_FS=m
1119# CONFIG_SMB_NLS_DEFAULT is not set 1300# CONFIG_SMB_NLS_DEFAULT is not set
1120# CONFIG_CIFS is not set 1301# CONFIG_CIFS is not set
1121# CONFIG_CIFS_DEBUG2 is not set
1122# CONFIG_NCP_FS is not set 1302# CONFIG_NCP_FS is not set
1123# CONFIG_CODA_FS is not set 1303# CONFIG_CODA_FS is not set
1124# CONFIG_AFS_FS is not set 1304# CONFIG_AFS_FS is not set
@@ -1175,6 +1355,14 @@ CONFIG_NLS_ISO8859_1=m
1175CONFIG_NLS_UTF8=m 1355CONFIG_NLS_UTF8=m
1176 1356
1177# 1357#
1358# Distributed Lock Manager
1359#
1360CONFIG_DLM=m
1361CONFIG_DLM_TCP=y
1362# CONFIG_DLM_SCTP is not set
1363# CONFIG_DLM_DEBUG is not set
1364
1365#
1178# Profiling support 1366# Profiling support
1179# 1367#
1180# CONFIG_PROFILING is not set 1368# CONFIG_PROFILING is not set
@@ -1184,11 +1372,13 @@ CONFIG_NLS_UTF8=m
1184# 1372#
1185CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1373CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1186# CONFIG_PRINTK_TIME is not set 1374# CONFIG_PRINTK_TIME is not set
1375CONFIG_ENABLE_MUST_CHECK=y
1187# CONFIG_MAGIC_SYSRQ is not set 1376# CONFIG_MAGIC_SYSRQ is not set
1188# CONFIG_UNUSED_SYMBOLS is not set 1377# CONFIG_UNUSED_SYMBOLS is not set
1378# CONFIG_DEBUG_FS is not set
1379# CONFIG_HEADERS_CHECK is not set
1189# CONFIG_DEBUG_KERNEL is not set 1380# CONFIG_DEBUG_KERNEL is not set
1190CONFIG_LOG_BUF_SHIFT=14 1381CONFIG_LOG_BUF_SHIFT=14
1191# CONFIG_DEBUG_FS is not set
1192CONFIG_CROSSCOMPILE=y 1382CONFIG_CROSSCOMPILE=y
1193CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw" 1383CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw"
1194 1384
@@ -1202,7 +1392,12 @@ CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw"
1202# Cryptographic options 1392# Cryptographic options
1203# 1393#
1204CONFIG_CRYPTO=y 1394CONFIG_CRYPTO=y
1395CONFIG_CRYPTO_ALGAPI=y
1396CONFIG_CRYPTO_BLKCIPHER=y
1397CONFIG_CRYPTO_HASH=y
1398CONFIG_CRYPTO_MANAGER=y
1205CONFIG_CRYPTO_HMAC=y 1399CONFIG_CRYPTO_HMAC=y
1400CONFIG_CRYPTO_XCBC=m
1206# CONFIG_CRYPTO_NULL is not set 1401# CONFIG_CRYPTO_NULL is not set
1207# CONFIG_CRYPTO_MD4 is not set 1402# CONFIG_CRYPTO_MD4 is not set
1208CONFIG_CRYPTO_MD5=y 1403CONFIG_CRYPTO_MD5=y
@@ -1211,7 +1406,13 @@ CONFIG_CRYPTO_MD5=y
1211# CONFIG_CRYPTO_SHA512 is not set 1406# CONFIG_CRYPTO_SHA512 is not set
1212# CONFIG_CRYPTO_WP512 is not set 1407# CONFIG_CRYPTO_WP512 is not set
1213# CONFIG_CRYPTO_TGR192 is not set 1408# CONFIG_CRYPTO_TGR192 is not set
1409CONFIG_CRYPTO_GF128MUL=m
1410CONFIG_CRYPTO_ECB=m
1411CONFIG_CRYPTO_CBC=y
1412CONFIG_CRYPTO_PCBC=m
1413CONFIG_CRYPTO_LRW=m
1214CONFIG_CRYPTO_DES=y 1414CONFIG_CRYPTO_DES=y
1415CONFIG_CRYPTO_FCRYPT=m
1215# CONFIG_CRYPTO_BLOWFISH is not set 1416# CONFIG_CRYPTO_BLOWFISH is not set
1216# CONFIG_CRYPTO_TWOFISH is not set 1417# CONFIG_CRYPTO_TWOFISH is not set
1217# CONFIG_CRYPTO_SERPENT is not set 1418# CONFIG_CRYPTO_SERPENT is not set
@@ -1225,6 +1426,7 @@ CONFIG_CRYPTO_DES=y
1225# CONFIG_CRYPTO_DEFLATE is not set 1426# CONFIG_CRYPTO_DEFLATE is not set
1226# CONFIG_CRYPTO_MICHAEL_MIC is not set 1427# CONFIG_CRYPTO_MICHAEL_MIC is not set
1227# CONFIG_CRYPTO_CRC32C is not set 1428# CONFIG_CRYPTO_CRC32C is not set
1429CONFIG_CRYPTO_CAMELLIA=m
1228# CONFIG_CRYPTO_TEST is not set 1430# CONFIG_CRYPTO_TEST is not set
1229 1431
1230# 1432#
@@ -1234,10 +1436,17 @@ CONFIG_CRYPTO_DES=y
1234# 1436#
1235# Library routines 1437# Library routines
1236# 1438#
1439CONFIG_BITREVERSE=y
1237CONFIG_CRC_CCITT=m 1440CONFIG_CRC_CCITT=m
1238# CONFIG_CRC16 is not set 1441# CONFIG_CRC16 is not set
1239CONFIG_CRC32=y 1442CONFIG_CRC32=y
1240# CONFIG_LIBCRC32C is not set 1443# CONFIG_LIBCRC32C is not set
1241CONFIG_ZLIB_INFLATE=y 1444CONFIG_ZLIB_INFLATE=y
1242CONFIG_ZLIB_DEFLATE=y 1445CONFIG_ZLIB_DEFLATE=y
1446CONFIG_TEXTSEARCH=y
1447CONFIG_TEXTSEARCH_KMP=m
1448CONFIG_TEXTSEARCH_BM=m
1449CONFIG_TEXTSEARCH_FSM=m
1243CONFIG_PLIST=y 1450CONFIG_PLIST=y
1451CONFIG_HAS_IOMEM=y
1452CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig
index d5b49735683b..ce088b36291d 100644
--- a/arch/mips/configs/ev64120_defconfig
+++ b/arch/mips/configs/ev64120_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:05 2006 4# Tue Feb 20 21:47:30 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27CONFIG_MIPS_EV64120=y 28CONFIG_MIPS_EV64120=y
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_EV64120=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_MIPS_EV64120=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66# CONFIG_EVB_PCI1 is not set 66# CONFIG_EVB_PCI1 is not set
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
74CONFIG_CPU_BIG_ENDIAN=y 78CONFIG_CPU_BIG_ENDIAN=y
@@ -118,8 +122,8 @@ CONFIG_PAGE_SIZE_4KB=y
118# CONFIG_PAGE_SIZE_16KB is not set 122# CONFIG_PAGE_SIZE_16KB is not set
119# CONFIG_PAGE_SIZE_64KB is not set 123# CONFIG_PAGE_SIZE_64KB is not set
120CONFIG_MIPS_MT_DISABLED=y 124CONFIG_MIPS_MT_DISABLED=y
121# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_MT_SMP is not set 125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
123# CONFIG_MIPS_VPE_LOADER is not set 127# CONFIG_MIPS_VPE_LOADER is not set
124# CONFIG_64BIT_PHYS_ADDR is not set 128# CONFIG_64BIT_PHYS_ADDR is not set
125CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
@@ -136,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -148,6 +153,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,15 +172,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 173CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
174CONFIG_RELAY=y 184CONFIG_RELAY=y
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
@@ -182,12 +193,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 193CONFIG_BUG=y
183CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 195CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 196CONFIG_FUTEX=y
187CONFIG_EPOLL=y 197CONFIG_EPOLL=y
188CONFIG_SHMEM=y 198CONFIG_SHMEM=y
189CONFIG_SLAB=y 199CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 204# CONFIG_SLOB is not set
@@ -205,6 +216,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
205# 216#
206# Block layer 217# Block layer
207# 218#
219CONFIG_BLOCK=y
208# CONFIG_LBD is not set 220# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 222# CONFIG_LSF is not set
@@ -247,6 +259,14 @@ CONFIG_BINFMT_ELF=y
247CONFIG_TRAD_SIGNALS=y 259CONFIG_TRAD_SIGNALS=y
248 260
249# 261#
262# Power management options
263#
264CONFIG_PM=y
265# CONFIG_PM_LEGACY is not set
266# CONFIG_PM_DEBUG is not set
267# CONFIG_PM_SYSFS_DEPRECATED is not set
268
269#
250# Networking 270# Networking
251# 271#
252CONFIG_NET=y 272CONFIG_NET=y
@@ -259,7 +279,10 @@ CONFIG_NET=y
259CONFIG_UNIX=y 279CONFIG_UNIX=y
260CONFIG_XFRM=y 280CONFIG_XFRM=y
261CONFIG_XFRM_USER=m 281CONFIG_XFRM_USER=m
282# CONFIG_XFRM_SUB_POLICY is not set
283CONFIG_XFRM_MIGRATE=y
262CONFIG_NET_KEY=y 284CONFIG_NET_KEY=y
285CONFIG_NET_KEY_MIGRATE=y
263CONFIG_INET=y 286CONFIG_INET=y
264# CONFIG_IP_MULTICAST is not set 287# CONFIG_IP_MULTICAST is not set
265# CONFIG_IP_ADVANCED_ROUTER is not set 288# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +302,13 @@ CONFIG_IP_PNP=y
279# CONFIG_INET_TUNNEL is not set 302# CONFIG_INET_TUNNEL is not set
280CONFIG_INET_XFRM_MODE_TRANSPORT=m 303CONFIG_INET_XFRM_MODE_TRANSPORT=m
281CONFIG_INET_XFRM_MODE_TUNNEL=m 304CONFIG_INET_XFRM_MODE_TUNNEL=m
305CONFIG_INET_XFRM_MODE_BEET=m
282CONFIG_INET_DIAG=y 306CONFIG_INET_DIAG=y
283CONFIG_INET_TCP_DIAG=y 307CONFIG_INET_TCP_DIAG=y
284# CONFIG_TCP_CONG_ADVANCED is not set 308# CONFIG_TCP_CONG_ADVANCED is not set
285CONFIG_TCP_CONG_BIC=y 309CONFIG_TCP_CONG_CUBIC=y
310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
286# CONFIG_IPV6 is not set 312# CONFIG_IPV6 is not set
287# CONFIG_INET6_XFRM_TUNNEL is not set 313# CONFIG_INET6_XFRM_TUNNEL is not set
288# CONFIG_INET6_TUNNEL is not set 314# CONFIG_INET6_TUNNEL is not set
@@ -312,7 +338,6 @@ CONFIG_NETWORK_SECMARK=y
312# CONFIG_ATALK is not set 338# CONFIG_ATALK is not set
313# CONFIG_X25 is not set 339# CONFIG_X25 is not set
314# CONFIG_LAPB is not set 340# CONFIG_LAPB is not set
315# CONFIG_NET_DIVERT is not set
316# CONFIG_ECONET is not set 341# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set 342# CONFIG_WAN_ROUTER is not set
318 343
@@ -366,6 +391,7 @@ CONFIG_CONNECTOR=m
366# 391#
367# Plug and Play support 392# Plug and Play support
368# 393#
394# CONFIG_PNPACPI is not set
369 395
370# 396#
371# Block devices 397# Block devices
@@ -386,6 +412,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
386CONFIG_ATA_OVER_ETH=m 412CONFIG_ATA_OVER_ETH=m
387 413
388# 414#
415# Misc devices
416#
417CONFIG_SGI_IOC4=m
418# CONFIG_TIFM_CORE is not set
419
420#
389# ATA/ATAPI/MFM/RLL support 421# ATA/ATAPI/MFM/RLL support
390# 422#
391# CONFIG_IDE is not set 423# CONFIG_IDE is not set
@@ -395,6 +427,12 @@ CONFIG_ATA_OVER_ETH=m
395# 427#
396CONFIG_RAID_ATTRS=m 428CONFIG_RAID_ATTRS=m
397# CONFIG_SCSI is not set 429# CONFIG_SCSI is not set
430# CONFIG_SCSI_NETLINK is not set
431
432#
433# Serial ATA (prod) and Parallel ATA (experimental) drivers
434#
435# CONFIG_ATA is not set
398 436
399# 437#
400# Multi-device support (RAID and LVM) 438# Multi-device support (RAID and LVM)
@@ -445,6 +483,8 @@ CONFIG_LXT_PHY=m
445CONFIG_CICADA_PHY=m 483CONFIG_CICADA_PHY=m
446CONFIG_VITESSE_PHY=m 484CONFIG_VITESSE_PHY=m
447CONFIG_SMSC_PHY=m 485CONFIG_SMSC_PHY=m
486# CONFIG_BROADCOM_PHY is not set
487# CONFIG_FIXED_PHY is not set
448 488
449# 489#
450# Ethernet (10 or 100Mbit) 490# Ethernet (10 or 100Mbit)
@@ -480,14 +520,18 @@ CONFIG_NET_ETHERNET=y
480# CONFIG_SK98LIN is not set 520# CONFIG_SK98LIN is not set
481# CONFIG_TIGON3 is not set 521# CONFIG_TIGON3 is not set
482# CONFIG_BNX2 is not set 522# CONFIG_BNX2 is not set
523CONFIG_QLA3XXX=m
524# CONFIG_ATL1 is not set
483 525
484# 526#
485# Ethernet (10000 Mbit) 527# Ethernet (10000 Mbit)
486# 528#
487# CONFIG_CHELSIO_T1 is not set 529# CONFIG_CHELSIO_T1 is not set
530CONFIG_CHELSIO_T3=m
488# CONFIG_IXGB is not set 531# CONFIG_IXGB is not set
489# CONFIG_S2IO is not set 532# CONFIG_S2IO is not set
490# CONFIG_MYRI10GE is not set 533# CONFIG_MYRI10GE is not set
534CONFIG_NETXEN_NIC=m
491 535
492# 536#
493# Token Ring devices 537# Token Ring devices
@@ -515,6 +559,7 @@ CONFIG_PPP_ASYNC=y
515CONFIG_PPP_MPPE=m 559CONFIG_PPP_MPPE=m
516# CONFIG_PPPOE is not set 560# CONFIG_PPPOE is not set
517# CONFIG_SLIP is not set 561# CONFIG_SLIP is not set
562CONFIG_SLHC=y
518# CONFIG_SHAPER is not set 563# CONFIG_SHAPER is not set
519# CONFIG_NETCONSOLE is not set 564# CONFIG_NETCONSOLE is not set
520# CONFIG_NETPOLL is not set 565# CONFIG_NETPOLL is not set
@@ -534,6 +579,7 @@ CONFIG_PPP_MPPE=m
534# Input device support 579# Input device support
535# 580#
536CONFIG_INPUT=y 581CONFIG_INPUT=y
582# CONFIG_INPUT_FF_MEMLESS is not set
537 583
538# 584#
539# Userland interfaces 585# Userland interfaces
@@ -611,10 +657,6 @@ CONFIG_LEGACY_PTY_COUNT=256
611# CONFIG_DTLK is not set 657# CONFIG_DTLK is not set
612# CONFIG_R3964 is not set 658# CONFIG_R3964 is not set
613# CONFIG_APPLICOM is not set 659# CONFIG_APPLICOM is not set
614
615#
616# Ftape, the floppy tape device driver
617#
618# CONFIG_DRM is not set 660# CONFIG_DRM is not set
619# CONFIG_RAW_DRIVER is not set 661# CONFIG_RAW_DRIVER is not set
620 662
@@ -622,7 +664,6 @@ CONFIG_LEGACY_PTY_COUNT=256
622# TPM devices 664# TPM devices
623# 665#
624# CONFIG_TCG_TPM is not set 666# CONFIG_TCG_TPM is not set
625# CONFIG_TELCLOCK is not set
626 667
627# 668#
628# I2C support 669# I2C support
@@ -647,14 +688,9 @@ CONFIG_LEGACY_PTY_COUNT=256
647# CONFIG_HWMON_VID is not set 688# CONFIG_HWMON_VID is not set
648 689
649# 690#
650# Misc devices
651#
652
653#
654# Multimedia devices 691# Multimedia devices
655# 692#
656# CONFIG_VIDEO_DEV is not set 693# CONFIG_VIDEO_DEV is not set
657CONFIG_VIDEO_V4L2=y
658 694
659# 695#
660# Digital Video Broadcasting Devices 696# Digital Video Broadcasting Devices
@@ -672,6 +708,7 @@ CONFIG_VIDEO_V4L2=y
672# 708#
673# CONFIG_VGA_CONSOLE is not set 709# CONFIG_VGA_CONSOLE is not set
674CONFIG_DUMMY_CONSOLE=y 710CONFIG_DUMMY_CONSOLE=y
711# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
675 712
676# 713#
677# Sound 714# Sound
@@ -679,6 +716,11 @@ CONFIG_DUMMY_CONSOLE=y
679# CONFIG_SOUND is not set 716# CONFIG_SOUND is not set
680 717
681# 718#
719# HID Devices
720#
721# CONFIG_HID is not set
722
723#
682# USB support 724# USB support
683# 725#
684CONFIG_USB_ARCH_HAS_HCD=y 726CONFIG_USB_ARCH_HAS_HCD=y
@@ -741,16 +783,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
741# 783#
742 784
743# 785#
786# Auxiliary Display support
787#
788
789#
790# Virtualization
791#
792
793#
744# File systems 794# File systems
745# 795#
746CONFIG_EXT2_FS=y 796CONFIG_EXT2_FS=y
747# CONFIG_EXT2_FS_XATTR is not set 797# CONFIG_EXT2_FS_XATTR is not set
748# CONFIG_EXT2_FS_XIP is not set 798# CONFIG_EXT2_FS_XIP is not set
749# CONFIG_EXT3_FS is not set 799# CONFIG_EXT3_FS is not set
800# CONFIG_EXT4DEV_FS is not set
750# CONFIG_REISERFS_FS is not set 801# CONFIG_REISERFS_FS is not set
751# CONFIG_JFS_FS is not set 802# CONFIG_JFS_FS is not set
752# CONFIG_FS_POSIX_ACL is not set 803# CONFIG_FS_POSIX_ACL is not set
753# CONFIG_XFS_FS is not set 804# CONFIG_XFS_FS is not set
805# CONFIG_GFS2_FS is not set
754# CONFIG_OCFS2_FS is not set 806# CONFIG_OCFS2_FS is not set
755# CONFIG_MINIX_FS is not set 807# CONFIG_MINIX_FS is not set
756# CONFIG_ROMFS_FS is not set 808# CONFIG_ROMFS_FS is not set
@@ -780,17 +832,19 @@ CONFIG_FUSE_FS=m
780# 832#
781CONFIG_PROC_FS=y 833CONFIG_PROC_FS=y
782CONFIG_PROC_KCORE=y 834CONFIG_PROC_KCORE=y
835CONFIG_PROC_SYSCTL=y
783CONFIG_SYSFS=y 836CONFIG_SYSFS=y
784# CONFIG_TMPFS is not set 837# CONFIG_TMPFS is not set
785# CONFIG_HUGETLB_PAGE is not set 838# CONFIG_HUGETLB_PAGE is not set
786CONFIG_RAMFS=y 839CONFIG_RAMFS=y
787# CONFIG_CONFIGFS_FS is not set 840CONFIG_CONFIGFS_FS=m
788 841
789# 842#
790# Miscellaneous filesystems 843# Miscellaneous filesystems
791# 844#
792# CONFIG_ADFS_FS is not set 845# CONFIG_ADFS_FS is not set
793# CONFIG_AFFS_FS is not set 846# CONFIG_AFFS_FS is not set
847# CONFIG_ECRYPT_FS is not set
794# CONFIG_HFS_FS is not set 848# CONFIG_HFS_FS is not set
795# CONFIG_HFSPLUS_FS is not set 849# CONFIG_HFSPLUS_FS is not set
796# CONFIG_BEFS_FS is not set 850# CONFIG_BEFS_FS is not set
@@ -819,7 +873,6 @@ CONFIG_SUNRPC=y
819# CONFIG_RPCSEC_GSS_SPKM3 is not set 873# CONFIG_RPCSEC_GSS_SPKM3 is not set
820# CONFIG_SMB_FS is not set 874# CONFIG_SMB_FS is not set
821# CONFIG_CIFS is not set 875# CONFIG_CIFS is not set
822# CONFIG_CIFS_DEBUG2 is not set
823# CONFIG_NCP_FS is not set 876# CONFIG_NCP_FS is not set
824# CONFIG_CODA_FS is not set 877# CONFIG_CODA_FS is not set
825# CONFIG_AFS_FS is not set 878# CONFIG_AFS_FS is not set
@@ -837,6 +890,14 @@ CONFIG_MSDOS_PARTITION=y
837# CONFIG_NLS is not set 890# CONFIG_NLS is not set
838 891
839# 892#
893# Distributed Lock Manager
894#
895CONFIG_DLM=m
896CONFIG_DLM_TCP=y
897# CONFIG_DLM_SCTP is not set
898# CONFIG_DLM_DEBUG is not set
899
900#
840# Profiling support 901# Profiling support
841# 902#
842# CONFIG_PROFILING is not set 903# CONFIG_PROFILING is not set
@@ -846,13 +907,16 @@ CONFIG_MSDOS_PARTITION=y
846# 907#
847CONFIG_TRACE_IRQFLAGS_SUPPORT=y 908CONFIG_TRACE_IRQFLAGS_SUPPORT=y
848# CONFIG_PRINTK_TIME is not set 909# CONFIG_PRINTK_TIME is not set
910CONFIG_ENABLE_MUST_CHECK=y
849# CONFIG_MAGIC_SYSRQ is not set 911# CONFIG_MAGIC_SYSRQ is not set
850# CONFIG_UNUSED_SYMBOLS is not set 912# CONFIG_UNUSED_SYMBOLS is not set
913# CONFIG_DEBUG_FS is not set
914# CONFIG_HEADERS_CHECK is not set
851# CONFIG_DEBUG_KERNEL is not set 915# CONFIG_DEBUG_KERNEL is not set
852CONFIG_LOG_BUF_SHIFT=14 916CONFIG_LOG_BUF_SHIFT=14
853# CONFIG_DEBUG_FS is not set
854CONFIG_CROSSCOMPILE=y 917CONFIG_CROSSCOMPILE=y
855CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.1.1:/mnt/disk2/fs.gal ip=192.168.1.211:192.168.1.1:::gt::" 918CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.1.1:/mnt/disk2/fs.gal ip=192.168.1.211:192.168.1.1:::gt::"
919CONFIG_SYS_SUPPORTS_KGDB=y
856 920
857# 921#
858# Security options 922# Security options
@@ -865,18 +929,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
865# Cryptographic options 929# Cryptographic options
866# 930#
867CONFIG_CRYPTO=y 931CONFIG_CRYPTO=y
932CONFIG_CRYPTO_ALGAPI=y
933CONFIG_CRYPTO_BLKCIPHER=m
934CONFIG_CRYPTO_HASH=y
935CONFIG_CRYPTO_MANAGER=y
868CONFIG_CRYPTO_HMAC=y 936CONFIG_CRYPTO_HMAC=y
937CONFIG_CRYPTO_XCBC=m
869CONFIG_CRYPTO_NULL=m 938CONFIG_CRYPTO_NULL=m
870CONFIG_CRYPTO_MD4=m 939CONFIG_CRYPTO_MD4=m
871CONFIG_CRYPTO_MD5=m 940CONFIG_CRYPTO_MD5=y
872CONFIG_CRYPTO_SHA1=m 941CONFIG_CRYPTO_SHA1=m
873CONFIG_CRYPTO_SHA256=m 942CONFIG_CRYPTO_SHA256=m
874CONFIG_CRYPTO_SHA512=m 943CONFIG_CRYPTO_SHA512=m
875CONFIG_CRYPTO_WP512=m 944CONFIG_CRYPTO_WP512=m
876CONFIG_CRYPTO_TGR192=m 945CONFIG_CRYPTO_TGR192=m
946CONFIG_CRYPTO_GF128MUL=m
947CONFIG_CRYPTO_ECB=m
948CONFIG_CRYPTO_CBC=m
949CONFIG_CRYPTO_PCBC=m
950CONFIG_CRYPTO_LRW=m
877CONFIG_CRYPTO_DES=m 951CONFIG_CRYPTO_DES=m
952CONFIG_CRYPTO_FCRYPT=m
878CONFIG_CRYPTO_BLOWFISH=m 953CONFIG_CRYPTO_BLOWFISH=m
879CONFIG_CRYPTO_TWOFISH=m 954CONFIG_CRYPTO_TWOFISH=m
955CONFIG_CRYPTO_TWOFISH_COMMON=m
880CONFIG_CRYPTO_SERPENT=m 956CONFIG_CRYPTO_SERPENT=m
881CONFIG_CRYPTO_AES=m 957CONFIG_CRYPTO_AES=m
882CONFIG_CRYPTO_CAST5=m 958CONFIG_CRYPTO_CAST5=m
@@ -888,6 +964,7 @@ CONFIG_CRYPTO_ANUBIS=m
888CONFIG_CRYPTO_DEFLATE=m 964CONFIG_CRYPTO_DEFLATE=m
889CONFIG_CRYPTO_MICHAEL_MIC=m 965CONFIG_CRYPTO_MICHAEL_MIC=m
890CONFIG_CRYPTO_CRC32C=m 966CONFIG_CRYPTO_CRC32C=m
967CONFIG_CRYPTO_CAMELLIA=m
891# CONFIG_CRYPTO_TEST is not set 968# CONFIG_CRYPTO_TEST is not set
892 969
893# 970#
@@ -897,6 +974,7 @@ CONFIG_CRYPTO_CRC32C=m
897# 974#
898# Library routines 975# Library routines
899# 976#
977CONFIG_BITREVERSE=m
900CONFIG_CRC_CCITT=y 978CONFIG_CRC_CCITT=y
901CONFIG_CRC16=m 979CONFIG_CRC16=m
902CONFIG_CRC32=m 980CONFIG_CRC32=m
@@ -904,3 +982,5 @@ CONFIG_LIBCRC32C=m
904CONFIG_ZLIB_INFLATE=m 982CONFIG_ZLIB_INFLATE=m
905CONFIG_ZLIB_DEFLATE=m 983CONFIG_ZLIB_DEFLATE=m
906CONFIG_PLIST=y 984CONFIG_PLIST=y
985CONFIG_HAS_IOMEM=y
986CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
index 697140c6562f..82f204d080b7 100644
--- a/arch/mips/configs/excite_defconfig
+++ b/arch/mips/configs/excite_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:09 2006 4# Tue Feb 20 21:47:31 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -26,8 +27,6 @@ CONFIG_BASLER_EXCITE=y
26# CONFIG_MIPS_COBALT is not set 27# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 28# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MIPS_EV64120 is not set 29# CONFIG_MIPS_EV64120 is not set
29# CONFIG_MIPS_IVR is not set
30# CONFIG_MIPS_ITE8172 is not set
31# CONFIG_MACH_JAZZ is not set 30# CONFIG_MACH_JAZZ is not set
32# CONFIG_LASAT is not set 31# CONFIG_LASAT is not set
33# CONFIG_MIPS_ATLAS is not set 32# CONFIG_MIPS_ATLAS is not set
@@ -43,6 +42,7 @@ CONFIG_BASLER_EXCITE=y
43# CONFIG_MIPS_XXS1500 is not set 42# CONFIG_MIPS_XXS1500 is not set
44# CONFIG_PNX8550_V2PCI is not set 43# CONFIG_PNX8550_V2PCI is not set
45# CONFIG_PNX8550_JBS is not set 44# CONFIG_PNX8550_JBS is not set
45# CONFIG_PNX8550_STB810 is not set
46# CONFIG_DDB5477 is not set 46# CONFIG_DDB5477 is not set
47# CONFIG_MACH_VR41XX is not set 47# CONFIG_MACH_VR41XX is not set
48# CONFIG_PMC_YOSEMITE is not set 48# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_BASLER_EXCITE=y
65# CONFIG_TOSHIBA_RBTX4927 is not set 65# CONFIG_TOSHIBA_RBTX4927 is not set
66# CONFIG_TOSHIBA_RBTX4938 is not set 66# CONFIG_TOSHIBA_RBTX4938 is not set
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_COHERENT=y 76CONFIG_DMA_COHERENT=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
74# CONFIG_CPU_LITTLE_ENDIAN is not set 78# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -76,6 +80,10 @@ CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
76CONFIG_IRQ_CPU=y 80CONFIG_IRQ_CPU=y
77CONFIG_IRQ_CPU_RM7K=y 81CONFIG_IRQ_CPU_RM7K=y
78CONFIG_IRQ_CPU_RM9K=y 82CONFIG_IRQ_CPU_RM9K=y
83CONFIG_MIPS_RM9122=y
84CONFIG_SERIAL_RM9000=y
85CONFIG_GPI_RM9000=y
86CONFIG_WDT_RM9000=y
79CONFIG_MIPS_L1_CACHE_SHIFT=5 87CONFIG_MIPS_L1_CACHE_SHIFT=5
80 88
81# 89#
@@ -101,6 +109,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
101CONFIG_CPU_RM9000=y 109CONFIG_CPU_RM9000=y
102# CONFIG_CPU_SB1 is not set 110# CONFIG_CPU_SB1 is not set
103CONFIG_SYS_HAS_CPU_RM9000=y 111CONFIG_SYS_HAS_CPU_RM9000=y
112CONFIG_WEAK_ORDERING=y
104CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 113CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
105CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 114CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
106CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 115CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -117,8 +126,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 126# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 127CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 128CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 129# CONFIG_MIPS_MT_SMP is not set
130# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 131# CONFIG_MIPS_VPE_LOADER is not set
123# CONFIG_64BIT_PHYS_ADDR is not set 132# CONFIG_64BIT_PHYS_ADDR is not set
124CONFIG_CPU_HAS_LLSC=y 133CONFIG_CPU_HAS_LLSC=y
@@ -136,6 +145,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 145# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 147# CONFIG_RESOURCES_64BIT is not set
148CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 149# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 150# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 151# CONFIG_HZ_128 is not set
@@ -149,6 +159,7 @@ CONFIG_HZ=1000
149# CONFIG_PREEMPT_VOLUNTARY is not set 159# CONFIG_PREEMPT_VOLUNTARY is not set
150CONFIG_PREEMPT=y 160CONFIG_PREEMPT=y
151CONFIG_PREEMPT_BKL=y 161CONFIG_PREEMPT_BKL=y
162# CONFIG_KEXEC is not set
152CONFIG_LOCKDEP_SUPPORT=y 163CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 164CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 165CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -168,15 +179,20 @@ CONFIG_LOCALVERSION=""
168# CONFIG_LOCALVERSION_AUTO is not set 179# CONFIG_LOCALVERSION_AUTO is not set
169CONFIG_SWAP=y 180CONFIG_SWAP=y
170CONFIG_SYSVIPC=y 181CONFIG_SYSVIPC=y
182# CONFIG_IPC_NS is not set
183CONFIG_SYSVIPC_SYSCTL=y
171CONFIG_POSIX_MQUEUE=y 184CONFIG_POSIX_MQUEUE=y
172# CONFIG_BSD_PROCESS_ACCT is not set 185# CONFIG_BSD_PROCESS_ACCT is not set
173CONFIG_SYSCTL=y 186# CONFIG_TASKSTATS is not set
187# CONFIG_UTS_NS is not set
174# CONFIG_AUDIT is not set 188# CONFIG_AUDIT is not set
175# CONFIG_IKCONFIG is not set 189# CONFIG_IKCONFIG is not set
190CONFIG_SYSFS_DEPRECATED=y
176# CONFIG_RELAY is not set 191# CONFIG_RELAY is not set
177CONFIG_INITRAMFS_SOURCE=""
178CONFIG_CC_OPTIMIZE_FOR_SIZE=y 192CONFIG_CC_OPTIMIZE_FOR_SIZE=y
193CONFIG_SYSCTL=y
179CONFIG_EMBEDDED=y 194CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y
180CONFIG_KALLSYMS=y 196CONFIG_KALLSYMS=y
181# CONFIG_KALLSYMS_EXTRA_PASS is not set 197# CONFIG_KALLSYMS_EXTRA_PASS is not set
182CONFIG_HOTPLUG=y 198CONFIG_HOTPLUG=y
@@ -184,12 +200,12 @@ CONFIG_PRINTK=y
184CONFIG_BUG=y 200CONFIG_BUG=y
185CONFIG_ELF_CORE=y 201CONFIG_ELF_CORE=y
186CONFIG_BASE_FULL=y 202CONFIG_BASE_FULL=y
187CONFIG_RT_MUTEXES=y
188CONFIG_FUTEX=y 203CONFIG_FUTEX=y
189CONFIG_EPOLL=y 204CONFIG_EPOLL=y
190CONFIG_SHMEM=y 205CONFIG_SHMEM=y
191CONFIG_SLAB=y 206CONFIG_SLAB=y
192CONFIG_VM_EVENT_COUNTERS=y 207CONFIG_VM_EVENT_COUNTERS=y
208CONFIG_RT_MUTEXES=y
193# CONFIG_TINY_SHMEM is not set 209# CONFIG_TINY_SHMEM is not set
194CONFIG_BASE_SMALL=0 210CONFIG_BASE_SMALL=0
195# CONFIG_SLOB is not set 211# CONFIG_SLOB is not set
@@ -207,6 +223,7 @@ CONFIG_KMOD=y
207# 223#
208# Block layer 224# Block layer
209# 225#
226CONFIG_BLOCK=y
210# CONFIG_LBD is not set 227# CONFIG_LBD is not set
211# CONFIG_BLK_DEV_IO_TRACE is not set 228# CONFIG_BLK_DEV_IO_TRACE is not set
212# CONFIG_LSF is not set 229# CONFIG_LSF is not set
@@ -249,6 +266,14 @@ CONFIG_BINFMT_ELF=y
249CONFIG_TRAD_SIGNALS=y 266CONFIG_TRAD_SIGNALS=y
250 267
251# 268#
269# Power management options
270#
271CONFIG_PM=y
272# CONFIG_PM_LEGACY is not set
273# CONFIG_PM_DEBUG is not set
274# CONFIG_PM_SYSFS_DEPRECATED is not set
275
276#
252# Networking 277# Networking
253# 278#
254CONFIG_NET=y 279CONFIG_NET=y
@@ -262,6 +287,8 @@ CONFIG_PACKET_MMAP=y
262CONFIG_UNIX=y 287CONFIG_UNIX=y
263CONFIG_XFRM=y 288CONFIG_XFRM=y
264# CONFIG_XFRM_USER is not set 289# CONFIG_XFRM_USER is not set
290# CONFIG_XFRM_SUB_POLICY is not set
291CONFIG_XFRM_MIGRATE=y
265# CONFIG_NET_KEY is not set 292# CONFIG_NET_KEY is not set
266CONFIG_INET=y 293CONFIG_INET=y
267# CONFIG_IP_MULTICAST is not set 294# CONFIG_IP_MULTICAST is not set
@@ -282,10 +309,13 @@ CONFIG_IP_PNP_DHCP=y
282# CONFIG_INET_TUNNEL is not set 309# CONFIG_INET_TUNNEL is not set
283CONFIG_INET_XFRM_MODE_TRANSPORT=m 310CONFIG_INET_XFRM_MODE_TRANSPORT=m
284CONFIG_INET_XFRM_MODE_TUNNEL=m 311CONFIG_INET_XFRM_MODE_TUNNEL=m
312CONFIG_INET_XFRM_MODE_BEET=m
285CONFIG_INET_DIAG=y 313CONFIG_INET_DIAG=y
286CONFIG_INET_TCP_DIAG=y 314CONFIG_INET_TCP_DIAG=y
287# CONFIG_TCP_CONG_ADVANCED is not set 315# CONFIG_TCP_CONG_ADVANCED is not set
288CONFIG_TCP_CONG_BIC=y 316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y
289# CONFIG_IPV6 is not set 319# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set 320# CONFIG_INET6_XFRM_TUNNEL is not set
291# CONFIG_INET6_TUNNEL is not set 321# CONFIG_INET6_TUNNEL is not set
@@ -315,7 +345,6 @@ CONFIG_NETWORK_SECMARK=y
315# CONFIG_ATALK is not set 345# CONFIG_ATALK is not set
316# CONFIG_X25 is not set 346# CONFIG_X25 is not set
317# CONFIG_LAPB is not set 347# CONFIG_LAPB is not set
318# CONFIG_NET_DIVERT is not set
319# CONFIG_ECONET is not set 348# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set 349# CONFIG_WAN_ROUTER is not set
321 350
@@ -342,7 +371,7 @@ CONFIG_NETWORK_SECMARK=y
342# 371#
343CONFIG_STANDALONE=y 372CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y 373CONFIG_PREVENT_FIRMWARE_BUILD=y
345# CONFIG_FW_LOADER is not set 374CONFIG_FW_LOADER=m
346# CONFIG_SYS_HYPERVISOR is not set 375# CONFIG_SYS_HYPERVISOR is not set
347 376
348# 377#
@@ -364,11 +393,13 @@ CONFIG_MTD_PARTITIONS=y
364# User Modules And Translation Layers 393# User Modules And Translation Layers
365# 394#
366CONFIG_MTD_CHAR=y 395CONFIG_MTD_CHAR=y
396CONFIG_MTD_BLKDEVS=y
367CONFIG_MTD_BLOCK=y 397CONFIG_MTD_BLOCK=y
368# CONFIG_FTL is not set 398# CONFIG_FTL is not set
369# CONFIG_NFTL is not set 399# CONFIG_NFTL is not set
370# CONFIG_INFTL is not set 400# CONFIG_INFTL is not set
371# CONFIG_RFD_FTL is not set 401# CONFIG_RFD_FTL is not set
402# CONFIG_SSFDC is not set
372 403
373# 404#
374# RAM/ROM/Flash chip drivers 405# RAM/ROM/Flash chip drivers
@@ -420,6 +451,8 @@ CONFIG_MTD_NAND_VERIFY_WRITE=y
420# CONFIG_MTD_NAND_ECC_SMC is not set 451# CONFIG_MTD_NAND_ECC_SMC is not set
421CONFIG_MTD_NAND_IDS=y 452CONFIG_MTD_NAND_IDS=y
422# CONFIG_MTD_NAND_DISKONCHIP is not set 453# CONFIG_MTD_NAND_DISKONCHIP is not set
454# CONFIG_MTD_NAND_BASLER_EXCITE is not set
455# CONFIG_MTD_NAND_CAFE is not set
423# CONFIG_MTD_NAND_NANDSIM is not set 456# CONFIG_MTD_NAND_NANDSIM is not set
424 457
425# 458#
@@ -435,6 +468,7 @@ CONFIG_MTD_NAND_IDS=y
435# 468#
436# Plug and Play support 469# Plug and Play support
437# 470#
471# CONFIG_PNPACPI is not set
438 472
439# 473#
440# Block devices 474# Block devices
@@ -455,6 +489,12 @@ CONFIG_BLK_DEV_LOOP=m
455# CONFIG_ATA_OVER_ETH is not set 489# CONFIG_ATA_OVER_ETH is not set
456 490
457# 491#
492# Misc devices
493#
494CONFIG_SGI_IOC4=m
495# CONFIG_TIFM_CORE is not set
496
497#
458# ATA/ATAPI/MFM/RLL support 498# ATA/ATAPI/MFM/RLL support
459# 499#
460# CONFIG_IDE is not set 500# CONFIG_IDE is not set
@@ -464,6 +504,8 @@ CONFIG_BLK_DEV_LOOP=m
464# 504#
465# CONFIG_RAID_ATTRS is not set 505# CONFIG_RAID_ATTRS is not set
466CONFIG_SCSI=y 506CONFIG_SCSI=y
507CONFIG_SCSI_TGT=m
508# CONFIG_SCSI_NETLINK is not set
467# CONFIG_SCSI_PROC_FS is not set 509# CONFIG_SCSI_PROC_FS is not set
468 510
469# 511#
@@ -482,14 +524,17 @@ CONFIG_BLK_DEV_SD=y
482# CONFIG_SCSI_MULTI_LUN is not set 524# CONFIG_SCSI_MULTI_LUN is not set
483# CONFIG_SCSI_CONSTANTS is not set 525# CONFIG_SCSI_CONSTANTS is not set
484# CONFIG_SCSI_LOGGING is not set 526# CONFIG_SCSI_LOGGING is not set
527CONFIG_SCSI_SCAN_ASYNC=y
485 528
486# 529#
487# SCSI Transport Attributes 530# SCSI Transports
488# 531#
489# CONFIG_SCSI_SPI_ATTRS is not set 532# CONFIG_SCSI_SPI_ATTRS is not set
490# CONFIG_SCSI_FC_ATTRS is not set 533# CONFIG_SCSI_FC_ATTRS is not set
491# CONFIG_SCSI_ISCSI_ATTRS is not set 534# CONFIG_SCSI_ISCSI_ATTRS is not set
492# CONFIG_SCSI_SAS_ATTRS is not set 535CONFIG_SCSI_SAS_ATTRS=m
536CONFIG_SCSI_SAS_LIBSAS=m
537# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
493 538
494# 539#
495# SCSI low-level drivers 540# SCSI low-level drivers
@@ -502,26 +547,35 @@ CONFIG_BLK_DEV_SD=y
502# CONFIG_SCSI_AIC7XXX is not set 547# CONFIG_SCSI_AIC7XXX is not set
503# CONFIG_SCSI_AIC7XXX_OLD is not set 548# CONFIG_SCSI_AIC7XXX_OLD is not set
504# CONFIG_SCSI_AIC79XX is not set 549# CONFIG_SCSI_AIC79XX is not set
550CONFIG_SCSI_AIC94XX=m
551# CONFIG_AIC94XX_DEBUG is not set
505# CONFIG_SCSI_DPT_I2O is not set 552# CONFIG_SCSI_DPT_I2O is not set
553# CONFIG_SCSI_ARCMSR is not set
506# CONFIG_MEGARAID_NEWGEN is not set 554# CONFIG_MEGARAID_NEWGEN is not set
507# CONFIG_MEGARAID_LEGACY is not set 555# CONFIG_MEGARAID_LEGACY is not set
508# CONFIG_MEGARAID_SAS is not set 556# CONFIG_MEGARAID_SAS is not set
509# CONFIG_SCSI_SATA is not set
510# CONFIG_SCSI_HPTIOP is not set 557# CONFIG_SCSI_HPTIOP is not set
511# CONFIG_SCSI_DMX3191D is not set 558# CONFIG_SCSI_DMX3191D is not set
512# CONFIG_SCSI_FUTURE_DOMAIN is not set 559# CONFIG_SCSI_FUTURE_DOMAIN is not set
513# CONFIG_SCSI_IPS is not set 560# CONFIG_SCSI_IPS is not set
514# CONFIG_SCSI_INITIO is not set 561# CONFIG_SCSI_INITIO is not set
515# CONFIG_SCSI_INIA100 is not set 562# CONFIG_SCSI_INIA100 is not set
563# CONFIG_SCSI_STEX is not set
516# CONFIG_SCSI_SYM53C8XX_2 is not set 564# CONFIG_SCSI_SYM53C8XX_2 is not set
517# CONFIG_SCSI_IPR is not set
518# CONFIG_SCSI_QLOGIC_1280 is not set 565# CONFIG_SCSI_QLOGIC_1280 is not set
519# CONFIG_SCSI_QLA_FC is not set 566# CONFIG_SCSI_QLA_FC is not set
567# CONFIG_SCSI_QLA_ISCSI is not set
520# CONFIG_SCSI_LPFC is not set 568# CONFIG_SCSI_LPFC is not set
521# CONFIG_SCSI_DC395x is not set 569# CONFIG_SCSI_DC395x is not set
522# CONFIG_SCSI_DC390T is not set 570# CONFIG_SCSI_DC390T is not set
523# CONFIG_SCSI_NSP32 is not set 571# CONFIG_SCSI_NSP32 is not set
524# CONFIG_SCSI_DEBUG is not set 572# CONFIG_SCSI_DEBUG is not set
573# CONFIG_SCSI_SRP is not set
574
575#
576# Serial ATA (prod) and Parallel ATA (experimental) drivers
577#
578# CONFIG_ATA is not set
525 579
526# 580#
527# Multi-device support (RAID and LVM) 581# Multi-device support (RAID and LVM)
@@ -585,14 +639,18 @@ CONFIG_NETDEVICES=y
585# CONFIG_SK98LIN is not set 639# CONFIG_SK98LIN is not set
586# CONFIG_TIGON3 is not set 640# CONFIG_TIGON3 is not set
587# CONFIG_BNX2 is not set 641# CONFIG_BNX2 is not set
642CONFIG_QLA3XXX=m
643# CONFIG_ATL1 is not set
588 644
589# 645#
590# Ethernet (10000 Mbit) 646# Ethernet (10000 Mbit)
591# 647#
592# CONFIG_CHELSIO_T1 is not set 648# CONFIG_CHELSIO_T1 is not set
649CONFIG_CHELSIO_T3=m
593# CONFIG_IXGB is not set 650# CONFIG_IXGB is not set
594# CONFIG_S2IO is not set 651# CONFIG_S2IO is not set
595# CONFIG_MYRI10GE is not set 652# CONFIG_MYRI10GE is not set
653CONFIG_NETXEN_NIC=m
596 654
597# 655#
598# Token Ring devices 656# Token Ring devices
@@ -632,6 +690,7 @@ CONFIG_NETDEVICES=y
632# Input device support 690# Input device support
633# 691#
634CONFIG_INPUT=y 692CONFIG_INPUT=y
693# CONFIG_INPUT_FF_MEMLESS is not set
635 694
636# 695#
637# Userland interfaces 696# Userland interfaces
@@ -707,6 +766,7 @@ CONFIG_WATCHDOG=y
707# Watchdog Device Drivers 766# Watchdog Device Drivers
708# 767#
709# CONFIG_SOFT_WATCHDOG is not set 768# CONFIG_SOFT_WATCHDOG is not set
769CONFIG_WDT_RM9K_GPI=m
710 770
711# 771#
712# PCI-based Watchdog Cards 772# PCI-based Watchdog Cards
@@ -724,10 +784,6 @@ CONFIG_WATCHDOG=y
724# CONFIG_DTLK is not set 784# CONFIG_DTLK is not set
725# CONFIG_R3964 is not set 785# CONFIG_R3964 is not set
726# CONFIG_APPLICOM is not set 786# CONFIG_APPLICOM is not set
727
728#
729# Ftape, the floppy tape device driver
730#
731# CONFIG_DRM is not set 787# CONFIG_DRM is not set
732# CONFIG_RAW_DRIVER is not set 788# CONFIG_RAW_DRIVER is not set
733 789
@@ -735,7 +791,6 @@ CONFIG_WATCHDOG=y
735# TPM devices 791# TPM devices
736# 792#
737# CONFIG_TCG_TPM is not set 793# CONFIG_TCG_TPM is not set
738# CONFIG_TELCLOCK is not set
739 794
740# 795#
741# I2C support 796# I2C support
@@ -751,6 +806,7 @@ CONFIG_WATCHDOG=y
751# 806#
752# Dallas's 1-wire bus 807# Dallas's 1-wire bus
753# 808#
809# CONFIG_W1 is not set
754 810
755# 811#
756# Hardware Monitoring support 812# Hardware Monitoring support
@@ -759,14 +815,9 @@ CONFIG_WATCHDOG=y
759# CONFIG_HWMON_VID is not set 815# CONFIG_HWMON_VID is not set
760 816
761# 817#
762# Misc devices
763#
764
765#
766# Multimedia devices 818# Multimedia devices
767# 819#
768# CONFIG_VIDEO_DEV is not set 820# CONFIG_VIDEO_DEV is not set
769CONFIG_VIDEO_V4L2=y
770 821
771# 822#
772# Digital Video Broadcasting Devices 823# Digital Video Broadcasting Devices
@@ -782,6 +833,7 @@ CONFIG_FB=y
782# CONFIG_FB_CFB_FILLRECT is not set 833# CONFIG_FB_CFB_FILLRECT is not set
783# CONFIG_FB_CFB_COPYAREA is not set 834# CONFIG_FB_CFB_COPYAREA is not set
784# CONFIG_FB_CFB_IMAGEBLIT is not set 835# CONFIG_FB_CFB_IMAGEBLIT is not set
836# CONFIG_FB_SVGALIB is not set
785# CONFIG_FB_MACMODES is not set 837# CONFIG_FB_MACMODES is not set
786# CONFIG_FB_BACKLIGHT is not set 838# CONFIG_FB_BACKLIGHT is not set
787# CONFIG_FB_MODE_HELPERS is not set 839# CONFIG_FB_MODE_HELPERS is not set
@@ -798,6 +850,7 @@ CONFIG_FB=y
798# CONFIG_FB_RADEON is not set 850# CONFIG_FB_RADEON is not set
799# CONFIG_FB_ATY128 is not set 851# CONFIG_FB_ATY128 is not set
800# CONFIG_FB_ATY is not set 852# CONFIG_FB_ATY is not set
853# CONFIG_FB_S3 is not set
801# CONFIG_FB_SAVAGE is not set 854# CONFIG_FB_SAVAGE is not set
802# CONFIG_FB_SIS is not set 855# CONFIG_FB_SIS is not set
803# CONFIG_FB_NEOMAGIC is not set 856# CONFIG_FB_NEOMAGIC is not set
@@ -831,6 +884,12 @@ CONFIG_FONT_8x16=y
831# CONFIG_SOUND is not set 884# CONFIG_SOUND is not set
832 885
833# 886#
887# HID Devices
888#
889CONFIG_HID=y
890# CONFIG_HID_DEBUG is not set
891
892#
834# USB support 893# USB support
835# 894#
836CONFIG_USB_ARCH_HAS_HCD=y 895CONFIG_USB_ARCH_HAS_HCD=y
@@ -843,8 +902,8 @@ CONFIG_USB=y
843# Miscellaneous USB options 902# Miscellaneous USB options
844# 903#
845CONFIG_USB_DEVICEFS=y 904CONFIG_USB_DEVICEFS=y
846# CONFIG_USB_BANDWIDTH is not set
847# CONFIG_USB_DYNAMIC_MINORS is not set 905# CONFIG_USB_DYNAMIC_MINORS is not set
906# CONFIG_USB_SUSPEND is not set
848# CONFIG_USB_OTG is not set 907# CONFIG_USB_OTG is not set
849 908
850# 909#
@@ -854,9 +913,11 @@ CONFIG_USB_EHCI_HCD=y
854# CONFIG_USB_EHCI_SPLIT_ISO is not set 913# CONFIG_USB_EHCI_SPLIT_ISO is not set
855# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 914# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
856# CONFIG_USB_EHCI_TT_NEWSCHED is not set 915# CONFIG_USB_EHCI_TT_NEWSCHED is not set
916# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
857# CONFIG_USB_ISP116X_HCD is not set 917# CONFIG_USB_ISP116X_HCD is not set
858CONFIG_USB_OHCI_HCD=y 918CONFIG_USB_OHCI_HCD=y
859# CONFIG_USB_OHCI_BIG_ENDIAN is not set 919# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
920# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
860CONFIG_USB_OHCI_LITTLE_ENDIAN=y 921CONFIG_USB_OHCI_LITTLE_ENDIAN=y
861# CONFIG_USB_UHCI_HCD is not set 922# CONFIG_USB_UHCI_HCD is not set
862# CONFIG_USB_SL811_HCD is not set 923# CONFIG_USB_SL811_HCD is not set
@@ -884,14 +945,13 @@ CONFIG_USB_STORAGE=y
884# CONFIG_USB_STORAGE_SDDR55 is not set 945# CONFIG_USB_STORAGE_SDDR55 is not set
885# CONFIG_USB_STORAGE_JUMPSHOT is not set 946# CONFIG_USB_STORAGE_JUMPSHOT is not set
886# CONFIG_USB_STORAGE_ALAUDA is not set 947# CONFIG_USB_STORAGE_ALAUDA is not set
887# CONFIG_USB_STORAGE_ONETOUCH is not set 948# CONFIG_USB_STORAGE_KARMA is not set
888# CONFIG_USB_LIBUSUAL is not set 949# CONFIG_USB_LIBUSUAL is not set
889 950
890# 951#
891# USB Input Devices 952# USB Input Devices
892# 953#
893CONFIG_USB_HID=m 954CONFIG_USB_HID=m
894CONFIG_USB_HIDINPUT=y
895# CONFIG_USB_HIDINPUT_POWERBOOK is not set 955# CONFIG_USB_HIDINPUT_POWERBOOK is not set
896# CONFIG_HID_FF is not set 956# CONFIG_HID_FF is not set
897# CONFIG_USB_HIDDEV is not set 957# CONFIG_USB_HIDDEV is not set
@@ -913,6 +973,7 @@ CONFIG_USB_HIDINPUT=y
913# CONFIG_USB_ATI_REMOTE2 is not set 973# CONFIG_USB_ATI_REMOTE2 is not set
914# CONFIG_USB_KEYSPAN_REMOTE is not set 974# CONFIG_USB_KEYSPAN_REMOTE is not set
915# CONFIG_USB_APPLETOUCH is not set 975# CONFIG_USB_APPLETOUCH is not set
976# CONFIG_USB_GTCO is not set
916 977
917# 978#
918# USB Imaging devices 979# USB Imaging devices
@@ -927,6 +988,7 @@ CONFIG_USB_HIDINPUT=y
927# CONFIG_USB_KAWETH is not set 988# CONFIG_USB_KAWETH is not set
928# CONFIG_USB_PEGASUS is not set 989# CONFIG_USB_PEGASUS is not set
929# CONFIG_USB_RTL8150 is not set 990# CONFIG_USB_RTL8150 is not set
991# CONFIG_USB_USBNET_MII is not set
930# CONFIG_USB_USBNET is not set 992# CONFIG_USB_USBNET is not set
931# CONFIG_USB_MON is not set 993# CONFIG_USB_MON is not set
932 994
@@ -944,19 +1006,22 @@ CONFIG_USB_HIDINPUT=y
944# 1006#
945# CONFIG_USB_EMI62 is not set 1007# CONFIG_USB_EMI62 is not set
946# CONFIG_USB_EMI26 is not set 1008# CONFIG_USB_EMI26 is not set
1009# CONFIG_USB_ADUTUX is not set
947# CONFIG_USB_AUERSWALD is not set 1010# CONFIG_USB_AUERSWALD is not set
948# CONFIG_USB_RIO500 is not set 1011# CONFIG_USB_RIO500 is not set
949# CONFIG_USB_LEGOTOWER is not set 1012# CONFIG_USB_LEGOTOWER is not set
950# CONFIG_USB_LCD is not set 1013# CONFIG_USB_LCD is not set
1014# CONFIG_USB_BERRY_CHARGE is not set
951# CONFIG_USB_LED is not set 1015# CONFIG_USB_LED is not set
952# CONFIG_USB_CY7C63 is not set 1016# CONFIG_USB_CYPRESS_CY7C63 is not set
953# CONFIG_USB_CYTHERM is not set 1017# CONFIG_USB_CYTHERM is not set
954# CONFIG_USB_PHIDGETKIT is not set 1018# CONFIG_USB_PHIDGET is not set
955# CONFIG_USB_PHIDGETSERVO is not set
956# CONFIG_USB_IDMOUSE is not set 1019# CONFIG_USB_IDMOUSE is not set
1020# CONFIG_USB_FTDI_ELAN is not set
957# CONFIG_USB_APPLEDISPLAY is not set 1021# CONFIG_USB_APPLEDISPLAY is not set
958# CONFIG_USB_SISUSBVGA is not set 1022# CONFIG_USB_SISUSBVGA is not set
959# CONFIG_USB_LD is not set 1023# CONFIG_USB_LD is not set
1024# CONFIG_USB_TRANCEVIBRATOR is not set
960# CONFIG_USB_TEST is not set 1025# CONFIG_USB_TEST is not set
961 1026
962# 1027#
@@ -1014,16 +1079,26 @@ CONFIG_USB_HIDINPUT=y
1014# 1079#
1015 1080
1016# 1081#
1082# Auxiliary Display support
1083#
1084
1085#
1086# Virtualization
1087#
1088
1089#
1017# File systems 1090# File systems
1018# 1091#
1019CONFIG_EXT2_FS=y 1092CONFIG_EXT2_FS=y
1020# CONFIG_EXT2_FS_XATTR is not set 1093# CONFIG_EXT2_FS_XATTR is not set
1021# CONFIG_EXT2_FS_XIP is not set 1094# CONFIG_EXT2_FS_XIP is not set
1022# CONFIG_EXT3_FS is not set 1095# CONFIG_EXT3_FS is not set
1096# CONFIG_EXT4DEV_FS is not set
1023# CONFIG_REISERFS_FS is not set 1097# CONFIG_REISERFS_FS is not set
1024# CONFIG_JFS_FS is not set 1098# CONFIG_JFS_FS is not set
1025# CONFIG_FS_POSIX_ACL is not set 1099CONFIG_FS_POSIX_ACL=y
1026# CONFIG_XFS_FS is not set 1100# CONFIG_XFS_FS is not set
1101# CONFIG_GFS2_FS is not set
1027# CONFIG_OCFS2_FS is not set 1102# CONFIG_OCFS2_FS is not set
1028# CONFIG_MINIX_FS is not set 1103# CONFIG_MINIX_FS is not set
1029# CONFIG_ROMFS_FS is not set 1104# CONFIG_ROMFS_FS is not set
@@ -1034,6 +1109,7 @@ CONFIG_INOTIFY_USER=y
1034# CONFIG_AUTOFS_FS is not set 1109# CONFIG_AUTOFS_FS is not set
1035# CONFIG_AUTOFS4_FS is not set 1110# CONFIG_AUTOFS4_FS is not set
1036# CONFIG_FUSE_FS is not set 1111# CONFIG_FUSE_FS is not set
1112CONFIG_GENERIC_ACL=y
1037 1113
1038# 1114#
1039# CD-ROM/DVD Filesystems 1115# CD-ROM/DVD Filesystems
@@ -1056,11 +1132,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1056# 1132#
1057CONFIG_PROC_FS=y 1133CONFIG_PROC_FS=y
1058CONFIG_PROC_KCORE=y 1134CONFIG_PROC_KCORE=y
1135CONFIG_PROC_SYSCTL=y
1059CONFIG_SYSFS=y 1136CONFIG_SYSFS=y
1060CONFIG_TMPFS=y 1137CONFIG_TMPFS=y
1138CONFIG_TMPFS_POSIX_ACL=y
1061# CONFIG_HUGETLB_PAGE is not set 1139# CONFIG_HUGETLB_PAGE is not set
1062CONFIG_RAMFS=y 1140CONFIG_RAMFS=y
1063# CONFIG_CONFIGFS_FS is not set 1141CONFIG_CONFIGFS_FS=m
1064 1142
1065# 1143#
1066# Miscellaneous filesystems 1144# Miscellaneous filesystems
@@ -1072,7 +1150,6 @@ CONFIG_RAMFS=y
1072# CONFIG_BEFS_FS is not set 1150# CONFIG_BEFS_FS is not set
1073# CONFIG_BFS_FS is not set 1151# CONFIG_BFS_FS is not set
1074# CONFIG_EFS_FS is not set 1152# CONFIG_EFS_FS is not set
1075# CONFIG_JFFS_FS is not set
1076CONFIG_JFFS2_FS=y 1153CONFIG_JFFS2_FS=y
1077CONFIG_JFFS2_FS_DEBUG=0 1154CONFIG_JFFS2_FS_DEBUG=0
1078CONFIG_JFFS2_FS_WRITEBUFFER=y 1155CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1107,7 +1184,6 @@ CONFIG_SUNRPC=y
1107# CONFIG_RPCSEC_GSS_SPKM3 is not set 1184# CONFIG_RPCSEC_GSS_SPKM3 is not set
1108# CONFIG_SMB_FS is not set 1185# CONFIG_SMB_FS is not set
1109# CONFIG_CIFS is not set 1186# CONFIG_CIFS is not set
1110# CONFIG_CIFS_DEBUG2 is not set
1111# CONFIG_NCP_FS is not set 1187# CONFIG_NCP_FS is not set
1112# CONFIG_CODA_FS is not set 1188# CONFIG_CODA_FS is not set
1113# CONFIG_AFS_FS is not set 1189# CONFIG_AFS_FS is not set
@@ -1179,6 +1255,14 @@ CONFIG_NLS_ISO8859_1=m
1179# CONFIG_NLS_UTF8 is not set 1255# CONFIG_NLS_UTF8 is not set
1180 1256
1181# 1257#
1258# Distributed Lock Manager
1259#
1260CONFIG_DLM=m
1261CONFIG_DLM_TCP=y
1262# CONFIG_DLM_SCTP is not set
1263# CONFIG_DLM_DEBUG is not set
1264
1265#
1182# Profiling support 1266# Profiling support
1183# 1267#
1184# CONFIG_PROFILING is not set 1268# CONFIG_PROFILING is not set
@@ -1188,13 +1272,16 @@ CONFIG_NLS_ISO8859_1=m
1188# 1272#
1189CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1273CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1190# CONFIG_PRINTK_TIME is not set 1274# CONFIG_PRINTK_TIME is not set
1275CONFIG_ENABLE_MUST_CHECK=y
1191# CONFIG_MAGIC_SYSRQ is not set 1276# CONFIG_MAGIC_SYSRQ is not set
1192# CONFIG_UNUSED_SYMBOLS is not set 1277# CONFIG_UNUSED_SYMBOLS is not set
1278# CONFIG_DEBUG_FS is not set
1279# CONFIG_HEADERS_CHECK is not set
1193# CONFIG_DEBUG_KERNEL is not set 1280# CONFIG_DEBUG_KERNEL is not set
1194CONFIG_LOG_BUF_SHIFT=14 1281CONFIG_LOG_BUF_SHIFT=14
1195# CONFIG_DEBUG_FS is not set
1196CONFIG_CROSSCOMPILE=y 1282CONFIG_CROSSCOMPILE=y
1197CONFIG_CMDLINE="" 1283CONFIG_CMDLINE=""
1284CONFIG_SYS_SUPPORTS_KGDB=y
1198 1285
1199# 1286#
1200# Security options 1287# Security options
@@ -1206,16 +1293,27 @@ CONFIG_CMDLINE=""
1206# Cryptographic options 1293# Cryptographic options
1207# 1294#
1208CONFIG_CRYPTO=y 1295CONFIG_CRYPTO=y
1296CONFIG_CRYPTO_ALGAPI=y
1297CONFIG_CRYPTO_BLKCIPHER=m
1298CONFIG_CRYPTO_HASH=m
1299CONFIG_CRYPTO_MANAGER=m
1209# CONFIG_CRYPTO_HMAC is not set 1300# CONFIG_CRYPTO_HMAC is not set
1301CONFIG_CRYPTO_XCBC=m
1210# CONFIG_CRYPTO_NULL is not set 1302# CONFIG_CRYPTO_NULL is not set
1211# CONFIG_CRYPTO_MD4 is not set 1303# CONFIG_CRYPTO_MD4 is not set
1212# CONFIG_CRYPTO_MD5 is not set 1304CONFIG_CRYPTO_MD5=y
1213# CONFIG_CRYPTO_SHA1 is not set 1305# CONFIG_CRYPTO_SHA1 is not set
1214# CONFIG_CRYPTO_SHA256 is not set 1306# CONFIG_CRYPTO_SHA256 is not set
1215# CONFIG_CRYPTO_SHA512 is not set 1307# CONFIG_CRYPTO_SHA512 is not set
1216# CONFIG_CRYPTO_WP512 is not set 1308# CONFIG_CRYPTO_WP512 is not set
1217# CONFIG_CRYPTO_TGR192 is not set 1309# CONFIG_CRYPTO_TGR192 is not set
1310CONFIG_CRYPTO_GF128MUL=m
1311CONFIG_CRYPTO_ECB=m
1312CONFIG_CRYPTO_CBC=m
1313CONFIG_CRYPTO_PCBC=m
1314CONFIG_CRYPTO_LRW=m
1218# CONFIG_CRYPTO_DES is not set 1315# CONFIG_CRYPTO_DES is not set
1316CONFIG_CRYPTO_FCRYPT=m
1219# CONFIG_CRYPTO_BLOWFISH is not set 1317# CONFIG_CRYPTO_BLOWFISH is not set
1220# CONFIG_CRYPTO_TWOFISH is not set 1318# CONFIG_CRYPTO_TWOFISH is not set
1221# CONFIG_CRYPTO_SERPENT is not set 1319# CONFIG_CRYPTO_SERPENT is not set
@@ -1229,6 +1327,7 @@ CONFIG_CRYPTO=y
1229# CONFIG_CRYPTO_DEFLATE is not set 1327# CONFIG_CRYPTO_DEFLATE is not set
1230# CONFIG_CRYPTO_MICHAEL_MIC is not set 1328# CONFIG_CRYPTO_MICHAEL_MIC is not set
1231# CONFIG_CRYPTO_CRC32C is not set 1329# CONFIG_CRYPTO_CRC32C is not set
1330CONFIG_CRYPTO_CAMELLIA=m
1232# CONFIG_CRYPTO_TEST is not set 1331# CONFIG_CRYPTO_TEST is not set
1233 1332
1234# 1333#
@@ -1238,6 +1337,7 @@ CONFIG_CRYPTO=y
1238# 1337#
1239# Library routines 1338# Library routines
1240# 1339#
1340CONFIG_BITREVERSE=y
1241# CONFIG_CRC_CCITT is not set 1341# CONFIG_CRC_CCITT is not set
1242# CONFIG_CRC16 is not set 1342# CONFIG_CRC16 is not set
1243CONFIG_CRC32=y 1343CONFIG_CRC32=y
@@ -1245,3 +1345,5 @@ CONFIG_CRC32=y
1245CONFIG_ZLIB_INFLATE=y 1345CONFIG_ZLIB_INFLATE=y
1246CONFIG_ZLIB_DEFLATE=y 1346CONFIG_ZLIB_DEFLATE=y
1247CONFIG_PLIST=y 1347CONFIG_PLIST=y
1348CONFIG_HAS_IOMEM=y
1349CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index f9812d1e4579..cb81f13bd45a 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:10 2006 4# Tue Feb 20 21:47:32 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,13 +64,18 @@ CONFIG_SGI_IP22=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_ARC=y 75CONFIG_ARC=y
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
78CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
74CONFIG_CPU_BIG_ENDIAN=y 79CONFIG_CPU_BIG_ENDIAN=y
75# CONFIG_CPU_LITTLE_ENDIAN is not set 80# CONFIG_CPU_LITTLE_ENDIAN is not set
76CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 81CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -123,8 +128,8 @@ CONFIG_PAGE_SIZE_4KB=y
123CONFIG_BOARD_SCACHE=y 128CONFIG_BOARD_SCACHE=y
124CONFIG_IP22_CPU_SCACHE=y 129CONFIG_IP22_CPU_SCACHE=y
125CONFIG_MIPS_MT_DISABLED=y 130CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 131# CONFIG_MIPS_MT_SMP is not set
132# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 133# CONFIG_MIPS_VPE_LOADER is not set
129# CONFIG_64BIT_PHYS_ADDR is not set 134# CONFIG_64BIT_PHYS_ADDR is not set
130CONFIG_CPU_HAS_LLSC=y 135CONFIG_CPU_HAS_LLSC=y
@@ -141,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
143# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 150# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 152# CONFIG_HZ_128 is not set
@@ -153,6 +159,7 @@ CONFIG_HZ=1000
153# CONFIG_PREEMPT_NONE is not set 159# CONFIG_PREEMPT_NONE is not set
154CONFIG_PREEMPT_VOLUNTARY=y 160CONFIG_PREEMPT_VOLUNTARY=y
155# CONFIG_PREEMPT is not set 161# CONFIG_PREEMPT is not set
162# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y 163CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y 164CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 165CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,16 +178,21 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 178CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 179CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 180CONFIG_SYSVIPC=y
181# CONFIG_IPC_NS is not set
182CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_POSIX_MQUEUE is not set 183# CONFIG_POSIX_MQUEUE is not set
175# CONFIG_BSD_PROCESS_ACCT is not set 184# CONFIG_BSD_PROCESS_ACCT is not set
176CONFIG_SYSCTL=y 185# CONFIG_TASKSTATS is not set
186# CONFIG_UTS_NS is not set
177# CONFIG_AUDIT is not set 187# CONFIG_AUDIT is not set
178CONFIG_IKCONFIG=y 188CONFIG_IKCONFIG=y
179CONFIG_IKCONFIG_PROC=y 189CONFIG_IKCONFIG_PROC=y
190CONFIG_SYSFS_DEPRECATED=y
180CONFIG_RELAY=y 191CONFIG_RELAY=y
181CONFIG_INITRAMFS_SOURCE=""
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
193CONFIG_SYSCTL=y
183CONFIG_EMBEDDED=y 194CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y
184CONFIG_KALLSYMS=y 196CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 197# CONFIG_KALLSYMS_EXTRA_PASS is not set
186# CONFIG_HOTPLUG is not set 198# CONFIG_HOTPLUG is not set
@@ -188,12 +200,12 @@ CONFIG_PRINTK=y
188CONFIG_BUG=y 200CONFIG_BUG=y
189CONFIG_ELF_CORE=y 201CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 202CONFIG_BASE_FULL=y
191CONFIG_RT_MUTEXES=y
192CONFIG_FUTEX=y 203CONFIG_FUTEX=y
193CONFIG_EPOLL=y 204CONFIG_EPOLL=y
194CONFIG_SHMEM=y 205CONFIG_SHMEM=y
195CONFIG_SLAB=y 206CONFIG_SLAB=y
196CONFIG_VM_EVENT_COUNTERS=y 207CONFIG_VM_EVENT_COUNTERS=y
208CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 209# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 210CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set 211# CONFIG_SLOB is not set
@@ -211,6 +223,7 @@ CONFIG_KMOD=y
211# 223#
212# Block layer 224# Block layer
213# 225#
226CONFIG_BLOCK=y
214# CONFIG_LBD is not set 227# CONFIG_LBD is not set
215# CONFIG_BLK_DEV_IO_TRACE is not set 228# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_LSF is not set 229# CONFIG_LSF is not set
@@ -238,7 +251,6 @@ CONFIG_MMU=y
238# 251#
239# PCCARD (PCMCIA/CardBus) support 252# PCCARD (PCMCIA/CardBus) support
240# 253#
241# CONFIG_PCCARD is not set
242 254
243# 255#
244# PCI Hotplug Support 256# PCI Hotplug Support
@@ -252,6 +264,14 @@ CONFIG_BINFMT_MISC=m
252CONFIG_TRAD_SIGNALS=y 264CONFIG_TRAD_SIGNALS=y
253 265
254# 266#
267# Power management options
268#
269CONFIG_PM=y
270# CONFIG_PM_LEGACY is not set
271# CONFIG_PM_DEBUG is not set
272# CONFIG_PM_SYSFS_DEPRECATED is not set
273
274#
255# Networking 275# Networking
256# 276#
257CONFIG_NET=y 277CONFIG_NET=y
@@ -265,7 +285,10 @@ CONFIG_PACKET_MMAP=y
265CONFIG_UNIX=y 285CONFIG_UNIX=y
266CONFIG_XFRM=y 286CONFIG_XFRM=y
267CONFIG_XFRM_USER=m 287CONFIG_XFRM_USER=m
288# CONFIG_XFRM_SUB_POLICY is not set
289CONFIG_XFRM_MIGRATE=y
268CONFIG_NET_KEY=y 290CONFIG_NET_KEY=y
291CONFIG_NET_KEY_MIGRATE=y
269CONFIG_INET=y 292CONFIG_INET=y
270CONFIG_IP_MULTICAST=y 293CONFIG_IP_MULTICAST=y
271# CONFIG_IP_ADVANCED_ROUTER is not set 294# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -286,10 +309,13 @@ CONFIG_INET_XFRM_TUNNEL=m
286CONFIG_INET_TUNNEL=m 309CONFIG_INET_TUNNEL=m
287CONFIG_INET_XFRM_MODE_TRANSPORT=m 310CONFIG_INET_XFRM_MODE_TRANSPORT=m
288CONFIG_INET_XFRM_MODE_TUNNEL=m 311CONFIG_INET_XFRM_MODE_TUNNEL=m
312CONFIG_INET_XFRM_MODE_BEET=m
289CONFIG_INET_DIAG=y 313CONFIG_INET_DIAG=y
290CONFIG_INET_TCP_DIAG=y 314CONFIG_INET_TCP_DIAG=y
291# CONFIG_TCP_CONG_ADVANCED is not set 315# CONFIG_TCP_CONG_ADVANCED is not set
292CONFIG_TCP_CONG_BIC=y 316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y
293 319
294# 320#
295# IP: Virtual Server Configuration 321# IP: Virtual Server Configuration
@@ -331,11 +357,17 @@ CONFIG_IPV6_ROUTE_INFO=y
331CONFIG_INET6_AH=m 357CONFIG_INET6_AH=m
332CONFIG_INET6_ESP=m 358CONFIG_INET6_ESP=m
333CONFIG_INET6_IPCOMP=m 359CONFIG_INET6_IPCOMP=m
360CONFIG_IPV6_MIP6=y
334CONFIG_INET6_XFRM_TUNNEL=m 361CONFIG_INET6_XFRM_TUNNEL=m
335CONFIG_INET6_TUNNEL=m 362CONFIG_INET6_TUNNEL=m
336CONFIG_INET6_XFRM_MODE_TRANSPORT=m 363CONFIG_INET6_XFRM_MODE_TRANSPORT=m
337CONFIG_INET6_XFRM_MODE_TUNNEL=m 364CONFIG_INET6_XFRM_MODE_TUNNEL=m
365CONFIG_INET6_XFRM_MODE_BEET=m
366CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
367CONFIG_IPV6_SIT=m
338CONFIG_IPV6_TUNNEL=m 368CONFIG_IPV6_TUNNEL=m
369CONFIG_IPV6_MULTIPLE_TABLES=y
370CONFIG_IPV6_SUBTREES=y
339CONFIG_NETWORK_SECMARK=y 371CONFIG_NETWORK_SECMARK=y
340CONFIG_NETFILTER=y 372CONFIG_NETFILTER=y
341# CONFIG_NETFILTER_DEBUG is not set 373# CONFIG_NETFILTER_DEBUG is not set
@@ -346,19 +378,43 @@ CONFIG_NETFILTER=y
346CONFIG_NETFILTER_NETLINK=m 378CONFIG_NETFILTER_NETLINK=m
347CONFIG_NETFILTER_NETLINK_QUEUE=m 379CONFIG_NETFILTER_NETLINK_QUEUE=m
348CONFIG_NETFILTER_NETLINK_LOG=m 380CONFIG_NETFILTER_NETLINK_LOG=m
381CONFIG_NF_CONNTRACK_ENABLED=m
382CONFIG_NF_CONNTRACK_SUPPORT=y
383# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
384CONFIG_NF_CONNTRACK=m
385CONFIG_NF_CT_ACCT=y
386CONFIG_NF_CONNTRACK_MARK=y
387CONFIG_NF_CONNTRACK_SECMARK=y
388CONFIG_NF_CONNTRACK_EVENTS=y
389CONFIG_NF_CT_PROTO_GRE=m
390CONFIG_NF_CT_PROTO_SCTP=m
391CONFIG_NF_CONNTRACK_AMANDA=m
392CONFIG_NF_CONNTRACK_FTP=m
393CONFIG_NF_CONNTRACK_H323=m
394CONFIG_NF_CONNTRACK_IRC=m
395# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
396CONFIG_NF_CONNTRACK_PPTP=m
397CONFIG_NF_CONNTRACK_SANE=m
398CONFIG_NF_CONNTRACK_SIP=m
399CONFIG_NF_CONNTRACK_TFTP=m
400CONFIG_NF_CT_NETLINK=m
349CONFIG_NETFILTER_XTABLES=m 401CONFIG_NETFILTER_XTABLES=m
350CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 402CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
351CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 403CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
404CONFIG_NETFILTER_XT_TARGET_DSCP=m
352CONFIG_NETFILTER_XT_TARGET_MARK=m 405CONFIG_NETFILTER_XT_TARGET_MARK=m
353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 406CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
407CONFIG_NETFILTER_XT_TARGET_NFLOG=m
354CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 408CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
355CONFIG_NETFILTER_XT_TARGET_SECMARK=m 409CONFIG_NETFILTER_XT_TARGET_SECMARK=m
356CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 410CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
411CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
357CONFIG_NETFILTER_XT_MATCH_COMMENT=m 412CONFIG_NETFILTER_XT_MATCH_COMMENT=m
358CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 413CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
359CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 414CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
360CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 415CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
361CONFIG_NETFILTER_XT_MATCH_DCCP=m 416CONFIG_NETFILTER_XT_MATCH_DCCP=m
417CONFIG_NETFILTER_XT_MATCH_DSCP=m
362CONFIG_NETFILTER_XT_MATCH_ESP=m 418CONFIG_NETFILTER_XT_MATCH_ESP=m
363CONFIG_NETFILTER_XT_MATCH_HELPER=m 419CONFIG_NETFILTER_XT_MATCH_HELPER=m
364CONFIG_NETFILTER_XT_MATCH_LENGTH=m 420CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -375,60 +431,45 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
375CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 431CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
376CONFIG_NETFILTER_XT_MATCH_STRING=m 432CONFIG_NETFILTER_XT_MATCH_STRING=m
377CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 433CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
434CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
378 435
379# 436#
380# IP: Netfilter Configuration 437# IP: Netfilter Configuration
381# 438#
382CONFIG_IP_NF_CONNTRACK=m 439CONFIG_NF_CONNTRACK_IPV4=m
383CONFIG_IP_NF_CT_ACCT=y 440CONFIG_NF_CONNTRACK_PROC_COMPAT=y
384CONFIG_IP_NF_CONNTRACK_MARK=y
385CONFIG_IP_NF_CONNTRACK_SECMARK=y
386CONFIG_IP_NF_CONNTRACK_EVENTS=y
387CONFIG_IP_NF_CONNTRACK_NETLINK=m
388# CONFIG_IP_NF_CT_PROTO_SCTP is not set
389CONFIG_IP_NF_FTP=m
390CONFIG_IP_NF_IRC=m
391# CONFIG_IP_NF_NETBIOS_NS is not set
392CONFIG_IP_NF_TFTP=m
393CONFIG_IP_NF_AMANDA=m
394CONFIG_IP_NF_PPTP=m
395CONFIG_IP_NF_H323=m
396CONFIG_IP_NF_SIP=m
397CONFIG_IP_NF_QUEUE=m 441CONFIG_IP_NF_QUEUE=m
398CONFIG_IP_NF_IPTABLES=m 442CONFIG_IP_NF_IPTABLES=m
399CONFIG_IP_NF_MATCH_IPRANGE=m 443CONFIG_IP_NF_MATCH_IPRANGE=m
400CONFIG_IP_NF_MATCH_TOS=m 444CONFIG_IP_NF_MATCH_TOS=m
401CONFIG_IP_NF_MATCH_RECENT=m 445CONFIG_IP_NF_MATCH_RECENT=m
402CONFIG_IP_NF_MATCH_ECN=m 446CONFIG_IP_NF_MATCH_ECN=m
403CONFIG_IP_NF_MATCH_DSCP=m
404CONFIG_IP_NF_MATCH_AH=m 447CONFIG_IP_NF_MATCH_AH=m
405CONFIG_IP_NF_MATCH_TTL=m 448CONFIG_IP_NF_MATCH_TTL=m
406CONFIG_IP_NF_MATCH_OWNER=m 449CONFIG_IP_NF_MATCH_OWNER=m
407CONFIG_IP_NF_MATCH_ADDRTYPE=m 450CONFIG_IP_NF_MATCH_ADDRTYPE=m
408CONFIG_IP_NF_MATCH_HASHLIMIT=m
409CONFIG_IP_NF_FILTER=m 451CONFIG_IP_NF_FILTER=m
410CONFIG_IP_NF_TARGET_REJECT=m 452CONFIG_IP_NF_TARGET_REJECT=m
411CONFIG_IP_NF_TARGET_LOG=m 453CONFIG_IP_NF_TARGET_LOG=m
412CONFIG_IP_NF_TARGET_ULOG=m 454CONFIG_IP_NF_TARGET_ULOG=m
413CONFIG_IP_NF_TARGET_TCPMSS=m 455CONFIG_NF_NAT=m
414CONFIG_IP_NF_NAT=m 456CONFIG_NF_NAT_NEEDED=y
415CONFIG_IP_NF_NAT_NEEDED=y
416CONFIG_IP_NF_TARGET_MASQUERADE=m 457CONFIG_IP_NF_TARGET_MASQUERADE=m
417CONFIG_IP_NF_TARGET_REDIRECT=m 458CONFIG_IP_NF_TARGET_REDIRECT=m
418CONFIG_IP_NF_TARGET_NETMAP=m 459CONFIG_IP_NF_TARGET_NETMAP=m
419CONFIG_IP_NF_TARGET_SAME=m 460CONFIG_IP_NF_TARGET_SAME=m
420CONFIG_IP_NF_NAT_SNMP_BASIC=m 461CONFIG_NF_NAT_SNMP_BASIC=m
421CONFIG_IP_NF_NAT_IRC=m 462CONFIG_NF_NAT_PROTO_GRE=m
422CONFIG_IP_NF_NAT_FTP=m 463CONFIG_NF_NAT_FTP=m
423CONFIG_IP_NF_NAT_TFTP=m 464CONFIG_NF_NAT_IRC=m
424CONFIG_IP_NF_NAT_AMANDA=m 465CONFIG_NF_NAT_TFTP=m
425CONFIG_IP_NF_NAT_PPTP=m 466CONFIG_NF_NAT_AMANDA=m
426CONFIG_IP_NF_NAT_H323=m 467CONFIG_NF_NAT_PPTP=m
427CONFIG_IP_NF_NAT_SIP=m 468CONFIG_NF_NAT_H323=m
469CONFIG_NF_NAT_SIP=m
428CONFIG_IP_NF_MANGLE=m 470CONFIG_IP_NF_MANGLE=m
429CONFIG_IP_NF_TARGET_TOS=m 471CONFIG_IP_NF_TARGET_TOS=m
430CONFIG_IP_NF_TARGET_ECN=m 472CONFIG_IP_NF_TARGET_ECN=m
431CONFIG_IP_NF_TARGET_DSCP=m
432CONFIG_IP_NF_TARGET_TTL=m 473CONFIG_IP_NF_TARGET_TTL=m
433CONFIG_IP_NF_TARGET_CLUSTERIP=m 474CONFIG_IP_NF_TARGET_CLUSTERIP=m
434CONFIG_IP_NF_RAW=m 475CONFIG_IP_NF_RAW=m
@@ -439,6 +480,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
439# 480#
440# IPv6: Netfilter Configuration (EXPERIMENTAL) 481# IPv6: Netfilter Configuration (EXPERIMENTAL)
441# 482#
483CONFIG_NF_CONNTRACK_IPV6=m
442CONFIG_IP6_NF_QUEUE=m 484CONFIG_IP6_NF_QUEUE=m
443CONFIG_IP6_NF_IPTABLES=m 485CONFIG_IP6_NF_IPTABLES=m
444CONFIG_IP6_NF_MATCH_RT=m 486CONFIG_IP6_NF_MATCH_RT=m
@@ -448,6 +490,7 @@ CONFIG_IP6_NF_MATCH_HL=m
448CONFIG_IP6_NF_MATCH_OWNER=m 490CONFIG_IP6_NF_MATCH_OWNER=m
449CONFIG_IP6_NF_MATCH_IPV6HEADER=m 491CONFIG_IP6_NF_MATCH_IPV6HEADER=m
450CONFIG_IP6_NF_MATCH_AH=m 492CONFIG_IP6_NF_MATCH_AH=m
493CONFIG_IP6_NF_MATCH_MH=m
451CONFIG_IP6_NF_MATCH_EUI64=m 494CONFIG_IP6_NF_MATCH_EUI64=m
452CONFIG_IP6_NF_FILTER=m 495CONFIG_IP6_NF_FILTER=m
453CONFIG_IP6_NF_TARGET_LOG=m 496CONFIG_IP6_NF_TARGET_LOG=m
@@ -484,7 +527,6 @@ CONFIG_SCTP_HMAC_MD5=y
484# CONFIG_ATALK is not set 527# CONFIG_ATALK is not set
485# CONFIG_X25 is not set 528# CONFIG_X25 is not set
486# CONFIG_LAPB is not set 529# CONFIG_LAPB is not set
487CONFIG_NET_DIVERT=y
488# CONFIG_ECONET is not set 530# CONFIG_ECONET is not set
489# CONFIG_WAN_ROUTER is not set 531# CONFIG_WAN_ROUTER is not set
490 532
@@ -492,6 +534,7 @@ CONFIG_NET_DIVERT=y
492# QoS and/or fair queueing 534# QoS and/or fair queueing
493# 535#
494CONFIG_NET_SCHED=y 536CONFIG_NET_SCHED=y
537CONFIG_NET_SCH_FIFO=y
495# CONFIG_NET_SCH_CLK_JIFFIES is not set 538# CONFIG_NET_SCH_CLK_JIFFIES is not set
496CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y 539CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
497# CONFIG_NET_SCH_CLK_CPU is not set 540# CONFIG_NET_SCH_CLK_CPU is not set
@@ -546,6 +589,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
546CONFIG_IEEE80211_SOFTMAC=m 589CONFIG_IEEE80211_SOFTMAC=m
547# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 590# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
548CONFIG_WIRELESS_EXT=y 591CONFIG_WIRELESS_EXT=y
592CONFIG_FIB_RULES=y
549 593
550# 594#
551# Device Drivers 595# Device Drivers
@@ -556,7 +600,6 @@ CONFIG_WIRELESS_EXT=y
556# 600#
557CONFIG_STANDALONE=y 601CONFIG_STANDALONE=y
558CONFIG_PREVENT_FIRMWARE_BUILD=y 602CONFIG_PREVENT_FIRMWARE_BUILD=y
559# CONFIG_FW_LOADER is not set
560# CONFIG_SYS_HYPERVISOR is not set 603# CONFIG_SYS_HYPERVISOR is not set
561 604
562# 605#
@@ -577,6 +620,7 @@ CONFIG_CONNECTOR=m
577# 620#
578# Plug and Play support 621# Plug and Play support
579# 622#
623# CONFIG_PNPACPI is not set
580 624
581# 625#
582# Block devices 626# Block devices
@@ -592,6 +636,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
592CONFIG_ATA_OVER_ETH=m 636CONFIG_ATA_OVER_ETH=m
593 637
594# 638#
639# Misc devices
640#
641
642#
595# ATA/ATAPI/MFM/RLL support 643# ATA/ATAPI/MFM/RLL support
596# 644#
597# CONFIG_IDE is not set 645# CONFIG_IDE is not set
@@ -601,6 +649,8 @@ CONFIG_ATA_OVER_ETH=m
601# 649#
602CONFIG_RAID_ATTRS=m 650CONFIG_RAID_ATTRS=m
603CONFIG_SCSI=y 651CONFIG_SCSI=y
652CONFIG_SCSI_TGT=m
653# CONFIG_SCSI_NETLINK is not set
604CONFIG_SCSI_PROC_FS=y 654CONFIG_SCSI_PROC_FS=y
605 655
606# 656#
@@ -620,24 +670,30 @@ CONFIG_CHR_DEV_SCH=m
620# CONFIG_SCSI_MULTI_LUN is not set 670# CONFIG_SCSI_MULTI_LUN is not set
621CONFIG_SCSI_CONSTANTS=y 671CONFIG_SCSI_CONSTANTS=y
622# CONFIG_SCSI_LOGGING is not set 672# CONFIG_SCSI_LOGGING is not set
673CONFIG_SCSI_SCAN_ASYNC=y
623 674
624# 675#
625# SCSI Transport Attributes 676# SCSI Transports
626# 677#
627CONFIG_SCSI_SPI_ATTRS=m 678CONFIG_SCSI_SPI_ATTRS=m
628# CONFIG_SCSI_FC_ATTRS is not set 679# CONFIG_SCSI_FC_ATTRS is not set
629CONFIG_SCSI_ISCSI_ATTRS=m 680CONFIG_SCSI_ISCSI_ATTRS=m
630CONFIG_SCSI_SAS_ATTRS=m 681CONFIG_SCSI_SAS_ATTRS=m
682# CONFIG_SCSI_SAS_LIBSAS is not set
631 683
632# 684#
633# SCSI low-level drivers 685# SCSI low-level drivers
634# 686#
635CONFIG_ISCSI_TCP=m 687CONFIG_ISCSI_TCP=m
636CONFIG_SGIWD93_SCSI=y 688CONFIG_SGIWD93_SCSI=y
637# CONFIG_SCSI_SATA is not set
638# CONFIG_SCSI_DEBUG is not set 689# CONFIG_SCSI_DEBUG is not set
639 690
640# 691#
692# Serial ATA (prod) and Parallel ATA (experimental) drivers
693#
694# CONFIG_ATA is not set
695
696#
641# Multi-device support (RAID and LVM) 697# Multi-device support (RAID and LVM)
642# 698#
643# CONFIG_MD is not set 699# CONFIG_MD is not set
@@ -679,6 +735,8 @@ CONFIG_LXT_PHY=m
679CONFIG_CICADA_PHY=m 735CONFIG_CICADA_PHY=m
680# CONFIG_VITESSE_PHY is not set 736# CONFIG_VITESSE_PHY is not set
681# CONFIG_SMSC_PHY is not set 737# CONFIG_SMSC_PHY is not set
738# CONFIG_BROADCOM_PHY is not set
739# CONFIG_FIXED_PHY is not set
682 740
683# 741#
684# Ethernet (10 or 100Mbit) 742# Ethernet (10 or 100Mbit)
@@ -730,6 +788,7 @@ CONFIG_SGISEEQ=y
730# Input device support 788# Input device support
731# 789#
732CONFIG_INPUT=y 790CONFIG_INPUT=y
791# CONFIG_INPUT_FF_MEMLESS is not set
733 792
734# 793#
735# Userland interfaces 794# Userland interfaces
@@ -752,6 +811,7 @@ CONFIG_KEYBOARD_ATKBD=y
752# CONFIG_KEYBOARD_LKKBD is not set 811# CONFIG_KEYBOARD_LKKBD is not set
753# CONFIG_KEYBOARD_XTKBD is not set 812# CONFIG_KEYBOARD_XTKBD is not set
754# CONFIG_KEYBOARD_NEWTON is not set 813# CONFIG_KEYBOARD_NEWTON is not set
814# CONFIG_KEYBOARD_STOWAWAY is not set
755CONFIG_INPUT_MOUSE=y 815CONFIG_INPUT_MOUSE=y
756CONFIG_MOUSE_PS2=m 816CONFIG_MOUSE_PS2=m
757CONFIG_MOUSE_SERIAL=m 817CONFIG_MOUSE_SERIAL=m
@@ -815,10 +875,6 @@ CONFIG_SGI_DS1286=m
815# CONFIG_GEN_RTC is not set 875# CONFIG_GEN_RTC is not set
816# CONFIG_DTLK is not set 876# CONFIG_DTLK is not set
817# CONFIG_R3964 is not set 877# CONFIG_R3964 is not set
818
819#
820# Ftape, the floppy tape device driver
821#
822CONFIG_RAW_DRIVER=m 878CONFIG_RAW_DRIVER=m
823CONFIG_MAX_RAW_DEVS=256 879CONFIG_MAX_RAW_DEVS=256
824 880
@@ -826,7 +882,6 @@ CONFIG_MAX_RAW_DEVS=256
826# TPM devices 882# TPM devices
827# 883#
828# CONFIG_TCG_TPM is not set 884# CONFIG_TCG_TPM is not set
829# CONFIG_TELCLOCK is not set
830 885
831# 886#
832# I2C support 887# I2C support
@@ -851,14 +906,9 @@ CONFIG_MAX_RAW_DEVS=256
851# CONFIG_HWMON_VID is not set 906# CONFIG_HWMON_VID is not set
852 907
853# 908#
854# Misc devices
855#
856
857#
858# Multimedia devices 909# Multimedia devices
859# 910#
860# CONFIG_VIDEO_DEV is not set 911# CONFIG_VIDEO_DEV is not set
861CONFIG_VIDEO_V4L2=y
862 912
863# 913#
864# Digital Video Broadcasting Devices 914# Digital Video Broadcasting Devices
@@ -887,6 +937,7 @@ CONFIG_LOGO=y
887# CONFIG_LOGO_LINUX_VGA16 is not set 937# CONFIG_LOGO_LINUX_VGA16 is not set
888# CONFIG_LOGO_LINUX_CLUT224 is not set 938# CONFIG_LOGO_LINUX_CLUT224 is not set
889CONFIG_LOGO_SGI_CLUT224=y 939CONFIG_LOGO_SGI_CLUT224=y
940# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
890 941
891# 942#
892# Sound 943# Sound
@@ -894,6 +945,12 @@ CONFIG_LOGO_SGI_CLUT224=y
894# CONFIG_SOUND is not set 945# CONFIG_SOUND is not set
895 946
896# 947#
948# HID Devices
949#
950CONFIG_HID=y
951# CONFIG_HID_DEBUG is not set
952
953#
897# USB support 954# USB support
898# 955#
899# CONFIG_USB_ARCH_HAS_HCD is not set 956# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -954,6 +1011,14 @@ CONFIG_LOGO_SGI_CLUT224=y
954# 1011#
955 1012
956# 1013#
1014# Auxiliary Display support
1015#
1016
1017#
1018# Virtualization
1019#
1020
1021#
957# File systems 1022# File systems
958# 1023#
959CONFIG_EXT2_FS=m 1024CONFIG_EXT2_FS=m
@@ -963,6 +1028,7 @@ CONFIG_EXT3_FS=y
963CONFIG_EXT3_FS_XATTR=y 1028CONFIG_EXT3_FS_XATTR=y
964CONFIG_EXT3_FS_POSIX_ACL=y 1029CONFIG_EXT3_FS_POSIX_ACL=y
965CONFIG_EXT3_FS_SECURITY=y 1030CONFIG_EXT3_FS_SECURITY=y
1031# CONFIG_EXT4DEV_FS is not set
966CONFIG_JBD=y 1032CONFIG_JBD=y
967# CONFIG_JBD_DEBUG is not set 1033# CONFIG_JBD_DEBUG is not set
968CONFIG_FS_MBCACHE=y 1034CONFIG_FS_MBCACHE=y
@@ -974,6 +1040,7 @@ CONFIG_XFS_QUOTA=y
974CONFIG_XFS_SECURITY=y 1040CONFIG_XFS_SECURITY=y
975# CONFIG_XFS_POSIX_ACL is not set 1041# CONFIG_XFS_POSIX_ACL is not set
976# CONFIG_XFS_RT is not set 1042# CONFIG_XFS_RT is not set
1043# CONFIG_GFS2_FS is not set
977# CONFIG_OCFS2_FS is not set 1044# CONFIG_OCFS2_FS is not set
978CONFIG_MINIX_FS=m 1045CONFIG_MINIX_FS=m
979# CONFIG_ROMFS_FS is not set 1046# CONFIG_ROMFS_FS is not set
@@ -987,6 +1054,7 @@ CONFIG_DNOTIFY=y
987CONFIG_AUTOFS_FS=m 1054CONFIG_AUTOFS_FS=m
988CONFIG_AUTOFS4_FS=m 1055CONFIG_AUTOFS4_FS=m
989CONFIG_FUSE_FS=m 1056CONFIG_FUSE_FS=m
1057CONFIG_GENERIC_ACL=y
990 1058
991# 1059#
992# CD-ROM/DVD Filesystems 1060# CD-ROM/DVD Filesystems
@@ -994,7 +1062,6 @@ CONFIG_FUSE_FS=m
994CONFIG_ISO9660_FS=m 1062CONFIG_ISO9660_FS=m
995CONFIG_JOLIET=y 1063CONFIG_JOLIET=y
996CONFIG_ZISOFS=y 1064CONFIG_ZISOFS=y
997CONFIG_ZISOFS_FS=m
998CONFIG_UDF_FS=m 1065CONFIG_UDF_FS=m
999CONFIG_UDF_NLS=y 1066CONFIG_UDF_NLS=y
1000 1067
@@ -1013,17 +1080,20 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1013# 1080#
1014CONFIG_PROC_FS=y 1081CONFIG_PROC_FS=y
1015CONFIG_PROC_KCORE=y 1082CONFIG_PROC_KCORE=y
1083CONFIG_PROC_SYSCTL=y
1016CONFIG_SYSFS=y 1084CONFIG_SYSFS=y
1017CONFIG_TMPFS=y 1085CONFIG_TMPFS=y
1086CONFIG_TMPFS_POSIX_ACL=y
1018# CONFIG_HUGETLB_PAGE is not set 1087# CONFIG_HUGETLB_PAGE is not set
1019CONFIG_RAMFS=y 1088CONFIG_RAMFS=y
1020# CONFIG_CONFIGFS_FS is not set 1089CONFIG_CONFIGFS_FS=m
1021 1090
1022# 1091#
1023# Miscellaneous filesystems 1092# Miscellaneous filesystems
1024# 1093#
1025# CONFIG_ADFS_FS is not set 1094# CONFIG_ADFS_FS is not set
1026# CONFIG_AFFS_FS is not set 1095# CONFIG_AFFS_FS is not set
1096# CONFIG_ECRYPT_FS is not set
1027# CONFIG_HFS_FS is not set 1097# CONFIG_HFS_FS is not set
1028# CONFIG_HFSPLUS_FS is not set 1098# CONFIG_HFSPLUS_FS is not set
1029# CONFIG_BEFS_FS is not set 1099# CONFIG_BEFS_FS is not set
@@ -1142,6 +1212,14 @@ CONFIG_NLS_KOI8_U=m
1142CONFIG_NLS_UTF8=m 1212CONFIG_NLS_UTF8=m
1143 1213
1144# 1214#
1215# Distributed Lock Manager
1216#
1217CONFIG_DLM=m
1218CONFIG_DLM_TCP=y
1219# CONFIG_DLM_SCTP is not set
1220# CONFIG_DLM_DEBUG is not set
1221
1222#
1145# Profiling support 1223# Profiling support
1146# 1224#
1147# CONFIG_PROFILING is not set 1225# CONFIG_PROFILING is not set
@@ -1151,11 +1229,13 @@ CONFIG_NLS_UTF8=m
1151# 1229#
1152CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1230CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1153# CONFIG_PRINTK_TIME is not set 1231# CONFIG_PRINTK_TIME is not set
1232CONFIG_ENABLE_MUST_CHECK=y
1154# CONFIG_MAGIC_SYSRQ is not set 1233# CONFIG_MAGIC_SYSRQ is not set
1155# CONFIG_UNUSED_SYMBOLS is not set 1234# CONFIG_UNUSED_SYMBOLS is not set
1235# CONFIG_DEBUG_FS is not set
1236# CONFIG_HEADERS_CHECK is not set
1156# CONFIG_DEBUG_KERNEL is not set 1237# CONFIG_DEBUG_KERNEL is not set
1157CONFIG_LOG_BUF_SHIFT=14 1238CONFIG_LOG_BUF_SHIFT=14
1158# CONFIG_DEBUG_FS is not set
1159CONFIG_CROSSCOMPILE=y 1239CONFIG_CROSSCOMPILE=y
1160CONFIG_CMDLINE="" 1240CONFIG_CMDLINE=""
1161 1241
@@ -1170,18 +1250,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1170# Cryptographic options 1250# Cryptographic options
1171# 1251#
1172CONFIG_CRYPTO=y 1252CONFIG_CRYPTO=y
1253CONFIG_CRYPTO_ALGAPI=y
1254CONFIG_CRYPTO_BLKCIPHER=m
1255CONFIG_CRYPTO_HASH=y
1256CONFIG_CRYPTO_MANAGER=y
1173CONFIG_CRYPTO_HMAC=y 1257CONFIG_CRYPTO_HMAC=y
1258CONFIG_CRYPTO_XCBC=m
1174CONFIG_CRYPTO_NULL=m 1259CONFIG_CRYPTO_NULL=m
1175CONFIG_CRYPTO_MD4=m 1260CONFIG_CRYPTO_MD4=m
1176CONFIG_CRYPTO_MD5=m 1261CONFIG_CRYPTO_MD5=y
1177CONFIG_CRYPTO_SHA1=m 1262CONFIG_CRYPTO_SHA1=m
1178CONFIG_CRYPTO_SHA256=m 1263CONFIG_CRYPTO_SHA256=m
1179CONFIG_CRYPTO_SHA512=m 1264CONFIG_CRYPTO_SHA512=m
1180CONFIG_CRYPTO_WP512=m 1265CONFIG_CRYPTO_WP512=m
1181CONFIG_CRYPTO_TGR192=m 1266CONFIG_CRYPTO_TGR192=m
1267CONFIG_CRYPTO_GF128MUL=m
1268CONFIG_CRYPTO_ECB=m
1269CONFIG_CRYPTO_CBC=m
1270CONFIG_CRYPTO_PCBC=m
1271CONFIG_CRYPTO_LRW=m
1182CONFIG_CRYPTO_DES=m 1272CONFIG_CRYPTO_DES=m
1273CONFIG_CRYPTO_FCRYPT=m
1183CONFIG_CRYPTO_BLOWFISH=m 1274CONFIG_CRYPTO_BLOWFISH=m
1184CONFIG_CRYPTO_TWOFISH=m 1275CONFIG_CRYPTO_TWOFISH=m
1276CONFIG_CRYPTO_TWOFISH_COMMON=m
1185CONFIG_CRYPTO_SERPENT=m 1277CONFIG_CRYPTO_SERPENT=m
1186CONFIG_CRYPTO_AES=m 1278CONFIG_CRYPTO_AES=m
1187CONFIG_CRYPTO_CAST5=m 1279CONFIG_CRYPTO_CAST5=m
@@ -1193,6 +1285,7 @@ CONFIG_CRYPTO_ANUBIS=m
1193CONFIG_CRYPTO_DEFLATE=m 1285CONFIG_CRYPTO_DEFLATE=m
1194CONFIG_CRYPTO_MICHAEL_MIC=m 1286CONFIG_CRYPTO_MICHAEL_MIC=m
1195CONFIG_CRYPTO_CRC32C=m 1287CONFIG_CRYPTO_CRC32C=m
1288CONFIG_CRYPTO_CAMELLIA=m
1196# CONFIG_CRYPTO_TEST is not set 1289# CONFIG_CRYPTO_TEST is not set
1197 1290
1198# 1291#
@@ -1202,6 +1295,7 @@ CONFIG_CRYPTO_CRC32C=m
1202# 1295#
1203# Library routines 1296# Library routines
1204# 1297#
1298CONFIG_BITREVERSE=m
1205# CONFIG_CRC_CCITT is not set 1299# CONFIG_CRC_CCITT is not set
1206CONFIG_CRC16=m 1300CONFIG_CRC16=m
1207CONFIG_CRC32=m 1301CONFIG_CRC32=m
@@ -1213,3 +1307,5 @@ CONFIG_TEXTSEARCH_KMP=m
1213CONFIG_TEXTSEARCH_BM=m 1307CONFIG_TEXTSEARCH_BM=m
1214CONFIG_TEXTSEARCH_FSM=m 1308CONFIG_TEXTSEARCH_FSM=m
1215CONFIG_PLIST=y 1309CONFIG_PLIST=y
1310CONFIG_HAS_IOMEM=y
1311CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 96090f28373b..46f6ac4083b9 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:10 2006 4# Tue Feb 20 21:47:32 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -70,10 +70,14 @@ CONFIG_SGI_SN_M_MODE=y
70# CONFIG_REPLICATE_EXHANDLERS is not set 70# CONFIG_REPLICATE_EXHANDLERS is not set
71CONFIG_EARLY_PRINTK=y 71CONFIG_EARLY_PRINTK=y
72CONFIG_RWSEM_GENERIC_SPINLOCK=y 72CONFIG_RWSEM_GENERIC_SPINLOCK=y
73# CONFIG_ARCH_HAS_ILOG2_U32 is not set
74# CONFIG_ARCH_HAS_ILOG2_U64 is not set
73CONFIG_GENERIC_FIND_NEXT_BIT=y 75CONFIG_GENERIC_FIND_NEXT_BIT=y
74CONFIG_GENERIC_HWEIGHT=y 76CONFIG_GENERIC_HWEIGHT=y
75CONFIG_GENERIC_CALIBRATE_DELAY=y 77CONFIG_GENERIC_CALIBRATE_DELAY=y
78CONFIG_GENERIC_TIME=y
76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
80CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
77CONFIG_ARC=y 81CONFIG_ARC=y
78CONFIG_DMA_IP27=y 82CONFIG_DMA_IP27=y
79CONFIG_CPU_BIG_ENDIAN=y 83CONFIG_CPU_BIG_ENDIAN=y
@@ -121,8 +125,8 @@ CONFIG_PAGE_SIZE_4KB=y
121# CONFIG_PAGE_SIZE_64KB is not set 125# CONFIG_PAGE_SIZE_64KB is not set
122CONFIG_CPU_HAS_PREFETCH=y 126CONFIG_CPU_HAS_PREFETCH=y
123CONFIG_MIPS_MT_DISABLED=y 127CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_MT_SMP is not set 128# CONFIG_MIPS_MT_SMP is not set
129# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_VPE_LOADER is not set 130# CONFIG_MIPS_VPE_LOADER is not set
127CONFIG_CPU_HAS_LLSC=y 131CONFIG_CPU_HAS_LLSC=y
128CONFIG_CPU_HAS_SYNC=y 132CONFIG_CPU_HAS_SYNC=y
@@ -145,8 +149,10 @@ CONFIG_NEED_MULTIPLE_NODES=y
145CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
146CONFIG_MIGRATION=y 150CONFIG_MIGRATION=y
147CONFIG_RESOURCES_64BIT=y 151CONFIG_RESOURCES_64BIT=y
152CONFIG_ZONE_DMA_FLAG=1
148CONFIG_SMP=y 153CONFIG_SMP=y
149CONFIG_SYS_SUPPORTS_SMP=y 154CONFIG_SYS_SUPPORTS_SMP=y
155CONFIG_NR_CPUS_DEFAULT_64=y
150CONFIG_NR_CPUS=64 156CONFIG_NR_CPUS=64
151# CONFIG_HZ_48 is not set 157# CONFIG_HZ_48 is not set
152# CONFIG_HZ_100 is not set 158# CONFIG_HZ_100 is not set
@@ -162,6 +168,7 @@ CONFIG_PREEMPT_NONE=y
162# CONFIG_PREEMPT is not set 168# CONFIG_PREEMPT is not set
163CONFIG_PREEMPT_BKL=y 169CONFIG_PREEMPT_BKL=y
164# CONFIG_MIPS_INSANE_LARGE is not set 170# CONFIG_MIPS_INSANE_LARGE is not set
171# CONFIG_KEXEC is not set
165CONFIG_LOCKDEP_SUPPORT=y 172CONFIG_LOCKDEP_SUPPORT=y
166CONFIG_STACKTRACE_SUPPORT=y 173CONFIG_STACKTRACE_SUPPORT=y
167CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 174CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -180,17 +187,22 @@ CONFIG_LOCALVERSION=""
180CONFIG_LOCALVERSION_AUTO=y 187CONFIG_LOCALVERSION_AUTO=y
181CONFIG_SWAP=y 188CONFIG_SWAP=y
182CONFIG_SYSVIPC=y 189CONFIG_SYSVIPC=y
190# CONFIG_IPC_NS is not set
191CONFIG_SYSVIPC_SYSCTL=y
183CONFIG_POSIX_MQUEUE=y 192CONFIG_POSIX_MQUEUE=y
184# CONFIG_BSD_PROCESS_ACCT is not set 193# CONFIG_BSD_PROCESS_ACCT is not set
185CONFIG_SYSCTL=y 194# CONFIG_TASKSTATS is not set
195# CONFIG_UTS_NS is not set
186# CONFIG_AUDIT is not set 196# CONFIG_AUDIT is not set
187CONFIG_IKCONFIG=y 197CONFIG_IKCONFIG=y
188CONFIG_IKCONFIG_PROC=y 198CONFIG_IKCONFIG_PROC=y
189CONFIG_CPUSETS=y 199CONFIG_CPUSETS=y
200CONFIG_SYSFS_DEPRECATED=y
190CONFIG_RELAY=y 201CONFIG_RELAY=y
191CONFIG_INITRAMFS_SOURCE=""
192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 202# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
203CONFIG_SYSCTL=y
193CONFIG_EMBEDDED=y 204CONFIG_EMBEDDED=y
205CONFIG_SYSCTL_SYSCALL=y
194CONFIG_KALLSYMS=y 206CONFIG_KALLSYMS=y
195# CONFIG_KALLSYMS_EXTRA_PASS is not set 207# CONFIG_KALLSYMS_EXTRA_PASS is not set
196CONFIG_HOTPLUG=y 208CONFIG_HOTPLUG=y
@@ -198,12 +210,12 @@ CONFIG_PRINTK=y
198CONFIG_BUG=y 210CONFIG_BUG=y
199CONFIG_ELF_CORE=y 211CONFIG_ELF_CORE=y
200CONFIG_BASE_FULL=y 212CONFIG_BASE_FULL=y
201CONFIG_RT_MUTEXES=y
202CONFIG_FUTEX=y 213CONFIG_FUTEX=y
203CONFIG_EPOLL=y 214CONFIG_EPOLL=y
204CONFIG_SHMEM=y 215CONFIG_SHMEM=y
205CONFIG_SLAB=y 216CONFIG_SLAB=y
206CONFIG_VM_EVENT_COUNTERS=y 217CONFIG_VM_EVENT_COUNTERS=y
218CONFIG_RT_MUTEXES=y
207# CONFIG_TINY_SHMEM is not set 219# CONFIG_TINY_SHMEM is not set
208CONFIG_BASE_SMALL=0 220CONFIG_BASE_SMALL=0
209# CONFIG_SLOB is not set 221# CONFIG_SLOB is not set
@@ -222,6 +234,7 @@ CONFIG_STOP_MACHINE=y
222# 234#
223# Block layer 235# Block layer
224# 236#
237CONFIG_BLOCK=y
225# CONFIG_BLK_DEV_IO_TRACE is not set 238# CONFIG_BLK_DEV_IO_TRACE is not set
226 239
227# 240#
@@ -263,11 +276,20 @@ CONFIG_BINFMT_ELF=y
263# CONFIG_BUILD_ELF64 is not set 276# CONFIG_BUILD_ELF64 is not set
264CONFIG_MIPS32_COMPAT=y 277CONFIG_MIPS32_COMPAT=y
265CONFIG_COMPAT=y 278CONFIG_COMPAT=y
279CONFIG_SYSVIPC_COMPAT=y
266CONFIG_MIPS32_O32=y 280CONFIG_MIPS32_O32=y
267# CONFIG_MIPS32_N32 is not set 281CONFIG_MIPS32_N32=y
268CONFIG_BINFMT_ELF32=y 282CONFIG_BINFMT_ELF32=y
269 283
270# 284#
285# Power management options
286#
287CONFIG_PM=y
288# CONFIG_PM_LEGACY is not set
289# CONFIG_PM_DEBUG is not set
290# CONFIG_PM_SYSFS_DEPRECATED is not set
291
292#
271# Networking 293# Networking
272# 294#
273CONFIG_NET=y 295CONFIG_NET=y
@@ -281,7 +303,10 @@ CONFIG_PACKET_MMAP=y
281CONFIG_UNIX=y 303CONFIG_UNIX=y
282CONFIG_XFRM=y 304CONFIG_XFRM=y
283CONFIG_XFRM_USER=m 305CONFIG_XFRM_USER=m
306# CONFIG_XFRM_SUB_POLICY is not set
307CONFIG_XFRM_MIGRATE=y
284CONFIG_NET_KEY=y 308CONFIG_NET_KEY=y
309CONFIG_NET_KEY_MIGRATE=y
285CONFIG_INET=y 310CONFIG_INET=y
286CONFIG_IP_MULTICAST=y 311CONFIG_IP_MULTICAST=y
287# CONFIG_IP_ADVANCED_ROUTER is not set 312# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -302,10 +327,13 @@ CONFIG_IP_PNP=y
302# CONFIG_INET_TUNNEL is not set 327# CONFIG_INET_TUNNEL is not set
303CONFIG_INET_XFRM_MODE_TRANSPORT=m 328CONFIG_INET_XFRM_MODE_TRANSPORT=m
304CONFIG_INET_XFRM_MODE_TUNNEL=m 329CONFIG_INET_XFRM_MODE_TUNNEL=m
330CONFIG_INET_XFRM_MODE_BEET=m
305CONFIG_INET_DIAG=y 331CONFIG_INET_DIAG=y
306CONFIG_INET_TCP_DIAG=y 332CONFIG_INET_TCP_DIAG=y
307# CONFIG_TCP_CONG_ADVANCED is not set 333# CONFIG_TCP_CONG_ADVANCED is not set
308CONFIG_TCP_CONG_BIC=y 334CONFIG_TCP_CONG_CUBIC=y
335CONFIG_DEFAULT_TCP_CONG="cubic"
336CONFIG_TCP_MD5SIG=y
309# CONFIG_IPV6 is not set 337# CONFIG_IPV6 is not set
310# CONFIG_INET6_XFRM_TUNNEL is not set 338# CONFIG_INET6_XFRM_TUNNEL is not set
311# CONFIG_INET6_TUNNEL is not set 339# CONFIG_INET6_TUNNEL is not set
@@ -335,7 +363,6 @@ CONFIG_NETWORK_SECMARK=y
335# CONFIG_ATALK is not set 363# CONFIG_ATALK is not set
336# CONFIG_X25 is not set 364# CONFIG_X25 is not set
337# CONFIG_LAPB is not set 365# CONFIG_LAPB is not set
338# CONFIG_NET_DIVERT is not set
339# CONFIG_ECONET is not set 366# CONFIG_ECONET is not set
340# CONFIG_WAN_ROUTER is not set 367# CONFIG_WAN_ROUTER is not set
341 368
@@ -343,6 +370,7 @@ CONFIG_NETWORK_SECMARK=y
343# QoS and/or fair queueing 370# QoS and/or fair queueing
344# 371#
345CONFIG_NET_SCHED=y 372CONFIG_NET_SCHED=y
373CONFIG_NET_SCH_FIFO=y
346# CONFIG_NET_SCH_CLK_JIFFIES is not set 374# CONFIG_NET_SCH_CLK_JIFFIES is not set
347CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y 375CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
348# CONFIG_NET_SCH_CLK_CPU is not set 376# CONFIG_NET_SCH_CLK_CPU is not set
@@ -374,6 +402,7 @@ CONFIG_NET_CLS_ROUTE=y
374CONFIG_NET_CLS_FW=m 402CONFIG_NET_CLS_FW=m
375CONFIG_NET_CLS_U32=m 403CONFIG_NET_CLS_U32=m
376# CONFIG_CLS_U32_PERF is not set 404# CONFIG_CLS_U32_PERF is not set
405CONFIG_CLS_U32_MARK=y
377CONFIG_NET_CLS_RSVP=m 406CONFIG_NET_CLS_RSVP=m
378CONFIG_NET_CLS_RSVP6=m 407CONFIG_NET_CLS_RSVP6=m
379# CONFIG_NET_EMATCH is not set 408# CONFIG_NET_EMATCH is not set
@@ -427,6 +456,7 @@ CONFIG_CONNECTOR=m
427# 456#
428# Plug and Play support 457# Plug and Play support
429# 458#
459# CONFIG_PNPACPI is not set
430 460
431# 461#
432# Block devices 462# Block devices
@@ -448,6 +478,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
448CONFIG_ATA_OVER_ETH=m 478CONFIG_ATA_OVER_ETH=m
449 479
450# 480#
481# Misc devices
482#
483CONFIG_SGI_IOC4=m
484# CONFIG_TIFM_CORE is not set
485
486#
451# ATA/ATAPI/MFM/RLL support 487# ATA/ATAPI/MFM/RLL support
452# 488#
453# CONFIG_IDE is not set 489# CONFIG_IDE is not set
@@ -457,6 +493,8 @@ CONFIG_ATA_OVER_ETH=m
457# 493#
458CONFIG_RAID_ATTRS=m 494CONFIG_RAID_ATTRS=m
459CONFIG_SCSI=y 495CONFIG_SCSI=y
496CONFIG_SCSI_TGT=m
497CONFIG_SCSI_NETLINK=y
460CONFIG_SCSI_PROC_FS=y 498CONFIG_SCSI_PROC_FS=y
461 499
462# 500#
@@ -476,14 +514,17 @@ CONFIG_CHR_DEV_SCH=m
476# CONFIG_SCSI_MULTI_LUN is not set 514# CONFIG_SCSI_MULTI_LUN is not set
477CONFIG_SCSI_CONSTANTS=y 515CONFIG_SCSI_CONSTANTS=y
478CONFIG_SCSI_LOGGING=y 516CONFIG_SCSI_LOGGING=y
517CONFIG_SCSI_SCAN_ASYNC=y
479 518
480# 519#
481# SCSI Transport Attributes 520# SCSI Transports
482# 521#
483CONFIG_SCSI_SPI_ATTRS=y 522CONFIG_SCSI_SPI_ATTRS=y
484CONFIG_SCSI_FC_ATTRS=y 523CONFIG_SCSI_FC_ATTRS=y
485CONFIG_SCSI_ISCSI_ATTRS=m 524CONFIG_SCSI_ISCSI_ATTRS=m
486CONFIG_SCSI_SAS_ATTRS=m 525CONFIG_SCSI_SAS_ATTRS=m
526CONFIG_SCSI_SAS_LIBSAS=m
527# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
487 528
488# 529#
489# SCSI low-level drivers 530# SCSI low-level drivers
@@ -496,24 +537,33 @@ CONFIG_SCSI_SAS_ATTRS=m
496# CONFIG_SCSI_AIC7XXX is not set 537# CONFIG_SCSI_AIC7XXX is not set
497# CONFIG_SCSI_AIC7XXX_OLD is not set 538# CONFIG_SCSI_AIC7XXX_OLD is not set
498# CONFIG_SCSI_AIC79XX is not set 539# CONFIG_SCSI_AIC79XX is not set
540CONFIG_SCSI_AIC94XX=m
541# CONFIG_AIC94XX_DEBUG is not set
542# CONFIG_SCSI_ARCMSR is not set
499# CONFIG_MEGARAID_NEWGEN is not set 543# CONFIG_MEGARAID_NEWGEN is not set
500# CONFIG_MEGARAID_LEGACY is not set 544# CONFIG_MEGARAID_LEGACY is not set
501# CONFIG_MEGARAID_SAS is not set 545# CONFIG_MEGARAID_SAS is not set
502# CONFIG_SCSI_SATA is not set
503# CONFIG_SCSI_HPTIOP is not set 546# CONFIG_SCSI_HPTIOP is not set
504# CONFIG_SCSI_DMX3191D is not set 547# CONFIG_SCSI_DMX3191D is not set
505# CONFIG_SCSI_FUTURE_DOMAIN is not set 548# CONFIG_SCSI_FUTURE_DOMAIN is not set
506# CONFIG_SCSI_IPS is not set 549# CONFIG_SCSI_IPS is not set
507# CONFIG_SCSI_INITIO is not set 550# CONFIG_SCSI_INITIO is not set
508# CONFIG_SCSI_INIA100 is not set 551# CONFIG_SCSI_INIA100 is not set
552# CONFIG_SCSI_STEX is not set
509# CONFIG_SCSI_SYM53C8XX_2 is not set 553# CONFIG_SCSI_SYM53C8XX_2 is not set
510# CONFIG_SCSI_IPR is not set
511CONFIG_SCSI_QLOGIC_1280=y 554CONFIG_SCSI_QLOGIC_1280=y
512# CONFIG_SCSI_QLA_FC is not set 555# CONFIG_SCSI_QLA_FC is not set
556# CONFIG_SCSI_QLA_ISCSI is not set
513# CONFIG_SCSI_LPFC is not set 557# CONFIG_SCSI_LPFC is not set
514# CONFIG_SCSI_DC395x is not set 558# CONFIG_SCSI_DC395x is not set
515# CONFIG_SCSI_DC390T is not set 559# CONFIG_SCSI_DC390T is not set
516# CONFIG_SCSI_DEBUG is not set 560# CONFIG_SCSI_DEBUG is not set
561# CONFIG_SCSI_SRP is not set
562
563#
564# Serial ATA (prod) and Parallel ATA (experimental) drivers
565#
566# CONFIG_ATA is not set
517 567
518# 568#
519# Multi-device support (RAID and LVM) 569# Multi-device support (RAID and LVM)
@@ -529,6 +579,7 @@ CONFIG_MD_RAID5_RESHAPE=y
529CONFIG_MD_MULTIPATH=m 579CONFIG_MD_MULTIPATH=m
530CONFIG_MD_FAULTY=m 580CONFIG_MD_FAULTY=m
531CONFIG_BLK_DEV_DM=m 581CONFIG_BLK_DEV_DM=m
582# CONFIG_DM_DEBUG is not set
532CONFIG_DM_CRYPT=m 583CONFIG_DM_CRYPT=m
533CONFIG_DM_SNAPSHOT=m 584CONFIG_DM_SNAPSHOT=m
534CONFIG_DM_MIRROR=m 585CONFIG_DM_MIRROR=m
@@ -583,6 +634,8 @@ CONFIG_LXT_PHY=m
583CONFIG_CICADA_PHY=m 634CONFIG_CICADA_PHY=m
584CONFIG_VITESSE_PHY=m 635CONFIG_VITESSE_PHY=m
585CONFIG_SMSC_PHY=m 636CONFIG_SMSC_PHY=m
637# CONFIG_BROADCOM_PHY is not set
638# CONFIG_FIXED_PHY is not set
586 639
587# 640#
588# Ethernet (10 or 100Mbit) 641# Ethernet (10 or 100Mbit)
@@ -619,14 +672,18 @@ CONFIG_SGI_IOC3_ETH=y
619# CONFIG_SK98LIN is not set 672# CONFIG_SK98LIN is not set
620# CONFIG_TIGON3 is not set 673# CONFIG_TIGON3 is not set
621# CONFIG_BNX2 is not set 674# CONFIG_BNX2 is not set
675CONFIG_QLA3XXX=m
676# CONFIG_ATL1 is not set
622 677
623# 678#
624# Ethernet (10000 Mbit) 679# Ethernet (10000 Mbit)
625# 680#
626# CONFIG_CHELSIO_T1 is not set 681# CONFIG_CHELSIO_T1 is not set
682CONFIG_CHELSIO_T3=m
627# CONFIG_IXGB is not set 683# CONFIG_IXGB is not set
628# CONFIG_S2IO is not set 684# CONFIG_S2IO is not set
629# CONFIG_MYRI10GE is not set 685# CONFIG_MYRI10GE is not set
686CONFIG_NETXEN_NIC=m
630 687
631# 688#
632# Token Ring devices 689# Token Ring devices
@@ -724,10 +781,6 @@ CONFIG_SGI_IP27_RTC=y
724# CONFIG_DTLK is not set 781# CONFIG_DTLK is not set
725# CONFIG_R3964 is not set 782# CONFIG_R3964 is not set
726# CONFIG_APPLICOM is not set 783# CONFIG_APPLICOM is not set
727
728#
729# Ftape, the floppy tape device driver
730#
731# CONFIG_DRM is not set 784# CONFIG_DRM is not set
732# CONFIG_RAW_DRIVER is not set 785# CONFIG_RAW_DRIVER is not set
733 786
@@ -735,7 +788,6 @@ CONFIG_SGI_IP27_RTC=y
735# TPM devices 788# TPM devices
736# 789#
737# CONFIG_TCG_TPM is not set 790# CONFIG_TCG_TPM is not set
738# CONFIG_TELCLOCK is not set
739 791
740# 792#
741# I2C support 793# I2C support
@@ -760,14 +812,9 @@ CONFIG_SGI_IP27_RTC=y
760# CONFIG_HWMON_VID is not set 812# CONFIG_HWMON_VID is not set
761 813
762# 814#
763# Misc devices
764#
765
766#
767# Multimedia devices 815# Multimedia devices
768# 816#
769# CONFIG_VIDEO_DEV is not set 817# CONFIG_VIDEO_DEV is not set
770CONFIG_VIDEO_V4L2=y
771 818
772# 819#
773# Digital Video Broadcasting Devices 820# Digital Video Broadcasting Devices
@@ -779,6 +826,7 @@ CONFIG_VIDEO_V4L2=y
779# 826#
780# CONFIG_FIRMWARE_EDID is not set 827# CONFIG_FIRMWARE_EDID is not set
781# CONFIG_FB is not set 828# CONFIG_FB is not set
829# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
782 830
783# 831#
784# Sound 832# Sound
@@ -848,6 +896,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
848# 896#
849 897
850# 898#
899# Auxiliary Display support
900#
901
902#
903# Virtualization
904#
905
906#
851# File systems 907# File systems
852# 908#
853CONFIG_EXT2_FS=y 909CONFIG_EXT2_FS=y
@@ -859,6 +915,7 @@ CONFIG_EXT3_FS=y
859CONFIG_EXT3_FS_XATTR=y 915CONFIG_EXT3_FS_XATTR=y
860CONFIG_EXT3_FS_POSIX_ACL=y 916CONFIG_EXT3_FS_POSIX_ACL=y
861CONFIG_EXT3_FS_SECURITY=y 917CONFIG_EXT3_FS_SECURITY=y
918# CONFIG_EXT4DEV_FS is not set
862CONFIG_JBD=y 919CONFIG_JBD=y
863CONFIG_JBD_DEBUG=y 920CONFIG_JBD_DEBUG=y
864CONFIG_FS_MBCACHE=y 921CONFIG_FS_MBCACHE=y
@@ -870,6 +927,7 @@ CONFIG_XFS_QUOTA=y
870CONFIG_XFS_SECURITY=y 927CONFIG_XFS_SECURITY=y
871CONFIG_XFS_POSIX_ACL=y 928CONFIG_XFS_POSIX_ACL=y
872# CONFIG_XFS_RT is not set 929# CONFIG_XFS_RT is not set
930# CONFIG_GFS2_FS is not set
873# CONFIG_OCFS2_FS is not set 931# CONFIG_OCFS2_FS is not set
874# CONFIG_MINIX_FS is not set 932# CONFIG_MINIX_FS is not set
875# CONFIG_ROMFS_FS is not set 933# CONFIG_ROMFS_FS is not set
@@ -881,6 +939,7 @@ CONFIG_DNOTIFY=y
881CONFIG_AUTOFS_FS=m 939CONFIG_AUTOFS_FS=m
882# CONFIG_AUTOFS4_FS is not set 940# CONFIG_AUTOFS4_FS is not set
883CONFIG_FUSE_FS=m 941CONFIG_FUSE_FS=m
942CONFIG_GENERIC_ACL=y
884 943
885# 944#
886# CD-ROM/DVD Filesystems 945# CD-ROM/DVD Filesystems
@@ -900,17 +959,20 @@ CONFIG_FUSE_FS=m
900# 959#
901CONFIG_PROC_FS=y 960CONFIG_PROC_FS=y
902CONFIG_PROC_KCORE=y 961CONFIG_PROC_KCORE=y
962CONFIG_PROC_SYSCTL=y
903CONFIG_SYSFS=y 963CONFIG_SYSFS=y
904CONFIG_TMPFS=y 964CONFIG_TMPFS=y
965CONFIG_TMPFS_POSIX_ACL=y
905# CONFIG_HUGETLB_PAGE is not set 966# CONFIG_HUGETLB_PAGE is not set
906CONFIG_RAMFS=y 967CONFIG_RAMFS=y
907# CONFIG_CONFIGFS_FS is not set 968CONFIG_CONFIGFS_FS=m
908 969
909# 970#
910# Miscellaneous filesystems 971# Miscellaneous filesystems
911# 972#
912# CONFIG_ADFS_FS is not set 973# CONFIG_ADFS_FS is not set
913# CONFIG_AFFS_FS is not set 974# CONFIG_AFFS_FS is not set
975# CONFIG_ECRYPT_FS is not set
914# CONFIG_HFS_FS is not set 976# CONFIG_HFS_FS is not set
915# CONFIG_HFSPLUS_FS is not set 977# CONFIG_HFSPLUS_FS is not set
916# CONFIG_BEFS_FS is not set 978# CONFIG_BEFS_FS is not set
@@ -942,7 +1004,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
942# CONFIG_RPCSEC_GSS_SPKM3 is not set 1004# CONFIG_RPCSEC_GSS_SPKM3 is not set
943# CONFIG_SMB_FS is not set 1005# CONFIG_SMB_FS is not set
944# CONFIG_CIFS is not set 1006# CONFIG_CIFS is not set
945# CONFIG_CIFS_DEBUG2 is not set
946# CONFIG_NCP_FS is not set 1007# CONFIG_NCP_FS is not set
947# CONFIG_CODA_FS is not set 1008# CONFIG_CODA_FS is not set
948# CONFIG_AFS_FS is not set 1009# CONFIG_AFS_FS is not set
@@ -975,6 +1036,14 @@ CONFIG_SGI_PARTITION=y
975# CONFIG_NLS is not set 1036# CONFIG_NLS is not set
976 1037
977# 1038#
1039# Distributed Lock Manager
1040#
1041CONFIG_DLM=m
1042CONFIG_DLM_TCP=y
1043# CONFIG_DLM_SCTP is not set
1044# CONFIG_DLM_DEBUG is not set
1045
1046#
978# Profiling support 1047# Profiling support
979# 1048#
980# CONFIG_PROFILING is not set 1049# CONFIG_PROFILING is not set
@@ -984,13 +1053,16 @@ CONFIG_SGI_PARTITION=y
984# 1053#
985CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1054CONFIG_TRACE_IRQFLAGS_SUPPORT=y
986# CONFIG_PRINTK_TIME is not set 1055# CONFIG_PRINTK_TIME is not set
1056CONFIG_ENABLE_MUST_CHECK=y
987# CONFIG_MAGIC_SYSRQ is not set 1057# CONFIG_MAGIC_SYSRQ is not set
988# CONFIG_UNUSED_SYMBOLS is not set 1058# CONFIG_UNUSED_SYMBOLS is not set
1059# CONFIG_DEBUG_FS is not set
1060# CONFIG_HEADERS_CHECK is not set
989# CONFIG_DEBUG_KERNEL is not set 1061# CONFIG_DEBUG_KERNEL is not set
990CONFIG_LOG_BUF_SHIFT=15 1062CONFIG_LOG_BUF_SHIFT=15
991# CONFIG_DEBUG_FS is not set
992CONFIG_CROSSCOMPILE=y 1063CONFIG_CROSSCOMPILE=y
993CONFIG_CMDLINE="" 1064CONFIG_CMDLINE=""
1065CONFIG_SYS_SUPPORTS_KGDB=y
994 1066
995# 1067#
996# Security options 1068# Security options
@@ -1003,7 +1075,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1003# Cryptographic options 1075# Cryptographic options
1004# 1076#
1005CONFIG_CRYPTO=y 1077CONFIG_CRYPTO=y
1078CONFIG_CRYPTO_ALGAPI=y
1079CONFIG_CRYPTO_BLKCIPHER=y
1080CONFIG_CRYPTO_HASH=y
1081CONFIG_CRYPTO_MANAGER=y
1006CONFIG_CRYPTO_HMAC=y 1082CONFIG_CRYPTO_HMAC=y
1083CONFIG_CRYPTO_XCBC=m
1007CONFIG_CRYPTO_NULL=m 1084CONFIG_CRYPTO_NULL=m
1008CONFIG_CRYPTO_MD4=m 1085CONFIG_CRYPTO_MD4=m
1009CONFIG_CRYPTO_MD5=y 1086CONFIG_CRYPTO_MD5=y
@@ -1012,9 +1089,16 @@ CONFIG_CRYPTO_SHA256=m
1012CONFIG_CRYPTO_SHA512=m 1089CONFIG_CRYPTO_SHA512=m
1013CONFIG_CRYPTO_WP512=m 1090CONFIG_CRYPTO_WP512=m
1014CONFIG_CRYPTO_TGR192=m 1091CONFIG_CRYPTO_TGR192=m
1092CONFIG_CRYPTO_GF128MUL=m
1093CONFIG_CRYPTO_ECB=m
1094CONFIG_CRYPTO_CBC=y
1095CONFIG_CRYPTO_PCBC=m
1096CONFIG_CRYPTO_LRW=m
1015CONFIG_CRYPTO_DES=y 1097CONFIG_CRYPTO_DES=y
1098CONFIG_CRYPTO_FCRYPT=m
1016CONFIG_CRYPTO_BLOWFISH=m 1099CONFIG_CRYPTO_BLOWFISH=m
1017CONFIG_CRYPTO_TWOFISH=m 1100CONFIG_CRYPTO_TWOFISH=m
1101CONFIG_CRYPTO_TWOFISH_COMMON=m
1018CONFIG_CRYPTO_SERPENT=m 1102CONFIG_CRYPTO_SERPENT=m
1019CONFIG_CRYPTO_AES=m 1103CONFIG_CRYPTO_AES=m
1020CONFIG_CRYPTO_CAST5=m 1104CONFIG_CRYPTO_CAST5=m
@@ -1026,6 +1110,7 @@ CONFIG_CRYPTO_ANUBIS=m
1026CONFIG_CRYPTO_DEFLATE=m 1110CONFIG_CRYPTO_DEFLATE=m
1027CONFIG_CRYPTO_MICHAEL_MIC=m 1111CONFIG_CRYPTO_MICHAEL_MIC=m
1028CONFIG_CRYPTO_CRC32C=m 1112CONFIG_CRYPTO_CRC32C=m
1113CONFIG_CRYPTO_CAMELLIA=m
1029# CONFIG_CRYPTO_TEST is not set 1114# CONFIG_CRYPTO_TEST is not set
1030 1115
1031# 1116#
@@ -1035,6 +1120,7 @@ CONFIG_CRYPTO_CRC32C=m
1035# 1120#
1036# Library routines 1121# Library routines
1037# 1122#
1123CONFIG_BITREVERSE=y
1038# CONFIG_CRC_CCITT is not set 1124# CONFIG_CRC_CCITT is not set
1039CONFIG_CRC16=m 1125CONFIG_CRC16=m
1040CONFIG_CRC32=y 1126CONFIG_CRC32=y
@@ -1042,3 +1128,5 @@ CONFIG_LIBCRC32C=m
1042CONFIG_ZLIB_INFLATE=m 1128CONFIG_ZLIB_INFLATE=m
1043CONFIG_ZLIB_DEFLATE=m 1129CONFIG_ZLIB_DEFLATE=m
1044CONFIG_PLIST=y 1130CONFIG_PLIST=y
1131CONFIG_HAS_IOMEM=y
1132CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index 61e069a0f1aa..d9e5000d5329 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:11 2006 4# Tue Feb 20 21:47:33 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,15 +64,17 @@ CONFIG_SGI_IP32=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_ARC=y 75CONFIG_ARC=y
72CONFIG_DMA_IP32=y
73CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
74CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
75CONFIG_OWN_DMA=y
76CONFIG_CPU_BIG_ENDIAN=y 78CONFIG_CPU_BIG_ENDIAN=y
77# CONFIG_CPU_LITTLE_ENDIAN is not set 79# CONFIG_CPU_LITTLE_ENDIAN is not set
78CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 80CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -124,8 +126,8 @@ CONFIG_BOARD_SCACHE=y
124CONFIG_R5000_CPU_SCACHE=y 126CONFIG_R5000_CPU_SCACHE=y
125CONFIG_RM7000_CPU_SCACHE=y 127CONFIG_RM7000_CPU_SCACHE=y
126CONFIG_MIPS_MT_DISABLED=y 128CONFIG_MIPS_MT_DISABLED=y
127# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_MT_SMP is not set 129# CONFIG_MIPS_MT_SMP is not set
130# CONFIG_MIPS_MT_SMTC is not set
129# CONFIG_MIPS_VPE_LOADER is not set 131# CONFIG_MIPS_VPE_LOADER is not set
130CONFIG_CPU_HAS_LLSC=y 132CONFIG_CPU_HAS_LLSC=y
131CONFIG_CPU_HAS_SYNC=y 133CONFIG_CPU_HAS_SYNC=y
@@ -141,6 +143,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 143# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
143CONFIG_RESOURCES_64BIT=y 145CONFIG_RESOURCES_64BIT=y
146CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 147# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 148# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 149# CONFIG_HZ_128 is not set
@@ -153,6 +156,7 @@ CONFIG_HZ=1000
153# CONFIG_PREEMPT_NONE is not set 156# CONFIG_PREEMPT_NONE is not set
154CONFIG_PREEMPT_VOLUNTARY=y 157CONFIG_PREEMPT_VOLUNTARY=y
155# CONFIG_PREEMPT is not set 158# CONFIG_PREEMPT is not set
159# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y 160CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y 161CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 162CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,16 +175,21 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 175CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 176CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 177CONFIG_SYSVIPC=y
178# CONFIG_IPC_NS is not set
179CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_POSIX_MQUEUE is not set 180# CONFIG_POSIX_MQUEUE is not set
175CONFIG_BSD_PROCESS_ACCT=y 181CONFIG_BSD_PROCESS_ACCT=y
176# CONFIG_BSD_PROCESS_ACCT_V3 is not set 182# CONFIG_BSD_PROCESS_ACCT_V3 is not set
177CONFIG_SYSCTL=y 183# CONFIG_TASKSTATS is not set
184# CONFIG_UTS_NS is not set
178# CONFIG_AUDIT is not set 185# CONFIG_AUDIT is not set
179# CONFIG_IKCONFIG is not set 186# CONFIG_IKCONFIG is not set
187CONFIG_SYSFS_DEPRECATED=y
180CONFIG_RELAY=y 188CONFIG_RELAY=y
181CONFIG_INITRAMFS_SOURCE=""
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 189# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
190CONFIG_SYSCTL=y
183CONFIG_EMBEDDED=y 191CONFIG_EMBEDDED=y
192CONFIG_SYSCTL_SYSCALL=y
184CONFIG_KALLSYMS=y 193CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 194# CONFIG_KALLSYMS_EXTRA_PASS is not set
186CONFIG_HOTPLUG=y 195CONFIG_HOTPLUG=y
@@ -188,12 +197,12 @@ CONFIG_PRINTK=y
188CONFIG_BUG=y 197CONFIG_BUG=y
189CONFIG_ELF_CORE=y 198CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 199CONFIG_BASE_FULL=y
191CONFIG_RT_MUTEXES=y
192CONFIG_FUTEX=y 200CONFIG_FUTEX=y
193CONFIG_EPOLL=y 201CONFIG_EPOLL=y
194CONFIG_SHMEM=y 202CONFIG_SHMEM=y
195CONFIG_SLAB=y 203CONFIG_SLAB=y
196CONFIG_VM_EVENT_COUNTERS=y 204CONFIG_VM_EVENT_COUNTERS=y
205CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 206# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 207CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set 208# CONFIG_SLOB is not set
@@ -206,6 +215,7 @@ CONFIG_BASE_SMALL=0
206# 215#
207# Block layer 216# Block layer
208# 217#
218CONFIG_BLOCK=y
209# CONFIG_BLK_DEV_IO_TRACE is not set 219# CONFIG_BLK_DEV_IO_TRACE is not set
210 220
211# 221#
@@ -246,11 +256,20 @@ CONFIG_BINFMT_MISC=y
246# CONFIG_BUILD_ELF64 is not set 256# CONFIG_BUILD_ELF64 is not set
247CONFIG_MIPS32_COMPAT=y 257CONFIG_MIPS32_COMPAT=y
248CONFIG_COMPAT=y 258CONFIG_COMPAT=y
259CONFIG_SYSVIPC_COMPAT=y
249CONFIG_MIPS32_O32=y 260CONFIG_MIPS32_O32=y
250# CONFIG_MIPS32_N32 is not set 261# CONFIG_MIPS32_N32 is not set
251CONFIG_BINFMT_ELF32=y 262CONFIG_BINFMT_ELF32=y
252 263
253# 264#
265# Power management options
266#
267CONFIG_PM=y
268# CONFIG_PM_LEGACY is not set
269# CONFIG_PM_DEBUG is not set
270# CONFIG_PM_SYSFS_DEPRECATED is not set
271
272#
254# Networking 273# Networking
255# 274#
256CONFIG_NET=y 275CONFIG_NET=y
@@ -264,7 +283,10 @@ CONFIG_PACKET_MMAP=y
264CONFIG_UNIX=y 283CONFIG_UNIX=y
265CONFIG_XFRM=y 284CONFIG_XFRM=y
266CONFIG_XFRM_USER=y 285CONFIG_XFRM_USER=y
286# CONFIG_XFRM_SUB_POLICY is not set
287CONFIG_XFRM_MIGRATE=y
267CONFIG_NET_KEY=y 288CONFIG_NET_KEY=y
289CONFIG_NET_KEY_MIGRATE=y
268CONFIG_INET=y 290CONFIG_INET=y
269# CONFIG_IP_MULTICAST is not set 291# CONFIG_IP_MULTICAST is not set
270# CONFIG_IP_ADVANCED_ROUTER is not set 292# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -284,10 +306,13 @@ CONFIG_IP_PNP_BOOTP=y
284# CONFIG_INET_TUNNEL is not set 306# CONFIG_INET_TUNNEL is not set
285CONFIG_INET_XFRM_MODE_TRANSPORT=y 307CONFIG_INET_XFRM_MODE_TRANSPORT=y
286CONFIG_INET_XFRM_MODE_TUNNEL=y 308CONFIG_INET_XFRM_MODE_TUNNEL=y
309CONFIG_INET_XFRM_MODE_BEET=y
287CONFIG_INET_DIAG=y 310CONFIG_INET_DIAG=y
288CONFIG_INET_TCP_DIAG=y 311CONFIG_INET_TCP_DIAG=y
289# CONFIG_TCP_CONG_ADVANCED is not set 312# CONFIG_TCP_CONG_ADVANCED is not set
290CONFIG_TCP_CONG_BIC=y 313CONFIG_TCP_CONG_CUBIC=y
314CONFIG_DEFAULT_TCP_CONG="cubic"
315CONFIG_TCP_MD5SIG=y
291# CONFIG_IPV6 is not set 316# CONFIG_IPV6 is not set
292# CONFIG_INET6_XFRM_TUNNEL is not set 317# CONFIG_INET6_XFRM_TUNNEL is not set
293# CONFIG_INET6_TUNNEL is not set 318# CONFIG_INET6_TUNNEL is not set
@@ -317,7 +342,6 @@ CONFIG_NETWORK_SECMARK=y
317# CONFIG_ATALK is not set 342# CONFIG_ATALK is not set
318# CONFIG_X25 is not set 343# CONFIG_X25 is not set
319# CONFIG_LAPB is not set 344# CONFIG_LAPB is not set
320# CONFIG_NET_DIVERT is not set
321# CONFIG_ECONET is not set 345# CONFIG_ECONET is not set
322# CONFIG_WAN_ROUTER is not set 346# CONFIG_WAN_ROUTER is not set
323 347
@@ -372,6 +396,7 @@ CONFIG_PROC_EVENTS=y
372# 396#
373# Plug and Play support 397# Plug and Play support
374# 398#
399# CONFIG_PNPACPI is not set
375 400
376# 401#
377# Block devices 402# Block devices
@@ -393,6 +418,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
393CONFIG_ATA_OVER_ETH=y 418CONFIG_ATA_OVER_ETH=y
394 419
395# 420#
421# Misc devices
422#
423CONFIG_SGI_IOC4=y
424# CONFIG_TIFM_CORE is not set
425
426#
396# ATA/ATAPI/MFM/RLL support 427# ATA/ATAPI/MFM/RLL support
397# 428#
398# CONFIG_IDE is not set 429# CONFIG_IDE is not set
@@ -402,6 +433,8 @@ CONFIG_ATA_OVER_ETH=y
402# 433#
403CONFIG_RAID_ATTRS=y 434CONFIG_RAID_ATTRS=y
404CONFIG_SCSI=y 435CONFIG_SCSI=y
436CONFIG_SCSI_TGT=y
437CONFIG_SCSI_NETLINK=y
405CONFIG_SCSI_PROC_FS=y 438CONFIG_SCSI_PROC_FS=y
406 439
407# 440#
@@ -421,14 +454,17 @@ CONFIG_CHR_DEV_SG=y
421CONFIG_SCSI_MULTI_LUN=y 454CONFIG_SCSI_MULTI_LUN=y
422CONFIG_SCSI_CONSTANTS=y 455CONFIG_SCSI_CONSTANTS=y
423CONFIG_SCSI_LOGGING=y 456CONFIG_SCSI_LOGGING=y
457CONFIG_SCSI_SCAN_ASYNC=y
424 458
425# 459#
426# SCSI Transport Attributes 460# SCSI Transports
427# 461#
428CONFIG_SCSI_SPI_ATTRS=y 462CONFIG_SCSI_SPI_ATTRS=y
429CONFIG_SCSI_FC_ATTRS=y 463CONFIG_SCSI_FC_ATTRS=y
430# CONFIG_SCSI_ISCSI_ATTRS is not set 464# CONFIG_SCSI_ISCSI_ATTRS is not set
431CONFIG_SCSI_SAS_ATTRS=y 465CONFIG_SCSI_SAS_ATTRS=y
466CONFIG_SCSI_SAS_LIBSAS=y
467# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
432 468
433# 469#
434# SCSI low-level drivers 470# SCSI low-level drivers
@@ -446,24 +482,33 @@ CONFIG_AIC7XXX_DEBUG_MASK=0
446CONFIG_AIC7XXX_REG_PRETTY_PRINT=y 482CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
447# CONFIG_SCSI_AIC7XXX_OLD is not set 483# CONFIG_SCSI_AIC7XXX_OLD is not set
448# CONFIG_SCSI_AIC79XX is not set 484# CONFIG_SCSI_AIC79XX is not set
485CONFIG_SCSI_AIC94XX=y
486# CONFIG_AIC94XX_DEBUG is not set
487# CONFIG_SCSI_ARCMSR is not set
449# CONFIG_MEGARAID_NEWGEN is not set 488# CONFIG_MEGARAID_NEWGEN is not set
450# CONFIG_MEGARAID_LEGACY is not set 489# CONFIG_MEGARAID_LEGACY is not set
451# CONFIG_MEGARAID_SAS is not set 490# CONFIG_MEGARAID_SAS is not set
452# CONFIG_SCSI_SATA is not set
453# CONFIG_SCSI_HPTIOP is not set 491# CONFIG_SCSI_HPTIOP is not set
454# CONFIG_SCSI_DMX3191D is not set 492# CONFIG_SCSI_DMX3191D is not set
455# CONFIG_SCSI_FUTURE_DOMAIN is not set 493# CONFIG_SCSI_FUTURE_DOMAIN is not set
456# CONFIG_SCSI_IPS is not set 494# CONFIG_SCSI_IPS is not set
457# CONFIG_SCSI_INITIO is not set 495# CONFIG_SCSI_INITIO is not set
458# CONFIG_SCSI_INIA100 is not set 496# CONFIG_SCSI_INIA100 is not set
497# CONFIG_SCSI_STEX is not set
459# CONFIG_SCSI_SYM53C8XX_2 is not set 498# CONFIG_SCSI_SYM53C8XX_2 is not set
460# CONFIG_SCSI_IPR is not set
461# CONFIG_SCSI_QLOGIC_1280 is not set 499# CONFIG_SCSI_QLOGIC_1280 is not set
462# CONFIG_SCSI_QLA_FC is not set 500# CONFIG_SCSI_QLA_FC is not set
501# CONFIG_SCSI_QLA_ISCSI is not set
463# CONFIG_SCSI_LPFC is not set 502# CONFIG_SCSI_LPFC is not set
464# CONFIG_SCSI_DC395x is not set 503# CONFIG_SCSI_DC395x is not set
465# CONFIG_SCSI_DC390T is not set 504# CONFIG_SCSI_DC390T is not set
466# CONFIG_SCSI_DEBUG is not set 505# CONFIG_SCSI_DEBUG is not set
506# CONFIG_SCSI_SRP is not set
507
508#
509# Serial ATA (prod) and Parallel ATA (experimental) drivers
510#
511# CONFIG_ATA is not set
467 512
468# 513#
469# Multi-device support (RAID and LVM) 514# Multi-device support (RAID and LVM)
@@ -517,6 +562,8 @@ CONFIG_LXT_PHY=y
517CONFIG_CICADA_PHY=y 562CONFIG_CICADA_PHY=y
518CONFIG_VITESSE_PHY=y 563CONFIG_VITESSE_PHY=y
519CONFIG_SMSC_PHY=y 564CONFIG_SMSC_PHY=y
565# CONFIG_BROADCOM_PHY is not set
566# CONFIG_FIXED_PHY is not set
520 567
521# 568#
522# Ethernet (10 or 100Mbit) 569# Ethernet (10 or 100Mbit)
@@ -553,14 +600,18 @@ CONFIG_SGI_O2MACE_ETH=y
553# CONFIG_SK98LIN is not set 600# CONFIG_SK98LIN is not set
554# CONFIG_TIGON3 is not set 601# CONFIG_TIGON3 is not set
555# CONFIG_BNX2 is not set 602# CONFIG_BNX2 is not set
603CONFIG_QLA3XXX=y
604# CONFIG_ATL1 is not set
556 605
557# 606#
558# Ethernet (10000 Mbit) 607# Ethernet (10000 Mbit)
559# 608#
560# CONFIG_CHELSIO_T1 is not set 609# CONFIG_CHELSIO_T1 is not set
610CONFIG_CHELSIO_T3=y
561# CONFIG_IXGB is not set 611# CONFIG_IXGB is not set
562# CONFIG_S2IO is not set 612# CONFIG_S2IO is not set
563# CONFIG_MYRI10GE is not set 613# CONFIG_MYRI10GE is not set
614CONFIG_NETXEN_NIC=y
564 615
565# 616#
566# Token Ring devices 617# Token Ring devices
@@ -600,6 +651,7 @@ CONFIG_SGI_O2MACE_ETH=y
600# Input device support 651# Input device support
601# 652#
602CONFIG_INPUT=y 653CONFIG_INPUT=y
654# CONFIG_INPUT_FF_MEMLESS is not set
603 655
604# 656#
605# Userland interfaces 657# Userland interfaces
@@ -678,10 +730,6 @@ CONFIG_LEGACY_PTY_COUNT=256
678# CONFIG_DTLK is not set 730# CONFIG_DTLK is not set
679# CONFIG_R3964 is not set 731# CONFIG_R3964 is not set
680# CONFIG_APPLICOM is not set 732# CONFIG_APPLICOM is not set
681
682#
683# Ftape, the floppy tape device driver
684#
685# CONFIG_DRM is not set 733# CONFIG_DRM is not set
686# CONFIG_RAW_DRIVER is not set 734# CONFIG_RAW_DRIVER is not set
687 735
@@ -689,7 +737,6 @@ CONFIG_LEGACY_PTY_COUNT=256
689# TPM devices 737# TPM devices
690# 738#
691# CONFIG_TCG_TPM is not set 739# CONFIG_TCG_TPM is not set
692# CONFIG_TELCLOCK is not set
693 740
694# 741#
695# I2C support 742# I2C support
@@ -714,14 +761,9 @@ CONFIG_LEGACY_PTY_COUNT=256
714# CONFIG_HWMON_VID is not set 761# CONFIG_HWMON_VID is not set
715 762
716# 763#
717# Misc devices
718#
719
720#
721# Multimedia devices 764# Multimedia devices
722# 765#
723# CONFIG_VIDEO_DEV is not set 766# CONFIG_VIDEO_DEV is not set
724CONFIG_VIDEO_V4L2=y
725 767
726# 768#
727# Digital Video Broadcasting Devices 769# Digital Video Broadcasting Devices
@@ -739,6 +781,7 @@ CONFIG_VIDEO_V4L2=y
739# 781#
740# CONFIG_VGA_CONSOLE is not set 782# CONFIG_VGA_CONSOLE is not set
741CONFIG_DUMMY_CONSOLE=y 783CONFIG_DUMMY_CONSOLE=y
784# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
742 785
743# 786#
744# Sound 787# Sound
@@ -746,6 +789,12 @@ CONFIG_DUMMY_CONSOLE=y
746# CONFIG_SOUND is not set 789# CONFIG_SOUND is not set
747 790
748# 791#
792# HID Devices
793#
794CONFIG_HID=y
795# CONFIG_HID_DEBUG is not set
796
797#
749# USB support 798# USB support
750# 799#
751CONFIG_USB_ARCH_HAS_HCD=y 800CONFIG_USB_ARCH_HAS_HCD=y
@@ -808,16 +857,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
808# 857#
809 858
810# 859#
860# Auxiliary Display support
861#
862
863#
864# Virtualization
865#
866
867#
811# File systems 868# File systems
812# 869#
813CONFIG_EXT2_FS=y 870CONFIG_EXT2_FS=y
814# CONFIG_EXT2_FS_XATTR is not set 871# CONFIG_EXT2_FS_XATTR is not set
815# CONFIG_EXT2_FS_XIP is not set 872# CONFIG_EXT2_FS_XIP is not set
816# CONFIG_EXT3_FS is not set 873# CONFIG_EXT3_FS is not set
874# CONFIG_EXT4DEV_FS is not set
817# CONFIG_REISERFS_FS is not set 875# CONFIG_REISERFS_FS is not set
818# CONFIG_JFS_FS is not set 876# CONFIG_JFS_FS is not set
819# CONFIG_FS_POSIX_ACL is not set 877CONFIG_FS_POSIX_ACL=y
820# CONFIG_XFS_FS is not set 878# CONFIG_XFS_FS is not set
879# CONFIG_GFS2_FS is not set
821# CONFIG_OCFS2_FS is not set 880# CONFIG_OCFS2_FS is not set
822# CONFIG_MINIX_FS is not set 881# CONFIG_MINIX_FS is not set
823# CONFIG_ROMFS_FS is not set 882# CONFIG_ROMFS_FS is not set
@@ -828,6 +887,7 @@ CONFIG_DNOTIFY=y
828# CONFIG_AUTOFS_FS is not set 887# CONFIG_AUTOFS_FS is not set
829# CONFIG_AUTOFS4_FS is not set 888# CONFIG_AUTOFS4_FS is not set
830CONFIG_FUSE_FS=y 889CONFIG_FUSE_FS=y
890CONFIG_GENERIC_ACL=y
831 891
832# 892#
833# CD-ROM/DVD Filesystems 893# CD-ROM/DVD Filesystems
@@ -847,17 +907,20 @@ CONFIG_FUSE_FS=y
847# 907#
848CONFIG_PROC_FS=y 908CONFIG_PROC_FS=y
849CONFIG_PROC_KCORE=y 909CONFIG_PROC_KCORE=y
910CONFIG_PROC_SYSCTL=y
850CONFIG_SYSFS=y 911CONFIG_SYSFS=y
851CONFIG_TMPFS=y 912CONFIG_TMPFS=y
913CONFIG_TMPFS_POSIX_ACL=y
852# CONFIG_HUGETLB_PAGE is not set 914# CONFIG_HUGETLB_PAGE is not set
853CONFIG_RAMFS=y 915CONFIG_RAMFS=y
854# CONFIG_CONFIGFS_FS is not set 916CONFIG_CONFIGFS_FS=y
855 917
856# 918#
857# Miscellaneous filesystems 919# Miscellaneous filesystems
858# 920#
859# CONFIG_ADFS_FS is not set 921# CONFIG_ADFS_FS is not set
860# CONFIG_AFFS_FS is not set 922# CONFIG_AFFS_FS is not set
923# CONFIG_ECRYPT_FS is not set
861# CONFIG_HFS_FS is not set 924# CONFIG_HFS_FS is not set
862# CONFIG_HFSPLUS_FS is not set 925# CONFIG_HFSPLUS_FS is not set
863# CONFIG_BEFS_FS is not set 926# CONFIG_BEFS_FS is not set
@@ -888,7 +951,6 @@ CONFIG_SUNRPC=y
888# CONFIG_RPCSEC_GSS_SPKM3 is not set 951# CONFIG_RPCSEC_GSS_SPKM3 is not set
889# CONFIG_SMB_FS is not set 952# CONFIG_SMB_FS is not set
890# CONFIG_CIFS is not set 953# CONFIG_CIFS is not set
891# CONFIG_CIFS_DEBUG2 is not set
892# CONFIG_NCP_FS is not set 954# CONFIG_NCP_FS is not set
893# CONFIG_CODA_FS is not set 955# CONFIG_CODA_FS is not set
894# CONFIG_AFS_FS is not set 956# CONFIG_AFS_FS is not set
@@ -917,6 +979,14 @@ CONFIG_SGI_PARTITION=y
917# CONFIG_NLS is not set 979# CONFIG_NLS is not set
918 980
919# 981#
982# Distributed Lock Manager
983#
984CONFIG_DLM=y
985CONFIG_DLM_TCP=y
986# CONFIG_DLM_SCTP is not set
987# CONFIG_DLM_DEBUG is not set
988
989#
920# Profiling support 990# Profiling support
921# 991#
922# CONFIG_PROFILING is not set 992# CONFIG_PROFILING is not set
@@ -926,12 +996,13 @@ CONFIG_SGI_PARTITION=y
926# 996#
927CONFIG_TRACE_IRQFLAGS_SUPPORT=y 997CONFIG_TRACE_IRQFLAGS_SUPPORT=y
928# CONFIG_PRINTK_TIME is not set 998# CONFIG_PRINTK_TIME is not set
999CONFIG_ENABLE_MUST_CHECK=y
929# CONFIG_MAGIC_SYSRQ is not set 1000# CONFIG_MAGIC_SYSRQ is not set
930# CONFIG_UNUSED_SYMBOLS is not set 1001# CONFIG_UNUSED_SYMBOLS is not set
1002# CONFIG_DEBUG_FS is not set
1003# CONFIG_HEADERS_CHECK is not set
931# CONFIG_DEBUG_KERNEL is not set 1004# CONFIG_DEBUG_KERNEL is not set
932CONFIG_LOG_BUF_SHIFT=14 1005CONFIG_LOG_BUF_SHIFT=14
933# CONFIG_DEBUG_FS is not set
934# CONFIG_UNWIND_INFO is not set
935CONFIG_CROSSCOMPILE=y 1006CONFIG_CROSSCOMPILE=y
936CONFIG_CMDLINE="" 1007CONFIG_CMDLINE=""
937 1008
@@ -946,7 +1017,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
946# Cryptographic options 1017# Cryptographic options
947# 1018#
948CONFIG_CRYPTO=y 1019CONFIG_CRYPTO=y
1020CONFIG_CRYPTO_ALGAPI=y
1021CONFIG_CRYPTO_BLKCIPHER=y
1022CONFIG_CRYPTO_HASH=y
1023CONFIG_CRYPTO_MANAGER=y
949CONFIG_CRYPTO_HMAC=y 1024CONFIG_CRYPTO_HMAC=y
1025CONFIG_CRYPTO_XCBC=y
950CONFIG_CRYPTO_NULL=y 1026CONFIG_CRYPTO_NULL=y
951CONFIG_CRYPTO_MD4=y 1027CONFIG_CRYPTO_MD4=y
952CONFIG_CRYPTO_MD5=y 1028CONFIG_CRYPTO_MD5=y
@@ -955,9 +1031,16 @@ CONFIG_CRYPTO_SHA256=y
955CONFIG_CRYPTO_SHA512=y 1031CONFIG_CRYPTO_SHA512=y
956CONFIG_CRYPTO_WP512=y 1032CONFIG_CRYPTO_WP512=y
957CONFIG_CRYPTO_TGR192=y 1033CONFIG_CRYPTO_TGR192=y
1034CONFIG_CRYPTO_GF128MUL=y
1035CONFIG_CRYPTO_ECB=y
1036CONFIG_CRYPTO_CBC=y
1037CONFIG_CRYPTO_PCBC=y
1038CONFIG_CRYPTO_LRW=y
958CONFIG_CRYPTO_DES=y 1039CONFIG_CRYPTO_DES=y
1040CONFIG_CRYPTO_FCRYPT=y
959CONFIG_CRYPTO_BLOWFISH=y 1041CONFIG_CRYPTO_BLOWFISH=y
960CONFIG_CRYPTO_TWOFISH=y 1042CONFIG_CRYPTO_TWOFISH=y
1043CONFIG_CRYPTO_TWOFISH_COMMON=y
961CONFIG_CRYPTO_SERPENT=y 1044CONFIG_CRYPTO_SERPENT=y
962CONFIG_CRYPTO_AES=y 1045CONFIG_CRYPTO_AES=y
963CONFIG_CRYPTO_CAST5=y 1046CONFIG_CRYPTO_CAST5=y
@@ -969,6 +1052,7 @@ CONFIG_CRYPTO_ANUBIS=y
969CONFIG_CRYPTO_DEFLATE=y 1052CONFIG_CRYPTO_DEFLATE=y
970CONFIG_CRYPTO_MICHAEL_MIC=y 1053CONFIG_CRYPTO_MICHAEL_MIC=y
971CONFIG_CRYPTO_CRC32C=y 1054CONFIG_CRYPTO_CRC32C=y
1055CONFIG_CRYPTO_CAMELLIA=y
972 1056
973# 1057#
974# Hardware crypto devices 1058# Hardware crypto devices
@@ -977,6 +1061,7 @@ CONFIG_CRYPTO_CRC32C=y
977# 1061#
978# Library routines 1062# Library routines
979# 1063#
1064CONFIG_BITREVERSE=y
980# CONFIG_CRC_CCITT is not set 1065# CONFIG_CRC_CCITT is not set
981CONFIG_CRC16=y 1066CONFIG_CRC16=y
982CONFIG_CRC32=y 1067CONFIG_CRC32=y
@@ -984,3 +1069,5 @@ CONFIG_LIBCRC32C=y
984CONFIG_ZLIB_INFLATE=y 1069CONFIG_ZLIB_INFLATE=y
985CONFIG_ZLIB_DEFLATE=y 1070CONFIG_ZLIB_DEFLATE=y
986CONFIG_PLIST=y 1071CONFIG_PLIST=y
1072CONFIG_HAS_IOMEM=y
1073CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig
index 88966666f4c6..57ef0c45a62b 100644
--- a/arch/mips/configs/jaguar-atx_defconfig
+++ b/arch/mips/configs/jaguar-atx_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:12 2006 4# Tue Feb 20 21:47:33 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MOMENCO_JAGUAR_ATX=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,10 +65,14 @@ CONFIG_MOMENCO_JAGUAR_ATX=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_JAGUAR_DMALOW=y 66CONFIG_JAGUAR_DMALOW=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
74CONFIG_LIMITED_DMA=y 78CONFIG_LIMITED_DMA=y
@@ -106,6 +110,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
106CONFIG_CPU_RM9000=y 110CONFIG_CPU_RM9000=y
107# CONFIG_CPU_SB1 is not set 111# CONFIG_CPU_SB1 is not set
108CONFIG_SYS_HAS_CPU_RM9000=y 112CONFIG_SYS_HAS_CPU_RM9000=y
113CONFIG_WEAK_ORDERING=y
109CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 114CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
110CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 115CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 116CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -124,8 +129,8 @@ CONFIG_BOARD_SCACHE=y
124CONFIG_RM7000_CPU_SCACHE=y 129CONFIG_RM7000_CPU_SCACHE=y
125CONFIG_CPU_HAS_PREFETCH=y 130CONFIG_CPU_HAS_PREFETCH=y
126CONFIG_MIPS_MT_DISABLED=y 131CONFIG_MIPS_MT_DISABLED=y
127# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_MT_SMP is not set 132# CONFIG_MIPS_MT_SMP is not set
133# CONFIG_MIPS_MT_SMTC is not set
129# CONFIG_MIPS_VPE_LOADER is not set 134# CONFIG_MIPS_VPE_LOADER is not set
130# CONFIG_64BIT_PHYS_ADDR is not set 135# CONFIG_64BIT_PHYS_ADDR is not set
131CONFIG_CPU_HAS_LLSC=y 136CONFIG_CPU_HAS_LLSC=y
@@ -141,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
143# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 150# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 152# CONFIG_HZ_128 is not set
@@ -171,14 +177,19 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 177CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 178CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 179CONFIG_SYSVIPC=y
180# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_BSD_PROCESS_ACCT is not set 182# CONFIG_BSD_PROCESS_ACCT is not set
175CONFIG_SYSCTL=y 183# CONFIG_TASKSTATS is not set
184# CONFIG_UTS_NS is not set
176# CONFIG_AUDIT is not set 185# CONFIG_AUDIT is not set
177CONFIG_IKCONFIG=y 186CONFIG_IKCONFIG=y
178CONFIG_IKCONFIG_PROC=y 187CONFIG_IKCONFIG_PROC=y
188CONFIG_SYSFS_DEPRECATED=y
179CONFIG_RELAY=y 189CONFIG_RELAY=y
180CONFIG_INITRAMFS_SOURCE="" 190CONFIG_SYSCTL=y
181CONFIG_EMBEDDED=y 191CONFIG_EMBEDDED=y
192CONFIG_SYSCTL_SYSCALL=y
182CONFIG_KALLSYMS=y 193CONFIG_KALLSYMS=y
183# CONFIG_KALLSYMS_EXTRA_PASS is not set 194# CONFIG_KALLSYMS_EXTRA_PASS is not set
184CONFIG_HOTPLUG=y 195CONFIG_HOTPLUG=y
@@ -186,12 +197,12 @@ CONFIG_PRINTK=y
186CONFIG_BUG=y 197CONFIG_BUG=y
187CONFIG_ELF_CORE=y 198CONFIG_ELF_CORE=y
188CONFIG_BASE_FULL=y 199CONFIG_BASE_FULL=y
189CONFIG_RT_MUTEXES=y
190CONFIG_FUTEX=y 200CONFIG_FUTEX=y
191CONFIG_EPOLL=y 201CONFIG_EPOLL=y
192CONFIG_SHMEM=y 202CONFIG_SHMEM=y
193CONFIG_SLAB=y 203CONFIG_SLAB=y
194CONFIG_VM_EVENT_COUNTERS=y 204CONFIG_VM_EVENT_COUNTERS=y
205CONFIG_RT_MUTEXES=y
195# CONFIG_TINY_SHMEM is not set 206# CONFIG_TINY_SHMEM is not set
196CONFIG_BASE_SMALL=0 207CONFIG_BASE_SMALL=0
197# CONFIG_SLOB is not set 208# CONFIG_SLOB is not set
@@ -208,6 +219,7 @@ CONFIG_KMOD=y
208# 219#
209# Block layer 220# Block layer
210# 221#
222CONFIG_BLOCK=y
211# CONFIG_LBD is not set 223# CONFIG_LBD is not set
212# CONFIG_BLK_DEV_IO_TRACE is not set 224# CONFIG_BLK_DEV_IO_TRACE is not set
213# CONFIG_LSF is not set 225# CONFIG_LSF is not set
@@ -249,6 +261,14 @@ CONFIG_BINFMT_ELF=y
249CONFIG_TRAD_SIGNALS=y 261CONFIG_TRAD_SIGNALS=y
250 262
251# 263#
264# Power management options
265#
266CONFIG_PM=y
267# CONFIG_PM_LEGACY is not set
268# CONFIG_PM_DEBUG is not set
269# CONFIG_PM_SYSFS_DEPRECATED is not set
270
271#
252# Networking 272# Networking
253# 273#
254CONFIG_NET=y 274CONFIG_NET=y
@@ -277,13 +297,15 @@ CONFIG_IP_PNP_BOOTP=y
277# CONFIG_INET_ESP is not set 297# CONFIG_INET_ESP is not set
278# CONFIG_INET_IPCOMP is not set 298# CONFIG_INET_IPCOMP is not set
279# CONFIG_INET_XFRM_TUNNEL is not set 299# CONFIG_INET_XFRM_TUNNEL is not set
280# CONFIG_INET_TUNNEL is not set 300CONFIG_INET_TUNNEL=m
281CONFIG_INET_XFRM_MODE_TRANSPORT=m 301CONFIG_INET_XFRM_MODE_TRANSPORT=m
282CONFIG_INET_XFRM_MODE_TUNNEL=m 302CONFIG_INET_XFRM_MODE_TUNNEL=m
303CONFIG_INET_XFRM_MODE_BEET=m
283CONFIG_INET_DIAG=y 304CONFIG_INET_DIAG=y
284CONFIG_INET_TCP_DIAG=y 305CONFIG_INET_TCP_DIAG=y
285# CONFIG_TCP_CONG_ADVANCED is not set 306# CONFIG_TCP_CONG_ADVANCED is not set
286CONFIG_TCP_CONG_BIC=y 307CONFIG_TCP_CONG_CUBIC=y
308CONFIG_DEFAULT_TCP_CONG="cubic"
287CONFIG_IPV6=m 309CONFIG_IPV6=m
288CONFIG_IPV6_PRIVACY=y 310CONFIG_IPV6_PRIVACY=y
289CONFIG_IPV6_ROUTER_PREF=y 311CONFIG_IPV6_ROUTER_PREF=y
@@ -294,6 +316,8 @@ CONFIG_INET6_XFRM_TUNNEL=m
294CONFIG_INET6_TUNNEL=m 316CONFIG_INET6_TUNNEL=m
295CONFIG_INET6_XFRM_MODE_TRANSPORT=m 317CONFIG_INET6_XFRM_MODE_TRANSPORT=m
296CONFIG_INET6_XFRM_MODE_TUNNEL=m 318CONFIG_INET6_XFRM_MODE_TUNNEL=m
319CONFIG_INET6_XFRM_MODE_BEET=m
320CONFIG_IPV6_SIT=m
297CONFIG_IPV6_TUNNEL=m 321CONFIG_IPV6_TUNNEL=m
298CONFIG_NETWORK_SECMARK=y 322CONFIG_NETWORK_SECMARK=y
299# CONFIG_NETFILTER is not set 323# CONFIG_NETFILTER is not set
@@ -351,6 +375,7 @@ CONFIG_CONNECTOR=m
351# 375#
352# Plug and Play support 376# Plug and Play support
353# 377#
378# CONFIG_PNPACPI is not set
354 379
355# 380#
356# Block devices 381# Block devices
@@ -369,6 +394,11 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
369CONFIG_ATA_OVER_ETH=m 394CONFIG_ATA_OVER_ETH=m
370 395
371# 396#
397# Misc devices
398#
399CONFIG_SGI_IOC4=m
400
401#
372# ATA/ATAPI/MFM/RLL support 402# ATA/ATAPI/MFM/RLL support
373# 403#
374# CONFIG_IDE is not set 404# CONFIG_IDE is not set
@@ -378,6 +408,12 @@ CONFIG_ATA_OVER_ETH=m
378# 408#
379CONFIG_RAID_ATTRS=m 409CONFIG_RAID_ATTRS=m
380# CONFIG_SCSI is not set 410# CONFIG_SCSI is not set
411# CONFIG_SCSI_NETLINK is not set
412
413#
414# Serial ATA (prod) and Parallel ATA (experimental) drivers
415#
416# CONFIG_ATA is not set
381 417
382# 418#
383# Multi-device support (RAID and LVM) 419# Multi-device support (RAID and LVM)
@@ -428,6 +464,8 @@ CONFIG_LXT_PHY=m
428CONFIG_CICADA_PHY=m 464CONFIG_CICADA_PHY=m
429CONFIG_VITESSE_PHY=m 465CONFIG_VITESSE_PHY=m
430CONFIG_SMSC_PHY=m 466CONFIG_SMSC_PHY=m
467# CONFIG_BROADCOM_PHY is not set
468# CONFIG_FIXED_PHY is not set
431 469
432# 470#
433# Ethernet (10 or 100Mbit) 471# Ethernet (10 or 100Mbit)
@@ -475,22 +513,23 @@ CONFIG_EEPRO100=y
475# CONFIG_R8169 is not set 513# CONFIG_R8169 is not set
476# CONFIG_SIS190 is not set 514# CONFIG_SIS190 is not set
477# CONFIG_SKGE is not set 515# CONFIG_SKGE is not set
516# CONFIG_SKY2 is not set
478# CONFIG_SK98LIN is not set 517# CONFIG_SK98LIN is not set
479# CONFIG_VIA_VELOCITY is not set 518# CONFIG_VIA_VELOCITY is not set
480# CONFIG_TIGON3 is not set 519# CONFIG_TIGON3 is not set
481# CONFIG_BNX2 is not set 520# CONFIG_BNX2 is not set
482CONFIG_MV643XX_ETH=y 521CONFIG_MV643XX_ETH=y
483CONFIG_MV643XX_ETH_0=y 522CONFIG_QLA3XXX=m
484CONFIG_MV643XX_ETH_1=y
485CONFIG_MV643XX_ETH_2=y
486 523
487# 524#
488# Ethernet (10000 Mbit) 525# Ethernet (10000 Mbit)
489# 526#
490# CONFIG_CHELSIO_T1 is not set 527# CONFIG_CHELSIO_T1 is not set
528CONFIG_CHELSIO_T3=m
491# CONFIG_IXGB is not set 529# CONFIG_IXGB is not set
492# CONFIG_S2IO is not set 530# CONFIG_S2IO is not set
493# CONFIG_MYRI10GE is not set 531# CONFIG_MYRI10GE is not set
532CONFIG_NETXEN_NIC=m
494 533
495# 534#
496# Token Ring devices 535# Token Ring devices
@@ -574,10 +613,6 @@ CONFIG_LEGACY_PTY_COUNT=256
574# CONFIG_DTLK is not set 613# CONFIG_DTLK is not set
575# CONFIG_R3964 is not set 614# CONFIG_R3964 is not set
576# CONFIG_APPLICOM is not set 615# CONFIG_APPLICOM is not set
577
578#
579# Ftape, the floppy tape device driver
580#
581# CONFIG_DRM is not set 616# CONFIG_DRM is not set
582# CONFIG_RAW_DRIVER is not set 617# CONFIG_RAW_DRIVER is not set
583 618
@@ -608,14 +643,9 @@ CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_HWMON_VID is not set 643# CONFIG_HWMON_VID is not set
609 644
610# 645#
611# Misc devices
612#
613
614#
615# Multimedia devices 646# Multimedia devices
616# 647#
617# CONFIG_VIDEO_DEV is not set 648# CONFIG_VIDEO_DEV is not set
618CONFIG_VIDEO_V4L2=y
619 649
620# 650#
621# Digital Video Broadcasting Devices 651# Digital Video Broadcasting Devices
@@ -627,6 +657,7 @@ CONFIG_VIDEO_V4L2=y
627# 657#
628# CONFIG_FIRMWARE_EDID is not set 658# CONFIG_FIRMWARE_EDID is not set
629# CONFIG_FB is not set 659# CONFIG_FB is not set
660# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
630 661
631# 662#
632# Sound 663# Sound
@@ -695,14 +726,23 @@ CONFIG_USB_ARCH_HAS_EHCI=y
695# 726#
696 727
697# 728#
729# Auxiliary Display support
730#
731
732#
733# Virtualization
734#
735
736#
698# File systems 737# File systems
699# 738#
700# CONFIG_EXT2_FS is not set 739# CONFIG_EXT2_FS is not set
701# CONFIG_EXT3_FS is not set 740# CONFIG_EXT3_FS is not set
702# CONFIG_REISERFS_FS is not set 741# CONFIG_REISERFS_FS is not set
703# CONFIG_JFS_FS is not set 742# CONFIG_JFS_FS is not set
704# CONFIG_FS_POSIX_ACL is not set 743CONFIG_FS_POSIX_ACL=y
705# CONFIG_XFS_FS is not set 744# CONFIG_XFS_FS is not set
745# CONFIG_OCFS2_FS is not set
706# CONFIG_MINIX_FS is not set 746# CONFIG_MINIX_FS is not set
707# CONFIG_ROMFS_FS is not set 747# CONFIG_ROMFS_FS is not set
708CONFIG_INOTIFY=y 748CONFIG_INOTIFY=y
@@ -712,6 +752,7 @@ CONFIG_DNOTIFY=y
712# CONFIG_AUTOFS_FS is not set 752# CONFIG_AUTOFS_FS is not set
713# CONFIG_AUTOFS4_FS is not set 753# CONFIG_AUTOFS4_FS is not set
714CONFIG_FUSE_FS=m 754CONFIG_FUSE_FS=m
755CONFIG_GENERIC_ACL=y
715 756
716# 757#
717# CD-ROM/DVD Filesystems 758# CD-ROM/DVD Filesystems
@@ -731,8 +772,10 @@ CONFIG_FUSE_FS=m
731# 772#
732CONFIG_PROC_FS=y 773CONFIG_PROC_FS=y
733CONFIG_PROC_KCORE=y 774CONFIG_PROC_KCORE=y
775CONFIG_PROC_SYSCTL=y
734CONFIG_SYSFS=y 776CONFIG_SYSFS=y
735CONFIG_TMPFS=y 777CONFIG_TMPFS=y
778CONFIG_TMPFS_POSIX_ACL=y
736# CONFIG_HUGETLB_PAGE is not set 779# CONFIG_HUGETLB_PAGE is not set
737CONFIG_RAMFS=y 780CONFIG_RAMFS=y
738 781
@@ -752,6 +795,7 @@ CONFIG_RAMFS=y
752# 795#
753CONFIG_NFS_FS=y 796CONFIG_NFS_FS=y
754# CONFIG_NFS_V3 is not set 797# CONFIG_NFS_V3 is not set
798# CONFIG_NFS_DIRECTIO is not set
755# CONFIG_NFSD is not set 799# CONFIG_NFSD is not set
756CONFIG_ROOT_NFS=y 800CONFIG_ROOT_NFS=y
757CONFIG_LOCKD=y 801CONFIG_LOCKD=y
@@ -759,7 +803,6 @@ CONFIG_NFS_COMMON=y
759CONFIG_SUNRPC=y 803CONFIG_SUNRPC=y
760# CONFIG_SMB_FS is not set 804# CONFIG_SMB_FS is not set
761# CONFIG_CIFS is not set 805# CONFIG_CIFS is not set
762# CONFIG_CIFS_DEBUG2 is not set
763# CONFIG_NCP_FS is not set 806# CONFIG_NCP_FS is not set
764# CONFIG_CODA_FS is not set 807# CONFIG_CODA_FS is not set
765 808
@@ -779,13 +822,16 @@ CONFIG_MSDOS_PARTITION=y
779# 822#
780CONFIG_TRACE_IRQFLAGS_SUPPORT=y 823CONFIG_TRACE_IRQFLAGS_SUPPORT=y
781# CONFIG_PRINTK_TIME is not set 824# CONFIG_PRINTK_TIME is not set
825CONFIG_ENABLE_MUST_CHECK=y
782# CONFIG_MAGIC_SYSRQ is not set 826# CONFIG_MAGIC_SYSRQ is not set
783# CONFIG_UNUSED_SYMBOLS is not set 827# CONFIG_UNUSED_SYMBOLS is not set
828# CONFIG_DEBUG_FS is not set
829# CONFIG_HEADERS_CHECK is not set
784# CONFIG_DEBUG_KERNEL is not set 830# CONFIG_DEBUG_KERNEL is not set
785CONFIG_LOG_BUF_SHIFT=14 831CONFIG_LOG_BUF_SHIFT=14
786# CONFIG_DEBUG_FS is not set
787CONFIG_CROSSCOMPILE=y 832CONFIG_CROSSCOMPILE=y
788CONFIG_CMDLINE="" 833CONFIG_CMDLINE=""
834CONFIG_SYS_SUPPORTS_KGDB=y
789 835
790# 836#
791# Security options 837# Security options
@@ -798,6 +844,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
798# Cryptographic options 844# Cryptographic options
799# 845#
800CONFIG_CRYPTO=y 846CONFIG_CRYPTO=y
847CONFIG_CRYPTO_ALGAPI=y
848CONFIG_CRYPTO_BLKCIPHER=m
849CONFIG_CRYPTO_HASH=y
850CONFIG_CRYPTO_MANAGER=y
801CONFIG_CRYPTO_HMAC=y 851CONFIG_CRYPTO_HMAC=y
802CONFIG_CRYPTO_NULL=m 852CONFIG_CRYPTO_NULL=m
803CONFIG_CRYPTO_MD4=m 853CONFIG_CRYPTO_MD4=m
@@ -807,9 +857,14 @@ CONFIG_CRYPTO_SHA256=m
807CONFIG_CRYPTO_SHA512=m 857CONFIG_CRYPTO_SHA512=m
808CONFIG_CRYPTO_WP512=m 858CONFIG_CRYPTO_WP512=m
809CONFIG_CRYPTO_TGR192=m 859CONFIG_CRYPTO_TGR192=m
860CONFIG_CRYPTO_ECB=m
861CONFIG_CRYPTO_CBC=m
862CONFIG_CRYPTO_PCBC=m
810CONFIG_CRYPTO_DES=m 863CONFIG_CRYPTO_DES=m
864CONFIG_CRYPTO_FCRYPT=m
811CONFIG_CRYPTO_BLOWFISH=m 865CONFIG_CRYPTO_BLOWFISH=m
812CONFIG_CRYPTO_TWOFISH=m 866CONFIG_CRYPTO_TWOFISH=m
867CONFIG_CRYPTO_TWOFISH_COMMON=m
813CONFIG_CRYPTO_SERPENT=m 868CONFIG_CRYPTO_SERPENT=m
814CONFIG_CRYPTO_AES=m 869CONFIG_CRYPTO_AES=m
815CONFIG_CRYPTO_CAST5=m 870CONFIG_CRYPTO_CAST5=m
@@ -821,6 +876,7 @@ CONFIG_CRYPTO_ANUBIS=m
821CONFIG_CRYPTO_DEFLATE=m 876CONFIG_CRYPTO_DEFLATE=m
822CONFIG_CRYPTO_MICHAEL_MIC=m 877CONFIG_CRYPTO_MICHAEL_MIC=m
823CONFIG_CRYPTO_CRC32C=m 878CONFIG_CRYPTO_CRC32C=m
879CONFIG_CRYPTO_CAMELLIA=m
824# CONFIG_CRYPTO_TEST is not set 880# CONFIG_CRYPTO_TEST is not set
825 881
826# 882#
@@ -830,6 +886,7 @@ CONFIG_CRYPTO_CRC32C=m
830# 886#
831# Library routines 887# Library routines
832# 888#
889CONFIG_BITREVERSE=m
833# CONFIG_CRC_CCITT is not set 890# CONFIG_CRC_CCITT is not set
834CONFIG_CRC16=m 891CONFIG_CRC16=m
835CONFIG_CRC32=m 892CONFIG_CRC32=m
@@ -837,3 +894,5 @@ CONFIG_LIBCRC32C=m
837CONFIG_ZLIB_INFLATE=m 894CONFIG_ZLIB_INFLATE=m
838CONFIG_ZLIB_DEFLATE=m 895CONFIG_ZLIB_DEFLATE=m
839CONFIG_PLIST=y 896CONFIG_PLIST=y
897CONFIG_HAS_IOMEM=y
898CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index 835764d834f7..21d979f8326c 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc1 3# Linux kernel version: 2.6.20
4# Sun Oct 8 19:03:07 2006 4# Tue Feb 20 21:47:33 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MACH_JAZZ=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
42# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -65,11 +67,14 @@ CONFIG_MACH_JAZZ=y
65# CONFIG_MIPS_MAGNUM_4000 is not set 67# CONFIG_MIPS_MAGNUM_4000 is not set
66CONFIG_OLIVETTI_M700=y 68CONFIG_OLIVETTI_M700=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 69CONFIG_RWSEM_GENERIC_SPINLOCK=y
70# CONFIG_ARCH_HAS_ILOG2_U32 is not set
71# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 72CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 73CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 74CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y 75CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
77CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
73CONFIG_ARC=y 78CONFIG_ARC=y
74CONFIG_ARCH_MAY_HAVE_PC_FDC=y 79CONFIG_ARCH_MAY_HAVE_PC_FDC=y
75CONFIG_DMA_NONCOHERENT=y 80CONFIG_DMA_NONCOHERENT=y
@@ -140,6 +145,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
140# CONFIG_SPARSEMEM_STATIC is not set 145# CONFIG_SPARSEMEM_STATIC is not set
141CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
142# CONFIG_RESOURCES_64BIT is not set 147# CONFIG_RESOURCES_64BIT is not set
148CONFIG_ZONE_DMA_FLAG=1
143# CONFIG_HZ_48 is not set 149# CONFIG_HZ_48 is not set
144CONFIG_HZ_100=y 150CONFIG_HZ_100=y
145# CONFIG_HZ_128 is not set 151# CONFIG_HZ_128 is not set
@@ -152,6 +158,7 @@ CONFIG_HZ=100
152# CONFIG_PREEMPT_NONE is not set 158# CONFIG_PREEMPT_NONE is not set
153CONFIG_PREEMPT_VOLUNTARY=y 159CONFIG_PREEMPT_VOLUNTARY=y
154# CONFIG_PREEMPT is not set 160# CONFIG_PREEMPT is not set
161# CONFIG_KEXEC is not set
155CONFIG_LOCKDEP_SUPPORT=y 162CONFIG_LOCKDEP_SUPPORT=y
156CONFIG_STACKTRACE_SUPPORT=y 163CONFIG_STACKTRACE_SUPPORT=y
157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 164CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,6 +178,7 @@ CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y 178CONFIG_SWAP=y
172CONFIG_SYSVIPC=y 179CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set 180# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y
174CONFIG_POSIX_MQUEUE=y 182CONFIG_POSIX_MQUEUE=y
175CONFIG_BSD_PROCESS_ACCT=y 183CONFIG_BSD_PROCESS_ACCT=y
176# CONFIG_BSD_PROCESS_ACCT_V3 is not set 184# CONFIG_BSD_PROCESS_ACCT_V3 is not set
@@ -179,8 +187,8 @@ CONFIG_BSD_PROCESS_ACCT=y
179# CONFIG_AUDIT is not set 187# CONFIG_AUDIT is not set
180CONFIG_IKCONFIG=y 188CONFIG_IKCONFIG=y
181CONFIG_IKCONFIG_PROC=y 189CONFIG_IKCONFIG_PROC=y
190CONFIG_SYSFS_DEPRECATED=y
182CONFIG_RELAY=y 191CONFIG_RELAY=y
183CONFIG_INITRAMFS_SOURCE=""
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y 193CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y 194CONFIG_EMBEDDED=y
@@ -257,6 +265,14 @@ CONFIG_BINFMT_MISC=m
257CONFIG_TRAD_SIGNALS=y 265CONFIG_TRAD_SIGNALS=y
258 266
259# 267#
268# Power management options
269#
270CONFIG_PM=y
271# CONFIG_PM_LEGACY is not set
272# CONFIG_PM_DEBUG is not set
273# CONFIG_PM_SYSFS_DEPRECATED is not set
274
275#
260# Networking 276# Networking
261# 277#
262CONFIG_NET=y 278CONFIG_NET=y
@@ -271,7 +287,9 @@ CONFIG_UNIX=y
271CONFIG_XFRM=y 287CONFIG_XFRM=y
272# CONFIG_XFRM_USER is not set 288# CONFIG_XFRM_USER is not set
273# CONFIG_XFRM_SUB_POLICY is not set 289# CONFIG_XFRM_SUB_POLICY is not set
290CONFIG_XFRM_MIGRATE=y
274CONFIG_NET_KEY=m 291CONFIG_NET_KEY=m
292CONFIG_NET_KEY_MIGRATE=y
275CONFIG_INET=y 293CONFIG_INET=y
276CONFIG_IP_MULTICAST=y 294CONFIG_IP_MULTICAST=y
277# CONFIG_IP_ADVANCED_ROUTER is not set 295# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -298,6 +316,7 @@ CONFIG_INET_TCP_DIAG=y
298# CONFIG_TCP_CONG_ADVANCED is not set 316# CONFIG_TCP_CONG_ADVANCED is not set
299CONFIG_TCP_CONG_CUBIC=y 317CONFIG_TCP_CONG_CUBIC=y
300CONFIG_DEFAULT_TCP_CONG="cubic" 318CONFIG_DEFAULT_TCP_CONG="cubic"
319CONFIG_TCP_MD5SIG=y
301 320
302# 321#
303# IP: Virtual Server Configuration 322# IP: Virtual Server Configuration
@@ -317,8 +336,8 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m
317CONFIG_INET6_XFRM_MODE_TUNNEL=m 336CONFIG_INET6_XFRM_MODE_TUNNEL=m
318CONFIG_INET6_XFRM_MODE_BEET=m 337CONFIG_INET6_XFRM_MODE_BEET=m
319# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 338# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
339CONFIG_IPV6_SIT=m
320CONFIG_IPV6_TUNNEL=m 340CONFIG_IPV6_TUNNEL=m
321# CONFIG_IPV6_SUBTREES is not set
322# CONFIG_IPV6_MULTIPLE_TABLES is not set 341# CONFIG_IPV6_MULTIPLE_TABLES is not set
323CONFIG_NETWORK_SECMARK=y 342CONFIG_NETWORK_SECMARK=y
324CONFIG_NETFILTER=y 343CONFIG_NETFILTER=y
@@ -331,16 +350,39 @@ CONFIG_BRIDGE_NETFILTER=y
331CONFIG_NETFILTER_NETLINK=m 350CONFIG_NETFILTER_NETLINK=m
332CONFIG_NETFILTER_NETLINK_QUEUE=m 351CONFIG_NETFILTER_NETLINK_QUEUE=m
333CONFIG_NETFILTER_NETLINK_LOG=m 352CONFIG_NETFILTER_NETLINK_LOG=m
353CONFIG_NF_CONNTRACK_ENABLED=m
354CONFIG_NF_CONNTRACK_SUPPORT=y
355# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
356CONFIG_NF_CONNTRACK=m
357CONFIG_NF_CT_ACCT=y
358CONFIG_NF_CONNTRACK_MARK=y
359CONFIG_NF_CONNTRACK_SECMARK=y
360CONFIG_NF_CONNTRACK_EVENTS=y
361CONFIG_NF_CT_PROTO_GRE=m
362CONFIG_NF_CT_PROTO_SCTP=m
363CONFIG_NF_CONNTRACK_AMANDA=m
364CONFIG_NF_CONNTRACK_FTP=m
365CONFIG_NF_CONNTRACK_H323=m
366CONFIG_NF_CONNTRACK_IRC=m
367# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
368CONFIG_NF_CONNTRACK_PPTP=m
369CONFIG_NF_CONNTRACK_SANE=m
370CONFIG_NF_CONNTRACK_SIP=m
371CONFIG_NF_CONNTRACK_TFTP=m
372CONFIG_NF_CT_NETLINK=m
334CONFIG_NETFILTER_XTABLES=m 373CONFIG_NETFILTER_XTABLES=m
335CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 374CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
336CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 375CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
337# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 376# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
338CONFIG_NETFILTER_XT_TARGET_MARK=m 377CONFIG_NETFILTER_XT_TARGET_MARK=m
339CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 378CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
379CONFIG_NETFILTER_XT_TARGET_NFLOG=m
340CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 380CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
341CONFIG_NETFILTER_XT_TARGET_SECMARK=m 381CONFIG_NETFILTER_XT_TARGET_SECMARK=m
342# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set 382# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
383CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
343CONFIG_NETFILTER_XT_MATCH_COMMENT=m 384CONFIG_NETFILTER_XT_MATCH_COMMENT=m
385CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
344CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 386CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
345CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 387CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
346CONFIG_NETFILTER_XT_MATCH_DCCP=m 388CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -362,25 +404,13 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
362CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 404CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
363CONFIG_NETFILTER_XT_MATCH_STRING=m 405CONFIG_NETFILTER_XT_MATCH_STRING=m
364CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 406CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
407CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
365 408
366# 409#
367# IP: Netfilter Configuration 410# IP: Netfilter Configuration
368# 411#
369CONFIG_IP_NF_CONNTRACK=m 412CONFIG_NF_CONNTRACK_IPV4=m
370# CONFIG_IP_NF_CT_ACCT is not set 413CONFIG_NF_CONNTRACK_PROC_COMPAT=y
371CONFIG_IP_NF_CONNTRACK_MARK=y
372CONFIG_IP_NF_CONNTRACK_SECMARK=y
373CONFIG_IP_NF_CONNTRACK_EVENTS=y
374CONFIG_IP_NF_CONNTRACK_NETLINK=m
375CONFIG_IP_NF_CT_PROTO_SCTP=m
376CONFIG_IP_NF_FTP=m
377CONFIG_IP_NF_IRC=m
378# CONFIG_IP_NF_NETBIOS_NS is not set
379CONFIG_IP_NF_TFTP=m
380CONFIG_IP_NF_AMANDA=m
381CONFIG_IP_NF_PPTP=m
382CONFIG_IP_NF_H323=m
383CONFIG_IP_NF_SIP=m
384CONFIG_IP_NF_QUEUE=m 414CONFIG_IP_NF_QUEUE=m
385CONFIG_IP_NF_IPTABLES=m 415CONFIG_IP_NF_IPTABLES=m
386CONFIG_IP_NF_MATCH_IPRANGE=m 416CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -391,26 +421,25 @@ CONFIG_IP_NF_MATCH_AH=m
391CONFIG_IP_NF_MATCH_TTL=m 421CONFIG_IP_NF_MATCH_TTL=m
392CONFIG_IP_NF_MATCH_OWNER=m 422CONFIG_IP_NF_MATCH_OWNER=m
393CONFIG_IP_NF_MATCH_ADDRTYPE=m 423CONFIG_IP_NF_MATCH_ADDRTYPE=m
394CONFIG_IP_NF_MATCH_HASHLIMIT=m
395CONFIG_IP_NF_FILTER=m 424CONFIG_IP_NF_FILTER=m
396CONFIG_IP_NF_TARGET_REJECT=m 425CONFIG_IP_NF_TARGET_REJECT=m
397CONFIG_IP_NF_TARGET_LOG=m 426CONFIG_IP_NF_TARGET_LOG=m
398CONFIG_IP_NF_TARGET_ULOG=m 427CONFIG_IP_NF_TARGET_ULOG=m
399CONFIG_IP_NF_TARGET_TCPMSS=m 428CONFIG_NF_NAT=m
400CONFIG_IP_NF_NAT=m 429CONFIG_NF_NAT_NEEDED=y
401CONFIG_IP_NF_NAT_NEEDED=y
402CONFIG_IP_NF_TARGET_MASQUERADE=m 430CONFIG_IP_NF_TARGET_MASQUERADE=m
403CONFIG_IP_NF_TARGET_REDIRECT=m 431CONFIG_IP_NF_TARGET_REDIRECT=m
404CONFIG_IP_NF_TARGET_NETMAP=m 432CONFIG_IP_NF_TARGET_NETMAP=m
405CONFIG_IP_NF_TARGET_SAME=m 433CONFIG_IP_NF_TARGET_SAME=m
406CONFIG_IP_NF_NAT_SNMP_BASIC=m 434CONFIG_NF_NAT_SNMP_BASIC=m
407CONFIG_IP_NF_NAT_IRC=m 435CONFIG_NF_NAT_PROTO_GRE=m
408CONFIG_IP_NF_NAT_FTP=m 436CONFIG_NF_NAT_FTP=m
409CONFIG_IP_NF_NAT_TFTP=m 437CONFIG_NF_NAT_IRC=m
410CONFIG_IP_NF_NAT_AMANDA=m 438CONFIG_NF_NAT_TFTP=m
411CONFIG_IP_NF_NAT_PPTP=m 439CONFIG_NF_NAT_AMANDA=m
412CONFIG_IP_NF_NAT_H323=m 440CONFIG_NF_NAT_PPTP=m
413CONFIG_IP_NF_NAT_SIP=m 441CONFIG_NF_NAT_H323=m
442CONFIG_NF_NAT_SIP=m
414CONFIG_IP_NF_MANGLE=m 443CONFIG_IP_NF_MANGLE=m
415CONFIG_IP_NF_TARGET_TOS=m 444CONFIG_IP_NF_TARGET_TOS=m
416CONFIG_IP_NF_TARGET_ECN=m 445CONFIG_IP_NF_TARGET_ECN=m
@@ -424,6 +453,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
424# 453#
425# IPv6: Netfilter Configuration (EXPERIMENTAL) 454# IPv6: Netfilter Configuration (EXPERIMENTAL)
426# 455#
456CONFIG_NF_CONNTRACK_IPV6=m
427CONFIG_IP6_NF_QUEUE=m 457CONFIG_IP6_NF_QUEUE=m
428CONFIG_IP6_NF_IPTABLES=m 458CONFIG_IP6_NF_IPTABLES=m
429CONFIG_IP6_NF_MATCH_RT=m 459CONFIG_IP6_NF_MATCH_RT=m
@@ -433,6 +463,7 @@ CONFIG_IP6_NF_MATCH_HL=m
433CONFIG_IP6_NF_MATCH_OWNER=m 463CONFIG_IP6_NF_MATCH_OWNER=m
434CONFIG_IP6_NF_MATCH_IPV6HEADER=m 464CONFIG_IP6_NF_MATCH_IPV6HEADER=m
435CONFIG_IP6_NF_MATCH_AH=m 465CONFIG_IP6_NF_MATCH_AH=m
466CONFIG_IP6_NF_MATCH_MH=m
436CONFIG_IP6_NF_MATCH_EUI64=m 467CONFIG_IP6_NF_MATCH_EUI64=m
437CONFIG_IP6_NF_FILTER=m 468CONFIG_IP6_NF_FILTER=m
438CONFIG_IP6_NF_TARGET_LOG=m 469CONFIG_IP6_NF_TARGET_LOG=m
@@ -502,6 +533,7 @@ CONFIG_LLC=m
502# QoS and/or fair queueing 533# QoS and/or fair queueing
503# 534#
504CONFIG_NET_SCHED=y 535CONFIG_NET_SCHED=y
536CONFIG_NET_SCH_FIFO=y
505CONFIG_NET_SCH_CLK_JIFFIES=y 537CONFIG_NET_SCH_CLK_JIFFIES=y
506# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 538# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
507# CONFIG_NET_SCH_CLK_CPU is not set 539# CONFIG_NET_SCH_CLK_CPU is not set
@@ -614,13 +646,13 @@ CONFIG_PARPORT_1284=y
614# Plug and Play support 646# Plug and Play support
615# 647#
616# CONFIG_PNP is not set 648# CONFIG_PNP is not set
649# CONFIG_PNPACPI is not set
617 650
618# 651#
619# Block devices 652# Block devices
620# 653#
621CONFIG_BLK_DEV_FD=m 654CONFIG_BLK_DEV_FD=m
622CONFIG_PARIDE=m 655CONFIG_PARIDE=m
623CONFIG_PARIDE_PARPORT=m
624 656
625# 657#
626# Parallel IDE high-level drivers 658# Parallel IDE high-level drivers
@@ -665,6 +697,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
665CONFIG_ATA_OVER_ETH=m 697CONFIG_ATA_OVER_ETH=m
666 698
667# 699#
700# Misc devices
701#
702
703#
668# ATA/ATAPI/MFM/RLL support 704# ATA/ATAPI/MFM/RLL support
669# 705#
670# CONFIG_IDE is not set 706# CONFIG_IDE is not set
@@ -674,6 +710,7 @@ CONFIG_ATA_OVER_ETH=m
674# 710#
675CONFIG_RAID_ATTRS=m 711CONFIG_RAID_ATTRS=m
676CONFIG_SCSI=y 712CONFIG_SCSI=y
713CONFIG_SCSI_TGT=m
677CONFIG_SCSI_NETLINK=y 714CONFIG_SCSI_NETLINK=y
678CONFIG_SCSI_PROC_FS=y 715CONFIG_SCSI_PROC_FS=y
679 716
@@ -694,6 +731,7 @@ CONFIG_BLK_DEV_SR_VENDOR=y
694# CONFIG_SCSI_MULTI_LUN is not set 731# CONFIG_SCSI_MULTI_LUN is not set
695CONFIG_SCSI_CONSTANTS=y 732CONFIG_SCSI_CONSTANTS=y
696# CONFIG_SCSI_LOGGING is not set 733# CONFIG_SCSI_LOGGING is not set
734CONFIG_SCSI_SCAN_ASYNC=y
697 735
698# 736#
699# SCSI Transports 737# SCSI Transports
@@ -802,6 +840,7 @@ CONFIG_LXT_PHY=m
802CONFIG_CICADA_PHY=m 840CONFIG_CICADA_PHY=m
803CONFIG_VITESSE_PHY=m 841CONFIG_VITESSE_PHY=m
804CONFIG_SMSC_PHY=m 842CONFIG_SMSC_PHY=m
843# CONFIG_BROADCOM_PHY is not set
805# CONFIG_FIXED_PHY is not set 844# CONFIG_FIXED_PHY is not set
806 845
807# 846#
@@ -832,7 +871,6 @@ CONFIG_NET_PCI=y
832# CONFIG_AC3200 is not set 871# CONFIG_AC3200 is not set
833# CONFIG_APRICOT is not set 872# CONFIG_APRICOT is not set
834# CONFIG_CS89x0 is not set 873# CONFIG_CS89x0 is not set
835# CONFIG_LAN_SAA9730 is not set
836# CONFIG_NET_POCKET is not set 874# CONFIG_NET_POCKET is not set
837 875
838# 876#
@@ -972,17 +1010,12 @@ CONFIG_RTC=m
972# CONFIG_GEN_RTC is not set 1010# CONFIG_GEN_RTC is not set
973# CONFIG_DTLK is not set 1011# CONFIG_DTLK is not set
974# CONFIG_R3964 is not set 1012# CONFIG_R3964 is not set
975
976#
977# Ftape, the floppy tape device driver
978#
979# CONFIG_RAW_DRIVER is not set 1013# CONFIG_RAW_DRIVER is not set
980 1014
981# 1015#
982# TPM devices 1016# TPM devices
983# 1017#
984# CONFIG_TCG_TPM is not set 1018# CONFIG_TCG_TPM is not set
985# CONFIG_TELCLOCK is not set
986 1019
987# 1020#
988# I2C support 1021# I2C support
@@ -1019,11 +1052,6 @@ CONFIG_W1_CON=y
1019# CONFIG_HWMON_VID is not set 1052# CONFIG_HWMON_VID is not set
1020 1053
1021# 1054#
1022# Misc devices
1023#
1024# CONFIG_TIFM_CORE is not set
1025
1026#
1027# Multimedia devices 1055# Multimedia devices
1028# 1056#
1029# CONFIG_VIDEO_DEV is not set 1057# CONFIG_VIDEO_DEV is not set
@@ -1054,6 +1082,12 @@ CONFIG_DUMMY_CONSOLE=y
1054# CONFIG_SOUND is not set 1082# CONFIG_SOUND is not set
1055 1083
1056# 1084#
1085# HID Devices
1086#
1087CONFIG_HID=y
1088# CONFIG_HID_DEBUG is not set
1089
1090#
1057# USB support 1091# USB support
1058# 1092#
1059# CONFIG_USB_ARCH_HAS_HCD is not set 1093# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -1114,6 +1148,15 @@ CONFIG_DUMMY_CONSOLE=y
1114# 1148#
1115 1149
1116# 1150#
1151# Auxiliary Display support
1152#
1153# CONFIG_KS0108 is not set
1154
1155#
1156# Virtualization
1157#
1158
1159#
1117# File systems 1160# File systems
1118# 1161#
1119CONFIG_EXT2_FS=m 1162CONFIG_EXT2_FS=m
@@ -1123,6 +1166,7 @@ CONFIG_EXT3_FS=y
1123CONFIG_EXT3_FS_XATTR=y 1166CONFIG_EXT3_FS_XATTR=y
1124# CONFIG_EXT3_FS_POSIX_ACL is not set 1167# CONFIG_EXT3_FS_POSIX_ACL is not set
1125# CONFIG_EXT3_FS_SECURITY is not set 1168# CONFIG_EXT3_FS_SECURITY is not set
1169# CONFIG_EXT4DEV_FS is not set
1126CONFIG_JBD=y 1170CONFIG_JBD=y
1127# CONFIG_JBD_DEBUG is not set 1171# CONFIG_JBD_DEBUG is not set
1128CONFIG_FS_MBCACHE=y 1172CONFIG_FS_MBCACHE=y
@@ -1158,7 +1202,6 @@ CONFIG_FUSE_FS=m
1158CONFIG_ISO9660_FS=m 1202CONFIG_ISO9660_FS=m
1159CONFIG_JOLIET=y 1203CONFIG_JOLIET=y
1160CONFIG_ZISOFS=y 1204CONFIG_ZISOFS=y
1161CONFIG_ZISOFS_FS=m
1162CONFIG_UDF_FS=m 1205CONFIG_UDF_FS=m
1163CONFIG_UDF_NLS=y 1206CONFIG_UDF_NLS=y
1164 1207
@@ -1185,7 +1228,7 @@ CONFIG_TMPFS=y
1185# CONFIG_TMPFS_POSIX_ACL is not set 1228# CONFIG_TMPFS_POSIX_ACL is not set
1186# CONFIG_HUGETLB_PAGE is not set 1229# CONFIG_HUGETLB_PAGE is not set
1187CONFIG_RAMFS=y 1230CONFIG_RAMFS=y
1188# CONFIG_CONFIGFS_FS is not set 1231CONFIG_CONFIGFS_FS=m
1189 1232
1190# 1233#
1191# Miscellaneous filesystems 1234# Miscellaneous filesystems
@@ -1321,6 +1364,10 @@ CONFIG_NLS_UTF8=m
1321# 1364#
1322# Distributed Lock Manager 1365# Distributed Lock Manager
1323# 1366#
1367CONFIG_DLM=m
1368CONFIG_DLM_TCP=y
1369# CONFIG_DLM_SCTP is not set
1370# CONFIG_DLM_DEBUG is not set
1324 1371
1325# 1372#
1326# Profiling support 1373# Profiling support
@@ -1335,9 +1382,10 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1335CONFIG_ENABLE_MUST_CHECK=y 1382CONFIG_ENABLE_MUST_CHECK=y
1336# CONFIG_MAGIC_SYSRQ is not set 1383# CONFIG_MAGIC_SYSRQ is not set
1337# CONFIG_UNUSED_SYMBOLS is not set 1384# CONFIG_UNUSED_SYMBOLS is not set
1385# CONFIG_DEBUG_FS is not set
1386# CONFIG_HEADERS_CHECK is not set
1338# CONFIG_DEBUG_KERNEL is not set 1387# CONFIG_DEBUG_KERNEL is not set
1339CONFIG_LOG_BUF_SHIFT=14 1388CONFIG_LOG_BUF_SHIFT=14
1340# CONFIG_DEBUG_FS is not set
1341CONFIG_CROSSCOMPILE=y 1389CONFIG_CROSSCOMPILE=y
1342CONFIG_CMDLINE="" 1390CONFIG_CMDLINE=""
1343 1391
@@ -1355,19 +1403,24 @@ CONFIG_CRYPTO=y
1355CONFIG_CRYPTO_ALGAPI=y 1403CONFIG_CRYPTO_ALGAPI=y
1356CONFIG_CRYPTO_BLKCIPHER=m 1404CONFIG_CRYPTO_BLKCIPHER=m
1357CONFIG_CRYPTO_HASH=y 1405CONFIG_CRYPTO_HASH=y
1358CONFIG_CRYPTO_MANAGER=m 1406CONFIG_CRYPTO_MANAGER=y
1359CONFIG_CRYPTO_HMAC=y 1407CONFIG_CRYPTO_HMAC=y
1408CONFIG_CRYPTO_XCBC=m
1360CONFIG_CRYPTO_NULL=m 1409CONFIG_CRYPTO_NULL=m
1361CONFIG_CRYPTO_MD4=m 1410CONFIG_CRYPTO_MD4=m
1362CONFIG_CRYPTO_MD5=m 1411CONFIG_CRYPTO_MD5=y
1363CONFIG_CRYPTO_SHA1=m 1412CONFIG_CRYPTO_SHA1=m
1364CONFIG_CRYPTO_SHA256=m 1413CONFIG_CRYPTO_SHA256=m
1365CONFIG_CRYPTO_SHA512=m 1414CONFIG_CRYPTO_SHA512=m
1366CONFIG_CRYPTO_WP512=m 1415CONFIG_CRYPTO_WP512=m
1367CONFIG_CRYPTO_TGR192=m 1416CONFIG_CRYPTO_TGR192=m
1417CONFIG_CRYPTO_GF128MUL=m
1368CONFIG_CRYPTO_ECB=m 1418CONFIG_CRYPTO_ECB=m
1369CONFIG_CRYPTO_CBC=m 1419CONFIG_CRYPTO_CBC=m
1420CONFIG_CRYPTO_PCBC=m
1421CONFIG_CRYPTO_LRW=m
1370CONFIG_CRYPTO_DES=m 1422CONFIG_CRYPTO_DES=m
1423CONFIG_CRYPTO_FCRYPT=m
1371CONFIG_CRYPTO_BLOWFISH=m 1424CONFIG_CRYPTO_BLOWFISH=m
1372CONFIG_CRYPTO_TWOFISH=m 1425CONFIG_CRYPTO_TWOFISH=m
1373CONFIG_CRYPTO_TWOFISH_COMMON=m 1426CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1382,6 +1435,7 @@ CONFIG_CRYPTO_ANUBIS=m
1382CONFIG_CRYPTO_DEFLATE=m 1435CONFIG_CRYPTO_DEFLATE=m
1383CONFIG_CRYPTO_MICHAEL_MIC=m 1436CONFIG_CRYPTO_MICHAEL_MIC=m
1384CONFIG_CRYPTO_CRC32C=m 1437CONFIG_CRYPTO_CRC32C=m
1438CONFIG_CRYPTO_CAMELLIA=m
1385# CONFIG_CRYPTO_TEST is not set 1439# CONFIG_CRYPTO_TEST is not set
1386 1440
1387# 1441#
@@ -1391,6 +1445,7 @@ CONFIG_CRYPTO_CRC32C=m
1391# 1445#
1392# Library routines 1446# Library routines
1393# 1447#
1448CONFIG_BITREVERSE=y
1394CONFIG_CRC_CCITT=m 1449CONFIG_CRC_CCITT=m
1395CONFIG_CRC16=m 1450CONFIG_CRC16=m
1396CONFIG_CRC32=y 1451CONFIG_CRC32=y
@@ -1402,3 +1457,5 @@ CONFIG_TEXTSEARCH_KMP=m
1402CONFIG_TEXTSEARCH_BM=m 1457CONFIG_TEXTSEARCH_BM=m
1403CONFIG_TEXTSEARCH_FSM=m 1458CONFIG_TEXTSEARCH_FSM=m
1404CONFIG_PLIST=y 1459CONFIG_PLIST=y
1460CONFIG_HAS_IOMEM=y
1461CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 50fd9557e646..9ebb522fbbbd 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:12 2006 4# Tue Feb 20 21:47:34 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,15 +64,20 @@ CONFIG_TOSHIBA_JMR3927=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
74# CONFIG_CPU_LITTLE_ENDIAN is not set 78# CONFIG_CPU_LITTLE_ENDIAN is not set
75CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 79CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_MIPS_TX3927=y 81CONFIG_MIPS_TX3927=y
77CONFIG_SWAP_IO_SPACE=y 82CONFIG_SWAP_IO_SPACE=y
78CONFIG_MIPS_L1_CACHE_SHIFT=5 83CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -114,8 +119,8 @@ CONFIG_PAGE_SIZE_4KB=y
114# CONFIG_PAGE_SIZE_16KB is not set 119# CONFIG_PAGE_SIZE_16KB is not set
115# CONFIG_PAGE_SIZE_64KB is not set 120# CONFIG_PAGE_SIZE_64KB is not set
116CONFIG_MIPS_MT_DISABLED=y 121CONFIG_MIPS_MT_DISABLED=y
117# CONFIG_MIPS_MT_SMTC is not set
118# CONFIG_MIPS_MT_SMP is not set 122# CONFIG_MIPS_MT_SMP is not set
123# CONFIG_MIPS_MT_SMTC is not set
119# CONFIG_MIPS_VPE_LOADER is not set 124# CONFIG_MIPS_VPE_LOADER is not set
120CONFIG_CPU_HAS_SYNC=y 125CONFIG_CPU_HAS_SYNC=y
121CONFIG_GENERIC_HARDIRQS=y 126CONFIG_GENERIC_HARDIRQS=y
@@ -130,6 +135,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
130# CONFIG_SPARSEMEM_STATIC is not set 135# CONFIG_SPARSEMEM_STATIC is not set
131CONFIG_SPLIT_PTLOCK_CPUS=4 136CONFIG_SPLIT_PTLOCK_CPUS=4
132# CONFIG_RESOURCES_64BIT is not set 137# CONFIG_RESOURCES_64BIT is not set
138CONFIG_ZONE_DMA_FLAG=1
133# CONFIG_HZ_48 is not set 139# CONFIG_HZ_48 is not set
134# CONFIG_HZ_100 is not set 140# CONFIG_HZ_100 is not set
135# CONFIG_HZ_128 is not set 141# CONFIG_HZ_128 is not set
@@ -143,6 +149,7 @@ CONFIG_PREEMPT_NONE=y
143# CONFIG_PREEMPT_VOLUNTARY is not set 149# CONFIG_PREEMPT_VOLUNTARY is not set
144# CONFIG_PREEMPT is not set 150# CONFIG_PREEMPT is not set
145CONFIG_RTC_DS1742=y 151CONFIG_RTC_DS1742=y
152# CONFIG_KEXEC is not set
146CONFIG_LOCKDEP_SUPPORT=y 153CONFIG_LOCKDEP_SUPPORT=y
147CONFIG_STACKTRACE_SUPPORT=y 154CONFIG_STACKTRACE_SUPPORT=y
148CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 155CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -161,15 +168,20 @@ CONFIG_LOCALVERSION=""
161CONFIG_LOCALVERSION_AUTO=y 168CONFIG_LOCALVERSION_AUTO=y
162CONFIG_SWAP=y 169CONFIG_SWAP=y
163CONFIG_SYSVIPC=y 170CONFIG_SYSVIPC=y
171# CONFIG_IPC_NS is not set
172CONFIG_SYSVIPC_SYSCTL=y
164# CONFIG_POSIX_MQUEUE is not set 173# CONFIG_POSIX_MQUEUE is not set
165# CONFIG_BSD_PROCESS_ACCT is not set 174# CONFIG_BSD_PROCESS_ACCT is not set
166CONFIG_SYSCTL=y 175# CONFIG_TASKSTATS is not set
176# CONFIG_UTS_NS is not set
167# CONFIG_AUDIT is not set 177# CONFIG_AUDIT is not set
168# CONFIG_IKCONFIG is not set 178# CONFIG_IKCONFIG is not set
179CONFIG_SYSFS_DEPRECATED=y
169CONFIG_RELAY=y 180CONFIG_RELAY=y
170CONFIG_INITRAMFS_SOURCE=""
171# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 181# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
182CONFIG_SYSCTL=y
172CONFIG_EMBEDDED=y 183CONFIG_EMBEDDED=y
184CONFIG_SYSCTL_SYSCALL=y
173CONFIG_KALLSYMS=y 185CONFIG_KALLSYMS=y
174# CONFIG_KALLSYMS_EXTRA_PASS is not set 186# CONFIG_KALLSYMS_EXTRA_PASS is not set
175CONFIG_HOTPLUG=y 187CONFIG_HOTPLUG=y
@@ -177,12 +189,12 @@ CONFIG_PRINTK=y
177CONFIG_BUG=y 189CONFIG_BUG=y
178CONFIG_ELF_CORE=y 190CONFIG_ELF_CORE=y
179CONFIG_BASE_FULL=y 191CONFIG_BASE_FULL=y
180CONFIG_RT_MUTEXES=y
181CONFIG_FUTEX=y 192CONFIG_FUTEX=y
182CONFIG_EPOLL=y 193CONFIG_EPOLL=y
183CONFIG_SHMEM=y 194CONFIG_SHMEM=y
184CONFIG_SLAB=y 195CONFIG_SLAB=y
185CONFIG_VM_EVENT_COUNTERS=y 196CONFIG_VM_EVENT_COUNTERS=y
197CONFIG_RT_MUTEXES=y
186# CONFIG_TINY_SHMEM is not set 198# CONFIG_TINY_SHMEM is not set
187CONFIG_BASE_SMALL=0 199CONFIG_BASE_SMALL=0
188# CONFIG_SLOB is not set 200# CONFIG_SLOB is not set
@@ -195,6 +207,7 @@ CONFIG_BASE_SMALL=0
195# 207#
196# Block layer 208# Block layer
197# 209#
210CONFIG_BLOCK=y
198# CONFIG_LBD is not set 211# CONFIG_LBD is not set
199# CONFIG_BLK_DEV_IO_TRACE is not set 212# CONFIG_BLK_DEV_IO_TRACE is not set
200# CONFIG_LSF is not set 213# CONFIG_LSF is not set
@@ -237,6 +250,14 @@ CONFIG_BINFMT_ELF=y
237CONFIG_TRAD_SIGNALS=y 250CONFIG_TRAD_SIGNALS=y
238 251
239# 252#
253# Power management options
254#
255CONFIG_PM=y
256# CONFIG_PM_LEGACY is not set
257# CONFIG_PM_DEBUG is not set
258# CONFIG_PM_SYSFS_DEPRECATED is not set
259
260#
240# Networking 261# Networking
241# 262#
242CONFIG_NET=y 263CONFIG_NET=y
@@ -250,7 +271,10 @@ CONFIG_PACKET=y
250CONFIG_UNIX=y 271CONFIG_UNIX=y
251CONFIG_XFRM=y 272CONFIG_XFRM=y
252CONFIG_XFRM_USER=y 273CONFIG_XFRM_USER=y
274# CONFIG_XFRM_SUB_POLICY is not set
275CONFIG_XFRM_MIGRATE=y
253CONFIG_NET_KEY=y 276CONFIG_NET_KEY=y
277CONFIG_NET_KEY_MIGRATE=y
254CONFIG_INET=y 278CONFIG_INET=y
255# CONFIG_IP_MULTICAST is not set 279# CONFIG_IP_MULTICAST is not set
256# CONFIG_IP_ADVANCED_ROUTER is not set 280# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +294,13 @@ CONFIG_IP_PNP_BOOTP=y
270# CONFIG_INET_TUNNEL is not set 294# CONFIG_INET_TUNNEL is not set
271CONFIG_INET_XFRM_MODE_TRANSPORT=y 295CONFIG_INET_XFRM_MODE_TRANSPORT=y
272CONFIG_INET_XFRM_MODE_TUNNEL=y 296CONFIG_INET_XFRM_MODE_TUNNEL=y
297CONFIG_INET_XFRM_MODE_BEET=y
273CONFIG_INET_DIAG=y 298CONFIG_INET_DIAG=y
274CONFIG_INET_TCP_DIAG=y 299CONFIG_INET_TCP_DIAG=y
275# CONFIG_TCP_CONG_ADVANCED is not set 300# CONFIG_TCP_CONG_ADVANCED is not set
276CONFIG_TCP_CONG_BIC=y 301CONFIG_TCP_CONG_CUBIC=y
302CONFIG_DEFAULT_TCP_CONG="cubic"
303CONFIG_TCP_MD5SIG=y
277# CONFIG_IPV6 is not set 304# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set 305# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set 306# CONFIG_INET6_TUNNEL is not set
@@ -303,7 +330,6 @@ CONFIG_NETWORK_SECMARK=y
303# CONFIG_ATALK is not set 330# CONFIG_ATALK is not set
304# CONFIG_X25 is not set 331# CONFIG_X25 is not set
305# CONFIG_LAPB is not set 332# CONFIG_LAPB is not set
306# CONFIG_NET_DIVERT is not set
307# CONFIG_ECONET is not set 333# CONFIG_ECONET is not set
308# CONFIG_WAN_ROUTER is not set 334# CONFIG_WAN_ROUTER is not set
309 335
@@ -358,6 +384,7 @@ CONFIG_PROC_EVENTS=y
358# 384#
359# Plug and Play support 385# Plug and Play support
360# 386#
387# CONFIG_PNPACPI is not set
361 388
362# 389#
363# Block devices 390# Block devices
@@ -378,6 +405,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
378CONFIG_ATA_OVER_ETH=y 405CONFIG_ATA_OVER_ETH=y
379 406
380# 407#
408# Misc devices
409#
410CONFIG_SGI_IOC4=y
411# CONFIG_TIFM_CORE is not set
412
413#
381# ATA/ATAPI/MFM/RLL support 414# ATA/ATAPI/MFM/RLL support
382# 415#
383# CONFIG_IDE is not set 416# CONFIG_IDE is not set
@@ -387,6 +420,12 @@ CONFIG_ATA_OVER_ETH=y
387# 420#
388CONFIG_RAID_ATTRS=y 421CONFIG_RAID_ATTRS=y
389# CONFIG_SCSI is not set 422# CONFIG_SCSI is not set
423# CONFIG_SCSI_NETLINK is not set
424
425#
426# Serial ATA (prod) and Parallel ATA (experimental) drivers
427#
428# CONFIG_ATA is not set
390 429
391# 430#
392# Multi-device support (RAID and LVM) 431# Multi-device support (RAID and LVM)
@@ -437,6 +476,8 @@ CONFIG_LXT_PHY=y
437CONFIG_CICADA_PHY=y 476CONFIG_CICADA_PHY=y
438CONFIG_VITESSE_PHY=y 477CONFIG_VITESSE_PHY=y
439CONFIG_SMSC_PHY=y 478CONFIG_SMSC_PHY=y
479# CONFIG_BROADCOM_PHY is not set
480# CONFIG_FIXED_PHY is not set
440 481
441# 482#
442# Ethernet (10 or 100Mbit) 483# Ethernet (10 or 100Mbit)
@@ -472,14 +513,18 @@ CONFIG_NET_ETHERNET=y
472# CONFIG_SK98LIN is not set 513# CONFIG_SK98LIN is not set
473# CONFIG_TIGON3 is not set 514# CONFIG_TIGON3 is not set
474# CONFIG_BNX2 is not set 515# CONFIG_BNX2 is not set
516CONFIG_QLA3XXX=y
517# CONFIG_ATL1 is not set
475 518
476# 519#
477# Ethernet (10000 Mbit) 520# Ethernet (10000 Mbit)
478# 521#
479# CONFIG_CHELSIO_T1 is not set 522# CONFIG_CHELSIO_T1 is not set
523CONFIG_CHELSIO_T3=y
480# CONFIG_IXGB is not set 524# CONFIG_IXGB is not set
481# CONFIG_S2IO is not set 525# CONFIG_S2IO is not set
482# CONFIG_MYRI10GE is not set 526# CONFIG_MYRI10GE is not set
527CONFIG_NETXEN_NIC=y
483 528
484# 529#
485# Token Ring devices 530# Token Ring devices
@@ -518,6 +563,7 @@ CONFIG_NET_ETHERNET=y
518# Input device support 563# Input device support
519# 564#
520CONFIG_INPUT=y 565CONFIG_INPUT=y
566# CONFIG_INPUT_FF_MEMLESS is not set
521 567
522# 568#
523# Userland interfaces 569# Userland interfaces
@@ -565,6 +611,7 @@ CONFIG_SERIAL_NONSTANDARD=y
565# CONFIG_DIGIEPCA is not set 611# CONFIG_DIGIEPCA is not set
566# CONFIG_MOXA_INTELLIO is not set 612# CONFIG_MOXA_INTELLIO is not set
567# CONFIG_MOXA_SMARTIO is not set 613# CONFIG_MOXA_SMARTIO is not set
614CONFIG_MOXA_SMARTIO_NEW=y
568# CONFIG_ISI is not set 615# CONFIG_ISI is not set
569# CONFIG_SYNCLINKMP is not set 616# CONFIG_SYNCLINKMP is not set
570# CONFIG_SYNCLINK_GT is not set 617# CONFIG_SYNCLINK_GT is not set
@@ -586,6 +633,7 @@ CONFIG_SERIAL_NONSTANDARD=y
586CONFIG_SERIAL_CORE=y 633CONFIG_SERIAL_CORE=y
587CONFIG_SERIAL_TXX9=y 634CONFIG_SERIAL_TXX9=y
588CONFIG_HAS_TXX9_SERIAL=y 635CONFIG_HAS_TXX9_SERIAL=y
636CONFIG_SERIAL_TXX9_NR_UARTS=6
589# CONFIG_SERIAL_TXX9_CONSOLE is not set 637# CONFIG_SERIAL_TXX9_CONSOLE is not set
590# CONFIG_SERIAL_TXX9_STDSERIAL is not set 638# CONFIG_SERIAL_TXX9_STDSERIAL is not set
591# CONFIG_SERIAL_JSM is not set 639# CONFIG_SERIAL_JSM is not set
@@ -608,10 +656,6 @@ CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_DTLK is not set 656# CONFIG_DTLK is not set
609# CONFIG_R3964 is not set 657# CONFIG_R3964 is not set
610# CONFIG_APPLICOM is not set 658# CONFIG_APPLICOM is not set
611
612#
613# Ftape, the floppy tape device driver
614#
615# CONFIG_DRM is not set 659# CONFIG_DRM is not set
616# CONFIG_RAW_DRIVER is not set 660# CONFIG_RAW_DRIVER is not set
617 661
@@ -619,7 +663,6 @@ CONFIG_LEGACY_PTY_COUNT=256
619# TPM devices 663# TPM devices
620# 664#
621# CONFIG_TCG_TPM is not set 665# CONFIG_TCG_TPM is not set
622# CONFIG_TELCLOCK is not set
623 666
624# 667#
625# I2C support 668# I2C support
@@ -644,14 +687,9 @@ CONFIG_LEGACY_PTY_COUNT=256
644# CONFIG_HWMON_VID is not set 687# CONFIG_HWMON_VID is not set
645 688
646# 689#
647# Misc devices
648#
649
650#
651# Multimedia devices 690# Multimedia devices
652# 691#
653# CONFIG_VIDEO_DEV is not set 692# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y
655 693
656# 694#
657# Digital Video Broadcasting Devices 695# Digital Video Broadcasting Devices
@@ -666,6 +704,7 @@ CONFIG_FB=y
666# CONFIG_FB_CFB_FILLRECT is not set 704# CONFIG_FB_CFB_FILLRECT is not set
667# CONFIG_FB_CFB_COPYAREA is not set 705# CONFIG_FB_CFB_COPYAREA is not set
668# CONFIG_FB_CFB_IMAGEBLIT is not set 706# CONFIG_FB_CFB_IMAGEBLIT is not set
707# CONFIG_FB_SVGALIB is not set
669# CONFIG_FB_MACMODES is not set 708# CONFIG_FB_MACMODES is not set
670# CONFIG_FB_BACKLIGHT is not set 709# CONFIG_FB_BACKLIGHT is not set
671# CONFIG_FB_MODE_HELPERS is not set 710# CONFIG_FB_MODE_HELPERS is not set
@@ -682,6 +721,7 @@ CONFIG_FB=y
682# CONFIG_FB_RADEON is not set 721# CONFIG_FB_RADEON is not set
683# CONFIG_FB_ATY128 is not set 722# CONFIG_FB_ATY128 is not set
684# CONFIG_FB_ATY is not set 723# CONFIG_FB_ATY is not set
724# CONFIG_FB_S3 is not set
685# CONFIG_FB_SAVAGE is not set 725# CONFIG_FB_SAVAGE is not set
686# CONFIG_FB_SIS is not set 726# CONFIG_FB_SIS is not set
687# CONFIG_FB_NEOMAGIC is not set 727# CONFIG_FB_NEOMAGIC is not set
@@ -711,6 +751,11 @@ CONFIG_DUMMY_CONSOLE=y
711# CONFIG_SOUND is not set 751# CONFIG_SOUND is not set
712 752
713# 753#
754# HID Devices
755#
756# CONFIG_HID is not set
757
758#
714# USB support 759# USB support
715# 760#
716CONFIG_USB_ARCH_HAS_HCD=y 761CONFIG_USB_ARCH_HAS_HCD=y
@@ -773,14 +818,24 @@ CONFIG_USB_ARCH_HAS_EHCI=y
773# 818#
774 819
775# 820#
821# Auxiliary Display support
822#
823
824#
825# Virtualization
826#
827
828#
776# File systems 829# File systems
777# 830#
778# CONFIG_EXT2_FS is not set 831# CONFIG_EXT2_FS is not set
779# CONFIG_EXT3_FS is not set 832# CONFIG_EXT3_FS is not set
833# CONFIG_EXT4DEV_FS is not set
780# CONFIG_REISERFS_FS is not set 834# CONFIG_REISERFS_FS is not set
781# CONFIG_JFS_FS is not set 835# CONFIG_JFS_FS is not set
782# CONFIG_FS_POSIX_ACL is not set 836# CONFIG_FS_POSIX_ACL is not set
783# CONFIG_XFS_FS is not set 837# CONFIG_XFS_FS is not set
838# CONFIG_GFS2_FS is not set
784# CONFIG_OCFS2_FS is not set 839# CONFIG_OCFS2_FS is not set
785# CONFIG_MINIX_FS is not set 840# CONFIG_MINIX_FS is not set
786# CONFIG_ROMFS_FS is not set 841# CONFIG_ROMFS_FS is not set
@@ -810,17 +865,19 @@ CONFIG_FUSE_FS=y
810# 865#
811CONFIG_PROC_FS=y 866CONFIG_PROC_FS=y
812CONFIG_PROC_KCORE=y 867CONFIG_PROC_KCORE=y
868CONFIG_PROC_SYSCTL=y
813CONFIG_SYSFS=y 869CONFIG_SYSFS=y
814# CONFIG_TMPFS is not set 870# CONFIG_TMPFS is not set
815# CONFIG_HUGETLB_PAGE is not set 871# CONFIG_HUGETLB_PAGE is not set
816CONFIG_RAMFS=y 872CONFIG_RAMFS=y
817# CONFIG_CONFIGFS_FS is not set 873CONFIG_CONFIGFS_FS=y
818 874
819# 875#
820# Miscellaneous filesystems 876# Miscellaneous filesystems
821# 877#
822# CONFIG_ADFS_FS is not set 878# CONFIG_ADFS_FS is not set
823# CONFIG_AFFS_FS is not set 879# CONFIG_AFFS_FS is not set
880# CONFIG_ECRYPT_FS is not set
824# CONFIG_HFS_FS is not set 881# CONFIG_HFS_FS is not set
825# CONFIG_HFSPLUS_FS is not set 882# CONFIG_HFSPLUS_FS is not set
826# CONFIG_BEFS_FS is not set 883# CONFIG_BEFS_FS is not set
@@ -849,7 +906,6 @@ CONFIG_SUNRPC=y
849# CONFIG_RPCSEC_GSS_SPKM3 is not set 906# CONFIG_RPCSEC_GSS_SPKM3 is not set
850# CONFIG_SMB_FS is not set 907# CONFIG_SMB_FS is not set
851# CONFIG_CIFS is not set 908# CONFIG_CIFS is not set
852# CONFIG_CIFS_DEBUG2 is not set
853# CONFIG_NCP_FS is not set 909# CONFIG_NCP_FS is not set
854# CONFIG_CODA_FS is not set 910# CONFIG_CODA_FS is not set
855# CONFIG_AFS_FS is not set 911# CONFIG_AFS_FS is not set
@@ -867,6 +923,14 @@ CONFIG_MSDOS_PARTITION=y
867# CONFIG_NLS is not set 923# CONFIG_NLS is not set
868 924
869# 925#
926# Distributed Lock Manager
927#
928CONFIG_DLM=y
929CONFIG_DLM_TCP=y
930# CONFIG_DLM_SCTP is not set
931# CONFIG_DLM_DEBUG is not set
932
933#
870# Profiling support 934# Profiling support
871# 935#
872# CONFIG_PROFILING is not set 936# CONFIG_PROFILING is not set
@@ -876,12 +940,13 @@ CONFIG_MSDOS_PARTITION=y
876# 940#
877CONFIG_TRACE_IRQFLAGS_SUPPORT=y 941CONFIG_TRACE_IRQFLAGS_SUPPORT=y
878# CONFIG_PRINTK_TIME is not set 942# CONFIG_PRINTK_TIME is not set
943CONFIG_ENABLE_MUST_CHECK=y
879# CONFIG_MAGIC_SYSRQ is not set 944# CONFIG_MAGIC_SYSRQ is not set
880# CONFIG_UNUSED_SYMBOLS is not set 945# CONFIG_UNUSED_SYMBOLS is not set
946# CONFIG_DEBUG_FS is not set
947# CONFIG_HEADERS_CHECK is not set
881# CONFIG_DEBUG_KERNEL is not set 948# CONFIG_DEBUG_KERNEL is not set
882CONFIG_LOG_BUF_SHIFT=14 949CONFIG_LOG_BUF_SHIFT=14
883# CONFIG_DEBUG_FS is not set
884# CONFIG_UNWIND_INFO is not set
885CONFIG_CROSSCOMPILE=y 950CONFIG_CROSSCOMPILE=y
886CONFIG_CMDLINE="" 951CONFIG_CMDLINE=""
887 952
@@ -896,7 +961,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
896# Cryptographic options 961# Cryptographic options
897# 962#
898CONFIG_CRYPTO=y 963CONFIG_CRYPTO=y
964CONFIG_CRYPTO_ALGAPI=y
965CONFIG_CRYPTO_BLKCIPHER=y
966CONFIG_CRYPTO_HASH=y
967CONFIG_CRYPTO_MANAGER=y
899CONFIG_CRYPTO_HMAC=y 968CONFIG_CRYPTO_HMAC=y
969CONFIG_CRYPTO_XCBC=y
900CONFIG_CRYPTO_NULL=y 970CONFIG_CRYPTO_NULL=y
901CONFIG_CRYPTO_MD4=y 971CONFIG_CRYPTO_MD4=y
902CONFIG_CRYPTO_MD5=y 972CONFIG_CRYPTO_MD5=y
@@ -905,9 +975,16 @@ CONFIG_CRYPTO_SHA256=y
905CONFIG_CRYPTO_SHA512=y 975CONFIG_CRYPTO_SHA512=y
906CONFIG_CRYPTO_WP512=y 976CONFIG_CRYPTO_WP512=y
907CONFIG_CRYPTO_TGR192=y 977CONFIG_CRYPTO_TGR192=y
978CONFIG_CRYPTO_GF128MUL=y
979CONFIG_CRYPTO_ECB=y
980CONFIG_CRYPTO_CBC=y
981CONFIG_CRYPTO_PCBC=y
982CONFIG_CRYPTO_LRW=y
908CONFIG_CRYPTO_DES=y 983CONFIG_CRYPTO_DES=y
984CONFIG_CRYPTO_FCRYPT=y
909CONFIG_CRYPTO_BLOWFISH=y 985CONFIG_CRYPTO_BLOWFISH=y
910CONFIG_CRYPTO_TWOFISH=y 986CONFIG_CRYPTO_TWOFISH=y
987CONFIG_CRYPTO_TWOFISH_COMMON=y
911CONFIG_CRYPTO_SERPENT=y 988CONFIG_CRYPTO_SERPENT=y
912CONFIG_CRYPTO_AES=y 989CONFIG_CRYPTO_AES=y
913CONFIG_CRYPTO_CAST5=y 990CONFIG_CRYPTO_CAST5=y
@@ -919,6 +996,7 @@ CONFIG_CRYPTO_ANUBIS=y
919CONFIG_CRYPTO_DEFLATE=y 996CONFIG_CRYPTO_DEFLATE=y
920CONFIG_CRYPTO_MICHAEL_MIC=y 997CONFIG_CRYPTO_MICHAEL_MIC=y
921CONFIG_CRYPTO_CRC32C=y 998CONFIG_CRYPTO_CRC32C=y
999CONFIG_CRYPTO_CAMELLIA=y
922 1000
923# 1001#
924# Hardware crypto devices 1002# Hardware crypto devices
@@ -927,6 +1005,7 @@ CONFIG_CRYPTO_CRC32C=y
927# 1005#
928# Library routines 1006# Library routines
929# 1007#
1008CONFIG_BITREVERSE=y
930# CONFIG_CRC_CCITT is not set 1009# CONFIG_CRC_CCITT is not set
931CONFIG_CRC16=y 1010CONFIG_CRC16=y
932CONFIG_CRC32=y 1011CONFIG_CRC32=y
@@ -934,3 +1013,5 @@ CONFIG_LIBCRC32C=y
934CONFIG_ZLIB_INFLATE=y 1013CONFIG_ZLIB_INFLATE=y
935CONFIG_ZLIB_DEFLATE=y 1014CONFIG_ZLIB_DEFLATE=y
936CONFIG_PLIST=y 1015CONFIG_PLIST=y
1016CONFIG_HAS_IOMEM=y
1017CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig
index 05f539f84f58..b3f767ff1c5a 100644
--- a/arch/mips/configs/lasat200_defconfig
+++ b/arch/mips/configs/lasat200_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:12 2006 4# Tue Feb 20 21:47:34 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31CONFIG_LASAT=y 30CONFIG_LASAT=y
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_LASAT=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -68,10 +68,14 @@ CONFIG_PICVUE_PROC=y
68CONFIG_DS1603=y 68CONFIG_DS1603=y
69CONFIG_LASAT_SYSCTL=y 69CONFIG_LASAT_SYSCTL=y
70CONFIG_RWSEM_GENERIC_SPINLOCK=y 70CONFIG_RWSEM_GENERIC_SPINLOCK=y
71# CONFIG_ARCH_HAS_ILOG2_U32 is not set
72# CONFIG_ARCH_HAS_ILOG2_U64 is not set
71CONFIG_GENERIC_FIND_NEXT_BIT=y 73CONFIG_GENERIC_FIND_NEXT_BIT=y
72CONFIG_GENERIC_HWEIGHT=y 74CONFIG_GENERIC_HWEIGHT=y
73CONFIG_GENERIC_CALIBRATE_DELAY=y 75CONFIG_GENERIC_CALIBRATE_DELAY=y
76CONFIG_GENERIC_TIME=y
74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 77CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
78CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
75CONFIG_DMA_NONCOHERENT=y 79CONFIG_DMA_NONCOHERENT=y
76CONFIG_DMA_NEED_PCI_MAP_STATE=y 80CONFIG_DMA_NEED_PCI_MAP_STATE=y
77CONFIG_MIPS_NILE4=y 81CONFIG_MIPS_NILE4=y
@@ -121,8 +125,8 @@ CONFIG_PAGE_SIZE_4KB=y
121CONFIG_BOARD_SCACHE=y 125CONFIG_BOARD_SCACHE=y
122CONFIG_R5000_CPU_SCACHE=y 126CONFIG_R5000_CPU_SCACHE=y
123CONFIG_MIPS_MT_DISABLED=y 127CONFIG_MIPS_MT_DISABLED=y
124# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_MT_SMP is not set 128# CONFIG_MIPS_MT_SMP is not set
129# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_VPE_LOADER is not set 130# CONFIG_MIPS_VPE_LOADER is not set
127# CONFIG_64BIT_PHYS_ADDR is not set 131# CONFIG_64BIT_PHYS_ADDR is not set
128CONFIG_CPU_HAS_LLSC=y 132CONFIG_CPU_HAS_LLSC=y
@@ -139,6 +143,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set 143# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set 145# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=1
142# CONFIG_HZ_48 is not set 147# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 148# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 149# CONFIG_HZ_128 is not set
@@ -151,6 +156,7 @@ CONFIG_HZ=1000
151CONFIG_PREEMPT_NONE=y 156CONFIG_PREEMPT_NONE=y
152# CONFIG_PREEMPT_VOLUNTARY is not set 157# CONFIG_PREEMPT_VOLUNTARY is not set
153# CONFIG_PREEMPT is not set 158# CONFIG_PREEMPT is not set
159# CONFIG_KEXEC is not set
154CONFIG_LOCKDEP_SUPPORT=y 160CONFIG_LOCKDEP_SUPPORT=y
155CONFIG_STACKTRACE_SUPPORT=y 161CONFIG_STACKTRACE_SUPPORT=y
156CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 162CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -169,15 +175,20 @@ CONFIG_LOCALVERSION=""
169CONFIG_LOCALVERSION_AUTO=y 175CONFIG_LOCALVERSION_AUTO=y
170CONFIG_SWAP=y 176CONFIG_SWAP=y
171CONFIG_SYSVIPC=y 177CONFIG_SYSVIPC=y
178# CONFIG_IPC_NS is not set
179CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_POSIX_MQUEUE is not set 180# CONFIG_POSIX_MQUEUE is not set
173# CONFIG_BSD_PROCESS_ACCT is not set 181# CONFIG_BSD_PROCESS_ACCT is not set
174CONFIG_SYSCTL=y 182# CONFIG_TASKSTATS is not set
183# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set 184# CONFIG_AUDIT is not set
176# CONFIG_IKCONFIG is not set 185# CONFIG_IKCONFIG is not set
186CONFIG_SYSFS_DEPRECATED=y
177CONFIG_RELAY=y 187CONFIG_RELAY=y
178CONFIG_INITRAMFS_SOURCE=""
179# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
189CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 190CONFIG_EMBEDDED=y
191CONFIG_SYSCTL_SYSCALL=y
181CONFIG_KALLSYMS=y 192CONFIG_KALLSYMS=y
182# CONFIG_KALLSYMS_EXTRA_PASS is not set 193# CONFIG_KALLSYMS_EXTRA_PASS is not set
183CONFIG_HOTPLUG=y 194CONFIG_HOTPLUG=y
@@ -185,12 +196,12 @@ CONFIG_PRINTK=y
185CONFIG_BUG=y 196CONFIG_BUG=y
186CONFIG_ELF_CORE=y 197CONFIG_ELF_CORE=y
187CONFIG_BASE_FULL=y 198CONFIG_BASE_FULL=y
188CONFIG_RT_MUTEXES=y
189CONFIG_FUTEX=y 199CONFIG_FUTEX=y
190CONFIG_EPOLL=y 200CONFIG_EPOLL=y
191CONFIG_SHMEM=y 201CONFIG_SHMEM=y
192CONFIG_SLAB=y 202CONFIG_SLAB=y
193CONFIG_VM_EVENT_COUNTERS=y 203CONFIG_VM_EVENT_COUNTERS=y
204CONFIG_RT_MUTEXES=y
194# CONFIG_TINY_SHMEM is not set 205# CONFIG_TINY_SHMEM is not set
195CONFIG_BASE_SMALL=0 206CONFIG_BASE_SMALL=0
196# CONFIG_SLOB is not set 207# CONFIG_SLOB is not set
@@ -208,6 +219,7 @@ CONFIG_KMOD=y
208# 219#
209# Block layer 220# Block layer
210# 221#
222CONFIG_BLOCK=y
211# CONFIG_LBD is not set 223# CONFIG_LBD is not set
212# CONFIG_BLK_DEV_IO_TRACE is not set 224# CONFIG_BLK_DEV_IO_TRACE is not set
213# CONFIG_LSF is not set 225# CONFIG_LSF is not set
@@ -250,6 +262,14 @@ CONFIG_BINFMT_ELF=y
250CONFIG_TRAD_SIGNALS=y 262CONFIG_TRAD_SIGNALS=y
251 263
252# 264#
265# Power management options
266#
267CONFIG_PM=y
268# CONFIG_PM_LEGACY is not set
269# CONFIG_PM_DEBUG is not set
270# CONFIG_PM_SYSFS_DEPRECATED is not set
271
272#
253# Networking 273# Networking
254# 274#
255CONFIG_NET=y 275CONFIG_NET=y
@@ -262,7 +282,10 @@ CONFIG_NET=y
262CONFIG_UNIX=y 282CONFIG_UNIX=y
263CONFIG_XFRM=y 283CONFIG_XFRM=y
264CONFIG_XFRM_USER=m 284CONFIG_XFRM_USER=m
285# CONFIG_XFRM_SUB_POLICY is not set
286CONFIG_XFRM_MIGRATE=y
265CONFIG_NET_KEY=y 287CONFIG_NET_KEY=y
288CONFIG_NET_KEY_MIGRATE=y
266CONFIG_INET=y 289CONFIG_INET=y
267# CONFIG_IP_MULTICAST is not set 290# CONFIG_IP_MULTICAST is not set
268# CONFIG_IP_ADVANCED_ROUTER is not set 291# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +302,13 @@ CONFIG_IP_FIB_HASH=y
279# CONFIG_INET_TUNNEL is not set 302# CONFIG_INET_TUNNEL is not set
280CONFIG_INET_XFRM_MODE_TRANSPORT=m 303CONFIG_INET_XFRM_MODE_TRANSPORT=m
281CONFIG_INET_XFRM_MODE_TUNNEL=m 304CONFIG_INET_XFRM_MODE_TUNNEL=m
305CONFIG_INET_XFRM_MODE_BEET=m
282CONFIG_INET_DIAG=y 306CONFIG_INET_DIAG=y
283CONFIG_INET_TCP_DIAG=y 307CONFIG_INET_TCP_DIAG=y
284# CONFIG_TCP_CONG_ADVANCED is not set 308# CONFIG_TCP_CONG_ADVANCED is not set
285CONFIG_TCP_CONG_BIC=y 309CONFIG_TCP_CONG_CUBIC=y
310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
286# CONFIG_IPV6 is not set 312# CONFIG_IPV6 is not set
287# CONFIG_INET6_XFRM_TUNNEL is not set 313# CONFIG_INET6_XFRM_TUNNEL is not set
288# CONFIG_INET6_TUNNEL is not set 314# CONFIG_INET6_TUNNEL is not set
@@ -312,7 +338,6 @@ CONFIG_NETWORK_SECMARK=y
312# CONFIG_ATALK is not set 338# CONFIG_ATALK is not set
313# CONFIG_X25 is not set 339# CONFIG_X25 is not set
314# CONFIG_LAPB is not set 340# CONFIG_LAPB is not set
315# CONFIG_NET_DIVERT is not set
316# CONFIG_ECONET is not set 341# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set 342# CONFIG_WAN_ROUTER is not set
318 343
@@ -367,11 +392,13 @@ CONFIG_MTD_PARTITIONS=y
367# User Modules And Translation Layers 392# User Modules And Translation Layers
368# 393#
369CONFIG_MTD_CHAR=y 394CONFIG_MTD_CHAR=y
395CONFIG_MTD_BLKDEVS=y
370CONFIG_MTD_BLOCK=y 396CONFIG_MTD_BLOCK=y
371# CONFIG_FTL is not set 397# CONFIG_FTL is not set
372# CONFIG_NFTL is not set 398# CONFIG_NFTL is not set
373# CONFIG_INFTL is not set 399# CONFIG_INFTL is not set
374# CONFIG_RFD_FTL is not set 400# CONFIG_RFD_FTL is not set
401# CONFIG_SSFDC is not set
375 402
376# 403#
377# RAM/ROM/Flash chip drivers 404# RAM/ROM/Flash chip drivers
@@ -441,6 +468,7 @@ CONFIG_MTD_LASAT=y
441# 468#
442# Plug and Play support 469# Plug and Play support
443# 470#
471# CONFIG_PNPACPI is not set
444 472
445# 473#
446# Block devices 474# Block devices
@@ -461,9 +489,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
461CONFIG_ATA_OVER_ETH=m 489CONFIG_ATA_OVER_ETH=m
462 490
463# 491#
492# Misc devices
493#
494CONFIG_SGI_IOC4=m
495# CONFIG_TIFM_CORE is not set
496
497#
464# ATA/ATAPI/MFM/RLL support 498# ATA/ATAPI/MFM/RLL support
465# 499#
466CONFIG_IDE=y 500CONFIG_IDE=y
501CONFIG_IDE_MAX_HWIFS=4
467CONFIG_BLK_DEV_IDE=y 502CONFIG_BLK_DEV_IDE=y
468 503
469# 504#
@@ -500,8 +535,10 @@ CONFIG_BLK_DEV_CMD64X=y
500# CONFIG_BLK_DEV_CS5530 is not set 535# CONFIG_BLK_DEV_CS5530 is not set
501# CONFIG_BLK_DEV_HPT34X is not set 536# CONFIG_BLK_DEV_HPT34X is not set
502# CONFIG_BLK_DEV_HPT366 is not set 537# CONFIG_BLK_DEV_HPT366 is not set
538# CONFIG_BLK_DEV_JMICRON is not set
503# CONFIG_BLK_DEV_SC1200 is not set 539# CONFIG_BLK_DEV_SC1200 is not set
504# CONFIG_BLK_DEV_PIIX is not set 540# CONFIG_BLK_DEV_PIIX is not set
541CONFIG_BLK_DEV_IT8213=m
505# CONFIG_BLK_DEV_IT821X is not set 542# CONFIG_BLK_DEV_IT821X is not set
506# CONFIG_BLK_DEV_NS87415 is not set 543# CONFIG_BLK_DEV_NS87415 is not set
507# CONFIG_BLK_DEV_PDC202XX_OLD is not set 544# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -511,6 +548,7 @@ CONFIG_BLK_DEV_CMD64X=y
511# CONFIG_BLK_DEV_SLC90E66 is not set 548# CONFIG_BLK_DEV_SLC90E66 is not set
512# CONFIG_BLK_DEV_TRM290 is not set 549# CONFIG_BLK_DEV_TRM290 is not set
513# CONFIG_BLK_DEV_VIA82CXXX is not set 550# CONFIG_BLK_DEV_VIA82CXXX is not set
551CONFIG_BLK_DEV_TC86C001=m
514# CONFIG_IDE_ARM is not set 552# CONFIG_IDE_ARM is not set
515CONFIG_BLK_DEV_IDEDMA=y 553CONFIG_BLK_DEV_IDEDMA=y
516# CONFIG_IDEDMA_IVB is not set 554# CONFIG_IDEDMA_IVB is not set
@@ -522,6 +560,12 @@ CONFIG_IDEDMA_AUTO=y
522# 560#
523CONFIG_RAID_ATTRS=m 561CONFIG_RAID_ATTRS=m
524# CONFIG_SCSI is not set 562# CONFIG_SCSI is not set
563# CONFIG_SCSI_NETLINK is not set
564
565#
566# Serial ATA (prod) and Parallel ATA (experimental) drivers
567#
568# CONFIG_ATA is not set
525 569
526# 570#
527# Multi-device support (RAID and LVM) 571# Multi-device support (RAID and LVM)
@@ -572,6 +616,8 @@ CONFIG_LXT_PHY=m
572CONFIG_CICADA_PHY=m 616CONFIG_CICADA_PHY=m
573CONFIG_VITESSE_PHY=m 617CONFIG_VITESSE_PHY=m
574CONFIG_SMSC_PHY=m 618CONFIG_SMSC_PHY=m
619# CONFIG_BROADCOM_PHY is not set
620# CONFIG_FIXED_PHY is not set
575 621
576# 622#
577# Ethernet (10 or 100Mbit) 623# Ethernet (10 or 100Mbit)
@@ -607,14 +653,18 @@ CONFIG_NET_ETHERNET=y
607# CONFIG_SK98LIN is not set 653# CONFIG_SK98LIN is not set
608# CONFIG_TIGON3 is not set 654# CONFIG_TIGON3 is not set
609# CONFIG_BNX2 is not set 655# CONFIG_BNX2 is not set
656CONFIG_QLA3XXX=m
657# CONFIG_ATL1 is not set
610 658
611# 659#
612# Ethernet (10000 Mbit) 660# Ethernet (10000 Mbit)
613# 661#
614# CONFIG_CHELSIO_T1 is not set 662# CONFIG_CHELSIO_T1 is not set
663CONFIG_CHELSIO_T3=m
615# CONFIG_IXGB is not set 664# CONFIG_IXGB is not set
616# CONFIG_S2IO is not set 665# CONFIG_S2IO is not set
617# CONFIG_MYRI10GE is not set 666# CONFIG_MYRI10GE is not set
667CONFIG_NETXEN_NIC=m
618 668
619# 669#
620# Token Ring devices 670# Token Ring devices
@@ -653,6 +703,7 @@ CONFIG_NET_ETHERNET=y
653# Input device support 703# Input device support
654# 704#
655CONFIG_INPUT=y 705CONFIG_INPUT=y
706# CONFIG_INPUT_FF_MEMLESS is not set
656 707
657# 708#
658# Userland interfaces 709# Userland interfaces
@@ -730,10 +781,6 @@ CONFIG_LEGACY_PTY_COUNT=256
730# CONFIG_DTLK is not set 781# CONFIG_DTLK is not set
731# CONFIG_R3964 is not set 782# CONFIG_R3964 is not set
732# CONFIG_APPLICOM is not set 783# CONFIG_APPLICOM is not set
733
734#
735# Ftape, the floppy tape device driver
736#
737# CONFIG_DRM is not set 784# CONFIG_DRM is not set
738# CONFIG_RAW_DRIVER is not set 785# CONFIG_RAW_DRIVER is not set
739 786
@@ -741,7 +788,6 @@ CONFIG_LEGACY_PTY_COUNT=256
741# TPM devices 788# TPM devices
742# 789#
743# CONFIG_TCG_TPM is not set 790# CONFIG_TCG_TPM is not set
744# CONFIG_TELCLOCK is not set
745 791
746# 792#
747# I2C support 793# I2C support
@@ -766,14 +812,9 @@ CONFIG_LEGACY_PTY_COUNT=256
766# CONFIG_HWMON_VID is not set 812# CONFIG_HWMON_VID is not set
767 813
768# 814#
769# Misc devices
770#
771
772#
773# Multimedia devices 815# Multimedia devices
774# 816#
775# CONFIG_VIDEO_DEV is not set 817# CONFIG_VIDEO_DEV is not set
776CONFIG_VIDEO_V4L2=y
777 818
778# 819#
779# Digital Video Broadcasting Devices 820# Digital Video Broadcasting Devices
@@ -791,6 +832,7 @@ CONFIG_VIDEO_V4L2=y
791# 832#
792# CONFIG_VGA_CONSOLE is not set 833# CONFIG_VGA_CONSOLE is not set
793CONFIG_DUMMY_CONSOLE=y 834CONFIG_DUMMY_CONSOLE=y
835# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
794 836
795# 837#
796# Sound 838# Sound
@@ -798,6 +840,11 @@ CONFIG_DUMMY_CONSOLE=y
798# CONFIG_SOUND is not set 840# CONFIG_SOUND is not set
799 841
800# 842#
843# HID Devices
844#
845# CONFIG_HID is not set
846
847#
801# USB support 848# USB support
802# 849#
803CONFIG_USB_ARCH_HAS_HCD=y 850CONFIG_USB_ARCH_HAS_HCD=y
@@ -860,6 +907,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
860# 907#
861 908
862# 909#
910# Auxiliary Display support
911#
912
913#
914# Virtualization
915#
916
917#
863# File systems 918# File systems
864# 919#
865CONFIG_EXT2_FS=y 920CONFIG_EXT2_FS=y
@@ -869,13 +924,15 @@ CONFIG_EXT3_FS=y
869CONFIG_EXT3_FS_XATTR=y 924CONFIG_EXT3_FS_XATTR=y
870# CONFIG_EXT3_FS_POSIX_ACL is not set 925# CONFIG_EXT3_FS_POSIX_ACL is not set
871CONFIG_EXT3_FS_SECURITY=y 926CONFIG_EXT3_FS_SECURITY=y
927# CONFIG_EXT4DEV_FS is not set
872CONFIG_JBD=y 928CONFIG_JBD=y
873# CONFIG_JBD_DEBUG is not set 929# CONFIG_JBD_DEBUG is not set
874CONFIG_FS_MBCACHE=y 930CONFIG_FS_MBCACHE=y
875# CONFIG_REISERFS_FS is not set 931# CONFIG_REISERFS_FS is not set
876# CONFIG_JFS_FS is not set 932# CONFIG_JFS_FS is not set
877# CONFIG_FS_POSIX_ACL is not set 933CONFIG_FS_POSIX_ACL=y
878# CONFIG_XFS_FS is not set 934# CONFIG_XFS_FS is not set
935# CONFIG_GFS2_FS is not set
879# CONFIG_OCFS2_FS is not set 936# CONFIG_OCFS2_FS is not set
880# CONFIG_MINIX_FS is not set 937# CONFIG_MINIX_FS is not set
881# CONFIG_ROMFS_FS is not set 938# CONFIG_ROMFS_FS is not set
@@ -886,6 +943,7 @@ CONFIG_DNOTIFY=y
886# CONFIG_AUTOFS_FS is not set 943# CONFIG_AUTOFS_FS is not set
887# CONFIG_AUTOFS4_FS is not set 944# CONFIG_AUTOFS4_FS is not set
888CONFIG_FUSE_FS=m 945CONFIG_FUSE_FS=m
946CONFIG_GENERIC_ACL=y
889 947
890# 948#
891# CD-ROM/DVD Filesystems 949# CD-ROM/DVD Filesystems
@@ -905,23 +963,25 @@ CONFIG_FUSE_FS=m
905# 963#
906CONFIG_PROC_FS=y 964CONFIG_PROC_FS=y
907CONFIG_PROC_KCORE=y 965CONFIG_PROC_KCORE=y
966CONFIG_PROC_SYSCTL=y
908CONFIG_SYSFS=y 967CONFIG_SYSFS=y
909CONFIG_TMPFS=y 968CONFIG_TMPFS=y
969CONFIG_TMPFS_POSIX_ACL=y
910# CONFIG_HUGETLB_PAGE is not set 970# CONFIG_HUGETLB_PAGE is not set
911CONFIG_RAMFS=y 971CONFIG_RAMFS=y
912# CONFIG_CONFIGFS_FS is not set 972CONFIG_CONFIGFS_FS=m
913 973
914# 974#
915# Miscellaneous filesystems 975# Miscellaneous filesystems
916# 976#
917# CONFIG_ADFS_FS is not set 977# CONFIG_ADFS_FS is not set
918# CONFIG_AFFS_FS is not set 978# CONFIG_AFFS_FS is not set
979# CONFIG_ECRYPT_FS is not set
919# CONFIG_HFS_FS is not set 980# CONFIG_HFS_FS is not set
920# CONFIG_HFSPLUS_FS is not set 981# CONFIG_HFSPLUS_FS is not set
921# CONFIG_BEFS_FS is not set 982# CONFIG_BEFS_FS is not set
922# CONFIG_BFS_FS is not set 983# CONFIG_BFS_FS is not set
923# CONFIG_EFS_FS is not set 984# CONFIG_EFS_FS is not set
924# CONFIG_JFFS_FS is not set
925# CONFIG_JFFS2_FS is not set 985# CONFIG_JFFS2_FS is not set
926# CONFIG_CRAMFS is not set 986# CONFIG_CRAMFS is not set
927# CONFIG_VXFS_FS is not set 987# CONFIG_VXFS_FS is not set
@@ -947,7 +1007,6 @@ CONFIG_SUNRPC=y
947# CONFIG_RPCSEC_GSS_SPKM3 is not set 1007# CONFIG_RPCSEC_GSS_SPKM3 is not set
948# CONFIG_SMB_FS is not set 1008# CONFIG_SMB_FS is not set
949# CONFIG_CIFS is not set 1009# CONFIG_CIFS is not set
950# CONFIG_CIFS_DEBUG2 is not set
951# CONFIG_NCP_FS is not set 1010# CONFIG_NCP_FS is not set
952# CONFIG_CODA_FS is not set 1011# CONFIG_CODA_FS is not set
953# CONFIG_AFS_FS is not set 1012# CONFIG_AFS_FS is not set
@@ -965,6 +1024,14 @@ CONFIG_MSDOS_PARTITION=y
965# CONFIG_NLS is not set 1024# CONFIG_NLS is not set
966 1025
967# 1026#
1027# Distributed Lock Manager
1028#
1029CONFIG_DLM=m
1030CONFIG_DLM_TCP=y
1031# CONFIG_DLM_SCTP is not set
1032# CONFIG_DLM_DEBUG is not set
1033
1034#
968# Profiling support 1035# Profiling support
969# 1036#
970# CONFIG_PROFILING is not set 1037# CONFIG_PROFILING is not set
@@ -974,11 +1041,13 @@ CONFIG_MSDOS_PARTITION=y
974# 1041#
975CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1042CONFIG_TRACE_IRQFLAGS_SUPPORT=y
976# CONFIG_PRINTK_TIME is not set 1043# CONFIG_PRINTK_TIME is not set
1044CONFIG_ENABLE_MUST_CHECK=y
977# CONFIG_MAGIC_SYSRQ is not set 1045# CONFIG_MAGIC_SYSRQ is not set
978# CONFIG_UNUSED_SYMBOLS is not set 1046# CONFIG_UNUSED_SYMBOLS is not set
1047# CONFIG_DEBUG_FS is not set
1048# CONFIG_HEADERS_CHECK is not set
979# CONFIG_DEBUG_KERNEL is not set 1049# CONFIG_DEBUG_KERNEL is not set
980CONFIG_LOG_BUF_SHIFT=14 1050CONFIG_LOG_BUF_SHIFT=14
981# CONFIG_DEBUG_FS is not set
982CONFIG_CROSSCOMPILE=y 1051CONFIG_CROSSCOMPILE=y
983CONFIG_CMDLINE="" 1052CONFIG_CMDLINE=""
984 1053
@@ -993,18 +1062,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
993# Cryptographic options 1062# Cryptographic options
994# 1063#
995CONFIG_CRYPTO=y 1064CONFIG_CRYPTO=y
1065CONFIG_CRYPTO_ALGAPI=y
1066CONFIG_CRYPTO_BLKCIPHER=m
1067CONFIG_CRYPTO_HASH=y
1068CONFIG_CRYPTO_MANAGER=y
996CONFIG_CRYPTO_HMAC=y 1069CONFIG_CRYPTO_HMAC=y
1070CONFIG_CRYPTO_XCBC=m
997CONFIG_CRYPTO_NULL=m 1071CONFIG_CRYPTO_NULL=m
998CONFIG_CRYPTO_MD4=m 1072CONFIG_CRYPTO_MD4=m
999CONFIG_CRYPTO_MD5=m 1073CONFIG_CRYPTO_MD5=y
1000CONFIG_CRYPTO_SHA1=m 1074CONFIG_CRYPTO_SHA1=m
1001CONFIG_CRYPTO_SHA256=m 1075CONFIG_CRYPTO_SHA256=m
1002CONFIG_CRYPTO_SHA512=m 1076CONFIG_CRYPTO_SHA512=m
1003CONFIG_CRYPTO_WP512=m 1077CONFIG_CRYPTO_WP512=m
1004CONFIG_CRYPTO_TGR192=m 1078CONFIG_CRYPTO_TGR192=m
1079CONFIG_CRYPTO_GF128MUL=m
1080CONFIG_CRYPTO_ECB=m
1081CONFIG_CRYPTO_CBC=m
1082CONFIG_CRYPTO_PCBC=m
1083CONFIG_CRYPTO_LRW=m
1005CONFIG_CRYPTO_DES=m 1084CONFIG_CRYPTO_DES=m
1085CONFIG_CRYPTO_FCRYPT=m
1006CONFIG_CRYPTO_BLOWFISH=m 1086CONFIG_CRYPTO_BLOWFISH=m
1007CONFIG_CRYPTO_TWOFISH=m 1087CONFIG_CRYPTO_TWOFISH=m
1088CONFIG_CRYPTO_TWOFISH_COMMON=m
1008CONFIG_CRYPTO_SERPENT=m 1089CONFIG_CRYPTO_SERPENT=m
1009CONFIG_CRYPTO_AES=m 1090CONFIG_CRYPTO_AES=m
1010CONFIG_CRYPTO_CAST5=m 1091CONFIG_CRYPTO_CAST5=m
@@ -1016,6 +1097,7 @@ CONFIG_CRYPTO_ANUBIS=m
1016CONFIG_CRYPTO_DEFLATE=m 1097CONFIG_CRYPTO_DEFLATE=m
1017CONFIG_CRYPTO_MICHAEL_MIC=m 1098CONFIG_CRYPTO_MICHAEL_MIC=m
1018CONFIG_CRYPTO_CRC32C=m 1099CONFIG_CRYPTO_CRC32C=m
1100CONFIG_CRYPTO_CAMELLIA=m
1019# CONFIG_CRYPTO_TEST is not set 1101# CONFIG_CRYPTO_TEST is not set
1020 1102
1021# 1103#
@@ -1025,6 +1107,7 @@ CONFIG_CRYPTO_CRC32C=m
1025# 1107#
1026# Library routines 1108# Library routines
1027# 1109#
1110CONFIG_BITREVERSE=y
1028# CONFIG_CRC_CCITT is not set 1111# CONFIG_CRC_CCITT is not set
1029CONFIG_CRC16=m 1112CONFIG_CRC16=m
1030CONFIG_CRC32=y 1113CONFIG_CRC32=y
@@ -1032,3 +1115,5 @@ CONFIG_LIBCRC32C=m
1032CONFIG_ZLIB_INFLATE=m 1115CONFIG_ZLIB_INFLATE=m
1033CONFIG_ZLIB_DEFLATE=m 1116CONFIG_ZLIB_DEFLATE=m
1034CONFIG_PLIST=y 1117CONFIG_PLIST=y
1118CONFIG_HAS_IOMEM=y
1119CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 96e941084c04..a5f379d626d6 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc1 3# Linux kernel version: 2.6.20
4# Fri Oct 6 17:34:55 2006 4# Sun Feb 18 21:27:55 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MIPS_MALTA=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
42# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -62,11 +64,14 @@ CONFIG_MIPS_MALTA=y
62# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
63# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
64CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
65CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
66CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
67CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
68CONFIG_GENERIC_TIME=y 72CONFIG_GENERIC_TIME=y
69CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
70CONFIG_ARCH_MAY_HAVE_PC_FDC=y 75CONFIG_ARCH_MAY_HAVE_PC_FDC=y
71CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
@@ -132,14 +137,15 @@ CONFIG_BOARD_SCACHE=y
132CONFIG_MIPS_CPU_SCACHE=y 137CONFIG_MIPS_CPU_SCACHE=y
133CONFIG_CPU_HAS_PREFETCH=y 138CONFIG_CPU_HAS_PREFETCH=y
134# CONFIG_MIPS_MT_DISABLED is not set 139# CONFIG_MIPS_MT_DISABLED is not set
135# CONFIG_MIPS_MT_SMTC is not set
136CONFIG_MIPS_MT_SMP=y 140CONFIG_MIPS_MT_SMP=y
141# CONFIG_MIPS_MT_SMTC is not set
137# CONFIG_MIPS_VPE_LOADER is not set 142# CONFIG_MIPS_VPE_LOADER is not set
138CONFIG_MIPS_MT=y 143CONFIG_MIPS_MT=y
139CONFIG_SYS_SUPPORTS_MULTITHREADING=y 144CONFIG_SYS_SUPPORTS_MULTITHREADING=y
140CONFIG_MIPS_MT_FPAFF=y 145CONFIG_MIPS_MT_FPAFF=y
141# CONFIG_64BIT_PHYS_ADDR is not set 146# CONFIG_64BIT_PHYS_ADDR is not set
142CONFIG_CPU_HAS_LLSC=y 147CONFIG_CPU_HAS_LLSC=y
148# CONFIG_CPU_HAS_SMARTMIPS is not set
143CONFIG_CPU_MIPSR2_IRQ_VI=y 149CONFIG_CPU_MIPSR2_IRQ_VI=y
144CONFIG_CPU_MIPSR2_SRS=y 150CONFIG_CPU_MIPSR2_SRS=y
145CONFIG_CPU_HAS_SYNC=y 151CONFIG_CPU_HAS_SYNC=y
@@ -147,6 +153,7 @@ CONFIG_GENERIC_HARDIRQS=y
147CONFIG_GENERIC_IRQ_PROBE=y 153CONFIG_GENERIC_IRQ_PROBE=y
148CONFIG_IRQ_PER_CPU=y 154CONFIG_IRQ_PER_CPU=y
149CONFIG_CPU_SUPPORTS_HIGHMEM=y 155CONFIG_CPU_SUPPORTS_HIGHMEM=y
156CONFIG_SYS_SUPPORTS_SMARTMIPS=y
150CONFIG_ARCH_FLATMEM_ENABLE=y 157CONFIG_ARCH_FLATMEM_ENABLE=y
151CONFIG_SELECT_MEMORY_MODEL=y 158CONFIG_SELECT_MEMORY_MODEL=y
152CONFIG_FLATMEM_MANUAL=y 159CONFIG_FLATMEM_MANUAL=y
@@ -157,6 +164,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set 164# CONFIG_SPARSEMEM_STATIC is not set
158CONFIG_SPLIT_PTLOCK_CPUS=4 165CONFIG_SPLIT_PTLOCK_CPUS=4
159# CONFIG_RESOURCES_64BIT is not set 166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ZONE_DMA_FLAG=1
160CONFIG_SMP=y 168CONFIG_SMP=y
161CONFIG_SYS_SUPPORTS_SMP=y 169CONFIG_SYS_SUPPORTS_SMP=y
162CONFIG_NR_CPUS=2 170CONFIG_NR_CPUS=2
@@ -173,6 +181,7 @@ CONFIG_PREEMPT_NONE=y
173# CONFIG_PREEMPT_VOLUNTARY is not set 181# CONFIG_PREEMPT_VOLUNTARY is not set
174# CONFIG_PREEMPT is not set 182# CONFIG_PREEMPT is not set
175CONFIG_PREEMPT_BKL=y 183CONFIG_PREEMPT_BKL=y
184# CONFIG_KEXEC is not set
176CONFIG_LOCKDEP_SUPPORT=y 185CONFIG_LOCKDEP_SUPPORT=y
177CONFIG_STACKTRACE_SUPPORT=y 186CONFIG_STACKTRACE_SUPPORT=y
178CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 187CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -192,6 +201,7 @@ CONFIG_LOCALVERSION_AUTO=y
192CONFIG_SWAP=y 201CONFIG_SWAP=y
193CONFIG_SYSVIPC=y 202CONFIG_SYSVIPC=y
194# CONFIG_IPC_NS is not set 203# CONFIG_IPC_NS is not set
204CONFIG_SYSVIPC_SYSCTL=y
195# CONFIG_POSIX_MQUEUE is not set 205# CONFIG_POSIX_MQUEUE is not set
196# CONFIG_BSD_PROCESS_ACCT is not set 206# CONFIG_BSD_PROCESS_ACCT is not set
197# CONFIG_TASKSTATS is not set 207# CONFIG_TASKSTATS is not set
@@ -199,8 +209,8 @@ CONFIG_SYSVIPC=y
199# CONFIG_AUDIT is not set 209# CONFIG_AUDIT is not set
200# CONFIG_IKCONFIG is not set 210# CONFIG_IKCONFIG is not set
201# CONFIG_CPUSETS is not set 211# CONFIG_CPUSETS is not set
212CONFIG_SYSFS_DEPRECATED=y
202CONFIG_RELAY=y 213CONFIG_RELAY=y
203CONFIG_INITRAMFS_SOURCE=""
204# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 214# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
205CONFIG_SYSCTL=y 215CONFIG_SYSCTL=y
206CONFIG_EMBEDDED=y 216CONFIG_EMBEDDED=y
@@ -259,7 +269,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
259# 269#
260CONFIG_HW_HAS_PCI=y 270CONFIG_HW_HAS_PCI=y
261CONFIG_PCI=y 271CONFIG_PCI=y
262# CONFIG_PCI_MULTITHREAD_PROBE is not set
263CONFIG_MMU=y 272CONFIG_MMU=y
264 273
265# 274#
@@ -280,6 +289,14 @@ CONFIG_BINFMT_ELF=y
280CONFIG_TRAD_SIGNALS=y 289CONFIG_TRAD_SIGNALS=y
281 290
282# 291#
292# Power management options
293#
294CONFIG_PM=y
295# CONFIG_PM_LEGACY is not set
296# CONFIG_PM_DEBUG is not set
297# CONFIG_PM_SYSFS_DEPRECATED is not set
298
299#
283# Networking 300# Networking
284# 301#
285CONFIG_NET=y 302CONFIG_NET=y
@@ -294,7 +311,9 @@ CONFIG_UNIX=y
294CONFIG_XFRM=y 311CONFIG_XFRM=y
295CONFIG_XFRM_USER=m 312CONFIG_XFRM_USER=m
296# CONFIG_XFRM_SUB_POLICY is not set 313# CONFIG_XFRM_SUB_POLICY is not set
314CONFIG_XFRM_MIGRATE=y
297CONFIG_NET_KEY=y 315CONFIG_NET_KEY=y
316CONFIG_NET_KEY_MIGRATE=y
298CONFIG_INET=y 317CONFIG_INET=y
299CONFIG_IP_MULTICAST=y 318CONFIG_IP_MULTICAST=y
300CONFIG_IP_ADVANCED_ROUTER=y 319CONFIG_IP_ADVANCED_ROUTER=y
@@ -302,7 +321,6 @@ CONFIG_ASK_IP_FIB_HASH=y
302# CONFIG_IP_FIB_TRIE is not set 321# CONFIG_IP_FIB_TRIE is not set
303CONFIG_IP_FIB_HASH=y 322CONFIG_IP_FIB_HASH=y
304CONFIG_IP_MULTIPLE_TABLES=y 323CONFIG_IP_MULTIPLE_TABLES=y
305CONFIG_IP_ROUTE_FWMARK=y
306CONFIG_IP_ROUTE_MULTIPATH=y 324CONFIG_IP_ROUTE_MULTIPATH=y
307# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set 325# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
308CONFIG_IP_ROUTE_VERBOSE=y 326CONFIG_IP_ROUTE_VERBOSE=y
@@ -331,6 +349,7 @@ CONFIG_INET_TCP_DIAG=y
331# CONFIG_TCP_CONG_ADVANCED is not set 349# CONFIG_TCP_CONG_ADVANCED is not set
332CONFIG_TCP_CONG_CUBIC=y 350CONFIG_TCP_CONG_CUBIC=y
333CONFIG_DEFAULT_TCP_CONG="cubic" 351CONFIG_DEFAULT_TCP_CONG="cubic"
352CONFIG_TCP_MD5SIG=y
334 353
335# 354#
336# IP: Virtual Server Configuration 355# IP: Virtual Server Configuration
@@ -379,8 +398,8 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m
379CONFIG_INET6_XFRM_MODE_TUNNEL=m 398CONFIG_INET6_XFRM_MODE_TUNNEL=m
380CONFIG_INET6_XFRM_MODE_BEET=m 399CONFIG_INET6_XFRM_MODE_BEET=m
381# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 400# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
401CONFIG_IPV6_SIT=m
382CONFIG_IPV6_TUNNEL=m 402CONFIG_IPV6_TUNNEL=m
383# CONFIG_IPV6_SUBTREES is not set
384# CONFIG_IPV6_MULTIPLE_TABLES is not set 403# CONFIG_IPV6_MULTIPLE_TABLES is not set
385CONFIG_NETWORK_SECMARK=y 404CONFIG_NETWORK_SECMARK=y
386CONFIG_NETFILTER=y 405CONFIG_NETFILTER=y
@@ -393,15 +412,37 @@ CONFIG_BRIDGE_NETFILTER=y
393CONFIG_NETFILTER_NETLINK=m 412CONFIG_NETFILTER_NETLINK=m
394CONFIG_NETFILTER_NETLINK_QUEUE=m 413CONFIG_NETFILTER_NETLINK_QUEUE=m
395CONFIG_NETFILTER_NETLINK_LOG=m 414CONFIG_NETFILTER_NETLINK_LOG=m
415CONFIG_NF_CONNTRACK_ENABLED=m
416CONFIG_NF_CONNTRACK_SUPPORT=y
417# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
418CONFIG_NF_CONNTRACK=m
419CONFIG_NF_CT_ACCT=y
420CONFIG_NF_CONNTRACK_MARK=y
421CONFIG_NF_CONNTRACK_SECMARK=y
422CONFIG_NF_CONNTRACK_EVENTS=y
423CONFIG_NF_CT_PROTO_GRE=m
424CONFIG_NF_CT_PROTO_SCTP=m
425CONFIG_NF_CONNTRACK_AMANDA=m
426CONFIG_NF_CONNTRACK_FTP=m
427CONFIG_NF_CONNTRACK_H323=m
428CONFIG_NF_CONNTRACK_IRC=m
429# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
430CONFIG_NF_CONNTRACK_PPTP=m
431CONFIG_NF_CONNTRACK_SANE=m
432CONFIG_NF_CONNTRACK_SIP=m
433CONFIG_NF_CONNTRACK_TFTP=m
434CONFIG_NF_CT_NETLINK=m
396CONFIG_NETFILTER_XTABLES=m 435CONFIG_NETFILTER_XTABLES=m
397CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 436CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
398CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 437CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
399# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 438# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
400CONFIG_NETFILTER_XT_TARGET_MARK=m 439CONFIG_NETFILTER_XT_TARGET_MARK=m
401CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 440CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
441CONFIG_NETFILTER_XT_TARGET_NFLOG=m
402CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 442CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
403CONFIG_NETFILTER_XT_TARGET_SECMARK=m 443CONFIG_NETFILTER_XT_TARGET_SECMARK=m
404# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set 444# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
445CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
405CONFIG_NETFILTER_XT_MATCH_COMMENT=m 446CONFIG_NETFILTER_XT_MATCH_COMMENT=m
406CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 447CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
407CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 448CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
@@ -425,25 +466,13 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
425CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 466CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
426CONFIG_NETFILTER_XT_MATCH_STRING=m 467CONFIG_NETFILTER_XT_MATCH_STRING=m
427CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 468CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
469CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
428 470
429# 471#
430# IP: Netfilter Configuration 472# IP: Netfilter Configuration
431# 473#
432CONFIG_IP_NF_CONNTRACK=m 474CONFIG_NF_CONNTRACK_IPV4=m
433CONFIG_IP_NF_CT_ACCT=y 475CONFIG_NF_CONNTRACK_PROC_COMPAT=y
434CONFIG_IP_NF_CONNTRACK_MARK=y
435CONFIG_IP_NF_CONNTRACK_SECMARK=y
436CONFIG_IP_NF_CONNTRACK_EVENTS=y
437CONFIG_IP_NF_CONNTRACK_NETLINK=m
438CONFIG_IP_NF_CT_PROTO_SCTP=m
439CONFIG_IP_NF_FTP=m
440CONFIG_IP_NF_IRC=m
441# CONFIG_IP_NF_NETBIOS_NS is not set
442CONFIG_IP_NF_TFTP=m
443CONFIG_IP_NF_AMANDA=m
444CONFIG_IP_NF_PPTP=m
445CONFIG_IP_NF_H323=m
446CONFIG_IP_NF_SIP=m
447CONFIG_IP_NF_QUEUE=m 476CONFIG_IP_NF_QUEUE=m
448CONFIG_IP_NF_IPTABLES=m 477CONFIG_IP_NF_IPTABLES=m
449CONFIG_IP_NF_MATCH_IPRANGE=m 478CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -454,26 +483,25 @@ CONFIG_IP_NF_MATCH_AH=m
454CONFIG_IP_NF_MATCH_TTL=m 483CONFIG_IP_NF_MATCH_TTL=m
455CONFIG_IP_NF_MATCH_OWNER=m 484CONFIG_IP_NF_MATCH_OWNER=m
456CONFIG_IP_NF_MATCH_ADDRTYPE=m 485CONFIG_IP_NF_MATCH_ADDRTYPE=m
457CONFIG_IP_NF_MATCH_HASHLIMIT=m
458CONFIG_IP_NF_FILTER=m 486CONFIG_IP_NF_FILTER=m
459CONFIG_IP_NF_TARGET_REJECT=m 487CONFIG_IP_NF_TARGET_REJECT=m
460CONFIG_IP_NF_TARGET_LOG=m 488CONFIG_IP_NF_TARGET_LOG=m
461CONFIG_IP_NF_TARGET_ULOG=m 489CONFIG_IP_NF_TARGET_ULOG=m
462CONFIG_IP_NF_TARGET_TCPMSS=m 490CONFIG_NF_NAT=m
463CONFIG_IP_NF_NAT=m 491CONFIG_NF_NAT_NEEDED=y
464CONFIG_IP_NF_NAT_NEEDED=y
465CONFIG_IP_NF_TARGET_MASQUERADE=m 492CONFIG_IP_NF_TARGET_MASQUERADE=m
466CONFIG_IP_NF_TARGET_REDIRECT=m 493CONFIG_IP_NF_TARGET_REDIRECT=m
467CONFIG_IP_NF_TARGET_NETMAP=m 494CONFIG_IP_NF_TARGET_NETMAP=m
468CONFIG_IP_NF_TARGET_SAME=m 495CONFIG_IP_NF_TARGET_SAME=m
469CONFIG_IP_NF_NAT_SNMP_BASIC=m 496CONFIG_NF_NAT_SNMP_BASIC=m
470CONFIG_IP_NF_NAT_IRC=m 497CONFIG_NF_NAT_PROTO_GRE=m
471CONFIG_IP_NF_NAT_FTP=m 498CONFIG_NF_NAT_FTP=m
472CONFIG_IP_NF_NAT_TFTP=m 499CONFIG_NF_NAT_IRC=m
473CONFIG_IP_NF_NAT_AMANDA=m 500CONFIG_NF_NAT_TFTP=m
474CONFIG_IP_NF_NAT_PPTP=m 501CONFIG_NF_NAT_AMANDA=m
475CONFIG_IP_NF_NAT_H323=m 502CONFIG_NF_NAT_PPTP=m
476CONFIG_IP_NF_NAT_SIP=m 503CONFIG_NF_NAT_H323=m
504CONFIG_NF_NAT_SIP=m
477CONFIG_IP_NF_MANGLE=m 505CONFIG_IP_NF_MANGLE=m
478CONFIG_IP_NF_TARGET_TOS=m 506CONFIG_IP_NF_TARGET_TOS=m
479CONFIG_IP_NF_TARGET_ECN=m 507CONFIG_IP_NF_TARGET_ECN=m
@@ -487,6 +515,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
487# 515#
488# IPv6: Netfilter Configuration (EXPERIMENTAL) 516# IPv6: Netfilter Configuration (EXPERIMENTAL)
489# 517#
518CONFIG_NF_CONNTRACK_IPV6=m
490CONFIG_IP6_NF_QUEUE=m 519CONFIG_IP6_NF_QUEUE=m
491CONFIG_IP6_NF_IPTABLES=m 520CONFIG_IP6_NF_IPTABLES=m
492CONFIG_IP6_NF_MATCH_RT=m 521CONFIG_IP6_NF_MATCH_RT=m
@@ -496,6 +525,7 @@ CONFIG_IP6_NF_MATCH_HL=m
496CONFIG_IP6_NF_MATCH_OWNER=m 525CONFIG_IP6_NF_MATCH_OWNER=m
497CONFIG_IP6_NF_MATCH_IPV6HEADER=m 526CONFIG_IP6_NF_MATCH_IPV6HEADER=m
498CONFIG_IP6_NF_MATCH_AH=m 527CONFIG_IP6_NF_MATCH_AH=m
528CONFIG_IP6_NF_MATCH_MH=m
499CONFIG_IP6_NF_MATCH_EUI64=m 529CONFIG_IP6_NF_MATCH_EUI64=m
500CONFIG_IP6_NF_FILTER=m 530CONFIG_IP6_NF_FILTER=m
501CONFIG_IP6_NF_TARGET_LOG=m 531CONFIG_IP6_NF_TARGET_LOG=m
@@ -568,6 +598,7 @@ CONFIG_IPDDP_DECAP=y
568# QoS and/or fair queueing 598# QoS and/or fair queueing
569# 599#
570CONFIG_NET_SCHED=y 600CONFIG_NET_SCHED=y
601CONFIG_NET_SCH_FIFO=y
571CONFIG_NET_SCH_CLK_JIFFIES=y 602CONFIG_NET_SCH_CLK_JIFFIES=y
572# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 603# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
573# CONFIG_NET_SCH_CLK_CPU is not set 604# CONFIG_NET_SCH_CLK_CPU is not set
@@ -655,6 +686,7 @@ CONFIG_MTD_PARTITIONS=y
655# User Modules And Translation Layers 686# User Modules And Translation Layers
656# 687#
657CONFIG_MTD_CHAR=y 688CONFIG_MTD_CHAR=y
689CONFIG_MTD_BLKDEVS=y
658CONFIG_MTD_BLOCK=y 690CONFIG_MTD_BLOCK=y
659# CONFIG_FTL is not set 691# CONFIG_FTL is not set
660# CONFIG_NFTL is not set 692# CONFIG_NFTL is not set
@@ -718,6 +750,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
718# NAND Flash Device Drivers 750# NAND Flash Device Drivers
719# 751#
720# CONFIG_MTD_NAND is not set 752# CONFIG_MTD_NAND is not set
753# CONFIG_MTD_NAND_CAFE is not set
721 754
722# 755#
723# OneNAND Flash Device Drivers 756# OneNAND Flash Device Drivers
@@ -757,6 +790,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
757CONFIG_ATA_OVER_ETH=m 790CONFIG_ATA_OVER_ETH=m
758 791
759# 792#
793# Misc devices
794#
795CONFIG_SGI_IOC4=m
796# CONFIG_TIFM_CORE is not set
797
798#
760# ATA/ATAPI/MFM/RLL support 799# ATA/ATAPI/MFM/RLL support
761# 800#
762CONFIG_IDE=y 801CONFIG_IDE=y
@@ -801,6 +840,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
801# CONFIG_BLK_DEV_JMICRON is not set 840# CONFIG_BLK_DEV_JMICRON is not set
802# CONFIG_BLK_DEV_SC1200 is not set 841# CONFIG_BLK_DEV_SC1200 is not set
803CONFIG_BLK_DEV_PIIX=y 842CONFIG_BLK_DEV_PIIX=y
843CONFIG_BLK_DEV_IT8213=m
804# CONFIG_BLK_DEV_IT821X is not set 844# CONFIG_BLK_DEV_IT821X is not set
805# CONFIG_BLK_DEV_NS87415 is not set 845# CONFIG_BLK_DEV_NS87415 is not set
806# CONFIG_BLK_DEV_PDC202XX_OLD is not set 846# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -810,6 +850,7 @@ CONFIG_BLK_DEV_PIIX=y
810# CONFIG_BLK_DEV_SLC90E66 is not set 850# CONFIG_BLK_DEV_SLC90E66 is not set
811# CONFIG_BLK_DEV_TRM290 is not set 851# CONFIG_BLK_DEV_TRM290 is not set
812# CONFIG_BLK_DEV_VIA82CXXX is not set 852# CONFIG_BLK_DEV_VIA82CXXX is not set
853CONFIG_BLK_DEV_TC86C001=m
813# CONFIG_IDE_ARM is not set 854# CONFIG_IDE_ARM is not set
814CONFIG_BLK_DEV_IDEDMA=y 855CONFIG_BLK_DEV_IDEDMA=y
815# CONFIG_IDEDMA_IVB is not set 856# CONFIG_IDEDMA_IVB is not set
@@ -821,6 +862,7 @@ CONFIG_IDEDMA_AUTO=y
821# 862#
822CONFIG_RAID_ATTRS=m 863CONFIG_RAID_ATTRS=m
823CONFIG_SCSI=m 864CONFIG_SCSI=m
865CONFIG_SCSI_TGT=m
824CONFIG_SCSI_NETLINK=y 866CONFIG_SCSI_NETLINK=y
825CONFIG_SCSI_PROC_FS=y 867CONFIG_SCSI_PROC_FS=y
826 868
@@ -841,6 +883,7 @@ CONFIG_CHR_DEV_SG=m
841CONFIG_SCSI_MULTI_LUN=y 883CONFIG_SCSI_MULTI_LUN=y
842CONFIG_SCSI_CONSTANTS=y 884CONFIG_SCSI_CONSTANTS=y
843CONFIG_SCSI_LOGGING=y 885CONFIG_SCSI_LOGGING=y
886CONFIG_SCSI_SCAN_ASYNC=y
844 887
845# 888#
846# SCSI Transports 889# SCSI Transports
@@ -889,6 +932,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
889# CONFIG_SCSI_DC390T is not set 932# CONFIG_SCSI_DC390T is not set
890# CONFIG_SCSI_NSP32 is not set 933# CONFIG_SCSI_NSP32 is not set
891# CONFIG_SCSI_DEBUG is not set 934# CONFIG_SCSI_DEBUG is not set
935# CONFIG_SCSI_SRP is not set
892 936
893# 937#
894# Serial ATA (prod) and Parallel ATA (experimental) drivers 938# Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -964,6 +1008,7 @@ CONFIG_LXT_PHY=m
964CONFIG_CICADA_PHY=m 1008CONFIG_CICADA_PHY=m
965CONFIG_VITESSE_PHY=m 1009CONFIG_VITESSE_PHY=m
966CONFIG_SMSC_PHY=m 1010CONFIG_SMSC_PHY=m
1011# CONFIG_BROADCOM_PHY is not set
967# CONFIG_FIXED_PHY is not set 1012# CONFIG_FIXED_PHY is not set
968 1013
969# 1014#
@@ -1002,7 +1047,7 @@ CONFIG_PCNET32=y
1002# CONFIG_SUNDANCE is not set 1047# CONFIG_SUNDANCE is not set
1003# CONFIG_TLAN is not set 1048# CONFIG_TLAN is not set
1004# CONFIG_VIA_RHINE is not set 1049# CONFIG_VIA_RHINE is not set
1005# CONFIG_LAN_SAA9730 is not set 1050# CONFIG_SC92031 is not set
1006 1051
1007# 1052#
1008# Ethernet (1000 Mbit) 1053# Ethernet (1000 Mbit)
@@ -1022,14 +1067,17 @@ CONFIG_PCNET32=y
1022# CONFIG_TIGON3 is not set 1067# CONFIG_TIGON3 is not set
1023# CONFIG_BNX2 is not set 1068# CONFIG_BNX2 is not set
1024# CONFIG_QLA3XXX is not set 1069# CONFIG_QLA3XXX is not set
1070# CONFIG_ATL1 is not set
1025 1071
1026# 1072#
1027# Ethernet (10000 Mbit) 1073# Ethernet (10000 Mbit)
1028# 1074#
1029# CONFIG_CHELSIO_T1 is not set 1075# CONFIG_CHELSIO_T1 is not set
1076CONFIG_CHELSIO_T3=m
1030# CONFIG_IXGB is not set 1077# CONFIG_IXGB is not set
1031# CONFIG_S2IO is not set 1078# CONFIG_S2IO is not set
1032# CONFIG_MYRI10GE is not set 1079# CONFIG_MYRI10GE is not set
1080CONFIG_NETXEN_NIC=m
1033 1081
1034# 1082#
1035# Token Ring devices 1083# Token Ring devices
@@ -1146,10 +1194,6 @@ CONFIG_RTC=y
1146# CONFIG_DTLK is not set 1194# CONFIG_DTLK is not set
1147# CONFIG_R3964 is not set 1195# CONFIG_R3964 is not set
1148# CONFIG_APPLICOM is not set 1196# CONFIG_APPLICOM is not set
1149
1150#
1151# Ftape, the floppy tape device driver
1152#
1153# CONFIG_DRM is not set 1197# CONFIG_DRM is not set
1154# CONFIG_RAW_DRIVER is not set 1198# CONFIG_RAW_DRIVER is not set
1155 1199
@@ -1157,7 +1201,6 @@ CONFIG_RTC=y
1157# TPM devices 1201# TPM devices
1158# 1202#
1159# CONFIG_TCG_TPM is not set 1203# CONFIG_TCG_TPM is not set
1160# CONFIG_TELCLOCK is not set
1161 1204
1162# 1205#
1163# I2C support 1206# I2C support
@@ -1182,11 +1225,6 @@ CONFIG_RTC=y
1182# CONFIG_HWMON_VID is not set 1225# CONFIG_HWMON_VID is not set
1183 1226
1184# 1227#
1185# Misc devices
1186#
1187# CONFIG_TIFM_CORE is not set
1188
1189#
1190# Multimedia devices 1228# Multimedia devices
1191# 1229#
1192# CONFIG_VIDEO_DEV is not set 1230# CONFIG_VIDEO_DEV is not set
@@ -1215,6 +1253,12 @@ CONFIG_DUMMY_CONSOLE=y
1215# CONFIG_SOUND is not set 1253# CONFIG_SOUND is not set
1216 1254
1217# 1255#
1256# HID Devices
1257#
1258CONFIG_HID=m
1259# CONFIG_HID_DEBUG is not set
1260
1261#
1218# USB support 1262# USB support
1219# 1263#
1220CONFIG_USB_ARCH_HAS_HCD=y 1264CONFIG_USB_ARCH_HAS_HCD=y
@@ -1277,6 +1321,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1277# 1321#
1278 1322
1279# 1323#
1324# Auxiliary Display support
1325#
1326
1327#
1328# Virtualization
1329#
1330
1331#
1280# File systems 1332# File systems
1281# 1333#
1282CONFIG_EXT2_FS=y 1334CONFIG_EXT2_FS=y
@@ -1286,6 +1338,7 @@ CONFIG_EXT3_FS=y
1286CONFIG_EXT3_FS_XATTR=y 1338CONFIG_EXT3_FS_XATTR=y
1287# CONFIG_EXT3_FS_POSIX_ACL is not set 1339# CONFIG_EXT3_FS_POSIX_ACL is not set
1288# CONFIG_EXT3_FS_SECURITY is not set 1340# CONFIG_EXT3_FS_SECURITY is not set
1341# CONFIG_EXT4DEV_FS is not set
1289CONFIG_JBD=y 1342CONFIG_JBD=y
1290# CONFIG_JBD_DEBUG is not set 1343# CONFIG_JBD_DEBUG is not set
1291CONFIG_FS_MBCACHE=y 1344CONFIG_FS_MBCACHE=y
@@ -1327,7 +1380,6 @@ CONFIG_FUSE_FS=m
1327CONFIG_ISO9660_FS=m 1380CONFIG_ISO9660_FS=m
1328CONFIG_JOLIET=y 1381CONFIG_JOLIET=y
1329CONFIG_ZISOFS=y 1382CONFIG_ZISOFS=y
1330CONFIG_ZISOFS_FS=m
1331CONFIG_UDF_FS=m 1383CONFIG_UDF_FS=m
1332CONFIG_UDF_NLS=y 1384CONFIG_UDF_NLS=y
1333 1385
@@ -1365,6 +1417,20 @@ CONFIG_BEFS_FS=m
1365# CONFIG_BEFS_DEBUG is not set 1417# CONFIG_BEFS_DEBUG is not set
1366CONFIG_BFS_FS=m 1418CONFIG_BFS_FS=m
1367CONFIG_EFS_FS=m 1419CONFIG_EFS_FS=m
1420CONFIG_JFFS2_FS=m
1421CONFIG_JFFS2_FS_DEBUG=0
1422CONFIG_JFFS2_FS_WRITEBUFFER=y
1423# CONFIG_JFFS2_SUMMARY is not set
1424CONFIG_JFFS2_FS_XATTR=y
1425CONFIG_JFFS2_FS_POSIX_ACL=y
1426CONFIG_JFFS2_FS_SECURITY=y
1427CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1428CONFIG_JFFS2_ZLIB=y
1429CONFIG_JFFS2_RTIME=y
1430CONFIG_JFFS2_RUBIN=y
1431# CONFIG_JFFS2_CMODE_NONE is not set
1432CONFIG_JFFS2_CMODE_PRIORITY=y
1433# CONFIG_JFFS2_CMODE_SIZE is not set
1368CONFIG_CRAMFS=m 1434CONFIG_CRAMFS=m
1369CONFIG_VXFS_FS=m 1435CONFIG_VXFS_FS=m
1370# CONFIG_HPFS_FS is not set 1436# CONFIG_HPFS_FS is not set
@@ -1470,9 +1536,10 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1470CONFIG_ENABLE_MUST_CHECK=y 1536CONFIG_ENABLE_MUST_CHECK=y
1471# CONFIG_MAGIC_SYSRQ is not set 1537# CONFIG_MAGIC_SYSRQ is not set
1472# CONFIG_UNUSED_SYMBOLS is not set 1538# CONFIG_UNUSED_SYMBOLS is not set
1539# CONFIG_DEBUG_FS is not set
1540# CONFIG_HEADERS_CHECK is not set
1473# CONFIG_DEBUG_KERNEL is not set 1541# CONFIG_DEBUG_KERNEL is not set
1474CONFIG_LOG_BUF_SHIFT=15 1542CONFIG_LOG_BUF_SHIFT=15
1475# CONFIG_DEBUG_FS is not set
1476CONFIG_CROSSCOMPILE=y 1543CONFIG_CROSSCOMPILE=y
1477CONFIG_CMDLINE="" 1544CONFIG_CMDLINE=""
1478 1545
@@ -1489,19 +1556,24 @@ CONFIG_CRYPTO=y
1489CONFIG_CRYPTO_ALGAPI=y 1556CONFIG_CRYPTO_ALGAPI=y
1490CONFIG_CRYPTO_BLKCIPHER=m 1557CONFIG_CRYPTO_BLKCIPHER=m
1491CONFIG_CRYPTO_HASH=y 1558CONFIG_CRYPTO_HASH=y
1492CONFIG_CRYPTO_MANAGER=m 1559CONFIG_CRYPTO_MANAGER=y
1493CONFIG_CRYPTO_HMAC=y 1560CONFIG_CRYPTO_HMAC=y
1561CONFIG_CRYPTO_XCBC=m
1494CONFIG_CRYPTO_NULL=m 1562CONFIG_CRYPTO_NULL=m
1495CONFIG_CRYPTO_MD4=m 1563CONFIG_CRYPTO_MD4=m
1496CONFIG_CRYPTO_MD5=m 1564CONFIG_CRYPTO_MD5=y
1497CONFIG_CRYPTO_SHA1=m 1565CONFIG_CRYPTO_SHA1=m
1498CONFIG_CRYPTO_SHA256=m 1566CONFIG_CRYPTO_SHA256=m
1499CONFIG_CRYPTO_SHA512=m 1567CONFIG_CRYPTO_SHA512=m
1500CONFIG_CRYPTO_WP512=m 1568CONFIG_CRYPTO_WP512=m
1501CONFIG_CRYPTO_TGR192=m 1569CONFIG_CRYPTO_TGR192=m
1570CONFIG_CRYPTO_GF128MUL=m
1502CONFIG_CRYPTO_ECB=m 1571CONFIG_CRYPTO_ECB=m
1503CONFIG_CRYPTO_CBC=m 1572CONFIG_CRYPTO_CBC=m
1573CONFIG_CRYPTO_PCBC=m
1574CONFIG_CRYPTO_LRW=m
1504CONFIG_CRYPTO_DES=m 1575CONFIG_CRYPTO_DES=m
1576CONFIG_CRYPTO_FCRYPT=m
1505CONFIG_CRYPTO_BLOWFISH=m 1577CONFIG_CRYPTO_BLOWFISH=m
1506CONFIG_CRYPTO_TWOFISH=m 1578CONFIG_CRYPTO_TWOFISH=m
1507CONFIG_CRYPTO_TWOFISH_COMMON=m 1579CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1516,6 +1588,7 @@ CONFIG_CRYPTO_ANUBIS=m
1516CONFIG_CRYPTO_DEFLATE=m 1588CONFIG_CRYPTO_DEFLATE=m
1517CONFIG_CRYPTO_MICHAEL_MIC=m 1589CONFIG_CRYPTO_MICHAEL_MIC=m
1518CONFIG_CRYPTO_CRC32C=m 1590CONFIG_CRYPTO_CRC32C=m
1591CONFIG_CRYPTO_CAMELLIA=m
1519# CONFIG_CRYPTO_TEST is not set 1592# CONFIG_CRYPTO_TEST is not set
1520 1593
1521# 1594#
@@ -1525,6 +1598,7 @@ CONFIG_CRYPTO_CRC32C=m
1525# 1598#
1526# Library routines 1599# Library routines
1527# 1600#
1601CONFIG_BITREVERSE=y
1528# CONFIG_CRC_CCITT is not set 1602# CONFIG_CRC_CCITT is not set
1529CONFIG_CRC16=m 1603CONFIG_CRC16=m
1530CONFIG_CRC32=y 1604CONFIG_CRC32=y
@@ -1536,3 +1610,5 @@ CONFIG_TEXTSEARCH_KMP=m
1536CONFIG_TEXTSEARCH_BM=m 1610CONFIG_TEXTSEARCH_BM=m
1537CONFIG_TEXTSEARCH_FSM=m 1611CONFIG_TEXTSEARCH_FSM=m
1538CONFIG_PLIST=y 1612CONFIG_PLIST=y
1613CONFIG_HAS_IOMEM=y
1614CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index 03efcfd0503b..5ff53e184912 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:13 2006 4# Tue Feb 20 21:47:35 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_SIM=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MIPS_SIM=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
@@ -117,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 122CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
123# CONFIG_64BIT_PHYS_ADDR is not set 127# CONFIG_64BIT_PHYS_ADDR is not set
124CONFIG_CPU_HAS_LLSC=y 128CONFIG_CPU_HAS_LLSC=y
@@ -136,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -148,6 +153,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,15 +172,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 173CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
174# CONFIG_RELAY is not set 184# CONFIG_RELAY is not set
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_ALL is not set 190# CONFIG_KALLSYMS_ALL is not set
180# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -183,12 +194,12 @@ CONFIG_PRINTK=y
183CONFIG_BUG=y 194CONFIG_BUG=y
184CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
185CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
186CONFIG_RT_MUTEXES=y
187CONFIG_FUTEX=y 197CONFIG_FUTEX=y
188CONFIG_EPOLL=y 198CONFIG_EPOLL=y
189CONFIG_SHMEM=y 199CONFIG_SHMEM=y
190CONFIG_SLAB=y 200CONFIG_SLAB=y
191CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
192# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
193CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
194# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -206,6 +217,7 @@ CONFIG_KMOD=y
206# 217#
207# Block layer 218# Block layer
208# 219#
220CONFIG_BLOCK=y
209# CONFIG_LBD is not set 221# CONFIG_LBD is not set
210# CONFIG_LSF is not set 222# CONFIG_LSF is not set
211 223
@@ -244,6 +256,13 @@ CONFIG_BINFMT_ELF=y
244CONFIG_TRAD_SIGNALS=y 256CONFIG_TRAD_SIGNALS=y
245 257
246# 258#
259# Power management options
260#
261CONFIG_PM=y
262# CONFIG_PM_LEGACY is not set
263# CONFIG_PM_DEBUG is not set
264
265#
247# Networking 266# Networking
248# 267#
249CONFIG_NET=y 268CONFIG_NET=y
@@ -257,7 +276,10 @@ CONFIG_PACKET_MMAP=y
257CONFIG_UNIX=y 276CONFIG_UNIX=y
258CONFIG_XFRM=y 277CONFIG_XFRM=y
259# CONFIG_XFRM_USER is not set 278# CONFIG_XFRM_USER is not set
279# CONFIG_XFRM_SUB_POLICY is not set
280CONFIG_XFRM_MIGRATE=y
260CONFIG_NET_KEY=y 281CONFIG_NET_KEY=y
282CONFIG_NET_KEY_MIGRATE=y
261CONFIG_INET=y 283CONFIG_INET=y
262CONFIG_IP_MULTICAST=y 284CONFIG_IP_MULTICAST=y
263CONFIG_IP_ADVANCED_ROUTER=y 285CONFIG_IP_ADVANCED_ROUTER=y
@@ -286,10 +308,13 @@ CONFIG_SYN_COOKIES=y
286# CONFIG_INET_TUNNEL is not set 308# CONFIG_INET_TUNNEL is not set
287CONFIG_INET_XFRM_MODE_TRANSPORT=m 309CONFIG_INET_XFRM_MODE_TRANSPORT=m
288CONFIG_INET_XFRM_MODE_TUNNEL=m 310CONFIG_INET_XFRM_MODE_TUNNEL=m
311CONFIG_INET_XFRM_MODE_BEET=m
289CONFIG_INET_DIAG=y 312CONFIG_INET_DIAG=y
290CONFIG_INET_TCP_DIAG=y 313CONFIG_INET_TCP_DIAG=y
291# CONFIG_TCP_CONG_ADVANCED is not set 314# CONFIG_TCP_CONG_ADVANCED is not set
292CONFIG_TCP_CONG_BIC=y 315CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic"
317CONFIG_TCP_MD5SIG=y
293# CONFIG_IPV6 is not set 318# CONFIG_IPV6 is not set
294# CONFIG_INET6_XFRM_TUNNEL is not set 319# CONFIG_INET6_XFRM_TUNNEL is not set
295# CONFIG_INET6_TUNNEL is not set 320# CONFIG_INET6_TUNNEL is not set
@@ -324,7 +349,6 @@ CONFIG_SCTP_HMAC_MD5=y
324# CONFIG_ATALK is not set 349# CONFIG_ATALK is not set
325# CONFIG_X25 is not set 350# CONFIG_X25 is not set
326# CONFIG_LAPB is not set 351# CONFIG_LAPB is not set
327CONFIG_NET_DIVERT=y
328# CONFIG_ECONET is not set 352# CONFIG_ECONET is not set
329# CONFIG_WAN_ROUTER is not set 353# CONFIG_WAN_ROUTER is not set
330 354
@@ -332,6 +356,7 @@ CONFIG_NET_DIVERT=y
332# QoS and/or fair queueing 356# QoS and/or fair queueing
333# 357#
334CONFIG_NET_SCHED=y 358CONFIG_NET_SCHED=y
359CONFIG_NET_SCH_FIFO=y
335CONFIG_NET_SCH_CLK_JIFFIES=y 360CONFIG_NET_SCH_CLK_JIFFIES=y
336# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 361# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
337# CONFIG_NET_SCH_CLK_CPU is not set 362# CONFIG_NET_SCH_CLK_CPU is not set
@@ -377,6 +402,7 @@ CONFIG_NET_ESTIMATOR=y
377# CONFIG_IRDA is not set 402# CONFIG_IRDA is not set
378# CONFIG_BT is not set 403# CONFIG_BT is not set
379# CONFIG_IEEE80211 is not set 404# CONFIG_IEEE80211 is not set
405CONFIG_FIB_RULES=y
380 406
381# 407#
382# Device Drivers 408# Device Drivers
@@ -389,6 +415,7 @@ CONFIG_NET_ESTIMATOR=y
389# CONFIG_PREVENT_FIRMWARE_BUILD is not set 415# CONFIG_PREVENT_FIRMWARE_BUILD is not set
390# CONFIG_FW_LOADER is not set 416# CONFIG_FW_LOADER is not set
391# CONFIG_DEBUG_DRIVER is not set 417# CONFIG_DEBUG_DRIVER is not set
418# CONFIG_DEBUG_DEVRES is not set
392# CONFIG_SYS_HYPERVISOR is not set 419# CONFIG_SYS_HYPERVISOR is not set
393 420
394# 421#
@@ -409,6 +436,7 @@ CONFIG_NET_ESTIMATOR=y
409# 436#
410# Plug and Play support 437# Plug and Play support
411# 438#
439# CONFIG_PNPACPI is not set
412 440
413# 441#
414# Block devices 442# Block devices
@@ -423,6 +451,10 @@ CONFIG_BLK_DEV_NBD=y
423# CONFIG_ATA_OVER_ETH is not set 451# CONFIG_ATA_OVER_ETH is not set
424 452
425# 453#
454# Misc devices
455#
456
457#
426# ATA/ATAPI/MFM/RLL support 458# ATA/ATAPI/MFM/RLL support
427# 459#
428# CONFIG_IDE is not set 460# CONFIG_IDE is not set
@@ -432,6 +464,12 @@ CONFIG_BLK_DEV_NBD=y
432# 464#
433# CONFIG_RAID_ATTRS is not set 465# CONFIG_RAID_ATTRS is not set
434# CONFIG_SCSI is not set 466# CONFIG_SCSI is not set
467# CONFIG_SCSI_NETLINK is not set
468
469#
470# Serial ATA (prod) and Parallel ATA (experimental) drivers
471#
472# CONFIG_ATA is not set
435 473
436# 474#
437# Multi-device support (RAID and LVM) 475# Multi-device support (RAID and LVM)
@@ -468,7 +506,6 @@ CONFIG_NETDEVICES=y
468# Ethernet (10 or 100Mbit) 506# Ethernet (10 or 100Mbit)
469# 507#
470# CONFIG_NET_ETHERNET is not set 508# CONFIG_NET_ETHERNET is not set
471# CONFIG_MIPS_SIM_NET is not set
472 509
473# 510#
474# Ethernet (1000 Mbit) 511# Ethernet (1000 Mbit)
@@ -512,6 +549,7 @@ CONFIG_NETDEVICES=y
512# Input device support 549# Input device support
513# 550#
514CONFIG_INPUT=y 551CONFIG_INPUT=y
552# CONFIG_INPUT_FF_MEMLESS is not set
515 553
516# 554#
517# Userland interfaces 555# Userland interfaces
@@ -579,17 +617,12 @@ CONFIG_LEGACY_PTY_COUNT=256
579# CONFIG_GEN_RTC is not set 617# CONFIG_GEN_RTC is not set
580# CONFIG_DTLK is not set 618# CONFIG_DTLK is not set
581# CONFIG_R3964 is not set 619# CONFIG_R3964 is not set
582
583#
584# Ftape, the floppy tape device driver
585#
586# CONFIG_RAW_DRIVER is not set 620# CONFIG_RAW_DRIVER is not set
587 621
588# 622#
589# TPM devices 623# TPM devices
590# 624#
591# CONFIG_TCG_TPM is not set 625# CONFIG_TCG_TPM is not set
592# CONFIG_TELCLOCK is not set
593 626
594# 627#
595# I2C support 628# I2C support
@@ -605,6 +638,7 @@ CONFIG_LEGACY_PTY_COUNT=256
605# 638#
606# Dallas's 1-wire bus 639# Dallas's 1-wire bus
607# 640#
641# CONFIG_W1 is not set
608 642
609# 643#
610# Hardware Monitoring support 644# Hardware Monitoring support
@@ -613,14 +647,9 @@ CONFIG_LEGACY_PTY_COUNT=256
613# CONFIG_HWMON_VID is not set 647# CONFIG_HWMON_VID is not set
614 648
615# 649#
616# Misc devices
617#
618
619#
620# Multimedia devices 650# Multimedia devices
621# 651#
622# CONFIG_VIDEO_DEV is not set 652# CONFIG_VIDEO_DEV is not set
623CONFIG_VIDEO_V4L2=y
624 653
625# 654#
626# Digital Video Broadcasting Devices 655# Digital Video Broadcasting Devices
@@ -639,6 +668,11 @@ CONFIG_VIDEO_V4L2=y
639# CONFIG_SOUND is not set 668# CONFIG_SOUND is not set
640 669
641# 670#
671# HID Devices
672#
673# CONFIG_HID is not set
674
675#
642# USB support 676# USB support
643# 677#
644# CONFIG_USB_ARCH_HAS_HCD is not set 678# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -699,16 +733,26 @@ CONFIG_VIDEO_V4L2=y
699# 733#
700 734
701# 735#
736# Auxiliary Display support
737#
738
739#
740# Virtualization
741#
742
743#
702# File systems 744# File systems
703# 745#
704CONFIG_EXT2_FS=y 746CONFIG_EXT2_FS=y
705# CONFIG_EXT2_FS_XATTR is not set 747# CONFIG_EXT2_FS_XATTR is not set
706# CONFIG_EXT2_FS_XIP is not set 748# CONFIG_EXT2_FS_XIP is not set
707# CONFIG_EXT3_FS is not set 749# CONFIG_EXT3_FS is not set
750# CONFIG_EXT4DEV_FS is not set
708# CONFIG_REISERFS_FS is not set 751# CONFIG_REISERFS_FS is not set
709# CONFIG_JFS_FS is not set 752# CONFIG_JFS_FS is not set
710# CONFIG_FS_POSIX_ACL is not set 753# CONFIG_FS_POSIX_ACL is not set
711# CONFIG_XFS_FS is not set 754# CONFIG_XFS_FS is not set
755# CONFIG_GFS2_FS is not set
712# CONFIG_MINIX_FS is not set 756# CONFIG_MINIX_FS is not set
713CONFIG_ROMFS_FS=y 757CONFIG_ROMFS_FS=y
714# CONFIG_INOTIFY is not set 758# CONFIG_INOTIFY is not set
@@ -736,6 +780,7 @@ CONFIG_ROMFS_FS=y
736# 780#
737CONFIG_PROC_FS=y 781CONFIG_PROC_FS=y
738# CONFIG_PROC_KCORE is not set 782# CONFIG_PROC_KCORE is not set
783CONFIG_PROC_SYSCTL=y
739# CONFIG_SYSFS is not set 784# CONFIG_SYSFS is not set
740# CONFIG_TMPFS is not set 785# CONFIG_TMPFS is not set
741# CONFIG_HUGETLB_PAGE is not set 786# CONFIG_HUGETLB_PAGE is not set
@@ -776,7 +821,6 @@ CONFIG_SUNRPC=y
776# CONFIG_RPCSEC_GSS_SPKM3 is not set 821# CONFIG_RPCSEC_GSS_SPKM3 is not set
777# CONFIG_SMB_FS is not set 822# CONFIG_SMB_FS is not set
778# CONFIG_CIFS is not set 823# CONFIG_CIFS is not set
779# CONFIG_CIFS_DEBUG2 is not set
780# CONFIG_NCP_FS is not set 824# CONFIG_NCP_FS is not set
781# CONFIG_CODA_FS is not set 825# CONFIG_CODA_FS is not set
782# CONFIG_AFS_FS is not set 826# CONFIG_AFS_FS is not set
@@ -794,6 +838,10 @@ CONFIG_MSDOS_PARTITION=y
794# CONFIG_NLS is not set 838# CONFIG_NLS is not set
795 839
796# 840#
841# Distributed Lock Manager
842#
843
844#
797# Profiling support 845# Profiling support
798# 846#
799# CONFIG_PROFILING is not set 847# CONFIG_PROFILING is not set
@@ -803,29 +851,34 @@ CONFIG_MSDOS_PARTITION=y
803# 851#
804CONFIG_TRACE_IRQFLAGS_SUPPORT=y 852CONFIG_TRACE_IRQFLAGS_SUPPORT=y
805# CONFIG_PRINTK_TIME is not set 853# CONFIG_PRINTK_TIME is not set
854CONFIG_ENABLE_MUST_CHECK=y
806# CONFIG_MAGIC_SYSRQ is not set 855# CONFIG_MAGIC_SYSRQ is not set
807# CONFIG_UNUSED_SYMBOLS is not set 856# CONFIG_UNUSED_SYMBOLS is not set
857# CONFIG_HEADERS_CHECK is not set
808CONFIG_DEBUG_KERNEL=y 858CONFIG_DEBUG_KERNEL=y
859# CONFIG_DEBUG_SHIRQ is not set
809CONFIG_LOG_BUF_SHIFT=14 860CONFIG_LOG_BUF_SHIFT=14
810# CONFIG_DETECT_SOFTLOCKUP is not set 861# CONFIG_DETECT_SOFTLOCKUP is not set
811# CONFIG_SCHEDSTATS is not set 862# CONFIG_SCHEDSTATS is not set
863# CONFIG_TIMER_STATS is not set
812# CONFIG_DEBUG_SLAB is not set 864# CONFIG_DEBUG_SLAB is not set
813# CONFIG_DEBUG_RT_MUTEXES is not set 865# CONFIG_DEBUG_RT_MUTEXES is not set
814# CONFIG_RT_MUTEX_TESTER is not set 866# CONFIG_RT_MUTEX_TESTER is not set
815# CONFIG_DEBUG_SPINLOCK is not set 867# CONFIG_DEBUG_SPINLOCK is not set
816CONFIG_DEBUG_MUTEXES=y 868CONFIG_DEBUG_MUTEXES=y
817# CONFIG_DEBUG_RWSEMS is not set 869# CONFIG_DEBUG_LOCK_ALLOC is not set
870# CONFIG_PROVE_LOCKING is not set
818# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 871# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
819# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 872# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
820# CONFIG_DEBUG_KOBJECT is not set 873# CONFIG_DEBUG_KOBJECT is not set
821CONFIG_DEBUG_INFO=y 874CONFIG_DEBUG_INFO=y
822# CONFIG_DEBUG_VM is not set 875# CONFIG_DEBUG_VM is not set
876# CONFIG_DEBUG_LIST is not set
823CONFIG_FORCED_INLINING=y 877CONFIG_FORCED_INLINING=y
824# CONFIG_RCU_TORTURE_TEST is not set 878# CONFIG_RCU_TORTURE_TEST is not set
825CONFIG_CROSSCOMPILE=y 879CONFIG_CROSSCOMPILE=y
826CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp" 880CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp"
827# CONFIG_DEBUG_STACK_USAGE is not set 881# CONFIG_DEBUG_STACK_USAGE is not set
828# CONFIG_KGDB is not set
829# CONFIG_RUNTIME_DEBUG is not set 882# CONFIG_RUNTIME_DEBUG is not set
830# CONFIG_MIPS_UNCACHED is not set 883# CONFIG_MIPS_UNCACHED is not set
831 884
@@ -838,7 +891,12 @@ CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp"
838# Cryptographic options 891# Cryptographic options
839# 892#
840CONFIG_CRYPTO=y 893CONFIG_CRYPTO=y
894CONFIG_CRYPTO_ALGAPI=y
895CONFIG_CRYPTO_BLKCIPHER=m
896CONFIG_CRYPTO_HASH=y
897CONFIG_CRYPTO_MANAGER=y
841CONFIG_CRYPTO_HMAC=y 898CONFIG_CRYPTO_HMAC=y
899CONFIG_CRYPTO_XCBC=m
842# CONFIG_CRYPTO_NULL is not set 900# CONFIG_CRYPTO_NULL is not set
843# CONFIG_CRYPTO_MD4 is not set 901# CONFIG_CRYPTO_MD4 is not set
844CONFIG_CRYPTO_MD5=y 902CONFIG_CRYPTO_MD5=y
@@ -847,7 +905,13 @@ CONFIG_CRYPTO_MD5=y
847# CONFIG_CRYPTO_SHA512 is not set 905# CONFIG_CRYPTO_SHA512 is not set
848# CONFIG_CRYPTO_WP512 is not set 906# CONFIG_CRYPTO_WP512 is not set
849# CONFIG_CRYPTO_TGR192 is not set 907# CONFIG_CRYPTO_TGR192 is not set
908CONFIG_CRYPTO_GF128MUL=m
909CONFIG_CRYPTO_ECB=m
910CONFIG_CRYPTO_CBC=m
911CONFIG_CRYPTO_PCBC=m
912CONFIG_CRYPTO_LRW=m
850# CONFIG_CRYPTO_DES is not set 913# CONFIG_CRYPTO_DES is not set
914CONFIG_CRYPTO_FCRYPT=m
851# CONFIG_CRYPTO_BLOWFISH is not set 915# CONFIG_CRYPTO_BLOWFISH is not set
852# CONFIG_CRYPTO_TWOFISH is not set 916# CONFIG_CRYPTO_TWOFISH is not set
853# CONFIG_CRYPTO_SERPENT is not set 917# CONFIG_CRYPTO_SERPENT is not set
@@ -861,6 +925,7 @@ CONFIG_CRYPTO_MD5=y
861# CONFIG_CRYPTO_DEFLATE is not set 925# CONFIG_CRYPTO_DEFLATE is not set
862# CONFIG_CRYPTO_MICHAEL_MIC is not set 926# CONFIG_CRYPTO_MICHAEL_MIC is not set
863# CONFIG_CRYPTO_CRC32C is not set 927# CONFIG_CRYPTO_CRC32C is not set
928CONFIG_CRYPTO_CAMELLIA=m
864# CONFIG_CRYPTO_TEST is not set 929# CONFIG_CRYPTO_TEST is not set
865 930
866# 931#
@@ -870,8 +935,11 @@ CONFIG_CRYPTO_MD5=y
870# 935#
871# Library routines 936# Library routines
872# 937#
938CONFIG_BITREVERSE=y
873# CONFIG_CRC_CCITT is not set 939# CONFIG_CRC_CCITT is not set
874CONFIG_CRC16=y 940CONFIG_CRC16=y
875CONFIG_CRC32=y 941CONFIG_CRC32=y
876# CONFIG_LIBCRC32C is not set 942# CONFIG_LIBCRC32C is not set
877CONFIG_PLIST=y 943CONFIG_PLIST=y
944CONFIG_HAS_IOMEM=y
945CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index e4221aafbc4c..750e6445c613 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc2 3# Linux kernel version: 2.6.20
4# Tue Jul 25 23:16:46 2006 4# Tue Feb 20 21:47:35 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -71,10 +71,14 @@ CONFIG_VICTOR_MPC30X=y
71# CONFIG_ZAO_CAPCELLA is not set 71# CONFIG_ZAO_CAPCELLA is not set
72CONFIG_PCI_VR41XX=y 72CONFIG_PCI_VR41XX=y
73CONFIG_RWSEM_GENERIC_SPINLOCK=y 73CONFIG_RWSEM_GENERIC_SPINLOCK=y
74# CONFIG_ARCH_HAS_ILOG2_U32 is not set
75# CONFIG_ARCH_HAS_ILOG2_U64 is not set
74CONFIG_GENERIC_FIND_NEXT_BIT=y 76CONFIG_GENERIC_FIND_NEXT_BIT=y
75CONFIG_GENERIC_HWEIGHT=y 77CONFIG_GENERIC_HWEIGHT=y
76CONFIG_GENERIC_CALIBRATE_DELAY=y 78CONFIG_GENERIC_CALIBRATE_DELAY=y
79CONFIG_GENERIC_TIME=y
77CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 80CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
81CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
78CONFIG_DMA_NONCOHERENT=y 82CONFIG_DMA_NONCOHERENT=y
79CONFIG_DMA_NEED_PCI_MAP_STATE=y 83CONFIG_DMA_NEED_PCI_MAP_STATE=y
80# CONFIG_CPU_BIG_ENDIAN is not set 84# CONFIG_CPU_BIG_ENDIAN is not set
@@ -107,6 +111,7 @@ CONFIG_CPU_VR41XX=y
107# CONFIG_CPU_SB1 is not set 111# CONFIG_CPU_SB1 is not set
108CONFIG_SYS_HAS_CPU_VR41XX=y 112CONFIG_SYS_HAS_CPU_VR41XX=y
109CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 113CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
114CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 115CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 116CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
112 117
@@ -120,8 +125,8 @@ CONFIG_PAGE_SIZE_4KB=y
120# CONFIG_PAGE_SIZE_16KB is not set 125# CONFIG_PAGE_SIZE_16KB is not set
121# CONFIG_PAGE_SIZE_64KB is not set 126# CONFIG_PAGE_SIZE_64KB is not set
122CONFIG_MIPS_MT_DISABLED=y 127CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_MT_SMP is not set 128# CONFIG_MIPS_MT_SMP is not set
129# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set 130# CONFIG_MIPS_VPE_LOADER is not set
126CONFIG_CPU_HAS_SYNC=y 131CONFIG_CPU_HAS_SYNC=y
127CONFIG_GENERIC_HARDIRQS=y 132CONFIG_GENERIC_HARDIRQS=y
@@ -136,6 +141,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 143# CONFIG_RESOURCES_64BIT is not set
144CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 145# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 146# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 147# CONFIG_HZ_128 is not set
@@ -148,6 +154,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 154CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 155# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 158CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 159CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,16 +173,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 173CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 174CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 178# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 179# CONFIG_BSD_PROCESS_ACCT is not set
171# CONFIG_TASKSTATS is not set 180# CONFIG_TASKSTATS is not set
172CONFIG_SYSCTL=y 181# CONFIG_UTS_NS is not set
173# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
174# CONFIG_IKCONFIG is not set 183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
175CONFIG_RELAY=y 185CONFIG_RELAY=y
176CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
178CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
179CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
180# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
181CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -183,12 +194,12 @@ CONFIG_PRINTK=y
183CONFIG_BUG=y 194CONFIG_BUG=y
184CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
185CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
186CONFIG_RT_MUTEXES=y
187CONFIG_FUTEX=y 197CONFIG_FUTEX=y
188CONFIG_EPOLL=y 198CONFIG_EPOLL=y
189CONFIG_SHMEM=y 199CONFIG_SHMEM=y
190CONFIG_SLAB=y 200CONFIG_SLAB=y
191CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
192# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
193CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
194# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -206,6 +217,7 @@ CONFIG_KMOD=y
206# 217#
207# Block layer 218# Block layer
208# 219#
220CONFIG_BLOCK=y
209# CONFIG_LBD is not set 221# CONFIG_LBD is not set
210# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
211# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -261,6 +273,14 @@ CONFIG_BINFMT_ELF=y
261CONFIG_TRAD_SIGNALS=y 273CONFIG_TRAD_SIGNALS=y
262 274
263# 275#
276# Power management options
277#
278CONFIG_PM=y
279# CONFIG_PM_LEGACY is not set
280# CONFIG_PM_DEBUG is not set
281# CONFIG_PM_SYSFS_DEPRECATED is not set
282
283#
264# Networking 284# Networking
265# 285#
266CONFIG_NET=y 286CONFIG_NET=y
@@ -274,7 +294,10 @@ CONFIG_PACKET_MMAP=y
274CONFIG_UNIX=y 294CONFIG_UNIX=y
275CONFIG_XFRM=y 295CONFIG_XFRM=y
276CONFIG_XFRM_USER=m 296CONFIG_XFRM_USER=m
297# CONFIG_XFRM_SUB_POLICY is not set
298CONFIG_XFRM_MIGRATE=y
277CONFIG_NET_KEY=y 299CONFIG_NET_KEY=y
300CONFIG_NET_KEY_MIGRATE=y
278CONFIG_INET=y 301CONFIG_INET=y
279CONFIG_IP_MULTICAST=y 302CONFIG_IP_MULTICAST=y
280# CONFIG_IP_ADVANCED_ROUTER is not set 303# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -292,10 +315,13 @@ CONFIG_IP_FIB_HASH=y
292# CONFIG_INET_TUNNEL is not set 315# CONFIG_INET_TUNNEL is not set
293CONFIG_INET_XFRM_MODE_TRANSPORT=m 316CONFIG_INET_XFRM_MODE_TRANSPORT=m
294CONFIG_INET_XFRM_MODE_TUNNEL=m 317CONFIG_INET_XFRM_MODE_TUNNEL=m
318CONFIG_INET_XFRM_MODE_BEET=m
295CONFIG_INET_DIAG=y 319CONFIG_INET_DIAG=y
296CONFIG_INET_TCP_DIAG=y 320CONFIG_INET_TCP_DIAG=y
297# CONFIG_TCP_CONG_ADVANCED is not set 321# CONFIG_TCP_CONG_ADVANCED is not set
298CONFIG_TCP_CONG_BIC=y 322CONFIG_TCP_CONG_CUBIC=y
323CONFIG_DEFAULT_TCP_CONG="cubic"
324CONFIG_TCP_MD5SIG=y
299# CONFIG_IPV6 is not set 325# CONFIG_IPV6 is not set
300# CONFIG_INET6_XFRM_TUNNEL is not set 326# CONFIG_INET6_XFRM_TUNNEL is not set
301# CONFIG_INET6_TUNNEL is not set 327# CONFIG_INET6_TUNNEL is not set
@@ -325,7 +351,6 @@ CONFIG_NETWORK_SECMARK=y
325# CONFIG_ATALK is not set 351# CONFIG_ATALK is not set
326# CONFIG_X25 is not set 352# CONFIG_X25 is not set
327# CONFIG_LAPB is not set 353# CONFIG_LAPB is not set
328# CONFIG_NET_DIVERT is not set
329# CONFIG_ECONET is not set 354# CONFIG_ECONET is not set
330# CONFIG_WAN_ROUTER is not set 355# CONFIG_WAN_ROUTER is not set
331 356
@@ -380,6 +405,7 @@ CONFIG_CONNECTOR=m
380# 405#
381# Plug and Play support 406# Plug and Play support
382# 407#
408# CONFIG_PNPACPI is not set
383 409
384# 410#
385# Block devices 411# Block devices
@@ -399,9 +425,16 @@ CONFIG_CONNECTOR=m
399CONFIG_ATA_OVER_ETH=m 425CONFIG_ATA_OVER_ETH=m
400 426
401# 427#
428# Misc devices
429#
430CONFIG_SGI_IOC4=m
431# CONFIG_TIFM_CORE is not set
432
433#
402# ATA/ATAPI/MFM/RLL support 434# ATA/ATAPI/MFM/RLL support
403# 435#
404CONFIG_IDE=y 436CONFIG_IDE=y
437CONFIG_IDE_MAX_HWIFS=4
405CONFIG_BLK_DEV_IDE=y 438CONFIG_BLK_DEV_IDE=y
406 439
407# 440#
@@ -431,6 +464,12 @@ CONFIG_IDE_GENERIC=y
431# 464#
432# CONFIG_RAID_ATTRS is not set 465# CONFIG_RAID_ATTRS is not set
433# CONFIG_SCSI is not set 466# CONFIG_SCSI is not set
467# CONFIG_SCSI_NETLINK is not set
468
469#
470# Serial ATA (prod) and Parallel ATA (experimental) drivers
471#
472# CONFIG_ATA is not set
434 473
435# 474#
436# Multi-device support (RAID and LVM) 475# Multi-device support (RAID and LVM)
@@ -492,14 +531,18 @@ CONFIG_MII=m
492# CONFIG_SK98LIN is not set 531# CONFIG_SK98LIN is not set
493# CONFIG_TIGON3 is not set 532# CONFIG_TIGON3 is not set
494# CONFIG_BNX2 is not set 533# CONFIG_BNX2 is not set
534CONFIG_QLA3XXX=m
535# CONFIG_ATL1 is not set
495 536
496# 537#
497# Ethernet (10000 Mbit) 538# Ethernet (10000 Mbit)
498# 539#
499# CONFIG_CHELSIO_T1 is not set 540# CONFIG_CHELSIO_T1 is not set
541CONFIG_CHELSIO_T3=m
500# CONFIG_IXGB is not set 542# CONFIG_IXGB is not set
501# CONFIG_S2IO is not set 543# CONFIG_S2IO is not set
502# CONFIG_MYRI10GE is not set 544# CONFIG_MYRI10GE is not set
545CONFIG_NETXEN_NIC=m
503 546
504# 547#
505# Token Ring devices 548# Token Ring devices
@@ -594,6 +637,7 @@ CONFIG_PCMCIA_AXNET=m
594# Input device support 637# Input device support
595# 638#
596CONFIG_INPUT=y 639CONFIG_INPUT=y
640# CONFIG_INPUT_FF_MEMLESS is not set
597 641
598# 642#
599# Userland interfaces 643# Userland interfaces
@@ -665,10 +709,6 @@ CONFIG_LEGACY_PTY_COUNT=256
665# CONFIG_DTLK is not set 709# CONFIG_DTLK is not set
666# CONFIG_R3964 is not set 710# CONFIG_R3964 is not set
667# CONFIG_APPLICOM is not set 711# CONFIG_APPLICOM is not set
668
669#
670# Ftape, the floppy tape device driver
671#
672# CONFIG_DRM is not set 712# CONFIG_DRM is not set
673 713
674# 714#
@@ -684,7 +724,6 @@ CONFIG_LEGACY_PTY_COUNT=256
684# TPM devices 724# TPM devices
685# 725#
686# CONFIG_TCG_TPM is not set 726# CONFIG_TCG_TPM is not set
687# CONFIG_TELCLOCK is not set
688 727
689# 728#
690# I2C support 729# I2C support
@@ -709,14 +748,9 @@ CONFIG_LEGACY_PTY_COUNT=256
709# CONFIG_HWMON_VID is not set 748# CONFIG_HWMON_VID is not set
710 749
711# 750#
712# Misc devices
713#
714
715#
716# Multimedia devices 751# Multimedia devices
717# 752#
718# CONFIG_VIDEO_DEV is not set 753# CONFIG_VIDEO_DEV is not set
719CONFIG_VIDEO_V4L2=y
720 754
721# 755#
722# Digital Video Broadcasting Devices 756# Digital Video Broadcasting Devices
@@ -735,6 +769,7 @@ CONFIG_VIDEO_V4L2=y
735# 769#
736# CONFIG_VGA_CONSOLE is not set 770# CONFIG_VGA_CONSOLE is not set
737CONFIG_DUMMY_CONSOLE=y 771CONFIG_DUMMY_CONSOLE=y
772# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
738 773
739# 774#
740# Sound 775# Sound
@@ -742,6 +777,12 @@ CONFIG_DUMMY_CONSOLE=y
742# CONFIG_SOUND is not set 777# CONFIG_SOUND is not set
743 778
744# 779#
780# HID Devices
781#
782CONFIG_HID=y
783# CONFIG_HID_DEBUG is not set
784
785#
745# USB support 786# USB support
746# 787#
747CONFIG_USB_ARCH_HAS_HCD=y 788CONFIG_USB_ARCH_HAS_HCD=y
@@ -754,8 +795,8 @@ CONFIG_USB=m
754# Miscellaneous USB options 795# Miscellaneous USB options
755# 796#
756CONFIG_USB_DEVICEFS=y 797CONFIG_USB_DEVICEFS=y
757# CONFIG_USB_BANDWIDTH is not set
758# CONFIG_USB_DYNAMIC_MINORS is not set 798# CONFIG_USB_DYNAMIC_MINORS is not set
799# CONFIG_USB_SUSPEND is not set
759# CONFIG_USB_OTG is not set 800# CONFIG_USB_OTG is not set
760 801
761# 802#
@@ -764,7 +805,8 @@ CONFIG_USB_DEVICEFS=y
764# CONFIG_USB_EHCI_HCD is not set 805# CONFIG_USB_EHCI_HCD is not set
765# CONFIG_USB_ISP116X_HCD is not set 806# CONFIG_USB_ISP116X_HCD is not set
766CONFIG_USB_OHCI_HCD=m 807CONFIG_USB_OHCI_HCD=m
767# CONFIG_USB_OHCI_BIG_ENDIAN is not set 808# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
809# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
768CONFIG_USB_OHCI_LITTLE_ENDIAN=y 810CONFIG_USB_OHCI_LITTLE_ENDIAN=y
769# CONFIG_USB_UHCI_HCD is not set 811# CONFIG_USB_UHCI_HCD is not set
770# CONFIG_USB_SL811_HCD is not set 812# CONFIG_USB_SL811_HCD is not set
@@ -782,7 +824,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
782# 824#
783# may also be needed; see USB_STORAGE Help for more information 825# may also be needed; see USB_STORAGE Help for more information
784# 826#
785# CONFIG_USB_STORAGE is not set
786# CONFIG_USB_LIBUSUAL is not set 827# CONFIG_USB_LIBUSUAL is not set
787 828
788# 829#
@@ -807,6 +848,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
807# CONFIG_USB_ATI_REMOTE2 is not set 848# CONFIG_USB_ATI_REMOTE2 is not set
808# CONFIG_USB_KEYSPAN_REMOTE is not set 849# CONFIG_USB_KEYSPAN_REMOTE is not set
809# CONFIG_USB_APPLETOUCH is not set 850# CONFIG_USB_APPLETOUCH is not set
851# CONFIG_USB_GTCO is not set
810 852
811# 853#
812# USB Imaging devices 854# USB Imaging devices
@@ -820,6 +862,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
820# CONFIG_USB_KAWETH is not set 862# CONFIG_USB_KAWETH is not set
821CONFIG_USB_PEGASUS=m 863CONFIG_USB_PEGASUS=m
822# CONFIG_USB_RTL8150 is not set 864# CONFIG_USB_RTL8150 is not set
865# CONFIG_USB_USBNET_MII is not set
823# CONFIG_USB_USBNET is not set 866# CONFIG_USB_USBNET is not set
824# CONFIG_USB_MON is not set 867# CONFIG_USB_MON is not set
825 868
@@ -837,18 +880,21 @@ CONFIG_USB_PEGASUS=m
837# 880#
838# CONFIG_USB_EMI62 is not set 881# CONFIG_USB_EMI62 is not set
839# CONFIG_USB_EMI26 is not set 882# CONFIG_USB_EMI26 is not set
883# CONFIG_USB_ADUTUX is not set
840# CONFIG_USB_AUERSWALD is not set 884# CONFIG_USB_AUERSWALD is not set
841# CONFIG_USB_RIO500 is not set 885# CONFIG_USB_RIO500 is not set
842# CONFIG_USB_LEGOTOWER is not set 886# CONFIG_USB_LEGOTOWER is not set
843# CONFIG_USB_LCD is not set 887# CONFIG_USB_LCD is not set
888# CONFIG_USB_BERRY_CHARGE is not set
844# CONFIG_USB_LED is not set 889# CONFIG_USB_LED is not set
845# CONFIG_USB_CYPRESS_CY7C63 is not set 890# CONFIG_USB_CYPRESS_CY7C63 is not set
846# CONFIG_USB_CYTHERM is not set 891# CONFIG_USB_CYTHERM is not set
847# CONFIG_USB_PHIDGETKIT is not set 892# CONFIG_USB_PHIDGET is not set
848# CONFIG_USB_PHIDGETSERVO is not set
849# CONFIG_USB_IDMOUSE is not set 893# CONFIG_USB_IDMOUSE is not set
894# CONFIG_USB_FTDI_ELAN is not set
850# CONFIG_USB_APPLEDISPLAY is not set 895# CONFIG_USB_APPLEDISPLAY is not set
851# CONFIG_USB_LD is not set 896# CONFIG_USB_LD is not set
897# CONFIG_USB_TRANCEVIBRATOR is not set
852# CONFIG_USB_TEST is not set 898# CONFIG_USB_TEST is not set
853 899
854# 900#
@@ -906,16 +952,26 @@ CONFIG_USB_PEGASUS=m
906# 952#
907 953
908# 954#
955# Auxiliary Display support
956#
957
958#
959# Virtualization
960#
961
962#
909# File systems 963# File systems
910# 964#
911CONFIG_EXT2_FS=y 965CONFIG_EXT2_FS=y
912# CONFIG_EXT2_FS_XATTR is not set 966# CONFIG_EXT2_FS_XATTR is not set
913# CONFIG_EXT2_FS_XIP is not set 967# CONFIG_EXT2_FS_XIP is not set
914# CONFIG_EXT3_FS is not set 968# CONFIG_EXT3_FS is not set
969# CONFIG_EXT4DEV_FS is not set
915# CONFIG_REISERFS_FS is not set 970# CONFIG_REISERFS_FS is not set
916# CONFIG_JFS_FS is not set 971# CONFIG_JFS_FS is not set
917# CONFIG_FS_POSIX_ACL is not set 972# CONFIG_FS_POSIX_ACL is not set
918# CONFIG_XFS_FS is not set 973# CONFIG_XFS_FS is not set
974# CONFIG_GFS2_FS is not set
919# CONFIG_OCFS2_FS is not set 975# CONFIG_OCFS2_FS is not set
920# CONFIG_MINIX_FS is not set 976# CONFIG_MINIX_FS is not set
921# CONFIG_ROMFS_FS is not set 977# CONFIG_ROMFS_FS is not set
@@ -945,17 +1001,19 @@ CONFIG_FUSE_FS=m
945# 1001#
946CONFIG_PROC_FS=y 1002CONFIG_PROC_FS=y
947CONFIG_PROC_KCORE=y 1003CONFIG_PROC_KCORE=y
1004CONFIG_PROC_SYSCTL=y
948CONFIG_SYSFS=y 1005CONFIG_SYSFS=y
949# CONFIG_TMPFS is not set 1006# CONFIG_TMPFS is not set
950# CONFIG_HUGETLB_PAGE is not set 1007# CONFIG_HUGETLB_PAGE is not set
951CONFIG_RAMFS=y 1008CONFIG_RAMFS=y
952# CONFIG_CONFIGFS_FS is not set 1009CONFIG_CONFIGFS_FS=m
953 1010
954# 1011#
955# Miscellaneous filesystems 1012# Miscellaneous filesystems
956# 1013#
957# CONFIG_ADFS_FS is not set 1014# CONFIG_ADFS_FS is not set
958# CONFIG_AFFS_FS is not set 1015# CONFIG_AFFS_FS is not set
1016# CONFIG_ECRYPT_FS is not set
959# CONFIG_HFS_FS is not set 1017# CONFIG_HFS_FS is not set
960# CONFIG_HFSPLUS_FS is not set 1018# CONFIG_HFSPLUS_FS is not set
961# CONFIG_BEFS_FS is not set 1019# CONFIG_BEFS_FS is not set
@@ -1000,6 +1058,14 @@ CONFIG_MSDOS_PARTITION=y
1000# CONFIG_NLS is not set 1058# CONFIG_NLS is not set
1001 1059
1002# 1060#
1061# Distributed Lock Manager
1062#
1063CONFIG_DLM=m
1064CONFIG_DLM_TCP=y
1065# CONFIG_DLM_SCTP is not set
1066# CONFIG_DLM_DEBUG is not set
1067
1068#
1003# Profiling support 1069# Profiling support
1004# 1070#
1005# CONFIG_PROFILING is not set 1071# CONFIG_PROFILING is not set
@@ -1009,11 +1075,13 @@ CONFIG_MSDOS_PARTITION=y
1009# 1075#
1010CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1076CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1011# CONFIG_PRINTK_TIME is not set 1077# CONFIG_PRINTK_TIME is not set
1078CONFIG_ENABLE_MUST_CHECK=y
1012# CONFIG_MAGIC_SYSRQ is not set 1079# CONFIG_MAGIC_SYSRQ is not set
1013# CONFIG_UNUSED_SYMBOLS is not set 1080# CONFIG_UNUSED_SYMBOLS is not set
1081# CONFIG_DEBUG_FS is not set
1082# CONFIG_HEADERS_CHECK is not set
1014# CONFIG_DEBUG_KERNEL is not set 1083# CONFIG_DEBUG_KERNEL is not set
1015CONFIG_LOG_BUF_SHIFT=14 1084CONFIG_LOG_BUF_SHIFT=14
1016# CONFIG_DEBUG_FS is not set
1017CONFIG_CROSSCOMPILE=y 1085CONFIG_CROSSCOMPILE=y
1018CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73" 1086CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73"
1019 1087
@@ -1028,18 +1096,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1028# Cryptographic options 1096# Cryptographic options
1029# 1097#
1030CONFIG_CRYPTO=y 1098CONFIG_CRYPTO=y
1099CONFIG_CRYPTO_ALGAPI=y
1100CONFIG_CRYPTO_BLKCIPHER=m
1101CONFIG_CRYPTO_HASH=y
1102CONFIG_CRYPTO_MANAGER=y
1031CONFIG_CRYPTO_HMAC=y 1103CONFIG_CRYPTO_HMAC=y
1104CONFIG_CRYPTO_XCBC=m
1032CONFIG_CRYPTO_NULL=m 1105CONFIG_CRYPTO_NULL=m
1033CONFIG_CRYPTO_MD4=m 1106CONFIG_CRYPTO_MD4=m
1034CONFIG_CRYPTO_MD5=m 1107CONFIG_CRYPTO_MD5=y
1035CONFIG_CRYPTO_SHA1=m 1108CONFIG_CRYPTO_SHA1=m
1036CONFIG_CRYPTO_SHA256=m 1109CONFIG_CRYPTO_SHA256=m
1037CONFIG_CRYPTO_SHA512=m 1110CONFIG_CRYPTO_SHA512=m
1038CONFIG_CRYPTO_WP512=m 1111CONFIG_CRYPTO_WP512=m
1039CONFIG_CRYPTO_TGR192=m 1112CONFIG_CRYPTO_TGR192=m
1113CONFIG_CRYPTO_GF128MUL=m
1114CONFIG_CRYPTO_ECB=m
1115CONFIG_CRYPTO_CBC=m
1116CONFIG_CRYPTO_PCBC=m
1117CONFIG_CRYPTO_LRW=m
1040CONFIG_CRYPTO_DES=m 1118CONFIG_CRYPTO_DES=m
1119CONFIG_CRYPTO_FCRYPT=m
1041CONFIG_CRYPTO_BLOWFISH=m 1120CONFIG_CRYPTO_BLOWFISH=m
1042CONFIG_CRYPTO_TWOFISH=m 1121CONFIG_CRYPTO_TWOFISH=m
1122CONFIG_CRYPTO_TWOFISH_COMMON=m
1043CONFIG_CRYPTO_SERPENT=m 1123CONFIG_CRYPTO_SERPENT=m
1044CONFIG_CRYPTO_AES=m 1124CONFIG_CRYPTO_AES=m
1045CONFIG_CRYPTO_CAST5=m 1125CONFIG_CRYPTO_CAST5=m
@@ -1051,6 +1131,7 @@ CONFIG_CRYPTO_ANUBIS=m
1051CONFIG_CRYPTO_DEFLATE=m 1131CONFIG_CRYPTO_DEFLATE=m
1052CONFIG_CRYPTO_MICHAEL_MIC=m 1132CONFIG_CRYPTO_MICHAEL_MIC=m
1053CONFIG_CRYPTO_CRC32C=m 1133CONFIG_CRYPTO_CRC32C=m
1134CONFIG_CRYPTO_CAMELLIA=m
1054# CONFIG_CRYPTO_TEST is not set 1135# CONFIG_CRYPTO_TEST is not set
1055 1136
1056# 1137#
@@ -1060,6 +1141,7 @@ CONFIG_CRYPTO_CRC32C=m
1060# 1141#
1061# Library routines 1142# Library routines
1062# 1143#
1144CONFIG_BITREVERSE=y
1063# CONFIG_CRC_CCITT is not set 1145# CONFIG_CRC_CCITT is not set
1064CONFIG_CRC16=m 1146CONFIG_CRC16=m
1065CONFIG_CRC32=y 1147CONFIG_CRC32=y
@@ -1067,3 +1149,5 @@ CONFIG_LIBCRC32C=m
1067CONFIG_ZLIB_INFLATE=m 1149CONFIG_ZLIB_INFLATE=m
1068CONFIG_ZLIB_DEFLATE=m 1150CONFIG_ZLIB_DEFLATE=m
1069CONFIG_PLIST=y 1151CONFIG_PLIST=y
1152CONFIG_HAS_IOMEM=y
1153CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig
index 32b1afdd1c20..2febd0a7fba2 100644
--- a/arch/mips/configs/ocelot_3_defconfig
+++ b/arch/mips/configs/ocelot_3_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:15 2006 4# Tue Feb 20 21:47:35 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MOMENCO_OCELOT_3=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MOMENCO_OCELOT_3=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -104,6 +108,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
104CONFIG_CPU_RM9000=y 108CONFIG_CPU_RM9000=y
105# CONFIG_CPU_SB1 is not set 109# CONFIG_CPU_SB1 is not set
106CONFIG_SYS_HAS_CPU_RM9000=y 110CONFIG_SYS_HAS_CPU_RM9000=y
111CONFIG_WEAK_ORDERING=y
107CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
108CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 113CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
109CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 114CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -122,8 +127,8 @@ CONFIG_BOARD_SCACHE=y
122CONFIG_RM7000_CPU_SCACHE=y 127CONFIG_RM7000_CPU_SCACHE=y
123CONFIG_CPU_HAS_PREFETCH=y 128CONFIG_CPU_HAS_PREFETCH=y
124CONFIG_MIPS_MT_DISABLED=y 129CONFIG_MIPS_MT_DISABLED=y
125# CONFIG_MIPS_MT_SMTC is not set
126# CONFIG_MIPS_MT_SMP is not set 130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_VPE_LOADER is not set 132# CONFIG_MIPS_VPE_LOADER is not set
128# CONFIG_64BIT_PHYS_ADDR is not set 133# CONFIG_64BIT_PHYS_ADDR is not set
129CONFIG_CPU_HAS_LLSC=y 134CONFIG_CPU_HAS_LLSC=y
@@ -141,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
143# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 150# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 152# CONFIG_HZ_128 is not set
@@ -153,6 +159,7 @@ CONFIG_HZ=1000
153CONFIG_PREEMPT_NONE=y 159CONFIG_PREEMPT_NONE=y
154# CONFIG_PREEMPT_VOLUNTARY is not set 160# CONFIG_PREEMPT_VOLUNTARY is not set
155# CONFIG_PREEMPT is not set 161# CONFIG_PREEMPT is not set
162# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y 163CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y 164CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 165CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,16 +178,21 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 178CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 179CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 180CONFIG_SYSVIPC=y
181# CONFIG_IPC_NS is not set
182CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_POSIX_MQUEUE is not set 183# CONFIG_POSIX_MQUEUE is not set
175# CONFIG_BSD_PROCESS_ACCT is not set 184# CONFIG_BSD_PROCESS_ACCT is not set
176CONFIG_SYSCTL=y 185# CONFIG_TASKSTATS is not set
186# CONFIG_UTS_NS is not set
177# CONFIG_AUDIT is not set 187# CONFIG_AUDIT is not set
178CONFIG_IKCONFIG=y 188CONFIG_IKCONFIG=y
179CONFIG_IKCONFIG_PROC=y 189CONFIG_IKCONFIG_PROC=y
190CONFIG_SYSFS_DEPRECATED=y
180CONFIG_RELAY=y 191CONFIG_RELAY=y
181CONFIG_INITRAMFS_SOURCE=""
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
193CONFIG_SYSCTL=y
183CONFIG_EMBEDDED=y 194CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y
184CONFIG_KALLSYMS=y 196CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 197# CONFIG_KALLSYMS_EXTRA_PASS is not set
186CONFIG_HOTPLUG=y 198CONFIG_HOTPLUG=y
@@ -188,12 +200,12 @@ CONFIG_PRINTK=y
188CONFIG_BUG=y 200CONFIG_BUG=y
189CONFIG_ELF_CORE=y 201CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 202CONFIG_BASE_FULL=y
191CONFIG_RT_MUTEXES=y
192CONFIG_FUTEX=y 203CONFIG_FUTEX=y
193CONFIG_EPOLL=y 204CONFIG_EPOLL=y
194CONFIG_SHMEM=y 205CONFIG_SHMEM=y
195CONFIG_SLAB=y 206CONFIG_SLAB=y
196CONFIG_VM_EVENT_COUNTERS=y 207CONFIG_VM_EVENT_COUNTERS=y
208CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 209# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 210CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set 211# CONFIG_SLOB is not set
@@ -211,6 +223,7 @@ CONFIG_KMOD=y
211# 223#
212# Block layer 224# Block layer
213# 225#
226CONFIG_BLOCK=y
214# CONFIG_LBD is not set 227# CONFIG_LBD is not set
215# CONFIG_BLK_DEV_IO_TRACE is not set 228# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_LSF is not set 229# CONFIG_LSF is not set
@@ -253,6 +266,14 @@ CONFIG_BINFMT_ELF=y
253CONFIG_TRAD_SIGNALS=y 266CONFIG_TRAD_SIGNALS=y
254 267
255# 268#
269# Power management options
270#
271CONFIG_PM=y
272# CONFIG_PM_LEGACY is not set
273# CONFIG_PM_DEBUG is not set
274# CONFIG_PM_SYSFS_DEPRECATED is not set
275
276#
256# Networking 277# Networking
257# 278#
258CONFIG_NET=y 279CONFIG_NET=y
@@ -266,7 +287,10 @@ CONFIG_PACKET=y
266CONFIG_UNIX=y 287CONFIG_UNIX=y
267CONFIG_XFRM=y 288CONFIG_XFRM=y
268# CONFIG_XFRM_USER is not set 289# CONFIG_XFRM_USER is not set
290# CONFIG_XFRM_SUB_POLICY is not set
291CONFIG_XFRM_MIGRATE=y
269CONFIG_NET_KEY=y 292CONFIG_NET_KEY=y
293CONFIG_NET_KEY_MIGRATE=y
270CONFIG_INET=y 294CONFIG_INET=y
271# CONFIG_IP_MULTICAST is not set 295# CONFIG_IP_MULTICAST is not set
272# CONFIG_IP_ADVANCED_ROUTER is not set 296# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -283,13 +307,16 @@ CONFIG_IP_PNP_BOOTP=y
283# CONFIG_INET_ESP is not set 307# CONFIG_INET_ESP is not set
284# CONFIG_INET_IPCOMP is not set 308# CONFIG_INET_IPCOMP is not set
285# CONFIG_INET_XFRM_TUNNEL is not set 309# CONFIG_INET_XFRM_TUNNEL is not set
286# CONFIG_INET_TUNNEL is not set 310CONFIG_INET_TUNNEL=m
287CONFIG_INET_XFRM_MODE_TRANSPORT=m 311CONFIG_INET_XFRM_MODE_TRANSPORT=m
288CONFIG_INET_XFRM_MODE_TUNNEL=m 312CONFIG_INET_XFRM_MODE_TUNNEL=m
313CONFIG_INET_XFRM_MODE_BEET=m
289CONFIG_INET_DIAG=y 314CONFIG_INET_DIAG=y
290CONFIG_INET_TCP_DIAG=y 315CONFIG_INET_TCP_DIAG=y
291# CONFIG_TCP_CONG_ADVANCED is not set 316# CONFIG_TCP_CONG_ADVANCED is not set
292CONFIG_TCP_CONG_BIC=y 317CONFIG_TCP_CONG_CUBIC=y
318CONFIG_DEFAULT_TCP_CONG="cubic"
319CONFIG_TCP_MD5SIG=y
293 320
294# 321#
295# IP: Virtual Server Configuration 322# IP: Virtual Server Configuration
@@ -302,11 +329,17 @@ CONFIG_IPV6_ROUTE_INFO=y
302# CONFIG_INET6_AH is not set 329# CONFIG_INET6_AH is not set
303# CONFIG_INET6_ESP is not set 330# CONFIG_INET6_ESP is not set
304# CONFIG_INET6_IPCOMP is not set 331# CONFIG_INET6_IPCOMP is not set
332CONFIG_IPV6_MIP6=y
305# CONFIG_INET6_XFRM_TUNNEL is not set 333# CONFIG_INET6_XFRM_TUNNEL is not set
306# CONFIG_INET6_TUNNEL is not set 334# CONFIG_INET6_TUNNEL is not set
307CONFIG_INET6_XFRM_MODE_TRANSPORT=m 335CONFIG_INET6_XFRM_MODE_TRANSPORT=m
308CONFIG_INET6_XFRM_MODE_TUNNEL=m 336CONFIG_INET6_XFRM_MODE_TUNNEL=m
337CONFIG_INET6_XFRM_MODE_BEET=m
338CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
339CONFIG_IPV6_SIT=m
309# CONFIG_IPV6_TUNNEL is not set 340# CONFIG_IPV6_TUNNEL is not set
341CONFIG_IPV6_MULTIPLE_TABLES=y
342CONFIG_IPV6_SUBTREES=y
310CONFIG_NETWORK_SECMARK=y 343CONFIG_NETWORK_SECMARK=y
311CONFIG_NETFILTER=y 344CONFIG_NETFILTER=y
312# CONFIG_NETFILTER_DEBUG is not set 345# CONFIG_NETFILTER_DEBUG is not set
@@ -317,15 +350,42 @@ CONFIG_NETFILTER=y
317CONFIG_NETFILTER_NETLINK=m 350CONFIG_NETFILTER_NETLINK=m
318CONFIG_NETFILTER_NETLINK_QUEUE=m 351CONFIG_NETFILTER_NETLINK_QUEUE=m
319CONFIG_NETFILTER_NETLINK_LOG=m 352CONFIG_NETFILTER_NETLINK_LOG=m
320# CONFIG_NF_CONNTRACK is not set 353CONFIG_NF_CONNTRACK_ENABLED=m
354CONFIG_NF_CONNTRACK_SUPPORT=y
355# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
356CONFIG_NF_CONNTRACK=m
357CONFIG_NF_CT_ACCT=y
358CONFIG_NF_CONNTRACK_MARK=y
359CONFIG_NF_CONNTRACK_SECMARK=y
360CONFIG_NF_CONNTRACK_EVENTS=y
361CONFIG_NF_CT_PROTO_GRE=m
362CONFIG_NF_CT_PROTO_SCTP=m
363CONFIG_NF_CONNTRACK_AMANDA=m
364CONFIG_NF_CONNTRACK_FTP=m
365CONFIG_NF_CONNTRACK_H323=m
366CONFIG_NF_CONNTRACK_IRC=m
367# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
368CONFIG_NF_CONNTRACK_PPTP=m
369CONFIG_NF_CONNTRACK_SANE=m
370CONFIG_NF_CONNTRACK_SIP=m
371CONFIG_NF_CONNTRACK_TFTP=m
372CONFIG_NF_CT_NETLINK=m
321CONFIG_NETFILTER_XTABLES=m 373CONFIG_NETFILTER_XTABLES=m
322CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 374CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
323CONFIG_NETFILTER_XT_TARGET_MARK=m 375CONFIG_NETFILTER_XT_TARGET_MARK=m
324CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 376CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
377CONFIG_NETFILTER_XT_TARGET_NFLOG=m
325CONFIG_NETFILTER_XT_TARGET_SECMARK=m 378CONFIG_NETFILTER_XT_TARGET_SECMARK=m
379CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
380CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
326CONFIG_NETFILTER_XT_MATCH_COMMENT=m 381CONFIG_NETFILTER_XT_MATCH_COMMENT=m
382CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
383CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
384CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
327CONFIG_NETFILTER_XT_MATCH_DCCP=m 385CONFIG_NETFILTER_XT_MATCH_DCCP=m
386CONFIG_NETFILTER_XT_MATCH_DSCP=m
328CONFIG_NETFILTER_XT_MATCH_ESP=m 387CONFIG_NETFILTER_XT_MATCH_ESP=m
388CONFIG_NETFILTER_XT_MATCH_HELPER=m
329CONFIG_NETFILTER_XT_MATCH_LENGTH=m 389CONFIG_NETFILTER_XT_MATCH_LENGTH=m
330CONFIG_NETFILTER_XT_MATCH_LIMIT=m 390CONFIG_NETFILTER_XT_MATCH_LIMIT=m
331CONFIG_NETFILTER_XT_MATCH_MAC=m 391CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -336,14 +396,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
336CONFIG_NETFILTER_XT_MATCH_QUOTA=m 396CONFIG_NETFILTER_XT_MATCH_QUOTA=m
337CONFIG_NETFILTER_XT_MATCH_REALM=m 397CONFIG_NETFILTER_XT_MATCH_REALM=m
338CONFIG_NETFILTER_XT_MATCH_SCTP=m 398CONFIG_NETFILTER_XT_MATCH_SCTP=m
399CONFIG_NETFILTER_XT_MATCH_STATE=m
339CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 400CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
340CONFIG_NETFILTER_XT_MATCH_STRING=m 401CONFIG_NETFILTER_XT_MATCH_STRING=m
341CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 402CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
403CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
342 404
343# 405#
344# IP: Netfilter Configuration 406# IP: Netfilter Configuration
345# 407#
346# CONFIG_IP_NF_CONNTRACK is not set 408CONFIG_NF_CONNTRACK_IPV4=m
409CONFIG_NF_CONNTRACK_PROC_COMPAT=y
347# CONFIG_IP_NF_QUEUE is not set 410# CONFIG_IP_NF_QUEUE is not set
348# CONFIG_IP_NF_IPTABLES is not set 411# CONFIG_IP_NF_IPTABLES is not set
349# CONFIG_IP_NF_ARPTABLES is not set 412# CONFIG_IP_NF_ARPTABLES is not set
@@ -351,6 +414,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
351# 414#
352# IPv6: Netfilter Configuration (EXPERIMENTAL) 415# IPv6: Netfilter Configuration (EXPERIMENTAL)
353# 416#
417CONFIG_NF_CONNTRACK_IPV6=m
354# CONFIG_IP6_NF_QUEUE is not set 418# CONFIG_IP6_NF_QUEUE is not set
355# CONFIG_IP6_NF_IPTABLES is not set 419# CONFIG_IP6_NF_IPTABLES is not set
356 420
@@ -377,7 +441,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
377# CONFIG_ATALK is not set 441# CONFIG_ATALK is not set
378# CONFIG_X25 is not set 442# CONFIG_X25 is not set
379# CONFIG_LAPB is not set 443# CONFIG_LAPB is not set
380# CONFIG_NET_DIVERT is not set
381# CONFIG_ECONET is not set 444# CONFIG_ECONET is not set
382# CONFIG_WAN_ROUTER is not set 445# CONFIG_WAN_ROUTER is not set
383 446
@@ -401,6 +464,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
401CONFIG_IEEE80211_SOFTMAC=m 464CONFIG_IEEE80211_SOFTMAC=m
402# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 465# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
403CONFIG_WIRELESS_EXT=y 466CONFIG_WIRELESS_EXT=y
467CONFIG_FIB_RULES=y
404 468
405# 469#
406# Device Drivers 470# Device Drivers
@@ -432,6 +496,7 @@ CONFIG_CONNECTOR=m
432# 496#
433# Plug and Play support 497# Plug and Play support
434# 498#
499# CONFIG_PNPACPI is not set
435 500
436# 501#
437# Block devices 502# Block devices
@@ -451,6 +516,12 @@ CONFIG_BLK_DEV_LOOP=y
451CONFIG_ATA_OVER_ETH=m 516CONFIG_ATA_OVER_ETH=m
452 517
453# 518#
519# Misc devices
520#
521CONFIG_SGI_IOC4=m
522# CONFIG_TIFM_CORE is not set
523
524#
454# ATA/ATAPI/MFM/RLL support 525# ATA/ATAPI/MFM/RLL support
455# 526#
456# CONFIG_IDE is not set 527# CONFIG_IDE is not set
@@ -460,6 +531,8 @@ CONFIG_ATA_OVER_ETH=m
460# 531#
461CONFIG_RAID_ATTRS=m 532CONFIG_RAID_ATTRS=m
462CONFIG_SCSI=m 533CONFIG_SCSI=m
534CONFIG_SCSI_TGT=m
535CONFIG_SCSI_NETLINK=y
463CONFIG_SCSI_PROC_FS=y 536CONFIG_SCSI_PROC_FS=y
464 537
465# 538#
@@ -478,14 +551,17 @@ CONFIG_SCSI_PROC_FS=y
478# CONFIG_SCSI_MULTI_LUN is not set 551# CONFIG_SCSI_MULTI_LUN is not set
479# CONFIG_SCSI_CONSTANTS is not set 552# CONFIG_SCSI_CONSTANTS is not set
480# CONFIG_SCSI_LOGGING is not set 553# CONFIG_SCSI_LOGGING is not set
554CONFIG_SCSI_SCAN_ASYNC=y
481 555
482# 556#
483# SCSI Transport Attributes 557# SCSI Transports
484# 558#
485# CONFIG_SCSI_SPI_ATTRS is not set 559# CONFIG_SCSI_SPI_ATTRS is not set
486CONFIG_SCSI_FC_ATTRS=m 560CONFIG_SCSI_FC_ATTRS=m
487CONFIG_SCSI_ISCSI_ATTRS=m 561CONFIG_SCSI_ISCSI_ATTRS=m
488CONFIG_SCSI_SAS_ATTRS=m 562CONFIG_SCSI_SAS_ATTRS=m
563CONFIG_SCSI_SAS_LIBSAS=m
564# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
489 565
490# 566#
491# SCSI low-level drivers 567# SCSI low-level drivers
@@ -498,26 +574,35 @@ CONFIG_ISCSI_TCP=m
498# CONFIG_SCSI_AIC7XXX is not set 574# CONFIG_SCSI_AIC7XXX is not set
499# CONFIG_SCSI_AIC7XXX_OLD is not set 575# CONFIG_SCSI_AIC7XXX_OLD is not set
500# CONFIG_SCSI_AIC79XX is not set 576# CONFIG_SCSI_AIC79XX is not set
577CONFIG_SCSI_AIC94XX=m
578# CONFIG_AIC94XX_DEBUG is not set
501# CONFIG_SCSI_DPT_I2O is not set 579# CONFIG_SCSI_DPT_I2O is not set
580# CONFIG_SCSI_ARCMSR is not set
502# CONFIG_MEGARAID_NEWGEN is not set 581# CONFIG_MEGARAID_NEWGEN is not set
503# CONFIG_MEGARAID_LEGACY is not set 582# CONFIG_MEGARAID_LEGACY is not set
504# CONFIG_MEGARAID_SAS is not set 583# CONFIG_MEGARAID_SAS is not set
505# CONFIG_SCSI_SATA is not set
506# CONFIG_SCSI_HPTIOP is not set 584# CONFIG_SCSI_HPTIOP is not set
507# CONFIG_SCSI_DMX3191D is not set 585# CONFIG_SCSI_DMX3191D is not set
508# CONFIG_SCSI_FUTURE_DOMAIN is not set 586# CONFIG_SCSI_FUTURE_DOMAIN is not set
509# CONFIG_SCSI_IPS is not set 587# CONFIG_SCSI_IPS is not set
510# CONFIG_SCSI_INITIO is not set 588# CONFIG_SCSI_INITIO is not set
511# CONFIG_SCSI_INIA100 is not set 589# CONFIG_SCSI_INIA100 is not set
590# CONFIG_SCSI_STEX is not set
512# CONFIG_SCSI_SYM53C8XX_2 is not set 591# CONFIG_SCSI_SYM53C8XX_2 is not set
513# CONFIG_SCSI_IPR is not set
514# CONFIG_SCSI_QLOGIC_1280 is not set 592# CONFIG_SCSI_QLOGIC_1280 is not set
515# CONFIG_SCSI_QLA_FC is not set 593# CONFIG_SCSI_QLA_FC is not set
594# CONFIG_SCSI_QLA_ISCSI is not set
516# CONFIG_SCSI_LPFC is not set 595# CONFIG_SCSI_LPFC is not set
517# CONFIG_SCSI_DC395x is not set 596# CONFIG_SCSI_DC395x is not set
518# CONFIG_SCSI_DC390T is not set 597# CONFIG_SCSI_DC390T is not set
519# CONFIG_SCSI_NSP32 is not set 598# CONFIG_SCSI_NSP32 is not set
520# CONFIG_SCSI_DEBUG is not set 599# CONFIG_SCSI_DEBUG is not set
600# CONFIG_SCSI_SRP is not set
601
602#
603# Serial ATA (prod) and Parallel ATA (experimental) drivers
604#
605# CONFIG_ATA is not set
521 606
522# 607#
523# Multi-device support (RAID and LVM) 608# Multi-device support (RAID and LVM)
@@ -571,6 +656,8 @@ CONFIG_LXT_PHY=m
571CONFIG_CICADA_PHY=m 656CONFIG_CICADA_PHY=m
572CONFIG_VITESSE_PHY=m 657CONFIG_VITESSE_PHY=m
573CONFIG_SMSC_PHY=m 658CONFIG_SMSC_PHY=m
659# CONFIG_BROADCOM_PHY is not set
660# CONFIG_FIXED_PHY is not set
574 661
575# 662#
576# Ethernet (10 or 100Mbit) 663# Ethernet (10 or 100Mbit)
@@ -607,7 +694,7 @@ CONFIG_E100=y
607# CONFIG_SUNDANCE is not set 694# CONFIG_SUNDANCE is not set
608# CONFIG_TLAN is not set 695# CONFIG_TLAN is not set
609# CONFIG_VIA_RHINE is not set 696# CONFIG_VIA_RHINE is not set
610# CONFIG_LAN_SAA9730 is not set 697# CONFIG_SC92031 is not set
611 698
612# 699#
613# Ethernet (1000 Mbit) 700# Ethernet (1000 Mbit)
@@ -627,17 +714,18 @@ CONFIG_E100=y
627# CONFIG_TIGON3 is not set 714# CONFIG_TIGON3 is not set
628# CONFIG_BNX2 is not set 715# CONFIG_BNX2 is not set
629CONFIG_MV643XX_ETH=y 716CONFIG_MV643XX_ETH=y
630CONFIG_MV643XX_ETH_0=y 717CONFIG_QLA3XXX=m
631CONFIG_MV643XX_ETH_1=y 718# CONFIG_ATL1 is not set
632CONFIG_MV643XX_ETH_2=y
633 719
634# 720#
635# Ethernet (10000 Mbit) 721# Ethernet (10000 Mbit)
636# 722#
637# CONFIG_CHELSIO_T1 is not set 723# CONFIG_CHELSIO_T1 is not set
724CONFIG_CHELSIO_T3=m
638# CONFIG_IXGB is not set 725# CONFIG_IXGB is not set
639# CONFIG_S2IO is not set 726# CONFIG_S2IO is not set
640# CONFIG_MYRI10GE is not set 727# CONFIG_MYRI10GE is not set
728CONFIG_NETXEN_NIC=m
641 729
642# 730#
643# Token Ring devices 731# Token Ring devices
@@ -665,6 +753,7 @@ CONFIG_PPP_DEFLATE=m
665CONFIG_PPP_MPPE=m 753CONFIG_PPP_MPPE=m
666CONFIG_PPPOE=m 754CONFIG_PPPOE=m
667# CONFIG_SLIP is not set 755# CONFIG_SLIP is not set
756CONFIG_SLHC=m
668# CONFIG_NET_FC is not set 757# CONFIG_NET_FC is not set
669# CONFIG_SHAPER is not set 758# CONFIG_SHAPER is not set
670# CONFIG_NETCONSOLE is not set 759# CONFIG_NETCONSOLE is not set
@@ -685,6 +774,7 @@ CONFIG_PPPOE=m
685# Input device support 774# Input device support
686# 775#
687CONFIG_INPUT=y 776CONFIG_INPUT=y
777# CONFIG_INPUT_FF_MEMLESS is not set
688 778
689# 779#
690# Userland interfaces 780# Userland interfaces
@@ -758,10 +848,6 @@ CONFIG_RTC=y
758# CONFIG_DTLK is not set 848# CONFIG_DTLK is not set
759# CONFIG_R3964 is not set 849# CONFIG_R3964 is not set
760# CONFIG_APPLICOM is not set 850# CONFIG_APPLICOM is not set
761
762#
763# Ftape, the floppy tape device driver
764#
765# CONFIG_DRM is not set 851# CONFIG_DRM is not set
766# CONFIG_RAW_DRIVER is not set 852# CONFIG_RAW_DRIVER is not set
767 853
@@ -769,7 +855,6 @@ CONFIG_RTC=y
769# TPM devices 855# TPM devices
770# 856#
771# CONFIG_TCG_TPM is not set 857# CONFIG_TCG_TPM is not set
772# CONFIG_TELCLOCK is not set
773 858
774# 859#
775# I2C support 860# I2C support
@@ -794,14 +879,9 @@ CONFIG_RTC=y
794# CONFIG_HWMON_VID is not set 879# CONFIG_HWMON_VID is not set
795 880
796# 881#
797# Misc devices
798#
799
800#
801# Multimedia devices 882# Multimedia devices
802# 883#
803# CONFIG_VIDEO_DEV is not set 884# CONFIG_VIDEO_DEV is not set
804CONFIG_VIDEO_V4L2=y
805 885
806# 886#
807# Digital Video Broadcasting Devices 887# Digital Video Broadcasting Devices
@@ -816,6 +896,7 @@ CONFIG_FB=y
816# CONFIG_FB_CFB_FILLRECT is not set 896# CONFIG_FB_CFB_FILLRECT is not set
817# CONFIG_FB_CFB_COPYAREA is not set 897# CONFIG_FB_CFB_COPYAREA is not set
818# CONFIG_FB_CFB_IMAGEBLIT is not set 898# CONFIG_FB_CFB_IMAGEBLIT is not set
899# CONFIG_FB_SVGALIB is not set
819# CONFIG_FB_MACMODES is not set 900# CONFIG_FB_MACMODES is not set
820# CONFIG_FB_BACKLIGHT is not set 901# CONFIG_FB_BACKLIGHT is not set
821CONFIG_FB_MODE_HELPERS=y 902CONFIG_FB_MODE_HELPERS=y
@@ -832,6 +913,7 @@ CONFIG_FB_MODE_HELPERS=y
832# CONFIG_FB_RADEON is not set 913# CONFIG_FB_RADEON is not set
833# CONFIG_FB_ATY128 is not set 914# CONFIG_FB_ATY128 is not set
834# CONFIG_FB_ATY is not set 915# CONFIG_FB_ATY is not set
916# CONFIG_FB_S3 is not set
835# CONFIG_FB_SAVAGE is not set 917# CONFIG_FB_SAVAGE is not set
836# CONFIG_FB_SIS is not set 918# CONFIG_FB_SIS is not set
837# CONFIG_FB_NEOMAGIC is not set 919# CONFIG_FB_NEOMAGIC is not set
@@ -868,6 +950,12 @@ CONFIG_LOGO_LINUX_CLUT224=y
868# CONFIG_SOUND is not set 950# CONFIG_SOUND is not set
869 951
870# 952#
953# HID Devices
954#
955CONFIG_HID=y
956# CONFIG_HID_DEBUG is not set
957
958#
871# USB support 959# USB support
872# 960#
873CONFIG_USB_ARCH_HAS_HCD=y 961CONFIG_USB_ARCH_HAS_HCD=y
@@ -930,6 +1018,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
930# 1018#
931 1019
932# 1020#
1021# Auxiliary Display support
1022#
1023
1024#
1025# Virtualization
1026#
1027
1028#
933# File systems 1029# File systems
934# 1030#
935CONFIG_EXT2_FS=y 1031CONFIG_EXT2_FS=y
@@ -939,6 +1035,7 @@ CONFIG_EXT3_FS=m
939CONFIG_EXT3_FS_XATTR=y 1035CONFIG_EXT3_FS_XATTR=y
940# CONFIG_EXT3_FS_POSIX_ACL is not set 1036# CONFIG_EXT3_FS_POSIX_ACL is not set
941# CONFIG_EXT3_FS_SECURITY is not set 1037# CONFIG_EXT3_FS_SECURITY is not set
1038# CONFIG_EXT4DEV_FS is not set
942CONFIG_JBD=m 1039CONFIG_JBD=m
943# CONFIG_JBD_DEBUG is not set 1040# CONFIG_JBD_DEBUG is not set
944CONFIG_FS_MBCACHE=y 1041CONFIG_FS_MBCACHE=y
@@ -947,12 +1044,13 @@ CONFIG_REISERFS_FS=m
947# CONFIG_REISERFS_PROC_INFO is not set 1044# CONFIG_REISERFS_PROC_INFO is not set
948# CONFIG_REISERFS_FS_XATTR is not set 1045# CONFIG_REISERFS_FS_XATTR is not set
949# CONFIG_JFS_FS is not set 1046# CONFIG_JFS_FS is not set
950# CONFIG_FS_POSIX_ACL is not set 1047CONFIG_FS_POSIX_ACL=y
951CONFIG_XFS_FS=m 1048CONFIG_XFS_FS=m
952# CONFIG_XFS_QUOTA is not set 1049# CONFIG_XFS_QUOTA is not set
953# CONFIG_XFS_SECURITY is not set 1050# CONFIG_XFS_SECURITY is not set
954# CONFIG_XFS_POSIX_ACL is not set 1051# CONFIG_XFS_POSIX_ACL is not set
955# CONFIG_XFS_RT is not set 1052# CONFIG_XFS_RT is not set
1053# CONFIG_GFS2_FS is not set
956# CONFIG_OCFS2_FS is not set 1054# CONFIG_OCFS2_FS is not set
957# CONFIG_MINIX_FS is not set 1055# CONFIG_MINIX_FS is not set
958# CONFIG_ROMFS_FS is not set 1056# CONFIG_ROMFS_FS is not set
@@ -963,6 +1061,7 @@ CONFIG_DNOTIFY=y
963CONFIG_AUTOFS_FS=y 1061CONFIG_AUTOFS_FS=y
964CONFIG_AUTOFS4_FS=m 1062CONFIG_AUTOFS4_FS=m
965CONFIG_FUSE_FS=m 1063CONFIG_FUSE_FS=m
1064CONFIG_GENERIC_ACL=y
966 1065
967# 1066#
968# CD-ROM/DVD Filesystems 1067# CD-ROM/DVD Filesystems
@@ -982,11 +1081,13 @@ CONFIG_FUSE_FS=m
982# 1081#
983CONFIG_PROC_FS=y 1082CONFIG_PROC_FS=y
984CONFIG_PROC_KCORE=y 1083CONFIG_PROC_KCORE=y
1084CONFIG_PROC_SYSCTL=y
985CONFIG_SYSFS=y 1085CONFIG_SYSFS=y
986CONFIG_TMPFS=y 1086CONFIG_TMPFS=y
1087CONFIG_TMPFS_POSIX_ACL=y
987# CONFIG_HUGETLB_PAGE is not set 1088# CONFIG_HUGETLB_PAGE is not set
988CONFIG_RAMFS=y 1089CONFIG_RAMFS=y
989# CONFIG_CONFIGFS_FS is not set 1090CONFIG_CONFIGFS_FS=m
990 1091
991# 1092#
992# Miscellaneous filesystems 1093# Miscellaneous filesystems
@@ -1029,7 +1130,6 @@ CONFIG_SUNRPC=y
1029CONFIG_SMB_FS=m 1130CONFIG_SMB_FS=m
1030# CONFIG_SMB_NLS_DEFAULT is not set 1131# CONFIG_SMB_NLS_DEFAULT is not set
1031# CONFIG_CIFS is not set 1132# CONFIG_CIFS is not set
1032# CONFIG_CIFS_DEBUG2 is not set
1033# CONFIG_NCP_FS is not set 1133# CONFIG_NCP_FS is not set
1034# CONFIG_CODA_FS is not set 1134# CONFIG_CODA_FS is not set
1035# CONFIG_AFS_FS is not set 1135# CONFIG_AFS_FS is not set
@@ -1086,6 +1186,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1086# CONFIG_NLS_UTF8 is not set 1186# CONFIG_NLS_UTF8 is not set
1087 1187
1088# 1188#
1189# Distributed Lock Manager
1190#
1191CONFIG_DLM=m
1192CONFIG_DLM_TCP=y
1193# CONFIG_DLM_SCTP is not set
1194# CONFIG_DLM_DEBUG is not set
1195
1196#
1089# Profiling support 1197# Profiling support
1090# 1198#
1091# CONFIG_PROFILING is not set 1199# CONFIG_PROFILING is not set
@@ -1095,11 +1203,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1095# 1203#
1096CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1204CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1097# CONFIG_PRINTK_TIME is not set 1205# CONFIG_PRINTK_TIME is not set
1206CONFIG_ENABLE_MUST_CHECK=y
1098# CONFIG_MAGIC_SYSRQ is not set 1207# CONFIG_MAGIC_SYSRQ is not set
1099# CONFIG_UNUSED_SYMBOLS is not set 1208# CONFIG_UNUSED_SYMBOLS is not set
1209# CONFIG_DEBUG_FS is not set
1210# CONFIG_HEADERS_CHECK is not set
1100# CONFIG_DEBUG_KERNEL is not set 1211# CONFIG_DEBUG_KERNEL is not set
1101CONFIG_LOG_BUF_SHIFT=14 1212CONFIG_LOG_BUF_SHIFT=14
1102# CONFIG_DEBUG_FS is not set
1103CONFIG_CROSSCOMPILE=y 1213CONFIG_CROSSCOMPILE=y
1104CONFIG_CMDLINE="ip=any root=nfs" 1214CONFIG_CMDLINE="ip=any root=nfs"
1105 1215
@@ -1113,18 +1223,30 @@ CONFIG_CMDLINE="ip=any root=nfs"
1113# Cryptographic options 1223# Cryptographic options
1114# 1224#
1115CONFIG_CRYPTO=y 1225CONFIG_CRYPTO=y
1226CONFIG_CRYPTO_ALGAPI=y
1227CONFIG_CRYPTO_BLKCIPHER=m
1228CONFIG_CRYPTO_HASH=y
1229CONFIG_CRYPTO_MANAGER=y
1116CONFIG_CRYPTO_HMAC=y 1230CONFIG_CRYPTO_HMAC=y
1231CONFIG_CRYPTO_XCBC=m
1117CONFIG_CRYPTO_NULL=m 1232CONFIG_CRYPTO_NULL=m
1118CONFIG_CRYPTO_MD4=m 1233CONFIG_CRYPTO_MD4=m
1119CONFIG_CRYPTO_MD5=m 1234CONFIG_CRYPTO_MD5=y
1120CONFIG_CRYPTO_SHA1=m 1235CONFIG_CRYPTO_SHA1=m
1121CONFIG_CRYPTO_SHA256=m 1236CONFIG_CRYPTO_SHA256=m
1122CONFIG_CRYPTO_SHA512=m 1237CONFIG_CRYPTO_SHA512=m
1123CONFIG_CRYPTO_WP512=m 1238CONFIG_CRYPTO_WP512=m
1124CONFIG_CRYPTO_TGR192=m 1239CONFIG_CRYPTO_TGR192=m
1240CONFIG_CRYPTO_GF128MUL=m
1241CONFIG_CRYPTO_ECB=m
1242CONFIG_CRYPTO_CBC=m
1243CONFIG_CRYPTO_PCBC=m
1244CONFIG_CRYPTO_LRW=m
1125CONFIG_CRYPTO_DES=m 1245CONFIG_CRYPTO_DES=m
1246CONFIG_CRYPTO_FCRYPT=m
1126CONFIG_CRYPTO_BLOWFISH=m 1247CONFIG_CRYPTO_BLOWFISH=m
1127CONFIG_CRYPTO_TWOFISH=m 1248CONFIG_CRYPTO_TWOFISH=m
1249CONFIG_CRYPTO_TWOFISH_COMMON=m
1128CONFIG_CRYPTO_SERPENT=m 1250CONFIG_CRYPTO_SERPENT=m
1129CONFIG_CRYPTO_AES=m 1251CONFIG_CRYPTO_AES=m
1130CONFIG_CRYPTO_CAST5=m 1252CONFIG_CRYPTO_CAST5=m
@@ -1136,6 +1258,7 @@ CONFIG_CRYPTO_ANUBIS=m
1136CONFIG_CRYPTO_DEFLATE=m 1258CONFIG_CRYPTO_DEFLATE=m
1137CONFIG_CRYPTO_MICHAEL_MIC=m 1259CONFIG_CRYPTO_MICHAEL_MIC=m
1138CONFIG_CRYPTO_CRC32C=m 1260CONFIG_CRYPTO_CRC32C=m
1261CONFIG_CRYPTO_CAMELLIA=m
1139# CONFIG_CRYPTO_TEST is not set 1262# CONFIG_CRYPTO_TEST is not set
1140 1263
1141# 1264#
@@ -1145,6 +1268,7 @@ CONFIG_CRYPTO_CRC32C=m
1145# 1268#
1146# Library routines 1269# Library routines
1147# 1270#
1271CONFIG_BITREVERSE=y
1148CONFIG_CRC_CCITT=m 1272CONFIG_CRC_CCITT=m
1149CONFIG_CRC16=m 1273CONFIG_CRC16=m
1150CONFIG_CRC32=y 1274CONFIG_CRC32=y
@@ -1156,3 +1280,5 @@ CONFIG_TEXTSEARCH_KMP=m
1156CONFIG_TEXTSEARCH_BM=m 1280CONFIG_TEXTSEARCH_BM=m
1157CONFIG_TEXTSEARCH_FSM=m 1281CONFIG_TEXTSEARCH_FSM=m
1158CONFIG_PLIST=y 1282CONFIG_PLIST=y
1283CONFIG_HAS_IOMEM=y
1284CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig
index ebe75c1c71af..b8f457300bbf 100644
--- a/arch/mips/configs/ocelot_c_defconfig
+++ b/arch/mips/configs/ocelot_c_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:16 2006 4# Tue Feb 20 21:47:36 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MOMENCO_OCELOT_C=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MOMENCO_OCELOT_C=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -120,8 +124,8 @@ CONFIG_BOARD_SCACHE=y
120CONFIG_RM7000_CPU_SCACHE=y 124CONFIG_RM7000_CPU_SCACHE=y
121CONFIG_CPU_HAS_PREFETCH=y 125CONFIG_CPU_HAS_PREFETCH=y
122CONFIG_MIPS_MT_DISABLED=y 126CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_MT_SMP is not set 127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set 129# CONFIG_MIPS_VPE_LOADER is not set
126CONFIG_CPU_HAS_LLSC=y 130CONFIG_CPU_HAS_LLSC=y
127CONFIG_CPU_HAS_SYNC=y 131CONFIG_CPU_HAS_SYNC=y
@@ -138,6 +142,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
138# CONFIG_SPARSEMEM_STATIC is not set 142# CONFIG_SPARSEMEM_STATIC is not set
139CONFIG_SPLIT_PTLOCK_CPUS=4 143CONFIG_SPLIT_PTLOCK_CPUS=4
140CONFIG_RESOURCES_64BIT=y 144CONFIG_RESOURCES_64BIT=y
145CONFIG_ZONE_DMA_FLAG=1
141# CONFIG_HZ_48 is not set 146# CONFIG_HZ_48 is not set
142# CONFIG_HZ_100 is not set 147# CONFIG_HZ_100 is not set
143# CONFIG_HZ_128 is not set 148# CONFIG_HZ_128 is not set
@@ -150,6 +155,7 @@ CONFIG_HZ=1000
150CONFIG_PREEMPT_NONE=y 155CONFIG_PREEMPT_NONE=y
151# CONFIG_PREEMPT_VOLUNTARY is not set 156# CONFIG_PREEMPT_VOLUNTARY is not set
152# CONFIG_PREEMPT is not set 157# CONFIG_PREEMPT is not set
158# CONFIG_KEXEC is not set
153CONFIG_LOCKDEP_SUPPORT=y 159CONFIG_LOCKDEP_SUPPORT=y
154CONFIG_STACKTRACE_SUPPORT=y 160CONFIG_STACKTRACE_SUPPORT=y
155CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 161CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -168,15 +174,20 @@ CONFIG_LOCALVERSION=""
168CONFIG_LOCALVERSION_AUTO=y 174CONFIG_LOCALVERSION_AUTO=y
169CONFIG_SWAP=y 175CONFIG_SWAP=y
170CONFIG_SYSVIPC=y 176CONFIG_SYSVIPC=y
177# CONFIG_IPC_NS is not set
178CONFIG_SYSVIPC_SYSCTL=y
171# CONFIG_POSIX_MQUEUE is not set 179# CONFIG_POSIX_MQUEUE is not set
172# CONFIG_BSD_PROCESS_ACCT is not set 180# CONFIG_BSD_PROCESS_ACCT is not set
173CONFIG_SYSCTL=y 181# CONFIG_TASKSTATS is not set
182# CONFIG_UTS_NS is not set
174# CONFIG_AUDIT is not set 183# CONFIG_AUDIT is not set
175# CONFIG_IKCONFIG is not set 184# CONFIG_IKCONFIG is not set
185CONFIG_SYSFS_DEPRECATED=y
176CONFIG_RELAY=y 186CONFIG_RELAY=y
177CONFIG_INITRAMFS_SOURCE=""
178# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 187# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
188CONFIG_SYSCTL=y
179CONFIG_EMBEDDED=y 189CONFIG_EMBEDDED=y
190CONFIG_SYSCTL_SYSCALL=y
180CONFIG_KALLSYMS=y 191CONFIG_KALLSYMS=y
181# CONFIG_KALLSYMS_EXTRA_PASS is not set 192# CONFIG_KALLSYMS_EXTRA_PASS is not set
182CONFIG_HOTPLUG=y 193CONFIG_HOTPLUG=y
@@ -184,12 +195,12 @@ CONFIG_PRINTK=y
184CONFIG_BUG=y 195CONFIG_BUG=y
185CONFIG_ELF_CORE=y 196CONFIG_ELF_CORE=y
186CONFIG_BASE_FULL=y 197CONFIG_BASE_FULL=y
187CONFIG_RT_MUTEXES=y
188CONFIG_FUTEX=y 198CONFIG_FUTEX=y
189CONFIG_EPOLL=y 199CONFIG_EPOLL=y
190CONFIG_SHMEM=y 200CONFIG_SHMEM=y
191CONFIG_SLAB=y 201CONFIG_SLAB=y
192CONFIG_VM_EVENT_COUNTERS=y 202CONFIG_VM_EVENT_COUNTERS=y
203CONFIG_RT_MUTEXES=y
193# CONFIG_TINY_SHMEM is not set 204# CONFIG_TINY_SHMEM is not set
194CONFIG_BASE_SMALL=0 205CONFIG_BASE_SMALL=0
195# CONFIG_SLOB is not set 206# CONFIG_SLOB is not set
@@ -202,6 +213,7 @@ CONFIG_BASE_SMALL=0
202# 213#
203# Block layer 214# Block layer
204# 215#
216CONFIG_BLOCK=y
205# CONFIG_BLK_DEV_IO_TRACE is not set 217# CONFIG_BLK_DEV_IO_TRACE is not set
206 218
207# 219#
@@ -242,11 +254,20 @@ CONFIG_BINFMT_ELF=y
242# CONFIG_BUILD_ELF64 is not set 254# CONFIG_BUILD_ELF64 is not set
243CONFIG_MIPS32_COMPAT=y 255CONFIG_MIPS32_COMPAT=y
244CONFIG_COMPAT=y 256CONFIG_COMPAT=y
257CONFIG_SYSVIPC_COMPAT=y
245CONFIG_MIPS32_O32=y 258CONFIG_MIPS32_O32=y
246CONFIG_MIPS32_N32=y 259CONFIG_MIPS32_N32=y
247CONFIG_BINFMT_ELF32=y 260CONFIG_BINFMT_ELF32=y
248 261
249# 262#
263# Power management options
264#
265CONFIG_PM=y
266# CONFIG_PM_LEGACY is not set
267# CONFIG_PM_DEBUG is not set
268# CONFIG_PM_SYSFS_DEPRECATED is not set
269
270#
250# Networking 271# Networking
251# 272#
252CONFIG_NET=y 273CONFIG_NET=y
@@ -259,7 +280,10 @@ CONFIG_NET=y
259CONFIG_UNIX=y 280CONFIG_UNIX=y
260CONFIG_XFRM=y 281CONFIG_XFRM=y
261CONFIG_XFRM_USER=y 282CONFIG_XFRM_USER=y
283# CONFIG_XFRM_SUB_POLICY is not set
284CONFIG_XFRM_MIGRATE=y
262CONFIG_NET_KEY=y 285CONFIG_NET_KEY=y
286CONFIG_NET_KEY_MIGRATE=y
263CONFIG_INET=y 287CONFIG_INET=y
264# CONFIG_IP_MULTICAST is not set 288# CONFIG_IP_MULTICAST is not set
265# CONFIG_IP_ADVANCED_ROUTER is not set 289# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +303,13 @@ CONFIG_IP_PNP_DHCP=y
279# CONFIG_INET_TUNNEL is not set 303# CONFIG_INET_TUNNEL is not set
280CONFIG_INET_XFRM_MODE_TRANSPORT=y 304CONFIG_INET_XFRM_MODE_TRANSPORT=y
281CONFIG_INET_XFRM_MODE_TUNNEL=y 305CONFIG_INET_XFRM_MODE_TUNNEL=y
306CONFIG_INET_XFRM_MODE_BEET=y
282CONFIG_INET_DIAG=y 307CONFIG_INET_DIAG=y
283CONFIG_INET_TCP_DIAG=y 308CONFIG_INET_TCP_DIAG=y
284# CONFIG_TCP_CONG_ADVANCED is not set 309# CONFIG_TCP_CONG_ADVANCED is not set
285CONFIG_TCP_CONG_BIC=y 310CONFIG_TCP_CONG_CUBIC=y
311CONFIG_DEFAULT_TCP_CONG="cubic"
312CONFIG_TCP_MD5SIG=y
286# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
287# CONFIG_INET6_XFRM_TUNNEL is not set 314# CONFIG_INET6_XFRM_TUNNEL is not set
288# CONFIG_INET6_TUNNEL is not set 315# CONFIG_INET6_TUNNEL is not set
@@ -312,7 +339,6 @@ CONFIG_NETWORK_SECMARK=y
312# CONFIG_ATALK is not set 339# CONFIG_ATALK is not set
313# CONFIG_X25 is not set 340# CONFIG_X25 is not set
314# CONFIG_LAPB is not set 341# CONFIG_LAPB is not set
315# CONFIG_NET_DIVERT is not set
316# CONFIG_ECONET is not set 342# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set 343# CONFIG_WAN_ROUTER is not set
318 344
@@ -367,6 +393,7 @@ CONFIG_PROC_EVENTS=y
367# 393#
368# Plug and Play support 394# Plug and Play support
369# 395#
396# CONFIG_PNPACPI is not set
370 397
371# 398#
372# Block devices 399# Block devices
@@ -387,6 +414,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
387CONFIG_ATA_OVER_ETH=y 414CONFIG_ATA_OVER_ETH=y
388 415
389# 416#
417# Misc devices
418#
419CONFIG_SGI_IOC4=y
420# CONFIG_TIFM_CORE is not set
421
422#
390# ATA/ATAPI/MFM/RLL support 423# ATA/ATAPI/MFM/RLL support
391# 424#
392# CONFIG_IDE is not set 425# CONFIG_IDE is not set
@@ -396,6 +429,12 @@ CONFIG_ATA_OVER_ETH=y
396# 429#
397CONFIG_RAID_ATTRS=y 430CONFIG_RAID_ATTRS=y
398# CONFIG_SCSI is not set 431# CONFIG_SCSI is not set
432# CONFIG_SCSI_NETLINK is not set
433
434#
435# Serial ATA (prod) and Parallel ATA (experimental) drivers
436#
437# CONFIG_ATA is not set
399 438
400# 439#
401# Multi-device support (RAID and LVM) 440# Multi-device support (RAID and LVM)
@@ -446,6 +485,8 @@ CONFIG_LXT_PHY=y
446CONFIG_CICADA_PHY=y 485CONFIG_CICADA_PHY=y
447CONFIG_VITESSE_PHY=y 486CONFIG_VITESSE_PHY=y
448CONFIG_SMSC_PHY=y 487CONFIG_SMSC_PHY=y
488# CONFIG_BROADCOM_PHY is not set
489# CONFIG_FIXED_PHY is not set
449 490
450# 491#
451# Ethernet (10 or 100Mbit) 492# Ethernet (10 or 100Mbit)
@@ -482,14 +523,18 @@ CONFIG_NET_ETHERNET=y
482# CONFIG_TIGON3 is not set 523# CONFIG_TIGON3 is not set
483# CONFIG_BNX2 is not set 524# CONFIG_BNX2 is not set
484# CONFIG_MV643XX_ETH is not set 525# CONFIG_MV643XX_ETH is not set
526CONFIG_QLA3XXX=y
527# CONFIG_ATL1 is not set
485 528
486# 529#
487# Ethernet (10000 Mbit) 530# Ethernet (10000 Mbit)
488# 531#
489# CONFIG_CHELSIO_T1 is not set 532# CONFIG_CHELSIO_T1 is not set
533CONFIG_CHELSIO_T3=y
490# CONFIG_IXGB is not set 534# CONFIG_IXGB is not set
491# CONFIG_S2IO is not set 535# CONFIG_S2IO is not set
492# CONFIG_MYRI10GE is not set 536# CONFIG_MYRI10GE is not set
537CONFIG_NETXEN_NIC=y
493 538
494# 539#
495# Token Ring devices 540# Token Ring devices
@@ -528,6 +573,7 @@ CONFIG_NET_ETHERNET=y
528# Input device support 573# Input device support
529# 574#
530CONFIG_INPUT=y 575CONFIG_INPUT=y
576# CONFIG_INPUT_FF_MEMLESS is not set
531 577
532# 578#
533# Userland interfaces 579# Userland interfaces
@@ -605,10 +651,6 @@ CONFIG_LEGACY_PTY_COUNT=256
605# CONFIG_DTLK is not set 651# CONFIG_DTLK is not set
606# CONFIG_R3964 is not set 652# CONFIG_R3964 is not set
607# CONFIG_APPLICOM is not set 653# CONFIG_APPLICOM is not set
608
609#
610# Ftape, the floppy tape device driver
611#
612# CONFIG_DRM is not set 654# CONFIG_DRM is not set
613# CONFIG_RAW_DRIVER is not set 655# CONFIG_RAW_DRIVER is not set
614 656
@@ -616,7 +658,6 @@ CONFIG_LEGACY_PTY_COUNT=256
616# TPM devices 658# TPM devices
617# 659#
618# CONFIG_TCG_TPM is not set 660# CONFIG_TCG_TPM is not set
619# CONFIG_TELCLOCK is not set
620 661
621# 662#
622# I2C support 663# I2C support
@@ -641,14 +682,9 @@ CONFIG_LEGACY_PTY_COUNT=256
641# CONFIG_HWMON_VID is not set 682# CONFIG_HWMON_VID is not set
642 683
643# 684#
644# Misc devices
645#
646
647#
648# Multimedia devices 685# Multimedia devices
649# 686#
650# CONFIG_VIDEO_DEV is not set 687# CONFIG_VIDEO_DEV is not set
651CONFIG_VIDEO_V4L2=y
652 688
653# 689#
654# Digital Video Broadcasting Devices 690# Digital Video Broadcasting Devices
@@ -666,6 +702,7 @@ CONFIG_VIDEO_V4L2=y
666# 702#
667# CONFIG_VGA_CONSOLE is not set 703# CONFIG_VGA_CONSOLE is not set
668CONFIG_DUMMY_CONSOLE=y 704CONFIG_DUMMY_CONSOLE=y
705# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
669 706
670# 707#
671# Sound 708# Sound
@@ -673,6 +710,11 @@ CONFIG_DUMMY_CONSOLE=y
673# CONFIG_SOUND is not set 710# CONFIG_SOUND is not set
674 711
675# 712#
713# HID Devices
714#
715# CONFIG_HID is not set
716
717#
676# USB support 718# USB support
677# 719#
678CONFIG_USB_ARCH_HAS_HCD=y 720CONFIG_USB_ARCH_HAS_HCD=y
@@ -735,16 +777,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
735# 777#
736 778
737# 779#
780# Auxiliary Display support
781#
782
783#
784# Virtualization
785#
786
787#
738# File systems 788# File systems
739# 789#
740CONFIG_EXT2_FS=y 790CONFIG_EXT2_FS=y
741# CONFIG_EXT2_FS_XATTR is not set 791# CONFIG_EXT2_FS_XATTR is not set
742# CONFIG_EXT2_FS_XIP is not set 792# CONFIG_EXT2_FS_XIP is not set
743# CONFIG_EXT3_FS is not set 793# CONFIG_EXT3_FS is not set
794# CONFIG_EXT4DEV_FS is not set
744# CONFIG_REISERFS_FS is not set 795# CONFIG_REISERFS_FS is not set
745# CONFIG_JFS_FS is not set 796# CONFIG_JFS_FS is not set
746# CONFIG_FS_POSIX_ACL is not set 797CONFIG_FS_POSIX_ACL=y
747# CONFIG_XFS_FS is not set 798# CONFIG_XFS_FS is not set
799# CONFIG_GFS2_FS is not set
748# CONFIG_OCFS2_FS is not set 800# CONFIG_OCFS2_FS is not set
749# CONFIG_MINIX_FS is not set 801# CONFIG_MINIX_FS is not set
750# CONFIG_ROMFS_FS is not set 802# CONFIG_ROMFS_FS is not set
@@ -755,6 +807,7 @@ CONFIG_DNOTIFY=y
755# CONFIG_AUTOFS_FS is not set 807# CONFIG_AUTOFS_FS is not set
756# CONFIG_AUTOFS4_FS is not set 808# CONFIG_AUTOFS4_FS is not set
757CONFIG_FUSE_FS=y 809CONFIG_FUSE_FS=y
810CONFIG_GENERIC_ACL=y
758 811
759# 812#
760# CD-ROM/DVD Filesystems 813# CD-ROM/DVD Filesystems
@@ -774,17 +827,20 @@ CONFIG_FUSE_FS=y
774# 827#
775CONFIG_PROC_FS=y 828CONFIG_PROC_FS=y
776CONFIG_PROC_KCORE=y 829CONFIG_PROC_KCORE=y
830CONFIG_PROC_SYSCTL=y
777CONFIG_SYSFS=y 831CONFIG_SYSFS=y
778CONFIG_TMPFS=y 832CONFIG_TMPFS=y
833CONFIG_TMPFS_POSIX_ACL=y
779# CONFIG_HUGETLB_PAGE is not set 834# CONFIG_HUGETLB_PAGE is not set
780CONFIG_RAMFS=y 835CONFIG_RAMFS=y
781# CONFIG_CONFIGFS_FS is not set 836CONFIG_CONFIGFS_FS=y
782 837
783# 838#
784# Miscellaneous filesystems 839# Miscellaneous filesystems
785# 840#
786# CONFIG_ADFS_FS is not set 841# CONFIG_ADFS_FS is not set
787# CONFIG_AFFS_FS is not set 842# CONFIG_AFFS_FS is not set
843# CONFIG_ECRYPT_FS is not set
788# CONFIG_HFS_FS is not set 844# CONFIG_HFS_FS is not set
789# CONFIG_HFSPLUS_FS is not set 845# CONFIG_HFSPLUS_FS is not set
790# CONFIG_BEFS_FS is not set 846# CONFIG_BEFS_FS is not set
@@ -816,7 +872,6 @@ CONFIG_SUNRPC=y
816# CONFIG_RPCSEC_GSS_SPKM3 is not set 872# CONFIG_RPCSEC_GSS_SPKM3 is not set
817# CONFIG_SMB_FS is not set 873# CONFIG_SMB_FS is not set
818# CONFIG_CIFS is not set 874# CONFIG_CIFS is not set
819# CONFIG_CIFS_DEBUG2 is not set
820# CONFIG_NCP_FS is not set 875# CONFIG_NCP_FS is not set
821# CONFIG_CODA_FS is not set 876# CONFIG_CODA_FS is not set
822# CONFIG_AFS_FS is not set 877# CONFIG_AFS_FS is not set
@@ -834,6 +889,14 @@ CONFIG_MSDOS_PARTITION=y
834# CONFIG_NLS is not set 889# CONFIG_NLS is not set
835 890
836# 891#
892# Distributed Lock Manager
893#
894CONFIG_DLM=y
895CONFIG_DLM_TCP=y
896# CONFIG_DLM_SCTP is not set
897# CONFIG_DLM_DEBUG is not set
898
899#
837# Profiling support 900# Profiling support
838# 901#
839# CONFIG_PROFILING is not set 902# CONFIG_PROFILING is not set
@@ -843,12 +906,13 @@ CONFIG_MSDOS_PARTITION=y
843# 906#
844CONFIG_TRACE_IRQFLAGS_SUPPORT=y 907CONFIG_TRACE_IRQFLAGS_SUPPORT=y
845# CONFIG_PRINTK_TIME is not set 908# CONFIG_PRINTK_TIME is not set
909CONFIG_ENABLE_MUST_CHECK=y
846# CONFIG_MAGIC_SYSRQ is not set 910# CONFIG_MAGIC_SYSRQ is not set
847# CONFIG_UNUSED_SYMBOLS is not set 911# CONFIG_UNUSED_SYMBOLS is not set
912# CONFIG_DEBUG_FS is not set
913# CONFIG_HEADERS_CHECK is not set
848# CONFIG_DEBUG_KERNEL is not set 914# CONFIG_DEBUG_KERNEL is not set
849CONFIG_LOG_BUF_SHIFT=14 915CONFIG_LOG_BUF_SHIFT=14
850# CONFIG_DEBUG_FS is not set
851# CONFIG_UNWIND_INFO is not set
852CONFIG_CROSSCOMPILE=y 916CONFIG_CROSSCOMPILE=y
853CONFIG_CMDLINE="" 917CONFIG_CMDLINE=""
854 918
@@ -863,7 +927,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
863# Cryptographic options 927# Cryptographic options
864# 928#
865CONFIG_CRYPTO=y 929CONFIG_CRYPTO=y
930CONFIG_CRYPTO_ALGAPI=y
931CONFIG_CRYPTO_BLKCIPHER=y
932CONFIG_CRYPTO_HASH=y
933CONFIG_CRYPTO_MANAGER=y
866CONFIG_CRYPTO_HMAC=y 934CONFIG_CRYPTO_HMAC=y
935CONFIG_CRYPTO_XCBC=y
867CONFIG_CRYPTO_NULL=y 936CONFIG_CRYPTO_NULL=y
868CONFIG_CRYPTO_MD4=y 937CONFIG_CRYPTO_MD4=y
869CONFIG_CRYPTO_MD5=y 938CONFIG_CRYPTO_MD5=y
@@ -872,9 +941,16 @@ CONFIG_CRYPTO_SHA256=y
872CONFIG_CRYPTO_SHA512=y 941CONFIG_CRYPTO_SHA512=y
873CONFIG_CRYPTO_WP512=y 942CONFIG_CRYPTO_WP512=y
874CONFIG_CRYPTO_TGR192=y 943CONFIG_CRYPTO_TGR192=y
944CONFIG_CRYPTO_GF128MUL=y
945CONFIG_CRYPTO_ECB=y
946CONFIG_CRYPTO_CBC=y
947CONFIG_CRYPTO_PCBC=y
948CONFIG_CRYPTO_LRW=y
875CONFIG_CRYPTO_DES=y 949CONFIG_CRYPTO_DES=y
950CONFIG_CRYPTO_FCRYPT=y
876CONFIG_CRYPTO_BLOWFISH=y 951CONFIG_CRYPTO_BLOWFISH=y
877CONFIG_CRYPTO_TWOFISH=y 952CONFIG_CRYPTO_TWOFISH=y
953CONFIG_CRYPTO_TWOFISH_COMMON=y
878CONFIG_CRYPTO_SERPENT=y 954CONFIG_CRYPTO_SERPENT=y
879CONFIG_CRYPTO_AES=y 955CONFIG_CRYPTO_AES=y
880CONFIG_CRYPTO_CAST5=y 956CONFIG_CRYPTO_CAST5=y
@@ -886,6 +962,7 @@ CONFIG_CRYPTO_ANUBIS=y
886CONFIG_CRYPTO_DEFLATE=y 962CONFIG_CRYPTO_DEFLATE=y
887CONFIG_CRYPTO_MICHAEL_MIC=y 963CONFIG_CRYPTO_MICHAEL_MIC=y
888CONFIG_CRYPTO_CRC32C=y 964CONFIG_CRYPTO_CRC32C=y
965CONFIG_CRYPTO_CAMELLIA=y
889 966
890# 967#
891# Hardware crypto devices 968# Hardware crypto devices
@@ -894,6 +971,7 @@ CONFIG_CRYPTO_CRC32C=y
894# 971#
895# Library routines 972# Library routines
896# 973#
974CONFIG_BITREVERSE=y
897# CONFIG_CRC_CCITT is not set 975# CONFIG_CRC_CCITT is not set
898CONFIG_CRC16=y 976CONFIG_CRC16=y
899CONFIG_CRC32=y 977CONFIG_CRC32=y
@@ -901,3 +979,5 @@ CONFIG_LIBCRC32C=y
901CONFIG_ZLIB_INFLATE=y 979CONFIG_ZLIB_INFLATE=y
902CONFIG_ZLIB_DEFLATE=y 980CONFIG_ZLIB_DEFLATE=y
903CONFIG_PLIST=y 981CONFIG_PLIST=y
982CONFIG_HAS_IOMEM=y
983CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig
index 5a9603c12902..8ade072271cd 100644
--- a/arch/mips/configs/ocelot_defconfig
+++ b/arch/mips/configs/ocelot_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:16 2006 4# Tue Feb 20 21:47:36 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MOMENCO_OCELOT=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MOMENCO_OCELOT=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -123,8 +127,8 @@ CONFIG_BOARD_SCACHE=y
123CONFIG_RM7000_CPU_SCACHE=y 127CONFIG_RM7000_CPU_SCACHE=y
124CONFIG_CPU_HAS_PREFETCH=y 128CONFIG_CPU_HAS_PREFETCH=y
125CONFIG_MIPS_MT_DISABLED=y 129CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 132# CONFIG_MIPS_VPE_LOADER is not set
129# CONFIG_64BIT_PHYS_ADDR is not set 133# CONFIG_64BIT_PHYS_ADDR is not set
130CONFIG_CPU_HAS_LLSC=y 134CONFIG_CPU_HAS_LLSC=y
@@ -142,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
142# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
143CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
144# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=1
145# CONFIG_HZ_48 is not set 150# CONFIG_HZ_48 is not set
146# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
147# CONFIG_HZ_128 is not set 152# CONFIG_HZ_128 is not set
@@ -154,6 +159,7 @@ CONFIG_HZ=1000
154CONFIG_PREEMPT_NONE=y 159CONFIG_PREEMPT_NONE=y
155# CONFIG_PREEMPT_VOLUNTARY is not set 160# CONFIG_PREEMPT_VOLUNTARY is not set
156# CONFIG_PREEMPT is not set 161# CONFIG_PREEMPT is not set
162# CONFIG_KEXEC is not set
157CONFIG_LOCKDEP_SUPPORT=y 163CONFIG_LOCKDEP_SUPPORT=y
158CONFIG_STACKTRACE_SUPPORT=y 164CONFIG_STACKTRACE_SUPPORT=y
159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 165CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -172,15 +178,20 @@ CONFIG_LOCALVERSION=""
172CONFIG_LOCALVERSION_AUTO=y 178CONFIG_LOCALVERSION_AUTO=y
173CONFIG_SWAP=y 179CONFIG_SWAP=y
174CONFIG_SYSVIPC=y 180CONFIG_SYSVIPC=y
181# CONFIG_IPC_NS is not set
182CONFIG_SYSVIPC_SYSCTL=y
175# CONFIG_POSIX_MQUEUE is not set 183# CONFIG_POSIX_MQUEUE is not set
176# CONFIG_BSD_PROCESS_ACCT is not set 184# CONFIG_BSD_PROCESS_ACCT is not set
177CONFIG_SYSCTL=y 185# CONFIG_TASKSTATS is not set
186# CONFIG_UTS_NS is not set
178# CONFIG_AUDIT is not set 187# CONFIG_AUDIT is not set
179# CONFIG_IKCONFIG is not set 188# CONFIG_IKCONFIG is not set
189CONFIG_SYSFS_DEPRECATED=y
180CONFIG_RELAY=y 190CONFIG_RELAY=y
181CONFIG_INITRAMFS_SOURCE=""
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 191# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
192CONFIG_SYSCTL=y
183CONFIG_EMBEDDED=y 193CONFIG_EMBEDDED=y
194CONFIG_SYSCTL_SYSCALL=y
184CONFIG_KALLSYMS=y 195CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 196# CONFIG_KALLSYMS_EXTRA_PASS is not set
186# CONFIG_HOTPLUG is not set 197# CONFIG_HOTPLUG is not set
@@ -188,12 +199,12 @@ CONFIG_PRINTK=y
188CONFIG_BUG=y 199CONFIG_BUG=y
189CONFIG_ELF_CORE=y 200CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 201CONFIG_BASE_FULL=y
191CONFIG_RT_MUTEXES=y
192CONFIG_FUTEX=y 202CONFIG_FUTEX=y
193CONFIG_EPOLL=y 203CONFIG_EPOLL=y
194CONFIG_SHMEM=y 204CONFIG_SHMEM=y
195CONFIG_SLAB=y 205CONFIG_SLAB=y
196CONFIG_VM_EVENT_COUNTERS=y 206CONFIG_VM_EVENT_COUNTERS=y
207CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 208# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 209CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set 210# CONFIG_SLOB is not set
@@ -206,6 +217,7 @@ CONFIG_BASE_SMALL=0
206# 217#
207# Block layer 218# Block layer
208# 219#
220CONFIG_BLOCK=y
209# CONFIG_LBD is not set 221# CONFIG_LBD is not set
210# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
211# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -233,7 +245,6 @@ CONFIG_MMU=y
233# 245#
234# PCCARD (PCMCIA/CardBus) support 246# PCCARD (PCMCIA/CardBus) support
235# 247#
236# CONFIG_PCCARD is not set
237 248
238# 249#
239# PCI Hotplug Support 250# PCI Hotplug Support
@@ -247,6 +258,14 @@ CONFIG_BINFMT_ELF=y
247CONFIG_TRAD_SIGNALS=y 258CONFIG_TRAD_SIGNALS=y
248 259
249# 260#
261# Power management options
262#
263CONFIG_PM=y
264# CONFIG_PM_LEGACY is not set
265# CONFIG_PM_DEBUG is not set
266# CONFIG_PM_SYSFS_DEPRECATED is not set
267
268#
250# Networking 269# Networking
251# 270#
252CONFIG_NET=y 271CONFIG_NET=y
@@ -259,7 +278,10 @@ CONFIG_NET=y
259CONFIG_UNIX=y 278CONFIG_UNIX=y
260CONFIG_XFRM=y 279CONFIG_XFRM=y
261CONFIG_XFRM_USER=y 280CONFIG_XFRM_USER=y
281# CONFIG_XFRM_SUB_POLICY is not set
282CONFIG_XFRM_MIGRATE=y
262CONFIG_NET_KEY=y 283CONFIG_NET_KEY=y
284CONFIG_NET_KEY_MIGRATE=y
263CONFIG_INET=y 285CONFIG_INET=y
264# CONFIG_IP_MULTICAST is not set 286# CONFIG_IP_MULTICAST is not set
265# CONFIG_IP_ADVANCED_ROUTER is not set 287# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -279,10 +301,13 @@ CONFIG_IP_PNP_BOOTP=y
279# CONFIG_INET_TUNNEL is not set 301# CONFIG_INET_TUNNEL is not set
280CONFIG_INET_XFRM_MODE_TRANSPORT=y 302CONFIG_INET_XFRM_MODE_TRANSPORT=y
281CONFIG_INET_XFRM_MODE_TUNNEL=y 303CONFIG_INET_XFRM_MODE_TUNNEL=y
304CONFIG_INET_XFRM_MODE_BEET=y
282CONFIG_INET_DIAG=y 305CONFIG_INET_DIAG=y
283CONFIG_INET_TCP_DIAG=y 306CONFIG_INET_TCP_DIAG=y
284# CONFIG_TCP_CONG_ADVANCED is not set 307# CONFIG_TCP_CONG_ADVANCED is not set
285CONFIG_TCP_CONG_BIC=y 308CONFIG_TCP_CONG_CUBIC=y
309CONFIG_DEFAULT_TCP_CONG="cubic"
310CONFIG_TCP_MD5SIG=y
286# CONFIG_IPV6 is not set 311# CONFIG_IPV6 is not set
287# CONFIG_INET6_XFRM_TUNNEL is not set 312# CONFIG_INET6_XFRM_TUNNEL is not set
288# CONFIG_INET6_TUNNEL is not set 313# CONFIG_INET6_TUNNEL is not set
@@ -312,7 +337,6 @@ CONFIG_NETWORK_SECMARK=y
312# CONFIG_ATALK is not set 337# CONFIG_ATALK is not set
313# CONFIG_X25 is not set 338# CONFIG_X25 is not set
314# CONFIG_LAPB is not set 339# CONFIG_LAPB is not set
315# CONFIG_NET_DIVERT is not set
316# CONFIG_ECONET is not set 340# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set 341# CONFIG_WAN_ROUTER is not set
318 342
@@ -345,7 +369,6 @@ CONFIG_WIRELESS_EXT=y
345# 369#
346CONFIG_STANDALONE=y 370CONFIG_STANDALONE=y
347CONFIG_PREVENT_FIRMWARE_BUILD=y 371CONFIG_PREVENT_FIRMWARE_BUILD=y
348# CONFIG_FW_LOADER is not set
349# CONFIG_SYS_HYPERVISOR is not set 372# CONFIG_SYS_HYPERVISOR is not set
350 373
351# 374#
@@ -367,6 +390,7 @@ CONFIG_PROC_EVENTS=y
367# 390#
368# Plug and Play support 391# Plug and Play support
369# 392#
393# CONFIG_PNPACPI is not set
370 394
371# 395#
372# Block devices 396# Block devices
@@ -382,6 +406,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
382CONFIG_ATA_OVER_ETH=y 406CONFIG_ATA_OVER_ETH=y
383 407
384# 408#
409# Misc devices
410#
411
412#
385# ATA/ATAPI/MFM/RLL support 413# ATA/ATAPI/MFM/RLL support
386# 414#
387# CONFIG_IDE is not set 415# CONFIG_IDE is not set
@@ -391,6 +419,12 @@ CONFIG_ATA_OVER_ETH=y
391# 419#
392CONFIG_RAID_ATTRS=y 420CONFIG_RAID_ATTRS=y
393# CONFIG_SCSI is not set 421# CONFIG_SCSI is not set
422# CONFIG_SCSI_NETLINK is not set
423
424#
425# Serial ATA (prod) and Parallel ATA (experimental) drivers
426#
427# CONFIG_ATA is not set
394 428
395# 429#
396# Multi-device support (RAID and LVM) 430# Multi-device support (RAID and LVM)
@@ -434,6 +468,8 @@ CONFIG_LXT_PHY=y
434CONFIG_CICADA_PHY=y 468CONFIG_CICADA_PHY=y
435CONFIG_VITESSE_PHY=y 469CONFIG_VITESSE_PHY=y
436CONFIG_SMSC_PHY=y 470CONFIG_SMSC_PHY=y
471# CONFIG_BROADCOM_PHY is not set
472# CONFIG_FIXED_PHY is not set
437 473
438# 474#
439# Ethernet (10 or 100Mbit) 475# Ethernet (10 or 100Mbit)
@@ -484,6 +520,7 @@ CONFIG_NET_ETHERNET=y
484# Input device support 520# Input device support
485# 521#
486CONFIG_INPUT=y 522CONFIG_INPUT=y
523# CONFIG_INPUT_FF_MEMLESS is not set
487 524
488# 525#
489# Userland interfaces 526# Userland interfaces
@@ -557,17 +594,12 @@ CONFIG_LEGACY_PTY_COUNT=256
557# CONFIG_GEN_RTC is not set 594# CONFIG_GEN_RTC is not set
558# CONFIG_DTLK is not set 595# CONFIG_DTLK is not set
559# CONFIG_R3964 is not set 596# CONFIG_R3964 is not set
560
561#
562# Ftape, the floppy tape device driver
563#
564# CONFIG_RAW_DRIVER is not set 597# CONFIG_RAW_DRIVER is not set
565 598
566# 599#
567# TPM devices 600# TPM devices
568# 601#
569# CONFIG_TCG_TPM is not set 602# CONFIG_TCG_TPM is not set
570# CONFIG_TELCLOCK is not set
571 603
572# 604#
573# I2C support 605# I2C support
@@ -592,14 +624,9 @@ CONFIG_LEGACY_PTY_COUNT=256
592# CONFIG_HWMON_VID is not set 624# CONFIG_HWMON_VID is not set
593 625
594# 626#
595# Misc devices
596#
597
598#
599# Multimedia devices 627# Multimedia devices
600# 628#
601# CONFIG_VIDEO_DEV is not set 629# CONFIG_VIDEO_DEV is not set
602CONFIG_VIDEO_V4L2=y
603 630
604# 631#
605# Digital Video Broadcasting Devices 632# Digital Video Broadcasting Devices
@@ -617,6 +644,7 @@ CONFIG_VIDEO_V4L2=y
617# 644#
618# CONFIG_VGA_CONSOLE is not set 645# CONFIG_VGA_CONSOLE is not set
619CONFIG_DUMMY_CONSOLE=y 646CONFIG_DUMMY_CONSOLE=y
647# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
620 648
621# 649#
622# Sound 650# Sound
@@ -624,6 +652,11 @@ CONFIG_DUMMY_CONSOLE=y
624# CONFIG_SOUND is not set 652# CONFIG_SOUND is not set
625 653
626# 654#
655# HID Devices
656#
657# CONFIG_HID is not set
658
659#
627# USB support 660# USB support
628# 661#
629# CONFIG_USB_ARCH_HAS_HCD is not set 662# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -684,16 +717,26 @@ CONFIG_DUMMY_CONSOLE=y
684# 717#
685 718
686# 719#
720# Auxiliary Display support
721#
722
723#
724# Virtualization
725#
726
727#
687# File systems 728# File systems
688# 729#
689CONFIG_EXT2_FS=y 730CONFIG_EXT2_FS=y
690# CONFIG_EXT2_FS_XATTR is not set 731# CONFIG_EXT2_FS_XATTR is not set
691# CONFIG_EXT2_FS_XIP is not set 732# CONFIG_EXT2_FS_XIP is not set
692# CONFIG_EXT3_FS is not set 733# CONFIG_EXT3_FS is not set
734# CONFIG_EXT4DEV_FS is not set
693# CONFIG_REISERFS_FS is not set 735# CONFIG_REISERFS_FS is not set
694# CONFIG_JFS_FS is not set 736# CONFIG_JFS_FS is not set
695# CONFIG_FS_POSIX_ACL is not set 737CONFIG_FS_POSIX_ACL=y
696# CONFIG_XFS_FS is not set 738# CONFIG_XFS_FS is not set
739# CONFIG_GFS2_FS is not set
697# CONFIG_OCFS2_FS is not set 740# CONFIG_OCFS2_FS is not set
698# CONFIG_MINIX_FS is not set 741# CONFIG_MINIX_FS is not set
699# CONFIG_ROMFS_FS is not set 742# CONFIG_ROMFS_FS is not set
@@ -704,6 +747,7 @@ CONFIG_DNOTIFY=y
704# CONFIG_AUTOFS_FS is not set 747# CONFIG_AUTOFS_FS is not set
705# CONFIG_AUTOFS4_FS is not set 748# CONFIG_AUTOFS4_FS is not set
706CONFIG_FUSE_FS=y 749CONFIG_FUSE_FS=y
750CONFIG_GENERIC_ACL=y
707 751
708# 752#
709# CD-ROM/DVD Filesystems 753# CD-ROM/DVD Filesystems
@@ -723,17 +767,20 @@ CONFIG_FUSE_FS=y
723# 767#
724CONFIG_PROC_FS=y 768CONFIG_PROC_FS=y
725CONFIG_PROC_KCORE=y 769CONFIG_PROC_KCORE=y
770CONFIG_PROC_SYSCTL=y
726CONFIG_SYSFS=y 771CONFIG_SYSFS=y
727CONFIG_TMPFS=y 772CONFIG_TMPFS=y
773CONFIG_TMPFS_POSIX_ACL=y
728# CONFIG_HUGETLB_PAGE is not set 774# CONFIG_HUGETLB_PAGE is not set
729CONFIG_RAMFS=y 775CONFIG_RAMFS=y
730# CONFIG_CONFIGFS_FS is not set 776CONFIG_CONFIGFS_FS=y
731 777
732# 778#
733# Miscellaneous filesystems 779# Miscellaneous filesystems
734# 780#
735# CONFIG_ADFS_FS is not set 781# CONFIG_ADFS_FS is not set
736# CONFIG_AFFS_FS is not set 782# CONFIG_AFFS_FS is not set
783# CONFIG_ECRYPT_FS is not set
737# CONFIG_HFS_FS is not set 784# CONFIG_HFS_FS is not set
738# CONFIG_HFSPLUS_FS is not set 785# CONFIG_HFSPLUS_FS is not set
739# CONFIG_BEFS_FS is not set 786# CONFIG_BEFS_FS is not set
@@ -765,7 +812,6 @@ CONFIG_SUNRPC=y
765# CONFIG_RPCSEC_GSS_SPKM3 is not set 812# CONFIG_RPCSEC_GSS_SPKM3 is not set
766# CONFIG_SMB_FS is not set 813# CONFIG_SMB_FS is not set
767# CONFIG_CIFS is not set 814# CONFIG_CIFS is not set
768# CONFIG_CIFS_DEBUG2 is not set
769# CONFIG_NCP_FS is not set 815# CONFIG_NCP_FS is not set
770# CONFIG_CODA_FS is not set 816# CONFIG_CODA_FS is not set
771# CONFIG_AFS_FS is not set 817# CONFIG_AFS_FS is not set
@@ -783,6 +829,14 @@ CONFIG_MSDOS_PARTITION=y
783# CONFIG_NLS is not set 829# CONFIG_NLS is not set
784 830
785# 831#
832# Distributed Lock Manager
833#
834CONFIG_DLM=y
835CONFIG_DLM_TCP=y
836# CONFIG_DLM_SCTP is not set
837# CONFIG_DLM_DEBUG is not set
838
839#
786# Profiling support 840# Profiling support
787# 841#
788# CONFIG_PROFILING is not set 842# CONFIG_PROFILING is not set
@@ -792,14 +846,16 @@ CONFIG_MSDOS_PARTITION=y
792# 846#
793CONFIG_TRACE_IRQFLAGS_SUPPORT=y 847CONFIG_TRACE_IRQFLAGS_SUPPORT=y
794# CONFIG_PRINTK_TIME is not set 848# CONFIG_PRINTK_TIME is not set
849CONFIG_ENABLE_MUST_CHECK=y
795# CONFIG_MAGIC_SYSRQ is not set 850# CONFIG_MAGIC_SYSRQ is not set
796# CONFIG_UNUSED_SYMBOLS is not set 851# CONFIG_UNUSED_SYMBOLS is not set
852# CONFIG_DEBUG_FS is not set
853# CONFIG_HEADERS_CHECK is not set
797# CONFIG_DEBUG_KERNEL is not set 854# CONFIG_DEBUG_KERNEL is not set
798CONFIG_LOG_BUF_SHIFT=14 855CONFIG_LOG_BUF_SHIFT=14
799# CONFIG_DEBUG_FS is not set
800# CONFIG_UNWIND_INFO is not set
801CONFIG_CROSSCOMPILE=y 856CONFIG_CROSSCOMPILE=y
802CONFIG_CMDLINE="" 857CONFIG_CMDLINE=""
858CONFIG_SYS_SUPPORTS_KGDB=y
803 859
804# 860#
805# Security options 861# Security options
@@ -812,7 +868,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
812# Cryptographic options 868# Cryptographic options
813# 869#
814CONFIG_CRYPTO=y 870CONFIG_CRYPTO=y
871CONFIG_CRYPTO_ALGAPI=y
872CONFIG_CRYPTO_BLKCIPHER=y
873CONFIG_CRYPTO_HASH=y
874CONFIG_CRYPTO_MANAGER=y
815CONFIG_CRYPTO_HMAC=y 875CONFIG_CRYPTO_HMAC=y
876CONFIG_CRYPTO_XCBC=y
816CONFIG_CRYPTO_NULL=y 877CONFIG_CRYPTO_NULL=y
817CONFIG_CRYPTO_MD4=y 878CONFIG_CRYPTO_MD4=y
818CONFIG_CRYPTO_MD5=y 879CONFIG_CRYPTO_MD5=y
@@ -821,9 +882,16 @@ CONFIG_CRYPTO_SHA256=y
821CONFIG_CRYPTO_SHA512=y 882CONFIG_CRYPTO_SHA512=y
822CONFIG_CRYPTO_WP512=y 883CONFIG_CRYPTO_WP512=y
823CONFIG_CRYPTO_TGR192=y 884CONFIG_CRYPTO_TGR192=y
885CONFIG_CRYPTO_GF128MUL=y
886CONFIG_CRYPTO_ECB=y
887CONFIG_CRYPTO_CBC=y
888CONFIG_CRYPTO_PCBC=y
889CONFIG_CRYPTO_LRW=y
824CONFIG_CRYPTO_DES=y 890CONFIG_CRYPTO_DES=y
891CONFIG_CRYPTO_FCRYPT=y
825CONFIG_CRYPTO_BLOWFISH=y 892CONFIG_CRYPTO_BLOWFISH=y
826CONFIG_CRYPTO_TWOFISH=y 893CONFIG_CRYPTO_TWOFISH=y
894CONFIG_CRYPTO_TWOFISH_COMMON=y
827CONFIG_CRYPTO_SERPENT=y 895CONFIG_CRYPTO_SERPENT=y
828CONFIG_CRYPTO_AES=y 896CONFIG_CRYPTO_AES=y
829CONFIG_CRYPTO_CAST5=y 897CONFIG_CRYPTO_CAST5=y
@@ -835,6 +903,7 @@ CONFIG_CRYPTO_ANUBIS=y
835CONFIG_CRYPTO_DEFLATE=y 903CONFIG_CRYPTO_DEFLATE=y
836CONFIG_CRYPTO_MICHAEL_MIC=y 904CONFIG_CRYPTO_MICHAEL_MIC=y
837CONFIG_CRYPTO_CRC32C=y 905CONFIG_CRYPTO_CRC32C=y
906CONFIG_CRYPTO_CAMELLIA=y
838 907
839# 908#
840# Hardware crypto devices 909# Hardware crypto devices
@@ -843,6 +912,7 @@ CONFIG_CRYPTO_CRC32C=y
843# 912#
844# Library routines 913# Library routines
845# 914#
915CONFIG_BITREVERSE=y
846# CONFIG_CRC_CCITT is not set 916# CONFIG_CRC_CCITT is not set
847CONFIG_CRC16=y 917CONFIG_CRC16=y
848CONFIG_CRC32=y 918CONFIG_CRC32=y
@@ -850,3 +920,5 @@ CONFIG_LIBCRC32C=y
850CONFIG_ZLIB_INFLATE=y 920CONFIG_ZLIB_INFLATE=y
851CONFIG_ZLIB_DEFLATE=y 921CONFIG_ZLIB_DEFLATE=y
852CONFIG_PLIST=y 922CONFIG_PLIST=y
923CONFIG_HAS_IOMEM=y
924CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig
index 46a942c253cf..d20a2216c11d 100644
--- a/arch/mips/configs/ocelot_g_defconfig
+++ b/arch/mips/configs/ocelot_g_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:16 2006 4# Tue Feb 20 21:47:36 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MOMENCO_OCELOT_G=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MOMENCO_OCELOT_G=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -106,15 +110,14 @@ CONFIG_CPU_RM7000=y
106# CONFIG_CPU_SB1 is not set 110# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_RM7000=y 111CONFIG_SYS_HAS_CPU_RM7000=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
109CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 113CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 114CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
112 115
113# 116#
114# Kernel type 117# Kernel type
115# 118#
116# CONFIG_32BIT is not set 119CONFIG_32BIT=y
117CONFIG_64BIT=y 120# CONFIG_64BIT is not set
118CONFIG_PAGE_SIZE_4KB=y 121CONFIG_PAGE_SIZE_4KB=y
119# CONFIG_PAGE_SIZE_8KB is not set 122# CONFIG_PAGE_SIZE_8KB is not set
120# CONFIG_PAGE_SIZE_16KB is not set 123# CONFIG_PAGE_SIZE_16KB is not set
@@ -123,9 +126,10 @@ CONFIG_BOARD_SCACHE=y
123CONFIG_RM7000_CPU_SCACHE=y 126CONFIG_RM7000_CPU_SCACHE=y
124CONFIG_CPU_HAS_PREFETCH=y 127CONFIG_CPU_HAS_PREFETCH=y
125CONFIG_MIPS_MT_DISABLED=y 128CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 129# CONFIG_MIPS_MT_SMP is not set
130# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 131# CONFIG_MIPS_VPE_LOADER is not set
132# CONFIG_64BIT_PHYS_ADDR is not set
129CONFIG_CPU_HAS_LLSC=y 133CONFIG_CPU_HAS_LLSC=y
130CONFIG_CPU_HAS_SYNC=y 134CONFIG_CPU_HAS_SYNC=y
131CONFIG_GENERIC_HARDIRQS=y 135CONFIG_GENERIC_HARDIRQS=y
@@ -141,6 +145,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 145# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
143CONFIG_RESOURCES_64BIT=y 147CONFIG_RESOURCES_64BIT=y
148CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 149# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 150# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 151# CONFIG_HZ_128 is not set
@@ -153,6 +158,7 @@ CONFIG_HZ=1000
153CONFIG_PREEMPT_NONE=y 158CONFIG_PREEMPT_NONE=y
154# CONFIG_PREEMPT_VOLUNTARY is not set 159# CONFIG_PREEMPT_VOLUNTARY is not set
155# CONFIG_PREEMPT is not set 160# CONFIG_PREEMPT is not set
161# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y 162CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y 163CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 164CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,15 +177,20 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 177CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 178CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 179CONFIG_SYSVIPC=y
180# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_POSIX_MQUEUE is not set 182# CONFIG_POSIX_MQUEUE is not set
175# CONFIG_BSD_PROCESS_ACCT is not set 183# CONFIG_BSD_PROCESS_ACCT is not set
176CONFIG_SYSCTL=y 184# CONFIG_TASKSTATS is not set
185# CONFIG_UTS_NS is not set
177# CONFIG_AUDIT is not set 186# CONFIG_AUDIT is not set
178# CONFIG_IKCONFIG is not set 187# CONFIG_IKCONFIG is not set
188CONFIG_SYSFS_DEPRECATED=y
179CONFIG_RELAY=y 189CONFIG_RELAY=y
180CONFIG_INITRAMFS_SOURCE=""
181# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 190# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
191CONFIG_SYSCTL=y
182CONFIG_EMBEDDED=y 192CONFIG_EMBEDDED=y
193CONFIG_SYSCTL_SYSCALL=y
183CONFIG_KALLSYMS=y 194CONFIG_KALLSYMS=y
184# CONFIG_KALLSYMS_EXTRA_PASS is not set 195# CONFIG_KALLSYMS_EXTRA_PASS is not set
185CONFIG_HOTPLUG=y 196CONFIG_HOTPLUG=y
@@ -187,12 +198,12 @@ CONFIG_PRINTK=y
187CONFIG_BUG=y 198CONFIG_BUG=y
188CONFIG_ELF_CORE=y 199CONFIG_ELF_CORE=y
189CONFIG_BASE_FULL=y 200CONFIG_BASE_FULL=y
190CONFIG_RT_MUTEXES=y
191CONFIG_FUTEX=y 201CONFIG_FUTEX=y
192CONFIG_EPOLL=y 202CONFIG_EPOLL=y
193CONFIG_SHMEM=y 203CONFIG_SHMEM=y
194CONFIG_SLAB=y 204CONFIG_SLAB=y
195CONFIG_VM_EVENT_COUNTERS=y 205CONFIG_VM_EVENT_COUNTERS=y
206CONFIG_RT_MUTEXES=y
196# CONFIG_TINY_SHMEM is not set 207# CONFIG_TINY_SHMEM is not set
197CONFIG_BASE_SMALL=0 208CONFIG_BASE_SMALL=0
198# CONFIG_SLOB is not set 209# CONFIG_SLOB is not set
@@ -205,7 +216,10 @@ CONFIG_BASE_SMALL=0
205# 216#
206# Block layer 217# Block layer
207# 218#
219CONFIG_BLOCK=y
220# CONFIG_LBD is not set
208# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
222CONFIG_LSF=y
209 223
210# 224#
211# IO Schedulers 225# IO Schedulers
@@ -242,12 +256,15 @@ CONFIG_MMU=y
242# 256#
243CONFIG_BINFMT_ELF=y 257CONFIG_BINFMT_ELF=y
244# CONFIG_BINFMT_MISC is not set 258# CONFIG_BINFMT_MISC is not set
245# CONFIG_BUILD_ELF64 is not set 259CONFIG_TRAD_SIGNALS=y
246CONFIG_MIPS32_COMPAT=y 260
247CONFIG_COMPAT=y 261#
248CONFIG_MIPS32_O32=y 262# Power management options
249CONFIG_MIPS32_N32=y 263#
250CONFIG_BINFMT_ELF32=y 264CONFIG_PM=y
265# CONFIG_PM_LEGACY is not set
266# CONFIG_PM_DEBUG is not set
267# CONFIG_PM_SYSFS_DEPRECATED is not set
251 268
252# 269#
253# Networking 270# Networking
@@ -262,7 +279,10 @@ CONFIG_NET=y
262CONFIG_UNIX=y 279CONFIG_UNIX=y
263CONFIG_XFRM=y 280CONFIG_XFRM=y
264CONFIG_XFRM_USER=y 281CONFIG_XFRM_USER=y
282# CONFIG_XFRM_SUB_POLICY is not set
283CONFIG_XFRM_MIGRATE=y
265CONFIG_NET_KEY=y 284CONFIG_NET_KEY=y
285CONFIG_NET_KEY_MIGRATE=y
266CONFIG_INET=y 286CONFIG_INET=y
267# CONFIG_IP_MULTICAST is not set 287# CONFIG_IP_MULTICAST is not set
268# CONFIG_IP_ADVANCED_ROUTER is not set 288# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -282,10 +302,13 @@ CONFIG_IP_PNP_DHCP=y
282# CONFIG_INET_TUNNEL is not set 302# CONFIG_INET_TUNNEL is not set
283CONFIG_INET_XFRM_MODE_TRANSPORT=y 303CONFIG_INET_XFRM_MODE_TRANSPORT=y
284CONFIG_INET_XFRM_MODE_TUNNEL=y 304CONFIG_INET_XFRM_MODE_TUNNEL=y
305CONFIG_INET_XFRM_MODE_BEET=y
285CONFIG_INET_DIAG=y 306CONFIG_INET_DIAG=y
286CONFIG_INET_TCP_DIAG=y 307CONFIG_INET_TCP_DIAG=y
287# CONFIG_TCP_CONG_ADVANCED is not set 308# CONFIG_TCP_CONG_ADVANCED is not set
288CONFIG_TCP_CONG_BIC=y 309CONFIG_TCP_CONG_CUBIC=y
310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
289# CONFIG_IPV6 is not set 312# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set 313# CONFIG_INET6_XFRM_TUNNEL is not set
291# CONFIG_INET6_TUNNEL is not set 314# CONFIG_INET6_TUNNEL is not set
@@ -315,7 +338,6 @@ CONFIG_NETWORK_SECMARK=y
315# CONFIG_ATALK is not set 338# CONFIG_ATALK is not set
316# CONFIG_X25 is not set 339# CONFIG_X25 is not set
317# CONFIG_LAPB is not set 340# CONFIG_LAPB is not set
318# CONFIG_NET_DIVERT is not set
319# CONFIG_ECONET is not set 341# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set 342# CONFIG_WAN_ROUTER is not set
321 343
@@ -370,6 +392,7 @@ CONFIG_PROC_EVENTS=y
370# 392#
371# Plug and Play support 393# Plug and Play support
372# 394#
395# CONFIG_PNPACPI is not set
373 396
374# 397#
375# Block devices 398# Block devices
@@ -390,6 +413,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
390CONFIG_ATA_OVER_ETH=y 413CONFIG_ATA_OVER_ETH=y
391 414
392# 415#
416# Misc devices
417#
418CONFIG_SGI_IOC4=y
419# CONFIG_TIFM_CORE is not set
420
421#
393# ATA/ATAPI/MFM/RLL support 422# ATA/ATAPI/MFM/RLL support
394# 423#
395# CONFIG_IDE is not set 424# CONFIG_IDE is not set
@@ -399,6 +428,12 @@ CONFIG_ATA_OVER_ETH=y
399# 428#
400CONFIG_RAID_ATTRS=y 429CONFIG_RAID_ATTRS=y
401# CONFIG_SCSI is not set 430# CONFIG_SCSI is not set
431# CONFIG_SCSI_NETLINK is not set
432
433#
434# Serial ATA (prod) and Parallel ATA (experimental) drivers
435#
436# CONFIG_ATA is not set
402 437
403# 438#
404# Multi-device support (RAID and LVM) 439# Multi-device support (RAID and LVM)
@@ -449,6 +484,8 @@ CONFIG_LXT_PHY=y
449CONFIG_CICADA_PHY=y 484CONFIG_CICADA_PHY=y
450CONFIG_VITESSE_PHY=y 485CONFIG_VITESSE_PHY=y
451CONFIG_SMSC_PHY=y 486CONFIG_SMSC_PHY=y
487# CONFIG_BROADCOM_PHY is not set
488# CONFIG_FIXED_PHY is not set
452 489
453# 490#
454# Ethernet (10 or 100Mbit) 491# Ethernet (10 or 100Mbit)
@@ -485,14 +522,18 @@ CONFIG_GALILEO_64240_ETH=y
485# CONFIG_SK98LIN is not set 522# CONFIG_SK98LIN is not set
486# CONFIG_TIGON3 is not set 523# CONFIG_TIGON3 is not set
487# CONFIG_BNX2 is not set 524# CONFIG_BNX2 is not set
525CONFIG_QLA3XXX=y
526# CONFIG_ATL1 is not set
488 527
489# 528#
490# Ethernet (10000 Mbit) 529# Ethernet (10000 Mbit)
491# 530#
492# CONFIG_CHELSIO_T1 is not set 531# CONFIG_CHELSIO_T1 is not set
532CONFIG_CHELSIO_T3=y
493# CONFIG_IXGB is not set 533# CONFIG_IXGB is not set
494# CONFIG_S2IO is not set 534# CONFIG_S2IO is not set
495# CONFIG_MYRI10GE is not set 535# CONFIG_MYRI10GE is not set
536CONFIG_NETXEN_NIC=y
496 537
497# 538#
498# Token Ring devices 539# Token Ring devices
@@ -531,6 +572,7 @@ CONFIG_GALILEO_64240_ETH=y
531# Input device support 572# Input device support
532# 573#
533CONFIG_INPUT=y 574CONFIG_INPUT=y
575# CONFIG_INPUT_FF_MEMLESS is not set
534 576
535# 577#
536# Userland interfaces 578# Userland interfaces
@@ -608,10 +650,6 @@ CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_DTLK is not set 650# CONFIG_DTLK is not set
609# CONFIG_R3964 is not set 651# CONFIG_R3964 is not set
610# CONFIG_APPLICOM is not set 652# CONFIG_APPLICOM is not set
611
612#
613# Ftape, the floppy tape device driver
614#
615# CONFIG_DRM is not set 653# CONFIG_DRM is not set
616# CONFIG_RAW_DRIVER is not set 654# CONFIG_RAW_DRIVER is not set
617 655
@@ -619,7 +657,6 @@ CONFIG_LEGACY_PTY_COUNT=256
619# TPM devices 657# TPM devices
620# 658#
621# CONFIG_TCG_TPM is not set 659# CONFIG_TCG_TPM is not set
622# CONFIG_TELCLOCK is not set
623 660
624# 661#
625# I2C support 662# I2C support
@@ -644,14 +681,9 @@ CONFIG_LEGACY_PTY_COUNT=256
644# CONFIG_HWMON_VID is not set 681# CONFIG_HWMON_VID is not set
645 682
646# 683#
647# Misc devices
648#
649
650#
651# Multimedia devices 684# Multimedia devices
652# 685#
653# CONFIG_VIDEO_DEV is not set 686# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y
655 687
656# 688#
657# Digital Video Broadcasting Devices 689# Digital Video Broadcasting Devices
@@ -669,6 +701,7 @@ CONFIG_VIDEO_V4L2=y
669# 701#
670# CONFIG_VGA_CONSOLE is not set 702# CONFIG_VGA_CONSOLE is not set
671CONFIG_DUMMY_CONSOLE=y 703CONFIG_DUMMY_CONSOLE=y
704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
672 705
673# 706#
674# Sound 707# Sound
@@ -676,6 +709,11 @@ CONFIG_DUMMY_CONSOLE=y
676# CONFIG_SOUND is not set 709# CONFIG_SOUND is not set
677 710
678# 711#
712# HID Devices
713#
714# CONFIG_HID is not set
715
716#
679# USB support 717# USB support
680# 718#
681CONFIG_USB_ARCH_HAS_HCD=y 719CONFIG_USB_ARCH_HAS_HCD=y
@@ -738,16 +776,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
738# 776#
739 777
740# 778#
779# Auxiliary Display support
780#
781
782#
783# Virtualization
784#
785
786#
741# File systems 787# File systems
742# 788#
743CONFIG_EXT2_FS=y 789CONFIG_EXT2_FS=y
744# CONFIG_EXT2_FS_XATTR is not set 790# CONFIG_EXT2_FS_XATTR is not set
745# CONFIG_EXT2_FS_XIP is not set 791# CONFIG_EXT2_FS_XIP is not set
746# CONFIG_EXT3_FS is not set 792# CONFIG_EXT3_FS is not set
793# CONFIG_EXT4DEV_FS is not set
747# CONFIG_REISERFS_FS is not set 794# CONFIG_REISERFS_FS is not set
748# CONFIG_JFS_FS is not set 795# CONFIG_JFS_FS is not set
749# CONFIG_FS_POSIX_ACL is not set 796CONFIG_FS_POSIX_ACL=y
750# CONFIG_XFS_FS is not set 797# CONFIG_XFS_FS is not set
798# CONFIG_GFS2_FS is not set
751# CONFIG_OCFS2_FS is not set 799# CONFIG_OCFS2_FS is not set
752# CONFIG_MINIX_FS is not set 800# CONFIG_MINIX_FS is not set
753# CONFIG_ROMFS_FS is not set 801# CONFIG_ROMFS_FS is not set
@@ -758,6 +806,7 @@ CONFIG_DNOTIFY=y
758# CONFIG_AUTOFS_FS is not set 806# CONFIG_AUTOFS_FS is not set
759# CONFIG_AUTOFS4_FS is not set 807# CONFIG_AUTOFS4_FS is not set
760CONFIG_FUSE_FS=y 808CONFIG_FUSE_FS=y
809CONFIG_GENERIC_ACL=y
761 810
762# 811#
763# CD-ROM/DVD Filesystems 812# CD-ROM/DVD Filesystems
@@ -777,17 +826,20 @@ CONFIG_FUSE_FS=y
777# 826#
778CONFIG_PROC_FS=y 827CONFIG_PROC_FS=y
779CONFIG_PROC_KCORE=y 828CONFIG_PROC_KCORE=y
829CONFIG_PROC_SYSCTL=y
780CONFIG_SYSFS=y 830CONFIG_SYSFS=y
781CONFIG_TMPFS=y 831CONFIG_TMPFS=y
832CONFIG_TMPFS_POSIX_ACL=y
782# CONFIG_HUGETLB_PAGE is not set 833# CONFIG_HUGETLB_PAGE is not set
783CONFIG_RAMFS=y 834CONFIG_RAMFS=y
784# CONFIG_CONFIGFS_FS is not set 835CONFIG_CONFIGFS_FS=y
785 836
786# 837#
787# Miscellaneous filesystems 838# Miscellaneous filesystems
788# 839#
789# CONFIG_ADFS_FS is not set 840# CONFIG_ADFS_FS is not set
790# CONFIG_AFFS_FS is not set 841# CONFIG_AFFS_FS is not set
842# CONFIG_ECRYPT_FS is not set
791# CONFIG_HFS_FS is not set 843# CONFIG_HFS_FS is not set
792# CONFIG_HFSPLUS_FS is not set 844# CONFIG_HFSPLUS_FS is not set
793# CONFIG_BEFS_FS is not set 845# CONFIG_BEFS_FS is not set
@@ -819,7 +871,6 @@ CONFIG_SUNRPC=y
819# CONFIG_RPCSEC_GSS_SPKM3 is not set 871# CONFIG_RPCSEC_GSS_SPKM3 is not set
820# CONFIG_SMB_FS is not set 872# CONFIG_SMB_FS is not set
821# CONFIG_CIFS is not set 873# CONFIG_CIFS is not set
822# CONFIG_CIFS_DEBUG2 is not set
823# CONFIG_NCP_FS is not set 874# CONFIG_NCP_FS is not set
824# CONFIG_CODA_FS is not set 875# CONFIG_CODA_FS is not set
825# CONFIG_AFS_FS is not set 876# CONFIG_AFS_FS is not set
@@ -837,6 +888,14 @@ CONFIG_MSDOS_PARTITION=y
837# CONFIG_NLS is not set 888# CONFIG_NLS is not set
838 889
839# 890#
891# Distributed Lock Manager
892#
893CONFIG_DLM=y
894CONFIG_DLM_TCP=y
895# CONFIG_DLM_SCTP is not set
896# CONFIG_DLM_DEBUG is not set
897
898#
840# Profiling support 899# Profiling support
841# 900#
842# CONFIG_PROFILING is not set 901# CONFIG_PROFILING is not set
@@ -846,12 +905,13 @@ CONFIG_MSDOS_PARTITION=y
846# 905#
847CONFIG_TRACE_IRQFLAGS_SUPPORT=y 906CONFIG_TRACE_IRQFLAGS_SUPPORT=y
848# CONFIG_PRINTK_TIME is not set 907# CONFIG_PRINTK_TIME is not set
908CONFIG_ENABLE_MUST_CHECK=y
849# CONFIG_MAGIC_SYSRQ is not set 909# CONFIG_MAGIC_SYSRQ is not set
850# CONFIG_UNUSED_SYMBOLS is not set 910# CONFIG_UNUSED_SYMBOLS is not set
911# CONFIG_DEBUG_FS is not set
912# CONFIG_HEADERS_CHECK is not set
851# CONFIG_DEBUG_KERNEL is not set 913# CONFIG_DEBUG_KERNEL is not set
852CONFIG_LOG_BUF_SHIFT=14 914CONFIG_LOG_BUF_SHIFT=14
853# CONFIG_DEBUG_FS is not set
854# CONFIG_UNWIND_INFO is not set
855CONFIG_CROSSCOMPILE=y 915CONFIG_CROSSCOMPILE=y
856CONFIG_CMDLINE="" 916CONFIG_CMDLINE=""
857 917
@@ -866,7 +926,12 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
866# Cryptographic options 926# Cryptographic options
867# 927#
868CONFIG_CRYPTO=y 928CONFIG_CRYPTO=y
929CONFIG_CRYPTO_ALGAPI=y
930CONFIG_CRYPTO_BLKCIPHER=y
931CONFIG_CRYPTO_HASH=y
932CONFIG_CRYPTO_MANAGER=y
869CONFIG_CRYPTO_HMAC=y 933CONFIG_CRYPTO_HMAC=y
934CONFIG_CRYPTO_XCBC=y
870CONFIG_CRYPTO_NULL=y 935CONFIG_CRYPTO_NULL=y
871CONFIG_CRYPTO_MD4=y 936CONFIG_CRYPTO_MD4=y
872CONFIG_CRYPTO_MD5=y 937CONFIG_CRYPTO_MD5=y
@@ -875,9 +940,16 @@ CONFIG_CRYPTO_SHA256=y
875CONFIG_CRYPTO_SHA512=y 940CONFIG_CRYPTO_SHA512=y
876CONFIG_CRYPTO_WP512=y 941CONFIG_CRYPTO_WP512=y
877CONFIG_CRYPTO_TGR192=y 942CONFIG_CRYPTO_TGR192=y
943CONFIG_CRYPTO_GF128MUL=y
944CONFIG_CRYPTO_ECB=y
945CONFIG_CRYPTO_CBC=y
946CONFIG_CRYPTO_PCBC=y
947CONFIG_CRYPTO_LRW=y
878CONFIG_CRYPTO_DES=y 948CONFIG_CRYPTO_DES=y
949CONFIG_CRYPTO_FCRYPT=y
879CONFIG_CRYPTO_BLOWFISH=y 950CONFIG_CRYPTO_BLOWFISH=y
880CONFIG_CRYPTO_TWOFISH=y 951CONFIG_CRYPTO_TWOFISH=y
952CONFIG_CRYPTO_TWOFISH_COMMON=y
881CONFIG_CRYPTO_SERPENT=y 953CONFIG_CRYPTO_SERPENT=y
882CONFIG_CRYPTO_AES=y 954CONFIG_CRYPTO_AES=y
883CONFIG_CRYPTO_CAST5=y 955CONFIG_CRYPTO_CAST5=y
@@ -889,6 +961,7 @@ CONFIG_CRYPTO_ANUBIS=y
889CONFIG_CRYPTO_DEFLATE=y 961CONFIG_CRYPTO_DEFLATE=y
890CONFIG_CRYPTO_MICHAEL_MIC=y 962CONFIG_CRYPTO_MICHAEL_MIC=y
891CONFIG_CRYPTO_CRC32C=y 963CONFIG_CRYPTO_CRC32C=y
964CONFIG_CRYPTO_CAMELLIA=y
892 965
893# 966#
894# Hardware crypto devices 967# Hardware crypto devices
@@ -897,6 +970,7 @@ CONFIG_CRYPTO_CRC32C=y
897# 970#
898# Library routines 971# Library routines
899# 972#
973CONFIG_BITREVERSE=y
900# CONFIG_CRC_CCITT is not set 974# CONFIG_CRC_CCITT is not set
901CONFIG_CRC16=y 975CONFIG_CRC16=y
902CONFIG_CRC32=y 976CONFIG_CRC32=y
@@ -904,3 +978,5 @@ CONFIG_LIBCRC32C=y
904CONFIG_ZLIB_INFLATE=y 978CONFIG_ZLIB_INFLATE=y
905CONFIG_ZLIB_DEFLATE=y 979CONFIG_ZLIB_DEFLATE=y
906CONFIG_PLIST=y 980CONFIG_PLIST=y
981CONFIG_HAS_IOMEM=y
982CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 7d3c688181d5..33fcc8133bc0 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:17 2006 4# Tue Feb 20 21:47:37 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_PB1100=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_PB1100=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,14 +64,19 @@ CONFIG_MIPS_PB1100=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
74CONFIG_CPU_LITTLE_ENDIAN=y 78CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_APM_EMULATION=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1100=y 81CONFIG_SOC_AU1100=y
77CONFIG_SOC_AU1X00=y 82CONFIG_SOC_AU1X00=y
@@ -117,8 +122,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 123CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 124CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 127# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_64BIT_PHYS_ADDR=y 128CONFIG_64BIT_PHYS_ADDR=y
124CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
@@ -136,6 +141,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 143# CONFIG_RESOURCES_64BIT is not set
144CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 145# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 146# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 147# CONFIG_HZ_128 is not set
@@ -148,6 +154,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 154CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 155# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 158CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 159CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,15 +173,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 173CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 174CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 178# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 179# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y 180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
174CONFIG_RELAY=y 185CONFIG_RELAY=y
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -182,12 +194,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 194CONFIG_BUG=y
183CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 197CONFIG_FUTEX=y
187CONFIG_EPOLL=y 198CONFIG_EPOLL=y
188CONFIG_SHMEM=y 199CONFIG_SHMEM=y
189CONFIG_SLAB=y 200CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -205,6 +217,7 @@ CONFIG_KMOD=y
205# 217#
206# Block layer 218# Block layer
207# 219#
220CONFIG_BLOCK=y
208# CONFIG_LBD is not set 221# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -253,6 +266,10 @@ CONFIG_PCMCIA_IOCTL=y
253CONFIG_BINFMT_ELF=y 266CONFIG_BINFMT_ELF=y
254# CONFIG_BINFMT_MISC is not set 267# CONFIG_BINFMT_MISC is not set
255CONFIG_TRAD_SIGNALS=y 268CONFIG_TRAD_SIGNALS=y
269
270#
271# Power management options
272#
256# CONFIG_PM is not set 273# CONFIG_PM is not set
257 274
258# 275#
@@ -269,7 +286,10 @@ CONFIG_PACKET=y
269CONFIG_UNIX=y 286CONFIG_UNIX=y
270CONFIG_XFRM=y 287CONFIG_XFRM=y
271CONFIG_XFRM_USER=m 288CONFIG_XFRM_USER=m
289# CONFIG_XFRM_SUB_POLICY is not set
290CONFIG_XFRM_MIGRATE=y
272CONFIG_NET_KEY=y 291CONFIG_NET_KEY=y
292CONFIG_NET_KEY_MIGRATE=y
273CONFIG_INET=y 293CONFIG_INET=y
274CONFIG_IP_MULTICAST=y 294CONFIG_IP_MULTICAST=y
275# CONFIG_IP_ADVANCED_ROUTER is not set 295# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -290,10 +310,13 @@ CONFIG_IP_PNP_BOOTP=y
290# CONFIG_INET_TUNNEL is not set 310# CONFIG_INET_TUNNEL is not set
291CONFIG_INET_XFRM_MODE_TRANSPORT=m 311CONFIG_INET_XFRM_MODE_TRANSPORT=m
292CONFIG_INET_XFRM_MODE_TUNNEL=m 312CONFIG_INET_XFRM_MODE_TUNNEL=m
313CONFIG_INET_XFRM_MODE_BEET=m
293CONFIG_INET_DIAG=y 314CONFIG_INET_DIAG=y
294CONFIG_INET_TCP_DIAG=y 315CONFIG_INET_TCP_DIAG=y
295# CONFIG_TCP_CONG_ADVANCED is not set 316# CONFIG_TCP_CONG_ADVANCED is not set
296CONFIG_TCP_CONG_BIC=y 317CONFIG_TCP_CONG_CUBIC=y
318CONFIG_DEFAULT_TCP_CONG="cubic"
319CONFIG_TCP_MD5SIG=y
297 320
298# 321#
299# IP: Virtual Server Configuration 322# IP: Virtual Server Configuration
@@ -312,15 +335,42 @@ CONFIG_NETFILTER=y
312CONFIG_NETFILTER_NETLINK=m 335CONFIG_NETFILTER_NETLINK=m
313CONFIG_NETFILTER_NETLINK_QUEUE=m 336CONFIG_NETFILTER_NETLINK_QUEUE=m
314CONFIG_NETFILTER_NETLINK_LOG=m 337CONFIG_NETFILTER_NETLINK_LOG=m
315# CONFIG_NF_CONNTRACK is not set 338CONFIG_NF_CONNTRACK_ENABLED=m
339CONFIG_NF_CONNTRACK_SUPPORT=y
340# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
341CONFIG_NF_CONNTRACK=m
342CONFIG_NF_CT_ACCT=y
343CONFIG_NF_CONNTRACK_MARK=y
344CONFIG_NF_CONNTRACK_SECMARK=y
345CONFIG_NF_CONNTRACK_EVENTS=y
346CONFIG_NF_CT_PROTO_GRE=m
347CONFIG_NF_CT_PROTO_SCTP=m
348CONFIG_NF_CONNTRACK_AMANDA=m
349CONFIG_NF_CONNTRACK_FTP=m
350CONFIG_NF_CONNTRACK_H323=m
351CONFIG_NF_CONNTRACK_IRC=m
352# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
353CONFIG_NF_CONNTRACK_PPTP=m
354CONFIG_NF_CONNTRACK_SANE=m
355CONFIG_NF_CONNTRACK_SIP=m
356CONFIG_NF_CONNTRACK_TFTP=m
357CONFIG_NF_CT_NETLINK=m
316CONFIG_NETFILTER_XTABLES=m 358CONFIG_NETFILTER_XTABLES=m
317CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 359CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
318CONFIG_NETFILTER_XT_TARGET_MARK=m 360CONFIG_NETFILTER_XT_TARGET_MARK=m
319CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 361CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
362CONFIG_NETFILTER_XT_TARGET_NFLOG=m
320CONFIG_NETFILTER_XT_TARGET_SECMARK=m 363CONFIG_NETFILTER_XT_TARGET_SECMARK=m
364CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
365CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
321CONFIG_NETFILTER_XT_MATCH_COMMENT=m 366CONFIG_NETFILTER_XT_MATCH_COMMENT=m
367CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
368CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
369CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
322CONFIG_NETFILTER_XT_MATCH_DCCP=m 370CONFIG_NETFILTER_XT_MATCH_DCCP=m
371CONFIG_NETFILTER_XT_MATCH_DSCP=m
323CONFIG_NETFILTER_XT_MATCH_ESP=m 372CONFIG_NETFILTER_XT_MATCH_ESP=m
373CONFIG_NETFILTER_XT_MATCH_HELPER=m
324CONFIG_NETFILTER_XT_MATCH_LENGTH=m 374CONFIG_NETFILTER_XT_MATCH_LENGTH=m
325CONFIG_NETFILTER_XT_MATCH_LIMIT=m 375CONFIG_NETFILTER_XT_MATCH_LIMIT=m
326CONFIG_NETFILTER_XT_MATCH_MAC=m 376CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -331,14 +381,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
331CONFIG_NETFILTER_XT_MATCH_QUOTA=m 381CONFIG_NETFILTER_XT_MATCH_QUOTA=m
332CONFIG_NETFILTER_XT_MATCH_REALM=m 382CONFIG_NETFILTER_XT_MATCH_REALM=m
333CONFIG_NETFILTER_XT_MATCH_SCTP=m 383CONFIG_NETFILTER_XT_MATCH_SCTP=m
384CONFIG_NETFILTER_XT_MATCH_STATE=m
334CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 385CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
335CONFIG_NETFILTER_XT_MATCH_STRING=m 386CONFIG_NETFILTER_XT_MATCH_STRING=m
336CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 387CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
388CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
337 389
338# 390#
339# IP: Netfilter Configuration 391# IP: Netfilter Configuration
340# 392#
341# CONFIG_IP_NF_CONNTRACK is not set 393CONFIG_NF_CONNTRACK_IPV4=m
394CONFIG_NF_CONNTRACK_PROC_COMPAT=y
342# CONFIG_IP_NF_QUEUE is not set 395# CONFIG_IP_NF_QUEUE is not set
343# CONFIG_IP_NF_IPTABLES is not set 396# CONFIG_IP_NF_IPTABLES is not set
344# CONFIG_IP_NF_ARPTABLES is not set 397# CONFIG_IP_NF_ARPTABLES is not set
@@ -366,7 +419,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
366# CONFIG_ATALK is not set 419# CONFIG_ATALK is not set
367# CONFIG_X25 is not set 420# CONFIG_X25 is not set
368# CONFIG_LAPB is not set 421# CONFIG_LAPB is not set
369# CONFIG_NET_DIVERT is not set
370# CONFIG_ECONET is not set 422# CONFIG_ECONET is not set
371# CONFIG_WAN_ROUTER is not set 423# CONFIG_WAN_ROUTER is not set
372 424
@@ -422,11 +474,13 @@ CONFIG_MTD_PARTITIONS=y
422# User Modules And Translation Layers 474# User Modules And Translation Layers
423# 475#
424CONFIG_MTD_CHAR=y 476CONFIG_MTD_CHAR=y
477CONFIG_MTD_BLKDEVS=y
425CONFIG_MTD_BLOCK=y 478CONFIG_MTD_BLOCK=y
426# CONFIG_FTL is not set 479# CONFIG_FTL is not set
427# CONFIG_NFTL is not set 480# CONFIG_NFTL is not set
428# CONFIG_INFTL is not set 481# CONFIG_INFTL is not set
429# CONFIG_RFD_FTL is not set 482# CONFIG_RFD_FTL is not set
483# CONFIG_SSFDC is not set
430 484
431# 485#
432# RAM/ROM/Flash chip drivers 486# RAM/ROM/Flash chip drivers
@@ -495,6 +549,7 @@ CONFIG_MTD_ALCHEMY=y
495# 549#
496# Plug and Play support 550# Plug and Play support
497# 551#
552# CONFIG_PNPACPI is not set
498 553
499# 554#
500# Block devices 555# Block devices
@@ -511,6 +566,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
511CONFIG_ATA_OVER_ETH=m 566CONFIG_ATA_OVER_ETH=m
512 567
513# 568#
569# Misc devices
570#
571
572#
514# ATA/ATAPI/MFM/RLL support 573# ATA/ATAPI/MFM/RLL support
515# 574#
516# CONFIG_IDE is not set 575# CONFIG_IDE is not set
@@ -520,6 +579,12 @@ CONFIG_ATA_OVER_ETH=m
520# 579#
521CONFIG_RAID_ATTRS=m 580CONFIG_RAID_ATTRS=m
522# CONFIG_SCSI is not set 581# CONFIG_SCSI is not set
582# CONFIG_SCSI_NETLINK is not set
583
584#
585# Serial ATA (prod) and Parallel ATA (experimental) drivers
586#
587# CONFIG_ATA is not set
523 588
524# 589#
525# Multi-device support (RAID and LVM) 590# Multi-device support (RAID and LVM)
@@ -563,6 +628,8 @@ CONFIG_LXT_PHY=m
563CONFIG_CICADA_PHY=m 628CONFIG_CICADA_PHY=m
564CONFIG_VITESSE_PHY=m 629CONFIG_VITESSE_PHY=m
565CONFIG_SMSC_PHY=m 630CONFIG_SMSC_PHY=m
631# CONFIG_BROADCOM_PHY is not set
632# CONFIG_FIXED_PHY is not set
566 633
567# 634#
568# Ethernet (10 or 100Mbit) 635# Ethernet (10 or 100Mbit)
@@ -609,6 +676,7 @@ CONFIG_PPP_DEFLATE=m
609CONFIG_PPP_MPPE=m 676CONFIG_PPP_MPPE=m
610CONFIG_PPPOE=m 677CONFIG_PPPOE=m
611# CONFIG_SLIP is not set 678# CONFIG_SLIP is not set
679CONFIG_SLHC=m
612# CONFIG_SHAPER is not set 680# CONFIG_SHAPER is not set
613# CONFIG_NETCONSOLE is not set 681# CONFIG_NETCONSOLE is not set
614# CONFIG_NETPOLL is not set 682# CONFIG_NETPOLL is not set
@@ -628,6 +696,7 @@ CONFIG_PPPOE=m
628# Input device support 696# Input device support
629# 697#
630CONFIG_INPUT=y 698CONFIG_INPUT=y
699# CONFIG_INPUT_FF_MEMLESS is not set
631 700
632# 701#
633# Userland interfaces 702# Userland interfaces
@@ -707,10 +776,6 @@ CONFIG_LEGACY_PTY_COUNT=256
707# CONFIG_R3964 is not set 776# CONFIG_R3964 is not set
708 777
709# 778#
710# Ftape, the floppy tape device driver
711#
712
713#
714# PCMCIA character devices 779# PCMCIA character devices
715# 780#
716CONFIG_SYNCLINK_CS=m 781CONFIG_SYNCLINK_CS=m
@@ -722,7 +787,6 @@ CONFIG_SYNCLINK_CS=m
722# TPM devices 787# TPM devices
723# 788#
724# CONFIG_TCG_TPM is not set 789# CONFIG_TCG_TPM is not set
725# CONFIG_TELCLOCK is not set
726 790
727# 791#
728# I2C support 792# I2C support
@@ -747,14 +811,9 @@ CONFIG_SYNCLINK_CS=m
747# CONFIG_HWMON_VID is not set 811# CONFIG_HWMON_VID is not set
748 812
749# 813#
750# Misc devices
751#
752
753#
754# Multimedia devices 814# Multimedia devices
755# 815#
756# CONFIG_VIDEO_DEV is not set 816# CONFIG_VIDEO_DEV is not set
757CONFIG_VIDEO_V4L2=y
758 817
759# 818#
760# Digital Video Broadcasting Devices 819# Digital Video Broadcasting Devices
@@ -772,6 +831,7 @@ CONFIG_VIDEO_V4L2=y
772# 831#
773# CONFIG_VGA_CONSOLE is not set 832# CONFIG_VGA_CONSOLE is not set
774CONFIG_DUMMY_CONSOLE=y 833CONFIG_DUMMY_CONSOLE=y
834# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
775 835
776# 836#
777# Sound 837# Sound
@@ -779,6 +839,11 @@ CONFIG_DUMMY_CONSOLE=y
779# CONFIG_SOUND is not set 839# CONFIG_SOUND is not set
780 840
781# 841#
842# HID Devices
843#
844# CONFIG_HID is not set
845
846#
782# USB support 847# USB support
783# 848#
784CONFIG_USB_ARCH_HAS_HCD=y 849CONFIG_USB_ARCH_HAS_HCD=y
@@ -840,6 +905,14 @@ CONFIG_USB_ARCH_HAS_OHCI=y
840# 905#
841 906
842# 907#
908# Auxiliary Display support
909#
910
911#
912# Virtualization
913#
914
915#
843# File systems 916# File systems
844# 917#
845CONFIG_EXT2_FS=y 918CONFIG_EXT2_FS=y
@@ -851,6 +924,7 @@ CONFIG_EXT3_FS=y
851CONFIG_EXT3_FS_XATTR=y 924CONFIG_EXT3_FS_XATTR=y
852CONFIG_EXT3_FS_POSIX_ACL=y 925CONFIG_EXT3_FS_POSIX_ACL=y
853CONFIG_EXT3_FS_SECURITY=y 926CONFIG_EXT3_FS_SECURITY=y
927# CONFIG_EXT4DEV_FS is not set
854CONFIG_JBD=y 928CONFIG_JBD=y
855# CONFIG_JBD_DEBUG is not set 929# CONFIG_JBD_DEBUG is not set
856CONFIG_FS_MBCACHE=y 930CONFIG_FS_MBCACHE=y
@@ -863,6 +937,7 @@ CONFIG_REISERFS_FS_SECURITY=y
863# CONFIG_JFS_FS is not set 937# CONFIG_JFS_FS is not set
864CONFIG_FS_POSIX_ACL=y 938CONFIG_FS_POSIX_ACL=y
865# CONFIG_XFS_FS is not set 939# CONFIG_XFS_FS is not set
940# CONFIG_GFS2_FS is not set
866# CONFIG_OCFS2_FS is not set 941# CONFIG_OCFS2_FS is not set
867# CONFIG_MINIX_FS is not set 942# CONFIG_MINIX_FS is not set
868# CONFIG_ROMFS_FS is not set 943# CONFIG_ROMFS_FS is not set
@@ -873,6 +948,7 @@ CONFIG_DNOTIFY=y
873CONFIG_AUTOFS_FS=m 948CONFIG_AUTOFS_FS=m
874CONFIG_AUTOFS4_FS=m 949CONFIG_AUTOFS4_FS=m
875CONFIG_FUSE_FS=m 950CONFIG_FUSE_FS=m
951CONFIG_GENERIC_ACL=y
876 952
877# 953#
878# CD-ROM/DVD Filesystems 954# CD-ROM/DVD Filesystems
@@ -892,23 +968,25 @@ CONFIG_FUSE_FS=m
892# 968#
893CONFIG_PROC_FS=y 969CONFIG_PROC_FS=y
894CONFIG_PROC_KCORE=y 970CONFIG_PROC_KCORE=y
971CONFIG_PROC_SYSCTL=y
895CONFIG_SYSFS=y 972CONFIG_SYSFS=y
896CONFIG_TMPFS=y 973CONFIG_TMPFS=y
974CONFIG_TMPFS_POSIX_ACL=y
897# CONFIG_HUGETLB_PAGE is not set 975# CONFIG_HUGETLB_PAGE is not set
898CONFIG_RAMFS=y 976CONFIG_RAMFS=y
899# CONFIG_CONFIGFS_FS is not set 977CONFIG_CONFIGFS_FS=m
900 978
901# 979#
902# Miscellaneous filesystems 980# Miscellaneous filesystems
903# 981#
904# CONFIG_ADFS_FS is not set 982# CONFIG_ADFS_FS is not set
905# CONFIG_AFFS_FS is not set 983# CONFIG_AFFS_FS is not set
984# CONFIG_ECRYPT_FS is not set
906# CONFIG_HFS_FS is not set 985# CONFIG_HFS_FS is not set
907# CONFIG_HFSPLUS_FS is not set 986# CONFIG_HFSPLUS_FS is not set
908# CONFIG_BEFS_FS is not set 987# CONFIG_BEFS_FS is not set
909# CONFIG_BFS_FS is not set 988# CONFIG_BFS_FS is not set
910# CONFIG_EFS_FS is not set 989# CONFIG_EFS_FS is not set
911# CONFIG_JFFS_FS is not set
912# CONFIG_JFFS2_FS is not set 990# CONFIG_JFFS2_FS is not set
913CONFIG_CRAMFS=m 991CONFIG_CRAMFS=m
914# CONFIG_VXFS_FS is not set 992# CONFIG_VXFS_FS is not set
@@ -937,7 +1015,6 @@ CONFIG_SUNRPC=y
937CONFIG_SMB_FS=m 1015CONFIG_SMB_FS=m
938# CONFIG_SMB_NLS_DEFAULT is not set 1016# CONFIG_SMB_NLS_DEFAULT is not set
939# CONFIG_CIFS is not set 1017# CONFIG_CIFS is not set
940# CONFIG_CIFS_DEBUG2 is not set
941# CONFIG_NCP_FS is not set 1018# CONFIG_NCP_FS is not set
942# CONFIG_CODA_FS is not set 1019# CONFIG_CODA_FS is not set
943# CONFIG_AFS_FS is not set 1020# CONFIG_AFS_FS is not set
@@ -994,6 +1071,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
994# CONFIG_NLS_UTF8 is not set 1071# CONFIG_NLS_UTF8 is not set
995 1072
996# 1073#
1074# Distributed Lock Manager
1075#
1076CONFIG_DLM=m
1077CONFIG_DLM_TCP=y
1078# CONFIG_DLM_SCTP is not set
1079# CONFIG_DLM_DEBUG is not set
1080
1081#
997# Profiling support 1082# Profiling support
998# 1083#
999# CONFIG_PROFILING is not set 1084# CONFIG_PROFILING is not set
@@ -1003,13 +1088,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1003# 1088#
1004CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1089CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1005# CONFIG_PRINTK_TIME is not set 1090# CONFIG_PRINTK_TIME is not set
1091CONFIG_ENABLE_MUST_CHECK=y
1006# CONFIG_MAGIC_SYSRQ is not set 1092# CONFIG_MAGIC_SYSRQ is not set
1007# CONFIG_UNUSED_SYMBOLS is not set 1093# CONFIG_UNUSED_SYMBOLS is not set
1094# CONFIG_DEBUG_FS is not set
1095# CONFIG_HEADERS_CHECK is not set
1008# CONFIG_DEBUG_KERNEL is not set 1096# CONFIG_DEBUG_KERNEL is not set
1009CONFIG_LOG_BUF_SHIFT=14 1097CONFIG_LOG_BUF_SHIFT=14
1010# CONFIG_DEBUG_FS is not set
1011CONFIG_CROSSCOMPILE=y 1098CONFIG_CROSSCOMPILE=y
1012CONFIG_CMDLINE="" 1099CONFIG_CMDLINE=""
1100CONFIG_SYS_SUPPORTS_KGDB=y
1013 1101
1014# 1102#
1015# Security options 1103# Security options
@@ -1022,18 +1110,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1022# Cryptographic options 1110# Cryptographic options
1023# 1111#
1024CONFIG_CRYPTO=y 1112CONFIG_CRYPTO=y
1113CONFIG_CRYPTO_ALGAPI=y
1114CONFIG_CRYPTO_BLKCIPHER=m
1115CONFIG_CRYPTO_HASH=y
1116CONFIG_CRYPTO_MANAGER=y
1025CONFIG_CRYPTO_HMAC=y 1117CONFIG_CRYPTO_HMAC=y
1118CONFIG_CRYPTO_XCBC=m
1026CONFIG_CRYPTO_NULL=m 1119CONFIG_CRYPTO_NULL=m
1027CONFIG_CRYPTO_MD4=m 1120CONFIG_CRYPTO_MD4=m
1028CONFIG_CRYPTO_MD5=m 1121CONFIG_CRYPTO_MD5=y
1029CONFIG_CRYPTO_SHA1=m 1122CONFIG_CRYPTO_SHA1=m
1030CONFIG_CRYPTO_SHA256=m 1123CONFIG_CRYPTO_SHA256=m
1031CONFIG_CRYPTO_SHA512=m 1124CONFIG_CRYPTO_SHA512=m
1032CONFIG_CRYPTO_WP512=m 1125CONFIG_CRYPTO_WP512=m
1033CONFIG_CRYPTO_TGR192=m 1126CONFIG_CRYPTO_TGR192=m
1127CONFIG_CRYPTO_GF128MUL=m
1128CONFIG_CRYPTO_ECB=m
1129CONFIG_CRYPTO_CBC=m
1130CONFIG_CRYPTO_PCBC=m
1131CONFIG_CRYPTO_LRW=m
1034CONFIG_CRYPTO_DES=m 1132CONFIG_CRYPTO_DES=m
1133CONFIG_CRYPTO_FCRYPT=m
1035CONFIG_CRYPTO_BLOWFISH=m 1134CONFIG_CRYPTO_BLOWFISH=m
1036CONFIG_CRYPTO_TWOFISH=m 1135CONFIG_CRYPTO_TWOFISH=m
1136CONFIG_CRYPTO_TWOFISH_COMMON=m
1037CONFIG_CRYPTO_SERPENT=m 1137CONFIG_CRYPTO_SERPENT=m
1038CONFIG_CRYPTO_AES=m 1138CONFIG_CRYPTO_AES=m
1039CONFIG_CRYPTO_CAST5=m 1139CONFIG_CRYPTO_CAST5=m
@@ -1045,6 +1145,7 @@ CONFIG_CRYPTO_ANUBIS=m
1045CONFIG_CRYPTO_DEFLATE=m 1145CONFIG_CRYPTO_DEFLATE=m
1046CONFIG_CRYPTO_MICHAEL_MIC=m 1146CONFIG_CRYPTO_MICHAEL_MIC=m
1047CONFIG_CRYPTO_CRC32C=m 1147CONFIG_CRYPTO_CRC32C=m
1148CONFIG_CRYPTO_CAMELLIA=m
1048# CONFIG_CRYPTO_TEST is not set 1149# CONFIG_CRYPTO_TEST is not set
1049 1150
1050# 1151#
@@ -1054,6 +1155,7 @@ CONFIG_CRYPTO_CRC32C=m
1054# 1155#
1055# Library routines 1156# Library routines
1056# 1157#
1158CONFIG_BITREVERSE=y
1057CONFIG_CRC_CCITT=m 1159CONFIG_CRC_CCITT=m
1058CONFIG_CRC16=m 1160CONFIG_CRC16=m
1059CONFIG_CRC32=y 1161CONFIG_CRC32=y
@@ -1065,3 +1167,5 @@ CONFIG_TEXTSEARCH_KMP=m
1065CONFIG_TEXTSEARCH_BM=m 1167CONFIG_TEXTSEARCH_BM=m
1066CONFIG_TEXTSEARCH_FSM=m 1168CONFIG_TEXTSEARCH_FSM=m
1067CONFIG_PLIST=y 1169CONFIG_PLIST=y
1170CONFIG_HAS_IOMEM=y
1171CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index a77805af0819..e07c55dc8dc1 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:17 2006 4# Tue Feb 20 21:47:37 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_PB1500=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_PB1500=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,14 +64,19 @@ CONFIG_MIPS_PB1500=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
74CONFIG_CPU_LITTLE_ENDIAN=y 78CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_APM_EMULATION=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1500=y 81CONFIG_SOC_AU1500=y
77CONFIG_SOC_AU1X00=y 82CONFIG_SOC_AU1X00=y
@@ -116,8 +121,8 @@ CONFIG_PAGE_SIZE_4KB=y
116# CONFIG_PAGE_SIZE_64KB is not set 121# CONFIG_PAGE_SIZE_64KB is not set
117CONFIG_CPU_HAS_PREFETCH=y 122CONFIG_CPU_HAS_PREFETCH=y
118CONFIG_MIPS_MT_DISABLED=y 123CONFIG_MIPS_MT_DISABLED=y
119# CONFIG_MIPS_MT_SMTC is not set
120# CONFIG_MIPS_MT_SMP is not set 124# CONFIG_MIPS_MT_SMP is not set
125# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_VPE_LOADER is not set 126# CONFIG_MIPS_VPE_LOADER is not set
122CONFIG_64BIT_PHYS_ADDR=y 127CONFIG_64BIT_PHYS_ADDR=y
123CONFIG_CPU_HAS_LLSC=y 128CONFIG_CPU_HAS_LLSC=y
@@ -134,7 +139,8 @@ CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y 139CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142CONFIG_RESOURCES_64BIT=y
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,15 +172,20 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
170CONFIG_SYSCTL=y 179# CONFIG_TASKSTATS is not set
180# CONFIG_UTS_NS is not set
171# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
172# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
173CONFIG_RELAY=y 184CONFIG_RELAY=y
174CONFIG_INITRAMFS_SOURCE=""
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
176CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
177CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
178# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
179CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
@@ -181,12 +193,12 @@ CONFIG_PRINTK=y
181CONFIG_BUG=y 193CONFIG_BUG=y
182CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
183CONFIG_BASE_FULL=y 195CONFIG_BASE_FULL=y
184CONFIG_RT_MUTEXES=y
185CONFIG_FUTEX=y 196CONFIG_FUTEX=y
186CONFIG_EPOLL=y 197CONFIG_EPOLL=y
187CONFIG_SHMEM=y 198CONFIG_SHMEM=y
188CONFIG_SLAB=y 199CONFIG_SLAB=y
189CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_RT_MUTEXES=y
190# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
191CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
192# CONFIG_SLOB is not set 204# CONFIG_SLOB is not set
@@ -204,6 +216,7 @@ CONFIG_KMOD=y
204# 216#
205# Block layer 217# Block layer
206# 218#
219CONFIG_BLOCK=y
207# CONFIG_LBD is not set 220# CONFIG_LBD is not set
208# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
209# CONFIG_LSF is not set 222# CONFIG_LSF is not set
@@ -258,6 +271,10 @@ CONFIG_PCCARD_NONSTATIC=m
258CONFIG_BINFMT_ELF=y 271CONFIG_BINFMT_ELF=y
259# CONFIG_BINFMT_MISC is not set 272# CONFIG_BINFMT_MISC is not set
260CONFIG_TRAD_SIGNALS=y 273CONFIG_TRAD_SIGNALS=y
274
275#
276# Power management options
277#
261# CONFIG_PM is not set 278# CONFIG_PM is not set
262 279
263# 280#
@@ -274,7 +291,10 @@ CONFIG_PACKET=y
274CONFIG_UNIX=y 291CONFIG_UNIX=y
275CONFIG_XFRM=y 292CONFIG_XFRM=y
276CONFIG_XFRM_USER=m 293CONFIG_XFRM_USER=m
294# CONFIG_XFRM_SUB_POLICY is not set
295CONFIG_XFRM_MIGRATE=y
277CONFIG_NET_KEY=y 296CONFIG_NET_KEY=y
297CONFIG_NET_KEY_MIGRATE=y
278CONFIG_INET=y 298CONFIG_INET=y
279CONFIG_IP_MULTICAST=y 299CONFIG_IP_MULTICAST=y
280# CONFIG_IP_ADVANCED_ROUTER is not set 300# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -295,10 +315,13 @@ CONFIG_IP_PNP_BOOTP=y
295# CONFIG_INET_TUNNEL is not set 315# CONFIG_INET_TUNNEL is not set
296CONFIG_INET_XFRM_MODE_TRANSPORT=m 316CONFIG_INET_XFRM_MODE_TRANSPORT=m
297CONFIG_INET_XFRM_MODE_TUNNEL=m 317CONFIG_INET_XFRM_MODE_TUNNEL=m
318CONFIG_INET_XFRM_MODE_BEET=m
298CONFIG_INET_DIAG=y 319CONFIG_INET_DIAG=y
299CONFIG_INET_TCP_DIAG=y 320CONFIG_INET_TCP_DIAG=y
300# CONFIG_TCP_CONG_ADVANCED is not set 321# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_BIC=y 322CONFIG_TCP_CONG_CUBIC=y
323CONFIG_DEFAULT_TCP_CONG="cubic"
324CONFIG_TCP_MD5SIG=y
302 325
303# 326#
304# IP: Virtual Server Configuration 327# IP: Virtual Server Configuration
@@ -317,15 +340,42 @@ CONFIG_NETFILTER=y
317CONFIG_NETFILTER_NETLINK=m 340CONFIG_NETFILTER_NETLINK=m
318CONFIG_NETFILTER_NETLINK_QUEUE=m 341CONFIG_NETFILTER_NETLINK_QUEUE=m
319CONFIG_NETFILTER_NETLINK_LOG=m 342CONFIG_NETFILTER_NETLINK_LOG=m
320# CONFIG_NF_CONNTRACK is not set 343CONFIG_NF_CONNTRACK_ENABLED=m
344CONFIG_NF_CONNTRACK_SUPPORT=y
345# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
346CONFIG_NF_CONNTRACK=m
347CONFIG_NF_CT_ACCT=y
348CONFIG_NF_CONNTRACK_MARK=y
349CONFIG_NF_CONNTRACK_SECMARK=y
350CONFIG_NF_CONNTRACK_EVENTS=y
351CONFIG_NF_CT_PROTO_GRE=m
352CONFIG_NF_CT_PROTO_SCTP=m
353CONFIG_NF_CONNTRACK_AMANDA=m
354CONFIG_NF_CONNTRACK_FTP=m
355CONFIG_NF_CONNTRACK_H323=m
356CONFIG_NF_CONNTRACK_IRC=m
357# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
358CONFIG_NF_CONNTRACK_PPTP=m
359CONFIG_NF_CONNTRACK_SANE=m
360CONFIG_NF_CONNTRACK_SIP=m
361CONFIG_NF_CONNTRACK_TFTP=m
362CONFIG_NF_CT_NETLINK=m
321CONFIG_NETFILTER_XTABLES=m 363CONFIG_NETFILTER_XTABLES=m
322CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 364CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
323CONFIG_NETFILTER_XT_TARGET_MARK=m 365CONFIG_NETFILTER_XT_TARGET_MARK=m
324CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 366CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
367CONFIG_NETFILTER_XT_TARGET_NFLOG=m
325CONFIG_NETFILTER_XT_TARGET_SECMARK=m 368CONFIG_NETFILTER_XT_TARGET_SECMARK=m
369CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
370CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
326CONFIG_NETFILTER_XT_MATCH_COMMENT=m 371CONFIG_NETFILTER_XT_MATCH_COMMENT=m
372CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
373CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
374CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
327CONFIG_NETFILTER_XT_MATCH_DCCP=m 375CONFIG_NETFILTER_XT_MATCH_DCCP=m
376CONFIG_NETFILTER_XT_MATCH_DSCP=m
328CONFIG_NETFILTER_XT_MATCH_ESP=m 377CONFIG_NETFILTER_XT_MATCH_ESP=m
378CONFIG_NETFILTER_XT_MATCH_HELPER=m
329CONFIG_NETFILTER_XT_MATCH_LENGTH=m 379CONFIG_NETFILTER_XT_MATCH_LENGTH=m
330CONFIG_NETFILTER_XT_MATCH_LIMIT=m 380CONFIG_NETFILTER_XT_MATCH_LIMIT=m
331CONFIG_NETFILTER_XT_MATCH_MAC=m 381CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -336,14 +386,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
336CONFIG_NETFILTER_XT_MATCH_QUOTA=m 386CONFIG_NETFILTER_XT_MATCH_QUOTA=m
337CONFIG_NETFILTER_XT_MATCH_REALM=m 387CONFIG_NETFILTER_XT_MATCH_REALM=m
338CONFIG_NETFILTER_XT_MATCH_SCTP=m 388CONFIG_NETFILTER_XT_MATCH_SCTP=m
389CONFIG_NETFILTER_XT_MATCH_STATE=m
339CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 390CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
340CONFIG_NETFILTER_XT_MATCH_STRING=m 391CONFIG_NETFILTER_XT_MATCH_STRING=m
341CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 392CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
393CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
342 394
343# 395#
344# IP: Netfilter Configuration 396# IP: Netfilter Configuration
345# 397#
346# CONFIG_IP_NF_CONNTRACK is not set 398CONFIG_NF_CONNTRACK_IPV4=m
399CONFIG_NF_CONNTRACK_PROC_COMPAT=y
347# CONFIG_IP_NF_QUEUE is not set 400# CONFIG_IP_NF_QUEUE is not set
348# CONFIG_IP_NF_IPTABLES is not set 401# CONFIG_IP_NF_IPTABLES is not set
349# CONFIG_IP_NF_ARPTABLES is not set 402# CONFIG_IP_NF_ARPTABLES is not set
@@ -371,7 +424,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
371# CONFIG_ATALK is not set 424# CONFIG_ATALK is not set
372# CONFIG_X25 is not set 425# CONFIG_X25 is not set
373# CONFIG_LAPB is not set 426# CONFIG_LAPB is not set
374# CONFIG_NET_DIVERT is not set
375# CONFIG_ECONET is not set 427# CONFIG_ECONET is not set
376# CONFIG_WAN_ROUTER is not set 428# CONFIG_WAN_ROUTER is not set
377 429
@@ -427,11 +479,13 @@ CONFIG_MTD_PARTITIONS=y
427# User Modules And Translation Layers 479# User Modules And Translation Layers
428# 480#
429CONFIG_MTD_CHAR=y 481CONFIG_MTD_CHAR=y
482CONFIG_MTD_BLKDEVS=y
430CONFIG_MTD_BLOCK=y 483CONFIG_MTD_BLOCK=y
431# CONFIG_FTL is not set 484# CONFIG_FTL is not set
432# CONFIG_NFTL is not set 485# CONFIG_NFTL is not set
433# CONFIG_INFTL is not set 486# CONFIG_INFTL is not set
434# CONFIG_RFD_FTL is not set 487# CONFIG_RFD_FTL is not set
488# CONFIG_SSFDC is not set
435 489
436# 490#
437# RAM/ROM/Flash chip drivers 491# RAM/ROM/Flash chip drivers
@@ -501,6 +555,7 @@ CONFIG_MTD_ALCHEMY=y
501# 555#
502# Plug and Play support 556# Plug and Play support
503# 557#
558# CONFIG_PNPACPI is not set
504 559
505# 560#
506# Block devices 561# Block devices
@@ -522,9 +577,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
522CONFIG_ATA_OVER_ETH=m 577CONFIG_ATA_OVER_ETH=m
523 578
524# 579#
580# Misc devices
581#
582CONFIG_SGI_IOC4=m
583# CONFIG_TIFM_CORE is not set
584
585#
525# ATA/ATAPI/MFM/RLL support 586# ATA/ATAPI/MFM/RLL support
526# 587#
527CONFIG_IDE=y 588CONFIG_IDE=y
589CONFIG_IDE_MAX_HWIFS=4
528CONFIG_BLK_DEV_IDE=y 590CONFIG_BLK_DEV_IDE=y
529 591
530# 592#
@@ -534,6 +596,7 @@ CONFIG_BLK_DEV_IDE=y
534CONFIG_BLK_DEV_IDEDISK=y 596CONFIG_BLK_DEV_IDEDISK=y
535# CONFIG_IDEDISK_MULTI_MODE is not set 597# CONFIG_IDEDISK_MULTI_MODE is not set
536CONFIG_BLK_DEV_IDECS=m 598CONFIG_BLK_DEV_IDECS=m
599# CONFIG_BLK_DEV_DELKIN is not set
537# CONFIG_BLK_DEV_IDECD is not set 600# CONFIG_BLK_DEV_IDECD is not set
538# CONFIG_BLK_DEV_IDETAPE is not set 601# CONFIG_BLK_DEV_IDETAPE is not set
539# CONFIG_BLK_DEV_IDEFLOPPY is not set 602# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -561,8 +624,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
561# CONFIG_BLK_DEV_CS5530 is not set 624# CONFIG_BLK_DEV_CS5530 is not set
562# CONFIG_BLK_DEV_HPT34X is not set 625# CONFIG_BLK_DEV_HPT34X is not set
563CONFIG_BLK_DEV_HPT366=y 626CONFIG_BLK_DEV_HPT366=y
627# CONFIG_BLK_DEV_JMICRON is not set
564# CONFIG_BLK_DEV_SC1200 is not set 628# CONFIG_BLK_DEV_SC1200 is not set
565# CONFIG_BLK_DEV_PIIX is not set 629# CONFIG_BLK_DEV_PIIX is not set
630CONFIG_BLK_DEV_IT8213=m
566# CONFIG_BLK_DEV_IT821X is not set 631# CONFIG_BLK_DEV_IT821X is not set
567# CONFIG_BLK_DEV_NS87415 is not set 632# CONFIG_BLK_DEV_NS87415 is not set
568# CONFIG_BLK_DEV_PDC202XX_OLD is not set 633# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -572,6 +637,7 @@ CONFIG_BLK_DEV_HPT366=y
572# CONFIG_BLK_DEV_SLC90E66 is not set 637# CONFIG_BLK_DEV_SLC90E66 is not set
573# CONFIG_BLK_DEV_TRM290 is not set 638# CONFIG_BLK_DEV_TRM290 is not set
574# CONFIG_BLK_DEV_VIA82CXXX is not set 639# CONFIG_BLK_DEV_VIA82CXXX is not set
640CONFIG_BLK_DEV_TC86C001=m
575# CONFIG_IDE_ARM is not set 641# CONFIG_IDE_ARM is not set
576CONFIG_BLK_DEV_IDEDMA=y 642CONFIG_BLK_DEV_IDEDMA=y
577# CONFIG_IDEDMA_IVB is not set 643# CONFIG_IDEDMA_IVB is not set
@@ -583,6 +649,12 @@ CONFIG_BLK_DEV_IDEDMA=y
583# 649#
584CONFIG_RAID_ATTRS=m 650CONFIG_RAID_ATTRS=m
585# CONFIG_SCSI is not set 651# CONFIG_SCSI is not set
652# CONFIG_SCSI_NETLINK is not set
653
654#
655# Serial ATA (prod) and Parallel ATA (experimental) drivers
656#
657# CONFIG_ATA is not set
586 658
587# 659#
588# Multi-device support (RAID and LVM) 660# Multi-device support (RAID and LVM)
@@ -633,6 +705,8 @@ CONFIG_LXT_PHY=m
633CONFIG_CICADA_PHY=m 705CONFIG_CICADA_PHY=m
634CONFIG_VITESSE_PHY=m 706CONFIG_VITESSE_PHY=m
635CONFIG_SMSC_PHY=m 707CONFIG_SMSC_PHY=m
708# CONFIG_BROADCOM_PHY is not set
709# CONFIG_FIXED_PHY is not set
636 710
637# 711#
638# Ethernet (10 or 100Mbit) 712# Ethernet (10 or 100Mbit)
@@ -670,14 +744,18 @@ CONFIG_MIPS_AU1X00_ENET=y
670# CONFIG_SK98LIN is not set 744# CONFIG_SK98LIN is not set
671# CONFIG_TIGON3 is not set 745# CONFIG_TIGON3 is not set
672# CONFIG_BNX2 is not set 746# CONFIG_BNX2 is not set
747CONFIG_QLA3XXX=m
748# CONFIG_ATL1 is not set
673 749
674# 750#
675# Ethernet (10000 Mbit) 751# Ethernet (10000 Mbit)
676# 752#
677# CONFIG_CHELSIO_T1 is not set 753# CONFIG_CHELSIO_T1 is not set
754CONFIG_CHELSIO_T3=m
678# CONFIG_IXGB is not set 755# CONFIG_IXGB is not set
679# CONFIG_S2IO is not set 756# CONFIG_S2IO is not set
680# CONFIG_MYRI10GE is not set 757# CONFIG_MYRI10GE is not set
758CONFIG_NETXEN_NIC=m
681 759
682# 760#
683# Token Ring devices 761# Token Ring devices
@@ -718,6 +796,7 @@ CONFIG_PPP_DEFLATE=m
718CONFIG_PPP_MPPE=m 796CONFIG_PPP_MPPE=m
719CONFIG_PPPOE=m 797CONFIG_PPPOE=m
720# CONFIG_SLIP is not set 798# CONFIG_SLIP is not set
799CONFIG_SLHC=m
721# CONFIG_SHAPER is not set 800# CONFIG_SHAPER is not set
722# CONFIG_NETCONSOLE is not set 801# CONFIG_NETCONSOLE is not set
723# CONFIG_NETPOLL is not set 802# CONFIG_NETPOLL is not set
@@ -737,6 +816,7 @@ CONFIG_PPPOE=m
737# Input device support 816# Input device support
738# 817#
739CONFIG_INPUT=y 818CONFIG_INPUT=y
819# CONFIG_INPUT_FF_MEMLESS is not set
740 820
741# 821#
742# Userland interfaces 822# Userland interfaces
@@ -815,10 +895,6 @@ CONFIG_LEGACY_PTY_COUNT=256
815# CONFIG_DTLK is not set 895# CONFIG_DTLK is not set
816# CONFIG_R3964 is not set 896# CONFIG_R3964 is not set
817# CONFIG_APPLICOM is not set 897# CONFIG_APPLICOM is not set
818
819#
820# Ftape, the floppy tape device driver
821#
822# CONFIG_DRM is not set 898# CONFIG_DRM is not set
823 899
824# 900#
@@ -833,7 +909,6 @@ CONFIG_SYNCLINK_CS=m
833# TPM devices 909# TPM devices
834# 910#
835# CONFIG_TCG_TPM is not set 911# CONFIG_TCG_TPM is not set
836# CONFIG_TELCLOCK is not set
837 912
838# 913#
839# I2C support 914# I2C support
@@ -858,14 +933,9 @@ CONFIG_SYNCLINK_CS=m
858# CONFIG_HWMON_VID is not set 933# CONFIG_HWMON_VID is not set
859 934
860# 935#
861# Misc devices
862#
863
864#
865# Multimedia devices 936# Multimedia devices
866# 937#
867# CONFIG_VIDEO_DEV is not set 938# CONFIG_VIDEO_DEV is not set
868CONFIG_VIDEO_V4L2=y
869 939
870# 940#
871# Digital Video Broadcasting Devices 941# Digital Video Broadcasting Devices
@@ -877,6 +947,7 @@ CONFIG_VIDEO_V4L2=y
877# 947#
878# CONFIG_FIRMWARE_EDID is not set 948# CONFIG_FIRMWARE_EDID is not set
879# CONFIG_FB is not set 949# CONFIG_FB is not set
950# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
880 951
881# 952#
882# Sound 953# Sound
@@ -884,6 +955,11 @@ CONFIG_VIDEO_V4L2=y
884# CONFIG_SOUND is not set 955# CONFIG_SOUND is not set
885 956
886# 957#
958# HID Devices
959#
960# CONFIG_HID is not set
961
962#
887# USB support 963# USB support
888# 964#
889CONFIG_USB_ARCH_HAS_HCD=y 965CONFIG_USB_ARCH_HAS_HCD=y
@@ -946,6 +1022,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
946# 1022#
947 1023
948# 1024#
1025# Auxiliary Display support
1026#
1027
1028#
1029# Virtualization
1030#
1031
1032#
949# File systems 1033# File systems
950# 1034#
951CONFIG_EXT2_FS=y 1035CONFIG_EXT2_FS=y
@@ -957,6 +1041,7 @@ CONFIG_EXT3_FS=y
957CONFIG_EXT3_FS_XATTR=y 1041CONFIG_EXT3_FS_XATTR=y
958CONFIG_EXT3_FS_POSIX_ACL=y 1042CONFIG_EXT3_FS_POSIX_ACL=y
959CONFIG_EXT3_FS_SECURITY=y 1043CONFIG_EXT3_FS_SECURITY=y
1044# CONFIG_EXT4DEV_FS is not set
960CONFIG_JBD=y 1045CONFIG_JBD=y
961# CONFIG_JBD_DEBUG is not set 1046# CONFIG_JBD_DEBUG is not set
962CONFIG_FS_MBCACHE=y 1047CONFIG_FS_MBCACHE=y
@@ -969,6 +1054,7 @@ CONFIG_REISERFS_FS_SECURITY=y
969# CONFIG_JFS_FS is not set 1054# CONFIG_JFS_FS is not set
970CONFIG_FS_POSIX_ACL=y 1055CONFIG_FS_POSIX_ACL=y
971# CONFIG_XFS_FS is not set 1056# CONFIG_XFS_FS is not set
1057# CONFIG_GFS2_FS is not set
972# CONFIG_OCFS2_FS is not set 1058# CONFIG_OCFS2_FS is not set
973# CONFIG_MINIX_FS is not set 1059# CONFIG_MINIX_FS is not set
974# CONFIG_ROMFS_FS is not set 1060# CONFIG_ROMFS_FS is not set
@@ -979,6 +1065,7 @@ CONFIG_DNOTIFY=y
979CONFIG_AUTOFS_FS=m 1065CONFIG_AUTOFS_FS=m
980CONFIG_AUTOFS4_FS=m 1066CONFIG_AUTOFS4_FS=m
981CONFIG_FUSE_FS=m 1067CONFIG_FUSE_FS=m
1068CONFIG_GENERIC_ACL=y
982 1069
983# 1070#
984# CD-ROM/DVD Filesystems 1071# CD-ROM/DVD Filesystems
@@ -998,23 +1085,25 @@ CONFIG_FUSE_FS=m
998# 1085#
999CONFIG_PROC_FS=y 1086CONFIG_PROC_FS=y
1000CONFIG_PROC_KCORE=y 1087CONFIG_PROC_KCORE=y
1088CONFIG_PROC_SYSCTL=y
1001CONFIG_SYSFS=y 1089CONFIG_SYSFS=y
1002CONFIG_TMPFS=y 1090CONFIG_TMPFS=y
1091CONFIG_TMPFS_POSIX_ACL=y
1003# CONFIG_HUGETLB_PAGE is not set 1092# CONFIG_HUGETLB_PAGE is not set
1004CONFIG_RAMFS=y 1093CONFIG_RAMFS=y
1005# CONFIG_CONFIGFS_FS is not set 1094CONFIG_CONFIGFS_FS=m
1006 1095
1007# 1096#
1008# Miscellaneous filesystems 1097# Miscellaneous filesystems
1009# 1098#
1010# CONFIG_ADFS_FS is not set 1099# CONFIG_ADFS_FS is not set
1011# CONFIG_AFFS_FS is not set 1100# CONFIG_AFFS_FS is not set
1101# CONFIG_ECRYPT_FS is not set
1012# CONFIG_HFS_FS is not set 1102# CONFIG_HFS_FS is not set
1013# CONFIG_HFSPLUS_FS is not set 1103# CONFIG_HFSPLUS_FS is not set
1014# CONFIG_BEFS_FS is not set 1104# CONFIG_BEFS_FS is not set
1015# CONFIG_BFS_FS is not set 1105# CONFIG_BFS_FS is not set
1016# CONFIG_EFS_FS is not set 1106# CONFIG_EFS_FS is not set
1017# CONFIG_JFFS_FS is not set
1018# CONFIG_JFFS2_FS is not set 1107# CONFIG_JFFS2_FS is not set
1019CONFIG_CRAMFS=m 1108CONFIG_CRAMFS=m
1020# CONFIG_VXFS_FS is not set 1109# CONFIG_VXFS_FS is not set
@@ -1043,7 +1132,6 @@ CONFIG_SUNRPC=y
1043CONFIG_SMB_FS=m 1132CONFIG_SMB_FS=m
1044# CONFIG_SMB_NLS_DEFAULT is not set 1133# CONFIG_SMB_NLS_DEFAULT is not set
1045# CONFIG_CIFS is not set 1134# CONFIG_CIFS is not set
1046# CONFIG_CIFS_DEBUG2 is not set
1047# CONFIG_NCP_FS is not set 1135# CONFIG_NCP_FS is not set
1048# CONFIG_CODA_FS is not set 1136# CONFIG_CODA_FS is not set
1049# CONFIG_AFS_FS is not set 1137# CONFIG_AFS_FS is not set
@@ -1100,6 +1188,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1100# CONFIG_NLS_UTF8 is not set 1188# CONFIG_NLS_UTF8 is not set
1101 1189
1102# 1190#
1191# Distributed Lock Manager
1192#
1193CONFIG_DLM=m
1194CONFIG_DLM_TCP=y
1195# CONFIG_DLM_SCTP is not set
1196# CONFIG_DLM_DEBUG is not set
1197
1198#
1103# Profiling support 1199# Profiling support
1104# 1200#
1105# CONFIG_PROFILING is not set 1201# CONFIG_PROFILING is not set
@@ -1109,13 +1205,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1109# 1205#
1110CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1206CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1111# CONFIG_PRINTK_TIME is not set 1207# CONFIG_PRINTK_TIME is not set
1208CONFIG_ENABLE_MUST_CHECK=y
1112# CONFIG_MAGIC_SYSRQ is not set 1209# CONFIG_MAGIC_SYSRQ is not set
1113# CONFIG_UNUSED_SYMBOLS is not set 1210# CONFIG_UNUSED_SYMBOLS is not set
1211# CONFIG_DEBUG_FS is not set
1212# CONFIG_HEADERS_CHECK is not set
1114# CONFIG_DEBUG_KERNEL is not set 1213# CONFIG_DEBUG_KERNEL is not set
1115CONFIG_LOG_BUF_SHIFT=14 1214CONFIG_LOG_BUF_SHIFT=14
1116# CONFIG_DEBUG_FS is not set
1117CONFIG_CROSSCOMPILE=y 1215CONFIG_CROSSCOMPILE=y
1118CONFIG_CMDLINE="" 1216CONFIG_CMDLINE=""
1217CONFIG_SYS_SUPPORTS_KGDB=y
1119 1218
1120# 1219#
1121# Security options 1220# Security options
@@ -1128,18 +1227,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1128# Cryptographic options 1227# Cryptographic options
1129# 1228#
1130CONFIG_CRYPTO=y 1229CONFIG_CRYPTO=y
1230CONFIG_CRYPTO_ALGAPI=y
1231CONFIG_CRYPTO_BLKCIPHER=m
1232CONFIG_CRYPTO_HASH=y
1233CONFIG_CRYPTO_MANAGER=y
1131CONFIG_CRYPTO_HMAC=y 1234CONFIG_CRYPTO_HMAC=y
1235CONFIG_CRYPTO_XCBC=m
1132CONFIG_CRYPTO_NULL=m 1236CONFIG_CRYPTO_NULL=m
1133CONFIG_CRYPTO_MD4=m 1237CONFIG_CRYPTO_MD4=m
1134CONFIG_CRYPTO_MD5=m 1238CONFIG_CRYPTO_MD5=y
1135CONFIG_CRYPTO_SHA1=m 1239CONFIG_CRYPTO_SHA1=m
1136CONFIG_CRYPTO_SHA256=m 1240CONFIG_CRYPTO_SHA256=m
1137CONFIG_CRYPTO_SHA512=m 1241CONFIG_CRYPTO_SHA512=m
1138CONFIG_CRYPTO_WP512=m 1242CONFIG_CRYPTO_WP512=m
1139CONFIG_CRYPTO_TGR192=m 1243CONFIG_CRYPTO_TGR192=m
1244CONFIG_CRYPTO_GF128MUL=m
1245CONFIG_CRYPTO_ECB=m
1246CONFIG_CRYPTO_CBC=m
1247CONFIG_CRYPTO_PCBC=m
1248CONFIG_CRYPTO_LRW=m
1140CONFIG_CRYPTO_DES=m 1249CONFIG_CRYPTO_DES=m
1250CONFIG_CRYPTO_FCRYPT=m
1141CONFIG_CRYPTO_BLOWFISH=m 1251CONFIG_CRYPTO_BLOWFISH=m
1142CONFIG_CRYPTO_TWOFISH=m 1252CONFIG_CRYPTO_TWOFISH=m
1253CONFIG_CRYPTO_TWOFISH_COMMON=m
1143CONFIG_CRYPTO_SERPENT=m 1254CONFIG_CRYPTO_SERPENT=m
1144CONFIG_CRYPTO_AES=m 1255CONFIG_CRYPTO_AES=m
1145CONFIG_CRYPTO_CAST5=m 1256CONFIG_CRYPTO_CAST5=m
@@ -1151,6 +1262,7 @@ CONFIG_CRYPTO_ANUBIS=m
1151CONFIG_CRYPTO_DEFLATE=m 1262CONFIG_CRYPTO_DEFLATE=m
1152CONFIG_CRYPTO_MICHAEL_MIC=m 1263CONFIG_CRYPTO_MICHAEL_MIC=m
1153CONFIG_CRYPTO_CRC32C=m 1264CONFIG_CRYPTO_CRC32C=m
1265CONFIG_CRYPTO_CAMELLIA=m
1154# CONFIG_CRYPTO_TEST is not set 1266# CONFIG_CRYPTO_TEST is not set
1155 1267
1156# 1268#
@@ -1160,6 +1272,7 @@ CONFIG_CRYPTO_CRC32C=m
1160# 1272#
1161# Library routines 1273# Library routines
1162# 1274#
1275CONFIG_BITREVERSE=y
1163CONFIG_CRC_CCITT=m 1276CONFIG_CRC_CCITT=m
1164CONFIG_CRC16=m 1277CONFIG_CRC16=m
1165CONFIG_CRC32=y 1278CONFIG_CRC32=y
@@ -1171,3 +1284,5 @@ CONFIG_TEXTSEARCH_KMP=m
1171CONFIG_TEXTSEARCH_BM=m 1284CONFIG_TEXTSEARCH_BM=m
1172CONFIG_TEXTSEARCH_FSM=m 1285CONFIG_TEXTSEARCH_FSM=m
1173CONFIG_PLIST=y 1286CONFIG_PLIST=y
1287CONFIG_HAS_IOMEM=y
1288CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index 8318d74d6adb..df210dd22476 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:17 2006 4# Tue Feb 20 21:47:37 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS_PB1550=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_PB1550=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,15 +64,20 @@ CONFIG_MIPS_PB1550=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y 77CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y
74# CONFIG_CPU_BIG_ENDIAN is not set 78# CONFIG_CPU_BIG_ENDIAN is not set
75CONFIG_CPU_LITTLE_ENDIAN=y 79CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_APM_EMULATION=y
76CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
77CONFIG_SOC_AU1550=y 82CONFIG_SOC_AU1550=y
78CONFIG_SOC_AU1X00=y 83CONFIG_SOC_AU1X00=y
@@ -117,8 +122,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 123CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 124CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 127# CONFIG_MIPS_VPE_LOADER is not set
123CONFIG_64BIT_PHYS_ADDR=y 128CONFIG_64BIT_PHYS_ADDR=y
124CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
@@ -135,7 +140,8 @@ CONFIG_FLATMEM=y
135CONFIG_FLAT_NODE_MEM_MAP=y 140CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 143CONFIG_RESOURCES_64BIT=y
144CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 145# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 146# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 147# CONFIG_HZ_128 is not set
@@ -148,6 +154,7 @@ CONFIG_HZ=1000
148CONFIG_PREEMPT_NONE=y 154CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 155# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 156# CONFIG_PREEMPT is not set
157# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 158CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 159CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -166,15 +173,20 @@ CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y 173CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 174CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 175CONFIG_SYSVIPC=y
176# CONFIG_IPC_NS is not set
177CONFIG_SYSVIPC_SYSCTL=y
169# CONFIG_POSIX_MQUEUE is not set 178# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set 179# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y 180# CONFIG_TASKSTATS is not set
181# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 182# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 183# CONFIG_IKCONFIG is not set
184CONFIG_SYSFS_DEPRECATED=y
174CONFIG_RELAY=y 185CONFIG_RELAY=y
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
187CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 188CONFIG_EMBEDDED=y
189CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 190CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 191# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 192CONFIG_HOTPLUG=y
@@ -182,12 +194,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 194CONFIG_BUG=y
183CONFIG_ELF_CORE=y 195CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 197CONFIG_FUTEX=y
187CONFIG_EPOLL=y 198CONFIG_EPOLL=y
188CONFIG_SHMEM=y 199CONFIG_SHMEM=y
189CONFIG_SLAB=y 200CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 201CONFIG_VM_EVENT_COUNTERS=y
202CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 203# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 204CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 205# CONFIG_SLOB is not set
@@ -205,6 +217,7 @@ CONFIG_KMOD=y
205# 217#
206# Block layer 218# Block layer
207# 219#
220CONFIG_BLOCK=y
208# CONFIG_LBD is not set 221# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 222# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 223# CONFIG_LSF is not set
@@ -259,6 +272,10 @@ CONFIG_PCCARD_NONSTATIC=m
259CONFIG_BINFMT_ELF=y 272CONFIG_BINFMT_ELF=y
260# CONFIG_BINFMT_MISC is not set 273# CONFIG_BINFMT_MISC is not set
261CONFIG_TRAD_SIGNALS=y 274CONFIG_TRAD_SIGNALS=y
275
276#
277# Power management options
278#
262# CONFIG_PM is not set 279# CONFIG_PM is not set
263 280
264# 281#
@@ -275,7 +292,10 @@ CONFIG_PACKET=y
275CONFIG_UNIX=y 292CONFIG_UNIX=y
276CONFIG_XFRM=y 293CONFIG_XFRM=y
277CONFIG_XFRM_USER=m 294CONFIG_XFRM_USER=m
295# CONFIG_XFRM_SUB_POLICY is not set
296CONFIG_XFRM_MIGRATE=y
278CONFIG_NET_KEY=y 297CONFIG_NET_KEY=y
298CONFIG_NET_KEY_MIGRATE=y
279CONFIG_INET=y 299CONFIG_INET=y
280CONFIG_IP_MULTICAST=y 300CONFIG_IP_MULTICAST=y
281# CONFIG_IP_ADVANCED_ROUTER is not set 301# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -296,10 +316,13 @@ CONFIG_IP_PNP_BOOTP=y
296# CONFIG_INET_TUNNEL is not set 316# CONFIG_INET_TUNNEL is not set
297CONFIG_INET_XFRM_MODE_TRANSPORT=m 317CONFIG_INET_XFRM_MODE_TRANSPORT=m
298CONFIG_INET_XFRM_MODE_TUNNEL=m 318CONFIG_INET_XFRM_MODE_TUNNEL=m
319CONFIG_INET_XFRM_MODE_BEET=m
299CONFIG_INET_DIAG=y 320CONFIG_INET_DIAG=y
300CONFIG_INET_TCP_DIAG=y 321CONFIG_INET_TCP_DIAG=y
301# CONFIG_TCP_CONG_ADVANCED is not set 322# CONFIG_TCP_CONG_ADVANCED is not set
302CONFIG_TCP_CONG_BIC=y 323CONFIG_TCP_CONG_CUBIC=y
324CONFIG_DEFAULT_TCP_CONG="cubic"
325CONFIG_TCP_MD5SIG=y
303 326
304# 327#
305# IP: Virtual Server Configuration 328# IP: Virtual Server Configuration
@@ -318,15 +341,42 @@ CONFIG_NETFILTER=y
318CONFIG_NETFILTER_NETLINK=m 341CONFIG_NETFILTER_NETLINK=m
319CONFIG_NETFILTER_NETLINK_QUEUE=m 342CONFIG_NETFILTER_NETLINK_QUEUE=m
320CONFIG_NETFILTER_NETLINK_LOG=m 343CONFIG_NETFILTER_NETLINK_LOG=m
321# CONFIG_NF_CONNTRACK is not set 344CONFIG_NF_CONNTRACK_ENABLED=m
345CONFIG_NF_CONNTRACK_SUPPORT=y
346# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
347CONFIG_NF_CONNTRACK=m
348CONFIG_NF_CT_ACCT=y
349CONFIG_NF_CONNTRACK_MARK=y
350CONFIG_NF_CONNTRACK_SECMARK=y
351CONFIG_NF_CONNTRACK_EVENTS=y
352CONFIG_NF_CT_PROTO_GRE=m
353CONFIG_NF_CT_PROTO_SCTP=m
354CONFIG_NF_CONNTRACK_AMANDA=m
355CONFIG_NF_CONNTRACK_FTP=m
356CONFIG_NF_CONNTRACK_H323=m
357CONFIG_NF_CONNTRACK_IRC=m
358# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
359CONFIG_NF_CONNTRACK_PPTP=m
360CONFIG_NF_CONNTRACK_SANE=m
361CONFIG_NF_CONNTRACK_SIP=m
362CONFIG_NF_CONNTRACK_TFTP=m
363CONFIG_NF_CT_NETLINK=m
322CONFIG_NETFILTER_XTABLES=m 364CONFIG_NETFILTER_XTABLES=m
323CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 365CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
324CONFIG_NETFILTER_XT_TARGET_MARK=m 366CONFIG_NETFILTER_XT_TARGET_MARK=m
325CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 367CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
368CONFIG_NETFILTER_XT_TARGET_NFLOG=m
326CONFIG_NETFILTER_XT_TARGET_SECMARK=m 369CONFIG_NETFILTER_XT_TARGET_SECMARK=m
370CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
371CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
327CONFIG_NETFILTER_XT_MATCH_COMMENT=m 372CONFIG_NETFILTER_XT_MATCH_COMMENT=m
373CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
374CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
375CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
328CONFIG_NETFILTER_XT_MATCH_DCCP=m 376CONFIG_NETFILTER_XT_MATCH_DCCP=m
377CONFIG_NETFILTER_XT_MATCH_DSCP=m
329CONFIG_NETFILTER_XT_MATCH_ESP=m 378CONFIG_NETFILTER_XT_MATCH_ESP=m
379CONFIG_NETFILTER_XT_MATCH_HELPER=m
330CONFIG_NETFILTER_XT_MATCH_LENGTH=m 380CONFIG_NETFILTER_XT_MATCH_LENGTH=m
331CONFIG_NETFILTER_XT_MATCH_LIMIT=m 381CONFIG_NETFILTER_XT_MATCH_LIMIT=m
332CONFIG_NETFILTER_XT_MATCH_MAC=m 382CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -337,14 +387,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
337CONFIG_NETFILTER_XT_MATCH_QUOTA=m 387CONFIG_NETFILTER_XT_MATCH_QUOTA=m
338CONFIG_NETFILTER_XT_MATCH_REALM=m 388CONFIG_NETFILTER_XT_MATCH_REALM=m
339CONFIG_NETFILTER_XT_MATCH_SCTP=m 389CONFIG_NETFILTER_XT_MATCH_SCTP=m
390CONFIG_NETFILTER_XT_MATCH_STATE=m
340CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 391CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
341CONFIG_NETFILTER_XT_MATCH_STRING=m 392CONFIG_NETFILTER_XT_MATCH_STRING=m
342CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 393CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
394CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
343 395
344# 396#
345# IP: Netfilter Configuration 397# IP: Netfilter Configuration
346# 398#
347# CONFIG_IP_NF_CONNTRACK is not set 399CONFIG_NF_CONNTRACK_IPV4=m
400CONFIG_NF_CONNTRACK_PROC_COMPAT=y
348# CONFIG_IP_NF_QUEUE is not set 401# CONFIG_IP_NF_QUEUE is not set
349# CONFIG_IP_NF_IPTABLES is not set 402# CONFIG_IP_NF_IPTABLES is not set
350# CONFIG_IP_NF_ARPTABLES is not set 403# CONFIG_IP_NF_ARPTABLES is not set
@@ -372,7 +425,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
372# CONFIG_ATALK is not set 425# CONFIG_ATALK is not set
373# CONFIG_X25 is not set 426# CONFIG_X25 is not set
374# CONFIG_LAPB is not set 427# CONFIG_LAPB is not set
375# CONFIG_NET_DIVERT is not set
376# CONFIG_ECONET is not set 428# CONFIG_ECONET is not set
377# CONFIG_WAN_ROUTER is not set 429# CONFIG_WAN_ROUTER is not set
378 430
@@ -428,11 +480,13 @@ CONFIG_MTD_PARTITIONS=y
428# User Modules And Translation Layers 480# User Modules And Translation Layers
429# 481#
430CONFIG_MTD_CHAR=y 482CONFIG_MTD_CHAR=y
483CONFIG_MTD_BLKDEVS=y
431CONFIG_MTD_BLOCK=y 484CONFIG_MTD_BLOCK=y
432# CONFIG_FTL is not set 485# CONFIG_FTL is not set
433# CONFIG_NFTL is not set 486# CONFIG_NFTL is not set
434# CONFIG_INFTL is not set 487# CONFIG_INFTL is not set
435# CONFIG_RFD_FTL is not set 488# CONFIG_RFD_FTL is not set
489# CONFIG_SSFDC is not set
436 490
437# 491#
438# RAM/ROM/Flash chip drivers 492# RAM/ROM/Flash chip drivers
@@ -502,6 +556,7 @@ CONFIG_MTD_ALCHEMY=y
502# 556#
503# Plug and Play support 557# Plug and Play support
504# 558#
559# CONFIG_PNPACPI is not set
505 560
506# 561#
507# Block devices 562# Block devices
@@ -523,9 +578,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
523CONFIG_ATA_OVER_ETH=m 578CONFIG_ATA_OVER_ETH=m
524 579
525# 580#
581# Misc devices
582#
583CONFIG_SGI_IOC4=m
584# CONFIG_TIFM_CORE is not set
585
586#
526# ATA/ATAPI/MFM/RLL support 587# ATA/ATAPI/MFM/RLL support
527# 588#
528CONFIG_IDE=y 589CONFIG_IDE=y
590CONFIG_IDE_MAX_HWIFS=4
529CONFIG_BLK_DEV_IDE=y 591CONFIG_BLK_DEV_IDE=y
530 592
531# 593#
@@ -535,6 +597,7 @@ CONFIG_BLK_DEV_IDE=y
535CONFIG_BLK_DEV_IDEDISK=y 597CONFIG_BLK_DEV_IDEDISK=y
536# CONFIG_IDEDISK_MULTI_MODE is not set 598# CONFIG_IDEDISK_MULTI_MODE is not set
537CONFIG_BLK_DEV_IDECS=m 599CONFIG_BLK_DEV_IDECS=m
600# CONFIG_BLK_DEV_DELKIN is not set
538# CONFIG_BLK_DEV_IDECD is not set 601# CONFIG_BLK_DEV_IDECD is not set
539# CONFIG_BLK_DEV_IDETAPE is not set 602# CONFIG_BLK_DEV_IDETAPE is not set
540# CONFIG_BLK_DEV_IDEFLOPPY is not set 603# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -562,8 +625,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
562# CONFIG_BLK_DEV_CS5530 is not set 625# CONFIG_BLK_DEV_CS5530 is not set
563# CONFIG_BLK_DEV_HPT34X is not set 626# CONFIG_BLK_DEV_HPT34X is not set
564CONFIG_BLK_DEV_HPT366=y 627CONFIG_BLK_DEV_HPT366=y
628# CONFIG_BLK_DEV_JMICRON is not set
565# CONFIG_BLK_DEV_SC1200 is not set 629# CONFIG_BLK_DEV_SC1200 is not set
566# CONFIG_BLK_DEV_PIIX is not set 630# CONFIG_BLK_DEV_PIIX is not set
631CONFIG_BLK_DEV_IT8213=m
567# CONFIG_BLK_DEV_IT821X is not set 632# CONFIG_BLK_DEV_IT821X is not set
568# CONFIG_BLK_DEV_NS87415 is not set 633# CONFIG_BLK_DEV_NS87415 is not set
569# CONFIG_BLK_DEV_PDC202XX_OLD is not set 634# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -573,6 +638,7 @@ CONFIG_BLK_DEV_HPT366=y
573# CONFIG_BLK_DEV_SLC90E66 is not set 638# CONFIG_BLK_DEV_SLC90E66 is not set
574# CONFIG_BLK_DEV_TRM290 is not set 639# CONFIG_BLK_DEV_TRM290 is not set
575# CONFIG_BLK_DEV_VIA82CXXX is not set 640# CONFIG_BLK_DEV_VIA82CXXX is not set
641CONFIG_BLK_DEV_TC86C001=m
576# CONFIG_IDE_ARM is not set 642# CONFIG_IDE_ARM is not set
577CONFIG_BLK_DEV_IDEDMA=y 643CONFIG_BLK_DEV_IDEDMA=y
578# CONFIG_IDEDMA_IVB is not set 644# CONFIG_IDEDMA_IVB is not set
@@ -584,6 +650,12 @@ CONFIG_BLK_DEV_IDEDMA=y
584# 650#
585CONFIG_RAID_ATTRS=m 651CONFIG_RAID_ATTRS=m
586# CONFIG_SCSI is not set 652# CONFIG_SCSI is not set
653# CONFIG_SCSI_NETLINK is not set
654
655#
656# Serial ATA (prod) and Parallel ATA (experimental) drivers
657#
658# CONFIG_ATA is not set
587 659
588# 660#
589# Multi-device support (RAID and LVM) 661# Multi-device support (RAID and LVM)
@@ -634,6 +706,8 @@ CONFIG_LXT_PHY=m
634CONFIG_CICADA_PHY=m 706CONFIG_CICADA_PHY=m
635CONFIG_VITESSE_PHY=m 707CONFIG_VITESSE_PHY=m
636CONFIG_SMSC_PHY=m 708CONFIG_SMSC_PHY=m
709# CONFIG_BROADCOM_PHY is not set
710# CONFIG_FIXED_PHY is not set
637 711
638# 712#
639# Ethernet (10 or 100Mbit) 713# Ethernet (10 or 100Mbit)
@@ -671,14 +745,18 @@ CONFIG_MIPS_AU1X00_ENET=y
671# CONFIG_SK98LIN is not set 745# CONFIG_SK98LIN is not set
672# CONFIG_TIGON3 is not set 746# CONFIG_TIGON3 is not set
673# CONFIG_BNX2 is not set 747# CONFIG_BNX2 is not set
748CONFIG_QLA3XXX=m
749# CONFIG_ATL1 is not set
674 750
675# 751#
676# Ethernet (10000 Mbit) 752# Ethernet (10000 Mbit)
677# 753#
678# CONFIG_CHELSIO_T1 is not set 754# CONFIG_CHELSIO_T1 is not set
755CONFIG_CHELSIO_T3=m
679# CONFIG_IXGB is not set 756# CONFIG_IXGB is not set
680# CONFIG_S2IO is not set 757# CONFIG_S2IO is not set
681# CONFIG_MYRI10GE is not set 758# CONFIG_MYRI10GE is not set
759CONFIG_NETXEN_NIC=m
682 760
683# 761#
684# Token Ring devices 762# Token Ring devices
@@ -711,6 +789,7 @@ CONFIG_PPP_DEFLATE=m
711CONFIG_PPP_MPPE=m 789CONFIG_PPP_MPPE=m
712CONFIG_PPPOE=m 790CONFIG_PPPOE=m
713# CONFIG_SLIP is not set 791# CONFIG_SLIP is not set
792CONFIG_SLHC=m
714# CONFIG_SHAPER is not set 793# CONFIG_SHAPER is not set
715# CONFIG_NETCONSOLE is not set 794# CONFIG_NETCONSOLE is not set
716# CONFIG_NETPOLL is not set 795# CONFIG_NETPOLL is not set
@@ -730,6 +809,7 @@ CONFIG_PPPOE=m
730# Input device support 809# Input device support
731# 810#
732CONFIG_INPUT=y 811CONFIG_INPUT=y
812# CONFIG_INPUT_FF_MEMLESS is not set
733 813
734# 814#
735# Userland interfaces 815# Userland interfaces
@@ -808,10 +888,6 @@ CONFIG_LEGACY_PTY_COUNT=256
808# CONFIG_DTLK is not set 888# CONFIG_DTLK is not set
809# CONFIG_R3964 is not set 889# CONFIG_R3964 is not set
810# CONFIG_APPLICOM is not set 890# CONFIG_APPLICOM is not set
811
812#
813# Ftape, the floppy tape device driver
814#
815# CONFIG_DRM is not set 891# CONFIG_DRM is not set
816 892
817# 893#
@@ -826,7 +902,6 @@ CONFIG_SYNCLINK_CS=m
826# TPM devices 902# TPM devices
827# 903#
828# CONFIG_TCG_TPM is not set 904# CONFIG_TCG_TPM is not set
829# CONFIG_TELCLOCK is not set
830 905
831# 906#
832# I2C support 907# I2C support
@@ -851,14 +926,9 @@ CONFIG_SYNCLINK_CS=m
851# CONFIG_HWMON_VID is not set 926# CONFIG_HWMON_VID is not set
852 927
853# 928#
854# Misc devices
855#
856
857#
858# Multimedia devices 929# Multimedia devices
859# 930#
860# CONFIG_VIDEO_DEV is not set 931# CONFIG_VIDEO_DEV is not set
861CONFIG_VIDEO_V4L2=y
862 932
863# 933#
864# Digital Video Broadcasting Devices 934# Digital Video Broadcasting Devices
@@ -870,6 +940,7 @@ CONFIG_VIDEO_V4L2=y
870# 940#
871# CONFIG_FIRMWARE_EDID is not set 941# CONFIG_FIRMWARE_EDID is not set
872# CONFIG_FB is not set 942# CONFIG_FB is not set
943# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
873 944
874# 945#
875# Sound 946# Sound
@@ -877,6 +948,11 @@ CONFIG_VIDEO_V4L2=y
877# CONFIG_SOUND is not set 948# CONFIG_SOUND is not set
878 949
879# 950#
951# HID Devices
952#
953# CONFIG_HID is not set
954
955#
880# USB support 956# USB support
881# 957#
882CONFIG_USB_ARCH_HAS_HCD=y 958CONFIG_USB_ARCH_HAS_HCD=y
@@ -939,6 +1015,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
939# 1015#
940 1016
941# 1017#
1018# Auxiliary Display support
1019#
1020
1021#
1022# Virtualization
1023#
1024
1025#
942# File systems 1026# File systems
943# 1027#
944CONFIG_EXT2_FS=y 1028CONFIG_EXT2_FS=y
@@ -950,6 +1034,7 @@ CONFIG_EXT3_FS=y
950CONFIG_EXT3_FS_XATTR=y 1034CONFIG_EXT3_FS_XATTR=y
951CONFIG_EXT3_FS_POSIX_ACL=y 1035CONFIG_EXT3_FS_POSIX_ACL=y
952CONFIG_EXT3_FS_SECURITY=y 1036CONFIG_EXT3_FS_SECURITY=y
1037# CONFIG_EXT4DEV_FS is not set
953CONFIG_JBD=y 1038CONFIG_JBD=y
954# CONFIG_JBD_DEBUG is not set 1039# CONFIG_JBD_DEBUG is not set
955CONFIG_FS_MBCACHE=y 1040CONFIG_FS_MBCACHE=y
@@ -962,6 +1047,7 @@ CONFIG_REISERFS_FS_SECURITY=y
962# CONFIG_JFS_FS is not set 1047# CONFIG_JFS_FS is not set
963CONFIG_FS_POSIX_ACL=y 1048CONFIG_FS_POSIX_ACL=y
964# CONFIG_XFS_FS is not set 1049# CONFIG_XFS_FS is not set
1050# CONFIG_GFS2_FS is not set
965# CONFIG_OCFS2_FS is not set 1051# CONFIG_OCFS2_FS is not set
966# CONFIG_MINIX_FS is not set 1052# CONFIG_MINIX_FS is not set
967# CONFIG_ROMFS_FS is not set 1053# CONFIG_ROMFS_FS is not set
@@ -972,6 +1058,7 @@ CONFIG_DNOTIFY=y
972CONFIG_AUTOFS_FS=m 1058CONFIG_AUTOFS_FS=m
973CONFIG_AUTOFS4_FS=m 1059CONFIG_AUTOFS4_FS=m
974CONFIG_FUSE_FS=m 1060CONFIG_FUSE_FS=m
1061CONFIG_GENERIC_ACL=y
975 1062
976# 1063#
977# CD-ROM/DVD Filesystems 1064# CD-ROM/DVD Filesystems
@@ -991,23 +1078,25 @@ CONFIG_FUSE_FS=m
991# 1078#
992CONFIG_PROC_FS=y 1079CONFIG_PROC_FS=y
993CONFIG_PROC_KCORE=y 1080CONFIG_PROC_KCORE=y
1081CONFIG_PROC_SYSCTL=y
994CONFIG_SYSFS=y 1082CONFIG_SYSFS=y
995CONFIG_TMPFS=y 1083CONFIG_TMPFS=y
1084CONFIG_TMPFS_POSIX_ACL=y
996# CONFIG_HUGETLB_PAGE is not set 1085# CONFIG_HUGETLB_PAGE is not set
997CONFIG_RAMFS=y 1086CONFIG_RAMFS=y
998# CONFIG_CONFIGFS_FS is not set 1087CONFIG_CONFIGFS_FS=m
999 1088
1000# 1089#
1001# Miscellaneous filesystems 1090# Miscellaneous filesystems
1002# 1091#
1003# CONFIG_ADFS_FS is not set 1092# CONFIG_ADFS_FS is not set
1004# CONFIG_AFFS_FS is not set 1093# CONFIG_AFFS_FS is not set
1094# CONFIG_ECRYPT_FS is not set
1005# CONFIG_HFS_FS is not set 1095# CONFIG_HFS_FS is not set
1006# CONFIG_HFSPLUS_FS is not set 1096# CONFIG_HFSPLUS_FS is not set
1007# CONFIG_BEFS_FS is not set 1097# CONFIG_BEFS_FS is not set
1008# CONFIG_BFS_FS is not set 1098# CONFIG_BFS_FS is not set
1009# CONFIG_EFS_FS is not set 1099# CONFIG_EFS_FS is not set
1010# CONFIG_JFFS_FS is not set
1011# CONFIG_JFFS2_FS is not set 1100# CONFIG_JFFS2_FS is not set
1012CONFIG_CRAMFS=m 1101CONFIG_CRAMFS=m
1013# CONFIG_VXFS_FS is not set 1102# CONFIG_VXFS_FS is not set
@@ -1036,7 +1125,6 @@ CONFIG_SUNRPC=y
1036CONFIG_SMB_FS=m 1125CONFIG_SMB_FS=m
1037# CONFIG_SMB_NLS_DEFAULT is not set 1126# CONFIG_SMB_NLS_DEFAULT is not set
1038# CONFIG_CIFS is not set 1127# CONFIG_CIFS is not set
1039# CONFIG_CIFS_DEBUG2 is not set
1040# CONFIG_NCP_FS is not set 1128# CONFIG_NCP_FS is not set
1041# CONFIG_CODA_FS is not set 1129# CONFIG_CODA_FS is not set
1042# CONFIG_AFS_FS is not set 1130# CONFIG_AFS_FS is not set
@@ -1093,6 +1181,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1093# CONFIG_NLS_UTF8 is not set 1181# CONFIG_NLS_UTF8 is not set
1094 1182
1095# 1183#
1184# Distributed Lock Manager
1185#
1186CONFIG_DLM=m
1187CONFIG_DLM_TCP=y
1188# CONFIG_DLM_SCTP is not set
1189# CONFIG_DLM_DEBUG is not set
1190
1191#
1096# Profiling support 1192# Profiling support
1097# 1193#
1098# CONFIG_PROFILING is not set 1194# CONFIG_PROFILING is not set
@@ -1102,13 +1198,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1102# 1198#
1103CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1199CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1104# CONFIG_PRINTK_TIME is not set 1200# CONFIG_PRINTK_TIME is not set
1201CONFIG_ENABLE_MUST_CHECK=y
1105# CONFIG_MAGIC_SYSRQ is not set 1202# CONFIG_MAGIC_SYSRQ is not set
1106# CONFIG_UNUSED_SYMBOLS is not set 1203# CONFIG_UNUSED_SYMBOLS is not set
1204# CONFIG_DEBUG_FS is not set
1205# CONFIG_HEADERS_CHECK is not set
1107# CONFIG_DEBUG_KERNEL is not set 1206# CONFIG_DEBUG_KERNEL is not set
1108CONFIG_LOG_BUF_SHIFT=14 1207CONFIG_LOG_BUF_SHIFT=14
1109# CONFIG_DEBUG_FS is not set
1110CONFIG_CROSSCOMPILE=y 1208CONFIG_CROSSCOMPILE=y
1111CONFIG_CMDLINE="" 1209CONFIG_CMDLINE=""
1210CONFIG_SYS_SUPPORTS_KGDB=y
1112 1211
1113# 1212#
1114# Security options 1213# Security options
@@ -1121,18 +1220,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1121# Cryptographic options 1220# Cryptographic options
1122# 1221#
1123CONFIG_CRYPTO=y 1222CONFIG_CRYPTO=y
1223CONFIG_CRYPTO_ALGAPI=y
1224CONFIG_CRYPTO_BLKCIPHER=m
1225CONFIG_CRYPTO_HASH=y
1226CONFIG_CRYPTO_MANAGER=y
1124CONFIG_CRYPTO_HMAC=y 1227CONFIG_CRYPTO_HMAC=y
1228CONFIG_CRYPTO_XCBC=m
1125CONFIG_CRYPTO_NULL=m 1229CONFIG_CRYPTO_NULL=m
1126CONFIG_CRYPTO_MD4=m 1230CONFIG_CRYPTO_MD4=m
1127CONFIG_CRYPTO_MD5=m 1231CONFIG_CRYPTO_MD5=y
1128CONFIG_CRYPTO_SHA1=m 1232CONFIG_CRYPTO_SHA1=m
1129CONFIG_CRYPTO_SHA256=m 1233CONFIG_CRYPTO_SHA256=m
1130CONFIG_CRYPTO_SHA512=m 1234CONFIG_CRYPTO_SHA512=m
1131CONFIG_CRYPTO_WP512=m 1235CONFIG_CRYPTO_WP512=m
1132CONFIG_CRYPTO_TGR192=m 1236CONFIG_CRYPTO_TGR192=m
1237CONFIG_CRYPTO_GF128MUL=m
1238CONFIG_CRYPTO_ECB=m
1239CONFIG_CRYPTO_CBC=m
1240CONFIG_CRYPTO_PCBC=m
1241CONFIG_CRYPTO_LRW=m
1133CONFIG_CRYPTO_DES=m 1242CONFIG_CRYPTO_DES=m
1243CONFIG_CRYPTO_FCRYPT=m
1134CONFIG_CRYPTO_BLOWFISH=m 1244CONFIG_CRYPTO_BLOWFISH=m
1135CONFIG_CRYPTO_TWOFISH=m 1245CONFIG_CRYPTO_TWOFISH=m
1246CONFIG_CRYPTO_TWOFISH_COMMON=m
1136CONFIG_CRYPTO_SERPENT=m 1247CONFIG_CRYPTO_SERPENT=m
1137CONFIG_CRYPTO_AES=m 1248CONFIG_CRYPTO_AES=m
1138CONFIG_CRYPTO_CAST5=m 1249CONFIG_CRYPTO_CAST5=m
@@ -1144,6 +1255,7 @@ CONFIG_CRYPTO_ANUBIS=m
1144CONFIG_CRYPTO_DEFLATE=m 1255CONFIG_CRYPTO_DEFLATE=m
1145CONFIG_CRYPTO_MICHAEL_MIC=m 1256CONFIG_CRYPTO_MICHAEL_MIC=m
1146CONFIG_CRYPTO_CRC32C=m 1257CONFIG_CRYPTO_CRC32C=m
1258CONFIG_CRYPTO_CAMELLIA=m
1147# CONFIG_CRYPTO_TEST is not set 1259# CONFIG_CRYPTO_TEST is not set
1148 1260
1149# 1261#
@@ -1153,6 +1265,7 @@ CONFIG_CRYPTO_CRC32C=m
1153# 1265#
1154# Library routines 1266# Library routines
1155# 1267#
1268CONFIG_BITREVERSE=y
1156CONFIG_CRC_CCITT=m 1269CONFIG_CRC_CCITT=m
1157CONFIG_CRC16=m 1270CONFIG_CRC16=m
1158CONFIG_CRC32=y 1271CONFIG_CRC32=y
@@ -1164,3 +1277,5 @@ CONFIG_TEXTSEARCH_KMP=m
1164CONFIG_TEXTSEARCH_BM=m 1277CONFIG_TEXTSEARCH_BM=m
1165CONFIG_TEXTSEARCH_FSM=m 1278CONFIG_TEXTSEARCH_FSM=m
1166CONFIG_PLIST=y 1279CONFIG_PLIST=y
1280CONFIG_HAS_IOMEM=y
1281CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index fcb8fea3052c..106a1641c0b5 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc2 3# Linux kernel version: 2.6.20
4# Sat Oct 14 23:01:16 2006 4# Tue Feb 20 21:47:38 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MIPS=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
42CONFIG_PNX8550_JBS=y 43CONFIG_PNX8550_JBS=y
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -62,11 +64,14 @@ CONFIG_PNX8550_JBS=y
62# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
63# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
64CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
65CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
66CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
67CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
68CONFIG_GENERIC_TIME=y 72CONFIG_GENERIC_TIME=y
69CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
70CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
71CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
72# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
@@ -134,6 +139,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 139# CONFIG_SPARSEMEM_STATIC is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 140CONFIG_SPLIT_PTLOCK_CPUS=4
136# CONFIG_RESOURCES_64BIT is not set 141# CONFIG_RESOURCES_64BIT is not set
142CONFIG_ZONE_DMA_FLAG=1
137# CONFIG_HZ_48 is not set 143# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 144# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 145# CONFIG_HZ_128 is not set
@@ -146,6 +152,7 @@ CONFIG_HZ=250
146CONFIG_PREEMPT_NONE=y 152CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 153# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
149CONFIG_LOCKDEP_SUPPORT=y 156CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 157CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,6 +172,7 @@ CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 172CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 173CONFIG_SYSVIPC=y
167# CONFIG_IPC_NS is not set 174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 176# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 177# CONFIG_BSD_PROCESS_ACCT is not set
170# CONFIG_TASKSTATS is not set 178# CONFIG_TASKSTATS is not set
@@ -172,6 +180,7 @@ CONFIG_SYSVIPC=y
172# CONFIG_AUDIT is not set 180# CONFIG_AUDIT is not set
173CONFIG_IKCONFIG=y 181CONFIG_IKCONFIG=y
174CONFIG_IKCONFIG_PROC=y 182CONFIG_IKCONFIG_PROC=y
183CONFIG_SYSFS_DEPRECATED=y
175# CONFIG_RELAY is not set 184# CONFIG_RELAY is not set
176CONFIG_INITRAMFS_SOURCE="" 185CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -231,7 +240,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
231# 240#
232CONFIG_HW_HAS_PCI=y 241CONFIG_HW_HAS_PCI=y
233CONFIG_PCI=y 242CONFIG_PCI=y
234# CONFIG_PCI_MULTITHREAD_PROBE is not set
235# CONFIG_PCI_DEBUG is not set 243# CONFIG_PCI_DEBUG is not set
236CONFIG_MMU=y 244CONFIG_MMU=y
237 245
@@ -253,6 +261,14 @@ CONFIG_BINFMT_ELF=y
253CONFIG_TRAD_SIGNALS=y 261CONFIG_TRAD_SIGNALS=y
254 262
255# 263#
264# Power management options
265#
266CONFIG_PM=y
267# CONFIG_PM_LEGACY is not set
268# CONFIG_PM_DEBUG is not set
269# CONFIG_PM_SYSFS_DEPRECATED is not set
270
271#
256# Networking 272# Networking
257# 273#
258CONFIG_NET=y 274CONFIG_NET=y
@@ -267,6 +283,7 @@ CONFIG_UNIX=y
267CONFIG_XFRM=y 283CONFIG_XFRM=y
268# CONFIG_XFRM_USER is not set 284# CONFIG_XFRM_USER is not set
269# CONFIG_XFRM_SUB_POLICY is not set 285# CONFIG_XFRM_SUB_POLICY is not set
286CONFIG_XFRM_MIGRATE=y
270# CONFIG_NET_KEY is not set 287# CONFIG_NET_KEY is not set
271CONFIG_INET=y 288CONFIG_INET=y
272# CONFIG_IP_MULTICAST is not set 289# CONFIG_IP_MULTICAST is not set
@@ -293,6 +310,7 @@ CONFIG_INET_TCP_DIAG=y
293# CONFIG_TCP_CONG_ADVANCED is not set 310# CONFIG_TCP_CONG_ADVANCED is not set
294CONFIG_TCP_CONG_CUBIC=y 311CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 312CONFIG_DEFAULT_TCP_CONG="cubic"
313CONFIG_TCP_MD5SIG=y
296# CONFIG_IPV6 is not set 314# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set 315# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set 316# CONFIG_INET6_TUNNEL is not set
@@ -350,6 +368,7 @@ CONFIG_STANDALONE=y
350CONFIG_PREVENT_FIRMWARE_BUILD=y 368CONFIG_PREVENT_FIRMWARE_BUILD=y
351CONFIG_FW_LOADER=y 369CONFIG_FW_LOADER=y
352# CONFIG_DEBUG_DRIVER is not set 370# CONFIG_DEBUG_DRIVER is not set
371# CONFIG_DEBUG_DEVRES is not set
353# CONFIG_SYS_HYPERVISOR is not set 372# CONFIG_SYS_HYPERVISOR is not set
354 373
355# 374#
@@ -370,6 +389,7 @@ CONFIG_FW_LOADER=y
370# 389#
371# Plug and Play support 390# Plug and Play support
372# 391#
392# CONFIG_PNPACPI is not set
373 393
374# 394#
375# Block devices 395# Block devices
@@ -393,6 +413,12 @@ CONFIG_BLK_DEV_INITRD=y
393# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
394 414
395# 415#
416# Misc devices
417#
418CONFIG_SGI_IOC4=m
419# CONFIG_TIFM_CORE is not set
420
421#
396# ATA/ATAPI/MFM/RLL support 422# ATA/ATAPI/MFM/RLL support
397# 423#
398CONFIG_IDE=y 424CONFIG_IDE=y
@@ -436,6 +462,7 @@ CONFIG_BLK_DEV_HPT366=y
436# CONFIG_BLK_DEV_JMICRON is not set 462# CONFIG_BLK_DEV_JMICRON is not set
437# CONFIG_BLK_DEV_SC1200 is not set 463# CONFIG_BLK_DEV_SC1200 is not set
438# CONFIG_BLK_DEV_PIIX is not set 464# CONFIG_BLK_DEV_PIIX is not set
465CONFIG_BLK_DEV_IT8213=m
439# CONFIG_BLK_DEV_IT821X is not set 466# CONFIG_BLK_DEV_IT821X is not set
440# CONFIG_BLK_DEV_NS87415 is not set 467# CONFIG_BLK_DEV_NS87415 is not set
441# CONFIG_BLK_DEV_PDC202XX_OLD is not set 468# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -445,6 +472,7 @@ CONFIG_BLK_DEV_HPT366=y
445# CONFIG_BLK_DEV_SLC90E66 is not set 472# CONFIG_BLK_DEV_SLC90E66 is not set
446# CONFIG_BLK_DEV_TRM290 is not set 473# CONFIG_BLK_DEV_TRM290 is not set
447# CONFIG_BLK_DEV_VIA82CXXX is not set 474# CONFIG_BLK_DEV_VIA82CXXX is not set
475CONFIG_BLK_DEV_TC86C001=m
448# CONFIG_IDE_ARM is not set 476# CONFIG_IDE_ARM is not set
449CONFIG_BLK_DEV_IDEDMA=y 477CONFIG_BLK_DEV_IDEDMA=y
450# CONFIG_IDEDMA_IVB is not set 478# CONFIG_IDEDMA_IVB is not set
@@ -456,6 +484,7 @@ CONFIG_BLK_DEV_IDEDMA=y
456# 484#
457# CONFIG_RAID_ATTRS is not set 485# CONFIG_RAID_ATTRS is not set
458CONFIG_SCSI=y 486CONFIG_SCSI=y
487CONFIG_SCSI_TGT=m
459CONFIG_SCSI_NETLINK=y 488CONFIG_SCSI_NETLINK=y
460CONFIG_SCSI_PROC_FS=y 489CONFIG_SCSI_PROC_FS=y
461 490
@@ -475,6 +504,7 @@ CONFIG_BLK_DEV_SD=y
475# CONFIG_SCSI_MULTI_LUN is not set 504# CONFIG_SCSI_MULTI_LUN is not set
476CONFIG_SCSI_CONSTANTS=y 505CONFIG_SCSI_CONSTANTS=y
477# CONFIG_SCSI_LOGGING is not set 506# CONFIG_SCSI_LOGGING is not set
507CONFIG_SCSI_SCAN_ASYNC=y
478 508
479# 509#
480# SCSI Transports 510# SCSI Transports
@@ -518,6 +548,7 @@ CONFIG_ISCSI_TCP=m
518# CONFIG_SCSI_DC390T is not set 548# CONFIG_SCSI_DC390T is not set
519# CONFIG_SCSI_NSP32 is not set 549# CONFIG_SCSI_NSP32 is not set
520# CONFIG_SCSI_DEBUG is not set 550# CONFIG_SCSI_DEBUG is not set
551# CONFIG_SCSI_SRP is not set
521 552
522# 553#
523# Serial ATA (prod) and Parallel ATA (experimental) drivers 554# Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -605,7 +636,7 @@ CONFIG_8139TOO_8129=y
605# CONFIG_SUNDANCE is not set 636# CONFIG_SUNDANCE is not set
606# CONFIG_TLAN is not set 637# CONFIG_TLAN is not set
607# CONFIG_VIA_RHINE is not set 638# CONFIG_VIA_RHINE is not set
608# CONFIG_LAN_SAA9730 is not set 639# CONFIG_SC92031 is not set
609 640
610# 641#
611# Ethernet (1000 Mbit) 642# Ethernet (1000 Mbit)
@@ -625,14 +656,17 @@ CONFIG_8139TOO_8129=y
625# CONFIG_TIGON3 is not set 656# CONFIG_TIGON3 is not set
626# CONFIG_BNX2 is not set 657# CONFIG_BNX2 is not set
627# CONFIG_QLA3XXX is not set 658# CONFIG_QLA3XXX is not set
659# CONFIG_ATL1 is not set
628 660
629# 661#
630# Ethernet (10000 Mbit) 662# Ethernet (10000 Mbit)
631# 663#
632# CONFIG_CHELSIO_T1 is not set 664# CONFIG_CHELSIO_T1 is not set
665CONFIG_CHELSIO_T3=m
633# CONFIG_IXGB is not set 666# CONFIG_IXGB is not set
634# CONFIG_S2IO is not set 667# CONFIG_S2IO is not set
635# CONFIG_MYRI10GE is not set 668# CONFIG_MYRI10GE is not set
669CONFIG_NETXEN_NIC=m
636 670
637# 671#
638# Token Ring devices 672# Token Ring devices
@@ -720,7 +754,10 @@ CONFIG_HW_CONSOLE=y
720# 754#
721# Non-8250 serial port support 755# Non-8250 serial port support
722# 756#
723# CONFIG_SERIAL_IP3106 is not set 757CONFIG_SERIAL_PNX8XXX=y
758CONFIG_SERIAL_PNX8XXX_CONSOLE=y
759CONFIG_SERIAL_CORE=y
760CONFIG_SERIAL_CORE_CONSOLE=y
724# CONFIG_SERIAL_JSM is not set 761# CONFIG_SERIAL_JSM is not set
725CONFIG_UNIX98_PTYS=y 762CONFIG_UNIX98_PTYS=y
726CONFIG_LEGACY_PTYS=y 763CONFIG_LEGACY_PTYS=y
@@ -741,10 +778,6 @@ CONFIG_HW_RANDOM=y
741# CONFIG_DTLK is not set 778# CONFIG_DTLK is not set
742# CONFIG_R3964 is not set 779# CONFIG_R3964 is not set
743# CONFIG_APPLICOM is not set 780# CONFIG_APPLICOM is not set
744
745#
746# Ftape, the floppy tape device driver
747#
748# CONFIG_DRM is not set 781# CONFIG_DRM is not set
749# CONFIG_RAW_DRIVER is not set 782# CONFIG_RAW_DRIVER is not set
750 783
@@ -752,7 +785,6 @@ CONFIG_HW_RANDOM=y
752# TPM devices 785# TPM devices
753# 786#
754# CONFIG_TCG_TPM is not set 787# CONFIG_TCG_TPM is not set
755# CONFIG_TELCLOCK is not set
756 788
757# 789#
758# I2C support 790# I2C support
@@ -768,6 +800,7 @@ CONFIG_HW_RANDOM=y
768# 800#
769# Dallas's 1-wire bus 801# Dallas's 1-wire bus
770# 802#
803# CONFIG_W1 is not set
771 804
772# 805#
773# Hardware Monitoring support 806# Hardware Monitoring support
@@ -776,15 +809,11 @@ CONFIG_HWMON=y
776# CONFIG_HWMON_VID is not set 809# CONFIG_HWMON_VID is not set
777# CONFIG_SENSORS_ABITUGURU is not set 810# CONFIG_SENSORS_ABITUGURU is not set
778# CONFIG_SENSORS_F71805F is not set 811# CONFIG_SENSORS_F71805F is not set
812# CONFIG_SENSORS_PC87427 is not set
779# CONFIG_SENSORS_VT1211 is not set 813# CONFIG_SENSORS_VT1211 is not set
780# CONFIG_HWMON_DEBUG_CHIP is not set 814# CONFIG_HWMON_DEBUG_CHIP is not set
781 815
782# 816#
783# Misc devices
784#
785# CONFIG_TIFM_CORE is not set
786
787#
788# Multimedia devices 817# Multimedia devices
789# 818#
790# CONFIG_VIDEO_DEV is not set 819# CONFIG_VIDEO_DEV is not set
@@ -814,6 +843,11 @@ CONFIG_DUMMY_CONSOLE=y
814# CONFIG_SOUND is not set 843# CONFIG_SOUND is not set
815 844
816# 845#
846# HID Devices
847#
848# CONFIG_HID is not set
849
850#
817# USB support 851# USB support
818# 852#
819CONFIG_USB_ARCH_HAS_HCD=y 853CONFIG_USB_ARCH_HAS_HCD=y
@@ -826,8 +860,8 @@ CONFIG_USB=y
826# Miscellaneous USB options 860# Miscellaneous USB options
827# 861#
828# CONFIG_USB_DEVICEFS is not set 862# CONFIG_USB_DEVICEFS is not set
829# CONFIG_USB_BANDWIDTH is not set
830# CONFIG_USB_DYNAMIC_MINORS is not set 863# CONFIG_USB_DYNAMIC_MINORS is not set
864# CONFIG_USB_SUSPEND is not set
831# CONFIG_USB_OTG is not set 865# CONFIG_USB_OTG is not set
832 866
833# 867#
@@ -836,7 +870,8 @@ CONFIG_USB=y
836# CONFIG_USB_EHCI_HCD is not set 870# CONFIG_USB_EHCI_HCD is not set
837# CONFIG_USB_ISP116X_HCD is not set 871# CONFIG_USB_ISP116X_HCD is not set
838CONFIG_USB_OHCI_HCD=y 872CONFIG_USB_OHCI_HCD=y
839# CONFIG_USB_OHCI_BIG_ENDIAN is not set 873# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
874# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
840CONFIG_USB_OHCI_LITTLE_ENDIAN=y 875CONFIG_USB_OHCI_LITTLE_ENDIAN=y
841# CONFIG_USB_UHCI_HCD is not set 876# CONFIG_USB_UHCI_HCD is not set
842# CONFIG_USB_SL811_HCD is not set 877# CONFIG_USB_SL811_HCD is not set
@@ -890,7 +925,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
890# CONFIG_USB_ATI_REMOTE2 is not set 925# CONFIG_USB_ATI_REMOTE2 is not set
891# CONFIG_USB_KEYSPAN_REMOTE is not set 926# CONFIG_USB_KEYSPAN_REMOTE is not set
892# CONFIG_USB_APPLETOUCH is not set 927# CONFIG_USB_APPLETOUCH is not set
893# CONFIG_USB_TRANCEVIBRATOR is not set 928# CONFIG_USB_GTCO is not set
894 929
895# 930#
896# USB Imaging devices 931# USB Imaging devices
@@ -905,6 +940,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
905# CONFIG_USB_KAWETH is not set 940# CONFIG_USB_KAWETH is not set
906# CONFIG_USB_PEGASUS is not set 941# CONFIG_USB_PEGASUS is not set
907# CONFIG_USB_RTL8150 is not set 942# CONFIG_USB_RTL8150 is not set
943# CONFIG_USB_USBNET_MII is not set
908# CONFIG_USB_USBNET is not set 944# CONFIG_USB_USBNET is not set
909CONFIG_USB_MON=y 945CONFIG_USB_MON=y
910 946
@@ -927,6 +963,7 @@ CONFIG_USB_MON=y
927# CONFIG_USB_RIO500 is not set 963# CONFIG_USB_RIO500 is not set
928# CONFIG_USB_LEGOTOWER is not set 964# CONFIG_USB_LEGOTOWER is not set
929# CONFIG_USB_LCD is not set 965# CONFIG_USB_LCD is not set
966# CONFIG_USB_BERRY_CHARGE is not set
930# CONFIG_USB_LED is not set 967# CONFIG_USB_LED is not set
931# CONFIG_USB_CYPRESS_CY7C63 is not set 968# CONFIG_USB_CYPRESS_CY7C63 is not set
932# CONFIG_USB_CYTHERM is not set 969# CONFIG_USB_CYTHERM is not set
@@ -935,6 +972,7 @@ CONFIG_USB_MON=y
935# CONFIG_USB_FTDI_ELAN is not set 972# CONFIG_USB_FTDI_ELAN is not set
936# CONFIG_USB_APPLEDISPLAY is not set 973# CONFIG_USB_APPLEDISPLAY is not set
937# CONFIG_USB_LD is not set 974# CONFIG_USB_LD is not set
975# CONFIG_USB_TRANCEVIBRATOR is not set
938 976
939# 977#
940# USB DSL modem support 978# USB DSL modem support
@@ -991,6 +1029,14 @@ CONFIG_USB_MON=y
991# 1029#
992 1030
993# 1031#
1032# Auxiliary Display support
1033#
1034
1035#
1036# Virtualization
1037#
1038
1039#
994# File systems 1040# File systems
995# 1041#
996CONFIG_EXT2_FS=y 1042CONFIG_EXT2_FS=y
@@ -1041,7 +1087,7 @@ CONFIG_TMPFS=y
1041# CONFIG_TMPFS_POSIX_ACL is not set 1087# CONFIG_TMPFS_POSIX_ACL is not set
1042# CONFIG_HUGETLB_PAGE is not set 1088# CONFIG_HUGETLB_PAGE is not set
1043CONFIG_RAMFS=y 1089CONFIG_RAMFS=y
1044# CONFIG_CONFIGFS_FS is not set 1090CONFIG_CONFIGFS_FS=m
1045 1091
1046# 1092#
1047# Miscellaneous filesystems 1093# Miscellaneous filesystems
@@ -1137,6 +1183,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1137# CONFIG_NLS_UTF8 is not set 1183# CONFIG_NLS_UTF8 is not set
1138 1184
1139# 1185#
1186# Distributed Lock Manager
1187#
1188CONFIG_DLM=m
1189CONFIG_DLM_TCP=y
1190# CONFIG_DLM_SCTP is not set
1191# CONFIG_DLM_DEBUG is not set
1192
1193#
1140# Profiling support 1194# Profiling support
1141# 1195#
1142# CONFIG_PROFILING is not set 1196# CONFIG_PROFILING is not set
@@ -1149,33 +1203,35 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1149CONFIG_ENABLE_MUST_CHECK=y 1203CONFIG_ENABLE_MUST_CHECK=y
1150CONFIG_MAGIC_SYSRQ=y 1204CONFIG_MAGIC_SYSRQ=y
1151# CONFIG_UNUSED_SYMBOLS is not set 1205# CONFIG_UNUSED_SYMBOLS is not set
1206# CONFIG_DEBUG_FS is not set
1207# CONFIG_HEADERS_CHECK is not set
1152CONFIG_DEBUG_KERNEL=y 1208CONFIG_DEBUG_KERNEL=y
1209# CONFIG_DEBUG_SHIRQ is not set
1153CONFIG_LOG_BUF_SHIFT=14 1210CONFIG_LOG_BUF_SHIFT=14
1154CONFIG_DETECT_SOFTLOCKUP=y 1211CONFIG_DETECT_SOFTLOCKUP=y
1155# CONFIG_SCHEDSTATS is not set 1212# CONFIG_SCHEDSTATS is not set
1213# CONFIG_TIMER_STATS is not set
1156CONFIG_DEBUG_SLAB=y 1214CONFIG_DEBUG_SLAB=y
1157# CONFIG_DEBUG_SLAB_LEAK is not set 1215# CONFIG_DEBUG_SLAB_LEAK is not set
1158# CONFIG_DEBUG_RT_MUTEXES is not set 1216# CONFIG_DEBUG_RT_MUTEXES is not set
1159# CONFIG_RT_MUTEX_TESTER is not set 1217# CONFIG_RT_MUTEX_TESTER is not set
1160# CONFIG_DEBUG_SPINLOCK is not set 1218# CONFIG_DEBUG_SPINLOCK is not set
1161CONFIG_DEBUG_MUTEXES=y 1219CONFIG_DEBUG_MUTEXES=y
1162# CONFIG_DEBUG_RWSEMS is not set
1163# CONFIG_DEBUG_LOCK_ALLOC is not set 1220# CONFIG_DEBUG_LOCK_ALLOC is not set
1164# CONFIG_PROVE_LOCKING is not set 1221# CONFIG_PROVE_LOCKING is not set
1165# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1222# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1166# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1223# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1167# CONFIG_DEBUG_KOBJECT is not set 1224# CONFIG_DEBUG_KOBJECT is not set
1168# CONFIG_DEBUG_INFO is not set 1225# CONFIG_DEBUG_INFO is not set
1169# CONFIG_DEBUG_FS is not set
1170# CONFIG_DEBUG_VM is not set 1226# CONFIG_DEBUG_VM is not set
1171# CONFIG_DEBUG_LIST is not set 1227# CONFIG_DEBUG_LIST is not set
1172CONFIG_FORCED_INLINING=y 1228CONFIG_FORCED_INLINING=y
1173# CONFIG_HEADERS_CHECK is not set
1174# CONFIG_RCU_TORTURE_TEST is not set 1229# CONFIG_RCU_TORTURE_TEST is not set
1175CONFIG_CROSSCOMPILE=y 1230CONFIG_CROSSCOMPILE=y
1176CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" 1231CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp"
1177# CONFIG_DEBUG_STACK_USAGE is not set 1232# CONFIG_DEBUG_STACK_USAGE is not set
1178# CONFIG_KGDB is not set 1233# CONFIG_KGDB is not set
1234CONFIG_SYS_SUPPORTS_KGDB=y
1179# CONFIG_RUNTIME_DEBUG is not set 1235# CONFIG_RUNTIME_DEBUG is not set
1180# CONFIG_MIPS_UNCACHED is not set 1236# CONFIG_MIPS_UNCACHED is not set
1181 1237
@@ -1189,21 +1245,27 @@ CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp"
1189# Cryptographic options 1245# Cryptographic options
1190# 1246#
1191CONFIG_CRYPTO=y 1247CONFIG_CRYPTO=y
1192CONFIG_CRYPTO_ALGAPI=m 1248CONFIG_CRYPTO_ALGAPI=y
1193CONFIG_CRYPTO_BLKCIPHER=m 1249CONFIG_CRYPTO_BLKCIPHER=m
1250CONFIG_CRYPTO_HASH=m
1194CONFIG_CRYPTO_MANAGER=m 1251CONFIG_CRYPTO_MANAGER=m
1195# CONFIG_CRYPTO_HMAC is not set 1252# CONFIG_CRYPTO_HMAC is not set
1253CONFIG_CRYPTO_XCBC=m
1196# CONFIG_CRYPTO_NULL is not set 1254# CONFIG_CRYPTO_NULL is not set
1197# CONFIG_CRYPTO_MD4 is not set 1255# CONFIG_CRYPTO_MD4 is not set
1198CONFIG_CRYPTO_MD5=m 1256CONFIG_CRYPTO_MD5=y
1199# CONFIG_CRYPTO_SHA1 is not set 1257# CONFIG_CRYPTO_SHA1 is not set
1200# CONFIG_CRYPTO_SHA256 is not set 1258# CONFIG_CRYPTO_SHA256 is not set
1201# CONFIG_CRYPTO_SHA512 is not set 1259# CONFIG_CRYPTO_SHA512 is not set
1202# CONFIG_CRYPTO_WP512 is not set 1260# CONFIG_CRYPTO_WP512 is not set
1203# CONFIG_CRYPTO_TGR192 is not set 1261# CONFIG_CRYPTO_TGR192 is not set
1262CONFIG_CRYPTO_GF128MUL=m
1204CONFIG_CRYPTO_ECB=m 1263CONFIG_CRYPTO_ECB=m
1205CONFIG_CRYPTO_CBC=m 1264CONFIG_CRYPTO_CBC=m
1265CONFIG_CRYPTO_PCBC=m
1266CONFIG_CRYPTO_LRW=m
1206# CONFIG_CRYPTO_DES is not set 1267# CONFIG_CRYPTO_DES is not set
1268CONFIG_CRYPTO_FCRYPT=m
1207# CONFIG_CRYPTO_BLOWFISH is not set 1269# CONFIG_CRYPTO_BLOWFISH is not set
1208# CONFIG_CRYPTO_TWOFISH is not set 1270# CONFIG_CRYPTO_TWOFISH is not set
1209# CONFIG_CRYPTO_SERPENT is not set 1271# CONFIG_CRYPTO_SERPENT is not set
@@ -1217,6 +1279,7 @@ CONFIG_CRYPTO_CBC=m
1217# CONFIG_CRYPTO_DEFLATE is not set 1279# CONFIG_CRYPTO_DEFLATE is not set
1218# CONFIG_CRYPTO_MICHAEL_MIC is not set 1280# CONFIG_CRYPTO_MICHAEL_MIC is not set
1219CONFIG_CRYPTO_CRC32C=m 1281CONFIG_CRYPTO_CRC32C=m
1282CONFIG_CRYPTO_CAMELLIA=m
1220# CONFIG_CRYPTO_TEST is not set 1283# CONFIG_CRYPTO_TEST is not set
1221 1284
1222# 1285#
@@ -1226,8 +1289,11 @@ CONFIG_CRYPTO_CRC32C=m
1226# 1289#
1227# Library routines 1290# Library routines
1228# 1291#
1292CONFIG_BITREVERSE=y
1229CONFIG_CRC_CCITT=m 1293CONFIG_CRC_CCITT=m
1230# CONFIG_CRC16 is not set 1294# CONFIG_CRC16 is not set
1231CONFIG_CRC32=y 1295CONFIG_CRC32=y
1232CONFIG_LIBCRC32C=m 1296CONFIG_LIBCRC32C=m
1233CONFIG_PLIST=y 1297CONFIG_PLIST=y
1298CONFIG_HAS_IOMEM=y
1299CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index f38a2c123037..8caa2cd1aa7c 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19 3# Linux kernel version: 2.6.20
4# Thu Dec 7 16:35:12 2006 4# Tue Feb 20 21:47:38 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -58,17 +59,19 @@ CONFIG_PNX8550_STB810=y
58# CONFIG_SIBYTE_LITTLESUR is not set 59# CONFIG_SIBYTE_LITTLESUR is not set
59# CONFIG_SIBYTE_CRHINE is not set 60# CONFIG_SIBYTE_CRHINE is not set
60# CONFIG_SIBYTE_CRHONE is not set 61# CONFIG_SIBYTE_CRHONE is not set
61# CONFIG_SNI_RM200_PCI is not set 62# CONFIG_SNI_RM is not set
62# CONFIG_TOSHIBA_JMR3927 is not set 63# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
65# CONFIG_KEXEC is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
70CONFIG_GENERIC_TIME=y 72CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
72CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
74# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
@@ -136,6 +139,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 139# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 140CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 141# CONFIG_RESOURCES_64BIT is not set
142CONFIG_ZONE_DMA_FLAG=1
139# CONFIG_HZ_48 is not set 143# CONFIG_HZ_48 is not set
140# CONFIG_HZ_100 is not set 144# CONFIG_HZ_100 is not set
141# CONFIG_HZ_128 is not set 145# CONFIG_HZ_128 is not set
@@ -148,6 +152,7 @@ CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y 152CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set 153# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set 154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
151CONFIG_LOCKDEP_SUPPORT=y 156CONFIG_LOCKDEP_SUPPORT=y
152CONFIG_STACKTRACE_SUPPORT=y 157CONFIG_STACKTRACE_SUPPORT=y
153CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -167,6 +172,7 @@ CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y 172CONFIG_SWAP=y
168CONFIG_SYSVIPC=y 173CONFIG_SYSVIPC=y
169# CONFIG_IPC_NS is not set 174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
170# CONFIG_POSIX_MQUEUE is not set 176# CONFIG_POSIX_MQUEUE is not set
171# CONFIG_BSD_PROCESS_ACCT is not set 177# CONFIG_BSD_PROCESS_ACCT is not set
172# CONFIG_TASKSTATS is not set 178# CONFIG_TASKSTATS is not set
@@ -234,7 +240,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
234# 240#
235CONFIG_HW_HAS_PCI=y 241CONFIG_HW_HAS_PCI=y
236CONFIG_PCI=y 242CONFIG_PCI=y
237# CONFIG_PCI_MULTITHREAD_PROBE is not set
238# CONFIG_PCI_DEBUG is not set 243# CONFIG_PCI_DEBUG is not set
239CONFIG_MMU=y 244CONFIG_MMU=y
240 245
@@ -254,6 +259,14 @@ CONFIG_BINFMT_ELF=y
254CONFIG_TRAD_SIGNALS=y 259CONFIG_TRAD_SIGNALS=y
255 260
256# 261#
262# Power management options
263#
264CONFIG_PM=y
265# CONFIG_PM_LEGACY is not set
266# CONFIG_PM_DEBUG is not set
267# CONFIG_PM_SYSFS_DEPRECATED is not set
268
269#
257# Networking 270# Networking
258# 271#
259CONFIG_NET=y 272CONFIG_NET=y
@@ -268,6 +281,7 @@ CONFIG_UNIX=y
268CONFIG_XFRM=y 281CONFIG_XFRM=y
269# CONFIG_XFRM_USER is not set 282# CONFIG_XFRM_USER is not set
270# CONFIG_XFRM_SUB_POLICY is not set 283# CONFIG_XFRM_SUB_POLICY is not set
284CONFIG_XFRM_MIGRATE=y
271# CONFIG_NET_KEY is not set 285# CONFIG_NET_KEY is not set
272CONFIG_INET=y 286CONFIG_INET=y
273# CONFIG_IP_MULTICAST is not set 287# CONFIG_IP_MULTICAST is not set
@@ -351,6 +365,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
351CONFIG_STANDALONE=y 365CONFIG_STANDALONE=y
352CONFIG_PREVENT_FIRMWARE_BUILD=y 366CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_DEBUG_DRIVER is not set 367# CONFIG_DEBUG_DRIVER is not set
368# CONFIG_DEBUG_DEVRES is not set
354# CONFIG_SYS_HYPERVISOR is not set 369# CONFIG_SYS_HYPERVISOR is not set
355 370
356# 371#
@@ -371,6 +386,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
371# 386#
372# Plug and Play support 387# Plug and Play support
373# 388#
389# CONFIG_PNPACPI is not set
374 390
375# 391#
376# Block devices 392# Block devices
@@ -443,6 +459,7 @@ CONFIG_BLK_DEV_HPT366=y
443# CONFIG_BLK_DEV_JMICRON is not set 459# CONFIG_BLK_DEV_JMICRON is not set
444# CONFIG_BLK_DEV_SC1200 is not set 460# CONFIG_BLK_DEV_SC1200 is not set
445# CONFIG_BLK_DEV_PIIX is not set 461# CONFIG_BLK_DEV_PIIX is not set
462CONFIG_BLK_DEV_IT8213=m
446# CONFIG_BLK_DEV_IT821X is not set 463# CONFIG_BLK_DEV_IT821X is not set
447# CONFIG_BLK_DEV_NS87415 is not set 464# CONFIG_BLK_DEV_NS87415 is not set
448# CONFIG_BLK_DEV_PDC202XX_OLD is not set 465# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -452,6 +469,7 @@ CONFIG_BLK_DEV_HPT366=y
452# CONFIG_BLK_DEV_SLC90E66 is not set 469# CONFIG_BLK_DEV_SLC90E66 is not set
453# CONFIG_BLK_DEV_TRM290 is not set 470# CONFIG_BLK_DEV_TRM290 is not set
454# CONFIG_BLK_DEV_VIA82CXXX is not set 471# CONFIG_BLK_DEV_VIA82CXXX is not set
472CONFIG_BLK_DEV_TC86C001=m
455# CONFIG_IDE_ARM is not set 473# CONFIG_IDE_ARM is not set
456CONFIG_BLK_DEV_IDEDMA=y 474CONFIG_BLK_DEV_IDEDMA=y
457# CONFIG_IDEDMA_IVB is not set 475# CONFIG_IDEDMA_IVB is not set
@@ -463,6 +481,7 @@ CONFIG_BLK_DEV_IDEDMA=y
463# 481#
464# CONFIG_RAID_ATTRS is not set 482# CONFIG_RAID_ATTRS is not set
465CONFIG_SCSI=y 483CONFIG_SCSI=y
484CONFIG_SCSI_TGT=m
466# CONFIG_SCSI_NETLINK is not set 485# CONFIG_SCSI_NETLINK is not set
467CONFIG_SCSI_PROC_FS=y 486CONFIG_SCSI_PROC_FS=y
468 487
@@ -482,6 +501,7 @@ CONFIG_BLK_DEV_SD=y
482# CONFIG_SCSI_MULTI_LUN is not set 501# CONFIG_SCSI_MULTI_LUN is not set
483CONFIG_SCSI_CONSTANTS=y 502CONFIG_SCSI_CONSTANTS=y
484# CONFIG_SCSI_LOGGING is not set 503# CONFIG_SCSI_LOGGING is not set
504CONFIG_SCSI_SCAN_ASYNC=y
485 505
486# 506#
487# SCSI Transports 507# SCSI Transports
@@ -525,6 +545,7 @@ CONFIG_ISCSI_TCP=m
525# CONFIG_SCSI_DC390T is not set 545# CONFIG_SCSI_DC390T is not set
526# CONFIG_SCSI_NSP32 is not set 546# CONFIG_SCSI_NSP32 is not set
527# CONFIG_SCSI_DEBUG is not set 547# CONFIG_SCSI_DEBUG is not set
548# CONFIG_SCSI_SRP is not set
528 549
529# 550#
530# Serial ATA (prod) and Parallel ATA (experimental) drivers 551# Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -608,6 +629,7 @@ CONFIG_NATSEMI=y
608# CONFIG_SUNDANCE is not set 629# CONFIG_SUNDANCE is not set
609# CONFIG_TLAN is not set 630# CONFIG_TLAN is not set
610# CONFIG_VIA_RHINE is not set 631# CONFIG_VIA_RHINE is not set
632# CONFIG_SC92031 is not set
611 633
612# 634#
613# Ethernet (1000 Mbit) 635# Ethernet (1000 Mbit)
@@ -627,11 +649,13 @@ CONFIG_NATSEMI=y
627# CONFIG_TIGON3 is not set 649# CONFIG_TIGON3 is not set
628# CONFIG_BNX2 is not set 650# CONFIG_BNX2 is not set
629# CONFIG_QLA3XXX is not set 651# CONFIG_QLA3XXX is not set
652# CONFIG_ATL1 is not set
630 653
631# 654#
632# Ethernet (10000 Mbit) 655# Ethernet (10000 Mbit)
633# 656#
634# CONFIG_CHELSIO_T1 is not set 657# CONFIG_CHELSIO_T1 is not set
658CONFIG_CHELSIO_T3=m
635# CONFIG_IXGB is not set 659# CONFIG_IXGB is not set
636# CONFIG_S2IO is not set 660# CONFIG_S2IO is not set
637# CONFIG_MYRI10GE is not set 661# CONFIG_MYRI10GE is not set
@@ -775,6 +799,7 @@ CONFIG_HWMON=y
775# CONFIG_HWMON_VID is not set 799# CONFIG_HWMON_VID is not set
776# CONFIG_SENSORS_ABITUGURU is not set 800# CONFIG_SENSORS_ABITUGURU is not set
777# CONFIG_SENSORS_F71805F is not set 801# CONFIG_SENSORS_F71805F is not set
802# CONFIG_SENSORS_PC87427 is not set
778# CONFIG_SENSORS_VT1211 is not set 803# CONFIG_SENSORS_VT1211 is not set
779# CONFIG_HWMON_DEBUG_CHIP is not set 804# CONFIG_HWMON_DEBUG_CHIP is not set
780 805
@@ -808,6 +833,11 @@ CONFIG_DUMMY_CONSOLE=y
808# CONFIG_SOUND is not set 833# CONFIG_SOUND is not set
809 834
810# 835#
836# HID Devices
837#
838# CONFIG_HID is not set
839
840#
811# USB support 841# USB support
812# 842#
813CONFIG_USB_ARCH_HAS_HCD=y 843CONFIG_USB_ARCH_HAS_HCD=y
@@ -820,9 +850,8 @@ CONFIG_USB=y
820# Miscellaneous USB options 850# Miscellaneous USB options
821# 851#
822# CONFIG_USB_DEVICEFS is not set 852# CONFIG_USB_DEVICEFS is not set
823# CONFIG_USB_BANDWIDTH is not set
824# CONFIG_USB_DYNAMIC_MINORS is not set 853# CONFIG_USB_DYNAMIC_MINORS is not set
825# CONFIG_USB_MULTITHREAD_PROBE is not set 854# CONFIG_USB_SUSPEND is not set
826# CONFIG_USB_OTG is not set 855# CONFIG_USB_OTG is not set
827 856
828# 857#
@@ -831,7 +860,8 @@ CONFIG_USB=y
831# CONFIG_USB_EHCI_HCD is not set 860# CONFIG_USB_EHCI_HCD is not set
832# CONFIG_USB_ISP116X_HCD is not set 861# CONFIG_USB_ISP116X_HCD is not set
833CONFIG_USB_OHCI_HCD=y 862CONFIG_USB_OHCI_HCD=y
834# CONFIG_USB_OHCI_BIG_ENDIAN is not set 863# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
864# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
835CONFIG_USB_OHCI_LITTLE_ENDIAN=y 865CONFIG_USB_OHCI_LITTLE_ENDIAN=y
836# CONFIG_USB_UHCI_HCD is not set 866# CONFIG_USB_UHCI_HCD is not set
837# CONFIG_USB_SL811_HCD is not set 867# CONFIG_USB_SL811_HCD is not set
@@ -885,6 +915,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
885# CONFIG_USB_ATI_REMOTE2 is not set 915# CONFIG_USB_ATI_REMOTE2 is not set
886# CONFIG_USB_KEYSPAN_REMOTE is not set 916# CONFIG_USB_KEYSPAN_REMOTE is not set
887# CONFIG_USB_APPLETOUCH is not set 917# CONFIG_USB_APPLETOUCH is not set
918# CONFIG_USB_GTCO is not set
888 919
889# 920#
890# USB Imaging devices 921# USB Imaging devices
@@ -922,6 +953,7 @@ CONFIG_USB_MON=y
922# CONFIG_USB_RIO500 is not set 953# CONFIG_USB_RIO500 is not set
923# CONFIG_USB_LEGOTOWER is not set 954# CONFIG_USB_LEGOTOWER is not set
924# CONFIG_USB_LCD is not set 955# CONFIG_USB_LCD is not set
956# CONFIG_USB_BERRY_CHARGE is not set
925# CONFIG_USB_LED is not set 957# CONFIG_USB_LED is not set
926# CONFIG_USB_CYPRESS_CY7C63 is not set 958# CONFIG_USB_CYPRESS_CY7C63 is not set
927# CONFIG_USB_CYTHERM is not set 959# CONFIG_USB_CYTHERM is not set
@@ -987,6 +1019,14 @@ CONFIG_USB_MON=y
987# 1019#
988 1020
989# 1021#
1022# Auxiliary Display support
1023#
1024
1025#
1026# Virtualization
1027#
1028
1029#
990# File systems 1030# File systems
991# 1031#
992CONFIG_EXT2_FS=y 1032CONFIG_EXT2_FS=y
@@ -1037,7 +1077,7 @@ CONFIG_TMPFS=y
1037# CONFIG_TMPFS_POSIX_ACL is not set 1077# CONFIG_TMPFS_POSIX_ACL is not set
1038# CONFIG_HUGETLB_PAGE is not set 1078# CONFIG_HUGETLB_PAGE is not set
1039CONFIG_RAMFS=y 1079CONFIG_RAMFS=y
1040# CONFIG_CONFIGFS_FS is not set 1080CONFIG_CONFIGFS_FS=m
1041 1081
1042# 1082#
1043# Miscellaneous filesystems 1083# Miscellaneous filesystems
@@ -1133,6 +1173,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1133# CONFIG_NLS_UTF8 is not set 1173# CONFIG_NLS_UTF8 is not set
1134 1174
1135# 1175#
1176# Distributed Lock Manager
1177#
1178CONFIG_DLM=m
1179CONFIG_DLM_TCP=y
1180# CONFIG_DLM_SCTP is not set
1181# CONFIG_DLM_DEBUG is not set
1182
1183#
1136# Profiling support 1184# Profiling support
1137# 1185#
1138# CONFIG_PROFILING is not set 1186# CONFIG_PROFILING is not set
@@ -1145,33 +1193,35 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1145CONFIG_ENABLE_MUST_CHECK=y 1193CONFIG_ENABLE_MUST_CHECK=y
1146CONFIG_MAGIC_SYSRQ=y 1194CONFIG_MAGIC_SYSRQ=y
1147# CONFIG_UNUSED_SYMBOLS is not set 1195# CONFIG_UNUSED_SYMBOLS is not set
1196# CONFIG_DEBUG_FS is not set
1197CONFIG_HEADERS_CHECK=y
1148CONFIG_DEBUG_KERNEL=y 1198CONFIG_DEBUG_KERNEL=y
1199# CONFIG_DEBUG_SHIRQ is not set
1149CONFIG_LOG_BUF_SHIFT=14 1200CONFIG_LOG_BUF_SHIFT=14
1150CONFIG_DETECT_SOFTLOCKUP=y 1201CONFIG_DETECT_SOFTLOCKUP=y
1151# CONFIG_SCHEDSTATS is not set 1202# CONFIG_SCHEDSTATS is not set
1203# CONFIG_TIMER_STATS is not set
1152CONFIG_DEBUG_SLAB=y 1204CONFIG_DEBUG_SLAB=y
1153# CONFIG_DEBUG_SLAB_LEAK is not set 1205# CONFIG_DEBUG_SLAB_LEAK is not set
1154# CONFIG_DEBUG_RT_MUTEXES is not set 1206# CONFIG_DEBUG_RT_MUTEXES is not set
1155# CONFIG_RT_MUTEX_TESTER is not set 1207# CONFIG_RT_MUTEX_TESTER is not set
1156# CONFIG_DEBUG_SPINLOCK is not set 1208# CONFIG_DEBUG_SPINLOCK is not set
1157# CONFIG_DEBUG_MUTEXES is not set 1209# CONFIG_DEBUG_MUTEXES is not set
1158# CONFIG_DEBUG_RWSEMS is not set
1159# CONFIG_DEBUG_LOCK_ALLOC is not set 1210# CONFIG_DEBUG_LOCK_ALLOC is not set
1160# CONFIG_PROVE_LOCKING is not set 1211# CONFIG_PROVE_LOCKING is not set
1161# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1212# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1162# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1213# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1163# CONFIG_DEBUG_KOBJECT is not set 1214# CONFIG_DEBUG_KOBJECT is not set
1164# CONFIG_DEBUG_INFO is not set 1215# CONFIG_DEBUG_INFO is not set
1165# CONFIG_DEBUG_FS is not set
1166# CONFIG_DEBUG_VM is not set 1216# CONFIG_DEBUG_VM is not set
1167# CONFIG_DEBUG_LIST is not set 1217# CONFIG_DEBUG_LIST is not set
1168CONFIG_FORCED_INLINING=y 1218CONFIG_FORCED_INLINING=y
1169CONFIG_HEADERS_CHECK=y
1170# CONFIG_RCU_TORTURE_TEST is not set 1219# CONFIG_RCU_TORTURE_TEST is not set
1171CONFIG_CROSSCOMPILE=y 1220CONFIG_CROSSCOMPILE=y
1172CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp" 1221CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp"
1173# CONFIG_DEBUG_STACK_USAGE is not set 1222# CONFIG_DEBUG_STACK_USAGE is not set
1174# CONFIG_KGDB is not set 1223# CONFIG_KGDB is not set
1224CONFIG_SYS_SUPPORTS_KGDB=y
1175# CONFIG_RUNTIME_DEBUG is not set 1225# CONFIG_RUNTIME_DEBUG is not set
1176# CONFIG_MIPS_UNCACHED is not set 1226# CONFIG_MIPS_UNCACHED is not set
1177 1227
@@ -1187,8 +1237,10 @@ CONFIG_CMDLINE="console=ttyS1,38400n8 kgdb=ttyS0 root=/dev/nfs ip=bootp"
1187CONFIG_CRYPTO=y 1237CONFIG_CRYPTO=y
1188CONFIG_CRYPTO_ALGAPI=m 1238CONFIG_CRYPTO_ALGAPI=m
1189CONFIG_CRYPTO_BLKCIPHER=m 1239CONFIG_CRYPTO_BLKCIPHER=m
1240CONFIG_CRYPTO_HASH=m
1190CONFIG_CRYPTO_MANAGER=m 1241CONFIG_CRYPTO_MANAGER=m
1191# CONFIG_CRYPTO_HMAC is not set 1242# CONFIG_CRYPTO_HMAC is not set
1243CONFIG_CRYPTO_XCBC=m
1192# CONFIG_CRYPTO_NULL is not set 1244# CONFIG_CRYPTO_NULL is not set
1193# CONFIG_CRYPTO_MD4 is not set 1245# CONFIG_CRYPTO_MD4 is not set
1194CONFIG_CRYPTO_MD5=m 1246CONFIG_CRYPTO_MD5=m
@@ -1197,9 +1249,13 @@ CONFIG_CRYPTO_MD5=m
1197# CONFIG_CRYPTO_SHA512 is not set 1249# CONFIG_CRYPTO_SHA512 is not set
1198# CONFIG_CRYPTO_WP512 is not set 1250# CONFIG_CRYPTO_WP512 is not set
1199# CONFIG_CRYPTO_TGR192 is not set 1251# CONFIG_CRYPTO_TGR192 is not set
1252CONFIG_CRYPTO_GF128MUL=m
1200CONFIG_CRYPTO_ECB=m 1253CONFIG_CRYPTO_ECB=m
1201CONFIG_CRYPTO_CBC=m 1254CONFIG_CRYPTO_CBC=m
1255CONFIG_CRYPTO_PCBC=m
1256CONFIG_CRYPTO_LRW=m
1202# CONFIG_CRYPTO_DES is not set 1257# CONFIG_CRYPTO_DES is not set
1258CONFIG_CRYPTO_FCRYPT=m
1203# CONFIG_CRYPTO_BLOWFISH is not set 1259# CONFIG_CRYPTO_BLOWFISH is not set
1204# CONFIG_CRYPTO_TWOFISH is not set 1260# CONFIG_CRYPTO_TWOFISH is not set
1205# CONFIG_CRYPTO_SERPENT is not set 1261# CONFIG_CRYPTO_SERPENT is not set
@@ -1213,6 +1269,7 @@ CONFIG_CRYPTO_CBC=m
1213# CONFIG_CRYPTO_DEFLATE is not set 1269# CONFIG_CRYPTO_DEFLATE is not set
1214# CONFIG_CRYPTO_MICHAEL_MIC is not set 1270# CONFIG_CRYPTO_MICHAEL_MIC is not set
1215CONFIG_CRYPTO_CRC32C=m 1271CONFIG_CRYPTO_CRC32C=m
1272CONFIG_CRYPTO_CAMELLIA=m
1216# CONFIG_CRYPTO_TEST is not set 1273# CONFIG_CRYPTO_TEST is not set
1217 1274
1218# 1275#
@@ -1222,8 +1279,11 @@ CONFIG_CRYPTO_CRC32C=m
1222# 1279#
1223# Library routines 1280# Library routines
1224# 1281#
1282CONFIG_BITREVERSE=y
1225CONFIG_CRC_CCITT=m 1283CONFIG_CRC_CCITT=m
1226# CONFIG_CRC16 is not set 1284# CONFIG_CRC16 is not set
1227CONFIG_CRC32=y 1285CONFIG_CRC32=y
1228CONFIG_LIBCRC32C=m 1286CONFIG_LIBCRC32C=m
1229CONFIG_PLIST=y 1287CONFIG_PLIST=y
1288CONFIG_HAS_IOMEM=y
1289CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig
index 5bc3248e50e4..43f1becec2a4 100644
--- a/arch/mips/configs/pnx8550-v2pci_defconfig
+++ b/arch/mips/configs/pnx8550-v2pci_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc2 3# Linux kernel version: 2.6.20
4# Sat Oct 14 23:12:15 2006 4# Tue Feb 20 21:47:39 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MIPS=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41CONFIG_PNX8550_V2PCI=y 42CONFIG_PNX8550_V2PCI=y
42# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -62,11 +64,14 @@ CONFIG_PNX8550_V2PCI=y
62# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
63# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
64CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
65CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
66CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
67CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
68CONFIG_GENERIC_TIME=y 72CONFIG_GENERIC_TIME=y
69CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
70CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
71CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
72# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
@@ -134,6 +139,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 139# CONFIG_SPARSEMEM_STATIC is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 140CONFIG_SPLIT_PTLOCK_CPUS=4
136# CONFIG_RESOURCES_64BIT is not set 141# CONFIG_RESOURCES_64BIT is not set
142CONFIG_ZONE_DMA_FLAG=1
137# CONFIG_HZ_48 is not set 143# CONFIG_HZ_48 is not set
138# CONFIG_HZ_100 is not set 144# CONFIG_HZ_100 is not set
139# CONFIG_HZ_128 is not set 145# CONFIG_HZ_128 is not set
@@ -146,6 +152,7 @@ CONFIG_HZ=250
146CONFIG_PREEMPT_NONE=y 152CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 153# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 154# CONFIG_PREEMPT is not set
155# CONFIG_KEXEC is not set
149CONFIG_LOCKDEP_SUPPORT=y 156CONFIG_LOCKDEP_SUPPORT=y
150CONFIG_STACKTRACE_SUPPORT=y 157CONFIG_STACKTRACE_SUPPORT=y
151CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,6 +172,7 @@ CONFIG_LOCALVERSION_AUTO=y
165CONFIG_SWAP=y 172CONFIG_SWAP=y
166CONFIG_SYSVIPC=y 173CONFIG_SYSVIPC=y
167# CONFIG_IPC_NS is not set 174# CONFIG_IPC_NS is not set
175CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 176# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 177# CONFIG_BSD_PROCESS_ACCT is not set
170# CONFIG_TASKSTATS is not set 178# CONFIG_TASKSTATS is not set
@@ -172,6 +180,7 @@ CONFIG_SYSVIPC=y
172# CONFIG_AUDIT is not set 180# CONFIG_AUDIT is not set
173CONFIG_IKCONFIG=y 181CONFIG_IKCONFIG=y
174CONFIG_IKCONFIG_PROC=y 182CONFIG_IKCONFIG_PROC=y
183CONFIG_SYSFS_DEPRECATED=y
175# CONFIG_RELAY is not set 184# CONFIG_RELAY is not set
176CONFIG_INITRAMFS_SOURCE="" 185CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 186# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -230,7 +239,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
230# 239#
231CONFIG_HW_HAS_PCI=y 240CONFIG_HW_HAS_PCI=y
232CONFIG_PCI=y 241CONFIG_PCI=y
233# CONFIG_PCI_MULTITHREAD_PROBE is not set
234CONFIG_MMU=y 242CONFIG_MMU=y
235 243
236# 244#
@@ -251,6 +259,14 @@ CONFIG_BINFMT_ELF=y
251CONFIG_TRAD_SIGNALS=y 259CONFIG_TRAD_SIGNALS=y
252 260
253# 261#
262# Power management options
263#
264CONFIG_PM=y
265# CONFIG_PM_LEGACY is not set
266# CONFIG_PM_DEBUG is not set
267# CONFIG_PM_SYSFS_DEPRECATED is not set
268
269#
254# Networking 270# Networking
255# 271#
256CONFIG_NET=y 272CONFIG_NET=y
@@ -265,6 +281,7 @@ CONFIG_UNIX=y
265CONFIG_XFRM=y 281CONFIG_XFRM=y
266# CONFIG_XFRM_USER is not set 282# CONFIG_XFRM_USER is not set
267# CONFIG_XFRM_SUB_POLICY is not set 283# CONFIG_XFRM_SUB_POLICY is not set
284CONFIG_XFRM_MIGRATE=y
268# CONFIG_NET_KEY is not set 285# CONFIG_NET_KEY is not set
269CONFIG_INET=y 286CONFIG_INET=y
270# CONFIG_IP_MULTICAST is not set 287# CONFIG_IP_MULTICAST is not set
@@ -282,7 +299,7 @@ CONFIG_IP_PNP=y
282# CONFIG_INET_ESP is not set 299# CONFIG_INET_ESP is not set
283# CONFIG_INET_IPCOMP is not set 300# CONFIG_INET_IPCOMP is not set
284# CONFIG_INET_XFRM_TUNNEL is not set 301# CONFIG_INET_XFRM_TUNNEL is not set
285# CONFIG_INET_TUNNEL is not set 302CONFIG_INET_TUNNEL=m
286CONFIG_INET_XFRM_MODE_TRANSPORT=y 303CONFIG_INET_XFRM_MODE_TRANSPORT=y
287CONFIG_INET_XFRM_MODE_TUNNEL=y 304CONFIG_INET_XFRM_MODE_TUNNEL=y
288CONFIG_INET_XFRM_MODE_BEET=y 305CONFIG_INET_XFRM_MODE_BEET=y
@@ -291,6 +308,7 @@ CONFIG_INET_TCP_DIAG=y
291# CONFIG_TCP_CONG_ADVANCED is not set 308# CONFIG_TCP_CONG_ADVANCED is not set
292CONFIG_TCP_CONG_CUBIC=y 309CONFIG_TCP_CONG_CUBIC=y
293CONFIG_DEFAULT_TCP_CONG="cubic" 310CONFIG_DEFAULT_TCP_CONG="cubic"
311CONFIG_TCP_MD5SIG=y
294 312
295# 313#
296# IP: Virtual Server Configuration 314# IP: Virtual Server Configuration
@@ -312,7 +330,6 @@ CONFIG_INET6_XFRM_MODE_BEET=m
312# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 330# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
313CONFIG_IPV6_SIT=m 331CONFIG_IPV6_SIT=m
314# CONFIG_IPV6_TUNNEL is not set 332# CONFIG_IPV6_TUNNEL is not set
315# CONFIG_IPV6_SUBTREES is not set
316# CONFIG_IPV6_MULTIPLE_TABLES is not set 333# CONFIG_IPV6_MULTIPLE_TABLES is not set
317# CONFIG_NETWORK_SECMARK is not set 334# CONFIG_NETWORK_SECMARK is not set
318CONFIG_NETFILTER=y 335CONFIG_NETFILTER=y
@@ -322,15 +339,38 @@ CONFIG_NETFILTER=y
322# Core Netfilter Configuration 339# Core Netfilter Configuration
323# 340#
324# CONFIG_NETFILTER_NETLINK is not set 341# CONFIG_NETFILTER_NETLINK is not set
325# CONFIG_NF_CONNTRACK is not set 342CONFIG_NF_CONNTRACK_ENABLED=m
343CONFIG_NF_CONNTRACK_SUPPORT=y
344# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
345CONFIG_NF_CONNTRACK=m
346CONFIG_NF_CT_ACCT=y
347CONFIG_NF_CONNTRACK_MARK=y
348CONFIG_NF_CONNTRACK_EVENTS=y
349CONFIG_NF_CT_PROTO_GRE=m
350CONFIG_NF_CT_PROTO_SCTP=m
351CONFIG_NF_CONNTRACK_AMANDA=m
352CONFIG_NF_CONNTRACK_FTP=m
353CONFIG_NF_CONNTRACK_H323=m
354CONFIG_NF_CONNTRACK_IRC=m
355# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
356CONFIG_NF_CONNTRACK_PPTP=m
357CONFIG_NF_CONNTRACK_SANE=m
358CONFIG_NF_CONNTRACK_SIP=m
359CONFIG_NF_CONNTRACK_TFTP=m
326CONFIG_NETFILTER_XTABLES=m 360CONFIG_NETFILTER_XTABLES=m
327CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 361CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
328CONFIG_NETFILTER_XT_TARGET_MARK=m 362CONFIG_NETFILTER_XT_TARGET_MARK=m
329CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 363CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
364CONFIG_NETFILTER_XT_TARGET_NFLOG=m
365CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
330CONFIG_NETFILTER_XT_MATCH_COMMENT=m 366CONFIG_NETFILTER_XT_MATCH_COMMENT=m
367CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
368CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
369CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
331CONFIG_NETFILTER_XT_MATCH_DCCP=m 370CONFIG_NETFILTER_XT_MATCH_DCCP=m
332# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 371# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
333CONFIG_NETFILTER_XT_MATCH_ESP=m 372CONFIG_NETFILTER_XT_MATCH_ESP=m
373CONFIG_NETFILTER_XT_MATCH_HELPER=m
334CONFIG_NETFILTER_XT_MATCH_LENGTH=m 374CONFIG_NETFILTER_XT_MATCH_LENGTH=m
335CONFIG_NETFILTER_XT_MATCH_LIMIT=m 375CONFIG_NETFILTER_XT_MATCH_LIMIT=m
336CONFIG_NETFILTER_XT_MATCH_MAC=m 376CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -341,14 +381,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
341# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set 381# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
342CONFIG_NETFILTER_XT_MATCH_REALM=m 382CONFIG_NETFILTER_XT_MATCH_REALM=m
343CONFIG_NETFILTER_XT_MATCH_SCTP=m 383CONFIG_NETFILTER_XT_MATCH_SCTP=m
384CONFIG_NETFILTER_XT_MATCH_STATE=m
344# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 385# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
345CONFIG_NETFILTER_XT_MATCH_STRING=m 386CONFIG_NETFILTER_XT_MATCH_STRING=m
346CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 387CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
388CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
347 389
348# 390#
349# IP: Netfilter Configuration 391# IP: Netfilter Configuration
350# 392#
351# CONFIG_IP_NF_CONNTRACK is not set 393CONFIG_NF_CONNTRACK_IPV4=m
394CONFIG_NF_CONNTRACK_PROC_COMPAT=y
352# CONFIG_IP_NF_QUEUE is not set 395# CONFIG_IP_NF_QUEUE is not set
353# CONFIG_IP_NF_IPTABLES is not set 396# CONFIG_IP_NF_IPTABLES is not set
354# CONFIG_IP_NF_ARPTABLES is not set 397# CONFIG_IP_NF_ARPTABLES is not set
@@ -356,6 +399,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
356# 399#
357# IPv6: Netfilter Configuration (EXPERIMENTAL) 400# IPv6: Netfilter Configuration (EXPERIMENTAL)
358# 401#
402CONFIG_NF_CONNTRACK_IPV6=m
359# CONFIG_IP6_NF_QUEUE is not set 403# CONFIG_IP6_NF_QUEUE is not set
360# CONFIG_IP6_NF_IPTABLES is not set 404# CONFIG_IP6_NF_IPTABLES is not set
361 405
@@ -430,6 +474,7 @@ CONFIG_FW_LOADER=y
430# 474#
431# Plug and Play support 475# Plug and Play support
432# 476#
477# CONFIG_PNPACPI is not set
433 478
434# 479#
435# Block devices 480# Block devices
@@ -453,6 +498,12 @@ CONFIG_BLK_DEV_INITRD=y
453# CONFIG_ATA_OVER_ETH is not set 498# CONFIG_ATA_OVER_ETH is not set
454 499
455# 500#
501# Misc devices
502#
503CONFIG_SGI_IOC4=m
504# CONFIG_TIFM_CORE is not set
505
506#
456# ATA/ATAPI/MFM/RLL support 507# ATA/ATAPI/MFM/RLL support
457# 508#
458CONFIG_IDE=y 509CONFIG_IDE=y
@@ -497,6 +548,7 @@ CONFIG_BLK_DEV_CMD64X=y
497# CONFIG_BLK_DEV_JMICRON is not set 548# CONFIG_BLK_DEV_JMICRON is not set
498# CONFIG_BLK_DEV_SC1200 is not set 549# CONFIG_BLK_DEV_SC1200 is not set
499# CONFIG_BLK_DEV_PIIX is not set 550# CONFIG_BLK_DEV_PIIX is not set
551CONFIG_BLK_DEV_IT8213=m
500# CONFIG_BLK_DEV_IT821X is not set 552# CONFIG_BLK_DEV_IT821X is not set
501# CONFIG_BLK_DEV_NS87415 is not set 553# CONFIG_BLK_DEV_NS87415 is not set
502# CONFIG_BLK_DEV_PDC202XX_OLD is not set 554# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -506,6 +558,7 @@ CONFIG_BLK_DEV_CMD64X=y
506# CONFIG_BLK_DEV_SLC90E66 is not set 558# CONFIG_BLK_DEV_SLC90E66 is not set
507# CONFIG_BLK_DEV_TRM290 is not set 559# CONFIG_BLK_DEV_TRM290 is not set
508# CONFIG_BLK_DEV_VIA82CXXX is not set 560# CONFIG_BLK_DEV_VIA82CXXX is not set
561CONFIG_BLK_DEV_TC86C001=m
509# CONFIG_IDE_ARM is not set 562# CONFIG_IDE_ARM is not set
510CONFIG_BLK_DEV_IDEDMA=y 563CONFIG_BLK_DEV_IDEDMA=y
511# CONFIG_IDEDMA_IVB is not set 564# CONFIG_IDEDMA_IVB is not set
@@ -517,6 +570,7 @@ CONFIG_IDEDMA_AUTO=y
517# 570#
518# CONFIG_RAID_ATTRS is not set 571# CONFIG_RAID_ATTRS is not set
519CONFIG_SCSI=y 572CONFIG_SCSI=y
573CONFIG_SCSI_TGT=m
520CONFIG_SCSI_NETLINK=y 574CONFIG_SCSI_NETLINK=y
521CONFIG_SCSI_PROC_FS=y 575CONFIG_SCSI_PROC_FS=y
522 576
@@ -536,6 +590,7 @@ CONFIG_BLK_DEV_SD=y
536# CONFIG_SCSI_MULTI_LUN is not set 590# CONFIG_SCSI_MULTI_LUN is not set
537# CONFIG_SCSI_CONSTANTS is not set 591# CONFIG_SCSI_CONSTANTS is not set
538# CONFIG_SCSI_LOGGING is not set 592# CONFIG_SCSI_LOGGING is not set
593CONFIG_SCSI_SCAN_ASYNC=y
539 594
540# 595#
541# SCSI Transports 596# SCSI Transports
@@ -584,6 +639,7 @@ CONFIG_AIC7XXX_DEBUG_MASK=0
584# CONFIG_SCSI_DC390T is not set 639# CONFIG_SCSI_DC390T is not set
585# CONFIG_SCSI_NSP32 is not set 640# CONFIG_SCSI_NSP32 is not set
586# CONFIG_SCSI_DEBUG is not set 641# CONFIG_SCSI_DEBUG is not set
642# CONFIG_SCSI_SRP is not set
587 643
588# 644#
589# Serial ATA (prod) and Parallel ATA (experimental) drivers 645# Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -671,7 +727,7 @@ CONFIG_8139TOO=y
671# CONFIG_SUNDANCE is not set 727# CONFIG_SUNDANCE is not set
672# CONFIG_TLAN is not set 728# CONFIG_TLAN is not set
673# CONFIG_VIA_RHINE is not set 729# CONFIG_VIA_RHINE is not set
674# CONFIG_LAN_SAA9730 is not set 730# CONFIG_SC92031 is not set
675 731
676# 732#
677# Ethernet (1000 Mbit) 733# Ethernet (1000 Mbit)
@@ -691,14 +747,17 @@ CONFIG_8139TOO=y
691# CONFIG_TIGON3 is not set 747# CONFIG_TIGON3 is not set
692# CONFIG_BNX2 is not set 748# CONFIG_BNX2 is not set
693# CONFIG_QLA3XXX is not set 749# CONFIG_QLA3XXX is not set
750# CONFIG_ATL1 is not set
694 751
695# 752#
696# Ethernet (10000 Mbit) 753# Ethernet (10000 Mbit)
697# 754#
698# CONFIG_CHELSIO_T1 is not set 755# CONFIG_CHELSIO_T1 is not set
756CONFIG_CHELSIO_T3=m
699# CONFIG_IXGB is not set 757# CONFIG_IXGB is not set
700# CONFIG_S2IO is not set 758# CONFIG_S2IO is not set
701# CONFIG_MYRI10GE is not set 759# CONFIG_MYRI10GE is not set
760CONFIG_NETXEN_NIC=m
702 761
703# 762#
704# Token Ring devices 763# Token Ring devices
@@ -804,6 +863,7 @@ CONFIG_SERIAL_NONSTANDARD=y
804# CONFIG_DIGIEPCA is not set 863# CONFIG_DIGIEPCA is not set
805# CONFIG_MOXA_INTELLIO is not set 864# CONFIG_MOXA_INTELLIO is not set
806# CONFIG_MOXA_SMARTIO is not set 865# CONFIG_MOXA_SMARTIO is not set
866CONFIG_MOXA_SMARTIO_NEW=m
807# CONFIG_ISI is not set 867# CONFIG_ISI is not set
808# CONFIG_SYNCLINKMP is not set 868# CONFIG_SYNCLINKMP is not set
809# CONFIG_SYNCLINK_GT is not set 869# CONFIG_SYNCLINK_GT is not set
@@ -822,7 +882,10 @@ CONFIG_SERIAL_NONSTANDARD=y
822# 882#
823# Non-8250 serial port support 883# Non-8250 serial port support
824# 884#
825# CONFIG_SERIAL_IP3106 is not set 885CONFIG_SERIAL_PNX8XXX=y
886CONFIG_SERIAL_PNX8XXX_CONSOLE=y
887CONFIG_SERIAL_CORE=y
888CONFIG_SERIAL_CORE_CONSOLE=y
826# CONFIG_SERIAL_JSM is not set 889# CONFIG_SERIAL_JSM is not set
827CONFIG_UNIX98_PTYS=y 890CONFIG_UNIX98_PTYS=y
828CONFIG_LEGACY_PTYS=y 891CONFIG_LEGACY_PTYS=y
@@ -843,10 +906,6 @@ CONFIG_HW_RANDOM=y
843# CONFIG_DTLK is not set 906# CONFIG_DTLK is not set
844# CONFIG_R3964 is not set 907# CONFIG_R3964 is not set
845# CONFIG_APPLICOM is not set 908# CONFIG_APPLICOM is not set
846
847#
848# Ftape, the floppy tape device driver
849#
850# CONFIG_DRM is not set 909# CONFIG_DRM is not set
851# CONFIG_RAW_DRIVER is not set 910# CONFIG_RAW_DRIVER is not set
852 911
@@ -854,7 +913,6 @@ CONFIG_HW_RANDOM=y
854# TPM devices 913# TPM devices
855# 914#
856# CONFIG_TCG_TPM is not set 915# CONFIG_TCG_TPM is not set
857# CONFIG_TELCLOCK is not set
858 916
859# 917#
860# I2C support 918# I2C support
@@ -883,6 +941,7 @@ CONFIG_I2C_ALGOBIT=m
883# CONFIG_I2C_NFORCE2 is not set 941# CONFIG_I2C_NFORCE2 is not set
884# CONFIG_I2C_OCORES is not set 942# CONFIG_I2C_OCORES is not set
885# CONFIG_I2C_PARPORT_LIGHT is not set 943# CONFIG_I2C_PARPORT_LIGHT is not set
944# CONFIG_I2C_PASEMI is not set
886# CONFIG_I2C_PROSAVAGE is not set 945# CONFIG_I2C_PROSAVAGE is not set
887# CONFIG_I2C_SAVAGE4 is not set 946# CONFIG_I2C_SAVAGE4 is not set
888# CONFIG_I2C_SIS5595 is not set 947# CONFIG_I2C_SIS5595 is not set
@@ -918,6 +977,7 @@ CONFIG_I2C_ALGOBIT=m
918# 977#
919# Dallas's 1-wire bus 978# Dallas's 1-wire bus
920# 979#
980# CONFIG_W1 is not set
921 981
922# 982#
923# Hardware Monitoring support 983# Hardware Monitoring support
@@ -928,6 +988,7 @@ CONFIG_HWMON=y
928# CONFIG_SENSORS_ADM1021 is not set 988# CONFIG_SENSORS_ADM1021 is not set
929# CONFIG_SENSORS_ADM1025 is not set 989# CONFIG_SENSORS_ADM1025 is not set
930# CONFIG_SENSORS_ADM1026 is not set 990# CONFIG_SENSORS_ADM1026 is not set
991# CONFIG_SENSORS_ADM1029 is not set
931# CONFIG_SENSORS_ADM1031 is not set 992# CONFIG_SENSORS_ADM1031 is not set
932# CONFIG_SENSORS_ADM9240 is not set 993# CONFIG_SENSORS_ADM9240 is not set
933# CONFIG_SENSORS_ASB100 is not set 994# CONFIG_SENSORS_ASB100 is not set
@@ -951,6 +1012,7 @@ CONFIG_HWMON=y
951# CONFIG_SENSORS_LM92 is not set 1012# CONFIG_SENSORS_LM92 is not set
952# CONFIG_SENSORS_MAX1619 is not set 1013# CONFIG_SENSORS_MAX1619 is not set
953# CONFIG_SENSORS_PC87360 is not set 1014# CONFIG_SENSORS_PC87360 is not set
1015# CONFIG_SENSORS_PC87427 is not set
954# CONFIG_SENSORS_SIS5595 is not set 1016# CONFIG_SENSORS_SIS5595 is not set
955# CONFIG_SENSORS_SMSC47M1 is not set 1017# CONFIG_SENSORS_SMSC47M1 is not set
956# CONFIG_SENSORS_SMSC47M192 is not set 1018# CONFIG_SENSORS_SMSC47M192 is not set
@@ -961,17 +1023,13 @@ CONFIG_HWMON=y
961# CONFIG_SENSORS_W83781D is not set 1023# CONFIG_SENSORS_W83781D is not set
962# CONFIG_SENSORS_W83791D is not set 1024# CONFIG_SENSORS_W83791D is not set
963# CONFIG_SENSORS_W83792D is not set 1025# CONFIG_SENSORS_W83792D is not set
1026# CONFIG_SENSORS_W83793 is not set
964# CONFIG_SENSORS_W83L785TS is not set 1027# CONFIG_SENSORS_W83L785TS is not set
965# CONFIG_SENSORS_W83627HF is not set 1028# CONFIG_SENSORS_W83627HF is not set
966# CONFIG_SENSORS_W83627EHF is not set 1029# CONFIG_SENSORS_W83627EHF is not set
967# CONFIG_HWMON_DEBUG_CHIP is not set 1030# CONFIG_HWMON_DEBUG_CHIP is not set
968 1031
969# 1032#
970# Misc devices
971#
972# CONFIG_TIFM_CORE is not set
973
974#
975# Multimedia devices 1033# Multimedia devices
976# 1034#
977# CONFIG_VIDEO_DEV is not set 1035# CONFIG_VIDEO_DEV is not set
@@ -991,6 +1049,7 @@ CONFIG_FB=y
991# CONFIG_FB_CFB_FILLRECT is not set 1049# CONFIG_FB_CFB_FILLRECT is not set
992# CONFIG_FB_CFB_COPYAREA is not set 1050# CONFIG_FB_CFB_COPYAREA is not set
993# CONFIG_FB_CFB_IMAGEBLIT is not set 1051# CONFIG_FB_CFB_IMAGEBLIT is not set
1052# CONFIG_FB_SVGALIB is not set
994# CONFIG_FB_MACMODES is not set 1053# CONFIG_FB_MACMODES is not set
995# CONFIG_FB_BACKLIGHT is not set 1054# CONFIG_FB_BACKLIGHT is not set
996# CONFIG_FB_MODE_HELPERS is not set 1055# CONFIG_FB_MODE_HELPERS is not set
@@ -1007,6 +1066,7 @@ CONFIG_FB=y
1007# CONFIG_FB_RADEON is not set 1066# CONFIG_FB_RADEON is not set
1008# CONFIG_FB_ATY128 is not set 1067# CONFIG_FB_ATY128 is not set
1009# CONFIG_FB_ATY is not set 1068# CONFIG_FB_ATY is not set
1069# CONFIG_FB_S3 is not set
1010# CONFIG_FB_SAVAGE is not set 1070# CONFIG_FB_SAVAGE is not set
1011# CONFIG_FB_SIS is not set 1071# CONFIG_FB_SIS is not set
1012# CONFIG_FB_NEOMAGIC is not set 1072# CONFIG_FB_NEOMAGIC is not set
@@ -1036,6 +1096,12 @@ CONFIG_DUMMY_CONSOLE=y
1036# CONFIG_SOUND is not set 1096# CONFIG_SOUND is not set
1037 1097
1038# 1098#
1099# HID Devices
1100#
1101CONFIG_HID=y
1102# CONFIG_HID_DEBUG is not set
1103
1104#
1039# USB support 1105# USB support
1040# 1106#
1041CONFIG_USB_ARCH_HAS_HCD=y 1107CONFIG_USB_ARCH_HAS_HCD=y
@@ -1048,8 +1114,8 @@ CONFIG_USB=y
1048# Miscellaneous USB options 1114# Miscellaneous USB options
1049# 1115#
1050CONFIG_USB_DEVICEFS=y 1116CONFIG_USB_DEVICEFS=y
1051# CONFIG_USB_BANDWIDTH is not set
1052# CONFIG_USB_DYNAMIC_MINORS is not set 1117# CONFIG_USB_DYNAMIC_MINORS is not set
1118# CONFIG_USB_SUSPEND is not set
1053# CONFIG_USB_OTG is not set 1119# CONFIG_USB_OTG is not set
1054 1120
1055# 1121#
@@ -1085,7 +1151,6 @@ CONFIG_USB_STORAGE=y
1085# CONFIG_USB_STORAGE_SDDR55 is not set 1151# CONFIG_USB_STORAGE_SDDR55 is not set
1086# CONFIG_USB_STORAGE_JUMPSHOT is not set 1152# CONFIG_USB_STORAGE_JUMPSHOT is not set
1087# CONFIG_USB_STORAGE_ALAUDA is not set 1153# CONFIG_USB_STORAGE_ALAUDA is not set
1088# CONFIG_USB_STORAGE_ONETOUCH is not set
1089# CONFIG_USB_STORAGE_KARMA is not set 1154# CONFIG_USB_STORAGE_KARMA is not set
1090# CONFIG_USB_LIBUSUAL is not set 1155# CONFIG_USB_LIBUSUAL is not set
1091 1156
@@ -1093,7 +1158,6 @@ CONFIG_USB_STORAGE=y
1093# USB Input Devices 1158# USB Input Devices
1094# 1159#
1095CONFIG_USB_HID=y 1160CONFIG_USB_HID=y
1096CONFIG_USB_HIDINPUT=y
1097# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1161# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1098# CONFIG_HID_FF is not set 1162# CONFIG_HID_FF is not set
1099CONFIG_USB_HIDDEV=y 1163CONFIG_USB_HIDDEV=y
@@ -1109,7 +1173,7 @@ CONFIG_USB_HIDDEV=y
1109# CONFIG_USB_ATI_REMOTE2 is not set 1173# CONFIG_USB_ATI_REMOTE2 is not set
1110# CONFIG_USB_KEYSPAN_REMOTE is not set 1174# CONFIG_USB_KEYSPAN_REMOTE is not set
1111# CONFIG_USB_APPLETOUCH is not set 1175# CONFIG_USB_APPLETOUCH is not set
1112# CONFIG_USB_TRANCEVIBRATOR is not set 1176# CONFIG_USB_GTCO is not set
1113 1177
1114# 1178#
1115# USB Imaging devices 1179# USB Imaging devices
@@ -1124,6 +1188,7 @@ CONFIG_USB_HIDDEV=y
1124# CONFIG_USB_KAWETH is not set 1188# CONFIG_USB_KAWETH is not set
1125# CONFIG_USB_PEGASUS is not set 1189# CONFIG_USB_PEGASUS is not set
1126# CONFIG_USB_RTL8150 is not set 1190# CONFIG_USB_RTL8150 is not set
1191# CONFIG_USB_USBNET_MII is not set
1127# CONFIG_USB_USBNET is not set 1192# CONFIG_USB_USBNET is not set
1128CONFIG_USB_MON=y 1193CONFIG_USB_MON=y
1129 1194
@@ -1146,6 +1211,7 @@ CONFIG_USB_MON=y
1146# CONFIG_USB_RIO500 is not set 1211# CONFIG_USB_RIO500 is not set
1147# CONFIG_USB_LEGOTOWER is not set 1212# CONFIG_USB_LEGOTOWER is not set
1148# CONFIG_USB_LCD is not set 1213# CONFIG_USB_LCD is not set
1214# CONFIG_USB_BERRY_CHARGE is not set
1149# CONFIG_USB_LED is not set 1215# CONFIG_USB_LED is not set
1150# CONFIG_USB_CYPRESS_CY7C63 is not set 1216# CONFIG_USB_CYPRESS_CY7C63 is not set
1151# CONFIG_USB_CYTHERM is not set 1217# CONFIG_USB_CYTHERM is not set
@@ -1154,6 +1220,7 @@ CONFIG_USB_MON=y
1154# CONFIG_USB_FTDI_ELAN is not set 1220# CONFIG_USB_FTDI_ELAN is not set
1155# CONFIG_USB_APPLEDISPLAY is not set 1221# CONFIG_USB_APPLEDISPLAY is not set
1156# CONFIG_USB_LD is not set 1222# CONFIG_USB_LD is not set
1223# CONFIG_USB_TRANCEVIBRATOR is not set
1157# CONFIG_USB_TEST is not set 1224# CONFIG_USB_TEST is not set
1158 1225
1159# 1226#
@@ -1211,6 +1278,14 @@ CONFIG_USB_MON=y
1211# 1278#
1212 1279
1213# 1280#
1281# Auxiliary Display support
1282#
1283
1284#
1285# Virtualization
1286#
1287
1288#
1214# File systems 1289# File systems
1215# 1290#
1216CONFIG_EXT2_FS=y 1291CONFIG_EXT2_FS=y
@@ -1271,7 +1346,7 @@ CONFIG_TMPFS=y
1271# CONFIG_TMPFS_POSIX_ACL is not set 1346# CONFIG_TMPFS_POSIX_ACL is not set
1272# CONFIG_HUGETLB_PAGE is not set 1347# CONFIG_HUGETLB_PAGE is not set
1273CONFIG_RAMFS=y 1348CONFIG_RAMFS=y
1274# CONFIG_CONFIGFS_FS is not set 1349CONFIG_CONFIGFS_FS=m
1275 1350
1276# 1351#
1277# Miscellaneous filesystems 1352# Miscellaneous filesystems
@@ -1368,6 +1443,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1368# CONFIG_NLS_UTF8 is not set 1443# CONFIG_NLS_UTF8 is not set
1369 1444
1370# 1445#
1446# Distributed Lock Manager
1447#
1448CONFIG_DLM=m
1449CONFIG_DLM_TCP=y
1450# CONFIG_DLM_SCTP is not set
1451# CONFIG_DLM_DEBUG is not set
1452
1453#
1371# Profiling support 1454# Profiling support
1372# 1455#
1373# CONFIG_PROFILING is not set 1456# CONFIG_PROFILING is not set
@@ -1380,12 +1463,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1380CONFIG_ENABLE_MUST_CHECK=y 1463CONFIG_ENABLE_MUST_CHECK=y
1381# CONFIG_MAGIC_SYSRQ is not set 1464# CONFIG_MAGIC_SYSRQ is not set
1382# CONFIG_UNUSED_SYMBOLS is not set 1465# CONFIG_UNUSED_SYMBOLS is not set
1383# CONFIG_DEBUG_KERNEL is not set
1384CONFIG_LOG_BUF_SHIFT=14
1385# CONFIG_DEBUG_FS is not set 1466# CONFIG_DEBUG_FS is not set
1386# CONFIG_HEADERS_CHECK is not set 1467# CONFIG_HEADERS_CHECK is not set
1468# CONFIG_DEBUG_KERNEL is not set
1469CONFIG_LOG_BUF_SHIFT=14
1387CONFIG_CROSSCOMPILE=y 1470CONFIG_CROSSCOMPILE=y
1388CONFIG_CMDLINE="" 1471CONFIG_CMDLINE=""
1472CONFIG_SYS_SUPPORTS_KGDB=y
1389 1473
1390# 1474#
1391# Security options 1475# Security options
@@ -1397,21 +1481,27 @@ CONFIG_CMDLINE=""
1397# Cryptographic options 1481# Cryptographic options
1398# 1482#
1399CONFIG_CRYPTO=y 1483CONFIG_CRYPTO=y
1400CONFIG_CRYPTO_ALGAPI=m 1484CONFIG_CRYPTO_ALGAPI=y
1401CONFIG_CRYPTO_BLKCIPHER=m 1485CONFIG_CRYPTO_BLKCIPHER=m
1486CONFIG_CRYPTO_HASH=m
1402CONFIG_CRYPTO_MANAGER=m 1487CONFIG_CRYPTO_MANAGER=m
1403# CONFIG_CRYPTO_HMAC is not set 1488# CONFIG_CRYPTO_HMAC is not set
1489CONFIG_CRYPTO_XCBC=m
1404# CONFIG_CRYPTO_NULL is not set 1490# CONFIG_CRYPTO_NULL is not set
1405# CONFIG_CRYPTO_MD4 is not set 1491# CONFIG_CRYPTO_MD4 is not set
1406CONFIG_CRYPTO_MD5=m 1492CONFIG_CRYPTO_MD5=y
1407CONFIG_CRYPTO_SHA1=m 1493CONFIG_CRYPTO_SHA1=m
1408# CONFIG_CRYPTO_SHA256 is not set 1494# CONFIG_CRYPTO_SHA256 is not set
1409# CONFIG_CRYPTO_SHA512 is not set 1495# CONFIG_CRYPTO_SHA512 is not set
1410# CONFIG_CRYPTO_WP512 is not set 1496# CONFIG_CRYPTO_WP512 is not set
1411# CONFIG_CRYPTO_TGR192 is not set 1497# CONFIG_CRYPTO_TGR192 is not set
1498CONFIG_CRYPTO_GF128MUL=m
1412CONFIG_CRYPTO_ECB=m 1499CONFIG_CRYPTO_ECB=m
1413CONFIG_CRYPTO_CBC=m 1500CONFIG_CRYPTO_CBC=m
1501CONFIG_CRYPTO_PCBC=m
1502CONFIG_CRYPTO_LRW=m
1414# CONFIG_CRYPTO_DES is not set 1503# CONFIG_CRYPTO_DES is not set
1504CONFIG_CRYPTO_FCRYPT=m
1415# CONFIG_CRYPTO_BLOWFISH is not set 1505# CONFIG_CRYPTO_BLOWFISH is not set
1416# CONFIG_CRYPTO_TWOFISH is not set 1506# CONFIG_CRYPTO_TWOFISH is not set
1417# CONFIG_CRYPTO_SERPENT is not set 1507# CONFIG_CRYPTO_SERPENT is not set
@@ -1425,6 +1515,7 @@ CONFIG_CRYPTO_ARC4=m
1425# CONFIG_CRYPTO_DEFLATE is not set 1515# CONFIG_CRYPTO_DEFLATE is not set
1426# CONFIG_CRYPTO_MICHAEL_MIC is not set 1516# CONFIG_CRYPTO_MICHAEL_MIC is not set
1427CONFIG_CRYPTO_CRC32C=m 1517CONFIG_CRYPTO_CRC32C=m
1518CONFIG_CRYPTO_CAMELLIA=m
1428# CONFIG_CRYPTO_TEST is not set 1519# CONFIG_CRYPTO_TEST is not set
1429 1520
1430# 1521#
@@ -1434,6 +1525,7 @@ CONFIG_CRYPTO_CRC32C=m
1434# 1525#
1435# Library routines 1526# Library routines
1436# 1527#
1528CONFIG_BITREVERSE=y
1437CONFIG_CRC_CCITT=m 1529CONFIG_CRC_CCITT=m
1438# CONFIG_CRC16 is not set 1530# CONFIG_CRC16 is not set
1439CONFIG_CRC32=y 1531CONFIG_CRC32=y
@@ -1445,3 +1537,5 @@ CONFIG_TEXTSEARCH_KMP=m
1445CONFIG_TEXTSEARCH_BM=m 1537CONFIG_TEXTSEARCH_BM=m
1446CONFIG_TEXTSEARCH_FSM=m 1538CONFIG_TEXTSEARCH_FSM=m
1447CONFIG_PLIST=y 1539CONFIG_PLIST=y
1540CONFIG_HAS_IOMEM=y
1541CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig
index aa61f0f030a5..f68396d19f9a 100644
--- a/arch/mips/configs/qemu_defconfig
+++ b/arch/mips/configs/qemu_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:18 2006 4# Tue Feb 20 21:47:39 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,16 +64,21 @@ CONFIG_QEMU=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
71CONFIG_DMA_COHERENT=y 75CONFIG_DMA_COHERENT=y
72CONFIG_GENERIC_ISA_DMA=y 76CONFIG_GENERIC_ISA_DMA=y
73CONFIG_I8259=y 77CONFIG_I8259=y
74CONFIG_CPU_BIG_ENDIAN=y 78CONFIG_CPU_BIG_ENDIAN=y
75# CONFIG_CPU_LITTLE_ENDIAN is not set 79# CONFIG_CPU_LITTLE_ENDIAN is not set
76CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 80CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
77CONFIG_SWAP_IO_SPACE=y 82CONFIG_SWAP_IO_SPACE=y
78CONFIG_MIPS_L1_CACHE_SHIFT=5 83CONFIG_MIPS_L1_CACHE_SHIFT=5
79CONFIG_HAVE_STD_PC_SERIAL_PORT=y 84CONFIG_HAVE_STD_PC_SERIAL_PORT=y
@@ -117,8 +122,8 @@ CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_64KB is not set 122# CONFIG_PAGE_SIZE_64KB is not set
118CONFIG_CPU_HAS_PREFETCH=y 123CONFIG_CPU_HAS_PREFETCH=y
119CONFIG_MIPS_MT_DISABLED=y 124CONFIG_MIPS_MT_DISABLED=y
120# CONFIG_MIPS_MT_SMTC is not set
121# CONFIG_MIPS_MT_SMP is not set 125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_VPE_LOADER is not set 127# CONFIG_MIPS_VPE_LOADER is not set
123# CONFIG_64BIT_PHYS_ADDR is not set 128# CONFIG_64BIT_PHYS_ADDR is not set
124CONFIG_CPU_HAS_LLSC=y 129CONFIG_CPU_HAS_LLSC=y
@@ -130,9 +135,10 @@ CONFIG_ARCH_FLATMEM_ENABLE=y
130CONFIG_ARCH_SPARSEMEM_ENABLE=y 135CONFIG_ARCH_SPARSEMEM_ENABLE=y
131CONFIG_FLATMEM=y 136CONFIG_FLATMEM=y
132CONFIG_FLAT_NODE_MEM_MAP=y 137CONFIG_FLAT_NODE_MEM_MAP=y
133# CONFIG_SPARSEMEM_STATIC is not set 138CONFIG_SPARSEMEM_STATIC=y
134CONFIG_SPLIT_PTLOCK_CPUS=4 139CONFIG_SPLIT_PTLOCK_CPUS=4
135# CONFIG_RESOURCES_64BIT is not set 140# CONFIG_RESOURCES_64BIT is not set
141CONFIG_ZONE_DMA_FLAG=1
136# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
137CONFIG_HZ_100=y 143CONFIG_HZ_100=y
138# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -164,12 +170,15 @@ CONFIG_LOCALVERSION_AUTO=y
164# CONFIG_SWAP is not set 170# CONFIG_SWAP is not set
165# CONFIG_SYSVIPC is not set 171# CONFIG_SYSVIPC is not set
166# CONFIG_BSD_PROCESS_ACCT is not set 172# CONFIG_BSD_PROCESS_ACCT is not set
167CONFIG_SYSCTL=y 173# CONFIG_TASKSTATS is not set
174# CONFIG_UTS_NS is not set
168# CONFIG_AUDIT is not set 175# CONFIG_AUDIT is not set
169# CONFIG_IKCONFIG is not set 176# CONFIG_IKCONFIG is not set
177CONFIG_SYSFS_DEPRECATED=y
170CONFIG_RELAY=y 178CONFIG_RELAY=y
171CONFIG_INITRAMFS_SOURCE="" 179CONFIG_SYSCTL=y
172CONFIG_EMBEDDED=y 180CONFIG_EMBEDDED=y
181CONFIG_SYSCTL_SYSCALL=y
173CONFIG_KALLSYMS=y 182CONFIG_KALLSYMS=y
174# CONFIG_KALLSYMS_EXTRA_PASS is not set 183# CONFIG_KALLSYMS_EXTRA_PASS is not set
175# CONFIG_HOTPLUG is not set 184# CONFIG_HOTPLUG is not set
@@ -194,6 +203,7 @@ CONFIG_BASE_SMALL=1
194# 203#
195# Block layer 204# Block layer
196# 205#
206CONFIG_BLOCK=y
197# CONFIG_LBD is not set 207# CONFIG_LBD is not set
198# CONFIG_BLK_DEV_IO_TRACE is not set 208# CONFIG_BLK_DEV_IO_TRACE is not set
199# CONFIG_LSF is not set 209# CONFIG_LSF is not set
@@ -221,7 +231,6 @@ CONFIG_I8253=y
221# 231#
222# PCCARD (PCMCIA/CardBus) support 232# PCCARD (PCMCIA/CardBus) support
223# 233#
224# CONFIG_PCCARD is not set
225 234
226# 235#
227# PCI Hotplug Support 236# PCI Hotplug Support
@@ -235,6 +244,14 @@ CONFIG_BINFMT_ELF=y
235CONFIG_TRAD_SIGNALS=y 244CONFIG_TRAD_SIGNALS=y
236 245
237# 246#
247# Power management options
248#
249CONFIG_PM=y
250# CONFIG_PM_LEGACY is not set
251# CONFIG_PM_DEBUG is not set
252# CONFIG_PM_SYSFS_DEPRECATED is not set
253
254#
238# Networking 255# Networking
239# 256#
240CONFIG_NET=y 257CONFIG_NET=y
@@ -268,10 +285,12 @@ CONFIG_IP_PNP_BOOTP=y
268# CONFIG_INET_TUNNEL is not set 285# CONFIG_INET_TUNNEL is not set
269CONFIG_INET_XFRM_MODE_TRANSPORT=y 286CONFIG_INET_XFRM_MODE_TRANSPORT=y
270CONFIG_INET_XFRM_MODE_TUNNEL=y 287CONFIG_INET_XFRM_MODE_TUNNEL=y
288CONFIG_INET_XFRM_MODE_BEET=y
271CONFIG_INET_DIAG=y 289CONFIG_INET_DIAG=y
272CONFIG_INET_TCP_DIAG=y 290CONFIG_INET_TCP_DIAG=y
273# CONFIG_TCP_CONG_ADVANCED is not set 291# CONFIG_TCP_CONG_ADVANCED is not set
274CONFIG_TCP_CONG_BIC=y 292CONFIG_TCP_CONG_CUBIC=y
293CONFIG_DEFAULT_TCP_CONG="cubic"
275# CONFIG_IPV6 is not set 294# CONFIG_IPV6 is not set
276# CONFIG_INET6_XFRM_TUNNEL is not set 295# CONFIG_INET6_XFRM_TUNNEL is not set
277# CONFIG_INET6_TUNNEL is not set 296# CONFIG_INET6_TUNNEL is not set
@@ -307,7 +326,6 @@ CONFIG_NETWORK_SECMARK=y
307# 326#
308CONFIG_STANDALONE=y 327CONFIG_STANDALONE=y
309# CONFIG_PREVENT_FIRMWARE_BUILD is not set 328# CONFIG_PREVENT_FIRMWARE_BUILD is not set
310# CONFIG_FW_LOADER is not set
311# CONFIG_SYS_HYPERVISOR is not set 329# CONFIG_SYS_HYPERVISOR is not set
312 330
313# 331#
@@ -330,6 +348,7 @@ CONFIG_PROC_EVENTS=y
330# Plug and Play support 348# Plug and Play support
331# 349#
332# CONFIG_PNP is not set 350# CONFIG_PNP is not set
351# CONFIG_PNPACPI is not set
333 352
334# 353#
335# Block devices 354# Block devices
@@ -343,6 +362,10 @@ CONFIG_PROC_EVENTS=y
343# CONFIG_ATA_OVER_ETH is not set 362# CONFIG_ATA_OVER_ETH is not set
344 363
345# 364#
365# Misc devices
366#
367
368#
346# ATA/ATAPI/MFM/RLL support 369# ATA/ATAPI/MFM/RLL support
347# 370#
348# CONFIG_IDE is not set 371# CONFIG_IDE is not set
@@ -352,6 +375,12 @@ CONFIG_PROC_EVENTS=y
352# 375#
353# CONFIG_RAID_ATTRS is not set 376# CONFIG_RAID_ATTRS is not set
354# CONFIG_SCSI is not set 377# CONFIG_SCSI is not set
378# CONFIG_SCSI_NETLINK is not set
379
380#
381# Serial ATA (prod) and Parallel ATA (experimental) drivers
382#
383# CONFIG_ATA is not set
355 384
356# 385#
357# Old CD-ROM drivers (not SCSI, not IDE) 386# Old CD-ROM drivers (not SCSI, not IDE)
@@ -459,6 +488,7 @@ CONFIG_NE2000=y
459# Input device support 488# Input device support
460# 489#
461CONFIG_INPUT=y 490CONFIG_INPUT=y
491# CONFIG_INPUT_FF_MEMLESS is not set
462 492
463# 493#
464# Userland interfaces 494# Userland interfaces
@@ -525,10 +555,6 @@ CONFIG_LEGACY_PTY_COUNT=256
525# CONFIG_GEN_RTC is not set 555# CONFIG_GEN_RTC is not set
526# CONFIG_DTLK is not set 556# CONFIG_DTLK is not set
527# CONFIG_R3964 is not set 557# CONFIG_R3964 is not set
528
529#
530# Ftape, the floppy tape device driver
531#
532# CONFIG_RAW_DRIVER is not set 558# CONFIG_RAW_DRIVER is not set
533 559
534# 560#
@@ -558,14 +584,9 @@ CONFIG_LEGACY_PTY_COUNT=256
558# CONFIG_HWMON_VID is not set 584# CONFIG_HWMON_VID is not set
559 585
560# 586#
561# Misc devices
562#
563
564#
565# Multimedia devices 587# Multimedia devices
566# 588#
567# CONFIG_VIDEO_DEV is not set 589# CONFIG_VIDEO_DEV is not set
568CONFIG_VIDEO_V4L2=y
569 590
570# 591#
571# Digital Video Broadcasting Devices 592# Digital Video Broadcasting Devices
@@ -585,6 +606,7 @@ CONFIG_VGA_CONSOLE=y
585# CONFIG_VGACON_SOFT_SCROLLBACK is not set 606# CONFIG_VGACON_SOFT_SCROLLBACK is not set
586# CONFIG_MDA_CONSOLE is not set 607# CONFIG_MDA_CONSOLE is not set
587CONFIG_DUMMY_CONSOLE=y 608CONFIG_DUMMY_CONSOLE=y
609# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
588 610
589# 611#
590# Sound 612# Sound
@@ -592,6 +614,12 @@ CONFIG_DUMMY_CONSOLE=y
592# CONFIG_SOUND is not set 614# CONFIG_SOUND is not set
593 615
594# 616#
617# HID Devices
618#
619CONFIG_HID=y
620# CONFIG_HID_DEBUG is not set
621
622#
595# USB support 623# USB support
596# 624#
597# CONFIG_USB_ARCH_HAS_HCD is not set 625# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -651,14 +679,23 @@ CONFIG_DUMMY_CONSOLE=y
651# 679#
652 680
653# 681#
682# Auxiliary Display support
683#
684
685#
686# Virtualization
687#
688
689#
654# File systems 690# File systems
655# 691#
656# CONFIG_EXT2_FS is not set 692# CONFIG_EXT2_FS is not set
657# CONFIG_EXT3_FS is not set 693# CONFIG_EXT3_FS is not set
658# CONFIG_REISERFS_FS is not set 694# CONFIG_REISERFS_FS is not set
659# CONFIG_JFS_FS is not set 695# CONFIG_JFS_FS is not set
660# CONFIG_FS_POSIX_ACL is not set 696CONFIG_FS_POSIX_ACL=y
661# CONFIG_XFS_FS is not set 697# CONFIG_XFS_FS is not set
698# CONFIG_OCFS2_FS is not set
662# CONFIG_MINIX_FS is not set 699# CONFIG_MINIX_FS is not set
663# CONFIG_ROMFS_FS is not set 700# CONFIG_ROMFS_FS is not set
664CONFIG_INOTIFY=y 701CONFIG_INOTIFY=y
@@ -668,6 +705,7 @@ CONFIG_INOTIFY_USER=y
668# CONFIG_AUTOFS_FS is not set 705# CONFIG_AUTOFS_FS is not set
669# CONFIG_AUTOFS4_FS is not set 706# CONFIG_AUTOFS4_FS is not set
670CONFIG_FUSE_FS=y 707CONFIG_FUSE_FS=y
708CONFIG_GENERIC_ACL=y
671 709
672# 710#
673# CD-ROM/DVD Filesystems 711# CD-ROM/DVD Filesystems
@@ -687,8 +725,10 @@ CONFIG_FUSE_FS=y
687# 725#
688CONFIG_PROC_FS=y 726CONFIG_PROC_FS=y
689CONFIG_PROC_KCORE=y 727CONFIG_PROC_KCORE=y
728CONFIG_PROC_SYSCTL=y
690CONFIG_SYSFS=y 729CONFIG_SYSFS=y
691CONFIG_TMPFS=y 730CONFIG_TMPFS=y
731CONFIG_TMPFS_POSIX_ACL=y
692# CONFIG_HUGETLB_PAGE is not set 732# CONFIG_HUGETLB_PAGE is not set
693CONFIG_RAMFS=y 733CONFIG_RAMFS=y
694 734
@@ -709,6 +749,7 @@ CONFIG_RAMFS=y
709CONFIG_NFS_FS=y 749CONFIG_NFS_FS=y
710CONFIG_NFS_V3=y 750CONFIG_NFS_V3=y
711# CONFIG_NFS_V3_ACL is not set 751# CONFIG_NFS_V3_ACL is not set
752CONFIG_NFS_DIRECTIO=y
712# CONFIG_NFSD is not set 753# CONFIG_NFSD is not set
713CONFIG_ROOT_NFS=y 754CONFIG_ROOT_NFS=y
714CONFIG_LOCKD=y 755CONFIG_LOCKD=y
@@ -717,7 +758,6 @@ CONFIG_NFS_COMMON=y
717CONFIG_SUNRPC=y 758CONFIG_SUNRPC=y
718# CONFIG_SMB_FS is not set 759# CONFIG_SMB_FS is not set
719# CONFIG_CIFS is not set 760# CONFIG_CIFS is not set
720# CONFIG_CIFS_DEBUG2 is not set
721# CONFIG_NCP_FS is not set 761# CONFIG_NCP_FS is not set
722# CONFIG_CODA_FS is not set 762# CONFIG_CODA_FS is not set
723 763
@@ -737,12 +777,13 @@ CONFIG_MSDOS_PARTITION=y
737# 777#
738CONFIG_TRACE_IRQFLAGS_SUPPORT=y 778CONFIG_TRACE_IRQFLAGS_SUPPORT=y
739# CONFIG_PRINTK_TIME is not set 779# CONFIG_PRINTK_TIME is not set
780CONFIG_ENABLE_MUST_CHECK=y
740# CONFIG_MAGIC_SYSRQ is not set 781# CONFIG_MAGIC_SYSRQ is not set
741# CONFIG_UNUSED_SYMBOLS is not set 782# CONFIG_UNUSED_SYMBOLS is not set
783# CONFIG_DEBUG_FS is not set
784# CONFIG_HEADERS_CHECK is not set
742# CONFIG_DEBUG_KERNEL is not set 785# CONFIG_DEBUG_KERNEL is not set
743CONFIG_LOG_BUF_SHIFT=14 786CONFIG_LOG_BUF_SHIFT=14
744# CONFIG_DEBUG_FS is not set
745# CONFIG_UNWIND_INFO is not set
746CONFIG_CROSSCOMPILE=y 787CONFIG_CROSSCOMPILE=y
747CONFIG_CMDLINE="" 788CONFIG_CMDLINE=""
748 789
@@ -758,13 +799,12 @@ CONFIG_CMDLINE=""
758# CONFIG_CRYPTO is not set 799# CONFIG_CRYPTO is not set
759 800
760# 801#
761# Hardware crypto devices
762#
763
764#
765# Library routines 802# Library routines
766# 803#
804CONFIG_BITREVERSE=y
767# CONFIG_CRC_CCITT is not set 805# CONFIG_CRC_CCITT is not set
768# CONFIG_CRC16 is not set 806# CONFIG_CRC16 is not set
769CONFIG_CRC32=y 807CONFIG_CRC32=y
770# CONFIG_LIBCRC32C is not set 808# CONFIG_LIBCRC32C is not set
809CONFIG_HAS_IOMEM=y
810CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index f9e8f41d17f2..a6a824fcc874 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:19 2006 4# Tue Feb 20 21:47:39 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -71,10 +71,14 @@ CONFIG_TOSHIBA_RBTX4938_MPLEX_PIO58_61=y
71# CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND is not set 71# CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND is not set
72# CONFIG_TOSHIBA_RBTX4938_MPLEX_ATA is not set 72# CONFIG_TOSHIBA_RBTX4938_MPLEX_ATA is not set
73CONFIG_RWSEM_GENERIC_SPINLOCK=y 73CONFIG_RWSEM_GENERIC_SPINLOCK=y
74# CONFIG_ARCH_HAS_ILOG2_U32 is not set
75# CONFIG_ARCH_HAS_ILOG2_U64 is not set
74CONFIG_GENERIC_FIND_NEXT_BIT=y 76CONFIG_GENERIC_FIND_NEXT_BIT=y
75CONFIG_GENERIC_HWEIGHT=y 77CONFIG_GENERIC_HWEIGHT=y
76CONFIG_GENERIC_CALIBRATE_DELAY=y 78CONFIG_GENERIC_CALIBRATE_DELAY=y
79CONFIG_GENERIC_TIME=y
77CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 80CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
81CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
78CONFIG_DMA_NONCOHERENT=y 82CONFIG_DMA_NONCOHERENT=y
79CONFIG_DMA_NEED_PCI_MAP_STATE=y 83CONFIG_DMA_NEED_PCI_MAP_STATE=y
80CONFIG_GENERIC_ISA_DMA=y 84CONFIG_GENERIC_ISA_DMA=y
@@ -126,8 +130,8 @@ CONFIG_PAGE_SIZE_4KB=y
126# CONFIG_PAGE_SIZE_64KB is not set 130# CONFIG_PAGE_SIZE_64KB is not set
127CONFIG_CPU_HAS_PREFETCH=y 131CONFIG_CPU_HAS_PREFETCH=y
128CONFIG_MIPS_MT_DISABLED=y 132CONFIG_MIPS_MT_DISABLED=y
129# CONFIG_MIPS_MT_SMTC is not set
130# CONFIG_MIPS_MT_SMP is not set 133# CONFIG_MIPS_MT_SMP is not set
134# CONFIG_MIPS_MT_SMTC is not set
131# CONFIG_MIPS_VPE_LOADER is not set 135# CONFIG_MIPS_VPE_LOADER is not set
132CONFIG_CPU_HAS_LLSC=y 136CONFIG_CPU_HAS_LLSC=y
133CONFIG_CPU_HAS_SYNC=y 137CONFIG_CPU_HAS_SYNC=y
@@ -143,6 +147,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
143# CONFIG_SPARSEMEM_STATIC is not set 147# CONFIG_SPARSEMEM_STATIC is not set
144CONFIG_SPLIT_PTLOCK_CPUS=4 148CONFIG_SPLIT_PTLOCK_CPUS=4
145# CONFIG_RESOURCES_64BIT is not set 149# CONFIG_RESOURCES_64BIT is not set
150CONFIG_ZONE_DMA_FLAG=1
146# CONFIG_HZ_48 is not set 151# CONFIG_HZ_48 is not set
147# CONFIG_HZ_100 is not set 152# CONFIG_HZ_100 is not set
148# CONFIG_HZ_128 is not set 153# CONFIG_HZ_128 is not set
@@ -155,6 +160,7 @@ CONFIG_HZ=1000
155CONFIG_PREEMPT_NONE=y 160CONFIG_PREEMPT_NONE=y
156# CONFIG_PREEMPT_VOLUNTARY is not set 161# CONFIG_PREEMPT_VOLUNTARY is not set
157# CONFIG_PREEMPT is not set 162# CONFIG_PREEMPT is not set
163# CONFIG_KEXEC is not set
158CONFIG_LOCKDEP_SUPPORT=y 164CONFIG_LOCKDEP_SUPPORT=y
159CONFIG_STACKTRACE_SUPPORT=y 165CONFIG_STACKTRACE_SUPPORT=y
160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 166CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -173,16 +179,22 @@ CONFIG_LOCALVERSION=""
173CONFIG_LOCALVERSION_AUTO=y 179CONFIG_LOCALVERSION_AUTO=y
174CONFIG_SWAP=y 180CONFIG_SWAP=y
175CONFIG_SYSVIPC=y 181CONFIG_SYSVIPC=y
182# CONFIG_IPC_NS is not set
183CONFIG_SYSVIPC_SYSCTL=y
176# CONFIG_POSIX_MQUEUE is not set 184# CONFIG_POSIX_MQUEUE is not set
177# CONFIG_BSD_PROCESS_ACCT is not set 185# CONFIG_BSD_PROCESS_ACCT is not set
178CONFIG_SYSCTL=y 186# CONFIG_TASKSTATS is not set
187# CONFIG_UTS_NS is not set
179# CONFIG_AUDIT is not set 188# CONFIG_AUDIT is not set
180CONFIG_IKCONFIG=y 189CONFIG_IKCONFIG=y
181CONFIG_IKCONFIG_PROC=y 190CONFIG_IKCONFIG_PROC=y
191CONFIG_SYSFS_DEPRECATED=y
182CONFIG_RELAY=y 192CONFIG_RELAY=y
183CONFIG_INITRAMFS_SOURCE="" 193CONFIG_INITRAMFS_SOURCE=""
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 194# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
195CONFIG_SYSCTL=y
185CONFIG_EMBEDDED=y 196CONFIG_EMBEDDED=y
197CONFIG_SYSCTL_SYSCALL=y
186CONFIG_KALLSYMS=y 198CONFIG_KALLSYMS=y
187# CONFIG_KALLSYMS_EXTRA_PASS is not set 199# CONFIG_KALLSYMS_EXTRA_PASS is not set
188CONFIG_HOTPLUG=y 200CONFIG_HOTPLUG=y
@@ -211,6 +223,7 @@ CONFIG_KMOD=y
211# 223#
212# Block layer 224# Block layer
213# 225#
226CONFIG_BLOCK=y
214# CONFIG_LBD is not set 227# CONFIG_LBD is not set
215# CONFIG_BLK_DEV_IO_TRACE is not set 228# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_LSF is not set 229# CONFIG_LSF is not set
@@ -254,6 +267,14 @@ CONFIG_BINFMT_ELF=y
254CONFIG_TRAD_SIGNALS=y 267CONFIG_TRAD_SIGNALS=y
255 268
256# 269#
270# Power management options
271#
272CONFIG_PM=y
273# CONFIG_PM_LEGACY is not set
274# CONFIG_PM_DEBUG is not set
275# CONFIG_PM_SYSFS_DEPRECATED is not set
276
277#
257# Networking 278# Networking
258# 279#
259CONFIG_NET=y 280CONFIG_NET=y
@@ -267,6 +288,8 @@ CONFIG_PACKET=y
267CONFIG_UNIX=y 288CONFIG_UNIX=y
268CONFIG_XFRM=y 289CONFIG_XFRM=y
269# CONFIG_XFRM_USER is not set 290# CONFIG_XFRM_USER is not set
291# CONFIG_XFRM_SUB_POLICY is not set
292CONFIG_XFRM_MIGRATE=y
270# CONFIG_NET_KEY is not set 293# CONFIG_NET_KEY is not set
271CONFIG_INET=y 294CONFIG_INET=y
272CONFIG_IP_MULTICAST=y 295CONFIG_IP_MULTICAST=y
@@ -285,13 +308,16 @@ CONFIG_IP_PNP_BOOTP=y
285# CONFIG_INET_ESP is not set 308# CONFIG_INET_ESP is not set
286# CONFIG_INET_IPCOMP is not set 309# CONFIG_INET_IPCOMP is not set
287# CONFIG_INET_XFRM_TUNNEL is not set 310# CONFIG_INET_XFRM_TUNNEL is not set
288# CONFIG_INET_TUNNEL is not set 311CONFIG_INET_TUNNEL=m
289CONFIG_INET_XFRM_MODE_TRANSPORT=m 312CONFIG_INET_XFRM_MODE_TRANSPORT=m
290CONFIG_INET_XFRM_MODE_TUNNEL=m 313CONFIG_INET_XFRM_MODE_TUNNEL=m
314CONFIG_INET_XFRM_MODE_BEET=m
291CONFIG_INET_DIAG=y 315CONFIG_INET_DIAG=y
292CONFIG_INET_TCP_DIAG=y 316CONFIG_INET_TCP_DIAG=y
293# CONFIG_TCP_CONG_ADVANCED is not set 317# CONFIG_TCP_CONG_ADVANCED is not set
294CONFIG_TCP_CONG_BIC=y 318CONFIG_TCP_CONG_CUBIC=y
319CONFIG_DEFAULT_TCP_CONG="cubic"
320CONFIG_TCP_MD5SIG=y
295 321
296# 322#
297# IP: Virtual Server Configuration 323# IP: Virtual Server Configuration
@@ -304,11 +330,17 @@ CONFIG_IPV6_ROUTE_INFO=y
304# CONFIG_INET6_AH is not set 330# CONFIG_INET6_AH is not set
305# CONFIG_INET6_ESP is not set 331# CONFIG_INET6_ESP is not set
306# CONFIG_INET6_IPCOMP is not set 332# CONFIG_INET6_IPCOMP is not set
333CONFIG_IPV6_MIP6=y
307# CONFIG_INET6_XFRM_TUNNEL is not set 334# CONFIG_INET6_XFRM_TUNNEL is not set
308# CONFIG_INET6_TUNNEL is not set 335# CONFIG_INET6_TUNNEL is not set
309CONFIG_INET6_XFRM_MODE_TRANSPORT=m 336CONFIG_INET6_XFRM_MODE_TRANSPORT=m
310CONFIG_INET6_XFRM_MODE_TUNNEL=m 337CONFIG_INET6_XFRM_MODE_TUNNEL=m
338CONFIG_INET6_XFRM_MODE_BEET=m
339CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
340CONFIG_IPV6_SIT=m
311# CONFIG_IPV6_TUNNEL is not set 341# CONFIG_IPV6_TUNNEL is not set
342CONFIG_IPV6_MULTIPLE_TABLES=y
343CONFIG_IPV6_SUBTREES=y
312CONFIG_NETWORK_SECMARK=y 344CONFIG_NETWORK_SECMARK=y
313CONFIG_NETFILTER=y 345CONFIG_NETFILTER=y
314# CONFIG_NETFILTER_DEBUG is not set 346# CONFIG_NETFILTER_DEBUG is not set
@@ -319,15 +351,42 @@ CONFIG_NETFILTER=y
319CONFIG_NETFILTER_NETLINK=m 351CONFIG_NETFILTER_NETLINK=m
320CONFIG_NETFILTER_NETLINK_QUEUE=m 352CONFIG_NETFILTER_NETLINK_QUEUE=m
321CONFIG_NETFILTER_NETLINK_LOG=m 353CONFIG_NETFILTER_NETLINK_LOG=m
322# CONFIG_NF_CONNTRACK is not set 354CONFIG_NF_CONNTRACK_ENABLED=m
355CONFIG_NF_CONNTRACK_SUPPORT=y
356# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
357CONFIG_NF_CONNTRACK=m
358CONFIG_NF_CT_ACCT=y
359CONFIG_NF_CONNTRACK_MARK=y
360CONFIG_NF_CONNTRACK_SECMARK=y
361CONFIG_NF_CONNTRACK_EVENTS=y
362CONFIG_NF_CT_PROTO_GRE=m
363CONFIG_NF_CT_PROTO_SCTP=m
364CONFIG_NF_CONNTRACK_AMANDA=m
365CONFIG_NF_CONNTRACK_FTP=m
366CONFIG_NF_CONNTRACK_H323=m
367CONFIG_NF_CONNTRACK_IRC=m
368# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
369CONFIG_NF_CONNTRACK_PPTP=m
370CONFIG_NF_CONNTRACK_SANE=m
371CONFIG_NF_CONNTRACK_SIP=m
372CONFIG_NF_CONNTRACK_TFTP=m
373CONFIG_NF_CT_NETLINK=m
323CONFIG_NETFILTER_XTABLES=m 374CONFIG_NETFILTER_XTABLES=m
324CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 375CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
325CONFIG_NETFILTER_XT_TARGET_MARK=m 376CONFIG_NETFILTER_XT_TARGET_MARK=m
326CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 377CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
378CONFIG_NETFILTER_XT_TARGET_NFLOG=m
327CONFIG_NETFILTER_XT_TARGET_SECMARK=m 379CONFIG_NETFILTER_XT_TARGET_SECMARK=m
380CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
381CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
328CONFIG_NETFILTER_XT_MATCH_COMMENT=m 382CONFIG_NETFILTER_XT_MATCH_COMMENT=m
383CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
384CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
385CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
329CONFIG_NETFILTER_XT_MATCH_DCCP=m 386CONFIG_NETFILTER_XT_MATCH_DCCP=m
387CONFIG_NETFILTER_XT_MATCH_DSCP=m
330CONFIG_NETFILTER_XT_MATCH_ESP=m 388CONFIG_NETFILTER_XT_MATCH_ESP=m
389CONFIG_NETFILTER_XT_MATCH_HELPER=m
331CONFIG_NETFILTER_XT_MATCH_LENGTH=m 390CONFIG_NETFILTER_XT_MATCH_LENGTH=m
332CONFIG_NETFILTER_XT_MATCH_LIMIT=m 391CONFIG_NETFILTER_XT_MATCH_LIMIT=m
333CONFIG_NETFILTER_XT_MATCH_MAC=m 392CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -338,14 +397,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
338CONFIG_NETFILTER_XT_MATCH_QUOTA=m 397CONFIG_NETFILTER_XT_MATCH_QUOTA=m
339CONFIG_NETFILTER_XT_MATCH_REALM=m 398CONFIG_NETFILTER_XT_MATCH_REALM=m
340CONFIG_NETFILTER_XT_MATCH_SCTP=m 399CONFIG_NETFILTER_XT_MATCH_SCTP=m
400CONFIG_NETFILTER_XT_MATCH_STATE=m
341CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 401CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
342CONFIG_NETFILTER_XT_MATCH_STRING=m 402CONFIG_NETFILTER_XT_MATCH_STRING=m
343CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 403CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
404CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
344 405
345# 406#
346# IP: Netfilter Configuration 407# IP: Netfilter Configuration
347# 408#
348# CONFIG_IP_NF_CONNTRACK is not set 409CONFIG_NF_CONNTRACK_IPV4=m
410CONFIG_NF_CONNTRACK_PROC_COMPAT=y
349# CONFIG_IP_NF_QUEUE is not set 411# CONFIG_IP_NF_QUEUE is not set
350# CONFIG_IP_NF_IPTABLES is not set 412# CONFIG_IP_NF_IPTABLES is not set
351# CONFIG_IP_NF_ARPTABLES is not set 413# CONFIG_IP_NF_ARPTABLES is not set
@@ -353,6 +415,7 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
353# 415#
354# IPv6: Netfilter Configuration (EXPERIMENTAL) 416# IPv6: Netfilter Configuration (EXPERIMENTAL)
355# 417#
418CONFIG_NF_CONNTRACK_IPV6=m
356# CONFIG_IP6_NF_QUEUE is not set 419# CONFIG_IP6_NF_QUEUE is not set
357# CONFIG_IP6_NF_IPTABLES is not set 420# CONFIG_IP6_NF_IPTABLES is not set
358 421
@@ -379,7 +442,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
379# CONFIG_ATALK is not set 442# CONFIG_ATALK is not set
380# CONFIG_X25 is not set 443# CONFIG_X25 is not set
381# CONFIG_LAPB is not set 444# CONFIG_LAPB is not set
382# CONFIG_NET_DIVERT is not set
383# CONFIG_ECONET is not set 445# CONFIG_ECONET is not set
384# CONFIG_WAN_ROUTER is not set 446# CONFIG_WAN_ROUTER is not set
385 447
@@ -404,6 +466,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m
404CONFIG_IEEE80211_SOFTMAC=m 466CONFIG_IEEE80211_SOFTMAC=m
405# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 467# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
406CONFIG_WIRELESS_EXT=y 468CONFIG_WIRELESS_EXT=y
469CONFIG_FIB_RULES=y
407 470
408# 471#
409# Device Drivers 472# Device Drivers
@@ -436,11 +499,13 @@ CONFIG_MTD_PARTITIONS=y
436# User Modules And Translation Layers 499# User Modules And Translation Layers
437# 500#
438CONFIG_MTD_CHAR=y 501CONFIG_MTD_CHAR=y
502CONFIG_MTD_BLKDEVS=y
439CONFIG_MTD_BLOCK=y 503CONFIG_MTD_BLOCK=y
440# CONFIG_FTL is not set 504# CONFIG_FTL is not set
441# CONFIG_NFTL is not set 505# CONFIG_NFTL is not set
442# CONFIG_INFTL is not set 506# CONFIG_INFTL is not set
443# CONFIG_RFD_FTL is not set 507# CONFIG_RFD_FTL is not set
508# CONFIG_SSFDC is not set
444 509
445# 510#
446# RAM/ROM/Flash chip drivers 511# RAM/ROM/Flash chip drivers
@@ -510,6 +575,7 @@ CONFIG_MTD_CFI_UTIL=y
510# Plug and Play support 575# Plug and Play support
511# 576#
512# CONFIG_PNP is not set 577# CONFIG_PNP is not set
578# CONFIG_PNPACPI is not set
513 579
514# 580#
515# Block devices 581# Block devices
@@ -527,14 +593,22 @@ CONFIG_BLK_DEV_NBD=m
527CONFIG_BLK_DEV_RAM=y 593CONFIG_BLK_DEV_RAM=y
528CONFIG_BLK_DEV_RAM_COUNT=16 594CONFIG_BLK_DEV_RAM_COUNT=16
529CONFIG_BLK_DEV_RAM_SIZE=8192 595CONFIG_BLK_DEV_RAM_SIZE=8192
596CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
530CONFIG_BLK_DEV_INITRD=y 597CONFIG_BLK_DEV_INITRD=y
531# CONFIG_CDROM_PKTCDVD is not set 598# CONFIG_CDROM_PKTCDVD is not set
532# CONFIG_ATA_OVER_ETH is not set 599# CONFIG_ATA_OVER_ETH is not set
533 600
534# 601#
602# Misc devices
603#
604CONFIG_SGI_IOC4=m
605# CONFIG_TIFM_CORE is not set
606
607#
535# ATA/ATAPI/MFM/RLL support 608# ATA/ATAPI/MFM/RLL support
536# 609#
537CONFIG_IDE=y 610CONFIG_IDE=y
611CONFIG_IDE_MAX_HWIFS=4
538CONFIG_BLK_DEV_IDE=y 612CONFIG_BLK_DEV_IDE=y
539 613
540# 614#
@@ -570,8 +644,10 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
570# CONFIG_BLK_DEV_CS5530 is not set 644# CONFIG_BLK_DEV_CS5530 is not set
571# CONFIG_BLK_DEV_HPT34X is not set 645# CONFIG_BLK_DEV_HPT34X is not set
572# CONFIG_BLK_DEV_HPT366 is not set 646# CONFIG_BLK_DEV_HPT366 is not set
647# CONFIG_BLK_DEV_JMICRON is not set
573# CONFIG_BLK_DEV_SC1200 is not set 648# CONFIG_BLK_DEV_SC1200 is not set
574# CONFIG_BLK_DEV_PIIX is not set 649# CONFIG_BLK_DEV_PIIX is not set
650CONFIG_BLK_DEV_IT8213=m
575# CONFIG_BLK_DEV_IT821X is not set 651# CONFIG_BLK_DEV_IT821X is not set
576# CONFIG_BLK_DEV_NS87415 is not set 652# CONFIG_BLK_DEV_NS87415 is not set
577# CONFIG_BLK_DEV_PDC202XX_OLD is not set 653# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -581,6 +657,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
581# CONFIG_BLK_DEV_SLC90E66 is not set 657# CONFIG_BLK_DEV_SLC90E66 is not set
582# CONFIG_BLK_DEV_TRM290 is not set 658# CONFIG_BLK_DEV_TRM290 is not set
583# CONFIG_BLK_DEV_VIA82CXXX is not set 659# CONFIG_BLK_DEV_VIA82CXXX is not set
660CONFIG_BLK_DEV_TC86C001=m
584# CONFIG_IDE_ARM is not set 661# CONFIG_IDE_ARM is not set
585# CONFIG_IDE_CHIPSETS is not set 662# CONFIG_IDE_CHIPSETS is not set
586CONFIG_BLK_DEV_IDEDMA=y 663CONFIG_BLK_DEV_IDEDMA=y
@@ -593,6 +670,12 @@ CONFIG_BLK_DEV_IDEDMA=y
593# 670#
594CONFIG_RAID_ATTRS=m 671CONFIG_RAID_ATTRS=m
595# CONFIG_SCSI is not set 672# CONFIG_SCSI is not set
673# CONFIG_SCSI_NETLINK is not set
674
675#
676# Serial ATA (prod) and Parallel ATA (experimental) drivers
677#
678# CONFIG_ATA is not set
596 679
597# 680#
598# Old CD-ROM drivers (not SCSI, not IDE) 681# Old CD-ROM drivers (not SCSI, not IDE)
@@ -648,6 +731,8 @@ CONFIG_LXT_PHY=m
648CONFIG_CICADA_PHY=m 731CONFIG_CICADA_PHY=m
649CONFIG_VITESSE_PHY=m 732CONFIG_VITESSE_PHY=m
650CONFIG_SMSC_PHY=m 733CONFIG_SMSC_PHY=m
734# CONFIG_BROADCOM_PHY is not set
735# CONFIG_FIXED_PHY is not set
651 736
652# 737#
653# Ethernet (10 or 100Mbit) 738# Ethernet (10 or 100Mbit)
@@ -702,7 +787,7 @@ CONFIG_NET_PCI=y
702# CONFIG_SUNDANCE is not set 787# CONFIG_SUNDANCE is not set
703# CONFIG_TLAN is not set 788# CONFIG_TLAN is not set
704# CONFIG_VIA_RHINE is not set 789# CONFIG_VIA_RHINE is not set
705# CONFIG_LAN_SAA9730 is not set 790# CONFIG_SC92031 is not set
706 791
707# 792#
708# Ethernet (1000 Mbit) 793# Ethernet (1000 Mbit)
@@ -721,14 +806,18 @@ CONFIG_NET_PCI=y
721# CONFIG_VIA_VELOCITY is not set 806# CONFIG_VIA_VELOCITY is not set
722# CONFIG_TIGON3 is not set 807# CONFIG_TIGON3 is not set
723# CONFIG_BNX2 is not set 808# CONFIG_BNX2 is not set
809CONFIG_QLA3XXX=m
810# CONFIG_ATL1 is not set
724 811
725# 812#
726# Ethernet (10000 Mbit) 813# Ethernet (10000 Mbit)
727# 814#
728# CONFIG_CHELSIO_T1 is not set 815# CONFIG_CHELSIO_T1 is not set
816CONFIG_CHELSIO_T3=m
729# CONFIG_IXGB is not set 817# CONFIG_IXGB is not set
730# CONFIG_S2IO is not set 818# CONFIG_S2IO is not set
731# CONFIG_MYRI10GE is not set 819# CONFIG_MYRI10GE is not set
820CONFIG_NETXEN_NIC=m
732 821
733# 822#
734# Token Ring devices 823# Token Ring devices
@@ -785,6 +874,7 @@ CONFIG_PPP_DEFLATE=m
785CONFIG_PPP_MPPE=m 874CONFIG_PPP_MPPE=m
786CONFIG_PPPOE=m 875CONFIG_PPPOE=m
787# CONFIG_SLIP is not set 876# CONFIG_SLIP is not set
877CONFIG_SLHC=m
788# CONFIG_SHAPER is not set 878# CONFIG_SHAPER is not set
789# CONFIG_NETCONSOLE is not set 879# CONFIG_NETCONSOLE is not set
790# CONFIG_NETPOLL is not set 880# CONFIG_NETPOLL is not set
@@ -804,6 +894,7 @@ CONFIG_PPPOE=m
804# Input device support 894# Input device support
805# 895#
806CONFIG_INPUT=y 896CONFIG_INPUT=y
897# CONFIG_INPUT_FF_MEMLESS is not set
807 898
808# 899#
809# Userland interfaces 900# Userland interfaces
@@ -826,6 +917,7 @@ CONFIG_KEYBOARD_ATKBD=y
826# CONFIG_KEYBOARD_LKKBD is not set 917# CONFIG_KEYBOARD_LKKBD is not set
827# CONFIG_KEYBOARD_XTKBD is not set 918# CONFIG_KEYBOARD_XTKBD is not set
828# CONFIG_KEYBOARD_NEWTON is not set 919# CONFIG_KEYBOARD_NEWTON is not set
920# CONFIG_KEYBOARD_STOWAWAY is not set
829CONFIG_INPUT_MOUSE=y 921CONFIG_INPUT_MOUSE=y
830CONFIG_MOUSE_PS2=y 922CONFIG_MOUSE_PS2=y
831# CONFIG_MOUSE_SERIAL is not set 923# CONFIG_MOUSE_SERIAL is not set
@@ -868,6 +960,7 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
868CONFIG_SERIAL_CORE=y 960CONFIG_SERIAL_CORE=y
869CONFIG_SERIAL_TXX9=y 961CONFIG_SERIAL_TXX9=y
870CONFIG_HAS_TXX9_SERIAL=y 962CONFIG_HAS_TXX9_SERIAL=y
963CONFIG_SERIAL_TXX9_NR_UARTS=6
871# CONFIG_SERIAL_TXX9_CONSOLE is not set 964# CONFIG_SERIAL_TXX9_CONSOLE is not set
872# CONFIG_SERIAL_TXX9_STDSERIAL is not set 965# CONFIG_SERIAL_TXX9_STDSERIAL is not set
873# CONFIG_SERIAL_JSM is not set 966# CONFIG_SERIAL_JSM is not set
@@ -890,10 +983,6 @@ CONFIG_LEGACY_PTY_COUNT=256
890# CONFIG_DTLK is not set 983# CONFIG_DTLK is not set
891# CONFIG_R3964 is not set 984# CONFIG_R3964 is not set
892# CONFIG_APPLICOM is not set 985# CONFIG_APPLICOM is not set
893
894#
895# Ftape, the floppy tape device driver
896#
897# CONFIG_DRM is not set 986# CONFIG_DRM is not set
898# CONFIG_RAW_DRIVER is not set 987# CONFIG_RAW_DRIVER is not set
899 988
@@ -901,7 +990,6 @@ CONFIG_LEGACY_PTY_COUNT=256
901# TPM devices 990# TPM devices
902# 991#
903# CONFIG_TCG_TPM is not set 992# CONFIG_TCG_TPM is not set
904# CONFIG_TELCLOCK is not set
905 993
906# 994#
907# I2C support 995# I2C support
@@ -926,17 +1014,14 @@ CONFIG_HWMON=y
926# CONFIG_HWMON_VID is not set 1014# CONFIG_HWMON_VID is not set
927# CONFIG_SENSORS_ABITUGURU is not set 1015# CONFIG_SENSORS_ABITUGURU is not set
928# CONFIG_SENSORS_F71805F is not set 1016# CONFIG_SENSORS_F71805F is not set
1017# CONFIG_SENSORS_PC87427 is not set
1018# CONFIG_SENSORS_VT1211 is not set
929# CONFIG_HWMON_DEBUG_CHIP is not set 1019# CONFIG_HWMON_DEBUG_CHIP is not set
930 1020
931# 1021#
932# Misc devices
933#
934
935#
936# Multimedia devices 1022# Multimedia devices
937# 1023#
938# CONFIG_VIDEO_DEV is not set 1024# CONFIG_VIDEO_DEV is not set
939CONFIG_VIDEO_V4L2=y
940 1025
941# 1026#
942# Digital Video Broadcasting Devices 1027# Digital Video Broadcasting Devices
@@ -952,6 +1037,7 @@ CONFIG_FB=y
952CONFIG_FB_CFB_FILLRECT=y 1037CONFIG_FB_CFB_FILLRECT=y
953CONFIG_FB_CFB_COPYAREA=y 1038CONFIG_FB_CFB_COPYAREA=y
954CONFIG_FB_CFB_IMAGEBLIT=y 1039CONFIG_FB_CFB_IMAGEBLIT=y
1040# CONFIG_FB_SVGALIB is not set
955# CONFIG_FB_MACMODES is not set 1041# CONFIG_FB_MACMODES is not set
956# CONFIG_FB_BACKLIGHT is not set 1042# CONFIG_FB_BACKLIGHT is not set
957# CONFIG_FB_MODE_HELPERS is not set 1043# CONFIG_FB_MODE_HELPERS is not set
@@ -971,6 +1057,7 @@ CONFIG_FB_ATY=y
971CONFIG_FB_ATY_CT=y 1057CONFIG_FB_ATY_CT=y
972# CONFIG_FB_ATY_GENERIC_LCD is not set 1058# CONFIG_FB_ATY_GENERIC_LCD is not set
973# CONFIG_FB_ATY_GX is not set 1059# CONFIG_FB_ATY_GX is not set
1060# CONFIG_FB_S3 is not set
974# CONFIG_FB_SAVAGE is not set 1061# CONFIG_FB_SAVAGE is not set
975# CONFIG_FB_SIS is not set 1062# CONFIG_FB_SIS is not set
976# CONFIG_FB_NEOMAGIC is not set 1063# CONFIG_FB_NEOMAGIC is not set
@@ -1002,6 +1089,12 @@ CONFIG_DUMMY_CONSOLE=y
1002# CONFIG_SOUND is not set 1089# CONFIG_SOUND is not set
1003 1090
1004# 1091#
1092# HID Devices
1093#
1094CONFIG_HID=y
1095# CONFIG_HID_DEBUG is not set
1096
1097#
1005# USB support 1098# USB support
1006# 1099#
1007CONFIG_USB_ARCH_HAS_HCD=y 1100CONFIG_USB_ARCH_HAS_HCD=y
@@ -1014,8 +1107,8 @@ CONFIG_USB=y
1014# Miscellaneous USB options 1107# Miscellaneous USB options
1015# 1108#
1016# CONFIG_USB_DEVICEFS is not set 1109# CONFIG_USB_DEVICEFS is not set
1017# CONFIG_USB_BANDWIDTH is not set
1018# CONFIG_USB_DYNAMIC_MINORS is not set 1110# CONFIG_USB_DYNAMIC_MINORS is not set
1111# CONFIG_USB_SUSPEND is not set
1019# CONFIG_USB_OTG is not set 1112# CONFIG_USB_OTG is not set
1020 1113
1021# 1114#
@@ -1040,14 +1133,12 @@ CONFIG_USB=y
1040# 1133#
1041# may also be needed; see USB_STORAGE Help for more information 1134# may also be needed; see USB_STORAGE Help for more information
1042# 1135#
1043# CONFIG_USB_STORAGE is not set
1044# CONFIG_USB_LIBUSUAL is not set 1136# CONFIG_USB_LIBUSUAL is not set
1045 1137
1046# 1138#
1047# USB Input Devices 1139# USB Input Devices
1048# 1140#
1049CONFIG_USB_HID=y 1141CONFIG_USB_HID=y
1050CONFIG_USB_HIDINPUT=y
1051# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1142# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1052# CONFIG_HID_FF is not set 1143# CONFIG_HID_FF is not set
1053CONFIG_USB_HIDDEV=y 1144CONFIG_USB_HIDDEV=y
@@ -1063,6 +1154,7 @@ CONFIG_USB_YEALINK=m
1063# CONFIG_USB_ATI_REMOTE2 is not set 1154# CONFIG_USB_ATI_REMOTE2 is not set
1064# CONFIG_USB_KEYSPAN_REMOTE is not set 1155# CONFIG_USB_KEYSPAN_REMOTE is not set
1065# CONFIG_USB_APPLETOUCH is not set 1156# CONFIG_USB_APPLETOUCH is not set
1157# CONFIG_USB_GTCO is not set
1066 1158
1067# 1159#
1068# USB Imaging devices 1160# USB Imaging devices
@@ -1076,6 +1168,7 @@ CONFIG_USB_YEALINK=m
1076# CONFIG_USB_KAWETH is not set 1168# CONFIG_USB_KAWETH is not set
1077# CONFIG_USB_PEGASUS is not set 1169# CONFIG_USB_PEGASUS is not set
1078# CONFIG_USB_RTL8150 is not set 1170# CONFIG_USB_RTL8150 is not set
1171# CONFIG_USB_USBNET_MII is not set
1079# CONFIG_USB_USBNET is not set 1172# CONFIG_USB_USBNET is not set
1080CONFIG_USB_MON=y 1173CONFIG_USB_MON=y
1081 1174
@@ -1093,18 +1186,21 @@ CONFIG_USB_MON=y
1093# 1186#
1094# CONFIG_USB_EMI62 is not set 1187# CONFIG_USB_EMI62 is not set
1095# CONFIG_USB_EMI26 is not set 1188# CONFIG_USB_EMI26 is not set
1189# CONFIG_USB_ADUTUX is not set
1096# CONFIG_USB_AUERSWALD is not set 1190# CONFIG_USB_AUERSWALD is not set
1097# CONFIG_USB_RIO500 is not set 1191# CONFIG_USB_RIO500 is not set
1098# CONFIG_USB_LEGOTOWER is not set 1192# CONFIG_USB_LEGOTOWER is not set
1099# CONFIG_USB_LCD is not set 1193# CONFIG_USB_LCD is not set
1194# CONFIG_USB_BERRY_CHARGE is not set
1100# CONFIG_USB_LED is not set 1195# CONFIG_USB_LED is not set
1101# CONFIG_USB_CY7C63 is not set 1196# CONFIG_USB_CYPRESS_CY7C63 is not set
1102# CONFIG_USB_CYTHERM is not set 1197# CONFIG_USB_CYTHERM is not set
1103# CONFIG_USB_PHIDGETKIT is not set 1198# CONFIG_USB_PHIDGET is not set
1104# CONFIG_USB_PHIDGETSERVO is not set
1105# CONFIG_USB_IDMOUSE is not set 1199# CONFIG_USB_IDMOUSE is not set
1200# CONFIG_USB_FTDI_ELAN is not set
1106# CONFIG_USB_APPLEDISPLAY is not set 1201# CONFIG_USB_APPLEDISPLAY is not set
1107# CONFIG_USB_LD is not set 1202# CONFIG_USB_LD is not set
1203# CONFIG_USB_TRANCEVIBRATOR is not set
1108 1204
1109# 1205#
1110# USB DSL modem support 1206# USB DSL modem support
@@ -1161,6 +1257,14 @@ CONFIG_USB_MON=y
1161# 1257#
1162 1258
1163# 1259#
1260# Auxiliary Display support
1261#
1262
1263#
1264# Virtualization
1265#
1266
1267#
1164# File systems 1268# File systems
1165# 1269#
1166CONFIG_EXT2_FS=y 1270CONFIG_EXT2_FS=y
@@ -1170,6 +1274,7 @@ CONFIG_EXT3_FS=m
1170CONFIG_EXT3_FS_XATTR=y 1274CONFIG_EXT3_FS_XATTR=y
1171# CONFIG_EXT3_FS_POSIX_ACL is not set 1275# CONFIG_EXT3_FS_POSIX_ACL is not set
1172# CONFIG_EXT3_FS_SECURITY is not set 1276# CONFIG_EXT3_FS_SECURITY is not set
1277# CONFIG_EXT4DEV_FS is not set
1173CONFIG_JBD=m 1278CONFIG_JBD=m
1174# CONFIG_JBD_DEBUG is not set 1279# CONFIG_JBD_DEBUG is not set
1175CONFIG_FS_MBCACHE=y 1280CONFIG_FS_MBCACHE=y
@@ -1178,12 +1283,13 @@ CONFIG_REISERFS_FS=m
1178# CONFIG_REISERFS_PROC_INFO is not set 1283# CONFIG_REISERFS_PROC_INFO is not set
1179# CONFIG_REISERFS_FS_XATTR is not set 1284# CONFIG_REISERFS_FS_XATTR is not set
1180# CONFIG_JFS_FS is not set 1285# CONFIG_JFS_FS is not set
1181# CONFIG_FS_POSIX_ACL is not set 1286CONFIG_FS_POSIX_ACL=y
1182CONFIG_XFS_FS=m 1287CONFIG_XFS_FS=m
1183# CONFIG_XFS_QUOTA is not set 1288# CONFIG_XFS_QUOTA is not set
1184# CONFIG_XFS_SECURITY is not set 1289# CONFIG_XFS_SECURITY is not set
1185# CONFIG_XFS_POSIX_ACL is not set 1290# CONFIG_XFS_POSIX_ACL is not set
1186# CONFIG_XFS_RT is not set 1291# CONFIG_XFS_RT is not set
1292# CONFIG_GFS2_FS is not set
1187# CONFIG_OCFS2_FS is not set 1293# CONFIG_OCFS2_FS is not set
1188# CONFIG_MINIX_FS is not set 1294# CONFIG_MINIX_FS is not set
1189# CONFIG_ROMFS_FS is not set 1295# CONFIG_ROMFS_FS is not set
@@ -1194,6 +1300,7 @@ CONFIG_INOTIFY_USER=y
1194# CONFIG_AUTOFS_FS is not set 1300# CONFIG_AUTOFS_FS is not set
1195CONFIG_AUTOFS4_FS=m 1301CONFIG_AUTOFS4_FS=m
1196CONFIG_FUSE_FS=m 1302CONFIG_FUSE_FS=m
1303CONFIG_GENERIC_ACL=y
1197 1304
1198# 1305#
1199# CD-ROM/DVD Filesystems 1306# CD-ROM/DVD Filesystems
@@ -1218,11 +1325,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1218# 1325#
1219CONFIG_PROC_FS=y 1326CONFIG_PROC_FS=y
1220# CONFIG_PROC_KCORE is not set 1327# CONFIG_PROC_KCORE is not set
1328CONFIG_PROC_SYSCTL=y
1221CONFIG_SYSFS=y 1329CONFIG_SYSFS=y
1222CONFIG_TMPFS=y 1330CONFIG_TMPFS=y
1331CONFIG_TMPFS_POSIX_ACL=y
1223# CONFIG_HUGETLB_PAGE is not set 1332# CONFIG_HUGETLB_PAGE is not set
1224CONFIG_RAMFS=y 1333CONFIG_RAMFS=y
1225# CONFIG_CONFIGFS_FS is not set 1334CONFIG_CONFIGFS_FS=m
1226 1335
1227# 1336#
1228# Miscellaneous filesystems 1337# Miscellaneous filesystems
@@ -1234,7 +1343,6 @@ CONFIG_RAMFS=y
1234# CONFIG_BEFS_FS is not set 1343# CONFIG_BEFS_FS is not set
1235# CONFIG_BFS_FS is not set 1344# CONFIG_BFS_FS is not set
1236# CONFIG_EFS_FS is not set 1345# CONFIG_EFS_FS is not set
1237# CONFIG_JFFS_FS is not set
1238CONFIG_JFFS2_FS=y 1346CONFIG_JFFS2_FS=y
1239CONFIG_JFFS2_FS_DEBUG=0 1347CONFIG_JFFS2_FS_DEBUG=0
1240CONFIG_JFFS2_FS_WRITEBUFFER=y 1348CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -1273,7 +1381,6 @@ CONFIG_SUNRPC=y
1273CONFIG_SMB_FS=m 1381CONFIG_SMB_FS=m
1274# CONFIG_SMB_NLS_DEFAULT is not set 1382# CONFIG_SMB_NLS_DEFAULT is not set
1275# CONFIG_CIFS is not set 1383# CONFIG_CIFS is not set
1276# CONFIG_CIFS_DEBUG2 is not set
1277# CONFIG_NCP_FS is not set 1384# CONFIG_NCP_FS is not set
1278# CONFIG_CODA_FS is not set 1385# CONFIG_CODA_FS is not set
1279# CONFIG_AFS_FS is not set 1386# CONFIG_AFS_FS is not set
@@ -1330,6 +1437,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1330# CONFIG_NLS_UTF8 is not set 1437# CONFIG_NLS_UTF8 is not set
1331 1438
1332# 1439#
1440# Distributed Lock Manager
1441#
1442CONFIG_DLM=m
1443CONFIG_DLM_TCP=y
1444# CONFIG_DLM_SCTP is not set
1445# CONFIG_DLM_DEBUG is not set
1446
1447#
1333# Profiling support 1448# Profiling support
1334# 1449#
1335# CONFIG_PROFILING is not set 1450# CONFIG_PROFILING is not set
@@ -1339,13 +1454,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1339# 1454#
1340CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1455CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1341# CONFIG_PRINTK_TIME is not set 1456# CONFIG_PRINTK_TIME is not set
1457CONFIG_ENABLE_MUST_CHECK=y
1342# CONFIG_MAGIC_SYSRQ is not set 1458# CONFIG_MAGIC_SYSRQ is not set
1343# CONFIG_UNUSED_SYMBOLS is not set 1459# CONFIG_UNUSED_SYMBOLS is not set
1460# CONFIG_DEBUG_FS is not set
1461# CONFIG_HEADERS_CHECK is not set
1344# CONFIG_DEBUG_KERNEL is not set 1462# CONFIG_DEBUG_KERNEL is not set
1345CONFIG_LOG_BUF_SHIFT=14 1463CONFIG_LOG_BUF_SHIFT=14
1346# CONFIG_DEBUG_FS is not set
1347CONFIG_CROSSCOMPILE=y 1464CONFIG_CROSSCOMPILE=y
1348CONFIG_CMDLINE="" 1465CONFIG_CMDLINE=""
1466CONFIG_SYS_SUPPORTS_KGDB=y
1349 1467
1350# 1468#
1351# Security options 1469# Security options
@@ -1357,18 +1475,30 @@ CONFIG_CMDLINE=""
1357# Cryptographic options 1475# Cryptographic options
1358# 1476#
1359CONFIG_CRYPTO=y 1477CONFIG_CRYPTO=y
1478CONFIG_CRYPTO_ALGAPI=y
1479CONFIG_CRYPTO_BLKCIPHER=m
1480CONFIG_CRYPTO_HASH=y
1481CONFIG_CRYPTO_MANAGER=y
1360CONFIG_CRYPTO_HMAC=y 1482CONFIG_CRYPTO_HMAC=y
1483CONFIG_CRYPTO_XCBC=m
1361CONFIG_CRYPTO_NULL=m 1484CONFIG_CRYPTO_NULL=m
1362CONFIG_CRYPTO_MD4=m 1485CONFIG_CRYPTO_MD4=m
1363CONFIG_CRYPTO_MD5=m 1486CONFIG_CRYPTO_MD5=y
1364CONFIG_CRYPTO_SHA1=m 1487CONFIG_CRYPTO_SHA1=m
1365CONFIG_CRYPTO_SHA256=m 1488CONFIG_CRYPTO_SHA256=m
1366CONFIG_CRYPTO_SHA512=m 1489CONFIG_CRYPTO_SHA512=m
1367CONFIG_CRYPTO_WP512=m 1490CONFIG_CRYPTO_WP512=m
1368CONFIG_CRYPTO_TGR192=m 1491CONFIG_CRYPTO_TGR192=m
1492CONFIG_CRYPTO_GF128MUL=m
1493CONFIG_CRYPTO_ECB=m
1494CONFIG_CRYPTO_CBC=m
1495CONFIG_CRYPTO_PCBC=m
1496CONFIG_CRYPTO_LRW=m
1369CONFIG_CRYPTO_DES=m 1497CONFIG_CRYPTO_DES=m
1498CONFIG_CRYPTO_FCRYPT=m
1370CONFIG_CRYPTO_BLOWFISH=m 1499CONFIG_CRYPTO_BLOWFISH=m
1371CONFIG_CRYPTO_TWOFISH=m 1500CONFIG_CRYPTO_TWOFISH=m
1501CONFIG_CRYPTO_TWOFISH_COMMON=m
1372CONFIG_CRYPTO_SERPENT=m 1502CONFIG_CRYPTO_SERPENT=m
1373CONFIG_CRYPTO_AES=m 1503CONFIG_CRYPTO_AES=m
1374CONFIG_CRYPTO_CAST5=m 1504CONFIG_CRYPTO_CAST5=m
@@ -1380,6 +1510,7 @@ CONFIG_CRYPTO_ANUBIS=m
1380CONFIG_CRYPTO_DEFLATE=m 1510CONFIG_CRYPTO_DEFLATE=m
1381CONFIG_CRYPTO_MICHAEL_MIC=m 1511CONFIG_CRYPTO_MICHAEL_MIC=m
1382CONFIG_CRYPTO_CRC32C=m 1512CONFIG_CRYPTO_CRC32C=m
1513CONFIG_CRYPTO_CAMELLIA=m
1383# CONFIG_CRYPTO_TEST is not set 1514# CONFIG_CRYPTO_TEST is not set
1384 1515
1385# 1516#
@@ -1389,6 +1520,7 @@ CONFIG_CRYPTO_CRC32C=m
1389# 1520#
1390# Library routines 1521# Library routines
1391# 1522#
1523CONFIG_BITREVERSE=y
1392CONFIG_CRC_CCITT=m 1524CONFIG_CRC_CCITT=m
1393CONFIG_CRC16=m 1525CONFIG_CRC16=m
1394CONFIG_CRC32=y 1526CONFIG_CRC32=y
@@ -1399,3 +1531,5 @@ CONFIG_TEXTSEARCH=y
1399CONFIG_TEXTSEARCH_KMP=m 1531CONFIG_TEXTSEARCH_KMP=m
1400CONFIG_TEXTSEARCH_BM=m 1532CONFIG_TEXTSEARCH_BM=m
1401CONFIG_TEXTSEARCH_FSM=m 1533CONFIG_TEXTSEARCH_FSM=m
1534CONFIG_HAS_IOMEM=y
1535CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 496aa67b9f82..bee3702d501d 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:19 2006 4# Tue Feb 20 21:47:40 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_SNI_RM=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_ARC=y 75CONFIG_ARC=y
72CONFIG_ARCH_MAY_HAVE_PC_FDC=y 76CONFIG_ARCH_MAY_HAVE_PC_FDC=y
73CONFIG_DMA_NONCOHERENT=y 77CONFIG_DMA_NONCOHERENT=y
@@ -78,10 +82,10 @@ CONFIG_I8259=y
78CONFIG_CPU_LITTLE_ENDIAN=y 82CONFIG_CPU_LITTLE_ENDIAN=y
79CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 83CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 84CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
85CONFIG_IRQ_CPU=y
81CONFIG_ARC32=y 86CONFIG_ARC32=y
82CONFIG_BOOT_ELF32=y 87CONFIG_BOOT_ELF32=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5 88CONFIG_MIPS_L1_CACHE_SHIFT=4
84CONFIG_HAVE_STD_PC_SERIAL_PORT=y
85CONFIG_ARC_CONSOLE=y 89CONFIG_ARC_CONSOLE=y
86CONFIG_ARC_MEMORY=y 90CONFIG_ARC_MEMORY=y
87CONFIG_ARC_PROMLIB=y 91CONFIG_ARC_PROMLIB=y
@@ -110,6 +114,7 @@ CONFIG_CPU_R4X00=y
110# CONFIG_CPU_SB1 is not set 114# CONFIG_CPU_SB1 is not set
111CONFIG_SYS_HAS_CPU_R4X00=y 115CONFIG_SYS_HAS_CPU_R4X00=y
112CONFIG_SYS_HAS_CPU_R5000=y 116CONFIG_SYS_HAS_CPU_R5000=y
117CONFIG_SYS_HAS_CPU_R10000=y
113CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 118CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
114CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 119CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
115CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 120CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -127,8 +132,8 @@ CONFIG_PAGE_SIZE_4KB=y
127CONFIG_BOARD_SCACHE=y 132CONFIG_BOARD_SCACHE=y
128CONFIG_R5000_CPU_SCACHE=y 133CONFIG_R5000_CPU_SCACHE=y
129CONFIG_MIPS_MT_DISABLED=y 134CONFIG_MIPS_MT_DISABLED=y
130# CONFIG_MIPS_MT_SMTC is not set
131# CONFIG_MIPS_MT_SMP is not set 135# CONFIG_MIPS_MT_SMP is not set
136# CONFIG_MIPS_MT_SMTC is not set
132# CONFIG_MIPS_VPE_LOADER is not set 137# CONFIG_MIPS_VPE_LOADER is not set
133# CONFIG_64BIT_PHYS_ADDR is not set 138# CONFIG_64BIT_PHYS_ADDR is not set
134CONFIG_CPU_HAS_LLSC=y 139CONFIG_CPU_HAS_LLSC=y
@@ -146,6 +151,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
146# CONFIG_SPARSEMEM_STATIC is not set 151# CONFIG_SPARSEMEM_STATIC is not set
147CONFIG_SPLIT_PTLOCK_CPUS=4 152CONFIG_SPLIT_PTLOCK_CPUS=4
148# CONFIG_RESOURCES_64BIT is not set 153# CONFIG_RESOURCES_64BIT is not set
154CONFIG_ZONE_DMA_FLAG=1
149# CONFIG_HZ_48 is not set 155# CONFIG_HZ_48 is not set
150# CONFIG_HZ_100 is not set 156# CONFIG_HZ_100 is not set
151# CONFIG_HZ_128 is not set 157# CONFIG_HZ_128 is not set
@@ -158,6 +164,7 @@ CONFIG_HZ=1000
158# CONFIG_PREEMPT_NONE is not set 164# CONFIG_PREEMPT_NONE is not set
159CONFIG_PREEMPT_VOLUNTARY=y 165CONFIG_PREEMPT_VOLUNTARY=y
160# CONFIG_PREEMPT is not set 166# CONFIG_PREEMPT is not set
167# CONFIG_KEXEC is not set
161CONFIG_LOCKDEP_SUPPORT=y 168CONFIG_LOCKDEP_SUPPORT=y
162CONFIG_STACKTRACE_SUPPORT=y 169CONFIG_STACKTRACE_SUPPORT=y
163CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 170CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -176,17 +183,22 @@ CONFIG_LOCALVERSION=""
176CONFIG_LOCALVERSION_AUTO=y 183CONFIG_LOCALVERSION_AUTO=y
177CONFIG_SWAP=y 184CONFIG_SWAP=y
178CONFIG_SYSVIPC=y 185CONFIG_SYSVIPC=y
186# CONFIG_IPC_NS is not set
187CONFIG_SYSVIPC_SYSCTL=y
179CONFIG_POSIX_MQUEUE=y 188CONFIG_POSIX_MQUEUE=y
180CONFIG_BSD_PROCESS_ACCT=y 189CONFIG_BSD_PROCESS_ACCT=y
181# CONFIG_BSD_PROCESS_ACCT_V3 is not set 190# CONFIG_BSD_PROCESS_ACCT_V3 is not set
182CONFIG_SYSCTL=y 191# CONFIG_TASKSTATS is not set
192# CONFIG_UTS_NS is not set
183# CONFIG_AUDIT is not set 193# CONFIG_AUDIT is not set
184CONFIG_IKCONFIG=y 194CONFIG_IKCONFIG=y
185CONFIG_IKCONFIG_PROC=y 195CONFIG_IKCONFIG_PROC=y
196CONFIG_SYSFS_DEPRECATED=y
186CONFIG_RELAY=y 197CONFIG_RELAY=y
187CONFIG_INITRAMFS_SOURCE=""
188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 198# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
199CONFIG_SYSCTL=y
189CONFIG_EMBEDDED=y 200CONFIG_EMBEDDED=y
201CONFIG_SYSCTL_SYSCALL=y
190CONFIG_KALLSYMS=y 202CONFIG_KALLSYMS=y
191# CONFIG_KALLSYMS_EXTRA_PASS is not set 203# CONFIG_KALLSYMS_EXTRA_PASS is not set
192CONFIG_HOTPLUG=y 204CONFIG_HOTPLUG=y
@@ -194,12 +206,12 @@ CONFIG_PRINTK=y
194CONFIG_BUG=y 206CONFIG_BUG=y
195CONFIG_ELF_CORE=y 207CONFIG_ELF_CORE=y
196CONFIG_BASE_FULL=y 208CONFIG_BASE_FULL=y
197CONFIG_RT_MUTEXES=y
198CONFIG_FUTEX=y 209CONFIG_FUTEX=y
199CONFIG_EPOLL=y 210CONFIG_EPOLL=y
200CONFIG_SHMEM=y 211CONFIG_SHMEM=y
201CONFIG_SLAB=y 212CONFIG_SLAB=y
202CONFIG_VM_EVENT_COUNTERS=y 213CONFIG_VM_EVENT_COUNTERS=y
214CONFIG_RT_MUTEXES=y
203# CONFIG_TINY_SHMEM is not set 215# CONFIG_TINY_SHMEM is not set
204CONFIG_BASE_SMALL=0 216CONFIG_BASE_SMALL=0
205# CONFIG_SLOB is not set 217# CONFIG_SLOB is not set
@@ -217,6 +229,7 @@ CONFIG_KMOD=y
217# 229#
218# Block layer 230# Block layer
219# 231#
232CONFIG_BLOCK=y
220# CONFIG_LBD is not set 233# CONFIG_LBD is not set
221# CONFIG_BLK_DEV_IO_TRACE is not set 234# CONFIG_BLK_DEV_IO_TRACE is not set
222# CONFIG_LSF is not set 235# CONFIG_LSF is not set
@@ -263,6 +276,14 @@ CONFIG_BINFMT_MISC=m
263CONFIG_TRAD_SIGNALS=y 276CONFIG_TRAD_SIGNALS=y
264 277
265# 278#
279# Power management options
280#
281CONFIG_PM=y
282# CONFIG_PM_LEGACY is not set
283# CONFIG_PM_DEBUG is not set
284# CONFIG_PM_SYSFS_DEPRECATED is not set
285
286#
266# Networking 287# Networking
267# 288#
268CONFIG_NET=y 289CONFIG_NET=y
@@ -276,7 +297,10 @@ CONFIG_PACKET_MMAP=y
276CONFIG_UNIX=y 297CONFIG_UNIX=y
277CONFIG_XFRM=y 298CONFIG_XFRM=y
278# CONFIG_XFRM_USER is not set 299# CONFIG_XFRM_USER is not set
300# CONFIG_XFRM_SUB_POLICY is not set
301CONFIG_XFRM_MIGRATE=y
279CONFIG_NET_KEY=m 302CONFIG_NET_KEY=m
303CONFIG_NET_KEY_MIGRATE=y
280CONFIG_INET=y 304CONFIG_INET=y
281CONFIG_IP_MULTICAST=y 305CONFIG_IP_MULTICAST=y
282# CONFIG_IP_ADVANCED_ROUTER is not set 306# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -297,10 +321,13 @@ CONFIG_IP_PIMSM_V2=y
297CONFIG_INET_TUNNEL=m 321CONFIG_INET_TUNNEL=m
298CONFIG_INET_XFRM_MODE_TRANSPORT=m 322CONFIG_INET_XFRM_MODE_TRANSPORT=m
299CONFIG_INET_XFRM_MODE_TUNNEL=m 323CONFIG_INET_XFRM_MODE_TUNNEL=m
324CONFIG_INET_XFRM_MODE_BEET=m
300CONFIG_INET_DIAG=y 325CONFIG_INET_DIAG=y
301CONFIG_INET_TCP_DIAG=y 326CONFIG_INET_TCP_DIAG=y
302# CONFIG_TCP_CONG_ADVANCED is not set 327# CONFIG_TCP_CONG_ADVANCED is not set
303CONFIG_TCP_CONG_BIC=y 328CONFIG_TCP_CONG_CUBIC=y
329CONFIG_DEFAULT_TCP_CONG="cubic"
330CONFIG_TCP_MD5SIG=y
304 331
305# 332#
306# IP: Virtual Server Configuration 333# IP: Virtual Server Configuration
@@ -313,11 +340,17 @@ CONFIG_IPV6_ROUTE_INFO=y
313CONFIG_INET6_AH=m 340CONFIG_INET6_AH=m
314CONFIG_INET6_ESP=m 341CONFIG_INET6_ESP=m
315CONFIG_INET6_IPCOMP=m 342CONFIG_INET6_IPCOMP=m
343CONFIG_IPV6_MIP6=y
316CONFIG_INET6_XFRM_TUNNEL=m 344CONFIG_INET6_XFRM_TUNNEL=m
317CONFIG_INET6_TUNNEL=m 345CONFIG_INET6_TUNNEL=m
318CONFIG_INET6_XFRM_MODE_TRANSPORT=m 346CONFIG_INET6_XFRM_MODE_TRANSPORT=m
319CONFIG_INET6_XFRM_MODE_TUNNEL=m 347CONFIG_INET6_XFRM_MODE_TUNNEL=m
348CONFIG_INET6_XFRM_MODE_BEET=m
349CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
350CONFIG_IPV6_SIT=m
320CONFIG_IPV6_TUNNEL=m 351CONFIG_IPV6_TUNNEL=m
352CONFIG_IPV6_MULTIPLE_TABLES=y
353CONFIG_IPV6_SUBTREES=y
321CONFIG_NETWORK_SECMARK=y 354CONFIG_NETWORK_SECMARK=y
322CONFIG_NETFILTER=y 355CONFIG_NETFILTER=y
323# CONFIG_NETFILTER_DEBUG is not set 356# CONFIG_NETFILTER_DEBUG is not set
@@ -329,18 +362,43 @@ CONFIG_BRIDGE_NETFILTER=y
329CONFIG_NETFILTER_NETLINK=m 362CONFIG_NETFILTER_NETLINK=m
330CONFIG_NETFILTER_NETLINK_QUEUE=m 363CONFIG_NETFILTER_NETLINK_QUEUE=m
331CONFIG_NETFILTER_NETLINK_LOG=m 364CONFIG_NETFILTER_NETLINK_LOG=m
365CONFIG_NF_CONNTRACK_ENABLED=m
366CONFIG_NF_CONNTRACK_SUPPORT=y
367# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
368CONFIG_NF_CONNTRACK=m
369CONFIG_NF_CT_ACCT=y
370CONFIG_NF_CONNTRACK_MARK=y
371CONFIG_NF_CONNTRACK_SECMARK=y
372CONFIG_NF_CONNTRACK_EVENTS=y
373CONFIG_NF_CT_PROTO_GRE=m
374CONFIG_NF_CT_PROTO_SCTP=m
375CONFIG_NF_CONNTRACK_AMANDA=m
376CONFIG_NF_CONNTRACK_FTP=m
377CONFIG_NF_CONNTRACK_H323=m
378CONFIG_NF_CONNTRACK_IRC=m
379# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
380CONFIG_NF_CONNTRACK_PPTP=m
381CONFIG_NF_CONNTRACK_SANE=m
382CONFIG_NF_CONNTRACK_SIP=m
383CONFIG_NF_CONNTRACK_TFTP=m
384CONFIG_NF_CT_NETLINK=m
332CONFIG_NETFILTER_XTABLES=m 385CONFIG_NETFILTER_XTABLES=m
333CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 386CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
334CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 387CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
388CONFIG_NETFILTER_XT_TARGET_DSCP=m
335CONFIG_NETFILTER_XT_TARGET_MARK=m 389CONFIG_NETFILTER_XT_TARGET_MARK=m
336CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 390CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
391CONFIG_NETFILTER_XT_TARGET_NFLOG=m
337CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 392CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
338CONFIG_NETFILTER_XT_TARGET_SECMARK=m 393CONFIG_NETFILTER_XT_TARGET_SECMARK=m
339# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set 394# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
395CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
340CONFIG_NETFILTER_XT_MATCH_COMMENT=m 396CONFIG_NETFILTER_XT_MATCH_COMMENT=m
397CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
341CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 398CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
342CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 399CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
343CONFIG_NETFILTER_XT_MATCH_DCCP=m 400CONFIG_NETFILTER_XT_MATCH_DCCP=m
401CONFIG_NETFILTER_XT_MATCH_DSCP=m
344CONFIG_NETFILTER_XT_MATCH_ESP=m 402CONFIG_NETFILTER_XT_MATCH_ESP=m
345CONFIG_NETFILTER_XT_MATCH_HELPER=m 403CONFIG_NETFILTER_XT_MATCH_HELPER=m
346CONFIG_NETFILTER_XT_MATCH_LENGTH=m 404CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -358,60 +416,45 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
358CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 416CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
359CONFIG_NETFILTER_XT_MATCH_STRING=m 417CONFIG_NETFILTER_XT_MATCH_STRING=m
360CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 418CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
419CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
361 420
362# 421#
363# IP: Netfilter Configuration 422# IP: Netfilter Configuration
364# 423#
365CONFIG_IP_NF_CONNTRACK=m 424CONFIG_NF_CONNTRACK_IPV4=m
366# CONFIG_IP_NF_CT_ACCT is not set 425CONFIG_NF_CONNTRACK_PROC_COMPAT=y
367CONFIG_IP_NF_CONNTRACK_MARK=y
368CONFIG_IP_NF_CONNTRACK_SECMARK=y
369CONFIG_IP_NF_CONNTRACK_EVENTS=y
370CONFIG_IP_NF_CONNTRACK_NETLINK=m
371CONFIG_IP_NF_CT_PROTO_SCTP=m
372CONFIG_IP_NF_FTP=m
373CONFIG_IP_NF_IRC=m
374# CONFIG_IP_NF_NETBIOS_NS is not set
375CONFIG_IP_NF_TFTP=m
376CONFIG_IP_NF_AMANDA=m
377CONFIG_IP_NF_PPTP=m
378CONFIG_IP_NF_H323=m
379CONFIG_IP_NF_SIP=m
380CONFIG_IP_NF_QUEUE=m 426CONFIG_IP_NF_QUEUE=m
381CONFIG_IP_NF_IPTABLES=m 427CONFIG_IP_NF_IPTABLES=m
382CONFIG_IP_NF_MATCH_IPRANGE=m 428CONFIG_IP_NF_MATCH_IPRANGE=m
383CONFIG_IP_NF_MATCH_TOS=m 429CONFIG_IP_NF_MATCH_TOS=m
384CONFIG_IP_NF_MATCH_RECENT=m 430CONFIG_IP_NF_MATCH_RECENT=m
385CONFIG_IP_NF_MATCH_ECN=m 431CONFIG_IP_NF_MATCH_ECN=m
386CONFIG_IP_NF_MATCH_DSCP=m
387CONFIG_IP_NF_MATCH_AH=m 432CONFIG_IP_NF_MATCH_AH=m
388CONFIG_IP_NF_MATCH_TTL=m 433CONFIG_IP_NF_MATCH_TTL=m
389CONFIG_IP_NF_MATCH_OWNER=m 434CONFIG_IP_NF_MATCH_OWNER=m
390CONFIG_IP_NF_MATCH_ADDRTYPE=m 435CONFIG_IP_NF_MATCH_ADDRTYPE=m
391CONFIG_IP_NF_MATCH_HASHLIMIT=m
392CONFIG_IP_NF_FILTER=m 436CONFIG_IP_NF_FILTER=m
393CONFIG_IP_NF_TARGET_REJECT=m 437CONFIG_IP_NF_TARGET_REJECT=m
394CONFIG_IP_NF_TARGET_LOG=m 438CONFIG_IP_NF_TARGET_LOG=m
395CONFIG_IP_NF_TARGET_ULOG=m 439CONFIG_IP_NF_TARGET_ULOG=m
396CONFIG_IP_NF_TARGET_TCPMSS=m 440CONFIG_NF_NAT=m
397CONFIG_IP_NF_NAT=m 441CONFIG_NF_NAT_NEEDED=y
398CONFIG_IP_NF_NAT_NEEDED=y
399CONFIG_IP_NF_TARGET_MASQUERADE=m 442CONFIG_IP_NF_TARGET_MASQUERADE=m
400CONFIG_IP_NF_TARGET_REDIRECT=m 443CONFIG_IP_NF_TARGET_REDIRECT=m
401CONFIG_IP_NF_TARGET_NETMAP=m 444CONFIG_IP_NF_TARGET_NETMAP=m
402CONFIG_IP_NF_TARGET_SAME=m 445CONFIG_IP_NF_TARGET_SAME=m
403CONFIG_IP_NF_NAT_SNMP_BASIC=m 446CONFIG_NF_NAT_SNMP_BASIC=m
404CONFIG_IP_NF_NAT_IRC=m 447CONFIG_NF_NAT_PROTO_GRE=m
405CONFIG_IP_NF_NAT_FTP=m 448CONFIG_NF_NAT_FTP=m
406CONFIG_IP_NF_NAT_TFTP=m 449CONFIG_NF_NAT_IRC=m
407CONFIG_IP_NF_NAT_AMANDA=m 450CONFIG_NF_NAT_TFTP=m
408CONFIG_IP_NF_NAT_PPTP=m 451CONFIG_NF_NAT_AMANDA=m
409CONFIG_IP_NF_NAT_H323=m 452CONFIG_NF_NAT_PPTP=m
410CONFIG_IP_NF_NAT_SIP=m 453CONFIG_NF_NAT_H323=m
454CONFIG_NF_NAT_SIP=m
411CONFIG_IP_NF_MANGLE=m 455CONFIG_IP_NF_MANGLE=m
412CONFIG_IP_NF_TARGET_TOS=m 456CONFIG_IP_NF_TARGET_TOS=m
413CONFIG_IP_NF_TARGET_ECN=m 457CONFIG_IP_NF_TARGET_ECN=m
414CONFIG_IP_NF_TARGET_DSCP=m
415CONFIG_IP_NF_TARGET_TTL=m 458CONFIG_IP_NF_TARGET_TTL=m
416CONFIG_IP_NF_TARGET_CLUSTERIP=m 459CONFIG_IP_NF_TARGET_CLUSTERIP=m
417CONFIG_IP_NF_RAW=m 460CONFIG_IP_NF_RAW=m
@@ -422,6 +465,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
422# 465#
423# IPv6: Netfilter Configuration (EXPERIMENTAL) 466# IPv6: Netfilter Configuration (EXPERIMENTAL)
424# 467#
468CONFIG_NF_CONNTRACK_IPV6=m
425CONFIG_IP6_NF_QUEUE=m 469CONFIG_IP6_NF_QUEUE=m
426CONFIG_IP6_NF_IPTABLES=m 470CONFIG_IP6_NF_IPTABLES=m
427CONFIG_IP6_NF_MATCH_RT=m 471CONFIG_IP6_NF_MATCH_RT=m
@@ -431,6 +475,7 @@ CONFIG_IP6_NF_MATCH_HL=m
431CONFIG_IP6_NF_MATCH_OWNER=m 475CONFIG_IP6_NF_MATCH_OWNER=m
432CONFIG_IP6_NF_MATCH_IPV6HEADER=m 476CONFIG_IP6_NF_MATCH_IPV6HEADER=m
433CONFIG_IP6_NF_MATCH_AH=m 477CONFIG_IP6_NF_MATCH_AH=m
478CONFIG_IP6_NF_MATCH_MH=m
434CONFIG_IP6_NF_MATCH_EUI64=m 479CONFIG_IP6_NF_MATCH_EUI64=m
435CONFIG_IP6_NF_FILTER=m 480CONFIG_IP6_NF_FILTER=m
436CONFIG_IP6_NF_TARGET_LOG=m 481CONFIG_IP6_NF_TARGET_LOG=m
@@ -493,7 +538,6 @@ CONFIG_LLC=m
493# CONFIG_ATALK is not set 538# CONFIG_ATALK is not set
494# CONFIG_X25 is not set 539# CONFIG_X25 is not set
495# CONFIG_LAPB is not set 540# CONFIG_LAPB is not set
496# CONFIG_NET_DIVERT is not set
497# CONFIG_ECONET is not set 541# CONFIG_ECONET is not set
498# CONFIG_WAN_ROUTER is not set 542# CONFIG_WAN_ROUTER is not set
499 543
@@ -501,6 +545,7 @@ CONFIG_LLC=m
501# QoS and/or fair queueing 545# QoS and/or fair queueing
502# 546#
503CONFIG_NET_SCHED=y 547CONFIG_NET_SCHED=y
548CONFIG_NET_SCH_FIFO=y
504CONFIG_NET_SCH_CLK_JIFFIES=y 549CONFIG_NET_SCH_CLK_JIFFIES=y
505# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 550# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
506# CONFIG_NET_SCH_CLK_CPU is not set 551# CONFIG_NET_SCH_CLK_CPU is not set
@@ -575,6 +620,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
575CONFIG_IEEE80211_SOFTMAC=m 620CONFIG_IEEE80211_SOFTMAC=m
576# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 621# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
577CONFIG_WIRELESS_EXT=y 622CONFIG_WIRELESS_EXT=y
623CONFIG_FIB_RULES=y
578 624
579# 625#
580# Device Drivers 626# Device Drivers
@@ -606,22 +652,22 @@ CONFIG_PARPORT_PC=m
606CONFIG_PARPORT_SERIAL=m 652CONFIG_PARPORT_SERIAL=m
607# CONFIG_PARPORT_PC_FIFO is not set 653# CONFIG_PARPORT_PC_FIFO is not set
608# CONFIG_PARPORT_PC_SUPERIO is not set 654# CONFIG_PARPORT_PC_SUPERIO is not set
609CONFIG_PARPORT_NOT_PC=y
610# CONFIG_PARPORT_GSC is not set 655# CONFIG_PARPORT_GSC is not set
611# CONFIG_PARPORT_AX88796 is not set 656# CONFIG_PARPORT_AX88796 is not set
612CONFIG_PARPORT_1284=y 657CONFIG_PARPORT_1284=y
658CONFIG_PARPORT_NOT_PC=y
613 659
614# 660#
615# Plug and Play support 661# Plug and Play support
616# 662#
617# CONFIG_PNP is not set 663# CONFIG_PNP is not set
664# CONFIG_PNPACPI is not set
618 665
619# 666#
620# Block devices 667# Block devices
621# 668#
622CONFIG_BLK_DEV_FD=m 669CONFIG_BLK_DEV_FD=m
623CONFIG_PARIDE=m 670CONFIG_PARIDE=m
624CONFIG_PARIDE_PARPORT=m
625 671
626# 672#
627# Parallel IDE high-level drivers 673# Parallel IDE high-level drivers
@@ -664,6 +710,7 @@ CONFIG_BLK_DEV_UB=m
664CONFIG_BLK_DEV_RAM=m 710CONFIG_BLK_DEV_RAM=m
665CONFIG_BLK_DEV_RAM_COUNT=16 711CONFIG_BLK_DEV_RAM_COUNT=16
666CONFIG_BLK_DEV_RAM_SIZE=4096 712CONFIG_BLK_DEV_RAM_SIZE=4096
713CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
667# CONFIG_BLK_DEV_INITRD is not set 714# CONFIG_BLK_DEV_INITRD is not set
668CONFIG_CDROM_PKTCDVD=m 715CONFIG_CDROM_PKTCDVD=m
669CONFIG_CDROM_PKTCDVD_BUFFERS=8 716CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -671,6 +718,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
671CONFIG_ATA_OVER_ETH=m 718CONFIG_ATA_OVER_ETH=m
672 719
673# 720#
721# Misc devices
722#
723CONFIG_SGI_IOC4=m
724# CONFIG_TIFM_CORE is not set
725
726#
674# ATA/ATAPI/MFM/RLL support 727# ATA/ATAPI/MFM/RLL support
675# 728#
676# CONFIG_IDE is not set 729# CONFIG_IDE is not set
@@ -680,6 +733,8 @@ CONFIG_ATA_OVER_ETH=m
680# 733#
681CONFIG_RAID_ATTRS=m 734CONFIG_RAID_ATTRS=m
682CONFIG_SCSI=y 735CONFIG_SCSI=y
736CONFIG_SCSI_TGT=m
737CONFIG_SCSI_NETLINK=y
683CONFIG_SCSI_PROC_FS=y 738CONFIG_SCSI_PROC_FS=y
684 739
685# 740#
@@ -699,14 +754,17 @@ CONFIG_BLK_DEV_SR_VENDOR=y
699# CONFIG_SCSI_MULTI_LUN is not set 754# CONFIG_SCSI_MULTI_LUN is not set
700CONFIG_SCSI_CONSTANTS=y 755CONFIG_SCSI_CONSTANTS=y
701# CONFIG_SCSI_LOGGING is not set 756# CONFIG_SCSI_LOGGING is not set
757CONFIG_SCSI_SCAN_ASYNC=y
702 758
703# 759#
704# SCSI Transport Attributes 760# SCSI Transports
705# 761#
706CONFIG_SCSI_SPI_ATTRS=y 762CONFIG_SCSI_SPI_ATTRS=y
707CONFIG_SCSI_FC_ATTRS=y 763CONFIG_SCSI_FC_ATTRS=y
708CONFIG_SCSI_ISCSI_ATTRS=m 764CONFIG_SCSI_ISCSI_ATTRS=m
709CONFIG_SCSI_SAS_ATTRS=m 765CONFIG_SCSI_SAS_ATTRS=m
766CONFIG_SCSI_SAS_LIBSAS=m
767# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
710 768
711# 769#
712# SCSI low-level drivers 770# SCSI low-level drivers
@@ -720,14 +778,16 @@ CONFIG_ISCSI_TCP=m
720# CONFIG_SCSI_AIC7XXX is not set 778# CONFIG_SCSI_AIC7XXX is not set
721# CONFIG_SCSI_AIC7XXX_OLD is not set 779# CONFIG_SCSI_AIC7XXX_OLD is not set
722# CONFIG_SCSI_AIC79XX is not set 780# CONFIG_SCSI_AIC79XX is not set
781CONFIG_SCSI_AIC94XX=m
782# CONFIG_AIC94XX_DEBUG is not set
723# CONFIG_SCSI_DPT_I2O is not set 783# CONFIG_SCSI_DPT_I2O is not set
724# CONFIG_SCSI_IN2000 is not set 784# CONFIG_SCSI_IN2000 is not set
785# CONFIG_SCSI_ARCMSR is not set
725CONFIG_MEGARAID_NEWGEN=y 786CONFIG_MEGARAID_NEWGEN=y
726CONFIG_MEGARAID_MM=m 787CONFIG_MEGARAID_MM=m
727CONFIG_MEGARAID_MAILBOX=m 788CONFIG_MEGARAID_MAILBOX=m
728# CONFIG_MEGARAID_LEGACY is not set 789# CONFIG_MEGARAID_LEGACY is not set
729# CONFIG_MEGARAID_SAS is not set 790# CONFIG_MEGARAID_SAS is not set
730# CONFIG_SCSI_SATA is not set
731# CONFIG_SCSI_HPTIOP is not set 791# CONFIG_SCSI_HPTIOP is not set
732# CONFIG_SCSI_DMX3191D is not set 792# CONFIG_SCSI_DMX3191D is not set
733# CONFIG_SCSI_DTC3280 is not set 793# CONFIG_SCSI_DTC3280 is not set
@@ -742,17 +802,19 @@ CONFIG_SCSI_IMM=m
742# CONFIG_SCSI_IZIP_EPP16 is not set 802# CONFIG_SCSI_IZIP_EPP16 is not set
743# CONFIG_SCSI_IZIP_SLOW_CTR is not set 803# CONFIG_SCSI_IZIP_SLOW_CTR is not set
744# CONFIG_SCSI_NCR53C406A is not set 804# CONFIG_SCSI_NCR53C406A is not set
805# CONFIG_SCSI_SNI_53C710 is not set
806# CONFIG_SCSI_STEX is not set
745CONFIG_SCSI_SYM53C8XX_2=y 807CONFIG_SCSI_SYM53C8XX_2=y
746CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 808CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
747CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 809CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
748CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 810CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
749CONFIG_SCSI_SYM53C8XX_MMIO=y 811CONFIG_SCSI_SYM53C8XX_MMIO=y
750# CONFIG_SCSI_IPR is not set
751# CONFIG_SCSI_PAS16 is not set 812# CONFIG_SCSI_PAS16 is not set
752# CONFIG_SCSI_PSI240I is not set 813# CONFIG_SCSI_PSI240I is not set
753# CONFIG_SCSI_QLOGIC_FAS is not set 814# CONFIG_SCSI_QLOGIC_FAS is not set
754# CONFIG_SCSI_QLOGIC_1280 is not set 815# CONFIG_SCSI_QLOGIC_1280 is not set
755# CONFIG_SCSI_QLA_FC is not set 816# CONFIG_SCSI_QLA_FC is not set
817# CONFIG_SCSI_QLA_ISCSI is not set
756# CONFIG_SCSI_LPFC is not set 818# CONFIG_SCSI_LPFC is not set
757# CONFIG_SCSI_SYM53C416 is not set 819# CONFIG_SCSI_SYM53C416 is not set
758# CONFIG_SCSI_DC395x is not set 820# CONFIG_SCSI_DC395x is not set
@@ -760,6 +822,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
760# CONFIG_SCSI_T128 is not set 822# CONFIG_SCSI_T128 is not set
761# CONFIG_SCSI_NSP32 is not set 823# CONFIG_SCSI_NSP32 is not set
762# CONFIG_SCSI_DEBUG is not set 824# CONFIG_SCSI_DEBUG is not set
825# CONFIG_SCSI_SRP is not set
826
827#
828# Serial ATA (prod) and Parallel ATA (experimental) drivers
829#
830# CONFIG_ATA is not set
763 831
764# 832#
765# Old CD-ROM drivers (not SCSI, not IDE) 833# Old CD-ROM drivers (not SCSI, not IDE)
@@ -780,6 +848,7 @@ CONFIG_MD_RAID5_RESHAPE=y
780CONFIG_MD_MULTIPATH=m 848CONFIG_MD_MULTIPATH=m
781CONFIG_MD_FAULTY=m 849CONFIG_MD_FAULTY=m
782CONFIG_BLK_DEV_DM=m 850CONFIG_BLK_DEV_DM=m
851# CONFIG_DM_DEBUG is not set
783# CONFIG_DM_CRYPT is not set 852# CONFIG_DM_CRYPT is not set
784CONFIG_DM_SNAPSHOT=m 853CONFIG_DM_SNAPSHOT=m
785CONFIG_DM_MIRROR=m 854CONFIG_DM_MIRROR=m
@@ -834,6 +903,8 @@ CONFIG_LXT_PHY=m
834CONFIG_CICADA_PHY=m 903CONFIG_CICADA_PHY=m
835CONFIG_VITESSE_PHY=m 904CONFIG_VITESSE_PHY=m
836CONFIG_SMSC_PHY=m 905CONFIG_SMSC_PHY=m
906# CONFIG_BROADCOM_PHY is not set
907# CONFIG_FIXED_PHY is not set
837 908
838# 909#
839# Ethernet (10 or 100Mbit) 910# Ethernet (10 or 100Mbit)
@@ -868,6 +939,7 @@ CONFIG_NE2000=m
868# CONFIG_SEEQ8005 is not set 939# CONFIG_SEEQ8005 is not set
869CONFIG_NET_PCI=y 940CONFIG_NET_PCI=y
870CONFIG_PCNET32=y 941CONFIG_PCNET32=y
942# CONFIG_PCNET32_NAPI is not set
871# CONFIG_AMD8111_ETH is not set 943# CONFIG_AMD8111_ETH is not set
872# CONFIG_ADAPTEC_STARFIRE is not set 944# CONFIG_ADAPTEC_STARFIRE is not set
873# CONFIG_AC3200 is not set 945# CONFIG_AC3200 is not set
@@ -888,7 +960,7 @@ CONFIG_EEPRO100=m
888# CONFIG_SUNDANCE is not set 960# CONFIG_SUNDANCE is not set
889# CONFIG_TLAN is not set 961# CONFIG_TLAN is not set
890# CONFIG_VIA_RHINE is not set 962# CONFIG_VIA_RHINE is not set
891# CONFIG_LAN_SAA9730 is not set 963# CONFIG_SC92031 is not set
892# CONFIG_NET_POCKET is not set 964# CONFIG_NET_POCKET is not set
893 965
894# 966#
@@ -908,14 +980,18 @@ CONFIG_EEPRO100=m
908CONFIG_VIA_VELOCITY=m 980CONFIG_VIA_VELOCITY=m
909# CONFIG_TIGON3 is not set 981# CONFIG_TIGON3 is not set
910# CONFIG_BNX2 is not set 982# CONFIG_BNX2 is not set
983CONFIG_QLA3XXX=m
984# CONFIG_ATL1 is not set
911 985
912# 986#
913# Ethernet (10000 Mbit) 987# Ethernet (10000 Mbit)
914# 988#
915# CONFIG_CHELSIO_T1 is not set 989# CONFIG_CHELSIO_T1 is not set
990CONFIG_CHELSIO_T3=m
916# CONFIG_IXGB is not set 991# CONFIG_IXGB is not set
917# CONFIG_S2IO is not set 992# CONFIG_S2IO is not set
918# CONFIG_MYRI10GE is not set 993# CONFIG_MYRI10GE is not set
994CONFIG_NETXEN_NIC=m
919 995
920# 996#
921# Token Ring devices 997# Token Ring devices
@@ -956,6 +1032,7 @@ CONFIG_PLIP=m
956# Input device support 1032# Input device support
957# 1033#
958CONFIG_INPUT=y 1034CONFIG_INPUT=y
1035CONFIG_INPUT_FF_MEMLESS=m
959 1036
960# 1037#
961# Userland interfaces 1038# Userland interfaces
@@ -978,6 +1055,7 @@ CONFIG_KEYBOARD_ATKBD=y
978# CONFIG_KEYBOARD_LKKBD is not set 1055# CONFIG_KEYBOARD_LKKBD is not set
979# CONFIG_KEYBOARD_XTKBD is not set 1056# CONFIG_KEYBOARD_XTKBD is not set
980# CONFIG_KEYBOARD_NEWTON is not set 1057# CONFIG_KEYBOARD_NEWTON is not set
1058# CONFIG_KEYBOARD_STOWAWAY is not set
981CONFIG_INPUT_MOUSE=y 1059CONFIG_INPUT_MOUSE=y
982CONFIG_MOUSE_PS2=y 1060CONFIG_MOUSE_PS2=y
983# CONFIG_MOUSE_SERIAL is not set 1061# CONFIG_MOUSE_SERIAL is not set
@@ -1051,10 +1129,6 @@ CONFIG_RTC=m
1051# CONFIG_DTLK is not set 1129# CONFIG_DTLK is not set
1052# CONFIG_R3964 is not set 1130# CONFIG_R3964 is not set
1053# CONFIG_APPLICOM is not set 1131# CONFIG_APPLICOM is not set
1054
1055#
1056# Ftape, the floppy tape device driver
1057#
1058# CONFIG_DRM is not set 1132# CONFIG_DRM is not set
1059# CONFIG_RAW_DRIVER is not set 1133# CONFIG_RAW_DRIVER is not set
1060 1134
@@ -1062,7 +1136,6 @@ CONFIG_RTC=m
1062# TPM devices 1136# TPM devices
1063# 1137#
1064# CONFIG_TCG_TPM is not set 1138# CONFIG_TCG_TPM is not set
1065# CONFIG_TELCLOCK is not set
1066 1139
1067# 1140#
1068# I2C support 1141# I2C support
@@ -1101,14 +1174,9 @@ CONFIG_W1_CON=y
1101# CONFIG_HWMON_VID is not set 1174# CONFIG_HWMON_VID is not set
1102 1175
1103# 1176#
1104# Misc devices
1105#
1106
1107#
1108# Multimedia devices 1177# Multimedia devices
1109# 1178#
1110# CONFIG_VIDEO_DEV is not set 1179# CONFIG_VIDEO_DEV is not set
1111CONFIG_VIDEO_V4L2=y
1112 1180
1113# 1181#
1114# Digital Video Broadcasting Devices 1182# Digital Video Broadcasting Devices
@@ -1129,6 +1197,7 @@ CONFIG_VGA_CONSOLE=y
1129# CONFIG_VGACON_SOFT_SCROLLBACK is not set 1197# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1130# CONFIG_MDA_CONSOLE is not set 1198# CONFIG_MDA_CONSOLE is not set
1131CONFIG_DUMMY_CONSOLE=y 1199CONFIG_DUMMY_CONSOLE=y
1200# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1132 1201
1133# 1202#
1134# Sound 1203# Sound
@@ -1136,6 +1205,12 @@ CONFIG_DUMMY_CONSOLE=y
1136# CONFIG_SOUND is not set 1205# CONFIG_SOUND is not set
1137 1206
1138# 1207#
1208# HID Devices
1209#
1210CONFIG_HID=y
1211# CONFIG_HID_DEBUG is not set
1212
1213#
1139# USB support 1214# USB support
1140# 1215#
1141CONFIG_USB_ARCH_HAS_HCD=y 1216CONFIG_USB_ARCH_HAS_HCD=y
@@ -1148,8 +1223,8 @@ CONFIG_USB=m
1148# Miscellaneous USB options 1223# Miscellaneous USB options
1149# 1224#
1150CONFIG_USB_DEVICEFS=y 1225CONFIG_USB_DEVICEFS=y
1151# CONFIG_USB_BANDWIDTH is not set
1152# CONFIG_USB_DYNAMIC_MINORS is not set 1226# CONFIG_USB_DYNAMIC_MINORS is not set
1227# CONFIG_USB_SUSPEND is not set
1153# CONFIG_USB_OTG is not set 1228# CONFIG_USB_OTG is not set
1154 1229
1155# 1230#
@@ -1159,9 +1234,11 @@ CONFIG_USB_EHCI_HCD=m
1159# CONFIG_USB_EHCI_SPLIT_ISO is not set 1234# CONFIG_USB_EHCI_SPLIT_ISO is not set
1160# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1235# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1161# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1236# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1237# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1162# CONFIG_USB_ISP116X_HCD is not set 1238# CONFIG_USB_ISP116X_HCD is not set
1163CONFIG_USB_OHCI_HCD=m 1239CONFIG_USB_OHCI_HCD=m
1164# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1240# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1241# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1165CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1242CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1166CONFIG_USB_UHCI_HCD=m 1243CONFIG_USB_UHCI_HCD=m
1167# CONFIG_USB_SL811_HCD is not set 1244# CONFIG_USB_SL811_HCD is not set
@@ -1189,18 +1266,20 @@ CONFIG_USB_STORAGE_SDDR09=y
1189CONFIG_USB_STORAGE_SDDR55=y 1266CONFIG_USB_STORAGE_SDDR55=y
1190CONFIG_USB_STORAGE_JUMPSHOT=y 1267CONFIG_USB_STORAGE_JUMPSHOT=y
1191# CONFIG_USB_STORAGE_ALAUDA is not set 1268# CONFIG_USB_STORAGE_ALAUDA is not set
1269# CONFIG_USB_STORAGE_KARMA is not set
1192# CONFIG_USB_LIBUSUAL is not set 1270# CONFIG_USB_LIBUSUAL is not set
1193 1271
1194# 1272#
1195# USB Input Devices 1273# USB Input Devices
1196# 1274#
1197CONFIG_USB_HID=m 1275CONFIG_USB_HID=m
1198CONFIG_USB_HIDINPUT=y
1199# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1276# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1200CONFIG_HID_FF=y 1277CONFIG_HID_FF=y
1201CONFIG_HID_PID=y 1278CONFIG_HID_PID=y
1202CONFIG_LOGITECH_FF=y 1279CONFIG_LOGITECH_FF=y
1280# CONFIG_PANTHERLORD_FF is not set
1203CONFIG_THRUSTMASTER_FF=y 1281CONFIG_THRUSTMASTER_FF=y
1282# CONFIG_ZEROPLUS_FF is not set
1204CONFIG_USB_HIDDEV=y 1283CONFIG_USB_HIDDEV=y
1205 1284
1206# 1285#
@@ -1220,6 +1299,7 @@ CONFIG_USB_XPAD=m
1220# CONFIG_USB_ATI_REMOTE2 is not set 1299# CONFIG_USB_ATI_REMOTE2 is not set
1221# CONFIG_USB_KEYSPAN_REMOTE is not set 1300# CONFIG_USB_KEYSPAN_REMOTE is not set
1222# CONFIG_USB_APPLETOUCH is not set 1301# CONFIG_USB_APPLETOUCH is not set
1302# CONFIG_USB_GTCO is not set
1223 1303
1224# 1304#
1225# USB Imaging devices 1305# USB Imaging devices
@@ -1234,12 +1314,14 @@ CONFIG_USB_CATC=m
1234CONFIG_USB_KAWETH=m 1314CONFIG_USB_KAWETH=m
1235CONFIG_USB_PEGASUS=m 1315CONFIG_USB_PEGASUS=m
1236CONFIG_USB_RTL8150=m 1316CONFIG_USB_RTL8150=m
1317CONFIG_USB_USBNET_MII=m
1237CONFIG_USB_USBNET=m 1318CONFIG_USB_USBNET=m
1238CONFIG_USB_NET_AX8817X=m 1319CONFIG_USB_NET_AX8817X=m
1239CONFIG_USB_NET_CDCETHER=m 1320CONFIG_USB_NET_CDCETHER=m
1240# CONFIG_USB_NET_GL620A is not set 1321# CONFIG_USB_NET_GL620A is not set
1241CONFIG_USB_NET_NET1080=m 1322CONFIG_USB_NET_NET1080=m
1242# CONFIG_USB_NET_PLUSB is not set 1323# CONFIG_USB_NET_PLUSB is not set
1324# CONFIG_USB_NET_MCS7830 is not set
1243# CONFIG_USB_NET_RNDIS_HOST is not set 1325# CONFIG_USB_NET_RNDIS_HOST is not set
1244# CONFIG_USB_NET_CDC_SUBSET is not set 1326# CONFIG_USB_NET_CDC_SUBSET is not set
1245CONFIG_USB_NET_ZAURUS=m 1327CONFIG_USB_NET_ZAURUS=m
@@ -1255,8 +1337,8 @@ CONFIG_USB_USS720=m
1255# 1337#
1256CONFIG_USB_SERIAL=m 1338CONFIG_USB_SERIAL=m
1257CONFIG_USB_SERIAL_GENERIC=y 1339CONFIG_USB_SERIAL_GENERIC=y
1340# CONFIG_USB_SERIAL_AIRCABLE is not set
1258CONFIG_USB_SERIAL_AIRPRIME=m 1341CONFIG_USB_SERIAL_AIRPRIME=m
1259CONFIG_USB_SERIAL_ANYDATA=m
1260# CONFIG_USB_SERIAL_ARK3116 is not set 1342# CONFIG_USB_SERIAL_ARK3116 is not set
1261CONFIG_USB_SERIAL_BELKIN=m 1343CONFIG_USB_SERIAL_BELKIN=m
1262CONFIG_USB_SERIAL_WHITEHEAT=m 1344CONFIG_USB_SERIAL_WHITEHEAT=m
@@ -1290,16 +1372,20 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1290CONFIG_USB_SERIAL_KLSI=m 1372CONFIG_USB_SERIAL_KLSI=m
1291CONFIG_USB_SERIAL_KOBIL_SCT=m 1373CONFIG_USB_SERIAL_KOBIL_SCT=m
1292CONFIG_USB_SERIAL_MCT_U232=m 1374CONFIG_USB_SERIAL_MCT_U232=m
1375# CONFIG_USB_SERIAL_MOS7720 is not set
1376# CONFIG_USB_SERIAL_MOS7840 is not set
1293# CONFIG_USB_SERIAL_NAVMAN is not set 1377# CONFIG_USB_SERIAL_NAVMAN is not set
1294CONFIG_USB_SERIAL_PL2303=m 1378CONFIG_USB_SERIAL_PL2303=m
1295CONFIG_USB_SERIAL_HP4X=m 1379CONFIG_USB_SERIAL_HP4X=m
1296CONFIG_USB_SERIAL_SAFE=m 1380CONFIG_USB_SERIAL_SAFE=m
1297CONFIG_USB_SERIAL_SAFE_PADDED=y 1381CONFIG_USB_SERIAL_SAFE_PADDED=y
1382# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1298# CONFIG_USB_SERIAL_TI is not set 1383# CONFIG_USB_SERIAL_TI is not set
1299CONFIG_USB_SERIAL_CYBERJACK=m 1384CONFIG_USB_SERIAL_CYBERJACK=m
1300CONFIG_USB_SERIAL_XIRCOM=m 1385CONFIG_USB_SERIAL_XIRCOM=m
1301# CONFIG_USB_SERIAL_OPTION is not set 1386# CONFIG_USB_SERIAL_OPTION is not set
1302CONFIG_USB_SERIAL_OMNINET=m 1387CONFIG_USB_SERIAL_OMNINET=m
1388# CONFIG_USB_SERIAL_DEBUG is not set
1303CONFIG_USB_EZUSB=y 1389CONFIG_USB_EZUSB=y
1304 1390
1305# 1391#
@@ -1307,20 +1393,23 @@ CONFIG_USB_EZUSB=y
1307# 1393#
1308# CONFIG_USB_EMI62 is not set 1394# CONFIG_USB_EMI62 is not set
1309# CONFIG_USB_EMI26 is not set 1395# CONFIG_USB_EMI26 is not set
1396# CONFIG_USB_ADUTUX is not set
1310CONFIG_USB_AUERSWALD=m 1397CONFIG_USB_AUERSWALD=m
1311CONFIG_USB_RIO500=m 1398CONFIG_USB_RIO500=m
1312CONFIG_USB_LEGOTOWER=m 1399CONFIG_USB_LEGOTOWER=m
1313CONFIG_USB_LCD=m 1400CONFIG_USB_LCD=m
1401# CONFIG_USB_BERRY_CHARGE is not set
1314CONFIG_USB_LED=m 1402CONFIG_USB_LED=m
1315# CONFIG_USB_CY7C63 is not set 1403# CONFIG_USB_CYPRESS_CY7C63 is not set
1316CONFIG_USB_CYTHERM=m 1404CONFIG_USB_CYTHERM=m
1317CONFIG_USB_PHIDGETKIT=m 1405# CONFIG_USB_PHIDGET is not set
1318CONFIG_USB_PHIDGETSERVO=m
1319# CONFIG_USB_IDMOUSE is not set 1406# CONFIG_USB_IDMOUSE is not set
1407# CONFIG_USB_FTDI_ELAN is not set
1320# CONFIG_USB_APPLEDISPLAY is not set 1408# CONFIG_USB_APPLEDISPLAY is not set
1321CONFIG_USB_SISUSBVGA=m 1409CONFIG_USB_SISUSBVGA=m
1322# CONFIG_USB_SISUSBVGA_CON is not set 1410# CONFIG_USB_SISUSBVGA_CON is not set
1323CONFIG_USB_LD=m 1411CONFIG_USB_LD=m
1412# CONFIG_USB_TRANCEVIBRATOR is not set
1324CONFIG_USB_TEST=m 1413CONFIG_USB_TEST=m
1325 1414
1326# 1415#
@@ -1378,6 +1467,15 @@ CONFIG_USB_TEST=m
1378# 1467#
1379 1468
1380# 1469#
1470# Auxiliary Display support
1471#
1472# CONFIG_KS0108 is not set
1473
1474#
1475# Virtualization
1476#
1477
1478#
1381# File systems 1479# File systems
1382# 1480#
1383CONFIG_EXT2_FS=m 1481CONFIG_EXT2_FS=m
@@ -1387,6 +1485,7 @@ CONFIG_EXT3_FS=y
1387CONFIG_EXT3_FS_XATTR=y 1485CONFIG_EXT3_FS_XATTR=y
1388# CONFIG_EXT3_FS_POSIX_ACL is not set 1486# CONFIG_EXT3_FS_POSIX_ACL is not set
1389# CONFIG_EXT3_FS_SECURITY is not set 1487# CONFIG_EXT3_FS_SECURITY is not set
1488# CONFIG_EXT4DEV_FS is not set
1390CONFIG_JBD=y 1489CONFIG_JBD=y
1391# CONFIG_JBD_DEBUG is not set 1490# CONFIG_JBD_DEBUG is not set
1392CONFIG_FS_MBCACHE=y 1491CONFIG_FS_MBCACHE=y
@@ -1403,6 +1502,7 @@ CONFIG_XFS_QUOTA=y
1403CONFIG_XFS_SECURITY=y 1502CONFIG_XFS_SECURITY=y
1404# CONFIG_XFS_POSIX_ACL is not set 1503# CONFIG_XFS_POSIX_ACL is not set
1405# CONFIG_XFS_RT is not set 1504# CONFIG_XFS_RT is not set
1505# CONFIG_GFS2_FS is not set
1406# CONFIG_OCFS2_FS is not set 1506# CONFIG_OCFS2_FS is not set
1407CONFIG_MINIX_FS=m 1507CONFIG_MINIX_FS=m
1408CONFIG_ROMFS_FS=m 1508CONFIG_ROMFS_FS=m
@@ -1414,6 +1514,7 @@ CONFIG_DNOTIFY=y
1414CONFIG_AUTOFS_FS=m 1514CONFIG_AUTOFS_FS=m
1415CONFIG_AUTOFS4_FS=m 1515CONFIG_AUTOFS4_FS=m
1416CONFIG_FUSE_FS=m 1516CONFIG_FUSE_FS=m
1517CONFIG_GENERIC_ACL=y
1417 1518
1418# 1519#
1419# CD-ROM/DVD Filesystems 1520# CD-ROM/DVD Filesystems
@@ -1421,7 +1522,6 @@ CONFIG_FUSE_FS=m
1421CONFIG_ISO9660_FS=m 1522CONFIG_ISO9660_FS=m
1422CONFIG_JOLIET=y 1523CONFIG_JOLIET=y
1423CONFIG_ZISOFS=y 1524CONFIG_ZISOFS=y
1424CONFIG_ZISOFS_FS=m
1425CONFIG_UDF_FS=m 1525CONFIG_UDF_FS=m
1426CONFIG_UDF_NLS=y 1526CONFIG_UDF_NLS=y
1427 1527
@@ -1442,11 +1542,13 @@ CONFIG_NTFS_FS=m
1442# 1542#
1443CONFIG_PROC_FS=y 1543CONFIG_PROC_FS=y
1444CONFIG_PROC_KCORE=y 1544CONFIG_PROC_KCORE=y
1545CONFIG_PROC_SYSCTL=y
1445CONFIG_SYSFS=y 1546CONFIG_SYSFS=y
1446CONFIG_TMPFS=y 1547CONFIG_TMPFS=y
1548CONFIG_TMPFS_POSIX_ACL=y
1447# CONFIG_HUGETLB_PAGE is not set 1549# CONFIG_HUGETLB_PAGE is not set
1448CONFIG_RAMFS=y 1550CONFIG_RAMFS=y
1449# CONFIG_CONFIGFS_FS is not set 1551CONFIG_CONFIGFS_FS=m
1450 1552
1451# 1553#
1452# Miscellaneous filesystems 1554# Miscellaneous filesystems
@@ -1454,6 +1556,7 @@ CONFIG_RAMFS=y
1454CONFIG_ADFS_FS=m 1556CONFIG_ADFS_FS=m
1455# CONFIG_ADFS_FS_RW is not set 1557# CONFIG_ADFS_FS_RW is not set
1456CONFIG_AFFS_FS=m 1558CONFIG_AFFS_FS=m
1559# CONFIG_ECRYPT_FS is not set
1457CONFIG_HFS_FS=m 1560CONFIG_HFS_FS=m
1458# CONFIG_HFSPLUS_FS is not set 1561# CONFIG_HFSPLUS_FS is not set
1459CONFIG_BEFS_FS=m 1562CONFIG_BEFS_FS=m
@@ -1579,6 +1682,14 @@ CONFIG_NLS_KOI8_U=m
1579CONFIG_NLS_UTF8=m 1682CONFIG_NLS_UTF8=m
1580 1683
1581# 1684#
1685# Distributed Lock Manager
1686#
1687CONFIG_DLM=m
1688CONFIG_DLM_TCP=y
1689# CONFIG_DLM_SCTP is not set
1690# CONFIG_DLM_DEBUG is not set
1691
1692#
1582# Profiling support 1693# Profiling support
1583# 1694#
1584# CONFIG_PROFILING is not set 1695# CONFIG_PROFILING is not set
@@ -1588,11 +1699,13 @@ CONFIG_NLS_UTF8=m
1588# 1699#
1589CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1700CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1590# CONFIG_PRINTK_TIME is not set 1701# CONFIG_PRINTK_TIME is not set
1702CONFIG_ENABLE_MUST_CHECK=y
1591# CONFIG_MAGIC_SYSRQ is not set 1703# CONFIG_MAGIC_SYSRQ is not set
1592# CONFIG_UNUSED_SYMBOLS is not set 1704# CONFIG_UNUSED_SYMBOLS is not set
1705# CONFIG_DEBUG_FS is not set
1706# CONFIG_HEADERS_CHECK is not set
1593# CONFIG_DEBUG_KERNEL is not set 1707# CONFIG_DEBUG_KERNEL is not set
1594CONFIG_LOG_BUF_SHIFT=14 1708CONFIG_LOG_BUF_SHIFT=14
1595# CONFIG_DEBUG_FS is not set
1596CONFIG_CROSSCOMPILE=y 1709CONFIG_CROSSCOMPILE=y
1597CONFIG_CMDLINE="" 1710CONFIG_CMDLINE=""
1598 1711
@@ -1607,18 +1720,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1607# Cryptographic options 1720# Cryptographic options
1608# 1721#
1609CONFIG_CRYPTO=y 1722CONFIG_CRYPTO=y
1723CONFIG_CRYPTO_ALGAPI=y
1724CONFIG_CRYPTO_BLKCIPHER=m
1725CONFIG_CRYPTO_HASH=y
1726CONFIG_CRYPTO_MANAGER=y
1610CONFIG_CRYPTO_HMAC=y 1727CONFIG_CRYPTO_HMAC=y
1728CONFIG_CRYPTO_XCBC=m
1611CONFIG_CRYPTO_NULL=m 1729CONFIG_CRYPTO_NULL=m
1612CONFIG_CRYPTO_MD4=m 1730CONFIG_CRYPTO_MD4=m
1613CONFIG_CRYPTO_MD5=m 1731CONFIG_CRYPTO_MD5=y
1614CONFIG_CRYPTO_SHA1=m 1732CONFIG_CRYPTO_SHA1=m
1615CONFIG_CRYPTO_SHA256=m 1733CONFIG_CRYPTO_SHA256=m
1616CONFIG_CRYPTO_SHA512=m 1734CONFIG_CRYPTO_SHA512=m
1617CONFIG_CRYPTO_WP512=m 1735CONFIG_CRYPTO_WP512=m
1618CONFIG_CRYPTO_TGR192=m 1736CONFIG_CRYPTO_TGR192=m
1737CONFIG_CRYPTO_GF128MUL=m
1738CONFIG_CRYPTO_ECB=m
1739CONFIG_CRYPTO_CBC=m
1740CONFIG_CRYPTO_PCBC=m
1741CONFIG_CRYPTO_LRW=m
1619CONFIG_CRYPTO_DES=m 1742CONFIG_CRYPTO_DES=m
1743CONFIG_CRYPTO_FCRYPT=m
1620CONFIG_CRYPTO_BLOWFISH=m 1744CONFIG_CRYPTO_BLOWFISH=m
1621CONFIG_CRYPTO_TWOFISH=m 1745CONFIG_CRYPTO_TWOFISH=m
1746CONFIG_CRYPTO_TWOFISH_COMMON=m
1622CONFIG_CRYPTO_SERPENT=m 1747CONFIG_CRYPTO_SERPENT=m
1623CONFIG_CRYPTO_AES=m 1748CONFIG_CRYPTO_AES=m
1624CONFIG_CRYPTO_CAST5=m 1749CONFIG_CRYPTO_CAST5=m
@@ -1630,6 +1755,7 @@ CONFIG_CRYPTO_ANUBIS=m
1630CONFIG_CRYPTO_DEFLATE=m 1755CONFIG_CRYPTO_DEFLATE=m
1631CONFIG_CRYPTO_MICHAEL_MIC=m 1756CONFIG_CRYPTO_MICHAEL_MIC=m
1632CONFIG_CRYPTO_CRC32C=m 1757CONFIG_CRYPTO_CRC32C=m
1758CONFIG_CRYPTO_CAMELLIA=m
1633# CONFIG_CRYPTO_TEST is not set 1759# CONFIG_CRYPTO_TEST is not set
1634 1760
1635# 1761#
@@ -1639,6 +1765,7 @@ CONFIG_CRYPTO_CRC32C=m
1639# 1765#
1640# Library routines 1766# Library routines
1641# 1767#
1768CONFIG_BITREVERSE=y
1642CONFIG_CRC_CCITT=m 1769CONFIG_CRC_CCITT=m
1643CONFIG_CRC16=m 1770CONFIG_CRC16=m
1644CONFIG_CRC32=y 1771CONFIG_CRC32=y
@@ -1650,3 +1777,5 @@ CONFIG_TEXTSEARCH_KMP=m
1650CONFIG_TEXTSEARCH_BM=m 1777CONFIG_TEXTSEARCH_BM=m
1651CONFIG_TEXTSEARCH_FSM=m 1778CONFIG_TEXTSEARCH_FSM=m
1652CONFIG_PLIST=y 1779CONFIG_PLIST=y
1780CONFIG_HAS_IOMEM=y
1781CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index e33c17200b39..3c891ed10141 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:19 2006 4# Tue Feb 20 21:47:40 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -81,10 +81,14 @@ CONFIG_SIBYTE_CFE=y
81# CONFIG_SIBYTE_SB1250_PROF is not set 81# CONFIG_SIBYTE_SB1250_PROF is not set
82# CONFIG_SIBYTE_TBPROF is not set 82# CONFIG_SIBYTE_TBPROF is not set
83CONFIG_RWSEM_GENERIC_SPINLOCK=y 83CONFIG_RWSEM_GENERIC_SPINLOCK=y
84# CONFIG_ARCH_HAS_ILOG2_U32 is not set
85# CONFIG_ARCH_HAS_ILOG2_U64 is not set
84CONFIG_GENERIC_FIND_NEXT_BIT=y 86CONFIG_GENERIC_FIND_NEXT_BIT=y
85CONFIG_GENERIC_HWEIGHT=y 87CONFIG_GENERIC_HWEIGHT=y
86CONFIG_GENERIC_CALIBRATE_DELAY=y 88CONFIG_GENERIC_CALIBRATE_DELAY=y
89CONFIG_GENERIC_TIME=y
87CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 90CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
91# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
88CONFIG_DMA_COHERENT=y 92CONFIG_DMA_COHERENT=y
89CONFIG_CPU_BIG_ENDIAN=y 93CONFIG_CPU_BIG_ENDIAN=y
90# CONFIG_CPU_LITTLE_ENDIAN is not set 94# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -117,6 +121,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
117# CONFIG_CPU_RM9000 is not set 121# CONFIG_CPU_RM9000 is not set
118CONFIG_CPU_SB1=y 122CONFIG_CPU_SB1=y
119CONFIG_SYS_HAS_CPU_SB1=y 123CONFIG_SYS_HAS_CPU_SB1=y
124CONFIG_WEAK_ORDERING=y
120CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 125CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
121CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 126CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
122CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 127CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -134,8 +139,8 @@ CONFIG_PAGE_SIZE_4KB=y
134# CONFIG_SIBYTE_DMA_PAGEOPS is not set 139# CONFIG_SIBYTE_DMA_PAGEOPS is not set
135CONFIG_CPU_HAS_PREFETCH=y 140CONFIG_CPU_HAS_PREFETCH=y
136CONFIG_MIPS_MT_DISABLED=y 141CONFIG_MIPS_MT_DISABLED=y
137# CONFIG_MIPS_MT_SMTC is not set
138# CONFIG_MIPS_MT_SMP is not set 142# CONFIG_MIPS_MT_SMP is not set
143# CONFIG_MIPS_MT_SMTC is not set
139# CONFIG_MIPS_VPE_LOADER is not set 144# CONFIG_MIPS_VPE_LOADER is not set
140CONFIG_SB1_PASS_1_WORKAROUNDS=y 145CONFIG_SB1_PASS_1_WORKAROUNDS=y
141CONFIG_CPU_HAS_LLSC=y 146CONFIG_CPU_HAS_LLSC=y
@@ -155,8 +160,10 @@ CONFIG_FLAT_NODE_MEM_MAP=y
155# CONFIG_SPARSEMEM_STATIC is not set 160# CONFIG_SPARSEMEM_STATIC is not set
156CONFIG_SPLIT_PTLOCK_CPUS=4 161CONFIG_SPLIT_PTLOCK_CPUS=4
157CONFIG_RESOURCES_64BIT=y 162CONFIG_RESOURCES_64BIT=y
163CONFIG_ZONE_DMA_FLAG=1
158CONFIG_SMP=y 164CONFIG_SMP=y
159CONFIG_SYS_SUPPORTS_SMP=y 165CONFIG_SYS_SUPPORTS_SMP=y
166CONFIG_NR_CPUS_DEFAULT_2=y
160CONFIG_NR_CPUS=2 167CONFIG_NR_CPUS=2
161# CONFIG_HZ_48 is not set 168# CONFIG_HZ_48 is not set
162# CONFIG_HZ_100 is not set 169# CONFIG_HZ_100 is not set
@@ -171,6 +178,7 @@ CONFIG_PREEMPT_NONE=y
171# CONFIG_PREEMPT_VOLUNTARY is not set 178# CONFIG_PREEMPT_VOLUNTARY is not set
172# CONFIG_PREEMPT is not set 179# CONFIG_PREEMPT is not set
173CONFIG_PREEMPT_BKL=y 180CONFIG_PREEMPT_BKL=y
181# CONFIG_KEXEC is not set
174CONFIG_LOCKDEP_SUPPORT=y 182CONFIG_LOCKDEP_SUPPORT=y
175CONFIG_STACKTRACE_SUPPORT=y 183CONFIG_STACKTRACE_SUPPORT=y
176CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 184CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -189,16 +197,22 @@ CONFIG_LOCALVERSION=""
189CONFIG_LOCALVERSION_AUTO=y 197CONFIG_LOCALVERSION_AUTO=y
190CONFIG_SWAP=y 198CONFIG_SWAP=y
191CONFIG_SYSVIPC=y 199CONFIG_SYSVIPC=y
200# CONFIG_IPC_NS is not set
201CONFIG_SYSVIPC_SYSCTL=y
192# CONFIG_POSIX_MQUEUE is not set 202# CONFIG_POSIX_MQUEUE is not set
193# CONFIG_BSD_PROCESS_ACCT is not set 203# CONFIG_BSD_PROCESS_ACCT is not set
194CONFIG_SYSCTL=y 204# CONFIG_TASKSTATS is not set
205# CONFIG_UTS_NS is not set
195# CONFIG_AUDIT is not set 206# CONFIG_AUDIT is not set
196# CONFIG_IKCONFIG is not set 207# CONFIG_IKCONFIG is not set
197CONFIG_CPUSETS=y 208CONFIG_CPUSETS=y
209CONFIG_SYSFS_DEPRECATED=y
198CONFIG_RELAY=y 210CONFIG_RELAY=y
199CONFIG_INITRAMFS_SOURCE="" 211CONFIG_INITRAMFS_SOURCE=""
200# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 212# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
213CONFIG_SYSCTL=y
201CONFIG_EMBEDDED=y 214CONFIG_EMBEDDED=y
215CONFIG_SYSCTL_SYSCALL=y
202CONFIG_KALLSYMS=y 216CONFIG_KALLSYMS=y
203# CONFIG_KALLSYMS_EXTRA_PASS is not set 217# CONFIG_KALLSYMS_EXTRA_PASS is not set
204CONFIG_HOTPLUG=y 218CONFIG_HOTPLUG=y
@@ -206,12 +220,12 @@ CONFIG_PRINTK=y
206CONFIG_BUG=y 220CONFIG_BUG=y
207CONFIG_ELF_CORE=y 221CONFIG_ELF_CORE=y
208CONFIG_BASE_FULL=y 222CONFIG_BASE_FULL=y
209CONFIG_RT_MUTEXES=y
210CONFIG_FUTEX=y 223CONFIG_FUTEX=y
211CONFIG_EPOLL=y 224CONFIG_EPOLL=y
212CONFIG_SHMEM=y 225CONFIG_SHMEM=y
213CONFIG_SLAB=y 226CONFIG_SLAB=y
214CONFIG_VM_EVENT_COUNTERS=y 227CONFIG_VM_EVENT_COUNTERS=y
228CONFIG_RT_MUTEXES=y
215# CONFIG_TINY_SHMEM is not set 229# CONFIG_TINY_SHMEM is not set
216CONFIG_BASE_SMALL=0 230CONFIG_BASE_SMALL=0
217# CONFIG_SLOB is not set 231# CONFIG_SLOB is not set
@@ -230,6 +244,7 @@ CONFIG_STOP_MACHINE=y
230# 244#
231# Block layer 245# Block layer
232# 246#
247CONFIG_BLOCK=y
233# CONFIG_BLK_DEV_IO_TRACE is not set 248# CONFIG_BLK_DEV_IO_TRACE is not set
234 249
235# 250#
@@ -270,11 +285,20 @@ CONFIG_BINFMT_ELF=y
270# CONFIG_BUILD_ELF64 is not set 285# CONFIG_BUILD_ELF64 is not set
271CONFIG_MIPS32_COMPAT=y 286CONFIG_MIPS32_COMPAT=y
272CONFIG_COMPAT=y 287CONFIG_COMPAT=y
288CONFIG_SYSVIPC_COMPAT=y
273CONFIG_MIPS32_O32=y 289CONFIG_MIPS32_O32=y
274# CONFIG_MIPS32_N32 is not set 290# CONFIG_MIPS32_N32 is not set
275CONFIG_BINFMT_ELF32=y 291CONFIG_BINFMT_ELF32=y
276 292
277# 293#
294# Power management options
295#
296CONFIG_PM=y
297# CONFIG_PM_LEGACY is not set
298# CONFIG_PM_DEBUG is not set
299# CONFIG_PM_SYSFS_DEPRECATED is not set
300
301#
278# Networking 302# Networking
279# 303#
280CONFIG_NET=y 304CONFIG_NET=y
@@ -288,7 +312,10 @@ CONFIG_PACKET_MMAP=y
288CONFIG_UNIX=y 312CONFIG_UNIX=y
289CONFIG_XFRM=y 313CONFIG_XFRM=y
290CONFIG_XFRM_USER=m 314CONFIG_XFRM_USER=m
315# CONFIG_XFRM_SUB_POLICY is not set
316CONFIG_XFRM_MIGRATE=y
291CONFIG_NET_KEY=y 317CONFIG_NET_KEY=y
318CONFIG_NET_KEY_MIGRATE=y
292CONFIG_INET=y 319CONFIG_INET=y
293# CONFIG_IP_MULTICAST is not set 320# CONFIG_IP_MULTICAST is not set
294# CONFIG_IP_ADVANCED_ROUTER is not set 321# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -308,10 +335,13 @@ CONFIG_IP_PNP_BOOTP=y
308# CONFIG_INET_TUNNEL is not set 335# CONFIG_INET_TUNNEL is not set
309CONFIG_INET_XFRM_MODE_TRANSPORT=m 336CONFIG_INET_XFRM_MODE_TRANSPORT=m
310CONFIG_INET_XFRM_MODE_TUNNEL=m 337CONFIG_INET_XFRM_MODE_TUNNEL=m
338CONFIG_INET_XFRM_MODE_BEET=m
311CONFIG_INET_DIAG=y 339CONFIG_INET_DIAG=y
312CONFIG_INET_TCP_DIAG=y 340CONFIG_INET_TCP_DIAG=y
313# CONFIG_TCP_CONG_ADVANCED is not set 341# CONFIG_TCP_CONG_ADVANCED is not set
314CONFIG_TCP_CONG_BIC=y 342CONFIG_TCP_CONG_CUBIC=y
343CONFIG_DEFAULT_TCP_CONG="cubic"
344CONFIG_TCP_MD5SIG=y
315# CONFIG_IPV6 is not set 345# CONFIG_IPV6 is not set
316# CONFIG_INET6_XFRM_TUNNEL is not set 346# CONFIG_INET6_XFRM_TUNNEL is not set
317# CONFIG_INET6_TUNNEL is not set 347# CONFIG_INET6_TUNNEL is not set
@@ -341,7 +371,6 @@ CONFIG_NETWORK_SECMARK=y
341# CONFIG_ATALK is not set 371# CONFIG_ATALK is not set
342# CONFIG_X25 is not set 372# CONFIG_X25 is not set
343# CONFIG_LAPB is not set 373# CONFIG_LAPB is not set
344# CONFIG_NET_DIVERT is not set
345# CONFIG_ECONET is not set 374# CONFIG_ECONET is not set
346# CONFIG_WAN_ROUTER is not set 375# CONFIG_WAN_ROUTER is not set
347 376
@@ -395,6 +424,7 @@ CONFIG_CONNECTOR=m
395# 424#
396# Plug and Play support 425# Plug and Play support
397# 426#
427# CONFIG_PNPACPI is not set
398 428
399# 429#
400# Block devices 430# Block devices
@@ -410,6 +440,7 @@ CONFIG_CONNECTOR=m
410CONFIG_BLK_DEV_RAM=y 440CONFIG_BLK_DEV_RAM=y
411CONFIG_BLK_DEV_RAM_COUNT=16 441CONFIG_BLK_DEV_RAM_COUNT=16
412CONFIG_BLK_DEV_RAM_SIZE=9220 442CONFIG_BLK_DEV_RAM_SIZE=9220
443CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
413CONFIG_BLK_DEV_INITRD=y 444CONFIG_BLK_DEV_INITRD=y
414CONFIG_CDROM_PKTCDVD=m 445CONFIG_CDROM_PKTCDVD=m
415CONFIG_CDROM_PKTCDVD_BUFFERS=8 446CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -417,9 +448,16 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
417CONFIG_ATA_OVER_ETH=m 448CONFIG_ATA_OVER_ETH=m
418 449
419# 450#
451# Misc devices
452#
453CONFIG_SGI_IOC4=m
454# CONFIG_TIFM_CORE is not set
455
456#
420# ATA/ATAPI/MFM/RLL support 457# ATA/ATAPI/MFM/RLL support
421# 458#
422CONFIG_IDE=y 459CONFIG_IDE=y
460CONFIG_IDE_MAX_HWIFS=4
423CONFIG_BLK_DEV_IDE=y 461CONFIG_BLK_DEV_IDE=y
424 462
425# 463#
@@ -449,6 +487,12 @@ CONFIG_IDE_GENERIC=y
449# 487#
450CONFIG_RAID_ATTRS=m 488CONFIG_RAID_ATTRS=m
451# CONFIG_SCSI is not set 489# CONFIG_SCSI is not set
490# CONFIG_SCSI_NETLINK is not set
491
492#
493# Serial ATA (prod) and Parallel ATA (experimental) drivers
494#
495# CONFIG_ATA is not set
452 496
453# 497#
454# Multi-device support (RAID and LVM) 498# Multi-device support (RAID and LVM)
@@ -499,6 +543,8 @@ CONFIG_LXT_PHY=m
499CONFIG_CICADA_PHY=m 543CONFIG_CICADA_PHY=m
500CONFIG_VITESSE_PHY=m 544CONFIG_VITESSE_PHY=m
501CONFIG_SMSC_PHY=m 545CONFIG_SMSC_PHY=m
546# CONFIG_BROADCOM_PHY is not set
547# CONFIG_FIXED_PHY is not set
502 548
503# 549#
504# Ethernet (10 or 100Mbit) 550# Ethernet (10 or 100Mbit)
@@ -535,14 +581,18 @@ CONFIG_NET_SB1250_MAC=y
535# CONFIG_SK98LIN is not set 581# CONFIG_SK98LIN is not set
536# CONFIG_TIGON3 is not set 582# CONFIG_TIGON3 is not set
537# CONFIG_BNX2 is not set 583# CONFIG_BNX2 is not set
584CONFIG_QLA3XXX=m
585# CONFIG_ATL1 is not set
538 586
539# 587#
540# Ethernet (10000 Mbit) 588# Ethernet (10000 Mbit)
541# 589#
542# CONFIG_CHELSIO_T1 is not set 590# CONFIG_CHELSIO_T1 is not set
591CONFIG_CHELSIO_T3=m
543# CONFIG_IXGB is not set 592# CONFIG_IXGB is not set
544# CONFIG_S2IO is not set 593# CONFIG_S2IO is not set
545# CONFIG_MYRI10GE is not set 594# CONFIG_MYRI10GE is not set
595CONFIG_NETXEN_NIC=m
546 596
547# 597#
548# Token Ring devices 598# Token Ring devices
@@ -604,6 +654,7 @@ CONFIG_SERIAL_NONSTANDARD=y
604# CONFIG_DIGIEPCA is not set 654# CONFIG_DIGIEPCA is not set
605# CONFIG_MOXA_INTELLIO is not set 655# CONFIG_MOXA_INTELLIO is not set
606# CONFIG_MOXA_SMARTIO is not set 656# CONFIG_MOXA_SMARTIO is not set
657CONFIG_MOXA_SMARTIO_NEW=m
607# CONFIG_ISI is not set 658# CONFIG_ISI is not set
608# CONFIG_SYNCLINKMP is not set 659# CONFIG_SYNCLINKMP is not set
609# CONFIG_SYNCLINK_GT is not set 660# CONFIG_SYNCLINK_GT is not set
@@ -643,10 +694,6 @@ CONFIG_LEGACY_PTY_COUNT=256
643# CONFIG_DTLK is not set 694# CONFIG_DTLK is not set
644# CONFIG_R3964 is not set 695# CONFIG_R3964 is not set
645# CONFIG_APPLICOM is not set 696# CONFIG_APPLICOM is not set
646
647#
648# Ftape, the floppy tape device driver
649#
650# CONFIG_DRM is not set 697# CONFIG_DRM is not set
651# CONFIG_RAW_DRIVER is not set 698# CONFIG_RAW_DRIVER is not set
652 699
@@ -654,7 +701,6 @@ CONFIG_LEGACY_PTY_COUNT=256
654# TPM devices 701# TPM devices
655# 702#
656# CONFIG_TCG_TPM is not set 703# CONFIG_TCG_TPM is not set
657# CONFIG_TELCLOCK is not set
658 704
659# 705#
660# I2C support 706# I2C support
@@ -679,14 +725,9 @@ CONFIG_LEGACY_PTY_COUNT=256
679# CONFIG_HWMON_VID is not set 725# CONFIG_HWMON_VID is not set
680 726
681# 727#
682# Misc devices
683#
684
685#
686# Multimedia devices 728# Multimedia devices
687# 729#
688# CONFIG_VIDEO_DEV is not set 730# CONFIG_VIDEO_DEV is not set
689CONFIG_VIDEO_V4L2=y
690 731
691# 732#
692# Digital Video Broadcasting Devices 733# Digital Video Broadcasting Devices
@@ -698,6 +739,7 @@ CONFIG_VIDEO_V4L2=y
698# 739#
699# CONFIG_FIRMWARE_EDID is not set 740# CONFIG_FIRMWARE_EDID is not set
700# CONFIG_FB is not set 741# CONFIG_FB is not set
742# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
701 743
702# 744#
703# Sound 745# Sound
@@ -767,6 +809,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
767# 809#
768 810
769# 811#
812# Auxiliary Display support
813#
814
815#
816# Virtualization
817#
818
819#
770# File systems 820# File systems
771# 821#
772CONFIG_EXT2_FS=y 822CONFIG_EXT2_FS=y
@@ -775,11 +825,13 @@ CONFIG_EXT2_FS_POSIX_ACL=y
775CONFIG_EXT2_FS_SECURITY=y 825CONFIG_EXT2_FS_SECURITY=y
776# CONFIG_EXT2_FS_XIP is not set 826# CONFIG_EXT2_FS_XIP is not set
777# CONFIG_EXT3_FS is not set 827# CONFIG_EXT3_FS is not set
828# CONFIG_EXT4DEV_FS is not set
778CONFIG_FS_MBCACHE=y 829CONFIG_FS_MBCACHE=y
779# CONFIG_REISERFS_FS is not set 830# CONFIG_REISERFS_FS is not set
780# CONFIG_JFS_FS is not set 831# CONFIG_JFS_FS is not set
781CONFIG_FS_POSIX_ACL=y 832CONFIG_FS_POSIX_ACL=y
782# CONFIG_XFS_FS is not set 833# CONFIG_XFS_FS is not set
834# CONFIG_GFS2_FS is not set
783# CONFIG_OCFS2_FS is not set 835# CONFIG_OCFS2_FS is not set
784# CONFIG_MINIX_FS is not set 836# CONFIG_MINIX_FS is not set
785# CONFIG_ROMFS_FS is not set 837# CONFIG_ROMFS_FS is not set
@@ -809,17 +861,19 @@ CONFIG_FUSE_FS=m
809# 861#
810CONFIG_PROC_FS=y 862CONFIG_PROC_FS=y
811CONFIG_PROC_KCORE=y 863CONFIG_PROC_KCORE=y
864CONFIG_PROC_SYSCTL=y
812CONFIG_SYSFS=y 865CONFIG_SYSFS=y
813# CONFIG_TMPFS is not set 866# CONFIG_TMPFS is not set
814# CONFIG_HUGETLB_PAGE is not set 867# CONFIG_HUGETLB_PAGE is not set
815CONFIG_RAMFS=y 868CONFIG_RAMFS=y
816# CONFIG_CONFIGFS_FS is not set 869CONFIG_CONFIGFS_FS=m
817 870
818# 871#
819# Miscellaneous filesystems 872# Miscellaneous filesystems
820# 873#
821# CONFIG_ADFS_FS is not set 874# CONFIG_ADFS_FS is not set
822# CONFIG_AFFS_FS is not set 875# CONFIG_AFFS_FS is not set
876# CONFIG_ECRYPT_FS is not set
823# CONFIG_HFS_FS is not set 877# CONFIG_HFS_FS is not set
824# CONFIG_HFSPLUS_FS is not set 878# CONFIG_HFSPLUS_FS is not set
825# CONFIG_BEFS_FS is not set 879# CONFIG_BEFS_FS is not set
@@ -850,7 +904,6 @@ CONFIG_SUNRPC=y
850# CONFIG_RPCSEC_GSS_SPKM3 is not set 904# CONFIG_RPCSEC_GSS_SPKM3 is not set
851# CONFIG_SMB_FS is not set 905# CONFIG_SMB_FS is not set
852# CONFIG_CIFS is not set 906# CONFIG_CIFS is not set
853# CONFIG_CIFS_DEBUG2 is not set
854# CONFIG_NCP_FS is not set 907# CONFIG_NCP_FS is not set
855# CONFIG_CODA_FS is not set 908# CONFIG_CODA_FS is not set
856# CONFIG_AFS_FS is not set 909# CONFIG_AFS_FS is not set
@@ -868,6 +921,14 @@ CONFIG_MSDOS_PARTITION=y
868# CONFIG_NLS is not set 921# CONFIG_NLS is not set
869 922
870# 923#
924# Distributed Lock Manager
925#
926CONFIG_DLM=m
927CONFIG_DLM_TCP=y
928# CONFIG_DLM_SCTP is not set
929# CONFIG_DLM_DEBUG is not set
930
931#
871# Profiling support 932# Profiling support
872# 933#
873# CONFIG_PROFILING is not set 934# CONFIG_PROFILING is not set
@@ -877,13 +938,16 @@ CONFIG_MSDOS_PARTITION=y
877# 938#
878CONFIG_TRACE_IRQFLAGS_SUPPORT=y 939CONFIG_TRACE_IRQFLAGS_SUPPORT=y
879# CONFIG_PRINTK_TIME is not set 940# CONFIG_PRINTK_TIME is not set
941CONFIG_ENABLE_MUST_CHECK=y
880# CONFIG_MAGIC_SYSRQ is not set 942# CONFIG_MAGIC_SYSRQ is not set
881# CONFIG_UNUSED_SYMBOLS is not set 943# CONFIG_UNUSED_SYMBOLS is not set
944# CONFIG_DEBUG_FS is not set
945# CONFIG_HEADERS_CHECK is not set
882# CONFIG_DEBUG_KERNEL is not set 946# CONFIG_DEBUG_KERNEL is not set
883CONFIG_LOG_BUF_SHIFT=15 947CONFIG_LOG_BUF_SHIFT=15
884# CONFIG_DEBUG_FS is not set
885CONFIG_CROSSCOMPILE=y 948CONFIG_CROSSCOMPILE=y
886CONFIG_CMDLINE="" 949CONFIG_CMDLINE=""
950CONFIG_SYS_SUPPORTS_KGDB=y
887# CONFIG_SB1XXX_CORELIS is not set 951# CONFIG_SB1XXX_CORELIS is not set
888 952
889# 953#
@@ -897,18 +961,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
897# Cryptographic options 961# Cryptographic options
898# 962#
899CONFIG_CRYPTO=y 963CONFIG_CRYPTO=y
964CONFIG_CRYPTO_ALGAPI=y
965CONFIG_CRYPTO_BLKCIPHER=m
966CONFIG_CRYPTO_HASH=y
967CONFIG_CRYPTO_MANAGER=y
900CONFIG_CRYPTO_HMAC=y 968CONFIG_CRYPTO_HMAC=y
969CONFIG_CRYPTO_XCBC=m
901CONFIG_CRYPTO_NULL=m 970CONFIG_CRYPTO_NULL=m
902CONFIG_CRYPTO_MD4=m 971CONFIG_CRYPTO_MD4=m
903CONFIG_CRYPTO_MD5=m 972CONFIG_CRYPTO_MD5=y
904CONFIG_CRYPTO_SHA1=m 973CONFIG_CRYPTO_SHA1=m
905CONFIG_CRYPTO_SHA256=m 974CONFIG_CRYPTO_SHA256=m
906CONFIG_CRYPTO_SHA512=m 975CONFIG_CRYPTO_SHA512=m
907CONFIG_CRYPTO_WP512=m 976CONFIG_CRYPTO_WP512=m
908CONFIG_CRYPTO_TGR192=m 977CONFIG_CRYPTO_TGR192=m
978CONFIG_CRYPTO_GF128MUL=m
979CONFIG_CRYPTO_ECB=m
980CONFIG_CRYPTO_CBC=m
981CONFIG_CRYPTO_PCBC=m
982CONFIG_CRYPTO_LRW=m
909CONFIG_CRYPTO_DES=m 983CONFIG_CRYPTO_DES=m
984CONFIG_CRYPTO_FCRYPT=m
910CONFIG_CRYPTO_BLOWFISH=m 985CONFIG_CRYPTO_BLOWFISH=m
911CONFIG_CRYPTO_TWOFISH=m 986CONFIG_CRYPTO_TWOFISH=m
987CONFIG_CRYPTO_TWOFISH_COMMON=m
912CONFIG_CRYPTO_SERPENT=m 988CONFIG_CRYPTO_SERPENT=m
913CONFIG_CRYPTO_AES=m 989CONFIG_CRYPTO_AES=m
914CONFIG_CRYPTO_CAST5=m 990CONFIG_CRYPTO_CAST5=m
@@ -920,6 +996,7 @@ CONFIG_CRYPTO_ANUBIS=m
920CONFIG_CRYPTO_DEFLATE=m 996CONFIG_CRYPTO_DEFLATE=m
921CONFIG_CRYPTO_MICHAEL_MIC=m 997CONFIG_CRYPTO_MICHAEL_MIC=m
922CONFIG_CRYPTO_CRC32C=m 998CONFIG_CRYPTO_CRC32C=m
999CONFIG_CRYPTO_CAMELLIA=m
923# CONFIG_CRYPTO_TEST is not set 1000# CONFIG_CRYPTO_TEST is not set
924 1001
925# 1002#
@@ -929,6 +1006,7 @@ CONFIG_CRYPTO_CRC32C=m
929# 1006#
930# Library routines 1007# Library routines
931# 1008#
1009CONFIG_BITREVERSE=y
932# CONFIG_CRC_CCITT is not set 1010# CONFIG_CRC_CCITT is not set
933CONFIG_CRC16=m 1011CONFIG_CRC16=m
934CONFIG_CRC32=y 1012CONFIG_CRC32=y
@@ -936,3 +1014,5 @@ CONFIG_LIBCRC32C=m
936CONFIG_ZLIB_INFLATE=m 1014CONFIG_ZLIB_INFLATE=m
937CONFIG_ZLIB_DEFLATE=m 1015CONFIG_ZLIB_DEFLATE=m
938CONFIG_PLIST=y 1016CONFIG_PLIST=y
1017CONFIG_HAS_IOMEM=y
1018CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig
index 83fb932f9d4b..e31d964a053b 100644
--- a/arch/mips/configs/sead_defconfig
+++ b/arch/mips/configs/sead_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:20 2006 4# Sun Feb 18 21:28:10 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS_SEAD=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_MIPS_SEAD=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73# CONFIG_CPU_BIG_ENDIAN is not set 77# CONFIG_CPU_BIG_ENDIAN is not set
@@ -120,15 +124,17 @@ CONFIG_PAGE_SIZE_4KB=y
120# CONFIG_PAGE_SIZE_64KB is not set 124# CONFIG_PAGE_SIZE_64KB is not set
121CONFIG_CPU_HAS_PREFETCH=y 125CONFIG_CPU_HAS_PREFETCH=y
122CONFIG_MIPS_MT_DISABLED=y 126CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_MT_SMP is not set 127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
125# CONFIG_MIPS_VPE_LOADER is not set 129# CONFIG_MIPS_VPE_LOADER is not set
126# CONFIG_64BIT_PHYS_ADDR is not set 130# CONFIG_64BIT_PHYS_ADDR is not set
127CONFIG_CPU_HAS_LLSC=y 131CONFIG_CPU_HAS_LLSC=y
132# CONFIG_CPU_HAS_SMARTMIPS is not set
128CONFIG_CPU_HAS_SYNC=y 133CONFIG_CPU_HAS_SYNC=y
129CONFIG_GENERIC_HARDIRQS=y 134CONFIG_GENERIC_HARDIRQS=y
130CONFIG_GENERIC_IRQ_PROBE=y 135CONFIG_GENERIC_IRQ_PROBE=y
131CONFIG_CPU_SUPPORTS_HIGHMEM=y 136CONFIG_CPU_SUPPORTS_HIGHMEM=y
137CONFIG_SYS_SUPPORTS_SMARTMIPS=y
132CONFIG_ARCH_FLATMEM_ENABLE=y 138CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_SELECT_MEMORY_MODEL=y 139CONFIG_SELECT_MEMORY_MODEL=y
134CONFIG_FLATMEM_MANUAL=y 140CONFIG_FLATMEM_MANUAL=y
@@ -139,6 +145,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set 145# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set 147# CONFIG_RESOURCES_64BIT is not set
148CONFIG_ZONE_DMA_FLAG=1
142# CONFIG_HZ_48 is not set 149# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 150# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 151# CONFIG_HZ_128 is not set
@@ -151,6 +158,7 @@ CONFIG_HZ=1000
151CONFIG_PREEMPT_NONE=y 158CONFIG_PREEMPT_NONE=y
152# CONFIG_PREEMPT_VOLUNTARY is not set 159# CONFIG_PREEMPT_VOLUNTARY is not set
153# CONFIG_PREEMPT is not set 160# CONFIG_PREEMPT is not set
161# CONFIG_KEXEC is not set
154CONFIG_LOCKDEP_SUPPORT=y 162CONFIG_LOCKDEP_SUPPORT=y
155CONFIG_STACKTRACE_SUPPORT=y 163CONFIG_STACKTRACE_SUPPORT=y
156CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 164CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -169,13 +177,18 @@ CONFIG_LOCALVERSION=""
169CONFIG_LOCALVERSION_AUTO=y 177CONFIG_LOCALVERSION_AUTO=y
170# CONFIG_SWAP is not set 178# CONFIG_SWAP is not set
171CONFIG_SYSVIPC=y 179CONFIG_SYSVIPC=y
180# CONFIG_IPC_NS is not set
181CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_BSD_PROCESS_ACCT is not set 182# CONFIG_BSD_PROCESS_ACCT is not set
173CONFIG_SYSCTL=y 183# CONFIG_UTS_NS is not set
174# CONFIG_IKCONFIG is not set 184# CONFIG_IKCONFIG is not set
185CONFIG_SYSFS_DEPRECATED=y
175CONFIG_RELAY=y 186CONFIG_RELAY=y
176CONFIG_INITRAMFS_SOURCE="" 187CONFIG_INITRAMFS_SOURCE=""
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
189CONFIG_SYSCTL=y
178CONFIG_EMBEDDED=y 190CONFIG_EMBEDDED=y
191CONFIG_SYSCTL_SYSCALL=y
179CONFIG_KALLSYMS=y 192CONFIG_KALLSYMS=y
180# CONFIG_KALLSYMS_EXTRA_PASS is not set 193# CONFIG_KALLSYMS_EXTRA_PASS is not set
181# CONFIG_HOTPLUG is not set 194# CONFIG_HOTPLUG is not set
@@ -183,12 +196,12 @@ CONFIG_PRINTK=y
183CONFIG_BUG=y 196CONFIG_BUG=y
184CONFIG_ELF_CORE=y 197CONFIG_ELF_CORE=y
185CONFIG_BASE_FULL=y 198CONFIG_BASE_FULL=y
186CONFIG_RT_MUTEXES=y
187CONFIG_FUTEX=y 199CONFIG_FUTEX=y
188CONFIG_EPOLL=y 200CONFIG_EPOLL=y
189CONFIG_SHMEM=y 201CONFIG_SHMEM=y
190CONFIG_SLAB=y 202CONFIG_SLAB=y
191CONFIG_VM_EVENT_COUNTERS=y 203CONFIG_VM_EVENT_COUNTERS=y
204CONFIG_RT_MUTEXES=y
192# CONFIG_TINY_SHMEM is not set 205# CONFIG_TINY_SHMEM is not set
193CONFIG_BASE_SMALL=0 206CONFIG_BASE_SMALL=0
194# CONFIG_SLOB is not set 207# CONFIG_SLOB is not set
@@ -201,6 +214,7 @@ CONFIG_BASE_SMALL=0
201# 214#
202# Block layer 215# Block layer
203# 216#
217CONFIG_BLOCK=y
204# CONFIG_LBD is not set 218# CONFIG_LBD is not set
205# CONFIG_BLK_DEV_IO_TRACE is not set 219# CONFIG_BLK_DEV_IO_TRACE is not set
206# CONFIG_LSF is not set 220# CONFIG_LSF is not set
@@ -226,7 +240,6 @@ CONFIG_MMU=y
226# 240#
227# PCCARD (PCMCIA/CardBus) support 241# PCCARD (PCMCIA/CardBus) support
228# 242#
229# CONFIG_PCCARD is not set
230 243
231# 244#
232# PCI Hotplug Support 245# PCI Hotplug Support
@@ -240,6 +253,14 @@ CONFIG_BINFMT_ELF=y
240CONFIG_TRAD_SIGNALS=y 253CONFIG_TRAD_SIGNALS=y
241 254
242# 255#
256# Power management options
257#
258CONFIG_PM=y
259# CONFIG_PM_LEGACY is not set
260# CONFIG_PM_DEBUG is not set
261# CONFIG_PM_SYSFS_DEPRECATED is not set
262
263#
243# Networking 264# Networking
244# 265#
245# CONFIG_NET is not set 266# CONFIG_NET is not set
@@ -253,7 +274,6 @@ CONFIG_TRAD_SIGNALS=y
253# 274#
254CONFIG_STANDALONE=y 275CONFIG_STANDALONE=y
255CONFIG_PREVENT_FIRMWARE_BUILD=y 276CONFIG_PREVENT_FIRMWARE_BUILD=y
256# CONFIG_FW_LOADER is not set
257# CONFIG_SYS_HYPERVISOR is not set 277# CONFIG_SYS_HYPERVISOR is not set
258 278
259# 279#
@@ -283,10 +303,15 @@ CONFIG_BLK_DEV_LOOP=y
283CONFIG_BLK_DEV_RAM=y 303CONFIG_BLK_DEV_RAM=y
284CONFIG_BLK_DEV_RAM_COUNT=16 304CONFIG_BLK_DEV_RAM_COUNT=16
285CONFIG_BLK_DEV_RAM_SIZE=18432 305CONFIG_BLK_DEV_RAM_SIZE=18432
306CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
286CONFIG_BLK_DEV_INITRD=y 307CONFIG_BLK_DEV_INITRD=y
287# CONFIG_CDROM_PKTCDVD is not set 308# CONFIG_CDROM_PKTCDVD is not set
288 309
289# 310#
311# Misc devices
312#
313
314#
290# ATA/ATAPI/MFM/RLL support 315# ATA/ATAPI/MFM/RLL support
291# 316#
292# CONFIG_IDE is not set 317# CONFIG_IDE is not set
@@ -296,6 +321,12 @@ CONFIG_BLK_DEV_INITRD=y
296# 321#
297CONFIG_RAID_ATTRS=y 322CONFIG_RAID_ATTRS=y
298# CONFIG_SCSI is not set 323# CONFIG_SCSI is not set
324# CONFIG_SCSI_NETLINK is not set
325
326#
327# Serial ATA (prod) and Parallel ATA (experimental) drivers
328#
329# CONFIG_ATA is not set
299 330
300# 331#
301# Multi-device support (RAID and LVM) 332# Multi-device support (RAID and LVM)
@@ -373,17 +404,12 @@ CONFIG_LEGACY_PTY_COUNT=256
373# CONFIG_GEN_RTC is not set 404# CONFIG_GEN_RTC is not set
374# CONFIG_DTLK is not set 405# CONFIG_DTLK is not set
375# CONFIG_R3964 is not set 406# CONFIG_R3964 is not set
376
377#
378# Ftape, the floppy tape device driver
379#
380# CONFIG_RAW_DRIVER is not set 407# CONFIG_RAW_DRIVER is not set
381 408
382# 409#
383# TPM devices 410# TPM devices
384# 411#
385# CONFIG_TCG_TPM is not set 412# CONFIG_TCG_TPM is not set
386# CONFIG_TELCLOCK is not set
387 413
388# 414#
389# I2C support 415# I2C support
@@ -399,6 +425,7 @@ CONFIG_LEGACY_PTY_COUNT=256
399# 425#
400# Dallas's 1-wire bus 426# Dallas's 1-wire bus
401# 427#
428# CONFIG_W1 is not set
402 429
403# 430#
404# Hardware Monitoring support 431# Hardware Monitoring support
@@ -407,14 +434,9 @@ CONFIG_LEGACY_PTY_COUNT=256
407# CONFIG_HWMON_VID is not set 434# CONFIG_HWMON_VID is not set
408 435
409# 436#
410# Misc devices
411#
412
413#
414# Multimedia devices 437# Multimedia devices
415# 438#
416# CONFIG_VIDEO_DEV is not set 439# CONFIG_VIDEO_DEV is not set
417CONFIG_VIDEO_V4L2=y
418 440
419# 441#
420# Digital Video Broadcasting Devices 442# Digital Video Broadcasting Devices
@@ -425,6 +447,7 @@ CONFIG_VIDEO_V4L2=y
425# 447#
426# CONFIG_FIRMWARE_EDID is not set 448# CONFIG_FIRMWARE_EDID is not set
427# CONFIG_FB is not set 449# CONFIG_FB is not set
450# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
428 451
429# 452#
430# Sound 453# Sound
@@ -492,16 +515,26 @@ CONFIG_VIDEO_V4L2=y
492# 515#
493 516
494# 517#
518# Auxiliary Display support
519#
520
521#
522# Virtualization
523#
524
525#
495# File systems 526# File systems
496# 527#
497CONFIG_EXT2_FS=y 528CONFIG_EXT2_FS=y
498# CONFIG_EXT2_FS_XATTR is not set 529# CONFIG_EXT2_FS_XATTR is not set
499# CONFIG_EXT2_FS_XIP is not set 530# CONFIG_EXT2_FS_XIP is not set
500# CONFIG_EXT3_FS is not set 531# CONFIG_EXT3_FS is not set
532# CONFIG_EXT4DEV_FS is not set
501# CONFIG_REISERFS_FS is not set 533# CONFIG_REISERFS_FS is not set
502# CONFIG_JFS_FS is not set 534# CONFIG_JFS_FS is not set
503# CONFIG_FS_POSIX_ACL is not set 535# CONFIG_FS_POSIX_ACL is not set
504# CONFIG_XFS_FS is not set 536# CONFIG_XFS_FS is not set
537# CONFIG_GFS2_FS is not set
505# CONFIG_MINIX_FS is not set 538# CONFIG_MINIX_FS is not set
506# CONFIG_ROMFS_FS is not set 539# CONFIG_ROMFS_FS is not set
507CONFIG_INOTIFY=y 540CONFIG_INOTIFY=y
@@ -530,6 +563,7 @@ CONFIG_FUSE_FS=y
530# 563#
531CONFIG_PROC_FS=y 564CONFIG_PROC_FS=y
532CONFIG_PROC_KCORE=y 565CONFIG_PROC_KCORE=y
566CONFIG_PROC_SYSCTL=y
533CONFIG_SYSFS=y 567CONFIG_SYSFS=y
534# CONFIG_TMPFS is not set 568# CONFIG_TMPFS is not set
535# CONFIG_HUGETLB_PAGE is not set 569# CONFIG_HUGETLB_PAGE is not set
@@ -585,12 +619,13 @@ CONFIG_PARTITION_ADVANCED=y
585# 619#
586CONFIG_TRACE_IRQFLAGS_SUPPORT=y 620CONFIG_TRACE_IRQFLAGS_SUPPORT=y
587# CONFIG_PRINTK_TIME is not set 621# CONFIG_PRINTK_TIME is not set
622CONFIG_ENABLE_MUST_CHECK=y
588# CONFIG_MAGIC_SYSRQ is not set 623# CONFIG_MAGIC_SYSRQ is not set
589# CONFIG_UNUSED_SYMBOLS is not set 624# CONFIG_UNUSED_SYMBOLS is not set
625# CONFIG_DEBUG_FS is not set
626# CONFIG_HEADERS_CHECK is not set
590# CONFIG_DEBUG_KERNEL is not set 627# CONFIG_DEBUG_KERNEL is not set
591CONFIG_LOG_BUF_SHIFT=14 628CONFIG_LOG_BUF_SHIFT=14
592# CONFIG_DEBUG_FS is not set
593# CONFIG_UNWIND_INFO is not set
594CONFIG_CROSSCOMPILE=y 629CONFIG_CROSSCOMPILE=y
595CONFIG_CMDLINE="" 630CONFIG_CMDLINE=""
596 631
@@ -606,10 +641,6 @@ CONFIG_CMDLINE=""
606# CONFIG_CRYPTO is not set 641# CONFIG_CRYPTO is not set
607 642
608# 643#
609# Hardware crypto devices
610#
611
612#
613# Library routines 644# Library routines
614# 645#
615# CONFIG_CRC_CCITT is not set 646# CONFIG_CRC_CCITT is not set
@@ -617,3 +648,5 @@ CONFIG_CRC16=y
617# CONFIG_CRC32 is not set 648# CONFIG_CRC32 is not set
618# CONFIG_LIBCRC32C is not set 649# CONFIG_LIBCRC32C is not set
619CONFIG_PLIST=y 650CONFIG_PLIST=y
651CONFIG_HAS_IOMEM=y
652CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index e9d4eae45bfa..5771c1aee76a 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:20 2006 4# Tue Feb 20 21:47:41 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -72,12 +72,15 @@ CONFIG_TANBAC_TB0226=y
72# CONFIG_VICTOR_MPC30X is not set 72# CONFIG_VICTOR_MPC30X is not set
73# CONFIG_ZAO_CAPCELLA is not set 73# CONFIG_ZAO_CAPCELLA is not set
74CONFIG_PCI_VR41XX=y 74CONFIG_PCI_VR41XX=y
75# CONFIG_VRC4173 is not set
76CONFIG_RWSEM_GENERIC_SPINLOCK=y 75CONFIG_RWSEM_GENERIC_SPINLOCK=y
76# CONFIG_ARCH_HAS_ILOG2_U32 is not set
77# CONFIG_ARCH_HAS_ILOG2_U64 is not set
77CONFIG_GENERIC_FIND_NEXT_BIT=y 78CONFIG_GENERIC_FIND_NEXT_BIT=y
78CONFIG_GENERIC_HWEIGHT=y 79CONFIG_GENERIC_HWEIGHT=y
79CONFIG_GENERIC_CALIBRATE_DELAY=y 80CONFIG_GENERIC_CALIBRATE_DELAY=y
81CONFIG_GENERIC_TIME=y
80CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 82CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
83CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
81CONFIG_DMA_NONCOHERENT=y 84CONFIG_DMA_NONCOHERENT=y
82CONFIG_DMA_NEED_PCI_MAP_STATE=y 85CONFIG_DMA_NEED_PCI_MAP_STATE=y
83# CONFIG_CPU_BIG_ENDIAN is not set 86# CONFIG_CPU_BIG_ENDIAN is not set
@@ -110,6 +113,7 @@ CONFIG_CPU_VR41XX=y
110# CONFIG_CPU_SB1 is not set 113# CONFIG_CPU_SB1 is not set
111CONFIG_SYS_HAS_CPU_VR41XX=y 114CONFIG_SYS_HAS_CPU_VR41XX=y
112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 115CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
116CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 117CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
114CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 118CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
115 119
@@ -123,8 +127,8 @@ CONFIG_PAGE_SIZE_4KB=y
123# CONFIG_PAGE_SIZE_16KB is not set 127# CONFIG_PAGE_SIZE_16KB is not set
124# CONFIG_PAGE_SIZE_64KB is not set 128# CONFIG_PAGE_SIZE_64KB is not set
125CONFIG_MIPS_MT_DISABLED=y 129CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 132# CONFIG_MIPS_VPE_LOADER is not set
129CONFIG_CPU_HAS_SYNC=y 133CONFIG_CPU_HAS_SYNC=y
130CONFIG_GENERIC_HARDIRQS=y 134CONFIG_GENERIC_HARDIRQS=y
@@ -139,6 +143,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set 143# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set 145# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=1
142# CONFIG_HZ_48 is not set 147# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 148# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 149# CONFIG_HZ_128 is not set
@@ -151,6 +156,7 @@ CONFIG_HZ=1000
151CONFIG_PREEMPT_NONE=y 156CONFIG_PREEMPT_NONE=y
152# CONFIG_PREEMPT_VOLUNTARY is not set 157# CONFIG_PREEMPT_VOLUNTARY is not set
153# CONFIG_PREEMPT is not set 158# CONFIG_PREEMPT is not set
159# CONFIG_KEXEC is not set
154CONFIG_LOCKDEP_SUPPORT=y 160CONFIG_LOCKDEP_SUPPORT=y
155CONFIG_STACKTRACE_SUPPORT=y 161CONFIG_STACKTRACE_SUPPORT=y
156CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 162CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -169,15 +175,20 @@ CONFIG_LOCALVERSION=""
169CONFIG_LOCALVERSION_AUTO=y 175CONFIG_LOCALVERSION_AUTO=y
170CONFIG_SWAP=y 176CONFIG_SWAP=y
171CONFIG_SYSVIPC=y 177CONFIG_SYSVIPC=y
178# CONFIG_IPC_NS is not set
179CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_POSIX_MQUEUE is not set 180# CONFIG_POSIX_MQUEUE is not set
173# CONFIG_BSD_PROCESS_ACCT is not set 181# CONFIG_BSD_PROCESS_ACCT is not set
174CONFIG_SYSCTL=y 182# CONFIG_TASKSTATS is not set
183# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set 184# CONFIG_AUDIT is not set
176# CONFIG_IKCONFIG is not set 185# CONFIG_IKCONFIG is not set
186CONFIG_SYSFS_DEPRECATED=y
177# CONFIG_RELAY is not set 187# CONFIG_RELAY is not set
178CONFIG_INITRAMFS_SOURCE=""
179# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
189CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 190CONFIG_EMBEDDED=y
191CONFIG_SYSCTL_SYSCALL=y
181CONFIG_KALLSYMS=y 192CONFIG_KALLSYMS=y
182# CONFIG_KALLSYMS_EXTRA_PASS is not set 193# CONFIG_KALLSYMS_EXTRA_PASS is not set
183CONFIG_HOTPLUG=y 194CONFIG_HOTPLUG=y
@@ -185,12 +196,12 @@ CONFIG_PRINTK=y
185CONFIG_BUG=y 196CONFIG_BUG=y
186CONFIG_ELF_CORE=y 197CONFIG_ELF_CORE=y
187CONFIG_BASE_FULL=y 198CONFIG_BASE_FULL=y
188CONFIG_RT_MUTEXES=y
189CONFIG_FUTEX=y 199CONFIG_FUTEX=y
190CONFIG_EPOLL=y 200CONFIG_EPOLL=y
191CONFIG_SHMEM=y 201CONFIG_SHMEM=y
192CONFIG_SLAB=y 202CONFIG_SLAB=y
193CONFIG_VM_EVENT_COUNTERS=y 203CONFIG_VM_EVENT_COUNTERS=y
204CONFIG_RT_MUTEXES=y
194# CONFIG_TINY_SHMEM is not set 205# CONFIG_TINY_SHMEM is not set
195CONFIG_BASE_SMALL=0 206CONFIG_BASE_SMALL=0
196# CONFIG_SLOB is not set 207# CONFIG_SLOB is not set
@@ -208,6 +219,7 @@ CONFIG_KMOD=y
208# 219#
209# Block layer 220# Block layer
210# 221#
222CONFIG_BLOCK=y
211# CONFIG_LBD is not set 223# CONFIG_LBD is not set
212# CONFIG_BLK_DEV_IO_TRACE is not set 224# CONFIG_BLK_DEV_IO_TRACE is not set
213# CONFIG_LSF is not set 225# CONFIG_LSF is not set
@@ -250,6 +262,14 @@ CONFIG_BINFMT_ELF=y
250CONFIG_TRAD_SIGNALS=y 262CONFIG_TRAD_SIGNALS=y
251 263
252# 264#
265# Power management options
266#
267CONFIG_PM=y
268# CONFIG_PM_LEGACY is not set
269# CONFIG_PM_DEBUG is not set
270# CONFIG_PM_SYSFS_DEPRECATED is not set
271
272#
253# Networking 273# Networking
254# 274#
255CONFIG_NET=y 275CONFIG_NET=y
@@ -263,6 +283,8 @@ CONFIG_PACKET=y
263CONFIG_UNIX=y 283CONFIG_UNIX=y
264CONFIG_XFRM=y 284CONFIG_XFRM=y
265# CONFIG_XFRM_USER is not set 285# CONFIG_XFRM_USER is not set
286# CONFIG_XFRM_SUB_POLICY is not set
287CONFIG_XFRM_MIGRATE=y
266# CONFIG_NET_KEY is not set 288# CONFIG_NET_KEY is not set
267CONFIG_INET=y 289CONFIG_INET=y
268CONFIG_IP_MULTICAST=y 290CONFIG_IP_MULTICAST=y
@@ -290,10 +312,13 @@ CONFIG_SYN_COOKIES=y
290# CONFIG_INET_TUNNEL is not set 312# CONFIG_INET_TUNNEL is not set
291CONFIG_INET_XFRM_MODE_TRANSPORT=m 313CONFIG_INET_XFRM_MODE_TRANSPORT=m
292CONFIG_INET_XFRM_MODE_TUNNEL=m 314CONFIG_INET_XFRM_MODE_TUNNEL=m
315CONFIG_INET_XFRM_MODE_BEET=m
293CONFIG_INET_DIAG=y 316CONFIG_INET_DIAG=y
294CONFIG_INET_TCP_DIAG=y 317CONFIG_INET_TCP_DIAG=y
295# CONFIG_TCP_CONG_ADVANCED is not set 318# CONFIG_TCP_CONG_ADVANCED is not set
296CONFIG_TCP_CONG_BIC=y 319CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic"
321CONFIG_TCP_MD5SIG=y
297# CONFIG_IPV6 is not set 322# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set 323# CONFIG_INET6_XFRM_TUNNEL is not set
299# CONFIG_INET6_TUNNEL is not set 324# CONFIG_INET6_TUNNEL is not set
@@ -323,7 +348,6 @@ CONFIG_NETWORK_SECMARK=y
323# CONFIG_ATALK is not set 348# CONFIG_ATALK is not set
324# CONFIG_X25 is not set 349# CONFIG_X25 is not set
325# CONFIG_LAPB is not set 350# CONFIG_LAPB is not set
326# CONFIG_NET_DIVERT is not set
327# CONFIG_ECONET is not set 351# CONFIG_ECONET is not set
328# CONFIG_WAN_ROUTER is not set 352# CONFIG_WAN_ROUTER is not set
329 353
@@ -340,6 +364,7 @@ CONFIG_NETWORK_SECMARK=y
340# CONFIG_IRDA is not set 364# CONFIG_IRDA is not set
341# CONFIG_BT is not set 365# CONFIG_BT is not set
342# CONFIG_IEEE80211 is not set 366# CONFIG_IEEE80211 is not set
367CONFIG_FIB_RULES=y
343 368
344# 369#
345# Device Drivers 370# Device Drivers
@@ -371,6 +396,7 @@ CONFIG_CONNECTOR=m
371# 396#
372# Plug and Play support 397# Plug and Play support
373# 398#
399# CONFIG_PNPACPI is not set
374 400
375# 401#
376# Block devices 402# Block devices
@@ -388,11 +414,18 @@ CONFIG_BLK_DEV_NBD=m
388CONFIG_BLK_DEV_RAM=y 414CONFIG_BLK_DEV_RAM=y
389CONFIG_BLK_DEV_RAM_COUNT=16 415CONFIG_BLK_DEV_RAM_COUNT=16
390CONFIG_BLK_DEV_RAM_SIZE=4096 416CONFIG_BLK_DEV_RAM_SIZE=4096
417CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
391# CONFIG_BLK_DEV_INITRD is not set 418# CONFIG_BLK_DEV_INITRD is not set
392# CONFIG_CDROM_PKTCDVD is not set 419# CONFIG_CDROM_PKTCDVD is not set
393# CONFIG_ATA_OVER_ETH is not set 420# CONFIG_ATA_OVER_ETH is not set
394 421
395# 422#
423# Misc devices
424#
425CONFIG_SGI_IOC4=m
426# CONFIG_TIFM_CORE is not set
427
428#
396# ATA/ATAPI/MFM/RLL support 429# ATA/ATAPI/MFM/RLL support
397# 430#
398# CONFIG_IDE is not set 431# CONFIG_IDE is not set
@@ -402,6 +435,8 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
402# 435#
403# CONFIG_RAID_ATTRS is not set 436# CONFIG_RAID_ATTRS is not set
404CONFIG_SCSI=y 437CONFIG_SCSI=y
438CONFIG_SCSI_TGT=m
439# CONFIG_SCSI_NETLINK is not set
405CONFIG_SCSI_PROC_FS=y 440CONFIG_SCSI_PROC_FS=y
406 441
407# 442#
@@ -420,14 +455,17 @@ CONFIG_BLK_DEV_SD=y
420CONFIG_SCSI_MULTI_LUN=y 455CONFIG_SCSI_MULTI_LUN=y
421# CONFIG_SCSI_CONSTANTS is not set 456# CONFIG_SCSI_CONSTANTS is not set
422# CONFIG_SCSI_LOGGING is not set 457# CONFIG_SCSI_LOGGING is not set
458CONFIG_SCSI_SCAN_ASYNC=y
423 459
424# 460#
425# SCSI Transport Attributes 461# SCSI Transports
426# 462#
427# CONFIG_SCSI_SPI_ATTRS is not set 463# CONFIG_SCSI_SPI_ATTRS is not set
428# CONFIG_SCSI_FC_ATTRS is not set 464# CONFIG_SCSI_FC_ATTRS is not set
429# CONFIG_SCSI_ISCSI_ATTRS is not set 465# CONFIG_SCSI_ISCSI_ATTRS is not set
430# CONFIG_SCSI_SAS_ATTRS is not set 466CONFIG_SCSI_SAS_ATTRS=m
467CONFIG_SCSI_SAS_LIBSAS=m
468# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
431 469
432# 470#
433# SCSI low-level drivers 471# SCSI low-level drivers
@@ -440,26 +478,35 @@ CONFIG_SCSI_MULTI_LUN=y
440# CONFIG_SCSI_AIC7XXX is not set 478# CONFIG_SCSI_AIC7XXX is not set
441# CONFIG_SCSI_AIC7XXX_OLD is not set 479# CONFIG_SCSI_AIC7XXX_OLD is not set
442# CONFIG_SCSI_AIC79XX is not set 480# CONFIG_SCSI_AIC79XX is not set
481CONFIG_SCSI_AIC94XX=m
482# CONFIG_AIC94XX_DEBUG is not set
443# CONFIG_SCSI_DPT_I2O is not set 483# CONFIG_SCSI_DPT_I2O is not set
484# CONFIG_SCSI_ARCMSR is not set
444# CONFIG_MEGARAID_NEWGEN is not set 485# CONFIG_MEGARAID_NEWGEN is not set
445# CONFIG_MEGARAID_LEGACY is not set 486# CONFIG_MEGARAID_LEGACY is not set
446# CONFIG_MEGARAID_SAS is not set 487# CONFIG_MEGARAID_SAS is not set
447# CONFIG_SCSI_SATA is not set
448# CONFIG_SCSI_HPTIOP is not set 488# CONFIG_SCSI_HPTIOP is not set
449# CONFIG_SCSI_DMX3191D is not set 489# CONFIG_SCSI_DMX3191D is not set
450# CONFIG_SCSI_FUTURE_DOMAIN is not set 490# CONFIG_SCSI_FUTURE_DOMAIN is not set
451# CONFIG_SCSI_IPS is not set 491# CONFIG_SCSI_IPS is not set
452# CONFIG_SCSI_INITIO is not set 492# CONFIG_SCSI_INITIO is not set
453# CONFIG_SCSI_INIA100 is not set 493# CONFIG_SCSI_INIA100 is not set
494# CONFIG_SCSI_STEX is not set
454# CONFIG_SCSI_SYM53C8XX_2 is not set 495# CONFIG_SCSI_SYM53C8XX_2 is not set
455# CONFIG_SCSI_IPR is not set
456# CONFIG_SCSI_QLOGIC_1280 is not set 496# CONFIG_SCSI_QLOGIC_1280 is not set
457# CONFIG_SCSI_QLA_FC is not set 497# CONFIG_SCSI_QLA_FC is not set
498# CONFIG_SCSI_QLA_ISCSI is not set
458# CONFIG_SCSI_LPFC is not set 499# CONFIG_SCSI_LPFC is not set
459# CONFIG_SCSI_DC395x is not set 500# CONFIG_SCSI_DC395x is not set
460# CONFIG_SCSI_DC390T is not set 501# CONFIG_SCSI_DC390T is not set
461# CONFIG_SCSI_NSP32 is not set 502# CONFIG_SCSI_NSP32 is not set
462# CONFIG_SCSI_DEBUG is not set 503# CONFIG_SCSI_DEBUG is not set
504# CONFIG_SCSI_SRP is not set
505
506#
507# Serial ATA (prod) and Parallel ATA (experimental) drivers
508#
509# CONFIG_ATA is not set
463 510
464# 511#
465# Multi-device support (RAID and LVM) 512# Multi-device support (RAID and LVM)
@@ -513,6 +560,8 @@ CONFIG_LXT_PHY=m
513CONFIG_CICADA_PHY=m 560CONFIG_CICADA_PHY=m
514CONFIG_VITESSE_PHY=m 561CONFIG_VITESSE_PHY=m
515CONFIG_SMSC_PHY=m 562CONFIG_SMSC_PHY=m
563# CONFIG_BROADCOM_PHY is not set
564# CONFIG_FIXED_PHY is not set
516 565
517# 566#
518# Ethernet (10 or 100Mbit) 567# Ethernet (10 or 100Mbit)
@@ -549,7 +598,7 @@ CONFIG_E100=y
549# CONFIG_SUNDANCE is not set 598# CONFIG_SUNDANCE is not set
550# CONFIG_TLAN is not set 599# CONFIG_TLAN is not set
551# CONFIG_VIA_RHINE is not set 600# CONFIG_VIA_RHINE is not set
552# CONFIG_LAN_SAA9730 is not set 601# CONFIG_SC92031 is not set
553 602
554# 603#
555# Ethernet (1000 Mbit) 604# Ethernet (1000 Mbit)
@@ -568,14 +617,18 @@ CONFIG_E100=y
568# CONFIG_VIA_VELOCITY is not set 617# CONFIG_VIA_VELOCITY is not set
569# CONFIG_TIGON3 is not set 618# CONFIG_TIGON3 is not set
570# CONFIG_BNX2 is not set 619# CONFIG_BNX2 is not set
620CONFIG_QLA3XXX=m
621# CONFIG_ATL1 is not set
571 622
572# 623#
573# Ethernet (10000 Mbit) 624# Ethernet (10000 Mbit)
574# 625#
575# CONFIG_CHELSIO_T1 is not set 626# CONFIG_CHELSIO_T1 is not set
627CONFIG_CHELSIO_T3=m
576# CONFIG_IXGB is not set 628# CONFIG_IXGB is not set
577# CONFIG_S2IO is not set 629# CONFIG_S2IO is not set
578# CONFIG_MYRI10GE is not set 630# CONFIG_MYRI10GE is not set
631CONFIG_NETXEN_NIC=m
579 632
580# 633#
581# Token Ring devices 634# Token Ring devices
@@ -615,6 +668,7 @@ CONFIG_E100=y
615# Input device support 668# Input device support
616# 669#
617CONFIG_INPUT=y 670CONFIG_INPUT=y
671# CONFIG_INPUT_FF_MEMLESS is not set
618 672
619# 673#
620# Userland interfaces 674# Userland interfaces
@@ -682,10 +736,6 @@ CONFIG_LEGACY_PTY_COUNT=256
682# CONFIG_R3964 is not set 736# CONFIG_R3964 is not set
683# CONFIG_APPLICOM is not set 737# CONFIG_APPLICOM is not set
684# CONFIG_TANBAC_TB0219 is not set 738# CONFIG_TANBAC_TB0219 is not set
685
686#
687# Ftape, the floppy tape device driver
688#
689# CONFIG_DRM is not set 739# CONFIG_DRM is not set
690CONFIG_GPIO_VR41XX=y 740CONFIG_GPIO_VR41XX=y
691# CONFIG_RAW_DRIVER is not set 741# CONFIG_RAW_DRIVER is not set
@@ -694,7 +744,6 @@ CONFIG_GPIO_VR41XX=y
694# TPM devices 744# TPM devices
695# 745#
696# CONFIG_TCG_TPM is not set 746# CONFIG_TCG_TPM is not set
697# CONFIG_TELCLOCK is not set
698 747
699# 748#
700# I2C support 749# I2C support
@@ -719,14 +768,9 @@ CONFIG_GPIO_VR41XX=y
719# CONFIG_HWMON_VID is not set 768# CONFIG_HWMON_VID is not set
720 769
721# 770#
722# Misc devices
723#
724
725#
726# Multimedia devices 771# Multimedia devices
727# 772#
728# CONFIG_VIDEO_DEV is not set 773# CONFIG_VIDEO_DEV is not set
729CONFIG_VIDEO_V4L2=y
730 774
731# 775#
732# Digital Video Broadcasting Devices 776# Digital Video Broadcasting Devices
@@ -745,6 +789,7 @@ CONFIG_VIDEO_V4L2=y
745# 789#
746# CONFIG_VGA_CONSOLE is not set 790# CONFIG_VGA_CONSOLE is not set
747CONFIG_DUMMY_CONSOLE=y 791CONFIG_DUMMY_CONSOLE=y
792# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
748 793
749# 794#
750# Sound 795# Sound
@@ -752,6 +797,12 @@ CONFIG_DUMMY_CONSOLE=y
752# CONFIG_SOUND is not set 797# CONFIG_SOUND is not set
753 798
754# 799#
800# HID Devices
801#
802CONFIG_HID=y
803# CONFIG_HID_DEBUG is not set
804
805#
755# USB support 806# USB support
756# 807#
757CONFIG_USB_ARCH_HAS_HCD=y 808CONFIG_USB_ARCH_HAS_HCD=y
@@ -764,8 +815,8 @@ CONFIG_USB=y
764# Miscellaneous USB options 815# Miscellaneous USB options
765# 816#
766CONFIG_USB_DEVICEFS=y 817CONFIG_USB_DEVICEFS=y
767# CONFIG_USB_BANDWIDTH is not set
768# CONFIG_USB_DYNAMIC_MINORS is not set 818# CONFIG_USB_DYNAMIC_MINORS is not set
819# CONFIG_USB_SUSPEND is not set
769# CONFIG_USB_OTG is not set 820# CONFIG_USB_OTG is not set
770 821
771# 822#
@@ -775,9 +826,11 @@ CONFIG_USB_EHCI_HCD=y
775# CONFIG_USB_EHCI_SPLIT_ISO is not set 826# CONFIG_USB_EHCI_SPLIT_ISO is not set
776# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 827# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
777# CONFIG_USB_EHCI_TT_NEWSCHED is not set 828# CONFIG_USB_EHCI_TT_NEWSCHED is not set
829# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
778# CONFIG_USB_ISP116X_HCD is not set 830# CONFIG_USB_ISP116X_HCD is not set
779CONFIG_USB_OHCI_HCD=y 831CONFIG_USB_OHCI_HCD=y
780# CONFIG_USB_OHCI_BIG_ENDIAN is not set 832# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
833# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
781CONFIG_USB_OHCI_LITTLE_ENDIAN=y 834CONFIG_USB_OHCI_LITTLE_ENDIAN=y
782# CONFIG_USB_UHCI_HCD is not set 835# CONFIG_USB_UHCI_HCD is not set
783# CONFIG_USB_SL811_HCD is not set 836# CONFIG_USB_SL811_HCD is not set
@@ -805,6 +858,7 @@ CONFIG_USB_STORAGE=y
805# CONFIG_USB_STORAGE_SDDR55 is not set 858# CONFIG_USB_STORAGE_SDDR55 is not set
806# CONFIG_USB_STORAGE_JUMPSHOT is not set 859# CONFIG_USB_STORAGE_JUMPSHOT is not set
807# CONFIG_USB_STORAGE_ALAUDA is not set 860# CONFIG_USB_STORAGE_ALAUDA is not set
861# CONFIG_USB_STORAGE_KARMA is not set
808# CONFIG_USB_LIBUSUAL is not set 862# CONFIG_USB_LIBUSUAL is not set
809 863
810# 864#
@@ -829,6 +883,7 @@ CONFIG_USB_STORAGE=y
829# CONFIG_USB_ATI_REMOTE2 is not set 883# CONFIG_USB_ATI_REMOTE2 is not set
830# CONFIG_USB_KEYSPAN_REMOTE is not set 884# CONFIG_USB_KEYSPAN_REMOTE is not set
831# CONFIG_USB_APPLETOUCH is not set 885# CONFIG_USB_APPLETOUCH is not set
886# CONFIG_USB_GTCO is not set
832 887
833# 888#
834# USB Imaging devices 889# USB Imaging devices
@@ -843,6 +898,7 @@ CONFIG_USB_STORAGE=y
843# CONFIG_USB_KAWETH is not set 898# CONFIG_USB_KAWETH is not set
844# CONFIG_USB_PEGASUS is not set 899# CONFIG_USB_PEGASUS is not set
845# CONFIG_USB_RTL8150 is not set 900# CONFIG_USB_RTL8150 is not set
901# CONFIG_USB_USBNET_MII is not set
846# CONFIG_USB_USBNET is not set 902# CONFIG_USB_USBNET is not set
847# CONFIG_USB_MON is not set 903# CONFIG_USB_MON is not set
848 904
@@ -860,19 +916,22 @@ CONFIG_USB_STORAGE=y
860# 916#
861# CONFIG_USB_EMI62 is not set 917# CONFIG_USB_EMI62 is not set
862# CONFIG_USB_EMI26 is not set 918# CONFIG_USB_EMI26 is not set
919# CONFIG_USB_ADUTUX is not set
863# CONFIG_USB_AUERSWALD is not set 920# CONFIG_USB_AUERSWALD is not set
864# CONFIG_USB_RIO500 is not set 921# CONFIG_USB_RIO500 is not set
865# CONFIG_USB_LEGOTOWER is not set 922# CONFIG_USB_LEGOTOWER is not set
866# CONFIG_USB_LCD is not set 923# CONFIG_USB_LCD is not set
924# CONFIG_USB_BERRY_CHARGE is not set
867# CONFIG_USB_LED is not set 925# CONFIG_USB_LED is not set
868# CONFIG_USB_CY7C63 is not set 926# CONFIG_USB_CYPRESS_CY7C63 is not set
869# CONFIG_USB_CYTHERM is not set 927# CONFIG_USB_CYTHERM is not set
870# CONFIG_USB_PHIDGETKIT is not set 928# CONFIG_USB_PHIDGET is not set
871# CONFIG_USB_PHIDGETSERVO is not set
872# CONFIG_USB_IDMOUSE is not set 929# CONFIG_USB_IDMOUSE is not set
930# CONFIG_USB_FTDI_ELAN is not set
873# CONFIG_USB_APPLEDISPLAY is not set 931# CONFIG_USB_APPLEDISPLAY is not set
874# CONFIG_USB_SISUSBVGA is not set 932# CONFIG_USB_SISUSBVGA is not set
875# CONFIG_USB_LD is not set 933# CONFIG_USB_LD is not set
934# CONFIG_USB_TRANCEVIBRATOR is not set
876# CONFIG_USB_TEST is not set 935# CONFIG_USB_TEST is not set
877 936
878# 937#
@@ -918,6 +977,7 @@ CONFIG_RTC_LIB=y
918CONFIG_RTC_CLASS=y 977CONFIG_RTC_CLASS=y
919CONFIG_RTC_HCTOSYS=y 978CONFIG_RTC_HCTOSYS=y
920CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 979CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
980# CONFIG_RTC_DEBUG is not set
921 981
922# 982#
923# RTC interfaces 983# RTC interfaces
@@ -951,16 +1011,26 @@ CONFIG_RTC_DRV_VR41XX=y
951# 1011#
952 1012
953# 1013#
1014# Auxiliary Display support
1015#
1016
1017#
1018# Virtualization
1019#
1020
1021#
954# File systems 1022# File systems
955# 1023#
956CONFIG_EXT2_FS=y 1024CONFIG_EXT2_FS=y
957# CONFIG_EXT2_FS_XATTR is not set 1025# CONFIG_EXT2_FS_XATTR is not set
958# CONFIG_EXT2_FS_XIP is not set 1026# CONFIG_EXT2_FS_XIP is not set
959# CONFIG_EXT3_FS is not set 1027# CONFIG_EXT3_FS is not set
1028# CONFIG_EXT4DEV_FS is not set
960# CONFIG_REISERFS_FS is not set 1029# CONFIG_REISERFS_FS is not set
961# CONFIG_JFS_FS is not set 1030# CONFIG_JFS_FS is not set
962# CONFIG_FS_POSIX_ACL is not set 1031CONFIG_FS_POSIX_ACL=y
963# CONFIG_XFS_FS is not set 1032# CONFIG_XFS_FS is not set
1033# CONFIG_GFS2_FS is not set
964# CONFIG_OCFS2_FS is not set 1034# CONFIG_OCFS2_FS is not set
965# CONFIG_MINIX_FS is not set 1035# CONFIG_MINIX_FS is not set
966CONFIG_ROMFS_FS=m 1036CONFIG_ROMFS_FS=m
@@ -971,6 +1041,7 @@ CONFIG_DNOTIFY=y
971# CONFIG_AUTOFS_FS is not set 1041# CONFIG_AUTOFS_FS is not set
972CONFIG_AUTOFS4_FS=y 1042CONFIG_AUTOFS4_FS=y
973CONFIG_FUSE_FS=m 1043CONFIG_FUSE_FS=m
1044CONFIG_GENERIC_ACL=y
974 1045
975# 1046#
976# CD-ROM/DVD Filesystems 1047# CD-ROM/DVD Filesystems
@@ -990,11 +1061,13 @@ CONFIG_FUSE_FS=m
990# 1061#
991CONFIG_PROC_FS=y 1062CONFIG_PROC_FS=y
992CONFIG_PROC_KCORE=y 1063CONFIG_PROC_KCORE=y
1064CONFIG_PROC_SYSCTL=y
993CONFIG_SYSFS=y 1065CONFIG_SYSFS=y
994CONFIG_TMPFS=y 1066CONFIG_TMPFS=y
1067CONFIG_TMPFS_POSIX_ACL=y
995# CONFIG_HUGETLB_PAGE is not set 1068# CONFIG_HUGETLB_PAGE is not set
996CONFIG_RAMFS=y 1069CONFIG_RAMFS=y
997# CONFIG_CONFIGFS_FS is not set 1070CONFIG_CONFIGFS_FS=m
998 1071
999# 1072#
1000# Miscellaneous filesystems 1073# Miscellaneous filesystems
@@ -1036,7 +1109,6 @@ CONFIG_SUNRPC=y
1036# CONFIG_RPCSEC_GSS_SPKM3 is not set 1109# CONFIG_RPCSEC_GSS_SPKM3 is not set
1037# CONFIG_SMB_FS is not set 1110# CONFIG_SMB_FS is not set
1038# CONFIG_CIFS is not set 1111# CONFIG_CIFS is not set
1039# CONFIG_CIFS_DEBUG2 is not set
1040# CONFIG_NCP_FS is not set 1112# CONFIG_NCP_FS is not set
1041# CONFIG_CODA_FS is not set 1113# CONFIG_CODA_FS is not set
1042# CONFIG_AFS_FS is not set 1114# CONFIG_AFS_FS is not set
@@ -1054,6 +1126,14 @@ CONFIG_MSDOS_PARTITION=y
1054# CONFIG_NLS is not set 1126# CONFIG_NLS is not set
1055 1127
1056# 1128#
1129# Distributed Lock Manager
1130#
1131CONFIG_DLM=m
1132CONFIG_DLM_TCP=y
1133# CONFIG_DLM_SCTP is not set
1134# CONFIG_DLM_DEBUG is not set
1135
1136#
1057# Profiling support 1137# Profiling support
1058# 1138#
1059# CONFIG_PROFILING is not set 1139# CONFIG_PROFILING is not set
@@ -1063,11 +1143,13 @@ CONFIG_MSDOS_PARTITION=y
1063# 1143#
1064CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1144CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1065# CONFIG_PRINTK_TIME is not set 1145# CONFIG_PRINTK_TIME is not set
1146CONFIG_ENABLE_MUST_CHECK=y
1066# CONFIG_MAGIC_SYSRQ is not set 1147# CONFIG_MAGIC_SYSRQ is not set
1067# CONFIG_UNUSED_SYMBOLS is not set 1148# CONFIG_UNUSED_SYMBOLS is not set
1149# CONFIG_DEBUG_FS is not set
1150# CONFIG_HEADERS_CHECK is not set
1068# CONFIG_DEBUG_KERNEL is not set 1151# CONFIG_DEBUG_KERNEL is not set
1069CONFIG_LOG_BUF_SHIFT=14 1152CONFIG_LOG_BUF_SHIFT=14
1070# CONFIG_DEBUG_FS is not set
1071CONFIG_CROSSCOMPILE=y 1153CONFIG_CROSSCOMPILE=y
1072CONFIG_CMDLINE="mem=32M console=ttyVR0,115200" 1154CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
1073 1155
@@ -1080,7 +1162,44 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
1080# 1162#
1081# Cryptographic options 1163# Cryptographic options
1082# 1164#
1083# CONFIG_CRYPTO is not set 1165CONFIG_CRYPTO=y
1166CONFIG_CRYPTO_ALGAPI=y
1167CONFIG_CRYPTO_BLKCIPHER=m
1168CONFIG_CRYPTO_HASH=m
1169CONFIG_CRYPTO_MANAGER=m
1170CONFIG_CRYPTO_HMAC=m
1171CONFIG_CRYPTO_XCBC=m
1172CONFIG_CRYPTO_NULL=m
1173CONFIG_CRYPTO_MD4=m
1174CONFIG_CRYPTO_MD5=y
1175CONFIG_CRYPTO_SHA1=m
1176CONFIG_CRYPTO_SHA256=m
1177CONFIG_CRYPTO_SHA512=m
1178CONFIG_CRYPTO_WP512=m
1179CONFIG_CRYPTO_TGR192=m
1180CONFIG_CRYPTO_GF128MUL=m
1181CONFIG_CRYPTO_ECB=m
1182CONFIG_CRYPTO_CBC=m
1183CONFIG_CRYPTO_PCBC=m
1184CONFIG_CRYPTO_LRW=m
1185CONFIG_CRYPTO_DES=m
1186CONFIG_CRYPTO_FCRYPT=m
1187CONFIG_CRYPTO_BLOWFISH=m
1188CONFIG_CRYPTO_TWOFISH=m
1189CONFIG_CRYPTO_TWOFISH_COMMON=m
1190CONFIG_CRYPTO_SERPENT=m
1191CONFIG_CRYPTO_AES=m
1192CONFIG_CRYPTO_CAST5=m
1193CONFIG_CRYPTO_CAST6=m
1194CONFIG_CRYPTO_TEA=m
1195CONFIG_CRYPTO_ARC4=m
1196CONFIG_CRYPTO_KHAZAD=m
1197CONFIG_CRYPTO_ANUBIS=m
1198CONFIG_CRYPTO_DEFLATE=m
1199CONFIG_CRYPTO_MICHAEL_MIC=m
1200CONFIG_CRYPTO_CRC32C=m
1201CONFIG_CRYPTO_CAMELLIA=m
1202# CONFIG_CRYPTO_TEST is not set
1084 1203
1085# 1204#
1086# Hardware crypto devices 1205# Hardware crypto devices
@@ -1092,6 +1211,9 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,115200"
1092# CONFIG_CRC_CCITT is not set 1211# CONFIG_CRC_CCITT is not set
1093# CONFIG_CRC16 is not set 1212# CONFIG_CRC16 is not set
1094# CONFIG_CRC32 is not set 1213# CONFIG_CRC32 is not set
1095# CONFIG_LIBCRC32C is not set 1214CONFIG_LIBCRC32C=m
1096CONFIG_ZLIB_INFLATE=m 1215CONFIG_ZLIB_INFLATE=m
1216CONFIG_ZLIB_DEFLATE=m
1097CONFIG_PLIST=y 1217CONFIG_PLIST=y
1218CONFIG_HAS_IOMEM=y
1219CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig
index c19597fb0c32..a8eb4b182d34 100644
--- a/arch/mips/configs/tb0229_defconfig
+++ b/arch/mips/configs/tb0229_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:20 2006 4# Tue Feb 20 21:47:41 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -72,12 +72,15 @@ CONFIG_TANBAC_TB022X=y
72# CONFIG_VICTOR_MPC30X is not set 72# CONFIG_VICTOR_MPC30X is not set
73# CONFIG_ZAO_CAPCELLA is not set 73# CONFIG_ZAO_CAPCELLA is not set
74CONFIG_PCI_VR41XX=y 74CONFIG_PCI_VR41XX=y
75# CONFIG_VRC4173 is not set
76CONFIG_RWSEM_GENERIC_SPINLOCK=y 75CONFIG_RWSEM_GENERIC_SPINLOCK=y
76# CONFIG_ARCH_HAS_ILOG2_U32 is not set
77# CONFIG_ARCH_HAS_ILOG2_U64 is not set
77CONFIG_GENERIC_FIND_NEXT_BIT=y 78CONFIG_GENERIC_FIND_NEXT_BIT=y
78CONFIG_GENERIC_HWEIGHT=y 79CONFIG_GENERIC_HWEIGHT=y
79CONFIG_GENERIC_CALIBRATE_DELAY=y 80CONFIG_GENERIC_CALIBRATE_DELAY=y
81CONFIG_GENERIC_TIME=y
80CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 82CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
83CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
81CONFIG_DMA_NONCOHERENT=y 84CONFIG_DMA_NONCOHERENT=y
82CONFIG_DMA_NEED_PCI_MAP_STATE=y 85CONFIG_DMA_NEED_PCI_MAP_STATE=y
83# CONFIG_CPU_BIG_ENDIAN is not set 86# CONFIG_CPU_BIG_ENDIAN is not set
@@ -110,6 +113,7 @@ CONFIG_CPU_VR41XX=y
110# CONFIG_CPU_SB1 is not set 113# CONFIG_CPU_SB1 is not set
111CONFIG_SYS_HAS_CPU_VR41XX=y 114CONFIG_SYS_HAS_CPU_VR41XX=y
112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 115CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
116CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 117CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
114CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 118CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
115 119
@@ -123,8 +127,8 @@ CONFIG_PAGE_SIZE_4KB=y
123# CONFIG_PAGE_SIZE_16KB is not set 127# CONFIG_PAGE_SIZE_16KB is not set
124# CONFIG_PAGE_SIZE_64KB is not set 128# CONFIG_PAGE_SIZE_64KB is not set
125CONFIG_MIPS_MT_DISABLED=y 129CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 130# CONFIG_MIPS_MT_SMP is not set
131# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 132# CONFIG_MIPS_VPE_LOADER is not set
129CONFIG_CPU_HAS_SYNC=y 133CONFIG_CPU_HAS_SYNC=y
130CONFIG_GENERIC_HARDIRQS=y 134CONFIG_GENERIC_HARDIRQS=y
@@ -139,6 +143,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set 143# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
141# CONFIG_RESOURCES_64BIT is not set 145# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=1
142# CONFIG_HZ_48 is not set 147# CONFIG_HZ_48 is not set
143# CONFIG_HZ_100 is not set 148# CONFIG_HZ_100 is not set
144# CONFIG_HZ_128 is not set 149# CONFIG_HZ_128 is not set
@@ -151,6 +156,7 @@ CONFIG_HZ=1000
151CONFIG_PREEMPT_NONE=y 156CONFIG_PREEMPT_NONE=y
152# CONFIG_PREEMPT_VOLUNTARY is not set 157# CONFIG_PREEMPT_VOLUNTARY is not set
153# CONFIG_PREEMPT is not set 158# CONFIG_PREEMPT is not set
159# CONFIG_KEXEC is not set
154CONFIG_LOCKDEP_SUPPORT=y 160CONFIG_LOCKDEP_SUPPORT=y
155CONFIG_STACKTRACE_SUPPORT=y 161CONFIG_STACKTRACE_SUPPORT=y
156CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 162CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -169,15 +175,20 @@ CONFIG_LOCALVERSION=""
169CONFIG_LOCALVERSION_AUTO=y 175CONFIG_LOCALVERSION_AUTO=y
170CONFIG_SWAP=y 176CONFIG_SWAP=y
171CONFIG_SYSVIPC=y 177CONFIG_SYSVIPC=y
178# CONFIG_IPC_NS is not set
179CONFIG_SYSVIPC_SYSCTL=y
172# CONFIG_POSIX_MQUEUE is not set 180# CONFIG_POSIX_MQUEUE is not set
173# CONFIG_BSD_PROCESS_ACCT is not set 181# CONFIG_BSD_PROCESS_ACCT is not set
174CONFIG_SYSCTL=y 182# CONFIG_TASKSTATS is not set
183# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set 184# CONFIG_AUDIT is not set
176# CONFIG_IKCONFIG is not set 185# CONFIG_IKCONFIG is not set
186CONFIG_SYSFS_DEPRECATED=y
177# CONFIG_RELAY is not set 187# CONFIG_RELAY is not set
178CONFIG_INITRAMFS_SOURCE=""
179# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
189CONFIG_SYSCTL=y
180CONFIG_EMBEDDED=y 190CONFIG_EMBEDDED=y
191CONFIG_SYSCTL_SYSCALL=y
181CONFIG_KALLSYMS=y 192CONFIG_KALLSYMS=y
182# CONFIG_KALLSYMS_EXTRA_PASS is not set 193# CONFIG_KALLSYMS_EXTRA_PASS is not set
183CONFIG_HOTPLUG=y 194CONFIG_HOTPLUG=y
@@ -185,12 +196,12 @@ CONFIG_PRINTK=y
185CONFIG_BUG=y 196CONFIG_BUG=y
186CONFIG_ELF_CORE=y 197CONFIG_ELF_CORE=y
187CONFIG_BASE_FULL=y 198CONFIG_BASE_FULL=y
188CONFIG_RT_MUTEXES=y
189CONFIG_FUTEX=y 199CONFIG_FUTEX=y
190CONFIG_EPOLL=y 200CONFIG_EPOLL=y
191CONFIG_SHMEM=y 201CONFIG_SHMEM=y
192CONFIG_SLAB=y 202CONFIG_SLAB=y
193CONFIG_VM_EVENT_COUNTERS=y 203CONFIG_VM_EVENT_COUNTERS=y
204CONFIG_RT_MUTEXES=y
194# CONFIG_TINY_SHMEM is not set 205# CONFIG_TINY_SHMEM is not set
195CONFIG_BASE_SMALL=0 206CONFIG_BASE_SMALL=0
196# CONFIG_SLOB is not set 207# CONFIG_SLOB is not set
@@ -208,6 +219,7 @@ CONFIG_KMOD=y
208# 219#
209# Block layer 220# Block layer
210# 221#
222CONFIG_BLOCK=y
211# CONFIG_LBD is not set 223# CONFIG_LBD is not set
212# CONFIG_BLK_DEV_IO_TRACE is not set 224# CONFIG_BLK_DEV_IO_TRACE is not set
213# CONFIG_LSF is not set 225# CONFIG_LSF is not set
@@ -250,6 +262,14 @@ CONFIG_BINFMT_ELF=y
250CONFIG_TRAD_SIGNALS=y 262CONFIG_TRAD_SIGNALS=y
251 263
252# 264#
265# Power management options
266#
267CONFIG_PM=y
268# CONFIG_PM_LEGACY is not set
269# CONFIG_PM_DEBUG is not set
270# CONFIG_PM_SYSFS_DEPRECATED is not set
271
272#
253# Networking 273# Networking
254# 274#
255CONFIG_NET=y 275CONFIG_NET=y
@@ -263,6 +283,8 @@ CONFIG_PACKET=y
263CONFIG_UNIX=y 283CONFIG_UNIX=y
264CONFIG_XFRM=y 284CONFIG_XFRM=y
265# CONFIG_XFRM_USER is not set 285# CONFIG_XFRM_USER is not set
286# CONFIG_XFRM_SUB_POLICY is not set
287CONFIG_XFRM_MIGRATE=y
266# CONFIG_NET_KEY is not set 288# CONFIG_NET_KEY is not set
267CONFIG_INET=y 289CONFIG_INET=y
268CONFIG_IP_MULTICAST=y 290CONFIG_IP_MULTICAST=y
@@ -291,10 +313,13 @@ CONFIG_SYN_COOKIES=y
291CONFIG_INET_TUNNEL=m 313CONFIG_INET_TUNNEL=m
292CONFIG_INET_XFRM_MODE_TRANSPORT=m 314CONFIG_INET_XFRM_MODE_TRANSPORT=m
293CONFIG_INET_XFRM_MODE_TUNNEL=m 315CONFIG_INET_XFRM_MODE_TUNNEL=m
316CONFIG_INET_XFRM_MODE_BEET=m
294CONFIG_INET_DIAG=y 317CONFIG_INET_DIAG=y
295CONFIG_INET_TCP_DIAG=y 318CONFIG_INET_TCP_DIAG=y
296# CONFIG_TCP_CONG_ADVANCED is not set 319# CONFIG_TCP_CONG_ADVANCED is not set
297CONFIG_TCP_CONG_BIC=y 320CONFIG_TCP_CONG_CUBIC=y
321CONFIG_DEFAULT_TCP_CONG="cubic"
322CONFIG_TCP_MD5SIG=y
298# CONFIG_IPV6 is not set 323# CONFIG_IPV6 is not set
299# CONFIG_INET6_XFRM_TUNNEL is not set 324# CONFIG_INET6_XFRM_TUNNEL is not set
300# CONFIG_INET6_TUNNEL is not set 325# CONFIG_INET6_TUNNEL is not set
@@ -324,7 +349,6 @@ CONFIG_NETWORK_SECMARK=y
324# CONFIG_ATALK is not set 349# CONFIG_ATALK is not set
325# CONFIG_X25 is not set 350# CONFIG_X25 is not set
326# CONFIG_LAPB is not set 351# CONFIG_LAPB is not set
327# CONFIG_NET_DIVERT is not set
328# CONFIG_ECONET is not set 352# CONFIG_ECONET is not set
329# CONFIG_WAN_ROUTER is not set 353# CONFIG_WAN_ROUTER is not set
330 354
@@ -341,6 +365,7 @@ CONFIG_NETWORK_SECMARK=y
341# CONFIG_IRDA is not set 365# CONFIG_IRDA is not set
342# CONFIG_BT is not set 366# CONFIG_BT is not set
343# CONFIG_IEEE80211 is not set 367# CONFIG_IEEE80211 is not set
368CONFIG_FIB_RULES=y
344 369
345# 370#
346# Device Drivers 371# Device Drivers
@@ -372,6 +397,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
372# 397#
373# Plug and Play support 398# Plug and Play support
374# 399#
400# CONFIG_PNPACPI is not set
375 401
376# 402#
377# Block devices 403# Block devices
@@ -389,11 +415,18 @@ CONFIG_BLK_DEV_NBD=m
389CONFIG_BLK_DEV_RAM=y 415CONFIG_BLK_DEV_RAM=y
390CONFIG_BLK_DEV_RAM_COUNT=16 416CONFIG_BLK_DEV_RAM_COUNT=16
391CONFIG_BLK_DEV_RAM_SIZE=4096 417CONFIG_BLK_DEV_RAM_SIZE=4096
418CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
392# CONFIG_BLK_DEV_INITRD is not set 419# CONFIG_BLK_DEV_INITRD is not set
393# CONFIG_CDROM_PKTCDVD is not set 420# CONFIG_CDROM_PKTCDVD is not set
394# CONFIG_ATA_OVER_ETH is not set 421# CONFIG_ATA_OVER_ETH is not set
395 422
396# 423#
424# Misc devices
425#
426CONFIG_SGI_IOC4=m
427# CONFIG_TIFM_CORE is not set
428
429#
397# ATA/ATAPI/MFM/RLL support 430# ATA/ATAPI/MFM/RLL support
398# 431#
399# CONFIG_IDE is not set 432# CONFIG_IDE is not set
@@ -403,6 +436,12 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
403# 436#
404# CONFIG_RAID_ATTRS is not set 437# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set 438# CONFIG_SCSI is not set
439# CONFIG_SCSI_NETLINK is not set
440
441#
442# Serial ATA (prod) and Parallel ATA (experimental) drivers
443#
444# CONFIG_ATA is not set
406 445
407# 446#
408# Multi-device support (RAID and LVM) 447# Multi-device support (RAID and LVM)
@@ -453,6 +492,8 @@ CONFIG_LXT_PHY=m
453CONFIG_CICADA_PHY=m 492CONFIG_CICADA_PHY=m
454CONFIG_VITESSE_PHY=m 493CONFIG_VITESSE_PHY=m
455CONFIG_SMSC_PHY=m 494CONFIG_SMSC_PHY=m
495# CONFIG_BROADCOM_PHY is not set
496# CONFIG_FIXED_PHY is not set
456 497
457# 498#
458# Ethernet (10 or 100Mbit) 499# Ethernet (10 or 100Mbit)
@@ -489,14 +530,18 @@ CONFIG_R8169=y
489# CONFIG_SK98LIN is not set 530# CONFIG_SK98LIN is not set
490# CONFIG_TIGON3 is not set 531# CONFIG_TIGON3 is not set
491# CONFIG_BNX2 is not set 532# CONFIG_BNX2 is not set
533CONFIG_QLA3XXX=m
534# CONFIG_ATL1 is not set
492 535
493# 536#
494# Ethernet (10000 Mbit) 537# Ethernet (10000 Mbit)
495# 538#
496# CONFIG_CHELSIO_T1 is not set 539# CONFIG_CHELSIO_T1 is not set
540CONFIG_CHELSIO_T3=m
497# CONFIG_IXGB is not set 541# CONFIG_IXGB is not set
498# CONFIG_S2IO is not set 542# CONFIG_S2IO is not set
499# CONFIG_MYRI10GE is not set 543# CONFIG_MYRI10GE is not set
544CONFIG_NETXEN_NIC=m
500 545
501# 546#
502# Token Ring devices 547# Token Ring devices
@@ -535,6 +580,7 @@ CONFIG_R8169=y
535# Input device support 580# Input device support
536# 581#
537CONFIG_INPUT=y 582CONFIG_INPUT=y
583# CONFIG_INPUT_FF_MEMLESS is not set
538 584
539# 585#
540# Userland interfaces 586# Userland interfaces
@@ -602,10 +648,6 @@ CONFIG_LEGACY_PTY_COUNT=256
602# CONFIG_R3964 is not set 648# CONFIG_R3964 is not set
603# CONFIG_APPLICOM is not set 649# CONFIG_APPLICOM is not set
604CONFIG_TANBAC_TB0219=y 650CONFIG_TANBAC_TB0219=y
605
606#
607# Ftape, the floppy tape device driver
608#
609# CONFIG_DRM is not set 651# CONFIG_DRM is not set
610CONFIG_GPIO_VR41XX=y 652CONFIG_GPIO_VR41XX=y
611# CONFIG_RAW_DRIVER is not set 653# CONFIG_RAW_DRIVER is not set
@@ -614,7 +656,6 @@ CONFIG_GPIO_VR41XX=y
614# TPM devices 656# TPM devices
615# 657#
616# CONFIG_TCG_TPM is not set 658# CONFIG_TCG_TPM is not set
617# CONFIG_TELCLOCK is not set
618 659
619# 660#
620# I2C support 661# I2C support
@@ -630,6 +671,7 @@ CONFIG_GPIO_VR41XX=y
630# 671#
631# Dallas's 1-wire bus 672# Dallas's 1-wire bus
632# 673#
674# CONFIG_W1 is not set
633 675
634# 676#
635# Hardware Monitoring support 677# Hardware Monitoring support
@@ -638,14 +680,9 @@ CONFIG_GPIO_VR41XX=y
638# CONFIG_HWMON_VID is not set 680# CONFIG_HWMON_VID is not set
639 681
640# 682#
641# Misc devices
642#
643
644#
645# Multimedia devices 683# Multimedia devices
646# 684#
647# CONFIG_VIDEO_DEV is not set 685# CONFIG_VIDEO_DEV is not set
648CONFIG_VIDEO_V4L2=y
649 686
650# 687#
651# Digital Video Broadcasting Devices 688# Digital Video Broadcasting Devices
@@ -664,6 +701,7 @@ CONFIG_VIDEO_V4L2=y
664# 701#
665# CONFIG_VGA_CONSOLE is not set 702# CONFIG_VGA_CONSOLE is not set
666CONFIG_DUMMY_CONSOLE=y 703CONFIG_DUMMY_CONSOLE=y
704# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
667 705
668# 706#
669# Sound 707# Sound
@@ -671,6 +709,12 @@ CONFIG_DUMMY_CONSOLE=y
671# CONFIG_SOUND is not set 709# CONFIG_SOUND is not set
672 710
673# 711#
712# HID Devices
713#
714CONFIG_HID=y
715# CONFIG_HID_DEBUG is not set
716
717#
674# USB support 718# USB support
675# 719#
676CONFIG_USB_ARCH_HAS_HCD=y 720CONFIG_USB_ARCH_HAS_HCD=y
@@ -683,8 +727,8 @@ CONFIG_USB=m
683# Miscellaneous USB options 727# Miscellaneous USB options
684# 728#
685CONFIG_USB_DEVICEFS=y 729CONFIG_USB_DEVICEFS=y
686# CONFIG_USB_BANDWIDTH is not set
687# CONFIG_USB_DYNAMIC_MINORS is not set 730# CONFIG_USB_DYNAMIC_MINORS is not set
731# CONFIG_USB_SUSPEND is not set
688# CONFIG_USB_OTG is not set 732# CONFIG_USB_OTG is not set
689 733
690# 734#
@@ -694,9 +738,11 @@ CONFIG_USB_EHCI_HCD=m
694# CONFIG_USB_EHCI_SPLIT_ISO is not set 738# CONFIG_USB_EHCI_SPLIT_ISO is not set
695# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 739# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
696# CONFIG_USB_EHCI_TT_NEWSCHED is not set 740# CONFIG_USB_EHCI_TT_NEWSCHED is not set
741# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
697# CONFIG_USB_ISP116X_HCD is not set 742# CONFIG_USB_ISP116X_HCD is not set
698CONFIG_USB_OHCI_HCD=m 743CONFIG_USB_OHCI_HCD=m
699# CONFIG_USB_OHCI_BIG_ENDIAN is not set 744# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
745# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
700CONFIG_USB_OHCI_LITTLE_ENDIAN=y 746CONFIG_USB_OHCI_LITTLE_ENDIAN=y
701# CONFIG_USB_UHCI_HCD is not set 747# CONFIG_USB_UHCI_HCD is not set
702# CONFIG_USB_SL811_HCD is not set 748# CONFIG_USB_SL811_HCD is not set
@@ -714,7 +760,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
714# 760#
715# may also be needed; see USB_STORAGE Help for more information 761# may also be needed; see USB_STORAGE Help for more information
716# 762#
717# CONFIG_USB_STORAGE is not set
718# CONFIG_USB_LIBUSUAL is not set 763# CONFIG_USB_LIBUSUAL is not set
719 764
720# 765#
@@ -739,6 +784,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
739# CONFIG_USB_ATI_REMOTE2 is not set 784# CONFIG_USB_ATI_REMOTE2 is not set
740# CONFIG_USB_KEYSPAN_REMOTE is not set 785# CONFIG_USB_KEYSPAN_REMOTE is not set
741# CONFIG_USB_APPLETOUCH is not set 786# CONFIG_USB_APPLETOUCH is not set
787# CONFIG_USB_GTCO is not set
742 788
743# 789#
744# USB Imaging devices 790# USB Imaging devices
@@ -752,6 +798,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
752# CONFIG_USB_KAWETH is not set 798# CONFIG_USB_KAWETH is not set
753# CONFIG_USB_PEGASUS is not set 799# CONFIG_USB_PEGASUS is not set
754# CONFIG_USB_RTL8150 is not set 800# CONFIG_USB_RTL8150 is not set
801# CONFIG_USB_USBNET_MII is not set
755# CONFIG_USB_USBNET is not set 802# CONFIG_USB_USBNET is not set
756CONFIG_USB_MON=y 803CONFIG_USB_MON=y
757 804
@@ -769,19 +816,22 @@ CONFIG_USB_MON=y
769# 816#
770# CONFIG_USB_EMI62 is not set 817# CONFIG_USB_EMI62 is not set
771# CONFIG_USB_EMI26 is not set 818# CONFIG_USB_EMI26 is not set
819# CONFIG_USB_ADUTUX is not set
772# CONFIG_USB_AUERSWALD is not set 820# CONFIG_USB_AUERSWALD is not set
773# CONFIG_USB_RIO500 is not set 821# CONFIG_USB_RIO500 is not set
774# CONFIG_USB_LEGOTOWER is not set 822# CONFIG_USB_LEGOTOWER is not set
775# CONFIG_USB_LCD is not set 823# CONFIG_USB_LCD is not set
824# CONFIG_USB_BERRY_CHARGE is not set
776# CONFIG_USB_LED is not set 825# CONFIG_USB_LED is not set
777# CONFIG_USB_CY7C63 is not set 826# CONFIG_USB_CYPRESS_CY7C63 is not set
778# CONFIG_USB_CYTHERM is not set 827# CONFIG_USB_CYTHERM is not set
779# CONFIG_USB_PHIDGETKIT is not set 828# CONFIG_USB_PHIDGET is not set
780# CONFIG_USB_PHIDGETSERVO is not set
781# CONFIG_USB_IDMOUSE is not set 829# CONFIG_USB_IDMOUSE is not set
830# CONFIG_USB_FTDI_ELAN is not set
782# CONFIG_USB_APPLEDISPLAY is not set 831# CONFIG_USB_APPLEDISPLAY is not set
783# CONFIG_USB_SISUSBVGA is not set 832# CONFIG_USB_SISUSBVGA is not set
784# CONFIG_USB_LD is not set 833# CONFIG_USB_LD is not set
834# CONFIG_USB_TRANCEVIBRATOR is not set
785# CONFIG_USB_TEST is not set 835# CONFIG_USB_TEST is not set
786 836
787# 837#
@@ -827,6 +877,7 @@ CONFIG_RTC_LIB=y
827CONFIG_RTC_CLASS=y 877CONFIG_RTC_CLASS=y
828CONFIG_RTC_HCTOSYS=y 878CONFIG_RTC_HCTOSYS=y
829CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 879CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
880# CONFIG_RTC_DEBUG is not set
830 881
831# 882#
832# RTC interfaces 883# RTC interfaces
@@ -860,16 +911,26 @@ CONFIG_RTC_DRV_VR41XX=y
860# 911#
861 912
862# 913#
914# Auxiliary Display support
915#
916
917#
918# Virtualization
919#
920
921#
863# File systems 922# File systems
864# 923#
865CONFIG_EXT2_FS=y 924CONFIG_EXT2_FS=y
866# CONFIG_EXT2_FS_XATTR is not set 925# CONFIG_EXT2_FS_XATTR is not set
867# CONFIG_EXT2_FS_XIP is not set 926# CONFIG_EXT2_FS_XIP is not set
868# CONFIG_EXT3_FS is not set 927# CONFIG_EXT3_FS is not set
928# CONFIG_EXT4DEV_FS is not set
869# CONFIG_REISERFS_FS is not set 929# CONFIG_REISERFS_FS is not set
870# CONFIG_JFS_FS is not set 930# CONFIG_JFS_FS is not set
871# CONFIG_FS_POSIX_ACL is not set 931CONFIG_FS_POSIX_ACL=y
872# CONFIG_XFS_FS is not set 932# CONFIG_XFS_FS is not set
933# CONFIG_GFS2_FS is not set
873# CONFIG_OCFS2_FS is not set 934# CONFIG_OCFS2_FS is not set
874# CONFIG_MINIX_FS is not set 935# CONFIG_MINIX_FS is not set
875CONFIG_ROMFS_FS=m 936CONFIG_ROMFS_FS=m
@@ -880,6 +941,7 @@ CONFIG_DNOTIFY=y
880# CONFIG_AUTOFS_FS is not set 941# CONFIG_AUTOFS_FS is not set
881CONFIG_AUTOFS4_FS=y 942CONFIG_AUTOFS4_FS=y
882CONFIG_FUSE_FS=m 943CONFIG_FUSE_FS=m
944CONFIG_GENERIC_ACL=y
883 945
884# 946#
885# CD-ROM/DVD Filesystems 947# CD-ROM/DVD Filesystems
@@ -899,11 +961,13 @@ CONFIG_FUSE_FS=m
899# 961#
900CONFIG_PROC_FS=y 962CONFIG_PROC_FS=y
901CONFIG_PROC_KCORE=y 963CONFIG_PROC_KCORE=y
964CONFIG_PROC_SYSCTL=y
902CONFIG_SYSFS=y 965CONFIG_SYSFS=y
903CONFIG_TMPFS=y 966CONFIG_TMPFS=y
967CONFIG_TMPFS_POSIX_ACL=y
904# CONFIG_HUGETLB_PAGE is not set 968# CONFIG_HUGETLB_PAGE is not set
905CONFIG_RAMFS=y 969CONFIG_RAMFS=y
906# CONFIG_CONFIGFS_FS is not set 970CONFIG_CONFIGFS_FS=m
907 971
908# 972#
909# Miscellaneous filesystems 973# Miscellaneous filesystems
@@ -945,7 +1009,6 @@ CONFIG_SUNRPC=y
945# CONFIG_RPCSEC_GSS_SPKM3 is not set 1009# CONFIG_RPCSEC_GSS_SPKM3 is not set
946# CONFIG_SMB_FS is not set 1010# CONFIG_SMB_FS is not set
947# CONFIG_CIFS is not set 1011# CONFIG_CIFS is not set
948# CONFIG_CIFS_DEBUG2 is not set
949# CONFIG_NCP_FS is not set 1012# CONFIG_NCP_FS is not set
950# CONFIG_CODA_FS is not set 1013# CONFIG_CODA_FS is not set
951# CONFIG_AFS_FS is not set 1014# CONFIG_AFS_FS is not set
@@ -963,6 +1026,14 @@ CONFIG_MSDOS_PARTITION=y
963# CONFIG_NLS is not set 1026# CONFIG_NLS is not set
964 1027
965# 1028#
1029# Distributed Lock Manager
1030#
1031CONFIG_DLM=m
1032CONFIG_DLM_TCP=y
1033# CONFIG_DLM_SCTP is not set
1034# CONFIG_DLM_DEBUG is not set
1035
1036#
966# Profiling support 1037# Profiling support
967# 1038#
968# CONFIG_PROFILING is not set 1039# CONFIG_PROFILING is not set
@@ -972,11 +1043,13 @@ CONFIG_MSDOS_PARTITION=y
972# 1043#
973CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1044CONFIG_TRACE_IRQFLAGS_SUPPORT=y
974# CONFIG_PRINTK_TIME is not set 1045# CONFIG_PRINTK_TIME is not set
1046CONFIG_ENABLE_MUST_CHECK=y
975# CONFIG_MAGIC_SYSRQ is not set 1047# CONFIG_MAGIC_SYSRQ is not set
976# CONFIG_UNUSED_SYMBOLS is not set 1048# CONFIG_UNUSED_SYMBOLS is not set
1049# CONFIG_DEBUG_FS is not set
1050# CONFIG_HEADERS_CHECK is not set
977# CONFIG_DEBUG_KERNEL is not set 1051# CONFIG_DEBUG_KERNEL is not set
978CONFIG_LOG_BUF_SHIFT=14 1052CONFIG_LOG_BUF_SHIFT=14
979# CONFIG_DEBUG_FS is not set
980CONFIG_CROSSCOMPILE=y 1053CONFIG_CROSSCOMPILE=y
981CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 1054CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
982 1055
@@ -989,7 +1062,44 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
989# 1062#
990# Cryptographic options 1063# Cryptographic options
991# 1064#
992# CONFIG_CRYPTO is not set 1065CONFIG_CRYPTO=y
1066CONFIG_CRYPTO_ALGAPI=y
1067CONFIG_CRYPTO_BLKCIPHER=m
1068CONFIG_CRYPTO_HASH=m
1069CONFIG_CRYPTO_MANAGER=m
1070CONFIG_CRYPTO_HMAC=m
1071CONFIG_CRYPTO_XCBC=m
1072CONFIG_CRYPTO_NULL=m
1073CONFIG_CRYPTO_MD4=m
1074CONFIG_CRYPTO_MD5=y
1075CONFIG_CRYPTO_SHA1=m
1076CONFIG_CRYPTO_SHA256=m
1077CONFIG_CRYPTO_SHA512=m
1078CONFIG_CRYPTO_WP512=m
1079CONFIG_CRYPTO_TGR192=m
1080CONFIG_CRYPTO_GF128MUL=m
1081CONFIG_CRYPTO_ECB=m
1082CONFIG_CRYPTO_CBC=m
1083CONFIG_CRYPTO_PCBC=m
1084CONFIG_CRYPTO_LRW=m
1085CONFIG_CRYPTO_DES=m
1086CONFIG_CRYPTO_FCRYPT=m
1087CONFIG_CRYPTO_BLOWFISH=m
1088CONFIG_CRYPTO_TWOFISH=m
1089CONFIG_CRYPTO_TWOFISH_COMMON=m
1090CONFIG_CRYPTO_SERPENT=m
1091CONFIG_CRYPTO_AES=m
1092CONFIG_CRYPTO_CAST5=m
1093CONFIG_CRYPTO_CAST6=m
1094CONFIG_CRYPTO_TEA=m
1095CONFIG_CRYPTO_ARC4=m
1096CONFIG_CRYPTO_KHAZAD=m
1097CONFIG_CRYPTO_ANUBIS=m
1098CONFIG_CRYPTO_DEFLATE=m
1099CONFIG_CRYPTO_MICHAEL_MIC=m
1100CONFIG_CRYPTO_CRC32C=m
1101CONFIG_CRYPTO_CAMELLIA=m
1102# CONFIG_CRYPTO_TEST is not set
993 1103
994# 1104#
995# Hardware crypto devices 1105# Hardware crypto devices
@@ -998,9 +1108,13 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
998# 1108#
999# Library routines 1109# Library routines
1000# 1110#
1111CONFIG_BITREVERSE=y
1001# CONFIG_CRC_CCITT is not set 1112# CONFIG_CRC_CCITT is not set
1002# CONFIG_CRC16 is not set 1113# CONFIG_CRC16 is not set
1003CONFIG_CRC32=y 1114CONFIG_CRC32=y
1004# CONFIG_LIBCRC32C is not set 1115CONFIG_LIBCRC32C=m
1005CONFIG_ZLIB_INFLATE=m 1116CONFIG_ZLIB_INFLATE=m
1117CONFIG_ZLIB_DEFLATE=m
1006CONFIG_PLIST=y 1118CONFIG_PLIST=y
1119CONFIG_HAS_IOMEM=y
1120CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 97d94f96990f..69b87304fdbc 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc2 3# Linux kernel version: 2.6.20
4# Wed Oct 18 12:57:11 2006 4# Tue Feb 20 21:47:41 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -40,6 +41,7 @@ CONFIG_MIPS=y
40# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
42# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
43# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
44CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
45# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -71,11 +73,14 @@ CONFIG_TANBAC_TB0287=y
71# CONFIG_ZAO_CAPCELLA is not set 73# CONFIG_ZAO_CAPCELLA is not set
72CONFIG_PCI_VR41XX=y 74CONFIG_PCI_VR41XX=y
73CONFIG_RWSEM_GENERIC_SPINLOCK=y 75CONFIG_RWSEM_GENERIC_SPINLOCK=y
76# CONFIG_ARCH_HAS_ILOG2_U32 is not set
77# CONFIG_ARCH_HAS_ILOG2_U64 is not set
74CONFIG_GENERIC_FIND_NEXT_BIT=y 78CONFIG_GENERIC_FIND_NEXT_BIT=y
75CONFIG_GENERIC_HWEIGHT=y 79CONFIG_GENERIC_HWEIGHT=y
76CONFIG_GENERIC_CALIBRATE_DELAY=y 80CONFIG_GENERIC_CALIBRATE_DELAY=y
77CONFIG_GENERIC_TIME=y 81CONFIG_GENERIC_TIME=y
78CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 82CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
83CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
79CONFIG_DMA_NONCOHERENT=y 84CONFIG_DMA_NONCOHERENT=y
80CONFIG_DMA_NEED_PCI_MAP_STATE=y 85CONFIG_DMA_NEED_PCI_MAP_STATE=y
81# CONFIG_CPU_BIG_ENDIAN is not set 86# CONFIG_CPU_BIG_ENDIAN is not set
@@ -108,6 +113,7 @@ CONFIG_CPU_VR41XX=y
108# CONFIG_CPU_SB1 is not set 113# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_VR41XX=y 114CONFIG_SYS_HAS_CPU_VR41XX=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 115CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
116CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
111CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 117CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 118CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
113 119
@@ -137,6 +143,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
137# CONFIG_SPARSEMEM_STATIC is not set 143# CONFIG_SPARSEMEM_STATIC is not set
138CONFIG_SPLIT_PTLOCK_CPUS=4 144CONFIG_SPLIT_PTLOCK_CPUS=4
139# CONFIG_RESOURCES_64BIT is not set 145# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=1
140# CONFIG_HZ_48 is not set 147# CONFIG_HZ_48 is not set
141# CONFIG_HZ_100 is not set 148# CONFIG_HZ_100 is not set
142# CONFIG_HZ_128 is not set 149# CONFIG_HZ_128 is not set
@@ -149,6 +156,7 @@ CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y 156CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set 157# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set 158# CONFIG_PREEMPT is not set
159# CONFIG_KEXEC is not set
152CONFIG_LOCKDEP_SUPPORT=y 160CONFIG_LOCKDEP_SUPPORT=y
153CONFIG_STACKTRACE_SUPPORT=y 161CONFIG_STACKTRACE_SUPPORT=y
154CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 162CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -168,14 +176,15 @@ CONFIG_LOCALVERSION_AUTO=y
168CONFIG_SWAP=y 176CONFIG_SWAP=y
169CONFIG_SYSVIPC=y 177CONFIG_SYSVIPC=y
170# CONFIG_IPC_NS is not set 178# CONFIG_IPC_NS is not set
179CONFIG_SYSVIPC_SYSCTL=y
171# CONFIG_POSIX_MQUEUE is not set 180# CONFIG_POSIX_MQUEUE is not set
172# CONFIG_BSD_PROCESS_ACCT is not set 181# CONFIG_BSD_PROCESS_ACCT is not set
173# CONFIG_TASKSTATS is not set 182# CONFIG_TASKSTATS is not set
174# CONFIG_UTS_NS is not set 183# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set 184# CONFIG_AUDIT is not set
176# CONFIG_IKCONFIG is not set 185# CONFIG_IKCONFIG is not set
186CONFIG_SYSFS_DEPRECATED=y
177# CONFIG_RELAY is not set 187# CONFIG_RELAY is not set
178CONFIG_INITRAMFS_SOURCE=""
179# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
180CONFIG_SYSCTL=y 189CONFIG_SYSCTL=y
181CONFIG_EMBEDDED=y 190CONFIG_EMBEDDED=y
@@ -233,7 +242,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
233# 242#
234CONFIG_HW_HAS_PCI=y 243CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y 244CONFIG_PCI=y
236# CONFIG_PCI_MULTITHREAD_PROBE is not set
237CONFIG_MMU=y 245CONFIG_MMU=y
238 246
239# 247#
@@ -252,6 +260,14 @@ CONFIG_BINFMT_ELF=y
252CONFIG_TRAD_SIGNALS=y 260CONFIG_TRAD_SIGNALS=y
253 261
254# 262#
263# Power management options
264#
265CONFIG_PM=y
266# CONFIG_PM_LEGACY is not set
267# CONFIG_PM_DEBUG is not set
268# CONFIG_PM_SYSFS_DEPRECATED is not set
269
270#
255# Networking 271# Networking
256# 272#
257CONFIG_NET=y 273CONFIG_NET=y
@@ -266,6 +282,7 @@ CONFIG_UNIX=y
266CONFIG_XFRM=y 282CONFIG_XFRM=y
267# CONFIG_XFRM_USER is not set 283# CONFIG_XFRM_USER is not set
268# CONFIG_XFRM_SUB_POLICY is not set 284# CONFIG_XFRM_SUB_POLICY is not set
285CONFIG_XFRM_MIGRATE=y
269# CONFIG_NET_KEY is not set 286# CONFIG_NET_KEY is not set
270CONFIG_INET=y 287CONFIG_INET=y
271CONFIG_IP_MULTICAST=y 288CONFIG_IP_MULTICAST=y
@@ -315,6 +332,7 @@ CONFIG_DEFAULT_BIC=y
315# CONFIG_DEFAULT_WESTWOOD is not set 332# CONFIG_DEFAULT_WESTWOOD is not set
316# CONFIG_DEFAULT_RENO is not set 333# CONFIG_DEFAULT_RENO is not set
317CONFIG_DEFAULT_TCP_CONG="bic" 334CONFIG_DEFAULT_TCP_CONG="bic"
335CONFIG_TCP_MD5SIG=y
318# CONFIG_IPV6 is not set 336# CONFIG_IPV6 is not set
319# CONFIG_INET6_XFRM_TUNNEL is not set 337# CONFIG_INET6_XFRM_TUNNEL is not set
320# CONFIG_INET6_TUNNEL is not set 338# CONFIG_INET6_TUNNEL is not set
@@ -391,6 +409,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
391# 409#
392# Plug and Play support 410# Plug and Play support
393# 411#
412# CONFIG_PNPACPI is not set
394 413
395# 414#
396# Block devices 415# Block devices
@@ -414,6 +433,12 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
414# CONFIG_ATA_OVER_ETH is not set 433# CONFIG_ATA_OVER_ETH is not set
415 434
416# 435#
436# Misc devices
437#
438CONFIG_SGI_IOC4=m
439# CONFIG_TIFM_CORE is not set
440
441#
417# ATA/ATAPI/MFM/RLL support 442# ATA/ATAPI/MFM/RLL support
418# 443#
419# CONFIG_IDE is not set 444# CONFIG_IDE is not set
@@ -423,6 +448,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
423# 448#
424# CONFIG_RAID_ATTRS is not set 449# CONFIG_RAID_ATTRS is not set
425CONFIG_SCSI=y 450CONFIG_SCSI=y
451CONFIG_SCSI_TGT=m
426# CONFIG_SCSI_NETLINK is not set 452# CONFIG_SCSI_NETLINK is not set
427CONFIG_SCSI_PROC_FS=y 453CONFIG_SCSI_PROC_FS=y
428 454
@@ -442,6 +468,7 @@ CONFIG_BLK_DEV_SD=y
442# CONFIG_SCSI_MULTI_LUN is not set 468# CONFIG_SCSI_MULTI_LUN is not set
443# CONFIG_SCSI_CONSTANTS is not set 469# CONFIG_SCSI_CONSTANTS is not set
444# CONFIG_SCSI_LOGGING is not set 470# CONFIG_SCSI_LOGGING is not set
471CONFIG_SCSI_SCAN_ASYNC=y
445 472
446# 473#
447# SCSI Transports 474# SCSI Transports
@@ -486,11 +513,13 @@ CONFIG_BLK_DEV_SD=y
486# CONFIG_SCSI_DC390T is not set 513# CONFIG_SCSI_DC390T is not set
487# CONFIG_SCSI_NSP32 is not set 514# CONFIG_SCSI_NSP32 is not set
488# CONFIG_SCSI_DEBUG is not set 515# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set
489 517
490# 518#
491# Serial ATA (prod) and Parallel ATA (experimental) drivers 519# Serial ATA (prod) and Parallel ATA (experimental) drivers
492# 520#
493CONFIG_ATA=y 521CONFIG_ATA=y
522# CONFIG_ATA_NONSTANDARD is not set
494# CONFIG_SATA_AHCI is not set 523# CONFIG_SATA_AHCI is not set
495# CONFIG_SATA_SVW is not set 524# CONFIG_SATA_SVW is not set
496# CONFIG_ATA_PIIX is not set 525# CONFIG_ATA_PIIX is not set
@@ -506,6 +535,7 @@ CONFIG_ATA=y
506# CONFIG_SATA_ULI is not set 535# CONFIG_SATA_ULI is not set
507# CONFIG_SATA_VIA is not set 536# CONFIG_SATA_VIA is not set
508# CONFIG_SATA_VITESSE is not set 537# CONFIG_SATA_VITESSE is not set
538# CONFIG_SATA_INIC162X is not set
509# CONFIG_PATA_ALI is not set 539# CONFIG_PATA_ALI is not set
510# CONFIG_PATA_AMD is not set 540# CONFIG_PATA_AMD is not set
511# CONFIG_PATA_ARTOP is not set 541# CONFIG_PATA_ARTOP is not set
@@ -521,8 +551,10 @@ CONFIG_ATA=y
521# CONFIG_PATA_HPT3X2N is not set 551# CONFIG_PATA_HPT3X2N is not set
522# CONFIG_PATA_HPT3X3 is not set 552# CONFIG_PATA_HPT3X3 is not set
523# CONFIG_PATA_IT821X is not set 553# CONFIG_PATA_IT821X is not set
554# CONFIG_PATA_IT8213 is not set
524# CONFIG_PATA_JMICRON is not set 555# CONFIG_PATA_JMICRON is not set
525# CONFIG_PATA_TRIFLEX is not set 556# CONFIG_PATA_TRIFLEX is not set
557# CONFIG_PATA_MARVELL is not set
526# CONFIG_PATA_MPIIX is not set 558# CONFIG_PATA_MPIIX is not set
527# CONFIG_PATA_OLDPIIX is not set 559# CONFIG_PATA_OLDPIIX is not set
528# CONFIG_PATA_NETCELL is not set 560# CONFIG_PATA_NETCELL is not set
@@ -539,6 +571,7 @@ CONFIG_PATA_SIL680=y
539# CONFIG_PATA_SIS is not set 571# CONFIG_PATA_SIS is not set
540# CONFIG_PATA_VIA is not set 572# CONFIG_PATA_VIA is not set
541# CONFIG_PATA_WINBOND is not set 573# CONFIG_PATA_WINBOND is not set
574# CONFIG_PATA_PLATFORM is not set
542 575
543# 576#
544# Multi-device support (RAID and LVM) 577# Multi-device support (RAID and LVM)
@@ -562,10 +595,8 @@ CONFIG_IEEE1394=m
562# Subsystem Options 595# Subsystem Options
563# 596#
564# CONFIG_IEEE1394_VERBOSEDEBUG is not set 597# CONFIG_IEEE1394_VERBOSEDEBUG is not set
565# CONFIG_IEEE1394_OUI_DB is not set
566CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y 598CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
567CONFIG_IEEE1394_CONFIG_ROM_IP1394=y 599CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
568# CONFIG_IEEE1394_EXPORT_FULL_API is not set
569 600
570# 601#
571# Device Drivers 602# Device Drivers
@@ -645,14 +676,17 @@ CONFIG_R8169=y
645# CONFIG_TIGON3 is not set 676# CONFIG_TIGON3 is not set
646# CONFIG_BNX2 is not set 677# CONFIG_BNX2 is not set
647# CONFIG_QLA3XXX is not set 678# CONFIG_QLA3XXX is not set
679# CONFIG_ATL1 is not set
648 680
649# 681#
650# Ethernet (10000 Mbit) 682# Ethernet (10000 Mbit)
651# 683#
652# CONFIG_CHELSIO_T1 is not set 684# CONFIG_CHELSIO_T1 is not set
685CONFIG_CHELSIO_T3=m
653# CONFIG_IXGB is not set 686# CONFIG_IXGB is not set
654# CONFIG_S2IO is not set 687# CONFIG_S2IO is not set
655# CONFIG_MYRI10GE is not set 688# CONFIG_MYRI10GE is not set
689CONFIG_NETXEN_NIC=m
656 690
657# 691#
658# Token Ring devices 692# Token Ring devices
@@ -760,10 +794,6 @@ CONFIG_LEGACY_PTY_COUNT=256
760# CONFIG_R3964 is not set 794# CONFIG_R3964 is not set
761# CONFIG_APPLICOM is not set 795# CONFIG_APPLICOM is not set
762# CONFIG_TANBAC_TB0219 is not set 796# CONFIG_TANBAC_TB0219 is not set
763
764#
765# Ftape, the floppy tape device driver
766#
767# CONFIG_DRM is not set 797# CONFIG_DRM is not set
768CONFIG_GPIO_VR41XX=y 798CONFIG_GPIO_VR41XX=y
769# CONFIG_RAW_DRIVER is not set 799# CONFIG_RAW_DRIVER is not set
@@ -787,6 +817,7 @@ CONFIG_GPIO_VR41XX=y
787# 817#
788# Dallas's 1-wire bus 818# Dallas's 1-wire bus
789# 819#
820# CONFIG_W1 is not set
790 821
791# 822#
792# Hardware Monitoring support 823# Hardware Monitoring support
@@ -795,11 +826,6 @@ CONFIG_GPIO_VR41XX=y
795# CONFIG_HWMON_VID is not set 826# CONFIG_HWMON_VID is not set
796 827
797# 828#
798# Misc devices
799#
800# CONFIG_TIFM_CORE is not set
801
802#
803# Multimedia devices 829# Multimedia devices
804# 830#
805# CONFIG_VIDEO_DEV is not set 831# CONFIG_VIDEO_DEV is not set
@@ -818,6 +844,7 @@ CONFIG_FB=y
818CONFIG_FB_CFB_FILLRECT=y 844CONFIG_FB_CFB_FILLRECT=y
819CONFIG_FB_CFB_COPYAREA=y 845CONFIG_FB_CFB_COPYAREA=y
820CONFIG_FB_CFB_IMAGEBLIT=y 846CONFIG_FB_CFB_IMAGEBLIT=y
847# CONFIG_FB_SVGALIB is not set
821# CONFIG_FB_MACMODES is not set 848# CONFIG_FB_MACMODES is not set
822# CONFIG_FB_BACKLIGHT is not set 849# CONFIG_FB_BACKLIGHT is not set
823# CONFIG_FB_MODE_HELPERS is not set 850# CONFIG_FB_MODE_HELPERS is not set
@@ -834,6 +861,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
834# CONFIG_FB_RADEON is not set 861# CONFIG_FB_RADEON is not set
835# CONFIG_FB_ATY128 is not set 862# CONFIG_FB_ATY128 is not set
836# CONFIG_FB_ATY is not set 863# CONFIG_FB_ATY is not set
864# CONFIG_FB_S3 is not set
837# CONFIG_FB_SAVAGE is not set 865# CONFIG_FB_SAVAGE is not set
838# CONFIG_FB_SIS is not set 866# CONFIG_FB_SIS is not set
839# CONFIG_FB_NEOMAGIC is not set 867# CONFIG_FB_NEOMAGIC is not set
@@ -863,6 +891,12 @@ CONFIG_DUMMY_CONSOLE=y
863# CONFIG_SOUND is not set 891# CONFIG_SOUND is not set
864 892
865# 893#
894# HID Devices
895#
896CONFIG_HID=y
897# CONFIG_HID_DEBUG is not set
898
899#
866# USB support 900# USB support
867# 901#
868CONFIG_USB_ARCH_HAS_HCD=y 902CONFIG_USB_ARCH_HAS_HCD=y
@@ -875,8 +909,8 @@ CONFIG_USB=m
875# Miscellaneous USB options 909# Miscellaneous USB options
876# 910#
877# CONFIG_USB_DEVICEFS is not set 911# CONFIG_USB_DEVICEFS is not set
878# CONFIG_USB_BANDWIDTH is not set
879# CONFIG_USB_DYNAMIC_MINORS is not set 912# CONFIG_USB_DYNAMIC_MINORS is not set
913# CONFIG_USB_SUSPEND is not set
880# CONFIG_USB_OTG is not set 914# CONFIG_USB_OTG is not set
881 915
882# 916#
@@ -886,9 +920,11 @@ CONFIG_USB_EHCI_HCD=m
886# CONFIG_USB_EHCI_SPLIT_ISO is not set 920# CONFIG_USB_EHCI_SPLIT_ISO is not set
887# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 921# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
888# CONFIG_USB_EHCI_TT_NEWSCHED is not set 922# CONFIG_USB_EHCI_TT_NEWSCHED is not set
923# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
889# CONFIG_USB_ISP116X_HCD is not set 924# CONFIG_USB_ISP116X_HCD is not set
890CONFIG_USB_OHCI_HCD=m 925CONFIG_USB_OHCI_HCD=m
891# CONFIG_USB_OHCI_BIG_ENDIAN is not set 926# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
927# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
892CONFIG_USB_OHCI_LITTLE_ENDIAN=y 928CONFIG_USB_OHCI_LITTLE_ENDIAN=y
893# CONFIG_USB_UHCI_HCD is not set 929# CONFIG_USB_UHCI_HCD is not set
894# CONFIG_USB_SL811_HCD is not set 930# CONFIG_USB_SL811_HCD is not set
@@ -923,7 +959,6 @@ CONFIG_USB_STORAGE=m
923# USB Input Devices 959# USB Input Devices
924# 960#
925CONFIG_USB_HID=m 961CONFIG_USB_HID=m
926CONFIG_USB_HIDINPUT=y
927# CONFIG_USB_HIDINPUT_POWERBOOK is not set 962# CONFIG_USB_HIDINPUT_POWERBOOK is not set
928# CONFIG_HID_FF is not set 963# CONFIG_HID_FF is not set
929# CONFIG_USB_HIDDEV is not set 964# CONFIG_USB_HIDDEV is not set
@@ -945,7 +980,7 @@ CONFIG_USB_HIDINPUT=y
945# CONFIG_USB_ATI_REMOTE2 is not set 980# CONFIG_USB_ATI_REMOTE2 is not set
946# CONFIG_USB_KEYSPAN_REMOTE is not set 981# CONFIG_USB_KEYSPAN_REMOTE is not set
947# CONFIG_USB_APPLETOUCH is not set 982# CONFIG_USB_APPLETOUCH is not set
948# CONFIG_USB_TRANCEVIBRATOR is not set 983# CONFIG_USB_GTCO is not set
949 984
950# 985#
951# USB Imaging devices 986# USB Imaging devices
@@ -960,6 +995,7 @@ CONFIG_USB_HIDINPUT=y
960# CONFIG_USB_KAWETH is not set 995# CONFIG_USB_KAWETH is not set
961# CONFIG_USB_PEGASUS is not set 996# CONFIG_USB_PEGASUS is not set
962# CONFIG_USB_RTL8150 is not set 997# CONFIG_USB_RTL8150 is not set
998# CONFIG_USB_USBNET_MII is not set
963# CONFIG_USB_USBNET is not set 999# CONFIG_USB_USBNET is not set
964CONFIG_USB_MON=y 1000CONFIG_USB_MON=y
965 1001
@@ -982,6 +1018,7 @@ CONFIG_USB_MON=y
982# CONFIG_USB_RIO500 is not set 1018# CONFIG_USB_RIO500 is not set
983# CONFIG_USB_LEGOTOWER is not set 1019# CONFIG_USB_LEGOTOWER is not set
984# CONFIG_USB_LCD is not set 1020# CONFIG_USB_LCD is not set
1021# CONFIG_USB_BERRY_CHARGE is not set
985# CONFIG_USB_LED is not set 1022# CONFIG_USB_LED is not set
986# CONFIG_USB_CYPRESS_CY7C63 is not set 1023# CONFIG_USB_CYPRESS_CY7C63 is not set
987# CONFIG_USB_CYTHERM is not set 1024# CONFIG_USB_CYTHERM is not set
@@ -991,6 +1028,7 @@ CONFIG_USB_MON=y
991# CONFIG_USB_APPLEDISPLAY is not set 1028# CONFIG_USB_APPLEDISPLAY is not set
992# CONFIG_USB_SISUSBVGA is not set 1029# CONFIG_USB_SISUSBVGA is not set
993# CONFIG_USB_LD is not set 1030# CONFIG_USB_LD is not set
1031# CONFIG_USB_TRANCEVIBRATOR is not set
994 1032
995# 1033#
996# USB DSL modem support 1034# USB DSL modem support
@@ -1047,6 +1085,14 @@ CONFIG_USB_MON=y
1047# 1085#
1048 1086
1049# 1087#
1088# Auxiliary Display support
1089#
1090
1091#
1092# Virtualization
1093#
1094
1095#
1050# File systems 1096# File systems
1051# 1097#
1052CONFIG_EXT2_FS=y 1098CONFIG_EXT2_FS=y
@@ -1105,7 +1151,7 @@ CONFIG_TMPFS=y
1105# CONFIG_TMPFS_POSIX_ACL is not set 1151# CONFIG_TMPFS_POSIX_ACL is not set
1106# CONFIG_HUGETLB_PAGE is not set 1152# CONFIG_HUGETLB_PAGE is not set
1107CONFIG_RAMFS=y 1153CONFIG_RAMFS=y
1108# CONFIG_CONFIGFS_FS is not set 1154CONFIG_CONFIGFS_FS=m
1109 1155
1110# 1156#
1111# Miscellaneous filesystems 1157# Miscellaneous filesystems
@@ -1159,6 +1205,14 @@ CONFIG_MSDOS_PARTITION=y
1159# CONFIG_NLS is not set 1205# CONFIG_NLS is not set
1160 1206
1161# 1207#
1208# Distributed Lock Manager
1209#
1210CONFIG_DLM=m
1211CONFIG_DLM_TCP=y
1212# CONFIG_DLM_SCTP is not set
1213# CONFIG_DLM_DEBUG is not set
1214
1215#
1162# Profiling support 1216# Profiling support
1163# 1217#
1164# CONFIG_PROFILING is not set 1218# CONFIG_PROFILING is not set
@@ -1171,10 +1225,10 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1171CONFIG_ENABLE_MUST_CHECK=y 1225CONFIG_ENABLE_MUST_CHECK=y
1172# CONFIG_MAGIC_SYSRQ is not set 1226# CONFIG_MAGIC_SYSRQ is not set
1173# CONFIG_UNUSED_SYMBOLS is not set 1227# CONFIG_UNUSED_SYMBOLS is not set
1174# CONFIG_DEBUG_KERNEL is not set
1175CONFIG_LOG_BUF_SHIFT=14
1176# CONFIG_DEBUG_FS is not set 1228# CONFIG_DEBUG_FS is not set
1177# CONFIG_HEADERS_CHECK is not set 1229# CONFIG_HEADERS_CHECK is not set
1230# CONFIG_DEBUG_KERNEL is not set
1231CONFIG_LOG_BUF_SHIFT=14
1178CONFIG_CROSSCOMPILE=y 1232CONFIG_CROSSCOMPILE=y
1179CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 1233CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1180 1234
@@ -1187,14 +1241,59 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1187# 1241#
1188# Cryptographic options 1242# Cryptographic options
1189# 1243#
1190# CONFIG_CRYPTO is not set 1244CONFIG_CRYPTO=y
1245CONFIG_CRYPTO_ALGAPI=y
1246CONFIG_CRYPTO_BLKCIPHER=m
1247CONFIG_CRYPTO_HASH=m
1248CONFIG_CRYPTO_MANAGER=m
1249CONFIG_CRYPTO_HMAC=m
1250CONFIG_CRYPTO_XCBC=m
1251CONFIG_CRYPTO_NULL=m
1252CONFIG_CRYPTO_MD4=m
1253CONFIG_CRYPTO_MD5=y
1254CONFIG_CRYPTO_SHA1=m
1255CONFIG_CRYPTO_SHA256=m
1256CONFIG_CRYPTO_SHA512=m
1257CONFIG_CRYPTO_WP512=m
1258CONFIG_CRYPTO_TGR192=m
1259CONFIG_CRYPTO_GF128MUL=m
1260CONFIG_CRYPTO_ECB=m
1261CONFIG_CRYPTO_CBC=m
1262CONFIG_CRYPTO_PCBC=m
1263CONFIG_CRYPTO_LRW=m
1264CONFIG_CRYPTO_DES=m
1265CONFIG_CRYPTO_FCRYPT=m
1266CONFIG_CRYPTO_BLOWFISH=m
1267CONFIG_CRYPTO_TWOFISH=m
1268CONFIG_CRYPTO_TWOFISH_COMMON=m
1269CONFIG_CRYPTO_SERPENT=m
1270CONFIG_CRYPTO_AES=m
1271CONFIG_CRYPTO_CAST5=m
1272CONFIG_CRYPTO_CAST6=m
1273CONFIG_CRYPTO_TEA=m
1274CONFIG_CRYPTO_ARC4=m
1275CONFIG_CRYPTO_KHAZAD=m
1276CONFIG_CRYPTO_ANUBIS=m
1277CONFIG_CRYPTO_DEFLATE=m
1278CONFIG_CRYPTO_MICHAEL_MIC=m
1279CONFIG_CRYPTO_CRC32C=m
1280CONFIG_CRYPTO_CAMELLIA=m
1281# CONFIG_CRYPTO_TEST is not set
1282
1283#
1284# Hardware crypto devices
1285#
1191 1286
1192# 1287#
1193# Library routines 1288# Library routines
1194# 1289#
1290CONFIG_BITREVERSE=y
1195# CONFIG_CRC_CCITT is not set 1291# CONFIG_CRC_CCITT is not set
1196# CONFIG_CRC16 is not set 1292# CONFIG_CRC16 is not set
1197CONFIG_CRC32=y 1293CONFIG_CRC32=y
1198# CONFIG_LIBCRC32C is not set 1294CONFIG_LIBCRC32C=m
1199CONFIG_ZLIB_INFLATE=m 1295CONFIG_ZLIB_INFLATE=m
1296CONFIG_ZLIB_DEFLATE=m
1200CONFIG_PLIST=y 1297CONFIG_PLIST=y
1298CONFIG_HAS_IOMEM=y
1299CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index 553734a47b62..2abbd6827720 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc2 3# Linux kernel version: 2.6.20
4# Tue Jul 25 23:13:04 2006 4# Tue Feb 20 21:47:42 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46CONFIG_MACH_VR41XX=y 46CONFIG_MACH_VR41XX=y
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -70,10 +70,14 @@ CONFIG_IBM_WORKPAD=y
70# CONFIG_VICTOR_MPC30X is not set 70# CONFIG_VICTOR_MPC30X is not set
71# CONFIG_ZAO_CAPCELLA is not set 71# CONFIG_ZAO_CAPCELLA is not set
72CONFIG_RWSEM_GENERIC_SPINLOCK=y 72CONFIG_RWSEM_GENERIC_SPINLOCK=y
73# CONFIG_ARCH_HAS_ILOG2_U32 is not set
74# CONFIG_ARCH_HAS_ILOG2_U64 is not set
73CONFIG_GENERIC_FIND_NEXT_BIT=y 75CONFIG_GENERIC_FIND_NEXT_BIT=y
74CONFIG_GENERIC_HWEIGHT=y 76CONFIG_GENERIC_HWEIGHT=y
75CONFIG_GENERIC_CALIBRATE_DELAY=y 77CONFIG_GENERIC_CALIBRATE_DELAY=y
78CONFIG_GENERIC_TIME=y
76CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
80CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
77CONFIG_DMA_NONCOHERENT=y 81CONFIG_DMA_NONCOHERENT=y
78CONFIG_DMA_NEED_PCI_MAP_STATE=y 82CONFIG_DMA_NEED_PCI_MAP_STATE=y
79# CONFIG_CPU_BIG_ENDIAN is not set 83# CONFIG_CPU_BIG_ENDIAN is not set
@@ -106,6 +110,7 @@ CONFIG_CPU_VR41XX=y
106# CONFIG_CPU_SB1 is not set 110# CONFIG_CPU_SB1 is not set
107CONFIG_SYS_HAS_CPU_VR41XX=y 111CONFIG_SYS_HAS_CPU_VR41XX=y
108CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
113CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
109CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 114CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
110CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y 115CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
111 116
@@ -119,8 +124,8 @@ CONFIG_PAGE_SIZE_4KB=y
119# CONFIG_PAGE_SIZE_16KB is not set 124# CONFIG_PAGE_SIZE_16KB is not set
120# CONFIG_PAGE_SIZE_64KB is not set 125# CONFIG_PAGE_SIZE_64KB is not set
121CONFIG_MIPS_MT_DISABLED=y 126CONFIG_MIPS_MT_DISABLED=y
122# CONFIG_MIPS_MT_SMTC is not set
123# CONFIG_MIPS_MT_SMP is not set 127# CONFIG_MIPS_MT_SMP is not set
128# CONFIG_MIPS_MT_SMTC is not set
124# CONFIG_MIPS_VPE_LOADER is not set 129# CONFIG_MIPS_VPE_LOADER is not set
125CONFIG_CPU_HAS_SYNC=y 130CONFIG_CPU_HAS_SYNC=y
126CONFIG_GENERIC_HARDIRQS=y 131CONFIG_GENERIC_HARDIRQS=y
@@ -135,6 +140,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 140# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
137# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=1
138# CONFIG_HZ_48 is not set 144# CONFIG_HZ_48 is not set
139# CONFIG_HZ_100 is not set 145# CONFIG_HZ_100 is not set
140# CONFIG_HZ_128 is not set 146# CONFIG_HZ_128 is not set
@@ -147,6 +153,7 @@ CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y 153CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set 154# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set 155# CONFIG_PREEMPT is not set
156# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y 157CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y 158CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 159CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -165,16 +172,20 @@ CONFIG_LOCALVERSION=""
165CONFIG_LOCALVERSION_AUTO=y 172CONFIG_LOCALVERSION_AUTO=y
166CONFIG_SWAP=y 173CONFIG_SWAP=y
167CONFIG_SYSVIPC=y 174CONFIG_SYSVIPC=y
175# CONFIG_IPC_NS is not set
176CONFIG_SYSVIPC_SYSCTL=y
168# CONFIG_POSIX_MQUEUE is not set 177# CONFIG_POSIX_MQUEUE is not set
169# CONFIG_BSD_PROCESS_ACCT is not set 178# CONFIG_BSD_PROCESS_ACCT is not set
170# CONFIG_TASKSTATS is not set 179# CONFIG_TASKSTATS is not set
171CONFIG_SYSCTL=y 180# CONFIG_UTS_NS is not set
172# CONFIG_AUDIT is not set 181# CONFIG_AUDIT is not set
173# CONFIG_IKCONFIG is not set 182# CONFIG_IKCONFIG is not set
183CONFIG_SYSFS_DEPRECATED=y
174# CONFIG_RELAY is not set 184# CONFIG_RELAY is not set
175CONFIG_INITRAMFS_SOURCE=""
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SYSCTL=y
177CONFIG_EMBEDDED=y 187CONFIG_EMBEDDED=y
188CONFIG_SYSCTL_SYSCALL=y
178CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
@@ -182,12 +193,12 @@ CONFIG_PRINTK=y
182CONFIG_BUG=y 193CONFIG_BUG=y
183CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
184CONFIG_BASE_FULL=y 195CONFIG_BASE_FULL=y
185CONFIG_RT_MUTEXES=y
186CONFIG_FUTEX=y 196CONFIG_FUTEX=y
187CONFIG_EPOLL=y 197CONFIG_EPOLL=y
188CONFIG_SHMEM=y 198CONFIG_SHMEM=y
189CONFIG_SLAB=y 199CONFIG_SLAB=y
190CONFIG_VM_EVENT_COUNTERS=y 200CONFIG_VM_EVENT_COUNTERS=y
201CONFIG_RT_MUTEXES=y
191# CONFIG_TINY_SHMEM is not set 202# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0 203CONFIG_BASE_SMALL=0
193# CONFIG_SLOB is not set 204# CONFIG_SLOB is not set
@@ -205,6 +216,7 @@ CONFIG_KMOD=y
205# 216#
206# Block layer 217# Block layer
207# 218#
219CONFIG_BLOCK=y
208# CONFIG_LBD is not set 220# CONFIG_LBD is not set
209# CONFIG_BLK_DEV_IO_TRACE is not set 221# CONFIG_BLK_DEV_IO_TRACE is not set
210# CONFIG_LSF is not set 222# CONFIG_LSF is not set
@@ -257,6 +269,14 @@ CONFIG_BINFMT_ELF=y
257CONFIG_TRAD_SIGNALS=y 269CONFIG_TRAD_SIGNALS=y
258 270
259# 271#
272# Power management options
273#
274CONFIG_PM=y
275# CONFIG_PM_LEGACY is not set
276# CONFIG_PM_DEBUG is not set
277# CONFIG_PM_SYSFS_DEPRECATED is not set
278
279#
260# Networking 280# Networking
261# 281#
262CONFIG_NET=y 282CONFIG_NET=y
@@ -270,7 +290,10 @@ CONFIG_PACKET_MMAP=y
270CONFIG_UNIX=y 290CONFIG_UNIX=y
271CONFIG_XFRM=y 291CONFIG_XFRM=y
272CONFIG_XFRM_USER=m 292CONFIG_XFRM_USER=m
293# CONFIG_XFRM_SUB_POLICY is not set
294CONFIG_XFRM_MIGRATE=y
273CONFIG_NET_KEY=y 295CONFIG_NET_KEY=y
296CONFIG_NET_KEY_MIGRATE=y
274CONFIG_INET=y 297CONFIG_INET=y
275CONFIG_IP_MULTICAST=y 298CONFIG_IP_MULTICAST=y
276# CONFIG_IP_ADVANCED_ROUTER is not set 299# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -288,10 +311,13 @@ CONFIG_IP_FIB_HASH=y
288# CONFIG_INET_TUNNEL is not set 311# CONFIG_INET_TUNNEL is not set
289CONFIG_INET_XFRM_MODE_TRANSPORT=m 312CONFIG_INET_XFRM_MODE_TRANSPORT=m
290CONFIG_INET_XFRM_MODE_TUNNEL=m 313CONFIG_INET_XFRM_MODE_TUNNEL=m
314CONFIG_INET_XFRM_MODE_BEET=m
291CONFIG_INET_DIAG=y 315CONFIG_INET_DIAG=y
292CONFIG_INET_TCP_DIAG=y 316CONFIG_INET_TCP_DIAG=y
293# CONFIG_TCP_CONG_ADVANCED is not set 317# CONFIG_TCP_CONG_ADVANCED is not set
294CONFIG_TCP_CONG_BIC=y 318CONFIG_TCP_CONG_CUBIC=y
319CONFIG_DEFAULT_TCP_CONG="cubic"
320CONFIG_TCP_MD5SIG=y
295# CONFIG_IPV6 is not set 321# CONFIG_IPV6 is not set
296# CONFIG_INET6_XFRM_TUNNEL is not set 322# CONFIG_INET6_XFRM_TUNNEL is not set
297# CONFIG_INET6_TUNNEL is not set 323# CONFIG_INET6_TUNNEL is not set
@@ -321,7 +347,6 @@ CONFIG_NETWORK_SECMARK=y
321# CONFIG_ATALK is not set 347# CONFIG_ATALK is not set
322# CONFIG_X25 is not set 348# CONFIG_X25 is not set
323# CONFIG_LAPB is not set 349# CONFIG_LAPB is not set
324# CONFIG_NET_DIVERT is not set
325# CONFIG_ECONET is not set 350# CONFIG_ECONET is not set
326# CONFIG_WAN_ROUTER is not set 351# CONFIG_WAN_ROUTER is not set
327 352
@@ -371,6 +396,7 @@ CONFIG_CONNECTOR=m
371# Plug and Play support 396# Plug and Play support
372# 397#
373# CONFIG_PNP is not set 398# CONFIG_PNP is not set
399# CONFIG_PNPACPI is not set
374 400
375# 401#
376# Block devices 402# Block devices
@@ -387,9 +413,14 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
387# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
388 414
389# 415#
416# Misc devices
417#
418
419#
390# ATA/ATAPI/MFM/RLL support 420# ATA/ATAPI/MFM/RLL support
391# 421#
392CONFIG_IDE=y 422CONFIG_IDE=y
423CONFIG_IDE_MAX_HWIFS=4
393CONFIG_BLK_DEV_IDE=y 424CONFIG_BLK_DEV_IDE=y
394 425
395# 426#
@@ -419,6 +450,12 @@ CONFIG_IDE_GENERIC=y
419# 450#
420# CONFIG_RAID_ATTRS is not set 451# CONFIG_RAID_ATTRS is not set
421# CONFIG_SCSI is not set 452# CONFIG_SCSI is not set
453# CONFIG_SCSI_NETLINK is not set
454
455#
456# Serial ATA (prod) and Parallel ATA (experimental) drivers
457#
458# CONFIG_ATA is not set
422 459
423# 460#
424# Old CD-ROM drivers (not SCSI, not IDE) 461# Old CD-ROM drivers (not SCSI, not IDE)
@@ -472,6 +509,8 @@ CONFIG_LXT_PHY=m
472CONFIG_CICADA_PHY=m 509CONFIG_CICADA_PHY=m
473CONFIG_VITESSE_PHY=m 510CONFIG_VITESSE_PHY=m
474CONFIG_SMSC_PHY=m 511CONFIG_SMSC_PHY=m
512# CONFIG_BROADCOM_PHY is not set
513# CONFIG_FIXED_PHY is not set
475 514
476# 515#
477# Ethernet (10 or 100Mbit) 516# Ethernet (10 or 100Mbit)
@@ -575,6 +614,7 @@ CONFIG_PCMCIA_AXNET=m
575# Input device support 614# Input device support
576# 615#
577CONFIG_INPUT=y 616CONFIG_INPUT=y
617# CONFIG_INPUT_FF_MEMLESS is not set
578 618
579# 619#
580# Userland interfaces 620# Userland interfaces
@@ -641,10 +681,6 @@ CONFIG_LEGACY_PTY_COUNT=256
641# CONFIG_R3964 is not set 681# CONFIG_R3964 is not set
642 682
643# 683#
644# Ftape, the floppy tape device driver
645#
646
647#
648# PCMCIA character devices 684# PCMCIA character devices
649# 685#
650# CONFIG_SYNCLINK_CS is not set 686# CONFIG_SYNCLINK_CS is not set
@@ -657,7 +693,6 @@ CONFIG_LEGACY_PTY_COUNT=256
657# TPM devices 693# TPM devices
658# 694#
659# CONFIG_TCG_TPM is not set 695# CONFIG_TCG_TPM is not set
660# CONFIG_TELCLOCK is not set
661 696
662# 697#
663# I2C support 698# I2C support
@@ -682,14 +717,9 @@ CONFIG_LEGACY_PTY_COUNT=256
682# CONFIG_HWMON_VID is not set 717# CONFIG_HWMON_VID is not set
683 718
684# 719#
685# Misc devices
686#
687
688#
689# Multimedia devices 720# Multimedia devices
690# 721#
691# CONFIG_VIDEO_DEV is not set 722# CONFIG_VIDEO_DEV is not set
692CONFIG_VIDEO_V4L2=y
693 723
694# 724#
695# Digital Video Broadcasting Devices 725# Digital Video Broadcasting Devices
@@ -708,6 +738,7 @@ CONFIG_VIDEO_V4L2=y
708# CONFIG_VGA_CONSOLE is not set 738# CONFIG_VGA_CONSOLE is not set
709# CONFIG_MDA_CONSOLE is not set 739# CONFIG_MDA_CONSOLE is not set
710CONFIG_DUMMY_CONSOLE=y 740CONFIG_DUMMY_CONSOLE=y
741# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
711 742
712# 743#
713# Sound 744# Sound
@@ -715,6 +746,12 @@ CONFIG_DUMMY_CONSOLE=y
715# CONFIG_SOUND is not set 746# CONFIG_SOUND is not set
716 747
717# 748#
749# HID Devices
750#
751CONFIG_HID=y
752# CONFIG_HID_DEBUG is not set
753
754#
718# USB support 755# USB support
719# 756#
720# CONFIG_USB_ARCH_HAS_HCD is not set 757# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -775,6 +812,14 @@ CONFIG_DUMMY_CONSOLE=y
775# 812#
776 813
777# 814#
815# Auxiliary Display support
816#
817
818#
819# Virtualization
820#
821
822#
778# File systems 823# File systems
779# 824#
780CONFIG_EXT2_FS=y 825CONFIG_EXT2_FS=y
@@ -783,11 +828,13 @@ CONFIG_EXT2_FS_POSIX_ACL=y
783CONFIG_EXT2_FS_SECURITY=y 828CONFIG_EXT2_FS_SECURITY=y
784# CONFIG_EXT2_FS_XIP is not set 829# CONFIG_EXT2_FS_XIP is not set
785# CONFIG_EXT3_FS is not set 830# CONFIG_EXT3_FS is not set
831# CONFIG_EXT4DEV_FS is not set
786CONFIG_FS_MBCACHE=y 832CONFIG_FS_MBCACHE=y
787# CONFIG_REISERFS_FS is not set 833# CONFIG_REISERFS_FS is not set
788# CONFIG_JFS_FS is not set 834# CONFIG_JFS_FS is not set
789CONFIG_FS_POSIX_ACL=y 835CONFIG_FS_POSIX_ACL=y
790# CONFIG_XFS_FS is not set 836# CONFIG_XFS_FS is not set
837# CONFIG_GFS2_FS is not set
791# CONFIG_OCFS2_FS is not set 838# CONFIG_OCFS2_FS is not set
792# CONFIG_MINIX_FS is not set 839# CONFIG_MINIX_FS is not set
793# CONFIG_ROMFS_FS is not set 840# CONFIG_ROMFS_FS is not set
@@ -798,6 +845,7 @@ CONFIG_DNOTIFY=y
798# CONFIG_AUTOFS_FS is not set 845# CONFIG_AUTOFS_FS is not set
799CONFIG_AUTOFS4_FS=y 846CONFIG_AUTOFS4_FS=y
800CONFIG_FUSE_FS=m 847CONFIG_FUSE_FS=m
848CONFIG_GENERIC_ACL=y
801 849
802# 850#
803# CD-ROM/DVD Filesystems 851# CD-ROM/DVD Filesystems
@@ -817,11 +865,13 @@ CONFIG_FUSE_FS=m
817# 865#
818CONFIG_PROC_FS=y 866CONFIG_PROC_FS=y
819CONFIG_PROC_KCORE=y 867CONFIG_PROC_KCORE=y
868CONFIG_PROC_SYSCTL=y
820CONFIG_SYSFS=y 869CONFIG_SYSFS=y
821CONFIG_TMPFS=y 870CONFIG_TMPFS=y
871CONFIG_TMPFS_POSIX_ACL=y
822# CONFIG_HUGETLB_PAGE is not set 872# CONFIG_HUGETLB_PAGE is not set
823CONFIG_RAMFS=y 873CONFIG_RAMFS=y
824# CONFIG_CONFIGFS_FS is not set 874CONFIG_CONFIGFS_FS=m
825 875
826# 876#
827# Miscellaneous filesystems 877# Miscellaneous filesystems
@@ -875,6 +925,14 @@ CONFIG_MSDOS_PARTITION=y
875# CONFIG_NLS is not set 925# CONFIG_NLS is not set
876 926
877# 927#
928# Distributed Lock Manager
929#
930CONFIG_DLM=m
931CONFIG_DLM_TCP=y
932# CONFIG_DLM_SCTP is not set
933# CONFIG_DLM_DEBUG is not set
934
935#
878# Profiling support 936# Profiling support
879# 937#
880# CONFIG_PROFILING is not set 938# CONFIG_PROFILING is not set
@@ -884,11 +942,13 @@ CONFIG_MSDOS_PARTITION=y
884# 942#
885CONFIG_TRACE_IRQFLAGS_SUPPORT=y 943CONFIG_TRACE_IRQFLAGS_SUPPORT=y
886# CONFIG_PRINTK_TIME is not set 944# CONFIG_PRINTK_TIME is not set
945CONFIG_ENABLE_MUST_CHECK=y
887# CONFIG_MAGIC_SYSRQ is not set 946# CONFIG_MAGIC_SYSRQ is not set
888# CONFIG_UNUSED_SYMBOLS is not set 947# CONFIG_UNUSED_SYMBOLS is not set
948# CONFIG_DEBUG_FS is not set
949# CONFIG_HEADERS_CHECK is not set
889# CONFIG_DEBUG_KERNEL is not set 950# CONFIG_DEBUG_KERNEL is not set
890CONFIG_LOG_BUF_SHIFT=14 951CONFIG_LOG_BUF_SHIFT=14
891# CONFIG_DEBUG_FS is not set
892CONFIG_CROSSCOMPILE=y 952CONFIG_CROSSCOMPILE=y
893CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M" 953CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
894 954
@@ -901,7 +961,44 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
901# 961#
902# Cryptographic options 962# Cryptographic options
903# 963#
904# CONFIG_CRYPTO is not set 964CONFIG_CRYPTO=y
965CONFIG_CRYPTO_ALGAPI=y
966CONFIG_CRYPTO_BLKCIPHER=m
967CONFIG_CRYPTO_HASH=m
968CONFIG_CRYPTO_MANAGER=m
969CONFIG_CRYPTO_HMAC=m
970CONFIG_CRYPTO_XCBC=m
971CONFIG_CRYPTO_NULL=m
972CONFIG_CRYPTO_MD4=m
973CONFIG_CRYPTO_MD5=y
974CONFIG_CRYPTO_SHA1=m
975CONFIG_CRYPTO_SHA256=m
976CONFIG_CRYPTO_SHA512=m
977CONFIG_CRYPTO_WP512=m
978CONFIG_CRYPTO_TGR192=m
979CONFIG_CRYPTO_GF128MUL=m
980CONFIG_CRYPTO_ECB=m
981CONFIG_CRYPTO_CBC=m
982CONFIG_CRYPTO_PCBC=m
983CONFIG_CRYPTO_LRW=m
984CONFIG_CRYPTO_DES=m
985CONFIG_CRYPTO_FCRYPT=m
986CONFIG_CRYPTO_BLOWFISH=m
987CONFIG_CRYPTO_TWOFISH=m
988CONFIG_CRYPTO_TWOFISH_COMMON=m
989CONFIG_CRYPTO_SERPENT=m
990CONFIG_CRYPTO_AES=m
991CONFIG_CRYPTO_CAST5=m
992CONFIG_CRYPTO_CAST6=m
993CONFIG_CRYPTO_TEA=m
994CONFIG_CRYPTO_ARC4=m
995CONFIG_CRYPTO_KHAZAD=m
996CONFIG_CRYPTO_ANUBIS=m
997CONFIG_CRYPTO_DEFLATE=m
998CONFIG_CRYPTO_MICHAEL_MIC=m
999CONFIG_CRYPTO_CRC32C=m
1000CONFIG_CRYPTO_CAMELLIA=m
1001# CONFIG_CRYPTO_TEST is not set
905 1002
906# 1003#
907# Hardware crypto devices 1004# Hardware crypto devices
@@ -910,8 +1007,13 @@ CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
910# 1007#
911# Library routines 1008# Library routines
912# 1009#
1010CONFIG_BITREVERSE=y
913# CONFIG_CRC_CCITT is not set 1011# CONFIG_CRC_CCITT is not set
914# CONFIG_CRC16 is not set 1012# CONFIG_CRC16 is not set
915CONFIG_CRC32=y 1013CONFIG_CRC32=y
916# CONFIG_LIBCRC32C is not set 1014CONFIG_LIBCRC32C=m
1015CONFIG_ZLIB_INFLATE=m
1016CONFIG_ZLIB_DEFLATE=m
917CONFIG_PLIST=y 1017CONFIG_PLIST=y
1018CONFIG_HAS_IOMEM=y
1019CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index d3dfb702bb7c..44b6b7c1fdb6 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:21 2006 4# Tue Feb 20 21:47:42 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_WR_PPMC=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,10 +64,14 @@ CONFIG_WR_PPMC=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_DMA_NONCOHERENT=y 75CONFIG_DMA_NONCOHERENT=y
72CONFIG_DMA_NEED_PCI_MAP_STATE=y 76CONFIG_DMA_NEED_PCI_MAP_STATE=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
@@ -124,8 +128,8 @@ CONFIG_PAGE_SIZE_4KB=y
124# CONFIG_PAGE_SIZE_64KB is not set 128# CONFIG_PAGE_SIZE_64KB is not set
125CONFIG_CPU_HAS_PREFETCH=y 129CONFIG_CPU_HAS_PREFETCH=y
126CONFIG_MIPS_MT_DISABLED=y 130CONFIG_MIPS_MT_DISABLED=y
127# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_MT_SMP is not set 131# CONFIG_MIPS_MT_SMP is not set
132# CONFIG_MIPS_MT_SMTC is not set
129# CONFIG_MIPS_VPE_LOADER is not set 133# CONFIG_MIPS_VPE_LOADER is not set
130# CONFIG_64BIT_PHYS_ADDR is not set 134# CONFIG_64BIT_PHYS_ADDR is not set
131CONFIG_CPU_HAS_LLSC=y 135CONFIG_CPU_HAS_LLSC=y
@@ -143,6 +147,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
143# CONFIG_SPARSEMEM_STATIC is not set 147# CONFIG_SPARSEMEM_STATIC is not set
144CONFIG_SPLIT_PTLOCK_CPUS=4 148CONFIG_SPLIT_PTLOCK_CPUS=4
145# CONFIG_RESOURCES_64BIT is not set 149# CONFIG_RESOURCES_64BIT is not set
150CONFIG_ZONE_DMA_FLAG=1
146# CONFIG_HZ_48 is not set 151# CONFIG_HZ_48 is not set
147# CONFIG_HZ_100 is not set 152# CONFIG_HZ_100 is not set
148# CONFIG_HZ_128 is not set 153# CONFIG_HZ_128 is not set
@@ -155,6 +160,7 @@ CONFIG_HZ=1000
155CONFIG_PREEMPT_NONE=y 160CONFIG_PREEMPT_NONE=y
156# CONFIG_PREEMPT_VOLUNTARY is not set 161# CONFIG_PREEMPT_VOLUNTARY is not set
157# CONFIG_PREEMPT is not set 162# CONFIG_PREEMPT is not set
163# CONFIG_KEXEC is not set
158CONFIG_LOCKDEP_SUPPORT=y 164CONFIG_LOCKDEP_SUPPORT=y
159CONFIG_STACKTRACE_SUPPORT=y 165CONFIG_STACKTRACE_SUPPORT=y
160CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 166CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -173,16 +179,22 @@ CONFIG_LOCALVERSION=""
173CONFIG_LOCALVERSION_AUTO=y 179CONFIG_LOCALVERSION_AUTO=y
174# CONFIG_SWAP is not set 180# CONFIG_SWAP is not set
175CONFIG_SYSVIPC=y 181CONFIG_SYSVIPC=y
182# CONFIG_IPC_NS is not set
183CONFIG_SYSVIPC_SYSCTL=y
176# CONFIG_POSIX_MQUEUE is not set 184# CONFIG_POSIX_MQUEUE is not set
177CONFIG_BSD_PROCESS_ACCT=y 185CONFIG_BSD_PROCESS_ACCT=y
178# CONFIG_BSD_PROCESS_ACCT_V3 is not set 186# CONFIG_BSD_PROCESS_ACCT_V3 is not set
179CONFIG_SYSCTL=y 187# CONFIG_TASKSTATS is not set
188# CONFIG_UTS_NS is not set
180# CONFIG_AUDIT is not set 189# CONFIG_AUDIT is not set
181# CONFIG_IKCONFIG is not set 190# CONFIG_IKCONFIG is not set
191CONFIG_SYSFS_DEPRECATED=y
182# CONFIG_RELAY is not set 192# CONFIG_RELAY is not set
183CONFIG_INITRAMFS_SOURCE="" 193CONFIG_INITRAMFS_SOURCE=""
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 194# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
195CONFIG_SYSCTL=y
185CONFIG_EMBEDDED=y 196CONFIG_EMBEDDED=y
197CONFIG_SYSCTL_SYSCALL=y
186CONFIG_KALLSYMS=y 198CONFIG_KALLSYMS=y
187CONFIG_KALLSYMS_EXTRA_PASS=y 199CONFIG_KALLSYMS_EXTRA_PASS=y
188CONFIG_HOTPLUG=y 200CONFIG_HOTPLUG=y
@@ -190,12 +202,12 @@ CONFIG_PRINTK=y
190CONFIG_BUG=y 202CONFIG_BUG=y
191CONFIG_ELF_CORE=y 203CONFIG_ELF_CORE=y
192CONFIG_BASE_FULL=y 204CONFIG_BASE_FULL=y
193CONFIG_RT_MUTEXES=y
194CONFIG_FUTEX=y 205CONFIG_FUTEX=y
195# CONFIG_EPOLL is not set 206# CONFIG_EPOLL is not set
196CONFIG_SHMEM=y 207CONFIG_SHMEM=y
197CONFIG_SLAB=y 208CONFIG_SLAB=y
198CONFIG_VM_EVENT_COUNTERS=y 209CONFIG_VM_EVENT_COUNTERS=y
210CONFIG_RT_MUTEXES=y
199# CONFIG_TINY_SHMEM is not set 211# CONFIG_TINY_SHMEM is not set
200CONFIG_BASE_SMALL=0 212CONFIG_BASE_SMALL=0
201# CONFIG_SLOB is not set 213# CONFIG_SLOB is not set
@@ -213,6 +225,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
213# 225#
214# Block layer 226# Block layer
215# 227#
228CONFIG_BLOCK=y
216# CONFIG_LBD is not set 229# CONFIG_LBD is not set
217# CONFIG_BLK_DEV_IO_TRACE is not set 230# CONFIG_BLK_DEV_IO_TRACE is not set
218# CONFIG_LSF is not set 231# CONFIG_LSF is not set
@@ -258,6 +271,14 @@ CONFIG_BINFMT_MISC=y
258CONFIG_TRAD_SIGNALS=y 271CONFIG_TRAD_SIGNALS=y
259 272
260# 273#
274# Power management options
275#
276CONFIG_PM=y
277# CONFIG_PM_LEGACY is not set
278# CONFIG_PM_DEBUG is not set
279# CONFIG_PM_SYSFS_DEPRECATED is not set
280
281#
261# Networking 282# Networking
262# 283#
263CONFIG_NET=y 284CONFIG_NET=y
@@ -271,6 +292,8 @@ CONFIG_PACKET_MMAP=y
271CONFIG_UNIX=y 292CONFIG_UNIX=y
272CONFIG_XFRM=y 293CONFIG_XFRM=y
273# CONFIG_XFRM_USER is not set 294# CONFIG_XFRM_USER is not set
295# CONFIG_XFRM_SUB_POLICY is not set
296CONFIG_XFRM_MIGRATE=y
274# CONFIG_NET_KEY is not set 297# CONFIG_NET_KEY is not set
275CONFIG_INET=y 298CONFIG_INET=y
276CONFIG_IP_MULTICAST=y 299CONFIG_IP_MULTICAST=y
@@ -294,10 +317,13 @@ CONFIG_ARPD=y
294# CONFIG_INET_TUNNEL is not set 317# CONFIG_INET_TUNNEL is not set
295CONFIG_INET_XFRM_MODE_TRANSPORT=m 318CONFIG_INET_XFRM_MODE_TRANSPORT=m
296CONFIG_INET_XFRM_MODE_TUNNEL=m 319CONFIG_INET_XFRM_MODE_TUNNEL=m
320CONFIG_INET_XFRM_MODE_BEET=m
297CONFIG_INET_DIAG=y 321CONFIG_INET_DIAG=y
298CONFIG_INET_TCP_DIAG=y 322CONFIG_INET_TCP_DIAG=y
299# CONFIG_TCP_CONG_ADVANCED is not set 323# CONFIG_TCP_CONG_ADVANCED is not set
300CONFIG_TCP_CONG_BIC=y 324CONFIG_TCP_CONG_CUBIC=y
325CONFIG_DEFAULT_TCP_CONG="cubic"
326CONFIG_TCP_MD5SIG=y
301# CONFIG_IPV6 is not set 327# CONFIG_IPV6 is not set
302# CONFIG_INET6_XFRM_TUNNEL is not set 328# CONFIG_INET6_XFRM_TUNNEL is not set
303# CONFIG_INET6_TUNNEL is not set 329# CONFIG_INET6_TUNNEL is not set
@@ -327,7 +353,6 @@ CONFIG_NETWORK_SECMARK=y
327# CONFIG_ATALK is not set 353# CONFIG_ATALK is not set
328# CONFIG_X25 is not set 354# CONFIG_X25 is not set
329# CONFIG_LAPB is not set 355# CONFIG_LAPB is not set
330# CONFIG_NET_DIVERT is not set
331# CONFIG_ECONET is not set 356# CONFIG_ECONET is not set
332# CONFIG_WAN_ROUTER is not set 357# CONFIG_WAN_ROUTER is not set
333 358
@@ -375,6 +400,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
375# 400#
376# Plug and Play support 401# Plug and Play support
377# 402#
403# CONFIG_PNPACPI is not set
378 404
379# 405#
380# Block devices 406# Block devices
@@ -390,11 +416,18 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
390CONFIG_BLK_DEV_RAM=y 416CONFIG_BLK_DEV_RAM=y
391CONFIG_BLK_DEV_RAM_COUNT=16 417CONFIG_BLK_DEV_RAM_COUNT=16
392CONFIG_BLK_DEV_RAM_SIZE=4096 418CONFIG_BLK_DEV_RAM_SIZE=4096
419CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
393CONFIG_BLK_DEV_INITRD=y 420CONFIG_BLK_DEV_INITRD=y
394# CONFIG_CDROM_PKTCDVD is not set 421# CONFIG_CDROM_PKTCDVD is not set
395# CONFIG_ATA_OVER_ETH is not set 422# CONFIG_ATA_OVER_ETH is not set
396 423
397# 424#
425# Misc devices
426#
427CONFIG_SGI_IOC4=m
428# CONFIG_TIFM_CORE is not set
429
430#
398# ATA/ATAPI/MFM/RLL support 431# ATA/ATAPI/MFM/RLL support
399# 432#
400# CONFIG_IDE is not set 433# CONFIG_IDE is not set
@@ -404,6 +437,12 @@ CONFIG_BLK_DEV_INITRD=y
404# 437#
405# CONFIG_RAID_ATTRS is not set 438# CONFIG_RAID_ATTRS is not set
406# CONFIG_SCSI is not set 439# CONFIG_SCSI is not set
440# CONFIG_SCSI_NETLINK is not set
441
442#
443# Serial ATA (prod) and Parallel ATA (experimental) drivers
444#
445# CONFIG_ATA is not set
407 446
408# 447#
409# Multi-device support (RAID and LVM) 448# Multi-device support (RAID and LVM)
@@ -454,6 +493,8 @@ CONFIG_PHYLIB=y
454# CONFIG_CICADA_PHY is not set 493# CONFIG_CICADA_PHY is not set
455CONFIG_VITESSE_PHY=m 494CONFIG_VITESSE_PHY=m
456CONFIG_SMSC_PHY=m 495CONFIG_SMSC_PHY=m
496# CONFIG_BROADCOM_PHY is not set
497# CONFIG_FIXED_PHY is not set
457 498
458# 499#
459# Ethernet (10 or 100Mbit) 500# Ethernet (10 or 100Mbit)
@@ -490,7 +531,7 @@ CONFIG_E100=y
490# CONFIG_SUNDANCE is not set 531# CONFIG_SUNDANCE is not set
491# CONFIG_TLAN is not set 532# CONFIG_TLAN is not set
492# CONFIG_VIA_RHINE is not set 533# CONFIG_VIA_RHINE is not set
493# CONFIG_LAN_SAA9730 is not set 534# CONFIG_SC92031 is not set
494 535
495# 536#
496# Ethernet (1000 Mbit) 537# Ethernet (1000 Mbit)
@@ -509,14 +550,18 @@ CONFIG_E100=y
509# CONFIG_VIA_VELOCITY is not set 550# CONFIG_VIA_VELOCITY is not set
510# CONFIG_TIGON3 is not set 551# CONFIG_TIGON3 is not set
511# CONFIG_BNX2 is not set 552# CONFIG_BNX2 is not set
553CONFIG_QLA3XXX=m
554# CONFIG_ATL1 is not set
512 555
513# 556#
514# Ethernet (10000 Mbit) 557# Ethernet (10000 Mbit)
515# 558#
516# CONFIG_CHELSIO_T1 is not set 559# CONFIG_CHELSIO_T1 is not set
560CONFIG_CHELSIO_T3=m
517# CONFIG_IXGB is not set 561# CONFIG_IXGB is not set
518# CONFIG_S2IO is not set 562# CONFIG_S2IO is not set
519# CONFIG_MYRI10GE is not set 563# CONFIG_MYRI10GE is not set
564CONFIG_NETXEN_NIC=m
520 565
521# 566#
522# Token Ring devices 567# Token Ring devices
@@ -602,10 +647,6 @@ CONFIG_RTC=y
602# CONFIG_DTLK is not set 647# CONFIG_DTLK is not set
603# CONFIG_R3964 is not set 648# CONFIG_R3964 is not set
604# CONFIG_APPLICOM is not set 649# CONFIG_APPLICOM is not set
605
606#
607# Ftape, the floppy tape device driver
608#
609# CONFIG_DRM is not set 650# CONFIG_DRM is not set
610# CONFIG_RAW_DRIVER is not set 651# CONFIG_RAW_DRIVER is not set
611 652
@@ -613,7 +654,6 @@ CONFIG_RTC=y
613# TPM devices 654# TPM devices
614# 655#
615# CONFIG_TCG_TPM is not set 656# CONFIG_TCG_TPM is not set
616# CONFIG_TELCLOCK is not set
617 657
618# 658#
619# I2C support 659# I2C support
@@ -629,6 +669,7 @@ CONFIG_RTC=y
629# 669#
630# Dallas's 1-wire bus 670# Dallas's 1-wire bus
631# 671#
672# CONFIG_W1 is not set
632 673
633# 674#
634# Hardware Monitoring support 675# Hardware Monitoring support
@@ -637,17 +678,14 @@ CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set 678# CONFIG_HWMON_VID is not set
638# CONFIG_SENSORS_ABITUGURU is not set 679# CONFIG_SENSORS_ABITUGURU is not set
639# CONFIG_SENSORS_F71805F is not set 680# CONFIG_SENSORS_F71805F is not set
681# CONFIG_SENSORS_PC87427 is not set
682# CONFIG_SENSORS_VT1211 is not set
640# CONFIG_HWMON_DEBUG_CHIP is not set 683# CONFIG_HWMON_DEBUG_CHIP is not set
641 684
642# 685#
643# Misc devices
644#
645
646#
647# Multimedia devices 686# Multimedia devices
648# 687#
649# CONFIG_VIDEO_DEV is not set 688# CONFIG_VIDEO_DEV is not set
650CONFIG_VIDEO_V4L2=y
651 689
652# 690#
653# Digital Video Broadcasting Devices 691# Digital Video Broadcasting Devices
@@ -659,6 +697,7 @@ CONFIG_VIDEO_V4L2=y
659# 697#
660# CONFIG_FIRMWARE_EDID is not set 698# CONFIG_FIRMWARE_EDID is not set
661# CONFIG_FB is not set 699# CONFIG_FB is not set
700# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
662 701
663# 702#
664# Sound 703# Sound
@@ -728,14 +767,24 @@ CONFIG_USB_ARCH_HAS_EHCI=y
728# 767#
729 768
730# 769#
770# Auxiliary Display support
771#
772
773#
774# Virtualization
775#
776
777#
731# File systems 778# File systems
732# 779#
733# CONFIG_EXT2_FS is not set 780# CONFIG_EXT2_FS is not set
734# CONFIG_EXT3_FS is not set 781# CONFIG_EXT3_FS is not set
782# CONFIG_EXT4DEV_FS is not set
735# CONFIG_REISERFS_FS is not set 783# CONFIG_REISERFS_FS is not set
736# CONFIG_JFS_FS is not set 784# CONFIG_JFS_FS is not set
737# CONFIG_FS_POSIX_ACL is not set 785CONFIG_FS_POSIX_ACL=y
738# CONFIG_XFS_FS is not set 786# CONFIG_XFS_FS is not set
787# CONFIG_GFS2_FS is not set
739# CONFIG_OCFS2_FS is not set 788# CONFIG_OCFS2_FS is not set
740# CONFIG_MINIX_FS is not set 789# CONFIG_MINIX_FS is not set
741# CONFIG_ROMFS_FS is not set 790# CONFIG_ROMFS_FS is not set
@@ -746,6 +795,7 @@ CONFIG_DNOTIFY=y
746# CONFIG_AUTOFS_FS is not set 795# CONFIG_AUTOFS_FS is not set
747# CONFIG_AUTOFS4_FS is not set 796# CONFIG_AUTOFS4_FS is not set
748# CONFIG_FUSE_FS is not set 797# CONFIG_FUSE_FS is not set
798CONFIG_GENERIC_ACL=y
749 799
750# 800#
751# CD-ROM/DVD Filesystems 801# CD-ROM/DVD Filesystems
@@ -765,11 +815,13 @@ CONFIG_DNOTIFY=y
765# 815#
766CONFIG_PROC_FS=y 816CONFIG_PROC_FS=y
767CONFIG_PROC_KCORE=y 817CONFIG_PROC_KCORE=y
818CONFIG_PROC_SYSCTL=y
768CONFIG_SYSFS=y 819CONFIG_SYSFS=y
769CONFIG_TMPFS=y 820CONFIG_TMPFS=y
821CONFIG_TMPFS_POSIX_ACL=y
770# CONFIG_HUGETLB_PAGE is not set 822# CONFIG_HUGETLB_PAGE is not set
771CONFIG_RAMFS=y 823CONFIG_RAMFS=y
772# CONFIG_CONFIGFS_FS is not set 824CONFIG_CONFIGFS_FS=m
773 825
774# 826#
775# Miscellaneous filesystems 827# Miscellaneous filesystems
@@ -806,7 +858,6 @@ CONFIG_SUNRPC=y
806# CONFIG_RPCSEC_GSS_SPKM3 is not set 858# CONFIG_RPCSEC_GSS_SPKM3 is not set
807# CONFIG_SMB_FS is not set 859# CONFIG_SMB_FS is not set
808# CONFIG_CIFS is not set 860# CONFIG_CIFS is not set
809# CONFIG_CIFS_DEBUG2 is not set
810# CONFIG_NCP_FS is not set 861# CONFIG_NCP_FS is not set
811# CONFIG_CODA_FS is not set 862# CONFIG_CODA_FS is not set
812# CONFIG_AFS_FS is not set 863# CONFIG_AFS_FS is not set
@@ -824,6 +875,14 @@ CONFIG_MSDOS_PARTITION=y
824# CONFIG_NLS is not set 875# CONFIG_NLS is not set
825 876
826# 877#
878# Distributed Lock Manager
879#
880CONFIG_DLM=m
881CONFIG_DLM_TCP=y
882# CONFIG_DLM_SCTP is not set
883# CONFIG_DLM_DEBUG is not set
884
885#
827# Profiling support 886# Profiling support
828# 887#
829# CONFIG_PROFILING is not set 888# CONFIG_PROFILING is not set
@@ -833,11 +892,13 @@ CONFIG_MSDOS_PARTITION=y
833# 892#
834CONFIG_TRACE_IRQFLAGS_SUPPORT=y 893CONFIG_TRACE_IRQFLAGS_SUPPORT=y
835# CONFIG_PRINTK_TIME is not set 894# CONFIG_PRINTK_TIME is not set
895CONFIG_ENABLE_MUST_CHECK=y
836# CONFIG_MAGIC_SYSRQ is not set 896# CONFIG_MAGIC_SYSRQ is not set
837# CONFIG_UNUSED_SYMBOLS is not set 897# CONFIG_UNUSED_SYMBOLS is not set
898# CONFIG_DEBUG_FS is not set
899# CONFIG_HEADERS_CHECK is not set
838# CONFIG_DEBUG_KERNEL is not set 900# CONFIG_DEBUG_KERNEL is not set
839CONFIG_LOG_BUF_SHIFT=14 901CONFIG_LOG_BUF_SHIFT=14
840# CONFIG_DEBUG_FS is not set
841CONFIG_CROSSCOMPILE=y 902CONFIG_CROSSCOMPILE=y
842CONFIG_CMDLINE="console=ttyS0,115200n8" 903CONFIG_CMDLINE="console=ttyS0,115200n8"
843 904
@@ -850,7 +911,44 @@ CONFIG_CMDLINE="console=ttyS0,115200n8"
850# 911#
851# Cryptographic options 912# Cryptographic options
852# 913#
853# CONFIG_CRYPTO is not set 914CONFIG_CRYPTO=y
915CONFIG_CRYPTO_ALGAPI=y
916CONFIG_CRYPTO_BLKCIPHER=m
917CONFIG_CRYPTO_HASH=m
918CONFIG_CRYPTO_MANAGER=m
919CONFIG_CRYPTO_HMAC=m
920CONFIG_CRYPTO_XCBC=m
921CONFIG_CRYPTO_NULL=m
922CONFIG_CRYPTO_MD4=m
923CONFIG_CRYPTO_MD5=y
924CONFIG_CRYPTO_SHA1=m
925CONFIG_CRYPTO_SHA256=m
926CONFIG_CRYPTO_SHA512=m
927CONFIG_CRYPTO_WP512=m
928CONFIG_CRYPTO_TGR192=m
929CONFIG_CRYPTO_GF128MUL=m
930CONFIG_CRYPTO_ECB=m
931CONFIG_CRYPTO_CBC=m
932CONFIG_CRYPTO_PCBC=m
933CONFIG_CRYPTO_LRW=m
934CONFIG_CRYPTO_DES=m
935CONFIG_CRYPTO_FCRYPT=m
936CONFIG_CRYPTO_BLOWFISH=m
937CONFIG_CRYPTO_TWOFISH=m
938CONFIG_CRYPTO_TWOFISH_COMMON=m
939CONFIG_CRYPTO_SERPENT=m
940CONFIG_CRYPTO_AES=m
941CONFIG_CRYPTO_CAST5=m
942CONFIG_CRYPTO_CAST6=m
943CONFIG_CRYPTO_TEA=m
944CONFIG_CRYPTO_ARC4=m
945CONFIG_CRYPTO_KHAZAD=m
946CONFIG_CRYPTO_ANUBIS=m
947CONFIG_CRYPTO_DEFLATE=m
948CONFIG_CRYPTO_MICHAEL_MIC=m
949CONFIG_CRYPTO_CRC32C=m
950CONFIG_CRYPTO_CAMELLIA=m
951# CONFIG_CRYPTO_TEST is not set
854 952
855# 953#
856# Hardware crypto devices 954# Hardware crypto devices
@@ -859,8 +957,13 @@ CONFIG_CMDLINE="console=ttyS0,115200n8"
859# 957#
860# Library routines 958# Library routines
861# 959#
960CONFIG_BITREVERSE=y
862CONFIG_CRC_CCITT=y 961CONFIG_CRC_CCITT=y
863CONFIG_CRC16=y 962CONFIG_CRC16=y
864CONFIG_CRC32=y 963CONFIG_CRC32=y
865CONFIG_LIBCRC32C=y 964CONFIG_LIBCRC32C=y
965CONFIG_ZLIB_INFLATE=m
966CONFIG_ZLIB_DEFLATE=m
866CONFIG_PLIST=y 967CONFIG_PLIST=y
968CONFIG_HAS_IOMEM=y
969CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index b9f74d6745ee..f24e1c6fc484 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:21 2006 4# Tue Feb 20 21:47:42 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47CONFIG_PMC_YOSEMITE=y 47CONFIG_PMC_YOSEMITE=y
@@ -65,10 +65,14 @@ CONFIG_PMC_YOSEMITE=y
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66# CONFIG_HYPERTRANSPORT is not set 66# CONFIG_HYPERTRANSPORT is not set
67CONFIG_RWSEM_GENERIC_SPINLOCK=y 67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68# CONFIG_ARCH_HAS_ILOG2_U32 is not set
69# CONFIG_ARCH_HAS_ILOG2_U64 is not set
68CONFIG_GENERIC_FIND_NEXT_BIT=y 70CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y 71CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y 72CONFIG_GENERIC_CALIBRATE_DELAY=y
73CONFIG_GENERIC_TIME=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
72CONFIG_DMA_COHERENT=y 76CONFIG_DMA_COHERENT=y
73CONFIG_CPU_BIG_ENDIAN=y 77CONFIG_CPU_BIG_ENDIAN=y
74# CONFIG_CPU_LITTLE_ENDIAN is not set 78# CONFIG_CPU_LITTLE_ENDIAN is not set
@@ -102,6 +106,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
102CONFIG_CPU_RM9000=y 106CONFIG_CPU_RM9000=y
103# CONFIG_CPU_SB1 is not set 107# CONFIG_CPU_SB1 is not set
104CONFIG_SYS_HAS_CPU_RM9000=y 108CONFIG_SYS_HAS_CPU_RM9000=y
109CONFIG_WEAK_ORDERING=y
105CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
106CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y 111CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
107CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y 112CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -118,8 +123,8 @@ CONFIG_PAGE_SIZE_4KB=y
118# CONFIG_PAGE_SIZE_64KB is not set 123# CONFIG_PAGE_SIZE_64KB is not set
119CONFIG_CPU_HAS_PREFETCH=y 124CONFIG_CPU_HAS_PREFETCH=y
120CONFIG_MIPS_MT_DISABLED=y 125CONFIG_MIPS_MT_DISABLED=y
121# CONFIG_MIPS_MT_SMTC is not set
122# CONFIG_MIPS_MT_SMP is not set 126# CONFIG_MIPS_MT_SMP is not set
127# CONFIG_MIPS_MT_SMTC is not set
123# CONFIG_MIPS_VPE_LOADER is not set 128# CONFIG_MIPS_VPE_LOADER is not set
124# CONFIG_64BIT_PHYS_ADDR is not set 129# CONFIG_64BIT_PHYS_ADDR is not set
125CONFIG_CPU_HAS_LLSC=y 130CONFIG_CPU_HAS_LLSC=y
@@ -136,6 +141,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
136# CONFIG_SPARSEMEM_STATIC is not set 141# CONFIG_SPARSEMEM_STATIC is not set
137CONFIG_SPLIT_PTLOCK_CPUS=4 142CONFIG_SPLIT_PTLOCK_CPUS=4
138# CONFIG_RESOURCES_64BIT is not set 143# CONFIG_RESOURCES_64BIT is not set
144CONFIG_ZONE_DMA_FLAG=1
139CONFIG_SMP=y 145CONFIG_SMP=y
140CONFIG_SYS_SUPPORTS_SMP=y 146CONFIG_SYS_SUPPORTS_SMP=y
141CONFIG_NR_CPUS=2 147CONFIG_NR_CPUS=2
@@ -170,15 +176,20 @@ CONFIG_LOCALVERSION=""
170CONFIG_LOCALVERSION_AUTO=y 176CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y 177CONFIG_SWAP=y
172CONFIG_SYSVIPC=y 178CONFIG_SYSVIPC=y
179# CONFIG_IPC_NS is not set
180CONFIG_SYSVIPC_SYSCTL=y
173# CONFIG_BSD_PROCESS_ACCT is not set 181# CONFIG_BSD_PROCESS_ACCT is not set
174CONFIG_SYSCTL=y 182# CONFIG_TASKSTATS is not set
183# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set 184# CONFIG_AUDIT is not set
176CONFIG_IKCONFIG=y 185CONFIG_IKCONFIG=y
177CONFIG_IKCONFIG_PROC=y 186CONFIG_IKCONFIG_PROC=y
178# CONFIG_CPUSETS is not set 187# CONFIG_CPUSETS is not set
188CONFIG_SYSFS_DEPRECATED=y
179CONFIG_RELAY=y 189CONFIG_RELAY=y
180CONFIG_INITRAMFS_SOURCE="" 190CONFIG_SYSCTL=y
181CONFIG_EMBEDDED=y 191CONFIG_EMBEDDED=y
192CONFIG_SYSCTL_SYSCALL=y
182CONFIG_KALLSYMS=y 193CONFIG_KALLSYMS=y
183# CONFIG_KALLSYMS_ALL is not set 194# CONFIG_KALLSYMS_ALL is not set
184# CONFIG_KALLSYMS_EXTRA_PASS is not set 195# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -187,12 +198,12 @@ CONFIG_PRINTK=y
187CONFIG_BUG=y 198CONFIG_BUG=y
188CONFIG_ELF_CORE=y 199CONFIG_ELF_CORE=y
189CONFIG_BASE_FULL=y 200CONFIG_BASE_FULL=y
190CONFIG_RT_MUTEXES=y
191CONFIG_FUTEX=y 201CONFIG_FUTEX=y
192CONFIG_EPOLL=y 202CONFIG_EPOLL=y
193CONFIG_SHMEM=y 203CONFIG_SHMEM=y
194CONFIG_SLAB=y 204CONFIG_SLAB=y
195CONFIG_VM_EVENT_COUNTERS=y 205CONFIG_VM_EVENT_COUNTERS=y
206CONFIG_RT_MUTEXES=y
196# CONFIG_TINY_SHMEM is not set 207# CONFIG_TINY_SHMEM is not set
197CONFIG_BASE_SMALL=0 208CONFIG_BASE_SMALL=0
198# CONFIG_SLOB is not set 209# CONFIG_SLOB is not set
@@ -210,6 +221,7 @@ CONFIG_STOP_MACHINE=y
210# 221#
211# Block layer 222# Block layer
212# 223#
224CONFIG_BLOCK=y
213# CONFIG_LBD is not set 225# CONFIG_LBD is not set
214# CONFIG_BLK_DEV_IO_TRACE is not set 226# CONFIG_BLK_DEV_IO_TRACE is not set
215# CONFIG_LSF is not set 227# CONFIG_LSF is not set
@@ -252,6 +264,14 @@ CONFIG_BINFMT_ELF=y
252CONFIG_TRAD_SIGNALS=y 264CONFIG_TRAD_SIGNALS=y
253 265
254# 266#
267# Power management options
268#
269CONFIG_PM=y
270# CONFIG_PM_LEGACY is not set
271# CONFIG_PM_DEBUG is not set
272# CONFIG_PM_SYSFS_DEPRECATED is not set
273
274#
255# Networking 275# Networking
256# 276#
257CONFIG_NET=y 277CONFIG_NET=y
@@ -281,13 +301,15 @@ CONFIG_IP_PNP_BOOTP=y
281# CONFIG_INET_ESP is not set 301# CONFIG_INET_ESP is not set
282# CONFIG_INET_IPCOMP is not set 302# CONFIG_INET_IPCOMP is not set
283# CONFIG_INET_XFRM_TUNNEL is not set 303# CONFIG_INET_XFRM_TUNNEL is not set
284# CONFIG_INET_TUNNEL is not set 304CONFIG_INET_TUNNEL=m
285CONFIG_INET_XFRM_MODE_TRANSPORT=m 305CONFIG_INET_XFRM_MODE_TRANSPORT=m
286CONFIG_INET_XFRM_MODE_TUNNEL=m 306CONFIG_INET_XFRM_MODE_TUNNEL=m
307CONFIG_INET_XFRM_MODE_BEET=m
287CONFIG_INET_DIAG=y 308CONFIG_INET_DIAG=y
288CONFIG_INET_TCP_DIAG=y 309CONFIG_INET_TCP_DIAG=y
289# CONFIG_TCP_CONG_ADVANCED is not set 310# CONFIG_TCP_CONG_ADVANCED is not set
290CONFIG_TCP_CONG_BIC=y 311CONFIG_TCP_CONG_CUBIC=y
312CONFIG_DEFAULT_TCP_CONG="cubic"
291CONFIG_IPV6=m 313CONFIG_IPV6=m
292CONFIG_IPV6_PRIVACY=y 314CONFIG_IPV6_PRIVACY=y
293CONFIG_IPV6_ROUTER_PREF=y 315CONFIG_IPV6_ROUTER_PREF=y
@@ -298,6 +320,8 @@ CONFIG_INET6_XFRM_TUNNEL=m
298CONFIG_INET6_TUNNEL=m 320CONFIG_INET6_TUNNEL=m
299CONFIG_INET6_XFRM_MODE_TRANSPORT=m 321CONFIG_INET6_XFRM_MODE_TRANSPORT=m
300CONFIG_INET6_XFRM_MODE_TUNNEL=m 322CONFIG_INET6_XFRM_MODE_TUNNEL=m
323CONFIG_INET6_XFRM_MODE_BEET=m
324CONFIG_IPV6_SIT=m
301CONFIG_IPV6_TUNNEL=m 325CONFIG_IPV6_TUNNEL=m
302CONFIG_NETWORK_SECMARK=y 326CONFIG_NETWORK_SECMARK=y
303# CONFIG_NETFILTER is not set 327# CONFIG_NETFILTER is not set
@@ -336,6 +360,7 @@ CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y 360CONFIG_PREVENT_FIRMWARE_BUILD=y
337CONFIG_FW_LOADER=m 361CONFIG_FW_LOADER=m
338# CONFIG_DEBUG_DRIVER is not set 362# CONFIG_DEBUG_DRIVER is not set
363# CONFIG_DEBUG_DEVRES is not set
339# CONFIG_SYS_HYPERVISOR is not set 364# CONFIG_SYS_HYPERVISOR is not set
340 365
341# 366#
@@ -356,6 +381,7 @@ CONFIG_CONNECTOR=m
356# 381#
357# Plug and Play support 382# Plug and Play support
358# 383#
384# CONFIG_PNPACPI is not set
359 385
360# 386#
361# Block devices 387# Block devices
@@ -374,6 +400,11 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
374CONFIG_ATA_OVER_ETH=m 400CONFIG_ATA_OVER_ETH=m
375 401
376# 402#
403# Misc devices
404#
405CONFIG_SGI_IOC4=m
406
407#
377# ATA/ATAPI/MFM/RLL support 408# ATA/ATAPI/MFM/RLL support
378# 409#
379# CONFIG_IDE is not set 410# CONFIG_IDE is not set
@@ -383,6 +414,12 @@ CONFIG_ATA_OVER_ETH=m
383# 414#
384CONFIG_RAID_ATTRS=m 415CONFIG_RAID_ATTRS=m
385# CONFIG_SCSI is not set 416# CONFIG_SCSI is not set
417# CONFIG_SCSI_NETLINK is not set
418
419#
420# Serial ATA (prod) and Parallel ATA (experimental) drivers
421#
422# CONFIG_ATA is not set
386 423
387# 424#
388# Multi-device support (RAID and LVM) 425# Multi-device support (RAID and LVM)
@@ -433,6 +470,8 @@ CONFIG_LXT_PHY=m
433CONFIG_CICADA_PHY=m 470CONFIG_CICADA_PHY=m
434CONFIG_VITESSE_PHY=m 471CONFIG_VITESSE_PHY=m
435CONFIG_SMSC_PHY=m 472CONFIG_SMSC_PHY=m
473# CONFIG_BROADCOM_PHY is not set
474# CONFIG_FIXED_PHY is not set
436 475
437# 476#
438# Ethernet (10 or 100Mbit) 477# Ethernet (10 or 100Mbit)
@@ -463,18 +502,22 @@ CONFIG_MII=y
463# CONFIG_R8169 is not set 502# CONFIG_R8169 is not set
464# CONFIG_SIS190 is not set 503# CONFIG_SIS190 is not set
465# CONFIG_SKGE is not set 504# CONFIG_SKGE is not set
505# CONFIG_SKY2 is not set
466# CONFIG_SK98LIN is not set 506# CONFIG_SK98LIN is not set
467# CONFIG_TIGON3 is not set 507# CONFIG_TIGON3 is not set
468# CONFIG_BNX2 is not set 508# CONFIG_BNX2 is not set
469CONFIG_TITAN_GE=y 509CONFIG_TITAN_GE=y
510CONFIG_QLA3XXX=m
470 511
471# 512#
472# Ethernet (10000 Mbit) 513# Ethernet (10000 Mbit)
473# 514#
474# CONFIG_CHELSIO_T1 is not set 515# CONFIG_CHELSIO_T1 is not set
516CONFIG_CHELSIO_T3=m
475# CONFIG_IXGB is not set 517# CONFIG_IXGB is not set
476# CONFIG_S2IO is not set 518# CONFIG_S2IO is not set
477# CONFIG_MYRI10GE is not set 519# CONFIG_MYRI10GE is not set
520CONFIG_NETXEN_NIC=m
478 521
479# 522#
480# Token Ring devices 523# Token Ring devices
@@ -559,10 +602,6 @@ CONFIG_GEN_RTC_X=y
559# CONFIG_DTLK is not set 602# CONFIG_DTLK is not set
560# CONFIG_R3964 is not set 603# CONFIG_R3964 is not set
561# CONFIG_APPLICOM is not set 604# CONFIG_APPLICOM is not set
562
563#
564# Ftape, the floppy tape device driver
565#
566# CONFIG_DRM is not set 605# CONFIG_DRM is not set
567# CONFIG_RAW_DRIVER is not set 606# CONFIG_RAW_DRIVER is not set
568 607
@@ -593,14 +632,9 @@ CONFIG_GEN_RTC_X=y
593# CONFIG_HWMON_VID is not set 632# CONFIG_HWMON_VID is not set
594 633
595# 634#
596# Misc devices
597#
598
599#
600# Multimedia devices 635# Multimedia devices
601# 636#
602# CONFIG_VIDEO_DEV is not set 637# CONFIG_VIDEO_DEV is not set
603CONFIG_VIDEO_V4L2=y
604 638
605# 639#
606# Digital Video Broadcasting Devices 640# Digital Video Broadcasting Devices
@@ -612,6 +646,7 @@ CONFIG_VIDEO_V4L2=y
612# 646#
613# CONFIG_FIRMWARE_EDID is not set 647# CONFIG_FIRMWARE_EDID is not set
614# CONFIG_FB is not set 648# CONFIG_FB is not set
649# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
615 650
616# 651#
617# Sound 652# Sound
@@ -680,14 +715,23 @@ CONFIG_USB_ARCH_HAS_EHCI=y
680# 715#
681 716
682# 717#
718# Auxiliary Display support
719#
720
721#
722# Virtualization
723#
724
725#
683# File systems 726# File systems
684# 727#
685# CONFIG_EXT2_FS is not set 728# CONFIG_EXT2_FS is not set
686# CONFIG_EXT3_FS is not set 729# CONFIG_EXT3_FS is not set
687# CONFIG_REISERFS_FS is not set 730# CONFIG_REISERFS_FS is not set
688# CONFIG_JFS_FS is not set 731# CONFIG_JFS_FS is not set
689# CONFIG_FS_POSIX_ACL is not set 732CONFIG_FS_POSIX_ACL=y
690# CONFIG_XFS_FS is not set 733# CONFIG_XFS_FS is not set
734# CONFIG_OCFS2_FS is not set
691# CONFIG_MINIX_FS is not set 735# CONFIG_MINIX_FS is not set
692# CONFIG_ROMFS_FS is not set 736# CONFIG_ROMFS_FS is not set
693CONFIG_INOTIFY=y 737CONFIG_INOTIFY=y
@@ -697,6 +741,7 @@ CONFIG_DNOTIFY=y
697# CONFIG_AUTOFS_FS is not set 741# CONFIG_AUTOFS_FS is not set
698# CONFIG_AUTOFS4_FS is not set 742# CONFIG_AUTOFS4_FS is not set
699CONFIG_FUSE_FS=m 743CONFIG_FUSE_FS=m
744CONFIG_GENERIC_ACL=y
700 745
701# 746#
702# CD-ROM/DVD Filesystems 747# CD-ROM/DVD Filesystems
@@ -716,8 +761,10 @@ CONFIG_FUSE_FS=m
716# 761#
717CONFIG_PROC_FS=y 762CONFIG_PROC_FS=y
718CONFIG_PROC_KCORE=y 763CONFIG_PROC_KCORE=y
764CONFIG_PROC_SYSCTL=y
719CONFIG_SYSFS=y 765CONFIG_SYSFS=y
720CONFIG_TMPFS=y 766CONFIG_TMPFS=y
767CONFIG_TMPFS_POSIX_ACL=y
721# CONFIG_HUGETLB_PAGE is not set 768# CONFIG_HUGETLB_PAGE is not set
722CONFIG_RAMFS=y 769CONFIG_RAMFS=y
723 770
@@ -737,6 +784,7 @@ CONFIG_RAMFS=y
737# 784#
738CONFIG_NFS_FS=y 785CONFIG_NFS_FS=y
739# CONFIG_NFS_V3 is not set 786# CONFIG_NFS_V3 is not set
787# CONFIG_NFS_DIRECTIO is not set
740# CONFIG_NFSD is not set 788# CONFIG_NFSD is not set
741CONFIG_ROOT_NFS=y 789CONFIG_ROOT_NFS=y
742CONFIG_LOCKD=y 790CONFIG_LOCKD=y
@@ -744,7 +792,6 @@ CONFIG_NFS_COMMON=y
744CONFIG_SUNRPC=y 792CONFIG_SUNRPC=y
745# CONFIG_SMB_FS is not set 793# CONFIG_SMB_FS is not set
746# CONFIG_CIFS is not set 794# CONFIG_CIFS is not set
747# CONFIG_CIFS_DEBUG2 is not set
748# CONFIG_NCP_FS is not set 795# CONFIG_NCP_FS is not set
749# CONFIG_CODA_FS is not set 796# CONFIG_CODA_FS is not set
750 797
@@ -764,31 +811,38 @@ CONFIG_MSDOS_PARTITION=y
764# 811#
765CONFIG_TRACE_IRQFLAGS_SUPPORT=y 812CONFIG_TRACE_IRQFLAGS_SUPPORT=y
766# CONFIG_PRINTK_TIME is not set 813# CONFIG_PRINTK_TIME is not set
814CONFIG_ENABLE_MUST_CHECK=y
767# CONFIG_MAGIC_SYSRQ is not set 815# CONFIG_MAGIC_SYSRQ is not set
768# CONFIG_UNUSED_SYMBOLS is not set 816# CONFIG_UNUSED_SYMBOLS is not set
817# CONFIG_DEBUG_FS is not set
818# CONFIG_HEADERS_CHECK is not set
769CONFIG_DEBUG_KERNEL=y 819CONFIG_DEBUG_KERNEL=y
820# CONFIG_DEBUG_SHIRQ is not set
770CONFIG_LOG_BUF_SHIFT=14 821CONFIG_LOG_BUF_SHIFT=14
771CONFIG_DETECT_SOFTLOCKUP=y 822CONFIG_DETECT_SOFTLOCKUP=y
772# CONFIG_SCHEDSTATS is not set 823# CONFIG_SCHEDSTATS is not set
824# CONFIG_TIMER_STATS is not set
773# CONFIG_DEBUG_SLAB is not set 825# CONFIG_DEBUG_SLAB is not set
774# CONFIG_DEBUG_RT_MUTEXES is not set 826# CONFIG_DEBUG_RT_MUTEXES is not set
775# CONFIG_RT_MUTEX_TESTER is not set 827# CONFIG_RT_MUTEX_TESTER is not set
776# CONFIG_DEBUG_SPINLOCK is not set 828# CONFIG_DEBUG_SPINLOCK is not set
777CONFIG_DEBUG_MUTEXES=y 829CONFIG_DEBUG_MUTEXES=y
778# CONFIG_DEBUG_RWSEMS is not set 830# CONFIG_DEBUG_LOCK_ALLOC is not set
831# CONFIG_PROVE_LOCKING is not set
779# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 832# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
780# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 833# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
781# CONFIG_DEBUG_KOBJECT is not set 834# CONFIG_DEBUG_KOBJECT is not set
782# CONFIG_DEBUG_HIGHMEM is not set 835# CONFIG_DEBUG_HIGHMEM is not set
783# CONFIG_DEBUG_INFO is not set 836# CONFIG_DEBUG_INFO is not set
784# CONFIG_DEBUG_FS is not set
785# CONFIG_DEBUG_VM is not set 837# CONFIG_DEBUG_VM is not set
838# CONFIG_DEBUG_LIST is not set
786CONFIG_FORCED_INLINING=y 839CONFIG_FORCED_INLINING=y
787# CONFIG_RCU_TORTURE_TEST is not set 840# CONFIG_RCU_TORTURE_TEST is not set
788CONFIG_CROSSCOMPILE=y 841CONFIG_CROSSCOMPILE=y
789CONFIG_CMDLINE="" 842CONFIG_CMDLINE=""
790# CONFIG_DEBUG_STACK_USAGE is not set 843# CONFIG_DEBUG_STACK_USAGE is not set
791# CONFIG_KGDB is not set 844# CONFIG_KGDB is not set
845CONFIG_SYS_SUPPORTS_KGDB=y
792# CONFIG_RUNTIME_DEBUG is not set 846# CONFIG_RUNTIME_DEBUG is not set
793 847
794# 848#
@@ -802,6 +856,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
802# Cryptographic options 856# Cryptographic options
803# 857#
804CONFIG_CRYPTO=y 858CONFIG_CRYPTO=y
859CONFIG_CRYPTO_ALGAPI=y
860CONFIG_CRYPTO_BLKCIPHER=m
861CONFIG_CRYPTO_HASH=y
862CONFIG_CRYPTO_MANAGER=y
805CONFIG_CRYPTO_HMAC=y 863CONFIG_CRYPTO_HMAC=y
806CONFIG_CRYPTO_NULL=m 864CONFIG_CRYPTO_NULL=m
807CONFIG_CRYPTO_MD4=m 865CONFIG_CRYPTO_MD4=m
@@ -811,9 +869,14 @@ CONFIG_CRYPTO_SHA256=m
811CONFIG_CRYPTO_SHA512=m 869CONFIG_CRYPTO_SHA512=m
812CONFIG_CRYPTO_WP512=m 870CONFIG_CRYPTO_WP512=m
813CONFIG_CRYPTO_TGR192=m 871CONFIG_CRYPTO_TGR192=m
872CONFIG_CRYPTO_ECB=m
873CONFIG_CRYPTO_CBC=m
874CONFIG_CRYPTO_PCBC=m
814CONFIG_CRYPTO_DES=m 875CONFIG_CRYPTO_DES=m
876CONFIG_CRYPTO_FCRYPT=m
815CONFIG_CRYPTO_BLOWFISH=m 877CONFIG_CRYPTO_BLOWFISH=m
816CONFIG_CRYPTO_TWOFISH=m 878CONFIG_CRYPTO_TWOFISH=m
879CONFIG_CRYPTO_TWOFISH_COMMON=m
817CONFIG_CRYPTO_SERPENT=m 880CONFIG_CRYPTO_SERPENT=m
818CONFIG_CRYPTO_AES=m 881CONFIG_CRYPTO_AES=m
819CONFIG_CRYPTO_CAST5=m 882CONFIG_CRYPTO_CAST5=m
@@ -825,6 +888,7 @@ CONFIG_CRYPTO_ANUBIS=m
825CONFIG_CRYPTO_DEFLATE=m 888CONFIG_CRYPTO_DEFLATE=m
826CONFIG_CRYPTO_MICHAEL_MIC=m 889CONFIG_CRYPTO_MICHAEL_MIC=m
827CONFIG_CRYPTO_CRC32C=m 890CONFIG_CRYPTO_CRC32C=m
891CONFIG_CRYPTO_CAMELLIA=m
828# CONFIG_CRYPTO_TEST is not set 892# CONFIG_CRYPTO_TEST is not set
829 893
830# 894#
@@ -834,6 +898,7 @@ CONFIG_CRYPTO_CRC32C=m
834# 898#
835# Library routines 899# Library routines
836# 900#
901CONFIG_BITREVERSE=m
837# CONFIG_CRC_CCITT is not set 902# CONFIG_CRC_CCITT is not set
838CONFIG_CRC16=m 903CONFIG_CRC16=m
839CONFIG_CRC32=m 904CONFIG_CRC32=m
@@ -841,3 +906,5 @@ CONFIG_LIBCRC32C=m
841CONFIG_ZLIB_INFLATE=m 906CONFIG_ZLIB_INFLATE=m
842CONFIG_ZLIB_DEFLATE=m 907CONFIG_ZLIB_DEFLATE=m
843CONFIG_PLIST=y 908CONFIG_PLIST=y
909CONFIG_HAS_IOMEM=y
910CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/ddb5xxx/common/prom.c b/arch/mips/ddb5xxx/common/prom.c
index efef0f57ce1e..54a857b5e3ba 100644
--- a/arch/mips/ddb5xxx/common/prom.c
+++ b/arch/mips/ddb5xxx/common/prom.c
@@ -59,9 +59,8 @@ void __init prom_init(void)
59#endif 59#endif
60} 60}
61 61
62unsigned long __init prom_free_prom_memory(void) 62void __init prom_free_prom_memory(void)
63{ 63{
64 return 0;
65} 64}
66 65
67#if defined(CONFIG_DDB5477) 66#if defined(CONFIG_DDB5477)
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index a8bd2e66705c..2b23234a5b95 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -17,6 +17,7 @@
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18 18
19#include <asm/i8259.h> 19#include <asm/i8259.h>
20#include <asm/irq_cpu.h>
20#include <asm/system.h> 21#include <asm/system.h>
21#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
22#include <asm/debug.h> 23#include <asm/debug.h>
@@ -73,7 +74,6 @@ set_pci_int_attr(u32 pci, u32 intn, u32 active, u32 trigger)
73} 74}
74 75
75extern void vrc5477_irq_init(u32 base); 76extern void vrc5477_irq_init(u32 base);
76extern void mips_cpu_irq_init(u32 base);
77static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; 77static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
78 78
79void __init arch_init_irq(void) 79void __init arch_init_irq(void)
@@ -125,7 +125,7 @@ void __init arch_init_irq(void)
125 125
126 /* init all controllers */ 126 /* init all controllers */
127 init_i8259_irqs(); 127 init_i8259_irqs();
128 mips_cpu_irq_init(CPU_IRQ_BASE); 128 mips_cpu_irq_init();
129 vrc5477_irq_init(VRC5477_IRQ_BASE); 129 vrc5477_irq_init(VRC5477_IRQ_BASE);
130 130
131 131
@@ -146,8 +146,7 @@ u8 i8259_interrupt_ack(void)
146 irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE); 146 irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE);
147 ddb_out32(DDB_PCIINIT10, reg); 147 ddb_out32(DDB_PCIINIT10, reg);
148 148
149 /* i8259.c set the base vector to be 0x0 */ 149 return irq;
150 return irq + I8259_IRQ_BASE;
151} 150}
152/* 151/*
153 * the first level int-handler will jump here if it is a vrc5477 irq 152 * the first level int-handler will jump here if it is a vrc5477 irq
@@ -177,7 +176,7 @@ static void vrc5477_irq_dispatch(void)
177 /* check for i8259 interrupts */ 176 /* check for i8259 interrupts */
178 if (intStatus & (1 << VRC5477_I8259_CASCADE)) { 177 if (intStatus & (1 << VRC5477_I8259_CASCADE)) {
179 int i8259_irq = i8259_interrupt_ack(); 178 int i8259_irq = i8259_interrupt_ack();
180 do_IRQ(I8259_IRQ_BASE + i8259_irq); 179 do_IRQ(i8259_irq);
181 return; 180 return;
182 } 181 }
183 } 182 }
diff --git a/arch/mips/ddb5xxx/ddb5477/irq_5477.c b/arch/mips/ddb5xxx/ddb5477/irq_5477.c
index 96249aa5df5d..98c3b15eb369 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq_5477.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq_5477.c
@@ -82,7 +82,7 @@ vrc5477_irq_end(unsigned int irq)
82} 82}
83 83
84struct irq_chip vrc5477_irq_controller = { 84struct irq_chip vrc5477_irq_controller = {
85 .typename = "vrc5477_irq", 85 .name = "vrc5477_irq",
86 .ack = vrc5477_irq_ack, 86 .ack = vrc5477_irq_ack,
87 .mask = vrc5477_irq_disable, 87 .mask = vrc5477_irq_disable,
88 .mask_ack = vrc5477_irq_ack, 88 .mask_ack = vrc5477_irq_ack,
diff --git a/arch/mips/dec/Makefile b/arch/mips/dec/Makefile
index ed181fdc3ac9..8b790c2900d5 100644
--- a/arch/mips/dec/Makefile
+++ b/arch/mips/dec/Makefile
@@ -6,6 +6,7 @@ obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \
6 kn02-irq.o kn02xa-berr.o reset.o setup.o time.o 6 kn02-irq.o kn02xa-berr.o reset.o setup.o time.o
7 7
8obj-$(CONFIG_PROM_CONSOLE) += promcon.o 8obj-$(CONFIG_PROM_CONSOLE) += promcon.o
9obj-$(CONFIG_TC) += tc.o
9obj-$(CONFIG_CPU_HAS_WB) += wbflush.o 10obj-$(CONFIG_CPU_HAS_WB) += wbflush.o
10 11
11EXTRA_AFLAGS := $(CFLAGS) 12EXTRA_AFLAGS := $(CFLAGS)
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index b251ef864c33..00cecdcc75f2 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -264,9 +264,6 @@
264 srlv t3,t1,t2 264 srlv t3,t1,t2
265 265
266handle_it: 266handle_it:
267 LONG_L s0, TI_REGS($28)
268 LONG_S sp, TI_REGS($28)
269 PTR_LA ra, ret_from_irq
270 j dec_irq_dispatch 267 j dec_irq_dispatch
271 nop 268 nop
272 269
@@ -277,7 +274,6 @@ fpu:
277#endif 274#endif
278 275
279spurious: 276spurious:
280 PTR_LA ra, _ret_from_irq
281 j spurious_interrupt 277 j spurious_interrupt
282 nop 278 nop
283 END(plat_irq_dispatch) 279 END(plat_irq_dispatch)
diff --git a/arch/mips/dec/ioasic-irq.c b/arch/mips/dec/ioasic-irq.c
index 4c7cb4048d35..3acb133668dc 100644
--- a/arch/mips/dec/ioasic-irq.c
+++ b/arch/mips/dec/ioasic-irq.c
@@ -62,7 +62,7 @@ static inline void end_ioasic_irq(unsigned int irq)
62} 62}
63 63
64static struct irq_chip ioasic_irq_type = { 64static struct irq_chip ioasic_irq_type = {
65 .typename = "IO-ASIC", 65 .name = "IO-ASIC",
66 .ack = ack_ioasic_irq, 66 .ack = ack_ioasic_irq,
67 .mask = mask_ioasic_irq, 67 .mask = mask_ioasic_irq,
68 .mask_ack = ack_ioasic_irq, 68 .mask_ack = ack_ioasic_irq,
@@ -84,7 +84,7 @@ static inline void end_ioasic_dma_irq(unsigned int irq)
84} 84}
85 85
86static struct irq_chip ioasic_dma_irq_type = { 86static struct irq_chip ioasic_dma_irq_type = {
87 .typename = "IO-ASIC-DMA", 87 .name = "IO-ASIC-DMA",
88 .ack = ack_ioasic_dma_irq, 88 .ack = ack_ioasic_dma_irq,
89 .mask = mask_ioasic_dma_irq, 89 .mask = mask_ioasic_dma_irq,
90 .mask_ack = ack_ioasic_dma_irq, 90 .mask_ack = ack_ioasic_dma_irq,
diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c
index 916e46b8ccd8..02439dc0ba83 100644
--- a/arch/mips/dec/kn02-irq.c
+++ b/arch/mips/dec/kn02-irq.c
@@ -58,7 +58,7 @@ static void ack_kn02_irq(unsigned int irq)
58} 58}
59 59
60static struct irq_chip kn02_irq_type = { 60static struct irq_chip kn02_irq_type = {
61 .typename = "KN02-CSR", 61 .name = "KN02-CSR",
62 .ack = ack_kn02_irq, 62 .ack = ack_kn02_irq,
63 .mask = mask_kn02_irq, 63 .mask = mask_kn02_irq,
64 .mask_ack = ack_kn02_irq, 64 .mask_ack = ack_kn02_irq,
diff --git a/arch/mips/dec/prom/identify.c b/arch/mips/dec/prom/identify.c
index 81d5e878ddce..c4e3c1ea0d48 100644
--- a/arch/mips/dec/prom/identify.c
+++ b/arch/mips/dec/prom/identify.c
@@ -88,6 +88,7 @@ static inline void prom_init_kn02(void)
88{ 88{
89 dec_kn_slot_base = KN02_SLOT_BASE; 89 dec_kn_slot_base = KN02_SLOT_BASE;
90 dec_kn_slot_size = KN02_SLOT_SIZE; 90 dec_kn_slot_size = KN02_SLOT_SIZE;
91 dec_tc_bus = 1;
91 92
92 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + KN02_RTC); 93 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + KN02_RTC);
93} 94}
@@ -96,6 +97,7 @@ static inline void prom_init_kn02xa(void)
96{ 97{
97 dec_kn_slot_base = KN02XA_SLOT_BASE; 98 dec_kn_slot_base = KN02XA_SLOT_BASE;
98 dec_kn_slot_size = IOASIC_SLOT_SIZE; 99 dec_kn_slot_size = IOASIC_SLOT_SIZE;
100 dec_tc_bus = 1;
99 101
100 ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL); 102 ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL);
101 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY); 103 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY);
@@ -105,6 +107,7 @@ static inline void prom_init_kn03(void)
105{ 107{
106 dec_kn_slot_base = KN03_SLOT_BASE; 108 dec_kn_slot_base = KN03_SLOT_BASE;
107 dec_kn_slot_size = IOASIC_SLOT_SIZE; 109 dec_kn_slot_size = IOASIC_SLOT_SIZE;
110 dec_tc_bus = 1;
108 111
109 ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL); 112 ioasic_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_IOCTL);
110 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY); 113 dec_rtc_base = (void *)CKSEG1ADDR(dec_kn_slot_base + IOASIC_TOY);
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 3aa01d268f2d..5a557e268f78 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -92,9 +92,9 @@ void __init prom_meminit(u32 magic)
92 rex_setup_memory_region(); 92 rex_setup_memory_region();
93} 93}
94 94
95unsigned long __init prom_free_prom_memory(void) 95void __init prom_free_prom_memory(void)
96{ 96{
97 unsigned long addr, end; 97 unsigned long end;
98 98
99 /* 99 /*
100 * Free everything below the kernel itself but leave 100 * Free everything below the kernel itself but leave
@@ -114,16 +114,5 @@ unsigned long __init prom_free_prom_memory(void)
114#endif 114#endif
115 end = __pa(&_text); 115 end = __pa(&_text);
116 116
117 addr = PAGE_SIZE; 117 free_init_pages("unused PROM memory", PAGE_SIZE, end);
118 while (addr < end) {
119 ClearPageReserved(virt_to_page(__va(addr)));
120 init_page_count(virt_to_page(__va(addr)));
121 free_page((unsigned long)__va(addr));
122 addr += PAGE_SIZE;
123 }
124
125 printk("Freeing unused PROM memory: %ldkb freed\n",
126 (end - PAGE_SIZE) >> 10);
127
128 return end - PAGE_SIZE;
129} 118}
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index d34032ac492a..b8a5e75ba0ab 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -53,6 +53,8 @@ unsigned long dec_kn_slot_base, dec_kn_slot_size;
53EXPORT_SYMBOL(dec_kn_slot_base); 53EXPORT_SYMBOL(dec_kn_slot_base);
54EXPORT_SYMBOL(dec_kn_slot_size); 54EXPORT_SYMBOL(dec_kn_slot_size);
55 55
56int dec_tc_bus;
57
56spinlock_t ioasic_ssr_lock; 58spinlock_t ioasic_ssr_lock;
57 59
58volatile u32 *ioasic_base; 60volatile u32 *ioasic_base;
@@ -234,7 +236,7 @@ static void __init dec_init_kn01(void)
234 memcpy(&cpu_mask_nr_tbl, &kn01_cpu_mask_nr_tbl, 236 memcpy(&cpu_mask_nr_tbl, &kn01_cpu_mask_nr_tbl,
235 sizeof(kn01_cpu_mask_nr_tbl)); 237 sizeof(kn01_cpu_mask_nr_tbl));
236 238
237 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 239 mips_cpu_irq_init();
238 240
239} /* dec_init_kn01 */ 241} /* dec_init_kn01 */
240 242
@@ -309,7 +311,7 @@ static void __init dec_init_kn230(void)
309 memcpy(&cpu_mask_nr_tbl, &kn230_cpu_mask_nr_tbl, 311 memcpy(&cpu_mask_nr_tbl, &kn230_cpu_mask_nr_tbl,
310 sizeof(kn230_cpu_mask_nr_tbl)); 312 sizeof(kn230_cpu_mask_nr_tbl));
311 313
312 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 314 mips_cpu_irq_init();
313 315
314} /* dec_init_kn230 */ 316} /* dec_init_kn230 */
315 317
@@ -403,7 +405,7 @@ static void __init dec_init_kn02(void)
403 memcpy(&asic_mask_nr_tbl, &kn02_asic_mask_nr_tbl, 405 memcpy(&asic_mask_nr_tbl, &kn02_asic_mask_nr_tbl,
404 sizeof(kn02_asic_mask_nr_tbl)); 406 sizeof(kn02_asic_mask_nr_tbl));
405 407
406 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 408 mips_cpu_irq_init();
407 init_kn02_irqs(KN02_IRQ_BASE); 409 init_kn02_irqs(KN02_IRQ_BASE);
408 410
409} /* dec_init_kn02 */ 411} /* dec_init_kn02 */
@@ -504,7 +506,7 @@ static void __init dec_init_kn02ba(void)
504 memcpy(&asic_mask_nr_tbl, &kn02ba_asic_mask_nr_tbl, 506 memcpy(&asic_mask_nr_tbl, &kn02ba_asic_mask_nr_tbl,
505 sizeof(kn02ba_asic_mask_nr_tbl)); 507 sizeof(kn02ba_asic_mask_nr_tbl));
506 508
507 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 509 mips_cpu_irq_init();
508 init_ioasic_irqs(IO_IRQ_BASE); 510 init_ioasic_irqs(IO_IRQ_BASE);
509 511
510} /* dec_init_kn02ba */ 512} /* dec_init_kn02ba */
@@ -601,7 +603,7 @@ static void __init dec_init_kn02ca(void)
601 memcpy(&asic_mask_nr_tbl, &kn02ca_asic_mask_nr_tbl, 603 memcpy(&asic_mask_nr_tbl, &kn02ca_asic_mask_nr_tbl,
602 sizeof(kn02ca_asic_mask_nr_tbl)); 604 sizeof(kn02ca_asic_mask_nr_tbl));
603 605
604 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 606 mips_cpu_irq_init();
605 init_ioasic_irqs(IO_IRQ_BASE); 607 init_ioasic_irqs(IO_IRQ_BASE);
606 608
607} /* dec_init_kn02ca */ 609} /* dec_init_kn02ca */
@@ -702,7 +704,7 @@ static void __init dec_init_kn03(void)
702 memcpy(&asic_mask_nr_tbl, &kn03_asic_mask_nr_tbl, 704 memcpy(&asic_mask_nr_tbl, &kn03_asic_mask_nr_tbl,
703 sizeof(kn03_asic_mask_nr_tbl)); 705 sizeof(kn03_asic_mask_nr_tbl));
704 706
705 mips_cpu_irq_init(DEC_CPU_IRQ_BASE); 707 mips_cpu_irq_init();
706 init_ioasic_irqs(IO_IRQ_BASE); 708 init_ioasic_irqs(IO_IRQ_BASE);
707 709
708} /* dec_init_kn03 */ 710} /* dec_init_kn03 */
diff --git a/arch/mips/dec/tc.c b/arch/mips/dec/tc.c
new file mode 100644
index 000000000000..732027c79834
--- /dev/null
+++ b/arch/mips/dec/tc.c
@@ -0,0 +1,95 @@
1/*
2 * TURBOchannel architecture calls.
3 *
4 * Copyright (c) Harald Koerfgen, 1998
5 * Copyright (c) 2001, 2003, 2005, 2006 Maciej W. Rozycki
6 * Copyright (c) 2005 James Simmons
7 *
8 * This file is subject to the terms and conditions of the GNU
9 * General Public License. See the file "COPYING" in the main
10 * directory of this archive for more details.
11 */
12#include <linux/compiler.h>
13#include <linux/errno.h>
14#include <linux/init.h>
15#include <linux/string.h>
16#include <linux/tc.h>
17#include <linux/types.h>
18
19#include <asm/addrspace.h>
20#include <asm/bootinfo.h>
21#include <asm/paccess.h>
22
23#include <asm/dec/interrupts.h>
24#include <asm/dec/prom.h>
25#include <asm/dec/system.h>
26
27/*
28 * Protected read byte from TURBOchannel slot space.
29 */
30int tc_preadb(u8 *valp, void __iomem *addr)
31{
32 return get_dbe(*valp, (u8 *)addr);
33}
34
35/*
36 * Get TURBOchannel bus information as specified by the spec, plus
37 * the slot space base address and the number of slots.
38 */
39int __init tc_bus_get_info(struct tc_bus *tbus)
40{
41 if (!dec_tc_bus)
42 return -ENXIO;
43
44 memcpy(&tbus->info, rex_gettcinfo(), sizeof(tbus->info));
45 tbus->slot_base = CPHYSADDR((long)rex_slot_address(0));
46
47 switch (mips_machtype) {
48 case MACH_DS5000_200:
49 tbus->num_tcslots = 7;
50 break;
51 case MACH_DS5000_2X0:
52 case MACH_DS5900:
53 tbus->ext_slot_base = 0x20000000;
54 tbus->ext_slot_size = 0x20000000;
55 /* fall through */
56 case MACH_DS5000_1XX:
57 tbus->num_tcslots = 3;
58 break;
59 case MACH_DS5000_XX:
60 tbus->num_tcslots = 2;
61 default:
62 break;
63 }
64 return 0;
65}
66
67/*
68 * Get the IRQ for the specified slot.
69 */
70void __init tc_device_get_irq(struct tc_dev *tdev)
71{
72 switch (tdev->slot) {
73 case 0:
74 tdev->interrupt = dec_interrupt[DEC_IRQ_TC0];
75 break;
76 case 1:
77 tdev->interrupt = dec_interrupt[DEC_IRQ_TC1];
78 break;
79 case 2:
80 tdev->interrupt = dec_interrupt[DEC_IRQ_TC2];
81 break;
82 /*
83 * Yuck! DS5000/200 onboard devices
84 */
85 case 5:
86 tdev->interrupt = dec_interrupt[DEC_IRQ_TC5];
87 break;
88 case 6:
89 tdev->interrupt = dec_interrupt[DEC_IRQ_TC6];
90 break;
91 default:
92 tdev->interrupt = -1;
93 break;
94 }
95}
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index f9812d1e4579..8cb8f5919194 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.20
4# Thu Jul 6 10:04:10 2006 4# Tue Feb 20 21:47:14 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_ZONE_DMA=y
11# CONFIG_MIPS_MTX1 is not set 12# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set 13# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set 14# CONFIG_MIPS_PB1000 is not set
@@ -25,8 +26,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 28# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 29# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 30# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 31# CONFIG_MIPS_ATLAS is not set
@@ -42,6 +41,7 @@ CONFIG_MIPS=y
42# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set 42# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
46# CONFIG_MACH_VR41XX is not set 46# CONFIG_MACH_VR41XX is not set
47# CONFIG_PMC_YOSEMITE is not set 47# CONFIG_PMC_YOSEMITE is not set
@@ -64,13 +64,18 @@ CONFIG_SGI_IP22=y
64# CONFIG_TOSHIBA_RBTX4927 is not set 64# CONFIG_TOSHIBA_RBTX4927 is not set
65# CONFIG_TOSHIBA_RBTX4938 is not set 65# CONFIG_TOSHIBA_RBTX4938 is not set
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 66CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_GENERIC_FIND_NEXT_BIT=y 69CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 70CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 71CONFIG_GENERIC_CALIBRATE_DELAY=y
72CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 73CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
71CONFIG_ARC=y 75CONFIG_ARC=y
72CONFIG_DMA_NONCOHERENT=y 76CONFIG_DMA_NONCOHERENT=y
73CONFIG_DMA_NEED_PCI_MAP_STATE=y 77CONFIG_DMA_NEED_PCI_MAP_STATE=y
78CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
74CONFIG_CPU_BIG_ENDIAN=y 79CONFIG_CPU_BIG_ENDIAN=y
75# CONFIG_CPU_LITTLE_ENDIAN is not set 80# CONFIG_CPU_LITTLE_ENDIAN is not set
76CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 81CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
@@ -123,8 +128,8 @@ CONFIG_PAGE_SIZE_4KB=y
123CONFIG_BOARD_SCACHE=y 128CONFIG_BOARD_SCACHE=y
124CONFIG_IP22_CPU_SCACHE=y 129CONFIG_IP22_CPU_SCACHE=y
125CONFIG_MIPS_MT_DISABLED=y 130CONFIG_MIPS_MT_DISABLED=y
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_MT_SMP is not set 131# CONFIG_MIPS_MT_SMP is not set
132# CONFIG_MIPS_MT_SMTC is not set
128# CONFIG_MIPS_VPE_LOADER is not set 133# CONFIG_MIPS_VPE_LOADER is not set
129# CONFIG_64BIT_PHYS_ADDR is not set 134# CONFIG_64BIT_PHYS_ADDR is not set
130CONFIG_CPU_HAS_LLSC=y 135CONFIG_CPU_HAS_LLSC=y
@@ -141,6 +146,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
141# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
142CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
143# CONFIG_RESOURCES_64BIT is not set 148# CONFIG_RESOURCES_64BIT is not set
149CONFIG_ZONE_DMA_FLAG=1
144# CONFIG_HZ_48 is not set 150# CONFIG_HZ_48 is not set
145# CONFIG_HZ_100 is not set 151# CONFIG_HZ_100 is not set
146# CONFIG_HZ_128 is not set 152# CONFIG_HZ_128 is not set
@@ -153,6 +159,7 @@ CONFIG_HZ=1000
153# CONFIG_PREEMPT_NONE is not set 159# CONFIG_PREEMPT_NONE is not set
154CONFIG_PREEMPT_VOLUNTARY=y 160CONFIG_PREEMPT_VOLUNTARY=y
155# CONFIG_PREEMPT is not set 161# CONFIG_PREEMPT is not set
162# CONFIG_KEXEC is not set
156CONFIG_LOCKDEP_SUPPORT=y 163CONFIG_LOCKDEP_SUPPORT=y
157CONFIG_STACKTRACE_SUPPORT=y 164CONFIG_STACKTRACE_SUPPORT=y
158CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 165CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -171,16 +178,21 @@ CONFIG_LOCALVERSION=""
171CONFIG_LOCALVERSION_AUTO=y 178CONFIG_LOCALVERSION_AUTO=y
172CONFIG_SWAP=y 179CONFIG_SWAP=y
173CONFIG_SYSVIPC=y 180CONFIG_SYSVIPC=y
181# CONFIG_IPC_NS is not set
182CONFIG_SYSVIPC_SYSCTL=y
174# CONFIG_POSIX_MQUEUE is not set 183# CONFIG_POSIX_MQUEUE is not set
175# CONFIG_BSD_PROCESS_ACCT is not set 184# CONFIG_BSD_PROCESS_ACCT is not set
176CONFIG_SYSCTL=y 185# CONFIG_TASKSTATS is not set
186# CONFIG_UTS_NS is not set
177# CONFIG_AUDIT is not set 187# CONFIG_AUDIT is not set
178CONFIG_IKCONFIG=y 188CONFIG_IKCONFIG=y
179CONFIG_IKCONFIG_PROC=y 189CONFIG_IKCONFIG_PROC=y
190CONFIG_SYSFS_DEPRECATED=y
180CONFIG_RELAY=y 191CONFIG_RELAY=y
181CONFIG_INITRAMFS_SOURCE=""
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 192# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
193CONFIG_SYSCTL=y
183CONFIG_EMBEDDED=y 194CONFIG_EMBEDDED=y
195CONFIG_SYSCTL_SYSCALL=y
184CONFIG_KALLSYMS=y 196CONFIG_KALLSYMS=y
185# CONFIG_KALLSYMS_EXTRA_PASS is not set 197# CONFIG_KALLSYMS_EXTRA_PASS is not set
186# CONFIG_HOTPLUG is not set 198# CONFIG_HOTPLUG is not set
@@ -188,12 +200,12 @@ CONFIG_PRINTK=y
188CONFIG_BUG=y 200CONFIG_BUG=y
189CONFIG_ELF_CORE=y 201CONFIG_ELF_CORE=y
190CONFIG_BASE_FULL=y 202CONFIG_BASE_FULL=y
191CONFIG_RT_MUTEXES=y
192CONFIG_FUTEX=y 203CONFIG_FUTEX=y
193CONFIG_EPOLL=y 204CONFIG_EPOLL=y
194CONFIG_SHMEM=y 205CONFIG_SHMEM=y
195CONFIG_SLAB=y 206CONFIG_SLAB=y
196CONFIG_VM_EVENT_COUNTERS=y 207CONFIG_VM_EVENT_COUNTERS=y
208CONFIG_RT_MUTEXES=y
197# CONFIG_TINY_SHMEM is not set 209# CONFIG_TINY_SHMEM is not set
198CONFIG_BASE_SMALL=0 210CONFIG_BASE_SMALL=0
199# CONFIG_SLOB is not set 211# CONFIG_SLOB is not set
@@ -211,6 +223,7 @@ CONFIG_KMOD=y
211# 223#
212# Block layer 224# Block layer
213# 225#
226CONFIG_BLOCK=y
214# CONFIG_LBD is not set 227# CONFIG_LBD is not set
215# CONFIG_BLK_DEV_IO_TRACE is not set 228# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_LSF is not set 229# CONFIG_LSF is not set
@@ -238,7 +251,6 @@ CONFIG_MMU=y
238# 251#
239# PCCARD (PCMCIA/CardBus) support 252# PCCARD (PCMCIA/CardBus) support
240# 253#
241# CONFIG_PCCARD is not set
242 254
243# 255#
244# PCI Hotplug Support 256# PCI Hotplug Support
@@ -252,6 +264,14 @@ CONFIG_BINFMT_MISC=m
252CONFIG_TRAD_SIGNALS=y 264CONFIG_TRAD_SIGNALS=y
253 265
254# 266#
267# Power management options
268#
269CONFIG_PM=y
270# CONFIG_PM_LEGACY is not set
271# CONFIG_PM_DEBUG is not set
272# CONFIG_PM_SYSFS_DEPRECATED is not set
273
274#
255# Networking 275# Networking
256# 276#
257CONFIG_NET=y 277CONFIG_NET=y
@@ -265,7 +285,10 @@ CONFIG_PACKET_MMAP=y
265CONFIG_UNIX=y 285CONFIG_UNIX=y
266CONFIG_XFRM=y 286CONFIG_XFRM=y
267CONFIG_XFRM_USER=m 287CONFIG_XFRM_USER=m
288# CONFIG_XFRM_SUB_POLICY is not set
289CONFIG_XFRM_MIGRATE=y
268CONFIG_NET_KEY=y 290CONFIG_NET_KEY=y
291CONFIG_NET_KEY_MIGRATE=y
269CONFIG_INET=y 292CONFIG_INET=y
270CONFIG_IP_MULTICAST=y 293CONFIG_IP_MULTICAST=y
271# CONFIG_IP_ADVANCED_ROUTER is not set 294# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -286,10 +309,13 @@ CONFIG_INET_XFRM_TUNNEL=m
286CONFIG_INET_TUNNEL=m 309CONFIG_INET_TUNNEL=m
287CONFIG_INET_XFRM_MODE_TRANSPORT=m 310CONFIG_INET_XFRM_MODE_TRANSPORT=m
288CONFIG_INET_XFRM_MODE_TUNNEL=m 311CONFIG_INET_XFRM_MODE_TUNNEL=m
312CONFIG_INET_XFRM_MODE_BEET=m
289CONFIG_INET_DIAG=y 313CONFIG_INET_DIAG=y
290CONFIG_INET_TCP_DIAG=y 314CONFIG_INET_TCP_DIAG=y
291# CONFIG_TCP_CONG_ADVANCED is not set 315# CONFIG_TCP_CONG_ADVANCED is not set
292CONFIG_TCP_CONG_BIC=y 316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318CONFIG_TCP_MD5SIG=y
293 319
294# 320#
295# IP: Virtual Server Configuration 321# IP: Virtual Server Configuration
@@ -331,11 +357,17 @@ CONFIG_IPV6_ROUTE_INFO=y
331CONFIG_INET6_AH=m 357CONFIG_INET6_AH=m
332CONFIG_INET6_ESP=m 358CONFIG_INET6_ESP=m
333CONFIG_INET6_IPCOMP=m 359CONFIG_INET6_IPCOMP=m
360CONFIG_IPV6_MIP6=y
334CONFIG_INET6_XFRM_TUNNEL=m 361CONFIG_INET6_XFRM_TUNNEL=m
335CONFIG_INET6_TUNNEL=m 362CONFIG_INET6_TUNNEL=m
336CONFIG_INET6_XFRM_MODE_TRANSPORT=m 363CONFIG_INET6_XFRM_MODE_TRANSPORT=m
337CONFIG_INET6_XFRM_MODE_TUNNEL=m 364CONFIG_INET6_XFRM_MODE_TUNNEL=m
365CONFIG_INET6_XFRM_MODE_BEET=m
366CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
367CONFIG_IPV6_SIT=m
338CONFIG_IPV6_TUNNEL=m 368CONFIG_IPV6_TUNNEL=m
369CONFIG_IPV6_MULTIPLE_TABLES=y
370CONFIG_IPV6_SUBTREES=y
339CONFIG_NETWORK_SECMARK=y 371CONFIG_NETWORK_SECMARK=y
340CONFIG_NETFILTER=y 372CONFIG_NETFILTER=y
341# CONFIG_NETFILTER_DEBUG is not set 373# CONFIG_NETFILTER_DEBUG is not set
@@ -346,19 +378,43 @@ CONFIG_NETFILTER=y
346CONFIG_NETFILTER_NETLINK=m 378CONFIG_NETFILTER_NETLINK=m
347CONFIG_NETFILTER_NETLINK_QUEUE=m 379CONFIG_NETFILTER_NETLINK_QUEUE=m
348CONFIG_NETFILTER_NETLINK_LOG=m 380CONFIG_NETFILTER_NETLINK_LOG=m
381CONFIG_NF_CONNTRACK_ENABLED=m
382CONFIG_NF_CONNTRACK_SUPPORT=y
383# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
384CONFIG_NF_CONNTRACK=m
385CONFIG_NF_CT_ACCT=y
386CONFIG_NF_CONNTRACK_MARK=y
387CONFIG_NF_CONNTRACK_SECMARK=y
388CONFIG_NF_CONNTRACK_EVENTS=y
389CONFIG_NF_CT_PROTO_GRE=m
390CONFIG_NF_CT_PROTO_SCTP=m
391CONFIG_NF_CONNTRACK_AMANDA=m
392CONFIG_NF_CONNTRACK_FTP=m
393CONFIG_NF_CONNTRACK_H323=m
394CONFIG_NF_CONNTRACK_IRC=m
395# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
396CONFIG_NF_CONNTRACK_PPTP=m
397CONFIG_NF_CONNTRACK_SANE=m
398CONFIG_NF_CONNTRACK_SIP=m
399CONFIG_NF_CONNTRACK_TFTP=m
400CONFIG_NF_CT_NETLINK=m
349CONFIG_NETFILTER_XTABLES=m 401CONFIG_NETFILTER_XTABLES=m
350CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 402CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
351CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 403CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
404CONFIG_NETFILTER_XT_TARGET_DSCP=m
352CONFIG_NETFILTER_XT_TARGET_MARK=m 405CONFIG_NETFILTER_XT_TARGET_MARK=m
353CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 406CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
407CONFIG_NETFILTER_XT_TARGET_NFLOG=m
354CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 408CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
355CONFIG_NETFILTER_XT_TARGET_SECMARK=m 409CONFIG_NETFILTER_XT_TARGET_SECMARK=m
356CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 410CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
411CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
357CONFIG_NETFILTER_XT_MATCH_COMMENT=m 412CONFIG_NETFILTER_XT_MATCH_COMMENT=m
358CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 413CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
359CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 414CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
360CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 415CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
361CONFIG_NETFILTER_XT_MATCH_DCCP=m 416CONFIG_NETFILTER_XT_MATCH_DCCP=m
417CONFIG_NETFILTER_XT_MATCH_DSCP=m
362CONFIG_NETFILTER_XT_MATCH_ESP=m 418CONFIG_NETFILTER_XT_MATCH_ESP=m
363CONFIG_NETFILTER_XT_MATCH_HELPER=m 419CONFIG_NETFILTER_XT_MATCH_HELPER=m
364CONFIG_NETFILTER_XT_MATCH_LENGTH=m 420CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -375,60 +431,45 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
375CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 431CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
376CONFIG_NETFILTER_XT_MATCH_STRING=m 432CONFIG_NETFILTER_XT_MATCH_STRING=m
377CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 433CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
434CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
378 435
379# 436#
380# IP: Netfilter Configuration 437# IP: Netfilter Configuration
381# 438#
382CONFIG_IP_NF_CONNTRACK=m 439CONFIG_NF_CONNTRACK_IPV4=m
383CONFIG_IP_NF_CT_ACCT=y 440CONFIG_NF_CONNTRACK_PROC_COMPAT=y
384CONFIG_IP_NF_CONNTRACK_MARK=y
385CONFIG_IP_NF_CONNTRACK_SECMARK=y
386CONFIG_IP_NF_CONNTRACK_EVENTS=y
387CONFIG_IP_NF_CONNTRACK_NETLINK=m
388# CONFIG_IP_NF_CT_PROTO_SCTP is not set
389CONFIG_IP_NF_FTP=m
390CONFIG_IP_NF_IRC=m
391# CONFIG_IP_NF_NETBIOS_NS is not set
392CONFIG_IP_NF_TFTP=m
393CONFIG_IP_NF_AMANDA=m
394CONFIG_IP_NF_PPTP=m
395CONFIG_IP_NF_H323=m
396CONFIG_IP_NF_SIP=m
397CONFIG_IP_NF_QUEUE=m 441CONFIG_IP_NF_QUEUE=m
398CONFIG_IP_NF_IPTABLES=m 442CONFIG_IP_NF_IPTABLES=m
399CONFIG_IP_NF_MATCH_IPRANGE=m 443CONFIG_IP_NF_MATCH_IPRANGE=m
400CONFIG_IP_NF_MATCH_TOS=m 444CONFIG_IP_NF_MATCH_TOS=m
401CONFIG_IP_NF_MATCH_RECENT=m 445CONFIG_IP_NF_MATCH_RECENT=m
402CONFIG_IP_NF_MATCH_ECN=m 446CONFIG_IP_NF_MATCH_ECN=m
403CONFIG_IP_NF_MATCH_DSCP=m
404CONFIG_IP_NF_MATCH_AH=m 447CONFIG_IP_NF_MATCH_AH=m
405CONFIG_IP_NF_MATCH_TTL=m 448CONFIG_IP_NF_MATCH_TTL=m
406CONFIG_IP_NF_MATCH_OWNER=m 449CONFIG_IP_NF_MATCH_OWNER=m
407CONFIG_IP_NF_MATCH_ADDRTYPE=m 450CONFIG_IP_NF_MATCH_ADDRTYPE=m
408CONFIG_IP_NF_MATCH_HASHLIMIT=m
409CONFIG_IP_NF_FILTER=m 451CONFIG_IP_NF_FILTER=m
410CONFIG_IP_NF_TARGET_REJECT=m 452CONFIG_IP_NF_TARGET_REJECT=m
411CONFIG_IP_NF_TARGET_LOG=m 453CONFIG_IP_NF_TARGET_LOG=m
412CONFIG_IP_NF_TARGET_ULOG=m 454CONFIG_IP_NF_TARGET_ULOG=m
413CONFIG_IP_NF_TARGET_TCPMSS=m 455CONFIG_NF_NAT=m
414CONFIG_IP_NF_NAT=m 456CONFIG_NF_NAT_NEEDED=y
415CONFIG_IP_NF_NAT_NEEDED=y
416CONFIG_IP_NF_TARGET_MASQUERADE=m 457CONFIG_IP_NF_TARGET_MASQUERADE=m
417CONFIG_IP_NF_TARGET_REDIRECT=m 458CONFIG_IP_NF_TARGET_REDIRECT=m
418CONFIG_IP_NF_TARGET_NETMAP=m 459CONFIG_IP_NF_TARGET_NETMAP=m
419CONFIG_IP_NF_TARGET_SAME=m 460CONFIG_IP_NF_TARGET_SAME=m
420CONFIG_IP_NF_NAT_SNMP_BASIC=m 461CONFIG_NF_NAT_SNMP_BASIC=m
421CONFIG_IP_NF_NAT_IRC=m 462CONFIG_NF_NAT_PROTO_GRE=m
422CONFIG_IP_NF_NAT_FTP=m 463CONFIG_NF_NAT_FTP=m
423CONFIG_IP_NF_NAT_TFTP=m 464CONFIG_NF_NAT_IRC=m
424CONFIG_IP_NF_NAT_AMANDA=m 465CONFIG_NF_NAT_TFTP=m
425CONFIG_IP_NF_NAT_PPTP=m 466CONFIG_NF_NAT_AMANDA=m
426CONFIG_IP_NF_NAT_H323=m 467CONFIG_NF_NAT_PPTP=m
427CONFIG_IP_NF_NAT_SIP=m 468CONFIG_NF_NAT_H323=m
469CONFIG_NF_NAT_SIP=m
428CONFIG_IP_NF_MANGLE=m 470CONFIG_IP_NF_MANGLE=m
429CONFIG_IP_NF_TARGET_TOS=m 471CONFIG_IP_NF_TARGET_TOS=m
430CONFIG_IP_NF_TARGET_ECN=m 472CONFIG_IP_NF_TARGET_ECN=m
431CONFIG_IP_NF_TARGET_DSCP=m
432CONFIG_IP_NF_TARGET_TTL=m 473CONFIG_IP_NF_TARGET_TTL=m
433CONFIG_IP_NF_TARGET_CLUSTERIP=m 474CONFIG_IP_NF_TARGET_CLUSTERIP=m
434CONFIG_IP_NF_RAW=m 475CONFIG_IP_NF_RAW=m
@@ -439,6 +480,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
439# 480#
440# IPv6: Netfilter Configuration (EXPERIMENTAL) 481# IPv6: Netfilter Configuration (EXPERIMENTAL)
441# 482#
483CONFIG_NF_CONNTRACK_IPV6=m
442CONFIG_IP6_NF_QUEUE=m 484CONFIG_IP6_NF_QUEUE=m
443CONFIG_IP6_NF_IPTABLES=m 485CONFIG_IP6_NF_IPTABLES=m
444CONFIG_IP6_NF_MATCH_RT=m 486CONFIG_IP6_NF_MATCH_RT=m
@@ -448,6 +490,7 @@ CONFIG_IP6_NF_MATCH_HL=m
448CONFIG_IP6_NF_MATCH_OWNER=m 490CONFIG_IP6_NF_MATCH_OWNER=m
449CONFIG_IP6_NF_MATCH_IPV6HEADER=m 491CONFIG_IP6_NF_MATCH_IPV6HEADER=m
450CONFIG_IP6_NF_MATCH_AH=m 492CONFIG_IP6_NF_MATCH_AH=m
493CONFIG_IP6_NF_MATCH_MH=m
451CONFIG_IP6_NF_MATCH_EUI64=m 494CONFIG_IP6_NF_MATCH_EUI64=m
452CONFIG_IP6_NF_FILTER=m 495CONFIG_IP6_NF_FILTER=m
453CONFIG_IP6_NF_TARGET_LOG=m 496CONFIG_IP6_NF_TARGET_LOG=m
@@ -484,7 +527,6 @@ CONFIG_SCTP_HMAC_MD5=y
484# CONFIG_ATALK is not set 527# CONFIG_ATALK is not set
485# CONFIG_X25 is not set 528# CONFIG_X25 is not set
486# CONFIG_LAPB is not set 529# CONFIG_LAPB is not set
487CONFIG_NET_DIVERT=y
488# CONFIG_ECONET is not set 530# CONFIG_ECONET is not set
489# CONFIG_WAN_ROUTER is not set 531# CONFIG_WAN_ROUTER is not set
490 532
@@ -492,6 +534,7 @@ CONFIG_NET_DIVERT=y
492# QoS and/or fair queueing 534# QoS and/or fair queueing
493# 535#
494CONFIG_NET_SCHED=y 536CONFIG_NET_SCHED=y
537CONFIG_NET_SCH_FIFO=y
495# CONFIG_NET_SCH_CLK_JIFFIES is not set 538# CONFIG_NET_SCH_CLK_JIFFIES is not set
496CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y 539CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
497# CONFIG_NET_SCH_CLK_CPU is not set 540# CONFIG_NET_SCH_CLK_CPU is not set
@@ -546,6 +589,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
546CONFIG_IEEE80211_SOFTMAC=m 589CONFIG_IEEE80211_SOFTMAC=m
547# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 590# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
548CONFIG_WIRELESS_EXT=y 591CONFIG_WIRELESS_EXT=y
592CONFIG_FIB_RULES=y
549 593
550# 594#
551# Device Drivers 595# Device Drivers
@@ -556,7 +600,6 @@ CONFIG_WIRELESS_EXT=y
556# 600#
557CONFIG_STANDALONE=y 601CONFIG_STANDALONE=y
558CONFIG_PREVENT_FIRMWARE_BUILD=y 602CONFIG_PREVENT_FIRMWARE_BUILD=y
559# CONFIG_FW_LOADER is not set
560# CONFIG_SYS_HYPERVISOR is not set 603# CONFIG_SYS_HYPERVISOR is not set
561 604
562# 605#
@@ -577,6 +620,7 @@ CONFIG_CONNECTOR=m
577# 620#
578# Plug and Play support 621# Plug and Play support
579# 622#
623# CONFIG_PNPACPI is not set
580 624
581# 625#
582# Block devices 626# Block devices
@@ -592,6 +636,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
592CONFIG_ATA_OVER_ETH=m 636CONFIG_ATA_OVER_ETH=m
593 637
594# 638#
639# Misc devices
640#
641
642#
595# ATA/ATAPI/MFM/RLL support 643# ATA/ATAPI/MFM/RLL support
596# 644#
597# CONFIG_IDE is not set 645# CONFIG_IDE is not set
@@ -601,6 +649,8 @@ CONFIG_ATA_OVER_ETH=m
601# 649#
602CONFIG_RAID_ATTRS=m 650CONFIG_RAID_ATTRS=m
603CONFIG_SCSI=y 651CONFIG_SCSI=y
652CONFIG_SCSI_TGT=m
653# CONFIG_SCSI_NETLINK is not set
604CONFIG_SCSI_PROC_FS=y 654CONFIG_SCSI_PROC_FS=y
605 655
606# 656#
@@ -620,24 +670,30 @@ CONFIG_CHR_DEV_SCH=m
620# CONFIG_SCSI_MULTI_LUN is not set 670# CONFIG_SCSI_MULTI_LUN is not set
621CONFIG_SCSI_CONSTANTS=y 671CONFIG_SCSI_CONSTANTS=y
622# CONFIG_SCSI_LOGGING is not set 672# CONFIG_SCSI_LOGGING is not set
673CONFIG_SCSI_SCAN_ASYNC=y
623 674
624# 675#
625# SCSI Transport Attributes 676# SCSI Transports
626# 677#
627CONFIG_SCSI_SPI_ATTRS=m 678CONFIG_SCSI_SPI_ATTRS=m
628# CONFIG_SCSI_FC_ATTRS is not set 679# CONFIG_SCSI_FC_ATTRS is not set
629CONFIG_SCSI_ISCSI_ATTRS=m 680CONFIG_SCSI_ISCSI_ATTRS=m
630CONFIG_SCSI_SAS_ATTRS=m 681CONFIG_SCSI_SAS_ATTRS=m
682# CONFIG_SCSI_SAS_LIBSAS is not set
631 683
632# 684#
633# SCSI low-level drivers 685# SCSI low-level drivers
634# 686#
635CONFIG_ISCSI_TCP=m 687CONFIG_ISCSI_TCP=m
636CONFIG_SGIWD93_SCSI=y 688CONFIG_SGIWD93_SCSI=y
637# CONFIG_SCSI_SATA is not set
638# CONFIG_SCSI_DEBUG is not set 689# CONFIG_SCSI_DEBUG is not set
639 690
640# 691#
692# Serial ATA (prod) and Parallel ATA (experimental) drivers
693#
694# CONFIG_ATA is not set
695
696#
641# Multi-device support (RAID and LVM) 697# Multi-device support (RAID and LVM)
642# 698#
643# CONFIG_MD is not set 699# CONFIG_MD is not set
@@ -679,6 +735,8 @@ CONFIG_LXT_PHY=m
679CONFIG_CICADA_PHY=m 735CONFIG_CICADA_PHY=m
680# CONFIG_VITESSE_PHY is not set 736# CONFIG_VITESSE_PHY is not set
681# CONFIG_SMSC_PHY is not set 737# CONFIG_SMSC_PHY is not set
738# CONFIG_BROADCOM_PHY is not set
739# CONFIG_FIXED_PHY is not set
682 740
683# 741#
684# Ethernet (10 or 100Mbit) 742# Ethernet (10 or 100Mbit)
@@ -730,6 +788,7 @@ CONFIG_SGISEEQ=y
730# Input device support 788# Input device support
731# 789#
732CONFIG_INPUT=y 790CONFIG_INPUT=y
791# CONFIG_INPUT_FF_MEMLESS is not set
733 792
734# 793#
735# Userland interfaces 794# Userland interfaces
@@ -752,6 +811,7 @@ CONFIG_KEYBOARD_ATKBD=y
752# CONFIG_KEYBOARD_LKKBD is not set 811# CONFIG_KEYBOARD_LKKBD is not set
753# CONFIG_KEYBOARD_XTKBD is not set 812# CONFIG_KEYBOARD_XTKBD is not set
754# CONFIG_KEYBOARD_NEWTON is not set 813# CONFIG_KEYBOARD_NEWTON is not set
814# CONFIG_KEYBOARD_STOWAWAY is not set
755CONFIG_INPUT_MOUSE=y 815CONFIG_INPUT_MOUSE=y
756CONFIG_MOUSE_PS2=m 816CONFIG_MOUSE_PS2=m
757CONFIG_MOUSE_SERIAL=m 817CONFIG_MOUSE_SERIAL=m
@@ -815,10 +875,6 @@ CONFIG_SGI_DS1286=m
815# CONFIG_GEN_RTC is not set 875# CONFIG_GEN_RTC is not set
816# CONFIG_DTLK is not set 876# CONFIG_DTLK is not set
817# CONFIG_R3964 is not set 877# CONFIG_R3964 is not set
818
819#
820# Ftape, the floppy tape device driver
821#
822CONFIG_RAW_DRIVER=m 878CONFIG_RAW_DRIVER=m
823CONFIG_MAX_RAW_DEVS=256 879CONFIG_MAX_RAW_DEVS=256
824 880
@@ -826,7 +882,6 @@ CONFIG_MAX_RAW_DEVS=256
826# TPM devices 882# TPM devices
827# 883#
828# CONFIG_TCG_TPM is not set 884# CONFIG_TCG_TPM is not set
829# CONFIG_TELCLOCK is not set
830 885
831# 886#
832# I2C support 887# I2C support
@@ -851,14 +906,9 @@ CONFIG_MAX_RAW_DEVS=256
851# CONFIG_HWMON_VID is not set 906# CONFIG_HWMON_VID is not set
852 907
853# 908#
854# Misc devices
855#
856
857#
858# Multimedia devices 909# Multimedia devices
859# 910#
860# CONFIG_VIDEO_DEV is not set 911# CONFIG_VIDEO_DEV is not set
861CONFIG_VIDEO_V4L2=y
862 912
863# 913#
864# Digital Video Broadcasting Devices 914# Digital Video Broadcasting Devices
@@ -887,6 +937,7 @@ CONFIG_LOGO=y
887# CONFIG_LOGO_LINUX_VGA16 is not set 937# CONFIG_LOGO_LINUX_VGA16 is not set
888# CONFIG_LOGO_LINUX_CLUT224 is not set 938# CONFIG_LOGO_LINUX_CLUT224 is not set
889CONFIG_LOGO_SGI_CLUT224=y 939CONFIG_LOGO_SGI_CLUT224=y
940# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
890 941
891# 942#
892# Sound 943# Sound
@@ -894,6 +945,12 @@ CONFIG_LOGO_SGI_CLUT224=y
894# CONFIG_SOUND is not set 945# CONFIG_SOUND is not set
895 946
896# 947#
948# HID Devices
949#
950CONFIG_HID=y
951# CONFIG_HID_DEBUG is not set
952
953#
897# USB support 954# USB support
898# 955#
899# CONFIG_USB_ARCH_HAS_HCD is not set 956# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -954,6 +1011,14 @@ CONFIG_LOGO_SGI_CLUT224=y
954# 1011#
955 1012
956# 1013#
1014# Auxiliary Display support
1015#
1016
1017#
1018# Virtualization
1019#
1020
1021#
957# File systems 1022# File systems
958# 1023#
959CONFIG_EXT2_FS=m 1024CONFIG_EXT2_FS=m
@@ -963,6 +1028,7 @@ CONFIG_EXT3_FS=y
963CONFIG_EXT3_FS_XATTR=y 1028CONFIG_EXT3_FS_XATTR=y
964CONFIG_EXT3_FS_POSIX_ACL=y 1029CONFIG_EXT3_FS_POSIX_ACL=y
965CONFIG_EXT3_FS_SECURITY=y 1030CONFIG_EXT3_FS_SECURITY=y
1031# CONFIG_EXT4DEV_FS is not set
966CONFIG_JBD=y 1032CONFIG_JBD=y
967# CONFIG_JBD_DEBUG is not set 1033# CONFIG_JBD_DEBUG is not set
968CONFIG_FS_MBCACHE=y 1034CONFIG_FS_MBCACHE=y
@@ -974,6 +1040,7 @@ CONFIG_XFS_QUOTA=y
974CONFIG_XFS_SECURITY=y 1040CONFIG_XFS_SECURITY=y
975# CONFIG_XFS_POSIX_ACL is not set 1041# CONFIG_XFS_POSIX_ACL is not set
976# CONFIG_XFS_RT is not set 1042# CONFIG_XFS_RT is not set
1043# CONFIG_GFS2_FS is not set
977# CONFIG_OCFS2_FS is not set 1044# CONFIG_OCFS2_FS is not set
978CONFIG_MINIX_FS=m 1045CONFIG_MINIX_FS=m
979# CONFIG_ROMFS_FS is not set 1046# CONFIG_ROMFS_FS is not set
@@ -987,6 +1054,7 @@ CONFIG_DNOTIFY=y
987CONFIG_AUTOFS_FS=m 1054CONFIG_AUTOFS_FS=m
988CONFIG_AUTOFS4_FS=m 1055CONFIG_AUTOFS4_FS=m
989CONFIG_FUSE_FS=m 1056CONFIG_FUSE_FS=m
1057CONFIG_GENERIC_ACL=y
990 1058
991# 1059#
992# CD-ROM/DVD Filesystems 1060# CD-ROM/DVD Filesystems
@@ -994,7 +1062,6 @@ CONFIG_FUSE_FS=m
994CONFIG_ISO9660_FS=m 1062CONFIG_ISO9660_FS=m
995CONFIG_JOLIET=y 1063CONFIG_JOLIET=y
996CONFIG_ZISOFS=y 1064CONFIG_ZISOFS=y
997CONFIG_ZISOFS_FS=m
998CONFIG_UDF_FS=m 1065CONFIG_UDF_FS=m
999CONFIG_UDF_NLS=y 1066CONFIG_UDF_NLS=y
1000 1067
@@ -1013,17 +1080,20 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1013# 1080#
1014CONFIG_PROC_FS=y 1081CONFIG_PROC_FS=y
1015CONFIG_PROC_KCORE=y 1082CONFIG_PROC_KCORE=y
1083CONFIG_PROC_SYSCTL=y
1016CONFIG_SYSFS=y 1084CONFIG_SYSFS=y
1017CONFIG_TMPFS=y 1085CONFIG_TMPFS=y
1086CONFIG_TMPFS_POSIX_ACL=y
1018# CONFIG_HUGETLB_PAGE is not set 1087# CONFIG_HUGETLB_PAGE is not set
1019CONFIG_RAMFS=y 1088CONFIG_RAMFS=y
1020# CONFIG_CONFIGFS_FS is not set 1089CONFIG_CONFIGFS_FS=m
1021 1090
1022# 1091#
1023# Miscellaneous filesystems 1092# Miscellaneous filesystems
1024# 1093#
1025# CONFIG_ADFS_FS is not set 1094# CONFIG_ADFS_FS is not set
1026# CONFIG_AFFS_FS is not set 1095# CONFIG_AFFS_FS is not set
1096# CONFIG_ECRYPT_FS is not set
1027# CONFIG_HFS_FS is not set 1097# CONFIG_HFS_FS is not set
1028# CONFIG_HFSPLUS_FS is not set 1098# CONFIG_HFSPLUS_FS is not set
1029# CONFIG_BEFS_FS is not set 1099# CONFIG_BEFS_FS is not set
@@ -1142,6 +1212,14 @@ CONFIG_NLS_KOI8_U=m
1142CONFIG_NLS_UTF8=m 1212CONFIG_NLS_UTF8=m
1143 1213
1144# 1214#
1215# Distributed Lock Manager
1216#
1217CONFIG_DLM=m
1218CONFIG_DLM_TCP=y
1219# CONFIG_DLM_SCTP is not set
1220# CONFIG_DLM_DEBUG is not set
1221
1222#
1145# Profiling support 1223# Profiling support
1146# 1224#
1147# CONFIG_PROFILING is not set 1225# CONFIG_PROFILING is not set
@@ -1151,11 +1229,13 @@ CONFIG_NLS_UTF8=m
1151# 1229#
1152CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1230CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1153# CONFIG_PRINTK_TIME is not set 1231# CONFIG_PRINTK_TIME is not set
1232CONFIG_ENABLE_MUST_CHECK=y
1154# CONFIG_MAGIC_SYSRQ is not set 1233# CONFIG_MAGIC_SYSRQ is not set
1155# CONFIG_UNUSED_SYMBOLS is not set 1234# CONFIG_UNUSED_SYMBOLS is not set
1235# CONFIG_DEBUG_FS is not set
1236# CONFIG_HEADERS_CHECK is not set
1156# CONFIG_DEBUG_KERNEL is not set 1237# CONFIG_DEBUG_KERNEL is not set
1157CONFIG_LOG_BUF_SHIFT=14 1238CONFIG_LOG_BUF_SHIFT=14
1158# CONFIG_DEBUG_FS is not set
1159CONFIG_CROSSCOMPILE=y 1239CONFIG_CROSSCOMPILE=y
1160CONFIG_CMDLINE="" 1240CONFIG_CMDLINE=""
1161 1241
@@ -1170,18 +1250,30 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
1170# Cryptographic options 1250# Cryptographic options
1171# 1251#
1172CONFIG_CRYPTO=y 1252CONFIG_CRYPTO=y
1253CONFIG_CRYPTO_ALGAPI=y
1254CONFIG_CRYPTO_BLKCIPHER=m
1255CONFIG_CRYPTO_HASH=y
1256CONFIG_CRYPTO_MANAGER=y
1173CONFIG_CRYPTO_HMAC=y 1257CONFIG_CRYPTO_HMAC=y
1258CONFIG_CRYPTO_XCBC=m
1174CONFIG_CRYPTO_NULL=m 1259CONFIG_CRYPTO_NULL=m
1175CONFIG_CRYPTO_MD4=m 1260CONFIG_CRYPTO_MD4=m
1176CONFIG_CRYPTO_MD5=m 1261CONFIG_CRYPTO_MD5=y
1177CONFIG_CRYPTO_SHA1=m 1262CONFIG_CRYPTO_SHA1=m
1178CONFIG_CRYPTO_SHA256=m 1263CONFIG_CRYPTO_SHA256=m
1179CONFIG_CRYPTO_SHA512=m 1264CONFIG_CRYPTO_SHA512=m
1180CONFIG_CRYPTO_WP512=m 1265CONFIG_CRYPTO_WP512=m
1181CONFIG_CRYPTO_TGR192=m 1266CONFIG_CRYPTO_TGR192=m
1267CONFIG_CRYPTO_GF128MUL=m
1268CONFIG_CRYPTO_ECB=m
1269CONFIG_CRYPTO_CBC=m
1270CONFIG_CRYPTO_PCBC=m
1271CONFIG_CRYPTO_LRW=m
1182CONFIG_CRYPTO_DES=m 1272CONFIG_CRYPTO_DES=m
1273CONFIG_CRYPTO_FCRYPT=m
1183CONFIG_CRYPTO_BLOWFISH=m 1274CONFIG_CRYPTO_BLOWFISH=m
1184CONFIG_CRYPTO_TWOFISH=m 1275CONFIG_CRYPTO_TWOFISH=m
1276CONFIG_CRYPTO_TWOFISH_COMMON=m
1185CONFIG_CRYPTO_SERPENT=m 1277CONFIG_CRYPTO_SERPENT=m
1186CONFIG_CRYPTO_AES=m 1278CONFIG_CRYPTO_AES=m
1187CONFIG_CRYPTO_CAST5=m 1279CONFIG_CRYPTO_CAST5=m
@@ -1193,6 +1285,7 @@ CONFIG_CRYPTO_ANUBIS=m
1193CONFIG_CRYPTO_DEFLATE=m 1285CONFIG_CRYPTO_DEFLATE=m
1194CONFIG_CRYPTO_MICHAEL_MIC=m 1286CONFIG_CRYPTO_MICHAEL_MIC=m
1195CONFIG_CRYPTO_CRC32C=m 1287CONFIG_CRYPTO_CRC32C=m
1288CONFIG_CRYPTO_CAMELLIA=m
1196# CONFIG_CRYPTO_TEST is not set 1289# CONFIG_CRYPTO_TEST is not set
1197 1290
1198# 1291#
@@ -1202,6 +1295,7 @@ CONFIG_CRYPTO_CRC32C=m
1202# 1295#
1203# Library routines 1296# Library routines
1204# 1297#
1298CONFIG_BITREVERSE=m
1205# CONFIG_CRC_CCITT is not set 1299# CONFIG_CRC_CCITT is not set
1206CONFIG_CRC16=m 1300CONFIG_CRC16=m
1207CONFIG_CRC32=m 1301CONFIG_CRC32=m
@@ -1213,3 +1307,5 @@ CONFIG_TEXTSEARCH_KMP=m
1213CONFIG_TEXTSEARCH_BM=m 1307CONFIG_TEXTSEARCH_BM=m
1214CONFIG_TEXTSEARCH_FSM=m 1308CONFIG_TEXTSEARCH_FSM=m
1215CONFIG_PLIST=y 1309CONFIG_PLIST=y
1310CONFIG_HAS_IOMEM=y
1311CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/emma2rh/common/irq.c b/arch/mips/emma2rh/common/irq.c
index c191b3e9d9d9..d95604773667 100644
--- a/arch/mips/emma2rh/common/irq.c
+++ b/arch/mips/emma2rh/common/irq.c
@@ -27,7 +27,6 @@
27#include <linux/irq.h> 27#include <linux/irq.h>
28#include <linux/types.h> 28#include <linux/types.h>
29 29
30#include <asm/i8259.h>
31#include <asm/system.h> 30#include <asm/system.h>
32#include <asm/mipsregs.h> 31#include <asm/mipsregs.h>
33#include <asm/debug.h> 32#include <asm/debug.h>
diff --git a/arch/mips/emma2rh/common/irq_emma2rh.c b/arch/mips/emma2rh/common/irq_emma2rh.c
index 8d880f0b06ec..96df37b77759 100644
--- a/arch/mips/emma2rh/common/irq_emma2rh.c
+++ b/arch/mips/emma2rh/common/irq_emma2rh.c
@@ -57,7 +57,7 @@ static void emma2rh_irq_disable(unsigned int irq)
57} 57}
58 58
59struct irq_chip emma2rh_irq_controller = { 59struct irq_chip emma2rh_irq_controller = {
60 .typename = "emma2rh_irq", 60 .name = "emma2rh_irq",
61 .ack = emma2rh_irq_disable, 61 .ack = emma2rh_irq_disable,
62 .mask = emma2rh_irq_disable, 62 .mask = emma2rh_irq_disable,
63 .mask_ack = emma2rh_irq_disable, 63 .mask_ack = emma2rh_irq_disable,
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c
index c93369cb4115..e26630026375 100644
--- a/arch/mips/emma2rh/markeins/irq.c
+++ b/arch/mips/emma2rh/markeins/irq.c
@@ -29,7 +29,6 @@
29#include <linux/ptrace.h> 29#include <linux/ptrace.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31 31
32#include <asm/i8259.h>
33#include <asm/irq_cpu.h> 32#include <asm/irq_cpu.h>
34#include <asm/system.h> 33#include <asm/system.h>
35#include <asm/mipsregs.h> 34#include <asm/mipsregs.h>
@@ -106,7 +105,7 @@ void __init arch_init_irq(void)
106 emma2rh_irq_init(EMMA2RH_IRQ_BASE); 105 emma2rh_irq_init(EMMA2RH_IRQ_BASE);
107 emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE); 106 emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE);
108 emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE); 107 emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE);
109 mips_cpu_irq_init(CPU_IRQ_BASE); 108 mips_cpu_irq_init();
110 109
111 /* setup cascade interrupts */ 110 /* setup cascade interrupts */
112 setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade); 111 setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
diff --git a/arch/mips/emma2rh/markeins/irq_markeins.c b/arch/mips/emma2rh/markeins/irq_markeins.c
index 2116d9be5fa9..fba5c156f472 100644
--- a/arch/mips/emma2rh/markeins/irq_markeins.c
+++ b/arch/mips/emma2rh/markeins/irq_markeins.c
@@ -49,7 +49,7 @@ static void emma2rh_sw_irq_disable(unsigned int irq)
49} 49}
50 50
51struct irq_chip emma2rh_sw_irq_controller = { 51struct irq_chip emma2rh_sw_irq_controller = {
52 .typename = "emma2rh_sw_irq", 52 .name = "emma2rh_sw_irq",
53 .ack = emma2rh_sw_irq_disable, 53 .ack = emma2rh_sw_irq_disable,
54 .mask = emma2rh_sw_irq_disable, 54 .mask = emma2rh_sw_irq_disable,
55 .mask_ack = emma2rh_sw_irq_disable, 55 .mask_ack = emma2rh_sw_irq_disable,
@@ -115,7 +115,7 @@ static void emma2rh_gpio_irq_end(unsigned int irq)
115} 115}
116 116
117struct irq_chip emma2rh_gpio_irq_controller = { 117struct irq_chip emma2rh_gpio_irq_controller = {
118 .typename = "emma2rh_gpio_irq", 118 .name = "emma2rh_gpio_irq",
119 .ack = emma2rh_gpio_irq_ack, 119 .ack = emma2rh_gpio_irq_ack,
120 .mask = emma2rh_gpio_irq_disable, 120 .mask = emma2rh_gpio_irq_disable,
121 .mask_ack = emma2rh_gpio_irq_ack, 121 .mask_ack = emma2rh_gpio_irq_ack,
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
index b3e5796c81d7..04572b9c9642 100644
--- a/arch/mips/gt64120/ev64120/irq.c
+++ b/arch/mips/gt64120/ev64120/irq.c
@@ -88,7 +88,7 @@ static void end_ev64120_irq(unsigned int irq)
88} 88}
89 89
90static struct irq_chip ev64120_irq_type = { 90static struct irq_chip ev64120_irq_type = {
91 .typename = "EV64120", 91 .name = "EV64120",
92 .ack = disable_ev64120_irq, 92 .ack = disable_ev64120_irq,
93 .mask = disable_ev64120_irq, 93 .mask = disable_ev64120_irq,
94 .mask_ack = disable_ev64120_irq, 94 .mask_ack = disable_ev64120_irq,
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c
index 99c8d42212e2..477848c22a2c 100644
--- a/arch/mips/gt64120/ev64120/setup.c
+++ b/arch/mips/gt64120/ev64120/setup.c
@@ -59,9 +59,8 @@ extern void galileo_machine_power_off(void);
59 */ 59 */
60extern struct pci_ops galileo_pci_ops; 60extern struct pci_ops galileo_pci_ops;
61 61
62unsigned long __init prom_free_prom_memory(void) 62void __init prom_free_prom_memory(void)
63{ 63{
64 return 0;
65} 64}
66 65
67/* 66/*
diff --git a/arch/mips/gt64120/momenco_ocelot/dbg_io.c b/arch/mips/gt64120/momenco_ocelot/dbg_io.c
index 2128684584f5..32d6fb4ee679 100644
--- a/arch/mips/gt64120/momenco_ocelot/dbg_io.c
+++ b/arch/mips/gt64120/momenco_ocelot/dbg_io.c
@@ -1,6 +1,4 @@
1 1
2#ifdef CONFIG_KGDB
3
4#include <asm/serial.h> /* For the serial port location and base baud */ 2#include <asm/serial.h> /* For the serial port location and base baud */
5 3
6/* --- CONFIG --- */ 4/* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
121 UART16550_WRITE(OFS_SEND_BUFFER, byte); 119 UART16550_WRITE(OFS_SEND_BUFFER, byte);
122 return 1; 120 return 1;
123} 121}
124
125#endif
diff --git a/arch/mips/gt64120/momenco_ocelot/irq.c b/arch/mips/gt64120/momenco_ocelot/irq.c
index d9294401ccb0..2585d9dbda33 100644
--- a/arch/mips/gt64120/momenco_ocelot/irq.c
+++ b/arch/mips/gt64120/momenco_ocelot/irq.c
@@ -90,6 +90,6 @@ void __init arch_init_irq(void)
90 clear_c0_status(ST0_IM); 90 clear_c0_status(ST0_IM);
91 local_irq_disable(); 91 local_irq_disable();
92 92
93 mips_cpu_irq_init(0); 93 mips_cpu_irq_init();
94 rm7k_cpu_irq_init(8); 94 rm7k_cpu_irq_init();
95} 95}
diff --git a/arch/mips/gt64120/momenco_ocelot/prom.c b/arch/mips/gt64120/momenco_ocelot/prom.c
index 8677b6d3ada7..78f393b2afd9 100644
--- a/arch/mips/gt64120/momenco_ocelot/prom.c
+++ b/arch/mips/gt64120/momenco_ocelot/prom.c
@@ -67,7 +67,6 @@ void __init prom_init(void)
67 add_memory_region(0, 64 << 20, BOOT_MEM_RAM); 67 add_memory_region(0, 64 << 20, BOOT_MEM_RAM);
68} 68}
69 69
70unsigned long __init prom_free_prom_memory(void) 70void __init prom_free_prom_memory(void)
71{ 71{
72 return 0;
73} 72}
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c
index eedfc24e1eae..d3d96591780e 100644
--- a/arch/mips/gt64120/wrppmc/irq.c
+++ b/arch/mips/gt64120/wrppmc/irq.c
@@ -63,7 +63,7 @@ void gt64120_init_pic(void)
63void __init arch_init_irq(void) 63void __init arch_init_irq(void)
64{ 64{
65 /* IRQ 0 - 7 are for MIPS common irq_cpu controller */ 65 /* IRQ 0 - 7 are for MIPS common irq_cpu controller */
66 mips_cpu_irq_init(0); 66 mips_cpu_irq_init();
67 67
68 gt64120_init_pic(); 68 gt64120_init_pic();
69} 69}
diff --git a/arch/mips/gt64120/wrppmc/setup.c b/arch/mips/gt64120/wrppmc/setup.c
index 429afc400cb4..121188d5ec4a 100644
--- a/arch/mips/gt64120/wrppmc/setup.c
+++ b/arch/mips/gt64120/wrppmc/setup.c
@@ -93,9 +93,8 @@ void __init wrppmc_early_printk(const char *fmt, ...)
93} 93}
94#endif /* WRPPMC_EARLY_DEBUG */ 94#endif /* WRPPMC_EARLY_DEBUG */
95 95
96unsigned long __init prom_free_prom_memory(void) 96void __init prom_free_prom_memory(void)
97{ 97{
98 return 0;
99} 98}
100 99
101#ifdef CONFIG_SERIAL_8250 100#ifdef CONFIG_SERIAL_8250
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index f8d417b5c2bb..295892e4ce53 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -40,7 +40,7 @@ void disable_r4030_irq(unsigned int irq)
40} 40}
41 41
42static struct irq_chip r4030_irq_type = { 42static struct irq_chip r4030_irq_type = {
43 .typename = "R4030", 43 .name = "R4030",
44 .ack = disable_r4030_irq, 44 .ack = disable_r4030_irq,
45 .mask = disable_r4030_irq, 45 .mask = disable_r4030_irq,
46 .mask_ack = disable_r4030_irq, 46 .mask_ack = disable_r4030_irq,
diff --git a/arch/mips/jmr3927/common/prom.c b/arch/mips/jmr3927/common/prom.c
index 5d5838f41d23..aa481b774c42 100644
--- a/arch/mips/jmr3927/common/prom.c
+++ b/arch/mips/jmr3927/common/prom.c
@@ -75,7 +75,6 @@ void __init prom_init_cmdline(void)
75 *cp = '\0'; 75 *cp = '\0';
76} 76}
77 77
78unsigned long __init prom_free_prom_memory(void) 78void __init prom_free_prom_memory(void)
79{ 79{
80 return 0;
81} 80}
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 3da49c5aaf49..7d2c203cb406 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -439,7 +439,7 @@ void __init arch_init_irq(void)
439} 439}
440 440
441static struct irq_chip jmr3927_irq_controller = { 441static struct irq_chip jmr3927_irq_controller = {
442 .typename = "jmr3927_irq", 442 .name = "jmr3927_irq",
443 .ack = jmr3927_irq_ack, 443 .ack = jmr3927_irq_ack,
444 .mask = jmr3927_irq_disable, 444 .mask = jmr3927_irq_disable,
445 .mask_ack = jmr3927_irq_ack, 445 .mask_ack = jmr3927_irq_ack,
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index 138f25efe38a..7ca3d6d07b34 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -434,7 +434,7 @@ void __init tx3927_setup(void)
434 434
435 /* DMA */ 435 /* DMA */
436 tx3927_dmaptr->mcr = 0; 436 tx3927_dmaptr->mcr = 0;
437 for (i = 0; i < sizeof(tx3927_dmaptr->ch) / sizeof(tx3927_dmaptr->ch[0]); i++) { 437 for (i = 0; i < ARRAY_SIZE(tx3927_dmaptr->ch); i++) {
438 /* reset channel */ 438 /* reset channel */
439 tx3927_dmaptr->ch[i].ccr = TX3927_DMA_CCR_CHRST; 439 tx3927_dmaptr->ch[i].ccr = TX3927_DMA_CCR_CHRST;
440 tx3927_dmaptr->ch[i].ccr = 0; 440 tx3927_dmaptr->ch[i].ccr = 0;
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index bbbb8d7cb89b..8faf1b40cd66 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -14,8 +14,6 @@ binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
14obj-$(CONFIG_STACKTRACE) += stacktrace.o 14obj-$(CONFIG_STACKTRACE) += stacktrace.o
15obj-$(CONFIG_MODULES) += mips_ksyms.o module.o 15obj-$(CONFIG_MODULES) += mips_ksyms.o module.o
16 16
17obj-$(CONFIG_APM) += apm.o
18
19obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 17obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
20obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o 18obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
21obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o 19obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
@@ -55,9 +53,9 @@ obj-$(CONFIG_MIPS_BOARDS_GEN) += irq-msc01.o
55obj-$(CONFIG_32BIT) += scall32-o32.o 53obj-$(CONFIG_32BIT) += scall32-o32.o
56obj-$(CONFIG_64BIT) += scall64-64.o 54obj-$(CONFIG_64BIT) += scall64-64.o
57obj-$(CONFIG_BINFMT_IRIX) += binfmt_irix.o 55obj-$(CONFIG_BINFMT_IRIX) += binfmt_irix.o
58obj-$(CONFIG_MIPS32_COMPAT) += linux32.o signal32.o 56obj-$(CONFIG_MIPS32_COMPAT) += linux32.o ptrace32.o signal32.o
59obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o 57obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o
60obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o ptrace32.o 58obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o
61 59
62obj-$(CONFIG_KGDB) += gdb-low.o gdb-stub.o 60obj-$(CONFIG_KGDB) += gdb-low.o gdb-stub.o
63obj-$(CONFIG_PROC_FS) += proc.o 61obj-$(CONFIG_PROC_FS) += proc.o
diff --git a/arch/mips/kernel/apm.c b/arch/mips/kernel/apm.c
deleted file mode 100644
index ba16d07588cb..000000000000
--- a/arch/mips/kernel/apm.c
+++ /dev/null
@@ -1,604 +0,0 @@
1/*
2 * bios-less APM driver for MIPS Linux
3 * Jamey Hicks <jamey@crl.dec.com>
4 * adapted from the APM BIOS driver for Linux by Stephen Rothwell (sfr@linuxcare.com)
5 *
6 * APM 1.2 Reference:
7 * Intel Corporation, Microsoft Corporation. Advanced Power Management
8 * (APM) BIOS Interface Specification, Revision 1.2, February 1996.
9 *
10 * [This document is available from Microsoft at:
11 * http://www.microsoft.com/hwdev/busbios/amp_12.htm]
12 */
13#include <linux/module.h>
14#include <linux/poll.h>
15#include <linux/timer.h>
16#include <linux/slab.h>
17#include <linux/proc_fs.h>
18#include <linux/miscdevice.h>
19#include <linux/apm_bios.h>
20#include <linux/capability.h>
21#include <linux/sched.h>
22#include <linux/pm.h>
23#include <linux/device.h>
24#include <linux/kernel.h>
25#include <linux/list.h>
26#include <linux/init.h>
27#include <linux/completion.h>
28
29#include <asm/apm.h> /* apm_power_info */
30#include <asm/system.h>
31
32/*
33 * The apm_bios device is one of the misc char devices.
34 * This is its minor number.
35 */
36#define APM_MINOR_DEV 134
37
38/*
39 * See Documentation/Config.help for the configuration options.
40 *
41 * Various options can be changed at boot time as follows:
42 * (We allow underscores for compatibility with the modules code)
43 * apm=on/off enable/disable APM
44 */
45
46/*
47 * Maximum number of events stored
48 */
49#define APM_MAX_EVENTS 16
50
51struct apm_queue {
52 unsigned int event_head;
53 unsigned int event_tail;
54 apm_event_t events[APM_MAX_EVENTS];
55};
56
57/*
58 * The per-file APM data
59 */
60struct apm_user {
61 struct list_head list;
62
63 unsigned int suser: 1;
64 unsigned int writer: 1;
65 unsigned int reader: 1;
66
67 int suspend_result;
68 unsigned int suspend_state;
69#define SUSPEND_NONE 0 /* no suspend pending */
70#define SUSPEND_PENDING 1 /* suspend pending read */
71#define SUSPEND_READ 2 /* suspend read, pending ack */
72#define SUSPEND_ACKED 3 /* suspend acked */
73#define SUSPEND_DONE 4 /* suspend completed */
74
75 struct apm_queue queue;
76};
77
78/*
79 * Local variables
80 */
81static int suspends_pending;
82static int apm_disabled;
83static int mips_apm_active;
84
85static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
86static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
87
88/*
89 * This is a list of everyone who has opened /dev/apm_bios
90 */
91static DECLARE_RWSEM(user_list_lock);
92static LIST_HEAD(apm_user_list);
93
94/*
95 * kapmd info. kapmd provides us a process context to handle
96 * "APM" events within - specifically necessary if we're going
97 * to be suspending the system.
98 */
99static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
100static DECLARE_COMPLETION(kapmd_exit);
101static DEFINE_SPINLOCK(kapmd_queue_lock);
102static struct apm_queue kapmd_queue;
103
104
105static const char driver_version[] = "1.13"; /* no spaces */
106
107
108
109/*
110 * Compatibility cruft until the IPAQ people move over to the new
111 * interface.
112 */
113static void __apm_get_power_status(struct apm_power_info *info)
114{
115}
116
117/*
118 * This allows machines to provide their own "apm get power status" function.
119 */
120void (*apm_get_power_status)(struct apm_power_info *) = __apm_get_power_status;
121EXPORT_SYMBOL(apm_get_power_status);
122
123
124/*
125 * APM event queue management.
126 */
127static inline int queue_empty(struct apm_queue *q)
128{
129 return q->event_head == q->event_tail;
130}
131
132static inline apm_event_t queue_get_event(struct apm_queue *q)
133{
134 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
135 return q->events[q->event_tail];
136}
137
138static void queue_add_event(struct apm_queue *q, apm_event_t event)
139{
140 q->event_head = (q->event_head + 1) % APM_MAX_EVENTS;
141 if (q->event_head == q->event_tail) {
142 static int notified;
143
144 if (notified++ == 0)
145 printk(KERN_ERR "apm: an event queue overflowed\n");
146 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
147 }
148 q->events[q->event_head] = event;
149}
150
151static void queue_event_one_user(struct apm_user *as, apm_event_t event)
152{
153 if (as->suser && as->writer) {
154 switch (event) {
155 case APM_SYS_SUSPEND:
156 case APM_USER_SUSPEND:
157 /*
158 * If this user already has a suspend pending,
159 * don't queue another one.
160 */
161 if (as->suspend_state != SUSPEND_NONE)
162 return;
163
164 as->suspend_state = SUSPEND_PENDING;
165 suspends_pending++;
166 break;
167 }
168 }
169 queue_add_event(&as->queue, event);
170}
171
172static void queue_event(apm_event_t event, struct apm_user *sender)
173{
174 struct apm_user *as;
175
176 down_read(&user_list_lock);
177 list_for_each_entry(as, &apm_user_list, list) {
178 if (as != sender && as->reader)
179 queue_event_one_user(as, event);
180 }
181 up_read(&user_list_lock);
182 wake_up_interruptible(&apm_waitqueue);
183}
184
185static void apm_suspend(void)
186{
187 struct apm_user *as;
188 int err = pm_suspend(PM_SUSPEND_MEM);
189
190 /*
191 * Anyone on the APM queues will think we're still suspended.
192 * Send a message so everyone knows we're now awake again.
193 */
194 queue_event(APM_NORMAL_RESUME, NULL);
195
196 /*
197 * Finally, wake up anyone who is sleeping on the suspend.
198 */
199 down_read(&user_list_lock);
200 list_for_each_entry(as, &apm_user_list, list) {
201 as->suspend_result = err;
202 as->suspend_state = SUSPEND_DONE;
203 }
204 up_read(&user_list_lock);
205
206 wake_up(&apm_suspend_waitqueue);
207}
208
209static ssize_t apm_read(struct file *fp, char __user *buf, size_t count, loff_t *ppos)
210{
211 struct apm_user *as = fp->private_data;
212 apm_event_t event;
213 int i = count, ret = 0;
214
215 if (count < sizeof(apm_event_t))
216 return -EINVAL;
217
218 if (queue_empty(&as->queue) && fp->f_flags & O_NONBLOCK)
219 return -EAGAIN;
220
221 wait_event_interruptible(apm_waitqueue, !queue_empty(&as->queue));
222
223 while ((i >= sizeof(event)) && !queue_empty(&as->queue)) {
224 event = queue_get_event(&as->queue);
225
226 ret = -EFAULT;
227 if (copy_to_user(buf, &event, sizeof(event)))
228 break;
229
230 if (event == APM_SYS_SUSPEND || event == APM_USER_SUSPEND)
231 as->suspend_state = SUSPEND_READ;
232
233 buf += sizeof(event);
234 i -= sizeof(event);
235 }
236
237 if (i < count)
238 ret = count - i;
239
240 return ret;
241}
242
243static unsigned int apm_poll(struct file *fp, poll_table * wait)
244{
245 struct apm_user *as = fp->private_data;
246
247 poll_wait(fp, &apm_waitqueue, wait);
248 return queue_empty(&as->queue) ? 0 : POLLIN | POLLRDNORM;
249}
250
251/*
252 * apm_ioctl - handle APM ioctl
253 *
254 * APM_IOC_SUSPEND
255 * This IOCTL is overloaded, and performs two functions. It is used to:
256 * - initiate a suspend
257 * - acknowledge a suspend read from /dev/apm_bios.
258 * Only when everyone who has opened /dev/apm_bios with write permission
259 * has acknowledge does the actual suspend happen.
260 */
261static int
262apm_ioctl(struct inode * inode, struct file *filp, unsigned int cmd, unsigned long arg)
263{
264 struct apm_user *as = filp->private_data;
265 unsigned long flags;
266 int err = -EINVAL;
267
268 if (!as->suser || !as->writer)
269 return -EPERM;
270
271 switch (cmd) {
272 case APM_IOC_SUSPEND:
273 as->suspend_result = -EINTR;
274
275 if (as->suspend_state == SUSPEND_READ) {
276 /*
277 * If we read a suspend command from /dev/apm_bios,
278 * then the corresponding APM_IOC_SUSPEND ioctl is
279 * interpreted as an acknowledge.
280 */
281 as->suspend_state = SUSPEND_ACKED;
282 suspends_pending--;
283 } else {
284 /*
285 * Otherwise it is a request to suspend the system.
286 * Queue an event for all readers, and expect an
287 * acknowledge from all writers who haven't already
288 * acknowledged.
289 */
290 queue_event(APM_USER_SUSPEND, as);
291 }
292
293 /*
294 * If there are no further acknowledges required, suspend
295 * the system.
296 */
297 if (suspends_pending == 0)
298 apm_suspend();
299
300 /*
301 * Wait for the suspend/resume to complete. If there are
302 * pending acknowledges, we wait here for them.
303 *
304 * Note that we need to ensure that the PM subsystem does
305 * not kick us out of the wait when it suspends the threads.
306 */
307 flags = current->flags;
308 current->flags |= PF_NOFREEZE;
309
310 /*
311 * Note: do not allow a thread which is acking the suspend
312 * to escape until the resume is complete.
313 */
314 if (as->suspend_state == SUSPEND_ACKED)
315 wait_event(apm_suspend_waitqueue,
316 as->suspend_state == SUSPEND_DONE);
317 else
318 wait_event_interruptible(apm_suspend_waitqueue,
319 as->suspend_state == SUSPEND_DONE);
320
321 current->flags = flags;
322 err = as->suspend_result;
323 as->suspend_state = SUSPEND_NONE;
324 break;
325 }
326
327 return err;
328}
329
330static int apm_release(struct inode * inode, struct file * filp)
331{
332 struct apm_user *as = filp->private_data;
333 filp->private_data = NULL;
334
335 down_write(&user_list_lock);
336 list_del(&as->list);
337 up_write(&user_list_lock);
338
339 /*
340 * We are now unhooked from the chain. As far as new
341 * events are concerned, we no longer exist. However, we
342 * need to balance suspends_pending, which means the
343 * possibility of sleeping.
344 */
345 if (as->suspend_state != SUSPEND_NONE) {
346 suspends_pending -= 1;
347 if (suspends_pending == 0)
348 apm_suspend();
349 }
350
351 kfree(as);
352 return 0;
353}
354
355static int apm_open(struct inode * inode, struct file * filp)
356{
357 struct apm_user *as;
358
359 as = kzalloc(sizeof(*as), GFP_KERNEL);
360 if (as) {
361 /*
362 * XXX - this is a tiny bit broken, when we consider BSD
363 * process accounting. If the device is opened by root, we
364 * instantly flag that we used superuser privs. Who knows,
365 * we might close the device immediately without doing a
366 * privileged operation -- cevans
367 */
368 as->suser = capable(CAP_SYS_ADMIN);
369 as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE;
370 as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ;
371
372 down_write(&user_list_lock);
373 list_add(&as->list, &apm_user_list);
374 up_write(&user_list_lock);
375
376 filp->private_data = as;
377 }
378
379 return as ? 0 : -ENOMEM;
380}
381
382static struct file_operations apm_bios_fops = {
383 .owner = THIS_MODULE,
384 .read = apm_read,
385 .poll = apm_poll,
386 .ioctl = apm_ioctl,
387 .open = apm_open,
388 .release = apm_release,
389};
390
391static struct miscdevice apm_device = {
392 .minor = APM_MINOR_DEV,
393 .name = "apm_bios",
394 .fops = &apm_bios_fops
395};
396
397
398#ifdef CONFIG_PROC_FS
399/*
400 * Arguments, with symbols from linux/apm_bios.h.
401 *
402 * 0) Linux driver version (this will change if format changes)
403 * 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2.
404 * 2) APM flags from APM Installation Check (0x00):
405 * bit 0: APM_16_BIT_SUPPORT
406 * bit 1: APM_32_BIT_SUPPORT
407 * bit 2: APM_IDLE_SLOWS_CLOCK
408 * bit 3: APM_BIOS_DISABLED
409 * bit 4: APM_BIOS_DISENGAGED
410 * 3) AC line status
411 * 0x00: Off-line
412 * 0x01: On-line
413 * 0x02: On backup power (BIOS >= 1.1 only)
414 * 0xff: Unknown
415 * 4) Battery status
416 * 0x00: High
417 * 0x01: Low
418 * 0x02: Critical
419 * 0x03: Charging
420 * 0x04: Selected battery not present (BIOS >= 1.2 only)
421 * 0xff: Unknown
422 * 5) Battery flag
423 * bit 0: High
424 * bit 1: Low
425 * bit 2: Critical
426 * bit 3: Charging
427 * bit 7: No system battery
428 * 0xff: Unknown
429 * 6) Remaining battery life (percentage of charge):
430 * 0-100: valid
431 * -1: Unknown
432 * 7) Remaining battery life (time units):
433 * Number of remaining minutes or seconds
434 * -1: Unknown
435 * 8) min = minutes; sec = seconds
436 */
437static int apm_get_info(char *buf, char **start, off_t fpos, int length)
438{
439 struct apm_power_info info;
440 char *units;
441 int ret;
442
443 info.ac_line_status = 0xff;
444 info.battery_status = 0xff;
445 info.battery_flag = 0xff;
446 info.battery_life = -1;
447 info.time = -1;
448 info.units = -1;
449
450 if (apm_get_power_status)
451 apm_get_power_status(&info);
452
453 switch (info.units) {
454 default: units = "?"; break;
455 case 0: units = "min"; break;
456 case 1: units = "sec"; break;
457 }
458
459 ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
460 driver_version, APM_32_BIT_SUPPORT,
461 info.ac_line_status, info.battery_status,
462 info.battery_flag, info.battery_life,
463 info.time, units);
464
465 return ret;
466}
467#endif
468
469static int kapmd(void *arg)
470{
471 daemonize("kapmd");
472 current->flags |= PF_NOFREEZE;
473
474 do {
475 apm_event_t event;
476
477 wait_event_interruptible(kapmd_wait,
478 !queue_empty(&kapmd_queue) || !mips_apm_active);
479
480 if (!mips_apm_active)
481 break;
482
483 spin_lock_irq(&kapmd_queue_lock);
484 event = 0;
485 if (!queue_empty(&kapmd_queue))
486 event = queue_get_event(&kapmd_queue);
487 spin_unlock_irq(&kapmd_queue_lock);
488
489 switch (event) {
490 case 0:
491 break;
492
493 case APM_LOW_BATTERY:
494 case APM_POWER_STATUS_CHANGE:
495 queue_event(event, NULL);
496 break;
497
498 case APM_USER_SUSPEND:
499 case APM_SYS_SUSPEND:
500 queue_event(event, NULL);
501 if (suspends_pending == 0)
502 apm_suspend();
503 break;
504
505 case APM_CRITICAL_SUSPEND:
506 apm_suspend();
507 break;
508 }
509 } while (1);
510
511 complete_and_exit(&kapmd_exit, 0);
512}
513
514static int __init apm_init(void)
515{
516 int ret;
517
518 if (apm_disabled) {
519 printk(KERN_NOTICE "apm: disabled on user request.\n");
520 return -ENODEV;
521 }
522
523 mips_apm_active = 1;
524
525 ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
526 if (ret < 0) {
527 mips_apm_active = 0;
528 return ret;
529 }
530
531#ifdef CONFIG_PROC_FS
532 create_proc_info_entry("apm", 0, NULL, apm_get_info);
533#endif
534
535 ret = misc_register(&apm_device);
536 if (ret != 0) {
537 remove_proc_entry("apm", NULL);
538
539 mips_apm_active = 0;
540 wake_up(&kapmd_wait);
541 wait_for_completion(&kapmd_exit);
542 }
543
544 return ret;
545}
546
547static void __exit apm_exit(void)
548{
549 misc_deregister(&apm_device);
550 remove_proc_entry("apm", NULL);
551
552 mips_apm_active = 0;
553 wake_up(&kapmd_wait);
554 wait_for_completion(&kapmd_exit);
555}
556
557module_init(apm_init);
558module_exit(apm_exit);
559
560MODULE_AUTHOR("Stephen Rothwell");
561MODULE_DESCRIPTION("Advanced Power Management");
562MODULE_LICENSE("GPL");
563
564#ifndef MODULE
565static int __init apm_setup(char *str)
566{
567 while ((str != NULL) && (*str != '\0')) {
568 if (strncmp(str, "off", 3) == 0)
569 apm_disabled = 1;
570 if (strncmp(str, "on", 2) == 0)
571 apm_disabled = 0;
572 str = strchr(str, ',');
573 if (str != NULL)
574 str += strspn(str, ", \t");
575 }
576 return 1;
577}
578
579__setup("apm=", apm_setup);
580#endif
581
582/**
583 * apm_queue_event - queue an APM event for kapmd
584 * @event: APM event
585 *
586 * Queue an APM event for kapmd to process and ultimately take the
587 * appropriate action. Only a subset of events are handled:
588 * %APM_LOW_BATTERY
589 * %APM_POWER_STATUS_CHANGE
590 * %APM_USER_SUSPEND
591 * %APM_SYS_SUSPEND
592 * %APM_CRITICAL_SUSPEND
593 */
594void apm_queue_event(apm_event_t event)
595{
596 unsigned long flags;
597
598 spin_lock_irqsave(&kapmd_queue_lock, flags);
599 queue_add_event(&kapmd_queue, event);
600 spin_unlock_irqrestore(&kapmd_queue_lock, flags);
601
602 wake_up_interruptible(&kapmd_wait);
603}
604EXPORT_SYMBOL(apm_queue_event);
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index ff88b06f89df..222de465db73 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -64,6 +64,9 @@ void output_ptreg_defines(void)
64 offset("#define PT_R31 ", struct pt_regs, regs[31]); 64 offset("#define PT_R31 ", struct pt_regs, regs[31]);
65 offset("#define PT_LO ", struct pt_regs, lo); 65 offset("#define PT_LO ", struct pt_regs, lo);
66 offset("#define PT_HI ", struct pt_regs, hi); 66 offset("#define PT_HI ", struct pt_regs, hi);
67#ifdef CONFIG_CPU_HAS_SMARTMIPS
68 offset("#define PT_ACX ", struct pt_regs, acx);
69#endif
67 offset("#define PT_EPC ", struct pt_regs, cp0_epc); 70 offset("#define PT_EPC ", struct pt_regs, cp0_epc);
68 offset("#define PT_BVADDR ", struct pt_regs, cp0_badvaddr); 71 offset("#define PT_BVADDR ", struct pt_regs, cp0_badvaddr);
69 offset("#define PT_STATUS ", struct pt_regs, cp0_status); 72 offset("#define PT_STATUS ", struct pt_regs, cp0_status);
@@ -234,10 +237,6 @@ void output_mm_defines(void)
234 constant("#define _PMD_SHIFT ", PMD_SHIFT); 237 constant("#define _PMD_SHIFT ", PMD_SHIFT);
235 constant("#define _PGDIR_SHIFT ", PGDIR_SHIFT); 238 constant("#define _PGDIR_SHIFT ", PGDIR_SHIFT);
236 linefeed; 239 linefeed;
237 constant("#define _PGD_ORDER ", PGD_ORDER);
238 constant("#define _PMD_ORDER ", PMD_ORDER);
239 constant("#define _PTE_ORDER ", PTE_ORDER);
240 linefeed;
241 constant("#define _PTRS_PER_PGD ", PTRS_PER_PGD); 240 constant("#define _PTRS_PER_PGD ", PTRS_PER_PGD);
242 constant("#define _PTRS_PER_PMD ", PTRS_PER_PMD); 241 constant("#define _PTRS_PER_PMD ", PTRS_PER_PMD);
243 constant("#define _PTRS_PER_PTE ", PTRS_PER_PTE); 242 constant("#define _PTRS_PER_PTE ", PTRS_PER_PTE);
@@ -250,10 +249,10 @@ void output_sc_defines(void)
250 text("/* Linux sigcontext offsets. */"); 249 text("/* Linux sigcontext offsets. */");
251 offset("#define SC_REGS ", struct sigcontext, sc_regs); 250 offset("#define SC_REGS ", struct sigcontext, sc_regs);
252 offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs); 251 offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
252 offset("#define SC_ACX ", struct sigcontext, sc_acx);
253 offset("#define SC_MDHI ", struct sigcontext, sc_mdhi); 253 offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
254 offset("#define SC_MDLO ", struct sigcontext, sc_mdlo); 254 offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
255 offset("#define SC_PC ", struct sigcontext, sc_pc); 255 offset("#define SC_PC ", struct sigcontext, sc_pc);
256 offset("#define SC_STATUS ", struct sigcontext, sc_status);
257 offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); 256 offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
258 offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir); 257 offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir);
259 offset("#define SC_HI1 ", struct sigcontext, sc_hi1); 258 offset("#define SC_HI1 ", struct sigcontext, sc_hi1);
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 442839e9578c..ab755ea26c6a 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -16,6 +16,7 @@
16#include <linux/ptrace.h> 16#include <linux/ptrace.h>
17#include <linux/stddef.h> 17#include <linux/stddef.h>
18 18
19#include <asm/bugs.h>
19#include <asm/cpu.h> 20#include <asm/cpu.h>
20#include <asm/fpu.h> 21#include <asm/fpu.h>
21#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
@@ -97,7 +98,7 @@ static void au1k_wait(void)
97 98
98static int __initdata nowait = 0; 99static int __initdata nowait = 0;
99 100
100int __init wait_disable(char *s) 101static int __init wait_disable(char *s)
101{ 102{
102 nowait = 1; 103 nowait = 1;
103 104
@@ -565,7 +566,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
565 if (config3 & MIPS_CONF3_VEIC) 566 if (config3 & MIPS_CONF3_VEIC)
566 c->options |= MIPS_CPU_VEIC; 567 c->options |= MIPS_CPU_VEIC;
567 if (config3 & MIPS_CONF3_MT) 568 if (config3 & MIPS_CONF3_MT)
568 c->ases |= MIPS_ASE_MIPSMT; 569 c->ases |= MIPS_ASE_MIPSMT;
569 570
570 return config3 & MIPS_CONF_M; 571 return config3 & MIPS_CONF_M;
571} 572}
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index f10b6a19f8bf..0b78fcbf044a 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -21,24 +21,21 @@
21#endif 21#endif
22 22
23#ifndef CONFIG_PREEMPT 23#ifndef CONFIG_PREEMPT
24 .macro preempt_stop
25 local_irq_disable
26 .endm
27#define resume_kernel restore_all 24#define resume_kernel restore_all
25#else
26#define __ret_from_irq ret_from_exception
28#endif 27#endif
29 28
30 .text 29 .text
31 .align 5 30 .align 5
32FEXPORT(ret_from_irq) 31#ifndef CONFIG_PREEMPT
33 LONG_S s0, TI_REGS($28)
34#ifdef CONFIG_PREEMPT
35FEXPORT(ret_from_exception)
36#else
37 b _ret_from_irq
38FEXPORT(ret_from_exception) 32FEXPORT(ret_from_exception)
39 preempt_stop 33 local_irq_disable # preempt stop
34 b __ret_from_irq
40#endif 35#endif
41FEXPORT(_ret_from_irq) 36FEXPORT(ret_from_irq)
37 LONG_S s0, TI_REGS($28)
38FEXPORT(__ret_from_irq)
42 LONG_L t0, PT_STATUS(sp) # returning to kernel mode? 39 LONG_L t0, PT_STATUS(sp) # returning to kernel mode?
43 andi t0, t0, KU_USER 40 andi t0, t0, KU_USER
44 beqz t0, resume_kernel 41 beqz t0, resume_kernel
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c
index 719d26968cb2..7bc882049269 100644
--- a/arch/mips/kernel/gdb-stub.c
+++ b/arch/mips/kernel/gdb-stub.c
@@ -505,13 +505,13 @@ void show_gdbregs(struct gdb_regs * regs)
505 */ 505 */
506 printk("$0 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 506 printk("$0 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
507 regs->reg0, regs->reg1, regs->reg2, regs->reg3, 507 regs->reg0, regs->reg1, regs->reg2, regs->reg3,
508 regs->reg4, regs->reg5, regs->reg6, regs->reg7); 508 regs->reg4, regs->reg5, regs->reg6, regs->reg7);
509 printk("$8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 509 printk("$8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
510 regs->reg8, regs->reg9, regs->reg10, regs->reg11, 510 regs->reg8, regs->reg9, regs->reg10, regs->reg11,
511 regs->reg12, regs->reg13, regs->reg14, regs->reg15); 511 regs->reg12, regs->reg13, regs->reg14, regs->reg15);
512 printk("$16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 512 printk("$16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
513 regs->reg16, regs->reg17, regs->reg18, regs->reg19, 513 regs->reg16, regs->reg17, regs->reg18, regs->reg19,
514 regs->reg20, regs->reg21, regs->reg22, regs->reg23); 514 regs->reg20, regs->reg21, regs->reg22, regs->reg23);
515 printk("$24: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 515 printk("$24: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
516 regs->reg24, regs->reg25, regs->reg26, regs->reg27, 516 regs->reg24, regs->reg25, regs->reg26, regs->reg27,
517 regs->reg28, regs->reg29, regs->reg30, regs->reg31); 517 regs->reg28, regs->reg29, regs->reg30, regs->reg31);
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 9a7811d13db2..6f57ca44291f 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -231,28 +231,3 @@ NESTED(smp_bootstrap, 16, sp)
231#endif /* CONFIG_SMP */ 231#endif /* CONFIG_SMP */
232 232
233 __FINIT 233 __FINIT
234
235 .comm kernelsp, NR_CPUS * 8, 8
236 .comm pgd_current, NR_CPUS * 8, 8
237
238 .comm fw_arg0, SZREG, SZREG # firmware arguments
239 .comm fw_arg1, SZREG, SZREG
240 .comm fw_arg2, SZREG, SZREG
241 .comm fw_arg3, SZREG, SZREG
242
243 .macro page name, order
244 .comm \name, (_PAGE_SIZE << \order), (_PAGE_SIZE << \order)
245 .endm
246
247 /*
248 * On 64-bit we've got three-level pagetables with a slightly
249 * different layout ...
250 */
251 page swapper_pg_dir, _PGD_ORDER
252#ifdef CONFIG_64BIT
253#if defined(CONFIG_MODULES) && !defined(CONFIG_BUILD_ELF64)
254 page module_pg_dir, _PGD_ORDER
255#endif
256 page invalid_pmd_table, _PMD_ORDER
257#endif
258 page invalid_pte_table, _PTE_ORDER
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index b59a676c6d0e..9c79703979b2 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -28,7 +28,7 @@
28 * moves to arch independent land 28 * moves to arch independent land
29 */ 29 */
30 30
31static int i8259A_auto_eoi; 31static int i8259A_auto_eoi = -1;
32DEFINE_SPINLOCK(i8259A_lock); 32DEFINE_SPINLOCK(i8259A_lock);
33/* some platforms call this... */ 33/* some platforms call this... */
34void mask_and_ack_8259A(unsigned int); 34void mask_and_ack_8259A(unsigned int);
@@ -54,9 +54,11 @@ static unsigned int cached_irq_mask = 0xffff;
54 54
55void disable_8259A_irq(unsigned int irq) 55void disable_8259A_irq(unsigned int irq)
56{ 56{
57 unsigned int mask = 1 << irq; 57 unsigned int mask;
58 unsigned long flags; 58 unsigned long flags;
59 59
60 irq -= I8259A_IRQ_BASE;
61 mask = 1 << irq;
60 spin_lock_irqsave(&i8259A_lock, flags); 62 spin_lock_irqsave(&i8259A_lock, flags);
61 cached_irq_mask |= mask; 63 cached_irq_mask |= mask;
62 if (irq & 8) 64 if (irq & 8)
@@ -68,9 +70,11 @@ void disable_8259A_irq(unsigned int irq)
68 70
69void enable_8259A_irq(unsigned int irq) 71void enable_8259A_irq(unsigned int irq)
70{ 72{
71 unsigned int mask = ~(1 << irq); 73 unsigned int mask;
72 unsigned long flags; 74 unsigned long flags;
73 75
76 irq -= I8259A_IRQ_BASE;
77 mask = ~(1 << irq);
74 spin_lock_irqsave(&i8259A_lock, flags); 78 spin_lock_irqsave(&i8259A_lock, flags);
75 cached_irq_mask &= mask; 79 cached_irq_mask &= mask;
76 if (irq & 8) 80 if (irq & 8)
@@ -82,10 +86,12 @@ void enable_8259A_irq(unsigned int irq)
82 86
83int i8259A_irq_pending(unsigned int irq) 87int i8259A_irq_pending(unsigned int irq)
84{ 88{
85 unsigned int mask = 1 << irq; 89 unsigned int mask;
86 unsigned long flags; 90 unsigned long flags;
87 int ret; 91 int ret;
88 92
93 irq -= I8259A_IRQ_BASE;
94 mask = 1 << irq;
89 spin_lock_irqsave(&i8259A_lock, flags); 95 spin_lock_irqsave(&i8259A_lock, flags);
90 if (irq < 8) 96 if (irq < 8)
91 ret = inb(PIC_MASTER_CMD) & mask; 97 ret = inb(PIC_MASTER_CMD) & mask;
@@ -134,9 +140,11 @@ static inline int i8259A_irq_real(unsigned int irq)
134 */ 140 */
135void mask_and_ack_8259A(unsigned int irq) 141void mask_and_ack_8259A(unsigned int irq)
136{ 142{
137 unsigned int irqmask = 1 << irq; 143 unsigned int irqmask;
138 unsigned long flags; 144 unsigned long flags;
139 145
146 irq -= I8259A_IRQ_BASE;
147 irqmask = 1 << irq;
140 spin_lock_irqsave(&i8259A_lock, flags); 148 spin_lock_irqsave(&i8259A_lock, flags);
141 /* 149 /*
142 * Lightweight spurious IRQ detection. We do not want 150 * Lightweight spurious IRQ detection. We do not want
@@ -169,8 +177,8 @@ handle_real_irq:
169 outb(0x60+irq,PIC_MASTER_CMD); /* 'Specific EOI to master */ 177 outb(0x60+irq,PIC_MASTER_CMD); /* 'Specific EOI to master */
170 } 178 }
171#ifdef CONFIG_MIPS_MT_SMTC 179#ifdef CONFIG_MIPS_MT_SMTC
172 if (irq_hwmask[irq] & ST0_IM) 180 if (irq_hwmask[irq] & ST0_IM)
173 set_c0_status(irq_hwmask[irq] & ST0_IM); 181 set_c0_status(irq_hwmask[irq] & ST0_IM);
174#endif /* CONFIG_MIPS_MT_SMTC */ 182#endif /* CONFIG_MIPS_MT_SMTC */
175 spin_unlock_irqrestore(&i8259A_lock, flags); 183 spin_unlock_irqrestore(&i8259A_lock, flags);
176 return; 184 return;
@@ -208,7 +216,8 @@ spurious_8259A_irq:
208 216
209static int i8259A_resume(struct sys_device *dev) 217static int i8259A_resume(struct sys_device *dev)
210{ 218{
211 init_8259A(i8259A_auto_eoi); 219 if (i8259A_auto_eoi >= 0)
220 init_8259A(i8259A_auto_eoi);
212 return 0; 221 return 0;
213} 222}
214 223
@@ -218,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev)
218 * the kernel initialization code can get it 227 * the kernel initialization code can get it
219 * out of. 228 * out of.
220 */ 229 */
221 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ 230 if (i8259A_auto_eoi >= 0) {
222 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ 231 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
232 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
233 }
223 return 0; 234 return 0;
224} 235}
225 236
@@ -244,7 +255,7 @@ static int __init i8259A_init_sysfs(void)
244 255
245device_initcall(i8259A_init_sysfs); 256device_initcall(i8259A_init_sysfs);
246 257
247void __init init_8259A(int auto_eoi) 258void init_8259A(int auto_eoi)
248{ 259{
249 unsigned long flags; 260 unsigned long flags;
250 261
@@ -322,8 +333,8 @@ void __init init_i8259_irqs (void)
322 333
323 init_8259A(0); 334 init_8259A(0);
324 335
325 for (i = 0; i < 16; i++) 336 for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++)
326 set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq); 337 set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq);
327 338
328 setup_irq(PIC_CASCADE_IR, &irq2); 339 setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
329} 340}
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index 37cad5de515c..3cc25c05d367 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -10,6 +10,8 @@
10 * Copyright (C) 1996 - 2004 David S. Miller <dm@engr.sgi.com> 10 * Copyright (C) 1996 - 2004 David S. Miller <dm@engr.sgi.com>
11 * Copyright (C) 2004 - 2005 Steven J. Hill <sjhill@realitydiluted.com> 11 * Copyright (C) 2004 - 2005 Steven J. Hill <sjhill@realitydiluted.com>
12 */ 12 */
13#undef DEBUG
14
13#include <linux/module.h> 15#include <linux/module.h>
14#include <linux/fs.h> 16#include <linux/fs.h>
15#include <linux/stat.h> 17#include <linux/stat.h>
@@ -40,8 +42,6 @@
40 42
41#include <linux/elf.h> 43#include <linux/elf.h>
42 44
43#undef DEBUG
44
45static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); 45static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs);
46static int load_irix_library(struct file *); 46static int load_irix_library(struct file *);
47static int irix_core_dump(long signr, struct pt_regs * regs, 47static int irix_core_dump(long signr, struct pt_regs * regs,
@@ -52,72 +52,102 @@ static struct linux_binfmt irix_format = {
52 irix_core_dump, PAGE_SIZE 52 irix_core_dump, PAGE_SIZE
53}; 53};
54 54
55#ifdef DEBUG
56/* Debugging routines. */ 55/* Debugging routines. */
57static char *get_elf_p_type(Elf32_Word p_type) 56static char *get_elf_p_type(Elf32_Word p_type)
58{ 57{
59 int i = (int) p_type; 58#ifdef DEBUG
60 59 switch (p_type) {
61 switch(i) { 60 case PT_NULL:
62 case PT_NULL: return("PT_NULL"); break; 61 return "PT_NULL";
63 case PT_LOAD: return("PT_LOAD"); break; 62 break;
64 case PT_DYNAMIC: return("PT_DYNAMIC"); break; 63
65 case PT_INTERP: return("PT_INTERP"); break; 64 case PT_LOAD:
66 case PT_NOTE: return("PT_NOTE"); break; 65 return "PT_LOAD";
67 case PT_SHLIB: return("PT_SHLIB"); break; 66 break;
68 case PT_PHDR: return("PT_PHDR"); break; 67
69 case PT_LOPROC: return("PT_LOPROC/REGINFO"); break; 68 case PT_DYNAMIC:
70 case PT_HIPROC: return("PT_HIPROC"); break; 69 return "PT_DYNAMIC";
71 default: return("PT_BOGUS"); break; 70 break;
71
72 case PT_INTERP:
73 return "PT_INTERP";
74 break;
75
76 case PT_NOTE:
77 return "PT_NOTE";
78 break;
79
80 case PT_SHLIB:
81 return "PT_SHLIB";
82 break;
83
84 case PT_PHDR:
85 return "PT_PHDR";
86 break;
87
88 case PT_LOPROC:
89 return "PT_LOPROC/REGINFO";
90 break;
91
92 case PT_HIPROC:
93 return "PT_HIPROC";
94 break;
95
96 default:
97 return "PT_BOGUS";
98 break;
72 } 99 }
100#endif
73} 101}
74 102
75static void print_elfhdr(struct elfhdr *ehp) 103static void print_elfhdr(struct elfhdr *ehp)
76{ 104{
77 int i; 105 int i;
78 106
79 printk("ELFHDR: e_ident<"); 107 pr_debug("ELFHDR: e_ident<");
80 for(i = 0; i < (EI_NIDENT - 1); i++) printk("%x ", ehp->e_ident[i]); 108 for (i = 0; i < (EI_NIDENT - 1); i++)
81 printk("%x>\n", ehp->e_ident[i]); 109 pr_debug("%x ", ehp->e_ident[i]);
82 printk(" e_type[%04x] e_machine[%04x] e_version[%08lx]\n", 110 pr_debug("%x>\n", ehp->e_ident[i]);
83 (unsigned short) ehp->e_type, (unsigned short) ehp->e_machine, 111 pr_debug(" e_type[%04x] e_machine[%04x] e_version[%08lx]\n",
84 (unsigned long) ehp->e_version); 112 (unsigned short) ehp->e_type, (unsigned short) ehp->e_machine,
85 printk(" e_entry[%08lx] e_phoff[%08lx] e_shoff[%08lx] " 113 (unsigned long) ehp->e_version);
86 "e_flags[%08lx]\n", 114 pr_debug(" e_entry[%08lx] e_phoff[%08lx] e_shoff[%08lx] "
87 (unsigned long) ehp->e_entry, (unsigned long) ehp->e_phoff, 115 "e_flags[%08lx]\n",
88 (unsigned long) ehp->e_shoff, (unsigned long) ehp->e_flags); 116 (unsigned long) ehp->e_entry, (unsigned long) ehp->e_phoff,
89 printk(" e_ehsize[%04x] e_phentsize[%04x] e_phnum[%04x]\n", 117 (unsigned long) ehp->e_shoff, (unsigned long) ehp->e_flags);
90 (unsigned short) ehp->e_ehsize, (unsigned short) ehp->e_phentsize, 118 pr_debug(" e_ehsize[%04x] e_phentsize[%04x] e_phnum[%04x]\n",
91 (unsigned short) ehp->e_phnum); 119 (unsigned short) ehp->e_ehsize,
92 printk(" e_shentsize[%04x] e_shnum[%04x] e_shstrndx[%04x]\n", 120 (unsigned short) ehp->e_phentsize,
93 (unsigned short) ehp->e_shentsize, (unsigned short) ehp->e_shnum, 121 (unsigned short) ehp->e_phnum);
94 (unsigned short) ehp->e_shstrndx); 122 pr_debug(" e_shentsize[%04x] e_shnum[%04x] e_shstrndx[%04x]\n",
123 (unsigned short) ehp->e_shentsize,
124 (unsigned short) ehp->e_shnum,
125 (unsigned short) ehp->e_shstrndx);
95} 126}
96 127
97static void print_phdr(int i, struct elf_phdr *ep) 128static void print_phdr(int i, struct elf_phdr *ep)
98{ 129{
99 printk("PHDR[%d]: p_type[%s] p_offset[%08lx] p_vaddr[%08lx] " 130 pr_debug("PHDR[%d]: p_type[%s] p_offset[%08lx] p_vaddr[%08lx] "
100 "p_paddr[%08lx]\n", i, get_elf_p_type(ep->p_type), 131 "p_paddr[%08lx]\n", i, get_elf_p_type(ep->p_type),
101 (unsigned long) ep->p_offset, (unsigned long) ep->p_vaddr, 132 (unsigned long) ep->p_offset, (unsigned long) ep->p_vaddr,
102 (unsigned long) ep->p_paddr); 133 (unsigned long) ep->p_paddr);
103 printk(" p_filesz[%08lx] p_memsz[%08lx] p_flags[%08lx] " 134 pr_debug(" p_filesz[%08lx] p_memsz[%08lx] p_flags[%08lx] "
104 "p_align[%08lx]\n", (unsigned long) ep->p_filesz, 135 "p_align[%08lx]\n", (unsigned long) ep->p_filesz,
105 (unsigned long) ep->p_memsz, (unsigned long) ep->p_flags, 136 (unsigned long) ep->p_memsz, (unsigned long) ep->p_flags,
106 (unsigned long) ep->p_align); 137 (unsigned long) ep->p_align);
107} 138}
108 139
109static void dump_phdrs(struct elf_phdr *ep, int pnum) 140static void dump_phdrs(struct elf_phdr *ep, int pnum)
110{ 141{
111 int i; 142 int i;
112 143
113 for(i = 0; i < pnum; i++, ep++) { 144 for (i = 0; i < pnum; i++, ep++) {
114 if((ep->p_type == PT_LOAD) || 145 if ((ep->p_type == PT_LOAD) ||
115 (ep->p_type == PT_INTERP) || 146 (ep->p_type == PT_INTERP) ||
116 (ep->p_type == PT_PHDR)) 147 (ep->p_type == PT_PHDR))
117 print_phdr(i, ep); 148 print_phdr(i, ep);
118 } 149 }
119} 150}
120#endif /* DEBUG */
121 151
122static void set_brk(unsigned long start, unsigned long end) 152static void set_brk(unsigned long start, unsigned long end)
123{ 153{
@@ -156,11 +186,10 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc,
156 elf_addr_t *envp; 186 elf_addr_t *envp;
157 elf_addr_t *sp, *csp; 187 elf_addr_t *sp, *csp;
158 188
159#ifdef DEBUG 189 pr_debug("create_irix_tables: p[%p] argc[%d] envc[%d] "
160 printk("create_irix_tables: p[%p] argc[%d] envc[%d] " 190 "load_addr[%08x] interp_load_addr[%08x]\n",
161 "load_addr[%08x] interp_load_addr[%08x]\n", 191 p, argc, envc, load_addr, interp_load_addr);
162 p, argc, envc, load_addr, interp_load_addr); 192
163#endif
164 sp = (elf_addr_t *) (~15UL & (unsigned long) p); 193 sp = (elf_addr_t *) (~15UL & (unsigned long) p);
165 csp = sp; 194 csp = sp;
166 csp -= exec ? DLINFO_ITEMS*2 : 2; 195 csp -= exec ? DLINFO_ITEMS*2 : 2;
@@ -181,7 +210,7 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc,
181 sp -= 2; 210 sp -= 2;
182 NEW_AUX_ENT(0, AT_NULL, 0); 211 NEW_AUX_ENT(0, AT_NULL, 0);
183 212
184 if(exec) { 213 if (exec) {
185 sp -= 11*2; 214 sp -= 11*2;
186 215
187 NEW_AUX_ENT (0, AT_PHDR, load_addr + exec->e_phoff); 216 NEW_AUX_ENT (0, AT_PHDR, load_addr + exec->e_phoff);
@@ -245,9 +274,7 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
245 last_bss = 0; 274 last_bss = 0;
246 error = load_addr = 0; 275 error = load_addr = 0;
247 276
248#ifdef DEBUG
249 print_elfhdr(interp_elf_ex); 277 print_elfhdr(interp_elf_ex);
250#endif
251 278
252 /* First of all, some simple consistency checks */ 279 /* First of all, some simple consistency checks */
253 if ((interp_elf_ex->e_type != ET_EXEC && 280 if ((interp_elf_ex->e_type != ET_EXEC &&
@@ -258,7 +285,7 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
258 } 285 }
259 286
260 /* Now read in all of the header information */ 287 /* Now read in all of the header information */
261 if(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) { 288 if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) {
262 printk("IRIX interp header bigger than a page (%d)\n", 289 printk("IRIX interp header bigger than a page (%d)\n",
263 (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum)); 290 (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum));
264 return 0xffffffff; 291 return 0xffffffff;
@@ -267,15 +294,15 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
267 elf_phdata = kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum, 294 elf_phdata = kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum,
268 GFP_KERNEL); 295 GFP_KERNEL);
269 296
270 if(!elf_phdata) { 297 if (!elf_phdata) {
271 printk("Cannot kmalloc phdata for IRIX interp.\n"); 298 printk("Cannot kmalloc phdata for IRIX interp.\n");
272 return 0xffffffff; 299 return 0xffffffff;
273 } 300 }
274 301
275 /* If the size of this structure has changed, then punt, since 302 /* If the size of this structure has changed, then punt, since
276 * we will be doing the wrong thing. 303 * we will be doing the wrong thing.
277 */ 304 */
278 if(interp_elf_ex->e_phentsize != 32) { 305 if (interp_elf_ex->e_phentsize != 32) {
279 printk("IRIX interp e_phentsize == %d != 32 ", 306 printk("IRIX interp e_phentsize == %d != 32 ",
280 interp_elf_ex->e_phentsize); 307 interp_elf_ex->e_phentsize);
281 kfree(elf_phdata); 308 kfree(elf_phdata);
@@ -286,61 +313,71 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
286 (char *) elf_phdata, 313 (char *) elf_phdata,
287 sizeof(struct elf_phdr) * interp_elf_ex->e_phnum); 314 sizeof(struct elf_phdr) * interp_elf_ex->e_phnum);
288 315
289#ifdef DEBUG
290 dump_phdrs(elf_phdata, interp_elf_ex->e_phnum); 316 dump_phdrs(elf_phdata, interp_elf_ex->e_phnum);
291#endif
292 317
293 eppnt = elf_phdata; 318 eppnt = elf_phdata;
294 for(i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) { 319 for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
295 if(eppnt->p_type == PT_LOAD) { 320 if (eppnt->p_type == PT_LOAD) {
296 int elf_type = MAP_PRIVATE | MAP_DENYWRITE; 321 int elf_type = MAP_PRIVATE | MAP_DENYWRITE;
297 int elf_prot = 0; 322 int elf_prot = 0;
298 unsigned long vaddr = 0; 323 unsigned long vaddr = 0;
299 if (eppnt->p_flags & PF_R) elf_prot = PROT_READ; 324 if (eppnt->p_flags & PF_R)
300 if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE; 325 elf_prot = PROT_READ;
301 if (eppnt->p_flags & PF_X) elf_prot |= PROT_EXEC; 326 if (eppnt->p_flags & PF_W)
302 elf_type |= MAP_FIXED; 327 elf_prot |= PROT_WRITE;
303 vaddr = eppnt->p_vaddr; 328 if (eppnt->p_flags & PF_X)
304 329 elf_prot |= PROT_EXEC;
305 pr_debug("INTERP do_mmap(%p, %08lx, %08lx, %08lx, %08lx, %08lx) ", 330 elf_type |= MAP_FIXED;
306 interpreter, vaddr, 331 vaddr = eppnt->p_vaddr;
307 (unsigned long) (eppnt->p_filesz + (eppnt->p_vaddr & 0xfff)), 332
308 (unsigned long) elf_prot, (unsigned long) elf_type, 333 pr_debug("INTERP do_mmap"
309 (unsigned long) (eppnt->p_offset & 0xfffff000)); 334 "(%p, %08lx, %08lx, %08lx, %08lx, %08lx) ",
310 down_write(&current->mm->mmap_sem); 335 interpreter, vaddr,
311 error = do_mmap(interpreter, vaddr, 336 (unsigned long)
312 eppnt->p_filesz + (eppnt->p_vaddr & 0xfff), 337 (eppnt->p_filesz + (eppnt->p_vaddr & 0xfff)),
313 elf_prot, elf_type, 338 (unsigned long)
314 eppnt->p_offset & 0xfffff000); 339 elf_prot, (unsigned long) elf_type,
315 up_write(&current->mm->mmap_sem); 340 (unsigned long)
316 341 (eppnt->p_offset & 0xfffff000));
317 if(error < 0 && error > -1024) { 342
318 printk("Aieee IRIX interp mmap error=%d\n", error); 343 down_write(&current->mm->mmap_sem);
319 break; /* Real error */ 344 error = do_mmap(interpreter, vaddr,
320 } 345 eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
321 pr_debug("error=%08lx ", (unsigned long) error); 346 elf_prot, elf_type,
322 if(!load_addr && interp_elf_ex->e_type == ET_DYN) { 347 eppnt->p_offset & 0xfffff000);
323 load_addr = error; 348 up_write(&current->mm->mmap_sem);
324 pr_debug("load_addr = error "); 349
325 } 350 if (error < 0 && error > -1024) {
326 351 printk("Aieee IRIX interp mmap error=%d\n",
327 /* Find the end of the file mapping for this phdr, and keep 352 error);
328 * track of the largest address we see for this. 353 break; /* Real error */
329 */ 354 }
330 k = eppnt->p_vaddr + eppnt->p_filesz; 355 pr_debug("error=%08lx ", (unsigned long) error);
331 if(k > elf_bss) elf_bss = k; 356 if (!load_addr && interp_elf_ex->e_type == ET_DYN) {
332 357 load_addr = error;
333 /* Do the same thing for the memory mapping - between 358 pr_debug("load_addr = error ");
334 * elf_bss and last_bss is the bss section. 359 }
335 */ 360
336 k = eppnt->p_memsz + eppnt->p_vaddr; 361 /*
337 if(k > last_bss) last_bss = k; 362 * Find the end of the file mapping for this phdr, and
338 pr_debug("\n"); 363 * keep track of the largest address we see for this.
339 } 364 */
365 k = eppnt->p_vaddr + eppnt->p_filesz;
366 if (k > elf_bss)
367 elf_bss = k;
368
369 /* Do the same thing for the memory mapping - between
370 * elf_bss and last_bss is the bss section.
371 */
372 k = eppnt->p_memsz + eppnt->p_vaddr;
373 if (k > last_bss)
374 last_bss = k;
375 pr_debug("\n");
376 }
340 } 377 }
341 378
342 /* Now use mmap to map the library into memory. */ 379 /* Now use mmap to map the library into memory. */
343 if(error < 0 && error > -1024) { 380 if (error < 0 && error > -1024) {
344 pr_debug("got error %d\n", error); 381 pr_debug("got error %d\n", error);
345 kfree(elf_phdata); 382 kfree(elf_phdata);
346 return 0xffffffff; 383 return 0xffffffff;
@@ -377,7 +414,7 @@ static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm)
377 return -ENOEXEC; 414 return -ENOEXEC;
378 415
379 /* First of all, some simple consistency checks */ 416 /* First of all, some simple consistency checks */
380 if((ehp->e_type != ET_EXEC && ehp->e_type != ET_DYN) || 417 if ((ehp->e_type != ET_EXEC && ehp->e_type != ET_DYN) ||
381 !bprm->file->f_op->mmap) { 418 !bprm->file->f_op->mmap) {
382 return -ENOEXEC; 419 return -ENOEXEC;
383 } 420 }
@@ -388,7 +425,7 @@ static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm)
388 * XXX all registers as 64bits on cpu's capable of this at 425 * XXX all registers as 64bits on cpu's capable of this at
389 * XXX exception time plus frob the XTLB exception vector. 426 * XXX exception time plus frob the XTLB exception vector.
390 */ 427 */
391 if((ehp->e_flags & EF_MIPS_ABI2)) 428 if ((ehp->e_flags & EF_MIPS_ABI2))
392 return -ENOEXEC; 429 return -ENOEXEC;
393 430
394 return 0; 431 return 0;
@@ -410,7 +447,7 @@ static inline int look_for_irix_interpreter(char **name,
410 struct file *file = NULL; 447 struct file *file = NULL;
411 448
412 *name = NULL; 449 *name = NULL;
413 for(i = 0; i < pnum; i++, epp++) { 450 for (i = 0; i < pnum; i++, epp++) {
414 if (epp->p_type != PT_INTERP) 451 if (epp->p_type != PT_INTERP)
415 continue; 452 continue;
416 453
@@ -467,8 +504,8 @@ static inline void map_executable(struct file *fp, struct elf_phdr *epp, int pnu
467 unsigned int tmp; 504 unsigned int tmp;
468 int i, prot; 505 int i, prot;
469 506
470 for(i = 0; i < pnum; i++, epp++) { 507 for (i = 0; i < pnum; i++, epp++) {
471 if(epp->p_type != PT_LOAD) 508 if (epp->p_type != PT_LOAD)
472 continue; 509 continue;
473 510
474 /* Map it. */ 511 /* Map it. */
@@ -483,23 +520,23 @@ static inline void map_executable(struct file *fp, struct elf_phdr *epp, int pnu
483 up_write(&current->mm->mmap_sem); 520 up_write(&current->mm->mmap_sem);
484 521
485 /* Fixup location tracking vars. */ 522 /* Fixup location tracking vars. */
486 if((epp->p_vaddr & 0xfffff000) < *estack) 523 if ((epp->p_vaddr & 0xfffff000) < *estack)
487 *estack = (epp->p_vaddr & 0xfffff000); 524 *estack = (epp->p_vaddr & 0xfffff000);
488 if(!*laddr) 525 if (!*laddr)
489 *laddr = epp->p_vaddr - epp->p_offset; 526 *laddr = epp->p_vaddr - epp->p_offset;
490 if(epp->p_vaddr < *scode) 527 if (epp->p_vaddr < *scode)
491 *scode = epp->p_vaddr; 528 *scode = epp->p_vaddr;
492 529
493 tmp = epp->p_vaddr + epp->p_filesz; 530 tmp = epp->p_vaddr + epp->p_filesz;
494 if(tmp > *ebss) 531 if (tmp > *ebss)
495 *ebss = tmp; 532 *ebss = tmp;
496 if((epp->p_flags & PF_X) && *ecode < tmp) 533 if ((epp->p_flags & PF_X) && *ecode < tmp)
497 *ecode = tmp; 534 *ecode = tmp;
498 if(*edata < tmp) 535 if (*edata < tmp)
499 *edata = tmp; 536 *edata = tmp;
500 537
501 tmp = epp->p_vaddr + epp->p_memsz; 538 tmp = epp->p_vaddr + epp->p_memsz;
502 if(tmp > *ebrk) 539 if (tmp > *ebrk)
503 *ebrk = tmp; 540 *ebrk = tmp;
504 } 541 }
505 542
@@ -513,12 +550,12 @@ static inline int map_interpreter(struct elf_phdr *epp, struct elfhdr *ihp,
513 int i; 550 int i;
514 551
515 *eentry = 0xffffffff; 552 *eentry = 0xffffffff;
516 for(i = 0; i < pnum; i++, epp++) { 553 for (i = 0; i < pnum; i++, epp++) {
517 if(epp->p_type != PT_INTERP) 554 if (epp->p_type != PT_INTERP)
518 continue; 555 continue;
519 556
520 /* We should have fielded this error elsewhere... */ 557 /* We should have fielded this error elsewhere... */
521 if(*eentry != 0xffffffff) 558 if (*eentry != 0xffffffff)
522 return -1; 559 return -1;
523 560
524 set_fs(old_fs); 561 set_fs(old_fs);
@@ -604,9 +641,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
604 if (elf_ex.e_shnum > 20) 641 if (elf_ex.e_shnum > 20)
605 goto out; 642 goto out;
606 643
607#ifdef DEBUG
608 print_elfhdr(&elf_ex); 644 print_elfhdr(&elf_ex);
609#endif
610 645
611 /* Now read in all of the header information */ 646 /* Now read in all of the header information */
612 size = elf_ex.e_phentsize * elf_ex.e_phnum; 647 size = elf_ex.e_phentsize * elf_ex.e_phnum;
@@ -622,13 +657,11 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
622 if (retval < 0) 657 if (retval < 0)
623 goto out_free_ph; 658 goto out_free_ph;
624 659
625#ifdef DEBUG
626 dump_phdrs(elf_phdata, elf_ex.e_phnum); 660 dump_phdrs(elf_phdata, elf_ex.e_phnum);
627#endif
628 661
629 /* Set some things for later. */ 662 /* Set some things for later. */
630 for(i = 0; i < elf_ex.e_phnum; i++) { 663 for (i = 0; i < elf_ex.e_phnum; i++) {
631 switch(elf_phdata[i].p_type) { 664 switch (elf_phdata[i].p_type) {
632 case PT_INTERP: 665 case PT_INTERP:
633 has_interp = 1; 666 has_interp = 1;
634 elf_ihdr = &elf_phdata[i]; 667 elf_ihdr = &elf_phdata[i];
@@ -667,7 +700,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
667 700
668 if (elf_interpreter) { 701 if (elf_interpreter) {
669 retval = verify_irix_interpreter(&interp_elf_ex); 702 retval = verify_irix_interpreter(&interp_elf_ex);
670 if(retval) 703 if (retval)
671 goto out_free_interp; 704 goto out_free_interp;
672 } 705 }
673 706
@@ -706,12 +739,12 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
706 &load_addr, &start_code, &elf_bss, &end_code, 739 &load_addr, &start_code, &elf_bss, &end_code,
707 &end_data, &elf_brk); 740 &end_data, &elf_brk);
708 741
709 if(elf_interpreter) { 742 if (elf_interpreter) {
710 retval = map_interpreter(elf_phdata, &interp_elf_ex, 743 retval = map_interpreter(elf_phdata, &interp_elf_ex,
711 interpreter, &interp_load_addr, 744 interpreter, &interp_load_addr,
712 elf_ex.e_phnum, old_fs, &elf_entry); 745 elf_ex.e_phnum, old_fs, &elf_entry);
713 kfree(elf_interpreter); 746 kfree(elf_interpreter);
714 if(retval) { 747 if (retval) {
715 set_fs(old_fs); 748 set_fs(old_fs);
716 printk("Unable to load IRIX ELF interpreter\n"); 749 printk("Unable to load IRIX ELF interpreter\n");
717 send_sig(SIGSEGV, current, 0); 750 send_sig(SIGSEGV, current, 0);
@@ -809,12 +842,12 @@ static int load_irix_library(struct file *file)
809 return -ENOEXEC; 842 return -ENOEXEC;
810 843
811 /* First of all, some simple consistency checks. */ 844 /* First of all, some simple consistency checks. */
812 if(elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 || 845 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
813 !file->f_op->mmap) 846 !file->f_op->mmap)
814 return -ENOEXEC; 847 return -ENOEXEC;
815 848
816 /* Now read in all of the header information. */ 849 /* Now read in all of the header information. */
817 if(sizeof(struct elf_phdr) * elf_ex.e_phnum > PAGE_SIZE) 850 if (sizeof(struct elf_phdr) * elf_ex.e_phnum > PAGE_SIZE)
818 return -ENOEXEC; 851 return -ENOEXEC;
819 852
820 elf_phdata = kmalloc(sizeof(struct elf_phdr) * elf_ex.e_phnum, GFP_KERNEL); 853 elf_phdata = kmalloc(sizeof(struct elf_phdr) * elf_ex.e_phnum, GFP_KERNEL);
@@ -825,15 +858,15 @@ static int load_irix_library(struct file *file)
825 sizeof(struct elf_phdr) * elf_ex.e_phnum); 858 sizeof(struct elf_phdr) * elf_ex.e_phnum);
826 859
827 j = 0; 860 j = 0;
828 for(i=0; i<elf_ex.e_phnum; i++) 861 for (i=0; i<elf_ex.e_phnum; i++)
829 if((elf_phdata + i)->p_type == PT_LOAD) j++; 862 if ((elf_phdata + i)->p_type == PT_LOAD) j++;
830 863
831 if(j != 1) { 864 if (j != 1) {
832 kfree(elf_phdata); 865 kfree(elf_phdata);
833 return -ENOEXEC; 866 return -ENOEXEC;
834 } 867 }
835 868
836 while(elf_phdata->p_type != PT_LOAD) elf_phdata++; 869 while (elf_phdata->p_type != PT_LOAD) elf_phdata++;
837 870
838 /* Now use mmap to map the library into memory. */ 871 /* Now use mmap to map the library into memory. */
839 down_write(&current->mm->mmap_sem); 872 down_write(&current->mm->mmap_sem);
@@ -889,9 +922,7 @@ unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt)
889 return -EFAULT; 922 return -EFAULT;
890 } 923 }
891 924
892#ifdef DEBUG
893 dump_phdrs(user_phdrp, cnt); 925 dump_phdrs(user_phdrp, cnt);
894#endif
895 926
896 for (i = 0; i < cnt; i++, hp++) { 927 for (i = 0; i < cnt; i++, hp++) {
897 if (__get_user(type, &hp->p_type)) 928 if (__get_user(type, &hp->p_type))
@@ -905,14 +936,14 @@ unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt)
905 filp = fget(fd); 936 filp = fget(fd);
906 if (!filp) 937 if (!filp)
907 return -EACCES; 938 return -EACCES;
908 if(!filp->f_op) { 939 if (!filp->f_op) {
909 printk("irix_mapelf: Bogon filp!\n"); 940 printk("irix_mapelf: Bogon filp!\n");
910 fput(filp); 941 fput(filp);
911 return -EACCES; 942 return -EACCES;
912 } 943 }
913 944
914 hp = user_phdrp; 945 hp = user_phdrp;
915 for(i = 0; i < cnt; i++, hp++) { 946 for (i = 0; i < cnt; i++, hp++) {
916 int prot; 947 int prot;
917 948
918 retval = __get_user(vaddr, &hp->p_vaddr); 949 retval = __get_user(vaddr, &hp->p_vaddr);
@@ -1015,8 +1046,6 @@ static int notesize(struct memelfnote *en)
1015 return sz; 1046 return sz;
1016} 1047}
1017 1048
1018/* #define DEBUG */
1019
1020#define DUMP_WRITE(addr, nr) \ 1049#define DUMP_WRITE(addr, nr) \
1021 if (!dump_write(file, (addr), (nr))) \ 1050 if (!dump_write(file, (addr), (nr))) \
1022 goto end_coredump; 1051 goto end_coredump;
@@ -1093,9 +1122,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1093 1122
1094 segs++; 1123 segs++;
1095 } 1124 }
1096#ifdef DEBUG 1125 pr_debug("irix_core_dump: %d segs taking %d bytes\n", segs, size);
1097 printk("irix_core_dump: %d segs taking %d bytes\n", segs, size);
1098#endif
1099 1126
1100 /* Set up header. */ 1127 /* Set up header. */
1101 memcpy(elf.e_ident, ELFMAG, SELFMAG); 1128 memcpy(elf.e_ident, ELFMAG, SELFMAG);
@@ -1221,7 +1248,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1221 struct elf_phdr phdr; 1248 struct elf_phdr phdr;
1222 int sz = 0; 1249 int sz = 0;
1223 1250
1224 for(i = 0; i < numnote; i++) 1251 for (i = 0; i < numnote; i++)
1225 sz += notesize(&notes[i]); 1252 sz += notesize(&notes[i]);
1226 1253
1227 phdr.p_type = PT_NOTE; 1254 phdr.p_type = PT_NOTE;
@@ -1241,7 +1268,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1241 dataoff = offset = roundup(offset, PAGE_SIZE); 1268 dataoff = offset = roundup(offset, PAGE_SIZE);
1242 1269
1243 /* Write program headers for segments dump. */ 1270 /* Write program headers for segments dump. */
1244 for(vma = current->mm->mmap, i = 0; 1271 for (vma = current->mm->mmap, i = 0;
1245 i < segs && vma != NULL; vma = vma->vm_next) { 1272 i < segs && vma != NULL; vma = vma->vm_next) {
1246 struct elf_phdr phdr; 1273 struct elf_phdr phdr;
1247 size_t sz; 1274 size_t sz;
@@ -1267,7 +1294,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1267 DUMP_WRITE(&phdr, sizeof(phdr)); 1294 DUMP_WRITE(&phdr, sizeof(phdr));
1268 } 1295 }
1269 1296
1270 for(i = 0; i < numnote; i++) 1297 for (i = 0; i < numnote; i++)
1271 if (!writenote(&notes[i], file)) 1298 if (!writenote(&notes[i], file))
1272 goto end_coredump; 1299 goto end_coredump;
1273 1300
@@ -1275,7 +1302,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1275 1302
1276 DUMP_SEEK(dataoff); 1303 DUMP_SEEK(dataoff);
1277 1304
1278 for(i = 0, vma = current->mm->mmap; 1305 for (i = 0, vma = current->mm->mmap;
1279 i < segs && vma != NULL; 1306 i < segs && vma != NULL;
1280 vma = vma->vm_next) { 1307 vma = vma->vm_next) {
1281 unsigned long addr = vma->vm_start; 1308 unsigned long addr = vma->vm_start;
@@ -1284,9 +1311,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
1284 if (!maydump(vma)) 1311 if (!maydump(vma))
1285 continue; 1312 continue;
1286 i++; 1313 i++;
1287#ifdef DEBUG 1314 pr_debug("elf_core_dump: writing %08lx %lx\n", addr, len);
1288 printk("elf_core_dump: writing %08lx %lx\n", addr, len);
1289#endif
1290 DUMP_WRITE((void __user *)addr, len); 1315 DUMP_WRITE((void __user *)addr, len);
1291 } 1316 }
1292 1317
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c
index bcaad6696082..2967537221e2 100644
--- a/arch/mips/kernel/irq-msc01.c
+++ b/arch/mips/kernel/irq-msc01.c
@@ -112,7 +112,7 @@ msc_bind_eic_interrupt (unsigned int irq, unsigned int set)
112} 112}
113 113
114struct irq_chip msc_levelirq_type = { 114struct irq_chip msc_levelirq_type = {
115 .typename = "SOC-it-Level", 115 .name = "SOC-it-Level",
116 .ack = level_mask_and_ack_msc_irq, 116 .ack = level_mask_and_ack_msc_irq,
117 .mask = mask_msc_irq, 117 .mask = mask_msc_irq,
118 .mask_ack = level_mask_and_ack_msc_irq, 118 .mask_ack = level_mask_and_ack_msc_irq,
@@ -122,7 +122,7 @@ struct irq_chip msc_levelirq_type = {
122}; 122};
123 123
124struct irq_chip msc_edgeirq_type = { 124struct irq_chip msc_edgeirq_type = {
125 .typename = "SOC-it-Edge", 125 .name = "SOC-it-Edge",
126 .ack = edge_mask_and_ack_msc_irq, 126 .ack = edge_mask_and_ack_msc_irq,
127 .mask = mask_msc_irq, 127 .mask = mask_msc_irq,
128 .mask_ack = edge_mask_and_ack_msc_irq, 128 .mask_ack = edge_mask_and_ack_msc_irq,
diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c
index efbd219845b5..3dd561832e4c 100644
--- a/arch/mips/kernel/irq-mv6434x.c
+++ b/arch/mips/kernel/irq-mv6434x.c
@@ -23,13 +23,13 @@ static unsigned int irq_base;
23 23
24static inline int ls1bit32(unsigned int x) 24static inline int ls1bit32(unsigned int x)
25{ 25{
26 int b = 31, s; 26 int b = 31, s;
27 27
28 s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s; 28 s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
29 s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s; 29 s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s;
30 s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s; 30 s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s;
31 s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s; 31 s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s;
32 s = 1; if (x << 1 == 0) s = 0; b -= s; 32 s = 1; if (x << 1 == 0) s = 0; b -= s;
33 33
34 return b; 34 return b;
35} 35}
@@ -92,7 +92,7 @@ void ll_mv64340_irq(void)
92} 92}
93 93
94struct irq_chip mv64340_irq_type = { 94struct irq_chip mv64340_irq_type = {
95 .typename = "MV-64340", 95 .name = "MV-64340",
96 .ack = mask_mv64340_irq, 96 .ack = mask_mv64340_irq,
97 .mask = mask_mv64340_irq, 97 .mask = mask_mv64340_irq,
98 .mask_ack = mask_mv64340_irq, 98 .mask_ack = mask_mv64340_irq,
diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c
index 123324ba8c14..250732883488 100644
--- a/arch/mips/kernel/irq-rm7000.c
+++ b/arch/mips/kernel/irq-rm7000.c
@@ -17,28 +17,27 @@
17#include <asm/mipsregs.h> 17#include <asm/mipsregs.h>
18#include <asm/system.h> 18#include <asm/system.h>
19 19
20static int irq_base;
21
22static inline void unmask_rm7k_irq(unsigned int irq) 20static inline void unmask_rm7k_irq(unsigned int irq)
23{ 21{
24 set_c0_intcontrol(0x100 << (irq - irq_base)); 22 set_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
25} 23}
26 24
27static inline void mask_rm7k_irq(unsigned int irq) 25static inline void mask_rm7k_irq(unsigned int irq)
28{ 26{
29 clear_c0_intcontrol(0x100 << (irq - irq_base)); 27 clear_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
30} 28}
31 29
32static struct irq_chip rm7k_irq_controller = { 30static struct irq_chip rm7k_irq_controller = {
33 .typename = "RM7000", 31 .name = "RM7000",
34 .ack = mask_rm7k_irq, 32 .ack = mask_rm7k_irq,
35 .mask = mask_rm7k_irq, 33 .mask = mask_rm7k_irq,
36 .mask_ack = mask_rm7k_irq, 34 .mask_ack = mask_rm7k_irq,
37 .unmask = unmask_rm7k_irq, 35 .unmask = unmask_rm7k_irq,
38}; 36};
39 37
40void __init rm7k_cpu_irq_init(int base) 38void __init rm7k_cpu_irq_init(void)
41{ 39{
40 int base = RM7K_CPU_IRQ_BASE;
42 int i; 41 int i;
43 42
44 clear_c0_intcontrol(0x00000f00); /* Mask all */ 43 clear_c0_intcontrol(0x00000f00); /* Mask all */
@@ -46,6 +45,4 @@ void __init rm7k_cpu_irq_init(int base)
46 for (i = base; i < base + 4; i++) 45 for (i = base; i < base + 4; i++)
47 set_irq_chip_and_handler(i, &rm7k_irq_controller, 46 set_irq_chip_and_handler(i, &rm7k_irq_controller,
48 handle_level_irq); 47 handle_level_irq);
49
50 irq_base = base;
51} 48}
diff --git a/arch/mips/kernel/irq-rm9000.c b/arch/mips/kernel/irq-rm9000.c
index 0e6f4c5349d2..ae83d2df6f31 100644
--- a/arch/mips/kernel/irq-rm9000.c
+++ b/arch/mips/kernel/irq-rm9000.c
@@ -18,16 +18,14 @@
18#include <asm/mipsregs.h> 18#include <asm/mipsregs.h>
19#include <asm/system.h> 19#include <asm/system.h>
20 20
21static int irq_base;
22
23static inline void unmask_rm9k_irq(unsigned int irq) 21static inline void unmask_rm9k_irq(unsigned int irq)
24{ 22{
25 set_c0_intcontrol(0x1000 << (irq - irq_base)); 23 set_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
26} 24}
27 25
28static inline void mask_rm9k_irq(unsigned int irq) 26static inline void mask_rm9k_irq(unsigned int irq)
29{ 27{
30 clear_c0_intcontrol(0x1000 << (irq - irq_base)); 28 clear_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
31} 29}
32 30
33static inline void rm9k_cpu_irq_enable(unsigned int irq) 31static inline void rm9k_cpu_irq_enable(unsigned int irq)
@@ -39,15 +37,6 @@ static inline void rm9k_cpu_irq_enable(unsigned int irq)
39 local_irq_restore(flags); 37 local_irq_restore(flags);
40} 38}
41 39
42static void rm9k_cpu_irq_disable(unsigned int irq)
43{
44 unsigned long flags;
45
46 local_irq_save(flags);
47 mask_rm9k_irq(irq);
48 local_irq_restore(flags);
49}
50
51/* 40/*
52 * Performance counter interrupts are global on all processors. 41 * Performance counter interrupts are global on all processors.
53 */ 42 */
@@ -81,7 +70,7 @@ static void rm9k_perfcounter_irq_shutdown(unsigned int irq)
81} 70}
82 71
83static struct irq_chip rm9k_irq_controller = { 72static struct irq_chip rm9k_irq_controller = {
84 .typename = "RM9000", 73 .name = "RM9000",
85 .ack = mask_rm9k_irq, 74 .ack = mask_rm9k_irq,
86 .mask = mask_rm9k_irq, 75 .mask = mask_rm9k_irq,
87 .mask_ack = mask_rm9k_irq, 76 .mask_ack = mask_rm9k_irq,
@@ -89,7 +78,7 @@ static struct irq_chip rm9k_irq_controller = {
89}; 78};
90 79
91static struct irq_chip rm9k_perfcounter_irq = { 80static struct irq_chip rm9k_perfcounter_irq = {
92 .typename = "RM9000", 81 .name = "RM9000",
93 .startup = rm9k_perfcounter_irq_startup, 82 .startup = rm9k_perfcounter_irq_startup,
94 .shutdown = rm9k_perfcounter_irq_shutdown, 83 .shutdown = rm9k_perfcounter_irq_shutdown,
95 .ack = mask_rm9k_irq, 84 .ack = mask_rm9k_irq,
@@ -102,8 +91,9 @@ unsigned int rm9000_perfcount_irq;
102 91
103EXPORT_SYMBOL(rm9000_perfcount_irq); 92EXPORT_SYMBOL(rm9000_perfcount_irq);
104 93
105void __init rm9k_cpu_irq_init(int base) 94void __init rm9k_cpu_irq_init(void)
106{ 95{
96 int base = RM9K_CPU_IRQ_BASE;
107 int i; 97 int i;
108 98
109 clear_c0_intcontrol(0x0000f000); /* Mask all */ 99 clear_c0_intcontrol(0x0000f000); /* Mask all */
@@ -115,6 +105,4 @@ void __init rm9k_cpu_irq_init(int base)
115 rm9000_perfcount_irq = base + 1; 105 rm9000_perfcount_irq = base + 1;
116 set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq, 106 set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq,
117 handle_level_irq); 107 handle_level_irq);
118
119 irq_base = base;
120} 108}
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index fcc86b96ccf6..7b66e03b5899 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -25,7 +25,7 @@
25 * Don't even think about using this on SMP. You have been warned. 25 * Don't even think about using this on SMP. You have been warned.
26 * 26 *
27 * This file exports one global function: 27 * This file exports one global function:
28 * void mips_cpu_irq_init(int irq_base); 28 * void mips_cpu_irq_init(void);
29 */ 29 */
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/interrupt.h> 31#include <linux/interrupt.h>
@@ -36,22 +36,20 @@
36#include <asm/mipsmtregs.h> 36#include <asm/mipsmtregs.h>
37#include <asm/system.h> 37#include <asm/system.h>
38 38
39static int mips_cpu_irq_base;
40
41static inline void unmask_mips_irq(unsigned int irq) 39static inline void unmask_mips_irq(unsigned int irq)
42{ 40{
43 set_c0_status(0x100 << (irq - mips_cpu_irq_base)); 41 set_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
44 irq_enable_hazard(); 42 irq_enable_hazard();
45} 43}
46 44
47static inline void mask_mips_irq(unsigned int irq) 45static inline void mask_mips_irq(unsigned int irq)
48{ 46{
49 clear_c0_status(0x100 << (irq - mips_cpu_irq_base)); 47 clear_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
50 irq_disable_hazard(); 48 irq_disable_hazard();
51} 49}
52 50
53static struct irq_chip mips_cpu_irq_controller = { 51static struct irq_chip mips_cpu_irq_controller = {
54 .typename = "MIPS", 52 .name = "MIPS",
55 .ack = mask_mips_irq, 53 .ack = mask_mips_irq,
56 .mask = mask_mips_irq, 54 .mask = mask_mips_irq,
57 .mask_ack = mask_mips_irq, 55 .mask_ack = mask_mips_irq,
@@ -70,7 +68,7 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
70{ 68{
71 unsigned int vpflags = dvpe(); 69 unsigned int vpflags = dvpe();
72 70
73 clear_c0_cause(0x100 << (irq - mips_cpu_irq_base)); 71 clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
74 evpe(vpflags); 72 evpe(vpflags);
75 unmask_mips_mt_irq(irq); 73 unmask_mips_mt_irq(irq);
76 74
@@ -84,13 +82,13 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
84static void mips_mt_cpu_irq_ack(unsigned int irq) 82static void mips_mt_cpu_irq_ack(unsigned int irq)
85{ 83{
86 unsigned int vpflags = dvpe(); 84 unsigned int vpflags = dvpe();
87 clear_c0_cause(0x100 << (irq - mips_cpu_irq_base)); 85 clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
88 evpe(vpflags); 86 evpe(vpflags);
89 mask_mips_mt_irq(irq); 87 mask_mips_mt_irq(irq);
90} 88}
91 89
92static struct irq_chip mips_mt_cpu_irq_controller = { 90static struct irq_chip mips_mt_cpu_irq_controller = {
93 .typename = "MIPS", 91 .name = "MIPS",
94 .startup = mips_mt_cpu_irq_startup, 92 .startup = mips_mt_cpu_irq_startup,
95 .ack = mips_mt_cpu_irq_ack, 93 .ack = mips_mt_cpu_irq_ack,
96 .mask = mask_mips_mt_irq, 94 .mask = mask_mips_mt_irq,
@@ -99,8 +97,9 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
99 .eoi = unmask_mips_mt_irq, 97 .eoi = unmask_mips_mt_irq,
100}; 98};
101 99
102void __init mips_cpu_irq_init(int irq_base) 100void __init mips_cpu_irq_init(void)
103{ 101{
102 int irq_base = MIPS_CPU_IRQ_BASE;
104 int i; 103 int i;
105 104
106 /* Mask interrupts. */ 105 /* Mask interrupts. */
@@ -118,6 +117,4 @@ void __init mips_cpu_irq_init(int irq_base)
118 for (i = irq_base + 2; i < irq_base + 8; i++) 117 for (i = irq_base + 2; i < irq_base + 8; i++)
119 set_irq_chip_and_handler(i, &mips_cpu_irq_controller, 118 set_irq_chip_and_handler(i, &mips_cpu_irq_controller,
120 handle_level_irq); 119 handle_level_irq);
121
122 mips_cpu_irq_base = irq_base;
123} 120}
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index de3fae260ff8..fc4dd6c9dd80 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -39,6 +39,7 @@
39#include <net/sock.h> 39#include <net/sock.h>
40#include <net/scm.h> 40#include <net/scm.h>
41 41
42#include <asm/compat-signal.h>
42#include <asm/ipc.h> 43#include <asm/ipc.h>
43#include <asm/sim.h> 44#include <asm/sim.h>
44#include <asm/uaccess.h> 45#include <asm/uaccess.h>
@@ -193,50 +194,6 @@ sysn32_waitid(int which, compat_pid_t pid,
193 return ret; 194 return ret;
194} 195}
195 196
196struct sysinfo32 {
197 s32 uptime;
198 u32 loads[3];
199 u32 totalram;
200 u32 freeram;
201 u32 sharedram;
202 u32 bufferram;
203 u32 totalswap;
204 u32 freeswap;
205 u16 procs;
206 u32 totalhigh;
207 u32 freehigh;
208 u32 mem_unit;
209 char _f[8];
210};
211
212asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info)
213{
214 struct sysinfo s;
215 int ret, err;
216 mm_segment_t old_fs = get_fs ();
217
218 set_fs (KERNEL_DS);
219 ret = sys_sysinfo((struct sysinfo __user *)&s);
220 set_fs (old_fs);
221 err = put_user (s.uptime, &info->uptime);
222 err |= __put_user (s.loads[0], &info->loads[0]);
223 err |= __put_user (s.loads[1], &info->loads[1]);
224 err |= __put_user (s.loads[2], &info->loads[2]);
225 err |= __put_user (s.totalram, &info->totalram);
226 err |= __put_user (s.freeram, &info->freeram);
227 err |= __put_user (s.sharedram, &info->sharedram);
228 err |= __put_user (s.bufferram, &info->bufferram);
229 err |= __put_user (s.totalswap, &info->totalswap);
230 err |= __put_user (s.freeswap, &info->freeswap);
231 err |= __put_user (s.procs, &info->procs);
232 err |= __put_user (s.totalhigh, &info->totalhigh);
233 err |= __put_user (s.freehigh, &info->freehigh);
234 err |= __put_user (s.mem_unit, &info->mem_unit);
235 if (err)
236 return -EFAULT;
237 return ret;
238}
239
240#define RLIM_INFINITY32 0x7fffffff 197#define RLIM_INFINITY32 0x7fffffff
241#define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) 198#define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x)
242 199
@@ -558,7 +515,7 @@ extern asmlinkage long sys_ustat(dev_t dev, struct ustat __user * ubuf);
558asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32) 515asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32)
559{ 516{
560 int err; 517 int err;
561 struct ustat tmp; 518 struct ustat tmp;
562 struct ustat32 tmp32; 519 struct ustat32 tmp32;
563 mm_segment_t old_fs = get_fs(); 520 mm_segment_t old_fs = get_fs();
564 521
@@ -569,11 +526,11 @@ asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32)
569 if (err) 526 if (err)
570 goto out; 527 goto out;
571 528
572 memset(&tmp32,0,sizeof(struct ustat32)); 529 memset(&tmp32,0,sizeof(struct ustat32));
573 tmp32.f_tfree = tmp.f_tfree; 530 tmp32.f_tfree = tmp.f_tfree;
574 tmp32.f_tinode = tmp.f_tinode; 531 tmp32.f_tinode = tmp.f_tinode;
575 532
576 err = copy_to_user(ubuf32,&tmp32,sizeof(struct ustat32)) ? -EFAULT : 0; 533 err = copy_to_user(ubuf32,&tmp32,sizeof(struct ustat32)) ? -EFAULT : 0;
577 534
578out: 535out:
579 return err; 536 return err;
@@ -780,3 +737,49 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs)
780 return do_fork(clone_flags, newsp, &regs, 0, 737 return do_fork(clone_flags, newsp, &regs, 0,
781 parent_tidptr, child_tidptr); 738 parent_tidptr, child_tidptr);
782} 739}
740
741/*
742 * Implement the event wait interface for the eventpoll file. It is the kernel
743 * part of the user space epoll_pwait(2).
744 */
745asmlinkage long compat_sys_epoll_pwait(int epfd,
746 struct epoll_event __user *events, int maxevents, int timeout,
747 const compat_sigset_t __user *sigmask, size_t sigsetsize)
748{
749 int error;
750 sigset_t ksigmask, sigsaved;
751
752 /*
753 * If the caller wants a certain signal mask to be set during the wait,
754 * we apply it here.
755 */
756 if (sigmask) {
757 if (sigsetsize != sizeof(sigset_t))
758 return -EINVAL;
759 if (!access_ok(VERIFY_READ, sigmask, sizeof(ksigmask)))
760 return -EFAULT;
761 if (__copy_conv_sigset_from_user(&ksigmask, sigmask))
762 return -EFAULT;
763 sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
764 sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
765 }
766
767 error = sys_epoll_wait(epfd, events, maxevents, timeout);
768
769 /*
770 * If we changed the signal mask, we need to restore the original one.
771 * In case we've got a signal while waiting, we do not restore the
772 * signal mask yet, and we allow do_signal() to deliver the signal on
773 * the way back to userspace, before the signal mask is restored.
774 */
775 if (sigmask) {
776 if (error == -EINTR) {
777 memcpy(&current->saved_sigmask, &sigsaved,
778 sizeof(sigsaved));
779 set_thread_flag(TIF_RESTORE_SIGMASK);
780 } else
781 sigprocmask(SIG_SETMASK, &sigsaved, NULL);
782 }
783
784 return error;
785}
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index e0ad754c7edd..8f42fa85ac9e 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -13,8 +13,8 @@
13#include <asm/cacheflush.h> 13#include <asm/cacheflush.h>
14#include <asm/page.h> 14#include <asm/page.h>
15 15
16const extern unsigned char relocate_new_kernel[]; 16extern const unsigned char relocate_new_kernel[];
17const extern unsigned int relocate_new_kernel_size; 17extern const unsigned int relocate_new_kernel_size;
18 18
19extern unsigned long kexec_start_address; 19extern unsigned long kexec_start_address;
20extern unsigned long kexec_indirection_page; 20extern unsigned long kexec_indirection_page;
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index c1373a6e668b..ba01800b6018 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -3,9 +3,11 @@
3 * Copyright (C) 2005 Mips Technologies, Inc 3 * Copyright (C) 2005 Mips Technologies, Inc
4 */ 4 */
5 5
6#include <linux/device.h>
6#include <linux/kernel.h> 7#include <linux/kernel.h>
7#include <linux/sched.h> 8#include <linux/sched.h>
8#include <linux/cpumask.h> 9#include <linux/cpumask.h>
10#include <linux/module.h>
9#include <linux/interrupt.h> 11#include <linux/interrupt.h>
10#include <linux/security.h> 12#include <linux/security.h>
11 13
@@ -96,6 +98,10 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
96 goto out_unlock; 98 goto out_unlock;
97 } 99 }
98 100
101 retval = security_task_setscheduler(p, 0, NULL);
102 if (retval)
103 goto out_unlock;
104
99 /* Record new user-specified CPU set for future reference */ 105 /* Record new user-specified CPU set for future reference */
100 p->thread.user_cpus_allowed = new_mask; 106 p->thread.user_cpus_allowed = new_mask;
101 107
@@ -141,8 +147,9 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
141 p = find_process_by_pid(pid); 147 p = find_process_by_pid(pid);
142 if (!p) 148 if (!p)
143 goto out_unlock; 149 goto out_unlock;
144 150 retval = security_task_getscheduler(p);
145 retval = 0; 151 if (retval)
152 goto out_unlock;
146 153
147 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map); 154 cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
148 155
@@ -448,3 +455,20 @@ void mt_cflush_release(void)
448#endif /* CONFIG_MIPS_MT_SMTC */ 455#endif /* CONFIG_MIPS_MT_SMTC */
449 /* FILL IN VSMP and AP/SP VERSIONS HERE */ 456 /* FILL IN VSMP and AP/SP VERSIONS HERE */
450} 457}
458
459struct class *mt_class;
460
461static int __init mt_init(void)
462{
463 struct class *mtc;
464
465 mtc = class_create(THIS_MODULE, "mt");
466 if (IS_ERR(mtc))
467 return PTR_ERR(mtc);
468
469 mt_class = mtc;
470
471 return 0;
472}
473
474subsys_initcall(mt_init);
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 4ed37ba19731..5ddc2e9deecf 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -31,13 +31,13 @@ static const char *cpu_name[] = {
31 [CPU_R4000PC] = "R4000PC", 31 [CPU_R4000PC] = "R4000PC",
32 [CPU_R4000SC] = "R4000SC", 32 [CPU_R4000SC] = "R4000SC",
33 [CPU_R4000MC] = "R4000MC", 33 [CPU_R4000MC] = "R4000MC",
34 [CPU_R4200] = "R4200", 34 [CPU_R4200] = "R4200",
35 [CPU_R4400PC] = "R4400PC", 35 [CPU_R4400PC] = "R4400PC",
36 [CPU_R4400SC] = "R4400SC", 36 [CPU_R4400SC] = "R4400SC",
37 [CPU_R4400MC] = "R4400MC", 37 [CPU_R4400MC] = "R4400MC",
38 [CPU_R4600] = "R4600", 38 [CPU_R4600] = "R4600",
39 [CPU_R6000] = "R6000", 39 [CPU_R6000] = "R6000",
40 [CPU_R6000A] = "R6000A", 40 [CPU_R6000A] = "R6000A",
41 [CPU_R8000] = "R8000", 41 [CPU_R8000] = "R8000",
42 [CPU_R10000] = "R10000", 42 [CPU_R10000] = "R10000",
43 [CPU_R12000] = "R12000", 43 [CPU_R12000] = "R12000",
@@ -46,14 +46,14 @@ static const char *cpu_name[] = {
46 [CPU_R4650] = "R4650", 46 [CPU_R4650] = "R4650",
47 [CPU_R4700] = "R4700", 47 [CPU_R4700] = "R4700",
48 [CPU_R5000] = "R5000", 48 [CPU_R5000] = "R5000",
49 [CPU_R5000A] = "R5000A", 49 [CPU_R5000A] = "R5000A",
50 [CPU_R4640] = "R4640", 50 [CPU_R4640] = "R4640",
51 [CPU_NEVADA] = "Nevada", 51 [CPU_NEVADA] = "Nevada",
52 [CPU_RM7000] = "RM7000", 52 [CPU_RM7000] = "RM7000",
53 [CPU_RM9000] = "RM9000", 53 [CPU_RM9000] = "RM9000",
54 [CPU_R5432] = "R5432", 54 [CPU_R5432] = "R5432",
55 [CPU_4KC] = "MIPS 4Kc", 55 [CPU_4KC] = "MIPS 4Kc",
56 [CPU_5KC] = "MIPS 5Kc", 56 [CPU_5KC] = "MIPS 5Kc",
57 [CPU_R4310] = "R4310", 57 [CPU_R4310] = "R4310",
58 [CPU_SB1] = "SiByte SB1", 58 [CPU_SB1] = "SiByte SB1",
59 [CPU_SB1A] = "SiByte SB1A", 59 [CPU_SB1A] = "SiByte SB1A",
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index ec8209f3a0c6..a669089e4672 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -26,7 +26,6 @@
26#include <linux/completion.h> 26#include <linux/completion.h>
27#include <linux/kallsyms.h> 27#include <linux/kallsyms.h>
28 28
29#include <asm/abi.h>
30#include <asm/bootinfo.h> 29#include <asm/bootinfo.h>
31#include <asm/cpu.h> 30#include <asm/cpu.h>
32#include <asm/dsp.h> 31#include <asm/dsp.h>
@@ -41,10 +40,6 @@
41#include <asm/isadep.h> 40#include <asm/isadep.h>
42#include <asm/inst.h> 41#include <asm/inst.h>
43#include <asm/stacktrace.h> 42#include <asm/stacktrace.h>
44#ifdef CONFIG_MIPS_MT_SMTC
45#include <asm/mipsmtregs.h>
46extern void smtc_idle_loop_hook(void);
47#endif /* CONFIG_MIPS_MT_SMTC */
48 43
49/* 44/*
50 * The idle thread. There's no useful work to be done, so just try to conserve 45 * The idle thread. There's no useful work to be done, so just try to conserve
@@ -57,6 +52,8 @@ ATTRIB_NORET void cpu_idle(void)
57 while (1) { 52 while (1) {
58 while (!need_resched()) { 53 while (!need_resched()) {
59#ifdef CONFIG_MIPS_MT_SMTC 54#ifdef CONFIG_MIPS_MT_SMTC
55 extern void smtc_idle_loop_hook(void);
56
60 smtc_idle_loop_hook(); 57 smtc_idle_loop_hook();
61#endif /* CONFIG_MIPS_MT_SMTC */ 58#endif /* CONFIG_MIPS_MT_SMTC */
62 if (cpu_wait) 59 if (cpu_wait)
@@ -68,38 +65,6 @@ ATTRIB_NORET void cpu_idle(void)
68 } 65 }
69} 66}
70 67
71/*
72 * Native o32 and N64 ABI without DSP ASE
73 */
74struct mips_abi mips_abi = {
75 .do_signal = do_signal,
76#ifdef CONFIG_TRAD_SIGNALS
77 .setup_frame = setup_frame,
78#endif
79 .setup_rt_frame = setup_rt_frame
80};
81
82#ifdef CONFIG_MIPS32_O32
83/*
84 * o32 compatibility on 64-bit kernels, without DSP ASE
85 */
86struct mips_abi mips_abi_32 = {
87 .do_signal = do_signal32,
88 .setup_frame = setup_frame_32,
89 .setup_rt_frame = setup_rt_frame_32
90};
91#endif /* CONFIG_MIPS32_O32 */
92
93#ifdef CONFIG_MIPS32_N32
94/*
95 * N32 on 64-bit kernels, without DSP ASE
96 */
97struct mips_abi mips_abi_n32 = {
98 .do_signal = do_signal,
99 .setup_rt_frame = setup_rt_frame_n32
100};
101#endif /* CONFIG_MIPS32_N32 */
102
103asmlinkage void ret_from_fork(void); 68asmlinkage void ret_from_fork(void);
104 69
105void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) 70void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
@@ -248,7 +213,7 @@ int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
248/* 213/*
249 * Create a kernel thread 214 * Create a kernel thread
250 */ 215 */
251ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *)) 216static ATTRIB_NORET void kernel_thread_helper(void *arg, int (*fn)(void *))
252{ 217{
253 do_exit(fn(arg)); 218 do_exit(fn(arg));
254} 219}
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 258d74fd0b63..201ae194d1b8 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -236,6 +236,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
236 case MMLO: 236 case MMLO:
237 tmp = regs->lo; 237 tmp = regs->lo;
238 break; 238 break;
239#ifdef CONFIG_CPU_HAS_SMARTMIPS
240 case ACX:
241 tmp = regs->acx;
242 break;
243#endif
239 case FPC_CSR: 244 case FPC_CSR:
240 tmp = child->thread.fpu.fcr31; 245 tmp = child->thread.fpu.fcr31;
241 break; 246 break;
@@ -362,6 +367,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
362 case MMLO: 367 case MMLO:
363 regs->lo = data; 368 regs->lo = data;
364 break; 369 break;
370#ifdef CONFIG_CPU_HAS_SMARTMIPS
371 case ACX:
372 regs->acx = data;
373 break;
374#endif
365 case FPC_CSR: 375 case FPC_CSR:
366 child->thread.fpu.fcr31 = data; 376 child->thread.fpu.fcr31 = data;
367 break; 377 break;
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 880fa6e841ee..59c1577ecbb3 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -114,6 +114,14 @@ LEAF(_save_fp_context32)
114 */ 114 */
115LEAF(_restore_fp_context) 115LEAF(_restore_fp_context)
116 EX lw t0, SC_FPC_CSR(a0) 116 EX lw t0, SC_FPC_CSR(a0)
117
118 /* Fail if the CSR has exceptions pending */
119 srl t1, t0, 5
120 and t1, t0
121 andi t1, 0x1f << 7
122 bnez t1, fault
123 nop
124
117#ifdef CONFIG_64BIT 125#ifdef CONFIG_64BIT
118 EX ldc1 $f1, SC_FPREGS+8(a0) 126 EX ldc1 $f1, SC_FPREGS+8(a0)
119 EX ldc1 $f3, SC_FPREGS+24(a0) 127 EX ldc1 $f3, SC_FPREGS+24(a0)
@@ -157,6 +165,14 @@ LEAF(_restore_fp_context)
157LEAF(_restore_fp_context32) 165LEAF(_restore_fp_context32)
158 /* Restore an o32 sigcontext. */ 166 /* Restore an o32 sigcontext. */
159 EX lw t0, SC32_FPC_CSR(a0) 167 EX lw t0, SC32_FPC_CSR(a0)
168
169 /* Fail if the CSR has exceptions pending */
170 srl t1, t0, 5
171 and t1, t0
172 andi t1, 0x1f << 7
173 bnez t1, fault
174 nop
175
160 EX ldc1 $f0, SC32_FPREGS+0(a0) 176 EX ldc1 $f0, SC32_FPREGS+0(a0)
161 EX ldc1 $f2, SC32_FPREGS+16(a0) 177 EX ldc1 $f2, SC32_FPREGS+16(a0)
162 EX ldc1 $f4, SC32_FPREGS+32(a0) 178 EX ldc1 $f4, SC32_FPREGS+32(a0)
@@ -177,9 +193,10 @@ LEAF(_restore_fp_context32)
177 jr ra 193 jr ra
178 li v0, 0 # success 194 li v0, 0 # success
179 END(_restore_fp_context32) 195 END(_restore_fp_context32)
180 .set reorder
181#endif 196#endif
182 197
198 .set reorder
199
183 .type fault@function 200 .type fault@function
184 .ent fault 201 .ent fault
185fault: li v0, -EFAULT # failure 202fault: li v0, -EFAULT # failure
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 5a99e3e0c96d..d92c48e0d7a6 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -17,6 +17,7 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/device.h>
20#include <linux/kernel.h> 21#include <linux/kernel.h>
21#include <linux/module.h> 22#include <linux/module.h>
22#include <linux/fs.h> 23#include <linux/fs.h>
@@ -34,6 +35,7 @@
34#include <linux/sched.h> 35#include <linux/sched.h>
35#include <linux/wait.h> 36#include <linux/wait.h>
36#include <asm/mipsmtregs.h> 37#include <asm/mipsmtregs.h>
38#include <asm/mips_mt.h>
37#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
38#include <asm/atomic.h> 40#include <asm/atomic.h>
39#include <asm/cpu.h> 41#include <asm/cpu.h>
@@ -63,7 +65,7 @@ extern void *vpe_get_shared(int index);
63 65
64static void rtlx_dispatch(void) 66static void rtlx_dispatch(void)
65{ 67{
66 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ); 68 do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ);
67} 69}
68 70
69 71
@@ -476,7 +478,7 @@ static ssize_t file_write(struct file *file, const char __user * buffer,
476 return rtlx_write(minor, (void *)buffer, count, 1); 478 return rtlx_write(minor, (void *)buffer, count, 1);
477} 479}
478 480
479static struct file_operations rtlx_fops = { 481static const struct file_operations rtlx_fops = {
480 .owner = THIS_MODULE, 482 .owner = THIS_MODULE,
481 .open = file_open, 483 .open = file_open,
482 .release = file_release, 484 .release = file_release,
@@ -491,14 +493,15 @@ static struct irqaction rtlx_irq = {
491 .name = "RTLX", 493 .name = "RTLX",
492}; 494};
493 495
494static int rtlx_irq_num = MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ; 496static int rtlx_irq_num = MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ;
495 497
496static char register_chrdev_failed[] __initdata = 498static char register_chrdev_failed[] __initdata =
497 KERN_ERR "rtlx_module_init: unable to register device\n"; 499 KERN_ERR "rtlx_module_init: unable to register device\n";
498 500
499static int rtlx_module_init(void) 501static int rtlx_module_init(void)
500{ 502{
501 int i; 503 struct device *dev;
504 int i, err;
502 505
503 major = register_chrdev(0, module_name, &rtlx_fops); 506 major = register_chrdev(0, module_name, &rtlx_fops);
504 if (major < 0) { 507 if (major < 0) {
@@ -511,6 +514,13 @@ static int rtlx_module_init(void)
511 init_waitqueue_head(&channel_wqs[i].rt_queue); 514 init_waitqueue_head(&channel_wqs[i].rt_queue);
512 init_waitqueue_head(&channel_wqs[i].lx_queue); 515 init_waitqueue_head(&channel_wqs[i].lx_queue);
513 channel_wqs[i].in_open = 0; 516 channel_wqs[i].in_open = 0;
517
518 dev = device_create(mt_class, NULL, MKDEV(major, i),
519 "%s%d", module_name, i);
520 if (IS_ERR(dev)) {
521 err = PTR_ERR(dev);
522 goto out_chrdev;
523 }
514 } 524 }
515 525
516 /* set up notifiers */ 526 /* set up notifiers */
@@ -525,10 +535,21 @@ static int rtlx_module_init(void)
525 setup_irq(rtlx_irq_num, &rtlx_irq); 535 setup_irq(rtlx_irq_num, &rtlx_irq);
526 536
527 return 0; 537 return 0;
538
539out_chrdev:
540 for (i = 0; i < RTLX_CHANNELS; i++)
541 device_destroy(mt_class, MKDEV(major, i));
542
543 return err;
528} 544}
529 545
530static void __exit rtlx_module_exit(void) 546static void __exit rtlx_module_exit(void)
531{ 547{
548 int i;
549
550 for (i = 0; i < RTLX_CHANNELS; i++)
551 device_destroy(mt_class, MKDEV(major, i));
552
532 unregister_chrdev(major, module_name); 553 unregister_chrdev(major, module_name);
533} 554}
534 555
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index e569b846e9a3..10e9a18630aa 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -470,4 +470,4 @@ sys_call_table:
470 PTR sys_get_robust_list 470 PTR sys_get_robust_list
471 PTR sys_kexec_load /* 5270 */ 471 PTR sys_kexec_load /* 5270 */
472 PTR sys_getcpu 472 PTR sys_getcpu
473 PTR sys_epoll_pwait 473 PTR compat_sys_epoll_pwait
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index a7bff2a54723..2ceda4644a4d 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -217,7 +217,7 @@ EXPORT(sysn32_call_table)
217 PTR sys32_gettimeofday 217 PTR sys32_gettimeofday
218 PTR compat_sys_getrlimit /* 6095 */ 218 PTR compat_sys_getrlimit /* 6095 */
219 PTR compat_sys_getrusage 219 PTR compat_sys_getrusage
220 PTR sys32_sysinfo 220 PTR compat_sys_sysinfo
221 PTR compat_sys_times 221 PTR compat_sys_times
222 PTR sys32_ptrace 222 PTR sys32_ptrace
223 PTR sys_getuid /* 6100 */ 223 PTR sys_getuid /* 6100 */
@@ -384,7 +384,7 @@ EXPORT(sysn32_call_table)
384 PTR sys_readlinkat 384 PTR sys_readlinkat
385 PTR sys_fchmodat 385 PTR sys_fchmodat
386 PTR sys_faccessat 386 PTR sys_faccessat
387 PTR sys_pselect6 387 PTR compat_sys_pselect6
388 PTR sys_ppoll /* 6265 */ 388 PTR sys_ppoll /* 6265 */
389 PTR sys_unshare 389 PTR sys_unshare
390 PTR sys_splice 390 PTR sys_splice
@@ -396,4 +396,4 @@ EXPORT(sysn32_call_table)
396 PTR compat_sys_get_robust_list 396 PTR compat_sys_get_robust_list
397 PTR compat_sys_kexec_load 397 PTR compat_sys_kexec_load
398 PTR sys_getcpu 398 PTR sys_getcpu
399 PTR sys_epoll_pwait 399 PTR compat_sys_epoll_pwait
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index e91379c1be1d..c5f590ca99b0 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -321,7 +321,7 @@ sys_call_table:
321 PTR sys_ni_syscall /* sys_vm86 */ 321 PTR sys_ni_syscall /* sys_vm86 */
322 PTR compat_sys_wait4 322 PTR compat_sys_wait4
323 PTR sys_swapoff /* 4115 */ 323 PTR sys_swapoff /* 4115 */
324 PTR sys32_sysinfo 324 PTR compat_sys_sysinfo
325 PTR sys32_ipc 325 PTR sys32_ipc
326 PTR sys_fsync 326 PTR sys_fsync
327 PTR sys32_sigreturn 327 PTR sys32_sigreturn
@@ -506,7 +506,7 @@ sys_call_table:
506 PTR sys_readlinkat 506 PTR sys_readlinkat
507 PTR sys_fchmodat 507 PTR sys_fchmodat
508 PTR sys_faccessat /* 4300 */ 508 PTR sys_faccessat /* 4300 */
509 PTR sys_pselect6 509 PTR compat_sys_pselect6
510 PTR sys_ppoll 510 PTR sys_ppoll
511 PTR sys_unshare 511 PTR sys_unshare
512 PTR sys_splice 512 PTR sys_splice
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 89440a0d8528..11ab222a2e97 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -271,8 +271,7 @@ static void __init bootmem_init(void)
271static void __init bootmem_init(void) 271static void __init bootmem_init(void)
272{ 272{
273 unsigned long reserved_end; 273 unsigned long reserved_end;
274 unsigned long highest = 0; 274 unsigned long mapstart = ~0UL;
275 unsigned long mapstart = -1UL;
276 unsigned long bootmap_size; 275 unsigned long bootmap_size;
277 int i; 276 int i;
278 277
@@ -284,6 +283,13 @@ static void __init bootmem_init(void)
284 reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end))); 283 reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
285 284
286 /* 285 /*
286 * max_low_pfn is not a number of pages. The number of pages
287 * of the system is given by 'max_low_pfn - min_low_pfn'.
288 */
289 min_low_pfn = ~0UL;
290 max_low_pfn = 0;
291
292 /*
287 * Find the highest page frame number we have available. 293 * Find the highest page frame number we have available.
288 */ 294 */
289 for (i = 0; i < boot_mem_map.nr_map; i++) { 295 for (i = 0; i < boot_mem_map.nr_map; i++) {
@@ -296,8 +302,10 @@ static void __init bootmem_init(void)
296 end = PFN_DOWN(boot_mem_map.map[i].addr 302 end = PFN_DOWN(boot_mem_map.map[i].addr
297 + boot_mem_map.map[i].size); 303 + boot_mem_map.map[i].size);
298 304
299 if (end > highest) 305 if (end > max_low_pfn)
300 highest = end; 306 max_low_pfn = end;
307 if (start < min_low_pfn)
308 min_low_pfn = start;
301 if (end <= reserved_end) 309 if (end <= reserved_end)
302 continue; 310 continue;
303 if (start >= mapstart) 311 if (start >= mapstart)
@@ -305,22 +313,36 @@ static void __init bootmem_init(void)
305 mapstart = max(reserved_end, start); 313 mapstart = max(reserved_end, start);
306 } 314 }
307 315
316 if (min_low_pfn >= max_low_pfn)
317 panic("Incorrect memory mapping !!!");
318 if (min_low_pfn > ARCH_PFN_OFFSET) {
319 printk(KERN_INFO
320 "Wasting %lu bytes for tracking %lu unused pages\n",
321 (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
322 min_low_pfn - ARCH_PFN_OFFSET);
323 } else if (min_low_pfn < ARCH_PFN_OFFSET) {
324 printk(KERN_INFO
325 "%lu free pages won't be used\n",
326 ARCH_PFN_OFFSET - min_low_pfn);
327 }
328 min_low_pfn = ARCH_PFN_OFFSET;
329
308 /* 330 /*
309 * Determine low and high memory ranges 331 * Determine low and high memory ranges
310 */ 332 */
311 if (highest > PFN_DOWN(HIGHMEM_START)) { 333 if (max_low_pfn > PFN_DOWN(HIGHMEM_START)) {
312#ifdef CONFIG_HIGHMEM 334#ifdef CONFIG_HIGHMEM
313 highstart_pfn = PFN_DOWN(HIGHMEM_START); 335 highstart_pfn = PFN_DOWN(HIGHMEM_START);
314 highend_pfn = highest; 336 highend_pfn = max_low_pfn;
315#endif 337#endif
316 highest = PFN_DOWN(HIGHMEM_START); 338 max_low_pfn = PFN_DOWN(HIGHMEM_START);
317 } 339 }
318 340
319 /* 341 /*
320 * Initialize the boot-time allocator with low memory only. 342 * Initialize the boot-time allocator with low memory only.
321 */ 343 */
322 bootmap_size = init_bootmem(mapstart, highest); 344 bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
323 345 min_low_pfn, max_low_pfn);
324 /* 346 /*
325 * Register fully available low RAM pages with the bootmem allocator. 347 * Register fully available low RAM pages with the bootmem allocator.
326 */ 348 */
@@ -430,7 +452,7 @@ static void __init arch_mem_init(char **cmdline_p)
430 print_memory_map(); 452 print_memory_map();
431 453
432 strlcpy(command_line, arcs_cmdline, sizeof(command_line)); 454 strlcpy(command_line, arcs_cmdline, sizeof(command_line));
433 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 455 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
434 456
435 *cmdline_p = command_line; 457 *cmdline_p = command_line;
436 458
@@ -507,9 +529,9 @@ void __init setup_arch(char **cmdline_p)
507 529
508#if defined(CONFIG_VT) 530#if defined(CONFIG_VT)
509#if defined(CONFIG_VGA_CONSOLE) 531#if defined(CONFIG_VGA_CONSOLE)
510 conswitchp = &vga_con; 532 conswitchp = &vga_con;
511#elif defined(CONFIG_DUMMY_CONSOLE) 533#elif defined(CONFIG_DUMMY_CONSOLE)
512 conswitchp = &dummy_con; 534 conswitchp = &dummy_con;
513#endif 535#endif
514#endif 536#endif
515 537
@@ -521,7 +543,7 @@ void __init setup_arch(char **cmdline_p)
521#endif 543#endif
522} 544}
523 545
524int __init fpu_disable(char *s) 546static int __init fpu_disable(char *s)
525{ 547{
526 int i; 548 int i;
527 549
@@ -533,7 +555,7 @@ int __init fpu_disable(char *s)
533 555
534__setup("nofpu", fpu_disable); 556__setup("nofpu", fpu_disable);
535 557
536int __init dsp_disable(char *s) 558static int __init dsp_disable(char *s)
537{ 559{
538 cpu_data[0].ases &= ~MIPS_ASE_DSP; 560 cpu_data[0].ases &= ~MIPS_ASE_DSP;
539 561
@@ -541,3 +563,6 @@ int __init dsp_disable(char *s)
541} 563}
542 564
543__setup("nodsp", dsp_disable); 565__setup("nodsp", dsp_disable);
566
567unsigned long kernelsp[NR_CPUS];
568unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h
index b1f09d54ebe6..fdbdbdc65b54 100644
--- a/arch/mips/kernel/signal-common.h
+++ b/arch/mips/kernel/signal-common.h
@@ -8,169 +8,27 @@
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 */ 9 */
10 10
11#ifndef __SIGNAL_COMMON_H
12#define __SIGNAL_COMMON_H
11 13
12static inline int 14/* #define DEBUG_SIG */
13setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
14{
15 int err = 0;
16 15
17 err |= __put_user(regs->cp0_epc, &sc->sc_pc); 16#ifdef DEBUG_SIG
17# define DEBUGP(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ##args)
18#else
19# define DEBUGP(fmt, args...)
20#endif
18 21
19#define save_gp_reg(i) do { \ 22#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
20 err |= __put_user(regs->regs[i], &sc->sc_regs[i]); \
21} while(0)
22 __put_user(0, &sc->sc_regs[0]); save_gp_reg(1); save_gp_reg(2);
23 save_gp_reg(3); save_gp_reg(4); save_gp_reg(5); save_gp_reg(6);
24 save_gp_reg(7); save_gp_reg(8); save_gp_reg(9); save_gp_reg(10);
25 save_gp_reg(11); save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
26 save_gp_reg(15); save_gp_reg(16); save_gp_reg(17); save_gp_reg(18);
27 save_gp_reg(19); save_gp_reg(20); save_gp_reg(21); save_gp_reg(22);
28 save_gp_reg(23); save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
29 save_gp_reg(27); save_gp_reg(28); save_gp_reg(29); save_gp_reg(30);
30 save_gp_reg(31);
31#undef save_gp_reg
32
33 err |= __put_user(regs->hi, &sc->sc_mdhi);
34 err |= __put_user(regs->lo, &sc->sc_mdlo);
35 if (cpu_has_dsp) {
36 err |= __put_user(mfhi1(), &sc->sc_hi1);
37 err |= __put_user(mflo1(), &sc->sc_lo1);
38 err |= __put_user(mfhi2(), &sc->sc_hi2);
39 err |= __put_user(mflo2(), &sc->sc_lo2);
40 err |= __put_user(mfhi3(), &sc->sc_hi3);
41 err |= __put_user(mflo3(), &sc->sc_lo3);
42 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
43 }
44
45 err |= __put_user(!!used_math(), &sc->sc_used_math);
46
47 if (!used_math())
48 goto out;
49
50 /*
51 * Save FPU state to signal context. Signal handler will "inherit"
52 * current FPU state.
53 */
54 preempt_disable();
55
56 if (!is_fpu_owner()) {
57 own_fpu();
58 restore_fp(current);
59 }
60 err |= save_fp_context(sc);
61
62 preempt_enable();
63
64out:
65 return err;
66}
67
68static inline int
69restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
70{
71 unsigned int used_math;
72 unsigned long treg;
73 int err = 0;
74
75 /* Always make any pending restarted system calls return -EINTR */
76 current_thread_info()->restart_block.fn = do_no_restart_syscall;
77
78 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
79 err |= __get_user(regs->hi, &sc->sc_mdhi);
80 err |= __get_user(regs->lo, &sc->sc_mdlo);
81 if (cpu_has_dsp) {
82 err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
83 err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
84 err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
85 err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
86 err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
87 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
88 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
89 }
90
91#define restore_gp_reg(i) do { \
92 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \
93} while(0)
94 restore_gp_reg( 1); restore_gp_reg( 2); restore_gp_reg( 3);
95 restore_gp_reg( 4); restore_gp_reg( 5); restore_gp_reg( 6);
96 restore_gp_reg( 7); restore_gp_reg( 8); restore_gp_reg( 9);
97 restore_gp_reg(10); restore_gp_reg(11); restore_gp_reg(12);
98 restore_gp_reg(13); restore_gp_reg(14); restore_gp_reg(15);
99 restore_gp_reg(16); restore_gp_reg(17); restore_gp_reg(18);
100 restore_gp_reg(19); restore_gp_reg(20); restore_gp_reg(21);
101 restore_gp_reg(22); restore_gp_reg(23); restore_gp_reg(24);
102 restore_gp_reg(25); restore_gp_reg(26); restore_gp_reg(27);
103 restore_gp_reg(28); restore_gp_reg(29); restore_gp_reg(30);
104 restore_gp_reg(31);
105#undef restore_gp_reg
106
107 err |= __get_user(used_math, &sc->sc_used_math);
108 conditional_used_math(used_math);
109
110 preempt_disable();
111
112 if (used_math()) {
113 /* restore fpu context if we have used it before */
114 own_fpu();
115 err |= restore_fp_context(sc);
116 } else {
117 /* signal handler may have used FPU. Give it up. */
118 lose_fpu();
119 }
120
121 preempt_enable();
122
123 return err;
124}
125 23
126/* 24/*
127 * Determine which stack to use.. 25 * Determine which stack to use..
128 */ 26 */
129static inline void __user * 27extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
130get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) 28 size_t frame_size);
131{ 29/*
132 unsigned long sp; 30 * install trampoline code to get back from the sig handler
133 31 */
134 /* Default to using normal stack */ 32extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall);
135 sp = regs->regs[29];
136
137 /*
138 * FPU emulator may have it's own trampoline active just
139 * above the user stack, 16-bytes before the next lowest
140 * 16 byte boundary. Try to avoid trashing it.
141 */
142 sp -= 32;
143
144 /* This is the X/Open sanctioned signal stack switching. */
145 if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
146 sp = current->sas_ss_sp + current->sas_ss_size;
147
148 return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK));
149}
150
151static inline int install_sigtramp(unsigned int __user *tramp,
152 unsigned int syscall)
153{
154 int err;
155
156 /*
157 * Set up the return code ...
158 *
159 * li v0, __NR__foo_sigreturn
160 * syscall
161 */
162
163 err = __put_user(0x24020000 + syscall, tramp + 0);
164 err |= __put_user(0x0000000c , tramp + 1);
165 if (ICACHE_REFILLS_WORKAROUND_WAR) {
166 err |= __put_user(0, tramp + 2);
167 err |= __put_user(0, tramp + 3);
168 err |= __put_user(0, tramp + 4);
169 err |= __put_user(0, tramp + 5);
170 err |= __put_user(0, tramp + 6);
171 err |= __put_user(0, tramp + 7);
172 }
173 flush_cache_sigtramp((unsigned long) tramp);
174 33
175 return err; 34#endif /* __SIGNAL_COMMON_H */
176}
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index b9d358e05214..f091786187a6 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -34,18 +34,199 @@
34 34
35#include "signal-common.h" 35#include "signal-common.h"
36 36
37#define DEBUG_SIG 0 37/*
38 * Horribly complicated - with the bloody RM9000 workarounds enabled
39 * the signal trampolines is moving to the end of the structure so we can
40 * increase the alignment without breaking software compatibility.
41 */
42#if ICACHE_REFILLS_WORKAROUND_WAR == 0
43
44struct sigframe {
45 u32 sf_ass[4]; /* argument save space for o32 */
46 u32 sf_code[2]; /* signal trampoline */
47 struct sigcontext sf_sc;
48 sigset_t sf_mask;
49};
50
51struct rt_sigframe {
52 u32 rs_ass[4]; /* argument save space for o32 */
53 u32 rs_code[2]; /* signal trampoline */
54 struct siginfo rs_info;
55 struct ucontext rs_uc;
56};
57
58#else
59
60struct sigframe {
61 u32 sf_ass[4]; /* argument save space for o32 */
62 u32 sf_pad[2];
63 struct sigcontext sf_sc; /* hw context */
64 sigset_t sf_mask;
65 u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */
66};
38 67
39#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 68struct rt_sigframe {
69 u32 rs_ass[4]; /* argument save space for o32 */
70 u32 rs_pad[2];
71 struct siginfo rs_info;
72 struct ucontext rs_uc;
73 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */
74};
75
76#endif
77
78/*
79 * Helper routines
80 */
81int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
82{
83 int err = 0;
84 int i;
85
86 err |= __put_user(regs->cp0_epc, &sc->sc_pc);
87
88 err |= __put_user(0, &sc->sc_regs[0]);
89 for (i = 1; i < 32; i++)
90 err |= __put_user(regs->regs[i], &sc->sc_regs[i]);
91
92#ifdef CONFIG_CPU_HAS_SMARTMIPS
93 err |= __put_user(regs->acx, &sc->sc_acx);
94#endif
95 err |= __put_user(regs->hi, &sc->sc_mdhi);
96 err |= __put_user(regs->lo, &sc->sc_mdlo);
97 if (cpu_has_dsp) {
98 err |= __put_user(mfhi1(), &sc->sc_hi1);
99 err |= __put_user(mflo1(), &sc->sc_lo1);
100 err |= __put_user(mfhi2(), &sc->sc_hi2);
101 err |= __put_user(mflo2(), &sc->sc_lo2);
102 err |= __put_user(mfhi3(), &sc->sc_hi3);
103 err |= __put_user(mflo3(), &sc->sc_lo3);
104 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
105 }
106
107 err |= __put_user(!!used_math(), &sc->sc_used_math);
108
109 if (used_math()) {
110 /*
111 * Save FPU state to signal context. Signal handler
112 * will "inherit" current FPU state.
113 */
114 preempt_disable();
115
116 if (!is_fpu_owner()) {
117 own_fpu();
118 restore_fp(current);
119 }
120 err |= save_fp_context(sc);
121
122 preempt_enable();
123 }
124 return err;
125}
126
127int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
128{
129 unsigned int used_math;
130 unsigned long treg;
131 int err = 0;
132 int i;
133
134 /* Always make any pending restarted system calls return -EINTR */
135 current_thread_info()->restart_block.fn = do_no_restart_syscall;
136
137 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
138
139#ifdef CONFIG_CPU_HAS_SMARTMIPS
140 err |= __get_user(regs->acx, &sc->sc_acx);
141#endif
142 err |= __get_user(regs->hi, &sc->sc_mdhi);
143 err |= __get_user(regs->lo, &sc->sc_mdlo);
144 if (cpu_has_dsp) {
145 err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
146 err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
147 err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
148 err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
149 err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
150 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
151 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
152 }
153
154 for (i = 1; i < 32; i++)
155 err |= __get_user(regs->regs[i], &sc->sc_regs[i]);
156
157 err |= __get_user(used_math, &sc->sc_used_math);
158 conditional_used_math(used_math);
159
160 preempt_disable();
161
162 if (used_math()) {
163 /* restore fpu context if we have used it before */
164 own_fpu();
165 err |= restore_fp_context(sc);
166 } else {
167 /* signal handler may have used FPU. Give it up. */
168 lose_fpu();
169 }
170
171 preempt_enable();
172
173 return err;
174}
175
176void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
177 size_t frame_size)
178{
179 unsigned long sp;
180
181 /* Default to using normal stack */
182 sp = regs->regs[29];
183
184 /*
185 * FPU emulator may have it's own trampoline active just
186 * above the user stack, 16-bytes before the next lowest
187 * 16 byte boundary. Try to avoid trashing it.
188 */
189 sp -= 32;
190
191 /* This is the X/Open sanctioned signal stack switching. */
192 if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
193 sp = current->sas_ss_sp + current->sas_ss_size;
194
195 return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK));
196}
197
198int install_sigtramp(unsigned int __user *tramp, unsigned int syscall)
199{
200 int err;
201
202 /*
203 * Set up the return code ...
204 *
205 * li v0, __NR__foo_sigreturn
206 * syscall
207 */
208
209 err = __put_user(0x24020000 + syscall, tramp + 0);
210 err |= __put_user(0x0000000c , tramp + 1);
211 if (ICACHE_REFILLS_WORKAROUND_WAR) {
212 err |= __put_user(0, tramp + 2);
213 err |= __put_user(0, tramp + 3);
214 err |= __put_user(0, tramp + 4);
215 err |= __put_user(0, tramp + 5);
216 err |= __put_user(0, tramp + 6);
217 err |= __put_user(0, tramp + 7);
218 }
219 flush_cache_sigtramp((unsigned long) tramp);
220
221 return err;
222}
40 223
41/* 224/*
42 * Atomically swap in the new signal mask, and wait for a signal. 225 * Atomically swap in the new signal mask, and wait for a signal.
43 */ 226 */
44 227
45#ifdef CONFIG_TRAD_SIGNALS 228#ifdef CONFIG_TRAD_SIGNALS
46save_static_function(sys_sigsuspend); 229asmlinkage int sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
47__attribute_used__ noinline static int
48_sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
49{ 230{
50 sigset_t newset; 231 sigset_t newset;
51 sigset_t __user *uset; 232 sigset_t __user *uset;
@@ -68,9 +249,7 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
68} 249}
69#endif 250#endif
70 251
71save_static_function(sys_rt_sigsuspend); 252asmlinkage int sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
72__attribute_used__ noinline static int
73_sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
74{ 253{
75 sigset_t newset; 254 sigset_t newset;
76 sigset_t __user *unewset; 255 sigset_t __user *unewset;
@@ -89,7 +268,7 @@ _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
89 spin_lock_irq(&current->sighand->siglock); 268 spin_lock_irq(&current->sighand->siglock);
90 current->saved_sigmask = current->blocked; 269 current->saved_sigmask = current->blocked;
91 current->blocked = newset; 270 current->blocked = newset;
92 recalc_sigpending(); 271 recalc_sigpending();
93 spin_unlock_irq(&current->sighand->siglock); 272 spin_unlock_irq(&current->sighand->siglock);
94 273
95 current->state = TASK_INTERRUPTIBLE; 274 current->state = TASK_INTERRUPTIBLE;
@@ -124,7 +303,7 @@ asmlinkage int sys_sigaction(int sig, const struct sigaction __user *act,
124 303
125 if (!ret && oact) { 304 if (!ret && oact) {
126 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact))) 305 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
127 return -EFAULT; 306 return -EFAULT;
128 err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); 307 err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
129 err |= __put_user(old_ka.sa.sa_handler, &oact->sa_handler); 308 err |= __put_user(old_ka.sa.sa_handler, &oact->sa_handler);
130 err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig); 309 err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
@@ -148,45 +327,8 @@ asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs regs)
148 return do_sigaltstack(uss, uoss, usp); 327 return do_sigaltstack(uss, uoss, usp);
149} 328}
150 329
151/*
152 * Horribly complicated - with the bloody RM9000 workarounds enabled
153 * the signal trampolines is moving to the end of the structure so we can
154 * increase the alignment without breaking software compatibility.
155 */
156#ifdef CONFIG_TRAD_SIGNALS
157struct sigframe {
158 u32 sf_ass[4]; /* argument save space for o32 */
159#if ICACHE_REFILLS_WORKAROUND_WAR
160 u32 sf_pad[2];
161#else
162 u32 sf_code[2]; /* signal trampoline */
163#endif
164 struct sigcontext sf_sc;
165 sigset_t sf_mask;
166#if ICACHE_REFILLS_WORKAROUND_WAR
167 u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */
168#endif
169};
170#endif
171
172struct rt_sigframe {
173 u32 rs_ass[4]; /* argument save space for o32 */
174#if ICACHE_REFILLS_WORKAROUND_WAR
175 u32 rs_pad[2];
176#else
177 u32 rs_code[2]; /* signal trampoline */
178#endif
179 struct siginfo rs_info;
180 struct ucontext rs_uc;
181#if ICACHE_REFILLS_WORKAROUND_WAR
182 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */
183#endif
184};
185
186#ifdef CONFIG_TRAD_SIGNALS 330#ifdef CONFIG_TRAD_SIGNALS
187save_static_function(sys_sigreturn); 331asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
188__attribute_used__ noinline static void
189_sys_sigreturn(nabi_no_regargs struct pt_regs regs)
190{ 332{
191 struct sigframe __user *frame; 333 struct sigframe __user *frame;
192 sigset_t blocked; 334 sigset_t blocked;
@@ -221,9 +363,7 @@ badframe:
221} 363}
222#endif /* CONFIG_TRAD_SIGNALS */ 364#endif /* CONFIG_TRAD_SIGNALS */
223 365
224save_static_function(sys_rt_sigreturn); 366asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
225__attribute_used__ noinline static void
226_sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
227{ 367{
228 struct rt_sigframe __user *frame; 368 struct rt_sigframe __user *frame;
229 sigset_t set; 369 sigset_t set;
@@ -265,7 +405,7 @@ badframe:
265} 405}
266 406
267#ifdef CONFIG_TRAD_SIGNALS 407#ifdef CONFIG_TRAD_SIGNALS
268int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, 408static int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
269 int signr, sigset_t *set) 409 int signr, sigset_t *set)
270{ 410{
271 struct sigframe __user *frame; 411 struct sigframe __user *frame;
@@ -275,7 +415,7 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
275 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) 415 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
276 goto give_sigsegv; 416 goto give_sigsegv;
277 417
278 install_sigtramp(frame->sf_code, __NR_sigreturn); 418 err |= install_sigtramp(frame->sf_code, __NR_sigreturn);
279 419
280 err |= setup_sigcontext(regs, &frame->sf_sc); 420 err |= setup_sigcontext(regs, &frame->sf_sc);
281 err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set)); 421 err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set));
@@ -299,12 +439,10 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
299 regs->regs[31] = (unsigned long) frame->sf_code; 439 regs->regs[31] = (unsigned long) frame->sf_code;
300 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; 440 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
301 441
302#if DEBUG_SIG 442 DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
303 printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
304 current->comm, current->pid, 443 current->comm, current->pid,
305 frame, regs->cp0_epc, frame->regs[31]); 444 frame, regs->cp0_epc, regs->regs[31]);
306#endif 445 return 0;
307 return 0;
308 446
309give_sigsegv: 447give_sigsegv:
310 force_sigsegv(signr, current); 448 force_sigsegv(signr, current);
@@ -312,7 +450,7 @@ give_sigsegv:
312} 450}
313#endif 451#endif
314 452
315int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, 453static int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
316 int signr, sigset_t *set, siginfo_t *info) 454 int signr, sigset_t *set, siginfo_t *info)
317{ 455{
318 struct rt_sigframe __user *frame; 456 struct rt_sigframe __user *frame;
@@ -322,7 +460,7 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
322 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) 460 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
323 goto give_sigsegv; 461 goto give_sigsegv;
324 462
325 install_sigtramp(frame->rs_code, __NR_rt_sigreturn); 463 err |= install_sigtramp(frame->rs_code, __NR_rt_sigreturn);
326 464
327 /* Create siginfo. */ 465 /* Create siginfo. */
328 err |= copy_siginfo_to_user(&frame->rs_info, info); 466 err |= copy_siginfo_to_user(&frame->rs_info, info);
@@ -359,11 +497,10 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
359 regs->regs[31] = (unsigned long) frame->rs_code; 497 regs->regs[31] = (unsigned long) frame->rs_code;
360 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; 498 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
361 499
362#if DEBUG_SIG 500 DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
363 printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
364 current->comm, current->pid, 501 current->comm, current->pid,
365 frame, regs->cp0_epc, regs->regs[31]); 502 frame, regs->cp0_epc, regs->regs[31]);
366#endif 503
367 return 0; 504 return 0;
368 505
369give_sigsegv: 506give_sigsegv:
@@ -371,7 +508,15 @@ give_sigsegv:
371 return -EFAULT; 508 return -EFAULT;
372} 509}
373 510
374static inline int handle_signal(unsigned long sig, siginfo_t *info, 511struct mips_abi mips_abi = {
512#ifdef CONFIG_TRAD_SIGNALS
513 .setup_frame = setup_frame,
514#endif
515 .setup_rt_frame = setup_rt_frame,
516 .restart = __NR_restart_syscall
517};
518
519static int handle_signal(unsigned long sig, siginfo_t *info,
375 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) 520 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
376{ 521{
377 int ret; 522 int ret;
@@ -409,7 +554,7 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info,
409 return ret; 554 return ret;
410} 555}
411 556
412void do_signal(struct pt_regs *regs) 557static void do_signal(struct pt_regs *regs)
413{ 558{
414 struct k_sigaction ka; 559 struct k_sigaction ka;
415 sigset_t *oldset; 560 sigset_t *oldset;
@@ -459,7 +604,7 @@ void do_signal(struct pt_regs *regs)
459 regs->cp0_epc -= 8; 604 regs->cp0_epc -= 8;
460 } 605 }
461 if (regs->regs[2] == ERESTART_RESTARTBLOCK) { 606 if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
462 regs->regs[2] = __NR_restart_syscall; 607 regs->regs[2] = current->thread.abi->restart;
463 regs->regs[7] = regs->regs[26]; 608 regs->regs[7] = regs->regs[26];
464 regs->cp0_epc -= 4; 609 regs->cp0_epc -= 4;
465 } 610 }
@@ -485,5 +630,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
485{ 630{
486 /* deal with pending signal delivery */ 631 /* deal with pending signal delivery */
487 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) 632 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
488 current->thread.abi->do_signal(regs); 633 do_signal(regs);
489} 634}
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index c86a5ddff050..19bbef001959 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -8,6 +8,7 @@
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 */ 9 */
10#include <linux/cache.h> 10#include <linux/cache.h>
11#include <linux/compat.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/mm.h> 13#include <linux/mm.h>
13#include <linux/smp.h> 14#include <linux/smp.h>
@@ -24,6 +25,7 @@
24 25
25#include <asm/abi.h> 26#include <asm/abi.h>
26#include <asm/asm.h> 27#include <asm/asm.h>
28#include <asm/compat-signal.h>
27#include <linux/bitops.h> 29#include <linux/bitops.h>
28#include <asm/cacheflush.h> 30#include <asm/cacheflush.h>
29#include <asm/sim.h> 31#include <asm/sim.h>
@@ -33,6 +35,8 @@
33#include <asm/fpu.h> 35#include <asm/fpu.h>
34#include <asm/war.h> 36#include <asm/war.h>
35 37
38#include "signal-common.h"
39
36#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) 40#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
37 41
38typedef struct compat_siginfo { 42typedef struct compat_siginfo {
@@ -100,21 +104,10 @@ typedef struct compat_siginfo {
100 */ 104 */
101#define __NR_O32_sigreturn 4119 105#define __NR_O32_sigreturn 4119
102#define __NR_O32_rt_sigreturn 4193 106#define __NR_O32_rt_sigreturn 4193
103#define __NR_O32_restart_syscall 4253 107#define __NR_O32_restart_syscall 4253
104
105#define DEBUG_SIG 0
106
107#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
108 108
109/* 32-bit compatibility types */ 109/* 32-bit compatibility types */
110 110
111#define _NSIG_BPW32 32
112#define _NSIG_WORDS32 (_NSIG / _NSIG_BPW32)
113
114typedef struct {
115 unsigned int sig[_NSIG_WORDS32];
116} sigset_t32;
117
118typedef unsigned int __sighandler32_t; 111typedef unsigned int __sighandler32_t;
119typedef void (*vfptr_t)(void); 112typedef void (*vfptr_t)(void);
120 113
@@ -136,9 +129,146 @@ struct ucontext32 {
136 s32 uc_link; 129 s32 uc_link;
137 stack32_t uc_stack; 130 stack32_t uc_stack;
138 struct sigcontext32 uc_mcontext; 131 struct sigcontext32 uc_mcontext;
139 sigset_t32 uc_sigmask; /* mask last for extensibility */ 132 compat_sigset_t uc_sigmask; /* mask last for extensibility */
133};
134
135/*
136 * Horribly complicated - with the bloody RM9000 workarounds enabled
137 * the signal trampolines is moving to the end of the structure so we can
138 * increase the alignment without breaking software compatibility.
139 */
140#if ICACHE_REFILLS_WORKAROUND_WAR == 0
141
142struct sigframe32 {
143 u32 sf_ass[4]; /* argument save space for o32 */
144 u32 sf_code[2]; /* signal trampoline */
145 struct sigcontext32 sf_sc;
146 compat_sigset_t sf_mask;
147};
148
149struct rt_sigframe32 {
150 u32 rs_ass[4]; /* argument save space for o32 */
151 u32 rs_code[2]; /* signal trampoline */
152 compat_siginfo_t rs_info;
153 struct ucontext32 rs_uc;
154};
155
156#else /* ICACHE_REFILLS_WORKAROUND_WAR */
157
158struct sigframe32 {
159 u32 sf_ass[4]; /* argument save space for o32 */
160 u32 sf_pad[2];
161 struct sigcontext32 sf_sc; /* hw context */
162 compat_sigset_t sf_mask;
163 u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */
164};
165
166struct rt_sigframe32 {
167 u32 rs_ass[4]; /* argument save space for o32 */
168 u32 rs_pad[2];
169 compat_siginfo_t rs_info;
170 struct ucontext32 rs_uc;
171 u32 rs_code[8] __attribute__((aligned(32))); /* signal trampoline */
140}; 172};
141 173
174#endif /* !ICACHE_REFILLS_WORKAROUND_WAR */
175
176/*
177 * sigcontext handlers
178 */
179static int setup_sigcontext32(struct pt_regs *regs,
180 struct sigcontext32 __user *sc)
181{
182 int err = 0;
183 int i;
184
185 err |= __put_user(regs->cp0_epc, &sc->sc_pc);
186
187 err |= __put_user(0, &sc->sc_regs[0]);
188 for (i = 1; i < 32; i++)
189 err |= __put_user(regs->regs[i], &sc->sc_regs[i]);
190
191 err |= __put_user(regs->hi, &sc->sc_mdhi);
192 err |= __put_user(regs->lo, &sc->sc_mdlo);
193 if (cpu_has_dsp) {
194 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
195 err |= __put_user(mfhi1(), &sc->sc_hi1);
196 err |= __put_user(mflo1(), &sc->sc_lo1);
197 err |= __put_user(mfhi2(), &sc->sc_hi2);
198 err |= __put_user(mflo2(), &sc->sc_lo2);
199 err |= __put_user(mfhi3(), &sc->sc_hi3);
200 err |= __put_user(mflo3(), &sc->sc_lo3);
201 }
202
203 err |= __put_user(!!used_math(), &sc->sc_used_math);
204
205 if (used_math()) {
206 /*
207 * Save FPU state to signal context. Signal handler
208 * will "inherit" current FPU state.
209 */
210 preempt_disable();
211
212 if (!is_fpu_owner()) {
213 own_fpu();
214 restore_fp(current);
215 }
216 err |= save_fp_context32(sc);
217
218 preempt_enable();
219 }
220 return err;
221}
222
223static int restore_sigcontext32(struct pt_regs *regs,
224 struct sigcontext32 __user *sc)
225{
226 u32 used_math;
227 int err = 0;
228 s32 treg;
229 int i;
230
231 /* Always make any pending restarted system calls return -EINTR */
232 current_thread_info()->restart_block.fn = do_no_restart_syscall;
233
234 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
235 err |= __get_user(regs->hi, &sc->sc_mdhi);
236 err |= __get_user(regs->lo, &sc->sc_mdlo);
237 if (cpu_has_dsp) {
238 err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
239 err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
240 err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
241 err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
242 err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
243 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
244 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
245 }
246
247 for (i = 1; i < 32; i++)
248 err |= __get_user(regs->regs[i], &sc->sc_regs[i]);
249
250 err |= __get_user(used_math, &sc->sc_used_math);
251 conditional_used_math(used_math);
252
253 preempt_disable();
254
255 if (used_math()) {
256 /* restore fpu context if we have used it before */
257 own_fpu();
258 err |= restore_fp_context32(sc);
259 } else {
260 /* signal handler may have used FPU. Give it up. */
261 lose_fpu();
262 }
263
264 preempt_enable();
265
266 return err;
267}
268
269/*
270 *
271 */
142extern void __put_sigset_unknown_nsig(void); 272extern void __put_sigset_unknown_nsig(void);
143extern void __get_sigset_unknown_nsig(void); 273extern void __get_sigset_unknown_nsig(void);
144 274
@@ -191,9 +321,7 @@ static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf)
191 * Atomically swap in the new signal mask, and wait for a signal. 321 * Atomically swap in the new signal mask, and wait for a signal.
192 */ 322 */
193 323
194save_static_function(sys32_sigsuspend); 324asmlinkage int sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
195__attribute_used__ noinline static int
196_sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
197{ 325{
198 compat_sigset_t __user *uset; 326 compat_sigset_t __user *uset;
199 sigset_t newset; 327 sigset_t newset;
@@ -215,9 +343,7 @@ _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
215 return -ERESTARTNOHAND; 343 return -ERESTARTNOHAND;
216} 344}
217 345
218save_static_function(sys32_rt_sigsuspend); 346asmlinkage int sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
219__attribute_used__ noinline static int
220_sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
221{ 347{
222 compat_sigset_t __user *uset; 348 compat_sigset_t __user *uset;
223 sigset_t newset; 349 sigset_t newset;
@@ -326,91 +452,6 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs)
326 return ret; 452 return ret;
327} 453}
328 454
329static int restore_sigcontext32(struct pt_regs *regs, struct sigcontext32 __user *sc)
330{
331 u32 used_math;
332 int err = 0;
333 s32 treg;
334
335 /* Always make any pending restarted system calls return -EINTR */
336 current_thread_info()->restart_block.fn = do_no_restart_syscall;
337
338 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
339 err |= __get_user(regs->hi, &sc->sc_mdhi);
340 err |= __get_user(regs->lo, &sc->sc_mdlo);
341 if (cpu_has_dsp) {
342 err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
343 err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
344 err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
345 err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
346 err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
347 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
348 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
349 }
350
351#define restore_gp_reg(i) do { \
352 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \
353} while(0)
354 restore_gp_reg( 1); restore_gp_reg( 2); restore_gp_reg( 3);
355 restore_gp_reg( 4); restore_gp_reg( 5); restore_gp_reg( 6);
356 restore_gp_reg( 7); restore_gp_reg( 8); restore_gp_reg( 9);
357 restore_gp_reg(10); restore_gp_reg(11); restore_gp_reg(12);
358 restore_gp_reg(13); restore_gp_reg(14); restore_gp_reg(15);
359 restore_gp_reg(16); restore_gp_reg(17); restore_gp_reg(18);
360 restore_gp_reg(19); restore_gp_reg(20); restore_gp_reg(21);
361 restore_gp_reg(22); restore_gp_reg(23); restore_gp_reg(24);
362 restore_gp_reg(25); restore_gp_reg(26); restore_gp_reg(27);
363 restore_gp_reg(28); restore_gp_reg(29); restore_gp_reg(30);
364 restore_gp_reg(31);
365#undef restore_gp_reg
366
367 err |= __get_user(used_math, &sc->sc_used_math);
368 conditional_used_math(used_math);
369
370 preempt_disable();
371
372 if (used_math()) {
373 /* restore fpu context if we have used it before */
374 own_fpu();
375 err |= restore_fp_context32(sc);
376 } else {
377 /* signal handler may have used FPU. Give it up. */
378 lose_fpu();
379 }
380
381 preempt_enable();
382
383 return err;
384}
385
386struct sigframe {
387 u32 sf_ass[4]; /* argument save space for o32 */
388#if ICACHE_REFILLS_WORKAROUND_WAR
389 u32 sf_pad[2];
390#else
391 u32 sf_code[2]; /* signal trampoline */
392#endif
393 struct sigcontext32 sf_sc;
394 sigset_t sf_mask;
395#if ICACHE_REFILLS_WORKAROUND_WAR
396 u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */
397#endif
398};
399
400struct rt_sigframe32 {
401 u32 rs_ass[4]; /* argument save space for o32 */
402#if ICACHE_REFILLS_WORKAROUND_WAR
403 u32 rs_pad[2];
404#else
405 u32 rs_code[2]; /* signal trampoline */
406#endif
407 compat_siginfo_t rs_info;
408 struct ucontext32 rs_uc;
409#if ICACHE_REFILLS_WORKAROUND_WAR
410 u32 rs_code[8] __attribute__((aligned(32))); /* signal trampoline */
411#endif
412};
413
414int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) 455int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
415{ 456{
416 int err; 457 int err;
@@ -463,17 +504,15 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
463 return err; 504 return err;
464} 505}
465 506
466save_static_function(sys32_sigreturn); 507asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
467__attribute_used__ noinline static void
468_sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
469{ 508{
470 struct sigframe __user *frame; 509 struct sigframe32 __user *frame;
471 sigset_t blocked; 510 sigset_t blocked;
472 511
473 frame = (struct sigframe __user *) regs.regs[29]; 512 frame = (struct sigframe32 __user *) regs.regs[29];
474 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 513 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
475 goto badframe; 514 goto badframe;
476 if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) 515 if (__copy_conv_sigset_from_user(&blocked, &frame->sf_mask))
477 goto badframe; 516 goto badframe;
478 517
479 sigdelsetmask(&blocked, ~_BLOCKABLE); 518 sigdelsetmask(&blocked, ~_BLOCKABLE);
@@ -499,9 +538,7 @@ badframe:
499 force_sig(SIGSEGV, current); 538 force_sig(SIGSEGV, current);
500} 539}
501 540
502save_static_function(sys32_rt_sigreturn); 541asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
503__attribute_used__ noinline static void
504_sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
505{ 542{
506 struct rt_sigframe32 __user *frame; 543 struct rt_sigframe32 __user *frame;
507 mm_segment_t old_fs; 544 mm_segment_t old_fs;
@@ -512,7 +549,7 @@ _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
512 frame = (struct rt_sigframe32 __user *) regs.regs[29]; 549 frame = (struct rt_sigframe32 __user *) regs.regs[29];
513 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 550 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
514 goto badframe; 551 goto badframe;
515 if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) 552 if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
516 goto badframe; 553 goto badframe;
517 554
518 sigdelsetmask(&set, ~_BLOCKABLE); 555 sigdelsetmask(&set, ~_BLOCKABLE);
@@ -554,111 +591,21 @@ badframe:
554 force_sig(SIGSEGV, current); 591 force_sig(SIGSEGV, current);
555} 592}
556 593
557static inline int setup_sigcontext32(struct pt_regs *regs, 594static int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
558 struct sigcontext32 __user *sc)
559{
560 int err = 0;
561
562 err |= __put_user(regs->cp0_epc, &sc->sc_pc);
563 err |= __put_user(regs->cp0_status, &sc->sc_status);
564
565#define save_gp_reg(i) { \
566 err |= __put_user(regs->regs[i], &sc->sc_regs[i]); \
567} while(0)
568 __put_user(0, &sc->sc_regs[0]); save_gp_reg(1); save_gp_reg(2);
569 save_gp_reg(3); save_gp_reg(4); save_gp_reg(5); save_gp_reg(6);
570 save_gp_reg(7); save_gp_reg(8); save_gp_reg(9); save_gp_reg(10);
571 save_gp_reg(11); save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
572 save_gp_reg(15); save_gp_reg(16); save_gp_reg(17); save_gp_reg(18);
573 save_gp_reg(19); save_gp_reg(20); save_gp_reg(21); save_gp_reg(22);
574 save_gp_reg(23); save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
575 save_gp_reg(27); save_gp_reg(28); save_gp_reg(29); save_gp_reg(30);
576 save_gp_reg(31);
577#undef save_gp_reg
578
579 err |= __put_user(regs->hi, &sc->sc_mdhi);
580 err |= __put_user(regs->lo, &sc->sc_mdlo);
581 if (cpu_has_dsp) {
582 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
583 err |= __put_user(mfhi1(), &sc->sc_hi1);
584 err |= __put_user(mflo1(), &sc->sc_lo1);
585 err |= __put_user(mfhi2(), &sc->sc_hi2);
586 err |= __put_user(mflo2(), &sc->sc_lo2);
587 err |= __put_user(mfhi3(), &sc->sc_hi3);
588 err |= __put_user(mflo3(), &sc->sc_lo3);
589 }
590
591 err |= __put_user(!!used_math(), &sc->sc_used_math);
592
593 if (!used_math())
594 goto out;
595
596 /*
597 * Save FPU state to signal context. Signal handler will "inherit"
598 * current FPU state.
599 */
600 preempt_disable();
601
602 if (!is_fpu_owner()) {
603 own_fpu();
604 restore_fp(current);
605 }
606 err |= save_fp_context32(sc);
607
608 preempt_enable();
609
610out:
611 return err;
612}
613
614/*
615 * Determine which stack to use..
616 */
617static inline void __user *get_sigframe(struct k_sigaction *ka,
618 struct pt_regs *regs,
619 size_t frame_size)
620{
621 unsigned long sp;
622
623 /* Default to using normal stack */
624 sp = regs->regs[29];
625
626 /*
627 * FPU emulator may have it's own trampoline active just
628 * above the user stack, 16-bytes before the next lowest
629 * 16 byte boundary. Try to avoid trashing it.
630 */
631 sp -= 32;
632
633 /* This is the X/Open sanctioned signal stack switching. */
634 if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
635 sp = current->sas_ss_sp + current->sas_ss_size;
636
637 return (void __user *)((sp - frame_size) & ALMASK);
638}
639
640int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
641 int signr, sigset_t *set) 595 int signr, sigset_t *set)
642{ 596{
643 struct sigframe __user *frame; 597 struct sigframe32 __user *frame;
644 int err = 0; 598 int err = 0;
645 599
646 frame = get_sigframe(ka, regs, sizeof(*frame)); 600 frame = get_sigframe(ka, regs, sizeof(*frame));
647 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) 601 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
648 goto give_sigsegv; 602 goto give_sigsegv;
649 603
650 /* 604 err |= install_sigtramp(frame->sf_code, __NR_O32_sigreturn);
651 * Set up the return code ...
652 *
653 * li v0, __NR_O32_sigreturn
654 * syscall
655 */
656 err |= __put_user(0x24020000 + __NR_O32_sigreturn, frame->sf_code + 0);
657 err |= __put_user(0x0000000c , frame->sf_code + 1);
658 flush_cache_sigtramp((unsigned long) frame->sf_code);
659 605
660 err |= setup_sigcontext32(regs, &frame->sf_sc); 606 err |= setup_sigcontext32(regs, &frame->sf_sc);
661 err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set)); 607 err |= __copy_conv_sigset_to_user(&frame->sf_mask, set);
608
662 if (err) 609 if (err)
663 goto give_sigsegv; 610 goto give_sigsegv;
664 611
@@ -679,11 +626,10 @@ int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
679 regs->regs[31] = (unsigned long) frame->sf_code; 626 regs->regs[31] = (unsigned long) frame->sf_code;
680 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; 627 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
681 628
682#if DEBUG_SIG 629 DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
683 printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
684 current->comm, current->pid, 630 current->comm, current->pid,
685 frame, regs->cp0_epc, frame->sf_code); 631 frame, regs->cp0_epc, regs->regs[31]);
686#endif 632
687 return 0; 633 return 0;
688 634
689give_sigsegv: 635give_sigsegv:
@@ -691,7 +637,7 @@ give_sigsegv:
691 return -EFAULT; 637 return -EFAULT;
692} 638}
693 639
694int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, 640static int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
695 int signr, sigset_t *set, siginfo_t *info) 641 int signr, sigset_t *set, siginfo_t *info)
696{ 642{
697 struct rt_sigframe32 __user *frame; 643 struct rt_sigframe32 __user *frame;
@@ -702,17 +648,7 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
702 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) 648 if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
703 goto give_sigsegv; 649 goto give_sigsegv;
704 650
705 /* Set up to return from userspace. If provided, use a stub already 651 err |= install_sigtramp(frame->rs_code, __NR_O32_rt_sigreturn);
706 in userspace. */
707 /*
708 * Set up the return code ...
709 *
710 * li v0, __NR_O32_rt_sigreturn
711 * syscall
712 */
713 err |= __put_user(0x24020000 + __NR_O32_rt_sigreturn, frame->rs_code + 0);
714 err |= __put_user(0x0000000c , frame->rs_code + 1);
715 flush_cache_sigtramp((unsigned long) frame->rs_code);
716 652
717 /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ 653 /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */
718 err |= copy_siginfo_to_user32(&frame->rs_info, info); 654 err |= copy_siginfo_to_user32(&frame->rs_info, info);
@@ -728,7 +664,7 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
728 err |= __put_user(current->sas_ss_size, 664 err |= __put_user(current->sas_ss_size,
729 &frame->rs_uc.uc_stack.ss_size); 665 &frame->rs_uc.uc_stack.ss_size);
730 err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext); 666 err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext);
731 err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); 667 err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
732 668
733 if (err) 669 if (err)
734 goto give_sigsegv; 670 goto give_sigsegv;
@@ -750,11 +686,10 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
750 regs->regs[31] = (unsigned long) frame->rs_code; 686 regs->regs[31] = (unsigned long) frame->rs_code;
751 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; 687 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
752 688
753#if DEBUG_SIG 689 DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
754 printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
755 current->comm, current->pid, 690 current->comm, current->pid,
756 frame, regs->cp0_epc, frame->rs_code); 691 frame, regs->cp0_epc, regs->regs[31]);
757#endif 692
758 return 0; 693 return 0;
759 694
760give_sigsegv: 695give_sigsegv:
@@ -762,110 +697,14 @@ give_sigsegv:
762 return -EFAULT; 697 return -EFAULT;
763} 698}
764 699
765static inline int handle_signal(unsigned long sig, siginfo_t *info, 700/*
766 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs) 701 * o32 compatibility on 64-bit kernels, without DSP ASE
767{ 702 */
768 int ret; 703struct mips_abi mips_abi_32 = {
769 704 .setup_frame = setup_frame_32,
770 switch (regs->regs[0]) { 705 .setup_rt_frame = setup_rt_frame_32,
771 case ERESTART_RESTARTBLOCK: 706 .restart = __NR_O32_restart_syscall
772 case ERESTARTNOHAND: 707};
773 regs->regs[2] = EINTR;
774 break;
775 case ERESTARTSYS:
776 if (!(ka->sa.sa_flags & SA_RESTART)) {
777 regs->regs[2] = EINTR;
778 break;
779 }
780 /* fallthrough */
781 case ERESTARTNOINTR: /* Userland will reload $v0. */
782 regs->regs[7] = regs->regs[26];
783 regs->cp0_epc -= 8;
784 }
785
786 regs->regs[0] = 0; /* Don't deal with this again. */
787
788 if (ka->sa.sa_flags & SA_SIGINFO)
789 ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info);
790 else
791 ret = current->thread.abi->setup_frame(ka, regs, sig, oldset);
792
793 spin_lock_irq(&current->sighand->siglock);
794 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
795 if (!(ka->sa.sa_flags & SA_NODEFER))
796 sigaddset(&current->blocked,sig);
797 recalc_sigpending();
798 spin_unlock_irq(&current->sighand->siglock);
799
800 return ret;
801}
802
803void do_signal32(struct pt_regs *regs)
804{
805 struct k_sigaction ka;
806 sigset_t *oldset;
807 siginfo_t info;
808 int signr;
809
810 /*
811 * We want the common case to go fast, which is why we may in certain
812 * cases get here from kernel mode. Just return without doing anything
813 * if so.
814 */
815 if (!user_mode(regs))
816 return;
817
818 if (test_thread_flag(TIF_RESTORE_SIGMASK))
819 oldset = &current->saved_sigmask;
820 else
821 oldset = &current->blocked;
822
823 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
824 if (signr > 0) {
825 /* Whee! Actually deliver the signal. */
826 if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
827 /*
828 * A signal was successfully delivered; the saved
829 * sigmask will have been stored in the signal frame,
830 * and will be restored by sigreturn, so we can simply
831 * clear the TIF_RESTORE_SIGMASK flag.
832 */
833 if (test_thread_flag(TIF_RESTORE_SIGMASK))
834 clear_thread_flag(TIF_RESTORE_SIGMASK);
835 }
836
837 return;
838 }
839
840 /*
841 * Who's code doesn't conform to the restartable syscall convention
842 * dies here!!! The li instruction, a single machine instruction,
843 * must directly be followed by the syscall instruction.
844 */
845 if (regs->regs[0]) {
846 if (regs->regs[2] == ERESTARTNOHAND ||
847 regs->regs[2] == ERESTARTSYS ||
848 regs->regs[2] == ERESTARTNOINTR) {
849 regs->regs[7] = regs->regs[26];
850 regs->cp0_epc -= 8;
851 }
852 if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
853 regs->regs[2] = __NR_O32_restart_syscall;
854 regs->regs[7] = regs->regs[26];
855 regs->cp0_epc -= 4;
856 }
857 regs->regs[0] = 0; /* Don't deal with this again. */
858 }
859
860 /*
861 * If there's no signal to deliver, we just put the saved sigmask
862 * back
863 */
864 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
865 clear_thread_flag(TIF_RESTORE_SIGMASK);
866 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
867 }
868}
869 708
870asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, 709asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 __user *act,
871 struct sigaction32 __user *oact, 710 struct sigaction32 __user *oact,
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index a67c18555ed3..ecf1f7ecaad9 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -29,8 +29,10 @@
29#include <linux/compat.h> 29#include <linux/compat.h>
30#include <linux/bitops.h> 30#include <linux/bitops.h>
31 31
32#include <asm/abi.h>
32#include <asm/asm.h> 33#include <asm/asm.h>
33#include <asm/cacheflush.h> 34#include <asm/cacheflush.h>
35#include <asm/compat-signal.h>
34#include <asm/sim.h> 36#include <asm/sim.h>
35#include <asm/uaccess.h> 37#include <asm/uaccess.h>
36#include <asm/ucontext.h> 38#include <asm/ucontext.h>
@@ -47,9 +49,9 @@
47#define __NR_N32_rt_sigreturn 6211 49#define __NR_N32_rt_sigreturn 6211
48#define __NR_N32_restart_syscall 6214 50#define __NR_N32_restart_syscall 6214
49 51
50#define DEBUG_SIG 0 52extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *);
53extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
51 54
52#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
53 55
54/* IRIX compatible stack_t */ 56/* IRIX compatible stack_t */
55typedef struct sigaltstack32 { 57typedef struct sigaltstack32 {
@@ -63,28 +65,33 @@ struct ucontextn32 {
63 s32 uc_link; 65 s32 uc_link;
64 stack32_t uc_stack; 66 stack32_t uc_stack;
65 struct sigcontext uc_mcontext; 67 struct sigcontext uc_mcontext;
66 sigset_t uc_sigmask; /* mask last for extensibility */ 68 compat_sigset_t uc_sigmask; /* mask last for extensibility */
67}; 69};
68 70
71#if ICACHE_REFILLS_WORKAROUND_WAR == 0
72
69struct rt_sigframe_n32 { 73struct rt_sigframe_n32 {
70 u32 rs_ass[4]; /* argument save space for o32 */ 74 u32 rs_ass[4]; /* argument save space for o32 */
71#if ICACHE_REFILLS_WORKAROUND_WAR
72 u32 rs_pad[2];
73#else
74 u32 rs_code[2]; /* signal trampoline */ 75 u32 rs_code[2]; /* signal trampoline */
75#endif
76 struct siginfo rs_info; 76 struct siginfo rs_info;
77 struct ucontextn32 rs_uc; 77 struct ucontextn32 rs_uc;
78#if ICACHE_REFILLS_WORKAROUND_WAR 78};
79
80#else /* ICACHE_REFILLS_WORKAROUND_WAR */
81
82struct rt_sigframe_n32 {
83 u32 rs_ass[4]; /* argument save space for o32 */
84 u32 rs_pad[2];
85 struct siginfo rs_info;
86 struct ucontextn32 rs_uc;
79 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ 87 u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */
80#endif
81}; 88};
82 89
90#endif /* !ICACHE_REFILLS_WORKAROUND_WAR */
91
83extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat); 92extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat);
84 93
85save_static_function(sysn32_rt_sigsuspend); 94asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
86__attribute_used__ noinline static int
87_sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
88{ 95{
89 compat_sigset_t __user *unewset; 96 compat_sigset_t __user *unewset;
90 compat_sigset_t uset; 97 compat_sigset_t uset;
@@ -105,7 +112,7 @@ _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
105 spin_lock_irq(&current->sighand->siglock); 112 spin_lock_irq(&current->sighand->siglock);
106 current->saved_sigmask = current->blocked; 113 current->saved_sigmask = current->blocked;
107 current->blocked = newset; 114 current->blocked = newset;
108 recalc_sigpending(); 115 recalc_sigpending();
109 spin_unlock_irq(&current->sighand->siglock); 116 spin_unlock_irq(&current->sighand->siglock);
110 117
111 current->state = TASK_INTERRUPTIBLE; 118 current->state = TASK_INTERRUPTIBLE;
@@ -114,9 +121,7 @@ _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
114 return -ERESTARTNOHAND; 121 return -ERESTARTNOHAND;
115} 122}
116 123
117save_static_function(sysn32_rt_sigreturn); 124asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
118__attribute_used__ noinline static void
119_sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
120{ 125{
121 struct rt_sigframe_n32 __user *frame; 126 struct rt_sigframe_n32 __user *frame;
122 sigset_t set; 127 sigset_t set;
@@ -126,7 +131,7 @@ _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
126 frame = (struct rt_sigframe_n32 __user *) regs.regs[29]; 131 frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
127 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 132 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
128 goto badframe; 133 goto badframe;
129 if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) 134 if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
130 goto badframe; 135 goto badframe;
131 136
132 sigdelsetmask(&set, ~_BLOCKABLE); 137 sigdelsetmask(&set, ~_BLOCKABLE);
@@ -165,7 +170,7 @@ badframe:
165 force_sig(SIGSEGV, current); 170 force_sig(SIGSEGV, current);
166} 171}
167 172
168int setup_rt_frame_n32(struct k_sigaction * ka, 173static int setup_rt_frame_n32(struct k_sigaction * ka,
169 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) 174 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info)
170{ 175{
171 struct rt_sigframe_n32 __user *frame; 176 struct rt_sigframe_n32 __user *frame;
@@ -184,7 +189,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
184 /* Create the ucontext. */ 189 /* Create the ucontext. */
185 err |= __put_user(0, &frame->rs_uc.uc_flags); 190 err |= __put_user(0, &frame->rs_uc.uc_flags);
186 err |= __put_user(0, &frame->rs_uc.uc_link); 191 err |= __put_user(0, &frame->rs_uc.uc_link);
187 sp = (int) (long) current->sas_ss_sp; 192 sp = (int) (long) current->sas_ss_sp;
188 err |= __put_user(sp, 193 err |= __put_user(sp,
189 &frame->rs_uc.uc_stack.ss_sp); 194 &frame->rs_uc.uc_stack.ss_sp);
190 err |= __put_user(sas_ss_flags(regs->regs[29]), 195 err |= __put_user(sas_ss_flags(regs->regs[29]),
@@ -192,7 +197,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
192 err |= __put_user(current->sas_ss_size, 197 err |= __put_user(current->sas_ss_size,
193 &frame->rs_uc.uc_stack.ss_size); 198 &frame->rs_uc.uc_stack.ss_size);
194 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); 199 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
195 err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); 200 err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
196 201
197 if (err) 202 if (err)
198 goto give_sigsegv; 203 goto give_sigsegv;
@@ -214,14 +219,18 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
214 regs->regs[31] = (unsigned long) frame->rs_code; 219 regs->regs[31] = (unsigned long) frame->rs_code;
215 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; 220 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
216 221
217#if DEBUG_SIG 222 DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
218 printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
219 current->comm, current->pid, 223 current->comm, current->pid,
220 frame, regs->cp0_epc, regs->regs[31]); 224 frame, regs->cp0_epc, regs->regs[31]);
221#endif 225
222 return 0; 226 return 0;
223 227
224give_sigsegv: 228give_sigsegv:
225 force_sigsegv(signr, current); 229 force_sigsegv(signr, current);
226 return -EFAULT; 230 return -EFAULT;
227} 231}
232
233struct mips_abi mips_abi_n32 = {
234 .setup_rt_frame = setup_rt_frame_n32,
235 .restart = __NR_N32_restart_syscall
236};
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 1ee689c0e0c9..64b62bdfb4f6 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -35,7 +35,6 @@
35#include <asm/mipsregs.h> 35#include <asm/mipsregs.h>
36#include <asm/mipsmtregs.h> 36#include <asm/mipsmtregs.h>
37#include <asm/mips_mt.h> 37#include <asm/mips_mt.h>
38#include <asm/mips-boards/maltaint.h> /* This is f*cking wrong */
39 38
40#define MIPS_CPU_IPI_RESCHED_IRQ 0 39#define MIPS_CPU_IPI_RESCHED_IRQ 0
41#define MIPS_CPU_IPI_CALL_IRQ 1 40#define MIPS_CPU_IPI_CALL_IRQ 1
@@ -108,12 +107,12 @@ void __init sanitize_tlb_entries(void)
108 107
109static void ipi_resched_dispatch(void) 108static void ipi_resched_dispatch(void)
110{ 109{
111 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ); 110 do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
112} 111}
113 112
114static void ipi_call_dispatch(void) 113static void ipi_call_dispatch(void)
115{ 114{
116 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ); 115 do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ);
117} 116}
118 117
119static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) 118static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
@@ -270,8 +269,8 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
270 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 269 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
271 } 270 }
272 271
273 cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ; 272 cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
274 cpu_ipi_call_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ; 273 cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ;
275 274
276 setup_irq(cpu_ipi_resched_irq, &irq_resched); 275 setup_irq(cpu_ipi_resched_irq, &irq_resched);
277 setup_irq(cpu_ipi_call_irq, &irq_call); 276 setup_irq(cpu_ipi_call_irq, &irq_call);
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 0555fc554f65..c46e479c992b 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -51,31 +51,14 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
51EXPORT_SYMBOL(phys_cpu_present_map); 51EXPORT_SYMBOL(phys_cpu_present_map);
52EXPORT_SYMBOL(cpu_online_map); 52EXPORT_SYMBOL(cpu_online_map);
53 53
54/* This happens early in bootup, can't really do it better */
54static void smp_tune_scheduling (void) 55static void smp_tune_scheduling (void)
55{ 56{
56 struct cache_desc *cd = &current_cpu_data.scache; 57 struct cache_desc *cd = &current_cpu_data.scache;
57 unsigned long cachesize; /* kB */ 58 unsigned long cachesize = cd->linesz * cd->sets * cd->ways;
58 unsigned long cpu_khz;
59 59
60 /* 60 if (cachesize > max_cache_size)
61 * Crude estimate until we actually meassure ... 61 max_cache_size = cachesize;
62 */
63 cpu_khz = loops_per_jiffy * 2 * HZ / 1000;
64
65 /*
66 * Rough estimation for SMP scheduling, this is the number of
67 * cycles it takes for a fully memory-limited process to flush
68 * the SMP-local cache.
69 *
70 * (For a P5 this pretty much means we will choose another idle
71 * CPU almost always at wakeup time (this is due to the small
72 * L1 cache), on PIIs it's around 50-100 usecs, depending on
73 * the cache size)
74 */
75 if (!cpu_khz)
76 return;
77
78 cachesize = cd->linesz * cd->sets * cd->ways;
79} 62}
80 63
81extern void __init calibrate_delay(void); 64extern void __init calibrate_delay(void);
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 6a857bf030b0..9251ea824937 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -26,16 +26,6 @@
26 * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set. 26 * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set.
27 */ 27 */
28 28
29/*
30 * MIPSCPU_INT_BASE is identically defined in both
31 * asm-mips/mips-boards/maltaint.h and asm-mips/mips-boards/simint.h,
32 * but as yet there's no properly organized include structure that
33 * will ensure that the right *int.h file will be included for a
34 * given platform build.
35 */
36
37#define MIPSCPU_INT_BASE 16
38
39#define MIPS_CPU_IPI_IRQ 1 29#define MIPS_CPU_IPI_IRQ 1
40 30
41#define LOCK_MT_PRA() \ 31#define LOCK_MT_PRA() \
@@ -77,15 +67,15 @@ unsigned int ipi_timer_latch[NR_CPUS];
77 67
78#define IPIBUF_PER_CPU 4 68#define IPIBUF_PER_CPU 4
79 69
80struct smtc_ipi_q IPIQ[NR_CPUS]; 70static struct smtc_ipi_q IPIQ[NR_CPUS];
81struct smtc_ipi_q freeIPIq; 71static struct smtc_ipi_q freeIPIq;
82 72
83 73
84/* Forward declarations */ 74/* Forward declarations */
85 75
86void ipi_decode(struct smtc_ipi *); 76void ipi_decode(struct smtc_ipi *);
87void post_direct_ipi(int cpu, struct smtc_ipi *pipi); 77static void post_direct_ipi(int cpu, struct smtc_ipi *pipi);
88void setup_cross_vpe_interrupts(void); 78static void setup_cross_vpe_interrupts(void);
89void init_smtc_stats(void); 79void init_smtc_stats(void);
90 80
91/* Global SMTC Status */ 81/* Global SMTC Status */
@@ -200,7 +190,7 @@ void __init sanitize_tlb_entries(void)
200 * Configure shared TLB - VPC configuration bit must be set by caller 190 * Configure shared TLB - VPC configuration bit must be set by caller
201 */ 191 */
202 192
203void smtc_configure_tlb(void) 193static void smtc_configure_tlb(void)
204{ 194{
205 int i,tlbsiz,vpes; 195 int i,tlbsiz,vpes;
206 unsigned long mvpconf0; 196 unsigned long mvpconf0;
@@ -648,7 +638,7 @@ int setup_irq_smtc(unsigned int irq, struct irqaction * new,
648 * the VPE. 638 * the VPE.
649 */ 639 */
650 640
651void smtc_ipi_qdump(void) 641static void smtc_ipi_qdump(void)
652{ 642{
653 int i; 643 int i;
654 644
@@ -686,28 +676,6 @@ static __inline__ int atomic_postincrement(unsigned int *pv)
686 return result; 676 return result;
687} 677}
688 678
689/* No longer used in IPI dispatch, but retained for future recycling */
690
691static __inline__ int atomic_postclear(unsigned int *pv)
692{
693 unsigned long result;
694
695 unsigned long temp;
696
697 __asm__ __volatile__(
698 "1: ll %0, %2 \n"
699 " or %1, $0, $0 \n"
700 " sc %1, %2 \n"
701 " beqz %1, 1b \n"
702 " sync \n"
703 : "=&r" (result), "=&r" (temp), "=m" (*pv)
704 : "m" (*pv)
705 : "memory");
706
707 return result;
708}
709
710
711void smtc_send_ipi(int cpu, int type, unsigned int action) 679void smtc_send_ipi(int cpu, int type, unsigned int action)
712{ 680{
713 int tcstatus; 681 int tcstatus;
@@ -781,7 +749,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
781/* 749/*
782 * Send IPI message to Halted TC, TargTC/TargVPE already having been set 750 * Send IPI message to Halted TC, TargTC/TargVPE already having been set
783 */ 751 */
784void post_direct_ipi(int cpu, struct smtc_ipi *pipi) 752static void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
785{ 753{
786 struct pt_regs *kstack; 754 struct pt_regs *kstack;
787 unsigned long tcstatus; 755 unsigned long tcstatus;
@@ -921,7 +889,7 @@ void smtc_timer_broadcast(int vpe)
921 * interrupts. 889 * interrupts.
922 */ 890 */
923 891
924static int cpu_ipi_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_IRQ; 892static int cpu_ipi_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_IRQ;
925 893
926static irqreturn_t ipi_interrupt(int irq, void *dev_idm) 894static irqreturn_t ipi_interrupt(int irq, void *dev_idm)
927{ 895{
@@ -1000,7 +968,7 @@ static void ipi_irq_dispatch(void)
1000 968
1001static struct irqaction irq_ipi; 969static struct irqaction irq_ipi;
1002 970
1003void setup_cross_vpe_interrupts(void) 971static void setup_cross_vpe_interrupts(void)
1004{ 972{
1005 if (!cpu_has_vint) 973 if (!cpu_has_vint)
1006 panic("SMTC Kernel requires Vectored Interupt support"); 974 panic("SMTC Kernel requires Vectored Interupt support");
@@ -1191,7 +1159,7 @@ void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu)
1191 * It would be nice to be able to use a spinlock here, 1159 * It would be nice to be able to use a spinlock here,
1192 * but this is invoked from within TLB flush routines 1160 * but this is invoked from within TLB flush routines
1193 * that protect themselves with DVPE, so if a lock is 1161 * that protect themselves with DVPE, so if a lock is
1194 * held by another TC, it'll never be freed. 1162 * held by another TC, it'll never be freed.
1195 * 1163 *
1196 * DVPE/DMT must not be done with interrupts enabled, 1164 * DVPE/DMT must not be done with interrupts enabled,
1197 * so even so most callers will already have disabled 1165 * so even so most callers will already have disabled
@@ -1296,7 +1264,7 @@ void smtc_flush_tlb_asid(unsigned long asid)
1296 * Support for single-threading cache flush operations. 1264 * Support for single-threading cache flush operations.
1297 */ 1265 */
1298 1266
1299int halt_state_save[NR_CPUS]; 1267static int halt_state_save[NR_CPUS];
1300 1268
1301/* 1269/*
1302 * To really, really be sure that nothing is being done 1270 * To really, really be sure that nothing is being done
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 6c2406a93f2b..93a148486f88 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -669,7 +669,7 @@ asmlinkage int irix_mount(char __user *dev_name, char __user *dir_name,
669 669
670struct irix_statfs { 670struct irix_statfs {
671 short f_type; 671 short f_type;
672 long f_bsize, f_frsize, f_blocks, f_bfree, f_files, f_ffree; 672 long f_bsize, f_frsize, f_blocks, f_bfree, f_files, f_ffree;
673 char f_fname[6], f_fpack[6]; 673 char f_fname[6], f_fpack[6];
674}; 674};
675 675
@@ -959,7 +959,7 @@ static inline loff_t llseek(struct file *file, loff_t offset, int origin)
959 959
960 fn = default_llseek; 960 fn = default_llseek;
961 if (file->f_op && file->f_op->llseek) 961 if (file->f_op && file->f_op->llseek)
962 fn = file->f_op->llseek; 962 fn = file->f_op->llseek;
963 lock_kernel(); 963 lock_kernel();
964 retval = fn(file, offset, origin); 964 retval = fn(file, offset, origin);
965 unlock_kernel(); 965 unlock_kernel();
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 8aa544f73a5e..e5e56bd498db 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -307,7 +307,7 @@ static unsigned int __init calibrate_hpt(void)
307struct clocksource clocksource_mips = { 307struct clocksource clocksource_mips = {
308 .name = "MIPS", 308 .name = "MIPS",
309 .mask = 0xffffffff, 309 .mask = 0xffffffff,
310 .is_continuous = 1, 310 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
311}; 311};
312 312
313static void __init init_mips_clocksource(void) 313static void __init init_mips_clocksource(void)
@@ -455,8 +455,3 @@ EXPORT_SYMBOL(rtc_lock);
455EXPORT_SYMBOL(to_tm); 455EXPORT_SYMBOL(to_tm);
456EXPORT_SYMBOL(rtc_mips_set_time); 456EXPORT_SYMBOL(rtc_mips_set_time);
457EXPORT_SYMBOL(rtc_mips_get_time); 457EXPORT_SYMBOL(rtc_mips_get_time);
458
459unsigned long long sched_clock(void)
460{
461 return (unsigned long long)jiffies*(1000000000/HZ);
462}
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 2a932cada244..18f56a9dbcfa 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -229,6 +229,9 @@ void show_regs(struct pt_regs *regs)
229 printk("\n"); 229 printk("\n");
230 } 230 }
231 231
232#ifdef CONFIG_CPU_HAS_SMARTMIPS
233 printk("Acx : %0*lx\n", field, regs->acx);
234#endif
232 printk("Hi : %0*lx\n", field, regs->hi); 235 printk("Hi : %0*lx\n", field, regs->hi);
233 printk("Lo : %0*lx\n", field, regs->lo); 236 printk("Lo : %0*lx\n", field, regs->lo);
234 237
@@ -340,13 +343,9 @@ NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs)
340extern const struct exception_table_entry __start___dbe_table[]; 343extern const struct exception_table_entry __start___dbe_table[];
341extern const struct exception_table_entry __stop___dbe_table[]; 344extern const struct exception_table_entry __stop___dbe_table[];
342 345
343void __declare_dbe_table(void) 346__asm__(
344{ 347" .section __dbe_table, \"a\"\n"
345 __asm__ __volatile__( 348" .previous \n");
346 ".section\t__dbe_table,\"a\"\n\t"
347 ".previous"
348 );
349}
350 349
351/* Given an address, look for it in the exception tables. */ 350/* Given an address, look for it in the exception tables. */
352static const struct exception_table_entry *search_dbe_tables(unsigned long addr) 351static const struct exception_table_entry *search_dbe_tables(unsigned long addr)
@@ -708,6 +707,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
708 die_if_kernel("Break instruction in kernel code", regs); 707 die_if_kernel("Break instruction in kernel code", regs);
709 force_sig(SIGTRAP, current); 708 force_sig(SIGTRAP, current);
710 } 709 }
710 return;
711 711
712out_sigsegv: 712out_sigsegv:
713 force_sig(SIGSEGV, current); 713 force_sig(SIGSEGV, current);
@@ -751,6 +751,7 @@ asmlinkage void do_tr(struct pt_regs *regs)
751 die_if_kernel("Trap instruction in kernel code", regs); 751 die_if_kernel("Trap instruction in kernel code", regs);
752 force_sig(SIGTRAP, current); 752 force_sig(SIGTRAP, current);
753 } 753 }
754 return;
754 755
755out_sigsegv: 756out_sigsegv:
756 force_sig(SIGSEGV, current); 757 force_sig(SIGSEGV, current);
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index cecff24cc972..c76b793310c2 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -113,10 +113,12 @@ SECTIONS
113 references from .rodata */ 113 references from .rodata */
114 .exit.text : { *(.exit.text) } 114 .exit.text : { *(.exit.text) }
115 .exit.data : { *(.exit.data) } 115 .exit.data : { *(.exit.data) }
116#if defined(CONFIG_BLK_DEV_INITRD)
116 . = ALIGN(_PAGE_SIZE); 117 . = ALIGN(_PAGE_SIZE);
117 __initramfs_start = .; 118 __initramfs_start = .;
118 .init.ramfs : { *(.init.ramfs) } 119 .init.ramfs : { *(.init.ramfs) }
119 __initramfs_end = .; 120 __initramfs_end = .;
121#endif
120 . = ALIGN(32); 122 . = ALIGN(32);
121 __per_cpu_start = .; 123 __per_cpu_start = .;
122 .data.percpu : { *(.data.percpu) } 124 .data.percpu : { *(.data.percpu) }
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 458fccf87c54..9aca871a307f 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -29,6 +29,7 @@
29 */ 29 */
30 30
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/device.h>
32#include <linux/module.h> 33#include <linux/module.h>
33#include <linux/fs.h> 34#include <linux/fs.h>
34#include <linux/init.h> 35#include <linux/init.h>
@@ -48,6 +49,7 @@
48#include <asm/cacheflush.h> 49#include <asm/cacheflush.h>
49#include <asm/atomic.h> 50#include <asm/atomic.h>
50#include <asm/cpu.h> 51#include <asm/cpu.h>
52#include <asm/mips_mt.h>
51#include <asm/processor.h> 53#include <asm/processor.h>
52#include <asm/system.h> 54#include <asm/system.h>
53#include <asm/vpe.h> 55#include <asm/vpe.h>
@@ -64,6 +66,7 @@ typedef void *vpe_handle;
64 66
65static char module_name[] = "vpe"; 67static char module_name[] = "vpe";
66static int major; 68static int major;
69static const int minor = 1; /* fixed for now */
67 70
68#ifdef CONFIG_MIPS_APSP_KSPD 71#ifdef CONFIG_MIPS_APSP_KSPD
69 static struct kspd_notifications kspd_events; 72 static struct kspd_notifications kspd_events;
@@ -522,7 +525,7 @@ static int (*reloc_handlers[]) (struct module *me, uint32_t *location,
522}; 525};
523 526
524static char *rstrs[] = { 527static char *rstrs[] = {
525 [R_MIPS_NONE] = "MIPS_NONE", 528 [R_MIPS_NONE] = "MIPS_NONE",
526 [R_MIPS_32] = "MIPS_32", 529 [R_MIPS_32] = "MIPS_32",
527 [R_MIPS_26] = "MIPS_26", 530 [R_MIPS_26] = "MIPS_26",
528 [R_MIPS_HI16] = "MIPS_HI16", 531 [R_MIPS_HI16] = "MIPS_HI16",
@@ -695,7 +698,7 @@ static void dump_tclist(void)
695} 698}
696 699
697/* We are prepared so configure and start the VPE... */ 700/* We are prepared so configure and start the VPE... */
698int vpe_run(struct vpe * v) 701static int vpe_run(struct vpe * v)
699{ 702{
700 struct vpe_notifications *n; 703 struct vpe_notifications *n;
701 unsigned long val, dmt_flag; 704 unsigned long val, dmt_flag;
@@ -713,16 +716,16 @@ int vpe_run(struct vpe * v)
713 dvpe(); 716 dvpe();
714 717
715 if (!list_empty(&v->tc)) { 718 if (!list_empty(&v->tc)) {
716 if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) { 719 if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) {
717 printk(KERN_WARNING "VPE loader: TC %d is already in use.\n", 720 printk(KERN_WARNING "VPE loader: TC %d is already in use.\n",
718 t->index); 721 t->index);
719 return -ENOEXEC; 722 return -ENOEXEC;
720 } 723 }
721 } else { 724 } else {
722 printk(KERN_WARNING "VPE loader: No TC's associated with VPE %d\n", 725 printk(KERN_WARNING "VPE loader: No TC's associated with VPE %d\n",
723 v->minor); 726 v->minor);
724 return -ENOEXEC; 727 return -ENOEXEC;
725 } 728 }
726 729
727 /* Put MVPE's into 'configuration state' */ 730 /* Put MVPE's into 'configuration state' */
728 set_c0_mvpcontrol(MVPCONTROL_VPC); 731 set_c0_mvpcontrol(MVPCONTROL_VPC);
@@ -775,14 +778,14 @@ int vpe_run(struct vpe * v)
775 778
776 back_to_back_c0_hazard(); 779 back_to_back_c0_hazard();
777 780
778 /* Set up the XTC bit in vpeconf0 to point at our tc */ 781 /* Set up the XTC bit in vpeconf0 to point at our tc */
779 write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC)) 782 write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC))
780 | (t->index << VPECONF0_XTC_SHIFT)); 783 | (t->index << VPECONF0_XTC_SHIFT));
781 784
782 back_to_back_c0_hazard(); 785 back_to_back_c0_hazard();
783 786
784 /* enable this VPE */ 787 /* enable this VPE */
785 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_VPA); 788 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_VPA);
786 789
787 /* clear out any left overs from a previous program */ 790 /* clear out any left overs from a previous program */
788 write_vpe_c0_status(0); 791 write_vpe_c0_status(0);
@@ -832,7 +835,7 @@ static int find_vpe_symbols(struct vpe * v, Elf_Shdr * sechdrs,
832 * contents of the program (p)buffer performing relocatations/etc, free's it 835 * contents of the program (p)buffer performing relocatations/etc, free's it
833 * when finished. 836 * when finished.
834 */ 837 */
835int vpe_elfload(struct vpe * v) 838static int vpe_elfload(struct vpe * v)
836{ 839{
837 Elf_Ehdr *hdr; 840 Elf_Ehdr *hdr;
838 Elf_Shdr *sechdrs; 841 Elf_Shdr *sechdrs;
@@ -1205,7 +1208,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer,
1205 return ret; 1208 return ret;
1206} 1209}
1207 1210
1208static struct file_operations vpe_fops = { 1211static const struct file_operations vpe_fops = {
1209 .owner = THIS_MODULE, 1212 .owner = THIS_MODULE,
1210 .open = vpe_open, 1213 .open = vpe_open,
1211 .release = vpe_release, 1214 .release = vpe_release,
@@ -1365,12 +1368,15 @@ static void kspd_sp_exit( int sp_id)
1365} 1368}
1366#endif 1369#endif
1367 1370
1371static struct device *vpe_dev;
1372
1368static int __init vpe_module_init(void) 1373static int __init vpe_module_init(void)
1369{ 1374{
1370 struct vpe *v = NULL; 1375 struct vpe *v = NULL;
1376 struct device *dev;
1371 struct tc *t; 1377 struct tc *t;
1372 unsigned long val; 1378 unsigned long val;
1373 int i; 1379 int i, err;
1374 1380
1375 if (!cpu_has_mipsmt) { 1381 if (!cpu_has_mipsmt) {
1376 printk("VPE loader: not a MIPS MT capable processor\n"); 1382 printk("VPE loader: not a MIPS MT capable processor\n");
@@ -1383,6 +1389,14 @@ static int __init vpe_module_init(void)
1383 return major; 1389 return major;
1384 } 1390 }
1385 1391
1392 dev = device_create(mt_class, NULL, MKDEV(major, minor),
1393 "tc%d", minor);
1394 if (IS_ERR(dev)) {
1395 err = PTR_ERR(dev);
1396 goto out_chrdev;
1397 }
1398 vpe_dev = dev;
1399
1386 dmt(); 1400 dmt();
1387 dvpe(); 1401 dvpe();
1388 1402
@@ -1478,6 +1492,11 @@ static int __init vpe_module_init(void)
1478 kspd_events.kspd_sp_exit = kspd_sp_exit; 1492 kspd_events.kspd_sp_exit = kspd_sp_exit;
1479#endif 1493#endif
1480 return 0; 1494 return 0;
1495
1496out_chrdev:
1497 unregister_chrdev(major, module_name);
1498
1499 return err;
1481} 1500}
1482 1501
1483static void __exit vpe_module_exit(void) 1502static void __exit vpe_module_exit(void)
@@ -1490,6 +1509,7 @@ static void __exit vpe_module_exit(void)
1490 } 1509 }
1491 } 1510 }
1492 1511
1512 device_destroy(mt_class, MKDEV(major, minor));
1493 unregister_chrdev(major, module_name); 1513 unregister_chrdev(major, module_name);
1494} 1514}
1495 1515
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index 2affa5ff171c..9a622b9a1051 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -45,7 +45,7 @@ void enable_lasat_irq(unsigned int irq_nr)
45} 45}
46 46
47static struct irq_chip lasat_irq_type = { 47static struct irq_chip lasat_irq_type = {
48 .typename = "Lasat", 48 .name = "Lasat",
49 .ack = disable_lasat_irq, 49 .ack = disable_lasat_irq,
50 .mask = disable_lasat_irq, 50 .mask = disable_lasat_irq,
51 .mask_ack = disable_lasat_irq, 51 .mask_ack = disable_lasat_irq,
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
index 88c7ab871ec4..d47692f73a26 100644
--- a/arch/mips/lasat/prom.c
+++ b/arch/mips/lasat/prom.c
@@ -132,9 +132,8 @@ void __init prom_init(void)
132 add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM); 132 add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM);
133} 133}
134 134
135unsigned long __init prom_free_prom_memory(void) 135void __init prom_free_prom_memory(void)
136{ 136{
137 return 0;
138} 137}
139 138
140const char *get_system_type(void) 139const char *get_system_type(void)
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 12878359f2c8..699ab1886ceb 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -302,42 +302,129 @@ extern int lasat_boot_to_service;
302#ifdef CONFIG_SYSCTL 302#ifdef CONFIG_SYSCTL
303 303
304static ctl_table lasat_table[] = { 304static ctl_table lasat_table[] = {
305 {LASAT_CPU_HZ, "cpu-hz", &lasat_board_info.li_cpu_hz, sizeof(int), 305 {
306 0444, NULL, &proc_dointvec, &sysctl_intvec}, 306 .ctl_name = CTL_UNNUMBERED,
307 {LASAT_BUS_HZ, "bus-hz", &lasat_board_info.li_bus_hz, sizeof(int), 307 .procname = "cpu-hz",
308 0444, NULL, &proc_dointvec, &sysctl_intvec}, 308 .data = &lasat_board_info.li_cpu_hz,
309 {LASAT_MODEL, "bmid", &lasat_board_info.li_bmid, sizeof(int), 309 .maxlen = sizeof(int),
310 0444, NULL, &proc_dointvec, &sysctl_intvec}, 310 .mode = 0444,
311 {LASAT_PRID, "prid", &lasat_board_info.li_prid, sizeof(int), 311 .proc_handler = &proc_dointvec,
312 0644, NULL, &proc_lasat_eeprom_value, &sysctl_lasat_eeprom_value}, 312 .strategy = &sysctl_intvec
313 },
314 {
315 .ctl_name = CTL_UNNUMBERED,
316 .procname = "bus-hz",
317 .data = &lasat_board_info.li_bus_hz,
318 .maxlen = sizeof(int),
319 .mode = 0444,
320 .proc_handler = &proc_dointvec,
321 .strategy = &sysctl_intvec
322 },
323 {
324 .ctl_name = CTL_UNNUMBERED,
325 .procname = "bmid",
326 .data = &lasat_board_info.li_bmid,
327 .maxlen = sizeof(int),
328 .mode = 0444,
329 .proc_handler = &proc_dointvec,
330 .strategy = &sysctl_intvec
331 },
332 {
333 .ctl_name = CTL_UNNUMBERED,
334 .procname = "prid",
335 .data = &lasat_board_info.li_prid,
336 .maxlen = sizeof(int),
337 .mode = 0644,
338 .proc_handler = &proc_lasat_eeprom_value,
339 .strategy = &sysctl_lasat_eeprom_value
340 },
313#ifdef CONFIG_INET 341#ifdef CONFIG_INET
314 {LASAT_IPADDR, "ipaddr", &lasat_board_info.li_eeprom_info.ipaddr, sizeof(int), 342 {
315 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, 343 .ctl_name = CTL_UNNUMBERED,
316 {LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int), 344 .procname = "ipaddr",
317 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, 345 .data = &lasat_board_info.li_eeprom_info.ipaddr,
318 {LASAT_BCAST, "bcastaddr", &lasat_bcastaddr, 346 .maxlen = sizeof(int),
319 sizeof(lasat_bcastaddr), 0600, NULL, 347 .mode = 0644,
320 &proc_dostring, &sysctl_string}, 348 .proc_handler = &proc_lasat_ip,
349 .strategy = &sysctl_lasat_intvec
350 },
351 {
352 .ctl_name = LASAT_NETMASK,
353 .procname = "netmask",
354 .data = &lasat_board_info.li_eeprom_info.netmask,
355 .maxlen = sizeof(int),
356 .mode = 0644,
357 .proc_handler = &proc_lasat_ip,
358 .strategy = &sysctl_lasat_intvec
359 },
360 {
361 .ctl_name = CTL_UNNUMBERED,
362 .procname = "bcastaddr",
363 .data = &lasat_bcastaddr,
364 .maxlen = sizeof(lasat_bcastaddr),
365 .mode = 0600,
366 .proc_handler = &proc_dostring,
367 .strategy = &sysctl_string
368 },
321#endif 369#endif
322 {LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash), 370 {
323 0600, NULL, &proc_dolasatstring, &sysctl_lasatstring}, 371 .ctl_name = CTL_UNNUMBERED,
324 {LASAT_SBOOT, "boot-service", &lasat_boot_to_service, sizeof(int), 372 .procname = "passwd_hash",
325 0644, NULL, &proc_dointvec, &sysctl_intvec}, 373 .data = &lasat_board_info.li_eeprom_info.passwd_hash,
374 .maxlen = sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
375 .mode = 0600,
376 .proc_handler = &proc_dolasatstring,
377 .strategy = &sysctl_lasatstring
378 },
379 {
380 .ctl_name = CTL_UNNUMBERED,
381 .procname = "boot-service",
382 .data = &lasat_boot_to_service,
383 .maxlen = sizeof(int),
384 .mode = 0644,
385 .proc_handler = &proc_dointvec,
386 .strategy = &sysctl_intvec
387 },
326#ifdef CONFIG_DS1603 388#ifdef CONFIG_DS1603
327 {LASAT_RTC, "rtc", &rtctmp, sizeof(int), 389 {
328 0644, NULL, &proc_dolasatrtc, &sysctl_lasat_rtc}, 390 .ctl_name = CTL_UNNUMBERED,
391 .procname = "rtc",
392 .data = &rtctmp,
393 .maxlen = sizeof(int),
394 .mode = 0644,
395 .proc_handler = &proc_dolasatrtc,
396 .strategy = &sysctl_lasat_rtc
397 },
329#endif 398#endif
330 {LASAT_NAMESTR, "namestr", &lasat_board_info.li_namestr, sizeof(lasat_board_info.li_namestr), 399 {
331 0444, NULL, &proc_dostring, &sysctl_string}, 400 .ctl_name = CTL_UNNUMBERED,
332 {LASAT_TYPESTR, "typestr", &lasat_board_info.li_typestr, sizeof(lasat_board_info.li_typestr), 401 .procname = "namestr",
333 0444, NULL, &proc_dostring, &sysctl_string}, 402 .data = &lasat_board_info.li_namestr,
334 {0} 403 .maxlen = sizeof(lasat_board_info.li_namestr),
404 .mode = 0444,
405 .proc_handler = &proc_dostring,
406 .strategy = &sysctl_string
407 },
408 {
409 .ctl_name = CTL_UNNUMBERED,
410 .procname = "typestr",
411 .data = &lasat_board_info.li_typestr,
412 .maxlen = sizeof(lasat_board_info.li_typestr),
413 .mode = 0444,
414 .proc_handler = &proc_dostring,
415 .strategy = &sysctl_string
416 },
417 {}
335}; 418};
336 419
337#define CTL_LASAT 1 // CTL_ANY ???
338static ctl_table lasat_root_table[] = { 420static ctl_table lasat_root_table[] = {
339 { CTL_LASAT, "lasat", NULL, 0, 0555, lasat_table }, 421 {
340 { 0 } 422 .ctl_name = CTL_UNNUMBERED,
423 .procname = "lasat",
424 .mode = 0555,
425 .child = lasat_table
426 },
427 {}
341}; 428};
342 429
343static int __init lasat_register_sysctl(void) 430static int __init lasat_register_sysctl(void)
@@ -345,7 +432,7 @@ static int __init lasat_register_sysctl(void)
345 struct ctl_table_header *lasat_table_header; 432 struct ctl_table_header *lasat_table_header;
346 433
347 lasat_table_header = 434 lasat_table_header =
348 register_sysctl_table(lasat_root_table, 0); 435 register_sysctl_table(lasat_root_table);
349 436
350 return 0; 437 return 0;
351} 438}
diff --git a/arch/mips/lib-32/Makefile b/arch/mips/lib-32/Makefile
index dcd4d2ed2ac4..2036cf5e6857 100644
--- a/arch/mips/lib-32/Makefile
+++ b/arch/mips/lib-32/Makefile
@@ -2,7 +2,7 @@
2# Makefile for MIPS-specific library files.. 2# Makefile for MIPS-specific library files..
3# 3#
4 4
5lib-y += memset.o watch.o 5lib-y += watch.o
6 6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o 7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o 8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
diff --git a/arch/mips/lib-64/Makefile b/arch/mips/lib-64/Makefile
index dcd4d2ed2ac4..2036cf5e6857 100644
--- a/arch/mips/lib-64/Makefile
+++ b/arch/mips/lib-64/Makefile
@@ -2,7 +2,7 @@
2# Makefile for MIPS-specific library files.. 2# Makefile for MIPS-specific library files..
3# 3#
4 4
5lib-y += memset.o watch.o 5lib-y += watch.o
6 6
7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o 7obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o
8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o 8obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o
diff --git a/arch/mips/lib-64/memset.S b/arch/mips/lib-64/memset.S
deleted file mode 100644
index e2c42c85113b..000000000000
--- a/arch/mips/lib-64/memset.S
+++ /dev/null
@@ -1,142 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1998, 1999, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 */
9#include <asm/asm.h>
10#include <asm/asm-offsets.h>
11#include <asm/regdef.h>
12
13#define EX(insn,reg,addr,handler) \
149: insn reg, addr; \
15 .section __ex_table,"a"; \
16 PTR 9b, handler; \
17 .previous
18
19 .macro f_fill64 dst, offset, val, fixup
20 EX(LONG_S, \val, (\offset + 0 * LONGSIZE)(\dst), \fixup)
21 EX(LONG_S, \val, (\offset + 1 * LONGSIZE)(\dst), \fixup)
22 EX(LONG_S, \val, (\offset + 2 * LONGSIZE)(\dst), \fixup)
23 EX(LONG_S, \val, (\offset + 3 * LONGSIZE)(\dst), \fixup)
24 EX(LONG_S, \val, (\offset + 4 * LONGSIZE)(\dst), \fixup)
25 EX(LONG_S, \val, (\offset + 5 * LONGSIZE)(\dst), \fixup)
26 EX(LONG_S, \val, (\offset + 6 * LONGSIZE)(\dst), \fixup)
27 EX(LONG_S, \val, (\offset + 7 * LONGSIZE)(\dst), \fixup)
28 .endm
29
30/*
31 * memset(void *s, int c, size_t n)
32 *
33 * a0: start of area to clear
34 * a1: char to fill with
35 * a2: size of area to clear
36 */
37 .set noreorder
38 .align 5
39LEAF(memset)
40 beqz a1, 1f
41 move v0, a0 /* result */
42
43 andi a1, 0xff /* spread fillword */
44 dsll t1, a1, 8
45 or a1, t1
46 dsll t1, a1, 16
47 or a1, t1
48 dsll t1, a1, 32
49 or a1, t1
501:
51
52FEXPORT(__bzero)
53 sltiu t0, a2, LONGSIZE /* very small region? */
54 bnez t0, small_memset
55 andi t0, a0, LONGMASK /* aligned? */
56
57 beqz t0, 1f
58 PTR_SUBU t0, LONGSIZE /* alignment in bytes */
59
60#ifdef __MIPSEB__
61 EX(sdl, a1, (a0), first_fixup) /* make dword aligned */
62#endif
63#ifdef __MIPSEL__
64 EX(sdr, a1, (a0), first_fixup) /* make dword aligned */
65#endif
66 PTR_SUBU a0, t0 /* long align ptr */
67 PTR_ADDU a2, t0 /* correct size */
68
691: ori t1, a2, 0x3f /* # of full blocks */
70 xori t1, 0x3f
71 beqz t1, memset_partial /* no block to fill */
72 andi t0, a2, 0x38
73
74 PTR_ADDU t1, a0 /* end address */
75 .set reorder
761: PTR_ADDIU a0, 64
77 f_fill64 a0, -64, a1, fwd_fixup
78 bne t1, a0, 1b
79 .set noreorder
80
81memset_partial:
82 PTR_LA t1, 2f /* where to start */
83 .set noat
84 dsrl AT, t0, 1
85 PTR_SUBU t1, AT
86 .set noat
87 jr t1
88 PTR_ADDU a0, t0 /* dest ptr */
89
90 .set push
91 .set noreorder
92 .set nomacro
93 f_fill64 a0, -64, a1, partial_fixup /* ... but first do longs ... */
942: .set pop
95 andi a2, LONGMASK /* At most one long to go */
96
97 beqz a2, 1f
98 PTR_ADDU a0, a2 /* What's left */
99#ifdef __MIPSEB__
100 EX(sdr, a1, -1(a0), last_fixup)
101#endif
102#ifdef __MIPSEL__
103 EX(sdl, a1, -1(a0), last_fixup)
104#endif
1051: jr ra
106 move a2, zero
107
108small_memset:
109 beqz a2, 2f
110 PTR_ADDU t1, a0, a2
111
1121: PTR_ADDIU a0, 1 /* fill bytewise */
113 bne t1, a0, 1b
114 sb a1, -1(a0)
115
1162: jr ra /* done */
117 move a2, zero
118 END(memset)
119
120first_fixup:
121 jr ra
122 nop
123
124fwd_fixup:
125 PTR_L t0, TI_TASK($28)
126 LONG_L t0, THREAD_BUADDR(t0)
127 andi a2, 0x3f
128 LONG_ADDU a2, t1
129 jr ra
130 LONG_SUBU a2, t0
131
132partial_fixup:
133 PTR_L t0, TI_TASK($28)
134 LONG_L t0, THREAD_BUADDR(t0)
135 andi a2, LONGMASK
136 LONG_ADDU a2, t1
137 jr ra
138 LONG_SUBU a2, t0
139
140last_fixup:
141 jr ra
142 andi v1, a2, LONGMASK
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 989c900b8b14..2453ea244cb8 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -2,10 +2,11 @@
2# Makefile for MIPS-specific library files.. 2# Makefile for MIPS-specific library files..
3# 3#
4 4
5lib-y += csum_partial.o memcpy.o promlib.o \ 5lib-y += csum_partial.o memcpy.o memcpy-inatomic.o memset.o promlib.o \
6 strlen_user.o strncpy_user.o strnlen_user.o uncached.o 6 strlen_user.o strncpy_user.o strnlen_user.o uncached.o
7 7
8obj-y += iomap.o 8obj-y += iomap.o
9obj-$(CONFIG_PCI) += iomap-pci.o
9 10
10# libgcc-style stuff needed in the kernel 11# libgcc-style stuff needed in the kernel
11lib-y += ashldi3.o ashrdi3.o lshrdi3.o 12lib-y += ashldi3.o ashrdi3.o lshrdi3.o
diff --git a/arch/mips/lib/iomap-pci.c b/arch/mips/lib/iomap-pci.c
new file mode 100644
index 000000000000..c11b2494bb6e
--- /dev/null
+++ b/arch/mips/lib/iomap-pci.c
@@ -0,0 +1,74 @@
1/*
2 * Implement the default iomap interfaces
3 *
4 * (C) Copyright 2004 Linus Torvalds
5 * (C) Copyright 2006 Ralf Baechle <ralf@linux-mips.org>
6 * (C) Copyright 2007 MIPS Technologies, Inc.
7 * written by Ralf Baechle <ralf@linux-mips.org>
8 */
9#include <linux/pci.h>
10#include <linux/module.h>
11#include <asm/io.h>
12
13static void __iomem *ioport_map_pci(struct pci_dev *dev,
14 unsigned long port, unsigned int nr)
15{
16 struct pci_controller *ctrl = dev->bus->sysdata;
17 unsigned long base = ctrl->io_map_base;
18
19 /* This will eventually become a BUG_ON but for now be gentle */
20 if (unlikely(!ctrl->io_map_base)) {
21 struct pci_bus *bus = dev->bus;
22 char name[8];
23
24 while (bus->parent)
25 bus = bus->parent;
26
27 ctrl->io_map_base = base = mips_io_port_base;
28
29 sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number);
30 printk(KERN_WARNING "io_map_base of root PCI bus %s unset. "
31 "Trying to continue but you better\nfix this issue or "
32 "report it to linux-mips@linux-mips.org or your "
33 "vendor.\n", name);
34#ifdef CONFIG_PCI_DOMAINS
35 panic("To avoid data corruption io_map_base MUST be set with "
36 "multiple PCI domains.");
37#endif
38 }
39
40 return (void __iomem *) (ctrl->io_map_base + port);
41}
42
43/*
44 * Create a virtual mapping cookie for a PCI BAR (memory or IO)
45 */
46void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
47{
48 unsigned long start = pci_resource_start(dev, bar);
49 unsigned long len = pci_resource_len(dev, bar);
50 unsigned long flags = pci_resource_flags(dev, bar);
51
52 if (!len || !start)
53 return NULL;
54 if (maxlen && len > maxlen)
55 len = maxlen;
56 if (flags & IORESOURCE_IO)
57 return ioport_map_pci(dev, start, len);
58 if (flags & IORESOURCE_MEM) {
59 if (flags & IORESOURCE_CACHEABLE)
60 return ioremap(start, len);
61 return ioremap_nocache(start, len);
62 }
63 /* What? */
64 return NULL;
65}
66
67EXPORT_SYMBOL(pci_iomap);
68
69void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
70{
71 iounmap(addr);
72}
73
74EXPORT_SYMBOL(pci_iounmap);
diff --git a/arch/mips/lib/iomap.c b/arch/mips/lib/iomap.c
index f4ac5bbcd81f..d51d5cb0a4a9 100644
--- a/arch/mips/lib/iomap.c
+++ b/arch/mips/lib/iomap.c
@@ -1,78 +1,227 @@
1/* 1/*
2 * iomap.c, Memory Mapped I/O routines for MIPS architecture. 2 * Implement the default iomap interfaces
3 * 3 *
4 * This code is based on lib/iomap.c, by Linus Torvalds. 4 * (C) Copyright 2004 Linus Torvalds
5 * 5 * (C) Copyright 2006 Ralf Baechle <ralf@linux-mips.org>
6 * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> 6 * (C) Copyright 2007 MIPS Technologies, Inc.
7 * 7 * written by Ralf Baechle <ralf@linux-mips.org>
8 * This program is free software; you can redistribute it and/or modify 8 */
9 * it under the terms of the GNU General Public License as published by 9#include <linux/pci.h>
10 * the Free Software Foundation; either version 2 of the License, or 10#include <linux/module.h>
11 * (at your option) any later version. 11#include <asm/io.h>
12
13/*
14 * Read/write from/to an (offsettable) iomem cookie. It might be a PIO
15 * access or a MMIO access, these functions don't care. The info is
16 * encoded in the hardware mapping set up by the mapping functions
17 * (or the cookie itself, depending on implementation and hw).
12 * 18 *
13 * This program is distributed in the hope that it will be useful, 19 * The generic routines don't assume any hardware mappings, and just
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * encode the PIO/MMIO as part of the cookie. They coldly assume that
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * the MMIO IO mappings are not in the low address range.
16 * GNU General Public License for more details.
17 * 22 *
18 * You should have received a copy of the GNU General Public License 23 * Architectures for which this is not true can't use this generic
19 * along with this program; if not, write to the Free Software 24 * implementation and should do their own copy.
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 25 */
22#include <linux/ioport.h>
23#include <linux/module.h>
24#include <linux/pci.h>
25 26
26#include <asm/io.h> 27#define PIO_MASK 0x0ffffUL
27 28
28void __iomem *ioport_map(unsigned long port, unsigned int nr) 29unsigned int ioread8(void __iomem *addr)
29{ 30{
30 unsigned long end; 31 return readb(addr);
32}
31 33
32 end = port + nr - 1UL; 34EXPORT_SYMBOL(ioread8);
33 if (ioport_resource.start > port ||
34 ioport_resource.end < end || port > end)
35 return NULL;
36 35
37 return (void __iomem *)(mips_io_port_base + port); 36unsigned int ioread16(void __iomem *addr)
37{
38 return readw(addr);
38} 39}
39 40
40void ioport_unmap(void __iomem *addr) 41EXPORT_SYMBOL(ioread16);
42
43unsigned int ioread16be(void __iomem *addr)
41{ 44{
45 return be16_to_cpu(__raw_readw(addr));
42} 46}
43EXPORT_SYMBOL(ioport_map);
44EXPORT_SYMBOL(ioport_unmap);
45 47
46void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) 48EXPORT_SYMBOL(ioread16be);
49
50unsigned int ioread32(void __iomem *addr)
47{ 51{
48 unsigned long start, len, flags; 52 return readl(addr);
53}
49 54
50 if (dev == NULL) 55EXPORT_SYMBOL(ioread32);
51 return NULL;
52 56
53 start = pci_resource_start(dev, bar); 57unsigned int ioread32be(void __iomem *addr)
54 len = pci_resource_len(dev, bar); 58{
55 if (!start || !len) 59 return be32_to_cpu(__raw_readl(addr));
56 return NULL; 60}
57 61
58 if (maxlen != 0 && len > maxlen) 62EXPORT_SYMBOL(ioread32be);
59 len = maxlen; 63
64void iowrite8(u8 val, void __iomem *addr)
65{
66 writeb(val, addr);
67}
60 68
61 flags = pci_resource_flags(dev, bar); 69EXPORT_SYMBOL(iowrite8);
62 if (flags & IORESOURCE_IO) 70
63 return ioport_map(start, len); 71void iowrite16(u16 val, void __iomem *addr)
64 if (flags & IORESOURCE_MEM) { 72{
65 if (flags & IORESOURCE_CACHEABLE) 73 writew(val, addr);
66 return ioremap_cachable(start, len); 74}
67 return ioremap_nocache(start, len); 75
76EXPORT_SYMBOL(iowrite16);
77
78void iowrite16be(u16 val, void __iomem *addr)
79{
80 __raw_writew(cpu_to_be16(val), addr);
81}
82
83EXPORT_SYMBOL(iowrite16be);
84
85void iowrite32(u32 val, void __iomem *addr)
86{
87 writel(val, addr);
88}
89
90EXPORT_SYMBOL(iowrite32);
91
92void iowrite32be(u32 val, void __iomem *addr)
93{
94 __raw_writel(cpu_to_be32(val), addr);
95}
96
97EXPORT_SYMBOL(iowrite32be);
98
99/*
100 * These are the "repeat MMIO read/write" functions.
101 * Note the "__raw" accesses, since we don't want to
102 * convert to CPU byte order. We write in "IO byte
103 * order" (we also don't have IO barriers).
104 */
105static inline void mmio_insb(void __iomem *addr, u8 *dst, int count)
106{
107 while (--count >= 0) {
108 u8 data = __raw_readb(addr);
109 *dst = data;
110 dst++;
68 } 111 }
112}
69 113
70 return NULL; 114static inline void mmio_insw(void __iomem *addr, u16 *dst, int count)
115{
116 while (--count >= 0) {
117 u16 data = __raw_readw(addr);
118 *dst = data;
119 dst++;
120 }
71} 121}
72 122
73void pci_iounmap(struct pci_dev *dev, void __iomem *addr) 123static inline void mmio_insl(void __iomem *addr, u32 *dst, int count)
74{ 124{
75 iounmap(addr); 125 while (--count >= 0) {
126 u32 data = __raw_readl(addr);
127 *dst = data;
128 dst++;
129 }
76} 130}
77EXPORT_SYMBOL(pci_iomap); 131
78EXPORT_SYMBOL(pci_iounmap); 132static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count)
133{
134 while (--count >= 0) {
135 __raw_writeb(*src, addr);
136 src++;
137 }
138}
139
140static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count)
141{
142 while (--count >= 0) {
143 __raw_writew(*src, addr);
144 src++;
145 }
146}
147
148static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count)
149{
150 while (--count >= 0) {
151 __raw_writel(*src, addr);
152 src++;
153 }
154}
155
156void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
157{
158 mmio_insb(addr, dst, count);
159}
160
161EXPORT_SYMBOL(ioread8_rep);
162
163void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
164{
165 mmio_insw(addr, dst, count);
166}
167
168EXPORT_SYMBOL(ioread16_rep);
169
170void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
171{
172 mmio_insl(addr, dst, count);
173}
174
175EXPORT_SYMBOL(ioread32_rep);
176
177void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
178{
179 mmio_outsb(addr, src, count);
180}
181
182EXPORT_SYMBOL(iowrite8_rep);
183
184void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
185{
186 mmio_outsw(addr, src, count);
187}
188
189EXPORT_SYMBOL(iowrite16_rep);
190
191void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
192{
193 mmio_outsl(addr, src, count);
194}
195
196EXPORT_SYMBOL(iowrite32_rep);
197
198/*
199 * Create a virtual mapping cookie for an IO port range
200 *
201 * This uses the same mapping are as the in/out family which has to be setup
202 * by the platform initialization code.
203 *
204 * Just to make matters somewhat more interesting on MIPS systems with
205 * multiple host bridge each will have it's own ioport address space.
206 */
207static void __iomem *ioport_map_legacy(unsigned long port, unsigned int nr)
208{
209 return (void __iomem *) (mips_io_port_base + port);
210}
211
212void __iomem *ioport_map(unsigned long port, unsigned int nr)
213{
214 if (port > PIO_MASK)
215 return NULL;
216
217 return ioport_map_legacy(port, nr);
218}
219
220EXPORT_SYMBOL(ioport_map);
221
222void ioport_unmap(void __iomem *addr)
223{
224 /* Nothing to do */
225}
226
227EXPORT_SYMBOL(ioport_unmap);
diff --git a/arch/mips/lib/memcpy-inatomic.S b/arch/mips/lib/memcpy-inatomic.S
new file mode 100644
index 000000000000..3a534b2baa0f
--- /dev/null
+++ b/arch/mips/lib/memcpy-inatomic.S
@@ -0,0 +1,436 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Unified implementation of memcpy, memmove and the __copy_user backend.
7 *
8 * Copyright (C) 1998, 99, 2000, 01, 2002 Ralf Baechle (ralf@gnu.org)
9 * Copyright (C) 1999, 2000, 01, 2002 Silicon Graphics, Inc.
10 * Copyright (C) 2002 Broadcom, Inc.
11 * memcpy/copy_user author: Mark Vandevoorde
12 *
13 * Mnemonic names for arguments to memcpy/__copy_user
14 */
15
16/*
17 * Hack to resolve longstanding prefetch issue
18 *
19 * Prefetching may be fatal on some systems if we're prefetching beyond the
20 * end of memory on some systems. It's also a seriously bad idea on non
21 * dma-coherent systems.
22 */
23#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
24#undef CONFIG_CPU_HAS_PREFETCH
25#endif
26#ifdef CONFIG_MIPS_MALTA
27#undef CONFIG_CPU_HAS_PREFETCH
28#endif
29
30#include <asm/asm.h>
31#include <asm/asm-offsets.h>
32#include <asm/regdef.h>
33
34#define dst a0
35#define src a1
36#define len a2
37
38/*
39 * Spec
40 *
41 * memcpy copies len bytes from src to dst and sets v0 to dst.
42 * It assumes that
43 * - src and dst don't overlap
44 * - src is readable
45 * - dst is writable
46 * memcpy uses the standard calling convention
47 *
48 * __copy_user copies up to len bytes from src to dst and sets a2 (len) to
49 * the number of uncopied bytes due to an exception caused by a read or write.
50 * __copy_user assumes that src and dst don't overlap, and that the call is
51 * implementing one of the following:
52 * copy_to_user
53 * - src is readable (no exceptions when reading src)
54 * copy_from_user
55 * - dst is writable (no exceptions when writing dst)
56 * __copy_user uses a non-standard calling convention; see
57 * include/asm-mips/uaccess.h
58 *
59 * When an exception happens on a load, the handler must
60 # ensure that all of the destination buffer is overwritten to prevent
61 * leaking information to user mode programs.
62 */
63
64/*
65 * Implementation
66 */
67
68/*
69 * The exception handler for loads requires that:
70 * 1- AT contain the address of the byte just past the end of the source
71 * of the copy,
72 * 2- src_entry <= src < AT, and
73 * 3- (dst - src) == (dst_entry - src_entry),
74 * The _entry suffix denotes values when __copy_user was called.
75 *
76 * (1) is set up up by uaccess.h and maintained by not writing AT in copy_user
77 * (2) is met by incrementing src by the number of bytes copied
78 * (3) is met by not doing loads between a pair of increments of dst and src
79 *
80 * The exception handlers for stores adjust len (if necessary) and return.
81 * These handlers do not need to overwrite any data.
82 *
83 * For __rmemcpy and memmove an exception is always a kernel bug, therefore
84 * they're not protected.
85 */
86
87#define EXC(inst_reg,addr,handler) \
889: inst_reg, addr; \
89 .section __ex_table,"a"; \
90 PTR 9b, handler; \
91 .previous
92
93/*
94 * Only on the 64-bit kernel we can made use of 64-bit registers.
95 */
96#ifdef CONFIG_64BIT
97#define USE_DOUBLE
98#endif
99
100#ifdef USE_DOUBLE
101
102#define LOAD ld
103#define LOADL ldl
104#define LOADR ldr
105#define STOREL sdl
106#define STORER sdr
107#define STORE sd
108#define ADD daddu
109#define SUB dsubu
110#define SRL dsrl
111#define SRA dsra
112#define SLL dsll
113#define SLLV dsllv
114#define SRLV dsrlv
115#define NBYTES 8
116#define LOG_NBYTES 3
117
118/*
119 * As we are sharing code base with the mips32 tree (which use the o32 ABI
120 * register definitions). We need to redefine the register definitions from
121 * the n64 ABI register naming to the o32 ABI register naming.
122 */
123#undef t0
124#undef t1
125#undef t2
126#undef t3
127#define t0 $8
128#define t1 $9
129#define t2 $10
130#define t3 $11
131#define t4 $12
132#define t5 $13
133#define t6 $14
134#define t7 $15
135
136#else
137
138#define LOAD lw
139#define LOADL lwl
140#define LOADR lwr
141#define STOREL swl
142#define STORER swr
143#define STORE sw
144#define ADD addu
145#define SUB subu
146#define SRL srl
147#define SLL sll
148#define SRA sra
149#define SLLV sllv
150#define SRLV srlv
151#define NBYTES 4
152#define LOG_NBYTES 2
153
154#endif /* USE_DOUBLE */
155
156#ifdef CONFIG_CPU_LITTLE_ENDIAN
157#define LDFIRST LOADR
158#define LDREST LOADL
159#define STFIRST STORER
160#define STREST STOREL
161#define SHIFT_DISCARD SLLV
162#else
163#define LDFIRST LOADL
164#define LDREST LOADR
165#define STFIRST STOREL
166#define STREST STORER
167#define SHIFT_DISCARD SRLV
168#endif
169
170#define FIRST(unit) ((unit)*NBYTES)
171#define REST(unit) (FIRST(unit)+NBYTES-1)
172#define UNIT(unit) FIRST(unit)
173
174#define ADDRMASK (NBYTES-1)
175
176 .text
177 .set noreorder
178 .set noat
179
180/*
181 * A combined memcpy/__copy_user
182 * __copy_user sets len to 0 for success; else to an upper bound of
183 * the number of uncopied bytes.
184 * memcpy sets v0 to dst.
185 */
186 .align 5
187LEAF(__copy_user_inatomic)
188 /*
189 * Note: dst & src may be unaligned, len may be 0
190 * Temps
191 */
192#define rem t8
193
194 /*
195 * The "issue break"s below are very approximate.
196 * Issue delays for dcache fills will perturb the schedule, as will
197 * load queue full replay traps, etc.
198 *
199 * If len < NBYTES use byte operations.
200 */
201 PREF( 0, 0(src) )
202 PREF( 1, 0(dst) )
203 sltu t2, len, NBYTES
204 and t1, dst, ADDRMASK
205 PREF( 0, 1*32(src) )
206 PREF( 1, 1*32(dst) )
207 bnez t2, copy_bytes_checklen
208 and t0, src, ADDRMASK
209 PREF( 0, 2*32(src) )
210 PREF( 1, 2*32(dst) )
211 bnez t1, dst_unaligned
212 nop
213 bnez t0, src_unaligned_dst_aligned
214 /*
215 * use delay slot for fall-through
216 * src and dst are aligned; need to compute rem
217 */
218both_aligned:
219 SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter
220 beqz t0, cleanup_both_aligned # len < 8*NBYTES
221 and rem, len, (8*NBYTES-1) # rem = len % (8*NBYTES)
222 PREF( 0, 3*32(src) )
223 PREF( 1, 3*32(dst) )
224 .align 4
2251:
226EXC( LOAD t0, UNIT(0)(src), l_exc)
227EXC( LOAD t1, UNIT(1)(src), l_exc_copy)
228EXC( LOAD t2, UNIT(2)(src), l_exc_copy)
229EXC( LOAD t3, UNIT(3)(src), l_exc_copy)
230 SUB len, len, 8*NBYTES
231EXC( LOAD t4, UNIT(4)(src), l_exc_copy)
232EXC( LOAD t7, UNIT(5)(src), l_exc_copy)
233 STORE t0, UNIT(0)(dst)
234 STORE t1, UNIT(1)(dst)
235EXC( LOAD t0, UNIT(6)(src), l_exc_copy)
236EXC( LOAD t1, UNIT(7)(src), l_exc_copy)
237 ADD src, src, 8*NBYTES
238 ADD dst, dst, 8*NBYTES
239 STORE t2, UNIT(-6)(dst)
240 STORE t3, UNIT(-5)(dst)
241 STORE t4, UNIT(-4)(dst)
242 STORE t7, UNIT(-3)(dst)
243 STORE t0, UNIT(-2)(dst)
244 STORE t1, UNIT(-1)(dst)
245 PREF( 0, 8*32(src) )
246 PREF( 1, 8*32(dst) )
247 bne len, rem, 1b
248 nop
249
250 /*
251 * len == rem == the number of bytes left to copy < 8*NBYTES
252 */
253cleanup_both_aligned:
254 beqz len, done
255 sltu t0, len, 4*NBYTES
256 bnez t0, less_than_4units
257 and rem, len, (NBYTES-1) # rem = len % NBYTES
258 /*
259 * len >= 4*NBYTES
260 */
261EXC( LOAD t0, UNIT(0)(src), l_exc)
262EXC( LOAD t1, UNIT(1)(src), l_exc_copy)
263EXC( LOAD t2, UNIT(2)(src), l_exc_copy)
264EXC( LOAD t3, UNIT(3)(src), l_exc_copy)
265 SUB len, len, 4*NBYTES
266 ADD src, src, 4*NBYTES
267 STORE t0, UNIT(0)(dst)
268 STORE t1, UNIT(1)(dst)
269 STORE t2, UNIT(2)(dst)
270 STORE t3, UNIT(3)(dst)
271 beqz len, done
272 ADD dst, dst, 4*NBYTES
273less_than_4units:
274 /*
275 * rem = len % NBYTES
276 */
277 beq rem, len, copy_bytes
278 nop
2791:
280EXC( LOAD t0, 0(src), l_exc)
281 ADD src, src, NBYTES
282 SUB len, len, NBYTES
283 STORE t0, 0(dst)
284 bne rem, len, 1b
285 ADD dst, dst, NBYTES
286
287 /*
288 * src and dst are aligned, need to copy rem bytes (rem < NBYTES)
289 * A loop would do only a byte at a time with possible branch
290 * mispredicts. Can't do an explicit LOAD dst,mask,or,STORE
291 * because can't assume read-access to dst. Instead, use
292 * STREST dst, which doesn't require read access to dst.
293 *
294 * This code should perform better than a simple loop on modern,
295 * wide-issue mips processors because the code has fewer branches and
296 * more instruction-level parallelism.
297 */
298#define bits t2
299 beqz len, done
300 ADD t1, dst, len # t1 is just past last byte of dst
301 li bits, 8*NBYTES
302 SLL rem, len, 3 # rem = number of bits to keep
303EXC( LOAD t0, 0(src), l_exc)
304 SUB bits, bits, rem # bits = number of bits to discard
305 SHIFT_DISCARD t0, t0, bits
306 STREST t0, -1(t1)
307 jr ra
308 move len, zero
309dst_unaligned:
310 /*
311 * dst is unaligned
312 * t0 = src & ADDRMASK
313 * t1 = dst & ADDRMASK; T1 > 0
314 * len >= NBYTES
315 *
316 * Copy enough bytes to align dst
317 * Set match = (src and dst have same alignment)
318 */
319#define match rem
320EXC( LDFIRST t3, FIRST(0)(src), l_exc)
321 ADD t2, zero, NBYTES
322EXC( LDREST t3, REST(0)(src), l_exc_copy)
323 SUB t2, t2, t1 # t2 = number of bytes copied
324 xor match, t0, t1
325 STFIRST t3, FIRST(0)(dst)
326 beq len, t2, done
327 SUB len, len, t2
328 ADD dst, dst, t2
329 beqz match, both_aligned
330 ADD src, src, t2
331
332src_unaligned_dst_aligned:
333 SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter
334 PREF( 0, 3*32(src) )
335 beqz t0, cleanup_src_unaligned
336 and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES
337 PREF( 1, 3*32(dst) )
3381:
339/*
340 * Avoid consecutive LD*'s to the same register since some mips
341 * implementations can't issue them in the same cycle.
342 * It's OK to load FIRST(N+1) before REST(N) because the two addresses
343 * are to the same unit (unless src is aligned, but it's not).
344 */
345EXC( LDFIRST t0, FIRST(0)(src), l_exc)
346EXC( LDFIRST t1, FIRST(1)(src), l_exc_copy)
347 SUB len, len, 4*NBYTES
348EXC( LDREST t0, REST(0)(src), l_exc_copy)
349EXC( LDREST t1, REST(1)(src), l_exc_copy)
350EXC( LDFIRST t2, FIRST(2)(src), l_exc_copy)
351EXC( LDFIRST t3, FIRST(3)(src), l_exc_copy)
352EXC( LDREST t2, REST(2)(src), l_exc_copy)
353EXC( LDREST t3, REST(3)(src), l_exc_copy)
354 PREF( 0, 9*32(src) ) # 0 is PREF_LOAD (not streamed)
355 ADD src, src, 4*NBYTES
356#ifdef CONFIG_CPU_SB1
357 nop # improves slotting
358#endif
359 STORE t0, UNIT(0)(dst)
360 STORE t1, UNIT(1)(dst)
361 STORE t2, UNIT(2)(dst)
362 STORE t3, UNIT(3)(dst)
363 PREF( 1, 9*32(dst) ) # 1 is PREF_STORE (not streamed)
364 bne len, rem, 1b
365 ADD dst, dst, 4*NBYTES
366
367cleanup_src_unaligned:
368 beqz len, done
369 and rem, len, NBYTES-1 # rem = len % NBYTES
370 beq rem, len, copy_bytes
371 nop
3721:
373EXC( LDFIRST t0, FIRST(0)(src), l_exc)
374EXC( LDREST t0, REST(0)(src), l_exc_copy)
375 ADD src, src, NBYTES
376 SUB len, len, NBYTES
377 STORE t0, 0(dst)
378 bne len, rem, 1b
379 ADD dst, dst, NBYTES
380
381copy_bytes_checklen:
382 beqz len, done
383 nop
384copy_bytes:
385 /* 0 < len < NBYTES */
386#define COPY_BYTE(N) \
387EXC( lb t0, N(src), l_exc); \
388 SUB len, len, 1; \
389 beqz len, done; \
390 sb t0, N(dst)
391
392 COPY_BYTE(0)
393 COPY_BYTE(1)
394#ifdef USE_DOUBLE
395 COPY_BYTE(2)
396 COPY_BYTE(3)
397 COPY_BYTE(4)
398 COPY_BYTE(5)
399#endif
400EXC( lb t0, NBYTES-2(src), l_exc)
401 SUB len, len, 1
402 jr ra
403 sb t0, NBYTES-2(dst)
404done:
405 jr ra
406 nop
407 END(__copy_user_inatomic)
408
409l_exc_copy:
410 /*
411 * Copy bytes from src until faulting load address (or until a
412 * lb faults)
413 *
414 * When reached by a faulting LDFIRST/LDREST, THREAD_BUADDR($28)
415 * may be more than a byte beyond the last address.
416 * Hence, the lb below may get an exception.
417 *
418 * Assumes src < THREAD_BUADDR($28)
419 */
420 LOAD t0, TI_TASK($28)
421 nop
422 LOAD t0, THREAD_BUADDR(t0)
4231:
424EXC( lb t1, 0(src), l_exc)
425 ADD src, src, 1
426 sb t1, 0(dst) # can't fault -- we're copy_from_user
427 bne src, t0, 1b
428 ADD dst, dst, 1
429l_exc:
430 LOAD t0, TI_TASK($28)
431 nop
432 LOAD t0, THREAD_BUADDR(t0) # t0 is just past last good address
433 nop
434 SUB len, AT, t0 # len number of uncopied bytes
435 jr ra
436 nop
diff --git a/arch/mips/lib-32/memset.S b/arch/mips/lib/memset.S
index 1981485bd48b..3f8b8b3d0b23 100644
--- a/arch/mips/lib-32/memset.S
+++ b/arch/mips/lib/memset.S
@@ -10,6 +10,14 @@
10#include <asm/asm-offsets.h> 10#include <asm/asm-offsets.h>
11#include <asm/regdef.h> 11#include <asm/regdef.h>
12 12
13#if LONGSIZE == 4
14#define LONG_S_L swl
15#define LONG_S_R swr
16#else
17#define LONG_S_L sdl
18#define LONG_S_R sdr
19#endif
20
13#define EX(insn,reg,addr,handler) \ 21#define EX(insn,reg,addr,handler) \
149: insn reg, addr; \ 229: insn reg, addr; \
15 .section __ex_table,"a"; \ 23 .section __ex_table,"a"; \
@@ -25,6 +33,7 @@
25 EX(LONG_S, \val, (\offset + 5 * LONGSIZE)(\dst), \fixup) 33 EX(LONG_S, \val, (\offset + 5 * LONGSIZE)(\dst), \fixup)
26 EX(LONG_S, \val, (\offset + 6 * LONGSIZE)(\dst), \fixup) 34 EX(LONG_S, \val, (\offset + 6 * LONGSIZE)(\dst), \fixup)
27 EX(LONG_S, \val, (\offset + 7 * LONGSIZE)(\dst), \fixup) 35 EX(LONG_S, \val, (\offset + 7 * LONGSIZE)(\dst), \fixup)
36#if LONGSIZE == 4
28 EX(LONG_S, \val, (\offset + 8 * LONGSIZE)(\dst), \fixup) 37 EX(LONG_S, \val, (\offset + 8 * LONGSIZE)(\dst), \fixup)
29 EX(LONG_S, \val, (\offset + 9 * LONGSIZE)(\dst), \fixup) 38 EX(LONG_S, \val, (\offset + 9 * LONGSIZE)(\dst), \fixup)
30 EX(LONG_S, \val, (\offset + 10 * LONGSIZE)(\dst), \fixup) 39 EX(LONG_S, \val, (\offset + 10 * LONGSIZE)(\dst), \fixup)
@@ -33,6 +42,7 @@
33 EX(LONG_S, \val, (\offset + 13 * LONGSIZE)(\dst), \fixup) 42 EX(LONG_S, \val, (\offset + 13 * LONGSIZE)(\dst), \fixup)
34 EX(LONG_S, \val, (\offset + 14 * LONGSIZE)(\dst), \fixup) 43 EX(LONG_S, \val, (\offset + 14 * LONGSIZE)(\dst), \fixup)
35 EX(LONG_S, \val, (\offset + 15 * LONGSIZE)(\dst), \fixup) 44 EX(LONG_S, \val, (\offset + 15 * LONGSIZE)(\dst), \fixup)
45#endif
36 .endm 46 .endm
37 47
38/* 48/*
@@ -49,9 +59,13 @@ LEAF(memset)
49 move v0, a0 /* result */ 59 move v0, a0 /* result */
50 60
51 andi a1, 0xff /* spread fillword */ 61 andi a1, 0xff /* spread fillword */
52 sll t1, a1, 8 62 LONG_SLL t1, a1, 8
53 or a1, t1 63 or a1, t1
54 sll t1, a1, 16 64 LONG_SLL t1, a1, 16
65#if LONGSIZE == 8
66 or a1, t1
67 LONG_SLL t1, a1, 32
68#endif
55 or a1, t1 69 or a1, t1
561: 701:
57 71
@@ -64,10 +78,10 @@ FEXPORT(__bzero)
64 PTR_SUBU t0, LONGSIZE /* alignment in bytes */ 78 PTR_SUBU t0, LONGSIZE /* alignment in bytes */
65 79
66#ifdef __MIPSEB__ 80#ifdef __MIPSEB__
67 EX(swl, a1, (a0), first_fixup) /* make word aligned */ 81 EX(LONG_S_L, a1, (a0), first_fixup) /* make word/dword aligned */
68#endif 82#endif
69#ifdef __MIPSEL__ 83#ifdef __MIPSEL__
70 EX(swr, a1, (a0), first_fixup) /* make word aligned */ 84 EX(LONG_S_R, a1, (a0), first_fixup) /* make word/dword aligned */
71#endif 85#endif
72 PTR_SUBU a0, t0 /* long align ptr */ 86 PTR_SUBU a0, t0 /* long align ptr */
73 PTR_ADDU a2, t0 /* correct size */ 87 PTR_ADDU a2, t0 /* correct size */
@@ -75,7 +89,7 @@ FEXPORT(__bzero)
751: ori t1, a2, 0x3f /* # of full blocks */ 891: ori t1, a2, 0x3f /* # of full blocks */
76 xori t1, 0x3f 90 xori t1, 0x3f
77 beqz t1, memset_partial /* no block to fill */ 91 beqz t1, memset_partial /* no block to fill */
78 andi t0, a2, 0x3c 92 andi t0, a2, 0x40-LONGSIZE
79 93
80 PTR_ADDU t1, a0 /* end address */ 94 PTR_ADDU t1, a0 /* end address */
81 .set reorder 95 .set reorder
@@ -86,7 +100,14 @@ FEXPORT(__bzero)
86 100
87memset_partial: 101memset_partial:
88 PTR_LA t1, 2f /* where to start */ 102 PTR_LA t1, 2f /* where to start */
103#if LONGSIZE == 4
89 PTR_SUBU t1, t0 104 PTR_SUBU t1, t0
105#else
106 .set noat
107 LONG_SRL AT, t0, 1
108 PTR_SUBU t1, AT
109 .set noat
110#endif
90 jr t1 111 jr t1
91 PTR_ADDU a0, t0 /* dest ptr */ 112 PTR_ADDU a0, t0 /* dest ptr */
92 113
@@ -100,10 +121,10 @@ memset_partial:
100 beqz a2, 1f 121 beqz a2, 1f
101 PTR_ADDU a0, a2 /* What's left */ 122 PTR_ADDU a0, a2 /* What's left */
102#ifdef __MIPSEB__ 123#ifdef __MIPSEB__
103 EX(swr, a1, -1(a0), last_fixup) 124 EX(LONG_S_R, a1, -1(a0), last_fixup)
104#endif 125#endif
105#ifdef __MIPSEL__ 126#ifdef __MIPSEL__
106 EX(swl, a1, -1(a0), last_fixup) 127 EX(LONG_S_L, a1, -1(a0), last_fixup)
107#endif 128#endif
1081: jr ra 1291: jr ra
109 move a2, zero 130 move a2, zero
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
index 98ce89f8068b..2388f7f3ffde 100644
--- a/arch/mips/lib/uncached.c
+++ b/arch/mips/lib/uncached.c
@@ -44,20 +44,24 @@ unsigned long __init run_uncached(void *func)
44 44
45 if (sp >= (long)CKSEG0 && sp < (long)CKSEG2) 45 if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
46 usp = CKSEG1ADDR(sp); 46 usp = CKSEG1ADDR(sp);
47#ifdef CONFIG_64BIT
47 else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) && 48 else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
48 (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0)) 49 (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0))
49 usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED, 50 usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
50 XKPHYS_TO_PHYS((long long)sp)); 51 XKPHYS_TO_PHYS((long long)sp));
52#endif
51 else { 53 else {
52 BUG(); 54 BUG();
53 usp = sp; 55 usp = sp;
54 } 56 }
55 if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2) 57 if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
56 ufunc = CKSEG1ADDR(lfunc); 58 ufunc = CKSEG1ADDR(lfunc);
59#ifdef CONFIG_64BIT
57 else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) && 60 else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
58 (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0)) 61 (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0))
59 ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED, 62 ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
60 XKPHYS_TO_PHYS((long long)lfunc)); 63 XKPHYS_TO_PHYS((long long)lfunc));
64#endif
61 else { 65 else {
62 BUG(); 66 BUG();
63 ufunc = lfunc; 67 ufunc = lfunc;
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index 43dba6ce6603..dfa0acbd7fc2 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -32,6 +32,7 @@
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/interrupt.h> 33#include <linux/interrupt.h>
34#include <linux/kernel_stat.h> 34#include <linux/kernel_stat.h>
35#include <linux/kernel.h>
35 36
36#include <asm/gdb-stub.h> 37#include <asm/gdb-stub.h>
37#include <asm/io.h> 38#include <asm/io.h>
@@ -69,7 +70,7 @@ static void end_atlas_irq(unsigned int irq)
69} 70}
70 71
71static struct irq_chip atlas_irq_type = { 72static struct irq_chip atlas_irq_type = {
72 .typename = "Atlas", 73 .name = "Atlas",
73 .ack = disable_atlas_irq, 74 .ack = disable_atlas_irq,
74 .mask = disable_atlas_irq, 75 .mask = disable_atlas_irq,
75 .mask_ack = disable_atlas_irq, 76 .mask_ack = disable_atlas_irq,
@@ -220,7 +221,7 @@ msc_irqmap_t __initdata msc_irqmap[] = {
220 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0}, 221 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0},
221 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0}, 222 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0},
222}; 223};
223int __initdata msc_nr_irqs = sizeof(msc_irqmap) / sizeof(*msc_irqmap); 224int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
224 225
225msc_irqmap_t __initdata msc_eicirqmap[] = { 226msc_irqmap_t __initdata msc_eicirqmap[] = {
226 {MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0}, 227 {MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0},
@@ -231,14 +232,14 @@ msc_irqmap_t __initdata msc_eicirqmap[] = {
231 {MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0}, 232 {MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0},
232 {MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0} 233 {MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0}
233}; 234};
234int __initdata msc_nr_eicirqs = sizeof(msc_eicirqmap) / sizeof(*msc_eicirqmap); 235int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
235 236
236void __init arch_init_irq(void) 237void __init arch_init_irq(void)
237{ 238{
238 init_atlas_irqs(ATLAS_INT_BASE); 239 init_atlas_irqs(ATLAS_INT_BASE);
239 240
240 if (!cpu_has_veic) 241 if (!cpu_has_veic)
241 mips_cpu_irq_init(MIPSCPU_INT_BASE); 242 mips_cpu_irq_init();
242 243
243 switch(mips_revision_corid) { 244 switch(mips_revision_corid) {
244 case MIPS_REVISION_CORID_CORE_MSC: 245 case MIPS_REVISION_CORID_CORE_MSC:
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index eeed944e0f83..ebf0e16c5a0d 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -166,9 +166,8 @@ void __init prom_meminit(void)
166 } 166 }
167} 167}
168 168
169unsigned long __init prom_free_prom_memory(void) 169void __init prom_free_prom_memory(void)
170{ 170{
171 unsigned long freed = 0;
172 unsigned long addr; 171 unsigned long addr;
173 int i; 172 int i;
174 173
@@ -176,17 +175,8 @@ unsigned long __init prom_free_prom_memory(void)
176 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) 175 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
177 continue; 176 continue;
178 177
179 addr = PAGE_ALIGN(boot_mem_map.map[i].addr); 178 addr = boot_mem_map.map[i].addr;
180 while (addr < boot_mem_map.map[i].addr 179 free_init_pages("prom memory",
181 + boot_mem_map.map[i].size) { 180 addr, addr + boot_mem_map.map[i].size);
182 ClearPageReserved(virt_to_page(__va(addr)));
183 init_page_count(virt_to_page(__va(addr)));
184 free_page((unsigned long)__va(addr));
185 addr += PAGE_SIZE;
186 freed += PAGE_SIZE;
187 }
188 } 181 }
189 printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
190
191 return freed;
192} 182}
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 90ad5bf3e2f1..3c206bb17160 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -27,6 +27,7 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/kernel_stat.h> 29#include <linux/kernel_stat.h>
30#include <linux/kernel.h>
30#include <linux/random.h> 31#include <linux/random.h>
31 32
32#include <asm/i8259.h> 33#include <asm/i8259.h>
@@ -289,7 +290,7 @@ msc_irqmap_t __initdata msc_irqmap[] = {
289 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0}, 290 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0},
290 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0}, 291 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0},
291}; 292};
292int __initdata msc_nr_irqs = sizeof(msc_irqmap)/sizeof(msc_irqmap_t); 293int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
293 294
294msc_irqmap_t __initdata msc_eicirqmap[] = { 295msc_irqmap_t __initdata msc_eicirqmap[] = {
295 {MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0}, 296 {MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0},
@@ -303,14 +304,14 @@ msc_irqmap_t __initdata msc_eicirqmap[] = {
303 {MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0}, 304 {MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0},
304 {MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0} 305 {MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0}
305}; 306};
306int __initdata msc_nr_eicirqs = sizeof(msc_eicirqmap)/sizeof(msc_irqmap_t); 307int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
307 308
308void __init arch_init_irq(void) 309void __init arch_init_irq(void)
309{ 310{
310 init_i8259_irqs(); 311 init_i8259_irqs();
311 312
312 if (!cpu_has_veic) 313 if (!cpu_has_veic)
313 mips_cpu_irq_init (MIPSCPU_INT_BASE); 314 mips_cpu_irq_init();
314 315
315 switch(mips_revision_corid) { 316 switch(mips_revision_corid) {
316 case MIPS_REVISION_CORID_CORE_MSC: 317 case MIPS_REVISION_CORID_CORE_MSC:
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
index 874ccb0066b8..c4b9de3a7f27 100644
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ b/arch/mips/mips-boards/sead/sead_int.c
@@ -113,5 +113,5 @@ asmlinkage void plat_irq_dispatch(void)
113 113
114void __init arch_init_irq(void) 114void __init arch_init_irq(void)
115{ 115{
116 mips_cpu_irq_init(MIPSCPU_INT_BASE); 116 mips_cpu_irq_init();
117} 117}
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c
index 2ce449dce6f2..15ac0655c1ff 100644
--- a/arch/mips/mips-boards/sim/sim_int.c
+++ b/arch/mips/mips-boards/sim/sim_int.c
@@ -21,9 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/kernel_stat.h> 22#include <linux/kernel_stat.h>
23#include <asm/mips-boards/simint.h> 23#include <asm/mips-boards/simint.h>
24 24#include <asm/irq_cpu.h>
25
26extern void mips_cpu_irq_init(int);
27 25
28static inline int clz(unsigned long x) 26static inline int clz(unsigned long x)
29{ 27{
@@ -86,5 +84,5 @@ asmlinkage void plat_irq_dispatch(void)
86 84
87void __init arch_init_irq(void) 85void __init arch_init_irq(void)
88{ 86{
89 mips_cpu_irq_init(MIPSCPU_INT_BASE); 87 mips_cpu_irq_init();
90} 88}
diff --git a/arch/mips/mips-boards/sim/sim_mem.c b/arch/mips/mips-boards/sim/sim_mem.c
index f7ce76983328..46bc16f8b15d 100644
--- a/arch/mips/mips-boards/sim/sim_mem.c
+++ b/arch/mips/mips-boards/sim/sim_mem.c
@@ -99,10 +99,9 @@ void __init prom_meminit(void)
99 } 99 }
100} 100}
101 101
102unsigned long __init prom_free_prom_memory(void) 102void __init prom_free_prom_memory(void)
103{ 103{
104 int i; 104 int i;
105 unsigned long freed = 0;
106 unsigned long addr; 105 unsigned long addr;
107 106
108 for (i = 0; i < boot_mem_map.nr_map; i++) { 107 for (i = 0; i < boot_mem_map.nr_map; i++) {
@@ -110,16 +109,7 @@ unsigned long __init prom_free_prom_memory(void)
110 continue; 109 continue;
111 110
112 addr = boot_mem_map.map[i].addr; 111 addr = boot_mem_map.map[i].addr;
113 while (addr < boot_mem_map.map[i].addr 112 free_init_pages("prom memory",
114 + boot_mem_map.map[i].size) { 113 addr, addr + boot_mem_map.map[i].size);
115 ClearPageReserved(virt_to_page(__va(addr)));
116 init_page_count(virt_to_page(__va(addr)));
117 free_page((unsigned long)__va(addr));
118 addr += PAGE_SIZE;
119 freed += PAGE_SIZE;
120 }
121 } 114 }
122 printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
123
124 return freed;
125} 115}
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
index 19e41fd186c4..de5727385bc6 100644
--- a/arch/mips/mm/Makefile
+++ b/arch/mips/mm/Makefile
@@ -2,8 +2,8 @@
2# Makefile for the Linux/MIPS-specific parts of the memory manager. 2# Makefile for the Linux/MIPS-specific parts of the memory manager.
3# 3#
4 4
5obj-y += cache.o extable.o fault.o init.o pgtable.o \ 5obj-y += cache.o dma-default.o extable.o fault.o \
6 tlbex.o tlbex-fault.o 6 init.o pgtable.o tlbex.o tlbex-fault.o
7 7
8obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o 8obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o
9obj-$(CONFIG_64BIT) += pgtable-64.o 9obj-$(CONFIG_64BIT) += pgtable-64.o
@@ -32,14 +32,4 @@ obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
32obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o 32obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
33obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o 33obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
34 34
35#
36# Choose one DMA coherency model
37#
38ifndef CONFIG_OWN_DMA
39obj-$(CONFIG_DMA_COHERENT) += dma-coherent.o
40obj-$(CONFIG_DMA_NONCOHERENT) += dma-noncoherent.o
41endif
42obj-$(CONFIG_DMA_IP27) += dma-ip27.o
43obj-$(CONFIG_DMA_IP32) += dma-ip32.o
44
45EXTRA_AFLAGS := $(CFLAGS) 35EXTRA_AFLAGS := $(CFLAGS)
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index 3a8afd47feaa..9ea460b16bda 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -259,6 +259,12 @@ static void sb1_flush_cache_data_page(unsigned long addr)
259 on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1); 259 on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1);
260} 260}
261#else 261#else
262
263static void local_sb1_flush_cache_data_page(unsigned long addr)
264{
265 __sb1_writeback_inv_dcache_range(addr, addr + PAGE_SIZE);
266}
267
262void sb1_flush_cache_data_page(unsigned long) 268void sb1_flush_cache_data_page(unsigned long)
263 __attribute__((alias("local_sb1_flush_cache_data_page"))); 269 __attribute__((alias("local_sb1_flush_cache_data_page")));
264#endif 270#endif
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 1f954a238a63..31819c58bffa 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -107,8 +107,6 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
107 } 107 }
108} 108}
109 109
110#define __weak __attribute__((weak))
111
112static char cache_panic[] __initdata = "Yeee, unsupported cache architecture."; 110static char cache_panic[] __initdata = "Yeee, unsupported cache architecture.";
113 111
114void __init cpu_cache_init(void) 112void __init cpu_cache_init(void)
diff --git a/arch/mips/mm/dma-coherent.c b/arch/mips/mm/dma-coherent.c
deleted file mode 100644
index 5697c6e250a3..000000000000
--- a/arch/mips/mm/dma-coherent.c
+++ /dev/null
@@ -1,254 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */
10#include <linux/types.h>
11#include <linux/dma-mapping.h>
12#include <linux/mm.h>
13#include <linux/module.h>
14#include <linux/string.h>
15
16#include <asm/cache.h>
17#include <asm/io.h>
18
19void *dma_alloc_noncoherent(struct device *dev, size_t size,
20 dma_addr_t * dma_handle, gfp_t gfp)
21{
22 void *ret;
23 /* ignore region specifiers */
24 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
25
26 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
27 gfp |= GFP_DMA;
28 ret = (void *) __get_free_pages(gfp, get_order(size));
29
30 if (ret != NULL) {
31 memset(ret, 0, size);
32 *dma_handle = virt_to_phys(ret);
33 }
34
35 return ret;
36}
37
38EXPORT_SYMBOL(dma_alloc_noncoherent);
39
40void *dma_alloc_coherent(struct device *dev, size_t size,
41 dma_addr_t * dma_handle, gfp_t gfp)
42 __attribute__((alias("dma_alloc_noncoherent")));
43
44EXPORT_SYMBOL(dma_alloc_coherent);
45
46void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
47 dma_addr_t dma_handle)
48{
49 unsigned long addr = (unsigned long) vaddr;
50
51 free_pages(addr, get_order(size));
52}
53
54EXPORT_SYMBOL(dma_free_noncoherent);
55
56void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
57 dma_addr_t dma_handle) __attribute__((alias("dma_free_noncoherent")));
58
59EXPORT_SYMBOL(dma_free_coherent);
60
61dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
62 enum dma_data_direction direction)
63{
64 BUG_ON(direction == DMA_NONE);
65
66 return __pa(ptr);
67}
68
69EXPORT_SYMBOL(dma_map_single);
70
71void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
72 enum dma_data_direction direction)
73{
74 BUG_ON(direction == DMA_NONE);
75}
76
77EXPORT_SYMBOL(dma_unmap_single);
78
79int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
80 enum dma_data_direction direction)
81{
82 int i;
83
84 BUG_ON(direction == DMA_NONE);
85
86 for (i = 0; i < nents; i++, sg++) {
87 sg->dma_address = (dma_addr_t)page_to_phys(sg->page) + sg->offset;
88 }
89
90 return nents;
91}
92
93EXPORT_SYMBOL(dma_map_sg);
94
95dma_addr_t dma_map_page(struct device *dev, struct page *page,
96 unsigned long offset, size_t size, enum dma_data_direction direction)
97{
98 BUG_ON(direction == DMA_NONE);
99
100 return page_to_phys(page) + offset;
101}
102
103EXPORT_SYMBOL(dma_map_page);
104
105void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
106 enum dma_data_direction direction)
107{
108 BUG_ON(direction == DMA_NONE);
109}
110
111EXPORT_SYMBOL(dma_unmap_page);
112
113void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
114 enum dma_data_direction direction)
115{
116 BUG_ON(direction == DMA_NONE);
117}
118
119EXPORT_SYMBOL(dma_unmap_sg);
120
121void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
122 size_t size, enum dma_data_direction direction)
123{
124 BUG_ON(direction == DMA_NONE);
125}
126
127EXPORT_SYMBOL(dma_sync_single_for_cpu);
128
129void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
130 size_t size, enum dma_data_direction direction)
131{
132 BUG_ON(direction == DMA_NONE);
133}
134
135EXPORT_SYMBOL(dma_sync_single_for_device);
136
137void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
138 unsigned long offset, size_t size,
139 enum dma_data_direction direction)
140{
141 BUG_ON(direction == DMA_NONE);
142}
143
144EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
145
146void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
147 unsigned long offset, size_t size,
148 enum dma_data_direction direction)
149{
150 BUG_ON(direction == DMA_NONE);
151}
152
153EXPORT_SYMBOL(dma_sync_single_range_for_device);
154
155void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
156 enum dma_data_direction direction)
157{
158 BUG_ON(direction == DMA_NONE);
159}
160
161EXPORT_SYMBOL(dma_sync_sg_for_cpu);
162
163void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
164 enum dma_data_direction direction)
165{
166 BUG_ON(direction == DMA_NONE);
167}
168
169EXPORT_SYMBOL(dma_sync_sg_for_device);
170
171int dma_mapping_error(dma_addr_t dma_addr)
172{
173 return 0;
174}
175
176EXPORT_SYMBOL(dma_mapping_error);
177
178int dma_supported(struct device *dev, u64 mask)
179{
180 /*
181 * we fall back to GFP_DMA when the mask isn't all 1s,
182 * so we can't guarantee allocations that must be
183 * within a tighter range than GFP_DMA..
184 */
185 if (mask < 0x00ffffff)
186 return 0;
187
188 return 1;
189}
190
191EXPORT_SYMBOL(dma_supported);
192
193int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
194{
195 return 1;
196}
197
198EXPORT_SYMBOL(dma_is_consistent);
199
200void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
201 enum dma_data_direction direction)
202{
203 BUG_ON(direction == DMA_NONE);
204}
205
206EXPORT_SYMBOL(dma_cache_sync);
207
208/* The DAC routines are a PCIism.. */
209
210#ifdef CONFIG_PCI
211
212#include <linux/pci.h>
213
214dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
215 struct page *page, unsigned long offset, int direction)
216{
217 return (dma64_addr_t)page_to_phys(page) + offset;
218}
219
220EXPORT_SYMBOL(pci_dac_page_to_dma);
221
222struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
223 dma64_addr_t dma_addr)
224{
225 return mem_map + (dma_addr >> PAGE_SHIFT);
226}
227
228EXPORT_SYMBOL(pci_dac_dma_to_page);
229
230unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
231 dma64_addr_t dma_addr)
232{
233 return dma_addr & ~PAGE_MASK;
234}
235
236EXPORT_SYMBOL(pci_dac_dma_to_offset);
237
238void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
239 dma64_addr_t dma_addr, size_t len, int direction)
240{
241 BUG_ON(direction == PCI_DMA_NONE);
242}
243
244EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
245
246void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
247 dma64_addr_t dma_addr, size_t len, int direction)
248{
249 BUG_ON(direction == PCI_DMA_NONE);
250}
251
252EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
253
254#endif /* CONFIG_PCI */
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-default.c
index 8cecef0957c3..4a32e939698f 100644
--- a/arch/mips/mm/dma-noncoherent.c
+++ b/arch/mips/mm/dma-default.c
@@ -4,28 +4,39 @@
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com> 6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org> 7 * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. 8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */ 9 */
10
10#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/dma-mapping.h>
11#include <linux/mm.h> 13#include <linux/mm.h>
12#include <linux/module.h> 14#include <linux/module.h>
13#include <linux/string.h> 15#include <linux/string.h>
14#include <linux/dma-mapping.h>
15 16
16#include <asm/cache.h> 17#include <asm/cache.h>
17#include <asm/io.h> 18#include <asm/io.h>
18 19
20#include <dma-coherence.h>
21
19/* 22/*
20 * Warning on the terminology - Linux calls an uncached area coherent; 23 * Warning on the terminology - Linux calls an uncached area coherent;
21 * MIPS terminology calls memory areas with hardware maintained coherency 24 * MIPS terminology calls memory areas with hardware maintained coherency
22 * coherent. 25 * coherent.
23 */ 26 */
24 27
28static inline int cpu_is_noncoherent_r10000(struct device *dev)
29{
30 return !plat_device_is_coherent(dev) &&
31 (current_cpu_data.cputype == CPU_R10000 &&
32 current_cpu_data.cputype == CPU_R12000);
33}
34
25void *dma_alloc_noncoherent(struct device *dev, size_t size, 35void *dma_alloc_noncoherent(struct device *dev, size_t size,
26 dma_addr_t * dma_handle, gfp_t gfp) 36 dma_addr_t * dma_handle, gfp_t gfp)
27{ 37{
28 void *ret; 38 void *ret;
39
29 /* ignore region specifiers */ 40 /* ignore region specifiers */
30 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); 41 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
31 42
@@ -35,7 +46,7 @@ void *dma_alloc_noncoherent(struct device *dev, size_t size,
35 46
36 if (ret != NULL) { 47 if (ret != NULL) {
37 memset(ret, 0, size); 48 memset(ret, 0, size);
38 *dma_handle = virt_to_phys(ret); 49 *dma_handle = plat_map_dma_mem(dev, ret, size);
39 } 50 }
40 51
41 return ret; 52 return ret;
@@ -48,10 +59,21 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
48{ 59{
49 void *ret; 60 void *ret;
50 61
51 ret = dma_alloc_noncoherent(dev, size, dma_handle, gfp); 62 /* ignore region specifiers */
63 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
64
65 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
66 gfp |= GFP_DMA;
67 ret = (void *) __get_free_pages(gfp, get_order(size));
68
52 if (ret) { 69 if (ret) {
53 dma_cache_wback_inv((unsigned long) ret, size); 70 memset(ret, 0, size);
54 ret = UNCAC_ADDR(ret); 71 *dma_handle = plat_map_dma_mem(dev, ret, size);
72
73 if (!plat_device_is_coherent(dev)) {
74 dma_cache_wback_inv((unsigned long) ret, size);
75 ret = UNCAC_ADDR(ret);
76 }
55 } 77 }
56 78
57 return ret; 79 return ret;
@@ -72,7 +94,9 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
72{ 94{
73 unsigned long addr = (unsigned long) vaddr; 95 unsigned long addr = (unsigned long) vaddr;
74 96
75 addr = CAC_ADDR(addr); 97 if (!plat_device_is_coherent(dev))
98 addr = CAC_ADDR(addr);
99
76 free_pages(addr, get_order(size)); 100 free_pages(addr, get_order(size));
77} 101}
78 102
@@ -104,9 +128,10 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
104{ 128{
105 unsigned long addr = (unsigned long) ptr; 129 unsigned long addr = (unsigned long) ptr;
106 130
107 __dma_sync(addr, size, direction); 131 if (!plat_device_is_coherent(dev))
132 __dma_sync(addr, size, direction);
108 133
109 return virt_to_phys(ptr); 134 return plat_map_dma_mem(dev, ptr, size);
110} 135}
111 136
112EXPORT_SYMBOL(dma_map_single); 137EXPORT_SYMBOL(dma_map_single);
@@ -114,10 +139,11 @@ EXPORT_SYMBOL(dma_map_single);
114void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 139void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
115 enum dma_data_direction direction) 140 enum dma_data_direction direction)
116{ 141{
117 unsigned long addr; 142 if (cpu_is_noncoherent_r10000(dev))
118 addr = dma_addr + PAGE_OFFSET; 143 __dma_sync(plat_dma_addr_to_phys(dma_addr) + PAGE_OFFSET, size,
144 direction);
119 145
120 //__dma_sync(addr, size, direction); 146 plat_unmap_dma_mem(dma_addr);
121} 147}
122 148
123EXPORT_SYMBOL(dma_unmap_single); 149EXPORT_SYMBOL(dma_unmap_single);
@@ -133,11 +159,10 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
133 unsigned long addr; 159 unsigned long addr;
134 160
135 addr = (unsigned long) page_address(sg->page); 161 addr = (unsigned long) page_address(sg->page);
136 if (addr) { 162 if (!plat_device_is_coherent(dev) && addr)
137 __dma_sync(addr + sg->offset, sg->length, direction); 163 __dma_sync(addr + sg->offset, sg->length, direction);
138 sg->dma_address = (dma_addr_t)page_to_phys(sg->page) 164 sg->dma_address = plat_map_dma_mem_page(dev, sg->page) +
139 + sg->offset; 165 sg->offset;
140 }
141 } 166 }
142 167
143 return nents; 168 return nents;
@@ -148,14 +173,16 @@ EXPORT_SYMBOL(dma_map_sg);
148dma_addr_t dma_map_page(struct device *dev, struct page *page, 173dma_addr_t dma_map_page(struct device *dev, struct page *page,
149 unsigned long offset, size_t size, enum dma_data_direction direction) 174 unsigned long offset, size_t size, enum dma_data_direction direction)
150{ 175{
151 unsigned long addr;
152
153 BUG_ON(direction == DMA_NONE); 176 BUG_ON(direction == DMA_NONE);
154 177
155 addr = (unsigned long) page_address(page) + offset; 178 if (!plat_device_is_coherent(dev)) {
156 dma_cache_wback_inv(addr, size); 179 unsigned long addr;
180
181 addr = (unsigned long) page_address(page) + offset;
182 dma_cache_wback_inv(addr, size);
183 }
157 184
158 return page_to_phys(page) + offset; 185 return plat_map_dma_mem_page(dev, page) + offset;
159} 186}
160 187
161EXPORT_SYMBOL(dma_map_page); 188EXPORT_SYMBOL(dma_map_page);
@@ -165,12 +192,14 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
165{ 192{
166 BUG_ON(direction == DMA_NONE); 193 BUG_ON(direction == DMA_NONE);
167 194
168 if (direction != DMA_TO_DEVICE) { 195 if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) {
169 unsigned long addr; 196 unsigned long addr;
170 197
171 addr = dma_address + PAGE_OFFSET; 198 addr = plat_dma_addr_to_phys(dma_address);
172 dma_cache_wback_inv(addr, size); 199 dma_cache_wback_inv(addr, size);
173 } 200 }
201
202 plat_unmap_dma_mem(dma_address);
174} 203}
175 204
176EXPORT_SYMBOL(dma_unmap_page); 205EXPORT_SYMBOL(dma_unmap_page);
@@ -183,13 +212,15 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
183 212
184 BUG_ON(direction == DMA_NONE); 213 BUG_ON(direction == DMA_NONE);
185 214
186 if (direction == DMA_TO_DEVICE)
187 return;
188
189 for (i = 0; i < nhwentries; i++, sg++) { 215 for (i = 0; i < nhwentries; i++, sg++) {
190 addr = (unsigned long) page_address(sg->page); 216 if (!plat_device_is_coherent(dev) &&
191 if (addr) 217 direction != DMA_TO_DEVICE) {
192 __dma_sync(addr + sg->offset, sg->length, direction); 218 addr = (unsigned long) page_address(sg->page);
219 if (addr)
220 __dma_sync(addr + sg->offset, sg->length,
221 direction);
222 }
223 plat_unmap_dma_mem(sg->dma_address);
193 } 224 }
194} 225}
195 226
@@ -198,12 +229,14 @@ EXPORT_SYMBOL(dma_unmap_sg);
198void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, 229void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
199 size_t size, enum dma_data_direction direction) 230 size_t size, enum dma_data_direction direction)
200{ 231{
201 unsigned long addr;
202
203 BUG_ON(direction == DMA_NONE); 232 BUG_ON(direction == DMA_NONE);
204 233
205 addr = dma_handle + PAGE_OFFSET; 234 if (cpu_is_noncoherent_r10000(dev)) {
206 __dma_sync(addr, size, direction); 235 unsigned long addr;
236
237 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
238 __dma_sync(addr, size, direction);
239 }
207} 240}
208 241
209EXPORT_SYMBOL(dma_sync_single_for_cpu); 242EXPORT_SYMBOL(dma_sync_single_for_cpu);
@@ -211,12 +244,14 @@ EXPORT_SYMBOL(dma_sync_single_for_cpu);
211void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 244void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
212 size_t size, enum dma_data_direction direction) 245 size_t size, enum dma_data_direction direction)
213{ 246{
214 unsigned long addr;
215
216 BUG_ON(direction == DMA_NONE); 247 BUG_ON(direction == DMA_NONE);
217 248
218 addr = dma_handle + PAGE_OFFSET; 249 if (cpu_is_noncoherent_r10000(dev)) {
219 __dma_sync(addr, size, direction); 250 unsigned long addr;
251
252 addr = plat_dma_addr_to_phys(dma_handle);
253 __dma_sync(addr, size, direction);
254 }
220} 255}
221 256
222EXPORT_SYMBOL(dma_sync_single_for_device); 257EXPORT_SYMBOL(dma_sync_single_for_device);
@@ -224,12 +259,14 @@ EXPORT_SYMBOL(dma_sync_single_for_device);
224void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, 259void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
225 unsigned long offset, size_t size, enum dma_data_direction direction) 260 unsigned long offset, size_t size, enum dma_data_direction direction)
226{ 261{
227 unsigned long addr;
228
229 BUG_ON(direction == DMA_NONE); 262 BUG_ON(direction == DMA_NONE);
230 263
231 addr = dma_handle + offset + PAGE_OFFSET; 264 if (cpu_is_noncoherent_r10000(dev)) {
232 __dma_sync(addr, size, direction); 265 unsigned long addr;
266
267 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
268 __dma_sync(addr + offset, size, direction);
269 }
233} 270}
234 271
235EXPORT_SYMBOL(dma_sync_single_range_for_cpu); 272EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
@@ -237,12 +274,14 @@ EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
237void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, 274void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
238 unsigned long offset, size_t size, enum dma_data_direction direction) 275 unsigned long offset, size_t size, enum dma_data_direction direction)
239{ 276{
240 unsigned long addr;
241
242 BUG_ON(direction == DMA_NONE); 277 BUG_ON(direction == DMA_NONE);
243 278
244 addr = dma_handle + offset + PAGE_OFFSET; 279 if (cpu_is_noncoherent_r10000(dev)) {
245 __dma_sync(addr, size, direction); 280 unsigned long addr;
281
282 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
283 __dma_sync(addr + offset, size, direction);
284 }
246} 285}
247 286
248EXPORT_SYMBOL(dma_sync_single_range_for_device); 287EXPORT_SYMBOL(dma_sync_single_range_for_device);
@@ -255,9 +294,12 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
255 BUG_ON(direction == DMA_NONE); 294 BUG_ON(direction == DMA_NONE);
256 295
257 /* Make sure that gcc doesn't leave the empty loop body. */ 296 /* Make sure that gcc doesn't leave the empty loop body. */
258 for (i = 0; i < nelems; i++, sg++) 297 for (i = 0; i < nelems; i++, sg++) {
259 __dma_sync((unsigned long)page_address(sg->page), 298 if (!plat_device_is_coherent(dev))
260 sg->length, direction); 299 __dma_sync((unsigned long)page_address(sg->page),
300 sg->length, direction);
301 plat_unmap_dma_mem(sg->dma_address);
302 }
261} 303}
262 304
263EXPORT_SYMBOL(dma_sync_sg_for_cpu); 305EXPORT_SYMBOL(dma_sync_sg_for_cpu);
@@ -270,9 +312,12 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nele
270 BUG_ON(direction == DMA_NONE); 312 BUG_ON(direction == DMA_NONE);
271 313
272 /* Make sure that gcc doesn't leave the empty loop body. */ 314 /* Make sure that gcc doesn't leave the empty loop body. */
273 for (i = 0; i < nelems; i++, sg++) 315 for (i = 0; i < nelems; i++, sg++) {
274 __dma_sync((unsigned long)page_address(sg->page), 316 if (!plat_device_is_coherent(dev))
275 sg->length, direction); 317 __dma_sync((unsigned long)page_address(sg->page),
318 sg->length, direction);
319 plat_unmap_dma_mem(sg->dma_address);
320 }
276} 321}
277 322
278EXPORT_SYMBOL(dma_sync_sg_for_device); 323EXPORT_SYMBOL(dma_sync_sg_for_device);
@@ -301,70 +346,18 @@ EXPORT_SYMBOL(dma_supported);
301 346
302int dma_is_consistent(struct device *dev, dma_addr_t dma_addr) 347int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
303{ 348{
304 return 1; 349 return plat_device_is_coherent(dev);
305} 350}
306 351
307EXPORT_SYMBOL(dma_is_consistent); 352EXPORT_SYMBOL(dma_is_consistent);
308 353
309void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 354void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
310 enum dma_data_direction direction) 355 enum dma_data_direction direction)
311{ 356{
312 if (direction == DMA_NONE) 357 BUG_ON(direction == DMA_NONE);
313 return;
314 358
315 dma_cache_wback_inv((unsigned long)vaddr, size); 359 if (!plat_device_is_coherent(dev))
360 dma_cache_wback_inv((unsigned long)vaddr, size);
316} 361}
317 362
318EXPORT_SYMBOL(dma_cache_sync); 363EXPORT_SYMBOL(dma_cache_sync);
319
320/* The DAC routines are a PCIism.. */
321
322#ifdef CONFIG_PCI
323
324#include <linux/pci.h>
325
326dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
327 struct page *page, unsigned long offset, int direction)
328{
329 return (dma64_addr_t)page_to_phys(page) + offset;
330}
331
332EXPORT_SYMBOL(pci_dac_page_to_dma);
333
334struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
335 dma64_addr_t dma_addr)
336{
337 return mem_map + (dma_addr >> PAGE_SHIFT);
338}
339
340EXPORT_SYMBOL(pci_dac_dma_to_page);
341
342unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
343 dma64_addr_t dma_addr)
344{
345 return dma_addr & ~PAGE_MASK;
346}
347
348EXPORT_SYMBOL(pci_dac_dma_to_offset);
349
350void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
351 dma64_addr_t dma_addr, size_t len, int direction)
352{
353 BUG_ON(direction == PCI_DMA_NONE);
354
355 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
356}
357
358EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
359
360void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
361 dma64_addr_t dma_addr, size_t len, int direction)
362{
363 BUG_ON(direction == PCI_DMA_NONE);
364
365 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
366}
367
368EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
369
370#endif /* CONFIG_PCI */
diff --git a/arch/mips/mm/dma-ip27.c b/arch/mips/mm/dma-ip27.c
deleted file mode 100644
index f088344db465..000000000000
--- a/arch/mips/mm/dma-ip27.c
+++ /dev/null
@@ -1,257 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */
10#include <linux/types.h>
11#include <linux/mm.h>
12#include <linux/module.h>
13#include <linux/string.h>
14#include <linux/pci.h>
15
16#include <asm/cache.h>
17#include <asm/pci/bridge.h>
18
19#define pdev_to_baddr(pdev, addr) \
20 (BRIDGE_CONTROLLER(pdev->bus)->baddr + (addr))
21#define dev_to_baddr(dev, addr) \
22 pdev_to_baddr(to_pci_dev(dev), (addr))
23
24void *dma_alloc_noncoherent(struct device *dev, size_t size,
25 dma_addr_t * dma_handle, gfp_t gfp)
26{
27 void *ret;
28
29 /* ignore region specifiers */
30 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
31
32 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
33 gfp |= GFP_DMA;
34 ret = (void *) __get_free_pages(gfp, get_order(size));
35
36 if (ret != NULL) {
37 memset(ret, 0, size);
38 *dma_handle = dev_to_baddr(dev, virt_to_phys(ret));
39 }
40
41 return ret;
42}
43
44EXPORT_SYMBOL(dma_alloc_noncoherent);
45
46void *dma_alloc_coherent(struct device *dev, size_t size,
47 dma_addr_t * dma_handle, gfp_t gfp)
48 __attribute__((alias("dma_alloc_noncoherent")));
49
50EXPORT_SYMBOL(dma_alloc_coherent);
51
52void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
53 dma_addr_t dma_handle)
54{
55 unsigned long addr = (unsigned long) vaddr;
56
57 free_pages(addr, get_order(size));
58}
59
60EXPORT_SYMBOL(dma_free_noncoherent);
61
62void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
63 dma_addr_t dma_handle) __attribute__((alias("dma_free_noncoherent")));
64
65EXPORT_SYMBOL(dma_free_coherent);
66
67dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
68 enum dma_data_direction direction)
69{
70 BUG_ON(direction == DMA_NONE);
71
72 return dev_to_baddr(dev, __pa(ptr));
73}
74
75EXPORT_SYMBOL(dma_map_single);
76
77void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
78 enum dma_data_direction direction)
79{
80 BUG_ON(direction == DMA_NONE);
81}
82
83EXPORT_SYMBOL(dma_unmap_single);
84
85int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
86 enum dma_data_direction direction)
87{
88 int i;
89
90 BUG_ON(direction == DMA_NONE);
91
92 for (i = 0; i < nents; i++, sg++) {
93 sg->dma_address = (dma_addr_t) dev_to_baddr(dev,
94 page_to_phys(sg->page) + sg->offset);
95 }
96
97 return nents;
98}
99
100EXPORT_SYMBOL(dma_map_sg);
101
102dma_addr_t dma_map_page(struct device *dev, struct page *page,
103 unsigned long offset, size_t size, enum dma_data_direction direction)
104{
105 BUG_ON(direction == DMA_NONE);
106
107 return dev_to_baddr(dev, page_to_phys(page) + offset);
108}
109
110EXPORT_SYMBOL(dma_map_page);
111
112void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
113 enum dma_data_direction direction)
114{
115 BUG_ON(direction == DMA_NONE);
116}
117
118EXPORT_SYMBOL(dma_unmap_page);
119
120void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
121 enum dma_data_direction direction)
122{
123 BUG_ON(direction == DMA_NONE);
124}
125
126EXPORT_SYMBOL(dma_unmap_sg);
127
128void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
129 enum dma_data_direction direction)
130{
131 BUG_ON(direction == DMA_NONE);
132}
133
134EXPORT_SYMBOL(dma_sync_single_for_cpu);
135
136void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
137 enum dma_data_direction direction)
138{
139 BUG_ON(direction == DMA_NONE);
140}
141
142EXPORT_SYMBOL(dma_sync_single_for_device);
143
144void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
145 unsigned long offset, size_t size,
146 enum dma_data_direction direction)
147{
148 BUG_ON(direction == DMA_NONE);
149}
150
151EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
152
153void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
154 unsigned long offset, size_t size,
155 enum dma_data_direction direction)
156{
157 BUG_ON(direction == DMA_NONE);
158}
159
160EXPORT_SYMBOL(dma_sync_single_range_for_device);
161
162void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
163 enum dma_data_direction direction)
164{
165 BUG_ON(direction == DMA_NONE);
166}
167
168EXPORT_SYMBOL(dma_sync_sg_for_cpu);
169
170void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
171 enum dma_data_direction direction)
172{
173 BUG_ON(direction == DMA_NONE);
174}
175
176EXPORT_SYMBOL(dma_sync_sg_for_device);
177
178int dma_mapping_error(dma_addr_t dma_addr)
179{
180 return 0;
181}
182
183EXPORT_SYMBOL(dma_mapping_error);
184
185int dma_supported(struct device *dev, u64 mask)
186{
187 /*
188 * we fall back to GFP_DMA when the mask isn't all 1s,
189 * so we can't guarantee allocations that must be
190 * within a tighter range than GFP_DMA..
191 */
192 if (mask < 0x00ffffff)
193 return 0;
194
195 return 1;
196}
197
198EXPORT_SYMBOL(dma_supported);
199
200int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
201{
202 return 1;
203}
204
205EXPORT_SYMBOL(dma_is_consistent);
206
207void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
208 enum dma_data_direction direction)
209{
210 BUG_ON(direction == DMA_NONE);
211}
212
213EXPORT_SYMBOL(dma_cache_sync);
214
215dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
216 struct page *page, unsigned long offset, int direction)
217{
218 dma64_addr_t addr = page_to_phys(page) + offset;
219
220 return (dma64_addr_t) pdev_to_baddr(pdev, addr);
221}
222
223EXPORT_SYMBOL(pci_dac_page_to_dma);
224
225struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
226 dma64_addr_t dma_addr)
227{
228 struct bridge_controller *bc = BRIDGE_CONTROLLER(pdev->bus);
229
230 return pfn_to_page((dma_addr - bc->baddr) >> PAGE_SHIFT);
231}
232
233EXPORT_SYMBOL(pci_dac_dma_to_page);
234
235unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
236 dma64_addr_t dma_addr)
237{
238 return dma_addr & ~PAGE_MASK;
239}
240
241EXPORT_SYMBOL(pci_dac_dma_to_offset);
242
243void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
244 dma64_addr_t dma_addr, size_t len, int direction)
245{
246 BUG_ON(direction == PCI_DMA_NONE);
247}
248
249EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
250
251void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
252 dma64_addr_t dma_addr, size_t len, int direction)
253{
254 BUG_ON(direction == PCI_DMA_NONE);
255}
256
257EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
diff --git a/arch/mips/mm/dma-ip32.c b/arch/mips/mm/dma-ip32.c
deleted file mode 100644
index b42b6f7456e6..000000000000
--- a/arch/mips/mm/dma-ip32.c
+++ /dev/null
@@ -1,383 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
8 * Copyright (C) 2005 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
9 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
10 * IP32 changes by Ilya.
11 */
12#include <linux/types.h>
13#include <linux/mm.h>
14#include <linux/module.h>
15#include <linux/string.h>
16#include <linux/dma-mapping.h>
17
18#include <asm/cache.h>
19#include <asm/io.h>
20#include <asm/ip32/crime.h>
21
22/*
23 * Warning on the terminology - Linux calls an uncached area coherent;
24 * MIPS terminology calls memory areas with hardware maintained coherency
25 * coherent.
26 */
27
28/*
29 * Few notes.
30 * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M
31 * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for native-endian)
32 * 3. All other devices see memory as one big chunk at 0x40000000
33 * 4. Non-PCI devices will pass NULL as struct device*
34 * Thus we translate differently, depending on device.
35 */
36
37#define RAM_OFFSET_MASK 0x3fffffff
38
39void *dma_alloc_noncoherent(struct device *dev, size_t size,
40 dma_addr_t * dma_handle, gfp_t gfp)
41{
42 void *ret;
43 /* ignore region specifiers */
44 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
45
46 if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
47 gfp |= GFP_DMA;
48 ret = (void *) __get_free_pages(gfp, get_order(size));
49
50 if (ret != NULL) {
51 unsigned long addr = virt_to_phys(ret)&RAM_OFFSET_MASK;
52 memset(ret, 0, size);
53 if(dev==NULL)
54 addr+= CRIME_HI_MEM_BASE;
55 *dma_handle = addr;
56 }
57
58 return ret;
59}
60
61EXPORT_SYMBOL(dma_alloc_noncoherent);
62
63void *dma_alloc_coherent(struct device *dev, size_t size,
64 dma_addr_t * dma_handle, gfp_t gfp)
65{
66 void *ret;
67
68 ret = dma_alloc_noncoherent(dev, size, dma_handle, gfp);
69 if (ret) {
70 dma_cache_wback_inv((unsigned long) ret, size);
71 ret = UNCAC_ADDR(ret);
72 }
73
74 return ret;
75}
76
77EXPORT_SYMBOL(dma_alloc_coherent);
78
79void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
80 dma_addr_t dma_handle)
81{
82 free_pages((unsigned long) vaddr, get_order(size));
83}
84
85EXPORT_SYMBOL(dma_free_noncoherent);
86
87void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
88 dma_addr_t dma_handle)
89{
90 unsigned long addr = (unsigned long) vaddr;
91
92 addr = CAC_ADDR(addr);
93 free_pages(addr, get_order(size));
94}
95
96EXPORT_SYMBOL(dma_free_coherent);
97
98static inline void __dma_sync(unsigned long addr, size_t size,
99 enum dma_data_direction direction)
100{
101 switch (direction) {
102 case DMA_TO_DEVICE:
103 dma_cache_wback(addr, size);
104 break;
105
106 case DMA_FROM_DEVICE:
107 dma_cache_inv(addr, size);
108 break;
109
110 case DMA_BIDIRECTIONAL:
111 dma_cache_wback_inv(addr, size);
112 break;
113
114 default:
115 BUG();
116 }
117}
118
119dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
120 enum dma_data_direction direction)
121{
122 unsigned long addr = (unsigned long) ptr;
123
124 switch (direction) {
125 case DMA_TO_DEVICE:
126 dma_cache_wback(addr, size);
127 break;
128
129 case DMA_FROM_DEVICE:
130 dma_cache_inv(addr, size);
131 break;
132
133 case DMA_BIDIRECTIONAL:
134 dma_cache_wback_inv(addr, size);
135 break;
136
137 default:
138 BUG();
139 }
140
141 addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;
142 if(dev == NULL)
143 addr+=CRIME_HI_MEM_BASE;
144 return (dma_addr_t)addr;
145}
146
147EXPORT_SYMBOL(dma_map_single);
148
149void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
150 enum dma_data_direction direction)
151{
152 switch (direction) {
153 case DMA_TO_DEVICE:
154 break;
155
156 case DMA_FROM_DEVICE:
157 break;
158
159 case DMA_BIDIRECTIONAL:
160 break;
161
162 default:
163 BUG();
164 }
165}
166
167EXPORT_SYMBOL(dma_unmap_single);
168
169int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
170 enum dma_data_direction direction)
171{
172 int i;
173
174 BUG_ON(direction == DMA_NONE);
175
176 for (i = 0; i < nents; i++, sg++) {
177 unsigned long addr;
178
179 addr = (unsigned long) page_address(sg->page)+sg->offset;
180 if (addr)
181 __dma_sync(addr, sg->length, direction);
182 addr = __pa(addr)&RAM_OFFSET_MASK;
183 if(dev == NULL)
184 addr += CRIME_HI_MEM_BASE;
185 sg->dma_address = (dma_addr_t)addr;
186 }
187
188 return nents;
189}
190
191EXPORT_SYMBOL(dma_map_sg);
192
193dma_addr_t dma_map_page(struct device *dev, struct page *page,
194 unsigned long offset, size_t size, enum dma_data_direction direction)
195{
196 unsigned long addr;
197
198 BUG_ON(direction == DMA_NONE);
199
200 addr = (unsigned long) page_address(page) + offset;
201 dma_cache_wback_inv(addr, size);
202 addr = __pa(addr)&RAM_OFFSET_MASK;
203 if(dev == NULL)
204 addr += CRIME_HI_MEM_BASE;
205
206 return (dma_addr_t)addr;
207}
208
209EXPORT_SYMBOL(dma_map_page);
210
211void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
212 enum dma_data_direction direction)
213{
214 BUG_ON(direction == DMA_NONE);
215
216 if (direction != DMA_TO_DEVICE) {
217 unsigned long addr;
218
219 dma_address&=RAM_OFFSET_MASK;
220 addr = dma_address + PAGE_OFFSET;
221 if(dma_address>=256*1024*1024)
222 addr+=CRIME_HI_MEM_BASE;
223 dma_cache_wback_inv(addr, size);
224 }
225}
226
227EXPORT_SYMBOL(dma_unmap_page);
228
229void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
230 enum dma_data_direction direction)
231{
232 unsigned long addr;
233 int i;
234
235 BUG_ON(direction == DMA_NONE);
236
237 if (direction == DMA_TO_DEVICE)
238 return;
239
240 for (i = 0; i < nhwentries; i++, sg++) {
241 addr = (unsigned long) page_address(sg->page);
242 if (!addr)
243 continue;
244 dma_cache_wback_inv(addr + sg->offset, sg->length);
245 }
246}
247
248EXPORT_SYMBOL(dma_unmap_sg);
249
250void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
251 size_t size, enum dma_data_direction direction)
252{
253 unsigned long addr;
254
255 BUG_ON(direction == DMA_NONE);
256
257 dma_handle&=RAM_OFFSET_MASK;
258 addr = dma_handle + PAGE_OFFSET;
259 if(dma_handle>=256*1024*1024)
260 addr+=CRIME_HI_MEM_BASE;
261 __dma_sync(addr, size, direction);
262}
263
264EXPORT_SYMBOL(dma_sync_single_for_cpu);
265
266void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
267 size_t size, enum dma_data_direction direction)
268{
269 unsigned long addr;
270
271 BUG_ON(direction == DMA_NONE);
272
273 dma_handle&=RAM_OFFSET_MASK;
274 addr = dma_handle + PAGE_OFFSET;
275 if(dma_handle>=256*1024*1024)
276 addr+=CRIME_HI_MEM_BASE;
277 __dma_sync(addr, size, direction);
278}
279
280EXPORT_SYMBOL(dma_sync_single_for_device);
281
282void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
283 unsigned long offset, size_t size, enum dma_data_direction direction)
284{
285 unsigned long addr;
286
287 BUG_ON(direction == DMA_NONE);
288
289 dma_handle&=RAM_OFFSET_MASK;
290 addr = dma_handle + offset + PAGE_OFFSET;
291 if(dma_handle>=256*1024*1024)
292 addr+=CRIME_HI_MEM_BASE;
293 __dma_sync(addr, size, direction);
294}
295
296EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
297
298void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
299 unsigned long offset, size_t size, enum dma_data_direction direction)
300{
301 unsigned long addr;
302
303 BUG_ON(direction == DMA_NONE);
304
305 dma_handle&=RAM_OFFSET_MASK;
306 addr = dma_handle + offset + PAGE_OFFSET;
307 if(dma_handle>=256*1024*1024)
308 addr+=CRIME_HI_MEM_BASE;
309 __dma_sync(addr, size, direction);
310}
311
312EXPORT_SYMBOL(dma_sync_single_range_for_device);
313
314void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
315 enum dma_data_direction direction)
316{
317 int i;
318
319 BUG_ON(direction == DMA_NONE);
320
321 /* Make sure that gcc doesn't leave the empty loop body. */
322 for (i = 0; i < nelems; i++, sg++)
323 __dma_sync((unsigned long)page_address(sg->page),
324 sg->length, direction);
325}
326
327EXPORT_SYMBOL(dma_sync_sg_for_cpu);
328
329void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
330 enum dma_data_direction direction)
331{
332 int i;
333
334 BUG_ON(direction == DMA_NONE);
335
336 /* Make sure that gcc doesn't leave the empty loop body. */
337 for (i = 0; i < nelems; i++, sg++)
338 __dma_sync((unsigned long)page_address(sg->page),
339 sg->length, direction);
340}
341
342EXPORT_SYMBOL(dma_sync_sg_for_device);
343
344int dma_mapping_error(dma_addr_t dma_addr)
345{
346 return 0;
347}
348
349EXPORT_SYMBOL(dma_mapping_error);
350
351int dma_supported(struct device *dev, u64 mask)
352{
353 /*
354 * we fall back to GFP_DMA when the mask isn't all 1s,
355 * so we can't guarantee allocations that must be
356 * within a tighter range than GFP_DMA..
357 */
358 if (mask < 0x00ffffff)
359 return 0;
360
361 return 1;
362}
363
364EXPORT_SYMBOL(dma_supported);
365
366int dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
367{
368 return 1;
369}
370
371EXPORT_SYMBOL(dma_is_consistent);
372
373void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
374 enum dma_data_direction direction)
375{
376 if (direction == DMA_NONE)
377 return;
378
379 dma_cache_wback_inv((unsigned long)vaddr, size);
380}
381
382EXPORT_SYMBOL(dma_cache_sync);
383
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 49065c133ebf..f08ae71c46ff 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -61,8 +61,6 @@
61 61
62DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 62DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
63 63
64unsigned long highstart_pfn, highend_pfn;
65
66/* 64/*
67 * We have up to 8 empty zeroed pages so we can map one of the right colour 65 * We have up to 8 empty zeroed pages so we can map one of the right colour
68 * when needed. This is necessary only on R4000 / R4400 SC and MC versions 66 * when needed. This is necessary only on R4000 / R4400 SC and MC versions
@@ -261,6 +259,8 @@ EXPORT_SYMBOL(copy_from_user_page);
261 259
262 260
263#ifdef CONFIG_HIGHMEM 261#ifdef CONFIG_HIGHMEM
262unsigned long highstart_pfn, highend_pfn;
263
264pte_t *kmap_pte; 264pte_t *kmap_pte;
265pgprot_t kmap_prot; 265pgprot_t kmap_prot;
266 266
@@ -314,8 +314,6 @@ void __init fixrange_init(unsigned long start, unsigned long end,
314} 314}
315 315
316#ifndef CONFIG_NEED_MULTIPLE_NODES 316#ifndef CONFIG_NEED_MULTIPLE_NODES
317extern void pagetable_init(void);
318
319static int __init page_is_ram(unsigned long pagenr) 317static int __init page_is_ram(unsigned long pagenr)
320{ 318{
321 int i; 319 int i;
@@ -341,7 +339,6 @@ static int __init page_is_ram(unsigned long pagenr)
341void __init paging_init(void) 339void __init paging_init(void)
342{ 340{
343 unsigned long zones_size[MAX_NR_ZONES] = { 0, }; 341 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
344 unsigned long max_dma, low;
345#ifndef CONFIG_FLATMEM 342#ifndef CONFIG_FLATMEM
346 unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; 343 unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
347 unsigned long i, j, pfn; 344 unsigned long i, j, pfn;
@@ -354,19 +351,19 @@ void __init paging_init(void)
354#endif 351#endif
355 kmap_coherent_init(); 352 kmap_coherent_init();
356 353
357 max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
358 low = max_low_pfn;
359
360#ifdef CONFIG_ISA 354#ifdef CONFIG_ISA
361 if (low < max_dma) 355 if (max_low_pfn >= MAX_DMA_PFN)
362 zones_size[ZONE_DMA] = low; 356 if (min_low_pfn >= MAX_DMA_PFN) {
363 else { 357 zones_size[ZONE_DMA] = 0;
364 zones_size[ZONE_DMA] = max_dma; 358 zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
365 zones_size[ZONE_NORMAL] = low - max_dma; 359 } else {
366 } 360 zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
367#else 361 zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
368 zones_size[ZONE_DMA] = low; 362 }
363 else
369#endif 364#endif
365 zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
366
370#ifdef CONFIG_HIGHMEM 367#ifdef CONFIG_HIGHMEM
371 zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; 368 zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
372 369
@@ -467,7 +464,7 @@ void __init mem_init(void)
467} 464}
468#endif /* !CONFIG_NEED_MULTIPLE_NODES */ 465#endif /* !CONFIG_NEED_MULTIPLE_NODES */
469 466
470static void free_init_pages(char *what, unsigned long begin, unsigned long end) 467void free_init_pages(const char *what, unsigned long begin, unsigned long end)
471{ 468{
472 unsigned long pfn; 469 unsigned long pfn;
473 470
@@ -493,18 +490,25 @@ void free_initrd_mem(unsigned long start, unsigned long end)
493} 490}
494#endif 491#endif
495 492
496extern unsigned long prom_free_prom_memory(void);
497
498void free_initmem(void) 493void free_initmem(void)
499{ 494{
500 unsigned long freed; 495 prom_free_prom_memory();
501
502 freed = prom_free_prom_memory();
503 if (freed)
504 printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n",
505 freed >> 10);
506
507 free_init_pages("unused kernel memory", 496 free_init_pages("unused kernel memory",
508 __pa_symbol(&__init_begin), 497 __pa_symbol(&__init_begin),
509 __pa_symbol(&__init_end)); 498 __pa_symbol(&__init_end));
510} 499}
500
501unsigned long pgd_current[NR_CPUS];
502/*
503 * On 64-bit we've got three-level pagetables with a slightly
504 * different layout ...
505 */
506#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
507pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
508#ifdef CONFIG_64BIT
509#ifdef MODULE_START
510pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
511#endif
512pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER);
513#endif
514pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index fc2c96f0a1fd..cea7d0ea36e4 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -6,13 +6,98 @@
6 * (C) Copyright 1995 1996 Linus Torvalds 6 * (C) Copyright 1995 1996 Linus Torvalds
7 * (C) Copyright 2001, 2002 Ralf Baechle 7 * (C) Copyright 2001, 2002 Ralf Baechle
8 */ 8 */
9#include <linux/mm.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <asm/addrspace.h> 10#include <asm/addrspace.h>
12#include <asm/byteorder.h> 11#include <asm/byteorder.h>
13 12
14#include <linux/vmalloc.h> 13#include <linux/vmalloc.h>
15#include <linux/io.h> 14#include <asm/cacheflush.h>
15#include <asm/io.h>
16#include <asm/tlbflush.h>
17
18static inline void remap_area_pte(pte_t * pte, unsigned long address,
19 phys_t size, phys_t phys_addr, unsigned long flags)
20{
21 phys_t end;
22 unsigned long pfn;
23 pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE
24 | __WRITEABLE | flags);
25
26 address &= ~PMD_MASK;
27 end = address + size;
28 if (end > PMD_SIZE)
29 end = PMD_SIZE;
30 if (address >= end)
31 BUG();
32 pfn = phys_addr >> PAGE_SHIFT;
33 do {
34 if (!pte_none(*pte)) {
35 printk("remap_area_pte: page already exists\n");
36 BUG();
37 }
38 set_pte(pte, pfn_pte(pfn, pgprot));
39 address += PAGE_SIZE;
40 pfn++;
41 pte++;
42 } while (address && (address < end));
43}
44
45static inline int remap_area_pmd(pmd_t * pmd, unsigned long address,
46 phys_t size, phys_t phys_addr, unsigned long flags)
47{
48 phys_t end;
49
50 address &= ~PGDIR_MASK;
51 end = address + size;
52 if (end > PGDIR_SIZE)
53 end = PGDIR_SIZE;
54 phys_addr -= address;
55 if (address >= end)
56 BUG();
57 do {
58 pte_t * pte = pte_alloc_kernel(pmd, address);
59 if (!pte)
60 return -ENOMEM;
61 remap_area_pte(pte, address, end - address, address + phys_addr, flags);
62 address = (address + PMD_SIZE) & PMD_MASK;
63 pmd++;
64 } while (address && (address < end));
65 return 0;
66}
67
68static int remap_area_pages(unsigned long address, phys_t phys_addr,
69 phys_t size, unsigned long flags)
70{
71 int error;
72 pgd_t * dir;
73 unsigned long end = address + size;
74
75 phys_addr -= address;
76 dir = pgd_offset(&init_mm, address);
77 flush_cache_all();
78 if (address >= end)
79 BUG();
80 do {
81 pud_t *pud;
82 pmd_t *pmd;
83
84 error = -ENOMEM;
85 pud = pud_alloc(&init_mm, dir, address);
86 if (!pud)
87 break;
88 pmd = pmd_alloc(&init_mm, pud, address);
89 if (!pmd)
90 break;
91 if (remap_area_pmd(pmd, address, end - address,
92 phys_addr + address, flags))
93 break;
94 error = 0;
95 address = (address + PGDIR_SIZE) & PGDIR_MASK;
96 dir++;
97 } while (address && (address < end));
98 flush_tlb_all();
99 return error;
100}
16 101
17/* 102/*
18 * Generic mapping function (not visible outside): 103 * Generic mapping function (not visible outside):
@@ -36,7 +121,6 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
36 unsigned long offset; 121 unsigned long offset;
37 phys_t last_addr; 122 phys_t last_addr;
38 void * addr; 123 void * addr;
39 pgprot_t pgprot;
40 124
41 phys_addr = fixup_bigphys_addr(phys_addr, size); 125 phys_addr = fixup_bigphys_addr(phys_addr, size);
42 126
@@ -68,9 +152,6 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
68 return NULL; 152 return NULL;
69 } 153 }
70 154
71 pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE
72 | __WRITEABLE | flags);
73
74 /* 155 /*
75 * Mappings have to be page-aligned 156 * Mappings have to be page-aligned
76 */ 157 */
@@ -85,8 +166,7 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)
85 if (!area) 166 if (!area)
86 return NULL; 167 return NULL;
87 addr = area->addr; 168 addr = area->addr;
88 if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, 169 if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
89 phys_addr, pgprot)) {
90 vunmap(addr); 170 vunmap(addr);
91 return NULL; 171 return NULL;
92 } 172 }
diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c
index 4a61e624b0ec..575e4019227b 100644
--- a/arch/mips/mm/pgtable-32.c
+++ b/arch/mips/mm/pgtable-32.c
@@ -11,6 +11,7 @@
11#include <linux/highmem.h> 11#include <linux/highmem.h>
12#include <asm/fixmap.h> 12#include <asm/fixmap.h>
13#include <asm/pgtable.h> 13#include <asm/pgtable.h>
14#include <asm/pgalloc.h>
14 15
15void pgd_init(unsigned long page) 16void pgd_init(unsigned long page)
16{ 17{
diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c
index c46eb651bf09..e4b565aeb008 100644
--- a/arch/mips/mm/pgtable-64.c
+++ b/arch/mips/mm/pgtable-64.c
@@ -10,6 +10,7 @@
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <asm/fixmap.h> 11#include <asm/fixmap.h>
12#include <asm/pgtable.h> 12#include <asm/pgtable.h>
13#include <asm/pgalloc.h>
13 14
14void pgd_init(unsigned long page) 15void pgd_init(unsigned long page)
15{ 16{
diff --git a/arch/mips/momentum/jaguar_atx/Makefile b/arch/mips/momentum/jaguar_atx/Makefile
index 67372f3f9654..2e8cebd49bc0 100644
--- a/arch/mips/momentum/jaguar_atx/Makefile
+++ b/arch/mips/momentum/jaguar_atx/Makefile
@@ -6,7 +6,7 @@
6# unless it's something special (ie not a .c file). 6# unless it's something special (ie not a .c file).
7# 7#
8 8
9obj-y += irq.o prom.o reset.o setup.o 9obj-y += irq.o platform.o prom.o reset.o setup.o
10 10
11obj-$(CONFIG_SERIAL_8250_CONSOLE) += ja-console.o 11obj-$(CONFIG_SERIAL_8250_CONSOLE) += ja-console.o
12obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o 12obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c
index 2efb25aa1aed..f2b432585df2 100644
--- a/arch/mips/momentum/jaguar_atx/irq.c
+++ b/arch/mips/momentum/jaguar_atx/irq.c
@@ -82,8 +82,8 @@ void __init arch_init_irq(void)
82 */ 82 */
83 clear_c0_status(ST0_IM); 83 clear_c0_status(ST0_IM);
84 84
85 mips_cpu_irq_init(0); 85 mips_cpu_irq_init();
86 rm7k_cpu_irq_init(8); 86 rm7k_cpu_irq_init();
87 87
88 /* set up the cascading interrupts */ 88 /* set up the cascading interrupts */
89 setup_irq(8, &cascade_mv64340); 89 setup_irq(8, &cascade_mv64340);
diff --git a/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h b/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
index 6978654c712b..022f6974b76e 100644
--- a/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
+++ b/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
@@ -46,7 +46,9 @@
46 46
47extern unsigned long ja_fpga_base; 47extern unsigned long ja_fpga_base;
48 48
49#define JAGUAR_FPGA_WRITE(x,y) writeb(x, ja_fpga_base + JAGUAR_ATX_REG_##y) 49#define __FPGA_REG_TO_ADDR(reg) \
50#define JAGUAR_FPGA_READ(x) readb(ja_fpga_base + JAGUAR_ATX_REG_##x) 50 ((void *) ja_fpga_base + JAGUAR_ATX_REG_##reg)
51#define JAGUAR_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
52#define JAGUAR_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
51 53
52#endif 54#endif
diff --git a/arch/mips/momentum/jaguar_atx/platform.c b/arch/mips/momentum/jaguar_atx/platform.c
new file mode 100644
index 000000000000..3df36eda75af
--- /dev/null
+++ b/arch/mips/momentum/jaguar_atx/platform.c
@@ -0,0 +1,214 @@
1#include <linux/delay.h>
2#include <linux/if_ether.h>
3#include <linux/ioport.h>
4#include <linux/mv643xx.h>
5#include <linux/platform_device.h>
6
7#include "jaguar_atx_fpga.h"
8
9#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
10
11static struct resource mv643xx_eth_shared_resources[] = {
12 [0] = {
13 .name = "ethernet shared base",
14 .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
15 .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
16 MV643XX_ETH_SHARED_REGS_SIZE - 1,
17 .flags = IORESOURCE_MEM,
18 },
19};
20
21static struct platform_device mv643xx_eth_shared_device = {
22 .name = MV643XX_ETH_SHARED_NAME,
23 .id = 0,
24 .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
25 .resource = mv643xx_eth_shared_resources,
26};
27
28#define MV_SRAM_BASE 0xfe000000UL
29#define MV_SRAM_SIZE (256 * 1024)
30
31#define MV_SRAM_RXRING_SIZE (MV_SRAM_SIZE / 4)
32#define MV_SRAM_TXRING_SIZE (MV_SRAM_SIZE / 4)
33
34#define MV_SRAM_BASE_ETH0 MV_SRAM_BASE
35#define MV_SRAM_BASE_ETH1 (MV_SRAM_BASE + (MV_SRAM_SIZE / 2))
36
37#define MV64x60_IRQ_ETH_0 48
38#define MV64x60_IRQ_ETH_1 49
39#define MV64x60_IRQ_ETH_2 50
40
41static struct resource mv64x60_eth0_resources[] = {
42 [0] = {
43 .name = "eth0 irq",
44 .start = MV64x60_IRQ_ETH_0,
45 .end = MV64x60_IRQ_ETH_0,
46 .flags = IORESOURCE_IRQ,
47 },
48};
49
50static char eth0_mac_addr[ETH_ALEN];
51
52static struct mv643xx_eth_platform_data eth0_pd = {
53 .mac_addr = eth0_mac_addr,
54
55 .tx_sram_addr = MV_SRAM_BASE_ETH0,
56 .tx_sram_size = MV_SRAM_TXRING_SIZE,
57 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
58
59 .rx_sram_addr = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
60 .rx_sram_size = MV_SRAM_RXRING_SIZE,
61 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
62};
63
64static struct platform_device eth0_device = {
65 .name = MV643XX_ETH_NAME,
66 .id = 0,
67 .num_resources = ARRAY_SIZE(mv64x60_eth0_resources),
68 .resource = mv64x60_eth0_resources,
69 .dev = {
70 .platform_data = &eth0_pd,
71 },
72};
73
74static struct resource mv64x60_eth1_resources[] = {
75 [0] = {
76 .name = "eth1 irq",
77 .start = MV64x60_IRQ_ETH_1,
78 .end = MV64x60_IRQ_ETH_1,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
83static char eth1_mac_addr[ETH_ALEN];
84
85static struct mv643xx_eth_platform_data eth1_pd = {
86 .mac_addr = eth1_mac_addr,
87
88 .tx_sram_addr = MV_SRAM_BASE_ETH1,
89 .tx_sram_size = MV_SRAM_TXRING_SIZE,
90 .tx_queue_size = MV_SRAM_TXRING_SIZE / 16,
91
92 .rx_sram_addr = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
93 .rx_sram_size = MV_SRAM_RXRING_SIZE,
94 .rx_queue_size = MV_SRAM_RXRING_SIZE / 16,
95};
96
97static struct platform_device eth1_device = {
98 .name = MV643XX_ETH_NAME,
99 .id = 1,
100 .num_resources = ARRAY_SIZE(mv64x60_eth1_resources),
101 .resource = mv64x60_eth1_resources,
102 .dev = {
103 .platform_data = &eth1_pd,
104 },
105};
106
107static struct resource mv64x60_eth2_resources[] = {
108 [0] = {
109 .name = "eth2 irq",
110 .start = MV64x60_IRQ_ETH_2,
111 .end = MV64x60_IRQ_ETH_2,
112 .flags = IORESOURCE_IRQ,
113 },
114};
115
116static char eth2_mac_addr[ETH_ALEN];
117
118static struct mv643xx_eth_platform_data eth2_pd = {
119 .mac_addr = eth2_mac_addr,
120};
121
122static struct platform_device eth2_device = {
123 .name = MV643XX_ETH_NAME,
124 .id = 2,
125 .num_resources = ARRAY_SIZE(mv64x60_eth2_resources),
126 .resource = mv64x60_eth2_resources,
127 .dev = {
128 .platform_data = &eth2_pd,
129 },
130};
131
132static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
133 &mv643xx_eth_shared_device,
134 &eth0_device,
135 &eth1_device,
136 &eth2_device,
137};
138
139static u8 __init exchange_bit(u8 val, u8 cs)
140{
141 /* place the data */
142 JAGUAR_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
143 udelay(1);
144
145 /* turn the clock on */
146 JAGUAR_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
147 udelay(1);
148
149 /* turn the clock off and read-strobe */
150 JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
151
152 /* return the data */
153 return (JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
154}
155
156static void __init get_mac(char dest[6])
157{
158 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
159 int i,j;
160
161 for (i = 0; i < 12; i++)
162 exchange_bit(read_opcode[i], 1);
163
164 for (j = 0; j < 6; j++) {
165 dest[j] = 0;
166 for (i = 0; i < 8; i++) {
167 dest[j] <<= 1;
168 dest[j] |= exchange_bit(0, 1);
169 }
170 }
171
172 /* turn off CS */
173 exchange_bit(0,0);
174}
175
176/*
177 * Copy and increment ethernet MAC address by a small value.
178 *
179 * This is useful for systems where the only one MAC address is stored in
180 * non-volatile memory for multiple ports.
181 */
182static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
183 unsigned int add)
184{
185 int i;
186
187 BUG_ON(add >= 256);
188
189 for (i = ETH_ALEN; i >= 0; i--) {
190 dst[i] = src[i] + add;
191 add = dst[i] < src[i]; /* compute carry */
192 }
193
194 WARN_ON(add);
195}
196
197static int __init mv643xx_eth_add_pds(void)
198{
199 unsigned char mac[ETH_ALEN];
200 int ret;
201
202 get_mac(mac);
203 eth_mac_add(eth0_mac_addr, mac, 0);
204 eth_mac_add(eth1_mac_addr, mac, 1);
205 eth_mac_add(eth2_mac_addr, mac, 2);
206 ret = platform_add_devices(mv643xx_eth_pd_devs,
207 ARRAY_SIZE(mv643xx_eth_pd_devs));
208
209 return ret;
210}
211
212device_initcall(mv643xx_eth_add_pds);
213
214#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c
index 3d2712929293..5dd154ee58f6 100644
--- a/arch/mips/momentum/jaguar_atx/prom.c
+++ b/arch/mips/momentum/jaguar_atx/prom.c
@@ -39,56 +39,6 @@ const char *get_system_type(void)
39 return "Momentum Jaguar-ATX"; 39 return "Momentum Jaguar-ATX";
40} 40}
41 41
42#ifdef CONFIG_MV643XX_ETH
43extern unsigned char prom_mac_addr_base[6];
44
45static void burn_clocks(void)
46{
47 int i;
48
49 /* this loop should burn at least 1us -- this should be plenty */
50 for (i = 0; i < 0x10000; i++)
51 ;
52}
53
54static u8 exchange_bit(u8 val, u8 cs)
55{
56 /* place the data */
57 JAGUAR_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
58 burn_clocks();
59
60 /* turn the clock on */
61 JAGUAR_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
62 burn_clocks();
63
64 /* turn the clock off and read-strobe */
65 JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
66
67 /* return the data */
68 return ((JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1);
69}
70
71void get_mac(char dest[6])
72{
73 u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
74 int i,j;
75
76 for (i = 0; i < 12; i++)
77 exchange_bit(read_opcode[i], 1);
78
79 for (j = 0; j < 6; j++) {
80 dest[j] = 0;
81 for (i = 0; i < 8; i++) {
82 dest[j] <<= 1;
83 dest[j] |= exchange_bit(0, 1);
84 }
85 }
86
87 /* turn off CS */
88 exchange_bit(0,0);
89}
90#endif
91
92#ifdef CONFIG_64BIT 42#ifdef CONFIG_64BIT
93 43
94unsigned long signext(unsigned long addr) 44unsigned long signext(unsigned long addr)
@@ -228,16 +178,10 @@ void __init prom_init(void)
228#endif /* CONFIG_64BIT */ 178#endif /* CONFIG_64BIT */
229 mips_machgroup = MACH_GROUP_MOMENCO; 179 mips_machgroup = MACH_GROUP_MOMENCO;
230 mips_machtype = MACH_MOMENCO_JAGUAR_ATX; 180 mips_machtype = MACH_MOMENCO_JAGUAR_ATX;
231
232#ifdef CONFIG_MV643XX_ETH
233 /* get the base MAC address for on-board ethernet ports */
234 get_mac(prom_mac_addr_base);
235#endif
236} 181}
237 182
238unsigned long __init prom_free_prom_memory(void) 183void __init prom_free_prom_memory(void)
239{ 184{
240 return 0;
241} 185}
242 186
243void __init prom_fixup_mem_map(unsigned long start, unsigned long end) 187void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
index cea0e5deb80e..3862d1d1add4 100644
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ b/arch/mips/momentum/ocelot_3/irq.c
@@ -65,7 +65,7 @@ void __init arch_init_irq(void)
65 */ 65 */
66 clear_c0_status(ST0_IM | ST0_BEV); 66 clear_c0_status(ST0_IM | ST0_BEV);
67 67
68 rm7k_cpu_irq_init(8); 68 rm7k_cpu_irq_init();
69 69
70 /* set up the cascading interrupts */ 70 /* set up the cascading interrupts */
71 setup_irq(8, &cascade_mv64340); /* unmask intControl IM8, IRQ 9 */ 71 setup_irq(8, &cascade_mv64340); /* unmask intControl IM8, IRQ 9 */
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c
index eefe5841fbb2..024aef25f372 100644
--- a/arch/mips/momentum/ocelot_3/platform.c
+++ b/arch/mips/momentum/ocelot_3/platform.c
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = {
38#define MV64x60_IRQ_ETH_1 49 38#define MV64x60_IRQ_ETH_1 49
39#define MV64x60_IRQ_ETH_2 50 39#define MV64x60_IRQ_ETH_2 50
40 40
41#ifdef CONFIG_MV643XX_ETH_0
42
43static struct resource mv64x60_eth0_resources[] = { 41static struct resource mv64x60_eth0_resources[] = {
44 [0] = { 42 [0] = {
45 .name = "eth0 irq", 43 .name = "eth0 irq",
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = {
72 .platform_data = &eth0_pd, 70 .platform_data = &eth0_pd,
73 }, 71 },
74}; 72};
75#endif /* CONFIG_MV643XX_ETH_0 */
76
77#ifdef CONFIG_MV643XX_ETH_1
78 73
79static struct resource mv64x60_eth1_resources[] = { 74static struct resource mv64x60_eth1_resources[] = {
80 [0] = { 75 [0] = {
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = {
108 .platform_data = &eth1_pd, 103 .platform_data = &eth1_pd,
109 }, 104 },
110}; 105};
111#endif /* CONFIG_MV643XX_ETH_1 */
112
113#ifdef CONFIG_MV643XX_ETH_2
114 106
115static struct resource mv64x60_eth2_resources[] = { 107static struct resource mv64x60_eth2_resources[] = {
116 [0] = { 108 [0] = {
@@ -129,26 +121,19 @@ static struct mv643xx_eth_platform_data eth2_pd = {
129 121
130static struct platform_device eth2_device = { 122static struct platform_device eth2_device = {
131 .name = MV643XX_ETH_NAME, 123 .name = MV643XX_ETH_NAME,
132 .id = 1, 124 .id = 2,
133 .num_resources = ARRAY_SIZE(mv64x60_eth2_resources), 125 .num_resources = ARRAY_SIZE(mv64x60_eth2_resources),
134 .resource = mv64x60_eth2_resources, 126 .resource = mv64x60_eth2_resources,
135 .dev = { 127 .dev = {
136 .platform_data = &eth2_pd, 128 .platform_data = &eth2_pd,
137 }, 129 },
138}; 130};
139#endif /* CONFIG_MV643XX_ETH_2 */
140 131
141static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { 132static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
142 &mv643xx_eth_shared_device, 133 &mv643xx_eth_shared_device,
143#ifdef CONFIG_MV643XX_ETH_0
144 &eth0_device, 134 &eth0_device,
145#endif
146#ifdef CONFIG_MV643XX_ETH_1
147 &eth1_device, 135 &eth1_device,
148#endif
149#ifdef CONFIG_MV643XX_ETH_2
150 &eth2_device, 136 &eth2_device,
151#endif
152}; 137};
153 138
154static u8 __init exchange_bit(u8 val, u8 cs) 139static u8 __init exchange_bit(u8 val, u8 cs)
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void)
215 int ret; 200 int ret;
216 201
217 get_mac(mac); 202 get_mac(mac);
218#ifdef CONFIG_MV643XX_ETH_0 203 eth_mac_add(eth0_mac_addr, mac, 0);
219 eth_mac_add(eth1_mac_addr, mac, 0);
220#endif
221#ifdef CONFIG_MV643XX_ETH_1
222 eth_mac_add(eth1_mac_addr, mac, 1); 204 eth_mac_add(eth1_mac_addr, mac, 1);
223#endif
224#ifdef CONFIG_MV643XX_ETH_2
225 eth_mac_add(eth2_mac_addr, mac, 2); 205 eth_mac_add(eth2_mac_addr, mac, 2);
226#endif
227 ret = platform_add_devices(mv643xx_eth_pd_devs, 206 ret = platform_add_devices(mv643xx_eth_pd_devs,
228 ARRAY_SIZE(mv643xx_eth_pd_devs)); 207 ARRAY_SIZE(mv643xx_eth_pd_devs));
229 208
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c
index 6ce9b7fdb824..8e02df63578a 100644
--- a/arch/mips/momentum/ocelot_3/prom.c
+++ b/arch/mips/momentum/ocelot_3/prom.c
@@ -180,9 +180,8 @@ void __init prom_init(void)
180#endif 180#endif
181} 181}
182 182
183unsigned long __init prom_free_prom_memory(void) 183void __init prom_free_prom_memory(void)
184{ 184{
185 return 0;
186} 185}
187 186
188void __init prom_fixup_mem_map(unsigned long start, unsigned long end) 187void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c
index bb11fef08472..186a140fd2a9 100644
--- a/arch/mips/momentum/ocelot_c/cpci-irq.c
+++ b/arch/mips/momentum/ocelot_c/cpci-irq.c
@@ -84,7 +84,7 @@ void ll_cpci_irq(void)
84} 84}
85 85
86struct irq_chip cpci_irq_type = { 86struct irq_chip cpci_irq_type = {
87 .typename = "CPCI/FPGA", 87 .name = "CPCI/FPGA",
88 .ack = mask_cpci_irq, 88 .ack = mask_cpci_irq,
89 .mask = mask_cpci_irq, 89 .mask = mask_cpci_irq,
90 .mask_ack = mask_cpci_irq, 90 .mask_ack = mask_cpci_irq,
diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c
index 2128684584f5..32d6fb4ee679 100644
--- a/arch/mips/momentum/ocelot_c/dbg_io.c
+++ b/arch/mips/momentum/ocelot_c/dbg_io.c
@@ -1,6 +1,4 @@
1 1
2#ifdef CONFIG_KGDB
3
4#include <asm/serial.h> /* For the serial port location and base baud */ 2#include <asm/serial.h> /* For the serial port location and base baud */
5 3
6/* --- CONFIG --- */ 4/* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
121 UART16550_WRITE(OFS_SEND_BUFFER, byte); 119 UART16550_WRITE(OFS_SEND_BUFFER, byte);
122 return 1; 120 return 1;
123} 121}
124
125#endif
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
index ea65223a6d2c..40472f7944d7 100644
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ b/arch/mips/momentum/ocelot_c/irq.c
@@ -94,7 +94,7 @@ void __init arch_init_irq(void)
94 */ 94 */
95 clear_c0_status(ST0_IM); 95 clear_c0_status(ST0_IM);
96 96
97 mips_cpu_irq_init(0); 97 mips_cpu_irq_init();
98 98
99 /* set up the cascading interrupts */ 99 /* set up the cascading interrupts */
100 setup_irq(3, &cascade_fpga); 100 setup_irq(3, &cascade_fpga);
diff --git a/arch/mips/momentum/ocelot_c/platform.c b/arch/mips/momentum/ocelot_c/platform.c
index 6c495b2f1560..fac8b2499387 100644
--- a/arch/mips/momentum/ocelot_c/platform.c
+++ b/arch/mips/momentum/ocelot_c/platform.c
@@ -37,8 +37,6 @@ static struct platform_device mv643xx_eth_shared_device = {
37#define MV64x60_IRQ_ETH_0 48 37#define MV64x60_IRQ_ETH_0 48
38#define MV64x60_IRQ_ETH_1 49 38#define MV64x60_IRQ_ETH_1 49
39 39
40#ifdef CONFIG_MV643XX_ETH_0
41
42static struct resource mv64x60_eth0_resources[] = { 40static struct resource mv64x60_eth0_resources[] = {
43 [0] = { 41 [0] = {
44 .name = "eth0 irq", 42 .name = "eth0 irq",
@@ -71,9 +69,6 @@ static struct platform_device eth0_device = {
71 .platform_data = &eth0_pd, 69 .platform_data = &eth0_pd,
72 }, 70 },
73}; 71};
74#endif /* CONFIG_MV643XX_ETH_0 */
75
76#ifdef CONFIG_MV643XX_ETH_1
77 72
78static struct resource mv64x60_eth1_resources[] = { 73static struct resource mv64x60_eth1_resources[] = {
79 [0] = { 74 [0] = {
@@ -107,16 +102,11 @@ static struct platform_device eth1_device = {
107 .platform_data = &eth1_pd, 102 .platform_data = &eth1_pd,
108 }, 103 },
109}; 104};
110#endif /* CONFIG_MV643XX_ETH_1 */
111 105
112static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { 106static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
113 &mv643xx_eth_shared_device, 107 &mv643xx_eth_shared_device,
114#ifdef CONFIG_MV643XX_ETH_0
115 &eth0_device, 108 &eth0_device,
116#endif
117#ifdef CONFIG_MV643XX_ETH_1
118 &eth1_device, 109 &eth1_device,
119#endif
120 /* The third port is not wired up on the Ocelot C */ 110 /* The third port is not wired up on the Ocelot C */
121}; 111};
122 112
@@ -184,12 +174,8 @@ static int __init mv643xx_eth_add_pds(void)
184 int ret; 174 int ret;
185 175
186 get_mac(mac); 176 get_mac(mac);
187#ifdef CONFIG_MV643XX_ETH_0 177 eth_mac_add(eth0_mac_addr, mac, 0);
188 eth_mac_add(eth1_mac_addr, mac, 0);
189#endif
190#ifdef CONFIG_MV643XX_ETH_1
191 eth_mac_add(eth1_mac_addr, mac, 1); 178 eth_mac_add(eth1_mac_addr, mac, 1);
192#endif
193 ret = platform_add_devices(mv643xx_eth_pd_devs, 179 ret = platform_add_devices(mv643xx_eth_pd_devs,
194 ARRAY_SIZE(mv643xx_eth_pd_devs)); 180 ARRAY_SIZE(mv643xx_eth_pd_devs));
195 181
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c
index d0b77e101d74..b689ceea8cfb 100644
--- a/arch/mips/momentum/ocelot_c/prom.c
+++ b/arch/mips/momentum/ocelot_c/prom.c
@@ -178,7 +178,6 @@ void __init prom_init(void)
178#endif 178#endif
179} 179}
180 180
181unsigned long __init prom_free_prom_memory(void) 181void __init prom_free_prom_memory(void)
182{ 182{
183 return 0;
184} 183}
diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c
index a7a80c0da569..de1a31ee52f3 100644
--- a/arch/mips/momentum/ocelot_c/uart-irq.c
+++ b/arch/mips/momentum/ocelot_c/uart-irq.c
@@ -77,7 +77,7 @@ void ll_uart_irq(void)
77} 77}
78 78
79struct irq_chip uart_irq_type = { 79struct irq_chip uart_irq_type = {
80 .typename = "UART/FPGA", 80 .name = "UART/FPGA",
81 .ack = mask_uart_irq, 81 .ack = mask_uart_irq,
82 .mask = mask_uart_irq, 82 .mask = mask_uart_irq,
83 .mask_ack = mask_uart_irq, 83 .mask_ack = mask_uart_irq,
diff --git a/arch/mips/momentum/ocelot_g/dbg_io.c b/arch/mips/momentum/ocelot_g/dbg_io.c
index 2128684584f5..32d6fb4ee679 100644
--- a/arch/mips/momentum/ocelot_g/dbg_io.c
+++ b/arch/mips/momentum/ocelot_g/dbg_io.c
@@ -1,6 +1,4 @@
1 1
2#ifdef CONFIG_KGDB
3
4#include <asm/serial.h> /* For the serial port location and base baud */ 2#include <asm/serial.h> /* For the serial port location and base baud */
5 3
6/* --- CONFIG --- */ 4/* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
121 UART16550_WRITE(OFS_SEND_BUFFER, byte); 119 UART16550_WRITE(OFS_SEND_BUFFER, byte);
122 return 1; 120 return 1;
123} 121}
124
125#endif
diff --git a/arch/mips/momentum/ocelot_g/irq.c b/arch/mips/momentum/ocelot_g/irq.c
index da46524e87cb..273541fe7087 100644
--- a/arch/mips/momentum/ocelot_g/irq.c
+++ b/arch/mips/momentum/ocelot_g/irq.c
@@ -94,8 +94,8 @@ void __init arch_init_irq(void)
94 clear_c0_status(ST0_IM); 94 clear_c0_status(ST0_IM);
95 local_irq_disable(); 95 local_irq_disable();
96 96
97 mips_cpu_irq_init(0); 97 mips_cpu_irq_init();
98 rm7k_cpu_irq_init(8); 98 rm7k_cpu_irq_init();
99 99
100 gt64240_irq_init(); 100 gt64240_irq_init();
101} 101}
diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c
index 2f75c6b91ec5..836d0830720d 100644
--- a/arch/mips/momentum/ocelot_g/prom.c
+++ b/arch/mips/momentum/ocelot_g/prom.c
@@ -79,7 +79,6 @@ void __init prom_init(void)
79 } 79 }
80} 80}
81 81
82unsigned long __init prom_free_prom_memory(void) 82void __init prom_free_prom_memory(void)
83{ 83{
84 return 0;
85} 84}
diff --git a/arch/mips/oprofile/Kconfig b/arch/mips/oprofile/Kconfig
index 55feaf798596..fb6f235348b0 100644
--- a/arch/mips/oprofile/Kconfig
+++ b/arch/mips/oprofile/Kconfig
@@ -11,7 +11,7 @@ config PROFILING
11 11
12config OPROFILE 12config OPROFILE
13 tristate "OProfile system profiling (EXPERIMENTAL)" 13 tristate "OProfile system profiling (EXPERIMENTAL)"
14 depends on PROFILING && EXPERIMENTAL 14 depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL
15 help 15 help
16 OProfile is a profiling system capable of profiling the 16 OProfile is a profiling system capable of profiling the
17 whole system, include the kernel, kernel modules, libraries, 17 whole system, include the kernel, kernel modules, libraries,
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index 82b20c28bef8..bf85995ca042 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the PCI specific kernel interface routines under Linux. 2# Makefile for the PCI specific kernel interface routines under Linux.
3# 3#
4 4
5obj-y += pci.o 5obj-y += pci.o pci-dac.o
6 6
7# 7#
8# PCI bus host bridge specific code 8# PCI bus host bridge specific code
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index a176f2ca8656..0c9a4732d455 100644
--- a/arch/mips/pci/fixup-sni.c
+++ b/arch/mips/pci/fixup-sni.c
@@ -15,7 +15,7 @@
15#include <asm/sni.h> 15#include <asm/sni.h>
16 16
17/* 17/*
18 * Shortcuts ... 18 * PCIMT Shortcuts ...
19 */ 19 */
20#define SCSI PCIMT_IRQ_SCSI 20#define SCSI PCIMT_IRQ_SCSI
21#define ETH PCIMT_IRQ_ETHERNET 21#define ETH PCIMT_IRQ_ETHERNET
@@ -67,6 +67,50 @@ static char irq_tab_rm300d[8][5] __initdata = {
67 { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ 67 { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */
68}; 68};
69 69
70static char irq_tab_rm300e[5][5] __initdata = {
71 /* INTA INTB INTC INTD */
72 { 0, 0, 0, 0, 0 }, /* HOST bridge */
73 { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */
74 { 0, INTC, INTD, INTA, INTB }, /* Bridge/i960 */
75 { 0, INTD, INTA, INTB, INTC }, /* Slot 1 */
76 { 0, INTA, INTB, INTC, INTD }, /* Slot 2 */
77};
78#undef SCSI
79#undef ETH
80#undef INTA
81#undef INTB
82#undef INTC
83#undef INTD
84
85
86/*
87 * PCIT Shortcuts ...
88 */
89#define SCSI0 PCIT_IRQ_SCSI0
90#define SCSI1 PCIT_IRQ_SCSI1
91#define ETH PCIT_IRQ_ETHERNET
92#define INTA PCIT_IRQ_INTA
93#define INTB PCIT_IRQ_INTB
94#define INTC PCIT_IRQ_INTC
95#define INTD PCIT_IRQ_INTD
96
97static char irq_tab_pcit[13][5] __initdata = {
98 /* INTA INTB INTC INTD */
99 { 0, 0, 0, 0, 0 }, /* HOST bridge */
100 { SCSI0, SCSI0, SCSI0, SCSI0, SCSI0 }, /* SCSI */
101 { SCSI1, SCSI1, SCSI1, SCSI1, SCSI1 }, /* SCSI */
102 { ETH, ETH, ETH, ETH, ETH }, /* Ethernet */
103 { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */
104 { 0, 0, 0, 0, 0 }, /* Unused */
105 { 0, 0, 0, 0, 0 }, /* Unused */
106 { 0, 0, 0, 0, 0 }, /* Unused */
107 { 0, INTA, INTB, INTC, INTD }, /* Slot 1 */
108 { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */
109 { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */
110 { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */
111 { 0, INTA, INTB, INTC, INTD }, /* Slot 5 */
112};
113
70static inline int is_rm300_revd(void) 114static inline int is_rm300_revd(void)
71{ 115{
72 unsigned char csmsr = *(volatile unsigned char *)PCIMT_CSMSR; 116 unsigned char csmsr = *(volatile unsigned char *)PCIMT_CSMSR;
@@ -76,10 +120,24 @@ static inline int is_rm300_revd(void)
76 120
77int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 121int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
78{ 122{
79 if (is_rm300_revd()) 123 switch (sni_brd_type) {
80 return irq_tab_rm300d[slot][pin]; 124 case SNI_BRD_PCI_TOWER:
125 case SNI_BRD_PCI_TOWER_CPLUS:
126 return irq_tab_pcit[slot][pin];
127
128 case SNI_BRD_PCI_MTOWER:
129 if (is_rm300_revd())
130 return irq_tab_rm300d[slot][pin];
131 /* fall through */
81 132
82 return irq_tab_rm200[slot][pin]; 133 case SNI_BRD_PCI_DESKTOP:
134 return irq_tab_rm200[slot][pin];
135
136 case SNI_BRD_PCI_MTOWER_CPLUS:
137 return irq_tab_rm300e[slot][pin];
138 }
139
140 return 0;
83} 141}
84 142
85/* Do platform specific device initialization at pci_enable_device() time */ 143/* Do platform specific device initialization at pci_enable_device() time */
diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c
index 597b89764ba1..a8d9d22b13df 100644
--- a/arch/mips/pci/fixup-vr4133.c
+++ b/arch/mips/pci/fixup-vr4133.c
@@ -17,8 +17,10 @@
17 */ 17 */
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/kernel.h>
20 21
21#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/i8259.h>
22#include <asm/vr41xx/cmbvr4133.h> 24#include <asm/vr41xx/cmbvr4133.h>
23 25
24extern int vr4133_rockhopper; 26extern int vr4133_rockhopper;
@@ -142,7 +144,7 @@ int rockhopper_get_irq(struct pci_dev *dev, u8 pin, u8 slot)
142 if (bus == NULL) 144 if (bus == NULL)
143 return -1; 145 return -1;
144 146
145 for (i = 0; i < sizeof (int_map) / sizeof (int_map[0]); i++) { 147 for (i = 0; i < ARRAY_SIZE(int_map); i++) {
146 if (int_map[i].bus == bus->number && int_map[i].slot == slot) { 148 if (int_map[i].bus == bus->number && int_map[i].slot == slot) {
147 int line; 149 int line;
148 for (line = 0; line < 4; line++) 150 for (line = 0; line < 4; line++)
@@ -160,17 +162,7 @@ int rockhopper_get_irq(struct pci_dev *dev, u8 pin, u8 slot)
160#ifdef CONFIG_ROCKHOPPER 162#ifdef CONFIG_ROCKHOPPER
161void i8259_init(void) 163void i8259_init(void)
162{ 164{
163 outb(0x11, 0x20); /* Master ICW1 */ 165 init_i8259_irqs();
164 outb(I8259_IRQ_BASE, 0x21); /* Master ICW2 */
165 outb(0x04, 0x21); /* Master ICW3 */
166 outb(0x01, 0x21); /* Master ICW4 */
167 outb(0xff, 0x21); /* Master IMW */
168
169 outb(0x11, 0xa0); /* Slave ICW1 */
170 outb(I8259_IRQ_BASE + 8, 0xa1); /* Slave ICW2 */
171 outb(0x02, 0xa1); /* Slave ICW3 */
172 outb(0x01, 0xa1); /* Slave ICW4 */
173 outb(0xff, 0xa1); /* Slave IMW */
174 166
175 outb(0x00, 0x4d0); 167 outb(0x00, 0x4d0);
176 outb(0x02, 0x4d1); /* USB IRQ9 is level */ 168 outb(0x02, 0x4d1); /* USB IRQ9 is level */
diff --git a/arch/mips/pci/ops-sni.c b/arch/mips/pci/ops-sni.c
index 2b0ccd6d9dcd..fa2d2c60f797 100644
--- a/arch/mips/pci/ops-sni.c
+++ b/arch/mips/pci/ops-sni.c
@@ -83,7 +83,82 @@ static int pcimt_write(struct pci_bus *bus, unsigned int devfn, int reg,
83 return 0; 83 return 0;
84} 84}
85 85
86struct pci_ops sni_pci_ops = { 86struct pci_ops sni_pcimt_ops = {
87 .read = pcimt_read, 87 .read = pcimt_read,
88 .write = pcimt_write, 88 .write = pcimt_write,
89}; 89};
90
91static int pcit_set_config_address(unsigned int busno, unsigned int devfn, int reg)
92{
93 if ((devfn > 255) || (reg > 255) || (busno > 255))
94 return PCIBIOS_BAD_REGISTER_NUMBER;
95
96 outl ((1 << 31) | ((busno & 0xff) << 16) | ((devfn & 0xff) << 8) | (reg & 0xfc), 0xcf8);
97 return PCIBIOS_SUCCESSFUL;
98}
99
100static int pcit_read(struct pci_bus *bus, unsigned int devfn, int reg,
101 int size, u32 * val)
102{
103 int res;
104
105 /*
106 * on bus 0 we need to check, whether there is a device answering
107 * for the devfn by doing a config write and checking the result. If
108 * we don't do it, we will get a data bus error
109 */
110 if (bus->number == 0) {
111 pcit_set_config_address (0, 0, 0x68);
112 outl (inl (0xcfc) | 0xc0000000, 0xcfc);
113 if ((res = pcit_set_config_address(0, devfn, 0)))
114 return res;
115 outl (0xffffffff, 0xcfc);
116 pcit_set_config_address (0, 0, 0x68);
117 if (inl(0xcfc) & 0x100000)
118 return PCIBIOS_DEVICE_NOT_FOUND;
119 }
120 if ((res = pcit_set_config_address(bus->number, devfn, reg)))
121 return res;
122
123 switch (size) {
124 case 1:
125 *val = inb(PCIMT_CONFIG_DATA + (reg & 3));
126 break;
127 case 2:
128 *val = inw(PCIMT_CONFIG_DATA + (reg & 2));
129 break;
130 case 4:
131 *val = inl(PCIMT_CONFIG_DATA);
132 break;
133 }
134 return 0;
135}
136
137static int pcit_write(struct pci_bus *bus, unsigned int devfn, int reg,
138 int size, u32 val)
139{
140 int res;
141
142 if ((res = pcit_set_config_address(bus->number, devfn, reg)))
143 return res;
144
145 switch (size) {
146 case 1:
147 outb (val, PCIMT_CONFIG_DATA + (reg & 3));
148 break;
149 case 2:
150 outw (val, PCIMT_CONFIG_DATA + (reg & 2));
151 break;
152 case 4:
153 outl (val, PCIMT_CONFIG_DATA);
154 break;
155 }
156
157 return 0;
158}
159
160
161struct pci_ops sni_pcit_ops = {
162 .read = pcit_read,
163 .write = pcit_write,
164};
diff --git a/arch/mips/pci/pci-dac.c b/arch/mips/pci/pci-dac.c
new file mode 100644
index 000000000000..0f0ea1b7d4dd
--- /dev/null
+++ b/arch/mips/pci/pci-dac.c
@@ -0,0 +1,79 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
7 * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */
10
11#include <linux/types.h>
12#include <linux/dma-mapping.h>
13#include <linux/mm.h>
14#include <linux/module.h>
15#include <linux/string.h>
16
17#include <asm/cache.h>
18#include <asm/io.h>
19
20#include <dma-coherence.h>
21
22#include <linux/pci.h>
23
24dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev,
25 struct page *page, unsigned long offset, int direction)
26{
27 struct device *dev = &pdev->dev;
28
29 BUG_ON(direction == DMA_NONE);
30
31 if (!plat_device_is_coherent(dev)) {
32 unsigned long addr;
33
34 addr = (unsigned long) page_address(page) + offset;
35 dma_cache_wback_inv(addr, PAGE_SIZE);
36 }
37
38 return plat_map_dma_mem_page(dev, page) + offset;
39}
40
41EXPORT_SYMBOL(pci_dac_page_to_dma);
42
43struct page *pci_dac_dma_to_page(struct pci_dev *pdev,
44 dma64_addr_t dma_addr)
45{
46 return pfn_to_page(plat_dma_addr_to_phys(dma_addr) >> PAGE_SHIFT);
47}
48
49EXPORT_SYMBOL(pci_dac_dma_to_page);
50
51unsigned long pci_dac_dma_to_offset(struct pci_dev *pdev,
52 dma64_addr_t dma_addr)
53{
54 return dma_addr & ~PAGE_MASK;
55}
56
57EXPORT_SYMBOL(pci_dac_dma_to_offset);
58
59void pci_dac_dma_sync_single_for_cpu(struct pci_dev *pdev,
60 dma64_addr_t dma_addr, size_t len, int direction)
61{
62 BUG_ON(direction == PCI_DMA_NONE);
63
64 if (!plat_device_is_coherent(&pdev->dev))
65 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
66}
67
68EXPORT_SYMBOL(pci_dac_dma_sync_single_for_cpu);
69
70void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev,
71 dma64_addr_t dma_addr, size_t len, int direction)
72{
73 BUG_ON(direction == PCI_DMA_NONE);
74
75 if (!plat_device_is_coherent(&pdev->dev))
76 dma_cache_wback_inv(dma_addr + PAGE_OFFSET, len);
77}
78
79EXPORT_SYMBOL(pci_dac_dma_sync_single_for_device);
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 5ace368657ad..697a7e48cb8d 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -79,6 +79,14 @@ void __init register_pci_controller(struct pci_controller *hose)
79{ 79{
80 *hose_tail = hose; 80 *hose_tail = hose;
81 hose_tail = &hose->next; 81 hose_tail = &hose->next;
82
83 /*
84 * Do not panic here but later - this might hapen before console init.
85 */
86 if (!hose->io_map_base) {
87 printk(KERN_WARNING
88 "registering PCI controller with io_map_base unset\n");
89 }
82} 90}
83 91
84/* Most MIPS systems have straight-forward swizzling needs. */ 92/* Most MIPS systems have straight-forward swizzling needs. */
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index 2c36c108c4d6..d48665ebd33c 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -159,7 +159,7 @@ int pnx8550_set_gic_priority(int irq, int priority)
159} 159}
160 160
161static struct irq_chip level_irq_type = { 161static struct irq_chip level_irq_type = {
162 .typename = "PNX Level IRQ", 162 .name = "PNX Level IRQ",
163 .ack = mask_irq, 163 .ack = mask_irq,
164 .mask = mask_irq, 164 .mask = mask_irq,
165 .mask_ack = mask_irq, 165 .mask_ack = mask_irq,
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c
index 72a016767e09..3f097558ef13 100644
--- a/arch/mips/philips/pnx8550/common/proc.c
+++ b/arch/mips/philips/pnx8550/common/proc.c
@@ -79,10 +79,7 @@ static int pnx8550_proc_init( void )
79 79
80 // Create /proc/pnx8550 80 // Create /proc/pnx8550
81 pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); 81 pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL);
82 if (pnx8550_dir){ 82 if (!pnx8550_dir) {
83 pnx8550_dir->nlink = 1;
84 }
85 else {
86 printk(KERN_ERR "Can't create pnx8550 proc dir\n"); 83 printk(KERN_ERR "Can't create pnx8550 proc dir\n");
87 return -1; 84 return -1;
88 } 85 }
@@ -90,7 +87,6 @@ static int pnx8550_proc_init( void )
90 // Create /proc/pnx8550/timers 87 // Create /proc/pnx8550/timers
91 pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); 88 pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir );
92 if (pnx8550_timers){ 89 if (pnx8550_timers){
93 pnx8550_timers->nlink = 1;
94 pnx8550_timers->read_proc = pnx8550_timers_read; 90 pnx8550_timers->read_proc = pnx8550_timers_read;
95 } 91 }
96 else { 92 else {
@@ -100,7 +96,6 @@ static int pnx8550_proc_init( void )
100 // Create /proc/pnx8550/registers 96 // Create /proc/pnx8550/registers
101 pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); 97 pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir );
102 if (pnx8550_registers){ 98 if (pnx8550_registers){
103 pnx8550_registers->nlink = 1;
104 pnx8550_registers->read_proc = pnx8550_registers_read; 99 pnx8550_registers->read_proc = pnx8550_registers_read;
105 } 100 }
106 else { 101 else {
diff --git a/arch/mips/philips/pnx8550/common/prom.c b/arch/mips/philips/pnx8550/common/prom.c
index eb6ec11fef07..8aeed6c2b8c3 100644
--- a/arch/mips/philips/pnx8550/common/prom.c
+++ b/arch/mips/philips/pnx8550/common/prom.c
@@ -106,9 +106,8 @@ int get_ethernet_addr(char *ethernet_addr)
106 return 0; 106 return 0;
107} 107}
108 108
109unsigned long __init prom_free_prom_memory(void) 109void __init prom_free_prom_memory(void)
110{ 110{
111 return 0;
112} 111}
113 112
114extern int pnx8550_console_port; 113extern int pnx8550_console_port;
diff --git a/arch/mips/pmc-sierra/yosemite/dbg_io.c b/arch/mips/pmc-sierra/yosemite/dbg_io.c
index 0f659c9106ac..6362c702e389 100644
--- a/arch/mips/pmc-sierra/yosemite/dbg_io.c
+++ b/arch/mips/pmc-sierra/yosemite/dbg_io.c
@@ -93,7 +93,7 @@
93 * Functions to READ and WRITE to serial port 1 93 * Functions to READ and WRITE to serial port 1
94 */ 94 */
95#define SERIAL_READ_1(ofs) (*((volatile unsigned char*) \ 95#define SERIAL_READ_1(ofs) (*((volatile unsigned char*) \
96 (TITAN_SERIAL_BASE_1 + ofs) 96 (TITAN_SERIAL_BASE_1 + ofs)))
97 97
98#define SERIAL_WRITE_1(ofs, val) ((*((volatile unsigned char*) \ 98#define SERIAL_WRITE_1(ofs, val) ((*((volatile unsigned char*) \
99 (TITAN_SERIAL_BASE_1 + ofs))) = val) 99 (TITAN_SERIAL_BASE_1 + ofs))) = val)
diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c
index adb048527e76..428d1f45a287 100644
--- a/arch/mips/pmc-sierra/yosemite/irq.c
+++ b/arch/mips/pmc-sierra/yosemite/irq.c
@@ -148,9 +148,9 @@ void __init arch_init_irq(void)
148{ 148{
149 clear_c0_status(ST0_IM); 149 clear_c0_status(ST0_IM);
150 150
151 mips_cpu_irq_init(0); 151 mips_cpu_irq_init();
152 rm7k_cpu_irq_init(8); 152 rm7k_cpu_irq_init();
153 rm9k_cpu_irq_init(12); 153 rm9k_cpu_irq_init();
154 154
155#ifdef CONFIG_KGDB 155#ifdef CONFIG_KGDB
156 /* At this point, initialize the second serial port */ 156 /* At this point, initialize the second serial port */
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c
index 9fe4973377c3..1e1685e415a4 100644
--- a/arch/mips/pmc-sierra/yosemite/prom.c
+++ b/arch/mips/pmc-sierra/yosemite/prom.c
@@ -132,9 +132,8 @@ void __init prom_init(void)
132 prom_grab_secondary(); 132 prom_grab_secondary();
133} 133}
134 134
135unsigned long __init prom_free_prom_memory(void) 135void __init prom_free_prom_memory(void)
136{ 136{
137 return 0;
138} 137}
139 138
140void __init prom_fixup_mem_map(unsigned long start, unsigned long end) 139void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 1b9b0d396d3e..6a6e15e40009 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -171,6 +171,7 @@ static void __init py_map_ocd(void)
171 171
172static void __init py_uart_setup(void) 172static void __init py_uart_setup(void)
173{ 173{
174#ifdef CONFIG_SERIAL_8250
174 struct uart_port up; 175 struct uart_port up;
175 176
176 /* 177 /*
@@ -188,6 +189,7 @@ static void __init py_uart_setup(void)
188 189
189 if (early_serial_setup(&up)) 190 if (early_serial_setup(&up))
190 printk(KERN_ERR "Early serial init of port 0 failed\n"); 191 printk(KERN_ERR "Early serial init of port 0 failed\n");
192#endif /* CONFIG_SERIAL_8250 */
191} 193}
192 194
193static void __init py_rtc_setup(void) 195static void __init py_rtc_setup(void)
diff --git a/arch/mips/qemu/q-mem.c b/arch/mips/qemu/q-mem.c
index d174fac43031..dae39b59de15 100644
--- a/arch/mips/qemu/q-mem.c
+++ b/arch/mips/qemu/q-mem.c
@@ -1,6 +1,5 @@
1#include <linux/init.h> 1#include <linux/init.h>
2 2
3unsigned long __init prom_free_prom_memory(void) 3void __init prom_free_prom_memory(void)
4{ 4{
5 return 0UL;
6} 5}
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c
index a1a9af6da7bf..6b6e97b90c6e 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -139,7 +139,7 @@ static void end_eisa1_irq(unsigned int irq)
139} 139}
140 140
141static struct irq_chip ip22_eisa1_irq_type = { 141static struct irq_chip ip22_eisa1_irq_type = {
142 .typename = "IP22 EISA", 142 .name = "IP22 EISA",
143 .startup = startup_eisa1_irq, 143 .startup = startup_eisa1_irq,
144 .ack = mask_and_ack_eisa1_irq, 144 .ack = mask_and_ack_eisa1_irq,
145 .mask = disable_eisa1_irq, 145 .mask = disable_eisa1_irq,
@@ -194,7 +194,7 @@ static void end_eisa2_irq(unsigned int irq)
194} 194}
195 195
196static struct irq_chip ip22_eisa2_irq_type = { 196static struct irq_chip ip22_eisa2_irq_type = {
197 .typename = "IP22 EISA", 197 .name = "IP22 EISA",
198 .startup = startup_eisa2_irq, 198 .startup = startup_eisa2_irq,
199 .ack = mask_and_ack_eisa2_irq, 199 .ack = mask_and_ack_eisa2_irq,
200 .mask = disable_eisa2_irq, 200 .mask = disable_eisa2_irq,
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index c44f8be0644f..b454924aeb56 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -19,6 +19,7 @@
19 19
20#include <asm/mipsregs.h> 20#include <asm/mipsregs.h>
21#include <asm/addrspace.h> 21#include <asm/addrspace.h>
22#include <asm/irq_cpu.h>
22 23
23#include <asm/sgi/ioc.h> 24#include <asm/sgi/ioc.h>
24#include <asm/sgi/hpc3.h> 25#include <asm/sgi/hpc3.h>
@@ -52,7 +53,7 @@ static void disable_local0_irq(unsigned int irq)
52} 53}
53 54
54static struct irq_chip ip22_local0_irq_type = { 55static struct irq_chip ip22_local0_irq_type = {
55 .typename = "IP22 local 0", 56 .name = "IP22 local 0",
56 .ack = disable_local0_irq, 57 .ack = disable_local0_irq,
57 .mask = disable_local0_irq, 58 .mask = disable_local0_irq,
58 .mask_ack = disable_local0_irq, 59 .mask_ack = disable_local0_irq,
@@ -73,7 +74,7 @@ void disable_local1_irq(unsigned int irq)
73} 74}
74 75
75static struct irq_chip ip22_local1_irq_type = { 76static struct irq_chip ip22_local1_irq_type = {
76 .typename = "IP22 local 1", 77 .name = "IP22 local 1",
77 .ack = disable_local1_irq, 78 .ack = disable_local1_irq,
78 .mask = disable_local1_irq, 79 .mask = disable_local1_irq,
79 .mask_ack = disable_local1_irq, 80 .mask_ack = disable_local1_irq,
@@ -94,7 +95,7 @@ void disable_local2_irq(unsigned int irq)
94} 95}
95 96
96static struct irq_chip ip22_local2_irq_type = { 97static struct irq_chip ip22_local2_irq_type = {
97 .typename = "IP22 local 2", 98 .name = "IP22 local 2",
98 .ack = disable_local2_irq, 99 .ack = disable_local2_irq,
99 .mask = disable_local2_irq, 100 .mask = disable_local2_irq,
100 .mask_ack = disable_local2_irq, 101 .mask_ack = disable_local2_irq,
@@ -115,7 +116,7 @@ void disable_local3_irq(unsigned int irq)
115} 116}
116 117
117static struct irq_chip ip22_local3_irq_type = { 118static struct irq_chip ip22_local3_irq_type = {
118 .typename = "IP22 local 3", 119 .name = "IP22 local 3",
119 .ack = disable_local3_irq, 120 .ack = disable_local3_irq,
120 .mask = disable_local3_irq, 121 .mask = disable_local3_irq,
121 .mask_ack = disable_local3_irq, 122 .mask_ack = disable_local3_irq,
@@ -253,8 +254,6 @@ asmlinkage void plat_irq_dispatch(void)
253 indy_8254timer_irq(); 254 indy_8254timer_irq();
254} 255}
255 256
256extern void mips_cpu_irq_init(unsigned int irq_base);
257
258void __init arch_init_irq(void) 257void __init arch_init_irq(void)
259{ 258{
260 int i; 259 int i;
@@ -316,7 +315,7 @@ void __init arch_init_irq(void)
316 sgint->cmeimask1 = 0; 315 sgint->cmeimask1 = 0;
317 316
318 /* init CPU irqs */ 317 /* init CPU irqs */
319 mips_cpu_irq_init(SGINT_CPU); 318 mips_cpu_irq_init();
320 319
321 for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) { 320 for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
322 struct irq_chip *handler; 321 struct irq_chip *handler;
diff --git a/arch/mips/sgi-ip22/ip22-mc.c b/arch/mips/sgi-ip22/ip22-mc.c
index b58bd522262b..ddb6506d8341 100644
--- a/arch/mips/sgi-ip22/ip22-mc.c
+++ b/arch/mips/sgi-ip22/ip22-mc.c
@@ -202,7 +202,6 @@ void __init sgimc_init(void)
202} 202}
203 203
204void __init prom_meminit(void) {} 204void __init prom_meminit(void) {}
205unsigned long __init prom_free_prom_memory(void) 205void __init prom_free_prom_memory(void)
206{ 206{
207 return 0;
208} 207}
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index 319f8803ef6f..60ade7690e09 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -333,7 +333,7 @@ static inline void disable_bridge_irq(unsigned int irq)
333} 333}
334 334
335static struct irq_chip bridge_irq_type = { 335static struct irq_chip bridge_irq_type = {
336 .typename = "bridge", 336 .name = "bridge",
337 .startup = startup_bridge_irq, 337 .startup = startup_bridge_irq,
338 .shutdown = shutdown_bridge_irq, 338 .shutdown = shutdown_bridge_irq,
339 .ack = disable_bridge_irq, 339 .ack = disable_bridge_irq,
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 16e5682b01f1..fe8a1066aec1 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -21,6 +21,7 @@
21#include <linux/pfn.h> 21#include <linux/pfn.h>
22#include <linux/highmem.h> 22#include <linux/highmem.h>
23#include <asm/page.h> 23#include <asm/page.h>
24#include <asm/pgalloc.h>
24#include <asm/sections.h> 25#include <asm/sections.h>
25 26
26#include <asm/sn/arch.h> 27#include <asm/sn/arch.h>
@@ -498,13 +499,11 @@ void __init prom_meminit(void)
498 } 499 }
499} 500}
500 501
501unsigned long __init prom_free_prom_memory(void) 502void __init prom_free_prom_memory(void)
502{ 503{
503 /* We got nothing to free here ... */ 504 /* We got nothing to free here ... */
504 return 0;
505} 505}
506 506
507extern void pagetable_init(void);
508extern unsigned long setup_zero_pages(void); 507extern unsigned long setup_zero_pages(void);
509 508
510void __init paging_init(void) 509void __init paging_init(void)
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index c20e9899b34b..8c3c78c63ccd 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -181,7 +181,7 @@ static void disable_rt_irq(unsigned int irq)
181} 181}
182 182
183static struct irq_chip rt_irq_type = { 183static struct irq_chip rt_irq_type = {
184 .typename = "SN HUB RT timer", 184 .name = "SN HUB RT timer",
185 .ack = disable_rt_irq, 185 .ack = disable_rt_irq,
186 .mask = disable_rt_irq, 186 .mask = disable_rt_irq,
187 .mask_ack = disable_rt_irq, 187 .mask_ack = disable_rt_irq,
@@ -190,7 +190,7 @@ static struct irq_chip rt_irq_type = {
190}; 190};
191 191
192static struct irqaction rt_irqaction = { 192static struct irqaction rt_irqaction = {
193 .handler = ip27_rt_timer_interrupt, 193 .handler = (irq_handler_t) ip27_rt_timer_interrupt,
194 .flags = IRQF_DISABLED, 194 .flags = IRQF_DISABLED,
195 .mask = CPU_MASK_NONE, 195 .mask = CPU_MASK_NONE,
196 .name = "timer" 196 .name = "timer"
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index ae063864c026..8c450d9e8696 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -144,7 +144,7 @@ static void end_cpu_irq(unsigned int irq)
144} 144}
145 145
146static struct irq_chip ip32_cpu_interrupt = { 146static struct irq_chip ip32_cpu_interrupt = {
147 .typename = "IP32 CPU", 147 .name = "IP32 CPU",
148 .ack = disable_cpu_irq, 148 .ack = disable_cpu_irq,
149 .mask = disable_cpu_irq, 149 .mask = disable_cpu_irq,
150 .mask_ack = disable_cpu_irq, 150 .mask_ack = disable_cpu_irq,
@@ -193,7 +193,7 @@ static void end_crime_irq(unsigned int irq)
193} 193}
194 194
195static struct irq_chip ip32_crime_interrupt = { 195static struct irq_chip ip32_crime_interrupt = {
196 .typename = "IP32 CRIME", 196 .name = "IP32 CRIME",
197 .ack = mask_and_ack_crime_irq, 197 .ack = mask_and_ack_crime_irq,
198 .mask = disable_crime_irq, 198 .mask = disable_crime_irq,
199 .mask_ack = mask_and_ack_crime_irq, 199 .mask_ack = mask_and_ack_crime_irq,
@@ -234,7 +234,7 @@ static void end_macepci_irq(unsigned int irq)
234} 234}
235 235
236static struct irq_chip ip32_macepci_interrupt = { 236static struct irq_chip ip32_macepci_interrupt = {
237 .typename = "IP32 MACE PCI", 237 .name = "IP32 MACE PCI",
238 .ack = disable_macepci_irq, 238 .ack = disable_macepci_irq,
239 .mask = disable_macepci_irq, 239 .mask = disable_macepci_irq,
240 .mask_ack = disable_macepci_irq, 240 .mask_ack = disable_macepci_irq,
@@ -347,7 +347,7 @@ static void end_maceisa_irq(unsigned irq)
347} 347}
348 348
349static struct irq_chip ip32_maceisa_interrupt = { 349static struct irq_chip ip32_maceisa_interrupt = {
350 .typename = "IP32 MACE ISA", 350 .name = "IP32 MACE ISA",
351 .ack = mask_and_ack_maceisa_irq, 351 .ack = mask_and_ack_maceisa_irq,
352 .mask = disable_maceisa_irq, 352 .mask = disable_maceisa_irq,
353 .mask_ack = mask_and_ack_maceisa_irq, 353 .mask_ack = mask_and_ack_maceisa_irq,
@@ -379,7 +379,7 @@ static void end_mace_irq(unsigned int irq)
379} 379}
380 380
381static struct irq_chip ip32_mace_interrupt = { 381static struct irq_chip ip32_mace_interrupt = {
382 .typename = "IP32 MACE", 382 .name = "IP32 MACE",
383 .ack = disable_mace_irq, 383 .ack = disable_mace_irq,
384 .mask = disable_mace_irq, 384 .mask = disable_mace_irq,
385 .mask_ack = disable_mace_irq, 385 .mask_ack = disable_mace_irq,
diff --git a/arch/mips/sgi-ip32/ip32-memory.c b/arch/mips/sgi-ip32/ip32-memory.c
index d37d40a3cdae..849d392a0013 100644
--- a/arch/mips/sgi-ip32/ip32-memory.c
+++ b/arch/mips/sgi-ip32/ip32-memory.c
@@ -43,7 +43,6 @@ void __init prom_meminit (void)
43} 43}
44 44
45 45
46unsigned long __init prom_free_prom_memory (void) 46void __init prom_free_prom_memory(void)
47{ 47{
48 return 0;
49} 48}
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 2e8f6b2e2420..1dc5d05d8962 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -82,7 +82,7 @@ extern char sb1250_duart_present[];
82#endif 82#endif
83 83
84static struct irq_chip bcm1480_irq_type = { 84static struct irq_chip bcm1480_irq_type = {
85 .typename = "BCM1480-IMR", 85 .name = "BCM1480-IMR",
86 .ack = ack_bcm1480_irq, 86 .ack = ack_bcm1480_irq,
87 .mask = disable_bcm1480_irq, 87 .mask = disable_bcm1480_irq,
88 .mask_ack = ack_bcm1480_irq, 88 .mask_ack = ack_bcm1480_irq,
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c
index 6e8952da6e2a..9e6099e69622 100644
--- a/arch/mips/sibyte/cfe/setup.c
+++ b/arch/mips/sibyte/cfe/setup.c
@@ -343,10 +343,9 @@ void __init prom_init(void)
343 prom_meminit(); 343 prom_meminit();
344} 344}
345 345
346unsigned long __init prom_free_prom_memory(void) 346void __init prom_free_prom_memory(void)
347{ 347{
348 /* Not sure what I'm supposed to do here. Nothing, I think */ 348 /* Not sure what I'm supposed to do here. Nothing, I think */
349 return 0;
350} 349}
351 350
352void prom_putchar(char c) 351void prom_putchar(char c)
diff --git a/arch/mips/sibyte/sb1250/bcm1250_tbprof.c b/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
index d1a906e683b2..212547c57310 100644
--- a/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
+++ b/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
@@ -374,7 +374,7 @@ static long sbprof_tb_ioctl(struct file *filp,
374 return error; 374 return error;
375} 375}
376 376
377static struct file_operations sbprof_tb_fops = { 377static const struct file_operations sbprof_tb_fops = {
378 .owner = THIS_MODULE, 378 .owner = THIS_MODULE,
379 .open = sbprof_tb_open, 379 .open = sbprof_tb_open,
380 .release = sbprof_tb_release, 380 .release = sbprof_tb_release,
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 82ce7533053f..148239446e6e 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -67,7 +67,7 @@ extern char sb1250_duart_present[];
67#endif 67#endif
68 68
69static struct irq_chip sb1250_irq_type = { 69static struct irq_chip sb1250_irq_type = {
70 .typename = "SB1250-IMR", 70 .name = "SB1250-IMR",
71 .ack = ack_sb1250_irq, 71 .ack = ack_sb1250_irq,
72 .mask = disable_sb1250_irq, 72 .mask = disable_sb1250_irq,
73 .mask_ack = ack_sb1250_irq, 73 .mask_ack = ack_sb1250_irq,
diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c
index 3c33a4517bc3..257c4e674353 100644
--- a/arch/mips/sibyte/sb1250/prom.c
+++ b/arch/mips/sibyte/sb1250/prom.c
@@ -87,10 +87,9 @@ void __init prom_init(void)
87 prom_meminit(); 87 prom_meminit();
88} 88}
89 89
90unsigned long __init prom_free_prom_memory(void) 90void __init prom_free_prom_memory(void)
91{ 91{
92 /* Not sure what I'm supposed to do here. Nothing, I think */ 92 /* Not sure what I'm supposed to do here. Nothing, I think */
93 return 0;
94} 93}
95 94
96void prom_putchar(char c) 95void prom_putchar(char c)
diff --git a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile
index a5eb0adb87c7..e30809a92151 100644
--- a/arch/mips/sni/Makefile
+++ b/arch/mips/sni/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the SNI specific part of the kernel 2# Makefile for the SNI specific part of the kernel
3# 3#
4 4
5obj-y += irq.o pcimt_scache.o reset.o setup.o 5obj-y += irq.o reset.o setup.o ds1216.o a20r.o rm200.o pcimt.o pcit.o time.o
6obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o 6obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o
7 7
8EXTRA_AFLAGS := $(CFLAGS) 8EXTRA_AFLAGS := $(CFLAGS)
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
new file mode 100644
index 000000000000..31ab80f1befa
--- /dev/null
+++ b/arch/mips/sni/a20r.c
@@ -0,0 +1,227 @@
1/*
2 * A20R specific code
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
9 */
10
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/platform_device.h>
14#include <linux/serial_8250.h>
15
16#include <asm/sni.h>
17#include <asm/time.h>
18#include <asm/ds1216.h>
19
20#define PORT(_base,_irq) \
21 { \
22 .iobase = _base, \
23 .irq = _irq, \
24 .uartclk = 1843200, \
25 .iotype = UPIO_PORT, \
26 .flags = UPF_BOOT_AUTOCONF, \
27 }
28
29static struct plat_serial8250_port a20r_data[] = {
30 PORT(0x3f8, 4),
31 PORT(0x2f8, 3),
32 { },
33};
34
35static struct platform_device a20r_serial8250_device = {
36 .name = "serial8250",
37 .id = PLAT8250_DEV_PLATFORM,
38 .dev = {
39 .platform_data = a20r_data,
40 },
41};
42
43static struct resource snirm_82596_rsrc[] = {
44 {
45 .start = 0xb8000000,
46 .end = 0xb8000004,
47 .flags = IORESOURCE_MEM
48 },
49 {
50 .start = 0xb8010000,
51 .end = 0xb8010004,
52 .flags = IORESOURCE_MEM
53 },
54 {
55 .start = 0xbff00000,
56 .end = 0xbff00020,
57 .flags = IORESOURCE_MEM
58 },
59 {
60 .start = 22,
61 .end = 22,
62 .flags = IORESOURCE_IRQ
63 },
64 {
65 .flags = 0x01 /* 16bit mpu port access */
66 }
67};
68
69static struct platform_device snirm_82596_pdev = {
70 .name = "snirm_82596",
71 .num_resources = ARRAY_SIZE(snirm_82596_rsrc),
72 .resource = snirm_82596_rsrc
73};
74
75static struct resource snirm_53c710_rsrc[] = {
76 {
77 .start = 0xb9000000,
78 .end = 0xb90fffff,
79 .flags = IORESOURCE_MEM
80 },
81 {
82 .start = 19,
83 .end = 19,
84 .flags = IORESOURCE_IRQ
85 }
86};
87
88static struct platform_device snirm_53c710_pdev = {
89 .name = "snirm_53c710",
90 .num_resources = ARRAY_SIZE(snirm_53c710_rsrc),
91 .resource = snirm_53c710_rsrc
92};
93
94static struct resource sc26xx_rsrc[] = {
95 {
96 .start = 0xbc070000,
97 .end = 0xbc0700ff,
98 .flags = IORESOURCE_MEM
99 },
100 {
101 .start = 20,
102 .end = 20,
103 .flags = IORESOURCE_IRQ
104 }
105};
106
107static struct platform_device sc26xx_pdev = {
108 .name = "SC26xx",
109 .num_resources = ARRAY_SIZE(sc26xx_rsrc),
110 .resource = sc26xx_rsrc
111};
112
113static u32 a20r_ack_hwint(void)
114{
115 u32 status = read_c0_status();
116
117 write_c0_status (status | 0x00010000);
118 asm volatile(
119 " .set push \n"
120 " .set noat \n"
121 " .set noreorder \n"
122 " lw $1, 0(%0) \n"
123 " sb $0, 0(%1) \n"
124 " sync \n"
125 " lb %1, 0(%1) \n"
126 " b 1f \n"
127 " ori %1, $1, 2 \n"
128 " .align 8 \n"
129 "1: \n"
130 " nop \n"
131 " sw %1, 0(%0) \n"
132 " sync \n"
133 " li %1, 0x20 \n"
134 "2: \n"
135 " nop \n"
136 " bnez %1,2b \n"
137 " addiu %1, -1 \n"
138 " sw $1, 0(%0) \n"
139 " sync \n"
140 ".set pop \n"
141 :
142 : "Jr" (PCIMT_UCONF), "Jr" (0xbc000000));
143 write_c0_status(status);
144
145 return status;
146}
147
148static inline void unmask_a20r_irq(unsigned int irq)
149{
150 set_c0_status(0x100 << (irq - SNI_A20R_IRQ_BASE));
151 irq_enable_hazard();
152}
153
154static inline void mask_a20r_irq(unsigned int irq)
155{
156 clear_c0_status(0x100 << (irq - SNI_A20R_IRQ_BASE));
157 irq_disable_hazard();
158}
159
160static void end_a20r_irq(unsigned int irq)
161{
162 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
163 a20r_ack_hwint();
164 unmask_a20r_irq(irq);
165 }
166}
167
168static struct irq_chip a20r_irq_type = {
169 .typename = "A20R",
170 .ack = mask_a20r_irq,
171 .mask = mask_a20r_irq,
172 .mask_ack = mask_a20r_irq,
173 .unmask = unmask_a20r_irq,
174 .end = end_a20r_irq,
175};
176
177/*
178 * hwint 0 receive all interrupts
179 */
180static void a20r_hwint(void)
181{
182 u32 cause, status;
183 int irq;
184
185 clear_c0_status (IE_IRQ0);
186 status = a20r_ack_hwint();
187 cause = read_c0_cause();
188
189 irq = ffs(((cause & status) >> 8) & 0xf8);
190 if (likely(irq > 0))
191 do_IRQ(SNI_A20R_IRQ_BASE + irq - 1);
192 set_c0_status(IE_IRQ0);
193}
194
195void __init sni_a20r_irq_init(void)
196{
197 int i;
198
199 for (i = SNI_A20R_IRQ_BASE + 2 ; i < SNI_A20R_IRQ_BASE + 8; i++)
200 set_irq_chip(i, &a20r_irq_type);
201 sni_hwint = a20r_hwint;
202 change_c0_status(ST0_IM, IE_IRQ0);
203 setup_irq (SNI_A20R_IRQ_BASE + 3, &sni_isa_irq);
204}
205
206void sni_a20r_init(void)
207{
208 ds1216_base = (volatile unsigned char *) SNI_DS1216_A20R_BASE;
209 rtc_mips_get_time = ds1216_get_cmos_time;
210}
211
212static int __init snirm_a20r_setup_devinit(void)
213{
214 switch (sni_brd_type) {
215 case SNI_BRD_TOWER_OASIC:
216 case SNI_BRD_MINITOWER:
217 platform_device_register(&snirm_82596_pdev);
218 platform_device_register(&snirm_53c710_pdev);
219 platform_device_register(&sc26xx_pdev);
220 platform_device_register(&a20r_serial8250_device);
221 break;
222 }
223
224 return 0;
225}
226
227device_initcall(snirm_a20r_setup_devinit);
diff --git a/arch/mips/sni/ds1216.c b/arch/mips/sni/ds1216.c
new file mode 100644
index 000000000000..1d92732c14f1
--- /dev/null
+++ b/arch/mips/sni/ds1216.c
@@ -0,0 +1,81 @@
1
2#include <linux/bcd.h>
3#include <linux/time.h>
4
5#include <asm/ds1216.h>
6
7volatile unsigned char *ds1216_base;
8
9/*
10 * Read the 64 bit we'd like to have - It a series
11 * of 64 bits showing up in the LSB of the base register.
12 *
13 */
14static unsigned char *ds1216_read(void)
15{
16 static unsigned char rdbuf[8];
17 unsigned char c;
18 int i, j;
19
20 for (i = 0; i < 8; i++) {
21 c = 0x0;
22 for (j = 0; j < 8; j++) {
23 c |= (*ds1216_base & 0x1) << j;
24 }
25 rdbuf[i] = c;
26 }
27
28 return rdbuf;
29}
30
31static void ds1216_switch_ds_to_clock(void)
32{
33 unsigned char magic[] = {
34 0xc5, 0x3a, 0xa3, 0x5c, 0xc5, 0x3a, 0xa3, 0x5c
35 };
36 int i,j,c;
37
38 /* Reset magic pointer */
39 c = *ds1216_base;
40
41 /* Write 64 bit magic to DS1216 */
42 for (i = 0; i < 8; i++) {
43 c = magic[i];
44 for (j = 0; j < 8; j++) {
45 *ds1216_base = c;
46 c = c >> 1;
47 }
48 }
49}
50
51unsigned long ds1216_get_cmos_time(void)
52{
53 unsigned char *rdbuf;
54 unsigned int year, month, date, hour, min, sec;
55
56 ds1216_switch_ds_to_clock();
57 rdbuf = ds1216_read();
58
59 sec = BCD2BIN(DS1216_SEC(rdbuf));
60 min = BCD2BIN(DS1216_MIN(rdbuf));
61 hour = BCD2BIN(DS1216_HOUR(rdbuf));
62 date = BCD2BIN(DS1216_DATE(rdbuf));
63 month = BCD2BIN(DS1216_MONTH(rdbuf));
64 year = BCD2BIN(DS1216_YEAR(rdbuf));
65
66 if (DS1216_1224(rdbuf) && DS1216_AMPM(rdbuf))
67 hour+=12;
68
69 if (year < 70)
70 year += 2000;
71 else
72 year += 1900;
73
74 return mktime(year, month, date, hour, min, sec);
75}
76
77int ds1216_set_rtc_mmss(unsigned long nowtime)
78{
79 printk("ds1216_set_rtc_mmss called but not implemented\n");
80 return -1;
81}
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c
index 8511bcc6d99d..ad5fc471a004 100644
--- a/arch/mips/sni/irq.c
+++ b/arch/mips/sni/irq.c
@@ -5,6 +5,7 @@
5 * 5 *
6 * Copyright (C) 1992 Linus Torvalds 6 * Copyright (C) 1992 Linus Torvalds
7 * Copyright (C) 1994 - 2000 Ralf Baechle 7 * Copyright (C) 1994 - 2000 Ralf Baechle
8 * Copyright (C) 2006 Thomas Bogendoerfer
8 */ 9 */
9#include <linux/delay.h> 10#include <linux/delay.h>
10#include <linux/init.h> 11#include <linux/init.h>
@@ -15,152 +16,34 @@
15#include <asm/i8259.h> 16#include <asm/i8259.h>
16#include <asm/io.h> 17#include <asm/io.h>
17#include <asm/sni.h> 18#include <asm/sni.h>
19#include <asm/irq.h>
20#include <asm/irq_cpu.h>
18 21
19static void enable_pciasic_irq(unsigned int irq) 22void (*sni_hwint)(void);
20{
21 unsigned int mask = 1 << (irq - PCIMT_IRQ_INT2);
22
23 *(volatile u8 *) PCIMT_IRQSEL |= mask;
24}
25
26void disable_pciasic_irq(unsigned int irq)
27{
28 unsigned int mask = ~(1 << (irq - PCIMT_IRQ_INT2));
29
30 *(volatile u8 *) PCIMT_IRQSEL &= mask;
31}
32 23
33static void end_pciasic_irq(unsigned int irq) 24asmlinkage void plat_irq_dispatch(void)
34{
35 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
36 enable_pciasic_irq(irq);
37}
38
39static struct irq_chip pciasic_irq_type = {
40 .typename = "ASIC-PCI",
41 .ack = disable_pciasic_irq,
42 .mask = disable_pciasic_irq,
43 .mask_ack = disable_pciasic_irq,
44 .unmask = enable_pciasic_irq,
45 .end = end_pciasic_irq,
46};
47
48/*
49 * hwint0 should deal with MP agent, ASIC PCI, EISA NMI and debug
50 * button interrupts. Later ...
51 */
52static void pciasic_hwint0(void)
53{
54 panic("Received int0 but no handler yet ...");
55}
56
57/* This interrupt was used for the com1 console on the first prototypes. */
58static void pciasic_hwint2(void)
59{
60 /* I think this shouldn't happen on production machines. */
61 panic("hwint2 and no handler yet");
62}
63
64/* hwint5 is the r4k count / compare interrupt */
65static void pciasic_hwint5(void)
66{
67 panic("hwint5 and no handler yet");
68}
69
70static unsigned int ls1bit8(unsigned int x)
71{
72 int b = 7, s;
73
74 s = 4; if ((x & 0x0f) == 0) s = 0; b -= s; x <<= s;
75 s = 2; if ((x & 0x30) == 0) s = 0; b -= s; x <<= s;
76 s = 1; if ((x & 0x40) == 0) s = 0; b -= s;
77
78 return b;
79}
80
81/*
82 * hwint 1 deals with EISA and SCSI interrupts,
83 *
84 * The EISA_INT bit in CSITPEND is high active, all others are low active.
85 */
86static void pciasic_hwint1(void)
87{ 25{
88 u8 pend = *(volatile char *)PCIMT_CSITPEND; 26 sni_hwint();
89 unsigned long flags;
90
91 if (pend & IT_EISA) {
92 int irq;
93 /*
94 * Note: ASIC PCI's builtin interrupt achknowledge feature is
95 * broken. Using it may result in loss of some or all i8259
96 * interupts, so don't use PCIMT_INT_ACKNOWLEDGE ...
97 */
98 irq = i8259_irq();
99 if (unlikely(irq < 0))
100 return;
101
102 do_IRQ(irq);
103 }
104
105 if (!(pend & IT_SCSI)) {
106 flags = read_c0_status();
107 clear_c0_status(ST0_IM);
108 do_IRQ(PCIMT_IRQ_SCSI);
109 write_c0_status(flags);
110 }
111} 27}
112 28
113/* 29/* ISA irq handler */
114 * hwint 3 should deal with the PCI A - D interrupts, 30static irqreturn_t sni_isa_irq_handler(int dummy, void *p)
115 */
116static void pciasic_hwint3(void)
117{ 31{
118 u8 pend = *(volatile char *)PCIMT_CSITPEND;
119 int irq; 32 int irq;
120 33
121 pend &= (IT_INTA | IT_INTB | IT_INTC | IT_INTD); 34 irq = i8259_irq();
122 clear_c0_status(IE_IRQ3); 35 if (unlikely(irq < 0))
123 irq = PCIMT_IRQ_INT2 + ls1bit8(pend); 36 return IRQ_NONE;
124 do_IRQ(irq);
125 set_c0_status(IE_IRQ3);
126}
127 37
128/* 38 do_IRQ(irq);
129 * hwint 4 is used for only the onboard PCnet 32. 39 return IRQ_HANDLED;
130 */
131static void pciasic_hwint4(void)
132{
133 clear_c0_status(IE_IRQ4);
134 do_IRQ(PCIMT_IRQ_ETHERNET);
135 set_c0_status(IE_IRQ4);
136}
137
138asmlinkage void plat_irq_dispatch(void)
139{
140 unsigned int pending = read_c0_status() & read_c0_cause();
141 static unsigned char led_cache;
142
143 *(volatile unsigned char *) PCIMT_CSLED = ++led_cache;
144
145 if (pending & 0x0800)
146 pciasic_hwint1();
147 else if (pending & 0x4000)
148 pciasic_hwint4();
149 else if (pending & 0x2000)
150 pciasic_hwint3();
151 else if (pending & 0x1000)
152 pciasic_hwint2();
153 else if (pending & 0x8000)
154 pciasic_hwint5();
155 else if (pending & 0x0400)
156 pciasic_hwint0();
157} 40}
158 41
159void __init init_pciasic(void) 42struct irqaction sni_isa_irq = {
160{ 43 .handler = sni_isa_irq_handler,
161 * (volatile u8 *) PCIMT_IRQSEL = 44 .name = "ISA",
162 IT_EISA | IT_INTA | IT_INTB | IT_INTC | IT_INTD; 45 .flags = SA_SHIRQ
163} 46};
164 47
165/* 48/*
166 * On systems with i8259-style interrupt controllers we assume for 49 * On systems with i8259-style interrupt controllers we assume for
@@ -169,14 +52,31 @@ void __init init_pciasic(void)
169 */ 52 */
170void __init arch_init_irq(void) 53void __init arch_init_irq(void)
171{ 54{
172 int i;
173
174 init_i8259_irqs(); /* Integrated i8259 */ 55 init_i8259_irqs(); /* Integrated i8259 */
175 init_pciasic(); 56 switch (sni_brd_type) {
176 57 case SNI_BRD_10:
177 /* Actually we've got more interrupts to handle ... */ 58 case SNI_BRD_10NEW:
178 for (i = PCIMT_IRQ_INT2; i <= PCIMT_IRQ_ETHERNET; i++) 59 case SNI_BRD_TOWER_OASIC:
179 set_irq_chip(i, &pciasic_irq_type); 60 case SNI_BRD_MINITOWER:
180 61 sni_a20r_irq_init();
181 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ2|IE_IRQ3|IE_IRQ4); 62 break;
63
64 case SNI_BRD_PCI_TOWER:
65 sni_pcit_irq_init();
66 break;
67
68 case SNI_BRD_PCI_TOWER_CPLUS:
69 sni_pcit_cplus_irq_init();
70 break;
71
72 case SNI_BRD_RM200:
73 sni_rm200_irq_init();
74 break;
75
76 case SNI_BRD_PCI_MTOWER:
77 case SNI_BRD_PCI_DESKTOP:
78 case SNI_BRD_PCI_MTOWER_CPLUS:
79 sni_pcimt_irq_init();
80 break;
81 }
182} 82}
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c
new file mode 100644
index 000000000000..6c0dad7cbf4e
--- /dev/null
+++ b/arch/mips/sni/pcimt.c
@@ -0,0 +1,390 @@
1/*
2 * PCIMT specific code
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
10 */
11
12#include <linux/init.h>
13#include <linux/interrupt.h>
14#include <linux/pci.h>
15#include <linux/serial_8250.h>
16
17#include <asm/mc146818-time.h>
18#include <asm/sni.h>
19#include <asm/time.h>
20#include <asm/i8259.h>
21#include <asm/irq_cpu.h>
22
23#define cacheconf (*(volatile unsigned int *)PCIMT_CACHECONF)
24#define invspace (*(volatile unsigned int *)PCIMT_INVSPACE)
25
26static void __init sni_pcimt_sc_init(void)
27{
28 unsigned int scsiz, sc_size;
29
30 scsiz = cacheconf & 7;
31 if (scsiz == 0) {
32 printk("Second level cache is deactived.\n");
33 return;
34 }
35 if (scsiz >= 6) {
36 printk("Invalid second level cache size configured, "
37 "deactivating second level cache.\n");
38 cacheconf = 0;
39 return;
40 }
41
42 sc_size = 128 << scsiz;
43 printk("%dkb second level cache detected, deactivating.\n", sc_size);
44 cacheconf = 0;
45}
46
47
48/*
49 * A bit more gossip about the iron we're running on ...
50 */
51static inline void sni_pcimt_detect(void)
52{
53 char boardtype[80];
54 unsigned char csmsr;
55 char *p = boardtype;
56 unsigned int asic;
57
58 csmsr = *(volatile unsigned char *)PCIMT_CSMSR;
59
60 p += sprintf(p, "%s PCI", (csmsr & 0x80) ? "RM200" : "RM300");
61 if ((csmsr & 0x80) == 0)
62 p += sprintf(p, ", board revision %s",
63 (csmsr & 0x20) ? "D" : "C");
64 asic = csmsr & 0x80;
65 asic = (csmsr & 0x08) ? asic : !asic;
66 p += sprintf(p, ", ASIC PCI Rev %s", asic ? "1.0" : "1.1");
67 printk("%s.\n", boardtype);
68}
69
70#define PORT(_base,_irq) \
71 { \
72 .iobase = _base, \
73 .irq = _irq, \
74 .uartclk = 1843200, \
75 .iotype = UPIO_PORT, \
76 .flags = UPF_BOOT_AUTOCONF, \
77 }
78
79static struct plat_serial8250_port pcimt_data[] = {
80 PORT(0x3f8, 4),
81 PORT(0x2f8, 3),
82 { },
83};
84
85static struct platform_device pcimt_serial8250_device = {
86 .name = "serial8250",
87 .id = PLAT8250_DEV_PLATFORM,
88 .dev = {
89 .platform_data = pcimt_data,
90 },
91};
92
93static struct resource sni_io_resource = {
94 .start = 0x00001000UL,
95 .end = 0x03bfffffUL,
96 .name = "PCIMT IO MEM",
97 .flags = IORESOURCE_IO,
98};
99
100static struct resource pcimt_io_resources[] = {
101 {
102 .start = 0x00,
103 .end = 0x1f,
104 .name = "dma1",
105 .flags = IORESOURCE_BUSY
106 }, {
107 .start = 0x40,
108 .end = 0x5f,
109 .name = "timer",
110 .flags = IORESOURCE_BUSY
111 }, {
112 .start = 0x60,
113 .end = 0x6f,
114 .name = "keyboard",
115 .flags = IORESOURCE_BUSY
116 }, {
117 .start = 0x80,
118 .end = 0x8f,
119 .name = "dma page reg",
120 .flags = IORESOURCE_BUSY
121 }, {
122 .start = 0xc0,
123 .end = 0xdf,
124 .name = "dma2",
125 .flags = IORESOURCE_BUSY
126 }, {
127 .start = 0xcfc,
128 .end = 0xcff,
129 .name = "PCI config data",
130 .flags = IORESOURCE_BUSY
131 }
132};
133
134static struct resource sni_mem_resource = {
135 .start = 0x10000000UL,
136 .end = 0xffffffffUL,
137 .name = "PCIMT PCI MEM",
138 .flags = IORESOURCE_MEM
139};
140
141/*
142 * The RM200/RM300 has a few holes in it's PCI/EISA memory address space used
143 * for other purposes. Be paranoid and allocate all of the before the PCI
144 * code gets a chance to to map anything else there ...
145 *
146 * This leaves the following areas available:
147 *
148 * 0x10000000 - 0x1009ffff (640kB) PCI/EISA/ISA Bus Memory
149 * 0x10100000 - 0x13ffffff ( 15MB) PCI/EISA/ISA Bus Memory
150 * 0x18000000 - 0x1fbfffff (124MB) PCI/EISA Bus Memory
151 * 0x1ff08000 - 0x1ffeffff (816kB) PCI/EISA Bus Memory
152 * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory
153 */
154static struct resource pcimt_mem_resources[] = {
155 {
156 .start = 0x100a0000,
157 .end = 0x100bffff,
158 .name = "Video RAM area",
159 .flags = IORESOURCE_BUSY
160 }, {
161 .start = 0x100c0000,
162 .end = 0x100fffff,
163 .name = "ISA Reserved",
164 .flags = IORESOURCE_BUSY
165 }, {
166 .start = 0x14000000,
167 .end = 0x17bfffff,
168 .name = "PCI IO",
169 .flags = IORESOURCE_BUSY
170 }, {
171 .start = 0x17c00000,
172 .end = 0x17ffffff,
173 .name = "Cache Replacement Area",
174 .flags = IORESOURCE_BUSY
175 }, {
176 .start = 0x1a000000,
177 .end = 0x1a000003,
178 .name = "PCI INT Acknowledge",
179 .flags = IORESOURCE_BUSY
180 }, {
181 .start = 0x1fc00000,
182 .end = 0x1fc7ffff,
183 .name = "Boot PROM",
184 .flags = IORESOURCE_BUSY
185 }, {
186 .start = 0x1fc80000,
187 .end = 0x1fcfffff,
188 .name = "Diag PROM",
189 .flags = IORESOURCE_BUSY
190 }, {
191 .start = 0x1fd00000,
192 .end = 0x1fdfffff,
193 .name = "X-Bus",
194 .flags = IORESOURCE_BUSY
195 }, {
196 .start = 0x1fe00000,
197 .end = 0x1fefffff,
198 .name = "BIOS map",
199 .flags = IORESOURCE_BUSY
200 }, {
201 .start = 0x1ff00000,
202 .end = 0x1ff7ffff,
203 .name = "NVRAM / EEPROM",
204 .flags = IORESOURCE_BUSY
205 }, {
206 .start = 0x1fff0000,
207 .end = 0x1fffefff,
208 .name = "ASIC PCI",
209 .flags = IORESOURCE_BUSY
210 }, {
211 .start = 0x1ffff000,
212 .end = 0x1fffffff,
213 .name = "MP Agent",
214 .flags = IORESOURCE_BUSY
215 }, {
216 .start = 0x20000000,
217 .end = 0x9fffffff,
218 .name = "Main Memory",
219 .flags = IORESOURCE_BUSY
220 }
221};
222
223static void __init sni_pcimt_resource_init(void)
224{
225 int i;
226
227 /* request I/O space for devices used on all i[345]86 PCs */
228 for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++)
229 request_resource(&ioport_resource, pcimt_io_resources + i);
230
231 /* request mem space for pcimt-specific devices */
232 for (i = 0; i < ARRAY_SIZE(pcimt_mem_resources); i++)
233 request_resource(&sni_mem_resource, pcimt_mem_resources + i);
234
235 ioport_resource.end = sni_io_resource.end;
236}
237
238extern struct pci_ops sni_pcimt_ops;
239
240static struct pci_controller sni_controller = {
241 .pci_ops = &sni_pcimt_ops,
242 .mem_resource = &sni_mem_resource,
243 .mem_offset = 0x10000000UL,
244 .io_resource = &sni_io_resource,
245 .io_offset = 0x00000000UL
246};
247
248static void enable_pcimt_irq(unsigned int irq)
249{
250 unsigned int mask = 1 << (irq - PCIMT_IRQ_INT2);
251
252 *(volatile u8 *) PCIMT_IRQSEL |= mask;
253}
254
255void disable_pcimt_irq(unsigned int irq)
256{
257 unsigned int mask = ~(1 << (irq - PCIMT_IRQ_INT2));
258
259 *(volatile u8 *) PCIMT_IRQSEL &= mask;
260}
261
262static void end_pcimt_irq(unsigned int irq)
263{
264 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
265 enable_pcimt_irq(irq);
266}
267
268static struct irq_chip pcimt_irq_type = {
269 .typename = "PCIMT",
270 .ack = disable_pcimt_irq,
271 .mask = disable_pcimt_irq,
272 .mask_ack = disable_pcimt_irq,
273 .unmask = enable_pcimt_irq,
274 .end = end_pcimt_irq,
275};
276
277/*
278 * hwint0 should deal with MP agent, ASIC PCI, EISA NMI and debug
279 * button interrupts. Later ...
280 */
281static void pcimt_hwint0(void)
282{
283 panic("Received int0 but no handler yet ...");
284}
285
286/*
287 * hwint 1 deals with EISA and SCSI interrupts,
288 *
289 * The EISA_INT bit in CSITPEND is high active, all others are low active.
290 */
291static void pcimt_hwint1(void)
292{
293 u8 pend = *(volatile char *)PCIMT_CSITPEND;
294 unsigned long flags;
295
296 if (pend & IT_EISA) {
297 int irq;
298 /*
299 * Note: ASIC PCI's builtin interrupt achknowledge feature is
300 * broken. Using it may result in loss of some or all i8259
301 * interupts, so don't use PCIMT_INT_ACKNOWLEDGE ...
302 */
303 irq = i8259_irq();
304 if (unlikely(irq < 0))
305 return;
306
307 do_IRQ(irq);
308 }
309
310 if (!(pend & IT_SCSI)) {
311 flags = read_c0_status();
312 clear_c0_status(ST0_IM);
313 do_IRQ(PCIMT_IRQ_SCSI);
314 write_c0_status(flags);
315 }
316}
317
318/*
319 * hwint 3 should deal with the PCI A - D interrupts,
320 */
321static void pcimt_hwint3(void)
322{
323 u8 pend = *(volatile char *)PCIMT_CSITPEND;
324 int irq;
325
326 pend &= (IT_INTA | IT_INTB | IT_INTC | IT_INTD);
327 pend ^= (IT_INTA | IT_INTB | IT_INTC | IT_INTD);
328 clear_c0_status(IE_IRQ3);
329 irq = PCIMT_IRQ_INT2 + ffs(pend) - 1;
330 do_IRQ(irq);
331 set_c0_status(IE_IRQ3);
332}
333
334static void sni_pcimt_hwint(void)
335{
336 u32 pending = (read_c0_cause() & read_c0_status());
337
338 if (pending & C_IRQ5)
339 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 7);
340 else if (pending & C_IRQ4)
341 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 6);
342 else if (pending & C_IRQ3)
343 pcimt_hwint3();
344 else if (pending & C_IRQ1)
345 pcimt_hwint1();
346 else if (pending & C_IRQ0) {
347 pcimt_hwint0();
348 }
349}
350
351void __init sni_pcimt_irq_init(void)
352{
353 int i;
354
355 *(volatile u8 *) PCIMT_IRQSEL = IT_ETH | IT_EISA;
356 mips_cpu_irq_init();
357 /* Actually we've got more interrupts to handle ... */
358 for (i = PCIMT_IRQ_INT2; i <= PCIMT_IRQ_SCSI; i++)
359 set_irq_chip(i, &pcimt_irq_type);
360 sni_hwint = sni_pcimt_hwint;
361 change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
362}
363
364void sni_pcimt_init(void)
365{
366 sni_pcimt_resource_init();
367 sni_pcimt_detect();
368 sni_pcimt_sc_init();
369 rtc_mips_get_time = mc146818_get_cmos_time;
370 rtc_mips_set_time = mc146818_set_rtc_mmss;
371 board_time_init = sni_cpu_time_init;
372#ifdef CONFIG_PCI
373 register_pci_controller(&sni_controller);
374#endif
375}
376
377static int __init snirm_pcimt_setup_devinit(void)
378{
379 switch (sni_brd_type) {
380 case SNI_BRD_PCI_MTOWER:
381 case SNI_BRD_PCI_DESKTOP:
382 case SNI_BRD_PCI_MTOWER_CPLUS:
383 platform_device_register(&pcimt_serial8250_device);
384 break;
385 }
386
387 return 0;
388}
389
390device_initcall(snirm_pcimt_setup_devinit);
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
new file mode 100644
index 000000000000..3921096023c3
--- /dev/null
+++ b/arch/mips/sni/pcit.c
@@ -0,0 +1,351 @@
1/*
2 * PCI Tower specific code
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
9 */
10
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/pci.h>
14#include <linux/serial_8250.h>
15
16#include <asm/mc146818-time.h>
17#include <asm/sni.h>
18#include <asm/time.h>
19#include <asm/irq_cpu.h>
20
21
22#define PORT(_base,_irq) \
23 { \
24 .iobase = _base, \
25 .irq = _irq, \
26 .uartclk = 1843200, \
27 .iotype = UPIO_PORT, \
28 .flags = UPF_BOOT_AUTOCONF, \
29 }
30
31static struct plat_serial8250_port pcit_data[] = {
32 PORT(0x3f8, 0),
33 PORT(0x2f8, 3),
34 { },
35};
36
37static struct platform_device pcit_serial8250_device = {
38 .name = "serial8250",
39 .id = PLAT8250_DEV_PLATFORM,
40 .dev = {
41 .platform_data = pcit_data,
42 },
43};
44
45static struct plat_serial8250_port pcit_cplus_data[] = {
46 PORT(0x3f8, 4),
47 PORT(0x2f8, 3),
48 PORT(0x3e8, 4),
49 PORT(0x2e8, 3),
50 { },
51};
52
53static struct platform_device pcit_cplus_serial8250_device = {
54 .name = "serial8250",
55 .id = PLAT8250_DEV_PLATFORM,
56 .dev = {
57 .platform_data = pcit_cplus_data,
58 },
59};
60
61static struct resource sni_io_resource = {
62 .start = 0x00001000UL,
63 .end = 0x03bfffffUL,
64 .name = "PCIT IO MEM",
65 .flags = IORESOURCE_IO,
66};
67
68static struct resource pcit_io_resources[] = {
69 {
70 .start = 0x00,
71 .end = 0x1f,
72 .name = "dma1",
73 .flags = IORESOURCE_BUSY
74 }, {
75 .start = 0x40,
76 .end = 0x5f,
77 .name = "timer",
78 .flags = IORESOURCE_BUSY
79 }, {
80 .start = 0x60,
81 .end = 0x6f,
82 .name = "keyboard",
83 .flags = IORESOURCE_BUSY
84 }, {
85 .start = 0x80,
86 .end = 0x8f,
87 .name = "dma page reg",
88 .flags = IORESOURCE_BUSY
89 }, {
90 .start = 0xc0,
91 .end = 0xdf,
92 .name = "dma2",
93 .flags = IORESOURCE_BUSY
94 }, {
95 .start = 0xcfc,
96 .end = 0xcff,
97 .name = "PCI config data",
98 .flags = IORESOURCE_BUSY
99 }
100};
101
102static struct resource sni_mem_resource = {
103 .start = 0x10000000UL,
104 .end = 0xffffffffUL,
105 .name = "PCIT PCI MEM",
106 .flags = IORESOURCE_MEM
107};
108
109/*
110 * The RM200/RM300 has a few holes in it's PCI/EISA memory address space used
111 * for other purposes. Be paranoid and allocate all of the before the PCI
112 * code gets a chance to to map anything else there ...
113 *
114 * This leaves the following areas available:
115 *
116 * 0x10000000 - 0x1009ffff (640kB) PCI/EISA/ISA Bus Memory
117 * 0x10100000 - 0x13ffffff ( 15MB) PCI/EISA/ISA Bus Memory
118 * 0x18000000 - 0x1fbfffff (124MB) PCI/EISA Bus Memory
119 * 0x1ff08000 - 0x1ffeffff (816kB) PCI/EISA Bus Memory
120 * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory
121 */
122static struct resource pcit_mem_resources[] = {
123 {
124 .start = 0x14000000,
125 .end = 0x17bfffff,
126 .name = "PCI IO",
127 .flags = IORESOURCE_BUSY
128 }, {
129 .start = 0x17c00000,
130 .end = 0x17ffffff,
131 .name = "Cache Replacement Area",
132 .flags = IORESOURCE_BUSY
133 }, {
134 .start = 0x180a0000,
135 .end = 0x180bffff,
136 .name = "Video RAM area",
137 .flags = IORESOURCE_BUSY
138 }, {
139 .start = 0x180c0000,
140 .end = 0x180fffff,
141 .name = "ISA Reserved",
142 .flags = IORESOURCE_BUSY
143 }, {
144 .start = 0x19000000,
145 .end = 0x1fbfffff,
146 .name = "PCI MEM",
147 .flags = IORESOURCE_BUSY
148 }, {
149 .start = 0x1fc00000,
150 .end = 0x1fc7ffff,
151 .name = "Boot PROM",
152 .flags = IORESOURCE_BUSY
153 }, {
154 .start = 0x1fc80000,
155 .end = 0x1fcfffff,
156 .name = "Diag PROM",
157 .flags = IORESOURCE_BUSY
158 }, {
159 .start = 0x1fd00000,
160 .end = 0x1fdfffff,
161 .name = "X-Bus",
162 .flags = IORESOURCE_BUSY
163 }, {
164 .start = 0x1fe00000,
165 .end = 0x1fefffff,
166 .name = "BIOS map",
167 .flags = IORESOURCE_BUSY
168 }, {
169 .start = 0x1ff00000,
170 .end = 0x1ff7ffff,
171 .name = "NVRAM / EEPROM",
172 .flags = IORESOURCE_BUSY
173 }, {
174 .start = 0x1fff0000,
175 .end = 0x1fffefff,
176 .name = "MAUI ASIC",
177 .flags = IORESOURCE_BUSY
178 }, {
179 .start = 0x1ffff000,
180 .end = 0x1fffffff,
181 .name = "MP Agent",
182 .flags = IORESOURCE_BUSY
183 }, {
184 .start = 0x20000000,
185 .end = 0x9fffffff,
186 .name = "Main Memory",
187 .flags = IORESOURCE_BUSY
188 }
189};
190
191static void __init sni_pcit_resource_init(void)
192{
193 int i;
194
195 /* request I/O space for devices used on all i[345]86 PCs */
196 for (i = 0; i < ARRAY_SIZE(pcit_io_resources); i++)
197 request_resource(&ioport_resource, pcit_io_resources + i);
198
199 /* request mem space for pcimt-specific devices */
200 for (i = 0; i < ARRAY_SIZE(pcit_mem_resources); i++)
201 request_resource(&sni_mem_resource, pcit_mem_resources + i);
202
203 ioport_resource.end = sni_io_resource.end;
204}
205
206
207extern struct pci_ops sni_pcit_ops;
208
209static struct pci_controller sni_pcit_controller = {
210 .pci_ops = &sni_pcit_ops,
211 .mem_resource = &sni_mem_resource,
212 .mem_offset = 0x10000000UL,
213 .io_resource = &sni_io_resource,
214 .io_offset = 0x00000000UL
215};
216
217static void enable_pcit_irq(unsigned int irq)
218{
219 u32 mask = 1 << (irq - SNI_PCIT_INT_START + 24);
220
221 *(volatile u32 *)SNI_PCIT_INT_REG |= mask;
222}
223
224void disable_pcit_irq(unsigned int irq)
225{
226 u32 mask = 1 << (irq - SNI_PCIT_INT_START + 24);
227
228 *(volatile u32 *)SNI_PCIT_INT_REG &= ~mask;
229}
230
231void end_pcit_irq(unsigned int irq)
232{
233 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
234 enable_pcit_irq(irq);
235}
236
237static struct irq_chip pcit_irq_type = {
238 .typename = "PCIT",
239 .ack = disable_pcit_irq,
240 .mask = disable_pcit_irq,
241 .mask_ack = disable_pcit_irq,
242 .unmask = enable_pcit_irq,
243 .end = end_pcit_irq,
244};
245
246static void pcit_hwint1(void)
247{
248 u32 pending = *(volatile u32 *)SNI_PCIT_INT_REG;
249 int irq;
250
251 clear_c0_status(IE_IRQ1);
252 irq = ffs((pending >> 16) & 0x7f);
253
254 if (likely(irq > 0))
255 do_IRQ (irq + SNI_PCIT_INT_START - 1);
256 set_c0_status (IE_IRQ1);
257}
258
259static void pcit_hwint0(void)
260{
261 u32 pending = *(volatile u32 *)SNI_PCIT_INT_REG;
262 int irq;
263
264 clear_c0_status(IE_IRQ0);
265 irq = ffs((pending >> 16) & 0x7f);
266
267 if (likely(irq > 0))
268 do_IRQ (irq + SNI_PCIT_INT_START - 1);
269 set_c0_status (IE_IRQ0);
270}
271
272static void sni_pcit_hwint(void)
273{
274 u32 pending = (read_c0_cause() & read_c0_status());
275
276 if (pending & C_IRQ1)
277 pcit_hwint1();
278 else if (pending & C_IRQ2)
279 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 4);
280 else if (pending & C_IRQ3)
281 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 5);
282 else if (pending & C_IRQ5)
283 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 7);
284}
285
286static void sni_pcit_hwint_cplus(void)
287{
288 u32 pending = (read_c0_cause() & read_c0_status());
289
290 if (pending & C_IRQ0)
291 pcit_hwint0();
292 else if (pending & C_IRQ2)
293 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 4);
294 else if (pending & C_IRQ3)
295 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 5);
296 else if (pending & C_IRQ5)
297 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 7);
298}
299
300void __init sni_pcit_irq_init(void)
301{
302 int i;
303
304 mips_cpu_irq_init();
305 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
306 set_irq_chip(i, &pcit_irq_type);
307 *(volatile u32 *)SNI_PCIT_INT_REG = 0;
308 sni_hwint = sni_pcit_hwint;
309 change_c0_status(ST0_IM, IE_IRQ1);
310 setup_irq (SNI_PCIT_INT_START + 6, &sni_isa_irq);
311}
312
313void __init sni_pcit_cplus_irq_init(void)
314{
315 int i;
316
317 mips_cpu_irq_init();
318 for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
319 set_irq_chip(i, &pcit_irq_type);
320 *(volatile u32 *)SNI_PCIT_INT_REG = 0;
321 sni_hwint = sni_pcit_hwint_cplus;
322 change_c0_status(ST0_IM, IE_IRQ0);
323 setup_irq (SNI_PCIT_INT_START + 6, &sni_isa_irq);
324}
325
326void sni_pcit_init(void)
327{
328 sni_pcit_resource_init();
329 rtc_mips_get_time = mc146818_get_cmos_time;
330 rtc_mips_set_time = mc146818_set_rtc_mmss;
331 board_time_init = sni_cpu_time_init;
332#ifdef CONFIG_PCI
333 register_pci_controller(&sni_pcit_controller);
334#endif
335}
336
337static int __init snirm_pcit_setup_devinit(void)
338{
339 switch (sni_brd_type) {
340 case SNI_BRD_PCI_TOWER:
341 platform_device_register(&pcit_serial8250_device);
342 break;
343
344 case SNI_BRD_PCI_TOWER_CPLUS:
345 platform_device_register(&pcit_cplus_serial8250_device);
346 break;
347 }
348 return 0;
349}
350
351device_initcall(snirm_pcit_setup_devinit);
diff --git a/arch/mips/sni/reset.c b/arch/mips/sni/reset.c
index be85bec002e1..2eada8aea682 100644
--- a/arch/mips/sni/reset.c
+++ b/arch/mips/sni/reset.c
@@ -13,12 +13,11 @@
13 * controller to pulse the reset-line low. We try that for a while, 13 * controller to pulse the reset-line low. We try that for a while,
14 * and if it doesn't work, we do some other stupid things. 14 * and if it doesn't work, we do some other stupid things.
15 */ 15 */
16static inline void 16static inline void kb_wait(void)
17kb_wait(void)
18{ 17{
19 int i; 18 int i;
20 19
21 for (i=0; i<0x10000; i++) 20 for (i = 0; i < 0x10000; i++)
22 if ((inb_p(0x64) & 0x02) == 0) 21 if ((inb_p(0x64) & 0x02) == 0)
23 break; 22 break;
24} 23}
@@ -32,9 +31,9 @@ void sni_machine_restart(char *command)
32 We can do that easier ... */ 31 We can do that easier ... */
33 local_irq_disable(); 32 local_irq_disable();
34 for (;;) { 33 for (;;) {
35 for (i=0; i<100; i++) { 34 for (i = 0; i < 100; i++) {
36 kb_wait(); 35 kb_wait();
37 for(j = 0; j < 100000 ; j++) 36 for (j = 0; j < 100000 ; j++)
38 /* nothing */; 37 /* nothing */;
39 outb_p(0xfe,0x64); /* pulse reset low */ 38 outb_p(0xfe,0x64); /* pulse reset low */
40 } 39 }
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c
new file mode 100644
index 000000000000..517dc698c083
--- /dev/null
+++ b/arch/mips/sni/rm200.c
@@ -0,0 +1,186 @@
1/*
2 * RM200 specific code
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
9 */
10
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/platform_device.h>
14#include <linux/serial_8250.h>
15
16#include <asm/sni.h>
17#include <asm/time.h>
18#include <asm/ds1216.h>
19#include <asm/irq_cpu.h>
20
21#define PORT(_base,_irq) \
22 { \
23 .iobase = _base, \
24 .irq = _irq, \
25 .uartclk = 1843200, \
26 .iotype = UPIO_PORT, \
27 .flags = UPF_BOOT_AUTOCONF, \
28 }
29
30static struct plat_serial8250_port rm200_data[] = {
31 PORT(0x3f8, 4),
32 PORT(0x2f8, 3),
33 { },
34};
35
36static struct platform_device rm200_serial8250_device = {
37 .name = "serial8250",
38 .id = PLAT8250_DEV_PLATFORM,
39 .dev = {
40 .platform_data = rm200_data,
41 },
42};
43
44static struct resource snirm_82596_rm200_rsrc[] = {
45 {
46 .start = 0xb8000000,
47 .end = 0xb80fffff,
48 .flags = IORESOURCE_MEM
49 },
50 {
51 .start = 0xbb000000,
52 .end = 0xbb000004,
53 .flags = IORESOURCE_MEM
54 },
55 {
56 .start = 0xbff00000,
57 .end = 0xbff00020,
58 .flags = IORESOURCE_MEM
59 },
60 {
61 .start = 27,
62 .end = 27,
63 .flags = IORESOURCE_IRQ
64 },
65 {
66 .flags = 0x00
67 }
68};
69
70static struct platform_device snirm_82596_rm200_pdev = {
71 .name = "snirm_82596",
72 .num_resources = ARRAY_SIZE(snirm_82596_rm200_rsrc),
73 .resource = snirm_82596_rm200_rsrc
74};
75
76static struct resource snirm_53c710_rm200_rsrc[] = {
77 {
78 .start = 0xb9000000,
79 .end = 0xb90fffff,
80 .flags = IORESOURCE_MEM
81 },
82 {
83 .start = 26,
84 .end = 26,
85 .flags = IORESOURCE_IRQ
86 }
87};
88
89static struct platform_device snirm_53c710_rm200_pdev = {
90 .name = "snirm_53c710",
91 .num_resources = ARRAY_SIZE(snirm_53c710_rm200_rsrc),
92 .resource = snirm_53c710_rm200_rsrc
93};
94
95static int __init snirm_setup_devinit(void)
96{
97 if (sni_brd_type == SNI_BRD_RM200) {
98 platform_device_register(&rm200_serial8250_device);
99 platform_device_register(&snirm_82596_rm200_pdev);
100 platform_device_register(&snirm_53c710_rm200_pdev);
101 }
102 return 0;
103}
104
105device_initcall(snirm_setup_devinit);
106
107
108#define SNI_RM200_INT_STAT_REG 0xbc000000
109#define SNI_RM200_INT_ENA_REG 0xbc080000
110
111#define SNI_RM200_INT_START 24
112#define SNI_RM200_INT_END 28
113
114static void enable_rm200_irq(unsigned int irq)
115{
116 unsigned int mask = 1 << (irq - SNI_RM200_INT_START);
117
118 *(volatile u8 *)SNI_RM200_INT_ENA_REG &= ~mask;
119}
120
121void disable_rm200_irq(unsigned int irq)
122{
123 unsigned int mask = 1 << (irq - SNI_RM200_INT_START);
124
125 *(volatile u8 *)SNI_RM200_INT_ENA_REG |= mask;
126}
127
128void end_rm200_irq(unsigned int irq)
129{
130 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
131 enable_rm200_irq(irq);
132}
133
134static struct irq_chip rm200_irq_type = {
135 .typename = "RM200",
136 .ack = disable_rm200_irq,
137 .mask = disable_rm200_irq,
138 .mask_ack = disable_rm200_irq,
139 .unmask = enable_rm200_irq,
140 .end = end_rm200_irq,
141};
142
143static void sni_rm200_hwint(void)
144{
145 u32 pending = read_c0_cause() & read_c0_status();
146 u8 mask;
147 u8 stat;
148 int irq;
149
150 if (pending & C_IRQ5)
151 do_IRQ (SNI_MIPS_IRQ_CPU_BASE + 7);
152 else if (pending & C_IRQ0) {
153 clear_c0_status (IE_IRQ0);
154 mask = *(volatile u8 *)SNI_RM200_INT_ENA_REG ^ 0x1f;
155 stat = *(volatile u8 *)SNI_RM200_INT_STAT_REG ^ 0x14;
156 irq = ffs(stat & mask & 0x1f);
157
158 if (likely(irq > 0))
159 do_IRQ (irq + SNI_RM200_INT_START - 1);
160 set_c0_status (IE_IRQ0);
161 }
162}
163
164void __init sni_rm200_irq_init(void)
165{
166 int i;
167
168 * (volatile u8 *)SNI_RM200_INT_ENA_REG = 0x1f;
169
170 mips_cpu_irq_init();
171 /* Actually we've got more interrupts to handle ... */
172 for (i = SNI_RM200_INT_START; i <= SNI_RM200_INT_END; i++)
173 set_irq_chip(i, &rm200_irq_type);
174 sni_hwint = sni_rm200_hwint;
175 change_c0_status(ST0_IM, IE_IRQ0);
176 setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq);
177}
178
179void sni_rm200_init(void)
180{
181 set_io_port_base(SNI_PORT_BASE + 0x02000000);
182 ioport_resource.end += 0x02000000;
183 ds1216_base = (volatile unsigned char *) SNI_DS1216_RM200_BASE;
184 rtc_mips_get_time = ds1216_get_cmos_time;
185 board_time_init = sni_cpu_time_init;
186}
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index afeb7f13e5b5..68d7cf609b4f 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -6,16 +6,10 @@
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
9 */ 10 */
10#include <linux/eisa.h> 11#include <linux/eisa.h>
11#include <linux/hdreg.h>
12#include <linux/ioport.h>
13#include <linux/sched.h>
14#include <linux/init.h> 12#include <linux/init.h>
15#include <linux/interrupt.h>
16#include <linux/mc146818rtc.h>
17#include <linux/pm.h>
18#include <linux/pci.h>
19#include <linux/console.h> 13#include <linux/console.h>
20#include <linux/fb.h> 14#include <linux/fb.h>
21#include <linux/screen_info.h> 15#include <linux/screen_info.h>
@@ -25,52 +19,16 @@
25#include <asm/sgialib.h> 19#include <asm/sgialib.h>
26#endif 20#endif
27 21
28#include <asm/bcache.h>
29#include <asm/bootinfo.h>
30#include <asm/io.h> 22#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/mc146818-time.h>
33#include <asm/processor.h>
34#include <asm/reboot.h> 23#include <asm/reboot.h>
35#include <asm/sni.h> 24#include <asm/sni.h>
36#include <asm/time.h> 25
37#include <asm/traps.h> 26unsigned int sni_brd_type;
38 27
39extern void sni_machine_restart(char *command); 28extern void sni_machine_restart(char *command);
40extern void sni_machine_halt(void); 29extern void sni_machine_halt(void);
41extern void sni_machine_power_off(void); 30extern void sni_machine_power_off(void);
42 31
43void __init plat_timer_setup(struct irqaction *irq)
44{
45 /* set the clock to 100 Hz */
46 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
47 outb_p(LATCH & 0xff , 0x40); /* LSB */
48 outb(LATCH >> 8 , 0x40); /* MSB */
49 setup_irq(0, irq);
50}
51
52/*
53 * A bit more gossip about the iron we're running on ...
54 */
55static inline void sni_pcimt_detect(void)
56{
57 char boardtype[80];
58 unsigned char csmsr;
59 char *p = boardtype;
60 unsigned int asic;
61
62 csmsr = *(volatile unsigned char *)PCIMT_CSMSR;
63
64 p += sprintf(p, "%s PCI", (csmsr & 0x80) ? "RM200" : "RM300");
65 if ((csmsr & 0x80) == 0)
66 p += sprintf(p, ", board revision %s",
67 (csmsr & 0x20) ? "D" : "C");
68 asic = csmsr & 0x80;
69 asic = (csmsr & 0x08) ? asic : !asic;
70 p += sprintf(p, ", ASIC PCI Rev %s", asic ? "1.0" : "1.1");
71 printk("%s.\n", boardtype);
72}
73
74static void __init sni_display_setup(void) 32static void __init sni_display_setup(void)
75{ 33{
76#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC) 34#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC)
@@ -90,175 +48,11 @@ static void __init sni_display_setup(void)
90#endif 48#endif
91} 49}
92 50
93static struct resource sni_io_resource = {
94 .start = 0x00001000UL,
95 .end = 0x03bfffffUL,
96 .name = "PCIMT IO MEM",
97 .flags = IORESOURCE_IO,
98};
99
100static struct resource pcimt_io_resources[] = {
101 {
102 .start = 0x00,
103 .end = 0x1f,
104 .name = "dma1",
105 .flags = IORESOURCE_BUSY
106 }, {
107 .start = 0x40,
108 .end = 0x5f,
109 .name = "timer",
110 .flags = IORESOURCE_BUSY
111 }, {
112 .start = 0x60,
113 .end = 0x6f,
114 .name = "keyboard",
115 .flags = IORESOURCE_BUSY
116 }, {
117 .start = 0x80,
118 .end = 0x8f,
119 .name = "dma page reg",
120 .flags = IORESOURCE_BUSY
121 }, {
122 .start = 0xc0,
123 .end = 0xdf,
124 .name = "dma2",
125 .flags = IORESOURCE_BUSY
126 }, {
127 .start = 0xcfc,
128 .end = 0xcff,
129 .name = "PCI config data",
130 .flags = IORESOURCE_BUSY
131 }
132};
133
134static struct resource sni_mem_resource = {
135 .start = 0x10000000UL,
136 .end = 0xffffffffUL,
137 .name = "PCIMT PCI MEM",
138 .flags = IORESOURCE_MEM
139};
140
141/*
142 * The RM200/RM300 has a few holes in it's PCI/EISA memory address space used
143 * for other purposes. Be paranoid and allocate all of the before the PCI
144 * code gets a chance to to map anything else there ...
145 *
146 * This leaves the following areas available:
147 *
148 * 0x10000000 - 0x1009ffff (640kB) PCI/EISA/ISA Bus Memory
149 * 0x10100000 - 0x13ffffff ( 15MB) PCI/EISA/ISA Bus Memory
150 * 0x18000000 - 0x1fbfffff (124MB) PCI/EISA Bus Memory
151 * 0x1ff08000 - 0x1ffeffff (816kB) PCI/EISA Bus Memory
152 * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory
153 */
154static struct resource pcimt_mem_resources[] = {
155 {
156 .start = 0x100a0000,
157 .end = 0x100bffff,
158 .name = "Video RAM area",
159 .flags = IORESOURCE_BUSY
160 }, {
161 .start = 0x100c0000,
162 .end = 0x100fffff,
163 .name = "ISA Reserved",
164 .flags = IORESOURCE_BUSY
165 }, {
166 .start = 0x14000000,
167 .end = 0x17bfffff,
168 .name = "PCI IO",
169 .flags = IORESOURCE_BUSY
170 }, {
171 .start = 0x17c00000,
172 .end = 0x17ffffff,
173 .name = "Cache Replacement Area",
174 .flags = IORESOURCE_BUSY
175 }, {
176 .start = 0x1a000000,
177 .end = 0x1a000003,
178 .name = "PCI INT Acknowledge",
179 .flags = IORESOURCE_BUSY
180 }, {
181 .start = 0x1fc00000,
182 .end = 0x1fc7ffff,
183 .name = "Boot PROM",
184 .flags = IORESOURCE_BUSY
185 }, {
186 .start = 0x1fc80000,
187 .end = 0x1fcfffff,
188 .name = "Diag PROM",
189 .flags = IORESOURCE_BUSY
190 }, {
191 .start = 0x1fd00000,
192 .end = 0x1fdfffff,
193 .name = "X-Bus",
194 .flags = IORESOURCE_BUSY
195 }, {
196 .start = 0x1fe00000,
197 .end = 0x1fefffff,
198 .name = "BIOS map",
199 .flags = IORESOURCE_BUSY
200 }, {
201 .start = 0x1ff00000,
202 .end = 0x1ff7ffff,
203 .name = "NVRAM / EEPROM",
204 .flags = IORESOURCE_BUSY
205 }, {
206 .start = 0x1fff0000,
207 .end = 0x1fffefff,
208 .name = "ASIC PCI",
209 .flags = IORESOURCE_BUSY
210 }, {
211 .start = 0x1ffff000,
212 .end = 0x1fffffff,
213 .name = "MP Agent",
214 .flags = IORESOURCE_BUSY
215 }, {
216 .start = 0x20000000,
217 .end = 0x9fffffff,
218 .name = "Main Memory",
219 .flags = IORESOURCE_BUSY
220 }
221};
222
223static void __init sni_resource_init(void)
224{
225 int i;
226
227 /* request I/O space for devices used on all i[345]86 PCs */
228 for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++)
229 request_resource(&ioport_resource, pcimt_io_resources + i);
230
231 /* request mem space for pcimt-specific devices */
232 for (i = 0; i < ARRAY_SIZE(pcimt_mem_resources); i++)
233 request_resource(&sni_mem_resource, pcimt_mem_resources + i);
234
235 ioport_resource.end = sni_io_resource.end;
236}
237
238extern struct pci_ops sni_pci_ops;
239
240static struct pci_controller sni_controller = {
241 .pci_ops = &sni_pci_ops,
242 .mem_resource = &sni_mem_resource,
243 .mem_offset = 0x10000000UL,
244 .io_resource = &sni_io_resource,
245 .io_offset = 0x00000000UL
246};
247
248static inline void sni_pcimt_time_init(void)
249{
250 rtc_mips_get_time = mc146818_get_cmos_time;
251 rtc_mips_set_time = mc146818_set_rtc_mmss;
252}
253 51
254void __init plat_mem_setup(void) 52void __init plat_mem_setup(void)
255{ 53{
256 sni_pcimt_detect();
257 sni_pcimt_sc_init();
258 sni_pcimt_time_init();
259
260 set_io_port_base(SNI_PORT_BASE); 54 set_io_port_base(SNI_PORT_BASE);
261 ioport_resource.end = sni_io_resource.end; 55// ioport_resource.end = sni_io_resource.end;
262 56
263 /* 57 /*
264 * Setup (E)ISA I/O memory access stuff 58 * Setup (E)ISA I/O memory access stuff
@@ -268,15 +62,33 @@ void __init plat_mem_setup(void)
268 EISA_bus = 1; 62 EISA_bus = 1;
269#endif 63#endif
270 64
271 sni_resource_init(); 65 switch (sni_brd_type) {
66 case SNI_BRD_10:
67 case SNI_BRD_10NEW:
68 case SNI_BRD_TOWER_OASIC:
69 case SNI_BRD_MINITOWER:
70 sni_a20r_init();
71 break;
72
73 case SNI_BRD_PCI_TOWER:
74 case SNI_BRD_PCI_TOWER_CPLUS:
75 sni_pcit_init();
76 break;
77
78 case SNI_BRD_RM200:
79 sni_rm200_init();
80 break;
81
82 case SNI_BRD_PCI_MTOWER:
83 case SNI_BRD_PCI_DESKTOP:
84 case SNI_BRD_PCI_MTOWER_CPLUS:
85 sni_pcimt_init();
86 break;
87 }
272 88
273 _machine_restart = sni_machine_restart; 89 _machine_restart = sni_machine_restart;
274 _machine_halt = sni_machine_halt; 90 _machine_halt = sni_machine_halt;
275 pm_power_off = sni_machine_power_off; 91 pm_power_off = sni_machine_power_off;
276 92
277 sni_display_setup(); 93 sni_display_setup();
278
279#ifdef CONFIG_PCI
280 register_pci_controller(&sni_controller);
281#endif
282} 94}
diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c
index d1d0f1f493b4..6a44bbf0b732 100644
--- a/arch/mips/sni/sniprom.c
+++ b/arch/mips/sni/sniprom.c
@@ -12,6 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <linux/console.h>
15 16
16#include <asm/addrspace.h> 17#include <asm/addrspace.h>
17#include <asm/sni.h> 18#include <asm/sni.h>
@@ -31,7 +32,7 @@
31#define PROM_ENTRY(x) (PROM_VEC + (x)) 32#define PROM_ENTRY(x) (PROM_VEC + (x))
32 33
33 34
34#undef DEBUG 35#define DEBUG
35#ifdef DEBUG 36#ifdef DEBUG
36#define DBG_PRINTF(x...) prom_printf(x) 37#define DBG_PRINTF(x...) prom_printf(x)
37#else 38#else
@@ -67,9 +68,8 @@ void prom_printf(char *fmt, ...)
67 va_end(args); 68 va_end(args);
68} 69}
69 70
70unsigned long prom_free_prom_memory(void) 71void __init prom_free_prom_memory(void)
71{ 72{
72 return 0;
73} 73}
74 74
75/* 75/*
@@ -94,14 +94,14 @@ static void sni_idprom_dump(void)
94{ 94{
95 int i; 95 int i;
96 96
97 prom_printf("SNI IDProm dump (first 128byte):\n"); 97 prom_printf("SNI IDProm dump:\n");
98 for(i=0;i<128;i++) { 98 for (i = 0; i < 256; i++) {
99 if (i%16 == 0) 99 if (i%16 == 0)
100 prom_printf("%04x ", i); 100 prom_printf("%04x ", i);
101 101
102 prom_printf("%02x ", *(unsigned char *) (SNI_IDPROM_BASE+i)); 102 prom_printf("%02x ", *(unsigned char *) (SNI_IDPROM_BASE + i));
103 103
104 if (i%16 == 15) 104 if (i % 16 == 15)
105 prom_printf("\n"); 105 prom_printf("\n");
106 } 106 }
107} 107}
@@ -119,7 +119,7 @@ static void sni_mem_init(void )
119 } memconf[8]; 119 } memconf[8];
120 120
121 /* MemSIZE from prom in 16MByte chunks */ 121 /* MemSIZE from prom in 16MByte chunks */
122 memsize=*((unsigned char *) SNI_IDPROM_MEMSIZE) * 16; 122 memsize = *((unsigned char *) SNI_IDPROM_MEMSIZE) * 16;
123 123
124 DBG_PRINTF("IDProm memsize: %lu MByte\n", memsize); 124 DBG_PRINTF("IDProm memsize: %lu MByte\n", memsize);
125 125
@@ -127,26 +127,134 @@ static void sni_mem_init(void )
127 __prom_get_memconf(&memconf); 127 __prom_get_memconf(&memconf);
128 128
129 DBG_PRINTF("prom_get_mem_conf memory configuration:\n"); 129 DBG_PRINTF("prom_get_mem_conf memory configuration:\n");
130 for(i=0;i<8 && memconf[i].size;i++) { 130 for (i = 0;i < 8 && memconf[i].size; i++) {
131 prom_printf("Bank%d: %08x @ %08x\n", i, 131 if (sni_brd_type == SNI_BRD_PCI_TOWER ||
132 sni_brd_type == SNI_BRD_PCI_TOWER_CPLUS) {
133 if (memconf[i].base >= 0x20000000 &&
134 memconf[i].base < 0x30000000) {
135 memconf[i].base -= 0x20000000;
136 }
137 }
138 DBG_PRINTF("Bank%d: %08x @ %08x\n", i,
132 memconf[i].size, memconf[i].base); 139 memconf[i].size, memconf[i].base);
133 add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM); 140 add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM);
134 } 141 }
135} 142}
136 143
144static void __init sni_console_setup(void)
145{
146 char *ctype;
147 char *cdev;
148 char *baud;
149 int port;
150 static char options[8];
151
152 cdev = prom_getenv ("console_dev");
153 if (strncmp (cdev, "tty", 3) == 0) {
154 ctype = prom_getenv ("console");
155 switch (*ctype) {
156 default:
157 case 'l':
158 port = 0;
159 baud = prom_getenv("lbaud");
160 break;
161 case 'r':
162 port = 1;
163 baud = prom_getenv("rbaud");
164 break;
165 }
166 if (baud)
167 strcpy(options, baud);
168 add_preferred_console("ttyS", port, baud ? options : NULL);
169 }
170}
171
137void __init prom_init(void) 172void __init prom_init(void)
138{ 173{
139 int argc = fw_arg0; 174 int argc = fw_arg0;
140 char **argv = (void *)fw_arg1; 175 char **argv = (void *)fw_arg1;
141 unsigned int sni_brd_type = *(unsigned char *) SNI_IDPROM_BRDTYPE;
142 int i; 176 int i;
177 int cputype;
143 178
144 DBG_PRINTF("Found SNI brdtype %02x\n", sni_brd_type); 179 sni_brd_type = *(unsigned char *)SNI_IDPROM_BRDTYPE;
180 cputype = *(unsigned char *)SNI_IDPROM_CPUTYPE;
181 switch (sni_brd_type) {
182 case SNI_BRD_TOWER_OASIC:
183 switch (cputype) {
184 case SNI_CPU_M8030:
185 systype = "RM400-330";
186 break;
187 case SNI_CPU_M8031:
188 systype = "RM400-430";
189 break;
190 case SNI_CPU_M8037:
191 systype = "RM400-530";
192 break;
193 case SNI_CPU_M8034:
194 systype = "RM400-730";
195 break;
196 default:
197 systype = "RM400-xxx";
198 break;
199 }
200 break;
201 case SNI_BRD_MINITOWER:
202 switch (cputype) {
203 case SNI_CPU_M8021:
204 case SNI_CPU_M8043:
205 systype = "RM400-120";
206 break;
207 case SNI_CPU_M8040:
208 systype = "RM400-220";
209 break;
210 case SNI_CPU_M8053:
211 systype = "RM400-225";
212 break;
213 case SNI_CPU_M8050:
214 systype = "RM400-420";
215 break;
216 default:
217 systype = "RM400-xxx";
218 break;
219 }
220 break;
221 case SNI_BRD_PCI_TOWER:
222 systype = "RM400-Cxx";
223 break;
224 case SNI_BRD_RM200:
225 systype = "RM200-xxx";
226 break;
227 case SNI_BRD_PCI_MTOWER:
228 systype = "RM300-Cxx";
229 break;
230 case SNI_BRD_PCI_DESKTOP:
231 switch (read_c0_prid() & 0xff00) {
232 case PRID_IMP_R4600:
233 case PRID_IMP_R4700:
234 systype = "RM200-C20";
235 break;
236 case PRID_IMP_R5000:
237 systype = "RM200-C40";
238 break;
239 default:
240 systype = "RM200-Cxx";
241 break;
242 }
243 break;
244 case SNI_BRD_PCI_TOWER_CPLUS:
245 systype = "RM400-Exx";
246 break;
247 case SNI_BRD_PCI_MTOWER_CPLUS:
248 systype = "RM300-Exx";
249 break;
250 }
251 DBG_PRINTF("Found SNI brdtype %02x name %s\n", sni_brd_type,systype);
145 252
146#ifdef DEBUG 253#ifdef DEBUG
147 sni_idprom_dump(); 254 sni_idprom_dump();
148#endif 255#endif
149 sni_mem_init(); 256 sni_mem_init();
257 sni_console_setup();
150 258
151 /* copy prom cmdline parameters to kernel cmdline */ 259 /* copy prom cmdline parameters to kernel cmdline */
152 for (i = 1; i < argc; i++) { 260 for (i = 1; i < argc; i++) {
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
new file mode 100644
index 000000000000..20028fc7757e
--- /dev/null
+++ b/arch/mips/sni/time.c
@@ -0,0 +1,148 @@
1#include <linux/types.h>
2#include <linux/interrupt.h>
3#include <linux/time.h>
4
5#include <asm/sni.h>
6#include <asm/time.h>
7
8#define SNI_CLOCK_TICK_RATE 3686400
9#define SNI_COUNTER2_DIV 64
10#define SNI_COUNTER0_DIV ((SNI_CLOCK_TICK_RATE / SNI_COUNTER2_DIV) / HZ)
11
12static void sni_a20r_timer_ack(void)
13{
14 *(volatile u8 *)A20R_PT_TIM0_ACK = 0x0; wmb();
15}
16
17/*
18 * a20r platform uses 2 counters to divide the input frequency.
19 * Counter 2 output is connected to Counter 0 & 1 input.
20 */
21static void __init sni_a20r_timer_setup(struct irqaction *irq)
22{
23 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0x34; wmb();
24 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = (SNI_COUNTER0_DIV) & 0xff; wmb();
25 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = (SNI_COUNTER0_DIV >> 8) & 0xff; wmb();
26
27 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0xb4; wmb();
28 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = (SNI_COUNTER2_DIV) & 0xff; wmb();
29 *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = (SNI_COUNTER2_DIV >> 8) & 0xff; wmb();
30
31 setup_irq(SNI_A20R_IRQ_TIMER, irq);
32 mips_timer_ack = sni_a20r_timer_ack;
33}
34
35#define SNI_8254_TICK_RATE 1193182UL
36
37#define SNI_8254_TCSAMP_COUNTER ((SNI_8254_TICK_RATE / HZ) + 255)
38
39static __init unsigned long dosample(void)
40{
41 u32 ct0, ct1;
42 volatile u8 msb, lsb;
43
44 /* Start the counter. */
45 outb_p (0x34, 0x43);
46 outb_p(SNI_8254_TCSAMP_COUNTER & 0xff, 0x40);
47 outb (SNI_8254_TCSAMP_COUNTER >> 8, 0x40);
48
49 /* Get initial counter invariant */
50 ct0 = read_c0_count();
51
52 /* Latch and spin until top byte of counter0 is zero */
53 do {
54 outb (0x00, 0x43);
55 lsb = inb (0x40);
56 msb = inb (0x40);
57 ct1 = read_c0_count();
58 } while (msb);
59
60 /* Stop the counter. */
61 outb (0x38, 0x43);
62 /*
63 * Return the difference, this is how far the r4k counter increments
64 * for every 1/HZ seconds. We round off the nearest 1 MHz of master
65 * clock (= 1000000 / HZ / 2).
66 */
67 /*return (ct1 - ct0 + (500000/HZ/2)) / (500000/HZ) * (500000/HZ);*/
68 return (ct1 - ct0) / (500000/HZ) * (500000/HZ);
69}
70
71/*
72 * Here we need to calibrate the cycle counter to at least be close.
73 */
74__init void sni_cpu_time_init(void)
75{
76 unsigned long r4k_ticks[3];
77 unsigned long r4k_tick;
78
79 /*
80 * Figure out the r4k offset, the algorithm is very simple and works in
81 * _all_ cases as long as the 8254 counter register itself works ok (as
82 * an interrupt driving timer it does not because of bug, this is why
83 * we are using the onchip r4k counter/compare register to serve this
84 * purpose, but for r4k_offset calculation it will work ok for us).
85 * There are other very complicated ways of performing this calculation
86 * but this one works just fine so I am not going to futz around. ;-)
87 */
88 printk(KERN_INFO "Calibrating system timer... ");
89 dosample(); /* Prime cache. */
90 dosample(); /* Prime cache. */
91 /* Zero is NOT an option. */
92 do {
93 r4k_ticks[0] = dosample();
94 } while (!r4k_ticks[0]);
95 do {
96 r4k_ticks[1] = dosample();
97 } while (!r4k_ticks[1]);
98
99 if (r4k_ticks[0] != r4k_ticks[1]) {
100 printk("warning: timer counts differ, retrying... ");
101 r4k_ticks[2] = dosample();
102 if (r4k_ticks[2] == r4k_ticks[0]
103 || r4k_ticks[2] == r4k_ticks[1])
104 r4k_tick = r4k_ticks[2];
105 else {
106 printk("disagreement, using average... ");
107 r4k_tick = (r4k_ticks[0] + r4k_ticks[1]
108 + r4k_ticks[2]) / 3;
109 }
110 } else
111 r4k_tick = r4k_ticks[0];
112
113 printk("%d [%d.%04d MHz CPU]\n", (int) r4k_tick,
114 (int) (r4k_tick / (500000 / HZ)),
115 (int) (r4k_tick % (500000 / HZ)));
116
117 mips_hpt_frequency = r4k_tick * HZ;
118}
119
120/*
121 * R4k counter based timer interrupt. Works on RM200-225 and possibly
122 * others but not on RM400
123 */
124static void __init sni_cpu_timer_setup(struct irqaction *irq)
125{
126 setup_irq(SNI_MIPS_IRQ_CPU_TIMER, irq);
127}
128
129void __init plat_timer_setup(struct irqaction *irq)
130{
131 switch (sni_brd_type) {
132 case SNI_BRD_10:
133 case SNI_BRD_10NEW:
134 case SNI_BRD_TOWER_OASIC:
135 case SNI_BRD_MINITOWER:
136 sni_a20r_timer_setup (irq);
137 break;
138
139 case SNI_BRD_PCI_TOWER:
140 case SNI_BRD_RM200:
141 case SNI_BRD_PCI_MTOWER:
142 case SNI_BRD_PCI_DESKTOP:
143 case SNI_BRD_PCI_TOWER_CPLUS:
144 case SNI_BRD_PCI_MTOWER_CPLUS:
145 sni_cpu_timer_setup (irq);
146 break;
147 }
148}
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index ed4a19adf361..e7f3e5b84dcf 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -120,7 +120,7 @@ static void tx4927_irq_pic_disable(unsigned int irq);
120 120
121#define TX4927_CP0_NAME "TX4927-CP0" 121#define TX4927_CP0_NAME "TX4927-CP0"
122static struct irq_chip tx4927_irq_cp0_type = { 122static struct irq_chip tx4927_irq_cp0_type = {
123 .typename = TX4927_CP0_NAME, 123 .name = TX4927_CP0_NAME,
124 .ack = tx4927_irq_cp0_disable, 124 .ack = tx4927_irq_cp0_disable,
125 .mask = tx4927_irq_cp0_disable, 125 .mask = tx4927_irq_cp0_disable,
126 .mask_ack = tx4927_irq_cp0_disable, 126 .mask_ack = tx4927_irq_cp0_disable,
@@ -129,7 +129,7 @@ static struct irq_chip tx4927_irq_cp0_type = {
129 129
130#define TX4927_PIC_NAME "TX4927-PIC" 130#define TX4927_PIC_NAME "TX4927-PIC"
131static struct irq_chip tx4927_irq_pic_type = { 131static struct irq_chip tx4927_irq_pic_type = {
132 .typename = TX4927_PIC_NAME, 132 .name = TX4927_PIC_NAME,
133 .ack = tx4927_irq_pic_disable, 133 .ack = tx4927_irq_pic_disable,
134 .mask = tx4927_irq_pic_disable, 134 .mask = tx4927_irq_pic_disable,
135 .mask_ack = tx4927_irq_pic_disable, 135 .mask_ack = tx4927_irq_pic_disable,
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
index b54b529a29f9..dcce88f403c9 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
@@ -228,7 +228,7 @@ static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq);
228 228
229#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" 229#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
230static struct irq_chip toshiba_rbtx4927_irq_ioc_type = { 230static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
231 .typename = TOSHIBA_RBTX4927_IOC_NAME, 231 .name = TOSHIBA_RBTX4927_IOC_NAME,
232 .ack = toshiba_rbtx4927_irq_ioc_disable, 232 .ack = toshiba_rbtx4927_irq_ioc_disable,
233 .mask = toshiba_rbtx4927_irq_ioc_disable, 233 .mask = toshiba_rbtx4927_irq_ioc_disable,
234 .mask_ack = toshiba_rbtx4927_irq_ioc_disable, 234 .mask_ack = toshiba_rbtx4927_irq_ioc_disable,
@@ -241,7 +241,7 @@ static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
241#ifdef CONFIG_TOSHIBA_FPCIB0 241#ifdef CONFIG_TOSHIBA_FPCIB0
242#define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA" 242#define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
243static struct irq_chip toshiba_rbtx4927_irq_isa_type = { 243static struct irq_chip toshiba_rbtx4927_irq_isa_type = {
244 .typename = TOSHIBA_RBTX4927_ISA_NAME, 244 .name = TOSHIBA_RBTX4927_ISA_NAME,
245 .ack = toshiba_rbtx4927_irq_isa_mask_and_ack, 245 .ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
246 .mask = toshiba_rbtx4927_irq_isa_disable, 246 .mask = toshiba_rbtx4927_irq_isa_disable,
247 .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack, 247 .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
@@ -490,13 +490,13 @@ void toshiba_rbtx4927_irq_dump(char *key)
490 { 490 {
491 u32 i, j = 0; 491 u32 i, j = 0;
492 for (i = 0; i < NR_IRQS; i++) { 492 for (i = 0; i < NR_IRQS; i++) {
493 if (strcmp(irq_desc[i].chip->typename, "none") 493 if (strcmp(irq_desc[i].chip->name, "none")
494 == 0) 494 == 0)
495 continue; 495 continue;
496 496
497 if ((i >= 1) 497 if ((i >= 1)
498 && (irq_desc[i - 1].chip->typename == 498 && (irq_desc[i - 1].chip->name ==
499 irq_desc[i].chip->typename)) { 499 irq_desc[i].chip->name)) {
500 j++; 500 j++;
501 } else { 501 } else {
502 j = 0; 502 j = 0;
@@ -510,7 +510,7 @@ void toshiba_rbtx4927_irq_dump(char *key)
510 (u32) (irq_desc[i].action ? irq_desc[i]. 510 (u32) (irq_desc[i].action ? irq_desc[i].
511 action->handler : 0), 511 action->handler : 0),
512 irq_desc[i].depth, 512 irq_desc[i].depth,
513 irq_desc[i].chip->typename, j); 513 irq_desc[i].chip->name, j);
514 } 514 }
515 } 515 }
516#endif 516#endif
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
index efe50562f0ce..9a3a5babd1fb 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
@@ -80,9 +80,8 @@ void __init prom_init(void)
80 add_memory_region(0, msize << 20, BOOT_MEM_RAM); 80 add_memory_region(0, msize << 20, BOOT_MEM_RAM);
81} 81}
82 82
83unsigned long __init prom_free_prom_memory(void) 83void __init prom_free_prom_memory(void)
84{ 84{
85 return 0;
86} 85}
87 86
88const char *get_system_type(void) 87const char *get_system_type(void)
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index 735cb8778f4c..7316a78fdd68 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -137,6 +137,8 @@ int tx4927_using_backplane = 0;
137extern void gt64120_time_init(void); 137extern void gt64120_time_init(void);
138extern void toshiba_rbtx4927_irq_setup(void); 138extern void toshiba_rbtx4927_irq_setup(void);
139 139
140char *prom_getcmdline(void);
141
140#ifdef CONFIG_PCI 142#ifdef CONFIG_PCI
141#define CONFIG_TX4927BUG_WORKAROUND 143#define CONFIG_TX4927BUG_WORKAROUND
142#undef TX4927_SUPPORT_COMMAND_IO 144#undef TX4927_SUPPORT_COMMAND_IO
diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c
index a347b424d91c..3a2dbfc25014 100644
--- a/arch/mips/tx4938/common/irq.c
+++ b/arch/mips/tx4938/common/irq.c
@@ -49,7 +49,7 @@ static void tx4938_irq_pic_disable(unsigned int irq);
49 49
50#define TX4938_CP0_NAME "TX4938-CP0" 50#define TX4938_CP0_NAME "TX4938-CP0"
51static struct irq_chip tx4938_irq_cp0_type = { 51static struct irq_chip tx4938_irq_cp0_type = {
52 .typename = TX4938_CP0_NAME, 52 .name = TX4938_CP0_NAME,
53 .ack = tx4938_irq_cp0_disable, 53 .ack = tx4938_irq_cp0_disable,
54 .mask = tx4938_irq_cp0_disable, 54 .mask = tx4938_irq_cp0_disable,
55 .mask_ack = tx4938_irq_cp0_disable, 55 .mask_ack = tx4938_irq_cp0_disable,
@@ -58,7 +58,7 @@ static struct irq_chip tx4938_irq_cp0_type = {
58 58
59#define TX4938_PIC_NAME "TX4938-PIC" 59#define TX4938_PIC_NAME "TX4938-PIC"
60static struct irq_chip tx4938_irq_pic_type = { 60static struct irq_chip tx4938_irq_pic_type = {
61 .typename = TX4938_PIC_NAME, 61 .name = TX4938_PIC_NAME,
62 .ack = tx4938_irq_pic_disable, 62 .ack = tx4938_irq_pic_disable,
63 .mask = tx4938_irq_pic_disable, 63 .mask = tx4938_irq_pic_disable,
64 .mask_ack = tx4938_irq_pic_disable, 64 .mask_ack = tx4938_irq_pic_disable,
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index b6f363d08011..2e96dbb248b1 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -92,7 +92,7 @@ static void toshiba_rbtx4938_irq_ioc_disable(unsigned int irq);
92 92
93#define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC" 93#define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC"
94static struct irq_chip toshiba_rbtx4938_irq_ioc_type = { 94static struct irq_chip toshiba_rbtx4938_irq_ioc_type = {
95 .typename = TOSHIBA_RBTX4938_IOC_NAME, 95 .name = TOSHIBA_RBTX4938_IOC_NAME,
96 .ack = toshiba_rbtx4938_irq_ioc_disable, 96 .ack = toshiba_rbtx4938_irq_ioc_disable,
97 .mask = toshiba_rbtx4938_irq_ioc_disable, 97 .mask = toshiba_rbtx4938_irq_ioc_disable,
98 .mask_ack = toshiba_rbtx4938_irq_ioc_disable, 98 .mask_ack = toshiba_rbtx4938_irq_ioc_disable,
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c
index e44daf30a7c1..7dc6a0aae21c 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/prom.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c
@@ -56,9 +56,8 @@ void __init prom_init(void)
56 return; 56 return;
57} 57}
58 58
59unsigned long __init prom_free_prom_memory(void) 59void __init prom_free_prom_memory(void)
60{ 60{
61 return 0;
62} 61}
63 62
64void __init prom_fixup_mem_map(unsigned long start, unsigned long end) 63void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
index c075261976c5..adabc6bad440 100644
--- a/arch/mips/vr41xx/common/icu.c
+++ b/arch/mips/vr41xx/common/icu.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2001-2002 MontaVista Software Inc. 4 * Copyright (C) 2001-2002 MontaVista Software Inc.
5 * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> 5 * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
6 * Copyright (C) 2003-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> 6 * Copyright (C) 2003-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
7 * 7 *
8 * 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
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -68,6 +68,7 @@ static unsigned char sysint2_assign[16] = {
68#define MPIUINTREG 0x0e 68#define MPIUINTREG 0x0e
69#define MAIUINTREG 0x10 69#define MAIUINTREG 0x10
70#define MKIUINTREG 0x12 70#define MKIUINTREG 0x12
71#define MMACINTREG 0x12
71#define MGIUINTLREG 0x14 72#define MGIUINTLREG 0x14
72#define MDSIUINTREG 0x16 73#define MDSIUINTREG 0x16
73#define NMIREG 0x18 74#define NMIREG 0x18
@@ -241,6 +242,30 @@ void vr41xx_disable_kiuint(uint16_t mask)
241 242
242EXPORT_SYMBOL(vr41xx_disable_kiuint); 243EXPORT_SYMBOL(vr41xx_disable_kiuint);
243 244
245void vr41xx_enable_macint(uint16_t mask)
246{
247 struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
248 unsigned long flags;
249
250 spin_lock_irqsave(&desc->lock, flags);
251 icu1_set(MMACINTREG, mask);
252 spin_unlock_irqrestore(&desc->lock, flags);
253}
254
255EXPORT_SYMBOL(vr41xx_enable_macint);
256
257void vr41xx_disable_macint(uint16_t mask)
258{
259 struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
260 unsigned long flags;
261
262 spin_lock_irqsave(&desc->lock, flags);
263 icu1_clear(MMACINTREG, mask);
264 spin_unlock_irqrestore(&desc->lock, flags);
265}
266
267EXPORT_SYMBOL(vr41xx_disable_macint);
268
244void vr41xx_enable_dsiuint(uint16_t mask) 269void vr41xx_enable_dsiuint(uint16_t mask)
245{ 270{
246 struct irq_desc *desc = irq_desc + DSIU_IRQ; 271 struct irq_desc *desc = irq_desc + DSIU_IRQ;
@@ -428,7 +453,7 @@ static void enable_sysint1_irq(unsigned int irq)
428} 453}
429 454
430static struct irq_chip sysint1_irq_type = { 455static struct irq_chip sysint1_irq_type = {
431 .typename = "SYSINT1", 456 .name = "SYSINT1",
432 .ack = disable_sysint1_irq, 457 .ack = disable_sysint1_irq,
433 .mask = disable_sysint1_irq, 458 .mask = disable_sysint1_irq,
434 .mask_ack = disable_sysint1_irq, 459 .mask_ack = disable_sysint1_irq,
@@ -446,7 +471,7 @@ static void enable_sysint2_irq(unsigned int irq)
446} 471}
447 472
448static struct irq_chip sysint2_irq_type = { 473static struct irq_chip sysint2_irq_type = {
449 .typename = "SYSINT2", 474 .name = "SYSINT2",
450 .ack = disable_sysint2_irq, 475 .ack = disable_sysint2_irq,
451 .mask = disable_sysint2_irq, 476 .mask = disable_sysint2_irq,
452 .mask_ack = disable_sysint2_irq, 477 .mask_ack = disable_sysint2_irq,
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
index a2e285c1d4d5..4f97e0ba9e24 100644
--- a/arch/mips/vr41xx/common/init.c
+++ b/arch/mips/vr41xx/common/init.c
@@ -81,7 +81,6 @@ void __init prom_init(void)
81 } 81 }
82} 82}
83 83
84unsigned long __init prom_free_prom_memory (void) 84void __init prom_free_prom_memory(void)
85{ 85{
86 return 0UL;
87} 86}
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index 16decf4ac2f4..cba36a247e32 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -95,27 +95,27 @@ asmlinkage void plat_irq_dispatch(void)
95 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 95 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
96 96
97 if (pending & CAUSEF_IP7) 97 if (pending & CAUSEF_IP7)
98 do_IRQ(7); 98 do_IRQ(TIMER_IRQ);
99 else if (pending & 0x7800) { 99 else if (pending & 0x7800) {
100 if (pending & CAUSEF_IP3) 100 if (pending & CAUSEF_IP3)
101 irq_dispatch(3); 101 irq_dispatch(INT1_IRQ);
102 else if (pending & CAUSEF_IP4) 102 else if (pending & CAUSEF_IP4)
103 irq_dispatch(4); 103 irq_dispatch(INT2_IRQ);
104 else if (pending & CAUSEF_IP5) 104 else if (pending & CAUSEF_IP5)
105 irq_dispatch(5); 105 irq_dispatch(INT3_IRQ);
106 else if (pending & CAUSEF_IP6) 106 else if (pending & CAUSEF_IP6)
107 irq_dispatch(6); 107 irq_dispatch(INT4_IRQ);
108 } else if (pending & CAUSEF_IP2) 108 } else if (pending & CAUSEF_IP2)
109 irq_dispatch(2); 109 irq_dispatch(INT0_IRQ);
110 else if (pending & CAUSEF_IP0) 110 else if (pending & CAUSEF_IP0)
111 do_IRQ(0); 111 do_IRQ(MIPS_SOFTINT0_IRQ);
112 else if (pending & CAUSEF_IP1) 112 else if (pending & CAUSEF_IP1)
113 do_IRQ(1); 113 do_IRQ(MIPS_SOFTINT1_IRQ);
114 else 114 else
115 spurious_interrupt(); 115 spurious_interrupt();
116} 116}
117 117
118void __init arch_init_irq(void) 118void __init arch_init_irq(void)
119{ 119{
120 mips_cpu_irq_init(MIPS_CPU_IRQ_BASE); 120 mips_cpu_irq_init();
121} 121}
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c
index 128ed8d6f111..7d2d076b0f54 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c
@@ -21,60 +21,16 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22 22
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/i8259.h>
24#include <asm/vr41xx/cmbvr4133.h> 25#include <asm/vr41xx/cmbvr4133.h>
25 26
26extern void enable_8259A_irq(unsigned int irq);
27extern void disable_8259A_irq(unsigned int irq);
28extern void mask_and_ack_8259A(unsigned int irq);
29extern void init_8259A(int hoge);
30
31extern int vr4133_rockhopper; 27extern int vr4133_rockhopper;
32 28
33static void enable_i8259_irq(unsigned int irq)
34{
35 enable_8259A_irq(irq - I8259_IRQ_BASE);
36}
37
38static void disable_i8259_irq(unsigned int irq)
39{
40 disable_8259A_irq(irq - I8259_IRQ_BASE);
41}
42
43static void ack_i8259_irq(unsigned int irq)
44{
45 mask_and_ack_8259A(irq - I8259_IRQ_BASE);
46}
47
48static struct irq_chip i8259_irq_type = {
49 .typename = "XT-PIC",
50 .ack = ack_i8259_irq,
51 .mask = disable_i8259_irq,
52 .mask_ack = ack_i8259_irq,
53 .unmask = enable_i8259_irq,
54};
55
56static int i8259_get_irq_number(int irq) 29static int i8259_get_irq_number(int irq)
57{ 30{
58 unsigned long isr; 31 return i8259_irq();
59
60 isr = inb(0x20);
61 irq = ffz(~isr);
62 if (irq == 2) {
63 isr = inb(0xa0);
64 irq = 8 + ffz(~isr);
65 }
66
67 if (irq < 0 || irq > 15)
68 return -EINVAL;
69
70 return I8259_IRQ_BASE + irq;
71} 32}
72 33
73static struct irqaction i8259_slave_cascade = {
74 .handler = &no_action,
75 .name = "cascade",
76};
77
78void __init rockhopper_init_irq(void) 34void __init rockhopper_init_irq(void)
79{ 35{
80 int i; 36 int i;
@@ -84,11 +40,6 @@ void __init rockhopper_init_irq(void)
84 return; 40 return;
85 } 41 }
86 42
87 for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++)
88 set_irq_chip_and_handler(i, &i8259_irq_type, handle_level_irq);
89
90 setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade);
91
92 vr41xx_set_irq_trigger(CMBVR41XX_INTC_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH); 43 vr41xx_set_irq_trigger(CMBVR41XX_INTC_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH);
93 vr41xx_set_irq_level(CMBVR41XX_INTC_PIN, LEVEL_HIGH); 44 vr41xx_set_irq_level(CMBVR41XX_INTC_PIN, LEVEL_HIGH);
94 vr41xx_cascade_irq(CMBVR41XX_INTC_IRQ, i8259_get_irq_number); 45 vr41xx_cascade_irq(CMBVR41XX_INTC_IRQ, i8259_get_irq_number);
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index e18eeecae850..3d73545e8c48 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -59,9 +59,6 @@ config TIME_LOW_RES
59 depends on SMP 59 depends on SMP
60 default y 60 default y
61 61
62config GENERIC_ISA_DMA
63 bool
64
65config GENERIC_HARDIRQS 62config GENERIC_HARDIRQS
66 def_bool y 63 def_bool y
67 64
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index ac8ee205c351..a46bc62b643e 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -479,7 +479,7 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
479 return error; 479 return error;
480} 480}
481 481
482static struct file_operations perf_fops = { 482static const struct file_operations perf_fops = {
483 .llseek = no_llseek, 483 .llseek = no_llseek,
484 .read = perf_read, 484 .read = perf_read,
485 .write = perf_write, 485 .write = perf_write,
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 21b9fb17b409..bd2116e03f34 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -45,7 +45,7 @@
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/setup.h> 46#include <asm/setup.h>
47 47
48char command_line[COMMAND_LINE_SIZE] __read_mostly; 48char __initdata command_line[COMMAND_LINE_SIZE] __read_mostly;
49 49
50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ 50/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
51struct proc_dir_entry * proc_runway_root __read_mostly = NULL; 51struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
@@ -71,9 +71,9 @@ void __init setup_cmdline(char **cmdline_p)
71 /* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */ 71 /* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */
72 if (boot_args[0] < 64) { 72 if (boot_args[0] < 64) {
73 /* called from hpux boot loader */ 73 /* called from hpux boot loader */
74 saved_command_line[0] = '\0'; 74 boot_command_line[0] = '\0';
75 } else { 75 } else {
76 strcpy(saved_command_line, (char *)__va(boot_args[1])); 76 strcpy(boot_command_line, (char *)__va(boot_args[1]));
77 77
78#ifdef CONFIG_BLK_DEV_INITRD 78#ifdef CONFIG_BLK_DEV_INITRD
79 if (boot_args[2] != 0) /* did palo pass us a ramdisk? */ 79 if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
@@ -84,7 +84,7 @@ void __init setup_cmdline(char **cmdline_p)
84#endif 84#endif
85 } 85 }
86 86
87 strcpy(command_line, saved_command_line); 87 strcpy(command_line, boot_command_line);
88 *cmdline_p = command_line; 88 *cmdline_p = command_line;
89} 89}
90 90
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 29be4377aca6..ce3245f87fdd 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -579,70 +579,6 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off
579} 579}
580 580
581 581
582struct sysinfo32 {
583 s32 uptime;
584 u32 loads[3];
585 u32 totalram;
586 u32 freeram;
587 u32 sharedram;
588 u32 bufferram;
589 u32 totalswap;
590 u32 freeswap;
591 unsigned short procs;
592 u32 totalhigh;
593 u32 freehigh;
594 u32 mem_unit;
595 char _f[12];
596};
597
598/* We used to call sys_sysinfo and translate the result. But sys_sysinfo
599 * undoes the good work done elsewhere, and rather than undoing the
600 * damage, I decided to just duplicate the code from sys_sysinfo here.
601 */
602
603asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info)
604{
605 struct sysinfo val;
606 int err;
607 unsigned long seq;
608
609 /* We don't need a memset here because we copy the
610 * struct to userspace once element at a time.
611 */
612
613 do {
614 seq = read_seqbegin(&xtime_lock);
615 val.uptime = jiffies / HZ;
616
617 val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
618 val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
619 val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
620
621 val.procs = nr_threads;
622 } while (read_seqretry(&xtime_lock, seq));
623
624
625 si_meminfo(&val);
626 si_swapinfo(&val);
627
628 err = put_user (val.uptime, &info->uptime);
629 err |= __put_user (val.loads[0], &info->loads[0]);
630 err |= __put_user (val.loads[1], &info->loads[1]);
631 err |= __put_user (val.loads[2], &info->loads[2]);
632 err |= __put_user (val.totalram, &info->totalram);
633 err |= __put_user (val.freeram, &info->freeram);
634 err |= __put_user (val.sharedram, &info->sharedram);
635 err |= __put_user (val.bufferram, &info->bufferram);
636 err |= __put_user (val.totalswap, &info->totalswap);
637 err |= __put_user (val.freeswap, &info->freeswap);
638 err |= __put_user (val.procs, &info->procs);
639 err |= __put_user (val.totalhigh, &info->totalhigh);
640 err |= __put_user (val.freehigh, &info->freehigh);
641 err |= __put_user (val.mem_unit, &info->mem_unit);
642 return err ? -EFAULT : 0;
643}
644
645
646/* lseek() needs a wrapper because 'offset' can be negative, but the top 582/* lseek() needs a wrapper because 'offset' can be negative, but the top
647 * half of the argument has been zeroed by syscall.S. 583 * half of the argument has been zeroed by syscall.S.
648 */ 584 */
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 7d665de6bd04..8bf87e5d9c37 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -197,7 +197,7 @@
197 /* struct rusage contains longs... */ 197 /* struct rusage contains longs... */
198 ENTRY_COMP(wait4) 198 ENTRY_COMP(wait4)
199 ENTRY_SAME(swapoff) /* 115 */ 199 ENTRY_SAME(swapoff) /* 115 */
200 ENTRY_DIFF(sysinfo) 200 ENTRY_COMP(sysinfo)
201 ENTRY_SAME(shutdown) 201 ENTRY_SAME(shutdown)
202 ENTRY_SAME(fsync) 202 ENTRY_SAME(fsync)
203 ENTRY_SAME(madvise) 203 ENTRY_SAME(madvise)
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index ccdce6ef67cc..d1db8e518654 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -205,17 +205,6 @@ static int cr16_update_callback(void)
205} 205}
206 206
207 207
208/*
209 * XXX: We can do better than this.
210 * Returns nanoseconds
211 */
212
213unsigned long long sched_clock(void)
214{
215 return (unsigned long long)jiffies * (1000000000 / HZ);
216}
217
218
219void __init start_cpu_itimer(void) 208void __init start_cpu_itimer(void)
220{ 209{
221 unsigned int cpu = smp_processor_id(); 210 unsigned int cpu = smp_processor_id();
diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c
index 068b20d822e7..d71cb018a21e 100644
--- a/arch/parisc/kernel/topology.c
+++ b/arch/parisc/kernel/topology.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/parisc/kernel/topology.c - Populate driverfs with topology information 2 * arch/parisc/kernel/topology.c - Populate sysfs with topology information
3 * 3 *
4 * 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
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 7b149df9d422..2a8253358c6c 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -175,10 +175,12 @@ SECTIONS
175 from .altinstructions and .eh_frame */ 175 from .altinstructions and .eh_frame */
176 .exit.text : { *(.exit.text) } 176 .exit.text : { *(.exit.text) }
177 .exit.data : { *(.exit.data) } 177 .exit.data : { *(.exit.data) }
178#ifdef CONFIG_BLK_DEV_INITRD
178 . = ALIGN(ASM_PAGE_SIZE); 179 . = ALIGN(ASM_PAGE_SIZE);
179 __initramfs_start = .; 180 __initramfs_start = .;
180 .init.ramfs : { *(.init.ramfs) } 181 .init.ramfs : { *(.init.ramfs) }
181 __initramfs_end = .; 182 __initramfs_end = .;
183#endif
182 . = ALIGN(32); 184 . = ALIGN(32);
183 __per_cpu_start = .; 185 __per_cpu_start = .;
184 .data.percpu : { *(.data.percpu) } 186 .data.percpu : { *(.data.percpu) }
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 8a3b71a26fde..75ea9f2a8a41 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -78,12 +78,11 @@ static void __init mem_limit_func(void)
78{ 78{
79 char *cp, *end; 79 char *cp, *end;
80 unsigned long limit; 80 unsigned long limit;
81 extern char saved_command_line[];
82 81
83 /* We need this before __setup() functions are called */ 82 /* We need this before __setup() functions are called */
84 83
85 limit = MAX_MEM; 84 limit = MAX_MEM;
86 for (cp = saved_command_line; *cp; ) { 85 for (cp = boot_command_line; *cp; ) {
87 if (memcmp(cp, "mem=", 4) == 0) { 86 if (memcmp(cp, "mem=", 4) == 0) {
88 cp += 4; 87 cp += 4;
89 limit = memparse(cp, &end); 88 limit = memparse(cp, &end);
@@ -868,9 +867,7 @@ void __init paging_init(void)
868 for (i = 0; i < npmem_ranges; i++) { 867 for (i = 0; i < npmem_ranges; i++) {
869 unsigned long zones_size[MAX_NR_ZONES] = { 0, }; 868 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
870 869
871 /* We have an IOMMU, so all memory can go into a single 870 zones_size[ZONE_NORMAL] = pmem_ranges[i].pages;
872 ZONE_DMA zone. */
873 zones_size[ZONE_DMA] = pmem_ranges[i].pages;
874 871
875#ifdef CONFIG_DISCONTIGMEM 872#ifdef CONFIG_DISCONTIGMEM
876 /* Need to initialize the pfnnid_map before we can initialize 873 /* Need to initialize the pfnnid_map before we can initialize
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d6abe495c6b0..6dfbd52694ab 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -173,6 +173,11 @@ config PPC_86xx
173 help 173 help
174 The Freescale E600 SoCs have 74xx cores. 174 The Freescale E600 SoCs have 74xx cores.
175 175
176config PPC_8xx
177 bool "Freescale 8xx"
178 select FSL_SOC
179 select 8xx
180
176config 40x 181config 40x
177 bool "AMCC 40x" 182 bool "AMCC 40x"
178 select PPC_DCR_NATIVE 183 select PPC_DCR_NATIVE
@@ -181,8 +186,6 @@ config 44x
181 bool "AMCC 44x" 186 bool "AMCC 44x"
182 select PPC_DCR_NATIVE 187 select PPC_DCR_NATIVE
183 188
184config 8xx
185 bool "Freescale 8xx"
186 189
187config E200 190config E200
188 bool "Freescale e200" 191 bool "Freescale e200"
@@ -211,6 +214,10 @@ config 6xx
211 bool 214 bool
212 215
213# this is temp to handle compat with arch=ppc 216# this is temp to handle compat with arch=ppc
217config 8xx
218 bool
219
220# this is temp to handle compat with arch=ppc
214config 83xx 221config 83xx
215 bool 222 bool
216 223
@@ -429,6 +436,21 @@ config PPC_MPC52xx
429 bool 436 bool
430 default n 437 default n
431 438
439config PPC_MPC5200
440 bool
441 select PPC_MPC52xx
442 default n
443
444config PPC_MPC5200_BUGFIX
445 bool "MPC5200 (L25R) bugfix support"
446 depends on PPC_MPC5200
447 default n
448 help
449 Enable workarounds for original MPC5200 errata. This is not required
450 for MPC5200B based boards.
451
452 It is safe to say 'Y' here
453
432config PPC_EFIKA 454config PPC_EFIKA
433 bool "bPlan Efika 5k2. MPC5200B based computer" 455 bool "bPlan Efika 5k2. MPC5200B based computer"
434 depends on PPC_MULTIPLATFORM && PPC32 456 depends on PPC_MULTIPLATFORM && PPC32
@@ -441,7 +463,7 @@ config PPC_EFIKA
441config PPC_LITE5200 463config PPC_LITE5200
442 bool "Freescale Lite5200 Eval Board" 464 bool "Freescale Lite5200 Eval Board"
443 depends on PPC_MULTIPLATFORM && PPC32 465 depends on PPC_MULTIPLATFORM && PPC32
444 select PPC_MPC52xx 466 select PPC_MPC5200
445 default n 467 default n
446 468
447config PPC_PMAC 469config PPC_PMAC
@@ -484,6 +506,7 @@ config PPC_MAPLE
484 select PPC_970_NAP 506 select PPC_970_NAP
485 select PPC_NATIVE 507 select PPC_NATIVE
486 select PPC_RTAS 508 select PPC_RTAS
509 select MMIO_NVRAM
487 select ATA_NONSTANDARD if ATA 510 select ATA_NONSTANDARD if ATA
488 default n 511 default n
489 help 512 help
@@ -529,6 +552,11 @@ config PPC_PS3
529 bool "Sony PS3 (incomplete)" 552 bool "Sony PS3 (incomplete)"
530 depends on PPC_MULTIPLATFORM && PPC64 553 depends on PPC_MULTIPLATFORM && PPC64
531 select PPC_CELL 554 select PPC_CELL
555 select USB_ARCH_HAS_OHCI
556 select USB_OHCI_LITTLE_ENDIAN
557 select USB_OHCI_BIG_ENDIAN_MMIO
558 select USB_ARCH_HAS_EHCI
559 select USB_EHCI_BIG_ENDIAN_MMIO
532 help 560 help
533 This option enables support for the Sony PS3 game console 561 This option enables support for the Sony PS3 game console
534 and other platforms using the PS3 hypervisor. 562 and other platforms using the PS3 hypervisor.
@@ -536,6 +564,16 @@ config PPC_PS3
536 enabling this will not result in a bootable kernel on a 564 enabling this will not result in a bootable kernel on a
537 PS3 system. 565 PS3 system.
538 566
567config PPC_CELLEB
568 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
569 depends on PPC_MULTIPLATFORM && PPC64
570 select PPC_CELL
571 select PPC_OF_PLATFORM_PCI
572 select HAS_TXX9_SERIAL
573 select PPC_UDBG_BEAT
574 select USB_OHCI_BIG_ENDIAN_MMIO
575 select USB_EHCI_BIG_ENDIAN_MMIO
576
539config PPC_NATIVE 577config PPC_NATIVE
540 bool 578 bool
541 depends on PPC_MULTIPLATFORM 579 depends on PPC_MULTIPLATFORM
@@ -549,6 +587,11 @@ config UDBG_RTAS_CONSOLE
549 depends on PPC_RTAS 587 depends on PPC_RTAS
550 default n 588 default n
551 589
590config PPC_UDBG_BEAT
591 bool "BEAT based debug console"
592 depends on PPC_CELLEB
593 default n
594
552config XICS 595config XICS
553 depends on PPC_PSERIES 596 depends on PPC_PSERIES
554 bool 597 bool
@@ -577,6 +620,15 @@ config RTAS_FLASH
577 tristate "Firmware flash interface" 620 tristate "Firmware flash interface"
578 depends on PPC64 && RTAS_PROC 621 depends on PPC64 && RTAS_PROC
579 622
623config PPC_PMI
624 tristate "Support for PMI"
625 depends PPC_IBM_CELL_BLADE
626 help
627 PMI (Platform Management Interrupt) is a way to
628 communicate with the BMC (Baseboard Mangement Controller).
629 It is used in some IBM Cell blades.
630 default m
631
580config MMIO_NVRAM 632config MMIO_NVRAM
581 bool 633 bool
582 default n 634 default n
@@ -702,6 +754,7 @@ source arch/powerpc/platforms/86xx/Kconfig
702source arch/powerpc/platforms/8xx/Kconfig 754source arch/powerpc/platforms/8xx/Kconfig
703source arch/powerpc/platforms/cell/Kconfig 755source arch/powerpc/platforms/cell/Kconfig
704source arch/powerpc/platforms/ps3/Kconfig 756source arch/powerpc/platforms/ps3/Kconfig
757source arch/powerpc/platforms/pasemi/Kconfig
705 758
706menu "Kernel options" 759menu "Kernel options"
707 760
@@ -724,7 +777,7 @@ config FORCE_MAX_ZONEORDER
724 777
725config MATH_EMULATION 778config MATH_EMULATION
726 bool "Math emulation" 779 bool "Math emulation"
727 depends on 4xx || 8xx || E200 || PPC_83xx || E500 780 depends on 4xx || 8xx || E200 || PPC_MPC832x || E500
728 ---help--- 781 ---help---
729 Some PowerPC chips designed for embedded applications do not have 782 Some PowerPC chips designed for embedded applications do not have
730 a floating-point unit and therefore do not implement the 783 a floating-point unit and therefore do not implement the
@@ -832,7 +885,7 @@ config ARCH_SPARSEMEM_ENABLE
832 885
833config ARCH_SPARSEMEM_DEFAULT 886config ARCH_SPARSEMEM_DEFAULT
834 def_bool y 887 def_bool y
835 depends on (SMP && PPC_PSERIES) || PPC_CELL 888 depends on (SMP && PPC_PSERIES) || PPC_PS3
836 889
837config ARCH_POPULATES_NODE_MAP 890config ARCH_POPULATES_NODE_MAP
838 def_bool y 891 def_bool y
@@ -933,6 +986,10 @@ config ISA
933 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If 986 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
934 you have an embedded board, consult your board documentation. 987 you have an embedded board, consult your board documentation.
935 988
989config ZONE_DMA
990 bool
991 default y
992
936config GENERIC_ISA_DMA 993config GENERIC_ISA_DMA
937 bool 994 bool
938 depends on PPC64 || POWER4 || 6xx && !CPM2 995 depends on PPC64 || POWER4 || 6xx && !CPM2
@@ -1182,7 +1239,7 @@ source "arch/powerpc/oprofile/Kconfig"
1182 1239
1183config KPROBES 1240config KPROBES
1184 bool "Kprobes (EXPERIMENTAL)" 1241 bool "Kprobes (EXPERIMENTAL)"
1185 depends on PPC64 && KALLSYMS && EXPERIMENTAL && MODULES 1242 depends on !BOOKE && !4xx && KALLSYMS && EXPERIMENTAL && MODULES
1186 help 1243 help
1187 Kprobes allows you to trap at almost any kernel address and 1244 Kprobes allows you to trap at almost any kernel address and
1188 execute a callback function. register_kprobe() establishes 1245 execute a callback function. register_kprobe() establishes
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index f0e51edde022..d39d13327e6d 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -4,14 +4,14 @@ source "lib/Kconfig.debug"
4 4
5config DEBUG_STACKOVERFLOW 5config DEBUG_STACKOVERFLOW
6 bool "Check for stack overflows" 6 bool "Check for stack overflows"
7 depends on DEBUG_KERNEL && PPC64 7 depends on DEBUG_KERNEL
8 help 8 help
9 This option will cause messages to be printed if free stack space 9 This option will cause messages to be printed if free stack space
10 drops below a certain limit. 10 drops below a certain limit.
11 11
12config DEBUG_STACK_USAGE 12config DEBUG_STACK_USAGE
13 bool "Stack utilization instrumentation" 13 bool "Stack utilization instrumentation"
14 depends on DEBUG_KERNEL && PPC64 14 depends on DEBUG_KERNEL
15 help 15 help
16 Enables the display of the minimum amount of free stack which each 16 Enables the display of the minimum amount of free stack which each
17 task has ever had available in the sysrq-T and sysrq-P debug output. 17 task has ever had available in the sysrq-T and sysrq-P debug output.
@@ -185,6 +185,20 @@ config PPC_EARLY_DEBUG_ISERIES
185 Select this to enable early debugging for legacy iSeries. You need 185 Select this to enable early debugging for legacy iSeries. You need
186 to hit "Ctrl-x Ctrl-x" to see the messages on the console. 186 to hit "Ctrl-x Ctrl-x" to see the messages on the console.
187 187
188config PPC_EARLY_DEBUG_PAS_REALMODE
189 bool "PA Semi real mode"
190 depends on PPC_PASEMI
191 help
192 Select this to enable early debugging for PA Semi.
193 Output will be on UART0.
194
195config PPC_EARLY_DEBUG_BEAT
196 bool "Beat HV Console"
197 depends on PPC_CELLEB
198 select PPC_UDBG_BEAT
199 help
200 Select this to enable early debugging for Celleb with Beat.
201
188endchoice 202endchoice
189 203
190endmenu 204endmenu
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 98392fb5f581..dc779407de14 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -162,6 +162,7 @@ image-$(CONFIG_PPC_PSERIES) += zImage.pseries
162image-$(CONFIG_PPC_MAPLE) += zImage.pseries 162image-$(CONFIG_PPC_MAPLE) += zImage.pseries
163image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries 163image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
164image-$(CONFIG_PPC_PS3) += zImage.ps3 164image-$(CONFIG_PPC_PS3) += zImage.ps3
165image-$(CONFIG_PPC_CELLEB) += zImage.pseries
165image-$(CONFIG_PPC_CHRP) += zImage.chrp 166image-$(CONFIG_PPC_CHRP) += zImage.chrp
166image-$(CONFIG_PPC_EFIKA) += zImage.chrp 167image-$(CONFIG_PPC_EFIKA) += zImage.chrp
167image-$(CONFIG_PPC_PMAC) += zImage.pmac 168image-$(CONFIG_PPC_PMAC) += zImage.pmac
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
new file mode 100644
index 000000000000..b89791802e86
--- /dev/null
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -0,0 +1,147 @@
1/*
2 * Device Tree Souce for Buffalo KuroboxHD
3 *
4 * Choose CONFIG_LINKSTATION to build a kernel for KuroboxHD, or use
5 * the default configuration linkstation_defconfig.
6 *
7 * Based on sandpoint.dts
8 *
9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de>
10 *
11 * This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15
16XXXX add flash parts, rtc, ??
17
18build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
19
20
21 */
22
23/ {
24 linux,phandle = <1000>;
25 model = "KuroboxHD";
26 compatible = "linkstation";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 cpus {
31 linux,phandle = <2000>;
32 #cpus = <1>;
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,603e { /* Really 8241 */
37 linux,phandle = <2100>;
38 device_type = "cpu";
39 reg = <0>;
40 clock-frequency = <bebc200>; /* Fixed by bootwrapper */
41 timebase-frequency = <1743000>; /* Fixed by bootwrapper */
42 bus-frequency = <0>; /* From bootloader */
43 /* Following required by dtc but not used */
44 i-cache-line-size = <0>;
45 d-cache-line-size = <0>;
46 i-cache-size = <4000>;
47 d-cache-size = <4000>;
48 };
49 };
50
51 memory {
52 linux,phandle = <3000>;
53 device_type = "memory";
54 reg = <00000000 04000000>;
55 };
56
57 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */
58 linux,phandle = <4000>;
59 #address-cells = <1>;
60 #size-cells = <1>;
61 #interrupt-cells = <2>;
62 device_type = "soc";
63 compatible = "mpc10x";
64 store-gathering = <0>; /* 0 == off, !0 == on */
65 reg = <80000000 00100000>;
66 ranges = <80000000 80000000 70000000 /* pci mem space */
67 fc000000 fc000000 00100000 /* EUMB */
68 fe000000 fe000000 00c00000 /* pci i/o space */
69 fec00000 fec00000 00300000 /* pci cfg regs */
70 fef00000 fef00000 00100000>; /* pci iack */
71
72 i2c@80003000 {
73 linux,phandle = <4300>;
74 device_type = "i2c";
75 compatible = "fsl-i2c";
76 reg = <80003000 1000>;
77 interrupts = <5 2>;
78 interrupt-parent = <4400>;
79 };
80
81 serial@80004500 {
82 linux,phandle = <4511>;
83 device_type = "serial";
84 compatible = "ns16550";
85 reg = <80004500 8>;
86 clock-frequency = <5d08d88>;
87 current-speed = <2580>;
88 interrupts = <9 2>;
89 interrupt-parent = <4400>;
90 };
91
92 serial@80004600 {
93 linux,phandle = <4512>;
94 device_type = "serial";
95 compatible = "ns16550";
96 reg = <80004600 8>;
97 clock-frequency = <5d08d88>;
98 current-speed = <e100>;
99 interrupts = <a 0>;
100 interrupt-parent = <4400>;
101 };
102
103 pic@80040000 {
104 linux,phandle = <4400>;
105 #interrupt-cells = <2>;
106 #address-cells = <0>;
107 device_type = "open-pic";
108 compatible = "chrp,open-pic";
109 interrupt-controller;
110 reg = <80040000 40000>;
111 built-in;
112 };
113
114 pci@fec00000 {
115 linux,phandle = <4500>;
116 #address-cells = <3>;
117 #size-cells = <2>;
118 #interrupt-cells = <1>;
119 device_type = "pci";
120 compatible = "mpc10x-pci";
121 reg = <fec00000 400000>;
122 ranges = <01000000 0 0 fe000000 0 00c00000
123 02000000 0 80000000 80000000 0 70000000>;
124 bus-range = <0 ff>;
125 clock-frequency = <7f28155>;
126 interrupt-parent = <4400>;
127 interrupt-map-mask = <f800 0 0 7>;
128 interrupt-map = <
129 /* IDSEL 0x11 - IRQ0 ETH */
130 5800 0 0 1 4400 0 1
131 5800 0 0 2 4400 1 1
132 5800 0 0 3 4400 2 1
133 5800 0 0 4 4400 3 1
134 /* IDSEL 0x12 - IRQ1 IDE0 */
135 6000 0 0 1 4400 1 1
136 6000 0 0 2 4400 2 1
137 6000 0 0 3 4400 3 1
138 6000 0 0 4 4400 0 1
139 /* IDSEL 0x14 - IRQ3 USB2.0 */
140 7000 0 0 1 4400 3 1
141 7000 0 0 2 4400 3 1
142 7000 0 0 3 4400 3 1
143 7000 0 0 4 4400 3 1
144 >;
145 };
146 };
147};
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index d06b0b018899..753102752d8b 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
35 35
36 PowerPC,603e { /* Really 8241 */ 36 PowerPC,603e { /* Really 8241 */
37 linux,phandle = <2100>; 37 linux,phandle = <2100>;
38 linux,boot-cpu;
39 device_type = "cpu"; 38 device_type = "cpu";
40 reg = <0>; 39 reg = <0>;
41 clock-frequency = <fdad680>; /* Fixed by bootwrapper */ 40 clock-frequency = <fdad680>; /* Fixed by bootwrapper */
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 186870704ad9..c03103c63285 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Lite5200 board Device Tree Source 2 * Lite5200 board Device Tree Source
3 * 3 *
4 * Copyright 2006 Secret Lab Technologies Ltd. 4 * Copyright 2006-2007 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca> 5 * Grant Likely <grant.likely@secretlab.ca>
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
@@ -17,8 +17,9 @@
17 */ 17 */
18 18
19/ { 19/ {
20 model = "Lite5200"; 20 model = "fsl,lite5200";
21 compatible = "lite5200\0lite52xx\0mpc5200\0mpc52xx"; 21 // revision = "1.0";
22 compatible = "fsl,lite5200\0generic-mpc5200";
22 #address-cells = <1>; 23 #address-cells = <1>;
23 #size-cells = <1>; 24 #size-cells = <1>;
24 25
@@ -47,14 +48,17 @@
47 }; 48 };
48 49
49 soc5200@f0000000 { 50 soc5200@f0000000 {
51 model = "fsl,mpc5200";
52 revision = "" // from bootloader
50 #interrupt-cells = <3>; 53 #interrupt-cells = <3>;
51 device_type = "soc"; 54 device_type = "soc";
52 ranges = <0 f0000000 f0010000>; 55 ranges = <0 f0000000 f0010000>;
53 reg = <f0000000 00010000>; 56 reg = <f0000000 00010000>;
54 bus-frequency = <0>; // from bootloader 57 bus-frequency = <0>; // from bootloader
58 system-frequency = <0>; // from bootloader
55 59
56 cdm@200 { 60 cdm@200 {
57 compatible = "mpc5200-cdm\0mpc52xx-cdm"; 61 compatible = "mpc5200-cdm";
58 reg = <200 38>; 62 reg = <200 38>;
59 }; 63 };
60 64
@@ -64,77 +68,86 @@
64 interrupt-controller; 68 interrupt-controller;
65 #interrupt-cells = <3>; 69 #interrupt-cells = <3>;
66 device_type = "interrupt-controller"; 70 device_type = "interrupt-controller";
67 compatible = "mpc5200-pic\0mpc52xx-pic"; 71 compatible = "mpc5200-pic";
68 reg = <500 80>; 72 reg = <500 80>;
69 built-in; 73 built-in;
70 }; 74 };
71 75
72 gpt@600 { // General Purpose Timer 76 gpt@600 { // General Purpose Timer
73 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 77 compatible = "mpc5200-gpt";
74 device_type = "gpt"; 78 device_type = "gpt";
79 cell-index = <0>;
75 reg = <600 10>; 80 reg = <600 10>;
76 interrupts = <1 9 0>; 81 interrupts = <1 9 0>;
77 interrupt-parent = <500>; 82 interrupt-parent = <500>;
83 has-wdt;
78 }; 84 };
79 85
80 gpt@610 { // General Purpose Timer 86 gpt@610 { // General Purpose Timer
81 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 87 compatible = "mpc5200-gpt";
82 device_type = "gpt"; 88 device_type = "gpt";
89 cell-index = <1>;
83 reg = <610 10>; 90 reg = <610 10>;
84 interrupts = <1 a 0>; 91 interrupts = <1 a 0>;
85 interrupt-parent = <500>; 92 interrupt-parent = <500>;
86 }; 93 };
87 94
88 gpt@620 { // General Purpose Timer 95 gpt@620 { // General Purpose Timer
89 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 96 compatible = "mpc5200-gpt";
90 device_type = "gpt"; 97 device_type = "gpt";
98 cell-index = <2>;
91 reg = <620 10>; 99 reg = <620 10>;
92 interrupts = <1 b 0>; 100 interrupts = <1 b 0>;
93 interrupt-parent = <500>; 101 interrupt-parent = <500>;
94 }; 102 };
95 103
96 gpt@630 { // General Purpose Timer 104 gpt@630 { // General Purpose Timer
97 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 105 compatible = "mpc5200-gpt";
98 device_type = "gpt"; 106 device_type = "gpt";
107 cell-index = <3>;
99 reg = <630 10>; 108 reg = <630 10>;
100 interrupts = <1 c 0>; 109 interrupts = <1 c 0>;
101 interrupt-parent = <500>; 110 interrupt-parent = <500>;
102 }; 111 };
103 112
104 gpt@640 { // General Purpose Timer 113 gpt@640 { // General Purpose Timer
105 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 114 compatible = "mpc5200-gpt";
106 device_type = "gpt"; 115 device_type = "gpt";
116 cell-index = <4>;
107 reg = <640 10>; 117 reg = <640 10>;
108 interrupts = <1 d 0>; 118 interrupts = <1 d 0>;
109 interrupt-parent = <500>; 119 interrupt-parent = <500>;
110 }; 120 };
111 121
112 gpt@650 { // General Purpose Timer 122 gpt@650 { // General Purpose Timer
113 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 123 compatible = "mpc5200-gpt";
114 device_type = "gpt"; 124 device_type = "gpt";
125 cell-index = <5>;
115 reg = <650 10>; 126 reg = <650 10>;
116 interrupts = <1 e 0>; 127 interrupts = <1 e 0>;
117 interrupt-parent = <500>; 128 interrupt-parent = <500>;
118 }; 129 };
119 130
120 gpt@660 { // General Purpose Timer 131 gpt@660 { // General Purpose Timer
121 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 132 compatible = "mpc5200-gpt";
122 device_type = "gpt"; 133 device_type = "gpt";
134 cell-index = <6>;
123 reg = <660 10>; 135 reg = <660 10>;
124 interrupts = <1 f 0>; 136 interrupts = <1 f 0>;
125 interrupt-parent = <500>; 137 interrupt-parent = <500>;
126 }; 138 };
127 139
128 gpt@670 { // General Purpose Timer 140 gpt@670 { // General Purpose Timer
129 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 141 compatible = "mpc5200-gpt";
130 device_type = "gpt"; 142 device_type = "gpt";
143 cell-index = <7>;
131 reg = <670 10>; 144 reg = <670 10>;
132 interrupts = <1 10 0>; 145 interrupts = <1 10 0>;
133 interrupt-parent = <500>; 146 interrupt-parent = <500>;
134 }; 147 };
135 148
136 rtc@800 { // Real time clock 149 rtc@800 { // Real time clock
137 compatible = "mpc5200-rtc\0mpc52xx-rtc"; 150 compatible = "mpc5200-rtc";
138 device_type = "rtc"; 151 device_type = "rtc";
139 reg = <800 100>; 152 reg = <800 100>;
140 interrupts = <1 5 0 1 6 0>; 153 interrupts = <1 5 0 1 6 0>;
@@ -143,7 +156,8 @@
143 156
144 mscan@900 { 157 mscan@900 {
145 device_type = "mscan"; 158 device_type = "mscan";
146 compatible = "mpc5200-mscan\0mpc52xx-mscan"; 159 compatible = "mpc5200-mscan";
160 cell-index = <0>;
147 interrupts = <2 11 0>; 161 interrupts = <2 11 0>;
148 interrupt-parent = <500>; 162 interrupt-parent = <500>;
149 reg = <900 80>; 163 reg = <900 80>;
@@ -151,21 +165,22 @@
151 165
152 mscan@980 { 166 mscan@980 {
153 device_type = "mscan"; 167 device_type = "mscan";
154 compatible = "mpc5200-mscan\0mpc52xx-mscan"; 168 compatible = "mpc5200-mscan";
169 cell-index = <1>;
155 interrupts = <1 12 0>; 170 interrupts = <1 12 0>;
156 interrupt-parent = <500>; 171 interrupt-parent = <500>;
157 reg = <980 80>; 172 reg = <980 80>;
158 }; 173 };
159 174
160 gpio@b00 { 175 gpio@b00 {
161 compatible = "mpc5200-gpio\0mpc52xx-gpio"; 176 compatible = "mpc5200-gpio";
162 reg = <b00 40>; 177 reg = <b00 40>;
163 interrupts = <1 7 0>; 178 interrupts = <1 7 0>;
164 interrupt-parent = <500>; 179 interrupt-parent = <500>;
165 }; 180 };
166 181
167 gpio-wkup@b00 { 182 gpio-wkup@b00 {
168 compatible = "mpc5200-gpio-wkup\0mpc52xx-gpio-wkup"; 183 compatible = "mpc5200-gpio-wkup";
169 reg = <c00 40>; 184 reg = <c00 40>;
170 interrupts = <1 8 0 0 3 0>; 185 interrupts = <1 8 0 0 3 0>;
171 interrupt-parent = <500>; 186 interrupt-parent = <500>;
@@ -176,7 +191,7 @@
176 #size-cells = <2>; 191 #size-cells = <2>;
177 #address-cells = <3>; 192 #address-cells = <3>;
178 device_type = "pci"; 193 device_type = "pci";
179 compatible = "mpc5200-pci\0mpc52xx-pci"; 194 compatible = "mpc5200-pci";
180 reg = <d00 100>; 195 reg = <d00 100>;
181 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
182 interrupt-map = <c000 0 0 1 500 0 0 3 197 interrupt-map = <c000 0 0 1 500 0 0 3
@@ -194,7 +209,7 @@
194 209
195 spi@f00 { 210 spi@f00 {
196 device_type = "spi"; 211 device_type = "spi";
197 compatible = "mpc5200-spi\0mpc52xx-spi"; 212 compatible = "mpc5200-spi";
198 reg = <f00 20>; 213 reg = <f00 20>;
199 interrupts = <2 d 0 2 e 0>; 214 interrupts = <2 d 0 2 e 0>;
200 interrupt-parent = <500>; 215 interrupt-parent = <500>;
@@ -202,7 +217,7 @@
202 217
203 usb@1000 { 218 usb@1000 {
204 device_type = "usb-ohci-be"; 219 device_type = "usb-ohci-be";
205 compatible = "mpc5200-ohci\0mpc52xx-ohci\0ohci-be"; 220 compatible = "mpc5200-ohci\0ohci-be";
206 reg = <1000 ff>; 221 reg = <1000 ff>;
207 interrupts = <2 6 0>; 222 interrupts = <2 6 0>;
208 interrupt-parent = <500>; 223 interrupt-parent = <500>;
@@ -210,7 +225,7 @@
210 225
211 bestcomm@1200 { 226 bestcomm@1200 {
212 device_type = "dma-controller"; 227 device_type = "dma-controller";
213 compatible = "mpc5200-bestcomm\0mpc52xx-bestcomm"; 228 compatible = "mpc5200-bestcomm";
214 reg = <1200 80>; 229 reg = <1200 80>;
215 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 230 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
216 3 4 0 3 5 0 3 6 0 3 7 0 231 3 4 0 3 5 0 3 6 0 3 7 0
@@ -220,67 +235,73 @@
220 }; 235 };
221 236
222 xlb@1f00 { 237 xlb@1f00 {
223 compatible = "mpc5200-xlb\0mpc52xx-xlb"; 238 compatible = "mpc5200-xlb";
224 reg = <1f00 100>; 239 reg = <1f00 100>;
225 }; 240 };
226 241
227 serial@2000 { // PSC1 242 serial@2000 { // PSC1
228 device_type = "serial"; 243 device_type = "serial";
229 compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 244 compatible = "mpc5200-psc-uart";
230 port-number = <0>; // Logical port assignment 245 port-number = <0>; // Logical port assignment
246 cell-index = <0>;
231 reg = <2000 100>; 247 reg = <2000 100>;
232 interrupts = <2 1 0>; 248 interrupts = <2 1 0>;
233 interrupt-parent = <500>; 249 interrupt-parent = <500>;
234 }; 250 };
235 251
236 // PSC2 in spi mode example 252 // PSC2 in ac97 mode example
237 spi@2200 { // PSC2 253 //ac97@2200 { // PSC2
238 device_type = "spi"; 254 // device_type = "sound";
239 compatible = "mpc5200-psc-spi\0mpc52xx-psc-spi"; 255 // compatible = "mpc5200-psc-ac97";
240 reg = <2200 100>; 256 // cell-index = <1>;
241 interrupts = <2 2 0>; 257 // reg = <2200 100>;
242 interrupt-parent = <500>; 258 // interrupts = <2 2 0>;
243 }; 259 // interrupt-parent = <500>;
260 //};
244 261
245 // PSC3 in CODEC mode example 262 // PSC3 in CODEC mode example
246 i2s@2400 { // PSC3 263 //i2s@2400 { // PSC3
247 device_type = "sound"; 264 // device_type = "sound";
248 compatible = "mpc5200-psc-i2s\0mpc52xx-psc-i2s"; 265 // compatible = "mpc5200-psc-i2s";
249 reg = <2400 100>; 266 // cell-index = <2>;
250 interrupts = <2 3 0>; 267 // reg = <2400 100>;
251 interrupt-parent = <500>; 268 // interrupts = <2 3 0>;
252 }; 269 // interrupt-parent = <500>;
270 //};
253 271
254 // PSC4 unconfigured 272 // PSC4 in uart mode example
255 //serial@2600 { // PSC4 273 //serial@2600 { // PSC4
256 // device_type = "serial"; 274 // device_type = "serial";
257 // compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 275 // compatible = "mpc5200-psc-uart";
276 // cell-index = <3>;
258 // reg = <2600 100>; 277 // reg = <2600 100>;
259 // interrupts = <2 b 0>; 278 // interrupts = <2 b 0>;
260 // interrupt-parent = <500>; 279 // interrupt-parent = <500>;
261 //}; 280 //};
262 281
263 // PSC5 unconfigured 282 // PSC5 in uart mode example
264 //serial@2800 { // PSC5 283 //serial@2800 { // PSC5
265 // device_type = "serial"; 284 // device_type = "serial";
266 // compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 285 // compatible = "mpc5200-psc-uart";
286 // cell-index = <4>;
267 // reg = <2800 100>; 287 // reg = <2800 100>;
268 // interrupts = <2 c 0>; 288 // interrupts = <2 c 0>;
269 // interrupt-parent = <500>; 289 // interrupt-parent = <500>;
270 //}; 290 //};
271 291
272 // PSC6 in AC97 mode example 292 // PSC6 in spi mode example
273 ac97@2c00 { // PSC6 293 //spi@2c00 { // PSC6
274 device_type = "sound"; 294 // device_type = "spi";
275 compatible = "mpc5200-psc-ac97\0mpc52xx-psc-ac97"; 295 // compatible = "mpc5200-psc-spi";
276 reg = <2c00 100>; 296 // cell-index = <5>;
277 interrupts = <2 4 0>; 297 // reg = <2c00 100>;
278 interrupt-parent = <500>; 298 // interrupts = <2 4 0>;
279 }; 299 // interrupt-parent = <500>;
300 //};
280 301
281 ethernet@3000 { 302 ethernet@3000 {
282 device_type = "network"; 303 device_type = "network";
283 compatible = "mpc5200-fec\0mpc52xx-fec"; 304 compatible = "mpc5200-fec";
284 reg = <3000 800>; 305 reg = <3000 800>;
285 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 306 mac-address = [ 02 03 04 05 06 07 ]; // Bad!
286 interrupts = <2 5 0>; 307 interrupts = <2 5 0>;
@@ -289,7 +310,7 @@
289 310
290 ata@3a00 { 311 ata@3a00 {
291 device_type = "ata"; 312 device_type = "ata";
292 compatible = "mpc5200-ata\0mpc52xx-ata"; 313 compatible = "mpc5200-ata";
293 reg = <3a00 100>; 314 reg = <3a00 100>;
294 interrupts = <2 7 0>; 315 interrupts = <2 7 0>;
295 interrupt-parent = <500>; 316 interrupt-parent = <500>;
@@ -297,7 +318,8 @@
297 318
298 i2c@3d00 { 319 i2c@3d00 {
299 device_type = "i2c"; 320 device_type = "i2c";
300 compatible = "mpc5200-i2c\0mpc52xx-i2c"; 321 compatible = "mpc5200-i2c";
322 cell-index = <0>;
301 reg = <3d00 40>; 323 reg = <3d00 40>;
302 interrupts = <2 f 0>; 324 interrupts = <2 f 0>;
303 interrupt-parent = <500>; 325 interrupt-parent = <500>;
@@ -305,14 +327,15 @@
305 327
306 i2c@3d40 { 328 i2c@3d40 {
307 device_type = "i2c"; 329 device_type = "i2c";
308 compatible = "mpc5200-i2c\0mpc52xx-i2c"; 330 compatible = "mpc5200-i2c";
331 cell-index = <1>;
309 reg = <3d40 40>; 332 reg = <3d40 40>;
310 interrupts = <2 10 0>; 333 interrupts = <2 10 0>;
311 interrupt-parent = <500>; 334 interrupt-parent = <500>;
312 }; 335 };
313 sram@8000 { 336 sram@8000 {
314 device_type = "sram"; 337 device_type = "sram";
315 compatible = "mpc5200-sram\0mpc52xx-sram\0sram"; 338 compatible = "mpc5200-sram\0sram";
316 reg = <8000 4000>; 339 reg = <8000 4000>;
317 }; 340 };
318 }; 341 };
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 5bb2760d7c30..3875ca9a9a62 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Lite5200B board Device Tree Source 2 * Lite5200B board Device Tree Source
3 * 3 *
4 * Copyright 2006 Secret Lab Technologies Ltd. 4 * Copyright 2006-2007 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca> 5 * Grant Likely <grant.likely@secretlab.ca>
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
@@ -17,8 +17,9 @@
17 */ 17 */
18 18
19/ { 19/ {
20 model = "Lite5200b"; 20 model = "fsl,lite5200b";
21 compatible = "lite5200b\0lite52xx\0mpc5200b\0mpc52xx"; 21 // revision = "1.0";
22 compatible = "fsl,lite5200b\0generic-mpc5200";
22 #address-cells = <1>; 23 #address-cells = <1>;
23 #size-cells = <1>; 24 #size-cells = <1>;
24 25
@@ -47,14 +48,17 @@
47 }; 48 };
48 49
49 soc5200@f0000000 { 50 soc5200@f0000000 {
51 model = "fsl,mpc5200b";
52 revision = ""; // from bootloader
50 #interrupt-cells = <3>; 53 #interrupt-cells = <3>;
51 device_type = "soc"; 54 device_type = "soc";
52 ranges = <0 f0000000 f0010000>; 55 ranges = <0 f0000000 f0010000>;
53 reg = <f0000000 00010000>; 56 reg = <f0000000 00010000>;
54 bus-frequency = <0>; // from bootloader 57 bus-frequency = <0>; // from bootloader
58 system-frequency = <0>; // from bootloader
55 59
56 cdm@200 { 60 cdm@200 {
57 compatible = "mpc5200b-cdm\0mpc52xx-cdm"; 61 compatible = "mpc5200b-cdm\0mpc5200-cdm";
58 reg = <200 38>; 62 reg = <200 38>;
59 }; 63 };
60 64
@@ -64,77 +68,86 @@
64 interrupt-controller; 68 interrupt-controller;
65 #interrupt-cells = <3>; 69 #interrupt-cells = <3>;
66 device_type = "interrupt-controller"; 70 device_type = "interrupt-controller";
67 compatible = "mpc5200b-pic\0mpc52xx-pic"; 71 compatible = "mpc5200b-pic\0mpc5200-pic";
68 reg = <500 80>; 72 reg = <500 80>;
69 built-in; 73 built-in;
70 }; 74 };
71 75
72 gpt@600 { // General Purpose Timer 76 gpt@600 { // General Purpose Timer
73 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 77 compatible = "mpc5200b-gpt\0mpc5200-gpt";
74 device_type = "gpt"; 78 device_type = "gpt";
79 cell-index = <0>;
75 reg = <600 10>; 80 reg = <600 10>;
76 interrupts = <1 9 0>; 81 interrupts = <1 9 0>;
77 interrupt-parent = <500>; 82 interrupt-parent = <500>;
83 has-wdt;
78 }; 84 };
79 85
80 gpt@610 { // General Purpose Timer 86 gpt@610 { // General Purpose Timer
81 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 87 compatible = "mpc5200b-gpt\0mpc5200-gpt";
82 device_type = "gpt"; 88 device_type = "gpt";
89 cell-index = <1>;
83 reg = <610 10>; 90 reg = <610 10>;
84 interrupts = <1 a 0>; 91 interrupts = <1 a 0>;
85 interrupt-parent = <500>; 92 interrupt-parent = <500>;
86 }; 93 };
87 94
88 gpt@620 { // General Purpose Timer 95 gpt@620 { // General Purpose Timer
89 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 96 compatible = "mpc5200b-gpt\0mpc5200-gpt";
90 device_type = "gpt"; 97 device_type = "gpt";
98 cell-index = <2>;
91 reg = <620 10>; 99 reg = <620 10>;
92 interrupts = <1 b 0>; 100 interrupts = <1 b 0>;
93 interrupt-parent = <500>; 101 interrupt-parent = <500>;
94 }; 102 };
95 103
96 gpt@630 { // General Purpose Timer 104 gpt@630 { // General Purpose Timer
97 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 105 compatible = "mpc5200b-gpt\0mpc5200-gpt";
98 device_type = "gpt"; 106 device_type = "gpt";
107 cell-index = <3>;
99 reg = <630 10>; 108 reg = <630 10>;
100 interrupts = <1 c 0>; 109 interrupts = <1 c 0>;
101 interrupt-parent = <500>; 110 interrupt-parent = <500>;
102 }; 111 };
103 112
104 gpt@640 { // General Purpose Timer 113 gpt@640 { // General Purpose Timer
105 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 114 compatible = "mpc5200b-gpt\0mpc5200-gpt";
106 device_type = "gpt"; 115 device_type = "gpt";
116 cell-index = <4>;
107 reg = <640 10>; 117 reg = <640 10>;
108 interrupts = <1 d 0>; 118 interrupts = <1 d 0>;
109 interrupt-parent = <500>; 119 interrupt-parent = <500>;
110 }; 120 };
111 121
112 gpt@650 { // General Purpose Timer 122 gpt@650 { // General Purpose Timer
113 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 123 compatible = "mpc5200b-gpt\0mpc5200-gpt";
114 device_type = "gpt"; 124 device_type = "gpt";
125 cell-index = <5>;
115 reg = <650 10>; 126 reg = <650 10>;
116 interrupts = <1 e 0>; 127 interrupts = <1 e 0>;
117 interrupt-parent = <500>; 128 interrupt-parent = <500>;
118 }; 129 };
119 130
120 gpt@660 { // General Purpose Timer 131 gpt@660 { // General Purpose Timer
121 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 132 compatible = "mpc5200b-gpt\0mpc5200-gpt";
122 device_type = "gpt"; 133 device_type = "gpt";
134 cell-index = <6>;
123 reg = <660 10>; 135 reg = <660 10>;
124 interrupts = <1 f 0>; 136 interrupts = <1 f 0>;
125 interrupt-parent = <500>; 137 interrupt-parent = <500>;
126 }; 138 };
127 139
128 gpt@670 { // General Purpose Timer 140 gpt@670 { // General Purpose Timer
129 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 141 compatible = "mpc5200b-gpt\0mpc5200-gpt";
130 device_type = "gpt"; 142 device_type = "gpt";
143 cell-index = <7>;
131 reg = <670 10>; 144 reg = <670 10>;
132 interrupts = <1 10 0>; 145 interrupts = <1 10 0>;
133 interrupt-parent = <500>; 146 interrupt-parent = <500>;
134 }; 147 };
135 148
136 rtc@800 { // Real time clock 149 rtc@800 { // Real time clock
137 compatible = "mpc5200b-rtc\0mpc52xx-rtc"; 150 compatible = "mpc5200b-rtc\0mpc5200-rtc";
138 device_type = "rtc"; 151 device_type = "rtc";
139 reg = <800 100>; 152 reg = <800 100>;
140 interrupts = <1 5 0 1 6 0>; 153 interrupts = <1 5 0 1 6 0>;
@@ -143,7 +156,8 @@
143 156
144 mscan@900 { 157 mscan@900 {
145 device_type = "mscan"; 158 device_type = "mscan";
146 compatible = "mpc5200b-mscan\0mpc52xx-mscan"; 159 compatible = "mpc5200b-mscan\0mpc5200-mscan";
160 cell-index = <0>;
147 interrupts = <2 11 0>; 161 interrupts = <2 11 0>;
148 interrupt-parent = <500>; 162 interrupt-parent = <500>;
149 reg = <900 80>; 163 reg = <900 80>;
@@ -151,21 +165,22 @@
151 165
152 mscan@980 { 166 mscan@980 {
153 device_type = "mscan"; 167 device_type = "mscan";
154 compatible = "mpc5200b-mscan\0mpc52xx-mscan"; 168 compatible = "mpc5200b-mscan\0mpc5200-mscan";
169 cell-index = <1>;
155 interrupts = <1 12 0>; 170 interrupts = <1 12 0>;
156 interrupt-parent = <500>; 171 interrupt-parent = <500>;
157 reg = <980 80>; 172 reg = <980 80>;
158 }; 173 };
159 174
160 gpio@b00 { 175 gpio@b00 {
161 compatible = "mpc5200b-gpio\0mpc52xx-gpio"; 176 compatible = "mpc5200b-gpio\0mpc5200-gpio";
162 reg = <b00 40>; 177 reg = <b00 40>;
163 interrupts = <1 7 0>; 178 interrupts = <1 7 0>;
164 interrupt-parent = <500>; 179 interrupt-parent = <500>;
165 }; 180 };
166 181
167 gpio-wkup@b00 { 182 gpio-wkup@b00 {
168 compatible = "mpc5200b-gpio-wkup\0mpc52xx-gpio-wkup"; 183 compatible = "mpc5200b-gpio-wkup\0mpc5200-gpio-wkup";
169 reg = <c00 40>; 184 reg = <c00 40>;
170 interrupts = <1 8 0 0 3 0>; 185 interrupts = <1 8 0 0 3 0>;
171 interrupt-parent = <500>; 186 interrupt-parent = <500>;
@@ -176,7 +191,7 @@
176 #size-cells = <2>; 191 #size-cells = <2>;
177 #address-cells = <3>; 192 #address-cells = <3>;
178 device_type = "pci"; 193 device_type = "pci";
179 compatible = "mpc5200b-pci\0mpc52xx-pci"; 194 compatible = "mpc5200b-pci\0mpc5200-pci";
180 reg = <d00 100>; 195 reg = <d00 100>;
181 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
182 interrupt-map = <c000 0 0 1 500 0 0 3 // 1st slot 197 interrupt-map = <c000 0 0 1 500 0 0 3 // 1st slot
@@ -199,7 +214,7 @@
199 214
200 spi@f00 { 215 spi@f00 {
201 device_type = "spi"; 216 device_type = "spi";
202 compatible = "mpc5200b-spi\0mpc52xx-spi"; 217 compatible = "mpc5200b-spi\0mpc5200-spi";
203 reg = <f00 20>; 218 reg = <f00 20>;
204 interrupts = <2 d 0 2 e 0>; 219 interrupts = <2 d 0 2 e 0>;
205 interrupt-parent = <500>; 220 interrupt-parent = <500>;
@@ -207,7 +222,7 @@
207 222
208 usb@1000 { 223 usb@1000 {
209 device_type = "usb-ohci-be"; 224 device_type = "usb-ohci-be";
210 compatible = "mpc5200b-ohci\0mpc52xx-ohci\0ohci-be"; 225 compatible = "mpc5200b-ohci\0mpc5200-ohci\0ohci-be";
211 reg = <1000 ff>; 226 reg = <1000 ff>;
212 interrupts = <2 6 0>; 227 interrupts = <2 6 0>;
213 interrupt-parent = <500>; 228 interrupt-parent = <500>;
@@ -215,7 +230,7 @@
215 230
216 bestcomm@1200 { 231 bestcomm@1200 {
217 device_type = "dma-controller"; 232 device_type = "dma-controller";
218 compatible = "mpc5200b-bestcomm\0mpc52xx-bestcomm"; 233 compatible = "mpc5200b-bestcomm\0mpc5200-bestcomm";
219 reg = <1200 80>; 234 reg = <1200 80>;
220 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 235 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
221 3 4 0 3 5 0 3 6 0 3 7 0 236 3 4 0 3 5 0 3 6 0 3 7 0
@@ -225,67 +240,73 @@
225 }; 240 };
226 241
227 xlb@1f00 { 242 xlb@1f00 {
228 compatible = "mpc5200b-xlb\0mpc52xx-xlb"; 243 compatible = "mpc5200b-xlb\0mpc5200-xlb";
229 reg = <1f00 100>; 244 reg = <1f00 100>;
230 }; 245 };
231 246
232 serial@2000 { // PSC1 247 serial@2000 { // PSC1
233 device_type = "serial"; 248 device_type = "serial";
234 compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 249 compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
235 port-number = <0>; // Logical port assignment 250 port-number = <0>; // Logical port assignment
251 cell-index = <0>;
236 reg = <2000 100>; 252 reg = <2000 100>;
237 interrupts = <2 1 0>; 253 interrupts = <2 1 0>;
238 interrupt-parent = <500>; 254 interrupt-parent = <500>;
239 }; 255 };
240 256
241 // PSC2 in spi mode example 257 // PSC2 in ac97 mode example
242 spi@2200 { // PSC2 258 //ac97@2200 { // PSC2
243 device_type = "spi"; 259 // device_type = "sound";
244 compatible = "mpc5200b-psc-spi\0mpc52xx-psc-spi"; 260 // compatible = "mpc5200b-psc-ac97\0mpc5200-psc-ac97";
245 reg = <2200 100>; 261 // cell-index = <1>;
246 interrupts = <2 2 0>; 262 // reg = <2200 100>;
247 interrupt-parent = <500>; 263 // interrupts = <2 2 0>;
248 }; 264 // interrupt-parent = <500>;
265 //};
249 266
250 // PSC3 in CODEC mode example 267 // PSC3 in CODEC mode example
251 i2s@2400 { // PSC3 268 //i2s@2400 { // PSC3
252 device_type = "sound"; 269 // device_type = "sound";
253 compatible = "mpc5200b-psc-i2s\0mpc52xx-psc-i2s"; 270 // compatible = "mpc5200b-psc-i2s"; //not 5200 compatible
254 reg = <2400 100>; 271 // cell-index = <2>;
255 interrupts = <2 3 0>; 272 // reg = <2400 100>;
256 interrupt-parent = <500>; 273 // interrupts = <2 3 0>;
257 }; 274 // interrupt-parent = <500>;
275 //};
258 276
259 // PSC4 unconfigured 277 // PSC4 in uart mode example
260 //serial@2600 { // PSC4 278 //serial@2600 { // PSC4
261 // device_type = "serial"; 279 // device_type = "serial";
262 // compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 280 // compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
281 // cell-index = <3>;
263 // reg = <2600 100>; 282 // reg = <2600 100>;
264 // interrupts = <2 b 0>; 283 // interrupts = <2 b 0>;
265 // interrupt-parent = <500>; 284 // interrupt-parent = <500>;
266 //}; 285 //};
267 286
268 // PSC5 unconfigured 287 // PSC5 in uart mode example
269 //serial@2800 { // PSC5 288 //serial@2800 { // PSC5
270 // device_type = "serial"; 289 // device_type = "serial";
271 // compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 290 // compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
291 // cell-index = <4>;
272 // reg = <2800 100>; 292 // reg = <2800 100>;
273 // interrupts = <2 c 0>; 293 // interrupts = <2 c 0>;
274 // interrupt-parent = <500>; 294 // interrupt-parent = <500>;
275 //}; 295 //};
276 296
277 // PSC6 in AC97 mode example 297 // PSC6 in spi mode example
278 ac97@2c00 { // PSC6 298 //spi@2c00 { // PSC6
279 device_type = "sound"; 299 // device_type = "spi";
280 compatible = "mpc5200b-psc-ac97\0mpc52xx-psc-ac97"; 300 // compatible = "mpc5200b-psc-spi\0mpc5200-psc-spi";
281 reg = <2c00 100>; 301 // cell-index = <5>;
282 interrupts = <2 4 0>; 302 // reg = <2c00 100>;
283 interrupt-parent = <500>; 303 // interrupts = <2 4 0>;
284 }; 304 // interrupt-parent = <500>;
305 //};
285 306
286 ethernet@3000 { 307 ethernet@3000 {
287 device_type = "network"; 308 device_type = "network";
288 compatible = "mpc5200b-fec\0mpc52xx-fec"; 309 compatible = "mpc5200b-fec\0mpc5200-fec";
289 reg = <3000 800>; 310 reg = <3000 800>;
290 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 311 mac-address = [ 02 03 04 05 06 07 ]; // Bad!
291 interrupts = <2 5 0>; 312 interrupts = <2 5 0>;
@@ -294,7 +315,7 @@
294 315
295 ata@3a00 { 316 ata@3a00 {
296 device_type = "ata"; 317 device_type = "ata";
297 compatible = "mpc5200b-ata\0mpc52xx-ata"; 318 compatible = "mpc5200b-ata\0mpc5200-ata";
298 reg = <3a00 100>; 319 reg = <3a00 100>;
299 interrupts = <2 7 0>; 320 interrupts = <2 7 0>;
300 interrupt-parent = <500>; 321 interrupt-parent = <500>;
@@ -302,7 +323,8 @@
302 323
303 i2c@3d00 { 324 i2c@3d00 {
304 device_type = "i2c"; 325 device_type = "i2c";
305 compatible = "mpc5200b-i2c\0mpc52xx-i2c"; 326 compatible = "mpc5200b-i2c\0mpc5200-i2c";
327 cell-index = <0>;
306 reg = <3d00 40>; 328 reg = <3d00 40>;
307 interrupts = <2 f 0>; 329 interrupts = <2 f 0>;
308 interrupt-parent = <500>; 330 interrupt-parent = <500>;
@@ -310,14 +332,15 @@
310 332
311 i2c@3d40 { 333 i2c@3d40 {
312 device_type = "i2c"; 334 device_type = "i2c";
313 compatible = "mpc5200b-i2c\0mpc52xx-i2c"; 335 compatible = "mpc5200b-i2c\0mpc5200-i2c";
336 cell-index = <1>;
314 reg = <3d40 40>; 337 reg = <3d40 40>;
315 interrupts = <2 10 0>; 338 interrupts = <2 10 0>;
316 interrupt-parent = <500>; 339 interrupt-parent = <500>;
317 }; 340 };
318 sram@8000 { 341 sram@8000 {
319 device_type = "sram"; 342 device_type = "sram";
320 compatible = "mpc5200b-sram\0mpc52xx-sram\0sram"; 343 compatible = "mpc5200b-sram\0mpc5200-sram\0sram";
321 reg = <8000 4000>; 344 reg = <8000 4000>;
322 }; 345 };
323 }; 346 };
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index c4d9562cbaad..41d0720c5900 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -36,7 +36,6 @@
36 bus-frequency = <0>; // From U-Boot 36 bus-frequency = <0>; // From U-Boot
37 32-bit; 37 32-bit;
38 linux,phandle = <201>; 38 linux,phandle = <201>;
39 linux,boot-cpu;
40 }; 39 };
41 }; 40 };
42 41
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 34efdd028c4f..260b2e447779 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -34,7 +34,6 @@
34 clock-frequency = <0>; 34 clock-frequency = <0>;
35 32-bit; 35 32-bit;
36 linux,phandle = <201>; 36 linux,phandle = <201>;
37 linux,boot-cpu;
38 }; 37 };
39 }; 38 };
40 39
@@ -53,13 +52,20 @@
53 reg = <00000000 4000000 f4500000 00000020>; 52 reg = <00000000 4000000 f4500000 00000020>;
54 }; 53 };
55 54
55 chosen {
56 name = "chosen";
57 linux,platform = <0>;
58 interrupt-controller = <10c00>;
59 linux,phandle = <400>;
60 };
61
56 soc8272@f0000000 { 62 soc8272@f0000000 {
57 #address-cells = <1>; 63 #address-cells = <1>;
58 #size-cells = <1>; 64 #size-cells = <1>;
59 #interrupt-cells = <2>; 65 #interrupt-cells = <2>;
60 device_type = "soc"; 66 device_type = "soc";
61 ranges = < 0 0 2 00000000 f0000000 00053000>; 67 ranges = <00000000 f0000000 00053000>;
62 reg = <f0000000 0>; 68 reg = <f0000000 10000>;
63 69
64 mdio@0 { 70 mdio@0 {
65 device_type = "mdio"; 71 device_type = "mdio";
@@ -71,7 +77,7 @@
71 ethernet-phy@0 { 77 ethernet-phy@0 {
72 linux,phandle = <2452000>; 78 linux,phandle = <2452000>;
73 interrupt-parent = <10c00>; 79 interrupt-parent = <10c00>;
74 interrupts = <19 1>; 80 interrupts = <17 4>;
75 reg = <0>; 81 reg = <0>;
76 bitbang = [ 12 12 13 02 02 01 ]; 82 bitbang = [ 12 12 13 02 02 01 ];
77 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
@@ -79,7 +85,7 @@
79 ethernet-phy@1 { 85 ethernet-phy@1 {
80 linux,phandle = <2452001>; 86 linux,phandle = <2452001>;
81 interrupt-parent = <10c00>; 87 interrupt-parent = <10c00>;
82 interrupts = <19 1>; 88 interrupts = <17 4>;
83 bitbang = [ 12 12 13 02 02 01 ]; 89 bitbang = [ 12 12 13 02 02 01 ];
84 reg = <3>; 90 reg = <3>;
85 device_type = "ethernet-phy"; 91 device_type = "ethernet-phy";
@@ -90,7 +96,7 @@
90 #address-cells = <1>; 96 #address-cells = <1>;
91 #size-cells = <0>; 97 #size-cells = <0>;
92 device_type = "network"; 98 device_type = "network";
93 device-id = <2>; 99 device-id = <1>;
94 compatible = "fs_enet"; 100 compatible = "fs_enet";
95 model = "FCC"; 101 model = "FCC";
96 reg = <11300 20 8400 100 11380 30>; 102 reg = <11300 20 8400 100 11380 30>;
@@ -104,7 +110,7 @@
104 110
105 ethernet@25000 { 111 ethernet@25000 {
106 device_type = "network"; 112 device_type = "network";
107 device-id = <3>; 113 device-id = <2>;
108 compatible = "fs_enet"; 114 compatible = "fs_enet";
109 model = "FCC"; 115 model = "FCC";
110 reg = <11320 20 8500 100 113b0 30>; 116 reg = <11320 20 8500 100 113b0 30>;
@@ -123,8 +129,8 @@
123 #interrupt-cells = <2>; 129 #interrupt-cells = <2>;
124 device_type = "cpm"; 130 device_type = "cpm";
125 model = "CPM2"; 131 model = "CPM2";
126 ranges = <00000000 00000000 3ffff>; 132 ranges = <00000000 00000000 20000>;
127 reg = <10d80 3280>; 133 reg = <0 20000>;
128 command-proc = <119c0>; 134 command-proc = <119c0>;
129 brg-frequency = <17D7840>; 135 brg-frequency = <17D7840>;
130 cpm_clk = <BEBC200>; 136 cpm_clk = <BEBC200>;
@@ -133,7 +139,7 @@
133 device_type = "serial"; 139 device_type = "serial";
134 compatible = "cpm_uart"; 140 compatible = "cpm_uart";
135 model = "SCC"; 141 model = "SCC";
136 device-id = <2>; 142 device-id = <1>;
137 reg = <11a00 20 8000 100>; 143 reg = <11a00 20 8000 100>;
138 current-speed = <1c200>; 144 current-speed = <1c200>;
139 interrupts = <28 2>; 145 interrupts = <28 2>;
@@ -147,7 +153,7 @@
147 device_type = "serial"; 153 device_type = "serial";
148 compatible = "cpm_uart"; 154 compatible = "cpm_uart";
149 model = "SCC"; 155 model = "SCC";
150 device-id = <5>; 156 device-id = <4>;
151 reg = <11a60 20 8300 100>; 157 reg = <11a60 20 8300 100>;
152 current-speed = <1c200>; 158 current-speed = <1c200>;
153 interrupts = <2b 2>; 159 interrupts = <2b 2>;
@@ -181,24 +187,24 @@
181 interrupt-map = < 187 interrupt-map = <
182 188
183 /* IDSEL 0x16 */ 189 /* IDSEL 0x16 */
184 b000 0 0 1 f8200000 40 0 190 b000 0 0 1 f8200000 40 8
185 b000 0 0 2 f8200000 41 0 191 b000 0 0 2 f8200000 41 8
186 b000 0 0 3 f8200000 42 0 192 b000 0 0 3 f8200000 42 8
187 b000 0 0 4 f8200000 43 0 193 b000 0 0 4 f8200000 43 8
188 194
189 /* IDSEL 0x17 */ 195 /* IDSEL 0x17 */
190 b800 0 0 1 f8200000 43 0 196 b800 0 0 1 f8200000 43 8
191 b800 0 0 2 f8200000 40 0 197 b800 0 0 2 f8200000 40 8
192 b800 0 0 3 f8200000 41 0 198 b800 0 0 3 f8200000 41 8
193 b800 0 0 4 f8200000 42 0 199 b800 0 0 4 f8200000 42 8
194 200
195 /* IDSEL 0x18 */ 201 /* IDSEL 0x18 */
196 c000 0 0 1 f8200000 42 0 202 c000 0 0 1 f8200000 42 8
197 c000 0 0 2 f8200000 43 0 203 c000 0 0 2 f8200000 43 8
198 c000 0 0 3 f8200000 40 0 204 c000 0 0 3 f8200000 40 8
199 c000 0 0 4 f8200000 41 0>; 205 c000 0 0 4 f8200000 41 8>;
200 interrupt-parent = <10c00>; 206 interrupt-parent = <10c00>;
201 interrupts = <14 3>; 207 interrupts = <14 8>;
202 bus-range = <0 0>; 208 bus-range = <0 0>;
203 ranges = <02000000 0 80000000 80000000 0 40000000 209 ranges = <02000000 0 80000000 80000000 0 40000000
204 01000000 0 00000000 f6000000 0 02000000>; 210 01000000 0 00000000 f6000000 0 02000000>;
@@ -210,7 +216,7 @@
210 model = "SEC2"; 216 model = "SEC2";
211 compatible = "talitos"; 217 compatible = "talitos";
212 reg = <30000 10000>; 218 reg = <30000 10000>;
213 interrupts = <b 0>; 219 interrupts = <b 2>;
214 interrupt-parent = <10c00>; 220 interrupt-parent = <10c00>;
215 num-channels = <4>; 221 num-channels = <4>;
216 channel-fifo-len = <18>; 222 channel-fifo-len = <18>;
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
new file mode 100644
index 000000000000..6d721900d00e
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -0,0 +1,215 @@
1/*
2 * MPC8313E RDB Device Tree Source
3 *
4 * Copyright 2005, 2006, 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8313ERDB";
14 compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8313@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <4000>; // L1, 16K
29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>; // from bootloader
31 bus-frequency = <0>; // from bootloader
32 clock-frequency = <0>; // from bootloader
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 08000000>; // 128MB at 0
40 };
41
42 soc8313@e0000000 {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 #interrupt-cells = <2>;
46 device_type = "soc";
47 ranges = <0 e0000000 00100000>;
48 reg = <e0000000 00000200>;
49 bus-frequency = <0>;
50
51 wdt@200 {
52 device_type = "watchdog";
53 compatible = "mpc83xx_wdt";
54 reg = <200 100>;
55 };
56
57 i2c@3000 {
58 device_type = "i2c";
59 compatible = "fsl-i2c";
60 reg = <3000 100>;
61 interrupts = <e 8>;
62 interrupt-parent = < &ipic >;
63 dfsrr;
64 };
65
66 i2c@3100 {
67 device_type = "i2c";
68 compatible = "fsl-i2c";
69 reg = <3100 100>;
70 interrupts = <f 8>;
71 interrupt-parent = < &ipic >;
72 dfsrr;
73 };
74
75 spi@7000 {
76 device_type = "spi";
77 compatible = "mpc83xx_spi";
78 reg = <7000 1000>;
79 interrupts = <10 8>;
80 interrupt-parent = < &ipic >;
81 mode = <0>;
82 };
83
84 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
85 usb@23000 {
86 device_type = "usb";
87 compatible = "fsl-usb2-dr";
88 reg = <23000 1000>;
89 #address-cells = <1>;
90 #size-cells = <0>;
91 interrupt-parent = < &ipic >;
92 interrupts = <26 8>;
93 phy_type = "utmi_wide";
94 };
95
96 mdio@24520 {
97 device_type = "mdio";
98 compatible = "gianfar";
99 reg = <24520 20>;
100 #address-cells = <1>;
101 #size-cells = <0>;
102 phy1: ethernet-phy@1 {
103 interrupt-parent = < &ipic >;
104 interrupts = <13 8>;
105 reg = <1>;
106 device_type = "ethernet-phy";
107 };
108 phy4: ethernet-phy@4 {
109 interrupt-parent = < &ipic >;
110 interrupts = <14 8>;
111 reg = <4>;
112 device_type = "ethernet-phy";
113 };
114 };
115
116 ethernet@24000 {
117 device_type = "network";
118 model = "eTSEC";
119 compatible = "gianfar";
120 reg = <24000 1000>;
121 local-mac-address = [ 00 00 00 00 00 00 ];
122 interrupts = <25 8 24 8 23 8>;
123 interrupt-parent = < &ipic >;
124 phy-handle = < &phy1 >;
125 };
126
127 ethernet@25000 {
128 device_type = "network";
129 model = "eTSEC";
130 compatible = "gianfar";
131 reg = <25000 1000>;
132 local-mac-address = [ 00 00 00 00 00 00 ];
133 interrupts = <22 8 21 8 20 8>;
134 interrupt-parent = < &ipic >;
135 phy-handle = < &phy4 >;
136 };
137
138 serial@4500 {
139 device_type = "serial";
140 compatible = "ns16550";
141 reg = <4500 100>;
142 clock-frequency = <0>;
143 interrupts = <9 8>;
144 interrupt-parent = < &ipic >;
145 };
146
147 serial@4600 {
148 device_type = "serial";
149 compatible = "ns16550";
150 reg = <4600 100>;
151 clock-frequency = <0>;
152 interrupts = <a 8>;
153 interrupt-parent = < &ipic >;
154 };
155
156 pci@8500 {
157 interrupt-map-mask = <f800 0 0 7>;
158 interrupt-map = <
159
160 /* IDSEL 0x0E -mini PCI */
161 7000 0 0 1 &ipic 12 8
162 7000 0 0 2 &ipic 12 8
163 7000 0 0 3 &ipic 12 8
164 7000 0 0 4 &ipic 12 8
165
166 /* IDSEL 0x0F - PCI slot */
167 7800 0 0 1 &ipic 11 8
168 7800 0 0 2 &ipic 12 8
169 7800 0 0 3 &ipic 11 8
170 7800 0 0 4 &ipic 12 8>;
171 interrupt-parent = < &ipic >;
172 interrupts = <42 8>;
173 bus-range = <0 0>;
174 ranges = <02000000 0 90000000 90000000 0 10000000
175 42000000 0 80000000 80000000 0 10000000
176 01000000 0 00000000 e2000000 0 00100000>;
177 clock-frequency = <3f940aa>;
178 #interrupt-cells = <1>;
179 #size-cells = <2>;
180 #address-cells = <3>;
181 reg = <8500 100>;
182 compatible = "83xx";
183 device_type = "pci";
184 };
185
186 crypto@30000 {
187 device_type = "crypto";
188 model = "SEC2";
189 compatible = "talitos";
190 reg = <30000 7000>;
191 interrupts = <b 8>;
192 interrupt-parent = < &ipic >;
193 /* Rev. 2.2 */
194 num-channels = <1>;
195 channel-fifo-len = <18>;
196 exec-units-mask = <0000004c>;
197 descriptor-types-mask = <0122003f>;
198 };
199
200 /* IPIC
201 * interrupts cell = <intr #, sense>
202 * sense values match linux IORESOURCE_IRQ_* defines:
203 * sense == 8: Level, low assertion
204 * sense == 2: Edge, high-to-low change
205 */
206 ipic: pic@700 {
207 interrupt-controller;
208 #address-cells = <0>;
209 #interrupt-cells = <2>;
210 reg = <700 100>;
211 built-in;
212 device_type = "ipic";
213 };
214 };
215};
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
new file mode 100644
index 000000000000..06b310698a02
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -0,0 +1,333 @@
1/*
2 * MPC8323E EMDS Device Tree Source
3 *
4 * Copyright 2006 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8323EMDS";
14 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8323@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <4000>; // L1, 16K
29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>;
31 bus-frequency = <0>;
32 clock-frequency = <0>;
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 08000000>;
40 };
41
42 bcsr@f8000000 {
43 device_type = "board-control";
44 reg = <f8000000 8000>;
45 };
46
47 soc8323@e0000000 {
48 #address-cells = <1>;
49 #size-cells = <1>;
50 #interrupt-cells = <2>;
51 device_type = "soc";
52 ranges = <0 e0000000 00100000>;
53 reg = <e0000000 00000200>;
54 bus-frequency = <7DE2900>;
55
56 wdt@200 {
57 device_type = "watchdog";
58 compatible = "mpc83xx_wdt";
59 reg = <200 100>;
60 };
61
62 i2c@3000 {
63 device_type = "i2c";
64 compatible = "fsl-i2c";
65 reg = <3000 100>;
66 interrupts = <e 8>;
67 interrupt-parent = < &ipic >;
68 dfsrr;
69 };
70
71 serial@4500 {
72 device_type = "serial";
73 compatible = "ns16550";
74 reg = <4500 100>;
75 clock-frequency = <0>;
76 interrupts = <9 8>;
77 interrupt-parent = < &ipic >;
78 };
79
80 serial@4600 {
81 device_type = "serial";
82 compatible = "ns16550";
83 reg = <4600 100>;
84 clock-frequency = <0>;
85 interrupts = <a 8>;
86 interrupt-parent = < &ipic >;
87 };
88
89 crypto@30000 {
90 device_type = "crypto";
91 model = "SEC2";
92 compatible = "talitos";
93 reg = <30000 7000>;
94 interrupts = <b 8>;
95 interrupt-parent = < &ipic >;
96 /* Rev. 2.2 */
97 num-channels = <1>;
98 channel-fifo-len = <18>;
99 exec-units-mask = <0000004c>;
100 descriptor-types-mask = <0122003f>;
101 };
102
103 pci@8500 {
104 interrupt-map-mask = <f800 0 0 7>;
105 interrupt-map = <
106 /* IDSEL 0x11 AD17 */
107 8800 0 0 1 &ipic 14 8
108 8800 0 0 2 &ipic 15 8
109 8800 0 0 3 &ipic 16 8
110 8800 0 0 4 &ipic 17 8
111
112 /* IDSEL 0x12 AD18 */
113 9000 0 0 1 &ipic 16 8
114 9000 0 0 2 &ipic 17 8
115 9000 0 0 3 &ipic 14 8
116 9000 0 0 4 &ipic 15 8
117
118 /* IDSEL 0x13 AD19 */
119 9800 0 0 1 &ipic 17 8
120 9800 0 0 2 &ipic 14 8
121 9800 0 0 3 &ipic 15 8
122 9800 0 0 4 &ipic 16 8
123
124 /* IDSEL 0x15 AD21*/
125 a800 0 0 1 &ipic 14 8
126 a800 0 0 2 &ipic 15 8
127 a800 0 0 3 &ipic 16 8
128 a800 0 0 4 &ipic 17 8
129
130 /* IDSEL 0x16 AD22*/
131 b000 0 0 1 &ipic 17 8
132 b000 0 0 2 &ipic 14 8
133 b000 0 0 3 &ipic 15 8
134 b000 0 0 4 &ipic 16 8
135
136 /* IDSEL 0x17 AD23*/
137 b800 0 0 1 &ipic 16 8
138 b800 0 0 2 &ipic 17 8
139 b800 0 0 3 &ipic 14 8
140 b800 0 0 4 &ipic 15 8
141
142 /* IDSEL 0x18 AD24*/
143 c000 0 0 1 &ipic 15 8
144 c000 0 0 2 &ipic 16 8
145 c000 0 0 3 &ipic 17 8
146 c000 0 0 4 &ipic 14 8>;
147 interrupt-parent = < &ipic >;
148 interrupts = <42 8>;
149 bus-range = <0 0>;
150 ranges = <02000000 0 a0000000 90000000 0 10000000
151 42000000 0 80000000 80000000 0 10000000
152 01000000 0 00000000 d0000000 0 00100000>;
153 clock-frequency = <0>;
154 #interrupt-cells = <1>;
155 #size-cells = <2>;
156 #address-cells = <3>;
157 reg = <8500 100>;
158 compatible = "83xx";
159 device_type = "pci";
160 };
161
162 ipic: pic@700 {
163 interrupt-controller;
164 #address-cells = <0>;
165 #interrupt-cells = <2>;
166 reg = <700 100>;
167 built-in;
168 device_type = "ipic";
169 };
170
171 par_io@1400 {
172 reg = <1400 100>;
173 device_type = "par_io";
174 num-ports = <7>;
175
176 pio3: ucc_pin@03 {
177 pio-map = <
178 /* port pin dir open_drain assignment has_irq */
179 3 4 3 0 2 0 /* MDIO */
180 3 5 1 0 2 0 /* MDC */
181 0 d 2 0 1 0 /* RX_CLK (CLK9) */
182 3 18 2 0 1 0 /* TX_CLK (CLK10) */
183 1 1 1 0 1 0 /* TxD1 */
184 1 0 1 0 1 0 /* TxD0 */
185 1 1 1 0 1 0 /* TxD1 */
186 1 2 1 0 1 0 /* TxD2 */
187 1 3 1 0 1 0 /* TxD3 */
188 1 4 2 0 1 0 /* RxD0 */
189 1 5 2 0 1 0 /* RxD1 */
190 1 6 2 0 1 0 /* RxD2 */
191 1 7 2 0 1 0 /* RxD3 */
192 1 8 2 0 1 0 /* RX_ER */
193 1 9 1 0 1 0 /* TX_ER */
194 1 a 2 0 1 0 /* RX_DV */
195 1 b 2 0 1 0 /* COL */
196 1 c 1 0 1 0 /* TX_EN */
197 1 d 2 0 1 0>;/* CRS */
198 };
199 pio4: ucc_pin@04 {
200 pio-map = <
201 /* port pin dir open_drain assignment has_irq */
202 3 1f 2 0 1 0 /* RX_CLK (CLK7) */
203 3 6 2 0 1 0 /* TX_CLK (CLK8) */
204 1 12 1 0 1 0 /* TxD0 */
205 1 13 1 0 1 0 /* TxD1 */
206 1 14 1 0 1 0 /* TxD2 */
207 1 15 1 0 1 0 /* TxD3 */
208 1 16 2 0 1 0 /* RxD0 */
209 1 17 2 0 1 0 /* RxD1 */
210 1 18 2 0 1 0 /* RxD2 */
211 1 19 2 0 1 0 /* RxD3 */
212 1 1a 2 0 1 0 /* RX_ER */
213 1 1b 1 0 1 0 /* TX_ER */
214 1 1c 2 0 1 0 /* RX_DV */
215 1 1d 2 0 1 0 /* COL */
216 1 1e 1 0 1 0 /* TX_EN */
217 1 1f 2 0 1 0>;/* CRS */
218 };
219 };
220 };
221
222 qe@e0100000 {
223 #address-cells = <1>;
224 #size-cells = <1>;
225 device_type = "qe";
226 model = "QE";
227 ranges = <0 e0100000 00100000>;
228 reg = <e0100000 480>;
229 brg-frequency = <0>;
230 bus-frequency = <BCD3D80>;
231
232 muram@10000 {
233 device_type = "muram";
234 ranges = <0 00010000 00004000>;
235
236 data-only@0 {
237 reg = <0 4000>;
238 };
239 };
240
241 spi@4c0 {
242 device_type = "spi";
243 compatible = "fsl_spi";
244 reg = <4c0 40>;
245 interrupts = <2>;
246 interrupt-parent = < &qeic >;
247 mode = "cpu";
248 };
249
250 spi@500 {
251 device_type = "spi";
252 compatible = "fsl_spi";
253 reg = <500 40>;
254 interrupts = <1>;
255 interrupt-parent = < &qeic >;
256 mode = "cpu";
257 };
258
259 usb@6c0 {
260 device_type = "usb";
261 compatible = "qe_udc";
262 reg = <6c0 40 8B00 100>;
263 interrupts = <b>;
264 interrupt-parent = < &qeic >;
265 mode = "slave";
266 };
267
268 ucc@2200 {
269 device_type = "network";
270 compatible = "ucc_geth";
271 model = "UCC";
272 device-id = <3>;
273 reg = <2200 200>;
274 interrupts = <22>;
275 interrupt-parent = < &qeic >;
276 mac-address = [ 00 04 9f 00 23 23 ];
277 rx-clock = <19>;
278 tx-clock = <1a>;
279 phy-handle = < &phy3 >;
280 pio-handle = < &pio3 >;
281 };
282
283 ucc@3200 {
284 device_type = "network";
285 compatible = "ucc_geth";
286 model = "UCC";
287 device-id = <4>;
288 reg = <3000 200>;
289 interrupts = <23>;
290 interrupt-parent = < &qeic >;
291 mac-address = [ 00 11 22 33 44 55 ];
292 rx-clock = <17>;
293 tx-clock = <18>;
294 phy-handle = < &phy4 >;
295 pio-handle = < &pio4 >;
296 };
297
298 mdio@2320 {
299 #address-cells = <1>;
300 #size-cells = <0>;
301 reg = <2320 18>;
302 device_type = "mdio";
303 compatible = "ucc_geth_phy";
304
305 phy3: ethernet-phy@03 {
306 interrupt-parent = < &ipic >;
307 interrupts = <11 8>;
308 reg = <3>;
309 device_type = "ethernet-phy";
310 interface = <3>; //ENET_100_MII
311 };
312 phy4: ethernet-phy@04 {
313 interrupt-parent = < &ipic >;
314 interrupts = <12 8>;
315 reg = <4>;
316 device_type = "ethernet-phy";
317 interface = <3>;
318 };
319 };
320
321 qeic: qeic@80 {
322 interrupt-controller;
323 device_type = "qeic";
324 #address-cells = <0>;
325 #interrupt-cells = <1>;
326 reg = <80 80>;
327 built-in;
328 big-endian;
329 interrupts = <20 8 21 8>; //high:32 low:33
330 interrupt-parent = < &ipic >;
331 };
332 };
333};
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 27807fc45888..61b550bf1645 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -10,7 +10,7 @@
10 */ 10 */
11/ { 11/ {
12 model = "MPC8349EMITX"; 12 model = "MPC8349EMITX";
13 compatible = "MPC834xMITX"; 13 compatible = "MPC8349EMITX", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>; 14 #address-cells = <1>;
15 #size-cells = <1>; 15 #size-cells = <1>;
16 16
@@ -58,7 +58,7 @@
58 compatible = "fsl-i2c"; 58 compatible = "fsl-i2c";
59 reg = <3000 100>; 59 reg = <3000 100>;
60 interrupts = <e 8>; 60 interrupts = <e 8>;
61 interrupt-parent = <700>; 61 interrupt-parent = < &ipic >;
62 dfsrr; 62 dfsrr;
63 }; 63 };
64 64
@@ -67,7 +67,7 @@
67 compatible = "fsl-i2c"; 67 compatible = "fsl-i2c";
68 reg = <3100 100>; 68 reg = <3100 100>;
69 interrupts = <f 8>; 69 interrupts = <f 8>;
70 interrupt-parent = <700>; 70 interrupt-parent = < &ipic >;
71 dfsrr; 71 dfsrr;
72 }; 72 };
73 73
@@ -76,7 +76,7 @@
76 compatible = "mpc83xx_spi"; 76 compatible = "mpc83xx_spi";
77 reg = <7000 1000>; 77 reg = <7000 1000>;
78 interrupts = <10 8>; 78 interrupts = <10 8>;
79 interrupt-parent = <700>; 79 interrupt-parent = < &ipic >;
80 mode = <0>; 80 mode = <0>;
81 }; 81 };
82 82
@@ -86,8 +86,8 @@
86 reg = <22000 1000>; 86 reg = <22000 1000>;
87 #address-cells = <1>; 87 #address-cells = <1>;
88 #size-cells = <0>; 88 #size-cells = <0>;
89 interrupt-parent = <700>; 89 interrupt-parent = < &ipic >;
90 interrupts = <27 2>; 90 interrupts = <27 8>;
91 phy_type = "ulpi"; 91 phy_type = "ulpi";
92 port1; 92 port1;
93 }; 93 };
@@ -98,8 +98,8 @@
98 reg = <23000 1000>; 98 reg = <23000 1000>;
99 #address-cells = <1>; 99 #address-cells = <1>;
100 #size-cells = <0>; 100 #size-cells = <0>;
101 interrupt-parent = <700>; 101 interrupt-parent = < &ipic >;
102 interrupts = <26 2>; 102 interrupts = <26 8>;
103 phy_type = "ulpi"; 103 phy_type = "ulpi";
104 }; 104 };
105 105
@@ -109,22 +109,19 @@
109 reg = <24520 20>; 109 reg = <24520 20>;
110 #address-cells = <1>; 110 #address-cells = <1>;
111 #size-cells = <0>; 111 #size-cells = <0>;
112 linux,phandle = <24520>;
113 112
114 /* Vitesse 8201 */ 113 /* Vitesse 8201 */
115 ethernet-phy@1c { 114 phy1c: ethernet-phy@1c {
116 linux,phandle = <245201c>; 115 interrupt-parent = < &ipic >;
117 interrupt-parent = <700>; 116 interrupts = <12 8>;
118 interrupts = <12 2>;
119 reg = <1c>; 117 reg = <1c>;
120 device_type = "ethernet-phy"; 118 device_type = "ethernet-phy";
121 }; 119 };
122 120
123 /* Vitesse 7385 */ 121 /* Vitesse 7385 */
124 ethernet-phy@1f { 122 phy1f: ethernet-phy@1f {
125 linux,phandle = <245201f>; 123 interrupt-parent = < &ipic >;
126 interrupt-parent = <700>; 124 interrupts = <12 8>;
127 interrupts = <12 2>;
128 reg = <1f>; 125 reg = <1f>;
129 device_type = "ethernet-phy"; 126 device_type = "ethernet-phy";
130 }; 127 };
@@ -138,8 +135,8 @@
138 address = [ 00 00 00 00 00 00 ]; 135 address = [ 00 00 00 00 00 00 ];
139 local-mac-address = [ 00 00 00 00 00 00 ]; 136 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <20 8 21 8 22 8>; 137 interrupts = <20 8 21 8 22 8>;
141 interrupt-parent = <700>; 138 interrupt-parent = < &ipic >;
142 phy-handle = <245201c>; 139 phy-handle = < &phy1c >;
143 }; 140 };
144 141
145 ethernet@25000 { 142 ethernet@25000 {
@@ -152,8 +149,8 @@
152 address = [ 00 00 00 00 00 00 ]; 149 address = [ 00 00 00 00 00 00 ];
153 local-mac-address = [ 00 00 00 00 00 00 ]; 150 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <23 8 24 8 25 8>; 151 interrupts = <23 8 24 8 25 8>;
155 interrupt-parent = <700>; 152 interrupt-parent = < &ipic >;
156 phy-handle = <245201f>; 153 phy-handle = < &phy1f >;
157 }; 154 };
158 155
159 serial@4500 { 156 serial@4500 {
@@ -162,7 +159,7 @@
162 reg = <4500 100>; 159 reg = <4500 100>;
163 clock-frequency = <0>; // from bootloader 160 clock-frequency = <0>; // from bootloader
164 interrupts = <9 8>; 161 interrupts = <9 8>;
165 interrupt-parent = <700>; 162 interrupt-parent = < &ipic >;
166 }; 163 };
167 164
168 serial@4600 { 165 serial@4600 {
@@ -171,16 +168,16 @@
171 reg = <4600 100>; 168 reg = <4600 100>;
172 clock-frequency = <0>; // from bootloader 169 clock-frequency = <0>; // from bootloader
173 interrupts = <a 8>; 170 interrupts = <a 8>;
174 interrupt-parent = <700>; 171 interrupt-parent = < &ipic >;
175 }; 172 };
176 173
177 pci@8500 { 174 pci@8500 {
178 interrupt-map-mask = <f800 0 0 7>; 175 interrupt-map-mask = <f800 0 0 7>;
179 interrupt-map = < 176 interrupt-map = <
180 /* IDSEL 0x10 - SATA */ 177 /* IDSEL 0x10 - SATA */
181 8000 0 0 1 700 16 8 /* SATA_INTA */ 178 8000 0 0 1 &ipic 16 8 /* SATA_INTA */
182 >; 179 >;
183 interrupt-parent = <700>; 180 interrupt-parent = < &ipic >;
184 interrupts = <42 8>; 181 interrupts = <42 8>;
185 bus-range = <0 0>; 182 bus-range = <0 0>;
186 ranges = <42000000 0 80000000 80000000 0 10000000 183 ranges = <42000000 0 80000000 80000000 0 10000000
@@ -199,13 +196,13 @@
199 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
200 interrupt-map = < 197 interrupt-map = <
201 /* IDSEL 0x0E - MiniPCI Slot */ 198 /* IDSEL 0x0E - MiniPCI Slot */
202 7000 0 0 1 700 15 8 /* PCI_INTA */ 199 7000 0 0 1 &ipic 15 8 /* PCI_INTA */
203 200
204 /* IDSEL 0x0F - PCI Slot */ 201 /* IDSEL 0x0F - PCI Slot */
205 7800 0 0 1 700 14 8 /* PCI_INTA */ 202 7800 0 0 1 &ipic 14 8 /* PCI_INTA */
206 7800 0 0 2 700 15 8 /* PCI_INTB */ 203 7800 0 0 2 &ipic 15 8 /* PCI_INTB */
207 >; 204 >;
208 interrupt-parent = <700>; 205 interrupt-parent = < &ipic >;
209 interrupts = <43 8>; 206 interrupts = <43 8>;
210 bus-range = <1 1>; 207 bus-range = <1 1>;
211 ranges = <42000000 0 a0000000 a0000000 0 10000000 208 ranges = <42000000 0 a0000000 a0000000 0 10000000
@@ -226,15 +223,14 @@
226 compatible = "talitos"; 223 compatible = "talitos";
227 reg = <30000 10000>; 224 reg = <30000 10000>;
228 interrupts = <b 8>; 225 interrupts = <b 8>;
229 interrupt-parent = <700>; 226 interrupt-parent = < &ipic >;
230 num-channels = <4>; 227 num-channels = <4>;
231 channel-fifo-len = <18>; 228 channel-fifo-len = <18>;
232 exec-units-mask = <0000007e>; 229 exec-units-mask = <0000007e>;
233 descriptor-types-mask = <01010ebf>; 230 descriptor-types-mask = <01010ebf>;
234 }; 231 };
235 232
236 pic@700 { 233 ipic: pic@700 {
237 linux,phandle = <700>;
238 interrupt-controller; 234 interrupt-controller;
239 #address-cells = <0>; 235 #address-cells = <0>;
240 #interrupt-cells = <2>; 236 #interrupt-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
new file mode 100644
index 000000000000..b2e1a5ec3779
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -0,0 +1,184 @@
1/*
2 * MPC8349E-mITX-GP Device Tree Source
3 *
4 * Copyright 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11/ {
12 model = "MPC8349EMITXGP";
13 compatible = "MPC8349EMITXGP", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>;
15 #size-cells = <1>;
16
17 cpus {
18 #cpus = <1>;
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 PowerPC,8349@0 {
23 device_type = "cpu";
24 reg = <0>;
25 d-cache-line-size = <20>;
26 i-cache-line-size = <20>;
27 d-cache-size = <8000>;
28 i-cache-size = <8000>;
29 timebase-frequency = <0>; // from bootloader
30 bus-frequency = <0>; // from bootloader
31 clock-frequency = <0>; // from bootloader
32 32-bit;
33 };
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <00000000 10000000>;
39 };
40
41 soc8349@e0000000 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 #interrupt-cells = <2>;
45 device_type = "soc";
46 ranges = <0 e0000000 00100000>;
47 reg = <e0000000 00000200>;
48 bus-frequency = <0>; // from bootloader
49
50 wdt@200 {
51 device_type = "watchdog";
52 compatible = "mpc83xx_wdt";
53 reg = <200 100>;
54 };
55
56 i2c@3000 {
57 device_type = "i2c";
58 compatible = "fsl-i2c";
59 reg = <3000 100>;
60 interrupts = <e 8>;
61 interrupt-parent = < &ipic >;
62 dfsrr;
63 };
64
65 i2c@3100 {
66 device_type = "i2c";
67 compatible = "fsl-i2c";
68 reg = <3100 100>;
69 interrupts = <f 8>;
70 interrupt-parent = < &ipic >;
71 dfsrr;
72 };
73
74 spi@7000 {
75 device_type = "spi";
76 compatible = "mpc83xx_spi";
77 reg = <7000 1000>;
78 interrupts = <10 8>;
79 interrupt-parent = < &ipic >;
80 mode = <0>;
81 };
82
83 usb@23000 {
84 device_type = "usb";
85 compatible = "fsl-usb2-dr";
86 reg = <23000 1000>;
87 #address-cells = <1>;
88 #size-cells = <0>;
89 interrupt-parent = < &ipic >;
90 interrupts = <26 8>;
91 dr_mode = "otg";
92 phy_type = "ulpi";
93 };
94
95 mdio@24520 {
96 device_type = "mdio";
97 compatible = "gianfar";
98 reg = <24520 20>;
99 #address-cells = <1>;
100 #size-cells = <0>;
101
102 /* Vitesse 8201 */
103 phy1c: ethernet-phy@1c {
104 interrupt-parent = < &ipic >;
105 interrupts = <12 8>;
106 reg = <1c>;
107 device_type = "ethernet-phy";
108 };
109 };
110
111 ethernet@24000 {
112 device_type = "network";
113 model = "TSEC";
114 compatible = "gianfar";
115 reg = <24000 1000>;
116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <20 8 21 8 22 8>;
118 interrupt-parent = < &ipic >;
119 phy-handle = < &phy1c >;
120 };
121
122 serial@4500 {
123 device_type = "serial";
124 compatible = "ns16550";
125 reg = <4500 100>;
126 clock-frequency = <0>; // from bootloader
127 interrupts = <9 8>;
128 interrupt-parent = < &ipic >;
129 };
130
131 serial@4600 {
132 device_type = "serial";
133 compatible = "ns16550";
134 reg = <4600 100>;
135 clock-frequency = <0>; // from bootloader
136 interrupts = <a 8>;
137 interrupt-parent = < &ipic >;
138 };
139
140 pci@8600 {
141 interrupt-map-mask = <f800 0 0 7>;
142 interrupt-map = <
143 /* IDSEL 0x0F - PCI Slot */
144 7800 0 0 1 &ipic 14 8 /* PCI_INTA */
145 7800 0 0 2 &ipic 15 8 /* PCI_INTB */
146 >;
147 interrupt-parent = < &ipic >;
148 interrupts = <43 8>;
149 bus-range = <1 1>;
150 ranges = <42000000 0 a0000000 a0000000 0 10000000
151 02000000 0 b0000000 b0000000 0 10000000
152 01000000 0 00000000 e3000000 0 01000000>;
153 clock-frequency = <3f940aa>;
154 #interrupt-cells = <1>;
155 #size-cells = <2>;
156 #address-cells = <3>;
157 reg = <8600 100>;
158 compatible = "83xx";
159 device_type = "pci";
160 };
161
162 crypto@30000 {
163 device_type = "crypto";
164 model = "SEC2";
165 compatible = "talitos";
166 reg = <30000 10000>;
167 interrupts = <b 8>;
168 interrupt-parent = < &ipic >;
169 num-channels = <4>;
170 channel-fifo-len = <18>;
171 exec-units-mask = <0000007e>;
172 descriptor-types-mask = <01010ebf>;
173 };
174
175 ipic: pic@700 {
176 interrupt-controller;
177 #address-cells = <0>;
178 #interrupt-cells = <2>;
179 reg = <700 100>;
180 built-in;
181 device_type = "ipic";
182 };
183 };
184};
diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index efceb3432653..e4b43c24bc0b 100644
--- a/arch/powerpc/boot/dts/mpc8349emds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -11,7 +11,7 @@
11 11
12/ { 12/ {
13 model = "MPC8349EMDS"; 13 model = "MPC8349EMDS";
14 compatible = "MPC834xMDS"; 14 compatible = "MPC8349EMDS", "MPC834xMDS", "MPC83xxMDS";
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 17
@@ -39,6 +39,11 @@
39 reg = <00000000 10000000>; // 256MB at 0 39 reg = <00000000 10000000>; // 256MB at 0
40 }; 40 };
41 41
42 bcsr@e2400000 {
43 device_type = "board-control";
44 reg = <e2400000 8000>;
45 };
46
42 soc8349@e0000000 { 47 soc8349@e0000000 {
43 #address-cells = <1>; 48 #address-cells = <1>;
44 #size-cells = <1>; 49 #size-cells = <1>;
@@ -59,7 +64,7 @@
59 compatible = "fsl-i2c"; 64 compatible = "fsl-i2c";
60 reg = <3000 100>; 65 reg = <3000 100>;
61 interrupts = <e 8>; 66 interrupts = <e 8>;
62 interrupt-parent = <700>; 67 interrupt-parent = < &ipic >;
63 dfsrr; 68 dfsrr;
64 }; 69 };
65 70
@@ -68,7 +73,7 @@
68 compatible = "fsl-i2c"; 73 compatible = "fsl-i2c";
69 reg = <3100 100>; 74 reg = <3100 100>;
70 interrupts = <f 8>; 75 interrupts = <f 8>;
71 interrupt-parent = <700>; 76 interrupt-parent = < &ipic >;
72 dfsrr; 77 dfsrr;
73 }; 78 };
74 79
@@ -77,7 +82,7 @@
77 compatible = "mpc83xx_spi"; 82 compatible = "mpc83xx_spi";
78 reg = <7000 1000>; 83 reg = <7000 1000>;
79 interrupts = <10 8>; 84 interrupts = <10 8>;
80 interrupt-parent = <700>; 85 interrupt-parent = < &ipic >;
81 mode = <0>; 86 mode = <0>;
82 }; 87 };
83 88
@@ -89,8 +94,8 @@
89 reg = <22000 1000>; 94 reg = <22000 1000>;
90 #address-cells = <1>; 95 #address-cells = <1>;
91 #size-cells = <0>; 96 #size-cells = <0>;
92 interrupt-parent = <700>; 97 interrupt-parent = < &ipic >;
93 interrupts = <27 2>; 98 interrupts = <27 8>;
94 phy_type = "ulpi"; 99 phy_type = "ulpi";
95 port1; 100 port1;
96 }; 101 };
@@ -101,8 +106,9 @@
101 reg = <23000 1000>; 106 reg = <23000 1000>;
102 #address-cells = <1>; 107 #address-cells = <1>;
103 #size-cells = <0>; 108 #size-cells = <0>;
104 interrupt-parent = <700>; 109 interrupt-parent = < &ipic >;
105 interrupts = <26 2>; 110 interrupts = <26 8>;
111 dr_mode = "otg";
106 phy_type = "ulpi"; 112 phy_type = "ulpi";
107 }; 113 };
108 114
@@ -112,18 +118,15 @@
112 reg = <24520 20>; 118 reg = <24520 20>;
113 #address-cells = <1>; 119 #address-cells = <1>;
114 #size-cells = <0>; 120 #size-cells = <0>;
115 linux,phandle = <24520>; 121 phy0: ethernet-phy@0 {
116 ethernet-phy@0 { 122 interrupt-parent = < &ipic >;
117 linux,phandle = <2452000>; 123 interrupts = <11 8>;
118 interrupt-parent = <700>;
119 interrupts = <11 2>;
120 reg = <0>; 124 reg = <0>;
121 device_type = "ethernet-phy"; 125 device_type = "ethernet-phy";
122 }; 126 };
123 ethernet-phy@1 { 127 phy1: ethernet-phy@1 {
124 linux,phandle = <2452001>; 128 interrupt-parent = < &ipic >;
125 interrupt-parent = <700>; 129 interrupts = <12 8>;
126 interrupts = <12 2>;
127 reg = <1>; 130 reg = <1>;
128 device_type = "ethernet-phy"; 131 device_type = "ethernet-phy";
129 }; 132 };
@@ -137,8 +140,8 @@
137 address = [ 00 00 00 00 00 00 ]; 140 address = [ 00 00 00 00 00 00 ];
138 local-mac-address = [ 00 00 00 00 00 00 ]; 141 local-mac-address = [ 00 00 00 00 00 00 ];
139 interrupts = <20 8 21 8 22 8>; 142 interrupts = <20 8 21 8 22 8>;
140 interrupt-parent = <700>; 143 interrupt-parent = < &ipic >;
141 phy-handle = <2452000>; 144 phy-handle = < &phy0 >;
142 }; 145 };
143 146
144 ethernet@25000 { 147 ethernet@25000 {
@@ -151,8 +154,8 @@
151 address = [ 00 00 00 00 00 00 ]; 154 address = [ 00 00 00 00 00 00 ];
152 local-mac-address = [ 00 00 00 00 00 00 ]; 155 local-mac-address = [ 00 00 00 00 00 00 ];
153 interrupts = <23 8 24 8 25 8>; 156 interrupts = <23 8 24 8 25 8>;
154 interrupt-parent = <700>; 157 interrupt-parent = < &ipic >;
155 phy-handle = <2452001>; 158 phy-handle = < &phy1 >;
156 }; 159 };
157 160
158 serial@4500 { 161 serial@4500 {
@@ -161,7 +164,7 @@
161 reg = <4500 100>; 164 reg = <4500 100>;
162 clock-frequency = <0>; 165 clock-frequency = <0>;
163 interrupts = <9 8>; 166 interrupts = <9 8>;
164 interrupt-parent = <700>; 167 interrupt-parent = < &ipic >;
165 }; 168 };
166 169
167 serial@4600 { 170 serial@4600 {
@@ -170,7 +173,7 @@
170 reg = <4600 100>; 173 reg = <4600 100>;
171 clock-frequency = <0>; 174 clock-frequency = <0>;
172 interrupts = <a 8>; 175 interrupts = <a 8>;
173 interrupt-parent = <700>; 176 interrupt-parent = < &ipic >;
174 }; 177 };
175 178
176 pci@8500 { 179 pci@8500 {
@@ -178,47 +181,47 @@
178 interrupt-map = < 181 interrupt-map = <
179 182
180 /* IDSEL 0x11 */ 183 /* IDSEL 0x11 */
181 8800 0 0 1 700 14 8 184 8800 0 0 1 &ipic 14 8
182 8800 0 0 2 700 15 8 185 8800 0 0 2 &ipic 15 8
183 8800 0 0 3 700 16 8 186 8800 0 0 3 &ipic 16 8
184 8800 0 0 4 700 17 8 187 8800 0 0 4 &ipic 17 8
185 188
186 /* IDSEL 0x12 */ 189 /* IDSEL 0x12 */
187 9000 0 0 1 700 16 8 190 9000 0 0 1 &ipic 16 8
188 9000 0 0 2 700 17 8 191 9000 0 0 2 &ipic 17 8
189 9000 0 0 3 700 14 8 192 9000 0 0 3 &ipic 14 8
190 9000 0 0 4 700 15 8 193 9000 0 0 4 &ipic 15 8
191 194
192 /* IDSEL 0x13 */ 195 /* IDSEL 0x13 */
193 9800 0 0 1 700 17 8 196 9800 0 0 1 &ipic 17 8
194 9800 0 0 2 700 14 8 197 9800 0 0 2 &ipic 14 8
195 9800 0 0 3 700 15 8 198 9800 0 0 3 &ipic 15 8
196 9800 0 0 4 700 16 8 199 9800 0 0 4 &ipic 16 8
197 200
198 /* IDSEL 0x15 */ 201 /* IDSEL 0x15 */
199 a800 0 0 1 700 14 8 202 a800 0 0 1 &ipic 14 8
200 a800 0 0 2 700 15 8 203 a800 0 0 2 &ipic 15 8
201 a800 0 0 3 700 16 8 204 a800 0 0 3 &ipic 16 8
202 a800 0 0 4 700 17 8 205 a800 0 0 4 &ipic 17 8
203 206
204 /* IDSEL 0x16 */ 207 /* IDSEL 0x16 */
205 b000 0 0 1 700 17 8 208 b000 0 0 1 &ipic 17 8
206 b000 0 0 2 700 14 8 209 b000 0 0 2 &ipic 14 8
207 b000 0 0 3 700 15 8 210 b000 0 0 3 &ipic 15 8
208 b000 0 0 4 700 16 8 211 b000 0 0 4 &ipic 16 8
209 212
210 /* IDSEL 0x17 */ 213 /* IDSEL 0x17 */
211 b800 0 0 1 700 16 8 214 b800 0 0 1 &ipic 16 8
212 b800 0 0 2 700 17 8 215 b800 0 0 2 &ipic 17 8
213 b800 0 0 3 700 14 8 216 b800 0 0 3 &ipic 14 8
214 b800 0 0 4 700 15 8 217 b800 0 0 4 &ipic 15 8
215 218
216 /* IDSEL 0x18 */ 219 /* IDSEL 0x18 */
217 c000 0 0 1 700 15 8 220 c000 0 0 1 &ipic 15 8
218 c000 0 0 2 700 16 8 221 c000 0 0 2 &ipic 16 8
219 c000 0 0 3 700 17 8 222 c000 0 0 3 &ipic 17 8
220 c000 0 0 4 700 14 8>; 223 c000 0 0 4 &ipic 14 8>;
221 interrupt-parent = <700>; 224 interrupt-parent = < &ipic >;
222 interrupts = <42 8>; 225 interrupts = <42 8>;
223 bus-range = <0 0>; 226 bus-range = <0 0>;
224 ranges = <02000000 0 a0000000 a0000000 0 10000000 227 ranges = <02000000 0 a0000000 a0000000 0 10000000
@@ -238,47 +241,47 @@
238 interrupt-map = < 241 interrupt-map = <
239 242
240 /* IDSEL 0x11 */ 243 /* IDSEL 0x11 */
241 8800 0 0 1 700 14 8 244 8800 0 0 1 &ipic 14 8
242 8800 0 0 2 700 15 8 245 8800 0 0 2 &ipic 15 8
243 8800 0 0 3 700 16 8 246 8800 0 0 3 &ipic 16 8
244 8800 0 0 4 700 17 8 247 8800 0 0 4 &ipic 17 8
245 248
246 /* IDSEL 0x12 */ 249 /* IDSEL 0x12 */
247 9000 0 0 1 700 16 8 250 9000 0 0 1 &ipic 16 8
248 9000 0 0 2 700 17 8 251 9000 0 0 2 &ipic 17 8
249 9000 0 0 3 700 14 8 252 9000 0 0 3 &ipic 14 8
250 9000 0 0 4 700 15 8 253 9000 0 0 4 &ipic 15 8
251 254
252 /* IDSEL 0x13 */ 255 /* IDSEL 0x13 */
253 9800 0 0 1 700 17 8 256 9800 0 0 1 &ipic 17 8
254 9800 0 0 2 700 14 8 257 9800 0 0 2 &ipic 14 8
255 9800 0 0 3 700 15 8 258 9800 0 0 3 &ipic 15 8
256 9800 0 0 4 700 16 8 259 9800 0 0 4 &ipic 16 8
257 260
258 /* IDSEL 0x15 */ 261 /* IDSEL 0x15 */
259 a800 0 0 1 700 14 8 262 a800 0 0 1 &ipic 14 8
260 a800 0 0 2 700 15 8 263 a800 0 0 2 &ipic 15 8
261 a800 0 0 3 700 16 8 264 a800 0 0 3 &ipic 16 8
262 a800 0 0 4 700 17 8 265 a800 0 0 4 &ipic 17 8
263 266
264 /* IDSEL 0x16 */ 267 /* IDSEL 0x16 */
265 b000 0 0 1 700 17 8 268 b000 0 0 1 &ipic 17 8
266 b000 0 0 2 700 14 8 269 b000 0 0 2 &ipic 14 8
267 b000 0 0 3 700 15 8 270 b000 0 0 3 &ipic 15 8
268 b000 0 0 4 700 16 8 271 b000 0 0 4 &ipic 16 8
269 272
270 /* IDSEL 0x17 */ 273 /* IDSEL 0x17 */
271 b800 0 0 1 700 16 8 274 b800 0 0 1 &ipic 16 8
272 b800 0 0 2 700 17 8 275 b800 0 0 2 &ipic 17 8
273 b800 0 0 3 700 14 8 276 b800 0 0 3 &ipic 14 8
274 b800 0 0 4 700 15 8 277 b800 0 0 4 &ipic 15 8
275 278
276 /* IDSEL 0x18 */ 279 /* IDSEL 0x18 */
277 c000 0 0 1 700 15 8 280 c000 0 0 1 &ipic 15 8
278 c000 0 0 2 700 16 8 281 c000 0 0 2 &ipic 16 8
279 c000 0 0 3 700 17 8 282 c000 0 0 3 &ipic 17 8
280 c000 0 0 4 700 14 8>; 283 c000 0 0 4 &ipic 14 8>;
281 interrupt-parent = <700>; 284 interrupt-parent = < &ipic >;
282 interrupts = <42 8>; 285 interrupts = <42 8>;
283 bus-range = <0 0>; 286 bus-range = <0 0>;
284 ranges = <02000000 0 b0000000 b0000000 0 10000000 287 ranges = <02000000 0 b0000000 b0000000 0 10000000
@@ -300,7 +303,7 @@
300 compatible = "talitos"; 303 compatible = "talitos";
301 reg = <30000 10000>; 304 reg = <30000 10000>;
302 interrupts = <b 8>; 305 interrupts = <b 8>;
303 interrupt-parent = <700>; 306 interrupt-parent = < &ipic >;
304 num-channels = <4>; 307 num-channels = <4>;
305 channel-fifo-len = <18>; 308 channel-fifo-len = <18>;
306 exec-units-mask = <0000007e>; 309 exec-units-mask = <0000007e>;
@@ -315,8 +318,7 @@
315 * sense == 8: Level, low assertion 318 * sense == 8: Level, low assertion
316 * sense == 2: Edge, high-to-low change 319 * sense == 2: Edge, high-to-low change
317 */ 320 */
318 pic@700 { 321 ipic: pic@700 {
319 linux,phandle = <700>;
320 interrupt-controller; 322 interrupt-controller;
321 #address-cells = <0>; 323 #address-cells = <0>;
322 #interrupt-cells = <2>; 324 #interrupt-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8360emds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 9022192155b9..4fe45c021848 100644
--- a/arch/powerpc/boot/dts/mpc8360emds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -15,17 +15,15 @@
15*/ 15*/
16 16
17/ { 17/ {
18 model = "MPC8360EPB"; 18 model = "MPC8360MDS";
19 compatible = "MPC83xx"; 19 compatible = "MPC8360EMDS", "MPC836xMDS", "MPC83xxMDS";
20 #address-cells = <1>; 20 #address-cells = <1>;
21 #size-cells = <1>; 21 #size-cells = <1>;
22 linux,phandle = <100>;
23 22
24 cpus { 23 cpus {
25 #cpus = <1>; 24 #cpus = <1>;
26 #address-cells = <1>; 25 #address-cells = <1>;
27 #size-cells = <0>; 26 #size-cells = <0>;
28 linux,phandle = <200>;
29 27
30 PowerPC,8360@0 { 28 PowerPC,8360@0 {
31 device_type = "cpu"; 29 device_type = "cpu";
@@ -38,14 +36,11 @@
38 bus-frequency = <FBC5200>; 36 bus-frequency = <FBC5200>;
39 clock-frequency = <1F78A400>; 37 clock-frequency = <1F78A400>;
40 32-bit; 38 32-bit;
41 linux,phandle = <201>;
42 linux,boot-cpu;
43 }; 39 };
44 }; 40 };
45 41
46 memory { 42 memory {
47 device_type = "memory"; 43 device_type = "memory";
48 linux,phandle = <300>;
49 reg = <00000000 10000000>; 44 reg = <00000000 10000000>;
50 }; 45 };
51 46
@@ -74,7 +69,7 @@
74 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
75 reg = <3000 100>; 70 reg = <3000 100>;
76 interrupts = <e 8>; 71 interrupts = <e 8>;
77 interrupt-parent = <700>; 72 interrupt-parent = < &ipic >;
78 dfsrr; 73 dfsrr;
79 }; 74 };
80 75
@@ -83,7 +78,7 @@
83 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
84 reg = <3100 100>; 79 reg = <3100 100>;
85 interrupts = <f 8>; 80 interrupts = <f 8>;
86 interrupt-parent = <700>; 81 interrupt-parent = < &ipic >;
87 dfsrr; 82 dfsrr;
88 }; 83 };
89 84
@@ -93,7 +88,7 @@
93 reg = <4500 100>; 88 reg = <4500 100>;
94 clock-frequency = <FBC5200>; 89 clock-frequency = <FBC5200>;
95 interrupts = <9 8>; 90 interrupts = <9 8>;
96 interrupt-parent = <700>; 91 interrupt-parent = < &ipic >;
97 }; 92 };
98 93
99 serial@4600 { 94 serial@4600 {
@@ -102,7 +97,7 @@
102 reg = <4600 100>; 97 reg = <4600 100>;
103 clock-frequency = <FBC5200>; 98 clock-frequency = <FBC5200>;
104 interrupts = <a 8>; 99 interrupts = <a 8>;
105 interrupt-parent = <700>; 100 interrupt-parent = < &ipic >;
106 }; 101 };
107 102
108 crypto@30000 { 103 crypto@30000 {
@@ -111,7 +106,7 @@
111 compatible = "talitos"; 106 compatible = "talitos";
112 reg = <30000 10000>; 107 reg = <30000 10000>;
113 interrupts = <b 8>; 108 interrupts = <b 8>;
114 interrupt-parent = <700>; 109 interrupt-parent = < &ipic >;
115 num-channels = <4>; 110 num-channels = <4>;
116 channel-fifo-len = <18>; 111 channel-fifo-len = <18>;
117 exec-units-mask = <0000007e>; 112 exec-units-mask = <0000007e>;
@@ -120,52 +115,51 @@
120 }; 115 };
121 116
122 pci@8500 { 117 pci@8500 {
123 linux,phandle = <8500>;
124 interrupt-map-mask = <f800 0 0 7>; 118 interrupt-map-mask = <f800 0 0 7>;
125 interrupt-map = < 119 interrupt-map = <
126 120
127 /* IDSEL 0x11 AD17 */ 121 /* IDSEL 0x11 AD17 */
128 8800 0 0 1 700 14 8 122 8800 0 0 1 &ipic 14 8
129 8800 0 0 2 700 15 8 123 8800 0 0 2 &ipic 15 8
130 8800 0 0 3 700 16 8 124 8800 0 0 3 &ipic 16 8
131 8800 0 0 4 700 17 8 125 8800 0 0 4 &ipic 17 8
132 126
133 /* IDSEL 0x12 AD18 */ 127 /* IDSEL 0x12 AD18 */
134 9000 0 0 1 700 16 8 128 9000 0 0 1 &ipic 16 8
135 9000 0 0 2 700 17 8 129 9000 0 0 2 &ipic 17 8
136 9000 0 0 3 700 14 8 130 9000 0 0 3 &ipic 14 8
137 9000 0 0 4 700 15 8 131 9000 0 0 4 &ipic 15 8
138 132
139 /* IDSEL 0x13 AD19 */ 133 /* IDSEL 0x13 AD19 */
140 9800 0 0 1 700 17 8 134 9800 0 0 1 &ipic 17 8
141 9800 0 0 2 700 14 8 135 9800 0 0 2 &ipic 14 8
142 9800 0 0 3 700 15 8 136 9800 0 0 3 &ipic 15 8
143 9800 0 0 4 700 16 8 137 9800 0 0 4 &ipic 16 8
144 138
145 /* IDSEL 0x15 AD21*/ 139 /* IDSEL 0x15 AD21*/
146 a800 0 0 1 700 14 8 140 a800 0 0 1 &ipic 14 8
147 a800 0 0 2 700 15 8 141 a800 0 0 2 &ipic 15 8
148 a800 0 0 3 700 16 8 142 a800 0 0 3 &ipic 16 8
149 a800 0 0 4 700 17 8 143 a800 0 0 4 &ipic 17 8
150 144
151 /* IDSEL 0x16 AD22*/ 145 /* IDSEL 0x16 AD22*/
152 b000 0 0 1 700 17 8 146 b000 0 0 1 &ipic 17 8
153 b000 0 0 2 700 14 8 147 b000 0 0 2 &ipic 14 8
154 b000 0 0 3 700 15 8 148 b000 0 0 3 &ipic 15 8
155 b000 0 0 4 700 16 8 149 b000 0 0 4 &ipic 16 8
156 150
157 /* IDSEL 0x17 AD23*/ 151 /* IDSEL 0x17 AD23*/
158 b800 0 0 1 700 16 8 152 b800 0 0 1 &ipic 16 8
159 b800 0 0 2 700 17 8 153 b800 0 0 2 &ipic 17 8
160 b800 0 0 3 700 14 8 154 b800 0 0 3 &ipic 14 8
161 b800 0 0 4 700 15 8 155 b800 0 0 4 &ipic 15 8
162 156
163 /* IDSEL 0x18 AD24*/ 157 /* IDSEL 0x18 AD24*/
164 c000 0 0 1 700 15 8 158 c000 0 0 1 &ipic 15 8
165 c000 0 0 2 700 16 8 159 c000 0 0 2 &ipic 16 8
166 c000 0 0 3 700 17 8 160 c000 0 0 3 &ipic 17 8
167 c000 0 0 4 700 14 8>; 161 c000 0 0 4 &ipic 14 8>;
168 interrupt-parent = <700>; 162 interrupt-parent = < &ipic >;
169 interrupts = <42 8>; 163 interrupts = <42 8>;
170 bus-range = <0 0>; 164 bus-range = <0 0>;
171 ranges = <02000000 0 a0000000 a0000000 0 10000000 165 ranges = <02000000 0 a0000000 a0000000 0 10000000
@@ -180,8 +174,7 @@
180 device_type = "pci"; 174 device_type = "pci";
181 }; 175 };
182 176
183 pic@700 { 177 ipic: pic@700 {
184 linux,phandle = <700>;
185 interrupt-controller; 178 interrupt-controller;
186 #address-cells = <0>; 179 #address-cells = <0>;
187 #interrupt-cells = <2>; 180 #interrupt-cells = <2>;
@@ -195,8 +188,7 @@
195 device_type = "par_io"; 188 device_type = "par_io";
196 num-ports = <7>; 189 num-ports = <7>;
197 190
198 ucc_pin@01 { 191 pio1: ucc_pin@01 {
199 linux,phandle = <140001>;
200 pio-map = < 192 pio-map = <
201 /* port pin dir open_drain assignment has_irq */ 193 /* port pin dir open_drain assignment has_irq */
202 0 3 1 0 1 0 /* TxD0 */ 194 0 3 1 0 1 0 /* TxD0 */
@@ -223,8 +215,7 @@
223 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ 215 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
224 2 8 2 0 1 0>; /* GTX125 - CLK9 */ 216 2 8 2 0 1 0>; /* GTX125 - CLK9 */
225 }; 217 };
226 ucc_pin@02 { 218 pio2: ucc_pin@02 {
227 linux,phandle = <140002>;
228 pio-map = < 219 pio-map = <
229 /* port pin dir open_drain assignment has_irq */ 220 /* port pin dir open_drain assignment has_irq */
230 0 11 1 0 1 0 /* TxD0 */ 221 0 11 1 0 1 0 /* TxD0 */
@@ -281,7 +272,7 @@
281 compatible = "fsl_spi"; 272 compatible = "fsl_spi";
282 reg = <4c0 40>; 273 reg = <4c0 40>;
283 interrupts = <2>; 274 interrupts = <2>;
284 interrupt-parent = <80>; 275 interrupt-parent = < &qeic >;
285 mode = "cpu"; 276 mode = "cpu";
286 }; 277 };
287 278
@@ -290,7 +281,7 @@
290 compatible = "fsl_spi"; 281 compatible = "fsl_spi";
291 reg = <500 40>; 282 reg = <500 40>;
292 interrupts = <1>; 283 interrupts = <1>;
293 interrupt-parent = <80>; 284 interrupt-parent = < &qeic >;
294 mode = "cpu"; 285 mode = "cpu";
295 }; 286 };
296 287
@@ -299,7 +290,7 @@
299 compatible = "qe_udc"; 290 compatible = "qe_udc";
300 reg = <6c0 40 8B00 100>; 291 reg = <6c0 40 8B00 100>;
301 interrupts = <b>; 292 interrupts = <b>;
302 interrupt-parent = <80>; 293 interrupt-parent = < &qeic >;
303 mode = "slave"; 294 mode = "slave";
304 }; 295 };
305 296
@@ -310,12 +301,12 @@
310 device-id = <1>; 301 device-id = <1>;
311 reg = <2000 200>; 302 reg = <2000 200>;
312 interrupts = <20>; 303 interrupts = <20>;
313 interrupt-parent = <80>; 304 interrupt-parent = < &qeic >;
314 mac-address = [ 00 04 9f 00 23 23 ]; 305 mac-address = [ 00 04 9f 00 23 23 ];
315 rx-clock = <0>; 306 rx-clock = <0>;
316 tx-clock = <19>; 307 tx-clock = <19>;
317 phy-handle = <212000>; 308 phy-handle = < &phy0 >;
318 pio-handle = <140001>; 309 pio-handle = < &pio1 >;
319 }; 310 };
320 311
321 ucc@3000 { 312 ucc@3000 {
@@ -325,12 +316,12 @@
325 device-id = <2>; 316 device-id = <2>;
326 reg = <3000 200>; 317 reg = <3000 200>;
327 interrupts = <21>; 318 interrupts = <21>;
328 interrupt-parent = <80>; 319 interrupt-parent = < &qeic >;
329 mac-address = [ 00 11 22 33 44 55 ]; 320 mac-address = [ 00 11 22 33 44 55 ];
330 rx-clock = <0>; 321 rx-clock = <0>;
331 tx-clock = <14>; 322 tx-clock = <14>;
332 phy-handle = <212001>; 323 phy-handle = < &phy1 >;
333 pio-handle = <140002>; 324 pio-handle = < &pio2 >;
334 }; 325 };
335 326
336 mdio@2120 { 327 mdio@2120 {
@@ -340,26 +331,23 @@
340 device_type = "mdio"; 331 device_type = "mdio";
341 compatible = "ucc_geth_phy"; 332 compatible = "ucc_geth_phy";
342 333
343 ethernet-phy@00 { 334 phy0: ethernet-phy@00 {
344 linux,phandle = <212000>; 335 interrupt-parent = < &ipic >;
345 interrupt-parent = <700>; 336 interrupts = <11 8>;
346 interrupts = <11 2>;
347 reg = <0>; 337 reg = <0>;
348 device_type = "ethernet-phy"; 338 device_type = "ethernet-phy";
349 interface = <6>; //ENET_1000_GMII 339 interface = <6>; //ENET_1000_GMII
350 }; 340 };
351 ethernet-phy@01 { 341 phy1: ethernet-phy@01 {
352 linux,phandle = <212001>; 342 interrupt-parent = < &ipic >;
353 interrupt-parent = <700>; 343 interrupts = <12 8>;
354 interrupts = <12 2>;
355 reg = <1>; 344 reg = <1>;
356 device_type = "ethernet-phy"; 345 device_type = "ethernet-phy";
357 interface = <6>; 346 interface = <6>;
358 }; 347 };
359 }; 348 };
360 349
361 qeic@80 { 350 qeic: qeic@80 {
362 linux,phandle = <80>;
363 interrupt-controller; 351 interrupt-controller;
364 device_type = "qeic"; 352 device_type = "qeic";
365 #address-cells = <0>; 353 #address-cells = <0>;
@@ -368,7 +356,7 @@
368 built-in; 356 built-in;
369 big-endian; 357 big-endian;
370 interrupts = <20 8 21 8>; //high:32 low:33 358 interrupts = <20 8 21 8>; //high:32 low:33
371 interrupt-parent = <700>; 359 interrupt-parent = < &ipic >;
372 }; 360 };
373 361
374 }; 362 };
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 5f41c1f7a5f3..3c0917fa791c 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8540ADS"; 14 model = "MPC8540ADS";
15 compatible = "MPC85xxADS"; 15 compatible = "MPC8540ADS", "MPC85xxADS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8540@0 { 24 PowerPC,8540@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,24 +64,20 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 1>; 69 interrupts = <35 1>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 1>; 75 interrupts = <35 1>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
85 }; 78 };
86 ethernet-phy@3 { 79 phy3: ethernet-phy@3 {
87 linux,phandle = <2452003>; 80 interrupt-parent = <&mpic>;
88 interrupt-parent = <40000>;
89 interrupts = <37 1>; 81 interrupts = <37 1>;
90 reg = <3>; 82 reg = <3>;
91 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
@@ -102,8 +94,8 @@
102 address = [ 00 E0 0C 00 73 00 ]; 94 address = [ 00 E0 0C 00 73 00 ];
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 95 local-mac-address = [ 00 E0 0C 00 73 00 ];
104 interrupts = <d 2 e 2 12 2>; 96 interrupts = <d 2 e 2 12 2>;
105 interrupt-parent = <40000>; 97 interrupt-parent = <&mpic>;
106 phy-handle = <2452000>; 98 phy-handle = <&phy0>;
107 }; 99 };
108 100
109 ethernet@25000 { 101 ethernet@25000 {
@@ -116,8 +108,8 @@
116 address = [ 00 E0 0C 00 73 01 ]; 108 address = [ 00 E0 0C 00 73 01 ];
117 local-mac-address = [ 00 E0 0C 00 73 01 ]; 109 local-mac-address = [ 00 E0 0C 00 73 01 ];
118 interrupts = <13 2 14 2 18 2>; 110 interrupts = <13 2 14 2 18 2>;
119 interrupt-parent = <40000>; 111 interrupt-parent = <&mpic>;
120 phy-handle = <2452001>; 112 phy-handle = <&phy1>;
121 }; 113 };
122 114
123 ethernet@26000 { 115 ethernet@26000 {
@@ -130,8 +122,8 @@
130 address = [ 00 E0 0C 00 73 02 ]; 122 address = [ 00 E0 0C 00 73 02 ];
131 local-mac-address = [ 00 E0 0C 00 73 02 ]; 123 local-mac-address = [ 00 E0 0C 00 73 02 ];
132 interrupts = <19 2>; 124 interrupts = <19 2>;
133 interrupt-parent = <40000>; 125 interrupt-parent = <&mpic>;
134 phy-handle = <2452003>; 126 phy-handle = <&phy3>;
135 }; 127 };
136 128
137 serial@4500 { 129 serial@4500 {
@@ -140,7 +132,7 @@
140 reg = <4500 100>; // reg base, size 132 reg = <4500 100>; // reg base, size
141 clock-frequency = <0>; // should we fill in in uboot? 133 clock-frequency = <0>; // should we fill in in uboot?
142 interrupts = <1a 2>; 134 interrupts = <1a 2>;
143 interrupt-parent = <40000>; 135 interrupt-parent = <&mpic>;
144 }; 136 };
145 137
146 serial@4600 { 138 serial@4600 {
@@ -149,85 +141,84 @@
149 reg = <4600 100>; // reg base, size 141 reg = <4600 100>; // reg base, size
150 clock-frequency = <0>; // should we fill in in uboot? 142 clock-frequency = <0>; // should we fill in in uboot?
151 interrupts = <1a 2>; 143 interrupts = <1a 2>;
152 interrupt-parent = <40000>; 144 interrupt-parent = <&mpic>;
153 }; 145 };
154 pci@8000 { 146 pci@8000 {
155 linux,phandle = <8000>;
156 interrupt-map-mask = <f800 0 0 7>; 147 interrupt-map-mask = <f800 0 0 7>;
157 interrupt-map = < 148 interrupt-map = <
158 149
159 /* IDSEL 0x02 */ 150 /* IDSEL 0x02 */
160 1000 0 0 1 40000 31 1 151 1000 0 0 1 &mpic 31 1
161 1000 0 0 2 40000 32 1 152 1000 0 0 2 &mpic 32 1
162 1000 0 0 3 40000 33 1 153 1000 0 0 3 &mpic 33 1
163 1000 0 0 4 40000 34 1 154 1000 0 0 4 &mpic 34 1
164 155
165 /* IDSEL 0x03 */ 156 /* IDSEL 0x03 */
166 1800 0 0 1 40000 34 1 157 1800 0 0 1 &mpic 34 1
167 1800 0 0 2 40000 31 1 158 1800 0 0 2 &mpic 31 1
168 1800 0 0 3 40000 32 1 159 1800 0 0 3 &mpic 32 1
169 1800 0 0 4 40000 33 1 160 1800 0 0 4 &mpic 33 1
170 161
171 /* IDSEL 0x04 */ 162 /* IDSEL 0x04 */
172 2000 0 0 1 40000 33 1 163 2000 0 0 1 &mpic 33 1
173 2000 0 0 2 40000 34 1 164 2000 0 0 2 &mpic 34 1
174 2000 0 0 3 40000 31 1 165 2000 0 0 3 &mpic 31 1
175 2000 0 0 4 40000 32 1 166 2000 0 0 4 &mpic 32 1
176 167
177 /* IDSEL 0x05 */ 168 /* IDSEL 0x05 */
178 2800 0 0 1 40000 32 1 169 2800 0 0 1 &mpic 32 1
179 2800 0 0 2 40000 33 1 170 2800 0 0 2 &mpic 33 1
180 2800 0 0 3 40000 34 1 171 2800 0 0 3 &mpic 34 1
181 2800 0 0 4 40000 31 1 172 2800 0 0 4 &mpic 31 1
182 173
183 /* IDSEL 0x0c */ 174 /* IDSEL 0x0c */
184 6000 0 0 1 40000 31 1 175 6000 0 0 1 &mpic 31 1
185 6000 0 0 2 40000 32 1 176 6000 0 0 2 &mpic 32 1
186 6000 0 0 3 40000 33 1 177 6000 0 0 3 &mpic 33 1
187 6000 0 0 4 40000 34 1 178 6000 0 0 4 &mpic 34 1
188 179
189 /* IDSEL 0x0d */ 180 /* IDSEL 0x0d */
190 6800 0 0 1 40000 34 1 181 6800 0 0 1 &mpic 34 1
191 6800 0 0 2 40000 31 1 182 6800 0 0 2 &mpic 31 1
192 6800 0 0 3 40000 32 1 183 6800 0 0 3 &mpic 32 1
193 6800 0 0 4 40000 33 1 184 6800 0 0 4 &mpic 33 1
194 185
195 /* IDSEL 0x0e */ 186 /* IDSEL 0x0e */
196 7000 0 0 1 40000 33 1 187 7000 0 0 1 &mpic 33 1
197 7000 0 0 2 40000 34 1 188 7000 0 0 2 &mpic 34 1
198 7000 0 0 3 40000 31 1 189 7000 0 0 3 &mpic 31 1
199 7000 0 0 4 40000 32 1 190 7000 0 0 4 &mpic 32 1
200 191
201 /* IDSEL 0x0f */ 192 /* IDSEL 0x0f */
202 7800 0 0 1 40000 32 1 193 7800 0 0 1 &mpic 32 1
203 7800 0 0 2 40000 33 1 194 7800 0 0 2 &mpic 33 1
204 7800 0 0 3 40000 34 1 195 7800 0 0 3 &mpic 34 1
205 7800 0 0 4 40000 31 1 196 7800 0 0 4 &mpic 31 1
206 197
207 /* IDSEL 0x12 */ 198 /* IDSEL 0x12 */
208 9000 0 0 1 40000 31 1 199 9000 0 0 1 &mpic 31 1
209 9000 0 0 2 40000 32 1 200 9000 0 0 2 &mpic 32 1
210 9000 0 0 3 40000 33 1 201 9000 0 0 3 &mpic 33 1
211 9000 0 0 4 40000 34 1 202 9000 0 0 4 &mpic 34 1
212 203
213 /* IDSEL 0x13 */ 204 /* IDSEL 0x13 */
214 9800 0 0 1 40000 34 1 205 9800 0 0 1 &mpic 34 1
215 9800 0 0 2 40000 31 1 206 9800 0 0 2 &mpic 31 1
216 9800 0 0 3 40000 32 1 207 9800 0 0 3 &mpic 32 1
217 9800 0 0 4 40000 33 1 208 9800 0 0 4 &mpic 33 1
218 209
219 /* IDSEL 0x14 */ 210 /* IDSEL 0x14 */
220 a000 0 0 1 40000 33 1 211 a000 0 0 1 &mpic 33 1
221 a000 0 0 2 40000 34 1 212 a000 0 0 2 &mpic 34 1
222 a000 0 0 3 40000 31 1 213 a000 0 0 3 &mpic 31 1
223 a000 0 0 4 40000 32 1 214 a000 0 0 4 &mpic 32 1
224 215
225 /* IDSEL 0x15 */ 216 /* IDSEL 0x15 */
226 a800 0 0 1 40000 32 1 217 a800 0 0 1 &mpic 32 1
227 a800 0 0 2 40000 33 1 218 a800 0 0 2 &mpic 33 1
228 a800 0 0 3 40000 34 1 219 a800 0 0 3 &mpic 34 1
229 a800 0 0 4 40000 31 1>; 220 a800 0 0 4 &mpic 31 1>;
230 interrupt-parent = <40000>; 221 interrupt-parent = <&mpic>;
231 interrupts = <08 2>; 222 interrupts = <08 2>;
232 bus-range = <0 0>; 223 bus-range = <0 0>;
233 ranges = <02000000 0 80000000 80000000 0 20000000 224 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -241,8 +232,7 @@
241 device_type = "pci"; 232 device_type = "pci";
242 }; 233 };
243 234
244 pic@40000 { 235 mpic: pic@40000 {
245 linux,phandle = <40000>;
246 clock-frequency = <0>; 236 clock-frequency = <0>;
247 interrupt-controller; 237 interrupt-controller;
248 #address-cells = <0>; 238 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 7be0bc659e1c..2a1ae760ab3a 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8541CDS"; 14 model = "MPC8541CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8541CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8541@0 { 24 PowerPC,8541@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,17 +64,14 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
@@ -94,8 +87,8 @@
94 reg = <24000 1000>; 87 reg = <24000 1000>;
95 local-mac-address = [ 00 E0 0C 00 73 00 ]; 88 local-mac-address = [ 00 E0 0C 00 73 00 ];
96 interrupts = <d 2 e 2 12 2>; 89 interrupts = <d 2 e 2 12 2>;
97 interrupt-parent = <40000>; 90 interrupt-parent = <&mpic>;
98 phy-handle = <2452000>; 91 phy-handle = <&phy0>;
99 }; 92 };
100 93
101 ethernet@25000 { 94 ethernet@25000 {
@@ -107,8 +100,8 @@
107 reg = <25000 1000>; 100 reg = <25000 1000>;
108 local-mac-address = [ 00 E0 0C 00 73 01 ]; 101 local-mac-address = [ 00 E0 0C 00 73 01 ];
109 interrupts = <13 2 14 2 18 2>; 102 interrupts = <13 2 14 2 18 2>;
110 interrupt-parent = <40000>; 103 interrupt-parent = <&mpic>;
111 phy-handle = <2452001>; 104 phy-handle = <&phy1>;
112 }; 105 };
113 106
114 serial@4500 { 107 serial@4500 {
@@ -117,7 +110,7 @@
117 reg = <4500 100>; // reg base, size 110 reg = <4500 100>; // reg base, size
118 clock-frequency = <0>; // should we fill in in uboot? 111 clock-frequency = <0>; // should we fill in in uboot?
119 interrupts = <1a 2>; 112 interrupts = <1a 2>;
120 interrupt-parent = <40000>; 113 interrupt-parent = <&mpic>;
121 }; 114 };
122 115
123 serial@4600 { 116 serial@4600 {
@@ -126,57 +119,56 @@
126 reg = <4600 100>; // reg base, size 119 reg = <4600 100>; // reg base, size
127 clock-frequency = <0>; // should we fill in in uboot? 120 clock-frequency = <0>; // should we fill in in uboot?
128 interrupts = <1a 2>; 121 interrupts = <1a 2>;
129 interrupt-parent = <40000>; 122 interrupt-parent = <&mpic>;
130 }; 123 };
131 124
132 pci@8000 { 125 pci1: pci@8000 {
133 linux,phandle = <8000>;
134 interrupt-map-mask = <1f800 0 0 7>; 126 interrupt-map-mask = <1f800 0 0 7>;
135 interrupt-map = < 127 interrupt-map = <
136 128
137 /* IDSEL 0x10 */ 129 /* IDSEL 0x10 */
138 08000 0 0 1 40000 30 1 130 08000 0 0 1 &mpic 30 1
139 08000 0 0 2 40000 31 1 131 08000 0 0 2 &mpic 31 1
140 08000 0 0 3 40000 32 1 132 08000 0 0 3 &mpic 32 1
141 08000 0 0 4 40000 33 1 133 08000 0 0 4 &mpic 33 1
142 134
143 /* IDSEL 0x11 */ 135 /* IDSEL 0x11 */
144 08800 0 0 1 40000 30 1 136 08800 0 0 1 &mpic 30 1
145 08800 0 0 2 40000 31 1 137 08800 0 0 2 &mpic 31 1
146 08800 0 0 3 40000 32 1 138 08800 0 0 3 &mpic 32 1
147 08800 0 0 4 40000 33 1 139 08800 0 0 4 &mpic 33 1
148 140
149 /* IDSEL 0x12 (Slot 1) */ 141 /* IDSEL 0x12 (Slot 1) */
150 09000 0 0 1 40000 30 1 142 09000 0 0 1 &mpic 30 1
151 09000 0 0 2 40000 31 1 143 09000 0 0 2 &mpic 31 1
152 09000 0 0 3 40000 32 1 144 09000 0 0 3 &mpic 32 1
153 09000 0 0 4 40000 33 1 145 09000 0 0 4 &mpic 33 1
154 146
155 /* IDSEL 0x13 (Slot 2) */ 147 /* IDSEL 0x13 (Slot 2) */
156 09800 0 0 1 40000 31 1 148 09800 0 0 1 &mpic 31 1
157 09800 0 0 2 40000 32 1 149 09800 0 0 2 &mpic 32 1
158 09800 0 0 3 40000 33 1 150 09800 0 0 3 &mpic 33 1
159 09800 0 0 4 40000 30 1 151 09800 0 0 4 &mpic 30 1
160 152
161 /* IDSEL 0x14 (Slot 3) */ 153 /* IDSEL 0x14 (Slot 3) */
162 0a000 0 0 1 40000 32 1 154 0a000 0 0 1 &mpic 32 1
163 0a000 0 0 2 40000 33 1 155 0a000 0 0 2 &mpic 33 1
164 0a000 0 0 3 40000 30 1 156 0a000 0 0 3 &mpic 30 1
165 0a000 0 0 4 40000 31 1 157 0a000 0 0 4 &mpic 31 1
166 158
167 /* IDSEL 0x15 (Slot 4) */ 159 /* IDSEL 0x15 (Slot 4) */
168 0a800 0 0 1 40000 33 1 160 0a800 0 0 1 &mpic 33 1
169 0a800 0 0 2 40000 30 1 161 0a800 0 0 2 &mpic 30 1
170 0a800 0 0 3 40000 31 1 162 0a800 0 0 3 &mpic 31 1
171 0a800 0 0 4 40000 32 1 163 0a800 0 0 4 &mpic 32 1
172 164
173 /* Bus 1 (Tundra Bridge) */ 165 /* Bus 1 (Tundra Bridge) */
174 /* IDSEL 0x12 (ISA bridge) */ 166 /* IDSEL 0x12 (ISA bridge) */
175 19000 0 0 1 40000 30 1 167 19000 0 0 1 &mpic 30 1
176 19000 0 0 2 40000 31 1 168 19000 0 0 2 &mpic 31 1
177 19000 0 0 3 40000 32 1 169 19000 0 0 3 &mpic 32 1
178 19000 0 0 4 40000 33 1>; 170 19000 0 0 4 &mpic 33 1>;
179 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
180 interrupts = <08 2>; 172 interrupts = <08 2>;
181 bus-range = <0 0>; 173 bus-range = <0 0>;
182 ranges = <02000000 0 80000000 80000000 0 20000000 174 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -200,21 +192,20 @@
200 compatible = "chrp,iic"; 192 compatible = "chrp,iic";
201 big-endian; 193 big-endian;
202 interrupts = <1>; 194 interrupts = <1>;
203 interrupt-parent = <8000>; 195 interrupt-parent = <&pci1>;
204 }; 196 };
205 }; 197 };
206 198
207 pci@9000 { 199 pci@9000 {
208 linux,phandle = <9000>;
209 interrupt-map-mask = <f800 0 0 7>; 200 interrupt-map-mask = <f800 0 0 7>;
210 interrupt-map = < 201 interrupt-map = <
211 202
212 /* IDSEL 0x15 */ 203 /* IDSEL 0x15 */
213 a800 0 0 1 40000 3b 1 204 a800 0 0 1 &mpic 3b 1
214 a800 0 0 2 40000 3b 1 205 a800 0 0 2 &mpic 3b 1
215 a800 0 0 3 40000 3b 1 206 a800 0 0 3 &mpic 3b 1
216 a800 0 0 4 40000 3b 1>; 207 a800 0 0 4 &mpic 3b 1>;
217 interrupt-parent = <40000>; 208 interrupt-parent = <&mpic>;
218 interrupts = <09 2>; 209 interrupts = <09 2>;
219 bus-range = <0 0>; 210 bus-range = <0 0>;
220 ranges = <02000000 0 a0000000 a0000000 0 20000000 211 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -228,8 +219,7 @@
228 device_type = "pci"; 219 device_type = "pci";
229 }; 220 };
230 221
231 pic@40000 { 222 mpic: pic@40000 {
232 linux,phandle = <40000>;
233 clock-frequency = <0>; 223 clock-frequency = <0>;
234 interrupt-controller; 224 interrupt-controller;
235 #address-cells = <0>; 225 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 893d7957c174..7eb5d81d5eec 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8548CDS"; 14 model = "MPC8548CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8548CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8548@0 { 24 PowerPC,8548@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,32 +64,26 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
85 }; 78 };
86 79 phy2: ethernet-phy@2 {
87 ethernet-phy@2 { 80 interrupt-parent = <&mpic>;
88 linux,phandle = <2452002>;
89 interrupt-parent = <40000>;
90 interrupts = <35 0>; 81 interrupts = <35 0>;
91 reg = <2>; 82 reg = <2>;
92 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
93 }; 84 };
94 ethernet-phy@3 { 85 phy3: ethernet-phy@3 {
95 linux,phandle = <2452003>; 86 interrupt-parent = <&mpic>;
96 interrupt-parent = <40000>;
97 interrupts = <35 0>; 87 interrupts = <35 0>;
98 reg = <3>; 88 reg = <3>;
99 device_type = "ethernet-phy"; 89 device_type = "ethernet-phy";
@@ -109,8 +99,8 @@
109 reg = <24000 1000>; 99 reg = <24000 1000>;
110 local-mac-address = [ 00 E0 0C 00 73 00 ]; 100 local-mac-address = [ 00 E0 0C 00 73 00 ];
111 interrupts = <d 2 e 2 12 2>; 101 interrupts = <d 2 e 2 12 2>;
112 interrupt-parent = <40000>; 102 interrupt-parent = <&mpic>;
113 phy-handle = <2452000>; 103 phy-handle = <&phy0>;
114 }; 104 };
115 105
116 ethernet@25000 { 106 ethernet@25000 {
@@ -122,10 +112,11 @@
122 reg = <25000 1000>; 112 reg = <25000 1000>;
123 local-mac-address = [ 00 E0 0C 00 73 01 ]; 113 local-mac-address = [ 00 E0 0C 00 73 01 ];
124 interrupts = <13 2 14 2 18 2>; 114 interrupts = <13 2 14 2 18 2>;
125 interrupt-parent = <40000>; 115 interrupt-parent = <&mpic>;
126 phy-handle = <2452001>; 116 phy-handle = <&phy1>;
127 }; 117 };
128 118
119/* eTSEC 3/4 are currently broken
129 ethernet@26000 { 120 ethernet@26000 {
130 #address-cells = <1>; 121 #address-cells = <1>;
131 #size-cells = <0>; 122 #size-cells = <0>;
@@ -135,11 +126,10 @@
135 reg = <26000 1000>; 126 reg = <26000 1000>;
136 local-mac-address = [ 00 E0 0C 00 73 02 ]; 127 local-mac-address = [ 00 E0 0C 00 73 02 ];
137 interrupts = <f 2 10 2 11 2>; 128 interrupts = <f 2 10 2 11 2>;
138 interrupt-parent = <40000>; 129 interrupt-parent = <&mpic>;
139 phy-handle = <2452001>; 130 phy-handle = <&phy2>;
140 }; 131 };
141 132
142/* eTSEC 4 is currently broken
143 ethernet@27000 { 133 ethernet@27000 {
144 #address-cells = <1>; 134 #address-cells = <1>;
145 #size-cells = <0>; 135 #size-cells = <0>;
@@ -149,8 +139,8 @@
149 reg = <27000 1000>; 139 reg = <27000 1000>;
150 local-mac-address = [ 00 E0 0C 00 73 03 ]; 140 local-mac-address = [ 00 E0 0C 00 73 03 ];
151 interrupts = <15 2 16 2 17 2>; 141 interrupts = <15 2 16 2 17 2>;
152 interrupt-parent = <40000>; 142 interrupt-parent = <&mpic>;
153 phy-handle = <2452001>; 143 phy-handle = <&phy3>;
154 }; 144 };
155 */ 145 */
156 146
@@ -160,7 +150,7 @@
160 reg = <4500 100>; // reg base, size 150 reg = <4500 100>; // reg base, size
161 clock-frequency = <0>; // should we fill in in uboot? 151 clock-frequency = <0>; // should we fill in in uboot?
162 interrupts = <1a 2>; 152 interrupts = <1a 2>;
163 interrupt-parent = <40000>; 153 interrupt-parent = <&mpic>;
164 }; 154 };
165 155
166 serial@4600 { 156 serial@4600 {
@@ -169,57 +159,56 @@
169 reg = <4600 100>; // reg base, size 159 reg = <4600 100>; // reg base, size
170 clock-frequency = <0>; // should we fill in in uboot? 160 clock-frequency = <0>; // should we fill in in uboot?
171 interrupts = <1a 2>; 161 interrupts = <1a 2>;
172 interrupt-parent = <40000>; 162 interrupt-parent = <&mpic>;
173 }; 163 };
174 164
175 pci@8000 { 165 pci1: pci@8000 {
176 linux,phandle = <8000>;
177 interrupt-map-mask = <1f800 0 0 7>; 166 interrupt-map-mask = <1f800 0 0 7>;
178 interrupt-map = < 167 interrupt-map = <
179 168
180 /* IDSEL 0x10 */ 169 /* IDSEL 0x10 */
181 08000 0 0 1 40000 30 1 170 08000 0 0 1 &mpic 30 1
182 08000 0 0 2 40000 31 1 171 08000 0 0 2 &mpic 31 1
183 08000 0 0 3 40000 32 1 172 08000 0 0 3 &mpic 32 1
184 08000 0 0 4 40000 33 1 173 08000 0 0 4 &mpic 33 1
185 174
186 /* IDSEL 0x11 */ 175 /* IDSEL 0x11 */
187 08800 0 0 1 40000 30 1 176 08800 0 0 1 &mpic 30 1
188 08800 0 0 2 40000 31 1 177 08800 0 0 2 &mpic 31 1
189 08800 0 0 3 40000 32 1 178 08800 0 0 3 &mpic 32 1
190 08800 0 0 4 40000 33 1 179 08800 0 0 4 &mpic 33 1
191 180
192 /* IDSEL 0x12 (Slot 1) */ 181 /* IDSEL 0x12 (Slot 1) */
193 09000 0 0 1 40000 30 1 182 09000 0 0 1 &mpic 30 1
194 09000 0 0 2 40000 31 1 183 09000 0 0 2 &mpic 31 1
195 09000 0 0 3 40000 32 1 184 09000 0 0 3 &mpic 32 1
196 09000 0 0 4 40000 33 1 185 09000 0 0 4 &mpic 33 1
197 186
198 /* IDSEL 0x13 (Slot 2) */ 187 /* IDSEL 0x13 (Slot 2) */
199 09800 0 0 1 40000 31 1 188 09800 0 0 1 &mpic 31 1
200 09800 0 0 2 40000 32 1 189 09800 0 0 2 &mpic 32 1
201 09800 0 0 3 40000 33 1 190 09800 0 0 3 &mpic 33 1
202 09800 0 0 4 40000 30 1 191 09800 0 0 4 &mpic 30 1
203 192
204 /* IDSEL 0x14 (Slot 3) */ 193 /* IDSEL 0x14 (Slot 3) */
205 0a000 0 0 1 40000 32 1 194 0a000 0 0 1 &mpic 32 1
206 0a000 0 0 2 40000 33 1 195 0a000 0 0 2 &mpic 33 1
207 0a000 0 0 3 40000 30 1 196 0a000 0 0 3 &mpic 30 1
208 0a000 0 0 4 40000 31 1 197 0a000 0 0 4 &mpic 31 1
209 198
210 /* IDSEL 0x15 (Slot 4) */ 199 /* IDSEL 0x15 (Slot 4) */
211 0a800 0 0 1 40000 33 1 200 0a800 0 0 1 &mpic 33 1
212 0a800 0 0 2 40000 30 1 201 0a800 0 0 2 &mpic 30 1
213 0a800 0 0 3 40000 31 1 202 0a800 0 0 3 &mpic 31 1
214 0a800 0 0 4 40000 32 1 203 0a800 0 0 4 &mpic 32 1
215 204
216 /* Bus 1 (Tundra Bridge) */ 205 /* Bus 1 (Tundra Bridge) */
217 /* IDSEL 0x12 (ISA bridge) */ 206 /* IDSEL 0x12 (ISA bridge) */
218 19000 0 0 1 40000 30 1 207 19000 0 0 1 &mpic 30 1
219 19000 0 0 2 40000 31 1 208 19000 0 0 2 &mpic 31 1
220 19000 0 0 3 40000 32 1 209 19000 0 0 3 &mpic 32 1
221 19000 0 0 4 40000 33 1>; 210 19000 0 0 4 &mpic 33 1>;
222 interrupt-parent = <40000>; 211 interrupt-parent = <&mpic>;
223 interrupts = <08 2>; 212 interrupts = <08 2>;
224 bus-range = <0 0>; 213 bus-range = <0 0>;
225 ranges = <02000000 0 80000000 80000000 0 20000000 214 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -243,21 +232,20 @@
243 compatible = "chrp,iic"; 232 compatible = "chrp,iic";
244 big-endian; 233 big-endian;
245 interrupts = <1>; 234 interrupts = <1>;
246 interrupt-parent = <8000>; 235 interrupt-parent = <&pci1>;
247 }; 236 };
248 }; 237 };
249 238
250 pci@9000 { 239 pci@9000 {
251 linux,phandle = <9000>;
252 interrupt-map-mask = <f800 0 0 7>; 240 interrupt-map-mask = <f800 0 0 7>;
253 interrupt-map = < 241 interrupt-map = <
254 242
255 /* IDSEL 0x15 */ 243 /* IDSEL 0x15 */
256 a800 0 0 1 40000 3b 1 244 a800 0 0 1 &mpic 3b 1
257 a800 0 0 2 40000 3b 1 245 a800 0 0 2 &mpic 3b 1
258 a800 0 0 3 40000 3b 1 246 a800 0 0 3 &mpic 3b 1
259 a800 0 0 4 40000 3b 1>; 247 a800 0 0 4 &mpic 3b 1>;
260 interrupt-parent = <40000>; 248 interrupt-parent = <&mpic>;
261 interrupts = <09 2>; 249 interrupts = <09 2>;
262 bus-range = <0 0>; 250 bus-range = <0 0>;
263 ranges = <02000000 0 a0000000 a0000000 0 20000000 251 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -271,8 +259,7 @@
271 device_type = "pci"; 259 device_type = "pci";
272 }; 260 };
273 261
274 pic@40000 { 262 mpic: pic@40000 {
275 linux,phandle = <40000>;
276 clock-frequency = <0>; 263 clock-frequency = <0>;
277 interrupt-controller; 264 interrupt-controller;
278 #address-cells = <0>; 265 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 118f5a887651..5f9c102a0ab4 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8555CDS"; 14 model = "MPC8555CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8555CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8555@0 { 24 PowerPC,8555@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,17 +64,14 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
@@ -94,8 +87,8 @@
94 reg = <24000 1000>; 87 reg = <24000 1000>;
95 local-mac-address = [ 00 E0 0C 00 73 00 ]; 88 local-mac-address = [ 00 E0 0C 00 73 00 ];
96 interrupts = <0d 2 0e 2 12 2>; 89 interrupts = <0d 2 0e 2 12 2>;
97 interrupt-parent = <40000>; 90 interrupt-parent = <&mpic>;
98 phy-handle = <2452000>; 91 phy-handle = <&phy0>;
99 }; 92 };
100 93
101 ethernet@25000 { 94 ethernet@25000 {
@@ -107,8 +100,8 @@
107 reg = <25000 1000>; 100 reg = <25000 1000>;
108 local-mac-address = [ 00 E0 0C 00 73 01 ]; 101 local-mac-address = [ 00 E0 0C 00 73 01 ];
109 interrupts = <13 2 14 2 18 2>; 102 interrupts = <13 2 14 2 18 2>;
110 interrupt-parent = <40000>; 103 interrupt-parent = <&mpic>;
111 phy-handle = <2452001>; 104 phy-handle = <&phy1>;
112 }; 105 };
113 106
114 serial@4500 { 107 serial@4500 {
@@ -117,7 +110,7 @@
117 reg = <4500 100>; // reg base, size 110 reg = <4500 100>; // reg base, size
118 clock-frequency = <0>; // should we fill in in uboot? 111 clock-frequency = <0>; // should we fill in in uboot?
119 interrupts = <1a 2>; 112 interrupts = <1a 2>;
120 interrupt-parent = <40000>; 113 interrupt-parent = <&mpic>;
121 }; 114 };
122 115
123 serial@4600 { 116 serial@4600 {
@@ -126,57 +119,56 @@
126 reg = <4600 100>; // reg base, size 119 reg = <4600 100>; // reg base, size
127 clock-frequency = <0>; // should we fill in in uboot? 120 clock-frequency = <0>; // should we fill in in uboot?
128 interrupts = <1a 2>; 121 interrupts = <1a 2>;
129 interrupt-parent = <40000>; 122 interrupt-parent = <&mpic>;
130 }; 123 };
131 124
132 pci@8000 { 125 pci1: pci@8000 {
133 linux,phandle = <8000>;
134 interrupt-map-mask = <1f800 0 0 7>; 126 interrupt-map-mask = <1f800 0 0 7>;
135 interrupt-map = < 127 interrupt-map = <
136 128
137 /* IDSEL 0x10 */ 129 /* IDSEL 0x10 */
138 08000 0 0 1 40000 30 1 130 08000 0 0 1 &mpic 30 1
139 08000 0 0 2 40000 31 1 131 08000 0 0 2 &mpic 31 1
140 08000 0 0 3 40000 32 1 132 08000 0 0 3 &mpic 32 1
141 08000 0 0 4 40000 33 1 133 08000 0 0 4 &mpic 33 1
142 134
143 /* IDSEL 0x11 */ 135 /* IDSEL 0x11 */
144 08800 0 0 1 40000 30 1 136 08800 0 0 1 &mpic 30 1
145 08800 0 0 2 40000 31 1 137 08800 0 0 2 &mpic 31 1
146 08800 0 0 3 40000 32 1 138 08800 0 0 3 &mpic 32 1
147 08800 0 0 4 40000 33 1 139 08800 0 0 4 &mpic 33 1
148 140
149 /* IDSEL 0x12 (Slot 1) */ 141 /* IDSEL 0x12 (Slot 1) */
150 09000 0 0 1 40000 30 1 142 09000 0 0 1 &mpic 30 1
151 09000 0 0 2 40000 31 1 143 09000 0 0 2 &mpic 31 1
152 09000 0 0 3 40000 32 1 144 09000 0 0 3 &mpic 32 1
153 09000 0 0 4 40000 33 1 145 09000 0 0 4 &mpic 33 1
154 146
155 /* IDSEL 0x13 (Slot 2) */ 147 /* IDSEL 0x13 (Slot 2) */
156 09800 0 0 1 40000 31 1 148 09800 0 0 1 &mpic 31 1
157 09800 0 0 2 40000 32 1 149 09800 0 0 2 &mpic 32 1
158 09800 0 0 3 40000 33 1 150 09800 0 0 3 &mpic 33 1
159 09800 0 0 4 40000 30 1 151 09800 0 0 4 &mpic 30 1
160 152
161 /* IDSEL 0x14 (Slot 3) */ 153 /* IDSEL 0x14 (Slot 3) */
162 0a000 0 0 1 40000 32 1 154 0a000 0 0 1 &mpic 32 1
163 0a000 0 0 2 40000 33 1 155 0a000 0 0 2 &mpic 33 1
164 0a000 0 0 3 40000 30 1 156 0a000 0 0 3 &mpic 30 1
165 0a000 0 0 4 40000 31 1 157 0a000 0 0 4 &mpic 31 1
166 158
167 /* IDSEL 0x15 (Slot 4) */ 159 /* IDSEL 0x15 (Slot 4) */
168 0a800 0 0 1 40000 33 1 160 0a800 0 0 1 &mpic 33 1
169 0a800 0 0 2 40000 30 1 161 0a800 0 0 2 &mpic 30 1
170 0a800 0 0 3 40000 31 1 162 0a800 0 0 3 &mpic 31 1
171 0a800 0 0 4 40000 32 1 163 0a800 0 0 4 &mpic 32 1
172 164
173 /* Bus 1 (Tundra Bridge) */ 165 /* Bus 1 (Tundra Bridge) */
174 /* IDSEL 0x12 (ISA bridge) */ 166 /* IDSEL 0x12 (ISA bridge) */
175 19000 0 0 1 40000 30 1 167 19000 0 0 1 &mpic 30 1
176 19000 0 0 2 40000 31 1 168 19000 0 0 2 &mpic 31 1
177 19000 0 0 3 40000 32 1 169 19000 0 0 3 &mpic 32 1
178 19000 0 0 4 40000 33 1>; 170 19000 0 0 4 &mpic 33 1>;
179 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
180 interrupts = <08 2>; 172 interrupts = <08 2>;
181 bus-range = <0 0>; 173 bus-range = <0 0>;
182 ranges = <02000000 0 80000000 80000000 0 20000000 174 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -200,21 +192,20 @@
200 compatible = "chrp,iic"; 192 compatible = "chrp,iic";
201 big-endian; 193 big-endian;
202 interrupts = <1>; 194 interrupts = <1>;
203 interrupt-parent = <8000>; 195 interrupt-parent = <&pci1>;
204 }; 196 };
205 }; 197 };
206 198
207 pci@9000 { 199 pci@9000 {
208 linux,phandle = <9000>;
209 interrupt-map-mask = <f800 0 0 7>; 200 interrupt-map-mask = <f800 0 0 7>;
210 interrupt-map = < 201 interrupt-map = <
211 202
212 /* IDSEL 0x15 */ 203 /* IDSEL 0x15 */
213 a800 0 0 1 40000 3b 1 204 a800 0 0 1 &mpic 3b 1
214 a800 0 0 2 40000 3b 1 205 a800 0 0 2 &mpic 3b 1
215 a800 0 0 3 40000 3b 1 206 a800 0 0 3 &mpic 3b 1
216 a800 0 0 4 40000 3b 1>; 207 a800 0 0 4 &mpic 3b 1>;
217 interrupt-parent = <40000>; 208 interrupt-parent = <&mpic>;
218 interrupts = <09 2>; 209 interrupts = <09 2>;
219 bus-range = <0 0>; 210 bus-range = <0 0>;
220 ranges = <02000000 0 a0000000 a0000000 0 20000000 211 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -228,8 +219,7 @@
228 device_type = "pci"; 219 device_type = "pci";
229 }; 220 };
230 221
231 pic@40000 { 222 mpic: pic@40000 {
232 linux,phandle = <40000>;
233 clock-frequency = <0>; 223 clock-frequency = <0>;
234 interrupt-controller; 224 interrupt-controller;
235 #address-cells = <0>; 225 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 2b168486aeba..10502638b0e9 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8560ADS"; 14 model = "MPC8560ADS";
15 compatible = "MPC85xxADS"; 15 compatible = "MPC8560ADS", "MPC85xxADS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8560@0 { 24 PowerPC,8560@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,14 +32,11 @@
34 bus-frequency = <13ab6680>; 32 bus-frequency = <13ab6680>;
35 clock-frequency = <312c8040>; 33 clock-frequency = <312c8040>;
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 linux,boot-cpu;
39 }; 35 };
40 }; 36 };
41 37
42 memory { 38 memory {
43 device_type = "memory"; 39 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 10000000>; 40 reg = <00000000 10000000>;
46 }; 41 };
47 42
@@ -58,33 +53,28 @@
58 device_type = "mdio"; 53 device_type = "mdio";
59 compatible = "gianfar"; 54 compatible = "gianfar";
60 reg = <24520 20>; 55 reg = <24520 20>;
61 linux,phandle = <24520>;
62 #address-cells = <1>; 56 #address-cells = <1>;
63 #size-cells = <0>; 57 #size-cells = <0>;
64 ethernet-phy@0 { 58 phy0: ethernet-phy@0 {
65 linux,phandle = <2452000>; 59 interrupt-parent = <&mpic>;
66 interrupt-parent = <40000>;
67 interrupts = <35 1>; 60 interrupts = <35 1>;
68 reg = <0>; 61 reg = <0>;
69 device_type = "ethernet-phy"; 62 device_type = "ethernet-phy";
70 }; 63 };
71 ethernet-phy@1 { 64 phy1: ethernet-phy@1 {
72 linux,phandle = <2452001>; 65 interrupt-parent = <&mpic>;
73 interrupt-parent = <40000>;
74 interrupts = <35 1>; 66 interrupts = <35 1>;
75 reg = <1>; 67 reg = <1>;
76 device_type = "ethernet-phy"; 68 device_type = "ethernet-phy";
77 }; 69 };
78 ethernet-phy@2 { 70 phy2: ethernet-phy@2 {
79 linux,phandle = <2452002>; 71 interrupt-parent = <&mpic>;
80 interrupt-parent = <40000>;
81 interrupts = <37 1>; 72 interrupts = <37 1>;
82 reg = <2>; 73 reg = <2>;
83 device_type = "ethernet-phy"; 74 device_type = "ethernet-phy";
84 }; 75 };
85 ethernet-phy@3 { 76 phy3: ethernet-phy@3 {
86 linux,phandle = <2452003>; 77 interrupt-parent = <&mpic>;
87 interrupt-parent = <40000>;
88 interrupts = <37 1>; 78 interrupts = <37 1>;
89 reg = <3>; 79 reg = <3>;
90 device_type = "ethernet-phy"; 80 device_type = "ethernet-phy";
@@ -98,8 +88,8 @@
98 reg = <24000 1000>; 88 reg = <24000 1000>;
99 address = [ 00 00 0C 00 00 FD ]; 89 address = [ 00 00 0C 00 00 FD ];
100 interrupts = <d 2 e 2 12 2>; 90 interrupts = <d 2 e 2 12 2>;
101 interrupt-parent = <40000>; 91 interrupt-parent = <&mpic>;
102 phy-handle = <2452000>; 92 phy-handle = <&phy0>;
103 }; 93 };
104 94
105 ethernet@25000 { 95 ethernet@25000 {
@@ -111,12 +101,11 @@
111 reg = <25000 1000>; 101 reg = <25000 1000>;
112 address = [ 00 00 0C 00 01 FD ]; 102 address = [ 00 00 0C 00 01 FD ];
113 interrupts = <13 2 14 2 18 2>; 103 interrupts = <13 2 14 2 18 2>;
114 interrupt-parent = <40000>; 104 interrupt-parent = <&mpic>;
115 phy-handle = <2452001>; 105 phy-handle = <&phy1>;
116 }; 106 };
117 107
118 pci@8000 { 108 pci@8000 {
119 linux,phandle = <8000>;
120 #interrupt-cells = <1>; 109 #interrupt-cells = <1>;
121 #size-cells = <2>; 110 #size-cells = <2>;
122 #address-cells = <3>; 111 #address-cells = <3>;
@@ -128,96 +117,94 @@
128 interrupt-map = < 117 interrupt-map = <
129 118
130 /* IDSEL 0x2 */ 119 /* IDSEL 0x2 */
131 1000 0 0 1 40000 31 1 120 1000 0 0 1 &mpic 31 1
132 1000 0 0 2 40000 32 1 121 1000 0 0 2 &mpic 32 1
133 1000 0 0 3 40000 33 1 122 1000 0 0 3 &mpic 33 1
134 1000 0 0 4 40000 34 1 123 1000 0 0 4 &mpic 34 1
135 124
136 /* IDSEL 0x3 */ 125 /* IDSEL 0x3 */
137 1800 0 0 1 40000 34 1 126 1800 0 0 1 &mpic 34 1
138 1800 0 0 2 40000 31 1 127 1800 0 0 2 &mpic 31 1
139 1800 0 0 3 40000 32 1 128 1800 0 0 3 &mpic 32 1
140 1800 0 0 4 40000 33 1 129 1800 0 0 4 &mpic 33 1
141 130
142 /* IDSEL 0x4 */ 131 /* IDSEL 0x4 */
143 2000 0 0 1 40000 33 1 132 2000 0 0 1 &mpic 33 1
144 2000 0 0 2 40000 34 1 133 2000 0 0 2 &mpic 34 1
145 2000 0 0 3 40000 31 1 134 2000 0 0 3 &mpic 31 1
146 2000 0 0 4 40000 32 1 135 2000 0 0 4 &mpic 32 1
147 136
148 /* IDSEL 0x5 */ 137 /* IDSEL 0x5 */
149 2800 0 0 1 40000 32 1 138 2800 0 0 1 &mpic 32 1
150 2800 0 0 2 40000 33 1 139 2800 0 0 2 &mpic 33 1
151 2800 0 0 3 40000 34 1 140 2800 0 0 3 &mpic 34 1
152 2800 0 0 4 40000 31 1 141 2800 0 0 4 &mpic 31 1
153 142
154 /* IDSEL 12 */ 143 /* IDSEL 12 */
155 6000 0 0 1 40000 31 1 144 6000 0 0 1 &mpic 31 1
156 6000 0 0 2 40000 32 1 145 6000 0 0 2 &mpic 32 1
157 6000 0 0 3 40000 33 1 146 6000 0 0 3 &mpic 33 1
158 6000 0 0 4 40000 34 1 147 6000 0 0 4 &mpic 34 1
159 148
160 /* IDSEL 13 */ 149 /* IDSEL 13 */
161 6800 0 0 1 40000 34 1 150 6800 0 0 1 &mpic 34 1
162 6800 0 0 2 40000 31 1 151 6800 0 0 2 &mpic 31 1
163 6800 0 0 3 40000 32 1 152 6800 0 0 3 &mpic 32 1
164 6800 0 0 4 40000 33 1 153 6800 0 0 4 &mpic 33 1
165 154
166 /* IDSEL 14*/ 155 /* IDSEL 14*/
167 7000 0 0 1 40000 33 1 156 7000 0 0 1 &mpic 33 1
168 7000 0 0 2 40000 34 1 157 7000 0 0 2 &mpic 34 1
169 7000 0 0 3 40000 31 1 158 7000 0 0 3 &mpic 31 1
170 7000 0 0 4 40000 32 1 159 7000 0 0 4 &mpic 32 1
171 160
172 /* IDSEL 15 */ 161 /* IDSEL 15 */
173 7800 0 0 1 40000 32 1 162 7800 0 0 1 &mpic 32 1
174 7800 0 0 2 40000 33 1 163 7800 0 0 2 &mpic 33 1
175 7800 0 0 3 40000 34 1 164 7800 0 0 3 &mpic 34 1
176 7800 0 0 4 40000 31 1 165 7800 0 0 4 &mpic 31 1
177 166
178 /* IDSEL 18 */ 167 /* IDSEL 18 */
179 9000 0 0 1 40000 31 1 168 9000 0 0 1 &mpic 31 1
180 9000 0 0 2 40000 32 1 169 9000 0 0 2 &mpic 32 1
181 9000 0 0 3 40000 33 1 170 9000 0 0 3 &mpic 33 1
182 9000 0 0 4 40000 34 1 171 9000 0 0 4 &mpic 34 1
183 172
184 /* IDSEL 19 */ 173 /* IDSEL 19 */
185 9800 0 0 1 40000 34 1 174 9800 0 0 1 &mpic 34 1
186 9800 0 0 2 40000 31 1 175 9800 0 0 2 &mpic 31 1
187 9800 0 0 3 40000 32 1 176 9800 0 0 3 &mpic 32 1
188 9800 0 0 4 40000 33 1 177 9800 0 0 4 &mpic 33 1
189 178
190 /* IDSEL 20 */ 179 /* IDSEL 20 */
191 a000 0 0 1 40000 33 1 180 a000 0 0 1 &mpic 33 1
192 a000 0 0 2 40000 34 1 181 a000 0 0 2 &mpic 34 1
193 a000 0 0 3 40000 31 1 182 a000 0 0 3 &mpic 31 1
194 a000 0 0 4 40000 32 1 183 a000 0 0 4 &mpic 32 1
195 184
196 /* IDSEL 21 */ 185 /* IDSEL 21 */
197 a800 0 0 1 40000 32 1 186 a800 0 0 1 &mpic 32 1
198 a800 0 0 2 40000 33 1 187 a800 0 0 2 &mpic 33 1
199 a800 0 0 3 40000 34 1 188 a800 0 0 3 &mpic 34 1
200 a800 0 0 4 40000 31 1>; 189 a800 0 0 4 &mpic 31 1>;
201 190
202 interrupt-parent = <40000>; 191 interrupt-parent = <&mpic>;
203 interrupts = <42 0>; 192 interrupts = <8 0>;
204 bus-range = <0 0>; 193 bus-range = <0 0>;
205 ranges = <02000000 0 80000000 80000000 0 20000000 194 ranges = <02000000 0 80000000 80000000 0 20000000
206 01000000 0 00000000 e2000000 0 01000000>; 195 01000000 0 00000000 e2000000 0 01000000>;
207 }; 196 };
208 197
209 pic@40000 { 198 mpic: pic@40000 {
210 linux,phandle = <40000>;
211 interrupt-controller; 199 interrupt-controller;
212 #address-cells = <0>; 200 #address-cells = <0>;
213 #interrupt-cells = <2>; 201 #interrupt-cells = <2>;
214 reg = <40000 20100>; 202 reg = <40000 40000>;
215 built-in; 203 built-in;
216 device_type = "open-pic"; 204 device_type = "open-pic";
217 }; 205 };
218 206
219 cpm@e0000000 { 207 cpm@e0000000 {
220 linux,phandle = <e0000000>;
221 #address-cells = <1>; 208 #address-cells = <1>;
222 #size-cells = <1>; 209 #size-cells = <1>;
223 #interrupt-cells = <2>; 210 #interrupt-cells = <2>;
@@ -228,13 +215,12 @@
228 command-proc = <919c0>; 215 command-proc = <919c0>;
229 brg-frequency = <9d5b340>; 216 brg-frequency = <9d5b340>;
230 217
231 pic@90c00 { 218 cpmpic: pic@90c00 {
232 linux,phandle = <90c00>;
233 interrupt-controller; 219 interrupt-controller;
234 #address-cells = <0>; 220 #address-cells = <0>;
235 #interrupt-cells = <2>; 221 #interrupt-cells = <2>;
236 interrupts = <1e 0>; 222 interrupts = <1e 0>;
237 interrupt-parent = <40000>; 223 interrupt-parent = <&mpic>;
238 reg = <90c00 80>; 224 reg = <90c00 80>;
239 built-in; 225 built-in;
240 device_type = "cpm-pic"; 226 device_type = "cpm-pic";
@@ -250,8 +236,8 @@
250 rx-clock = <1>; 236 rx-clock = <1>;
251 tx-clock = <1>; 237 tx-clock = <1>;
252 current-speed = <1c200>; 238 current-speed = <1c200>;
253 interrupts = <64 1>; 239 interrupts = <28 8>;
254 interrupt-parent = <90c00>; 240 interrupt-parent = <&cpmpic>;
255 }; 241 };
256 242
257 scc@91a20 { 243 scc@91a20 {
@@ -264,8 +250,8 @@
264 rx-clock = <2>; 250 rx-clock = <2>;
265 tx-clock = <2>; 251 tx-clock = <2>;
266 current-speed = <1c200>; 252 current-speed = <1c200>;
267 interrupts = <65 1>; 253 interrupts = <29 8>;
268 interrupt-parent = <90c00>; 254 interrupt-parent = <&cpmpic>;
269 }; 255 };
270 256
271 fcc@91320 { 257 fcc@91320 {
@@ -278,9 +264,9 @@
278 clock-setup = <ff00ffff 250000>; 264 clock-setup = <ff00ffff 250000>;
279 rx-clock = <15>; 265 rx-clock = <15>;
280 tx-clock = <16>; 266 tx-clock = <16>;
281 interrupts = <5d 1>; 267 interrupts = <21 8>;
282 interrupt-parent = <90c00>; 268 interrupt-parent = <&cpmpic>;
283 phy-handle = <2452002>; 269 phy-handle = <&phy2>;
284 }; 270 };
285 271
286 fcc@91340 { 272 fcc@91340 {
@@ -293,9 +279,9 @@
293 clock-setup = <ffff00ff 3700>; 279 clock-setup = <ffff00ff 3700>;
294 rx-clock = <17>; 280 rx-clock = <17>;
295 tx-clock = <18>; 281 tx-clock = <18>;
296 interrupts = <5e 1>; 282 interrupts = <22 8>;
297 interrupt-parent = <90c00>; 283 interrupt-parent = <&cpmpic>;
298 phy-handle = <2452003>; 284 phy-handle = <&phy3>;
299 }; 285 };
300 }; 286 };
301 }; 287 };
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
new file mode 100644
index 000000000000..bf49d8c997b9
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -0,0 +1,362 @@
1/*
2 * MPC8568E MDS Device Tree Source
3 *
4 * Copyright 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/*
14/memreserve/ 00000000 1000000;
15*/
16
17/ {
18 model = "MPC8568EMDS";
19 compatible = "MPC8568EMDS", "MPC85xxMDS";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 cpus {
24 #cpus = <1>;
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 PowerPC,8568@0 {
29 device_type = "cpu";
30 reg = <0>;
31 d-cache-line-size = <20>; // 32 bytes
32 i-cache-line-size = <20>; // 32 bytes
33 d-cache-size = <8000>; // L1, 32K
34 i-cache-size = <8000>; // L1, 32K
35 timebase-frequency = <0>;
36 bus-frequency = <0>;
37 clock-frequency = <0>;
38 32-bit;
39 };
40 };
41
42 memory {
43 device_type = "memory";
44 reg = <00000000 10000000>;
45 };
46
47 bcsr@f8000000 {
48 device_type = "board-control";
49 reg = <f8000000 8000>;
50 };
51
52 soc8568@e0000000 {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 #interrupt-cells = <2>;
56 device_type = "soc";
57 ranges = <0 e0000000 00100000>;
58 reg = <e0000000 00100000>;
59 bus-frequency = <0>;
60
61 i2c@3000 {
62 device_type = "i2c";
63 compatible = "fsl-i2c";
64 reg = <3000 100>;
65 interrupts = <1b 2>;
66 interrupt-parent = <&mpic>;
67 dfsrr;
68 };
69
70 i2c@3100 {
71 device_type = "i2c";
72 compatible = "fsl-i2c";
73 reg = <3100 100>;
74 interrupts = <1b 2>;
75 interrupt-parent = <&mpic>;
76 dfsrr;
77 };
78
79 mdio@24520 {
80 #address-cells = <1>;
81 #size-cells = <0>;
82 device_type = "mdio";
83 compatible = "gianfar";
84 reg = <24520 20>;
85 phy0: ethernet-phy@0 {
86 interrupt-parent = <&mpic>;
87 interrupts = <31 1>;
88 reg = <0>;
89 device_type = "ethernet-phy";
90 };
91 phy1: ethernet-phy@1 {
92 interrupt-parent = <&mpic>;
93 interrupts = <32 1>;
94 reg = <1>;
95 device_type = "ethernet-phy";
96 };
97 phy2: ethernet-phy@2 {
98 interrupt-parent = <&mpic>;
99 interrupts = <31 1>;
100 reg = <2>;
101 device_type = "ethernet-phy";
102 };
103 phy3: ethernet-phy@3 {
104 interrupt-parent = <&mpic>;
105 interrupts = <32 1>;
106 reg = <3>;
107 device_type = "ethernet-phy";
108 };
109 };
110
111 ethernet@24000 {
112 #address-cells = <1>;
113 #size-cells = <0>;
114 device_type = "network";
115 model = "eTSEC";
116 compatible = "gianfar";
117 reg = <24000 1000>;
118 mac-address = [ 00 00 00 00 00 00 ];
119 interrupts = <d 2 e 2 12 2>;
120 interrupt-parent = <&mpic>;
121 phy-handle = <&phy2>;
122 };
123
124 ethernet@25000 {
125 #address-cells = <1>;
126 #size-cells = <0>;
127 device_type = "network";
128 model = "eTSEC";
129 compatible = "gianfar";
130 reg = <25000 1000>;
131 mac-address = [ 00 00 00 00 00 00];
132 interrupts = <13 2 14 2 18 2>;
133 interrupt-parent = <&mpic>;
134 phy-handle = <&phy3>;
135 };
136
137 serial@4500 {
138 device_type = "serial";
139 compatible = "ns16550";
140 reg = <4500 100>;
141 clock-frequency = <0>;
142 interrupts = <1a 2>;
143 interrupt-parent = <&mpic>;
144 };
145
146 serial@4600 {
147 device_type = "serial";
148 compatible = "ns16550";
149 reg = <4600 100>;
150 clock-frequency = <0>;
151 interrupts = <1a 2>;
152 interrupt-parent = <&mpic>;
153 };
154
155 crypto@30000 {
156 device_type = "crypto";
157 model = "SEC2";
158 compatible = "talitos";
159 reg = <30000 f000>;
160 interrupts = <1d 2>;
161 interrupt-parent = <&mpic>;
162 num-channels = <4>;
163 channel-fifo-len = <18>;
164 exec-units-mask = <000000fe>;
165 descriptor-types-mask = <012b0ebf>;
166 };
167
168 mpic: pic@40000 {
169 clock-frequency = <0>;
170 interrupt-controller;
171 #address-cells = <0>;
172 #interrupt-cells = <2>;
173 reg = <40000 40000>;
174 built-in;
175 compatible = "chrp,open-pic";
176 device_type = "open-pic";
177 big-endian;
178 };
179 par_io@e0100 {
180 reg = <e0100 100>;
181 device_type = "par_io";
182 num-ports = <7>;
183
184 pio1: ucc_pin@01 {
185 pio-map = <
186 /* port pin dir open_drain assignment has_irq */
187 4 0a 1 0 2 0 /* TxD0 */
188 4 09 1 0 2 0 /* TxD1 */
189 4 08 1 0 2 0 /* TxD2 */
190 4 07 1 0 2 0 /* TxD3 */
191 4 17 1 0 2 0 /* TxD4 */
192 4 16 1 0 2 0 /* TxD5 */
193 4 15 1 0 2 0 /* TxD6 */
194 4 14 1 0 2 0 /* TxD7 */
195 4 0f 2 0 2 0 /* RxD0 */
196 4 0e 2 0 2 0 /* RxD1 */
197 4 0d 2 0 2 0 /* RxD2 */
198 4 0c 2 0 2 0 /* RxD3 */
199 4 1d 2 0 2 0 /* RxD4 */
200 4 1c 2 0 2 0 /* RxD5 */
201 4 1b 2 0 2 0 /* RxD6 */
202 4 1a 2 0 2 0 /* RxD7 */
203 4 0b 1 0 2 0 /* TX_EN */
204 4 18 1 0 2 0 /* TX_ER */
205 4 0f 2 0 2 0 /* RX_DV */
206 4 1e 2 0 2 0 /* RX_ER */
207 4 11 2 0 2 0 /* RX_CLK */
208 4 13 1 0 2 0 /* GTX_CLK */
209 1 1f 2 0 3 0>; /* GTX125 */
210 };
211 pio2: ucc_pin@02 {
212 pio-map = <
213 /* port pin dir open_drain assignment has_irq */
214 5 0a 1 0 2 0 /* TxD0 */
215 5 09 1 0 2 0 /* TxD1 */
216 5 08 1 0 2 0 /* TxD2 */
217 5 07 1 0 2 0 /* TxD3 */
218 5 17 1 0 2 0 /* TxD4 */
219 5 16 1 0 2 0 /* TxD5 */
220 5 15 1 0 2 0 /* TxD6 */
221 5 14 1 0 2 0 /* TxD7 */
222 5 0f 2 0 2 0 /* RxD0 */
223 5 0e 2 0 2 0 /* RxD1 */
224 5 0d 2 0 2 0 /* RxD2 */
225 5 0c 2 0 2 0 /* RxD3 */
226 5 1d 2 0 2 0 /* RxD4 */
227 5 1c 2 0 2 0 /* RxD5 */
228 5 1b 2 0 2 0 /* RxD6 */
229 5 1a 2 0 2 0 /* RxD7 */
230 5 0b 1 0 2 0 /* TX_EN */
231 5 18 1 0 2 0 /* TX_ER */
232 5 10 2 0 2 0 /* RX_DV */
233 5 1e 2 0 2 0 /* RX_ER */
234 5 11 2 0 2 0 /* RX_CLK */
235 5 13 1 0 2 0 /* GTX_CLK */
236 1 1f 2 0 3 0 /* GTX125 */
237 4 06 3 0 2 0 /* MDIO */
238 4 05 1 0 2 0>; /* MDC */
239 };
240 };
241 };
242
243 qe@e0080000 {
244 #address-cells = <1>;
245 #size-cells = <1>;
246 device_type = "qe";
247 model = "QE";
248 ranges = <0 e0080000 00040000>;
249 reg = <e0080000 480>;
250 brg-frequency = <0>;
251 bus-frequency = <179A7B00>;
252
253 muram@10000 {
254 device_type = "muram";
255 ranges = <0 00010000 0000c000>;
256
257 data-only@0{
258 reg = <0 c000>;
259 };
260 };
261
262 spi@4c0 {
263 device_type = "spi";
264 compatible = "fsl_spi";
265 reg = <4c0 40>;
266 interrupts = <2>;
267 interrupt-parent = <&qeic>;
268 mode = "cpu";
269 };
270
271 spi@500 {
272 device_type = "spi";
273 compatible = "fsl_spi";
274 reg = <500 40>;
275 interrupts = <1>;
276 interrupt-parent = <&qeic>;
277 mode = "cpu";
278 };
279
280 ucc@2000 {
281 device_type = "network";
282 compatible = "ucc_geth";
283 model = "UCC";
284 device-id = <1>;
285 reg = <2000 200>;
286 interrupts = <20>;
287 interrupt-parent = <&qeic>;
288 mac-address = [ 00 04 9f 00 23 23 ];
289 rx-clock = <0>;
290 tx-clock = <19>;
291 phy-handle = <&qe_phy0>;
292 pio-handle = <&pio1>;
293 };
294
295 ucc@3000 {
296 device_type = "network";
297 compatible = "ucc_geth";
298 model = "UCC";
299 device-id = <2>;
300 reg = <3000 200>;
301 interrupts = <21>;
302 interrupt-parent = <&qeic>;
303 mac-address = [ 00 11 22 33 44 55 ];
304 rx-clock = <0>;
305 tx-clock = <14>;
306 phy-handle = <&qe_phy1>;
307 pio-handle = <&pio2>;
308 };
309
310 mdio@2120 {
311 #address-cells = <1>;
312 #size-cells = <0>;
313 reg = <2120 18>;
314 device_type = "mdio";
315 compatible = "ucc_geth_phy";
316
317 /* These are the same PHYs as on
318 * gianfar's MDIO bus */
319 qe_phy0: ethernet-phy@00 {
320 interrupt-parent = <&mpic>;
321 interrupts = <31 1>;
322 reg = <0>;
323 device_type = "ethernet-phy";
324 interface = <6>; //ENET_1000_GMII
325 };
326 qe_phy1: ethernet-phy@01 {
327 interrupt-parent = <&mpic>;
328 interrupts = <32 1>;
329 reg = <1>;
330 device_type = "ethernet-phy";
331 interface = <6>;
332 };
333 qe_phy2: ethernet-phy@02 {
334 interrupt-parent = <&mpic>;
335 interrupts = <31 1>;
336 reg = <2>;
337 device_type = "ethernet-phy";
338 interface = <6>; //ENET_1000_GMII
339 };
340 qe_phy3: ethernet-phy@03 {
341 interrupt-parent = <&mpic>;
342 interrupts = <32 1>;
343 reg = <3>;
344 device_type = "ethernet-phy";
345 interface = <6>; //ENET_1000_GMII
346 };
347 };
348
349 qeic: qeic@80 {
350 interrupt-controller;
351 device_type = "qeic";
352 #address-cells = <0>;
353 #interrupt-cells = <1>;
354 reg = <80 80>;
355 built-in;
356 big-endian;
357 interrupts = <1e 2 1e 2>; //high:30 low:30
358 interrupt-parent = <&mpic>;
359 };
360
361 };
362};
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index f0c7731743ea..8a4995a85ba0 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -32,7 +32,6 @@
32 bus-frequency = <0>; // From uboot 32 bus-frequency = <0>; // From uboot
33 clock-frequency = <0>; // From uboot 33 clock-frequency = <0>; // From uboot
34 32-bit; 34 32-bit;
35 linux,boot-cpu;
36 }; 35 };
37 PowerPC,8641@1 { 36 PowerPC,8641@1 {
38 device_type = "cpu"; 37 device_type = "cpu";
@@ -67,7 +66,7 @@
67 compatible = "fsl-i2c"; 66 compatible = "fsl-i2c";
68 reg = <3000 100>; 67 reg = <3000 100>;
69 interrupts = <2b 2>; 68 interrupts = <2b 2>;
70 interrupt-parent = <40000>; 69 interrupt-parent = <&mpic>;
71 dfsrr; 70 dfsrr;
72 }; 71 };
73 72
@@ -76,7 +75,7 @@
76 compatible = "fsl-i2c"; 75 compatible = "fsl-i2c";
77 reg = <3100 100>; 76 reg = <3100 100>;
78 interrupts = <2b 2>; 77 interrupts = <2b 2>;
79 interrupt-parent = <40000>; 78 interrupt-parent = <&mpic>;
80 dfsrr; 79 dfsrr;
81 }; 80 };
82 81
@@ -86,31 +85,26 @@
86 device_type = "mdio"; 85 device_type = "mdio";
87 compatible = "gianfar"; 86 compatible = "gianfar";
88 reg = <24520 20>; 87 reg = <24520 20>;
89 linux,phandle = <24520>; 88 phy0: ethernet-phy@0 {
90 ethernet-phy@0 { 89 interrupt-parent = <&mpic>;
91 linux,phandle = <2452000>;
92 interrupt-parent = <40000>;
93 interrupts = <4a 1>; 90 interrupts = <4a 1>;
94 reg = <0>; 91 reg = <0>;
95 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
96 }; 93 };
97 ethernet-phy@1 { 94 phy1: ethernet-phy@1 {
98 linux,phandle = <2452001>; 95 interrupt-parent = <&mpic>;
99 interrupt-parent = <40000>;
100 interrupts = <4a 1>; 96 interrupts = <4a 1>;
101 reg = <1>; 97 reg = <1>;
102 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
103 }; 99 };
104 ethernet-phy@2 { 100 phy2: ethernet-phy@2 {
105 linux,phandle = <2452002>; 101 interrupt-parent = <&mpic>;
106 interrupt-parent = <40000>;
107 interrupts = <4a 1>; 102 interrupts = <4a 1>;
108 reg = <2>; 103 reg = <2>;
109 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
110 }; 105 };
111 ethernet-phy@3 { 106 phy3: ethernet-phy@3 {
112 linux,phandle = <2452003>; 107 interrupt-parent = <&mpic>;
113 interrupt-parent = <40000>;
114 interrupts = <4a 1>; 108 interrupts = <4a 1>;
115 reg = <3>; 109 reg = <3>;
116 device_type = "ethernet-phy"; 110 device_type = "ethernet-phy";
@@ -126,8 +120,8 @@
126 reg = <24000 1000>; 120 reg = <24000 1000>;
127 mac-address = [ 00 E0 0C 00 73 00 ]; 121 mac-address = [ 00 E0 0C 00 73 00 ];
128 interrupts = <1d 2 1e 2 22 2>; 122 interrupts = <1d 2 1e 2 22 2>;
129 interrupt-parent = <40000>; 123 interrupt-parent = <&mpic>;
130 phy-handle = <2452000>; 124 phy-handle = <&phy0>;
131 }; 125 };
132 126
133 ethernet@25000 { 127 ethernet@25000 {
@@ -139,8 +133,8 @@
139 reg = <25000 1000>; 133 reg = <25000 1000>;
140 mac-address = [ 00 E0 0C 00 73 01 ]; 134 mac-address = [ 00 E0 0C 00 73 01 ];
141 interrupts = <23 2 24 2 28 2>; 135 interrupts = <23 2 24 2 28 2>;
142 interrupt-parent = <40000>; 136 interrupt-parent = <&mpic>;
143 phy-handle = <2452001>; 137 phy-handle = <&phy1>;
144 }; 138 };
145 139
146 ethernet@26000 { 140 ethernet@26000 {
@@ -152,8 +146,8 @@
152 reg = <26000 1000>; 146 reg = <26000 1000>;
153 mac-address = [ 00 E0 0C 00 02 FD ]; 147 mac-address = [ 00 E0 0C 00 02 FD ];
154 interrupts = <1F 2 20 2 21 2>; 148 interrupts = <1F 2 20 2 21 2>;
155 interrupt-parent = <40000>; 149 interrupt-parent = <&mpic>;
156 phy-handle = <2452002>; 150 phy-handle = <&phy2>;
157 }; 151 };
158 152
159 ethernet@27000 { 153 ethernet@27000 {
@@ -165,8 +159,8 @@
165 reg = <27000 1000>; 159 reg = <27000 1000>;
166 mac-address = [ 00 E0 0C 00 03 FD ]; 160 mac-address = [ 00 E0 0C 00 03 FD ];
167 interrupts = <25 2 26 2 27 2>; 161 interrupts = <25 2 26 2 27 2>;
168 interrupt-parent = <40000>; 162 interrupt-parent = <&mpic>;
169 phy-handle = <2452003>; 163 phy-handle = <&phy3>;
170 }; 164 };
171 serial@4500 { 165 serial@4500 {
172 device_type = "serial"; 166 device_type = "serial";
@@ -174,7 +168,7 @@
174 reg = <4500 100>; 168 reg = <4500 100>;
175 clock-frequency = <0>; 169 clock-frequency = <0>;
176 interrupts = <2a 2>; 170 interrupts = <2a 2>;
177 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
178 }; 172 };
179 173
180 serial@4600 { 174 serial@4600 {
@@ -183,7 +177,7 @@
183 reg = <4600 100>; 177 reg = <4600 100>;
184 clock-frequency = <0>; 178 clock-frequency = <0>;
185 interrupts = <1c 2>; 179 interrupts = <1c 2>;
186 interrupt-parent = <40000>; 180 interrupt-parent = <&mpic>;
187 }; 181 };
188 182
189 pci@8000 { 183 pci@8000 {
@@ -197,103 +191,102 @@
197 ranges = <02000000 0 80000000 80000000 0 20000000 191 ranges = <02000000 0 80000000 80000000 0 20000000
198 01000000 0 00000000 e2000000 0 00100000>; 192 01000000 0 00000000 e2000000 0 00100000>;
199 clock-frequency = <1fca055>; 193 clock-frequency = <1fca055>;
200 interrupt-parent = <40000>; 194 interrupt-parent = <&mpic>;
201 interrupts = <18 2>; 195 interrupts = <18 2>;
202 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
203 interrupt-map = < 197 interrupt-map = <
204 /* IDSEL 0x11 */ 198 /* IDSEL 0x11 */
205 8800 0 0 1 4d0 3 2 199 8800 0 0 1 &i8259 3 2
206 8800 0 0 2 4d0 4 2 200 8800 0 0 2 &i8259 4 2
207 8800 0 0 3 4d0 5 2 201 8800 0 0 3 &i8259 5 2
208 8800 0 0 4 4d0 6 2 202 8800 0 0 4 &i8259 6 2
209 203
210 /* IDSEL 0x12 */ 204 /* IDSEL 0x12 */
211 9000 0 0 1 4d0 4 2 205 9000 0 0 1 &i8259 4 2
212 9000 0 0 2 4d0 5 2 206 9000 0 0 2 &i8259 5 2
213 9000 0 0 3 4d0 6 2 207 9000 0 0 3 &i8259 6 2
214 9000 0 0 4 4d0 3 2 208 9000 0 0 4 &i8259 3 2
215 209
216 /* IDSEL 0x13 */ 210 /* IDSEL 0x13 */
217 9800 0 0 1 4d0 0 0 211 9800 0 0 1 &i8259 0 0
218 9800 0 0 2 4d0 0 0 212 9800 0 0 2 &i8259 0 0
219 9800 0 0 3 4d0 0 0 213 9800 0 0 3 &i8259 0 0
220 9800 0 0 4 4d0 0 0 214 9800 0 0 4 &i8259 0 0
221 215
222 /* IDSEL 0x14 */ 216 /* IDSEL 0x14 */
223 a000 0 0 1 4d0 0 0 217 a000 0 0 1 &i8259 0 0
224 a000 0 0 2 4d0 0 0 218 a000 0 0 2 &i8259 0 0
225 a000 0 0 3 4d0 0 0 219 a000 0 0 3 &i8259 0 0
226 a000 0 0 4 4d0 0 0 220 a000 0 0 4 &i8259 0 0
227 221
228 /* IDSEL 0x15 */ 222 /* IDSEL 0x15 */
229 a800 0 0 1 4d0 0 0 223 a800 0 0 1 &i8259 0 0
230 a800 0 0 2 4d0 0 0 224 a800 0 0 2 &i8259 0 0
231 a800 0 0 3 4d0 0 0 225 a800 0 0 3 &i8259 0 0
232 a800 0 0 4 4d0 0 0 226 a800 0 0 4 &i8259 0 0
233 227
234 /* IDSEL 0x16 */ 228 /* IDSEL 0x16 */
235 b000 0 0 1 4d0 0 0 229 b000 0 0 1 &i8259 0 0
236 b000 0 0 2 4d0 0 0 230 b000 0 0 2 &i8259 0 0
237 b000 0 0 3 4d0 0 0 231 b000 0 0 3 &i8259 0 0
238 b000 0 0 4 4d0 0 0 232 b000 0 0 4 &i8259 0 0
239 233
240 /* IDSEL 0x17 */ 234 /* IDSEL 0x17 */
241 b800 0 0 1 4d0 0 0 235 b800 0 0 1 &i8259 0 0
242 b800 0 0 2 4d0 0 0 236 b800 0 0 2 &i8259 0 0
243 b800 0 0 3 4d0 0 0 237 b800 0 0 3 &i8259 0 0
244 b800 0 0 4 4d0 0 0 238 b800 0 0 4 &i8259 0 0
245 239
246 /* IDSEL 0x18 */ 240 /* IDSEL 0x18 */
247 c000 0 0 1 4d0 0 0 241 c000 0 0 1 &i8259 0 0
248 c000 0 0 2 4d0 0 0 242 c000 0 0 2 &i8259 0 0
249 c000 0 0 3 4d0 0 0 243 c000 0 0 3 &i8259 0 0
250 c000 0 0 4 4d0 0 0 244 c000 0 0 4 &i8259 0 0
251 245
252 /* IDSEL 0x19 */ 246 /* IDSEL 0x19 */
253 c800 0 0 1 4d0 0 0 247 c800 0 0 1 &i8259 0 0
254 c800 0 0 2 4d0 0 0 248 c800 0 0 2 &i8259 0 0
255 c800 0 0 3 4d0 0 0 249 c800 0 0 3 &i8259 0 0
256 c800 0 0 4 4d0 0 0 250 c800 0 0 4 &i8259 0 0
257 251
258 /* IDSEL 0x1a */ 252 /* IDSEL 0x1a */
259 d000 0 0 1 4d0 6 2 253 d000 0 0 1 &i8259 6 2
260 d000 0 0 2 4d0 3 2 254 d000 0 0 2 &i8259 3 2
261 d000 0 0 3 4d0 4 2 255 d000 0 0 3 &i8259 4 2
262 d000 0 0 4 4d0 5 2 256 d000 0 0 4 &i8259 5 2
263 257
264 258
265 /* IDSEL 0x1b */ 259 /* IDSEL 0x1b */
266 d800 0 0 1 4d0 5 2 260 d800 0 0 1 &i8259 5 2
267 d800 0 0 2 4d0 0 0 261 d800 0 0 2 &i8259 0 0
268 d800 0 0 3 4d0 0 0 262 d800 0 0 3 &i8259 0 0
269 d800 0 0 4 4d0 0 0 263 d800 0 0 4 &i8259 0 0
270 264
271 /* IDSEL 0x1c */ 265 /* IDSEL 0x1c */
272 e000 0 0 1 4d0 9 2 266 e000 0 0 1 &i8259 9 2
273 e000 0 0 2 4d0 a 2 267 e000 0 0 2 &i8259 a 2
274 e000 0 0 3 4d0 c 2 268 e000 0 0 3 &i8259 c 2
275 e000 0 0 4 4d0 7 2 269 e000 0 0 4 &i8259 7 2
276 270
277 /* IDSEL 0x1d */ 271 /* IDSEL 0x1d */
278 e800 0 0 1 4d0 9 2 272 e800 0 0 1 &i8259 9 2
279 e800 0 0 2 4d0 a 2 273 e800 0 0 2 &i8259 a 2
280 e800 0 0 3 4d0 b 2 274 e800 0 0 3 &i8259 b 2
281 e800 0 0 4 4d0 0 0 275 e800 0 0 4 &i8259 0 0
282 276
283 /* IDSEL 0x1e */ 277 /* IDSEL 0x1e */
284 f000 0 0 1 4d0 c 2 278 f000 0 0 1 &i8259 c 2
285 f000 0 0 2 4d0 0 0 279 f000 0 0 2 &i8259 0 0
286 f000 0 0 3 4d0 0 0 280 f000 0 0 3 &i8259 0 0
287 f000 0 0 4 4d0 0 0 281 f000 0 0 4 &i8259 0 0
288 282
289 /* IDSEL 0x1f */ 283 /* IDSEL 0x1f */
290 f800 0 0 1 4d0 6 2 284 f800 0 0 1 &i8259 6 2
291 f800 0 0 2 4d0 0 0 285 f800 0 0 2 &i8259 0 0
292 f800 0 0 3 4d0 0 0 286 f800 0 0 3 &i8259 0 0
293 f800 0 0 4 4d0 0 0 287 f800 0 0 4 &i8259 0 0
294 >; 288 >;
295 i8259@4d0 { 289 i8259: i8259@4d0 {
296 linux,phandle = <4d0>;
297 clock-frequency = <0>; 290 clock-frequency = <0>;
298 interrupt-controller; 291 interrupt-controller;
299 device_type = "interrupt-controller"; 292 device_type = "interrupt-controller";
@@ -303,12 +296,11 @@
303 compatible = "chrp,iic"; 296 compatible = "chrp,iic";
304 big-endian; 297 big-endian;
305 interrupts = <49 2>; 298 interrupts = <49 2>;
306 interrupt-parent = <40000>; 299 interrupt-parent = <&mpic>;
307 }; 300 };
308 301
309 }; 302 };
310 pic@40000 { 303 mpic: pic@40000 {
311 linux,phandle = <40000>;
312 clock-frequency = <0>; 304 clock-frequency = <0>;
313 interrupt-controller; 305 interrupt-controller;
314 #address-cells = <0>; 306 #address-cells = <0>;
@@ -317,23 +309,7 @@
317 built-in; 309 built-in;
318 compatible = "chrp,open-pic"; 310 compatible = "chrp,open-pic";
319 device_type = "open-pic"; 311 device_type = "open-pic";
320 big-endian; 312 big-endian;
321 interrupts = <
322 10 2 11 2 12 2 13 2
323 14 2 15 2 16 2 17 2
324 18 2 19 2 1a 2 1b 2
325 1c 2 1d 2 1e 2 1f 2
326 20 2 21 2 22 2 23 2
327 24 2 25 2 26 2 27 2
328 28 2 29 2 2a 2 2b 2
329 2c 2 2d 2 2e 2 2f 2
330 30 2 31 2 32 2 33 2
331 34 2 35 2 36 2 37 2
332 38 2 39 2 2a 2 3b 2
333 3c 2 3d 2 3e 2 3f 2
334 48 1 49 2 4a 1
335 >;
336 interrupt-parent = <40000>;
337 }; 313 };
338 }; 314 };
339}; 315};
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
new file mode 100644
index 000000000000..2b56b5df451a
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -0,0 +1,161 @@
1/*
2 * MPC866 ADS Device Tree Source
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/ {
14 model = "MPC866ADS";
15 compatible = "mpc8xx";
16 #address-cells = <1>;
17 #size-cells = <1>;
18 linux,phandle = <100>;
19
20 cpus {
21 #cpus = <1>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 linux,phandle = <200>;
25
26 PowerPC,866@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <20>; // 32 bytes
30 i-cache-line-size = <20>; // 32 bytes
31 d-cache-size = <2000>; // L1, 8K
32 i-cache-size = <4000>; // L1, 16K
33 timebase-frequency = <0>;
34 bus-frequency = <0>;
35 clock-frequency = <0>;
36 32-bit;
37 interrupts = <f 2>; // decrementer interrupt
38 interrupt-parent = <ff000000>;
39 linux,phandle = <201>;
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 linux,phandle = <300>;
46 reg = <00000000 800000>;
47 };
48
49 soc866@ff000000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 #interrupt-cells = <2>;
53 device_type = "soc";
54 ranges = <0 ff000000 00100000>;
55 reg = <ff000000 00000200>;
56 bus-frequency = <0>;
57 mdio@e80 {
58 device_type = "mdio";
59 compatible = "fs_enet";
60 reg = <e80 8>;
61 linux,phandle = <e80>;
62 #address-cells = <1>;
63 #size-cells = <0>;
64 ethernet-phy@f {
65 linux,phandle = <e800f>;
66 reg = <f>;
67 device_type = "ethernet-phy";
68 };
69 };
70
71 fec@e00 {
72 device_type = "network";
73 compatible = "fs_enet";
74 model = "FEC";
75 device-id = <1>;
76 reg = <e00 188>;
77 mac-address = [ 00 00 0C 00 01 FD ];
78 interrupts = <3 1>;
79 interrupt-parent = <ff000000>;
80 phy-handle = <e800f>;
81 };
82
83 pic@ff000000 {
84 linux,phandle = <ff000000>;
85 interrupt-controller;
86 #address-cells = <0>;
87 #interrupt-cells = <2>;
88 reg = <0 24>;
89 built-in;
90 device_type = "mpc8xx-pic";
91 compatible = "CPM";
92 };
93
94 cpm@ff000000 {
95 linux,phandle = <ff000000>;
96 #address-cells = <1>;
97 #size-cells = <1>;
98 #interrupt-cells = <2>;
99 device_type = "cpm";
100 model = "CPM";
101 ranges = <0 0 4000>;
102 reg = <860 f0>;
103 command-proc = <9c0>;
104 brg-frequency = <0>;
105 interrupts = <0 2>; // cpm error interrupt
106 interrupt-parent = <930>;
107
108 pic@930 {
109 linux,phandle = <930>;
110 interrupt-controller;
111 #address-cells = <0>;
112 #interrupt-cells = <2>;
113 interrupts = <5 2 0 2>;
114 interrupt-parent = <ff000000>;
115 reg = <930 20>;
116 built-in;
117 device_type = "cpm-pic";
118 compatible = "CPM";
119 };
120
121 smc@a80 {
122 device_type = "serial";
123 compatible = "cpm_uart";
124 model = "SMC";
125 device-id = <1>;
126 reg = <a80 10 3e80 40>;
127 clock-setup = <00ffffff 0>;
128 rx-clock = <1>;
129 tx-clock = <1>;
130 current-speed = <0>;
131 interrupts = <4 3>;
132 interrupt-parent = <930>;
133 };
134
135 smc@a90 {
136 device_type = "serial";
137 compatible = "cpm_uart";
138 model = "SMC";
139 device-id = <2>;
140 reg = <a90 20 3f80 40>;
141 clock-setup = <ff00ffff 90000>;
142 rx-clock = <2>;
143 tx-clock = <2>;
144 current-speed = <0>;
145 interrupts = <3 3>;
146 interrupt-parent = <930>;
147 };
148
149 scc@a00 {
150 device_type = "network";
151 compatible = "fs_enet";
152 model = "SCC";
153 device-id = <1>;
154 reg = <a00 18 3c00 80>;
155 mac-address = [ 00 00 0C 00 03 FD ];
156 interrupts = <1e 3>;
157 interrupt-parent = <930>;
158 };
159 };
160 };
161};
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
new file mode 100644
index 000000000000..faecd08c54da
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -0,0 +1,184 @@
1/*
2 * MPC885 ADS Device Tree Source
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/ {
14 model = "MPC885ADS";
15 compatible = "mpc8xx";
16 #address-cells = <1>;
17 #size-cells = <1>;
18 linux,phandle = <100>;
19
20 cpus {
21 #cpus = <1>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 linux,phandle = <200>;
25
26 PowerPC,885@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <20>; // 32 bytes
30 i-cache-line-size = <20>; // 32 bytes
31 d-cache-size = <2000>; // L1, 8K
32 i-cache-size = <2000>; // L1, 8K
33 timebase-frequency = <0>;
34 bus-frequency = <0>;
35 clock-frequency = <0>;
36 32-bit;
37 interrupts = <f 2>; // decrementer interrupt
38 interrupt-parent = <ff000000>;
39 linux,phandle = <201>;
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 linux,phandle = <300>;
46 reg = <00000000 800000>;
47 };
48
49 soc885@ff000000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 #interrupt-cells = <2>;
53 device_type = "soc";
54 ranges = <0 ff000000 00100000>;
55 reg = <ff000000 00000200>;
56 bus-frequency = <0>;
57 mdio@e80 {
58 device_type = "mdio";
59 compatible = "fs_enet";
60 reg = <e80 8>;
61 linux,phandle = <e80>;
62 #address-cells = <1>;
63 #size-cells = <0>;
64 ethernet-phy@0 {
65 linux,phandle = <e8000>;
66 reg = <0>;
67 device_type = "ethernet-phy";
68 };
69 ethernet-phy@1 {
70 linux,phandle = <e8001>;
71 reg = <1>;
72 device_type = "ethernet-phy";
73 };
74 ethernet-phy@2 {
75 linux,phandle = <e8002>;
76 reg = <2>;
77 device_type = "ethernet-phy";
78 };
79 };
80
81 fec@e00 {
82 device_type = "network";
83 compatible = "fs_enet";
84 model = "FEC";
85 device-id = <1>;
86 reg = <e00 188>;
87 mac-address = [ 00 00 0C 00 01 FD ];
88 interrupts = <3 1>;
89 interrupt-parent = <ff000000>;
90 phy-handle = <e8000>;
91 };
92
93 fec@1e00 {
94 device_type = "network";
95 compatible = "fs_enet";
96 model = "FEC";
97 device-id = <2>;
98 reg = <1e00 188>;
99 mac-address = [ 00 00 0C 00 02 FD ];
100 interrupts = <7 1>;
101 interrupt-parent = <ff000000>;
102 phy-handle = <e8001>;
103 };
104
105 pic@ff000000 {
106 linux,phandle = <ff000000>;
107 interrupt-controller;
108 #address-cells = <0>;
109 #interrupt-cells = <2>;
110 reg = <0 24>;
111 built-in;
112 device_type = "mpc8xx-pic";
113 compatible = "CPM";
114 };
115
116 cpm@ff000000 {
117 linux,phandle = <ff000000>;
118 #address-cells = <1>;
119 #size-cells = <1>;
120 #interrupt-cells = <2>;
121 device_type = "cpm";
122 model = "CPM";
123 ranges = <0 0 4000>;
124 reg = <860 f0>;
125 command-proc = <9c0>;
126 brg-frequency = <0>;
127 interrupts = <0 2>; // cpm error interrupt
128 interrupt-parent = <930>;
129
130 pic@930 {
131 linux,phandle = <930>;
132 interrupt-controller;
133 #address-cells = <0>;
134 #interrupt-cells = <2>;
135 interrupts = <5 2 0 2>;
136 interrupt-parent = <ff000000>;
137 reg = <930 20>;
138 built-in;
139 device_type = "cpm-pic";
140 compatible = "CPM";
141 };
142
143 smc@a80 {
144 device_type = "serial";
145 compatible = "cpm_uart";
146 model = "SMC";
147 device-id = <1>;
148 reg = <a80 10 3e80 40>;
149 clock-setup = <00ffffff 0>;
150 rx-clock = <1>;
151 tx-clock = <1>;
152 current-speed = <0>;
153 interrupts = <4 3>;
154 interrupt-parent = <930>;
155 };
156
157 smc@a90 {
158 device_type = "serial";
159 compatible = "cpm_uart";
160 model = "SMC";
161 device-id = <2>;
162 reg = <a90 20 3f80 40>;
163 clock-setup = <ff00ffff 90000>;
164 rx-clock = <2>;
165 tx-clock = <2>;
166 current-speed = <0>;
167 interrupts = <3 3>;
168 interrupt-parent = <930>;
169 };
170
171 scc@a40 {
172 device_type = "network";
173 compatible = "fs_enet";
174 model = "SCC";
175 device-id = <3>;
176 reg = <a40 18 3e00 80>;
177 mac-address = [ 00 00 0C 00 03 FD ];
178 interrupts = <1c 3>;
179 interrupt-parent = <930>;
180 phy-handle = <e8002>;
181 };
182 };
183 };
184};
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index e956548da00c..24367319ce24 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -147,6 +147,7 @@ CONFIG_PPC_RTAS=y
147# CONFIG_RTAS_ERROR_LOGGING is not set 147# CONFIG_RTAS_ERROR_LOGGING is not set
148CONFIG_RTAS_PROC=y 148CONFIG_RTAS_PROC=y
149CONFIG_RTAS_FLASH=y 149CONFIG_RTAS_FLASH=y
150CONFIG_PPC_PMI=m
150CONFIG_MMIO_NVRAM=y 151CONFIG_MMIO_NVRAM=y
151# CONFIG_PPC_MPC106 is not set 152# CONFIG_PPC_MPC106 is not set
152# CONFIG_PPC_970_NAP is not set 153# CONFIG_PPC_970_NAP is not set
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
new file mode 100644
index 000000000000..a1fe97197ead
--- /dev/null
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -0,0 +1,1408 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc4
4# Thu Jan 11 20:55:33 2007
5#
6CONFIG_PPC64=y
7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y
18CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y
21CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y
25# CONFIG_PPC_UDBG_16550 is not set
26# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set
40CONFIG_PPC_OF_PLATFORM_PCI=y
41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y
43CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y
45CONFIG_NR_CPUS=4
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
47
48#
49# Code maturity level options
50#
51CONFIG_EXPERIMENTAL=y
52CONFIG_LOCK_KERNEL=y
53CONFIG_INIT_ENV_ARG_LIMIT=32
54
55#
56# General setup
57#
58CONFIG_LOCALVERSION=""
59CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y
61CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set
63# CONFIG_POSIX_MQUEUE is not set
64# CONFIG_BSD_PROCESS_ACCT is not set
65# CONFIG_TASKSTATS is not set
66# CONFIG_UTS_NS is not set
67# CONFIG_AUDIT is not set
68CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y
70# CONFIG_CPUSETS is not set
71CONFIG_SYSFS_DEPRECATED=y
72# CONFIG_RELAY is not set
73CONFIG_INITRAMFS_SOURCE=""
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y
76# CONFIG_EMBEDDED is not set
77CONFIG_SYSCTL_SYSCALL=y
78CONFIG_KALLSYMS=y
79# CONFIG_KALLSYMS_ALL is not set
80# CONFIG_KALLSYMS_EXTRA_PASS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87CONFIG_EPOLL=y
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102CONFIG_MODVERSIONS=y
103CONFIG_MODULE_SRCVERSION_ALL=y
104CONFIG_KMOD=y
105CONFIG_STOP_MACHINE=y
106
107#
108# Block layer
109#
110CONFIG_BLOCK=y
111# CONFIG_BLK_DEV_IO_TRACE is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125
126#
127# Platform support
128#
129CONFIG_PPC_MULTIPLATFORM=y
130# CONFIG_EMBEDDED6xx is not set
131# CONFIG_APUS is not set
132# CONFIG_PPC_PSERIES is not set
133# CONFIG_PPC_ISERIES is not set
134# CONFIG_PPC_MPC52xx is not set
135# CONFIG_PPC_PMAC is not set
136# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set
138CONFIG_PPC_CELL=y
139# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set
142CONFIG_PPC_CELLEB=y
143CONFIG_PPC_UDBG_BEAT=y
144# CONFIG_U3_DART is not set
145# CONFIG_PPC_RTAS is not set
146# CONFIG_MMIO_NVRAM is not set
147# CONFIG_PPC_MPC106 is not set
148# CONFIG_PPC_970_NAP is not set
149# CONFIG_PPC_INDIRECT_IO is not set
150# CONFIG_GENERIC_IOMAP is not set
151# CONFIG_CPU_FREQ is not set
152# CONFIG_WANT_EARLY_SERIAL is not set
153# CONFIG_MPIC is not set
154
155#
156# Cell Broadband Engine options
157#
158CONFIG_SPU_FS=y
159CONFIG_SPU_BASE=y
160# CONFIG_CBE_RAS is not set
161
162#
163# Kernel options
164#
165# CONFIG_HZ_100 is not set
166CONFIG_HZ_250=y
167# CONFIG_HZ_300 is not set
168# CONFIG_HZ_1000 is not set
169CONFIG_HZ=250
170CONFIG_PREEMPT_NONE=y
171# CONFIG_PREEMPT_VOLUNTARY is not set
172# CONFIG_PREEMPT is not set
173CONFIG_PREEMPT_BKL=y
174CONFIG_BINFMT_ELF=y
175CONFIG_BINFMT_MISC=m
176CONFIG_FORCE_MAX_ZONEORDER=13
177# CONFIG_IOMMU_VMERGE is not set
178CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
179CONFIG_KEXEC=y
180# CONFIG_CRASH_DUMP is not set
181# CONFIG_IRQ_ALL_CPUS is not set
182CONFIG_NUMA=y
183CONFIG_NODES_SHIFT=4
184CONFIG_ARCH_SELECT_MEMORY_MODEL=y
185CONFIG_ARCH_SPARSEMEM_ENABLE=y
186CONFIG_ARCH_SPARSEMEM_DEFAULT=y
187CONFIG_ARCH_POPULATES_NODE_MAP=y
188CONFIG_SELECT_MEMORY_MODEL=y
189# CONFIG_FLATMEM_MANUAL is not set
190# CONFIG_DISCONTIGMEM_MANUAL is not set
191CONFIG_SPARSEMEM_MANUAL=y
192CONFIG_SPARSEMEM=y
193CONFIG_NEED_MULTIPLE_NODES=y
194CONFIG_HAVE_MEMORY_PRESENT=y
195# CONFIG_SPARSEMEM_STATIC is not set
196CONFIG_SPARSEMEM_EXTREME=y
197CONFIG_MEMORY_HOTPLUG=y
198CONFIG_MEMORY_HOTPLUG_SPARSE=y
199CONFIG_SPLIT_PTLOCK_CPUS=4
200CONFIG_MIGRATION=y
201CONFIG_RESOURCES_64BIT=y
202CONFIG_ARCH_MEMORY_PROBE=y
203CONFIG_NODES_SPAN_OTHER_NODES=y
204# CONFIG_PPC_64K_PAGES is not set
205# CONFIG_SCHED_SMT is not set
206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set
209CONFIG_SECCOMP=y
210CONFIG_ISA_DMA_API=y
211
212#
213# Bus options
214#
215CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217# CONFIG_PPC_I8259 is not set
218# CONFIG_PPC_INDIRECT_PCI is not set
219CONFIG_PCI=y
220CONFIG_PCI_DOMAINS=y
221# CONFIG_PCIEPORTBUS is not set
222# CONFIG_PCI_DEBUG is not set
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227# CONFIG_PCCARD is not set
228
229#
230# PCI Hotplug Support
231#
232# CONFIG_HOTPLUG_PCI is not set
233CONFIG_KERNEL_START=0xc000000000000000
234
235#
236# Networking
237#
238CONFIG_NET=y
239
240#
241# Networking options
242#
243# CONFIG_NETDEBUG is not set
244CONFIG_PACKET=y
245# CONFIG_PACKET_MMAP is not set
246CONFIG_UNIX=y
247CONFIG_XFRM=y
248# CONFIG_XFRM_USER is not set
249# CONFIG_XFRM_SUB_POLICY is not set
250# CONFIG_NET_KEY is not set
251CONFIG_INET=y
252CONFIG_IP_MULTICAST=y
253# CONFIG_IP_ADVANCED_ROUTER is not set
254CONFIG_IP_FIB_HASH=y
255# CONFIG_IP_PNP is not set
256# CONFIG_NET_IPIP is not set
257# CONFIG_NET_IPGRE is not set
258# CONFIG_IP_MROUTE is not set
259# CONFIG_ARPD is not set
260CONFIG_SYN_COOKIES=y
261# CONFIG_INET_AH is not set
262# CONFIG_INET_ESP is not set
263# CONFIG_INET_IPCOMP is not set
264# CONFIG_INET_XFRM_TUNNEL is not set
265# CONFIG_INET_TUNNEL is not set
266CONFIG_INET_XFRM_MODE_TRANSPORT=y
267CONFIG_INET_XFRM_MODE_TUNNEL=y
268CONFIG_INET_XFRM_MODE_BEET=y
269CONFIG_INET_DIAG=y
270CONFIG_INET_TCP_DIAG=y
271# CONFIG_TCP_CONG_ADVANCED is not set
272CONFIG_TCP_CONG_CUBIC=y
273CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_TCP_MD5SIG is not set
275
276#
277# IP: Virtual Server Configuration
278#
279# CONFIG_IP_VS is not set
280CONFIG_IPV6=y
281# CONFIG_IPV6_PRIVACY is not set
282# CONFIG_IPV6_ROUTER_PREF is not set
283CONFIG_INET6_AH=m
284CONFIG_INET6_ESP=m
285CONFIG_INET6_IPCOMP=m
286# CONFIG_IPV6_MIP6 is not set
287CONFIG_INET6_XFRM_TUNNEL=m
288CONFIG_INET6_TUNNEL=m
289CONFIG_INET6_XFRM_MODE_TRANSPORT=y
290CONFIG_INET6_XFRM_MODE_TUNNEL=y
291CONFIG_INET6_XFRM_MODE_BEET=y
292# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
293CONFIG_IPV6_SIT=y
294CONFIG_IPV6_TUNNEL=m
295# CONFIG_IPV6_MULTIPLE_TABLES is not set
296# CONFIG_NETWORK_SECMARK is not set
297CONFIG_NETFILTER=y
298# CONFIG_NETFILTER_DEBUG is not set
299
300#
301# Core Netfilter Configuration
302#
303# CONFIG_NETFILTER_NETLINK is not set
304# CONFIG_NF_CONNTRACK_ENABLED is not set
305# CONFIG_NETFILTER_XTABLES is not set
306
307#
308# IP: Netfilter Configuration
309#
310CONFIG_IP_NF_QUEUE=m
311
312#
313# IPv6: Netfilter Configuration (EXPERIMENTAL)
314#
315# CONFIG_IP6_NF_QUEUE is not set
316
317#
318# DCCP Configuration (EXPERIMENTAL)
319#
320# CONFIG_IP_DCCP is not set
321
322#
323# SCTP Configuration (EXPERIMENTAL)
324#
325# CONFIG_IP_SCTP is not set
326
327#
328# TIPC Configuration (EXPERIMENTAL)
329#
330# CONFIG_TIPC is not set
331# CONFIG_ATM is not set
332# CONFIG_BRIDGE is not set
333# CONFIG_VLAN_8021Q is not set
334# CONFIG_DECNET is not set
335# CONFIG_LLC2 is not set
336# CONFIG_IPX is not set
337# CONFIG_ATALK is not set
338# CONFIG_X25 is not set
339# CONFIG_LAPB is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_HAMRADIO is not set
353# CONFIG_IRDA is not set
354# CONFIG_BT is not set
355# CONFIG_IEEE80211 is not set
356
357#
358# Device Drivers
359#
360
361#
362# Generic Driver Options
363#
364CONFIG_STANDALONE=y
365CONFIG_PREVENT_FIRMWARE_BUILD=y
366CONFIG_FW_LOADER=y
367# CONFIG_DEBUG_DRIVER is not set
368# CONFIG_SYS_HYPERVISOR is not set
369
370#
371# Connector - unified userspace <-> kernelspace linker
372#
373# CONFIG_CONNECTOR is not set
374
375#
376# Memory Technology Devices (MTD)
377#
378# CONFIG_MTD is not set
379
380#
381# Parallel port support
382#
383# CONFIG_PARPORT is not set
384
385#
386# Plug and Play support
387#
388
389#
390# Block devices
391#
392# CONFIG_BLK_DEV_FD is not set
393# CONFIG_BLK_CPQ_DA is not set
394# CONFIG_BLK_CPQ_CISS_DA is not set
395# CONFIG_BLK_DEV_DAC960 is not set
396# CONFIG_BLK_DEV_UMEM is not set
397# CONFIG_BLK_DEV_COW_COMMON is not set
398CONFIG_BLK_DEV_LOOP=y
399# CONFIG_BLK_DEV_CRYPTOLOOP is not set
400# CONFIG_BLK_DEV_NBD is not set
401# CONFIG_BLK_DEV_SX8 is not set
402# CONFIG_BLK_DEV_UB is not set
403CONFIG_BLK_DEV_RAM=y
404CONFIG_BLK_DEV_RAM_COUNT=16
405CONFIG_BLK_DEV_RAM_SIZE=131072
406CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
407CONFIG_BLK_DEV_INITRD=y
408# CONFIG_CDROM_PKTCDVD is not set
409# CONFIG_ATA_OVER_ETH is not set
410
411#
412# Misc devices
413#
414# CONFIG_SGI_IOC4 is not set
415# CONFIG_TIFM_CORE is not set
416
417#
418# ATA/ATAPI/MFM/RLL support
419#
420CONFIG_IDE=y
421CONFIG_BLK_DEV_IDE=y
422
423#
424# Please see Documentation/ide.txt for help/info on IDE drives
425#
426# CONFIG_BLK_DEV_IDE_SATA is not set
427CONFIG_BLK_DEV_IDEDISK=y
428CONFIG_IDEDISK_MULTI_MODE=y
429CONFIG_BLK_DEV_IDECD=m
430# CONFIG_BLK_DEV_IDETAPE is not set
431# CONFIG_BLK_DEV_IDEFLOPPY is not set
432# CONFIG_BLK_DEV_IDESCSI is not set
433# CONFIG_IDE_TASK_IOCTL is not set
434
435#
436# IDE chipset support/bugfixes
437#
438CONFIG_IDE_GENERIC=y
439CONFIG_BLK_DEV_IDEPCI=y
440CONFIG_IDEPCI_SHARE_IRQ=y
441# CONFIG_BLK_DEV_OFFBOARD is not set
442CONFIG_BLK_DEV_GENERIC=y
443# CONFIG_BLK_DEV_OPTI621 is not set
444CONFIG_BLK_DEV_IDEDMA_PCI=y
445# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
446CONFIG_IDEDMA_PCI_AUTO=y
447# CONFIG_IDEDMA_ONLYDISK is not set
448# CONFIG_BLK_DEV_AEC62XX is not set
449# CONFIG_BLK_DEV_ALI15X3 is not set
450# CONFIG_BLK_DEV_AMD74XX is not set
451# CONFIG_BLK_DEV_CMD64X is not set
452# CONFIG_BLK_DEV_TRIFLEX is not set
453# CONFIG_BLK_DEV_CY82C693 is not set
454# CONFIG_BLK_DEV_CS5520 is not set
455# CONFIG_BLK_DEV_CS5530 is not set
456# CONFIG_BLK_DEV_HPT34X is not set
457# CONFIG_BLK_DEV_HPT366 is not set
458# CONFIG_BLK_DEV_JMICRON is not set
459# CONFIG_BLK_DEV_SC1200 is not set
460# CONFIG_BLK_DEV_PIIX is not set
461# CONFIG_BLK_DEV_IT821X is not set
462# CONFIG_BLK_DEV_NS87415 is not set
463# CONFIG_BLK_DEV_PDC202XX_OLD is not set
464# CONFIG_BLK_DEV_PDC202XX_NEW is not set
465# CONFIG_BLK_DEV_SVWKS is not set
466# CONFIG_BLK_DEV_SIIMAGE is not set
467# CONFIG_BLK_DEV_SL82C105 is not set
468# CONFIG_BLK_DEV_SLC90E66 is not set
469# CONFIG_BLK_DEV_TRM290 is not set
470# CONFIG_BLK_DEV_VIA82CXXX is not set
471CONFIG_BLK_DEV_IDE_CELLEB=y
472# CONFIG_IDE_ARM is not set
473CONFIG_BLK_DEV_IDEDMA=y
474# CONFIG_IDEDMA_IVB is not set
475CONFIG_IDEDMA_AUTO=y
476# CONFIG_BLK_DEV_HD is not set
477
478#
479# SCSI device support
480#
481# CONFIG_RAID_ATTRS is not set
482CONFIG_SCSI=m
483# CONFIG_SCSI_TGT is not set
484# CONFIG_SCSI_NETLINK is not set
485# CONFIG_SCSI_PROC_FS is not set
486
487#
488# SCSI support type (disk, tape, CD-ROM)
489#
490CONFIG_BLK_DEV_SD=m
491# CONFIG_CHR_DEV_ST is not set
492# CONFIG_CHR_DEV_OSST is not set
493CONFIG_BLK_DEV_SR=m
494# CONFIG_BLK_DEV_SR_VENDOR is not set
495CONFIG_CHR_DEV_SG=m
496# CONFIG_CHR_DEV_SCH is not set
497
498#
499# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
500#
501CONFIG_SCSI_MULTI_LUN=y
502# CONFIG_SCSI_CONSTANTS is not set
503# CONFIG_SCSI_LOGGING is not set
504# CONFIG_SCSI_SCAN_ASYNC is not set
505
506#
507# SCSI Transports
508#
509# CONFIG_SCSI_SPI_ATTRS is not set
510# CONFIG_SCSI_FC_ATTRS is not set
511# CONFIG_SCSI_ISCSI_ATTRS is not set
512# CONFIG_SCSI_SAS_ATTRS is not set
513# CONFIG_SCSI_SAS_LIBSAS is not set
514
515#
516# SCSI low-level drivers
517#
518# CONFIG_ISCSI_TCP is not set
519# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
520# CONFIG_SCSI_3W_9XXX is not set
521# CONFIG_SCSI_ACARD is not set
522# CONFIG_SCSI_AACRAID is not set
523# CONFIG_SCSI_AIC7XXX is not set
524# CONFIG_SCSI_AIC7XXX_OLD is not set
525# CONFIG_SCSI_AIC79XX is not set
526# CONFIG_SCSI_AIC94XX is not set
527# CONFIG_SCSI_ARCMSR is not set
528# CONFIG_MEGARAID_NEWGEN is not set
529# CONFIG_MEGARAID_LEGACY is not set
530# CONFIG_MEGARAID_SAS is not set
531# CONFIG_SCSI_HPTIOP is not set
532# CONFIG_SCSI_BUSLOGIC is not set
533# CONFIG_SCSI_DMX3191D is not set
534# CONFIG_SCSI_EATA is not set
535# CONFIG_SCSI_FUTURE_DOMAIN is not set
536# CONFIG_SCSI_GDTH is not set
537# CONFIG_SCSI_IPS is not set
538# CONFIG_SCSI_INITIO is not set
539# CONFIG_SCSI_INIA100 is not set
540# CONFIG_SCSI_STEX is not set
541# CONFIG_SCSI_SYM53C8XX_2 is not set
542# CONFIG_SCSI_QLOGIC_1280 is not set
543# CONFIG_SCSI_QLA_FC is not set
544# CONFIG_SCSI_QLA_ISCSI is not set
545# CONFIG_SCSI_LPFC is not set
546# CONFIG_SCSI_DC395x is not set
547# CONFIG_SCSI_DC390T is not set
548# CONFIG_SCSI_DEBUG is not set
549# CONFIG_SCSI_SRP is not set
550
551#
552# Serial ATA (prod) and Parallel ATA (experimental) drivers
553#
554# CONFIG_ATA is not set
555
556#
557# Multi-device support (RAID and LVM)
558#
559CONFIG_MD=y
560CONFIG_BLK_DEV_MD=m
561CONFIG_MD_LINEAR=m
562CONFIG_MD_RAID0=m
563CONFIG_MD_RAID1=m
564# CONFIG_MD_RAID10 is not set
565# CONFIG_MD_RAID456 is not set
566# CONFIG_MD_MULTIPATH is not set
567# CONFIG_MD_FAULTY is not set
568CONFIG_BLK_DEV_DM=m
569# CONFIG_DM_DEBUG is not set
570CONFIG_DM_CRYPT=m
571CONFIG_DM_SNAPSHOT=m
572CONFIG_DM_MIRROR=m
573CONFIG_DM_ZERO=m
574CONFIG_DM_MULTIPATH=m
575# CONFIG_DM_MULTIPATH_EMC is not set
576
577#
578# Fusion MPT device support
579#
580# CONFIG_FUSION is not set
581# CONFIG_FUSION_SPI is not set
582# CONFIG_FUSION_FC is not set
583# CONFIG_FUSION_SAS is not set
584
585#
586# IEEE 1394 (FireWire) support
587#
588# CONFIG_IEEE1394 is not set
589
590#
591# I2O device support
592#
593# CONFIG_I2O is not set
594
595#
596# Macintosh device drivers
597#
598# CONFIG_MAC_EMUMOUSEBTN is not set
599# CONFIG_WINDFARM is not set
600
601#
602# Network device support
603#
604CONFIG_NETDEVICES=y
605# CONFIG_DUMMY is not set
606# CONFIG_BONDING is not set
607# CONFIG_EQUALIZER is not set
608# CONFIG_TUN is not set
609
610#
611# ARCnet devices
612#
613# CONFIG_ARCNET is not set
614
615#
616# PHY device support
617#
618# CONFIG_PHYLIB is not set
619
620#
621# Ethernet (10 or 100Mbit)
622#
623CONFIG_NET_ETHERNET=y
624CONFIG_MII=y
625# CONFIG_HAPPYMEAL is not set
626# CONFIG_SUNGEM is not set
627# CONFIG_CASSINI is not set
628# CONFIG_NET_VENDOR_3COM is not set
629
630#
631# Tulip family network device support
632#
633# CONFIG_NET_TULIP is not set
634# CONFIG_HP100 is not set
635# CONFIG_NET_PCI is not set
636
637#
638# Ethernet (1000 Mbit)
639#
640# CONFIG_ACENIC is not set
641# CONFIG_DL2K is not set
642# CONFIG_E1000 is not set
643# CONFIG_NS83820 is not set
644# CONFIG_HAMACHI is not set
645# CONFIG_YELLOWFIN is not set
646# CONFIG_R8169 is not set
647# CONFIG_SIS190 is not set
648# CONFIG_SKGE is not set
649# CONFIG_SKY2 is not set
650# CONFIG_SK98LIN is not set
651# CONFIG_TIGON3 is not set
652# CONFIG_BNX2 is not set
653CONFIG_SPIDER_NET=y
654# CONFIG_QLA3XXX is not set
655
656#
657# Ethernet (10000 Mbit)
658#
659# CONFIG_CHELSIO_T1 is not set
660# CONFIG_IXGB is not set
661# CONFIG_S2IO is not set
662# CONFIG_MYRI10GE is not set
663# CONFIG_NETXEN_NIC is not set
664
665#
666# Token Ring devices
667#
668# CONFIG_TR is not set
669
670#
671# Wireless LAN (non-hamradio)
672#
673# CONFIG_NET_RADIO is not set
674
675#
676# Wan interfaces
677#
678# CONFIG_WAN is not set
679# CONFIG_FDDI is not set
680# CONFIG_HIPPI is not set
681# CONFIG_PPP is not set
682# CONFIG_SLIP is not set
683# CONFIG_NET_FC is not set
684# CONFIG_SHAPER is not set
685# CONFIG_NETCONSOLE is not set
686# CONFIG_NETPOLL is not set
687# CONFIG_NET_POLL_CONTROLLER is not set
688
689#
690# ISDN subsystem
691#
692# CONFIG_ISDN is not set
693
694#
695# Telephony Support
696#
697# CONFIG_PHONE is not set
698
699#
700# Input device support
701#
702CONFIG_INPUT=y
703# CONFIG_INPUT_FF_MEMLESS is not set
704
705#
706# Userland interfaces
707#
708CONFIG_INPUT_MOUSEDEV=y
709# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
710CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
711CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
712# CONFIG_INPUT_JOYDEV is not set
713# CONFIG_INPUT_TSDEV is not set
714# CONFIG_INPUT_EVDEV is not set
715# CONFIG_INPUT_EVBUG is not set
716
717#
718# Input Device Drivers
719#
720# CONFIG_INPUT_KEYBOARD is not set
721# CONFIG_INPUT_MOUSE is not set
722# CONFIG_INPUT_JOYSTICK is not set
723# CONFIG_INPUT_TOUCHSCREEN is not set
724# CONFIG_INPUT_MISC is not set
725
726#
727# Hardware I/O ports
728#
729CONFIG_SERIO=y
730# CONFIG_SERIO_I8042 is not set
731CONFIG_SERIO_SERPORT=y
732# CONFIG_SERIO_PCIPS2 is not set
733# CONFIG_SERIO_RAW is not set
734# CONFIG_GAMEPORT is not set
735
736#
737# Character devices
738#
739CONFIG_VT=y
740CONFIG_VT_CONSOLE=y
741CONFIG_HW_CONSOLE=y
742# CONFIG_VT_HW_CONSOLE_BINDING is not set
743CONFIG_SERIAL_NONSTANDARD=y
744# CONFIG_COMPUTONE is not set
745# CONFIG_ROCKETPORT is not set
746# CONFIG_CYCLADES is not set
747# CONFIG_DIGIEPCA is not set
748# CONFIG_MOXA_INTELLIO is not set
749# CONFIG_MOXA_SMARTIO is not set
750# CONFIG_MOXA_SMARTIO_NEW is not set
751# CONFIG_ISI is not set
752# CONFIG_SYNCLINK is not set
753# CONFIG_SYNCLINKMP is not set
754# CONFIG_SYNCLINK_GT is not set
755# CONFIG_N_HDLC is not set
756# CONFIG_SPECIALIX is not set
757# CONFIG_SX is not set
758# CONFIG_RIO is not set
759# CONFIG_STALDRV is not set
760
761#
762# Serial drivers
763#
764# CONFIG_SERIAL_8250 is not set
765
766#
767# Non-8250 serial port support
768#
769CONFIG_SERIAL_CORE=y
770CONFIG_SERIAL_CORE_CONSOLE=y
771CONFIG_SERIAL_TXX9=y
772CONFIG_HAS_TXX9_SERIAL=y
773CONFIG_SERIAL_TXX9_CONSOLE=y
774# CONFIG_SERIAL_TXX9_STDSERIAL is not set
775# CONFIG_SERIAL_JSM is not set
776CONFIG_UNIX98_PTYS=y
777# CONFIG_LEGACY_PTYS is not set
778CONFIG_HVC_DRIVER=y
779CONFIG_HVC_BEAT=y
780
781#
782# IPMI
783#
784# CONFIG_IPMI_HANDLER is not set
785
786#
787# Watchdog Cards
788#
789CONFIG_WATCHDOG=y
790# CONFIG_WATCHDOG_NOWAYOUT is not set
791
792#
793# Watchdog Device Drivers
794#
795# CONFIG_SOFT_WATCHDOG is not set
796
797#
798# PCI-based Watchdog Cards
799#
800# CONFIG_PCIPCWATCHDOG is not set
801# CONFIG_WDTPCI is not set
802
803#
804# USB-based Watchdog Cards
805#
806# CONFIG_USBPCWATCHDOG is not set
807# CONFIG_HW_RANDOM is not set
808CONFIG_GEN_RTC=y
809# CONFIG_GEN_RTC_X is not set
810# CONFIG_DTLK is not set
811# CONFIG_R3964 is not set
812# CONFIG_APPLICOM is not set
813# CONFIG_AGP is not set
814# CONFIG_DRM is not set
815# CONFIG_RAW_DRIVER is not set
816# CONFIG_HANGCHECK_TIMER is not set
817
818#
819# TPM devices
820#
821# CONFIG_TCG_TPM is not set
822
823#
824# I2C support
825#
826CONFIG_I2C=y
827# CONFIG_I2C_CHARDEV is not set
828
829#
830# I2C Algorithms
831#
832CONFIG_I2C_ALGOBIT=y
833# CONFIG_I2C_ALGOPCF is not set
834# CONFIG_I2C_ALGOPCA is not set
835
836#
837# I2C Hardware Bus support
838#
839# CONFIG_I2C_ALI1535 is not set
840# CONFIG_I2C_ALI1563 is not set
841# CONFIG_I2C_ALI15X3 is not set
842# CONFIG_I2C_AMD756 is not set
843# CONFIG_I2C_AMD8111 is not set
844# CONFIG_I2C_I801 is not set
845# CONFIG_I2C_I810 is not set
846# CONFIG_I2C_PIIX4 is not set
847# CONFIG_I2C_NFORCE2 is not set
848# CONFIG_I2C_OCORES is not set
849# CONFIG_I2C_PARPORT_LIGHT is not set
850# CONFIG_I2C_PROSAVAGE is not set
851# CONFIG_I2C_SAVAGE4 is not set
852# CONFIG_I2C_SIS5595 is not set
853# CONFIG_I2C_SIS630 is not set
854# CONFIG_I2C_SIS96X is not set
855# CONFIG_I2C_STUB is not set
856# CONFIG_I2C_VIA is not set
857# CONFIG_I2C_VIAPRO is not set
858# CONFIG_I2C_VOODOO3 is not set
859# CONFIG_I2C_PCA_ISA is not set
860
861#
862# Miscellaneous I2C Chip support
863#
864# CONFIG_SENSORS_DS1337 is not set
865# CONFIG_SENSORS_DS1374 is not set
866# CONFIG_SENSORS_EEPROM is not set
867# CONFIG_SENSORS_PCF8574 is not set
868# CONFIG_SENSORS_PCA9539 is not set
869# CONFIG_SENSORS_PCF8591 is not set
870# CONFIG_SENSORS_MAX6875 is not set
871# CONFIG_I2C_DEBUG_CORE is not set
872# CONFIG_I2C_DEBUG_ALGO is not set
873# CONFIG_I2C_DEBUG_BUS is not set
874# CONFIG_I2C_DEBUG_CHIP is not set
875
876#
877# SPI support
878#
879# CONFIG_SPI is not set
880# CONFIG_SPI_MASTER is not set
881
882#
883# Dallas's 1-wire bus
884#
885# CONFIG_W1 is not set
886
887#
888# Hardware Monitoring support
889#
890# CONFIG_HWMON is not set
891# CONFIG_HWMON_VID is not set
892
893#
894# Multimedia devices
895#
896# CONFIG_VIDEO_DEV is not set
897
898#
899# Digital Video Broadcasting Devices
900#
901# CONFIG_DVB is not set
902# CONFIG_USB_DABUSB is not set
903
904#
905# Graphics support
906#
907# CONFIG_FIRMWARE_EDID is not set
908# CONFIG_FB is not set
909# CONFIG_FB_IBM_GXT4500 is not set
910
911#
912# Console display driver support
913#
914# CONFIG_VGA_CONSOLE is not set
915CONFIG_DUMMY_CONSOLE=y
916# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
917
918#
919# Sound
920#
921# CONFIG_SOUND is not set
922
923#
924# HID Devices
925#
926CONFIG_HID=y
927
928#
929# USB support
930#
931CONFIG_USB_ARCH_HAS_HCD=y
932CONFIG_USB_ARCH_HAS_OHCI=y
933CONFIG_USB_ARCH_HAS_EHCI=y
934CONFIG_USB=y
935# CONFIG_USB_DEBUG is not set
936
937#
938# Miscellaneous USB options
939#
940CONFIG_USB_DEVICEFS=y
941# CONFIG_USB_BANDWIDTH is not set
942# CONFIG_USB_DYNAMIC_MINORS is not set
943# CONFIG_USB_MULTITHREAD_PROBE is not set
944# CONFIG_USB_OTG is not set
945
946#
947# USB Host Controller Drivers
948#
949CONFIG_USB_EHCI_HCD=m
950# CONFIG_USB_EHCI_SPLIT_ISO is not set
951# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
952# CONFIG_USB_EHCI_TT_NEWSCHED is not set
953CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
954# CONFIG_USB_ISP116X_HCD is not set
955CONFIG_USB_OHCI_HCD=m
956# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
957CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
958CONFIG_USB_OHCI_LITTLE_ENDIAN=y
959# CONFIG_USB_UHCI_HCD is not set
960# CONFIG_USB_SL811_HCD is not set
961
962#
963# USB Device Class drivers
964#
965# CONFIG_USB_ACM is not set
966# CONFIG_USB_PRINTER is not set
967
968#
969# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
970#
971
972#
973# may also be needed; see USB_STORAGE Help for more information
974#
975CONFIG_USB_STORAGE=m
976# CONFIG_USB_STORAGE_DEBUG is not set
977# CONFIG_USB_STORAGE_DATAFAB is not set
978# CONFIG_USB_STORAGE_FREECOM is not set
979# CONFIG_USB_STORAGE_ISD200 is not set
980# CONFIG_USB_STORAGE_DPCM is not set
981# CONFIG_USB_STORAGE_USBAT is not set
982# CONFIG_USB_STORAGE_SDDR09 is not set
983# CONFIG_USB_STORAGE_SDDR55 is not set
984# CONFIG_USB_STORAGE_JUMPSHOT is not set
985# CONFIG_USB_STORAGE_ALAUDA is not set
986# CONFIG_USB_STORAGE_KARMA is not set
987# CONFIG_USB_LIBUSUAL is not set
988
989#
990# USB Input Devices
991#
992CONFIG_USB_HID=y
993# CONFIG_USB_HIDINPUT_POWERBOOK is not set
994# CONFIG_HID_FF is not set
995CONFIG_USB_HIDDEV=y
996# CONFIG_USB_AIPTEK is not set
997# CONFIG_USB_WACOM is not set
998# CONFIG_USB_ACECAD is not set
999# CONFIG_USB_KBTAB is not set
1000# CONFIG_USB_POWERMATE is not set
1001# CONFIG_USB_TOUCHSCREEN is not set
1002# CONFIG_USB_YEALINK is not set
1003# CONFIG_USB_XPAD is not set
1004# CONFIG_USB_ATI_REMOTE is not set
1005# CONFIG_USB_ATI_REMOTE2 is not set
1006# CONFIG_USB_KEYSPAN_REMOTE is not set
1007# CONFIG_USB_APPLETOUCH is not set
1008
1009#
1010# USB Imaging devices
1011#
1012# CONFIG_USB_MDC800 is not set
1013# CONFIG_USB_MICROTEK is not set
1014
1015#
1016# USB Network Adapters
1017#
1018# CONFIG_USB_CATC is not set
1019# CONFIG_USB_KAWETH is not set
1020# CONFIG_USB_PEGASUS is not set
1021# CONFIG_USB_RTL8150 is not set
1022# CONFIG_USB_USBNET_MII is not set
1023# CONFIG_USB_USBNET is not set
1024CONFIG_USB_MON=y
1025
1026#
1027# USB port drivers
1028#
1029
1030#
1031# USB Serial Converter support
1032#
1033# CONFIG_USB_SERIAL is not set
1034
1035#
1036# USB Miscellaneous drivers
1037#
1038# CONFIG_USB_EMI62 is not set
1039# CONFIG_USB_EMI26 is not set
1040# CONFIG_USB_ADUTUX is not set
1041# CONFIG_USB_AUERSWALD is not set
1042# CONFIG_USB_RIO500 is not set
1043# CONFIG_USB_LEGOTOWER is not set
1044# CONFIG_USB_LCD is not set
1045# CONFIG_USB_LED is not set
1046# CONFIG_USB_CYPRESS_CY7C63 is not set
1047# CONFIG_USB_CYTHERM is not set
1048# CONFIG_USB_PHIDGET is not set
1049# CONFIG_USB_IDMOUSE is not set
1050# CONFIG_USB_FTDI_ELAN is not set
1051# CONFIG_USB_APPLEDISPLAY is not set
1052# CONFIG_USB_SISUSBVGA is not set
1053# CONFIG_USB_LD is not set
1054# CONFIG_USB_TRANCEVIBRATOR is not set
1055# CONFIG_USB_TEST is not set
1056
1057#
1058# USB DSL modem support
1059#
1060
1061#
1062# USB Gadget Support
1063#
1064# CONFIG_USB_GADGET is not set
1065
1066#
1067# MMC/SD Card support
1068#
1069# CONFIG_MMC is not set
1070
1071#
1072# LED devices
1073#
1074# CONFIG_NEW_LEDS is not set
1075
1076#
1077# LED drivers
1078#
1079
1080#
1081# LED Triggers
1082#
1083
1084#
1085# InfiniBand support
1086#
1087# CONFIG_INFINIBAND is not set
1088
1089#
1090# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1091#
1092
1093#
1094# Real Time Clock
1095#
1096# CONFIG_RTC_CLASS is not set
1097
1098#
1099# DMA Engine support
1100#
1101# CONFIG_DMA_ENGINE is not set
1102
1103#
1104# DMA Clients
1105#
1106
1107#
1108# DMA Devices
1109#
1110
1111#
1112# Virtualization
1113#
1114
1115#
1116# File systems
1117#
1118CONFIG_EXT2_FS=y
1119CONFIG_EXT2_FS_XATTR=y
1120CONFIG_EXT2_FS_POSIX_ACL=y
1121CONFIG_EXT2_FS_SECURITY=y
1122CONFIG_EXT2_FS_XIP=y
1123CONFIG_FS_XIP=y
1124CONFIG_EXT3_FS=y
1125CONFIG_EXT3_FS_XATTR=y
1126CONFIG_EXT3_FS_POSIX_ACL=y
1127CONFIG_EXT3_FS_SECURITY=y
1128# CONFIG_EXT4DEV_FS is not set
1129CONFIG_JBD=y
1130# CONFIG_JBD_DEBUG is not set
1131CONFIG_FS_MBCACHE=y
1132# CONFIG_REISERFS_FS is not set
1133# CONFIG_JFS_FS is not set
1134CONFIG_FS_POSIX_ACL=y
1135# CONFIG_XFS_FS is not set
1136# CONFIG_GFS2_FS is not set
1137# CONFIG_OCFS2_FS is not set
1138# CONFIG_MINIX_FS is not set
1139# CONFIG_ROMFS_FS is not set
1140CONFIG_INOTIFY=y
1141CONFIG_INOTIFY_USER=y
1142# CONFIG_QUOTA is not set
1143CONFIG_DNOTIFY=y
1144# CONFIG_AUTOFS_FS is not set
1145# CONFIG_AUTOFS4_FS is not set
1146# CONFIG_FUSE_FS is not set
1147
1148#
1149# CD-ROM/DVD Filesystems
1150#
1151CONFIG_ISO9660_FS=m
1152CONFIG_JOLIET=y
1153# CONFIG_ZISOFS is not set
1154CONFIG_UDF_FS=m
1155CONFIG_UDF_NLS=y
1156
1157#
1158# DOS/FAT/NT Filesystems
1159#
1160CONFIG_FAT_FS=m
1161CONFIG_MSDOS_FS=m
1162CONFIG_VFAT_FS=m
1163CONFIG_FAT_DEFAULT_CODEPAGE=437
1164CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1165# CONFIG_NTFS_FS is not set
1166
1167#
1168# Pseudo filesystems
1169#
1170CONFIG_PROC_FS=y
1171CONFIG_PROC_KCORE=y
1172CONFIG_PROC_SYSCTL=y
1173CONFIG_SYSFS=y
1174CONFIG_TMPFS=y
1175# CONFIG_TMPFS_POSIX_ACL is not set
1176CONFIG_HUGETLBFS=y
1177CONFIG_HUGETLB_PAGE=y
1178CONFIG_RAMFS=y
1179# CONFIG_CONFIGFS_FS is not set
1180
1181#
1182# Miscellaneous filesystems
1183#
1184# CONFIG_ADFS_FS is not set
1185# CONFIG_AFFS_FS is not set
1186# CONFIG_HFS_FS is not set
1187# CONFIG_HFSPLUS_FS is not set
1188# CONFIG_BEFS_FS is not set
1189# CONFIG_BFS_FS is not set
1190# CONFIG_EFS_FS is not set
1191# CONFIG_CRAMFS is not set
1192# CONFIG_VXFS_FS is not set
1193# CONFIG_HPFS_FS is not set
1194# CONFIG_QNX4FS_FS is not set
1195# CONFIG_SYSV_FS is not set
1196# CONFIG_UFS_FS is not set
1197
1198#
1199# Network File Systems
1200#
1201CONFIG_NFS_FS=m
1202CONFIG_NFS_V3=y
1203CONFIG_NFS_V3_ACL=y
1204# CONFIG_NFS_V4 is not set
1205# CONFIG_NFS_DIRECTIO is not set
1206CONFIG_NFSD=m
1207CONFIG_NFSD_V2_ACL=y
1208CONFIG_NFSD_V3=y
1209CONFIG_NFSD_V3_ACL=y
1210# CONFIG_NFSD_V4 is not set
1211CONFIG_NFSD_TCP=y
1212CONFIG_LOCKD=m
1213CONFIG_LOCKD_V4=y
1214CONFIG_EXPORTFS=m
1215CONFIG_NFS_ACL_SUPPORT=m
1216CONFIG_NFS_COMMON=y
1217CONFIG_SUNRPC=m
1218# CONFIG_RPCSEC_GSS_KRB5 is not set
1219# CONFIG_RPCSEC_GSS_SPKM3 is not set
1220# CONFIG_SMB_FS is not set
1221# CONFIG_CIFS is not set
1222# CONFIG_NCP_FS is not set
1223# CONFIG_CODA_FS is not set
1224# CONFIG_AFS_FS is not set
1225# CONFIG_9P_FS is not set
1226
1227#
1228# Partition Types
1229#
1230CONFIG_PARTITION_ADVANCED=y
1231# CONFIG_ACORN_PARTITION is not set
1232# CONFIG_OSF_PARTITION is not set
1233# CONFIG_AMIGA_PARTITION is not set
1234# CONFIG_ATARI_PARTITION is not set
1235# CONFIG_MAC_PARTITION is not set
1236CONFIG_MSDOS_PARTITION=y
1237# CONFIG_BSD_DISKLABEL is not set
1238# CONFIG_MINIX_SUBPARTITION is not set
1239# CONFIG_SOLARIS_X86_PARTITION is not set
1240# CONFIG_UNIXWARE_DISKLABEL is not set
1241# CONFIG_LDM_PARTITION is not set
1242# CONFIG_SGI_PARTITION is not set
1243# CONFIG_ULTRIX_PARTITION is not set
1244# CONFIG_SUN_PARTITION is not set
1245# CONFIG_KARMA_PARTITION is not set
1246CONFIG_EFI_PARTITION=y
1247
1248#
1249# Native Language Support
1250#
1251CONFIG_NLS=m
1252CONFIG_NLS_DEFAULT="iso8859-1"
1253# CONFIG_NLS_CODEPAGE_437 is not set
1254# CONFIG_NLS_CODEPAGE_737 is not set
1255# CONFIG_NLS_CODEPAGE_775 is not set
1256# CONFIG_NLS_CODEPAGE_850 is not set
1257# CONFIG_NLS_CODEPAGE_852 is not set
1258# CONFIG_NLS_CODEPAGE_855 is not set
1259# CONFIG_NLS_CODEPAGE_857 is not set
1260# CONFIG_NLS_CODEPAGE_860 is not set
1261# CONFIG_NLS_CODEPAGE_861 is not set
1262# CONFIG_NLS_CODEPAGE_862 is not set
1263# CONFIG_NLS_CODEPAGE_863 is not set
1264# CONFIG_NLS_CODEPAGE_864 is not set
1265# CONFIG_NLS_CODEPAGE_865 is not set
1266# CONFIG_NLS_CODEPAGE_866 is not set
1267# CONFIG_NLS_CODEPAGE_869 is not set
1268# CONFIG_NLS_CODEPAGE_936 is not set
1269# CONFIG_NLS_CODEPAGE_950 is not set
1270# CONFIG_NLS_CODEPAGE_932 is not set
1271# CONFIG_NLS_CODEPAGE_949 is not set
1272# CONFIG_NLS_CODEPAGE_874 is not set
1273# CONFIG_NLS_ISO8859_8 is not set
1274# CONFIG_NLS_CODEPAGE_1250 is not set
1275# CONFIG_NLS_CODEPAGE_1251 is not set
1276# CONFIG_NLS_ASCII is not set
1277CONFIG_NLS_ISO8859_1=m
1278CONFIG_NLS_ISO8859_2=m
1279CONFIG_NLS_ISO8859_3=m
1280CONFIG_NLS_ISO8859_4=m
1281CONFIG_NLS_ISO8859_5=m
1282CONFIG_NLS_ISO8859_6=m
1283CONFIG_NLS_ISO8859_7=m
1284CONFIG_NLS_ISO8859_9=m
1285CONFIG_NLS_ISO8859_13=m
1286CONFIG_NLS_ISO8859_14=m
1287CONFIG_NLS_ISO8859_15=m
1288# CONFIG_NLS_KOI8_R is not set
1289# CONFIG_NLS_KOI8_U is not set
1290# CONFIG_NLS_UTF8 is not set
1291
1292#
1293# Distributed Lock Manager
1294#
1295# CONFIG_DLM is not set
1296
1297#
1298# Library routines
1299#
1300CONFIG_BITREVERSE=y
1301# CONFIG_CRC_CCITT is not set
1302# CONFIG_CRC16 is not set
1303CONFIG_CRC32=y
1304CONFIG_LIBCRC32C=m
1305CONFIG_ZLIB_INFLATE=m
1306CONFIG_ZLIB_DEFLATE=m
1307CONFIG_PLIST=y
1308CONFIG_IOMAP_COPY=y
1309
1310#
1311# Instrumentation Support
1312#
1313# CONFIG_PROFILING is not set
1314# CONFIG_KPROBES is not set
1315
1316#
1317# Kernel hacking
1318#
1319# CONFIG_PRINTK_TIME is not set
1320CONFIG_ENABLE_MUST_CHECK=y
1321CONFIG_MAGIC_SYSRQ=y
1322# CONFIG_UNUSED_SYMBOLS is not set
1323CONFIG_DEBUG_FS=y
1324# CONFIG_HEADERS_CHECK is not set
1325CONFIG_DEBUG_KERNEL=y
1326CONFIG_LOG_BUF_SHIFT=15
1327CONFIG_DETECT_SOFTLOCKUP=y
1328# CONFIG_SCHEDSTATS is not set
1329# CONFIG_DEBUG_SLAB is not set
1330# CONFIG_DEBUG_RT_MUTEXES is not set
1331# CONFIG_RT_MUTEX_TESTER is not set
1332# CONFIG_DEBUG_SPINLOCK is not set
1333CONFIG_DEBUG_MUTEXES=y
1334# CONFIG_DEBUG_RWSEMS is not set
1335CONFIG_DEBUG_SPINLOCK_SLEEP=y
1336# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1337# CONFIG_DEBUG_KOBJECT is not set
1338CONFIG_DEBUG_BUGVERBOSE=y
1339# CONFIG_DEBUG_INFO is not set
1340# CONFIG_DEBUG_VM is not set
1341# CONFIG_DEBUG_LIST is not set
1342# CONFIG_FORCED_INLINING is not set
1343# CONFIG_RCU_TORTURE_TEST is not set
1344# CONFIG_DEBUG_STACKOVERFLOW is not set
1345# CONFIG_DEBUG_STACK_USAGE is not set
1346CONFIG_DEBUGGER=y
1347CONFIG_XMON=y
1348CONFIG_XMON_DEFAULT=y
1349CONFIG_XMON_DISASSEMBLY=y
1350CONFIG_IRQSTACKS=y
1351# CONFIG_BOOTX_TEXT is not set
1352CONFIG_PPC_EARLY_DEBUG=y
1353# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1354# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1355# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1356# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1357# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1358# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1359CONFIG_PPC_EARLY_DEBUG_BEAT=y
1360
1361#
1362# Security options
1363#
1364# CONFIG_KEYS is not set
1365# CONFIG_SECURITY is not set
1366
1367#
1368# Cryptographic options
1369#
1370CONFIG_CRYPTO=y
1371CONFIG_CRYPTO_ALGAPI=y
1372CONFIG_CRYPTO_BLKCIPHER=m
1373CONFIG_CRYPTO_HASH=y
1374CONFIG_CRYPTO_MANAGER=y
1375CONFIG_CRYPTO_HMAC=y
1376# CONFIG_CRYPTO_XCBC is not set
1377CONFIG_CRYPTO_NULL=m
1378CONFIG_CRYPTO_MD4=m
1379CONFIG_CRYPTO_MD5=y
1380CONFIG_CRYPTO_SHA1=m
1381CONFIG_CRYPTO_SHA256=m
1382CONFIG_CRYPTO_SHA512=m
1383CONFIG_CRYPTO_WP512=m
1384CONFIG_CRYPTO_TGR192=m
1385# CONFIG_CRYPTO_GF128MUL is not set
1386CONFIG_CRYPTO_ECB=m
1387CONFIG_CRYPTO_CBC=m
1388# CONFIG_CRYPTO_LRW is not set
1389CONFIG_CRYPTO_DES=m
1390CONFIG_CRYPTO_BLOWFISH=m
1391CONFIG_CRYPTO_TWOFISH=m
1392CONFIG_CRYPTO_TWOFISH_COMMON=m
1393CONFIG_CRYPTO_SERPENT=m
1394CONFIG_CRYPTO_AES=m
1395CONFIG_CRYPTO_CAST5=m
1396CONFIG_CRYPTO_CAST6=m
1397CONFIG_CRYPTO_TEA=m
1398CONFIG_CRYPTO_ARC4=m
1399CONFIG_CRYPTO_KHAZAD=m
1400CONFIG_CRYPTO_ANUBIS=m
1401CONFIG_CRYPTO_DEFLATE=m
1402CONFIG_CRYPTO_MICHAEL_MIC=m
1403CONFIG_CRYPTO_CRC32C=m
1404CONFIG_CRYPTO_TEST=m
1405
1406#
1407# Hardware crypto devices
1408#
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 405c1c908213..dde66a597a8d 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_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.20-rc5 3# Linux kernel version: 2.6.20-rc6
4# Mon Jan 22 22:17:58 2007 4# Sun Jan 28 23:13:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -58,7 +58,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
58# 58#
59# General setup 59# General setup
60# 60#
61CONFIG_LOCALVERSION="-kuroboxHG" 61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y 62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
@@ -206,7 +206,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
206CONFIG_PROC_DEVICETREE=y 206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set 207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set 208# CONFIG_PM is not set
209# CONFIG_SECCOMP is not set 209CONFIG_SECCOMP=y
210CONFIG_ISA_DMA_API=y 210CONFIG_ISA_DMA_API=y
211 211
212# 212#
@@ -312,39 +312,40 @@ CONFIG_NF_CONNTRACK=m
312# CONFIG_NF_CT_ACCT is not set 312# CONFIG_NF_CT_ACCT is not set
313# CONFIG_NF_CONNTRACK_MARK is not set 313# CONFIG_NF_CONNTRACK_MARK is not set
314# CONFIG_NF_CONNTRACK_EVENTS is not set 314# CONFIG_NF_CONNTRACK_EVENTS is not set
315# CONFIG_NF_CT_PROTO_SCTP is not set 315CONFIG_NF_CT_PROTO_GRE=m
316# CONFIG_NF_CONNTRACK_AMANDA is not set 316CONFIG_NF_CT_PROTO_SCTP=m
317CONFIG_NF_CONNTRACK_AMANDA=m
317CONFIG_NF_CONNTRACK_FTP=m 318CONFIG_NF_CONNTRACK_FTP=m
318# CONFIG_NF_CONNTRACK_H323 is not set 319CONFIG_NF_CONNTRACK_H323=m
319CONFIG_NF_CONNTRACK_IRC=m 320CONFIG_NF_CONNTRACK_IRC=m
320# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 321CONFIG_NF_CONNTRACK_NETBIOS_NS=m
321# CONFIG_NF_CONNTRACK_PPTP is not set 322CONFIG_NF_CONNTRACK_PPTP=m
322# CONFIG_NF_CONNTRACK_SIP is not set 323CONFIG_NF_CONNTRACK_SIP=m
323CONFIG_NF_CONNTRACK_TFTP=m 324CONFIG_NF_CONNTRACK_TFTP=m
324CONFIG_NETFILTER_XTABLES=m 325CONFIG_NETFILTER_XTABLES=m
325CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 326# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
326# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 327# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
327CONFIG_NETFILTER_XT_TARGET_MARK=m 328# CONFIG_NETFILTER_XT_TARGET_MARK is not set
328# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set 329# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
329CONFIG_NETFILTER_XT_TARGET_NFLOG=m 330# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
330# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 331# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
331# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 332# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
332CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 333# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
333# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 334# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
334# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 335# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
335CONFIG_NETFILTER_XT_MATCH_ESP=m 336# CONFIG_NETFILTER_XT_MATCH_ESP is not set
336CONFIG_NETFILTER_XT_MATCH_HELPER=m 337# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
337CONFIG_NETFILTER_XT_MATCH_LENGTH=m 338# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
338CONFIG_NETFILTER_XT_MATCH_LIMIT=m 339# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
339CONFIG_NETFILTER_XT_MATCH_MAC=m 340CONFIG_NETFILTER_XT_MATCH_MAC=m
340CONFIG_NETFILTER_XT_MATCH_MARK=m 341# CONFIG_NETFILTER_XT_MATCH_MARK is not set
341# CONFIG_NETFILTER_XT_MATCH_POLICY is not set 342# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
342CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m 343# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
343CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m 344CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
344# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set 345# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
345# CONFIG_NETFILTER_XT_MATCH_REALM is not set 346# CONFIG_NETFILTER_XT_MATCH_REALM is not set
346# CONFIG_NETFILTER_XT_MATCH_SCTP is not set 347# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
347# CONFIG_NETFILTER_XT_MATCH_STATE is not set 348CONFIG_NETFILTER_XT_MATCH_STATE=m
348# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 349# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
349# CONFIG_NETFILTER_XT_MATCH_STRING is not set 350# CONFIG_NETFILTER_XT_MATCH_STRING is not set
350# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set 351# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
@@ -359,12 +360,12 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
359CONFIG_IP_NF_IPTABLES=m 360CONFIG_IP_NF_IPTABLES=m
360CONFIG_IP_NF_MATCH_IPRANGE=m 361CONFIG_IP_NF_MATCH_IPRANGE=m
361# CONFIG_IP_NF_MATCH_TOS is not set 362# CONFIG_IP_NF_MATCH_TOS is not set
362# CONFIG_IP_NF_MATCH_RECENT is not set 363CONFIG_IP_NF_MATCH_RECENT=m
363# CONFIG_IP_NF_MATCH_ECN is not set 364# CONFIG_IP_NF_MATCH_ECN is not set
364# CONFIG_IP_NF_MATCH_AH is not set 365# CONFIG_IP_NF_MATCH_AH is not set
365# CONFIG_IP_NF_MATCH_TTL is not set 366# CONFIG_IP_NF_MATCH_TTL is not set
366# CONFIG_IP_NF_MATCH_OWNER is not set 367CONFIG_IP_NF_MATCH_OWNER=m
367# CONFIG_IP_NF_MATCH_ADDRTYPE is not set 368CONFIG_IP_NF_MATCH_ADDRTYPE=m
368CONFIG_IP_NF_FILTER=m 369CONFIG_IP_NF_FILTER=m
369CONFIG_IP_NF_TARGET_REJECT=m 370CONFIG_IP_NF_TARGET_REJECT=m
370# CONFIG_IP_NF_TARGET_LOG is not set 371# CONFIG_IP_NF_TARGET_LOG is not set
@@ -374,16 +375,17 @@ CONFIG_NF_NAT=m
374CONFIG_NF_NAT_NEEDED=y 375CONFIG_NF_NAT_NEEDED=y
375CONFIG_IP_NF_TARGET_MASQUERADE=m 376CONFIG_IP_NF_TARGET_MASQUERADE=m
376CONFIG_IP_NF_TARGET_REDIRECT=m 377CONFIG_IP_NF_TARGET_REDIRECT=m
377CONFIG_IP_NF_TARGET_NETMAP=m 378# CONFIG_IP_NF_TARGET_NETMAP is not set
378CONFIG_IP_NF_TARGET_SAME=m 379# CONFIG_IP_NF_TARGET_SAME is not set
379# CONFIG_NF_NAT_SNMP_BASIC is not set 380# CONFIG_NF_NAT_SNMP_BASIC is not set
381CONFIG_NF_NAT_PROTO_GRE=m
380CONFIG_NF_NAT_FTP=m 382CONFIG_NF_NAT_FTP=m
381CONFIG_NF_NAT_IRC=m 383CONFIG_NF_NAT_IRC=m
382CONFIG_NF_NAT_TFTP=m 384CONFIG_NF_NAT_TFTP=m
383# CONFIG_NF_NAT_AMANDA is not set 385CONFIG_NF_NAT_AMANDA=m
384# CONFIG_NF_NAT_PPTP is not set 386CONFIG_NF_NAT_PPTP=m
385# CONFIG_NF_NAT_H323 is not set 387CONFIG_NF_NAT_H323=m
386# CONFIG_NF_NAT_SIP is not set 388CONFIG_NF_NAT_SIP=m
387CONFIG_IP_NF_MANGLE=m 389CONFIG_IP_NF_MANGLE=m
388CONFIG_IP_NF_TARGET_TOS=m 390CONFIG_IP_NF_TARGET_TOS=m
389CONFIG_IP_NF_TARGET_ECN=m 391CONFIG_IP_NF_TARGET_ECN=m
@@ -472,6 +474,7 @@ CONFIG_MTD_PARTITIONS=y
472# User Modules And Translation Layers 474# User Modules And Translation Layers
473# 475#
474CONFIG_MTD_CHAR=y 476CONFIG_MTD_CHAR=y
477CONFIG_MTD_BLKDEVS=y
475CONFIG_MTD_BLOCK=y 478CONFIG_MTD_BLOCK=y
476# CONFIG_FTL is not set 479# CONFIG_FTL is not set
477# CONFIG_NFTL is not set 480# CONFIG_NFTL is not set
@@ -518,6 +521,7 @@ CONFIG_MTD_PHYSMAP=y
518CONFIG_MTD_PHYSMAP_START=0xffc00000 521CONFIG_MTD_PHYSMAP_START=0xffc00000
519CONFIG_MTD_PHYSMAP_LEN=0x400000 522CONFIG_MTD_PHYSMAP_LEN=0x400000
520CONFIG_MTD_PHYSMAP_BANKWIDTH=1 523CONFIG_MTD_PHYSMAP_BANKWIDTH=1
524# CONFIG_MTD_PHYSMAP_OF is not set
521# CONFIG_MTD_PLATRAM is not set 525# CONFIG_MTD_PLATRAM is not set
522 526
523# 527#
@@ -540,6 +544,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
540# NAND Flash Device Drivers 544# NAND Flash Device Drivers
541# 545#
542# CONFIG_MTD_NAND is not set 546# CONFIG_MTD_NAND is not set
547# CONFIG_MTD_NAND_CAFE is not set
543 548
544# 549#
545# OneNAND Flash Device Drivers 550# OneNAND Flash Device Drivers
@@ -696,7 +701,7 @@ CONFIG_ATA=y
696# CONFIG_PATA_HPT37X is not set 701# CONFIG_PATA_HPT37X is not set
697# CONFIG_PATA_HPT3X2N is not set 702# CONFIG_PATA_HPT3X2N is not set
698# CONFIG_PATA_HPT3X3 is not set 703# CONFIG_PATA_HPT3X3 is not set
699# CONFIG_PATA_IT821X is not set 704CONFIG_PATA_IT821X=y
700# CONFIG_PATA_JMICRON is not set 705# CONFIG_PATA_JMICRON is not set
701# CONFIG_PATA_TRIFLEX is not set 706# CONFIG_PATA_TRIFLEX is not set
702# CONFIG_PATA_MARVELL is not set 707# CONFIG_PATA_MARVELL is not set
@@ -763,11 +768,33 @@ CONFIG_TUN=m
763# 768#
764# PHY device support 769# PHY device support
765# 770#
771# CONFIG_PHYLIB is not set
766 772
767# 773#
768# Ethernet (10 or 100Mbit) 774# Ethernet (10 or 100Mbit)
769# 775#
770# CONFIG_NET_ETHERNET is not set 776CONFIG_NET_ETHERNET=y
777# CONFIG_MII is not set
778# CONFIG_HAPPYMEAL is not set
779# CONFIG_SUNGEM is not set
780# CONFIG_CASSINI is not set
781# CONFIG_NET_VENDOR_3COM is not set
782
783#
784# Tulip family network device support
785#
786CONFIG_NET_TULIP=y
787# CONFIG_DE2104X is not set
788CONFIG_TULIP=y
789# CONFIG_TULIP_MWI is not set
790CONFIG_TULIP_MMIO=y
791# CONFIG_TULIP_NAPI is not set
792# CONFIG_DE4X5 is not set
793# CONFIG_WINBOND_840 is not set
794# CONFIG_DM9102 is not set
795# CONFIG_ULI526X is not set
796# CONFIG_HP100 is not set
797# CONFIG_NET_PCI is not set
771 798
772# 799#
773# Ethernet (1000 Mbit) 800# Ethernet (1000 Mbit)
@@ -829,7 +856,8 @@ CONFIG_NET_RADIO=y
829# CONFIG_USB_ZD1201 is not set 856# CONFIG_USB_ZD1201 is not set
830# CONFIG_HOSTAP is not set 857# CONFIG_HOSTAP is not set
831# CONFIG_BCM43XX is not set 858# CONFIG_BCM43XX is not set
832# CONFIG_ZD1211RW is not set 859CONFIG_ZD1211RW=m
860# CONFIG_ZD1211RW_DEBUG is not set
833CONFIG_NET_WIRELESS=y 861CONFIG_NET_WIRELESS=y
834 862
835# 863#
@@ -1098,7 +1126,7 @@ CONFIG_DUMMY_CONSOLE=y
1098# 1126#
1099# HID Devices 1127# HID Devices
1100# 1128#
1101CONFIG_HID=y 1129CONFIG_HID=m
1102 1130
1103# 1131#
1104# USB support 1132# USB support
@@ -1115,7 +1143,6 @@ CONFIG_USB=y
1115CONFIG_USB_DEVICEFS=y 1143CONFIG_USB_DEVICEFS=y
1116# CONFIG_USB_BANDWIDTH is not set 1144# CONFIG_USB_BANDWIDTH is not set
1117# CONFIG_USB_DYNAMIC_MINORS is not set 1145# CONFIG_USB_DYNAMIC_MINORS is not set
1118# CONFIG_USB_MULTITHREAD_PROBE is not set
1119# CONFIG_USB_OTG is not set 1146# CONFIG_USB_OTG is not set
1120 1147
1121# 1148#
@@ -1136,7 +1163,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1136# USB Device Class drivers 1163# USB Device Class drivers
1137# 1164#
1138# CONFIG_USB_ACM is not set 1165# CONFIG_USB_ACM is not set
1139# CONFIG_USB_PRINTER is not set 1166CONFIG_USB_PRINTER=m
1140 1167
1141# 1168#
1142# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1169# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1371,7 +1398,11 @@ CONFIG_FS_MBCACHE=y
1371# CONFIG_REISERFS_FS is not set 1398# CONFIG_REISERFS_FS is not set
1372# CONFIG_JFS_FS is not set 1399# CONFIG_JFS_FS is not set
1373CONFIG_FS_POSIX_ACL=y 1400CONFIG_FS_POSIX_ACL=y
1374# CONFIG_XFS_FS is not set 1401CONFIG_XFS_FS=m
1402# CONFIG_XFS_QUOTA is not set
1403# CONFIG_XFS_SECURITY is not set
1404# CONFIG_XFS_POSIX_ACL is not set
1405# CONFIG_XFS_RT is not set
1375# CONFIG_GFS2_FS is not set 1406# CONFIG_GFS2_FS is not set
1376# CONFIG_OCFS2_FS is not set 1407# CONFIG_OCFS2_FS is not set
1377# CONFIG_MINIX_FS is not set 1408# CONFIG_MINIX_FS is not set
@@ -1461,7 +1492,12 @@ CONFIG_SUNRPC_GSS=y
1461CONFIG_RPCSEC_GSS_KRB5=y 1492CONFIG_RPCSEC_GSS_KRB5=y
1462# CONFIG_RPCSEC_GSS_SPKM3 is not set 1493# CONFIG_RPCSEC_GSS_SPKM3 is not set
1463# CONFIG_SMB_FS is not set 1494# CONFIG_SMB_FS is not set
1464# CONFIG_CIFS is not set 1495CONFIG_CIFS=m
1496# CONFIG_CIFS_STATS is not set
1497# CONFIG_CIFS_WEAK_PW_HASH is not set
1498# CONFIG_CIFS_XATTR is not set
1499# CONFIG_CIFS_DEBUG2 is not set
1500# CONFIG_CIFS_EXPERIMENTAL is not set
1465# CONFIG_NCP_FS is not set 1501# CONFIG_NCP_FS is not set
1466# CONFIG_CODA_FS is not set 1502# CONFIG_CODA_FS is not set
1467# CONFIG_AFS_FS is not set 1503# CONFIG_AFS_FS is not set
@@ -1495,7 +1531,7 @@ CONFIG_NLS_CODEPAGE_437=m
1495# CONFIG_NLS_CODEPAGE_869 is not set 1531# CONFIG_NLS_CODEPAGE_869 is not set
1496# CONFIG_NLS_CODEPAGE_936 is not set 1532# CONFIG_NLS_CODEPAGE_936 is not set
1497# CONFIG_NLS_CODEPAGE_950 is not set 1533# CONFIG_NLS_CODEPAGE_950 is not set
1498# CONFIG_NLS_CODEPAGE_932 is not set 1534CONFIG_NLS_CODEPAGE_932=m
1499# CONFIG_NLS_CODEPAGE_949 is not set 1535# CONFIG_NLS_CODEPAGE_949 is not set
1500# CONFIG_NLS_CODEPAGE_874 is not set 1536# CONFIG_NLS_CODEPAGE_874 is not set
1501# CONFIG_NLS_ISO8859_8 is not set 1537# CONFIG_NLS_ISO8859_8 is not set
@@ -1526,12 +1562,14 @@ CONFIG_NLS_UTF8=m
1526# Library routines 1562# Library routines
1527# 1563#
1528CONFIG_BITREVERSE=y 1564CONFIG_BITREVERSE=y
1529# CONFIG_CRC_CCITT is not set 1565CONFIG_CRC_CCITT=m
1530# CONFIG_CRC16 is not set 1566# CONFIG_CRC16 is not set
1531CONFIG_CRC32=y 1567CONFIG_CRC32=y
1532CONFIG_LIBCRC32C=m 1568CONFIG_LIBCRC32C=m
1533CONFIG_ZLIB_INFLATE=m 1569CONFIG_ZLIB_INFLATE=m
1534CONFIG_ZLIB_DEFLATE=m 1570CONFIG_ZLIB_DEFLATE=m
1571CONFIG_TEXTSEARCH=y
1572CONFIG_TEXTSEARCH_KMP=m
1535CONFIG_PLIST=y 1573CONFIG_PLIST=y
1536CONFIG_IOMAP_COPY=y 1574CONFIG_IOMAP_COPY=y
1537 1575
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
new file mode 100644
index 000000000000..2af45025082f
--- /dev/null
+++ b/arch/powerpc/configs/mpc8272_ads_defconfig
@@ -0,0 +1,848 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc5
4# Fri Jul 14 20:36:35 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24# CONFIG_DEFAULT_UIMAGE is not set
25
26#
27# Processor support
28#
29# CONFIG_CLASSIC32 is not set
30# CONFIG_PPC_52xx is not set
31CONFIG_PPC_82xx=y
32# CONFIG_PPC_83xx is not set
33# CONFIG_PPC_85xx is not set
34# CONFIG_40x is not set
35# CONFIG_44x is not set
36# CONFIG_8xx is not set
37# CONFIG_E200 is not set
38CONFIG_6xx=y
39CONFIG_PPC_FPU=y
40CONFIG_PPC_STD_MMU=y
41CONFIG_PPC_STD_MMU_32=y
42# CONFIG_SMP is not set
43
44#
45# Code maturity level options
46#
47# CONFIG_EXPERIMENTAL is not set
48CONFIG_BROKEN_ON_SMP=y
49CONFIG_INIT_ENV_ARG_LIMIT=32
50
51#
52# General setup
53#
54CONFIG_LOCALVERSION="powerpc8272"
55CONFIG_LOCALVERSION_AUTO=y
56CONFIG_SWAP=y
57CONFIG_SYSVIPC=y
58# CONFIG_BSD_PROCESS_ACCT is not set
59CONFIG_SYSCTL=y
60# CONFIG_AUDIT is not set
61CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y
63# CONFIG_RELAY is not set
64CONFIG_INITRAMFS_SOURCE=""
65CONFIG_EMBEDDED=y
66CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y
68CONFIG_KALLSYMS_EXTRA_PASS=y
69CONFIG_HOTPLUG=y
70CONFIG_PRINTK=y
71CONFIG_BUG=y
72CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y
74CONFIG_FUTEX=y
75CONFIG_EPOLL=y
76CONFIG_SHMEM=y
77CONFIG_SLAB=y
78# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set
81
82#
83# Loadable module support
84#
85# CONFIG_MODULES is not set
86
87#
88# Block layer
89#
90# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set
92# CONFIG_LSF is not set
93
94#
95# IO Schedulers
96#
97CONFIG_IOSCHED_NOOP=y
98CONFIG_IOSCHED_AS=y
99CONFIG_IOSCHED_DEADLINE=y
100CONFIG_IOSCHED_CFQ=y
101CONFIG_DEFAULT_AS=y
102# CONFIG_DEFAULT_DEADLINE is not set
103# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_PQ2ADS=y
107CONFIG_8260=y
108CONFIG_8272=y
109CONFIG_CPM2=y
110# CONFIG_WANT_EARLY_SERIAL is not set
111CONFIG_EMBEDDEDBOOT=y
112
113#
114# Platform support
115#
116CONFIG_ADS8272=y
117
118#
119# Kernel options
120#
121# CONFIG_HIGHMEM is not set
122# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y
124# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y
127# CONFIG_PREEMPT_VOLUNTARY is not set
128# CONFIG_PREEMPT is not set
129CONFIG_BINFMT_ELF=y
130CONFIG_BINFMT_MISC=y
131# CONFIG_PC_KEYBOARD is not set
132CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4
137CONFIG_PROC_DEVICETREE=y
138# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set
140# CONFIG_SOFTWARE_SUSPEND is not set
141CONFIG_SECCOMP=y
142CONFIG_ISA_DMA_API=y
143
144#
145# Bus options
146#
147# CONFIG_PPC_I8259 is not set
148CONFIG_FSL_SOC=y
149# CONFIG_PCI is not set
150# CONFIG_PCI_DOMAINS is not set
151
152#
153# PCCARD (PCMCIA/CardBus) support
154#
155# CONFIG_PCCARD is not set
156
157#
158# PCI Hotplug Support
159#
160
161#
162# Advanced setup
163#
164# CONFIG_ADVANCED_OPTIONS is not set
165
166#
167# Default settings for advanced configuration options are used
168#
169CONFIG_HIGHMEM_START=0xfe000000
170CONFIG_LOWMEM_SIZE=0x30000000
171CONFIG_KERNEL_START=0xc0000000
172CONFIG_TASK_SIZE=0x80000000
173CONFIG_BOOT_LOAD=0x00400000
174
175#
176# Networking
177#
178CONFIG_NET=y
179
180#
181# Networking options
182#
183# CONFIG_NETDEBUG is not set
184CONFIG_PACKET=y
185# CONFIG_PACKET_MMAP is not set
186CONFIG_UNIX=y
187# CONFIG_NET_KEY is not set
188CONFIG_INET=y
189CONFIG_IP_MULTICAST=y
190# CONFIG_IP_ADVANCED_ROUTER is not set
191CONFIG_IP_FIB_HASH=y
192CONFIG_IP_PNP=y
193CONFIG_IP_PNP_DHCP=y
194CONFIG_IP_PNP_BOOTP=y
195# CONFIG_IP_PNP_RARP is not set
196# CONFIG_NET_IPIP is not set
197# CONFIG_NET_IPGRE is not set
198# CONFIG_IP_MROUTE is not set
199CONFIG_SYN_COOKIES=y
200# CONFIG_INET_AH is not set
201# CONFIG_INET_ESP is not set
202# CONFIG_INET_IPCOMP is not set
203# CONFIG_INET_XFRM_TUNNEL is not set
204# CONFIG_INET_TUNNEL is not set
205CONFIG_INET_DIAG=y
206CONFIG_INET_TCP_DIAG=y
207# CONFIG_TCP_CONG_ADVANCED is not set
208CONFIG_TCP_CONG_BIC=y
209
210#
211# IP: Virtual Server Configuration
212#
213# CONFIG_IP_VS is not set
214CONFIG_IPV6=y
215# CONFIG_IPV6_PRIVACY is not set
216# CONFIG_IPV6_ROUTER_PREF is not set
217# CONFIG_INET6_AH is not set
218# CONFIG_INET6_ESP is not set
219# CONFIG_INET6_IPCOMP is not set
220# CONFIG_INET6_XFRM_TUNNEL is not set
221# CONFIG_INET6_TUNNEL is not set
222# CONFIG_IPV6_TUNNEL is not set
223CONFIG_NETFILTER=y
224# CONFIG_NETFILTER_DEBUG is not set
225
226#
227# Core Netfilter Configuration
228#
229# CONFIG_NETFILTER_NETLINK is not set
230# CONFIG_NETFILTER_XTABLES is not set
231
232#
233# IP: Netfilter Configuration
234#
235# CONFIG_IP_NF_CONNTRACK is not set
236# CONFIG_IP_NF_QUEUE is not set
237# CONFIG_BRIDGE is not set
238# CONFIG_VLAN_8021Q is not set
239# CONFIG_DECNET is not set
240# CONFIG_LLC2 is not set
241# CONFIG_IPX is not set
242# CONFIG_ATALK is not set
243
244#
245# QoS and/or fair queueing
246#
247# CONFIG_NET_SCHED is not set
248
249#
250# Network testing
251#
252# CONFIG_NET_PKTGEN is not set
253# CONFIG_HAMRADIO is not set
254# CONFIG_IRDA is not set
255# CONFIG_BT is not set
256# CONFIG_IEEE80211 is not set
257
258#
259# Device Drivers
260#
261
262#
263# Generic Driver Options
264#
265CONFIG_STANDALONE=y
266CONFIG_PREVENT_FIRMWARE_BUILD=y
267# CONFIG_FW_LOADER is not set
268# CONFIG_DEBUG_DRIVER is not set
269
270#
271# Connector - unified userspace <-> kernelspace linker
272#
273# CONFIG_CONNECTOR is not set
274
275#
276# Memory Technology Devices (MTD)
277#
278# CONFIG_MTD is not set
279
280#
281# Parallel port support
282#
283# CONFIG_PARPORT is not set
284
285#
286# Plug and Play support
287#
288
289#
290# Block devices
291#
292# CONFIG_BLK_DEV_FD is not set
293# CONFIG_BLK_DEV_COW_COMMON is not set
294CONFIG_BLK_DEV_LOOP=y
295# CONFIG_BLK_DEV_CRYPTOLOOP is not set
296# CONFIG_BLK_DEV_NBD is not set
297# CONFIG_BLK_DEV_RAM is not set
298# CONFIG_BLK_DEV_INITRD is not set
299# CONFIG_CDROM_PKTCDVD is not set
300# CONFIG_ATA_OVER_ETH is not set
301
302#
303# ATA/ATAPI/MFM/RLL support
304#
305CONFIG_IDE=y
306CONFIG_BLK_DEV_IDE=y
307
308#
309# Please see Documentation/ide.txt for help/info on IDE drives
310#
311# CONFIG_BLK_DEV_IDE_SATA is not set
312CONFIG_BLK_DEV_IDEDISK=y
313# CONFIG_IDEDISK_MULTI_MODE is not set
314# CONFIG_BLK_DEV_IDECD is not set
315# CONFIG_BLK_DEV_IDEFLOPPY is not set
316# CONFIG_IDE_TASK_IOCTL is not set
317
318#
319# IDE chipset support/bugfixes
320#
321# CONFIG_IDE_GENERIC is not set
322# CONFIG_IDE_ARM is not set
323# CONFIG_BLK_DEV_IDEDMA is not set
324# CONFIG_IDEDMA_AUTO is not set
325# CONFIG_BLK_DEV_HD is not set
326
327#
328# SCSI device support
329#
330# CONFIG_RAID_ATTRS is not set
331# CONFIG_SCSI is not set
332
333#
334# Multi-device support (RAID and LVM)
335#
336# CONFIG_MD is not set
337
338#
339# Fusion MPT device support
340#
341# CONFIG_FUSION is not set
342
343#
344# IEEE 1394 (FireWire) support
345#
346
347#
348# I2O device support
349#
350
351#
352# Macintosh device drivers
353#
354# CONFIG_WINDFARM is not set
355
356#
357# Network device support
358#
359CONFIG_NETDEVICES=y
360# CONFIG_DUMMY is not set
361# CONFIG_BONDING is not set
362# CONFIG_EQUALIZER is not set
363CONFIG_TUN=y
364
365#
366# PHY device support
367#
368CONFIG_PHYLIB=y
369
370#
371# MII PHY device drivers
372#
373# CONFIG_MARVELL_PHY is not set
374CONFIG_DAVICOM_PHY=y
375# CONFIG_QSEMI_PHY is not set
376# CONFIG_LXT_PHY is not set
377# CONFIG_CICADA_PHY is not set
378# CONFIG_FIXED_PHY is not set
379
380#
381# Ethernet (10 or 100Mbit)
382#
383CONFIG_NET_ETHERNET=y
384CONFIG_MII=y
385CONFIG_FS_ENET=y
386# CONFIG_FS_ENET_HAS_SCC is not set
387CONFIG_FS_ENET_HAS_FCC=y
388
389#
390# Ethernet (1000 Mbit)
391#
392
393#
394# Ethernet (10000 Mbit)
395#
396
397#
398# Token Ring devices
399#
400
401#
402# Wireless LAN (non-hamradio)
403#
404# CONFIG_NET_RADIO is not set
405
406#
407# Wan interfaces
408#
409# CONFIG_WAN is not set
410CONFIG_PPP=y
411# CONFIG_PPP_FILTER is not set
412CONFIG_PPP_ASYNC=y
413CONFIG_PPP_SYNC_TTY=y
414CONFIG_PPP_DEFLATE=y
415# CONFIG_PPP_BSDCOMP is not set
416# CONFIG_SLIP is not set
417# CONFIG_NETPOLL is not set
418# CONFIG_NET_POLL_CONTROLLER is not set
419
420#
421# ISDN subsystem
422#
423# CONFIG_ISDN is not set
424
425#
426# Telephony Support
427#
428# CONFIG_PHONE is not set
429
430#
431# Input device support
432#
433CONFIG_INPUT=y
434
435#
436# Userland interfaces
437#
438CONFIG_INPUT_MOUSEDEV=y
439CONFIG_INPUT_MOUSEDEV_PSAUX=y
440CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
441CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
442# CONFIG_INPUT_JOYDEV is not set
443# CONFIG_INPUT_TSDEV is not set
444CONFIG_INPUT_EVDEV=y
445# CONFIG_INPUT_EVBUG is not set
446
447#
448# Input Device Drivers
449#
450CONFIG_INPUT_KEYBOARD=y
451CONFIG_KEYBOARD_ATKBD=y
452# CONFIG_KEYBOARD_SUNKBD is not set
453# CONFIG_KEYBOARD_LKKBD is not set
454# CONFIG_KEYBOARD_XTKBD is not set
455# CONFIG_KEYBOARD_NEWTON is not set
456CONFIG_INPUT_MOUSE=y
457CONFIG_MOUSE_PS2=y
458# CONFIG_MOUSE_SERIAL is not set
459# CONFIG_MOUSE_VSXXXAA is not set
460# CONFIG_INPUT_JOYSTICK is not set
461# CONFIG_INPUT_TOUCHSCREEN is not set
462# CONFIG_INPUT_MISC is not set
463
464#
465# Hardware I/O ports
466#
467CONFIG_SERIO=y
468# CONFIG_SERIO_I8042 is not set
469CONFIG_SERIO_SERPORT=y
470CONFIG_SERIO_LIBPS2=y
471# CONFIG_SERIO_RAW is not set
472# CONFIG_GAMEPORT is not set
473
474#
475# Character devices
476#
477# CONFIG_VT is not set
478# CONFIG_SERIAL_NONSTANDARD is not set
479
480#
481# Serial drivers
482#
483# CONFIG_SERIAL_8250 is not set
484
485#
486# Non-8250 serial port support
487#
488CONFIG_SERIAL_CORE=y
489CONFIG_SERIAL_CORE_CONSOLE=y
490CONFIG_SERIAL_CPM=y
491CONFIG_SERIAL_CPM_CONSOLE=y
492CONFIG_SERIAL_CPM_SCC1=y
493# CONFIG_SERIAL_CPM_SCC2 is not set
494# CONFIG_SERIAL_CPM_SCC3 is not set
495CONFIG_SERIAL_CPM_SCC4=y
496# CONFIG_SERIAL_CPM_SMC1 is not set
497# CONFIG_SERIAL_CPM_SMC2 is not set
498CONFIG_UNIX98_PTYS=y
499CONFIG_LEGACY_PTYS=y
500CONFIG_LEGACY_PTY_COUNT=256
501
502#
503# IPMI
504#
505# CONFIG_IPMI_HANDLER is not set
506
507#
508# Watchdog Cards
509#
510# CONFIG_WATCHDOG is not set
511# CONFIG_NVRAM is not set
512# CONFIG_GEN_RTC is not set
513# CONFIG_DTLK is not set
514# CONFIG_R3964 is not set
515
516#
517# Ftape, the floppy tape device driver
518#
519# CONFIG_AGP is not set
520# CONFIG_RAW_DRIVER is not set
521
522#
523# TPM devices
524#
525
526#
527# I2C support
528#
529# CONFIG_I2C is not set
530
531#
532# SPI support
533#
534# CONFIG_SPI is not set
535# CONFIG_SPI_MASTER is not set
536
537#
538# Dallas's 1-wire bus
539#
540# CONFIG_W1 is not set
541
542#
543# Hardware Monitoring support
544#
545# CONFIG_HWMON is not set
546# CONFIG_HWMON_VID is not set
547
548#
549# Misc devices
550#
551
552#
553# Multimedia devices
554#
555# CONFIG_VIDEO_DEV is not set
556CONFIG_VIDEO_V4L2=y
557
558#
559# Digital Video Broadcasting Devices
560#
561# CONFIG_DVB is not set
562
563#
564# Graphics support
565#
566# CONFIG_FB is not set
567
568#
569# Sound
570#
571# CONFIG_SOUND is not set
572
573#
574# USB support
575#
576# CONFIG_USB_ARCH_HAS_HCD is not set
577# CONFIG_USB_ARCH_HAS_OHCI is not set
578# CONFIG_USB_ARCH_HAS_EHCI is not set
579
580#
581# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
582#
583
584#
585# USB Gadget Support
586#
587CONFIG_USB_GADGET=y
588# CONFIG_USB_GADGET_DEBUG_FILES is not set
589# CONFIG_USB_GADGET_NET2280 is not set
590# CONFIG_USB_GADGET_PXA2XX is not set
591# CONFIG_USB_GADGET_GOKU is not set
592# CONFIG_USB_GADGET_LH7A40X is not set
593# CONFIG_USB_GADGET_OMAP is not set
594# CONFIG_USB_GADGET_AT91 is not set
595# CONFIG_USB_GADGET_DUMMY_HCD is not set
596# CONFIG_USB_GADGET_DUALSPEED is not set
597
598#
599# MMC/SD Card support
600#
601# CONFIG_MMC is not set
602
603#
604# LED devices
605#
606# CONFIG_NEW_LEDS is not set
607
608#
609# LED drivers
610#
611
612#
613# LED Triggers
614#
615
616#
617# InfiniBand support
618#
619
620#
621# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
622#
623
624#
625# Real Time Clock
626#
627
628#
629# File systems
630#
631CONFIG_EXT2_FS=y
632# CONFIG_EXT2_FS_XATTR is not set
633# CONFIG_EXT2_FS_XIP is not set
634CONFIG_EXT3_FS=y
635CONFIG_EXT3_FS_XATTR=y
636# CONFIG_EXT3_FS_POSIX_ACL is not set
637# CONFIG_EXT3_FS_SECURITY is not set
638CONFIG_JBD=y
639# CONFIG_JBD_DEBUG is not set
640CONFIG_FS_MBCACHE=y
641# CONFIG_REISERFS_FS is not set
642# CONFIG_JFS_FS is not set
643CONFIG_FS_POSIX_ACL=y
644CONFIG_XFS_FS=y
645# CONFIG_XFS_QUOTA is not set
646# CONFIG_XFS_SECURITY is not set
647# CONFIG_XFS_POSIX_ACL is not set
648# CONFIG_MINIX_FS is not set
649# CONFIG_ROMFS_FS is not set
650CONFIG_INOTIFY=y
651# CONFIG_QUOTA is not set
652CONFIG_DNOTIFY=y
653# CONFIG_AUTOFS_FS is not set
654CONFIG_AUTOFS4_FS=y
655# CONFIG_FUSE_FS is not set
656
657#
658# CD-ROM/DVD Filesystems
659#
660# CONFIG_ISO9660_FS is not set
661# CONFIG_UDF_FS is not set
662
663#
664# DOS/FAT/NT Filesystems
665#
666# CONFIG_MSDOS_FS is not set
667# CONFIG_VFAT_FS is not set
668# CONFIG_NTFS_FS is not set
669
670#
671# Pseudo filesystems
672#
673CONFIG_PROC_FS=y
674CONFIG_PROC_KCORE=y
675CONFIG_SYSFS=y
676CONFIG_TMPFS=y
677# CONFIG_HUGETLB_PAGE is not set
678CONFIG_RAMFS=y
679
680#
681# Miscellaneous filesystems
682#
683# CONFIG_HFSPLUS_FS is not set
684CONFIG_CRAMFS=y
685# CONFIG_VXFS_FS is not set
686# CONFIG_HPFS_FS is not set
687# CONFIG_QNX4FS_FS is not set
688# CONFIG_SYSV_FS is not set
689# CONFIG_UFS_FS is not set
690
691#
692# Network File Systems
693#
694CONFIG_NFS_FS=y
695CONFIG_NFS_V3=y
696CONFIG_NFS_V3_ACL=y
697# CONFIG_NFSD is not set
698CONFIG_ROOT_NFS=y
699CONFIG_LOCKD=y
700CONFIG_LOCKD_V4=y
701CONFIG_NFS_ACL_SUPPORT=y
702CONFIG_NFS_COMMON=y
703CONFIG_SUNRPC=y
704CONFIG_SMB_FS=y
705# CONFIG_SMB_NLS_DEFAULT is not set
706# CONFIG_CIFS is not set
707# CONFIG_NCP_FS is not set
708# CONFIG_CODA_FS is not set
709
710#
711# Partition Types
712#
713CONFIG_PARTITION_ADVANCED=y
714# CONFIG_ACORN_PARTITION is not set
715# CONFIG_OSF_PARTITION is not set
716# CONFIG_AMIGA_PARTITION is not set
717# CONFIG_ATARI_PARTITION is not set
718# CONFIG_MAC_PARTITION is not set
719CONFIG_MSDOS_PARTITION=y
720# CONFIG_BSD_DISKLABEL is not set
721# CONFIG_MINIX_SUBPARTITION is not set
722# CONFIG_SOLARIS_X86_PARTITION is not set
723# CONFIG_UNIXWARE_DISKLABEL is not set
724# CONFIG_LDM_PARTITION is not set
725# CONFIG_SGI_PARTITION is not set
726# CONFIG_ULTRIX_PARTITION is not set
727# CONFIG_SUN_PARTITION is not set
728# CONFIG_KARMA_PARTITION is not set
729# CONFIG_EFI_PARTITION is not set
730
731#
732# Native Language Support
733#
734CONFIG_NLS=y
735CONFIG_NLS_DEFAULT="iso8859-1"
736CONFIG_NLS_CODEPAGE_437=y
737# CONFIG_NLS_CODEPAGE_737 is not set
738# CONFIG_NLS_CODEPAGE_775 is not set
739# CONFIG_NLS_CODEPAGE_850 is not set
740# CONFIG_NLS_CODEPAGE_852 is not set
741# CONFIG_NLS_CODEPAGE_855 is not set
742# CONFIG_NLS_CODEPAGE_857 is not set
743# CONFIG_NLS_CODEPAGE_860 is not set
744# CONFIG_NLS_CODEPAGE_861 is not set
745# CONFIG_NLS_CODEPAGE_862 is not set
746# CONFIG_NLS_CODEPAGE_863 is not set
747# CONFIG_NLS_CODEPAGE_864 is not set
748# CONFIG_NLS_CODEPAGE_865 is not set
749# CONFIG_NLS_CODEPAGE_866 is not set
750# CONFIG_NLS_CODEPAGE_869 is not set
751# CONFIG_NLS_CODEPAGE_936 is not set
752# CONFIG_NLS_CODEPAGE_950 is not set
753# CONFIG_NLS_CODEPAGE_932 is not set
754# CONFIG_NLS_CODEPAGE_949 is not set
755# CONFIG_NLS_CODEPAGE_874 is not set
756# CONFIG_NLS_ISO8859_8 is not set
757# CONFIG_NLS_CODEPAGE_1250 is not set
758# CONFIG_NLS_CODEPAGE_1251 is not set
759CONFIG_NLS_ASCII=y
760CONFIG_NLS_ISO8859_1=y
761# CONFIG_NLS_ISO8859_2 is not set
762# CONFIG_NLS_ISO8859_3 is not set
763# CONFIG_NLS_ISO8859_4 is not set
764# CONFIG_NLS_ISO8859_5 is not set
765# CONFIG_NLS_ISO8859_6 is not set
766# CONFIG_NLS_ISO8859_7 is not set
767# CONFIG_NLS_ISO8859_9 is not set
768# CONFIG_NLS_ISO8859_13 is not set
769# CONFIG_NLS_ISO8859_14 is not set
770# CONFIG_NLS_ISO8859_15 is not set
771# CONFIG_NLS_KOI8_R is not set
772# CONFIG_NLS_KOI8_U is not set
773CONFIG_NLS_UTF8=y
774
775#
776# Library routines
777#
778CONFIG_CRC_CCITT=y
779# CONFIG_CRC16 is not set
780CONFIG_CRC32=y
781# CONFIG_LIBCRC32C is not set
782CONFIG_ZLIB_INFLATE=y
783CONFIG_ZLIB_DEFLATE=y
784
785#
786# Kernel hacking
787#
788# CONFIG_PRINTK_TIME is not set
789# CONFIG_MAGIC_SYSRQ is not set
790CONFIG_DEBUG_KERNEL=y
791CONFIG_LOG_BUF_SHIFT=14
792CONFIG_DETECT_SOFTLOCKUP=y
793# CONFIG_SCHEDSTATS is not set
794# CONFIG_DEBUG_SLAB is not set
795# CONFIG_DEBUG_MUTEXES is not set
796# CONFIG_DEBUG_SPINLOCK is not set
797# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
798# CONFIG_DEBUG_KOBJECT is not set
799CONFIG_DEBUG_INFO=y
800# CONFIG_DEBUG_FS is not set
801# CONFIG_DEBUG_VM is not set
802# CONFIG_UNWIND_INFO is not set
803CONFIG_FORCED_INLINING=y
804# CONFIG_RCU_TORTURE_TEST is not set
805# CONFIG_DEBUGGER is not set
806# CONFIG_KGDB_CONSOLE is not set
807CONFIG_BDI_SWITCH=y
808# CONFIG_BOOTX_TEXT is not set
809# CONFIG_PPC_EARLY_DEBUG is not set
810
811#
812# Security options
813#
814# CONFIG_KEYS is not set
815# CONFIG_SECURITY is not set
816
817#
818# Cryptographic options
819#
820CONFIG_CRYPTO=y
821# CONFIG_CRYPTO_HMAC is not set
822# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_MD4 is not set
824CONFIG_CRYPTO_MD5=y
825# CONFIG_CRYPTO_SHA1 is not set
826# CONFIG_CRYPTO_SHA256 is not set
827# CONFIG_CRYPTO_SHA512 is not set
828# CONFIG_CRYPTO_WP512 is not set
829# CONFIG_CRYPTO_TGR192 is not set
830CONFIG_CRYPTO_DES=y
831# CONFIG_CRYPTO_BLOWFISH is not set
832# CONFIG_CRYPTO_TWOFISH is not set
833# CONFIG_CRYPTO_SERPENT is not set
834# CONFIG_CRYPTO_AES is not set
835# CONFIG_CRYPTO_CAST5 is not set
836# CONFIG_CRYPTO_CAST6 is not set
837# CONFIG_CRYPTO_TEA is not set
838# CONFIG_CRYPTO_ARC4 is not set
839# CONFIG_CRYPTO_KHAZAD is not set
840# CONFIG_CRYPTO_ANUBIS is not set
841# CONFIG_CRYPTO_DEFLATE is not set
842# CONFIG_CRYPTO_MICHAEL_MIC is not set
843# CONFIG_CRYPTO_CRC32C is not set
844# CONFIG_CRYPTO_TEST is not set
845
846#
847# Hardware crypto devices
848#
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
new file mode 100644
index 000000000000..f87523716c44
--- /dev/null
+++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
@@ -0,0 +1,1409 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Wed Feb 7 22:08:04 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set
74CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y
77CONFIG_EMBEDDED=y
78CONFIG_SYSCTL_SYSCALL=y
79# CONFIG_KALLSYMS is not set
80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y
82CONFIG_BUG=y
83CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y
86# CONFIG_EPOLL is not set
87CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94
95#
96# Loadable module support
97#
98CONFIG_MODULES=y
99CONFIG_MODULE_UNLOAD=y
100# CONFIG_MODULE_FORCE_UNLOAD is not set
101# CONFIG_MODVERSIONS is not set
102# CONFIG_MODULE_SRCVERSION_ALL is not set
103# CONFIG_KMOD is not set
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_LBD is not set
110# CONFIG_BLK_DEV_IO_TRACE is not set
111# CONFIG_LSF is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131CONFIG_MPC8313_RDB=y
132# CONFIG_MPC832x_MDS is not set
133# CONFIG_MPC834x_SYS is not set
134# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set
136CONFIG_PPC_MPC831x=y
137# CONFIG_MPIC is not set
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_BINFMT_ELF=y
152# CONFIG_BINFMT_MISC is not set
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set
159# CONFIG_SPARSEMEM_MANUAL is not set
160CONFIG_FLATMEM=y
161CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set
165CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set
168CONFIG_SECCOMP=y
169CONFIG_ISA_DMA_API=y
170
171#
172# Bus options
173#
174CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y
178CONFIG_FSL_SOC=y
179CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set
182# CONFIG_PCI_DEBUG is not set
183
184#
185# PCCARD (PCMCIA/CardBus) support
186#
187# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192# CONFIG_HOTPLUG_PCI is not set
193
194#
195# Advanced setup
196#
197# CONFIG_ADVANCED_OPTIONS is not set
198
199#
200# Default settings for advanced configuration options are used
201#
202CONFIG_HIGHMEM_START=0xfe000000
203CONFIG_LOWMEM_SIZE=0x30000000
204CONFIG_KERNEL_START=0xc0000000
205CONFIG_TASK_SIZE=0x80000000
206CONFIG_BOOT_LOAD=0x00800000
207
208#
209# Networking
210#
211CONFIG_NET=y
212
213#
214# Networking options
215#
216# CONFIG_NETDEBUG is not set
217CONFIG_PACKET=y
218# CONFIG_PACKET_MMAP is not set
219CONFIG_UNIX=y
220CONFIG_XFRM=y
221# CONFIG_XFRM_USER is not set
222# CONFIG_XFRM_SUB_POLICY is not set
223# CONFIG_NET_KEY is not set
224CONFIG_INET=y
225CONFIG_IP_MULTICAST=y
226# CONFIG_IP_ADVANCED_ROUTER is not set
227CONFIG_IP_FIB_HASH=y
228CONFIG_IP_PNP=y
229CONFIG_IP_PNP_DHCP=y
230CONFIG_IP_PNP_BOOTP=y
231# CONFIG_IP_PNP_RARP is not set
232# CONFIG_NET_IPIP is not set
233# CONFIG_NET_IPGRE is not set
234# CONFIG_IP_MROUTE is not set
235# CONFIG_ARPD is not set
236CONFIG_SYN_COOKIES=y
237# CONFIG_INET_AH is not set
238# CONFIG_INET_ESP is not set
239# CONFIG_INET_IPCOMP is not set
240# CONFIG_INET_XFRM_TUNNEL is not set
241# CONFIG_INET_TUNNEL is not set
242CONFIG_INET_XFRM_MODE_TRANSPORT=y
243CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_XFRM_MODE_BEET=y
245CONFIG_INET_DIAG=y
246CONFIG_INET_TCP_DIAG=y
247# CONFIG_TCP_CONG_ADVANCED is not set
248CONFIG_TCP_CONG_CUBIC=y
249CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set
252# CONFIG_INET6_XFRM_TUNNEL is not set
253# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set
271# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set
273# CONFIG_VLAN_8021Q is not set
274# CONFIG_DECNET is not set
275# CONFIG_LLC2 is not set
276# CONFIG_IPX is not set
277# CONFIG_ATALK is not set
278# CONFIG_X25 is not set
279# CONFIG_LAPB is not set
280# CONFIG_ECONET is not set
281# CONFIG_WAN_ROUTER is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287
288#
289# Network testing
290#
291# CONFIG_NET_PKTGEN is not set
292# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set
294# CONFIG_BT is not set
295# CONFIG_IEEE80211 is not set
296
297#
298# Device Drivers
299#
300
301#
302# Generic Driver Options
303#
304CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_SYS_HYPERVISOR is not set
309
310#
311# Connector - unified userspace <-> kernelspace linker
312#
313# CONFIG_CONNECTOR is not set
314
315#
316# Memory Technology Devices (MTD)
317#
318CONFIG_MTD=y
319# CONFIG_MTD_DEBUG is not set
320# CONFIG_MTD_CONCAT is not set
321# CONFIG_MTD_PARTITIONS is not set
322
323#
324# User Modules And Translation Layers
325#
326CONFIG_MTD_CHAR=y
327# CONFIG_MTD_BLKDEVS is not set
328# CONFIG_MTD_BLOCK is not set
329# CONFIG_MTD_BLOCK_RO is not set
330# CONFIG_FTL is not set
331# CONFIG_NFTL is not set
332# CONFIG_INFTL is not set
333# CONFIG_RFD_FTL is not set
334# CONFIG_SSFDC is not set
335
336#
337# RAM/ROM/Flash chip drivers
338#
339CONFIG_MTD_CFI=y
340# CONFIG_MTD_JEDECPROBE is not set
341CONFIG_MTD_GEN_PROBE=y
342# CONFIG_MTD_CFI_ADV_OPTIONS is not set
343CONFIG_MTD_MAP_BANK_WIDTH_1=y
344CONFIG_MTD_MAP_BANK_WIDTH_2=y
345CONFIG_MTD_MAP_BANK_WIDTH_4=y
346# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
347# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
348# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
349CONFIG_MTD_CFI_I1=y
350CONFIG_MTD_CFI_I2=y
351# CONFIG_MTD_CFI_I4 is not set
352# CONFIG_MTD_CFI_I8 is not set
353# CONFIG_MTD_CFI_INTELEXT is not set
354CONFIG_MTD_CFI_AMDSTD=y
355# CONFIG_MTD_CFI_STAA is not set
356CONFIG_MTD_CFI_UTIL=y
357# CONFIG_MTD_RAM is not set
358# CONFIG_MTD_ROM is not set
359# CONFIG_MTD_ABSENT is not set
360# CONFIG_MTD_OBSOLETE_CHIPS is not set
361
362#
363# Mapping drivers for chip access
364#
365# CONFIG_MTD_COMPLEX_MAPPINGS is not set
366CONFIG_MTD_PHYSMAP=y
367CONFIG_MTD_PHYSMAP_START=0xfe000000
368CONFIG_MTD_PHYSMAP_LEN=0x1000000
369CONFIG_MTD_PHYSMAP_BANKWIDTH=2
370# CONFIG_MTD_PHYSMAP_OF is not set
371# CONFIG_MTD_PLATRAM is not set
372
373#
374# Self-contained MTD device drivers
375#
376# CONFIG_MTD_PMC551 is not set
377# CONFIG_MTD_DATAFLASH is not set
378# CONFIG_MTD_M25P80 is not set
379# CONFIG_MTD_SLRAM is not set
380# CONFIG_MTD_PHRAM is not set
381# CONFIG_MTD_MTDRAM is not set
382# CONFIG_MTD_BLOCK2MTD is not set
383
384#
385# Disk-On-Chip Device Drivers
386#
387# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set
396
397#
398# OneNAND Flash Device Drivers
399#
400# CONFIG_MTD_ONENAND is not set
401
402#
403# Parallel port support
404#
405# CONFIG_PARPORT is not set
406
407#
408# Plug and Play support
409#
410
411#
412# Block devices
413#
414# CONFIG_BLK_DEV_FD is not set
415# CONFIG_BLK_CPQ_DA is not set
416# CONFIG_BLK_CPQ_CISS_DA is not set
417# CONFIG_BLK_DEV_DAC960 is not set
418# CONFIG_BLK_DEV_UMEM is not set
419# CONFIG_BLK_DEV_COW_COMMON is not set
420CONFIG_BLK_DEV_LOOP=y
421# CONFIG_BLK_DEV_CRYPTOLOOP is not set
422# CONFIG_BLK_DEV_NBD is not set
423# CONFIG_BLK_DEV_SX8 is not set
424# CONFIG_BLK_DEV_UB is not set
425CONFIG_BLK_DEV_RAM=y
426CONFIG_BLK_DEV_RAM_COUNT=16
427CONFIG_BLK_DEV_RAM_SIZE=32768
428CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
429CONFIG_BLK_DEV_INITRD=y
430# CONFIG_CDROM_PKTCDVD is not set
431# CONFIG_ATA_OVER_ETH is not set
432
433#
434# Misc devices
435#
436# CONFIG_SGI_IOC4 is not set
437# CONFIG_TIFM_CORE is not set
438
439#
440# ATA/ATAPI/MFM/RLL support
441#
442# CONFIG_IDE is not set
443
444#
445# SCSI device support
446#
447# CONFIG_RAID_ATTRS is not set
448CONFIG_SCSI=y
449# CONFIG_SCSI_TGT is not set
450# CONFIG_SCSI_NETLINK is not set
451CONFIG_SCSI_PROC_FS=y
452
453#
454# SCSI support type (disk, tape, CD-ROM)
455#
456# CONFIG_BLK_DEV_SD is not set
457# CONFIG_CHR_DEV_ST is not set
458# CONFIG_CHR_DEV_OSST is not set
459# CONFIG_BLK_DEV_SR is not set
460CONFIG_CHR_DEV_SG=y
461# CONFIG_CHR_DEV_SCH is not set
462
463#
464# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
465#
466# CONFIG_SCSI_MULTI_LUN is not set
467# CONFIG_SCSI_CONSTANTS is not set
468# CONFIG_SCSI_LOGGING is not set
469# CONFIG_SCSI_SCAN_ASYNC is not set
470
471#
472# SCSI Transports
473#
474CONFIG_SCSI_SPI_ATTRS=y
475# CONFIG_SCSI_FC_ATTRS is not set
476# CONFIG_SCSI_ISCSI_ATTRS is not set
477# CONFIG_SCSI_SAS_ATTRS is not set
478# CONFIG_SCSI_SAS_LIBSAS is not set
479
480#
481# SCSI low-level drivers
482#
483# CONFIG_ISCSI_TCP is not set
484# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
485# CONFIG_SCSI_3W_9XXX is not set
486# CONFIG_SCSI_ACARD is not set
487# CONFIG_SCSI_AACRAID is not set
488# CONFIG_SCSI_AIC7XXX is not set
489# CONFIG_SCSI_AIC7XXX_OLD is not set
490# CONFIG_SCSI_AIC79XX is not set
491# CONFIG_SCSI_AIC94XX is not set
492# CONFIG_SCSI_DPT_I2O is not set
493# CONFIG_SCSI_ARCMSR is not set
494# CONFIG_MEGARAID_NEWGEN is not set
495# CONFIG_MEGARAID_LEGACY is not set
496# CONFIG_MEGARAID_SAS is not set
497# CONFIG_SCSI_HPTIOP is not set
498# CONFIG_SCSI_BUSLOGIC is not set
499# CONFIG_SCSI_DMX3191D is not set
500# CONFIG_SCSI_EATA is not set
501# CONFIG_SCSI_FUTURE_DOMAIN is not set
502# CONFIG_SCSI_GDTH is not set
503# CONFIG_SCSI_IPS is not set
504# CONFIG_SCSI_INITIO is not set
505# CONFIG_SCSI_INIA100 is not set
506# CONFIG_SCSI_STEX is not set
507# CONFIG_SCSI_SYM53C8XX_2 is not set
508# CONFIG_SCSI_QLOGIC_1280 is not set
509# CONFIG_SCSI_QLA_FC is not set
510# CONFIG_SCSI_QLA_ISCSI is not set
511# CONFIG_SCSI_LPFC is not set
512# CONFIG_SCSI_DC395x is not set
513# CONFIG_SCSI_DC390T is not set
514# CONFIG_SCSI_NSP32 is not set
515# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set
517
518#
519# Serial ATA (prod) and Parallel ATA (experimental) drivers
520#
521# CONFIG_ATA is not set
522
523#
524# Multi-device support (RAID and LVM)
525#
526CONFIG_MD=y
527CONFIG_BLK_DEV_MD=y
528CONFIG_MD_LINEAR=y
529CONFIG_MD_RAID0=y
530CONFIG_MD_RAID1=y
531# CONFIG_MD_RAID10 is not set
532# CONFIG_MD_RAID456 is not set
533# CONFIG_MD_MULTIPATH is not set
534# CONFIG_MD_FAULTY is not set
535# CONFIG_BLK_DEV_DM is not set
536
537#
538# Fusion MPT device support
539#
540# CONFIG_FUSION is not set
541# CONFIG_FUSION_SPI is not set
542# CONFIG_FUSION_FC is not set
543# CONFIG_FUSION_SAS is not set
544
545#
546# IEEE 1394 (FireWire) support
547#
548# CONFIG_IEEE1394 is not set
549
550#
551# I2O device support
552#
553# CONFIG_I2O is not set
554
555#
556# Macintosh device drivers
557#
558# CONFIG_MAC_EMUMOUSEBTN is not set
559# CONFIG_WINDFARM is not set
560
561#
562# Network device support
563#
564CONFIG_NETDEVICES=y
565# CONFIG_DUMMY is not set
566# CONFIG_BONDING is not set
567# CONFIG_EQUALIZER is not set
568# CONFIG_TUN is not set
569
570#
571# ARCnet devices
572#
573# CONFIG_ARCNET is not set
574
575#
576# PHY device support
577#
578CONFIG_PHYLIB=y
579
580#
581# MII PHY device drivers
582#
583# CONFIG_MARVELL_PHY is not set
584# CONFIG_DAVICOM_PHY is not set
585# CONFIG_QSEMI_PHY is not set
586# CONFIG_LXT_PHY is not set
587CONFIG_CICADA_PHY=y
588# CONFIG_VITESSE_PHY is not set
589# CONFIG_SMSC_PHY is not set
590# CONFIG_BROADCOM_PHY is not set
591# CONFIG_FIXED_PHY is not set
592
593#
594# Ethernet (10 or 100Mbit)
595#
596CONFIG_NET_ETHERNET=y
597CONFIG_MII=y
598# CONFIG_HAPPYMEAL is not set
599# CONFIG_SUNGEM is not set
600# CONFIG_CASSINI is not set
601# CONFIG_NET_VENDOR_3COM is not set
602
603#
604# Tulip family network device support
605#
606# CONFIG_NET_TULIP is not set
607# CONFIG_HP100 is not set
608CONFIG_NET_PCI=y
609# CONFIG_PCNET32 is not set
610# CONFIG_AMD8111_ETH is not set
611# CONFIG_ADAPTEC_STARFIRE is not set
612# CONFIG_B44 is not set
613# CONFIG_FORCEDETH is not set
614# CONFIG_DGRS is not set
615# CONFIG_EEPRO100 is not set
616CONFIG_E100=y
617# CONFIG_FEALNX is not set
618# CONFIG_NATSEMI is not set
619# CONFIG_NE2K_PCI is not set
620# CONFIG_8139CP is not set
621# CONFIG_8139TOO is not set
622# CONFIG_SIS900 is not set
623# CONFIG_EPIC100 is not set
624# CONFIG_SUNDANCE is not set
625# CONFIG_TLAN is not set
626# CONFIG_VIA_RHINE is not set
627
628#
629# Ethernet (1000 Mbit)
630#
631# CONFIG_ACENIC is not set
632# CONFIG_DL2K is not set
633# CONFIG_E1000 is not set
634# CONFIG_NS83820 is not set
635# CONFIG_HAMACHI is not set
636# CONFIG_YELLOWFIN is not set
637# CONFIG_R8169 is not set
638# CONFIG_SIS190 is not set
639# CONFIG_SKGE is not set
640# CONFIG_SKY2 is not set
641# CONFIG_SK98LIN is not set
642# CONFIG_VIA_VELOCITY is not set
643# CONFIG_TIGON3 is not set
644# CONFIG_BNX2 is not set
645CONFIG_GIANFAR=y
646CONFIG_GFAR_NAPI=y
647# CONFIG_QLA3XXX is not set
648
649#
650# Ethernet (10000 Mbit)
651#
652# CONFIG_CHELSIO_T1 is not set
653# CONFIG_IXGB is not set
654# CONFIG_S2IO is not set
655# CONFIG_MYRI10GE is not set
656# CONFIG_NETXEN_NIC is not set
657
658#
659# Token Ring devices
660#
661# CONFIG_TR is not set
662
663#
664# Wireless LAN (non-hamradio)
665#
666# CONFIG_NET_RADIO is not set
667
668#
669# Wan interfaces
670#
671# CONFIG_WAN is not set
672# CONFIG_FDDI is not set
673# CONFIG_HIPPI is not set
674# CONFIG_PPP is not set
675# CONFIG_SLIP is not set
676# CONFIG_NET_FC is not set
677# CONFIG_SHAPER is not set
678# CONFIG_NETCONSOLE is not set
679# CONFIG_NETPOLL is not set
680# CONFIG_NET_POLL_CONTROLLER is not set
681
682#
683# ISDN subsystem
684#
685# CONFIG_ISDN is not set
686
687#
688# Telephony Support
689#
690# CONFIG_PHONE is not set
691
692#
693# Input device support
694#
695CONFIG_INPUT=y
696# CONFIG_INPUT_FF_MEMLESS is not set
697
698#
699# Userland interfaces
700#
701# CONFIG_INPUT_MOUSEDEV is not set
702# CONFIG_INPUT_JOYDEV is not set
703# CONFIG_INPUT_TSDEV is not set
704# CONFIG_INPUT_EVDEV is not set
705# CONFIG_INPUT_EVBUG is not set
706
707#
708# Input Device Drivers
709#
710# CONFIG_INPUT_KEYBOARD is not set
711# CONFIG_INPUT_MOUSE is not set
712# CONFIG_INPUT_JOYSTICK is not set
713# CONFIG_INPUT_TOUCHSCREEN is not set
714# CONFIG_INPUT_MISC is not set
715
716#
717# Hardware I/O ports
718#
719# CONFIG_SERIO is not set
720# CONFIG_GAMEPORT is not set
721
722#
723# Character devices
724#
725# CONFIG_VT is not set
726# CONFIG_SERIAL_NONSTANDARD is not set
727
728#
729# Serial drivers
730#
731CONFIG_SERIAL_8250=y
732CONFIG_SERIAL_8250_CONSOLE=y
733CONFIG_SERIAL_8250_PCI=y
734CONFIG_SERIAL_8250_NR_UARTS=4
735CONFIG_SERIAL_8250_RUNTIME_UARTS=4
736# CONFIG_SERIAL_8250_EXTENDED is not set
737
738#
739# Non-8250 serial port support
740#
741# CONFIG_SERIAL_UARTLITE is not set
742CONFIG_SERIAL_CORE=y
743CONFIG_SERIAL_CORE_CONSOLE=y
744# CONFIG_SERIAL_JSM is not set
745CONFIG_UNIX98_PTYS=y
746CONFIG_LEGACY_PTYS=y
747CONFIG_LEGACY_PTY_COUNT=256
748
749#
750# IPMI
751#
752# CONFIG_IPMI_HANDLER is not set
753
754#
755# Watchdog Cards
756#
757CONFIG_WATCHDOG=y
758# CONFIG_WATCHDOG_NOWAYOUT is not set
759
760#
761# Watchdog Device Drivers
762#
763# CONFIG_SOFT_WATCHDOG is not set
764CONFIG_83xx_WDT=y
765
766#
767# PCI-based Watchdog Cards
768#
769# CONFIG_PCIPCWATCHDOG is not set
770# CONFIG_WDTPCI is not set
771
772#
773# USB-based Watchdog Cards
774#
775# CONFIG_USBPCWATCHDOG is not set
776CONFIG_HW_RANDOM=y
777# CONFIG_NVRAM is not set
778# CONFIG_GEN_RTC is not set
779# CONFIG_DTLK is not set
780# CONFIG_R3964 is not set
781# CONFIG_APPLICOM is not set
782# CONFIG_AGP is not set
783# CONFIG_DRM is not set
784# CONFIG_RAW_DRIVER is not set
785
786#
787# TPM devices
788#
789# CONFIG_TCG_TPM is not set
790
791#
792# I2C support
793#
794CONFIG_I2C=y
795CONFIG_I2C_CHARDEV=y
796
797#
798# I2C Algorithms
799#
800# CONFIG_I2C_ALGOBIT is not set
801# CONFIG_I2C_ALGOPCF is not set
802# CONFIG_I2C_ALGOPCA is not set
803
804#
805# I2C Hardware Bus support
806#
807# CONFIG_I2C_ALI1535 is not set
808# CONFIG_I2C_ALI1563 is not set
809# CONFIG_I2C_ALI15X3 is not set
810# CONFIG_I2C_AMD756 is not set
811# CONFIG_I2C_AMD8111 is not set
812# CONFIG_I2C_I801 is not set
813# CONFIG_I2C_I810 is not set
814# CONFIG_I2C_PIIX4 is not set
815CONFIG_I2C_MPC=y
816# CONFIG_I2C_NFORCE2 is not set
817# CONFIG_I2C_OCORES is not set
818# CONFIG_I2C_PARPORT_LIGHT is not set
819# CONFIG_I2C_PROSAVAGE is not set
820# CONFIG_I2C_SAVAGE4 is not set
821# CONFIG_I2C_SIS5595 is not set
822# CONFIG_I2C_SIS630 is not set
823# CONFIG_I2C_SIS96X is not set
824# CONFIG_I2C_STUB is not set
825# CONFIG_I2C_VIA is not set
826# CONFIG_I2C_VIAPRO is not set
827# CONFIG_I2C_VOODOO3 is not set
828# CONFIG_I2C_PCA_ISA is not set
829
830#
831# Miscellaneous I2C Chip support
832#
833# CONFIG_SENSORS_DS1337 is not set
834# CONFIG_SENSORS_DS1374 is not set
835# CONFIG_SENSORS_EEPROM is not set
836# CONFIG_SENSORS_PCF8574 is not set
837# CONFIG_SENSORS_PCA9539 is not set
838# CONFIG_SENSORS_PCF8591 is not set
839# CONFIG_SENSORS_M41T00 is not set
840# CONFIG_SENSORS_MAX6875 is not set
841# CONFIG_I2C_DEBUG_CORE is not set
842# CONFIG_I2C_DEBUG_ALGO is not set
843# CONFIG_I2C_DEBUG_BUS is not set
844# CONFIG_I2C_DEBUG_CHIP is not set
845
846#
847# SPI support
848#
849CONFIG_SPI=y
850# CONFIG_SPI_DEBUG is not set
851CONFIG_SPI_MASTER=y
852
853#
854# SPI Master Controller Drivers
855#
856CONFIG_SPI_BITBANG=y
857CONFIG_SPI_MPC83xx=y
858
859#
860# SPI Protocol Masters
861#
862
863#
864# Dallas's 1-wire bus
865#
866# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set
874# CONFIG_SENSORS_ADM1021 is not set
875# CONFIG_SENSORS_ADM1025 is not set
876# CONFIG_SENSORS_ADM1026 is not set
877# CONFIG_SENSORS_ADM1031 is not set
878# CONFIG_SENSORS_ADM9240 is not set
879# CONFIG_SENSORS_ASB100 is not set
880# CONFIG_SENSORS_ATXP1 is not set
881# CONFIG_SENSORS_DS1621 is not set
882# CONFIG_SENSORS_F71805F is not set
883# CONFIG_SENSORS_FSCHER is not set
884# CONFIG_SENSORS_FSCPOS is not set
885# CONFIG_SENSORS_GL518SM is not set
886# CONFIG_SENSORS_GL520SM is not set
887# CONFIG_SENSORS_IT87 is not set
888# CONFIG_SENSORS_LM63 is not set
889# CONFIG_SENSORS_LM70 is not set
890# CONFIG_SENSORS_LM75 is not set
891# CONFIG_SENSORS_LM77 is not set
892# CONFIG_SENSORS_LM78 is not set
893# CONFIG_SENSORS_LM80 is not set
894# CONFIG_SENSORS_LM83 is not set
895# CONFIG_SENSORS_LM85 is not set
896# CONFIG_SENSORS_LM87 is not set
897# CONFIG_SENSORS_LM90 is not set
898# CONFIG_SENSORS_LM92 is not set
899# CONFIG_SENSORS_MAX1619 is not set
900# CONFIG_SENSORS_PC87360 is not set
901# CONFIG_SENSORS_PC87427 is not set
902# CONFIG_SENSORS_SIS5595 is not set
903# CONFIG_SENSORS_SMSC47M1 is not set
904# CONFIG_SENSORS_SMSC47M192 is not set
905# CONFIG_SENSORS_SMSC47B397 is not set
906# CONFIG_SENSORS_VIA686A is not set
907# CONFIG_SENSORS_VT1211 is not set
908# CONFIG_SENSORS_VT8231 is not set
909# CONFIG_SENSORS_W83781D is not set
910# CONFIG_SENSORS_W83791D is not set
911# CONFIG_SENSORS_W83792D is not set
912# CONFIG_SENSORS_W83793 is not set
913# CONFIG_SENSORS_W83L785TS is not set
914# CONFIG_SENSORS_W83627HF is not set
915# CONFIG_SENSORS_W83627EHF is not set
916# CONFIG_HWMON_DEBUG_CHIP is not set
917
918#
919# Multimedia devices
920#
921# CONFIG_VIDEO_DEV is not set
922
923#
924# Digital Video Broadcasting Devices
925#
926# CONFIG_DVB is not set
927# CONFIG_USB_DABUSB is not set
928
929#
930# Graphics support
931#
932CONFIG_FIRMWARE_EDID=y
933# CONFIG_FB is not set
934# CONFIG_FB_IBM_GXT4500 is not set
935# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
936
937#
938# Sound
939#
940# CONFIG_SOUND is not set
941
942#
943# HID Devices
944#
945CONFIG_HID=y
946
947#
948# USB support
949#
950CONFIG_USB_ARCH_HAS_HCD=y
951CONFIG_USB_ARCH_HAS_OHCI=y
952CONFIG_USB_ARCH_HAS_EHCI=y
953CONFIG_USB=y
954# CONFIG_USB_DEBUG is not set
955
956#
957# Miscellaneous USB options
958#
959CONFIG_USB_DEVICEFS=y
960# CONFIG_USB_BANDWIDTH is not set
961# CONFIG_USB_DYNAMIC_MINORS is not set
962# CONFIG_USB_OTG is not set
963
964#
965# USB Host Controller Drivers
966#
967CONFIG_USB_EHCI_HCD=y
968# CONFIG_USB_EHCI_SPLIT_ISO is not set
969# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
970# CONFIG_USB_EHCI_TT_NEWSCHED is not set
971# CONFIG_USB_ISP116X_HCD is not set
972CONFIG_USB_OHCI_HCD=y
973# CONFIG_USB_OHCI_BIG_ENDIAN is not set
974CONFIG_USB_OHCI_LITTLE_ENDIAN=y
975CONFIG_USB_UHCI_HCD=y
976# CONFIG_USB_SL811_HCD is not set
977
978#
979# USB Device Class drivers
980#
981# CONFIG_USB_ACM is not set
982# CONFIG_USB_PRINTER is not set
983
984#
985# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
986#
987
988#
989# may also be needed; see USB_STORAGE Help for more information
990#
991CONFIG_USB_STORAGE=y
992# CONFIG_USB_STORAGE_DEBUG is not set
993# CONFIG_USB_STORAGE_DATAFAB is not set
994# CONFIG_USB_STORAGE_FREECOM is not set
995# CONFIG_USB_STORAGE_DPCM is not set
996# CONFIG_USB_STORAGE_USBAT is not set
997# CONFIG_USB_STORAGE_SDDR09 is not set
998# CONFIG_USB_STORAGE_SDDR55 is not set
999# CONFIG_USB_STORAGE_JUMPSHOT is not set
1000# CONFIG_USB_STORAGE_ALAUDA is not set
1001# CONFIG_USB_STORAGE_KARMA is not set
1002# CONFIG_USB_LIBUSUAL is not set
1003
1004#
1005# USB Input Devices
1006#
1007# CONFIG_USB_HID is not set
1008
1009#
1010# USB HID Boot Protocol drivers
1011#
1012# CONFIG_USB_KBD is not set
1013# CONFIG_USB_MOUSE is not set
1014# CONFIG_USB_AIPTEK is not set
1015# CONFIG_USB_WACOM is not set
1016# CONFIG_USB_ACECAD is not set
1017# CONFIG_USB_KBTAB is not set
1018# CONFIG_USB_POWERMATE is not set
1019# CONFIG_USB_TOUCHSCREEN is not set
1020# CONFIG_USB_YEALINK is not set
1021# CONFIG_USB_XPAD is not set
1022# CONFIG_USB_ATI_REMOTE is not set
1023# CONFIG_USB_ATI_REMOTE2 is not set
1024# CONFIG_USB_KEYSPAN_REMOTE is not set
1025# CONFIG_USB_APPLETOUCH is not set
1026
1027#
1028# USB Imaging devices
1029#
1030# CONFIG_USB_MDC800 is not set
1031# CONFIG_USB_MICROTEK is not set
1032
1033#
1034# USB Network Adapters
1035#
1036# CONFIG_USB_CATC is not set
1037# CONFIG_USB_KAWETH is not set
1038# CONFIG_USB_PEGASUS is not set
1039# CONFIG_USB_RTL8150 is not set
1040# CONFIG_USB_USBNET_MII is not set
1041# CONFIG_USB_USBNET is not set
1042CONFIG_USB_MON=y
1043
1044#
1045# USB port drivers
1046#
1047
1048#
1049# USB Serial Converter support
1050#
1051# CONFIG_USB_SERIAL is not set
1052
1053#
1054# USB Miscellaneous drivers
1055#
1056# CONFIG_USB_EMI62 is not set
1057# CONFIG_USB_EMI26 is not set
1058# CONFIG_USB_ADUTUX is not set
1059# CONFIG_USB_AUERSWALD is not set
1060# CONFIG_USB_RIO500 is not set
1061# CONFIG_USB_LEGOTOWER is not set
1062# CONFIG_USB_LCD is not set
1063# CONFIG_USB_LED is not set
1064# CONFIG_USB_CYPRESS_CY7C63 is not set
1065# CONFIG_USB_CYTHERM is not set
1066# CONFIG_USB_PHIDGET is not set
1067# CONFIG_USB_IDMOUSE is not set
1068# CONFIG_USB_FTDI_ELAN is not set
1069# CONFIG_USB_APPLEDISPLAY is not set
1070# CONFIG_USB_SISUSBVGA is not set
1071# CONFIG_USB_LD is not set
1072# CONFIG_USB_TRANCEVIBRATOR is not set
1073# CONFIG_USB_TEST is not set
1074
1075#
1076# USB DSL modem support
1077#
1078
1079#
1080# USB Gadget Support
1081#
1082CONFIG_USB_GADGET=y
1083# CONFIG_USB_GADGET_DEBUG_FILES is not set
1084CONFIG_USB_GADGET_SELECTED=y
1085CONFIG_USB_GADGET_NET2280=y
1086CONFIG_USB_NET2280=y
1087# CONFIG_USB_GADGET_PXA2XX is not set
1088# CONFIG_USB_GADGET_GOKU is not set
1089# CONFIG_USB_GADGET_LH7A40X is not set
1090# CONFIG_USB_GADGET_OMAP is not set
1091# CONFIG_USB_GADGET_AT91 is not set
1092# CONFIG_USB_GADGET_DUMMY_HCD is not set
1093CONFIG_USB_GADGET_DUALSPEED=y
1094# CONFIG_USB_ZERO is not set
1095CONFIG_USB_ETH=y
1096CONFIG_USB_ETH_RNDIS=y
1097# CONFIG_USB_GADGETFS is not set
1098# CONFIG_USB_FILE_STORAGE is not set
1099# CONFIG_USB_G_SERIAL is not set
1100# CONFIG_USB_MIDI_GADGET is not set
1101
1102#
1103# MMC/SD Card support
1104#
1105# CONFIG_MMC is not set
1106
1107#
1108# LED devices
1109#
1110# CONFIG_NEW_LEDS is not set
1111
1112#
1113# LED drivers
1114#
1115
1116#
1117# LED Triggers
1118#
1119
1120#
1121# InfiniBand support
1122#
1123# CONFIG_INFINIBAND is not set
1124
1125#
1126# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1127#
1128
1129#
1130# Real Time Clock
1131#
1132CONFIG_RTC_LIB=y
1133CONFIG_RTC_CLASS=y
1134CONFIG_RTC_HCTOSYS=y
1135CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1136# CONFIG_RTC_DEBUG is not set
1137
1138#
1139# RTC interfaces
1140#
1141CONFIG_RTC_INTF_SYSFS=y
1142CONFIG_RTC_INTF_PROC=y
1143CONFIG_RTC_INTF_DEV=y
1144CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1145
1146#
1147# RTC drivers
1148#
1149# CONFIG_RTC_DRV_X1205 is not set
1150CONFIG_RTC_DRV_DS1307=y
1151# CONFIG_RTC_DRV_DS1553 is not set
1152# CONFIG_RTC_DRV_ISL1208 is not set
1153# CONFIG_RTC_DRV_DS1672 is not set
1154# CONFIG_RTC_DRV_DS1742 is not set
1155# CONFIG_RTC_DRV_PCF8563 is not set
1156# CONFIG_RTC_DRV_PCF8583 is not set
1157# CONFIG_RTC_DRV_RS5C348 is not set
1158# CONFIG_RTC_DRV_RS5C372 is not set
1159# CONFIG_RTC_DRV_M48T86 is not set
1160# CONFIG_RTC_DRV_TEST is not set
1161# CONFIG_RTC_DRV_MAX6902 is not set
1162# CONFIG_RTC_DRV_V3020 is not set
1163
1164#
1165# DMA Engine support
1166#
1167CONFIG_DMA_ENGINE=y
1168
1169#
1170# DMA Clients
1171#
1172CONFIG_NET_DMA=y
1173
1174#
1175# DMA Devices
1176#
1177CONFIG_INTEL_IOATDMA=y
1178
1179#
1180# Virtualization
1181#
1182
1183#
1184# File systems
1185#
1186CONFIG_EXT2_FS=y
1187# CONFIG_EXT2_FS_XATTR is not set
1188# CONFIG_EXT2_FS_XIP is not set
1189CONFIG_EXT3_FS=y
1190CONFIG_EXT3_FS_XATTR=y
1191# CONFIG_EXT3_FS_POSIX_ACL is not set
1192# CONFIG_EXT3_FS_SECURITY is not set
1193# CONFIG_EXT4DEV_FS is not set
1194CONFIG_JBD=y
1195# CONFIG_JBD_DEBUG is not set
1196CONFIG_FS_MBCACHE=y
1197# CONFIG_REISERFS_FS is not set
1198# CONFIG_JFS_FS is not set
1199# CONFIG_FS_POSIX_ACL is not set
1200# CONFIG_XFS_FS is not set
1201# CONFIG_GFS2_FS is not set
1202# CONFIG_OCFS2_FS is not set
1203# CONFIG_MINIX_FS is not set
1204# CONFIG_ROMFS_FS is not set
1205CONFIG_INOTIFY=y
1206CONFIG_INOTIFY_USER=y
1207# CONFIG_QUOTA is not set
1208CONFIG_DNOTIFY=y
1209# CONFIG_AUTOFS_FS is not set
1210# CONFIG_AUTOFS4_FS is not set
1211# CONFIG_FUSE_FS is not set
1212
1213#
1214# CD-ROM/DVD Filesystems
1215#
1216# CONFIG_ISO9660_FS is not set
1217# CONFIG_UDF_FS is not set
1218
1219#
1220# DOS/FAT/NT Filesystems
1221#
1222# CONFIG_MSDOS_FS is not set
1223# CONFIG_VFAT_FS is not set
1224# CONFIG_NTFS_FS is not set
1225
1226#
1227# Pseudo filesystems
1228#
1229CONFIG_PROC_FS=y
1230CONFIG_PROC_KCORE=y
1231CONFIG_PROC_SYSCTL=y
1232CONFIG_SYSFS=y
1233CONFIG_TMPFS=y
1234# CONFIG_TMPFS_POSIX_ACL is not set
1235# CONFIG_HUGETLB_PAGE is not set
1236CONFIG_RAMFS=y
1237# CONFIG_CONFIGFS_FS is not set
1238
1239#
1240# Miscellaneous filesystems
1241#
1242# CONFIG_ADFS_FS is not set
1243# CONFIG_AFFS_FS is not set
1244# CONFIG_HFS_FS is not set
1245# CONFIG_HFSPLUS_FS is not set
1246# CONFIG_BEFS_FS is not set
1247# CONFIG_BFS_FS is not set
1248# CONFIG_EFS_FS is not set
1249# CONFIG_JFFS2_FS is not set
1250# CONFIG_CRAMFS is not set
1251# CONFIG_VXFS_FS is not set
1252# CONFIG_HPFS_FS is not set
1253# CONFIG_QNX4FS_FS is not set
1254# CONFIG_SYSV_FS is not set
1255# CONFIG_UFS_FS is not set
1256
1257#
1258# Network File Systems
1259#
1260CONFIG_NFS_FS=y
1261CONFIG_NFS_V3=y
1262# CONFIG_NFS_V3_ACL is not set
1263CONFIG_NFS_V4=y
1264# CONFIG_NFS_DIRECTIO is not set
1265# CONFIG_NFSD is not set
1266CONFIG_ROOT_NFS=y
1267CONFIG_LOCKD=y
1268CONFIG_LOCKD_V4=y
1269CONFIG_NFS_COMMON=y
1270CONFIG_SUNRPC=y
1271CONFIG_SUNRPC_GSS=y
1272CONFIG_RPCSEC_GSS_KRB5=y
1273# CONFIG_RPCSEC_GSS_SPKM3 is not set
1274# CONFIG_SMB_FS is not set
1275# CONFIG_CIFS is not set
1276# CONFIG_NCP_FS is not set
1277# CONFIG_CODA_FS is not set
1278# CONFIG_AFS_FS is not set
1279# CONFIG_9P_FS is not set
1280
1281#
1282# Partition Types
1283#
1284CONFIG_PARTITION_ADVANCED=y
1285# CONFIG_ACORN_PARTITION is not set
1286# CONFIG_OSF_PARTITION is not set
1287# CONFIG_AMIGA_PARTITION is not set
1288# CONFIG_ATARI_PARTITION is not set
1289# CONFIG_MAC_PARTITION is not set
1290CONFIG_MSDOS_PARTITION=y
1291# CONFIG_BSD_DISKLABEL is not set
1292# CONFIG_MINIX_SUBPARTITION is not set
1293# CONFIG_SOLARIS_X86_PARTITION is not set
1294# CONFIG_UNIXWARE_DISKLABEL is not set
1295# CONFIG_LDM_PARTITION is not set
1296# CONFIG_SGI_PARTITION is not set
1297# CONFIG_ULTRIX_PARTITION is not set
1298# CONFIG_SUN_PARTITION is not set
1299# CONFIG_KARMA_PARTITION is not set
1300# CONFIG_EFI_PARTITION is not set
1301
1302#
1303# Native Language Support
1304#
1305# CONFIG_NLS is not set
1306
1307#
1308# Distributed Lock Manager
1309#
1310# CONFIG_DLM is not set
1311
1312#
1313# Library routines
1314#
1315CONFIG_BITREVERSE=y
1316# CONFIG_CRC_CCITT is not set
1317# CONFIG_CRC16 is not set
1318CONFIG_CRC32=y
1319# CONFIG_LIBCRC32C is not set
1320CONFIG_PLIST=y
1321CONFIG_IOMAP_COPY=y
1322
1323#
1324# Instrumentation Support
1325#
1326# CONFIG_PROFILING is not set
1327
1328#
1329# Kernel hacking
1330#
1331# CONFIG_PRINTK_TIME is not set
1332CONFIG_ENABLE_MUST_CHECK=y
1333# CONFIG_MAGIC_SYSRQ is not set
1334# CONFIG_UNUSED_SYMBOLS is not set
1335# CONFIG_DEBUG_FS is not set
1336# CONFIG_HEADERS_CHECK is not set
1337CONFIG_DEBUG_KERNEL=y
1338CONFIG_LOG_BUF_SHIFT=14
1339CONFIG_DETECT_SOFTLOCKUP=y
1340# CONFIG_SCHEDSTATS is not set
1341# CONFIG_DEBUG_SLAB is not set
1342# CONFIG_DEBUG_RT_MUTEXES is not set
1343# CONFIG_RT_MUTEX_TESTER is not set
1344# CONFIG_DEBUG_SPINLOCK is not set
1345# CONFIG_DEBUG_MUTEXES is not set
1346# CONFIG_DEBUG_RWSEMS is not set
1347# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1348# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1349# CONFIG_DEBUG_KOBJECT is not set
1350# CONFIG_DEBUG_BUGVERBOSE is not set
1351# CONFIG_DEBUG_INFO is not set
1352# CONFIG_DEBUG_VM is not set
1353# CONFIG_DEBUG_LIST is not set
1354CONFIG_FORCED_INLINING=y
1355# CONFIG_RCU_TORTURE_TEST is not set
1356# CONFIG_DEBUG_STACKOVERFLOW is not set
1357# CONFIG_DEBUG_STACK_USAGE is not set
1358# CONFIG_DEBUGGER is not set
1359# CONFIG_BDI_SWITCH is not set
1360# CONFIG_BOOTX_TEXT is not set
1361# CONFIG_SERIAL_TEXT_DEBUG is not set
1362# CONFIG_PPC_EARLY_DEBUG is not set
1363
1364#
1365# Security options
1366#
1367# CONFIG_KEYS is not set
1368# CONFIG_SECURITY is not set
1369
1370#
1371# Cryptographic options
1372#
1373CONFIG_CRYPTO=y
1374CONFIG_CRYPTO_ALGAPI=y
1375CONFIG_CRYPTO_BLKCIPHER=y
1376CONFIG_CRYPTO_MANAGER=y
1377# CONFIG_CRYPTO_HMAC is not set
1378# CONFIG_CRYPTO_XCBC is not set
1379# CONFIG_CRYPTO_NULL is not set
1380# CONFIG_CRYPTO_MD4 is not set
1381CONFIG_CRYPTO_MD5=y
1382# CONFIG_CRYPTO_SHA1 is not set
1383# CONFIG_CRYPTO_SHA256 is not set
1384# CONFIG_CRYPTO_SHA512 is not set
1385# CONFIG_CRYPTO_WP512 is not set
1386# CONFIG_CRYPTO_TGR192 is not set
1387# CONFIG_CRYPTO_GF128MUL is not set
1388# CONFIG_CRYPTO_ECB is not set
1389CONFIG_CRYPTO_CBC=y
1390# CONFIG_CRYPTO_LRW is not set
1391CONFIG_CRYPTO_DES=y
1392# CONFIG_CRYPTO_BLOWFISH is not set
1393# CONFIG_CRYPTO_TWOFISH is not set
1394# CONFIG_CRYPTO_SERPENT is not set
1395# CONFIG_CRYPTO_AES is not set
1396# CONFIG_CRYPTO_CAST5 is not set
1397# CONFIG_CRYPTO_CAST6 is not set
1398# CONFIG_CRYPTO_TEA is not set
1399# CONFIG_CRYPTO_ARC4 is not set
1400# CONFIG_CRYPTO_KHAZAD is not set
1401# CONFIG_CRYPTO_ANUBIS is not set
1402# CONFIG_CRYPTO_DEFLATE is not set
1403# CONFIG_CRYPTO_MICHAEL_MIC is not set
1404# CONFIG_CRYPTO_CRC32C is not set
1405# CONFIG_CRYPTO_TEST is not set
1406
1407#
1408# Hardware crypto devices
1409#
diff --git a/arch/powerpc/configs/mpc8360emds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index 58e6795dbfe5..e1b36de6b38c 100644
--- a/arch/powerpc/configs/mpc8360emds_defconfig
+++ b/arch/powerpc/configs/mpc832x_mds_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.20-rc5 3# Linux kernel version: 2.6.20-rc5
4# Mon Jan 22 22:24:40 2007 4# Tue Jan 30 14:27:25 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -129,11 +129,11 @@ CONFIG_PPC_GEN550=y
129# 129#
130# Platform support 130# Platform support
131# 131#
132# CONFIG_MPC832x_MDS is not set 132CONFIG_MPC832x_MDS=y
133# CONFIG_MPC834x_SYS is not set 133# CONFIG_MPC834x_SYS is not set
134# CONFIG_MPC834x_ITX is not set 134# CONFIG_MPC834x_ITX is not set
135CONFIG_MPC8360E_PB=y 135# CONFIG_MPC8360E_PB is not set
136CONFIG_PPC_MPC836x=y 136CONFIG_PPC_MPC832x=y
137# CONFIG_MPIC is not set 137# CONFIG_MPIC is not set
138 138
139# 139#
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 45757b613702..23d8964846e0 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_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.20-rc5 3# Linux kernel version: 2.6.20
4# Mon Jan 22 22:23:43 2007 4# Wed Feb 7 13:12:18 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34CONFIG_PPC_83xx=y 34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_83xx=y 42CONFIG_83xx=y
@@ -149,7 +149,6 @@ CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT is not set 149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y 150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set 151# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 152CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y 153CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y 154CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -179,7 +178,6 @@ CONFIG_FSL_SOC=y
179CONFIG_PCI=y 178CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 179CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 180# CONFIG_PCIEPORTBUS is not set
182# CONFIG_PCI_DEBUG is not set
183 181
184# 182#
185# PCCARD (PCMCIA/CardBus) support 183# PCCARD (PCMCIA/CardBus) support
@@ -304,7 +302,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
304CONFIG_STANDALONE=y 302CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y 303CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set 304# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_SYS_HYPERVISOR is not set 305# CONFIG_SYS_HYPERVISOR is not set
309 306
310# 307#
@@ -324,6 +321,7 @@ CONFIG_MTD=y
324# User Modules And Translation Layers 321# User Modules And Translation Layers
325# 322#
326CONFIG_MTD_CHAR=y 323CONFIG_MTD_CHAR=y
324# CONFIG_MTD_BLKDEVS is not set
327# CONFIG_MTD_BLOCK is not set 325# CONFIG_MTD_BLOCK is not set
328# CONFIG_MTD_BLOCK_RO is not set 326# CONFIG_MTD_BLOCK_RO is not set
329# CONFIG_FTL is not set 327# CONFIG_FTL is not set
@@ -366,6 +364,7 @@ CONFIG_MTD_PHYSMAP=y
366CONFIG_MTD_PHYSMAP_START=0xfe000000 364CONFIG_MTD_PHYSMAP_START=0xfe000000
367CONFIG_MTD_PHYSMAP_LEN=0x1000000 365CONFIG_MTD_PHYSMAP_LEN=0x1000000
368CONFIG_MTD_PHYSMAP_BANKWIDTH=2 366CONFIG_MTD_PHYSMAP_BANKWIDTH=2
367# CONFIG_MTD_PHYSMAP_OF is not set
369# CONFIG_MTD_PLATRAM is not set 368# CONFIG_MTD_PLATRAM is not set
370 369
371# 370#
@@ -390,6 +389,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
390# NAND Flash Device Drivers 389# NAND Flash Device Drivers
391# 390#
392# CONFIG_MTD_NAND is not set 391# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set
393 393
394# 394#
395# OneNAND Flash Device Drivers 395# OneNAND Flash Device Drivers
@@ -521,6 +521,7 @@ CONFIG_SCSI_SPI_ATTRS=y
521# Serial ATA (prod) and Parallel ATA (experimental) drivers 521# Serial ATA (prod) and Parallel ATA (experimental) drivers
522# 522#
523CONFIG_ATA=y 523CONFIG_ATA=y
524# CONFIG_ATA_NONSTANDARD is not set
524# CONFIG_SATA_AHCI is not set 525# CONFIG_SATA_AHCI is not set
525# CONFIG_SATA_SVW is not set 526# CONFIG_SATA_SVW is not set
526# CONFIG_ATA_PIIX is not set 527# CONFIG_ATA_PIIX is not set
@@ -645,37 +646,7 @@ CONFIG_CICADA_PHY=y
645# 646#
646# Ethernet (10 or 100Mbit) 647# Ethernet (10 or 100Mbit)
647# 648#
648CONFIG_NET_ETHERNET=y 649# CONFIG_NET_ETHERNET is not set
649CONFIG_MII=y
650# CONFIG_HAPPYMEAL is not set
651# CONFIG_SUNGEM is not set
652# CONFIG_CASSINI is not set
653# CONFIG_NET_VENDOR_3COM is not set
654
655#
656# Tulip family network device support
657#
658# CONFIG_NET_TULIP is not set
659# CONFIG_HP100 is not set
660CONFIG_NET_PCI=y
661# CONFIG_PCNET32 is not set
662# CONFIG_AMD8111_ETH is not set
663# CONFIG_ADAPTEC_STARFIRE is not set
664# CONFIG_B44 is not set
665# CONFIG_FORCEDETH is not set
666# CONFIG_DGRS is not set
667# CONFIG_EEPRO100 is not set
668CONFIG_E100=y
669# CONFIG_FEALNX is not set
670# CONFIG_NATSEMI is not set
671# CONFIG_NE2K_PCI is not set
672# CONFIG_8139CP is not set
673# CONFIG_8139TOO is not set
674# CONFIG_SIS900 is not set
675# CONFIG_EPIC100 is not set
676# CONFIG_SUNDANCE is not set
677# CONFIG_TLAN is not set
678# CONFIG_VIA_RHINE is not set
679 650
680# 651#
681# Ethernet (1000 Mbit) 652# Ethernet (1000 Mbit)
@@ -691,7 +662,6 @@ CONFIG_E100=y
691# CONFIG_SKGE is not set 662# CONFIG_SKGE is not set
692# CONFIG_SKY2 is not set 663# CONFIG_SKY2 is not set
693# CONFIG_SK98LIN is not set 664# CONFIG_SK98LIN is not set
694# CONFIG_VIA_VELOCITY is not set
695# CONFIG_TIGON3 is not set 665# CONFIG_TIGON3 is not set
696# CONFIG_BNX2 is not set 666# CONFIG_BNX2 is not set
697CONFIG_GIANFAR=y 667CONFIG_GIANFAR=y
@@ -744,26 +714,7 @@ CONFIG_GFAR_NAPI=y
744# 714#
745# Input device support 715# Input device support
746# 716#
747CONFIG_INPUT=y 717# CONFIG_INPUT is not set
748# CONFIG_INPUT_FF_MEMLESS is not set
749
750#
751# Userland interfaces
752#
753# CONFIG_INPUT_MOUSEDEV is not set
754# CONFIG_INPUT_JOYDEV is not set
755# CONFIG_INPUT_TSDEV is not set
756# CONFIG_INPUT_EVDEV is not set
757# CONFIG_INPUT_EVBUG is not set
758
759#
760# Input Device Drivers
761#
762# CONFIG_INPUT_KEYBOARD is not set
763# CONFIG_INPUT_MOUSE is not set
764# CONFIG_INPUT_JOYSTICK is not set
765# CONFIG_INPUT_TOUCHSCREEN is not set
766# CONFIG_INPUT_MISC is not set
767 718
768# 719#
769# Hardware I/O ports 720# Hardware I/O ports
@@ -782,7 +733,7 @@ CONFIG_INPUT=y
782# 733#
783CONFIG_SERIAL_8250=y 734CONFIG_SERIAL_8250=y
784CONFIG_SERIAL_8250_CONSOLE=y 735CONFIG_SERIAL_8250_CONSOLE=y
785CONFIG_SERIAL_8250_PCI=y 736# CONFIG_SERIAL_8250_PCI is not set
786CONFIG_SERIAL_8250_NR_UARTS=4 737CONFIG_SERIAL_8250_NR_UARTS=4
787CONFIG_SERIAL_8250_RUNTIME_UARTS=4 738CONFIG_SERIAL_8250_RUNTIME_UARTS=4
788# CONFIG_SERIAL_8250_EXTENDED is not set 739# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -885,7 +836,7 @@ CONFIG_I2C_MPC=y
885# CONFIG_SENSORS_DS1337 is not set 836# CONFIG_SENSORS_DS1337 is not set
886# CONFIG_SENSORS_DS1374 is not set 837# CONFIG_SENSORS_DS1374 is not set
887# CONFIG_SENSORS_EEPROM is not set 838# CONFIG_SENSORS_EEPROM is not set
888# CONFIG_SENSORS_PCF8574 is not set 839CONFIG_SENSORS_PCF8574=y
889# CONFIG_SENSORS_PCA9539 is not set 840# CONFIG_SENSORS_PCA9539 is not set
890# CONFIG_SENSORS_PCF8591 is not set 841# CONFIG_SENSORS_PCF8591 is not set
891# CONFIG_SENSORS_M41T00 is not set 842# CONFIG_SENSORS_M41T00 is not set
@@ -899,7 +850,6 @@ CONFIG_I2C_MPC=y
899# SPI support 850# SPI support
900# 851#
901CONFIG_SPI=y 852CONFIG_SPI=y
902# CONFIG_SPI_DEBUG is not set
903CONFIG_SPI_MASTER=y 853CONFIG_SPI_MASTER=y
904 854
905# 855#
@@ -920,52 +870,8 @@ CONFIG_SPI_MPC83xx=y
920# 870#
921# Hardware Monitoring support 871# Hardware Monitoring support
922# 872#
923CONFIG_HWMON=y 873# CONFIG_HWMON is not set
924# CONFIG_HWMON_VID is not set 874# CONFIG_HWMON_VID is not set
925# CONFIG_SENSORS_ABITUGURU is not set
926# CONFIG_SENSORS_ADM1021 is not set
927# CONFIG_SENSORS_ADM1025 is not set
928# CONFIG_SENSORS_ADM1026 is not set
929# CONFIG_SENSORS_ADM1031 is not set
930# CONFIG_SENSORS_ADM9240 is not set
931# CONFIG_SENSORS_ASB100 is not set
932# CONFIG_SENSORS_ATXP1 is not set
933# CONFIG_SENSORS_DS1621 is not set
934# CONFIG_SENSORS_F71805F is not set
935# CONFIG_SENSORS_FSCHER is not set
936# CONFIG_SENSORS_FSCPOS is not set
937# CONFIG_SENSORS_GL518SM is not set
938# CONFIG_SENSORS_GL520SM is not set
939# CONFIG_SENSORS_IT87 is not set
940# CONFIG_SENSORS_LM63 is not set
941# CONFIG_SENSORS_LM70 is not set
942# CONFIG_SENSORS_LM75 is not set
943# CONFIG_SENSORS_LM77 is not set
944# CONFIG_SENSORS_LM78 is not set
945# CONFIG_SENSORS_LM80 is not set
946# CONFIG_SENSORS_LM83 is not set
947# CONFIG_SENSORS_LM85 is not set
948# CONFIG_SENSORS_LM87 is not set
949# CONFIG_SENSORS_LM90 is not set
950# CONFIG_SENSORS_LM92 is not set
951# CONFIG_SENSORS_MAX1619 is not set
952# CONFIG_SENSORS_PC87360 is not set
953# CONFIG_SENSORS_PC87427 is not set
954# CONFIG_SENSORS_SIS5595 is not set
955# CONFIG_SENSORS_SMSC47M1 is not set
956# CONFIG_SENSORS_SMSC47M192 is not set
957# CONFIG_SENSORS_SMSC47B397 is not set
958# CONFIG_SENSORS_VIA686A is not set
959# CONFIG_SENSORS_VT1211 is not set
960# CONFIG_SENSORS_VT8231 is not set
961# CONFIG_SENSORS_W83781D is not set
962# CONFIG_SENSORS_W83791D is not set
963# CONFIG_SENSORS_W83792D is not set
964# CONFIG_SENSORS_W83793 is not set
965# CONFIG_SENSORS_W83L785TS is not set
966# CONFIG_SENSORS_W83627HF is not set
967# CONFIG_SENSORS_W83627EHF is not set
968# CONFIG_HWMON_DEBUG_CHIP is not set
969 875
970# 876#
971# Multimedia devices 877# Multimedia devices
@@ -981,7 +887,7 @@ CONFIG_HWMON=y
981# 887#
982# Graphics support 888# Graphics support
983# 889#
984CONFIG_FIRMWARE_EDID=y 890# CONFIG_FIRMWARE_EDID is not set
985# CONFIG_FB is not set 891# CONFIG_FB is not set
986# CONFIG_FB_IBM_GXT4500 is not set 892# CONFIG_FB_IBM_GXT4500 is not set
987# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 893# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
@@ -992,11 +898,6 @@ CONFIG_FIRMWARE_EDID=y
992# CONFIG_SOUND is not set 898# CONFIG_SOUND is not set
993 899
994# 900#
995# HID Devices
996#
997CONFIG_HID=y
998
999#
1000# USB support 901# USB support
1001# 902#
1002CONFIG_USB_ARCH_HAS_HCD=y 903CONFIG_USB_ARCH_HAS_HCD=y
@@ -1011,7 +912,6 @@ CONFIG_USB=y
1011CONFIG_USB_DEVICEFS=y 912CONFIG_USB_DEVICEFS=y
1012# CONFIG_USB_BANDWIDTH is not set 913# CONFIG_USB_BANDWIDTH is not set
1013# CONFIG_USB_DYNAMIC_MINORS is not set 914# CONFIG_USB_DYNAMIC_MINORS is not set
1014# CONFIG_USB_MULTITHREAD_PROBE is not set
1015# CONFIG_USB_OTG is not set 915# CONFIG_USB_OTG is not set
1016 916
1017# 917#
@@ -1022,10 +922,8 @@ CONFIG_USB_EHCI_HCD=y
1022# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 922# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1023# CONFIG_USB_EHCI_TT_NEWSCHED is not set 923# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1024# CONFIG_USB_ISP116X_HCD is not set 924# CONFIG_USB_ISP116X_HCD is not set
1025CONFIG_USB_OHCI_HCD=y 925# CONFIG_USB_OHCI_HCD is not set
1026# CONFIG_USB_OHCI_BIG_ENDIAN is not set 926# CONFIG_USB_UHCI_HCD is not set
1027CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1028CONFIG_USB_UHCI_HCD=y
1029# CONFIG_USB_SL811_HCD is not set 927# CONFIG_USB_SL811_HCD is not set
1030 928
1031# 929#
@@ -1057,25 +955,10 @@ CONFIG_USB_STORAGE=y
1057# 955#
1058# USB Input Devices 956# USB Input Devices
1059# 957#
1060# CONFIG_USB_HID is not set
1061 958
1062# 959#
1063# USB HID Boot Protocol drivers 960# USB HID Boot Protocol drivers
1064# 961#
1065# CONFIG_USB_KBD is not set
1066# CONFIG_USB_MOUSE is not set
1067# CONFIG_USB_AIPTEK is not set
1068# CONFIG_USB_WACOM is not set
1069# CONFIG_USB_ACECAD is not set
1070# CONFIG_USB_KBTAB is not set
1071# CONFIG_USB_POWERMATE is not set
1072# CONFIG_USB_TOUCHSCREEN is not set
1073# CONFIG_USB_YEALINK is not set
1074# CONFIG_USB_XPAD is not set
1075# CONFIG_USB_ATI_REMOTE is not set
1076# CONFIG_USB_ATI_REMOTE2 is not set
1077# CONFIG_USB_KEYSPAN_REMOTE is not set
1078# CONFIG_USB_APPLETOUCH is not set
1079 962
1080# 963#
1081# USB Imaging devices 964# USB Imaging devices
@@ -1132,25 +1015,7 @@ CONFIG_USB_MON=y
1132# 1015#
1133# USB Gadget Support 1016# USB Gadget Support
1134# 1017#
1135CONFIG_USB_GADGET=y 1018# CONFIG_USB_GADGET is not set
1136# CONFIG_USB_GADGET_DEBUG_FILES is not set
1137CONFIG_USB_GADGET_SELECTED=y
1138CONFIG_USB_GADGET_NET2280=y
1139CONFIG_USB_NET2280=y
1140# CONFIG_USB_GADGET_PXA2XX is not set
1141# CONFIG_USB_GADGET_GOKU is not set
1142# CONFIG_USB_GADGET_LH7A40X is not set
1143# CONFIG_USB_GADGET_OMAP is not set
1144# CONFIG_USB_GADGET_AT91 is not set
1145# CONFIG_USB_GADGET_DUMMY_HCD is not set
1146CONFIG_USB_GADGET_DUALSPEED=y
1147# CONFIG_USB_ZERO is not set
1148CONFIG_USB_ETH=y
1149CONFIG_USB_ETH_RNDIS=y
1150# CONFIG_USB_GADGETFS is not set
1151# CONFIG_USB_FILE_STORAGE is not set
1152# CONFIG_USB_G_SERIAL is not set
1153# CONFIG_USB_MIDI_GADGET is not set
1154 1019
1155# 1020#
1156# MMC/SD Card support 1021# MMC/SD Card support
@@ -1272,8 +1137,11 @@ CONFIG_DNOTIFY=y
1272# 1137#
1273# DOS/FAT/NT Filesystems 1138# DOS/FAT/NT Filesystems
1274# 1139#
1275# CONFIG_MSDOS_FS is not set 1140CONFIG_FAT_FS=y
1276# CONFIG_VFAT_FS is not set 1141CONFIG_MSDOS_FS=y
1142CONFIG_VFAT_FS=y
1143CONFIG_FAT_DEFAULT_CODEPAGE=437
1144CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1277# CONFIG_NTFS_FS is not set 1145# CONFIG_NTFS_FS is not set
1278 1146
1279# 1147#
@@ -1339,7 +1207,7 @@ CONFIG_PARTITION_ADVANCED=y
1339# CONFIG_OSF_PARTITION is not set 1207# CONFIG_OSF_PARTITION is not set
1340# CONFIG_AMIGA_PARTITION is not set 1208# CONFIG_AMIGA_PARTITION is not set
1341# CONFIG_ATARI_PARTITION is not set 1209# CONFIG_ATARI_PARTITION is not set
1342# CONFIG_MAC_PARTITION is not set 1210CONFIG_MAC_PARTITION=y
1343CONFIG_MSDOS_PARTITION=y 1211CONFIG_MSDOS_PARTITION=y
1344# CONFIG_BSD_DISKLABEL is not set 1212# CONFIG_BSD_DISKLABEL is not set
1345# CONFIG_MINIX_SUBPARTITION is not set 1213# CONFIG_MINIX_SUBPARTITION is not set
@@ -1355,7 +1223,46 @@ CONFIG_MSDOS_PARTITION=y
1355# 1223#
1356# Native Language Support 1224# Native Language Support
1357# 1225#
1358# CONFIG_NLS is not set 1226CONFIG_NLS=y
1227CONFIG_NLS_DEFAULT="iso8859-1"
1228# CONFIG_NLS_CODEPAGE_437 is not set
1229# CONFIG_NLS_CODEPAGE_737 is not set
1230# CONFIG_NLS_CODEPAGE_775 is not set
1231# CONFIG_NLS_CODEPAGE_850 is not set
1232# CONFIG_NLS_CODEPAGE_852 is not set
1233# CONFIG_NLS_CODEPAGE_855 is not set
1234# CONFIG_NLS_CODEPAGE_857 is not set
1235# CONFIG_NLS_CODEPAGE_860 is not set
1236# CONFIG_NLS_CODEPAGE_861 is not set
1237# CONFIG_NLS_CODEPAGE_862 is not set
1238# CONFIG_NLS_CODEPAGE_863 is not set
1239# CONFIG_NLS_CODEPAGE_864 is not set
1240# CONFIG_NLS_CODEPAGE_865 is not set
1241# CONFIG_NLS_CODEPAGE_866 is not set
1242# CONFIG_NLS_CODEPAGE_869 is not set
1243# CONFIG_NLS_CODEPAGE_936 is not set
1244# CONFIG_NLS_CODEPAGE_950 is not set
1245# CONFIG_NLS_CODEPAGE_932 is not set
1246# CONFIG_NLS_CODEPAGE_949 is not set
1247# CONFIG_NLS_CODEPAGE_874 is not set
1248# CONFIG_NLS_ISO8859_8 is not set
1249# CONFIG_NLS_CODEPAGE_1250 is not set
1250# CONFIG_NLS_CODEPAGE_1251 is not set
1251# CONFIG_NLS_ASCII is not set
1252# CONFIG_NLS_ISO8859_1 is not set
1253# CONFIG_NLS_ISO8859_2 is not set
1254# CONFIG_NLS_ISO8859_3 is not set
1255# CONFIG_NLS_ISO8859_4 is not set
1256# CONFIG_NLS_ISO8859_5 is not set
1257# CONFIG_NLS_ISO8859_6 is not set
1258# CONFIG_NLS_ISO8859_7 is not set
1259# CONFIG_NLS_ISO8859_9 is not set
1260# CONFIG_NLS_ISO8859_13 is not set
1261# CONFIG_NLS_ISO8859_14 is not set
1262# CONFIG_NLS_ISO8859_15 is not set
1263# CONFIG_NLS_KOI8_R is not set
1264# CONFIG_NLS_KOI8_U is not set
1265# CONFIG_NLS_UTF8 is not set
1359 1266
1360# 1267#
1361# Distributed Lock Manager 1268# Distributed Lock Manager
@@ -1387,27 +1294,9 @@ CONFIG_ENABLE_MUST_CHECK=y
1387# CONFIG_UNUSED_SYMBOLS is not set 1294# CONFIG_UNUSED_SYMBOLS is not set
1388# CONFIG_DEBUG_FS is not set 1295# CONFIG_DEBUG_FS is not set
1389# CONFIG_HEADERS_CHECK is not set 1296# CONFIG_HEADERS_CHECK is not set
1390CONFIG_DEBUG_KERNEL=y 1297# CONFIG_DEBUG_KERNEL is not set
1391CONFIG_LOG_BUF_SHIFT=14 1298CONFIG_LOG_BUF_SHIFT=14
1392CONFIG_DETECT_SOFTLOCKUP=y
1393# CONFIG_SCHEDSTATS is not set
1394# CONFIG_DEBUG_SLAB is not set
1395# CONFIG_DEBUG_RT_MUTEXES is not set
1396# CONFIG_RT_MUTEX_TESTER is not set
1397# CONFIG_DEBUG_SPINLOCK is not set
1398# CONFIG_DEBUG_MUTEXES is not set
1399# CONFIG_DEBUG_RWSEMS is not set
1400# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1401# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1402# CONFIG_DEBUG_KOBJECT is not set
1403# CONFIG_DEBUG_BUGVERBOSE is not set 1299# CONFIG_DEBUG_BUGVERBOSE is not set
1404# CONFIG_DEBUG_INFO is not set
1405# CONFIG_DEBUG_VM is not set
1406# CONFIG_DEBUG_LIST is not set
1407CONFIG_FORCED_INLINING=y
1408# CONFIG_RCU_TORTURE_TEST is not set
1409# CONFIG_DEBUGGER is not set
1410# CONFIG_BDI_SWITCH is not set
1411# CONFIG_BOOTX_TEXT is not set 1300# CONFIG_BOOTX_TEXT is not set
1412# CONFIG_SERIAL_TEXT_DEBUG is not set 1301# CONFIG_SERIAL_TEXT_DEBUG is not set
1413# CONFIG_PPC_EARLY_DEBUG is not set 1302# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
new file mode 100644
index 000000000000..4aa666c9cb94
--- /dev/null
+++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig
@@ -0,0 +1,1174 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Fri Feb 9 13:28:19 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set
74CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y
77CONFIG_EMBEDDED=y
78CONFIG_SYSCTL_SYSCALL=y
79# CONFIG_KALLSYMS is not set
80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y
82CONFIG_BUG=y
83CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y
86# CONFIG_EPOLL is not set
87CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94
95#
96# Loadable module support
97#
98CONFIG_MODULES=y
99CONFIG_MODULE_UNLOAD=y
100# CONFIG_MODULE_FORCE_UNLOAD is not set
101# CONFIG_MODVERSIONS is not set
102# CONFIG_MODULE_SRCVERSION_ALL is not set
103# CONFIG_KMOD is not set
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_LBD is not set
110# CONFIG_BLK_DEV_IO_TRACE is not set
111# CONFIG_LSF is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set
133CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set
135CONFIG_MPC834x=y
136# CONFIG_MPIC is not set
137
138#
139# Kernel options
140#
141# CONFIG_HIGHMEM is not set
142# CONFIG_HZ_100 is not set
143CONFIG_HZ_250=y
144# CONFIG_HZ_300 is not set
145# CONFIG_HZ_1000 is not set
146CONFIG_HZ=250
147CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set
152CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
153CONFIG_ARCH_FLATMEM_ENABLE=y
154CONFIG_ARCH_POPULATES_NODE_MAP=y
155CONFIG_SELECT_MEMORY_MODEL=y
156CONFIG_FLATMEM_MANUAL=y
157# CONFIG_DISCONTIGMEM_MANUAL is not set
158# CONFIG_SPARSEMEM_MANUAL is not set
159CONFIG_FLATMEM=y
160CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set
164CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set
167CONFIG_SECCOMP=y
168CONFIG_ISA_DMA_API=y
169
170#
171# Bus options
172#
173CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y
177CONFIG_FSL_SOC=y
178CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set
181
182#
183# PCCARD (PCMCIA/CardBus) support
184#
185# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set
191
192#
193# Advanced setup
194#
195# CONFIG_ADVANCED_OPTIONS is not set
196
197#
198# Default settings for advanced configuration options are used
199#
200CONFIG_HIGHMEM_START=0xfe000000
201CONFIG_LOWMEM_SIZE=0x30000000
202CONFIG_KERNEL_START=0xc0000000
203CONFIG_TASK_SIZE=0x80000000
204CONFIG_BOOT_LOAD=0x00800000
205
206#
207# Networking
208#
209CONFIG_NET=y
210
211#
212# Networking options
213#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y
218CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set
221# CONFIG_NET_KEY is not set
222CONFIG_INET=y
223CONFIG_IP_MULTICAST=y
224# CONFIG_IP_ADVANCED_ROUTER is not set
225CONFIG_IP_FIB_HASH=y
226CONFIG_IP_PNP=y
227CONFIG_IP_PNP_DHCP=y
228CONFIG_IP_PNP_BOOTP=y
229# CONFIG_IP_PNP_RARP is not set
230# CONFIG_NET_IPIP is not set
231# CONFIG_NET_IPGRE is not set
232# CONFIG_IP_MROUTE is not set
233# CONFIG_ARPD is not set
234CONFIG_SYN_COOKIES=y
235# CONFIG_INET_AH is not set
236# CONFIG_INET_ESP is not set
237# CONFIG_INET_IPCOMP is not set
238# CONFIG_INET_XFRM_TUNNEL is not set
239# CONFIG_INET_TUNNEL is not set
240CONFIG_INET_XFRM_MODE_TRANSPORT=y
241CONFIG_INET_XFRM_MODE_TUNNEL=y
242CONFIG_INET_XFRM_MODE_BEET=y
243CONFIG_INET_DIAG=y
244CONFIG_INET_TCP_DIAG=y
245# CONFIG_TCP_CONG_ADVANCED is not set
246CONFIG_TCP_CONG_CUBIC=y
247CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_TCP_MD5SIG is not set
249# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set
269# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set
271# CONFIG_VLAN_8021Q is not set
272# CONFIG_DECNET is not set
273# CONFIG_LLC2 is not set
274# CONFIG_IPX is not set
275# CONFIG_ATALK is not set
276# CONFIG_X25 is not set
277# CONFIG_LAPB is not set
278# CONFIG_ECONET is not set
279# CONFIG_WAN_ROUTER is not set
280
281#
282# QoS and/or fair queueing
283#
284# CONFIG_NET_SCHED is not set
285
286#
287# Network testing
288#
289# CONFIG_NET_PKTGEN is not set
290# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set
292# CONFIG_BT is not set
293# CONFIG_IEEE80211 is not set
294
295#
296# Device Drivers
297#
298
299#
300# Generic Driver Options
301#
302CONFIG_STANDALONE=y
303CONFIG_PREVENT_FIRMWARE_BUILD=y
304# CONFIG_FW_LOADER is not set
305# CONFIG_SYS_HYPERVISOR is not set
306
307#
308# Connector - unified userspace <-> kernelspace linker
309#
310# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set
318# CONFIG_MTD_PARTITIONS is not set
319
320#
321# User Modules And Translation Layers
322#
323CONFIG_MTD_CHAR=y
324# CONFIG_MTD_BLKDEVS is not set
325# CONFIG_MTD_BLOCK is not set
326# CONFIG_MTD_BLOCK_RO is not set
327# CONFIG_FTL is not set
328# CONFIG_NFTL is not set
329# CONFIG_INFTL is not set
330# CONFIG_RFD_FTL is not set
331# CONFIG_SSFDC is not set
332
333#
334# RAM/ROM/Flash chip drivers
335#
336CONFIG_MTD_CFI=y
337# CONFIG_MTD_JEDECPROBE is not set
338CONFIG_MTD_GEN_PROBE=y
339# CONFIG_MTD_CFI_ADV_OPTIONS is not set
340CONFIG_MTD_MAP_BANK_WIDTH_1=y
341CONFIG_MTD_MAP_BANK_WIDTH_2=y
342CONFIG_MTD_MAP_BANK_WIDTH_4=y
343# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
344# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
345# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
346CONFIG_MTD_CFI_I1=y
347CONFIG_MTD_CFI_I2=y
348# CONFIG_MTD_CFI_I4 is not set
349# CONFIG_MTD_CFI_I8 is not set
350# CONFIG_MTD_CFI_INTELEXT is not set
351CONFIG_MTD_CFI_AMDSTD=y
352# CONFIG_MTD_CFI_STAA is not set
353CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358
359#
360# Mapping drivers for chip access
361#
362# CONFIG_MTD_COMPLEX_MAPPINGS is not set
363CONFIG_MTD_PHYSMAP=y
364CONFIG_MTD_PHYSMAP_START=0xfe000000
365CONFIG_MTD_PHYSMAP_LEN=0x800000
366CONFIG_MTD_PHYSMAP_BANKWIDTH=2
367# CONFIG_MTD_PHYSMAP_OF is not set
368# CONFIG_MTD_PLATRAM is not set
369
370#
371# Self-contained MTD device drivers
372#
373# CONFIG_MTD_PMC551 is not set
374# CONFIG_MTD_DATAFLASH is not set
375# CONFIG_MTD_M25P80 is not set
376# CONFIG_MTD_SLRAM is not set
377# CONFIG_MTD_PHRAM is not set
378# CONFIG_MTD_MTDRAM is not set
379# CONFIG_MTD_BLOCK2MTD is not set
380
381#
382# Disk-On-Chip Device Drivers
383#
384# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set
393
394#
395# OneNAND Flash Device Drivers
396#
397# CONFIG_MTD_ONENAND is not set
398
399#
400# Parallel port support
401#
402# CONFIG_PARPORT is not set
403
404#
405# Plug and Play support
406#
407
408#
409# Block devices
410#
411# CONFIG_BLK_DEV_FD is not set
412# CONFIG_BLK_CPQ_DA is not set
413# CONFIG_BLK_CPQ_CISS_DA is not set
414# CONFIG_BLK_DEV_DAC960 is not set
415# CONFIG_BLK_DEV_UMEM is not set
416# CONFIG_BLK_DEV_COW_COMMON is not set
417CONFIG_BLK_DEV_LOOP=y
418# CONFIG_BLK_DEV_CRYPTOLOOP is not set
419# CONFIG_BLK_DEV_NBD is not set
420# CONFIG_BLK_DEV_SX8 is not set
421CONFIG_BLK_DEV_RAM=y
422CONFIG_BLK_DEV_RAM_COUNT=16
423CONFIG_BLK_DEV_RAM_SIZE=32768
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425CONFIG_BLK_DEV_INITRD=y
426# CONFIG_CDROM_PKTCDVD is not set
427# CONFIG_ATA_OVER_ETH is not set
428
429#
430# Misc devices
431#
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
434
435#
436# ATA/ATAPI/MFM/RLL support
437#
438# CONFIG_IDE is not set
439
440#
441# SCSI device support
442#
443# CONFIG_RAID_ATTRS is not set
444CONFIG_SCSI=y
445# CONFIG_SCSI_TGT is not set
446# CONFIG_SCSI_NETLINK is not set
447CONFIG_SCSI_PROC_FS=y
448
449#
450# SCSI support type (disk, tape, CD-ROM)
451#
452CONFIG_BLK_DEV_SD=y
453# CONFIG_CHR_DEV_ST is not set
454# CONFIG_CHR_DEV_OSST is not set
455# CONFIG_BLK_DEV_SR is not set
456CONFIG_CHR_DEV_SG=y
457# CONFIG_CHR_DEV_SCH is not set
458
459#
460# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
461#
462# CONFIG_SCSI_MULTI_LUN is not set
463# CONFIG_SCSI_CONSTANTS is not set
464# CONFIG_SCSI_LOGGING is not set
465# CONFIG_SCSI_SCAN_ASYNC is not set
466
467#
468# SCSI Transports
469#
470CONFIG_SCSI_SPI_ATTRS=y
471# CONFIG_SCSI_FC_ATTRS is not set
472# CONFIG_SCSI_ISCSI_ATTRS is not set
473# CONFIG_SCSI_SAS_ATTRS is not set
474# CONFIG_SCSI_SAS_LIBSAS is not set
475
476#
477# SCSI low-level drivers
478#
479# CONFIG_ISCSI_TCP is not set
480# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
481# CONFIG_SCSI_3W_9XXX is not set
482# CONFIG_SCSI_ACARD is not set
483# CONFIG_SCSI_AACRAID is not set
484# CONFIG_SCSI_AIC7XXX is not set
485# CONFIG_SCSI_AIC7XXX_OLD is not set
486# CONFIG_SCSI_AIC79XX is not set
487# CONFIG_SCSI_AIC94XX is not set
488# CONFIG_SCSI_DPT_I2O is not set
489# CONFIG_SCSI_ARCMSR is not set
490# CONFIG_MEGARAID_NEWGEN is not set
491# CONFIG_MEGARAID_LEGACY is not set
492# CONFIG_MEGARAID_SAS is not set
493# CONFIG_SCSI_HPTIOP is not set
494# CONFIG_SCSI_BUSLOGIC is not set
495# CONFIG_SCSI_DMX3191D is not set
496# CONFIG_SCSI_EATA is not set
497# CONFIG_SCSI_FUTURE_DOMAIN is not set
498# CONFIG_SCSI_GDTH is not set
499# CONFIG_SCSI_IPS is not set
500# CONFIG_SCSI_INITIO is not set
501# CONFIG_SCSI_INIA100 is not set
502# CONFIG_SCSI_STEX is not set
503# CONFIG_SCSI_SYM53C8XX_2 is not set
504# CONFIG_SCSI_QLOGIC_1280 is not set
505# CONFIG_SCSI_QLA_FC is not set
506# CONFIG_SCSI_QLA_ISCSI is not set
507# CONFIG_SCSI_LPFC is not set
508# CONFIG_SCSI_DC395x is not set
509# CONFIG_SCSI_DC390T is not set
510# CONFIG_SCSI_NSP32 is not set
511# CONFIG_SCSI_DEBUG is not set
512# CONFIG_SCSI_SRP is not set
513
514#
515# Serial ATA (prod) and Parallel ATA (experimental) drivers
516#
517# CONFIG_ATA is not set
518
519#
520# Multi-device support (RAID and LVM)
521#
522# CONFIG_MD is not set
523
524#
525# Fusion MPT device support
526#
527# CONFIG_FUSION is not set
528# CONFIG_FUSION_SPI is not set
529# CONFIG_FUSION_FC is not set
530# CONFIG_FUSION_SAS is not set
531
532#
533# IEEE 1394 (FireWire) support
534#
535# CONFIG_IEEE1394 is not set
536
537#
538# I2O device support
539#
540# CONFIG_I2O is not set
541
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547
548#
549# Network device support
550#
551CONFIG_NETDEVICES=y
552# CONFIG_DUMMY is not set
553# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y
566
567#
568# MII PHY device drivers
569#
570# CONFIG_MARVELL_PHY is not set
571# CONFIG_DAVICOM_PHY is not set
572# CONFIG_QSEMI_PHY is not set
573# CONFIG_LXT_PHY is not set
574CONFIG_CICADA_PHY=y
575# CONFIG_VITESSE_PHY is not set
576# CONFIG_SMSC_PHY is not set
577# CONFIG_BROADCOM_PHY is not set
578# CONFIG_FIXED_PHY is not set
579
580#
581# Ethernet (10 or 100Mbit)
582#
583# CONFIG_NET_ETHERNET is not set
584
585#
586# Ethernet (1000 Mbit)
587#
588# CONFIG_ACENIC is not set
589# CONFIG_DL2K is not set
590# CONFIG_E1000 is not set
591# CONFIG_NS83820 is not set
592# CONFIG_HAMACHI is not set
593# CONFIG_YELLOWFIN is not set
594# CONFIG_R8169 is not set
595# CONFIG_SIS190 is not set
596# CONFIG_SKGE is not set
597# CONFIG_SKY2 is not set
598# CONFIG_SK98LIN is not set
599# CONFIG_TIGON3 is not set
600# CONFIG_BNX2 is not set
601CONFIG_GIANFAR=y
602CONFIG_GFAR_NAPI=y
603# CONFIG_QLA3XXX is not set
604
605#
606# Ethernet (10000 Mbit)
607#
608# CONFIG_CHELSIO_T1 is not set
609# CONFIG_IXGB is not set
610# CONFIG_S2IO is not set
611# CONFIG_MYRI10GE is not set
612# CONFIG_NETXEN_NIC is not set
613
614#
615# Token Ring devices
616#
617# CONFIG_TR is not set
618
619#
620# Wireless LAN (non-hamradio)
621#
622# CONFIG_NET_RADIO is not set
623
624#
625# Wan interfaces
626#
627# CONFIG_WAN is not set
628# CONFIG_FDDI is not set
629# CONFIG_HIPPI is not set
630# CONFIG_PPP is not set
631# CONFIG_SLIP is not set
632# CONFIG_NET_FC is not set
633# CONFIG_SHAPER is not set
634# CONFIG_NETCONSOLE is not set
635# CONFIG_NETPOLL is not set
636# CONFIG_NET_POLL_CONTROLLER is not set
637
638#
639# ISDN subsystem
640#
641# CONFIG_ISDN is not set
642
643#
644# Telephony Support
645#
646# CONFIG_PHONE is not set
647
648#
649# Input device support
650#
651# CONFIG_INPUT is not set
652
653#
654# Hardware I/O ports
655#
656# CONFIG_SERIO is not set
657# CONFIG_GAMEPORT is not set
658
659#
660# Character devices
661#
662# CONFIG_VT is not set
663# CONFIG_SERIAL_NONSTANDARD is not set
664
665#
666# Serial drivers
667#
668CONFIG_SERIAL_8250=y
669CONFIG_SERIAL_8250_CONSOLE=y
670# CONFIG_SERIAL_8250_PCI is not set
671CONFIG_SERIAL_8250_NR_UARTS=4
672CONFIG_SERIAL_8250_RUNTIME_UARTS=4
673# CONFIG_SERIAL_8250_EXTENDED is not set
674
675#
676# Non-8250 serial port support
677#
678# CONFIG_SERIAL_UARTLITE is not set
679CONFIG_SERIAL_CORE=y
680CONFIG_SERIAL_CORE_CONSOLE=y
681# CONFIG_SERIAL_JSM is not set
682CONFIG_UNIX98_PTYS=y
683CONFIG_LEGACY_PTYS=y
684CONFIG_LEGACY_PTY_COUNT=256
685
686#
687# IPMI
688#
689# CONFIG_IPMI_HANDLER is not set
690
691#
692# Watchdog Cards
693#
694CONFIG_WATCHDOG=y
695# CONFIG_WATCHDOG_NOWAYOUT is not set
696
697#
698# Watchdog Device Drivers
699#
700# CONFIG_SOFT_WATCHDOG is not set
701CONFIG_83xx_WDT=y
702
703#
704# PCI-based Watchdog Cards
705#
706# CONFIG_PCIPCWATCHDOG is not set
707# CONFIG_WDTPCI is not set
708CONFIG_HW_RANDOM=y
709# CONFIG_NVRAM is not set
710# CONFIG_GEN_RTC is not set
711# CONFIG_DTLK is not set
712# CONFIG_R3964 is not set
713# CONFIG_APPLICOM is not set
714# CONFIG_AGP is not set
715# CONFIG_DRM is not set
716# CONFIG_RAW_DRIVER is not set
717
718#
719# TPM devices
720#
721# CONFIG_TCG_TPM is not set
722
723#
724# I2C support
725#
726CONFIG_I2C=y
727CONFIG_I2C_CHARDEV=y
728
729#
730# I2C Algorithms
731#
732# CONFIG_I2C_ALGOBIT is not set
733# CONFIG_I2C_ALGOPCF is not set
734# CONFIG_I2C_ALGOPCA is not set
735
736#
737# I2C Hardware Bus support
738#
739# CONFIG_I2C_ALI1535 is not set
740# CONFIG_I2C_ALI1563 is not set
741# CONFIG_I2C_ALI15X3 is not set
742# CONFIG_I2C_AMD756 is not set
743# CONFIG_I2C_AMD8111 is not set
744# CONFIG_I2C_I801 is not set
745# CONFIG_I2C_I810 is not set
746# CONFIG_I2C_PIIX4 is not set
747CONFIG_I2C_MPC=y
748# CONFIG_I2C_NFORCE2 is not set
749# CONFIG_I2C_OCORES is not set
750# CONFIG_I2C_PARPORT_LIGHT is not set
751# CONFIG_I2C_PROSAVAGE is not set
752# CONFIG_I2C_SAVAGE4 is not set
753# CONFIG_I2C_SIS5595 is not set
754# CONFIG_I2C_SIS630 is not set
755# CONFIG_I2C_SIS96X is not set
756# CONFIG_I2C_STUB is not set
757# CONFIG_I2C_VIA is not set
758# CONFIG_I2C_VIAPRO is not set
759# CONFIG_I2C_VOODOO3 is not set
760# CONFIG_I2C_PCA_ISA is not set
761
762#
763# Miscellaneous I2C Chip support
764#
765# CONFIG_SENSORS_DS1337 is not set
766# CONFIG_SENSORS_DS1374 is not set
767# CONFIG_SENSORS_EEPROM is not set
768CONFIG_SENSORS_PCF8574=y
769# CONFIG_SENSORS_PCA9539 is not set
770# CONFIG_SENSORS_PCF8591 is not set
771# CONFIG_SENSORS_M41T00 is not set
772# CONFIG_SENSORS_MAX6875 is not set
773# CONFIG_I2C_DEBUG_CORE is not set
774# CONFIG_I2C_DEBUG_ALGO is not set
775# CONFIG_I2C_DEBUG_BUS is not set
776# CONFIG_I2C_DEBUG_CHIP is not set
777
778#
779# SPI support
780#
781CONFIG_SPI=y
782CONFIG_SPI_MASTER=y
783
784#
785# SPI Master Controller Drivers
786#
787CONFIG_SPI_BITBANG=y
788CONFIG_SPI_MPC83xx=y
789
790#
791# SPI Protocol Masters
792#
793
794#
795# Dallas's 1-wire bus
796#
797# CONFIG_W1 is not set
798
799#
800# Hardware Monitoring support
801#
802# CONFIG_HWMON is not set
803# CONFIG_HWMON_VID is not set
804
805#
806# Multimedia devices
807#
808# CONFIG_VIDEO_DEV is not set
809
810#
811# Digital Video Broadcasting Devices
812#
813# CONFIG_DVB is not set
814
815#
816# Graphics support
817#
818# CONFIG_FIRMWARE_EDID is not set
819# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822
823#
824# Sound
825#
826# CONFIG_SOUND is not set
827
828#
829# USB support
830#
831CONFIG_USB_ARCH_HAS_HCD=y
832CONFIG_USB_ARCH_HAS_OHCI=y
833CONFIG_USB_ARCH_HAS_EHCI=y
834# CONFIG_USB is not set
835
836#
837# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
838#
839
840#
841# USB Gadget Support
842#
843# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set
849
850#
851# LED devices
852#
853# CONFIG_NEW_LEDS is not set
854
855#
856# LED drivers
857#
858
859#
860# LED Triggers
861#
862
863#
864# InfiniBand support
865#
866# CONFIG_INFINIBAND is not set
867
868#
869# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
870#
871
872#
873# Real Time Clock
874#
875CONFIG_RTC_LIB=y
876CONFIG_RTC_CLASS=y
877CONFIG_RTC_HCTOSYS=y
878CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
879# CONFIG_RTC_DEBUG is not set
880
881#
882# RTC interfaces
883#
884CONFIG_RTC_INTF_SYSFS=y
885CONFIG_RTC_INTF_PROC=y
886CONFIG_RTC_INTF_DEV=y
887CONFIG_RTC_INTF_DEV_UIE_EMUL=y
888
889#
890# RTC drivers
891#
892# CONFIG_RTC_DRV_X1205 is not set
893CONFIG_RTC_DRV_DS1307=y
894# CONFIG_RTC_DRV_DS1553 is not set
895# CONFIG_RTC_DRV_ISL1208 is not set
896# CONFIG_RTC_DRV_DS1672 is not set
897# CONFIG_RTC_DRV_DS1742 is not set
898# CONFIG_RTC_DRV_PCF8563 is not set
899# CONFIG_RTC_DRV_PCF8583 is not set
900# CONFIG_RTC_DRV_RS5C348 is not set
901# CONFIG_RTC_DRV_RS5C372 is not set
902# CONFIG_RTC_DRV_M48T86 is not set
903# CONFIG_RTC_DRV_TEST is not set
904# CONFIG_RTC_DRV_MAX6902 is not set
905# CONFIG_RTC_DRV_V3020 is not set
906
907#
908# DMA Engine support
909#
910CONFIG_DMA_ENGINE=y
911
912#
913# DMA Clients
914#
915CONFIG_NET_DMA=y
916
917#
918# DMA Devices
919#
920CONFIG_INTEL_IOATDMA=y
921
922#
923# Virtualization
924#
925
926#
927# File systems
928#
929CONFIG_EXT2_FS=y
930# CONFIG_EXT2_FS_XATTR is not set
931# CONFIG_EXT2_FS_XIP is not set
932CONFIG_EXT3_FS=y
933CONFIG_EXT3_FS_XATTR=y
934# CONFIG_EXT3_FS_POSIX_ACL is not set
935# CONFIG_EXT3_FS_SECURITY is not set
936# CONFIG_EXT4DEV_FS is not set
937CONFIG_JBD=y
938# CONFIG_JBD_DEBUG is not set
939CONFIG_FS_MBCACHE=y
940# CONFIG_REISERFS_FS is not set
941# CONFIG_JFS_FS is not set
942# CONFIG_FS_POSIX_ACL is not set
943# CONFIG_XFS_FS is not set
944# CONFIG_GFS2_FS is not set
945# CONFIG_OCFS2_FS is not set
946# CONFIG_MINIX_FS is not set
947# CONFIG_ROMFS_FS is not set
948CONFIG_INOTIFY=y
949CONFIG_INOTIFY_USER=y
950# CONFIG_QUOTA is not set
951CONFIG_DNOTIFY=y
952# CONFIG_AUTOFS_FS is not set
953# CONFIG_AUTOFS4_FS is not set
954# CONFIG_FUSE_FS is not set
955
956#
957# CD-ROM/DVD Filesystems
958#
959# CONFIG_ISO9660_FS is not set
960# CONFIG_UDF_FS is not set
961
962#
963# DOS/FAT/NT Filesystems
964#
965CONFIG_FAT_FS=y
966CONFIG_MSDOS_FS=y
967CONFIG_VFAT_FS=y
968CONFIG_FAT_DEFAULT_CODEPAGE=437
969CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
970# CONFIG_NTFS_FS is not set
971
972#
973# Pseudo filesystems
974#
975CONFIG_PROC_FS=y
976CONFIG_PROC_KCORE=y
977CONFIG_PROC_SYSCTL=y
978CONFIG_SYSFS=y
979CONFIG_TMPFS=y
980# CONFIG_TMPFS_POSIX_ACL is not set
981# CONFIG_HUGETLB_PAGE is not set
982CONFIG_RAMFS=y
983# CONFIG_CONFIGFS_FS is not set
984
985#
986# Miscellaneous filesystems
987#
988# CONFIG_ADFS_FS is not set
989# CONFIG_AFFS_FS is not set
990# CONFIG_HFS_FS is not set
991# CONFIG_HFSPLUS_FS is not set
992# CONFIG_BEFS_FS is not set
993# CONFIG_BFS_FS is not set
994# CONFIG_EFS_FS is not set
995# CONFIG_JFFS2_FS is not set
996# CONFIG_CRAMFS is not set
997# CONFIG_VXFS_FS is not set
998# CONFIG_HPFS_FS is not set
999# CONFIG_QNX4FS_FS is not set
1000# CONFIG_SYSV_FS is not set
1001# CONFIG_UFS_FS is not set
1002
1003#
1004# Network File Systems
1005#
1006CONFIG_NFS_FS=y
1007CONFIG_NFS_V3=y
1008# CONFIG_NFS_V3_ACL is not set
1009CONFIG_NFS_V4=y
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
1017CONFIG_SUNRPC_GSS=y
1018CONFIG_RPCSEC_GSS_KRB5=y
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# CONFIG_9P_FS is not set
1026
1027#
1028# Partition Types
1029#
1030CONFIG_PARTITION_ADVANCED=y
1031# CONFIG_ACORN_PARTITION is not set
1032# CONFIG_OSF_PARTITION is not set
1033# CONFIG_AMIGA_PARTITION is not set
1034# CONFIG_ATARI_PARTITION is not set
1035CONFIG_MAC_PARTITION=y
1036CONFIG_MSDOS_PARTITION=y
1037# CONFIG_BSD_DISKLABEL is not set
1038# CONFIG_MINIX_SUBPARTITION is not set
1039# CONFIG_SOLARIS_X86_PARTITION is not set
1040# CONFIG_UNIXWARE_DISKLABEL is not set
1041# CONFIG_LDM_PARTITION is not set
1042# CONFIG_SGI_PARTITION is not set
1043# CONFIG_ULTRIX_PARTITION is not set
1044# CONFIG_SUN_PARTITION is not set
1045# CONFIG_KARMA_PARTITION is not set
1046# CONFIG_EFI_PARTITION is not set
1047
1048#
1049# Native Language Support
1050#
1051CONFIG_NLS=y
1052CONFIG_NLS_DEFAULT="iso8859-1"
1053# CONFIG_NLS_CODEPAGE_437 is not set
1054# CONFIG_NLS_CODEPAGE_737 is not set
1055# CONFIG_NLS_CODEPAGE_775 is not set
1056# CONFIG_NLS_CODEPAGE_850 is not set
1057# CONFIG_NLS_CODEPAGE_852 is not set
1058# CONFIG_NLS_CODEPAGE_855 is not set
1059# CONFIG_NLS_CODEPAGE_857 is not set
1060# CONFIG_NLS_CODEPAGE_860 is not set
1061# CONFIG_NLS_CODEPAGE_861 is not set
1062# CONFIG_NLS_CODEPAGE_862 is not set
1063# CONFIG_NLS_CODEPAGE_863 is not set
1064# CONFIG_NLS_CODEPAGE_864 is not set
1065# CONFIG_NLS_CODEPAGE_865 is not set
1066# CONFIG_NLS_CODEPAGE_866 is not set
1067# CONFIG_NLS_CODEPAGE_869 is not set
1068# CONFIG_NLS_CODEPAGE_936 is not set
1069# CONFIG_NLS_CODEPAGE_950 is not set
1070# CONFIG_NLS_CODEPAGE_932 is not set
1071# CONFIG_NLS_CODEPAGE_949 is not set
1072# CONFIG_NLS_CODEPAGE_874 is not set
1073# CONFIG_NLS_ISO8859_8 is not set
1074# CONFIG_NLS_CODEPAGE_1250 is not set
1075# CONFIG_NLS_CODEPAGE_1251 is not set
1076# CONFIG_NLS_ASCII is not set
1077# CONFIG_NLS_ISO8859_1 is not set
1078# CONFIG_NLS_ISO8859_2 is not set
1079# CONFIG_NLS_ISO8859_3 is not set
1080# CONFIG_NLS_ISO8859_4 is not set
1081# CONFIG_NLS_ISO8859_5 is not set
1082# CONFIG_NLS_ISO8859_6 is not set
1083# CONFIG_NLS_ISO8859_7 is not set
1084# CONFIG_NLS_ISO8859_9 is not set
1085# CONFIG_NLS_ISO8859_13 is not set
1086# CONFIG_NLS_ISO8859_14 is not set
1087# CONFIG_NLS_ISO8859_15 is not set
1088# CONFIG_NLS_KOI8_R is not set
1089# CONFIG_NLS_KOI8_U is not set
1090# CONFIG_NLS_UTF8 is not set
1091
1092#
1093# Distributed Lock Manager
1094#
1095# CONFIG_DLM is not set
1096
1097#
1098# Library routines
1099#
1100CONFIG_BITREVERSE=y
1101# CONFIG_CRC_CCITT is not set
1102# CONFIG_CRC16 is not set
1103CONFIG_CRC32=y
1104# CONFIG_LIBCRC32C is not set
1105CONFIG_PLIST=y
1106CONFIG_IOMAP_COPY=y
1107
1108#
1109# Instrumentation Support
1110#
1111# CONFIG_PROFILING is not set
1112
1113#
1114# Kernel hacking
1115#
1116# CONFIG_PRINTK_TIME is not set
1117CONFIG_ENABLE_MUST_CHECK=y
1118# CONFIG_MAGIC_SYSRQ is not set
1119# CONFIG_UNUSED_SYMBOLS is not set
1120# CONFIG_DEBUG_FS is not set
1121# CONFIG_HEADERS_CHECK is not set
1122# CONFIG_DEBUG_KERNEL is not set
1123CONFIG_LOG_BUF_SHIFT=14
1124# CONFIG_DEBUG_BUGVERBOSE is not set
1125# CONFIG_BOOTX_TEXT is not set
1126# CONFIG_SERIAL_TEXT_DEBUG is not set
1127# CONFIG_PPC_EARLY_DEBUG is not set
1128
1129#
1130# Security options
1131#
1132# CONFIG_KEYS is not set
1133# CONFIG_SECURITY is not set
1134
1135#
1136# Cryptographic options
1137#
1138CONFIG_CRYPTO=y
1139CONFIG_CRYPTO_ALGAPI=y
1140CONFIG_CRYPTO_BLKCIPHER=y
1141CONFIG_CRYPTO_MANAGER=y
1142# CONFIG_CRYPTO_HMAC is not set
1143# CONFIG_CRYPTO_XCBC is not set
1144# CONFIG_CRYPTO_NULL is not set
1145# CONFIG_CRYPTO_MD4 is not set
1146CONFIG_CRYPTO_MD5=y
1147# CONFIG_CRYPTO_SHA1 is not set
1148# CONFIG_CRYPTO_SHA256 is not set
1149# CONFIG_CRYPTO_SHA512 is not set
1150# CONFIG_CRYPTO_WP512 is not set
1151# CONFIG_CRYPTO_TGR192 is not set
1152# CONFIG_CRYPTO_GF128MUL is not set
1153# CONFIG_CRYPTO_ECB is not set
1154CONFIG_CRYPTO_CBC=y
1155# CONFIG_CRYPTO_LRW is not set
1156CONFIG_CRYPTO_DES=y
1157# CONFIG_CRYPTO_BLOWFISH is not set
1158# CONFIG_CRYPTO_TWOFISH is not set
1159# CONFIG_CRYPTO_SERPENT is not set
1160# CONFIG_CRYPTO_AES is not set
1161# CONFIG_CRYPTO_CAST5 is not set
1162# CONFIG_CRYPTO_CAST6 is not set
1163# CONFIG_CRYPTO_TEA is not set
1164# CONFIG_CRYPTO_ARC4 is not set
1165# CONFIG_CRYPTO_KHAZAD is not set
1166# CONFIG_CRYPTO_ANUBIS is not set
1167# CONFIG_CRYPTO_DEFLATE is not set
1168# CONFIG_CRYPTO_MICHAEL_MIC is not set
1169# CONFIG_CRYPTO_CRC32C is not set
1170# CONFIG_CRYPTO_TEST is not set
1171
1172#
1173# Hardware crypto devices
1174#
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index c24db58be457..2e3f8efb6ab1 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_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.20-rc5 3# Linux kernel version: 2.6.20
4# Mon Jan 22 22:24:10 2007 4# Thu Feb 8 01:00:48 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34CONFIG_PPC_83xx=y 34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_83xx=y 42CONFIG_83xx=y
@@ -128,8 +128,9 @@ CONFIG_PPC_GEN550=y
128# 128#
129# Platform support 129# Platform support
130# 130#
131# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 132# CONFIG_MPC832x_MDS is not set
132CONFIG_MPC834x_SYS=y 133CONFIG_MPC834x_MDS=y
133# CONFIG_MPC834x_ITX is not set 134# CONFIG_MPC834x_ITX is not set
134# CONFIG_MPC8360E_PB is not set 135# CONFIG_MPC8360E_PB is not set
135CONFIG_MPC834x=y 136CONFIG_MPC834x=y
@@ -149,7 +150,6 @@ CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT is not set 150# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y 151CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set 152# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y 154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y 155CONFIG_ARCH_POPULATES_NODE_MAP=y
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
new file mode 100644
index 000000000000..8eb475cd0df0
--- /dev/null
+++ b/arch/powerpc/configs/mpc836x_mds_defconfig
@@ -0,0 +1,1099 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Sat Feb 17 10:09:26 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
67# CONFIG_POSIX_MQUEUE is not set
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set
75CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y
78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
80# CONFIG_KALLSYMS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87# CONFIG_EPOLL is not set
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102# CONFIG_MODVERSIONS is not set
103# CONFIG_MODULE_SRCVERSION_ALL is not set
104# CONFIG_KMOD is not set
105
106#
107# Block layer
108#
109CONFIG_BLOCK=y
110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113
114#
115# IO Schedulers
116#
117CONFIG_IOSCHED_NOOP=y
118CONFIG_IOSCHED_AS=y
119CONFIG_IOSCHED_DEADLINE=y
120CONFIG_IOSCHED_CFQ=y
121CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_DEADLINE is not set
123# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory"
126CONFIG_QUICC_ENGINE=y
127CONFIG_PPC_GEN550=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129
130#
131# Platform support
132#
133# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set
135# CONFIG_MPC834x_MDS is not set
136# CONFIG_MPC834x_ITX is not set
137CONFIG_MPC836x_MDS=y
138CONFIG_PPC_MPC836x=y
139# CONFIG_MPIC is not set
140
141#
142# Kernel options
143#
144# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set
146CONFIG_HZ_250=y
147# CONFIG_HZ_300 is not set
148# CONFIG_HZ_1000 is not set
149CONFIG_HZ=250
150CONFIG_PREEMPT_NONE=y
151# CONFIG_PREEMPT_VOLUNTARY is not set
152# CONFIG_PREEMPT is not set
153CONFIG_BINFMT_ELF=y
154# CONFIG_BINFMT_MISC is not set
155CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
156CONFIG_ARCH_FLATMEM_ENABLE=y
157CONFIG_ARCH_POPULATES_NODE_MAP=y
158CONFIG_SELECT_MEMORY_MODEL=y
159CONFIG_FLATMEM_MANUAL=y
160# CONFIG_DISCONTIGMEM_MANUAL is not set
161# CONFIG_SPARSEMEM_MANUAL is not set
162CONFIG_FLATMEM=y
163CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ZONE_DMA_FLAG=1
168CONFIG_PROC_DEVICETREE=y
169# CONFIG_CMDLINE_BOOL is not set
170# CONFIG_PM is not set
171CONFIG_SECCOMP=y
172CONFIG_ISA_DMA_API=y
173
174#
175# Bus options
176#
177CONFIG_ZONE_DMA=y
178CONFIG_GENERIC_ISA_DMA=y
179# CONFIG_MPIC_WEIRD is not set
180# CONFIG_PPC_I8259 is not set
181CONFIG_PPC_INDIRECT_PCI=y
182CONFIG_FSL_SOC=y
183CONFIG_PCI=y
184CONFIG_PCI_DOMAINS=y
185# CONFIG_PCIEPORTBUS is not set
186
187#
188# PCCARD (PCMCIA/CardBus) support
189#
190# CONFIG_PCCARD is not set
191
192#
193# PCI Hotplug Support
194#
195# CONFIG_HOTPLUG_PCI is not set
196
197#
198# Advanced setup
199#
200# CONFIG_ADVANCED_OPTIONS is not set
201
202#
203# Default settings for advanced configuration options are used
204#
205CONFIG_HIGHMEM_START=0xfe000000
206CONFIG_LOWMEM_SIZE=0x30000000
207CONFIG_KERNEL_START=0xc0000000
208CONFIG_TASK_SIZE=0x80000000
209CONFIG_BOOT_LOAD=0x00800000
210
211#
212# Networking
213#
214CONFIG_NET=y
215
216#
217# Networking options
218#
219# CONFIG_NETDEBUG is not set
220CONFIG_PACKET=y
221# CONFIG_PACKET_MMAP is not set
222CONFIG_UNIX=y
223CONFIG_XFRM=y
224# CONFIG_XFRM_USER is not set
225# CONFIG_XFRM_SUB_POLICY is not set
226# CONFIG_XFRM_MIGRATE is not set
227# CONFIG_NET_KEY is not set
228CONFIG_INET=y
229CONFIG_IP_MULTICAST=y
230# CONFIG_IP_ADVANCED_ROUTER is not set
231CONFIG_IP_FIB_HASH=y
232CONFIG_IP_PNP=y
233CONFIG_IP_PNP_DHCP=y
234CONFIG_IP_PNP_BOOTP=y
235# CONFIG_IP_PNP_RARP is not set
236# CONFIG_NET_IPIP is not set
237# CONFIG_NET_IPGRE is not set
238# CONFIG_IP_MROUTE is not set
239# CONFIG_ARPD is not set
240CONFIG_SYN_COOKIES=y
241# CONFIG_INET_AH is not set
242# CONFIG_INET_ESP is not set
243# CONFIG_INET_IPCOMP is not set
244# CONFIG_INET_XFRM_TUNNEL is not set
245# CONFIG_INET_TUNNEL is not set
246CONFIG_INET_XFRM_MODE_TRANSPORT=y
247CONFIG_INET_XFRM_MODE_TUNNEL=y
248CONFIG_INET_XFRM_MODE_BEET=y
249CONFIG_INET_DIAG=y
250CONFIG_INET_TCP_DIAG=y
251# CONFIG_TCP_CONG_ADVANCED is not set
252CONFIG_TCP_CONG_CUBIC=y
253CONFIG_DEFAULT_TCP_CONG="cubic"
254# CONFIG_TCP_MD5SIG is not set
255# CONFIG_IPV6 is not set
256# CONFIG_INET6_XFRM_TUNNEL is not set
257# CONFIG_INET6_TUNNEL is not set
258# CONFIG_NETWORK_SECMARK is not set
259# CONFIG_NETFILTER is not set
260
261#
262# DCCP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_DCCP is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_SCTP is not set
270
271#
272# TIPC Configuration (EXPERIMENTAL)
273#
274# CONFIG_TIPC is not set
275# CONFIG_ATM is not set
276# CONFIG_BRIDGE is not set
277# CONFIG_VLAN_8021Q is not set
278# CONFIG_DECNET is not set
279# CONFIG_LLC2 is not set
280# CONFIG_IPX is not set
281# CONFIG_ATALK is not set
282# CONFIG_X25 is not set
283# CONFIG_LAPB is not set
284# CONFIG_ECONET is not set
285# CONFIG_WAN_ROUTER is not set
286
287#
288# QoS and/or fair queueing
289#
290# CONFIG_NET_SCHED is not set
291
292#
293# Network testing
294#
295# CONFIG_NET_PKTGEN is not set
296# CONFIG_HAMRADIO is not set
297# CONFIG_IRDA is not set
298# CONFIG_BT is not set
299# CONFIG_IEEE80211 is not set
300
301#
302# Device Drivers
303#
304
305#
306# Generic Driver Options
307#
308CONFIG_STANDALONE=y
309CONFIG_PREVENT_FIRMWARE_BUILD=y
310# CONFIG_FW_LOADER is not set
311# CONFIG_SYS_HYPERVISOR is not set
312
313#
314# Connector - unified userspace <-> kernelspace linker
315#
316# CONFIG_CONNECTOR is not set
317
318#
319# Memory Technology Devices (MTD)
320#
321# CONFIG_MTD is not set
322
323#
324# Parallel port support
325#
326# CONFIG_PARPORT is not set
327
328#
329# Plug and Play support
330#
331
332#
333# Block devices
334#
335# CONFIG_BLK_DEV_FD is not set
336# CONFIG_BLK_CPQ_DA is not set
337# CONFIG_BLK_CPQ_CISS_DA is not set
338# CONFIG_BLK_DEV_DAC960 is not set
339# CONFIG_BLK_DEV_UMEM is not set
340# CONFIG_BLK_DEV_COW_COMMON is not set
341CONFIG_BLK_DEV_LOOP=y
342# CONFIG_BLK_DEV_CRYPTOLOOP is not set
343# CONFIG_BLK_DEV_NBD is not set
344# CONFIG_BLK_DEV_SX8 is not set
345CONFIG_BLK_DEV_RAM=y
346CONFIG_BLK_DEV_RAM_COUNT=16
347CONFIG_BLK_DEV_RAM_SIZE=32768
348CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
349CONFIG_BLK_DEV_INITRD=y
350# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set
352
353#
354# Misc devices
355#
356# CONFIG_SGI_IOC4 is not set
357# CONFIG_TIFM_CORE is not set
358
359#
360# ATA/ATAPI/MFM/RLL support
361#
362# CONFIG_IDE is not set
363
364#
365# SCSI device support
366#
367# CONFIG_RAID_ATTRS is not set
368CONFIG_SCSI=y
369# CONFIG_SCSI_TGT is not set
370# CONFIG_SCSI_NETLINK is not set
371CONFIG_SCSI_PROC_FS=y
372
373#
374# SCSI support type (disk, tape, CD-ROM)
375#
376# CONFIG_BLK_DEV_SD is not set
377# CONFIG_CHR_DEV_ST is not set
378# CONFIG_CHR_DEV_OSST is not set
379# CONFIG_BLK_DEV_SR is not set
380# CONFIG_CHR_DEV_SG is not set
381# CONFIG_CHR_DEV_SCH is not set
382
383#
384# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
385#
386# CONFIG_SCSI_MULTI_LUN is not set
387# CONFIG_SCSI_CONSTANTS is not set
388# CONFIG_SCSI_LOGGING is not set
389# CONFIG_SCSI_SCAN_ASYNC is not set
390
391#
392# SCSI Transports
393#
394# CONFIG_SCSI_SPI_ATTRS is not set
395# CONFIG_SCSI_FC_ATTRS is not set
396# CONFIG_SCSI_ISCSI_ATTRS is not set
397# CONFIG_SCSI_SAS_ATTRS is not set
398# CONFIG_SCSI_SAS_LIBSAS is not set
399
400#
401# SCSI low-level drivers
402#
403# CONFIG_ISCSI_TCP is not set
404# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
405# CONFIG_SCSI_3W_9XXX is not set
406# CONFIG_SCSI_ACARD is not set
407# CONFIG_SCSI_AACRAID is not set
408# CONFIG_SCSI_AIC7XXX is not set
409# CONFIG_SCSI_AIC7XXX_OLD is not set
410# CONFIG_SCSI_AIC79XX is not set
411# CONFIG_SCSI_AIC94XX is not set
412# CONFIG_SCSI_DPT_I2O is not set
413# CONFIG_SCSI_ARCMSR is not set
414# CONFIG_MEGARAID_NEWGEN is not set
415# CONFIG_MEGARAID_LEGACY is not set
416# CONFIG_MEGARAID_SAS is not set
417# CONFIG_SCSI_HPTIOP is not set
418# CONFIG_SCSI_BUSLOGIC is not set
419# CONFIG_SCSI_DMX3191D is not set
420# CONFIG_SCSI_EATA is not set
421# CONFIG_SCSI_FUTURE_DOMAIN is not set
422# CONFIG_SCSI_GDTH is not set
423# CONFIG_SCSI_IPS is not set
424# CONFIG_SCSI_INITIO is not set
425# CONFIG_SCSI_INIA100 is not set
426# CONFIG_SCSI_STEX is not set
427# CONFIG_SCSI_SYM53C8XX_2 is not set
428# CONFIG_SCSI_QLOGIC_1280 is not set
429# CONFIG_SCSI_QLA_FC is not set
430# CONFIG_SCSI_QLA_ISCSI is not set
431# CONFIG_SCSI_LPFC is not set
432# CONFIG_SCSI_DC395x is not set
433# CONFIG_SCSI_DC390T is not set
434# CONFIG_SCSI_NSP32 is not set
435# CONFIG_SCSI_DEBUG is not set
436# CONFIG_SCSI_SRP is not set
437
438#
439# Serial ATA (prod) and Parallel ATA (experimental) drivers
440#
441# CONFIG_ATA is not set
442
443#
444# Multi-device support (RAID and LVM)
445#
446# CONFIG_MD is not set
447
448#
449# Fusion MPT device support
450#
451# CONFIG_FUSION is not set
452# CONFIG_FUSION_SPI is not set
453# CONFIG_FUSION_FC is not set
454# CONFIG_FUSION_SAS is not set
455
456#
457# IEEE 1394 (FireWire) support
458#
459# CONFIG_IEEE1394 is not set
460
461#
462# I2O device support
463#
464# CONFIG_I2O is not set
465
466#
467# Macintosh device drivers
468#
469# CONFIG_MAC_EMUMOUSEBTN is not set
470# CONFIG_WINDFARM is not set
471
472#
473# Network device support
474#
475CONFIG_NETDEVICES=y
476# CONFIG_DUMMY is not set
477# CONFIG_BONDING is not set
478# CONFIG_EQUALIZER is not set
479# CONFIG_TUN is not set
480
481#
482# ARCnet devices
483#
484# CONFIG_ARCNET is not set
485
486#
487# PHY device support
488#
489# CONFIG_PHYLIB is not set
490
491#
492# Ethernet (10 or 100Mbit)
493#
494CONFIG_NET_ETHERNET=y
495CONFIG_MII=y
496# CONFIG_HAPPYMEAL is not set
497# CONFIG_SUNGEM is not set
498# CONFIG_CASSINI is not set
499# CONFIG_NET_VENDOR_3COM is not set
500
501#
502# Tulip family network device support
503#
504# CONFIG_NET_TULIP is not set
505# CONFIG_HP100 is not set
506# CONFIG_NET_PCI is not set
507
508#
509# Ethernet (1000 Mbit)
510#
511# CONFIG_ACENIC is not set
512# CONFIG_DL2K is not set
513# CONFIG_E1000 is not set
514# CONFIG_NS83820 is not set
515# CONFIG_HAMACHI is not set
516# CONFIG_YELLOWFIN is not set
517# CONFIG_R8169 is not set
518# CONFIG_SIS190 is not set
519# CONFIG_SKGE is not set
520# CONFIG_SKY2 is not set
521# CONFIG_SK98LIN is not set
522# CONFIG_TIGON3 is not set
523# CONFIG_BNX2 is not set
524# CONFIG_GIANFAR is not set
525CONFIG_UCC_GETH=y
526# CONFIG_UGETH_NAPI is not set
527# CONFIG_UGETH_MAGIC_PACKET is not set
528# CONFIG_UGETH_FILTERING is not set
529# CONFIG_UGETH_TX_ON_DEMOND is not set
530# CONFIG_QLA3XXX is not set
531
532#
533# Ethernet (10000 Mbit)
534#
535# CONFIG_CHELSIO_T1 is not set
536# CONFIG_CHELSIO_T3 is not set
537# CONFIG_IXGB is not set
538# CONFIG_S2IO is not set
539# CONFIG_MYRI10GE is not set
540# CONFIG_NETXEN_NIC is not set
541
542#
543# Token Ring devices
544#
545# CONFIG_TR is not set
546
547#
548# Wireless LAN (non-hamradio)
549#
550# CONFIG_NET_RADIO is not set
551
552#
553# Wan interfaces
554#
555# CONFIG_WAN is not set
556# CONFIG_FDDI is not set
557# CONFIG_HIPPI is not set
558# CONFIG_PPP is not set
559# CONFIG_SLIP is not set
560# CONFIG_NET_FC is not set
561# CONFIG_SHAPER is not set
562# CONFIG_NETCONSOLE is not set
563# CONFIG_NETPOLL is not set
564# CONFIG_NET_POLL_CONTROLLER is not set
565
566#
567# ISDN subsystem
568#
569# CONFIG_ISDN is not set
570
571#
572# Telephony Support
573#
574# CONFIG_PHONE is not set
575
576#
577# Input device support
578#
579CONFIG_INPUT=y
580# CONFIG_INPUT_FF_MEMLESS is not set
581
582#
583# Userland interfaces
584#
585# CONFIG_INPUT_MOUSEDEV is not set
586# CONFIG_INPUT_JOYDEV is not set
587# CONFIG_INPUT_TSDEV is not set
588# CONFIG_INPUT_EVDEV is not set
589# CONFIG_INPUT_EVBUG is not set
590
591#
592# Input Device Drivers
593#
594# CONFIG_INPUT_KEYBOARD is not set
595# CONFIG_INPUT_MOUSE is not set
596# CONFIG_INPUT_JOYSTICK is not set
597# CONFIG_INPUT_TOUCHSCREEN is not set
598# CONFIG_INPUT_MISC is not set
599
600#
601# Hardware I/O ports
602#
603# CONFIG_SERIO is not set
604# CONFIG_GAMEPORT is not set
605
606#
607# Character devices
608#
609# CONFIG_VT is not set
610# CONFIG_SERIAL_NONSTANDARD is not set
611
612#
613# Serial drivers
614#
615CONFIG_SERIAL_8250=y
616CONFIG_SERIAL_8250_CONSOLE=y
617CONFIG_SERIAL_8250_PCI=y
618CONFIG_SERIAL_8250_NR_UARTS=4
619CONFIG_SERIAL_8250_RUNTIME_UARTS=4
620# CONFIG_SERIAL_8250_EXTENDED is not set
621
622#
623# Non-8250 serial port support
624#
625# CONFIG_SERIAL_UARTLITE is not set
626CONFIG_SERIAL_CORE=y
627CONFIG_SERIAL_CORE_CONSOLE=y
628# CONFIG_SERIAL_JSM is not set
629# CONFIG_SERIAL_OF_PLATFORM is not set
630CONFIG_UNIX98_PTYS=y
631CONFIG_LEGACY_PTYS=y
632CONFIG_LEGACY_PTY_COUNT=256
633
634#
635# IPMI
636#
637# CONFIG_IPMI_HANDLER is not set
638
639#
640# Watchdog Cards
641#
642CONFIG_WATCHDOG=y
643# CONFIG_WATCHDOG_NOWAYOUT is not set
644
645#
646# Watchdog Device Drivers
647#
648# CONFIG_SOFT_WATCHDOG is not set
649CONFIG_83xx_WDT=y
650
651#
652# PCI-based Watchdog Cards
653#
654# CONFIG_PCIPCWATCHDOG is not set
655# CONFIG_WDTPCI is not set
656CONFIG_HW_RANDOM=y
657# CONFIG_NVRAM is not set
658CONFIG_GEN_RTC=y
659# CONFIG_GEN_RTC_X is not set
660# CONFIG_DTLK is not set
661# CONFIG_R3964 is not set
662# CONFIG_APPLICOM is not set
663# CONFIG_AGP is not set
664# CONFIG_DRM is not set
665# CONFIG_RAW_DRIVER is not set
666
667#
668# TPM devices
669#
670# CONFIG_TCG_TPM is not set
671
672#
673# I2C support
674#
675CONFIG_I2C=y
676CONFIG_I2C_CHARDEV=y
677
678#
679# I2C Algorithms
680#
681# CONFIG_I2C_ALGOBIT is not set
682# CONFIG_I2C_ALGOPCF is not set
683# CONFIG_I2C_ALGOPCA is not set
684
685#
686# I2C Hardware Bus support
687#
688# CONFIG_I2C_ALI1535 is not set
689# CONFIG_I2C_ALI1563 is not set
690# CONFIG_I2C_ALI15X3 is not set
691# CONFIG_I2C_AMD756 is not set
692# CONFIG_I2C_AMD8111 is not set
693# CONFIG_I2C_I801 is not set
694# CONFIG_I2C_I810 is not set
695# CONFIG_I2C_PIIX4 is not set
696CONFIG_I2C_MPC=y
697# CONFIG_I2C_NFORCE2 is not set
698# CONFIG_I2C_OCORES is not set
699# CONFIG_I2C_PARPORT_LIGHT is not set
700# CONFIG_I2C_PASEMI is not set
701# CONFIG_I2C_PROSAVAGE is not set
702# CONFIG_I2C_SAVAGE4 is not set
703# CONFIG_I2C_SIS5595 is not set
704# CONFIG_I2C_SIS630 is not set
705# CONFIG_I2C_SIS96X is not set
706# CONFIG_I2C_STUB is not set
707# CONFIG_I2C_VIA is not set
708# CONFIG_I2C_VIAPRO is not set
709# CONFIG_I2C_VOODOO3 is not set
710# CONFIG_I2C_PCA_ISA is not set
711
712#
713# Miscellaneous I2C Chip support
714#
715# CONFIG_SENSORS_DS1337 is not set
716# CONFIG_SENSORS_DS1374 is not set
717# CONFIG_SENSORS_EEPROM is not set
718# CONFIG_SENSORS_PCF8574 is not set
719# CONFIG_SENSORS_PCA9539 is not set
720# CONFIG_SENSORS_PCF8591 is not set
721# CONFIG_SENSORS_M41T00 is not set
722# CONFIG_SENSORS_MAX6875 is not set
723# CONFIG_I2C_DEBUG_CORE is not set
724# CONFIG_I2C_DEBUG_ALGO is not set
725# CONFIG_I2C_DEBUG_BUS is not set
726# CONFIG_I2C_DEBUG_CHIP is not set
727
728#
729# SPI support
730#
731# CONFIG_SPI is not set
732# CONFIG_SPI_MASTER is not set
733
734#
735# Dallas's 1-wire bus
736#
737# CONFIG_W1 is not set
738
739#
740# Hardware Monitoring support
741#
742CONFIG_HWMON=y
743# CONFIG_HWMON_VID is not set
744# CONFIG_SENSORS_ABITUGURU is not set
745# CONFIG_SENSORS_ADM1021 is not set
746# CONFIG_SENSORS_ADM1025 is not set
747# CONFIG_SENSORS_ADM1026 is not set
748# CONFIG_SENSORS_ADM1031 is not set
749# CONFIG_SENSORS_ADM9240 is not set
750# CONFIG_SENSORS_ASB100 is not set
751# CONFIG_SENSORS_ATXP1 is not set
752# CONFIG_SENSORS_DS1621 is not set
753# CONFIG_SENSORS_F71805F is not set
754# CONFIG_SENSORS_FSCHER is not set
755# CONFIG_SENSORS_FSCPOS is not set
756# CONFIG_SENSORS_GL518SM is not set
757# CONFIG_SENSORS_GL520SM is not set
758# CONFIG_SENSORS_IT87 is not set
759# CONFIG_SENSORS_LM63 is not set
760# CONFIG_SENSORS_LM75 is not set
761# CONFIG_SENSORS_LM77 is not set
762# CONFIG_SENSORS_LM78 is not set
763# CONFIG_SENSORS_LM80 is not set
764# CONFIG_SENSORS_LM83 is not set
765# CONFIG_SENSORS_LM85 is not set
766# CONFIG_SENSORS_LM87 is not set
767# CONFIG_SENSORS_LM90 is not set
768# CONFIG_SENSORS_LM92 is not set
769# CONFIG_SENSORS_MAX1619 is not set
770# CONFIG_SENSORS_PC87360 is not set
771# CONFIG_SENSORS_PC87427 is not set
772# CONFIG_SENSORS_SIS5595 is not set
773# CONFIG_SENSORS_SMSC47M1 is not set
774# CONFIG_SENSORS_SMSC47M192 is not set
775# CONFIG_SENSORS_SMSC47B397 is not set
776# CONFIG_SENSORS_VIA686A is not set
777# CONFIG_SENSORS_VT1211 is not set
778# CONFIG_SENSORS_VT8231 is not set
779# CONFIG_SENSORS_W83781D is not set
780# CONFIG_SENSORS_W83791D is not set
781# CONFIG_SENSORS_W83792D is not set
782# CONFIG_SENSORS_W83793 is not set
783# CONFIG_SENSORS_W83L785TS is not set
784# CONFIG_SENSORS_W83627HF is not set
785# CONFIG_SENSORS_W83627EHF is not set
786# CONFIG_HWMON_DEBUG_CHIP is not set
787
788#
789# Multimedia devices
790#
791# CONFIG_VIDEO_DEV is not set
792
793#
794# Digital Video Broadcasting Devices
795#
796# CONFIG_DVB is not set
797
798#
799# Graphics support
800#
801CONFIG_FIRMWARE_EDID=y
802# CONFIG_FB is not set
803# CONFIG_FB_IBM_GXT4500 is not set
804# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
805
806#
807# Sound
808#
809# CONFIG_SOUND is not set
810
811#
812# HID Devices
813#
814CONFIG_HID=y
815# CONFIG_HID_DEBUG is not set
816
817#
818# USB support
819#
820CONFIG_USB_ARCH_HAS_HCD=y
821CONFIG_USB_ARCH_HAS_OHCI=y
822CONFIG_USB_ARCH_HAS_EHCI=y
823# CONFIG_USB is not set
824
825#
826# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
827#
828
829#
830# USB Gadget Support
831#
832# CONFIG_USB_GADGET is not set
833
834#
835# MMC/SD Card support
836#
837# CONFIG_MMC is not set
838
839#
840# LED devices
841#
842# CONFIG_NEW_LEDS is not set
843
844#
845# LED drivers
846#
847
848#
849# LED Triggers
850#
851
852#
853# InfiniBand support
854#
855# CONFIG_INFINIBAND is not set
856
857#
858# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
859#
860
861#
862# Real Time Clock
863#
864# CONFIG_RTC_CLASS is not set
865
866#
867# DMA Engine support
868#
869# CONFIG_DMA_ENGINE is not set
870
871#
872# DMA Clients
873#
874
875#
876# DMA Devices
877#
878
879#
880# Auxiliary Display support
881#
882
883#
884# Virtualization
885#
886
887#
888# File systems
889#
890CONFIG_EXT2_FS=y
891# CONFIG_EXT2_FS_XATTR is not set
892# CONFIG_EXT2_FS_XIP is not set
893CONFIG_EXT3_FS=y
894CONFIG_EXT3_FS_XATTR=y
895# CONFIG_EXT3_FS_POSIX_ACL is not set
896# CONFIG_EXT3_FS_SECURITY is not set
897# CONFIG_EXT4DEV_FS is not set
898CONFIG_JBD=y
899# CONFIG_JBD_DEBUG is not set
900CONFIG_FS_MBCACHE=y
901# CONFIG_REISERFS_FS is not set
902# CONFIG_JFS_FS is not set
903# CONFIG_FS_POSIX_ACL is not set
904# CONFIG_XFS_FS is not set
905# CONFIG_GFS2_FS is not set
906# CONFIG_OCFS2_FS is not set
907# CONFIG_MINIX_FS is not set
908# CONFIG_ROMFS_FS is not set
909CONFIG_INOTIFY=y
910CONFIG_INOTIFY_USER=y
911# CONFIG_QUOTA is not set
912CONFIG_DNOTIFY=y
913# CONFIG_AUTOFS_FS is not set
914# CONFIG_AUTOFS4_FS is not set
915# CONFIG_FUSE_FS is not set
916
917#
918# CD-ROM/DVD Filesystems
919#
920# CONFIG_ISO9660_FS is not set
921# CONFIG_UDF_FS is not set
922
923#
924# DOS/FAT/NT Filesystems
925#
926# CONFIG_MSDOS_FS is not set
927# CONFIG_VFAT_FS is not set
928# CONFIG_NTFS_FS is not set
929
930#
931# Pseudo filesystems
932#
933CONFIG_PROC_FS=y
934CONFIG_PROC_KCORE=y
935CONFIG_PROC_SYSCTL=y
936CONFIG_SYSFS=y
937CONFIG_TMPFS=y
938# CONFIG_TMPFS_POSIX_ACL is not set
939# CONFIG_HUGETLB_PAGE is not set
940CONFIG_RAMFS=y
941# CONFIG_CONFIGFS_FS is not set
942
943#
944# Miscellaneous filesystems
945#
946# CONFIG_ADFS_FS is not set
947# CONFIG_AFFS_FS is not set
948# CONFIG_HFS_FS is not set
949# CONFIG_HFSPLUS_FS is not set
950# CONFIG_BEFS_FS is not set
951# CONFIG_BFS_FS is not set
952# CONFIG_EFS_FS is not set
953# CONFIG_CRAMFS is not set
954# CONFIG_VXFS_FS is not set
955# CONFIG_HPFS_FS is not set
956# CONFIG_QNX4FS_FS is not set
957# CONFIG_SYSV_FS is not set
958# CONFIG_UFS_FS is not set
959
960#
961# Network File Systems
962#
963CONFIG_NFS_FS=y
964CONFIG_NFS_V3=y
965# CONFIG_NFS_V3_ACL is not set
966CONFIG_NFS_V4=y
967# CONFIG_NFS_DIRECTIO is not set
968# CONFIG_NFSD is not set
969CONFIG_ROOT_NFS=y
970CONFIG_LOCKD=y
971CONFIG_LOCKD_V4=y
972CONFIG_NFS_COMMON=y
973CONFIG_SUNRPC=y
974CONFIG_SUNRPC_GSS=y
975CONFIG_RPCSEC_GSS_KRB5=y
976# CONFIG_RPCSEC_GSS_SPKM3 is not set
977# CONFIG_SMB_FS is not set
978# CONFIG_CIFS is not set
979# CONFIG_NCP_FS is not set
980# CONFIG_CODA_FS is not set
981# CONFIG_AFS_FS is not set
982# CONFIG_9P_FS is not set
983
984#
985# Partition Types
986#
987CONFIG_PARTITION_ADVANCED=y
988# CONFIG_ACORN_PARTITION is not set
989# CONFIG_OSF_PARTITION is not set
990# CONFIG_AMIGA_PARTITION is not set
991# CONFIG_ATARI_PARTITION is not set
992# CONFIG_MAC_PARTITION is not set
993# CONFIG_MSDOS_PARTITION is not set
994# CONFIG_LDM_PARTITION is not set
995# CONFIG_SGI_PARTITION is not set
996# CONFIG_ULTRIX_PARTITION is not set
997# CONFIG_SUN_PARTITION is not set
998# CONFIG_KARMA_PARTITION is not set
999# CONFIG_EFI_PARTITION is not set
1000
1001#
1002# Native Language Support
1003#
1004# CONFIG_NLS is not set
1005
1006#
1007# Distributed Lock Manager
1008#
1009# CONFIG_DLM is not set
1010
1011#
1012# QE Options
1013#
1014CONFIG_UCC_SLOW=y
1015CONFIG_UCC_FAST=y
1016CONFIG_UCC=y
1017
1018#
1019# Library routines
1020#
1021CONFIG_BITREVERSE=y
1022# CONFIG_CRC_CCITT is not set
1023# CONFIG_CRC16 is not set
1024CONFIG_CRC32=y
1025# CONFIG_LIBCRC32C is not set
1026CONFIG_PLIST=y
1027CONFIG_HAS_IOMEM=y
1028CONFIG_HAS_IOPORT=y
1029
1030#
1031# Instrumentation Support
1032#
1033# CONFIG_PROFILING is not set
1034
1035#
1036# Kernel hacking
1037#
1038# CONFIG_PRINTK_TIME is not set
1039CONFIG_ENABLE_MUST_CHECK=y
1040# CONFIG_MAGIC_SYSRQ is not set
1041# CONFIG_UNUSED_SYMBOLS is not set
1042# CONFIG_DEBUG_FS is not set
1043# CONFIG_HEADERS_CHECK is not set
1044# CONFIG_DEBUG_KERNEL is not set
1045CONFIG_LOG_BUF_SHIFT=14
1046# CONFIG_DEBUG_BUGVERBOSE is not set
1047# CONFIG_BOOTX_TEXT is not set
1048# CONFIG_SERIAL_TEXT_DEBUG is not set
1049# CONFIG_PPC_EARLY_DEBUG is not set
1050
1051#
1052# Security options
1053#
1054# CONFIG_KEYS is not set
1055# CONFIG_SECURITY is not set
1056
1057#
1058# Cryptographic options
1059#
1060CONFIG_CRYPTO=y
1061CONFIG_CRYPTO_ALGAPI=y
1062CONFIG_CRYPTO_BLKCIPHER=y
1063CONFIG_CRYPTO_MANAGER=y
1064# CONFIG_CRYPTO_HMAC is not set
1065# CONFIG_CRYPTO_XCBC is not set
1066# CONFIG_CRYPTO_NULL is not set
1067# CONFIG_CRYPTO_MD4 is not set
1068CONFIG_CRYPTO_MD5=y
1069# CONFIG_CRYPTO_SHA1 is not set
1070# CONFIG_CRYPTO_SHA256 is not set
1071# CONFIG_CRYPTO_SHA512 is not set
1072# CONFIG_CRYPTO_WP512 is not set
1073# CONFIG_CRYPTO_TGR192 is not set
1074# CONFIG_CRYPTO_GF128MUL is not set
1075CONFIG_CRYPTO_ECB=m
1076CONFIG_CRYPTO_CBC=y
1077CONFIG_CRYPTO_PCBC=m
1078# CONFIG_CRYPTO_LRW is not set
1079CONFIG_CRYPTO_DES=y
1080# CONFIG_CRYPTO_FCRYPT is not set
1081# CONFIG_CRYPTO_BLOWFISH is not set
1082# CONFIG_CRYPTO_TWOFISH is not set
1083# CONFIG_CRYPTO_SERPENT is not set
1084# CONFIG_CRYPTO_AES is not set
1085# CONFIG_CRYPTO_CAST5 is not set
1086# CONFIG_CRYPTO_CAST6 is not set
1087# CONFIG_CRYPTO_TEA is not set
1088# CONFIG_CRYPTO_ARC4 is not set
1089# CONFIG_CRYPTO_KHAZAD is not set
1090# CONFIG_CRYPTO_ANUBIS is not set
1091# CONFIG_CRYPTO_DEFLATE is not set
1092# CONFIG_CRYPTO_MICHAEL_MIC is not set
1093# CONFIG_CRYPTO_CRC32C is not set
1094# CONFIG_CRYPTO_CAMELLIA is not set
1095# CONFIG_CRYPTO_TEST is not set
1096
1097#
1098# Hardware crypto devices
1099#
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
new file mode 100644
index 000000000000..7b3800674cbf
--- /dev/null
+++ b/arch/powerpc/configs/mpc8568mds_defconfig
@@ -0,0 +1,1010 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Sat Feb 17 16:26:53 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
67# CONFIG_POSIX_MQUEUE is not set
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set
75CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y
78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
80# CONFIG_KALLSYMS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87# CONFIG_EPOLL is not set
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102# CONFIG_MODVERSIONS is not set
103# CONFIG_MODULE_SRCVERSION_ALL is not set
104# CONFIG_KMOD is not set
105
106#
107# Block layer
108#
109CONFIG_BLOCK=y
110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113
114#
115# IO Schedulers
116#
117CONFIG_IOSCHED_NOOP=y
118CONFIG_IOSCHED_AS=y
119CONFIG_IOSCHED_DEADLINE=y
120CONFIG_IOSCHED_CFQ=y
121CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_DEADLINE is not set
123# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory"
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131# CONFIG_MPC8540_ADS is not set
132# CONFIG_MPC8560_ADS is not set
133# CONFIG_MPC85xx_CDS is not set
134CONFIG_MPC85xx_MDS=y
135CONFIG_MPC85xx=y
136CONFIG_PPC_INDIRECT_PCI_BE=y
137CONFIG_MPIC=y
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_BINFMT_ELF=y
152# CONFIG_BINFMT_MISC is not set
153CONFIG_MATH_EMULATION=y
154CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
155CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_POPULATES_NODE_MAP=y
157CONFIG_SELECT_MEMORY_MODEL=y
158CONFIG_FLATMEM_MANUAL=y
159# CONFIG_DISCONTIGMEM_MANUAL is not set
160# CONFIG_SPARSEMEM_MANUAL is not set
161CONFIG_FLATMEM=y
162CONFIG_FLAT_NODE_MEM_MAP=y
163# CONFIG_SPARSEMEM_STATIC is not set
164CONFIG_SPLIT_PTLOCK_CPUS=4
165# CONFIG_RESOURCES_64BIT is not set
166CONFIG_ZONE_DMA_FLAG=1
167CONFIG_PROC_DEVICETREE=y
168# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set
170CONFIG_SECCOMP=y
171CONFIG_ISA_DMA_API=y
172
173#
174# Bus options
175#
176CONFIG_ZONE_DMA=y
177# CONFIG_MPIC_WEIRD is not set
178# CONFIG_PPC_I8259 is not set
179CONFIG_PPC_INDIRECT_PCI=y
180CONFIG_FSL_SOC=y
181# CONFIG_PCI is not set
182# CONFIG_PCI_DOMAINS is not set
183
184#
185# PCCARD (PCMCIA/CardBus) support
186#
187# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192
193#
194# Advanced setup
195#
196# CONFIG_ADVANCED_OPTIONS is not set
197
198#
199# Default settings for advanced configuration options are used
200#
201CONFIG_HIGHMEM_START=0xfe000000
202CONFIG_LOWMEM_SIZE=0x30000000
203CONFIG_KERNEL_START=0xc0000000
204CONFIG_TASK_SIZE=0x80000000
205CONFIG_BOOT_LOAD=0x00800000
206
207#
208# Networking
209#
210CONFIG_NET=y
211
212#
213# Networking options
214#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y
219CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set
222# CONFIG_XFRM_MIGRATE is not set
223# CONFIG_NET_KEY is not set
224CONFIG_INET=y
225CONFIG_IP_MULTICAST=y
226# CONFIG_IP_ADVANCED_ROUTER is not set
227CONFIG_IP_FIB_HASH=y
228CONFIG_IP_PNP=y
229CONFIG_IP_PNP_DHCP=y
230CONFIG_IP_PNP_BOOTP=y
231# CONFIG_IP_PNP_RARP is not set
232# CONFIG_NET_IPIP is not set
233# CONFIG_NET_IPGRE is not set
234# CONFIG_IP_MROUTE is not set
235# CONFIG_ARPD is not set
236CONFIG_SYN_COOKIES=y
237# CONFIG_INET_AH is not set
238# CONFIG_INET_ESP is not set
239# CONFIG_INET_IPCOMP is not set
240# CONFIG_INET_XFRM_TUNNEL is not set
241# CONFIG_INET_TUNNEL is not set
242CONFIG_INET_XFRM_MODE_TRANSPORT=y
243CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_XFRM_MODE_BEET=y
245CONFIG_INET_DIAG=y
246CONFIG_INET_TCP_DIAG=y
247# CONFIG_TCP_CONG_ADVANCED is not set
248CONFIG_TCP_CONG_CUBIC=y
249CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set
252# CONFIG_INET6_XFRM_TUNNEL is not set
253# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set
271# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set
273# CONFIG_VLAN_8021Q is not set
274# CONFIG_DECNET is not set
275# CONFIG_LLC2 is not set
276# CONFIG_IPX is not set
277# CONFIG_ATALK is not set
278# CONFIG_X25 is not set
279# CONFIG_LAPB is not set
280# CONFIG_ECONET is not set
281# CONFIG_WAN_ROUTER is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287
288#
289# Network testing
290#
291# CONFIG_NET_PKTGEN is not set
292# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set
294# CONFIG_BT is not set
295# CONFIG_IEEE80211 is not set
296
297#
298# Device Drivers
299#
300
301#
302# Generic Driver Options
303#
304CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_DEBUG_DEVRES is not set
309# CONFIG_SYS_HYPERVISOR is not set
310
311#
312# Connector - unified userspace <-> kernelspace linker
313#
314# CONFIG_CONNECTOR is not set
315
316#
317# Memory Technology Devices (MTD)
318#
319# CONFIG_MTD is not set
320
321#
322# Parallel port support
323#
324# CONFIG_PARPORT is not set
325
326#
327# Plug and Play support
328#
329
330#
331# Block devices
332#
333# CONFIG_BLK_DEV_FD is not set
334# CONFIG_BLK_DEV_COW_COMMON is not set
335CONFIG_BLK_DEV_LOOP=y
336# CONFIG_BLK_DEV_CRYPTOLOOP is not set
337# CONFIG_BLK_DEV_NBD is not set
338CONFIG_BLK_DEV_RAM=y
339CONFIG_BLK_DEV_RAM_COUNT=16
340CONFIG_BLK_DEV_RAM_SIZE=32768
341CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
342CONFIG_BLK_DEV_INITRD=y
343# CONFIG_CDROM_PKTCDVD is not set
344# CONFIG_ATA_OVER_ETH is not set
345
346#
347# Misc devices
348#
349
350#
351# ATA/ATAPI/MFM/RLL support
352#
353# CONFIG_IDE is not set
354
355#
356# SCSI device support
357#
358# CONFIG_RAID_ATTRS is not set
359CONFIG_SCSI=y
360# CONFIG_SCSI_TGT is not set
361# CONFIG_SCSI_NETLINK is not set
362CONFIG_SCSI_PROC_FS=y
363
364#
365# SCSI support type (disk, tape, CD-ROM)
366#
367# CONFIG_BLK_DEV_SD is not set
368# CONFIG_CHR_DEV_ST is not set
369# CONFIG_CHR_DEV_OSST is not set
370# CONFIG_BLK_DEV_SR is not set
371# CONFIG_CHR_DEV_SG is not set
372# CONFIG_CHR_DEV_SCH is not set
373
374#
375# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
376#
377# CONFIG_SCSI_MULTI_LUN is not set
378# CONFIG_SCSI_CONSTANTS is not set
379# CONFIG_SCSI_LOGGING is not set
380# CONFIG_SCSI_SCAN_ASYNC is not set
381
382#
383# SCSI Transports
384#
385# CONFIG_SCSI_SPI_ATTRS is not set
386# CONFIG_SCSI_FC_ATTRS is not set
387# CONFIG_SCSI_ISCSI_ATTRS is not set
388# CONFIG_SCSI_SAS_ATTRS is not set
389# CONFIG_SCSI_SAS_LIBSAS is not set
390
391#
392# SCSI low-level drivers
393#
394# CONFIG_ISCSI_TCP is not set
395# CONFIG_SCSI_DEBUG is not set
396
397#
398# Serial ATA (prod) and Parallel ATA (experimental) drivers
399#
400# CONFIG_ATA is not set
401
402#
403# Multi-device support (RAID and LVM)
404#
405# CONFIG_MD is not set
406
407#
408# Fusion MPT device support
409#
410# CONFIG_FUSION is not set
411
412#
413# IEEE 1394 (FireWire) support
414#
415
416#
417# I2O device support
418#
419
420#
421# Macintosh device drivers
422#
423# CONFIG_MAC_EMUMOUSEBTN is not set
424# CONFIG_WINDFARM is not set
425
426#
427# Network device support
428#
429CONFIG_NETDEVICES=y
430# CONFIG_DUMMY is not set
431# CONFIG_BONDING is not set
432# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set
434
435#
436# PHY device support
437#
438CONFIG_PHYLIB=y
439
440#
441# MII PHY device drivers
442#
443CONFIG_MARVELL_PHY=y
444# CONFIG_DAVICOM_PHY is not set
445# CONFIG_QSEMI_PHY is not set
446# CONFIG_LXT_PHY is not set
447# CONFIG_CICADA_PHY is not set
448# CONFIG_VITESSE_PHY is not set
449# CONFIG_SMSC_PHY is not set
450# CONFIG_BROADCOM_PHY is not set
451# CONFIG_FIXED_PHY is not set
452
453#
454# Ethernet (10 or 100Mbit)
455#
456CONFIG_NET_ETHERNET=y
457CONFIG_MII=y
458
459#
460# Ethernet (1000 Mbit)
461#
462CONFIG_GIANFAR=y
463CONFIG_GFAR_NAPI=y
464
465#
466# Ethernet (10000 Mbit)
467#
468
469#
470# Token Ring devices
471#
472
473#
474# Wireless LAN (non-hamradio)
475#
476# CONFIG_NET_RADIO is not set
477
478#
479# Wan interfaces
480#
481# CONFIG_WAN is not set
482# CONFIG_PPP is not set
483# CONFIG_SLIP is not set
484# CONFIG_SHAPER is not set
485# CONFIG_NETCONSOLE is not set
486# CONFIG_NETPOLL is not set
487# CONFIG_NET_POLL_CONTROLLER is not set
488
489#
490# ISDN subsystem
491#
492# CONFIG_ISDN is not set
493
494#
495# Telephony Support
496#
497# CONFIG_PHONE is not set
498
499#
500# Input device support
501#
502CONFIG_INPUT=y
503# CONFIG_INPUT_FF_MEMLESS is not set
504
505#
506# Userland interfaces
507#
508# CONFIG_INPUT_MOUSEDEV is not set
509# CONFIG_INPUT_JOYDEV is not set
510# CONFIG_INPUT_TSDEV is not set
511# CONFIG_INPUT_EVDEV is not set
512# CONFIG_INPUT_EVBUG is not set
513
514#
515# Input Device Drivers
516#
517# CONFIG_INPUT_KEYBOARD is not set
518# CONFIG_INPUT_MOUSE is not set
519# CONFIG_INPUT_JOYSTICK is not set
520# CONFIG_INPUT_TOUCHSCREEN is not set
521# CONFIG_INPUT_MISC is not set
522
523#
524# Hardware I/O ports
525#
526# CONFIG_SERIO is not set
527# CONFIG_GAMEPORT is not set
528
529#
530# Character devices
531#
532# CONFIG_VT is not set
533# CONFIG_SERIAL_NONSTANDARD is not set
534
535#
536# Serial drivers
537#
538CONFIG_SERIAL_8250=y
539CONFIG_SERIAL_8250_CONSOLE=y
540CONFIG_SERIAL_8250_NR_UARTS=4
541CONFIG_SERIAL_8250_RUNTIME_UARTS=4
542# CONFIG_SERIAL_8250_EXTENDED is not set
543
544#
545# Non-8250 serial port support
546#
547# CONFIG_SERIAL_UARTLITE is not set
548CONFIG_SERIAL_CORE=y
549CONFIG_SERIAL_CORE_CONSOLE=y
550# CONFIG_SERIAL_OF_PLATFORM is not set
551CONFIG_UNIX98_PTYS=y
552CONFIG_LEGACY_PTYS=y
553CONFIG_LEGACY_PTY_COUNT=256
554
555#
556# IPMI
557#
558# CONFIG_IPMI_HANDLER is not set
559
560#
561# Watchdog Cards
562#
563CONFIG_WATCHDOG=y
564# CONFIG_WATCHDOG_NOWAYOUT is not set
565
566#
567# Watchdog Device Drivers
568#
569# CONFIG_SOFT_WATCHDOG is not set
570# CONFIG_BOOKE_WDT is not set
571CONFIG_HW_RANDOM=y
572# CONFIG_NVRAM is not set
573CONFIG_GEN_RTC=y
574# CONFIG_GEN_RTC_X is not set
575# CONFIG_DTLK is not set
576# CONFIG_R3964 is not set
577# CONFIG_RAW_DRIVER is not set
578
579#
580# TPM devices
581#
582# CONFIG_TCG_TPM is not set
583
584#
585# I2C support
586#
587CONFIG_I2C=y
588CONFIG_I2C_CHARDEV=y
589
590#
591# I2C Algorithms
592#
593# CONFIG_I2C_ALGOBIT is not set
594# CONFIG_I2C_ALGOPCF is not set
595# CONFIG_I2C_ALGOPCA is not set
596
597#
598# I2C Hardware Bus support
599#
600CONFIG_I2C_MPC=y
601# CONFIG_I2C_OCORES is not set
602# CONFIG_I2C_PARPORT_LIGHT is not set
603# CONFIG_I2C_STUB is not set
604# CONFIG_I2C_PCA_ISA is not set
605
606#
607# Miscellaneous I2C Chip support
608#
609# CONFIG_SENSORS_DS1337 is not set
610# CONFIG_SENSORS_DS1374 is not set
611# CONFIG_SENSORS_EEPROM is not set
612# CONFIG_SENSORS_PCF8574 is not set
613# CONFIG_SENSORS_PCA9539 is not set
614# CONFIG_SENSORS_PCF8591 is not set
615# CONFIG_SENSORS_M41T00 is not set
616# CONFIG_SENSORS_MAX6875 is not set
617# CONFIG_I2C_DEBUG_CORE is not set
618# CONFIG_I2C_DEBUG_ALGO is not set
619# CONFIG_I2C_DEBUG_BUS is not set
620# CONFIG_I2C_DEBUG_CHIP is not set
621
622#
623# SPI support
624#
625# CONFIG_SPI is not set
626# CONFIG_SPI_MASTER is not set
627
628#
629# Dallas's 1-wire bus
630#
631# CONFIG_W1 is not set
632
633#
634# Hardware Monitoring support
635#
636CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set
638# CONFIG_SENSORS_ABITUGURU is not set
639# CONFIG_SENSORS_ADM1021 is not set
640# CONFIG_SENSORS_ADM1025 is not set
641# CONFIG_SENSORS_ADM1026 is not set
642# CONFIG_SENSORS_ADM1031 is not set
643# CONFIG_SENSORS_ADM9240 is not set
644# CONFIG_SENSORS_ASB100 is not set
645# CONFIG_SENSORS_ATXP1 is not set
646# CONFIG_SENSORS_DS1621 is not set
647# CONFIG_SENSORS_F71805F is not set
648# CONFIG_SENSORS_FSCHER is not set
649# CONFIG_SENSORS_FSCPOS is not set
650# CONFIG_SENSORS_GL518SM is not set
651# CONFIG_SENSORS_GL520SM is not set
652# CONFIG_SENSORS_IT87 is not set
653# CONFIG_SENSORS_LM63 is not set
654# CONFIG_SENSORS_LM75 is not set
655# CONFIG_SENSORS_LM77 is not set
656# CONFIG_SENSORS_LM78 is not set
657# CONFIG_SENSORS_LM80 is not set
658# CONFIG_SENSORS_LM83 is not set
659# CONFIG_SENSORS_LM85 is not set
660# CONFIG_SENSORS_LM87 is not set
661# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set
663# CONFIG_SENSORS_MAX1619 is not set
664# CONFIG_SENSORS_PC87360 is not set
665# CONFIG_SENSORS_PC87427 is not set
666# CONFIG_SENSORS_SMSC47M1 is not set
667# CONFIG_SENSORS_SMSC47M192 is not set
668# CONFIG_SENSORS_SMSC47B397 is not set
669# CONFIG_SENSORS_VT1211 is not set
670# CONFIG_SENSORS_W83781D is not set
671# CONFIG_SENSORS_W83791D is not set
672# CONFIG_SENSORS_W83792D is not set
673# CONFIG_SENSORS_W83793 is not set
674# CONFIG_SENSORS_W83L785TS is not set
675# CONFIG_SENSORS_W83627HF is not set
676# CONFIG_SENSORS_W83627EHF is not set
677# CONFIG_HWMON_DEBUG_CHIP is not set
678
679#
680# Multimedia devices
681#
682# CONFIG_VIDEO_DEV is not set
683
684#
685# Digital Video Broadcasting Devices
686#
687# CONFIG_DVB is not set
688
689#
690# Graphics support
691#
692CONFIG_FIRMWARE_EDID=y
693# CONFIG_FB is not set
694# CONFIG_FB_IBM_GXT4500 is not set
695# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
696
697#
698# Sound
699#
700# CONFIG_SOUND is not set
701
702#
703# HID Devices
704#
705CONFIG_HID=y
706# CONFIG_HID_DEBUG is not set
707
708#
709# USB support
710#
711# CONFIG_USB_ARCH_HAS_HCD is not set
712# CONFIG_USB_ARCH_HAS_OHCI is not set
713# CONFIG_USB_ARCH_HAS_EHCI is not set
714
715#
716# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
717#
718
719#
720# USB Gadget Support
721#
722# CONFIG_USB_GADGET is not set
723
724#
725# MMC/SD Card support
726#
727# CONFIG_MMC is not set
728
729#
730# LED devices
731#
732# CONFIG_NEW_LEDS is not set
733
734#
735# LED drivers
736#
737
738#
739# LED Triggers
740#
741
742#
743# InfiniBand support
744#
745
746#
747# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
748#
749
750#
751# Real Time Clock
752#
753# CONFIG_RTC_CLASS is not set
754
755#
756# DMA Engine support
757#
758# CONFIG_DMA_ENGINE is not set
759
760#
761# DMA Clients
762#
763
764#
765# DMA Devices
766#
767
768#
769# Auxiliary Display support
770#
771
772#
773# Virtualization
774#
775
776#
777# File systems
778#
779CONFIG_EXT2_FS=y
780# CONFIG_EXT2_FS_XATTR is not set
781# CONFIG_EXT2_FS_XIP is not set
782CONFIG_EXT3_FS=y
783CONFIG_EXT3_FS_XATTR=y
784# CONFIG_EXT3_FS_POSIX_ACL is not set
785# CONFIG_EXT3_FS_SECURITY is not set
786# CONFIG_EXT4DEV_FS is not set
787CONFIG_JBD=y
788# CONFIG_JBD_DEBUG is not set
789CONFIG_FS_MBCACHE=y
790# CONFIG_REISERFS_FS is not set
791# CONFIG_JFS_FS is not set
792# CONFIG_FS_POSIX_ACL is not set
793# CONFIG_XFS_FS is not set
794# CONFIG_GFS2_FS is not set
795# CONFIG_OCFS2_FS is not set
796# CONFIG_MINIX_FS is not set
797# CONFIG_ROMFS_FS is not set
798CONFIG_INOTIFY=y
799CONFIG_INOTIFY_USER=y
800# CONFIG_QUOTA is not set
801CONFIG_DNOTIFY=y
802# CONFIG_AUTOFS_FS is not set
803# CONFIG_AUTOFS4_FS is not set
804# CONFIG_FUSE_FS is not set
805
806#
807# CD-ROM/DVD Filesystems
808#
809# CONFIG_ISO9660_FS is not set
810# CONFIG_UDF_FS is not set
811
812#
813# DOS/FAT/NT Filesystems
814#
815# CONFIG_MSDOS_FS is not set
816# CONFIG_VFAT_FS is not set
817# CONFIG_NTFS_FS is not set
818
819#
820# Pseudo filesystems
821#
822CONFIG_PROC_FS=y
823CONFIG_PROC_KCORE=y
824CONFIG_PROC_SYSCTL=y
825CONFIG_SYSFS=y
826CONFIG_TMPFS=y
827# CONFIG_TMPFS_POSIX_ACL is not set
828# CONFIG_HUGETLB_PAGE is not set
829CONFIG_RAMFS=y
830# CONFIG_CONFIGFS_FS is not set
831
832#
833# Miscellaneous filesystems
834#
835# CONFIG_ADFS_FS is not set
836# CONFIG_AFFS_FS is not set
837# CONFIG_HFS_FS is not set
838# CONFIG_HFSPLUS_FS is not set
839# CONFIG_BEFS_FS is not set
840# CONFIG_BFS_FS is not set
841# CONFIG_EFS_FS is not set
842# CONFIG_CRAMFS is not set
843# CONFIG_VXFS_FS is not set
844# CONFIG_HPFS_FS is not set
845# CONFIG_QNX4FS_FS is not set
846# CONFIG_SYSV_FS is not set
847# CONFIG_UFS_FS is not set
848
849#
850# Network File Systems
851#
852CONFIG_NFS_FS=y
853CONFIG_NFS_V3=y
854# CONFIG_NFS_V3_ACL is not set
855CONFIG_NFS_V4=y
856# CONFIG_NFS_DIRECTIO is not set
857# CONFIG_NFSD is not set
858CONFIG_ROOT_NFS=y
859CONFIG_LOCKD=y
860CONFIG_LOCKD_V4=y
861CONFIG_NFS_COMMON=y
862CONFIG_SUNRPC=y
863CONFIG_SUNRPC_GSS=y
864CONFIG_RPCSEC_GSS_KRB5=y
865# CONFIG_RPCSEC_GSS_SPKM3 is not set
866# CONFIG_SMB_FS is not set
867# CONFIG_CIFS is not set
868# CONFIG_NCP_FS is not set
869# CONFIG_CODA_FS is not set
870# CONFIG_AFS_FS is not set
871# CONFIG_9P_FS is not set
872
873#
874# Partition Types
875#
876CONFIG_PARTITION_ADVANCED=y
877# CONFIG_ACORN_PARTITION is not set
878# CONFIG_OSF_PARTITION is not set
879# CONFIG_AMIGA_PARTITION is not set
880# CONFIG_ATARI_PARTITION is not set
881# CONFIG_MAC_PARTITION is not set
882# CONFIG_MSDOS_PARTITION is not set
883# CONFIG_LDM_PARTITION is not set
884# CONFIG_SGI_PARTITION is not set
885# CONFIG_ULTRIX_PARTITION is not set
886# CONFIG_SUN_PARTITION is not set
887# CONFIG_KARMA_PARTITION is not set
888# CONFIG_EFI_PARTITION is not set
889
890#
891# Native Language Support
892#
893# CONFIG_NLS is not set
894
895#
896# Distributed Lock Manager
897#
898# CONFIG_DLM is not set
899
900#
901# Library routines
902#
903CONFIG_BITREVERSE=y
904# CONFIG_CRC_CCITT is not set
905# CONFIG_CRC16 is not set
906CONFIG_CRC32=y
907# CONFIG_LIBCRC32C is not set
908CONFIG_PLIST=y
909CONFIG_HAS_IOMEM=y
910CONFIG_HAS_IOPORT=y
911
912#
913# Instrumentation Support
914#
915CONFIG_PROFILING=y
916CONFIG_OPROFILE=y
917
918#
919# Kernel hacking
920#
921# CONFIG_PRINTK_TIME is not set
922CONFIG_ENABLE_MUST_CHECK=y
923# CONFIG_MAGIC_SYSRQ is not set
924# CONFIG_UNUSED_SYMBOLS is not set
925# CONFIG_DEBUG_FS is not set
926# CONFIG_HEADERS_CHECK is not set
927CONFIG_DEBUG_KERNEL=y
928# CONFIG_DEBUG_SHIRQ is not set
929CONFIG_LOG_BUF_SHIFT=14
930CONFIG_DETECT_SOFTLOCKUP=y
931# CONFIG_SCHEDSTATS is not set
932# CONFIG_DEBUG_SLAB is not set
933# CONFIG_DEBUG_RT_MUTEXES is not set
934# CONFIG_RT_MUTEX_TESTER is not set
935# CONFIG_DEBUG_SPINLOCK is not set
936# CONFIG_DEBUG_MUTEXES is not set
937# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
938# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
939# CONFIG_DEBUG_KOBJECT is not set
940# CONFIG_DEBUG_BUGVERBOSE is not set
941# CONFIG_DEBUG_INFO is not set
942# CONFIG_DEBUG_VM is not set
943# CONFIG_DEBUG_LIST is not set
944CONFIG_FORCED_INLINING=y
945# CONFIG_RCU_TORTURE_TEST is not set
946# CONFIG_DEBUG_STACKOVERFLOW is not set
947# CONFIG_DEBUG_STACK_USAGE is not set
948CONFIG_DEBUGGER=y
949# CONFIG_XMON is not set
950# CONFIG_BDI_SWITCH is not set
951CONFIG_BOOTX_TEXT=y
952CONFIG_PPC_EARLY_DEBUG=y
953# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
954# CONFIG_PPC_EARLY_DEBUG_G5 is not set
955# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
956# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
957# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
958# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
959# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
960# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
961
962#
963# Security options
964#
965# CONFIG_KEYS is not set
966# CONFIG_SECURITY is not set
967
968#
969# Cryptographic options
970#
971CONFIG_CRYPTO=y
972CONFIG_CRYPTO_ALGAPI=y
973CONFIG_CRYPTO_BLKCIPHER=y
974CONFIG_CRYPTO_MANAGER=y
975# CONFIG_CRYPTO_HMAC is not set
976# CONFIG_CRYPTO_XCBC is not set
977# CONFIG_CRYPTO_NULL is not set
978# CONFIG_CRYPTO_MD4 is not set
979CONFIG_CRYPTO_MD5=y
980# CONFIG_CRYPTO_SHA1 is not set
981# CONFIG_CRYPTO_SHA256 is not set
982# CONFIG_CRYPTO_SHA512 is not set
983# CONFIG_CRYPTO_WP512 is not set
984# CONFIG_CRYPTO_TGR192 is not set
985# CONFIG_CRYPTO_GF128MUL is not set
986CONFIG_CRYPTO_ECB=m
987CONFIG_CRYPTO_CBC=y
988CONFIG_CRYPTO_PCBC=m
989# CONFIG_CRYPTO_LRW is not set
990CONFIG_CRYPTO_DES=y
991# CONFIG_CRYPTO_FCRYPT is not set
992# CONFIG_CRYPTO_BLOWFISH is not set
993# CONFIG_CRYPTO_TWOFISH is not set
994# CONFIG_CRYPTO_SERPENT is not set
995# CONFIG_CRYPTO_AES is not set
996# CONFIG_CRYPTO_CAST5 is not set
997# CONFIG_CRYPTO_CAST6 is not set
998# CONFIG_CRYPTO_TEA is not set
999# CONFIG_CRYPTO_ARC4 is not set
1000# CONFIG_CRYPTO_KHAZAD is not set
1001# CONFIG_CRYPTO_ANUBIS is not set
1002# CONFIG_CRYPTO_DEFLATE is not set
1003# CONFIG_CRYPTO_MICHAEL_MIC is not set
1004# CONFIG_CRYPTO_CRC32C is not set
1005# CONFIG_CRYPTO_CAMELLIA is not set
1006# CONFIG_CRYPTO_TEST is not set
1007
1008#
1009# Hardware crypto devices
1010#
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
new file mode 100644
index 000000000000..539d9e3d3668
--- /dev/null
+++ b/arch/powerpc/configs/mpc866_ads_defconfig
@@ -0,0 +1,829 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc6
4# Fri Nov 24 21:13:55 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set
26
27#
28# Processor support
29#
30# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set
43CONFIG_NOT_COHERENT_CACHE=y
44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
45
46#
47# Code maturity level options
48#
49CONFIG_EXPERIMENTAL=y
50CONFIG_BROKEN_ON_SMP=y
51CONFIG_INIT_ENV_ARG_LIMIT=32
52
53#
54# General setup
55#
56CONFIG_LOCALVERSION=""
57CONFIG_LOCALVERSION_AUTO=y
58# CONFIG_SWAP is not set
59CONFIG_SYSVIPC=y
60# CONFIG_IPC_NS is not set
61# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
64# CONFIG_UTS_NS is not set
65# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set
67# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE=""
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_SYSCTL=y
71CONFIG_EMBEDDED=y
72# CONFIG_SYSCTL_SYSCALL is not set
73CONFIG_KALLSYMS=y
74# CONFIG_KALLSYMS_EXTRA_PASS is not set
75# CONFIG_HOTPLUG is not set
76CONFIG_PRINTK=y
77# CONFIG_BUG is not set
78CONFIG_ELF_CORE=y
79# CONFIG_BASE_FULL is not set
80CONFIG_FUTEX=y
81# CONFIG_EPOLL is not set
82CONFIG_SHMEM=y
83CONFIG_SLAB=y
84# CONFIG_VM_EVENT_COUNTERS is not set
85CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1
88# CONFIG_SLOB is not set
89
90#
91# Loadable module support
92#
93# CONFIG_MODULES is not set
94
95#
96# Block layer
97#
98CONFIG_BLOCK=y
99# CONFIG_LBD is not set
100# CONFIG_BLK_DEV_IO_TRACE is not set
101# CONFIG_LSF is not set
102
103#
104# IO Schedulers
105#
106CONFIG_IOSCHED_NOOP=y
107CONFIG_IOSCHED_AS=y
108CONFIG_IOSCHED_DEADLINE=y
109CONFIG_IOSCHED_CFQ=y
110CONFIG_DEFAULT_AS=y
111# CONFIG_DEFAULT_DEADLINE is not set
112# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory"
115# CONFIG_WANT_EARLY_SERIAL is not set
116CONFIG_EMBEDDEDBOOT=y
117# CONFIG_MPIC is not set
118
119#
120# Platform support
121#
122CONFIG_CPM1=y
123# CONFIG_MPC8XXFADS is not set
124CONFIG_MPC86XADS=y
125# CONFIG_MPC885ADS is not set
126
127#
128# MPC8xx CPM Options
129#
130
131#
132# Generic MPC8xx Options
133#
134CONFIG_8xx_COPYBACK=y
135CONFIG_8xx_CPU6=y
136CONFIG_NO_UCODE_PATCH=y
137# CONFIG_USB_SOF_UCODE_PATCH is not set
138# CONFIG_I2C_SPI_UCODE_PATCH is not set
139# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
140
141#
142# Kernel options
143#
144# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set
146# CONFIG_HZ_250 is not set
147CONFIG_HZ_1000=y
148CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set
152CONFIG_BINFMT_ELF=y
153# CONFIG_BINFMT_MISC is not set
154CONFIG_MATH_EMULATION=y
155CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
156CONFIG_ARCH_FLATMEM_ENABLE=y
157CONFIG_ARCH_POPULATES_NODE_MAP=y
158CONFIG_SELECT_MEMORY_MODEL=y
159CONFIG_FLATMEM_MANUAL=y
160# CONFIG_DISCONTIGMEM_MANUAL is not set
161# CONFIG_SPARSEMEM_MANUAL is not set
162CONFIG_FLATMEM=y
163CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set
167# CONFIG_PROC_DEVICETREE is not set
168# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set
170# CONFIG_SECCOMP is not set
171CONFIG_ISA_DMA_API=y
172
173#
174# Bus options
175#
176# CONFIG_MPIC_WEIRD is not set
177# CONFIG_PPC_I8259 is not set
178CONFIG_FSL_SOC=y
179# CONFIG_PCI is not set
180# CONFIG_PCI_DOMAINS is not set
181# CONFIG_PCI_QSPAN is not set
182
183#
184# PCCARD (PCMCIA/CardBus) support
185#
186
187#
188# PCI Hotplug Support
189#
190
191#
192# Advanced setup
193#
194# CONFIG_ADVANCED_OPTIONS is not set
195
196#
197# Default settings for advanced configuration options are used
198#
199CONFIG_HIGHMEM_START=0xfe000000
200CONFIG_LOWMEM_SIZE=0x30000000
201CONFIG_KERNEL_START=0xc0000000
202CONFIG_TASK_SIZE=0x80000000
203CONFIG_CONSISTENT_START=0xff100000
204CONFIG_CONSISTENT_SIZE=0x00200000
205CONFIG_BOOT_LOAD=0x00400000
206
207#
208# Networking
209#
210CONFIG_NET=y
211
212#
213# Networking options
214#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y
219CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set
222# CONFIG_NET_KEY is not set
223CONFIG_INET=y
224CONFIG_IP_MULTICAST=y
225# CONFIG_IP_ADVANCED_ROUTER is not set
226CONFIG_IP_FIB_HASH=y
227CONFIG_IP_PNP=y
228# CONFIG_IP_PNP_DHCP is not set
229# CONFIG_IP_PNP_BOOTP is not set
230# CONFIG_IP_PNP_RARP is not set
231# CONFIG_NET_IPIP is not set
232# CONFIG_NET_IPGRE is not set
233# CONFIG_IP_MROUTE is not set
234# CONFIG_ARPD is not set
235CONFIG_SYN_COOKIES=y
236# CONFIG_INET_AH is not set
237# CONFIG_INET_ESP is not set
238# CONFIG_INET_IPCOMP is not set
239# CONFIG_INET_XFRM_TUNNEL is not set
240# CONFIG_INET_TUNNEL is not set
241CONFIG_INET_XFRM_MODE_TRANSPORT=y
242CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_XFRM_MODE_BEET=y
244CONFIG_INET_DIAG=y
245CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set
247CONFIG_TCP_CONG_CUBIC=y
248CONFIG_DEFAULT_TCP_CONG="cubic"
249# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set
269# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set
271# CONFIG_VLAN_8021Q is not set
272# CONFIG_DECNET is not set
273# CONFIG_LLC2 is not set
274# CONFIG_IPX is not set
275# CONFIG_ATALK is not set
276# CONFIG_X25 is not set
277# CONFIG_LAPB is not set
278# CONFIG_ECONET is not set
279# CONFIG_WAN_ROUTER is not set
280
281#
282# QoS and/or fair queueing
283#
284# CONFIG_NET_SCHED is not set
285
286#
287# Network testing
288#
289# CONFIG_NET_PKTGEN is not set
290# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set
292# CONFIG_BT is not set
293# CONFIG_IEEE80211 is not set
294
295#
296# Device Drivers
297#
298
299#
300# Generic Driver Options
301#
302CONFIG_STANDALONE=y
303CONFIG_PREVENT_FIRMWARE_BUILD=y
304# CONFIG_SYS_HYPERVISOR is not set
305
306#
307# Connector - unified userspace <-> kernelspace linker
308#
309# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314# CONFIG_MTD is not set
315
316#
317# Parallel port support
318#
319# CONFIG_PARPORT is not set
320
321#
322# Plug and Play support
323#
324
325#
326# Block devices
327#
328# CONFIG_BLK_DEV_FD is not set
329# CONFIG_BLK_DEV_COW_COMMON is not set
330CONFIG_BLK_DEV_LOOP=y
331# CONFIG_BLK_DEV_CRYPTOLOOP is not set
332# CONFIG_BLK_DEV_NBD is not set
333# CONFIG_BLK_DEV_RAM is not set
334# CONFIG_BLK_DEV_INITRD is not set
335# CONFIG_CDROM_PKTCDVD is not set
336# CONFIG_ATA_OVER_ETH is not set
337
338#
339# Misc devices
340#
341# CONFIG_TIFM_CORE is not set
342
343#
344# ATA/ATAPI/MFM/RLL support
345#
346# CONFIG_IDE is not set
347
348#
349# SCSI device support
350#
351# CONFIG_RAID_ATTRS is not set
352# CONFIG_SCSI is not set
353# CONFIG_SCSI_NETLINK is not set
354
355#
356# Serial ATA (prod) and Parallel ATA (experimental) drivers
357#
358# CONFIG_ATA is not set
359
360#
361# Multi-device support (RAID and LVM)
362#
363# CONFIG_MD is not set
364
365#
366# Fusion MPT device support
367#
368# CONFIG_FUSION is not set
369
370#
371# IEEE 1394 (FireWire) support
372#
373
374#
375# I2O device support
376#
377
378#
379# Macintosh device drivers
380#
381# CONFIG_WINDFARM is not set
382
383#
384# Network device support
385#
386CONFIG_NETDEVICES=y
387# CONFIG_DUMMY is not set
388# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y
396
397#
398# MII PHY device drivers
399#
400# CONFIG_MARVELL_PHY is not set
401# CONFIG_DAVICOM_PHY is not set
402# CONFIG_QSEMI_PHY is not set
403# CONFIG_LXT_PHY is not set
404# CONFIG_CICADA_PHY is not set
405# CONFIG_VITESSE_PHY is not set
406# CONFIG_SMSC_PHY is not set
407CONFIG_FIXED_PHY=y
408CONFIG_FIXED_MII_10_FDX=y
409CONFIG_FIXED_MII_100_FDX=y
410
411#
412# Ethernet (10 or 100Mbit)
413#
414CONFIG_NET_ETHERNET=y
415CONFIG_MII=y
416# CONFIG_FEC_8XX is not set
417CONFIG_FS_ENET=y
418CONFIG_FS_ENET_HAS_SCC=y
419CONFIG_FS_ENET_HAS_FEC=y
420
421#
422# Ethernet (1000 Mbit)
423#
424
425#
426# Ethernet (10000 Mbit)
427#
428
429#
430# Token Ring devices
431#
432
433#
434# Wireless LAN (non-hamradio)
435#
436# CONFIG_NET_RADIO is not set
437
438#
439# Wan interfaces
440#
441# CONFIG_WAN is not set
442# CONFIG_PPP is not set
443# CONFIG_SLIP is not set
444# CONFIG_SHAPER is not set
445# CONFIG_NETCONSOLE is not set
446# CONFIG_NETPOLL is not set
447# CONFIG_NET_POLL_CONTROLLER is not set
448
449#
450# ISDN subsystem
451#
452# CONFIG_ISDN is not set
453
454#
455# Telephony Support
456#
457# CONFIG_PHONE is not set
458
459#
460# Input device support
461#
462CONFIG_INPUT=y
463# CONFIG_INPUT_FF_MEMLESS is not set
464
465#
466# Userland interfaces
467#
468CONFIG_INPUT_MOUSEDEV=y
469CONFIG_INPUT_MOUSEDEV_PSAUX=y
470CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
471CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
472# CONFIG_INPUT_JOYDEV is not set
473# CONFIG_INPUT_TSDEV is not set
474# CONFIG_INPUT_EVDEV is not set
475# CONFIG_INPUT_EVBUG is not set
476
477#
478# Input Device Drivers
479#
480CONFIG_INPUT_KEYBOARD=y
481CONFIG_KEYBOARD_ATKBD=y
482# CONFIG_KEYBOARD_SUNKBD is not set
483# CONFIG_KEYBOARD_LKKBD is not set
484# CONFIG_KEYBOARD_XTKBD is not set
485# CONFIG_KEYBOARD_NEWTON is not set
486# CONFIG_KEYBOARD_STOWAWAY is not set
487CONFIG_INPUT_MOUSE=y
488CONFIG_MOUSE_PS2=y
489# CONFIG_MOUSE_SERIAL is not set
490# CONFIG_MOUSE_VSXXXAA is not set
491# CONFIG_INPUT_JOYSTICK is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set
494
495#
496# Hardware I/O ports
497#
498CONFIG_SERIO=y
499CONFIG_SERIO_I8042=y
500CONFIG_SERIO_SERPORT=y
501CONFIG_SERIO_LIBPS2=y
502# CONFIG_SERIO_RAW is not set
503# CONFIG_GAMEPORT is not set
504
505#
506# Character devices
507#
508# CONFIG_VT is not set
509# CONFIG_SERIAL_NONSTANDARD is not set
510
511#
512# Serial drivers
513#
514# CONFIG_SERIAL_8250 is not set
515
516#
517# Non-8250 serial port support
518#
519CONFIG_SERIAL_CORE=y
520CONFIG_SERIAL_CORE_CONSOLE=y
521CONFIG_SERIAL_CPM=y
522CONFIG_SERIAL_CPM_CONSOLE=y
523# CONFIG_SERIAL_CPM_SCC1 is not set
524# CONFIG_SERIAL_CPM_SCC2 is not set
525# CONFIG_SERIAL_CPM_SCC3 is not set
526# CONFIG_SERIAL_CPM_SCC4 is not set
527CONFIG_SERIAL_CPM_SMC1=y
528CONFIG_SERIAL_CPM_SMC2=y
529CONFIG_UNIX98_PTYS=y
530# CONFIG_LEGACY_PTYS is not set
531
532#
533# IPMI
534#
535# CONFIG_IPMI_HANDLER is not set
536
537#
538# Watchdog Cards
539#
540# CONFIG_WATCHDOG is not set
541CONFIG_HW_RANDOM=y
542# CONFIG_NVRAM is not set
543CONFIG_GEN_RTC=y
544# CONFIG_GEN_RTC_X is not set
545# CONFIG_DTLK is not set
546# CONFIG_R3964 is not set
547
548#
549# Ftape, the floppy tape device driver
550#
551# CONFIG_RAW_DRIVER is not set
552
553#
554# TPM devices
555#
556# CONFIG_TCG_TPM is not set
557
558#
559# I2C support
560#
561# CONFIG_I2C is not set
562
563#
564# SPI support
565#
566# CONFIG_SPI is not set
567# CONFIG_SPI_MASTER is not set
568
569#
570# Dallas's 1-wire bus
571#
572# CONFIG_W1 is not set
573
574#
575# Hardware Monitoring support
576#
577CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set
580# CONFIG_SENSORS_F71805F is not set
581# CONFIG_SENSORS_VT1211 is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set
583
584#
585# Multimedia devices
586#
587# CONFIG_VIDEO_DEV is not set
588
589#
590# Digital Video Broadcasting Devices
591#
592# CONFIG_DVB is not set
593
594#
595# Graphics support
596#
597CONFIG_FIRMWARE_EDID=y
598# CONFIG_FB is not set
599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
600
601#
602# Sound
603#
604# CONFIG_SOUND is not set
605
606#
607# USB support
608#
609# CONFIG_USB_ARCH_HAS_HCD is not set
610# CONFIG_USB_ARCH_HAS_OHCI is not set
611# CONFIG_USB_ARCH_HAS_EHCI is not set
612
613#
614# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
615#
616
617#
618# USB Gadget Support
619#
620# CONFIG_USB_GADGET is not set
621
622#
623# MMC/SD Card support
624#
625# CONFIG_MMC is not set
626
627#
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# InfiniBand support
642#
643
644#
645# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
646#
647
648#
649# Real Time Clock
650#
651# CONFIG_RTC_CLASS is not set
652
653#
654# DMA Engine support
655#
656# CONFIG_DMA_ENGINE is not set
657
658#
659# DMA Clients
660#
661
662#
663# DMA Devices
664#
665
666#
667# File systems
668#
669CONFIG_EXT2_FS=y
670CONFIG_EXT2_FS_XATTR=y
671# CONFIG_EXT2_FS_POSIX_ACL is not set
672# CONFIG_EXT2_FS_SECURITY is not set
673# CONFIG_EXT2_FS_XIP is not set
674CONFIG_EXT3_FS=y
675CONFIG_EXT3_FS_XATTR=y
676# CONFIG_EXT3_FS_POSIX_ACL is not set
677# CONFIG_EXT3_FS_SECURITY is not set
678# CONFIG_EXT4DEV_FS is not set
679CONFIG_JBD=y
680# CONFIG_JBD_DEBUG is not set
681CONFIG_FS_MBCACHE=y
682# CONFIG_REISERFS_FS is not set
683# CONFIG_JFS_FS is not set
684# CONFIG_FS_POSIX_ACL is not set
685# CONFIG_XFS_FS is not set
686# CONFIG_GFS2_FS is not set
687# CONFIG_OCFS2_FS is not set
688# CONFIG_MINIX_FS is not set
689# CONFIG_ROMFS_FS is not set
690CONFIG_INOTIFY=y
691CONFIG_INOTIFY_USER=y
692# CONFIG_QUOTA is not set
693CONFIG_DNOTIFY=y
694# CONFIG_AUTOFS_FS is not set
695# CONFIG_AUTOFS4_FS is not set
696# CONFIG_FUSE_FS is not set
697
698#
699# CD-ROM/DVD Filesystems
700#
701# CONFIG_ISO9660_FS is not set
702# CONFIG_UDF_FS is not set
703
704#
705# DOS/FAT/NT Filesystems
706#
707# CONFIG_MSDOS_FS is not set
708# CONFIG_VFAT_FS is not set
709# CONFIG_NTFS_FS is not set
710
711#
712# Pseudo filesystems
713#
714CONFIG_PROC_FS=y
715# CONFIG_PROC_KCORE is not set
716CONFIG_PROC_SYSCTL=y
717CONFIG_SYSFS=y
718CONFIG_TMPFS=y
719# CONFIG_TMPFS_POSIX_ACL is not set
720# CONFIG_HUGETLB_PAGE is not set
721CONFIG_RAMFS=y
722# CONFIG_CONFIGFS_FS is not set
723
724#
725# Miscellaneous filesystems
726#
727# CONFIG_ADFS_FS is not set
728# CONFIG_AFFS_FS is not set
729# CONFIG_HFS_FS is not set
730# CONFIG_HFSPLUS_FS is not set
731# CONFIG_BEFS_FS is not set
732# CONFIG_BFS_FS is not set
733# CONFIG_EFS_FS is not set
734CONFIG_CRAMFS=y
735# CONFIG_VXFS_FS is not set
736# CONFIG_HPFS_FS is not set
737# CONFIG_QNX4FS_FS is not set
738# CONFIG_SYSV_FS is not set
739# CONFIG_UFS_FS is not set
740
741#
742# Network File Systems
743#
744CONFIG_NFS_FS=y
745CONFIG_NFS_V3=y
746# CONFIG_NFS_V3_ACL is not set
747# CONFIG_NFS_V4 is not set
748# CONFIG_NFS_DIRECTIO is not set
749# CONFIG_NFSD is not set
750CONFIG_ROOT_NFS=y
751CONFIG_LOCKD=y
752CONFIG_LOCKD_V4=y
753CONFIG_NFS_COMMON=y
754CONFIG_SUNRPC=y
755# CONFIG_RPCSEC_GSS_KRB5 is not set
756# CONFIG_RPCSEC_GSS_SPKM3 is not set
757# CONFIG_SMB_FS is not set
758# CONFIG_CIFS is not set
759# CONFIG_NCP_FS is not set
760# CONFIG_CODA_FS is not set
761# CONFIG_AFS_FS is not set
762# CONFIG_9P_FS is not set
763
764#
765# Partition Types
766#
767CONFIG_PARTITION_ADVANCED=y
768# CONFIG_ACORN_PARTITION is not set
769# CONFIG_OSF_PARTITION is not set
770# CONFIG_AMIGA_PARTITION is not set
771# CONFIG_ATARI_PARTITION is not set
772# CONFIG_MAC_PARTITION is not set
773CONFIG_MSDOS_PARTITION=y
774# CONFIG_BSD_DISKLABEL is not set
775# CONFIG_MINIX_SUBPARTITION is not set
776# CONFIG_SOLARIS_X86_PARTITION is not set
777# CONFIG_UNIXWARE_DISKLABEL is not set
778# CONFIG_LDM_PARTITION is not set
779# CONFIG_SGI_PARTITION is not set
780# CONFIG_ULTRIX_PARTITION is not set
781# CONFIG_SUN_PARTITION is not set
782# CONFIG_KARMA_PARTITION is not set
783# CONFIG_EFI_PARTITION is not set
784
785#
786# Native Language Support
787#
788# CONFIG_NLS is not set
789
790#
791# Library routines
792#
793CONFIG_CRC_CCITT=y
794# CONFIG_CRC16 is not set
795CONFIG_CRC32=y
796# CONFIG_LIBCRC32C is not set
797CONFIG_ZLIB_INFLATE=y
798CONFIG_PLIST=y
799
800#
801# Instrumentation Support
802#
803# CONFIG_PROFILING is not set
804
805#
806# Kernel hacking
807#
808# CONFIG_PRINTK_TIME is not set
809CONFIG_ENABLE_MUST_CHECK=y
810# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set
812# CONFIG_DEBUG_KERNEL is not set
813CONFIG_LOG_BUF_SHIFT=14
814# CONFIG_DEBUG_FS is not set
815# CONFIG_UNWIND_INFO is not set
816# CONFIG_HEADERS_CHECK is not set
817# CONFIG_BOOTX_TEXT is not set
818# CONFIG_PPC_EARLY_DEBUG is not set
819
820#
821# Security options
822#
823# CONFIG_KEYS is not set
824# CONFIG_SECURITY is not set
825
826#
827# Cryptographic options
828#
829# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
new file mode 100644
index 000000000000..e2c17d8da4fc
--- /dev/null
+++ b/arch/powerpc/configs/mpc885_ads_defconfig
@@ -0,0 +1,827 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc4
4# Fri Nov 10 21:30:40 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set
26
27#
28# Processor support
29#
30# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41CONFIG_NOT_COHERENT_CACHE=y
42CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43
44#
45# Code maturity level options
46#
47CONFIG_EXPERIMENTAL=y
48CONFIG_BROKEN_ON_SMP=y
49CONFIG_INIT_ENV_ARG_LIMIT=32
50
51#
52# General setup
53#
54CONFIG_LOCALVERSION=""
55CONFIG_LOCALVERSION_AUTO=y
56# CONFIG_SWAP is not set
57CONFIG_SYSVIPC=y
58# CONFIG_IPC_NS is not set
59# CONFIG_POSIX_MQUEUE is not set
60# CONFIG_BSD_PROCESS_ACCT is not set
61# CONFIG_TASKSTATS is not set
62# CONFIG_UTS_NS is not set
63# CONFIG_AUDIT is not set
64# CONFIG_IKCONFIG is not set
65# CONFIG_RELAY is not set
66CONFIG_INITRAMFS_SOURCE=""
67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
68CONFIG_SYSCTL=y
69CONFIG_EMBEDDED=y
70# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_EXTRA_PASS is not set
73# CONFIG_HOTPLUG is not set
74CONFIG_PRINTK=y
75# CONFIG_BUG is not set
76CONFIG_ELF_CORE=y
77# CONFIG_BASE_FULL is not set
78CONFIG_FUTEX=y
79# CONFIG_EPOLL is not set
80CONFIG_SHMEM=y
81CONFIG_SLAB=y
82# CONFIG_VM_EVENT_COUNTERS is not set
83CONFIG_RT_MUTEXES=y
84# CONFIG_TINY_SHMEM is not set
85CONFIG_BASE_SMALL=1
86# CONFIG_SLOB is not set
87
88#
89# Loadable module support
90#
91# CONFIG_MODULES is not set
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
106CONFIG_IOSCHED_DEADLINE=y
107CONFIG_IOSCHED_CFQ=y
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# CONFIG_WANT_EARLY_SERIAL is not set
114CONFIG_EMBEDDEDBOOT=y
115# CONFIG_MPIC is not set
116
117#
118# Platform support
119#
120CONFIG_CPM1=y
121# CONFIG_MPC8XXFADS is not set
122# CONFIG_MPC86XADS is not set
123CONFIG_MPC885ADS=y
124
125#
126# MPC8xx CPM Options
127#
128
129#
130# Generic MPC8xx Options
131#
132CONFIG_8xx_COPYBACK=y
133# CONFIG_8xx_CPU6 is not set
134CONFIG_NO_UCODE_PATCH=y
135# CONFIG_USB_SOF_UCODE_PATCH is not set
136# CONFIG_I2C_SPI_UCODE_PATCH is not set
137# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144# CONFIG_HZ_250 is not set
145CONFIG_HZ_1000=y
146CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set
159# CONFIG_SPARSEMEM_MANUAL is not set
160CONFIG_FLATMEM=y
161CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set
165# CONFIG_PROC_DEVICETREE is not set
166# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set
168# CONFIG_SECCOMP is not set
169CONFIG_ISA_DMA_API=y
170
171#
172# Bus options
173#
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_FSL_SOC=y
177# CONFIG_PCI is not set
178# CONFIG_PCI_DOMAINS is not set
179# CONFIG_PCI_QSPAN is not set
180
181#
182# PCCARD (PCMCIA/CardBus) support
183#
184
185#
186# PCI Hotplug Support
187#
188
189#
190# Advanced setup
191#
192# CONFIG_ADVANCED_OPTIONS is not set
193
194#
195# Default settings for advanced configuration options are used
196#
197CONFIG_HIGHMEM_START=0xfe000000
198CONFIG_LOWMEM_SIZE=0x30000000
199CONFIG_KERNEL_START=0xc0000000
200CONFIG_TASK_SIZE=0x80000000
201CONFIG_CONSISTENT_START=0xff100000
202CONFIG_CONSISTENT_SIZE=0x00200000
203CONFIG_BOOT_LOAD=0x00400000
204
205#
206# Networking
207#
208CONFIG_NET=y
209
210#
211# Networking options
212#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y
217CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set
220# CONFIG_NET_KEY is not set
221CONFIG_INET=y
222CONFIG_IP_MULTICAST=y
223# CONFIG_IP_ADVANCED_ROUTER is not set
224CONFIG_IP_FIB_HASH=y
225CONFIG_IP_PNP=y
226# CONFIG_IP_PNP_DHCP is not set
227# CONFIG_IP_PNP_BOOTP is not set
228# CONFIG_IP_PNP_RARP is not set
229# CONFIG_NET_IPIP is not set
230# CONFIG_NET_IPGRE is not set
231# CONFIG_IP_MROUTE is not set
232# CONFIG_ARPD is not set
233CONFIG_SYN_COOKIES=y
234# CONFIG_INET_AH is not set
235# CONFIG_INET_ESP is not set
236# CONFIG_INET_IPCOMP is not set
237# CONFIG_INET_XFRM_TUNNEL is not set
238# CONFIG_INET_TUNNEL is not set
239CONFIG_INET_XFRM_MODE_TRANSPORT=y
240CONFIG_INET_XFRM_MODE_TUNNEL=y
241CONFIG_INET_XFRM_MODE_BEET=y
242CONFIG_INET_DIAG=y
243CONFIG_INET_TCP_DIAG=y
244# CONFIG_TCP_CONG_ADVANCED is not set
245CONFIG_TCP_CONG_CUBIC=y
246CONFIG_DEFAULT_TCP_CONG="cubic"
247# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set
250# CONFIG_NETWORK_SECMARK is not set
251# CONFIG_NETFILTER is not set
252
253#
254# DCCP Configuration (EXPERIMENTAL)
255#
256# CONFIG_IP_DCCP is not set
257
258#
259# SCTP Configuration (EXPERIMENTAL)
260#
261# CONFIG_IP_SCTP is not set
262
263#
264# TIPC Configuration (EXPERIMENTAL)
265#
266# CONFIG_TIPC is not set
267# CONFIG_ATM is not set
268# CONFIG_BRIDGE is not set
269# CONFIG_VLAN_8021Q is not set
270# CONFIG_DECNET is not set
271# CONFIG_LLC2 is not set
272# CONFIG_IPX is not set
273# CONFIG_ATALK is not set
274# CONFIG_X25 is not set
275# CONFIG_LAPB is not set
276# CONFIG_ECONET is not set
277# CONFIG_WAN_ROUTER is not set
278
279#
280# QoS and/or fair queueing
281#
282# CONFIG_NET_SCHED is not set
283
284#
285# Network testing
286#
287# CONFIG_NET_PKTGEN is not set
288# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set
290# CONFIG_BT is not set
291# CONFIG_IEEE80211 is not set
292
293#
294# Device Drivers
295#
296
297#
298# Generic Driver Options
299#
300CONFIG_STANDALONE=y
301CONFIG_PREVENT_FIRMWARE_BUILD=y
302# CONFIG_SYS_HYPERVISOR is not set
303
304#
305# Connector - unified userspace <-> kernelspace linker
306#
307# CONFIG_CONNECTOR is not set
308
309#
310# Memory Technology Devices (MTD)
311#
312# CONFIG_MTD is not set
313
314#
315# Parallel port support
316#
317# CONFIG_PARPORT is not set
318
319#
320# Plug and Play support
321#
322
323#
324# Block devices
325#
326# CONFIG_BLK_DEV_FD is not set
327# CONFIG_BLK_DEV_COW_COMMON is not set
328CONFIG_BLK_DEV_LOOP=y
329# CONFIG_BLK_DEV_CRYPTOLOOP is not set
330# CONFIG_BLK_DEV_NBD is not set
331# CONFIG_BLK_DEV_RAM is not set
332# CONFIG_BLK_DEV_INITRD is not set
333# CONFIG_CDROM_PKTCDVD is not set
334# CONFIG_ATA_OVER_ETH is not set
335
336#
337# Misc devices
338#
339# CONFIG_TIFM_CORE is not set
340
341#
342# ATA/ATAPI/MFM/RLL support
343#
344# CONFIG_IDE is not set
345
346#
347# SCSI device support
348#
349# CONFIG_RAID_ATTRS is not set
350# CONFIG_SCSI is not set
351# CONFIG_SCSI_NETLINK is not set
352
353#
354# Serial ATA (prod) and Parallel ATA (experimental) drivers
355#
356# CONFIG_ATA is not set
357
358#
359# Multi-device support (RAID and LVM)
360#
361# CONFIG_MD is not set
362
363#
364# Fusion MPT device support
365#
366# CONFIG_FUSION is not set
367
368#
369# IEEE 1394 (FireWire) support
370#
371
372#
373# I2O device support
374#
375
376#
377# Macintosh device drivers
378#
379# CONFIG_WINDFARM is not set
380
381#
382# Network device support
383#
384CONFIG_NETDEVICES=y
385# CONFIG_DUMMY is not set
386# CONFIG_BONDING is not set
387# CONFIG_EQUALIZER is not set
388# CONFIG_TUN is not set
389
390#
391# PHY device support
392#
393CONFIG_PHYLIB=y
394
395#
396# MII PHY device drivers
397#
398# CONFIG_MARVELL_PHY is not set
399CONFIG_DAVICOM_PHY=y
400# CONFIG_QSEMI_PHY is not set
401# CONFIG_LXT_PHY is not set
402# CONFIG_CICADA_PHY is not set
403# CONFIG_VITESSE_PHY is not set
404# CONFIG_SMSC_PHY is not set
405CONFIG_FIXED_PHY=y
406CONFIG_FIXED_MII_10_FDX=y
407# CONFIG_FIXED_MII_100_FDX is not set
408
409#
410# Ethernet (10 or 100Mbit)
411#
412CONFIG_NET_ETHERNET=y
413CONFIG_MII=y
414# CONFIG_FEC_8XX is not set
415CONFIG_FS_ENET=y
416CONFIG_FS_ENET_HAS_SCC=y
417CONFIG_FS_ENET_HAS_FEC=y
418
419#
420# Ethernet (1000 Mbit)
421#
422
423#
424# Ethernet (10000 Mbit)
425#
426
427#
428# Token Ring devices
429#
430
431#
432# Wireless LAN (non-hamradio)
433#
434# CONFIG_NET_RADIO is not set
435
436#
437# Wan interfaces
438#
439# CONFIG_WAN is not set
440# CONFIG_PPP is not set
441# CONFIG_SLIP is not set
442# CONFIG_SHAPER is not set
443# CONFIG_NETCONSOLE is not set
444# CONFIG_NETPOLL is not set
445# CONFIG_NET_POLL_CONTROLLER is not set
446
447#
448# ISDN subsystem
449#
450# CONFIG_ISDN is not set
451
452#
453# Telephony Support
454#
455# CONFIG_PHONE is not set
456
457#
458# Input device support
459#
460CONFIG_INPUT=y
461# CONFIG_INPUT_FF_MEMLESS is not set
462
463#
464# Userland interfaces
465#
466CONFIG_INPUT_MOUSEDEV=y
467CONFIG_INPUT_MOUSEDEV_PSAUX=y
468CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
469CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
470# CONFIG_INPUT_JOYDEV is not set
471# CONFIG_INPUT_TSDEV is not set
472# CONFIG_INPUT_EVDEV is not set
473# CONFIG_INPUT_EVBUG is not set
474
475#
476# Input Device Drivers
477#
478CONFIG_INPUT_KEYBOARD=y
479CONFIG_KEYBOARD_ATKBD=y
480# CONFIG_KEYBOARD_SUNKBD is not set
481# CONFIG_KEYBOARD_LKKBD is not set
482# CONFIG_KEYBOARD_XTKBD is not set
483# CONFIG_KEYBOARD_NEWTON is not set
484# CONFIG_KEYBOARD_STOWAWAY is not set
485CONFIG_INPUT_MOUSE=y
486CONFIG_MOUSE_PS2=y
487# CONFIG_MOUSE_SERIAL is not set
488# CONFIG_MOUSE_VSXXXAA is not set
489# CONFIG_INPUT_JOYSTICK is not set
490# CONFIG_INPUT_TOUCHSCREEN is not set
491# CONFIG_INPUT_MISC is not set
492
493#
494# Hardware I/O ports
495#
496CONFIG_SERIO=y
497CONFIG_SERIO_I8042=y
498CONFIG_SERIO_SERPORT=y
499CONFIG_SERIO_LIBPS2=y
500# CONFIG_SERIO_RAW is not set
501# CONFIG_GAMEPORT is not set
502
503#
504# Character devices
505#
506# CONFIG_VT is not set
507# CONFIG_SERIAL_NONSTANDARD is not set
508
509#
510# Serial drivers
511#
512# CONFIG_SERIAL_8250 is not set
513
514#
515# Non-8250 serial port support
516#
517CONFIG_SERIAL_CORE=y
518CONFIG_SERIAL_CORE_CONSOLE=y
519CONFIG_SERIAL_CPM=y
520CONFIG_SERIAL_CPM_CONSOLE=y
521# CONFIG_SERIAL_CPM_SCC1 is not set
522# CONFIG_SERIAL_CPM_SCC2 is not set
523# CONFIG_SERIAL_CPM_SCC3 is not set
524# CONFIG_SERIAL_CPM_SCC4 is not set
525CONFIG_SERIAL_CPM_SMC1=y
526CONFIG_SERIAL_CPM_SMC2=y
527CONFIG_UNIX98_PTYS=y
528# CONFIG_LEGACY_PTYS is not set
529
530#
531# IPMI
532#
533# CONFIG_IPMI_HANDLER is not set
534
535#
536# Watchdog Cards
537#
538# CONFIG_WATCHDOG is not set
539CONFIG_HW_RANDOM=y
540# CONFIG_NVRAM is not set
541CONFIG_GEN_RTC=y
542# CONFIG_GEN_RTC_X is not set
543# CONFIG_DTLK is not set
544# CONFIG_R3964 is not set
545
546#
547# Ftape, the floppy tape device driver
548#
549# CONFIG_RAW_DRIVER is not set
550
551#
552# TPM devices
553#
554# CONFIG_TCG_TPM is not set
555
556#
557# I2C support
558#
559# CONFIG_I2C is not set
560
561#
562# SPI support
563#
564# CONFIG_SPI is not set
565# CONFIG_SPI_MASTER is not set
566
567#
568# Dallas's 1-wire bus
569#
570# CONFIG_W1 is not set
571
572#
573# Hardware Monitoring support
574#
575CONFIG_HWMON=y
576# CONFIG_HWMON_VID is not set
577# CONFIG_SENSORS_ABITUGURU is not set
578# CONFIG_SENSORS_F71805F is not set
579# CONFIG_SENSORS_VT1211 is not set
580# CONFIG_HWMON_DEBUG_CHIP is not set
581
582#
583# Multimedia devices
584#
585# CONFIG_VIDEO_DEV is not set
586
587#
588# Digital Video Broadcasting Devices
589#
590# CONFIG_DVB is not set
591
592#
593# Graphics support
594#
595CONFIG_FIRMWARE_EDID=y
596# CONFIG_FB is not set
597# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
598
599#
600# Sound
601#
602# CONFIG_SOUND is not set
603
604#
605# USB support
606#
607# CONFIG_USB_ARCH_HAS_HCD is not set
608# CONFIG_USB_ARCH_HAS_OHCI is not set
609# CONFIG_USB_ARCH_HAS_EHCI is not set
610
611#
612# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
613#
614
615#
616# USB Gadget Support
617#
618# CONFIG_USB_GADGET is not set
619
620#
621# MMC/SD Card support
622#
623# CONFIG_MMC is not set
624
625#
626# LED devices
627#
628# CONFIG_NEW_LEDS is not set
629
630#
631# LED drivers
632#
633
634#
635# LED Triggers
636#
637
638#
639# InfiniBand support
640#
641
642#
643# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
644#
645
646#
647# Real Time Clock
648#
649# CONFIG_RTC_CLASS is not set
650
651#
652# DMA Engine support
653#
654# CONFIG_DMA_ENGINE is not set
655
656#
657# DMA Clients
658#
659
660#
661# DMA Devices
662#
663
664#
665# File systems
666#
667CONFIG_EXT2_FS=y
668CONFIG_EXT2_FS_XATTR=y
669# CONFIG_EXT2_FS_POSIX_ACL is not set
670# CONFIG_EXT2_FS_SECURITY is not set
671# CONFIG_EXT2_FS_XIP is not set
672CONFIG_EXT3_FS=y
673CONFIG_EXT3_FS_XATTR=y
674# CONFIG_EXT3_FS_POSIX_ACL is not set
675# CONFIG_EXT3_FS_SECURITY is not set
676# CONFIG_EXT4DEV_FS is not set
677CONFIG_JBD=y
678# CONFIG_JBD_DEBUG is not set
679CONFIG_FS_MBCACHE=y
680# CONFIG_REISERFS_FS is not set
681# CONFIG_JFS_FS is not set
682# CONFIG_FS_POSIX_ACL is not set
683# CONFIG_XFS_FS is not set
684# CONFIG_GFS2_FS is not set
685# CONFIG_OCFS2_FS is not set
686# CONFIG_MINIX_FS is not set
687# CONFIG_ROMFS_FS is not set
688CONFIG_INOTIFY=y
689CONFIG_INOTIFY_USER=y
690# CONFIG_QUOTA is not set
691CONFIG_DNOTIFY=y
692# CONFIG_AUTOFS_FS is not set
693# CONFIG_AUTOFS4_FS is not set
694# CONFIG_FUSE_FS is not set
695
696#
697# CD-ROM/DVD Filesystems
698#
699# CONFIG_ISO9660_FS is not set
700# CONFIG_UDF_FS is not set
701
702#
703# DOS/FAT/NT Filesystems
704#
705# CONFIG_MSDOS_FS is not set
706# CONFIG_VFAT_FS is not set
707# CONFIG_NTFS_FS is not set
708
709#
710# Pseudo filesystems
711#
712CONFIG_PROC_FS=y
713# CONFIG_PROC_KCORE is not set
714CONFIG_PROC_SYSCTL=y
715CONFIG_SYSFS=y
716CONFIG_TMPFS=y
717# CONFIG_TMPFS_POSIX_ACL is not set
718# CONFIG_HUGETLB_PAGE is not set
719CONFIG_RAMFS=y
720# CONFIG_CONFIGFS_FS is not set
721
722#
723# Miscellaneous filesystems
724#
725# CONFIG_ADFS_FS is not set
726# CONFIG_AFFS_FS is not set
727# CONFIG_HFS_FS is not set
728# CONFIG_HFSPLUS_FS is not set
729# CONFIG_BEFS_FS is not set
730# CONFIG_BFS_FS is not set
731# CONFIG_EFS_FS is not set
732CONFIG_CRAMFS=y
733# CONFIG_VXFS_FS is not set
734# CONFIG_HPFS_FS is not set
735# CONFIG_QNX4FS_FS is not set
736# CONFIG_SYSV_FS is not set
737# CONFIG_UFS_FS is not set
738
739#
740# Network File Systems
741#
742CONFIG_NFS_FS=y
743CONFIG_NFS_V3=y
744# CONFIG_NFS_V3_ACL is not set
745# CONFIG_NFS_V4 is not set
746# CONFIG_NFS_DIRECTIO is not set
747# CONFIG_NFSD is not set
748CONFIG_ROOT_NFS=y
749CONFIG_LOCKD=y
750CONFIG_LOCKD_V4=y
751CONFIG_NFS_COMMON=y
752CONFIG_SUNRPC=y
753# CONFIG_RPCSEC_GSS_KRB5 is not set
754# CONFIG_RPCSEC_GSS_SPKM3 is not set
755# CONFIG_SMB_FS is not set
756# CONFIG_CIFS is not set
757# CONFIG_NCP_FS is not set
758# CONFIG_CODA_FS is not set
759# CONFIG_AFS_FS is not set
760# CONFIG_9P_FS is not set
761
762#
763# Partition Types
764#
765CONFIG_PARTITION_ADVANCED=y
766# CONFIG_ACORN_PARTITION is not set
767# CONFIG_OSF_PARTITION is not set
768# CONFIG_AMIGA_PARTITION is not set
769# CONFIG_ATARI_PARTITION is not set
770# CONFIG_MAC_PARTITION is not set
771CONFIG_MSDOS_PARTITION=y
772# CONFIG_BSD_DISKLABEL is not set
773# CONFIG_MINIX_SUBPARTITION is not set
774# CONFIG_SOLARIS_X86_PARTITION is not set
775# CONFIG_UNIXWARE_DISKLABEL is not set
776# CONFIG_LDM_PARTITION is not set
777# CONFIG_SGI_PARTITION is not set
778# CONFIG_ULTRIX_PARTITION is not set
779# CONFIG_SUN_PARTITION is not set
780# CONFIG_KARMA_PARTITION is not set
781# CONFIG_EFI_PARTITION is not set
782
783#
784# Native Language Support
785#
786# CONFIG_NLS is not set
787
788#
789# Library routines
790#
791CONFIG_CRC_CCITT=y
792# CONFIG_CRC16 is not set
793CONFIG_CRC32=y
794# CONFIG_LIBCRC32C is not set
795CONFIG_ZLIB_INFLATE=y
796CONFIG_PLIST=y
797
798#
799# Instrumentation Support
800#
801# CONFIG_PROFILING is not set
802
803#
804# Kernel hacking
805#
806# CONFIG_PRINTK_TIME is not set
807CONFIG_ENABLE_MUST_CHECK=y
808# CONFIG_MAGIC_SYSRQ is not set
809# CONFIG_UNUSED_SYMBOLS is not set
810# CONFIG_DEBUG_KERNEL is not set
811CONFIG_LOG_BUF_SHIFT=14
812# CONFIG_DEBUG_FS is not set
813# CONFIG_UNWIND_INFO is not set
814# CONFIG_HEADERS_CHECK is not set
815# CONFIG_BOOTX_TEXT is not set
816# CONFIG_PPC_EARLY_DEBUG is not set
817
818#
819# Security options
820#
821# CONFIG_KEYS is not set
822# CONFIG_SECURITY is not set
823
824#
825# Cryptographic options
826#
827# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
new file mode 100644
index 000000000000..97a57e996663
--- /dev/null
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -0,0 +1,1722 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc6
4# Thu Feb 1 22:54:15 2007
5#
6CONFIG_PPC64=y
7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y
18CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y
21CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y
25CONFIG_PPC_UDBG_16550=y
26CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34CONFIG_POWER4_ONLY=y
35CONFIG_POWER4=y
36CONFIG_PPC_FPU=y
37# CONFIG_PPC_DCR_NATIVE is not set
38# CONFIG_PPC_DCR_MMIO is not set
39# CONFIG_PPC_OF_PLATFORM_PCI is not set
40CONFIG_ALTIVEC=y
41CONFIG_PPC_STD_MMU=y
42# CONFIG_VIRT_CPU_ACCOUNTING is not set
43CONFIG_SMP=y
44CONFIG_NR_CPUS=2
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46
47#
48# Code maturity level options
49#
50CONFIG_EXPERIMENTAL=y
51CONFIG_LOCK_KERNEL=y
52CONFIG_INIT_ENV_ARG_LIMIT=32
53
54#
55# General setup
56#
57CONFIG_LOCALVERSION=""
58CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y
60CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set
62# CONFIG_POSIX_MQUEUE is not set
63# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set
65# CONFIG_UTS_NS is not set
66# CONFIG_AUDIT is not set
67# CONFIG_IKCONFIG is not set
68# CONFIG_CPUSETS is not set
69CONFIG_SYSFS_DEPRECATED=y
70# CONFIG_RELAY is not set
71CONFIG_INITRAMFS_SOURCE=""
72# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
73CONFIG_SYSCTL=y
74# CONFIG_EMBEDDED is not set
75CONFIG_SYSCTL_SYSCALL=y
76CONFIG_KALLSYMS=y
77# CONFIG_KALLSYMS_ALL is not set
78# CONFIG_KALLSYMS_EXTRA_PASS is not set
79CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y
81CONFIG_BUG=y
82CONFIG_ELF_CORE=y
83CONFIG_BASE_FULL=y
84CONFIG_FUTEX=y
85CONFIG_EPOLL=y
86CONFIG_SHMEM=y
87CONFIG_SLAB=y
88CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_RT_MUTEXES=y
90# CONFIG_TINY_SHMEM is not set
91CONFIG_BASE_SMALL=0
92# CONFIG_SLOB is not set
93
94#
95# Loadable module support
96#
97CONFIG_MODULES=y
98CONFIG_MODULE_UNLOAD=y
99# CONFIG_MODULE_FORCE_UNLOAD is not set
100# CONFIG_MODVERSIONS is not set
101# CONFIG_MODULE_SRCVERSION_ALL is not set
102# CONFIG_KMOD is not set
103CONFIG_STOP_MACHINE=y
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_BLK_DEV_IO_TRACE is not set
110
111#
112# IO Schedulers
113#
114CONFIG_IOSCHED_NOOP=y
115CONFIG_IOSCHED_AS=y
116# CONFIG_IOSCHED_DEADLINE is not set
117# CONFIG_IOSCHED_CFQ is not set
118CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_DEADLINE is not set
120# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="anticipatory"
123
124#
125# Platform support
126#
127CONFIG_PPC_MULTIPLATFORM=y
128# CONFIG_EMBEDDED6xx is not set
129# CONFIG_APUS is not set
130CONFIG_PPC_PSERIES=y
131# CONFIG_PPC_ISERIES is not set
132# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_PMAC is not set
134# CONFIG_PPC_MAPLE is not set
135CONFIG_PPC_PASEMI=y
136# CONFIG_PPC_CELL is not set
137# CONFIG_PPC_CELL_NATIVE is not set
138# CONFIG_PPC_IBM_CELL_BLADE is not set
139# CONFIG_PPC_PS3 is not set
140CONFIG_PPC_NATIVE=y
141# CONFIG_UDBG_RTAS_CONSOLE is not set
142CONFIG_XICS=y
143# CONFIG_U3_DART is not set
144CONFIG_PPC_RTAS=y
145CONFIG_RTAS_ERROR_LOGGING=y
146CONFIG_RTAS_PROC=y
147# CONFIG_RTAS_FLASH is not set
148# CONFIG_MMIO_NVRAM is not set
149CONFIG_IBMVIO=y
150# CONFIG_IBMEBUS is not set
151# CONFIG_PPC_MPC106 is not set
152# CONFIG_PPC_970_NAP is not set
153# CONFIG_PPC_INDIRECT_IO is not set
154# CONFIG_GENERIC_IOMAP is not set
155# CONFIG_CPU_FREQ is not set
156# CONFIG_WANT_EARLY_SERIAL is not set
157CONFIG_MPIC=y
158
159#
160# PA Semi PWRficient options
161#
162CONFIG_PPC_PASEMI_IOMMU=y
163
164#
165# Kernel options
166#
167CONFIG_HZ_100=y
168# CONFIG_HZ_250 is not set
169# CONFIG_HZ_300 is not set
170# CONFIG_HZ_1000 is not set
171CONFIG_HZ=100
172CONFIG_PREEMPT_NONE=y
173# CONFIG_PREEMPT_VOLUNTARY is not set
174# CONFIG_PREEMPT is not set
175CONFIG_PREEMPT_BKL=y
176CONFIG_BINFMT_ELF=y
177# CONFIG_BINFMT_MISC is not set
178CONFIG_FORCE_MAX_ZONEORDER=13
179CONFIG_IOMMU_VMERGE=y
180# CONFIG_HOTPLUG_CPU is not set
181CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
182# CONFIG_KEXEC is not set
183# CONFIG_CRASH_DUMP is not set
184# CONFIG_IRQ_ALL_CPUS is not set
185# CONFIG_PPC_SPLPAR is not set
186CONFIG_EEH=y
187# CONFIG_SCANLOG is not set
188# CONFIG_LPARCFG is not set
189# CONFIG_NUMA is not set
190CONFIG_ARCH_SELECT_MEMORY_MODEL=y
191CONFIG_ARCH_FLATMEM_ENABLE=y
192CONFIG_ARCH_SPARSEMEM_ENABLE=y
193CONFIG_ARCH_SPARSEMEM_DEFAULT=y
194CONFIG_ARCH_POPULATES_NODE_MAP=y
195CONFIG_SELECT_MEMORY_MODEL=y
196CONFIG_FLATMEM_MANUAL=y
197# CONFIG_DISCONTIGMEM_MANUAL is not set
198# CONFIG_SPARSEMEM_MANUAL is not set
199CONFIG_FLATMEM=y
200CONFIG_FLAT_NODE_MEM_MAP=y
201# CONFIG_SPARSEMEM_STATIC is not set
202CONFIG_SPLIT_PTLOCK_CPUS=4
203CONFIG_RESOURCES_64BIT=y
204# CONFIG_PPC_64K_PAGES is not set
205# CONFIG_SCHED_SMT is not set
206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set
209# CONFIG_SECCOMP is not set
210CONFIG_ISA_DMA_API=y
211
212#
213# Bus options
214#
215CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217CONFIG_PPC_I8259=y
218# CONFIG_PPC_INDIRECT_PCI is not set
219CONFIG_PCI=y
220CONFIG_PCI_DOMAINS=y
221# CONFIG_PCIEPORTBUS is not set
222# CONFIG_PCI_DEBUG is not set
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227CONFIG_PCCARD=y
228CONFIG_PCMCIA_DEBUG=y
229CONFIG_PCMCIA=y
230CONFIG_PCMCIA_LOAD_CIS=y
231CONFIG_PCMCIA_IOCTL=y
232CONFIG_CARDBUS=y
233
234#
235# PC-card bridges
236#
237# CONFIG_YENTA is not set
238# CONFIG_PD6729 is not set
239# CONFIG_I82092 is not set
240
241#
242# PCI Hotplug Support
243#
244# CONFIG_HOTPLUG_PCI is not set
245CONFIG_KERNEL_START=0xc000000000000000
246
247#
248# Networking
249#
250CONFIG_NET=y
251
252#
253# Networking options
254#
255# CONFIG_NETDEBUG is not set
256CONFIG_PACKET=y
257# CONFIG_PACKET_MMAP is not set
258CONFIG_UNIX=y
259CONFIG_XFRM=y
260# CONFIG_XFRM_USER is not set
261# CONFIG_XFRM_SUB_POLICY is not set
262CONFIG_NET_KEY=y
263CONFIG_INET=y
264CONFIG_IP_MULTICAST=y
265# CONFIG_IP_ADVANCED_ROUTER is not set
266CONFIG_IP_FIB_HASH=y
267CONFIG_IP_PNP=y
268CONFIG_IP_PNP_DHCP=y
269CONFIG_IP_PNP_BOOTP=y
270CONFIG_IP_PNP_RARP=y
271CONFIG_NET_IPIP=y
272# CONFIG_NET_IPGRE is not set
273# CONFIG_IP_MROUTE is not set
274# CONFIG_ARPD is not set
275CONFIG_SYN_COOKIES=y
276CONFIG_INET_AH=y
277CONFIG_INET_ESP=y
278# CONFIG_INET_IPCOMP is not set
279# CONFIG_INET_XFRM_TUNNEL is not set
280CONFIG_INET_TUNNEL=y
281CONFIG_INET_XFRM_MODE_TRANSPORT=y
282CONFIG_INET_XFRM_MODE_TUNNEL=y
283CONFIG_INET_XFRM_MODE_BEET=y
284CONFIG_INET_DIAG=y
285CONFIG_INET_TCP_DIAG=y
286# CONFIG_TCP_CONG_ADVANCED is not set
287CONFIG_TCP_CONG_CUBIC=y
288CONFIG_DEFAULT_TCP_CONG="cubic"
289# CONFIG_TCP_MD5SIG is not set
290# CONFIG_IPV6 is not set
291# CONFIG_INET6_XFRM_TUNNEL is not set
292# CONFIG_INET6_TUNNEL is not set
293# CONFIG_NETWORK_SECMARK is not set
294# CONFIG_NETFILTER is not set
295
296#
297# DCCP Configuration (EXPERIMENTAL)
298#
299# CONFIG_IP_DCCP is not set
300
301#
302# SCTP Configuration (EXPERIMENTAL)
303#
304# CONFIG_IP_SCTP is not set
305
306#
307# TIPC Configuration (EXPERIMENTAL)
308#
309# CONFIG_TIPC is not set
310# CONFIG_ATM is not set
311# CONFIG_BRIDGE is not set
312# CONFIG_VLAN_8021Q is not set
313# CONFIG_DECNET is not set
314# CONFIG_LLC2 is not set
315# CONFIG_IPX is not set
316# CONFIG_ATALK is not set
317# CONFIG_X25 is not set
318# CONFIG_LAPB is not set
319# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set
321
322#
323# QoS and/or fair queueing
324#
325# CONFIG_NET_SCHED is not set
326
327#
328# Network testing
329#
330# CONFIG_NET_PKTGEN is not set
331# CONFIG_HAMRADIO is not set
332# CONFIG_IRDA is not set
333# CONFIG_BT is not set
334# CONFIG_IEEE80211 is not set
335
336#
337# Device Drivers
338#
339
340#
341# Generic Driver Options
342#
343CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y
346# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_SYS_HYPERVISOR is not set
348
349#
350# Connector - unified userspace <-> kernelspace linker
351#
352# CONFIG_CONNECTOR is not set
353
354#
355# Memory Technology Devices (MTD)
356#
357CONFIG_MTD=y
358# CONFIG_MTD_DEBUG is not set
359CONFIG_MTD_CONCAT=y
360# CONFIG_MTD_PARTITIONS is not set
361
362#
363# User Modules And Translation Layers
364#
365CONFIG_MTD_CHAR=y
366CONFIG_MTD_BLKDEVS=y
367CONFIG_MTD_BLOCK=y
368# CONFIG_FTL is not set
369# CONFIG_NFTL is not set
370# CONFIG_INFTL is not set
371# CONFIG_RFD_FTL is not set
372# CONFIG_SSFDC is not set
373
374#
375# RAM/ROM/Flash chip drivers
376#
377# CONFIG_MTD_CFI is not set
378# CONFIG_MTD_JEDECPROBE is not set
379CONFIG_MTD_MAP_BANK_WIDTH_1=y
380CONFIG_MTD_MAP_BANK_WIDTH_2=y
381CONFIG_MTD_MAP_BANK_WIDTH_4=y
382# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
383# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
384# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
385CONFIG_MTD_CFI_I1=y
386CONFIG_MTD_CFI_I2=y
387# CONFIG_MTD_CFI_I4 is not set
388# CONFIG_MTD_CFI_I8 is not set
389# CONFIG_MTD_RAM is not set
390# CONFIG_MTD_ROM is not set
391# CONFIG_MTD_ABSENT is not set
392# CONFIG_MTD_OBSOLETE_CHIPS is not set
393
394#
395# Mapping drivers for chip access
396#
397# CONFIG_MTD_COMPLEX_MAPPINGS is not set
398# CONFIG_MTD_PLATRAM is not set
399
400#
401# Self-contained MTD device drivers
402#
403# CONFIG_MTD_PMC551 is not set
404CONFIG_MTD_SLRAM=y
405CONFIG_MTD_PHRAM=y
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
416#
417# NAND Flash Device Drivers
418#
419# CONFIG_MTD_NAND is not set
420# CONFIG_MTD_NAND_CAFE is not set
421
422#
423# OneNAND Flash Device Drivers
424#
425# CONFIG_MTD_ONENAND is not set
426
427#
428# Parallel port support
429#
430# CONFIG_PARPORT is not set
431
432#
433# Plug and Play support
434#
435
436#
437# Block devices
438#
439# CONFIG_BLK_DEV_FD is not set
440# CONFIG_BLK_CPQ_DA is not set
441# CONFIG_BLK_CPQ_CISS_DA is not set
442# CONFIG_BLK_DEV_DAC960 is not set
443# CONFIG_BLK_DEV_UMEM is not set
444# CONFIG_BLK_DEV_COW_COMMON is not set
445CONFIG_BLK_DEV_LOOP=y
446# CONFIG_BLK_DEV_CRYPTOLOOP is not set
447# CONFIG_BLK_DEV_NBD is not set
448# CONFIG_BLK_DEV_SX8 is not set
449# CONFIG_BLK_DEV_UB is not set
450CONFIG_BLK_DEV_RAM=y
451CONFIG_BLK_DEV_RAM_COUNT=16
452CONFIG_BLK_DEV_RAM_SIZE=16384
453CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
454CONFIG_BLK_DEV_INITRD=y
455# CONFIG_CDROM_PKTCDVD is not set
456# CONFIG_ATA_OVER_ETH is not set
457
458#
459# Misc devices
460#
461# CONFIG_SGI_IOC4 is not set
462# CONFIG_TIFM_CORE is not set
463
464#
465# ATA/ATAPI/MFM/RLL support
466#
467CONFIG_IDE=y
468CONFIG_BLK_DEV_IDE=y
469
470#
471# Please see Documentation/ide.txt for help/info on IDE drives
472#
473# CONFIG_BLK_DEV_IDE_SATA is not set
474CONFIG_BLK_DEV_IDEDISK=y
475CONFIG_IDEDISK_MULTI_MODE=y
476# CONFIG_BLK_DEV_IDECS is not set
477CONFIG_BLK_DEV_IDECD=y
478# CONFIG_BLK_DEV_IDETAPE is not set
479# CONFIG_BLK_DEV_IDEFLOPPY is not set
480CONFIG_BLK_DEV_IDESCSI=y
481CONFIG_IDE_TASK_IOCTL=y
482
483#
484# IDE chipset support/bugfixes
485#
486# CONFIG_IDE_GENERIC is not set
487# CONFIG_BLK_DEV_IDEPCI is not set
488# CONFIG_IDE_ARM is not set
489# CONFIG_BLK_DEV_IDEDMA is not set
490# CONFIG_IDEDMA_AUTO is not set
491# CONFIG_BLK_DEV_HD is not set
492
493#
494# SCSI device support
495#
496# CONFIG_RAID_ATTRS is not set
497CONFIG_SCSI=y
498# CONFIG_SCSI_TGT is not set
499# CONFIG_SCSI_NETLINK is not set
500CONFIG_SCSI_PROC_FS=y
501
502#
503# SCSI support type (disk, tape, CD-ROM)
504#
505CONFIG_BLK_DEV_SD=y
506CONFIG_CHR_DEV_ST=y
507CONFIG_CHR_DEV_OSST=y
508CONFIG_BLK_DEV_SR=y
509CONFIG_BLK_DEV_SR_VENDOR=y
510CONFIG_CHR_DEV_SG=y
511CONFIG_CHR_DEV_SCH=y
512
513#
514# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
515#
516CONFIG_SCSI_MULTI_LUN=y
517CONFIG_SCSI_CONSTANTS=y
518CONFIG_SCSI_LOGGING=y
519# CONFIG_SCSI_SCAN_ASYNC is not set
520
521#
522# SCSI Transports
523#
524# CONFIG_SCSI_SPI_ATTRS is not set
525# CONFIG_SCSI_FC_ATTRS is not set
526# CONFIG_SCSI_ISCSI_ATTRS is not set
527# CONFIG_SCSI_SAS_ATTRS is not set
528# CONFIG_SCSI_SAS_LIBSAS is not set
529
530#
531# SCSI low-level drivers
532#
533# CONFIG_ISCSI_TCP is not set
534CONFIG_BLK_DEV_3W_XXXX_RAID=y
535CONFIG_SCSI_3W_9XXX=y
536# CONFIG_SCSI_ACARD is not set
537# CONFIG_SCSI_AACRAID is not set
538# CONFIG_SCSI_AIC7XXX is not set
539# CONFIG_SCSI_AIC7XXX_OLD is not set
540# CONFIG_SCSI_AIC79XX is not set
541# CONFIG_SCSI_AIC94XX is not set
542# CONFIG_SCSI_ARCMSR is not set
543# CONFIG_MEGARAID_NEWGEN is not set
544# CONFIG_MEGARAID_LEGACY is not set
545# CONFIG_MEGARAID_SAS is not set
546# CONFIG_SCSI_HPTIOP is not set
547# CONFIG_SCSI_BUSLOGIC is not set
548# CONFIG_SCSI_DMX3191D is not set
549# CONFIG_SCSI_EATA is not set
550# CONFIG_SCSI_FUTURE_DOMAIN is not set
551# CONFIG_SCSI_GDTH is not set
552# CONFIG_SCSI_IPS is not set
553# CONFIG_SCSI_IBMVSCSI is not set
554# CONFIG_SCSI_INITIO is not set
555# CONFIG_SCSI_INIA100 is not set
556# CONFIG_SCSI_STEX is not set
557# CONFIG_SCSI_SYM53C8XX_2 is not set
558# CONFIG_SCSI_IPR is not set
559# CONFIG_SCSI_QLOGIC_1280 is not set
560# CONFIG_SCSI_QLA_FC is not set
561# CONFIG_SCSI_QLA_ISCSI is not set
562# CONFIG_SCSI_LPFC is not set
563# CONFIG_SCSI_DC395x is not set
564# CONFIG_SCSI_DC390T is not set
565# CONFIG_SCSI_DEBUG is not set
566# CONFIG_SCSI_SRP is not set
567
568#
569# PCMCIA SCSI adapter support
570#
571# CONFIG_PCMCIA_FDOMAIN is not set
572# CONFIG_PCMCIA_QLOGIC is not set
573# CONFIG_PCMCIA_SYM53C500 is not set
574
575#
576# Serial ATA (prod) and Parallel ATA (experimental) drivers
577#
578CONFIG_ATA=y
579# CONFIG_ATA_NONSTANDARD is not set
580# CONFIG_SATA_AHCI is not set
581CONFIG_SATA_SVW=y
582# CONFIG_ATA_PIIX is not set
583CONFIG_SATA_MV=y
584# CONFIG_SATA_NV is not set
585# CONFIG_PDC_ADMA is not set
586# CONFIG_SATA_QSTOR is not set
587# CONFIG_SATA_PROMISE is not set
588# CONFIG_SATA_SX4 is not set
589CONFIG_SATA_SIL=y
590CONFIG_SATA_SIL24=y
591# CONFIG_SATA_SIS is not set
592# CONFIG_SATA_ULI is not set
593# CONFIG_SATA_VIA is not set
594# CONFIG_SATA_VITESSE is not set
595# CONFIG_PATA_ALI is not set
596# CONFIG_PATA_AMD is not set
597# CONFIG_PATA_ARTOP is not set
598# CONFIG_PATA_ATIIXP is not set
599# CONFIG_PATA_CMD64X is not set
600# CONFIG_PATA_CS5520 is not set
601# CONFIG_PATA_CS5530 is not set
602# CONFIG_PATA_CYPRESS is not set
603# CONFIG_PATA_EFAR is not set
604CONFIG_ATA_GENERIC=y
605# CONFIG_PATA_HPT366 is not set
606# CONFIG_PATA_HPT37X is not set
607# CONFIG_PATA_HPT3X2N is not set
608# CONFIG_PATA_HPT3X3 is not set
609# CONFIG_PATA_IT821X is not set
610# CONFIG_PATA_JMICRON is not set
611# CONFIG_PATA_TRIFLEX is not set
612# CONFIG_PATA_MARVELL is not set
613# CONFIG_PATA_MPIIX is not set
614# CONFIG_PATA_OLDPIIX is not set
615# CONFIG_PATA_NETCELL is not set
616# CONFIG_PATA_NS87410 is not set
617# CONFIG_PATA_OPTI is not set
618# CONFIG_PATA_OPTIDMA is not set
619# CONFIG_PATA_PCMCIA is not set
620# CONFIG_PATA_PDC_OLD is not set
621# CONFIG_PATA_RADISYS is not set
622# CONFIG_PATA_RZ1000 is not set
623# CONFIG_PATA_SC1200 is not set
624# CONFIG_PATA_SERVERWORKS is not set
625# CONFIG_PATA_PDC2027X is not set
626# CONFIG_PATA_SIL680 is not set
627# CONFIG_PATA_SIS is not set
628# CONFIG_PATA_VIA is not set
629# CONFIG_PATA_WINBOND is not set
630
631#
632# Multi-device support (RAID and LVM)
633#
634# CONFIG_MD is not set
635
636#
637# Fusion MPT device support
638#
639# CONFIG_FUSION is not set
640# CONFIG_FUSION_SPI is not set
641# CONFIG_FUSION_FC is not set
642# CONFIG_FUSION_SAS is not set
643
644#
645# IEEE 1394 (FireWire) support
646#
647CONFIG_IEEE1394=y
648
649#
650# Subsystem Options
651#
652# CONFIG_IEEE1394_VERBOSEDEBUG is not set
653# CONFIG_IEEE1394_OUI_DB is not set
654# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
655# CONFIG_IEEE1394_EXPORT_FULL_API is not set
656
657#
658# Device Drivers
659#
660CONFIG_IEEE1394_PCILYNX=y
661CONFIG_IEEE1394_OHCI1394=y
662
663#
664# Protocol Drivers
665#
666# CONFIG_IEEE1394_VIDEO1394 is not set
667CONFIG_IEEE1394_SBP2=y
668# CONFIG_IEEE1394_ETH1394 is not set
669# CONFIG_IEEE1394_DV1394 is not set
670CONFIG_IEEE1394_RAWIO=y
671
672#
673# I2O device support
674#
675# CONFIG_I2O is not set
676
677#
678# Macintosh device drivers
679#
680# CONFIG_MAC_EMUMOUSEBTN is not set
681# CONFIG_WINDFARM is not set
682
683#
684# Network device support
685#
686CONFIG_NETDEVICES=y
687CONFIG_DUMMY=y
688# CONFIG_BONDING is not set
689# CONFIG_EQUALIZER is not set
690# CONFIG_TUN is not set
691
692#
693# ARCnet devices
694#
695# CONFIG_ARCNET is not set
696
697#
698# PHY device support
699#
700# CONFIG_PHYLIB is not set
701
702#
703# Ethernet (10 or 100Mbit)
704#
705CONFIG_NET_ETHERNET=y
706CONFIG_MII=y
707# CONFIG_HAPPYMEAL is not set
708# CONFIG_SUNGEM is not set
709# CONFIG_CASSINI is not set
710# CONFIG_NET_VENDOR_3COM is not set
711
712#
713# Tulip family network device support
714#
715# CONFIG_NET_TULIP is not set
716# CONFIG_HP100 is not set
717CONFIG_IBMVETH=y
718CONFIG_NET_PCI=y
719# CONFIG_PCNET32 is not set
720# CONFIG_AMD8111_ETH is not set
721# CONFIG_ADAPTEC_STARFIRE is not set
722# CONFIG_B44 is not set
723# CONFIG_FORCEDETH is not set
724# CONFIG_DGRS is not set
725CONFIG_EEPRO100=y
726# CONFIG_E100 is not set
727# CONFIG_FEALNX is not set
728# CONFIG_NATSEMI is not set
729# CONFIG_NE2K_PCI is not set
730# CONFIG_8139CP is not set
731# CONFIG_8139TOO is not set
732# CONFIG_SIS900 is not set
733# CONFIG_EPIC100 is not set
734# CONFIG_SUNDANCE is not set
735# CONFIG_VIA_RHINE is not set
736
737#
738# Ethernet (1000 Mbit)
739#
740# CONFIG_ACENIC is not set
741# CONFIG_DL2K is not set
742CONFIG_E1000=y
743CONFIG_E1000_NAPI=y
744# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
745# CONFIG_NS83820 is not set
746# CONFIG_HAMACHI is not set
747# CONFIG_YELLOWFIN is not set
748# CONFIG_R8169 is not set
749# CONFIG_SIS190 is not set
750# CONFIG_SKGE is not set
751# CONFIG_SKY2 is not set
752# CONFIG_SK98LIN is not set
753# CONFIG_VIA_VELOCITY is not set
754CONFIG_TIGON3=y
755# CONFIG_BNX2 is not set
756# CONFIG_QLA3XXX is not set
757
758#
759# Ethernet (10000 Mbit)
760#
761# CONFIG_CHELSIO_T1 is not set
762# CONFIG_IXGB is not set
763# CONFIG_S2IO is not set
764# CONFIG_MYRI10GE is not set
765# CONFIG_NETXEN_NIC is not set
766
767#
768# Token Ring devices
769#
770# CONFIG_TR is not set
771
772#
773# Wireless LAN (non-hamradio)
774#
775# CONFIG_NET_RADIO is not set
776
777#
778# PCMCIA network device support
779#
780# CONFIG_NET_PCMCIA is not set
781
782#
783# Wan interfaces
784#
785# CONFIG_WAN is not set
786# CONFIG_FDDI is not set
787# CONFIG_HIPPI is not set
788# CONFIG_PPP is not set
789# CONFIG_SLIP is not set
790# CONFIG_NET_FC is not set
791# CONFIG_SHAPER is not set
792# CONFIG_NETCONSOLE is not set
793# CONFIG_NETPOLL is not set
794# CONFIG_NET_POLL_CONTROLLER is not set
795
796#
797# ISDN subsystem
798#
799# CONFIG_ISDN is not set
800
801#
802# Telephony Support
803#
804# CONFIG_PHONE is not set
805
806#
807# Input device support
808#
809CONFIG_INPUT=y
810# CONFIG_INPUT_FF_MEMLESS is not set
811
812#
813# Userland interfaces
814#
815CONFIG_INPUT_MOUSEDEV=y
816CONFIG_INPUT_MOUSEDEV_PSAUX=y
817CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
818CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
819CONFIG_INPUT_JOYDEV=y
820# CONFIG_INPUT_TSDEV is not set
821CONFIG_INPUT_EVDEV=y
822# CONFIG_INPUT_EVBUG is not set
823
824#
825# Input Device Drivers
826#
827CONFIG_INPUT_KEYBOARD=y
828# CONFIG_KEYBOARD_ATKBD is not set
829# CONFIG_KEYBOARD_SUNKBD is not set
830# CONFIG_KEYBOARD_LKKBD is not set
831# CONFIG_KEYBOARD_XTKBD is not set
832# CONFIG_KEYBOARD_NEWTON is not set
833# CONFIG_KEYBOARD_STOWAWAY is not set
834CONFIG_INPUT_MOUSE=y
835# CONFIG_MOUSE_PS2 is not set
836# CONFIG_MOUSE_SERIAL is not set
837# CONFIG_MOUSE_VSXXXAA is not set
838# CONFIG_INPUT_JOYSTICK is not set
839# CONFIG_INPUT_TOUCHSCREEN is not set
840# CONFIG_INPUT_MISC is not set
841
842#
843# Hardware I/O ports
844#
845# CONFIG_SERIO is not set
846# CONFIG_GAMEPORT is not set
847
848#
849# Character devices
850#
851CONFIG_VT=y
852CONFIG_VT_CONSOLE=y
853CONFIG_HW_CONSOLE=y
854# CONFIG_VT_HW_CONSOLE_BINDING is not set
855# CONFIG_SERIAL_NONSTANDARD is not set
856
857#
858# Serial drivers
859#
860CONFIG_SERIAL_8250=y
861CONFIG_SERIAL_8250_CONSOLE=y
862CONFIG_SERIAL_8250_PCI=y
863# CONFIG_SERIAL_8250_CS is not set
864CONFIG_SERIAL_8250_NR_UARTS=4
865CONFIG_SERIAL_8250_RUNTIME_UARTS=4
866# CONFIG_SERIAL_8250_EXTENDED is not set
867
868#
869# Non-8250 serial port support
870#
871CONFIG_SERIAL_CORE=y
872CONFIG_SERIAL_CORE_CONSOLE=y
873# CONFIG_SERIAL_ICOM is not set
874# CONFIG_SERIAL_JSM is not set
875CONFIG_UNIX98_PTYS=y
876CONFIG_LEGACY_PTYS=y
877CONFIG_LEGACY_PTY_COUNT=4
878CONFIG_HVC_DRIVER=y
879CONFIG_HVC_CONSOLE=y
880CONFIG_HVC_RTAS=y
881# CONFIG_HVCS is not set
882
883#
884# IPMI
885#
886# CONFIG_IPMI_HANDLER is not set
887
888#
889# Watchdog Cards
890#
891# CONFIG_WATCHDOG is not set
892CONFIG_HW_RANDOM=y
893CONFIG_GEN_RTC=y
894CONFIG_GEN_RTC_X=y
895# CONFIG_DTLK is not set
896# CONFIG_R3964 is not set
897# CONFIG_APPLICOM is not set
898# CONFIG_AGP is not set
899# CONFIG_DRM is not set
900
901#
902# PCMCIA character devices
903#
904# CONFIG_SYNCLINK_CS is not set
905# CONFIG_CARDMAN_4000 is not set
906# CONFIG_CARDMAN_4040 is not set
907CONFIG_RAW_DRIVER=y
908CONFIG_MAX_RAW_DEVS=256
909# CONFIG_HANGCHECK_TIMER is not set
910
911#
912# TPM devices
913#
914# CONFIG_TCG_TPM is not set
915
916#
917# I2C support
918#
919CONFIG_I2C=y
920CONFIG_I2C_CHARDEV=y
921
922#
923# I2C Algorithms
924#
925CONFIG_I2C_ALGOBIT=y
926CONFIG_I2C_ALGOPCF=y
927CONFIG_I2C_ALGOPCA=y
928
929#
930# I2C Hardware Bus support
931#
932# CONFIG_I2C_ALI1535 is not set
933# CONFIG_I2C_ALI1563 is not set
934# CONFIG_I2C_ALI15X3 is not set
935# CONFIG_I2C_AMD756 is not set
936# CONFIG_I2C_AMD8111 is not set
937# CONFIG_I2C_I801 is not set
938# CONFIG_I2C_I810 is not set
939# CONFIG_I2C_PIIX4 is not set
940# CONFIG_I2C_NFORCE2 is not set
941# CONFIG_I2C_OCORES is not set
942# CONFIG_I2C_PARPORT_LIGHT is not set
943# CONFIG_I2C_PROSAVAGE is not set
944# CONFIG_I2C_SAVAGE4 is not set
945# CONFIG_I2C_SIS5595 is not set
946# CONFIG_I2C_SIS630 is not set
947# CONFIG_I2C_SIS96X is not set
948# CONFIG_I2C_STUB is not set
949# CONFIG_I2C_VIA is not set
950# CONFIG_I2C_VIAPRO is not set
951# CONFIG_I2C_VOODOO3 is not set
952# CONFIG_I2C_PCA_ISA is not set
953
954#
955# Miscellaneous I2C Chip support
956#
957# CONFIG_SENSORS_DS1337 is not set
958# CONFIG_SENSORS_DS1374 is not set
959CONFIG_SENSORS_EEPROM=y
960# CONFIG_SENSORS_PCF8574 is not set
961# CONFIG_SENSORS_PCA9539 is not set
962# CONFIG_SENSORS_PCF8591 is not set
963# CONFIG_SENSORS_MAX6875 is not set
964# CONFIG_I2C_DEBUG_CORE is not set
965# CONFIG_I2C_DEBUG_ALGO is not set
966CONFIG_I2C_DEBUG_BUS=y
967# CONFIG_I2C_DEBUG_CHIP is not set
968
969#
970# SPI support
971#
972# CONFIG_SPI is not set
973# CONFIG_SPI_MASTER is not set
974
975#
976# Dallas's 1-wire bus
977#
978# CONFIG_W1 is not set
979
980#
981# Hardware Monitoring support
982#
983CONFIG_HWMON=y
984CONFIG_HWMON_VID=y
985# CONFIG_SENSORS_ABITUGURU is not set
986# CONFIG_SENSORS_ADM1021 is not set
987# CONFIG_SENSORS_ADM1025 is not set
988# CONFIG_SENSORS_ADM1026 is not set
989# CONFIG_SENSORS_ADM1031 is not set
990# CONFIG_SENSORS_ADM9240 is not set
991# CONFIG_SENSORS_ASB100 is not set
992# CONFIG_SENSORS_ATXP1 is not set
993# CONFIG_SENSORS_DS1621 is not set
994# CONFIG_SENSORS_F71805F is not set
995# CONFIG_SENSORS_FSCHER is not set
996# CONFIG_SENSORS_FSCPOS is not set
997# CONFIG_SENSORS_GL518SM is not set
998# CONFIG_SENSORS_GL520SM is not set
999# CONFIG_SENSORS_IT87 is not set
1000# CONFIG_SENSORS_LM63 is not set
1001# CONFIG_SENSORS_LM75 is not set
1002# CONFIG_SENSORS_LM77 is not set
1003# CONFIG_SENSORS_LM78 is not set
1004# CONFIG_SENSORS_LM80 is not set
1005# CONFIG_SENSORS_LM83 is not set
1006CONFIG_SENSORS_LM85=y
1007# CONFIG_SENSORS_LM87 is not set
1008CONFIG_SENSORS_LM90=y
1009# CONFIG_SENSORS_LM92 is not set
1010# CONFIG_SENSORS_MAX1619 is not set
1011# CONFIG_SENSORS_PC87360 is not set
1012# CONFIG_SENSORS_PC87427 is not set
1013# CONFIG_SENSORS_SIS5595 is not set
1014# CONFIG_SENSORS_SMSC47M1 is not set
1015# CONFIG_SENSORS_SMSC47M192 is not set
1016# CONFIG_SENSORS_SMSC47B397 is not set
1017# CONFIG_SENSORS_VIA686A is not set
1018# CONFIG_SENSORS_VT1211 is not set
1019# CONFIG_SENSORS_VT8231 is not set
1020# CONFIG_SENSORS_W83781D is not set
1021# CONFIG_SENSORS_W83791D is not set
1022# CONFIG_SENSORS_W83792D is not set
1023# CONFIG_SENSORS_W83793 is not set
1024# CONFIG_SENSORS_W83L785TS is not set
1025# CONFIG_SENSORS_W83627HF is not set
1026# CONFIG_SENSORS_W83627EHF is not set
1027# CONFIG_HWMON_DEBUG_CHIP is not set
1028
1029#
1030# Multimedia devices
1031#
1032# CONFIG_VIDEO_DEV is not set
1033
1034#
1035# Digital Video Broadcasting Devices
1036#
1037# CONFIG_DVB is not set
1038# CONFIG_USB_DABUSB is not set
1039
1040#
1041# Graphics support
1042#
1043CONFIG_FIRMWARE_EDID=y
1044CONFIG_FB=y
1045CONFIG_FB_DDC=y
1046CONFIG_FB_CFB_FILLRECT=y
1047CONFIG_FB_CFB_COPYAREA=y
1048CONFIG_FB_CFB_IMAGEBLIT=y
1049CONFIG_FB_MACMODES=y
1050# CONFIG_FB_BACKLIGHT is not set
1051CONFIG_FB_MODE_HELPERS=y
1052CONFIG_FB_TILEBLITTING=y
1053# CONFIG_FB_CIRRUS is not set
1054# CONFIG_FB_PM2 is not set
1055# CONFIG_FB_CYBER2000 is not set
1056# CONFIG_FB_OF is not set
1057# CONFIG_FB_ASILIANT is not set
1058# CONFIG_FB_IMSTT is not set
1059CONFIG_FB_VGA16=y
1060# CONFIG_FB_S1D13XXX is not set
1061CONFIG_FB_NVIDIA=y
1062CONFIG_FB_NVIDIA_I2C=y
1063CONFIG_FB_RIVA=y
1064CONFIG_FB_RIVA_I2C=y
1065# CONFIG_FB_RIVA_DEBUG is not set
1066CONFIG_FB_MATROX=y
1067CONFIG_FB_MATROX_MILLENIUM=y
1068CONFIG_FB_MATROX_MYSTIQUE=y
1069CONFIG_FB_MATROX_G=y
1070CONFIG_FB_MATROX_I2C=y
1071CONFIG_FB_MATROX_MAVEN=y
1072CONFIG_FB_MATROX_MULTIHEAD=y
1073CONFIG_FB_RADEON=y
1074CONFIG_FB_RADEON_I2C=y
1075# CONFIG_FB_RADEON_DEBUG is not set
1076# CONFIG_FB_ATY128 is not set
1077# CONFIG_FB_ATY is not set
1078# CONFIG_FB_SAVAGE is not set
1079# CONFIG_FB_SIS is not set
1080# CONFIG_FB_NEOMAGIC is not set
1081# CONFIG_FB_KYRO is not set
1082# CONFIG_FB_3DFX is not set
1083# CONFIG_FB_VOODOO1 is not set
1084# CONFIG_FB_TRIDENT is not set
1085# CONFIG_FB_IBM_GXT4500 is not set
1086# CONFIG_FB_VIRTUAL is not set
1087
1088#
1089# Console display driver support
1090#
1091CONFIG_VGA_CONSOLE=y
1092CONFIG_VGACON_SOFT_SCROLLBACK=y
1093CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
1094CONFIG_DUMMY_CONSOLE=y
1095CONFIG_FRAMEBUFFER_CONSOLE=y
1096# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1097# CONFIG_FONTS is not set
1098CONFIG_FONT_8x8=y
1099CONFIG_FONT_8x16=y
1100
1101#
1102# Logo configuration
1103#
1104CONFIG_LOGO=y
1105CONFIG_LOGO_LINUX_MONO=y
1106CONFIG_LOGO_LINUX_VGA16=y
1107CONFIG_LOGO_LINUX_CLUT224=y
1108# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1109
1110#
1111# Sound
1112#
1113CONFIG_SOUND=y
1114
1115#
1116# Advanced Linux Sound Architecture
1117#
1118CONFIG_SND=y
1119CONFIG_SND_TIMER=y
1120CONFIG_SND_PCM=y
1121CONFIG_SND_HWDEP=y
1122CONFIG_SND_RAWMIDI=y
1123CONFIG_SND_SEQUENCER=y
1124# CONFIG_SND_SEQ_DUMMY is not set
1125CONFIG_SND_OSSEMUL=y
1126CONFIG_SND_MIXER_OSS=y
1127CONFIG_SND_PCM_OSS=y
1128CONFIG_SND_PCM_OSS_PLUGINS=y
1129CONFIG_SND_SEQUENCER_OSS=y
1130# CONFIG_SND_DYNAMIC_MINORS is not set
1131CONFIG_SND_SUPPORT_OLD_API=y
1132CONFIG_SND_VERBOSE_PROCFS=y
1133# CONFIG_SND_VERBOSE_PRINTK is not set
1134# CONFIG_SND_DEBUG is not set
1135
1136#
1137# Generic devices
1138#
1139# CONFIG_SND_DUMMY is not set
1140# CONFIG_SND_VIRMIDI is not set
1141# CONFIG_SND_MTPAV is not set
1142# CONFIG_SND_SERIAL_U16550 is not set
1143# CONFIG_SND_MPU401 is not set
1144
1145#
1146# PCI devices
1147#
1148# CONFIG_SND_AD1889 is not set
1149# CONFIG_SND_ALS300 is not set
1150# CONFIG_SND_ALS4000 is not set
1151# CONFIG_SND_ALI5451 is not set
1152# CONFIG_SND_ATIIXP is not set
1153# CONFIG_SND_ATIIXP_MODEM is not set
1154# CONFIG_SND_AU8810 is not set
1155# CONFIG_SND_AU8820 is not set
1156# CONFIG_SND_AU8830 is not set
1157# CONFIG_SND_AZT3328 is not set
1158# CONFIG_SND_BT87X is not set
1159# CONFIG_SND_CA0106 is not set
1160# CONFIG_SND_CMIPCI is not set
1161# CONFIG_SND_CS4281 is not set
1162# CONFIG_SND_CS46XX is not set
1163# CONFIG_SND_DARLA20 is not set
1164# CONFIG_SND_GINA20 is not set
1165# CONFIG_SND_LAYLA20 is not set
1166# CONFIG_SND_DARLA24 is not set
1167# CONFIG_SND_GINA24 is not set
1168# CONFIG_SND_LAYLA24 is not set
1169# CONFIG_SND_MONA is not set
1170# CONFIG_SND_MIA is not set
1171# CONFIG_SND_ECHO3G is not set
1172# CONFIG_SND_INDIGO is not set
1173# CONFIG_SND_INDIGOIO is not set
1174# CONFIG_SND_INDIGODJ is not set
1175# CONFIG_SND_EMU10K1 is not set
1176# CONFIG_SND_EMU10K1X is not set
1177# CONFIG_SND_ENS1370 is not set
1178# CONFIG_SND_ENS1371 is not set
1179# CONFIG_SND_ES1938 is not set
1180# CONFIG_SND_ES1968 is not set
1181# CONFIG_SND_FM801 is not set
1182# CONFIG_SND_HDA_INTEL is not set
1183# CONFIG_SND_HDSP is not set
1184# CONFIG_SND_HDSPM is not set
1185# CONFIG_SND_ICE1712 is not set
1186# CONFIG_SND_ICE1724 is not set
1187# CONFIG_SND_INTEL8X0 is not set
1188# CONFIG_SND_INTEL8X0M is not set
1189# CONFIG_SND_KORG1212 is not set
1190# CONFIG_SND_MAESTRO3 is not set
1191# CONFIG_SND_MIXART is not set
1192# CONFIG_SND_NM256 is not set
1193# CONFIG_SND_PCXHR is not set
1194# CONFIG_SND_RIPTIDE is not set
1195# CONFIG_SND_RME32 is not set
1196# CONFIG_SND_RME96 is not set
1197# CONFIG_SND_RME9652 is not set
1198# CONFIG_SND_SONICVIBES is not set
1199# CONFIG_SND_TRIDENT is not set
1200# CONFIG_SND_VIA82XX is not set
1201# CONFIG_SND_VIA82XX_MODEM is not set
1202# CONFIG_SND_VX222 is not set
1203# CONFIG_SND_YMFPCI is not set
1204
1205#
1206# ALSA PowerMac devices
1207#
1208
1209#
1210# USB devices
1211#
1212CONFIG_SND_USB_AUDIO=y
1213CONFIG_SND_USB_USX2Y=y
1214
1215#
1216# PCMCIA devices
1217#
1218# CONFIG_SND_VXPOCKET is not set
1219# CONFIG_SND_PDAUDIOCF is not set
1220
1221#
1222# Open Sound System
1223#
1224# CONFIG_SOUND_PRIME is not set
1225
1226#
1227# HID Devices
1228#
1229CONFIG_HID=y
1230
1231#
1232# USB support
1233#
1234CONFIG_USB_ARCH_HAS_HCD=y
1235CONFIG_USB_ARCH_HAS_OHCI=y
1236CONFIG_USB_ARCH_HAS_EHCI=y
1237CONFIG_USB=y
1238# CONFIG_USB_DEBUG is not set
1239
1240#
1241# Miscellaneous USB options
1242#
1243CONFIG_USB_DEVICEFS=y
1244# CONFIG_USB_BANDWIDTH is not set
1245# CONFIG_USB_DYNAMIC_MINORS is not set
1246# CONFIG_USB_OTG is not set
1247
1248#
1249# USB Host Controller Drivers
1250#
1251CONFIG_USB_EHCI_HCD=y
1252# CONFIG_USB_EHCI_SPLIT_ISO is not set
1253# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1254# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1255# CONFIG_USB_ISP116X_HCD is not set
1256CONFIG_USB_OHCI_HCD=y
1257# CONFIG_USB_OHCI_BIG_ENDIAN is not set
1258CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1259CONFIG_USB_UHCI_HCD=y
1260CONFIG_USB_SL811_HCD=y
1261# CONFIG_USB_SL811_CS is not set
1262
1263#
1264# USB Device Class drivers
1265#
1266# CONFIG_USB_ACM is not set
1267# CONFIG_USB_PRINTER is not set
1268
1269#
1270# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1271#
1272
1273#
1274# may also be needed; see USB_STORAGE Help for more information
1275#
1276CONFIG_USB_STORAGE=y
1277# CONFIG_USB_STORAGE_DEBUG is not set
1278# CONFIG_USB_STORAGE_DATAFAB is not set
1279# CONFIG_USB_STORAGE_FREECOM is not set
1280# CONFIG_USB_STORAGE_ISD200 is not set
1281# CONFIG_USB_STORAGE_DPCM is not set
1282# CONFIG_USB_STORAGE_USBAT is not set
1283# CONFIG_USB_STORAGE_SDDR09 is not set
1284# CONFIG_USB_STORAGE_SDDR55 is not set
1285# CONFIG_USB_STORAGE_JUMPSHOT is not set
1286# CONFIG_USB_STORAGE_ALAUDA is not set
1287# CONFIG_USB_STORAGE_ONETOUCH is not set
1288# CONFIG_USB_STORAGE_KARMA is not set
1289CONFIG_USB_LIBUSUAL=y
1290
1291#
1292# USB Input Devices
1293#
1294CONFIG_USB_HID=y
1295# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1296# CONFIG_HID_FF is not set
1297# CONFIG_USB_HIDDEV is not set
1298# CONFIG_USB_AIPTEK is not set
1299# CONFIG_USB_WACOM is not set
1300# CONFIG_USB_ACECAD is not set
1301# CONFIG_USB_KBTAB is not set
1302# CONFIG_USB_POWERMATE is not set
1303# CONFIG_USB_TOUCHSCREEN is not set
1304# CONFIG_USB_YEALINK is not set
1305# CONFIG_USB_XPAD is not set
1306# CONFIG_USB_ATI_REMOTE is not set
1307# CONFIG_USB_ATI_REMOTE2 is not set
1308# CONFIG_USB_KEYSPAN_REMOTE is not set
1309# CONFIG_USB_APPLETOUCH is not set
1310
1311#
1312# USB Imaging devices
1313#
1314# CONFIG_USB_MDC800 is not set
1315# CONFIG_USB_MICROTEK is not set
1316
1317#
1318# USB Network Adapters
1319#
1320# CONFIG_USB_CATC is not set
1321# CONFIG_USB_KAWETH is not set
1322# CONFIG_USB_PEGASUS is not set
1323# CONFIG_USB_RTL8150 is not set
1324# CONFIG_USB_USBNET_MII is not set
1325# CONFIG_USB_USBNET is not set
1326CONFIG_USB_MON=y
1327
1328#
1329# USB port drivers
1330#
1331
1332#
1333# USB Serial Converter support
1334#
1335# CONFIG_USB_SERIAL is not set
1336
1337#
1338# USB Miscellaneous drivers
1339#
1340# CONFIG_USB_EMI62 is not set
1341# CONFIG_USB_EMI26 is not set
1342# CONFIG_USB_ADUTUX is not set
1343# CONFIG_USB_AUERSWALD is not set
1344# CONFIG_USB_RIO500 is not set
1345# CONFIG_USB_LEGOTOWER is not set
1346# CONFIG_USB_LCD is not set
1347# CONFIG_USB_LED is not set
1348# CONFIG_USB_CYPRESS_CY7C63 is not set
1349# CONFIG_USB_CYTHERM is not set
1350# CONFIG_USB_PHIDGET is not set
1351# CONFIG_USB_IDMOUSE is not set
1352# CONFIG_USB_FTDI_ELAN is not set
1353# CONFIG_USB_APPLEDISPLAY is not set
1354# CONFIG_USB_SISUSBVGA is not set
1355# CONFIG_USB_LD is not set
1356# CONFIG_USB_TRANCEVIBRATOR is not set
1357# CONFIG_USB_TEST is not set
1358
1359#
1360# USB DSL modem support
1361#
1362
1363#
1364# USB Gadget Support
1365#
1366# CONFIG_USB_GADGET is not set
1367
1368#
1369# MMC/SD Card support
1370#
1371# CONFIG_MMC is not set
1372
1373#
1374# LED devices
1375#
1376# CONFIG_NEW_LEDS is not set
1377
1378#
1379# LED drivers
1380#
1381
1382#
1383# LED Triggers
1384#
1385
1386#
1387# InfiniBand support
1388#
1389# CONFIG_INFINIBAND is not set
1390
1391#
1392# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1393#
1394
1395#
1396# Real Time Clock
1397#
1398CONFIG_RTC_LIB=y
1399CONFIG_RTC_CLASS=y
1400CONFIG_RTC_HCTOSYS=y
1401CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1402# CONFIG_RTC_DEBUG is not set
1403
1404#
1405# RTC interfaces
1406#
1407CONFIG_RTC_INTF_SYSFS=y
1408CONFIG_RTC_INTF_PROC=y
1409CONFIG_RTC_INTF_DEV=y
1410# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1411
1412#
1413# RTC drivers
1414#
1415# CONFIG_RTC_DRV_X1205 is not set
1416CONFIG_RTC_DRV_DS1307=y
1417# CONFIG_RTC_DRV_DS1553 is not set
1418# CONFIG_RTC_DRV_ISL1208 is not set
1419# CONFIG_RTC_DRV_DS1672 is not set
1420# CONFIG_RTC_DRV_DS1742 is not set
1421# CONFIG_RTC_DRV_PCF8563 is not set
1422# CONFIG_RTC_DRV_PCF8583 is not set
1423# CONFIG_RTC_DRV_RS5C372 is not set
1424# CONFIG_RTC_DRV_M48T86 is not set
1425# CONFIG_RTC_DRV_TEST is not set
1426# CONFIG_RTC_DRV_V3020 is not set
1427
1428#
1429# DMA Engine support
1430#
1431# CONFIG_DMA_ENGINE is not set
1432
1433#
1434# DMA Clients
1435#
1436
1437#
1438# DMA Devices
1439#
1440
1441#
1442# Virtualization
1443#
1444
1445#
1446# File systems
1447#
1448CONFIG_EXT2_FS=y
1449CONFIG_EXT2_FS_XATTR=y
1450CONFIG_EXT2_FS_POSIX_ACL=y
1451# CONFIG_EXT2_FS_SECURITY is not set
1452# CONFIG_EXT2_FS_XIP is not set
1453CONFIG_EXT3_FS=y
1454CONFIG_EXT3_FS_XATTR=y
1455# CONFIG_EXT3_FS_POSIX_ACL is not set
1456# CONFIG_EXT3_FS_SECURITY is not set
1457# CONFIG_EXT4DEV_FS is not set
1458CONFIG_JBD=y
1459# CONFIG_JBD_DEBUG is not set
1460CONFIG_FS_MBCACHE=y
1461# CONFIG_REISERFS_FS is not set
1462# CONFIG_JFS_FS is not set
1463CONFIG_FS_POSIX_ACL=y
1464# CONFIG_XFS_FS is not set
1465# CONFIG_GFS2_FS is not set
1466# CONFIG_OCFS2_FS is not set
1467# CONFIG_MINIX_FS is not set
1468# CONFIG_ROMFS_FS is not set
1469# CONFIG_INOTIFY is not set
1470# CONFIG_QUOTA is not set
1471CONFIG_DNOTIFY=y
1472CONFIG_AUTOFS_FS=y
1473CONFIG_AUTOFS4_FS=y
1474# CONFIG_FUSE_FS is not set
1475
1476#
1477# CD-ROM/DVD Filesystems
1478#
1479CONFIG_ISO9660_FS=y
1480# CONFIG_JOLIET is not set
1481# CONFIG_ZISOFS is not set
1482CONFIG_UDF_FS=y
1483CONFIG_UDF_NLS=y
1484
1485#
1486# DOS/FAT/NT Filesystems
1487#
1488CONFIG_FAT_FS=y
1489CONFIG_MSDOS_FS=y
1490CONFIG_VFAT_FS=y
1491CONFIG_FAT_DEFAULT_CODEPAGE=437
1492CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1493# CONFIG_NTFS_FS is not set
1494
1495#
1496# Pseudo filesystems
1497#
1498CONFIG_PROC_FS=y
1499CONFIG_PROC_KCORE=y
1500CONFIG_PROC_SYSCTL=y
1501CONFIG_SYSFS=y
1502CONFIG_TMPFS=y
1503# CONFIG_TMPFS_POSIX_ACL is not set
1504CONFIG_HUGETLBFS=y
1505CONFIG_HUGETLB_PAGE=y
1506CONFIG_RAMFS=y
1507CONFIG_CONFIGFS_FS=y
1508
1509#
1510# Miscellaneous filesystems
1511#
1512# CONFIG_ADFS_FS is not set
1513# CONFIG_AFFS_FS is not set
1514# CONFIG_HFS_FS is not set
1515# CONFIG_HFSPLUS_FS is not set
1516# CONFIG_BEFS_FS is not set
1517# CONFIG_BFS_FS is not set
1518# CONFIG_EFS_FS is not set
1519# CONFIG_JFFS2_FS is not set
1520# CONFIG_CRAMFS is not set
1521# CONFIG_VXFS_FS is not set
1522# CONFIG_HPFS_FS is not set
1523# CONFIG_QNX4FS_FS is not set
1524# CONFIG_SYSV_FS is not set
1525# CONFIG_UFS_FS is not set
1526
1527#
1528# Network File Systems
1529#
1530CONFIG_NFS_FS=y
1531CONFIG_NFS_V3=y
1532# CONFIG_NFS_V3_ACL is not set
1533# CONFIG_NFS_V4 is not set
1534# CONFIG_NFS_DIRECTIO is not set
1535# CONFIG_NFSD is not set
1536CONFIG_ROOT_NFS=y
1537CONFIG_LOCKD=y
1538CONFIG_LOCKD_V4=y
1539CONFIG_NFS_COMMON=y
1540CONFIG_SUNRPC=y
1541# CONFIG_RPCSEC_GSS_KRB5 is not set
1542# CONFIG_RPCSEC_GSS_SPKM3 is not set
1543# CONFIG_SMB_FS is not set
1544# CONFIG_CIFS is not set
1545# CONFIG_NCP_FS is not set
1546# CONFIG_CODA_FS is not set
1547# CONFIG_AFS_FS is not set
1548# CONFIG_9P_FS is not set
1549
1550#
1551# Partition Types
1552#
1553CONFIG_PARTITION_ADVANCED=y
1554# CONFIG_ACORN_PARTITION is not set
1555# CONFIG_OSF_PARTITION is not set
1556# CONFIG_AMIGA_PARTITION is not set
1557# CONFIG_ATARI_PARTITION is not set
1558CONFIG_MAC_PARTITION=y
1559CONFIG_MSDOS_PARTITION=y
1560# CONFIG_BSD_DISKLABEL is not set
1561# CONFIG_MINIX_SUBPARTITION is not set
1562# CONFIG_SOLARIS_X86_PARTITION is not set
1563# CONFIG_UNIXWARE_DISKLABEL is not set
1564# CONFIG_LDM_PARTITION is not set
1565# CONFIG_SGI_PARTITION is not set
1566# CONFIG_ULTRIX_PARTITION is not set
1567# CONFIG_SUN_PARTITION is not set
1568# CONFIG_KARMA_PARTITION is not set
1569# CONFIG_EFI_PARTITION is not set
1570
1571#
1572# Native Language Support
1573#
1574CONFIG_NLS=y
1575CONFIG_NLS_DEFAULT="iso8859-1"
1576CONFIG_NLS_CODEPAGE_437=y
1577# CONFIG_NLS_CODEPAGE_737 is not set
1578# CONFIG_NLS_CODEPAGE_775 is not set
1579# CONFIG_NLS_CODEPAGE_850 is not set
1580# CONFIG_NLS_CODEPAGE_852 is not set
1581# CONFIG_NLS_CODEPAGE_855 is not set
1582# CONFIG_NLS_CODEPAGE_857 is not set
1583# CONFIG_NLS_CODEPAGE_860 is not set
1584# CONFIG_NLS_CODEPAGE_861 is not set
1585# CONFIG_NLS_CODEPAGE_862 is not set
1586# CONFIG_NLS_CODEPAGE_863 is not set
1587# CONFIG_NLS_CODEPAGE_864 is not set
1588# CONFIG_NLS_CODEPAGE_865 is not set
1589# CONFIG_NLS_CODEPAGE_866 is not set
1590# CONFIG_NLS_CODEPAGE_869 is not set
1591# CONFIG_NLS_CODEPAGE_936 is not set
1592# CONFIG_NLS_CODEPAGE_950 is not set
1593# CONFIG_NLS_CODEPAGE_932 is not set
1594# CONFIG_NLS_CODEPAGE_949 is not set
1595# CONFIG_NLS_CODEPAGE_874 is not set
1596# CONFIG_NLS_ISO8859_8 is not set
1597# CONFIG_NLS_CODEPAGE_1250 is not set
1598# CONFIG_NLS_CODEPAGE_1251 is not set
1599# CONFIG_NLS_ASCII is not set
1600CONFIG_NLS_ISO8859_1=y
1601# CONFIG_NLS_ISO8859_2 is not set
1602# CONFIG_NLS_ISO8859_3 is not set
1603# CONFIG_NLS_ISO8859_4 is not set
1604# CONFIG_NLS_ISO8859_5 is not set
1605# CONFIG_NLS_ISO8859_6 is not set
1606# CONFIG_NLS_ISO8859_7 is not set
1607# CONFIG_NLS_ISO8859_9 is not set
1608# CONFIG_NLS_ISO8859_13 is not set
1609# CONFIG_NLS_ISO8859_14 is not set
1610# CONFIG_NLS_ISO8859_15 is not set
1611# CONFIG_NLS_KOI8_R is not set
1612# CONFIG_NLS_KOI8_U is not set
1613# CONFIG_NLS_UTF8 is not set
1614
1615#
1616# Distributed Lock Manager
1617#
1618# CONFIG_DLM is not set
1619
1620#
1621# Library routines
1622#
1623CONFIG_BITREVERSE=y
1624CONFIG_CRC_CCITT=y
1625# CONFIG_CRC16 is not set
1626CONFIG_CRC32=y
1627# CONFIG_LIBCRC32C is not set
1628CONFIG_PLIST=y
1629CONFIG_IOMAP_COPY=y
1630
1631#
1632# Instrumentation Support
1633#
1634CONFIG_PROFILING=y
1635CONFIG_OPROFILE=y
1636# CONFIG_KPROBES is not set
1637
1638#
1639# Kernel hacking
1640#
1641# CONFIG_PRINTK_TIME is not set
1642CONFIG_ENABLE_MUST_CHECK=y
1643CONFIG_MAGIC_SYSRQ=y
1644# CONFIG_UNUSED_SYMBOLS is not set
1645# CONFIG_DEBUG_FS is not set
1646# CONFIG_HEADERS_CHECK is not set
1647CONFIG_DEBUG_KERNEL=y
1648CONFIG_LOG_BUF_SHIFT=17
1649CONFIG_DETECT_SOFTLOCKUP=y
1650# CONFIG_SCHEDSTATS is not set
1651# CONFIG_DEBUG_SLAB is not set
1652# CONFIG_DEBUG_RT_MUTEXES is not set
1653# CONFIG_RT_MUTEX_TESTER is not set
1654# CONFIG_DEBUG_SPINLOCK is not set
1655# CONFIG_DEBUG_MUTEXES is not set
1656# CONFIG_DEBUG_RWSEMS is not set
1657# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1658# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1659# CONFIG_DEBUG_KOBJECT is not set
1660CONFIG_DEBUG_BUGVERBOSE=y
1661CONFIG_DEBUG_INFO=y
1662# CONFIG_DEBUG_VM is not set
1663# CONFIG_DEBUG_LIST is not set
1664CONFIG_FORCED_INLINING=y
1665# CONFIG_RCU_TORTURE_TEST is not set
1666# CONFIG_DEBUG_STACKOVERFLOW is not set
1667# CONFIG_DEBUG_STACK_USAGE is not set
1668CONFIG_DEBUGGER=y
1669CONFIG_XMON=y
1670CONFIG_XMON_DEFAULT=y
1671CONFIG_XMON_DISASSEMBLY=y
1672# CONFIG_IRQSTACKS is not set
1673CONFIG_BOOTX_TEXT=y
1674# CONFIG_PPC_EARLY_DEBUG is not set
1675
1676#
1677# Security options
1678#
1679# CONFIG_KEYS is not set
1680# CONFIG_SECURITY is not set
1681
1682#
1683# Cryptographic options
1684#
1685CONFIG_CRYPTO=y
1686CONFIG_CRYPTO_ALGAPI=y
1687CONFIG_CRYPTO_BLKCIPHER=y
1688CONFIG_CRYPTO_HASH=y
1689CONFIG_CRYPTO_MANAGER=y
1690CONFIG_CRYPTO_HMAC=y
1691# CONFIG_CRYPTO_XCBC is not set
1692# CONFIG_CRYPTO_NULL is not set
1693# CONFIG_CRYPTO_MD4 is not set
1694CONFIG_CRYPTO_MD5=y
1695CONFIG_CRYPTO_SHA1=y
1696# CONFIG_CRYPTO_SHA256 is not set
1697# CONFIG_CRYPTO_SHA512 is not set
1698# CONFIG_CRYPTO_WP512 is not set
1699# CONFIG_CRYPTO_TGR192 is not set
1700# CONFIG_CRYPTO_GF128MUL is not set
1701CONFIG_CRYPTO_ECB=m
1702CONFIG_CRYPTO_CBC=y
1703# CONFIG_CRYPTO_LRW is not set
1704CONFIG_CRYPTO_DES=y
1705# CONFIG_CRYPTO_BLOWFISH is not set
1706# CONFIG_CRYPTO_TWOFISH is not set
1707# CONFIG_CRYPTO_SERPENT is not set
1708# CONFIG_CRYPTO_AES is not set
1709# CONFIG_CRYPTO_CAST5 is not set
1710# CONFIG_CRYPTO_CAST6 is not set
1711# CONFIG_CRYPTO_TEA is not set
1712# CONFIG_CRYPTO_ARC4 is not set
1713# CONFIG_CRYPTO_KHAZAD is not set
1714# CONFIG_CRYPTO_ANUBIS is not set
1715# CONFIG_CRYPTO_DEFLATE is not set
1716# CONFIG_CRYPTO_MICHAEL_MIC is not set
1717# CONFIG_CRYPTO_CRC32C is not set
1718# CONFIG_CRYPTO_TEST is not set
1719
1720#
1721# Hardware crypto devices
1722#
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index debac66e8258..a8da0aea3b87 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -500,7 +500,7 @@ CONFIG_BLK_DEV_AMD74XX=y
500# CONFIG_BLK_DEV_PDC202XX_NEW is not set 500# CONFIG_BLK_DEV_PDC202XX_NEW is not set
501# CONFIG_BLK_DEV_SVWKS is not set 501# CONFIG_BLK_DEV_SVWKS is not set
502# CONFIG_BLK_DEV_SIIMAGE is not set 502# CONFIG_BLK_DEV_SIIMAGE is not set
503CONFIG_BLK_DEV_SL82C105=y 503# CONFIG_BLK_DEV_SL82C105 is not set
504# CONFIG_BLK_DEV_SLC90E66 is not set 504# CONFIG_BLK_DEV_SLC90E66 is not set
505# CONFIG_BLK_DEV_TRM290 is not set 505# CONFIG_BLK_DEV_TRM290 is not set
506# CONFIG_BLK_DEV_VIA82CXXX is not set 506# CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -646,7 +646,7 @@ CONFIG_SATA_SVW=y
646# CONFIG_PATA_SIL680 is not set 646# CONFIG_PATA_SIL680 is not set
647# CONFIG_PATA_SIS is not set 647# CONFIG_PATA_SIS is not set
648# CONFIG_PATA_VIA is not set 648# CONFIG_PATA_VIA is not set
649# CONFIG_PATA_WINBOND is not set 649CONFIG_PATA_WINBOND=y
650 650
651# 651#
652# Multi-device support (RAID and LVM) 652# Multi-device support (RAID and LVM)
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 32560876c3dc..0345a2ceec59 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_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.20-rc5 3# Linux kernel version: 2.6.20-rc6
4# Mon Jan 22 22:29:11 2007 4# Thu Jan 25 13:35:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -70,10 +70,10 @@ CONFIG_SYSVIPC=y
70CONFIG_SYSFS_DEPRECATED=y 70CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
72CONFIG_INITRAMFS_SOURCE="" 72CONFIG_INITRAMFS_SOURCE=""
73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_EMBEDDED=y 75# CONFIG_EMBEDDED is not set
76# CONFIG_SYSCTL_SYSCALL is not set 76CONFIG_SYSCTL_SYSCALL=y
77CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
78CONFIG_KALLSYMS_ALL=y 78CONFIG_KALLSYMS_ALL=y
79CONFIG_KALLSYMS_EXTRA_PASS=y 79CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -160,9 +160,10 @@ CONFIG_SPU_BASE=y
160# PS3 Platform Options 160# PS3 Platform Options
161# 161#
162CONFIG_PS3_HTAB_SIZE=20 162CONFIG_PS3_HTAB_SIZE=20
163CONFIG_PS3_DYNAMIC_DMA=y 163# CONFIG_PS3_DYNAMIC_DMA is not set
164CONFIG_PS3_USE_LPAR_ADDR=y 164CONFIG_PS3_USE_LPAR_ADDR=y
165CONFIG_PS3_VUART=y 165CONFIG_PS3_VUART=y
166CONFIG_PS3_PS3AV=y
166 167
167# 168#
168# Kernel options 169# Kernel options
@@ -207,7 +208,7 @@ CONFIG_PPC_64K_PAGES=y
207# CONFIG_SCHED_SMT is not set 208# CONFIG_SCHED_SMT is not set
208CONFIG_PROC_DEVICETREE=y 209CONFIG_PROC_DEVICETREE=y
209CONFIG_CMDLINE_BOOL=y 210CONFIG_CMDLINE_BOOL=y
210CONFIG_CMDLINE="root=/dev/nfs rw ip=dhcp" 211CONFIG_CMDLINE="root=/dev/sda1 ip=dhcp"
211# CONFIG_PM is not set 212# CONFIG_PM is not set
212# CONFIG_SECCOMP is not set 213# CONFIG_SECCOMP is not set
213CONFIG_ISA_DMA_API=y 214CONFIG_ISA_DMA_API=y
@@ -240,7 +241,8 @@ CONFIG_NET=y
240# Networking options 241# Networking options
241# 242#
242# CONFIG_NETDEBUG is not set 243# CONFIG_NETDEBUG is not set
243# CONFIG_PACKET is not set 244CONFIG_PACKET=y
245CONFIG_PACKET_MMAP=y
244CONFIG_UNIX=y 246CONFIG_UNIX=y
245# CONFIG_NET_KEY is not set 247# CONFIG_NET_KEY is not set
246CONFIG_INET=y 248CONFIG_INET=y
@@ -353,6 +355,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_BLK_DEV_COW_COMMON is not set 355# CONFIG_BLK_DEV_COW_COMMON is not set
354# CONFIG_BLK_DEV_LOOP is not set 356# CONFIG_BLK_DEV_LOOP is not set
355# CONFIG_BLK_DEV_NBD is not set 357# CONFIG_BLK_DEV_NBD is not set
358# CONFIG_BLK_DEV_UB is not set
356# CONFIG_BLK_DEV_RAM is not set 359# CONFIG_BLK_DEV_RAM is not set
357# CONFIG_BLK_DEV_INITRD is not set 360# CONFIG_BLK_DEV_INITRD is not set
358# CONFIG_CDROM_PKTCDVD is not set 361# CONFIG_CDROM_PKTCDVD is not set
@@ -380,10 +383,11 @@ CONFIG_SCSI_PROC_FS=y
380# 383#
381# SCSI support type (disk, tape, CD-ROM) 384# SCSI support type (disk, tape, CD-ROM)
382# 385#
383# CONFIG_BLK_DEV_SD is not set 386CONFIG_BLK_DEV_SD=y
384# CONFIG_CHR_DEV_ST is not set 387# CONFIG_CHR_DEV_ST is not set
385# CONFIG_CHR_DEV_OSST is not set 388# CONFIG_CHR_DEV_OSST is not set
386# CONFIG_BLK_DEV_SR is not set 389CONFIG_BLK_DEV_SR=y
390# CONFIG_BLK_DEV_SR_VENDOR is not set
387# CONFIG_CHR_DEV_SG is not set 391# CONFIG_CHR_DEV_SG is not set
388# CONFIG_CHR_DEV_SCH is not set 392# CONFIG_CHR_DEV_SCH is not set
389 393
@@ -456,6 +460,7 @@ CONFIG_NETDEVICES=y
456# Ethernet (10 or 100Mbit) 460# Ethernet (10 or 100Mbit)
457# 461#
458# CONFIG_NET_ETHERNET is not set 462# CONFIG_NET_ETHERNET is not set
463CONFIG_MII=y
459 464
460# 465#
461# Ethernet (1000 Mbit) 466# Ethernet (1000 Mbit)
@@ -504,10 +509,13 @@ CONFIG_INPUT=y
504# 509#
505# Userland interfaces 510# Userland interfaces
506# 511#
507# CONFIG_INPUT_MOUSEDEV is not set 512CONFIG_INPUT_MOUSEDEV=y
513# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
514CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
515CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
508# CONFIG_INPUT_JOYDEV is not set 516# CONFIG_INPUT_JOYDEV is not set
509# CONFIG_INPUT_TSDEV is not set 517# CONFIG_INPUT_TSDEV is not set
510CONFIG_INPUT_EVDEV=y 518# CONFIG_INPUT_EVDEV is not set
511# CONFIG_INPUT_EVBUG is not set 519# CONFIG_INPUT_EVBUG is not set
512 520
513# 521#
@@ -598,19 +606,46 @@ CONFIG_GEN_RTC=y
598# Digital Video Broadcasting Devices 606# Digital Video Broadcasting Devices
599# 607#
600# CONFIG_DVB is not set 608# CONFIG_DVB is not set
609# CONFIG_USB_DABUSB is not set
601 610
602# 611#
603# Graphics support 612# Graphics support
604# 613#
605# CONFIG_FIRMWARE_EDID is not set 614# CONFIG_FIRMWARE_EDID is not set
606# CONFIG_FB is not set 615CONFIG_FB=y
616CONFIG_FB_CFB_FILLRECT=y
617CONFIG_FB_CFB_COPYAREA=y
618CONFIG_FB_CFB_IMAGEBLIT=y
619# CONFIG_FB_MACMODES is not set
620# CONFIG_FB_BACKLIGHT is not set
621# CONFIG_FB_MODE_HELPERS is not set
622# CONFIG_FB_TILEBLITTING is not set
623# CONFIG_FB_OF is not set
624# CONFIG_FB_VGA16 is not set
625# CONFIG_FB_S1D13XXX is not set
607# CONFIG_FB_IBM_GXT4500 is not set 626# CONFIG_FB_IBM_GXT4500 is not set
627CONFIG_FB_PS3=y
628CONFIG_FB_PS3_DEFAULT_SIZE_M=18
629# CONFIG_FB_VIRTUAL is not set
608 630
609# 631#
610# Console display driver support 632# Console display driver support
611# 633#
612# CONFIG_VGA_CONSOLE is not set 634# CONFIG_VGA_CONSOLE is not set
613CONFIG_DUMMY_CONSOLE=y 635CONFIG_DUMMY_CONSOLE=y
636CONFIG_FRAMEBUFFER_CONSOLE=y
637# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
638# CONFIG_FONTS is not set
639CONFIG_FONT_8x8=y
640CONFIG_FONT_8x16=y
641
642#
643# Logo configuration
644#
645CONFIG_LOGO=y
646# CONFIG_LOGO_LINUX_MONO is not set
647# CONFIG_LOGO_LINUX_VGA16 is not set
648CONFIG_LOGO_LINUX_CLUT224=y
614# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 649# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
615 650
616# 651#
@@ -626,15 +661,142 @@ CONFIG_HID=y
626# 661#
627# USB support 662# USB support
628# 663#
629# CONFIG_USB_ARCH_HAS_HCD is not set 664CONFIG_USB_ARCH_HAS_HCD=y
630# CONFIG_USB_ARCH_HAS_OHCI is not set 665CONFIG_USB_ARCH_HAS_OHCI=y
631# CONFIG_USB_ARCH_HAS_EHCI is not set 666CONFIG_USB_ARCH_HAS_EHCI=y
667CONFIG_USB=y
668CONFIG_USB_DEBUG=y
669
670#
671# Miscellaneous USB options
672#
673# CONFIG_USB_DEVICEFS is not set
674# CONFIG_USB_BANDWIDTH is not set
675# CONFIG_USB_DYNAMIC_MINORS is not set
676# CONFIG_USB_OTG is not set
677
678#
679# USB Host Controller Drivers
680#
681CONFIG_USB_EHCI_HCD=y
682# CONFIG_USB_EHCI_SPLIT_ISO is not set
683# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
684# CONFIG_USB_EHCI_TT_NEWSCHED is not set
685CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
686# CONFIG_USB_ISP116X_HCD is not set
687CONFIG_USB_OHCI_HCD=y
688# CONFIG_USB_OHCI_HCD_PPC_OF is not set
689# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
690CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
691CONFIG_USB_OHCI_LITTLE_ENDIAN=y
692# CONFIG_USB_SL811_HCD is not set
693
694#
695# USB Device Class drivers
696#
697# CONFIG_USB_ACM is not set
698# CONFIG_USB_PRINTER is not set
632 699
633# 700#
634# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 701# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
635# 702#
636 703
637# 704#
705# may also be needed; see USB_STORAGE Help for more information
706#
707CONFIG_USB_STORAGE=y
708# CONFIG_USB_STORAGE_DEBUG is not set
709# CONFIG_USB_STORAGE_DATAFAB is not set
710# CONFIG_USB_STORAGE_FREECOM is not set
711# CONFIG_USB_STORAGE_DPCM is not set
712# CONFIG_USB_STORAGE_USBAT is not set
713# CONFIG_USB_STORAGE_SDDR09 is not set
714# CONFIG_USB_STORAGE_SDDR55 is not set
715# CONFIG_USB_STORAGE_JUMPSHOT is not set
716# CONFIG_USB_STORAGE_ALAUDA is not set
717# CONFIG_USB_STORAGE_KARMA is not set
718# CONFIG_USB_LIBUSUAL is not set
719
720#
721# USB Input Devices
722#
723CONFIG_USB_HID=y
724# CONFIG_USB_HIDINPUT_POWERBOOK is not set
725# CONFIG_HID_FF is not set
726# CONFIG_USB_HIDDEV is not set
727# CONFIG_USB_AIPTEK is not set
728# CONFIG_USB_WACOM is not set
729# CONFIG_USB_ACECAD is not set
730# CONFIG_USB_KBTAB is not set
731# CONFIG_USB_POWERMATE is not set
732# CONFIG_USB_TOUCHSCREEN is not set
733# CONFIG_USB_YEALINK is not set
734# CONFIG_USB_XPAD is not set
735# CONFIG_USB_ATI_REMOTE is not set
736# CONFIG_USB_ATI_REMOTE2 is not set
737# CONFIG_USB_KEYSPAN_REMOTE is not set
738# CONFIG_USB_APPLETOUCH is not set
739
740#
741# USB Imaging devices
742#
743# CONFIG_USB_MDC800 is not set
744# CONFIG_USB_MICROTEK is not set
745
746#
747# USB Network Adapters
748#
749# CONFIG_USB_CATC is not set
750# CONFIG_USB_KAWETH is not set
751# CONFIG_USB_PEGASUS is not set
752# CONFIG_USB_RTL8150 is not set
753CONFIG_USB_USBNET_MII=y
754CONFIG_USB_USBNET=y
755CONFIG_USB_NET_CDCETHER=y
756# CONFIG_USB_NET_GL620A is not set
757# CONFIG_USB_NET_NET1080 is not set
758# CONFIG_USB_NET_PLUSB is not set
759CONFIG_USB_NET_MCS7830=y
760# CONFIG_USB_NET_RNDIS_HOST is not set
761# CONFIG_USB_NET_CDC_SUBSET is not set
762# CONFIG_USB_NET_ZAURUS is not set
763CONFIG_USB_MON=y
764
765#
766# USB port drivers
767#
768
769#
770# USB Serial Converter support
771#
772# CONFIG_USB_SERIAL is not set
773
774#
775# USB Miscellaneous drivers
776#
777# CONFIG_USB_EMI62 is not set
778# CONFIG_USB_EMI26 is not set
779# CONFIG_USB_ADUTUX is not set
780# CONFIG_USB_AUERSWALD is not set
781# CONFIG_USB_RIO500 is not set
782# CONFIG_USB_LEGOTOWER is not set
783# CONFIG_USB_LCD is not set
784# CONFIG_USB_LED is not set
785# CONFIG_USB_CYPRESS_CY7C63 is not set
786# CONFIG_USB_CYTHERM is not set
787# CONFIG_USB_PHIDGET is not set
788# CONFIG_USB_IDMOUSE is not set
789# CONFIG_USB_FTDI_ELAN is not set
790# CONFIG_USB_APPLEDISPLAY is not set
791# CONFIG_USB_SISUSBVGA is not set
792# CONFIG_USB_LD is not set
793# CONFIG_USB_TRANCEVIBRATOR is not set
794
795#
796# USB DSL modem support
797#
798
799#
638# USB Gadget Support 800# USB Gadget Support
639# 801#
640# CONFIG_USB_GADGET is not set 802# CONFIG_USB_GADGET is not set
@@ -691,8 +853,14 @@ CONFIG_HID=y
691# File systems 853# File systems
692# 854#
693# CONFIG_EXT2_FS is not set 855# CONFIG_EXT2_FS is not set
694# CONFIG_EXT3_FS is not set 856CONFIG_EXT3_FS=y
857CONFIG_EXT3_FS_XATTR=y
858# CONFIG_EXT3_FS_POSIX_ACL is not set
859# CONFIG_EXT3_FS_SECURITY is not set
695# CONFIG_EXT4DEV_FS is not set 860# CONFIG_EXT4DEV_FS is not set
861CONFIG_JBD=y
862# CONFIG_JBD_DEBUG is not set
863CONFIG_FS_MBCACHE=y
696# CONFIG_REISERFS_FS is not set 864# CONFIG_REISERFS_FS is not set
697# CONFIG_JFS_FS is not set 865# CONFIG_JFS_FS is not set
698# CONFIG_FS_POSIX_ACL is not set 866# CONFIG_FS_POSIX_ACL is not set
@@ -712,14 +880,20 @@ CONFIG_DNOTIFY=y
712# 880#
713# CD-ROM/DVD Filesystems 881# CD-ROM/DVD Filesystems
714# 882#
715# CONFIG_ISO9660_FS is not set 883CONFIG_ISO9660_FS=y
716# CONFIG_UDF_FS is not set 884CONFIG_JOLIET=y
885# CONFIG_ZISOFS is not set
886CONFIG_UDF_FS=y
887CONFIG_UDF_NLS=y
717 888
718# 889#
719# DOS/FAT/NT Filesystems 890# DOS/FAT/NT Filesystems
720# 891#
892CONFIG_FAT_FS=y
721# CONFIG_MSDOS_FS is not set 893# CONFIG_MSDOS_FS is not set
722# CONFIG_VFAT_FS is not set 894CONFIG_VFAT_FS=y
895CONFIG_FAT_DEFAULT_CODEPAGE=437
896CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
723# CONFIG_NTFS_FS is not set 897# CONFIG_NTFS_FS is not set
724 898
725# 899#
@@ -785,7 +959,46 @@ CONFIG_MSDOS_PARTITION=y
785# 959#
786# Native Language Support 960# Native Language Support
787# 961#
788# CONFIG_NLS is not set 962CONFIG_NLS=y
963CONFIG_NLS_DEFAULT="iso8859-1"
964CONFIG_NLS_CODEPAGE_437=y
965# CONFIG_NLS_CODEPAGE_737 is not set
966# CONFIG_NLS_CODEPAGE_775 is not set
967# CONFIG_NLS_CODEPAGE_850 is not set
968# CONFIG_NLS_CODEPAGE_852 is not set
969# CONFIG_NLS_CODEPAGE_855 is not set
970# CONFIG_NLS_CODEPAGE_857 is not set
971# CONFIG_NLS_CODEPAGE_860 is not set
972# CONFIG_NLS_CODEPAGE_861 is not set
973# CONFIG_NLS_CODEPAGE_862 is not set
974# CONFIG_NLS_CODEPAGE_863 is not set
975# CONFIG_NLS_CODEPAGE_864 is not set
976# CONFIG_NLS_CODEPAGE_865 is not set
977# CONFIG_NLS_CODEPAGE_866 is not set
978# CONFIG_NLS_CODEPAGE_869 is not set
979# CONFIG_NLS_CODEPAGE_936 is not set
980# CONFIG_NLS_CODEPAGE_950 is not set
981# CONFIG_NLS_CODEPAGE_932 is not set
982# CONFIG_NLS_CODEPAGE_949 is not set
983# CONFIG_NLS_CODEPAGE_874 is not set
984# CONFIG_NLS_ISO8859_8 is not set
985# CONFIG_NLS_CODEPAGE_1250 is not set
986# CONFIG_NLS_CODEPAGE_1251 is not set
987# CONFIG_NLS_ASCII is not set
988CONFIG_NLS_ISO8859_1=y
989# CONFIG_NLS_ISO8859_2 is not set
990# CONFIG_NLS_ISO8859_3 is not set
991# CONFIG_NLS_ISO8859_4 is not set
992# CONFIG_NLS_ISO8859_5 is not set
993# CONFIG_NLS_ISO8859_6 is not set
994# CONFIG_NLS_ISO8859_7 is not set
995# CONFIG_NLS_ISO8859_9 is not set
996# CONFIG_NLS_ISO8859_13 is not set
997# CONFIG_NLS_ISO8859_14 is not set
998# CONFIG_NLS_ISO8859_15 is not set
999# CONFIG_NLS_KOI8_R is not set
1000# CONFIG_NLS_KOI8_U is not set
1001# CONFIG_NLS_UTF8 is not set
789 1002
790# 1003#
791# Distributed Lock Manager 1004# Distributed Lock Manager
@@ -795,9 +1008,10 @@ CONFIG_MSDOS_PARTITION=y
795# 1008#
796# Library routines 1009# Library routines
797# 1010#
1011CONFIG_BITREVERSE=y
798# CONFIG_CRC_CCITT is not set 1012# CONFIG_CRC_CCITT is not set
799# CONFIG_CRC16 is not set 1013# CONFIG_CRC16 is not set
800# CONFIG_CRC32 is not set 1014CONFIG_CRC32=y
801# CONFIG_LIBCRC32C is not set 1015# CONFIG_LIBCRC32C is not set
802CONFIG_PLIST=y 1016CONFIG_PLIST=y
803CONFIG_IOMAP_COPY=y 1017CONFIG_IOMAP_COPY=y
@@ -821,22 +1035,23 @@ CONFIG_DEBUG_KERNEL=y
821CONFIG_LOG_BUF_SHIFT=17 1035CONFIG_LOG_BUF_SHIFT=17
822CONFIG_DETECT_SOFTLOCKUP=y 1036CONFIG_DETECT_SOFTLOCKUP=y
823# CONFIG_SCHEDSTATS is not set 1037# CONFIG_SCHEDSTATS is not set
824# CONFIG_DEBUG_SLAB is not set 1038CONFIG_DEBUG_SLAB=y
1039# CONFIG_DEBUG_SLAB_LEAK is not set
825# CONFIG_DEBUG_RT_MUTEXES is not set 1040# CONFIG_DEBUG_RT_MUTEXES is not set
826# CONFIG_RT_MUTEX_TESTER is not set 1041# CONFIG_RT_MUTEX_TESTER is not set
827CONFIG_DEBUG_SPINLOCK=y 1042CONFIG_DEBUG_SPINLOCK=y
828# CONFIG_DEBUG_MUTEXES is not set 1043CONFIG_DEBUG_MUTEXES=y
829# CONFIG_DEBUG_RWSEMS is not set 1044CONFIG_DEBUG_RWSEMS=y
830CONFIG_DEBUG_SPINLOCK_SLEEP=y 1045CONFIG_DEBUG_SPINLOCK_SLEEP=y
831# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1046# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
832# CONFIG_DEBUG_KOBJECT is not set 1047# CONFIG_DEBUG_KOBJECT is not set
833# CONFIG_DEBUG_BUGVERBOSE is not set 1048CONFIG_DEBUG_BUGVERBOSE=y
834CONFIG_DEBUG_INFO=y 1049CONFIG_DEBUG_INFO=y
835# CONFIG_DEBUG_VM is not set 1050# CONFIG_DEBUG_VM is not set
836CONFIG_DEBUG_LIST=y 1051CONFIG_DEBUG_LIST=y
837CONFIG_FORCED_INLINING=y 1052CONFIG_FORCED_INLINING=y
838# CONFIG_RCU_TORTURE_TEST is not set 1053# CONFIG_RCU_TORTURE_TEST is not set
839# CONFIG_DEBUG_STACKOVERFLOW is not set 1054CONFIG_DEBUG_STACKOVERFLOW=y
840# CONFIG_DEBUG_STACK_USAGE is not set 1055# CONFIG_DEBUG_STACK_USAGE is not set
841# CONFIG_DEBUGGER is not set 1056# CONFIG_DEBUGGER is not set
842CONFIG_IRQSTACKS=y 1057CONFIG_IRQSTACKS=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 1c794fe718fd..6e96e50c362d 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -483,7 +483,7 @@ CONFIG_BLK_DEV_AMD74XX=y
483# CONFIG_BLK_DEV_PDC202XX_NEW is not set 483# CONFIG_BLK_DEV_PDC202XX_NEW is not set
484# CONFIG_BLK_DEV_SVWKS is not set 484# CONFIG_BLK_DEV_SVWKS is not set
485# CONFIG_BLK_DEV_SIIMAGE is not set 485# CONFIG_BLK_DEV_SIIMAGE is not set
486CONFIG_BLK_DEV_SL82C105=y 486# CONFIG_BLK_DEV_SL82C105 is not set
487# CONFIG_BLK_DEV_SLC90E66 is not set 487# CONFIG_BLK_DEV_SLC90E66 is not set
488# CONFIG_BLK_DEV_TRM290 is not set 488# CONFIG_BLK_DEV_TRM290 is not set
489# CONFIG_BLK_DEV_VIA82CXXX is not set 489# CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -628,7 +628,7 @@ CONFIG_ATA=y
628# CONFIG_PATA_SIL680 is not set 628# CONFIG_PATA_SIL680 is not set
629# CONFIG_PATA_SIS is not set 629# CONFIG_PATA_SIS is not set
630# CONFIG_PATA_VIA is not set 630# CONFIG_PATA_VIA is not set
631# CONFIG_PATA_WINBOND is not set 631CONFIG_PATA_WINBOND=y
632 632
633# 633#
634# Multi-device support (RAID and LVM) 634# Multi-device support (RAID and LVM)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index d2ded19e4064..8120d428ebfd 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -17,6 +17,7 @@ obj-y += vdso32/
17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
18 signal_64.o ptrace32.o \ 18 signal_64.o ptrace32.o \
19 paca.o cpu_setup_ppc970.o \ 19 paca.o cpu_setup_ppc970.o \
20 cpu_setup_pa6t.o \
20 firmware.o sysfs.o nvram_64.o 21 firmware.o sysfs.o nvram_64.o
21obj-$(CONFIG_PPC64) += vdso64/ 22obj-$(CONFIG_PPC64) += vdso64/
22obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 23obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 93f21aaf7c8e..3678997339d6 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -18,6 +18,7 @@
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/lmb.h> 19#include <asm/lmb.h>
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <asm/udbg.h>
21 22
22#define NO_SCROLL 23#define NO_SCROLL
23 24
@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = {
9120x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9130x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9130x00, 0x00, 0x00, 0x00, 9140x00, 0x00, 0x00, 0x00,
914}; 915};
916
917void __init udbg_init_btext(void)
918{
919 /* If btext is enabled, we might have a BAT setup for early display,
920 * thus we do enable some very basic udbg output
921 */
922 udbg_putc = btext_drawchar;
923}
diff --git a/arch/powerpc/kernel/cpu_setup_pa6t.S b/arch/powerpc/kernel/cpu_setup_pa6t.S
new file mode 100644
index 000000000000..4047be25c4d2
--- /dev/null
+++ b/arch/powerpc/kernel/cpu_setup_pa6t.S
@@ -0,0 +1,44 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
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
21#include <asm/processor.h>
22#include <asm/page.h>
23#include <asm/cputable.h>
24#include <asm/ppc_asm.h>
25#include <asm/asm-offsets.h>
26#include <asm/cache.h>
27
28/* Right now, restore and setup are the same thing */
29_GLOBAL(__restore_cpu_pa6t)
30_GLOBAL(__setup_cpu_pa6t)
31 /* Do nothing if not running in HV mode */
32 mfmsr r0
33 rldicl. r0,r0,4,63
34 beqlr
35
36 mfspr r0,SPRN_HID5
37 ori r0,r0,0x30
38 mtspr SPRN_HID5,r0
39
40 mfspr r0,SPRN_LPCR
41 ori r0,r0,0x7000
42 mtspr SPRN_LPCR,r0
43
44 blr
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index b742013bb9da..7ec4ac77c0fa 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -43,6 +43,8 @@ extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
43#ifdef CONFIG_PPC64 43#ifdef CONFIG_PPC64
44extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); 44extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); 45extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
47extern void __restore_cpu_pa6t(void);
46extern void __restore_cpu_ppc970(void); 48extern void __restore_cpu_ppc970(void);
47#endif /* CONFIG_PPC64 */ 49#endif /* CONFIG_PPC64 */
48 50
@@ -86,6 +88,7 @@ static struct cpu_spec cpu_specs[] = {
86 .icache_bsize = 128, 88 .icache_bsize = 128,
87 .dcache_bsize = 128, 89 .dcache_bsize = 128,
88 .num_pmcs = 8, 90 .num_pmcs = 8,
91 .pmc_type = PPC_PMC_IBM,
89 .oprofile_cpu_type = "ppc64/power3", 92 .oprofile_cpu_type = "ppc64/power3",
90 .oprofile_type = PPC_OPROFILE_RS64, 93 .oprofile_type = PPC_OPROFILE_RS64,
91 .platform = "power3", 94 .platform = "power3",
@@ -99,6 +102,7 @@ static struct cpu_spec cpu_specs[] = {
99 .icache_bsize = 128, 102 .icache_bsize = 128,
100 .dcache_bsize = 128, 103 .dcache_bsize = 128,
101 .num_pmcs = 8, 104 .num_pmcs = 8,
105 .pmc_type = PPC_PMC_IBM,
102 .oprofile_cpu_type = "ppc64/power3", 106 .oprofile_cpu_type = "ppc64/power3",
103 .oprofile_type = PPC_OPROFILE_RS64, 107 .oprofile_type = PPC_OPROFILE_RS64,
104 .platform = "power3", 108 .platform = "power3",
@@ -112,6 +116,7 @@ static struct cpu_spec cpu_specs[] = {
112 .icache_bsize = 128, 116 .icache_bsize = 128,
113 .dcache_bsize = 128, 117 .dcache_bsize = 128,
114 .num_pmcs = 8, 118 .num_pmcs = 8,
119 .pmc_type = PPC_PMC_IBM,
115 .oprofile_cpu_type = "ppc64/rs64", 120 .oprofile_cpu_type = "ppc64/rs64",
116 .oprofile_type = PPC_OPROFILE_RS64, 121 .oprofile_type = PPC_OPROFILE_RS64,
117 .platform = "rs64", 122 .platform = "rs64",
@@ -125,6 +130,7 @@ static struct cpu_spec cpu_specs[] = {
125 .icache_bsize = 128, 130 .icache_bsize = 128,
126 .dcache_bsize = 128, 131 .dcache_bsize = 128,
127 .num_pmcs = 8, 132 .num_pmcs = 8,
133 .pmc_type = PPC_PMC_IBM,
128 .oprofile_cpu_type = "ppc64/rs64", 134 .oprofile_cpu_type = "ppc64/rs64",
129 .oprofile_type = PPC_OPROFILE_RS64, 135 .oprofile_type = PPC_OPROFILE_RS64,
130 .platform = "rs64", 136 .platform = "rs64",
@@ -138,6 +144,7 @@ static struct cpu_spec cpu_specs[] = {
138 .icache_bsize = 128, 144 .icache_bsize = 128,
139 .dcache_bsize = 128, 145 .dcache_bsize = 128,
140 .num_pmcs = 8, 146 .num_pmcs = 8,
147 .pmc_type = PPC_PMC_IBM,
141 .oprofile_cpu_type = "ppc64/rs64", 148 .oprofile_cpu_type = "ppc64/rs64",
142 .oprofile_type = PPC_OPROFILE_RS64, 149 .oprofile_type = PPC_OPROFILE_RS64,
143 .platform = "rs64", 150 .platform = "rs64",
@@ -151,6 +158,7 @@ static struct cpu_spec cpu_specs[] = {
151 .icache_bsize = 128, 158 .icache_bsize = 128,
152 .dcache_bsize = 128, 159 .dcache_bsize = 128,
153 .num_pmcs = 8, 160 .num_pmcs = 8,
161 .pmc_type = PPC_PMC_IBM,
154 .oprofile_cpu_type = "ppc64/rs64", 162 .oprofile_cpu_type = "ppc64/rs64",
155 .oprofile_type = PPC_OPROFILE_RS64, 163 .oprofile_type = PPC_OPROFILE_RS64,
156 .platform = "rs64", 164 .platform = "rs64",
@@ -164,6 +172,7 @@ static struct cpu_spec cpu_specs[] = {
164 .icache_bsize = 128, 172 .icache_bsize = 128,
165 .dcache_bsize = 128, 173 .dcache_bsize = 128,
166 .num_pmcs = 8, 174 .num_pmcs = 8,
175 .pmc_type = PPC_PMC_IBM,
167 .oprofile_cpu_type = "ppc64/power4", 176 .oprofile_cpu_type = "ppc64/power4",
168 .oprofile_type = PPC_OPROFILE_POWER4, 177 .oprofile_type = PPC_OPROFILE_POWER4,
169 .platform = "power4", 178 .platform = "power4",
@@ -177,6 +186,7 @@ static struct cpu_spec cpu_specs[] = {
177 .icache_bsize = 128, 186 .icache_bsize = 128,
178 .dcache_bsize = 128, 187 .dcache_bsize = 128,
179 .num_pmcs = 8, 188 .num_pmcs = 8,
189 .pmc_type = PPC_PMC_IBM,
180 .oprofile_cpu_type = "ppc64/power4", 190 .oprofile_cpu_type = "ppc64/power4",
181 .oprofile_type = PPC_OPROFILE_POWER4, 191 .oprofile_type = PPC_OPROFILE_POWER4,
182 .platform = "power4", 192 .platform = "power4",
@@ -191,6 +201,7 @@ static struct cpu_spec cpu_specs[] = {
191 .icache_bsize = 128, 201 .icache_bsize = 128,
192 .dcache_bsize = 128, 202 .dcache_bsize = 128,
193 .num_pmcs = 8, 203 .num_pmcs = 8,
204 .pmc_type = PPC_PMC_IBM,
194 .cpu_setup = __setup_cpu_ppc970, 205 .cpu_setup = __setup_cpu_ppc970,
195 .cpu_restore = __restore_cpu_ppc970, 206 .cpu_restore = __restore_cpu_ppc970,
196 .oprofile_cpu_type = "ppc64/970", 207 .oprofile_cpu_type = "ppc64/970",
@@ -207,6 +218,7 @@ static struct cpu_spec cpu_specs[] = {
207 .icache_bsize = 128, 218 .icache_bsize = 128,
208 .dcache_bsize = 128, 219 .dcache_bsize = 128,
209 .num_pmcs = 8, 220 .num_pmcs = 8,
221 .pmc_type = PPC_PMC_IBM,
210 .cpu_setup = __setup_cpu_ppc970, 222 .cpu_setup = __setup_cpu_ppc970,
211 .cpu_restore = __restore_cpu_ppc970, 223 .cpu_restore = __restore_cpu_ppc970,
212 .oprofile_cpu_type = "ppc64/970", 224 .oprofile_cpu_type = "ppc64/970",
@@ -239,6 +251,7 @@ static struct cpu_spec cpu_specs[] = {
239 .icache_bsize = 128, 251 .icache_bsize = 128,
240 .dcache_bsize = 128, 252 .dcache_bsize = 128,
241 .num_pmcs = 8, 253 .num_pmcs = 8,
254 .pmc_type = PPC_PMC_IBM,
242 .cpu_setup = __setup_cpu_ppc970, 255 .cpu_setup = __setup_cpu_ppc970,
243 .oprofile_cpu_type = "ppc64/970", 256 .oprofile_cpu_type = "ppc64/970",
244 .oprofile_type = PPC_OPROFILE_POWER4, 257 .oprofile_type = PPC_OPROFILE_POWER4,
@@ -253,6 +266,7 @@ static struct cpu_spec cpu_specs[] = {
253 .icache_bsize = 128, 266 .icache_bsize = 128,
254 .dcache_bsize = 128, 267 .dcache_bsize = 128,
255 .num_pmcs = 6, 268 .num_pmcs = 6,
269 .pmc_type = PPC_PMC_IBM,
256 .oprofile_cpu_type = "ppc64/power5", 270 .oprofile_cpu_type = "ppc64/power5",
257 .oprofile_type = PPC_OPROFILE_POWER4, 271 .oprofile_type = PPC_OPROFILE_POWER4,
258 /* SIHV / SIPR bits are implemented on POWER4+ (GQ) 272 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
@@ -271,6 +285,7 @@ static struct cpu_spec cpu_specs[] = {
271 .icache_bsize = 128, 285 .icache_bsize = 128,
272 .dcache_bsize = 128, 286 .dcache_bsize = 128,
273 .num_pmcs = 6, 287 .num_pmcs = 6,
288 .pmc_type = PPC_PMC_IBM,
274 .oprofile_cpu_type = "ppc64/power5+", 289 .oprofile_cpu_type = "ppc64/power5+",
275 .oprofile_type = PPC_OPROFILE_POWER4, 290 .oprofile_type = PPC_OPROFILE_POWER4,
276 .oprofile_mmcra_sihv = MMCRA_SIHV, 291 .oprofile_mmcra_sihv = MMCRA_SIHV,
@@ -321,6 +336,7 @@ static struct cpu_spec cpu_specs[] = {
321 .icache_bsize = 128, 336 .icache_bsize = 128,
322 .dcache_bsize = 128, 337 .dcache_bsize = 128,
323 .num_pmcs = 6, 338 .num_pmcs = 6,
339 .pmc_type = PPC_PMC_IBM,
324 .oprofile_cpu_type = "ppc64/power6", 340 .oprofile_cpu_type = "ppc64/power6",
325 .oprofile_type = PPC_OPROFILE_POWER4, 341 .oprofile_type = PPC_OPROFILE_POWER4,
326 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, 342 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
@@ -340,6 +356,7 @@ static struct cpu_spec cpu_specs[] = {
340 .icache_bsize = 128, 356 .icache_bsize = 128,
341 .dcache_bsize = 128, 357 .dcache_bsize = 128,
342 .num_pmcs = 4, 358 .num_pmcs = 4,
359 .pmc_type = PPC_PMC_IBM,
343 .oprofile_cpu_type = "ppc64/cell-be", 360 .oprofile_cpu_type = "ppc64/cell-be",
344 .oprofile_type = PPC_OPROFILE_CELL, 361 .oprofile_type = PPC_OPROFILE_CELL,
345 .platform = "ppc-cell-be", 362 .platform = "ppc-cell-be",
@@ -353,6 +370,9 @@ static struct cpu_spec cpu_specs[] = {
353 .icache_bsize = 64, 370 .icache_bsize = 64,
354 .dcache_bsize = 64, 371 .dcache_bsize = 64,
355 .num_pmcs = 6, 372 .num_pmcs = 6,
373 .pmc_type = PPC_PMC_PA6T,
374 .cpu_setup = __setup_cpu_pa6t,
375 .cpu_restore = __restore_cpu_pa6t,
356 .platform = "pa6t", 376 .platform = "pa6t",
357 }, 377 },
358 { /* default match */ 378 { /* default match */
@@ -364,6 +384,7 @@ static struct cpu_spec cpu_specs[] = {
364 .icache_bsize = 128, 384 .icache_bsize = 128,
365 .dcache_bsize = 128, 385 .dcache_bsize = 128,
366 .num_pmcs = 6, 386 .num_pmcs = 6,
387 .pmc_type = PPC_PMC_IBM,
367 .platform = "power4", 388 .platform = "power4",
368 } 389 }
369#endif /* CONFIG_PPC64 */ 390#endif /* CONFIG_PPC64 */
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2551c0884afc..2b66d53dcc55 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -172,13 +172,18 @@ syscall_error_cont:
172 stdcx. r0,0,r1 /* to clear the reservation */ 172 stdcx. r0,0,r1 /* to clear the reservation */
173 andi. r6,r8,MSR_PR 173 andi. r6,r8,MSR_PR
174 ld r4,_LINK(r1) 174 ld r4,_LINK(r1)
175 /*
176 * Clear RI before restoring r13. If we are returning to
177 * userspace and we take an exception after restoring r13,
178 * we end up corrupting the userspace r13 value.
179 */
180 li r12,MSR_RI
181 andc r11,r10,r12
182 mtmsrd r11,1 /* clear MSR.RI */
175 beq- 1f 183 beq- 1f
176 ACCOUNT_CPU_USER_EXIT(r11, r12) 184 ACCOUNT_CPU_USER_EXIT(r11, r12)
177 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ 185 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */
1781: ld r2,GPR2(r1) 1861: ld r2,GPR2(r1)
179 li r12,MSR_RI
180 andc r11,r10,r12
181 mtmsrd r11,1 /* clear MSR.RI */
182 ld r1,GPR1(r1) 187 ld r1,GPR1(r1)
183 mtlr r4 188 mtlr r4
184 mtcr r5 189 mtcr r5
@@ -488,42 +493,44 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
488#endif 493#endif
489 stb r5,PACASOFTIRQEN(r13) 494 stb r5,PACASOFTIRQEN(r13)
490 495
496 /* extract EE bit and use it to restore paca->hard_enabled */
491 ld r3,_MSR(r1) 497 ld r3,_MSR(r1)
498 rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
499 stb r4,PACAHARDIRQEN(r13)
500
501 ld r4,_CTR(r1)
502 ld r0,_LINK(r1)
503 mtctr r4
504 mtlr r0
505 ld r4,_XER(r1)
506 mtspr SPRN_XER,r4
507
508 REST_8GPRS(5, r1)
509
492 andi. r0,r3,MSR_RI 510 andi. r0,r3,MSR_RI
493 beq- unrecov_restore 511 beq- unrecov_restore
494 512
495 /* extract EE bit and use it to restore paca->hard_enabled */ 513 stdcx. r0,0,r1 /* to clear the reservation */
496 rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
497 stb r4,PACAHARDIRQEN(r13)
498 514
499 andi. r0,r3,MSR_PR 515 /*
516 * Clear RI before restoring r13. If we are returning to
517 * userspace and we take an exception after restoring r13,
518 * we end up corrupting the userspace r13 value.
519 */
520 mfmsr r4
521 andc r4,r4,r0 /* r0 contains MSR_RI here */
522 mtmsrd r4,1
500 523
501 /* 524 /*
502 * r13 is our per cpu area, only restore it if we are returning to 525 * r13 is our per cpu area, only restore it if we are returning to
503 * userspace 526 * userspace
504 */ 527 */
528 andi. r0,r3,MSR_PR
505 beq 1f 529 beq 1f
506 ACCOUNT_CPU_USER_EXIT(r3, r4) 530 ACCOUNT_CPU_USER_EXIT(r2, r4)
507 REST_GPR(13, r1) 531 REST_GPR(13, r1)
5081: 5321:
509 ld r3,_CTR(r1) 533 mtspr SPRN_SRR1,r3
510 ld r0,_LINK(r1)
511 mtctr r3
512 mtlr r0
513 ld r3,_XER(r1)
514 mtspr SPRN_XER,r3
515
516 REST_8GPRS(5, r1)
517
518 stdcx. r0,0,r1 /* to clear the reservation */
519
520 mfmsr r0
521 li r2, MSR_RI
522 andc r0,r0,r2
523 mtmsrd r0,1
524
525 ld r0,_MSR(r1)
526 mtspr SPRN_SRR1,r0
527 534
528 ld r2,_CCR(r1) 535 ld r2,_CCR(r1)
529 mtcrf 0xFF,r2 536 mtcrf 0xFF,r2
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 9417cf5b4b7e..c897203198b1 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -344,12 +344,7 @@ i##n: \
344/* System reset */ 344/* System reset */
345/* core99 pmac starts the seconary here by changing the vector, and 345/* core99 pmac starts the seconary here by changing the vector, and
346 putting it back to what it was (unknown_exception) when done. */ 346 putting it back to what it was (unknown_exception) when done. */
347#if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
348 . = 0x100
349 b __secondary_start_gemini
350#else
351 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) 347 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD)
352#endif
353 348
354/* Machine check */ 349/* Machine check */
355/* 350/*
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index accb39d49911..a15d4b8cce48 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -32,8 +32,6 @@
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/mmu.h> 33#include <asm/mmu.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/ibm4xx.h>
36#include <asm/ibm44x.h>
37#include <asm/cputable.h> 35#include <asm/cputable.h>
38#include <asm/thread_info.h> 36#include <asm/thread_info.h>
39#include <asm/ppc_asm.h> 37#include <asm/ppc_asm.h>
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 71b1fe58e9e4..97cedcd6c9b4 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -613,7 +613,7 @@ system_call_pSeries:
613/*** pSeries interrupt support ***/ 613/*** pSeries interrupt support ***/
614 614
615 /* moved from 0xf00 */ 615 /* moved from 0xf00 */
616 MASKABLE_EXCEPTION_PSERIES(., performance_monitor) 616 STD_EXCEPTION_PSERIES(., performance_monitor)
617 617
618/* 618/*
619 * An interrupt came in while soft-disabled; clear EE in SRR1, 619 * An interrupt came in while soft-disabled; clear EE in SRR1,
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 66877bdfe0b7..1f155d399d57 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */
206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
207 mtspr SPRN_MAS0,r7 207 mtspr SPRN_MAS0,r7
208 tlbre 208 tlbre
209 li r6,0 209 mfspr r6,SPRN_MAS1
210 rlwinm r6,r6,0,2,0 /* clear IPROT */
210 mtspr SPRN_MAS1,r6 211 mtspr SPRN_MAS1,r6
211 tlbwe 212 tlbwe
212 /* Invalidate TLB1 */ 213 /* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */
248 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ 249 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
249 mtspr SPRN_MAS0,r7 250 mtspr SPRN_MAS0,r7
250 tlbre 251 tlbre
252 mfspr r8,SPRN_MAS1
253 rlwinm r8,r8,0,2,0 /* clear IPROT */
251 mtspr SPRN_MAS1,r8 254 mtspr SPRN_MAS1,r8
252 tlbwe 255 tlbwe
253 /* Invalidate TLB1 */ 256 /* Invalidate TLB1 */
@@ -889,7 +892,6 @@ load_up_spe:
889 REST_GPR(9, r11) 892 REST_GPR(9, r11)
890 REST_GPR(12, r11) 893 REST_GPR(12, r11)
891 lwz r11,GPR11(r11) 894 lwz r11,GPR11(r11)
892 SYNC
893 rfi 895 rfi
894 896
895/* 897/*
@@ -953,7 +955,6 @@ _GLOBAL(giveup_altivec)
953_GLOBAL(giveup_spe) 955_GLOBAL(giveup_spe)
954 mfmsr r5 956 mfmsr r5
955 oris r5,r5,MSR_SPE@h 957 oris r5,r5,MSR_SPE@h
956 SYNC
957 mtmsr r5 /* enable use of SPE now */ 958 mtmsr r5 /* enable use of SPE now */
958 isync 959 isync
959 cmpi 0,r3,0 960 cmpi 0,r3,0
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 8994af327b47..6e7f50967bab 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -110,17 +110,22 @@ static ctl_table powersave_nap_ctl_table[]={
110 .mode = 0644, 110 .mode = 0644,
111 .proc_handler = &proc_dointvec, 111 .proc_handler = &proc_dointvec,
112 }, 112 },
113 { 0, }, 113 {}
114}; 114};
115static ctl_table powersave_nap_sysctl_root[] = { 115static ctl_table powersave_nap_sysctl_root[] = {
116 { 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, }, 116 {
117 { 0,}, 117 .ctl_name = CTL_KERN,
118 .procname = "kernel",
119 .mode = 0755,
120 .child = powersave_nap_ctl_table,
121 },
122 {}
118}; 123};
119 124
120static int __init 125static int __init
121register_powersave_nap_sysctl(void) 126register_powersave_nap_sysctl(void)
122{ 127{
123 register_sysctl_table(powersave_nap_sysctl_root, 0); 128 register_sysctl_table(powersave_nap_sysctl_root);
124 129
125 return 0; 130 return 0;
126} 131}
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index c68113371050..601ef79a5916 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -12,23 +12,23 @@
12 * Here comes the ppc64 implementation of the IOMAP 12 * Here comes the ppc64 implementation of the IOMAP
13 * interfaces. 13 * interfaces.
14 */ 14 */
15unsigned int fastcall ioread8(void __iomem *addr) 15unsigned int ioread8(void __iomem *addr)
16{ 16{
17 return readb(addr); 17 return readb(addr);
18} 18}
19unsigned int fastcall ioread16(void __iomem *addr) 19unsigned int ioread16(void __iomem *addr)
20{ 20{
21 return readw(addr); 21 return readw(addr);
22} 22}
23unsigned int fastcall ioread16be(void __iomem *addr) 23unsigned int ioread16be(void __iomem *addr)
24{ 24{
25 return in_be16(addr); 25 return in_be16(addr);
26} 26}
27unsigned int fastcall ioread32(void __iomem *addr) 27unsigned int ioread32(void __iomem *addr)
28{ 28{
29 return readl(addr); 29 return readl(addr);
30} 30}
31unsigned int fastcall ioread32be(void __iomem *addr) 31unsigned int ioread32be(void __iomem *addr)
32{ 32{
33 return in_be32(addr); 33 return in_be32(addr);
34} 34}
@@ -38,23 +38,23 @@ EXPORT_SYMBOL(ioread16be);
38EXPORT_SYMBOL(ioread32); 38EXPORT_SYMBOL(ioread32);
39EXPORT_SYMBOL(ioread32be); 39EXPORT_SYMBOL(ioread32be);
40 40
41void fastcall iowrite8(u8 val, void __iomem *addr) 41void iowrite8(u8 val, void __iomem *addr)
42{ 42{
43 writeb(val, addr); 43 writeb(val, addr);
44} 44}
45void fastcall iowrite16(u16 val, void __iomem *addr) 45void iowrite16(u16 val, void __iomem *addr)
46{ 46{
47 writew(val, addr); 47 writew(val, addr);
48} 48}
49void fastcall iowrite16be(u16 val, void __iomem *addr) 49void iowrite16be(u16 val, void __iomem *addr)
50{ 50{
51 out_be16(addr, val); 51 out_be16(addr, val);
52} 52}
53void fastcall iowrite32(u32 val, void __iomem *addr) 53void iowrite32(u32 val, void __iomem *addr)
54{ 54{
55 writel(val, addr); 55 writel(val, addr);
56} 56}
57void fastcall iowrite32be(u32 val, void __iomem *addr) 57void iowrite32be(u32 val, void __iomem *addr)
58{ 58{
59 out_be32(addr, val); 59 out_be32(addr, val);
60} 60}
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 0bd8c7665834..919fbf568495 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -281,10 +281,10 @@ void do_IRQ(struct pt_regs *regs)
281 281
282 /* 282 /*
283 * Every platform is required to implement ppc_md.get_irq. 283 * Every platform is required to implement ppc_md.get_irq.
284 * This function will either return an irq number or -1 to 284 * This function will either return an irq number or NO_IRQ to
285 * indicate there are no more pending. 285 * indicate there are no more pending.
286 * The value -2 is for buggy hardware and means that this IRQ 286 * The value NO_IRQ_IGNORE is for buggy hardware and means that this
287 * has already been handled. -- Tom 287 * IRQ has already been handled. -- Tom
288 */ 288 */
289 irq = ppc_md.get_irq(); 289 irq = ppc_md.get_irq();
290 290
@@ -604,6 +604,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
604 */ 604 */
605 virq = irq_find_mapping(host, hwirq); 605 virq = irq_find_mapping(host, hwirq);
606 if (virq != IRQ_NONE) { 606 if (virq != IRQ_NONE) {
607 if (host->ops->remap)
608 host->ops->remap(host, virq, hwirq);
607 pr_debug("irq: -> existing mapping on virq %d\n", virq); 609 pr_debug("irq: -> existing mapping on virq %d\n", virq);
608 return virq; 610 return virq;
609 } 611 }
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 4657563f8813..dd2886f97e98 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -46,8 +46,8 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
46 if ((unsigned long)p->addr & 0x03) { 46 if ((unsigned long)p->addr & 0x03) {
47 printk("Attempt to register kprobe at an unaligned address\n"); 47 printk("Attempt to register kprobe at an unaligned address\n");
48 ret = -EINVAL; 48 ret = -EINVAL;
49 } else if (IS_MTMSRD(insn) || IS_RFID(insn)) { 49 } else if (IS_MTMSRD(insn) || IS_RFID(insn) || IS_RFI(insn)) {
50 printk("Cannot register a kprobe on rfid or mtmsrd\n"); 50 printk("Cannot register a kprobe on rfi/rfid or mtmsr[d]\n");
51 ret = -EINVAL; 51 ret = -EINVAL;
52 } 52 }
53 53
@@ -483,8 +483,12 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
483 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs)); 483 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs));
484 484
485 /* setup return addr to the jprobe handler routine */ 485 /* setup return addr to the jprobe handler routine */
486#ifdef CONFIG_PPC64
486 regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry); 487 regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry);
487 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc); 488 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc);
489#else
490 regs->nip = (unsigned long)jp->entry;
491#endif
488 492
489 return 1; 493 return 1;
490} 494}
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 5e6ddfa474c0..325f490a10cc 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -124,6 +124,10 @@ static int __init add_legacy_soc_port(struct device_node *np,
124 if (get_property(np, "clock-frequency", NULL) == NULL) 124 if (get_property(np, "clock-frequency", NULL) == NULL)
125 return -1; 125 return -1;
126 126
127 /* if rtas uses this device, don't try to use it as well */
128 if (get_property(np, "used-by-rtas", NULL) != NULL)
129 return -1;
130
127 /* Get the address */ 131 /* Get the address */
128 addrp = of_get_address(soc_dev, 0, NULL, NULL); 132 addrp = of_get_address(soc_dev, 0, NULL, NULL);
129 if (addrp == NULL) 133 if (addrp == NULL)
@@ -334,6 +338,17 @@ void __init find_legacy_serial_ports(void)
334 of_node_put(tsi); 338 of_node_put(tsi);
335 } 339 }
336 340
341 /* First fill our array with opb bus ports */
342 for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16750")) != NULL;) {
343 struct device_node *opb = of_get_parent(np);
344 if (opb && !strcmp(opb->type, "opb")) {
345 index = add_legacy_soc_port(np, np);
346 if (index >= 0 && np == stdout)
347 legacy_serial_console = index;
348 }
349 of_node_put(opb);
350 }
351
337#ifdef CONFIG_PCI 352#ifdef CONFIG_PCI
338 /* Next, try to locate PCI ports */ 353 /* Next, try to locate PCI ports */
339 for (np = NULL; (np = of_find_all_nodes(np));) { 354 for (np = NULL; (np = of_find_all_nodes(np));) {
@@ -498,7 +513,7 @@ static int __init check_legacy_serial_console(void)
498 DBG(" -> check_legacy_serial_console()\n"); 513 DBG(" -> check_legacy_serial_console()\n");
499 514
500 /* The user has requested a console so this is already set up. */ 515 /* The user has requested a console so this is already set up. */
501 if (strstr(saved_command_line, "console=")) { 516 if (strstr(boot_command_line, "console=")) {
502 DBG(" console was specified !\n"); 517 DBG(" console was specified !\n");
503 return -EBUSY; 518 return -EBUSY;
504 } 519 }
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 41c05dcd68f4..89486b631284 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -439,6 +439,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
439 439
440 ssize_t retval = -ENOMEM; 440 ssize_t retval = -ENOMEM;
441 441
442 if (!firmware_has_feature(FW_FEATURE_SPLPAR) ||
443 firmware_has_feature(FW_FEATURE_ISERIES))
444 return -EINVAL;
445
442 kbuf = kmalloc(count, GFP_KERNEL); 446 kbuf = kmalloc(count, GFP_KERNEL);
443 if (!kbuf) 447 if (!kbuf)
444 goto out; 448 goto out;
@@ -517,7 +521,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
517static ssize_t lparcfg_write(struct file *file, const char __user * buf, 521static ssize_t lparcfg_write(struct file *file, const char __user * buf,
518 size_t count, loff_t * off) 522 size_t count, loff_t * off)
519{ 523{
520 return count; 524 return -EINVAL;
521} 525}
522 526
523#endif /* CONFIG_PPC_PSERIES */ 527#endif /* CONFIG_PPC_PSERIES */
@@ -567,9 +571,10 @@ static int lparcfg_open(struct inode *inode, struct file *file)
567 return single_open(file, lparcfg_data, NULL); 571 return single_open(file, lparcfg_data, NULL);
568} 572}
569 573
570struct file_operations lparcfg_fops = { 574const struct file_operations lparcfg_fops = {
571 .owner = THIS_MODULE, 575 .owner = THIS_MODULE,
572 .read = seq_read, 576 .read = seq_read,
577 .write = lparcfg_write,
573 .open = lparcfg_open, 578 .open = lparcfg_open,
574 .release = single_release, 579 .release = single_release,
575}; 580};
@@ -581,10 +586,8 @@ int __init lparcfg_init(void)
581 586
582 /* Allow writing if we have FW_FEATURE_SPLPAR */ 587 /* Allow writing if we have FW_FEATURE_SPLPAR */
583 if (firmware_has_feature(FW_FEATURE_SPLPAR) && 588 if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
584 !firmware_has_feature(FW_FEATURE_ISERIES)) { 589 !firmware_has_feature(FW_FEATURE_ISERIES))
585 lparcfg_fops.write = lparcfg_write;
586 mode |= S_IWUSR; 590 mode |= S_IWUSR;
587 }
588 591
589 ent = create_proc_entry("ppc64/lparcfg", mode, NULL); 592 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
590 if (ent) { 593 if (ent) {
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 21fd2c662a99..519861da0423 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -311,6 +311,46 @@ _GLOBAL(real_writeb)
311 blr 311 blr
312#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ 312#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
313 313
314#ifdef CONFIG_PPC_PASEMI
315
316/* No support in all binutils for these yet, so use defines */
317#define LBZCIX(RT,RA,RB) .long (0x7c0006aa|(RT<<21)|(RA<<16)|(RB << 11))
318#define STBCIX(RS,RA,RB) .long (0x7c0007aa|(RS<<21)|(RA<<16)|(RB << 11))
319
320
321_GLOBAL(real_205_readb)
322 mfmsr r7
323 ori r0,r7,MSR_DR
324 xori r0,r0,MSR_DR
325 sync
326 mtmsrd r0
327 sync
328 isync
329 LBZCIX(r3,0,r3)
330 isync
331 mtmsrd r7
332 sync
333 isync
334 blr
335
336_GLOBAL(real_205_writeb)
337 mfmsr r7
338 ori r0,r7,MSR_DR
339 xori r0,r0,MSR_DR
340 sync
341 mtmsrd r0
342 sync
343 isync
344 STBCIX(r3,0,r4)
345 isync
346 mtmsrd r7
347 sync
348 isync
349 blr
350
351#endif /* CONFIG_PPC_PASEMI */
352
353
314#ifdef CONFIG_CPU_FREQ_PMAC64 354#ifdef CONFIG_CPU_FREQ_PMAC64
315/* 355/*
316 * SCOM access functions for 970 (FX only for now) 356 * SCOM access functions for 970 (FX only for now)
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
index 8339fd609de0..07a89a398639 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -224,7 +224,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
224 /* Low half of the symbol */ 224 /* Low half of the symbol */
225 *(uint16_t *)location = value; 225 *(uint16_t *)location = value;
226 break; 226 break;
227 227
228 case R_PPC_ADDR16_HI:
229 /* Higher half of the symbol */
230 *(uint16_t *)location = (value >> 16);
231 break;
232
228 case R_PPC_ADDR16_HA: 233 case R_PPC_ADDR16_HA:
229 /* Sign-adjusted lower 16 bits: PPC ELF ABI says: 234 /* Sign-adjusted lower 16 bits: PPC ELF ABI says:
230 (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF. 235 (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF.
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 869cebbba967..f9676f52c6d8 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -179,7 +179,7 @@ static int dev_nvram_ioctl(struct inode *inode, struct file *file,
179 } 179 }
180} 180}
181 181
182struct file_operations nvram_fops = { 182const struct file_operations nvram_fops = {
183 .owner = THIS_MODULE, 183 .owner = THIS_MODULE,
184 .llseek = dev_nvram_llseek, 184 .llseek = dev_nvram_llseek,
185 .read = dev_nvram_read, 185 .read = dev_nvram_read,
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index c54f3639c5ad..d8ef2e100505 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1450,7 +1450,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1450 return -1; 1450 return -1;
1451 } 1451 }
1452 pci_dev->irq = virq; 1452 pci_dev->irq = virq;
1453 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
1454 1453
1455 return 0; 1454 return 0;
1456} 1455}
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 01f18c683407..7e97d71a5f8f 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -381,8 +381,6 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
381 381
382 pci_device_add(dev, bus); 382 pci_device_add(dev, bus);
383 383
384 /* XXX pci_scan_msi_device(dev); */
385
386 return dev; 384 return dev;
387} 385}
388EXPORT_SYMBOL(of_create_pci_dev); 386EXPORT_SYMBOL(of_create_pci_dev);
@@ -1325,7 +1323,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1325 DBG(" -> mapped to linux irq %d\n", virq); 1323 DBG(" -> mapped to linux irq %d\n", virq);
1326 1324
1327 pci_dev->irq = virq; 1325 pci_dev->irq = virq;
1328 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
1329 1326
1330 return 0; 1327 return 0;
1331} 1328}
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index 3d8f6f44641e..24d7b7c99bb9 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -17,40 +17,25 @@
17#include <linux/module.h> 17#include <linux/module.h>
18 18
19#include <asm/processor.h> 19#include <asm/processor.h>
20#include <asm/cputable.h>
20#include <asm/pmc.h> 21#include <asm/pmc.h>
21 22
22#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) 23#ifndef MMCR0_PMA0
23static void dummy_perf(struct pt_regs *regs) 24#define MMCR0_PMA0 0
24{
25 unsigned int pmgc0 = mfpmr(PMRN_PMGC0);
26
27 pmgc0 &= ~PMGC0_PMIE;
28 mtpmr(PMRN_PMGC0, pmgc0);
29}
30#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
31
32#ifndef MMCR0_PMAO
33#define MMCR0_PMAO 0
34#endif 25#endif
35 26
36/* Ensure exceptions are disabled */
37static void dummy_perf(struct pt_regs *regs) 27static void dummy_perf(struct pt_regs *regs)
38{ 28{
39 unsigned int mmcr0 = mfspr(SPRN_MMCR0); 29#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200)
40 30 mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
41 mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); 31#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
42 mtspr(SPRN_MMCR0, mmcr0); 32 if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
43} 33 mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
44#else 34#else
45/* Ensure exceptions are disabled */ 35 mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
46static void dummy_perf(struct pt_regs *regs)
47{
48 unsigned int mmcr0 = mfspr(SPRN_MMCR0);
49
50 mmcr0 &= ~(MMCR0_PMXE);
51 mtspr(SPRN_MMCR0, mmcr0);
52}
53#endif 36#endif
37}
38
54 39
55static DEFINE_SPINLOCK(pmc_owner_lock); 40static DEFINE_SPINLOCK(pmc_owner_lock);
56static void *pmc_owner_caller; /* mostly for debugging */ 41static void *pmc_owner_caller; /* mostly for debugging */
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 95776b6af4e2..ecee596d28f6 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -44,6 +44,7 @@
44#include <asm/btext.h> 44#include <asm/btext.h>
45#include <asm/div64.h> 45#include <asm/div64.h>
46#include <asm/signal.h> 46#include <asm/signal.h>
47#include <asm/dcr.h>
47 48
48#ifdef CONFIG_8xx 49#ifdef CONFIG_8xx
49#include <asm/commproc.h> 50#include <asm/commproc.h>
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c
index dd7001cacf75..f78dfce1b771 100644
--- a/arch/powerpc/kernel/proc_ppc64.c
+++ b/arch/powerpc/kernel/proc_ppc64.c
@@ -33,7 +33,7 @@ static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes
33 loff_t *ppos); 33 loff_t *ppos);
34static int page_map_mmap( struct file *file, struct vm_area_struct *vma ); 34static int page_map_mmap( struct file *file, struct vm_area_struct *vma );
35 35
36static struct file_operations page_map_fops = { 36static const struct file_operations page_map_fops = {
37 .llseek = page_map_seek, 37 .llseek = page_map_seek,
38 .read = page_map_read, 38 .read = page_map_read,
39 .mmap = page_map_mmap 39 .mmap = page_map_mmap
@@ -71,7 +71,6 @@ static int __init proc_ppc64_init(void)
71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); 71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL);
72 if (!pde) 72 if (!pde)
73 return 1; 73 return 1;
74 pde->nlink = 1;
75 pde->data = vdso_data; 74 pde->data = vdso_data;
76 pde->size = PAGE_SIZE; 75 pde->size = PAGE_SIZE;
77 pde->proc_fops = &page_map_fops; 76 pde->proc_fops = &page_map_fops;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 1fc732a552db..8d52b23348bd 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -991,7 +991,7 @@ void __init early_init_devtree(void *params)
991 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 991 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
992 992
993 /* Save command line for /proc/cmdline and then parse parameters */ 993 /* Save command line for /proc/cmdline and then parse parameters */
994 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); 994 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
995 parse_early_param(); 995 parse_early_param();
996 996
997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */ 997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */
@@ -1221,8 +1221,7 @@ struct device_node *of_find_node_by_name(struct device_node *from,
1221 if (np->name != NULL && strcasecmp(np->name, name) == 0 1221 if (np->name != NULL && strcasecmp(np->name, name) == 0
1222 && of_node_get(np)) 1222 && of_node_get(np))
1223 break; 1223 break;
1224 if (from) 1224 of_node_put(from);
1225 of_node_put(from);
1226 read_unlock(&devtree_lock); 1225 read_unlock(&devtree_lock);
1227 return np; 1226 return np;
1228} 1227}
@@ -1250,8 +1249,7 @@ struct device_node *of_find_node_by_type(struct device_node *from,
1250 if (np->type != 0 && strcasecmp(np->type, type) == 0 1249 if (np->type != 0 && strcasecmp(np->type, type) == 0
1251 && of_node_get(np)) 1250 && of_node_get(np))
1252 break; 1251 break;
1253 if (from) 1252 of_node_put(from);
1254 of_node_put(from);
1255 read_unlock(&devtree_lock); 1253 read_unlock(&devtree_lock);
1256 return np; 1254 return np;
1257} 1255}
@@ -1285,8 +1283,7 @@ struct device_node *of_find_compatible_node(struct device_node *from,
1285 if (device_is_compatible(np, compatible) && of_node_get(np)) 1283 if (device_is_compatible(np, compatible) && of_node_get(np))
1286 break; 1284 break;
1287 } 1285 }
1288 if (from) 1286 of_node_put(from);
1289 of_node_put(from);
1290 read_unlock(&devtree_lock); 1287 read_unlock(&devtree_lock);
1291 return np; 1288 return np;
1292} 1289}
@@ -1329,8 +1326,7 @@ struct device_node *of_find_node_by_phandle(phandle handle)
1329 for (np = allnodes; np != 0; np = np->allnext) 1326 for (np = allnodes; np != 0; np = np->allnext)
1330 if (np->linux_phandle == handle) 1327 if (np->linux_phandle == handle)
1331 break; 1328 break;
1332 if (np) 1329 of_node_get(np);
1333 of_node_get(np);
1334 read_unlock(&devtree_lock); 1330 read_unlock(&devtree_lock);
1335 return np; 1331 return np;
1336} 1332}
@@ -1353,8 +1349,7 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
1353 for (; np != 0; np = np->allnext) 1349 for (; np != 0; np = np->allnext)
1354 if (of_node_get(np)) 1350 if (of_node_get(np))
1355 break; 1351 break;
1356 if (prev) 1352 of_node_put(prev);
1357 of_node_put(prev);
1358 read_unlock(&devtree_lock); 1353 read_unlock(&devtree_lock);
1359 return np; 1354 return np;
1360} 1355}
@@ -1399,8 +1394,7 @@ struct device_node *of_get_next_child(const struct device_node *node,
1399 for (; next != 0; next = next->sibling) 1394 for (; next != 0; next = next->sibling)
1400 if (of_node_get(next)) 1395 if (of_node_get(next))
1401 break; 1396 break;
1402 if (prev) 1397 of_node_put(prev);
1403 of_node_put(prev);
1404 read_unlock(&devtree_lock); 1398 read_unlock(&devtree_lock);
1405 return next; 1399 return next;
1406} 1400}
@@ -1605,6 +1599,7 @@ struct property *of_find_property(const struct device_node *np,
1605 1599
1606 return pp; 1600 return pp;
1607} 1601}
1602EXPORT_SYMBOL(of_find_property);
1608 1603
1609/* 1604/*
1610 * Find a property with a given name for a given node 1605 * Find a property with a given name for a given node
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 520ef42f642e..4fb5938ce6d3 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2117,11 +2117,92 @@ static void __init fixup_device_tree_pmac(void)
2117#define fixup_device_tree_pmac() 2117#define fixup_device_tree_pmac()
2118#endif 2118#endif
2119 2119
2120#ifdef CONFIG_PPC_EFIKA
2121/* The current fw of the Efika has a device tree needs quite a few
2122 * fixups to be compliant with the mpc52xx bindings. It's currently
2123 * unknown if it will ever be compliant (come on bPlan ...) so we do fixups.
2124 * NOTE that we (barely) tolerate it because the EFIKA was out before
2125 * the bindings were finished, for any new boards -> RTFM ! */
2126
2127struct subst_entry {
2128 char *path;
2129 char *property;
2130 void *value;
2131 int value_len;
2132};
2133
2134static void __init fixup_device_tree_efika(void)
2135{
2136 /* Substitution table */
2137 #define prop_cstr(x) x, sizeof(x)
2138 int prop_sound_irq[3] = { 2, 2, 0 };
2139 int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2140 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2141 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2142 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2143 struct subst_entry efika_subst_table[] = {
2144 { "/", "device_type", prop_cstr("efika") },
2145 { "/builtin", "compatible", prop_cstr("soc") },
2146 { "/builtin/ata", "compatible", prop_cstr("mpc5200b-ata\0mpc5200-ata"), },
2147 { "/builtin/bestcomm", "compatible", prop_cstr("mpc5200b-bestcomm\0mpc5200-bestcomm") },
2148 { "/builtin/bestcomm", "interrupts", prop_bcomm_irq, sizeof(prop_bcomm_irq) },
2149 { "/builtin/ethernet", "compatible", prop_cstr("mpc5200b-fec\0mpc5200-fec") },
2150 { "/builtin/pic", "compatible", prop_cstr("mpc5200b-pic\0mpc5200-pic") },
2151 { "/builtin/serial", "compatible", prop_cstr("mpc5200b-psc-uart\0mpc5200-psc-uart") },
2152 { "/builtin/sound", "compatible", prop_cstr("mpc5200b-psc-ac97\0mpc5200-psc-ac97") },
2153 { "/builtin/sound", "interrupts", prop_sound_irq, sizeof(prop_sound_irq) },
2154 { "/builtin/sram", "compatible", prop_cstr("mpc5200b-sram\0mpc5200-sram") },
2155 { "/builtin/sram", "device_type", prop_cstr("sram") },
2156 {}
2157 };
2158 #undef prop_cstr
2159
2160 /* Vars */
2161 u32 node;
2162 char prop[64];
2163 int rv, i;
2164
2165 /* Check if we're really running on a EFIKA */
2166 node = call_prom("finddevice", 1, 1, ADDR("/"));
2167 if (!PHANDLE_VALID(node))
2168 return;
2169
2170 rv = prom_getprop(node, "model", prop, sizeof(prop));
2171 if (rv == PROM_ERROR)
2172 return;
2173 if (strcmp(prop, "EFIKA5K2"))
2174 return;
2175
2176 prom_printf("Applying EFIKA device tree fixups\n");
2177
2178 /* Process substitution table */
2179 for (i=0; efika_subst_table[i].path; i++) {
2180 struct subst_entry *se = &efika_subst_table[i];
2181
2182 node = call_prom("finddevice", 1, 1, ADDR(se->path));
2183 if (!PHANDLE_VALID(node)) {
2184 prom_printf("fixup_device_tree_efika: ",
2185 "skipped entry %x - not found\n", i);
2186 continue;
2187 }
2188
2189 rv = prom_setprop(node, se->path, se->property,
2190 se->value, se->value_len );
2191 if (rv == PROM_ERROR)
2192 prom_printf("fixup_device_tree_efika: ",
2193 "skipped entry %x - setprop error\n", i);
2194 }
2195}
2196#else
2197#define fixup_device_tree_efika()
2198#endif
2199
2120static void __init fixup_device_tree(void) 2200static void __init fixup_device_tree(void)
2121{ 2201{
2122 fixup_device_tree_maple(); 2202 fixup_device_tree_maple();
2123 fixup_device_tree_chrp(); 2203 fixup_device_tree_chrp();
2124 fixup_device_tree_pmac(); 2204 fixup_device_tree_pmac();
2205 fixup_device_tree_efika();
2125} 2206}
2126 2207
2127static void __init prom_find_boot_cpu(void) 2208static void __init prom_find_boot_cpu(void)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 12c51e4ad2b4..ea6fd552c7ea 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -5,6 +5,7 @@
5#include <linux/pci_regs.h> 5#include <linux/pci_regs.h>
6#include <linux/module.h> 6#include <linux/module.h>
7#include <linux/ioport.h> 7#include <linux/ioport.h>
8#include <linux/etherdevice.h>
8#include <asm/prom.h> 9#include <asm/prom.h>
9#include <asm/pci-bridge.h> 10#include <asm/pci-bridge.h>
10 11
@@ -1003,3 +1004,42 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
1003 return res; 1004 return res;
1004} 1005}
1005EXPORT_SYMBOL_GPL(of_irq_map_one); 1006EXPORT_SYMBOL_GPL(of_irq_map_one);
1007
1008/**
1009 * Search the device tree for the best MAC address to use. 'mac-address' is
1010 * checked first, because that is supposed to contain to "most recent" MAC
1011 * address. If that isn't set, then 'local-mac-address' is checked next,
1012 * because that is the default address. If that isn't set, then the obsolete
1013 * 'address' is checked, just in case we're using an old device tree.
1014 *
1015 * Note that the 'address' property is supposed to contain a virtual address of
1016 * the register set, but some DTS files have redefined that property to be the
1017 * MAC address.
1018 *
1019 * All-zero MAC addresses are rejected, because those could be properties that
1020 * exist in the device tree, but were not set by U-Boot. For example, the
1021 * DTS could define 'mac-address' and 'local-mac-address', with zero MAC
1022 * addresses. Some older U-Boots only initialized 'local-mac-address'. In
1023 * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
1024 * but is all zeros.
1025*/
1026const void *of_get_mac_address(struct device_node *np)
1027{
1028 struct property *pp;
1029
1030 pp = of_find_property(np, "mac-address", NULL);
1031 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1032 return pp->value;
1033
1034 pp = of_find_property(np, "local-mac-address", NULL);
1035 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1036 return pp->value;
1037
1038 pp = of_find_property(np, "address", NULL);
1039 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1040 return pp->value;
1041
1042 return NULL;
1043}
1044EXPORT_SYMBOL(of_get_mac_address);
1045
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 975102a020d9..cc44c7b975aa 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -532,16 +532,22 @@ void do_syscall_trace_enter(struct pt_regs *regs)
532 && (current->ptrace & PT_PTRACED)) 532 && (current->ptrace & PT_PTRACED))
533 do_syscall_trace(); 533 do_syscall_trace();
534 534
535 if (unlikely(current->audit_context)) 535 if (unlikely(current->audit_context)) {
536 audit_syscall_entry( 536#ifdef CONFIG_PPC64
537#ifdef CONFIG_PPC32 537 if (!test_thread_flag(TIF_32BIT))
538 AUDIT_ARCH_PPC, 538 audit_syscall_entry(AUDIT_ARCH_PPC64,
539#else 539 regs->gpr[0],
540 test_thread_flag(TIF_32BIT)?AUDIT_ARCH_PPC:AUDIT_ARCH_PPC64, 540 regs->gpr[3], regs->gpr[4],
541 regs->gpr[5], regs->gpr[6]);
542 else
541#endif 543#endif
542 regs->gpr[0], 544 audit_syscall_entry(AUDIT_ARCH_PPC,
543 regs->gpr[3], regs->gpr[4], 545 regs->gpr[0],
544 regs->gpr[5], regs->gpr[6]); 546 regs->gpr[3] & 0xffffffff,
547 regs->gpr[4] & 0xffffffff,
548 regs->gpr[5] & 0xffffffff,
549 regs->gpr[6] & 0xffffffff);
550 }
545} 551}
546 552
547void do_syscall_trace_leave(struct pt_regs *regs) 553void do_syscall_trace_leave(struct pt_regs *regs)
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 2fe82abf1c52..6cbf2ae5d7aa 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -160,7 +160,7 @@ static int sensors_open(struct inode *inode, struct file *file)
160 return single_open(file, ppc_rtas_sensors_show, NULL); 160 return single_open(file, ppc_rtas_sensors_show, NULL);
161} 161}
162 162
163struct file_operations ppc_rtas_sensors_operations = { 163const struct file_operations ppc_rtas_sensors_operations = {
164 .open = sensors_open, 164 .open = sensors_open,
165 .read = seq_read, 165 .read = seq_read,
166 .llseek = seq_lseek, 166 .llseek = seq_lseek,
@@ -172,7 +172,7 @@ static int poweron_open(struct inode *inode, struct file *file)
172 return single_open(file, ppc_rtas_poweron_show, NULL); 172 return single_open(file, ppc_rtas_poweron_show, NULL);
173} 173}
174 174
175struct file_operations ppc_rtas_poweron_operations = { 175const struct file_operations ppc_rtas_poweron_operations = {
176 .open = poweron_open, 176 .open = poweron_open,
177 .read = seq_read, 177 .read = seq_read,
178 .llseek = seq_lseek, 178 .llseek = seq_lseek,
@@ -185,7 +185,7 @@ static int progress_open(struct inode *inode, struct file *file)
185 return single_open(file, ppc_rtas_progress_show, NULL); 185 return single_open(file, ppc_rtas_progress_show, NULL);
186} 186}
187 187
188struct file_operations ppc_rtas_progress_operations = { 188const struct file_operations ppc_rtas_progress_operations = {
189 .open = progress_open, 189 .open = progress_open,
190 .read = seq_read, 190 .read = seq_read,
191 .llseek = seq_lseek, 191 .llseek = seq_lseek,
@@ -198,7 +198,7 @@ static int clock_open(struct inode *inode, struct file *file)
198 return single_open(file, ppc_rtas_clock_show, NULL); 198 return single_open(file, ppc_rtas_clock_show, NULL);
199} 199}
200 200
201struct file_operations ppc_rtas_clock_operations = { 201const struct file_operations ppc_rtas_clock_operations = {
202 .open = clock_open, 202 .open = clock_open,
203 .read = seq_read, 203 .read = seq_read,
204 .llseek = seq_lseek, 204 .llseek = seq_lseek,
@@ -211,7 +211,7 @@ static int tone_freq_open(struct inode *inode, struct file *file)
211 return single_open(file, ppc_rtas_tone_freq_show, NULL); 211 return single_open(file, ppc_rtas_tone_freq_show, NULL);
212} 212}
213 213
214struct file_operations ppc_rtas_tone_freq_operations = { 214const struct file_operations ppc_rtas_tone_freq_operations = {
215 .open = tone_freq_open, 215 .open = tone_freq_open,
216 .read = seq_read, 216 .read = seq_read,
217 .llseek = seq_lseek, 217 .llseek = seq_lseek,
@@ -224,7 +224,7 @@ static int tone_volume_open(struct inode *inode, struct file *file)
224 return single_open(file, ppc_rtas_tone_volume_show, NULL); 224 return single_open(file, ppc_rtas_tone_volume_show, NULL);
225} 225}
226 226
227struct file_operations ppc_rtas_tone_volume_operations = { 227const struct file_operations ppc_rtas_tone_volume_operations = {
228 .open = tone_volume_open, 228 .open = tone_volume_open,
229 .read = seq_read, 229 .read = seq_read,
230 .llseek = seq_lseek, 230 .llseek = seq_lseek,
@@ -237,7 +237,7 @@ static int rmo_buf_open(struct inode *inode, struct file *file)
237 return single_open(file, ppc_rtas_rmo_buf_show, NULL); 237 return single_open(file, ppc_rtas_rmo_buf_show, NULL);
238} 238}
239 239
240struct file_operations ppc_rtas_rmo_buf_ops = { 240const struct file_operations ppc_rtas_rmo_buf_ops = {
241 .open = rmo_buf_open, 241 .open = rmo_buf_open,
242 .read = seq_read, 242 .read = seq_read,
243 .llseek = seq_lseek, 243 .llseek = seq_lseek,
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 76b5d7ebdcc6..9d0735a54564 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -182,7 +182,7 @@ void rtas_progress(char *s, unsigned short hex)
182 char *os; 182 char *os;
183 static int display_character, set_indicator; 183 static int display_character, set_indicator;
184 static int display_width, display_lines, form_feed; 184 static int display_width, display_lines, form_feed;
185 const static int *row_width; 185 static const int *row_width;
186 static DEFINE_SPINLOCK(progress_lock); 186 static DEFINE_SPINLOCK(progress_lock);
187 static int current_line; 187 static int current_line;
188 static int pending_newline = 0; /* did last write end with unprinted newline? */ 188 static int pending_newline = 0; /* did last write end with unprinted newline? */
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 0c4fcd34bfe5..f72118c0844f 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -702,13 +702,12 @@ static int initialize_flash_pde_data(const char *rtas_call_name,
702} 702}
703 703
704static struct proc_dir_entry *create_flash_pde(const char *filename, 704static struct proc_dir_entry *create_flash_pde(const char *filename,
705 struct file_operations *fops) 705 const struct file_operations *fops)
706{ 706{
707 struct proc_dir_entry *ent = NULL; 707 struct proc_dir_entry *ent = NULL;
708 708
709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); 709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
710 if (ent != NULL) { 710 if (ent != NULL) {
711 ent->nlink = 1;
712 ent->proc_fops = fops; 711 ent->proc_fops = fops;
713 ent->owner = THIS_MODULE; 712 ent->owner = THIS_MODULE;
714 } 713 }
@@ -716,21 +715,21 @@ static struct proc_dir_entry *create_flash_pde(const char *filename,
716 return ent; 715 return ent;
717} 716}
718 717
719static struct file_operations rtas_flash_operations = { 718static const struct file_operations rtas_flash_operations = {
720 .read = rtas_flash_read, 719 .read = rtas_flash_read,
721 .write = rtas_flash_write, 720 .write = rtas_flash_write,
722 .open = rtas_excl_open, 721 .open = rtas_excl_open,
723 .release = rtas_flash_release, 722 .release = rtas_flash_release,
724}; 723};
725 724
726static struct file_operations manage_flash_operations = { 725static const struct file_operations manage_flash_operations = {
727 .read = manage_flash_read, 726 .read = manage_flash_read,
728 .write = manage_flash_write, 727 .write = manage_flash_write,
729 .open = rtas_excl_open, 728 .open = rtas_excl_open,
730 .release = rtas_excl_release, 729 .release = rtas_excl_release,
731}; 730};
732 731
733static struct file_operations validate_flash_operations = { 732static const struct file_operations validate_flash_operations = {
734 .read = validate_flash_read, 733 .read = validate_flash_read,
735 .write = validate_flash_write, 734 .write = validate_flash_write,
736 .open = rtas_excl_open, 735 .open = rtas_excl_open,
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 61c65d19ef06..44a6a3c47feb 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -65,6 +65,7 @@ int have_of = 1;
65 65
66#ifdef CONFIG_VGA_CONSOLE 66#ifdef CONFIG_VGA_CONSOLE
67unsigned long vgacon_remap_base; 67unsigned long vgacon_remap_base;
68EXPORT_SYMBOL(vgacon_remap_base);
68#endif 69#endif
69 70
70/* 71/*
@@ -115,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
115 */ 116 */
116void __init machine_init(unsigned long dt_ptr, unsigned long phys) 117void __init machine_init(unsigned long dt_ptr, unsigned long phys)
117{ 118{
118 /* If btext is enabled, we might have a BAT setup for early display, 119 /* Enable early debugging if any specified (see udbg.h) */
119 * thus we do enable some very basic udbg output 120 udbg_early_init();
120 */
121#ifdef CONFIG_BOOTX_TEXT
122 udbg_putc = btext_drawchar;
123#endif
124 121
125 /* Do some early initialization based on the flat device tree */ 122 /* Do some early initialization based on the flat device tree */
126 early_init_devtree(__va(dt_ptr)); 123 early_init_devtree(__va(dt_ptr));
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 0e8beca460af..924d692bc8f9 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -78,29 +78,6 @@ int smt_enabled_at_boot = 1;
78 78
79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
80 80
81#ifdef CONFIG_MPIC
82int __init smp_mpic_probe(void)
83{
84 int nr_cpus;
85
86 DBG("smp_mpic_probe()...\n");
87
88 nr_cpus = cpus_weight(cpu_possible_map);
89
90 DBG("nr_cpus: %d\n", nr_cpus);
91
92 if (nr_cpus > 1)
93 mpic_request_ipis();
94
95 return nr_cpus;
96}
97
98void __devinit smp_mpic_setup_cpu(int cpu)
99{
100 mpic_setup_this_cpu();
101}
102#endif /* CONFIG_MPIC */
103
104#ifdef CONFIG_PPC64 81#ifdef CONFIG_PPC64
105void __devinit smp_generic_kick_cpu(int nr) 82void __devinit smp_generic_kick_cpu(int nr)
106{ 83{
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 03a2a2f30d66..673e8d9df7f5 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -198,73 +198,6 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
198 __put_user(i->tv_usec, &o->tv_usec))); 198 __put_user(i->tv_usec, &o->tv_usec)));
199} 199}
200 200
201struct sysinfo32 {
202 s32 uptime;
203 u32 loads[3];
204 u32 totalram;
205 u32 freeram;
206 u32 sharedram;
207 u32 bufferram;
208 u32 totalswap;
209 u32 freeswap;
210 unsigned short procs;
211 unsigned short pad;
212 u32 totalhigh;
213 u32 freehigh;
214 u32 mem_unit;
215 char _f[20-2*sizeof(int)-sizeof(int)];
216};
217
218asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info)
219{
220 struct sysinfo s;
221 int ret, err;
222 int bitcount=0;
223 mm_segment_t old_fs = get_fs ();
224
225 /* The __user cast is valid due to set_fs() */
226 set_fs (KERNEL_DS);
227 ret = sys_sysinfo((struct sysinfo __user *)&s);
228 set_fs (old_fs);
229
230 /* Check to see if any memory value is too large for 32-bit and
231 * scale down if needed.
232 */
233 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
234 while (s.mem_unit < PAGE_SIZE) {
235 s.mem_unit <<= 1;
236 bitcount++;
237 }
238 s.totalram >>=bitcount;
239 s.freeram >>= bitcount;
240 s.sharedram >>= bitcount;
241 s.bufferram >>= bitcount;
242 s.totalswap >>= bitcount;
243 s.freeswap >>= bitcount;
244 s.totalhigh >>= bitcount;
245 s.freehigh >>= bitcount;
246 }
247
248 err = put_user (s.uptime, &info->uptime);
249 err |= __put_user (s.loads[0], &info->loads[0]);
250 err |= __put_user (s.loads[1], &info->loads[1]);
251 err |= __put_user (s.loads[2], &info->loads[2]);
252 err |= __put_user (s.totalram, &info->totalram);
253 err |= __put_user (s.freeram, &info->freeram);
254 err |= __put_user (s.sharedram, &info->sharedram);
255 err |= __put_user (s.bufferram, &info->bufferram);
256 err |= __put_user (s.totalswap, &info->totalswap);
257 err |= __put_user (s.freeswap, &info->freeswap);
258 err |= __put_user (s.procs, &info->procs);
259 err |= __put_user (s.totalhigh, &info->totalhigh);
260 err |= __put_user (s.freehigh, &info->freehigh);
261 err |= __put_user (s.mem_unit, &info->mem_unit);
262 if (err)
263 return -EFAULT;
264
265 return ret;
266}
267
268 201
269 202
270 203
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 400ab2b946e7..d57818aea081 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -169,6 +169,11 @@ static ssize_t __attribute_used__ \
169 return count; \ 169 return count; \
170} 170}
171 171
172
173/* Let's define all possible registers, we'll only hook up the ones
174 * that are implemented on the current processor
175 */
176
172SYSFS_PMCSETUP(mmcr0, SPRN_MMCR0); 177SYSFS_PMCSETUP(mmcr0, SPRN_MMCR0);
173SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1); 178SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1);
174SYSFS_PMCSETUP(mmcra, SPRN_MMCRA); 179SYSFS_PMCSETUP(mmcra, SPRN_MMCRA);
@@ -184,55 +189,87 @@ SYSFS_PMCSETUP(purr, SPRN_PURR);
184SYSFS_PMCSETUP(spurr, SPRN_SPURR); 189SYSFS_PMCSETUP(spurr, SPRN_SPURR);
185SYSFS_PMCSETUP(dscr, SPRN_DSCR); 190SYSFS_PMCSETUP(dscr, SPRN_DSCR);
186 191
187static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); 192SYSFS_PMCSETUP(pa6t_pmc0, PA6T_SPRN_PMC0);
188static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); 193SYSFS_PMCSETUP(pa6t_pmc1, PA6T_SPRN_PMC1);
194SYSFS_PMCSETUP(pa6t_pmc2, PA6T_SPRN_PMC2);
195SYSFS_PMCSETUP(pa6t_pmc3, PA6T_SPRN_PMC3);
196SYSFS_PMCSETUP(pa6t_pmc4, PA6T_SPRN_PMC4);
197SYSFS_PMCSETUP(pa6t_pmc5, PA6T_SPRN_PMC5);
198
199
189static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); 200static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra);
190static SYSDEV_ATTR(pmc1, 0600, show_pmc1, store_pmc1);
191static SYSDEV_ATTR(pmc2, 0600, show_pmc2, store_pmc2);
192static SYSDEV_ATTR(pmc3, 0600, show_pmc3, store_pmc3);
193static SYSDEV_ATTR(pmc4, 0600, show_pmc4, store_pmc4);
194static SYSDEV_ATTR(pmc5, 0600, show_pmc5, store_pmc5);
195static SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6);
196static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7);
197static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8);
198static SYSDEV_ATTR(purr, 0600, show_purr, NULL);
199static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); 201static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL);
200static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); 202static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr);
203static SYSDEV_ATTR(purr, 0600, show_purr, store_purr);
204
205static struct sysdev_attribute ibm_common_attrs[] = {
206 _SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0),
207 _SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
208};
209
210static struct sysdev_attribute ibm_pmc_attrs[] = {
211 _SYSDEV_ATTR(pmc1, 0600, show_pmc1, store_pmc1),
212 _SYSDEV_ATTR(pmc2, 0600, show_pmc2, store_pmc2),
213 _SYSDEV_ATTR(pmc3, 0600, show_pmc3, store_pmc3),
214 _SYSDEV_ATTR(pmc4, 0600, show_pmc4, store_pmc4),
215 _SYSDEV_ATTR(pmc5, 0600, show_pmc5, store_pmc5),
216 _SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6),
217 _SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7),
218 _SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8),
219};
220
221static struct sysdev_attribute pa6t_attrs[] = {
222 _SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0),
223 _SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
224 _SYSDEV_ATTR(pmc0, 0600, show_pa6t_pmc0, store_pa6t_pmc0),
225 _SYSDEV_ATTR(pmc1, 0600, show_pa6t_pmc1, store_pa6t_pmc1),
226 _SYSDEV_ATTR(pmc2, 0600, show_pa6t_pmc2, store_pa6t_pmc2),
227 _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3),
228 _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4),
229 _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5),
230};
231
201 232
202static void register_cpu_online(unsigned int cpu) 233static void register_cpu_online(unsigned int cpu)
203{ 234{
204 struct cpu *c = &per_cpu(cpu_devices, cpu); 235 struct cpu *c = &per_cpu(cpu_devices, cpu);
205 struct sys_device *s = &c->sysdev; 236 struct sys_device *s = &c->sysdev;
237 struct sysdev_attribute *attrs, *pmc_attrs;
238 int i, nattrs;
206 239
207 if (!firmware_has_feature(FW_FEATURE_ISERIES) && 240 if (!firmware_has_feature(FW_FEATURE_ISERIES) &&
208 cpu_has_feature(CPU_FTR_SMT)) 241 cpu_has_feature(CPU_FTR_SMT))
209 sysdev_create_file(s, &attr_smt_snooze_delay); 242 sysdev_create_file(s, &attr_smt_snooze_delay);
210 243
211 /* PMC stuff */ 244 /* PMC stuff */
245 switch (cur_cpu_spec->pmc_type) {
246 case PPC_PMC_IBM:
247 attrs = ibm_common_attrs;
248 nattrs = sizeof(ibm_common_attrs) / sizeof(struct sysdev_attribute);
249 pmc_attrs = ibm_pmc_attrs;
250 break;
251 case PPC_PMC_PA6T:
252 /* PA Semi starts counting at PMC0 */
253 attrs = pa6t_attrs;
254 nattrs = sizeof(pa6t_attrs) / sizeof(struct sysdev_attribute);
255 pmc_attrs = NULL;
256 break;
257 default:
258 attrs = NULL;
259 nattrs = 0;
260 pmc_attrs = NULL;
261 }
262
263 for (i = 0; i < nattrs; i++)
264 sysdev_create_file(s, &attrs[i]);
212 265
213 sysdev_create_file(s, &attr_mmcr0); 266 if (pmc_attrs)
214 sysdev_create_file(s, &attr_mmcr1); 267 for (i = 0; i < cur_cpu_spec->num_pmcs; i++)
268 sysdev_create_file(s, &pmc_attrs[i]);
215 269
216 if (cpu_has_feature(CPU_FTR_MMCRA)) 270 if (cpu_has_feature(CPU_FTR_MMCRA))
217 sysdev_create_file(s, &attr_mmcra); 271 sysdev_create_file(s, &attr_mmcra);
218 272
219 if (cur_cpu_spec->num_pmcs >= 1)
220 sysdev_create_file(s, &attr_pmc1);
221 if (cur_cpu_spec->num_pmcs >= 2)
222 sysdev_create_file(s, &attr_pmc2);
223 if (cur_cpu_spec->num_pmcs >= 3)
224 sysdev_create_file(s, &attr_pmc3);
225 if (cur_cpu_spec->num_pmcs >= 4)
226 sysdev_create_file(s, &attr_pmc4);
227 if (cur_cpu_spec->num_pmcs >= 5)
228 sysdev_create_file(s, &attr_pmc5);
229 if (cur_cpu_spec->num_pmcs >= 6)
230 sysdev_create_file(s, &attr_pmc6);
231 if (cur_cpu_spec->num_pmcs >= 7)
232 sysdev_create_file(s, &attr_pmc7);
233 if (cur_cpu_spec->num_pmcs >= 8)
234 sysdev_create_file(s, &attr_pmc8);
235
236 if (cpu_has_feature(CPU_FTR_PURR)) 273 if (cpu_has_feature(CPU_FTR_PURR))
237 sysdev_create_file(s, &attr_purr); 274 sysdev_create_file(s, &attr_purr);
238 275
@@ -248,6 +285,8 @@ static void unregister_cpu_online(unsigned int cpu)
248{ 285{
249 struct cpu *c = &per_cpu(cpu_devices, cpu); 286 struct cpu *c = &per_cpu(cpu_devices, cpu);
250 struct sys_device *s = &c->sysdev; 287 struct sys_device *s = &c->sysdev;
288 struct sysdev_attribute *attrs, *pmc_attrs;
289 int i, nattrs;
251 290
252 BUG_ON(!c->hotpluggable); 291 BUG_ON(!c->hotpluggable);
253 292
@@ -256,30 +295,34 @@ static void unregister_cpu_online(unsigned int cpu)
256 sysdev_remove_file(s, &attr_smt_snooze_delay); 295 sysdev_remove_file(s, &attr_smt_snooze_delay);
257 296
258 /* PMC stuff */ 297 /* PMC stuff */
298 switch (cur_cpu_spec->pmc_type) {
299 case PPC_PMC_IBM:
300 attrs = ibm_common_attrs;
301 nattrs = sizeof(ibm_common_attrs) / sizeof(struct sysdev_attribute);
302 pmc_attrs = ibm_pmc_attrs;
303 break;
304 case PPC_PMC_PA6T:
305 /* PA Semi starts counting at PMC0 */
306 attrs = pa6t_attrs;
307 nattrs = sizeof(pa6t_attrs) / sizeof(struct sysdev_attribute);
308 pmc_attrs = NULL;
309 break;
310 default:
311 attrs = NULL;
312 nattrs = 0;
313 pmc_attrs = NULL;
314 }
259 315
260 sysdev_remove_file(s, &attr_mmcr0); 316 for (i = 0; i < nattrs; i++)
261 sysdev_remove_file(s, &attr_mmcr1); 317 sysdev_remove_file(s, &attrs[i]);
318
319 if (pmc_attrs)
320 for (i = 0; i < cur_cpu_spec->num_pmcs; i++)
321 sysdev_remove_file(s, &pmc_attrs[i]);
262 322
263 if (cpu_has_feature(CPU_FTR_MMCRA)) 323 if (cpu_has_feature(CPU_FTR_MMCRA))
264 sysdev_remove_file(s, &attr_mmcra); 324 sysdev_remove_file(s, &attr_mmcra);
265 325
266 if (cur_cpu_spec->num_pmcs >= 1)
267 sysdev_remove_file(s, &attr_pmc1);
268 if (cur_cpu_spec->num_pmcs >= 2)
269 sysdev_remove_file(s, &attr_pmc2);
270 if (cur_cpu_spec->num_pmcs >= 3)
271 sysdev_remove_file(s, &attr_pmc3);
272 if (cur_cpu_spec->num_pmcs >= 4)
273 sysdev_remove_file(s, &attr_pmc4);
274 if (cur_cpu_spec->num_pmcs >= 5)
275 sysdev_remove_file(s, &attr_pmc5);
276 if (cur_cpu_spec->num_pmcs >= 6)
277 sysdev_remove_file(s, &attr_pmc6);
278 if (cur_cpu_spec->num_pmcs >= 7)
279 sysdev_remove_file(s, &attr_pmc7);
280 if (cur_cpu_spec->num_pmcs >= 8)
281 sysdev_remove_file(s, &attr_pmc8);
282
283 if (cpu_has_feature(CPU_FTR_PURR)) 326 if (cpu_has_feature(CPU_FTR_PURR))
284 sysdev_remove_file(s, &attr_purr); 327 sysdev_remove_file(s, &attr_purr);
285 328
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 535f50665647..17724fb2067f 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -107,12 +107,10 @@ int die(const char *str, struct pt_regs *regs, long err)
107 if (machine_is(powermac) && pmac_backlight) { 107 if (machine_is(powermac) && pmac_backlight) {
108 struct backlight_properties *props; 108 struct backlight_properties *props;
109 109
110 down(&pmac_backlight->sem); 110 props = &pmac_backlight->props;
111 props = pmac_backlight->props;
112 props->brightness = props->max_brightness; 111 props->brightness = props->max_brightness;
113 props->power = FB_BLANK_UNBLANK; 112 props->power = FB_BLANK_UNBLANK;
114 props->update_status(pmac_backlight); 113 backlight_update_status(pmac_backlight);
115 up(&pmac_backlight->sem);
116 } 114 }
117 mutex_unlock(&pmac_backlight_mutex); 115 mutex_unlock(&pmac_backlight_mutex);
118#endif 116#endif
@@ -174,7 +172,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
174 * generate the same exception over and over again and we get 172 * generate the same exception over and over again and we get
175 * nowhere. Better to kill it and let the kernel panic. 173 * nowhere. Better to kill it and let the kernel panic.
176 */ 174 */
177 if (current->pid == 1) { 175 if (is_init(current)) {
178 __sighandler_t handler; 176 __sighandler_t handler;
179 177
180 spin_lock_irq(&current->sighand->siglock); 178 spin_lock_irq(&current->sighand->siglock);
@@ -535,34 +533,40 @@ static void emulate_single_step(struct pt_regs *regs)
535 } 533 }
536} 534}
537 535
538static void parse_fpe(struct pt_regs *regs) 536static inline int __parse_fpscr(unsigned long fpscr)
539{ 537{
540 int code = 0; 538 int ret = 0;
541 unsigned long fpscr;
542
543 flush_fp_to_thread(current);
544
545 fpscr = current->thread.fpscr.val;
546 539
547 /* Invalid operation */ 540 /* Invalid operation */
548 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX)) 541 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX))
549 code = FPE_FLTINV; 542 ret = FPE_FLTINV;
550 543
551 /* Overflow */ 544 /* Overflow */
552 else if ((fpscr & FPSCR_OE) && (fpscr & FPSCR_OX)) 545 else if ((fpscr & FPSCR_OE) && (fpscr & FPSCR_OX))
553 code = FPE_FLTOVF; 546 ret = FPE_FLTOVF;
554 547
555 /* Underflow */ 548 /* Underflow */
556 else if ((fpscr & FPSCR_UE) && (fpscr & FPSCR_UX)) 549 else if ((fpscr & FPSCR_UE) && (fpscr & FPSCR_UX))
557 code = FPE_FLTUND; 550 ret = FPE_FLTUND;
558 551
559 /* Divide by zero */ 552 /* Divide by zero */
560 else if ((fpscr & FPSCR_ZE) && (fpscr & FPSCR_ZX)) 553 else if ((fpscr & FPSCR_ZE) && (fpscr & FPSCR_ZX))
561 code = FPE_FLTDIV; 554 ret = FPE_FLTDIV;
562 555
563 /* Inexact result */ 556 /* Inexact result */
564 else if ((fpscr & FPSCR_XE) && (fpscr & FPSCR_XX)) 557 else if ((fpscr & FPSCR_XE) && (fpscr & FPSCR_XX))
565 code = FPE_FLTRES; 558 ret = FPE_FLTRES;
559
560 return ret;
561}
562
563static void parse_fpe(struct pt_regs *regs)
564{
565 int code = 0;
566
567 flush_fp_to_thread(current);
568
569 code = __parse_fpscr(current->thread.fpscr.val);
566 570
567 _exception(SIGFPE, regs, code, regs->nip); 571 _exception(SIGFPE, regs, code, regs->nip);
568} 572}
@@ -739,20 +743,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
739 extern int do_mathemu(struct pt_regs *regs); 743 extern int do_mathemu(struct pt_regs *regs);
740 744
741 /* We can now get here via a FP Unavailable exception if the core 745 /* We can now get here via a FP Unavailable exception if the core
742 * has no FPU, in that case no reason flags will be set */ 746 * has no FPU, in that case the reason flags will be 0 */
743#ifdef CONFIG_MATH_EMULATION
744 /* (reason & REASON_ILLEGAL) would be the obvious thing here,
745 * but there seems to be a hardware bug on the 405GP (RevD)
746 * that means ESR is sometimes set incorrectly - either to
747 * ESR_DST (!?) or 0. In the process of chasing this with the
748 * hardware people - not sure if it can happen on any illegal
749 * instruction or only on FP instructions, whether there is a
750 * pattern to occurences etc. -dgibson 31/Mar/2003 */
751 if (!(reason & REASON_TRAP) && do_mathemu(regs) == 0) {
752 emulate_single_step(regs);
753 return;
754 }
755#endif /* CONFIG_MATH_EMULATION */
756 747
757 if (reason & REASON_FP) { 748 if (reason & REASON_FP) {
758 /* IEEE FP exception */ 749 /* IEEE FP exception */
@@ -778,6 +769,31 @@ void __kprobes program_check_exception(struct pt_regs *regs)
778 769
779 local_irq_enable(); 770 local_irq_enable();
780 771
772#ifdef CONFIG_MATH_EMULATION
773 /* (reason & REASON_ILLEGAL) would be the obvious thing here,
774 * but there seems to be a hardware bug on the 405GP (RevD)
775 * that means ESR is sometimes set incorrectly - either to
776 * ESR_DST (!?) or 0. In the process of chasing this with the
777 * hardware people - not sure if it can happen on any illegal
778 * instruction or only on FP instructions, whether there is a
779 * pattern to occurences etc. -dgibson 31/Mar/2003 */
780 switch (do_mathemu(regs)) {
781 case 0:
782 emulate_single_step(regs);
783 return;
784 case 1: {
785 int code = 0;
786 code = __parse_fpscr(current->thread.fpscr.val);
787 _exception(SIGFPE, regs, code, regs->nip);
788 return;
789 }
790 case -EFAULT:
791 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
792 return;
793 }
794 /* fall through on any other errors */
795#endif /* CONFIG_MATH_EMULATION */
796
781 /* Try to emulate it if we should. */ 797 /* Try to emulate it if we should. */
782 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) { 798 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
783 switch (emulate_instruction(regs)) { 799 switch (emulate_instruction(regs)) {
@@ -891,18 +907,39 @@ void SoftwareEmulation(struct pt_regs *regs)
891 907
892#ifdef CONFIG_MATH_EMULATION 908#ifdef CONFIG_MATH_EMULATION
893 errcode = do_mathemu(regs); 909 errcode = do_mathemu(regs);
910
911 switch (errcode) {
912 case 0:
913 emulate_single_step(regs);
914 return;
915 case 1: {
916 int code = 0;
917 code = __parse_fpscr(current->thread.fpscr.val);
918 _exception(SIGFPE, regs, code, regs->nip);
919 return;
920 }
921 case -EFAULT:
922 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
923 return;
924 default:
925 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
926 return;
927 }
928
894#else 929#else
895 errcode = Soft_emulate_8xx(regs); 930 errcode = Soft_emulate_8xx(regs);
896#endif 931 switch (errcode) {
897 if (errcode) { 932 case 0:
898 if (errcode > 0)
899 _exception(SIGFPE, regs, 0, 0);
900 else if (errcode == -EFAULT)
901 _exception(SIGSEGV, regs, 0, 0);
902 else
903 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
904 } else
905 emulate_single_step(regs); 933 emulate_single_step(regs);
934 return;
935 case 1:
936 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
937 return;
938 case -EFAULT:
939 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
940 return;
941 }
942#endif
906} 943}
907#endif /* CONFIG_8xx */ 944#endif /* CONFIG_8xx */
908 945
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 5730906b23d5..7e0971868fc2 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -45,6 +45,12 @@ void __init udbg_early_init(void)
45#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES) 45#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
46 /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ 46 /* For iSeries - hit Ctrl-x Ctrl-x to see the output */
47 udbg_init_iseries(); 47 udbg_init_iseries();
48#elif defined(CONFIG_PPC_EARLY_DEBUG_BEAT)
49 udbg_init_debug_beat();
50#elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
51 udbg_init_pas_realmode();
52#elif defined(CONFIG_BOOTX_TEXT)
53 udbg_init_btext();
48#endif 54#endif
49} 55}
50 56
@@ -146,7 +152,7 @@ void __init disable_early_printk(void)
146{ 152{
147 if (!early_console_initialized) 153 if (!early_console_initialized)
148 return; 154 return;
149 if (strstr(saved_command_line, "udbg-immortal")) { 155 if (strstr(boot_command_line, "udbg-immortal")) {
150 printk(KERN_INFO "early console immortal !\n"); 156 printk(KERN_INFO "early console immortal !\n");
151 return; 157 return;
152 } 158 }
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 2d17f2b8eda7..e738f93b42fe 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -14,6 +14,8 @@
14 14
15extern u8 real_readb(volatile u8 __iomem *addr); 15extern u8 real_readb(volatile u8 __iomem *addr);
16extern void real_writeb(u8 data, volatile u8 __iomem *addr); 16extern void real_writeb(u8 data, volatile u8 __iomem *addr);
17extern u8 real_205_readb(volatile u8 __iomem *addr);
18extern void real_205_writeb(u8 data, volatile u8 __iomem *addr);
17 19
18struct NS16550 { 20struct NS16550 {
19 /* this struct must be packed */ 21 /* this struct must be packed */
@@ -167,3 +169,25 @@ void __init udbg_init_maple_realmode(void)
167 udbg_getc_poll = NULL; 169 udbg_getc_poll = NULL;
168} 170}
169#endif /* CONFIG_PPC_MAPLE */ 171#endif /* CONFIG_PPC_MAPLE */
172
173#ifdef CONFIG_PPC_PASEMI
174void udbg_pas_real_putc(char c)
175{
176 if (udbg_comport) {
177 while ((real_205_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
178 /* wait for idle */;
179 real_205_writeb(c, &udbg_comport->thr); eieio();
180 if (c == '\n')
181 udbg_pas_real_putc('\r');
182 }
183}
184
185void udbg_init_pas_realmode(void)
186{
187 udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8;
188
189 udbg_putc = udbg_pas_real_putc;
190 udbg_getc = NULL;
191 udbg_getc_poll = NULL;
192}
193#endif /* CONFIG_PPC_MAPLE */
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index ae0ede19879d..e46c31b36641 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -51,17 +51,21 @@
51 51
52extern char vdso32_start, vdso32_end; 52extern char vdso32_start, vdso32_end;
53static void *vdso32_kbase = &vdso32_start; 53static void *vdso32_kbase = &vdso32_start;
54unsigned int vdso32_pages; 54static unsigned int vdso32_pages;
55static struct page **vdso32_pagelist;
55unsigned long vdso32_sigtramp; 56unsigned long vdso32_sigtramp;
56unsigned long vdso32_rt_sigtramp; 57unsigned long vdso32_rt_sigtramp;
57 58
58#ifdef CONFIG_PPC64 59#ifdef CONFIG_PPC64
59extern char vdso64_start, vdso64_end; 60extern char vdso64_start, vdso64_end;
60static void *vdso64_kbase = &vdso64_start; 61static void *vdso64_kbase = &vdso64_start;
61unsigned int vdso64_pages; 62static unsigned int vdso64_pages;
63static struct page **vdso64_pagelist;
62unsigned long vdso64_rt_sigtramp; 64unsigned long vdso64_rt_sigtramp;
63#endif /* CONFIG_PPC64 */ 65#endif /* CONFIG_PPC64 */
64 66
67static int vdso_ready;
68
65/* 69/*
66 * The vdso data page (aka. systemcfg for old ppc64 fans) is here. 70 * The vdso data page (aka. systemcfg for old ppc64 fans) is here.
67 * Once the early boot kernel code no longer needs to muck around 71 * Once the early boot kernel code no longer needs to muck around
@@ -165,55 +169,6 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
165#endif /* DEBUG */ 169#endif /* DEBUG */
166 170
167/* 171/*
168 * Keep a dummy vma_close for now, it will prevent VMA merging.
169 */
170static void vdso_vma_close(struct vm_area_struct * vma)
171{
172}
173
174/*
175 * Our nopage() function, maps in the actual vDSO kernel pages, they will
176 * be mapped read-only by do_no_page(), and eventually COW'ed, either
177 * right away for an initial write access, or by do_wp_page().
178 */
179static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
180 unsigned long address, int *type)
181{
182 unsigned long offset = address - vma->vm_start;
183 struct page *pg;
184#ifdef CONFIG_PPC64
185 void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ?
186 vdso64_kbase : vdso32_kbase;
187#else
188 void *vbase = vdso32_kbase;
189#endif
190
191 DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n",
192 current->comm, address, offset);
193
194 if (address < vma->vm_start || address > vma->vm_end)
195 return NOPAGE_SIGBUS;
196
197 /*
198 * Last page is systemcfg.
199 */
200 if ((vma->vm_end - address) <= PAGE_SIZE)
201 pg = virt_to_page(vdso_data);
202 else
203 pg = virt_to_page(vbase + offset);
204
205 get_page(pg);
206 DBG(" ->page count: %d\n", page_count(pg));
207
208 return pg;
209}
210
211static struct vm_operations_struct vdso_vmops = {
212 .close = vdso_vma_close,
213 .nopage = vdso_vma_nopage,
214};
215
216/*
217 * This is called from binfmt_elf, we create the special vma for the 172 * This is called from binfmt_elf, we create the special vma for the
218 * vDSO and insert it into the mm struct tree 173 * vDSO and insert it into the mm struct tree
219 */ 174 */
@@ -221,20 +176,26 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
221 int executable_stack) 176 int executable_stack)
222{ 177{
223 struct mm_struct *mm = current->mm; 178 struct mm_struct *mm = current->mm;
224 struct vm_area_struct *vma; 179 struct page **vdso_pagelist;
225 unsigned long vdso_pages; 180 unsigned long vdso_pages;
226 unsigned long vdso_base; 181 unsigned long vdso_base;
227 int rc; 182 int rc;
228 183
184 if (!vdso_ready)
185 return 0;
186
229#ifdef CONFIG_PPC64 187#ifdef CONFIG_PPC64
230 if (test_thread_flag(TIF_32BIT)) { 188 if (test_thread_flag(TIF_32BIT)) {
189 vdso_pagelist = vdso32_pagelist;
231 vdso_pages = vdso32_pages; 190 vdso_pages = vdso32_pages;
232 vdso_base = VDSO32_MBASE; 191 vdso_base = VDSO32_MBASE;
233 } else { 192 } else {
193 vdso_pagelist = vdso64_pagelist;
234 vdso_pages = vdso64_pages; 194 vdso_pages = vdso64_pages;
235 vdso_base = VDSO64_MBASE; 195 vdso_base = VDSO64_MBASE;
236 } 196 }
237#else 197#else
198 vdso_pagelist = vdso32_pagelist;
238 vdso_pages = vdso32_pages; 199 vdso_pages = vdso32_pages;
239 vdso_base = VDSO32_MBASE; 200 vdso_base = VDSO32_MBASE;
240#endif 201#endif
@@ -262,17 +223,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
262 goto fail_mmapsem; 223 goto fail_mmapsem;
263 } 224 }
264 225
265
266 /* Allocate a VMA structure and fill it up */
267 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
268 if (vma == NULL) {
269 rc = -ENOMEM;
270 goto fail_mmapsem;
271 }
272 vma->vm_mm = mm;
273 vma->vm_start = vdso_base;
274 vma->vm_end = vma->vm_start + (vdso_pages << PAGE_SHIFT);
275
276 /* 226 /*
277 * our vma flags don't have VM_WRITE so by default, the process isn't 227 * our vma flags don't have VM_WRITE so by default, the process isn't
278 * allowed to write those pages. 228 * allowed to write those pages.
@@ -282,32 +232,26 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
282 * and your nice userland gettimeofday will be totally dead. 232 * and your nice userland gettimeofday will be totally dead.
283 * It's fine to use that for setting breakpoints in the vDSO code 233 * It's fine to use that for setting breakpoints in the vDSO code
284 * pages though 234 * pages though
285 */ 235 *
286 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC;
287 /*
288 * Make sure the vDSO gets into every core dump. 236 * Make sure the vDSO gets into every core dump.
289 * Dumping its contents makes post-mortem fully interpretable later 237 * Dumping its contents makes post-mortem fully interpretable later
290 * without matching up the same kernel and hardware config to see 238 * without matching up the same kernel and hardware config to see
291 * what PC values meant. 239 * what PC values meant.
292 */ 240 */
293 vma->vm_flags |= VM_ALWAYSDUMP; 241 rc = install_special_mapping(mm, vdso_base, vdso_pages << PAGE_SHIFT,
294 vma->vm_flags |= mm->def_flags; 242 VM_READ|VM_EXEC|
295 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; 243 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
296 vma->vm_ops = &vdso_vmops; 244 VM_ALWAYSDUMP,
297 245 vdso_pagelist);
298 /* Insert new VMA */
299 rc = insert_vm_struct(mm, vma);
300 if (rc) 246 if (rc)
301 goto fail_vma; 247 goto fail_mmapsem;
302 248
303 /* Put vDSO base into mm struct and account for memory usage */ 249 /* Put vDSO base into mm struct */
304 current->mm->context.vdso_base = vdso_base; 250 current->mm->context.vdso_base = vdso_base;
305 mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 251
306 up_write(&mm->mmap_sem); 252 up_write(&mm->mmap_sem);
307 return 0; 253 return 0;
308 254
309 fail_vma:
310 kmem_cache_free(vm_area_cachep, vma);
311 fail_mmapsem: 255 fail_mmapsem:
312 up_write(&mm->mmap_sem); 256 up_write(&mm->mmap_sem);
313 return rc; 257 return rc;
@@ -719,7 +663,7 @@ static void __init vdso_setup_syscall_map(void)
719} 663}
720 664
721 665
722void __init vdso_init(void) 666static int __init vdso_init(void)
723{ 667{
724 int i; 668 int i;
725 669
@@ -774,26 +718,44 @@ void __init vdso_init(void)
774#ifdef CONFIG_PPC64 718#ifdef CONFIG_PPC64
775 vdso64_pages = 0; 719 vdso64_pages = 0;
776#endif 720#endif
777 return; 721 return 0;
778 } 722 }
779 723
780 /* Make sure pages are in the correct state */ 724 /* Make sure pages are in the correct state */
725 vdso32_pagelist = kzalloc(sizeof(struct page *) * (vdso32_pages + 2),
726 GFP_KERNEL);
727 BUG_ON(vdso32_pagelist == NULL);
781 for (i = 0; i < vdso32_pages; i++) { 728 for (i = 0; i < vdso32_pages; i++) {
782 struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); 729 struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
783 ClearPageReserved(pg); 730 ClearPageReserved(pg);
784 get_page(pg); 731 get_page(pg);
785 732 vdso32_pagelist[i] = pg;
786 } 733 }
734 vdso32_pagelist[i++] = virt_to_page(vdso_data);
735 vdso32_pagelist[i] = NULL;
736
787#ifdef CONFIG_PPC64 737#ifdef CONFIG_PPC64
738 vdso64_pagelist = kzalloc(sizeof(struct page *) * (vdso64_pages + 2),
739 GFP_KERNEL);
740 BUG_ON(vdso64_pagelist == NULL);
788 for (i = 0; i < vdso64_pages; i++) { 741 for (i = 0; i < vdso64_pages; i++) {
789 struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); 742 struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
790 ClearPageReserved(pg); 743 ClearPageReserved(pg);
791 get_page(pg); 744 get_page(pg);
745 vdso64_pagelist[i] = pg;
792 } 746 }
747 vdso64_pagelist[i++] = virt_to_page(vdso_data);
748 vdso64_pagelist[i] = NULL;
793#endif /* CONFIG_PPC64 */ 749#endif /* CONFIG_PPC64 */
794 750
795 get_page(virt_to_page(vdso_data)); 751 get_page(virt_to_page(vdso_data));
752
753 smp_wmb();
754 vdso_ready = 1;
755
756 return 0;
796} 757}
758arch_initcall(vdso_init);
797 759
798int in_gate_area_no_task(unsigned long addr) 760int in_gate_area_no_task(unsigned long addr)
799{ 761{
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index a80f8f1d2e5d..2968ffeafdb6 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -199,10 +199,8 @@ EXPORT_SYMBOL(vio_unregister_driver);
199/* vio_dev refcount hit 0 */ 199/* vio_dev refcount hit 0 */
200static void __devinit vio_dev_release(struct device *dev) 200static void __devinit vio_dev_release(struct device *dev)
201{ 201{
202 if (dev->archdata.of_node) { 202 /* XXX should free TCE table */
203 /* XXX should free TCE table */ 203 of_node_put(dev->archdata.of_node);
204 of_node_put(dev->archdata.of_node);
205 }
206 kfree(to_vio_dev(dev)); 204 kfree(to_vio_dev(dev));
207} 205}
208 206
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 04b8e71bf5b0..7eefeb4a30e7 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -131,14 +131,14 @@ SECTIONS
131 __stop___fw_ftr_fixup = .; 131 __stop___fw_ftr_fixup = .;
132 } 132 }
133#endif 133#endif
134 134#ifdef CONFIG_BLK_DEV_INITRD
135 . = ALIGN(PAGE_SIZE); 135 . = ALIGN(PAGE_SIZE);
136 .init.ramfs : { 136 .init.ramfs : {
137 __initramfs_start = .; 137 __initramfs_start = .;
138 *(.init.ramfs) 138 *(.init.ramfs)
139 __initramfs_end = .; 139 __initramfs_end = .;
140 } 140 }
141 141#endif
142#ifdef CONFIG_PPC32 142#ifdef CONFIG_PPC32
143 . = ALIGN(32); 143 . = ALIGN(32);
144#else 144#else
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index a0360ae10d0c..4b1ba49fbd9e 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -16,13 +16,15 @@ obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
16 strcase.o 16 strcase.o
17obj-$(CONFIG_QUICC_ENGINE) += rheap.o 17obj-$(CONFIG_QUICC_ENGINE) += rheap.o
18obj-$(CONFIG_XMON) += sstep.o 18obj-$(CONFIG_XMON) += sstep.o
19obj-$(CONFIG_KPROBES) += sstep.o
20obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
19 21
20ifeq ($(CONFIG_PPC64),y) 22ifeq ($(CONFIG_PPC64),y)
21obj-$(CONFIG_SMP) += locks.o 23obj-$(CONFIG_SMP) += locks.o
22obj-$(CONFIG_DEBUG_KERNEL) += sstep.o
23endif 24endif
24 25
25# Temporary hack until we have migrated to asm-powerpc 26# Temporary hack until we have migrated to asm-powerpc
26ifeq ($(CONFIG_PPC_MERGE),y) 27ifeq ($(CONFIG_PPC_MERGE),y)
28obj-$(CONFIG_8xx) += rheap.o
27obj-$(CONFIG_CPM2) += rheap.o 29obj-$(CONFIG_CPM2) += rheap.o
28endif 30endif
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/powerpc/lib/dma-noncoherent.c
index 10fec7363962..48f3d13a3de5 100644
--- a/arch/ppc/kernel/dma-mapping.c
+++ b/arch/powerpc/lib/dma-noncoherent.c
@@ -22,37 +22,13 @@
22 * published by the Free Software Foundation. 22 * published by the Free Software Foundation.
23 */ 23 */
24 24
25#include <linux/module.h>
26#include <linux/signal.h>
27#include <linux/sched.h> 25#include <linux/sched.h>
28#include <linux/kernel.h> 26#include <linux/kernel.h>
29#include <linux/errno.h> 27#include <linux/errno.h>
30#include <linux/string.h> 28#include <linux/string.h>
31#include <linux/types.h> 29#include <linux/types.h>
32#include <linux/ptrace.h>
33#include <linux/mman.h>
34#include <linux/mm.h>
35#include <linux/swap.h>
36#include <linux/stddef.h>
37#include <linux/vmalloc.h>
38#include <linux/init.h>
39#include <linux/delay.h>
40#include <linux/bootmem.h>
41#include <linux/highmem.h> 30#include <linux/highmem.h>
42#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
43#include <linux/hardirq.h>
44
45#include <asm/pgalloc.h>
46#include <asm/prom.h>
47#include <asm/io.h>
48#include <asm/mmu_context.h>
49#include <asm/pgtable.h>
50#include <asm/mmu.h>
51#include <asm/uaccess.h>
52#include <asm/smp.h>
53#include <asm/machdep.h>
54
55int map_page(unsigned long va, phys_addr_t pa, int flags);
56 32
57#include <asm/tlbflush.h> 33#include <asm/tlbflush.h>
58 34
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 57bf991ccd6e..6c5c5dd183ee 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -14,6 +14,7 @@
14 */ 14 */
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h>
17#include <linux/mm.h> 18#include <linux/mm.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19 20
@@ -85,7 +86,8 @@ static int grow(rh_info_t * info, int max_blocks)
85 info->flags &= ~RHIF_STATIC_BLOCK; 86 info->flags &= ~RHIF_STATIC_BLOCK;
86 87
87 /* add all new blocks to the free list */ 88 /* add all new blocks to the free list */
88 for (i = 0, blk = block + info->max_blocks; i < new_blocks; i++, blk++) 89 blk = block + info->max_blocks - new_blocks;
90 for (i = 0; i < new_blocks; i++, blk++)
89 list_add(&blk->list, &info->empty_list); 91 list_add(&blk->list, &info->empty_list);
90 92
91 return 0; 93 return 0;
@@ -670,7 +672,7 @@ void rh_dump(rh_info_t * info)
670 int maxnr; 672 int maxnr;
671 int i, nr; 673 int i, nr;
672 674
673 maxnr = sizeof(st) / sizeof(st[0]); 675 maxnr = ARRAY_SIZE(st);
674 676
675 printk(KERN_INFO 677 printk(KERN_INFO
676 "info @0x%p (%d slots empty / %d max)\n", 678 "info @0x%p (%d slots empty / %d max)\n",
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 1bb20d841080..8c77c791f87e 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -1014,7 +1014,6 @@ repeat:
1014 1014
1015 /* Primary is full, try the secondary */ 1015 /* Primary is full, try the secondary */
1016 if (unlikely(slot == -1)) { 1016 if (unlikely(slot == -1)) {
1017 new_pte |= _PAGE_F_SECOND;
1018 hpte_group = ((~hash & htab_hash_mask) * 1017 hpte_group = ((~hash & htab_hash_mask) *
1019 HPTES_PER_GROUP) & ~0x7UL; 1018 HPTES_PER_GROUP) & ~0x7UL;
1020 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 1019 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags,
@@ -1033,7 +1032,7 @@ repeat:
1033 if (unlikely(slot == -2)) 1032 if (unlikely(slot == -2))
1034 panic("hash_huge_page: pte_insert failed\n"); 1033 panic("hash_huge_page: pte_insert failed\n");
1035 1034
1036 new_pte |= (slot << 12) & _PAGE_F_GIX; 1035 new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);
1037 } 1036 }
1038 1037
1039 /* 1038 /*
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index d1c0758c5611..52f397c108a7 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -61,10 +61,6 @@ unsigned long memory_limit;
61extern void hash_preload(struct mm_struct *mm, unsigned long ea, 61extern void hash_preload(struct mm_struct *mm, unsigned long ea,
62 unsigned long access, unsigned long trap); 62 unsigned long access, unsigned long trap);
63 63
64/*
65 * This is called by /dev/mem to know if a given address has to
66 * be mapped non-cacheable or not
67 */
68int page_is_ram(unsigned long pfn) 64int page_is_ram(unsigned long pfn)
69{ 65{
70 unsigned long paddr = (pfn << PAGE_SHIFT); 66 unsigned long paddr = (pfn << PAGE_SHIFT);
@@ -388,9 +384,6 @@ void __init mem_init(void)
388 initsize >> 10); 384 initsize >> 10);
389 385
390 mem_init_done = 1; 386 mem_init_done = 1;
391
392 /* Initialize the vDSO */
393 vdso_init();
394} 387}
395 388
396/* 389/*
@@ -490,19 +483,19 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
490 !cpu_has_feature(CPU_FTR_NOEXECUTE) && 483 !cpu_has_feature(CPU_FTR_NOEXECUTE) &&
491 pfn_valid(pfn)) { 484 pfn_valid(pfn)) {
492 struct page *page = pfn_to_page(pfn); 485 struct page *page = pfn_to_page(pfn);
486#ifdef CONFIG_8xx
487 /* On 8xx, cache control instructions (particularly
488 * "dcbst" from flush_dcache_icache) fault as write
489 * operation if there is an unpopulated TLB entry
490 * for the address in question. To workaround that,
491 * we invalidate the TLB here, thus avoiding dcbst
492 * misbehaviour.
493 */
494 _tlbie(address);
495#endif
493 if (!PageReserved(page) 496 if (!PageReserved(page)
494 && !test_bit(PG_arch_1, &page->flags)) { 497 && !test_bit(PG_arch_1, &page->flags)) {
495 if (vma->vm_mm == current->active_mm) { 498 if (vma->vm_mm == current->active_mm) {
496#ifdef CONFIG_8xx
497 /* On 8xx, cache control instructions (particularly
498 * "dcbst" from flush_dcache_icache) fault as write
499 * operation if there is an unpopulated TLB entry
500 * for the address in question. To workaround that,
501 * we invalidate the TLB here, thus avoiding dcbst
502 * misbehaviour.
503 */
504 _tlbie(address);
505#endif
506 __flush_dcache_icache((void *) address); 499 __flush_dcache_icache((void *) address);
507 } else 500 } else
508 flush_dcache_icache_page(page); 501 flush_dcache_icache_page(page);
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 262790910ff2..e86c37c82cfd 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -154,7 +154,7 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
154 * characteristics relative to its multiple connections. We ignore 154 * characteristics relative to its multiple connections. We ignore
155 * this for now. We also assume that all cpu and memory sets have 155 * this for now. We also assume that all cpu and memory sets have
156 * their distances represented at a common level. This won't be 156 * their distances represented at a common level. This won't be
157 * true for heirarchical NUMA. 157 * true for hierarchical NUMA.
158 * 158 *
159 * In any case the ibm,associativity-reference-points should give 159 * In any case the ibm,associativity-reference-points should give
160 * the correct depth for a normal NUMA system. 160 * the correct depth for a normal NUMA system.
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 1891dbeeb8e9..c284bdac9947 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -294,11 +294,8 @@ void __init mapin_ram(void)
294 } 294 }
295} 295}
296 296
297/* is x a power of 2? */
298#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
299
300/* is x a power of 4? */ 297/* is x a power of 4? */
301#define is_power_of_4(x) ((x) != 0 && (((x) & (x-1)) == 0) && (ffs(x) & 1)) 298#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1)
302 299
303/* 300/*
304 * Set up a mapping for a block of I/O. 301 * Set up a mapping for a block of I/O.
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 16e4ee1c2318..1d443407423c 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -103,7 +103,7 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
103 * 103 *
104 */ 104 */
105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, 105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags,
106 mmu_virtual_psize)) { 106 mmu_io_psize)) {
107 printk(KERN_ERR "Failed to do bolted mapping IO " 107 printk(KERN_ERR "Failed to do bolted mapping IO "
108 "memory at %016lx !\n", pa); 108 "memory at %016lx !\n", pa);
109 return -ENOMEM; 109 return -ENOMEM;
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index b6d82390b6a6..fbd62eacfdf4 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -149,6 +149,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
149#ifdef CONFIG_PPC64 149#ifdef CONFIG_PPC64
150#ifdef CONFIG_PPC_CELL_NATIVE 150#ifdef CONFIG_PPC_CELL_NATIVE
151 case PPC_OPROFILE_CELL: 151 case PPC_OPROFILE_CELL:
152 if (firmware_has_feature(FW_FEATURE_LPAR))
153 return -ENODEV;
152 model = &op_model_cell; 154 model = &op_model_cell;
153 break; 155 break;
154#endif 156#endif
diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c
index f481c0ed5e67..5d1bbaf35ccb 100644
--- a/arch/powerpc/oprofile/op_model_7450.c
+++ b/arch/powerpc/oprofile/op_model_7450.c
@@ -137,9 +137,9 @@ static void fsl7450_start(struct op_counter_config *ctr)
137 137
138 for (i = 0; i < NUM_CTRS; ++i) { 138 for (i = 0; i < NUM_CTRS; ++i) {
139 if (ctr[i].enabled) 139 if (ctr[i].enabled)
140 ctr_write(i, reset_value[i]); 140 classic_ctr_write(i, reset_value[i]);
141 else 141 else
142 ctr_write(i, 0); 142 classic_ctr_write(i, 0);
143 } 143 }
144 144
145 /* Clear the freeze bit, and enable the interrupt. 145 /* Clear the freeze bit, and enable the interrupt.
@@ -179,13 +179,13 @@ static void fsl7450_handle_interrupt(struct pt_regs *regs,
179 is_kernel = is_kernel_addr(pc); 179 is_kernel = is_kernel_addr(pc);
180 180
181 for (i = 0; i < NUM_CTRS; ++i) { 181 for (i = 0; i < NUM_CTRS; ++i) {
182 val = ctr_read(i); 182 val = classic_ctr_read(i);
183 if (val < 0) { 183 if (val < 0) {
184 if (oprofile_running && ctr[i].enabled) { 184 if (oprofile_running && ctr[i].enabled) {
185 oprofile_add_ext_sample(pc, regs, i, is_kernel); 185 oprofile_add_ext_sample(pc, regs, i, is_kernel);
186 ctr_write(i, reset_value[i]); 186 classic_ctr_write(i, reset_value[i]);
187 } else { 187 } else {
188 ctr_write(i, 0); 188 classic_ctr_write(i, 0);
189 } 189 }
190 } 190 }
191 } 191 }
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index 2eb15f388103..e08e1d7b3dc5 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -39,10 +39,17 @@
39#include "../platforms/cell/interrupt.h" 39#include "../platforms/cell/interrupt.h"
40 40
41#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */ 41#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */
42#define PPU_CYCLES_GRP_NUM 1 /* special group number for identifying
43 * PPU_CYCLES event
44 */
42#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */ 45#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */
43 46
44#define NUM_THREADS 2 47#define NUM_THREADS 2 /* number of physical threads in
45#define VIRT_CNTR_SW_TIME_NS 100000000 // 0.5 seconds 48 * physical processor
49 */
50#define NUM_TRACE_BUS_WORDS 4
51#define NUM_INPUT_BUS_WORDS 2
52
46 53
47struct pmc_cntrl_data { 54struct pmc_cntrl_data {
48 unsigned long vcntr; 55 unsigned long vcntr;
@@ -58,7 +65,7 @@ struct pmc_cntrl_data {
58struct pm_signal { 65struct pm_signal {
59 u16 cpu; /* Processor to modify */ 66 u16 cpu; /* Processor to modify */
60 u16 sub_unit; /* hw subunit this applies to (if applicable) */ 67 u16 sub_unit; /* hw subunit this applies to (if applicable) */
61 u16 signal_group; /* Signal Group to Enable/Disable */ 68 short int signal_group; /* Signal Group to Enable/Disable */
62 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event 69 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event
63 * Bus Word(s) (bitmask) 70 * Bus Word(s) (bitmask)
64 */ 71 */
@@ -93,7 +100,6 @@ static struct {
93 u32 pm07_cntrl[NR_PHYS_CTRS]; 100 u32 pm07_cntrl[NR_PHYS_CTRS];
94} pm_regs; 101} pm_regs;
95 102
96
97#define GET_SUB_UNIT(x) ((x & 0x0000f000) >> 12) 103#define GET_SUB_UNIT(x) ((x & 0x0000f000) >> 12)
98#define GET_BUS_WORD(x) ((x & 0x000000f0) >> 4) 104#define GET_BUS_WORD(x) ((x & 0x000000f0) >> 4)
99#define GET_BUS_TYPE(x) ((x & 0x00000300) >> 8) 105#define GET_BUS_TYPE(x) ((x & 0x00000300) >> 8)
@@ -101,7 +107,6 @@ static struct {
101#define GET_COUNT_CYCLES(x) (x & 0x00000001) 107#define GET_COUNT_CYCLES(x) (x & 0x00000001)
102#define GET_INPUT_CONTROL(x) ((x & 0x00000004) >> 2) 108#define GET_INPUT_CONTROL(x) ((x & 0x00000004) >> 2)
103 109
104
105static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values); 110static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values);
106 111
107static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS]; 112static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS];
@@ -129,8 +134,8 @@ static spinlock_t virt_cntr_lock = SPIN_LOCK_UNLOCKED;
129 134
130static u32 ctr_enabled; 135static u32 ctr_enabled;
131 136
132static unsigned char trace_bus[4]; 137static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
133static unsigned char input_bus[2]; 138static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
134 139
135/* 140/*
136 * Firmware interface functions 141 * Firmware interface functions
@@ -177,25 +182,40 @@ static void pm_rtas_reset_signals(u32 node)
177static void pm_rtas_activate_signals(u32 node, u32 count) 182static void pm_rtas_activate_signals(u32 node, u32 count)
178{ 183{
179 int ret; 184 int ret;
180 int j; 185 int i, j;
181 struct pm_signal pm_signal_local[NR_PHYS_CTRS]; 186 struct pm_signal pm_signal_local[NR_PHYS_CTRS];
182 187
188 /* There is no debug setup required for the cycles event.
189 * Note that only events in the same group can be used.
190 * Otherwise, there will be conflicts in correctly routing
191 * the signals on the debug bus. It is the responsiblity
192 * of the OProfile user tool to check the events are in
193 * the same group.
194 */
195 i = 0;
183 for (j = 0; j < count; j++) { 196 for (j = 0; j < count; j++) {
184 /* fw expects physical cpu # */ 197 if (pm_signal[j].signal_group != PPU_CYCLES_GRP_NUM) {
185 pm_signal_local[j].cpu = node; 198
186 pm_signal_local[j].signal_group = pm_signal[j].signal_group; 199 /* fw expects physical cpu # */
187 pm_signal_local[j].bus_word = pm_signal[j].bus_word; 200 pm_signal_local[i].cpu = node;
188 pm_signal_local[j].sub_unit = pm_signal[j].sub_unit; 201 pm_signal_local[i].signal_group
189 pm_signal_local[j].bit = pm_signal[j].bit; 202 = pm_signal[j].signal_group;
203 pm_signal_local[i].bus_word = pm_signal[j].bus_word;
204 pm_signal_local[i].sub_unit = pm_signal[j].sub_unit;
205 pm_signal_local[i].bit = pm_signal[j].bit;
206 i++;
207 }
190 } 208 }
191 209
192 ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE, 210 if (i != 0) {
193 pm_signal_local, 211 ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE,
194 count * sizeof(struct pm_signal)); 212 pm_signal_local,
213 i * sizeof(struct pm_signal));
195 214
196 if (ret) 215 if (ret)
197 printk(KERN_WARNING "%s: rtas returned: %d\n", 216 printk(KERN_WARNING "%s: rtas returned: %d\n",
198 __FUNCTION__, ret); 217 __FUNCTION__, ret);
218 }
199} 219}
200 220
201/* 221/*
@@ -212,7 +232,7 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
212 /* Special Event: Count all cpu cycles */ 232 /* Special Event: Count all cpu cycles */
213 pm_regs.pm07_cntrl[ctr] = CBE_COUNT_ALL_CYCLES; 233 pm_regs.pm07_cntrl[ctr] = CBE_COUNT_ALL_CYCLES;
214 p = &(pm_signal[ctr]); 234 p = &(pm_signal[ctr]);
215 p->signal_group = 21; 235 p->signal_group = PPU_CYCLES_GRP_NUM;
216 p->bus_word = 1; 236 p->bus_word = 1;
217 p->sub_unit = 0; 237 p->sub_unit = 0;
218 p->bit = 0; 238 p->bit = 0;
@@ -232,13 +252,21 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
232 252
233 p->signal_group = event / 100; 253 p->signal_group = event / 100;
234 p->bus_word = bus_word; 254 p->bus_word = bus_word;
235 p->sub_unit = unit_mask & 0x0000f000; 255 p->sub_unit = (unit_mask & 0x0000f000) >> 12;
236 256
237 pm_regs.pm07_cntrl[ctr] = 0; 257 pm_regs.pm07_cntrl[ctr] = 0;
238 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles); 258 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
239 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity); 259 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity);
240 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control); 260 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control);
241 261
262 /* Some of the islands signal selection is based on 64 bit words.
263 * The debug bus words are 32 bits, the input words to the performance
264 * counters are defined as 32 bits. Need to convert the 64 bit island
265 * specification to the appropriate 32 input bit and bus word for the
266 * performance counter event selection. See the CELL Performance
267 * monitoring signals manual and the Perf cntr hardware descriptions
268 * for the details.
269 */
242 if (input_control == 0) { 270 if (input_control == 0) {
243 if (signal_bit > 31) { 271 if (signal_bit > 31) {
244 signal_bit -= 32; 272 signal_bit -= 32;
@@ -259,12 +287,12 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
259 p->bit = signal_bit; 287 p->bit = signal_bit;
260 } 288 }
261 289
262 for (i = 0; i < 4; i++) { 290 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) {
263 if (bus_word & (1 << i)) { 291 if (bus_word & (1 << i)) {
264 pm_regs.debug_bus_control |= 292 pm_regs.debug_bus_control |=
265 (bus_type << (31 - (2 * i) + 1)); 293 (bus_type << (31 - (2 * i) + 1));
266 294
267 for (j = 0; j < 2; j++) { 295 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
268 if (input_bus[j] == 0xff) { 296 if (input_bus[j] == 0xff) {
269 input_bus[j] = i; 297 input_bus[j] = i;
270 pm_regs.group_control |= 298 pm_regs.group_control |=
@@ -278,52 +306,58 @@ out:
278 ; 306 ;
279} 307}
280 308
281static void write_pm_cntrl(int cpu, struct pm_cntrl *pm_cntrl) 309static void write_pm_cntrl(int cpu)
282{ 310{
283 /* Oprofile will use 32 bit counters, set bits 7:10 to 0 */ 311 /* Oprofile will use 32 bit counters, set bits 7:10 to 0
312 * pmregs.pm_cntrl is a global
313 */
314
284 u32 val = 0; 315 u32 val = 0;
285 if (pm_cntrl->enable == 1) 316 if (pm_regs.pm_cntrl.enable == 1)
286 val |= CBE_PM_ENABLE_PERF_MON; 317 val |= CBE_PM_ENABLE_PERF_MON;
287 318
288 if (pm_cntrl->stop_at_max == 1) 319 if (pm_regs.pm_cntrl.stop_at_max == 1)
289 val |= CBE_PM_STOP_AT_MAX; 320 val |= CBE_PM_STOP_AT_MAX;
290 321
291 if (pm_cntrl->trace_mode == 1) 322 if (pm_regs.pm_cntrl.trace_mode == 1)
292 val |= CBE_PM_TRACE_MODE_SET(pm_cntrl->trace_mode); 323 val |= CBE_PM_TRACE_MODE_SET(pm_regs.pm_cntrl.trace_mode);
293 324
294 if (pm_cntrl->freeze == 1) 325 if (pm_regs.pm_cntrl.freeze == 1)
295 val |= CBE_PM_FREEZE_ALL_CTRS; 326 val |= CBE_PM_FREEZE_ALL_CTRS;
296 327
297 /* Routine set_count_mode must be called previously to set 328 /* Routine set_count_mode must be called previously to set
298 * the count mode based on the user selection of user and kernel. 329 * the count mode based on the user selection of user and kernel.
299 */ 330 */
300 val |= CBE_PM_COUNT_MODE_SET(pm_cntrl->count_mode); 331 val |= CBE_PM_COUNT_MODE_SET(pm_regs.pm_cntrl.count_mode);
301 cbe_write_pm(cpu, pm_control, val); 332 cbe_write_pm(cpu, pm_control, val);
302} 333}
303 334
304static inline void 335static inline void
305set_count_mode(u32 kernel, u32 user, struct pm_cntrl *pm_cntrl) 336set_count_mode(u32 kernel, u32 user)
306{ 337{
307 /* The user must specify user and kernel if they want them. If 338 /* The user must specify user and kernel if they want them. If
308 * neither is specified, OProfile will count in hypervisor mode 339 * neither is specified, OProfile will count in hypervisor mode.
340 * pm_regs.pm_cntrl is a global
309 */ 341 */
310 if (kernel) { 342 if (kernel) {
311 if (user) 343 if (user)
312 pm_cntrl->count_mode = CBE_COUNT_ALL_MODES; 344 pm_regs.pm_cntrl.count_mode = CBE_COUNT_ALL_MODES;
313 else 345 else
314 pm_cntrl->count_mode = CBE_COUNT_SUPERVISOR_MODE; 346 pm_regs.pm_cntrl.count_mode =
347 CBE_COUNT_SUPERVISOR_MODE;
315 } else { 348 } else {
316 if (user) 349 if (user)
317 pm_cntrl->count_mode = CBE_COUNT_PROBLEM_MODE; 350 pm_regs.pm_cntrl.count_mode = CBE_COUNT_PROBLEM_MODE;
318 else 351 else
319 pm_cntrl->count_mode = CBE_COUNT_HYPERVISOR_MODE; 352 pm_regs.pm_cntrl.count_mode =
353 CBE_COUNT_HYPERVISOR_MODE;
320 } 354 }
321} 355}
322 356
323static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl) 357static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl)
324{ 358{
325 359
326 pm07_cntrl[ctr] |= PM07_CTR_ENABLE(1); 360 pm07_cntrl[ctr] |= CBE_PM_CTR_ENABLE;
327 cbe_write_pm07_control(cpu, ctr, pm07_cntrl[ctr]); 361 cbe_write_pm07_control(cpu, ctr, pm07_cntrl[ctr]);
328} 362}
329 363
@@ -365,6 +399,14 @@ static void cell_virtual_cntr(unsigned long data)
365 hdw_thread = 1 ^ hdw_thread; 399 hdw_thread = 1 ^ hdw_thread;
366 next_hdw_thread = hdw_thread; 400 next_hdw_thread = hdw_thread;
367 401
402 for (i = 0; i < num_counters; i++)
403 /* There are some per thread events. Must do the
404 * set event, for the thread that is being started
405 */
406 set_pm_event(i,
407 pmc_cntrl[next_hdw_thread][i].evnts,
408 pmc_cntrl[next_hdw_thread][i].masks);
409
368 /* The following is done only once per each node, but 410 /* The following is done only once per each node, but
369 * we need cpu #, not node #, to pass to the cbe_xxx functions. 411 * we need cpu #, not node #, to pass to the cbe_xxx functions.
370 */ 412 */
@@ -385,12 +427,13 @@ static void cell_virtual_cntr(unsigned long data)
385 == 0xFFFFFFFF) 427 == 0xFFFFFFFF)
386 /* If the cntr value is 0xffffffff, we must 428 /* If the cntr value is 0xffffffff, we must
387 * reset that to 0xfffffff0 when the current 429 * reset that to 0xfffffff0 when the current
388 * thread is restarted. This will generate a new 430 * thread is restarted. This will generate a
389 * interrupt and make sure that we never restore 431 * new interrupt and make sure that we never
390 * the counters to the max value. If the counters 432 * restore the counters to the max value. If
391 * were restored to the max value, they do not 433 * the counters were restored to the max value,
392 * increment and no interrupts are generated. Hence 434 * they do not increment and no interrupts are
393 * no more samples will be collected on that cpu. 435 * generated. Hence no more samples will be
436 * collected on that cpu.
394 */ 437 */
395 cbe_write_ctr(cpu, i, 0xFFFFFFF0); 438 cbe_write_ctr(cpu, i, 0xFFFFFFF0);
396 else 439 else
@@ -410,9 +453,6 @@ static void cell_virtual_cntr(unsigned long data)
410 * Must do the set event, enable_cntr 453 * Must do the set event, enable_cntr
411 * for each cpu. 454 * for each cpu.
412 */ 455 */
413 set_pm_event(i,
414 pmc_cntrl[next_hdw_thread][i].evnts,
415 pmc_cntrl[next_hdw_thread][i].masks);
416 enable_ctr(cpu, i, 456 enable_ctr(cpu, i,
417 pm_regs.pm07_cntrl); 457 pm_regs.pm07_cntrl);
418 } else { 458 } else {
@@ -465,8 +505,7 @@ cell_reg_setup(struct op_counter_config *ctr,
465 pm_regs.pm_cntrl.trace_mode = 0; 505 pm_regs.pm_cntrl.trace_mode = 0;
466 pm_regs.pm_cntrl.freeze = 1; 506 pm_regs.pm_cntrl.freeze = 1;
467 507
468 set_count_mode(sys->enable_kernel, sys->enable_user, 508 set_count_mode(sys->enable_kernel, sys->enable_user);
469 &pm_regs.pm_cntrl);
470 509
471 /* Setup the thread 0 events */ 510 /* Setup the thread 0 events */
472 for (i = 0; i < num_ctrs; ++i) { 511 for (i = 0; i < num_ctrs; ++i) {
@@ -498,10 +537,10 @@ cell_reg_setup(struct op_counter_config *ctr,
498 pmc_cntrl[1][i].vcntr = i; 537 pmc_cntrl[1][i].vcntr = i;
499 } 538 }
500 539
501 for (i = 0; i < 4; i++) 540 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
502 trace_bus[i] = 0xff; 541 trace_bus[i] = 0xff;
503 542
504 for (i = 0; i < 2; i++) 543 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
505 input_bus[i] = 0xff; 544 input_bus[i] = 0xff;
506 545
507 /* Our counters count up, and "count" refers to 546 /* Our counters count up, and "count" refers to
@@ -560,7 +599,7 @@ static void cell_cpu_setup(struct op_counter_config *cntr)
560 cbe_write_pm(cpu, pm_start_stop, 0); 599 cbe_write_pm(cpu, pm_start_stop, 0);
561 cbe_write_pm(cpu, group_control, pm_regs.group_control); 600 cbe_write_pm(cpu, group_control, pm_regs.group_control);
562 cbe_write_pm(cpu, debug_bus_control, pm_regs.debug_bus_control); 601 cbe_write_pm(cpu, debug_bus_control, pm_regs.debug_bus_control);
563 write_pm_cntrl(cpu, &pm_regs.pm_cntrl); 602 write_pm_cntrl(cpu);
564 603
565 for (i = 0; i < num_counters; ++i) { 604 for (i = 0; i < num_counters; ++i) {
566 if (ctr_enabled & (1 << i)) { 605 if (ctr_enabled & (1 << i)) {
@@ -602,7 +641,7 @@ static void cell_global_start(struct op_counter_config *ctr)
602 } 641 }
603 } 642 }
604 643
605 cbe_clear_pm_interrupts(cpu); 644 cbe_get_and_clear_pm_interrupts(cpu);
606 cbe_enable_pm_interrupts(cpu, hdw_thread, interrupt_mask); 645 cbe_enable_pm_interrupts(cpu, hdw_thread, interrupt_mask);
607 cbe_enable_pm(cpu); 646 cbe_enable_pm(cpu);
608 } 647 }
@@ -672,7 +711,7 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
672 711
673 cbe_disable_pm(cpu); 712 cbe_disable_pm(cpu);
674 713
675 interrupt_mask = cbe_clear_pm_interrupts(cpu); 714 interrupt_mask = cbe_get_and_clear_pm_interrupts(cpu);
676 715
677 /* If the interrupt mask has been cleared, then the virt cntr 716 /* If the interrupt mask has been cleared, then the virt cntr
678 * has cleared the interrupt. When the thread that generated 717 * has cleared the interrupt. When the thread that generated
diff --git a/arch/powerpc/oprofile/op_model_fsl_booke.c b/arch/powerpc/oprofile/op_model_fsl_booke.c
index 0b3c31f5209e..2267eb8c661b 100644
--- a/arch/powerpc/oprofile/op_model_fsl_booke.c
+++ b/arch/powerpc/oprofile/op_model_fsl_booke.c
@@ -32,6 +32,87 @@ static unsigned long reset_value[OP_MAX_COUNTER];
32static int num_counters; 32static int num_counters;
33static int oprofile_running; 33static int oprofile_running;
34 34
35static inline u32 get_pmlca(int ctr)
36{
37 u32 pmlca;
38
39 switch (ctr) {
40 case 0:
41 pmlca = mfpmr(PMRN_PMLCA0);
42 break;
43 case 1:
44 pmlca = mfpmr(PMRN_PMLCA1);
45 break;
46 case 2:
47 pmlca = mfpmr(PMRN_PMLCA2);
48 break;
49 case 3:
50 pmlca = mfpmr(PMRN_PMLCA3);
51 break;
52 default:
53 panic("Bad ctr number\n");
54 }
55
56 return pmlca;
57}
58
59static inline void set_pmlca(int ctr, u32 pmlca)
60{
61 switch (ctr) {
62 case 0:
63 mtpmr(PMRN_PMLCA0, pmlca);
64 break;
65 case 1:
66 mtpmr(PMRN_PMLCA1, pmlca);
67 break;
68 case 2:
69 mtpmr(PMRN_PMLCA2, pmlca);
70 break;
71 case 3:
72 mtpmr(PMRN_PMLCA3, pmlca);
73 break;
74 default:
75 panic("Bad ctr number\n");
76 }
77}
78
79static inline unsigned int ctr_read(unsigned int i)
80{
81 switch(i) {
82 case 0:
83 return mfpmr(PMRN_PMC0);
84 case 1:
85 return mfpmr(PMRN_PMC1);
86 case 2:
87 return mfpmr(PMRN_PMC2);
88 case 3:
89 return mfpmr(PMRN_PMC3);
90 default:
91 return 0;
92 }
93}
94
95static inline void ctr_write(unsigned int i, unsigned int val)
96{
97 switch(i) {
98 case 0:
99 mtpmr(PMRN_PMC0, val);
100 break;
101 case 1:
102 mtpmr(PMRN_PMC1, val);
103 break;
104 case 2:
105 mtpmr(PMRN_PMC2, val);
106 break;
107 case 3:
108 mtpmr(PMRN_PMC3, val);
109 break;
110 default:
111 break;
112 }
113}
114
115
35static void init_pmc_stop(int ctr) 116static void init_pmc_stop(int ctr)
36{ 117{
37 u32 pmlca = (PMLCA_FC | PMLCA_FCS | PMLCA_FCU | 118 u32 pmlca = (PMLCA_FC | PMLCA_FCS | PMLCA_FCU |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index 356709d515b9..fe597a154d4f 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -121,9 +121,9 @@ static void power4_start(struct op_counter_config *ctr)
121 121
122 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { 122 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) {
123 if (ctr[i].enabled) { 123 if (ctr[i].enabled) {
124 ctr_write(i, reset_value[i]); 124 classic_ctr_write(i, reset_value[i]);
125 } else { 125 } else {
126 ctr_write(i, 0); 126 classic_ctr_write(i, 0);
127 } 127 }
128 } 128 }
129 129
@@ -254,13 +254,13 @@ static void power4_handle_interrupt(struct pt_regs *regs,
254 mtmsrd(mfmsr() | MSR_PMM); 254 mtmsrd(mfmsr() | MSR_PMM);
255 255
256 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { 256 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) {
257 val = ctr_read(i); 257 val = classic_ctr_read(i);
258 if (val < 0) { 258 if (val < 0) {
259 if (oprofile_running && ctr[i].enabled) { 259 if (oprofile_running && ctr[i].enabled) {
260 oprofile_add_ext_sample(pc, regs, i, is_kernel); 260 oprofile_add_ext_sample(pc, regs, i, is_kernel);
261 ctr_write(i, reset_value[i]); 261 classic_ctr_write(i, reset_value[i]);
262 } else { 262 } else {
263 ctr_write(i, 0); 263 classic_ctr_write(i, 0);
264 } 264 }
265 } 265 }
266 } 266 }
diff --git a/arch/powerpc/oprofile/op_model_rs64.c b/arch/powerpc/oprofile/op_model_rs64.c
index 19c5ee089bc9..c731acbfb2a5 100644
--- a/arch/powerpc/oprofile/op_model_rs64.c
+++ b/arch/powerpc/oprofile/op_model_rs64.c
@@ -137,10 +137,10 @@ static void rs64_start(struct op_counter_config *ctr)
137 137
138 for (i = 0; i < num_counters; ++i) { 138 for (i = 0; i < num_counters; ++i) {
139 if (ctr[i].enabled) { 139 if (ctr[i].enabled) {
140 ctr_write(i, reset_value[i]); 140 classic_ctr_write(i, reset_value[i]);
141 ctrl_write(i, ctr[i].event); 141 ctrl_write(i, ctr[i].event);
142 } else { 142 } else {
143 ctr_write(i, 0); 143 classic_ctr_write(i, 0);
144 } 144 }
145 } 145 }
146 146
@@ -186,13 +186,13 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
186 mtmsrd(mfmsr() | MSR_PMM); 186 mtmsrd(mfmsr() | MSR_PMM);
187 187
188 for (i = 0; i < num_counters; ++i) { 188 for (i = 0; i < num_counters; ++i) {
189 val = ctr_read(i); 189 val = classic_ctr_read(i);
190 if (val < 0) { 190 if (val < 0) {
191 if (ctr[i].enabled) { 191 if (ctr[i].enabled) {
192 oprofile_add_ext_sample(pc, regs, i, is_kernel); 192 oprofile_add_ext_sample(pc, regs, i, is_kernel);
193 ctr_write(i, reset_value[i]); 193 classic_ctr_write(i, reset_value[i]);
194 } else { 194 } else {
195 ctr_write(i, 0); 195 classic_ctr_write(i, 0);
196 } 196 }
197 } 197 }
198 } 198 }
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile
index a46184a0c750..07cdbcacf156 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -3,7 +3,8 @@
3# 3#
4ifeq ($(CONFIG_PPC_MERGE),y) 4ifeq ($(CONFIG_PPC_MERGE),y)
5obj-y += mpc52xx_pic.o mpc52xx_common.o 5obj-y += mpc52xx_pic.o mpc52xx_common.o
6obj-$(CONFIG_PCI) += mpc52xx_pci.o
6endif 7endif
7 8
8obj-$(CONFIG_PPC_EFIKA) += efika-setup.o efika-pci.o 9obj-$(CONFIG_PPC_EFIKA) += efika.o
9obj-$(CONFIG_PPC_LITE5200) += lite5200.o 10obj-$(CONFIG_PPC_LITE5200) += lite5200.o
diff --git a/arch/powerpc/platforms/52xx/efika-pci.c b/arch/powerpc/platforms/52xx/efika-pci.c
deleted file mode 100644
index 62e05b2a9227..000000000000
--- a/arch/powerpc/platforms/52xx/efika-pci.c
+++ /dev/null
@@ -1,119 +0,0 @@
1
2#include <linux/kernel.h>
3#include <linux/pci.h>
4#include <linux/string.h>
5#include <linux/init.h>
6
7#include <asm/io.h>
8#include <asm/irq.h>
9#include <asm/prom.h>
10#include <asm/machdep.h>
11#include <asm/sections.h>
12#include <asm/pci-bridge.h>
13#include <asm/rtas.h>
14
15#include "efika.h"
16
17#ifdef CONFIG_PCI
18/*
19 * Access functions for PCI config space using RTAS calls.
20 */
21static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
22 int len, u32 * val)
23{
24 struct pci_controller *hose = bus->sysdata;
25 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
26 | (((bus->number - hose->first_busno) & 0xff) << 16)
27 | (hose->index << 24);
28 int ret = -1;
29 int rval;
30
31 rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
32 *val = ret;
33 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
34}
35
36static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
37 int offset, int len, u32 val)
38{
39 struct pci_controller *hose = bus->sysdata;
40 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
41 | (((bus->number - hose->first_busno) & 0xff) << 16)
42 | (hose->index << 24);
43 int rval;
44
45 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
46 addr, len, val);
47 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
48}
49
50static struct pci_ops rtas_pci_ops = {
51 rtas_read_config,
52 rtas_write_config
53};
54
55void __init efika_pcisetup(void)
56{
57 const int *bus_range;
58 int len;
59 struct pci_controller *hose;
60 struct device_node *root;
61 struct device_node *pcictrl;
62
63 root = of_find_node_by_path("/");
64 if (root == NULL) {
65 printk(KERN_WARNING EFIKA_PLATFORM_NAME
66 ": Unable to find the root node\n");
67 return;
68 }
69
70 for (pcictrl = NULL;;) {
71 pcictrl = of_get_next_child(root, pcictrl);
72 if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
73 break;
74 }
75
76 of_node_put(root);
77
78 if (pcictrl == NULL) {
79 printk(KERN_WARNING EFIKA_PLATFORM_NAME
80 ": Unable to find the PCI bridge node\n");
81 return;
82 }
83
84 bus_range = get_property(pcictrl, "bus-range", &len);
85 if (bus_range == NULL || len < 2 * sizeof(int)) {
86 printk(KERN_WARNING EFIKA_PLATFORM_NAME
87 ": Can't get bus-range for %s\n", pcictrl->full_name);
88 return;
89 }
90
91 if (bus_range[1] == bus_range[0])
92 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
93 bus_range[0]);
94 else
95 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
96 bus_range[0], bus_range[1]);
97 printk(" controlled by %s\n", pcictrl->full_name);
98 printk("\n");
99
100 hose = pcibios_alloc_controller();
101 if (!hose) {
102 printk(KERN_WARNING EFIKA_PLATFORM_NAME
103 ": Can't allocate PCI controller structure for %s\n",
104 pcictrl->full_name);
105 return;
106 }
107
108 hose->arch_data = of_node_get(pcictrl);
109 hose->first_busno = bus_range[0];
110 hose->last_busno = bus_range[1];
111 hose->ops = &rtas_pci_ops;
112
113 pci_process_bridge_OF_ranges(hose, pcictrl, 0);
114}
115
116#else
117void __init efika_pcisetup(void)
118{}
119#endif
diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
deleted file mode 100644
index 110c980ed1e0..000000000000
--- a/arch/powerpc/platforms/52xx/efika-setup.c
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2 *
3 * Efika 5K2 platform setup
4 * Some code really inspired from the lite5200b platform.
5 *
6 * Copyright (C) 2006 bplan GmbH
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 *
12 */
13
14#include <linux/errno.h>
15#include <linux/kernel.h>
16#include <linux/slab.h>
17#include <linux/reboot.h>
18#include <linux/init.h>
19#include <linux/utsrelease.h>
20#include <linux/seq_file.h>
21#include <linux/root_dev.h>
22#include <linux/initrd.h>
23#include <linux/timer.h>
24#include <linux/pci.h>
25
26#include <asm/pgtable.h>
27#include <asm/prom.h>
28#include <asm/time.h>
29#include <asm/machdep.h>
30#include <asm/rtas.h>
31#include <asm/of_device.h>
32#include <asm/of_platform.h>
33#include <asm/mpc52xx.h>
34
35#include "efika.h"
36
37static void efika_show_cpuinfo(struct seq_file *m)
38{
39 struct device_node *root;
40 const char *revision = NULL;
41 const char *codegendescription = NULL;
42 const char *codegenvendor = NULL;
43
44 root = of_find_node_by_path("/");
45 if (root) {
46 revision = get_property(root, "revision", NULL);
47 codegendescription =
48 get_property(root, "CODEGEN,description", NULL);
49 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
50
51 of_node_put(root);
52 }
53
54 if (codegendescription)
55 seq_printf(m, "machine\t\t: %s\n", codegendescription);
56 else
57 seq_printf(m, "machine\t\t: Efika\n");
58
59 if (revision)
60 seq_printf(m, "revision\t: %s\n", revision);
61
62 if (codegenvendor)
63 seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
64
65 of_node_put(root);
66}
67
68static void __init efika_setup_arch(void)
69{
70 rtas_initialize();
71
72#ifdef CONFIG_BLK_DEV_INITRD
73 initrd_below_start_ok = 1;
74
75 if (initrd_start)
76 ROOT_DEV = Root_RAM0;
77 else
78#endif
79 ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
80
81 efika_pcisetup();
82
83 if (ppc_md.progress)
84 ppc_md.progress("Linux/PPC " UTS_RELEASE " runnung on Efika ;-)\n", 0x0);
85}
86
87static void __init efika_init(void)
88{
89 struct device_node *np;
90 struct device_node *cnp = NULL;
91 const u32 *base;
92
93 /* Find every child of the SOC node and add it to of_platform */
94 np = of_find_node_by_name(NULL, "builtin");
95 if (np) {
96 char name[BUS_ID_SIZE];
97 while ((cnp = of_get_next_child(np, cnp))) {
98 strcpy(name, cnp->name);
99
100 base = get_property(cnp, "reg", NULL);
101 if (base == NULL)
102 continue;
103
104 snprintf(name+strlen(name), BUS_ID_SIZE, "@%x", *base);
105 of_platform_device_create(cnp, name, NULL);
106
107 printk(KERN_INFO EFIKA_PLATFORM_NAME" : Added %s (type '%s' at '%s') to the known devices\n", name, cnp->type, cnp->full_name);
108 }
109 }
110
111 if (ppc_md.progress)
112 ppc_md.progress(" Have fun with your Efika! ", 0x7777);
113}
114
115static int __init efika_probe(void)
116{
117 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
118 "model", NULL);
119
120 if (model == NULL)
121 return 0;
122 if (strcmp(model, "EFIKA5K2"))
123 return 0;
124
125 ISA_DMA_THRESHOLD = ~0L;
126 DMA_MODE_READ = 0x44;
127 DMA_MODE_WRITE = 0x48;
128
129 return 1;
130}
131
132define_machine(efika)
133{
134 .name = EFIKA_PLATFORM_NAME,
135 .probe = efika_probe,
136 .setup_arch = efika_setup_arch,
137 .init = efika_init,
138 .show_cpuinfo = efika_show_cpuinfo,
139 .init_IRQ = mpc52xx_init_irq,
140 .get_irq = mpc52xx_get_irq,
141 .restart = rtas_restart,
142 .power_off = rtas_power_off,
143 .halt = rtas_halt,
144 .set_rtc_time = rtas_set_rtc_time,
145 .get_rtc_time = rtas_get_rtc_time,
146 .progress = rtas_progress,
147 .get_boot_time = rtas_get_boot_time,
148 .calibrate_decr = generic_calibrate_decr,
149 .phys_mem_access_prot = pci_phys_mem_access_prot,
150};
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
new file mode 100644
index 000000000000..8de034116681
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -0,0 +1,243 @@
1/*
2 * Efika 5K2 platform code
3 * Some code really inspired from the lite5200b platform.
4 *
5 * Copyright (C) 2006 bplan GmbH
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#include <linux/errno.h>
13#include <linux/kernel.h>
14#include <linux/slab.h>
15#include <linux/reboot.h>
16#include <linux/init.h>
17#include <linux/utsrelease.h>
18#include <linux/seq_file.h>
19#include <linux/string.h>
20#include <linux/root_dev.h>
21#include <linux/initrd.h>
22#include <linux/timer.h>
23#include <linux/pci.h>
24
25#include <asm/io.h>
26#include <asm/irq.h>
27#include <asm/sections.h>
28#include <asm/pci-bridge.h>
29#include <asm/pgtable.h>
30#include <asm/prom.h>
31#include <asm/time.h>
32#include <asm/machdep.h>
33#include <asm/rtas.h>
34#include <asm/of_device.h>
35#include <asm/of_platform.h>
36#include <asm/mpc52xx.h>
37
38
39#define EFIKA_PLATFORM_NAME "Efika"
40
41
42/* ------------------------------------------------------------------------ */
43/* PCI accesses thru RTAS */
44/* ------------------------------------------------------------------------ */
45
46#ifdef CONFIG_PCI
47
48/*
49 * Access functions for PCI config space using RTAS calls.
50 */
51static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
52 int len, u32 * val)
53{
54 struct pci_controller *hose = bus->sysdata;
55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
56 | (((bus->number - hose->first_busno) & 0xff) << 16)
57 | (hose->index << 24);
58 int ret = -1;
59 int rval;
60
61 rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
62 *val = ret;
63 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
64}
65
66static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
67 int offset, int len, u32 val)
68{
69 struct pci_controller *hose = bus->sysdata;
70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
71 | (((bus->number - hose->first_busno) & 0xff) << 16)
72 | (hose->index << 24);
73 int rval;
74
75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
76 addr, len, val);
77 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
78}
79
80static struct pci_ops rtas_pci_ops = {
81 rtas_read_config,
82 rtas_write_config
83};
84
85
86void __init efika_pcisetup(void)
87{
88 const int *bus_range;
89 int len;
90 struct pci_controller *hose;
91 struct device_node *root;
92 struct device_node *pcictrl;
93
94 root = of_find_node_by_path("/");
95 if (root == NULL) {
96 printk(KERN_WARNING EFIKA_PLATFORM_NAME
97 ": Unable to find the root node\n");
98 return;
99 }
100
101 for (pcictrl = NULL;;) {
102 pcictrl = of_get_next_child(root, pcictrl);
103 if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
104 break;
105 }
106
107 of_node_put(root);
108
109 if (pcictrl == NULL) {
110 printk(KERN_WARNING EFIKA_PLATFORM_NAME
111 ": Unable to find the PCI bridge node\n");
112 return;
113 }
114
115 bus_range = get_property(pcictrl, "bus-range", &len);
116 if (bus_range == NULL || len < 2 * sizeof(int)) {
117 printk(KERN_WARNING EFIKA_PLATFORM_NAME
118 ": Can't get bus-range for %s\n", pcictrl->full_name);
119 return;
120 }
121
122 if (bus_range[1] == bus_range[0])
123 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
124 bus_range[0]);
125 else
126 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
127 bus_range[0], bus_range[1]);
128 printk(" controlled by %s\n", pcictrl->full_name);
129 printk("\n");
130
131 hose = pcibios_alloc_controller();
132 if (!hose) {
133 printk(KERN_WARNING EFIKA_PLATFORM_NAME
134 ": Can't allocate PCI controller structure for %s\n",
135 pcictrl->full_name);
136 return;
137 }
138
139 hose->arch_data = of_node_get(pcictrl);
140 hose->first_busno = bus_range[0];
141 hose->last_busno = bus_range[1];
142 hose->ops = &rtas_pci_ops;
143
144 pci_process_bridge_OF_ranges(hose, pcictrl, 0);
145}
146
147#else
148void __init efika_pcisetup(void)
149{}
150#endif
151
152
153
154/* ------------------------------------------------------------------------ */
155/* Platform setup */
156/* ------------------------------------------------------------------------ */
157
158static void efika_show_cpuinfo(struct seq_file *m)
159{
160 struct device_node *root;
161 const char *revision = NULL;
162 const char *codegendescription = NULL;
163 const char *codegenvendor = NULL;
164
165 root = of_find_node_by_path("/");
166 if (!root)
167 return;
168
169 revision = get_property(root, "revision", NULL);
170 codegendescription =
171 get_property(root, "CODEGEN,description", NULL);
172 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
173
174 if (codegendescription)
175 seq_printf(m, "machine\t\t: %s\n", codegendescription);
176 else
177 seq_printf(m, "machine\t\t: Efika\n");
178
179 if (revision)
180 seq_printf(m, "revision\t: %s\n", revision);
181
182 if (codegenvendor)
183 seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
184
185 of_node_put(root);
186}
187
188static void __init efika_setup_arch(void)
189{
190 rtas_initialize();
191
192#ifdef CONFIG_BLK_DEV_INITRD
193 initrd_below_start_ok = 1;
194
195 if (initrd_start)
196 ROOT_DEV = Root_RAM0;
197 else
198#endif
199 ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
200
201 efika_pcisetup();
202
203 if (ppc_md.progress)
204 ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
205}
206
207static int __init efika_probe(void)
208{
209 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
210 "model", NULL);
211
212 if (model == NULL)
213 return 0;
214 if (strcmp(model, "EFIKA5K2"))
215 return 0;
216
217 ISA_DMA_THRESHOLD = ~0L;
218 DMA_MODE_READ = 0x44;
219 DMA_MODE_WRITE = 0x48;
220
221 return 1;
222}
223
224define_machine(efika)
225{
226 .name = EFIKA_PLATFORM_NAME,
227 .probe = efika_probe,
228 .setup_arch = efika_setup_arch,
229 .init = mpc52xx_declare_of_platform_devices,
230 .show_cpuinfo = efika_show_cpuinfo,
231 .init_IRQ = mpc52xx_init_irq,
232 .get_irq = mpc52xx_get_irq,
233 .restart = rtas_restart,
234 .power_off = rtas_power_off,
235 .halt = rtas_halt,
236 .set_rtc_time = rtas_set_rtc_time,
237 .get_rtc_time = rtas_get_rtc_time,
238 .progress = rtas_progress,
239 .get_boot_time = rtas_get_boot_time,
240 .calibrate_decr = generic_calibrate_decr,
241 .phys_mem_access_prot = pci_phys_mem_access_prot,
242};
243
diff --git a/arch/powerpc/platforms/52xx/efika.h b/arch/powerpc/platforms/52xx/efika.h
deleted file mode 100644
index 2f060fd097d7..000000000000
--- a/arch/powerpc/platforms/52xx/efika.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * Efika 5K2 platform setup - Header file
3 *
4 * Copyright (C) 2006 bplan GmbH
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 *
10 */
11
12#ifndef __ARCH_POWERPC_EFIKA__
13#define __ARCH_POWERPC_EFIKA__
14
15#define EFIKA_PLATFORM_NAME "Efika"
16
17extern void __init efika_pcisetup(void);
18
19#endif
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 0f21bab33f6c..cc3b40de21dd 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -51,13 +51,13 @@
51 */ 51 */
52 52
53static void __init 53static void __init
54lite52xx_setup_cpu(void) 54lite5200_setup_cpu(void)
55{ 55{
56 struct mpc52xx_gpio __iomem *gpio; 56 struct mpc52xx_gpio __iomem *gpio;
57 u32 port_config; 57 u32 port_config;
58 58
59 /* Map zones */ 59 /* Map zones */
60 gpio = mpc52xx_find_and_map("mpc52xx-gpio"); 60 gpio = mpc52xx_find_and_map("mpc5200-gpio");
61 if (!gpio) { 61 if (!gpio) {
62 printk(KERN_ERR __FILE__ ": " 62 printk(KERN_ERR __FILE__ ": "
63 "Error while mapping GPIO register for port config. " 63 "Error while mapping GPIO register for port config. "
@@ -85,12 +85,12 @@ error:
85 iounmap(gpio); 85 iounmap(gpio);
86} 86}
87 87
88static void __init lite52xx_setup_arch(void) 88static void __init lite5200_setup_arch(void)
89{ 89{
90 struct device_node *np; 90 struct device_node *np;
91 91
92 if (ppc_md.progress) 92 if (ppc_md.progress)
93 ppc_md.progress("lite52xx_setup_arch()", 0); 93 ppc_md.progress("lite5200_setup_arch()", 0);
94 94
95 np = of_find_node_by_type(NULL, "cpu"); 95 np = of_find_node_by_type(NULL, "cpu");
96 if (np) { 96 if (np) {
@@ -105,7 +105,13 @@ static void __init lite52xx_setup_arch(void)
105 105
106 /* CPU & Port mux setup */ 106 /* CPU & Port mux setup */
107 mpc52xx_setup_cpu(); /* Generic */ 107 mpc52xx_setup_cpu(); /* Generic */
108 lite52xx_setup_cpu(); /* Platorm specific */ 108 lite5200_setup_cpu(); /* Platorm specific */
109
110#ifdef CONFIG_PCI
111 np = of_find_node_by_type(np, "pci");
112 if (np)
113 mpc52xx_add_bridge(np);
114#endif
109 115
110#ifdef CONFIG_BLK_DEV_INITRD 116#ifdef CONFIG_BLK_DEV_INITRD
111 if (initrd_start) 117 if (initrd_start)
@@ -120,7 +126,7 @@ static void __init lite52xx_setup_arch(void)
120 126
121} 127}
122 128
123void lite52xx_show_cpuinfo(struct seq_file *m) 129void lite5200_show_cpuinfo(struct seq_file *m)
124{ 130{
125 struct device_node* np = of_find_all_nodes(NULL); 131 struct device_node* np = of_find_all_nodes(NULL);
126 const char *model = NULL; 132 const char *model = NULL;
@@ -137,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m)
137/* 143/*
138 * Called very early, MMU is off, device-tree isn't unflattened 144 * Called very early, MMU is off, device-tree isn't unflattened
139 */ 145 */
140static int __init lite52xx_probe(void) 146static int __init lite5200_probe(void)
141{ 147{
142 unsigned long node = of_get_flat_dt_root(); 148 unsigned long node = of_get_flat_dt_root();
143 const char *model = of_get_flat_dt_prop(node, "model", NULL); 149 const char *model = of_get_flat_dt_prop(node, "model", NULL);
144 150
145 if (!of_flat_dt_is_compatible(node, "lite52xx")) 151 if (!of_flat_dt_is_compatible(node, "fsl,lite5200") &&
152 !of_flat_dt_is_compatible(node, "fsl,lite5200b"))
146 return 0; 153 return 0;
147 pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown"); 154 pr_debug("%s board found\n", model ? model : "unknown");
148 155
149 return 1; 156 return 1;
150} 157}
151 158
152define_machine(lite52xx) { 159define_machine(lite5200) {
153 .name = "lite52xx", 160 .name = "lite5200",
154 .probe = lite52xx_probe, 161 .probe = lite5200_probe,
155 .setup_arch = lite52xx_setup_arch, 162 .setup_arch = lite5200_setup_arch,
156 .init = mpc52xx_declare_of_platform_devices, 163 .init = mpc52xx_declare_of_platform_devices,
157 .init_IRQ = mpc52xx_init_irq, 164 .init_IRQ = mpc52xx_init_irq,
158 .get_irq = mpc52xx_get_irq, 165 .get_irq = mpc52xx_get_irq,
159 .show_cpuinfo = lite52xx_show_cpuinfo, 166 .show_cpuinfo = lite5200_show_cpuinfo,
160 .calibrate_decr = generic_calibrate_decr, 167 .calibrate_decr = generic_calibrate_decr,
161}; 168};
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index cc40889074bd..ed0cb694aea8 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void)
83 struct mpc52xx_xlb __iomem *xlb; 83 struct mpc52xx_xlb __iomem *xlb;
84 84
85 /* Map zones */ 85 /* Map zones */
86 cdm = mpc52xx_find_and_map("mpc52xx-cdm"); 86 cdm = mpc52xx_find_and_map("mpc5200-cdm");
87 xlb = mpc52xx_find_and_map("mpc52xx-xlb"); 87 xlb = mpc52xx_find_and_map("mpc5200-xlb");
88 88
89 if (!cdm || !xlb) { 89 if (!cdm || !xlb) {
90 printk(KERN_ERR __FILE__ ": " 90 printk(KERN_ERR __FILE__ ": "
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
new file mode 100644
index 000000000000..faf161bdbc1c
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -0,0 +1,412 @@
1/*
2 * PCI code for the Freescale MPC52xx embedded CPU.
3 *
4 * Copyright (C) 2006 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca>
6 * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com>
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 */
12
13#undef DEBUG
14
15#include <asm/pci.h>
16#include <asm/mpc52xx.h>
17#include <asm/delay.h>
18#include <asm/machdep.h>
19#include <linux/kernel.h>
20
21
22/* ======================================================================== */
23/* PCI windows config */
24/* ======================================================================== */
25
26#define MPC52xx_PCI_TARGET_IO 0xf0000000
27#define MPC52xx_PCI_TARGET_MEM 0x00000000
28
29
30/* ======================================================================== */
31/* Structures mapping & Defines for PCI Unit */
32/* ======================================================================== */
33
34#define MPC52xx_PCI_GSCR_BM 0x40000000
35#define MPC52xx_PCI_GSCR_PE 0x20000000
36#define MPC52xx_PCI_GSCR_SE 0x10000000
37#define MPC52xx_PCI_GSCR_XLB2PCI_MASK 0x07000000
38#define MPC52xx_PCI_GSCR_XLB2PCI_SHIFT 24
39#define MPC52xx_PCI_GSCR_IPG2PCI_MASK 0x00070000
40#define MPC52xx_PCI_GSCR_IPG2PCI_SHIFT 16
41#define MPC52xx_PCI_GSCR_BME 0x00004000
42#define MPC52xx_PCI_GSCR_PEE 0x00002000
43#define MPC52xx_PCI_GSCR_SEE 0x00001000
44#define MPC52xx_PCI_GSCR_PR 0x00000001
45
46
47#define MPC52xx_PCI_IWBTAR_TRANSLATION(proc_ad,pci_ad,size) \
48 ( ( (proc_ad) & 0xff000000 ) | \
49 ( (((size) - 1) >> 8) & 0x00ff0000 ) | \
50 ( ((pci_ad) >> 16) & 0x0000ff00 ) )
51
52#define MPC52xx_PCI_IWCR_PACK(win0,win1,win2) (((win0) << 24) | \
53 ((win1) << 16) | \
54 ((win2) << 8))
55
56#define MPC52xx_PCI_IWCR_DISABLE 0x0
57#define MPC52xx_PCI_IWCR_ENABLE 0x1
58#define MPC52xx_PCI_IWCR_READ 0x0
59#define MPC52xx_PCI_IWCR_READ_LINE 0x2
60#define MPC52xx_PCI_IWCR_READ_MULTI 0x4
61#define MPC52xx_PCI_IWCR_MEM 0x0
62#define MPC52xx_PCI_IWCR_IO 0x8
63
64#define MPC52xx_PCI_TCR_P 0x01000000
65#define MPC52xx_PCI_TCR_LD 0x00010000
66
67#define MPC52xx_PCI_TBATR_DISABLE 0x0
68#define MPC52xx_PCI_TBATR_ENABLE 0x1
69
70struct mpc52xx_pci {
71 u32 idr; /* PCI + 0x00 */
72 u32 scr; /* PCI + 0x04 */
73 u32 ccrir; /* PCI + 0x08 */
74 u32 cr1; /* PCI + 0x0C */
75 u32 bar0; /* PCI + 0x10 */
76 u32 bar1; /* PCI + 0x14 */
77 u8 reserved1[16]; /* PCI + 0x18 */
78 u32 ccpr; /* PCI + 0x28 */
79 u32 sid; /* PCI + 0x2C */
80 u32 erbar; /* PCI + 0x30 */
81 u32 cpr; /* PCI + 0x34 */
82 u8 reserved2[4]; /* PCI + 0x38 */
83 u32 cr2; /* PCI + 0x3C */
84 u8 reserved3[32]; /* PCI + 0x40 */
85 u32 gscr; /* PCI + 0x60 */
86 u32 tbatr0; /* PCI + 0x64 */
87 u32 tbatr1; /* PCI + 0x68 */
88 u32 tcr; /* PCI + 0x6C */
89 u32 iw0btar; /* PCI + 0x70 */
90 u32 iw1btar; /* PCI + 0x74 */
91 u32 iw2btar; /* PCI + 0x78 */
92 u8 reserved4[4]; /* PCI + 0x7C */
93 u32 iwcr; /* PCI + 0x80 */
94 u32 icr; /* PCI + 0x84 */
95 u32 isr; /* PCI + 0x88 */
96 u32 arb; /* PCI + 0x8C */
97 u8 reserved5[104]; /* PCI + 0x90 */
98 u32 car; /* PCI + 0xF8 */
99 u8 reserved6[4]; /* PCI + 0xFC */
100};
101
102
103/* ======================================================================== */
104/* PCI configuration acess */
105/* ======================================================================== */
106
107static int
108mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
109 int offset, int len, u32 *val)
110{
111 struct pci_controller *hose = bus->sysdata;
112 u32 value;
113
114 if (ppc_md.pci_exclude_device)
115 if (ppc_md.pci_exclude_device(bus->number, devfn))
116 return PCIBIOS_DEVICE_NOT_FOUND;
117
118 out_be32(hose->cfg_addr,
119 (1 << 31) |
120 ((bus->number - hose->bus_offset) << 16) |
121 (devfn << 8) |
122 (offset & 0xfc));
123 mb();
124
125#if defined(CONFIG_PPC_MPC5200_BUGFIX)
126 if (bus->number != hose->bus_offset) {
127 /* workaround for the bug 435 of the MPC5200 (L25R);
128 * Don't do 32 bits config access during type-1 cycles */
129 switch (len) {
130 case 1:
131 value = in_8(((u8 __iomem *)hose->cfg_data) +
132 (offset & 3));
133 break;
134 case 2:
135 value = in_le16(((u16 __iomem *)hose->cfg_data) +
136 ((offset>>1) & 1));
137 break;
138
139 default:
140 value = in_le16((u16 __iomem *)hose->cfg_data) |
141 (in_le16(((u16 __iomem *)hose->cfg_data) + 1) << 16);
142 break;
143 }
144 }
145 else
146#endif
147 {
148 value = in_le32(hose->cfg_data);
149
150 if (len != 4) {
151 value >>= ((offset & 0x3) << 3);
152 value &= 0xffffffff >> (32 - (len << 3));
153 }
154 }
155
156 *val = value;
157
158 out_be32(hose->cfg_addr, 0);
159 mb();
160
161 return PCIBIOS_SUCCESSFUL;
162}
163
164static int
165mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
166 int offset, int len, u32 val)
167{
168 struct pci_controller *hose = bus->sysdata;
169 u32 value, mask;
170
171 if (ppc_md.pci_exclude_device)
172 if (ppc_md.pci_exclude_device(bus->number, devfn))
173 return PCIBIOS_DEVICE_NOT_FOUND;
174
175 out_be32(hose->cfg_addr,
176 (1 << 31) |
177 ((bus->number - hose->bus_offset) << 16) |
178 (devfn << 8) |
179 (offset & 0xfc));
180 mb();
181
182#if defined(CONFIG_PPC_MPC5200_BUGFIX)
183 if (bus->number != hose->bus_offset) {
184 /* workaround for the bug 435 of the MPC5200 (L25R);
185 * Don't do 32 bits config access during type-1 cycles */
186 switch (len) {
187 case 1:
188 out_8(((u8 __iomem *)hose->cfg_data) +
189 (offset & 3), val);
190 break;
191 case 2:
192 out_le16(((u16 __iomem *)hose->cfg_data) +
193 ((offset>>1) & 1), val);
194 break;
195
196 default:
197 out_le16((u16 __iomem *)hose->cfg_data,
198 (u16)val);
199 out_le16(((u16 __iomem *)hose->cfg_data) + 1,
200 (u16)(val>>16));
201 break;
202 }
203 }
204 else
205#endif
206 {
207 if (len != 4) {
208 value = in_le32(hose->cfg_data);
209
210 offset = (offset & 0x3) << 3;
211 mask = (0xffffffff >> (32 - (len << 3)));
212 mask <<= offset;
213
214 value &= ~mask;
215 val = value | ((val << offset) & mask);
216 }
217
218 out_le32(hose->cfg_data, val);
219 }
220 mb();
221
222 out_be32(hose->cfg_addr, 0);
223 mb();
224
225 return PCIBIOS_SUCCESSFUL;
226}
227
228static struct pci_ops mpc52xx_pci_ops = {
229 .read = mpc52xx_pci_read_config,
230 .write = mpc52xx_pci_write_config
231};
232
233
234/* ======================================================================== */
235/* PCI setup */
236/* ======================================================================== */
237
238static void __init
239mpc52xx_pci_setup(struct pci_controller *hose,
240 struct mpc52xx_pci __iomem *pci_regs)
241{
242 struct resource *res;
243 u32 tmp;
244 int iwcr0 = 0, iwcr1 = 0, iwcr2 = 0;
245
246 pr_debug("mpc52xx_pci_setup(hose=%p, pci_regs=%p)\n", hose, pci_regs);
247
248 /* pci_process_bridge_OF_ranges() found all our addresses for us;
249 * now store them in the right places */
250 hose->cfg_addr = &pci_regs->car;
251 hose->cfg_data = hose->io_base_virt;
252
253 /* Control regs */
254 tmp = in_be32(&pci_regs->scr);
255 tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
256 out_be32(&pci_regs->scr, tmp);
257
258 /* Memory windows */
259 res = &hose->mem_resources[0];
260 if (res->flags) {
261 pr_debug("mem_resource[0] = {.start=%x, .end=%x, .flags=%lx}\n",
262 res->start, res->end, res->flags);
263 out_be32(&pci_regs->iw0btar,
264 MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
265 res->end - res->start + 1));
266 iwcr0 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
267 if (res->flags & IORESOURCE_PREFETCH)
268 iwcr0 |= MPC52xx_PCI_IWCR_READ_MULTI;
269 else
270 iwcr0 |= MPC52xx_PCI_IWCR_READ;
271 }
272
273 res = &hose->mem_resources[1];
274 if (res->flags) {
275 pr_debug("mem_resource[1] = {.start=%x, .end=%x, .flags=%lx}\n",
276 res->start, res->end, res->flags);
277 out_be32(&pci_regs->iw1btar,
278 MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
279 res->end - res->start + 1));
280 iwcr1 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
281 if (res->flags & IORESOURCE_PREFETCH)
282 iwcr1 |= MPC52xx_PCI_IWCR_READ_MULTI;
283 else
284 iwcr1 |= MPC52xx_PCI_IWCR_READ;
285 }
286
287 /* IO resources */
288 res = &hose->io_resource;
289 if (!res) {
290 printk(KERN_ERR "%s: Didn't find IO resources\n", __FILE__);
291 return;
292 }
293 pr_debug(".io_resource={.start=%x,.end=%x,.flags=%lx} "
294 ".io_base_phys=0x%p\n",
295 res->start, res->end, res->flags, (void*)hose->io_base_phys);
296 out_be32(&pci_regs->iw2btar,
297 MPC52xx_PCI_IWBTAR_TRANSLATION(hose->io_base_phys,
298 res->start,
299 res->end - res->start + 1));
300 iwcr2 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_IO;
301
302 /* Set all the IWCR fields at once; they're in the same reg */
303 out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2));
304
305 out_be32(&pci_regs->tbatr0,
306 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO );
307 out_be32(&pci_regs->tbatr1,
308 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM );
309
310 out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD);
311
312 tmp = in_be32(&pci_regs->gscr);
313#if 0
314 /* Reset the exteral bus ( internal PCI controller is NOT resetted ) */
315 /* Not necessary and can be a bad thing if for example the bootloader
316 is displaying a splash screen or ... Just left here for
317 documentation purpose if anyone need it */
318 out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
319 udelay(50);
320#endif
321
322 /* Make sure the PCI bridge is out of reset */
323 out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
324}
325
326static void
327mpc52xx_pci_fixup_resources(struct pci_dev *dev)
328{
329 int i;
330
331 pr_debug("mpc52xx_pci_fixup_resources() %.4x:%.4x\n",
332 dev->vendor, dev->device);
333
334 /* We don't rely on boot loader for PCI and resets all
335 devices */
336 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
337 struct resource *res = &dev->resource[i];
338 if (res->end > res->start) { /* Only valid resources */
339 res->end -= res->start;
340 res->start = 0;
341 res->flags |= IORESOURCE_UNSET;
342 }
343 }
344
345 /* The PCI Host bridge of MPC52xx has a prefetch memory resource
346 fixed to 1Gb. Doesn't fit in the resource system so we remove it */
347 if ( (dev->vendor == PCI_VENDOR_ID_MOTOROLA) &&
348 ( dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200
349 || dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200B) ) {
350 struct resource *res = &dev->resource[1];
351 res->start = res->end = res->flags = 0;
352 }
353}
354
355int __init
356mpc52xx_add_bridge(struct device_node *node)
357{
358 int len;
359 struct mpc52xx_pci __iomem *pci_regs;
360 struct pci_controller *hose;
361 const int *bus_range;
362 struct resource rsrc;
363
364 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
365
366 pci_assign_all_buses = 1;
367
368 if (of_address_to_resource(node, 0, &rsrc) != 0) {
369 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
370 return -EINVAL;
371 }
372
373 bus_range = get_property(node, "bus-range", &len);
374 if (bus_range == NULL || len < 2 * sizeof(int)) {
375 printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n",
376 node->full_name);
377 bus_range = NULL;
378 }
379
380 /* There are some PCI quirks on the 52xx, register the hook to
381 * fix them. */
382 ppc_md.pcibios_fixup_resources = mpc52xx_pci_fixup_resources;
383
384 /* Alloc and initialize the pci controller. Values in the device
385 * tree are needed to configure the 52xx PCI controller. Rather
386 * than parse the tree here, let pci_process_bridge_OF_ranges()
387 * do it for us and extract the values after the fact */
388 hose = pcibios_alloc_controller();
389 if (!hose)
390 return -ENOMEM;
391
392 hose->arch_data = node;
393 hose->set_cfg_type = 1;
394
395 hose->first_busno = bus_range ? bus_range[0] : 0;
396 hose->last_busno = bus_range ? bus_range[1] : 0xff;
397
398 hose->bus_offset = 0;
399 hose->ops = &mpc52xx_pci_ops;
400
401 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
402 if (!pci_regs)
403 return -ENOMEM;
404
405 pci_process_bridge_OF_ranges(hose, node, 1);
406
407 /* Finish setting up PCI using values obtained by
408 * pci_proces_bridge_OF_ranges */
409 mpc52xx_pci_setup(hose, pci_regs);
410
411 return 0;
412}
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index cd91a6c3aafa..c75192567e55 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void)
383 struct device_node *picnode; 383 struct device_node *picnode;
384 384
385 /* Remap the necessary zones */ 385 /* Remap the necessary zones */
386 picnode = of_find_compatible_node(NULL, NULL, "mpc52xx-pic"); 386 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
387 387
388 intr = mpc52xx_find_and_map("mpc52xx-pic"); 388 intr = mpc52xx_find_and_map("mpc5200-pic");
389 if (!intr) 389 if (!intr)
390 panic(__FILE__ ": find_and_map failed on 'mpc52xx-pic'. " 390 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
391 "Check node !"); 391 "Check node !");
392 392
393 sdma = mpc52xx_find_and_map("mpc52xx-bestcomm"); 393 sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
394 if (!sdma) 394 if (!sdma)
395 panic(__FILE__ ": find_and_map failed on 'mpc52xx-bestcomm'. " 395 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
396 "Check node !"); 396 "Check node !");
397 397
398 /* Disable all interrupt sources. */ 398 /* Disable all interrupt sources. */
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c
index 0f5b30dc60da..74e7892cdfcf 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx.c
@@ -50,7 +50,7 @@
50#include <sysdev/fsl_soc.h> 50#include <sysdev/fsl_soc.h>
51#include <sysdev/cpm2_pic.h> 51#include <sysdev/cpm2_pic.h>
52 52
53#include "pq2ads_pd.h" 53#include "pq2ads.h"
54 54
55static int __init get_freq(char *name, unsigned long *val) 55static int __init get_freq(char *name, unsigned long *val)
56{ 56{
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index ea880f1f0dcd..7334c1a15b90 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -51,7 +51,7 @@
51#include <sysdev/fsl_soc.h> 51#include <sysdev/fsl_soc.h>
52#include <../sysdev/cpm2_pic.h> 52#include <../sysdev/cpm2_pic.h>
53 53
54#include "pq2ads_pd.h" 54#include "pq2ads.h"
55 55
56#ifdef CONFIG_PCI 56#ifdef CONFIG_PCI
57static uint pci_clk_frq; 57static uint pci_clk_frq;
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h
index fb2f92bcd770..5b5cca6c8c88 100644
--- a/arch/powerpc/platforms/82xx/pq2ads.h
+++ b/arch/powerpc/platforms/82xx/pq2ads.h
@@ -22,6 +22,7 @@
22#ifndef __MACH_ADS8260_DEFS 22#ifndef __MACH_ADS8260_DEFS
23#define __MACH_ADS8260_DEFS 23#define __MACH_ADS8260_DEFS
24 24
25#include <linux/seq_file.h>
25#include <asm/ppcboot.h> 26#include <asm/ppcboot.h>
26 27
27/* For our show_cpuinfo hooks. */ 28/* For our show_cpuinfo hooks. */
@@ -46,12 +47,12 @@
46#define BCSR1_RS232_EN1 ((uint)0x02000000) /* 0 ==enable */ 47#define BCSR1_RS232_EN1 ((uint)0x02000000) /* 0 ==enable */
47#define BCSR1_RS232_EN2 ((uint)0x01000000) /* 0 ==enable */ 48#define BCSR1_RS232_EN2 ((uint)0x01000000) /* 0 ==enable */
48#define BCSR3_FETHIEN2 ((uint)0x10000000) /* 0 == enable*/ 49#define BCSR3_FETHIEN2 ((uint)0x10000000) /* 0 == enable*/
49#define BCSR3_FETH2_RS ((uint)0x80000000) /* 0 == reset */ 50#define BCSR3_FETH2_RST ((uint)0x80000000) /* 0 == reset */
50 51
51/* cpm serial driver works with constants below */ 52/* cpm serial driver works with constants below */
52 53
53#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET) 54#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET)
54#define SIU_INT_SMC2i ((uint)0x05+CPM_IRQ_OFFSET) 55#define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET)
55#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET) 56#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET)
56#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET) 57#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET)
57#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET) 58#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index edcd5b875b66..713b31a16ce9 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -3,7 +3,13 @@ menu "Platform support"
3 3
4choice 4choice
5 prompt "Machine Type" 5 prompt "Machine Type"
6 default MPC834x_SYS 6 default MPC834x_MDS
7
8config MPC8313_RDB
9 bool "Freescale MPC8313 RDB"
10 select DEFAULT_UIMAGE
11 help
12 This option enables support for the MPC8313 RDB board.
7 13
8config MPC832x_MDS 14config MPC832x_MDS
9 bool "Freescale MPC832x MDS" 15 bool "Freescale MPC832x MDS"
@@ -12,13 +18,13 @@ config MPC832x_MDS
12 help 18 help
13 This option enables support for the MPC832x MDS evaluation board. 19 This option enables support for the MPC832x MDS evaluation board.
14 20
15config MPC834x_SYS 21config MPC834x_MDS
16 bool "Freescale MPC834x SYS" 22 bool "Freescale MPC834x MDS"
17 select DEFAULT_UIMAGE 23 select DEFAULT_UIMAGE
18 help 24 help
19 This option enables support for the MPC 834x SYS evaluation board. 25 This option enables support for the MPC 834x MDS evaluation board.
20 26
21 Be aware that PCI buses can only function when SYS board is plugged 27 Be aware that PCI buses can only function when MDS board is plugged
22 into the PIB (Platform IO Board) board from Freescale which provide 28 into the PIB (Platform IO Board) board from Freescale which provide
23 3 PCI slots. The PIBs PCI initialization is the bootloader's 29 3 PCI slots. The PIBs PCI initialization is the bootloader's
24 responsibility. 30 responsibility.
@@ -32,15 +38,21 @@ config MPC834x_ITX
32 Be aware that PCI initialization is the bootloader's 38 Be aware that PCI initialization is the bootloader's
33 responsibility. 39 responsibility.
34 40
35config MPC8360E_PB 41config MPC836x_MDS
36 bool "Freescale MPC8360E PB" 42 bool "Freescale MPC836x MDS"
37 select DEFAULT_UIMAGE 43 select DEFAULT_UIMAGE
38 select QUICC_ENGINE 44 select QUICC_ENGINE
39 help 45 help
40 This option enables support for the MPC836x EMDS Processor Board. 46 This option enables support for the MPC836x MDS Processor Board.
41 47
42endchoice 48endchoice
43 49
50config PPC_MPC831x
51 bool
52 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI
54 default y if MPC8313_RDB
55
44config PPC_MPC832x 56config PPC_MPC832x
45 bool 57 bool
46 select PPC_UDBG_16550 58 select PPC_UDBG_16550
@@ -51,12 +63,12 @@ config MPC834x
51 bool 63 bool
52 select PPC_UDBG_16550 64 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI 65 select PPC_INDIRECT_PCI
54 default y if MPC834x_SYS || MPC834x_ITX 66 default y if MPC834x_MDS || MPC834x_ITX
55 67
56config PPC_MPC836x 68config PPC_MPC836x
57 bool 69 bool
58 select PPC_UDBG_16550 70 select PPC_UDBG_16550
59 select PPC_INDIRECT_PCI 71 select PPC_INDIRECT_PCI
60 default y if MPC8360E_PB 72 default y if MPC836x_MDS
61 73
62endmenu 74endmenu
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index f1aa7e24a938..dfc970d0df10 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -3,7 +3,8 @@
3# 3#
4obj-y := misc.o 4obj-y := misc.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o 6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
7obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o
7obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o 8obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
8obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o 9obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
9obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o 10obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index f0c6df61faa9..f01806c940e1 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -18,23 +18,36 @@
18 18
19#include "mpc83xx.h" 19#include "mpc83xx.h"
20 20
21static __be32 __iomem *restart_reg_base;
22
23static int __init mpc83xx_restart_init(void)
24{
25 /* map reset restart_reg_baseister space */
26 restart_reg_base = ioremap(get_immrbase() + 0x900, 0xff);
27
28 return 0;
29}
30
31arch_initcall(mpc83xx_restart_init);
32
21void mpc83xx_restart(char *cmd) 33void mpc83xx_restart(char *cmd)
22{ 34{
23#define RST_OFFSET 0x00000900 35#define RST_OFFSET 0x00000900
24#define RST_PROT_REG 0x00000018 36#define RST_PROT_REG 0x00000018
25#define RST_CTRL_REG 0x0000001c 37#define RST_CTRL_REG 0x0000001c
26 __be32 __iomem *reg;
27
28 /* map reset register space */
29 reg = ioremap(get_immrbase() + 0x900, 0xff);
30 38
31 local_irq_disable(); 39 local_irq_disable();
32 40
33 /* enable software reset "RSTE" */ 41 if (restart_reg_base) {
34 out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); 42 /* enable software reset "RSTE" */
43 out_be32(restart_reg_base + (RST_PROT_REG >> 2), 0x52535445);
44
45 /* set software hard reset */
46 out_be32(restart_reg_base + (RST_CTRL_REG >> 2), 0x2);
47 } else {
48 printk (KERN_EMERG "Error: Restart registers not mapped, spinning!\n");
49 }
35 50
36 /* set software hard reset */
37 out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
38 for (;;) ; 51 for (;;) ;
39} 52}
40 53
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
new file mode 100644
index 000000000000..32e9e9492841
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -0,0 +1,92 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc8313_rdb.c
3 *
4 * Description: MPC8313x RDB board specific routines.
5 * This file is based on mpc834x_sys.c
6 * Author: Lo Wlison <r43300@freescale.com>
7 *
8 * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
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/pci.h>
17
18#include <asm/time.h>
19#include <asm/ipic.h>
20#include <asm/udbg.h>
21
22#include "mpc83xx.h"
23
24#undef DEBUG
25#ifdef DEBUG
26#define DBG(fmt...) udbg_printf(fmt)
27#else
28#define DBG(fmt...)
29#endif
30
31#ifndef CONFIG_PCI
32unsigned long isa_io_base = 0;
33unsigned long isa_mem_base = 0;
34#endif
35
36/* ************************************************************************
37 *
38 * Setup the architecture
39 *
40 */
41static void __init mpc8313_rdb_setup_arch(void)
42{
43 struct device_node *np;
44
45 if (ppc_md.progress)
46 ppc_md.progress("mpc8313_rdb_setup_arch()", 0);
47
48#ifdef CONFIG_PCI
49 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
50 add_bridge(np);
51
52 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
53#endif
54}
55
56void __init mpc8313_rdb_init_IRQ(void)
57{
58 struct device_node *np;
59
60 np = of_find_node_by_type(NULL, "ipic");
61 if (!np)
62 return;
63
64 ipic_init(np, 0);
65
66 /* Initialize the default interrupt mapping priorities,
67 * in case the boot rom changed something on us.
68 */
69 ipic_set_default_priority();
70}
71
72/*
73 * Called very early, MMU is off, device-tree isn't unflattened
74 */
75static int __init mpc8313_rdb_probe(void)
76{
77 unsigned long root = of_get_flat_dt_root();
78
79 return of_flat_dt_is_compatible(root, "MPC8313ERDB");
80}
81
82define_machine(mpc8313_rdb) {
83 .name = "MPC8313 RDB",
84 .probe = mpc8313_rdb_probe,
85 .setup_arch = mpc8313_rdb_setup_arch,
86 .init_IRQ = mpc8313_rdb_init_IRQ,
87 .get_irq = ipic_get_irq,
88 .restart = mpc83xx_restart,
89 .time_init = mpc83xx_time_init,
90 .calibrate_decr = generic_calibrate_decr,
91 .progress = udbg_progress,
92};
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 4d471190be8d..17e3a3c6d8b4 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -25,6 +25,7 @@
25#include <linux/initrd.h> 25#include <linux/initrd.h>
26 26
27#include <asm/of_device.h> 27#include <asm/of_device.h>
28#include <asm/of_platform.h>
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/atomic.h> 30#include <asm/atomic.h>
30#include <asm/time.h> 31#include <asm/time.h>
@@ -56,11 +57,6 @@ unsigned long isa_mem_base = 0;
56 57
57static u8 *bcsr_regs = NULL; 58static u8 *bcsr_regs = NULL;
58 59
59u8 *get_bcsr(void)
60{
61 return bcsr_regs;
62}
63
64/* ************************************************************************ 60/* ************************************************************************
65 * 61 *
66 * Setup the architecture 62 * Setup the architecture
@@ -73,17 +69,6 @@ static void __init mpc832x_sys_setup_arch(void)
73 if (ppc_md.progress) 69 if (ppc_md.progress)
74 ppc_md.progress("mpc832x_sys_setup_arch()", 0); 70 ppc_md.progress("mpc832x_sys_setup_arch()", 0);
75 71
76 np = of_find_node_by_type(NULL, "cpu");
77 if (np != 0) {
78 unsigned int *fp =
79 (int *)get_property(np, "clock-frequency", NULL);
80 if (fp != 0)
81 loops_per_jiffy = *fp / HZ;
82 else
83 loops_per_jiffy = 50000000 / HZ;
84 of_node_put(np);
85 }
86
87 /* Map BCSR area */ 72 /* Map BCSR area */
88 np = of_find_node_by_name(NULL, "bcsr"); 73 np = of_find_node_by_name(NULL, "bcsr");
89 if (np != 0) { 74 if (np != 0) {
@@ -120,42 +105,30 @@ static void __init mpc832x_sys_setup_arch(void)
120 iounmap(bcsr_regs); 105 iounmap(bcsr_regs);
121 of_node_put(np); 106 of_node_put(np);
122 } 107 }
123
124#endif /* CONFIG_QUICC_ENGINE */ 108#endif /* CONFIG_QUICC_ENGINE */
125
126#ifdef CONFIG_BLK_DEV_INITRD
127 if (initrd_start)
128 ROOT_DEV = Root_RAM0;
129 else
130#endif
131#ifdef CONFIG_ROOT_NFS
132 ROOT_DEV = Root_NFS;
133#else
134 ROOT_DEV = Root_HDA1;
135#endif
136} 109}
137 110
111static struct of_device_id mpc832x_ids[] = {
112 { .type = "soc", },
113 { .compatible = "soc", },
114 { .type = "qe", },
115 {},
116};
117
138static int __init mpc832x_declare_of_platform_devices(void) 118static int __init mpc832x_declare_of_platform_devices(void)
139{ 119{
140 struct device_node *np; 120 if (!machine_is(mpc832x_mds))
141 121 return 0;
142 for (np = NULL; (np = of_find_compatible_node(np, "network",
143 "ucc_geth")) != NULL;) {
144 int ucc_num;
145 char bus_id[BUS_ID_SIZE];
146 122
147 ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; 123 /* Publish the QE devices */
148 snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); 124 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
149 of_platform_device_create(np, bus_id, NULL);
150 }
151 125
152 return 0; 126 return 0;
153} 127}
154device_initcall(mpc832x_declare_of_platform_devices); 128device_initcall(mpc832x_declare_of_platform_devices);
155 129
156void __init mpc832x_sys_init_IRQ(void) 130static void __init mpc832x_sys_init_IRQ(void)
157{ 131{
158
159 struct device_node *np; 132 struct device_node *np;
160 133
161 np = of_find_node_by_type(NULL, "ipic"); 134 np = of_find_node_by_type(NULL, "ipic");
@@ -188,6 +161,9 @@ static int __init mpc832x_rtc_hookup(void)
188{ 161{
189 struct timespec tv; 162 struct timespec tv;
190 163
164 if (!machine_is(mpc832x_mds))
165 return 0;
166
191 ppc_md.get_rtc_time = ds1374_get_rtc_time; 167 ppc_md.get_rtc_time = ds1374_get_rtc_time;
192 ppc_md.set_rtc_time = ds1374_set_rtc_time; 168 ppc_md.set_rtc_time = ds1374_set_rtc_time;
193 169
@@ -206,17 +182,9 @@ late_initcall(mpc832x_rtc_hookup);
206 */ 182 */
207static int __init mpc832x_sys_probe(void) 183static int __init mpc832x_sys_probe(void)
208{ 184{
209 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), 185 unsigned long root = of_get_flat_dt_root();
210 "model", NULL);
211
212 if (model == NULL)
213 return 0;
214 if (strcmp(model, "MPC8323EMDS"))
215 return 0;
216
217 DBG("%s found\n", model);
218 186
219 return 1; 187 return of_flat_dt_is_compatible(root, "MPC832xMDS");
220} 188}
221 189
222define_machine(mpc832x_mds) { 190define_machine(mpc832x_mds) {
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 314c42ac6048..3c009f6d4a4f 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -38,8 +38,6 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#include <platforms/83xx/mpc834x_sys.h>
42
43#ifndef CONFIG_PCI 41#ifndef CONFIG_PCI
44unsigned long isa_io_base = 0; 42unsigned long isa_io_base = 0;
45unsigned long isa_mem_base = 0; 43unsigned long isa_mem_base = 0;
@@ -57,31 +55,15 @@ static void __init mpc834x_itx_setup_arch(void)
57 if (ppc_md.progress) 55 if (ppc_md.progress)
58 ppc_md.progress("mpc834x_itx_setup_arch()", 0); 56 ppc_md.progress("mpc834x_itx_setup_arch()", 0);
59 57
60 np = of_find_node_by_type(NULL, "cpu");
61 if (np != 0) {
62 const unsigned int *fp =
63 get_property(np, "clock-frequency", NULL);
64 if (fp != 0)
65 loops_per_jiffy = *fp / HZ;
66 else
67 loops_per_jiffy = 50000000 / HZ;
68 of_node_put(np);
69 }
70#ifdef CONFIG_PCI 58#ifdef CONFIG_PCI
71 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 59 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
72 add_bridge(np); 60 add_bridge(np);
73 61
74 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 62 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
75#endif 63#endif
76
77#ifdef CONFIG_ROOT_NFS
78 ROOT_DEV = Root_NFS;
79#else
80 ROOT_DEV = Root_HDA1;
81#endif
82} 64}
83 65
84void __init mpc834x_itx_init_IRQ(void) 66static void __init mpc834x_itx_init_IRQ(void)
85{ 67{
86 struct device_node *np; 68 struct device_node *np;
87 69
@@ -102,10 +84,9 @@ void __init mpc834x_itx_init_IRQ(void)
102 */ 84 */
103static int __init mpc834x_itx_probe(void) 85static int __init mpc834x_itx_probe(void)
104{ 86{
105 /* We always match for now, eventually we should look at the flat 87 unsigned long root = of_get_flat_dt_root();
106 dev tree to ensure this is the board we are suppose to run on 88
107 */ 89 return of_flat_dt_is_compatible(root, "MPC834xMITX");
108 return 1;
109} 90}
110 91
111define_machine(mpc834x_itx) { 92define_machine(mpc834x_itx) {
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 80b735a414d9..e5d819166874 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/powerpc/platforms/83xx/mpc834x_sys.c 2 * arch/powerpc/platforms/83xx/mpc834x_mds.c
3 * 3 *
4 * MPC834x SYS board specific routines 4 * MPC834x MDS board specific routines
5 * 5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org> 6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 * 7 *
@@ -43,28 +43,88 @@ unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0; 43unsigned long isa_mem_base = 0;
44#endif 44#endif
45 45
46#define BCSR5_INT_USB 0x02
47/* Note: This is only for PB, not for PB+PIB
48 * On PB only port0 is connected using ULPI */
49static int mpc834x_usb_cfg(void)
50{
51 unsigned long sccr, sicrl;
52 void __iomem *immap;
53 void __iomem *bcsr_regs = NULL;
54 u8 bcsr5;
55 struct device_node *np = NULL;
56 int port0_is_dr = 0;
57
58 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL)
59 port0_is_dr = 1;
60 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){
61 if (port0_is_dr) {
62 printk(KERN_WARNING
63 "There is only one USB port on PB board! \n");
64 return -1;
65 } else if (!port0_is_dr)
66 /* No usb port enabled */
67 return -1;
68 }
69
70 immap = ioremap(get_immrbase(), 0x1000);
71 if (!immap)
72 return -1;
73
74 /* Configure clock */
75 sccr = in_be32(immap + MPC83XX_SCCR_OFFS);
76 if (port0_is_dr)
77 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
78 else
79 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
80 out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
81
82 /* Configure Pin */
83 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS);
84 /* set port0 only */
85 if (port0_is_dr)
86 sicrl |= MPC83XX_SICRL_USB0;
87 else
88 sicrl &= ~(MPC83XX_SICRL_USB0);
89 out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
90
91 iounmap(immap);
92
93 /* Map BCSR area */
94 np = of_find_node_by_name(NULL, "bcsr");
95 if (np != 0) {
96 struct resource res;
97
98 of_address_to_resource(np, 0, &res);
99 bcsr_regs = ioremap(res.start, res.end - res.start + 1);
100 of_node_put(np);
101 }
102 if (!bcsr_regs)
103 return -1;
104
105 /*
106 * if MDS board is plug into PIB board,
107 * force to use the PHY on MDS board
108 */
109 bcsr5 = in_8(bcsr_regs + 5);
110 if (!(bcsr5 & BCSR5_INT_USB))
111 out_8(bcsr_regs + 5, (bcsr5 | BCSR5_INT_USB));
112 iounmap(bcsr_regs);
113 return 0;
114}
115
46/* ************************************************************************ 116/* ************************************************************************
47 * 117 *
48 * Setup the architecture 118 * Setup the architecture
49 * 119 *
50 */ 120 */
51static void __init mpc834x_sys_setup_arch(void) 121static void __init mpc834x_mds_setup_arch(void)
52{ 122{
53 struct device_node *np; 123 struct device_node *np;
54 124
55 if (ppc_md.progress) 125 if (ppc_md.progress)
56 ppc_md.progress("mpc834x_sys_setup_arch()", 0); 126 ppc_md.progress("mpc834x_mds_setup_arch()", 0);
57 127
58 np = of_find_node_by_type(NULL, "cpu");
59 if (np != 0) {
60 const unsigned int *fp =
61 get_property(np, "clock-frequency", NULL);
62 if (fp != 0)
63 loops_per_jiffy = *fp / HZ;
64 else
65 loops_per_jiffy = 50000000 / HZ;
66 of_node_put(np);
67 }
68#ifdef CONFIG_PCI 128#ifdef CONFIG_PCI
69 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 129 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
70 add_bridge(np); 130 add_bridge(np);
@@ -72,14 +132,10 @@ static void __init mpc834x_sys_setup_arch(void)
72 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 132 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
73#endif 133#endif
74 134
75#ifdef CONFIG_ROOT_NFS 135 mpc834x_usb_cfg();
76 ROOT_DEV = Root_NFS;
77#else
78 ROOT_DEV = Root_HDA1;
79#endif
80} 136}
81 137
82void __init mpc834x_sys_init_IRQ(void) 138static void __init mpc834x_mds_init_IRQ(void)
83{ 139{
84 struct device_node *np; 140 struct device_node *np;
85 141
@@ -103,6 +159,9 @@ static int __init mpc834x_rtc_hookup(void)
103{ 159{
104 struct timespec tv; 160 struct timespec tv;
105 161
162 if (!machine_is(mpc834x_mds))
163 return 0;
164
106 ppc_md.get_rtc_time = ds1374_get_rtc_time; 165 ppc_md.get_rtc_time = ds1374_get_rtc_time;
107 ppc_md.set_rtc_time = ds1374_set_rtc_time; 166 ppc_md.set_rtc_time = ds1374_set_rtc_time;
108 167
@@ -119,19 +178,18 @@ late_initcall(mpc834x_rtc_hookup);
119/* 178/*
120 * Called very early, MMU is off, device-tree isn't unflattened 179 * Called very early, MMU is off, device-tree isn't unflattened
121 */ 180 */
122static int __init mpc834x_sys_probe(void) 181static int __init mpc834x_mds_probe(void)
123{ 182{
124 /* We always match for now, eventually we should look at the flat 183 unsigned long root = of_get_flat_dt_root();
125 dev tree to ensure this is the board we are suppose to run on 184
126 */ 185 return of_flat_dt_is_compatible(root, "MPC834xMDS");
127 return 1;
128} 186}
129 187
130define_machine(mpc834x_sys) { 188define_machine(mpc834x_mds) {
131 .name = "MPC834x SYS", 189 .name = "MPC834x MDS",
132 .probe = mpc834x_sys_probe, 190 .probe = mpc834x_mds_probe,
133 .setup_arch = mpc834x_sys_setup_arch, 191 .setup_arch = mpc834x_mds_setup_arch,
134 .init_IRQ = mpc834x_sys_init_IRQ, 192 .init_IRQ = mpc834x_mds_init_IRQ,
135 .get_irq = ipic_get_irq, 193 .get_irq = ipic_get_irq,
136 .restart = mpc83xx_restart, 194 .restart = mpc83xx_restart,
137 .time_init = mpc83xx_time_init, 195 .time_init = mpc83xx_time_init,
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h
deleted file mode 100644
index 7d5bbef084e7..000000000000
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc834x_sys.h
3 *
4 * MPC834X SYS common board definitions
5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifndef __MACH_MPC83XX_SYS_H__
16#define __MACH_MPC83XX_SYS_H__
17
18#define PIRQA MPC83xx_IRQ_EXT4
19#define PIRQB MPC83xx_IRQ_EXT5
20#define PIRQC MPC83xx_IRQ_EXT6
21#define PIRQD MPC83xx_IRQ_EXT7
22
23#endif /* __MACH_MPC83XX_SYS_H__ */
diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 53b92a904e8e..526ed090a446 100644
--- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -5,12 +5,12 @@
5 * Yin Olivia <Hong-hua.Yin@freescale.com> 5 * Yin Olivia <Hong-hua.Yin@freescale.com>
6 * 6 *
7 * Description: 7 * Description:
8 * MPC8360E MDS PB board specific routines. 8 * MPC8360E MDS board specific routines.
9 * 9 *
10 * Changelog: 10 * Changelog:
11 * Jun 21, 2006 Initial version 11 * Jun 21, 2006 Initial version
12 * 12 *
13 * This program is free software; you can redistribute it and/or modify it 13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the 14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your 15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. 16 * option) any later version.
@@ -31,6 +31,7 @@
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32 32
33#include <asm/of_device.h> 33#include <asm/of_device.h>
34#include <asm/of_platform.h>
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/atomic.h> 36#include <asm/atomic.h>
36#include <asm/time.h> 37#include <asm/time.h>
@@ -61,33 +62,17 @@ unsigned long isa_mem_base = 0;
61 62
62static u8 *bcsr_regs = NULL; 63static u8 *bcsr_regs = NULL;
63 64
64u8 *get_bcsr(void)
65{
66 return bcsr_regs;
67}
68
69/* ************************************************************************ 65/* ************************************************************************
70 * 66 *
71 * Setup the architecture 67 * Setup the architecture
72 * 68 *
73 */ 69 */
74static void __init mpc8360_sys_setup_arch(void) 70static void __init mpc836x_mds_setup_arch(void)
75{ 71{
76 struct device_node *np; 72 struct device_node *np;
77 73
78 if (ppc_md.progress) 74 if (ppc_md.progress)
79 ppc_md.progress("mpc8360_sys_setup_arch()", 0); 75 ppc_md.progress("mpc836x_mds_setup_arch()", 0);
80
81 np = of_find_node_by_type(NULL, "cpu");
82 if (np != 0) {
83 const unsigned int *fp =
84 get_property(np, "clock-frequency", NULL);
85 if (fp != 0)
86 loops_per_jiffy = *fp / HZ;
87 else
88 loops_per_jiffy = 50000000 / HZ;
89 of_node_put(np);
90 }
91 76
92 /* Map BCSR area */ 77 /* Map BCSR area */
93 np = of_find_node_by_name(NULL, "bcsr"); 78 np = of_find_node_by_name(NULL, "bcsr");
@@ -127,40 +112,29 @@ static void __init mpc8360_sys_setup_arch(void)
127 } 112 }
128 113
129#endif /* CONFIG_QUICC_ENGINE */ 114#endif /* CONFIG_QUICC_ENGINE */
130
131#ifdef CONFIG_BLK_DEV_INITRD
132 if (initrd_start)
133 ROOT_DEV = Root_RAM0;
134 else
135#endif
136#ifdef CONFIG_ROOT_NFS
137 ROOT_DEV = Root_NFS;
138#else
139 ROOT_DEV = Root_HDA1;
140#endif
141} 115}
142 116
143static int __init mpc8360_declare_of_platform_devices(void) 117static struct of_device_id mpc836x_ids[] = {
144{ 118 { .type = "soc", },
145 struct device_node *np; 119 { .compatible = "soc", },
120 { .type = "qe", },
121 {},
122};
146 123
147 for (np = NULL; (np = of_find_compatible_node(np, "network", 124static int __init mpc836x_declare_of_platform_devices(void)
148 "ucc_geth")) != NULL;) { 125{
149 int ucc_num; 126 if (!machine_is(mpc836x_mds))
150 char bus_id[BUS_ID_SIZE]; 127 return 0;
151 128
152 ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; 129 /* Publish the QE devices */
153 snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); 130 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
154 of_platform_device_create(np, bus_id, NULL);
155 }
156 131
157 return 0; 132 return 0;
158} 133}
159device_initcall(mpc8360_declare_of_platform_devices); 134device_initcall(mpc836x_declare_of_platform_devices);
160 135
161void __init mpc8360_sys_init_IRQ(void) 136static void __init mpc836x_mds_init_IRQ(void)
162{ 137{
163
164 struct device_node *np; 138 struct device_node *np;
165 139
166 np = of_find_node_by_type(NULL, "ipic"); 140 np = of_find_node_by_type(NULL, "ipic");
@@ -193,6 +167,9 @@ static int __init mpc8360_rtc_hookup(void)
193{ 167{
194 struct timespec tv; 168 struct timespec tv;
195 169
170 if (!machine_is(mpc836x_mds))
171 return 0;
172
196 ppc_md.get_rtc_time = ds1374_get_rtc_time; 173 ppc_md.get_rtc_time = ds1374_get_rtc_time;
197 ppc_md.set_rtc_time = ds1374_set_rtc_time; 174 ppc_md.set_rtc_time = ds1374_set_rtc_time;
198 175
@@ -209,28 +186,21 @@ late_initcall(mpc8360_rtc_hookup);
209/* 186/*
210 * Called very early, MMU is off, device-tree isn't unflattened 187 * Called very early, MMU is off, device-tree isn't unflattened
211 */ 188 */
212static int __init mpc8360_sys_probe(void) 189static int __init mpc836x_mds_probe(void)
213{ 190{
214 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), 191 unsigned long root = of_get_flat_dt_root();
215 "model", NULL);
216 if (model == NULL)
217 return 0;
218 if (strcmp(model, "MPC8360EPB"))
219 return 0;
220
221 DBG("MPC8360EMDS-PB found\n");
222 192
223 return 1; 193 return of_flat_dt_is_compatible(root, "MPC836xMDS");
224} 194}
225 195
226define_machine(mpc8360_sys) { 196define_machine(mpc836x_mds) {
227 .name = "MPC8360E PB", 197 .name = "MPC836x MDS",
228 .probe = mpc8360_sys_probe, 198 .probe = mpc836x_mds_probe,
229 .setup_arch = mpc8360_sys_setup_arch, 199 .setup_arch = mpc836x_mds_setup_arch,
230 .init_IRQ = mpc8360_sys_init_IRQ, 200 .init_IRQ = mpc836x_mds_init_IRQ,
231 .get_irq = ipic_get_irq, 201 .get_irq = ipic_get_irq,
232 .restart = mpc83xx_restart, 202 .restart = mpc83xx_restart,
233 .time_init = mpc83xx_time_init, 203 .time_init = mpc83xx_time_init,
234 .calibrate_decr = generic_calibrate_decr, 204 .calibrate_decr = generic_calibrate_decr,
235 .progress = udbg_progress, 205 .progress = udbg_progress,
236}; 206};
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 01cae106912b..9cd03b59c8f4 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -4,6 +4,24 @@
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6 6
7/* System Clock Control Register */
8#define MPC83XX_SCCR_OFFS 0xA08
9#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000
10#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000
11#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000
12#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
13#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
14#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
15
16/* system i/o configuration register low */
17#define MPC83XX_SICRL_OFFS 0x114
18#define MPC83XX_SICRL_USB0 0x40000000
19#define MPC83XX_SICRL_USB1 0x20000000
20
21/* system i/o configuration register high */
22#define MPC83XX_SICRH_OFFS 0x118
23#define MPC83XX_SICRH_USB_UTMI 0x00020000
24
7/* 25/*
8 * Declaration for the various functions exported by the 26 * Declaration for the various functions exported by the
9 * mpc83xx_* files. Mostly for use by mpc83xx_setup 27 * mpc83xx_* files. Mostly for use by mpc83xx_setup
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 0584f3c7e884..eb661ccf2dab 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -23,6 +23,13 @@ config MPC85xx_CDS
23 help 23 help
24 This option enables support for the MPC85xx CDS board 24 This option enables support for the MPC85xx CDS board
25 25
26config MPC85xx_MDS
27 bool "Freescale MPC85xx MDS"
28 select DEFAULT_UIMAGE
29# select QUICC_ENGINE
30 help
31 This option enables support for the MPC85xx MDS board
32
26endchoice 33endchoice
27 34
28config MPC8540 35config MPC8540
@@ -36,6 +43,12 @@ config MPC8560
36 select PPC_INDIRECT_PCI 43 select PPC_INDIRECT_PCI
37 default y if MPC8560_ADS 44 default y if MPC8560_ADS
38 45
46config MPC85xx
47 bool
48 select PPC_UDBG_16550
49 select PPC_INDIRECT_PCI
50 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS
51
39config PPC_INDIRECT_PCI_BE 52config PPC_INDIRECT_PCI_BE
40 bool 53 bool
41 depends on PPC_85xx 54 depends on PPC_85xx
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 282f5d0d0152..4e63917ada9d 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_85xx) += misc.o pci.o
5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o 5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o 6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
8obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index bda2e55e6c4c..8ed034aeca5f 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -17,7 +17,6 @@
17#include <linux/kdev_t.h> 17#include <linux/kdev_t.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/seq_file.h> 19#include <linux/seq_file.h>
20#include <linux/root_dev.h>
21 20
22#include <asm/system.h> 21#include <asm/system.h>
23#include <asm/time.h> 22#include <asm/time.h>
@@ -45,8 +44,7 @@ unsigned long isa_mem_base = 0;
45#endif 44#endif
46 45
47#ifdef CONFIG_PCI 46#ifdef CONFIG_PCI
48int 47static int mpc85xx_exclude_device(u_char bus, u_char devfn)
49mpc85xx_exclude_device(u_char bus, u_char devfn)
50{ 48{
51 if (bus == 0 && PCI_SLOT(devfn) == 0) 49 if (bus == 0 && PCI_SLOT(devfn) == 0)
52 return PCIBIOS_DEVICE_NOT_FOUND; 50 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -69,7 +67,7 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
69 67
70#endif /* CONFIG_CPM2 */ 68#endif /* CONFIG_CPM2 */
71 69
72void __init mpc85xx_ads_pic_init(void) 70static void __init mpc85xx_ads_pic_init(void)
73{ 71{
74 struct mpic *mpic; 72 struct mpic *mpic;
75 struct resource r; 73 struct resource r;
@@ -246,15 +244,9 @@ static void __init mpc85xx_ads_setup_arch(void)
246 add_bridge(np); 244 add_bridge(np);
247 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 245 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
248#endif 246#endif
249
250#ifdef CONFIG_ROOT_NFS
251 ROOT_DEV = Root_NFS;
252#else
253 ROOT_DEV = Root_HDA1;
254#endif
255} 247}
256 248
257void mpc85xx_ads_show_cpuinfo(struct seq_file *m) 249static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
258{ 250{
259 uint pvid, svid, phid1; 251 uint pvid, svid, phid1;
260 uint memsize = total_memory; 252 uint memsize = total_memory;
@@ -280,10 +272,9 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
280 */ 272 */
281static int __init mpc85xx_ads_probe(void) 273static int __init mpc85xx_ads_probe(void)
282{ 274{
283 /* We always match for now, eventually we should look at the flat 275 unsigned long root = of_get_flat_dt_root();
284 dev tree to ensure this is the board we are suppose to run on 276
285 */ 277 return of_flat_dt_is_compatible(root, "MPC85xxADS");
286 return 1;
287} 278}
288 279
289define_machine(mpc85xx_ads) { 280define_machine(mpc85xx_ads) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 953cd5dd3f54..4232686be441 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -22,7 +22,6 @@
22#include <linux/console.h> 22#include <linux/console.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/initrd.h> 25#include <linux/initrd.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/fsl_devices.h> 27#include <linux/fsl_devices.h>
@@ -56,7 +55,6 @@ unsigned long isa_mem_base = 0;
56static int cds_pci_slot = 2; 55static int cds_pci_slot = 2;
57static volatile u8 *cadmus; 56static volatile u8 *cadmus;
58 57
59
60#ifdef CONFIG_PCI 58#ifdef CONFIG_PCI
61 59
62#define ARCADIA_HOST_BRIDGE_IDSEL 17 60#define ARCADIA_HOST_BRIDGE_IDSEL 17
@@ -64,8 +62,7 @@ static volatile u8 *cadmus;
64 62
65extern int mpc85xx_pci2_busno; 63extern int mpc85xx_pci2_busno;
66 64
67int 65static int mpc85xx_exclude_device(u_char bus, u_char devfn)
68mpc85xx_exclude_device(u_char bus, u_char devfn)
69{ 66{
70 if (bus == 0 && PCI_SLOT(devfn) == 0) 67 if (bus == 0 && PCI_SLOT(devfn) == 0)
71 return PCIBIOS_DEVICE_NOT_FOUND; 68 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -81,8 +78,7 @@ mpc85xx_exclude_device(u_char bus, u_char devfn)
81 return PCIBIOS_SUCCESSFUL; 78 return PCIBIOS_SUCCESSFUL;
82} 79}
83 80
84void __init 81static void __init mpc85xx_cds_pcibios_fixup(void)
85mpc85xx_cds_pcibios_fixup(void)
86{ 82{
87 struct pci_dev *dev; 83 struct pci_dev *dev;
88 u_char c; 84 u_char c;
@@ -144,7 +140,7 @@ static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
144#endif /* PPC_I8259 */ 140#endif /* PPC_I8259 */
145#endif /* CONFIG_PCI */ 141#endif /* CONFIG_PCI */
146 142
147void __init mpc85xx_cds_pic_init(void) 143static void __init mpc85xx_cds_pic_init(void)
148{ 144{
149 struct mpic *mpic; 145 struct mpic *mpic;
150 struct resource r; 146 struct resource r;
@@ -224,12 +220,10 @@ void __init mpc85xx_cds_pic_init(void)
224#endif /* CONFIG_PPC_I8259 */ 220#endif /* CONFIG_PPC_I8259 */
225} 221}
226 222
227
228/* 223/*
229 * Setup the architecture 224 * Setup the architecture
230 */ 225 */
231static void __init 226static void __init mpc85xx_cds_setup_arch(void)
232mpc85xx_cds_setup_arch(void)
233{ 227{
234 struct device_node *cpu; 228 struct device_node *cpu;
235#ifdef CONFIG_PCI 229#ifdef CONFIG_PCI
@@ -268,17 +262,9 @@ mpc85xx_cds_setup_arch(void)
268 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; 262 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
269 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 263 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
270#endif 264#endif
271
272#ifdef CONFIG_ROOT_NFS
273 ROOT_DEV = Root_NFS;
274#else
275 ROOT_DEV = Root_HDA1;
276#endif
277} 265}
278 266
279 267static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
280void
281mpc85xx_cds_show_cpuinfo(struct seq_file *m)
282{ 268{
283 uint pvid, svid, phid1; 269 uint pvid, svid, phid1;
284 uint memsize = total_memory; 270 uint memsize = total_memory;
@@ -305,11 +291,9 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
305 */ 291 */
306static int __init mpc85xx_cds_probe(void) 292static int __init mpc85xx_cds_probe(void)
307{ 293{
308 /* We always match for now, eventually we should look at 294 unsigned long root = of_get_flat_dt_root();
309 * the flat dev tree to ensure this is the board we are 295
310 * supposed to run on 296 return of_flat_dt_is_compatible(root, "MPC85xxCDS");
311 */
312 return 1;
313} 297}
314 298
315define_machine(mpc85xx_cds) { 299define_machine(mpc85xx_cds) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
new file mode 100644
index 000000000000..81144d2ae455
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -0,0 +1,234 @@
1/*
2 * Copyright (C) Freescale Semicondutor, Inc. 2006-2007. All rights reserved.
3 *
4 * Author: Andy Fleming <afleming@freescale.com>
5 *
6 * Based on 83xx/mpc8360e_pb.c by:
7 * Li Yang <LeoLi@freescale.com>
8 * Yin Olivia <Hong-hua.Yin@freescale.com>
9 *
10 * Description:
11 * MPC85xx MDS board specific routines.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#include <linux/stddef.h>
20#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/errno.h>
23#include <linux/reboot.h>
24#include <linux/pci.h>
25#include <linux/kdev_t.h>
26#include <linux/major.h>
27#include <linux/console.h>
28#include <linux/delay.h>
29#include <linux/seq_file.h>
30#include <linux/initrd.h>
31#include <linux/module.h>
32#include <linux/fsl_devices.h>
33
34#include <asm/of_device.h>
35#include <asm/of_platform.h>
36#include <asm/system.h>
37#include <asm/atomic.h>
38#include <asm/time.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/bootinfo.h>
42#include <asm/pci-bridge.h>
43#include <asm/mpc85xx.h>
44#include <asm/irq.h>
45#include <mm/mmu_decl.h>
46#include <asm/prom.h>
47#include <asm/udbg.h>
48#include <sysdev/fsl_soc.h>
49#include <asm/qe.h>
50#include <asm/qe_ic.h>
51#include <asm/mpic.h>
52
53#include "mpc85xx.h"
54
55#undef DEBUG
56#ifdef DEBUG
57#define DBG(fmt...) udbg_printf(fmt)
58#else
59#define DBG(fmt...)
60#endif
61
62#ifndef CONFIG_PCI
63unsigned long isa_io_base = 0;
64unsigned long isa_mem_base = 0;
65#endif
66
67/* ************************************************************************
68 *
69 * Setup the architecture
70 *
71 */
72static void __init mpc85xx_mds_setup_arch(void)
73{
74 struct device_node *np;
75 static u8 *bcsr_regs = NULL;
76
77 if (ppc_md.progress)
78 ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
79
80 np = of_find_node_by_type(NULL, "cpu");
81 if (np != NULL) {
82 const unsigned int *fp =
83 get_property(np, "clock-frequency", NULL);
84 if (fp != NULL)
85 loops_per_jiffy = *fp / HZ;
86 else
87 loops_per_jiffy = 50000000 / HZ;
88 of_node_put(np);
89 }
90
91 /* Map BCSR area */
92 np = of_find_node_by_name(NULL, "bcsr");
93 if (np != NULL) {
94 struct resource res;
95
96 of_address_to_resource(np, 0, &res);
97 bcsr_regs = ioremap(res.start, res.end - res.start +1);
98 of_node_put(np);
99 }
100
101#ifdef CONFIG_PCI
102 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
103 add_bridge(np);
104 }
105 of_node_put(np);
106#endif
107
108#ifdef CONFIG_QUICC_ENGINE
109 if ((np = of_find_node_by_name(NULL, "qe")) != NULL) {
110 qe_reset();
111 of_node_put(np);
112 }
113
114 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
115 struct device_node *ucc = NULL;
116
117 par_io_init(np);
118 of_node_put(np);
119
120 for ( ;(ucc = of_find_node_by_name(ucc, "ucc")) != NULL;)
121 par_io_of_config(ucc);
122
123 of_node_put(ucc);
124 }
125
126 if (bcsr_regs) {
127 u8 bcsr_phy;
128
129 /* Reset the Ethernet PHY */
130 bcsr_phy = in_be8(&bcsr_regs[9]);
131 bcsr_phy &= ~0x20;
132 out_be8(&bcsr_regs[9], bcsr_phy);
133
134 udelay(1000);
135
136 bcsr_phy = in_be8(&bcsr_regs[9]);
137 bcsr_phy |= 0x20;
138 out_be8(&bcsr_regs[9], bcsr_phy);
139
140 iounmap(bcsr_regs);
141 }
142
143#endif /* CONFIG_QUICC_ENGINE */
144}
145
146static struct of_device_id mpc85xx_ids[] = {
147 { .type = "soc", },
148 { .compatible = "soc", },
149 { .type = "qe", },
150 {},
151};
152
153static int __init mpc85xx_publish_devices(void)
154{
155 if (!machine_is(mpc85xx_mds))
156 return 0;
157
158 /* Publish the QE devices */
159 of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
160
161 return 0;
162}
163device_initcall(mpc85xx_publish_devices);
164
165static void __init mpc85xx_mds_pic_init(void)
166{
167 struct mpic *mpic;
168 struct resource r;
169 struct device_node *np = NULL;
170
171 np = of_find_node_by_type(NULL, "open-pic");
172 if (!np)
173 return;
174
175 if (of_address_to_resource(np, 0, &r)) {
176 printk(KERN_ERR "Failed to map mpic register space\n");
177 of_node_put(np);
178 return;
179 }
180
181 mpic = mpic_alloc(np, r.start,
182 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
183 4, 0, " OpenPIC ");
184 BUG_ON(mpic == NULL);
185 of_node_put(np);
186
187 /* Internal Interrupts */
188 mpic_assign_isu(mpic, 0, r.start + 0x10200);
189 mpic_assign_isu(mpic, 1, r.start + 0x10280);
190 mpic_assign_isu(mpic, 2, r.start + 0x10300);
191 mpic_assign_isu(mpic, 3, r.start + 0x10380);
192 mpic_assign_isu(mpic, 4, r.start + 0x10400);
193 mpic_assign_isu(mpic, 5, r.start + 0x10480);
194 mpic_assign_isu(mpic, 6, r.start + 0x10500);
195 mpic_assign_isu(mpic, 7, r.start + 0x10580);
196 mpic_assign_isu(mpic, 8, r.start + 0x10600);
197 mpic_assign_isu(mpic, 9, r.start + 0x10680);
198 mpic_assign_isu(mpic, 10, r.start + 0x10700);
199 mpic_assign_isu(mpic, 11, r.start + 0x10780);
200
201 /* External Interrupts */
202 mpic_assign_isu(mpic, 12, r.start + 0x10000);
203 mpic_assign_isu(mpic, 13, r.start + 0x10080);
204 mpic_assign_isu(mpic, 14, r.start + 0x10100);
205
206 mpic_init(mpic);
207
208#ifdef CONFIG_QUICC_ENGINE
209 np = of_find_node_by_type(NULL, "qeic");
210 if (!np)
211 return;
212
213 qe_ic_init(np, 0);
214 of_node_put(np);
215#endif /* CONFIG_QUICC_ENGINE */
216}
217
218static int __init mpc85xx_mds_probe(void)
219{
220 unsigned long root = of_get_flat_dt_root();
221
222 return of_flat_dt_is_compatible(root, "MPC85xxMDS");
223}
224
225define_machine(mpc85xx_mds) {
226 .name = "MPC85xx MDS",
227 .probe = mpc85xx_mds_probe,
228 .setup_arch = mpc85xx_mds_setup_arch,
229 .init_IRQ = mpc85xx_mds_pic_init,
230 .get_irq = mpic_get_irq,
231 .restart = mpc85xx_restart,
232 .calibrate_decr = generic_calibrate_decr,
233 .progress = udbg_progress,
234};
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index d1ecc0f9ab58..0c70944d0e37 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -8,6 +8,7 @@ choice
8config MPC8641_HPCN 8config MPC8641_HPCN
9 bool "Freescale MPC8641 HPCN" 9 bool "Freescale MPC8641 HPCN"
10 select PPC_I8259 10 select PPC_I8259
11 select DEFAULT_UIMAGE
11 help 12 help
12 This option enables support for the MPC8641 HPCN board. 13 This option enables support for the MPC8641 HPCN board.
13 14
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index f4dd5f2f8a28..f42f801cf84e 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -18,7 +18,6 @@
18#include <linux/kdev_t.h> 18#include <linux/kdev_t.h>
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/root_dev.h>
22 21
23#include <asm/system.h> 22#include <asm/system.h>
24#include <asm/time.h> 23#include <asm/time.h>
@@ -120,6 +119,8 @@ mpc86xx_hpcn_init_irq(void)
120 DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq); 119 DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq);
121 120
122 i8259_init(cascade_node, 0); 121 i8259_init(cascade_node, 0);
122 of_node_put(cascade_node);
123
123 set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade); 124 set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade);
124#endif 125#endif
125} 126}
@@ -365,12 +366,6 @@ mpc86xx_hpcn_setup_arch(void)
365 366
366 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); 367 printk("MPC86xx HPCN board from Freescale Semiconductor\n");
367 368
368#ifdef CONFIG_ROOT_NFS
369 ROOT_DEV = Root_NFS;
370#else
371 ROOT_DEV = Root_HDA1;
372#endif
373
374#ifdef CONFIG_SMP 369#ifdef CONFIG_SMP
375 mpc86xx_smp_init(); 370 mpc86xx_smp_init();
376#endif 371#endif
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
index bb7fb41933ad..7ef0c6854799 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
@@ -65,7 +65,6 @@ smp_86xx_kick_cpu(int nr)
65 pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr); 65 pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr);
66 66
67 local_irq_save(flags); 67 local_irq_save(flags);
68 local_irq_disable();
69 68
70 /* Save reset vector */ 69 /* Save reset vector */
71 save_vector = *vector; 70 save_vector = *vector;
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index c8c0ba3cf8e8..beea6834bb7e 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -1,105 +1,16 @@
1menu "Platform support"
2 depends on PPC_8xx
3
1config FADS 4config FADS
2 bool 5 bool
3 6
7config CPM1
8 bool
9
4choice 10choice
5 prompt "8xx Machine Type" 11 prompt "8xx Machine Type"
6 depends on 8xx 12 depends on 8xx
7 default RPXLITE 13 default MPC885ADS
8
9config RPXLITE
10 bool "RPX-Lite"
11 ---help---
12 Single-board computers based around the PowerPC MPC8xx chips and
13 intended for embedded applications. The following types are
14 supported:
15
16 RPX-Lite:
17 Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823.
18
19 RPX-Classic:
20 Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on
21 the MPC 860
22
23 BSE-IP:
24 Bright Star Engineering ip-Engine.
25
26 TQM823L:
27 TQM850L:
28 TQM855L:
29 TQM860L:
30 MPC8xx based family of mini modules, half credit card size,
31 up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
32 2 x CAN bus interface, ...
33 Manufacturer: TQ Components, www.tq-group.de
34 Date of Release: October (?) 1999
35 End of Life: not yet :-)
36 URL:
37 - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>
38 - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf>
39 - images: <http://www.denx.de/embedded-ppc-en.html>
40
41 FPS850L:
42 FingerPrint Sensor System (based on TQM850L)
43 Manufacturer: IKENDI AG, <http://www.ikendi.com/>
44 Date of Release: November 1999
45 End of life: end 2000 ?
46 URL: see TQM850L
47
48 IVMS8:
49 MPC860 based board used in the "Integrated Voice Mail System",
50 Small Version (8 voice channels)
51 Manufacturer: Speech Design, <http://www.speech-design.de/>
52 Date of Release: December 2000 (?)
53 End of life: -
54 URL: <http://www.speech-design.de/>
55
56 IVML24:
57 MPC860 based board used in the "Integrated Voice Mail System",
58 Large Version (24 voice channels)
59 Manufacturer: Speech Design, <http://www.speech-design.de/>
60 Date of Release: March 2001 (?)
61 End of life: -
62 URL: <http://www.speech-design.de/>
63
64 HERMES:
65 Hermes-Pro ISDN/LAN router with integrated 8 x hub
66 Manufacturer: Multidata Gesellschaft fur Datentechnik und Informatik
67 <http://www.multidata.de/>
68 Date of Release: 2000 (?)
69 End of life: -
70 URL: <http://www.multidata.de/english/products/hpro.htm>
71
72 IP860:
73 VMEBus IP (Industry Pack) carrier board with MPC860
74 Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
75 Date of Release: ?
76 End of life: -
77 URL: <http://www.microsys.de/html/ip860.html>
78
79 PCU_E:
80 PCU = Peripheral Controller Unit, Extended
81 Manufacturer: Siemens AG, ICN (Information and Communication Networks)
82 <http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html>
83 Date of Release: April 2001
84 End of life: August 2001
85 URL: n. a.
86
87config RPXCLASSIC
88 bool "RPX-Classic"
89 help
90 The RPX-Classic is a single-board computer based on the Motorola
91 MPC860. It features 16MB of DRAM and a variable amount of flash,
92 I2C EEPROM, thermal monitoring, a PCMCIA slot, a DIP switch and two
93 LEDs. Variants with Ethernet ports exist. Say Y here to support it
94 directly.
95
96config BSEIP
97 bool "BSE-IP"
98 help
99 Say Y here to support the Bright Star Engineering ipEngine SBC.
100 This is a credit-card-sized device featuring a MPC823 processor,
101 26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video
102 controller, and two RS232 ports.
103 14
104config MPC8XXFADS 15config MPC8XXFADS
105 bool "FADS" 16 bool "FADS"
@@ -107,110 +18,58 @@ config MPC8XXFADS
107 18
108config MPC86XADS 19config MPC86XADS
109 bool "MPC86XADS" 20 bool "MPC86XADS"
21 select CPM1
110 help 22 help
111 MPC86x Application Development System by Freescale Semiconductor. 23 MPC86x Application Development System by Freescale Semiconductor.
112 The MPC86xADS is meant to serve as a platform for s/w and h/w 24 The MPC86xADS is meant to serve as a platform for s/w and h/w
113 development around the MPC86X processor families. 25 development around the MPC86X processor families.
114 select FADS
115 26
116config MPC885ADS 27config MPC885ADS
117 bool "MPC885ADS" 28 bool "MPC885ADS"
29 select CPM1
118 help 30 help
119 Freescale Semiconductor MPC885 Application Development System (ADS). 31 Freescale Semiconductor MPC885 Application Development System (ADS).
120 Also known as DUET. 32 Also known as DUET.
121 The MPC885ADS is meant to serve as a platform for s/w and h/w 33 The MPC885ADS is meant to serve as a platform for s/w and h/w
122 development around the MPC885 processor family. 34 development around the MPC885 processor family.
123 35
124config TQM823L 36endchoice
125 bool "TQM823L"
126 help
127 Say Y here to support the TQM823L, one of an MPC8xx-based family of
128 mini SBCs (half credit-card size) from TQ Components first released
129 in late 1999. Technical references are at
130 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
131 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
132 <http://www.denx.de/embedded-ppc-en.html>.
133
134config TQM850L
135 bool "TQM850L"
136 help
137 Say Y here to support the TQM850L, one of an MPC8xx-based family of
138 mini SBCs (half credit-card size) from TQ Components first released
139 in late 1999. Technical references are at
140 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
141 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
142 <http://www.denx.de/embedded-ppc-en.html>.
143
144config TQM855L
145 bool "TQM855L"
146 help
147 Say Y here to support the TQM855L, one of an MPC8xx-based family of
148 mini SBCs (half credit-card size) from TQ Components first released
149 in late 1999. Technical references are at
150 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
151 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
152 <http://www.denx.de/embedded-ppc-en.html>.
153
154config TQM860L
155 bool "TQM860L"
156 help
157 Say Y here to support the TQM860L, one of an MPC8xx-based family of
158 mini SBCs (half credit-card size) from TQ Components first released
159 in late 1999. Technical references are at
160 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
161 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
162 <http://www.denx.de/embedded-ppc-en.html>.
163
164config FPS850L
165 bool "FPS850L"
166
167config IVMS8
168 bool "IVMS8"
169 help
170 Say Y here to support the Integrated Voice-Mail Small 8-channel SBC
171 from Speech Design, released March 2001. The manufacturer's website
172 is at <http://www.speech-design.de/>.
173
174config IVML24
175 bool "IVML24"
176 help
177 Say Y here to support the Integrated Voice-Mail Large 24-channel SBC
178 from Speech Design, released March 2001. The manufacturer's website
179 is at <http://www.speech-design.de/>.
180
181config HERMES_PRO
182 bool "HERMES"
183
184config IP860
185 bool "IP860"
186
187config LWMON
188 bool "LWMON"
189
190config PCU_E
191 bool "PCU_E"
192
193config CCM
194 bool "CCM"
195
196config LANTEC
197 bool "LANTEC"
198 37
199config MBX 38menu "Freescale Ethernet driver platform-specific options"
200 bool "MBX" 39 depends on (FS_ENET && MPC885ADS)
201 help 40
202 MBX is a line of Motorola single-board computer based around the 41 config MPC8xx_SECOND_ETH
203 MPC821 and MPC860 processors, and intended for embedded-controller 42 bool "Second Ethernet channel"
204 applications. Say Y here to support these boards directly. 43 depends on MPC885ADS
44 default y
45 help
46 This enables support for second Ethernet on MPC885ADS and MPC86xADS boards.
47 The latter will use SCC1, for 885ADS you can select it below.
48
49 choice
50 prompt "Second Ethernet channel"
51 depends on MPC8xx_SECOND_ETH
52 default MPC8xx_SECOND_ETH_FEC2
53
54 config MPC8xx_SECOND_ETH_FEC2
55 bool "FEC2"
56 depends on MPC885ADS
57 help
58 Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2
59 (often 2-nd UART) will not work if this is enabled.
60
61 config MPC8xx_SECOND_ETH_SCC3
62 bool "SCC3"
63 depends on MPC885ADS
64 help
65 Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1
66 (often 1-nd UART) will not work if this is enabled.
67
68 endchoice
205 69
206config WINCEPT 70endmenu
207 bool "WinCept"
208 help
209 The Wincept 100/110 is a Motorola single-board computer based on the
210 MPC821 PowerPC, introduced in 1998 and designed to be used in
211 thin-client machines. Say Y to support it directly.
212 71
213endchoice 72endmenu
214 73
215# 74#
216# MPC8xx Communication options 75# MPC8xx Communication options
@@ -219,79 +78,6 @@ endchoice
219menu "MPC8xx CPM Options" 78menu "MPC8xx CPM Options"
220 depends on 8xx 79 depends on 8xx
221 80
222config SCC_ENET
223 bool "CPM SCC Ethernet"
224 depends on NET_ETHERNET
225 help
226 Enable Ethernet support via the Motorola MPC8xx serial
227 communications controller.
228
229choice
230 prompt "SCC used for Ethernet"
231 depends on SCC_ENET
232 default SCC1_ENET
233
234config SCC1_ENET
235 bool "SCC1"
236 help
237 Use MPC8xx serial communications controller 1 to drive Ethernet
238 (default).
239
240config SCC2_ENET
241 bool "SCC2"
242 help
243 Use MPC8xx serial communications controller 2 to drive Ethernet.
244
245config SCC3_ENET
246 bool "SCC3"
247 help
248 Use MPC8xx serial communications controller 3 to drive Ethernet.
249
250endchoice
251
252config FEC_ENET
253 bool "860T FEC Ethernet"
254 depends on NET_ETHERNET
255 help
256 Enable Ethernet support via the Fast Ethernet Controller (FCC) on
257 the Motorola MPC8260.
258
259config USE_MDIO
260 bool "Use MDIO for PHY configuration"
261 depends on FEC_ENET
262 help
263 On some boards the hardware configuration of the ethernet PHY can be
264 used without any software interaction over the MDIO interface, so
265 all MII code can be omitted. Say N here if unsure or if you don't
266 need link status reports.
267
268config FEC_AM79C874
269 bool "Support AMD79C874 PHY"
270 depends on USE_MDIO
271
272config FEC_LXT970
273 bool "Support LXT970 PHY"
274 depends on USE_MDIO
275
276config FEC_LXT971
277 bool "Support LXT971 PHY"
278 depends on USE_MDIO
279
280config FEC_QS6612
281 bool "Support QS6612 PHY"
282 depends on USE_MDIO
283
284config ENET_BIG_BUFFERS
285 bool "Use Big CPM Ethernet Buffers"
286 depends on SCC_ENET || FEC_ENET
287 help
288 Allocate large buffers for MPC8xx Ethernet. Increases throughput
289 and decreases the likelihood of dropped packets, but costs memory.
290
291config HTDMSOUND
292 bool "Embedded Planet HIOX Audio"
293 depends on SOUND=y
294
295# This doesn't really belong here, but it is convenient to ask 81# This doesn't really belong here, but it is convenient to ask
296# 8xx specific questions. 82# 8xx specific questions.
297comment "Generic MPC8xx Options" 83comment "Generic MPC8xx Options"
diff --git a/arch/powerpc/platforms/8xx/Makefile b/arch/powerpc/platforms/8xx/Makefile
new file mode 100644
index 000000000000..5e2dae3afd2f
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/Makefile
@@ -0,0 +1,6 @@
1#
2# Makefile for the PowerPC 8xx linux kernel.
3#
4obj-$(CONFIG_PPC_8xx) += m8xx_setup.o
5obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
6obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
new file mode 100644
index 000000000000..9ed7125f0150
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -0,0 +1,303 @@
1/*
2 * Copyright (C) 1995 Linus Torvalds
3 * Adapted from 'alpha' version by Gary Thomas
4 * Modified by Cort Dougan (cort@cs.nmt.edu)
5 * Modified for MBX using prep/chrp/pmac functions by Dan (dmalek@jlc.net)
6 * Further modified for generic 8xx by Dan.
7 */
8
9/*
10 * bootup setup stuff..
11 */
12
13#include <linux/errno.h>
14#include <linux/sched.h>
15#include <linux/kernel.h>
16#include <linux/mm.h>
17#include <linux/stddef.h>
18#include <linux/unistd.h>
19#include <linux/ptrace.h>
20#include <linux/slab.h>
21#include <linux/user.h>
22#include <linux/a.out.h>
23#include <linux/tty.h>
24#include <linux/major.h>
25#include <linux/interrupt.h>
26#include <linux/reboot.h>
27#include <linux/init.h>
28#include <linux/initrd.h>
29#include <linux/ioport.h>
30#include <linux/bootmem.h>
31#include <linux/seq_file.h>
32#include <linux/root_dev.h>
33#include <linux/time.h>
34#include <linux/rtc.h>
35
36#include <asm/mmu.h>
37#include <asm/reg.h>
38#include <asm/residual.h>
39#include <asm/io.h>
40#include <asm/pgtable.h>
41#include <asm/mpc8xx.h>
42#include <asm/8xx_immap.h>
43#include <asm/machdep.h>
44#include <asm/bootinfo.h>
45#include <asm/time.h>
46#include <asm/prom.h>
47#include <asm/fs_pd.h>
48#include <mm/mmu_decl.h>
49
50#include "sysdev/mpc8xx_pic.h"
51
52void m8xx_calibrate_decr(void);
53extern void m8xx_wdt_handler_install(bd_t *bp);
54extern int cpm_pic_init(void);
55extern int cpm_get_irq(void);
56
57/* A place holder for time base interrupts, if they are ever enabled. */
58irqreturn_t timebase_interrupt(int irq, void * dev)
59{
60 printk ("timebase_interrupt()\n");
61
62 return IRQ_HANDLED;
63}
64
65static struct irqaction tbint_irqaction = {
66 .handler = timebase_interrupt,
67 .mask = CPU_MASK_NONE,
68 .name = "tbint",
69};
70
71/* per-board overridable init_internal_rtc() function. */
72void __init __attribute__ ((weak))
73init_internal_rtc(void)
74{
75 sit8xx_t *sys_tmr = (sit8xx_t *) immr_map(im_sit);
76
77 /* Disable the RTC one second and alarm interrupts. */
78 clrbits16(&sys_tmr->sit_rtcsc, (RTCSC_SIE | RTCSC_ALE));
79
80 /* Enable the RTC */
81 setbits16(&sys_tmr->sit_rtcsc, (RTCSC_RTF | RTCSC_RTE));
82 immr_unmap(sys_tmr);
83}
84
85static int __init get_freq(char *name, unsigned long *val)
86{
87 struct device_node *cpu;
88 unsigned int *fp;
89 int found = 0;
90
91 /* The cpu node should have timebase and clock frequency properties */
92 cpu = of_find_node_by_type(NULL, "cpu");
93
94 if (cpu) {
95 fp = (unsigned int *)get_property(cpu, name, NULL);
96 if (fp) {
97 found = 1;
98 *val = *fp++;
99 }
100
101 of_node_put(cpu);
102 }
103
104 return found;
105}
106
107/* The decrementer counts at the system (internal) clock frequency divided by
108 * sixteen, or external oscillator divided by four. We force the processor
109 * to use system clock divided by sixteen.
110 */
111void __init mpc8xx_calibrate_decr(void)
112{
113 struct device_node *cpu;
114 cark8xx_t *clk_r1;
115 car8xx_t *clk_r2;
116 sitk8xx_t *sys_tmr1;
117 sit8xx_t *sys_tmr2;
118 int irq, virq;
119
120 clk_r1 = (cark8xx_t *) immr_map(im_clkrstk);
121
122 /* Unlock the SCCR. */
123 out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY);
124 out_be32(&clk_r1->cark_sccrk, KAPWR_KEY);
125 immr_unmap(clk_r1);
126
127 /* Force all 8xx processors to use divide by 16 processor clock. */
128 clk_r2 = (car8xx_t *) immr_map(im_clkrst);
129 setbits32(&clk_r2->car_sccr, 0x02000000);
130 immr_unmap(clk_r2);
131
132 /* Processor frequency is MHz.
133 */
134 ppc_tb_freq = 50000000;
135 if (!get_freq("bus-frequency", &ppc_tb_freq)) {
136 printk(KERN_ERR "WARNING: Estimating decrementer frequency "
137 "(not found)\n");
138 }
139 ppc_tb_freq /= 16;
140 ppc_proc_freq = 50000000;
141 if (!get_freq("clock-frequency", &ppc_proc_freq))
142 printk(KERN_ERR "WARNING: Estimating processor frequency"
143 "(not found)\n");
144
145 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
146
147 /* Perform some more timer/timebase initialization. This used
148 * to be done elsewhere, but other changes caused it to get
149 * called more than once....that is a bad thing.
150 *
151 * First, unlock all of the registers we are going to modify.
152 * To protect them from corruption during power down, registers
153 * that are maintained by keep alive power are "locked". To
154 * modify these registers we have to write the key value to
155 * the key location associated with the register.
156 * Some boards power up with these unlocked, while others
157 * are locked. Writing anything (including the unlock code?)
158 * to the unlocked registers will lock them again. So, here
159 * we guarantee the registers are locked, then we unlock them
160 * for our use.
161 */
162 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
163 out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY);
164 out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY);
165 out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY);
166 out_be32(&sys_tmr1->sitk_tbscrk, KAPWR_KEY);
167 out_be32(&sys_tmr1->sitk_rtcsck, KAPWR_KEY);
168 out_be32(&sys_tmr1->sitk_tbk, KAPWR_KEY);
169 immr_unmap(sys_tmr1);
170
171 init_internal_rtc();
172
173 /* Enabling the decrementer also enables the timebase interrupts
174 * (or from the other point of view, to get decrementer interrupts
175 * we have to enable the timebase). The decrementer interrupt
176 * is wired into the vector table, nothing to do here for that.
177 */
178 cpu = of_find_node_by_type(NULL, "cpu");
179 virq= irq_of_parse_and_map(cpu, 0);
180 irq = irq_map[virq].hwirq;
181
182 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
183 out_be16(&sys_tmr2->sit_tbscr, ((1 << (7 - (irq/2))) << 8) |
184 (TBSCR_TBF | TBSCR_TBE));
185 immr_unmap(sys_tmr2);
186
187 if (setup_irq(virq, &tbint_irqaction))
188 panic("Could not allocate timer IRQ!");
189
190#ifdef CONFIG_8xx_WDT
191 /* Install watchdog timer handler early because it might be
192 * already enabled by the bootloader
193 */
194 m8xx_wdt_handler_install(binfo);
195#endif
196}
197
198/* The RTC on the MPC8xx is an internal register.
199 * We want to protect this during power down, so we need to unlock,
200 * modify, and re-lock.
201 */
202
203int mpc8xx_set_rtc_time(struct rtc_time *tm)
204{
205 sitk8xx_t *sys_tmr1;
206 sit8xx_t *sys_tmr2;
207 int time;
208
209 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
210 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
211 time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
212 tm->tm_hour, tm->tm_min, tm->tm_sec);
213
214 out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY);
215 out_be32(&sys_tmr2->sit_rtc, time);
216 out_be32(&sys_tmr1->sitk_rtck, ~KAPWR_KEY);
217
218 immr_unmap(sys_tmr2);
219 immr_unmap(sys_tmr1);
220 return 0;
221}
222
223void mpc8xx_get_rtc_time(struct rtc_time *tm)
224{
225 unsigned long data;
226 sit8xx_t *sys_tmr = (sit8xx_t *) immr_map(im_sit);
227
228 /* Get time from the RTC. */
229 data = in_be32(&sys_tmr->sit_rtc);
230 to_tm(data, tm);
231 tm->tm_year -= 1900;
232 tm->tm_mon -= 1;
233 immr_unmap(sys_tmr);
234 return;
235}
236
237void mpc8xx_restart(char *cmd)
238{
239 __volatile__ unsigned char dummy;
240 car8xx_t * clk_r = (car8xx_t *) immr_map(im_clkrst);
241
242
243 local_irq_disable();
244
245 setbits32(&clk_r->car_plprcr, 0x00000080);
246 /* Clear the ME bit in MSR to cause checkstop on machine check
247 */
248 mtmsr(mfmsr() & ~0x1000);
249
250 dummy = in_8(&clk_r->res[0]);
251 printk("Restart failed\n");
252 while(1);
253}
254
255void mpc8xx_show_cpuinfo(struct seq_file *m)
256{
257 struct device_node *root;
258 uint memsize = total_memory;
259 const char *model = "";
260
261 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
262
263 root = of_find_node_by_path("/");
264 if (root)
265 model = get_property(root, "model", NULL);
266 seq_printf(m, "Machine\t\t: %s\n", model);
267 of_node_put(root);
268
269 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
270}
271
272static void cpm_cascade(unsigned int irq, struct irq_desc *desc)
273{
274 int cascade_irq;
275
276 if ((cascade_irq = cpm_get_irq()) >= 0) {
277 struct irq_desc *cdesc = irq_desc + cascade_irq;
278
279 generic_handle_irq(cascade_irq);
280 cdesc->chip->eoi(cascade_irq);
281 }
282 desc->chip->eoi(irq);
283}
284
285/* Initialize the internal interrupt controller. The number of
286 * interrupts supported can vary with the processor type, and the
287 * 82xx family can have up to 64.
288 * External interrupts can be either edge or level triggered, and
289 * need to be initialized by the appropriate driver.
290 */
291void __init m8xx_pic_init(void)
292{
293 int irq;
294
295 if (mpc8xx_pic_init()) {
296 printk(KERN_ERR "Failed interrupt 8xx controller initialization\n");
297 return;
298 }
299
300 irq = cpm_pic_init();
301 if (irq != NO_IRQ)
302 set_irq_chained_handler(irq, cpm_cascade);
303}
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h
new file mode 100644
index 000000000000..b5d19dd0619c
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc86xads.h
@@ -0,0 +1,95 @@
1/*
2 * A collection of structures, addresses, and values associated with
3 * the Freescale MPC86xADS board.
4 * Copied from the FADS stuff.
5 *
6 * Author: MontaVista Software, Inc.
7 * source@mvista.com
8 *
9 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is licensed
11 * "as is" without any warranty of any kind, whether express or implied.
12 */
13
14#ifdef __KERNEL__
15#ifndef __ASM_MPC86XADS_H__
16#define __ASM_MPC86XADS_H__
17
18#include <asm/ppcboot.h>
19#include <sysdev/fsl_soc.h>
20
21/* U-Boot maps BCSR to 0xff080000 */
22#define BCSR_ADDR ((uint)0xff080000)
23#define BCSR_SIZE ((uint)32)
24#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
25#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
26#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
27#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
28#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
29
30#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
31#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
32
33#define IMAP_ADDR (get_immrbase())
34#define IMAP_SIZE ((uint)(64 * 1024))
35
36#define MPC8xx_CPM_OFFSET (0x9c0)
37#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
38#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
39
40#define PCMCIA_MEM_ADDR (uint)0xff020000)
41#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
42
43/* Bits of interest in the BCSRs.
44 */
45#define BCSR1_ETHEN ((uint)0x20000000)
46#define BCSR1_IRDAEN ((uint)0x10000000)
47#define BCSR1_RS232EN_1 ((uint)0x01000000)
48#define BCSR1_PCCEN ((uint)0x00800000)
49#define BCSR1_PCCVCC0 ((uint)0x00400000)
50#define BCSR1_PCCVPP0 ((uint)0x00200000)
51#define BCSR1_PCCVPP1 ((uint)0x00100000)
52#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
53#define BCSR1_RS232EN_2 ((uint)0x00040000)
54#define BCSR1_PCCVCC1 ((uint)0x00010000)
55#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
56
57#define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/
58#define BCSR4_USB_LO_SPD ((uint)0x04000000)
59#define BCSR4_USB_VCC ((uint)0x02000000)
60#define BCSR4_USB_FULL_SPD ((uint)0x00040000)
61#define BCSR4_USB_EN ((uint)0x00020000)
62
63#define BCSR5_MII2_EN 0x40
64#define BCSR5_MII2_RST 0x20
65#define BCSR5_T1_RST 0x10
66#define BCSR5_ATM155_RST 0x08
67#define BCSR5_ATM25_RST 0x04
68#define BCSR5_MII1_EN 0x02
69#define BCSR5_MII1_RST 0x01
70
71/* Interrupt level assignments */
72#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
73#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
74#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
75
76/* We don't use the 8259 */
77#define NR_8259_INTS 0
78
79/* CPM Ethernet through SCC1 */
80#define PA_ENET_RXD ((ushort)0x0001)
81#define PA_ENET_TXD ((ushort)0x0002)
82#define PA_ENET_TCLK ((ushort)0x0100)
83#define PA_ENET_RCLK ((ushort)0x0200)
84#define PB_ENET_TENA ((uint)0x00001000)
85#define PC_ENET_CLSN ((ushort)0x0010)
86#define PC_ENET_RENA ((ushort)0x0020)
87
88/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
89 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
90 */
91#define SICR_ENET_MASK ((uint)0x000000ff)
92#define SICR_ENET_CLKRT ((uint)0x0000002c)
93
94#endif /* __ASM_MPC86XADS_H__ */
95#endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
new file mode 100644
index 000000000000..ef52ce701b0e
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -0,0 +1,301 @@
1/*arch/ppc/platforms/mpc86xads-setup.c
2 *
3 * Platform setup for the Freescale mpc86xads board
4 *
5 * Vitaly Bordug <vbordug@ru.mvista.com>
6 *
7 * Copyright 2005 MontaVista Software Inc.
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 */
13
14#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/param.h>
17#include <linux/string.h>
18#include <linux/ioport.h>
19#include <linux/device.h>
20#include <linux/delay.h>
21#include <linux/root_dev.h>
22
23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h>
25#include <linux/mii.h>
26
27#include <asm/delay.h>
28#include <asm/io.h>
29#include <asm/machdep.h>
30#include <asm/page.h>
31#include <asm/processor.h>
32#include <asm/system.h>
33#include <asm/time.h>
34#include <asm/ppcboot.h>
35#include <asm/mpc8xx.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/fs_pd.h>
39#include <asm/prom.h>
40
41extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*);
43extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
46extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void);
49
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
51static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
52static void init_scc1_ioports(struct fs_platform_info* ptr);
53
54void __init mpc86xads_board_setup(void)
55{
56 cpm8xx_t *cp;
57 unsigned int *bcsr_io;
58 u8 tmpval8;
59
60 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
61 cp = (cpm8xx_t *)immr_map(im_cpm);
62
63 if (bcsr_io == NULL) {
64 printk(KERN_CRIT "Could not remap BCSR\n");
65 return;
66 }
67#ifdef CONFIG_SERIAL_CPM_SMC1
68 clrbits32(bcsr_io, BCSR1_RS232EN_1);
69 clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
70 tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
71 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
72 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
73#else
74 setbits32(bcsr_io,BCSR1_RS232EN_1);
75 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
76 out_8(&cp->cp_smc[0].smc_smce, 0);
77#endif
78
79#ifdef CONFIG_SERIAL_CPM_SMC2
80 clrbits32(bcsr_io,BCSR1_RS232EN_2);
81 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
82 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
83 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
84 out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
85 clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
86
87 init_smc2_uart_ioports(0);
88#else
89 setbits32(bcsr_io,BCSR1_RS232EN_2);
90 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
91 out_8(&cp->cp_smc[1].smc_smce, 0);
92#endif
93 immr_unmap(cp);
94 iounmap(bcsr_io);
95}
96
97
98static void init_fec1_ioports(struct fs_platform_info* ptr)
99{
100 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
101
102 /* configure FEC1 pins */
103
104 setbits16(&io_port->iop_pdpar, 0x1fff);
105 setbits16(&io_port->iop_pddir, 0x1fff);
106
107 immr_unmap(io_port);
108}
109
110void init_fec_ioports(struct fs_platform_info *fpi)
111{
112 int fec_no = fs_get_fec_index(fpi->fs_no);
113
114 switch (fec_no) {
115 case 0:
116 init_fec1_ioports(fpi);
117 break;
118 default:
119 printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
120 return;
121 }
122}
123
124static void init_scc1_ioports(struct fs_platform_info* fpi)
125{
126 unsigned *bcsr_io;
127 iop8xx_t *io_port;
128 cpm8xx_t *cp;
129
130 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
131 io_port = (iop8xx_t *)immr_map(im_ioport);
132 cp = (cpm8xx_t *)immr_map(im_cpm);
133
134 if (bcsr_io == NULL) {
135 printk(KERN_CRIT "Could not remap BCSR\n");
136 return;
137 }
138
139 /* Configure port A pins for Txd and Rxd.
140 */
141 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
142 clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
143 clrbits16(&io_port->iop_paodr, PA_ENET_TXD);
144
145 /* Configure port C pins to enable CLSN and RENA.
146 */
147 clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
148 clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
149 setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
150
151 /* Configure port A for TCLK and RCLK.
152 */
153 setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
154 clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
155 clrbits32(&cp->cp_pbpar, PB_ENET_TENA);
156 clrbits32(&cp->cp_pbdir, PB_ENET_TENA);
157
158 /* Configure Serial Interface clock routing.
159 * First, clear all SCC bits to zero, then set the ones we want.
160 */
161 clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
162 setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
163
164 /* In the original SCC enet driver the following code is placed at
165 the end of the initialization */
166 setbits32(&cp->cp_pbpar, PB_ENET_TENA);
167 setbits32(&cp->cp_pbdir, PB_ENET_TENA);
168
169 clrbits32(bcsr_io+1, BCSR1_ETHEN);
170 iounmap(bcsr_io);
171 immr_unmap(cp);
172 immr_unmap(io_port);
173}
174
175void init_scc_ioports(struct fs_platform_info *fpi)
176{
177 int scc_no = fs_get_scc_index(fpi->fs_no);
178
179 switch (scc_no) {
180 case 0:
181 init_scc1_ioports(fpi);
182 break;
183 default:
184 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
185 return;
186 }
187}
188
189
190
191static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
192{
193 unsigned *bcsr_io;
194 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
195
196 setbits32(&cp->cp_pbpar, 0x000000c0);
197 clrbits32(&cp->cp_pbdir, 0x000000c0);
198 clrbits16(&cp->cp_pbodr, 0x00c0);
199 immr_unmap(cp);
200
201 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
202
203 if (bcsr_io == NULL) {
204 printk(KERN_CRIT "Could not remap BCSR1\n");
205 return;
206 }
207 clrbits32(bcsr_io,BCSR1_RS232EN_1);
208 iounmap(bcsr_io);
209}
210
211static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
212{
213 unsigned *bcsr_io;
214 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
215
216 setbits32(&cp->cp_pbpar, 0x00000c00);
217 clrbits32(&cp->cp_pbdir, 0x00000c00);
218 clrbits16(&cp->cp_pbodr, 0x0c00);
219 immr_unmap(cp);
220
221 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
222
223 if (bcsr_io == NULL) {
224 printk(KERN_CRIT "Could not remap BCSR1\n");
225 return;
226 }
227 clrbits32(bcsr_io,BCSR1_RS232EN_2);
228 iounmap(bcsr_io);
229}
230
231void init_smc_ioports(struct fs_uart_platform_info *data)
232{
233 int smc_no = fs_uart_id_fsid2smc(data->fs_no);
234
235 switch (smc_no) {
236 case 0:
237 init_smc1_uart_ioports(data);
238 data->brg = data->clk_rx;
239 break;
240 case 1:
241 init_smc2_uart_ioports(data);
242 data->brg = data->clk_rx;
243 break;
244 default:
245 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
246 return;
247 }
248}
249
250int platform_device_skip(char *model, int id)
251{
252 return 0;
253}
254
255static void __init mpc86xads_setup_arch(void)
256{
257 struct device_node *cpu;
258
259 cpu = of_find_node_by_type(NULL, "cpu");
260 if (cpu != 0) {
261 const unsigned int *fp;
262
263 fp = get_property(cpu, "clock-frequency", NULL);
264 if (fp != 0)
265 loops_per_jiffy = *fp / HZ;
266 else
267 loops_per_jiffy = 50000000 / HZ;
268 of_node_put(cpu);
269 }
270
271 cpm_reset();
272
273 mpc86xads_board_setup();
274
275 ROOT_DEV = Root_NFS;
276}
277
278static int __init mpc86xads_probe(void)
279{
280 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
281 "model", NULL);
282 if (model == NULL)
283 return 0;
284 if (strcmp(model, "MPC866ADS"))
285 return 0;
286
287 return 1;
288}
289
290define_machine(mpc86x_ads) {
291 .name = "MPC86x ADS",
292 .probe = mpc86xads_probe,
293 .setup_arch = mpc86xads_setup_arch,
294 .init_IRQ = m8xx_pic_init,
295 .show_cpuinfo = mpc8xx_show_cpuinfo,
296 .get_irq = mpc8xx_get_irq,
297 .restart = mpc8xx_restart,
298 .calibrate_decr = mpc8xx_calibrate_decr,
299 .set_rtc_time = mpc8xx_set_rtc_time,
300 .get_rtc_time = mpc8xx_get_rtc_time,
301};
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h
new file mode 100644
index 000000000000..30cbebfe84c5
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc885ads.h
@@ -0,0 +1,95 @@
1/*
2 * A collection of structures, addresses, and values associated with
3 * the Freescale MPC885ADS board.
4 * Copied from the FADS stuff.
5 *
6 * Author: MontaVista Software, Inc.
7 * source@mvista.com
8 *
9 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is licensed
11 * "as is" without any warranty of any kind, whether express or implied.
12 */
13
14#ifdef __KERNEL__
15#ifndef __ASM_MPC885ADS_H__
16#define __ASM_MPC885ADS_H__
17
18#include <asm/ppcboot.h>
19#include <sysdev/fsl_soc.h>
20
21/* U-Boot maps BCSR to 0xff080000 */
22#define BCSR_ADDR ((uint)0xff080000)
23#define BCSR_SIZE ((uint)32)
24#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
25#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
26#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
27#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
28#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
29
30#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
31#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
32
33#define IMAP_ADDR (get_immrbase())
34#define IMAP_SIZE ((uint)(64 * 1024))
35
36#define MPC8xx_CPM_OFFSET (0x9c0)
37#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
38#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
39
40#define PCMCIA_MEM_ADDR (uint)0xff020000)
41#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
42
43/* Bits of interest in the BCSRs.
44 */
45#define BCSR1_ETHEN ((uint)0x20000000)
46#define BCSR1_IRDAEN ((uint)0x10000000)
47#define BCSR1_RS232EN_1 ((uint)0x01000000)
48#define BCSR1_PCCEN ((uint)0x00800000)
49#define BCSR1_PCCVCC0 ((uint)0x00400000)
50#define BCSR1_PCCVPP0 ((uint)0x00200000)
51#define BCSR1_PCCVPP1 ((uint)0x00100000)
52#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
53#define BCSR1_RS232EN_2 ((uint)0x00040000)
54#define BCSR1_PCCVCC1 ((uint)0x00010000)
55#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
56
57#define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/
58#define BCSR4_USB_LO_SPD ((uint)0x04000000)
59#define BCSR4_USB_VCC ((uint)0x02000000)
60#define BCSR4_USB_FULL_SPD ((uint)0x00040000)
61#define BCSR4_USB_EN ((uint)0x00020000)
62
63#define BCSR5_MII2_EN 0x40
64#define BCSR5_MII2_RST 0x20
65#define BCSR5_T1_RST 0x10
66#define BCSR5_ATM155_RST 0x08
67#define BCSR5_ATM25_RST 0x04
68#define BCSR5_MII1_EN 0x02
69#define BCSR5_MII1_RST 0x01
70
71/* Interrupt level assignments */
72#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
73#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
74#define SIU_INT_FEC2 SIU_LEVEL3 /* FEC2 interrupt */
75#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
76
77/* We don't use the 8259 */
78#define NR_8259_INTS 0
79
80/* CPM Ethernet through SCC3 */
81#define PA_ENET_RXD ((ushort)0x0040)
82#define PA_ENET_TXD ((ushort)0x0080)
83#define PE_ENET_TCLK ((uint)0x00004000)
84#define PE_ENET_RCLK ((uint)0x00008000)
85#define PE_ENET_TENA ((uint)0x00000010)
86#define PC_ENET_CLSN ((ushort)0x0400)
87#define PC_ENET_RENA ((ushort)0x0800)
88
89/* Control bits in the SICR to route TCLK (CLK5) and RCLK (CLK6) to
90 * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero */
91#define SICR_ENET_MASK ((uint)0x00ff0000)
92#define SICR_ENET_CLKRT ((uint)0x002c0000)
93
94#endif /* __ASM_MPC885ADS_H__ */
95#endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
new file mode 100644
index 000000000000..c5fefdf66c0a
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -0,0 +1,387 @@
1/*arch/ppc/platforms/mpc885ads-setup.c
2 *
3 * Platform setup for the Freescale mpc885ads board
4 *
5 * Vitaly Bordug <vbordug@ru.mvista.com>
6 *
7 * Copyright 2005 MontaVista Software Inc.
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 */
13
14#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/param.h>
17#include <linux/string.h>
18#include <linux/ioport.h>
19#include <linux/device.h>
20#include <linux/delay.h>
21#include <linux/root_dev.h>
22
23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h>
25#include <linux/mii.h>
26
27#include <asm/delay.h>
28#include <asm/io.h>
29#include <asm/machdep.h>
30#include <asm/page.h>
31#include <asm/processor.h>
32#include <asm/system.h>
33#include <asm/time.h>
34#include <asm/ppcboot.h>
35#include <asm/mpc8xx.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/fs_pd.h>
39#include <asm/prom.h>
40
41extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*);
43extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
46extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void);
49
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
51static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
52static void init_scc3_ioports(struct fs_platform_info* ptr);
53
54void __init mpc885ads_board_setup(void)
55{
56 cpm8xx_t *cp;
57 unsigned int *bcsr_io;
58 u8 tmpval8;
59
60#ifdef CONFIG_FS_ENET
61 iop8xx_t *io_port;
62#endif
63
64 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
65 cp = (cpm8xx_t *)immr_map(im_cpm);
66
67 if (bcsr_io == NULL) {
68 printk(KERN_CRIT "Could not remap BCSR\n");
69 return;
70 }
71#ifdef CONFIG_SERIAL_CPM_SMC1
72 clrbits32(bcsr_io, BCSR1_RS232EN_1);
73 clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
74 tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
75 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
76 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */
77#else
78 setbits32(bcsr_io,BCSR1_RS232EN_1);
79 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
80 out_8(&cp->cp_smc[0].smc_smce, 0);
81#endif
82
83#ifdef CONFIG_SERIAL_CPM_SMC2
84 clrbits32(bcsr_io,BCSR1_RS232EN_2);
85 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
86 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
87 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
88 out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
89 clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
90
91 init_smc2_uart_ioports(0);
92#else
93 setbits32(bcsr_io,BCSR1_RS232EN_2);
94 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
95 out_8(&cp->cp_smc[1].smc_smce, 0);
96#endif
97 immr_unmap(cp);
98 iounmap(bcsr_io);
99
100#ifdef CONFIG_FS_ENET
101 /* use MDC for MII (common) */
102 io_port = (iop8xx_t*)immr_map(im_ioport);
103 setbits16(&io_port->iop_pdpar, 0x0080);
104 clrbits16(&io_port->iop_pddir, 0x0080);
105
106 bcsr_io = ioremap(BCSR5, sizeof(unsigned long));
107 clrbits32(bcsr_io,BCSR5_MII1_EN);
108 clrbits32(bcsr_io,BCSR5_MII1_RST);
109#ifndef CONFIG_FC_ENET_HAS_SCC
110 clrbits32(bcsr_io,BCSR5_MII2_EN);
111 clrbits32(bcsr_io,BCSR5_MII2_RST);
112
113#endif
114 iounmap(bcsr_io);
115 immr_unmap(io_port);
116
117#endif
118}
119
120
121static void init_fec1_ioports(struct fs_platform_info* ptr)
122{
123 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
124 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
125
126 /* configure FEC1 pins */
127 setbits16(&io_port->iop_papar, 0xf830);
128 setbits16(&io_port->iop_padir, 0x0830);
129 clrbits16(&io_port->iop_padir, 0xf000);
130
131 setbits32(&cp->cp_pbpar, 0x00001001);
132 clrbits32(&cp->cp_pbdir, 0x00001001);
133
134 setbits16(&io_port->iop_pcpar, 0x000c);
135 clrbits16(&io_port->iop_pcdir, 0x000c);
136
137 setbits32(&cp->cp_pepar, 0x00000003);
138 setbits32(&cp->cp_pedir, 0x00000003);
139 clrbits32(&cp->cp_peso, 0x00000003);
140 clrbits32(&cp->cp_cptr, 0x00000100);
141
142 immr_unmap(io_port);
143 immr_unmap(cp);
144}
145
146
147static void init_fec2_ioports(struct fs_platform_info* ptr)
148{
149 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
150 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
151
152 /* configure FEC2 pins */
153 setbits32(&cp->cp_pepar, 0x0003fffc);
154 setbits32(&cp->cp_pedir, 0x0003fffc);
155 clrbits32(&cp->cp_peso, 0x000087fc);
156 setbits32(&cp->cp_peso, 0x00037800);
157 clrbits32(&cp->cp_cptr, 0x00000080);
158
159 immr_unmap(io_port);
160 immr_unmap(cp);
161}
162
163void init_fec_ioports(struct fs_platform_info *fpi)
164{
165 int fec_no = fs_get_fec_index(fpi->fs_no);
166
167 switch (fec_no) {
168 case 0:
169 init_fec1_ioports(fpi);
170 break;
171 case 1:
172 init_fec2_ioports(fpi);
173 break;
174 default:
175 printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
176 return;
177 }
178}
179
180static void init_scc3_ioports(struct fs_platform_info* fpi)
181{
182 unsigned *bcsr_io;
183 iop8xx_t *io_port;
184 cpm8xx_t *cp;
185
186 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
187 io_port = (iop8xx_t *)immr_map(im_ioport);
188 cp = (cpm8xx_t *)immr_map(im_cpm);
189
190 if (bcsr_io == NULL) {
191 printk(KERN_CRIT "Could not remap BCSR\n");
192 return;
193 }
194
195 /* Enable the PHY.
196 */
197 clrbits32(bcsr_io+4, BCSR4_ETH10_RST);
198 udelay(1000);
199 setbits32(bcsr_io+4, BCSR4_ETH10_RST);
200 /* Configure port A pins for Txd and Rxd.
201 */
202 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
203 clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
204
205 /* Configure port C pins to enable CLSN and RENA.
206 */
207 clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
208 clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
209 setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
210
211 /* Configure port E for TCLK and RCLK.
212 */
213 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK);
214 clrbits32(&cp->cp_pepar, PE_ENET_TENA);
215 clrbits32(&cp->cp_pedir,
216 PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
217 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK);
218 setbits32(&cp->cp_peso, PE_ENET_TENA);
219
220 /* Configure Serial Interface clock routing.
221 * First, clear all SCC bits to zero, then set the ones we want.
222 */
223 clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
224 setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
225
226 /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used.
227 */
228 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
229 /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode
230 * by H/W setting after reset. SCC ethernet controller support only half duplex.
231 * This discrepancy of modes causes a lot of carrier lost errors.
232 */
233
234 /* In the original SCC enet driver the following code is placed at
235 the end of the initialization */
236 setbits32(&cp->cp_pepar, PE_ENET_TENA);
237 clrbits32(&cp->cp_pedir, PE_ENET_TENA);
238 setbits32(&cp->cp_peso, PE_ENET_TENA);
239
240 setbits32(bcsr_io+4, BCSR1_ETHEN);
241 iounmap(bcsr_io);
242 immr_unmap(io_port);
243 immr_unmap(cp);
244}
245
246void init_scc_ioports(struct fs_platform_info *fpi)
247{
248 int scc_no = fs_get_scc_index(fpi->fs_no);
249
250 switch (scc_no) {
251 case 2:
252 init_scc3_ioports(fpi);
253 break;
254 default:
255 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
256 return;
257 }
258}
259
260
261
262static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
263{
264 unsigned *bcsr_io;
265 cpm8xx_t *cp;
266
267 cp = (cpm8xx_t *)immr_map(im_cpm);
268 setbits32(&cp->cp_pepar, 0x000000c0);
269 clrbits32(&cp->cp_pedir, 0x000000c0);
270 clrbits32(&cp->cp_peso, 0x00000040);
271 setbits32(&cp->cp_peso, 0x00000080);
272 immr_unmap(cp);
273
274 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
275
276 if (bcsr_io == NULL) {
277 printk(KERN_CRIT "Could not remap BCSR1\n");
278 return;
279 }
280 clrbits32(bcsr_io,BCSR1_RS232EN_1);
281 iounmap(bcsr_io);
282}
283
284static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
285{
286 unsigned *bcsr_io;
287 cpm8xx_t *cp;
288
289 cp = (cpm8xx_t *)immr_map(im_cpm);
290 setbits32(&cp->cp_pepar, 0x00000c00);
291 clrbits32(&cp->cp_pedir, 0x00000c00);
292 clrbits32(&cp->cp_peso, 0x00000400);
293 setbits32(&cp->cp_peso, 0x00000800);
294 immr_unmap(cp);
295
296 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
297
298 if (bcsr_io == NULL) {
299 printk(KERN_CRIT "Could not remap BCSR1\n");
300 return;
301 }
302 clrbits32(bcsr_io,BCSR1_RS232EN_2);
303 iounmap(bcsr_io);
304}
305
306void init_smc_ioports(struct fs_uart_platform_info *data)
307{
308 int smc_no = fs_uart_id_fsid2smc(data->fs_no);
309
310 switch (smc_no) {
311 case 0:
312 init_smc1_uart_ioports(data);
313 data->brg = data->clk_rx;
314 break;
315 case 1:
316 init_smc2_uart_ioports(data);
317 data->brg = data->clk_rx;
318 break;
319 default:
320 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
321 return;
322 }
323}
324
325int platform_device_skip(char *model, int id)
326{
327#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
328 const char *dev = "FEC";
329 int n = 2;
330#else
331 const char *dev = "SCC";
332 int n = 3;
333#endif
334
335 if (!strcmp(model, dev) && n == id)
336 return 1;
337
338 return 0;
339}
340
341static void __init mpc885ads_setup_arch(void)
342{
343 struct device_node *cpu;
344
345 cpu = of_find_node_by_type(NULL, "cpu");
346 if (cpu != 0) {
347 const unsigned int *fp;
348
349 fp = get_property(cpu, "clock-frequency", NULL);
350 if (fp != 0)
351 loops_per_jiffy = *fp / HZ;
352 else
353 loops_per_jiffy = 50000000 / HZ;
354 of_node_put(cpu);
355 }
356
357 cpm_reset();
358
359 mpc885ads_board_setup();
360
361 ROOT_DEV = Root_NFS;
362}
363
364static int __init mpc885ads_probe(void)
365{
366 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
367 "model", NULL);
368 if (model == NULL)
369 return 0;
370 if (strcmp(model, "MPC885ADS"))
371 return 0;
372
373 return 1;
374}
375
376define_machine(mpc885_ads) {
377 .name = "MPC885 ADS",
378 .probe = mpc885ads_probe,
379 .setup_arch = mpc885ads_setup_arch,
380 .init_IRQ = m8xx_pic_init,
381 .show_cpuinfo = mpc8xx_show_cpuinfo,
382 .get_irq = mpc8xx_get_irq,
383 .restart = mpc8xx_restart,
384 .calibrate_decr = mpc8xx_calibrate_decr,
385 .set_rtc_time = mpc8xx_set_rtc_time,
386 .get_rtc_time = mpc8xx_get_rtc_time,
387};
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 507d1b98f270..452004283f17 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -5,9 +5,11 @@ ifeq ($(CONFIG_PPC64),y)
5obj-$(CONFIG_PPC_PMAC) += powermac/ 5obj-$(CONFIG_PPC_PMAC) += powermac/
6endif 6endif
7endif 7endif
8obj-$(CONFIG_PPC_MPC52xx) += 52xx/
9obj-$(CONFIG_PPC_CHRP) += chrp/ 8obj-$(CONFIG_PPC_CHRP) += chrp/
10obj-$(CONFIG_4xx) += 4xx/ 9obj-$(CONFIG_4xx) += 4xx/
10obj-$(CONFIG_PPC_MPC52xx) += 52xx/
11obj-$(CONFIG_PPC_8xx) += 8xx/
12obj-$(CONFIG_PPC_82xx) += 82xx/
11obj-$(CONFIG_PPC_83xx) += 83xx/ 13obj-$(CONFIG_PPC_83xx) += 83xx/
12obj-$(CONFIG_PPC_85xx) += 85xx/ 14obj-$(CONFIG_PPC_85xx) += 85xx/
13obj-$(CONFIG_PPC_86xx) += 86xx/ 15obj-$(CONFIG_PPC_86xx) += 86xx/
@@ -17,4 +19,5 @@ obj-$(CONFIG_PPC_MAPLE) += maple/
17obj-$(CONFIG_PPC_PASEMI) += pasemi/ 19obj-$(CONFIG_PPC_PASEMI) += pasemi/
18obj-$(CONFIG_PPC_CELL) += cell/ 20obj-$(CONFIG_PPC_CELL) += cell/
19obj-$(CONFIG_PPC_PS3) += ps3/ 21obj-$(CONFIG_PPC_PS3) += ps3/
22obj-$(CONFIG_PPC_CELLEB) += celleb/
20obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/ 23obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index f90e8337796c..869af89df6ff 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -14,7 +14,12 @@ endif
14spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o 14spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o
15spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o 15spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o
16 16
17spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o
18spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o
19
17obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ 20obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
18 spu_coredump.o \ 21 spu_coredump.o \
19 $(spufs-modular-m) \ 22 $(spufs-modular-m) \
20 $(spu-priv1-y) spufs/ 23 $(spu-priv1-y) \
24 $(spu-manage-y) \
25 spufs/
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index b43466ba8096..67d617b60a23 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -149,7 +149,8 @@ static int cbe_nr_iommus;
149static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, 149static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte,
150 long n_ptes) 150 long n_ptes)
151{ 151{
152 unsigned long *reg, val; 152 unsigned long __iomem *reg;
153 unsigned long val;
153 long n; 154 long n;
154 155
155 reg = iommu->xlate_regs + IOC_IOPT_CacheInvd; 156 reg = iommu->xlate_regs + IOC_IOPT_CacheInvd;
@@ -592,7 +593,7 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
592 /* Init base fields */ 593 /* Init base fields */
593 i = cbe_nr_iommus++; 594 i = cbe_nr_iommus++;
594 iommu = &iommus[i]; 595 iommu = &iommus[i];
595 iommu->stab = 0; 596 iommu->stab = NULL;
596 iommu->nid = nid; 597 iommu->nid = nid;
597 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i); 598 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i);
598 INIT_LIST_HEAD(&iommu->windows); 599 INIT_LIST_HEAD(&iommu->windows);
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index d04ae1671e6c..66ca4b5a1dbc 100644
--- a/arch/powerpc/platforms/cell/pmu.c
+++ b/arch/powerpc/platforms/cell/pmu.c
@@ -345,18 +345,12 @@ EXPORT_SYMBOL_GPL(cbe_read_trace_buffer);
345 * Enabling/disabling interrupts for the entire performance monitoring unit. 345 * Enabling/disabling interrupts for the entire performance monitoring unit.
346 */ 346 */
347 347
348u32 cbe_query_pm_interrupts(u32 cpu) 348u32 cbe_get_and_clear_pm_interrupts(u32 cpu)
349{
350 return cbe_read_pm(cpu, pm_status);
351}
352EXPORT_SYMBOL_GPL(cbe_query_pm_interrupts);
353
354u32 cbe_clear_pm_interrupts(u32 cpu)
355{ 349{
356 /* Reading pm_status clears the interrupt bits. */ 350 /* Reading pm_status clears the interrupt bits. */
357 return cbe_query_pm_interrupts(cpu); 351 return cbe_read_pm(cpu, pm_status);
358} 352}
359EXPORT_SYMBOL_GPL(cbe_clear_pm_interrupts); 353EXPORT_SYMBOL_GPL(cbe_get_and_clear_pm_interrupts);
360 354
361void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask) 355void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
362{ 356{
@@ -371,7 +365,7 @@ EXPORT_SYMBOL_GPL(cbe_enable_pm_interrupts);
371 365
372void cbe_disable_pm_interrupts(u32 cpu) 366void cbe_disable_pm_interrupts(u32 cpu)
373{ 367{
374 cbe_clear_pm_interrupts(cpu); 368 cbe_get_and_clear_pm_interrupts(cpu);
375 cbe_write_pm(cpu, pm_status, 0); 369 cbe_write_pm(cpu, pm_status, 0);
376} 370}
377EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts); 371EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts);
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index bd7bffc3ddd0..c43999a10deb 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -170,9 +170,11 @@ int
170spu_irq_class_0_bottom(struct spu *spu) 170spu_irq_class_0_bottom(struct spu *spu)
171{ 171{
172 unsigned long stat, mask; 172 unsigned long stat, mask;
173 unsigned long flags;
173 174
174 spu->class_0_pending = 0; 175 spu->class_0_pending = 0;
175 176
177 spin_lock_irqsave(&spu->register_lock, flags);
176 mask = spu_int_mask_get(spu, 0); 178 mask = spu_int_mask_get(spu, 0);
177 stat = spu_int_stat_get(spu, 0); 179 stat = spu_int_stat_get(spu, 0);
178 180
@@ -188,6 +190,7 @@ spu_irq_class_0_bottom(struct spu *spu)
188 __spu_trap_error(spu); 190 __spu_trap_error(spu);
189 191
190 spu_int_stat_clear(spu, 0, stat); 192 spu_int_stat_clear(spu, 0, stat);
193 spin_unlock_irqrestore(&spu->register_lock, flags);
191 194
192 return (stat & 0x7) ? -EIO : 0; 195 return (stat & 0x7) ? -EIO : 0;
193} 196}
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
new file mode 100644
index 000000000000..e34599f53d28
--- /dev/null
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -0,0 +1,366 @@
1/*
2 * spu management operations for of based platforms
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 * Copyright 2006 Sony Corp.
6 * (C) Copyright 2007 TOSHIBA CORPORATION
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * 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 along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22#include <linux/interrupt.h>
23#include <linux/list.h>
24#include <linux/module.h>
25#include <linux/ptrace.h>
26#include <linux/slab.h>
27#include <linux/wait.h>
28#include <linux/mm.h>
29#include <linux/io.h>
30#include <linux/mutex.h>
31#include <linux/device.h>
32
33#include <asm/spu.h>
34#include <asm/spu_priv1.h>
35#include <asm/firmware.h>
36#include <asm/prom.h>
37
38#include "interrupt.h"
39
40struct device_node *spu_devnode(struct spu *spu)
41{
42 return spu->devnode;
43}
44
45EXPORT_SYMBOL_GPL(spu_devnode);
46
47static u64 __init find_spu_unit_number(struct device_node *spe)
48{
49 const unsigned int *prop;
50 int proplen;
51 prop = get_property(spe, "unit-id", &proplen);
52 if (proplen == 4)
53 return (u64)*prop;
54
55 prop = get_property(spe, "reg", &proplen);
56 if (proplen == 4)
57 return (u64)*prop;
58
59 return 0;
60}
61
62static void spu_unmap(struct spu *spu)
63{
64 if (!firmware_has_feature(FW_FEATURE_LPAR))
65 iounmap(spu->priv1);
66 iounmap(spu->priv2);
67 iounmap(spu->problem);
68 iounmap((__force u8 __iomem *)spu->local_store);
69}
70
71static int __init spu_map_interrupts_old(struct spu *spu,
72 struct device_node *np)
73{
74 unsigned int isrc;
75 const u32 *tmp;
76 int nid;
77
78 /* Get the interrupt source unit from the device-tree */
79 tmp = get_property(np, "isrc", NULL);
80 if (!tmp)
81 return -ENODEV;
82 isrc = tmp[0];
83
84 tmp = get_property(np->parent->parent, "node-id", NULL);
85 if (!tmp) {
86 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
87 nid = spu->node;
88 } else
89 nid = tmp[0];
90
91 /* Add the node number */
92 isrc |= nid << IIC_IRQ_NODE_SHIFT;
93
94 /* Now map interrupts of all 3 classes */
95 spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
96 spu->irqs[1] = irq_create_mapping(NULL, IIC_IRQ_CLASS_1 | isrc);
97 spu->irqs[2] = irq_create_mapping(NULL, IIC_IRQ_CLASS_2 | isrc);
98
99 /* Right now, we only fail if class 2 failed */
100 return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
101}
102
103static void __iomem * __init spu_map_prop_old(struct spu *spu,
104 struct device_node *n,
105 const char *name)
106{
107 const struct address_prop {
108 unsigned long address;
109 unsigned int len;
110 } __attribute__((packed)) *prop;
111 int proplen;
112
113 prop = get_property(n, name, &proplen);
114 if (prop == NULL || proplen != sizeof (struct address_prop))
115 return NULL;
116
117 return ioremap(prop->address, prop->len);
118}
119
120static int __init spu_map_device_old(struct spu *spu)
121{
122 struct device_node *node = spu->devnode;
123 const char *prop;
124 int ret;
125
126 ret = -ENODEV;
127 spu->name = get_property(node, "name", NULL);
128 if (!spu->name)
129 goto out;
130
131 prop = get_property(node, "local-store", NULL);
132 if (!prop)
133 goto out;
134 spu->local_store_phys = *(unsigned long *)prop;
135
136 /* we use local store as ram, not io memory */
137 spu->local_store = (void __force *)
138 spu_map_prop_old(spu, node, "local-store");
139 if (!spu->local_store)
140 goto out;
141
142 prop = get_property(node, "problem", NULL);
143 if (!prop)
144 goto out_unmap;
145 spu->problem_phys = *(unsigned long *)prop;
146
147 spu->problem = spu_map_prop_old(spu, node, "problem");
148 if (!spu->problem)
149 goto out_unmap;
150
151 spu->priv2 = spu_map_prop_old(spu, node, "priv2");
152 if (!spu->priv2)
153 goto out_unmap;
154
155 if (!firmware_has_feature(FW_FEATURE_LPAR)) {
156 spu->priv1 = spu_map_prop_old(spu, node, "priv1");
157 if (!spu->priv1)
158 goto out_unmap;
159 }
160
161 ret = 0;
162 goto out;
163
164out_unmap:
165 spu_unmap(spu);
166out:
167 return ret;
168}
169
170static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
171{
172 struct of_irq oirq;
173 int ret;
174 int i;
175
176 for (i=0; i < 3; i++) {
177 ret = of_irq_map_one(np, i, &oirq);
178 if (ret) {
179 pr_debug("spu_new: failed to get irq %d\n", i);
180 goto err;
181 }
182 ret = -EINVAL;
183 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0],
184 oirq.controller->full_name);
185 spu->irqs[i] = irq_create_of_mapping(oirq.controller,
186 oirq.specifier, oirq.size);
187 if (spu->irqs[i] == NO_IRQ) {
188 pr_debug("spu_new: failed to map it !\n");
189 goto err;
190 }
191 }
192 return 0;
193
194err:
195 pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier,
196 spu->name);
197 for (; i >= 0; i--) {
198 if (spu->irqs[i] != NO_IRQ)
199 irq_dispose_mapping(spu->irqs[i]);
200 }
201 return ret;
202}
203
204static int spu_map_resource(struct spu *spu, int nr,
205 void __iomem** virt, unsigned long *phys)
206{
207 struct device_node *np = spu->devnode;
208 struct resource resource = { };
209 unsigned long len;
210 int ret;
211
212 ret = of_address_to_resource(np, nr, &resource);
213 if (ret)
214 return ret;
215 if (phys)
216 *phys = resource.start;
217 len = resource.end - resource.start + 1;
218 *virt = ioremap(resource.start, len);
219 if (!*virt)
220 return -EINVAL;
221 return 0;
222}
223
224static int __init spu_map_device(struct spu *spu)
225{
226 struct device_node *np = spu->devnode;
227 int ret = -ENODEV;
228
229 spu->name = get_property(np, "name", NULL);
230 if (!spu->name)
231 goto out;
232
233 ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
234 &spu->local_store_phys);
235 if (ret) {
236 pr_debug("spu_new: failed to map %s resource 0\n",
237 np->full_name);
238 goto out;
239 }
240 ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
241 &spu->problem_phys);
242 if (ret) {
243 pr_debug("spu_new: failed to map %s resource 1\n",
244 np->full_name);
245 goto out_unmap;
246 }
247 ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
248 if (ret) {
249 pr_debug("spu_new: failed to map %s resource 2\n",
250 np->full_name);
251 goto out_unmap;
252 }
253 if (!firmware_has_feature(FW_FEATURE_LPAR))
254 ret = spu_map_resource(spu, 3,
255 (void __iomem**)&spu->priv1, NULL);
256 if (ret) {
257 pr_debug("spu_new: failed to map %s resource 3\n",
258 np->full_name);
259 goto out_unmap;
260 }
261 pr_debug("spu_new: %s maps:\n", np->full_name);
262 pr_debug(" local store : 0x%016lx -> 0x%p\n",
263 spu->local_store_phys, spu->local_store);
264 pr_debug(" problem state : 0x%016lx -> 0x%p\n",
265 spu->problem_phys, spu->problem);
266 pr_debug(" priv2 : 0x%p\n", spu->priv2);
267 pr_debug(" priv1 : 0x%p\n", spu->priv1);
268
269 return 0;
270
271out_unmap:
272 spu_unmap(spu);
273out:
274 pr_debug("failed to map spe %s: %d\n", spu->name, ret);
275 return ret;
276}
277
278static int __init of_enumerate_spus(int (*fn)(void *data))
279{
280 int ret;
281 struct device_node *node;
282
283 ret = -ENODEV;
284 for (node = of_find_node_by_type(NULL, "spe");
285 node; node = of_find_node_by_type(node, "spe")) {
286 ret = fn(node);
287 if (ret) {
288 printk(KERN_WARNING "%s: Error initializing %s\n",
289 __FUNCTION__, node->name);
290 break;
291 }
292 }
293 return ret;
294}
295
296static int __init of_create_spu(struct spu *spu, void *data)
297{
298 int ret;
299 struct device_node *spe = (struct device_node *)data;
300 static int legacy_map = 0, legacy_irq = 0;
301
302 spu->devnode = of_node_get(spe);
303 spu->spe_id = find_spu_unit_number(spe);
304
305 spu->node = of_node_to_nid(spe);
306 if (spu->node >= MAX_NUMNODES) {
307 printk(KERN_WARNING "SPE %s on node %d ignored,"
308 " node number too big\n", spe->full_name, spu->node);
309 printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
310 ret = -ENODEV;
311 goto out;
312 }
313
314 ret = spu_map_device(spu);
315 if (ret) {
316 if (!legacy_map) {
317 legacy_map = 1;
318 printk(KERN_WARNING "%s: Legacy device tree found, "
319 "trying to map old style\n", __FUNCTION__);
320 }
321 ret = spu_map_device_old(spu);
322 if (ret) {
323 printk(KERN_ERR "Unable to map %s\n",
324 spu->name);
325 goto out;
326 }
327 }
328
329 ret = spu_map_interrupts(spu, spe);
330 if (ret) {
331 if (!legacy_irq) {
332 legacy_irq = 1;
333 printk(KERN_WARNING "%s: Legacy device tree found, "
334 "trying old style irq\n", __FUNCTION__);
335 }
336 ret = spu_map_interrupts_old(spu, spe);
337 if (ret) {
338 printk(KERN_ERR "%s: could not map interrupts",
339 spu->name);
340 goto out_unmap;
341 }
342 }
343
344 pr_debug("Using SPE %s %p %p %p %p %d\n", spu->name,
345 spu->local_store, spu->problem, spu->priv1,
346 spu->priv2, spu->number);
347 goto out;
348
349out_unmap:
350 spu_unmap(spu);
351out:
352 return ret;
353}
354
355static int of_destroy_spu(struct spu *spu)
356{
357 spu_unmap(spu);
358 of_node_put(spu->devnode);
359 return 0;
360}
361
362const struct spu_management_ops spu_management_of_ops = {
363 .enumerate_spus = of_enumerate_spus,
364 .create_spu = of_create_spu,
365 .destroy_spu = of_destroy_spu,
366};
diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
index 910a926b61a2..67fa7247b80a 100644
--- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c
+++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
@@ -37,490 +37,112 @@
37#include "interrupt.h" 37#include "interrupt.h"
38#include "spu_priv1_mmio.h" 38#include "spu_priv1_mmio.h"
39 39
40static DEFINE_MUTEX(add_spumem_mutex);
41
42struct spu_pdata {
43 struct device_node *devnode;
44 struct spu_priv1 __iomem *priv1;
45};
46
47static struct spu_pdata *spu_get_pdata(struct spu *spu)
48{
49 BUG_ON(!spu->pdata);
50 return spu->pdata;
51}
52
53struct device_node *spu_devnode(struct spu *spu)
54{
55 return spu_get_pdata(spu)->devnode;
56}
57
58EXPORT_SYMBOL_GPL(spu_devnode);
59
60static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
61 const char *prop)
62{
63 const struct address_prop {
64 unsigned long address;
65 unsigned int len;
66 } __attribute__((packed)) *p;
67 int proplen;
68
69 unsigned long start_pfn, nr_pages;
70 struct pglist_data *pgdata;
71 struct zone *zone;
72 int ret;
73
74 p = get_property(spe, prop, &proplen);
75 WARN_ON(proplen != sizeof (*p));
76
77 start_pfn = p->address >> PAGE_SHIFT;
78 nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
79
80 pgdata = NODE_DATA(spu->node);
81 zone = pgdata->node_zones;
82
83 /* XXX rethink locking here */
84 mutex_lock(&add_spumem_mutex);
85 ret = __add_pages(zone, start_pfn, nr_pages);
86 mutex_unlock(&add_spumem_mutex);
87
88 return ret;
89}
90
91static void __iomem * __init map_spe_prop(struct spu *spu,
92 struct device_node *n, const char *name)
93{
94 const struct address_prop {
95 unsigned long address;
96 unsigned int len;
97 } __attribute__((packed)) *prop;
98
99 const void *p;
100 int proplen;
101 void __iomem *ret = NULL;
102 int err = 0;
103
104 p = get_property(n, name, &proplen);
105 if (proplen != sizeof (struct address_prop))
106 return NULL;
107
108 prop = p;
109
110 err = cell_spuprop_present(spu, n, name);
111 if (err && (err != -EEXIST))
112 goto out;
113
114 ret = ioremap(prop->address, prop->len);
115
116 out:
117 return ret;
118}
119
120static void spu_unmap(struct spu *spu)
121{
122 iounmap(spu->priv2);
123 iounmap(spu_get_pdata(spu)->priv1);
124 iounmap(spu->problem);
125 iounmap((__force u8 __iomem *)spu->local_store);
126}
127
128static int __init spu_map_interrupts_old(struct spu *spu,
129 struct device_node *np)
130{
131 unsigned int isrc;
132 const u32 *tmp;
133 int nid;
134
135 /* Get the interrupt source unit from the device-tree */
136 tmp = get_property(np, "isrc", NULL);
137 if (!tmp)
138 return -ENODEV;
139 isrc = tmp[0];
140
141 tmp = get_property(np->parent->parent, "node-id", NULL);
142 if (!tmp) {
143 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
144 nid = spu->node;
145 } else
146 nid = tmp[0];
147
148 /* Add the node number */
149 isrc |= nid << IIC_IRQ_NODE_SHIFT;
150
151 /* Now map interrupts of all 3 classes */
152 spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
153 spu->irqs[1] = irq_create_mapping(NULL, IIC_IRQ_CLASS_1 | isrc);
154 spu->irqs[2] = irq_create_mapping(NULL, IIC_IRQ_CLASS_2 | isrc);
155
156 /* Right now, we only fail if class 2 failed */
157 return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
158}
159
160static int __init spu_map_device_old(struct spu *spu, struct device_node *node)
161{
162 const char *prop;
163 int ret;
164
165 ret = -ENODEV;
166 spu->name = get_property(node, "name", NULL);
167 if (!spu->name)
168 goto out;
169
170 prop = get_property(node, "local-store", NULL);
171 if (!prop)
172 goto out;
173 spu->local_store_phys = *(unsigned long *)prop;
174
175 /* we use local store as ram, not io memory */
176 spu->local_store = (void __force *)
177 map_spe_prop(spu, node, "local-store");
178 if (!spu->local_store)
179 goto out;
180
181 prop = get_property(node, "problem", NULL);
182 if (!prop)
183 goto out_unmap;
184 spu->problem_phys = *(unsigned long *)prop;
185
186 spu->problem= map_spe_prop(spu, node, "problem");
187 if (!spu->problem)
188 goto out_unmap;
189
190 spu_get_pdata(spu)->priv1= map_spe_prop(spu, node, "priv1");
191
192 spu->priv2= map_spe_prop(spu, node, "priv2");
193 if (!spu->priv2)
194 goto out_unmap;
195 ret = 0;
196 goto out;
197
198out_unmap:
199 spu_unmap(spu);
200out:
201 return ret;
202}
203
204static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
205{
206 struct of_irq oirq;
207 int ret;
208 int i;
209
210 for (i=0; i < 3; i++) {
211 ret = of_irq_map_one(np, i, &oirq);
212 if (ret) {
213 pr_debug("spu_new: failed to get irq %d\n", i);
214 goto err;
215 }
216 ret = -EINVAL;
217 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0],
218 oirq.controller->full_name);
219 spu->irqs[i] = irq_create_of_mapping(oirq.controller,
220 oirq.specifier, oirq.size);
221 if (spu->irqs[i] == NO_IRQ) {
222 pr_debug("spu_new: failed to map it !\n");
223 goto err;
224 }
225 }
226 return 0;
227
228err:
229 pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier,
230 spu->name);
231 for (; i >= 0; i--) {
232 if (spu->irqs[i] != NO_IRQ)
233 irq_dispose_mapping(spu->irqs[i]);
234 }
235 return ret;
236}
237
238static int spu_map_resource(struct spu *spu, int nr,
239 void __iomem** virt, unsigned long *phys)
240{
241 struct device_node *np = spu_get_pdata(spu)->devnode;
242 unsigned long start_pfn, nr_pages;
243 struct pglist_data *pgdata;
244 struct zone *zone;
245 struct resource resource = { };
246 unsigned long len;
247 int ret;
248
249 ret = of_address_to_resource(np, nr, &resource);
250 if (ret)
251 goto out;
252
253 if (phys)
254 *phys = resource.start;
255 len = resource.end - resource.start + 1;
256 *virt = ioremap(resource.start, len);
257 if (!*virt)
258 ret = -EINVAL;
259
260 start_pfn = resource.start >> PAGE_SHIFT;
261 nr_pages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
262
263 pgdata = NODE_DATA(spu->node);
264 zone = pgdata->node_zones;
265
266 /* XXX rethink locking here */
267 mutex_lock(&add_spumem_mutex);
268 ret = __add_pages(zone, start_pfn, nr_pages);
269 mutex_unlock(&add_spumem_mutex);
270
271out:
272 return ret;
273}
274
275static int __init spu_map_device(struct spu *spu)
276{
277 struct device_node *np = spu_get_pdata(spu)->devnode;
278 int ret = -ENODEV;
279
280 spu->name = get_property(np, "name", NULL);
281 if (!spu->name)
282 goto out;
283
284 ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
285 &spu->local_store_phys);
286 if (ret) {
287 pr_debug("spu_new: failed to map %s resource 0\n",
288 np->full_name);
289 goto out;
290 }
291 ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
292 &spu->problem_phys);
293 if (ret) {
294 pr_debug("spu_new: failed to map %s resource 1\n",
295 np->full_name);
296 goto out_unmap;
297 }
298 ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
299 if (ret) {
300 pr_debug("spu_new: failed to map %s resource 2\n",
301 np->full_name);
302 goto out_unmap;
303 }
304 if (!firmware_has_feature(FW_FEATURE_LPAR))
305 ret = spu_map_resource(spu, 3,
306 (void __iomem**)&spu_get_pdata(spu)->priv1, NULL);
307 if (ret) {
308 pr_debug("spu_new: failed to map %s resource 3\n",
309 np->full_name);
310 goto out_unmap;
311 }
312 pr_debug("spu_new: %s maps:\n", np->full_name);
313 pr_debug(" local store : 0x%016lx -> 0x%p\n",
314 spu->local_store_phys, spu->local_store);
315 pr_debug(" problem state : 0x%016lx -> 0x%p\n",
316 spu->problem_phys, spu->problem);
317 pr_debug(" priv2 : 0x%p\n", spu->priv2);
318 pr_debug(" priv1 : 0x%p\n",
319 spu_get_pdata(spu)->priv1);
320
321 return 0;
322
323out_unmap:
324 spu_unmap(spu);
325out:
326 pr_debug("failed to map spe %s: %d\n", spu->name, ret);
327 return ret;
328}
329
330static int __init of_enumerate_spus(int (*fn)(void *data))
331{
332 int ret;
333 struct device_node *node;
334
335 ret = -ENODEV;
336 for (node = of_find_node_by_type(NULL, "spe");
337 node; node = of_find_node_by_type(node, "spe")) {
338 ret = fn(node);
339 if (ret) {
340 printk(KERN_WARNING "%s: Error initializing %s\n",
341 __FUNCTION__, node->name);
342 break;
343 }
344 }
345 return ret;
346}
347
348static int __init of_create_spu(struct spu *spu, void *data)
349{
350 int ret;
351 struct device_node *spe = (struct device_node *)data;
352
353 spu->pdata = kzalloc(sizeof(struct spu_pdata),
354 GFP_KERNEL);
355 if (!spu->pdata) {
356 ret = -ENOMEM;
357 goto out;
358 }
359 spu_get_pdata(spu)->devnode = of_node_get(spe);
360
361 spu->node = of_node_to_nid(spe);
362 if (spu->node >= MAX_NUMNODES) {
363 printk(KERN_WARNING "SPE %s on node %d ignored,"
364 " node number too big\n", spe->full_name, spu->node);
365 printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
366 ret = -ENODEV;
367 goto out_free;
368 }
369
370 ret = spu_map_device(spu);
371 /* try old method */
372 if (ret)
373 ret = spu_map_device_old(spu, spe);
374 if (ret)
375 goto out_free;
376
377 ret = spu_map_interrupts(spu, spe);
378 if (ret)
379 ret = spu_map_interrupts_old(spu, spe);
380 if (ret)
381 goto out_unmap;
382
383 pr_debug(KERN_DEBUG "Using SPE %s %p %p %p %p %d\n", spu->name,
384 spu->local_store, spu->problem, spu_get_pdata(spu)->priv1,
385 spu->priv2, spu->number);
386 goto out;
387
388out_unmap:
389 spu_unmap(spu);
390out_free:
391 kfree(spu->pdata);
392 spu->pdata = NULL;
393out:
394 return ret;
395}
396
397static int of_destroy_spu(struct spu *spu)
398{
399 spu_unmap(spu);
400 of_node_put(spu_get_pdata(spu)->devnode);
401 kfree(spu->pdata);
402 spu->pdata = NULL;
403 return 0;
404}
405
406const struct spu_management_ops spu_management_of_ops = {
407 .enumerate_spus = of_enumerate_spus,
408 .create_spu = of_create_spu,
409 .destroy_spu = of_destroy_spu,
410};
411
412static void int_mask_and(struct spu *spu, int class, u64 mask) 40static void int_mask_and(struct spu *spu, int class, u64 mask)
413{ 41{
414 u64 old_mask; 42 u64 old_mask;
415 43
416 old_mask = in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 44 old_mask = in_be64(&spu->priv1->int_mask_RW[class]);
417 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], 45 out_be64(&spu->priv1->int_mask_RW[class], old_mask & mask);
418 old_mask & mask);
419} 46}
420 47
421static void int_mask_or(struct spu *spu, int class, u64 mask) 48static void int_mask_or(struct spu *spu, int class, u64 mask)
422{ 49{
423 u64 old_mask; 50 u64 old_mask;
424 51
425 old_mask = in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 52 old_mask = in_be64(&spu->priv1->int_mask_RW[class]);
426 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], 53 out_be64(&spu->priv1->int_mask_RW[class], old_mask | mask);
427 old_mask | mask);
428} 54}
429 55
430static void int_mask_set(struct spu *spu, int class, u64 mask) 56static void int_mask_set(struct spu *spu, int class, u64 mask)
431{ 57{
432 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], mask); 58 out_be64(&spu->priv1->int_mask_RW[class], mask);
433} 59}
434 60
435static u64 int_mask_get(struct spu *spu, int class) 61static u64 int_mask_get(struct spu *spu, int class)
436{ 62{
437 return in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 63 return in_be64(&spu->priv1->int_mask_RW[class]);
438} 64}
439 65
440static void int_stat_clear(struct spu *spu, int class, u64 stat) 66static void int_stat_clear(struct spu *spu, int class, u64 stat)
441{ 67{
442 out_be64(&spu_get_pdata(spu)->priv1->int_stat_RW[class], stat); 68 out_be64(&spu->priv1->int_stat_RW[class], stat);
443} 69}
444 70
445static u64 int_stat_get(struct spu *spu, int class) 71static u64 int_stat_get(struct spu *spu, int class)
446{ 72{
447 return in_be64(&spu_get_pdata(spu)->priv1->int_stat_RW[class]); 73 return in_be64(&spu->priv1->int_stat_RW[class]);
448} 74}
449 75
450static void cpu_affinity_set(struct spu *spu, int cpu) 76static void cpu_affinity_set(struct spu *spu, int cpu)
451{ 77{
452 u64 target = iic_get_target_id(cpu); 78 u64 target = iic_get_target_id(cpu);
453 u64 route = target << 48 | target << 32 | target << 16; 79 u64 route = target << 48 | target << 32 | target << 16;
454 out_be64(&spu_get_pdata(spu)->priv1->int_route_RW, route); 80 out_be64(&spu->priv1->int_route_RW, route);
455} 81}
456 82
457static u64 mfc_dar_get(struct spu *spu) 83static u64 mfc_dar_get(struct spu *spu)
458{ 84{
459 return in_be64(&spu_get_pdata(spu)->priv1->mfc_dar_RW); 85 return in_be64(&spu->priv1->mfc_dar_RW);
460} 86}
461 87
462static u64 mfc_dsisr_get(struct spu *spu) 88static u64 mfc_dsisr_get(struct spu *spu)
463{ 89{
464 return in_be64(&spu_get_pdata(spu)->priv1->mfc_dsisr_RW); 90 return in_be64(&spu->priv1->mfc_dsisr_RW);
465} 91}
466 92
467static void mfc_dsisr_set(struct spu *spu, u64 dsisr) 93static void mfc_dsisr_set(struct spu *spu, u64 dsisr)
468{ 94{
469 out_be64(&spu_get_pdata(spu)->priv1->mfc_dsisr_RW, dsisr); 95 out_be64(&spu->priv1->mfc_dsisr_RW, dsisr);
470} 96}
471 97
472static void mfc_sdr_setup(struct spu *spu) 98static void mfc_sdr_setup(struct spu *spu)
473{ 99{
474 out_be64(&spu_get_pdata(spu)->priv1->mfc_sdr_RW, mfspr(SPRN_SDR1)); 100 out_be64(&spu->priv1->mfc_sdr_RW, mfspr(SPRN_SDR1));
475} 101}
476 102
477static void mfc_sr1_set(struct spu *spu, u64 sr1) 103static void mfc_sr1_set(struct spu *spu, u64 sr1)
478{ 104{
479 out_be64(&spu_get_pdata(spu)->priv1->mfc_sr1_RW, sr1); 105 out_be64(&spu->priv1->mfc_sr1_RW, sr1);
480} 106}
481 107
482static u64 mfc_sr1_get(struct spu *spu) 108static u64 mfc_sr1_get(struct spu *spu)
483{ 109{
484 return in_be64(&spu_get_pdata(spu)->priv1->mfc_sr1_RW); 110 return in_be64(&spu->priv1->mfc_sr1_RW);
485} 111}
486 112
487static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id) 113static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id)
488{ 114{
489 out_be64(&spu_get_pdata(spu)->priv1->mfc_tclass_id_RW, tclass_id); 115 out_be64(&spu->priv1->mfc_tclass_id_RW, tclass_id);
490} 116}
491 117
492static u64 mfc_tclass_id_get(struct spu *spu) 118static u64 mfc_tclass_id_get(struct spu *spu)
493{ 119{
494 return in_be64(&spu_get_pdata(spu)->priv1->mfc_tclass_id_RW); 120 return in_be64(&spu->priv1->mfc_tclass_id_RW);
495} 121}
496 122
497static void tlb_invalidate(struct spu *spu) 123static void tlb_invalidate(struct spu *spu)
498{ 124{
499 out_be64(&spu_get_pdata(spu)->priv1->tlb_invalidate_entry_W, 0ul); 125 out_be64(&spu->priv1->tlb_invalidate_entry_W, 0ul);
500} 126}
501 127
502static void resource_allocation_groupID_set(struct spu *spu, u64 id) 128static void resource_allocation_groupID_set(struct spu *spu, u64 id)
503{ 129{
504 out_be64(&spu_get_pdata(spu)->priv1->resource_allocation_groupID_RW, 130 out_be64(&spu->priv1->resource_allocation_groupID_RW, id);
505 id);
506} 131}
507 132
508static u64 resource_allocation_groupID_get(struct spu *spu) 133static u64 resource_allocation_groupID_get(struct spu *spu)
509{ 134{
510 return in_be64( 135 return in_be64(&spu->priv1->resource_allocation_groupID_RW);
511 &spu_get_pdata(spu)->priv1->resource_allocation_groupID_RW);
512} 136}
513 137
514static void resource_allocation_enable_set(struct spu *spu, u64 enable) 138static void resource_allocation_enable_set(struct spu *spu, u64 enable)
515{ 139{
516 out_be64(&spu_get_pdata(spu)->priv1->resource_allocation_enable_RW, 140 out_be64(&spu->priv1->resource_allocation_enable_RW, enable);
517 enable);
518} 141}
519 142
520static u64 resource_allocation_enable_get(struct spu *spu) 143static u64 resource_allocation_enable_get(struct spu *spu)
521{ 144{
522 return in_be64( 145 return in_be64(&spu->priv1->resource_allocation_enable_RW);
523 &spu_get_pdata(spu)->priv1->resource_allocation_enable_RW);
524} 146}
525 147
526const struct spu_priv1_ops spu_priv1_mmio_ops = 148const struct spu_priv1_ops spu_priv1_mmio_ops =
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 0870009f56db..04ad2e364e97 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -42,7 +42,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
42 } 42 }
43 spin_lock_init(&ctx->mmio_lock); 43 spin_lock_init(&ctx->mmio_lock);
44 kref_init(&ctx->kref); 44 kref_init(&ctx->kref);
45 init_rwsem(&ctx->state_sema); 45 mutex_init(&ctx->state_mutex);
46 init_MUTEX(&ctx->run_sema); 46 init_MUTEX(&ctx->run_sema);
47 init_waitqueue_head(&ctx->ibox_wq); 47 init_waitqueue_head(&ctx->ibox_wq);
48 init_waitqueue_head(&ctx->wbox_wq); 48 init_waitqueue_head(&ctx->wbox_wq);
@@ -53,6 +53,10 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
53 ctx->owner = get_task_mm(current); 53 ctx->owner = get_task_mm(current);
54 if (gang) 54 if (gang)
55 spu_gang_add_ctx(gang, ctx); 55 spu_gang_add_ctx(gang, ctx);
56 ctx->rt_priority = current->rt_priority;
57 ctx->policy = current->policy;
58 ctx->prio = current->prio;
59 INIT_DELAYED_WORK(&ctx->sched_work, spu_sched_tick);
56 goto out; 60 goto out;
57out_free: 61out_free:
58 kfree(ctx); 62 kfree(ctx);
@@ -65,9 +69,9 @@ void destroy_spu_context(struct kref *kref)
65{ 69{
66 struct spu_context *ctx; 70 struct spu_context *ctx;
67 ctx = container_of(kref, struct spu_context, kref); 71 ctx = container_of(kref, struct spu_context, kref);
68 down_write(&ctx->state_sema); 72 mutex_lock(&ctx->state_mutex);
69 spu_deactivate(ctx); 73 spu_deactivate(ctx);
70 up_write(&ctx->state_sema); 74 mutex_unlock(&ctx->state_mutex);
71 spu_fini_csa(&ctx->csa); 75 spu_fini_csa(&ctx->csa);
72 if (ctx->gang) 76 if (ctx->gang)
73 spu_gang_remove_ctx(ctx->gang, ctx); 77 spu_gang_remove_ctx(ctx->gang, ctx);
@@ -96,107 +100,102 @@ void spu_forget(struct spu_context *ctx)
96 spu_release(ctx); 100 spu_release(ctx);
97} 101}
98 102
99void spu_acquire(struct spu_context *ctx)
100{
101 down_read(&ctx->state_sema);
102}
103
104void spu_release(struct spu_context *ctx)
105{
106 up_read(&ctx->state_sema);
107}
108
109void spu_unmap_mappings(struct spu_context *ctx) 103void spu_unmap_mappings(struct spu_context *ctx)
110{ 104{
111 if (ctx->local_store) 105 if (ctx->local_store)
112 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1); 106 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
113 if (ctx->mfc) 107 if (ctx->mfc)
114 unmap_mapping_range(ctx->mfc, 0, 0x4000, 1); 108 unmap_mapping_range(ctx->mfc, 0, 0x1000, 1);
115 if (ctx->cntl) 109 if (ctx->cntl)
116 unmap_mapping_range(ctx->cntl, 0, 0x4000, 1); 110 unmap_mapping_range(ctx->cntl, 0, 0x1000, 1);
117 if (ctx->signal1) 111 if (ctx->signal1)
118 unmap_mapping_range(ctx->signal1, 0, 0x4000, 1); 112 unmap_mapping_range(ctx->signal1, 0, PAGE_SIZE, 1);
119 if (ctx->signal2) 113 if (ctx->signal2)
120 unmap_mapping_range(ctx->signal2, 0, 0x4000, 1); 114 unmap_mapping_range(ctx->signal2, 0, PAGE_SIZE, 1);
115 if (ctx->mss)
116 unmap_mapping_range(ctx->mss, 0, 0x1000, 1);
117 if (ctx->psmap)
118 unmap_mapping_range(ctx->psmap, 0, 0x20000, 1);
121} 119}
122 120
121/**
122 * spu_acquire_exclusive - lock spu contex and protect against userspace access
123 * @ctx: spu contex to lock
124 *
125 * Note:
126 * Returns 0 and with the context locked on success
127 * Returns negative error and with the context _unlocked_ on failure.
128 */
123int spu_acquire_exclusive(struct spu_context *ctx) 129int spu_acquire_exclusive(struct spu_context *ctx)
124{ 130{
125 int ret = 0; 131 int ret = -EINVAL;
126 132
127 down_write(&ctx->state_sema); 133 spu_acquire(ctx);
128 /* ctx is about to be freed, can't acquire any more */ 134 /*
129 if (!ctx->owner) { 135 * Context is about to be freed, so we can't acquire it anymore.
130 ret = -EINVAL; 136 */
131 goto out; 137 if (!ctx->owner)
132 } 138 goto out_unlock;
133 139
134 if (ctx->state == SPU_STATE_SAVED) { 140 if (ctx->state == SPU_STATE_SAVED) {
135 ret = spu_activate(ctx, 0); 141 ret = spu_activate(ctx, 0);
136 if (ret) 142 if (ret)
137 goto out; 143 goto out_unlock;
138 ctx->state = SPU_STATE_RUNNABLE;
139 } else { 144 } else {
140 /* We need to exclude userspace access to the context. */ 145 /*
146 * We need to exclude userspace access to the context.
147 *
148 * To protect against memory access we invalidate all ptes
149 * and make sure the pagefault handlers block on the mutex.
150 */
141 spu_unmap_mappings(ctx); 151 spu_unmap_mappings(ctx);
142 } 152 }
143 153
144out: 154 return 0;
145 if (ret) 155
146 up_write(&ctx->state_sema); 156 out_unlock:
157 spu_release(ctx);
147 return ret; 158 return ret;
148} 159}
149 160
150int spu_acquire_runnable(struct spu_context *ctx) 161/**
162 * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
163 * @ctx: spu contex to lock
164 *
165 * Note:
166 * Returns 0 and with the context locked on success
167 * Returns negative error and with the context _unlocked_ on failure.
168 */
169int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
151{ 170{
152 int ret = 0; 171 int ret = -EINVAL;
153
154 down_read(&ctx->state_sema);
155 if (ctx->state == SPU_STATE_RUNNABLE) {
156 ctx->spu->prio = current->prio;
157 return 0;
158 }
159 up_read(&ctx->state_sema);
160
161 down_write(&ctx->state_sema);
162 /* ctx is about to be freed, can't acquire any more */
163 if (!ctx->owner) {
164 ret = -EINVAL;
165 goto out;
166 }
167 172
173 spu_acquire(ctx);
168 if (ctx->state == SPU_STATE_SAVED) { 174 if (ctx->state == SPU_STATE_SAVED) {
169 ret = spu_activate(ctx, 0); 175 /*
176 * Context is about to be freed, so we can't acquire it anymore.
177 */
178 if (!ctx->owner)
179 goto out_unlock;
180 ret = spu_activate(ctx, flags);
170 if (ret) 181 if (ret)
171 goto out; 182 goto out_unlock;
172 ctx->state = SPU_STATE_RUNNABLE;
173 } 183 }
174 184
175 downgrade_write(&ctx->state_sema); 185 return 0;
176 /* On success, we return holding the lock */
177
178 return ret;
179out:
180 /* Release here, to simplify calling code. */
181 up_write(&ctx->state_sema);
182 186
187 out_unlock:
188 spu_release(ctx);
183 return ret; 189 return ret;
184} 190}
185 191
192/**
193 * spu_acquire_saved - lock spu contex and make sure it is in saved state
194 * @ctx: spu contex to lock
195 */
186void spu_acquire_saved(struct spu_context *ctx) 196void spu_acquire_saved(struct spu_context *ctx)
187{ 197{
188 down_read(&ctx->state_sema); 198 spu_acquire(ctx);
189 199 if (ctx->state != SPU_STATE_SAVED)
190 if (ctx->state == SPU_STATE_SAVED)
191 return;
192
193 up_read(&ctx->state_sema);
194 down_write(&ctx->state_sema);
195
196 if (ctx->state == SPU_STATE_RUNNABLE) {
197 spu_deactivate(ctx); 200 spu_deactivate(ctx);
198 ctx->state = SPU_STATE_SAVED;
199 }
200
201 downgrade_write(&ctx->state_sema);
202} 201}
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 347eff56fcbd..b00653d69c01 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -45,8 +45,8 @@ spufs_mem_open(struct inode *inode, struct file *file)
45 struct spufs_inode_info *i = SPUFS_I(inode); 45 struct spufs_inode_info *i = SPUFS_I(inode);
46 struct spu_context *ctx = i->i_ctx; 46 struct spu_context *ctx = i->i_ctx;
47 file->private_data = ctx; 47 file->private_data = ctx;
48 file->f_mapping = inode->i_mapping;
49 ctx->local_store = inode->i_mapping; 48 ctx->local_store = inode->i_mapping;
49 smp_wmb();
50 return 0; 50 return 0;
51} 51}
52 52
@@ -95,39 +95,38 @@ spufs_mem_write(struct file *file, const char __user *buffer,
95 return ret; 95 return ret;
96} 96}
97 97
98static struct page * 98static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
99spufs_mem_mmap_nopage(struct vm_area_struct *vma, 99 unsigned long address)
100 unsigned long address, int *type)
101{ 100{
102 struct page *page = NOPAGE_SIGBUS;
103
104 struct spu_context *ctx = vma->vm_file->private_data; 101 struct spu_context *ctx = vma->vm_file->private_data;
105 unsigned long offset = address - vma->vm_start; 102 unsigned long pfn, offset = address - vma->vm_start;
103
106 offset += vma->vm_pgoff << PAGE_SHIFT; 104 offset += vma->vm_pgoff << PAGE_SHIFT;
107 105
106 if (offset >= LS_SIZE)
107 return NOPFN_SIGBUS;
108
108 spu_acquire(ctx); 109 spu_acquire(ctx);
109 110
110 if (ctx->state == SPU_STATE_SAVED) { 111 if (ctx->state == SPU_STATE_SAVED) {
111 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 112 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
112 & ~_PAGE_NO_CACHE); 113 & ~_PAGE_NO_CACHE);
113 page = vmalloc_to_page(ctx->csa.lscsa->ls + offset); 114 pfn = vmalloc_to_pfn(ctx->csa.lscsa->ls + offset);
114 } else { 115 } else {
115 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 116 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
116 | _PAGE_NO_CACHE); 117 | _PAGE_NO_CACHE);
117 page = pfn_to_page((ctx->spu->local_store_phys + offset) 118 pfn = (ctx->spu->local_store_phys + offset) >> PAGE_SHIFT;
118 >> PAGE_SHIFT);
119 } 119 }
120 spu_release(ctx); 120 vm_insert_pfn(vma, address, pfn);
121 121
122 if (type) 122 spu_release(ctx);
123 *type = VM_FAULT_MINOR;
124 123
125 page_cache_get(page); 124 return NOPFN_REFAULT;
126 return page;
127} 125}
128 126
127
129static struct vm_operations_struct spufs_mem_mmap_vmops = { 128static struct vm_operations_struct spufs_mem_mmap_vmops = {
130 .nopage = spufs_mem_mmap_nopage, 129 .nopfn = spufs_mem_mmap_nopfn,
131}; 130};
132 131
133static int 132static int
@@ -136,7 +135,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
136 if (!(vma->vm_flags & VM_SHARED)) 135 if (!(vma->vm_flags & VM_SHARED))
137 return -EINVAL; 136 return -EINVAL;
138 137
139 vma->vm_flags |= VM_IO; 138 vma->vm_flags |= VM_IO | VM_PFNMAP;
140 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 139 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
141 | _PAGE_NO_CACHE); 140 | _PAGE_NO_CACHE);
142 141
@@ -144,7 +143,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
144 return 0; 143 return 0;
145} 144}
146 145
147static struct file_operations spufs_mem_fops = { 146static const struct file_operations spufs_mem_fops = {
148 .open = spufs_mem_open, 147 .open = spufs_mem_open,
149 .read = spufs_mem_read, 148 .read = spufs_mem_read,
150 .write = spufs_mem_write, 149 .write = spufs_mem_write,
@@ -152,49 +151,42 @@ static struct file_operations spufs_mem_fops = {
152 .mmap = spufs_mem_mmap, 151 .mmap = spufs_mem_mmap,
153}; 152};
154 153
155static struct page *spufs_ps_nopage(struct vm_area_struct *vma, 154static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
156 unsigned long address, 155 unsigned long address,
157 int *type, unsigned long ps_offs, 156 unsigned long ps_offs,
158 unsigned long ps_size) 157 unsigned long ps_size)
159{ 158{
160 struct page *page = NOPAGE_SIGBUS;
161 int fault_type = VM_FAULT_SIGBUS;
162 struct spu_context *ctx = vma->vm_file->private_data; 159 struct spu_context *ctx = vma->vm_file->private_data;
163 unsigned long offset = address - vma->vm_start; 160 unsigned long area, offset = address - vma->vm_start;
164 unsigned long area;
165 int ret; 161 int ret;
166 162
167 offset += vma->vm_pgoff << PAGE_SHIFT; 163 offset += vma->vm_pgoff << PAGE_SHIFT;
168 if (offset >= ps_size) 164 if (offset >= ps_size)
169 goto out; 165 return NOPFN_SIGBUS;
170 166
171 ret = spu_acquire_runnable(ctx); 167 /* error here usually means a signal.. we might want to test
168 * the error code more precisely though
169 */
170 ret = spu_acquire_runnable(ctx, 0);
172 if (ret) 171 if (ret)
173 goto out; 172 return NOPFN_REFAULT;
174 173
175 area = ctx->spu->problem_phys + ps_offs; 174 area = ctx->spu->problem_phys + ps_offs;
176 page = pfn_to_page((area + offset) >> PAGE_SHIFT); 175 vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
177 fault_type = VM_FAULT_MINOR;
178 page_cache_get(page);
179
180 spu_release(ctx); 176 spu_release(ctx);
181 177
182 out: 178 return NOPFN_REFAULT;
183 if (type)
184 *type = fault_type;
185
186 return page;
187} 179}
188 180
189#if SPUFS_MMAP_4K 181#if SPUFS_MMAP_4K
190static struct page *spufs_cntl_mmap_nopage(struct vm_area_struct *vma, 182static unsigned long spufs_cntl_mmap_nopfn(struct vm_area_struct *vma,
191 unsigned long address, int *type) 183 unsigned long address)
192{ 184{
193 return spufs_ps_nopage(vma, address, type, 0x4000, 0x1000); 185 return spufs_ps_nopfn(vma, address, 0x4000, 0x1000);
194} 186}
195 187
196static struct vm_operations_struct spufs_cntl_mmap_vmops = { 188static struct vm_operations_struct spufs_cntl_mmap_vmops = {
197 .nopage = spufs_cntl_mmap_nopage, 189 .nopfn = spufs_cntl_mmap_nopfn,
198}; 190};
199 191
200/* 192/*
@@ -205,7 +197,7 @@ static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma)
205 if (!(vma->vm_flags & VM_SHARED)) 197 if (!(vma->vm_flags & VM_SHARED))
206 return -EINVAL; 198 return -EINVAL;
207 199
208 vma->vm_flags |= VM_IO; 200 vma->vm_flags |= VM_IO | VM_PFNMAP;
209 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 201 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
210 | _PAGE_NO_CACHE | _PAGE_GUARDED); 202 | _PAGE_NO_CACHE | _PAGE_GUARDED);
211 203
@@ -243,13 +235,13 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
243 struct spu_context *ctx = i->i_ctx; 235 struct spu_context *ctx = i->i_ctx;
244 236
245 file->private_data = ctx; 237 file->private_data = ctx;
246 file->f_mapping = inode->i_mapping;
247 ctx->cntl = inode->i_mapping; 238 ctx->cntl = inode->i_mapping;
239 smp_wmb();
248 return simple_attr_open(inode, file, spufs_cntl_get, 240 return simple_attr_open(inode, file, spufs_cntl_get,
249 spufs_cntl_set, "0x%08lx"); 241 spufs_cntl_set, "0x%08lx");
250} 242}
251 243
252static struct file_operations spufs_cntl_fops = { 244static const struct file_operations spufs_cntl_fops = {
253 .open = spufs_cntl_open, 245 .open = spufs_cntl_open,
254 .release = simple_attr_close, 246 .release = simple_attr_close,
255 .read = simple_attr_read, 247 .read = simple_attr_read,
@@ -309,7 +301,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
309 return ret; 301 return ret;
310} 302}
311 303
312static struct file_operations spufs_regs_fops = { 304static const struct file_operations spufs_regs_fops = {
313 .open = spufs_regs_open, 305 .open = spufs_regs_open,
314 .read = spufs_regs_read, 306 .read = spufs_regs_read,
315 .write = spufs_regs_write, 307 .write = spufs_regs_write,
@@ -360,7 +352,7 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
360 return ret; 352 return ret;
361} 353}
362 354
363static struct file_operations spufs_fpcr_fops = { 355static const struct file_operations spufs_fpcr_fops = {
364 .open = spufs_regs_open, 356 .open = spufs_regs_open,
365 .read = spufs_fpcr_read, 357 .read = spufs_fpcr_read,
366 .write = spufs_fpcr_write, 358 .write = spufs_fpcr_write,
@@ -426,7 +418,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
426 return count; 418 return count;
427} 419}
428 420
429static struct file_operations spufs_mbox_fops = { 421static const struct file_operations spufs_mbox_fops = {
430 .open = spufs_pipe_open, 422 .open = spufs_pipe_open,
431 .read = spufs_mbox_read, 423 .read = spufs_mbox_read,
432}; 424};
@@ -452,7 +444,7 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
452 return 4; 444 return 4;
453} 445}
454 446
455static struct file_operations spufs_mbox_stat_fops = { 447static const struct file_operations spufs_mbox_stat_fops = {
456 .open = spufs_pipe_open, 448 .open = spufs_pipe_open,
457 .read = spufs_mbox_stat_read, 449 .read = spufs_mbox_stat_read,
458}; 450};
@@ -559,7 +551,7 @@ static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
559 return mask; 551 return mask;
560} 552}
561 553
562static struct file_operations spufs_ibox_fops = { 554static const struct file_operations spufs_ibox_fops = {
563 .open = spufs_pipe_open, 555 .open = spufs_pipe_open,
564 .read = spufs_ibox_read, 556 .read = spufs_ibox_read,
565 .poll = spufs_ibox_poll, 557 .poll = spufs_ibox_poll,
@@ -585,7 +577,7 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
585 return 4; 577 return 4;
586} 578}
587 579
588static struct file_operations spufs_ibox_stat_fops = { 580static const struct file_operations spufs_ibox_stat_fops = {
589 .open = spufs_pipe_open, 581 .open = spufs_pipe_open,
590 .read = spufs_ibox_stat_read, 582 .read = spufs_ibox_stat_read,
591}; 583};
@@ -692,7 +684,7 @@ static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
692 return mask; 684 return mask;
693} 685}
694 686
695static struct file_operations spufs_wbox_fops = { 687static const struct file_operations spufs_wbox_fops = {
696 .open = spufs_pipe_open, 688 .open = spufs_pipe_open,
697 .write = spufs_wbox_write, 689 .write = spufs_wbox_write,
698 .poll = spufs_wbox_poll, 690 .poll = spufs_wbox_poll,
@@ -718,7 +710,7 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
718 return 4; 710 return 4;
719} 711}
720 712
721static struct file_operations spufs_wbox_stat_fops = { 713static const struct file_operations spufs_wbox_stat_fops = {
722 .open = spufs_pipe_open, 714 .open = spufs_pipe_open,
723 .read = spufs_wbox_stat_read, 715 .read = spufs_wbox_stat_read,
724}; 716};
@@ -728,8 +720,8 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
728 struct spufs_inode_info *i = SPUFS_I(inode); 720 struct spufs_inode_info *i = SPUFS_I(inode);
729 struct spu_context *ctx = i->i_ctx; 721 struct spu_context *ctx = i->i_ctx;
730 file->private_data = ctx; 722 file->private_data = ctx;
731 file->f_mapping = inode->i_mapping;
732 ctx->signal1 = inode->i_mapping; 723 ctx->signal1 = inode->i_mapping;
724 smp_wmb();
733 return nonseekable_open(inode, file); 725 return nonseekable_open(inode, file);
734} 726}
735 727
@@ -791,23 +783,23 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
791 return 4; 783 return 4;
792} 784}
793 785
794static struct page *spufs_signal1_mmap_nopage(struct vm_area_struct *vma, 786static unsigned long spufs_signal1_mmap_nopfn(struct vm_area_struct *vma,
795 unsigned long address, int *type) 787 unsigned long address)
796{ 788{
797#if PAGE_SIZE == 0x1000 789#if PAGE_SIZE == 0x1000
798 return spufs_ps_nopage(vma, address, type, 0x14000, 0x1000); 790 return spufs_ps_nopfn(vma, address, 0x14000, 0x1000);
799#elif PAGE_SIZE == 0x10000 791#elif PAGE_SIZE == 0x10000
800 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 792 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
801 * signal 1 and 2 area 793 * signal 1 and 2 area
802 */ 794 */
803 return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000); 795 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
804#else 796#else
805#error unsupported page size 797#error unsupported page size
806#endif 798#endif
807} 799}
808 800
809static struct vm_operations_struct spufs_signal1_mmap_vmops = { 801static struct vm_operations_struct spufs_signal1_mmap_vmops = {
810 .nopage = spufs_signal1_mmap_nopage, 802 .nopfn = spufs_signal1_mmap_nopfn,
811}; 803};
812 804
813static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma) 805static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
@@ -815,7 +807,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
815 if (!(vma->vm_flags & VM_SHARED)) 807 if (!(vma->vm_flags & VM_SHARED))
816 return -EINVAL; 808 return -EINVAL;
817 809
818 vma->vm_flags |= VM_IO; 810 vma->vm_flags |= VM_IO | VM_PFNMAP;
819 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 811 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
820 | _PAGE_NO_CACHE | _PAGE_GUARDED); 812 | _PAGE_NO_CACHE | _PAGE_GUARDED);
821 813
@@ -823,7 +815,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
823 return 0; 815 return 0;
824} 816}
825 817
826static struct file_operations spufs_signal1_fops = { 818static const struct file_operations spufs_signal1_fops = {
827 .open = spufs_signal1_open, 819 .open = spufs_signal1_open,
828 .read = spufs_signal1_read, 820 .read = spufs_signal1_read,
829 .write = spufs_signal1_write, 821 .write = spufs_signal1_write,
@@ -835,8 +827,8 @@ static int spufs_signal2_open(struct inode *inode, struct file *file)
835 struct spufs_inode_info *i = SPUFS_I(inode); 827 struct spufs_inode_info *i = SPUFS_I(inode);
836 struct spu_context *ctx = i->i_ctx; 828 struct spu_context *ctx = i->i_ctx;
837 file->private_data = ctx; 829 file->private_data = ctx;
838 file->f_mapping = inode->i_mapping;
839 ctx->signal2 = inode->i_mapping; 830 ctx->signal2 = inode->i_mapping;
831 smp_wmb();
840 return nonseekable_open(inode, file); 832 return nonseekable_open(inode, file);
841} 833}
842 834
@@ -899,23 +891,23 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
899} 891}
900 892
901#if SPUFS_MMAP_4K 893#if SPUFS_MMAP_4K
902static struct page *spufs_signal2_mmap_nopage(struct vm_area_struct *vma, 894static unsigned long spufs_signal2_mmap_nopfn(struct vm_area_struct *vma,
903 unsigned long address, int *type) 895 unsigned long address)
904{ 896{
905#if PAGE_SIZE == 0x1000 897#if PAGE_SIZE == 0x1000
906 return spufs_ps_nopage(vma, address, type, 0x1c000, 0x1000); 898 return spufs_ps_nopfn(vma, address, 0x1c000, 0x1000);
907#elif PAGE_SIZE == 0x10000 899#elif PAGE_SIZE == 0x10000
908 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 900 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
909 * signal 1 and 2 area 901 * signal 1 and 2 area
910 */ 902 */
911 return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000); 903 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
912#else 904#else
913#error unsupported page size 905#error unsupported page size
914#endif 906#endif
915} 907}
916 908
917static struct vm_operations_struct spufs_signal2_mmap_vmops = { 909static struct vm_operations_struct spufs_signal2_mmap_vmops = {
918 .nopage = spufs_signal2_mmap_nopage, 910 .nopfn = spufs_signal2_mmap_nopfn,
919}; 911};
920 912
921static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma) 913static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
@@ -923,7 +915,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
923 if (!(vma->vm_flags & VM_SHARED)) 915 if (!(vma->vm_flags & VM_SHARED))
924 return -EINVAL; 916 return -EINVAL;
925 917
926 vma->vm_flags |= VM_IO; 918 vma->vm_flags |= VM_IO | VM_PFNMAP;
927 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 919 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
928 | _PAGE_NO_CACHE | _PAGE_GUARDED); 920 | _PAGE_NO_CACHE | _PAGE_GUARDED);
929 921
@@ -934,7 +926,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
934#define spufs_signal2_mmap NULL 926#define spufs_signal2_mmap NULL
935#endif /* !SPUFS_MMAP_4K */ 927#endif /* !SPUFS_MMAP_4K */
936 928
937static struct file_operations spufs_signal2_fops = { 929static const struct file_operations spufs_signal2_fops = {
938 .open = spufs_signal2_open, 930 .open = spufs_signal2_open,
939 .read = spufs_signal2_read, 931 .read = spufs_signal2_read,
940 .write = spufs_signal2_write, 932 .write = spufs_signal2_write,
@@ -1000,14 +992,14 @@ DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
1000 spufs_signal2_type_set, "%llu"); 992 spufs_signal2_type_set, "%llu");
1001 993
1002#if SPUFS_MMAP_4K 994#if SPUFS_MMAP_4K
1003static struct page *spufs_mss_mmap_nopage(struct vm_area_struct *vma, 995static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma,
1004 unsigned long address, int *type) 996 unsigned long address)
1005{ 997{
1006 return spufs_ps_nopage(vma, address, type, 0x0000, 0x1000); 998 return spufs_ps_nopfn(vma, address, 0x0000, 0x1000);
1007} 999}
1008 1000
1009static struct vm_operations_struct spufs_mss_mmap_vmops = { 1001static struct vm_operations_struct spufs_mss_mmap_vmops = {
1010 .nopage = spufs_mss_mmap_nopage, 1002 .nopfn = spufs_mss_mmap_nopfn,
1011}; 1003};
1012 1004
1013/* 1005/*
@@ -1018,7 +1010,7 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
1018 if (!(vma->vm_flags & VM_SHARED)) 1010 if (!(vma->vm_flags & VM_SHARED))
1019 return -EINVAL; 1011 return -EINVAL;
1020 1012
1021 vma->vm_flags |= VM_IO; 1013 vma->vm_flags |= VM_IO | VM_PFNMAP;
1022 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1014 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1023 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1015 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1024 1016
@@ -1032,24 +1024,27 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
1032static int spufs_mss_open(struct inode *inode, struct file *file) 1024static int spufs_mss_open(struct inode *inode, struct file *file)
1033{ 1025{
1034 struct spufs_inode_info *i = SPUFS_I(inode); 1026 struct spufs_inode_info *i = SPUFS_I(inode);
1027 struct spu_context *ctx = i->i_ctx;
1035 1028
1036 file->private_data = i->i_ctx; 1029 file->private_data = i->i_ctx;
1030 ctx->mss = inode->i_mapping;
1031 smp_wmb();
1037 return nonseekable_open(inode, file); 1032 return nonseekable_open(inode, file);
1038} 1033}
1039 1034
1040static struct file_operations spufs_mss_fops = { 1035static const struct file_operations spufs_mss_fops = {
1041 .open = spufs_mss_open, 1036 .open = spufs_mss_open,
1042 .mmap = spufs_mss_mmap, 1037 .mmap = spufs_mss_mmap,
1043}; 1038};
1044 1039
1045static struct page *spufs_psmap_mmap_nopage(struct vm_area_struct *vma, 1040static unsigned long spufs_psmap_mmap_nopfn(struct vm_area_struct *vma,
1046 unsigned long address, int *type) 1041 unsigned long address)
1047{ 1042{
1048 return spufs_ps_nopage(vma, address, type, 0x0000, 0x20000); 1043 return spufs_ps_nopfn(vma, address, 0x0000, 0x20000);
1049} 1044}
1050 1045
1051static struct vm_operations_struct spufs_psmap_mmap_vmops = { 1046static struct vm_operations_struct spufs_psmap_mmap_vmops = {
1052 .nopage = spufs_psmap_mmap_nopage, 1047 .nopfn = spufs_psmap_mmap_nopfn,
1053}; 1048};
1054 1049
1055/* 1050/*
@@ -1060,7 +1055,7 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
1060 if (!(vma->vm_flags & VM_SHARED)) 1055 if (!(vma->vm_flags & VM_SHARED))
1061 return -EINVAL; 1056 return -EINVAL;
1062 1057
1063 vma->vm_flags |= VM_IO; 1058 vma->vm_flags |= VM_IO | VM_PFNMAP;
1064 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1059 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1065 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1060 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1066 1061
@@ -1071,26 +1066,29 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
1071static int spufs_psmap_open(struct inode *inode, struct file *file) 1066static int spufs_psmap_open(struct inode *inode, struct file *file)
1072{ 1067{
1073 struct spufs_inode_info *i = SPUFS_I(inode); 1068 struct spufs_inode_info *i = SPUFS_I(inode);
1069 struct spu_context *ctx = i->i_ctx;
1074 1070
1075 file->private_data = i->i_ctx; 1071 file->private_data = i->i_ctx;
1072 ctx->psmap = inode->i_mapping;
1073 smp_wmb();
1076 return nonseekable_open(inode, file); 1074 return nonseekable_open(inode, file);
1077} 1075}
1078 1076
1079static struct file_operations spufs_psmap_fops = { 1077static const struct file_operations spufs_psmap_fops = {
1080 .open = spufs_psmap_open, 1078 .open = spufs_psmap_open,
1081 .mmap = spufs_psmap_mmap, 1079 .mmap = spufs_psmap_mmap,
1082}; 1080};
1083 1081
1084 1082
1085#if SPUFS_MMAP_4K 1083#if SPUFS_MMAP_4K
1086static struct page *spufs_mfc_mmap_nopage(struct vm_area_struct *vma, 1084static unsigned long spufs_mfc_mmap_nopfn(struct vm_area_struct *vma,
1087 unsigned long address, int *type) 1085 unsigned long address)
1088{ 1086{
1089 return spufs_ps_nopage(vma, address, type, 0x3000, 0x1000); 1087 return spufs_ps_nopfn(vma, address, 0x3000, 0x1000);
1090} 1088}
1091 1089
1092static struct vm_operations_struct spufs_mfc_mmap_vmops = { 1090static struct vm_operations_struct spufs_mfc_mmap_vmops = {
1093 .nopage = spufs_mfc_mmap_nopage, 1091 .nopfn = spufs_mfc_mmap_nopfn,
1094}; 1092};
1095 1093
1096/* 1094/*
@@ -1101,7 +1099,7 @@ static int spufs_mfc_mmap(struct file *file, struct vm_area_struct *vma)
1101 if (!(vma->vm_flags & VM_SHARED)) 1099 if (!(vma->vm_flags & VM_SHARED))
1102 return -EINVAL; 1100 return -EINVAL;
1103 1101
1104 vma->vm_flags |= VM_IO; 1102 vma->vm_flags |= VM_IO | VM_PFNMAP;
1105 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1103 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1106 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1104 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1107 1105
@@ -1125,6 +1123,8 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
1125 return -EBUSY; 1123 return -EBUSY;
1126 1124
1127 file->private_data = ctx; 1125 file->private_data = ctx;
1126 ctx->mfc = inode->i_mapping;
1127 smp_wmb();
1128 return nonseekable_open(inode, file); 1128 return nonseekable_open(inode, file);
1129} 1129}
1130 1130
@@ -1309,7 +1309,7 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
1309 if (ret) 1309 if (ret)
1310 goto out; 1310 goto out;
1311 1311
1312 spu_acquire_runnable(ctx); 1312 spu_acquire_runnable(ctx, 0);
1313 if (file->f_flags & O_NONBLOCK) { 1313 if (file->f_flags & O_NONBLOCK) {
1314 ret = ctx->ops->send_mfc_command(ctx, &cmd); 1314 ret = ctx->ops->send_mfc_command(ctx, &cmd);
1315 } else { 1315 } else {
@@ -1393,7 +1393,7 @@ static int spufs_mfc_fasync(int fd, struct file *file, int on)
1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync); 1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync);
1394} 1394}
1395 1395
1396static struct file_operations spufs_mfc_fops = { 1396static const struct file_operations spufs_mfc_fops = {
1397 .open = spufs_mfc_open, 1397 .open = spufs_mfc_open,
1398 .read = spufs_mfc_read, 1398 .read = spufs_mfc_read,
1399 .write = spufs_mfc_write, 1399 .write = spufs_mfc_write,
@@ -1650,7 +1650,7 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
1650 return ret; 1650 return ret;
1651} 1651}
1652 1652
1653static struct file_operations spufs_mbox_info_fops = { 1653static const struct file_operations spufs_mbox_info_fops = {
1654 .open = spufs_info_open, 1654 .open = spufs_info_open,
1655 .read = spufs_mbox_info_read, 1655 .read = spufs_mbox_info_read,
1656 .llseek = generic_file_llseek, 1656 .llseek = generic_file_llseek,
@@ -1688,7 +1688,7 @@ static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
1688 return ret; 1688 return ret;
1689} 1689}
1690 1690
1691static struct file_operations spufs_ibox_info_fops = { 1691static const struct file_operations spufs_ibox_info_fops = {
1692 .open = spufs_info_open, 1692 .open = spufs_info_open,
1693 .read = spufs_ibox_info_read, 1693 .read = spufs_ibox_info_read,
1694 .llseek = generic_file_llseek, 1694 .llseek = generic_file_llseek,
@@ -1729,7 +1729,7 @@ static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf,
1729 return ret; 1729 return ret;
1730} 1730}
1731 1731
1732static struct file_operations spufs_wbox_info_fops = { 1732static const struct file_operations spufs_wbox_info_fops = {
1733 .open = spufs_info_open, 1733 .open = spufs_info_open,
1734 .read = spufs_wbox_info_read, 1734 .read = spufs_wbox_info_read,
1735 .llseek = generic_file_llseek, 1735 .llseek = generic_file_llseek,
@@ -1779,7 +1779,7 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
1779 return ret; 1779 return ret;
1780} 1780}
1781 1781
1782static struct file_operations spufs_dma_info_fops = { 1782static const struct file_operations spufs_dma_info_fops = {
1783 .open = spufs_info_open, 1783 .open = spufs_info_open,
1784 .read = spufs_dma_info_read, 1784 .read = spufs_dma_info_read,
1785}; 1785};
@@ -1830,7 +1830,7 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
1830 return ret; 1830 return ret;
1831} 1831}
1832 1832
1833static struct file_operations spufs_proxydma_info_fops = { 1833static const struct file_operations spufs_proxydma_info_fops = {
1834 .open = spufs_info_open, 1834 .open = spufs_info_open,
1835 .read = spufs_proxydma_info_read, 1835 .read = spufs_proxydma_info_read,
1836}; 1836};
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 738b9244382f..8079983ef94f 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -220,11 +220,11 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
220 return dcache_dir_close(inode, file); 220 return dcache_dir_close(inode, file);
221} 221}
222 222
223struct inode_operations spufs_dir_inode_operations = { 223const struct inode_operations spufs_dir_inode_operations = {
224 .lookup = simple_lookup, 224 .lookup = simple_lookup,
225}; 225};
226 226
227struct file_operations spufs_context_fops = { 227const struct file_operations spufs_context_fops = {
228 .open = dcache_dir_open, 228 .open = dcache_dir_open,
229 .release = spufs_dir_close, 229 .release = spufs_dir_close,
230 .llseek = dcache_dir_lseek, 230 .llseek = dcache_dir_lseek,
@@ -372,7 +372,7 @@ static int spufs_gang_close(struct inode *inode, struct file *file)
372 return dcache_dir_close(inode, file); 372 return dcache_dir_close(inode, file);
373} 373}
374 374
375struct file_operations spufs_gang_fops = { 375const struct file_operations spufs_gang_fops = {
376 .open = dcache_dir_open, 376 .open = dcache_dir_open,
377 .release = spufs_gang_close, 377 .release = spufs_gang_close,
378 .llseek = dcache_dir_lseek, 378 .llseek = dcache_dir_lseek,
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 1acc2ffef8c8..353a8fa07ab8 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -133,7 +133,7 @@ out_drop_priv:
133 spu_mfc_sr1_set(ctx->spu, sr1); 133 spu_mfc_sr1_set(ctx->spu, sr1);
134 134
135out_unlock: 135out_unlock:
136 spu_release_exclusive(ctx); 136 spu_release(ctx);
137out: 137out:
138 return ret; 138 return ret;
139} 139}
@@ -143,7 +143,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
143 int ret; 143 int ret;
144 unsigned long runcntl = SPU_RUNCNTL_RUNNABLE; 144 unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
145 145
146 ret = spu_acquire_runnable(ctx); 146 ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
147 if (ret) 147 if (ret)
148 return ret; 148 return ret;
149 149
@@ -155,7 +155,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
155 spu_release(ctx); 155 spu_release(ctx);
156 ret = spu_setup_isolated(ctx); 156 ret = spu_setup_isolated(ctx);
157 if (!ret) 157 if (!ret)
158 ret = spu_acquire_runnable(ctx); 158 ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
159 } 159 }
160 160
161 /* if userspace has set the runcntrl register (eg, to issue an 161 /* if userspace has set the runcntrl register (eg, to issue an
@@ -164,8 +164,10 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
164 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE); 164 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
165 if (runcntl == 0) 165 if (runcntl == 0)
166 runcntl = SPU_RUNCNTL_RUNNABLE; 166 runcntl = SPU_RUNCNTL_RUNNABLE;
167 } else 167 } else {
168 spu_start_tick(ctx);
168 ctx->ops->npc_write(ctx, *npc); 169 ctx->ops->npc_write(ctx, *npc);
170 }
169 171
170 ctx->ops->runcntl_write(ctx, runcntl); 172 ctx->ops->runcntl_write(ctx, runcntl);
171 return ret; 173 return ret;
@@ -176,6 +178,7 @@ static inline int spu_run_fini(struct spu_context *ctx, u32 * npc,
176{ 178{
177 int ret = 0; 179 int ret = 0;
178 180
181 spu_stop_tick(ctx);
179 *status = ctx->ops->status_read(ctx); 182 *status = ctx->ops->status_read(ctx);
180 *npc = ctx->ops->npc_read(ctx); 183 *npc = ctx->ops->npc_read(ctx);
181 spu_release(ctx); 184 spu_release(ctx);
@@ -329,8 +332,10 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
329 } 332 }
330 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 333 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
331 ret = spu_reacquire_runnable(ctx, npc, &status); 334 ret = spu_reacquire_runnable(ctx, npc, &status);
332 if (ret) 335 if (ret) {
336 spu_stop_tick(ctx);
333 goto out2; 337 goto out2;
338 }
334 continue; 339 continue;
335 } 340 }
336 ret = spu_process_events(ctx); 341 ret = spu_process_events(ctx);
@@ -361,4 +366,3 @@ out:
361 up(&ctx->run_sema); 366 up(&ctx->run_sema);
362 return ret; 367 return ret;
363} 368}
364
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index bd6fe4b7a84b..2f25e68b4bac 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -44,17 +44,18 @@
44#include <asm/spu_priv1.h> 44#include <asm/spu_priv1.h>
45#include "spufs.h" 45#include "spufs.h"
46 46
47#define SPU_MIN_TIMESLICE (100 * HZ / 1000) 47#define SPU_TIMESLICE (HZ)
48 48
49#define SPU_BITMAP_SIZE (((MAX_PRIO+BITS_PER_LONG)/BITS_PER_LONG)+1)
50struct spu_prio_array { 49struct spu_prio_array {
51 unsigned long bitmap[SPU_BITMAP_SIZE]; 50 DECLARE_BITMAP(bitmap, MAX_PRIO);
52 wait_queue_head_t waitq[MAX_PRIO]; 51 struct list_head runq[MAX_PRIO];
52 spinlock_t runq_lock;
53 struct list_head active_list[MAX_NUMNODES]; 53 struct list_head active_list[MAX_NUMNODES];
54 struct mutex active_mutex[MAX_NUMNODES]; 54 struct mutex active_mutex[MAX_NUMNODES];
55}; 55};
56 56
57static struct spu_prio_array *spu_prio; 57static struct spu_prio_array *spu_prio;
58static struct workqueue_struct *spu_sched_wq;
58 59
59static inline int node_allowed(int node) 60static inline int node_allowed(int node)
60{ 61{
@@ -68,6 +69,64 @@ static inline int node_allowed(int node)
68 return 1; 69 return 1;
69} 70}
70 71
72void spu_start_tick(struct spu_context *ctx)
73{
74 if (ctx->policy == SCHED_RR)
75 queue_delayed_work(spu_sched_wq, &ctx->sched_work, SPU_TIMESLICE);
76}
77
78void spu_stop_tick(struct spu_context *ctx)
79{
80 if (ctx->policy == SCHED_RR)
81 cancel_delayed_work(&ctx->sched_work);
82}
83
84void spu_sched_tick(struct work_struct *work)
85{
86 struct spu_context *ctx =
87 container_of(work, struct spu_context, sched_work.work);
88 struct spu *spu;
89 int rearm = 1;
90
91 mutex_lock(&ctx->state_mutex);
92 spu = ctx->spu;
93 if (spu) {
94 int best = sched_find_first_bit(spu_prio->bitmap);
95 if (best <= ctx->prio) {
96 spu_deactivate(ctx);
97 rearm = 0;
98 }
99 }
100 mutex_unlock(&ctx->state_mutex);
101
102 if (rearm)
103 spu_start_tick(ctx);
104}
105
106/**
107 * spu_add_to_active_list - add spu to active list
108 * @spu: spu to add to the active list
109 */
110static void spu_add_to_active_list(struct spu *spu)
111{
112 mutex_lock(&spu_prio->active_mutex[spu->node]);
113 list_add_tail(&spu->list, &spu_prio->active_list[spu->node]);
114 mutex_unlock(&spu_prio->active_mutex[spu->node]);
115}
116
117/**
118 * spu_remove_from_active_list - remove spu from active list
119 * @spu: spu to remove from the active list
120 */
121static void spu_remove_from_active_list(struct spu *spu)
122{
123 int node = spu->node;
124
125 mutex_lock(&spu_prio->active_mutex[node]);
126 list_del_init(&spu->list);
127 mutex_unlock(&spu_prio->active_mutex[node]);
128}
129
71static inline void mm_needs_global_tlbie(struct mm_struct *mm) 130static inline void mm_needs_global_tlbie(struct mm_struct *mm)
72{ 131{
73 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1; 132 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1;
@@ -94,8 +153,12 @@ int spu_switch_event_unregister(struct notifier_block * n)
94 return blocking_notifier_chain_unregister(&spu_switch_notifier, n); 153 return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
95} 154}
96 155
97 156/**
98static inline void bind_context(struct spu *spu, struct spu_context *ctx) 157 * spu_bind_context - bind spu context to physical spu
158 * @spu: physical spu to bind to
159 * @ctx: context to bind
160 */
161static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
99{ 162{
100 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid, 163 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid,
101 spu->number, spu->node); 164 spu->number, spu->node);
@@ -104,7 +167,6 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
104 ctx->spu = spu; 167 ctx->spu = spu;
105 ctx->ops = &spu_hw_ops; 168 ctx->ops = &spu_hw_ops;
106 spu->pid = current->pid; 169 spu->pid = current->pid;
107 spu->prio = current->prio;
108 spu->mm = ctx->owner; 170 spu->mm = ctx->owner;
109 mm_needs_global_tlbie(spu->mm); 171 mm_needs_global_tlbie(spu->mm);
110 spu->ibox_callback = spufs_ibox_callback; 172 spu->ibox_callback = spufs_ibox_callback;
@@ -118,12 +180,21 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
118 spu->timestamp = jiffies; 180 spu->timestamp = jiffies;
119 spu_cpu_affinity_set(spu, raw_smp_processor_id()); 181 spu_cpu_affinity_set(spu, raw_smp_processor_id());
120 spu_switch_notify(spu, ctx); 182 spu_switch_notify(spu, ctx);
183 spu_add_to_active_list(spu);
184 ctx->state = SPU_STATE_RUNNABLE;
121} 185}
122 186
123static inline void unbind_context(struct spu *spu, struct spu_context *ctx) 187/**
188 * spu_unbind_context - unbind spu context from physical spu
189 * @spu: physical spu to unbind from
190 * @ctx: context to unbind
191 */
192static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
124{ 193{
125 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__, 194 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__,
126 spu->pid, spu->number, spu->node); 195 spu->pid, spu->number, spu->node);
196
197 spu_remove_from_active_list(spu);
127 spu_switch_notify(spu, NULL); 198 spu_switch_notify(spu, NULL);
128 spu_unmap_mappings(ctx); 199 spu_unmap_mappings(ctx);
129 spu_save(&ctx->csa, spu); 200 spu_save(&ctx->csa, spu);
@@ -136,95 +207,98 @@ static inline void unbind_context(struct spu *spu, struct spu_context *ctx)
136 spu->dma_callback = NULL; 207 spu->dma_callback = NULL;
137 spu->mm = NULL; 208 spu->mm = NULL;
138 spu->pid = 0; 209 spu->pid = 0;
139 spu->prio = MAX_PRIO;
140 ctx->ops = &spu_backing_ops; 210 ctx->ops = &spu_backing_ops;
141 ctx->spu = NULL; 211 ctx->spu = NULL;
142 spu->flags = 0; 212 spu->flags = 0;
143 spu->ctx = NULL; 213 spu->ctx = NULL;
144} 214}
145 215
146static inline void spu_add_wq(wait_queue_head_t * wq, wait_queue_t * wait, 216/**
147 int prio) 217 * spu_add_to_rq - add a context to the runqueue
218 * @ctx: context to add
219 */
220static void spu_add_to_rq(struct spu_context *ctx)
148{ 221{
149 prepare_to_wait_exclusive(wq, wait, TASK_INTERRUPTIBLE); 222 spin_lock(&spu_prio->runq_lock);
150 set_bit(prio, spu_prio->bitmap); 223 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
224 set_bit(ctx->prio, spu_prio->bitmap);
225 spin_unlock(&spu_prio->runq_lock);
151} 226}
152 227
153static inline void spu_del_wq(wait_queue_head_t * wq, wait_queue_t * wait, 228/**
154 int prio) 229 * spu_del_from_rq - remove a context from the runqueue
230 * @ctx: context to remove
231 */
232static void spu_del_from_rq(struct spu_context *ctx)
155{ 233{
156 u64 flags; 234 spin_lock(&spu_prio->runq_lock);
157 235 list_del_init(&ctx->rq);
158 __set_current_state(TASK_RUNNING); 236 if (list_empty(&spu_prio->runq[ctx->prio]))
159 237 clear_bit(ctx->prio, spu_prio->bitmap);
160 spin_lock_irqsave(&wq->lock, flags); 238 spin_unlock(&spu_prio->runq_lock);
239}
161 240
162 remove_wait_queue_locked(wq, wait); 241/**
163 if (list_empty(&wq->task_list)) 242 * spu_grab_context - remove one context from the runqueue
164 clear_bit(prio, spu_prio->bitmap); 243 * @prio: priority of the context to be removed
244 *
245 * This function removes one context from the runqueue for priority @prio.
246 * If there is more than one context with the given priority the first
247 * task on the runqueue will be taken.
248 *
249 * Returns the spu_context it just removed.
250 *
251 * Must be called with spu_prio->runq_lock held.
252 */
253static struct spu_context *spu_grab_context(int prio)
254{
255 struct list_head *rq = &spu_prio->runq[prio];
165 256
166 spin_unlock_irqrestore(&wq->lock, flags); 257 if (list_empty(rq))
258 return NULL;
259 return list_entry(rq->next, struct spu_context, rq);
167} 260}
168 261
169static void spu_prio_wait(struct spu_context *ctx, u64 flags) 262static void spu_prio_wait(struct spu_context *ctx)
170{ 263{
171 int prio = current->prio;
172 wait_queue_head_t *wq = &spu_prio->waitq[prio];
173 DEFINE_WAIT(wait); 264 DEFINE_WAIT(wait);
174 265
175 if (ctx->spu) 266 set_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
176 return; 267 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
177
178 spu_add_wq(wq, &wait, prio);
179
180 if (!signal_pending(current)) { 268 if (!signal_pending(current)) {
181 up_write(&ctx->state_sema); 269 mutex_unlock(&ctx->state_mutex);
182 pr_debug("%s: pid=%d prio=%d\n", __FUNCTION__,
183 current->pid, current->prio);
184 schedule(); 270 schedule();
185 down_write(&ctx->state_sema); 271 mutex_lock(&ctx->state_mutex);
186 } 272 }
187 273 __set_current_state(TASK_RUNNING);
188 spu_del_wq(wq, &wait, prio); 274 remove_wait_queue(&ctx->stop_wq, &wait);
275 clear_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
189} 276}
190 277
191static void spu_prio_wakeup(void) 278/**
279 * spu_reschedule - try to find a runnable context for a spu
280 * @spu: spu available
281 *
282 * This function is called whenever a spu becomes idle. It looks for the
283 * most suitable runnable spu context and schedules it for execution.
284 */
285static void spu_reschedule(struct spu *spu)
192{ 286{
193 int best = sched_find_first_bit(spu_prio->bitmap); 287 int best;
194 if (best < MAX_PRIO) {
195 wait_queue_head_t *wq = &spu_prio->waitq[best];
196 wake_up_interruptible_nr(wq, 1);
197 }
198}
199 288
200static int get_active_spu(struct spu *spu) 289 spu_free(spu);
201{
202 int node = spu->node;
203 struct spu *tmp;
204 int rc = 0;
205 290
206 mutex_lock(&spu_prio->active_mutex[node]); 291 spin_lock(&spu_prio->runq_lock);
207 list_for_each_entry(tmp, &spu_prio->active_list[node], list) { 292 best = sched_find_first_bit(spu_prio->bitmap);
208 if (tmp == spu) { 293 if (best < MAX_PRIO) {
209 list_del_init(&spu->list); 294 struct spu_context *ctx = spu_grab_context(best);
210 rc = 1; 295 if (ctx && test_bit(SPU_SCHED_WAKE, &ctx->sched_flags))
211 break; 296 wake_up(&ctx->stop_wq);
212 }
213 } 297 }
214 mutex_unlock(&spu_prio->active_mutex[node]); 298 spin_unlock(&spu_prio->runq_lock);
215 return rc;
216}
217
218static void put_active_spu(struct spu *spu)
219{
220 int node = spu->node;
221
222 mutex_lock(&spu_prio->active_mutex[node]);
223 list_add_tail(&spu->list, &spu_prio->active_list[node]);
224 mutex_unlock(&spu_prio->active_mutex[node]);
225} 299}
226 300
227static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags) 301static struct spu *spu_get_idle(struct spu_context *ctx)
228{ 302{
229 struct spu *spu = NULL; 303 struct spu *spu = NULL;
230 int node = cpu_to_node(raw_smp_processor_id()); 304 int node = cpu_to_node(raw_smp_processor_id());
@@ -241,87 +315,154 @@ static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags)
241 return spu; 315 return spu;
242} 316}
243 317
244static inline struct spu *spu_get(struct spu_context *ctx, u64 flags) 318/**
319 * find_victim - find a lower priority context to preempt
320 * @ctx: canidate context for running
321 *
322 * Returns the freed physical spu to run the new context on.
323 */
324static struct spu *find_victim(struct spu_context *ctx)
245{ 325{
246 /* Future: spu_get_idle() if possible, 326 struct spu_context *victim = NULL;
247 * otherwise try to preempt an active 327 struct spu *spu;
248 * context. 328 int node, n;
329
330 /*
331 * Look for a possible preemption candidate on the local node first.
332 * If there is no candidate look at the other nodes. This isn't
333 * exactly fair, but so far the whole spu schedule tries to keep
334 * a strong node affinity. We might want to fine-tune this in
335 * the future.
249 */ 336 */
250 return spu_get_idle(ctx, flags); 337 restart:
338 node = cpu_to_node(raw_smp_processor_id());
339 for (n = 0; n < MAX_NUMNODES; n++, node++) {
340 node = (node < MAX_NUMNODES) ? node : 0;
341 if (!node_allowed(node))
342 continue;
343
344 mutex_lock(&spu_prio->active_mutex[node]);
345 list_for_each_entry(spu, &spu_prio->active_list[node], list) {
346 struct spu_context *tmp = spu->ctx;
347
348 if (tmp->rt_priority < ctx->rt_priority &&
349 (!victim || tmp->rt_priority < victim->rt_priority))
350 victim = spu->ctx;
351 }
352 mutex_unlock(&spu_prio->active_mutex[node]);
353
354 if (victim) {
355 /*
356 * This nests ctx->state_mutex, but we always lock
357 * higher priority contexts before lower priority
358 * ones, so this is safe until we introduce
359 * priority inheritance schemes.
360 */
361 if (!mutex_trylock(&victim->state_mutex)) {
362 victim = NULL;
363 goto restart;
364 }
365
366 spu = victim->spu;
367 if (!spu) {
368 /*
369 * This race can happen because we've dropped
370 * the active list mutex. No a problem, just
371 * restart the search.
372 */
373 mutex_unlock(&victim->state_mutex);
374 victim = NULL;
375 goto restart;
376 }
377 spu_unbind_context(spu, victim);
378 mutex_unlock(&victim->state_mutex);
379 return spu;
380 }
381 }
382
383 return NULL;
251} 384}
252 385
253/* The three externally callable interfaces 386/**
254 * for the scheduler begin here. 387 * spu_activate - find a free spu for a context and execute it
388 * @ctx: spu context to schedule
389 * @flags: flags (currently ignored)
255 * 390 *
256 * spu_activate - bind a context to SPU, waiting as needed. 391 * Tries to find a free spu to run @ctx. If no free spu is availble
257 * spu_deactivate - unbind a context from its SPU. 392 * add the context to the runqueue so it gets woken up once an spu
258 * spu_yield - yield an SPU if others are waiting. 393 * is available.
259 */ 394 */
260 395int spu_activate(struct spu_context *ctx, unsigned long flags)
261int spu_activate(struct spu_context *ctx, u64 flags)
262{ 396{
263 struct spu *spu;
264 int ret = 0;
265 397
266 for (;;) { 398 if (ctx->spu)
267 if (ctx->spu) 399 return 0;
400
401 do {
402 struct spu *spu;
403
404 spu = spu_get_idle(ctx);
405 /*
406 * If this is a realtime thread we try to get it running by
407 * preempting a lower priority thread.
408 */
409 if (!spu && ctx->rt_priority)
410 spu = find_victim(ctx);
411 if (spu) {
412 spu_bind_context(spu, ctx);
268 return 0; 413 return 0;
269 spu = spu_get(ctx, flags);
270 if (spu != NULL) {
271 if (ctx->spu != NULL) {
272 spu_free(spu);
273 spu_prio_wakeup();
274 break;
275 }
276 bind_context(spu, ctx);
277 put_active_spu(spu);
278 break;
279 } 414 }
280 spu_prio_wait(ctx, flags); 415
281 if (signal_pending(current)) { 416 spu_add_to_rq(ctx);
282 ret = -ERESTARTSYS; 417 if (!(flags & SPU_ACTIVATE_NOWAKE))
283 spu_prio_wakeup(); 418 spu_prio_wait(ctx);
284 break; 419 spu_del_from_rq(ctx);
285 } 420 } while (!signal_pending(current));
286 } 421
287 return ret; 422 return -ERESTARTSYS;
288} 423}
289 424
425/**
426 * spu_deactivate - unbind a context from it's physical spu
427 * @ctx: spu context to unbind
428 *
429 * Unbind @ctx from the physical spu it is running on and schedule
430 * the highest priority context to run on the freed physical spu.
431 */
290void spu_deactivate(struct spu_context *ctx) 432void spu_deactivate(struct spu_context *ctx)
291{ 433{
292 struct spu *spu; 434 struct spu *spu = ctx->spu;
293 int needs_idle;
294 435
295 spu = ctx->spu; 436 if (spu) {
296 if (!spu) 437 spu_unbind_context(spu, ctx);
297 return; 438 spu_reschedule(spu);
298 needs_idle = get_active_spu(spu);
299 unbind_context(spu, ctx);
300 if (needs_idle) {
301 spu_free(spu);
302 spu_prio_wakeup();
303 } 439 }
304} 440}
305 441
442/**
443 * spu_yield - yield a physical spu if others are waiting
444 * @ctx: spu context to yield
445 *
446 * Check if there is a higher priority context waiting and if yes
447 * unbind @ctx from the physical spu and schedule the highest
448 * priority context to run on the freed physical spu instead.
449 */
306void spu_yield(struct spu_context *ctx) 450void spu_yield(struct spu_context *ctx)
307{ 451{
308 struct spu *spu; 452 struct spu *spu;
309 int need_yield = 0; 453 int need_yield = 0;
310 454
311 if (down_write_trylock(&ctx->state_sema)) { 455 if (mutex_trylock(&ctx->state_mutex)) {
312 if ((spu = ctx->spu) != NULL) { 456 if ((spu = ctx->spu) != NULL) {
313 int best = sched_find_first_bit(spu_prio->bitmap); 457 int best = sched_find_first_bit(spu_prio->bitmap);
314 if (best < MAX_PRIO) { 458 if (best < MAX_PRIO) {
315 pr_debug("%s: yielding SPU %d NODE %d\n", 459 pr_debug("%s: yielding SPU %d NODE %d\n",
316 __FUNCTION__, spu->number, spu->node); 460 __FUNCTION__, spu->number, spu->node);
317 spu_deactivate(ctx); 461 spu_deactivate(ctx);
318 ctx->state = SPU_STATE_SAVED;
319 need_yield = 1; 462 need_yield = 1;
320 } else {
321 spu->prio = MAX_PRIO;
322 } 463 }
323 } 464 }
324 up_write(&ctx->state_sema); 465 mutex_unlock(&ctx->state_mutex);
325 } 466 }
326 if (unlikely(need_yield)) 467 if (unlikely(need_yield))
327 yield(); 468 yield();
@@ -331,14 +472,19 @@ int __init spu_sched_init(void)
331{ 472{
332 int i; 473 int i;
333 474
475 spu_sched_wq = create_singlethread_workqueue("spusched");
476 if (!spu_sched_wq)
477 return 1;
478
334 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); 479 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL);
335 if (!spu_prio) { 480 if (!spu_prio) {
336 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n", 481 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n",
337 __FUNCTION__); 482 __FUNCTION__);
483 destroy_workqueue(spu_sched_wq);
338 return 1; 484 return 1;
339 } 485 }
340 for (i = 0; i < MAX_PRIO; i++) { 486 for (i = 0; i < MAX_PRIO; i++) {
341 init_waitqueue_head(&spu_prio->waitq[i]); 487 INIT_LIST_HEAD(&spu_prio->runq[i]);
342 __clear_bit(i, spu_prio->bitmap); 488 __clear_bit(i, spu_prio->bitmap);
343 } 489 }
344 __set_bit(MAX_PRIO, spu_prio->bitmap); 490 __set_bit(MAX_PRIO, spu_prio->bitmap);
@@ -346,6 +492,7 @@ int __init spu_sched_init(void)
346 mutex_init(&spu_prio->active_mutex[i]); 492 mutex_init(&spu_prio->active_mutex[i]);
347 INIT_LIST_HEAD(&spu_prio->active_list[i]); 493 INIT_LIST_HEAD(&spu_prio->active_list[i]);
348 } 494 }
495 spin_lock_init(&spu_prio->runq_lock);
349 return 0; 496 return 0;
350} 497}
351 498
@@ -364,4 +511,5 @@ void __exit spu_sched_exit(void)
364 mutex_unlock(&spu_prio->active_mutex[node]); 511 mutex_unlock(&spu_prio->active_mutex[node]);
365 } 512 }
366 kfree(spu_prio); 513 kfree(spu_prio);
514 destroy_workqueue(spu_sched_wq);
367} 515}
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 70fb13395c04..0c437891dfd5 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -23,7 +23,7 @@
23#define SPUFS_H 23#define SPUFS_H
24 24
25#include <linux/kref.h> 25#include <linux/kref.h>
26#include <linux/rwsem.h> 26#include <linux/mutex.h>
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29 29
@@ -37,11 +37,13 @@ enum {
37}; 37};
38 38
39struct spu_context_ops; 39struct spu_context_ops;
40
41#define SPU_CONTEXT_PREEMPT 0UL
42
43struct spu_gang; 40struct spu_gang;
44 41
42/* ctx->sched_flags */
43enum {
44 SPU_SCHED_WAKE = 0,
45};
46
45struct spu_context { 47struct spu_context {
46 struct spu *spu; /* pointer to a physical SPU */ 48 struct spu *spu; /* pointer to a physical SPU */
47 struct spu_state csa; /* SPU context save area. */ 49 struct spu_state csa; /* SPU context save area. */
@@ -51,10 +53,12 @@ struct spu_context {
51 struct address_space *cntl; /* 'control' area mappings. */ 53 struct address_space *cntl; /* 'control' area mappings. */
52 struct address_space *signal1; /* 'signal1' area mappings. */ 54 struct address_space *signal1; /* 'signal1' area mappings. */
53 struct address_space *signal2; /* 'signal2' area mappings. */ 55 struct address_space *signal2; /* 'signal2' area mappings. */
56 struct address_space *mss; /* 'mss' area mappings. */
57 struct address_space *psmap; /* 'psmap' area mappings. */
54 u64 object_id; /* user space pointer for oprofile */ 58 u64 object_id; /* user space pointer for oprofile */
55 59
56 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state; 60 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
57 struct rw_semaphore state_sema; 61 struct mutex state_mutex;
58 struct semaphore run_sema; 62 struct semaphore run_sema;
59 63
60 struct mm_struct *owner; 64 struct mm_struct *owner;
@@ -75,6 +79,14 @@ struct spu_context {
75 79
76 struct list_head gang_list; 80 struct list_head gang_list;
77 struct spu_gang *gang; 81 struct spu_gang *gang;
82
83 /* scheduler fields */
84 struct list_head rq;
85 struct delayed_work sched_work;
86 unsigned long sched_flags;
87 unsigned long rt_priority;
88 int policy;
89 int prio;
78}; 90};
79 91
80struct spu_gang { 92struct spu_gang {
@@ -149,7 +161,7 @@ long spufs_run_spu(struct file *file,
149 struct spu_context *ctx, u32 *npc, u32 *status); 161 struct spu_context *ctx, u32 *npc, u32 *status);
150long spufs_create(struct nameidata *nd, 162long spufs_create(struct nameidata *nd,
151 unsigned int flags, mode_t mode); 163 unsigned int flags, mode_t mode);
152extern struct file_operations spufs_context_fops; 164extern const struct file_operations spufs_context_fops;
153 165
154/* gang management */ 166/* gang management */
155struct spu_gang *alloc_spu_gang(void); 167struct spu_gang *alloc_spu_gang(void);
@@ -159,6 +171,16 @@ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
159void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx); 171void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
160 172
161/* context management */ 173/* context management */
174static inline void spu_acquire(struct spu_context *ctx)
175{
176 mutex_lock(&ctx->state_mutex);
177}
178
179static inline void spu_release(struct spu_context *ctx)
180{
181 mutex_unlock(&ctx->state_mutex);
182}
183
162struct spu_context * alloc_spu_context(struct spu_gang *gang); 184struct spu_context * alloc_spu_context(struct spu_gang *gang);
163void destroy_spu_context(struct kref *kref); 185void destroy_spu_context(struct kref *kref);
164struct spu_context * get_spu_context(struct spu_context *ctx); 186struct spu_context * get_spu_context(struct spu_context *ctx);
@@ -166,20 +188,18 @@ int put_spu_context(struct spu_context *ctx);
166void spu_unmap_mappings(struct spu_context *ctx); 188void spu_unmap_mappings(struct spu_context *ctx);
167 189
168void spu_forget(struct spu_context *ctx); 190void spu_forget(struct spu_context *ctx);
169void spu_acquire(struct spu_context *ctx); 191int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
170void spu_release(struct spu_context *ctx);
171int spu_acquire_runnable(struct spu_context *ctx);
172void spu_acquire_saved(struct spu_context *ctx); 192void spu_acquire_saved(struct spu_context *ctx);
173int spu_acquire_exclusive(struct spu_context *ctx); 193int spu_acquire_exclusive(struct spu_context *ctx);
174 194enum {
175static inline void spu_release_exclusive(struct spu_context *ctx) 195 SPU_ACTIVATE_NOWAKE = 1,
176{ 196};
177 up_write(&ctx->state_sema); 197int spu_activate(struct spu_context *ctx, unsigned long flags);
178}
179
180int spu_activate(struct spu_context *ctx, u64 flags);
181void spu_deactivate(struct spu_context *ctx); 198void spu_deactivate(struct spu_context *ctx);
182void spu_yield(struct spu_context *ctx); 199void spu_yield(struct spu_context *ctx);
200void spu_start_tick(struct spu_context *ctx);
201void spu_stop_tick(struct spu_context *ctx);
202void spu_sched_tick(struct work_struct *work);
183int __init spu_sched_init(void); 203int __init spu_sched_init(void);
184void __exit spu_sched_exit(void); 204void __exit spu_sched_exit(void);
185 205
diff --git a/arch/powerpc/platforms/celleb/Makefile b/arch/powerpc/platforms/celleb/Makefile
new file mode 100644
index 000000000000..f4f82520dc4f
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/Makefile
@@ -0,0 +1,8 @@
1obj-y += interrupt.o iommu.o setup.o \
2 htab.o beat.o pci.o \
3 scc_epci.o scc_uhc.o hvCall.o
4
5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o
7obj-$(CONFIG_HAS_TXX9_SERIAL) += scc_sio.o
8obj-$(CONFIG_SPU_BASE) += spu_priv1.o
diff --git a/arch/powerpc/platforms/celleb/beat.c b/arch/powerpc/platforms/celleb/beat.c
new file mode 100644
index 000000000000..99341ce8a697
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat.c
@@ -0,0 +1,163 @@
1/*
2 * Simple routines for Celleb/Beat
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/module.h>
22#include <linux/init.h>
23#include <linux/err.h>
24#include <linux/rtc.h>
25
26#include <asm/hvconsole.h>
27#include <asm/time.h>
28
29#include "beat_wrapper.h"
30#include "beat.h"
31
32void beat_restart(char *cmd)
33{
34 beat_shutdown_logical_partition(1);
35}
36
37void beat_power_off(void)
38{
39 beat_shutdown_logical_partition(0);
40}
41
42u64 beat_halt_code = 0x1000000000000000UL;
43
44void beat_halt(void)
45{
46 beat_shutdown_logical_partition(beat_halt_code);
47}
48
49int beat_set_rtc_time(struct rtc_time *rtc_time)
50{
51 u64 tim;
52 tim = mktime(rtc_time->tm_year+1900,
53 rtc_time->tm_mon+1, rtc_time->tm_mday,
54 rtc_time->tm_hour, rtc_time->tm_min, rtc_time->tm_sec);
55 if (beat_rtc_write(tim))
56 return -1;
57 return 0;
58}
59
60void beat_get_rtc_time(struct rtc_time *rtc_time)
61{
62 u64 tim;
63
64 if (beat_rtc_read(&tim))
65 tim = 0;
66 to_tm(tim, rtc_time);
67 rtc_time->tm_year -= 1900;
68 rtc_time->tm_mon -= 1;
69}
70
71#define BEAT_NVRAM_SIZE 4096
72
73ssize_t beat_nvram_read(char *buf, size_t count, loff_t *index)
74{
75 unsigned int i;
76 unsigned long len;
77 char *p = buf;
78
79 if (*index >= BEAT_NVRAM_SIZE)
80 return -ENODEV;
81 i = *index;
82 if (i + count > BEAT_NVRAM_SIZE)
83 count = BEAT_NVRAM_SIZE - i;
84
85 for (; count != 0; count -= len) {
86 len = count;
87 if (len > BEAT_NVRW_CNT)
88 len = BEAT_NVRW_CNT;
89 if (beat_eeprom_read(i, len, p)) {
90 return -EIO;
91 }
92
93 p += len;
94 i += len;
95 }
96 *index = i;
97 return p - buf;
98}
99
100ssize_t beat_nvram_write(char *buf, size_t count, loff_t *index)
101{
102 unsigned int i;
103 unsigned long len;
104 char *p = buf;
105
106 if (*index >= BEAT_NVRAM_SIZE)
107 return -ENODEV;
108 i = *index;
109 if (i + count > BEAT_NVRAM_SIZE)
110 count = BEAT_NVRAM_SIZE - i;
111
112 for (; count != 0; count -= len) {
113 len = count;
114 if (len > BEAT_NVRW_CNT)
115 len = BEAT_NVRW_CNT;
116 if (beat_eeprom_write(i, len, p)) {
117 return -EIO;
118 }
119
120 p += len;
121 i += len;
122 }
123 *index = i;
124 return p - buf;
125}
126
127ssize_t beat_nvram_get_size(void)
128{
129 return BEAT_NVRAM_SIZE;
130}
131
132int beat_set_xdabr(unsigned long dabr)
133{
134 if (beat_set_dabr(dabr, DABRX_KERNEL | DABRX_USER))
135 return -1;
136 return 0;
137}
138
139int64_t beat_get_term_char(u64 vterm, u64 *len, u64 *t1, u64 *t2)
140{
141 u64 db[2];
142 s64 ret;
143
144 ret = beat_get_characters_from_console(vterm, len, (u8*)db);
145 if (ret == 0) {
146 *t1 = db[0];
147 *t2 = db[1];
148 }
149 return ret;
150}
151
152int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2)
153{
154 u64 db[2];
155
156 db[0] = t1;
157 db[1] = t2;
158 return beat_put_characters_to_console(vterm, len, (u8*)db);
159}
160
161EXPORT_SYMBOL(beat_get_term_char);
162EXPORT_SYMBOL(beat_put_term_char);
163EXPORT_SYMBOL(beat_halt_code);
diff --git a/arch/powerpc/platforms/celleb/beat.h b/arch/powerpc/platforms/celleb/beat.h
new file mode 100644
index 000000000000..2b16bf3bee89
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat.h
@@ -0,0 +1,40 @@
1/*
2 * Guest OS Interfaces.
3 *
4 * (C) Copyright 2006 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_BEAT_H
22#define _CELLEB_BEAT_H
23
24#define DABRX_KERNEL (1UL<<1)
25#define DABRX_USER (1UL<<0)
26
27int64_t beat_get_term_char(uint64_t,uint64_t*,uint64_t*,uint64_t*);
28int64_t beat_put_term_char(uint64_t,uint64_t,uint64_t,uint64_t);
29int64_t beat_repository_encode(int, const char *, uint64_t[4]);
30void beat_restart(char *);
31void beat_power_off(void);
32void beat_halt(void);
33int beat_set_rtc_time(struct rtc_time *);
34void beat_get_rtc_time(struct rtc_time *);
35ssize_t beat_nvram_get_size(void);
36ssize_t beat_nvram_read(char *, size_t, loff_t *);
37ssize_t beat_nvram_write(char *, size_t, loff_t *);
38int beat_set_xdabr(unsigned long);
39
40#endif /* _CELLEB_BEAT_H */
diff --git a/arch/powerpc/platforms/celleb/beat_syscall.h b/arch/powerpc/platforms/celleb/beat_syscall.h
new file mode 100644
index 000000000000..14e16974773f
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat_syscall.h
@@ -0,0 +1,160 @@
1/*
2 * Beat hypervisor call numbers
3 *
4 * (C) Copyright 2004-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef BEAT_BEAT_syscall_H
22#define BEAT_BEAT_syscall_H
23
24#ifdef __ASSEMBLY__
25#define __BEAT_ADD_VENDOR_ID(__x, __v) ((__v)<<60|(__x))
26#else
27#define __BEAT_ADD_VENDOR_ID(__x, __v) ((u64)(__v)<<60|(__x))
28#endif
29#define HV_allocate_memory __BEAT_ADD_VENDOR_ID(0, 0)
30#define HV_construct_virtual_address_space __BEAT_ADD_VENDOR_ID(2, 0)
31#define HV_destruct_virtual_address_space __BEAT_ADD_VENDOR_ID(10, 0)
32#define HV_get_virtual_address_space_id_of_ppe __BEAT_ADD_VENDOR_ID(4, 0)
33#define HV_query_logical_partition_address_region_info \
34 __BEAT_ADD_VENDOR_ID(6, 0)
35#define HV_release_memory __BEAT_ADD_VENDOR_ID(13, 0)
36#define HV_select_virtual_address_space __BEAT_ADD_VENDOR_ID(7, 0)
37#define HV_load_range_registers __BEAT_ADD_VENDOR_ID(68, 0)
38#define HV_set_ppe_l2cache_rmt_entry __BEAT_ADD_VENDOR_ID(70, 0)
39#define HV_set_ppe_tlb_rmt_entry __BEAT_ADD_VENDOR_ID(71, 0)
40#define HV_set_spe_tlb_rmt_entry __BEAT_ADD_VENDOR_ID(72, 0)
41#define HV_get_io_address_translation_fault_info __BEAT_ADD_VENDOR_ID(14, 0)
42#define HV_get_iopte __BEAT_ADD_VENDOR_ID(16, 0)
43#define HV_preload_iopt_cache __BEAT_ADD_VENDOR_ID(17, 0)
44#define HV_put_iopte __BEAT_ADD_VENDOR_ID(15, 0)
45#define HV_connect_event_ports __BEAT_ADD_VENDOR_ID(21, 0)
46#define HV_construct_event_receive_port __BEAT_ADD_VENDOR_ID(18, 0)
47#define HV_destruct_event_receive_port __BEAT_ADD_VENDOR_ID(19, 0)
48#define HV_destruct_event_send_port __BEAT_ADD_VENDOR_ID(22, 0)
49#define HV_get_state_of_event_send_port __BEAT_ADD_VENDOR_ID(25, 0)
50#define HV_request_to_connect_event_ports __BEAT_ADD_VENDOR_ID(20, 0)
51#define HV_send_event_externally __BEAT_ADD_VENDOR_ID(23, 0)
52#define HV_send_event_locally __BEAT_ADD_VENDOR_ID(24, 0)
53#define HV_construct_and_connect_irq_plug __BEAT_ADD_VENDOR_ID(28, 0)
54#define HV_destruct_irq_plug __BEAT_ADD_VENDOR_ID(29, 0)
55#define HV_detect_pending_interrupts __BEAT_ADD_VENDOR_ID(26, 0)
56#define HV_end_of_interrupt __BEAT_ADD_VENDOR_ID(27, 0)
57#define HV_assign_control_signal_notification_port __BEAT_ADD_VENDOR_ID(45, 0)
58#define HV_end_of_control_signal_processing __BEAT_ADD_VENDOR_ID(48, 0)
59#define HV_get_control_signal __BEAT_ADD_VENDOR_ID(46, 0)
60#define HV_set_irq_mask_for_spe __BEAT_ADD_VENDOR_ID(61, 0)
61#define HV_shutdown_logical_partition __BEAT_ADD_VENDOR_ID(44, 0)
62#define HV_connect_message_ports __BEAT_ADD_VENDOR_ID(35, 0)
63#define HV_destruct_message_port __BEAT_ADD_VENDOR_ID(36, 0)
64#define HV_receive_message __BEAT_ADD_VENDOR_ID(37, 0)
65#define HV_get_message_port_info __BEAT_ADD_VENDOR_ID(34, 0)
66#define HV_request_to_connect_message_ports __BEAT_ADD_VENDOR_ID(33, 0)
67#define HV_send_message __BEAT_ADD_VENDOR_ID(32, 0)
68#define HV_get_logical_ppe_id __BEAT_ADD_VENDOR_ID(69, 0)
69#define HV_pause __BEAT_ADD_VENDOR_ID(9, 0)
70#define HV_destruct_shared_memory_handle __BEAT_ADD_VENDOR_ID(51, 0)
71#define HV_get_shared_memory_info __BEAT_ADD_VENDOR_ID(52, 0)
72#define HV_permit_sharing_memory __BEAT_ADD_VENDOR_ID(50, 0)
73#define HV_request_to_attach_shared_memory __BEAT_ADD_VENDOR_ID(49, 0)
74#define HV_enable_logical_spe_execution __BEAT_ADD_VENDOR_ID(55, 0)
75#define HV_construct_logical_spe __BEAT_ADD_VENDOR_ID(53, 0)
76#define HV_disable_logical_spe_execution __BEAT_ADD_VENDOR_ID(56, 0)
77#define HV_destruct_logical_spe __BEAT_ADD_VENDOR_ID(54, 0)
78#define HV_sense_spe_execution_status __BEAT_ADD_VENDOR_ID(58, 0)
79#define HV_insert_htab_entry __BEAT_ADD_VENDOR_ID(101, 0)
80#define HV_read_htab_entries __BEAT_ADD_VENDOR_ID(95, 0)
81#define HV_write_htab_entry __BEAT_ADD_VENDOR_ID(94, 0)
82#define HV_assign_io_address_translation_fault_port \
83 __BEAT_ADD_VENDOR_ID(100, 0)
84#define HV_set_interrupt_mask __BEAT_ADD_VENDOR_ID(73, 0)
85#define HV_get_logical_partition_id __BEAT_ADD_VENDOR_ID(74, 0)
86#define HV_create_repository_node2 __BEAT_ADD_VENDOR_ID(90, 0)
87#define HV_create_repository_node __BEAT_ADD_VENDOR_ID(90, 0) /* alias */
88#define HV_get_repository_node_value2 __BEAT_ADD_VENDOR_ID(91, 0)
89#define HV_get_repository_node_value __BEAT_ADD_VENDOR_ID(91, 0) /* alias */
90#define HV_modify_repository_node_value2 __BEAT_ADD_VENDOR_ID(92, 0)
91#define HV_modify_repository_node_value __BEAT_ADD_VENDOR_ID(92, 0) /* alias */
92#define HV_remove_repository_node2 __BEAT_ADD_VENDOR_ID(93, 0)
93#define HV_remove_repository_node __BEAT_ADD_VENDOR_ID(93, 0) /* alias */
94#define HV_cancel_shared_memory __BEAT_ADD_VENDOR_ID(104, 0)
95#define HV_clear_interrupt_status_of_spe __BEAT_ADD_VENDOR_ID(206, 0)
96#define HV_construct_spe_irq_outlet __BEAT_ADD_VENDOR_ID(80, 0)
97#define HV_destruct_spe_irq_outlet __BEAT_ADD_VENDOR_ID(81, 0)
98#define HV_disconnect_ipspc_service __BEAT_ADD_VENDOR_ID(88, 0)
99#define HV_execute_ipspc_command __BEAT_ADD_VENDOR_ID(86, 0)
100#define HV_get_interrupt_status_of_spe __BEAT_ADD_VENDOR_ID(205, 0)
101#define HV_get_spe_privileged_state_1_registers __BEAT_ADD_VENDOR_ID(208, 0)
102#define HV_permit_use_of_ipspc_service __BEAT_ADD_VENDOR_ID(85, 0)
103#define HV_reinitialize_logical_spe __BEAT_ADD_VENDOR_ID(82, 0)
104#define HV_request_ipspc_service __BEAT_ADD_VENDOR_ID(84, 0)
105#define HV_stop_ipspc_command __BEAT_ADD_VENDOR_ID(87, 0)
106#define HV_set_spe_privileged_state_1_registers __BEAT_ADD_VENDOR_ID(204, 0)
107#define HV_get_status_of_ipspc_service __BEAT_ADD_VENDOR_ID(203, 0)
108#define HV_put_characters_to_console __BEAT_ADD_VENDOR_ID(0x101, 1)
109#define HV_get_characters_from_console __BEAT_ADD_VENDOR_ID(0x102, 1)
110#define HV_get_base_clock __BEAT_ADD_VENDOR_ID(0x111, 1)
111#define HV_set_base_clock __BEAT_ADD_VENDOR_ID(0x112, 1)
112#define HV_get_frame_cycle __BEAT_ADD_VENDOR_ID(0x114, 1)
113#define HV_disable_console __BEAT_ADD_VENDOR_ID(0x115, 1)
114#define HV_disable_all_console __BEAT_ADD_VENDOR_ID(0x116, 1)
115#define HV_oneshot_timer __BEAT_ADD_VENDOR_ID(0x117, 1)
116#define HV_set_dabr __BEAT_ADD_VENDOR_ID(0x118, 1)
117#define HV_get_dabr __BEAT_ADD_VENDOR_ID(0x119, 1)
118#define HV_start_hv_stats __BEAT_ADD_VENDOR_ID(0x21c, 1)
119#define HV_stop_hv_stats __BEAT_ADD_VENDOR_ID(0x21d, 1)
120#define HV_get_hv_stats __BEAT_ADD_VENDOR_ID(0x21e, 1)
121#define HV_get_hv_error_stats __BEAT_ADD_VENDOR_ID(0x221, 1)
122#define HV_get_stats __BEAT_ADD_VENDOR_ID(0x224, 1)
123#define HV_get_heap_stats __BEAT_ADD_VENDOR_ID(0x225, 1)
124#define HV_get_memory_stats __BEAT_ADD_VENDOR_ID(0x227, 1)
125#define HV_get_memory_detail __BEAT_ADD_VENDOR_ID(0x228, 1)
126#define HV_set_priority_of_irq_outlet __BEAT_ADD_VENDOR_ID(0x122, 1)
127#define HV_get_physical_spe_by_reservation_id __BEAT_ADD_VENDOR_ID(0x128, 1)
128#define HV_get_spe_context __BEAT_ADD_VENDOR_ID(0x129, 1)
129#define HV_set_spe_context __BEAT_ADD_VENDOR_ID(0x12a, 1)
130#define HV_downcount_of_interrupt __BEAT_ADD_VENDOR_ID(0x12e, 1)
131#define HV_peek_spe_context __BEAT_ADD_VENDOR_ID(0x12f, 1)
132#define HV_read_bpa_register __BEAT_ADD_VENDOR_ID(0x131, 1)
133#define HV_write_bpa_register __BEAT_ADD_VENDOR_ID(0x132, 1)
134#define HV_map_context_table_of_spe __BEAT_ADD_VENDOR_ID(0x137, 1)
135#define HV_get_slb_for_logical_spe __BEAT_ADD_VENDOR_ID(0x138, 1)
136#define HV_set_slb_for_logical_spe __BEAT_ADD_VENDOR_ID(0x139, 1)
137#define HV_init_pm __BEAT_ADD_VENDOR_ID(0x150, 1)
138#define HV_set_pm_signal __BEAT_ADD_VENDOR_ID(0x151, 1)
139#define HV_get_pm_signal __BEAT_ADD_VENDOR_ID(0x152, 1)
140#define HV_set_pm_config __BEAT_ADD_VENDOR_ID(0x153, 1)
141#define HV_get_pm_config __BEAT_ADD_VENDOR_ID(0x154, 1)
142#define HV_get_inner_trace_data __BEAT_ADD_VENDOR_ID(0x155, 1)
143#define HV_set_ext_trace_buffer __BEAT_ADD_VENDOR_ID(0x156, 1)
144#define HV_get_ext_trace_buffer __BEAT_ADD_VENDOR_ID(0x157, 1)
145#define HV_set_pm_interrupt __BEAT_ADD_VENDOR_ID(0x158, 1)
146#define HV_get_pm_interrupt __BEAT_ADD_VENDOR_ID(0x159, 1)
147#define HV_kick_pm __BEAT_ADD_VENDOR_ID(0x160, 1)
148#define HV_construct_pm_context __BEAT_ADD_VENDOR_ID(0x164, 1)
149#define HV_destruct_pm_context __BEAT_ADD_VENDOR_ID(0x165, 1)
150#define HV_be_slow __BEAT_ADD_VENDOR_ID(0x170, 1)
151#define HV_assign_ipspc_server_connection_status_notification_port \
152 __BEAT_ADD_VENDOR_ID(0x173, 1)
153#define HV_get_raid_of_physical_spe __BEAT_ADD_VENDOR_ID(0x174, 1)
154#define HV_set_physical_spe_to_rag __BEAT_ADD_VENDOR_ID(0x175, 1)
155#define HV_release_physical_spe_from_rag __BEAT_ADD_VENDOR_ID(0x176, 1)
156#define HV_rtc_read __BEAT_ADD_VENDOR_ID(0x190, 1)
157#define HV_rtc_write __BEAT_ADD_VENDOR_ID(0x191, 1)
158#define HV_eeprom_read __BEAT_ADD_VENDOR_ID(0x192, 1)
159#define HV_eeprom_write __BEAT_ADD_VENDOR_ID(0x193, 1)
160#endif
diff --git a/arch/powerpc/platforms/celleb/beat_wrapper.h b/arch/powerpc/platforms/celleb/beat_wrapper.h
new file mode 100644
index 000000000000..76ea0a6a9011
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat_wrapper.h
@@ -0,0 +1,220 @@
1/*
2 * Beat hypervisor call I/F
3 *
4 * (C) Copyright 2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/plpar_wrapper.h.
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 along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22#ifndef BEAT_HCALL
23#include "beat_syscall.h"
24
25/* defined in hvCall.S */
26extern s64 beat_hcall_norets(u64 opcode, ...);
27extern s64 beat_hcall_norets8(u64 opcode, u64 arg1, u64 arg2, u64 arg3,
28 u64 arg4, u64 arg5, u64 arg6, u64 arg7, u64 arg8);
29extern s64 beat_hcall1(u64 opcode, u64 retbuf[1], ...);
30extern s64 beat_hcall2(u64 opcode, u64 retbuf[2], ...);
31extern s64 beat_hcall3(u64 opcode, u64 retbuf[3], ...);
32extern s64 beat_hcall4(u64 opcode, u64 retbuf[4], ...);
33extern s64 beat_hcall5(u64 opcode, u64 retbuf[5], ...);
34extern s64 beat_hcall6(u64 opcode, u64 retbuf[6], ...);
35
36static inline s64 beat_downcount_of_interrupt(u64 plug_id)
37{
38 return beat_hcall_norets(HV_downcount_of_interrupt, plug_id);
39}
40
41static inline s64 beat_set_interrupt_mask(u64 index,
42 u64 val0, u64 val1, u64 val2, u64 val3)
43{
44 return beat_hcall_norets(HV_set_interrupt_mask, index,
45 val0, val1, val2, val3);
46}
47
48static inline s64 beat_destruct_irq_plug(u64 plug_id)
49{
50 return beat_hcall_norets(HV_destruct_irq_plug, plug_id);
51}
52
53static inline s64 beat_construct_and_connect_irq_plug(u64 plug_id,
54 u64 outlet_id)
55{
56 return beat_hcall_norets(HV_construct_and_connect_irq_plug, plug_id,
57 outlet_id);
58}
59
60static inline s64 beat_detect_pending_interrupts(u64 index, u64 *retbuf)
61{
62 return beat_hcall4(HV_detect_pending_interrupts, retbuf, index);
63}
64
65static inline s64 beat_pause(u64 style)
66{
67 return beat_hcall_norets(HV_pause, style);
68}
69
70static inline s64 beat_read_htab_entries(u64 htab_id, u64 index, u64 *retbuf)
71{
72 return beat_hcall5(HV_read_htab_entries, retbuf, htab_id, index);
73}
74
75static inline s64 beat_insert_htab_entry(u64 htab_id, u64 group,
76 u64 bitmask, u64 hpte_v, u64 hpte_r, u64 *slot)
77{
78 u64 dummy[3];
79 s64 ret;
80
81 ret = beat_hcall3(HV_insert_htab_entry, dummy, htab_id, group,
82 bitmask, hpte_v, hpte_r);
83 *slot = dummy[0];
84 return ret;
85}
86
87static inline s64 beat_write_htab_entry(u64 htab_id, u64 slot,
88 u64 hpte_v, u64 hpte_r, u64 mask_v, u64 mask_r,
89 u64 *ret_v, u64 *ret_r)
90{
91 u64 dummy[2];
92 s64 ret;
93
94 ret = beat_hcall2(HV_write_htab_entry, dummy, htab_id, slot,
95 hpte_v, hpte_r, mask_v, mask_r);
96 *ret_v = dummy[0];
97 *ret_r = dummy[1];
98 return ret;
99}
100
101static inline void beat_shutdown_logical_partition(u64 code)
102{
103 (void)beat_hcall_norets(HV_shutdown_logical_partition, code);
104}
105
106static inline s64 beat_rtc_write(u64 time_from_epoch)
107{
108 return beat_hcall_norets(HV_rtc_write, time_from_epoch);
109}
110
111static inline s64 beat_rtc_read(u64 *time_from_epoch)
112{
113 u64 dummy[1];
114 s64 ret;
115
116 ret = beat_hcall1(HV_rtc_read, dummy);
117 *time_from_epoch = dummy[0];
118 return ret;
119}
120
121#define BEAT_NVRW_CNT (sizeof(u64) * 6)
122
123static inline s64 beat_eeprom_write(u64 index, u64 length, u8 *buffer)
124{
125 u64 b[6];
126
127 if (length > BEAT_NVRW_CNT)
128 return -1;
129 memcpy(b, buffer, sizeof(b));
130 return beat_hcall_norets8(HV_eeprom_write, index, length,
131 b[0], b[1], b[2], b[3], b[4], b[5]);
132}
133
134static inline s64 beat_eeprom_read(u64 index, u64 length, u8 *buffer)
135{
136 u64 b[6];
137 s64 ret;
138
139 if (length > BEAT_NVRW_CNT)
140 return -1;
141 ret = beat_hcall6(HV_eeprom_read, b, index, length);
142 memcpy(buffer, b, length);
143 return ret;
144}
145
146static inline s64 beat_set_dabr(u64 value, u64 style)
147{
148 return beat_hcall_norets(HV_set_dabr, value, style);
149}
150
151static inline s64 beat_get_characters_from_console(u64 termno, u64 *len,
152 u8 *buffer)
153{
154 u64 dummy[3];
155 s64 ret;
156
157 ret = beat_hcall3(HV_get_characters_from_console, dummy, termno, len);
158 *len = dummy[0];
159 memcpy(buffer, dummy + 1, *len);
160 return ret;
161}
162
163static inline s64 beat_put_characters_to_console(u64 termno, u64 len,
164 u8 *buffer)
165{
166 u64 b[2];
167
168 memcpy(b, buffer, len);
169 return beat_hcall_norets(HV_put_characters_to_console, termno, len, b[0], b[1]);
170}
171
172static inline s64 beat_get_spe_privileged_state_1_registers(
173 u64 id, u64 offsetof, u64 *value)
174{
175 u64 dummy[1];
176 s64 ret;
177
178 ret = beat_hcall1(HV_get_spe_privileged_state_1_registers, dummy, id,
179 offsetof);
180 *value = dummy[0];
181 return ret;
182}
183
184static inline s64 beat_set_irq_mask_for_spe(u64 id, u64 class, u64 mask)
185{
186 return beat_hcall_norets(HV_set_irq_mask_for_spe, id, class, mask);
187}
188
189static inline s64 beat_clear_interrupt_status_of_spe(u64 id, u64 class,
190 u64 mask)
191{
192 return beat_hcall_norets(HV_clear_interrupt_status_of_spe,
193 id, class, mask);
194}
195
196static inline s64 beat_set_spe_privileged_state_1_registers(
197 u64 id, u64 offsetof, u64 value)
198{
199 return beat_hcall_norets(HV_set_spe_privileged_state_1_registers,
200 id, offsetof, value);
201}
202
203static inline s64 beat_get_interrupt_status_of_spe(u64 id, u64 class, u64 *val)
204{
205 u64 dummy[1];
206 s64 ret;
207
208 ret = beat_hcall1(HV_get_interrupt_status_of_spe, dummy, id, class);
209 *val = dummy[0];
210 return ret;
211}
212
213static inline s64 beat_put_iopte(u64 ioas_id, u64 io_addr, u64 real_addr,
214 u64 ioid, u64 flags)
215{
216 return beat_hcall_norets(HV_put_iopte, ioas_id, io_addr, real_addr,
217 ioid, flags);
218}
219
220#endif
diff --git a/arch/powerpc/platforms/celleb/htab.c b/arch/powerpc/platforms/celleb/htab.c
new file mode 100644
index 000000000000..279d7339e170
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/htab.c
@@ -0,0 +1,308 @@
1/*
2 * "Cell Reference Set" HTAB support.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/lpar.c:
7 * Copyright (C) 2001 Todd Inglett, IBM Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24#undef DEBUG_LOW
25
26#include <linux/kernel.h>
27#include <linux/spinlock.h>
28
29#include <asm/mmu.h>
30#include <asm/page.h>
31#include <asm/pgtable.h>
32#include <asm/machdep.h>
33#include <asm/udbg.h>
34
35#include "beat_wrapper.h"
36
37#ifdef DEBUG_LOW
38#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0)
39#else
40#define DBG_LOW(fmt...) do { } while(0)
41#endif
42
43static DEFINE_SPINLOCK(beat_htab_lock);
44
45static inline unsigned int beat_read_mask(unsigned hpte_group)
46{
47 unsigned long hpte_v[5];
48 unsigned long rmask = 0;
49
50 beat_read_htab_entries(0, hpte_group + 0, hpte_v);
51 if (!(hpte_v[0] & HPTE_V_BOLTED))
52 rmask |= 0x8000;
53 if (!(hpte_v[1] & HPTE_V_BOLTED))
54 rmask |= 0x4000;
55 if (!(hpte_v[2] & HPTE_V_BOLTED))
56 rmask |= 0x2000;
57 if (!(hpte_v[3] & HPTE_V_BOLTED))
58 rmask |= 0x1000;
59 beat_read_htab_entries(0, hpte_group + 4, hpte_v);
60 if (!(hpte_v[0] & HPTE_V_BOLTED))
61 rmask |= 0x0800;
62 if (!(hpte_v[1] & HPTE_V_BOLTED))
63 rmask |= 0x0400;
64 if (!(hpte_v[2] & HPTE_V_BOLTED))
65 rmask |= 0x0200;
66 if (!(hpte_v[3] & HPTE_V_BOLTED))
67 rmask |= 0x0100;
68 hpte_group = ~hpte_group & (htab_hash_mask * HPTES_PER_GROUP);
69 beat_read_htab_entries(0, hpte_group + 0, hpte_v);
70 if (!(hpte_v[0] & HPTE_V_BOLTED))
71 rmask |= 0x80;
72 if (!(hpte_v[1] & HPTE_V_BOLTED))
73 rmask |= 0x40;
74 if (!(hpte_v[2] & HPTE_V_BOLTED))
75 rmask |= 0x20;
76 if (!(hpte_v[3] & HPTE_V_BOLTED))
77 rmask |= 0x10;
78 beat_read_htab_entries(0, hpte_group + 4, hpte_v);
79 if (!(hpte_v[0] & HPTE_V_BOLTED))
80 rmask |= 0x08;
81 if (!(hpte_v[1] & HPTE_V_BOLTED))
82 rmask |= 0x04;
83 if (!(hpte_v[2] & HPTE_V_BOLTED))
84 rmask |= 0x02;
85 if (!(hpte_v[3] & HPTE_V_BOLTED))
86 rmask |= 0x01;
87 return rmask;
88}
89
90static long beat_lpar_hpte_insert(unsigned long hpte_group,
91 unsigned long va, unsigned long pa,
92 unsigned long rflags, unsigned long vflags,
93 int psize)
94{
95 unsigned long lpar_rc;
96 unsigned long slot;
97 unsigned long hpte_v, hpte_r;
98
99 /* same as iseries */
100 if (vflags & HPTE_V_SECONDARY)
101 return -1;
102
103 if (!(vflags & HPTE_V_BOLTED))
104 DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, "
105 "rflags=%lx, vflags=%lx, psize=%d)\n",
106 hpte_group, va, pa, rflags, vflags, psize);
107
108 hpte_v = hpte_encode_v(va, psize) | vflags | HPTE_V_VALID;
109 hpte_r = hpte_encode_r(pa, psize) | rflags;
110
111 if (!(vflags & HPTE_V_BOLTED))
112 DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
113
114 if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
115 hpte_r &= ~_PAGE_COHERENT;
116
117 spin_lock(&beat_htab_lock);
118 if ((lpar_rc = beat_read_mask(hpte_group)) == 0) {
119 if (!(vflags & HPTE_V_BOLTED))
120 DBG_LOW(" full\n");
121 spin_unlock(&beat_htab_lock);
122 return -1;
123 }
124
125 lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
126 hpte_v, hpte_r, &slot);
127 spin_unlock(&beat_htab_lock);
128
129 /*
130 * Since we try and ioremap PHBs we don't own, the pte insert
131 * will fail. However we must catch the failure in hash_page
132 * or we will loop forever, so return -2 in this case.
133 */
134 if (unlikely(lpar_rc != 0)) {
135 if (!(vflags & HPTE_V_BOLTED))
136 DBG_LOW(" lpar err %lx\n", lpar_rc);
137 return -2;
138 }
139 if (!(vflags & HPTE_V_BOLTED))
140 DBG_LOW(" -> slot: %lx\n", slot);
141
142 /* We have to pass down the secondary bucket bit here as well */
143 return (slot ^ hpte_group) & 15;
144}
145
146static long beat_lpar_hpte_remove(unsigned long hpte_group)
147{
148 DBG_LOW("hpte_remove(group=%lx)\n", hpte_group);
149 return -1;
150}
151
152static unsigned long beat_lpar_hpte_getword0(unsigned long slot)
153{
154 unsigned long dword0, dword[5];
155 unsigned long lpar_rc;
156
157 lpar_rc = beat_read_htab_entries(0, slot & ~3UL, dword);
158
159 dword0 = dword[slot&3];
160
161 BUG_ON(lpar_rc != 0);
162
163 return dword0;
164}
165
166static void beat_lpar_hptab_clear(void)
167{
168 unsigned long size_bytes = 1UL << ppc64_pft_size;
169 unsigned long hpte_count = size_bytes >> 4;
170 int i;
171 unsigned long dummy0, dummy1;
172
173 /* TODO: Use bulk call */
174 for (i = 0; i < hpte_count; i++)
175 beat_write_htab_entry(0, i, 0, 0, -1UL, -1UL, &dummy0, &dummy1);
176}
177
178/*
179 * NOTE: for updatepp ops we are fortunate that the linux "newpp" bits and
180 * the low 3 bits of flags happen to line up. So no transform is needed.
181 * We can probably optimize here and assume the high bits of newpp are
182 * already zero. For now I am paranoid.
183 */
184static long beat_lpar_hpte_updatepp(unsigned long slot,
185 unsigned long newpp,
186 unsigned long va,
187 int psize, int local)
188{
189 unsigned long lpar_rc;
190 unsigned long dummy0, dummy1, want_v;
191
192 want_v = hpte_encode_v(va, psize);
193
194 DBG_LOW(" update: "
195 "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
196 want_v & HPTE_V_AVPN, slot, psize, newpp);
197
198 spin_lock(&beat_htab_lock);
199 dummy0 = beat_lpar_hpte_getword0(slot);
200 if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
201 DBG_LOW("not found !\n");
202 spin_unlock(&beat_htab_lock);
203 return -1;
204 }
205
206 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
207 &dummy1);
208 spin_unlock(&beat_htab_lock);
209 if (lpar_rc != 0 || dummy0 == 0) {
210 DBG_LOW("not found !\n");
211 return -1;
212 }
213
214 DBG_LOW("ok %lx %lx\n", dummy0, dummy1);
215
216 BUG_ON(lpar_rc != 0);
217
218 return 0;
219}
220
221static long beat_lpar_hpte_find(unsigned long va, int psize)
222{
223 unsigned long hash;
224 unsigned long i, j;
225 long slot;
226 unsigned long want_v, hpte_v;
227
228 hash = hpt_hash(va, mmu_psize_defs[psize].shift);
229 want_v = hpte_encode_v(va, psize);
230
231 for (j = 0; j < 2; j++) {
232 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
233 for (i = 0; i < HPTES_PER_GROUP; i++) {
234 hpte_v = beat_lpar_hpte_getword0(slot);
235
236 if (HPTE_V_COMPARE(hpte_v, want_v)
237 && (hpte_v & HPTE_V_VALID)
238 && (!!(hpte_v & HPTE_V_SECONDARY) == j)) {
239 /* HPTE matches */
240 if (j)
241 slot = -slot;
242 return slot;
243 }
244 ++slot;
245 }
246 hash = ~hash;
247 }
248
249 return -1;
250}
251
252static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
253 unsigned long ea,
254 int psize)
255{
256 unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1;
257
258 vsid = get_kernel_vsid(ea);
259 va = (vsid << 28) | (ea & 0x0fffffff);
260
261 spin_lock(&beat_htab_lock);
262 slot = beat_lpar_hpte_find(va, psize);
263 BUG_ON(slot == -1);
264
265 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
266 &dummy0, &dummy1);
267 spin_unlock(&beat_htab_lock);
268
269 BUG_ON(lpar_rc != 0);
270}
271
272static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
273 int psize, int local)
274{
275 unsigned long want_v;
276 unsigned long lpar_rc;
277 unsigned long dummy1, dummy2;
278 unsigned long flags;
279
280 DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n",
281 slot, va, psize, local);
282 want_v = hpte_encode_v(va, psize);
283
284 spin_lock_irqsave(&beat_htab_lock, flags);
285 dummy1 = beat_lpar_hpte_getword0(slot);
286
287 if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
288 DBG_LOW("not found !\n");
289 spin_unlock_irqrestore(&beat_htab_lock, flags);
290 return;
291 }
292
293 lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
294 &dummy1, &dummy2);
295 spin_unlock_irqrestore(&beat_htab_lock, flags);
296
297 BUG_ON(lpar_rc != 0);
298}
299
300void __init hpte_init_beat(void)
301{
302 ppc_md.hpte_invalidate = beat_lpar_hpte_invalidate;
303 ppc_md.hpte_updatepp = beat_lpar_hpte_updatepp;
304 ppc_md.hpte_updateboltedpp = beat_lpar_hpte_updateboltedpp;
305 ppc_md.hpte_insert = beat_lpar_hpte_insert;
306 ppc_md.hpte_remove = beat_lpar_hpte_remove;
307 ppc_md.hpte_clear_all = beat_lpar_hptab_clear;
308}
diff --git a/arch/powerpc/platforms/celleb/hvCall.S b/arch/powerpc/platforms/celleb/hvCall.S
new file mode 100644
index 000000000000..74c817448948
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/hvCall.S
@@ -0,0 +1,287 @@
1/*
2 * Beat hypervisor call I/F
3 *
4 * (C) Copyright 2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/hvCall.S.
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 along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#include <asm/ppc_asm.h>
24
25#define STK_PARM(i) (48 + ((i)-3)*8)
26
27/* Not implemented on Beat, now */
28#define HCALL_INST_PRECALL
29#define HCALL_INST_POSTCALL
30
31 .text
32
33#define HVSC .long 0x44000022
34
35/* Note: takes only 7 input parameters at maximum */
36_GLOBAL(beat_hcall_norets)
37 HMT_MEDIUM
38
39 mfcr r0
40 stw r0,8(r1)
41
42 HCALL_INST_PRECALL
43
44 mr r11,r3
45 mr r3,r4
46 mr r4,r5
47 mr r5,r6
48 mr r6,r7
49 mr r7,r8
50 mr r8,r9
51
52 HVSC /* invoke the hypervisor */
53
54 HCALL_INST_POSTCALL
55
56 lwz r0,8(r1)
57 mtcrf 0xff,r0
58
59 blr /* return r3 = status */
60
61/* Note: takes 8 input parameters at maximum */
62_GLOBAL(beat_hcall_norets8)
63 HMT_MEDIUM
64
65 mfcr r0
66 stw r0,8(r1)
67
68 HCALL_INST_PRECALL
69
70 mr r11,r3
71 mr r3,r4
72 mr r4,r5
73 mr r5,r6
74 mr r6,r7
75 mr r7,r8
76 mr r8,r9
77 ld r10,STK_PARM(r10)(r1)
78
79 HVSC /* invoke the hypervisor */
80
81 HCALL_INST_POSTCALL
82
83 lwz r0,8(r1)
84 mtcrf 0xff,r0
85
86 blr /* return r3 = status */
87
88/* Note: takes only 6 input parameters, 1 output parameters at maximum */
89_GLOBAL(beat_hcall1)
90 HMT_MEDIUM
91
92 mfcr r0
93 stw r0,8(r1)
94
95 HCALL_INST_PRECALL
96
97 std r4,STK_PARM(r4)(r1) /* save ret buffer */
98
99 mr r11,r3
100 mr r3,r5
101 mr r4,r6
102 mr r5,r7
103 mr r6,r8
104 mr r7,r9
105 mr r8,r10
106
107 HVSC /* invoke the hypervisor */
108
109 HCALL_INST_POSTCALL
110
111 ld r12,STK_PARM(r4)(r1)
112 std r4, 0(r12)
113
114 lwz r0,8(r1)
115 mtcrf 0xff,r0
116
117 blr /* return r3 = status */
118
119/* Note: takes only 6 input parameters, 2 output parameters at maximum */
120_GLOBAL(beat_hcall2)
121 HMT_MEDIUM
122
123 mfcr r0
124 stw r0,8(r1)
125
126 HCALL_INST_PRECALL
127
128 std r4,STK_PARM(r4)(r1) /* save ret buffer */
129
130 mr r11,r3
131 mr r3,r5
132 mr r4,r6
133 mr r5,r7
134 mr r6,r8
135 mr r7,r9
136 mr r8,r10
137
138 HVSC /* invoke the hypervisor */
139
140 HCALL_INST_POSTCALL
141
142 ld r12,STK_PARM(r4)(r1)
143 std r4, 0(r12)
144 std r5, 8(r12)
145
146 lwz r0,8(r1)
147 mtcrf 0xff,r0
148
149 blr /* return r3 = status */
150
151/* Note: takes only 6 input parameters, 3 output parameters at maximum */
152_GLOBAL(beat_hcall3)
153 HMT_MEDIUM
154
155 mfcr r0
156 stw r0,8(r1)
157
158 HCALL_INST_PRECALL
159
160 std r4,STK_PARM(r4)(r1) /* save ret buffer */
161
162 mr r11,r3
163 mr r3,r5
164 mr r4,r6
165 mr r5,r7
166 mr r6,r8
167 mr r7,r9
168 mr r8,r10
169
170 HVSC /* invoke the hypervisor */
171
172 HCALL_INST_POSTCALL
173
174 ld r12,STK_PARM(r4)(r1)
175 std r4, 0(r12)
176 std r5, 8(r12)
177 std r6, 16(r12)
178
179 lwz r0,8(r1)
180 mtcrf 0xff,r0
181
182 blr /* return r3 = status */
183
184/* Note: takes only 6 input parameters, 4 output parameters at maximum */
185_GLOBAL(beat_hcall4)
186 HMT_MEDIUM
187
188 mfcr r0
189 stw r0,8(r1)
190
191 HCALL_INST_PRECALL
192
193 std r4,STK_PARM(r4)(r1) /* save ret buffer */
194
195 mr r11,r3
196 mr r3,r5
197 mr r4,r6
198 mr r5,r7
199 mr r6,r8
200 mr r7,r9
201 mr r8,r10
202
203 HVSC /* invoke the hypervisor */
204
205 HCALL_INST_POSTCALL
206
207 ld r12,STK_PARM(r4)(r1)
208 std r4, 0(r12)
209 std r5, 8(r12)
210 std r6, 16(r12)
211 std r7, 24(r12)
212
213 lwz r0,8(r1)
214 mtcrf 0xff,r0
215
216 blr /* return r3 = status */
217
218/* Note: takes only 6 input parameters, 5 output parameters at maximum */
219_GLOBAL(beat_hcall5)
220 HMT_MEDIUM
221
222 mfcr r0
223 stw r0,8(r1)
224
225 HCALL_INST_PRECALL
226
227 std r4,STK_PARM(r4)(r1) /* save ret buffer */
228
229 mr r11,r3
230 mr r3,r5
231 mr r4,r6
232 mr r5,r7
233 mr r6,r8
234 mr r7,r9
235 mr r8,r10
236
237 HVSC /* invoke the hypervisor */
238
239 HCALL_INST_POSTCALL
240
241 ld r12,STK_PARM(r4)(r1)
242 std r4, 0(r12)
243 std r5, 8(r12)
244 std r6, 16(r12)
245 std r7, 24(r12)
246 std r8, 32(r12)
247
248 lwz r0,8(r1)
249 mtcrf 0xff,r0
250
251 blr /* return r3 = status */
252
253/* Note: takes only 6 input parameters, 6 output parameters at maximum */
254_GLOBAL(beat_hcall6)
255 HMT_MEDIUM
256
257 mfcr r0
258 stw r0,8(r1)
259
260 HCALL_INST_PRECALL
261
262 std r4,STK_PARM(r4)(r1) /* save ret buffer */
263
264 mr r11,r3
265 mr r3,r5
266 mr r4,r6
267 mr r5,r7
268 mr r6,r8
269 mr r7,r9
270 mr r8,r10
271
272 HVSC /* invoke the hypervisor */
273
274 HCALL_INST_POSTCALL
275
276 ld r12,STK_PARM(r4)(r1)
277 std r4, 0(r12)
278 std r5, 8(r12)
279 std r6, 16(r12)
280 std r7, 24(r12)
281 std r8, 32(r12)
282 std r9, 40(r12)
283
284 lwz r0,8(r1)
285 mtcrf 0xff,r0
286
287 blr /* return r3 = status */
diff --git a/arch/powerpc/platforms/celleb/interrupt.c b/arch/powerpc/platforms/celleb/interrupt.c
new file mode 100644
index 000000000000..98e6665681d3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/interrupt.c
@@ -0,0 +1,274 @@
1/*
2 * Celleb/Beat Interrupt controller
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/irq.h>
24#include <linux/percpu.h>
25#include <linux/types.h>
26
27#include <asm/machdep.h>
28
29#include "interrupt.h"
30#include "beat_wrapper.h"
31
32#define MAX_IRQS NR_IRQS
33static DEFINE_SPINLOCK(beatic_irq_mask_lock);
34static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
35static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
36
37static struct irq_host *beatic_host = NULL;
38
39/*
40 * In this implementation, "virq" == "IRQ plug number",
41 * "(irq_hw_number_t)hwirq" == "IRQ outlet number".
42 */
43
44/* assumption: locked */
45static inline void beatic_update_irq_mask(unsigned int irq_plug)
46{
47 int off;
48 unsigned long masks[4];
49
50 off = (irq_plug / 256) * 4;
51 masks[0] = beatic_irq_mask_enable[off + 0]
52 & beatic_irq_mask_ack[off + 0];
53 masks[1] = beatic_irq_mask_enable[off + 1]
54 & beatic_irq_mask_ack[off + 1];
55 masks[2] = beatic_irq_mask_enable[off + 2]
56 & beatic_irq_mask_ack[off + 2];
57 masks[3] = beatic_irq_mask_enable[off + 3]
58 & beatic_irq_mask_ack[off + 3];
59 if (beat_set_interrupt_mask(irq_plug&~255UL,
60 masks[0], masks[1], masks[2], masks[3]) != 0)
61 panic("Failed to set mask IRQ!");
62}
63
64static void beatic_mask_irq(unsigned int irq_plug)
65{
66 unsigned long flags;
67
68 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
69 beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
70 beatic_update_irq_mask(irq_plug);
71 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
72}
73
74static void beatic_unmask_irq(unsigned int irq_plug)
75{
76 unsigned long flags;
77
78 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
79 beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
80 beatic_update_irq_mask(irq_plug);
81 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
82}
83
84static void beatic_ack_irq(unsigned int irq_plug)
85{
86 unsigned long flags;
87
88 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
89 beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
90 beatic_update_irq_mask(irq_plug);
91 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
92}
93
94static void beatic_end_irq(unsigned int irq_plug)
95{
96 s64 err;
97 unsigned long flags;
98
99 if ((err = beat_downcount_of_interrupt(irq_plug)) != 0) {
100 if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */
101 panic("Failed to downcount IRQ! Error = %16lx", err);
102
103 printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
104 }
105 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
106 beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
107 beatic_update_irq_mask(irq_plug);
108 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
109}
110
111static struct irq_chip beatic_pic = {
112 .typename = " CELL-BEAT ",
113 .unmask = beatic_unmask_irq,
114 .mask = beatic_mask_irq,
115 .eoi = beatic_end_irq,
116};
117
118/*
119 * Dispose binding hardware IRQ number (hw) and Virtuql IRQ number (virq),
120 * update flags.
121 *
122 * Note that the number (virq) is already assigned at upper layer.
123 */
124static void beatic_pic_host_unmap(struct irq_host *h, unsigned int virq)
125{
126 beat_destruct_irq_plug(virq);
127}
128
129/*
130 * Create or update binding hardware IRQ number (hw) and Virtuql
131 * IRQ number (virq). This is called only once for a given mapping.
132 *
133 * Note that the number (virq) is already assigned at upper layer.
134 */
135static int beatic_pic_host_map(struct irq_host *h, unsigned int virq,
136 irq_hw_number_t hw)
137{
138 struct irq_desc *desc = get_irq_desc(virq);
139 int64_t err;
140
141 if ((err = beat_construct_and_connect_irq_plug(virq, hw)) < 0)
142 return -EIO;
143
144 desc->status |= IRQ_LEVEL;
145 set_irq_chip_and_handler(virq, &beatic_pic, handle_fasteoi_irq);
146 return 0;
147}
148
149/*
150 * Update binding hardware IRQ number (hw) and Virtuql
151 * IRQ number (virq). This is called only once for a given mapping.
152 */
153static void beatic_pic_host_remap(struct irq_host *h, unsigned int virq,
154 irq_hw_number_t hw)
155{
156 beat_construct_and_connect_irq_plug(virq, hw);
157}
158
159/*
160 * Translate device-tree interrupt spec to irq_hw_number_t style (ulong),
161 * to pass away to irq_create_mapping().
162 *
163 * Called from irq_create_of_mapping() only.
164 * Note: We have only 1 entry to translate.
165 */
166static int beatic_pic_host_xlate(struct irq_host *h, struct device_node *ct,
167 u32 *intspec, unsigned int intsize,
168 irq_hw_number_t *out_hwirq,
169 unsigned int *out_flags)
170{
171 u64 *intspec2 = (u64 *)intspec;
172
173 *out_hwirq = *intspec2;
174 *out_flags |= IRQ_TYPE_LEVEL_LOW;
175 return 0;
176}
177
178static struct irq_host_ops beatic_pic_host_ops = {
179 .map = beatic_pic_host_map,
180 .remap = beatic_pic_host_remap,
181 .unmap = beatic_pic_host_unmap,
182 .xlate = beatic_pic_host_xlate,
183};
184
185/*
186 * Get an IRQ number
187 * Note: returns VIRQ
188 */
189static inline unsigned int beatic_get_irq_plug(void)
190{
191 int i;
192 uint64_t pending[4], ub;
193
194 for (i = 0; i < MAX_IRQS; i += 256) {
195 beat_detect_pending_interrupts(i, pending);
196 __asm__ ("cntlzd %0,%1":"=r"(ub):
197 "r"(pending[0] & beatic_irq_mask_enable[i/64+0]
198 & beatic_irq_mask_ack[i/64+0]));
199 if (ub != 64)
200 return i + ub + 0;
201 __asm__ ("cntlzd %0,%1":"=r"(ub):
202 "r"(pending[1] & beatic_irq_mask_enable[i/64+1]
203 & beatic_irq_mask_ack[i/64+1]));
204 if (ub != 64)
205 return i + ub + 64;
206 __asm__ ("cntlzd %0,%1":"=r"(ub):
207 "r"(pending[2] & beatic_irq_mask_enable[i/64+2]
208 & beatic_irq_mask_ack[i/64+2]));
209 if (ub != 64)
210 return i + ub + 128;
211 __asm__ ("cntlzd %0,%1":"=r"(ub):
212 "r"(pending[3] & beatic_irq_mask_enable[i/64+3]
213 & beatic_irq_mask_ack[i/64+3]));
214 if (ub != 64)
215 return i + ub + 192;
216 }
217
218 return NO_IRQ;
219}
220unsigned int beatic_get_irq(void)
221{
222 unsigned int ret;
223
224 ret = beatic_get_irq_plug();
225 if (ret != NO_IRQ)
226 beatic_ack_irq(ret);
227 return ret;
228}
229
230/*
231 */
232void __init beatic_init_IRQ(void)
233{
234 int i;
235
236 memset(beatic_irq_mask_enable, 0, sizeof(beatic_irq_mask_enable));
237 memset(beatic_irq_mask_ack, 255, sizeof(beatic_irq_mask_ack));
238 for (i = 0; i < MAX_IRQS; i += 256)
239 beat_set_interrupt_mask(i, 0L, 0L, 0L, 0L);
240
241 /* Set out get_irq function */
242 ppc_md.get_irq = beatic_get_irq;
243
244 /* Allocate an irq host */
245 beatic_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0,
246 &beatic_pic_host_ops,
247 0);
248 BUG_ON(beatic_host == NULL);
249 irq_set_default_host(beatic_host);
250}
251
252#ifdef CONFIG_SMP
253
254/* Nullified to compile with SMP mode */
255void beatic_setup_cpu(int cpu)
256{
257}
258
259void beatic_cause_IPI(int cpu, int mesg)
260{
261}
262
263void beatic_request_IPIs(void)
264{
265}
266#endif /* CONFIG_SMP */
267
268void beatic_deinit_IRQ(void)
269{
270 int i;
271
272 for (i = 1; i < NR_IRQS; i++)
273 beat_destruct_irq_plug(i);
274}
diff --git a/arch/powerpc/platforms/celleb/interrupt.h b/arch/powerpc/platforms/celleb/interrupt.h
new file mode 100644
index 000000000000..b470fd0051f1
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/interrupt.h
@@ -0,0 +1,33 @@
1/*
2 * Celleb/Beat Interrupt controller
3 *
4 * (C) Copyright 2006 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef ASM_BEAT_PIC_H
22#define ASM_BEAT_PIC_H
23#ifdef __KERNEL__
24
25extern void beatic_init_IRQ(void);
26extern unsigned int beatic_get_irq(void);
27extern void beatic_cause_IPI(int cpu, int mesg);
28extern void beatic_request_IPIs(void);
29extern void beatic_setup_cpu(int);
30extern void beatic_deinit_IRQ(void);
31
32#endif
33#endif /* ASM_BEAT_PIC_H */
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
new file mode 100644
index 000000000000..f63b94c65353
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -0,0 +1,104 @@
1/*
2 * Support for IOMMU on Celleb platform.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/dma-mapping.h>
24#include <linux/pci.h>
25
26#include <asm/of_platform.h>
27
28#include "beat_wrapper.h"
29
30#define DMA_FLAGS 0xf800000000000000UL /* r/w permitted, coherency required,
31 strongest order */
32
33static int __init find_dma_window(u64 *io_space_id, u64 *ioid,
34 u64 *base, u64 *size, u64 *io_page_size)
35{
36 struct device_node *dn;
37 const unsigned long *dma_window;
38
39 for_each_node_by_type(dn, "ioif") {
40 dma_window = get_property(dn, "toshiba,dma-window", NULL);
41 if (dma_window) {
42 *io_space_id = (dma_window[0] >> 32) & 0xffffffffUL;
43 *ioid = dma_window[0] & 0x7ffUL;
44 *base = dma_window[1];
45 *size = dma_window[2];
46 *io_page_size = 1 << dma_window[3];
47 of_node_put(dn);
48 return 1;
49 }
50 }
51 return 0;
52}
53
54static void __init celleb_init_direct_mapping(void)
55{
56 u64 lpar_addr, io_addr;
57 u64 io_space_id, ioid, dma_base, dma_size, io_page_size;
58
59 if (!find_dma_window(&io_space_id, &ioid, &dma_base, &dma_size,
60 &io_page_size)) {
61 pr_info("No dma window found !\n");
62 return;
63 }
64
65 for (lpar_addr = 0; lpar_addr < dma_size; lpar_addr += io_page_size) {
66 io_addr = lpar_addr + dma_base;
67 (void)beat_put_iopte(io_space_id, io_addr, lpar_addr,
68 ioid, DMA_FLAGS);
69 }
70
71 dma_direct_offset = dma_base;
72}
73
74static int celleb_of_bus_notify(struct notifier_block *nb,
75 unsigned long action, void *data)
76{
77 struct device *dev = data;
78
79 /* We are only intereted in device addition */
80 if (action != BUS_NOTIFY_ADD_DEVICE)
81 return 0;
82
83 dev->archdata.dma_ops = pci_dma_ops;
84
85 return 0;
86}
87
88static struct notifier_block celleb_of_bus_notifier = {
89 .notifier_call = celleb_of_bus_notify
90};
91
92static int __init celleb_init_iommu(void)
93{
94 if (!machine_is(celleb))
95 return -ENODEV;
96
97 celleb_init_direct_mapping();
98 pci_dma_ops = &dma_direct_ops;
99 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
100
101 return 0;
102}
103
104arch_initcall(celleb_init_iommu);
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c
new file mode 100644
index 000000000000..98de836dfed3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/pci.c
@@ -0,0 +1,481 @@
1/*
2 * Support for PCI on Celleb platform.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/kernel/rtas_pci.c:
7 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
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 along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25#undef DEBUG
26
27#include <linux/kernel.h>
28#include <linux/threads.h>
29#include <linux/pci.h>
30#include <linux/string.h>
31#include <linux/init.h>
32#include <linux/bootmem.h>
33#include <linux/pci_regs.h>
34
35#include <asm/io.h>
36#include <asm/irq.h>
37#include <asm/prom.h>
38#include <asm/machdep.h>
39#include <asm/pci-bridge.h>
40#include <asm/ppc-pci.h>
41
42#include "pci.h"
43#include "interrupt.h"
44
45#define MAX_PCI_DEVICES 32
46#define MAX_PCI_FUNCTIONS 8
47#define MAX_PCI_BASE_ADDRS 3 /* use 64 bit address */
48
49/* definition for fake pci configuration area for GbE, .... ,and etc. */
50
51struct celleb_pci_resource {
52 struct resource r[MAX_PCI_BASE_ADDRS];
53};
54
55struct celleb_pci_private {
56 unsigned char *fake_config[MAX_PCI_DEVICES][MAX_PCI_FUNCTIONS];
57 struct celleb_pci_resource *res[MAX_PCI_DEVICES][MAX_PCI_FUNCTIONS];
58};
59
60static inline u8 celleb_fake_config_readb(void *addr)
61{
62 u8 *p = addr;
63 return *p;
64}
65
66static inline u16 celleb_fake_config_readw(void *addr)
67{
68 __le16 *p = addr;
69 return le16_to_cpu(*p);
70}
71
72static inline u32 celleb_fake_config_readl(void *addr)
73{
74 __le32 *p = addr;
75 return le32_to_cpu(*p);
76}
77
78static inline void celleb_fake_config_writeb(u32 val, void *addr)
79{
80 u8 *p = addr;
81 *p = val;
82}
83
84static inline void celleb_fake_config_writew(u32 val, void *addr)
85{
86 __le16 val16;
87 __le16 *p = addr;
88 val16 = cpu_to_le16(val);
89 *p = val16;
90}
91
92static inline void celleb_fake_config_writel(u32 val, void *addr)
93{
94 __le32 val32;
95 __le32 *p = addr;
96 val32 = cpu_to_le32(val);
97 *p = val32;
98}
99
100static unsigned char *get_fake_config_start(struct pci_controller *hose,
101 int devno, int fn)
102{
103 struct celleb_pci_private *private = hose->private_data;
104
105 if (private == NULL)
106 return NULL;
107
108 return private->fake_config[devno][fn];
109}
110
111static struct celleb_pci_resource *get_resource_start(
112 struct pci_controller *hose,
113 int devno, int fn)
114{
115 struct celleb_pci_private *private = hose->private_data;
116
117 if (private == NULL)
118 return NULL;
119
120 return private->res[devno][fn];
121}
122
123
124static void celleb_config_read_fake(unsigned char *config, int where,
125 int size, u32 *val)
126{
127 char *p = config + where;
128
129 switch (size) {
130 case 1:
131 *val = celleb_fake_config_readb(p);
132 break;
133 case 2:
134 *val = celleb_fake_config_readw(p);
135 break;
136 case 4:
137 *val = celleb_fake_config_readl(p);
138 break;
139 }
140
141 return;
142}
143
144static void celleb_config_write_fake(unsigned char *config, int where,
145 int size, u32 val)
146{
147 char *p = config + where;
148
149 switch (size) {
150 case 1:
151 celleb_fake_config_writeb(val, p);
152 break;
153 case 2:
154 celleb_fake_config_writew(val, p);
155 break;
156 case 4:
157 celleb_fake_config_writel(val, p);
158 break;
159 }
160 return;
161}
162
163static int celleb_fake_pci_read_config(struct pci_bus *bus,
164 unsigned int devfn, int where, int size, u32 *val)
165{
166 char *config;
167 struct device_node *node;
168 struct pci_controller *hose;
169 unsigned int devno = devfn >> 3;
170 unsigned int fn = devfn & 0x7;
171
172 /* allignment check */
173 BUG_ON(where % size);
174
175 pr_debug(" fake read: bus=0x%x, ", bus->number);
176 node = (struct device_node *)bus->sysdata;
177 hose = pci_find_hose_for_OF_device(node);
178 config = get_fake_config_start(hose, devno, fn);
179
180 pr_debug("devno=0x%x, where=0x%x, size=0x%x, ", devno, where, size);
181 if (!config) {
182 pr_debug("failed\n");
183 return PCIBIOS_DEVICE_NOT_FOUND;
184 }
185
186 celleb_config_read_fake(config, where, size, val);
187 pr_debug("val=0x%x\n", *val);
188
189 return PCIBIOS_SUCCESSFUL;
190}
191
192
193static int celleb_fake_pci_write_config(struct pci_bus *bus,
194 unsigned int devfn, int where, int size, u32 val)
195{
196 char *config;
197 struct device_node *node;
198 struct pci_controller *hose;
199 struct celleb_pci_resource *res;
200 unsigned int devno = devfn >> 3;
201 unsigned int fn = devfn & 0x7;
202
203 /* allignment check */
204 BUG_ON(where % size);
205
206 node = (struct device_node *)bus->sysdata;
207 hose = pci_find_hose_for_OF_device(node);
208 config = get_fake_config_start(hose, devno, fn);
209
210 if (!config)
211 return PCIBIOS_DEVICE_NOT_FOUND;
212
213 if (val == ~0) {
214 int i = (where - PCI_BASE_ADDRESS_0) >> 3;
215
216 switch (where) {
217 case PCI_BASE_ADDRESS_0:
218 case PCI_BASE_ADDRESS_2:
219 if (size != 4)
220 return PCIBIOS_DEVICE_NOT_FOUND;
221 res = get_resource_start(hose, devno, fn);
222 if (!res)
223 return PCIBIOS_DEVICE_NOT_FOUND;
224 celleb_config_write_fake(config, where, size,
225 (res->r[i].end - res->r[i].start));
226 return PCIBIOS_SUCCESSFUL;
227 case PCI_BASE_ADDRESS_1:
228 case PCI_BASE_ADDRESS_3:
229 case PCI_BASE_ADDRESS_4:
230 case PCI_BASE_ADDRESS_5:
231 break;
232 default:
233 break;
234 }
235 }
236
237 celleb_config_write_fake(config, where, size, val);
238 pr_debug(" fake write: where=%x, size=%d, val=%x\n",
239 where, size, val);
240
241 return PCIBIOS_SUCCESSFUL;
242}
243
244static struct pci_ops celleb_fake_pci_ops = {
245 celleb_fake_pci_read_config,
246 celleb_fake_pci_write_config
247};
248
249static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose,
250 unsigned int devno, unsigned int fn,
251 unsigned int num_base_addr)
252{
253 u32 val;
254 unsigned char *config;
255 struct celleb_pci_resource *res;
256
257 config = get_fake_config_start(hose, devno, fn);
258 res = get_resource_start(hose, devno, fn);
259
260 if (!config || !res)
261 return;
262
263 switch (num_base_addr) {
264 case 3:
265 val = (res->r[2].start & 0xfffffff0)
266 | PCI_BASE_ADDRESS_MEM_TYPE_64;
267 celleb_config_write_fake(config, PCI_BASE_ADDRESS_4, 4, val);
268 val = res->r[2].start >> 32;
269 celleb_config_write_fake(config, PCI_BASE_ADDRESS_5, 4, val);
270 /* FALLTHROUGH */
271 case 2:
272 val = (res->r[1].start & 0xfffffff0)
273 | PCI_BASE_ADDRESS_MEM_TYPE_64;
274 celleb_config_write_fake(config, PCI_BASE_ADDRESS_2, 4, val);
275 val = res->r[1].start >> 32;
276 celleb_config_write_fake(config, PCI_BASE_ADDRESS_3, 4, val);
277 /* FALLTHROUGH */
278 case 1:
279 val = (res->r[0].start & 0xfffffff0)
280 | PCI_BASE_ADDRESS_MEM_TYPE_64;
281 celleb_config_write_fake(config, PCI_BASE_ADDRESS_0, 4, val);
282 val = res->r[0].start >> 32;
283 celleb_config_write_fake(config, PCI_BASE_ADDRESS_1, 4, val);
284 break;
285 }
286
287 val = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER;
288 celleb_config_write_fake(config, PCI_COMMAND, 2, val);
289}
290
291static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
292 struct pci_controller *hose)
293{
294 unsigned int rlen;
295 int num_base_addr = 0;
296 u32 val;
297 const u32 *wi0, *wi1, *wi2, *wi3, *wi4;
298 unsigned int devno, fn;
299 struct celleb_pci_private *private = hose->private_data;
300 unsigned char **config = NULL;
301 struct celleb_pci_resource **res = NULL;
302 const char *name;
303 const unsigned long *li;
304 int size, result;
305
306 if (private == NULL) {
307 printk(KERN_ERR "PCI: "
308 "memory space for pci controller is not assigned\n");
309 goto error;
310 }
311
312 name = get_property(node, "model", &rlen);
313 if (!name) {
314 printk(KERN_ERR "PCI: model property not found.\n");
315 goto error;
316 }
317
318 wi4 = get_property(node, "reg", &rlen);
319 if (wi4 == NULL)
320 goto error;
321
322 devno = ((wi4[0] >> 8) & 0xff) >> 3;
323 fn = (wi4[0] >> 8) & 0x7;
324
325 pr_debug("PCI: celleb_setup_fake_pci() %s devno=%x fn=%x\n", name,
326 devno, fn);
327
328 size = 256;
329 config = &private->fake_config[devno][fn];
330 if (mem_init_done)
331 *config = kzalloc(size, GFP_KERNEL);
332 else
333 *config = alloc_bootmem(size);
334 if (*config == NULL) {
335 printk(KERN_ERR "PCI: "
336 "not enough memory for fake configuration space\n");
337 goto error;
338 }
339 pr_debug("PCI: fake config area assigned 0x%016lx\n",
340 (unsigned long)*config);
341
342 size = sizeof(struct celleb_pci_resource);
343 res = &private->res[devno][fn];
344 if (mem_init_done)
345 *res = kzalloc(size, GFP_KERNEL);
346 else
347 *res = alloc_bootmem(size);
348 if (*res == NULL) {
349 printk(KERN_ERR
350 "PCI: not enough memory for resource data space\n");
351 goto error;
352 }
353 pr_debug("PCI: res assigned 0x%016lx\n", (unsigned long)*res);
354
355 wi0 = get_property(node, "device-id", NULL);
356 wi1 = get_property(node, "vendor-id", NULL);
357 wi2 = get_property(node, "class-code", NULL);
358 wi3 = get_property(node, "revision-id", NULL);
359
360 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
361 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
362 pr_debug("class-code = 0x%08x\n", wi2[0]);
363
364 celleb_config_write_fake(*config, PCI_CLASS_PROG, 1, wi2[0] & 0xff);
365 celleb_config_write_fake(*config, PCI_CLASS_DEVICE, 2,
366 (wi2[0] >> 8) & 0xffff);
367 celleb_config_write_fake(*config, PCI_REVISION_ID, 1, wi3[0]);
368
369 while (num_base_addr < MAX_PCI_BASE_ADDRS) {
370 result = of_address_to_resource(node,
371 num_base_addr, &(*res)->r[num_base_addr]);
372 if (result)
373 break;
374 num_base_addr++;
375 }
376
377 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
378
379 li = get_property(node, "interrupts", &rlen);
380 val = li[0];
381 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
382 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
383
384#ifdef DEBUG
385 pr_debug("PCI: %s irq=%ld\n", name, li[0]);
386 for (i = 0; i < 6; i++) {
387 celleb_config_read_fake(*config,
388 PCI_BASE_ADDRESS_0 + 0x4 * i, 4,
389 &val);
390 pr_debug("PCI: %s fn=%d base_address_%d=0x%x\n",
391 name, fn, i, val);
392 }
393#endif
394
395 celleb_config_write_fake(*config, PCI_HEADER_TYPE, 1,
396 PCI_HEADER_TYPE_NORMAL);
397
398 return 0;
399
400error:
401 if (mem_init_done) {
402 if (config && *config)
403 kfree(*config);
404 if (res && *res)
405 kfree(*res);
406
407 } else {
408 if (config && *config) {
409 size = 256;
410 free_bootmem((unsigned long)(*config), size);
411 }
412 if (res && *res) {
413 size = sizeof(struct celleb_pci_resource);
414 free_bootmem((unsigned long)(*res), size);
415 }
416 }
417
418 return 1;
419}
420
421static int __devinit phb_set_bus_ranges(struct device_node *dev,
422 struct pci_controller *phb)
423{
424 const int *bus_range;
425 unsigned int len;
426
427 bus_range = get_property(dev, "bus-range", &len);
428 if (bus_range == NULL || len < 2 * sizeof(int))
429 return 1;
430
431 phb->first_busno = bus_range[0];
432 phb->last_busno = bus_range[1];
433
434 return 0;
435}
436
437static void __devinit celleb_alloc_private_mem(struct pci_controller *hose)
438{
439 if (mem_init_done)
440 hose->private_data =
441 kzalloc(sizeof(struct celleb_pci_private), GFP_KERNEL);
442 else
443 hose->private_data =
444 alloc_bootmem(sizeof(struct celleb_pci_private));
445}
446
447int __devinit celleb_setup_phb(struct pci_controller *phb)
448{
449 const char *name;
450 struct device_node *dev = phb->arch_data;
451 struct device_node *node;
452 unsigned int rlen;
453
454 name = get_property(dev, "name", &rlen);
455 if (!name)
456 return 1;
457
458 pr_debug("PCI: celleb_setup_phb() %s\n", name);
459 phb_set_bus_ranges(dev, phb);
460
461 if (strcmp(name, "epci") == 0) {
462 phb->ops = &celleb_epci_ops;
463 return celleb_setup_epci(dev, phb);
464
465 } else if (strcmp(name, "pci-pseudo") == 0) {
466 phb->ops = &celleb_fake_pci_ops;
467 celleb_alloc_private_mem(phb);
468 for (node = of_get_next_child(dev, NULL);
469 node != NULL; node = of_get_next_child(dev, node))
470 celleb_setup_fake_pci_device(node, phb);
471
472 } else
473 return 1;
474
475 return 0;
476}
477
478int celleb_pci_probe_mode(struct pci_bus *bus)
479{
480 return PCI_PROBE_DEVTREE;
481}
diff --git a/arch/powerpc/platforms/celleb/pci.h b/arch/powerpc/platforms/celleb/pci.h
new file mode 100644
index 000000000000..5340e348e297
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/pci.h
@@ -0,0 +1,35 @@
1/*
2 * pci prototypes for Celleb platform
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_PCI_H
22#define _CELLEB_PCI_H
23
24#include <linux/pci.h>
25
26#include <asm/pci-bridge.h>
27#include <asm/prom.h>
28
29extern int celleb_setup_phb(struct pci_controller *);
30extern int celleb_pci_probe_mode(struct pci_bus *);
31
32extern struct pci_ops celleb_epci_ops;
33extern int celleb_setup_epci(struct device_node *, struct pci_controller *);
34
35#endif /* _CELLEB_PCI_H */
diff --git a/arch/powerpc/platforms/celleb/scc.h b/arch/powerpc/platforms/celleb/scc.h
new file mode 100644
index 000000000000..e9ce8a7c1882
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc.h
@@ -0,0 +1,145 @@
1/*
2 * SCC (Super Companion Chip) definitions
3 *
4 * (C) Copyright 2004-2006 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_SCC_H
22#define _CELLEB_SCC_H
23
24#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
25#define PCI_DEVICE_ID_TOSHIBA_SCC_PCIEXC_BRIDGE 0x01b0
26#define PCI_DEVICE_ID_TOSHIBA_SCC_EPCI_BRIDGE 0x01b1
27#define PCI_DEVICE_ID_TOSHIBA_SCC_BRIDGE 0x01b2
28#define PCI_DEVICE_ID_TOSHIBA_SCC_GBE 0x01b3
29#define PCI_DEVICE_ID_TOSHIBA_SCC_ATA 0x01b4
30#define PCI_DEVICE_ID_TOSHIBA_SCC_USB2 0x01b5
31#define PCI_DEVICE_ID_TOSHIBA_SCC_USB 0x01b6
32#define PCI_DEVICE_ID_TOSHIBA_SCC_ENCDEC 0x01b7
33
34#define SCC_EPCI_REG 0x0000d000
35
36/* EPCI registers */
37#define SCC_EPCI_CNF10_REG 0x010
38#define SCC_EPCI_CNF14_REG 0x014
39#define SCC_EPCI_CNF18_REG 0x018
40#define SCC_EPCI_PVBAT 0x100
41#define SCC_EPCI_VPMBAT 0x104
42#define SCC_EPCI_VPIBAT 0x108
43#define SCC_EPCI_VCSR 0x110
44#define SCC_EPCI_VIENAB 0x114
45#define SCC_EPCI_VISTAT 0x118
46#define SCC_EPCI_VRDCOUNT 0x124
47#define SCC_EPCI_BAM0 0x12c
48#define SCC_EPCI_BAM1 0x134
49#define SCC_EPCI_BAM2 0x13c
50#define SCC_EPCI_IADR 0x164
51#define SCC_EPCI_CLKRST 0x800
52#define SCC_EPCI_INTSET 0x804
53#define SCC_EPCI_STATUS 0x808
54#define SCC_EPCI_ABTSET 0x80c
55#define SCC_EPCI_WATRP 0x810
56#define SCC_EPCI_DUMMYRADR 0x814
57#define SCC_EPCI_SWRESP 0x818
58#define SCC_EPCI_CNTOPT 0x81c
59#define SCC_EPCI_ECMODE 0xf00
60#define SCC_EPCI_IOM_AC_NUM 5
61#define SCC_EPCI_IOM_ACTE(n) (0xf10 + (n) * 4)
62#define SCC_EPCI_IOT_AC_NUM 4
63#define SCC_EPCI_IOT_ACTE(n) (0xf30 + (n) * 4)
64#define SCC_EPCI_MAEA 0xf50
65#define SCC_EPCI_MAEC 0xf54
66#define SCC_EPCI_CKCTRL 0xff0
67
68/* bits for SCC_EPCI_VCSR */
69#define SCC_EPCI_VCSR_FRE 0x00020000
70#define SCC_EPCI_VCSR_FWE 0x00010000
71#define SCC_EPCI_VCSR_DR 0x00000400
72#define SCC_EPCI_VCSR_SR 0x00000008
73#define SCC_EPCI_VCSR_AT 0x00000004
74
75/* bits for SCC_EPCI_VIENAB/SCC_EPCI_VISTAT */
76#define SCC_EPCI_VISTAT_PMPE 0x00000008
77#define SCC_EPCI_VISTAT_PMFE 0x00000004
78#define SCC_EPCI_VISTAT_PRA 0x00000002
79#define SCC_EPCI_VISTAT_PRD 0x00000001
80#define SCC_EPCI_VISTAT_ALL 0x0000000f
81
82#define SCC_EPCI_VIENAB_PMPEE 0x00000008
83#define SCC_EPCI_VIENAB_PMFEE 0x00000004
84#define SCC_EPCI_VIENAB_PRA 0x00000002
85#define SCC_EPCI_VIENAB_PRD 0x00000001
86#define SCC_EPCI_VIENAB_ALL 0x0000000f
87
88/* bits for SCC_EPCI_CLKRST */
89#define SCC_EPCI_CLKRST_CKS_MASK 0x00030000
90#define SCC_EPCI_CLKRST_CKS_2 0x00000000
91#define SCC_EPCI_CLKRST_CKS_4 0x00010000
92#define SCC_EPCI_CLKRST_CKS_8 0x00020000
93#define SCC_EPCI_CLKRST_PCICRST 0x00000400
94#define SCC_EPCI_CLKRST_BC 0x00000200
95#define SCC_EPCI_CLKRST_PCIRST 0x00000100
96#define SCC_EPCI_CLKRST_PCKEN 0x00000001
97
98/* bits for SCC_EPCI_INTSET/SCC_EPCI_STATUS */
99#define SCC_EPCI_INT_2M 0x01000000
100#define SCC_EPCI_INT_RERR 0x00200000
101#define SCC_EPCI_INT_SERR 0x00100000
102#define SCC_EPCI_INT_PRTER 0x00080000
103#define SCC_EPCI_INT_SER 0x00040000
104#define SCC_EPCI_INT_PER 0x00020000
105#define SCC_EPCI_INT_PAI 0x00010000
106#define SCC_EPCI_INT_1M 0x00000100
107#define SCC_EPCI_INT_PME 0x00000010
108#define SCC_EPCI_INT_INTD 0x00000008
109#define SCC_EPCI_INT_INTC 0x00000004
110#define SCC_EPCI_INT_INTB 0x00000002
111#define SCC_EPCI_INT_INTA 0x00000001
112#define SCC_EPCI_INT_DEVINT 0x0000000f
113#define SCC_EPCI_INT_ALL 0x003f001f
114#define SCC_EPCI_INT_ALLERR 0x003f0000
115
116/* bits for SCC_EPCI_CKCTRL */
117#define SCC_EPCI_CKCTRL_CRST0 0x00010000
118#define SCC_EPCI_CKCTRL_CRST1 0x00020000
119#define SCC_EPCI_CKCTRL_OCLKEN 0x00000100
120#define SCC_EPCI_CKCTRL_LCLKEN 0x00000001
121
122#define SCC_EPCI_IDSEL_AD_TO_SLOT(ad) ((ad) - 10)
123#define SCC_EPCI_MAX_DEVNU SCC_EPCI_IDSEL_AD_TO_SLOT(32)
124
125/* bits for SCC_EPCI_CNTOPT */
126#define SCC_EPCI_CNTOPT_O2PMB 0x00000002
127
128/* UHC registers */
129#define SCC_UHC_CKRCTRL 0xff0
130#define SCC_UHC_ECMODE 0xf00
131
132/* bits for SCC_UHC_CKRCTRL */
133#define SCC_UHC_F48MCKLEN 0x00000001
134#define SCC_UHC_P_SUSPEND 0x00000002
135#define SCC_UHC_PHY_SUSPEND_SEL 0x00000004
136#define SCC_UHC_HCLKEN 0x00000100
137#define SCC_UHC_USBEN 0x00010000
138#define SCC_UHC_USBCEN 0x00020000
139#define SCC_UHC_PHYEN 0x00040000
140
141/* bits for SCC_UHC_ECMODE */
142#define SCC_UHC_ECMODE_BY_BYTE 0x00000555
143#define SCC_UHC_ECMODE_BY_WORD 0x00000aaa
144
145#endif /* _CELLEB_SCC_H */
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c
new file mode 100644
index 000000000000..c11b39c3776a
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_epci.c
@@ -0,0 +1,409 @@
1/*
2 * Support for SCC external PCI
3 *
4 * (C) Copyright 2004-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#undef DEBUG
22
23#include <linux/kernel.h>
24#include <linux/threads.h>
25#include <linux/pci.h>
26#include <linux/init.h>
27#include <linux/pci_regs.h>
28#include <linux/bootmem.h>
29
30#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/prom.h>
33#include <asm/machdep.h>
34#include <asm/pci-bridge.h>
35#include <asm/ppc-pci.h>
36
37#include "scc.h"
38#include "pci.h"
39#include "interrupt.h"
40
41#define MAX_PCI_DEVICES 32
42#define MAX_PCI_FUNCTIONS 8
43
44#define iob() __asm__ __volatile__("eieio; sync":::"memory")
45
46
47#if 0 /* test code for epci dummy read */
48static void celleb_epci_dummy_read(struct pci_dev *dev)
49{
50 void __iomem *epci_base;
51 struct device_node *node;
52 struct pci_controller *hose;
53 u32 val;
54
55 node = (struct device_node *)dev->bus->sysdata;
56 hose = pci_find_hose_for_OF_device(node);
57
58 if (!hose)
59 return;
60
61 epci_base = hose->cfg_addr;
62
63 val = in_be32(epci_base + SCC_EPCI_WATRP);
64 iosync();
65
66 return;
67}
68#endif
69
70static inline void clear_and_disable_master_abort_interrupt(
71 struct pci_controller *hose)
72{
73 void __iomem *addr;
74 addr = hose->cfg_addr + PCI_COMMAND;
75 out_be32(addr, in_be32(addr) | (PCI_STATUS_REC_MASTER_ABORT << 16));
76}
77
78static int celleb_epci_check_abort(struct pci_controller *hose,
79 void __iomem *addr)
80{
81 void __iomem *reg, *epci_base;
82 u32 val;
83
84 iob();
85 epci_base = hose->cfg_addr;
86
87 reg = epci_base + PCI_COMMAND;
88 val = in_be32(reg);
89
90 if (val & (PCI_STATUS_REC_MASTER_ABORT << 16)) {
91 out_be32(reg,
92 (val & 0xffff) | (PCI_STATUS_REC_MASTER_ABORT << 16));
93
94 /* clear PCI Controller error, FRE, PMFE */
95 reg = epci_base + SCC_EPCI_STATUS;
96 out_be32(reg, SCC_EPCI_INT_PAI);
97
98 reg = epci_base + SCC_EPCI_VCSR;
99 val = in_be32(reg) & 0xffff;
100 val |= SCC_EPCI_VCSR_FRE;
101 out_be32(reg, val);
102
103 reg = epci_base + SCC_EPCI_VISTAT;
104 out_be32(reg, SCC_EPCI_VISTAT_PMFE);
105 return PCIBIOS_DEVICE_NOT_FOUND;
106 }
107
108 return PCIBIOS_SUCCESSFUL;
109}
110
111static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose,
112 unsigned int devfn, int where)
113{
114 void __iomem *addr;
115 struct pci_bus *bus = hose->bus;
116
117 if (bus->self)
118 addr = hose->cfg_data +
119 (((bus->number & 0xff) << 16)
120 | ((devfn & 0xff) << 8)
121 | (where & 0xff)
122 | 0x01000000);
123 else
124 addr = hose->cfg_data +
125 (((devfn & 0xff) << 8) | (where & 0xff));
126
127 pr_debug("EPCI: config_addr = 0x%p\n", addr);
128
129 return addr;
130}
131
132static int celleb_epci_read_config(struct pci_bus *bus,
133 unsigned int devfn, int where, int size, u32 * val)
134{
135 void __iomem *addr;
136 struct device_node *node;
137 struct pci_controller *hose;
138
139 /* allignment check */
140 BUG_ON(where % size);
141
142 node = (struct device_node *)bus->sysdata;
143 hose = pci_find_hose_for_OF_device(node);
144
145 if (!hose->cfg_data)
146 return PCIBIOS_DEVICE_NOT_FOUND;
147
148 if (bus->number == hose->first_busno && devfn == 0) {
149 /* EPCI controller self */
150
151 addr = hose->cfg_addr + where;
152
153 switch (size) {
154 case 1:
155 *val = in_8(addr);
156 break;
157 case 2:
158 *val = in_be16(addr);
159 break;
160 case 4:
161 *val = in_be32(addr);
162 break;
163 default:
164 return PCIBIOS_DEVICE_NOT_FOUND;
165 }
166
167 } else {
168
169 clear_and_disable_master_abort_interrupt(hose);
170 addr = celleb_epci_make_config_addr(hose, devfn, where);
171
172 switch (size) {
173 case 1:
174 *val = in_8(addr);
175 break;
176 case 2:
177 *val = in_le16(addr);
178 break;
179 case 4:
180 *val = in_le32(addr);
181 break;
182 default:
183 return PCIBIOS_DEVICE_NOT_FOUND;
184 }
185 }
186
187 pr_debug("EPCI: "
188 "addr=0x%lx, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n",
189 addr, devfn, where, size, *val);
190
191 return celleb_epci_check_abort(hose, NULL);
192}
193
194static int celleb_epci_write_config(struct pci_bus *bus,
195 unsigned int devfn, int where, int size, u32 val)
196{
197 void __iomem *addr;
198 struct device_node *node;
199 struct pci_controller *hose;
200
201 /* allignment check */
202 BUG_ON(where % size);
203
204 node = (struct device_node *)bus->sysdata;
205 hose = pci_find_hose_for_OF_device(node);
206
207 if (!hose->cfg_data)
208 return PCIBIOS_DEVICE_NOT_FOUND;
209
210 if (bus->number == hose->first_busno && devfn == 0) {
211 /* EPCI controller self */
212
213 addr = hose->cfg_addr + where;
214
215 switch (size) {
216 case 1:
217 out_8(addr, val);
218 break;
219 case 2:
220 out_be16(addr, val);
221 break;
222 case 4:
223 out_be32(addr, val);
224 break;
225 default:
226 return PCIBIOS_DEVICE_NOT_FOUND;
227 }
228
229 } else {
230
231 clear_and_disable_master_abort_interrupt(hose);
232 addr = celleb_epci_make_config_addr(hose, devfn, where);
233
234 switch (size) {
235 case 1:
236 out_8(addr, val);
237 break;
238 case 2:
239 out_le16(addr, val);
240 break;
241 case 4:
242 out_le32(addr, val);
243 break;
244 default:
245 return PCIBIOS_DEVICE_NOT_FOUND;
246 }
247 }
248
249 return celleb_epci_check_abort(hose, addr);
250}
251
252struct pci_ops celleb_epci_ops = {
253 celleb_epci_read_config,
254 celleb_epci_write_config,
255};
256
257/* to be moved in FW */
258static int __devinit celleb_epci_init(struct pci_controller *hose)
259{
260 u32 val;
261 void __iomem *reg, *epci_base;
262 int hwres = 0;
263
264 epci_base = hose->cfg_addr;
265
266 /* PCI core reset(Internal bus and PCI clock) */
267 reg = epci_base + SCC_EPCI_CKCTRL;
268 val = in_be32(reg);
269 if (val == 0x00030101)
270 hwres = 1;
271 else {
272 val &= ~(SCC_EPCI_CKCTRL_CRST0 | SCC_EPCI_CKCTRL_CRST1);
273 out_be32(reg, val);
274
275 /* set PCI core clock */
276 val = in_be32(reg);
277 val |= (SCC_EPCI_CKCTRL_OCLKEN | SCC_EPCI_CKCTRL_LCLKEN);
278 out_be32(reg, val);
279
280 /* release PCI core reset (internal bus) */
281 val = in_be32(reg);
282 val |= SCC_EPCI_CKCTRL_CRST0;
283 out_be32(reg, val);
284
285 /* set PCI clock select */
286 reg = epci_base + SCC_EPCI_CLKRST;
287 val = in_be32(reg);
288 val &= ~SCC_EPCI_CLKRST_CKS_MASK;
289 val |= SCC_EPCI_CLKRST_CKS_2;
290 out_be32(reg, val);
291
292 /* set arbiter */
293 reg = epci_base + SCC_EPCI_ABTSET;
294 out_be32(reg, 0x0f1f001f); /* temporary value */
295
296 /* buffer on */
297 reg = epci_base + SCC_EPCI_CLKRST;
298 val = in_be32(reg);
299 val |= SCC_EPCI_CLKRST_BC;
300 out_be32(reg, val);
301
302 /* PCI clock enable */
303 val = in_be32(reg);
304 val |= SCC_EPCI_CLKRST_PCKEN;
305 out_be32(reg, val);
306
307 /* release PCI core reset (all) */
308 reg = epci_base + SCC_EPCI_CKCTRL;
309 val = in_be32(reg);
310 val |= (SCC_EPCI_CKCTRL_CRST0 | SCC_EPCI_CKCTRL_CRST1);
311 out_be32(reg, val);
312
313 /* set base translation registers. (already set by Beat) */
314
315 /* set base address masks. (already set by Beat) */
316 }
317
318 /* release interrupt masks and clear all interrupts */
319 reg = epci_base + SCC_EPCI_INTSET;
320 out_be32(reg, 0x013f011f); /* all interrupts enable */
321 reg = epci_base + SCC_EPCI_VIENAB;
322 val = SCC_EPCI_VIENAB_PMPEE | SCC_EPCI_VIENAB_PMFEE;
323 out_be32(reg, val);
324 reg = epci_base + SCC_EPCI_STATUS;
325 out_be32(reg, 0xffffffff);
326 reg = epci_base + SCC_EPCI_VISTAT;
327 out_be32(reg, 0xffffffff);
328
329 /* disable PCI->IB address translation */
330 reg = epci_base + SCC_EPCI_VCSR;
331 val = in_be32(reg);
332 val &= ~(SCC_EPCI_VCSR_DR | SCC_EPCI_VCSR_AT);
333 out_be32(reg, val);
334
335 /* set base addresses. (no need to set?) */
336
337 /* memory space, bus master enable */
338 reg = epci_base + PCI_COMMAND;
339 val = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER;
340 out_be32(reg, val);
341
342 /* endian mode setup */
343 reg = epci_base + SCC_EPCI_ECMODE;
344 val = 0x00550155;
345 out_be32(reg, val);
346
347 /* set control option */
348 reg = epci_base + SCC_EPCI_CNTOPT;
349 val = in_be32(reg);
350 val |= SCC_EPCI_CNTOPT_O2PMB;
351 out_be32(reg, val);
352
353 /* XXX: temporay: set registers for address conversion setup */
354 reg = epci_base + SCC_EPCI_CNF10_REG;
355 out_be32(reg, 0x80000008);
356 reg = epci_base + SCC_EPCI_CNF14_REG;
357 out_be32(reg, 0x40000008);
358
359 reg = epci_base + SCC_EPCI_BAM0;
360 out_be32(reg, 0x80000000);
361 reg = epci_base + SCC_EPCI_BAM1;
362 out_be32(reg, 0xe0000000);
363
364 reg = epci_base + SCC_EPCI_PVBAT;
365 out_be32(reg, 0x80000000);
366
367 if (!hwres) {
368 /* release external PCI reset */
369 reg = epci_base + SCC_EPCI_CLKRST;
370 val = in_be32(reg);
371 val |= SCC_EPCI_CLKRST_PCIRST;
372 out_be32(reg, val);
373 }
374
375 return 0;
376}
377
378int __devinit celleb_setup_epci(struct device_node *node,
379 struct pci_controller *hose)
380{
381 struct resource r;
382
383 pr_debug("PCI: celleb_setup_epci()\n");
384
385 if (of_address_to_resource(node, 0, &r))
386 goto error;
387 hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1));
388 if (!hose->cfg_addr)
389 goto error;
390 pr_debug("EPCI: cfg_addr map 0x%016lx->0x%016lx + 0x%016lx\n",
391 r.start, (unsigned long)hose->cfg_addr,
392 (r.end - r.start + 1));
393
394 if (of_address_to_resource(node, 2, &r))
395 goto error;
396 hose->cfg_data = ioremap(r.start, (r.end - r.start + 1));
397 if (!hose->cfg_data)
398 goto error;
399 pr_debug("EPCI: cfg_data map 0x%016lx->0x%016lx + 0x%016lx\n",
400 r.start, (unsigned long)hose->cfg_data,
401 (r.end - r.start + 1));
402
403 celleb_epci_init(hose);
404
405 return 0;
406
407error:
408 return 1;
409}
diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c
new file mode 100644
index 000000000000..bcd25f54d986
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_sio.c
@@ -0,0 +1,101 @@
1/*
2 * setup serial port in SCC
3 *
4 * (C) Copyright 2006 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/tty.h>
22#include <linux/serial.h>
23#include <linux/serial_core.h>
24#include <linux/console.h>
25
26#include <asm/io.h>
27#include <asm/prom.h>
28
29/* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024
30 mmio=0xfff000-0x1000,0xff2000-0x1000 */
31static int txx9_serial_bitmap = 0;
32
33static struct {
34 uint32_t offset;
35 uint32_t index;
36} txx9_scc_tab[3] = {
37 { 0x300, 0 }, /* 0xFFF300 */
38 { 0x400, 0 }, /* 0xFFF400 */
39 { 0x800, 1 } /* 0xFF2800 */
40};
41
42static int txx9_serial_init(void)
43{
44 extern int early_serial_txx9_setup(struct uart_port *port);
45 struct device_node *node;
46 int i;
47 struct uart_port req;
48 struct of_irq irq;
49 struct resource res;
50
51 node = of_find_node_by_path("/ioif1/sio");
52 if (!node)
53 return 0;
54
55 for(i = 0; i < sizeof(txx9_scc_tab)/sizeof(txx9_scc_tab[0]); i++) {
56 if (!(txx9_serial_bitmap & (1<<i)))
57 continue;
58
59 if (of_irq_map_one(node, i, &irq))
60 continue;
61 if (of_address_to_resource(node, txx9_scc_tab[i].index, &res))
62 continue;
63
64 memset(&req, 0, sizeof(req));
65 req.line = i;
66 req.iotype = UPIO_MEM;
67 req.mapbase = res.start + txx9_scc_tab[i].offset;
68#ifdef CONFIG_SERIAL_TXX9_CONSOLE
69 req.membase = ioremap(req.mapbase, 0x24);
70#endif
71 req.irq = irq_create_of_mapping(irq.controller,
72 irq.specifier, irq.size);
73 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
74 req.uartclk = 83300000;
75 early_serial_txx9_setup(&req);
76 }
77
78 of_node_put(node);
79 return 0;
80}
81
82static int txx9_serial_config(char *ptr)
83{
84 int i;
85
86 for (;;) {
87 switch(get_option(&ptr, &i)) {
88 default:
89 return 0;
90 case 2:
91 txx9_serial_bitmap |= 1 << i;
92 break;
93 case 1:
94 txx9_serial_bitmap |= 1 << i;
95 return 0;
96 }
97 }
98}
99__setup("txx9_serial=", txx9_serial_config);
100
101console_initcall(txx9_serial_init);
diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/celleb/scc_uhc.c
new file mode 100644
index 000000000000..a7c548bde2e3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_uhc.c
@@ -0,0 +1,94 @@
1/*
2 * SCC (Super Companion Chip) UHC setup
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/pci.h>
23
24#include <asm/delay.h>
25#include <asm/io.h>
26#include <asm/machdep.h>
27
28#include "scc.h"
29
30#define UHC_RESET_WAIT_MAX 10000
31
32static inline int uhc_clkctrl_ready(u32 val)
33{
34 const u32 mask = SCC_UHC_USBCEN | SCC_UHC_USBCEN;
35 return((val & mask) == mask);
36}
37
38/*
39 * UHC(usb host controler) enable function.
40 * affect to both of OHCI and EHCI core module.
41 */
42static void enable_scc_uhc(struct pci_dev *dev)
43{
44 void __iomem *uhc_base;
45 u32 __iomem *uhc_clkctrl;
46 u32 __iomem *uhc_ecmode;
47 u32 val = 0;
48 int i;
49
50 if (!machine_is(celleb))
51 return;
52
53 uhc_base = ioremap(pci_resource_start(dev, 0),
54 pci_resource_len(dev, 0));
55 if (!uhc_base) {
56 printk(KERN_ERR "failed to map UHC register base.\n");
57 return;
58 }
59 uhc_clkctrl = uhc_base + SCC_UHC_CKRCTRL;
60 uhc_ecmode = uhc_base + SCC_UHC_ECMODE;
61
62 /* setup for normal mode */
63 val |= SCC_UHC_F48MCKLEN;
64 out_be32(uhc_clkctrl, val);
65 val |= SCC_UHC_PHY_SUSPEND_SEL;
66 out_be32(uhc_clkctrl, val);
67 udelay(10);
68 val |= SCC_UHC_PHYEN;
69 out_be32(uhc_clkctrl, val);
70 udelay(50);
71
72 /* disable reset */
73 val |= SCC_UHC_HCLKEN;
74 out_be32(uhc_clkctrl, val);
75 val |= (SCC_UHC_USBCEN | SCC_UHC_USBEN);
76 out_be32(uhc_clkctrl, val);
77 i = 0;
78 while (!uhc_clkctrl_ready(in_be32(uhc_clkctrl))) {
79 udelay(10);
80 if (i++ > UHC_RESET_WAIT_MAX) {
81 printk(KERN_ERR "Failed to disable UHC reset %x\n",
82 in_be32(uhc_clkctrl));
83 break;
84 }
85 }
86
87 /* Endian Conversion Mode for Master ALL area */
88 out_be32(uhc_ecmode, SCC_UHC_ECMODE_BY_BYTE);
89
90 iounmap(uhc_base);
91}
92
93DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2,
94 PCI_DEVICE_ID_TOSHIBA_SCC_USB, enable_scc_uhc);
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
new file mode 100644
index 000000000000..5f4d0d933238
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -0,0 +1,193 @@
1/*
2 * Celleb setup code
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/cell/setup.c:
7 * Copyright (C) 1995 Linus Torvalds
8 * Adapted from 'alpha' version by Gary Thomas
9 * Modified by Cort Dougan (cort@cs.nmt.edu)
10 * Modified by PPC64 Team, IBM Corp
11 * Modified by Cell Team, IBM Deutschland Entwicklung GmbH
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 as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 */
27
28#undef DEBUG
29
30#include <linux/cpu.h>
31#include <linux/sched.h>
32#include <linux/kernel.h>
33#include <linux/mm.h>
34#include <linux/stddef.h>
35#include <linux/unistd.h>
36#include <linux/reboot.h>
37#include <linux/init.h>
38#include <linux/delay.h>
39#include <linux/irq.h>
40#include <linux/seq_file.h>
41#include <linux/root_dev.h>
42#include <linux/console.h>
43
44#include <asm/mmu.h>
45#include <asm/processor.h>
46#include <asm/io.h>
47#include <asm/kexec.h>
48#include <asm/prom.h>
49#include <asm/machdep.h>
50#include <asm/cputable.h>
51#include <asm/irq.h>
52#include <asm/spu_priv1.h>
53#include <asm/firmware.h>
54#include <asm/of_platform.h>
55
56#include "interrupt.h"
57#include "beat_wrapper.h"
58#include "beat.h"
59#include "pci.h"
60
61static char celleb_machine_type[128] = "Celleb";
62
63static void celleb_show_cpuinfo(struct seq_file *m)
64{
65 struct device_node *root;
66 const char *model = "";
67
68 root = of_find_node_by_path("/");
69 if (root)
70 model = get_property(root, "model", NULL);
71 /* using "CHRP" is to trick anaconda into installing FCx into Celleb */
72 seq_printf(m, "machine\t\t: %s %s\n", celleb_machine_type, model);
73 of_node_put(root);
74}
75
76static int celleb_machine_type_hack(char *ptr)
77{
78 strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type));
79 celleb_machine_type[sizeof(celleb_machine_type)-1] = 0;
80 return 0;
81}
82
83__setup("celleb_machine_type_hack", celleb_machine_type_hack);
84
85static void celleb_progress(char *s, unsigned short hex)
86{
87 printk("*** %04x : %s\n", hex, s ? s : "");
88}
89
90static void __init celleb_setup_arch(void)
91{
92#ifdef CONFIG_SPU_BASE
93 spu_priv1_ops = &spu_priv1_beat_ops;
94 spu_management_ops = &spu_management_of_ops;
95#endif
96
97#ifdef CONFIG_SMP
98 smp_init_celleb();
99#endif
100
101 /* init to some ~sane value until calibrate_delay() runs */
102 loops_per_jiffy = 50000000;
103
104 if (ROOT_DEV == 0) {
105 printk("No ramdisk, default root is /dev/hda2\n");
106 ROOT_DEV = Root_HDA2;
107 }
108
109#ifdef CONFIG_DUMMY_CONSOLE
110 conswitchp = &dummy_con;
111#endif
112}
113
114static void beat_power_save(void)
115{
116 beat_pause(0);
117}
118
119static int __init celleb_probe(void)
120{
121 unsigned long root = of_get_flat_dt_root();
122
123 if (!of_flat_dt_is_compatible(root, "Beat"))
124 return 0;
125
126 powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE;
127 hpte_init_beat();
128 return 1;
129}
130
131/*
132 * Cell has no legacy IO; anything calling this function has to
133 * fail or bad things will happen
134 */
135static int celleb_check_legacy_ioport(unsigned int baseport)
136{
137 return -ENODEV;
138}
139
140#ifdef CONFIG_KEXEC
141static void celleb_kexec_cpu_down(int crash, int secondary)
142{
143 beatic_deinit_IRQ();
144}
145#endif
146
147static struct of_device_id celleb_bus_ids[] = {
148 { .type = "scc", },
149 { .type = "ioif", }, /* old style */
150 {},
151};
152
153static int __init celleb_publish_devices(void)
154{
155 if (!machine_is(celleb))
156 return 0;
157
158 /* Publish OF platform devices for southbridge IOs */
159 of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
160
161 return 0;
162}
163device_initcall(celleb_publish_devices);
164
165define_machine(celleb) {
166 .name = "Cell Reference Set",
167 .probe = celleb_probe,
168 .setup_arch = celleb_setup_arch,
169 .show_cpuinfo = celleb_show_cpuinfo,
170 .restart = beat_restart,
171 .power_off = beat_power_off,
172 .halt = beat_halt,
173 .get_rtc_time = beat_get_rtc_time,
174 .set_rtc_time = beat_set_rtc_time,
175 .calibrate_decr = generic_calibrate_decr,
176 .check_legacy_ioport = celleb_check_legacy_ioport,
177 .progress = celleb_progress,
178 .power_save = beat_power_save,
179 .nvram_size = beat_nvram_get_size,
180 .nvram_read = beat_nvram_read,
181 .nvram_write = beat_nvram_write,
182 .set_dabr = beat_set_xdabr,
183 .init_IRQ = beatic_init_IRQ,
184 .get_irq = beatic_get_irq,
185 .pci_probe_mode = celleb_pci_probe_mode,
186 .pci_setup_phb = celleb_setup_phb,
187#ifdef CONFIG_KEXEC
188 .kexec_cpu_down = celleb_kexec_cpu_down,
189 .machine_kexec = default_machine_kexec,
190 .machine_kexec_prepare = default_machine_kexec_prepare,
191 .machine_crash_shutdown = default_machine_crash_shutdown,
192#endif
193};
diff --git a/arch/powerpc/platforms/celleb/smp.c b/arch/powerpc/platforms/celleb/smp.c
new file mode 100644
index 000000000000..a7631250aeb4
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/smp.c
@@ -0,0 +1,124 @@
1/*
2 * SMP support for Celleb platform. (Incomplete)
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/cell/smp.c:
7 * Dave Engebretsen, Peter Bergner, and
8 * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
9 * Plus various changes from other IBM teams...
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 */
25
26#undef DEBUG
27
28#include <linux/kernel.h>
29#include <linux/smp.h>
30#include <linux/interrupt.h>
31#include <linux/init.h>
32#include <linux/threads.h>
33#include <linux/cpu.h>
34
35#include <asm/irq.h>
36#include <asm/smp.h>
37#include <asm/machdep.h>
38#include <asm/udbg.h>
39
40#include "interrupt.h"
41
42#ifdef DEBUG
43#define DBG(fmt...) udbg_printf(fmt)
44#else
45#define DBG(fmt...)
46#endif
47
48/*
49 * The primary thread of each non-boot processor is recorded here before
50 * smp init.
51 */
52/* static cpumask_t of_spin_map; */
53
54/**
55 * smp_startup_cpu() - start the given cpu
56 *
57 * At boot time, there is nothing to do for primary threads which were
58 * started from Open Firmware. For anything else, call RTAS with the
59 * appropriate start location.
60 *
61 * Returns:
62 * 0 - failure
63 * 1 - success
64 */
65static inline int __devinit smp_startup_cpu(unsigned int lcpu)
66{
67 return 0;
68}
69
70static void smp_beatic_message_pass(int target, int msg)
71{
72 unsigned int i;
73
74 if (target < NR_CPUS) {
75 beatic_cause_IPI(target, msg);
76 } else {
77 for_each_online_cpu(i) {
78 if (target == MSG_ALL_BUT_SELF
79 && i == smp_processor_id())
80 continue;
81 beatic_cause_IPI(i, msg);
82 }
83 }
84}
85
86static int __init smp_beatic_probe(void)
87{
88 return cpus_weight(cpu_possible_map);
89}
90
91static void __devinit smp_beatic_setup_cpu(int cpu)
92{
93 beatic_setup_cpu(cpu);
94}
95
96static void __devinit smp_celleb_kick_cpu(int nr)
97{
98 BUG_ON(nr < 0 || nr >= NR_CPUS);
99
100 if (!smp_startup_cpu(nr))
101 return;
102}
103
104static int smp_celleb_cpu_bootable(unsigned int nr)
105{
106 return 1;
107}
108static struct smp_ops_t bpa_beatic_smp_ops = {
109 .message_pass = smp_beatic_message_pass,
110 .probe = smp_beatic_probe,
111 .kick_cpu = smp_celleb_kick_cpu,
112 .setup_cpu = smp_beatic_setup_cpu,
113 .cpu_bootable = smp_celleb_cpu_bootable,
114};
115
116/* This is called very early */
117void __init smp_init_celleb(void)
118{
119 DBG(" -> smp_init_celleb()\n");
120
121 smp_ops = &bpa_beatic_smp_ops;
122
123 DBG(" <- smp_init_celleb()\n");
124}
diff --git a/arch/powerpc/platforms/celleb/spu_priv1.c b/arch/powerpc/platforms/celleb/spu_priv1.c
new file mode 100644
index 000000000000..2bf6700f747a
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/spu_priv1.c
@@ -0,0 +1,208 @@
1/*
2 * spu hypervisor abstraction for Beat
3 *
4 * (C) Copyright 2006-2007 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/module.h>
22
23#include <asm/types.h>
24#include <asm/spu.h>
25#include <asm/spu_priv1.h>
26
27#include "beat_wrapper.h"
28
29static inline void _int_mask_set(struct spu *spu, int class, u64 mask)
30{
31 spu->shadow_int_mask_RW[class] = mask;
32 beat_set_irq_mask_for_spe(spu->spe_id, class, mask);
33}
34
35static inline u64 _int_mask_get(struct spu *spu, int class)
36{
37 return spu->shadow_int_mask_RW[class];
38}
39
40static void int_mask_set(struct spu *spu, int class, u64 mask)
41{
42 _int_mask_set(spu, class, mask);
43}
44
45static u64 int_mask_get(struct spu *spu, int class)
46{
47 return _int_mask_get(spu, class);
48}
49
50static void int_mask_and(struct spu *spu, int class, u64 mask)
51{
52 u64 old_mask;
53 old_mask = _int_mask_get(spu, class);
54 _int_mask_set(spu, class, old_mask & mask);
55}
56
57static void int_mask_or(struct spu *spu, int class, u64 mask)
58{
59 u64 old_mask;
60 old_mask = _int_mask_get(spu, class);
61 _int_mask_set(spu, class, old_mask | mask);
62}
63
64static void int_stat_clear(struct spu *spu, int class, u64 stat)
65{
66 beat_clear_interrupt_status_of_spe(spu->spe_id, class, stat);
67}
68
69static u64 int_stat_get(struct spu *spu, int class)
70{
71 u64 int_stat;
72 beat_get_interrupt_status_of_spe(spu->spe_id, class, &int_stat);
73 return int_stat;
74}
75
76static void cpu_affinity_set(struct spu *spu, int cpu)
77{
78 return;
79}
80
81static u64 mfc_dar_get(struct spu *spu)
82{
83 u64 dar;
84 beat_get_spe_privileged_state_1_registers(
85 spu->spe_id,
86 offsetof(struct spu_priv1, mfc_dar_RW), &dar);
87 return dar;
88}
89
90static u64 mfc_dsisr_get(struct spu *spu)
91{
92 u64 dsisr;
93 beat_get_spe_privileged_state_1_registers(
94 spu->spe_id,
95 offsetof(struct spu_priv1, mfc_dsisr_RW), &dsisr);
96 return dsisr;
97}
98
99static void mfc_dsisr_set(struct spu *spu, u64 dsisr)
100{
101 beat_set_spe_privileged_state_1_registers(
102 spu->spe_id,
103 offsetof(struct spu_priv1, mfc_dsisr_RW), dsisr);
104}
105
106static void mfc_sdr_setup(struct spu *spu)
107{
108 return;
109}
110
111static void mfc_sr1_set(struct spu *spu, u64 sr1)
112{
113 beat_set_spe_privileged_state_1_registers(
114 spu->spe_id,
115 offsetof(struct spu_priv1, mfc_sr1_RW), sr1);
116}
117
118static u64 mfc_sr1_get(struct spu *spu)
119{
120 u64 sr1;
121 beat_get_spe_privileged_state_1_registers(
122 spu->spe_id,
123 offsetof(struct spu_priv1, mfc_sr1_RW), &sr1);
124 return sr1;
125}
126
127static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id)
128{
129 beat_set_spe_privileged_state_1_registers(
130 spu->spe_id,
131 offsetof(struct spu_priv1, mfc_tclass_id_RW), tclass_id);
132}
133
134static u64 mfc_tclass_id_get(struct spu *spu)
135{
136 u64 tclass_id;
137 beat_get_spe_privileged_state_1_registers(
138 spu->spe_id,
139 offsetof(struct spu_priv1, mfc_tclass_id_RW), &tclass_id);
140 return tclass_id;
141}
142
143static void tlb_invalidate(struct spu *spu)
144{
145 beat_set_spe_privileged_state_1_registers(
146 spu->spe_id,
147 offsetof(struct spu_priv1, tlb_invalidate_entry_W), 0ul);
148}
149
150static void resource_allocation_groupID_set(struct spu *spu, u64 id)
151{
152 beat_set_spe_privileged_state_1_registers(
153 spu->spe_id,
154 offsetof(struct spu_priv1, resource_allocation_groupID_RW),
155 id);
156}
157
158static u64 resource_allocation_groupID_get(struct spu *spu)
159{
160 u64 id;
161 beat_get_spe_privileged_state_1_registers(
162 spu->spe_id,
163 offsetof(struct spu_priv1, resource_allocation_groupID_RW),
164 &id);
165 return id;
166}
167
168static void resource_allocation_enable_set(struct spu *spu, u64 enable)
169{
170 beat_set_spe_privileged_state_1_registers(
171 spu->spe_id,
172 offsetof(struct spu_priv1, resource_allocation_enable_RW),
173 enable);
174}
175
176static u64 resource_allocation_enable_get(struct spu *spu)
177{
178 u64 enable;
179 beat_get_spe_privileged_state_1_registers(
180 spu->spe_id,
181 offsetof(struct spu_priv1, resource_allocation_enable_RW),
182 &enable);
183 return enable;
184}
185
186const struct spu_priv1_ops spu_priv1_beat_ops =
187{
188 .int_mask_and = int_mask_and,
189 .int_mask_or = int_mask_or,
190 .int_mask_set = int_mask_set,
191 .int_mask_get = int_mask_get,
192 .int_stat_clear = int_stat_clear,
193 .int_stat_get = int_stat_get,
194 .cpu_affinity_set = cpu_affinity_set,
195 .mfc_dar_get = mfc_dar_get,
196 .mfc_dsisr_get = mfc_dsisr_get,
197 .mfc_dsisr_set = mfc_dsisr_set,
198 .mfc_sdr_setup = mfc_sdr_setup,
199 .mfc_sr1_set = mfc_sr1_set,
200 .mfc_sr1_get = mfc_sr1_get,
201 .mfc_tclass_id_set = mfc_tclass_id_set,
202 .mfc_tclass_id_get = mfc_tclass_id_get,
203 .tlb_invalidate = tlb_invalidate,
204 .resource_allocation_groupID_set = resource_allocation_groupID_set,
205 .resource_allocation_groupID_get = resource_allocation_groupID_get,
206 .resource_allocation_enable_set = resource_allocation_enable_set,
207 .resource_allocation_enable_get = resource_allocation_enable_get,
208};
diff --git a/arch/powerpc/platforms/celleb/udbg_beat.c b/arch/powerpc/platforms/celleb/udbg_beat.c
new file mode 100644
index 000000000000..d888c4674c62
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/udbg_beat.c
@@ -0,0 +1,97 @@
1/*
2 * udbg function for Beat
3 *
4 * (C) Copyright 2006 TOSHIBA 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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/console.h>
23
24#include <asm/machdep.h>
25#include <asm/prom.h>
26#include <asm/udbg.h>
27
28#include "beat.h"
29
30#define celleb_vtermno 0
31
32static void udbg_putc_beat(char c)
33{
34 unsigned long rc;
35
36 if (c == '\n')
37 udbg_putc_beat('\r');
38
39 rc = beat_put_term_char(celleb_vtermno, 1, (uint64_t)c << 56, 0);
40}
41
42/* Buffered chars getc */
43static long inbuflen;
44static long inbuf[2]; /* must be 2 longs */
45
46static int udbg_getc_poll_beat(void)
47{
48 /* The interface is tricky because it may return up to 16 chars.
49 * We save them statically for future calls to udbg_getc().
50 */
51 char ch, *buf = (char *)inbuf;
52 int i;
53 long rc;
54 if (inbuflen == 0) {
55 /* get some more chars. */
56 inbuflen = 0;
57 rc = beat_get_term_char(celleb_vtermno, &inbuflen, inbuf+0, inbuf+1);
58 if (rc != 0)
59 inbuflen = 0; /* otherwise inbuflen is garbage */
60 }
61 if (inbuflen <= 0 || inbuflen > 16) {
62 /* Catch error case as well as other oddities (corruption) */
63 inbuflen = 0;
64 return -1;
65 }
66 ch = buf[0];
67 for (i = 1; i < inbuflen; i++) /* shuffle them down. */
68 buf[i-1] = buf[i];
69 inbuflen--;
70 return ch;
71}
72
73static int udbg_getc_beat(void)
74{
75 int ch;
76 for (;;) {
77 ch = udbg_getc_poll_beat();
78 if (ch == -1) {
79 /* This shouldn't be needed...but... */
80 volatile unsigned long delay;
81 for (delay=0; delay < 2000000; delay++)
82 ;
83 } else {
84 return ch;
85 }
86 }
87}
88
89/* call this from early_init() for a working debug console on
90 * vterm capable LPAR machines
91 */
92void __init udbg_init_debug_beat(void)
93{
94 udbg_putc = udbg_putc_beat;
95 udbg_getc = udbg_getc_beat;
96 udbg_getc_poll = udbg_getc_poll_beat;
97}
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index e1f51d455984..117c9a0055bd 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -75,7 +75,7 @@ extern irqreturn_t xmon_irq(int, void *);
75extern unsigned long loops_per_jiffy; 75extern unsigned long loops_per_jiffy;
76 76
77/* To be replaced by RTAS when available */ 77/* To be replaced by RTAS when available */
78static unsigned int *briq_SPOR; 78static unsigned int __iomem *briq_SPOR;
79 79
80#ifdef CONFIG_SMP 80#ifdef CONFIG_SMP
81extern struct smp_ops_t chrp_smp_ops; 81extern struct smp_ops_t chrp_smp_ops;
@@ -267,7 +267,7 @@ void __init chrp_setup_arch(void)
267 } else if (machine && strncmp(machine, "TotalImpact,BRIQ-1", 18) == 0) { 267 } else if (machine && strncmp(machine, "TotalImpact,BRIQ-1", 18) == 0) {
268 _chrp_type = _CHRP_briq; 268 _chrp_type = _CHRP_briq;
269 /* Map the SPOR register on briq and change the restart hook */ 269 /* Map the SPOR register on briq and change the restart hook */
270 briq_SPOR = (unsigned int *)ioremap(0xff0000e8, 4); 270 briq_SPOR = ioremap(0xff0000e8, 4);
271 ppc_md.restart = briq_restart; 271 ppc_md.restart = briq_restart;
272 } else { 272 } else {
273 /* Let's assume it is an IBM chrp if all else fails */ 273 /* Let's assume it is an IBM chrp if all else fails */
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index b3c2ce4cb7a8..886c522d78e9 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -104,15 +104,6 @@ config RADSTONE_PPC7D
104config PAL4 104config PAL4
105 bool "SBS-Palomar4" 105 bool "SBS-Palomar4"
106 106
107config GEMINI
108 bool "Synergy-Gemini"
109 select PPC_INDIRECT_PCI
110 depends on BROKEN
111 help
112 Select Gemini if configuring for a Synergy Microsystems' Gemini
113 series Single Board Computer. More information is available at:
114 <http://www.synergymicro.com/PressRel/97_10_15.html>.
115
116config EST8260 107config EST8260
117 bool "EST8260" 108 bool "EST8260"
118 ---help--- 109 ---help---
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 61599d919ea8..3f6c4114f908 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -13,7 +13,6 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/initrd.h> 15#include <linux/initrd.h>
16#include <linux/root_dev.h>
17#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
18 17
19#include <asm/time.h> 18#include <asm/time.h>
@@ -91,17 +90,6 @@ static void __init linkstation_setup_arch(void)
91 ARRAY_SIZE(linkstation_physmap_partitions)); 90 ARRAY_SIZE(linkstation_physmap_partitions));
92#endif 91#endif
93 92
94#ifdef CONFIG_BLK_DEV_INITRD
95 if (initrd_start)
96 ROOT_DEV = Root_RAM0;
97 else
98#endif
99#ifdef CONFIG_ROOT_NFS
100 ROOT_DEV = Root_NFS;
101#else
102 ROOT_DEV = Root_HDA1;
103#endif
104
105 /* Lookup PCI host bridges */ 93 /* Lookup PCI host bridges */
106 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 94 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
107 add_bridge(np); 95 add_bridge(np);
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index c1f4502a3c6a..91df52a1899a 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -308,7 +308,7 @@ static int proc_lpevents_open(struct inode *inode, struct file *file)
308 return single_open(file, proc_lpevents_show, NULL); 308 return single_open(file, proc_lpevents_show, NULL);
309} 309}
310 310
311static struct file_operations proc_lpevents_operations = { 311static const struct file_operations proc_lpevents_operations = {
312 .open = proc_lpevents_open, 312 .open = proc_lpevents_open,
313 .read = seq_read, 313 .read = seq_read,
314 .llseek = seq_lseek, 314 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 1ad0e4aaad1a..b1187d95e3b2 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1224,7 +1224,7 @@ out:
1224 return rc; 1224 return rc;
1225} 1225}
1226 1226
1227static struct file_operations proc_vmlinux_operations = { 1227static const struct file_operations proc_vmlinux_operations = {
1228 .write = proc_mf_change_vmlinux, 1228 .write = proc_mf_change_vmlinux,
1229}; 1229};
1230 1230
@@ -1253,7 +1253,6 @@ static int __init mf_proc_init(void)
1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); 1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
1254 if (!ent) 1254 if (!ent)
1255 return 1; 1255 return 1;
1256 ent->nlink = 1;
1257 ent->data = (void *)(long)i; 1256 ent->data = (void *)(long)i;
1258 ent->read_proc = proc_mf_dump_cmdline; 1257 ent->read_proc = proc_mf_dump_cmdline;
1259 ent->write_proc = proc_mf_change_cmdline; 1258 ent->write_proc = proc_mf_change_cmdline;
@@ -1264,7 +1263,6 @@ static int __init mf_proc_init(void)
1264 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); 1263 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
1265 if (!ent) 1264 if (!ent)
1266 return 1; 1265 return 1;
1267 ent->nlink = 1;
1268 ent->data = (void *)(long)i; 1266 ent->data = (void *)(long)i;
1269 ent->proc_fops = &proc_vmlinux_operations; 1267 ent->proc_fops = &proc_vmlinux_operations;
1270 } 1268 }
@@ -1272,7 +1270,6 @@ static int __init mf_proc_init(void)
1272 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1270 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1273 if (!ent) 1271 if (!ent)
1274 return 1; 1272 return 1;
1275 ent->nlink = 1;
1276 ent->data = (void *)0; 1273 ent->data = (void *)0;
1277 ent->read_proc = proc_mf_dump_side; 1274 ent->read_proc = proc_mf_dump_side;
1278 ent->write_proc = proc_mf_change_side; 1275 ent->write_proc = proc_mf_change_side;
@@ -1280,7 +1277,6 @@ static int __init mf_proc_init(void)
1280 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1277 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1281 if (!ent) 1278 if (!ent)
1282 return 1; 1279 return 1;
1283 ent->nlink = 1;
1284 ent->data = (void *)0; 1280 ent->data = (void *)0;
1285 ent->read_proc = proc_mf_dump_src; 1281 ent->read_proc = proc_mf_dump_src;
1286 ent->write_proc = proc_mf_change_src; 1282 ent->write_proc = proc_mf_change_src;
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index b54e37101e69..f2cde4180204 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -101,7 +101,7 @@ static int proc_titantod_open(struct inode *inode, struct file *file)
101 return single_open(file, proc_titantod_show, NULL); 101 return single_open(file, proc_titantod_show, NULL);
102} 102}
103 103
104static struct file_operations proc_titantod_operations = { 104static const struct file_operations proc_titantod_operations = {
105 .open = proc_titantod_open, 105 .open = proc_titantod_open,
106 .read = seq_read, 106 .read = seq_read,
107 .llseek = seq_lseek, 107 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index a6799ed34a66..e2100ece9c65 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -173,7 +173,7 @@ static int proc_viopath_open(struct inode *inode, struct file *file)
173 return single_open(file, proc_viopath_show, NULL); 173 return single_open(file, proc_viopath_show, NULL);
174} 174}
175 175
176static struct file_operations proc_viopath_operations = { 176static const struct file_operations proc_viopath_operations = {
177 .open = proc_viopath_open, 177 .open = proc_viopath_open,
178 .read = seq_read, 178 .read = seq_read,
179 .llseek = seq_lseek, 179 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 3f6a69f67195..73c59904697f 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -425,14 +425,6 @@ static void __init setup_u4_pcie(struct pci_controller* hose)
425 hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); 425 hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
426 hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000); 426 hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000);
427 427
428 /* The bus contains a bridge from root -> device, we need to
429 * make it visible on bus 0 so that we pick the right type
430 * of config cycles. If we didn't, we would have to force all
431 * config cycles to be type 1. So we override the "bus-range"
432 * property here
433 */
434 hose->first_busno = 0x00;
435 hose->last_busno = 0xff;
436 u4_pcie = hose; 428 u4_pcie = hose;
437} 429}
438 430
@@ -560,13 +552,16 @@ void __init maple_pci_init(void)
560 return; 552 return;
561 } 553 }
562 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { 554 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
563 if (np->name == NULL) 555 if (!np->type)
564 continue; 556 continue;
565 if (!strcmp(np->name, "pci") || !strcmp(np->name, "pcie")) { 557 if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
566 if (add_bridge(np) == 0) 558 continue;
567 of_node_get(np); 559 if ((device_is_compatible(np, "u4-pcie") ||
568 } 560 device_is_compatible(np, "u3-agp")) &&
569 if (strcmp(np->name, "ht") == 0) { 561 add_bridge(np) == 0)
562 of_node_get(np);
563
564 if (device_is_compatible(np, "u3-ht")) {
570 of_node_get(np); 565 of_node_get(np);
571 ht = np; 566 ht = np;
572 } 567 }
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 50855d4fd5a0..82d3f9e28d7c 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -62,6 +62,7 @@
62#include <asm/mpic.h> 62#include <asm/mpic.h>
63#include <asm/rtas.h> 63#include <asm/rtas.h>
64#include <asm/udbg.h> 64#include <asm/udbg.h>
65#include <asm/nvram.h>
65 66
66#include "maple.h" 67#include "maple.h"
67 68
@@ -195,6 +196,8 @@ void __init maple_setup_arch(void)
195 maple_use_rtas_reboot_and_halt_if_present(); 196 maple_use_rtas_reboot_and_halt_if_present();
196 197
197 printk(KERN_DEBUG "Using native/NAP idle loop\n"); 198 printk(KERN_DEBUG "Using native/NAP idle loop\n");
199
200 mmio_nvram_init();
198} 201}
199 202
200/* 203/*
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
new file mode 100644
index 000000000000..68dc529dfd2f
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -0,0 +1,10 @@
1menu "PA Semi PWRficient options"
2 depends on PPC_PASEMI
3
4config PPC_PASEMI_IOMMU
5 bool "PA Semi IOMMU support"
6 depends on PPC_PASEMI
7 help
8 IOMMU support for PA6T-1682M
9
10endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index 1be1a993c5f5..e657ccae90a9 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1 +1,2 @@
1obj-y += setup.o pci.o time.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
2
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
new file mode 100644
index 000000000000..1ca3ff381591
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -0,0 +1,88 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
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
21#undef DEBUG
22
23#include <linux/kernel.h>
24#include <linux/string.h>
25
26#include <asm/machdep.h>
27#include <asm/reg.h>
28
29#include "pasemi.h"
30
31struct sleep_mode {
32 char *name;
33 void (*entry)(void);
34};
35
36static struct sleep_mode modes[] = {
37 { .name = "spin", .entry = &idle_spin },
38 { .name = "doze", .entry = &idle_doze },
39};
40
41static int current_mode = 0;
42
43static int pasemi_system_reset_exception(struct pt_regs *regs)
44{
45 /* If we were woken up from power savings, we need to return
46 * to the calling function, since nip is not saved across
47 * all modes.
48 */
49
50 if (regs->msr & SRR1_WAKEMASK)
51 regs->nip = regs->link;
52
53 switch (regs->msr & SRR1_WAKEMASK) {
54 case SRR1_WAKEEE:
55 do_IRQ(regs);
56 break;
57 case SRR1_WAKEDEC:
58 timer_interrupt(regs);
59 break;
60 default:
61 /* do system reset */
62 return 0;
63 }
64 /* everything handled */
65 regs->msr |= MSR_RI;
66 return 1;
67}
68
69void __init pasemi_idle_init(void)
70{
71 ppc_md.system_reset_exception = pasemi_system_reset_exception;
72 ppc_md.power_save = modes[current_mode].entry;
73 printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name);
74}
75
76static int __init idle_param(char *p)
77{
78 int i;
79 for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) {
80 if (!strcmp(modes[i].name, p)) {
81 current_mode = i;
82 break;
83 }
84 }
85 return 0;
86}
87
88early_param("idle", idle_param);
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
new file mode 100644
index 000000000000..459a53b7d24d
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -0,0 +1,281 @@
1/*
2 * Copyright (C) 2005-2007, PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
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#undef DEBUG
21
22#include <linux/types.h>
23#include <linux/spinlock.h>
24#include <linux/pci.h>
25#include <asm/iommu.h>
26#include <asm/machdep.h>
27#include <asm/abs_addr.h>
28
29
30#define IOBMAP_PAGE_SHIFT 12
31#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
32#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
33
34#define IOBMAP_PAGE_FACTOR (PAGE_SHIFT - IOBMAP_PAGE_SHIFT)
35
36#define IOB_BASE 0xe0000000
37#define IOB_SIZE 0x3000
38/* Configuration registers */
39#define IOBCAP_REG 0x10
40#define IOBCOM_REG 0x40
41/* Enable IOB address translation */
42#define IOBCOM_ATEN 0x00000100
43
44/* Address decode configuration register */
45#define IOB_AD_REG 0x53
46/* IOBCOM_AD_REG fields */
47#define IOB_AD_VGPRT 0x00000e00
48#define IOB_AD_VGAEN 0x00000100
49/* Direct mapping settings */
50#define IOB_AD_MPSEL_MASK 0x00000030
51#define IOB_AD_MPSEL_B38 0x00000000
52#define IOB_AD_MPSEL_B40 0x00000010
53#define IOB_AD_MPSEL_B42 0x00000020
54/* Translation window size / enable */
55#define IOB_AD_TRNG_MASK 0x00000003
56#define IOB_AD_TRNG_256M 0x00000000
57#define IOB_AD_TRNG_2G 0x00000001
58#define IOB_AD_TRNG_128G 0x00000003
59
60#define IOB_TABLEBASE_REG 0x55
61
62/* Base of the 64 4-byte L1 registers */
63#define IOB_XLT_L1_REGBASE 0xac0
64
65/* Register to invalidate TLB entries */
66#define IOB_AT_INVAL_TLB_REG 0xb40
67
68/* The top two bits of the level 1 entry contains valid and type flags */
69#define IOBMAP_L1E_V 0x40000000
70#define IOBMAP_L1E_V_B 0x80000000
71
72/* For big page entries, the bottom two bits contains flags */
73#define IOBMAP_L1E_BIG_CACHED 0x00000002
74#define IOBMAP_L1E_BIG_PRIORITY 0x00000001
75
76/* For regular level 2 entries, top 2 bits contain valid and cache flags */
77#define IOBMAP_L2E_V 0x80000000
78#define IOBMAP_L2E_V_CACHED 0xc0000000
79
80static u32 *iob;
81static u32 iob_l1_emptyval;
82static u32 iob_l2_emptyval;
83static u32 *iob_l2_base;
84
85static struct iommu_table iommu_table_iobmap;
86static int iommu_table_iobmap_inited;
87
88static void iobmap_build(struct iommu_table *tbl, long index,
89 long npages, unsigned long uaddr,
90 enum dma_data_direction direction)
91{
92 u32 *ip;
93 u32 rpn;
94 unsigned long bus_addr;
95
96 pr_debug("iobmap: build at: %lx, %lx, addr: %lx\n", index, npages, uaddr);
97
98 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
99
100 npages <<= IOBMAP_PAGE_FACTOR;
101 index <<= IOBMAP_PAGE_FACTOR;
102
103 ip = ((u32 *)tbl->it_base) + index;
104
105 while (npages--) {
106 rpn = virt_to_abs(uaddr) >> IOBMAP_PAGE_SHIFT;
107
108 *(ip++) = IOBMAP_L2E_V | rpn;
109 /* invalidate tlb, can be optimized more */
110 out_le32(iob+IOB_AT_INVAL_TLB_REG, bus_addr >> 14);
111
112 uaddr += IOBMAP_PAGE_SIZE;
113 bus_addr += IOBMAP_PAGE_SIZE;
114 }
115}
116
117
118static void iobmap_free(struct iommu_table *tbl, long index,
119 long npages)
120{
121 u32 *ip;
122 unsigned long bus_addr;
123
124 pr_debug("iobmap: free at: %lx, %lx\n", index, npages);
125
126 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
127
128 npages <<= IOBMAP_PAGE_FACTOR;
129 index <<= IOBMAP_PAGE_FACTOR;
130
131 ip = ((u32 *)tbl->it_base) + index;
132
133 while (npages--) {
134 *(ip++) = iob_l2_emptyval;
135 /* invalidate tlb, can be optimized more */
136 out_le32(iob+IOB_AT_INVAL_TLB_REG, bus_addr >> 14);
137 bus_addr += IOBMAP_PAGE_SIZE;
138 }
139}
140
141
142static void iommu_table_iobmap_setup(void)
143{
144 pr_debug(" -> %s\n", __func__);
145 iommu_table_iobmap.it_busno = 0;
146 iommu_table_iobmap.it_offset = 0;
147 /* it_size is in number of entries */
148 iommu_table_iobmap.it_size = 0x80000000 >> PAGE_SHIFT;
149
150 /* Initialize the common IOMMU code */
151 iommu_table_iobmap.it_base = (unsigned long)iob_l2_base;
152 iommu_table_iobmap.it_index = 0;
153 /* XXXOJN tune this to avoid IOB cache invals.
154 * Should probably be 8 (64 bytes)
155 */
156 iommu_table_iobmap.it_blocksize = 4;
157 iommu_init_table(&iommu_table_iobmap, 0);
158 pr_debug(" <- %s\n", __func__);
159}
160
161
162
163static void pci_dma_bus_setup_pasemi(struct pci_bus *bus)
164{
165 struct device_node *dn;
166
167 pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self);
168
169 if (!iommu_table_iobmap_inited) {
170 iommu_table_iobmap_inited = 1;
171 iommu_table_iobmap_setup();
172 }
173
174 dn = pci_bus_to_OF_node(bus);
175
176 if (dn)
177 PCI_DN(dn)->iommu_table = &iommu_table_iobmap;
178
179}
180
181
182static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
183{
184 pr_debug("pci_dma_dev_setup, dev %p (%s)\n", dev, pci_name(dev));
185
186 /* DMA device is untranslated, but all other PCI-e goes through
187 * the IOMMU
188 */
189 if (dev->vendor == 0x1959 && dev->device == 0xa007)
190 dev->dev.archdata.dma_ops = &dma_direct_ops;
191 else
192 dev->dev.archdata.dma_data = &iommu_table_iobmap;
193}
194
195static void pci_dma_bus_setup_null(struct pci_bus *b) { }
196static void pci_dma_dev_setup_null(struct pci_dev *d) { }
197
198int iob_init(struct device_node *dn)
199{
200 unsigned long tmp;
201 u32 regword;
202 int i;
203
204 pr_debug(" -> %s\n", __func__);
205
206 /* Allocate a spare page to map all invalid IOTLB pages. */
207 tmp = lmb_alloc(IOBMAP_PAGE_SIZE, IOBMAP_PAGE_SIZE);
208 if (!tmp)
209 panic("IOBMAP: Cannot allocate spare page!");
210 /* Empty l1 is marked invalid */
211 iob_l1_emptyval = 0;
212 /* Empty l2 is mapped to dummy page */
213 iob_l2_emptyval = IOBMAP_L2E_V | (tmp >> IOBMAP_PAGE_SHIFT);
214
215 iob = ioremap(IOB_BASE, IOB_SIZE);
216 if (!iob)
217 panic("IOBMAP: Cannot map registers!");
218
219 /* setup direct mapping of the L1 entries */
220 for (i = 0; i < 64; i++) {
221 /* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */
222 regword = IOBMAP_L1E_V | (__pa(iob_l2_base + i*0x2000) >> 12);
223 out_le32(iob+IOB_XLT_L1_REGBASE+i, regword);
224 }
225
226 /* set 2GB translation window, based at 0 */
227 regword = in_le32(iob+IOB_AD_REG);
228 regword &= ~IOB_AD_TRNG_MASK;
229 regword |= IOB_AD_TRNG_2G;
230 out_le32(iob+IOB_AD_REG, regword);
231
232 /* Enable translation */
233 regword = in_le32(iob+IOBCOM_REG);
234 regword |= IOBCOM_ATEN;
235 out_le32(iob+IOBCOM_REG, regword);
236
237 pr_debug(" <- %s\n", __func__);
238
239 return 0;
240}
241
242
243/* These are called very early. */
244void iommu_init_early_pasemi(void)
245{
246 int iommu_off;
247
248#ifndef CONFIG_PPC_PASEMI_IOMMU
249 iommu_off = 1;
250#else
251 iommu_off = of_chosen &&
252 get_property(of_chosen, "linux,iommu-off", NULL);
253#endif
254 if (iommu_off) {
255 /* Direct I/O, IOMMU off */
256 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null;
257 ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null;
258 pci_dma_ops = &dma_direct_ops;
259
260 return;
261 }
262
263 iob_init(NULL);
264
265 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_pasemi;
266 ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi;
267 ppc_md.tce_build = iobmap_build;
268 ppc_md.tce_free = iobmap_free;
269 pci_dma_ops = &dma_iommu_ops;
270}
271
272void __init alloc_iobmap_l2(void)
273{
274#ifndef CONFIG_PPC_PASEMI_IOMMU
275 return;
276#endif
277 /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */
278 iob_l2_base = (u32 *)abs_to_virt(lmb_alloc_base(1UL<<21, 1UL<<21, 0x80000000));
279
280 printk(KERN_INFO "IOBMAP L2 allocated at: %p\n", iob_l2_base);
281}
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index 51c2a2397ecf..2d3927e6edb0 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -3,5 +3,17 @@
3 3
4extern unsigned long pas_get_boot_time(void); 4extern unsigned long pas_get_boot_time(void);
5extern void pas_pci_init(void); 5extern void pas_pci_init(void);
6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev);
7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev);
8
9extern void __init alloc_iobmap_l2(void);
10
11extern void __init pasemi_idle_init(void);
12
13/* Power savings modes, implemented in asm */
14extern void idle_spin(void);
15extern void idle_doze(void);
16
17
6 18
7#endif /* _PASEMI_PASEMI_H */ 19#endif /* _PASEMI_PASEMI_H */
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index faa618e04047..7ecb2ba24db9 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -163,6 +163,19 @@ static void __init pas_fixup_phb_resources(void)
163} 163}
164 164
165 165
166void __devinit pas_pci_irq_fixup(struct pci_dev *dev)
167{
168 /* DMA is special, 84 interrupts (128 -> 211), all but 128
169 * need to be mapped by hand here.
170 */
171 if (dev->vendor == 0x1959 && dev->device == 0xa007) {
172 int i;
173 for (i = 129; i < 212; i++)
174 irq_create_mapping(NULL, i);
175 }
176}
177
178
166void __init pas_pci_init(void) 179void __init pas_pci_init(void)
167{ 180{
168 struct device_node *np, *root; 181 struct device_node *np, *root;
diff --git a/arch/powerpc/platforms/pasemi/powersave.S b/arch/powerpc/platforms/pasemi/powersave.S
new file mode 100644
index 000000000000..6d0fba6aab17
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/powersave.S
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
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
21#include <asm/processor.h>
22#include <asm/page.h>
23#include <asm/ppc_asm.h>
24#include <asm/cputable.h>
25#include <asm/cache.h>
26#include <asm/thread_info.h>
27#include <asm/asm-offsets.h>
28
29/* Power savings opcodes since not all binutils have them at this time */
30#define DOZE .long 0x4c000324
31#define NAP .long 0x4c000364
32#define SLEEP .long 0x4c0003a4
33#define RVW .long 0x4c0003e4
34
35/* Common sequence to do before going to any of the
36 * powersavings modes.
37 */
38
39#define PRE_SLEEP_SEQUENCE \
40 std r3,8(r1); \
41 ptesync ; \
42 ld r3,8(r1); \
431: cmpd r3,r3; \
44 bne 1b
45
46_doze:
47 PRE_SLEEP_SEQUENCE
48 DOZE
49 b .
50
51
52_GLOBAL(idle_spin)
53 blr
54
55_GLOBAL(idle_doze)
56 LOAD_REG_ADDR(r3, _doze)
57 b sleep_common
58
59/* Add more modes here later */
60
61sleep_common:
62 mflr r0
63 std r0, 16(r1)
64 stdu r1,-64(r1)
65
66 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
67 mfmsr r4
68 andc r5,r4,r6
69 mtmsrd r5,0
70
71 mtctr r3
72 bctrl
73
74 mtmsrd r4,0
75
76 addi r1,r1,64
77 ld r0,16(r1)
78 mtlr r0
79 blr
80
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index bea7d1bb1a3b..449cf1a08291 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2006 PA Semi, Inc 2 * Copyright (C) 2006-2007 PA Semi, Inc
3 * 3 *
4 * Authors: Kip Walker, PA Semi 4 * Authors: Kip Walker, PA Semi
5 * Olof Johansson, PA Semi 5 * Olof Johansson, PA Semi
@@ -38,31 +38,46 @@
38 38
39#include "pasemi.h" 39#include "pasemi.h"
40 40
41static void __iomem *reset_reg;
42
41static void pas_restart(char *cmd) 43static void pas_restart(char *cmd)
42{ 44{
43 printk("restart unimplemented, looping...\n"); 45 printk("Restarting...\n");
44 for (;;) ; 46 while (1)
47 out_le32(reset_reg, 0x6000000);
45} 48}
46 49
47static void pas_power_off(void) 50#ifdef CONFIG_SMP
51static DEFINE_SPINLOCK(timebase_lock);
52
53static void __devinit pas_give_timebase(void)
48{ 54{
49 printk("power off unimplemented, looping...\n"); 55 unsigned long tb;
50 for (;;) ; 56
57 spin_lock(&timebase_lock);
58 mtspr(SPRN_TBCTL, TBCTL_FREEZE);
59 tb = mftb();
60 mtspr(SPRN_TBCTL, TBCTL_UPDATE_LOWER | (tb & 0xffffffff));
61 mtspr(SPRN_TBCTL, TBCTL_UPDATE_UPPER | (tb >> 32));
62 mtspr(SPRN_TBCTL, TBCTL_RESTART);
63 spin_unlock(&timebase_lock);
64 pr_debug("pas_give_timebase: cpu %d gave tb %lx\n",
65 smp_processor_id(), tb);
51} 66}
52 67
53static void pas_halt(void) 68static void __devinit pas_take_timebase(void)
54{ 69{
55 pas_power_off(); 70 pr_debug("pas_take_timebase: cpu %d has tb %lx\n",
71 smp_processor_id(), mftb());
56} 72}
57 73
58#ifdef CONFIG_SMP
59struct smp_ops_t pas_smp_ops = { 74struct smp_ops_t pas_smp_ops = {
60 .probe = smp_mpic_probe, 75 .probe = smp_mpic_probe,
61 .message_pass = smp_mpic_message_pass, 76 .message_pass = smp_mpic_message_pass,
62 .kick_cpu = smp_generic_kick_cpu, 77 .kick_cpu = smp_generic_kick_cpu,
63 .setup_cpu = smp_mpic_setup_cpu, 78 .setup_cpu = smp_mpic_setup_cpu,
64 .give_timebase = smp_generic_give_timebase, 79 .give_timebase = pas_give_timebase,
65 .take_timebase = smp_generic_take_timebase, 80 .take_timebase = pas_take_timebase,
66}; 81};
67#endif /* CONFIG_SMP */ 82#endif /* CONFIG_SMP */
68 83
@@ -72,9 +87,6 @@ void __init pas_setup_arch(void)
72 /* Setup SMP callback */ 87 /* Setup SMP callback */
73 smp_ops = &pas_smp_ops; 88 smp_ops = &pas_smp_ops;
74#endif 89#endif
75 /* no iommu yet */
76 pci_dma_ops = &dma_direct_ops;
77
78 /* Lookup PCI hosts */ 90 /* Lookup PCI hosts */
79 pas_pci_init(); 91 pas_pci_init();
80 92
@@ -82,7 +94,11 @@ void __init pas_setup_arch(void)
82 conswitchp = &dummy_con; 94 conswitchp = &dummy_con;
83#endif 95#endif
84 96
85 printk(KERN_DEBUG "Using default idle loop\n"); 97 /* Remap SDC register for doing reset */
98 /* XXXOJN This should maybe come out of the device tree */
99 reset_reg = ioremap(0xfc101100, 4);
100
101 pasemi_idle_init();
86} 102}
87 103
88/* No legacy IO on our parts */ 104/* No legacy IO on our parts */
@@ -130,8 +146,9 @@ static __init void pas_init_IRQ(void)
130 openpic_addr = of_read_number(opprop, naddr); 146 openpic_addr = of_read_number(opprop, naddr);
131 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 147 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
132 148
133 mpic = mpic_alloc(mpic_node, openpic_addr, MPIC_PRIMARY, 0, 0, 149 mpic = mpic_alloc(mpic_node, openpic_addr,
134 " PAS-OPIC "); 150 MPIC_PRIMARY|MPIC_LARGE_VECTORS,
151 0, 0, " PAS-OPIC ");
135 BUG_ON(!mpic); 152 BUG_ON(!mpic);
136 153
137 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000); 154 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
@@ -146,6 +163,53 @@ static void __init pas_progress(char *s, unsigned short hex)
146} 163}
147 164
148 165
166static int pas_machine_check_handler(struct pt_regs *regs)
167{
168 int cpu = smp_processor_id();
169 unsigned long srr0, srr1, dsisr;
170
171 srr0 = regs->nip;
172 srr1 = regs->msr;
173 dsisr = mfspr(SPRN_DSISR);
174 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
175 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
176 printk(KERN_ERR "DSISR 0x%016lx DAR 0x%016lx\n", dsisr, regs->dar);
177 printk(KERN_ERR "Cause:\n");
178
179 if (srr1 & 0x200000)
180 printk(KERN_ERR "Signalled by SDC\n");
181 if (srr1 & 0x100000) {
182 printk(KERN_ERR "Load/Store detected error:\n");
183 if (dsisr & 0x8000)
184 printk(KERN_ERR "D-cache ECC double-bit error or bus error\n");
185 if (dsisr & 0x4000)
186 printk(KERN_ERR "LSU snoop response error\n");
187 if (dsisr & 0x2000)
188 printk(KERN_ERR "MMU SLB multi-hit or invalid B field\n");
189 if (dsisr & 0x1000)
190 printk(KERN_ERR "Recoverable Duptags\n");
191 if (dsisr & 0x800)
192 printk(KERN_ERR "Recoverable D-cache parity error count overflow\n");
193 if (dsisr & 0x400)
194 printk(KERN_ERR "TLB parity error count overflow\n");
195 }
196 if (srr1 & 0x80000)
197 printk(KERN_ERR "Bus Error\n");
198 if (srr1 & 0x40000)
199 printk(KERN_ERR "I-side SLB multiple hit\n");
200 if (srr1 & 0x20000)
201 printk(KERN_ERR "I-cache parity error hit\n");
202
203 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
204 return !!(srr1 & 0x2);
205}
206
207static void __init pas_init_early(void)
208{
209 iommu_init_early_pasemi();
210}
211
212
149/* 213/*
150 * Called very early, MMU is off, device-tree isn't unflattened 214 * Called very early, MMU is off, device-tree isn't unflattened
151 */ 215 */
@@ -158,6 +222,8 @@ static int __init pas_probe(void)
158 222
159 hpte_init_native(); 223 hpte_init_native();
160 224
225 alloc_iobmap_l2();
226
161 return 1; 227 return 1;
162} 228}
163 229
@@ -165,13 +231,14 @@ define_machine(pas) {
165 .name = "PA Semi PA6T-1682M", 231 .name = "PA Semi PA6T-1682M",
166 .probe = pas_probe, 232 .probe = pas_probe,
167 .setup_arch = pas_setup_arch, 233 .setup_arch = pas_setup_arch,
234 .init_early = pas_init_early,
168 .init_IRQ = pas_init_IRQ, 235 .init_IRQ = pas_init_IRQ,
169 .get_irq = mpic_get_irq, 236 .get_irq = mpic_get_irq,
170 .restart = pas_restart, 237 .restart = pas_restart,
171 .power_off = pas_power_off,
172 .halt = pas_halt,
173 .get_boot_time = pas_get_boot_time, 238 .get_boot_time = pas_get_boot_time,
174 .calibrate_decr = generic_calibrate_decr, 239 .calibrate_decr = generic_calibrate_decr,
175 .check_legacy_ioport = pas_check_legacy_ioport, 240 .check_legacy_ioport = pas_check_legacy_ioport,
176 .progress = pas_progress, 241 .progress = pas_progress,
242 .machine_check_exception = pas_machine_check_handler,
243 .pci_irq_fixup = pas_pci_irq_fixup,
177}; 244};
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index c3a89414ddc0..de7440e62cc4 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -37,21 +37,20 @@ static int pmac_backlight_set_legacy_queued;
37 */ 37 */
38static atomic_t kernel_backlight_disabled = ATOMIC_INIT(0); 38static atomic_t kernel_backlight_disabled = ATOMIC_INIT(0);
39 39
40/* Protect the pmac_backlight variable */ 40/* Protect the pmac_backlight variable below.
41 You should hold this lock when using the pmac_backlight pointer to
42 prevent its potential removal. */
41DEFINE_MUTEX(pmac_backlight_mutex); 43DEFINE_MUTEX(pmac_backlight_mutex);
42 44
43/* Main backlight storage 45/* Main backlight storage
44 * 46 *
45 * Backlight drivers in this variable are required to have the "props" 47 * Backlight drivers in this variable are required to have the "ops"
46 * attribute set and to have an update_status function. 48 * attribute set and to have an update_status function.
47 * 49 *
48 * We can only store one backlight here, but since Apple laptops have only one 50 * We can only store one backlight here, but since Apple laptops have only one
49 * internal display, it doesn't matter. Other backlight drivers can be used 51 * internal display, it doesn't matter. Other backlight drivers can be used
50 * independently. 52 * independently.
51 * 53 *
52 * Lock ordering:
53 * pmac_backlight_mutex (global, main backlight)
54 * pmac_backlight->sem (backlight class)
55 */ 54 */
56struct backlight_device *pmac_backlight; 55struct backlight_device *pmac_backlight;
57 56
@@ -104,8 +103,7 @@ static void pmac_backlight_key_worker(struct work_struct *work)
104 struct backlight_properties *props; 103 struct backlight_properties *props;
105 int brightness; 104 int brightness;
106 105
107 down(&pmac_backlight->sem); 106 props = &pmac_backlight->props;
108 props = pmac_backlight->props;
109 107
110 brightness = props->brightness + 108 brightness = props->brightness +
111 ((pmac_backlight_key_queued?-1:1) * 109 ((pmac_backlight_key_queued?-1:1) *
@@ -117,9 +115,7 @@ static void pmac_backlight_key_worker(struct work_struct *work)
117 brightness = props->max_brightness; 115 brightness = props->max_brightness;
118 116
119 props->brightness = brightness; 117 props->brightness = brightness;
120 props->update_status(pmac_backlight); 118 backlight_update_status(pmac_backlight);
121
122 up(&pmac_backlight->sem);
123 } 119 }
124 mutex_unlock(&pmac_backlight_mutex); 120 mutex_unlock(&pmac_backlight_mutex);
125} 121}
@@ -145,8 +141,7 @@ static int __pmac_backlight_set_legacy_brightness(int brightness)
145 if (pmac_backlight) { 141 if (pmac_backlight) {
146 struct backlight_properties *props; 142 struct backlight_properties *props;
147 143
148 down(&pmac_backlight->sem); 144 props = &pmac_backlight->props;
149 props = pmac_backlight->props;
150 props->brightness = brightness * 145 props->brightness = brightness *
151 (props->max_brightness + 1) / 146 (props->max_brightness + 1) /
152 (OLD_BACKLIGHT_MAX + 1); 147 (OLD_BACKLIGHT_MAX + 1);
@@ -156,8 +151,7 @@ static int __pmac_backlight_set_legacy_brightness(int brightness)
156 else if (props->brightness < 0) 151 else if (props->brightness < 0)
157 props->brightness = 0; 152 props->brightness = 0;
158 153
159 props->update_status(pmac_backlight); 154 backlight_update_status(pmac_backlight);
160 up(&pmac_backlight->sem);
161 155
162 error = 0; 156 error = 0;
163 } 157 }
@@ -196,14 +190,11 @@ int pmac_backlight_get_legacy_brightness()
196 if (pmac_backlight) { 190 if (pmac_backlight) {
197 struct backlight_properties *props; 191 struct backlight_properties *props;
198 192
199 down(&pmac_backlight->sem); 193 props = &pmac_backlight->props;
200 props = pmac_backlight->props;
201 194
202 result = props->brightness * 195 result = props->brightness *
203 (OLD_BACKLIGHT_MAX + 1) / 196 (OLD_BACKLIGHT_MAX + 1) /
204 (props->max_brightness + 1); 197 (props->max_brightness + 1);
205
206 up(&pmac_backlight->sem);
207 } 198 }
208 mutex_unlock(&pmac_backlight_mutex); 199 mutex_unlock(&pmac_backlight_mutex);
209 200
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 39db12890214..5e5c0e4add91 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -305,8 +305,6 @@ static int pmac_pic_host_map(struct irq_host *h, unsigned int virq,
305 level = !!(level_mask[hw >> 5] & (1UL << (hw & 0x1f))); 305 level = !!(level_mask[hw >> 5] & (1UL << (hw & 0x1f)));
306 if (level) 306 if (level)
307 desc->status |= IRQ_LEVEL; 307 desc->status |= IRQ_LEVEL;
308 else
309 desc->status |= IRQ_DELAYED_DISABLE;
310 set_irq_chip_and_handler(virq, &pmac_pic, level ? 308 set_irq_chip_and_handler(virq, &pmac_pic, level ?
311 handle_level_irq : handle_edge_irq); 309 handle_level_irq : handle_edge_irq);
312 return 0; 310 return 0;
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index d949e9df41ef..651fa424ea06 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -506,8 +506,8 @@ void note_bootable_part(dev_t dev, int part, int goodness)
506 if ((goodness <= current_root_goodness) && 506 if ((goodness <= current_root_goodness) &&
507 ROOT_DEV != DEFAULT_ROOT_DEVICE) 507 ROOT_DEV != DEFAULT_ROOT_DEVICE)
508 return; 508 return;
509 p = strstr(saved_command_line, "root="); 509 p = strstr(boot_command_line, "root=");
510 if (p != NULL && (p == saved_command_line || p[-1] == ' ')) 510 if (p != NULL && (p == boot_command_line || p[-1] == ' '))
511 return; 511 return;
512 512
513 if (!found_boot) { 513 if (!found_boot) {
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index eeb2ae5ffc58..d73fb73802bb 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -795,7 +795,6 @@ static void __devinit smp_core99_kick_cpu(int nr)
795 ppc_md.progress("smp_core99_kick_cpu", 0x346); 795 ppc_md.progress("smp_core99_kick_cpu", 0x346);
796 796
797 local_irq_save(flags); 797 local_irq_save(flags);
798 local_irq_disable();
799 798
800 /* Save reset vector */ 799 /* Save reset vector */
801 save_vector = *vector; 800 save_vector = *vector;
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index de52ec4e9e58..d270a1e374d5 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -51,4 +51,25 @@ config PS3_VUART
51 including the System Manager and AV Settings. In 51 including the System Manager and AV Settings. In
52 general, all users will say Y. 52 general, all users will say Y.
53 53
54config PS3_PS3AV
55 tristate "PS3 AV settings driver"
56 depends on PPC_PS3
57 select PS3_VUART
58 default y
59 help
60 Include support for the PS3 AV Settings driver.
61
62 This support is required for graphics and sound. In
63 general, all users will say Y or M.
64
65config PS3_SYS_MANAGER
66 bool "PS3 System Manager driver"
67 select PS3_VUART
68 default y
69 help
70 Include support for the PS3 System Manager.
71
72 This support is required for system control. In
73 general, all users will say Y.
74
54endmenu 75endmenu
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index 1994904f580f..a0048fcf0866 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -1,5 +1,6 @@
1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o 1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
2obj-y += interrupt.o exports.o os-area.o 2obj-y += interrupt.o exports.o os-area.o
3obj-y += system-bus.o
3 4
4obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
5obj-$(CONFIG_SPU_BASE) += spu.o 6obj-$(CONFIG_SPU_BASE) += spu.o
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index 8fe1769655a3..e12e59fea13a 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -2,7 +2,7 @@
2 * PS3 pagetable management routines. 2 * PS3 pagetable management routines.
3 * 3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc. 4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp. 5 * Copyright 2006, 2007 Sony Corporation
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 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 8 * it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
23#include <asm/machdep.h> 23#include <asm/machdep.h>
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27#include <asm/lv1call.h> 26#include <asm/lv1call.h>
27#include <asm/ps3fb.h>
28 28
29#include "platform.h" 29#include "platform.h"
30 30
@@ -234,6 +234,9 @@ static void ps3_hpte_invalidate(unsigned long slot, unsigned long va,
234 234
235static void ps3_hpte_clear(void) 235static void ps3_hpte_clear(void)
236{ 236{
237 /* Make sure to clean up the frame buffer device first */
238 ps3fb_cleanup();
239
237 lv1_unmap_htab(htab_addr); 240 lv1_unmap_htab(htab_addr);
238} 241}
239 242
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 6f5de438b980..631c30095617 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -24,7 +24,6 @@
24 24
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/udbg.h> 26#include <asm/udbg.h>
27#include <asm/ps3.h>
28#include <asm/lv1call.h> 27#include <asm/lv1call.h>
29 28
30#include "platform.h" 29#include "platform.h"
@@ -36,15 +35,148 @@
36#endif 35#endif
37 36
38/** 37/**
38 * struct ps3_bmp - a per cpu irq status and mask bitmap structure
39 * @status: 256 bit status bitmap indexed by plug
40 * @unused_1:
41 * @mask: 256 bit mask bitmap indexed by plug
42 * @unused_2:
43 * @lock:
44 * @ipi_debug_brk_mask:
45 *
46 * The HV mantains per SMT thread mappings of HV outlet to HV plug on
47 * behalf of the guest. These mappings are implemented as 256 bit guest
48 * supplied bitmaps indexed by plug number. The addresses of the bitmaps
49 * are registered with the HV through lv1_configure_irq_state_bitmap().
50 * The HV requires that the 512 bits of status + mask not cross a page
51 * boundary. PS3_BMP_MINALIGN is used to define this minimal 64 byte
52 * alignment.
53 *
54 * The HV supports 256 plugs per thread, assigned as {0..255}, for a total
55 * of 512 plugs supported on a processor. To simplify the logic this
56 * implementation equates HV plug value to Linux virq value, constrains each
57 * interrupt to have a system wide unique plug number, and limits the range
58 * of the plug values to map into the first dword of the bitmaps. This
59 * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note
60 * that there is no constraint on how many in this set an individual thread
61 * can acquire.
62 */
63
64#define PS3_BMP_MINALIGN 64
65
66struct ps3_bmp {
67 struct {
68 u64 status;
69 u64 unused_1[3];
70 u64 mask;
71 u64 unused_2[3];
72 };
73 u64 ipi_debug_brk_mask;
74 spinlock_t lock;
75};
76
77/**
78 * struct ps3_private - a per cpu data structure
79 * @bmp: ps3_bmp structure
80 * @node: HV logical_ppe_id
81 * @cpu: HV thread_id
82 */
83
84struct ps3_private {
85 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
86 u64 node;
87 unsigned int cpu;
88};
89
90static DEFINE_PER_CPU(struct ps3_private, ps3_private);
91
92int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet,
93 unsigned int *virq)
94{
95 int result;
96 struct ps3_private *pd;
97
98 /* This defines the default interrupt distribution policy. */
99
100 if (cpu == PS3_BINDING_CPU_ANY)
101 cpu = 0;
102
103 pd = &per_cpu(ps3_private, cpu);
104
105 *virq = irq_create_mapping(NULL, outlet);
106
107 if (*virq == NO_IRQ) {
108 pr_debug("%s:%d: irq_create_mapping failed: outlet %lu\n",
109 __func__, __LINE__, outlet);
110 result = -ENOMEM;
111 goto fail_create;
112 }
113
114 /* Binds outlet to cpu + virq. */
115
116 result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0);
117
118 if (result) {
119 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
120 __func__, __LINE__, ps3_result(result));
121 result = -EPERM;
122 goto fail_connect;
123 }
124
125 pr_debug("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__,
126 outlet, cpu, *virq);
127
128 result = set_irq_chip_data(*virq, pd);
129
130 if (result) {
131 pr_debug("%s:%d: set_irq_chip_data failed\n",
132 __func__, __LINE__);
133 goto fail_set;
134 }
135
136 return result;
137
138fail_set:
139 lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, *virq);
140fail_connect:
141 irq_dispose_mapping(*virq);
142fail_create:
143 return result;
144}
145EXPORT_SYMBOL_GPL(ps3_alloc_irq);
146
147int ps3_free_irq(unsigned int virq)
148{
149 int result;
150 const struct ps3_private *pd = get_irq_chip_data(virq);
151
152 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__,
153 pd->node, pd->cpu, virq);
154
155 result = lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, virq);
156
157 if (result)
158 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
159 __func__, __LINE__, ps3_result(result));
160
161 set_irq_chip_data(virq, NULL);
162 irq_dispose_mapping(virq);
163 return result;
164}
165EXPORT_SYMBOL_GPL(ps3_free_irq);
166
167/**
39 * ps3_alloc_io_irq - Assign a virq to a system bus device. 168 * ps3_alloc_io_irq - Assign a virq to a system bus device.
40 * interrupt_id: The device interrupt id read from the system repository. 169 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
170 * serviced on.
171 * @interrupt_id: The device interrupt id read from the system repository.
41 * @virq: The assigned Linux virq. 172 * @virq: The assigned Linux virq.
42 * 173 *
43 * An io irq represents a non-virtualized device interrupt. interrupt_id 174 * An io irq represents a non-virtualized device interrupt. interrupt_id
44 * coresponds to the interrupt number of the interrupt controller. 175 * coresponds to the interrupt number of the interrupt controller.
45 */ 176 */
46 177
47int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq) 178int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
179 unsigned int *virq)
48{ 180{
49 int result; 181 int result;
50 unsigned long outlet; 182 unsigned long outlet;
@@ -57,13 +189,12 @@ int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq)
57 return result; 189 return result;
58 } 190 }
59 191
60 *virq = irq_create_mapping(NULL, outlet); 192 result = ps3_alloc_irq(cpu, outlet, virq);
61 193 BUG_ON(result);
62 pr_debug("%s:%d: interrupt_id %u => outlet %lu, virq %u\n",
63 __func__, __LINE__, interrupt_id, outlet, *virq);
64 194
65 return 0; 195 return result;
66} 196}
197EXPORT_SYMBOL_GPL(ps3_alloc_io_irq);
67 198
68int ps3_free_io_irq(unsigned int virq) 199int ps3_free_io_irq(unsigned int virq)
69{ 200{
@@ -75,13 +206,16 @@ int ps3_free_io_irq(unsigned int virq)
75 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 206 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
76 __func__, __LINE__, ps3_result(result)); 207 __func__, __LINE__, ps3_result(result));
77 208
78 irq_dispose_mapping(virq); 209 ps3_free_irq(virq);
79 210
80 return result; 211 return result;
81} 212}
213EXPORT_SYMBOL_GPL(ps3_free_io_irq);
82 214
83/** 215/**
84 * ps3_alloc_event_irq - Allocate a virq for use with a system event. 216 * ps3_alloc_event_irq - Allocate a virq for use with a system event.
217 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
218 * serviced on.
85 * @virq: The assigned Linux virq. 219 * @virq: The assigned Linux virq.
86 * 220 *
87 * The virq can be used with lv1_connect_interrupt_event_receive_port() to 221 * The virq can be used with lv1_connect_interrupt_event_receive_port() to
@@ -89,7 +223,7 @@ int ps3_free_io_irq(unsigned int virq)
89 * events. 223 * events.
90 */ 224 */
91 225
92int ps3_alloc_event_irq(unsigned int *virq) 226int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq)
93{ 227{
94 int result; 228 int result;
95 unsigned long outlet; 229 unsigned long outlet;
@@ -103,12 +237,10 @@ int ps3_alloc_event_irq(unsigned int *virq)
103 return result; 237 return result;
104 } 238 }
105 239
106 *virq = irq_create_mapping(NULL, outlet); 240 result = ps3_alloc_irq(cpu, outlet, virq);
107 241 BUG_ON(result);
108 pr_debug("%s:%d: outlet %lu, virq %u\n", __func__, __LINE__, outlet,
109 *virq);
110 242
111 return 0; 243 return result;
112} 244}
113 245
114int ps3_free_event_irq(unsigned int virq) 246int ps3_free_event_irq(unsigned int virq)
@@ -123,7 +255,7 @@ int ps3_free_event_irq(unsigned int virq)
123 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 255 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
124 __func__, __LINE__, ps3_result(result)); 256 __func__, __LINE__, ps3_result(result));
125 257
126 irq_dispose_mapping(virq); 258 ps3_free_irq(virq);
127 259
128 pr_debug(" <- %s:%d\n", __func__, __LINE__); 260 pr_debug(" <- %s:%d\n", __func__, __LINE__);
129 return result; 261 return result;
@@ -136,6 +268,8 @@ int ps3_send_event_locally(unsigned int virq)
136 268
137/** 269/**
138 * ps3_connect_event_irq - Assign a virq to a system bus device. 270 * ps3_connect_event_irq - Assign a virq to a system bus device.
271 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
272 * serviced on.
139 * @did: The HV device identifier read from the system repository. 273 * @did: The HV device identifier read from the system repository.
140 * @interrupt_id: The device interrupt id read from the system repository. 274 * @interrupt_id: The device interrupt id read from the system repository.
141 * @virq: The assigned Linux virq. 275 * @virq: The assigned Linux virq.
@@ -144,12 +278,13 @@ int ps3_send_event_locally(unsigned int virq)
144 * coresponds to the software interrupt number. 278 * coresponds to the software interrupt number.
145 */ 279 */
146 280
147int ps3_connect_event_irq(const struct ps3_device_id *did, 281int ps3_connect_event_irq(enum ps3_cpu_binding cpu,
148 unsigned int interrupt_id, unsigned int *virq) 282 const struct ps3_device_id *did, unsigned int interrupt_id,
283 unsigned int *virq)
149{ 284{
150 int result; 285 int result;
151 286
152 result = ps3_alloc_event_irq(virq); 287 result = ps3_alloc_event_irq(cpu, virq);
153 288
154 if (result) 289 if (result)
155 return result; 290 return result;
@@ -196,6 +331,8 @@ int ps3_disconnect_event_irq(const struct ps3_device_id *did,
196 331
197/** 332/**
198 * ps3_alloc_vuart_irq - Configure the system virtual uart virq. 333 * ps3_alloc_vuart_irq - Configure the system virtual uart virq.
334 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
335 * serviced on.
199 * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap. 336 * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap.
200 * @virq: The assigned Linux virq. 337 * @virq: The assigned Linux virq.
201 * 338 *
@@ -203,13 +340,14 @@ int ps3_disconnect_event_irq(const struct ps3_device_id *did,
203 * freeing the interrupt will return a wrong state error. 340 * freeing the interrupt will return a wrong state error.
204 */ 341 */
205 342
206int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq) 343int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
344 unsigned int *virq)
207{ 345{
208 int result; 346 int result;
209 unsigned long outlet; 347 unsigned long outlet;
210 unsigned long lpar_addr; 348 u64 lpar_addr;
211 349
212 BUG_ON(!is_kernel_addr((unsigned long)virt_addr_bmp)); 350 BUG_ON(!is_kernel_addr((u64)virt_addr_bmp));
213 351
214 lpar_addr = ps3_mm_phys_to_lpar(__pa(virt_addr_bmp)); 352 lpar_addr = ps3_mm_phys_to_lpar(__pa(virt_addr_bmp));
215 353
@@ -221,12 +359,10 @@ int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq)
221 return result; 359 return result;
222 } 360 }
223 361
224 *virq = irq_create_mapping(NULL, outlet); 362 result = ps3_alloc_irq(cpu, outlet, virq);
225 363 BUG_ON(result);
226 pr_debug("%s:%d: outlet %lu, virq %u\n", __func__, __LINE__,
227 outlet, *virq);
228 364
229 return 0; 365 return result;
230} 366}
231 367
232int ps3_free_vuart_irq(unsigned int virq) 368int ps3_free_vuart_irq(unsigned int virq)
@@ -241,21 +377,23 @@ int ps3_free_vuart_irq(unsigned int virq)
241 return result; 377 return result;
242 } 378 }
243 379
244 irq_dispose_mapping(virq); 380 ps3_free_irq(virq);
245 381
246 return result; 382 return result;
247} 383}
248 384
249/** 385/**
250 * ps3_alloc_spe_irq - Configure an spe virq. 386 * ps3_alloc_spe_irq - Configure an spe virq.
387 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
388 * serviced on.
251 * @spe_id: The spe_id returned from lv1_construct_logical_spe(). 389 * @spe_id: The spe_id returned from lv1_construct_logical_spe().
252 * @class: The spe interrupt class {0,1,2}. 390 * @class: The spe interrupt class {0,1,2}.
253 * @virq: The assigned Linux virq. 391 * @virq: The assigned Linux virq.
254 * 392 *
255 */ 393 */
256 394
257int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class, 395int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id,
258 unsigned int *virq) 396 unsigned int class, unsigned int *virq)
259{ 397{
260 int result; 398 int result;
261 unsigned long outlet; 399 unsigned long outlet;
@@ -270,73 +408,24 @@ int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class,
270 return result; 408 return result;
271 } 409 }
272 410
273 *virq = irq_create_mapping(NULL, outlet); 411 result = ps3_alloc_irq(cpu, outlet, virq);
274 412 BUG_ON(result);
275 pr_debug("%s:%d: spe_id %lu, class %u, outlet %lu, virq %u\n",
276 __func__, __LINE__, spe_id, class, outlet, *virq);
277 413
278 return 0; 414 return result;
279} 415}
280 416
281int ps3_free_spe_irq(unsigned int virq) 417int ps3_free_spe_irq(unsigned int virq)
282{ 418{
283 irq_dispose_mapping(virq); 419 ps3_free_irq(virq);
284 return 0; 420 return 0;
285} 421}
286 422
423
287#define PS3_INVALID_OUTLET ((irq_hw_number_t)-1) 424#define PS3_INVALID_OUTLET ((irq_hw_number_t)-1)
288#define PS3_PLUG_MAX 63 425#define PS3_PLUG_MAX 63
289 426
290/**
291 * struct bmp - a per cpu irq status and mask bitmap structure
292 * @status: 256 bit status bitmap indexed by plug
293 * @unused_1:
294 * @mask: 256 bit mask bitmap indexed by plug
295 * @unused_2:
296 * @lock:
297 * @ipi_debug_brk_mask:
298 *
299 * The HV mantains per SMT thread mappings of HV outlet to HV plug on
300 * behalf of the guest. These mappings are implemented as 256 bit guest
301 * supplied bitmaps indexed by plug number. The address of the bitmaps are
302 * registered with the HV through lv1_configure_irq_state_bitmap().
303 *
304 * The HV supports 256 plugs per thread, assigned as {0..255}, for a total
305 * of 512 plugs supported on a processor. To simplify the logic this
306 * implementation equates HV plug value to linux virq value, constrains each
307 * interrupt to have a system wide unique plug number, and limits the range
308 * of the plug values to map into the first dword of the bitmaps. This
309 * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note
310 * that there is no constraint on how many in this set an individual thread
311 * can aquire.
312 */
313
314struct bmp {
315 struct {
316 unsigned long status;
317 unsigned long unused_1[3];
318 unsigned long mask;
319 unsigned long unused_2[3];
320 } __attribute__ ((packed));
321 spinlock_t lock;
322 unsigned long ipi_debug_brk_mask;
323};
324
325/**
326 * struct private - a per cpu data structure
327 * @node: HV node id
328 * @cpu: HV thread id
329 * @bmp: an HV bmp structure
330 */
331
332struct private {
333 unsigned long node;
334 unsigned int cpu;
335 struct bmp bmp;
336};
337
338#if defined(DEBUG) 427#if defined(DEBUG)
339static void _dump_64_bmp(const char *header, const unsigned long *p, unsigned cpu, 428static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
340 const char* func, int line) 429 const char* func, int line)
341{ 430{
342 pr_debug("%s:%d: %s %u {%04lx_%04lx_%04lx_%04lx}\n", 431 pr_debug("%s:%d: %s %u {%04lx_%04lx_%04lx_%04lx}\n",
@@ -346,14 +435,14 @@ static void _dump_64_bmp(const char *header, const unsigned long *p, unsigned cp
346} 435}
347 436
348static void __attribute__ ((unused)) _dump_256_bmp(const char *header, 437static void __attribute__ ((unused)) _dump_256_bmp(const char *header,
349 const unsigned long *p, unsigned cpu, const char* func, int line) 438 const u64 *p, unsigned cpu, const char* func, int line)
350{ 439{
351 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n", 440 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n",
352 func, line, header, cpu, p[0], p[1], p[2], p[3]); 441 func, line, header, cpu, p[0], p[1], p[2], p[3]);
353} 442}
354 443
355#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__) 444#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__)
356static void _dump_bmp(struct private* pd, const char* func, int line) 445static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
357{ 446{
358 unsigned long flags; 447 unsigned long flags;
359 448
@@ -364,7 +453,7 @@ static void _dump_bmp(struct private* pd, const char* func, int line)
364} 453}
365 454
366#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 455#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
367static void __attribute__ ((unused)) _dump_mask(struct private* pd, 456static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd,
368 const char* func, int line) 457 const char* func, int line)
369{ 458{
370 unsigned long flags; 459 unsigned long flags;
@@ -374,109 +463,94 @@ static void __attribute__ ((unused)) _dump_mask(struct private* pd,
374 spin_unlock_irqrestore(&pd->bmp.lock, flags); 463 spin_unlock_irqrestore(&pd->bmp.lock, flags);
375} 464}
376#else 465#else
377static void dump_bmp(struct private* pd) {}; 466static void dump_bmp(struct ps3_private* pd) {};
378#endif /* defined(DEBUG) */ 467#endif /* defined(DEBUG) */
379 468
380static void chip_mask(unsigned int virq) 469static void ps3_chip_mask(unsigned int virq)
381{ 470{
471 struct ps3_private *pd = get_irq_chip_data(virq);
472 u64 bit = 0x8000000000000000UL >> virq;
473 u64 *p = &pd->bmp.mask;
474 u64 old;
382 unsigned long flags; 475 unsigned long flags;
383 struct private *pd = get_irq_chip_data(virq);
384 476
385 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 477 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
386 478
387 BUG_ON(virq < NUM_ISA_INTERRUPTS); 479 local_irq_save(flags);
388 BUG_ON(virq > PS3_PLUG_MAX); 480 asm volatile(
389 481 "1: ldarx %0,0,%3\n"
390 spin_lock_irqsave(&pd->bmp.lock, flags); 482 "andc %0,%0,%2\n"
391 pd->bmp.mask &= ~(0x8000000000000000UL >> virq); 483 "stdcx. %0,0,%3\n"
392 spin_unlock_irqrestore(&pd->bmp.lock, flags); 484 "bne- 1b"
485 : "=&r" (old), "+m" (*p)
486 : "r" (bit), "r" (p)
487 : "cc" );
393 488
394 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 489 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
490 local_irq_restore(flags);
395} 491}
396 492
397static void chip_unmask(unsigned int virq) 493static void ps3_chip_unmask(unsigned int virq)
398{ 494{
495 struct ps3_private *pd = get_irq_chip_data(virq);
496 u64 bit = 0x8000000000000000UL >> virq;
497 u64 *p = &pd->bmp.mask;
498 u64 old;
399 unsigned long flags; 499 unsigned long flags;
400 struct private *pd = get_irq_chip_data(virq);
401 500
402 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 501 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
403 502
404 BUG_ON(virq < NUM_ISA_INTERRUPTS); 503 local_irq_save(flags);
405 BUG_ON(virq > PS3_PLUG_MAX); 504 asm volatile(
406 505 "1: ldarx %0,0,%3\n"
407 spin_lock_irqsave(&pd->bmp.lock, flags); 506 "or %0,%0,%2\n"
408 pd->bmp.mask |= (0x8000000000000000UL >> virq); 507 "stdcx. %0,0,%3\n"
409 spin_unlock_irqrestore(&pd->bmp.lock, flags); 508 "bne- 1b"
509 : "=&r" (old), "+m" (*p)
510 : "r" (bit), "r" (p)
511 : "cc" );
410 512
411 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 513 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
514 local_irq_restore(flags);
412} 515}
413 516
414static void chip_eoi(unsigned int virq) 517static void ps3_chip_eoi(unsigned int virq)
415{ 518{
416 lv1_end_of_interrupt(virq); 519 const struct ps3_private *pd = get_irq_chip_data(virq);
520 lv1_end_of_interrupt_ext(pd->node, pd->cpu, virq);
417} 521}
418 522
419static struct irq_chip irq_chip = { 523static struct irq_chip irq_chip = {
420 .typename = "ps3", 524 .typename = "ps3",
421 .mask = chip_mask, 525 .mask = ps3_chip_mask,
422 .unmask = chip_unmask, 526 .unmask = ps3_chip_unmask,
423 .eoi = chip_eoi, 527 .eoi = ps3_chip_eoi,
424}; 528};
425 529
426static void host_unmap(struct irq_host *h, unsigned int virq) 530static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
427{ 531{
428 int result; 532 set_irq_chip_data(virq, NULL);
429
430 pr_debug("%s:%d: virq %d\n", __func__, __LINE__, virq);
431
432 lv1_disconnect_irq_plug(virq);
433
434 result = set_irq_chip_data(virq, NULL);
435 BUG_ON(result);
436} 533}
437 534
438static DEFINE_PER_CPU(struct private, private); 535static int ps3_host_map(struct irq_host *h, unsigned int virq,
439
440static int host_map(struct irq_host *h, unsigned int virq,
441 irq_hw_number_t hwirq) 536 irq_hw_number_t hwirq)
442{ 537{
443 int result; 538 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq,
444 unsigned int cpu;
445
446 pr_debug(" -> %s:%d\n", __func__, __LINE__);
447 pr_debug("%s:%d: hwirq %lu => virq %u\n", __func__, __LINE__, hwirq,
448 virq); 539 virq);
449 540
450 /* bind this virq to a cpu */
451
452 preempt_disable();
453 cpu = smp_processor_id();
454 result = lv1_connect_irq_plug(virq, hwirq);
455 preempt_enable();
456
457 if (result) {
458 pr_info("%s:%d: lv1_connect_irq_plug failed:"
459 " %s\n", __func__, __LINE__, ps3_result(result));
460 return -EPERM;
461 }
462
463 result = set_irq_chip_data(virq, &per_cpu(private, cpu));
464 BUG_ON(result);
465
466 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq); 541 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq);
467 542
468 pr_debug(" <- %s:%d\n", __func__, __LINE__); 543 return 0;
469 return result;
470} 544}
471 545
472static struct irq_host_ops host_ops = { 546static struct irq_host_ops ps3_host_ops = {
473 .map = host_map, 547 .map = ps3_host_map,
474 .unmap = host_unmap, 548 .unmap = ps3_host_unmap,
475}; 549};
476 550
477void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) 551void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
478{ 552{
479 struct private *pd = &per_cpu(private, cpu); 553 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
480 554
481 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; 555 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq;
482 556
@@ -484,57 +558,32 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
484 cpu, virq, pd->bmp.ipi_debug_brk_mask); 558 cpu, virq, pd->bmp.ipi_debug_brk_mask);
485} 559}
486 560
487static int bmp_get_and_clear_status_bit(struct bmp *m) 561unsigned int ps3_get_irq(void)
488{ 562{
489 unsigned long flags; 563 struct ps3_private *pd = &__get_cpu_var(ps3_private);
490 unsigned int bit; 564 u64 x = (pd->bmp.status & pd->bmp.mask);
491 unsigned long x; 565 unsigned int plug;
492
493 spin_lock_irqsave(&m->lock, flags);
494 566
495 /* check for ipi break first to stop this cpu ASAP */ 567 /* check for ipi break first to stop this cpu ASAP */
496 568
497 if (m->status & m->ipi_debug_brk_mask) { 569 if (x & pd->bmp.ipi_debug_brk_mask)
498 m->status &= ~m->ipi_debug_brk_mask; 570 x &= pd->bmp.ipi_debug_brk_mask;
499 spin_unlock_irqrestore(&m->lock, flags);
500 return __ilog2(m->ipi_debug_brk_mask);
501 }
502
503 x = (m->status & m->mask);
504 571
505 for (bit = NUM_ISA_INTERRUPTS, x <<= bit; x; bit++, x <<= 1) 572 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x));
506 if (x & 0x8000000000000000UL) { 573 plug &= 0x3f;
507 m->status &= ~(0x8000000000000000UL >> bit);
508 spin_unlock_irqrestore(&m->lock, flags);
509 return bit;
510 }
511 574
512 spin_unlock_irqrestore(&m->lock, flags); 575 if (unlikely(plug) == NO_IRQ) {
513
514 pr_debug("%s:%d: not found\n", __func__, __LINE__);
515 return -1;
516}
517
518unsigned int ps3_get_irq(void)
519{
520 int plug;
521
522 struct private *pd = &__get_cpu_var(private);
523
524 plug = bmp_get_and_clear_status_bit(&pd->bmp);
525
526 if (plug < 1) {
527 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 576 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__,
528 pd->cpu); 577 pd->cpu);
529 dump_bmp(&per_cpu(private, 0)); 578 dump_bmp(&per_cpu(ps3_private, 0));
530 dump_bmp(&per_cpu(private, 1)); 579 dump_bmp(&per_cpu(ps3_private, 1));
531 return NO_IRQ; 580 return NO_IRQ;
532 } 581 }
533 582
534#if defined(DEBUG) 583#if defined(DEBUG)
535 if (plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX) { 584 if (unlikely(plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX)) {
536 dump_bmp(&per_cpu(private, 0)); 585 dump_bmp(&per_cpu(ps3_private, 0));
537 dump_bmp(&per_cpu(private, 1)); 586 dump_bmp(&per_cpu(ps3_private, 1));
538 BUG(); 587 BUG();
539 } 588 }
540#endif 589#endif
@@ -544,26 +593,27 @@ unsigned int ps3_get_irq(void)
544void __init ps3_init_IRQ(void) 593void __init ps3_init_IRQ(void)
545{ 594{
546 int result; 595 int result;
547 unsigned long node;
548 unsigned cpu; 596 unsigned cpu;
549 struct irq_host *host; 597 struct irq_host *host;
550 598
551 lv1_get_logical_ppe_id(&node); 599 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
552
553 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &host_ops,
554 PS3_INVALID_OUTLET); 600 PS3_INVALID_OUTLET);
555 irq_set_default_host(host); 601 irq_set_default_host(host);
556 irq_set_virq_count(PS3_PLUG_MAX + 1); 602 irq_set_virq_count(PS3_PLUG_MAX + 1);
557 603
558 for_each_possible_cpu(cpu) { 604 for_each_possible_cpu(cpu) {
559 struct private *pd = &per_cpu(private, cpu); 605 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
560 606
561 pd->node = node; 607 lv1_get_logical_ppe_id(&pd->node);
562 pd->cpu = cpu; 608 pd->cpu = get_hard_smp_processor_id(cpu);
563 spin_lock_init(&pd->bmp.lock); 609 spin_lock_init(&pd->bmp.lock);
564 610
565 result = lv1_configure_irq_state_bitmap(node, cpu, 611 pr_debug("%s:%d: node %lu, cpu %d, bmp %lxh\n", __func__,
566 ps3_mm_phys_to_lpar(__pa(&pd->bmp.status))); 612 __LINE__, pd->node, pd->cpu,
613 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
614
615 result = lv1_configure_irq_state_bitmap(pd->node, pd->cpu,
616 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
567 617
568 if (result) 618 if (result)
569 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 619 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 49c0d010d491..42354de3f557 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -25,7 +25,6 @@
25#include <asm/firmware.h> 25#include <asm/firmware.h>
26#include <asm/lmb.h> 26#include <asm/lmb.h>
27#include <asm/udbg.h> 27#include <asm/udbg.h>
28#include <asm/ps3.h>
29#include <asm/lv1call.h> 28#include <asm/lv1call.h>
30 29
31#include "platform.h" 30#include "platform.h"
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 58358305dc10..5c3da08bc0c4 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -22,7 +22,6 @@
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/ps3.h>
26 25
27#include "platform.h" 26#include "platform.h"
28 27
@@ -59,7 +58,7 @@ struct os_area_header {
59 u32 ldr_format; 58 u32 ldr_format;
60 u32 ldr_size; 59 u32 ldr_size;
61 u32 _reserved_2[6]; 60 u32 _reserved_2[6];
62} __attribute__ ((packed)); 61};
63 62
64enum { 63enum {
65 PARAM_BOOT_FLAG_GAME_OS = 0, 64 PARAM_BOOT_FLAG_GAME_OS = 0,
@@ -67,13 +66,6 @@ enum {
67}; 66};
68 67
69enum { 68enum {
70 PARAM_AV_MULTI_OUT_NTSC = 0,
71 PARAM_AV_MULTI_OUT_PAL_RGB = 1,
72 PARAM_AV_MULTI_OUT_PAL_YCBCR = 2,
73 PARAM_AV_MULTI_OUT_SECAM = 3,
74};
75
76enum {
77 PARAM_CTRL_BUTTON_O_IS_YES = 0, 69 PARAM_CTRL_BUTTON_O_IS_YES = 0,
78 PARAM_CTRL_BUTTON_X_IS_YES = 1, 70 PARAM_CTRL_BUTTON_X_IS_YES = 1,
79}; 71};
@@ -114,7 +106,7 @@ struct os_area_params {
114 u8 dns_primary[4]; 106 u8 dns_primary[4];
115 u8 dns_secondary[4]; 107 u8 dns_secondary[4];
116 u8 _reserved_5[8]; 108 u8 _reserved_5[8];
117} __attribute__ ((packed)); 109};
118 110
119/** 111/**
120 * struct saved_params - Static working copies of data from the 'Other OS' area. 112 * struct saved_params - Static working copies of data from the 'Other OS' area.
@@ -257,3 +249,13 @@ u64 ps3_os_area_rtc_diff(void)
257{ 249{
258 return saved_params.rtc_diff ? saved_params.rtc_diff : 946684800UL; 250 return saved_params.rtc_diff ? saved_params.rtc_diff : 946684800UL;
259} 251}
252
253/**
254 * ps3_os_area_get_av_multi_out - Returns the default video mode.
255 */
256
257enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void)
258{
259 return saved_params.av_multi_out;
260}
261EXPORT_SYMBOL_GPL(ps3_os_area_get_av_multi_out);
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 23b111bea9d0..ca04f03305c7 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -22,6 +22,9 @@
22#define _PS3_PLATFORM_H 22#define _PS3_PLATFORM_H
23 23
24#include <linux/rtc.h> 24#include <linux/rtc.h>
25#include <scsi/scsi.h>
26
27#include <asm/ps3.h>
25 28
26/* htab */ 29/* htab */
27 30
@@ -65,4 +68,152 @@ void ps3_spu_set_platform (void);
65static inline void ps3_spu_set_platform (void) {} 68static inline void ps3_spu_set_platform (void) {}
66#endif 69#endif
67 70
71/* repository bus info */
72
73enum ps3_bus_type {
74 PS3_BUS_TYPE_SB = 4,
75 PS3_BUS_TYPE_STORAGE = 5,
76};
77
78enum ps3_dev_type {
79 PS3_DEV_TYPE_STOR_DISK = TYPE_DISK, /* 0 */
80 PS3_DEV_TYPE_SB_GELIC = 3,
81 PS3_DEV_TYPE_SB_USB = 4,
82 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
83 PS3_DEV_TYPE_SB_GPIO = 6,
84 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
85};
86
87int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
88 u64 *value);
89int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
90int ps3_repository_read_bus_type(unsigned int bus_index,
91 enum ps3_bus_type *bus_type);
92int ps3_repository_read_bus_num_dev(unsigned int bus_index,
93 unsigned int *num_dev);
94
95/* repository bus device info */
96
97enum ps3_interrupt_type {
98 PS3_INTERRUPT_TYPE_EVENT_PORT = 2,
99 PS3_INTERRUPT_TYPE_SB_OHCI = 3,
100 PS3_INTERRUPT_TYPE_SB_EHCI = 4,
101 PS3_INTERRUPT_TYPE_OTHER = 5,
102};
103
104enum ps3_reg_type {
105 PS3_REG_TYPE_SB_OHCI = 3,
106 PS3_REG_TYPE_SB_EHCI = 4,
107 PS3_REG_TYPE_SB_GPIO = 5,
108};
109
110int ps3_repository_read_dev_str(unsigned int bus_index,
111 unsigned int dev_index, const char *dev_str, u64 *value);
112int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
113 unsigned int *dev_id);
114int ps3_repository_read_dev_type(unsigned int bus_index,
115 unsigned int dev_index, enum ps3_dev_type *dev_type);
116int ps3_repository_read_dev_intr(unsigned int bus_index,
117 unsigned int dev_index, unsigned int intr_index,
118 enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id);
119int ps3_repository_read_dev_reg_type(unsigned int bus_index,
120 unsigned int dev_index, unsigned int reg_index,
121 enum ps3_reg_type *reg_type);
122int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
123 unsigned int dev_index, unsigned int reg_index, u64 *bus_addr,
124 u64 *len);
125int ps3_repository_read_dev_reg(unsigned int bus_index,
126 unsigned int dev_index, unsigned int reg_index,
127 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len);
128
129/* repository bus enumerators */
130
131struct ps3_repository_device {
132 unsigned int bus_index;
133 unsigned int dev_index;
134 struct ps3_device_id did;
135};
136
137int ps3_repository_find_device(enum ps3_bus_type bus_type,
138 enum ps3_dev_type dev_type,
139 const struct ps3_repository_device *start_dev,
140 struct ps3_repository_device *dev);
141static inline int ps3_repository_find_first_device(
142 enum ps3_bus_type bus_type, enum ps3_dev_type dev_type,
143 struct ps3_repository_device *dev)
144{
145 return ps3_repository_find_device(bus_type, dev_type, NULL, dev);
146}
147int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
148 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
149int ps3_repository_find_reg(const struct ps3_repository_device *dev,
150 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
151
152/* repository block device info */
153
154int ps3_repository_read_stor_dev_port(unsigned int bus_index,
155 unsigned int dev_index, u64 *port);
156int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
157 unsigned int dev_index, u64 *blk_size);
158int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
159 unsigned int dev_index, u64 *num_blocks);
160int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
161 unsigned int dev_index, unsigned int *num_regions);
162int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
163 unsigned int dev_index, unsigned int region_index,
164 unsigned int *region_id);
165int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
166 unsigned int dev_index, unsigned int region_index, u64 *region_size);
167int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
168 unsigned int dev_index, unsigned int region_index, u64 *region_start);
169int ps3_repository_read_stor_dev_info(unsigned int bus_index,
170 unsigned int dev_index, u64 *port, u64 *blk_size,
171 u64 *num_blocks, unsigned int *num_regions);
172int ps3_repository_read_stor_dev_region(unsigned int bus_index,
173 unsigned int dev_index, unsigned int region_index,
174 unsigned int *region_id, u64 *region_start, u64 *region_size);
175
176/* repository pu and memory info */
177
178int ps3_repository_read_num_pu(unsigned int *num_pu);
179int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
180int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
181int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
182int ps3_repository_read_region_total(u64 *region_total);
183int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
184 u64 *region_total);
185
186/* repository pme info */
187
188int ps3_repository_read_num_be(unsigned int *num_be);
189int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
190int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
191int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
192
193/* repository 'Other OS' area */
194
195int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
196int ps3_repository_read_boot_dat_size(unsigned int *size);
197int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size);
198
199/* repository spu info */
200
201/**
202 * enum spu_resource_type - Type of spu resource.
203 * @spu_resource_type_shared: Logical spu is shared with other partions.
204 * @spu_resource_type_exclusive: Logical spu is not shared with other partions.
205 *
206 * Returned by ps3_repository_read_spu_resource_id().
207 */
208
209enum ps3_spu_resource_type {
210 PS3_SPU_RESOURCE_TYPE_SHARED = 0,
211 PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL,
212};
213
214int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved);
215int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
216int ps3_repository_read_spu_resource_id(unsigned int res_index,
217 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
218
68#endif 219#endif
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 273a0d621bdd..ae586a0e5d3f 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -18,9 +18,10 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <asm/ps3.h>
22#include <asm/lv1call.h> 21#include <asm/lv1call.h>
23 22
23#include "platform.h"
24
24enum ps3_vendor_id { 25enum ps3_vendor_id {
25 PS3_VENDOR_ID_NONE = 0, 26 PS3_VENDOR_ID_NONE = 0,
26 PS3_VENDOR_ID_SONY = 0x8000000000000000UL, 27 PS3_VENDOR_ID_SONY = 0x8000000000000000UL,
@@ -257,7 +258,7 @@ int ps3_repository_read_dev_type(unsigned int bus_index,
257 258
258int ps3_repository_read_dev_intr(unsigned int bus_index, 259int ps3_repository_read_dev_intr(unsigned int bus_index,
259 unsigned int dev_index, unsigned int intr_index, 260 unsigned int dev_index, unsigned int intr_index,
260 unsigned int *intr_type, unsigned int* interrupt_id) 261 enum ps3_interrupt_type *intr_type, unsigned int* interrupt_id)
261{ 262{
262 int result; 263 int result;
263 u64 v1; 264 u64 v1;
@@ -275,7 +276,8 @@ int ps3_repository_read_dev_intr(unsigned int bus_index,
275} 276}
276 277
277int ps3_repository_read_dev_reg_type(unsigned int bus_index, 278int ps3_repository_read_dev_reg_type(unsigned int bus_index,
278 unsigned int dev_index, unsigned int reg_index, unsigned int *reg_type) 279 unsigned int dev_index, unsigned int reg_index,
280 enum ps3_reg_type *reg_type)
279{ 281{
280 int result; 282 int result;
281 u64 v1; 283 u64 v1;
@@ -302,8 +304,8 @@ int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
302} 304}
303 305
304int ps3_repository_read_dev_reg(unsigned int bus_index, 306int ps3_repository_read_dev_reg(unsigned int bus_index,
305 unsigned int dev_index, unsigned int reg_index, unsigned int *reg_type, 307 unsigned int dev_index, unsigned int reg_index,
306 u64 *bus_addr, u64 *len) 308 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len)
307{ 309{
308 int result = ps3_repository_read_dev_reg_type(bus_index, dev_index, 310 int result = ps3_repository_read_dev_reg_type(bus_index, dev_index,
309 reg_index, reg_type); 311 reg_index, reg_type);
@@ -343,7 +345,7 @@ int ps3_repository_dump_resource_info(unsigned int bus_index,
343 } 345 }
344 346
345 for (res_index = 0; res_index < 10; res_index++) { 347 for (res_index = 0; res_index < 10; res_index++) {
346 enum ps3_region_type reg_type; 348 enum ps3_reg_type reg_type;
347 u64 bus_addr; 349 u64 bus_addr;
348 u64 len; 350 u64 len;
349 351
@@ -367,7 +369,55 @@ int ps3_repository_dump_resource_info(unsigned int bus_index,
367 return result; 369 return result;
368} 370}
369 371
370static int dump_device_info(unsigned int bus_index, unsigned int num_dev) 372static int dump_stor_dev_info(unsigned int bus_index, unsigned int dev_index)
373{
374 int result = 0;
375 unsigned int num_regions, region_index;
376 u64 port, blk_size, num_blocks;
377
378 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
379 bus_index, dev_index);
380
381 result = ps3_repository_read_stor_dev_info(bus_index, dev_index, &port,
382 &blk_size, &num_blocks, &num_regions);
383 if (result) {
384 pr_debug("%s:%d ps3_repository_read_stor_dev_info"
385 " (%u:%u) failed\n", __func__, __LINE__,
386 bus_index, dev_index);
387 goto out;
388 }
389
390 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks "
391 "%lu, num_regions %u\n",
392 __func__, __LINE__, bus_index, dev_index, port,
393 blk_size, num_blocks, num_regions);
394
395 for (region_index = 0; region_index < num_regions; region_index++) {
396 unsigned int region_id;
397 u64 region_start, region_size;
398
399 result = ps3_repository_read_stor_dev_region(bus_index,
400 dev_index, region_index, &region_id, &region_start,
401 &region_size);
402 if (result) {
403 pr_debug("%s:%d ps3_repository_read_stor_dev_region"
404 " (%u:%u) failed\n", __func__, __LINE__,
405 bus_index, dev_index);
406 break;
407 }
408
409 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n",
410 __func__, __LINE__, bus_index, dev_index, region_id,
411 region_start, region_size);
412 }
413
414out:
415 pr_debug(" <- %s:%d\n", __func__, __LINE__);
416 return result;
417}
418
419static int dump_device_info(unsigned int bus_index, enum ps3_bus_type bus_type,
420 unsigned int num_dev)
371{ 421{
372 int result = 0; 422 int result = 0;
373 unsigned int dev_index; 423 unsigned int dev_index;
@@ -402,6 +452,9 @@ static int dump_device_info(unsigned int bus_index, unsigned int num_dev)
402 __LINE__, bus_index, dev_index, dev_type, dev_id); 452 __LINE__, bus_index, dev_index, dev_type, dev_id);
403 453
404 ps3_repository_dump_resource_info(bus_index, dev_index); 454 ps3_repository_dump_resource_info(bus_index, dev_index);
455
456 if (bus_type == PS3_BUS_TYPE_STORAGE)
457 dump_stor_dev_info(bus_index, dev_index);
405 } 458 }
406 459
407 pr_debug(" <- %s:%d\n", __func__, __LINE__); 460 pr_debug(" <- %s:%d\n", __func__, __LINE__);
@@ -452,7 +505,7 @@ int ps3_repository_dump_bus_info(void)
452 __func__, __LINE__, bus_index, bus_type, bus_id, 505 __func__, __LINE__, bus_index, bus_type, bus_id,
453 num_dev); 506 num_dev);
454 507
455 dump_device_info(bus_index, num_dev); 508 dump_device_info(bus_index, bus_type, num_dev);
456 } 509 }
457 510
458 pr_debug(" <- %s:%d\n", __func__, __LINE__); 511 pr_debug(" <- %s:%d\n", __func__, __LINE__);
@@ -487,7 +540,8 @@ static int find_device(unsigned int bus_index, unsigned int num_dev,
487 break; 540 break;
488 } 541 }
489 542
490 BUG_ON(dev_index == num_dev); 543 if (dev_index == num_dev)
544 return -1;
491 545
492 pr_debug("%s:%d: found dev_type %u at dev_index %u\n", 546 pr_debug("%s:%d: found dev_type %u at dev_index %u\n",
493 __func__, __LINE__, dev_type, dev_index); 547 __func__, __LINE__, dev_type, dev_index);
@@ -521,7 +575,7 @@ int ps3_repository_find_device (enum ps3_bus_type bus_type,
521 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__, 575 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__,
522 bus_type, dev_type); 576 bus_type, dev_type);
523 577
524 dev->bus_index = UINT_MAX; 578 BUG_ON(start_dev && start_dev->bus_index > 10);
525 579
526 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10; 580 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10;
527 bus_index++) { 581 bus_index++) {
@@ -532,13 +586,15 @@ int ps3_repository_find_device (enum ps3_bus_type bus_type,
532 if (result) { 586 if (result) {
533 pr_debug("%s:%d read_bus_type failed\n", 587 pr_debug("%s:%d read_bus_type failed\n",
534 __func__, __LINE__); 588 __func__, __LINE__);
589 dev->bus_index = UINT_MAX;
535 return result; 590 return result;
536 } 591 }
537 if (x == bus_type) 592 if (x == bus_type)
538 break; 593 break;
539 } 594 }
540 595
541 BUG_ON(bus_index == 10); 596 if (bus_index >= 10)
597 return -ENODEV;
542 598
543 pr_debug("%s:%d: found bus_type %u at bus_index %u\n", 599 pr_debug("%s:%d: found bus_type %u at bus_index %u\n",
544 __func__, __LINE__, bus_type, bus_index); 600 __func__, __LINE__, bus_type, bus_index);
@@ -604,7 +660,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
604 } 660 }
605 } 661 }
606 662
607 BUG_ON(res_index == 10); 663 if (res_index == 10)
664 return -ENODEV;
608 665
609 pr_debug("%s:%d: found intr_type %u at res_index %u\n", 666 pr_debug("%s:%d: found intr_type %u at res_index %u\n",
610 __func__, __LINE__, intr_type, res_index); 667 __func__, __LINE__, intr_type, res_index);
@@ -612,8 +669,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
612 return result; 669 return result;
613} 670}
614 671
615int ps3_repository_find_region(const struct ps3_repository_device *dev, 672int ps3_repository_find_reg(const struct ps3_repository_device *dev,
616 enum ps3_region_type reg_type, u64 *bus_addr, u64 *len) 673 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len)
617{ 674{
618 int result = 0; 675 int result = 0;
619 unsigned int res_index; 676 unsigned int res_index;
@@ -623,7 +680,7 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
623 *bus_addr = *len = 0; 680 *bus_addr = *len = 0;
624 681
625 for (res_index = 0; res_index < 10; res_index++) { 682 for (res_index = 0; res_index < 10; res_index++) {
626 enum ps3_region_type t; 683 enum ps3_reg_type t;
627 u64 a; 684 u64 a;
628 u64 l; 685 u64 l;
629 686
@@ -643,7 +700,8 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
643 } 700 }
644 } 701 }
645 702
646 BUG_ON(res_index == 10); 703 if (res_index == 10)
704 return -ENODEV;
647 705
648 pr_debug("%s:%d: found reg_type %u at res_index %u\n", 706 pr_debug("%s:%d: found reg_type %u at res_index %u\n",
649 __func__, __LINE__, reg_type, res_index); 707 __func__, __LINE__, reg_type, res_index);
@@ -651,6 +709,136 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
651 return result; 709 return result;
652} 710}
653 711
712int ps3_repository_read_stor_dev_port(unsigned int bus_index,
713 unsigned int dev_index, u64 *port)
714{
715 return read_node(PS3_LPAR_ID_PME,
716 make_first_field("bus", bus_index),
717 make_field("dev", dev_index),
718 make_field("port", 0),
719 0, port, 0);
720}
721
722int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
723 unsigned int dev_index, u64 *blk_size)
724{
725 return read_node(PS3_LPAR_ID_PME,
726 make_first_field("bus", bus_index),
727 make_field("dev", dev_index),
728 make_field("blk_size", 0),
729 0, blk_size, 0);
730}
731
732int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
733 unsigned int dev_index, u64 *num_blocks)
734{
735 return read_node(PS3_LPAR_ID_PME,
736 make_first_field("bus", bus_index),
737 make_field("dev", dev_index),
738 make_field("n_blocks", 0),
739 0, num_blocks, 0);
740}
741
742int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
743 unsigned int dev_index, unsigned int *num_regions)
744{
745 int result;
746 u64 v1;
747
748 result = read_node(PS3_LPAR_ID_PME,
749 make_first_field("bus", bus_index),
750 make_field("dev", dev_index),
751 make_field("n_regs", 0),
752 0, &v1, 0);
753 *num_regions = v1;
754 return result;
755}
756
757int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
758 unsigned int dev_index, unsigned int region_index,
759 unsigned int *region_id)
760{
761 int result;
762 u64 v1;
763
764 result = read_node(PS3_LPAR_ID_PME,
765 make_first_field("bus", bus_index),
766 make_field("dev", dev_index),
767 make_field("region", region_index),
768 make_field("id", 0),
769 &v1, 0);
770 *region_id = v1;
771 return result;
772}
773
774int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
775 unsigned int dev_index, unsigned int region_index, u64 *region_size)
776{
777 return read_node(PS3_LPAR_ID_PME,
778 make_first_field("bus", bus_index),
779 make_field("dev", dev_index),
780 make_field("region", region_index),
781 make_field("size", 0),
782 region_size, 0);
783}
784
785int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
786 unsigned int dev_index, unsigned int region_index, u64 *region_start)
787{
788 return read_node(PS3_LPAR_ID_PME,
789 make_first_field("bus", bus_index),
790 make_field("dev", dev_index),
791 make_field("region", region_index),
792 make_field("start", 0),
793 region_start, 0);
794}
795
796int ps3_repository_read_stor_dev_info(unsigned int bus_index,
797 unsigned int dev_index, u64 *port, u64 *blk_size,
798 u64 *num_blocks, unsigned int *num_regions)
799{
800 int result;
801
802 result = ps3_repository_read_stor_dev_port(bus_index, dev_index, port);
803 if (result)
804 return result;
805
806 result = ps3_repository_read_stor_dev_blk_size(bus_index, dev_index,
807 blk_size);
808 if (result)
809 return result;
810
811 result = ps3_repository_read_stor_dev_num_blocks(bus_index, dev_index,
812 num_blocks);
813 if (result)
814 return result;
815
816 result = ps3_repository_read_stor_dev_num_regions(bus_index, dev_index,
817 num_regions);
818 return result;
819}
820
821int ps3_repository_read_stor_dev_region(unsigned int bus_index,
822 unsigned int dev_index, unsigned int region_index,
823 unsigned int *region_id, u64 *region_start, u64 *region_size)
824{
825 int result;
826
827 result = ps3_repository_read_stor_dev_region_id(bus_index, dev_index,
828 region_index, region_id);
829 if (result)
830 return result;
831
832 result = ps3_repository_read_stor_dev_region_start(bus_index, dev_index,
833 region_index, region_start);
834 if (result)
835 return result;
836
837 result = ps3_repository_read_stor_dev_region_size(bus_index, dev_index,
838 region_index, region_size);
839 return result;
840}
841
654int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size) 842int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
655{ 843{
656 return read_node(PS3_LPAR_ID_CURRENT, 844 return read_node(PS3_LPAR_ID_CURRENT,
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index d8b5cadbe80e..ac5df9688dcb 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -24,6 +24,7 @@
24#include <linux/root_dev.h> 24#include <linux/root_dev.h>
25#include <linux/console.h> 25#include <linux/console.h>
26#include <linux/kexec.h> 26#include <linux/kexec.h>
27#include <linux/bootmem.h>
27 28
28#include <asm/machdep.h> 29#include <asm/machdep.h>
29#include <asm/firmware.h> 30#include <asm/firmware.h>
@@ -41,10 +42,22 @@
41#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 42#define DBG(fmt...) do{if(0)printk(fmt);}while(0)
42#endif 43#endif
43 44
44static void ps3_show_cpuinfo(struct seq_file *m) 45#if !defined(CONFIG_SMP)
46static void smp_send_stop(void) {}
47#endif
48
49int ps3_get_firmware_version(union ps3_firmware_version *v)
45{ 50{
46 seq_printf(m, "machine\t\t: %s\n", ppc_md.name); 51 int result = lv1_get_version_info(&v->raw);
52
53 if (result) {
54 v->raw = 0;
55 return -1;
56 }
57
58 return result;
47} 59}
60EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
48 61
49static void ps3_power_save(void) 62static void ps3_power_save(void)
50{ 63{
@@ -57,25 +70,84 @@ static void ps3_power_save(void)
57 lv1_pause(0); 70 lv1_pause(0);
58} 71}
59 72
73static void ps3_restart(char *cmd)
74{
75 DBG("%s:%d cmd '%s'\n", __func__, __LINE__, cmd);
76
77 smp_send_stop();
78 ps3_sys_manager_restart(); /* never returns */
79}
80
81static void ps3_power_off(void)
82{
83 DBG("%s:%d\n", __func__, __LINE__);
84
85 smp_send_stop();
86 ps3_sys_manager_power_off(); /* never returns */
87}
88
60static void ps3_panic(char *str) 89static void ps3_panic(char *str)
61{ 90{
62 DBG("%s:%d %s\n", __func__, __LINE__, str); 91 DBG("%s:%d %s\n", __func__, __LINE__, str);
63 92
64#ifdef CONFIG_SMP
65 smp_send_stop(); 93 smp_send_stop();
66#endif
67 printk("\n"); 94 printk("\n");
68 printk(" System does not reboot automatically.\n"); 95 printk(" System does not reboot automatically.\n");
69 printk(" Please press POWER button.\n"); 96 printk(" Please press POWER button.\n");
70 printk("\n"); 97 printk("\n");
71 98
72 for (;;) ; 99 while(1);
100}
101
102static void prealloc(struct ps3_prealloc *p)
103{
104 if (!p->size)
105 return;
106
107 p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS));
108 if (!p->address) {
109 printk(KERN_ERR "%s: Cannot allocate %s\n", __FUNCTION__,
110 p->name);
111 return;
112 }
113
114 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
115 p->address);
73} 116}
74 117
118#ifdef CONFIG_FB_PS3
119struct ps3_prealloc ps3fb_videomemory = {
120 .name = "ps3fb videomemory",
121 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
122 .align = 1024*1024 /* the GPU requires 1 MiB alignment */
123};
124#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory)
125
126static int __init early_parse_ps3fb(char *p)
127{
128 if (!p)
129 return 1;
130
131 ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p),
132 ps3fb_videomemory.align);
133 return 0;
134}
135early_param("ps3fb", early_parse_ps3fb);
136#else
137#define prealloc_ps3fb_videomemory() do { } while (0)
138#endif
139
140
75static void __init ps3_setup_arch(void) 141static void __init ps3_setup_arch(void)
76{ 142{
143 union ps3_firmware_version v;
144
77 DBG(" -> %s:%d\n", __func__, __LINE__); 145 DBG(" -> %s:%d\n", __func__, __LINE__);
78 146
147 ps3_get_firmware_version(&v);
148 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor,
149 v.rev);
150
79 ps3_spu_set_platform(); 151 ps3_spu_set_platform();
80 ps3_map_htab(); 152 ps3_map_htab();
81 153
@@ -87,6 +159,7 @@ static void __init ps3_setup_arch(void)
87 conswitchp = &dummy_con; 159 conswitchp = &dummy_con;
88#endif 160#endif
89 161
162 prealloc_ps3fb_videomemory();
90 ppc_md.power_save = ps3_power_save; 163 ppc_md.power_save = ps3_power_save;
91 164
92 DBG(" <- %s:%d\n", __func__, __LINE__); 165 DBG(" <- %s:%d\n", __func__, __LINE__);
@@ -156,7 +229,6 @@ define_machine(ps3) {
156 .name = "PS3", 229 .name = "PS3",
157 .probe = ps3_probe, 230 .probe = ps3_probe,
158 .setup_arch = ps3_setup_arch, 231 .setup_arch = ps3_setup_arch,
159 .show_cpuinfo = ps3_show_cpuinfo,
160 .init_IRQ = ps3_init_IRQ, 232 .init_IRQ = ps3_init_IRQ,
161 .panic = ps3_panic, 233 .panic = ps3_panic,
162 .get_boot_time = ps3_get_boot_time, 234 .get_boot_time = ps3_get_boot_time,
@@ -164,6 +236,8 @@ define_machine(ps3) {
164 .get_rtc_time = ps3_get_rtc_time, 236 .get_rtc_time = ps3_get_rtc_time,
165 .calibrate_decr = ps3_calibrate_decr, 237 .calibrate_decr = ps3_calibrate_decr,
166 .progress = ps3_progress, 238 .progress = ps3_progress,
239 .restart = ps3_restart,
240 .power_off = ps3_power_off,
167#if defined(CONFIG_KEXEC) 241#if defined(CONFIG_KEXEC)
168 .kexec_cpu_down = ps3_kexec_cpu_down, 242 .kexec_cpu_down = ps3_kexec_cpu_down,
169 .machine_kexec = ps3_machine_kexec, 243 .machine_kexec = ps3_machine_kexec,
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index 11d2080607ed..6fb887961a6d 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -23,7 +23,6 @@
23 23
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27 26
28#include "platform.h" 27#include "platform.h"
29 28
@@ -111,7 +110,7 @@ static void __init ps3_smp_setup_cpu(int cpu)
111 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); 110 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3);
112 111
113 for (i = 0; i < MSG_COUNT; i++) { 112 for (i = 0; i < MSG_COUNT; i++) {
114 result = ps3_alloc_event_irq(&virqs[i]); 113 result = ps3_alloc_event_irq(cpu, &virqs[i]);
115 114
116 if (result) 115 if (result)
117 continue; 116 continue;
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 644532c3b7c4..a397e4e17c13 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -26,9 +26,10 @@
26 26
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/ps3.h>
30#include <asm/lv1call.h> 29#include <asm/lv1call.h>
31 30
31#include "platform.h"
32
32/* spu_management_ops */ 33/* spu_management_ops */
33 34
34/** 35/**
@@ -50,7 +51,7 @@ enum spe_type {
50 */ 51 */
51 52
52struct spe_shadow { 53struct spe_shadow {
53 u8 padding_0000[0x0140]; 54 u8 padding_0140[0x0140];
54 u64 int_status_class0_RW; /* 0x0140 */ 55 u64 int_status_class0_RW; /* 0x0140 */
55 u64 int_status_class1_RW; /* 0x0148 */ 56 u64 int_status_class1_RW; /* 0x0148 */
56 u64 int_status_class2_RW; /* 0x0150 */ 57 u64 int_status_class2_RW; /* 0x0150 */
@@ -67,8 +68,7 @@ struct spe_shadow {
67 u8 padding_0c08[0x0f00-0x0c08]; 68 u8 padding_0c08[0x0f00-0x0c08];
68 u64 spe_execution_status; /* 0x0f00 */ 69 u64 spe_execution_status; /* 0x0f00 */
69 u8 padding_0f08[0x1000-0x0f08]; 70 u8 padding_0f08[0x1000-0x0f08];
70} __attribute__ ((packed)); 71};
71
72 72
73/** 73/**
74 * enum spe_ex_state - Logical spe execution state. 74 * enum spe_ex_state - Logical spe execution state.
@@ -170,31 +170,6 @@ static int __init construct_spu(struct spu *spu)
170 return result; 170 return result;
171} 171}
172 172
173static int __init add_spu_pages(unsigned long start_addr, unsigned long size)
174{
175 int result;
176 unsigned long start_pfn;
177 unsigned long nr_pages;
178 struct pglist_data *pgdata;
179 struct zone *zone;
180
181 BUG_ON(!mem_init_done);
182
183 start_pfn = start_addr >> PAGE_SHIFT;
184 nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
185
186 pgdata = NODE_DATA(0);
187 zone = pgdata->node_zones;
188
189 result = __add_pages(zone, start_pfn, nr_pages);
190
191 if (result)
192 pr_debug("%s:%d: __add_pages failed: (%d)\n",
193 __func__, __LINE__, result);
194
195 return result;
196}
197
198static void spu_unmap(struct spu *spu) 173static void spu_unmap(struct spu *spu)
199{ 174{
200 iounmap(spu->priv2); 175 iounmap(spu->priv2);
@@ -206,19 +181,6 @@ static void spu_unmap(struct spu *spu)
206static int __init setup_areas(struct spu *spu) 181static int __init setup_areas(struct spu *spu)
207{ 182{
208 struct table {char* name; unsigned long addr; unsigned long size;}; 183 struct table {char* name; unsigned long addr; unsigned long size;};
209 int result;
210
211 /* setup pages */
212
213 result = add_spu_pages(spu->local_store_phys, LS_SIZE);
214 if (result)
215 goto fail_add;
216
217 result = add_spu_pages(spu->problem_phys, sizeof(struct spu_problem));
218 if (result)
219 goto fail_add;
220
221 /* ioremap */
222 184
223 spu_pdata(spu)->shadow = __ioremap( 185 spu_pdata(spu)->shadow = __ioremap(
224 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), 186 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),
@@ -260,28 +222,28 @@ static int __init setup_areas(struct spu *spu)
260 222
261fail_ioremap: 223fail_ioremap:
262 spu_unmap(spu); 224 spu_unmap(spu);
263fail_add: 225
264 return result; 226 return -ENOMEM;
265} 227}
266 228
267static int __init setup_interrupts(struct spu *spu) 229static int __init setup_interrupts(struct spu *spu)
268{ 230{
269 int result; 231 int result;
270 232
271 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 0, 233 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
272 &spu->irqs[0]); 234 0, &spu->irqs[0]);
273 235
274 if (result) 236 if (result)
275 goto fail_alloc_0; 237 goto fail_alloc_0;
276 238
277 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 1, 239 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
278 &spu->irqs[1]); 240 1, &spu->irqs[1]);
279 241
280 if (result) 242 if (result)
281 goto fail_alloc_1; 243 goto fail_alloc_1;
282 244
283 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 2, 245 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
284 &spu->irqs[2]); 246 2, &spu->irqs[2]);
285 247
286 if (result) 248 if (result)
287 goto fail_alloc_2; 249 goto fail_alloc_2;
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
new file mode 100644
index 000000000000..a9f7e4a39a2a
--- /dev/null
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -0,0 +1,384 @@
1/*
2 * PS3 system bus driver.
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/dma-mapping.h>
25#include <linux/err.h>
26
27#include <asm/udbg.h>
28#include <asm/lv1call.h>
29#include <asm/firmware.h>
30
31#include "platform.h"
32
33#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
34static void _dump_mmio_region(const struct ps3_mmio_region* r,
35 const char* func, int line)
36{
37 pr_debug("%s:%d: dev %u:%u\n", func, line, r->did.bus_id,
38 r->did.dev_id);
39 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
40 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
41 pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr);
42}
43
44int ps3_mmio_region_create(struct ps3_mmio_region *r)
45{
46 int result;
47
48 result = lv1_map_device_mmio_region(r->did.bus_id, r->did.dev_id,
49 r->bus_addr, r->len, r->page_size, &r->lpar_addr);
50
51 if (result) {
52 pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n",
53 __func__, __LINE__, ps3_result(result));
54 r->lpar_addr = 0;
55 }
56
57 dump_mmio_region(r);
58 return result;
59}
60EXPORT_SYMBOL_GPL(ps3_mmio_region_create);
61
62int ps3_free_mmio_region(struct ps3_mmio_region *r)
63{
64 int result;
65
66 result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id,
67 r->lpar_addr);
68
69 if (result)
70 pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n",
71 __func__, __LINE__, ps3_result(result));
72
73 r->lpar_addr = 0;
74 return result;
75}
76EXPORT_SYMBOL_GPL(ps3_free_mmio_region);
77
78static int ps3_system_bus_match(struct device *_dev,
79 struct device_driver *_drv)
80{
81 int result;
82 struct ps3_system_bus_driver *drv = to_ps3_system_bus_driver(_drv);
83 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
84
85 result = dev->match_id == drv->match_id;
86
87 pr_info("%s:%d: dev=%u(%s), drv=%u(%s): %s\n", __func__, __LINE__,
88 dev->match_id, dev->core.bus_id, drv->match_id, drv->core.name,
89 (result ? "match" : "miss"));
90 return result;
91}
92
93static int ps3_system_bus_probe(struct device *_dev)
94{
95 int result;
96 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
97 struct ps3_system_bus_driver *drv =
98 to_ps3_system_bus_driver(_dev->driver);
99
100 result = lv1_open_device(dev->did.bus_id, dev->did.dev_id, 0);
101
102 if (result) {
103 pr_debug("%s:%d: lv1_open_device failed (%d)\n",
104 __func__, __LINE__, result);
105 result = -EACCES;
106 goto clean_none;
107 }
108
109 if (dev->d_region->did.bus_id) {
110 result = ps3_dma_region_create(dev->d_region);
111
112 if (result) {
113 pr_debug("%s:%d: ps3_dma_region_create failed (%d)\n",
114 __func__, __LINE__, result);
115 BUG_ON("check region type");
116 result = -EINVAL;
117 goto clean_device;
118 }
119 }
120
121 BUG_ON(!drv);
122
123 if (drv->probe)
124 result = drv->probe(dev);
125 else
126 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__,
127 dev->core.bus_id);
128
129 if (result) {
130 pr_debug("%s:%d: drv->probe failed\n", __func__, __LINE__);
131 goto clean_dma;
132 }
133
134 return result;
135
136clean_dma:
137 ps3_dma_region_free(dev->d_region);
138clean_device:
139 lv1_close_device(dev->did.bus_id, dev->did.dev_id);
140clean_none:
141 return result;
142}
143
144static int ps3_system_bus_remove(struct device *_dev)
145{
146 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
147 struct ps3_system_bus_driver *drv =
148 to_ps3_system_bus_driver(_dev->driver);
149
150 if (drv->remove)
151 drv->remove(dev);
152 else
153 pr_info("%s:%d: %s no remove method\n", __func__, __LINE__,
154 dev->core.bus_id);
155
156 ps3_dma_region_free(dev->d_region);
157 ps3_free_mmio_region(dev->m_region);
158 lv1_close_device(dev->did.bus_id, dev->did.dev_id);
159
160 return 0;
161}
162
163struct bus_type ps3_system_bus_type = {
164 .name = "ps3_system_bus",
165 .match = ps3_system_bus_match,
166 .probe = ps3_system_bus_probe,
167 .remove = ps3_system_bus_remove,
168};
169
170int __init ps3_system_bus_init(void)
171{
172 int result;
173
174 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
175 return 0;
176
177 result = bus_register(&ps3_system_bus_type);
178 BUG_ON(result);
179 return result;
180}
181
182core_initcall(ps3_system_bus_init);
183
184/* Allocates a contiguous real buffer and creates mappings over it.
185 * Returns the virtual address of the buffer and sets dma_handle
186 * to the dma address (mapping) of the first page.
187 */
188
189static void * ps3_alloc_coherent(struct device *_dev, size_t size,
190 dma_addr_t *dma_handle, gfp_t flag)
191{
192 int result;
193 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
194 unsigned long virt_addr;
195
196 BUG_ON(!dev->d_region->bus_addr);
197
198 flag &= ~(__GFP_DMA | __GFP_HIGHMEM);
199 flag |= __GFP_ZERO;
200
201 virt_addr = __get_free_pages(flag, get_order(size));
202
203 if (!virt_addr) {
204 pr_debug("%s:%d: get_free_pages failed\n", __func__, __LINE__);
205 goto clean_none;
206 }
207
208 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle);
209
210 if (result) {
211 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
212 __func__, __LINE__, result);
213 BUG_ON("check region type");
214 goto clean_alloc;
215 }
216
217 return (void*)virt_addr;
218
219clean_alloc:
220 free_pages(virt_addr, get_order(size));
221clean_none:
222 dma_handle = NULL;
223 return NULL;
224}
225
226static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
227 dma_addr_t dma_handle)
228{
229 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
230
231 ps3_dma_unmap(dev->d_region, dma_handle, size);
232 free_pages((unsigned long)vaddr, get_order(size));
233}
234
235/* Creates TCEs for a user provided buffer. The user buffer must be
236 * contiguous real kernel storage (not vmalloc). The address of the buffer
237 * passed here is the kernel (virtual) address of the buffer. The buffer
238 * need not be page aligned, the dma_addr_t returned will point to the same
239 * byte within the page as vaddr.
240 */
241
242static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size,
243 enum dma_data_direction direction)
244{
245 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
246 int result;
247 unsigned long bus_addr;
248
249 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
250 &bus_addr);
251
252 if (result) {
253 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
254 __func__, __LINE__, result);
255 }
256
257 return bus_addr;
258}
259
260static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
261 size_t size, enum dma_data_direction direction)
262{
263 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
264 int result;
265
266 result = ps3_dma_unmap(dev->d_region, dma_addr, size);
267
268 if (result) {
269 pr_debug("%s:%d: ps3_dma_unmap failed (%d)\n",
270 __func__, __LINE__, result);
271 }
272}
273
274static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
275 enum dma_data_direction direction)
276{
277 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
278 int i;
279
280#if defined(CONFIG_PS3_DYNAMIC_DMA)
281 BUG_ON("do");
282 return -EPERM;
283#else
284 for (i = 0; i < nents; i++, sg++) {
285 int result = ps3_dma_map(dev->d_region,
286 page_to_phys(sg->page) + sg->offset, sg->length,
287 &sg->dma_address);
288
289 if (result) {
290 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
291 __func__, __LINE__, result);
292 return -EINVAL;
293 }
294
295 sg->dma_length = sg->length;
296 }
297
298 return nents;
299#endif
300}
301
302static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg,
303 int nents, enum dma_data_direction direction)
304{
305#if defined(CONFIG_PS3_DYNAMIC_DMA)
306 BUG_ON("do");
307#endif
308}
309
310static int ps3_dma_supported(struct device *_dev, u64 mask)
311{
312 return mask >= DMA_32BIT_MASK;
313}
314
315static struct dma_mapping_ops ps3_dma_ops = {
316 .alloc_coherent = ps3_alloc_coherent,
317 .free_coherent = ps3_free_coherent,
318 .map_single = ps3_map_single,
319 .unmap_single = ps3_unmap_single,
320 .map_sg = ps3_map_sg,
321 .unmap_sg = ps3_unmap_sg,
322 .dma_supported = ps3_dma_supported
323};
324
325/**
326 * ps3_system_bus_release_device - remove a device from the system bus
327 */
328
329static void ps3_system_bus_release_device(struct device *_dev)
330{
331 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
332 kfree(dev);
333}
334
335/**
336 * ps3_system_bus_device_register - add a device to the system bus
337 *
338 * ps3_system_bus_device_register() expects the dev object to be allocated
339 * dynamically by the caller. The system bus takes ownership of the dev
340 * object and frees the object in ps3_system_bus_release_device().
341 */
342
343int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
344{
345 int result;
346 static unsigned int dev_count = 1;
347
348 dev->core.parent = NULL;
349 dev->core.bus = &ps3_system_bus_type;
350 dev->core.release = ps3_system_bus_release_device;
351
352 dev->core.archdata.of_node = NULL;
353 dev->core.archdata.dma_ops = &ps3_dma_ops;
354 dev->core.archdata.numa_node = 0;
355
356 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), "sb_%02x",
357 dev_count++);
358
359 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id);
360
361 result = device_register(&dev->core);
362 return result;
363}
364
365EXPORT_SYMBOL_GPL(ps3_system_bus_device_register);
366
367int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv)
368{
369 int result;
370
371 drv->core.bus = &ps3_system_bus_type;
372
373 result = driver_register(&drv->core);
374 return result;
375}
376
377EXPORT_SYMBOL_GPL(ps3_system_bus_driver_register);
378
379void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv)
380{
381 driver_unregister(&drv->core);
382}
383
384EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister);
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 69590fbf83da..2dfd05095a25 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -4,11 +4,12 @@ endif
4 4
5obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ 5obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \
6 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ 6 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
7 firmware.o 7 firmware.o power.o
8obj-$(CONFIG_SMP) += smp.o 8obj-$(CONFIG_SMP) += smp.o
9obj-$(CONFIG_XICS) += xics.o 9obj-$(CONFIG_XICS) += xics.o
10obj-$(CONFIG_SCANLOG) += scanlog.o 10obj-$(CONFIG_SCANLOG) += scanlog.o
11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o 11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o
12obj-$(CONFIG_KEXEC) += kexec.o
12 13
13obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o 14obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
14 15
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index da6e5362e7cd..6cedbc002e0f 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -747,6 +747,7 @@ struct eeh_early_enable_info {
747/* Enable eeh for the given device node. */ 747/* Enable eeh for the given device node. */
748static void *early_enable_eeh(struct device_node *dn, void *data) 748static void *early_enable_eeh(struct device_node *dn, void *data)
749{ 749{
750 unsigned int rets[3];
750 struct eeh_early_enable_info *info = data; 751 struct eeh_early_enable_info *info = data;
751 int ret; 752 int ret;
752 const char *status = get_property(dn, "status", NULL); 753 const char *status = get_property(dn, "status", NULL);
@@ -803,16 +804,14 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
803 regs[0], info->buid_hi, info->buid_lo, 804 regs[0], info->buid_hi, info->buid_lo,
804 EEH_ENABLE); 805 EEH_ENABLE);
805 806
807 enable = 0;
806 if (ret == 0) { 808 if (ret == 0) {
807 eeh_subsystem_enabled = 1;
808 pdn->eeh_mode |= EEH_MODE_SUPPORTED;
809 pdn->eeh_config_addr = regs[0]; 809 pdn->eeh_config_addr = regs[0];
810 810
811 /* If the newer, better, ibm,get-config-addr-info is supported, 811 /* If the newer, better, ibm,get-config-addr-info is supported,
812 * then use that instead. */ 812 * then use that instead. */
813 pdn->eeh_pe_config_addr = 0; 813 pdn->eeh_pe_config_addr = 0;
814 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) { 814 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) {
815 unsigned int rets[2];
816 ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets, 815 ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets,
817 pdn->eeh_config_addr, 816 pdn->eeh_config_addr,
818 info->buid_hi, info->buid_lo, 817 info->buid_hi, info->buid_lo,
@@ -820,6 +819,20 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
820 if (ret == 0) 819 if (ret == 0)
821 pdn->eeh_pe_config_addr = rets[0]; 820 pdn->eeh_pe_config_addr = rets[0];
822 } 821 }
822
823 /* Some older systems (Power4) allow the
824 * ibm,set-eeh-option call to succeed even on nodes
825 * where EEH is not supported. Verify support
826 * explicitly. */
827 ret = read_slot_reset_state(pdn, rets);
828 if ((ret == 0) && (rets[1] == 1))
829 enable = 1;
830 }
831
832 if (enable) {
833 eeh_subsystem_enabled = 1;
834 pdn->eeh_mode |= EEH_MODE_SUPPORTED;
835
823#ifdef DEBUG 836#ifdef DEBUG
824 printk(KERN_DEBUG "EEH: %s: eeh enabled, config=%x pe_config=%x\n", 837 printk(KERN_DEBUG "EEH: %s: eeh enabled, config=%x pe_config=%x\n",
825 dn->full_name, pdn->eeh_config_addr, pdn->eeh_pe_config_addr); 838 dn->full_name, pdn->eeh_config_addr, pdn->eeh_pe_config_addr);
@@ -1065,7 +1078,7 @@ static int proc_eeh_open(struct inode *inode, struct file *file)
1065 return single_open(file, proc_eeh_show, NULL); 1078 return single_open(file, proc_eeh_show, NULL);
1066} 1079}
1067 1080
1068static struct file_operations proc_eeh_operations = { 1081static const struct file_operations proc_eeh_operations = {
1069 .open = proc_eeh_open, 1082 .open = proc_eeh_open,
1070 .read = seq_read, 1083 .read = seq_read,
1071 .llseek = seq_lseek, 1084 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index cbd6b0711ab4..a4c0bf84ef2e 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -446,7 +446,8 @@ excess_failures:
446 */ 446 */
447 printk(KERN_ERR 447 printk(KERN_ERR
448 "EEH: PCI device at location=%s driver=%s pci addr=%s \n" 448 "EEH: PCI device at location=%s driver=%s pci addr=%s \n"
449 "has failed %d times and has been permanently disabled. \n" 449 "has failed %d times in the last hour "
450 "and has been permanently disabled. \n"
450 "Please try reseating this device or replacing it.\n", 451 "Please try reseating this device or replacing it.\n",
451 location, drv_str, pci_str, frozen_pdn->eeh_freeze_count); 452 location, drv_str, pci_str, frozen_pdn->eeh_freeze_count);
452 goto perm_error; 453 goto perm_error;
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 1c7b2baa5f73..90522e3c9d46 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -59,6 +59,7 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = {
59 {FW_FEATURE_XDABR, "hcall-xdabr"}, 59 {FW_FEATURE_XDABR, "hcall-xdabr"},
60 {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, 60 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
61 {FW_FEATURE_SPLPAR, "hcall-splpar"}, 61 {FW_FEATURE_SPLPAR, "hcall-splpar"},
62 {FW_FEATURE_BULK_REMOVE, "hcall-bulk"},
62}; 63};
63 64
64/* Build up the firmware features bitmask using the contents of 65/* Build up the firmware features bitmask using the contents of
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h
deleted file mode 100644
index 714f56f55362..000000000000
--- a/arch/powerpc/platforms/pseries/firmware.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * Copyright 2006 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#ifndef _PSERIES_FIRMWARE_H
11#define _PSERIES_FIRMWARE_H
12
13#include <asm/firmware.h>
14
15extern void __init fw_feature_init(void);
16
17#endif /* _PSERIES_FIRMWARE_H */
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index 3ddc04925d50..eae51ef9af24 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -90,7 +90,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
90 return rc; 90 return rc;
91} 91}
92 92
93static struct file_operations hcall_inst_seq_fops = { 93static const struct file_operations hcall_inst_seq_fops = {
94 .open = hcall_inst_seq_open, 94 .open = hcall_inst_seq_open,
95 .read = seq_read, 95 .read = seq_read,
96 .llseek = seq_lseek, 96 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
new file mode 100644
index 000000000000..af2685607458
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -0,0 +1,72 @@
1/*
2 * Copyright 2006 Michael Ellerman, IBM Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#include <asm/machdep.h>
11#include <asm/page.h>
12#include <asm/firmware.h>
13#include <asm/kexec.h>
14#include <asm/mpic.h>
15
16#include "pseries.h"
17#include "xics.h"
18#include "plpar_wrappers.h"
19
20static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
21{
22 /* Don't risk a hypervisor call if we're crashing */
23 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
24 unsigned long addr;
25
26 addr = __pa(get_slb_shadow());
27 if (unregister_slb_shadow(hard_smp_processor_id(), addr))
28 printk("SLB shadow buffer deregistration of "
29 "cpu %u (hw_cpu_id %d) failed\n",
30 smp_processor_id(),
31 hard_smp_processor_id());
32
33 addr = __pa(get_lppaca());
34 if (unregister_vpa(hard_smp_processor_id(), addr)) {
35 printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
36 "failed\n", smp_processor_id(),
37 hard_smp_processor_id());
38 }
39 }
40}
41
42static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
43{
44 pseries_kexec_cpu_down(crash_shutdown, secondary);
45 mpic_teardown_this_cpu(secondary);
46}
47
48void __init setup_kexec_cpu_down_mpic(void)
49{
50 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
51}
52
53static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
54{
55 pseries_kexec_cpu_down(crash_shutdown, secondary);
56 xics_teardown_cpu(secondary);
57}
58
59void __init setup_kexec_cpu_down_xics(void)
60{
61 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
62}
63
64static int __init pseries_kexec_setup(void)
65{
66 ppc_md.machine_kexec = default_machine_kexec;
67 ppc_md.machine_kexec_prepare = default_machine_kexec_prepare;
68 ppc_md.machine_crash_shutdown = default_machine_crash_shutdown;
69
70 return 0;
71}
72__initcall(pseries_kexec_setup);
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 721436db3ef0..7496005566ef 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -502,23 +502,70 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
502 BUG_ON(lpar_rc != H_SUCCESS); 502 BUG_ON(lpar_rc != H_SUCCESS);
503} 503}
504 504
505/* Flag bits for H_BULK_REMOVE */
506#define HBR_REQUEST 0x4000000000000000UL
507#define HBR_RESPONSE 0x8000000000000000UL
508#define HBR_END 0xc000000000000000UL
509#define HBR_AVPN 0x0200000000000000UL
510#define HBR_ANDCOND 0x0100000000000000UL
511
505/* 512/*
506 * Take a spinlock around flushes to avoid bouncing the hypervisor tlbie 513 * Take a spinlock around flushes to avoid bouncing the hypervisor tlbie
507 * lock. 514 * lock.
508 */ 515 */
509static void pSeries_lpar_flush_hash_range(unsigned long number, int local) 516static void pSeries_lpar_flush_hash_range(unsigned long number, int local)
510{ 517{
511 int i; 518 unsigned long i, pix, rc;
512 unsigned long flags = 0; 519 unsigned long flags = 0;
513 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); 520 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
514 int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); 521 int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE);
522 unsigned long param[9];
523 unsigned long va;
524 unsigned long hash, index, shift, hidx, slot;
525 real_pte_t pte;
526 int psize;
515 527
516 if (lock_tlbie) 528 if (lock_tlbie)
517 spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); 529 spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags);
518 530
519 for (i = 0; i < number; i++) 531 psize = batch->psize;
520 flush_hash_page(batch->vaddr[i], batch->pte[i], 532 pix = 0;
521 batch->psize, local); 533 for (i = 0; i < number; i++) {
534 va = batch->vaddr[i];
535 pte = batch->pte[i];
536 pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
537 hash = hpt_hash(va, shift);
538 hidx = __rpte_to_hidx(pte, index);
539 if (hidx & _PTEIDX_SECONDARY)
540 hash = ~hash;
541 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
542 slot += hidx & _PTEIDX_GROUP_IX;
543 if (!firmware_has_feature(FW_FEATURE_BULK_REMOVE)) {
544 pSeries_lpar_hpte_invalidate(slot, va, psize,
545 local);
546 } else {
547 param[pix] = HBR_REQUEST | HBR_AVPN | slot;
548 param[pix+1] = hpte_encode_v(va, psize) &
549 HPTE_V_AVPN;
550 pix += 2;
551 if (pix == 8) {
552 rc = plpar_hcall9(H_BULK_REMOVE, param,
553 param[0], param[1], param[2],
554 param[3], param[4], param[5],
555 param[6], param[7]);
556 BUG_ON(rc != H_SUCCESS);
557 pix = 0;
558 }
559 }
560 } pte_iterate_hashed_end();
561 }
562 if (pix) {
563 param[pix] = HBR_END;
564 rc = plpar_hcall9(H_BULK_REMOVE, param, param[0], param[1],
565 param[2], param[3], param[4], param[5],
566 param[6], param[7]);
567 BUG_ON(rc != H_SUCCESS);
568 }
522 569
523 if (lock_tlbie) 570 if (lock_tlbie)
524 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); 571 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 715db5c89908..fa59124ce3fe 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -77,7 +77,7 @@ void __init pSeries_final_fixup(void)
77 77
78/* 78/*
79 * Assume the winbond 82c105 is the IDE controller on a 79 * Assume the winbond 82c105 is the IDE controller on a
80 * p610. We should probably be more careful in case 80 * p610/p615/p630. We should probably be more careful in case
81 * someone tries to plug in a similar adapter. 81 * someone tries to plug in a similar adapter.
82 */ 82 */
83static void fixup_winbond_82c105(struct pci_dev* dev) 83static void fixup_winbond_82c105(struct pci_dev* dev)
@@ -98,6 +98,10 @@ static void fixup_winbond_82c105(struct pci_dev* dev)
98 if (dev->resource[i].flags & IORESOURCE_IO 98 if (dev->resource[i].flags & IORESOURCE_IO
99 && dev->bus->number == 0 && dev->devfn == 0x81) 99 && dev->bus->number == 0 && dev->devfn == 0x81)
100 dev->resource[i].flags &= ~IORESOURCE_IO; 100 dev->resource[i].flags &= ~IORESOURCE_IO;
101 if (dev->resource[i].start == 0 && dev->resource[i].end) {
102 dev->resource[i].flags = 0;
103 dev->resource[i].end = 0;
104 }
101 } 105 }
102} 106}
103DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, 107DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c
new file mode 100644
index 000000000000..2624b71df73d
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/power.c
@@ -0,0 +1,87 @@
1/*
2 * Interface for power-management for ppc64 compliant platform
3 *
4 * Manish Ahuja <mahuja@us.ibm.com>
5 *
6 * Feb 2007
7 *
8 * Copyright (C) 2007 IBM Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2 of the License.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/kobject.h>
25#include <linux/string.h>
26#include <linux/errno.h>
27#include <linux/init.h>
28
29unsigned long rtas_poweron_auto; /* default and normal state is 0 */
30
31static ssize_t auto_poweron_show(struct subsystem *subsys, char *buf)
32{
33 return sprintf(buf, "%lu\n", rtas_poweron_auto);
34}
35
36static ssize_t
37auto_poweron_store(struct subsystem *subsys, const char *buf, size_t n)
38{
39 int ret;
40 unsigned long ups_restart;
41 ret = sscanf(buf, "%lu", &ups_restart);
42
43 if ((ret == 1) && ((ups_restart == 1) || (ups_restart == 0))){
44 rtas_poweron_auto = ups_restart;
45 return n;
46 }
47 return -EINVAL;
48}
49
50static struct subsys_attribute auto_poweron_attr = {
51 .attr = {
52 .name = __stringify(auto_poweron),
53 .mode = 0644,
54 },
55 .show = auto_poweron_show,
56 .store = auto_poweron_store,
57};
58
59#ifndef CONFIG_PM
60decl_subsys(power,NULL,NULL);
61
62static struct attribute *g[] = {
63 &auto_poweron_attr.attr,
64 NULL,
65};
66
67static struct attribute_group attr_group = {
68 .attrs = g,
69};
70
71static int __init pm_init(void)
72{
73 int error = subsystem_register(&power_subsys);
74 if (!error)
75 error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group);
76 return error;
77}
78core_initcall(pm_init);
79#else
80extern struct subsystem power_subsys;
81
82static int __init apo_pm_init(void)
83{
84 return (subsys_create_file(&power_subsys, &auto_poweron_attr));
85}
86__initcall(apo_pm_init);
87#endif
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
new file mode 100644
index 000000000000..22bc01989749
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright 2006 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#ifndef _PSERIES_PSERIES_H
11#define _PSERIES_PSERIES_H
12
13extern void __init fw_feature_init(void);
14
15struct pt_regs;
16
17extern int pSeries_system_reset_exception(struct pt_regs *regs);
18extern int pSeries_machine_check_exception(struct pt_regs *regs);
19
20#ifdef CONFIG_SMP
21extern void smp_init_pseries_mpic(void);
22extern void smp_init_pseries_xics(void);
23#else
24static inline smp_init_pseries_mpic(void) { };
25static inline smp_init_pseries_xics(void) { };
26#endif
27
28#ifdef CONFIG_KEXEC
29extern void setup_kexec_cpu_down_xics(void);
30extern void setup_kexec_cpu_down_mpic(void);
31#else
32static inline void setup_kexec_cpu_down_xics(void) { }
33static inline void setup_kexec_cpu_down_mpic(void) { }
34#endif
35
36/* Poweron flag used for enabling auto ups restart */
37extern unsigned long rtas_poweron_auto;
38
39#endif /* _PSERIES_PSERIES_H */
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index b1d3d161249e..edc038873113 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -51,7 +51,7 @@
51#include <asm/udbg.h> 51#include <asm/udbg.h>
52#include <asm/firmware.h> 52#include <asm/firmware.h>
53 53
54#include "ras.h" 54#include "pseries.h"
55 55
56static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; 56static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
57static DEFINE_SPINLOCK(ras_log_buf_lock); 57static DEFINE_SPINLOCK(ras_log_buf_lock);
diff --git a/arch/powerpc/platforms/pseries/ras.h b/arch/powerpc/platforms/pseries/ras.h
deleted file mode 100644
index 0e66b0da55e2..000000000000
--- a/arch/powerpc/platforms/pseries/ras.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _PSERIES_RAS_H
2#define _PSERIES_RAS_H
3
4struct pt_regs;
5
6extern int pSeries_system_reset_exception(struct pt_regs *regs);
7extern int pSeries_machine_check_exception(struct pt_regs *regs);
8
9#endif /* _PSERIES_RAS_H */
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 4ad33e41b008..5aa97aff3391 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -499,7 +499,7 @@ out:
499 return rv ? rv : count; 499 return rv ? rv : count;
500} 500}
501 501
502static struct file_operations ofdt_fops = { 502static const struct file_operations ofdt_fops = {
503 .write = ofdt_write 503 .write = ofdt_write
504}; 504};
505 505
@@ -513,7 +513,6 @@ static int proc_ppc64_create_ofdt(void)
513 513
514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); 514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL);
515 if (ent) { 515 if (ent) {
516 ent->nlink = 1;
517 ent->data = NULL; 516 ent->data = NULL;
518 ent->size = 0; 517 ent->size = 0;
519 ent->proc_fops = &ofdt_fops; 518 ent->proc_fops = &ofdt_fops;
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 8ca2612221d6..77d0937d5c07 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -331,7 +331,7 @@ static unsigned int rtas_log_poll(struct file *file, poll_table * wait)
331 return 0; 331 return 0;
332} 332}
333 333
334struct file_operations proc_rtas_log_operations = { 334const struct file_operations proc_rtas_log_operations = {
335 .read = rtas_log_read, 335 .read = rtas_log_read,
336 .poll = rtas_log_poll, 336 .poll = rtas_log_poll,
337 .open = rtas_log_open, 337 .open = rtas_log_open,
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 45368a57d7dd..8e1ef168e2dd 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -184,7 +184,7 @@ static int scanlog_release(struct inode * inode, struct file * file)
184 return 0; 184 return 0;
185} 185}
186 186
187struct file_operations scanlog_fops = { 187const struct file_operations scanlog_fops = {
188 .owner = THIS_MODULE, 188 .owner = THIS_MODULE,
189 .read = scanlog_read, 189 .read = scanlog_read,
190 .write = scanlog_write, 190 .write = scanlog_write,
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 042ecae107ac..34aff47b1f55 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -55,7 +55,6 @@
55#include <asm/dma.h> 55#include <asm/dma.h>
56#include <asm/machdep.h> 56#include <asm/machdep.h>
57#include <asm/irq.h> 57#include <asm/irq.h>
58#include <asm/kexec.h>
59#include <asm/time.h> 58#include <asm/time.h>
60#include <asm/nvram.h> 59#include <asm/nvram.h>
61#include "xics.h" 60#include "xics.h"
@@ -65,10 +64,10 @@
65#include <asm/i8259.h> 64#include <asm/i8259.h>
66#include <asm/udbg.h> 65#include <asm/udbg.h>
67#include <asm/smp.h> 66#include <asm/smp.h>
67#include <asm/firmware.h>
68 68
69#include "plpar_wrappers.h" 69#include "plpar_wrappers.h"
70#include "ras.h" 70#include "pseries.h"
71#include "firmware.h"
72 71
73#ifdef DEBUG 72#ifdef DEBUG
74#define DBG(fmt...) udbg_printf(fmt) 73#define DBG(fmt...) udbg_printf(fmt)
@@ -77,8 +76,6 @@
77#endif 76#endif
78 77
79/* move those away to a .h */ 78/* move those away to a .h */
80extern void smp_init_pseries_mpic(void);
81extern void smp_init_pseries_xics(void);
82extern void find_udbg_vterm(void); 79extern void find_udbg_vterm(void);
83 80
84int fwnmi_active; /* TRUE if an FWNMI handler is present */ 81int fwnmi_active; /* TRUE if an FWNMI handler is present */
@@ -221,42 +218,6 @@ static void pseries_lpar_enable_pmcs(void)
221 get_lppaca()->pmcregs_in_use = 1; 218 get_lppaca()->pmcregs_in_use = 1;
222} 219}
223 220
224#ifdef CONFIG_KEXEC
225static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
226{
227 /* Don't risk a hypervisor call if we're crashing */
228 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
229 unsigned long addr;
230
231 addr = __pa(get_slb_shadow());
232 if (unregister_slb_shadow(hard_smp_processor_id(), addr))
233 printk("SLB shadow buffer deregistration of "
234 "cpu %u (hw_cpu_id %d) failed\n",
235 smp_processor_id(),
236 hard_smp_processor_id());
237
238 addr = __pa(get_lppaca());
239 if (unregister_vpa(hard_smp_processor_id(), addr)) {
240 printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
241 "failed\n", smp_processor_id(),
242 hard_smp_processor_id());
243 }
244 }
245}
246
247static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
248{
249 pseries_kexec_cpu_down(crash_shutdown, secondary);
250 mpic_teardown_this_cpu(secondary);
251}
252
253static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
254{
255 pseries_kexec_cpu_down(crash_shutdown, secondary);
256 xics_teardown_cpu(secondary);
257}
258#endif /* CONFIG_KEXEC */
259
260static void __init pseries_discover_pic(void) 221static void __init pseries_discover_pic(void)
261{ 222{
262 struct device_node *np; 223 struct device_node *np;
@@ -269,21 +230,13 @@ static void __init pseries_discover_pic(void)
269 pSeries_mpic_node = of_node_get(np); 230 pSeries_mpic_node = of_node_get(np);
270 ppc_md.init_IRQ = pseries_mpic_init_IRQ; 231 ppc_md.init_IRQ = pseries_mpic_init_IRQ;
271 ppc_md.get_irq = mpic_get_irq; 232 ppc_md.get_irq = mpic_get_irq;
272#ifdef CONFIG_KEXEC 233 setup_kexec_cpu_down_mpic();
273 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
274#endif
275#ifdef CONFIG_SMP
276 smp_init_pseries_mpic(); 234 smp_init_pseries_mpic();
277#endif
278 return; 235 return;
279 } else if (strstr(typep, "ppc-xicp")) { 236 } else if (strstr(typep, "ppc-xicp")) {
280 ppc_md.init_IRQ = xics_init_IRQ; 237 ppc_md.init_IRQ = xics_init_IRQ;
281#ifdef CONFIG_KEXEC 238 setup_kexec_cpu_down_xics();
282 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
283#endif
284#ifdef CONFIG_SMP
285 smp_init_pseries_xics(); 239 smp_init_pseries_xics();
286#endif
287 return; 240 return;
288 } 241 }
289 } 242 }
@@ -533,6 +486,34 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
533 return PCI_PROBE_NORMAL; 486 return PCI_PROBE_NORMAL;
534} 487}
535 488
489/**
490 * pSeries_power_off - tell firmware about how to power off the system.
491 *
492 * This function calls either the power-off rtas token in normal cases
493 * or the ibm,power-off-ups token (if present & requested) in case of
494 * a power failure. If power-off token is used, power on will only be
495 * possible with power button press. If ibm,power-off-ups token is used
496 * it will allow auto poweron after power is restored.
497 */
498void pSeries_power_off(void)
499{
500 int rc;
501 int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups");
502
503 if (rtas_flash_term_hook)
504 rtas_flash_term_hook(SYS_POWER_OFF);
505
506 if (rtas_poweron_auto == 0 ||
507 rtas_poweroff_ups_token == RTAS_UNKNOWN_SERVICE) {
508 rc = rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1);
509 printk(KERN_INFO "RTAS power-off returned %d\n", rc);
510 } else {
511 rc = rtas_call(rtas_poweroff_ups_token, 0, 1, NULL);
512 printk(KERN_INFO "RTAS ibm,power-off-ups returned %d\n", rc);
513 }
514 for (;;);
515}
516
536define_machine(pseries) { 517define_machine(pseries) {
537 .name = "pSeries", 518 .name = "pSeries",
538 .probe = pSeries_probe, 519 .probe = pSeries_probe,
@@ -543,7 +524,7 @@ define_machine(pseries) {
543 .pcibios_fixup = pSeries_final_fixup, 524 .pcibios_fixup = pSeries_final_fixup,
544 .pci_probe_mode = pSeries_pci_probe_mode, 525 .pci_probe_mode = pSeries_pci_probe_mode,
545 .restart = rtas_restart, 526 .restart = rtas_restart,
546 .power_off = rtas_power_off, 527 .power_off = pSeries_power_off,
547 .halt = rtas_halt, 528 .halt = rtas_halt,
548 .panic = rtas_os_term, 529 .panic = rtas_os_term,
549 .get_boot_time = rtas_get_boot_time, 530 .get_boot_time = rtas_get_boot_time,
@@ -554,9 +535,4 @@ define_machine(pseries) {
554 .check_legacy_ioport = pSeries_check_legacy_ioport, 535 .check_legacy_ioport = pSeries_check_legacy_ioport,
555 .system_reset_exception = pSeries_system_reset_exception, 536 .system_reset_exception = pSeries_system_reset_exception,
556 .machine_check_exception = pSeries_machine_check_exception, 537 .machine_check_exception = pSeries_machine_check_exception,
557#ifdef CONFIG_KEXEC
558 .machine_kexec = default_machine_kexec,
559 .machine_kexec_prepare = default_machine_kexec_prepare,
560 .machine_crash_shutdown = default_machine_crash_shutdown,
561#endif
562}; 538};
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 4408518eaebe..116305b22a2b 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -48,6 +48,7 @@
48#include <asm/vdso_datapage.h> 48#include <asm/vdso_datapage.h>
49 49
50#include "plpar_wrappers.h" 50#include "plpar_wrappers.h"
51#include "pseries.h"
51 52
52#ifdef DEBUG 53#ifdef DEBUG
53#include <asm/udbg.h> 54#include <asm/udbg.h>
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 2621a7e72d2d..26ca3ffbc1de 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
7obj-$(CONFIG_PPC_MPC106) += grackle.o 7obj-$(CONFIG_PPC_MPC106) += grackle.o
8obj-$(CONFIG_PPC_DCR) += dcr.o 8obj-$(CONFIG_PPC_DCR) += dcr.o
9obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o 9obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o
10obj-$(CONFIG_PPC_PMI) += pmi.o
10obj-$(CONFIG_U3_DART) += dart_iommu.o 11obj-$(CONFIG_U3_DART) += dart_iommu.o
11obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
12obj-$(CONFIG_FSL_SOC) += fsl_soc.o 13obj-$(CONFIG_FSL_SOC) += fsl_soc.o
@@ -22,4 +23,6 @@ endif
22ifeq ($(ARCH),powerpc) 23ifeq ($(ARCH),powerpc)
23obj-$(CONFIG_MTD) += rom.o 24obj-$(CONFIG_MTD) += rom.o
24obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o 25obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o
26obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o
27obj-$(CONFIG_UCODE_PATCH) += micropatch.o
25endif 28endif
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
new file mode 100644
index 000000000000..9b4fafd9a840
--- /dev/null
+++ b/arch/powerpc/sysdev/commproc.c
@@ -0,0 +1,398 @@
1/*
2 * General Purpose functions for the global management of the
3 * Communication Processor Module.
4 * Copyright (c) 1997 Dan error_act (dmalek@jlc.net)
5 *
6 * In addition to the individual control of the communication
7 * channels, there are a few functions that globally affect the
8 * communication processor.
9 *
10 * Buffer descriptors must be allocated from the dual ported memory
11 * space. The allocator for that is here. When the communication
12 * process is reset, we reclaim the memory available. There is
13 * currently no deallocator for this memory.
14 * The amount of space available is platform dependent. On the
15 * MBX, the EPPC software loads additional microcode into the
16 * communication processor, and uses some of the DP ram for this
17 * purpose. Current, the first 512 bytes and the last 256 bytes of
18 * memory are used. Right now I am conservative and only use the
19 * memory that can never be used for microcode. If there are
20 * applications that require more DP ram, we can expand the boundaries
21 * but then we have to be careful of any downloaded microcode.
22 */
23#include <linux/errno.h>
24#include <linux/sched.h>
25#include <linux/kernel.h>
26#include <linux/dma-mapping.h>
27#include <linux/param.h>
28#include <linux/string.h>
29#include <linux/mm.h>
30#include <linux/interrupt.h>
31#include <linux/irq.h>
32#include <linux/module.h>
33#include <asm/mpc8xx.h>
34#include <asm/page.h>
35#include <asm/pgtable.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/io.h>
39#include <asm/tlbflush.h>
40#include <asm/rheap.h>
41#include <asm/prom.h>
42
43#include <asm/fs_pd.h>
44
45#define CPM_MAP_SIZE (0x4000)
46
47static void m8xx_cpm_dpinit(void);
48static uint host_buffer; /* One page of host buffer */
49static uint host_end; /* end + 1 */
50cpm8xx_t *cpmp; /* Pointer to comm processor space */
51cpic8xx_t *cpic_reg;
52
53static struct device_node *cpm_pic_node;
54static struct irq_host *cpm_pic_host;
55
56static void cpm_mask_irq(unsigned int irq)
57{
58 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
59
60 clrbits32(&cpic_reg->cpic_cimr, (1 << cpm_vec));
61}
62
63static void cpm_unmask_irq(unsigned int irq)
64{
65 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
66
67 setbits32(&cpic_reg->cpic_cimr, (1 << cpm_vec));
68}
69
70static void cpm_end_irq(unsigned int irq)
71{
72 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
73
74 out_be32(&cpic_reg->cpic_cisr, (1 << cpm_vec));
75}
76
77static struct irq_chip cpm_pic = {
78 .typename = " CPM PIC ",
79 .mask = cpm_mask_irq,
80 .unmask = cpm_unmask_irq,
81 .eoi = cpm_end_irq,
82};
83
84int cpm_get_irq(void)
85{
86 int cpm_vec;
87
88 /* Get the vector by setting the ACK bit and then reading
89 * the register.
90 */
91 out_be16(&cpic_reg->cpic_civr, 1);
92 cpm_vec = in_be16(&cpic_reg->cpic_civr);
93 cpm_vec >>= 11;
94
95 return irq_linear_revmap(cpm_pic_host, cpm_vec);
96}
97
98static int cpm_pic_host_match(struct irq_host *h, struct device_node *node)
99{
100 return cpm_pic_node == node;
101}
102
103static int cpm_pic_host_map(struct irq_host *h, unsigned int virq,
104 irq_hw_number_t hw)
105{
106 pr_debug("cpm_pic_host_map(%d, 0x%lx)\n", virq, hw);
107
108 get_irq_desc(virq)->status |= IRQ_LEVEL;
109 set_irq_chip_and_handler(virq, &cpm_pic, handle_fasteoi_irq);
110 return 0;
111}
112
113/* The CPM can generate the error interrupt when there is a race condition
114 * between generating and masking interrupts. All we have to do is ACK it
115 * and return. This is a no-op function so we don't need any special
116 * tests in the interrupt handler.
117 */
118static irqreturn_t cpm_error_interrupt(int irq, void *dev)
119{
120 return IRQ_HANDLED;
121}
122
123static struct irqaction cpm_error_irqaction = {
124 .handler = cpm_error_interrupt,
125 .mask = CPU_MASK_NONE,
126 .name = "error",
127};
128
129static struct irq_host_ops cpm_pic_host_ops = {
130 .match = cpm_pic_host_match,
131 .map = cpm_pic_host_map,
132};
133
134unsigned int cpm_pic_init(void)
135{
136 struct device_node *np = NULL;
137 struct resource res;
138 unsigned int sirq = NO_IRQ, hwirq, eirq;
139 int ret;
140
141 pr_debug("cpm_pic_init\n");
142
143 np = of_find_compatible_node(NULL, "cpm-pic", "CPM");
144 if (np == NULL) {
145 printk(KERN_ERR "CPM PIC init: can not find cpm-pic node\n");
146 return sirq;
147 }
148 ret = of_address_to_resource(np, 0, &res);
149 if (ret)
150 goto end;
151
152 cpic_reg = (void *)ioremap(res.start, res.end - res.start + 1);
153 if (cpic_reg == NULL)
154 goto end;
155
156 sirq = irq_of_parse_and_map(np, 0);
157 if (sirq == NO_IRQ)
158 goto end;
159
160 /* Initialize the CPM interrupt controller. */
161 hwirq = (unsigned int)irq_map[sirq].hwirq;
162 out_be32(&cpic_reg->cpic_cicr,
163 (CICR_SCD_SCC4 | CICR_SCC_SCC3 | CICR_SCB_SCC2 | CICR_SCA_SCC1) |
164 ((hwirq/2) << 13) | CICR_HP_MASK);
165
166 out_be32(&cpic_reg->cpic_cimr, 0);
167
168 cpm_pic_node = of_node_get(np);
169
170 cpm_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm_pic_host_ops, 64);
171 if (cpm_pic_host == NULL) {
172 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
173 sirq = NO_IRQ;
174 goto end;
175 }
176 of_node_put(np);
177
178 /* Install our own error handler. */
179 np = of_find_node_by_type(NULL, "cpm");
180 if (np == NULL) {
181 printk(KERN_ERR "CPM PIC init: can not find cpm node\n");
182 goto end;
183 }
184 eirq= irq_of_parse_and_map(np, 0);
185 if (eirq == NO_IRQ)
186 goto end;
187
188 if (setup_irq(eirq, &cpm_error_irqaction))
189 printk(KERN_ERR "Could not allocate CPM error IRQ!");
190
191 setbits32(&cpic_reg->cpic_cicr, CICR_IEN);
192
193end:
194 of_node_put(np);
195 return sirq;
196}
197
198void cpm_reset(void)
199{
200 cpm8xx_t *commproc;
201 sysconf8xx_t *siu_conf;
202
203 commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE);
204
205#ifdef CONFIG_UCODE_PATCH
206 /* Perform a reset.
207 */
208 out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG);
209
210 /* Wait for it.
211 */
212 while (in_be16(&commproc->cp_cpcr) & CPM_CR_FLG);
213
214 cpm_load_patch(commproc);
215#endif
216
217 /* Set SDMA Bus Request priority 5.
218 * On 860T, this also enables FEC priority 6. I am not sure
219 * this is what we realy want for some applications, but the
220 * manual recommends it.
221 * Bit 25, FAM can also be set to use FEC aggressive mode (860T).
222 */
223 siu_conf = (sysconf8xx_t*)immr_map(im_siu_conf);
224 out_be32(&siu_conf->sc_sdcr, 1);
225 immr_unmap(siu_conf);
226
227 /* Reclaim the DP memory for our use. */
228 m8xx_cpm_dpinit();
229
230 /* Tell everyone where the comm processor resides.
231 */
232 cpmp = commproc;
233}
234
235/* We used to do this earlier, but have to postpone as long as possible
236 * to ensure the kernel VM is now running.
237 */
238static void
239alloc_host_memory(void)
240{
241 dma_addr_t physaddr;
242
243 /* Set the host page for allocation.
244 */
245 host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
246 GFP_KERNEL);
247 host_end = host_buffer + PAGE_SIZE;
248}
249
250/* We also own one page of host buffer space for the allocation of
251 * UART "fifos" and the like.
252 */
253uint
254m8xx_cpm_hostalloc(uint size)
255{
256 uint retloc;
257
258 if (host_buffer == 0)
259 alloc_host_memory();
260
261 if ((host_buffer + size) >= host_end)
262 return(0);
263
264 retloc = host_buffer;
265 host_buffer += size;
266
267 return(retloc);
268}
269
270/* Set a baud rate generator. This needs lots of work. There are
271 * four BRGs, any of which can be wired to any channel.
272 * The internal baud rate clock is the system clock divided by 16.
273 * This assumes the baudrate is 16x oversampled by the uart.
274 */
275#define BRG_INT_CLK (get_brgfreq())
276#define BRG_UART_CLK (BRG_INT_CLK/16)
277#define BRG_UART_CLK_DIV16 (BRG_UART_CLK/16)
278
279void
280cpm_setbrg(uint brg, uint rate)
281{
282 volatile uint *bp;
283
284 /* This is good enough to get SMCs running.....
285 */
286 bp = (uint *)&cpmp->cp_brgc1;
287 bp += brg;
288 /* The BRG has a 12-bit counter. For really slow baud rates (or
289 * really fast processors), we may have to further divide by 16.
290 */
291 if (((BRG_UART_CLK / rate) - 1) < 4096)
292 *bp = (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN;
293 else
294 *bp = (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
295 CPM_BRG_EN | CPM_BRG_DIV16;
296}
297
298/*
299 * dpalloc / dpfree bits.
300 */
301static spinlock_t cpm_dpmem_lock;
302/*
303 * 16 blocks should be enough to satisfy all requests
304 * until the memory subsystem goes up...
305 */
306static rh_block_t cpm_boot_dpmem_rh_block[16];
307static rh_info_t cpm_dpmem_info;
308
309#define CPM_DPMEM_ALIGNMENT 8
310static u8* dpram_vbase;
311static uint dpram_pbase;
312
313void m8xx_cpm_dpinit(void)
314{
315 spin_lock_init(&cpm_dpmem_lock);
316
317 dpram_vbase = immr_map_size(im_cpm.cp_dpmem, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE);
318 dpram_pbase = (uint)&((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem;
319
320 /* Initialize the info header */
321 rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
322 sizeof(cpm_boot_dpmem_rh_block) /
323 sizeof(cpm_boot_dpmem_rh_block[0]),
324 cpm_boot_dpmem_rh_block);
325
326 /*
327 * Attach the usable dpmem area.
328 * XXX: This is actually crap. CPM_DATAONLY_BASE and
329 * CPM_DATAONLY_SIZE are a subset of the available dparm. It varies
330 * with the processor and the microcode patches applied / activated.
331 * But the following should be at least safe.
332 */
333 rh_attach_region(&cpm_dpmem_info, (void *)CPM_DATAONLY_BASE, CPM_DATAONLY_SIZE);
334}
335
336/*
337 * Allocate the requested size worth of DP memory.
338 * This function returns an offset into the DPRAM area.
339 * Use cpm_dpram_addr() to get the virtual address of the area.
340 */
341uint cpm_dpalloc(uint size, uint align)
342{
343 void *start;
344 unsigned long flags;
345
346 spin_lock_irqsave(&cpm_dpmem_lock, flags);
347 cpm_dpmem_info.alignment = align;
348 start = rh_alloc(&cpm_dpmem_info, size, "commproc");
349 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
350
351 return (uint)start;
352}
353EXPORT_SYMBOL(cpm_dpalloc);
354
355int cpm_dpfree(uint offset)
356{
357 int ret;
358 unsigned long flags;
359
360 spin_lock_irqsave(&cpm_dpmem_lock, flags);
361 ret = rh_free(&cpm_dpmem_info, (void *)offset);
362 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
363
364 return ret;
365}
366EXPORT_SYMBOL(cpm_dpfree);
367
368uint cpm_dpalloc_fixed(uint offset, uint size, uint align)
369{
370 void *start;
371 unsigned long flags;
372
373 spin_lock_irqsave(&cpm_dpmem_lock, flags);
374 cpm_dpmem_info.alignment = align;
375 start = rh_alloc_fixed(&cpm_dpmem_info, (void *)offset, size, "commproc");
376 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
377
378 return (uint)start;
379}
380EXPORT_SYMBOL(cpm_dpalloc_fixed);
381
382void cpm_dpdump(void)
383{
384 rh_dump(&cpm_dpmem_info);
385}
386EXPORT_SYMBOL(cpm_dpdump);
387
388void *cpm_dpram_addr(uint offset)
389{
390 return (void *)(dpram_vbase + offset);
391}
392EXPORT_SYMBOL(cpm_dpram_addr);
393
394uint cpm_dpram_phys(u8* addr)
395{
396 return (dpram_pbase + (uint)(addr - dpram_vbase));
397}
398EXPORT_SYMBOL(cpm_dpram_addr);
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index 767ee6651adc..eabfe06fe05c 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -36,9 +36,20 @@
36#include <asm/mpc8260.h> 36#include <asm/mpc8260.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/prom.h> 38#include <asm/prom.h>
39#include <asm/fs_pd.h>
39 40
40#include "cpm2_pic.h" 41#include "cpm2_pic.h"
41 42
43/* External IRQS */
44#define CPM2_IRQ_EXT1 19
45#define CPM2_IRQ_EXT7 25
46
47/* Port C IRQS */
48#define CPM2_IRQ_PORTC15 48
49#define CPM2_IRQ_PORTC0 63
50
51static intctl_cpm2_t *cpm2_intctl;
52
42static struct device_node *cpm2_pic_node; 53static struct device_node *cpm2_pic_node;
43static struct irq_host *cpm2_pic_host; 54static struct irq_host *cpm2_pic_host;
44#define NR_MASK_WORDS ((NR_IRQS + 31) / 32) 55#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
@@ -68,68 +79,55 @@ static const u_char irq_to_siubit[] = {
68 24, 25, 26, 27, 28, 29, 30, 31, 79 24, 25, 26, 27, 28, 29, 30, 31,
69}; 80};
70 81
71static void cpm2_mask_irq(unsigned int irq_nr) 82static void cpm2_mask_irq(unsigned int virq)
72{ 83{
73 int bit, word; 84 int bit, word;
74 volatile uint *simr; 85 unsigned int irq_nr = virq_to_hw(virq);
75
76 irq_nr -= CPM_IRQ_OFFSET;
77 86
78 bit = irq_to_siubit[irq_nr]; 87 bit = irq_to_siubit[irq_nr];
79 word = irq_to_siureg[irq_nr]; 88 word = irq_to_siureg[irq_nr];
80 89
81 simr = &(cpm2_intctl->ic_simrh);
82 ppc_cached_irq_mask[word] &= ~(1 << bit); 90 ppc_cached_irq_mask[word] &= ~(1 << bit);
83 simr[word] = ppc_cached_irq_mask[word]; 91 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
84} 92}
85 93
86static void cpm2_unmask_irq(unsigned int irq_nr) 94static void cpm2_unmask_irq(unsigned int virq)
87{ 95{
88 int bit, word; 96 int bit, word;
89 volatile uint *simr; 97 unsigned int irq_nr = virq_to_hw(virq);
90
91 irq_nr -= CPM_IRQ_OFFSET;
92 98
93 bit = irq_to_siubit[irq_nr]; 99 bit = irq_to_siubit[irq_nr];
94 word = irq_to_siureg[irq_nr]; 100 word = irq_to_siureg[irq_nr];
95 101
96 simr = &(cpm2_intctl->ic_simrh);
97 ppc_cached_irq_mask[word] |= 1 << bit; 102 ppc_cached_irq_mask[word] |= 1 << bit;
98 simr[word] = ppc_cached_irq_mask[word]; 103 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
99} 104}
100 105
101static void cpm2_mask_and_ack(unsigned int irq_nr) 106static void cpm2_ack(unsigned int virq)
102{ 107{
103 int bit, word; 108 int bit, word;
104 volatile uint *simr, *sipnr; 109 unsigned int irq_nr = virq_to_hw(virq);
105
106 irq_nr -= CPM_IRQ_OFFSET;
107 110
108 bit = irq_to_siubit[irq_nr]; 111 bit = irq_to_siubit[irq_nr];
109 word = irq_to_siureg[irq_nr]; 112 word = irq_to_siureg[irq_nr];
110 113
111 simr = &(cpm2_intctl->ic_simrh); 114 out_be32(&cpm2_intctl->ic_sipnrh + word, 1 << bit);
112 sipnr = &(cpm2_intctl->ic_sipnrh);
113 ppc_cached_irq_mask[word] &= ~(1 << bit);
114 simr[word] = ppc_cached_irq_mask[word];
115 sipnr[word] = 1 << bit;
116} 115}
117 116
118static void cpm2_end_irq(unsigned int irq_nr) 117static void cpm2_end_irq(unsigned int virq)
119{ 118{
120 int bit, word; 119 int bit, word;
121 volatile uint *simr; 120 unsigned int irq_nr = virq_to_hw(virq);
122 121
123 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) 122 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
124 && irq_desc[irq_nr].action) { 123 && irq_desc[irq_nr].action) {
125 124
126 irq_nr -= CPM_IRQ_OFFSET;
127 bit = irq_to_siubit[irq_nr]; 125 bit = irq_to_siubit[irq_nr];
128 word = irq_to_siureg[irq_nr]; 126 word = irq_to_siureg[irq_nr];
129 127
130 simr = &(cpm2_intctl->ic_simrh);
131 ppc_cached_irq_mask[word] |= 1 << bit; 128 ppc_cached_irq_mask[word] |= 1 << bit;
132 simr[word] = ppc_cached_irq_mask[word]; 129 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
130
133 /* 131 /*
134 * Work around large numbers of spurious IRQs on PowerPC 82xx 132 * Work around large numbers of spurious IRQs on PowerPC 82xx
135 * systems. 133 * systems.
@@ -138,13 +136,59 @@ static void cpm2_end_irq(unsigned int irq_nr)
138 } 136 }
139} 137}
140 138
139static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type)
140{
141 unsigned int src = virq_to_hw(virq);
142 struct irq_desc *desc = get_irq_desc(virq);
143 unsigned int vold, vnew, edibit;
144
145 if (flow_type == IRQ_TYPE_NONE)
146 flow_type = IRQ_TYPE_LEVEL_LOW;
147
148 if (flow_type & IRQ_TYPE_EDGE_RISING) {
149 printk(KERN_ERR "CPM2 PIC: sense type 0x%x not supported\n",
150 flow_type);
151 return -EINVAL;
152 }
153
154 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
155 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
156 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
157 desc->status |= IRQ_LEVEL;
158 desc->handle_irq = handle_level_irq;
159 } else
160 desc->handle_irq = handle_edge_irq;
161
162 /* internal IRQ senses are LEVEL_LOW
163 * EXT IRQ and Port C IRQ senses are programmable
164 */
165 if (src >= CPM2_IRQ_EXT1 && src <= CPM2_IRQ_EXT7)
166 edibit = (14 - (src - CPM2_IRQ_EXT1));
167 else
168 if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0)
169 edibit = (31 - (src - CPM2_IRQ_PORTC15));
170 else
171 return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL;
172
173 vold = in_be32(&cpm2_intctl->ic_siexr);
174
175 if ((flow_type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_FALLING)
176 vnew = vold | (1 << edibit);
177 else
178 vnew = vold & ~(1 << edibit);
179
180 if (vold != vnew)
181 out_be32(&cpm2_intctl->ic_siexr, vnew);
182 return 0;
183}
184
141static struct irq_chip cpm2_pic = { 185static struct irq_chip cpm2_pic = {
142 .typename = " CPM2 SIU ", 186 .typename = " CPM2 SIU ",
143 .enable = cpm2_unmask_irq, 187 .mask = cpm2_mask_irq,
144 .disable = cpm2_mask_irq,
145 .unmask = cpm2_unmask_irq, 188 .unmask = cpm2_unmask_irq,
146 .mask_ack = cpm2_mask_and_ack, 189 .ack = cpm2_ack,
147 .end = cpm2_end_irq, 190 .eoi = cpm2_end_irq,
191 .set_type = cpm2_set_irq_type,
148}; 192};
149 193
150unsigned int cpm2_get_irq(void) 194unsigned int cpm2_get_irq(void)
@@ -154,17 +198,17 @@ unsigned int cpm2_get_irq(void)
154 198
155 /* For CPM2, read the SIVEC register and shift the bits down 199 /* For CPM2, read the SIVEC register and shift the bits down
156 * to get the irq number. */ 200 * to get the irq number. */
157 bits = cpm2_intctl->ic_sivec; 201 bits = in_be32(&cpm2_intctl->ic_sivec);
158 irq = bits >> 26; 202 irq = bits >> 26;
159 203
160 if (irq == 0) 204 if (irq == 0)
161 return(-1); 205 return(-1);
162 return irq+CPM_IRQ_OFFSET; 206 return irq_linear_revmap(cpm2_pic_host, irq);
163} 207}
164 208
165static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node) 209static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node)
166{ 210{
167 return cpm2_pic_node == NULL || cpm2_pic_node == node; 211 return cpm2_pic_node == node;
168} 212}
169 213
170static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, 214static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq,
@@ -177,39 +221,21 @@ static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq,
177 return 0; 221 return 0;
178} 222}
179 223
180static void cpm2_host_unmap(struct irq_host *h, unsigned int virq)
181{
182 /* Make sure irq is masked in hardware */
183 cpm2_mask_irq(virq);
184
185 /* remove chip and handler */
186 set_irq_chip_and_handler(virq, NULL, NULL);
187}
188
189static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct, 224static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct,
190 u32 *intspec, unsigned int intsize, 225 u32 *intspec, unsigned int intsize,
191 irq_hw_number_t *out_hwirq, unsigned int *out_flags) 226 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
192{ 227{
193 static const unsigned char map_cpm2_senses[4] = {
194 IRQ_TYPE_LEVEL_LOW,
195 IRQ_TYPE_LEVEL_HIGH,
196 IRQ_TYPE_EDGE_FALLING,
197 IRQ_TYPE_EDGE_RISING,
198 };
199
200 *out_hwirq = intspec[0]; 228 *out_hwirq = intspec[0];
201 if (intsize > 1 && intspec[1] < 4) 229 if (intsize > 1)
202 *out_flags = map_cpm2_senses[intspec[1]]; 230 *out_flags = intspec[1];
203 else 231 else
204 *out_flags = IRQ_TYPE_NONE; 232 *out_flags = IRQ_TYPE_NONE;
205
206 return 0; 233 return 0;
207} 234}
208 235
209static struct irq_host_ops cpm2_pic_host_ops = { 236static struct irq_host_ops cpm2_pic_host_ops = {
210 .match = cpm2_pic_host_match, 237 .match = cpm2_pic_host_match,
211 .map = cpm2_pic_host_map, 238 .map = cpm2_pic_host_map,
212 .unmap = cpm2_host_unmap,
213 .xlate = cpm2_pic_host_xlate, 239 .xlate = cpm2_pic_host_xlate,
214}; 240};
215 241
@@ -217,37 +243,37 @@ void cpm2_pic_init(struct device_node *node)
217{ 243{
218 int i; 244 int i;
219 245
246 cpm2_intctl = cpm2_map(im_intctl);
247
220 /* Clear the CPM IRQ controller, in case it has any bits set 248 /* Clear the CPM IRQ controller, in case it has any bits set
221 * from the bootloader 249 * from the bootloader
222 */ 250 */
223 251
224 /* Mask out everything */ 252 /* Mask out everything */
225 253
226 cpm2_intctl->ic_simrh = 0x00000000; 254 out_be32(&cpm2_intctl->ic_simrh, 0x00000000);
227 cpm2_intctl->ic_simrl = 0x00000000; 255 out_be32(&cpm2_intctl->ic_simrl, 0x00000000);
228 256
229 wmb(); 257 wmb();
230 258
231 /* Ack everything */ 259 /* Ack everything */
232 cpm2_intctl->ic_sipnrh = 0xffffffff; 260 out_be32(&cpm2_intctl->ic_sipnrh, 0xffffffff);
233 cpm2_intctl->ic_sipnrl = 0xffffffff; 261 out_be32(&cpm2_intctl->ic_sipnrl, 0xffffffff);
234 wmb(); 262 wmb();
235 263
236 /* Dummy read of the vector */ 264 /* Dummy read of the vector */
237 i = cpm2_intctl->ic_sivec; 265 i = in_be32(&cpm2_intctl->ic_sivec);
238 rmb(); 266 rmb();
239 267
240 /* Initialize the default interrupt mapping priorities, 268 /* Initialize the default interrupt mapping priorities,
241 * in case the boot rom changed something on us. 269 * in case the boot rom changed something on us.
242 */ 270 */
243 cpm2_intctl->ic_sicr = 0; 271 out_be16(&cpm2_intctl->ic_sicr, 0);
244 cpm2_intctl->ic_scprrh = 0x05309770; 272 out_be32(&cpm2_intctl->ic_scprrh, 0x05309770);
245 cpm2_intctl->ic_scprrl = 0x05309770; 273 out_be32(&cpm2_intctl->ic_scprrl, 0x05309770);
246 274
247 /* create a legacy host */ 275 /* create a legacy host */
248 if (node) 276 cpm2_pic_node = of_node_get(node);
249 cpm2_pic_node = of_node_get(node);
250
251 cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64); 277 cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64);
252 if (cpm2_pic_host == NULL) { 278 if (cpm2_pic_host == NULL) {
253 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); 279 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
index 2840616529e4..30e5828a2781 100644
--- a/arch/powerpc/sysdev/cpm2_pic.h
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -1,8 +1,6 @@
1#ifndef _PPC_KERNEL_CPM2_H 1#ifndef _PPC_KERNEL_CPM2_H
2#define _PPC_KERNEL_CPM2_H 2#define _PPC_KERNEL_CPM2_H
3 3
4extern intctl_cpm2_t *cpm2_intctl;
5
6extern unsigned int cpm2_get_irq(void); 4extern unsigned int cpm2_get_irq(void);
7 5
8extern void cpm2_pic_init(struct device_node*); 6extern void cpm2_pic_init(struct device_node*);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index ad31e56e892b..d20f02927f72 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -38,7 +38,8 @@
38#include <asm/cpm2.h> 38#include <asm/cpm2.h>
39 39
40extern void init_fcc_ioports(struct fs_platform_info*); 40extern void init_fcc_ioports(struct fs_platform_info*);
41extern void init_scc_ioports(struct fs_uart_platform_info*); 41extern void init_fec_ioports(struct fs_platform_info*);
42extern void init_smc_ioports(struct fs_uart_platform_info*);
42static phys_addr_t immrbase = -1; 43static phys_addr_t immrbase = -1;
43 44
44phys_addr_t get_immrbase(void) 45phys_addr_t get_immrbase(void)
@@ -63,7 +64,7 @@ phys_addr_t get_immrbase(void)
63 64
64EXPORT_SYMBOL(get_immrbase); 65EXPORT_SYMBOL(get_immrbase);
65 66
66#ifdef CONFIG_CPM2 67#if defined(CONFIG_CPM2) || defined(CONFIG_8xx)
67 68
68static u32 brgfreq = -1; 69static u32 brgfreq = -1;
69 70
@@ -232,14 +233,7 @@ static int __init gfar_of_init(void)
232 goto err; 233 goto err;
233 } 234 }
234 235
235 mac_addr = get_property(np, "local-mac-address", NULL); 236 mac_addr = of_get_mac_address(np);
236 if (mac_addr == NULL)
237 mac_addr = get_property(np, "mac-address", NULL);
238 if (mac_addr == NULL) {
239 /* Obsolete */
240 mac_addr = get_property(np, "address", NULL);
241 }
242
243 if (mac_addr) 237 if (mac_addr)
244 memcpy(gfar_data.mac_addr, mac_addr, 6); 238 memcpy(gfar_data.mac_addr, mac_addr, 6);
245 239
@@ -440,7 +434,8 @@ static int __init fsl_usb_of_init(void)
440{ 434{
441 struct device_node *np; 435 struct device_node *np;
442 unsigned int i; 436 unsigned int i;
443 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr = NULL; 437 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
438 *usb_dev_dr_client = NULL;
444 int ret; 439 int ret;
445 440
446 for (np = NULL, i = 0; 441 for (np = NULL, i = 0;
@@ -506,33 +501,72 @@ static int __init fsl_usb_of_init(void)
506 501
507 of_irq_to_resource(np, 0, &r[1]); 502 of_irq_to_resource(np, 0, &r[1]);
508 503
509 usb_dev_dr = 504 prop = get_property(np, "dr_mode", NULL);
510 platform_device_register_simple("fsl-ehci", i, r, 2); 505
511 if (IS_ERR(usb_dev_dr)) { 506 if (!prop || !strcmp(prop, "host")) {
512 ret = PTR_ERR(usb_dev_dr); 507 usb_data.operating_mode = FSL_USB2_DR_HOST;
508 usb_dev_dr_host = platform_device_register_simple(
509 "fsl-ehci", i, r, 2);
510 if (IS_ERR(usb_dev_dr_host)) {
511 ret = PTR_ERR(usb_dev_dr_host);
512 goto err;
513 }
514 } else if (prop && !strcmp(prop, "peripheral")) {
515 usb_data.operating_mode = FSL_USB2_DR_DEVICE;
516 usb_dev_dr_client = platform_device_register_simple(
517 "fsl-usb2-udc", i, r, 2);
518 if (IS_ERR(usb_dev_dr_client)) {
519 ret = PTR_ERR(usb_dev_dr_client);
520 goto err;
521 }
522 } else if (prop && !strcmp(prop, "otg")) {
523 usb_data.operating_mode = FSL_USB2_DR_OTG;
524 usb_dev_dr_host = platform_device_register_simple(
525 "fsl-ehci", i, r, 2);
526 if (IS_ERR(usb_dev_dr_host)) {
527 ret = PTR_ERR(usb_dev_dr_host);
528 goto err;
529 }
530 usb_dev_dr_client = platform_device_register_simple(
531 "fsl-usb2-udc", i, r, 2);
532 if (IS_ERR(usb_dev_dr_client)) {
533 ret = PTR_ERR(usb_dev_dr_client);
534 goto err;
535 }
536 } else {
537 ret = -EINVAL;
513 goto err; 538 goto err;
514 } 539 }
515 540
516 usb_dev_dr->dev.coherent_dma_mask = 0xffffffffUL;
517 usb_dev_dr->dev.dma_mask = &usb_dev_dr->dev.coherent_dma_mask;
518
519 usb_data.operating_mode = FSL_USB2_DR_HOST;
520
521 prop = get_property(np, "phy_type", NULL); 541 prop = get_property(np, "phy_type", NULL);
522 usb_data.phy_mode = determine_usb_phy(prop); 542 usb_data.phy_mode = determine_usb_phy(prop);
523 543
524 ret = 544 if (usb_dev_dr_host) {
525 platform_device_add_data(usb_dev_dr, &usb_data, 545 usb_dev_dr_host->dev.coherent_dma_mask = 0xffffffffUL;
526 sizeof(struct 546 usb_dev_dr_host->dev.dma_mask = &usb_dev_dr_host->
527 fsl_usb2_platform_data)); 547 dev.coherent_dma_mask;
528 if (ret) 548 if ((ret = platform_device_add_data(usb_dev_dr_host,
529 goto unreg_dr; 549 &usb_data, sizeof(struct
550 fsl_usb2_platform_data))))
551 goto unreg_dr;
552 }
553 if (usb_dev_dr_client) {
554 usb_dev_dr_client->dev.coherent_dma_mask = 0xffffffffUL;
555 usb_dev_dr_client->dev.dma_mask = &usb_dev_dr_client->
556 dev.coherent_dma_mask;
557 if ((ret = platform_device_add_data(usb_dev_dr_client,
558 &usb_data, sizeof(struct
559 fsl_usb2_platform_data))))
560 goto unreg_dr;
561 }
530 } 562 }
531 return 0; 563 return 0;
532 564
533unreg_dr: 565unreg_dr:
534 if (usb_dev_dr) 566 if (usb_dev_dr_host)
535 platform_device_unregister(usb_dev_dr); 567 platform_device_unregister(usb_dev_dr_host);
568 if (usb_dev_dr_client)
569 platform_device_unregister(usb_dev_dr_client);
536unreg_mph: 570unreg_mph:
537 if (usb_dev_mph) 571 if (usb_dev_mph)
538 platform_device_unregister(usb_dev_mph); 572 platform_device_unregister(usb_dev_mph);
@@ -544,6 +578,8 @@ arch_initcall(fsl_usb_of_init);
544 578
545#ifdef CONFIG_CPM2 579#ifdef CONFIG_CPM2
546 580
581extern void init_scc_ioports(struct fs_uart_platform_info*);
582
547static const char fcc_regs[] = "fcc_regs"; 583static const char fcc_regs[] = "fcc_regs";
548static const char fcc_regs_c[] = "fcc_regs_c"; 584static const char fcc_regs_c[] = "fcc_regs_c";
549static const char fcc_pram[] = "fcc_pram"; 585static const char fcc_pram[] = "fcc_pram";
@@ -603,8 +639,9 @@ static int __init fs_enet_of_init(void)
603 goto unreg; 639 goto unreg;
604 } 640 }
605 641
606 mac_addr = get_property(np, "mac-address", NULL); 642 mac_addr = of_get_mac_address(np);
607 memcpy(fs_enet_data.macaddr, mac_addr, 6); 643 if (mac_addr)
644 memcpy(fs_enet_data.macaddr, mac_addr, 6);
608 645
609 ph = get_property(np, "phy-handle", NULL); 646 ph = get_property(np, "phy-handle", NULL);
610 phy = of_find_node_by_phandle(*ph); 647 phy = of_find_node_by_phandle(*ph);
@@ -696,7 +733,7 @@ static int __init fs_enet_of_init(void)
696 if (ret) 733 if (ret)
697 goto unreg; 734 goto unreg;
698 } 735 }
699 736
700 of_node_put(phy); 737 of_node_put(phy);
701 of_node_put(mdio); 738 of_node_put(mdio);
702 739
@@ -792,3 +829,271 @@ err:
792 829
793arch_initcall(cpm_uart_of_init); 830arch_initcall(cpm_uart_of_init);
794#endif /* CONFIG_CPM2 */ 831#endif /* CONFIG_CPM2 */
832
833#ifdef CONFIG_8xx
834
835extern void init_scc_ioports(struct fs_platform_info*);
836extern int platform_device_skip(char *model, int id);
837
838static int __init fs_enet_mdio_of_init(void)
839{
840 struct device_node *np;
841 unsigned int i;
842 struct platform_device *mdio_dev;
843 struct resource res;
844 int ret;
845
846 for (np = NULL, i = 0;
847 (np = of_find_compatible_node(np, "mdio", "fs_enet")) != NULL;
848 i++) {
849 struct fs_mii_fec_platform_info mdio_data;
850
851 memset(&res, 0, sizeof(res));
852 memset(&mdio_data, 0, sizeof(mdio_data));
853
854 ret = of_address_to_resource(np, 0, &res);
855 if (ret)
856 goto err;
857
858 mdio_dev =
859 platform_device_register_simple("fsl-cpm-fec-mdio",
860 res.start, &res, 1);
861 if (IS_ERR(mdio_dev)) {
862 ret = PTR_ERR(mdio_dev);
863 goto err;
864 }
865
866 mdio_data.mii_speed = ((((ppc_proc_freq + 4999999) / 2500000) / 2) & 0x3F) << 1;
867
868 ret =
869 platform_device_add_data(mdio_dev, &mdio_data,
870 sizeof(struct fs_mii_fec_platform_info));
871 if (ret)
872 goto unreg;
873 }
874 return 0;
875
876unreg:
877 platform_device_unregister(mdio_dev);
878err:
879 return ret;
880}
881
882arch_initcall(fs_enet_mdio_of_init);
883
884static const char *enet_regs = "regs";
885static const char *enet_pram = "pram";
886static const char *enet_irq = "interrupt";
887static char bus_id[9][BUS_ID_SIZE];
888
889static int __init fs_enet_of_init(void)
890{
891 struct device_node *np;
892 unsigned int i;
893 struct platform_device *fs_enet_dev = NULL;
894 struct resource res;
895 int ret;
896
897 for (np = NULL, i = 0;
898 (np = of_find_compatible_node(np, "network", "fs_enet")) != NULL;
899 i++) {
900 struct resource r[4];
901 struct device_node *phy = NULL, *mdio = NULL;
902 struct fs_platform_info fs_enet_data;
903 unsigned int *id, *phy_addr;
904 void *mac_addr;
905 phandle *ph;
906 char *model;
907
908 memset(r, 0, sizeof(r));
909 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
910
911 model = (char *)get_property(np, "model", NULL);
912 if (model == NULL) {
913 ret = -ENODEV;
914 goto unreg;
915 }
916
917 id = (u32 *) get_property(np, "device-id", NULL);
918 fs_enet_data.fs_no = *id;
919
920 if (platform_device_skip(model, *id))
921 continue;
922
923 ret = of_address_to_resource(np, 0, &r[0]);
924 if (ret)
925 goto err;
926 r[0].name = enet_regs;
927
928 mac_addr = of_get_mac_address(np);
929 if (mac_addr)
930 memcpy(fs_enet_data.macaddr, mac_addr, 6);
931
932 ph = (phandle *) get_property(np, "phy-handle", NULL);
933 if (ph != NULL)
934 phy = of_find_node_by_phandle(*ph);
935
936 if (phy != NULL) {
937 phy_addr = (u32 *) get_property(phy, "reg", NULL);
938 fs_enet_data.phy_addr = *phy_addr;
939 fs_enet_data.has_phy = 1;
940
941 mdio = of_get_parent(phy);
942 ret = of_address_to_resource(mdio, 0, &res);
943 if (ret) {
944 of_node_put(phy);
945 of_node_put(mdio);
946 goto unreg;
947 }
948 }
949
950 model = (char*)get_property(np, "model", NULL);
951 strcpy(fs_enet_data.fs_type, model);
952
953 if (strstr(model, "FEC")) {
954 r[1].start = r[1].end = irq_of_parse_and_map(np, 0);
955 r[1].flags = IORESOURCE_IRQ;
956 r[1].name = enet_irq;
957
958 fs_enet_dev =
959 platform_device_register_simple("fsl-cpm-fec", i, &r[0], 2);
960
961 if (IS_ERR(fs_enet_dev)) {
962 ret = PTR_ERR(fs_enet_dev);
963 goto err;
964 }
965
966 fs_enet_data.rx_ring = 128;
967 fs_enet_data.tx_ring = 16;
968 fs_enet_data.rx_copybreak = 240;
969 fs_enet_data.use_napi = 1;
970 fs_enet_data.napi_weight = 17;
971
972 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%x:%02x",
973 (u32)res.start, fs_enet_data.phy_addr);
974 fs_enet_data.bus_id = (char*)&bus_id[i];
975 fs_enet_data.init_ioports = init_fec_ioports;
976 }
977 if (strstr(model, "SCC")) {
978 ret = of_address_to_resource(np, 1, &r[1]);
979 if (ret)
980 goto err;
981 r[1].name = enet_pram;
982
983 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
984 r[2].flags = IORESOURCE_IRQ;
985 r[2].name = enet_irq;
986
987 fs_enet_dev =
988 platform_device_register_simple("fsl-cpm-scc", i, &r[0], 3);
989
990 if (IS_ERR(fs_enet_dev)) {
991 ret = PTR_ERR(fs_enet_dev);
992 goto err;
993 }
994
995 fs_enet_data.rx_ring = 64;
996 fs_enet_data.tx_ring = 8;
997 fs_enet_data.rx_copybreak = 240;
998 fs_enet_data.use_napi = 1;
999 fs_enet_data.napi_weight = 17;
1000
1001 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%s", "fixed@10:1");
1002 fs_enet_data.bus_id = (char*)&bus_id[i];
1003 fs_enet_data.init_ioports = init_scc_ioports;
1004 }
1005
1006 of_node_put(phy);
1007 of_node_put(mdio);
1008
1009 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
1010 sizeof(struct
1011 fs_platform_info));
1012 if (ret)
1013 goto unreg;
1014 }
1015 return 0;
1016
1017unreg:
1018 platform_device_unregister(fs_enet_dev);
1019err:
1020 return ret;
1021}
1022
1023arch_initcall(fs_enet_of_init);
1024
1025
1026static const char *smc_regs = "regs";
1027static const char *smc_pram = "pram";
1028
1029static int __init cpm_smc_uart_of_init(void)
1030{
1031 struct device_node *np;
1032 unsigned int i;
1033 struct platform_device *cpm_uart_dev;
1034 int ret;
1035
1036 for (np = NULL, i = 0;
1037 (np = of_find_compatible_node(np, "serial", "cpm_uart")) != NULL;
1038 i++) {
1039 struct resource r[3];
1040 struct fs_uart_platform_info cpm_uart_data;
1041 int *id;
1042 char *model;
1043
1044 memset(r, 0, sizeof(r));
1045 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
1046
1047 ret = of_address_to_resource(np, 0, &r[0]);
1048 if (ret)
1049 goto err;
1050
1051 r[0].name = smc_regs;
1052
1053 ret = of_address_to_resource(np, 1, &r[1]);
1054 if (ret)
1055 goto err;
1056 r[1].name = smc_pram;
1057
1058 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
1059 r[2].flags = IORESOURCE_IRQ;
1060
1061 cpm_uart_dev =
1062 platform_device_register_simple("fsl-cpm-smc:uart", i, &r[0], 3);
1063
1064 if (IS_ERR(cpm_uart_dev)) {
1065 ret = PTR_ERR(cpm_uart_dev);
1066 goto err;
1067 }
1068
1069 model = (char*)get_property(np, "model", NULL);
1070 strcpy(cpm_uart_data.fs_type, model);
1071
1072 id = (int*)get_property(np, "device-id", NULL);
1073 cpm_uart_data.fs_no = *id;
1074 cpm_uart_data.uart_clk = ppc_proc_freq;
1075
1076 cpm_uart_data.tx_num_fifo = 4;
1077 cpm_uart_data.tx_buf_size = 32;
1078 cpm_uart_data.rx_num_fifo = 4;
1079 cpm_uart_data.rx_buf_size = 32;
1080
1081 ret =
1082 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
1083 sizeof(struct
1084 fs_uart_platform_info));
1085 if (ret)
1086 goto unreg;
1087 }
1088
1089 return 0;
1090
1091unreg:
1092 platform_device_unregister(cpm_uart_dev);
1093err:
1094 return ret;
1095}
1096
1097arch_initcall(cpm_smc_uart_of_init);
1098
1099#endif /* CONFIG_8xx */
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index b6ec793a23be..42053625f498 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -56,6 +56,8 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
56void __init setup_grackle(struct pci_controller *hose) 56void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
59 if (machine_is_compatible("PowerMac1,1"))
60 pci_assign_all_buses = 1;
59 if (machine_is_compatible("AAPL,PowerBook1998")) 61 if (machine_is_compatible("AAPL,PowerBook1998"))
60 grackle_set_loop_snoop(hose, 1); 62 grackle_set_loop_snoop(hose, 1);
61#if 0 /* Disabled for now, HW problems ??? */ 63#if 0 /* Disabled for now, HW problems ??? */
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 746f78c15375..473c415e9e25 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -557,8 +557,7 @@ static struct irq_host_ops ipic_host_ops = {
557 .xlate = ipic_host_xlate, 557 .xlate = ipic_host_xlate,
558}; 558};
559 559
560void __init ipic_init(struct device_node *node, 560struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
561 unsigned int flags)
562{ 561{
563 struct ipic *ipic; 562 struct ipic *ipic;
564 struct resource res; 563 struct resource res;
@@ -566,22 +565,24 @@ void __init ipic_init(struct device_node *node,
566 565
567 ipic = alloc_bootmem(sizeof(struct ipic)); 566 ipic = alloc_bootmem(sizeof(struct ipic));
568 if (ipic == NULL) 567 if (ipic == NULL)
569 return; 568 return NULL;
570 569
571 memset(ipic, 0, sizeof(struct ipic)); 570 memset(ipic, 0, sizeof(struct ipic));
572 ipic->of_node = node ? of_node_get(node) : NULL; 571 ipic->of_node = of_node_get(node);
573 572
574 ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 573 ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR,
575 NR_IPIC_INTS, 574 NR_IPIC_INTS,
576 &ipic_host_ops, 0); 575 &ipic_host_ops, 0);
577 if (ipic->irqhost == NULL) { 576 if (ipic->irqhost == NULL) {
578 of_node_put(node); 577 of_node_put(node);
579 return; 578 return NULL;
580 } 579 }
581 580
582 ret = of_address_to_resource(node, 0, &res); 581 ret = of_address_to_resource(node, 0, &res);
583 if (ret) 582 if (ret) {
584 return; 583 of_node_put(node);
584 return NULL;
585 }
585 586
586 ipic->regs = ioremap(res.start, res.end - res.start + 1); 587 ipic->regs = ioremap(res.start, res.end - res.start + 1);
587 588
@@ -625,6 +626,8 @@ void __init ipic_init(struct device_node *node,
625 626
626 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, 627 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS,
627 primary_ipic->regs); 628 primary_ipic->regs);
629
630 return ipic;
628} 631}
629 632
630int ipic_set_priority(unsigned int virq, unsigned int priority) 633int ipic_set_priority(unsigned int virq, unsigned int priority)
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
new file mode 100644
index 000000000000..712b10a55f87
--- /dev/null
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -0,0 +1,743 @@
1
2/* Microcode patches for the CPM as supplied by Motorola.
3 * This is the one for IIC/SPI. There is a newer one that
4 * also relocates SMC2, but this would require additional changes
5 * to uart.c, so I am holding off on that for a moment.
6 */
7#include <linux/errno.h>
8#include <linux/sched.h>
9#include <linux/kernel.h>
10#include <linux/param.h>
11#include <linux/string.h>
12#include <linux/mm.h>
13#include <linux/interrupt.h>
14#include <asm/irq.h>
15#include <asm/mpc8xx.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18#include <asm/8xx_immap.h>
19#include <asm/commproc.h>
20
21/*
22 * I2C/SPI relocation patch arrays.
23 */
24
25#ifdef CONFIG_I2C_SPI_UCODE_PATCH
26
27uint patch_2000[] = {
28 0x7FFFEFD9,
29 0x3FFD0000,
30 0x7FFB49F7,
31 0x7FF90000,
32 0x5FEFADF7,
33 0x5F89ADF7,
34 0x5FEFAFF7,
35 0x5F89AFF7,
36 0x3A9CFBC8,
37 0xE7C0EDF0,
38 0x77C1E1BB,
39 0xF4DC7F1D,
40 0xABAD932F,
41 0x4E08FDCF,
42 0x6E0FAFF8,
43 0x7CCF76CF,
44 0xFD1FF9CF,
45 0xABF88DC6,
46 0xAB5679F7,
47 0xB0937383,
48 0xDFCE79F7,
49 0xB091E6BB,
50 0xE5BBE74F,
51 0xB3FA6F0F,
52 0x6FFB76CE,
53 0xEE0DF9CF,
54 0x2BFBEFEF,
55 0xCFEEF9CF,
56 0x76CEAD24,
57 0x90B2DF9A,
58 0x7FDDD0BF,
59 0x4BF847FD,
60 0x7CCF76CE,
61 0xCFEF7E1F,
62 0x7F1D7DFD,
63 0xF0B6EF71,
64 0x7FC177C1,
65 0xFBC86079,
66 0xE722FBC8,
67 0x5FFFDFFF,
68 0x5FB2FFFB,
69 0xFBC8F3C8,
70 0x94A67F01,
71 0x7F1D5F39,
72 0xAFE85F5E,
73 0xFFDFDF96,
74 0xCB9FAF7D,
75 0x5FC1AFED,
76 0x8C1C5FC1,
77 0xAFDD5FC3,
78 0xDF9A7EFD,
79 0xB0B25FB2,
80 0xFFFEABAD,
81 0x5FB2FFFE,
82 0x5FCE600B,
83 0xE6BB600B,
84 0x5FCEDFC6,
85 0x27FBEFDF,
86 0x5FC8CFDE,
87 0x3A9CE7C0,
88 0xEDF0F3C8,
89 0x7F0154CD,
90 0x7F1D2D3D,
91 0x363A7570,
92 0x7E0AF1CE,
93 0x37EF2E68,
94 0x7FEE10EC,
95 0xADF8EFDE,
96 0xCFEAE52F,
97 0x7D0FE12B,
98 0xF1CE5F65,
99 0x7E0A4DF8,
100 0xCFEA5F72,
101 0x7D0BEFEE,
102 0xCFEA5F74,
103 0xE522EFDE,
104 0x5F74CFDA,
105 0x0B627385,
106 0xDF627E0A,
107 0x30D8145B,
108 0xBFFFF3C8,
109 0x5FFFDFFF,
110 0xA7F85F5E,
111 0xBFFE7F7D,
112 0x10D31450,
113 0x5F36BFFF,
114 0xAF785F5E,
115 0xBFFDA7F8,
116 0x5F36BFFE,
117 0x77FD30C0,
118 0x4E08FDCF,
119 0xE5FF6E0F,
120 0xAFF87E1F,
121 0x7E0FFD1F,
122 0xF1CF5F1B,
123 0xABF80D5E,
124 0x5F5EFFEF,
125 0x79F730A2,
126 0xAFDD5F34,
127 0x47F85F34,
128 0xAFED7FDD,
129 0x50B24978,
130 0x47FD7F1D,
131 0x7DFD70AD,
132 0xEF717EC1,
133 0x6BA47F01,
134 0x2D267EFD,
135 0x30DE5F5E,
136 0xFFFD5F5E,
137 0xFFEF5F5E,
138 0xFFDF0CA0,
139 0xAFED0A9E,
140 0xAFDD0C3A,
141 0x5F3AAFBD,
142 0x7FBDB082,
143 0x5F8247F8
144};
145
146uint patch_2f00[] = {
147 0x3E303430,
148 0x34343737,
149 0xABF7BF9B,
150 0x994B4FBD,
151 0xBD599493,
152 0x349FFF37,
153 0xFB9B177D,
154 0xD9936956,
155 0xBBFDD697,
156 0xBDD2FD11,
157 0x31DB9BB3,
158 0x63139637,
159 0x93733693,
160 0x193137F7,
161 0x331737AF,
162 0x7BB9B999,
163 0xBB197957,
164 0x7FDFD3D5,
165 0x73B773F7,
166 0x37933B99,
167 0x1D115316,
168 0x99315315,
169 0x31694BF4,
170 0xFBDBD359,
171 0x31497353,
172 0x76956D69,
173 0x7B9D9693,
174 0x13131979,
175 0x79376935
176};
177#endif
178
179/*
180 * I2C/SPI/SMC1 relocation patch arrays.
181 */
182
183#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
184
185uint patch_2000[] = {
186 0x3fff0000,
187 0x3ffd0000,
188 0x3ffb0000,
189 0x3ff90000,
190 0x5f13eff8,
191 0x5eb5eff8,
192 0x5f88adf7,
193 0x5fefadf7,
194 0x3a9cfbc8,
195 0x77cae1bb,
196 0xf4de7fad,
197 0xabae9330,
198 0x4e08fdcf,
199 0x6e0faff8,
200 0x7ccf76cf,
201 0xfdaff9cf,
202 0xabf88dc8,
203 0xab5879f7,
204 0xb0925d8d,
205 0xdfd079f7,
206 0xb090e6bb,
207 0xe5bbe74f,
208 0x9e046f0f,
209 0x6ffb76ce,
210 0xee0cf9cf,
211 0x2bfbefef,
212 0xcfeef9cf,
213 0x76cead23,
214 0x90b3df99,
215 0x7fddd0c1,
216 0x4bf847fd,
217 0x7ccf76ce,
218 0xcfef77ca,
219 0x7eaf7fad,
220 0x7dfdf0b7,
221 0xef7a7fca,
222 0x77cafbc8,
223 0x6079e722,
224 0xfbc85fff,
225 0xdfff5fb3,
226 0xfffbfbc8,
227 0xf3c894a5,
228 0xe7c9edf9,
229 0x7f9a7fad,
230 0x5f36afe8,
231 0x5f5bffdf,
232 0xdf95cb9e,
233 0xaf7d5fc3,
234 0xafed8c1b,
235 0x5fc3afdd,
236 0x5fc5df99,
237 0x7efdb0b3,
238 0x5fb3fffe,
239 0xabae5fb3,
240 0xfffe5fd0,
241 0x600be6bb,
242 0x600b5fd0,
243 0xdfc827fb,
244 0xefdf5fca,
245 0xcfde3a9c,
246 0xe7c9edf9,
247 0xf3c87f9e,
248 0x54ca7fed,
249 0x2d3a3637,
250 0x756f7e9a,
251 0xf1ce37ef,
252 0x2e677fee,
253 0x10ebadf8,
254 0xefdecfea,
255 0xe52f7d9f,
256 0xe12bf1ce,
257 0x5f647e9a,
258 0x4df8cfea,
259 0x5f717d9b,
260 0xefeecfea,
261 0x5f73e522,
262 0xefde5f73,
263 0xcfda0b61,
264 0x5d8fdf61,
265 0xe7c9edf9,
266 0x7e9a30d5,
267 0x1458bfff,
268 0xf3c85fff,
269 0xdfffa7f8,
270 0x5f5bbffe,
271 0x7f7d10d0,
272 0x144d5f33,
273 0xbfffaf78,
274 0x5f5bbffd,
275 0xa7f85f33,
276 0xbffe77fd,
277 0x30bd4e08,
278 0xfdcfe5ff,
279 0x6e0faff8,
280 0x7eef7e9f,
281 0xfdeff1cf,
282 0x5f17abf8,
283 0x0d5b5f5b,
284 0xffef79f7,
285 0x309eafdd,
286 0x5f3147f8,
287 0x5f31afed,
288 0x7fdd50af,
289 0x497847fd,
290 0x7f9e7fed,
291 0x7dfd70a9,
292 0xef7e7ece,
293 0x6ba07f9e,
294 0x2d227efd,
295 0x30db5f5b,
296 0xfffd5f5b,
297 0xffef5f5b,
298 0xffdf0c9c,
299 0xafed0a9a,
300 0xafdd0c37,
301 0x5f37afbd,
302 0x7fbdb081,
303 0x5f8147f8,
304 0x3a11e710,
305 0xedf0ccdd,
306 0xf3186d0a,
307 0x7f0e5f06,
308 0x7fedbb38,
309 0x3afe7468,
310 0x7fedf4fc,
311 0x8ffbb951,
312 0xb85f77fd,
313 0xb0df5ddd,
314 0xdefe7fed,
315 0x90e1e74d,
316 0x6f0dcbf7,
317 0xe7decfed,
318 0xcb74cfed,
319 0xcfeddf6d,
320 0x91714f74,
321 0x5dd2deef,
322 0x9e04e7df,
323 0xefbb6ffb,
324 0xe7ef7f0e,
325 0x9e097fed,
326 0xebdbeffa,
327 0xeb54affb,
328 0x7fea90d7,
329 0x7e0cf0c3,
330 0xbffff318,
331 0x5fffdfff,
332 0xac59efea,
333 0x7fce1ee5,
334 0xe2ff5ee1,
335 0xaffbe2ff,
336 0x5ee3affb,
337 0xf9cc7d0f,
338 0xaef8770f,
339 0x7d0fb0c6,
340 0xeffbbfff,
341 0xcfef5ede,
342 0x7d0fbfff,
343 0x5ede4cf8,
344 0x7fddd0bf,
345 0x49f847fd,
346 0x7efdf0bb,
347 0x7fedfffd,
348 0x7dfdf0b7,
349 0xef7e7e1e,
350 0x5ede7f0e,
351 0x3a11e710,
352 0xedf0ccab,
353 0xfb18ad2e,
354 0x1ea9bbb8,
355 0x74283b7e,
356 0x73c2e4bb,
357 0x2ada4fb8,
358 0xdc21e4bb,
359 0xb2a1ffbf,
360 0x5e2c43f8,
361 0xfc87e1bb,
362 0xe74ffd91,
363 0x6f0f4fe8,
364 0xc7ba32e2,
365 0xf396efeb,
366 0x600b4f78,
367 0xe5bb760b,
368 0x53acaef8,
369 0x4ef88b0e,
370 0xcfef9e09,
371 0xabf8751f,
372 0xefef5bac,
373 0x741f4fe8,
374 0x751e760d,
375 0x7fdbf081,
376 0x741cafce,
377 0xefcc7fce,
378 0x751e70ac,
379 0x741ce7bb,
380 0x3372cfed,
381 0xafdbefeb,
382 0xe5bb760b,
383 0x53f2aef8,
384 0xafe8e7eb,
385 0x4bf8771e,
386 0x7e247fed,
387 0x4fcbe2cc,
388 0x7fbc30a9,
389 0x7b0f7a0f,
390 0x34d577fd,
391 0x308b5db7,
392 0xde553e5f,
393 0xaf78741f,
394 0x741f30f0,
395 0xcfef5e2c,
396 0x741f3eac,
397 0xafb8771e,
398 0x5e677fed,
399 0x0bd3e2cc,
400 0x741ccfec,
401 0xe5ca53cd,
402 0x6fcb4f74,
403 0x5dadde4b,
404 0x2ab63d38,
405 0x4bb3de30,
406 0x751f741c,
407 0x6c42effa,
408 0xefea7fce,
409 0x6ffc30be,
410 0xefec3fca,
411 0x30b3de2e,
412 0xadf85d9e,
413 0xaf7daefd,
414 0x5d9ede2e,
415 0x5d9eafdd,
416 0x761f10ac,
417 0x1da07efd,
418 0x30adfffe,
419 0x4908fb18,
420 0x5fffdfff,
421 0xafbb709b,
422 0x4ef85e67,
423 0xadf814ad,
424 0x7a0f70ad,
425 0xcfef50ad,
426 0x7a0fde30,
427 0x5da0afed,
428 0x3c12780f,
429 0xefef780f,
430 0xefef790f,
431 0xa7f85e0f,
432 0xffef790f,
433 0xefef790f,
434 0x14adde2e,
435 0x5d9eadfd,
436 0x5e2dfffb,
437 0xe79addfd,
438 0xeff96079,
439 0x607ae79a,
440 0xddfceff9,
441 0x60795dff,
442 0x607acfef,
443 0xefefefdf,
444 0xefbfef7f,
445 0xeeffedff,
446 0xebffe7ff,
447 0xafefafdf,
448 0xafbfaf7f,
449 0xaeffadff,
450 0xabffa7ff,
451 0x6fef6fdf,
452 0x6fbf6f7f,
453 0x6eff6dff,
454 0x6bff67ff,
455 0x2fef2fdf,
456 0x2fbf2f7f,
457 0x2eff2dff,
458 0x2bff27ff,
459 0x4e08fd1f,
460 0xe5ff6e0f,
461 0xaff87eef,
462 0x7e0ffdef,
463 0xf11f6079,
464 0xabf8f542,
465 0x7e0af11c,
466 0x37cfae3a,
467 0x7fec90be,
468 0xadf8efdc,
469 0xcfeae52f,
470 0x7d0fe12b,
471 0xf11c6079,
472 0x7e0a4df8,
473 0xcfea5dc4,
474 0x7d0befec,
475 0xcfea5dc6,
476 0xe522efdc,
477 0x5dc6cfda,
478 0x4e08fd1f,
479 0x6e0faff8,
480 0x7c1f761f,
481 0xfdeff91f,
482 0x6079abf8,
483 0x761cee24,
484 0xf91f2bfb,
485 0xefefcfec,
486 0xf91f6079,
487 0x761c27fb,
488 0xefdf5da7,
489 0xcfdc7fdd,
490 0xd09c4bf8,
491 0x47fd7c1f,
492 0x761ccfcf,
493 0x7eef7fed,
494 0x7dfdf093,
495 0xef7e7f1e,
496 0x771efb18,
497 0x6079e722,
498 0xe6bbe5bb,
499 0xae0ae5bb,
500 0x600bae85,
501 0xe2bbe2bb,
502 0xe2bbe2bb,
503 0xaf02e2bb,
504 0xe2bb2ff9,
505 0x6079e2bb
506};
507
508uint patch_2f00[] = {
509 0x30303030,
510 0x3e3e3434,
511 0xabbf9b99,
512 0x4b4fbdbd,
513 0x59949334,
514 0x9fff37fb,
515 0x9b177dd9,
516 0x936956bb,
517 0xfbdd697b,
518 0xdd2fd113,
519 0x1db9f7bb,
520 0x36313963,
521 0x79373369,
522 0x3193137f,
523 0x7331737a,
524 0xf7bb9b99,
525 0x9bb19795,
526 0x77fdfd3d,
527 0x573b773f,
528 0x737933f7,
529 0xb991d115,
530 0x31699315,
531 0x31531694,
532 0xbf4fbdbd,
533 0x35931497,
534 0x35376956,
535 0xbd697b9d,
536 0x96931313,
537 0x19797937,
538 0x6935af78,
539 0xb9b3baa3,
540 0xb8788683,
541 0x368f78f7,
542 0x87778733,
543 0x3ffffb3b,
544 0x8e8f78b8,
545 0x1d118e13,
546 0xf3ff3f8b,
547 0x6bd8e173,
548 0xd1366856,
549 0x68d1687b,
550 0x3daf78b8,
551 0x3a3a3f87,
552 0x8f81378f,
553 0xf876f887,
554 0x77fd8778,
555 0x737de8d6,
556 0xbbf8bfff,
557 0xd8df87f7,
558 0xfd876f7b,
559 0x8bfff8bd,
560 0x8683387d,
561 0xb873d87b,
562 0x3b8fd7f8,
563 0xf7338883,
564 0xbb8ee1f8,
565 0xef837377,
566 0x3337b836,
567 0x817d11f8,
568 0x7378b878,
569 0xd3368b7d,
570 0xed731b7d,
571 0x833731f3,
572 0xf22f3f23
573};
574
575uint patch_2e00[] = {
576 0x27eeeeee,
577 0xeeeeeeee,
578 0xeeeeeeee,
579 0xeeeeeeee,
580 0xee4bf4fb,
581 0xdbd259bb,
582 0x1979577f,
583 0xdfd2d573,
584 0xb773f737,
585 0x4b4fbdbd,
586 0x25b9b177,
587 0xd2d17376,
588 0x956bbfdd,
589 0x697bdd2f,
590 0xff9f79ff,
591 0xff9ff22f
592};
593#endif
594
595/*
596 * USB SOF patch arrays.
597 */
598
599#ifdef CONFIG_USB_SOF_UCODE_PATCH
600
601uint patch_2000[] = {
602 0x7fff0000,
603 0x7ffd0000,
604 0x7ffb0000,
605 0x49f7ba5b,
606 0xba383ffb,
607 0xf9b8b46d,
608 0xe5ab4e07,
609 0xaf77bffe,
610 0x3f7bbf79,
611 0xba5bba38,
612 0xe7676076,
613 0x60750000
614};
615
616uint patch_2f00[] = {
617 0x3030304c,
618 0xcab9e441,
619 0xa1aaf220
620};
621#endif
622
623void
624cpm_load_patch(cpm8xx_t *cp)
625{
626 volatile uint *dp; /* Dual-ported RAM. */
627 volatile cpm8xx_t *commproc;
628 volatile iic_t *iip;
629 volatile spi_t *spp;
630 volatile smc_uart_t *smp;
631 int i;
632
633 commproc = cp;
634
635#ifdef CONFIG_USB_SOF_UCODE_PATCH
636 commproc->cp_rccr = 0;
637
638 dp = (uint *)(commproc->cp_dpmem);
639 for (i=0; i<(sizeof(patch_2000)/4); i++)
640 *dp++ = patch_2000[i];
641
642 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
643 for (i=0; i<(sizeof(patch_2f00)/4); i++)
644 *dp++ = patch_2f00[i];
645
646 commproc->cp_rccr = 0x0009;
647
648 printk("USB SOF microcode patch installed\n");
649#endif /* CONFIG_USB_SOF_UCODE_PATCH */
650
651#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
652 defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
653
654 commproc->cp_rccr = 0;
655
656 dp = (uint *)(commproc->cp_dpmem);
657 for (i=0; i<(sizeof(patch_2000)/4); i++)
658 *dp++ = patch_2000[i];
659
660 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
661 for (i=0; i<(sizeof(patch_2f00)/4); i++)
662 *dp++ = patch_2f00[i];
663
664 iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
665# define RPBASE 0x0500
666 iip->iic_rpbase = RPBASE;
667
668 /* Put SPI above the IIC, also 32-byte aligned.
669 */
670 i = (RPBASE + sizeof(iic_t) + 31) & ~31;
671 spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
672 spp->spi_rpbase = i;
673
674# if defined(CONFIG_I2C_SPI_UCODE_PATCH)
675 commproc->cp_cpmcr1 = 0x802a;
676 commproc->cp_cpmcr2 = 0x8028;
677 commproc->cp_cpmcr3 = 0x802e;
678 commproc->cp_cpmcr4 = 0x802c;
679 commproc->cp_rccr = 1;
680
681 printk("I2C/SPI microcode patch installed.\n");
682# endif /* CONFIG_I2C_SPI_UCODE_PATCH */
683
684# if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
685
686 dp = (uint *)&(commproc->cp_dpmem[0x0e00]);
687 for (i=0; i<(sizeof(patch_2e00)/4); i++)
688 *dp++ = patch_2e00[i];
689
690 commproc->cp_cpmcr1 = 0x8080;
691 commproc->cp_cpmcr2 = 0x808a;
692 commproc->cp_cpmcr3 = 0x8028;
693 commproc->cp_cpmcr4 = 0x802a;
694 commproc->cp_rccr = 3;
695
696 smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1];
697 smp->smc_rpbase = 0x1FC0;
698
699 printk("I2C/SPI/SMC1 microcode patch installed.\n");
700# endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */
701
702#endif /* some variation of the I2C/SPI patch was selected */
703}
704
705/*
706 * Take this entire routine out, since no one calls it and its
707 * logic is suspect.
708 */
709
710#if 0
711void
712verify_patch(volatile immap_t *immr)
713{
714 volatile uint *dp;
715 volatile cpm8xx_t *commproc;
716 int i;
717
718 commproc = (cpm8xx_t *)&immr->im_cpm;
719
720 printk("cp_rccr %x\n", commproc->cp_rccr);
721 commproc->cp_rccr = 0;
722
723 dp = (uint *)(commproc->cp_dpmem);
724 for (i=0; i<(sizeof(patch_2000)/4); i++)
725 if (*dp++ != patch_2000[i]) {
726 printk("patch_2000 bad at %d\n", i);
727 dp--;
728 printk("found 0x%X, wanted 0x%X\n", *dp, patch_2000[i]);
729 break;
730 }
731
732 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
733 for (i=0; i<(sizeof(patch_2f00)/4); i++)
734 if (*dp++ != patch_2f00[i]) {
735 printk("patch_2f00 bad at %d\n", i);
736 dp--;
737 printk("found 0x%X, wanted 0x%X\n", *dp, patch_2f00[i]);
738 break;
739 }
740
741 commproc->cp_rccr = 0x0009;
742}
743#endif
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
new file mode 100644
index 000000000000..2fc2bcd79b5e
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -0,0 +1,197 @@
1#include <linux/kernel.h>
2#include <linux/module.h>
3#include <linux/stddef.h>
4#include <linux/init.h>
5#include <linux/sched.h>
6#include <linux/signal.h>
7#include <linux/irq.h>
8#include <linux/dma-mapping.h>
9#include <asm/prom.h>
10#include <asm/irq.h>
11#include <asm/io.h>
12#include <asm/8xx_immap.h>
13#include <asm/mpc8xx.h>
14
15#include "mpc8xx_pic.h"
16
17
18#define PIC_VEC_SPURRIOUS 15
19
20extern int cpm_get_irq(struct pt_regs *regs);
21
22static struct device_node *mpc8xx_pic_node;
23static struct irq_host *mpc8xx_pic_host;
24#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
25static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
26static sysconf8xx_t *siu_reg;
27
28int cpm_get_irq(struct pt_regs *regs);
29
30static void mpc8xx_unmask_irq(unsigned int virq)
31{
32 int bit, word;
33 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
34
35 bit = irq_nr & 0x1f;
36 word = irq_nr >> 5;
37
38 ppc_cached_irq_mask[word] |= (1 << (31-bit));
39 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
40}
41
42static void mpc8xx_mask_irq(unsigned int virq)
43{
44 int bit, word;
45 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
46
47 bit = irq_nr & 0x1f;
48 word = irq_nr >> 5;
49
50 ppc_cached_irq_mask[word] &= ~(1 << (31-bit));
51 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
52}
53
54static void mpc8xx_ack(unsigned int virq)
55{
56 int bit;
57 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
58
59 bit = irq_nr & 0x1f;
60 out_be32(&siu_reg->sc_sipend, 1 << (31-bit));
61}
62
63static void mpc8xx_end_irq(unsigned int virq)
64{
65 int bit, word;
66 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
67
68 bit = irq_nr & 0x1f;
69 word = irq_nr >> 5;
70
71 ppc_cached_irq_mask[word] |= (1 << (31-bit));
72 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
73}
74
75static int mpc8xx_set_irq_type(unsigned int virq, unsigned int flow_type)
76{
77 struct irq_desc *desc = get_irq_desc(virq);
78
79 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
80 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
81 if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
82 desc->status |= IRQ_LEVEL;
83
84 if (flow_type & IRQ_TYPE_EDGE_FALLING) {
85 irq_hw_number_t hw = (unsigned int)irq_map[virq].hwirq;
86 unsigned int siel = in_be32(&siu_reg->sc_siel);
87
88 /* only external IRQ senses are programmable */
89 if ((hw & 1) == 0) {
90 siel |= (0x80000000 >> hw);
91 out_be32(&siu_reg->sc_siel, siel);
92 desc->handle_irq = handle_edge_irq;
93 }
94 }
95 return 0;
96}
97
98static struct irq_chip mpc8xx_pic = {
99 .typename = " MPC8XX SIU ",
100 .unmask = mpc8xx_unmask_irq,
101 .mask = mpc8xx_mask_irq,
102 .ack = mpc8xx_ack,
103 .eoi = mpc8xx_end_irq,
104 .set_type = mpc8xx_set_irq_type,
105};
106
107unsigned int mpc8xx_get_irq(void)
108{
109 int irq;
110
111 /* For MPC8xx, read the SIVEC register and shift the bits down
112 * to get the irq number.
113 */
114 irq = in_be32(&siu_reg->sc_sivec) >> 26;
115
116 if (irq == PIC_VEC_SPURRIOUS)
117 irq = NO_IRQ;
118
119 return irq_linear_revmap(mpc8xx_pic_host, irq);
120
121}
122
123static int mpc8xx_pic_host_match(struct irq_host *h, struct device_node *node)
124{
125 return mpc8xx_pic_node == node;
126}
127
128static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq,
129 irq_hw_number_t hw)
130{
131 pr_debug("mpc8xx_pic_host_map(%d, 0x%lx)\n", virq, hw);
132
133 /* Set default irq handle */
134 set_irq_chip_and_handler(virq, &mpc8xx_pic, handle_level_irq);
135 return 0;
136}
137
138
139static int mpc8xx_pic_host_xlate(struct irq_host *h, struct device_node *ct,
140 u32 *intspec, unsigned int intsize,
141 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
142{
143 static unsigned char map_pic_senses[4] = {
144 IRQ_TYPE_EDGE_RISING,
145 IRQ_TYPE_LEVEL_LOW,
146 IRQ_TYPE_LEVEL_HIGH,
147 IRQ_TYPE_EDGE_FALLING,
148 };
149
150 *out_hwirq = intspec[0];
151 if (intsize > 1 && intspec[1] < 4)
152 *out_flags = map_pic_senses[intspec[1]];
153 else
154 *out_flags = IRQ_TYPE_NONE;
155
156 return 0;
157}
158
159
160static struct irq_host_ops mpc8xx_pic_host_ops = {
161 .match = mpc8xx_pic_host_match,
162 .map = mpc8xx_pic_host_map,
163 .xlate = mpc8xx_pic_host_xlate,
164};
165
166int mpc8xx_pic_init(void)
167{
168 struct resource res;
169 struct device_node *np = NULL;
170 int ret;
171
172 np = of_find_node_by_type(np, "mpc8xx-pic");
173
174 if (np == NULL) {
175 printk(KERN_ERR "Could not find open-pic node\n");
176 return -ENOMEM;
177 }
178
179 mpc8xx_pic_node = of_node_get(np);
180
181 ret = of_address_to_resource(np, 0, &res);
182 of_node_put(np);
183 if (ret)
184 return ret;
185
186 siu_reg = (void *)ioremap(res.start, res.end - res.start + 1);
187 if (siu_reg == NULL)
188 return -EINVAL;
189
190 mpc8xx_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &mpc8xx_pic_host_ops, 64);
191 if (mpc8xx_pic_host == NULL) {
192 printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
193 ret = -ENOMEM;
194 }
195
196 return ret;
197}
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.h b/arch/powerpc/sysdev/mpc8xx_pic.h
new file mode 100644
index 000000000000..afa2ee6717c1
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc8xx_pic.h
@@ -0,0 +1,12 @@
1#ifndef _PPC_KERNEL_MPC8xx_H
2#define _PPC_KERNEL_MPC8xx_H
3
4#include <linux/irq.h>
5#include <linux/interrupt.h>
6
7extern struct hw_interrupt_type mpc8xx_pic;
8
9int mpc8xx_pic_init(void);
10unsigned int mpc8xx_get_irq(void);
11
12#endif /* _PPC_KERNEL_PPC8xx_H */
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index d01ced11694d..bcfb900481f8 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -496,13 +496,18 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
496static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi) 496static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi)
497{ 497{
498 unsigned int src = mpic_irq_to_hw(irq); 498 unsigned int src = mpic_irq_to_hw(irq);
499 struct mpic *mpic;
499 500
500 if (irq < NUM_ISA_INTERRUPTS) 501 if (irq < NUM_ISA_INTERRUPTS)
501 return NULL; 502 return NULL;
503
504 mpic = irq_desc[irq].chip_data;
505
502 if (is_ipi) 506 if (is_ipi)
503 *is_ipi = (src >= MPIC_VEC_IPI_0 && src <= MPIC_VEC_IPI_3); 507 *is_ipi = (src >= mpic->ipi_vecs[0] &&
508 src <= mpic->ipi_vecs[3]);
504 509
505 return irq_desc[irq].chip_data; 510 return mpic;
506} 511}
507 512
508/* Convert a cpu mask from logical to physical cpu numbers. */ 513/* Convert a cpu mask from logical to physical cpu numbers. */
@@ -540,7 +545,11 @@ static inline void mpic_eoi(struct mpic *mpic)
540#ifdef CONFIG_SMP 545#ifdef CONFIG_SMP
541static irqreturn_t mpic_ipi_action(int irq, void *dev_id) 546static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
542{ 547{
543 smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0); 548 struct mpic *mpic;
549
550 mpic = mpic_find(irq, NULL);
551 smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
552
544 return IRQ_HANDLED; 553 return IRQ_HANDLED;
545} 554}
546#endif /* CONFIG_SMP */ 555#endif /* CONFIG_SMP */
@@ -663,7 +672,7 @@ static void mpic_end_ht_irq(unsigned int irq)
663static void mpic_unmask_ipi(unsigned int irq) 672static void mpic_unmask_ipi(unsigned int irq)
664{ 673{
665 struct mpic *mpic = mpic_from_ipi(irq); 674 struct mpic *mpic = mpic_from_ipi(irq);
666 unsigned int src = mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0; 675 unsigned int src = mpic_irq_to_hw(irq) - mpic->ipi_vecs[0];
667 676
668 DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src); 677 DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src);
669 mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK); 678 mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK);
@@ -807,11 +816,11 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
807 816
808 DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw); 817 DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw);
809 818
810 if (hw == MPIC_VEC_SPURRIOUS) 819 if (hw == mpic->spurious_vec)
811 return -EINVAL; 820 return -EINVAL;
812 821
813#ifdef CONFIG_SMP 822#ifdef CONFIG_SMP
814 else if (hw >= MPIC_VEC_IPI_0) { 823 else if (hw >= mpic->ipi_vecs[0]) {
815 WARN_ON(!(mpic->flags & MPIC_PRIMARY)); 824 WARN_ON(!(mpic->flags & MPIC_PRIMARY));
816 825
817 DBG("mpic: mapping as IPI\n"); 826 DBG("mpic: mapping as IPI\n");
@@ -904,6 +913,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
904 u32 reg; 913 u32 reg;
905 const char *vers; 914 const char *vers;
906 int i; 915 int i;
916 int intvec_top;
907 u64 paddr = phys_addr; 917 u64 paddr = phys_addr;
908 918
909 mpic = alloc_bootmem(sizeof(struct mpic)); 919 mpic = alloc_bootmem(sizeof(struct mpic));
@@ -912,11 +922,11 @@ struct mpic * __init mpic_alloc(struct device_node *node,
912 922
913 memset(mpic, 0, sizeof(struct mpic)); 923 memset(mpic, 0, sizeof(struct mpic));
914 mpic->name = name; 924 mpic->name = name;
915 mpic->of_node = node ? of_node_get(node) : NULL; 925 mpic->of_node = of_node_get(node);
916 926
917 mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 256, 927 mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, isu_size,
918 &mpic_host_ops, 928 &mpic_host_ops,
919 MPIC_VEC_SPURRIOUS); 929 flags & MPIC_LARGE_VECTORS ? 2048 : 256);
920 if (mpic->irqhost == NULL) { 930 if (mpic->irqhost == NULL) {
921 of_node_put(node); 931 of_node_put(node);
922 return NULL; 932 return NULL;
@@ -944,6 +954,21 @@ struct mpic * __init mpic_alloc(struct device_node *node,
944 mpic->irq_count = irq_count; 954 mpic->irq_count = irq_count;
945 mpic->num_sources = 0; /* so far */ 955 mpic->num_sources = 0; /* so far */
946 956
957 if (flags & MPIC_LARGE_VECTORS)
958 intvec_top = 2047;
959 else
960 intvec_top = 255;
961
962 mpic->timer_vecs[0] = intvec_top - 8;
963 mpic->timer_vecs[1] = intvec_top - 7;
964 mpic->timer_vecs[2] = intvec_top - 6;
965 mpic->timer_vecs[3] = intvec_top - 5;
966 mpic->ipi_vecs[0] = intvec_top - 4;
967 mpic->ipi_vecs[1] = intvec_top - 3;
968 mpic->ipi_vecs[2] = intvec_top - 2;
969 mpic->ipi_vecs[3] = intvec_top - 1;
970 mpic->spurious_vec = intvec_top;
971
947 /* Check for "big-endian" in device-tree */ 972 /* Check for "big-endian" in device-tree */
948 if (node && get_property(node, "big-endian", NULL) != NULL) 973 if (node && get_property(node, "big-endian", NULL) != NULL)
949 mpic->flags |= MPIC_BIG_ENDIAN; 974 mpic->flags |= MPIC_BIG_ENDIAN;
@@ -1084,11 +1109,6 @@ void __init mpic_init(struct mpic *mpic)
1084 int i; 1109 int i;
1085 1110
1086 BUG_ON(mpic->num_sources == 0); 1111 BUG_ON(mpic->num_sources == 0);
1087 WARN_ON(mpic->num_sources > MPIC_VEC_IPI_0);
1088
1089 /* Sanitize source count */
1090 if (mpic->num_sources > MPIC_VEC_IPI_0)
1091 mpic->num_sources = MPIC_VEC_IPI_0;
1092 1112
1093 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); 1113 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources);
1094 1114
@@ -1104,7 +1124,7 @@ void __init mpic_init(struct mpic *mpic)
1104 i * MPIC_INFO(TIMER_STRIDE) + 1124 i * MPIC_INFO(TIMER_STRIDE) +
1105 MPIC_INFO(TIMER_VECTOR_PRI), 1125 MPIC_INFO(TIMER_VECTOR_PRI),
1106 MPIC_VECPRI_MASK | 1126 MPIC_VECPRI_MASK |
1107 (MPIC_VEC_TIMER_0 + i)); 1127 (mpic->timer_vecs[0] + i));
1108 } 1128 }
1109 1129
1110 /* Initialize IPIs to our reserved vectors and mark them disabled for now */ 1130 /* Initialize IPIs to our reserved vectors and mark them disabled for now */
@@ -1113,7 +1133,7 @@ void __init mpic_init(struct mpic *mpic)
1113 mpic_ipi_write(i, 1133 mpic_ipi_write(i,
1114 MPIC_VECPRI_MASK | 1134 MPIC_VECPRI_MASK |
1115 (10 << MPIC_VECPRI_PRIORITY_SHIFT) | 1135 (10 << MPIC_VECPRI_PRIORITY_SHIFT) |
1116 (MPIC_VEC_IPI_0 + i)); 1136 (mpic->ipi_vecs[0] + i));
1117 } 1137 }
1118 1138
1119 /* Initialize interrupt sources */ 1139 /* Initialize interrupt sources */
@@ -1136,8 +1156,8 @@ void __init mpic_init(struct mpic *mpic)
1136 1 << hard_smp_processor_id()); 1156 1 << hard_smp_processor_id());
1137 } 1157 }
1138 1158
1139 /* Init spurrious vector */ 1159 /* Init spurious vector */
1140 mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), MPIC_VEC_SPURRIOUS); 1160 mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), mpic->spurious_vec);
1141 1161
1142 /* Disable 8259 passthrough, if supported */ 1162 /* Disable 8259 passthrough, if supported */
1143 if (!(mpic->flags & MPIC_NO_PTHROU_DIS)) 1163 if (!(mpic->flags & MPIC_NO_PTHROU_DIS))
@@ -1184,9 +1204,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1184 1204
1185 spin_lock_irqsave(&mpic_lock, flags); 1205 spin_lock_irqsave(&mpic_lock, flags);
1186 if (is_ipi) { 1206 if (is_ipi) {
1187 reg = mpic_ipi_read(src - MPIC_VEC_IPI_0) & 1207 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
1188 ~MPIC_VECPRI_PRIORITY_MASK; 1208 ~MPIC_VECPRI_PRIORITY_MASK;
1189 mpic_ipi_write(src - MPIC_VEC_IPI_0, 1209 mpic_ipi_write(src - mpic->ipi_vecs[0],
1190 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 1210 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT));
1191 } else { 1211 } else {
1192 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) 1212 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI))
@@ -1207,7 +1227,7 @@ unsigned int mpic_irq_get_priority(unsigned int irq)
1207 1227
1208 spin_lock_irqsave(&mpic_lock, flags); 1228 spin_lock_irqsave(&mpic_lock, flags);
1209 if (is_ipi) 1229 if (is_ipi)
1210 reg = mpic_ipi_read(src = MPIC_VEC_IPI_0); 1230 reg = mpic_ipi_read(src = mpic->ipi_vecs[0]);
1211 else 1231 else
1212 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); 1232 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
1213 spin_unlock_irqrestore(&mpic_lock, flags); 1233 spin_unlock_irqrestore(&mpic_lock, flags);
@@ -1313,7 +1333,7 @@ unsigned int mpic_get_one_irq(struct mpic *mpic)
1313#ifdef DEBUG_LOW 1333#ifdef DEBUG_LOW
1314 DBG("%s: get_one_irq(): %d\n", mpic->name, src); 1334 DBG("%s: get_one_irq(): %d\n", mpic->name, src);
1315#endif 1335#endif
1316 if (unlikely(src == MPIC_VEC_SPURRIOUS)) 1336 if (unlikely(src == mpic->spurious_vec))
1317 return NO_IRQ; 1337 return NO_IRQ;
1318 return irq_linear_revmap(mpic->irqhost, src); 1338 return irq_linear_revmap(mpic->irqhost, src);
1319} 1339}
@@ -1345,12 +1365,12 @@ void mpic_request_ipis(void)
1345 1365
1346 for (i = 0; i < 4; i++) { 1366 for (i = 0; i < 4; i++) {
1347 unsigned int vipi = irq_create_mapping(mpic->irqhost, 1367 unsigned int vipi = irq_create_mapping(mpic->irqhost,
1348 MPIC_VEC_IPI_0 + i); 1368 mpic->ipi_vecs[0] + i);
1349 if (vipi == NO_IRQ) { 1369 if (vipi == NO_IRQ) {
1350 printk(KERN_ERR "Failed to map IPI %d\n", i); 1370 printk(KERN_ERR "Failed to map IPI %d\n", i);
1351 break; 1371 break;
1352 } 1372 }
1353 request_irq(vipi, mpic_ipi_action, IRQF_DISABLED, 1373 request_irq(vipi, mpic_ipi_action, IRQF_DISABLED|IRQF_PERCPU,
1354 ipi_names[i], mpic); 1374 ipi_names[i], mpic);
1355 } 1375 }
1356} 1376}
@@ -1375,4 +1395,25 @@ void smp_mpic_message_pass(int target, int msg)
1375 break; 1395 break;
1376 } 1396 }
1377} 1397}
1398
1399int __init smp_mpic_probe(void)
1400{
1401 int nr_cpus;
1402
1403 DBG("smp_mpic_probe()...\n");
1404
1405 nr_cpus = cpus_weight(cpu_possible_map);
1406
1407 DBG("nr_cpus: %d\n", nr_cpus);
1408
1409 if (nr_cpus > 1)
1410 mpic_request_ipis();
1411
1412 return nr_cpus;
1413}
1414
1415void __devinit smp_mpic_setup_cpu(int cpu)
1416{
1417 mpic_setup_this_cpu();
1418}
1378#endif /* CONFIG_SMP */ 1419#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
new file mode 100644
index 000000000000..a5282011d39e
--- /dev/null
+++ b/arch/powerpc/sysdev/pmi.c
@@ -0,0 +1,305 @@
1/*
2 * pmi driver
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 *
6 * PMI (Platform Management Interrupt) is a way to communicate
7 * with the BMC (Baseboard Management Controller) via interrupts.
8 * Unlike IPMI it is bidirectional and has a low latency.
9 *
10 * Author: Christian Krafft <krafft@de.ibm.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
15 * any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#include <linux/interrupt.h>
28#include <linux/completion.h>
29#include <linux/spinlock.h>
30#include <linux/workqueue.h>
31
32#include <asm/of_device.h>
33#include <asm/of_platform.h>
34#include <asm/io.h>
35#include <asm/pmi.h>
36
37
38struct pmi_data {
39 struct list_head handler;
40 spinlock_t handler_spinlock;
41 spinlock_t pmi_spinlock;
42 struct mutex msg_mutex;
43 pmi_message_t msg;
44 struct completion *completion;
45 struct of_device *dev;
46 int irq;
47 u8 __iomem *pmi_reg;
48 struct work_struct work;
49};
50
51
52
53static void __iomem *of_iomap(struct device_node *np)
54{
55 struct resource res;
56
57 if (of_address_to_resource(np, 0, &res))
58 return NULL;
59
60 pr_debug("Resource start: 0x%lx\n", res.start);
61 pr_debug("Resource end: 0x%lx\n", res.end);
62
63 return ioremap(res.start, 1 + res.end - res.start);
64}
65
66
67static int pmi_irq_handler(int irq, void *dev_id)
68{
69 struct pmi_data *data;
70 u8 type;
71 int rc;
72
73 data = dev_id;
74
75 spin_lock(&data->pmi_spinlock);
76
77 type = ioread8(data->pmi_reg + PMI_READ_TYPE);
78 pr_debug("pmi: got message of type %d\n", type);
79
80 if (type & PMI_ACK && !data->completion) {
81 printk(KERN_WARNING "pmi: got unexpected ACK message.\n");
82 rc = -EIO;
83 goto unlock;
84 }
85
86 if (data->completion && !(type & PMI_ACK)) {
87 printk(KERN_WARNING "pmi: expected ACK, but got %d\n", type);
88 rc = -EIO;
89 goto unlock;
90 }
91
92 data->msg.type = type;
93 data->msg.data0 = ioread8(data->pmi_reg + PMI_READ_DATA0);
94 data->msg.data1 = ioread8(data->pmi_reg + PMI_READ_DATA1);
95 data->msg.data2 = ioread8(data->pmi_reg + PMI_READ_DATA2);
96 rc = 0;
97unlock:
98 spin_unlock(&data->pmi_spinlock);
99
100 if (rc == -EIO) {
101 rc = IRQ_HANDLED;
102 goto out;
103 }
104
105 if (data->msg.type & PMI_ACK) {
106 complete(data->completion);
107 rc = IRQ_HANDLED;
108 goto out;
109 }
110
111 schedule_work(&data->work);
112
113 rc = IRQ_HANDLED;
114out:
115 return rc;
116}
117
118
119static struct of_device_id pmi_match[] = {
120 { .type = "ibm,pmi", .name = "ibm,pmi" },
121 {},
122};
123
124MODULE_DEVICE_TABLE(of, pmi_match);
125
126static void pmi_notify_handlers(struct work_struct *work)
127{
128 struct pmi_data *data;
129 struct pmi_handler *handler;
130
131 data = container_of(work, struct pmi_data, work);
132
133 spin_lock(&data->handler_spinlock);
134 list_for_each_entry(handler, &data->handler, node) {
135 pr_debug(KERN_INFO "pmi: notifying handler %p\n", handler);
136 if (handler->type == data->msg.type)
137 handler->handle_pmi_message(data->dev, data->msg);
138 }
139 spin_unlock(&data->handler_spinlock);
140}
141
142static int pmi_of_probe(struct of_device *dev,
143 const struct of_device_id *match)
144{
145 struct device_node *np = dev->node;
146 struct pmi_data *data;
147 int rc;
148
149 data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL);
150 if (!data) {
151 printk(KERN_ERR "pmi: could not allocate memory.\n");
152 rc = -ENOMEM;
153 goto out;
154 }
155
156 data->pmi_reg = of_iomap(np);
157 if (!data->pmi_reg) {
158 printk(KERN_ERR "pmi: invalid register address.\n");
159 rc = -EFAULT;
160 goto error_cleanup_data;
161 }
162
163 INIT_LIST_HEAD(&data->handler);
164
165 mutex_init(&data->msg_mutex);
166 spin_lock_init(&data->pmi_spinlock);
167 spin_lock_init(&data->handler_spinlock);
168
169 INIT_WORK(&data->work, pmi_notify_handlers);
170
171 dev->dev.driver_data = data;
172 data->dev = dev;
173
174 data->irq = irq_of_parse_and_map(np, 0);
175 if (data->irq == NO_IRQ) {
176 printk(KERN_ERR "pmi: invalid interrupt.\n");
177 rc = -EFAULT;
178 goto error_cleanup_iomap;
179 }
180
181 rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", data);
182 if (rc) {
183 printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n",
184 data->irq, rc);
185 goto error_cleanup_iomap;
186 }
187
188 printk(KERN_INFO "pmi: found pmi device at addr %p.\n", data->pmi_reg);
189
190 goto out;
191
192error_cleanup_iomap:
193 iounmap(data->pmi_reg);
194
195error_cleanup_data:
196 kfree(data);
197
198out:
199 return rc;
200}
201
202static int pmi_of_remove(struct of_device *dev)
203{
204 struct pmi_data *data;
205 struct pmi_handler *handler, *tmp;
206
207 data = dev->dev.driver_data;
208
209 free_irq(data->irq, data);
210 iounmap(data->pmi_reg);
211
212 spin_lock(&data->handler_spinlock);
213
214 list_for_each_entry_safe(handler, tmp, &data->handler, node)
215 list_del(&handler->node);
216
217 spin_unlock(&data->handler_spinlock);
218
219 kfree(dev->dev.driver_data);
220
221 return 0;
222}
223
224static struct of_platform_driver pmi_of_platform_driver = {
225 .name = "pmi",
226 .match_table = pmi_match,
227 .probe = pmi_of_probe,
228 .remove = pmi_of_remove
229};
230
231static int __init pmi_module_init(void)
232{
233 return of_register_platform_driver(&pmi_of_platform_driver);
234}
235module_init(pmi_module_init);
236
237static void __exit pmi_module_exit(void)
238{
239 of_unregister_platform_driver(&pmi_of_platform_driver);
240}
241module_exit(pmi_module_exit);
242
243void pmi_send_message(struct of_device *device, pmi_message_t msg)
244{
245 struct pmi_data *data;
246 unsigned long flags;
247 DECLARE_COMPLETION_ONSTACK(completion);
248
249 data = device->dev.driver_data;
250
251 mutex_lock(&data->msg_mutex);
252
253 data->msg = msg;
254 pr_debug("pmi_send_message: msg is %08x\n", *(u32*)&msg);
255
256 data->completion = &completion;
257
258 spin_lock_irqsave(&data->pmi_spinlock, flags);
259 iowrite8(msg.data0, data->pmi_reg + PMI_WRITE_DATA0);
260 iowrite8(msg.data1, data->pmi_reg + PMI_WRITE_DATA1);
261 iowrite8(msg.data2, data->pmi_reg + PMI_WRITE_DATA2);
262 iowrite8(msg.type, data->pmi_reg + PMI_WRITE_TYPE);
263 spin_unlock_irqrestore(&data->pmi_spinlock, flags);
264
265 pr_debug("pmi_send_message: wait for completion\n");
266
267 wait_for_completion_interruptible_timeout(data->completion,
268 PMI_TIMEOUT);
269
270 data->completion = NULL;
271
272 mutex_unlock(&data->msg_mutex);
273}
274EXPORT_SYMBOL_GPL(pmi_send_message);
275
276void pmi_register_handler(struct of_device *device,
277 struct pmi_handler *handler)
278{
279 struct pmi_data *data;
280 data = device->dev.driver_data;
281
282 spin_lock(&data->handler_spinlock);
283 list_add_tail(&handler->node, &data->handler);
284 spin_unlock(&data->handler_spinlock);
285}
286EXPORT_SYMBOL_GPL(pmi_register_handler);
287
288void pmi_unregister_handler(struct of_device *device,
289 struct pmi_handler *handler)
290{
291 struct pmi_data *data;
292
293 pr_debug("pmi: unregistering handler %p\n", handler);
294
295 data = device->dev.driver_data;
296
297 spin_lock(&data->handler_spinlock);
298 list_del(&handler->node);
299 spin_unlock(&data->handler_spinlock);
300}
301EXPORT_SYMBOL_GPL(pmi_unregister_handler);
302
303MODULE_LICENSE("GPL");
304MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
305MODULE_DESCRIPTION("IBM Platform Management Interrupt driver");
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 74e48d94f27c..4d1dcb45963d 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -323,7 +323,7 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic)
323 return irq_linear_revmap(qe_ic->irqhost, irq); 323 return irq_linear_revmap(qe_ic->irqhost, irq);
324} 324}
325 325
326void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc) 326void qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
327{ 327{
328 struct qe_ic *qe_ic = desc->handler_data; 328 struct qe_ic *qe_ic = desc->handler_data;
329 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); 329 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -332,7 +332,7 @@ void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
332 generic_handle_irq(cascade_irq); 332 generic_handle_irq(cascade_irq);
333} 333}
334 334
335void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc) 335void qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc)
336{ 336{
337 struct qe_ic *qe_ic = desc->handler_data; 337 struct qe_ic *qe_ic = desc->handler_data;
338 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); 338 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
@@ -352,7 +352,7 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags)
352 return; 352 return;
353 353
354 memset(qe_ic, 0, sizeof(struct qe_ic)); 354 memset(qe_ic, 0, sizeof(struct qe_ic));
355 qe_ic->of_node = node ? of_node_get(node) : NULL; 355 qe_ic->of_node = of_node_get(node);
356 356
357 qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 357 qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR,
358 NR_QE_IC_INTS, &qe_ic_host_ops, 0); 358 NR_QE_IC_INTS, &qe_ic_host_ops, 0);
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index e657559bea93..a457ac1c6639 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -1,13 +1,12 @@
1/* 1/*
2 * arch/powerpc/sysdev/qe_lib/ucc_fast.c
3 *
4 * QE UCC Fast API Set - UCC Fast specific routines implementations.
5 *
6 * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. 2 * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved.
7 * 3 *
8 * Authors: Shlomi Gridish <gridish@freescale.com> 4 * Authors: Shlomi Gridish <gridish@freescale.com>
9 * Li Yang <leoli@freescale.com> 5 * Li Yang <leoli@freescale.com>
10 * 6 *
7 * Description:
8 * QE UCC Fast API Set - UCC Fast specific routines implementations.
9 *
11 * This program is free software; you can redistribute it and/or modify it 10 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the 11 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your 12 * Free Software Foundation; either version 2 of the License, or (at your
@@ -27,79 +26,61 @@
27#include <asm/ucc.h> 26#include <asm/ucc.h>
28#include <asm/ucc_fast.h> 27#include <asm/ucc_fast.h>
29 28
30#define uccf_printk(level, format, arg...) \
31 printk(level format "\n", ## arg)
32
33#define uccf_dbg(format, arg...) \
34 uccf_printk(KERN_DEBUG , format , ## arg)
35#define uccf_err(format, arg...) \
36 uccf_printk(KERN_ERR , format , ## arg)
37#define uccf_info(format, arg...) \
38 uccf_printk(KERN_INFO , format , ## arg)
39#define uccf_warn(format, arg...) \
40 uccf_printk(KERN_WARNING , format , ## arg)
41
42#ifdef UCCF_VERBOSE_DEBUG
43#define uccf_vdbg uccf_dbg
44#else
45#define uccf_vdbg(fmt, args...) do { } while (0)
46#endif /* UCCF_VERBOSE_DEBUG */
47
48void ucc_fast_dump_regs(struct ucc_fast_private * uccf) 29void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
49{ 30{
50 uccf_info("UCC%d Fast registers:", uccf->uf_info->ucc_num); 31 printk(KERN_INFO "UCC%d Fast registers:", uccf->uf_info->ucc_num);
51 uccf_info("Base address: 0x%08x", (u32) uccf->uf_regs); 32 printk(KERN_INFO "Base address: 0x%08x", (u32) uccf->uf_regs);
52 33
53 uccf_info("gumr : addr - 0x%08x, val - 0x%08x", 34 printk(KERN_INFO "gumr : addr - 0x%08x, val - 0x%08x",
54 (u32) & uccf->uf_regs->gumr, in_be32(&uccf->uf_regs->gumr)); 35 (u32) & uccf->uf_regs->gumr, in_be32(&uccf->uf_regs->gumr));
55 uccf_info("upsmr : addr - 0x%08x, val - 0x%08x", 36 printk(KERN_INFO "upsmr : addr - 0x%08x, val - 0x%08x",
56 (u32) & uccf->uf_regs->upsmr, in_be32(&uccf->uf_regs->upsmr)); 37 (u32) & uccf->uf_regs->upsmr, in_be32(&uccf->uf_regs->upsmr));
57 uccf_info("utodr : addr - 0x%08x, val - 0x%04x", 38 printk(KERN_INFO "utodr : addr - 0x%08x, val - 0x%04x",
58 (u32) & uccf->uf_regs->utodr, in_be16(&uccf->uf_regs->utodr)); 39 (u32) & uccf->uf_regs->utodr, in_be16(&uccf->uf_regs->utodr));
59 uccf_info("udsr : addr - 0x%08x, val - 0x%04x", 40 printk(KERN_INFO "udsr : addr - 0x%08x, val - 0x%04x",
60 (u32) & uccf->uf_regs->udsr, in_be16(&uccf->uf_regs->udsr)); 41 (u32) & uccf->uf_regs->udsr, in_be16(&uccf->uf_regs->udsr));
61 uccf_info("ucce : addr - 0x%08x, val - 0x%08x", 42 printk(KERN_INFO "ucce : addr - 0x%08x, val - 0x%08x",
62 (u32) & uccf->uf_regs->ucce, in_be32(&uccf->uf_regs->ucce)); 43 (u32) & uccf->uf_regs->ucce, in_be32(&uccf->uf_regs->ucce));
63 uccf_info("uccm : addr - 0x%08x, val - 0x%08x", 44 printk(KERN_INFO "uccm : addr - 0x%08x, val - 0x%08x",
64 (u32) & uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); 45 (u32) & uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm));
65 uccf_info("uccs : addr - 0x%08x, val - 0x%02x", 46 printk(KERN_INFO "uccs : addr - 0x%08x, val - 0x%02x",
66 (u32) & uccf->uf_regs->uccs, uccf->uf_regs->uccs); 47 (u32) & uccf->uf_regs->uccs, uccf->uf_regs->uccs);
67 uccf_info("urfb : addr - 0x%08x, val - 0x%08x", 48 printk(KERN_INFO "urfb : addr - 0x%08x, val - 0x%08x",
68 (u32) & uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); 49 (u32) & uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb));
69 uccf_info("urfs : addr - 0x%08x, val - 0x%04x", 50 printk(KERN_INFO "urfs : addr - 0x%08x, val - 0x%04x",
70 (u32) & uccf->uf_regs->urfs, in_be16(&uccf->uf_regs->urfs)); 51 (u32) & uccf->uf_regs->urfs, in_be16(&uccf->uf_regs->urfs));
71 uccf_info("urfet : addr - 0x%08x, val - 0x%04x", 52 printk(KERN_INFO "urfet : addr - 0x%08x, val - 0x%04x",
72 (u32) & uccf->uf_regs->urfet, in_be16(&uccf->uf_regs->urfet)); 53 (u32) & uccf->uf_regs->urfet, in_be16(&uccf->uf_regs->urfet));
73 uccf_info("urfset: addr - 0x%08x, val - 0x%04x", 54 printk(KERN_INFO "urfset: addr - 0x%08x, val - 0x%04x",
74 (u32) & uccf->uf_regs->urfset, 55 (u32) & uccf->uf_regs->urfset,
75 in_be16(&uccf->uf_regs->urfset)); 56 in_be16(&uccf->uf_regs->urfset));
76 uccf_info("utfb : addr - 0x%08x, val - 0x%08x", 57 printk(KERN_INFO "utfb : addr - 0x%08x, val - 0x%08x",
77 (u32) & uccf->uf_regs->utfb, in_be32(&uccf->uf_regs->utfb)); 58 (u32) & uccf->uf_regs->utfb, in_be32(&uccf->uf_regs->utfb));
78 uccf_info("utfs : addr - 0x%08x, val - 0x%04x", 59 printk(KERN_INFO "utfs : addr - 0x%08x, val - 0x%04x",
79 (u32) & uccf->uf_regs->utfs, in_be16(&uccf->uf_regs->utfs)); 60 (u32) & uccf->uf_regs->utfs, in_be16(&uccf->uf_regs->utfs));
80 uccf_info("utfet : addr - 0x%08x, val - 0x%04x", 61 printk(KERN_INFO "utfet : addr - 0x%08x, val - 0x%04x",
81 (u32) & uccf->uf_regs->utfet, in_be16(&uccf->uf_regs->utfet)); 62 (u32) & uccf->uf_regs->utfet, in_be16(&uccf->uf_regs->utfet));
82 uccf_info("utftt : addr - 0x%08x, val - 0x%04x", 63 printk(KERN_INFO "utftt : addr - 0x%08x, val - 0x%04x",
83 (u32) & uccf->uf_regs->utftt, in_be16(&uccf->uf_regs->utftt)); 64 (u32) & uccf->uf_regs->utftt, in_be16(&uccf->uf_regs->utftt));
84 uccf_info("utpt : addr - 0x%08x, val - 0x%04x", 65 printk(KERN_INFO "utpt : addr - 0x%08x, val - 0x%04x",
85 (u32) & uccf->uf_regs->utpt, in_be16(&uccf->uf_regs->utpt)); 66 (u32) & uccf->uf_regs->utpt, in_be16(&uccf->uf_regs->utpt));
86 uccf_info("urtry : addr - 0x%08x, val - 0x%08x", 67 printk(KERN_INFO "urtry : addr - 0x%08x, val - 0x%08x",
87 (u32) & uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); 68 (u32) & uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry));
88 uccf_info("guemr : addr - 0x%08x, val - 0x%02x", 69 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
89 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr); 70 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
90} 71}
91 72
92u32 ucc_fast_get_qe_cr_subblock(int uccf_num) 73u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
93{ 74{
94 switch (uccf_num) { 75 switch (uccf_num) {
95 case 0: return QE_CR_SUBBLOCK_UCCFAST1; 76 case 0: return QE_CR_SUBBLOCK_UCCFAST1;
96 case 1: return QE_CR_SUBBLOCK_UCCFAST2; 77 case 1: return QE_CR_SUBBLOCK_UCCFAST2;
97 case 2: return QE_CR_SUBBLOCK_UCCFAST3; 78 case 2: return QE_CR_SUBBLOCK_UCCFAST3;
98 case 3: return QE_CR_SUBBLOCK_UCCFAST4; 79 case 3: return QE_CR_SUBBLOCK_UCCFAST4;
99 case 4: return QE_CR_SUBBLOCK_UCCFAST5; 80 case 4: return QE_CR_SUBBLOCK_UCCFAST5;
100 case 5: return QE_CR_SUBBLOCK_UCCFAST6; 81 case 5: return QE_CR_SUBBLOCK_UCCFAST6;
101 case 6: return QE_CR_SUBBLOCK_UCCFAST7; 82 case 6: return QE_CR_SUBBLOCK_UCCFAST7;
102 case 7: return QE_CR_SUBBLOCK_UCCFAST8; 83 case 7: return QE_CR_SUBBLOCK_UCCFAST8;
103 default: return QE_CR_SUBBLOCK_INVALID; 84 default: return QE_CR_SUBBLOCK_INVALID;
104 } 85 }
105} 86}
@@ -153,84 +134,72 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
153{ 134{
154 struct ucc_fast_private *uccf; 135 struct ucc_fast_private *uccf;
155 struct ucc_fast *uf_regs; 136 struct ucc_fast *uf_regs;
156 u32 gumr = 0; 137 u32 gumr;
157 int ret; 138 int ret;
158 139
159 uccf_vdbg("%s: IN", __FUNCTION__);
160
161 if (!uf_info) 140 if (!uf_info)
162 return -EINVAL; 141 return -EINVAL;
163 142
164 /* check if the UCC port number is in range. */ 143 /* check if the UCC port number is in range. */
165 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { 144 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) {
166 uccf_err("ucc_fast_init: Illegal UCC number!"); 145 printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__);
167 return -EINVAL; 146 return -EINVAL;
168 } 147 }
169 148
170 /* Check that 'max_rx_buf_length' is properly aligned (4). */ 149 /* Check that 'max_rx_buf_length' is properly aligned (4). */
171 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { 150 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) {
172 uccf_err("ucc_fast_init: max_rx_buf_length not aligned."); 151 printk(KERN_ERR "%s: max_rx_buf_length not aligned", __FUNCTION__);
173 return -EINVAL; 152 return -EINVAL;
174 } 153 }
175 154
176 /* Validate Virtual Fifo register values */ 155 /* Validate Virtual Fifo register values */
177 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { 156 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) {
178 uccf_err 157 printk(KERN_ERR "%s: urfs is too small", __FUNCTION__);
179 ("ucc_fast_init: Virtual Fifo register urfs too small.");
180 return -EINVAL; 158 return -EINVAL;
181 } 159 }
182 160
183 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 161 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
184 uccf_err 162 printk(KERN_ERR "%s: urfs is not aligned", __FUNCTION__);
185 ("ucc_fast_init: Virtual Fifo register urfs not aligned.");
186 return -EINVAL; 163 return -EINVAL;
187 } 164 }
188 165
189 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 166 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
190 uccf_err 167 printk(KERN_ERR "%s: urfet is not aligned.", __FUNCTION__);
191 ("ucc_fast_init: Virtual Fifo register urfet not aligned.");
192 return -EINVAL; 168 return -EINVAL;
193 } 169 }
194 170
195 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 171 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
196 uccf_err 172 printk(KERN_ERR "%s: urfset is not aligned", __FUNCTION__);
197 ("ucc_fast_init: Virtual Fifo register urfset not aligned.");
198 return -EINVAL; 173 return -EINVAL;
199 } 174 }
200 175
201 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 176 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
202 uccf_err 177 printk(KERN_ERR "%s: utfs is not aligned", __FUNCTION__);
203 ("ucc_fast_init: Virtual Fifo register utfs not aligned.");
204 return -EINVAL; 178 return -EINVAL;
205 } 179 }
206 180
207 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 181 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
208 uccf_err 182 printk(KERN_ERR "%s: utfet is not aligned", __FUNCTION__);
209 ("ucc_fast_init: Virtual Fifo register utfet not aligned.");
210 return -EINVAL; 183 return -EINVAL;
211 } 184 }
212 185
213 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 186 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
214 uccf_err 187 printk(KERN_ERR "%s: utftt is not aligned", __FUNCTION__);
215 ("ucc_fast_init: Virtual Fifo register utftt not aligned.");
216 return -EINVAL; 188 return -EINVAL;
217 } 189 }
218 190
219 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); 191 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL);
220 if (!uccf) { 192 if (!uccf) {
221 uccf_err 193 printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__);
222 ("ucc_fast_init: No memory for UCC slow data structure!");
223 return -ENOMEM; 194 return -ENOMEM;
224 } 195 }
225 196
226 /* Fill fast UCC structure */ 197 /* Fill fast UCC structure */
227 uccf->uf_info = uf_info; 198 uccf->uf_info = uf_info;
228 /* Set the PHY base address */ 199 /* Set the PHY base address */
229 uccf->uf_regs = 200 uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast));
230 (struct ucc_fast *) ioremap(uf_info->regs, sizeof(struct ucc_fast));
231 if (uccf->uf_regs == NULL) { 201 if (uccf->uf_regs == NULL) {
232 uccf_err 202 printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__);
233 ("ucc_fast_init: No memory map for UCC slow controller!");
234 return -ENOMEM; 203 return -ENOMEM;
235 } 204 }
236 205
@@ -249,7 +218,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
249 218
250 /* Init Guemr register */ 219 /* Init Guemr register */
251 if ((ret = ucc_init_guemr((struct ucc_common *) (uf_regs)))) { 220 if ((ret = ucc_init_guemr((struct ucc_common *) (uf_regs)))) {
252 uccf_err("ucc_fast_init: Could not init the guemr register."); 221 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
253 ucc_fast_free(uccf); 222 ucc_fast_free(uccf);
254 return ret; 223 return ret;
255 } 224 }
@@ -258,7 +227,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
258 if ((ret = ucc_set_type(uf_info->ucc_num, 227 if ((ret = ucc_set_type(uf_info->ucc_num,
259 (struct ucc_common *) (uf_regs), 228 (struct ucc_common *) (uf_regs),
260 UCC_SPEED_TYPE_FAST))) { 229 UCC_SPEED_TYPE_FAST))) {
261 uccf_err("ucc_fast_init: Could not set type to fast."); 230 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
262 ucc_fast_free(uccf); 231 ucc_fast_free(uccf);
263 return ret; 232 return ret;
264 } 233 }
@@ -267,10 +236,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
267 236
268 /* Set GUMR */ 237 /* Set GUMR */
269 /* For more details see the hardware spec. */ 238 /* For more details see the hardware spec. */
270 /* gumr starts as zero. */ 239 gumr = uf_info->ttx_trx;
271 if (uf_info->tci) 240 if (uf_info->tci)
272 gumr |= UCC_FAST_GUMR_TCI; 241 gumr |= UCC_FAST_GUMR_TCI;
273 gumr |= uf_info->ttx_trx;
274 if (uf_info->cdp) 242 if (uf_info->cdp)
275 gumr |= UCC_FAST_GUMR_CDP; 243 gumr |= UCC_FAST_GUMR_CDP;
276 if (uf_info->ctsp) 244 if (uf_info->ctsp)
@@ -298,9 +266,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
298 uccf->ucc_fast_tx_virtual_fifo_base_offset = 266 uccf->ucc_fast_tx_virtual_fifo_base_offset =
299 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 267 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
300 if (IS_MURAM_ERR(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { 268 if (IS_MURAM_ERR(uccf->ucc_fast_tx_virtual_fifo_base_offset)) {
301 uccf_err 269 printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO", __FUNCTION__);
302 ("ucc_fast_init: Can not allocate MURAM memory for "
303 "struct ucc_fastx_virtual_fifo_base_offset.");
304 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; 270 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0;
305 ucc_fast_free(uccf); 271 ucc_fast_free(uccf);
306 return -ENOMEM; 272 return -ENOMEM;
@@ -308,14 +274,11 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
308 274
309 /* Allocate memory for Rx Virtual Fifo */ 275 /* Allocate memory for Rx Virtual Fifo */
310 uccf->ucc_fast_rx_virtual_fifo_base_offset = 276 uccf->ucc_fast_rx_virtual_fifo_base_offset =
311 qe_muram_alloc(uf_info->urfs + 277 qe_muram_alloc(uf_info->urfs +
312 (u32)
313 UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR, 278 UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR,
314 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 279 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
315 if (IS_MURAM_ERR(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { 280 if (IS_MURAM_ERR(uccf->ucc_fast_rx_virtual_fifo_base_offset)) {
316 uccf_err 281 printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO", __FUNCTION__);
317 ("ucc_fast_init: Can not allocate MURAM memory for "
318 "ucc_fast_rx_virtual_fifo_base_offset.");
319 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; 282 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0;
320 ucc_fast_free(uccf); 283 ucc_fast_free(uccf);
321 return -ENOMEM; 284 return -ENOMEM;
@@ -342,26 +305,22 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
342 /* If NMSI (not Tsa), set Tx and Rx clock. */ 305 /* If NMSI (not Tsa), set Tx and Rx clock. */
343 if (!uf_info->tsa) { 306 if (!uf_info->tsa) {
344 /* Rx clock routing */ 307 /* Rx clock routing */
345 if (uf_info->rx_clock != QE_CLK_NONE) { 308 if ((uf_info->rx_clock != QE_CLK_NONE) &&
346 if (ucc_set_qe_mux_rxtx 309 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock,
347 (uf_info->ucc_num, uf_info->rx_clock, 310 COMM_DIR_RX)) {
348 COMM_DIR_RX)) { 311 printk(KERN_ERR "%s: illegal value for RX clock",
349 uccf_err 312 __FUNCTION__);
350 ("ucc_fast_init: Illegal value for parameter 'RxClock'."); 313 ucc_fast_free(uccf);
351 ucc_fast_free(uccf); 314 return -EINVAL;
352 return -EINVAL;
353 }
354 } 315 }
355 /* Tx clock routing */ 316 /* Tx clock routing */
356 if (uf_info->tx_clock != QE_CLK_NONE) { 317 if ((uf_info->tx_clock != QE_CLK_NONE) &&
357 if (ucc_set_qe_mux_rxtx 318 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock,
358 (uf_info->ucc_num, uf_info->tx_clock, 319 COMM_DIR_TX)) {
359 COMM_DIR_TX)) { 320 printk(KERN_ERR "%s: illegal value for TX clock",
360 uccf_err 321 __FUNCTION__);
361 ("ucc_fast_init: Illegal value for parameter 'TxClock'."); 322 ucc_fast_free(uccf);
362 ucc_fast_free(uccf); 323 return -EINVAL;
363 return -EINVAL;
364 }
365 } 324 }
366 } 325 }
367 326
@@ -370,9 +329,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
370 329
371 /* First, clear anything pending at UCC level, 330 /* First, clear anything pending at UCC level,
372 * otherwise, old garbage may come through 331 * otherwise, old garbage may come through
373 * as soon as the dam is opened 332 * as soon as the dam is opened. */
374 * Writing '1' clears 333
375 */ 334 /* Writing '1' clears */
376 out_be32(&uf_regs->ucce, 0xffffffff); 335 out_be32(&uf_regs->ucce, 0xffffffff);
377 336
378 *uccf_ret = uccf; 337 *uccf_ret = uccf;
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 47b56203f47e..817df73ecf56 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -19,7 +19,6 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21 21
22#include <asm/irq.h>
23#include <asm/io.h> 22#include <asm/io.h>
24#include <asm/immap_qe.h> 23#include <asm/immap_qe.h>
25#include <asm/qe.h> 24#include <asm/qe.h>
@@ -27,24 +26,6 @@
27#include <asm/ucc.h> 26#include <asm/ucc.h>
28#include <asm/ucc_slow.h> 27#include <asm/ucc_slow.h>
29 28
30#define uccs_printk(level, format, arg...) \
31 printk(level format "\n", ## arg)
32
33#define uccs_dbg(format, arg...) \
34 uccs_printk(KERN_DEBUG , format , ## arg)
35#define uccs_err(format, arg...) \
36 uccs_printk(KERN_ERR , format , ## arg)
37#define uccs_info(format, arg...) \
38 uccs_printk(KERN_INFO , format , ## arg)
39#define uccs_warn(format, arg...) \
40 uccs_printk(KERN_WARNING , format , ## arg)
41
42#ifdef UCCS_VERBOSE_DEBUG
43#define uccs_vdbg uccs_dbg
44#else
45#define uccs_vdbg(fmt, args...) do { } while (0)
46#endif /* UCCS_VERBOSE_DEBUG */
47
48u32 ucc_slow_get_qe_cr_subblock(int uccs_num) 29u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
49{ 30{
50 switch (uccs_num) { 31 switch (uccs_num) {
@@ -135,51 +116,53 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
135 116
136int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret) 117int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret)
137{ 118{
119 struct ucc_slow_private *uccs;
138 u32 i; 120 u32 i;
139 struct ucc_slow *us_regs; 121 struct ucc_slow *us_regs;
140 u32 gumr; 122 u32 gumr;
141 u8 function_code = 0; 123 struct qe_bd *bd;
142 u8 *bd;
143 struct ucc_slow_private *uccs;
144 u32 id; 124 u32 id;
145 u32 command; 125 u32 command;
146 int ret; 126 int ret = 0;
147
148 uccs_vdbg("%s: IN", __FUNCTION__);
149 127
150 if (!us_info) 128 if (!us_info)
151 return -EINVAL; 129 return -EINVAL;
152 130
153 /* check if the UCC port number is in range. */ 131 /* check if the UCC port number is in range. */
154 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { 132 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) {
155 uccs_err("ucc_slow_init: Illegal UCC number!"); 133 printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__);
156 return -EINVAL; 134 return -EINVAL;
157 } 135 }
158 136
159 /* 137 /*
160 * Set mrblr 138 * Set mrblr
161 * Check that 'max_rx_buf_length' is properly aligned (4), unless 139 * Check that 'max_rx_buf_length' is properly aligned (4), unless
162 * rfw is 1, meaning that QE accepts one byte at a time, unlike normal 140 * rfw is 1, meaning that QE accepts one byte at a time, unlike normal
163 * case when QE accepts 32 bits at a time. 141 * case when QE accepts 32 bits at a time.
164 */ 142 */
165 if ((!us_info->rfw) && 143 if ((!us_info->rfw) &&
166 (us_info->max_rx_buf_length & (UCC_SLOW_MRBLR_ALIGNMENT - 1))) { 144 (us_info->max_rx_buf_length & (UCC_SLOW_MRBLR_ALIGNMENT - 1))) {
167 uccs_err("max_rx_buf_length not aligned."); 145 printk(KERN_ERR "max_rx_buf_length not aligned.");
168 return -EINVAL; 146 return -EINVAL;
169 } 147 }
170 148
171 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); 149 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL);
172 if (!uccs) { 150 if (!uccs) {
173 uccs_err 151 printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__);
174 ("ucc_slow_init: No memory for UCC slow data structure!");
175 return -ENOMEM; 152 return -ENOMEM;
176 } 153 }
177 154
178 /* Fill slow UCC structure */ 155 /* Fill slow UCC structure */
179 uccs->us_info = us_info; 156 uccs->us_info = us_info;
157 /* Set the PHY base address */
158 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow));
159 if (uccs->us_regs == NULL) {
160 printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__);
161 return -ENOMEM;
162 }
163
180 uccs->saved_uccm = 0; 164 uccs->saved_uccm = 0;
181 uccs->p_rx_frame = 0; 165 uccs->p_rx_frame = 0;
182 uccs->us_regs = us_info->us_regs;
183 us_regs = uccs->us_regs; 166 us_regs = uccs->us_regs;
184 uccs->p_ucce = (u16 *) & (us_regs->ucce); 167 uccs->p_ucce = (u16 *) & (us_regs->ucce);
185 uccs->p_uccm = (u16 *) & (us_regs->uccm); 168 uccs->p_uccm = (u16 *) & (us_regs->uccm);
@@ -190,33 +173,31 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
190#endif /* STATISTICS */ 173#endif /* STATISTICS */
191 174
192 /* Get PRAM base */ 175 /* Get PRAM base */
193 uccs->us_pram_offset = qe_muram_alloc(UCC_SLOW_PRAM_SIZE, 176 uccs->us_pram_offset =
194 ALIGNMENT_OF_UCC_SLOW_PRAM); 177 qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM);
195 if (IS_MURAM_ERR(uccs->us_pram_offset)) { 178 if (IS_MURAM_ERR(uccs->us_pram_offset)) {
196 uccs_err 179 printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__);
197 ("ucc_slow_init: Can not allocate MURAM memory "
198 "for Slow UCC.");
199 ucc_slow_free(uccs); 180 ucc_slow_free(uccs);
200 return -ENOMEM; 181 return -ENOMEM;
201 } 182 }
202 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 183 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
203 qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, id, QE_CR_PROTOCOL_UNSPECIFIED, 184 qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, id, QE_CR_PROTOCOL_UNSPECIFIED,
204 (u32) uccs->us_pram_offset); 185 uccs->us_pram_offset);
205 186
206 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); 187 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset);
207 188
208 /* Init Guemr register */ 189 /* Init Guemr register */
209 if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->us_regs)))) { 190 if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) {
210 uccs_err("ucc_slow_init: Could not init the guemr register."); 191 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
211 ucc_slow_free(uccs); 192 ucc_slow_free(uccs);
212 return ret; 193 return ret;
213 } 194 }
214 195
215 /* Set UCC to slow type */ 196 /* Set UCC to slow type */
216 if ((ret = ucc_set_type(us_info->ucc_num, 197 if ((ret = ucc_set_type(us_info->ucc_num,
217 (struct ucc_common *) (us_info->us_regs), 198 (struct ucc_common *) (us_info->regs),
218 UCC_SPEED_TYPE_SLOW))) { 199 UCC_SPEED_TYPE_SLOW))) {
219 uccs_err("ucc_slow_init: Could not init the guemr register."); 200 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
220 ucc_slow_free(uccs); 201 ucc_slow_free(uccs);
221 return ret; 202 return ret;
222 } 203 }
@@ -230,7 +211,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
230 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), 211 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd),
231 QE_ALIGNMENT_OF_BD); 212 QE_ALIGNMENT_OF_BD);
232 if (IS_MURAM_ERR(uccs->rx_base_offset)) { 213 if (IS_MURAM_ERR(uccs->rx_base_offset)) {
233 uccs_err("ucc_slow_init: No memory for Rx BD's."); 214 printk(KERN_ERR "%s: cannot allocate RX BDs", __FUNCTION__);
234 uccs->rx_base_offset = 0; 215 uccs->rx_base_offset = 0;
235 ucc_slow_free(uccs); 216 ucc_slow_free(uccs);
236 return -ENOMEM; 217 return -ENOMEM;
@@ -240,7 +221,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
240 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), 221 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd),
241 QE_ALIGNMENT_OF_BD); 222 QE_ALIGNMENT_OF_BD);
242 if (IS_MURAM_ERR(uccs->tx_base_offset)) { 223 if (IS_MURAM_ERR(uccs->tx_base_offset)) {
243 uccs_err("ucc_slow_init: No memory for Tx BD's."); 224 printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__);
244 uccs->tx_base_offset = 0; 225 uccs->tx_base_offset = 0;
245 ucc_slow_free(uccs); 226 ucc_slow_free(uccs);
246 return -ENOMEM; 227 return -ENOMEM;
@@ -248,34 +229,33 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
248 229
249 /* Init Tx bds */ 230 /* Init Tx bds */
250 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset); 231 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset);
251 for (i = 0; i < us_info->tx_bd_ring_len; i++) { 232 for (i = 0; i < us_info->tx_bd_ring_len - 1; i++) {
252 /* clear bd buffer */ 233 /* clear bd buffer */
253 out_be32(&(((struct qe_bd *)bd)->buf), 0); 234 out_be32(&bd->buf, 0);
254 /* set bd status and length */ 235 /* set bd status and length */
255 out_be32((u32*)bd, 0); 236 out_be32((u32 *) bd, 0);
256 bd += sizeof(struct qe_bd); 237 bd++;
257 } 238 }
258 bd -= sizeof(struct qe_bd); 239 /* for last BD set Wrap bit */
259 /* set bd status and length */ 240 out_be32(&bd->buf, 0);
260 out_be32((u32*)bd, T_W); /* for last BD set Wrap bit */ 241 out_be32((u32 *) bd, cpu_to_be32(T_W));
261 242
262 /* Init Rx bds */ 243 /* Init Rx bds */
263 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset); 244 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset);
264 for (i = 0; i < us_info->rx_bd_ring_len; i++) { 245 for (i = 0; i < us_info->rx_bd_ring_len - 1; i++) {
265 /* set bd status and length */ 246 /* set bd status and length */
266 out_be32((u32*)bd, 0); 247 out_be32((u32*)bd, 0);
267 /* clear bd buffer */ 248 /* clear bd buffer */
268 out_be32(&(((struct qe_bd *)bd)->buf), 0); 249 out_be32(&bd->buf, 0);
269 bd += sizeof(struct qe_bd); 250 bd++;
270 } 251 }
271 bd -= sizeof(struct qe_bd); 252 /* for last BD set Wrap bit */
272 /* set bd status and length */ 253 out_be32((u32*)bd, cpu_to_be32(R_W));
273 out_be32((u32*)bd, R_W); /* for last BD set Wrap bit */ 254 out_be32(&bd->buf, 0);
274 255
275 /* Set GUMR (For more details see the hardware spec.). */ 256 /* Set GUMR (For more details see the hardware spec.). */
276 /* gumr_h */ 257 /* gumr_h */
277 gumr = 0; 258 gumr = us_info->tcrc;
278 gumr |= us_info->tcrc;
279 if (us_info->cdp) 259 if (us_info->cdp)
280 gumr |= UCC_SLOW_GUMR_H_CDP; 260 gumr |= UCC_SLOW_GUMR_H_CDP;
281 if (us_info->ctsp) 261 if (us_info->ctsp)
@@ -295,7 +275,8 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
295 out_be32(&us_regs->gumr_h, gumr); 275 out_be32(&us_regs->gumr_h, gumr);
296 276
297 /* gumr_l */ 277 /* gumr_l */
298 gumr = 0; 278 gumr = us_info->tdcr | us_info->rdcr | us_info->tenc | us_info->renc |
279 us_info->diag | us_info->mode;
299 if (us_info->tci) 280 if (us_info->tci)
300 gumr |= UCC_SLOW_GUMR_L_TCI; 281 gumr |= UCC_SLOW_GUMR_L_TCI;
301 if (us_info->rinv) 282 if (us_info->rinv)
@@ -304,23 +285,14 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
304 gumr |= UCC_SLOW_GUMR_L_TINV; 285 gumr |= UCC_SLOW_GUMR_L_TINV;
305 if (us_info->tend) 286 if (us_info->tend)
306 gumr |= UCC_SLOW_GUMR_L_TEND; 287 gumr |= UCC_SLOW_GUMR_L_TEND;
307 gumr |= us_info->tdcr;
308 gumr |= us_info->rdcr;
309 gumr |= us_info->tenc;
310 gumr |= us_info->renc;
311 gumr |= us_info->diag;
312 gumr |= us_info->mode;
313 out_be32(&us_regs->gumr_l, gumr); 288 out_be32(&us_regs->gumr_l, gumr);
314 289
315 /* Function code registers */ 290 /* Function code registers */
316 /* function_code has initial value 0 */
317 291
318 /* if the data is in cachable memory, the 'global' */ 292 /* if the data is in cachable memory, the 'global' */
319 /* in the function code should be set. */ 293 /* in the function code should be set. */
320 function_code |= us_info->data_mem_part; 294 uccs->us_pram->tfcr = uccs->us_pram->rfcr =
321 function_code |= QE_BMR_BYTE_ORDER_BO_MOT; /* Required for QE */ 295 us_info->data_mem_part | QE_BMR_BYTE_ORDER_BO_MOT;
322 uccs->us_pram->tfcr = function_code;
323 uccs->us_pram->rfcr = function_code;
324 296
325 /* rbase, tbase are offsets from MURAM base */ 297 /* rbase, tbase are offsets from MURAM base */
326 out_be16(&uccs->us_pram->rbase, uccs->us_pram_offset); 298 out_be16(&uccs->us_pram->rbase, uccs->us_pram_offset);
@@ -336,34 +308,29 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
336 /* If NMSI (not Tsa), set Tx and Rx clock. */ 308 /* If NMSI (not Tsa), set Tx and Rx clock. */
337 if (!us_info->tsa) { 309 if (!us_info->tsa) {
338 /* Rx clock routing */ 310 /* Rx clock routing */
339 if (ucc_set_qe_mux_rxtx 311 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock,
340 (us_info->ucc_num, us_info->rx_clock, COMM_DIR_RX)) { 312 COMM_DIR_RX)) {
341 uccs_err 313 printk(KERN_ERR "%s: illegal value for RX clock",
342 ("ucc_slow_init: Illegal value for parameter" 314 __FUNCTION__);
343 " 'RxClock'.");
344 ucc_slow_free(uccs); 315 ucc_slow_free(uccs);
345 return -EINVAL; 316 return -EINVAL;
346 } 317 }
347 /* Tx clock routing */ 318 /* Tx clock routing */
348 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, 319 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock,
349 us_info->tx_clock, COMM_DIR_TX)) { 320 COMM_DIR_TX)) {
350 uccs_err 321 printk(KERN_ERR "%s: illegal value for TX clock",
351 ("ucc_slow_init: Illegal value for parameter " 322 __FUNCTION__);
352 "'TxClock'.");
353 ucc_slow_free(uccs); 323 ucc_slow_free(uccs);
354 return -EINVAL; 324 return -EINVAL;
355 } 325 }
356 } 326 }
357 327
358 /*
359 * INTERRUPTS
360 */
361 /* Set interrupt mask register at UCC level. */ 328 /* Set interrupt mask register at UCC level. */
362 out_be16(&us_regs->uccm, us_info->uccm_mask); 329 out_be16(&us_regs->uccm, us_info->uccm_mask);
363 330
364 /* First, clear anything pending at UCC level, */ 331 /* First, clear anything pending at UCC level,
365 /* otherwise, old garbage may come through */ 332 * otherwise, old garbage may come through
366 /* as soon as the dam is opened. */ 333 * as soon as the dam is opened. */
367 334
368 /* Writing '1' clears */ 335 /* Writing '1' clears */
369 out_be16(&us_regs->ucce, 0xffff); 336 out_be16(&us_regs->ucce, 0xffff);
@@ -400,3 +367,5 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
400 367
401 kfree(uccs); 368 kfree(uccs);
402} 369}
370
371
diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c
index 5d841f4b3530..af3780e52e76 100644
--- a/arch/powerpc/xmon/ppc-opc.c
+++ b/arch/powerpc/xmon/ppc-opc.c
@@ -21,6 +21,7 @@
21 02110-1301, USA. */ 21 02110-1301, USA. */
22 22
23#include <linux/stddef.h> 23#include <linux/stddef.h>
24#include <linux/kernel.h>
24#include "nonstdio.h" 25#include "nonstdio.h"
25#include "ppc.h" 26#include "ppc.h"
26 27
@@ -4932,8 +4933,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
4932 4933
4933}; 4934};
4934 4935
4935const int powerpc_num_opcodes = 4936const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes);
4936 sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
4937 4937
4938/* The macro table. This is only used by the assembler. */ 4938/* The macro table. This is only used by the assembler. */
4939 4939
@@ -4989,5 +4989,4 @@ const struct powerpc_macro powerpc_macros[] = {
4989{ "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" }, 4989{ "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
4990}; 4990};
4991 4991
4992const int powerpc_num_macros = 4992const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
4993 sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/arch/powerpc/xmon/spu-dis.c b/arch/powerpc/xmon/spu-dis.c
index ee929c641bf3..e5f89837c82e 100644
--- a/arch/powerpc/xmon/spu-dis.c
+++ b/arch/powerpc/xmon/spu-dis.c
@@ -85,7 +85,7 @@ get_index_for_opcode (unsigned int insn)
85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0) 85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0)
86 return index; 86 return index;
87 87
88 return 0; 88 return NULL;
89} 89}
90 90
91/* Print a Spu instruction. */ 91/* Print a Spu instruction. */
diff --git a/arch/powerpc/xmon/spu-opc.c b/arch/powerpc/xmon/spu-opc.c
index efffde9edc6e..530df3d6d7b2 100644
--- a/arch/powerpc/xmon/spu-opc.c
+++ b/arch/powerpc/xmon/spu-opc.c
@@ -18,6 +18,7 @@
18 with this program; if not, write to the Free Software Foundation, Inc., 18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20 20
21#include <linux/kernel.h>
21#include "spu.h" 22#include "spu.h"
22 23
23/* This file holds the Spu opcode table */ 24/* This file holds the Spu opcode table */
@@ -40,5 +41,4 @@ const struct spu_opcode spu_opcodes[] = {
40#undef APUOPFB 41#undef APUOPFB
41}; 42};
42 43
43const int spu_num_opcodes = 44const int spu_num_opcodes = ARRAY_SIZE(spu_opcodes);
44 sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 77540a2f7704..0183e5fbaf46 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2811,7 +2811,6 @@ static void dump_spu_fields(struct spu *spu)
2811 DUMP_FIELD(spu, "0x%lx", irqs[2]); 2811 DUMP_FIELD(spu, "0x%lx", irqs[2]);
2812 DUMP_FIELD(spu, "0x%x", slb_replace); 2812 DUMP_FIELD(spu, "0x%x", slb_replace);
2813 DUMP_FIELD(spu, "%d", pid); 2813 DUMP_FIELD(spu, "%d", pid);
2814 DUMP_FIELD(spu, "%d", prio);
2815 DUMP_FIELD(spu, "0x%p", mm); 2814 DUMP_FIELD(spu, "0x%p", mm);
2816 DUMP_FIELD(spu, "0x%p", ctx); 2815 DUMP_FIELD(spu, "0x%p", ctx);
2817 DUMP_FIELD(spu, "0x%p", rq); 2816 DUMP_FIELD(spu, "0x%p", rq);
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c
index b7bb5f0b3c5f..a956f28ab162 100644
--- a/arch/ppc/8xx_io/cs4218_tdm.c
+++ b/arch/ppc/8xx_io/cs4218_tdm.c
@@ -1379,7 +1379,6 @@ static void cs_nosound(unsigned long xx)
1379} 1379}
1380 1380
1381static DEFINE_TIMER(beep_timer, cs_nosound, 0, 0); 1381static DEFINE_TIMER(beep_timer, cs_nosound, 0, 0);
1382};
1383 1382
1384static void cs_mksound(unsigned int hz, unsigned int ticks) 1383static void cs_mksound(unsigned int hz, unsigned int ticks)
1385{ 1384{
@@ -1712,7 +1711,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd,
1712} 1711}
1713 1712
1714 1713
1715static struct file_operations mixer_fops = 1714static const struct file_operations mixer_fops =
1716{ 1715{
1717 .owner = THIS_MODULE, 1716 .owner = THIS_MODULE,
1718 .llseek = sound_lseek, 1717 .llseek = sound_lseek,
@@ -2299,7 +2298,7 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd,
2299 2298
2300 2299
2301 2300
2302static struct file_operations sq_fops = 2301static const struct file_operations sq_fops =
2303{ 2302{
2304 .owner = THIS_MODULE, 2303 .owner = THIS_MODULE,
2305 .llseek = sound_lseek, 2304 .llseek = sound_lseek,
@@ -2434,7 +2433,7 @@ static ssize_t state_read(struct file *file, char *buf, size_t count,
2434} 2433}
2435 2434
2436 2435
2437static struct file_operations state_fops = 2436static const struct file_operations state_fops =
2438{ 2437{
2439 .owner = THIS_MODULE, 2438 .owner = THIS_MODULE,
2440 .llseek = sound_lseek, 2439 .llseek = sound_lseek,
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 8eb82efe05a1..ccce2a4a1522 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -670,15 +670,6 @@ config RADSTONE_PPC7D
670config PAL4 670config PAL4
671 bool "SBS-Palomar4" 671 bool "SBS-Palomar4"
672 672
673config GEMINI
674 bool "Synergy-Gemini"
675 depends on BROKEN
676 select PPC_INDIRECT_PCI
677 help
678 Select Gemini if configuring for a Synergy Microsystems' Gemini
679 series Single Board Computer. More information is available at:
680 <http://www.synergymicro.com/PressRel/97_10_15.html>.
681
682config EST8260 673config EST8260
683 bool "EST8260" 674 bool "EST8260"
684 ---help--- 675 ---help---
@@ -854,6 +845,21 @@ config MV64X60
854 select PPC_INDIRECT_PCI 845 select PPC_INDIRECT_PCI
855 default y 846 default y
856 847
848config MV643XX_ETH_0
849 bool
850 depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360 || HDPU)
851 default y
852
853config MV643XX_ETH_1
854 bool
855 depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360)
856 default y
857
858config MV643XX_ETH_2
859 bool
860 depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360)
861 default y
862
857menu "Set bridge options" 863menu "Set bridge options"
858 depends on MV64X60 864 depends on MV64X60
859 865
@@ -1186,6 +1192,10 @@ config ISA
1186 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If 1192 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
1187 you have an embedded board, consult your board documentation. 1193 you have an embedded board, consult your board documentation.
1188 1194
1195config ZONE_DMA
1196 bool
1197 default y
1198
1189config GENERIC_ISA_DMA 1199config GENERIC_ISA_DMA
1190 bool 1200 bool
1191 depends on 6xx && !CPM2 1201 depends on 6xx && !CPM2
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
index 28be01b99c44..bcfb6cde70c4 100644
--- a/arch/ppc/boot/simple/Makefile
+++ b/arch/ppc/boot/simple/Makefile
@@ -116,10 +116,6 @@ zimageinitrd-$(CONFIG_WALNUT) := zImage.initrd-TREE
116 extra.o-$(CONFIG_CHESTNUT) := misc-chestnut.o 116 extra.o-$(CONFIG_CHESTNUT) := misc-chestnut.o
117 end-$(CONFIG_CHESTNUT) := chestnut 117 end-$(CONFIG_CHESTNUT) := chestnut
118 118
119 zimage-$(CONFIG_GEMINI) := zImage-STRIPELF
120zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF
121 end-$(CONFIG_GEMINI) := gemini
122
123 extra.o-$(CONFIG_KATANA) := misc-katana.o 119 extra.o-$(CONFIG_KATANA) := misc-katana.o
124 end-$(CONFIG_KATANA) := katana 120 end-$(CONFIG_KATANA) := katana
125 cacheflag-$(CONFIG_KATANA) := -include $(clear_L2_L3) 121 cacheflag-$(CONFIG_KATANA) := -include $(clear_L2_L3)
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
index a5df08963695..c3d3305eb5ca 100644
--- a/arch/ppc/boot/simple/misc.c
+++ b/arch/ppc/boot/simple/misc.c
@@ -42,14 +42,11 @@
42#endif 42#endif
43 43
44/* Will / Can the user give input? 44/* Will / Can the user give input?
45 * Val Henson has requested that Gemini doesn't wait for the
46 * user to edit the cmdline or not.
47 */ 45 */
48#if (defined(CONFIG_SERIAL_8250_CONSOLE) \ 46#if (defined(CONFIG_SERIAL_8250_CONSOLE) \
49 || defined(CONFIG_VGA_CONSOLE) \ 47 || defined(CONFIG_VGA_CONSOLE) \
50 || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \ 48 || defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
51 || defined(CONFIG_SERIAL_MPSC_CONSOLE)) \ 49 || defined(CONFIG_SERIAL_MPSC_CONSOLE))
52 && !defined(CONFIG_GEMINI)
53#define INTERACTIVE_CONSOLE 1 50#define INTERACTIVE_CONSOLE 1
54#endif 51#endif
55 52
@@ -178,16 +175,6 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
178 175
179 if (keyb_present) 176 if (keyb_present)
180 CRT_tstc(); /* Forces keyboard to be initialized */ 177 CRT_tstc(); /* Forces keyboard to be initialized */
181#ifdef CONFIG_GEMINI
182 /*
183 * If cmd_line is empty and cmd_preset is not, copy cmd_preset
184 * to cmd_line. This way we can override cmd_preset with the
185 * command line from Smon.
186 */
187
188 if ( (cmd_line[0] == '\0') && (cmd_preset[0] != '\0'))
189 memcpy (cmd_line, cmd_preset, sizeof(cmd_preset));
190#endif
191 178
192 /* Display standard Linux/PPC boot prompt for kernel args */ 179 /* Display standard Linux/PPC boot prompt for kernel args */
193 puts("\nLinux/PPC load: "); 180 puts("\nLinux/PPC load: ");
diff --git a/arch/ppc/configs/gemini_defconfig b/arch/ppc/configs/gemini_defconfig
deleted file mode 100644
index ebcd17b097f1..000000000000
--- a/arch/ppc/configs/gemini_defconfig
+++ /dev/null
@@ -1,618 +0,0 @@
1#
2# Automatically generated make config: don't edit
3#
4CONFIG_MMU=y
5CONFIG_RWSEM_XCHGADD_ALGORITHM=y
6CONFIG_HAVE_DEC_LOCK=y
7
8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12
13#
14# General setup
15#
16CONFIG_SWAP=y
17CONFIG_SYSVIPC=y
18# CONFIG_BSD_PROCESS_ACCT is not set
19CONFIG_SYSCTL=y
20CONFIG_LOG_BUF_SHIFT=14
21# CONFIG_EMBEDDED is not set
22CONFIG_FUTEX=y
23CONFIG_EPOLL=y
24
25#
26# Loadable module support
27#
28CONFIG_MODULES=y
29CONFIG_MODULE_UNLOAD=y
30# CONFIG_MODULE_FORCE_UNLOAD is not set
31CONFIG_OBSOLETE_MODPARM=y
32# CONFIG_MODVERSIONS is not set
33CONFIG_KMOD=y
34
35#
36# Platform support
37#
38CONFIG_PPC=y
39CONFIG_PPC32=y
40CONFIG_6xx=y
41# CONFIG_40x is not set
42# CONFIG_POWER3 is not set
43# CONFIG_8xx is not set
44
45#
46# IBM 4xx options
47#
48# CONFIG_8260 is not set
49CONFIG_GENERIC_ISA_DMA=y
50CONFIG_PPC_STD_MMU=y
51# CONFIG_PPC_MULTIPLATFORM is not set
52# CONFIG_APUS is not set
53# CONFIG_WILLOW_2 is not set
54# CONFIG_PCORE is not set
55# CONFIG_POWERPMC250 is not set
56# CONFIG_EV64260 is not set
57# CONFIG_SPRUCE is not set
58# CONFIG_LOPEC is not set
59# CONFIG_MCPN765 is not set
60# CONFIG_MVME5100 is not set
61# CONFIG_PPLUS is not set
62# CONFIG_PRPMC750 is not set
63# CONFIG_PRPMC800 is not set
64# CONFIG_SANDPOINT is not set
65# CONFIG_ADIR is not set
66# CONFIG_K2 is not set
67# CONFIG_PAL4 is not set
68CONFIG_GEMINI=y
69# CONFIG_SMP is not set
70# CONFIG_PREEMPT is not set
71CONFIG_ALTIVEC=y
72CONFIG_TAU=y
73# CONFIG_TAU_INT is not set
74# CONFIG_TAU_AVERAGE is not set
75# CONFIG_CPU_FREQ is not set
76
77#
78# General setup
79#
80# CONFIG_HIGHMEM is not set
81CONFIG_PCI=y
82CONFIG_PCI_DOMAINS=y
83CONFIG_KCORE_ELF=y
84CONFIG_BINFMT_ELF=y
85CONFIG_KERNEL_ELF=y
86# CONFIG_BINFMT_MISC is not set
87CONFIG_PCI_LEGACY_PROC=y
88CONFIG_PCI_NAMES=y
89# CONFIG_HOTPLUG is not set
90
91#
92# Parallel port support
93#
94# CONFIG_PARPORT is not set
95# CONFIG_PPC601_SYNC_FIX is not set
96# CONFIG_CMDLINE_BOOL is not set
97
98#
99# Advanced setup
100#
101# CONFIG_ADVANCED_OPTIONS is not set
102
103#
104# Default settings for advanced configuration options are used
105#
106CONFIG_HIGHMEM_START=0xfe000000
107CONFIG_LOWMEM_SIZE=0x30000000
108CONFIG_KERNEL_START=0xc0000000
109CONFIG_TASK_SIZE=0x80000000
110CONFIG_BOOT_LOAD=0x00800000
111
112#
113# Memory Technology Devices (MTD)
114#
115# CONFIG_MTD is not set
116
117#
118# Plug and Play support
119#
120# CONFIG_PNP is not set
121
122#
123# Block devices
124#
125# CONFIG_BLK_DEV_FD is not set
126# CONFIG_BLK_CPQ_DA is not set
127# CONFIG_BLK_CPQ_CISS_DA is not set
128# CONFIG_BLK_DEV_DAC960 is not set
129# CONFIG_BLK_DEV_UMEM is not set
130# CONFIG_BLK_DEV_LOOP is not set
131# CONFIG_BLK_DEV_NBD is not set
132CONFIG_BLK_DEV_RAM=y
133CONFIG_BLK_DEV_RAM_SIZE=4096
134CONFIG_BLK_DEV_INITRD=y
135
136#
137# Multi-device support (RAID and LVM)
138#
139# CONFIG_MD is not set
140
141#
142# ATA/IDE/MFM/RLL support
143#
144# CONFIG_IDE is not set
145
146#
147# SCSI support
148#
149CONFIG_SCSI=y
150
151#
152# SCSI support type (disk, tape, CD-ROM)
153#
154CONFIG_BLK_DEV_SD=y
155# CONFIG_CHR_DEV_ST is not set
156# CONFIG_CHR_DEV_OSST is not set
157CONFIG_BLK_DEV_SR=y
158CONFIG_BLK_DEV_SR_VENDOR=y
159CONFIG_CHR_DEV_SG=y
160
161#
162# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
163#
164# CONFIG_SCSI_MULTI_LUN is not set
165# CONFIG_SCSI_REPORT_LUNS is not set
166CONFIG_SCSI_CONSTANTS=y
167# CONFIG_SCSI_LOGGING is not set
168
169#
170# SCSI low-level drivers
171#
172# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
173# CONFIG_SCSI_ACARD is not set
174# CONFIG_SCSI_AACRAID is not set
175# CONFIG_SCSI_AIC7XXX is not set
176# CONFIG_SCSI_AIC7XXX_OLD is not set
177# CONFIG_SCSI_AIC79XX is not set
178# CONFIG_SCSI_DPT_I2O is not set
179# CONFIG_SCSI_ADVANSYS is not set
180# CONFIG_SCSI_IN2000 is not set
181# CONFIG_SCSI_AM53C974 is not set
182# CONFIG_SCSI_MEGARAID is not set
183# CONFIG_SCSI_BUSLOGIC is not set
184# CONFIG_SCSI_CPQFCTS is not set
185# CONFIG_SCSI_DMX3191D is not set
186# CONFIG_SCSI_EATA is not set
187# CONFIG_SCSI_EATA_PIO is not set
188# CONFIG_SCSI_FUTURE_DOMAIN is not set
189# CONFIG_SCSI_GDTH is not set
190# CONFIG_SCSI_GENERIC_NCR5380 is not set
191# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
192# CONFIG_SCSI_INITIO is not set
193# CONFIG_SCSI_INIA100 is not set
194# CONFIG_SCSI_NCR53C7xx is not set
195CONFIG_SCSI_SYM53C8XX_2=y
196CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
197CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
198CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
199# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
200# CONFIG_SCSI_PCI2000 is not set
201# CONFIG_SCSI_PCI2220I is not set
202# CONFIG_SCSI_QLOGIC_ISP is not set
203# CONFIG_SCSI_QLOGIC_FC is not set
204# CONFIG_SCSI_QLOGIC_1280 is not set
205# CONFIG_SCSI_DC395x is not set
206# CONFIG_SCSI_DC390T is not set
207# CONFIG_SCSI_U14_34F is not set
208# CONFIG_SCSI_NSP32 is not set
209# CONFIG_SCSI_DEBUG is not set
210
211#
212# Fusion MPT device support
213#
214# CONFIG_FUSION is not set
215
216#
217# IEEE 1394 (FireWire) support (EXPERIMENTAL)
218#
219# CONFIG_IEEE1394 is not set
220
221#
222# I2O device support
223#
224# CONFIG_I2O is not set
225
226#
227# Networking support
228#
229CONFIG_NET=y
230
231#
232# Networking options
233#
234CONFIG_PACKET=y
235# CONFIG_PACKET_MMAP is not set
236# CONFIG_NETLINK_DEV is not set
237CONFIG_NETFILTER=y
238# CONFIG_NETFILTER_DEBUG is not set
239CONFIG_UNIX=y
240# CONFIG_NET_KEY is not set
241CONFIG_INET=y
242# CONFIG_IP_MULTICAST is not set
243# CONFIG_IP_ADVANCED_ROUTER is not set
244# CONFIG_IP_PNP is not set
245# CONFIG_NET_IPIP is not set
246# CONFIG_NET_IPGRE is not set
247# CONFIG_ARPD is not set
248# CONFIG_INET_ECN is not set
249# CONFIG_SYN_COOKIES is not set
250# CONFIG_INET_AH is not set
251# CONFIG_INET_ESP is not set
252# CONFIG_INET_IPCOMP is not set
253
254#
255# IP: Netfilter Configuration
256#
257# CONFIG_IP_NF_CONNTRACK is not set
258# CONFIG_IP_NF_QUEUE is not set
259# CONFIG_IP_NF_IPTABLES is not set
260# CONFIG_IP_NF_ARPTABLES is not set
261# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
262# CONFIG_IP_NF_COMPAT_IPFWADM is not set
263# CONFIG_IPV6 is not set
264# CONFIG_XFRM_USER is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269CONFIG_IPV6_SCTP__=y
270# CONFIG_IP_SCTP is not set
271# CONFIG_ATM is not set
272# CONFIG_VLAN_8021Q is not set
273# CONFIG_LLC is not set
274# CONFIG_DECNET is not set
275# CONFIG_BRIDGE is not set
276# CONFIG_X25 is not set
277# CONFIG_LAPB is not set
278# CONFIG_NET_DIVERT is not set
279# CONFIG_ECONET is not set
280# CONFIG_WAN_ROUTER is not set
281# CONFIG_NET_HW_FLOWCONTROL is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287
288#
289# Network testing
290#
291# CONFIG_NET_PKTGEN is not set
292CONFIG_NETDEVICES=y
293
294#
295# ARCnet devices
296#
297# CONFIG_ARCNET is not set
298# CONFIG_DUMMY is not set
299# CONFIG_BONDING is not set
300# CONFIG_EQUALIZER is not set
301# CONFIG_TUN is not set
302# CONFIG_ETHERTAP is not set
303
304#
305# Ethernet (10 or 100Mbit)
306#
307CONFIG_NET_ETHERNET=y
308# CONFIG_MII is not set
309# CONFIG_OAKNET is not set
310# CONFIG_HAPPYMEAL is not set
311# CONFIG_SUNGEM is not set
312# CONFIG_NET_VENDOR_3COM is not set
313
314#
315# Tulip family network device support
316#
317# CONFIG_NET_TULIP is not set
318# CONFIG_HP100 is not set
319# CONFIG_NET_PCI is not set
320
321#
322# Ethernet (1000 Mbit)
323#
324# CONFIG_ACENIC is not set
325# CONFIG_DL2K is not set
326# CONFIG_E1000 is not set
327# CONFIG_NS83820 is not set
328# CONFIG_HAMACHI is not set
329# CONFIG_YELLOWFIN is not set
330# CONFIG_R8169 is not set
331# CONFIG_SK98LIN is not set
332# CONFIG_TIGON3 is not set
333
334#
335# Ethernet (10000 Mbit)
336#
337# CONFIG_IXGB is not set
338# CONFIG_FDDI is not set
339# CONFIG_HIPPI is not set
340# CONFIG_PPP is not set
341# CONFIG_SLIP is not set
342
343#
344# Wireless LAN (non-hamradio)
345#
346# CONFIG_NET_RADIO is not set
347
348#
349# Token Ring devices (depends on LLC=y)
350#
351# CONFIG_NET_FC is not set
352# CONFIG_RCPCI is not set
353# CONFIG_SHAPER is not set
354
355#
356# Wan interfaces
357#
358# CONFIG_WAN is not set
359
360#
361# Amateur Radio support
362#
363# CONFIG_HAMRADIO is not set
364
365#
366# IrDA (infrared) support
367#
368# CONFIG_IRDA is not set
369
370#
371# ISDN subsystem
372#
373# CONFIG_ISDN_BOOL is not set
374
375#
376# Graphics support
377#
378# CONFIG_FB is not set
379
380#
381# Old CD-ROM drivers (not SCSI, not IDE)
382#
383# CONFIG_CD_NO_IDESCSI is not set
384
385#
386# Input device support
387#
388# CONFIG_INPUT is not set
389
390#
391# Userland interfaces
392#
393
394#
395# Input I/O drivers
396#
397# CONFIG_GAMEPORT is not set
398CONFIG_SOUND_GAMEPORT=y
399# CONFIG_SERIO is not set
400
401#
402# Input Device Drivers
403#
404
405#
406# Macintosh device drivers
407#
408
409#
410# Character devices
411#
412# CONFIG_SERIAL_NONSTANDARD is not set
413
414#
415# Serial drivers
416#
417CONFIG_SERIAL_8250=y
418CONFIG_SERIAL_8250_CONSOLE=y
419# CONFIG_SERIAL_8250_EXTENDED is not set
420
421#
422# Non-8250 serial port support
423#
424CONFIG_SERIAL_CORE=y
425CONFIG_SERIAL_CORE_CONSOLE=y
426CONFIG_UNIX98_PTYS=y
427CONFIG_UNIX98_PTY_COUNT=256
428
429#
430# I2C support
431#
432# CONFIG_I2C is not set
433
434#
435# I2C Hardware Sensors Mainboard support
436#
437
438#
439# I2C Hardware Sensors Chip support
440#
441# CONFIG_I2C_SENSOR is not set
442
443#
444# Mice
445#
446# CONFIG_BUSMOUSE is not set
447# CONFIG_QIC02_TAPE is not set
448
449#
450# IPMI
451#
452# CONFIG_IPMI_HANDLER is not set
453
454#
455# Watchdog Cards
456#
457# CONFIG_WATCHDOG is not set
458# CONFIG_NVRAM is not set
459CONFIG_GEN_RTC=y
460# CONFIG_GEN_RTC_X is not set
461# CONFIG_DTLK is not set
462# CONFIG_R3964 is not set
463# CONFIG_APPLICOM is not set
464
465#
466# Ftape, the floppy tape device driver
467#
468# CONFIG_FTAPE is not set
469# CONFIG_AGP is not set
470# CONFIG_DRM is not set
471# CONFIG_RAW_DRIVER is not set
472# CONFIG_HANGCHECK_TIMER is not set
473
474#
475# Multimedia devices
476#
477# CONFIG_VIDEO_DEV is not set
478
479#
480# Digital Video Broadcasting Devices
481#
482# CONFIG_DVB is not set
483
484#
485# File systems
486#
487CONFIG_EXT2_FS=y
488# CONFIG_EXT2_FS_XATTR is not set
489# CONFIG_EXT3_FS is not set
490# CONFIG_JBD is not set
491# CONFIG_REISERFS_FS is not set
492# CONFIG_JFS_FS is not set
493# CONFIG_XFS_FS is not set
494# CONFIG_MINIX_FS is not set
495# CONFIG_ROMFS_FS is not set
496# CONFIG_QUOTA is not set
497# CONFIG_AUTOFS_FS is not set
498# CONFIG_AUTOFS4_FS is not set
499
500#
501# CD-ROM/DVD Filesystems
502#
503CONFIG_ISO9660_FS=y
504# CONFIG_JOLIET is not set
505# CONFIG_ZISOFS is not set
506# CONFIG_UDF_FS is not set
507
508#
509# DOS/FAT/NT Filesystems
510#
511# CONFIG_FAT_FS is not set
512# CONFIG_NTFS_FS is not set
513
514#
515# Pseudo filesystems
516#
517CONFIG_PROC_FS=y
518CONFIG_DEVFS_FS=y
519# CONFIG_DEVFS_MOUNT is not set
520# CONFIG_DEVFS_DEBUG is not set
521CONFIG_DEVPTS_FS=y
522# CONFIG_DEVPTS_FS_XATTR is not set
523CONFIG_TMPFS=y
524CONFIG_RAMFS=y
525
526#
527# Miscellaneous filesystems
528#
529# CONFIG_ADFS_FS is not set
530# CONFIG_AFFS_FS is not set
531# CONFIG_HFS_FS is not set
532# CONFIG_BEFS_FS is not set
533# CONFIG_BFS_FS is not set
534# CONFIG_EFS_FS is not set
535# CONFIG_CRAMFS is not set
536# CONFIG_VXFS_FS is not set
537# CONFIG_HPFS_FS is not set
538# CONFIG_QNX4FS_FS is not set
539# CONFIG_SYSV_FS is not set
540# CONFIG_UFS_FS is not set
541
542#
543# Network File Systems
544#
545CONFIG_NFS_FS=y
546# CONFIG_NFS_V3 is not set
547# CONFIG_NFS_V4 is not set
548CONFIG_NFSD=y
549# CONFIG_NFSD_V3 is not set
550# CONFIG_NFSD_TCP is not set
551CONFIG_LOCKD=y
552CONFIG_EXPORTFS=y
553CONFIG_SUNRPC=y
554# CONFIG_SUNRPC_GSS is not set
555# CONFIG_SMB_FS is not set
556# CONFIG_CIFS is not set
557# CONFIG_NCP_FS is not set
558# CONFIG_CODA_FS is not set
559# CONFIG_INTERMEZZO_FS is not set
560# CONFIG_AFS_FS is not set
561
562#
563# Partition Types
564#
565CONFIG_PARTITION_ADVANCED=y
566# CONFIG_ACORN_PARTITION is not set
567# CONFIG_OSF_PARTITION is not set
568# CONFIG_AMIGA_PARTITION is not set
569# CONFIG_ATARI_PARTITION is not set
570# CONFIG_MAC_PARTITION is not set
571CONFIG_MSDOS_PARTITION=y
572# CONFIG_BSD_DISKLABEL is not set
573# CONFIG_MINIX_SUBPARTITION is not set
574CONFIG_SOLARIS_X86_PARTITION=y
575# CONFIG_UNIXWARE_DISKLABEL is not set
576# CONFIG_LDM_PARTITION is not set
577# CONFIG_NEC98_PARTITION is not set
578# CONFIG_SGI_PARTITION is not set
579# CONFIG_ULTRIX_PARTITION is not set
580# CONFIG_SUN_PARTITION is not set
581# CONFIG_EFI_PARTITION is not set
582
583#
584# Sound
585#
586# CONFIG_SOUND is not set
587
588#
589# USB support
590#
591# CONFIG_USB is not set
592# CONFIG_USB_GADGET is not set
593
594#
595# Bluetooth support
596#
597# CONFIG_BT is not set
598
599#
600# Library routines
601#
602# CONFIG_CRC32 is not set
603
604#
605# Kernel hacking
606#
607# CONFIG_DEBUG_KERNEL is not set
608# CONFIG_KALLSYMS is not set
609
610#
611# Security options
612#
613# CONFIG_SECURITY is not set
614
615#
616# Cryptographic options
617#
618# CONFIG_CRYPTO is not set
diff --git a/arch/ppc/configs/taishan_defconfig b/arch/ppc/configs/taishan_defconfig
new file mode 100644
index 000000000000..1ca0204267b1
--- /dev/null
+++ b/arch/ppc/configs/taishan_defconfig
@@ -0,0 +1,1077 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Mon Feb 12 11:11:58 2007
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_ARCH_HAS_ILOG2_U32=y
10# CONFIG_ARCH_HAS_ILOG2_U64 is not set
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y
14CONFIG_PPC32=y
15CONFIG_GENERIC_NVRAM=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_GENERIC_BUG=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21
22#
23# Code maturity level options
24#
25CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y
27CONFIG_INIT_ENV_ARG_LIMIT=32
28
29#
30# General setup
31#
32CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SWAP=y
35CONFIG_SYSVIPC=y
36# CONFIG_IPC_NS is not set
37# CONFIG_POSIX_MQUEUE is not set
38# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set
43CONFIG_SYSFS_DEPRECATED=y
44# CONFIG_RELAY is not set
45CONFIG_INITRAMFS_SOURCE=""
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
47CONFIG_SYSCTL=y
48CONFIG_EMBEDDED=y
49CONFIG_SYSCTL_SYSCALL=y
50CONFIG_KALLSYMS=y
51# CONFIG_KALLSYMS_ALL is not set
52# CONFIG_KALLSYMS_EXTRA_PASS is not set
53# CONFIG_HOTPLUG is not set
54CONFIG_PRINTK=y
55CONFIG_BUG=y
56CONFIG_ELF_CORE=y
57CONFIG_BASE_FULL=y
58CONFIG_FUTEX=y
59CONFIG_EPOLL=y
60CONFIG_SHMEM=y
61CONFIG_SLAB=y
62CONFIG_VM_EVENT_COUNTERS=y
63CONFIG_RT_MUTEXES=y
64# CONFIG_TINY_SHMEM is not set
65CONFIG_BASE_SMALL=0
66# CONFIG_SLOB is not set
67
68#
69# Loadable module support
70#
71CONFIG_MODULES=y
72CONFIG_MODULE_UNLOAD=y
73# CONFIG_MODULE_FORCE_UNLOAD is not set
74# CONFIG_MODVERSIONS is not set
75# CONFIG_MODULE_SRCVERSION_ALL is not set
76CONFIG_KMOD=y
77
78#
79# Block layer
80#
81CONFIG_BLOCK=y
82# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85
86#
87# IO Schedulers
88#
89CONFIG_IOSCHED_NOOP=y
90CONFIG_IOSCHED_AS=y
91CONFIG_IOSCHED_DEADLINE=y
92CONFIG_IOSCHED_CFQ=y
93CONFIG_DEFAULT_AS=y
94# CONFIG_DEFAULT_DEADLINE is not set
95# CONFIG_DEFAULT_CFQ is not set
96# CONFIG_DEFAULT_NOOP is not set
97CONFIG_DEFAULT_IOSCHED="anticipatory"
98
99#
100# Processor
101#
102# CONFIG_6xx is not set
103# CONFIG_40x is not set
104CONFIG_44x=y
105# CONFIG_8xx is not set
106# CONFIG_E200 is not set
107# CONFIG_E500 is not set
108CONFIG_PPC_DCR_NATIVE=y
109CONFIG_PPC_DCR=y
110CONFIG_BOOKE=y
111CONFIG_PTE_64BIT=y
112CONFIG_PHYS_64BIT=y
113# CONFIG_MATH_EMULATION is not set
114# CONFIG_KEXEC is not set
115# CONFIG_CPU_FREQ is not set
116CONFIG_4xx=y
117CONFIG_WANT_EARLY_SERIAL=y
118
119#
120# IBM 4xx options
121#
122# CONFIG_BAMBOO is not set
123# CONFIG_EBONY is not set
124# CONFIG_LUAN is not set
125# CONFIG_YUCCA is not set
126# CONFIG_OCOTEA is not set
127CONFIG_TAISHAN=y
128CONFIG_440GX=y
129CONFIG_440A=y
130CONFIG_IBM_OCP=y
131CONFIG_IBM_EMAC4=y
132CONFIG_PPC4xx_DMA=y
133CONFIG_PPC4xx_EDMA=y
134CONFIG_PPC_GEN550=y
135CONFIG_NOT_COHERENT_CACHE=y
136
137#
138# Platform options
139#
140# CONFIG_PC_KEYBOARD is not set
141# CONFIG_HIGHMEM is not set
142CONFIG_ARCH_POPULATES_NODE_MAP=y
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_SELECT_MEMORY_MODEL=y
152CONFIG_FLATMEM_MANUAL=y
153# CONFIG_DISCONTIGMEM_MANUAL is not set
154# CONFIG_SPARSEMEM_MANUAL is not set
155CONFIG_FLATMEM=y
156CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set
158CONFIG_SPLIT_PTLOCK_CPUS=4
159CONFIG_RESOURCES_64BIT=y
160CONFIG_ZONE_DMA_FLAG=1
161CONFIG_BINFMT_ELF=y
162# CONFIG_BINFMT_MISC is not set
163CONFIG_CMDLINE_BOOL=y
164CONFIG_CMDLINE="ip=on console=ttyS0,115200"
165CONFIG_SECCOMP=y
166CONFIG_ISA_DMA_API=y
167
168#
169# Bus options
170#
171CONFIG_ZONE_DMA=y
172# CONFIG_PPC_I8259 is not set
173CONFIG_PPC_INDIRECT_PCI=y
174CONFIG_PCI=y
175CONFIG_PCI_DOMAINS=y
176# CONFIG_PCI_DEBUG is not set
177
178#
179# PCCARD (PCMCIA/CardBus) support
180#
181
182#
183# Advanced setup
184#
185# CONFIG_ADVANCED_OPTIONS is not set
186
187#
188# Default settings for advanced configuration options are used
189#
190CONFIG_HIGHMEM_START=0xfe000000
191CONFIG_LOWMEM_SIZE=0x30000000
192CONFIG_KERNEL_START=0xc0000000
193CONFIG_TASK_SIZE=0x80000000
194CONFIG_CONSISTENT_START=0xff100000
195CONFIG_CONSISTENT_SIZE=0x00200000
196CONFIG_BOOT_LOAD=0x01000000
197
198#
199# Networking
200#
201CONFIG_NET=y
202
203#
204# Networking options
205#
206# CONFIG_NETDEBUG is not set
207CONFIG_PACKET=y
208# CONFIG_PACKET_MMAP is not set
209CONFIG_UNIX=y
210CONFIG_XFRM=y
211# CONFIG_XFRM_USER is not set
212# CONFIG_XFRM_SUB_POLICY is not set
213# CONFIG_XFRM_MIGRATE is not set
214# CONFIG_NET_KEY is not set
215CONFIG_INET=y
216# CONFIG_IP_MULTICAST is not set
217CONFIG_IP_ADVANCED_ROUTER=y
218CONFIG_ASK_IP_FIB_HASH=y
219# CONFIG_IP_FIB_TRIE is not set
220CONFIG_IP_FIB_HASH=y
221# CONFIG_IP_MULTIPLE_TABLES is not set
222# CONFIG_IP_ROUTE_MULTIPATH is not set
223# CONFIG_IP_ROUTE_VERBOSE is not set
224CONFIG_IP_PNP=y
225# CONFIG_IP_PNP_DHCP is not set
226CONFIG_IP_PNP_BOOTP=y
227# CONFIG_IP_PNP_RARP is not set
228# CONFIG_NET_IPIP is not set
229# CONFIG_NET_IPGRE is not set
230# CONFIG_ARPD is not set
231# CONFIG_SYN_COOKIES is not set
232# CONFIG_INET_AH is not set
233# CONFIG_INET_ESP is not set
234# CONFIG_INET_IPCOMP is not set
235# CONFIG_INET_XFRM_TUNNEL is not set
236# CONFIG_INET_TUNNEL is not set
237CONFIG_INET_XFRM_MODE_TRANSPORT=y
238CONFIG_INET_XFRM_MODE_TUNNEL=y
239CONFIG_INET_XFRM_MODE_BEET=y
240CONFIG_INET_DIAG=y
241CONFIG_INET_TCP_DIAG=y
242# CONFIG_TCP_CONG_ADVANCED is not set
243CONFIG_TCP_CONG_CUBIC=y
244CONFIG_DEFAULT_TCP_CONG="cubic"
245# CONFIG_TCP_MD5SIG is not set
246# CONFIG_IPV6 is not set
247# CONFIG_INET6_XFRM_TUNNEL is not set
248# CONFIG_INET6_TUNNEL is not set
249# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set
251
252#
253# DCCP Configuration (EXPERIMENTAL)
254#
255# CONFIG_IP_DCCP is not set
256
257#
258# SCTP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_SCTP is not set
261
262#
263# TIPC Configuration (EXPERIMENTAL)
264#
265# CONFIG_TIPC is not set
266# CONFIG_ATM is not set
267CONFIG_BRIDGE=y
268# CONFIG_VLAN_8021Q is not set
269# CONFIG_DECNET is not set
270CONFIG_LLC=y
271# CONFIG_LLC2 is not set
272# CONFIG_IPX is not set
273# CONFIG_ATALK is not set
274# CONFIG_X25 is not set
275# CONFIG_LAPB is not set
276# CONFIG_ECONET is not set
277# CONFIG_WAN_ROUTER is not set
278
279#
280# QoS and/or fair queueing
281#
282# CONFIG_NET_SCHED is not set
283
284#
285# Network testing
286#
287# CONFIG_NET_PKTGEN is not set
288# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set
290# CONFIG_BT is not set
291# CONFIG_IEEE80211 is not set
292
293#
294# Device Drivers
295#
296
297#
298# Generic Driver Options
299#
300# CONFIG_STANDALONE is not set
301CONFIG_PREVENT_FIRMWARE_BUILD=y
302# CONFIG_DEBUG_DRIVER is not set
303# CONFIG_DEBUG_DEVRES is not set
304# CONFIG_SYS_HYPERVISOR is not set
305
306#
307# Connector - unified userspace <-> kernelspace linker
308#
309# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314CONFIG_MTD=y
315# CONFIG_MTD_DEBUG is not set
316CONFIG_MTD_CONCAT=y
317CONFIG_MTD_PARTITIONS=y
318# CONFIG_MTD_REDBOOT_PARTS is not set
319CONFIG_MTD_CMDLINE_PARTS=y
320
321#
322# User Modules And Translation Layers
323#
324CONFIG_MTD_CHAR=y
325CONFIG_MTD_BLKDEVS=y
326CONFIG_MTD_BLOCK=y
327# CONFIG_FTL is not set
328# CONFIG_NFTL is not set
329# CONFIG_INFTL is not set
330# CONFIG_RFD_FTL is not set
331# CONFIG_SSFDC is not set
332
333#
334# RAM/ROM/Flash chip drivers
335#
336CONFIG_MTD_CFI=y
337CONFIG_MTD_JEDECPROBE=y
338CONFIG_MTD_GEN_PROBE=y
339CONFIG_MTD_CFI_ADV_OPTIONS=y
340CONFIG_MTD_CFI_NOSWAP=y
341# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
342# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
343# CONFIG_MTD_CFI_GEOMETRY is not set
344CONFIG_MTD_MAP_BANK_WIDTH_1=y
345CONFIG_MTD_MAP_BANK_WIDTH_2=y
346CONFIG_MTD_MAP_BANK_WIDTH_4=y
347# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
348# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
349# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
350CONFIG_MTD_CFI_I1=y
351CONFIG_MTD_CFI_I2=y
352# CONFIG_MTD_CFI_I4 is not set
353# CONFIG_MTD_CFI_I8 is not set
354# CONFIG_MTD_OTP is not set
355# CONFIG_MTD_CFI_INTELEXT is not set
356CONFIG_MTD_CFI_AMDSTD=y
357# CONFIG_MTD_CFI_STAA is not set
358CONFIG_MTD_CFI_UTIL=y
359# CONFIG_MTD_RAM is not set
360# CONFIG_MTD_ROM is not set
361# CONFIG_MTD_ABSENT is not set
362# CONFIG_MTD_OBSOLETE_CHIPS is not set
363
364#
365# Mapping drivers for chip access
366#
367CONFIG_MTD_COMPLEX_MAPPINGS=y
368CONFIG_MTD_PHYSMAP=y
369CONFIG_MTD_PHYSMAP_START=0x8000000
370CONFIG_MTD_PHYSMAP_LEN=0x0
371CONFIG_MTD_PHYSMAP_BANKWIDTH=2
372# CONFIG_MTD_PCI is not set
373# CONFIG_MTD_PLATRAM is not set
374
375#
376# Self-contained MTD device drivers
377#
378# CONFIG_MTD_PMC551 is not set
379# CONFIG_MTD_SLRAM is not set
380# CONFIG_MTD_PHRAM is not set
381# CONFIG_MTD_MTDRAM is not set
382# CONFIG_MTD_BLOCK2MTD is not set
383
384#
385# Disk-On-Chip Device Drivers
386#
387# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set
396
397#
398# OneNAND Flash Device Drivers
399#
400# CONFIG_MTD_ONENAND is not set
401
402#
403# Parallel port support
404#
405# CONFIG_PARPORT is not set
406
407#
408# Plug and Play support
409#
410
411#
412# Block devices
413#
414# CONFIG_BLK_DEV_FD is not set
415# CONFIG_BLK_CPQ_DA is not set
416# CONFIG_BLK_CPQ_CISS_DA is not set
417# CONFIG_BLK_DEV_DAC960 is not set
418# CONFIG_BLK_DEV_UMEM is not set
419# CONFIG_BLK_DEV_COW_COMMON is not set
420# CONFIG_BLK_DEV_LOOP is not set
421# CONFIG_BLK_DEV_NBD is not set
422# CONFIG_BLK_DEV_SX8 is not set
423CONFIG_BLK_DEV_RAM=y
424CONFIG_BLK_DEV_RAM_COUNT=16
425CONFIG_BLK_DEV_RAM_SIZE=65536
426CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
427CONFIG_BLK_DEV_INITRD=y
428# CONFIG_CDROM_PKTCDVD is not set
429# CONFIG_ATA_OVER_ETH is not set
430
431#
432# Misc devices
433#
434# CONFIG_SGI_IOC4 is not set
435# CONFIG_TIFM_CORE is not set
436
437#
438# ATA/ATAPI/MFM/RLL support
439#
440# CONFIG_IDE is not set
441
442#
443# SCSI device support
444#
445# CONFIG_RAID_ATTRS is not set
446# CONFIG_SCSI is not set
447# CONFIG_SCSI_NETLINK is not set
448
449#
450# Serial ATA (prod) and Parallel ATA (experimental) drivers
451#
452# CONFIG_ATA is not set
453
454#
455# Multi-device support (RAID and LVM)
456#
457# CONFIG_MD is not set
458
459#
460# Fusion MPT device support
461#
462# CONFIG_FUSION is not set
463
464#
465# IEEE 1394 (FireWire) support
466#
467# CONFIG_IEEE1394 is not set
468
469#
470# I2O device support
471#
472# CONFIG_I2O is not set
473
474#
475# Macintosh device drivers
476#
477# CONFIG_MAC_EMUMOUSEBTN is not set
478# CONFIG_WINDFARM is not set
479
480#
481# Network device support
482#
483CONFIG_NETDEVICES=y
484# CONFIG_DUMMY is not set
485# CONFIG_BONDING is not set
486# CONFIG_EQUALIZER is not set
487# CONFIG_TUN is not set
488
489#
490# ARCnet devices
491#
492# CONFIG_ARCNET is not set
493
494#
495# PHY device support
496#
497# CONFIG_PHYLIB is not set
498
499#
500# Ethernet (10 or 100Mbit)
501#
502CONFIG_NET_ETHERNET=y
503CONFIG_MII=y
504# CONFIG_HAPPYMEAL is not set
505# CONFIG_SUNGEM is not set
506# CONFIG_CASSINI is not set
507# CONFIG_NET_VENDOR_3COM is not set
508
509#
510# Tulip family network device support
511#
512# CONFIG_NET_TULIP is not set
513# CONFIG_HP100 is not set
514CONFIG_IBM_EMAC=y
515CONFIG_IBM_EMAC_RXB=128
516CONFIG_IBM_EMAC_TXB=128
517CONFIG_IBM_EMAC_POLL_WEIGHT=32
518CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
519CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
520CONFIG_IBM_EMAC_PHY_RX_CLK_FIX=y
521# CONFIG_IBM_EMAC_DEBUG is not set
522CONFIG_IBM_EMAC_ZMII=y
523CONFIG_IBM_EMAC_RGMII=y
524CONFIG_IBM_EMAC_TAH=y
525CONFIG_NET_PCI=y
526# CONFIG_PCNET32 is not set
527# CONFIG_AMD8111_ETH is not set
528# CONFIG_ADAPTEC_STARFIRE is not set
529# CONFIG_B44 is not set
530# CONFIG_FORCEDETH is not set
531# CONFIG_DGRS is not set
532# CONFIG_EEPRO100 is not set
533CONFIG_E100=y
534# CONFIG_FEALNX is not set
535# CONFIG_NATSEMI is not set
536# CONFIG_NE2K_PCI is not set
537# CONFIG_8139CP is not set
538# CONFIG_8139TOO is not set
539# CONFIG_SIS900 is not set
540# CONFIG_EPIC100 is not set
541# CONFIG_SUNDANCE is not set
542# CONFIG_TLAN is not set
543# CONFIG_VIA_RHINE is not set
544# CONFIG_SC92031 is not set
545
546#
547# Ethernet (1000 Mbit)
548#
549# CONFIG_ACENIC is not set
550# CONFIG_DL2K is not set
551# CONFIG_E1000 is not set
552# CONFIG_NS83820 is not set
553# CONFIG_HAMACHI is not set
554# CONFIG_YELLOWFIN is not set
555# CONFIG_R8169 is not set
556# CONFIG_SIS190 is not set
557# CONFIG_SKGE is not set
558# CONFIG_SKY2 is not set
559# CONFIG_SK98LIN is not set
560# CONFIG_VIA_VELOCITY is not set
561# CONFIG_TIGON3 is not set
562# CONFIG_BNX2 is not set
563# CONFIG_QLA3XXX is not set
564# CONFIG_ATL1 is not set
565
566#
567# Ethernet (10000 Mbit)
568#
569# CONFIG_CHELSIO_T1 is not set
570# CONFIG_CHELSIO_T3 is not set
571# CONFIG_IXGB is not set
572# CONFIG_S2IO is not set
573# CONFIG_MYRI10GE is not set
574# CONFIG_NETXEN_NIC is not set
575
576#
577# Token Ring devices
578#
579# CONFIG_TR is not set
580
581#
582# Wireless LAN (non-hamradio)
583#
584# CONFIG_NET_RADIO is not set
585
586#
587# Wan interfaces
588#
589# CONFIG_WAN is not set
590# CONFIG_FDDI is not set
591# CONFIG_HIPPI is not set
592CONFIG_PPP=y
593# CONFIG_PPP_MULTILINK is not set
594# CONFIG_PPP_FILTER is not set
595# CONFIG_PPP_ASYNC is not set
596# CONFIG_PPP_SYNC_TTY is not set
597# CONFIG_PPP_DEFLATE is not set
598# CONFIG_PPP_BSDCOMP is not set
599# CONFIG_PPP_MPPE is not set
600CONFIG_PPPOE=y
601# CONFIG_SLIP is not set
602CONFIG_SLHC=y
603# CONFIG_SHAPER is not set
604# CONFIG_NETCONSOLE is not set
605# CONFIG_NETPOLL is not set
606# CONFIG_NET_POLL_CONTROLLER is not set
607
608#
609# ISDN subsystem
610#
611# CONFIG_ISDN is not set
612
613#
614# Telephony Support
615#
616# CONFIG_PHONE is not set
617
618#
619# Input device support
620#
621# CONFIG_INPUT is not set
622
623#
624# Hardware I/O ports
625#
626CONFIG_SERIO=y
627# CONFIG_SERIO_I8042 is not set
628# CONFIG_SERIO_SERPORT is not set
629# CONFIG_SERIO_PCIPS2 is not set
630# CONFIG_SERIO_LIBPS2 is not set
631# CONFIG_SERIO_RAW is not set
632# CONFIG_GAMEPORT is not set
633
634#
635# Character devices
636#
637# CONFIG_VT is not set
638# CONFIG_SERIAL_NONSTANDARD is not set
639
640#
641# Serial drivers
642#
643CONFIG_SERIAL_8250=y
644CONFIG_SERIAL_8250_CONSOLE=y
645CONFIG_SERIAL_8250_PCI=y
646CONFIG_SERIAL_8250_NR_UARTS=4
647CONFIG_SERIAL_8250_RUNTIME_UARTS=4
648CONFIG_SERIAL_8250_EXTENDED=y
649# CONFIG_SERIAL_8250_MANY_PORTS is not set
650CONFIG_SERIAL_8250_SHARE_IRQ=y
651# CONFIG_SERIAL_8250_DETECT_IRQ is not set
652# CONFIG_SERIAL_8250_RSA is not set
653
654#
655# Non-8250 serial port support
656#
657# CONFIG_SERIAL_UARTLITE is not set
658CONFIG_SERIAL_CORE=y
659CONFIG_SERIAL_CORE_CONSOLE=y
660# CONFIG_SERIAL_JSM is not set
661CONFIG_UNIX98_PTYS=y
662CONFIG_LEGACY_PTYS=y
663CONFIG_LEGACY_PTY_COUNT=256
664
665#
666# IPMI
667#
668# CONFIG_IPMI_HANDLER is not set
669
670#
671# Watchdog Cards
672#
673# CONFIG_WATCHDOG is not set
674CONFIG_HW_RANDOM=m
675# CONFIG_NVRAM is not set
676# CONFIG_GEN_RTC is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set
679# CONFIG_APPLICOM is not set
680# CONFIG_AGP is not set
681# CONFIG_DRM is not set
682# CONFIG_RAW_DRIVER is not set
683
684#
685# TPM devices
686#
687# CONFIG_TCG_TPM is not set
688
689#
690# I2C support
691#
692CONFIG_I2C=y
693CONFIG_I2C_CHARDEV=y
694
695#
696# I2C Algorithms
697#
698# CONFIG_I2C_ALGOBIT is not set
699# CONFIG_I2C_ALGOPCF is not set
700# CONFIG_I2C_ALGOPCA is not set
701
702#
703# I2C Hardware Bus support
704#
705# CONFIG_I2C_ALI1535 is not set
706# CONFIG_I2C_ALI1563 is not set
707# CONFIG_I2C_ALI15X3 is not set
708# CONFIG_I2C_AMD756 is not set
709# CONFIG_I2C_AMD8111 is not set
710# CONFIG_I2C_I801 is not set
711# CONFIG_I2C_I810 is not set
712# CONFIG_I2C_PIIX4 is not set
713CONFIG_I2C_IBM_IIC=y
714# CONFIG_I2C_MPC is not set
715# CONFIG_I2C_NFORCE2 is not set
716# CONFIG_I2C_OCORES is not set
717# CONFIG_I2C_PARPORT_LIGHT is not set
718# CONFIG_I2C_PROSAVAGE is not set
719# CONFIG_I2C_SAVAGE4 is not set
720# CONFIG_I2C_SIS5595 is not set
721# CONFIG_I2C_SIS630 is not set
722# CONFIG_I2C_SIS96X is not set
723# CONFIG_I2C_STUB is not set
724# CONFIG_I2C_VIA is not set
725# CONFIG_I2C_VIAPRO is not set
726# CONFIG_I2C_VOODOO3 is not set
727# CONFIG_I2C_PCA_ISA is not set
728
729#
730# Miscellaneous I2C Chip support
731#
732# CONFIG_SENSORS_DS1337 is not set
733# CONFIG_SENSORS_DS1374 is not set
734CONFIG_SENSORS_EEPROM=y
735# CONFIG_SENSORS_PCF8574 is not set
736# CONFIG_SENSORS_PCA9539 is not set
737# CONFIG_SENSORS_PCF8591 is not set
738# CONFIG_SENSORS_M41T00 is not set
739# CONFIG_SENSORS_MAX6875 is not set
740# CONFIG_I2C_DEBUG_CORE is not set
741# CONFIG_I2C_DEBUG_ALGO is not set
742# CONFIG_I2C_DEBUG_BUS is not set
743# CONFIG_I2C_DEBUG_CHIP is not set
744
745#
746# SPI support
747#
748# CONFIG_SPI is not set
749# CONFIG_SPI_MASTER is not set
750
751#
752# Dallas's 1-wire bus
753#
754# CONFIG_W1 is not set
755
756#
757# Hardware Monitoring support
758#
759CONFIG_HWMON=y
760# CONFIG_HWMON_VID is not set
761# CONFIG_SENSORS_ABITUGURU 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_ADM1031 is not set
766# CONFIG_SENSORS_ADM9240 is not set
767# CONFIG_SENSORS_ASB100 is not set
768# CONFIG_SENSORS_ATXP1 is not set
769# CONFIG_SENSORS_DS1621 is not set
770# CONFIG_SENSORS_F71805F is not set
771# CONFIG_SENSORS_FSCHER is not set
772# CONFIG_SENSORS_FSCPOS is not set
773# CONFIG_SENSORS_GL518SM is not set
774# CONFIG_SENSORS_GL520SM is not set
775# CONFIG_SENSORS_IT87 is not set
776# CONFIG_SENSORS_LM63 is not set
777# CONFIG_SENSORS_LM75 is not set
778# CONFIG_SENSORS_LM77 is not set
779# CONFIG_SENSORS_LM78 is not set
780# CONFIG_SENSORS_LM80 is not set
781# CONFIG_SENSORS_LM83 is not set
782# CONFIG_SENSORS_LM85 is not set
783# CONFIG_SENSORS_LM87 is not set
784# CONFIG_SENSORS_LM90 is not set
785# CONFIG_SENSORS_LM92 is not set
786# CONFIG_SENSORS_MAX1619 is not set
787# CONFIG_SENSORS_PC87360 is not set
788# CONFIG_SENSORS_PC87427 is not set
789# CONFIG_SENSORS_SIS5595 is not set
790# CONFIG_SENSORS_SMSC47M1 is not set
791# CONFIG_SENSORS_SMSC47M192 is not set
792# CONFIG_SENSORS_SMSC47B397 is not set
793# CONFIG_SENSORS_VIA686A is not set
794# CONFIG_SENSORS_VT1211 is not set
795# CONFIG_SENSORS_VT8231 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# Multimedia devices
807#
808# CONFIG_VIDEO_DEV is not set
809
810#
811# Digital Video Broadcasting Devices
812#
813# CONFIG_DVB is not set
814
815#
816# Graphics support
817#
818CONFIG_FIRMWARE_EDID=y
819# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822
823#
824# Sound
825#
826# CONFIG_SOUND is not set
827
828#
829# USB support
830#
831CONFIG_USB_ARCH_HAS_HCD=y
832CONFIG_USB_ARCH_HAS_OHCI=y
833CONFIG_USB_ARCH_HAS_EHCI=y
834# CONFIG_USB is not set
835
836#
837# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
838#
839
840#
841# USB Gadget Support
842#
843# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set
849
850#
851# LED devices
852#
853# CONFIG_NEW_LEDS is not set
854
855#
856# LED drivers
857#
858
859#
860# LED Triggers
861#
862
863#
864# InfiniBand support
865#
866# CONFIG_INFINIBAND is not set
867
868#
869# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
870#
871
872#
873# Real Time Clock
874#
875# CONFIG_RTC_CLASS is not set
876
877#
878# DMA Engine support
879#
880# CONFIG_DMA_ENGINE is not set
881
882#
883# DMA Clients
884#
885
886#
887# DMA Devices
888#
889
890#
891# Auxiliary Display support
892#
893
894#
895# Virtualization
896#
897
898#
899# File systems
900#
901CONFIG_EXT2_FS=y
902CONFIG_EXT2_FS_XATTR=y
903CONFIG_EXT2_FS_POSIX_ACL=y
904CONFIG_EXT2_FS_SECURITY=y
905CONFIG_EXT2_FS_XIP=y
906CONFIG_FS_XIP=y
907CONFIG_EXT3_FS=y
908CONFIG_EXT3_FS_XATTR=y
909CONFIG_EXT3_FS_POSIX_ACL=y
910CONFIG_EXT3_FS_SECURITY=y
911# CONFIG_EXT4DEV_FS is not set
912CONFIG_JBD=y
913CONFIG_JBD_DEBUG=y
914CONFIG_FS_MBCACHE=y
915# CONFIG_REISERFS_FS is not set
916# CONFIG_JFS_FS is not set
917CONFIG_FS_POSIX_ACL=y
918# CONFIG_XFS_FS is not set
919# CONFIG_GFS2_FS is not set
920# CONFIG_OCFS2_FS is not set
921# CONFIG_MINIX_FS is not set
922# CONFIG_ROMFS_FS is not set
923CONFIG_INOTIFY=y
924CONFIG_INOTIFY_USER=y
925# CONFIG_QUOTA is not set
926CONFIG_DNOTIFY=y
927# CONFIG_AUTOFS_FS is not set
928# CONFIG_AUTOFS4_FS is not set
929# CONFIG_FUSE_FS is not set
930
931#
932# CD-ROM/DVD Filesystems
933#
934# CONFIG_ISO9660_FS is not set
935# CONFIG_UDF_FS is not set
936
937#
938# DOS/FAT/NT Filesystems
939#
940# CONFIG_MSDOS_FS is not set
941# CONFIG_VFAT_FS is not set
942# CONFIG_NTFS_FS is not set
943
944#
945# Pseudo filesystems
946#
947CONFIG_PROC_FS=y
948CONFIG_PROC_KCORE=y
949CONFIG_PROC_SYSCTL=y
950CONFIG_SYSFS=y
951CONFIG_TMPFS=y
952# CONFIG_TMPFS_POSIX_ACL is not set
953# CONFIG_HUGETLB_PAGE is not set
954CONFIG_RAMFS=y
955# CONFIG_CONFIGFS_FS is not set
956
957#
958# Miscellaneous filesystems
959#
960# CONFIG_ADFS_FS is not set
961# CONFIG_AFFS_FS is not set
962# CONFIG_HFS_FS is not set
963# CONFIG_HFSPLUS_FS is not set
964# CONFIG_BEFS_FS is not set
965# CONFIG_BFS_FS is not set
966# CONFIG_EFS_FS is not set
967CONFIG_JFFS2_FS=y
968CONFIG_JFFS2_FS_DEBUG=0
969CONFIG_JFFS2_FS_WRITEBUFFER=y
970CONFIG_JFFS2_SUMMARY=y
971# CONFIG_JFFS2_FS_XATTR is not set
972# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
973CONFIG_JFFS2_ZLIB=y
974CONFIG_JFFS2_RTIME=y
975# CONFIG_JFFS2_RUBIN is not set
976# CONFIG_CRAMFS is not set
977# CONFIG_VXFS_FS is not set
978# CONFIG_HPFS_FS is not set
979# CONFIG_QNX4FS_FS is not set
980# CONFIG_SYSV_FS is not set
981# CONFIG_UFS_FS is not set
982
983#
984# Network File Systems
985#
986CONFIG_NFS_FS=y
987# CONFIG_NFS_V3 is not set
988# CONFIG_NFS_V4 is not set
989# CONFIG_NFS_DIRECTIO is not set
990# CONFIG_NFSD is not set
991CONFIG_ROOT_NFS=y
992CONFIG_LOCKD=y
993CONFIG_NFS_COMMON=y
994CONFIG_SUNRPC=y
995# CONFIG_RPCSEC_GSS_KRB5 is not set
996# CONFIG_RPCSEC_GSS_SPKM3 is not set
997# CONFIG_SMB_FS is not set
998# CONFIG_CIFS is not set
999# CONFIG_NCP_FS is not set
1000# CONFIG_CODA_FS is not set
1001# CONFIG_AFS_FS is not set
1002# CONFIG_9P_FS is not set
1003
1004#
1005# Partition Types
1006#
1007# CONFIG_PARTITION_ADVANCED is not set
1008CONFIG_MSDOS_PARTITION=y
1009
1010#
1011# Native Language Support
1012#
1013# CONFIG_NLS is not set
1014
1015#
1016# Distributed Lock Manager
1017#
1018# CONFIG_DLM is not set
1019
1020#
1021# Library routines
1022#
1023CONFIG_BITREVERSE=y
1024# CONFIG_CRC_CCITT is not set
1025# CONFIG_CRC16 is not set
1026CONFIG_CRC32=y
1027# CONFIG_LIBCRC32C is not set
1028CONFIG_ZLIB_INFLATE=y
1029CONFIG_ZLIB_DEFLATE=y
1030CONFIG_PLIST=y
1031CONFIG_HAS_IOMEM=y
1032CONFIG_HAS_IOPORT=y
1033# CONFIG_PROFILING is not set
1034
1035#
1036# Kernel hacking
1037#
1038# CONFIG_PRINTK_TIME is not set
1039CONFIG_ENABLE_MUST_CHECK=y
1040# CONFIG_MAGIC_SYSRQ is not set
1041# CONFIG_UNUSED_SYMBOLS is not set
1042CONFIG_DEBUG_FS=y
1043# CONFIG_HEADERS_CHECK is not set
1044CONFIG_DEBUG_KERNEL=y
1045CONFIG_LOG_BUF_SHIFT=14
1046CONFIG_DETECT_SOFTLOCKUP=y
1047# CONFIG_SCHEDSTATS is not set
1048# CONFIG_DEBUG_SLAB is not set
1049# CONFIG_DEBUG_RT_MUTEXES is not set
1050# CONFIG_RT_MUTEX_TESTER is not set
1051# CONFIG_DEBUG_SPINLOCK is not set
1052CONFIG_DEBUG_MUTEXES=y
1053# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1054# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1055# CONFIG_DEBUG_KOBJECT is not set
1056# CONFIG_DEBUG_BUGVERBOSE is not set
1057CONFIG_DEBUG_INFO=y
1058# CONFIG_DEBUG_VM is not set
1059# CONFIG_DEBUG_LIST is not set
1060CONFIG_FORCED_INLINING=y
1061# CONFIG_RCU_TORTURE_TEST is not set
1062# CONFIG_KGDB is not set
1063# CONFIG_XMON is not set
1064CONFIG_BDI_SWITCH=y
1065# CONFIG_SERIAL_TEXT_DEBUG is not set
1066CONFIG_PPC_OCP=y
1067
1068#
1069# Security options
1070#
1071# CONFIG_KEYS is not set
1072# CONFIG_SECURITY is not set
1073
1074#
1075# Cryptographic options
1076#
1077# CONFIG_CRYPTO is not set
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 466437f4bcbb..6b4f022111e7 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -12,7 +12,6 @@ obj-y := entry.o traps.o time.o misc.o \
12 setup.o \ 12 setup.o \
13 ppc_htab.o 13 ppc_htab.o
14obj-$(CONFIG_MODULES) += ppc_ksyms.o 14obj-$(CONFIG_MODULES) += ppc_ksyms.o
15obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o
16obj-$(CONFIG_PCI) += pci.o 15obj-$(CONFIG_PCI) += pci.o
17obj-$(CONFIG_RAPIDIO) += rio.o 16obj-$(CONFIG_RAPIDIO) += rio.o
18obj-$(CONFIG_KGDB) += ppc-stub.o 17obj-$(CONFIG_KGDB) += ppc-stub.o
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
index 100052aaea9a..c7cb9d5f24a3 100644
--- a/arch/ppc/kernel/head.S
+++ b/arch/ppc/kernel/head.S
@@ -310,12 +310,7 @@ i##n: \
310/* System reset */ 310/* System reset */
311/* core99 pmac starts the seconary here by changing the vector, and 311/* core99 pmac starts the seconary here by changing the vector, and
312 putting it back to what it was (unknown_exception) when done. */ 312 putting it back to what it was (unknown_exception) when done. */
313#if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
314 . = 0x100
315 b __secondary_start_gemini
316#else
317 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) 313 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD)
318#endif
319 314
320/* Machine check */ 315/* Machine check */
321 . = 0x200 316 . = 0x200
@@ -897,19 +892,6 @@ fix_mem_constants:
897#endif /* CONFIG_APUS */ 892#endif /* CONFIG_APUS */
898 893
899#ifdef CONFIG_SMP 894#ifdef CONFIG_SMP
900#ifdef CONFIG_GEMINI
901 .globl __secondary_start_gemini
902__secondary_start_gemini:
903 mfspr r4,SPRN_HID0
904 ori r4,r4,HID0_ICFI
905 li r3,0
906 ori r3,r3,HID0_ICE
907 andc r4,r4,r3
908 mtspr SPRN_HID0,r4
909 sync
910 b __secondary_start
911#endif /* CONFIG_GEMINI */
912
913 .globl __secondary_start_pmac_0 895 .globl __secondary_start_pmac_0
914__secondary_start_pmac_0: 896__secondary_start_pmac_0:
915 /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */ 897 /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
index 66877bdfe0b7..1f155d399d57 100644
--- a/arch/ppc/kernel/head_fsl_booke.S
+++ b/arch/ppc/kernel/head_fsl_booke.S
@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */
206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
207 mtspr SPRN_MAS0,r7 207 mtspr SPRN_MAS0,r7
208 tlbre 208 tlbre
209 li r6,0 209 mfspr r6,SPRN_MAS1
210 rlwinm r6,r6,0,2,0 /* clear IPROT */
210 mtspr SPRN_MAS1,r6 211 mtspr SPRN_MAS1,r6
211 tlbwe 212 tlbwe
212 /* Invalidate TLB1 */ 213 /* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */
248 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ 249 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
249 mtspr SPRN_MAS0,r7 250 mtspr SPRN_MAS0,r7
250 tlbre 251 tlbre
252 mfspr r8,SPRN_MAS1
253 rlwinm r8,r8,0,2,0 /* clear IPROT */
251 mtspr SPRN_MAS1,r8 254 mtspr SPRN_MAS1,r8
252 tlbwe 255 tlbwe
253 /* Invalidate TLB1 */ 256 /* Invalidate TLB1 */
@@ -889,7 +892,6 @@ load_up_spe:
889 REST_GPR(9, r11) 892 REST_GPR(9, r11)
890 REST_GPR(12, r11) 893 REST_GPR(12, r11)
891 lwz r11,GPR11(r11) 894 lwz r11,GPR11(r11)
892 SYNC
893 rfi 895 rfi
894 896
895/* 897/*
@@ -953,7 +955,6 @@ _GLOBAL(giveup_altivec)
953_GLOBAL(giveup_spe) 955_GLOBAL(giveup_spe)
954 mfmsr r5 956 mfmsr r5
955 oris r5,r5,MSR_SPE@h 957 oris r5,r5,MSR_SPE@h
956 SYNC
957 mtmsr r5 /* enable use of SPE now */ 958 mtmsr r5 /* enable use of SPE now */
958 isync 959 isync
959 cmpi 0,r3,0 960 cmpi 0,r3,0
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index bd129d3c2cc1..0a7e42d54eaf 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -442,17 +442,22 @@ static ctl_table htab_ctl_table[]={
442 .mode = 0644, 442 .mode = 0644,
443 .proc_handler = &proc_dol2crvec, 443 .proc_handler = &proc_dol2crvec,
444 }, 444 },
445 { 0, }, 445 {}
446}; 446};
447static ctl_table htab_sysctl_root[] = { 447static ctl_table htab_sysctl_root[] = {
448 { 1, "kernel", NULL, 0, 0755, htab_ctl_table, }, 448 {
449 { 0,}, 449 .ctl_name = CTL_KERN,
450 .procname = "kernel",
451 .mode = 0555,
452 .child = htab_ctl_table,
453 },
454 {}
450}; 455};
451 456
452static int __init 457static int __init
453register_ppc_htab_sysctl(void) 458register_ppc_htab_sysctl(void)
454{ 459{
455 register_sysctl_table(htab_sysctl_root, 0); 460 register_sysctl_table(htab_sysctl_root);
456 461
457 return 0; 462 return 0;
458} 463}
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index c8b65ca8a350..1318b6f4c3df 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -43,6 +43,7 @@
43#include <asm/div64.h> 43#include <asm/div64.h>
44#include <asm/xmon.h> 44#include <asm/xmon.h>
45#include <asm/signal.h> 45#include <asm/signal.h>
46#include <asm/dcr.h>
46 47
47#ifdef CONFIG_8xx 48#ifdef CONFIG_8xx
48#include <asm/commproc.h> 49#include <asm/commproc.h>
@@ -270,7 +271,7 @@ EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
270extern long *intercept_table; 271extern long *intercept_table;
271EXPORT_SYMBOL(intercept_table); 272EXPORT_SYMBOL(intercept_table);
272#endif /* CONFIG_PPC_STD_MMU */ 273#endif /* CONFIG_PPC_STD_MMU */
273#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) 274#ifdef CONFIG_PPC_DCR_NATIVE
274EXPORT_SYMBOL(__mtdcr); 275EXPORT_SYMBOL(__mtdcr);
275EXPORT_SYMBOL(__mfdcr); 276EXPORT_SYMBOL(__mfdcr);
276#endif 277#endif
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 3c506af19880..c79704f5409c 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -543,7 +543,7 @@ void __init setup_arch(char **cmdline_p)
543 init_mm.brk = (unsigned long) klimit; 543 init_mm.brk = (unsigned long) klimit;
544 544
545 /* Save unparsed command line copy for /proc/cmdline */ 545 /* Save unparsed command line copy for /proc/cmdline */
546 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); 546 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
547 *cmdline_p = cmd_line; 547 *cmdline_p = cmd_line;
548 548
549 parse_early_param(); 549 parse_early_param();
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 61921268a0d0..a0625562a44b 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -135,10 +135,12 @@ SECTIONS
135 .data.percpu : { *(.data.percpu) } 135 .data.percpu : { *(.data.percpu) }
136 __per_cpu_end = .; 136 __per_cpu_end = .;
137 137
138#ifdef CONFIG_BLK_DEV_INITRD
138 . = ALIGN(4096); 139 . = ALIGN(4096);
139 __initramfs_start = .; 140 __initramfs_start = .;
140 .init.ramfs : { *(.init.ramfs) } 141 .init.ramfs : { *(.init.ramfs) }
141 __initramfs_end = .; 142 __initramfs_end = .;
143#endif
142 144
143 . = ALIGN(4096); 145 . = ALIGN(4096);
144 __init_end = .; 146 __init_end = .;
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c
index 31e511856dc5..d40700795a9c 100644
--- a/arch/ppc/lib/rheap.c
+++ b/arch/ppc/lib/rheap.c
@@ -14,6 +14,7 @@
14 */ 14 */
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h>
17#include <linux/mm.h> 18#include <linux/mm.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19 20
@@ -654,7 +655,7 @@ void rh_dump(rh_info_t * info)
654 int maxnr; 655 int maxnr;
655 int i, nr; 656 int i, nr;
656 657
657 maxnr = sizeof(st) / sizeof(st[0]); 658 maxnr = ARRAY_SIZE(st);
658 659
659 printk(KERN_INFO 660 printk(KERN_INFO
660 "info @0x%p (%d slots empty / %d max)\n", 661 "info @0x%p (%d slots empty / %d max)\n",
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
index 354a9408f024..c023b7298809 100644
--- a/arch/ppc/mm/pgtable.c
+++ b/arch/ppc/mm/pgtable.c
@@ -313,11 +313,8 @@ void __init mapin_ram(void)
313 } 313 }
314} 314}
315 315
316/* is x a power of 2? */
317#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
318
319/* is x a power of 4? */ 316/* is x a power of 4? */
320#define is_power_of_4(x) ((x) != 0 && (((x) & (x-1)) == 0) && (ffs(x) & 1)) 317#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1)
321 318
322/* 319/*
323 * Set up a mapping for a block of I/O. 320 * Set up a mapping for a block of I/O.
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
index 6980de420e92..705ae56016f0 100644
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -98,6 +98,12 @@ config OCOTEA
98 help 98 help
99 This option enables support for the IBM PPC440GX evaluation board. 99 This option enables support for the IBM PPC440GX evaluation board.
100 100
101config TAISHAN
102 bool "Taishan"
103 select WANT_EARLY_SERIAL
104 help
105 This option enables support for the AMCC PPC440GX evaluation board.
106
101endchoice 107endchoice
102 108
103config EP405PC 109config EP405PC
@@ -126,7 +132,7 @@ config 440GP
126 132
127config 440GX 133config 440GX
128 bool 134 bool
129 depends on OCOTEA 135 depends on OCOTEA || TAISHAN
130 default y 136 default y
131 137
132config 440SP 138config 440SP
@@ -173,7 +179,7 @@ config BOOKE
173 179
174config IBM_OCP 180config IBM_OCP
175 bool 181 bool
176 depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT 182 depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || TAISHAN || WALNUT
177 default y 183 default y
178 184
179config IBM_EMAC4 185config IBM_EMAC4
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
index a04a0d0a0f5c..fa6610bccaf9 100644
--- a/arch/ppc/platforms/4xx/Makefile
+++ b/arch/ppc/platforms/4xx/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_OCOTEA) += ocotea.o
12obj-$(CONFIG_REDWOOD_5) += redwood5.o 12obj-$(CONFIG_REDWOOD_5) += redwood5.o
13obj-$(CONFIG_REDWOOD_6) += redwood6.o 13obj-$(CONFIG_REDWOOD_6) += redwood6.o
14obj-$(CONFIG_SYCAMORE) += sycamore.o 14obj-$(CONFIG_SYCAMORE) += sycamore.o
15obj-$(CONFIG_TAISHAN) += taishan.o
15obj-$(CONFIG_WALNUT) += walnut.o 16obj-$(CONFIG_WALNUT) += walnut.o
16obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o 17obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o
17obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o 18obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
new file mode 100644
index 000000000000..bb0253eef45a
--- /dev/null
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -0,0 +1,395 @@
1/*
2 * arch/ppc/platforms/4xx/taishan.c
3 *
4 * AMCC Taishan board specific routines
5 *
6 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13
14#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/types.h>
22#include <linux/major.h>
23#include <linux/blkdev.h>
24#include <linux/console.h>
25#include <linux/delay.h>
26#include <linux/ide.h>
27#include <linux/initrd.h>
28#include <linux/seq_file.h>
29#include <linux/root_dev.h>
30#include <linux/tty.h>
31#include <linux/serial.h>
32#include <linux/serial_core.h>
33#include <linux/platform_device.h>
34#include <linux/mtd/partitions.h>
35#include <linux/mtd/nand.h>
36#include <linux/mtd/ndfc.h>
37#include <linux/mtd/physmap.h>
38
39#include <asm/machdep.h>
40#include <asm/ocp.h>
41#include <asm/bootinfo.h>
42#include <asm/ppcboot.h>
43
44#include <syslib/gen550.h>
45#include <syslib/ibm440gx_common.h>
46
47extern bd_t __res;
48
49static struct ibm44x_clocks clocks __initdata;
50
51/*
52 * NOR FLASH configuration (using mtd physmap driver)
53 */
54
55/* start will be added dynamically, end is always fixed */
56static struct resource taishan_nor_resource = {
57 .start = TAISHAN_FLASH_ADDR,
58 .end = 0x1ffffffffULL,
59 .flags = IORESOURCE_MEM,
60};
61
62#define RW_PART0_OF 0
63#define RW_PART0_SZ 0x180000
64#define RW_PART1_SZ 0x200000
65/* Partition 2 will be autosized dynamically... */
66#define RW_PART3_SZ 0x80000
67#define RW_PART4_SZ 0x40000
68
69static struct mtd_partition taishan_nor_parts[] = {
70 {
71 .name = "kernel",
72 .offset = 0,
73 .size = RW_PART0_SZ
74 },
75 {
76 .name = "root",
77 .offset = MTDPART_OFS_APPEND,
78 .size = RW_PART1_SZ,
79 },
80 {
81 .name = "user",
82 .offset = MTDPART_OFS_APPEND,
83/* .size = RW_PART2_SZ */ /* will be adjusted dynamically */
84 },
85 {
86 .name = "env",
87 .offset = MTDPART_OFS_APPEND,
88 .size = RW_PART3_SZ,
89 },
90 {
91 .name = "u-boot",
92 .offset = MTDPART_OFS_APPEND,
93 .size = RW_PART4_SZ,
94 }
95};
96
97static struct physmap_flash_data taishan_nor_data = {
98 .width = 4,
99 .parts = taishan_nor_parts,
100 .nr_parts = ARRAY_SIZE(taishan_nor_parts),
101};
102
103static struct platform_device taishan_nor_device = {
104 .name = "physmap-flash",
105 .id = 0,
106 .dev = {
107 .platform_data = &taishan_nor_data,
108 },
109 .num_resources = 1,
110 .resource = &taishan_nor_resource,
111};
112
113static int taishan_setup_flash(void)
114{
115 /*
116 * Adjust partition 2 to flash size
117 */
118 taishan_nor_parts[2].size = __res.bi_flashsize -
119 RW_PART0_SZ - RW_PART1_SZ - RW_PART3_SZ - RW_PART4_SZ;
120
121 platform_device_register(&taishan_nor_device);
122
123 return 0;
124}
125arch_initcall(taishan_setup_flash);
126
127static void __init
128taishan_calibrate_decr(void)
129{
130 unsigned int freq;
131
132 if (mfspr(SPRN_CCR1) & CCR1_TCS)
133 freq = TAISHAN_TMR_CLK;
134 else
135 freq = clocks.cpu;
136
137 ibm44x_calibrate_decr(freq);
138}
139
140static int
141taishan_show_cpuinfo(struct seq_file *m)
142{
143 seq_printf(m, "vendor\t\t: AMCC\n");
144 seq_printf(m, "machine\t\t: PPC440GX EVB (Taishan)\n");
145 ibm440gx_show_cpuinfo(m);
146 return 0;
147}
148
149static inline int
150taishan_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
151{
152 static char pci_irq_table[][4] =
153 /*
154 * PCI IDSEL/INTPIN->INTLINE
155 * A B C D
156 */
157 {
158 { 23, 24, 25, 26 }, /* IDSEL 1 - PCI Slot 0 */
159 { 24, 25, 26, 23 }, /* IDSEL 2 - PCI Slot 1 */
160 };
161
162 const long min_idsel = 1, max_idsel = 2, irqs_per_slot = 4;
163 return PCI_IRQ_TABLE_LOOKUP;
164}
165
166static void __init taishan_set_emacdata(void)
167{
168 struct ocp_def *def;
169 struct ocp_func_emac_data *emacdata;
170 int i;
171
172 /* Set phy_map, phy_mode, and mac_addr for each EMAC */
173 for (i=2; i<4; i++) {
174 def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, i);
175 emacdata = def->additions;
176 if (i < 2) {
177 emacdata->phy_map = 0x00000001; /* Skip 0x00 */
178 emacdata->phy_mode = PHY_MODE_SMII;
179 } else {
180 emacdata->phy_map = 0x00000001; /* Skip 0x00 */
181 emacdata->phy_mode = PHY_MODE_RGMII;
182 }
183 if (i == 0)
184 memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
185 else if (i == 1)
186 memcpy(emacdata->mac_addr, "\0\0\0\0\0\0", 6);
187 else if (i == 2)
188 memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6);
189 else if (i == 3)
190 memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6);
191 }
192}
193
194#define PCIX_READW(offset) \
195 (readw(pcix_reg_base+offset))
196
197#define PCIX_WRITEW(value, offset) \
198 (writew(value, pcix_reg_base+offset))
199
200#define PCIX_WRITEL(value, offset) \
201 (writel(value, pcix_reg_base+offset))
202
203/*
204 * FIXME: This is only here to "make it work". This will move
205 * to a ibm_pcix.c which will contain a generic IBM PCIX bridge
206 * configuration library. -Matt
207 */
208static void __init
209taishan_setup_pcix(void)
210{
211 void *pcix_reg_base;
212
213 pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX_REG_SIZE);
214
215 /* Enable PCIX0 I/O, Mem, and Busmaster cycles */
216 PCIX_WRITEW(PCIX_READW(PCIX0_COMMAND) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, PCIX0_COMMAND);
217
218 /* Disable all windows */
219 PCIX_WRITEL(0, PCIX0_POM0SA);
220 PCIX_WRITEL(0, PCIX0_POM1SA);
221 PCIX_WRITEL(0, PCIX0_POM2SA);
222 PCIX_WRITEL(0, PCIX0_PIM0SA);
223 PCIX_WRITEL(0, PCIX0_PIM0SAH);
224 PCIX_WRITEL(0, PCIX0_PIM1SA);
225 PCIX_WRITEL(0, PCIX0_PIM2SA);
226 PCIX_WRITEL(0, PCIX0_PIM2SAH);
227
228 /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */
229 PCIX_WRITEL(0x00000003, PCIX0_POM0LAH);
230 PCIX_WRITEL(0x80000000, PCIX0_POM0LAL);
231 PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH);
232 PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL);
233 PCIX_WRITEL(0x80000001, PCIX0_POM0SA);
234
235 /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */
236 PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH);
237 PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL);
238 PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA);
239 PCIX_WRITEL(0xffffffff, PCIX0_PIM0SAH);
240
241 iounmap(pcix_reg_base);
242
243 eieio();
244}
245
246static void __init
247taishan_setup_hose(void)
248{
249 struct pci_controller *hose;
250
251 /* Configure windows on the PCI-X host bridge */
252 taishan_setup_pcix();
253
254 hose = pcibios_alloc_controller();
255
256 if (!hose)
257 return;
258
259 hose->first_busno = 0;
260 hose->last_busno = 0xff;
261
262 hose->pci_mem_offset = TAISHAN_PCI_MEM_OFFSET;
263
264 pci_init_resource(&hose->io_resource,
265 TAISHAN_PCI_LOWER_IO,
266 TAISHAN_PCI_UPPER_IO,
267 IORESOURCE_IO,
268 "PCI host bridge");
269
270 pci_init_resource(&hose->mem_resources[0],
271 TAISHAN_PCI_LOWER_MEM,
272 TAISHAN_PCI_UPPER_MEM,
273 IORESOURCE_MEM,
274 "PCI host bridge");
275
276 hose->io_space.start = TAISHAN_PCI_LOWER_IO;
277 hose->io_space.end = TAISHAN_PCI_UPPER_IO;
278 hose->mem_space.start = TAISHAN_PCI_LOWER_MEM;
279 hose->mem_space.end = TAISHAN_PCI_UPPER_MEM;
280 hose->io_base_virt = ioremap64(TAISHAN_PCI_IO_BASE, TAISHAN_PCI_IO_SIZE);
281 isa_io_base = (unsigned long) hose->io_base_virt;
282
283 setup_indirect_pci(hose,
284 TAISHAN_PCI_CFGA_PLB32,
285 TAISHAN_PCI_CFGD_PLB32);
286 hose->set_cfg_type = 1;
287
288 hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
289
290 ppc_md.pci_swizzle = common_swizzle;
291 ppc_md.pci_map_irq = taishan_map_irq;
292}
293
294
295static void __init
296taishan_early_serial_map(void)
297{
298 struct uart_port port;
299
300 /* Setup ioremapped serial port access */
301 memset(&port, 0, sizeof(port));
302 port.membase = ioremap64(PPC440GX_UART0_ADDR, 8);
303 port.irq = UART0_INT;
304 port.uartclk = clocks.uart0;
305 port.regshift = 0;
306 port.iotype = UPIO_MEM;
307 port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
308 port.line = 0;
309
310 if (early_serial_setup(&port) != 0)
311 printk("Early serial init of port 0 failed\n");
312
313#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
314 /* Configure debug serial access */
315 gen550_init(0, &port);
316
317 /* Purge TLB entry added in head_44x.S for early serial access */
318 _tlbie(UART0_IO_BASE);
319#endif
320
321 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
322 port.irq = UART1_INT;
323 port.uartclk = clocks.uart1;
324 port.line = 1;
325
326 if (early_serial_setup(&port) != 0)
327 printk("Early serial init of port 1 failed\n");
328
329#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
330 /* Configure debug serial access */
331 gen550_init(1, &port);
332#endif
333}
334
335static void __init
336taishan_setup_arch(void)
337{
338 taishan_set_emacdata();
339
340 ibm440gx_tah_enable();
341
342 /*
343 * Determine various clocks.
344 * To be completely correct we should get SysClk
345 * from FPGA, because it can be changed by on-board switches
346 * --ebs
347 */
348 ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200);
349 ocp_sys_info.opb_bus_freq = clocks.opb;
350
351 /* init to some ~sane value until calibrate_delay() runs */
352 loops_per_jiffy = 50000000/HZ;
353
354 /* Setup PCI host bridge */
355 taishan_setup_hose();
356
357#ifdef CONFIG_BLK_DEV_INITRD
358 if (initrd_start)
359 ROOT_DEV = Root_RAM0;
360 else
361#endif
362#ifdef CONFIG_ROOT_NFS
363 ROOT_DEV = Root_NFS;
364#else
365 ROOT_DEV = Root_HDA1;
366#endif
367
368 taishan_early_serial_map();
369
370 /* Identify the system */
371 printk("AMCC PowerPC 440GX Taishan Platform\n");
372}
373
374static void __init taishan_init(void)
375{
376 ibm440gx_l2c_setup(&clocks);
377}
378
379void __init platform_init(unsigned long r3, unsigned long r4,
380 unsigned long r5, unsigned long r6, unsigned long r7)
381{
382 ibm44x_platform_init(r3, r4, r5, r6, r7);
383
384 ppc_md.setup_arch = taishan_setup_arch;
385 ppc_md.show_cpuinfo = taishan_show_cpuinfo;
386 ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */
387
388 ppc_md.calibrate_decr = taishan_calibrate_decr;
389
390#ifdef CONFIG_KGDB
391 ppc_md.early_serial_map = taishan_early_serial_map;
392#endif
393 ppc_md.init = taishan_init;
394}
395
diff --git a/arch/ppc/platforms/4xx/taishan.h b/arch/ppc/platforms/4xx/taishan.h
new file mode 100644
index 000000000000..ea7561a80457
--- /dev/null
+++ b/arch/ppc/platforms/4xx/taishan.h
@@ -0,0 +1,67 @@
1/*
2 * arch/ppc/platforms/4xx/taishan.h
3 *
4 * AMCC Taishan board definitions
5 *
6 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifdef __KERNEL__
16#ifndef __ASM_TAISHAN_H__
17#define __ASM_TAISHAN_H__
18
19#include <platforms/4xx/ibm440gx.h>
20
21/* External timer clock frequency */
22#define TAISHAN_TMR_CLK 25000000
23
24/* Flash */
25#define TAISHAN_FPGA_ADDR 0x0000000141000000ULL
26#define TAISHAN_LCM_ADDR 0x0000000142000000ULL
27#define TAISHAN_FLASH_ADDR 0x00000001fc000000ULL
28#define TAISHAN_FLASH_SIZE 0x4000000
29
30/*
31 * Serial port defines
32 */
33#define RS_TABLE_SIZE 2
34
35/* head_44x.S created UART mapping, used before early_serial_setup.
36 * We cannot use default OpenBIOS UART mappings because they
37 * don't work for configurations with more than 512M RAM. --ebs
38 */
39#define UART0_IO_BASE 0xF0000200
40#define UART1_IO_BASE 0xF0000300
41
42#define BASE_BAUD 11059200/16
43#define STD_UART_OP(num) \
44 { 0, BASE_BAUD, 0, UART##num##_INT, \
45 (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
46 iomem_base: (void*)UART##num##_IO_BASE, \
47 io_type: SERIAL_IO_MEM},
48
49#define SERIAL_PORT_DFNS \
50 STD_UART_OP(0) \
51 STD_UART_OP(1)
52
53/* PCI support */
54#define TAISHAN_PCI_LOWER_IO 0x00000000
55#define TAISHAN_PCI_UPPER_IO 0x0000ffff
56#define TAISHAN_PCI_LOWER_MEM 0x80000000
57#define TAISHAN_PCI_UPPER_MEM 0xffffefff
58
59#define TAISHAN_PCI_CFGA_PLB32 0x0ec00000
60#define TAISHAN_PCI_CFGD_PLB32 0x0ec00004
61
62#define TAISHAN_PCI_IO_BASE 0x0000000208000000ULL
63#define TAISHAN_PCI_IO_SIZE 0x00010000
64#define TAISHAN_PCI_MEM_OFFSET 0x00000000
65
66#endif /* __ASM_TAISHAN_H__ */
67#endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
index 90c622294423..e17fad470621 100644
--- a/arch/ppc/platforms/Makefile
+++ b/arch/ppc/platforms/Makefile
@@ -13,7 +13,6 @@ obj-$(CONFIG_TQM8260) += tqm8260_setup.o
13obj-$(CONFIG_CPCI690) += cpci690.o 13obj-$(CONFIG_CPCI690) += cpci690.o
14obj-$(CONFIG_EV64260) += ev64260.o 14obj-$(CONFIG_EV64260) += ev64260.o
15obj-$(CONFIG_CHESTNUT) += chestnut.o 15obj-$(CONFIG_CHESTNUT) += chestnut.o
16obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o
17obj-$(CONFIG_LOPEC) += lopec.o 16obj-$(CONFIG_LOPEC) += lopec.o
18obj-$(CONFIG_KATANA) += katana.o 17obj-$(CONFIG_KATANA) += katana.o
19obj-$(CONFIG_HDPU) += hdpu.o 18obj-$(CONFIG_HDPU) += hdpu.o
diff --git a/arch/ppc/platforms/gemini.h b/arch/ppc/platforms/gemini.h
deleted file mode 100644
index 5528fd0a1216..000000000000
--- a/arch/ppc/platforms/gemini.h
+++ /dev/null
@@ -1,165 +0,0 @@
1/*
2 * Onboard registers and descriptions for Synergy Microsystems'
3 * "Gemini" boards.
4 *
5 */
6#ifdef __KERNEL__
7#ifndef __PPC_GEMINI_H
8#define __PPC_GEMINI_H
9
10/* Registers */
11
12#define GEMINI_SERIAL_B (0xffeffb00)
13#define GEMINI_SERIAL_A (0xffeffb08)
14#define GEMINI_USWITCH (0xffeffd00)
15#define GEMINI_BREV (0xffeffe00)
16#define GEMINI_BECO (0xffeffe08)
17#define GEMINI_FEAT (0xffeffe10)
18#define GEMINI_BSTAT (0xffeffe18)
19#define GEMINI_CPUSTAT (0xffeffe20)
20#define GEMINI_L2CFG (0xffeffe30)
21#define GEMINI_MEMCFG (0xffeffe38)
22#define GEMINI_FLROM (0xffeffe40)
23#define GEMINI_P0PCI (0xffeffe48)
24#define GEMINI_FLWIN (0xffeffe50)
25#define GEMINI_P0INTMASK (0xffeffe60)
26#define GEMINI_P0INTAP (0xffeffe68)
27#define GEMINI_PCIERR (0xffeffe70)
28#define GEMINI_LEDBASE (0xffeffe80)
29#define GEMINI_RTC (0xffe9fff8)
30#define GEMINI_LEDS 8
31#define GEMINI_SWITCHES 8
32
33
34/* Flash ROM bit definitions */
35#define GEMINI_FLS_WEN (1<<0)
36#define GEMINI_FLS_JMP (1<<6)
37#define GEMINI_FLS_BOOT (1<<7)
38
39/* Memory bit definitions */
40#define GEMINI_MEM_TYPE_MASK 0xc0
41#define GEMINI_MEM_SIZE_MASK 0x38
42#define GEMINI_MEM_BANK_MASK 0x07
43
44/* L2 cache bit definitions */
45#define GEMINI_L2_SIZE_MASK 0xc0
46#define GEMINI_L2_RATIO_MASK 0x03
47
48/* Timebase register bit definitons */
49#define GEMINI_TIMEB0_EN (1<<0)
50#define GEMINI_TIMEB1_EN (1<<1)
51#define GEMINI_TIMEB2_EN (1<<2)
52#define GEMINI_TIMEB3_EN (1<<3)
53
54/* CPU status bit definitions */
55#define GEMINI_CPU_ID_MASK 0x03
56#define GEMINI_CPU_COUNT_MASK 0x0c
57#define GEMINI_CPU0_HALTED (1<<4)
58#define GEMINI_CPU1_HALTED (1<<5)
59#define GEMINI_CPU2_HALTED (1<<6)
60#define GEMINI_CPU3_HALTED (1<<7)
61
62/* Board status bit definitions */
63#define GEMINI_BRD_FAIL (1<<0) /* FAIL led is lit */
64#define GEMINI_BRD_BUS_MASK 0x0c /* PowerPC bus speed */
65
66/* Board family/feature bit descriptions */
67#define GEMINI_FEAT_HAS_FLASH (1<<0)
68#define GEMINI_FEAT_HAS_ETH (1<<1)
69#define GEMINI_FEAT_HAS_SCSI (1<<2)
70#define GEMINI_FEAT_HAS_P0 (1<<3)
71#define GEMINI_FEAT_FAM_MASK 0xf0
72
73/* Mod/ECO bit definitions */
74#define GEMINI_ECO_LEVEL_MASK 0x0f
75#define GEMINI_MOD_MASK 0xf0
76
77/* Type/revision bit definitions */
78#define GEMINI_REV_MASK 0x0f
79#define GEMINI_TYPE_MASK 0xf0
80
81/* User switch definitions */
82#define GEMINI_SWITCH_VERBOSE 1 /* adds "debug" to boot cmd line */
83#define GEMINI_SWITCH_SINGLE_USER 7 /* boots into "single-user" mode */
84
85#define SGS_RTC_CONTROL 0
86#define SGS_RTC_SECONDS 1
87#define SGS_RTC_MINUTES 2
88#define SGS_RTC_HOURS 3
89#define SGS_RTC_DAY 4
90#define SGS_RTC_DAY_OF_MONTH 5
91#define SGS_RTC_MONTH 6
92#define SGS_RTC_YEAR 7
93
94#define SGS_RTC_SET 0x80
95#define SGS_RTC_IS_STOPPED 0x80
96
97#define GRACKLE_CONFIG_ADDR_ADDR (0xfec00000)
98#define GRACKLE_CONFIG_DATA_ADDR (0xfee00000)
99
100#define GEMINI_BOOT_INIT (0xfff00100)
101
102#ifndef __ASSEMBLY__
103
104static inline void grackle_write( unsigned long addr, unsigned long data )
105{
106 __asm__ __volatile__(
107 " stwbrx %1, 0, %0\n \
108 sync\n \
109 stwbrx %3, 0, %2\n \
110 sync "
111 : /* no output */
112 : "r" (GRACKLE_CONFIG_ADDR_ADDR), "r" (addr),
113 "r" (GRACKLE_CONFIG_DATA_ADDR), "r" (data));
114}
115
116static inline unsigned long grackle_read( unsigned long addr )
117{
118 unsigned long val;
119
120 __asm__ __volatile__(
121 " stwbrx %1, 0, %2\n \
122 sync\n \
123 lwbrx %0, 0, %3\n \
124 sync "
125 : "=r" (val)
126 : "r" (addr), "r" (GRACKLE_CONFIG_ADDR_ADDR),
127 "r" (GRACKLE_CONFIG_DATA_ADDR));
128
129 return val;
130}
131
132static inline void gemini_led_on( int led )
133{
134 if (led >= 0 && led < GEMINI_LEDS)
135 *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 1;
136}
137
138static inline void gemini_led_off(int led)
139{
140 if (led >= 0 && led < GEMINI_LEDS)
141 *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 0;
142}
143
144static inline int gemini_led_val(int led)
145{
146 int val = 0;
147 if (led >= 0 && led < GEMINI_LEDS)
148 val = *(unsigned char *)(GEMINI_LEDBASE + (led<<3));
149 return (val & 0x1);
150}
151
152/* returns processor id from the board */
153static inline int gemini_processor(void)
154{
155 unsigned char cpu = *(unsigned char *)(GEMINI_CPUSTAT);
156 return (int) ((cpu == 0) ? 4 : (cpu & GEMINI_CPU_ID_MASK));
157}
158
159
160extern void _gemini_reboot(void);
161extern void gemini_prom_init(void);
162extern void gemini_init_l2(void);
163#endif /* __ASSEMBLY__ */
164#endif
165#endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/gemini_pci.c b/arch/ppc/platforms/gemini_pci.c
deleted file mode 100644
index 95656091ba2b..000000000000
--- a/arch/ppc/platforms/gemini_pci.c
+++ /dev/null
@@ -1,41 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/init.h>
3#include <linux/pci.h>
4#include <linux/slab.h>
5
6#include <asm/machdep.h>
7#include <platforms/gemini.h>
8#include <asm/byteorder.h>
9#include <asm/io.h>
10#include <asm/uaccess.h>
11#include <asm/pci-bridge.h>
12
13void __init gemini_pcibios_fixup(void)
14{
15 int i;
16 struct pci_dev *dev = NULL;
17
18 for_each_pci_dev(dev) {
19 for(i = 0; i < 6; i++) {
20 if (dev->resource[i].flags & IORESOURCE_IO) {
21 dev->resource[i].start |= (0xfe << 24);
22 dev->resource[i].end |= (0xfe << 24);
23 }
24 }
25 }
26}
27
28
29/* The "bootloader" for Synergy boards does none of this for us, so we need to
30 lay it all out ourselves... --Dan */
31void __init gemini_find_bridges(void)
32{
33 struct pci_controller* hose;
34
35 ppc_md.pcibios_fixup = gemini_pcibios_fixup;
36
37 hose = pcibios_alloc_controller();
38 if (!hose)
39 return;
40 setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
41}
diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S
deleted file mode 100644
index e8c84d24f01f..000000000000
--- a/arch/ppc/platforms/gemini_prom.S
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * Not really prom support code (yet), but sort of anti-prom code. The current
3 * bootloader does a number of things it shouldn't and doesn't do things that it
4 * should. The stuff in here is mainly a hodge-podge collection of setup code
5 * to get the board up and running.
6 * ---Dan
7 */
8
9#include <asm/reg.h>
10#include <asm/page.h>
11#include <platforms/gemini.h>
12#include <asm/ppc_asm.h>
13
14/*
15 * On 750's the MMU is on when Linux is booted, so we need to clear out the
16 * bootloader's BAT settings, make sure we're in supervisor state (gotcha!),
17 * and turn off the MMU.
18 *
19 */
20
21_GLOBAL(gemini_prom_init)
22#ifdef CONFIG_SMP
23 /* Since the MMU's on, get stuff in rom space that we'll need */
24 lis r4,GEMINI_CPUSTAT@h
25 ori r4,r4,GEMINI_CPUSTAT@l
26 lbz r5,0(r4)
27 andi. r5,r5,3
28 mr r24,r5 /* cpu # used later on */
29#endif
30 mfmsr r4
31 li r3,MSR_PR /* ensure supervisor! */
32 ori r3,r3,MSR_IR|MSR_DR
33 andc r4,r4,r3
34 mtmsr r4
35 isync
36#if 0
37 /* zero out the bats now that the MMU is off */
38prom_no_mmu:
39 li r3,0
40 mtspr SPRN_IBAT0U,r3
41 mtspr SPRN_IBAT0L,r3
42 mtspr SPRN_IBAT1U,r3
43 mtspr SPRN_IBAT1L,r3
44 mtspr SPRN_IBAT2U,r3
45 mtspr SPRN_IBAT2L,r3
46 mtspr SPRN_IBAT3U,r3
47 mtspr SPRN_IBAT3L,r3
48
49 mtspr SPRN_DBAT0U,r3
50 mtspr SPRN_DBAT0L,r3
51 mtspr SPRN_DBAT1U,r3
52 mtspr SPRN_DBAT1L,r3
53 mtspr SPRN_DBAT2U,r3
54 mtspr SPRN_DBAT2L,r3
55 mtspr SPRN_DBAT3U,r3
56 mtspr SPRN_DBAT3L,r3
57#endif
58
59 /* the bootloader (as far as I'm currently aware) doesn't mess with page
60 tables, but since we're already here, might as well zap these, too */
61 li r4,0
62 mtspr SPRN_SDR1,r4
63
64 li r4,16
65 mtctr r4
66 li r3,0
67 li r4,0
683: mtsrin r3,r4
69 addi r3,r3,1
70 bdnz 3b
71
72#ifdef CONFIG_SMP
73 /* The 750 book (and Mot/IBM support) says that this will "assist" snooping
74 when in SMP. Not sure yet whether this should stay or leave... */
75 mfspr r4,SPRN_HID0
76 ori r4,r4,HID0_ABE
77 mtspr SPRN_HID0,r4
78 sync
79#endif /* CONFIG_SMP */
80 blr
81
82/* apparently, SMon doesn't pay attention to HID0[SRST]. Disable the MMU and
83 branch to 0xfff00100 */
84_GLOBAL(_gemini_reboot)
85 lis r5,GEMINI_BOOT_INIT@h
86 ori r5,r5,GEMINI_BOOT_INIT@l
87 li r6,MSR_IP
88 mtspr SPRN_SRR0,r5
89 mtspr SPRN_SRR1,r6
90 rfi
diff --git a/arch/ppc/platforms/gemini_serial.h b/arch/ppc/platforms/gemini_serial.h
deleted file mode 100644
index b915eff79fdb..000000000000
--- a/arch/ppc/platforms/gemini_serial.h
+++ /dev/null
@@ -1,40 +0,0 @@
1#ifdef __KERNEL__
2#ifndef __ASMPPC_GEMINI_SERIAL_H
3#define __ASMPPC_GEMINI_SERIAL_H
4
5#include <platforms/gemini.h>
6
7#ifdef CONFIG_SERIAL_MANY_PORTS
8#define RS_TABLE_SIZE 64
9#else
10#define RS_TABLE_SIZE 4
11#endif
12
13/* Rate for the 24.576 Mhz clock for the onboard serial chip */
14#define BASE_BAUD (24576000 / 16)
15
16#ifdef CONFIG_SERIAL_DETECT_IRQ
17#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
18#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
19#else
20#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
21#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF)
22#endif
23
24#define STD_SERIAL_PORT_DEFNS \
25 { 0, BASE_BAUD, GEMINI_SERIAL_A, 15, STD_COM_FLAGS }, /* ttyS0 */ \
26 { 0, BASE_BAUD, GEMINI_SERIAL_B, 14, STD_COM_FLAGS }, /* ttyS1 */ \
27
28#ifdef CONFIG_GEMINI_PU32
29#define PU32_SERIAL_PORT_DEFNS \
30 { 0, BASE_BAUD, NULL, 0, STD_COM_FLAGS },
31#else
32#define PU32_SERIAL_PORT_DEFNS
33#endif
34
35#define SERIAL_PORT_DFNS \
36 STD_SERIAL_PORT_DEFNS \
37 PU32_SERIAL_PORT_DEFNS
38
39#endif
40#endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c
deleted file mode 100644
index f48048f362a8..000000000000
--- a/arch/ppc/platforms/gemini_setup.c
+++ /dev/null
@@ -1,577 +0,0 @@
1/*
2 * Copyright (C) 1995 Linus Torvalds
3 * Adapted from 'alpha' version by Gary Thomas
4 * Modified by Cort Dougan (cort@cs.nmt.edu)
5 * Synergy Microsystems board support by Dan Cox (dan@synergymicro.com)
6 *
7 */
8
9#include <linux/stddef.h>
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/errno.h>
13#include <linux/reboot.h>
14#include <linux/pci.h>
15#include <linux/time.h>
16#include <linux/kdev_t.h>
17#include <linux/types.h>
18#include <linux/major.h>
19#include <linux/initrd.h>
20#include <linux/console.h>
21#include <linux/seq_file.h>
22#include <linux/root_dev.h>
23#include <linux/bcd.h>
24
25#include <asm/system.h>
26#include <asm/pgtable.h>
27#include <asm/page.h>
28#include <asm/dma.h>
29#include <asm/io.h>
30#include <asm/m48t35.h>
31#include <platforms/gemini.h>
32#include <asm/time.h>
33#include <asm/open_pic.h>
34#include <asm/bootinfo.h>
35#include <asm/machdep.h>
36
37void gemini_find_bridges(void);
38static int gemini_get_clock_speed(void);
39extern void gemini_pcibios_fixup(void);
40
41static char *gemini_board_families[] = {
42 "VGM", "VSS", "KGM", "VGR", "VCM", "VCS", "KCM", "VCR"
43};
44static int gemini_board_count = sizeof(gemini_board_families) /
45 sizeof(gemini_board_families[0]);
46
47static unsigned int cpu_7xx[16] = {
48 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0
49};
50static unsigned int cpu_6xx[16] = {
51 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0
52};
53
54/*
55 * prom_init is the Gemini version of prom.c:prom_init. We only need
56 * the BSS clearing code, so I copied that out of prom.c. This is a
57 * lot simpler than hacking prom.c so it will build with Gemini. -VAL
58 */
59
60#define PTRRELOC(x) ((typeof(x))((unsigned long)(x) + offset))
61
62unsigned long
63prom_init(void)
64{
65 unsigned long offset = reloc_offset();
66 unsigned long phys;
67 extern char __bss_start, _end;
68
69 /* First zero the BSS -- use memset, some arches don't have
70 * caches on yet */
71 memset_io(PTRRELOC(&__bss_start),0 , &_end - &__bss_start);
72
73 /* Default */
74 phys = offset + KERNELBASE;
75
76 gemini_prom_init();
77
78 return phys;
79}
80
81int
82gemini_show_cpuinfo(struct seq_file *m)
83{
84 unsigned char reg, rev;
85 char *family;
86 unsigned int type;
87
88 reg = readb(GEMINI_FEAT);
89 family = gemini_board_families[((reg>>4) & 0xf)];
90 if (((reg>>4) & 0xf) > gemini_board_count)
91 printk(KERN_ERR "cpuinfo(): unable to determine board family\n");
92
93 reg = readb(GEMINI_BREV);
94 type = (reg>>4) & 0xf;
95 rev = reg & 0xf;
96
97 reg = readb(GEMINI_BECO);
98
99 seq_printf(m, "machine\t\t: Gemini %s%d, rev %c, eco %d\n",
100 family, type, (rev + 'A'), (reg & 0xf));
101
102 seq_printf(m, "board\t\t: Gemini %s", family);
103 if (type > 9)
104 seq_printf(m, "%c", (type - 10) + 'A');
105 else
106 seq_printf(m, "%d", type);
107
108 seq_printf(m, ", rev %c, eco %d\n", (rev + 'A'), (reg & 0xf));
109
110 seq_printf(m, "clock\t\t: %dMhz\n", gemini_get_clock_speed());
111
112 return 0;
113}
114
115static u_char gemini_openpic_initsenses[] = {
116 1,
117 1,
118 1,
119 1,
120 0,
121 0,
122 1, /* remainder are level-triggered */
123};
124
125#define GEMINI_MPIC_ADDR (0xfcfc0000)
126#define GEMINI_MPIC_PCI_CFG (0x80005800)
127
128void __init gemini_openpic_init(void)
129{
130
131 OpenPIC_Addr = (volatile struct OpenPIC *)
132 grackle_read(GEMINI_MPIC_PCI_CFG + 0x10);
133 OpenPIC_InitSenses = gemini_openpic_initsenses;
134 OpenPIC_NumInitSenses = sizeof( gemini_openpic_initsenses );
135
136 ioremap( GEMINI_MPIC_ADDR, OPENPIC_SIZE);
137}
138
139
140extern unsigned long loops_per_jiffy;
141extern int root_mountflags;
142extern char cmd_line[];
143
144void
145gemini_heartbeat(void)
146{
147 static unsigned long led = GEMINI_LEDBASE+(4*8);
148 static char direction = 8;
149
150
151 /* We only want to do this on 1 CPU */
152 if (smp_processor_id())
153 return;
154 *(char *)led = 0;
155 if ( (led + direction) > (GEMINI_LEDBASE+(7*8)) ||
156 (led + direction) < (GEMINI_LEDBASE+(4*8)) )
157 direction *= -1;
158 led += direction;
159 *(char *)led = 0xff;
160 ppc_md.heartbeat_count = ppc_md.heartbeat_reset;
161}
162
163void __init gemini_setup_arch(void)
164{
165 extern char cmd_line[];
166
167
168 loops_per_jiffy = 50000000/HZ;
169
170#ifdef CONFIG_BLK_DEV_INITRD
171 /* bootable off CDROM */
172 if (initrd_start)
173 ROOT_DEV = Root_SR0;
174 else
175#endif
176 ROOT_DEV = Root_SDA1;
177
178 /* nothing but serial consoles... */
179 sprintf(cmd_line, "%s console=ttyS0", cmd_line);
180
181 printk("Boot arguments: %s\n", cmd_line);
182
183 ppc_md.heartbeat = gemini_heartbeat;
184 ppc_md.heartbeat_reset = HZ/8;
185 ppc_md.heartbeat_count = 1;
186
187 /* Lookup PCI hosts */
188 gemini_find_bridges();
189 /* take special pains to map the MPIC, since it isn't mapped yet */
190 gemini_openpic_init();
191 /* start the L2 */
192 gemini_init_l2();
193}
194
195
196int
197gemini_get_clock_speed(void)
198{
199 unsigned long hid1, pvr;
200 int clock;
201
202 pvr = mfspr(SPRN_PVR);
203 hid1 = (mfspr(SPRN_HID1) >> 28) & 0xf;
204 if (PVR_VER(pvr) == 8 ||
205 PVR_VER(pvr) == 12)
206 hid1 = cpu_7xx[hid1];
207 else
208 hid1 = cpu_6xx[hid1];
209
210 switch((readb(GEMINI_BSTAT) & 0xc) >> 2) {
211
212 case 0:
213 default:
214 clock = (hid1*100)/3;
215 break;
216
217 case 1:
218 clock = (hid1*125)/3;
219 break;
220
221 case 2:
222 clock = (hid1*50);
223 break;
224 }
225
226 return clock;
227}
228
229void __init gemini_init_l2(void)
230{
231 unsigned char reg, brev, fam, creg;
232 unsigned long cache;
233 unsigned long pvr;
234
235 reg = readb(GEMINI_L2CFG);
236 brev = readb(GEMINI_BREV);
237 fam = readb(GEMINI_FEAT);
238 pvr = mfspr(SPRN_PVR);
239
240 switch(PVR_VER(pvr)) {
241
242 case 8:
243 if (reg & 0xc0)
244 cache = (((reg >> 6) & 0x3) << 28);
245 else
246 cache = 0x3 << 28;
247
248#ifdef CONFIG_SMP
249 /* Pre-3.0 processor revs had snooping errata. Leave
250 their L2's disabled with SMP. -- Dan */
251 if (PVR_CFG(pvr) < 3) {
252 printk("Pre-3.0 750; L2 left disabled!\n");
253 return;
254 }
255#endif /* CONFIG_SMP */
256
257 /* Special case: VGM5-B's came before L2 ratios were set on
258 the board. Processor speed shouldn't be too high, so
259 set L2 ratio to 1:1.5. */
260 if ((brev == 0x51) && ((fam & 0xa0) >> 4) == 0)
261 reg |= 1;
262
263 /* determine best cache ratio based upon what the board
264 tells us (which sometimes _may_ not be true) and
265 the processor speed. */
266 else {
267 if (gemini_get_clock_speed() > 250)
268 reg = 2;
269 }
270 break;
271 case 12:
272 {
273 static unsigned long l2_size_val = 0;
274
275 if (!l2_size_val)
276 l2_size_val = _get_L2CR();
277 cache = l2_size_val;
278 break;
279 }
280 case 4:
281 case 9:
282 creg = readb(GEMINI_CPUSTAT);
283 if (((creg & 0xc) >> 2) != 1)
284 printk("Dual-604 boards don't support the use of L2\n");
285 else
286 writeb(1, GEMINI_L2CFG);
287 return;
288 default:
289 printk("Unknown processor; L2 left disabled\n");
290 return;
291 }
292
293 cache |= ((1<<reg) << 25);
294 cache |= (L2CR_L2RAM_MASK|L2CR_L2CTL|L2CR_L2DO);
295 _set_L2CR(0);
296 _set_L2CR(cache | L2CR_L2E);
297
298}
299
300void
301gemini_restart(char *cmd)
302{
303 local_irq_disable();
304 /* make a clean restart, not via the MPIC */
305 _gemini_reboot();
306 for(;;);
307}
308
309void
310gemini_power_off(void)
311{
312 for(;;);
313}
314
315void
316gemini_halt(void)
317{
318 gemini_restart(NULL);
319}
320
321void __init gemini_init_IRQ(void)
322{
323 /* gemini has no 8259 */
324 openpic_init(1, 0, 0, -1);
325}
326
327#define gemini_rtc_read(x) (readb(GEMINI_RTC+(x)))
328#define gemini_rtc_write(val,x) (writeb((val),(GEMINI_RTC+(x))))
329
330/* ensure that the RTC is up and running */
331long __init gemini_time_init(void)
332{
333 unsigned char reg;
334
335 reg = gemini_rtc_read(M48T35_RTC_CONTROL);
336
337 if ( reg & M48T35_RTC_STOPPED ) {
338 printk(KERN_INFO "M48T35 real-time-clock was stopped. Now starting...\n");
339 gemini_rtc_write((reg & ~(M48T35_RTC_STOPPED)), M48T35_RTC_CONTROL);
340 gemini_rtc_write((reg | M48T35_RTC_SET), M48T35_RTC_CONTROL);
341 }
342 return 0;
343}
344
345#undef DEBUG_RTC
346
347unsigned long
348gemini_get_rtc_time(void)
349{
350 unsigned int year, mon, day, hour, min, sec;
351 unsigned char reg;
352
353 reg = gemini_rtc_read(M48T35_RTC_CONTROL);
354 gemini_rtc_write((reg|M48T35_RTC_READ), M48T35_RTC_CONTROL);
355#ifdef DEBUG_RTC
356 printk("get rtc: reg = %x\n", reg);
357#endif
358
359 do {
360 sec = gemini_rtc_read(M48T35_RTC_SECONDS);
361 min = gemini_rtc_read(M48T35_RTC_MINUTES);
362 hour = gemini_rtc_read(M48T35_RTC_HOURS);
363 day = gemini_rtc_read(M48T35_RTC_DOM);
364 mon = gemini_rtc_read(M48T35_RTC_MONTH);
365 year = gemini_rtc_read(M48T35_RTC_YEAR);
366 } while( sec != gemini_rtc_read(M48T35_RTC_SECONDS));
367#ifdef DEBUG_RTC
368 printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n",
369 sec, min, hour, day, mon, year);
370#endif
371
372 gemini_rtc_write(reg, M48T35_RTC_CONTROL);
373
374 BCD_TO_BIN(sec);
375 BCD_TO_BIN(min);
376 BCD_TO_BIN(hour);
377 BCD_TO_BIN(day);
378 BCD_TO_BIN(mon);
379 BCD_TO_BIN(year);
380
381 if ((year += 1900) < 1970)
382 year += 100;
383#ifdef DEBUG_RTC
384 printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n",
385 sec, min, hour, day, mon, year);
386#endif
387
388 return mktime( year, mon, day, hour, min, sec );
389}
390
391
392int
393gemini_set_rtc_time( unsigned long now )
394{
395 unsigned char reg;
396 struct rtc_time tm;
397
398 to_tm( now, &tm );
399
400 reg = gemini_rtc_read(M48T35_RTC_CONTROL);
401#ifdef DEBUG_RTC
402 printk("set rtc: reg = %x\n", reg);
403#endif
404
405 gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL);
406#ifdef DEBUG_RTC
407 printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n",
408 tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year);
409#endif
410
411 tm.tm_year -= 1900;
412 BIN_TO_BCD(tm.tm_sec);
413 BIN_TO_BCD(tm.tm_min);
414 BIN_TO_BCD(tm.tm_hour);
415 BIN_TO_BCD(tm.tm_mon);
416 BIN_TO_BCD(tm.tm_mday);
417 BIN_TO_BCD(tm.tm_year);
418#ifdef DEBUG_RTC
419 printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n",
420 tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year);
421#endif
422
423 gemini_rtc_write(tm.tm_sec, M48T35_RTC_SECONDS);
424 gemini_rtc_write(tm.tm_min, M48T35_RTC_MINUTES);
425 gemini_rtc_write(tm.tm_hour, M48T35_RTC_HOURS);
426 gemini_rtc_write(tm.tm_mday, M48T35_RTC_DOM);
427 gemini_rtc_write(tm.tm_mon, M48T35_RTC_MONTH);
428 gemini_rtc_write(tm.tm_year, M48T35_RTC_YEAR);
429
430 /* done writing */
431 gemini_rtc_write(reg, M48T35_RTC_CONTROL);
432
433 return 0;
434}
435
436/* use the RTC to determine the decrementer count */
437void __init gemini_calibrate_decr(void)
438{
439 int freq, divisor;
440 unsigned char reg;
441
442 /* determine processor bus speed */
443 reg = readb(GEMINI_BSTAT);
444
445 switch(((reg & 0x0c)>>2)&0x3) {
446 case 0:
447 default:
448 freq = 66667;
449 break;
450 case 1:
451 freq = 83000;
452 break;
453 case 2:
454 freq = 100000;
455 break;
456 }
457
458 freq *= 1000;
459 divisor = 4;
460 tb_ticks_per_jiffy = freq / HZ / divisor;
461 tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000);
462}
463
464unsigned long __init gemini_find_end_of_memory(void)
465{
466 unsigned long total;
467 unsigned char reg;
468
469 reg = readb(GEMINI_MEMCFG);
470 total = ((1<<((reg & 0x7) - 1)) *
471 (8<<((reg >> 3) & 0x7)));
472 total *= (1024*1024);
473 return total;
474}
475
476static void __init
477gemini_map_io(void)
478{
479 io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO);
480 io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO);
481}
482
483#ifdef CONFIG_SMP
484static int
485smp_gemini_probe(void)
486{
487 int i, nr;
488
489 nr = (readb(GEMINI_CPUSTAT) & GEMINI_CPU_COUNT_MASK) >> 2;
490 if (nr == 0)
491 nr = 4;
492
493 if (nr > 1) {
494 openpic_request_IPIs();
495 for (i = 1; i < nr; ++i)
496 smp_hw_index[i] = i;
497 }
498
499 return nr;
500}
501
502static void
503smp_gemini_kick_cpu(int nr)
504{
505 openpic_reset_processor_phys(1 << nr);
506 openpic_reset_processor_phys(0);
507}
508
509static void
510smp_gemini_setup_cpu(int cpu_nr)
511{
512 if (OpenPIC_Addr)
513 do_openpic_setup_cpu();
514 if (cpu_nr > 0)
515 gemini_init_l2();
516}
517
518static struct smp_ops_t gemini_smp_ops = {
519 smp_openpic_message_pass,
520 smp_gemini_probe,
521 smp_gemini_kick_cpu,
522 smp_gemini_setup_cpu,
523 .give_timebase = smp_generic_give_timebase,
524 .take_timebase = smp_generic_take_timebase,
525};
526#endif /* CONFIG_SMP */
527
528void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
529 unsigned long r6, unsigned long r7)
530{
531 int i;
532
533 /* Restore BATs for now */
534 mtspr(SPRN_DBAT3U, 0xf0001fff);
535 mtspr(SPRN_DBAT3L, 0xf000002a);
536
537 parse_bootinfo(find_bootinfo());
538
539 for(i = 0; i < GEMINI_LEDS; i++)
540 gemini_led_off(i);
541
542 ISA_DMA_THRESHOLD = 0;
543 DMA_MODE_READ = 0;
544 DMA_MODE_WRITE = 0;
545
546#ifdef CONFIG_BLK_DEV_INITRD
547 if ( r4 )
548 {
549 initrd_start = r4 + KERNELBASE;
550 initrd_end = r5 + KERNELBASE;
551 }
552#endif
553
554 ppc_md.setup_arch = gemini_setup_arch;
555 ppc_md.show_cpuinfo = gemini_show_cpuinfo;
556 ppc_md.init_IRQ = gemini_init_IRQ;
557 ppc_md.get_irq = openpic_get_irq;
558 ppc_md.init = NULL;
559
560 ppc_md.restart = gemini_restart;
561 ppc_md.power_off = gemini_power_off;
562 ppc_md.halt = gemini_halt;
563
564 ppc_md.time_init = gemini_time_init;
565 ppc_md.set_rtc_time = gemini_set_rtc_time;
566 ppc_md.get_rtc_time = gemini_get_rtc_time;
567 ppc_md.calibrate_decr = gemini_calibrate_decr;
568
569 ppc_md.find_end_of_memory = gemini_find_end_of_memory;
570 ppc_md.setup_io_mappings = gemini_map_io;
571
572 ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup;
573
574#ifdef CONFIG_SMP
575 smp_ops = &gemini_smp_ops;
576#endif /* CONFIG_SMP */
577}
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c
index 18dc6e8dd4f4..b947c774f524 100644
--- a/arch/ppc/platforms/lopec.c
+++ b/arch/ppc/platforms/lopec.c
@@ -344,7 +344,7 @@ lopec_setup_arch(void)
344 if (bootargs != NULL) { 344 if (bootargs != NULL) {
345 strcpy(cmd_line, bootargs); 345 strcpy(cmd_line, bootargs);
346 /* again.. */ 346 /* again.. */
347 strcpy(saved_command_line, cmd_line); 347 strcpy(boot_command_line, cmd_line);
348 } 348 }
349 } 349 }
350#endif 350#endif
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c
index 8a0c07eb4449..5b05d4bd0df7 100644
--- a/arch/ppc/platforms/mpc866ads_setup.c
+++ b/arch/ppc/platforms/mpc866ads_setup.c
@@ -369,7 +369,7 @@ int __init mpc866ads_init(void)
369 ppc_sys_device_setfunc(MPC8xx_CPM_SMC1, PPC_SYS_FUNC_UART); 369 ppc_sys_device_setfunc(MPC8xx_CPM_SMC1, PPC_SYS_FUNC_UART);
370#endif 370#endif
371 371
372#ifdef CONFIG_SERIAL_CPM_SMC 372#ifdef CONFIG_SERIAL_CPM_SMC2
373 ppc_sys_device_enable(MPC8xx_CPM_SMC2); 373 ppc_sys_device_enable(MPC8xx_CPM_SMC2);
374 ppc_sys_device_setfunc(MPC8xx_CPM_SMC2, PPC_SYS_FUNC_UART); 374 ppc_sys_device_setfunc(MPC8xx_CPM_SMC2, PPC_SYS_FUNC_UART);
375#endif 375#endif
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c
index 9778105d4dfe..8a1788c48155 100644
--- a/arch/ppc/platforms/pplus.c
+++ b/arch/ppc/platforms/pplus.c
@@ -592,7 +592,7 @@ static void __init pplus_setup_arch(void)
592 if (bootargs != NULL) { 592 if (bootargs != NULL) {
593 strcpy(cmd_line, bootargs); 593 strcpy(cmd_line, bootargs);
594 /* again.. */ 594 /* again.. */
595 strcpy(saved_command_line, cmd_line); 595 strcpy(boot_command_line, cmd_line);
596 } 596 }
597 } 597 }
598#endif 598#endif
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 1cb75a1f825e..f166299571d6 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -634,7 +634,7 @@ static void __init prep_init_sound(void)
634 /* 634 /*
635 * Find a way to push these informations to the cs4232 driver 635 * Find a way to push these informations to the cs4232 driver
636 * Give it out with printk, when not in cmd_line? 636 * Give it out with printk, when not in cmd_line?
637 * Append it to cmd_line and saved_command_line? 637 * Append it to cmd_line and boot_command_line?
638 * Format is cs4232=io,irq,dma,dma2 638 * Format is cs4232=io,irq,dma,dma2
639 */ 639 */
640} 640}
@@ -897,7 +897,7 @@ prep_setup_arch(void)
897 if (bootargs != NULL) { 897 if (bootargs != NULL) {
898 strcpy(cmd_line, bootargs); 898 strcpy(cmd_line, bootargs);
899 /* again.. */ 899 /* again.. */
900 strcpy(saved_command_line, cmd_line); 900 strcpy(boot_command_line, cmd_line);
901 } 901 }
902 } 902 }
903 903
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index dca23f2ef851..09911118c675 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -45,7 +45,6 @@ obj-$(CONFIG_EBONY) += pci_auto.o todc_time.o
45obj-$(CONFIG_EV64260) += todc_time.o pci_auto.o 45obj-$(CONFIG_EV64260) += todc_time.o pci_auto.o
46obj-$(CONFIG_EV64360) += todc_time.o 46obj-$(CONFIG_EV64360) += todc_time.o
47obj-$(CONFIG_CHESTNUT) += mv64360_pic.o pci_auto.o 47obj-$(CONFIG_CHESTNUT) += mv64360_pic.o pci_auto.o
48obj-$(CONFIG_GEMINI) += open_pic.o
49obj-$(CONFIG_GT64260) += gt64260_pic.o 48obj-$(CONFIG_GT64260) += gt64260_pic.o
50obj-$(CONFIG_LOPEC) += pci_auto.o todc_time.o 49obj-$(CONFIG_LOPEC) += pci_auto.o todc_time.o
51obj-$(CONFIG_HDPU) += pci_auto.o 50obj-$(CONFIG_HDPU) += pci_auto.o
@@ -70,6 +69,7 @@ obj-$(CONFIG_SANDPOINT) += pci_auto.o todc_time.o
70obj-$(CONFIG_SBC82xx) += todc_time.o 69obj-$(CONFIG_SBC82xx) += todc_time.o
71obj-$(CONFIG_SPRUCE) += cpc700_pic.o pci_auto.o \ 70obj-$(CONFIG_SPRUCE) += cpc700_pic.o pci_auto.o \
72 todc_time.o 71 todc_time.o
72obj-$(CONFIG_TAISHAN) += pci_auto.o
73obj-$(CONFIG_8260) += m8260_setup.o pq2_devices.o pq2_sys.o \ 73obj-$(CONFIG_8260) += m8260_setup.o pq2_devices.o pq2_sys.o \
74 ppc_sys.o 74 ppc_sys.o
75obj-$(CONFIG_PCI_8260) += m82xx_pci.o pci_auto.o 75obj-$(CONFIG_PCI_8260) += m82xx_pci.o pci_auto.o
diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c
index a43dda5a8334..1e5a00a4b5f5 100644
--- a/arch/ppc/syslib/i8259.c
+++ b/arch/ppc/syslib/i8259.c
@@ -154,7 +154,7 @@ static struct resource pic_edgectrl_iores = {
154 154
155static struct irqaction i8259_irqaction = { 155static struct irqaction i8259_irqaction = {
156 .handler = no_action, 156 .handler = no_action,
157 .flags = SA_INTERRUPT, 157 .flags = IRQF_DISABLED,
158 .mask = CPU_MASK_NONE, 158 .mask = CPU_MASK_NONE,
159 .name = "82c59 secondary cascade", 159 .name = "82c59 secondary cascade",
160}; 160};
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c
index 5475709ce07b..ebb8c8f8f30c 100644
--- a/arch/ppc/syslib/m8260_pci_erratum9.c
+++ b/arch/ppc/syslib/m8260_pci_erratum9.c
@@ -105,7 +105,8 @@ void idma_pci9_init(void)
105 idma_reg[IDMA_CHAN].idmr = 0; /* mask all IDMA interrupts */ 105 idma_reg[IDMA_CHAN].idmr = 0; /* mask all IDMA interrupts */
106 idma_reg[IDMA_CHAN].idsr = 0xff; /* clear all event flags */ 106 idma_reg[IDMA_CHAN].idsr = 0xff; /* clear all event flags */
107 107
108 printk("<4>Using IDMA%d for MPC8260 device erratum PCI 9 workaround\n", 108 printk(KERN_WARNING
109 "Using IDMA%d for MPC8260 device erratum PCI 9 workaround\n",
109 IDMA_CHAN + 1); 110 IDMA_CHAN + 1);
110 111
111 return; 112 return;
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index d8d299bd1a12..01e48d88f22d 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -77,7 +77,7 @@ static struct mtd_partition mpc8xxads_partitions[] = {
77 } 77 }
78}; 78};
79 79
80#define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) 80#define mpc8xxads_part_num ARRAY_SIZE(mpc8xxads_partitions)
81 81
82#endif 82#endif
83 83
diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/ppc/syslib/ppc85xx_rio.c
index 05b0e9415085..2b097800cdd9 100644
--- a/arch/ppc/syslib/ppc85xx_rio.c
+++ b/arch/ppc/syslib/ppc85xx_rio.c
@@ -59,8 +59,6 @@
59#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET)) 59#define DBELL_TID(x) (*(u8 *)(x + DOORBELL_TID_OFFSET))
60#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET)) 60#define DBELL_INF(x) (*(u16 *)(x + DOORBELL_INFO_OFFSET))
61 61
62#define is_power_of_2(x) (((x) & ((x) - 1)) == 0)
63
64struct rio_atmu_regs { 62struct rio_atmu_regs {
65 u32 rowtar; 63 u32 rowtar;
66 u32 pad1; 64 u32 pad1;
diff --git a/arch/ppc/xmon/ppc-opc.c b/arch/ppc/xmon/ppc-opc.c
index 533a6c9973d4..034313cef6e7 100644
--- a/arch/ppc/xmon/ppc-opc.c
+++ b/arch/ppc/xmon/ppc-opc.c
@@ -19,6 +19,7 @@ along with this file; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 20
21#include <linux/posix_types.h> 21#include <linux/posix_types.h>
22#include <linux/kernel.h>
22#include "ansidecl.h" 23#include "ansidecl.h"
23#include "ppc.h" 24#include "ppc.h"
24 25
@@ -2669,8 +2670,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
2669 2670
2670}; 2671};
2671 2672
2672const int powerpc_num_opcodes = 2673const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes);
2673 sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
2674 2674
2675/* The macro table. This is only used by the assembler. */ 2675/* The macro table. This is only used by the assembler. */
2676 2676
@@ -2717,5 +2717,4 @@ const struct powerpc_macro powerpc_macros[] = {
2717 2717
2718}; 2718};
2719 2719
2720const int powerpc_num_macros = 2720const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
2721 sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index d74a883e5bde..8f0b953179fa 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -58,10 +58,7 @@ static struct sysrq_key_op sysrq_xmon_op =
58void 58void
59xmon_map_scc(void) 59xmon_map_scc(void)
60{ 60{
61#if defined(CONFIG_GEMINI) 61#if defined(CONFIG_405GP)
62 /* should already be mapped by the kernel boot */
63 sccd = (volatile unsigned char *) 0xffeffb08;
64#elif defined(CONFIG_405GP)
65 sccd = (volatile unsigned char *)0xef600300; 62 sccd = (volatile unsigned char *)0xef600300;
66#elif defined(CONFIG_440EP) 63#elif defined(CONFIG_440EP)
67 sccd = (volatile unsigned char *) ioremap(PPC440EP_UART0_ADDR, 8); 64 sccd = (volatile unsigned char *) ioremap(PPC440EP_UART0_ADDR, 8);
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 12272361c018..d9425f59be91 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -7,6 +7,10 @@ config MMU
7 bool 7 bool
8 default y 8 default y
9 9
10config ZONE_DMA
11 def_bool y
12 depends on 64BIT
13
10config LOCKDEP_SUPPORT 14config LOCKDEP_SUPPORT
11 bool 15 bool
12 default y 16 default y
@@ -34,13 +38,12 @@ config GENERIC_HWEIGHT
34 bool 38 bool
35 default y 39 default y
36 40
37config GENERIC_CALIBRATE_DELAY
38 bool
39 default y
40
41config GENERIC_TIME 41config GENERIC_TIME
42 def_bool y 42 def_bool y
43 43
44config NO_IOMEM
45 def_bool y
46
44mainmenu "Linux Kernel Configuration" 47mainmenu "Linux Kernel Configuration"
45 48
46config S390 49config S390
@@ -134,6 +137,31 @@ config AUDIT_ARCH
134 bool 137 bool
135 default y 138 default y
136 139
140config S390_SWITCH_AMODE
141 bool "Switch kernel/user addressing modes"
142 help
143 This option allows to switch the addressing modes of kernel and user
144 space. The kernel parameter switch_amode=on will enable this feature,
145 default is disabled. Enabling this (via kernel parameter) on machines
146 earlier than IBM System z9-109 EC/BC will reduce system performance.
147
148 Note that this option will also be selected by selecting the execute
149 protection option below. Enabling the execute protection via the
150 noexec kernel parameter will also switch the addressing modes,
151 independent of the switch_amode kernel parameter.
152
153
154config S390_EXEC_PROTECT
155 bool "Data execute protection"
156 select S390_SWITCH_AMODE
157 help
158 This option allows to enable a buffer overflow protection for user
159 space programs and it also selects the addressing mode option above.
160 The kernel parameter noexec=on will enable this feature and also
161 switch the addressing modes, default is disabled. Enabling this (via
162 kernel parameter) on machines earlier than IBM System z9-109 EC/BC
163 will reduce system performance.
164
137comment "Code generation options" 165comment "Code generation options"
138 166
139choice 167choice
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 6598e5268573..b1e558496469 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -82,18 +82,18 @@ AFLAGS += $(aflags-y)
82OBJCOPYFLAGS := -O binary 82OBJCOPYFLAGS := -O binary
83LDFLAGS_vmlinux := -e start 83LDFLAGS_vmlinux := -e start
84 84
85head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o 85head-y := arch/s390/kernel/head.o arch/s390/kernel/init_task.o
86 86
87core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ arch/$(ARCH)/crypto/ \ 87core-y += arch/s390/mm/ arch/s390/kernel/ arch/s390/crypto/ \
88 arch/$(ARCH)/appldata/ arch/$(ARCH)/hypfs/ 88 arch/s390/appldata/ arch/s390/hypfs/
89libs-y += arch/$(ARCH)/lib/ 89libs-y += arch/s390/lib/
90drivers-y += drivers/s390/ 90drivers-y += drivers/s390/
91drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/ 91drivers-$(CONFIG_MATHEMU) += arch/s390/math-emu/
92 92
93# must be linked after kernel 93# must be linked after kernel
94drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/ 94drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/
95 95
96boot := arch/$(ARCH)/boot 96boot := arch/s390/boot
97 97
98all: image 98all: image
99 99
diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h
index 0429481dea63..4069b81f7f1d 100644
--- a/arch/s390/appldata/appldata.h
+++ b/arch/s390/appldata/appldata.h
@@ -21,8 +21,7 @@
21#define APPLDATA_RECORD_NET_SUM_ID 0x03 /* must be < 256 ! */ 21#define APPLDATA_RECORD_NET_SUM_ID 0x03 /* must be < 256 ! */
22#define APPLDATA_RECORD_PROC_ID 0x04 22#define APPLDATA_RECORD_PROC_ID 0x04
23 23
24#define CTL_APPLDATA 2120 /* sysctl IDs, must be unique */ 24#define CTL_APPLDATA_TIMER 2121 /* sysctl IDs, must be unique */
25#define CTL_APPLDATA_TIMER 2121
26#define CTL_APPLDATA_INTERVAL 2122 25#define CTL_APPLDATA_INTERVAL 2122
27#define CTL_APPLDATA_MEM 2123 26#define CTL_APPLDATA_MEM 2123
28#define CTL_APPLDATA_OS 2124 27#define CTL_APPLDATA_OS 2124
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index b8c237290263..0c3cf4b16ae4 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -81,7 +81,7 @@ static struct ctl_table appldata_dir_table[] = {
81/* 81/*
82 * Timer 82 * Timer
83 */ 83 */
84DEFINE_PER_CPU(struct vtimer_list, appldata_timer); 84static DEFINE_PER_CPU(struct vtimer_list, appldata_timer);
85static atomic_t appldata_expire_count = ATOMIC_INIT(0); 85static atomic_t appldata_expire_count = ATOMIC_INIT(0);
86 86
87static DEFINE_SPINLOCK(appldata_timer_lock); 87static DEFINE_SPINLOCK(appldata_timer_lock);
@@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops)
506 506
507 ops->ctl_table[3].ctl_name = 0; 507 ops->ctl_table[3].ctl_name = 0;
508 508
509 ops->sysctl_header = register_sysctl_table(ops->ctl_table,1); 509 ops->sysctl_header = register_sysctl_table(ops->ctl_table);
510 510
511 P_INFO("%s-ops registered!\n", ops->name); 511 P_INFO("%s-ops registered!\n", ops->name);
512 return 0; 512 return 0;
@@ -606,7 +606,7 @@ static int __init appldata_init(void)
606 /* Register cpu hotplug notifier */ 606 /* Register cpu hotplug notifier */
607 register_hotcpu_notifier(&appldata_nb); 607 register_hotcpu_notifier(&appldata_nb);
608 608
609 appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 1); 609 appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
610#ifdef MODULE 610#ifdef MODULE
611 appldata_dir_table[0].de->owner = THIS_MODULE; 611 appldata_dir_table[0].de->owner = THIS_MODULE;
612 appldata_table[0].de->owner = THIS_MODULE; 612 appldata_table[0].de->owner = THIS_MODULE;
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 8aea3698a77b..4ca615788702 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -36,7 +36,7 @@
36 * book: 36 * book:
37 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml 37 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml
38 */ 38 */
39struct appldata_mem_data { 39static struct appldata_mem_data {
40 u64 timestamp; 40 u64 timestamp;
41 u32 sync_count_1; /* after VM collected the record data, */ 41 u32 sync_count_1; /* after VM collected the record data, */
42 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the 42 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c
index 075e619bf37d..f64b8c867ae2 100644
--- a/arch/s390/appldata/appldata_net_sum.c
+++ b/arch/s390/appldata/appldata_net_sum.c
@@ -34,7 +34,7 @@
34 * book: 34 * book:
35 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml 35 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml
36 */ 36 */
37struct appldata_net_sum_data { 37static struct appldata_net_sum_data {
38 u64 timestamp; 38 u64 timestamp;
39 u32 sync_count_1; /* after VM collected the record data, */ 39 u32 sync_count_1; /* after VM collected the record data, */
40 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the 40 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
diff --git a/arch/s390/crypto/Kconfig b/arch/s390/crypto/Kconfig
new file mode 100644
index 000000000000..99ff9f08e4d7
--- /dev/null
+++ b/arch/s390/crypto/Kconfig
@@ -0,0 +1,60 @@
1config CRYPTO_SHA1_S390
2 tristate "SHA1 digest algorithm"
3 depends on S390
4 select CRYPTO_ALGAPI
5 help
6 This is the s390 hardware accelerated implementation of the
7 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
8
9config CRYPTO_SHA256_S390
10 tristate "SHA256 digest algorithm"
11 depends on S390
12 select CRYPTO_ALGAPI
13 help
14 This is the s390 hardware accelerated implementation of the
15 SHA256 secure hash standard (DFIPS 180-2).
16
17 This version of SHA implements a 256 bit hash with 128 bits of
18 security against collision attacks.
19
20config CRYPTO_DES_S390
21 tristate "DES and Triple DES cipher algorithms"
22 depends on S390
23 select CRYPTO_ALGAPI
24 select CRYPTO_BLKCIPHER
25 help
26 This us the s390 hardware accelerated implementation of the
27 DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
28
29config CRYPTO_AES_S390
30 tristate "AES cipher algorithms"
31 depends on S390
32 select CRYPTO_ALGAPI
33 select CRYPTO_BLKCIPHER
34 help
35 This is the s390 hardware accelerated implementation of the
36 AES cipher algorithms (FIPS-197). AES uses the Rijndael
37 algorithm.
38
39 Rijndael appears to be consistently a very good performer in
40 both hardware and software across a wide range of computing
41 environments regardless of its use in feedback or non-feedback
42 modes. Its key setup time is excellent, and its key agility is
43 good. Rijndael's very low memory requirements make it very well
44 suited for restricted-space environments, in which it also
45 demonstrates excellent performance. Rijndael's operations are
46 among the easiest to defend against power and timing attacks.
47
48 On s390 the System z9-109 currently only supports the key size
49 of 128 bit.
50
51config S390_PRNG
52 tristate "Pseudo random number generator device driver"
53 depends on S390
54 default "m"
55 help
56 Select this option if you want to use the s390 pseudo random number
57 generator. The PRNG is part of the cryptograhic processor functions
58 and uses triple-DES to generate secure random numbers like the
59 ANSI X9.17 standard. The PRNG is usable via the char device
60 /dev/prandom.
diff --git a/arch/s390/crypto/Makefile b/arch/s390/crypto/Makefile
index bfe2541dc5cf..14e552c5cc43 100644
--- a/arch/s390/crypto/Makefile
+++ b/arch/s390/crypto/Makefile
@@ -6,5 +6,4 @@ obj-$(CONFIG_CRYPTO_SHA1_S390) += sha1_s390.o
6obj-$(CONFIG_CRYPTO_SHA256_S390) += sha256_s390.o 6obj-$(CONFIG_CRYPTO_SHA256_S390) += sha256_s390.o
7obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o des_check_key.o 7obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o des_check_key.o
8obj-$(CONFIG_CRYPTO_AES_S390) += aes_s390.o 8obj-$(CONFIG_CRYPTO_AES_S390) += aes_s390.o
9 9obj-$(CONFIG_S390_PRNG) += prng.o
10obj-$(CONFIG_CRYPTO_TEST) += crypt_s390_query.o
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
index 15c9eec02928..91636353f6f0 100644
--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@ -4,7 +4,7 @@
4 * s390 implementation of the AES Cipher Algorithm. 4 * s390 implementation of the AES Cipher Algorithm.
5 * 5 *
6 * s390 Version: 6 * s390 Version:
7 * Copyright (C) 2005 IBM Deutschland GmbH, IBM Corporation 7 * Copyright IBM Corp. 2005,2007
8 * Author(s): Jan Glauber (jang@de.ibm.com) 8 * Author(s): Jan Glauber (jang@de.ibm.com)
9 * 9 *
10 * Derived from "crypto/aes.c" 10 * Derived from "crypto/aes.c"
@@ -27,9 +27,11 @@
27/* data block size for all key lengths */ 27/* data block size for all key lengths */
28#define AES_BLOCK_SIZE 16 28#define AES_BLOCK_SIZE 16
29 29
30int has_aes_128 = 0; 30#define AES_KEYLEN_128 1
31int has_aes_192 = 0; 31#define AES_KEYLEN_192 2
32int has_aes_256 = 0; 32#define AES_KEYLEN_256 4
33
34static char keylen_flag = 0;
33 35
34struct s390_aes_ctx { 36struct s390_aes_ctx {
35 u8 iv[AES_BLOCK_SIZE]; 37 u8 iv[AES_BLOCK_SIZE];
@@ -47,20 +49,19 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
47 49
48 switch (key_len) { 50 switch (key_len) {
49 case 16: 51 case 16:
50 if (!has_aes_128) 52 if (!(keylen_flag & AES_KEYLEN_128))
51 goto fail; 53 goto fail;
52 break; 54 break;
53 case 24: 55 case 24:
54 if (!has_aes_192) 56 if (!(keylen_flag & AES_KEYLEN_192))
55 goto fail; 57 goto fail;
56 58
57 break; 59 break;
58 case 32: 60 case 32:
59 if (!has_aes_256) 61 if (!(keylen_flag & AES_KEYLEN_256))
60 goto fail; 62 goto fail;
61 break; 63 break;
62 default: 64 default:
63 /* invalid key length */
64 goto fail; 65 goto fail;
65 break; 66 break;
66 } 67 }
@@ -322,34 +323,32 @@ static int __init aes_init(void)
322 int ret; 323 int ret;
323 324
324 if (crypt_s390_func_available(KM_AES_128_ENCRYPT)) 325 if (crypt_s390_func_available(KM_AES_128_ENCRYPT))
325 has_aes_128 = 1; 326 keylen_flag |= AES_KEYLEN_128;
326 if (crypt_s390_func_available(KM_AES_192_ENCRYPT)) 327 if (crypt_s390_func_available(KM_AES_192_ENCRYPT))
327 has_aes_192 = 1; 328 keylen_flag |= AES_KEYLEN_192;
328 if (crypt_s390_func_available(KM_AES_256_ENCRYPT)) 329 if (crypt_s390_func_available(KM_AES_256_ENCRYPT))
329 has_aes_256 = 1; 330 keylen_flag |= AES_KEYLEN_256;
331
332 if (!keylen_flag)
333 return -EOPNOTSUPP;
330 334
331 if (!has_aes_128 && !has_aes_192 && !has_aes_256) 335 /* z9 109 and z9 BC/EC only support 128 bit key length */
332 return -ENOSYS; 336 if (keylen_flag == AES_KEYLEN_128)
337 printk(KERN_INFO
338 "aes_s390: hardware acceleration only available for"
339 "128 bit keys\n");
333 340
334 ret = crypto_register_alg(&aes_alg); 341 ret = crypto_register_alg(&aes_alg);
335 if (ret != 0) { 342 if (ret)
336 printk(KERN_INFO "crypt_s390: aes-s390 couldn't be loaded.\n");
337 goto aes_err; 343 goto aes_err;
338 }
339 344
340 ret = crypto_register_alg(&ecb_aes_alg); 345 ret = crypto_register_alg(&ecb_aes_alg);
341 if (ret != 0) { 346 if (ret)
342 printk(KERN_INFO
343 "crypt_s390: ecb-aes-s390 couldn't be loaded.\n");
344 goto ecb_aes_err; 347 goto ecb_aes_err;
345 }
346 348
347 ret = crypto_register_alg(&cbc_aes_alg); 349 ret = crypto_register_alg(&cbc_aes_alg);
348 if (ret != 0) { 350 if (ret)
349 printk(KERN_INFO
350 "crypt_s390: cbc-aes-s390 couldn't be loaded.\n");
351 goto cbc_aes_err; 351 goto cbc_aes_err;
352 }
353 352
354out: 353out:
355 return ret; 354 return ret;
diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h
index 2b137089f625..2775d2618332 100644
--- a/arch/s390/crypto/crypt_s390.h
+++ b/arch/s390/crypto/crypt_s390.h
@@ -3,8 +3,9 @@
3 * 3 *
4 * Support for s390 cryptographic instructions. 4 * Support for s390 cryptographic instructions.
5 * 5 *
6 * Copyright (C) 2003 IBM Deutschland GmbH, IBM Corporation 6 * Copyright IBM Corp. 2003,2007
7 * Author(s): Thomas Spatzier (tspat@de.ibm.com) 7 * Author(s): Thomas Spatzier
8 * Jan Glauber (jan.glauber@de.ibm.com)
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify it 10 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free 11 * under the terms of the GNU General Public License as published by the Free
@@ -32,7 +33,8 @@ enum crypt_s390_operations {
32 CRYPT_S390_KMAC = 0x0500 33 CRYPT_S390_KMAC = 0x0500
33}; 34};
34 35
35/* function codes for KM (CIPHER MESSAGE) instruction 36/*
37 * function codes for KM (CIPHER MESSAGE) instruction
36 * 0x80 is the decipher modifier bit 38 * 0x80 is the decipher modifier bit
37 */ 39 */
38enum crypt_s390_km_func { 40enum crypt_s390_km_func {
@@ -51,7 +53,8 @@ enum crypt_s390_km_func {
51 KM_AES_256_DECRYPT = CRYPT_S390_KM | 0x14 | 0x80, 53 KM_AES_256_DECRYPT = CRYPT_S390_KM | 0x14 | 0x80,
52}; 54};
53 55
54/* function codes for KMC (CIPHER MESSAGE WITH CHAINING) 56/*
57 * function codes for KMC (CIPHER MESSAGE WITH CHAINING)
55 * instruction 58 * instruction
56 */ 59 */
57enum crypt_s390_kmc_func { 60enum crypt_s390_kmc_func {
@@ -68,9 +71,11 @@ enum crypt_s390_kmc_func {
68 KMC_AES_192_DECRYPT = CRYPT_S390_KMC | 0x13 | 0x80, 71 KMC_AES_192_DECRYPT = CRYPT_S390_KMC | 0x13 | 0x80,
69 KMC_AES_256_ENCRYPT = CRYPT_S390_KMC | 0x14, 72 KMC_AES_256_ENCRYPT = CRYPT_S390_KMC | 0x14,
70 KMC_AES_256_DECRYPT = CRYPT_S390_KMC | 0x14 | 0x80, 73 KMC_AES_256_DECRYPT = CRYPT_S390_KMC | 0x14 | 0x80,
74 KMC_PRNG = CRYPT_S390_KMC | 0x43,
71}; 75};
72 76
73/* function codes for KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST) 77/*
78 * function codes for KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST)
74 * instruction 79 * instruction
75 */ 80 */
76enum crypt_s390_kimd_func { 81enum crypt_s390_kimd_func {
@@ -79,7 +84,8 @@ enum crypt_s390_kimd_func {
79 KIMD_SHA_256 = CRYPT_S390_KIMD | 2, 84 KIMD_SHA_256 = CRYPT_S390_KIMD | 2,
80}; 85};
81 86
82/* function codes for KLMD (COMPUTE LAST MESSAGE DIGEST) 87/*
88 * function codes for KLMD (COMPUTE LAST MESSAGE DIGEST)
83 * instruction 89 * instruction
84 */ 90 */
85enum crypt_s390_klmd_func { 91enum crypt_s390_klmd_func {
@@ -88,7 +94,8 @@ enum crypt_s390_klmd_func {
88 KLMD_SHA_256 = CRYPT_S390_KLMD | 2, 94 KLMD_SHA_256 = CRYPT_S390_KLMD | 2,
89}; 95};
90 96
91/* function codes for KMAC (COMPUTE MESSAGE AUTHENTICATION CODE) 97/*
98 * function codes for KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
92 * instruction 99 * instruction
93 */ 100 */
94enum crypt_s390_kmac_func { 101enum crypt_s390_kmac_func {
@@ -98,229 +105,219 @@ enum crypt_s390_kmac_func {
98 KMAC_TDEA_192 = CRYPT_S390_KMAC | 3 105 KMAC_TDEA_192 = CRYPT_S390_KMAC | 3
99}; 106};
100 107
101/* status word for s390 crypto instructions' QUERY functions */ 108/**
102struct crypt_s390_query_status { 109 * crypt_s390_km:
103 u64 high; 110 * @func: the function code passed to KM; see crypt_s390_km_func
104 u64 low; 111 * @param: address of parameter block; see POP for details on each func
105}; 112 * @dest: address of destination memory area
106 113 * @src: address of source memory area
107/* 114 * @src_len: length of src operand in bytes
115 *
108 * Executes the KM (CIPHER MESSAGE) operation of the CPU. 116 * Executes the KM (CIPHER MESSAGE) operation of the CPU.
109 * @param func: the function code passed to KM; see crypt_s390_km_func 117 *
110 * @param param: address of parameter block; see POP for details on each func 118 * Returns -1 for failure, 0 for the query func, number of processed
111 * @param dest: address of destination memory area 119 * bytes for encryption/decryption funcs
112 * @param src: address of source memory area
113 * @param src_len: length of src operand in bytes
114 * @returns < zero for failure, 0 for the query func, number of processed bytes
115 * for encryption/decryption funcs
116 */ 120 */
117static inline int 121static inline int crypt_s390_km(long func, void *param,
118crypt_s390_km(long func, void* param, u8* dest, const u8* src, long src_len) 122 u8 *dest, const u8 *src, long src_len)
119{ 123{
120 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; 124 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK;
121 register void* __param asm("1") = param; 125 register void *__param asm("1") = param;
122 register const u8* __src asm("2") = src; 126 register const u8 *__src asm("2") = src;
123 register long __src_len asm("3") = src_len; 127 register long __src_len asm("3") = src_len;
124 register u8* __dest asm("4") = dest; 128 register u8 *__dest asm("4") = dest;
125 int ret; 129 int ret;
126 130
127 asm volatile( 131 asm volatile(
128 "0: .insn rre,0xb92e0000,%3,%1 \n" /* KM opcode */ 132 "0: .insn rre,0xb92e0000,%3,%1 \n" /* KM opcode */
129 "1: brc 1,0b \n" /* handle partial completion */ 133 "1: brc 1,0b \n" /* handle partial completion */
130 " ahi %0,%h7\n" 134 " la %0,0\n"
131 "2: ahi %0,%h8\n" 135 "2:\n"
132 "3:\n" 136 EX_TABLE(0b,2b) EX_TABLE(1b,2b)
133 EX_TABLE(0b,3b) EX_TABLE(1b,2b)
134 : "=d" (ret), "+a" (__src), "+d" (__src_len), "+a" (__dest) 137 : "=d" (ret), "+a" (__src), "+d" (__src_len), "+a" (__dest)
135 : "d" (__func), "a" (__param), "0" (-EFAULT), 138 : "d" (__func), "a" (__param), "0" (-1) : "cc", "memory");
136 "K" (ENOSYS), "K" (-ENOSYS + EFAULT) : "cc", "memory");
137 if (ret < 0) 139 if (ret < 0)
138 return ret; 140 return ret;
139 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; 141 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len;
140} 142}
141 143
142/* 144/**
145 * crypt_s390_kmc:
146 * @func: the function code passed to KM; see crypt_s390_kmc_func
147 * @param: address of parameter block; see POP for details on each func
148 * @dest: address of destination memory area
149 * @src: address of source memory area
150 * @src_len: length of src operand in bytes
151 *
143 * Executes the KMC (CIPHER MESSAGE WITH CHAINING) operation of the CPU. 152 * Executes the KMC (CIPHER MESSAGE WITH CHAINING) operation of the CPU.
144 * @param func: the function code passed to KM; see crypt_s390_kmc_func 153 *
145 * @param param: address of parameter block; see POP for details on each func 154 * Returns -1 for failure, 0 for the query func, number of processed
146 * @param dest: address of destination memory area 155 * bytes for encryption/decryption funcs
147 * @param src: address of source memory area
148 * @param src_len: length of src operand in bytes
149 * @returns < zero for failure, 0 for the query func, number of processed bytes
150 * for encryption/decryption funcs
151 */ 156 */
152static inline int 157static inline int crypt_s390_kmc(long func, void *param,
153crypt_s390_kmc(long func, void* param, u8* dest, const u8* src, long src_len) 158 u8 *dest, const u8 *src, long src_len)
154{ 159{
155 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; 160 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK;
156 register void* __param asm("1") = param; 161 register void *__param asm("1") = param;
157 register const u8* __src asm("2") = src; 162 register const u8 *__src asm("2") = src;
158 register long __src_len asm("3") = src_len; 163 register long __src_len asm("3") = src_len;
159 register u8* __dest asm("4") = dest; 164 register u8 *__dest asm("4") = dest;
160 int ret; 165 int ret;
161 166
162 asm volatile( 167 asm volatile(
163 "0: .insn rre,0xb92f0000,%3,%1 \n" /* KMC opcode */ 168 "0: .insn rre,0xb92f0000,%3,%1 \n" /* KMC opcode */
164 "1: brc 1,0b \n" /* handle partial completion */ 169 "1: brc 1,0b \n" /* handle partial completion */
165 " ahi %0,%h7\n" 170 " la %0,0\n"
166 "2: ahi %0,%h8\n" 171 "2:\n"
167 "3:\n" 172 EX_TABLE(0b,2b) EX_TABLE(1b,2b)
168 EX_TABLE(0b,3b) EX_TABLE(1b,2b)
169 : "=d" (ret), "+a" (__src), "+d" (__src_len), "+a" (__dest) 173 : "=d" (ret), "+a" (__src), "+d" (__src_len), "+a" (__dest)
170 : "d" (__func), "a" (__param), "0" (-EFAULT), 174 : "d" (__func), "a" (__param), "0" (-1) : "cc", "memory");
171 "K" (ENOSYS), "K" (-ENOSYS + EFAULT) : "cc", "memory");
172 if (ret < 0) 175 if (ret < 0)
173 return ret; 176 return ret;
174 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; 177 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len;
175} 178}
176 179
177/* 180/**
181 * crypt_s390_kimd:
182 * @func: the function code passed to KM; see crypt_s390_kimd_func
183 * @param: address of parameter block; see POP for details on each func
184 * @src: address of source memory area
185 * @src_len: length of src operand in bytes
186 *
178 * Executes the KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST) operation 187 * Executes the KIMD (COMPUTE INTERMEDIATE MESSAGE DIGEST) operation
179 * of the CPU. 188 * of the CPU.
180 * @param func: the function code passed to KM; see crypt_s390_kimd_func 189 *
181 * @param param: address of parameter block; see POP for details on each func 190 * Returns -1 for failure, 0 for the query func, number of processed
182 * @param src: address of source memory area 191 * bytes for digest funcs
183 * @param src_len: length of src operand in bytes
184 * @returns < zero for failure, 0 for the query func, number of processed bytes
185 * for digest funcs
186 */ 192 */
187static inline int 193static inline int crypt_s390_kimd(long func, void *param,
188crypt_s390_kimd(long func, void* param, const u8* src, long src_len) 194 const u8 *src, long src_len)
189{ 195{
190 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; 196 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK;
191 register void* __param asm("1") = param; 197 register void *__param asm("1") = param;
192 register const u8* __src asm("2") = src; 198 register const u8 *__src asm("2") = src;
193 register long __src_len asm("3") = src_len; 199 register long __src_len asm("3") = src_len;
194 int ret; 200 int ret;
195 201
196 asm volatile( 202 asm volatile(
197 "0: .insn rre,0xb93e0000,%1,%1 \n" /* KIMD opcode */ 203 "0: .insn rre,0xb93e0000,%1,%1 \n" /* KIMD opcode */
198 "1: brc 1,0b \n" /* handle partial completion */ 204 "1: brc 1,0b \n" /* handle partial completion */
199 " ahi %0,%h6\n" 205 " la %0,0\n"
200 "2: ahi %0,%h7\n" 206 "2:\n"
201 "3:\n" 207 EX_TABLE(0b,2b) EX_TABLE(1b,2b)
202 EX_TABLE(0b,3b) EX_TABLE(1b,2b)
203 : "=d" (ret), "+a" (__src), "+d" (__src_len) 208 : "=d" (ret), "+a" (__src), "+d" (__src_len)
204 : "d" (__func), "a" (__param), "0" (-EFAULT), 209 : "d" (__func), "a" (__param), "0" (-1) : "cc", "memory");
205 "K" (ENOSYS), "K" (-ENOSYS + EFAULT) : "cc", "memory");
206 if (ret < 0) 210 if (ret < 0)
207 return ret; 211 return ret;
208 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; 212 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len;
209} 213}
210 214
211/* 215/**
216 * crypt_s390_klmd:
217 * @func: the function code passed to KM; see crypt_s390_klmd_func
218 * @param: address of parameter block; see POP for details on each func
219 * @src: address of source memory area
220 * @src_len: length of src operand in bytes
221 *
212 * Executes the KLMD (COMPUTE LAST MESSAGE DIGEST) operation of the CPU. 222 * Executes the KLMD (COMPUTE LAST MESSAGE DIGEST) operation of the CPU.
213 * @param func: the function code passed to KM; see crypt_s390_klmd_func 223 *
214 * @param param: address of parameter block; see POP for details on each func 224 * Returns -1 for failure, 0 for the query func, number of processed
215 * @param src: address of source memory area 225 * bytes for digest funcs
216 * @param src_len: length of src operand in bytes
217 * @returns < zero for failure, 0 for the query func, number of processed bytes
218 * for digest funcs
219 */ 226 */
220static inline int 227static inline int crypt_s390_klmd(long func, void *param,
221crypt_s390_klmd(long func, void* param, const u8* src, long src_len) 228 const u8 *src, long src_len)
222{ 229{
223 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; 230 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK;
224 register void* __param asm("1") = param; 231 register void *__param asm("1") = param;
225 register const u8* __src asm("2") = src; 232 register const u8 *__src asm("2") = src;
226 register long __src_len asm("3") = src_len; 233 register long __src_len asm("3") = src_len;
227 int ret; 234 int ret;
228 235
229 asm volatile( 236 asm volatile(
230 "0: .insn rre,0xb93f0000,%1,%1 \n" /* KLMD opcode */ 237 "0: .insn rre,0xb93f0000,%1,%1 \n" /* KLMD opcode */
231 "1: brc 1,0b \n" /* handle partial completion */ 238 "1: brc 1,0b \n" /* handle partial completion */
232 " ahi %0,%h6\n" 239 " la %0,0\n"
233 "2: ahi %0,%h7\n" 240 "2:\n"
234 "3:\n" 241 EX_TABLE(0b,2b) EX_TABLE(1b,2b)
235 EX_TABLE(0b,3b) EX_TABLE(1b,2b)
236 : "=d" (ret), "+a" (__src), "+d" (__src_len) 242 : "=d" (ret), "+a" (__src), "+d" (__src_len)
237 : "d" (__func), "a" (__param), "0" (-EFAULT), 243 : "d" (__func), "a" (__param), "0" (-1) : "cc", "memory");
238 "K" (ENOSYS), "K" (-ENOSYS + EFAULT) : "cc", "memory");
239 if (ret < 0) 244 if (ret < 0)
240 return ret; 245 return ret;
241 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; 246 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len;
242} 247}
243 248
244/* 249/**
250 * crypt_s390_kmac:
251 * @func: the function code passed to KM; see crypt_s390_klmd_func
252 * @param: address of parameter block; see POP for details on each func
253 * @src: address of source memory area
254 * @src_len: length of src operand in bytes
255 *
245 * Executes the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE) operation 256 * Executes the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE) operation
246 * of the CPU. 257 * of the CPU.
247 * @param func: the function code passed to KM; see crypt_s390_klmd_func 258 *
248 * @param param: address of parameter block; see POP for details on each func 259 * Returns -1 for failure, 0 for the query func, number of processed
249 * @param src: address of source memory area 260 * bytes for digest funcs
250 * @param src_len: length of src operand in bytes
251 * @returns < zero for failure, 0 for the query func, number of processed bytes
252 * for digest funcs
253 */ 261 */
254static inline int 262static inline int crypt_s390_kmac(long func, void *param,
255crypt_s390_kmac(long func, void* param, const u8* src, long src_len) 263 const u8 *src, long src_len)
256{ 264{
257 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; 265 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK;
258 register void* __param asm("1") = param; 266 register void *__param asm("1") = param;
259 register const u8* __src asm("2") = src; 267 register const u8 *__src asm("2") = src;
260 register long __src_len asm("3") = src_len; 268 register long __src_len asm("3") = src_len;
261 int ret; 269 int ret;
262 270
263 asm volatile( 271 asm volatile(
264 "0: .insn rre,0xb91e0000,%1,%1 \n" /* KLAC opcode */ 272 "0: .insn rre,0xb91e0000,%1,%1 \n" /* KLAC opcode */
265 "1: brc 1,0b \n" /* handle partial completion */ 273 "1: brc 1,0b \n" /* handle partial completion */
266 " ahi %0,%h6\n" 274 " la %0,0\n"
267 "2: ahi %0,%h7\n" 275 "2:\n"
268 "3:\n" 276 EX_TABLE(0b,2b) EX_TABLE(1b,2b)
269 EX_TABLE(0b,3b) EX_TABLE(1b,2b)
270 : "=d" (ret), "+a" (__src), "+d" (__src_len) 277 : "=d" (ret), "+a" (__src), "+d" (__src_len)
271 : "d" (__func), "a" (__param), "0" (-EFAULT), 278 : "d" (__func), "a" (__param), "0" (-1) : "cc", "memory");
272 "K" (ENOSYS), "K" (-ENOSYS + EFAULT) : "cc", "memory");
273 if (ret < 0) 279 if (ret < 0)
274 return ret; 280 return ret;
275 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; 281 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len;
276} 282}
277 283
278/** 284/**
285 * crypt_s390_func_available:
286 * @func: the function code of the specific function; 0 if op in general
287 *
279 * Tests if a specific crypto function is implemented on the machine. 288 * Tests if a specific crypto function is implemented on the machine.
280 * @param func: the function code of the specific function; 0 if op in general 289 *
281 * @return 1 if func available; 0 if func or op in general not available 290 * Returns 1 if func available; 0 if func or op in general not available
282 */ 291 */
283static inline int 292static inline int crypt_s390_func_available(int func)
284crypt_s390_func_available(int func)
285{ 293{
294 unsigned char status[16];
286 int ret; 295 int ret;
287 296
288 struct crypt_s390_query_status status = { 297 switch (func & CRYPT_S390_OP_MASK) {
289 .high = 0, 298 case CRYPT_S390_KM:
290 .low = 0 299 ret = crypt_s390_km(KM_QUERY, &status, NULL, NULL, 0);
291 }; 300 break;
292 switch (func & CRYPT_S390_OP_MASK){ 301 case CRYPT_S390_KMC:
293 case CRYPT_S390_KM: 302 ret = crypt_s390_kmc(KMC_QUERY, &status, NULL, NULL, 0);
294 ret = crypt_s390_km(KM_QUERY, &status, NULL, NULL, 0); 303 break;
295 break; 304 case CRYPT_S390_KIMD:
296 case CRYPT_S390_KMC: 305 ret = crypt_s390_kimd(KIMD_QUERY, &status, NULL, 0);
297 ret = crypt_s390_kmc(KMC_QUERY, &status, NULL, NULL, 0); 306 break;
298 break; 307 case CRYPT_S390_KLMD:
299 case CRYPT_S390_KIMD: 308 ret = crypt_s390_klmd(KLMD_QUERY, &status, NULL, 0);
300 ret = crypt_s390_kimd(KIMD_QUERY, &status, NULL, 0); 309 break;
301 break; 310 case CRYPT_S390_KMAC:
302 case CRYPT_S390_KLMD: 311 ret = crypt_s390_kmac(KMAC_QUERY, &status, NULL, 0);
303 ret = crypt_s390_klmd(KLMD_QUERY, &status, NULL, 0); 312 break;
304 break; 313 default:
305 case CRYPT_S390_KMAC: 314 return 0;
306 ret = crypt_s390_kmac(KMAC_QUERY, &status, NULL, 0);
307 break;
308 default:
309 ret = 0;
310 return ret;
311 }
312 if (ret >= 0){
313 func &= CRYPT_S390_FUNC_MASK;
314 func &= 0x7f; //mask modifier bit
315 if (func < 64){
316 ret = (status.high >> (64 - func - 1)) & 0x1;
317 } else {
318 ret = (status.low >> (128 - func - 1)) & 0x1;
319 }
320 } else {
321 ret = 0;
322 } 315 }
323 return ret; 316 if (ret < 0)
317 return 0;
318 func &= CRYPT_S390_FUNC_MASK;
319 func &= 0x7f; /* mask modifier bit */
320 return (status[func >> 3] & (0x80 >> (func & 7))) != 0;
324} 321}
325 322
326#endif // _CRYPTO_ARCH_S390_CRYPT_S390_H 323#endif /* _CRYPTO_ARCH_S390_CRYPT_S390_H */
diff --git a/arch/s390/crypto/crypt_s390_query.c b/arch/s390/crypto/crypt_s390_query.c
deleted file mode 100644
index 54fb11d7fadd..000000000000
--- a/arch/s390/crypto/crypt_s390_query.c
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * Cryptographic API.
3 *
4 * Support for s390 cryptographic instructions.
5 * Testing module for querying processor crypto capabilities.
6 *
7 * Copyright (c) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
8 * Author(s): Thomas Spatzier (tspat@de.ibm.com)
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the Free
12 * Software Foundation; either version 2 of the License, or (at your option)
13 * any later version.
14 *
15 */
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/kernel.h>
19#include <asm/errno.h>
20#include "crypt_s390.h"
21
22static void query_available_functions(void)
23{
24 printk(KERN_INFO "#####################\n");
25
26 /* query available KM functions */
27 printk(KERN_INFO "KM_QUERY: %d\n",
28 crypt_s390_func_available(KM_QUERY));
29 printk(KERN_INFO "KM_DEA: %d\n",
30 crypt_s390_func_available(KM_DEA_ENCRYPT));
31 printk(KERN_INFO "KM_TDEA_128: %d\n",
32 crypt_s390_func_available(KM_TDEA_128_ENCRYPT));
33 printk(KERN_INFO "KM_TDEA_192: %d\n",
34 crypt_s390_func_available(KM_TDEA_192_ENCRYPT));
35 printk(KERN_INFO "KM_AES_128: %d\n",
36 crypt_s390_func_available(KM_AES_128_ENCRYPT));
37 printk(KERN_INFO "KM_AES_192: %d\n",
38 crypt_s390_func_available(KM_AES_192_ENCRYPT));
39 printk(KERN_INFO "KM_AES_256: %d\n",
40 crypt_s390_func_available(KM_AES_256_ENCRYPT));
41
42 /* query available KMC functions */
43 printk(KERN_INFO "KMC_QUERY: %d\n",
44 crypt_s390_func_available(KMC_QUERY));
45 printk(KERN_INFO "KMC_DEA: %d\n",
46 crypt_s390_func_available(KMC_DEA_ENCRYPT));
47 printk(KERN_INFO "KMC_TDEA_128: %d\n",
48 crypt_s390_func_available(KMC_TDEA_128_ENCRYPT));
49 printk(KERN_INFO "KMC_TDEA_192: %d\n",
50 crypt_s390_func_available(KMC_TDEA_192_ENCRYPT));
51 printk(KERN_INFO "KMC_AES_128: %d\n",
52 crypt_s390_func_available(KMC_AES_128_ENCRYPT));
53 printk(KERN_INFO "KMC_AES_192: %d\n",
54 crypt_s390_func_available(KMC_AES_192_ENCRYPT));
55 printk(KERN_INFO "KMC_AES_256: %d\n",
56 crypt_s390_func_available(KMC_AES_256_ENCRYPT));
57
58 /* query available KIMD functions */
59 printk(KERN_INFO "KIMD_QUERY: %d\n",
60 crypt_s390_func_available(KIMD_QUERY));
61 printk(KERN_INFO "KIMD_SHA_1: %d\n",
62 crypt_s390_func_available(KIMD_SHA_1));
63 printk(KERN_INFO "KIMD_SHA_256: %d\n",
64 crypt_s390_func_available(KIMD_SHA_256));
65
66 /* query available KLMD functions */
67 printk(KERN_INFO "KLMD_QUERY: %d\n",
68 crypt_s390_func_available(KLMD_QUERY));
69 printk(KERN_INFO "KLMD_SHA_1: %d\n",
70 crypt_s390_func_available(KLMD_SHA_1));
71 printk(KERN_INFO "KLMD_SHA_256: %d\n",
72 crypt_s390_func_available(KLMD_SHA_256));
73
74 /* query available KMAC functions */
75 printk(KERN_INFO "KMAC_QUERY: %d\n",
76 crypt_s390_func_available(KMAC_QUERY));
77 printk(KERN_INFO "KMAC_DEA: %d\n",
78 crypt_s390_func_available(KMAC_DEA));
79 printk(KERN_INFO "KMAC_TDEA_128: %d\n",
80 crypt_s390_func_available(KMAC_TDEA_128));
81 printk(KERN_INFO "KMAC_TDEA_192: %d\n",
82 crypt_s390_func_available(KMAC_TDEA_192));
83}
84
85static int init(void)
86{
87 struct crypt_s390_query_status status = {
88 .high = 0,
89 .low = 0
90 };
91
92 printk(KERN_INFO "crypt_s390: querying available crypto functions\n");
93 crypt_s390_km(KM_QUERY, &status, NULL, NULL, 0);
94 printk(KERN_INFO "KM:\t%016llx %016llx\n",
95 (unsigned long long) status.high,
96 (unsigned long long) status.low);
97 status.high = status.low = 0;
98 crypt_s390_kmc(KMC_QUERY, &status, NULL, NULL, 0);
99 printk(KERN_INFO "KMC:\t%016llx %016llx\n",
100 (unsigned long long) status.high,
101 (unsigned long long) status.low);
102 status.high = status.low = 0;
103 crypt_s390_kimd(KIMD_QUERY, &status, NULL, 0);
104 printk(KERN_INFO "KIMD:\t%016llx %016llx\n",
105 (unsigned long long) status.high,
106 (unsigned long long) status.low);
107 status.high = status.low = 0;
108 crypt_s390_klmd(KLMD_QUERY, &status, NULL, 0);
109 printk(KERN_INFO "KLMD:\t%016llx %016llx\n",
110 (unsigned long long) status.high,
111 (unsigned long long) status.low);
112 status.high = status.low = 0;
113 crypt_s390_kmac(KMAC_QUERY, &status, NULL, 0);
114 printk(KERN_INFO "KMAC:\t%016llx %016llx\n",
115 (unsigned long long) status.high,
116 (unsigned long long) status.low);
117
118 query_available_functions();
119 return -ECANCELED;
120}
121
122static void __exit cleanup(void)
123{
124}
125
126module_init(init);
127module_exit(cleanup);
128
129MODULE_LICENSE("GPL");
diff --git a/arch/s390/crypto/des_check_key.c b/arch/s390/crypto/des_check_key.c
index e3f5c5f238fe..5706af266442 100644
--- a/arch/s390/crypto/des_check_key.c
+++ b/arch/s390/crypto/des_check_key.c
@@ -10,8 +10,9 @@
10 * scatterlist interface. Changed LGPL to GPL per section 3 of the LGPL. 10 * scatterlist interface. Changed LGPL to GPL per section 3 of the LGPL.
11 * 11 *
12 * s390 Version: 12 * s390 Version:
13 * Copyright (C) 2003 IBM Deutschland GmbH, IBM Corporation 13 * Copyright IBM Corp. 2003
14 * Author(s): Thomas Spatzier (tspat@de.ibm.com) 14 * Author(s): Thomas Spatzier
15 * Jan Glauber (jan.glauber@de.ibm.com)
15 * 16 *
16 * Derived from "crypto/des.c" 17 * Derived from "crypto/des.c"
17 * Copyright (c) 1992 Dana L. How. 18 * Copyright (c) 1992 Dana L. How.
@@ -30,6 +31,7 @@
30#include <linux/module.h> 31#include <linux/module.h>
31#include <linux/errno.h> 32#include <linux/errno.h>
32#include <linux/crypto.h> 33#include <linux/crypto.h>
34#include "crypto_des.h"
33 35
34#define ROR(d,c,o) ((d) = (d) >> (c) | (d) << (o)) 36#define ROR(d,c,o) ((d) = (d) >> (c) | (d) << (o))
35 37
diff --git a/arch/s390/crypto/des_s390.c b/arch/s390/crypto/des_s390.c
index 2aba04852fe3..ea22707f435f 100644
--- a/arch/s390/crypto/des_s390.c
+++ b/arch/s390/crypto/des_s390.c
@@ -3,9 +3,9 @@
3 * 3 *
4 * s390 implementation of the DES Cipher Algorithm. 4 * s390 implementation of the DES Cipher Algorithm.
5 * 5 *
6 * Copyright (c) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation 6 * Copyright IBM Corp. 2003,2007
7 * Author(s): Thomas Spatzier (tspat@de.ibm.com) 7 * Author(s): Thomas Spatzier
8 * 8 * Jan Glauber (jan.glauber@de.ibm.com)
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
@@ -557,7 +557,7 @@ static int init(void)
557 if (!crypt_s390_func_available(KM_DEA_ENCRYPT) || 557 if (!crypt_s390_func_available(KM_DEA_ENCRYPT) ||
558 !crypt_s390_func_available(KM_TDEA_128_ENCRYPT) || 558 !crypt_s390_func_available(KM_TDEA_128_ENCRYPT) ||
559 !crypt_s390_func_available(KM_TDEA_192_ENCRYPT)) 559 !crypt_s390_func_available(KM_TDEA_192_ENCRYPT))
560 return -ENOSYS; 560 return -EOPNOTSUPP;
561 561
562 ret = crypto_register_alg(&des_alg); 562 ret = crypto_register_alg(&des_alg);
563 if (ret) 563 if (ret)
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
new file mode 100644
index 000000000000..8eb3a1aedc22
--- /dev/null
+++ b/arch/s390/crypto/prng.c
@@ -0,0 +1,213 @@
1/*
2 * Copyright IBM Corp. 2006,2007
3 * Author(s): Jan Glauber <jan.glauber@de.ibm.com>
4 * Driver for the s390 pseudo random number generator
5 */
6#include <linux/fs.h>
7#include <linux/init.h>
8#include <linux/kernel.h>
9#include <linux/miscdevice.h>
10#include <linux/module.h>
11#include <linux/moduleparam.h>
12#include <linux/random.h>
13#include <asm/debug.h>
14#include <asm/uaccess.h>
15
16#include "crypt_s390.h"
17
18MODULE_LICENSE("GPL");
19MODULE_AUTHOR("Jan Glauber <jan.glauber@de.ibm.com>");
20MODULE_DESCRIPTION("s390 PRNG interface");
21
22static int prng_chunk_size = 256;
23module_param(prng_chunk_size, int, S_IRUSR | S_IRGRP | S_IROTH);
24MODULE_PARM_DESC(prng_chunk_size, "PRNG read chunk size in bytes");
25
26static int prng_entropy_limit = 4096;
27module_param(prng_entropy_limit, int, S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR);
28MODULE_PARM_DESC(prng_entropy_limit,
29 "PRNG add entropy after that much bytes were produced");
30
31/*
32 * Any one who considers arithmetical methods of producing random digits is,
33 * of course, in a state of sin. -- John von Neumann
34 */
35
36struct s390_prng_data {
37 unsigned long count; /* how many bytes were produced */
38 char *buf;
39};
40
41static struct s390_prng_data *p;
42
43/* copied from libica, use a non-zero initial parameter block */
44static unsigned char parm_block[32] = {
450x0F,0x2B,0x8E,0x63,0x8C,0x8E,0xD2,0x52,0x64,0xB7,0xA0,0x7B,0x75,0x28,0xB8,0xF4,
460x75,0x5F,0xD2,0xA6,0x8D,0x97,0x11,0xFF,0x49,0xD8,0x23,0xF3,0x7E,0x21,0xEC,0xA0,
47};
48
49static int prng_open(struct inode *inode, struct file *file)
50{
51 return nonseekable_open(inode, file);
52}
53
54static void prng_add_entropy(void)
55{
56 __u64 entropy[4];
57 unsigned int i;
58 int ret;
59
60 for (i = 0; i < 16; i++) {
61 ret = crypt_s390_kmc(KMC_PRNG, parm_block, (char *)entropy,
62 (char *)entropy, sizeof(entropy));
63 BUG_ON(ret < 0 || ret != sizeof(entropy));
64 memcpy(parm_block, entropy, sizeof(entropy));
65 }
66}
67
68static void prng_seed(int nbytes)
69{
70 char buf[16];
71 int i = 0;
72
73 BUG_ON(nbytes > 16);
74 get_random_bytes(buf, nbytes);
75
76 /* Add the entropy */
77 while (nbytes >= 8) {
78 *((__u64 *)parm_block) ^= *((__u64 *)buf+i*8);
79 prng_add_entropy();
80 i += 8;
81 nbytes -= 8;
82 }
83 prng_add_entropy();
84}
85
86static ssize_t prng_read(struct file *file, char __user *ubuf, size_t nbytes,
87 loff_t *ppos)
88{
89 int chunk, n;
90 int ret = 0;
91 int tmp;
92
93 /* nbytes can be arbitrary long, we spilt it into chunks */
94 while (nbytes) {
95 /* same as in extract_entropy_user in random.c */
96 if (need_resched()) {
97 if (signal_pending(current)) {
98 if (ret == 0)
99 ret = -ERESTARTSYS;
100 break;
101 }
102 schedule();
103 }
104
105 /*
106 * we lose some random bytes if an attacker issues
107 * reads < 8 bytes, but we don't care
108 */
109 chunk = min_t(int, nbytes, prng_chunk_size);
110
111 /* PRNG only likes multiples of 8 bytes */
112 n = (chunk + 7) & -8;
113
114 if (p->count > prng_entropy_limit)
115 prng_seed(8);
116
117 /* if the CPU supports PRNG stckf is present too */
118 asm volatile(".insn s,0xb27c0000,%0"
119 : "=m" (*((unsigned long long *)p->buf)) : : "cc");
120
121 /*
122 * Beside the STCKF the input for the TDES-EDE is the output
123 * of the last operation. We differ here from X9.17 since we
124 * only store one timestamp into the buffer. Padding the whole
125 * buffer with timestamps does not improve security, since
126 * successive stckf have nearly constant offsets.
127 * If an attacker knows the first timestamp it would be
128 * trivial to guess the additional values. One timestamp
129 * is therefore enough and still guarantees unique input values.
130 *
131 * Note: you can still get strict X9.17 conformity by setting
132 * prng_chunk_size to 8 bytes.
133 */
134 tmp = crypt_s390_kmc(KMC_PRNG, parm_block, p->buf, p->buf, n);
135 BUG_ON((tmp < 0) || (tmp != n));
136
137 p->count += n;
138
139 if (copy_to_user(ubuf, p->buf, chunk))
140 return -EFAULT;
141
142 nbytes -= chunk;
143 ret += chunk;
144 ubuf += chunk;
145 }
146 return ret;
147}
148
149static struct file_operations prng_fops = {
150 .owner = THIS_MODULE,
151 .open = &prng_open,
152 .release = NULL,
153 .read = &prng_read,
154};
155
156static struct miscdevice prng_dev = {
157 .name = "prandom",
158 .minor = MISC_DYNAMIC_MINOR,
159 .fops = &prng_fops,
160};
161
162static int __init prng_init(void)
163{
164 int ret;
165
166 /* check if the CPU has a PRNG */
167 if (!crypt_s390_func_available(KMC_PRNG))
168 return -EOPNOTSUPP;
169
170 if (prng_chunk_size < 8)
171 return -EINVAL;
172
173 p = kmalloc(sizeof(struct s390_prng_data), GFP_KERNEL);
174 if (!p)
175 return -ENOMEM;
176 p->count = 0;
177
178 p->buf = kmalloc(prng_chunk_size, GFP_KERNEL);
179 if (!p->buf) {
180 ret = -ENOMEM;
181 goto out_free;
182 }
183
184 /* initialize the PRNG, add 128 bits of entropy */
185 prng_seed(16);
186
187 ret = misc_register(&prng_dev);
188 if (ret) {
189 printk(KERN_WARNING
190 "Could not register misc device for PRNG.\n");
191 goto out_buf;
192 }
193 return 0;
194
195out_buf:
196 kfree(p->buf);
197out_free:
198 kfree(p);
199 return ret;
200}
201
202static void __exit prng_exit(void)
203{
204 /* wipe me */
205 memset(p->buf, 0, prng_chunk_size);
206 kfree(p->buf);
207 kfree(p);
208
209 misc_deregister(&prng_dev);
210}
211
212module_init(prng_init);
213module_exit(prng_exit);
diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c
index 49ca8690ee39..969639f31977 100644
--- a/arch/s390/crypto/sha1_s390.c
+++ b/arch/s390/crypto/sha1_s390.c
@@ -8,8 +8,9 @@
8 * implementation written by Steve Reid. 8 * implementation written by Steve Reid.
9 * 9 *
10 * s390 Version: 10 * s390 Version:
11 * Copyright (C) 2003 IBM Deutschland GmbH, IBM Corporation 11 * Copyright IBM Corp. 2003,2007
12 * Author(s): Thomas Spatzier (tspat@de.ibm.com) 12 * Author(s): Thomas Spatzier
13 * Jan Glauber (jan.glauber@de.ibm.com)
13 * 14 *
14 * Derived from "crypto/sha1.c" 15 * Derived from "crypto/sha1.c"
15 * Copyright (c) Alan Smithee. 16 * Copyright (c) Alan Smithee.
@@ -43,16 +44,14 @@ struct crypt_s390_sha1_ctx {
43static void sha1_init(struct crypto_tfm *tfm) 44static void sha1_init(struct crypto_tfm *tfm)
44{ 45{
45 struct crypt_s390_sha1_ctx *ctx = crypto_tfm_ctx(tfm); 46 struct crypt_s390_sha1_ctx *ctx = crypto_tfm_ctx(tfm);
46 static const u32 initstate[5] = { 47
47 0x67452301, 48 ctx->state[0] = 0x67452301;
48 0xEFCDAB89, 49 ctx->state[1] = 0xEFCDAB89;
49 0x98BADCFE, 50 ctx->state[2] = 0x98BADCFE;
50 0x10325476, 51 ctx->state[3] = 0x10325476;
51 0xC3D2E1F0 52 ctx->state[4] = 0xC3D2E1F0;
52 };
53 53
54 ctx->count = 0; 54 ctx->count = 0;
55 memcpy(ctx->state, &initstate, sizeof(initstate));
56 ctx->buf_len = 0; 55 ctx->buf_len = 0;
57} 56}
58 57
@@ -63,13 +62,13 @@ static void sha1_update(struct crypto_tfm *tfm, const u8 *data,
63 long imd_len; 62 long imd_len;
64 63
65 sctx = crypto_tfm_ctx(tfm); 64 sctx = crypto_tfm_ctx(tfm);
66 sctx->count += len * 8; //message bit length 65 sctx->count += len * 8; /* message bit length */
67 66
68 //anything in buffer yet? -> must be completed 67 /* anything in buffer yet? -> must be completed */
69 if (sctx->buf_len && (sctx->buf_len + len) >= SHA1_BLOCK_SIZE) { 68 if (sctx->buf_len && (sctx->buf_len + len) >= SHA1_BLOCK_SIZE) {
70 //complete full block and hash 69 /* complete full block and hash */
71 memcpy(sctx->buffer + sctx->buf_len, data, 70 memcpy(sctx->buffer + sctx->buf_len, data,
72 SHA1_BLOCK_SIZE - sctx->buf_len); 71 SHA1_BLOCK_SIZE - sctx->buf_len);
73 crypt_s390_kimd(KIMD_SHA_1, sctx->state, sctx->buffer, 72 crypt_s390_kimd(KIMD_SHA_1, sctx->state, sctx->buffer,
74 SHA1_BLOCK_SIZE); 73 SHA1_BLOCK_SIZE);
75 data += SHA1_BLOCK_SIZE - sctx->buf_len; 74 data += SHA1_BLOCK_SIZE - sctx->buf_len;
@@ -77,37 +76,36 @@ static void sha1_update(struct crypto_tfm *tfm, const u8 *data,
77 sctx->buf_len = 0; 76 sctx->buf_len = 0;
78 } 77 }
79 78
80 //rest of data contains full blocks? 79 /* rest of data contains full blocks? */
81 imd_len = len & ~0x3ful; 80 imd_len = len & ~0x3ful;
82 if (imd_len){ 81 if (imd_len) {
83 crypt_s390_kimd(KIMD_SHA_1, sctx->state, data, imd_len); 82 crypt_s390_kimd(KIMD_SHA_1, sctx->state, data, imd_len);
84 data += imd_len; 83 data += imd_len;
85 len -= imd_len; 84 len -= imd_len;
86 } 85 }
87 //anything left? store in buffer 86 /* anything left? store in buffer */
88 if (len){ 87 if (len) {
89 memcpy(sctx->buffer + sctx->buf_len , data, len); 88 memcpy(sctx->buffer + sctx->buf_len , data, len);
90 sctx->buf_len += len; 89 sctx->buf_len += len;
91 } 90 }
92} 91}
93 92
94 93
95static void 94static void pad_message(struct crypt_s390_sha1_ctx* sctx)
96pad_message(struct crypt_s390_sha1_ctx* sctx)
97{ 95{
98 int index; 96 int index;
99 97
100 index = sctx->buf_len; 98 index = sctx->buf_len;
101 sctx->buf_len = (sctx->buf_len < 56)? 99 sctx->buf_len = (sctx->buf_len < 56) ?
102 SHA1_BLOCK_SIZE:2 * SHA1_BLOCK_SIZE; 100 SHA1_BLOCK_SIZE:2 * SHA1_BLOCK_SIZE;
103 //start pad with 1 101 /* start pad with 1 */
104 sctx->buffer[index] = 0x80; 102 sctx->buffer[index] = 0x80;
105 //pad with zeros 103 /* pad with zeros */
106 index++; 104 index++;
107 memset(sctx->buffer + index, 0x00, sctx->buf_len - index); 105 memset(sctx->buffer + index, 0x00, sctx->buf_len - index);
108 //append length 106 /* append length */
109 memcpy(sctx->buffer + sctx->buf_len - 8, &sctx->count, 107 memcpy(sctx->buffer + sctx->buf_len - 8, &sctx->count,
110 sizeof sctx->count); 108 sizeof sctx->count);
111} 109}
112 110
113/* Add padding and return the message digest. */ 111/* Add padding and return the message digest. */
@@ -115,47 +113,40 @@ static void sha1_final(struct crypto_tfm *tfm, u8 *out)
115{ 113{
116 struct crypt_s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm); 114 struct crypt_s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm);
117 115
118 //must perform manual padding 116 /* must perform manual padding */
119 pad_message(sctx); 117 pad_message(sctx);
120 crypt_s390_kimd(KIMD_SHA_1, sctx->state, sctx->buffer, sctx->buf_len); 118 crypt_s390_kimd(KIMD_SHA_1, sctx->state, sctx->buffer, sctx->buf_len);
121 //copy digest to out 119 /* copy digest to out */
122 memcpy(out, sctx->state, SHA1_DIGEST_SIZE); 120 memcpy(out, sctx->state, SHA1_DIGEST_SIZE);
123 /* Wipe context */ 121 /* wipe context */
124 memset(sctx, 0, sizeof *sctx); 122 memset(sctx, 0, sizeof *sctx);
125} 123}
126 124
127static struct crypto_alg alg = { 125static struct crypto_alg alg = {
128 .cra_name = "sha1", 126 .cra_name = "sha1",
129 .cra_driver_name = "sha1-s390", 127 .cra_driver_name= "sha1-s390",
130 .cra_priority = CRYPT_S390_PRIORITY, 128 .cra_priority = CRYPT_S390_PRIORITY,
131 .cra_flags = CRYPTO_ALG_TYPE_DIGEST, 129 .cra_flags = CRYPTO_ALG_TYPE_DIGEST,
132 .cra_blocksize = SHA1_BLOCK_SIZE, 130 .cra_blocksize = SHA1_BLOCK_SIZE,
133 .cra_ctxsize = sizeof(struct crypt_s390_sha1_ctx), 131 .cra_ctxsize = sizeof(struct crypt_s390_sha1_ctx),
134 .cra_module = THIS_MODULE, 132 .cra_module = THIS_MODULE,
135 .cra_list = LIST_HEAD_INIT(alg.cra_list), 133 .cra_list = LIST_HEAD_INIT(alg.cra_list),
136 .cra_u = { .digest = { 134 .cra_u = { .digest = {
137 .dia_digestsize = SHA1_DIGEST_SIZE, 135 .dia_digestsize = SHA1_DIGEST_SIZE,
138 .dia_init = sha1_init, 136 .dia_init = sha1_init,
139 .dia_update = sha1_update, 137 .dia_update = sha1_update,
140 .dia_final = sha1_final } } 138 .dia_final = sha1_final } }
141}; 139};
142 140
143static int 141static int __init init(void)
144init(void)
145{ 142{
146 int ret = -ENOSYS; 143 if (!crypt_s390_func_available(KIMD_SHA_1))
144 return -EOPNOTSUPP;
147 145
148 if (crypt_s390_func_available(KIMD_SHA_1)){ 146 return crypto_register_alg(&alg);
149 ret = crypto_register_alg(&alg);
150 if (ret == 0){
151 printk(KERN_INFO "crypt_s390: sha1_s390 loaded.\n");
152 }
153 }
154 return ret;
155} 147}
156 148
157static void __exit 149static void __exit fini(void)
158fini(void)
159{ 150{
160 crypto_unregister_alg(&alg); 151 crypto_unregister_alg(&alg);
161} 152}
diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c
index 8e4e67503fe7..78436c696d37 100644
--- a/arch/s390/crypto/sha256_s390.c
+++ b/arch/s390/crypto/sha256_s390.c
@@ -4,7 +4,7 @@
4 * s390 implementation of the SHA256 Secure Hash Algorithm. 4 * s390 implementation of the SHA256 Secure Hash Algorithm.
5 * 5 *
6 * s390 Version: 6 * s390 Version:
7 * Copyright (C) 2005 IBM Deutschland GmbH, IBM Corporation 7 * Copyright IBM Corp. 2005,2007
8 * Author(s): Jan Glauber (jang@de.ibm.com) 8 * Author(s): Jan Glauber (jang@de.ibm.com)
9 * 9 *
10 * Derived from "crypto/sha256.c" 10 * Derived from "crypto/sha256.c"
@@ -143,15 +143,10 @@ static struct crypto_alg alg = {
143 143
144static int init(void) 144static int init(void)
145{ 145{
146 int ret;
147
148 if (!crypt_s390_func_available(KIMD_SHA_256)) 146 if (!crypt_s390_func_available(KIMD_SHA_256))
149 return -ENOSYS; 147 return -EOPNOTSUPP;
150 148
151 ret = crypto_register_alg(&alg); 149 return crypto_register_alg(&alg);
152 if (ret != 0)
153 printk(KERN_INFO "crypt_s390: sha256_s390 couldn't be loaded.");
154 return ret;
155} 150}
156 151
157static void __exit fini(void) 152static void __exit fini(void)
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 5368cf4a350e..741d2bbb2b37 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,9 +1,10 @@
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.21-rc1
4# Fri Dec 15 16:52:28 2006 4# Wed Feb 21 10:44:30 2007
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_ZONE_DMA=y
7CONFIG_LOCKDEP_SUPPORT=y 8CONFIG_LOCKDEP_SUPPORT=y
8CONFIG_STACKTRACE_SUPPORT=y 9CONFIG_STACKTRACE_SUPPORT=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y 10CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -11,6 +12,7 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
11# CONFIG_ARCH_HAS_ILOG2_U64 is not set 12# CONFIG_ARCH_HAS_ILOG2_U64 is not set
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_TIME=y 14CONFIG_GENERIC_TIME=y
15CONFIG_NO_IOMEM=y
14CONFIG_S390=y 16CONFIG_S390=y
15CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 17CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
16 18
@@ -29,6 +31,7 @@ CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 31CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 32CONFIG_SYSVIPC=y
31# CONFIG_IPC_NS is not set 33# CONFIG_IPC_NS is not set
34CONFIG_SYSVIPC_SYSCTL=y
32CONFIG_POSIX_MQUEUE=y 35CONFIG_POSIX_MQUEUE=y
33# CONFIG_BSD_PROCESS_ACCT is not set 36# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set 37# CONFIG_TASKSTATS is not set
@@ -108,6 +111,8 @@ CONFIG_DEFAULT_MIGRATION_COST=1000000
108CONFIG_COMPAT=y 111CONFIG_COMPAT=y
109CONFIG_SYSVIPC_COMPAT=y 112CONFIG_SYSVIPC_COMPAT=y
110CONFIG_AUDIT_ARCH=y 113CONFIG_AUDIT_ARCH=y
114CONFIG_S390_SWITCH_AMODE=y
115CONFIG_S390_EXEC_PROTECT=y
111 116
112# 117#
113# Code generation options 118# Code generation options
@@ -131,6 +136,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
131# CONFIG_SPARSEMEM_STATIC is not set 136# CONFIG_SPARSEMEM_STATIC is not set
132CONFIG_SPLIT_PTLOCK_CPUS=4 137CONFIG_SPLIT_PTLOCK_CPUS=4
133CONFIG_RESOURCES_64BIT=y 138CONFIG_RESOURCES_64BIT=y
139CONFIG_ZONE_DMA_FLAG=1
134CONFIG_HOLES_IN_ZONE=y 140CONFIG_HOLES_IN_ZONE=y
135 141
136# 142#
@@ -176,7 +182,11 @@ CONFIG_UNIX=y
176CONFIG_XFRM=y 182CONFIG_XFRM=y
177# CONFIG_XFRM_USER is not set 183# CONFIG_XFRM_USER is not set
178# CONFIG_XFRM_SUB_POLICY is not set 184# CONFIG_XFRM_SUB_POLICY is not set
185# CONFIG_XFRM_MIGRATE is not set
179CONFIG_NET_KEY=y 186CONFIG_NET_KEY=y
187# CONFIG_NET_KEY_MIGRATE is not set
188CONFIG_IUCV=m
189CONFIG_AFIUCV=m
180CONFIG_INET=y 190CONFIG_INET=y
181CONFIG_IP_MULTICAST=y 191CONFIG_IP_MULTICAST=y
182# CONFIG_IP_ADVANCED_ROUTER is not set 192# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -191,7 +201,7 @@ CONFIG_IP_FIB_HASH=y
191# CONFIG_INET_ESP is not set 201# CONFIG_INET_ESP is not set
192# CONFIG_INET_IPCOMP is not set 202# CONFIG_INET_IPCOMP is not set
193# CONFIG_INET_XFRM_TUNNEL is not set 203# CONFIG_INET_XFRM_TUNNEL is not set
194# CONFIG_INET_TUNNEL is not set 204CONFIG_INET_TUNNEL=y
195CONFIG_INET_XFRM_MODE_TRANSPORT=y 205CONFIG_INET_XFRM_MODE_TRANSPORT=y
196CONFIG_INET_XFRM_MODE_TUNNEL=y 206CONFIG_INET_XFRM_MODE_TUNNEL=y
197CONFIG_INET_XFRM_MODE_BEET=y 207CONFIG_INET_XFRM_MODE_BEET=y
@@ -309,6 +319,7 @@ CONFIG_STANDALONE=y
309CONFIG_PREVENT_FIRMWARE_BUILD=y 319CONFIG_PREVENT_FIRMWARE_BUILD=y
310# CONFIG_FW_LOADER is not set 320# CONFIG_FW_LOADER is not set
311# CONFIG_DEBUG_DRIVER is not set 321# CONFIG_DEBUG_DRIVER is not set
322# CONFIG_DEBUG_DEVRES is not set
312CONFIG_SYS_HYPERVISOR=y 323CONFIG_SYS_HYPERVISOR=y
313 324
314# 325#
@@ -431,7 +442,6 @@ CONFIG_TN3270_CONSOLE=y
431CONFIG_TN3215=y 442CONFIG_TN3215=y
432CONFIG_TN3215_CONSOLE=y 443CONFIG_TN3215_CONSOLE=y
433CONFIG_CCW_CONSOLE=y 444CONFIG_CCW_CONSOLE=y
434CONFIG_SCLP=y
435CONFIG_SCLP_TTY=y 445CONFIG_SCLP_TTY=y
436CONFIG_SCLP_CONSOLE=y 446CONFIG_SCLP_CONSOLE=y
437CONFIG_SCLP_VT220_TTY=y 447CONFIG_SCLP_VT220_TTY=y
@@ -507,7 +517,6 @@ CONFIG_NET_ETHERNET=y
507# 517#
508CONFIG_LCS=m 518CONFIG_LCS=m
509CONFIG_CTC=m 519CONFIG_CTC=m
510CONFIG_IUCV=m
511# CONFIG_NETIUCV is not set 520# CONFIG_NETIUCV is not set
512# CONFIG_SMSGIUCV is not set 521# CONFIG_SMSGIUCV is not set
513# CONFIG_CLAW is not set 522# CONFIG_CLAW is not set
@@ -684,13 +693,13 @@ CONFIG_HEADERS_CHECK=y
684CONFIG_DEBUG_KERNEL=y 693CONFIG_DEBUG_KERNEL=y
685CONFIG_LOG_BUF_SHIFT=17 694CONFIG_LOG_BUF_SHIFT=17
686# CONFIG_SCHEDSTATS is not set 695# CONFIG_SCHEDSTATS is not set
696# CONFIG_TIMER_STATS is not set
687# CONFIG_DEBUG_SLAB is not set 697# CONFIG_DEBUG_SLAB is not set
688CONFIG_DEBUG_PREEMPT=y 698CONFIG_DEBUG_PREEMPT=y
689# CONFIG_DEBUG_RT_MUTEXES is not set 699# CONFIG_DEBUG_RT_MUTEXES is not set
690# CONFIG_RT_MUTEX_TESTER is not set 700# CONFIG_RT_MUTEX_TESTER is not set
691CONFIG_DEBUG_SPINLOCK=y 701CONFIG_DEBUG_SPINLOCK=y
692CONFIG_DEBUG_MUTEXES=y 702CONFIG_DEBUG_MUTEXES=y
693# CONFIG_DEBUG_RWSEMS is not set
694# CONFIG_DEBUG_LOCK_ALLOC is not set 703# CONFIG_DEBUG_LOCK_ALLOC is not set
695# CONFIG_PROVE_LOCKING is not set 704# CONFIG_PROVE_LOCKING is not set
696CONFIG_DEBUG_SPINLOCK_SLEEP=y 705CONFIG_DEBUG_SPINLOCK_SLEEP=y
@@ -700,10 +709,10 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
700# CONFIG_DEBUG_VM is not set 709# CONFIG_DEBUG_VM is not set
701# CONFIG_DEBUG_LIST is not set 710# CONFIG_DEBUG_LIST is not set
702# CONFIG_FRAME_POINTER is not set 711# CONFIG_FRAME_POINTER is not set
703# CONFIG_UNWIND_INFO is not set
704CONFIG_FORCED_INLINING=y 712CONFIG_FORCED_INLINING=y
705# CONFIG_RCU_TORTURE_TEST is not set 713# CONFIG_RCU_TORTURE_TEST is not set
706# CONFIG_LKDTM is not set 714# CONFIG_LKDTM is not set
715# CONFIG_FAULT_INJECTION is not set
707 716
708# 717#
709# Security options 718# Security options
@@ -724,23 +733,21 @@ CONFIG_CRYPTO_MANAGER=y
724# CONFIG_CRYPTO_MD4 is not set 733# CONFIG_CRYPTO_MD4 is not set
725# CONFIG_CRYPTO_MD5 is not set 734# CONFIG_CRYPTO_MD5 is not set
726# CONFIG_CRYPTO_SHA1 is not set 735# CONFIG_CRYPTO_SHA1 is not set
727# CONFIG_CRYPTO_SHA1_S390 is not set
728# CONFIG_CRYPTO_SHA256 is not set 736# CONFIG_CRYPTO_SHA256 is not set
729# CONFIG_CRYPTO_SHA256_S390 is not set
730# CONFIG_CRYPTO_SHA512 is not set 737# CONFIG_CRYPTO_SHA512 is not set
731# CONFIG_CRYPTO_WP512 is not set 738# CONFIG_CRYPTO_WP512 is not set
732# CONFIG_CRYPTO_TGR192 is not set 739# CONFIG_CRYPTO_TGR192 is not set
733# CONFIG_CRYPTO_GF128MUL is not set 740# CONFIG_CRYPTO_GF128MUL is not set
734CONFIG_CRYPTO_ECB=m 741CONFIG_CRYPTO_ECB=m
735CONFIG_CRYPTO_CBC=y 742CONFIG_CRYPTO_CBC=y
743CONFIG_CRYPTO_PCBC=m
736# CONFIG_CRYPTO_LRW is not set 744# CONFIG_CRYPTO_LRW is not set
737# CONFIG_CRYPTO_DES is not set 745# CONFIG_CRYPTO_DES is not set
738# CONFIG_CRYPTO_DES_S390 is not set 746CONFIG_CRYPTO_FCRYPT=m
739# CONFIG_CRYPTO_BLOWFISH is not set 747# CONFIG_CRYPTO_BLOWFISH is not set
740# CONFIG_CRYPTO_TWOFISH is not set 748# CONFIG_CRYPTO_TWOFISH is not set
741# CONFIG_CRYPTO_SERPENT is not set 749# CONFIG_CRYPTO_SERPENT is not set
742# CONFIG_CRYPTO_AES is not set 750# CONFIG_CRYPTO_AES is not set
743# CONFIG_CRYPTO_AES_S390 is not set
744# CONFIG_CRYPTO_CAST5 is not set 751# CONFIG_CRYPTO_CAST5 is not set
745# CONFIG_CRYPTO_CAST6 is not set 752# CONFIG_CRYPTO_CAST6 is not set
746# CONFIG_CRYPTO_TEA is not set 753# CONFIG_CRYPTO_TEA is not set
@@ -750,11 +757,17 @@ CONFIG_CRYPTO_CBC=y
750# CONFIG_CRYPTO_DEFLATE is not set 757# CONFIG_CRYPTO_DEFLATE is not set
751# CONFIG_CRYPTO_MICHAEL_MIC is not set 758# CONFIG_CRYPTO_MICHAEL_MIC is not set
752# CONFIG_CRYPTO_CRC32C is not set 759# CONFIG_CRYPTO_CRC32C is not set
760CONFIG_CRYPTO_CAMELLIA=m
753# CONFIG_CRYPTO_TEST is not set 761# CONFIG_CRYPTO_TEST is not set
754 762
755# 763#
756# Hardware crypto devices 764# Hardware crypto devices
757# 765#
766# CONFIG_CRYPTO_SHA1_S390 is not set
767# CONFIG_CRYPTO_SHA256_S390 is not set
768# CONFIG_CRYPTO_DES_S390 is not set
769# CONFIG_CRYPTO_AES_S390 is not set
770CONFIG_S390_PRNG=m
758 771
759# 772#
760# Library routines 773# Library routines
@@ -765,4 +778,3 @@ CONFIG_BITREVERSE=m
765CONFIG_CRC32=m 778CONFIG_CRC32=m
766# CONFIG_LIBCRC32C is not set 779# CONFIG_LIBCRC32C is not set
767CONFIG_PLIST=y 780CONFIG_PLIST=y
768CONFIG_IOMAP_COPY=y
diff --git a/arch/s390/hypfs/Makefile b/arch/s390/hypfs/Makefile
index f4b00cd81f7c..b08d2abf6178 100644
--- a/arch/s390/hypfs/Makefile
+++ b/arch/s390/hypfs/Makefile
@@ -4,4 +4,4 @@
4 4
5obj-$(CONFIG_S390_HYPFS_FS) += s390_hypfs.o 5obj-$(CONFIG_S390_HYPFS_FS) += s390_hypfs.o
6 6
7s390_hypfs-objs := inode.o hypfs_diag.o 7s390_hypfs-objs := inode.o hypfs_diag.o hypfs_vm.o
diff --git a/arch/s390/hypfs/hypfs.h b/arch/s390/hypfs/hypfs.h
index f3dbd91965c6..aea572009d60 100644
--- a/arch/s390/hypfs/hypfs.h
+++ b/arch/s390/hypfs/hypfs.h
@@ -27,4 +27,13 @@ extern struct dentry *hypfs_create_str(struct super_block *sb,
27 struct dentry *dir, const char *name, 27 struct dentry *dir, const char *name,
28 char *string); 28 char *string);
29 29
30/* LPAR Hypervisor */
31extern int hypfs_diag_init(void);
32extern void hypfs_diag_exit(void);
33extern int hypfs_diag_create_files(struct super_block *sb, struct dentry *root);
34
35/* VM Hypervisor */
36extern int hypfs_vm_init(void);
37extern int hypfs_vm_create_files(struct super_block *sb, struct dentry *root);
38
30#endif /* _HYPFS_H_ */ 39#endif /* _HYPFS_H_ */
diff --git a/arch/s390/hypfs/hypfs_diag.h b/arch/s390/hypfs/hypfs_diag.h
deleted file mode 100644
index 256b384aebe1..000000000000
--- a/arch/s390/hypfs/hypfs_diag.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * arch/s390/hypfs_diag.h
3 * Hypervisor filesystem for Linux on s390.
4 *
5 * Copyright (C) IBM Corp. 2006
6 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
7 */
8
9#ifndef _HYPFS_DIAG_H_
10#define _HYPFS_DIAG_H_
11
12extern int hypfs_diag_init(void);
13extern void hypfs_diag_exit(void);
14extern int hypfs_diag_create_files(struct super_block *sb, struct dentry *root);
15
16#endif /* _HYPFS_DIAG_H_ */
diff --git a/arch/s390/hypfs/hypfs_vm.c b/arch/s390/hypfs/hypfs_vm.c
new file mode 100644
index 000000000000..d01fc8f799f0
--- /dev/null
+++ b/arch/s390/hypfs/hypfs_vm.c
@@ -0,0 +1,231 @@
1/*
2 * Hypervisor filesystem for Linux on s390. z/VM implementation.
3 *
4 * Copyright (C) IBM Corp. 2006
5 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
6 */
7
8#include <linux/types.h>
9#include <linux/errno.h>
10#include <linux/string.h>
11#include <linux/vmalloc.h>
12#include <asm/ebcdic.h>
13#include "hypfs.h"
14
15#define NAME_LEN 8
16
17static char local_guest[] = " ";
18static char all_guests[] = "* ";
19static char *guest_query;
20
21struct diag2fc_data {
22 __u32 version;
23 __u32 flags;
24 __u64 used_cpu;
25 __u64 el_time;
26 __u64 mem_min_kb;
27 __u64 mem_max_kb;
28 __u64 mem_share_kb;
29 __u64 mem_used_kb;
30 __u32 pcpus;
31 __u32 lcpus;
32 __u32 vcpus;
33 __u32 cpu_min;
34 __u32 cpu_max;
35 __u32 cpu_shares;
36 __u32 cpu_use_samp;
37 __u32 cpu_delay_samp;
38 __u32 page_wait_samp;
39 __u32 idle_samp;
40 __u32 other_samp;
41 __u32 total_samp;
42 char guest_name[NAME_LEN];
43};
44
45struct diag2fc_parm_list {
46 char userid[NAME_LEN];
47 char aci_grp[NAME_LEN];
48 __u64 addr;
49 __u32 size;
50 __u32 fmt;
51};
52
53static int diag2fc(int size, char* query, void *addr)
54{
55 unsigned long residual_cnt;
56 unsigned long rc;
57 struct diag2fc_parm_list parm_list;
58
59 memcpy(parm_list.userid, query, NAME_LEN);
60 ASCEBC(parm_list.userid, NAME_LEN);
61 parm_list.addr = (unsigned long) addr ;
62 parm_list.size = size;
63 parm_list.fmt = 0x02;
64 memset(parm_list.aci_grp, 0x40, NAME_LEN);
65 rc = -1;
66
67 asm volatile(
68 " diag %0,%1,0x2fc\n"
69 "0:\n"
70 EX_TABLE(0b,0b)
71 : "=d" (residual_cnt), "+d" (rc) : "0" (&parm_list) : "memory");
72
73 if ((rc != 0 ) && (rc != -2))
74 return rc;
75 else
76 return -residual_cnt;
77}
78
79static struct diag2fc_data *diag2fc_store(char *query, int *count)
80{
81 int size;
82 struct diag2fc_data *data;
83
84 do {
85 size = diag2fc(0, query, NULL);
86 if (size < 0)
87 return ERR_PTR(-EACCES);
88 data = vmalloc(size);
89 if (!data)
90 return ERR_PTR(-ENOMEM);
91 if (diag2fc(size, query, data) == 0)
92 break;
93 vfree(data);
94 } while (1);
95 *count = (size / sizeof(*data));
96
97 return data;
98}
99
100static void diag2fc_free(void *data)
101{
102 vfree(data);
103}
104
105#define ATTRIBUTE(sb, dir, name, member) \
106do { \
107 void *rc; \
108 rc = hypfs_create_u64(sb, dir, name, member); \
109 if (IS_ERR(rc)) \
110 return PTR_ERR(rc); \
111} while(0)
112
113static int hpyfs_vm_create_guest(struct super_block *sb,
114 struct dentry *systems_dir,
115 struct diag2fc_data *data)
116{
117 char guest_name[NAME_LEN + 1] = {};
118 struct dentry *guest_dir, *cpus_dir, *samples_dir, *mem_dir;
119 int dedicated_flag, capped_value;
120
121 capped_value = (data->flags & 0x00000006) >> 1;
122 dedicated_flag = (data->flags & 0x00000008) >> 3;
123
124 /* guest dir */
125 memcpy(guest_name, data->guest_name, NAME_LEN);
126 EBCASC(guest_name, NAME_LEN);
127 strstrip(guest_name);
128 guest_dir = hypfs_mkdir(sb, systems_dir, guest_name);
129 if (IS_ERR(guest_dir))
130 return PTR_ERR(guest_dir);
131 ATTRIBUTE(sb, guest_dir, "onlinetime_us", data->el_time);
132
133 /* logical cpu information */
134 cpus_dir = hypfs_mkdir(sb, guest_dir, "cpus");
135 if (IS_ERR(cpus_dir))
136 return PTR_ERR(cpus_dir);
137 ATTRIBUTE(sb, cpus_dir, "cputime_us", data->used_cpu);
138 ATTRIBUTE(sb, cpus_dir, "capped", capped_value);
139 ATTRIBUTE(sb, cpus_dir, "dedicated", dedicated_flag);
140 ATTRIBUTE(sb, cpus_dir, "count", data->vcpus);
141 ATTRIBUTE(sb, cpus_dir, "weight_min", data->cpu_min);
142 ATTRIBUTE(sb, cpus_dir, "weight_max", data->cpu_max);
143 ATTRIBUTE(sb, cpus_dir, "weight_cur", data->cpu_shares);
144
145 /* memory information */
146 mem_dir = hypfs_mkdir(sb, guest_dir, "mem");
147 if (IS_ERR(mem_dir))
148 return PTR_ERR(mem_dir);
149 ATTRIBUTE(sb, mem_dir, "min_KiB", data->mem_min_kb);
150 ATTRIBUTE(sb, mem_dir, "max_KiB", data->mem_max_kb);
151 ATTRIBUTE(sb, mem_dir, "used_KiB", data->mem_used_kb);
152 ATTRIBUTE(sb, mem_dir, "share_KiB", data->mem_share_kb);
153
154 /* samples */
155 samples_dir = hypfs_mkdir(sb, guest_dir, "samples");
156 if (IS_ERR(samples_dir))
157 return PTR_ERR(samples_dir);
158 ATTRIBUTE(sb, samples_dir, "cpu_using", data->cpu_use_samp);
159 ATTRIBUTE(sb, samples_dir, "cpu_delay", data->cpu_delay_samp);
160 ATTRIBUTE(sb, samples_dir, "mem_delay", data->page_wait_samp);
161 ATTRIBUTE(sb, samples_dir, "idle", data->idle_samp);
162 ATTRIBUTE(sb, samples_dir, "other", data->other_samp);
163 ATTRIBUTE(sb, samples_dir, "total", data->total_samp);
164 return 0;
165}
166
167int hypfs_vm_create_files(struct super_block *sb, struct dentry *root)
168{
169 struct dentry *dir, *file;
170 struct diag2fc_data *data;
171 int rc, i, count = 0;
172
173 data = diag2fc_store(guest_query, &count);
174 if (IS_ERR(data))
175 return PTR_ERR(data);
176
177 /* Hpervisor Info */
178 dir = hypfs_mkdir(sb, root, "hyp");
179 if (IS_ERR(dir)) {
180 rc = PTR_ERR(dir);
181 goto failed;
182 }
183 file = hypfs_create_str(sb, dir, "type", "z/VM Hypervisor");
184 if (IS_ERR(file)) {
185 rc = PTR_ERR(file);
186 goto failed;
187 }
188
189 /* physical cpus */
190 dir = hypfs_mkdir(sb, root, "cpus");
191 if (IS_ERR(dir)) {
192 rc = PTR_ERR(dir);
193 goto failed;
194 }
195 file = hypfs_create_u64(sb, dir, "count", data->lcpus);
196 if (IS_ERR(file)) {
197 rc = PTR_ERR(file);
198 goto failed;
199 }
200
201 /* guests */
202 dir = hypfs_mkdir(sb, root, "systems");
203 if (IS_ERR(dir)) {
204 rc = PTR_ERR(dir);
205 goto failed;
206 }
207
208 for (i = 0; i < count; i++) {
209 rc = hpyfs_vm_create_guest(sb, dir, &(data[i]));
210 if (rc)
211 goto failed;
212 }
213 diag2fc_free(data);
214 return 0;
215
216failed:
217 diag2fc_free(data);
218 return rc;
219}
220
221int hypfs_vm_init(void)
222{
223 if (diag2fc(0, all_guests, NULL) > 0)
224 guest_query = all_guests;
225 else if (diag2fc(0, local_guest, NULL) > 0)
226 guest_query = local_guest;
227 else
228 return -EACCES;
229
230 return 0;
231}
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index b6716c4b9934..ba5d3167df0d 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -19,7 +19,6 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/ebcdic.h> 20#include <asm/ebcdic.h>
21#include "hypfs.h" 21#include "hypfs.h"
22#include "hypfs_diag.h"
23 22
24#define HYPFS_MAGIC 0x687970 /* ASCII 'hyp' */ 23#define HYPFS_MAGIC 0x687970 /* ASCII 'hyp' */
25#define TMP_SIZE 64 /* size of temporary buffers */ 24#define TMP_SIZE 64 /* size of temporary buffers */
@@ -35,7 +34,7 @@ struct hypfs_sb_info {
35 struct mutex lock; /* lock to protect update process */ 34 struct mutex lock; /* lock to protect update process */
36}; 35};
37 36
38static struct file_operations hypfs_file_ops; 37static const struct file_operations hypfs_file_ops;
39static struct file_system_type hypfs_type; 38static struct file_system_type hypfs_type;
40static struct super_operations hypfs_s_ops; 39static struct super_operations hypfs_s_ops;
41 40
@@ -192,7 +191,10 @@ static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov,
192 goto out; 191 goto out;
193 } 192 }
194 hypfs_delete_tree(sb->s_root); 193 hypfs_delete_tree(sb->s_root);
195 rc = hypfs_diag_create_files(sb, sb->s_root); 194 if (MACHINE_IS_VM)
195 rc = hypfs_vm_create_files(sb, sb->s_root);
196 else
197 rc = hypfs_diag_create_files(sb, sb->s_root);
196 if (rc) { 198 if (rc) {
197 printk(KERN_ERR "hypfs: Update failed\n"); 199 printk(KERN_ERR "hypfs: Update failed\n");
198 hypfs_delete_tree(sb->s_root); 200 hypfs_delete_tree(sb->s_root);
@@ -289,7 +291,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
289 rc = -ENOMEM; 291 rc = -ENOMEM;
290 goto err_alloc; 292 goto err_alloc;
291 } 293 }
292 rc = hypfs_diag_create_files(sb, root_dentry); 294 if (MACHINE_IS_VM)
295 rc = hypfs_vm_create_files(sb, root_dentry);
296 else
297 rc = hypfs_diag_create_files(sb, root_dentry);
293 if (rc) 298 if (rc)
294 goto err_tree; 299 goto err_tree;
295 sbi->update_file = hypfs_create_update_file(sb, root_dentry); 300 sbi->update_file = hypfs_create_update_file(sb, root_dentry);
@@ -435,7 +440,7 @@ struct dentry *hypfs_create_str(struct super_block *sb, struct dentry *dir,
435 return dentry; 440 return dentry;
436} 441}
437 442
438static struct file_operations hypfs_file_ops = { 443static const struct file_operations hypfs_file_ops = {
439 .open = hypfs_open, 444 .open = hypfs_open,
440 .release = hypfs_release, 445 .release = hypfs_release,
441 .read = do_sync_read, 446 .read = do_sync_read,
@@ -462,11 +467,15 @@ static int __init hypfs_init(void)
462{ 467{
463 int rc; 468 int rc;
464 469
465 if (MACHINE_IS_VM) 470 if (MACHINE_IS_VM) {
466 return -ENODATA; 471 if (hypfs_vm_init())
467 if (hypfs_diag_init()) { 472 /* no diag 2fc, just exit */
468 rc = -ENODATA; 473 return -ENODATA;
469 goto fail_diag; 474 } else {
475 if (hypfs_diag_init()) {
476 rc = -ENODATA;
477 goto fail_diag;
478 }
470 } 479 }
471 kset_set_kset_s(&s390_subsys, hypervisor_subsys); 480 kset_set_kset_s(&s390_subsys, hypervisor_subsys);
472 rc = subsystem_register(&s390_subsys); 481 rc = subsystem_register(&s390_subsys);
@@ -480,7 +489,8 @@ static int __init hypfs_init(void)
480fail_filesystem: 489fail_filesystem:
481 subsystem_unregister(&s390_subsys); 490 subsystem_unregister(&s390_subsys);
482fail_sysfs: 491fail_sysfs:
483 hypfs_diag_exit(); 492 if (!MACHINE_IS_VM)
493 hypfs_diag_exit();
484fail_diag: 494fail_diag:
485 printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc); 495 printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc);
486 return rc; 496 return rc;
@@ -488,7 +498,8 @@ fail_diag:
488 498
489static void __exit hypfs_exit(void) 499static void __exit hypfs_exit(void)
490{ 500{
491 hypfs_diag_exit(); 501 if (!MACHINE_IS_VM)
502 hypfs_diag_exit();
492 unregister_filesystem(&hypfs_type); 503 unregister_filesystem(&hypfs_type);
493 subsystem_unregister(&s390_subsys); 504 subsystem_unregister(&s390_subsys);
494} 505}
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index a81881c9b297..5492d25d7d69 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -4,9 +4,9 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7obj-y := bitmap.o traps.o time.o process.o reset.o \ 7obj-y := bitmap.o traps.o time.o process.o base.o early.o \
8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ 8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
9 semaphore.o s390_ext.o debug.o profile.o irq.o ipl.o 9 semaphore.o s390_ext.o debug.o irq.o ipl.o
10 10
11obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o) 11obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
12obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o) 12obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
diff --git a/arch/s390/kernel/base.S b/arch/s390/kernel/base.S
new file mode 100644
index 000000000000..dc7e5259770f
--- /dev/null
+++ b/arch/s390/kernel/base.S
@@ -0,0 +1,150 @@
1/*
2 * arch/s390/kernel/base.S
3 *
4 * Copyright IBM Corp. 2006,2007
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 * Michael Holzheu <holzheu@de.ibm.com>
7 */
8
9#include <asm/ptrace.h>
10#include <asm/lowcore.h>
11
12#ifdef CONFIG_64BIT
13
14 .globl s390_base_mcck_handler
15s390_base_mcck_handler:
16 basr %r13,0
170: lg %r15,__LC_PANIC_STACK # load panic stack
18 aghi %r15,-STACK_FRAME_OVERHEAD
19 larl %r1,s390_base_mcck_handler_fn
20 lg %r1,0(%r1)
21 ltgr %r1,%r1
22 jz 1f
23 basr %r14,%r1
241: la %r1,4095
25 lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)
26 lpswe __LC_MCK_OLD_PSW
27
28 .section .bss
29 .globl s390_base_mcck_handler_fn
30s390_base_mcck_handler_fn:
31 .quad 0
32 .previous
33
34 .globl s390_base_ext_handler
35s390_base_ext_handler:
36 stmg %r0,%r15,__LC_SAVE_AREA
37 basr %r13,0
380: aghi %r15,-STACK_FRAME_OVERHEAD
39 larl %r1,s390_base_ext_handler_fn
40 lg %r1,0(%r1)
41 ltgr %r1,%r1
42 jz 1f
43 basr %r14,%r1
441: lmg %r0,%r15,__LC_SAVE_AREA
45 ni __LC_EXT_OLD_PSW+1,0xfd # clear wait state bit
46 lpswe __LC_EXT_OLD_PSW
47
48 .section .bss
49 .globl s390_base_ext_handler_fn
50s390_base_ext_handler_fn:
51 .quad 0
52 .previous
53
54 .globl s390_base_pgm_handler
55s390_base_pgm_handler:
56 stmg %r0,%r15,__LC_SAVE_AREA
57 basr %r13,0
580: aghi %r15,-STACK_FRAME_OVERHEAD
59 larl %r1,s390_base_pgm_handler_fn
60 lg %r1,0(%r1)
61 ltgr %r1,%r1
62 jz 1f
63 basr %r14,%r1
64 lmg %r0,%r15,__LC_SAVE_AREA
65 lpswe __LC_PGM_OLD_PSW
661: lpswe disabled_wait_psw-0b(%r13)
67
68 .align 8
69disabled_wait_psw:
70 .quad 0x0002000180000000,0x0000000000000000 + s390_base_pgm_handler
71
72 .section .bss
73 .globl s390_base_pgm_handler_fn
74s390_base_pgm_handler_fn:
75 .quad 0
76 .previous
77
78#else /* CONFIG_64BIT */
79
80 .globl s390_base_mcck_handler
81s390_base_mcck_handler:
82 basr %r13,0
830: l %r15,__LC_PANIC_STACK # load panic stack
84 ahi %r15,-STACK_FRAME_OVERHEAD
85 l %r1,2f-0b(%r13)
86 l %r1,0(%r1)
87 ltr %r1,%r1
88 jz 1f
89 basr %r14,%r1
901: lm %r0,%r15,__LC_GPREGS_SAVE_AREA
91 lpsw __LC_MCK_OLD_PSW
92
932: .long s390_base_mcck_handler_fn
94
95 .section .bss
96 .globl s390_base_mcck_handler_fn
97s390_base_mcck_handler_fn:
98 .long 0
99 .previous
100
101 .globl s390_base_ext_handler
102s390_base_ext_handler:
103 stm %r0,%r15,__LC_SAVE_AREA
104 basr %r13,0
1050: ahi %r15,-STACK_FRAME_OVERHEAD
106 l %r1,2f-0b(%r13)
107 l %r1,0(%r1)
108 ltr %r1,%r1
109 jz 1f
110 basr %r14,%r1
1111: lm %r0,%r15,__LC_SAVE_AREA
112 ni __LC_EXT_OLD_PSW+1,0xfd # clear wait state bit
113 lpsw __LC_EXT_OLD_PSW
114
1152: .long s390_base_ext_handler_fn
116
117 .section .bss
118 .globl s390_base_ext_handler_fn
119s390_base_ext_handler_fn:
120 .long 0
121 .previous
122
123 .globl s390_base_pgm_handler
124s390_base_pgm_handler:
125 stm %r0,%r15,__LC_SAVE_AREA
126 basr %r13,0
1270: ahi %r15,-STACK_FRAME_OVERHEAD
128 l %r1,2f-0b(%r13)
129 l %r1,0(%r1)
130 ltr %r1,%r1
131 jz 1f
132 basr %r14,%r1
133 lm %r0,%r15,__LC_SAVE_AREA
134 lpsw __LC_PGM_OLD_PSW
135
1361: lpsw disabled_wait_psw-0b(%r13)
137
1382: .long s390_base_pgm_handler_fn
139
140disabled_wait_psw:
141 .align 8
142 .long 0x000a0000,0x00000000 + s390_base_pgm_handler
143
144 .section .bss
145 .globl s390_base_pgm_handler_fn
146s390_base_pgm_handler_fn:
147 .long 0
148 .previous
149
150#endif /* CONFIG_64BIT */
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
index 5c46054195cb..f1e40ca00d8d 100644
--- a/arch/s390/kernel/binfmt_elf32.c
+++ b/arch/s390/kernel/binfmt_elf32.c
@@ -192,7 +192,7 @@ MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>");
192 192
193#undef cputime_to_timeval 193#undef cputime_to_timeval
194#define cputime_to_timeval cputime_to_compat_timeval 194#define cputime_to_timeval cputime_to_compat_timeval
195static __inline__ void 195static inline void
196cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) 196cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
197{ 197{
198 value->tv_usec = cputime % 1000000; 198 value->tv_usec = cputime % 1000000;
diff --git a/arch/s390/kernel/compat_exec_domain.c b/arch/s390/kernel/compat_exec_domain.c
index 71d27c493568..914d49444f92 100644
--- a/arch/s390/kernel/compat_exec_domain.c
+++ b/arch/s390/kernel/compat_exec_domain.c
@@ -12,10 +12,9 @@
12#include <linux/personality.h> 12#include <linux/personality.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14 14
15struct exec_domain s390_exec_domain; 15static struct exec_domain s390_exec_domain;
16 16
17static int __init 17static int __init s390_init (void)
18s390_init (void)
19{ 18{
20 s390_exec_domain.name = "Linux/s390"; 19 s390_exec_domain.name = "Linux/s390";
21 s390_exec_domain.handler = NULL; 20 s390_exec_domain.handler = NULL;
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 5b33f823863a..664c669b1856 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -69,6 +69,12 @@
69 69
70#include "compat_linux.h" 70#include "compat_linux.h"
71 71
72long psw_user32_bits = (PSW_BASE32_BITS | PSW_MASK_DAT | PSW_ASC_HOME |
73 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
74 PSW_MASK_PSTATE | PSW_DEFAULT_KEY);
75long psw32_user_bits = (PSW32_BASE_BITS | PSW32_MASK_DAT | PSW32_ASC_HOME |
76 PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK |
77 PSW32_MASK_PSTATE);
72 78
73/* For this source file, we want overflow handling. */ 79/* For this source file, we want overflow handling. */
74 80
@@ -392,51 +398,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
392 return err; 398 return err;
393} 399}
394 400
395struct sysinfo32 {
396 s32 uptime;
397 u32 loads[3];
398 u32 totalram;
399 u32 freeram;
400 u32 sharedram;
401 u32 bufferram;
402 u32 totalswap;
403 u32 freeswap;
404 unsigned short procs;
405 unsigned short pads;
406 u32 totalhigh;
407 u32 freehigh;
408 unsigned int mem_unit;
409 char _f[8];
410};
411
412asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
413{
414 struct sysinfo s;
415 int ret, err;
416 mm_segment_t old_fs = get_fs ();
417
418 set_fs (KERNEL_DS);
419 ret = sys_sysinfo((struct sysinfo __user *) &s);
420 set_fs (old_fs);
421 err = put_user (s.uptime, &info->uptime);
422 err |= __put_user (s.loads[0], &info->loads[0]);
423 err |= __put_user (s.loads[1], &info->loads[1]);
424 err |= __put_user (s.loads[2], &info->loads[2]);
425 err |= __put_user (s.totalram, &info->totalram);
426 err |= __put_user (s.freeram, &info->freeram);
427 err |= __put_user (s.sharedram, &info->sharedram);
428 err |= __put_user (s.bufferram, &info->bufferram);
429 err |= __put_user (s.totalswap, &info->totalswap);
430 err |= __put_user (s.freeswap, &info->freeswap);
431 err |= __put_user (s.procs, &info->procs);
432 err |= __put_user (s.totalhigh, &info->totalhigh);
433 err |= __put_user (s.freehigh, &info->freehigh);
434 err |= __put_user (s.mem_unit, &info->mem_unit);
435 if (err)
436 return -EFAULT;
437 return ret;
438}
439
440asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, 401asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
441 struct compat_timespec __user *interval) 402 struct compat_timespec __user *interval)
442{ 403{
@@ -445,7 +406,8 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
445 mm_segment_t old_fs = get_fs (); 406 mm_segment_t old_fs = get_fs ();
446 407
447 set_fs (KERNEL_DS); 408 set_fs (KERNEL_DS);
448 ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t); 409 ret = sys_sched_rr_get_interval(pid,
410 (struct timespec __force __user *) &t);
449 set_fs (old_fs); 411 set_fs (old_fs);
450 if (put_compat_timespec(&t, interval)) 412 if (put_compat_timespec(&t, interval))
451 return -EFAULT; 413 return -EFAULT;
@@ -472,8 +434,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
472 } 434 }
473 set_fs (KERNEL_DS); 435 set_fs (KERNEL_DS);
474 ret = sys_rt_sigprocmask(how, 436 ret = sys_rt_sigprocmask(how,
475 set ? (sigset_t __user *) &s : NULL, 437 set ? (sigset_t __force __user *) &s : NULL,
476 oset ? (sigset_t __user *) &s : NULL, 438 oset ? (sigset_t __force __user *) &s : NULL,
477 sigsetsize); 439 sigsetsize);
478 set_fs (old_fs); 440 set_fs (old_fs);
479 if (ret) return ret; 441 if (ret) return ret;
@@ -499,7 +461,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
499 mm_segment_t old_fs = get_fs(); 461 mm_segment_t old_fs = get_fs();
500 462
501 set_fs (KERNEL_DS); 463 set_fs (KERNEL_DS);
502 ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); 464 ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize);
503 set_fs (old_fs); 465 set_fs (old_fs);
504 if (!ret) { 466 if (!ret) {
505 switch (_NSIG_WORDS) { 467 switch (_NSIG_WORDS) {
@@ -524,7 +486,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
524 if (copy_siginfo_from_user32(&info, uinfo)) 486 if (copy_siginfo_from_user32(&info, uinfo))
525 return -EFAULT; 487 return -EFAULT;
526 set_fs (KERNEL_DS); 488 set_fs (KERNEL_DS);
527 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); 489 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info);
528 set_fs (old_fs); 490 set_fs (old_fs);
529 return ret; 491 return ret;
530} 492}
@@ -682,7 +644,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
682 644
683 set_fs(KERNEL_DS); 645 set_fs(KERNEL_DS);
684 ret = sys_sendfile(out_fd, in_fd, 646 ret = sys_sendfile(out_fd, in_fd,
685 offset ? (off_t __user *) &of : NULL, count); 647 offset ? (off_t __force __user *) &of : NULL, count);
686 set_fs(old_fs); 648 set_fs(old_fs);
687 649
688 if (offset && put_user(of, offset)) 650 if (offset && put_user(of, offset))
@@ -703,7 +665,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
703 665
704 set_fs(KERNEL_DS); 666 set_fs(KERNEL_DS);
705 ret = sys_sendfile64(out_fd, in_fd, 667 ret = sys_sendfile64(out_fd, in_fd,
706 offset ? (loff_t __user *) &lof : NULL, count); 668 offset ? (loff_t __force __user *) &lof : NULL,
669 count);
707 set_fs(old_fs); 670 set_fs(old_fs);
708 671
709 if (offset && put_user(lof, offset)) 672 if (offset && put_user(lof, offset))
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 1a18e29668ef..e89f8c0c42a0 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -115,37 +115,6 @@ typedef struct
115 __u32 addr; 115 __u32 addr;
116} _psw_t32 __attribute__ ((aligned(8))); 116} _psw_t32 __attribute__ ((aligned(8)));
117 117
118#define PSW32_MASK_PER 0x40000000UL
119#define PSW32_MASK_DAT 0x04000000UL
120#define PSW32_MASK_IO 0x02000000UL
121#define PSW32_MASK_EXT 0x01000000UL
122#define PSW32_MASK_KEY 0x00F00000UL
123#define PSW32_MASK_MCHECK 0x00040000UL
124#define PSW32_MASK_WAIT 0x00020000UL
125#define PSW32_MASK_PSTATE 0x00010000UL
126#define PSW32_MASK_ASC 0x0000C000UL
127#define PSW32_MASK_CC 0x00003000UL
128#define PSW32_MASK_PM 0x00000f00UL
129
130#define PSW32_ADDR_AMODE31 0x80000000UL
131#define PSW32_ADDR_INSN 0x7FFFFFFFUL
132
133#define PSW32_BASE_BITS 0x00080000UL
134
135#define PSW32_ASC_PRIMARY 0x00000000UL
136#define PSW32_ASC_ACCREG 0x00004000UL
137#define PSW32_ASC_SECONDARY 0x00008000UL
138#define PSW32_ASC_HOME 0x0000C000UL
139
140#define PSW32_USER_BITS (PSW32_BASE_BITS | PSW32_MASK_DAT | PSW32_ASC_HOME | \
141 PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK | \
142 PSW32_MASK_PSTATE)
143
144#define PSW32_MASK_MERGE(CURRENT,NEW) \
145 (((CURRENT) & ~(PSW32_MASK_CC|PSW32_MASK_PM)) | \
146 ((NEW) & (PSW32_MASK_CC|PSW32_MASK_PM)))
147
148
149typedef struct 118typedef struct
150{ 119{
151 _psw_t32 psw; 120 _psw_t32 psw;
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 861888ab8c13..887a9881d0d0 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -275,8 +275,8 @@ sys32_sigaltstack(const stack_t32 __user *uss, stack_t32 __user *uoss,
275 } 275 }
276 276
277 set_fs (KERNEL_DS); 277 set_fs (KERNEL_DS);
278 ret = do_sigaltstack((stack_t __user *) (uss ? &kss : NULL), 278 ret = do_sigaltstack((stack_t __force __user *) (uss ? &kss : NULL),
279 (stack_t __user *) (uoss ? &koss : NULL), 279 (stack_t __force __user *) (uoss ? &koss : NULL),
280 regs->gprs[15]); 280 regs->gprs[15]);
281 set_fs (old_fs); 281 set_fs (old_fs);
282 282
@@ -298,7 +298,7 @@ static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs)
298 _s390_regs_common32 regs32; 298 _s390_regs_common32 regs32;
299 int err, i; 299 int err, i;
300 300
301 regs32.psw.mask = PSW32_MASK_MERGE(PSW32_USER_BITS, 301 regs32.psw.mask = PSW32_MASK_MERGE(psw32_user_bits,
302 (__u32)(regs->psw.mask >> 32)); 302 (__u32)(regs->psw.mask >> 32));
303 regs32.psw.addr = PSW32_ADDR_AMODE31 | (__u32) regs->psw.addr; 303 regs32.psw.addr = PSW32_ADDR_AMODE31 | (__u32) regs->psw.addr;
304 for (i = 0; i < NUM_GPRS; i++) 304 for (i = 0; i < NUM_GPRS; i++)
@@ -401,7 +401,7 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
401 goto badframe; 401 goto badframe;
402 402
403 set_fs (KERNEL_DS); 403 set_fs (KERNEL_DS);
404 do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]); 404 do_sigaltstack((stack_t __force __user *)&st, NULL, regs->gprs[15]);
405 set_fs (old_fs); 405 set_fs (old_fs);
406 406
407 return regs->gprs[2]; 407 return regs->gprs[2];
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 71e54ef0931e..97901296894e 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -517,10 +517,10 @@ sys32_swapoff_wrapper:
517 llgtr %r2,%r2 # const char * 517 llgtr %r2,%r2 # const char *
518 jg sys_swapoff # branch to system call 518 jg sys_swapoff # branch to system call
519 519
520 .globl sys32_sysinfo_wrapper 520 .globl compat_sys_sysinfo_wrapper
521sys32_sysinfo_wrapper: 521compat_sys_sysinfo_wrapper:
522 llgtr %r2,%r2 # struct sysinfo_emu31 * 522 llgtr %r2,%r2 # struct sysinfo_emu31 *
523 jg sys32_sysinfo # branch to system call 523 jg compat_sys_sysinfo # branch to system call
524 524
525 .globl sys32_ipc_wrapper 525 .globl sys32_ipc_wrapper
526sys32_ipc_wrapper: 526sys32_ipc_wrapper:
diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c
index a5972f1541fe..6c89f30c8e31 100644
--- a/arch/s390/kernel/cpcmd.c
+++ b/arch/s390/kernel/cpcmd.c
@@ -16,6 +16,7 @@
16#include <asm/ebcdic.h> 16#include <asm/ebcdic.h>
17#include <asm/cpcmd.h> 17#include <asm/cpcmd.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/io.h>
19 20
20static DEFINE_SPINLOCK(cpcmd_lock); 21static DEFINE_SPINLOCK(cpcmd_lock);
21static char cpcmd_buf[241]; 22static char cpcmd_buf[241];
@@ -88,13 +89,8 @@ int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
88 int len; 89 int len;
89 unsigned long flags; 90 unsigned long flags;
90 91
91 if ((rlen == 0) || (response == NULL) 92 if ((virt_to_phys(response) != (unsigned long) response) ||
92 || !((unsigned long)response >> 31)) { 93 (((unsigned long)response + rlen) >> 31)) {
93 spin_lock_irqsave(&cpcmd_lock, flags);
94 len = __cpcmd(cmd, response, rlen, response_code);
95 spin_unlock_irqrestore(&cpcmd_lock, flags);
96 }
97 else {
98 lowbuf = kmalloc(rlen, GFP_KERNEL | GFP_DMA); 94 lowbuf = kmalloc(rlen, GFP_KERNEL | GFP_DMA);
99 if (!lowbuf) { 95 if (!lowbuf) {
100 printk(KERN_WARNING 96 printk(KERN_WARNING
@@ -106,6 +102,10 @@ int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
106 spin_unlock_irqrestore(&cpcmd_lock, flags); 102 spin_unlock_irqrestore(&cpcmd_lock, flags);
107 memcpy(response, lowbuf, rlen); 103 memcpy(response, lowbuf, rlen);
108 kfree(lowbuf); 104 kfree(lowbuf);
105 } else {
106 spin_lock_irqsave(&cpcmd_lock, flags);
107 len = __cpcmd(cmd, response, rlen, response_code);
108 spin_unlock_irqrestore(&cpcmd_lock, flags);
109 } 109 }
110 return len; 110 return len;
111} 111}
diff --git a/arch/s390/kernel/crash.c b/arch/s390/kernel/crash.c
index 926cceeae0fa..8cc7c9fa64f5 100644
--- a/arch/s390/kernel/crash.c
+++ b/arch/s390/kernel/crash.c
@@ -9,6 +9,7 @@
9 9
10#include <linux/threads.h> 10#include <linux/threads.h>
11#include <linux/kexec.h> 11#include <linux/kexec.h>
12#include <linux/reboot.h>
12 13
13void machine_crash_shutdown(struct pt_regs *regs) 14void machine_crash_shutdown(struct pt_regs *regs)
14{ 15{
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index bb57bc0e3fc8..eca3fe595ff4 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -120,7 +120,7 @@ struct debug_view debug_hex_ascii_view = {
120 NULL 120 NULL
121}; 121};
122 122
123struct debug_view debug_level_view = { 123static struct debug_view debug_level_view = {
124 "level", 124 "level",
125 &debug_prolog_level_fn, 125 &debug_prolog_level_fn,
126 NULL, 126 NULL,
@@ -129,7 +129,7 @@ struct debug_view debug_level_view = {
129 NULL 129 NULL
130}; 130};
131 131
132struct debug_view debug_pages_view = { 132static struct debug_view debug_pages_view = {
133 "pages", 133 "pages",
134 &debug_prolog_pages_fn, 134 &debug_prolog_pages_fn,
135 NULL, 135 NULL,
@@ -138,7 +138,7 @@ struct debug_view debug_pages_view = {
138 NULL 138 NULL
139}; 139};
140 140
141struct debug_view debug_flush_view = { 141static struct debug_view debug_flush_view = {
142 "flush", 142 "flush",
143 NULL, 143 NULL,
144 NULL, 144 NULL,
@@ -156,18 +156,18 @@ struct debug_view debug_sprintf_view = {
156 NULL 156 NULL
157}; 157};
158 158
159 159/* used by dump analysis tools to determine version of debug feature */
160unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; 160unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION;
161 161
162/* static globals */ 162/* static globals */
163 163
164static debug_info_t *debug_area_first = NULL; 164static debug_info_t *debug_area_first = NULL;
165static debug_info_t *debug_area_last = NULL; 165static debug_info_t *debug_area_last = NULL;
166DECLARE_MUTEX(debug_lock); 166static DECLARE_MUTEX(debug_lock);
167 167
168static int initialized; 168static int initialized;
169 169
170static struct file_operations debug_file_ops = { 170static const struct file_operations debug_file_ops = {
171 .owner = THIS_MODULE, 171 .owner = THIS_MODULE,
172 .read = debug_output, 172 .read = debug_output,
173 .write = debug_input, 173 .write = debug_input,
@@ -852,7 +852,6 @@ debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level,
852static int debug_stoppable=1; 852static int debug_stoppable=1;
853static int debug_active=1; 853static int debug_active=1;
854 854
855#define CTL_S390DBF 5677
856#define CTL_S390DBF_STOPPABLE 5678 855#define CTL_S390DBF_STOPPABLE 5678
857#define CTL_S390DBF_ACTIVE 5679 856#define CTL_S390DBF_ACTIVE 5679
858 857
@@ -905,7 +904,7 @@ static struct ctl_table s390dbf_dir_table[] = {
905 { .ctl_name = 0 } 904 { .ctl_name = 0 }
906}; 905};
907 906
908struct ctl_table_header *s390dbf_sysctl_header; 907static struct ctl_table_header *s390dbf_sysctl_header;
909 908
910void 909void
911debug_stop_all(void) 910debug_stop_all(void)
@@ -1054,7 +1053,7 @@ __init debug_init(void)
1054{ 1053{
1055 int rc = 0; 1054 int rc = 0;
1056 1055
1057 s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1); 1056 s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
1058 down(&debug_lock); 1057 down(&debug_lock);
1059 debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); 1058 debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
1060 printk(KERN_INFO "debug: Initialization complete\n"); 1059 printk(KERN_INFO "debug: Initialization complete\n");
@@ -1300,8 +1299,7 @@ out:
1300 * flushes debug areas 1299 * flushes debug areas
1301 */ 1300 */
1302 1301
1303void 1302static void debug_flush(debug_info_t* id, int area)
1304debug_flush(debug_info_t* id, int area)
1305{ 1303{
1306 unsigned long flags; 1304 unsigned long flags;
1307 int i,j; 1305 int i,j;
@@ -1511,8 +1509,7 @@ out:
1511/* 1509/*
1512 * clean up module 1510 * clean up module
1513 */ 1511 */
1514void 1512static void __exit debug_exit(void)
1515__exit debug_exit(void)
1516{ 1513{
1517 debugfs_remove(debug_debugfs_root_entry); 1514 debugfs_remove(debug_debugfs_root_entry);
1518 unregister_sysctl_table(s390dbf_sysctl_header); 1515 unregister_sysctl_table(s390dbf_sysctl_header);
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
new file mode 100644
index 000000000000..afca1c6f4d21
--- /dev/null
+++ b/arch/s390/kernel/early.c
@@ -0,0 +1,307 @@
1/*
2 * arch/s390/kernel/early.c
3 *
4 * Copyright IBM Corp. 2007
5 * Author(s): Hongjie Yang <hongjie@us.ibm.com>,
6 * Heiko Carstens <heiko.carstens@de.ibm.com>
7 */
8
9#include <linux/init.h>
10#include <linux/errno.h>
11#include <linux/string.h>
12#include <linux/ctype.h>
13#include <linux/lockdep.h>
14#include <linux/module.h>
15#include <linux/pfn.h>
16#include <linux/uaccess.h>
17#include <asm/ipl.h>
18#include <asm/lowcore.h>
19#include <asm/processor.h>
20#include <asm/sections.h>
21#include <asm/setup.h>
22#include <asm/cpcmd.h>
23#include <asm/sclp.h>
24
25/*
26 * Create a Kernel NSS if the SAVESYS= parameter is defined
27 */
28#define DEFSYS_CMD_SIZE 96
29#define SAVESYS_CMD_SIZE 32
30
31char kernel_nss_name[NSS_NAME_SIZE + 1];
32
33#ifdef CONFIG_SHARED_KERNEL
34static noinline __init void create_kernel_nss(void)
35{
36 unsigned int i, stext_pfn, eshared_pfn, end_pfn, min_size;
37#ifdef CONFIG_BLK_DEV_INITRD
38 unsigned int sinitrd_pfn, einitrd_pfn;
39#endif
40 int response;
41 char *savesys_ptr;
42 char upper_command_line[COMMAND_LINE_SIZE];
43 char defsys_cmd[DEFSYS_CMD_SIZE];
44 char savesys_cmd[SAVESYS_CMD_SIZE];
45
46 /* Do nothing if we are not running under VM */
47 if (!MACHINE_IS_VM)
48 return;
49
50 /* Convert COMMAND_LINE to upper case */
51 for (i = 0; i < strlen(COMMAND_LINE); i++)
52 upper_command_line[i] = toupper(COMMAND_LINE[i]);
53
54 savesys_ptr = strstr(upper_command_line, "SAVESYS=");
55
56 if (!savesys_ptr)
57 return;
58
59 savesys_ptr += 8; /* Point to the beginning of the NSS name */
60 for (i = 0; i < NSS_NAME_SIZE; i++) {
61 if (savesys_ptr[i] == ' ' || savesys_ptr[i] == '\0')
62 break;
63 kernel_nss_name[i] = savesys_ptr[i];
64 }
65
66 stext_pfn = PFN_DOWN(__pa(&_stext));
67 eshared_pfn = PFN_DOWN(__pa(&_eshared));
68 end_pfn = PFN_UP(__pa(&_end));
69 min_size = end_pfn << 2;
70
71 sprintf(defsys_cmd, "DEFSYS %s 00000-%.5X EW %.5X-%.5X SR %.5X-%.5X",
72 kernel_nss_name, stext_pfn - 1, stext_pfn, eshared_pfn - 1,
73 eshared_pfn, end_pfn);
74
75#ifdef CONFIG_BLK_DEV_INITRD
76 if (INITRD_START && INITRD_SIZE) {
77 sinitrd_pfn = PFN_DOWN(__pa(INITRD_START));
78 einitrd_pfn = PFN_UP(__pa(INITRD_START + INITRD_SIZE));
79 min_size = einitrd_pfn << 2;
80 sprintf(defsys_cmd, "%s EW %.5X-%.5X", defsys_cmd,
81 sinitrd_pfn, einitrd_pfn);
82 }
83#endif
84
85 sprintf(defsys_cmd, "%s EW MINSIZE=%.7iK", defsys_cmd, min_size);
86 sprintf(savesys_cmd, "SAVESYS %s \n IPL %s",
87 kernel_nss_name, kernel_nss_name);
88
89 __cpcmd(defsys_cmd, NULL, 0, &response);
90
91 if (response != 0)
92 return;
93
94 __cpcmd(savesys_cmd, NULL, 0, &response);
95
96 if (response != strlen(savesys_cmd))
97 return;
98
99 ipl_flags = IPL_NSS_VALID;
100}
101
102#else /* CONFIG_SHARED_KERNEL */
103
104static inline void create_kernel_nss(void) { }
105
106#endif /* CONFIG_SHARED_KERNEL */
107
108/*
109 * Clear bss memory
110 */
111static noinline __init void clear_bss_section(void)
112{
113 memset(__bss_start, 0, __bss_stop - __bss_start);
114}
115
116/*
117 * Initialize storage key for kernel pages
118 */
119static noinline __init void init_kernel_storage_key(void)
120{
121 unsigned long end_pfn, init_pfn;
122
123 end_pfn = PFN_UP(__pa(&_end));
124
125 for (init_pfn = 0 ; init_pfn < end_pfn; init_pfn++)
126 page_set_storage_key(init_pfn << PAGE_SHIFT, PAGE_DEFAULT_KEY);
127}
128
129static noinline __init void detect_machine_type(void)
130{
131 struct cpuinfo_S390 *cpuinfo = &S390_lowcore.cpu_data;
132
133 get_cpu_id(&S390_lowcore.cpu_data.cpu_id);
134
135 /* Running under z/VM ? */
136 if (cpuinfo->cpu_id.version == 0xff)
137 machine_flags |= 1;
138
139 /* Running on a P/390 ? */
140 if (cpuinfo->cpu_id.machine == 0x7490)
141 machine_flags |= 4;
142}
143
144static noinline __init int memory_fast_detect(void)
145{
146
147 unsigned long val0 = 0;
148 unsigned long val1 = 0xc;
149 int ret = -ENOSYS;
150
151 if (ipl_flags & IPL_NSS_VALID)
152 return -ENOSYS;
153
154 asm volatile(
155 " diag %1,%2,0x260\n"
156 "0: lhi %0,0\n"
157 "1:\n"
158 EX_TABLE(0b,1b)
159 : "+d" (ret), "+d" (val0), "+d" (val1) : : "cc");
160
161 if (ret || val0 != val1)
162 return -ENOSYS;
163
164 memory_chunk[0].size = val0;
165 return 0;
166}
167
168#define ADDR2G (1UL << 31)
169
170static noinline __init unsigned long sclp_memory_detect(void)
171{
172 struct sclp_readinfo_sccb *sccb;
173 unsigned long long memsize;
174
175 sccb = &s390_readinfo_sccb;
176
177 if (sccb->header.response_code != 0x10)
178 return 0;
179
180 if (sccb->rnsize)
181 memsize = sccb->rnsize << 20;
182 else
183 memsize = sccb->rnsize2 << 20;
184 if (sccb->rnmax)
185 memsize *= sccb->rnmax;
186 else
187 memsize *= sccb->rnmax2;
188#ifndef CONFIG_64BIT
189 /*
190 * Can't deal with more than 2G in 31 bit addressing mode, so
191 * limit the value in order to avoid strange side effects.
192 */
193 if (memsize > ADDR2G)
194 memsize = ADDR2G;
195#endif
196 return (unsigned long) memsize;
197}
198
199static inline __init unsigned long __tprot(unsigned long addr)
200{
201 int cc = -1;
202
203 asm volatile(
204 " tprot 0(%1),0\n"
205 "0: ipm %0\n"
206 " srl %0,28\n"
207 "1:\n"
208 EX_TABLE(0b,1b)
209 : "+d" (cc) : "a" (addr) : "cc");
210 return (unsigned long)cc;
211}
212
213/* Checking memory in 128KB increments. */
214#define CHUNK_INCR (1UL << 17)
215
216static noinline __init void find_memory_chunks(unsigned long memsize)
217{
218 unsigned long addr = 0, old_addr = 0;
219 unsigned long old_cc = CHUNK_READ_WRITE;
220 unsigned long cc;
221 int chunk = 0;
222
223 while (chunk < MEMORY_CHUNKS) {
224 cc = __tprot(addr);
225 while (cc == old_cc) {
226 addr += CHUNK_INCR;
227 cc = __tprot(addr);
228#ifndef CONFIG_64BIT
229 if (addr == ADDR2G)
230 break;
231#endif
232 }
233
234 if (old_addr != addr &&
235 (old_cc == CHUNK_READ_WRITE || old_cc == CHUNK_READ_ONLY)) {
236 memory_chunk[chunk].addr = old_addr;
237 memory_chunk[chunk].size = addr - old_addr;
238 memory_chunk[chunk].type = old_cc;
239 chunk++;
240 }
241
242 old_addr = addr;
243 old_cc = cc;
244
245#ifndef CONFIG_64BIT
246 if (addr == ADDR2G)
247 break;
248#endif
249 /*
250 * Finish memory detection at the first hole, unless
251 * - we reached the hsa -> skip it.
252 * - we know there must be more.
253 */
254 if (cc == -1UL && !memsize && old_addr != ADDR2G)
255 break;
256 if (memsize && addr >= memsize)
257 break;
258 }
259}
260
261static __init void early_pgm_check_handler(void)
262{
263 unsigned long addr;
264 const struct exception_table_entry *fixup;
265
266 addr = S390_lowcore.program_old_psw.addr;
267 fixup = search_exception_tables(addr & PSW_ADDR_INSN);
268 if (!fixup)
269 disabled_wait(0);
270 S390_lowcore.program_old_psw.addr = fixup->fixup | PSW_ADDR_AMODE;
271}
272
273static noinline __init void setup_lowcore_early(void)
274{
275 psw_t psw;
276
277 psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY;
278 psw.addr = PSW_ADDR_AMODE | (unsigned long) s390_base_ext_handler;
279 S390_lowcore.external_new_psw = psw;
280 psw.addr = PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler;
281 S390_lowcore.program_new_psw = psw;
282 s390_base_pgm_handler_fn = early_pgm_check_handler;
283}
284
285/*
286 * Save ipl parameters, clear bss memory, initialize storage keys
287 * and create a kernel NSS at startup if the SAVESYS= parm is defined
288 */
289void __init startup_init(void)
290{
291 unsigned long memsize;
292
293 ipl_save_parameters();
294 clear_bss_section();
295 init_kernel_storage_key();
296 lockdep_init();
297 lockdep_off();
298 detect_machine_type();
299 create_kernel_nss();
300 sort_main_extable();
301 setup_lowcore_early();
302 sclp_readinfo_early();
303 memsize = sclp_memory_detect();
304 if (memory_fast_detect() < 0)
305 find_memory_chunks(memsize);
306 lockdep_on();
307}
diff --git a/arch/s390/kernel/ebcdic.c b/arch/s390/kernel/ebcdic.c
index bb0f973137f0..cc0dc609d738 100644
--- a/arch/s390/kernel/ebcdic.c
+++ b/arch/s390/kernel/ebcdic.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <asm/types.h> 13#include <asm/types.h>
14#include <asm/ebcdic.h>
14 15
15/* 16/*
16 * ASCII (IBM PC 437) -> EBCDIC 037 17 * ASCII (IBM PC 437) -> EBCDIC 037
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index eca507050e47..da7c8bb80982 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -51,176 +51,15 @@ startup_continue:
51 st %r15,__LC_KERNEL_STACK # set end of kernel stack 51 st %r15,__LC_KERNEL_STACK # set end of kernel stack
52 ahi %r15,-96 52 ahi %r15,-96
53 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain 53 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain
54
55 l %r14,.Lipl_save_parameters-.LPG1(%r13)
56 basr %r14,%r14
57# 54#
58# clear bss memory 55# Save ipl parameters, clear bss memory, initialize storage key for kernel pages,
56# and create a kernel NSS if the SAVESYS= parm is defined
59# 57#
60 l %r2,.Lbss_bgn-.LPG1(%r13) # start of bss 58 l %r14,.Lstartup_init-.LPG1(%r13)
61 l %r3,.Lbss_end-.LPG1(%r13) # end of bss 59 basr %r14,%r14
62 sr %r3,%r2 # length of bss
63 sr %r4,%r4
64 sr %r5,%r5 # set src,length and pad to zero
65 sr %r0,%r0
66 mvcle %r2,%r4,0 # clear mem
67 jo .-4 # branch back, if not finish
68
69 l %r2,.Lrcp-.LPG1(%r13) # Read SCP forced command word
70.Lservicecall:
71 stosm .Lpmask-.LPG1(%r13),0x01 # authorize ext interrupts
72
73 stctl %r0, %r0,.Lcr-.LPG1(%r13) # get cr0
74 la %r1,0x200 # set bit 22
75 o %r1,.Lcr-.LPG1(%r13) # or old cr0 with r1
76 st %r1,.Lcr-.LPG1(%r13)
77 lctl %r0, %r0,.Lcr-.LPG1(%r13) # load modified cr0
78
79 mvc __LC_EXT_NEW_PSW(8),.Lpcext-.LPG1(%r13) # set postcall psw
80 la %r1, .Lsclph-.LPG1(%r13)
81 a %r1,__LC_EXT_NEW_PSW+4 # set handler
82 st %r1,__LC_EXT_NEW_PSW+4
83
84 l %r4,.Lsccbaddr-.LPG1(%r13) # %r4 is our index for sccb stuff
85 lr %r1,%r4 # our sccb
86 .insn rre,0xb2200000,%r2,%r1 # service call
87 ipm %r1
88 srl %r1,28 # get cc code
89 xr %r3, %r3
90 chi %r1,3
91 be .Lfchunk-.LPG1(%r13) # leave
92 chi %r1,2
93 be .Lservicecall-.LPG1(%r13)
94 lpsw .Lwaitsclp-.LPG1(%r13)
95.Lsclph:
96 lh %r1,.Lsccbr-.Lsccb(%r4)
97 chi %r1,0x10 # 0x0010 is the sucess code
98 je .Lprocsccb # let's process the sccb
99 chi %r1,0x1f0
100 bne .Lfchunk-.LPG1(%r13) # unhandled error code
101 c %r2, .Lrcp-.LPG1(%r13) # Did we try Read SCP forced
102 bne .Lfchunk-.LPG1(%r13) # if no, give up
103 l %r2, .Lrcp2-.LPG1(%r13) # try with Read SCP
104 b .Lservicecall-.LPG1(%r13)
105.Lprocsccb:
106 lhi %r1,0
107 icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0
108 jnz .Lscnd
109 lhi %r1,0x800 # otherwise report 2GB
110.Lscnd:
111 lhi %r3,0x800 # limit reported memory size to 2GB
112 cr %r1,%r3
113 jl .Lno2gb
114 lr %r1,%r3
115.Lno2gb:
116 xr %r3,%r3 # same logic
117 ic %r3,.Lscpa1-.Lsccb(%r4)
118 chi %r3,0x00
119 jne .Lcompmem
120 l %r3,.Lscpa2-.Lsccb(%r4)
121.Lcompmem:
122 mr %r2,%r1 # mem in MB on 128-bit
123 l %r1,.Lonemb-.LPG1(%r13)
124 mr %r2,%r1 # mem size in bytes in %r3
125 b .Lfchunk-.LPG1(%r13)
126
127 .align 4
128.Lipl_save_parameters:
129 .long ipl_save_parameters
130.Linittu:
131 .long init_thread_union
132.Lpmask:
133 .byte 0
134 .align 8
135.Lpcext:.long 0x00080000,0x80000000
136.Lcr:
137 .long 0x00 # place holder for cr0
138 .align 8
139.Lwaitsclp:
140 .long 0x010a0000,0x80000000 + .Lsclph
141.Lrcp:
142 .int 0x00120001 # Read SCP forced code
143.Lrcp2:
144 .int 0x00020001 # Read SCP code
145.Lonemb:
146 .int 0x100000
147.Lfchunk:
148 60
149#
150# find memory chunks.
151#
152 lr %r9,%r3 # end of mem
153 mvc __LC_PGM_NEW_PSW(8),.Lpcmem-.LPG1(%r13)
154 la %r1,1 # test in increments of 128KB
155 sll %r1,17
156 l %r3,.Lmchunk-.LPG1(%r13) # get pointer to memory_chunk array
157 slr %r4,%r4 # set start of chunk to zero
158 slr %r5,%r5 # set end of chunk to zero
159 slr %r6,%r6 # set access code to zero
160 la %r10,MEMORY_CHUNKS # number of chunks
161.Lloop:
162 tprot 0(%r5),0 # test protection of first byte
163 ipm %r7
164 srl %r7,28
165 clr %r6,%r7 # compare cc with last access code
166 be .Lsame-.LPG1(%r13)
167 lhi %r8,0 # no program checks
168 b .Lsavchk-.LPG1(%r13)
169.Lsame:
170 ar %r5,%r1 # add 128KB to end of chunk
171 bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop
172.Lchkmem: # > 2GB or tprot got a program check
173 lhi %r8,1 # set program check flag
174.Lsavchk:
175 clr %r4,%r5 # chunk size > 0?
176 be .Lchkloop-.LPG1(%r13)
177 st %r4,0(%r3) # store start address of chunk
178 lr %r0,%r5
179 slr %r0,%r4
180 st %r0,4(%r3) # store size of chunk
181 st %r6,8(%r3) # store type of chunk
182 la %r3,12(%r3)
183 ahi %r10,-1 # update chunk number
184.Lchkloop:
185 lr %r6,%r7 # set access code to last cc
186 # we got an exception or we're starting a new
187 # chunk , we must check if we should
188 # still try to find valid memory (if we detected
189 # the amount of available storage), and if we
190 # have chunks left
191 xr %r0,%r0
192 clr %r0,%r9 # did we detect memory?
193 je .Ldonemem # if not, leave
194 chi %r10,0 # do we have chunks left?
195 je .Ldonemem
196 chi %r8,1 # program check ?
197 je .Lpgmchk
198 lr %r4,%r5 # potential new chunk
199 alr %r5,%r1 # add 128KB to end of chunk
200 j .Llpcnt
201.Lpgmchk:
202 alr %r5,%r1 # add 128KB to end of chunk
203 lr %r4,%r5 # potential new chunk
204.Llpcnt:
205 clr %r5,%r9 # should we go on?
206 jl .Lloop
207.Ldonemem:
208 l %r12,.Lmflags-.LPG1(%r13) # get address of machine_flags 61 l %r12,.Lmflags-.LPG1(%r13) # get address of machine_flags
209# 62#
210# find out if we are running under VM
211#
212 stidp __LC_CPUID # store cpuid
213 tm __LC_CPUID,0xff # running under VM ?
214 bno .Lnovm-.LPG1(%r13)
215 oi 3(%r12),1 # set VM flag
216.Lnovm:
217 lh %r0,__LC_CPUID+4 # get cpu version
218 chi %r0,0x7490 # running on a P/390 ?
219 bne .Lnop390-.LPG1(%r13)
220 oi 3(%r12),4 # set P/390 flag
221.Lnop390:
222
223#
224# find out if we have an IEEE fpu 63# find out if we have an IEEE fpu
225# 64#
226 mvc __LC_PGM_NEW_PSW(8),.Lpcfpu-.LPG1(%r13) 65 mvc __LC_PGM_NEW_PSW(8),.Lpcfpu-.LPG1(%r13)
@@ -295,7 +134,6 @@ startup_continue:
295 .long 0 # cr15: linkage stack operations 134 .long 0 # cr15: linkage stack operations
296.Lduct: .long 0,0,0,0,0,0,0,0 135.Lduct: .long 0,0,0,0,0,0,0,0
297 .long 0,0,0,0,0,0,0,0 136 .long 0,0,0,0,0,0,0,0
298.Lpcmem:.long 0x00080000,0x80000000 + .Lchkmem
299.Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu 137.Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu
300.Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp 138.Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp
301.Lpcmvpg:.long 0x00080000,0x80000000 + .Lchkmvpg 139.Lpcmvpg:.long 0x00080000,0x80000000 + .Lchkmvpg
@@ -306,42 +144,13 @@ startup_continue:
306.Lbss_bgn: .long __bss_start 144.Lbss_bgn: .long __bss_start
307.Lbss_end: .long _end 145.Lbss_end: .long _end
308.Lparmaddr: .long PARMAREA 146.Lparmaddr: .long PARMAREA
309.Lsccbaddr: .long .Lsccb 147.Linittu: .long init_thread_union
310 148.Lstartup_init:
311 .globl ipl_schib 149 .long startup_init
312ipl_schib:
313 .rept 13
314 .long 0
315 .endr
316
317 .globl ipl_flags
318ipl_flags:
319 .long 0
320 .globl ipl_devno
321ipl_devno:
322 .word 0
323 150
324 .org 0x12000 151 .org 0x12000
325.globl s390_readinfo_sccb 152 .globl _ehead
326s390_readinfo_sccb: 153_ehead:
327.Lsccb:
328 .hword 0x1000 # length, one page
329 .byte 0x00,0x00,0x00
330 .byte 0x80 # variable response bit set
331.Lsccbr:
332 .hword 0x00 # response code
333.Lscpincr1:
334 .hword 0x00
335.Lscpa1:
336 .byte 0x00
337 .fill 89,1,0
338.Lscpa2:
339 .int 0x00
340.Lscpincr2:
341 .quad 0x00
342 .fill 3984,1,0
343 .org 0x13000
344
345#ifdef CONFIG_SHARED_KERNEL 154#ifdef CONFIG_SHARED_KERNEL
346 .org 0x100000 155 .org 0x100000
347#endif 156#endif
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 6ba3f4512dd1..af09e18cc5d0 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -58,183 +58,15 @@ startup_continue:
58 stg %r15,__LC_KERNEL_STACK # set end of kernel stack 58 stg %r15,__LC_KERNEL_STACK # set end of kernel stack
59 aghi %r15,-160 59 aghi %r15,-160
60 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain 60 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain
61
62 brasl %r14,ipl_save_parameters
63# 61#
64# clear bss memory 62# Save ipl parameters, clear bss memory, initialize storage key for kernel pages,
63# and create a kernel NSS if the SAVESYS= parm is defined
65# 64#
66 larl %r2,__bss_start # start of bss segment 65 brasl %r14,startup_init
67 larl %r3,_end # end of bss segment
68 sgr %r3,%r2 # length of bss
69 sgr %r4,%r4 #
70 sgr %r5,%r5 # set src,length and pad to zero
71 mvcle %r2,%r4,0 # clear mem
72 jo .-4 # branch back, if not finish
73 # set program check new psw mask 66 # set program check new psw mask
74 mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13) 67 mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13)
75 larl %r1,.Lslowmemdetect # set program check address
76 stg %r1,__LC_PGM_NEW_PSW+8
77 lghi %r1,0xc
78 diag %r0,%r1,0x260 # get memory size of virtual machine
79 cgr %r0,%r1 # different? -> old detection routine
80 jne .Lslowmemdetect
81 aghi %r1,1 # size is one more than end
82 larl %r2,memory_chunk
83 stg %r1,8(%r2) # store size of chunk
84 j .Ldonemem
85
86.Lslowmemdetect:
87 l %r2,.Lrcp-.LPG1(%r13) # Read SCP forced command word
88.Lservicecall:
89 stosm .Lpmask-.LPG1(%r13),0x01 # authorize ext interrupts
90
91 stctg %r0,%r0,.Lcr-.LPG1(%r13) # get cr0
92 la %r1,0x200 # set bit 22
93 og %r1,.Lcr-.LPG1(%r13) # or old cr0 with r1
94 stg %r1,.Lcr-.LPG1(%r13)
95 lctlg %r0,%r0,.Lcr-.LPG1(%r13) # load modified cr0
96
97 mvc __LC_EXT_NEW_PSW(8),.Lpcmsk-.LPG1(%r13) # set postcall psw
98 larl %r1,.Lsclph
99 stg %r1,__LC_EXT_NEW_PSW+8 # set handler
100
101 larl %r4,.Lsccb # %r4 is our index for sccb stuff
102 lgr %r1,%r4 # our sccb
103 .insn rre,0xb2200000,%r2,%r1 # service call
104 ipm %r1
105 srl %r1,28 # get cc code
106 xr %r3,%r3
107 chi %r1,3
108 be .Lfchunk-.LPG1(%r13) # leave
109 chi %r1,2
110 be .Lservicecall-.LPG1(%r13)
111 lpswe .Lwaitsclp-.LPG1(%r13)
112.Lsclph:
113 lh %r1,.Lsccbr-.Lsccb(%r4)
114 chi %r1,0x10 # 0x0010 is the sucess code
115 je .Lprocsccb # let's process the sccb
116 chi %r1,0x1f0
117 bne .Lfchunk-.LPG1(%r13) # unhandled error code
118 c %r2,.Lrcp-.LPG1(%r13) # Did we try Read SCP forced
119 bne .Lfchunk-.LPG1(%r13) # if no, give up
120 l %r2,.Lrcp2-.LPG1(%r13) # try with Read SCP
121 b .Lservicecall-.LPG1(%r13)
122.Lprocsccb:
123 lghi %r1,0
124 icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0
125 jnz .Lscnd
126 lg %r1,.Lscpincr2-.Lsccb(%r4) # otherwise use this one
127.Lscnd:
128 xr %r3,%r3 # same logic
129 ic %r3,.Lscpa1-.Lsccb(%r4)
130 chi %r3,0x00
131 jne .Lcompmem
132 l %r3,.Lscpa2-.Lsccb(%r4)
133.Lcompmem:
134 mlgr %r2,%r1 # mem in MB on 128-bit
135 l %r1,.Lonemb-.LPG1(%r13)
136 mlgr %r2,%r1 # mem size in bytes in %r3
137 b .Lfchunk-.LPG1(%r13)
138
139 .align 4
140.Lpmask:
141 .byte 0
142 .align 8
143.Lcr:
144 .quad 0x00 # place holder for cr0
145.Lwaitsclp:
146 .quad 0x0102000180000000,.Lsclph
147.Lrcp:
148 .int 0x00120001 # Read SCP forced code
149.Lrcp2:
150 .int 0x00020001 # Read SCP code
151.Lonemb:
152 .int 0x100000
153
154.Lfchunk:
155
156#
157# find memory chunks.
158#
159 lgr %r9,%r3 # end of mem
160 larl %r1,.Lchkmem # set program check address
161 stg %r1,__LC_PGM_NEW_PSW+8
162 la %r1,1 # test in increments of 128KB
163 sllg %r1,%r1,17
164 larl %r3,memory_chunk
165 slgr %r4,%r4 # set start of chunk to zero
166 slgr %r5,%r5 # set end of chunk to zero
167 slr %r6,%r6 # set access code to zero
168 la %r10,MEMORY_CHUNKS # number of chunks
169.Lloop:
170 tprot 0(%r5),0 # test protection of first byte
171 ipm %r7
172 srl %r7,28
173 clr %r6,%r7 # compare cc with last access code
174 je .Lsame
175 lghi %r8,0 # no program checks
176 j .Lsavchk
177.Lsame:
178 algr %r5,%r1 # add 128KB to end of chunk
179 # no need to check here,
180 brc 12,.Lloop # this is the same chunk
181.Lchkmem: # > 16EB or tprot got a program check
182 lghi %r8,1 # set program check flag
183.Lsavchk:
184 clgr %r4,%r5 # chunk size > 0?
185 je .Lchkloop
186 stg %r4,0(%r3) # store start address of chunk
187 lgr %r0,%r5
188 slgr %r0,%r4
189 stg %r0,8(%r3) # store size of chunk
190 st %r6,20(%r3) # store type of chunk
191 la %r3,24(%r3)
192 ahi %r10,-1 # update chunk number
193.Lchkloop:
194 lr %r6,%r7 # set access code to last cc
195 # we got an exception or we're starting a new
196 # chunk , we must check if we should
197 # still try to find valid memory (if we detected
198 # the amount of available storage), and if we
199 # have chunks left
200 lghi %r4,1
201 sllg %r4,%r4,31
202 clgr %r5,%r4
203 je .Lhsaskip
204 xr %r0, %r0
205 clgr %r0, %r9 # did we detect memory?
206 je .Ldonemem # if not, leave
207 chi %r10, 0 # do we have chunks left?
208 je .Ldonemem
209.Lhsaskip:
210 chi %r8,1 # program check ?
211 je .Lpgmchk
212 lgr %r4,%r5 # potential new chunk
213 algr %r5,%r1 # add 128KB to end of chunk
214 j .Llpcnt
215.Lpgmchk:
216 algr %r5,%r1 # add 128KB to end of chunk
217 lgr %r4,%r5 # potential new chunk
218.Llpcnt:
219 clgr %r5,%r9 # should we go on?
220 jl .Lloop
221.Ldonemem:
222
223 larl %r12,machine_flags 68 larl %r12,machine_flags
224# 69#
225# find out if we are running under VM
226#
227 stidp __LC_CPUID # store cpuid
228 tm __LC_CPUID,0xff # running under VM ?
229 bno 0f-.LPG1(%r13)
230 oi 7(%r12),1 # set VM flag
2310: lh %r0,__LC_CPUID+4 # get cpu version
232 chi %r0,0x7490 # running on a P/390 ?
233 bne 1f-.LPG1(%r13)
234 oi 7(%r12),4 # set P/390 flag
2351:
236
237#
238# find out if we have the MVPG instruction 70# find out if we have the MVPG instruction
239# 71#
240 la %r1,0f-.LPG1(%r13) # set program check address 72 la %r1,0f-.LPG1(%r13) # set program check address
@@ -322,40 +154,9 @@ startup_continue:
322.Lparmaddr: 154.Lparmaddr:
323 .quad PARMAREA 155 .quad PARMAREA
324 156
325 .globl ipl_schib
326ipl_schib:
327 .rept 13
328 .long 0
329 .endr
330
331 .globl ipl_flags
332ipl_flags:
333 .long 0
334 .globl ipl_devno
335ipl_devno:
336 .word 0
337
338 .org 0x12000 157 .org 0x12000
339.globl s390_readinfo_sccb 158 .globl _ehead
340s390_readinfo_sccb: 159_ehead:
341.Lsccb:
342 .hword 0x1000 # length, one page
343 .byte 0x00,0x00,0x00
344 .byte 0x80 # variable response bit set
345.Lsccbr:
346 .hword 0x00 # response code
347.Lscpincr1:
348 .hword 0x00
349.Lscpa1:
350 .byte 0x00
351 .fill 89,1,0
352.Lscpa2:
353 .int 0x00
354.Lscpincr2:
355 .quad 0x00
356 .fill 3984,1,0
357 .org 0x13000
358
359#ifdef CONFIG_SHARED_KERNEL 160#ifdef CONFIG_SHARED_KERNEL
360 .org 0x100000 161 .org 0x100000
361#endif 162#endif
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 9e9972e8a52b..5a863a3bf10c 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -14,32 +14,41 @@
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16#include <linux/ctype.h> 16#include <linux/ctype.h>
17#include <asm/ipl.h>
17#include <asm/smp.h> 18#include <asm/smp.h>
18#include <asm/setup.h> 19#include <asm/setup.h>
19#include <asm/cpcmd.h> 20#include <asm/cpcmd.h>
20#include <asm/cio.h> 21#include <asm/cio.h>
21#include <asm/ebcdic.h> 22#include <asm/ebcdic.h>
22#include <asm/reset.h> 23#include <asm/reset.h>
24#include <asm/sclp.h>
23 25
24#define IPL_PARM_BLOCK_VERSION 0 26#define IPL_PARM_BLOCK_VERSION 0
25#define LOADPARM_LEN 8
26 27
27extern char s390_readinfo_sccb[]; 28#define SCCB_VALID (s390_readinfo_sccb.header.response_code == 0x10)
28#define SCCB_VALID (*((__u16*)&s390_readinfo_sccb[6]) == 0x0010) 29#define SCCB_LOADPARM (&s390_readinfo_sccb.loadparm)
29#define SCCB_LOADPARM (&s390_readinfo_sccb[24]) 30#define SCCB_FLAG (s390_readinfo_sccb.flags)
30#define SCCB_FLAG (s390_readinfo_sccb[91])
31 31
32enum ipl_type { 32enum ipl_type {
33 IPL_TYPE_NONE = 1, 33 IPL_TYPE_NONE = 1,
34 IPL_TYPE_UNKNOWN = 2, 34 IPL_TYPE_UNKNOWN = 2,
35 IPL_TYPE_CCW = 4, 35 IPL_TYPE_CCW = 4,
36 IPL_TYPE_FCP = 8, 36 IPL_TYPE_FCP = 8,
37 IPL_TYPE_NSS = 16,
37}; 38};
38 39
39#define IPL_NONE_STR "none" 40#define IPL_NONE_STR "none"
40#define IPL_UNKNOWN_STR "unknown" 41#define IPL_UNKNOWN_STR "unknown"
41#define IPL_CCW_STR "ccw" 42#define IPL_CCW_STR "ccw"
42#define IPL_FCP_STR "fcp" 43#define IPL_FCP_STR "fcp"
44#define IPL_NSS_STR "nss"
45
46/*
47 * Must be in data section since the bss section
48 * is not cleared when these are accessed.
49 */
50u16 ipl_devno __attribute__((__section__(".data"))) = 0;
51u32 ipl_flags __attribute__((__section__(".data"))) = 0;
43 52
44static char *ipl_type_str(enum ipl_type type) 53static char *ipl_type_str(enum ipl_type type)
45{ 54{
@@ -50,6 +59,8 @@ static char *ipl_type_str(enum ipl_type type)
50 return IPL_CCW_STR; 59 return IPL_CCW_STR;
51 case IPL_TYPE_FCP: 60 case IPL_TYPE_FCP:
52 return IPL_FCP_STR; 61 return IPL_FCP_STR;
62 case IPL_TYPE_NSS:
63 return IPL_NSS_STR;
53 case IPL_TYPE_UNKNOWN: 64 case IPL_TYPE_UNKNOWN:
54 default: 65 default:
55 return IPL_UNKNOWN_STR; 66 return IPL_UNKNOWN_STR;
@@ -64,6 +75,7 @@ enum ipl_method {
64 IPL_METHOD_FCP_RO_DIAG, 75 IPL_METHOD_FCP_RO_DIAG,
65 IPL_METHOD_FCP_RW_DIAG, 76 IPL_METHOD_FCP_RW_DIAG,
66 IPL_METHOD_FCP_RO_VM, 77 IPL_METHOD_FCP_RO_VM,
78 IPL_METHOD_NSS,
67}; 79};
68 80
69enum shutdown_action { 81enum shutdown_action {
@@ -86,39 +98,21 @@ static char *shutdown_action_str(enum shutdown_action action)
86 case SHUTDOWN_STOP: 98 case SHUTDOWN_STOP:
87 return SHUTDOWN_STOP_STR; 99 return SHUTDOWN_STOP_STR;
88 default: 100 default:
89 BUG(); 101 return NULL;
90 } 102 }
91} 103}
92 104
93enum diag308_subcode {
94 DIAG308_IPL = 3,
95 DIAG308_DUMP = 4,
96 DIAG308_SET = 5,
97 DIAG308_STORE = 6,
98};
99
100enum diag308_ipl_type {
101 DIAG308_IPL_TYPE_FCP = 0,
102 DIAG308_IPL_TYPE_CCW = 2,
103};
104
105enum diag308_opt {
106 DIAG308_IPL_OPT_IPL = 0x10,
107 DIAG308_IPL_OPT_DUMP = 0x20,
108};
109
110enum diag308_rc {
111 DIAG308_RC_OK = 1,
112};
113
114static int diag308_set_works = 0; 105static int diag308_set_works = 0;
115 106
116static int reipl_capabilities = IPL_TYPE_UNKNOWN; 107static int reipl_capabilities = IPL_TYPE_UNKNOWN;
108
117static enum ipl_type reipl_type = IPL_TYPE_UNKNOWN; 109static enum ipl_type reipl_type = IPL_TYPE_UNKNOWN;
118static enum ipl_method reipl_method = IPL_METHOD_NONE; 110static enum ipl_method reipl_method = IPL_METHOD_NONE;
119static struct ipl_parameter_block *reipl_block_fcp; 111static struct ipl_parameter_block *reipl_block_fcp;
120static struct ipl_parameter_block *reipl_block_ccw; 112static struct ipl_parameter_block *reipl_block_ccw;
121 113
114static char reipl_nss_name[NSS_NAME_SIZE + 1];
115
122static int dump_capabilities = IPL_TYPE_NONE; 116static int dump_capabilities = IPL_TYPE_NONE;
123static enum ipl_type dump_type = IPL_TYPE_NONE; 117static enum ipl_type dump_type = IPL_TYPE_NONE;
124static enum ipl_method dump_method = IPL_METHOD_NONE; 118static enum ipl_method dump_method = IPL_METHOD_NONE;
@@ -127,7 +121,7 @@ static struct ipl_parameter_block *dump_block_ccw;
127 121
128static enum shutdown_action on_panic_action = SHUTDOWN_STOP; 122static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
129 123
130static int diag308(unsigned long subcode, void *addr) 124int diag308(unsigned long subcode, void *addr)
131{ 125{
132 register unsigned long _addr asm("0") = (unsigned long) addr; 126 register unsigned long _addr asm("0") = (unsigned long) addr;
133 register unsigned long _rc asm("1") = 0; 127 register unsigned long _rc asm("1") = 0;
@@ -173,6 +167,24 @@ static struct subsys_attribute sys_##_prefix##_##_name##_attr = \
173 sys_##_prefix##_##_name##_show, \ 167 sys_##_prefix##_##_name##_show, \
174 sys_##_prefix##_##_name##_store); 168 sys_##_prefix##_##_name##_store);
175 169
170#define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\
171static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \
172 char *page) \
173{ \
174 return sprintf(page, _fmt_out, _value); \
175} \
176static ssize_t sys_##_prefix##_##_name##_store(struct subsystem *subsys,\
177 const char *buf, size_t len) \
178{ \
179 if (sscanf(buf, _fmt_in, _value) != 1) \
180 return -EINVAL; \
181 return len; \
182} \
183static struct subsys_attribute sys_##_prefix##_##_name##_attr = \
184 __ATTR(_name,(S_IRUGO | S_IWUSR), \
185 sys_##_prefix##_##_name##_show, \
186 sys_##_prefix##_##_name##_store);
187
176static void make_attrs_ro(struct attribute **attrs) 188static void make_attrs_ro(struct attribute **attrs)
177{ 189{
178 while (*attrs) { 190 while (*attrs) {
@@ -189,6 +201,8 @@ static enum ipl_type ipl_get_type(void)
189{ 201{
190 struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START; 202 struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START;
191 203
204 if (ipl_flags & IPL_NSS_VALID)
205 return IPL_TYPE_NSS;
192 if (!(ipl_flags & IPL_DEVNO_VALID)) 206 if (!(ipl_flags & IPL_DEVNO_VALID))
193 return IPL_TYPE_UNKNOWN; 207 return IPL_TYPE_UNKNOWN;
194 if (!(ipl_flags & IPL_PARMBLOCK_VALID)) 208 if (!(ipl_flags & IPL_PARMBLOCK_VALID))
@@ -324,6 +338,20 @@ static struct attribute_group ipl_ccw_attr_group = {
324 .attrs = ipl_ccw_attrs, 338 .attrs = ipl_ccw_attrs,
325}; 339};
326 340
341/* NSS ipl device attributes */
342
343DEFINE_IPL_ATTR_RO(ipl_nss, name, "%s\n", kernel_nss_name);
344
345static struct attribute *ipl_nss_attrs[] = {
346 &sys_ipl_type_attr.attr,
347 &sys_ipl_nss_name_attr.attr,
348 NULL,
349};
350
351static struct attribute_group ipl_nss_attr_group = {
352 .attrs = ipl_nss_attrs,
353};
354
327/* UNKNOWN ipl device attributes */ 355/* UNKNOWN ipl device attributes */
328 356
329static struct attribute *ipl_unknown_attrs[] = { 357static struct attribute *ipl_unknown_attrs[] = {
@@ -432,6 +460,21 @@ static struct attribute_group reipl_ccw_attr_group = {
432 .attrs = reipl_ccw_attrs, 460 .attrs = reipl_ccw_attrs,
433}; 461};
434 462
463
464/* NSS reipl device attributes */
465
466DEFINE_IPL_ATTR_STR_RW(reipl_nss, name, "%s\n", "%s\n", reipl_nss_name);
467
468static struct attribute *reipl_nss_attrs[] = {
469 &sys_reipl_nss_name_attr.attr,
470 NULL,
471};
472
473static struct attribute_group reipl_nss_attr_group = {
474 .name = IPL_NSS_STR,
475 .attrs = reipl_nss_attrs,
476};
477
435/* reipl type */ 478/* reipl type */
436 479
437static int reipl_set_type(enum ipl_type type) 480static int reipl_set_type(enum ipl_type type)
@@ -454,6 +497,9 @@ static int reipl_set_type(enum ipl_type type)
454 else 497 else
455 reipl_method = IPL_METHOD_FCP_RO_DIAG; 498 reipl_method = IPL_METHOD_FCP_RO_DIAG;
456 break; 499 break;
500 case IPL_TYPE_NSS:
501 reipl_method = IPL_METHOD_NSS;
502 break;
457 default: 503 default:
458 reipl_method = IPL_METHOD_NONE; 504 reipl_method = IPL_METHOD_NONE;
459 } 505 }
@@ -475,6 +521,8 @@ static ssize_t reipl_type_store(struct subsystem *subsys, const char *buf,
475 rc = reipl_set_type(IPL_TYPE_CCW); 521 rc = reipl_set_type(IPL_TYPE_CCW);
476 else if (strncmp(buf, IPL_FCP_STR, strlen(IPL_FCP_STR)) == 0) 522 else if (strncmp(buf, IPL_FCP_STR, strlen(IPL_FCP_STR)) == 0)
477 rc = reipl_set_type(IPL_TYPE_FCP); 523 rc = reipl_set_type(IPL_TYPE_FCP);
524 else if (strncmp(buf, IPL_NSS_STR, strlen(IPL_NSS_STR)) == 0)
525 rc = reipl_set_type(IPL_TYPE_NSS);
478 return (rc != 0) ? rc : len; 526 return (rc != 0) ? rc : len;
479} 527}
480 528
@@ -647,6 +695,10 @@ void do_reipl(void)
647 case IPL_METHOD_FCP_RO_VM: 695 case IPL_METHOD_FCP_RO_VM:
648 __cpcmd("IPL", NULL, 0, NULL); 696 __cpcmd("IPL", NULL, 0, NULL);
649 break; 697 break;
698 case IPL_METHOD_NSS:
699 sprintf(buf, "IPL %s", reipl_nss_name);
700 __cpcmd(buf, NULL, 0, NULL);
701 break;
650 case IPL_METHOD_NONE: 702 case IPL_METHOD_NONE:
651 default: 703 default:
652 if (MACHINE_IS_VM) 704 if (MACHINE_IS_VM)
@@ -733,6 +785,10 @@ static int __init ipl_init(void)
733 case IPL_TYPE_FCP: 785 case IPL_TYPE_FCP:
734 rc = ipl_register_fcp_files(); 786 rc = ipl_register_fcp_files();
735 break; 787 break;
788 case IPL_TYPE_NSS:
789 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
790 &ipl_nss_attr_group);
791 break;
736 default: 792 default:
737 rc = sysfs_create_group(&ipl_subsys.kset.kobj, 793 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
738 &ipl_unknown_attr_group); 794 &ipl_unknown_attr_group);
@@ -755,6 +811,20 @@ static void __init reipl_probe(void)
755 free_page((unsigned long)buffer); 811 free_page((unsigned long)buffer);
756} 812}
757 813
814static int __init reipl_nss_init(void)
815{
816 int rc;
817
818 if (!MACHINE_IS_VM)
819 return 0;
820 rc = sysfs_create_group(&reipl_subsys.kset.kobj, &reipl_nss_attr_group);
821 if (rc)
822 return rc;
823 strncpy(reipl_nss_name, kernel_nss_name, NSS_NAME_SIZE + 1);
824 reipl_capabilities |= IPL_TYPE_NSS;
825 return 0;
826}
827
758static int __init reipl_ccw_init(void) 828static int __init reipl_ccw_init(void)
759{ 829{
760 int rc; 830 int rc;
@@ -837,6 +907,9 @@ static int __init reipl_init(void)
837 rc = reipl_fcp_init(); 907 rc = reipl_fcp_init();
838 if (rc) 908 if (rc)
839 return rc; 909 return rc;
910 rc = reipl_nss_init();
911 if (rc)
912 return rc;
840 rc = reipl_set_type(ipl_get_type()); 913 rc = reipl_set_type(ipl_get_type());
841 if (rc) 914 if (rc)
842 return rc; 915 return rc;
@@ -993,8 +1066,6 @@ static void do_reset_calls(void)
993 reset->fn(); 1066 reset->fn();
994} 1067}
995 1068
996extern void reset_mcck_handler(void);
997extern void reset_pgm_handler(void);
998extern __u32 dump_prefix_page; 1069extern __u32 dump_prefix_page;
999 1070
1000void s390_reset_system(void) 1071void s390_reset_system(void)
@@ -1016,14 +1087,14 @@ void s390_reset_system(void)
1016 __ctl_clear_bit(0,28); 1087 __ctl_clear_bit(0,28);
1017 1088
1018 /* Set new machine check handler */ 1089 /* Set new machine check handler */
1019 S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; 1090 S390_lowcore.mcck_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
1020 S390_lowcore.mcck_new_psw.addr = 1091 S390_lowcore.mcck_new_psw.addr =
1021 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; 1092 PSW_ADDR_AMODE | (unsigned long) s390_base_mcck_handler;
1022 1093
1023 /* Set new program check handler */ 1094 /* Set new program check handler */
1024 S390_lowcore.program_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; 1095 S390_lowcore.program_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
1025 S390_lowcore.program_new_psw.addr = 1096 S390_lowcore.program_new_psw.addr =
1026 PSW_ADDR_AMODE | (unsigned long) &reset_pgm_handler; 1097 PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler;
1027 1098
1028 do_reset_calls(); 1099 do_reset_calls();
1029} 1100}
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 1eef50918615..8f0cbca31203 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * arch/s390/kernel/irq.c 2 * arch/s390/kernel/irq.c
3 * 3 *
4 * S390 version 4 * Copyright IBM Corp. 2004,2007
5 * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), 5 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
6 * Thomas Spatzier (tspat@de.ibm.com)
7 * 7 *
8 * This file contains interrupt related functions. 8 * This file contains interrupt related functions.
9 */ 9 */
@@ -14,6 +14,8 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/seq_file.h> 15#include <linux/seq_file.h>
16#include <linux/cpu.h> 16#include <linux/cpu.h>
17#include <linux/proc_fs.h>
18#include <linux/profile.h>
17 19
18/* 20/*
19 * show_interrupts is needed by /proc/interrupts. 21 * show_interrupts is needed by /proc/interrupts.
@@ -93,5 +95,12 @@ asmlinkage void do_softirq(void)
93 95
94 local_irq_restore(flags); 96 local_irq_restore(flags);
95} 97}
96
97EXPORT_SYMBOL(do_softirq); 98EXPORT_SYMBOL(do_softirq);
99
100void init_irq_proc(void)
101{
102 struct proc_dir_entry *root_irq_dir;
103
104 root_irq_dir = proc_mkdir("irq", NULL);
105 create_prof_cpu_mask(root_irq_dir);
106}
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 576368c4f605..a466bab6677e 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -155,15 +155,34 @@ void __kprobes get_instruction_type(struct arch_specific_insn *ainsn)
155static int __kprobes swap_instruction(void *aref) 155static int __kprobes swap_instruction(void *aref)
156{ 156{
157 struct ins_replace_args *args = aref; 157 struct ins_replace_args *args = aref;
158 u32 *addr;
159 u32 instr;
158 int err = -EFAULT; 160 int err = -EFAULT;
159 161
162 /*
163 * Text segment is read-only, hence we use stura to bypass dynamic
164 * address translation to exchange the instruction. Since stura
165 * always operates on four bytes, but we only want to exchange two
166 * bytes do some calculations to get things right. In addition we
167 * shall not cross any page boundaries (vmalloc area!) when writing
168 * the new instruction.
169 */
170 addr = (u32 *)ALIGN((unsigned long)args->ptr, 4);
171 if ((unsigned long)args->ptr & 2)
172 instr = ((*addr) & 0xffff0000) | args->new;
173 else
174 instr = ((*addr) & 0x0000ffff) | args->new << 16;
175
160 asm volatile( 176 asm volatile(
161 "0: mvc 0(2,%2),0(%3)\n" 177 " lra %1,0(%1)\n"
162 "1: la %0,0\n" 178 "0: stura %2,%1\n"
179 "1: la %0,0\n"
163 "2:\n" 180 "2:\n"
164 EX_TABLE(0b,2b) 181 EX_TABLE(0b,2b)
165 : "+d" (err), "=m" (*args->ptr) 182 : "+d" (err)
166 : "a" (args->ptr), "a" (&args->new), "m" (args->new)); 183 : "a" (addr), "d" (instr)
184 : "memory", "cc");
185
167 return err; 186 return err;
168} 187}
169 188
@@ -356,7 +375,7 @@ no_kprobe:
356 * - When the probed function returns, this probe 375 * - When the probed function returns, this probe
357 * causes the handlers to fire 376 * causes the handlers to fire
358 */ 377 */
359void __kprobes kretprobe_trampoline_holder(void) 378void kretprobe_trampoline_holder(void)
360{ 379{
361 asm volatile(".global kretprobe_trampoline\n" 380 asm volatile(".global kretprobe_trampoline\n"
362 "kretprobe_trampoline: bcr 0,0\n"); 381 "kretprobe_trampoline: bcr 0,0\n");
@@ -365,7 +384,8 @@ void __kprobes kretprobe_trampoline_holder(void)
365/* 384/*
366 * Called when the probe at kretprobe trampoline is hit 385 * Called when the probe at kretprobe trampoline is hit
367 */ 386 */
368int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) 387static int __kprobes trampoline_probe_handler(struct kprobe *p,
388 struct pt_regs *regs)
369{ 389{
370 struct kretprobe_instance *ri = NULL; 390 struct kretprobe_instance *ri = NULL;
371 struct hlist_head *head, empty_rp; 391 struct hlist_head *head, empty_rp;
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index f6d9bcc0f75b..52f57af252b4 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -11,6 +11,7 @@
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/kexec.h> 12#include <linux/kexec.h>
13#include <linux/delay.h> 13#include <linux/delay.h>
14#include <linux/reboot.h>
14#include <asm/cio.h> 15#include <asm/cio.h>
15#include <asm/setup.h> 16#include <asm/setup.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index d989ed45a7aa..39d1dd752529 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -30,6 +30,7 @@
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/moduleloader.h>
33 34
34#if 0 35#if 0
35#define DEBUGP printk 36#define DEBUGP printk
@@ -58,7 +59,7 @@ void module_free(struct module *mod, void *module_region)
58 table entries. */ 59 table entries. */
59} 60}
60 61
61static inline void 62static void
62check_rela(Elf_Rela *rela, struct module *me) 63check_rela(Elf_Rela *rela, struct module *me)
63{ 64{
64 struct mod_arch_syminfo *info; 65 struct mod_arch_syminfo *info;
@@ -181,7 +182,7 @@ apply_relocate(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex,
181 return -ENOEXEC; 182 return -ENOEXEC;
182} 183}
183 184
184static inline int 185static int
185apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab, 186apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
186 struct module *me) 187 struct module *me)
187{ 188{
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 6603fbb41d07..5acfac654f9d 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -144,7 +144,7 @@ static void default_idle(void)
144 144
145 trace_hardirqs_on(); 145 trace_hardirqs_on();
146 /* Wait for external, I/O or machine check interrupt. */ 146 /* Wait for external, I/O or machine check interrupt. */
147 __load_psw_mask(PSW_KERNEL_BITS | PSW_MASK_WAIT | 147 __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
148 PSW_MASK_IO | PSW_MASK_EXT); 148 PSW_MASK_IO | PSW_MASK_EXT);
149} 149}
150 150
@@ -190,7 +190,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
190 struct pt_regs regs; 190 struct pt_regs regs;
191 191
192 memset(&regs, 0, sizeof(regs)); 192 memset(&regs, 0, sizeof(regs));
193 regs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_IO | PSW_MASK_EXT; 193 regs.psw.mask = psw_kernel_bits | PSW_MASK_IO | PSW_MASK_EXT;
194 regs.psw.addr = (unsigned long) kernel_thread_starter | PSW_ADDR_AMODE; 194 regs.psw.addr = (unsigned long) kernel_thread_starter | PSW_ADDR_AMODE;
195 regs.gprs[9] = (unsigned long) fn; 195 regs.gprs[9] = (unsigned long) fn;
196 regs.gprs[10] = (unsigned long) arg; 196 regs.gprs[10] = (unsigned long) arg;
diff --git a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c
deleted file mode 100644
index b81aa1f569ca..000000000000
--- a/arch/s390/kernel/profile.c
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * arch/s390/kernel/profile.c
3 *
4 * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
5 * Author(s): Thomas Spatzier (tspat@de.ibm.com)
6 *
7 */
8#include <linux/proc_fs.h>
9#include <linux/profile.h>
10
11static struct proc_dir_entry * root_irq_dir;
12
13void init_irq_proc(void)
14{
15 /* create /proc/irq */
16 root_irq_dir = proc_mkdir("irq", NULL);
17
18 /* create /proc/irq/prof_cpu_mask */
19 create_prof_cpu_mask(root_irq_dir);
20}
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 8f36504075ed..2a8f0872ea8b 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -86,15 +86,13 @@ FixPerRegisters(struct task_struct *task)
86 per_info->control_regs.bits.storage_alt_space_ctl = 0; 86 per_info->control_regs.bits.storage_alt_space_ctl = 0;
87} 87}
88 88
89void 89static void set_single_step(struct task_struct *task)
90set_single_step(struct task_struct *task)
91{ 90{
92 task->thread.per_info.single_step = 1; 91 task->thread.per_info.single_step = 1;
93 FixPerRegisters(task); 92 FixPerRegisters(task);
94} 93}
95 94
96void 95static void clear_single_step(struct task_struct *task)
97clear_single_step(struct task_struct *task)
98{ 96{
99 task->thread.per_info.single_step = 0; 97 task->thread.per_info.single_step = 0;
100 FixPerRegisters(task); 98 FixPerRegisters(task);
@@ -232,9 +230,9 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
232 */ 230 */
233 if (addr == (addr_t) &dummy->regs.psw.mask && 231 if (addr == (addr_t) &dummy->regs.psw.mask &&
234#ifdef CONFIG_COMPAT 232#ifdef CONFIG_COMPAT
235 data != PSW_MASK_MERGE(PSW_USER32_BITS, data) && 233 data != PSW_MASK_MERGE(psw_user32_bits, data) &&
236#endif 234#endif
237 data != PSW_MASK_MERGE(PSW_USER_BITS, data)) 235 data != PSW_MASK_MERGE(psw_user_bits, data))
238 /* Invalid psw mask. */ 236 /* Invalid psw mask. */
239 return -EINVAL; 237 return -EINVAL;
240#ifndef CONFIG_64BIT 238#ifndef CONFIG_64BIT
@@ -309,7 +307,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
309 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 307 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
310 if (copied != sizeof(tmp)) 308 if (copied != sizeof(tmp))
311 return -EIO; 309 return -EIO;
312 return put_user(tmp, (unsigned long __user *) data); 310 return put_user(tmp, (unsigned long __force __user *) data);
313 311
314 case PTRACE_PEEKUSR: 312 case PTRACE_PEEKUSR:
315 /* read the word at location addr in the USER area. */ 313 /* read the word at location addr in the USER area. */
@@ -331,7 +329,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
331 329
332 case PTRACE_PEEKUSR_AREA: 330 case PTRACE_PEEKUSR_AREA:
333 case PTRACE_POKEUSR_AREA: 331 case PTRACE_POKEUSR_AREA:
334 if (copy_from_user(&parea, (void __user *) addr, 332 if (copy_from_user(&parea, (void __force __user *) addr,
335 sizeof(parea))) 333 sizeof(parea)))
336 return -EFAULT; 334 return -EFAULT;
337 addr = parea.kernel_addr; 335 addr = parea.kernel_addr;
@@ -341,10 +339,11 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
341 if (request == PTRACE_PEEKUSR_AREA) 339 if (request == PTRACE_PEEKUSR_AREA)
342 ret = peek_user(child, addr, data); 340 ret = peek_user(child, addr, data);
343 else { 341 else {
344 addr_t tmp; 342 addr_t utmp;
345 if (get_user (tmp, (addr_t __user *) data)) 343 if (get_user(utmp,
344 (addr_t __force __user *) data))
346 return -EFAULT; 345 return -EFAULT;
347 ret = poke_user(child, addr, tmp); 346 ret = poke_user(child, addr, utmp);
348 } 347 }
349 if (ret) 348 if (ret)
350 return ret; 349 return ret;
@@ -394,7 +393,7 @@ peek_user_emu31(struct task_struct *child, addr_t addr, addr_t data)
394 if (addr == (addr_t) &dummy32->regs.psw.mask) { 393 if (addr == (addr_t) &dummy32->regs.psw.mask) {
395 /* Fake a 31 bit psw mask. */ 394 /* Fake a 31 bit psw mask. */
396 tmp = (__u32)(task_pt_regs(child)->psw.mask >> 32); 395 tmp = (__u32)(task_pt_regs(child)->psw.mask >> 32);
397 tmp = PSW32_MASK_MERGE(PSW32_USER_BITS, tmp); 396 tmp = PSW32_MASK_MERGE(psw32_user_bits, tmp);
398 } else if (addr == (addr_t) &dummy32->regs.psw.addr) { 397 } else if (addr == (addr_t) &dummy32->regs.psw.addr) {
399 /* Fake a 31 bit psw address. */ 398 /* Fake a 31 bit psw address. */
400 tmp = (__u32) task_pt_regs(child)->psw.addr | 399 tmp = (__u32) task_pt_regs(child)->psw.addr |
@@ -469,11 +468,11 @@ poke_user_emu31(struct task_struct *child, addr_t addr, addr_t data)
469 */ 468 */
470 if (addr == (addr_t) &dummy32->regs.psw.mask) { 469 if (addr == (addr_t) &dummy32->regs.psw.mask) {
471 /* Build a 64 bit psw mask from 31 bit mask. */ 470 /* Build a 64 bit psw mask from 31 bit mask. */
472 if (tmp != PSW32_MASK_MERGE(PSW32_USER_BITS, tmp)) 471 if (tmp != PSW32_MASK_MERGE(psw32_user_bits, tmp))
473 /* Invalid psw mask. */ 472 /* Invalid psw mask. */
474 return -EINVAL; 473 return -EINVAL;
475 task_pt_regs(child)->psw.mask = 474 task_pt_regs(child)->psw.mask =
476 PSW_MASK_MERGE(PSW_USER32_BITS, (__u64) tmp << 32); 475 PSW_MASK_MERGE(psw_user32_bits, (__u64) tmp << 32);
477 } else if (addr == (addr_t) &dummy32->regs.psw.addr) { 476 } else if (addr == (addr_t) &dummy32->regs.psw.addr) {
478 /* Build a 64 bit psw address from 31 bit address. */ 477 /* Build a 64 bit psw address from 31 bit address. */
479 task_pt_regs(child)->psw.addr = 478 task_pt_regs(child)->psw.addr =
@@ -550,7 +549,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
550 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 549 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
551 if (copied != sizeof(tmp)) 550 if (copied != sizeof(tmp))
552 return -EIO; 551 return -EIO;
553 return put_user(tmp, (unsigned int __user *) data); 552 return put_user(tmp, (unsigned int __force __user *) data);
554 553
555 case PTRACE_PEEKUSR: 554 case PTRACE_PEEKUSR:
556 /* read the word at location addr in the USER area. */ 555 /* read the word at location addr in the USER area. */
@@ -571,7 +570,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
571 570
572 case PTRACE_PEEKUSR_AREA: 571 case PTRACE_PEEKUSR_AREA:
573 case PTRACE_POKEUSR_AREA: 572 case PTRACE_POKEUSR_AREA:
574 if (copy_from_user(&parea, (void __user *) addr, 573 if (copy_from_user(&parea, (void __force __user *) addr,
575 sizeof(parea))) 574 sizeof(parea)))
576 return -EFAULT; 575 return -EFAULT;
577 addr = parea.kernel_addr; 576 addr = parea.kernel_addr;
@@ -581,10 +580,11 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
581 if (request == PTRACE_PEEKUSR_AREA) 580 if (request == PTRACE_PEEKUSR_AREA)
582 ret = peek_user_emu31(child, addr, data); 581 ret = peek_user_emu31(child, addr, data);
583 else { 582 else {
584 __u32 tmp; 583 __u32 utmp;
585 if (get_user (tmp, (__u32 __user *) data)) 584 if (get_user(utmp,
585 (__u32 __force __user *) data))
586 return -EFAULT; 586 return -EFAULT;
587 ret = poke_user_emu31(child, addr, tmp); 587 ret = poke_user_emu31(child, addr, utmp);
588 } 588 }
589 if (ret) 589 if (ret)
590 return ret; 590 return ret;
@@ -595,17 +595,19 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
595 return 0; 595 return 0;
596 case PTRACE_GETEVENTMSG: 596 case PTRACE_GETEVENTMSG:
597 return put_user((__u32) child->ptrace_message, 597 return put_user((__u32) child->ptrace_message,
598 (unsigned int __user *) data); 598 (unsigned int __force __user *) data);
599 case PTRACE_GETSIGINFO: 599 case PTRACE_GETSIGINFO:
600 if (child->last_siginfo == NULL) 600 if (child->last_siginfo == NULL)
601 return -EINVAL; 601 return -EINVAL;
602 return copy_siginfo_to_user32((compat_siginfo_t __user *) data, 602 return copy_siginfo_to_user32((compat_siginfo_t
603 __force __user *) data,
603 child->last_siginfo); 604 child->last_siginfo);
604 case PTRACE_SETSIGINFO: 605 case PTRACE_SETSIGINFO:
605 if (child->last_siginfo == NULL) 606 if (child->last_siginfo == NULL)
606 return -EINVAL; 607 return -EINVAL;
607 return copy_siginfo_from_user32(child->last_siginfo, 608 return copy_siginfo_from_user32(child->last_siginfo,
608 (compat_siginfo_t __user *) data); 609 (compat_siginfo_t
610 __force __user *) data);
609 } 611 }
610 return ptrace_request(child, request, addr, data); 612 return ptrace_request(child, request, addr, data);
611} 613}
diff --git a/arch/s390/kernel/reset.S b/arch/s390/kernel/reset.S
deleted file mode 100644
index 8a87355161fa..000000000000
--- a/arch/s390/kernel/reset.S
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * arch/s390/kernel/reset.S
3 *
4 * Copyright (C) IBM Corp. 2006
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 * Michael Holzheu <holzheu@de.ibm.com>
7 */
8
9#include <asm/ptrace.h>
10#include <asm/lowcore.h>
11
12#ifdef CONFIG_64BIT
13
14 .globl reset_mcck_handler
15reset_mcck_handler:
16 basr %r13,0
170: lg %r15,__LC_PANIC_STACK # load panic stack
18 aghi %r15,-STACK_FRAME_OVERHEAD
19 lg %r1,s390_reset_mcck_handler-0b(%r13)
20 ltgr %r1,%r1
21 jz 1f
22 basr %r14,%r1
231: la %r1,4095
24 lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)
25 lpswe __LC_MCK_OLD_PSW
26
27 .globl s390_reset_mcck_handler
28s390_reset_mcck_handler:
29 .quad 0
30
31 .globl reset_pgm_handler
32reset_pgm_handler:
33 stmg %r0,%r15,__LC_SAVE_AREA
34 basr %r13,0
350: lg %r15,__LC_PANIC_STACK # load panic stack
36 aghi %r15,-STACK_FRAME_OVERHEAD
37 lg %r1,s390_reset_pgm_handler-0b(%r13)
38 ltgr %r1,%r1
39 jz 1f
40 basr %r14,%r1
41 lmg %r0,%r15,__LC_SAVE_AREA
42 lpswe __LC_PGM_OLD_PSW
431: lpswe disabled_wait_psw-0b(%r13)
44 .globl s390_reset_pgm_handler
45s390_reset_pgm_handler:
46 .quad 0
47 .align 8
48disabled_wait_psw:
49 .quad 0x0002000180000000,0x0000000000000000 + reset_pgm_handler
50
51#else /* CONFIG_64BIT */
52
53 .globl reset_mcck_handler
54reset_mcck_handler:
55 basr %r13,0
560: l %r15,__LC_PANIC_STACK # load panic stack
57 ahi %r15,-STACK_FRAME_OVERHEAD
58 l %r1,s390_reset_mcck_handler-0b(%r13)
59 ltr %r1,%r1
60 jz 1f
61 basr %r14,%r1
621: lm %r0,%r15,__LC_GPREGS_SAVE_AREA
63 lpsw __LC_MCK_OLD_PSW
64
65 .globl s390_reset_mcck_handler
66s390_reset_mcck_handler:
67 .long 0
68
69 .globl reset_pgm_handler
70reset_pgm_handler:
71 stm %r0,%r15,__LC_SAVE_AREA
72 basr %r13,0
730: l %r15,__LC_PANIC_STACK # load panic stack
74 ahi %r15,-STACK_FRAME_OVERHEAD
75 l %r1,s390_reset_pgm_handler-0b(%r13)
76 ltr %r1,%r1
77 jz 1f
78 basr %r14,%r1
79 lm %r0,%r15,__LC_SAVE_AREA
80 lpsw __LC_PGM_OLD_PSW
81
821: lpsw disabled_wait_psw-0b(%r13)
83 .globl s390_reset_pgm_handler
84s390_reset_pgm_handler:
85 .long 0
86disabled_wait_psw:
87 .align 8
88 .long 0x000a0000,0x00000000 + reset_pgm_handler
89
90#endif /* CONFIG_64BIT */
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index bc5beaa8f98e..acf93dba7727 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -125,14 +125,12 @@ void do_extint(struct pt_regs *regs, unsigned short code)
125 * Make sure that the i/o interrupt did not "overtake" 125 * Make sure that the i/o interrupt did not "overtake"
126 * the last HZ timer interrupt. 126 * the last HZ timer interrupt.
127 */ 127 */
128 account_ticks(); 128 account_ticks(S390_lowcore.int_clock);
129 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 129 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
130 index = ext_hash(code); 130 index = ext_hash(code);
131 for (p = ext_int_hash[index]; p; p = p->next) { 131 for (p = ext_int_hash[index]; p; p = p->next) {
132 if (likely(p->code == code)) { 132 if (likely(p->code == code))
133 if (likely(p->handler)) 133 p->handler(code);
134 p->handler(code);
135 }
136 } 134 }
137 irq_exit(); 135 irq_exit();
138 set_irq_regs(old_regs); 136 set_irq_regs(old_regs);
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 5d8ee3baac14..863c8d08c026 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -38,7 +38,10 @@
38#include <linux/device.h> 38#include <linux/device.h>
39#include <linux/notifier.h> 39#include <linux/notifier.h>
40#include <linux/pfn.h> 40#include <linux/pfn.h>
41#include <linux/ctype.h>
42#include <linux/reboot.h>
41 43
44#include <asm/ipl.h>
42#include <asm/uaccess.h> 45#include <asm/uaccess.h>
43#include <asm/system.h> 46#include <asm/system.h>
44#include <asm/smp.h> 47#include <asm/smp.h>
@@ -49,6 +52,14 @@
49#include <asm/page.h> 52#include <asm/page.h>
50#include <asm/ptrace.h> 53#include <asm/ptrace.h>
51#include <asm/sections.h> 54#include <asm/sections.h>
55#include <asm/ebcdic.h>
56#include <asm/compat.h>
57
58long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY |
59 PSW_MASK_MCHECK | PSW_DEFAULT_KEY);
60long psw_user_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME |
61 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
62 PSW_MASK_PSTATE | PSW_DEFAULT_KEY);
52 63
53/* 64/*
54 * User copy operations. 65 * User copy operations.
@@ -96,7 +107,7 @@ void __devinit cpu_init (void)
96 /* 107 /*
97 * Store processor id in lowcore (used e.g. in timer_interrupt) 108 * Store processor id in lowcore (used e.g. in timer_interrupt)
98 */ 109 */
99 asm volatile("stidp %0": "=m" (S390_lowcore.cpu_data.cpu_id)); 110 get_cpu_id(&S390_lowcore.cpu_data.cpu_id);
100 S390_lowcore.cpu_data.cpu_addr = addr; 111 S390_lowcore.cpu_data.cpu_addr = addr;
101 112
102 /* 113 /*
@@ -117,9 +128,9 @@ void __devinit cpu_init (void)
117 */ 128 */
118char vmhalt_cmd[128] = ""; 129char vmhalt_cmd[128] = "";
119char vmpoff_cmd[128] = ""; 130char vmpoff_cmd[128] = "";
120char vmpanic_cmd[128] = ""; 131static char vmpanic_cmd[128] = "";
121 132
122static inline void strncpy_skip_quote(char *dst, char *src, int n) 133static void strncpy_skip_quote(char *dst, char *src, int n)
123{ 134{
124 int sx, dx; 135 int sx, dx;
125 136
@@ -275,10 +286,6 @@ static void __init conmode_default(void)
275} 286}
276 287
277#ifdef CONFIG_SMP 288#ifdef CONFIG_SMP
278extern void machine_restart_smp(char *);
279extern void machine_halt_smp(void);
280extern void machine_power_off_smp(void);
281
282void (*_machine_restart)(char *command) = machine_restart_smp; 289void (*_machine_restart)(char *command) = machine_restart_smp;
283void (*_machine_halt)(void) = machine_halt_smp; 290void (*_machine_halt)(void) = machine_halt_smp;
284void (*_machine_power_off)(void) = machine_power_off_smp; 291void (*_machine_power_off)(void) = machine_power_off_smp;
@@ -386,6 +393,84 @@ static int __init early_parse_ipldelay(char *p)
386} 393}
387early_param("ipldelay", early_parse_ipldelay); 394early_param("ipldelay", early_parse_ipldelay);
388 395
396#ifdef CONFIG_S390_SWITCH_AMODE
397unsigned int switch_amode = 0;
398EXPORT_SYMBOL_GPL(switch_amode);
399
400static void set_amode_and_uaccess(unsigned long user_amode,
401 unsigned long user32_amode)
402{
403 psw_user_bits = PSW_BASE_BITS | PSW_MASK_DAT | user_amode |
404 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
405 PSW_MASK_PSTATE | PSW_DEFAULT_KEY;
406#ifdef CONFIG_COMPAT
407 psw_user32_bits = PSW_BASE32_BITS | PSW_MASK_DAT | user_amode |
408 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
409 PSW_MASK_PSTATE | PSW_DEFAULT_KEY;
410 psw32_user_bits = PSW32_BASE_BITS | PSW32_MASK_DAT | user32_amode |
411 PSW32_MASK_IO | PSW32_MASK_EXT | PSW32_MASK_MCHECK |
412 PSW32_MASK_PSTATE;
413#endif
414 psw_kernel_bits = PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME |
415 PSW_MASK_MCHECK | PSW_DEFAULT_KEY;
416
417 if (MACHINE_HAS_MVCOS) {
418 printk("mvcos available.\n");
419 memcpy(&uaccess, &uaccess_mvcos_switch, sizeof(uaccess));
420 } else {
421 printk("mvcos not available.\n");
422 memcpy(&uaccess, &uaccess_pt, sizeof(uaccess));
423 }
424}
425
426/*
427 * Switch kernel/user addressing modes?
428 */
429static int __init early_parse_switch_amode(char *p)
430{
431 switch_amode = 1;
432 return 0;
433}
434early_param("switch_amode", early_parse_switch_amode);
435
436#else /* CONFIG_S390_SWITCH_AMODE */
437static inline void set_amode_and_uaccess(unsigned long user_amode,
438 unsigned long user32_amode)
439{
440}
441#endif /* CONFIG_S390_SWITCH_AMODE */
442
443#ifdef CONFIG_S390_EXEC_PROTECT
444unsigned int s390_noexec = 0;
445EXPORT_SYMBOL_GPL(s390_noexec);
446
447/*
448 * Enable execute protection?
449 */
450static int __init early_parse_noexec(char *p)
451{
452 if (!strncmp(p, "off", 3))
453 return 0;
454 switch_amode = 1;
455 s390_noexec = 1;
456 return 0;
457}
458early_param("noexec", early_parse_noexec);
459#endif /* CONFIG_S390_EXEC_PROTECT */
460
461static void setup_addressing_mode(void)
462{
463 if (s390_noexec) {
464 printk("S390 execute protection active, ");
465 set_amode_and_uaccess(PSW_ASC_SECONDARY, PSW32_ASC_SECONDARY);
466 return;
467 }
468 if (switch_amode) {
469 printk("S390 address spaces switched, ");
470 set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY);
471 }
472}
473
389static void __init 474static void __init
390setup_lowcore(void) 475setup_lowcore(void)
391{ 476{
@@ -402,19 +487,21 @@ setup_lowcore(void)
402 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; 487 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY;
403 lc->restart_psw.addr = 488 lc->restart_psw.addr =
404 PSW_ADDR_AMODE | (unsigned long) restart_int_handler; 489 PSW_ADDR_AMODE | (unsigned long) restart_int_handler;
405 lc->external_new_psw.mask = PSW_KERNEL_BITS; 490 if (switch_amode)
491 lc->restart_psw.mask |= PSW_ASC_HOME;
492 lc->external_new_psw.mask = psw_kernel_bits;
406 lc->external_new_psw.addr = 493 lc->external_new_psw.addr =
407 PSW_ADDR_AMODE | (unsigned long) ext_int_handler; 494 PSW_ADDR_AMODE | (unsigned long) ext_int_handler;
408 lc->svc_new_psw.mask = PSW_KERNEL_BITS | PSW_MASK_IO | PSW_MASK_EXT; 495 lc->svc_new_psw.mask = psw_kernel_bits | PSW_MASK_IO | PSW_MASK_EXT;
409 lc->svc_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) system_call; 496 lc->svc_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) system_call;
410 lc->program_new_psw.mask = PSW_KERNEL_BITS; 497 lc->program_new_psw.mask = psw_kernel_bits;
411 lc->program_new_psw.addr = 498 lc->program_new_psw.addr =
412 PSW_ADDR_AMODE | (unsigned long)pgm_check_handler; 499 PSW_ADDR_AMODE | (unsigned long)pgm_check_handler;
413 lc->mcck_new_psw.mask = 500 lc->mcck_new_psw.mask =
414 PSW_KERNEL_BITS & ~PSW_MASK_MCHECK & ~PSW_MASK_DAT; 501 psw_kernel_bits & ~PSW_MASK_MCHECK & ~PSW_MASK_DAT;
415 lc->mcck_new_psw.addr = 502 lc->mcck_new_psw.addr =
416 PSW_ADDR_AMODE | (unsigned long) mcck_int_handler; 503 PSW_ADDR_AMODE | (unsigned long) mcck_int_handler;
417 lc->io_new_psw.mask = PSW_KERNEL_BITS; 504 lc->io_new_psw.mask = psw_kernel_bits;
418 lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler; 505 lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler;
419 lc->ipl_device = S390_lowcore.ipl_device; 506 lc->ipl_device = S390_lowcore.ipl_device;
420 lc->jiffy_timer = -1LL; 507 lc->jiffy_timer = -1LL;
@@ -439,7 +526,7 @@ setup_lowcore(void)
439static void __init 526static void __init
440setup_resources(void) 527setup_resources(void)
441{ 528{
442 struct resource *res; 529 struct resource *res, *sub_res;
443 int i; 530 int i;
444 531
445 code_resource.start = (unsigned long) &_text; 532 code_resource.start = (unsigned long) &_text;
@@ -464,8 +551,38 @@ setup_resources(void)
464 res->start = memory_chunk[i].addr; 551 res->start = memory_chunk[i].addr;
465 res->end = memory_chunk[i].addr + memory_chunk[i].size - 1; 552 res->end = memory_chunk[i].addr + memory_chunk[i].size - 1;
466 request_resource(&iomem_resource, res); 553 request_resource(&iomem_resource, res);
467 request_resource(res, &code_resource); 554
468 request_resource(res, &data_resource); 555 if (code_resource.start >= res->start &&
556 code_resource.start <= res->end &&
557 code_resource.end > res->end) {
558 sub_res = alloc_bootmem_low(sizeof(struct resource));
559 memcpy(sub_res, &code_resource,
560 sizeof(struct resource));
561 sub_res->end = res->end;
562 code_resource.start = res->end + 1;
563 request_resource(res, sub_res);
564 }
565
566 if (code_resource.start >= res->start &&
567 code_resource.start <= res->end &&
568 code_resource.end <= res->end)
569 request_resource(res, &code_resource);
570
571 if (data_resource.start >= res->start &&
572 data_resource.start <= res->end &&
573 data_resource.end > res->end) {
574 sub_res = alloc_bootmem_low(sizeof(struct resource));
575 memcpy(sub_res, &data_resource,
576 sizeof(struct resource));
577 sub_res->end = res->end;
578 data_resource.start = res->end + 1;
579 request_resource(res, sub_res);
580 }
581
582 if (data_resource.start >= res->start &&
583 data_resource.start <= res->end &&
584 data_resource.end <= res->end)
585 request_resource(res, &data_resource);
469 } 586 }
470} 587}
471 588
@@ -495,16 +612,13 @@ static void __init setup_memory_end(void)
495 } 612 }
496 if (!memory_end) 613 if (!memory_end)
497 memory_end = memory_size; 614 memory_end = memory_size;
498 if (real_size > memory_end)
499 printk("More memory detected than supported. Unused: %luk\n",
500 (real_size - memory_end) >> 10);
501} 615}
502 616
503static void __init 617static void __init
504setup_memory(void) 618setup_memory(void)
505{ 619{
506 unsigned long bootmap_size; 620 unsigned long bootmap_size;
507 unsigned long start_pfn, end_pfn, init_pfn; 621 unsigned long start_pfn, end_pfn;
508 int i; 622 int i;
509 623
510 /* 624 /*
@@ -514,10 +628,6 @@ setup_memory(void)
514 start_pfn = PFN_UP(__pa(&_end)); 628 start_pfn = PFN_UP(__pa(&_end));
515 end_pfn = max_pfn = PFN_DOWN(memory_end); 629 end_pfn = max_pfn = PFN_DOWN(memory_end);
516 630
517 /* Initialize storage key for kernel pages */
518 for (init_pfn = 0 ; init_pfn < start_pfn; init_pfn++)
519 page_set_storage_key(init_pfn << PAGE_SHIFT, PAGE_DEFAULT_KEY);
520
521#ifdef CONFIG_BLK_DEV_INITRD 631#ifdef CONFIG_BLK_DEV_INITRD
522 /* 632 /*
523 * Move the initrd in case the bitmap of the bootmem allocater 633 * Move the initrd in case the bitmap of the bootmem allocater
@@ -580,9 +690,14 @@ setup_memory(void)
580 psw_set_key(PAGE_DEFAULT_KEY); 690 psw_set_key(PAGE_DEFAULT_KEY);
581 691
582 free_bootmem_with_active_regions(0, max_pfn); 692 free_bootmem_with_active_regions(0, max_pfn);
583 reserve_bootmem(0, PFN_PHYS(start_pfn));
584 693
585 /* 694 /*
695 * Reserve memory used for lowcore/command line/kernel image.
696 */
697 reserve_bootmem(0, (unsigned long)_ehead);
698 reserve_bootmem((unsigned long)_stext,
699 PFN_PHYS(start_pfn) - (unsigned long)_stext);
700 /*
586 * Reserve the bootmem bitmap itself as well. We do this in two 701 * Reserve the bootmem bitmap itself as well. We do this in two
587 * steps (first step was init_bootmem()) because this catches 702 * steps (first step was init_bootmem()) because this catches
588 * the (very unlikely) case of us accidentally initializing the 703 * the (very unlikely) case of us accidentally initializing the
@@ -631,7 +746,7 @@ setup_arch(char **cmdline_p)
631#endif /* CONFIG_64BIT */ 746#endif /* CONFIG_64BIT */
632 747
633 /* Save unparsed command line copy for /proc/cmdline */ 748 /* Save unparsed command line copy for /proc/cmdline */
634 strlcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); 749 strlcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
635 750
636 *cmdline_p = COMMAND_LINE; 751 *cmdline_p = COMMAND_LINE;
637 *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0'; 752 *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0';
@@ -651,6 +766,7 @@ setup_arch(char **cmdline_p)
651 parse_early_param(); 766 parse_early_param();
652 767
653 setup_memory_end(); 768 setup_memory_end();
769 setup_addressing_mode();
654 setup_memory(); 770 setup_memory();
655 setup_resources(); 771 setup_resources();
656 setup_lowcore(); 772 setup_lowcore();
@@ -694,6 +810,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
694 struct cpuinfo_S390 *cpuinfo; 810 struct cpuinfo_S390 *cpuinfo;
695 unsigned long n = (unsigned long) v - 1; 811 unsigned long n = (unsigned long) v - 1;
696 812
813 s390_adjust_jiffies();
697 preempt_disable(); 814 preempt_disable();
698 if (!n) { 815 if (!n) {
699 seq_printf(m, "vendor_id : IBM/S390\n" 816 seq_printf(m, "vendor_id : IBM/S390\n"
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 4c8a7954ef48..554f9cf7499c 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -119,7 +119,7 @@ static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
119 119
120 /* Copy a 'clean' PSW mask to the user to avoid leaking 120 /* Copy a 'clean' PSW mask to the user to avoid leaking
121 information about whether PER is currently on. */ 121 information about whether PER is currently on. */
122 user_sregs.regs.psw.mask = PSW_MASK_MERGE(PSW_USER_BITS, regs->psw.mask); 122 user_sregs.regs.psw.mask = PSW_MASK_MERGE(psw_user_bits, regs->psw.mask);
123 user_sregs.regs.psw.addr = regs->psw.addr; 123 user_sregs.regs.psw.addr = regs->psw.addr;
124 memcpy(&user_sregs.regs.gprs, &regs->gprs, sizeof(sregs->regs.gprs)); 124 memcpy(&user_sregs.regs.gprs, &regs->gprs, sizeof(sregs->regs.gprs));
125 memcpy(&user_sregs.regs.acrs, current->thread.acrs, 125 memcpy(&user_sregs.regs.acrs, current->thread.acrs,
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index c0cd255fddbd..ecaa432a99f8 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -22,23 +22,24 @@
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/init.h> 24#include <linux/init.h>
25
26#include <linux/mm.h> 25#include <linux/mm.h>
27#include <linux/spinlock.h> 26#include <linux/spinlock.h>
28#include <linux/kernel_stat.h> 27#include <linux/kernel_stat.h>
29#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
30
31#include <linux/delay.h> 29#include <linux/delay.h>
32#include <linux/cache.h> 30#include <linux/cache.h>
33#include <linux/interrupt.h> 31#include <linux/interrupt.h>
34#include <linux/cpu.h> 32#include <linux/cpu.h>
35 33#include <linux/timex.h>
34#include <asm/ipl.h>
35#include <asm/setup.h>
36#include <asm/sigp.h> 36#include <asm/sigp.h>
37#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/s390_ext.h> 39#include <asm/s390_ext.h>
40#include <asm/cpcmd.h> 40#include <asm/cpcmd.h>
41#include <asm/tlbflush.h> 41#include <asm/tlbflush.h>
42#include <asm/timer.h>
42 43
43extern volatile int __cpu_logical_map[]; 44extern volatile int __cpu_logical_map[];
44 45
@@ -53,26 +54,19 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE;
53 54
54static struct task_struct *current_set[NR_CPUS]; 55static struct task_struct *current_set[NR_CPUS];
55 56
56/*
57 * Reboot, halt and power_off routines for SMP.
58 */
59extern char vmhalt_cmd[];
60extern char vmpoff_cmd[];
61
62static void smp_ext_bitcall(int, ec_bit_sig); 57static void smp_ext_bitcall(int, ec_bit_sig);
63static void smp_ext_bitcall_others(ec_bit_sig);
64 58
65/* 59/*
665B * Structure and data for smp_call_function(). This is designed to minimise 60 * Structure and data for __smp_call_function_map(). This is designed to
67 * static memory requirements. It also looks cleaner. 61 * minimise static memory requirements. It also looks cleaner.
68 */ 62 */
69static DEFINE_SPINLOCK(call_lock); 63static DEFINE_SPINLOCK(call_lock);
70 64
71struct call_data_struct { 65struct call_data_struct {
72 void (*func) (void *info); 66 void (*func) (void *info);
73 void *info; 67 void *info;
74 atomic_t started; 68 cpumask_t started;
75 atomic_t finished; 69 cpumask_t finished;
76 int wait; 70 int wait;
77}; 71};
78 72
@@ -87,120 +81,118 @@ static void do_call_function(void)
87 void *info = call_data->info; 81 void *info = call_data->info;
88 int wait = call_data->wait; 82 int wait = call_data->wait;
89 83
90 atomic_inc(&call_data->started); 84 cpu_set(smp_processor_id(), call_data->started);
91 (*func)(info); 85 (*func)(info);
92 if (wait) 86 if (wait)
93 atomic_inc(&call_data->finished); 87 cpu_set(smp_processor_id(), call_data->finished);;
94} 88}
95 89
96/* 90static void __smp_call_function_map(void (*func) (void *info), void *info,
97 * this function sends a 'generic call function' IPI to all other CPUs 91 int nonatomic, int wait, cpumask_t map)
98 * in the system.
99 */
100
101int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
102 int wait)
103/*
104 * [SUMMARY] Run a function on all other CPUs.
105 * <func> The function to run. This must be fast and non-blocking.
106 * <info> An arbitrary pointer to pass to the function.
107 * <nonatomic> currently unused.
108 * <wait> If true, wait (atomically) until function has completed on other CPUs.
109 * [RETURNS] 0 on success, else a negative status code. Does not return until
110 * remote CPUs are nearly ready to execute <<func>> or are or have executed.
111 *
112 * You must not call this function with disabled interrupts or from a
113 * hardware interrupt handler or from a bottom half handler.
114 */
115{ 92{
116 struct call_data_struct data; 93 struct call_data_struct data;
117 int cpus = num_online_cpus()-1; 94 int cpu, local = 0;
118 95
119 if (cpus <= 0) 96 /*
120 return 0; 97 * Can deadlock when interrupts are disabled or if in wrong context,
98 * caller must disable preemption
99 */
100 WARN_ON(irqs_disabled() || in_irq() || preemptible());
121 101
122 /* Can deadlock when called with interrupts disabled */ 102 /*
123 WARN_ON(irqs_disabled()); 103 * Check for local function call. We have to have the same call order
104 * as in on_each_cpu() because of machine_restart_smp().
105 */
106 if (cpu_isset(smp_processor_id(), map)) {
107 local = 1;
108 cpu_clear(smp_processor_id(), map);
109 }
110
111 cpus_and(map, map, cpu_online_map);
112 if (cpus_empty(map))
113 goto out;
124 114
125 data.func = func; 115 data.func = func;
126 data.info = info; 116 data.info = info;
127 atomic_set(&data.started, 0); 117 data.started = CPU_MASK_NONE;
128 data.wait = wait; 118 data.wait = wait;
129 if (wait) 119 if (wait)
130 atomic_set(&data.finished, 0); 120 data.finished = CPU_MASK_NONE;
131 121
132 spin_lock(&call_lock); 122 spin_lock_bh(&call_lock);
133 call_data = &data; 123 call_data = &data;
134 /* Send a message to all other CPUs and wait for them to respond */ 124
135 smp_ext_bitcall_others(ec_call_function); 125 for_each_cpu_mask(cpu, map)
126 smp_ext_bitcall(cpu, ec_call_function);
136 127
137 /* Wait for response */ 128 /* Wait for response */
138 while (atomic_read(&data.started) != cpus) 129 while (!cpus_equal(map, data.started))
139 cpu_relax(); 130 cpu_relax();
140 131
141 if (wait) 132 if (wait)
142 while (atomic_read(&data.finished) != cpus) 133 while (!cpus_equal(map, data.finished))
143 cpu_relax(); 134 cpu_relax();
144 spin_unlock(&call_lock);
145 135
146 return 0; 136 spin_unlock_bh(&call_lock);
137
138out:
139 local_irq_disable();
140 if (local)
141 func(info);
142 local_irq_enable();
147} 143}
148 144
149/* 145/*
150 * Call a function on one CPU 146 * smp_call_function:
151 * cpu : the CPU the function should be executed on 147 * @func: the function to run; this must be fast and non-blocking
148 * @info: an arbitrary pointer to pass to the function
149 * @nonatomic: unused
150 * @wait: if true, wait (atomically) until function has completed on other CPUs
152 * 151 *
153 * You must not call this function with disabled interrupts or from a 152 * Run a function on all other CPUs.
154 * hardware interrupt handler. You may call it from a bottom half.
155 * 153 *
156 * It is guaranteed that the called function runs on the specified CPU, 154 * You must not call this function with disabled interrupts or from a
157 * preemption is disabled. 155 * hardware interrupt handler. Must be called with preemption disabled.
156 * You may call it from a bottom half.
158 */ 157 */
159int smp_call_function_on(void (*func) (void *info), void *info, 158int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
160 int nonatomic, int wait, int cpu) 159 int wait)
161{ 160{
162 struct call_data_struct data; 161 cpumask_t map;
163 int curr_cpu;
164 162
165 if (!cpu_online(cpu)) 163 map = cpu_online_map;
166 return -EINVAL; 164 cpu_clear(smp_processor_id(), map);
167 165 __smp_call_function_map(func, info, nonatomic, wait, map);
168 /* disable preemption for local function call */ 166 return 0;
169 curr_cpu = get_cpu(); 167}
170 168EXPORT_SYMBOL(smp_call_function);
171 if (curr_cpu == cpu) {
172 /* direct call to function */
173 func(info);
174 put_cpu();
175 return 0;
176 }
177
178 data.func = func;
179 data.info = info;
180 atomic_set(&data.started, 0);
181 data.wait = wait;
182 if (wait)
183 atomic_set(&data.finished, 0);
184
185 spin_lock_bh(&call_lock);
186 call_data = &data;
187 smp_ext_bitcall(cpu, ec_call_function);
188
189 /* Wait for response */
190 while (atomic_read(&data.started) != 1)
191 cpu_relax();
192 169
193 if (wait) 170/*
194 while (atomic_read(&data.finished) != 1) 171 * smp_call_function_on:
195 cpu_relax(); 172 * @func: the function to run; this must be fast and non-blocking
173 * @info: an arbitrary pointer to pass to the function
174 * @nonatomic: unused
175 * @wait: if true, wait (atomically) until function has completed on other CPUs
176 * @cpu: the CPU where func should run
177 *
178 * Run a function on one processor.
179 *
180 * You must not call this function with disabled interrupts or from a
181 * hardware interrupt handler. Must be called with preemption disabled.
182 * You may call it from a bottom half.
183 */
184int smp_call_function_on(void (*func) (void *info), void *info, int nonatomic,
185 int wait, int cpu)
186{
187 cpumask_t map = CPU_MASK_NONE;
196 188
197 spin_unlock_bh(&call_lock); 189 cpu_set(cpu, map);
198 put_cpu(); 190 __smp_call_function_map(func, info, nonatomic, wait, map);
199 return 0; 191 return 0;
200} 192}
201EXPORT_SYMBOL(smp_call_function_on); 193EXPORT_SYMBOL(smp_call_function_on);
202 194
203static inline void do_send_stop(void) 195static void do_send_stop(void)
204{ 196{
205 int cpu, rc; 197 int cpu, rc;
206 198
@@ -214,7 +206,7 @@ static inline void do_send_stop(void)
214 } 206 }
215} 207}
216 208
217static inline void do_store_status(void) 209static void do_store_status(void)
218{ 210{
219 int cpu, rc; 211 int cpu, rc;
220 212
@@ -230,7 +222,7 @@ static inline void do_store_status(void)
230 } 222 }
231} 223}
232 224
233static inline void do_wait_for_stop(void) 225static void do_wait_for_stop(void)
234{ 226{
235 int cpu; 227 int cpu;
236 228
@@ -250,7 +242,7 @@ static inline void do_wait_for_stop(void)
250void smp_send_stop(void) 242void smp_send_stop(void)
251{ 243{
252 /* Disable all interrupts/machine checks */ 244 /* Disable all interrupts/machine checks */
253 __load_psw_mask(PSW_KERNEL_BITS & ~PSW_MASK_MCHECK); 245 __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK);
254 246
255 /* write magic number to zero page (absolute 0) */ 247 /* write magic number to zero page (absolute 0) */
256 lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; 248 lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC;
@@ -298,7 +290,7 @@ void machine_power_off_smp(void)
298 * cpus are handled. 290 * cpus are handled.
299 */ 291 */
300 292
301void do_ext_call_interrupt(__u16 code) 293static void do_ext_call_interrupt(__u16 code)
302{ 294{
303 unsigned long bits; 295 unsigned long bits;
304 296
@@ -328,26 +320,6 @@ static void smp_ext_bitcall(int cpu, ec_bit_sig sig)
328 udelay(10); 320 udelay(10);
329} 321}
330 322
331/*
332 * Send an external call sigp to every other cpu in the system and
333 * return without waiting for its completion.
334 */
335static void smp_ext_bitcall_others(ec_bit_sig sig)
336{
337 int cpu;
338
339 for_each_online_cpu(cpu) {
340 if (cpu == smp_processor_id())
341 continue;
342 /*
343 * Set signaling bit in lowcore of target cpu and kick it
344 */
345 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
346 while (signal_processor(cpu, sigp_emergency_signal) == sigp_busy)
347 udelay(10);
348 }
349}
350
351#ifndef CONFIG_64BIT 323#ifndef CONFIG_64BIT
352/* 324/*
353 * this function sends a 'purge tlb' signal to another CPU. 325 * this function sends a 'purge tlb' signal to another CPU.
@@ -385,7 +357,7 @@ struct ec_creg_mask_parms {
385/* 357/*
386 * callback for setting/clearing control bits 358 * callback for setting/clearing control bits
387 */ 359 */
388void smp_ctl_bit_callback(void *info) { 360static void smp_ctl_bit_callback(void *info) {
389 struct ec_creg_mask_parms *pp = info; 361 struct ec_creg_mask_parms *pp = info;
390 unsigned long cregs[16]; 362 unsigned long cregs[16];
391 int i; 363 int i;
@@ -458,17 +430,15 @@ __init smp_count_cpus(void)
458/* 430/*
459 * Activate a secondary processor. 431 * Activate a secondary processor.
460 */ 432 */
461extern void init_cpu_timer(void);
462extern void init_cpu_vtimer(void);
463
464int __devinit start_secondary(void *cpuvoid) 433int __devinit start_secondary(void *cpuvoid)
465{ 434{
466 /* Setup the cpu */ 435 /* Setup the cpu */
467 cpu_init(); 436 cpu_init();
468 preempt_disable(); 437 preempt_disable();
469 /* init per CPU timer */ 438 /* Enable TOD clock interrupts on the secondary cpu. */
470 init_cpu_timer(); 439 init_cpu_timer();
471#ifdef CONFIG_VIRT_TIMER 440#ifdef CONFIG_VIRT_TIMER
441 /* Enable cpu timer interrupts on the secondary cpu. */
472 init_cpu_vtimer(); 442 init_cpu_vtimer();
473#endif 443#endif
474 /* Enable pfault pseudo page faults on this cpu. */ 444 /* Enable pfault pseudo page faults on this cpu. */
@@ -542,7 +512,7 @@ smp_put_cpu(int cpu)
542 spin_unlock_irqrestore(&smp_reserve_lock, flags); 512 spin_unlock_irqrestore(&smp_reserve_lock, flags);
543} 513}
544 514
545static inline int 515static int
546cpu_stopped(int cpu) 516cpu_stopped(int cpu)
547{ 517{
548 __u32 status; 518 __u32 status;
@@ -812,6 +782,5 @@ EXPORT_SYMBOL(cpu_possible_map);
812EXPORT_SYMBOL(lowcore_ptr); 782EXPORT_SYMBOL(lowcore_ptr);
813EXPORT_SYMBOL(smp_ctl_set_bit); 783EXPORT_SYMBOL(smp_ctl_set_bit);
814EXPORT_SYMBOL(smp_ctl_clear_bit); 784EXPORT_SYMBOL(smp_ctl_clear_bit);
815EXPORT_SYMBOL(smp_call_function);
816EXPORT_SYMBOL(smp_get_cpu); 785EXPORT_SYMBOL(smp_get_cpu);
817EXPORT_SYMBOL(smp_put_cpu); 786EXPORT_SYMBOL(smp_put_cpu);
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index 0d14a4789bf2..2e5c65a1863e 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -11,11 +11,11 @@
11#include <linux/stacktrace.h> 11#include <linux/stacktrace.h>
12#include <linux/kallsyms.h> 12#include <linux/kallsyms.h>
13 13
14static inline unsigned long save_context_stack(struct stack_trace *trace, 14static unsigned long save_context_stack(struct stack_trace *trace,
15 unsigned int *skip, 15 unsigned int *skip,
16 unsigned long sp, 16 unsigned long sp,
17 unsigned long low, 17 unsigned long low,
18 unsigned long high) 18 unsigned long high)
19{ 19{
20 struct stack_frame *sf; 20 struct stack_frame *sf;
21 struct pt_regs *regs; 21 struct pt_regs *regs;
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index a4ceae3dbcf1..a52c44455bf0 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -124,7 +124,7 @@ NI_SYSCALL /* old "idle" system call */
124NI_SYSCALL /* vm86old for i386 */ 124NI_SYSCALL /* vm86old for i386 */
125SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4_wrapper) 125SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4_wrapper)
126SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ 126SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */
127SYSCALL(sys_sysinfo,sys_sysinfo,sys32_sysinfo_wrapper) 127SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper)
128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) 128SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper)
129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) 129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper)
130SYSCALL(sys_sigreturn_glue,sys_sigreturn_glue,sys32_sigreturn_glue) 130SYSCALL(sys_sigreturn_glue,sys_sigreturn_glue,sys32_sigreturn_glue)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 6cceed4df73e..e1ad464b6f20 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -37,11 +37,15 @@
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/irq_regs.h> 38#include <asm/irq_regs.h>
39#include <asm/timer.h> 39#include <asm/timer.h>
40#include <asm/etr.h>
40 41
41/* change this if you have some constant time drift */ 42/* change this if you have some constant time drift */
42#define USECS_PER_JIFFY ((unsigned long) 1000000/HZ) 43#define USECS_PER_JIFFY ((unsigned long) 1000000/HZ)
43#define CLK_TICKS_PER_JIFFY ((unsigned long) USECS_PER_JIFFY << 12) 44#define CLK_TICKS_PER_JIFFY ((unsigned long) USECS_PER_JIFFY << 12)
44 45
46/* The value of the TOD clock for 1.1.1970. */
47#define TOD_UNIX_EPOCH 0x7d91048bca000000ULL
48
45/* 49/*
46 * Create a small time difference between the timer interrupts 50 * Create a small time difference between the timer interrupts
47 * on the different cpus to avoid lock contention. 51 * on the different cpus to avoid lock contention.
@@ -51,6 +55,7 @@
51#define TICK_SIZE tick 55#define TICK_SIZE tick
52 56
53static ext_int_info_t ext_int_info_cc; 57static ext_int_info_t ext_int_info_cc;
58static ext_int_info_t ext_int_etr_cc;
54static u64 init_timer_cc; 59static u64 init_timer_cc;
55static u64 jiffies_timer_cc; 60static u64 jiffies_timer_cc;
56static u64 xtime_cc; 61static u64 xtime_cc;
@@ -89,29 +94,21 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime)
89#define s390_do_profile() do { ; } while(0) 94#define s390_do_profile() do { ; } while(0)
90#endif /* CONFIG_PROFILING */ 95#endif /* CONFIG_PROFILING */
91 96
92
93/* 97/*
94 * timer_interrupt() needs to keep up the real-time clock, 98 * Advance the per cpu tick counter up to the time given with the
95 * as well as call the "do_timer()" routine every clocktick 99 * "time" argument. The per cpu update consists of accounting
100 * the virtual cpu time, calling update_process_times and calling
101 * the profiling hook. If xtime is before time it is advanced as well.
96 */ 102 */
97void account_ticks(void) 103void account_ticks(u64 time)
98{ 104{
99 __u64 tmp;
100 __u32 ticks; 105 __u32 ticks;
106 __u64 tmp;
101 107
102 /* Calculate how many ticks have passed. */ 108 /* Calculate how many ticks have passed. */
103 if (S390_lowcore.int_clock < S390_lowcore.jiffy_timer) { 109 if (time < S390_lowcore.jiffy_timer)
104 /*
105 * We have to program the clock comparator even if
106 * no tick has passed. That happens if e.g. an i/o
107 * interrupt wakes up an idle processor that has
108 * switched off its hz timer.
109 */
110 tmp = S390_lowcore.jiffy_timer + CPU_DEVIATION;
111 asm volatile ("SCKC %0" : : "m" (tmp));
112 return; 110 return;
113 } 111 tmp = time - S390_lowcore.jiffy_timer;
114 tmp = S390_lowcore.int_clock - S390_lowcore.jiffy_timer;
115 if (tmp >= 2*CLK_TICKS_PER_JIFFY) { /* more than two ticks ? */ 112 if (tmp >= 2*CLK_TICKS_PER_JIFFY) { /* more than two ticks ? */
116 ticks = __div(tmp, CLK_TICKS_PER_JIFFY) + 1; 113 ticks = __div(tmp, CLK_TICKS_PER_JIFFY) + 1;
117 S390_lowcore.jiffy_timer += 114 S390_lowcore.jiffy_timer +=
@@ -124,10 +121,6 @@ void account_ticks(void)
124 S390_lowcore.jiffy_timer += CLK_TICKS_PER_JIFFY; 121 S390_lowcore.jiffy_timer += CLK_TICKS_PER_JIFFY;
125 } 122 }
126 123
127 /* set clock comparator for next tick */
128 tmp = S390_lowcore.jiffy_timer + CPU_DEVIATION;
129 asm volatile ("SCKC %0" : : "m" (tmp));
130
131#ifdef CONFIG_SMP 124#ifdef CONFIG_SMP
132 /* 125 /*
133 * Do not rely on the boot cpu to do the calls to do_timer. 126 * Do not rely on the boot cpu to do the calls to do_timer.
@@ -173,7 +166,7 @@ int sysctl_hz_timer = 1;
173 * Stop the HZ tick on the current CPU. 166 * Stop the HZ tick on the current CPU.
174 * Only cpu_idle may call this function. 167 * Only cpu_idle may call this function.
175 */ 168 */
176static inline void stop_hz_timer(void) 169static void stop_hz_timer(void)
177{ 170{
178 unsigned long flags; 171 unsigned long flags;
179 unsigned long seq, next; 172 unsigned long seq, next;
@@ -210,20 +203,21 @@ static inline void stop_hz_timer(void)
210 if (timer >= jiffies_timer_cc) 203 if (timer >= jiffies_timer_cc)
211 todval = timer; 204 todval = timer;
212 } 205 }
213 asm volatile ("SCKC %0" : : "m" (todval)); 206 set_clock_comparator(todval);
214} 207}
215 208
216/* 209/*
217 * Start the HZ tick on the current CPU. 210 * Start the HZ tick on the current CPU.
218 * Only cpu_idle may call this function. 211 * Only cpu_idle may call this function.
219 */ 212 */
220static inline void start_hz_timer(void) 213static void start_hz_timer(void)
221{ 214{
222 BUG_ON(!in_interrupt()); 215 BUG_ON(!in_interrupt());
223 216
224 if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) 217 if (!cpu_isset(smp_processor_id(), nohz_cpu_mask))
225 return; 218 return;
226 account_ticks(); 219 account_ticks(get_clock());
220 set_clock_comparator(S390_lowcore.jiffy_timer + CPU_DEVIATION);
227 cpu_clear(smp_processor_id(), nohz_cpu_mask); 221 cpu_clear(smp_processor_id(), nohz_cpu_mask);
228} 222}
229 223
@@ -245,7 +239,7 @@ static struct notifier_block nohz_idle_nb = {
245 .notifier_call = nohz_idle_notify, 239 .notifier_call = nohz_idle_notify,
246}; 240};
247 241
248void __init nohz_init(void) 242static void __init nohz_init(void)
249{ 243{
250 if (register_idle_notifier(&nohz_idle_nb)) 244 if (register_idle_notifier(&nohz_idle_nb))
251 panic("Couldn't register idle notifier"); 245 panic("Couldn't register idle notifier");
@@ -254,24 +248,57 @@ void __init nohz_init(void)
254#endif 248#endif
255 249
256/* 250/*
257 * Start the clock comparator on the current CPU. 251 * Set up per cpu jiffy timer and set the clock comparator.
252 */
253static void setup_jiffy_timer(void)
254{
255 /* Set up clock comparator to next jiffy. */
256 S390_lowcore.jiffy_timer =
257 jiffies_timer_cc + (jiffies_64 + 1) * CLK_TICKS_PER_JIFFY;
258 set_clock_comparator(S390_lowcore.jiffy_timer + CPU_DEVIATION);
259}
260
261/*
262 * Set up lowcore and control register of the current cpu to
263 * enable TOD clock and clock comparator interrupts.
258 */ 264 */
259void init_cpu_timer(void) 265void init_cpu_timer(void)
260{ 266{
261 unsigned long cr0; 267 setup_jiffy_timer();
262 __u64 timer; 268
269 /* Enable clock comparator timer interrupt. */
270 __ctl_set_bit(0,11);
263 271
264 timer = jiffies_timer_cc + jiffies_64 * CLK_TICKS_PER_JIFFY; 272 /* Always allow ETR external interrupts, even without an ETR. */
265 S390_lowcore.jiffy_timer = timer + CLK_TICKS_PER_JIFFY; 273 __ctl_set_bit(0, 4);
266 timer += CLK_TICKS_PER_JIFFY + CPU_DEVIATION;
267 asm volatile ("SCKC %0" : : "m" (timer));
268 /* allow clock comparator timer interrupt */
269 __ctl_store(cr0, 0, 0);
270 cr0 |= 0x800;
271 __ctl_load(cr0, 0, 0);
272} 274}
273 275
274extern void vtime_init(void); 276static void clock_comparator_interrupt(__u16 code)
277{
278 /* set clock comparator for next tick */
279 set_clock_comparator(S390_lowcore.jiffy_timer + CPU_DEVIATION);
280}
281
282static void etr_reset(void);
283static void etr_init(void);
284static void etr_ext_handler(__u16);
285
286/*
287 * Get the TOD clock running.
288 */
289static u64 __init reset_tod_clock(void)
290{
291 u64 time;
292
293 etr_reset();
294 if (store_clock(&time) == 0)
295 return time;
296 /* TOD clock not running. Set the clock to Unix Epoch. */
297 if (set_clock(TOD_UNIX_EPOCH) != 0 || store_clock(&time) != 0)
298 panic("TOD clock not operational.");
299
300 return TOD_UNIX_EPOCH;
301}
275 302
276static cycle_t read_tod_clock(void) 303static cycle_t read_tod_clock(void)
277{ 304{
@@ -285,7 +312,7 @@ static struct clocksource clocksource_tod = {
285 .mask = -1ULL, 312 .mask = -1ULL,
286 .mult = 1000, 313 .mult = 1000,
287 .shift = 12, 314 .shift = 12,
288 .is_continuous = 1, 315 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
289}; 316};
290 317
291 318
@@ -295,48 +322,31 @@ static struct clocksource clocksource_tod = {
295 */ 322 */
296void __init time_init(void) 323void __init time_init(void)
297{ 324{
298 __u64 set_time_cc; 325 init_timer_cc = reset_tod_clock();
299 int cc; 326 xtime_cc = init_timer_cc + CLK_TICKS_PER_JIFFY;
300
301 /* kick the TOD clock */
302 asm volatile(
303 " stck 0(%2)\n"
304 " ipm %0\n"
305 " srl %0,28"
306 : "=d" (cc), "=m" (init_timer_cc)
307 : "a" (&init_timer_cc) : "cc");
308 switch (cc) {
309 case 0: /* clock in set state: all is fine */
310 break;
311 case 1: /* clock in non-set state: FIXME */
312 printk("time_init: TOD clock in non-set state\n");
313 break;
314 case 2: /* clock in error state: FIXME */
315 printk("time_init: TOD clock in error state\n");
316 break;
317 case 3: /* clock in stopped or not-operational state: FIXME */
318 printk("time_init: TOD clock stopped/non-operational\n");
319 break;
320 }
321 jiffies_timer_cc = init_timer_cc - jiffies_64 * CLK_TICKS_PER_JIFFY; 327 jiffies_timer_cc = init_timer_cc - jiffies_64 * CLK_TICKS_PER_JIFFY;
322 328
323 /* set xtime */ 329 /* set xtime */
324 xtime_cc = init_timer_cc + CLK_TICKS_PER_JIFFY; 330 tod_to_timeval(init_timer_cc - TOD_UNIX_EPOCH, &xtime);
325 set_time_cc = init_timer_cc - 0x8126d60e46000000LL +
326 (0x3c26700LL*1000000*4096);
327 tod_to_timeval(set_time_cc, &xtime);
328 set_normalized_timespec(&wall_to_monotonic, 331 set_normalized_timespec(&wall_to_monotonic,
329 -xtime.tv_sec, -xtime.tv_nsec); 332 -xtime.tv_sec, -xtime.tv_nsec);
330 333
331 /* request the clock comparator external interrupt */ 334 /* request the clock comparator external interrupt */
332 if (register_early_external_interrupt(0x1004, NULL, 335 if (register_early_external_interrupt(0x1004,
336 clock_comparator_interrupt,
333 &ext_int_info_cc) != 0) 337 &ext_int_info_cc) != 0)
334 panic("Couldn't request external interrupt 0x1004"); 338 panic("Couldn't request external interrupt 0x1004");
335 339
336 if (clocksource_register(&clocksource_tod) != 0) 340 if (clocksource_register(&clocksource_tod) != 0)
337 panic("Could not register TOD clock source"); 341 panic("Could not register TOD clock source");
338 342
339 init_cpu_timer(); 343 /* request the etr external interrupt */
344 if (register_early_external_interrupt(0x1406, etr_ext_handler,
345 &ext_int_etr_cc) != 0)
346 panic("Couldn't request external interrupt 0x1406");
347
348 /* Enable TOD clock interrupts on the boot cpu. */
349 init_cpu_timer();
340 350
341#ifdef CONFIG_NO_IDLE_HZ 351#ifdef CONFIG_NO_IDLE_HZ
342 nohz_init(); 352 nohz_init();
@@ -345,5 +355,1056 @@ void __init time_init(void)
345#ifdef CONFIG_VIRT_TIMER 355#ifdef CONFIG_VIRT_TIMER
346 vtime_init(); 356 vtime_init();
347#endif 357#endif
358 etr_init();
359}
360
361/*
362 * External Time Reference (ETR) code.
363 */
364static int etr_port0_online;
365static int etr_port1_online;
366
367static int __init early_parse_etr(char *p)
368{
369 if (strncmp(p, "off", 3) == 0)
370 etr_port0_online = etr_port1_online = 0;
371 else if (strncmp(p, "port0", 5) == 0)
372 etr_port0_online = 1;
373 else if (strncmp(p, "port1", 5) == 0)
374 etr_port1_online = 1;
375 else if (strncmp(p, "on", 2) == 0)
376 etr_port0_online = etr_port1_online = 1;
377 return 0;
378}
379early_param("etr", early_parse_etr);
380
381enum etr_event {
382 ETR_EVENT_PORT0_CHANGE,
383 ETR_EVENT_PORT1_CHANGE,
384 ETR_EVENT_PORT_ALERT,
385 ETR_EVENT_SYNC_CHECK,
386 ETR_EVENT_SWITCH_LOCAL,
387 ETR_EVENT_UPDATE,
388};
389
390enum etr_flags {
391 ETR_FLAG_ENOSYS,
392 ETR_FLAG_EACCES,
393 ETR_FLAG_STEAI,
394};
395
396/*
397 * Valid bit combinations of the eacr register are (x = don't care):
398 * e0 e1 dp p0 p1 ea es sl
399 * 0 0 x 0 0 0 0 0 initial, disabled state
400 * 0 0 x 0 1 1 0 0 port 1 online
401 * 0 0 x 1 0 1 0 0 port 0 online
402 * 0 0 x 1 1 1 0 0 both ports online
403 * 0 1 x 0 1 1 0 0 port 1 online and usable, ETR or PPS mode
404 * 0 1 x 0 1 1 0 1 port 1 online, usable and ETR mode
405 * 0 1 x 0 1 1 1 0 port 1 online, usable, PPS mode, in-sync
406 * 0 1 x 0 1 1 1 1 port 1 online, usable, ETR mode, in-sync
407 * 0 1 x 1 1 1 0 0 both ports online, port 1 usable
408 * 0 1 x 1 1 1 1 0 both ports online, port 1 usable, PPS mode, in-sync
409 * 0 1 x 1 1 1 1 1 both ports online, port 1 usable, ETR mode, in-sync
410 * 1 0 x 1 0 1 0 0 port 0 online and usable, ETR or PPS mode
411 * 1 0 x 1 0 1 0 1 port 0 online, usable and ETR mode
412 * 1 0 x 1 0 1 1 0 port 0 online, usable, PPS mode, in-sync
413 * 1 0 x 1 0 1 1 1 port 0 online, usable, ETR mode, in-sync
414 * 1 0 x 1 1 1 0 0 both ports online, port 0 usable
415 * 1 0 x 1 1 1 1 0 both ports online, port 0 usable, PPS mode, in-sync
416 * 1 0 x 1 1 1 1 1 both ports online, port 0 usable, ETR mode, in-sync
417 * 1 1 x 1 1 1 1 0 both ports online & usable, ETR, in-sync
418 * 1 1 x 1 1 1 1 1 both ports online & usable, ETR, in-sync
419 */
420static struct etr_eacr etr_eacr;
421static u64 etr_tolec; /* time of last eacr update */
422static unsigned long etr_flags;
423static struct etr_aib etr_port0;
424static int etr_port0_uptodate;
425static struct etr_aib etr_port1;
426static int etr_port1_uptodate;
427static unsigned long etr_events;
428static struct timer_list etr_timer;
429static struct tasklet_struct etr_tasklet;
430static DEFINE_PER_CPU(atomic_t, etr_sync_word);
431
432static void etr_timeout(unsigned long dummy);
433static void etr_tasklet_fn(unsigned long dummy);
434
435/*
436 * The etr get_clock function. It will write the current clock value
437 * to the clock pointer and return 0 if the clock is in sync with the
438 * external time source. If the clock mode is local it will return
439 * -ENOSYS and -EAGAIN if the clock is not in sync with the external
440 * reference. This function is what ETR is all about..
441 */
442int get_sync_clock(unsigned long long *clock)
443{
444 atomic_t *sw_ptr;
445 unsigned int sw0, sw1;
446
447 sw_ptr = &get_cpu_var(etr_sync_word);
448 sw0 = atomic_read(sw_ptr);
449 *clock = get_clock();
450 sw1 = atomic_read(sw_ptr);
451 put_cpu_var(etr_sync_sync);
452 if (sw0 == sw1 && (sw0 & 0x80000000U))
453 /* Success: time is in sync. */
454 return 0;
455 if (test_bit(ETR_FLAG_ENOSYS, &etr_flags))
456 return -ENOSYS;
457 if (test_bit(ETR_FLAG_EACCES, &etr_flags))
458 return -EACCES;
459 return -EAGAIN;
460}
461EXPORT_SYMBOL(get_sync_clock);
462
463/*
464 * Make get_sync_clock return -EAGAIN.
465 */
466static void etr_disable_sync_clock(void *dummy)
467{
468 atomic_t *sw_ptr = &__get_cpu_var(etr_sync_word);
469 /*
470 * Clear the in-sync bit 2^31. All get_sync_clock calls will
471 * fail until the sync bit is turned back on. In addition
472 * increase the "sequence" counter to avoid the race of an
473 * etr event and the complete recovery against get_sync_clock.
474 */
475 atomic_clear_mask(0x80000000, sw_ptr);
476 atomic_inc(sw_ptr);
477}
478
479/*
480 * Make get_sync_clock return 0 again.
481 * Needs to be called from a context disabled for preemption.
482 */
483static void etr_enable_sync_clock(void)
484{
485 atomic_t *sw_ptr = &__get_cpu_var(etr_sync_word);
486 atomic_set_mask(0x80000000, sw_ptr);
487}
488
489/*
490 * Reset ETR attachment.
491 */
492static void etr_reset(void)
493{
494 etr_eacr = (struct etr_eacr) {
495 .e0 = 0, .e1 = 0, ._pad0 = 4, .dp = 0,
496 .p0 = 0, .p1 = 0, ._pad1 = 0, .ea = 0,
497 .es = 0, .sl = 0 };
498 if (etr_setr(&etr_eacr) == 0)
499 etr_tolec = get_clock();
500 else {
501 set_bit(ETR_FLAG_ENOSYS, &etr_flags);
502 if (etr_port0_online || etr_port1_online) {
503 printk(KERN_WARNING "Running on non ETR capable "
504 "machine, only local mode available.\n");
505 etr_port0_online = etr_port1_online = 0;
506 }
507 }
508}
509
510static void etr_init(void)
511{
512 struct etr_aib aib;
513
514 if (test_bit(ETR_FLAG_ENOSYS, &etr_flags))
515 return;
516 /* Check if this machine has the steai instruction. */
517 if (etr_steai(&aib, ETR_STEAI_STEPPING_PORT) == 0)
518 set_bit(ETR_FLAG_STEAI, &etr_flags);
519 setup_timer(&etr_timer, etr_timeout, 0UL);
520 tasklet_init(&etr_tasklet, etr_tasklet_fn, 0);
521 if (!etr_port0_online && !etr_port1_online)
522 set_bit(ETR_FLAG_EACCES, &etr_flags);
523 if (etr_port0_online) {
524 set_bit(ETR_EVENT_PORT0_CHANGE, &etr_events);
525 tasklet_hi_schedule(&etr_tasklet);
526 }
527 if (etr_port1_online) {
528 set_bit(ETR_EVENT_PORT1_CHANGE, &etr_events);
529 tasklet_hi_schedule(&etr_tasklet);
530 }
531}
532
533/*
534 * Two sorts of ETR machine checks. The architecture reads:
535 * "When a machine-check niterruption occurs and if a switch-to-local or
536 * ETR-sync-check interrupt request is pending but disabled, this pending
537 * disabled interruption request is indicated and is cleared".
538 * Which means that we can get etr_switch_to_local events from the machine
539 * check handler although the interruption condition is disabled. Lovely..
540 */
541
542/*
543 * Switch to local machine check. This is called when the last usable
544 * ETR port goes inactive. After switch to local the clock is not in sync.
545 */
546void etr_switch_to_local(void)
547{
548 if (!etr_eacr.sl)
549 return;
550 etr_disable_sync_clock(NULL);
551 set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events);
552 tasklet_hi_schedule(&etr_tasklet);
553}
554
555/*
556 * ETR sync check machine check. This is called when the ETR OTE and the
557 * local clock OTE are farther apart than the ETR sync check tolerance.
558 * After a ETR sync check the clock is not in sync. The machine check
559 * is broadcasted to all cpus at the same time.
560 */
561void etr_sync_check(void)
562{
563 if (!etr_eacr.es)
564 return;
565 etr_disable_sync_clock(NULL);
566 set_bit(ETR_EVENT_SYNC_CHECK, &etr_events);
567 tasklet_hi_schedule(&etr_tasklet);
568}
569
570/*
571 * ETR external interrupt. There are two causes:
572 * 1) port state change, check the usability of the port
573 * 2) port alert, one of the ETR-data-validity bits (v1-v2 bits of the
574 * sldr-status word) or ETR-data word 1 (edf1) or ETR-data word 3 (edf3)
575 * or ETR-data word 4 (edf4) has changed.
576 */
577static void etr_ext_handler(__u16 code)
578{
579 struct etr_interruption_parameter *intparm =
580 (struct etr_interruption_parameter *) &S390_lowcore.ext_params;
581
582 if (intparm->pc0)
583 /* ETR port 0 state change. */
584 set_bit(ETR_EVENT_PORT0_CHANGE, &etr_events);
585 if (intparm->pc1)
586 /* ETR port 1 state change. */
587 set_bit(ETR_EVENT_PORT1_CHANGE, &etr_events);
588 if (intparm->eai)
589 /*
590 * ETR port alert on either port 0, 1 or both.
591 * Both ports are not up-to-date now.
592 */
593 set_bit(ETR_EVENT_PORT_ALERT, &etr_events);
594 tasklet_hi_schedule(&etr_tasklet);
595}
596
597static void etr_timeout(unsigned long dummy)
598{
599 set_bit(ETR_EVENT_UPDATE, &etr_events);
600 tasklet_hi_schedule(&etr_tasklet);
601}
602
603/*
604 * Check if the etr mode is pss.
605 */
606static inline int etr_mode_is_pps(struct etr_eacr eacr)
607{
608 return eacr.es && !eacr.sl;
609}
610
611/*
612 * Check if the etr mode is etr.
613 */
614static inline int etr_mode_is_etr(struct etr_eacr eacr)
615{
616 return eacr.es && eacr.sl;
617}
618
619/*
620 * Check if the port can be used for TOD synchronization.
621 * For PPS mode the port has to receive OTEs. For ETR mode
622 * the port has to receive OTEs, the ETR stepping bit has to
623 * be zero and the validity bits for data frame 1, 2, and 3
624 * have to be 1.
625 */
626static int etr_port_valid(struct etr_aib *aib, int port)
627{
628 unsigned int psc;
629
630 /* Check that this port is receiving OTEs. */
631 if (aib->tsp == 0)
632 return 0;
633
634 psc = port ? aib->esw.psc1 : aib->esw.psc0;
635 if (psc == etr_lpsc_pps_mode)
636 return 1;
637 if (psc == etr_lpsc_operational_step)
638 return !aib->esw.y && aib->slsw.v1 &&
639 aib->slsw.v2 && aib->slsw.v3;
640 return 0;
641}
642
643/*
644 * Check if two ports are on the same network.
645 */
646static int etr_compare_network(struct etr_aib *aib1, struct etr_aib *aib2)
647{
648 // FIXME: any other fields we have to compare?
649 return aib1->edf1.net_id == aib2->edf1.net_id;
650}
651
652/*
653 * Wrapper for etr_stei that converts physical port states
654 * to logical port states to be consistent with the output
655 * of stetr (see etr_psc vs. etr_lpsc).
656 */
657static void etr_steai_cv(struct etr_aib *aib, unsigned int func)
658{
659 BUG_ON(etr_steai(aib, func) != 0);
660 /* Convert port state to logical port state. */
661 if (aib->esw.psc0 == 1)
662 aib->esw.psc0 = 2;
663 else if (aib->esw.psc0 == 0 && aib->esw.p == 0)
664 aib->esw.psc0 = 1;
665 if (aib->esw.psc1 == 1)
666 aib->esw.psc1 = 2;
667 else if (aib->esw.psc1 == 0 && aib->esw.p == 1)
668 aib->esw.psc1 = 1;
669}
670
671/*
672 * Check if the aib a2 is still connected to the same attachment as
673 * aib a1, the etv values differ by one and a2 is valid.
674 */
675static int etr_aib_follows(struct etr_aib *a1, struct etr_aib *a2, int p)
676{
677 int state_a1, state_a2;
678
679 /* Paranoia check: e0/e1 should better be the same. */
680 if (a1->esw.eacr.e0 != a2->esw.eacr.e0 ||
681 a1->esw.eacr.e1 != a2->esw.eacr.e1)
682 return 0;
683
684 /* Still connected to the same etr ? */
685 state_a1 = p ? a1->esw.psc1 : a1->esw.psc0;
686 state_a2 = p ? a2->esw.psc1 : a2->esw.psc0;
687 if (state_a1 == etr_lpsc_operational_step) {
688 if (state_a2 != etr_lpsc_operational_step ||
689 a1->edf1.net_id != a2->edf1.net_id ||
690 a1->edf1.etr_id != a2->edf1.etr_id ||
691 a1->edf1.etr_pn != a2->edf1.etr_pn)
692 return 0;
693 } else if (state_a2 != etr_lpsc_pps_mode)
694 return 0;
695
696 /* The ETV value of a2 needs to be ETV of a1 + 1. */
697 if (a1->edf2.etv + 1 != a2->edf2.etv)
698 return 0;
699
700 if (!etr_port_valid(a2, p))
701 return 0;
702
703 return 1;
704}
705
706/*
707 * The time is "clock". xtime is what we think the time is.
708 * Adjust the value by a multiple of jiffies and add the delta to ntp.
709 * "delay" is an approximation how long the synchronization took. If
710 * the time correction is positive, then "delay" is subtracted from
711 * the time difference and only the remaining part is passed to ntp.
712 */
713static void etr_adjust_time(unsigned long long clock, unsigned long long delay)
714{
715 unsigned long long delta, ticks;
716 struct timex adjust;
717
718 /*
719 * We don't have to take the xtime lock because the cpu
720 * executing etr_adjust_time is running disabled in
721 * tasklet context and all other cpus are looping in
722 * etr_sync_cpu_start.
723 */
724 if (clock > xtime_cc) {
725 /* It is later than we thought. */
726 delta = ticks = clock - xtime_cc;
727 delta = ticks = (delta < delay) ? 0 : delta - delay;
728 delta -= do_div(ticks, CLK_TICKS_PER_JIFFY);
729 init_timer_cc = init_timer_cc + delta;
730 jiffies_timer_cc = jiffies_timer_cc + delta;
731 xtime_cc = xtime_cc + delta;
732 adjust.offset = ticks * (1000000 / HZ);
733 } else {
734 /* It is earlier than we thought. */
735 delta = ticks = xtime_cc - clock;
736 delta -= do_div(ticks, CLK_TICKS_PER_JIFFY);
737 init_timer_cc = init_timer_cc - delta;
738 jiffies_timer_cc = jiffies_timer_cc - delta;
739 xtime_cc = xtime_cc - delta;
740 adjust.offset = -ticks * (1000000 / HZ);
741 }
742 if (adjust.offset != 0) {
743 printk(KERN_NOTICE "etr: time adjusted by %li micro-seconds\n",
744 adjust.offset);
745 adjust.modes = ADJ_OFFSET_SINGLESHOT;
746 do_adjtimex(&adjust);
747 }
748}
749
750#ifdef CONFIG_SMP
751static void etr_sync_cpu_start(void *dummy)
752{
753 int *in_sync = dummy;
754
755 etr_enable_sync_clock();
756 /*
757 * This looks like a busy wait loop but it isn't. etr_sync_cpus
758 * is called on all other cpus while the TOD clocks is stopped.
759 * __udelay will stop the cpu on an enabled wait psw until the
760 * TOD is running again.
761 */
762 while (*in_sync == 0) {
763 __udelay(1);
764 /*
765 * A different cpu changes *in_sync. Therefore use
766 * barrier() to force memory access.
767 */
768 barrier();
769 }
770 if (*in_sync != 1)
771 /* Didn't work. Clear per-cpu in sync bit again. */
772 etr_disable_sync_clock(NULL);
773 /*
774 * This round of TOD syncing is done. Set the clock comparator
775 * to the next tick and let the processor continue.
776 */
777 setup_jiffy_timer();
778}
779
780static void etr_sync_cpu_end(void *dummy)
781{
782}
783#endif /* CONFIG_SMP */
784
785/*
786 * Sync the TOD clock using the port refered to by aibp. This port
787 * has to be enabled and the other port has to be disabled. The
788 * last eacr update has to be more than 1.6 seconds in the past.
789 */
790static int etr_sync_clock(struct etr_aib *aib, int port)
791{
792 struct etr_aib *sync_port;
793 unsigned long long clock, delay;
794 int in_sync, follows;
795 int rc;
796
797 /* Check if the current aib is adjacent to the sync port aib. */
798 sync_port = (port == 0) ? &etr_port0 : &etr_port1;
799 follows = etr_aib_follows(sync_port, aib, port);
800 memcpy(sync_port, aib, sizeof(*aib));
801 if (!follows)
802 return -EAGAIN;
803
804 /*
805 * Catch all other cpus and make them wait until we have
806 * successfully synced the clock. smp_call_function will
807 * return after all other cpus are in etr_sync_cpu_start.
808 */
809 in_sync = 0;
810 preempt_disable();
811 smp_call_function(etr_sync_cpu_start,&in_sync,0,0);
812 local_irq_disable();
813 etr_enable_sync_clock();
814
815 /* Set clock to next OTE. */
816 __ctl_set_bit(14, 21);
817 __ctl_set_bit(0, 29);
818 clock = ((unsigned long long) (aib->edf2.etv + 1)) << 32;
819 if (set_clock(clock) == 0) {
820 __udelay(1); /* Wait for the clock to start. */
821 __ctl_clear_bit(0, 29);
822 __ctl_clear_bit(14, 21);
823 etr_stetr(aib);
824 /* Adjust Linux timing variables. */
825 delay = (unsigned long long)
826 (aib->edf2.etv - sync_port->edf2.etv) << 32;
827 etr_adjust_time(clock, delay);
828 setup_jiffy_timer();
829 /* Verify that the clock is properly set. */
830 if (!etr_aib_follows(sync_port, aib, port)) {
831 /* Didn't work. */
832 etr_disable_sync_clock(NULL);
833 in_sync = -EAGAIN;
834 rc = -EAGAIN;
835 } else {
836 in_sync = 1;
837 rc = 0;
838 }
839 } else {
840 /* Could not set the clock ?!? */
841 __ctl_clear_bit(0, 29);
842 __ctl_clear_bit(14, 21);
843 etr_disable_sync_clock(NULL);
844 in_sync = -EAGAIN;
845 rc = -EAGAIN;
846 }
847 local_irq_enable();
848 smp_call_function(etr_sync_cpu_end,NULL,0,0);
849 preempt_enable();
850 return rc;
851}
852
853/*
854 * Handle the immediate effects of the different events.
855 * The port change event is used for online/offline changes.
856 */
857static struct etr_eacr etr_handle_events(struct etr_eacr eacr)
858{
859 if (test_and_clear_bit(ETR_EVENT_SYNC_CHECK, &etr_events))
860 eacr.es = 0;
861 if (test_and_clear_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events))
862 eacr.es = eacr.sl = 0;
863 if (test_and_clear_bit(ETR_EVENT_PORT_ALERT, &etr_events))
864 etr_port0_uptodate = etr_port1_uptodate = 0;
865
866 if (test_and_clear_bit(ETR_EVENT_PORT0_CHANGE, &etr_events)) {
867 if (eacr.e0)
868 /*
869 * Port change of an enabled port. We have to
870 * assume that this can have caused an stepping
871 * port switch.
872 */
873 etr_tolec = get_clock();
874 eacr.p0 = etr_port0_online;
875 if (!eacr.p0)
876 eacr.e0 = 0;
877 etr_port0_uptodate = 0;
878 }
879 if (test_and_clear_bit(ETR_EVENT_PORT1_CHANGE, &etr_events)) {
880 if (eacr.e1)
881 /*
882 * Port change of an enabled port. We have to
883 * assume that this can have caused an stepping
884 * port switch.
885 */
886 etr_tolec = get_clock();
887 eacr.p1 = etr_port1_online;
888 if (!eacr.p1)
889 eacr.e1 = 0;
890 etr_port1_uptodate = 0;
891 }
892 clear_bit(ETR_EVENT_UPDATE, &etr_events);
893 return eacr;
894}
895
896/*
897 * Set up a timer that expires after the etr_tolec + 1.6 seconds if
898 * one of the ports needs an update.
899 */
900static void etr_set_tolec_timeout(unsigned long long now)
901{
902 unsigned long micros;
903
904 if ((!etr_eacr.p0 || etr_port0_uptodate) &&
905 (!etr_eacr.p1 || etr_port1_uptodate))
906 return;
907 micros = (now > etr_tolec) ? ((now - etr_tolec) >> 12) : 0;
908 micros = (micros > 1600000) ? 0 : 1600000 - micros;
909 mod_timer(&etr_timer, jiffies + (micros * HZ) / 1000000 + 1);
910}
911
912/*
913 * Set up a time that expires after 1/2 second.
914 */
915static void etr_set_sync_timeout(void)
916{
917 mod_timer(&etr_timer, jiffies + HZ/2);
918}
919
920/*
921 * Update the aib information for one or both ports.
922 */
923static struct etr_eacr etr_handle_update(struct etr_aib *aib,
924 struct etr_eacr eacr)
925{
926 /* With both ports disabled the aib information is useless. */
927 if (!eacr.e0 && !eacr.e1)
928 return eacr;
929
930 /* Update port0 or port1 with aib stored in etr_tasklet_fn. */
931 if (aib->esw.q == 0) {
932 /* Information for port 0 stored. */
933 if (eacr.p0 && !etr_port0_uptodate) {
934 etr_port0 = *aib;
935 if (etr_port0_online)
936 etr_port0_uptodate = 1;
937 }
938 } else {
939 /* Information for port 1 stored. */
940 if (eacr.p1 && !etr_port1_uptodate) {
941 etr_port1 = *aib;
942 if (etr_port0_online)
943 etr_port1_uptodate = 1;
944 }
945 }
946
947 /*
948 * Do not try to get the alternate port aib if the clock
949 * is not in sync yet.
950 */
951 if (!eacr.es)
952 return eacr;
953
954 /*
955 * If steai is available we can get the information about
956 * the other port immediately. If only stetr is available the
957 * data-port bit toggle has to be used.
958 */
959 if (test_bit(ETR_FLAG_STEAI, &etr_flags)) {
960 if (eacr.p0 && !etr_port0_uptodate) {
961 etr_steai_cv(&etr_port0, ETR_STEAI_PORT_0);
962 etr_port0_uptodate = 1;
963 }
964 if (eacr.p1 && !etr_port1_uptodate) {
965 etr_steai_cv(&etr_port1, ETR_STEAI_PORT_1);
966 etr_port1_uptodate = 1;
967 }
968 } else {
969 /*
970 * One port was updated above, if the other
971 * port is not uptodate toggle dp bit.
972 */
973 if ((eacr.p0 && !etr_port0_uptodate) ||
974 (eacr.p1 && !etr_port1_uptodate))
975 eacr.dp ^= 1;
976 else
977 eacr.dp = 0;
978 }
979 return eacr;
980}
981
982/*
983 * Write new etr control register if it differs from the current one.
984 * Return 1 if etr_tolec has been updated as well.
985 */
986static void etr_update_eacr(struct etr_eacr eacr)
987{
988 int dp_changed;
989
990 if (memcmp(&etr_eacr, &eacr, sizeof(eacr)) == 0)
991 /* No change, return. */
992 return;
993 /*
994 * The disable of an active port of the change of the data port
995 * bit can/will cause a change in the data port.
996 */
997 dp_changed = etr_eacr.e0 > eacr.e0 || etr_eacr.e1 > eacr.e1 ||
998 (etr_eacr.dp ^ eacr.dp) != 0;
999 etr_eacr = eacr;
1000 etr_setr(&etr_eacr);
1001 if (dp_changed)
1002 etr_tolec = get_clock();
1003}
1004
1005/*
1006 * ETR tasklet. In this function you'll find the main logic. In
1007 * particular this is the only function that calls etr_update_eacr(),
1008 * it "controls" the etr control register.
1009 */
1010static void etr_tasklet_fn(unsigned long dummy)
1011{
1012 unsigned long long now;
1013 struct etr_eacr eacr;
1014 struct etr_aib aib;
1015 int sync_port;
1016
1017 /* Create working copy of etr_eacr. */
1018 eacr = etr_eacr;
1019
1020 /* Check for the different events and their immediate effects. */
1021 eacr = etr_handle_events(eacr);
1022
1023 /* Check if ETR is supposed to be active. */
1024 eacr.ea = eacr.p0 || eacr.p1;
1025 if (!eacr.ea) {
1026 /* Both ports offline. Reset everything. */
1027 eacr.dp = eacr.es = eacr.sl = 0;
1028 on_each_cpu(etr_disable_sync_clock, NULL, 0, 1);
1029 del_timer_sync(&etr_timer);
1030 etr_update_eacr(eacr);
1031 set_bit(ETR_FLAG_EACCES, &etr_flags);
1032 return;
1033 }
1034
1035 /* Store aib to get the current ETR status word. */
1036 BUG_ON(etr_stetr(&aib) != 0);
1037 etr_port0.esw = etr_port1.esw = aib.esw; /* Copy status word. */
1038 now = get_clock();
1039
1040 /*
1041 * Update the port information if the last stepping port change
1042 * or data port change is older than 1.6 seconds.
1043 */
1044 if (now >= etr_tolec + (1600000 << 12))
1045 eacr = etr_handle_update(&aib, eacr);
1046
1047 /*
1048 * Select ports to enable. The prefered synchronization mode is PPS.
1049 * If a port can be enabled depends on a number of things:
1050 * 1) The port needs to be online and uptodate. A port is not
1051 * disabled just because it is not uptodate, but it is only
1052 * enabled if it is uptodate.
1053 * 2) The port needs to have the same mode (pps / etr).
1054 * 3) The port needs to be usable -> etr_port_valid() == 1
1055 * 4) To enable the second port the clock needs to be in sync.
1056 * 5) If both ports are useable and are ETR ports, the network id
1057 * has to be the same.
1058 * The eacr.sl bit is used to indicate etr mode vs. pps mode.
1059 */
1060 if (eacr.p0 && aib.esw.psc0 == etr_lpsc_pps_mode) {
1061 eacr.sl = 0;
1062 eacr.e0 = 1;
1063 if (!etr_mode_is_pps(etr_eacr))
1064 eacr.es = 0;
1065 if (!eacr.es || !eacr.p1 || aib.esw.psc1 != etr_lpsc_pps_mode)
1066 eacr.e1 = 0;
1067 // FIXME: uptodate checks ?
1068 else if (etr_port0_uptodate && etr_port1_uptodate)
1069 eacr.e1 = 1;
1070 sync_port = (etr_port0_uptodate &&
1071 etr_port_valid(&etr_port0, 0)) ? 0 : -1;
1072 clear_bit(ETR_FLAG_EACCES, &etr_flags);
1073 } else if (eacr.p1 && aib.esw.psc1 == etr_lpsc_pps_mode) {
1074 eacr.sl = 0;
1075 eacr.e0 = 0;
1076 eacr.e1 = 1;
1077 if (!etr_mode_is_pps(etr_eacr))
1078 eacr.es = 0;
1079 sync_port = (etr_port1_uptodate &&
1080 etr_port_valid(&etr_port1, 1)) ? 1 : -1;
1081 clear_bit(ETR_FLAG_EACCES, &etr_flags);
1082 } else if (eacr.p0 && aib.esw.psc0 == etr_lpsc_operational_step) {
1083 eacr.sl = 1;
1084 eacr.e0 = 1;
1085 if (!etr_mode_is_etr(etr_eacr))
1086 eacr.es = 0;
1087 if (!eacr.es || !eacr.p1 ||
1088 aib.esw.psc1 != etr_lpsc_operational_alt)
1089 eacr.e1 = 0;
1090 else if (etr_port0_uptodate && etr_port1_uptodate &&
1091 etr_compare_network(&etr_port0, &etr_port1))
1092 eacr.e1 = 1;
1093 sync_port = (etr_port0_uptodate &&
1094 etr_port_valid(&etr_port0, 0)) ? 0 : -1;
1095 clear_bit(ETR_FLAG_EACCES, &etr_flags);
1096 } else if (eacr.p1 && aib.esw.psc1 == etr_lpsc_operational_step) {
1097 eacr.sl = 1;
1098 eacr.e0 = 0;
1099 eacr.e1 = 1;
1100 if (!etr_mode_is_etr(etr_eacr))
1101 eacr.es = 0;
1102 sync_port = (etr_port1_uptodate &&
1103 etr_port_valid(&etr_port1, 1)) ? 1 : -1;
1104 clear_bit(ETR_FLAG_EACCES, &etr_flags);
1105 } else {
1106 /* Both ports not usable. */
1107 eacr.es = eacr.sl = 0;
1108 sync_port = -1;
1109 set_bit(ETR_FLAG_EACCES, &etr_flags);
1110 }
1111
1112 /*
1113 * If the clock is in sync just update the eacr and return.
1114 * If there is no valid sync port wait for a port update.
1115 */
1116 if (eacr.es || sync_port < 0) {
1117 etr_update_eacr(eacr);
1118 etr_set_tolec_timeout(now);
1119 return;
1120 }
1121
1122 /*
1123 * Prepare control register for clock syncing
1124 * (reset data port bit, set sync check control.
1125 */
1126 eacr.dp = 0;
1127 eacr.es = 1;
1128
1129 /*
1130 * Update eacr and try to synchronize the clock. If the update
1131 * of eacr caused a stepping port switch (or if we have to
1132 * assume that a stepping port switch has occured) or the
1133 * clock syncing failed, reset the sync check control bit
1134 * and set up a timer to try again after 0.5 seconds
1135 */
1136 etr_update_eacr(eacr);
1137 if (now < etr_tolec + (1600000 << 12) ||
1138 etr_sync_clock(&aib, sync_port) != 0) {
1139 /* Sync failed. Try again in 1/2 second. */
1140 eacr.es = 0;
1141 etr_update_eacr(eacr);
1142 etr_set_sync_timeout();
1143 } else
1144 etr_set_tolec_timeout(now);
1145}
1146
1147/*
1148 * Sysfs interface functions
1149 */
1150static struct sysdev_class etr_sysclass = {
1151 set_kset_name("etr")
1152};
1153
1154static struct sys_device etr_port0_dev = {
1155 .id = 0,
1156 .cls = &etr_sysclass,
1157};
1158
1159static struct sys_device etr_port1_dev = {
1160 .id = 1,
1161 .cls = &etr_sysclass,
1162};
1163
1164/*
1165 * ETR class attributes
1166 */
1167static ssize_t etr_stepping_port_show(struct sysdev_class *class, char *buf)
1168{
1169 return sprintf(buf, "%i\n", etr_port0.esw.p);
1170}
1171
1172static SYSDEV_CLASS_ATTR(stepping_port, 0400, etr_stepping_port_show, NULL);
1173
1174static ssize_t etr_stepping_mode_show(struct sysdev_class *class, char *buf)
1175{
1176 char *mode_str;
1177
1178 if (etr_mode_is_pps(etr_eacr))
1179 mode_str = "pps";
1180 else if (etr_mode_is_etr(etr_eacr))
1181 mode_str = "etr";
1182 else
1183 mode_str = "local";
1184 return sprintf(buf, "%s\n", mode_str);
1185}
1186
1187static SYSDEV_CLASS_ATTR(stepping_mode, 0400, etr_stepping_mode_show, NULL);
1188
1189/*
1190 * ETR port attributes
1191 */
1192static inline struct etr_aib *etr_aib_from_dev(struct sys_device *dev)
1193{
1194 if (dev == &etr_port0_dev)
1195 return etr_port0_online ? &etr_port0 : NULL;
1196 else
1197 return etr_port1_online ? &etr_port1 : NULL;
1198}
1199
1200static ssize_t etr_online_show(struct sys_device *dev, char *buf)
1201{
1202 unsigned int online;
1203
1204 online = (dev == &etr_port0_dev) ? etr_port0_online : etr_port1_online;
1205 return sprintf(buf, "%i\n", online);
1206}
1207
1208static ssize_t etr_online_store(struct sys_device *dev,
1209 const char *buf, size_t count)
1210{
1211 unsigned int value;
1212
1213 value = simple_strtoul(buf, NULL, 0);
1214 if (value != 0 && value != 1)
1215 return -EINVAL;
1216 if (test_bit(ETR_FLAG_ENOSYS, &etr_flags))
1217 return -ENOSYS;
1218 if (dev == &etr_port0_dev) {
1219 if (etr_port0_online == value)
1220 return count; /* Nothing to do. */
1221 etr_port0_online = value;
1222 set_bit(ETR_EVENT_PORT0_CHANGE, &etr_events);
1223 tasklet_hi_schedule(&etr_tasklet);
1224 } else {
1225 if (etr_port1_online == value)
1226 return count; /* Nothing to do. */
1227 etr_port1_online = value;
1228 set_bit(ETR_EVENT_PORT1_CHANGE, &etr_events);
1229 tasklet_hi_schedule(&etr_tasklet);
1230 }
1231 return count;
1232}
1233
1234static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store);
1235
1236static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf)
1237{
1238 return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ?
1239 etr_eacr.e0 : etr_eacr.e1);
1240}
1241
1242static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL);
1243
1244static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf)
1245{
1246 if (!etr_port0_online && !etr_port1_online)
1247 /* Status word is not uptodate if both ports are offline. */
1248 return -ENODATA;
1249 return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ?
1250 etr_port0.esw.psc0 : etr_port0.esw.psc1);
1251}
1252
1253static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL);
1254
1255static ssize_t etr_untuned_show(struct sys_device *dev, char *buf)
1256{
1257 struct etr_aib *aib = etr_aib_from_dev(dev);
1258
1259 if (!aib || !aib->slsw.v1)
1260 return -ENODATA;
1261 return sprintf(buf, "%i\n", aib->edf1.u);
1262}
1263
1264static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL);
1265
1266static ssize_t etr_network_id_show(struct sys_device *dev, char *buf)
1267{
1268 struct etr_aib *aib = etr_aib_from_dev(dev);
1269
1270 if (!aib || !aib->slsw.v1)
1271 return -ENODATA;
1272 return sprintf(buf, "%i\n", aib->edf1.net_id);
1273}
1274
1275static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL);
1276
1277static ssize_t etr_id_show(struct sys_device *dev, char *buf)
1278{
1279 struct etr_aib *aib = etr_aib_from_dev(dev);
1280
1281 if (!aib || !aib->slsw.v1)
1282 return -ENODATA;
1283 return sprintf(buf, "%i\n", aib->edf1.etr_id);
1284}
1285
1286static SYSDEV_ATTR(id, 0400, etr_id_show, NULL);
1287
1288static ssize_t etr_port_number_show(struct sys_device *dev, char *buf)
1289{
1290 struct etr_aib *aib = etr_aib_from_dev(dev);
1291
1292 if (!aib || !aib->slsw.v1)
1293 return -ENODATA;
1294 return sprintf(buf, "%i\n", aib->edf1.etr_pn);
1295}
1296
1297static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL);
1298
1299static ssize_t etr_coupled_show(struct sys_device *dev, char *buf)
1300{
1301 struct etr_aib *aib = etr_aib_from_dev(dev);
1302
1303 if (!aib || !aib->slsw.v3)
1304 return -ENODATA;
1305 return sprintf(buf, "%i\n", aib->edf3.c);
1306}
1307
1308static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL);
1309
1310static ssize_t etr_local_time_show(struct sys_device *dev, char *buf)
1311{
1312 struct etr_aib *aib = etr_aib_from_dev(dev);
1313
1314 if (!aib || !aib->slsw.v3)
1315 return -ENODATA;
1316 return sprintf(buf, "%i\n", aib->edf3.blto);
1317}
1318
1319static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL);
1320
1321static ssize_t etr_utc_offset_show(struct sys_device *dev, char *buf)
1322{
1323 struct etr_aib *aib = etr_aib_from_dev(dev);
1324
1325 if (!aib || !aib->slsw.v3)
1326 return -ENODATA;
1327 return sprintf(buf, "%i\n", aib->edf3.buo);
1328}
1329
1330static SYSDEV_ATTR(utc_offset, 0400, etr_utc_offset_show, NULL);
1331
1332static struct sysdev_attribute *etr_port_attributes[] = {
1333 &attr_online,
1334 &attr_stepping_control,
1335 &attr_state_code,
1336 &attr_untuned,
1337 &attr_network,
1338 &attr_id,
1339 &attr_port,
1340 &attr_coupled,
1341 &attr_local_time,
1342 &attr_utc_offset,
1343 NULL
1344};
1345
1346static int __init etr_register_port(struct sys_device *dev)
1347{
1348 struct sysdev_attribute **attr;
1349 int rc;
1350
1351 rc = sysdev_register(dev);
1352 if (rc)
1353 goto out;
1354 for (attr = etr_port_attributes; *attr; attr++) {
1355 rc = sysdev_create_file(dev, *attr);
1356 if (rc)
1357 goto out_unreg;
1358 }
1359 return 0;
1360out_unreg:
1361 for (; attr >= etr_port_attributes; attr--)
1362 sysdev_remove_file(dev, *attr);
1363 sysdev_unregister(dev);
1364out:
1365 return rc;
1366}
1367
1368static void __init etr_unregister_port(struct sys_device *dev)
1369{
1370 struct sysdev_attribute **attr;
1371
1372 for (attr = etr_port_attributes; *attr; attr++)
1373 sysdev_remove_file(dev, *attr);
1374 sysdev_unregister(dev);
1375}
1376
1377static int __init etr_init_sysfs(void)
1378{
1379 int rc;
1380
1381 rc = sysdev_class_register(&etr_sysclass);
1382 if (rc)
1383 goto out;
1384 rc = sysdev_class_create_file(&etr_sysclass, &attr_stepping_port);
1385 if (rc)
1386 goto out_unreg_class;
1387 rc = sysdev_class_create_file(&etr_sysclass, &attr_stepping_mode);
1388 if (rc)
1389 goto out_remove_stepping_port;
1390 rc = etr_register_port(&etr_port0_dev);
1391 if (rc)
1392 goto out_remove_stepping_mode;
1393 rc = etr_register_port(&etr_port1_dev);
1394 if (rc)
1395 goto out_remove_port0;
1396 return 0;
1397
1398out_remove_port0:
1399 etr_unregister_port(&etr_port0_dev);
1400out_remove_stepping_mode:
1401 sysdev_class_remove_file(&etr_sysclass, &attr_stepping_mode);
1402out_remove_stepping_port:
1403 sysdev_class_remove_file(&etr_sysclass, &attr_stepping_port);
1404out_unreg_class:
1405 sysdev_class_unregister(&etr_sysclass);
1406out:
1407 return rc;
348} 1408}
349 1409
1410device_initcall(etr_init_sysfs);
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 3cbb0dcf1f1d..f0e5a320e2ec 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -283,7 +283,7 @@ char *task_show_regs(struct task_struct *task, char *buffer)
283 return buffer; 283 return buffer;
284} 284}
285 285
286DEFINE_SPINLOCK(die_lock); 286static DEFINE_SPINLOCK(die_lock);
287 287
288void die(const char * str, struct pt_regs * regs, long err) 288void die(const char * str, struct pt_regs * regs, long err)
289{ 289{
@@ -364,8 +364,7 @@ void __kprobes do_single_step(struct pt_regs *regs)
364 force_sig(SIGTRAP, current); 364 force_sig(SIGTRAP, current);
365} 365}
366 366
367asmlinkage void 367static void default_trap_handler(struct pt_regs * regs, long interruption_code)
368default_trap_handler(struct pt_regs * regs, long interruption_code)
369{ 368{
370 if (regs->psw.mask & PSW_MASK_PSTATE) { 369 if (regs->psw.mask & PSW_MASK_PSTATE) {
371 local_irq_enable(); 370 local_irq_enable();
@@ -376,7 +375,7 @@ default_trap_handler(struct pt_regs * regs, long interruption_code)
376} 375}
377 376
378#define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \ 377#define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \
379asmlinkage void name(struct pt_regs * regs, long interruption_code) \ 378static void name(struct pt_regs * regs, long interruption_code) \
380{ \ 379{ \
381 siginfo_t info; \ 380 siginfo_t info; \
382 info.si_signo = signr; \ 381 info.si_signo = signr; \
@@ -442,7 +441,7 @@ do_fp_trap(struct pt_regs *regs, void __user *location,
442 "floating point exception", regs, &si); 441 "floating point exception", regs, &si);
443} 442}
444 443
445asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) 444static void illegal_op(struct pt_regs * regs, long interruption_code)
446{ 445{
447 siginfo_t info; 446 siginfo_t info;
448 __u8 opcode[6]; 447 __u8 opcode[6];
@@ -491,8 +490,15 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
491#endif 490#endif
492 } else 491 } else
493 signal = SIGILL; 492 signal = SIGILL;
494 } else 493 } else {
495 signal = SIGILL; 494 /*
495 * If we get an illegal op in kernel mode, send it through the
496 * kprobes notifier. If kprobes doesn't pick it up, SIGILL
497 */
498 if (notify_die(DIE_BPT, "bpt", regs, interruption_code,
499 3, SIGTRAP) != NOTIFY_STOP)
500 signal = SIGILL;
501 }
496 502
497#ifdef CONFIG_MATHEMU 503#ifdef CONFIG_MATHEMU
498 if (signal == SIGFPE) 504 if (signal == SIGFPE)
@@ -585,7 +591,7 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception,
585 ILL_ILLOPN, get_check_address(regs)); 591 ILL_ILLOPN, get_check_address(regs));
586#endif 592#endif
587 593
588asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) 594static void data_exception(struct pt_regs * regs, long interruption_code)
589{ 595{
590 __u16 __user *location; 596 __u16 __user *location;
591 int signal = 0; 597 int signal = 0;
@@ -675,7 +681,7 @@ asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
675 } 681 }
676} 682}
677 683
678asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) 684static void space_switch_exception(struct pt_regs * regs, long int_code)
679{ 685{
680 siginfo_t info; 686 siginfo_t info;
681 687
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index fe0f2e97ba7b..c30716ae130c 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -31,18 +31,19 @@ SECTIONS
31 31
32 _etext = .; /* End of text section */ 32 _etext = .; /* End of text section */
33 33
34 . = ALIGN(16); /* Exception table */
35 __start___ex_table = .;
36 __ex_table : { *(__ex_table) }
37 __stop___ex_table = .;
38
39 RODATA 34 RODATA
40 35
41#ifdef CONFIG_SHARED_KERNEL 36#ifdef CONFIG_SHARED_KERNEL
42 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ 37 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
38#endif
43 39
40 . = ALIGN(4096);
44 _eshared = .; /* End of shareable data */ 41 _eshared = .; /* End of shareable data */
45#endif 42
43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
46 47
47 .data : { /* Data */ 48 .data : { /* Data */
48 *(.data) 49 *(.data)
@@ -90,11 +91,14 @@ SECTIONS
90 .con_initcall.init : { *(.con_initcall.init) } 91 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .; 92 __con_initcall_end = .;
92 SECURITY_INIT 93 SECURITY_INIT
94
95#ifdef CONFIG_BLK_DEV_INITRD
93 . = ALIGN(256); 96 . = ALIGN(256);
94 __initramfs_start = .; 97 __initramfs_start = .;
95 .init.ramfs : { *(.init.initramfs) } 98 .init.ramfs : { *(.init.initramfs) }
96 . = ALIGN(2); 99 . = ALIGN(2);
97 __initramfs_end = .; 100 __initramfs_end = .;
101#endif
98 . = ALIGN(256); 102 . = ALIGN(256);
99 __per_cpu_start = .; 103 __per_cpu_start = .;
100 .data.percpu : { *(.data.percpu) } 104 .data.percpu : { *(.data.percpu) }
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 21baaf5496d6..9d5b02801b46 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -25,7 +25,7 @@
25#include <asm/irq_regs.h> 25#include <asm/irq_regs.h>
26 26
27static ext_int_info_t ext_int_info_timer; 27static ext_int_info_t ext_int_info_timer;
28DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); 28static DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
29 29
30#ifdef CONFIG_VIRT_CPU_ACCOUNTING 30#ifdef CONFIG_VIRT_CPU_ACCOUNTING
31/* 31/*
@@ -524,16 +524,15 @@ EXPORT_SYMBOL(del_virt_timer);
524void init_cpu_vtimer(void) 524void init_cpu_vtimer(void)
525{ 525{
526 struct vtimer_queue *vt_list; 526 struct vtimer_queue *vt_list;
527 unsigned long cr0;
528 527
529 /* kick the virtual timer */ 528 /* kick the virtual timer */
530 S390_lowcore.exit_timer = VTIMER_MAX_SLICE; 529 S390_lowcore.exit_timer = VTIMER_MAX_SLICE;
531 S390_lowcore.last_update_timer = VTIMER_MAX_SLICE; 530 S390_lowcore.last_update_timer = VTIMER_MAX_SLICE;
532 asm volatile ("SPT %0" : : "m" (S390_lowcore.last_update_timer)); 531 asm volatile ("SPT %0" : : "m" (S390_lowcore.last_update_timer));
533 asm volatile ("STCK %0" : "=m" (S390_lowcore.last_update_clock)); 532 asm volatile ("STCK %0" : "=m" (S390_lowcore.last_update_clock));
534 __ctl_store(cr0, 0, 0); 533
535 cr0 |= 0x400; 534 /* enable cpu timer interrupts */
536 __ctl_load(cr0, 0, 0); 535 __ctl_set_bit(0,10);
537 536
538 vt_list = &per_cpu(virt_cpu_timer, smp_processor_id()); 537 vt_list = &per_cpu(virt_cpu_timer, smp_processor_id());
539 INIT_LIST_HEAD(&vt_list->list); 538 INIT_LIST_HEAD(&vt_list->list);
@@ -572,6 +571,7 @@ void __init vtime_init(void)
572 if (register_idle_notifier(&vtimer_idle_nb)) 571 if (register_idle_notifier(&vtimer_idle_nb))
573 panic("Couldn't register idle notifier"); 572 panic("Couldn't register idle notifier");
574 573
574 /* Enable cpu timer interrupts on the boot cpu. */
575 init_cpu_vtimer(); 575 init_cpu_vtimer();
576} 576}
577 577
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index b5f94cf3bde8..7a44fed21b35 100644
--- a/arch/s390/lib/Makefile
+++ b/arch/s390/lib/Makefile
@@ -4,7 +4,7 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7lib-y += delay.o string.o uaccess_std.o uaccess_pt.o 7lib-y += delay.o string.o uaccess_std.o uaccess_pt.o qrnnd.o
8lib-$(CONFIG_32BIT) += div64.o 8lib-$(CONFIG_32BIT) += div64.o
9lib-$(CONFIG_64BIT) += uaccess_mvcos.o 9lib-$(CONFIG_64BIT) += uaccess_mvcos.o
10lib-$(CONFIG_SMP) += spinlock.o 10lib-$(CONFIG_SMP) += spinlock.o
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index 027c4742a001..70f2a862b670 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/s390/kernel/delay.c 2 * arch/s390/lib/delay.c
3 * Precise Delay Loops for S390 3 * Precise Delay Loops for S390
4 * 4 *
5 * S390 version 5 * S390 version
@@ -13,10 +13,9 @@
13 13
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16 16#include <linux/timex.h>
17#ifdef CONFIG_SMP 17#include <linux/irqflags.h>
18#include <asm/smp.h> 18#include <linux/interrupt.h>
19#endif
20 19
21void __delay(unsigned long loops) 20void __delay(unsigned long loops)
22{ 21{
@@ -31,17 +30,45 @@ void __delay(unsigned long loops)
31} 30}
32 31
33/* 32/*
34 * Waits for 'usecs' microseconds using the tod clock, giving up the time slice 33 * Waits for 'usecs' microseconds using the TOD clock comparator.
35 * of the virtual PU inbetween to avoid congestion.
36 */ 34 */
37void __udelay(unsigned long usecs) 35void __udelay(unsigned long usecs)
38{ 36{
39 uint64_t start_cc; 37 u64 end, time, jiffy_timer = 0;
38 unsigned long flags, cr0, mask, dummy;
39 int irq_context;
40
41 irq_context = in_interrupt();
42 if (!irq_context)
43 local_bh_disable();
44 local_irq_save(flags);
45 if (raw_irqs_disabled_flags(flags)) {
46 jiffy_timer = S390_lowcore.jiffy_timer;
47 S390_lowcore.jiffy_timer = -1ULL - (4096 << 12);
48 __ctl_store(cr0, 0, 0);
49 dummy = (cr0 & 0xffff00e0) | 0x00000800;
50 __ctl_load(dummy , 0, 0);
51 mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT;
52 } else
53 mask = psw_kernel_bits | PSW_MASK_WAIT |
54 PSW_MASK_EXT | PSW_MASK_IO;
55
56 end = get_clock() + ((u64) usecs << 12);
57 do {
58 time = end < S390_lowcore.jiffy_timer ?
59 end : S390_lowcore.jiffy_timer;
60 set_clock_comparator(time);
61 trace_hardirqs_on();
62 __load_psw_mask(mask);
63 local_irq_disable();
64 } while (get_clock() < end);
40 65
41 if (usecs == 0) 66 if (raw_irqs_disabled_flags(flags)) {
42 return; 67 __ctl_load(cr0, 0, 0);
43 start_cc = get_clock(); 68 S390_lowcore.jiffy_timer = jiffy_timer;
44 do { 69 }
45 cpu_relax(); 70 if (!irq_context)
46 } while (((get_clock() - start_cc)/4096) < usecs); 71 _local_bh_enable();
72 set_clock_comparator(S390_lowcore.jiffy_timer);
73 local_irq_restore(flags);
47} 74}
diff --git a/arch/s390/lib/qrnnd.S b/arch/s390/lib/qrnnd.S
new file mode 100644
index 000000000000..eb1df632e749
--- /dev/null
+++ b/arch/s390/lib/qrnnd.S
@@ -0,0 +1,77 @@
1# S/390 __udiv_qrnnd
2
3# r2 : &__r
4# r3 : upper half of 64 bit word n
5# r4 : lower half of 64 bit word n
6# r5 : divisor d
7# the reminder r of the division is to be stored to &__r and
8# the quotient q is to be returned
9
10 .text
11 .globl __udiv_qrnnd
12__udiv_qrnnd:
13 st %r2,24(%r15) # store pointer to reminder for later
14 lr %r0,%r3 # reload n
15 lr %r1,%r4
16 ltr %r2,%r5 # reload and test divisor
17 jp 5f
18 # divisor >= 0x80000000
19 srdl %r0,2 # n/4
20 srl %r2,1 # d/2
21 slr %r1,%r2 # special case if last bit of d is set
22 brc 3,0f # (n/4) div (n/2) can overflow by 1
23 ahi %r0,-1 # trick: subtract n/2, then divide
240: dr %r0,%r2 # signed division
25 ahi %r1,1 # trick part 2: add 1 to the quotient
26 # now (n >> 2) = (d >> 1) * %r1 + %r0
27 lhi %r3,1
28 nr %r3,%r1 # test last bit of q
29 jz 1f
30 alr %r0,%r2 # add (d>>1) to r
311: srl %r1,1 # q >>= 1
32 # now (n >> 2) = (d&-2) * %r1 + %r0
33 lhi %r3,1
34 nr %r3,%r5 # test last bit of d
35 jz 2f
36 slr %r0,%r1 # r -= q
37 brc 3,2f # borrow ?
38 alr %r0,%r5 # r += d
39 ahi %r1,-1
402: # now (n >> 2) = d * %r1 + %r0
41 alr %r1,%r1 # q <<= 1
42 alr %r0,%r0 # r <<= 1
43 brc 12,3f # overflow on r ?
44 slr %r0,%r5 # r -= d
45 ahi %r1,1 # q += 1
463: lhi %r3,2
47 nr %r3,%r4 # test next to last bit of n
48 jz 4f
49 ahi %r0,1 # r += 1
504: clr %r0,%r5 # r >= d ?
51 jl 6f
52 slr %r0,%r5 # r -= d
53 ahi %r1,1 # q += 1
54 # now (n >> 1) = d * %r1 + %r0
55 j 6f
565: # divisor < 0x80000000
57 srdl %r0,1
58 dr %r0,%r2 # signed division
59 # now (n >> 1) = d * %r1 + %r0
606: alr %r1,%r1 # q <<= 1
61 alr %r0,%r0 # r <<= 1
62 brc 12,7f # overflow on r ?
63 slr %r0,%r5 # r -= d
64 ahi %r1,1 # q += 1
657: lhi %r3,1
66 nr %r3,%r4 # isolate last bit of n
67 alr %r0,%r3 # r += (n & 1)
68 clr %r0,%r5 # r >= d ?
69 jl 8f
70 slr %r0,%r5 # r -= d
71 ahi %r1,1 # q += 1
728: # now n = d * %r1 + %r0
73 l %r2,24(%r15)
74 st %r0,0(%r2)
75 lr %r2,%r1
76 br %r14
77 .end __udiv_qrnnd
diff --git a/arch/s390/lib/uaccess.h b/arch/s390/lib/uaccess.h
new file mode 100644
index 000000000000..126011df14f1
--- /dev/null
+++ b/arch/s390/lib/uaccess.h
@@ -0,0 +1,23 @@
1/*
2 * arch/s390/uaccess.h
3 *
4 * Copyright IBM Corp. 2007
5 *
6 */
7
8#ifndef __ARCH_S390_LIB_UACCESS_H
9#define __ARCH_S390_LIB_UACCESS_H
10
11extern size_t copy_from_user_std(size_t, const void __user *, void *);
12extern size_t copy_to_user_std(size_t, void __user *, const void *);
13extern size_t strnlen_user_std(size_t, const char __user *);
14extern size_t strncpy_from_user_std(size_t, const char __user *, char *);
15extern int futex_atomic_cmpxchg_std(int __user *, int, int);
16extern int futex_atomic_op_std(int, int __user *, int, int *);
17
18extern size_t copy_from_user_pt(size_t, const void __user *, void *);
19extern size_t copy_to_user_pt(size_t, void __user *, const void *);
20extern int futex_atomic_op_pt(int, int __user *, int, int *);
21extern int futex_atomic_cmpxchg_pt(int __user *, int, int);
22
23#endif /* __ARCH_S390_LIB_UACCESS_H */
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c
index f9a23d57eb79..6d8772339d76 100644
--- a/arch/s390/lib/uaccess_mvcos.c
+++ b/arch/s390/lib/uaccess_mvcos.c
@@ -12,6 +12,7 @@
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <asm/uaccess.h> 13#include <asm/uaccess.h>
14#include <asm/futex.h> 14#include <asm/futex.h>
15#include "uaccess.h"
15 16
16#ifndef __s390x__ 17#ifndef __s390x__
17#define AHI "ahi" 18#define AHI "ahi"
@@ -27,10 +28,7 @@
27#define SLR "slgr" 28#define SLR "slgr"
28#endif 29#endif
29 30
30extern size_t copy_from_user_std(size_t, const void __user *, void *); 31static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x)
31extern size_t copy_to_user_std(size_t, void __user *, const void *);
32
33size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x)
34{ 32{
35 register unsigned long reg0 asm("0") = 0x81UL; 33 register unsigned long reg0 asm("0") = 0x81UL;
36 unsigned long tmp1, tmp2; 34 unsigned long tmp1, tmp2;
@@ -69,14 +67,14 @@ size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x)
69 return size; 67 return size;
70} 68}
71 69
72size_t copy_from_user_mvcos_check(size_t size, const void __user *ptr, void *x) 70static size_t copy_from_user_mvcos_check(size_t size, const void __user *ptr, void *x)
73{ 71{
74 if (size <= 256) 72 if (size <= 256)
75 return copy_from_user_std(size, ptr, x); 73 return copy_from_user_std(size, ptr, x);
76 return copy_from_user_mvcos(size, ptr, x); 74 return copy_from_user_mvcos(size, ptr, x);
77} 75}
78 76
79size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) 77static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x)
80{ 78{
81 register unsigned long reg0 asm("0") = 0x810000UL; 79 register unsigned long reg0 asm("0") = 0x810000UL;
82 unsigned long tmp1, tmp2; 80 unsigned long tmp1, tmp2;
@@ -105,14 +103,16 @@ size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x)
105 return size; 103 return size;
106} 104}
107 105
108size_t copy_to_user_mvcos_check(size_t size, void __user *ptr, const void *x) 106static size_t copy_to_user_mvcos_check(size_t size, void __user *ptr,
107 const void *x)
109{ 108{
110 if (size <= 256) 109 if (size <= 256)
111 return copy_to_user_std(size, ptr, x); 110 return copy_to_user_std(size, ptr, x);
112 return copy_to_user_mvcos(size, ptr, x); 111 return copy_to_user_mvcos(size, ptr, x);
113} 112}
114 113
115size_t copy_in_user_mvcos(size_t size, void __user *to, const void __user *from) 114static size_t copy_in_user_mvcos(size_t size, void __user *to,
115 const void __user *from)
116{ 116{
117 register unsigned long reg0 asm("0") = 0x810081UL; 117 register unsigned long reg0 asm("0") = 0x810081UL;
118 unsigned long tmp1, tmp2; 118 unsigned long tmp1, tmp2;
@@ -134,7 +134,7 @@ size_t copy_in_user_mvcos(size_t size, void __user *to, const void __user *from)
134 return size; 134 return size;
135} 135}
136 136
137size_t clear_user_mvcos(size_t size, void __user *to) 137static size_t clear_user_mvcos(size_t size, void __user *to)
138{ 138{
139 register unsigned long reg0 asm("0") = 0x810000UL; 139 register unsigned long reg0 asm("0") = 0x810000UL;
140 unsigned long tmp1, tmp2; 140 unsigned long tmp1, tmp2;
@@ -162,10 +162,43 @@ size_t clear_user_mvcos(size_t size, void __user *to)
162 return size; 162 return size;
163} 163}
164 164
165extern size_t strnlen_user_std(size_t, const char __user *); 165static size_t strnlen_user_mvcos(size_t count, const char __user *src)
166extern size_t strncpy_from_user_std(size_t, const char __user *, char *); 166{
167extern int futex_atomic_op(int, int __user *, int, int *); 167 char buf[256];
168extern int futex_atomic_cmpxchg(int __user *, int, int); 168 int rc;
169 size_t done, len, len_str;
170
171 done = 0;
172 do {
173 len = min(count - done, (size_t) 256);
174 rc = uaccess.copy_from_user(len, src + done, buf);
175 if (unlikely(rc == len))
176 return 0;
177 len -= rc;
178 len_str = strnlen(buf, len);
179 done += len_str;
180 } while ((len_str == len) && (done < count));
181 return done + 1;
182}
183
184static size_t strncpy_from_user_mvcos(size_t count, const char __user *src,
185 char *dst)
186{
187 int rc;
188 size_t done, len, len_str;
189
190 done = 0;
191 do {
192 len = min(count - done, (size_t) 4096);
193 rc = uaccess.copy_from_user(len, src + done, dst);
194 if (unlikely(rc == len))
195 return -EFAULT;
196 len -= rc;
197 len_str = strnlen(dst, len);
198 done += len_str;
199 } while ((len_str == len) && (done < count));
200 return done;
201}
169 202
170struct uaccess_ops uaccess_mvcos = { 203struct uaccess_ops uaccess_mvcos = {
171 .copy_from_user = copy_from_user_mvcos_check, 204 .copy_from_user = copy_from_user_mvcos_check,
@@ -176,6 +209,21 @@ struct uaccess_ops uaccess_mvcos = {
176 .clear_user = clear_user_mvcos, 209 .clear_user = clear_user_mvcos,
177 .strnlen_user = strnlen_user_std, 210 .strnlen_user = strnlen_user_std,
178 .strncpy_from_user = strncpy_from_user_std, 211 .strncpy_from_user = strncpy_from_user_std,
179 .futex_atomic_op = futex_atomic_op, 212 .futex_atomic_op = futex_atomic_op_std,
180 .futex_atomic_cmpxchg = futex_atomic_cmpxchg, 213 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std,
214};
215
216#ifdef CONFIG_S390_SWITCH_AMODE
217struct uaccess_ops uaccess_mvcos_switch = {
218 .copy_from_user = copy_from_user_mvcos,
219 .copy_from_user_small = copy_from_user_mvcos,
220 .copy_to_user = copy_to_user_mvcos,
221 .copy_to_user_small = copy_to_user_mvcos,
222 .copy_in_user = copy_in_user_mvcos,
223 .clear_user = clear_user_mvcos,
224 .strnlen_user = strnlen_user_mvcos,
225 .strncpy_from_user = strncpy_from_user_mvcos,
226 .futex_atomic_op = futex_atomic_op_pt,
227 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt,
181}; 228};
229#endif
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c
index 49c3e46b4065..63181671e3e3 100644
--- a/arch/s390/lib/uaccess_pt.c
+++ b/arch/s390/lib/uaccess_pt.c
@@ -1,7 +1,8 @@
1/* 1/*
2 * arch/s390/lib/uaccess_pt.c 2 * arch/s390/lib/uaccess_pt.c
3 * 3 *
4 * User access functions based on page table walks. 4 * User access functions based on page table walks for enhanced
5 * system layout without hardware support.
5 * 6 *
6 * Copyright IBM Corp. 2006 7 * Copyright IBM Corp. 2006
7 * Author(s): Gerald Schaefer (gerald.schaefer@de.ibm.com) 8 * Author(s): Gerald Schaefer (gerald.schaefer@de.ibm.com)
@@ -12,9 +13,10 @@
12#include <linux/mm.h> 13#include <linux/mm.h>
13#include <asm/uaccess.h> 14#include <asm/uaccess.h>
14#include <asm/futex.h> 15#include <asm/futex.h>
16#include "uaccess.h"
15 17
16static inline int __handle_fault(struct mm_struct *mm, unsigned long address, 18static int __handle_fault(struct mm_struct *mm, unsigned long address,
17 int write_access) 19 int write_access)
18{ 20{
19 struct vm_area_struct *vma; 21 struct vm_area_struct *vma;
20 int ret = -EFAULT; 22 int ret = -EFAULT;
@@ -79,8 +81,8 @@ out_sigbus:
79 return ret; 81 return ret;
80} 82}
81 83
82static inline size_t __user_copy_pt(unsigned long uaddr, void *kptr, 84static size_t __user_copy_pt(unsigned long uaddr, void *kptr,
83 size_t n, int write_user) 85 size_t n, int write_user)
84{ 86{
85 struct mm_struct *mm = current->mm; 87 struct mm_struct *mm = current->mm;
86 unsigned long offset, pfn, done, size; 88 unsigned long offset, pfn, done, size;
@@ -133,6 +135,49 @@ fault:
133 goto retry; 135 goto retry;
134} 136}
135 137
138/*
139 * Do DAT for user address by page table walk, return kernel address.
140 * This function needs to be called with current->mm->page_table_lock held.
141 */
142static unsigned long __dat_user_addr(unsigned long uaddr)
143{
144 struct mm_struct *mm = current->mm;
145 unsigned long pfn, ret;
146 pgd_t *pgd;
147 pmd_t *pmd;
148 pte_t *pte;
149 int rc;
150
151 ret = 0;
152retry:
153 pgd = pgd_offset(mm, uaddr);
154 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
155 goto fault;
156
157 pmd = pmd_offset(pgd, uaddr);
158 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
159 goto fault;
160
161 pte = pte_offset_map(pmd, uaddr);
162 if (!pte || !pte_present(*pte))
163 goto fault;
164
165 pfn = pte_pfn(*pte);
166 if (!pfn_valid(pfn))
167 goto out;
168
169 ret = (pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE - 1));
170out:
171 return ret;
172fault:
173 spin_unlock(&mm->page_table_lock);
174 rc = __handle_fault(mm, uaddr, 0);
175 spin_lock(&mm->page_table_lock);
176 if (rc)
177 goto out;
178 goto retry;
179}
180
136size_t copy_from_user_pt(size_t n, const void __user *from, void *to) 181size_t copy_from_user_pt(size_t n, const void __user *from, void *to)
137{ 182{
138 size_t rc; 183 size_t rc;
@@ -155,3 +200,277 @@ size_t copy_to_user_pt(size_t n, void __user *to, const void *from)
155 } 200 }
156 return __user_copy_pt((unsigned long) to, (void *) from, n, 1); 201 return __user_copy_pt((unsigned long) to, (void *) from, n, 1);
157} 202}
203
204static size_t clear_user_pt(size_t n, void __user *to)
205{
206 long done, size, ret;
207
208 if (segment_eq(get_fs(), KERNEL_DS)) {
209 memset((void __kernel __force *) to, 0, n);
210 return 0;
211 }
212 done = 0;
213 do {
214 if (n - done > PAGE_SIZE)
215 size = PAGE_SIZE;
216 else
217 size = n - done;
218 ret = __user_copy_pt((unsigned long) to + done,
219 &empty_zero_page, size, 1);
220 done += size;
221 if (ret)
222 return ret + n - done;
223 } while (done < n);
224 return 0;
225}
226
227static size_t strnlen_user_pt(size_t count, const char __user *src)
228{
229 char *addr;
230 unsigned long uaddr = (unsigned long) src;
231 struct mm_struct *mm = current->mm;
232 unsigned long offset, pfn, done, len;
233 pgd_t *pgd;
234 pmd_t *pmd;
235 pte_t *pte;
236 size_t len_str;
237
238 if (segment_eq(get_fs(), KERNEL_DS))
239 return strnlen((const char __kernel __force *) src, count) + 1;
240 done = 0;
241retry:
242 spin_lock(&mm->page_table_lock);
243 do {
244 pgd = pgd_offset(mm, uaddr);
245 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
246 goto fault;
247
248 pmd = pmd_offset(pgd, uaddr);
249 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
250 goto fault;
251
252 pte = pte_offset_map(pmd, uaddr);
253 if (!pte || !pte_present(*pte))
254 goto fault;
255
256 pfn = pte_pfn(*pte);
257 if (!pfn_valid(pfn)) {
258 done = -1;
259 goto out;
260 }
261
262 offset = uaddr & (PAGE_SIZE-1);
263 addr = (char *)(pfn << PAGE_SHIFT) + offset;
264 len = min(count - done, PAGE_SIZE - offset);
265 len_str = strnlen(addr, len);
266 done += len_str;
267 uaddr += len_str;
268 } while ((len_str == len) && (done < count));
269out:
270 spin_unlock(&mm->page_table_lock);
271 return done + 1;
272fault:
273 spin_unlock(&mm->page_table_lock);
274 if (__handle_fault(mm, uaddr, 0)) {
275 return 0;
276 }
277 goto retry;
278}
279
280static size_t strncpy_from_user_pt(size_t count, const char __user *src,
281 char *dst)
282{
283 size_t n = strnlen_user_pt(count, src);
284
285 if (!n)
286 return -EFAULT;
287 if (n > count)
288 n = count;
289 if (segment_eq(get_fs(), KERNEL_DS)) {
290 memcpy(dst, (const char __kernel __force *) src, n);
291 if (dst[n-1] == '\0')
292 return n-1;
293 else
294 return n;
295 }
296 if (__user_copy_pt((unsigned long) src, dst, n, 0))
297 return -EFAULT;
298 if (dst[n-1] == '\0')
299 return n-1;
300 else
301 return n;
302}
303
304static size_t copy_in_user_pt(size_t n, void __user *to,
305 const void __user *from)
306{
307 struct mm_struct *mm = current->mm;
308 unsigned long offset_from, offset_to, offset_max, pfn_from, pfn_to,
309 uaddr, done, size;
310 unsigned long uaddr_from = (unsigned long) from;
311 unsigned long uaddr_to = (unsigned long) to;
312 pgd_t *pgd_from, *pgd_to;
313 pmd_t *pmd_from, *pmd_to;
314 pte_t *pte_from, *pte_to;
315 int write_user;
316
317 done = 0;
318retry:
319 spin_lock(&mm->page_table_lock);
320 do {
321 pgd_from = pgd_offset(mm, uaddr_from);
322 if (pgd_none(*pgd_from) || unlikely(pgd_bad(*pgd_from))) {
323 uaddr = uaddr_from;
324 write_user = 0;
325 goto fault;
326 }
327 pgd_to = pgd_offset(mm, uaddr_to);
328 if (pgd_none(*pgd_to) || unlikely(pgd_bad(*pgd_to))) {
329 uaddr = uaddr_to;
330 write_user = 1;
331 goto fault;
332 }
333
334 pmd_from = pmd_offset(pgd_from, uaddr_from);
335 if (pmd_none(*pmd_from) || unlikely(pmd_bad(*pmd_from))) {
336 uaddr = uaddr_from;
337 write_user = 0;
338 goto fault;
339 }
340 pmd_to = pmd_offset(pgd_to, uaddr_to);
341 if (pmd_none(*pmd_to) || unlikely(pmd_bad(*pmd_to))) {
342 uaddr = uaddr_to;
343 write_user = 1;
344 goto fault;
345 }
346
347 pte_from = pte_offset_map(pmd_from, uaddr_from);
348 if (!pte_from || !pte_present(*pte_from)) {
349 uaddr = uaddr_from;
350 write_user = 0;
351 goto fault;
352 }
353 pte_to = pte_offset_map(pmd_to, uaddr_to);
354 if (!pte_to || !pte_present(*pte_to) || !pte_write(*pte_to)) {
355 uaddr = uaddr_to;
356 write_user = 1;
357 goto fault;
358 }
359
360 pfn_from = pte_pfn(*pte_from);
361 if (!pfn_valid(pfn_from))
362 goto out;
363 pfn_to = pte_pfn(*pte_to);
364 if (!pfn_valid(pfn_to))
365 goto out;
366
367 offset_from = uaddr_from & (PAGE_SIZE-1);
368 offset_to = uaddr_from & (PAGE_SIZE-1);
369 offset_max = max(offset_from, offset_to);
370 size = min(n - done, PAGE_SIZE - offset_max);
371
372 memcpy((void *)(pfn_to << PAGE_SHIFT) + offset_to,
373 (void *)(pfn_from << PAGE_SHIFT) + offset_from, size);
374 done += size;
375 uaddr_from += size;
376 uaddr_to += size;
377 } while (done < n);
378out:
379 spin_unlock(&mm->page_table_lock);
380 return n - done;
381fault:
382 spin_unlock(&mm->page_table_lock);
383 if (__handle_fault(mm, uaddr, write_user))
384 return n - done;
385 goto retry;
386}
387
388#define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \
389 asm volatile("0: l %1,0(%6)\n" \
390 "1: " insn \
391 "2: cs %1,%2,0(%6)\n" \
392 "3: jl 1b\n" \
393 " lhi %0,0\n" \
394 "4:\n" \
395 EX_TABLE(0b,4b) EX_TABLE(2b,4b) EX_TABLE(3b,4b) \
396 : "=d" (ret), "=&d" (oldval), "=&d" (newval), \
397 "=m" (*uaddr) \
398 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
399 "m" (*uaddr) : "cc" );
400
401int futex_atomic_op_pt(int op, int __user *uaddr, int oparg, int *old)
402{
403 int oldval = 0, newval, ret;
404
405 spin_lock(&current->mm->page_table_lock);
406 uaddr = (int __user *) __dat_user_addr((unsigned long) uaddr);
407 if (!uaddr) {
408 spin_unlock(&current->mm->page_table_lock);
409 return -EFAULT;
410 }
411 get_page(virt_to_page(uaddr));
412 spin_unlock(&current->mm->page_table_lock);
413 switch (op) {
414 case FUTEX_OP_SET:
415 __futex_atomic_op("lr %2,%5\n",
416 ret, oldval, newval, uaddr, oparg);
417 break;
418 case FUTEX_OP_ADD:
419 __futex_atomic_op("lr %2,%1\nar %2,%5\n",
420 ret, oldval, newval, uaddr, oparg);
421 break;
422 case FUTEX_OP_OR:
423 __futex_atomic_op("lr %2,%1\nor %2,%5\n",
424 ret, oldval, newval, uaddr, oparg);
425 break;
426 case FUTEX_OP_ANDN:
427 __futex_atomic_op("lr %2,%1\nnr %2,%5\n",
428 ret, oldval, newval, uaddr, oparg);
429 break;
430 case FUTEX_OP_XOR:
431 __futex_atomic_op("lr %2,%1\nxr %2,%5\n",
432 ret, oldval, newval, uaddr, oparg);
433 break;
434 default:
435 ret = -ENOSYS;
436 }
437 put_page(virt_to_page(uaddr));
438 *old = oldval;
439 return ret;
440}
441
442int futex_atomic_cmpxchg_pt(int __user *uaddr, int oldval, int newval)
443{
444 int ret;
445
446 spin_lock(&current->mm->page_table_lock);
447 uaddr = (int __user *) __dat_user_addr((unsigned long) uaddr);
448 if (!uaddr) {
449 spin_unlock(&current->mm->page_table_lock);
450 return -EFAULT;
451 }
452 get_page(virt_to_page(uaddr));
453 spin_unlock(&current->mm->page_table_lock);
454 asm volatile(" cs %1,%4,0(%5)\n"
455 "0: lr %0,%1\n"
456 "1:\n"
457 EX_TABLE(0b,1b)
458 : "=d" (ret), "+d" (oldval), "=m" (*uaddr)
459 : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr)
460 : "cc", "memory" );
461 put_page(virt_to_page(uaddr));
462 return ret;
463}
464
465struct uaccess_ops uaccess_pt = {
466 .copy_from_user = copy_from_user_pt,
467 .copy_from_user_small = copy_from_user_pt,
468 .copy_to_user = copy_to_user_pt,
469 .copy_to_user_small = copy_to_user_pt,
470 .copy_in_user = copy_in_user_pt,
471 .clear_user = clear_user_pt,
472 .strnlen_user = strnlen_user_pt,
473 .strncpy_from_user = strncpy_from_user_pt,
474 .futex_atomic_op = futex_atomic_op_pt,
475 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt,
476};
diff --git a/arch/s390/lib/uaccess_std.c b/arch/s390/lib/uaccess_std.c
index 56a0214e9928..28c4500a58d0 100644
--- a/arch/s390/lib/uaccess_std.c
+++ b/arch/s390/lib/uaccess_std.c
@@ -13,6 +13,7 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/uaccess.h> 14#include <linux/uaccess.h>
15#include <asm/futex.h> 15#include <asm/futex.h>
16#include "uaccess.h"
16 17
17#ifndef __s390x__ 18#ifndef __s390x__
18#define AHI "ahi" 19#define AHI "ahi"
@@ -28,9 +29,6 @@
28#define SLR "slgr" 29#define SLR "slgr"
29#endif 30#endif
30 31
31extern size_t copy_from_user_pt(size_t n, const void __user *from, void *to);
32extern size_t copy_to_user_pt(size_t n, void __user *to, const void *from);
33
34size_t copy_from_user_std(size_t size, const void __user *ptr, void *x) 32size_t copy_from_user_std(size_t size, const void __user *ptr, void *x)
35{ 33{
36 unsigned long tmp1, tmp2; 34 unsigned long tmp1, tmp2;
@@ -72,7 +70,8 @@ size_t copy_from_user_std(size_t size, const void __user *ptr, void *x)
72 return size; 70 return size;
73} 71}
74 72
75size_t copy_from_user_std_check(size_t size, const void __user *ptr, void *x) 73static size_t copy_from_user_std_check(size_t size, const void __user *ptr,
74 void *x)
76{ 75{
77 if (size <= 1024) 76 if (size <= 1024)
78 return copy_from_user_std(size, ptr, x); 77 return copy_from_user_std(size, ptr, x);
@@ -110,14 +109,16 @@ size_t copy_to_user_std(size_t size, void __user *ptr, const void *x)
110 return size; 109 return size;
111} 110}
112 111
113size_t copy_to_user_std_check(size_t size, void __user *ptr, const void *x) 112static size_t copy_to_user_std_check(size_t size, void __user *ptr,
113 const void *x)
114{ 114{
115 if (size <= 1024) 115 if (size <= 1024)
116 return copy_to_user_std(size, ptr, x); 116 return copy_to_user_std(size, ptr, x);
117 return copy_to_user_pt(size, ptr, x); 117 return copy_to_user_pt(size, ptr, x);
118} 118}
119 119
120size_t copy_in_user_std(size_t size, void __user *to, const void __user *from) 120static size_t copy_in_user_std(size_t size, void __user *to,
121 const void __user *from)
121{ 122{
122 unsigned long tmp1; 123 unsigned long tmp1;
123 124
@@ -148,7 +149,7 @@ size_t copy_in_user_std(size_t size, void __user *to, const void __user *from)
148 return size; 149 return size;
149} 150}
150 151
151size_t clear_user_std(size_t size, void __user *to) 152static size_t clear_user_std(size_t size, void __user *to)
152{ 153{
153 unsigned long tmp1, tmp2; 154 unsigned long tmp1, tmp2;
154 155
@@ -254,7 +255,7 @@ size_t strncpy_from_user_std(size_t size, const char __user *src, char *dst)
254 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \ 255 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
255 "m" (*uaddr) : "cc"); 256 "m" (*uaddr) : "cc");
256 257
257int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old) 258int futex_atomic_op_std(int op, int __user *uaddr, int oparg, int *old)
258{ 259{
259 int oldval = 0, newval, ret; 260 int oldval = 0, newval, ret;
260 261
@@ -286,7 +287,7 @@ int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old)
286 return ret; 287 return ret;
287} 288}
288 289
289int futex_atomic_cmpxchg(int __user *uaddr, int oldval, int newval) 290int futex_atomic_cmpxchg_std(int __user *uaddr, int oldval, int newval)
290{ 291{
291 int ret; 292 int ret;
292 293
@@ -311,6 +312,6 @@ struct uaccess_ops uaccess_std = {
311 .clear_user = clear_user_std, 312 .clear_user = clear_user_std,
312 .strnlen_user = strnlen_user_std, 313 .strnlen_user = strnlen_user_std,
313 .strncpy_from_user = strncpy_from_user_std, 314 .strncpy_from_user = strncpy_from_user_std,
314 .futex_atomic_op = futex_atomic_op, 315 .futex_atomic_op = futex_atomic_op_std,
315 .futex_atomic_cmpxchg = futex_atomic_cmpxchg, 316 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std,
316}; 317};
diff --git a/arch/s390/math-emu/Makefile b/arch/s390/math-emu/Makefile
index c10df144f2ab..73b3e72efc46 100644
--- a/arch/s390/math-emu/Makefile
+++ b/arch/s390/math-emu/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the FPU instruction emulation. 2# Makefile for the FPU instruction emulation.
3# 3#
4 4
5obj-$(CONFIG_MATHEMU) := math.o qrnnd.o 5obj-$(CONFIG_MATHEMU) := math.o
6 6
7EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w 7EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w
8EXTRA_AFLAGS := -traditional 8EXTRA_AFLAGS := -traditional
diff --git a/arch/s390/math-emu/math.c b/arch/s390/math-emu/math.c
index 6b9aec5a2c18..3ee78ccb617d 100644
--- a/arch/s390/math-emu/math.c
+++ b/arch/s390/math-emu/math.c
@@ -15,7 +15,7 @@
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include <asm/lowcore.h> 16#include <asm/lowcore.h>
17 17
18#include "sfp-util.h" 18#include <asm/sfp-util.h>
19#include <math-emu/soft-fp.h> 19#include <math-emu/soft-fp.h>
20#include <math-emu/single.h> 20#include <math-emu/single.h>
21#include <math-emu/double.h> 21#include <math-emu/double.h>
diff --git a/arch/s390/math-emu/qrnnd.S b/arch/s390/math-emu/qrnnd.S
deleted file mode 100644
index b01c2b648e22..000000000000
--- a/arch/s390/math-emu/qrnnd.S
+++ /dev/null
@@ -1,77 +0,0 @@
1# S/390 __udiv_qrnnd
2
3# r2 : &__r
4# r3 : upper half of 64 bit word n
5# r4 : lower half of 64 bit word n
6# r5 : divisor d
7# the reminder r of the division is to be stored to &__r and
8# the quotient q is to be returned
9
10 .text
11 .globl __udiv_qrnnd
12__udiv_qrnnd:
13 st %r2,24(%r15) # store pointer to reminder for later
14 lr %r0,%r3 # reload n
15 lr %r1,%r4
16 ltr %r2,%r5 # reload and test divisor
17 jp 5f
18 # divisor >= 0x80000000
19 srdl %r0,2 # n/4
20 srl %r2,1 # d/2
21 slr %r1,%r2 # special case if last bit of d is set
22 brc 3,0f # (n/4) div (n/2) can overflow by 1
23 ahi %r0,-1 # trick: subtract n/2, then divide
240: dr %r0,%r2 # signed division
25 ahi %r1,1 # trick part 2: add 1 to the quotient
26 # now (n >> 2) = (d >> 1) * %r1 + %r0
27 lhi %r3,1
28 nr %r3,%r1 # test last bit of q
29 jz 1f
30 alr %r0,%r2 # add (d>>1) to r
311: srl %r1,1 # q >>= 1
32 # now (n >> 2) = (d&-2) * %r1 + %r0
33 lhi %r3,1
34 nr %r3,%r5 # test last bit of d
35 jz 2f
36 slr %r0,%r1 # r -= q
37 brc 3,2f # borrow ?
38 alr %r0,%r5 # r += d
39 ahi %r1,-1
402: # now (n >> 2) = d * %r1 + %r0
41 alr %r1,%r1 # q <<= 1
42 alr %r0,%r0 # r <<= 1
43 brc 12,3f # overflow on r ?
44 slr %r0,%r5 # r -= d
45 ahi %r1,1 # q += 1
463: lhi %r3,2
47 nr %r3,%r4 # test next to last bit of n
48 jz 4f
49 ahi %r0,1 # r += 1
504: clr %r0,%r5 # r >= d ?
51 jl 6f
52 slr %r0,%r5 # r -= d
53 ahi %r1,1 # q += 1
54 # now (n >> 1) = d * %r1 + %r0
55 j 6f
565: # divisor < 0x80000000
57 srdl %r0,1
58 dr %r0,%r2 # signed division
59 # now (n >> 1) = d * %r1 + %r0
606: alr %r1,%r1 # q <<= 1
61 alr %r0,%r0 # r <<= 1
62 brc 12,7f # overflow on r ?
63 slr %r0,%r5 # r -= d
64 ahi %r1,1 # q += 1
657: lhi %r3,1
66 nr %r3,%r4 # isolate last bit of n
67 alr %r0,%r3 # r += (n & 1)
68 clr %r0,%r5 # r >= d ?
69 jl 8f
70 slr %r0,%r5 # r -= d
71 ahi %r1,1 # q += 1
728: # now n = d * %r1 + %r0
73 l %r2,24(%r15)
74 st %r0,0(%r2)
75 lr %r2,%r1
76 br %r14
77 .end __udiv_qrnnd
diff --git a/arch/s390/math-emu/sfp-util.h b/arch/s390/math-emu/sfp-util.h
deleted file mode 100644
index 5b6ca4570ea4..000000000000
--- a/arch/s390/math-emu/sfp-util.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/sched.h>
3#include <linux/types.h>
4#include <asm/byteorder.h>
5
6#define add_ssaaaa(sh, sl, ah, al, bh, bl) ({ \
7 unsigned int __sh = (ah); \
8 unsigned int __sl = (al); \
9 asm volatile( \
10 " alr %1,%3\n" \
11 " brc 12,0f\n" \
12 " ahi %0,1\n" \
13 "0: alr %0,%2" \
14 : "+&d" (__sh), "+d" (__sl) \
15 : "d" (bh), "d" (bl) : "cc"); \
16 (sh) = __sh; \
17 (sl) = __sl; \
18})
19
20#define sub_ddmmss(sh, sl, ah, al, bh, bl) ({ \
21 unsigned int __sh = (ah); \
22 unsigned int __sl = (al); \
23 asm volatile( \
24 " slr %1,%3\n" \
25 " brc 3,0f\n" \
26 " ahi %0,-1\n" \
27 "0: slr %0,%2" \
28 : "+&d" (__sh), "+d" (__sl) \
29 : "d" (bh), "d" (bl) : "cc"); \
30 (sh) = __sh; \
31 (sl) = __sl; \
32})
33
34/* a umul b = a mul b + (a>=2<<31) ? b<<32:0 + (b>=2<<31) ? a<<32:0 */
35#define umul_ppmm(wh, wl, u, v) ({ \
36 unsigned int __wh = u; \
37 unsigned int __wl = v; \
38 asm volatile( \
39 " ltr 1,%0\n" \
40 " mr 0,%1\n" \
41 " jnm 0f\n" \
42 " alr 0,%1\n" \
43 "0: ltr %1,%1\n" \
44 " jnm 1f\n" \
45 " alr 0,%0\n" \
46 "1: lr %0,0\n" \
47 " lr %1,1\n" \
48 : "+d" (__wh), "+d" (__wl) \
49 : : "0", "1", "cc"); \
50 wh = __wh; \
51 wl = __wl; \
52})
53
54#define udiv_qrnnd(q, r, n1, n0, d) \
55 do { unsigned long __r; \
56 (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
57 (r) = __r; \
58 } while (0)
59extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
60 unsigned long , unsigned long);
61
62#define UDIV_NEEDS_NORMALIZATION 0
63
64#define abort() return 0
65
66#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile
index 8e09db1edbb9..f95449b29fa5 100644
--- a/arch/s390/mm/Makefile
+++ b/arch/s390/mm/Makefile
@@ -2,6 +2,6 @@
2# Makefile for the linux s390-specific parts of the memory manager. 2# Makefile for the linux s390-specific parts of the memory manager.
3# 3#
4 4
5obj-y := init.o fault.o ioremap.o extmem.o mmap.o vmem.o 5obj-y := init.o fault.o extmem.o mmap.o vmem.o
6obj-$(CONFIG_CMM) += cmm.o 6obj-$(CONFIG_CMM) += cmm.o
7 7
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 607f50ead1fd..c5b2f4f078bc 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -245,7 +245,7 @@ cmm_set_timeout(long nr, long seconds)
245 cmm_set_timer(); 245 cmm_set_timer();
246} 246}
247 247
248static inline int 248static int
249cmm_skip_blanks(char *cp, char **endp) 249cmm_skip_blanks(char *cp, char **endp)
250{ 250{
251 char *str; 251 char *str;
@@ -256,10 +256,6 @@ cmm_skip_blanks(char *cp, char **endp)
256} 256}
257 257
258#ifdef CONFIG_CMM_PROC 258#ifdef CONFIG_CMM_PROC
259/* These will someday get removed. */
260#define VM_CMM_PAGES 1111
261#define VM_CMM_TIMED_PAGES 1112
262#define VM_CMM_TIMEOUT 1113
263 259
264static struct ctl_table cmm_table[]; 260static struct ctl_table cmm_table[];
265 261
@@ -414,7 +410,7 @@ cmm_smsg_target(char *from, char *msg)
414} 410}
415#endif 411#endif
416 412
417struct ctl_table_header *cmm_sysctl_header; 413static struct ctl_table_header *cmm_sysctl_header;
418 414
419static int 415static int
420cmm_init (void) 416cmm_init (void)
@@ -422,7 +418,7 @@ cmm_init (void)
422 int rc = -ENOMEM; 418 int rc = -ENOMEM;
423 419
424#ifdef CONFIG_CMM_PROC 420#ifdef CONFIG_CMM_PROC
425 cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 1); 421 cmm_sysctl_header = register_sysctl_table(cmm_dir_table);
426 if (!cmm_sysctl_header) 422 if (!cmm_sysctl_header)
427 goto out; 423 goto out;
428#endif 424#endif
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 775bf19e742b..394980b05e6f 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -15,6 +15,7 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/bootmem.h> 16#include <linux/bootmem.h>
17#include <linux/ctype.h> 17#include <linux/ctype.h>
18#include <linux/ioport.h>
18#include <asm/page.h> 19#include <asm/page.h>
19#include <asm/pgtable.h> 20#include <asm/pgtable.h>
20#include <asm/ebcdic.h> 21#include <asm/ebcdic.h>
@@ -70,6 +71,7 @@ struct qin64 {
70struct dcss_segment { 71struct dcss_segment {
71 struct list_head list; 72 struct list_head list;
72 char dcss_name[8]; 73 char dcss_name[8];
74 char res_name[15];
73 unsigned long start_addr; 75 unsigned long start_addr;
74 unsigned long end; 76 unsigned long end;
75 atomic_t ref_count; 77 atomic_t ref_count;
@@ -77,6 +79,7 @@ struct dcss_segment {
77 unsigned int vm_segtype; 79 unsigned int vm_segtype;
78 struct qrange range[6]; 80 struct qrange range[6];
79 int segcnt; 81 int segcnt;
82 struct resource *res;
80}; 83};
81 84
82static DEFINE_MUTEX(dcss_lock); 85static DEFINE_MUTEX(dcss_lock);
@@ -88,7 +91,7 @@ static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
88 * Create the 8 bytes, ebcdic VM segment name from 91 * Create the 8 bytes, ebcdic VM segment name from
89 * an ascii name. 92 * an ascii name.
90 */ 93 */
91static void inline 94static void
92dcss_mkname(char *name, char *dcss_name) 95dcss_mkname(char *name, char *dcss_name)
93{ 96{
94 int i; 97 int i;
@@ -303,6 +306,29 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long
303 goto out_free; 306 goto out_free;
304 } 307 }
305 308
309 seg->res = kzalloc(sizeof(struct resource), GFP_KERNEL);
310 if (seg->res == NULL) {
311 rc = -ENOMEM;
312 goto out_shared;
313 }
314 seg->res->flags = IORESOURCE_BUSY | IORESOURCE_MEM;
315 seg->res->start = seg->start_addr;
316 seg->res->end = seg->end;
317 memcpy(&seg->res_name, seg->dcss_name, 8);
318 EBCASC(seg->res_name, 8);
319 seg->res_name[8] = '\0';
320 strncat(seg->res_name, " (DCSS)", 7);
321 seg->res->name = seg->res_name;
322 rc = seg->vm_segtype;
323 if (rc == SEG_TYPE_SC ||
324 ((rc == SEG_TYPE_SR || rc == SEG_TYPE_ER) && !do_nonshared))
325 seg->res->flags |= IORESOURCE_READONLY;
326 if (request_resource(&iomem_resource, seg->res)) {
327 rc = -EBUSY;
328 kfree(seg->res);
329 goto out_shared;
330 }
331
306 if (do_nonshared) 332 if (do_nonshared)
307 dcss_command = DCSS_LOADNSR; 333 dcss_command = DCSS_LOADNSR;
308 else 334 else
@@ -316,12 +342,11 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long
316 rc = dcss_diag_translate_rc (seg->end); 342 rc = dcss_diag_translate_rc (seg->end);
317 dcss_diag(DCSS_PURGESEG, seg->dcss_name, 343 dcss_diag(DCSS_PURGESEG, seg->dcss_name,
318 &seg->start_addr, &seg->end); 344 &seg->start_addr, &seg->end);
319 goto out_shared; 345 goto out_resource;
320 } 346 }
321 seg->do_nonshared = do_nonshared; 347 seg->do_nonshared = do_nonshared;
322 atomic_set(&seg->ref_count, 1); 348 atomic_set(&seg->ref_count, 1);
323 list_add(&seg->list, &dcss_list); 349 list_add(&seg->list, &dcss_list);
324 rc = seg->vm_segtype;
325 *addr = seg->start_addr; 350 *addr = seg->start_addr;
326 *end = seg->end; 351 *end = seg->end;
327 if (do_nonshared) 352 if (do_nonshared)
@@ -329,12 +354,16 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long
329 "type %s in non-shared mode\n", name, 354 "type %s in non-shared mode\n", name,
330 (void*)seg->start_addr, (void*)seg->end, 355 (void*)seg->start_addr, (void*)seg->end,
331 segtype_string[seg->vm_segtype]); 356 segtype_string[seg->vm_segtype]);
332 else 357 else {
333 PRINT_INFO ("segment_load: loaded segment %s range %p .. %p " 358 PRINT_INFO ("segment_load: loaded segment %s range %p .. %p "
334 "type %s in shared mode\n", name, 359 "type %s in shared mode\n", name,
335 (void*)seg->start_addr, (void*)seg->end, 360 (void*)seg->start_addr, (void*)seg->end,
336 segtype_string[seg->vm_segtype]); 361 segtype_string[seg->vm_segtype]);
362 }
337 goto out; 363 goto out;
364 out_resource:
365 release_resource(seg->res);
366 kfree(seg->res);
338 out_shared: 367 out_shared:
339 remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); 368 remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1);
340 out_free: 369 out_free:
@@ -401,6 +430,7 @@ segment_load (char *name, int do_nonshared, unsigned long *addr,
401 * -ENOENT : no such segment (segment gone!) 430 * -ENOENT : no such segment (segment gone!)
402 * -EAGAIN : segment is in use by other exploiters, try later 431 * -EAGAIN : segment is in use by other exploiters, try later
403 * -EINVAL : no segment with the given name is currently loaded - name invalid 432 * -EINVAL : no segment with the given name is currently loaded - name invalid
433 * -EBUSY : segment can temporarily not be used (overlaps with dcss)
404 * 0 : operation succeeded 434 * 0 : operation succeeded
405 */ 435 */
406int 436int
@@ -428,12 +458,24 @@ segment_modify_shared (char *name, int do_nonshared)
428 rc = -EAGAIN; 458 rc = -EAGAIN;
429 goto out_unlock; 459 goto out_unlock;
430 } 460 }
431 dcss_diag(DCSS_PURGESEG, seg->dcss_name, 461 release_resource(seg->res);
432 &dummy, &dummy); 462 if (do_nonshared) {
433 if (do_nonshared)
434 dcss_command = DCSS_LOADNSR; 463 dcss_command = DCSS_LOADNSR;
435 else 464 seg->res->flags &= ~IORESOURCE_READONLY;
436 dcss_command = DCSS_LOADNOLY; 465 } else {
466 dcss_command = DCSS_LOADNOLY;
467 if (seg->vm_segtype == SEG_TYPE_SR ||
468 seg->vm_segtype == SEG_TYPE_ER)
469 seg->res->flags |= IORESOURCE_READONLY;
470 }
471 if (request_resource(&iomem_resource, seg->res)) {
472 PRINT_WARN("segment_modify_shared: could not reload segment %s"
473 " - overlapping resources\n", name);
474 rc = -EBUSY;
475 kfree(seg->res);
476 goto out_del;
477 }
478 dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
437 diag_cc = dcss_diag(dcss_command, seg->dcss_name, 479 diag_cc = dcss_diag(dcss_command, seg->dcss_name,
438 &seg->start_addr, &seg->end); 480 &seg->start_addr, &seg->end);
439 if (diag_cc > 1) { 481 if (diag_cc > 1) {
@@ -446,9 +488,9 @@ segment_modify_shared (char *name, int do_nonshared)
446 rc = 0; 488 rc = 0;
447 goto out_unlock; 489 goto out_unlock;
448 out_del: 490 out_del:
491 remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1);
449 list_del(&seg->list); 492 list_del(&seg->list);
450 dcss_diag(DCSS_PURGESEG, seg->dcss_name, 493 dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
451 &dummy, &dummy);
452 kfree(seg); 494 kfree(seg);
453 out_unlock: 495 out_unlock:
454 mutex_unlock(&dcss_lock); 496 mutex_unlock(&dcss_lock);
@@ -478,6 +520,8 @@ segment_unload(char *name)
478 } 520 }
479 if (atomic_dec_return(&seg->ref_count) != 0) 521 if (atomic_dec_return(&seg->ref_count) != 0)
480 goto out_unlock; 522 goto out_unlock;
523 release_resource(seg->res);
524 kfree(seg->res);
481 remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1); 525 remove_shared_memory(seg->start_addr, seg->end - seg->start_addr + 1);
482 list_del(&seg->list); 526 list_del(&seg->list);
483 dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); 527 dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index cd85e34d8703..641aef36ccc4 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -52,7 +52,7 @@ extern int sysctl_userprocess_debug;
52extern void die(const char *,struct pt_regs *,long); 52extern void die(const char *,struct pt_regs *,long);
53 53
54#ifdef CONFIG_KPROBES 54#ifdef CONFIG_KPROBES
55ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); 55static ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);
56int register_page_fault_notifier(struct notifier_block *nb) 56int register_page_fault_notifier(struct notifier_block *nb)
57{ 57{
58 return atomic_notifier_chain_register(&notify_page_fault_chain, nb); 58 return atomic_notifier_chain_register(&notify_page_fault_chain, nb);
@@ -83,12 +83,10 @@ static inline int notify_page_fault(enum die_val val, const char *str,
83} 83}
84#endif 84#endif
85 85
86extern spinlock_t timerlist_lock;
87 86
88/* 87/*
89 * Unlock any spinlocks which will prevent us from getting the 88 * Unlock any spinlocks which will prevent us from getting the
90 * message out (timerlist_lock is acquired through the 89 * message out.
91 * console unblank code)
92 */ 90 */
93void bust_spinlocks(int yes) 91void bust_spinlocks(int yes)
94{ 92{
@@ -137,7 +135,9 @@ static int __check_access_register(struct pt_regs *regs, int error_code)
137 135
138/* 136/*
139 * Check which address space the address belongs to. 137 * Check which address space the address belongs to.
140 * Returns 1 for user space and 0 for kernel space. 138 * May return 1 or 2 for user space and 0 for kernel space.
139 * Returns 2 for user space in primary addressing mode with
140 * CONFIG_S390_EXEC_PROTECT on and kernel parameter noexec=on.
141 */ 141 */
142static inline int check_user_space(struct pt_regs *regs, int error_code) 142static inline int check_user_space(struct pt_regs *regs, int error_code)
143{ 143{
@@ -154,7 +154,7 @@ static inline int check_user_space(struct pt_regs *regs, int error_code)
154 return __check_access_register(regs, error_code); 154 return __check_access_register(regs, error_code);
155 if (descriptor == 2) 155 if (descriptor == 2)
156 return current->thread.mm_segment.ar4; 156 return current->thread.mm_segment.ar4;
157 return descriptor != 0; 157 return ((descriptor != 0) ^ (switch_amode)) << s390_noexec;
158} 158}
159 159
160/* 160/*
@@ -183,6 +183,77 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code,
183 force_sig_info(SIGSEGV, &si, current); 183 force_sig_info(SIGSEGV, &si, current);
184} 184}
185 185
186#ifdef CONFIG_S390_EXEC_PROTECT
187extern long sys_sigreturn(struct pt_regs *regs);
188extern long sys_rt_sigreturn(struct pt_regs *regs);
189extern long sys32_sigreturn(struct pt_regs *regs);
190extern long sys32_rt_sigreturn(struct pt_regs *regs);
191
192static inline void do_sigreturn(struct mm_struct *mm, struct pt_regs *regs,
193 int rt)
194{
195 up_read(&mm->mmap_sem);
196 clear_tsk_thread_flag(current, TIF_SINGLE_STEP);
197#ifdef CONFIG_COMPAT
198 if (test_tsk_thread_flag(current, TIF_31BIT)) {
199 if (rt)
200 sys32_rt_sigreturn(regs);
201 else
202 sys32_sigreturn(regs);
203 return;
204 }
205#endif /* CONFIG_COMPAT */
206 if (rt)
207 sys_rt_sigreturn(regs);
208 else
209 sys_sigreturn(regs);
210 return;
211}
212
213static int signal_return(struct mm_struct *mm, struct pt_regs *regs,
214 unsigned long address, unsigned long error_code)
215{
216 pgd_t *pgd;
217 pmd_t *pmd;
218 pte_t *pte;
219 u16 *instruction;
220 unsigned long pfn, uaddr = regs->psw.addr;
221
222 spin_lock(&mm->page_table_lock);
223 pgd = pgd_offset(mm, uaddr);
224 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
225 goto out_fault;
226 pmd = pmd_offset(pgd, uaddr);
227 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
228 goto out_fault;
229 pte = pte_offset_map(pmd_offset(pgd_offset(mm, uaddr), uaddr), uaddr);
230 if (!pte || !pte_present(*pte))
231 goto out_fault;
232 pfn = pte_pfn(*pte);
233 if (!pfn_valid(pfn))
234 goto out_fault;
235 spin_unlock(&mm->page_table_lock);
236
237 instruction = (u16 *) ((pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE-1)));
238 if (*instruction == 0x0a77)
239 do_sigreturn(mm, regs, 0);
240 else if (*instruction == 0x0aad)
241 do_sigreturn(mm, regs, 1);
242 else {
243 printk("- XXX - do_exception: task = %s, primary, NO EXEC "
244 "-> SIGSEGV\n", current->comm);
245 up_read(&mm->mmap_sem);
246 current->thread.prot_addr = address;
247 current->thread.trap_no = error_code;
248 do_sigsegv(regs, error_code, SEGV_MAPERR, address);
249 }
250 return 0;
251out_fault:
252 spin_unlock(&mm->page_table_lock);
253 return -EFAULT;
254}
255#endif /* CONFIG_S390_EXEC_PROTECT */
256
186/* 257/*
187 * This routine handles page faults. It determines the address, 258 * This routine handles page faults. It determines the address,
188 * and the problem, and then passes it off to one of the appropriate 259 * and the problem, and then passes it off to one of the appropriate
@@ -260,6 +331,17 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection)
260 vma = find_vma(mm, address); 331 vma = find_vma(mm, address);
261 if (!vma) 332 if (!vma)
262 goto bad_area; 333 goto bad_area;
334
335#ifdef CONFIG_S390_EXEC_PROTECT
336 if (unlikely((user_address == 2) && !(vma->vm_flags & VM_EXEC)))
337 if (!signal_return(mm, regs, address, error_code))
338 /*
339 * signal_return() has done an up_read(&mm->mmap_sem)
340 * if it returns 0.
341 */
342 return;
343#endif
344
263 if (vma->vm_start <= address) 345 if (vma->vm_start <= address)
264 goto good_area; 346 goto good_area;
265 if (!(vma->vm_flags & VM_GROWSDOWN)) 347 if (!(vma->vm_flags & VM_GROWSDOWN))
@@ -452,8 +534,7 @@ void pfault_fini(void)
452 : : "a" (&refbk), "m" (refbk) : "cc"); 534 : : "a" (&refbk), "m" (refbk) : "cc");
453} 535}
454 536
455asmlinkage void 537static void pfault_interrupt(__u16 error_code)
456pfault_interrupt(__u16 error_code)
457{ 538{
458 struct task_struct *tsk; 539 struct task_struct *tsk;
459 __u16 subcode; 540 __u16 subcode;
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 4bb21be3b007..916b72a8cde8 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -25,7 +25,7 @@
25#include <linux/bootmem.h> 25#include <linux/bootmem.h>
26#include <linux/pfn.h> 26#include <linux/pfn.h>
27#include <linux/poison.h> 27#include <linux/poison.h>
28 28#include <linux/initrd.h>
29#include <asm/processor.h> 29#include <asm/processor.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/uaccess.h> 31#include <asm/uaccess.h>
@@ -95,20 +95,18 @@ static void __init setup_ro_region(void)
95 pte_t new_pte; 95 pte_t new_pte;
96 unsigned long address, end; 96 unsigned long address, end;
97 97
98 address = ((unsigned long)&__start_rodata) & PAGE_MASK; 98 address = ((unsigned long)&_stext) & PAGE_MASK;
99 end = PFN_ALIGN((unsigned long)&__end_rodata); 99 end = PFN_ALIGN((unsigned long)&_eshared);
100 100
101 for (; address < end; address += PAGE_SIZE) { 101 for (; address < end; address += PAGE_SIZE) {
102 pgd = pgd_offset_k(address); 102 pgd = pgd_offset_k(address);
103 pmd = pmd_offset(pgd, address); 103 pmd = pmd_offset(pgd, address);
104 pte = pte_offset_kernel(pmd, address); 104 pte = pte_offset_kernel(pmd, address);
105 new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO)); 105 new_pte = mk_pte_phys(address, __pgprot(_PAGE_RO));
106 set_pte(pte, new_pte); 106 *pte = new_pte;
107 } 107 }
108} 108}
109 109
110extern void vmem_map_init(void);
111
112/* 110/*
113 * paging_init() sets up the page tables 111 * paging_init() sets up the page tables
114 */ 112 */
@@ -125,11 +123,11 @@ void __init paging_init(void)
125#ifdef CONFIG_64BIT 123#ifdef CONFIG_64BIT
126 pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE; 124 pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE;
127 for (i = 0; i < PTRS_PER_PGD; i++) 125 for (i = 0; i < PTRS_PER_PGD; i++)
128 pgd_clear(pg_dir + i); 126 pgd_clear_kernel(pg_dir + i);
129#else 127#else
130 pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; 128 pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE;
131 for (i = 0; i < PTRS_PER_PGD; i++) 129 for (i = 0; i < PTRS_PER_PGD; i++)
132 pmd_clear((pmd_t *)(pg_dir + i)); 130 pmd_clear_kernel((pmd_t *)(pg_dir + i));
133#endif 131#endif
134 vmem_map_init(); 132 vmem_map_init();
135 setup_ro_region(); 133 setup_ro_region();
@@ -143,7 +141,9 @@ void __init paging_init(void)
143 __raw_local_irq_ssm(ssm_mask); 141 __raw_local_irq_ssm(ssm_mask);
144 142
145 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 143 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
144#ifdef CONFIG_ZONE_DMA
146 max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); 145 max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS);
146#endif
147 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 147 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
148 free_area_init_nodes(max_zone_pfns); 148 free_area_init_nodes(max_zone_pfns);
149} 149}
@@ -174,10 +174,8 @@ void __init mem_init(void)
174 datasize >>10, 174 datasize >>10,
175 initsize >> 10); 175 initsize >> 10);
176 printk("Write protected kernel read-only data: %#lx - %#lx\n", 176 printk("Write protected kernel read-only data: %#lx - %#lx\n",
177 (unsigned long)&__start_rodata, 177 (unsigned long)&_stext,
178 PFN_ALIGN((unsigned long)&__end_rodata) - 1); 178 PFN_ALIGN((unsigned long)&_eshared) - 1);
179 printk("Virtual memmap size: %ldk\n",
180 (max_pfn * sizeof(struct page)) >> 10);
181} 179}
182 180
183void free_initmem(void) 181void free_initmem(void)
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c
deleted file mode 100644
index 3d2100a4e209..000000000000
--- a/arch/s390/mm/ioremap.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * arch/s390/mm/ioremap.c
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Hartmut Penner (hp@de.ibm.com)
7 *
8 * Derived from "arch/i386/mm/extable.c"
9 * (C) Copyright 1995 1996 Linus Torvalds
10 *
11 * Re-map IO memory to kernel address space so that we can access it.
12 * This is needed for high PCI addresses that aren't mapped in the
13 * 640k-1MB IO memory area on PC's
14 */
15
16#include <linux/vmalloc.h>
17#include <linux/mm.h>
18#include <linux/io.h>
19#include <asm/pgalloc.h>
20
21/*
22 * Generic mapping function (not visible outside):
23 */
24
25/*
26 * Remap an arbitrary physical address space into the kernel virtual
27 * address space. Needed when the kernel wants to access high addresses
28 * directly.
29 */
30void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
31{
32 void * addr;
33 struct vm_struct * area;
34
35 if (phys_addr < virt_to_phys(high_memory))
36 return phys_to_virt(phys_addr);
37 if (phys_addr & ~PAGE_MASK)
38 return NULL;
39 size = PAGE_ALIGN(size);
40 if (!size || size > phys_addr + size)
41 return NULL;
42 area = get_vm_area(size, VM_IOREMAP);
43 if (!area)
44 return NULL;
45 addr = area->addr;
46 if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
47 phys_addr, __pgprot(flags))) {
48 vfree(addr);
49 return NULL;
50 }
51 return addr;
52}
53
54void iounmap(void *addr)
55{
56 if (addr > high_memory)
57 vfree(addr);
58}
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index cd3d93e8c211..92a565190028 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -82,7 +82,7 @@ static inline pmd_t *vmem_pmd_alloc(void)
82 if (!pmd) 82 if (!pmd)
83 return NULL; 83 return NULL;
84 for (i = 0; i < PTRS_PER_PMD; i++) 84 for (i = 0; i < PTRS_PER_PMD; i++)
85 pmd_clear(pmd + i); 85 pmd_clear_kernel(pmd + i);
86 return pmd; 86 return pmd;
87} 87}
88 88
@@ -97,7 +97,7 @@ static inline pte_t *vmem_pte_alloc(void)
97 return NULL; 97 return NULL;
98 pte_val(empty_pte) = _PAGE_TYPE_EMPTY; 98 pte_val(empty_pte) = _PAGE_TYPE_EMPTY;
99 for (i = 0; i < PTRS_PER_PTE; i++) 99 for (i = 0; i < PTRS_PER_PTE; i++)
100 set_pte(pte + i, empty_pte); 100 pte[i] = empty_pte;
101 return pte; 101 return pte;
102} 102}
103 103
@@ -119,7 +119,7 @@ static int vmem_add_range(unsigned long start, unsigned long size)
119 pm_dir = vmem_pmd_alloc(); 119 pm_dir = vmem_pmd_alloc();
120 if (!pm_dir) 120 if (!pm_dir)
121 goto out; 121 goto out;
122 pgd_populate(&init_mm, pg_dir, pm_dir); 122 pgd_populate_kernel(&init_mm, pg_dir, pm_dir);
123 } 123 }
124 124
125 pm_dir = pmd_offset(pg_dir, address); 125 pm_dir = pmd_offset(pg_dir, address);
@@ -132,7 +132,7 @@ static int vmem_add_range(unsigned long start, unsigned long size)
132 132
133 pt_dir = pte_offset_kernel(pm_dir, address); 133 pt_dir = pte_offset_kernel(pm_dir, address);
134 pte = pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL); 134 pte = pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL);
135 set_pte(pt_dir, pte); 135 *pt_dir = pte;
136 } 136 }
137 ret = 0; 137 ret = 0;
138out: 138out:
@@ -161,7 +161,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size)
161 if (pmd_none(*pm_dir)) 161 if (pmd_none(*pm_dir))
162 continue; 162 continue;
163 pt_dir = pte_offset_kernel(pm_dir, address); 163 pt_dir = pte_offset_kernel(pm_dir, address);
164 set_pte(pt_dir, pte); 164 *pt_dir = pte;
165 } 165 }
166 flush_tlb_kernel_range(start, start + size); 166 flush_tlb_kernel_range(start, start + size);
167} 167}
@@ -191,7 +191,7 @@ static int vmem_add_mem_map(unsigned long start, unsigned long size)
191 pm_dir = vmem_pmd_alloc(); 191 pm_dir = vmem_pmd_alloc();
192 if (!pm_dir) 192 if (!pm_dir)
193 goto out; 193 goto out;
194 pgd_populate(&init_mm, pg_dir, pm_dir); 194 pgd_populate_kernel(&init_mm, pg_dir, pm_dir);
195 } 195 }
196 196
197 pm_dir = pmd_offset(pg_dir, address); 197 pm_dir = pmd_offset(pg_dir, address);
@@ -210,7 +210,7 @@ static int vmem_add_mem_map(unsigned long start, unsigned long size)
210 if (!new_page) 210 if (!new_page)
211 goto out; 211 goto out;
212 pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); 212 pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL);
213 set_pte(pt_dir, pte); 213 *pt_dir = pte;
214 } 214 }
215 } 215 }
216 ret = 0; 216 ret = 0;
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 3aa3b885ab36..4d16d8917074 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -48,6 +48,9 @@ config GENERIC_IOMAP
48config GENERIC_TIME 48config GENERIC_TIME
49 def_bool n 49 def_bool n
50 50
51config SYS_SUPPORTS_APM_EMULATION
52 bool
53
51config ARCH_MAY_HAVE_PC_FDC 54config ARCH_MAY_HAVE_PC_FDC
52 bool 55 bool
53 56
@@ -126,17 +129,12 @@ config SH_7751_SYSTEMH
126 129
127config SH_HP6XX 130config SH_HP6XX
128 bool "HP6XX" 131 bool "HP6XX"
132 select SYS_SUPPORTS_APM_EMULATION
129 help 133 help
130 Select HP6XX if configuring for a HP jornada HP6xx. 134 Select HP6XX if configuring for a HP jornada HP6xx.
131 More information (hardware only) at 135 More information (hardware only) at
132 <http://www.hp.com/jornada/>. 136 <http://www.hp.com/jornada/>.
133 137
134config SH_EC3104
135 bool "EC3104"
136 help
137 Select EC3104 if configuring for a system with an Eclipse
138 International EC3104 chip, e.g. the Harris AD2000.
139
140config SH_SATURN 138config SH_SATURN
141 bool "Saturn" 139 bool "Saturn"
142 select CPU_SUBTYPE_SH7604 140 select CPU_SUBTYPE_SH7604
@@ -152,9 +150,6 @@ config SH_DREAMCAST
152 <http://www.m17n.org/linux-sh/dreamcast/>. There is a 150 <http://www.m17n.org/linux-sh/dreamcast/>. There is a
153 Dreamcast project is at <http://linuxdc.sourceforge.net/>. 151 Dreamcast project is at <http://linuxdc.sourceforge.net/>.
154 152
155config SH_BIGSUR
156 bool "BigSur"
157
158config SH_MPC1211 153config SH_MPC1211
159 bool "Interface MPC1211" 154 bool "Interface MPC1211"
160 help 155 help
@@ -477,6 +472,7 @@ config SH_PCLK_FREQ
477 472
478config SH_CLK_MD 473config SH_CLK_MD
479 int "CPU Mode Pin Setting" 474 int "CPU Mode Pin Setting"
475 default 0
480 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 476 depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206
481 help 477 help
482 MD2 - MD0 pin setting. 478 MD2 - MD0 pin setting.
@@ -506,8 +502,9 @@ source "arch/sh/cchips/Kconfig"
506config HEARTBEAT 502config HEARTBEAT
507 bool "Heartbeat LED" 503 bool "Heartbeat LED"
508 depends on SH_MPC1211 || SH_SH03 || \ 504 depends on SH_MPC1211 || SH_SH03 || \
509 SH_BIGSUR || SOLUTION_ENGINE || \ 505 SOLUTION_ENGINE || \
510 SH_RTS7751R2D || SH_SH4202_MICRODEV || SH_LANDISK 506 SH_RTS7751R2D || SH_SH4202_MICRODEV || SH_LANDISK || \
507 SH_R7780RP
511 help 508 help
512 Use the power-on LED on your machine as a load meter. The exact 509 Use the power-on LED on your machine as a load meter. The exact
513 behavior is platform-dependent, but normally the flash frequency is 510 behavior is platform-dependent, but normally the flash frequency is
@@ -592,6 +589,8 @@ menu "Boot options"
592config ZERO_PAGE_OFFSET 589config ZERO_PAGE_OFFSET
593 hex "Zero page offset" 590 hex "Zero page offset"
594 default "0x00004000" if SH_MPC1211 || SH_SH03 591 default "0x00004000" if SH_MPC1211 || SH_SH03
592 default "0x00010000" if PAGE_SIZE_64KB
593 default "0x00002000" if PAGE_SIZE_8KB
595 default "0x00001000" 594 default "0x00001000"
596 help 595 help
597 This sets the default offset of zero page. 596 This sets the default offset of zero page.
@@ -694,9 +693,6 @@ depends on EXPERIMENTAL
694 693
695source kernel/power/Kconfig 694source kernel/power/Kconfig
696 695
697config APM
698 bool "Advanced Power Management Emulation"
699 depends on PM
700endmenu 696endmenu
701 697
702source "net/Kconfig" 698source "net/Kconfig"
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index c1dbef212634..bd9b1729f8b8 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -35,6 +35,7 @@ endif
35endif 35endif
36 36
37cflags-$(CONFIG_CPU_SH2) := -m2 37cflags-$(CONFIG_CPU_SH2) := -m2
38cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,)
38cflags-$(CONFIG_CPU_SH3) := -m3 39cflags-$(CONFIG_CPU_SH3) := -m3
39cflags-$(CONFIG_CPU_SH4) := -m4 \ 40cflags-$(CONFIG_CPU_SH4) := -m4 \
40 $(call cc-option,-mno-implicit-fp,-m4-nofpu) 41 $(call cc-option,-mno-implicit-fp,-m4-nofpu)
@@ -93,10 +94,8 @@ machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se/7300
93machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) := se/7343 94machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) := se/7343
94machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se/73180 95machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se/73180
95machdir-$(CONFIG_SH_HP6XX) := hp6xx 96machdir-$(CONFIG_SH_HP6XX) := hp6xx
96machdir-$(CONFIG_SH_EC3104) := ec3104
97machdir-$(CONFIG_SH_SATURN) := saturn 97machdir-$(CONFIG_SH_SATURN) := saturn
98machdir-$(CONFIG_SH_DREAMCAST) := dreamcast 98machdir-$(CONFIG_SH_DREAMCAST) := dreamcast
99machdir-$(CONFIG_SH_BIGSUR) := bigsur
100machdir-$(CONFIG_SH_MPC1211) := mpc1211 99machdir-$(CONFIG_SH_MPC1211) := mpc1211
101machdir-$(CONFIG_SH_SH03) := sh03 100machdir-$(CONFIG_SH_SH03) := sh03
102machdir-$(CONFIG_SH_SECUREEDGE5410) := snapgear 101machdir-$(CONFIG_SH_SECUREEDGE5410) := snapgear
diff --git a/arch/sh/boards/bigsur/Makefile b/arch/sh/boards/bigsur/Makefile
deleted file mode 100644
index 0ff9497ac58e..000000000000
--- a/arch/sh/boards/bigsur/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for the BigSur specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o led.o
6
diff --git a/arch/sh/boards/bigsur/io.c b/arch/sh/boards/bigsur/io.c
deleted file mode 100644
index 23071f97eec3..000000000000
--- a/arch/sh/boards/bigsur/io.c
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2 * arch/sh/boards/bigsur/io.c
3 *
4 * By Dustin McIntire (dustin@sensoria.com) (c)2001
5 * Derived from io_hd64465.h, which bore the message:
6 * By Greg Banks <gbanks@pocketpenguins.com>
7 * (c) 2000 PocketPenguins Inc.
8 * and from io_hd64461.h, which bore the message:
9 * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
10 *
11 * May be copied or modified under the terms of the GNU General Public
12 * License. See linux/COPYING for more information.
13 *
14 * IO functions for a Hitachi Big Sur Evaluation Board.
15 */
16
17#include <linux/kernel.h>
18#include <linux/module.h>
19#include <asm/machvec.h>
20#include <asm/io.h>
21#include <asm/bigsur/bigsur.h>
22
23/* Low iomap maps port 0-1K to addresses in 8byte chunks */
24#define BIGSUR_IOMAP_LO_THRESH 0x400
25#define BIGSUR_IOMAP_LO_SHIFT 3
26#define BIGSUR_IOMAP_LO_MASK ((1<<BIGSUR_IOMAP_LO_SHIFT)-1)
27#define BIGSUR_IOMAP_LO_NMAP (BIGSUR_IOMAP_LO_THRESH>>BIGSUR_IOMAP_LO_SHIFT)
28static u32 bigsur_iomap_lo[BIGSUR_IOMAP_LO_NMAP];
29static u8 bigsur_iomap_lo_shift[BIGSUR_IOMAP_LO_NMAP];
30
31/* High iomap maps port 1K-64K to addresses in 1K chunks */
32#define BIGSUR_IOMAP_HI_THRESH 0x10000
33#define BIGSUR_IOMAP_HI_SHIFT 10
34#define BIGSUR_IOMAP_HI_MASK ((1<<BIGSUR_IOMAP_HI_SHIFT)-1)
35#define BIGSUR_IOMAP_HI_NMAP (BIGSUR_IOMAP_HI_THRESH>>BIGSUR_IOMAP_HI_SHIFT)
36static u32 bigsur_iomap_hi[BIGSUR_IOMAP_HI_NMAP];
37static u8 bigsur_iomap_hi_shift[BIGSUR_IOMAP_HI_NMAP];
38
39void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift)
40{
41 u32 port, endport = baseport + nports;
42
43 pr_debug("bigsur_port_map(base=0x%0x, n=0x%0x, addr=0x%08x)\n",
44 baseport, nports, addr);
45
46 for (port = baseport ;
47 port < endport && port < BIGSUR_IOMAP_LO_THRESH ;
48 port += (1<<BIGSUR_IOMAP_LO_SHIFT)) {
49 pr_debug(" maplo[0x%x] = 0x%08x\n", port, addr);
50 bigsur_iomap_lo[port>>BIGSUR_IOMAP_LO_SHIFT] = addr;
51 bigsur_iomap_lo_shift[port>>BIGSUR_IOMAP_LO_SHIFT] = shift;
52 addr += (1<<(BIGSUR_IOMAP_LO_SHIFT));
53 }
54
55 for (port = max_t(u32, baseport, BIGSUR_IOMAP_LO_THRESH);
56 port < endport && port < BIGSUR_IOMAP_HI_THRESH ;
57 port += (1<<BIGSUR_IOMAP_HI_SHIFT)) {
58 pr_debug(" maphi[0x%x] = 0x%08x\n", port, addr);
59 bigsur_iomap_hi[port>>BIGSUR_IOMAP_HI_SHIFT] = addr;
60 bigsur_iomap_hi_shift[port>>BIGSUR_IOMAP_HI_SHIFT] = shift;
61 addr += (1<<(BIGSUR_IOMAP_HI_SHIFT));
62 }
63}
64EXPORT_SYMBOL(bigsur_port_map);
65
66void bigsur_port_unmap(u32 baseport, u32 nports)
67{
68 u32 port, endport = baseport + nports;
69
70 pr_debug("bigsur_port_unmap(base=0x%0x, n=0x%0x)\n", baseport, nports);
71
72 for (port = baseport ;
73 port < endport && port < BIGSUR_IOMAP_LO_THRESH ;
74 port += (1<<BIGSUR_IOMAP_LO_SHIFT)) {
75 bigsur_iomap_lo[port>>BIGSUR_IOMAP_LO_SHIFT] = 0;
76 }
77
78 for (port = max_t(u32, baseport, BIGSUR_IOMAP_LO_THRESH);
79 port < endport && port < BIGSUR_IOMAP_HI_THRESH ;
80 port += (1<<BIGSUR_IOMAP_HI_SHIFT)) {
81 bigsur_iomap_hi[port>>BIGSUR_IOMAP_HI_SHIFT] = 0;
82 }
83}
84EXPORT_SYMBOL(bigsur_port_unmap);
85
86unsigned long bigsur_isa_port2addr(unsigned long port)
87{
88 unsigned long addr = 0;
89 unsigned char shift;
90
91 /* Physical address not in P0, do nothing */
92 if (PXSEG(port)) {
93 addr = port;
94 /* physical address in P0, map to P2 */
95 } else if (port >= 0x30000) {
96 addr = P2SEGADDR(port);
97 /* Big Sur I/O + HD64465 registers 0x10000-0x30000 */
98 } else if (port >= BIGSUR_IOMAP_HI_THRESH) {
99 addr = BIGSUR_INTERNAL_BASE + (port - BIGSUR_IOMAP_HI_THRESH);
100 /* Handle remapping of high IO/PCI IO ports */
101 } else if (port >= BIGSUR_IOMAP_LO_THRESH) {
102 addr = bigsur_iomap_hi[port >> BIGSUR_IOMAP_HI_SHIFT];
103 shift = bigsur_iomap_hi_shift[port >> BIGSUR_IOMAP_HI_SHIFT];
104
105 if (addr != 0)
106 addr += (port & BIGSUR_IOMAP_HI_MASK) << shift;
107 } else {
108 /* Handle remapping of low IO ports */
109 addr = bigsur_iomap_lo[port >> BIGSUR_IOMAP_LO_SHIFT];
110 shift = bigsur_iomap_lo_shift[port >> BIGSUR_IOMAP_LO_SHIFT];
111
112 if (addr != 0)
113 addr += (port & BIGSUR_IOMAP_LO_MASK) << shift;
114 }
115
116 pr_debug("%s(0x%08lx) = 0x%08lx\n", __FUNCTION__, port, addr);
117
118 return addr;
119}
120
diff --git a/arch/sh/boards/bigsur/irq.c b/arch/sh/boards/bigsur/irq.c
deleted file mode 100644
index 1ab04da36382..000000000000
--- a/arch/sh/boards/bigsur/irq.c
+++ /dev/null
@@ -1,334 +0,0 @@
1/*
2 *
3 * By Dustin McIntire (dustin@sensoria.com) (c)2001
4 *
5 * Setup and IRQ handling code for the HD64465 companion chip.
6 * by Greg Banks <gbanks@pocketpenguins.com>
7 * Copyright (c) 2000 PocketPenguins Inc
8 *
9 * Derived from setup_hd64465.c which bore the message:
10 * Greg Banks <gbanks@pocketpenguins.com>
11 * Copyright (c) 2000 PocketPenguins Inc and
12 * Copyright (C) 2000 YAEGASHI Takeshi
13 * and setup_cqreek.c which bore message:
14 * Copyright (C) 2000 Niibe Yutaka
15 *
16 * May be copied or modified under the terms of the GNU General Public
17 * License. See linux/COPYING for more information.
18 *
19 * IRQ functions for a Hitachi Big Sur Evaluation Board.
20 *
21 */
22#undef DEBUG
23
24#include <linux/sched.h>
25#include <linux/module.h>
26#include <linux/kernel.h>
27#include <linux/param.h>
28#include <linux/ioport.h>
29#include <linux/interrupt.h>
30#include <linux/init.h>
31#include <linux/irq.h>
32#include <linux/bitops.h>
33
34#include <asm/io.h>
35#include <asm/irq.h>
36
37#include <asm/bigsur/io.h>
38#include <asm/hd64465/hd64465.h>
39#include <asm/bigsur/bigsur.h>
40
41//#define BIGSUR_DEBUG 3
42#undef BIGSUR_DEBUG
43
44#ifdef BIGSUR_DEBUG
45#define DIPRINTK(n, args...) if (BIGSUR_DEBUG>(n)) printk(args)
46#else
47#define DIPRINTK(n, args...)
48#endif /* BIGSUR_DEBUG */
49
50#ifdef CONFIG_HD64465
51extern int hd64465_irq_demux(int irq);
52#endif /* CONFIG_HD64465 */
53
54
55/*===========================================================*/
56// Big Sur CPLD IRQ Routines
57/*===========================================================*/
58
59/* Level 1 IRQ routines */
60static void disable_bigsur_l1irq(unsigned int irq)
61{
62 unsigned char mask;
63 unsigned int mask_port = ((irq - BIGSUR_IRQ_LOW)/8) ? BIGSUR_IRLMR1 : BIGSUR_IRLMR0;
64 unsigned char bit = (1 << ((irq - MGATE_IRQ_LOW)%8) );
65
66 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) {
67 pr_debug("Disable L1 IRQ %d\n", irq);
68 DIPRINTK(2,"disable_bigsur_l1irq: IMR=0x%08x mask=0x%x\n",
69 mask_port, bit);
70
71 /* Disable IRQ - set mask bit */
72 mask = inb(mask_port) | bit;
73 outb(mask, mask_port);
74 return;
75 }
76 pr_debug("disable_bigsur_l1irq: Invalid IRQ %d\n", irq);
77}
78
79static void enable_bigsur_l1irq(unsigned int irq)
80{
81 unsigned char mask;
82 unsigned int mask_port = ((irq - BIGSUR_IRQ_LOW)/8) ? BIGSUR_IRLMR1 : BIGSUR_IRLMR0;
83 unsigned char bit = (1 << ((irq - MGATE_IRQ_LOW)%8) );
84
85 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) {
86 pr_debug("Enable L1 IRQ %d\n", irq);
87 DIPRINTK(2,"enable_bigsur_l1irq: IMR=0x%08x mask=0x%x\n",
88 mask_port, bit);
89 /* Enable L1 IRQ - clear mask bit */
90 mask = inb(mask_port) & ~bit;
91 outb(mask, mask_port);
92 return;
93 }
94 pr_debug("enable_bigsur_l1irq: Invalid IRQ %d\n", irq);
95}
96
97
98/* Level 2 irq masks and registers for L2 decoding */
99/* Level2 bitmasks for each level 1 IRQ */
100const u32 bigsur_l2irq_mask[] =
101 {0x40,0x80,0x08,0x01,0x01,0x3C,0x3E,0xFF,0x40,0x80,0x06,0x03};
102/* Level2 to ISR[n] map for each level 1 IRQ */
103const u32 bigsur_l2irq_reg[] =
104 { 2, 2, 3, 3, 1, 2, 1, 0, 1, 1, 3, 2};
105/* Level2 to Level 1 IRQ map */
106const u32 bigsur_l2_l1_map[] =
107 {7,7,7,7,7,7,7,7, 4,6,6,6,6,6,8,9, 11,11,5,5,5,5,0,1, 3,10,10,2,-1,-1,-1,-1};
108/* IRQ inactive level (high or low) */
109const u32 bigsur_l2_inactv_state[] = {0x00, 0xBE, 0xFC, 0xF7};
110
111/* CPLD external status and mask registers base and offsets */
112static const u32 isr_base = BIGSUR_IRQ0;
113static const u32 isr_offset = BIGSUR_IRQ0 - BIGSUR_IRQ1;
114static const u32 imr_base = BIGSUR_IMR0;
115static const u32 imr_offset = BIGSUR_IMR0 - BIGSUR_IMR1;
116
117#define REG_NUM(irq) ((irq-BIGSUR_2NDLVL_IRQ_LOW)/8 )
118
119/* Level 2 IRQ routines */
120static void disable_bigsur_l2irq(unsigned int irq)
121{
122 unsigned char mask;
123 unsigned char bit = 1 << ((irq-BIGSUR_2NDLVL_IRQ_LOW)%8);
124 unsigned int mask_port = imr_base - REG_NUM(irq)*imr_offset;
125
126 if(irq >= BIGSUR_2NDLVL_IRQ_LOW && irq < BIGSUR_2NDLVL_IRQ_HIGH) {
127 pr_debug("Disable L2 IRQ %d\n", irq);
128 DIPRINTK(2,"disable_bigsur_l2irq: IMR=0x%08x mask=0x%x\n",
129 mask_port, bit);
130
131 /* Disable L2 IRQ - set mask bit */
132 mask = inb(mask_port) | bit;
133 outb(mask, mask_port);
134 return;
135 }
136 pr_debug("disable_bigsur_l2irq: Invalid IRQ %d\n", irq);
137}
138
139static void enable_bigsur_l2irq(unsigned int irq)
140{
141 unsigned char mask;
142 unsigned char bit = 1 << ((irq-BIGSUR_2NDLVL_IRQ_LOW)%8);
143 unsigned int mask_port = imr_base - REG_NUM(irq)*imr_offset;
144
145 if(irq >= BIGSUR_2NDLVL_IRQ_LOW && irq < BIGSUR_2NDLVL_IRQ_HIGH) {
146 pr_debug("Enable L2 IRQ %d\n", irq);
147 DIPRINTK(2,"enable_bigsur_l2irq: IMR=0x%08x mask=0x%x\n",
148 mask_port, bit);
149
150 /* Enable L2 IRQ - clear mask bit */
151 mask = inb(mask_port) & ~bit;
152 outb(mask, mask_port);
153 return;
154 }
155 pr_debug("enable_bigsur_l2irq: Invalid IRQ %d\n", irq);
156}
157
158static void mask_and_ack_bigsur(unsigned int irq)
159{
160 pr_debug("mask_and_ack_bigsur IRQ %d\n", irq);
161 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH)
162 disable_bigsur_l1irq(irq);
163 else
164 disable_bigsur_l2irq(irq);
165}
166
167static void end_bigsur_irq(unsigned int irq)
168{
169 pr_debug("end_bigsur_irq IRQ %d\n", irq);
170 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
171 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH)
172 enable_bigsur_l1irq(irq);
173 else
174 enable_bigsur_l2irq(irq);
175 }
176}
177
178static unsigned int startup_bigsur_irq(unsigned int irq)
179{
180 u8 mask;
181 u32 reg;
182
183 pr_debug("startup_bigsur_irq IRQ %d\n", irq);
184
185 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) {
186 /* Enable the L1 IRQ */
187 enable_bigsur_l1irq(irq);
188 /* Enable all L2 IRQs in this L1 IRQ */
189 mask = ~(bigsur_l2irq_mask[irq-BIGSUR_IRQ_LOW]);
190 reg = imr_base - bigsur_l2irq_reg[irq-BIGSUR_IRQ_LOW] * imr_offset;
191 mask &= inb(reg);
192 outb(mask,reg);
193 DIPRINTK(2,"startup_bigsur_irq: IMR=0x%08x mask=0x%x\n",reg,inb(reg));
194 }
195 else {
196 /* Enable the L2 IRQ - clear mask bit */
197 enable_bigsur_l2irq(irq);
198 /* Enable the L1 bit masking this L2 IRQ */
199 enable_bigsur_l1irq(bigsur_l2_l1_map[irq-BIGSUR_2NDLVL_IRQ_LOW]);
200 DIPRINTK(2,"startup_bigsur_irq: L1=%d L2=%d\n",
201 bigsur_l2_l1_map[irq-BIGSUR_2NDLVL_IRQ_LOW],irq);
202 }
203 return 0;
204}
205
206static void shutdown_bigsur_irq(unsigned int irq)
207{
208 pr_debug("shutdown_bigsur_irq IRQ %d\n", irq);
209 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH)
210 disable_bigsur_l1irq(irq);
211 else
212 disable_bigsur_l2irq(irq);
213}
214
215/* Define the IRQ structures for the L1 and L2 IRQ types */
216static struct hw_interrupt_type bigsur_l1irq_type = {
217 .typename = "BigSur-CPLD-Level1-IRQ",
218 .startup = startup_bigsur_irq,
219 .shutdown = shutdown_bigsur_irq,
220 .enable = enable_bigsur_l1irq,
221 .disable = disable_bigsur_l1irq,
222 .ack = mask_and_ack_bigsur,
223 .end = end_bigsur_irq
224};
225
226static struct hw_interrupt_type bigsur_l2irq_type = {
227 .typename = "BigSur-CPLD-Level2-IRQ",
228 .startup = startup_bigsur_irq,
229 .shutdown =shutdown_bigsur_irq,
230 .enable = enable_bigsur_l2irq,
231 .disable = disable_bigsur_l2irq,
232 .ack = mask_and_ack_bigsur,
233 .end = end_bigsur_irq
234};
235
236
237static void make_bigsur_l1isr(unsigned int irq) {
238
239 /* sanity check first */
240 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) {
241 /* save the handler in the main description table */
242 irq_desc[irq].chip = &bigsur_l1irq_type;
243 irq_desc[irq].status = IRQ_DISABLED;
244 irq_desc[irq].action = 0;
245 irq_desc[irq].depth = 1;
246
247 disable_bigsur_l1irq(irq);
248 return;
249 }
250 pr_debug("make_bigsur_l1isr: bad irq, %d\n", irq);
251 return;
252}
253
254static void make_bigsur_l2isr(unsigned int irq) {
255
256 /* sanity check first */
257 if(irq >= BIGSUR_2NDLVL_IRQ_LOW && irq < BIGSUR_2NDLVL_IRQ_HIGH) {
258 /* save the handler in the main description table */
259 irq_desc[irq].chip = &bigsur_l2irq_type;
260 irq_desc[irq].status = IRQ_DISABLED;
261 irq_desc[irq].action = 0;
262 irq_desc[irq].depth = 1;
263
264 disable_bigsur_l2irq(irq);
265 return;
266 }
267 pr_debug("make_bigsur_l2isr: bad irq, %d\n", irq);
268 return;
269}
270
271/* The IRQ's will be decoded as follows:
272 * If a level 2 handler exists and there is an unmasked active
273 * IRQ, the 2nd level handler will be called.
274 * If a level 2 handler does not exist for the active IRQ
275 * the 1st level handler will be called.
276 */
277
278int bigsur_irq_demux(int irq)
279{
280 int dmux_irq = irq;
281 u8 mask, actv_irqs;
282 u32 reg_num;
283
284 DIPRINTK(3,"bigsur_irq_demux, irq=%d\n", irq);
285 /* decode the 1st level IRQ */
286 if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) {
287 /* Get corresponding L2 ISR bitmask and ISR number */
288 mask = bigsur_l2irq_mask[irq-BIGSUR_IRQ_LOW];
289 reg_num = bigsur_l2irq_reg[irq-BIGSUR_IRQ_LOW];
290 /* find the active IRQ's (XOR with inactive level)*/
291 actv_irqs = inb(isr_base-reg_num*isr_offset) ^
292 bigsur_l2_inactv_state[reg_num];
293 /* decode active IRQ's */
294 actv_irqs = actv_irqs & mask & ~(inb(imr_base-reg_num*imr_offset));
295 /* if NEZ then we have an active L2 IRQ */
296 if(actv_irqs) dmux_irq = ffz(~actv_irqs) + reg_num*8+BIGSUR_2NDLVL_IRQ_LOW;
297 /* if no 2nd level IRQ action, but has 1st level, use 1st level handler */
298 if(!irq_desc[dmux_irq].action && irq_desc[irq].action)
299 dmux_irq = irq;
300 DIPRINTK(1,"bigsur_irq_demux: irq=%d dmux_irq=%d mask=0x%04x reg=%d\n",
301 irq, dmux_irq, mask, reg_num);
302 }
303#ifdef CONFIG_HD64465
304 dmux_irq = hd64465_irq_demux(dmux_irq);
305#endif /* CONFIG_HD64465 */
306 DIPRINTK(3,"bigsur_irq_demux, demux_irq=%d\n", dmux_irq);
307
308 return dmux_irq;
309}
310
311/*===========================================================*/
312// Big Sur Init Routines
313/*===========================================================*/
314void __init init_bigsur_IRQ(void)
315{
316 int i;
317
318 if (!MACH_BIGSUR) return;
319
320 /* Create ISR's for Big Sur CPLD IRQ's */
321 /*==============================================================*/
322 for(i=BIGSUR_IRQ_LOW;i<BIGSUR_IRQ_HIGH;i++)
323 make_bigsur_l1isr(i);
324
325 printk(KERN_INFO "Big Sur CPLD L1 interrupts %d to %d.\n",
326 BIGSUR_IRQ_LOW,BIGSUR_IRQ_HIGH);
327
328 for(i=BIGSUR_2NDLVL_IRQ_LOW;i<BIGSUR_2NDLVL_IRQ_HIGH;i++)
329 make_bigsur_l2isr(i);
330
331 printk(KERN_INFO "Big Sur CPLD L2 interrupts %d to %d.\n",
332 BIGSUR_2NDLVL_IRQ_LOW,BIGSUR_2NDLVL_IRQ_HIGH);
333
334}
diff --git a/arch/sh/boards/bigsur/led.c b/arch/sh/boards/bigsur/led.c
deleted file mode 100644
index d221439aafcc..000000000000
--- a/arch/sh/boards/bigsur/led.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * linux/arch/sh/boards/bigsur/led.c
3 *
4 * By Dustin McIntire (dustin@sensoria.com) (c)2001
5 * Derived from led_se.c and led.c, which bore the message:
6 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
7 *
8 * May be copied or modified under the terms of the GNU General Public
9 * License. See linux/COPYING for more information.
10 *
11 * This file contains Big Sur specific LED code.
12 */
13
14#include <asm/io.h>
15#include <asm/bigsur/bigsur.h>
16
17static void mach_led(int position, int value)
18{
19 int word;
20
21 word = bigsur_inl(BIGSUR_CSLR);
22 if (value) {
23 bigsur_outl(word & ~BIGSUR_LED, BIGSUR_CSLR);
24 } else {
25 bigsur_outl(word | BIGSUR_LED, BIGSUR_CSLR);
26 }
27}
28
29#ifdef CONFIG_HEARTBEAT
30
31#include <linux/sched.h>
32
33/* Cycle the LED on/off */
34void heartbeat_bigsur(void)
35{
36 static unsigned cnt = 0, period = 0, dist = 0;
37
38 if (cnt == 0 || cnt == dist)
39 mach_led( -1, 1);
40 else if (cnt == 7 || cnt == dist+7)
41 mach_led( -1, 0);
42
43 if (++cnt > period) {
44 cnt = 0;
45 /* The hyperbolic function below modifies the heartbeat period
46 * length in dependency of the current (5min) load. It goes
47 * through the points f(0)=126, f(1)=86, f(5)=51,
48 * f(inf)->30. */
49 period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
50 dist = period / 4;
51 }
52}
53#endif /* CONFIG_HEARTBEAT */
54
diff --git a/arch/sh/boards/bigsur/setup.c b/arch/sh/boards/bigsur/setup.c
deleted file mode 100644
index 9711c20fc9e4..000000000000
--- a/arch/sh/boards/bigsur/setup.c
+++ /dev/null
@@ -1,88 +0,0 @@
1/*
2 *
3 * By Dustin McIntire (dustin@sensoria.com) (c)2001
4 *
5 * Setup and IRQ handling code for the HD64465 companion chip.
6 * by Greg Banks <gbanks@pocketpenguins.com>
7 * Copyright (c) 2000 PocketPenguins Inc
8 *
9 * Derived from setup_hd64465.c which bore the message:
10 * Greg Banks <gbanks@pocketpenguins.com>
11 * Copyright (c) 2000 PocketPenguins Inc and
12 * Copyright (C) 2000 YAEGASHI Takeshi
13 * and setup_cqreek.c which bore message:
14 * Copyright (C) 2000 Niibe Yutaka
15 *
16 * May be copied or modified under the terms of the GNU General Public
17 * License. See linux/COPYING for more information.
18 *
19 * Setup functions for a Hitachi Big Sur Evaluation Board.
20 *
21 */
22
23#include <linux/sched.h>
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/param.h>
27#include <linux/ioport.h>
28#include <linux/interrupt.h>
29#include <linux/init.h>
30#include <linux/irq.h>
31#include <linux/bitops.h>
32
33#include <asm/io.h>
34#include <asm/irq.h>
35#include <asm/machvec.h>
36#include <asm/bigsur/io.h>
37#include <asm/hd64465/hd64465.h>
38#include <asm/bigsur/bigsur.h>
39
40/*===========================================================*/
41// Big Sur Init Routines
42/*===========================================================*/
43
44static void __init bigsur_setup(char **cmdline_p)
45{
46 /* Mask all 2nd level IRQ's */
47 outb(-1,BIGSUR_IMR0);
48 outb(-1,BIGSUR_IMR1);
49 outb(-1,BIGSUR_IMR2);
50 outb(-1,BIGSUR_IMR3);
51
52 /* Mask 1st level interrupts */
53 outb(-1,BIGSUR_IRLMR0);
54 outb(-1,BIGSUR_IRLMR1);
55
56#if defined (CONFIG_HD64465) && defined (CONFIG_SERIAL)
57 /* remap IO ports for first ISA serial port to HD64465 UART */
58 bigsur_port_map(0x3f8, 8, CONFIG_HD64465_IOBASE + 0x8000, 1);
59#endif /* CONFIG_HD64465 && CONFIG_SERIAL */
60 /* TODO: setup IDE registers */
61 bigsur_port_map(BIGSUR_IDECTL_IOPORT, 2, BIGSUR_ICTL, 8);
62 /* Setup the Ethernet port to BIGSUR_ETHER_IOPORT */
63 bigsur_port_map(BIGSUR_ETHER_IOPORT, 16, BIGSUR_ETHR+BIGSUR_ETHER_IOPORT, 0);
64 /* set page to 1 */
65 outw(1, BIGSUR_ETHR+0xe);
66 /* set the IO port to BIGSUR_ETHER_IOPORT */
67 outw(BIGSUR_ETHER_IOPORT<<3, BIGSUR_ETHR+0x2);
68}
69
70/*
71 * The Machine Vector
72 */
73extern void heartbeat_bigsur(void);
74extern void init_bigsur_IRQ(void);
75
76struct sh_machine_vector mv_bigsur __initmv = {
77 .mv_name = "Big Sur",
78 .mv_setup = bigsur_setup,
79
80 .mv_isa_port2addr = bigsur_isa_port2addr,
81 .mv_irq_demux = bigsur_irq_demux,
82
83 .mv_init_irq = init_bigsur_IRQ,
84#ifdef CONFIG_HEARTBEAT
85 .mv_heartbeat = heartbeat_bigsur,
86#endif
87};
88ALIAS_MV(bigsur)
diff --git a/arch/sh/boards/ec3104/Makefile b/arch/sh/boards/ec3104/Makefile
deleted file mode 100644
index 178891534b67..000000000000
--- a/arch/sh/boards/ec3104/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for the EC3104 specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o
6
diff --git a/arch/sh/boards/ec3104/io.c b/arch/sh/boards/ec3104/io.c
deleted file mode 100644
index 2f86394b280b..000000000000
--- a/arch/sh/boards/ec3104/io.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * linux/arch/sh/boards/ec3104/io.c
3 * EC3104 companion chip support
4 *
5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
6 *
7 */
8/* EC3104 note:
9 * This code was written without any documentation about the EC3104 chip. While
10 * I hope I got most of the basic functionality right, the register names I use
11 * are most likely completely different from those in the chip documentation.
12 *
13 * If you have any further information about the EC3104, please tell me
14 * (prumpf@tux.org).
15 */
16
17#include <linux/kernel.h>
18#include <linux/types.h>
19#include <asm/io.h>
20#include <asm/page.h>
21#include <asm/ec3104/ec3104.h>
22
23/*
24 * EC3104 has a real ISA bus which we redirect low port accesses to (the
25 * actual device on mine is a ESS 1868, and I don't want to hack the driver
26 * more than strictly necessary). I am not going to duplicate the
27 * hard coding of PC addresses (for the 16550s aso) here though; it's just
28 * too ugly.
29 */
30
31#define low_port(port) ((port) < 0x10000)
32
33static inline unsigned long port2addr(unsigned long port)
34{
35 switch(port >> 16) {
36 case 0:
37 return EC3104_ISA_BASE + port * 2;
38
39 /* XXX hack. it's unclear what to do about the serial ports */
40 case 1:
41 return EC3104_BASE + (port&0xffff) * 4;
42
43 default:
44 /* XXX PCMCIA */
45 return 0;
46 }
47}
48
49unsigned char ec3104_inb(unsigned long port)
50{
51 u8 ret;
52
53 ret = *(volatile u8 *)port2addr(port);
54
55 return ret;
56}
57
58unsigned short ec3104_inw(unsigned long port)
59{
60 BUG();
61}
62
63unsigned long ec3104_inl(unsigned long port)
64{
65 BUG();
66}
67
68void ec3104_outb(unsigned char data, unsigned long port)
69{
70 *(volatile u8 *)port2addr(port) = data;
71}
72
73void ec3104_outw(unsigned short data, unsigned long port)
74{
75 BUG();
76}
77
78void ec3104_outl(unsigned long data, unsigned long port)
79{
80 BUG();
81}
diff --git a/arch/sh/boards/ec3104/irq.c b/arch/sh/boards/ec3104/irq.c
deleted file mode 100644
index ffa4ff1f090f..000000000000
--- a/arch/sh/boards/ec3104/irq.c
+++ /dev/null
@@ -1,196 +0,0 @@
1/*
2 * linux/arch/sh/boards/ec3104/irq.c
3 * EC3104 companion chip support
4 *
5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
6 *
7 */
8
9#include <asm/io.h>
10#include <asm/irq.h>
11#include <asm/ec3104/ec3104.h>
12
13/* This is for debugging mostly; here's the table that I intend to keep
14 * in here:
15 *
16 * index function base addr power interrupt bit
17 * 0 power b0ec0000 --- 00000001 (unused)
18 * 1 irqs b0ec1000 --- 00000002 (unused)
19 * 2 ?? b0ec2000 b0ec0008 00000004
20 * 3 PS2 (1) b0ec3000 b0ec000c 00000008
21 * 4 PS2 (2) b0ec4000 b0ec0010 00000010
22 * 5 ?? b0ec5000 b0ec0014 00000020
23 * 6 I2C b0ec6000 b0ec0018 00000040
24 * 7 serial (1) b0ec7000 b0ec001c 00000080
25 * 8 serial (2) b0ec8000 b0ec0020 00000100
26 * 9 serial (3) b0ec9000 b0ec0024 00000200
27 * 10 serial (4) b0eca000 b0ec0028 00000400
28 * 12 GPIO (1) b0ecc000 b0ec0030
29 * 13 GPIO (2) b0ecc000 b0ec0030
30 * 16 pcmcia (1) b0ed0000 b0ec0040 00010000
31 * 17 pcmcia (2) b0ed1000 b0ec0044 00020000
32 */
33
34/* I used the register names from another interrupt controller I worked with,
35 * since it seems to be identical to the ec3104 except that all bits are
36 * inverted:
37 *
38 * IRR: Interrupt Request Register (pending and enabled interrupts)
39 * IMR: Interrupt Mask Register (which interrupts are enabled)
40 * IPR: Interrupt Pending Register (pending interrupts, even disabled ones)
41 *
42 * 0 bits mean pending or enabled, 1 bits mean not pending or disabled. all
43 * IRQs seem to be level-triggered.
44 */
45
46#define EC3104_IRR (EC3104_BASE + 0x1000)
47#define EC3104_IMR (EC3104_BASE + 0x1004)
48#define EC3104_IPR (EC3104_BASE + 0x1008)
49
50#define ctrl_readl(addr) (*(volatile u32 *)(addr))
51#define ctrl_writel(data,addr) (*(volatile u32 *)(addr) = (data))
52#define ctrl_readb(addr) (*(volatile u8 *)(addr))
53
54static char *ec3104_name(unsigned index)
55{
56 switch(index) {
57 case 0:
58 return "power management";
59 case 1:
60 return "interrupts";
61 case 3:
62 return "PS2 (1)";
63 case 4:
64 return "PS2 (2)";
65 case 5:
66 return "I2C (1)";
67 case 6:
68 return "I2C (2)";
69 case 7:
70 return "serial (1)";
71 case 8:
72 return "serial (2)";
73 case 9:
74 return "serial (3)";
75 case 10:
76 return "serial (4)";
77 case 16:
78 return "pcmcia (1)";
79 case 17:
80 return "pcmcia (2)";
81 default: {
82 static char buf[32];
83
84 sprintf(buf, "unknown (%d)", index);
85
86 return buf;
87 }
88 }
89}
90
91int get_pending_interrupts(char *buf)
92{
93 u32 ipr;
94 u32 bit;
95 char *p = buf;
96
97 p += sprintf(p, "pending: (");
98
99 ipr = ctrl_inl(EC3104_IPR);
100
101 for (bit = 1; bit < 32; bit++)
102 if (!(ipr & (1<<bit)))
103 p += sprintf(p, "%s ", ec3104_name(bit));
104
105 p += sprintf(p, ")\n");
106
107 return p - buf;
108}
109
110static inline u32 ec3104_irq2mask(unsigned int irq)
111{
112 return (1 << (irq - EC3104_IRQBASE));
113}
114
115static inline void mask_ec3104_irq(unsigned int irq)
116{
117 u32 mask;
118
119 mask = ctrl_readl(EC3104_IMR);
120
121 mask |= ec3104_irq2mask(irq);
122
123 ctrl_writel(mask, EC3104_IMR);
124}
125
126static inline void unmask_ec3104_irq(unsigned int irq)
127{
128 u32 mask;
129
130 mask = ctrl_readl(EC3104_IMR);
131
132 mask &= ~ec3104_irq2mask(irq);
133
134 ctrl_writel(mask, EC3104_IMR);
135}
136
137static void disable_ec3104_irq(unsigned int irq)
138{
139 mask_ec3104_irq(irq);
140}
141
142static void enable_ec3104_irq(unsigned int irq)
143{
144 unmask_ec3104_irq(irq);
145}
146
147static void mask_and_ack_ec3104_irq(unsigned int irq)
148{
149 mask_ec3104_irq(irq);
150}
151
152static void end_ec3104_irq(unsigned int irq)
153{
154 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
155 unmask_ec3104_irq(irq);
156}
157
158static unsigned int startup_ec3104_irq(unsigned int irq)
159{
160 unmask_ec3104_irq(irq);
161
162 return 0;
163}
164
165static void shutdown_ec3104_irq(unsigned int irq)
166{
167 mask_ec3104_irq(irq);
168
169}
170
171static struct hw_interrupt_type ec3104_int = {
172 .typename = "EC3104",
173 .enable = enable_ec3104_irq,
174 .disable = disable_ec3104_irq,
175 .ack = mask_and_ack_ec3104_irq,
176 .end = end_ec3104_irq,
177 .startup = startup_ec3104_irq,
178 .shutdown = shutdown_ec3104_irq,
179};
180
181/* Yuck. the _demux API is ugly */
182int ec3104_irq_demux(int irq)
183{
184 if (irq == EC3104_IRQ) {
185 unsigned int mask;
186
187 mask = ctrl_readl(EC3104_IRR);
188
189 if (mask == 0xffffffff)
190 return EC3104_IRQ;
191 else
192 return EC3104_IRQBASE + ffz(mask);
193 }
194
195 return irq;
196}
diff --git a/arch/sh/boards/ec3104/setup.c b/arch/sh/boards/ec3104/setup.c
deleted file mode 100644
index 902bc975a13e..000000000000
--- a/arch/sh/boards/ec3104/setup.c
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * linux/arch/sh/boards/ec3104/setup.c
3 * EC3104 companion chip support
4 *
5 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
6 *
7 */
8/* EC3104 note:
9 * This code was written without any documentation about the EC3104 chip. While
10 * I hope I got most of the basic functionality right, the register names I use
11 * are most likely completely different from those in the chip documentation.
12 *
13 * If you have any further information about the EC3104, please tell me
14 * (prumpf@tux.org).
15 */
16
17#include <linux/sched.h>
18#include <linux/kernel.h>
19#include <linux/param.h>
20#include <linux/interrupt.h>
21#include <linux/init.h>
22#include <linux/irq.h>
23#include <linux/types.h>
24#include <asm/io.h>
25#include <asm/irq.h>
26#include <asm/machvec.h>
27#include <asm/mach/ec3104.h>
28
29static void __init ec3104_setup(char **cmdline_p)
30{
31 char str[8];
32 int i;
33
34 for (i=0; i<8; i++)
35 str[i] = ctrl_readb(EC3104_BASE + i);
36
37 for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++)
38 irq_desc[i].handler = &ec3104_int;
39
40 printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n",
41 str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE);
42
43 /* mask all interrupts. this should have been done by the boot
44 * loader for us but we want to be sure ... */
45 ctrl_writel(0xffffffff, EC3104_IMR);
46}
47
48/*
49 * The Machine Vector
50 */
51struct sh_machine_vector mv_ec3104 __initmv = {
52 .mv_name = "EC3104",
53 .mv_setup = ec3104_setup,
54 .mv_nr_irqs = 96,
55
56 .mv_inb = ec3104_inb,
57 .mv_inw = ec3104_inw,
58 .mv_inl = ec3104_inl,
59 .mv_outb = ec3104_outb,
60 .mv_outw = ec3104_outw,
61 .mv_outl = ec3104_outl,
62
63 .mv_irq_demux = ec3104_irq_demux,
64};
65ALIAS_MV(ec3104)
diff --git a/arch/sh/boards/hp6xx/hp6xx_apm.c b/arch/sh/boards/hp6xx/hp6xx_apm.c
index d146cdaa0b8b..d1c1460c8a06 100644
--- a/arch/sh/boards/hp6xx/hp6xx_apm.c
+++ b/arch/sh/boards/hp6xx/hp6xx_apm.c
@@ -7,12 +7,11 @@
7 * modify it under the terms of the GNU General Public License. 7 * modify it under the terms of the GNU General Public License.
8 */ 8 */
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/apm_bios.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <asm/io.h> 13#include <linux/apm-emulation.h>
15#include <asm/apm.h> 14#include <linux/io.h>
16#include <asm/adc.h> 15#include <asm/adc.h>
17#include <asm/hp6xx.h> 16#include <asm/hp6xx.h>
18 17
@@ -27,60 +26,41 @@
27 26
28#define MODNAME "hp6x0_apm" 27#define MODNAME "hp6x0_apm"
29 28
30static int hp6x0_apm_get_info(char *buf, char **start, off_t fpos, int length) 29static void hp6x0_apm_get_power_status(struct apm_power_info *info)
31{ 30{
31 int battery, backup, charging, percentage;
32 u8 pgdr; 32 u8 pgdr;
33 char *p;
34 int battery_status;
35 int battery_flag;
36 int ac_line_status;
37 int time_units = APM_BATTERY_LIFE_UNKNOWN;
38 33
39 int battery = adc_single(ADC_CHANNEL_BATTERY); 34 battery = adc_single(ADC_CHANNEL_BATTERY);
40 int backup = adc_single(ADC_CHANNEL_BACKUP); 35 backup = adc_single(ADC_CHANNEL_BACKUP);
41 int charging = adc_single(ADC_CHANNEL_CHARGE); 36 charging = adc_single(ADC_CHANNEL_CHARGE);
42 int percentage;
43 37
44 percentage = 100 * (battery - HP680_BATTERY_MIN) / 38 percentage = 100 * (battery - HP680_BATTERY_MIN) /
45 (HP680_BATTERY_MAX - HP680_BATTERY_MIN); 39 (HP680_BATTERY_MAX - HP680_BATTERY_MIN);
46 40
47 ac_line_status = (battery > HP680_BATTERY_AC_ON) ? 41 info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ?
48 APM_AC_ONLINE : APM_AC_OFFLINE; 42 APM_AC_ONLINE : APM_AC_OFFLINE;
49 43
50 p = buf;
51
52 pgdr = ctrl_inb(SH7709_PGDR); 44 pgdr = ctrl_inb(SH7709_PGDR);
53 if (pgdr & PGDR_MAIN_BATTERY_OUT) { 45 if (pgdr & PGDR_MAIN_BATTERY_OUT) {
54 battery_status = APM_BATTERY_STATUS_NOT_PRESENT; 46 info->battery_status = APM_BATTERY_STATUS_NOT_PRESENT;
55 battery_flag = 0x80; 47 info->battery_flag = 0x80;
56 percentage = -1; 48 } else if (charging < 8) {
57 } else if (charging < 8 ) { 49 info->battery_status = APM_BATTERY_STATUS_CHARGING;
58 battery_status = APM_BATTERY_STATUS_CHARGING; 50 info->battery_flag = 0x08;
59 battery_flag = 0x08; 51 info->ac_line_status = 0xff;
60 ac_line_status = 0xff;
61 } else if (percentage <= APM_CRITICAL) { 52 } else if (percentage <= APM_CRITICAL) {
62 battery_status = APM_BATTERY_STATUS_CRITICAL; 53 info->battery_status = APM_BATTERY_STATUS_CRITICAL;
63 battery_flag = 0x04; 54 info->battery_flag = 0x04;
64 } else if (percentage <= APM_LOW) { 55 } else if (percentage <= APM_LOW) {
65 battery_status = APM_BATTERY_STATUS_LOW; 56 info->battery_status = APM_BATTERY_STATUS_LOW;
66 battery_flag = 0x02; 57 info->battery_flag = 0x02;
67 } else { 58 } else {
68 battery_status = APM_BATTERY_STATUS_HIGH; 59 info->battery_status = APM_BATTERY_STATUS_HIGH;
69 battery_flag = 0x01; 60 info->battery_flag = 0x01;
70 } 61 }
71 62
72 p += sprintf(p, "1.0 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", 63 info->units = 0;
73 APM_32_BIT_SUPPORT,
74 ac_line_status,
75 battery_status,
76 battery_flag,
77 percentage,
78 time_units,
79 "min");
80 p += sprintf(p, "bat=%d backup=%d charge=%d\n",
81 battery, backup, charging);
82
83 return p - buf;
84} 64}
85 65
86static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev) 66static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
@@ -96,14 +76,14 @@ static int __init hp6x0_apm_init(void)
96 int ret; 76 int ret;
97 77
98 ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt, 78 ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
99 IRQF_DISABLED, MODNAME, 0); 79 IRQF_DISABLED, MODNAME, NULL);
100 if (unlikely(ret < 0)) { 80 if (unlikely(ret < 0)) {
101 printk(KERN_ERR MODNAME ": IRQ %d request failed\n", 81 printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
102 HP680_BTN_IRQ); 82 HP680_BTN_IRQ);
103 return ret; 83 return ret;
104 } 84 }
105 85
106 apm_get_info = hp6x0_apm_get_info; 86 apm_get_power_status = hp6x0_apm_get_power_status;
107 87
108 return ret; 88 return ret;
109} 89}
@@ -111,7 +91,7 @@ static int __init hp6x0_apm_init(void)
111static void __exit hp6x0_apm_exit(void) 91static void __exit hp6x0_apm_exit(void)
112{ 92{
113 free_irq(HP680_BTN_IRQ, 0); 93 free_irq(HP680_BTN_IRQ, 0);
114 apm_get_info = 0; 94 apm_get_info = NULL;
115} 95}
116 96
117module_init(hp6x0_apm_init); 97module_init(hp6x0_apm_init);
diff --git a/arch/sh/boards/landisk/landisk_pwb.c b/arch/sh/boards/landisk/landisk_pwb.c
index e62524978160..47a63c6617ed 100644
--- a/arch/sh/boards/landisk/landisk_pwb.c
+++ b/arch/sh/boards/landisk/landisk_pwb.c
@@ -150,7 +150,7 @@ static irqreturn_t sw_interrupt(int irq, void *dev_id)
150 return IRQ_HANDLED; 150 return IRQ_HANDLED;
151} 151}
152 152
153static struct file_operations swdrv_fops = { 153static const struct file_operations swdrv_fops = {
154 .read = swdrv_read, /* read */ 154 .read = swdrv_read, /* read */
155 .write = swdrv_write, /* write */ 155 .write = swdrv_write, /* write */
156 .open = swdrv_open, /* open */ 156 .open = swdrv_open, /* open */
diff --git a/arch/sh/boards/mpc1211/Makefile b/arch/sh/boards/mpc1211/Makefile
index 1644ebed78cb..8cd31b5d200b 100644
--- a/arch/sh/boards/mpc1211/Makefile
+++ b/arch/sh/boards/mpc1211/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the Interface (CTP/PCI/MPC-SH02) specific parts of the kernel 2# Makefile for the Interface (CTP/PCI/MPC-SH02) specific parts of the kernel
3# 3#
4 4
5obj-y := setup.o rtc.o led.o 5obj-y := setup.o rtc.o
6 6
7obj-$(CONFIG_PCI) += pci.o 7obj-$(CONFIG_PCI) += pci.o
8 8
diff --git a/arch/sh/boards/mpc1211/led.c b/arch/sh/boards/mpc1211/led.c
deleted file mode 100644
index 8df1591823d6..000000000000
--- a/arch/sh/boards/mpc1211/led.c
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/arch/sh/boards/mpc1211/led.c
3 *
4 * Copyright (C) 2001 Saito.K & Jeanne
5 *
6 * This file contains Interface MPC-1211 specific LED code.
7 */
8
9
10static void mach_led(int position, int value)
11{
12 volatile unsigned char* p = (volatile unsigned char*)0xa2000000;
13
14 if (value) {
15 *p |= 1;
16 } else {
17 *p &= ~1;
18 }
19}
20
21#ifdef CONFIG_HEARTBEAT
22
23#include <linux/sched.h>
24
25/* Cycle the LED's in the clasic Knightrider/Sun pattern */
26void heartbeat_mpc1211(void)
27{
28 static unsigned int cnt = 0, period = 0;
29 volatile unsigned char* p = (volatile unsigned char*)0xa2000000;
30 static unsigned bit = 0, up = 1;
31
32 cnt += 1;
33 if (cnt < period) {
34 return;
35 }
36
37 cnt = 0;
38
39 /* Go through the points (roughly!):
40 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
41 */
42 period = 110 - ( (300<<FSHIFT)/
43 ((avenrun[0]/5) + (3<<FSHIFT)) );
44
45 if (up) {
46 if (bit == 7) {
47 bit--;
48 up=0;
49 } else {
50 bit ++;
51 }
52 } else {
53 if (bit == 0) {
54 bit++;
55 up=1;
56 } else {
57 bit--;
58 }
59 }
60 *p = 1<<bit;
61
62}
63#endif /* CONFIG_HEARTBEAT */
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c
index 7c3d1d304157..1a0604b23ce0 100644
--- a/arch/sh/boards/mpc1211/setup.c
+++ b/arch/sh/boards/mpc1211/setup.c
@@ -10,6 +10,7 @@
10#include <linux/hdreg.h> 10#include <linux/hdreg.h>
11#include <linux/ide.h> 11#include <linux/ide.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/platform_device.h>
13#include <asm/io.h> 14#include <asm/io.h>
14#include <asm/machvec.h> 15#include <asm/machvec.h>
15#include <asm/mpc1211/mpc1211.h> 16#include <asm/mpc1211/mpc1211.h>
@@ -281,6 +282,32 @@ static int put_smb_blk(unsigned char *p, int address, int command, int no)
281 return 0; 282 return 0;
282} 283}
283 284
285static struct resource heartbeat_resources[] = {
286 [0] = {
287 .start = 0xa2000000,
288 .end = 0xa2000000 + 8 - 1,
289 .flags = IORESOURCE_MEM,
290 },
291};
292
293static struct platform_device heartbeat_device = {
294 .name = "heartbeat",
295 .id = -1,
296 .num_resources = ARRAY_SIZE(heartbeat_resources),
297 .resource = heartbeat_resources,
298};
299
300static struct platform_device *mpc1211_devices[] __initdata = {
301 &heartbeat_device,
302};
303
304static int __init mpc1211_devices_setup(void)
305{
306 return platform_add_devices(mpc1211_devices,
307 ARRAY_SIZE(mpc1211_devices));
308}
309__initcall(mpc1211_devices_setup);
310
284/* arch/sh/boards/mpc1211/rtc.c */ 311/* arch/sh/boards/mpc1211/rtc.c */
285void mpc1211_time_init(void); 312void mpc1211_time_init(void);
286 313
@@ -317,9 +344,5 @@ struct sh_machine_vector mv_mpc1211 __initmv = {
317 .mv_nr_irqs = 48, 344 .mv_nr_irqs = 48,
318 .mv_irq_demux = mpc1211_irq_demux, 345 .mv_irq_demux = mpc1211_irq_demux,
319 .mv_init_irq = init_mpc1211_IRQ, 346 .mv_init_irq = init_mpc1211_IRQ,
320
321#ifdef CONFIG_HEARTBEAT
322 .mv_heartbeat = heartbeat_mpc1211,
323#endif
324}; 347};
325ALIAS_MV(mpc1211) 348ALIAS_MV(mpc1211)
diff --git a/arch/sh/boards/renesas/r7780rp/Makefile b/arch/sh/boards/renesas/r7780rp/Makefile
index 574b0316ed56..3c93012e91a3 100644
--- a/arch/sh/boards/renesas/r7780rp/Makefile
+++ b/arch/sh/boards/renesas/r7780rp/Makefile
@@ -4,5 +4,4 @@
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6 6
7obj-$(CONFIG_HEARTBEAT) += led.o
8obj-$(CONFIG_PUSH_SWITCH) += psw.o 7obj-$(CONFIG_PUSH_SWITCH) += psw.o
diff --git a/arch/sh/boards/renesas/r7780rp/io.c b/arch/sh/boards/renesas/r7780rp/io.c
index 311ccccba718..f74d2ffb3851 100644
--- a/arch/sh/boards/renesas/r7780rp/io.c
+++ b/arch/sh/boards/renesas/r7780rp/io.c
@@ -11,22 +11,9 @@
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/io.h>
14#include <asm/r7780rp.h> 15#include <asm/r7780rp.h>
15#include <asm/addrspace.h> 16#include <asm/addrspace.h>
16#include <asm/io.h>
17
18static inline unsigned long port2adr(unsigned int port)
19{
20 if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
21 if (port == 0x3f6)
22 return (PA_AREA5_IO + 0x80c);
23 else
24 return (PA_AREA5_IO + 0x1000 + ((port-0x1f0) << 1));
25 else
26 maybebadio((unsigned long)port);
27
28 return port;
29}
30 17
31static inline unsigned long port88796l(unsigned int port, int flag) 18static inline unsigned long port88796l(unsigned int port, int flag)
32{ 19{
@@ -40,18 +27,6 @@ static inline unsigned long port88796l(unsigned int port, int flag)
40 return addr; 27 return addr;
41} 28}
42 29
43/* The 7780 R7780RP-1 seems to have everything hooked */
44/* up pretty normally (nothing on high-bytes only...) so this */
45/* shouldn't be needed */
46static inline int shifted_port(unsigned long port)
47{
48 /* For IDE registers, value is not shifted */
49 if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
50 return 0;
51 else
52 return 1;
53}
54
55#if defined(CONFIG_NE2000) || defined(CONFIG_NE2000_MODULE) 30#if defined(CONFIG_NE2000) || defined(CONFIG_NE2000_MODULE)
56#define CHECK_AX88796L_PORT(port) \ 31#define CHECK_AX88796L_PORT(port) \
57 ((port >= AX88796L_IO_BASE) && (port < (AX88796L_IO_BASE+0x20))) 32 ((port >= AX88796L_IO_BASE) && (port < (AX88796L_IO_BASE+0x20)))
@@ -70,12 +45,10 @@ u8 r7780rp_inb(unsigned long port)
70{ 45{
71 if (CHECK_AX88796L_PORT(port)) 46 if (CHECK_AX88796L_PORT(port))
72 return ctrl_inw(port88796l(port, 0)) & 0xff; 47 return ctrl_inw(port88796l(port, 0)) & 0xff;
73 else if (PXSEG(port)) 48 else if (is_pci_ioaddr(port))
74 return ctrl_inb(port);
75 else if (is_pci_ioaddr(port) || shifted_port(port))
76 return ctrl_inb(pci_ioaddr(port)); 49 return ctrl_inb(pci_ioaddr(port));
77 50
78 return ctrl_inw(port2adr(port)) & 0xff; 51 return ctrl_inw(port) & 0xff;
79} 52}
80 53
81u8 r7780rp_inb_p(unsigned long port) 54u8 r7780rp_inb_p(unsigned long port)
@@ -84,12 +57,10 @@ u8 r7780rp_inb_p(unsigned long port)
84 57
85 if (CHECK_AX88796L_PORT(port)) 58 if (CHECK_AX88796L_PORT(port))
86 v = ctrl_inw(port88796l(port, 0)) & 0xff; 59 v = ctrl_inw(port88796l(port, 0)) & 0xff;
87 else if (PXSEG(port)) 60 else if (is_pci_ioaddr(port))
88 v = ctrl_inb(port);
89 else if (is_pci_ioaddr(port) || shifted_port(port))
90 v = ctrl_inb(pci_ioaddr(port)); 61 v = ctrl_inb(pci_ioaddr(port));
91 else 62 else
92 v = ctrl_inw(port2adr(port)) & 0xff; 63 v = ctrl_inw(port) & 0xff;
93 64
94 ctrl_delay(); 65 ctrl_delay();
95 66
@@ -98,80 +69,56 @@ u8 r7780rp_inb_p(unsigned long port)
98 69
99u16 r7780rp_inw(unsigned long port) 70u16 r7780rp_inw(unsigned long port)
100{ 71{
101 if (CHECK_AX88796L_PORT(port)) 72 if (is_pci_ioaddr(port))
102 maybebadio(port);
103 else if (PXSEG(port))
104 return ctrl_inw(port);
105 else if (is_pci_ioaddr(port) || shifted_port(port))
106 return ctrl_inw(pci_ioaddr(port)); 73 return ctrl_inw(pci_ioaddr(port));
107 else
108 maybebadio(port);
109 74
110 return 0; 75 return ctrl_inw(port);
111} 76}
112 77
113u32 r7780rp_inl(unsigned long port) 78u32 r7780rp_inl(unsigned long port)
114{ 79{
115 if (CHECK_AX88796L_PORT(port)) 80 if (is_pci_ioaddr(port))
116 maybebadio(port);
117 else if (PXSEG(port))
118 return ctrl_inl(port);
119 else if (is_pci_ioaddr(port) || shifted_port(port))
120 return ctrl_inl(pci_ioaddr(port)); 81 return ctrl_inl(pci_ioaddr(port));
121 else
122 maybebadio(port);
123 82
124 return 0; 83 return ctrl_inl(port);
125} 84}
126 85
127void r7780rp_outb(u8 value, unsigned long port) 86void r7780rp_outb(u8 value, unsigned long port)
128{ 87{
129 if (CHECK_AX88796L_PORT(port)) 88 if (CHECK_AX88796L_PORT(port))
130 ctrl_outw(value, port88796l(port, 0)); 89 ctrl_outw(value, port88796l(port, 0));
131 else if (PXSEG(port)) 90 else if (is_pci_ioaddr(port))
132 ctrl_outb(value, port);
133 else if (is_pci_ioaddr(port) || shifted_port(port))
134 ctrl_outb(value, pci_ioaddr(port)); 91 ctrl_outb(value, pci_ioaddr(port));
135 else 92 else
136 ctrl_outw(value, port2adr(port)); 93 ctrl_outb(value, port);
137} 94}
138 95
139void r7780rp_outb_p(u8 value, unsigned long port) 96void r7780rp_outb_p(u8 value, unsigned long port)
140{ 97{
141 if (CHECK_AX88796L_PORT(port)) 98 if (CHECK_AX88796L_PORT(port))
142 ctrl_outw(value, port88796l(port, 0)); 99 ctrl_outw(value, port88796l(port, 0));
143 else if (PXSEG(port)) 100 else if (is_pci_ioaddr(port))
144 ctrl_outb(value, port);
145 else if (is_pci_ioaddr(port) || shifted_port(port))
146 ctrl_outb(value, pci_ioaddr(port)); 101 ctrl_outb(value, pci_ioaddr(port));
147 else 102 else
148 ctrl_outw(value, port2adr(port)); 103 ctrl_outb(value, port);
149 104
150 ctrl_delay(); 105 ctrl_delay();
151} 106}
152 107
153void r7780rp_outw(u16 value, unsigned long port) 108void r7780rp_outw(u16 value, unsigned long port)
154{ 109{
155 if (CHECK_AX88796L_PORT(port)) 110 if (is_pci_ioaddr(port))
156 maybebadio(port);
157 else if (PXSEG(port))
158 ctrl_outw(value, port);
159 else if (is_pci_ioaddr(port) || shifted_port(port))
160 ctrl_outw(value, pci_ioaddr(port)); 111 ctrl_outw(value, pci_ioaddr(port));
161 else 112 else
162 maybebadio(port); 113 ctrl_outw(value, port);
163} 114}
164 115
165void r7780rp_outl(u32 value, unsigned long port) 116void r7780rp_outl(u32 value, unsigned long port)
166{ 117{
167 if (CHECK_AX88796L_PORT(port)) 118 if (is_pci_ioaddr(port))
168 maybebadio(port);
169 else if (PXSEG(port))
170 ctrl_outl(value, port);
171 else if (is_pci_ioaddr(port) || shifted_port(port))
172 ctrl_outl(value, pci_ioaddr(port)); 119 ctrl_outl(value, pci_ioaddr(port));
173 else 120 else
174 maybebadio(port); 121 ctrl_outl(value, port);
175} 122}
176 123
177void r7780rp_insb(unsigned long port, void *dst, unsigned long count) 124void r7780rp_insb(unsigned long port, void *dst, unsigned long count)
@@ -183,16 +130,13 @@ void r7780rp_insb(unsigned long port, void *dst, unsigned long count)
183 p = (volatile u16 *)port88796l(port, 0); 130 p = (volatile u16 *)port88796l(port, 0);
184 while (count--) 131 while (count--)
185 *buf++ = *p & 0xff; 132 *buf++ = *p & 0xff;
186 } else if (PXSEG(port)) { 133 } else if (is_pci_ioaddr(port)) {
187 while (count--)
188 *buf++ = *(volatile u8 *)port;
189 } else if (is_pci_ioaddr(port) || shifted_port(port)) {
190 volatile u8 *bp = (volatile u8 *)pci_ioaddr(port); 134 volatile u8 *bp = (volatile u8 *)pci_ioaddr(port);
191 135
192 while (count--) 136 while (count--)
193 *buf++ = *bp; 137 *buf++ = *bp;
194 } else { 138 } else {
195 p = (volatile u16 *)port2adr(port); 139 p = (volatile u16 *)port;
196 while (count--) 140 while (count--)
197 *buf++ = *p & 0xff; 141 *buf++ = *p & 0xff;
198 } 142 }
@@ -205,30 +149,26 @@ void r7780rp_insw(unsigned long port, void *dst, unsigned long count)
205 149
206 if (CHECK_AX88796L_PORT(port)) 150 if (CHECK_AX88796L_PORT(port))
207 p = (volatile u16 *)port88796l(port, 1); 151 p = (volatile u16 *)port88796l(port, 1);
208 else if (PXSEG(port)) 152 else if (is_pci_ioaddr(port))
209 p = (volatile u16 *)port;
210 else if (is_pci_ioaddr(port) || shifted_port(port))
211 p = (volatile u16 *)pci_ioaddr(port); 153 p = (volatile u16 *)pci_ioaddr(port);
212 else 154 else
213 p = (volatile u16 *)port2adr(port); 155 p = (volatile u16 *)port;
214 156
215 while (count--) 157 while (count--)
216 *buf++ = *p; 158 *buf++ = *p;
159
160 flush_dcache_all();
217} 161}
218 162
219void r7780rp_insl(unsigned long port, void *dst, unsigned long count) 163void r7780rp_insl(unsigned long port, void *dst, unsigned long count)
220{ 164{
221 u32 *buf = dst; 165 if (is_pci_ioaddr(port)) {
222
223 if (CHECK_AX88796L_PORT(port))
224 maybebadio(port);
225 else if (is_pci_ioaddr(port) || shifted_port(port)) {
226 volatile u32 *p = (volatile u32 *)pci_ioaddr(port); 166 volatile u32 *p = (volatile u32 *)pci_ioaddr(port);
167 u32 *buf = dst;
227 168
228 while (count--) 169 while (count--)
229 *buf++ = *p; 170 *buf++ = *p;
230 } else 171 }
231 maybebadio(port);
232} 172}
233 173
234void r7780rp_outsb(unsigned long port, const void *src, unsigned long count) 174void r7780rp_outsb(unsigned long port, const void *src, unsigned long count)
@@ -240,19 +180,14 @@ void r7780rp_outsb(unsigned long port, const void *src, unsigned long count)
240 p = (volatile u16 *)port88796l(port, 0); 180 p = (volatile u16 *)port88796l(port, 0);
241 while (count--) 181 while (count--)
242 *p = *buf++; 182 *p = *buf++;
243 } else if (PXSEG(port)) 183 } else if (is_pci_ioaddr(port)) {
244 while (count--)
245 ctrl_outb(*buf++, port);
246 else if (is_pci_ioaddr(port) || shifted_port(port)) {
247 volatile u8 *bp = (volatile u8 *)pci_ioaddr(port); 184 volatile u8 *bp = (volatile u8 *)pci_ioaddr(port);
248 185
249 while (count--) 186 while (count--)
250 *bp = *buf++; 187 *bp = *buf++;
251 } else { 188 } else
252 p = (volatile u16 *)port2adr(port);
253 while (count--) 189 while (count--)
254 *p = *buf++; 190 ctrl_outb(*buf++, port);
255 }
256} 191}
257 192
258void r7780rp_outsw(unsigned long port, const void *src, unsigned long count) 193void r7780rp_outsw(unsigned long port, const void *src, unsigned long count)
@@ -262,40 +197,37 @@ void r7780rp_outsw(unsigned long port, const void *src, unsigned long count)
262 197
263 if (CHECK_AX88796L_PORT(port)) 198 if (CHECK_AX88796L_PORT(port))
264 p = (volatile u16 *)port88796l(port, 1); 199 p = (volatile u16 *)port88796l(port, 1);
265 else if (PXSEG(port)) 200 else if (is_pci_ioaddr(port))
266 p = (volatile u16 *)port;
267 else if (is_pci_ioaddr(port) || shifted_port(port))
268 p = (volatile u16 *)pci_ioaddr(port); 201 p = (volatile u16 *)pci_ioaddr(port);
269 else 202 else
270 p = (volatile u16 *)port2adr(port); 203 p = (volatile u16 *)port;
271 204
272 while (count--) 205 while (count--)
273 *p = *buf++; 206 *p = *buf++;
207
208 flush_dcache_all();
274} 209}
275 210
276void r7780rp_outsl(unsigned long port, const void *src, unsigned long count) 211void r7780rp_outsl(unsigned long port, const void *src, unsigned long count)
277{ 212{
278 const u32 *buf = src; 213 const u32 *buf = src;
214 u32 *p;
279 215
280 if (CHECK_AX88796L_PORT(port)) 216 if (is_pci_ioaddr(port))
281 maybebadio(port); 217 p = (u32 *)pci_ioaddr(port);
282 else if (is_pci_ioaddr(port) || shifted_port(port)) { 218 else
283 volatile u32 *p = (volatile u32 *)pci_ioaddr(port); 219 p = (u32 *)port;
284 220
285 while (count--) 221 while (count--)
286 *p = *buf++; 222 ctrl_outl(*buf++, (unsigned long)p);
287 } else
288 maybebadio(port);
289} 223}
290 224
291void __iomem *r7780rp_ioport_map(unsigned long port, unsigned int size) 225void __iomem *r7780rp_ioport_map(unsigned long port, unsigned int size)
292{ 226{
293 if (CHECK_AX88796L_PORT(port)) 227 if (CHECK_AX88796L_PORT(port))
294 return (void __iomem *)port88796l(port, size > 1); 228 return (void __iomem *)port88796l(port, size > 1);
295 else if (PXSEG(port)) 229 else if (is_pci_ioaddr(port))
296 return (void __iomem *)port;
297 else if (is_pci_ioaddr(port) || shifted_port(port))
298 return (void __iomem *)pci_ioaddr(port); 230 return (void __iomem *)pci_ioaddr(port);
299 231
300 return (void __iomem *)port2adr(port); 232 return (void __iomem *)port;
301} 233}
diff --git a/arch/sh/boards/renesas/r7780rp/led.c b/arch/sh/boards/renesas/r7780rp/led.c
deleted file mode 100644
index 6a00a257afd2..000000000000
--- a/arch/sh/boards/renesas/r7780rp/led.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * Copyright (C) Atom Create Engineering Co., Ltd.
3 *
4 * May be copied or modified under the terms of GNU General Public
5 * License. See linux/COPYING for more information.
6 *
7 * This file contains Renesas Solutions HIGHLANDER R7780RP-1 specific LED code.
8 */
9#include <linux/sched.h>
10#include <asm/io.h>
11#include <asm/r7780rp/r7780rp.h>
12
13/* Cycle the LED's in the clasic Knightriger/Sun pattern */
14void heartbeat_r7780rp(void)
15{
16 static unsigned int cnt = 0, period = 0;
17 volatile unsigned short *p = (volatile unsigned short *)PA_OBLED;
18 static unsigned bit = 0, up = 1;
19 unsigned bit_pos[] = {2, 1, 0, 3, 6, 5, 4, 7};
20
21 cnt += 1;
22 if (cnt < period)
23 return;
24
25 cnt = 0;
26
27 /* Go through the points (roughly!):
28 * f(0)=10, f(1)=16, f(2)=20, f(5)=35, f(int)->110
29 */
30 period = 110 - ((300 << FSHIFT)/((avenrun[0]/5) + (3<<FSHIFT)));
31
32 *p = 1 << bit_pos[bit];
33 if (up)
34 if (bit == 7) {
35 bit--;
36 up = 0;
37 } else
38 bit++;
39 else if (bit == 0)
40 up = 1;
41 else
42 bit--;
43}
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 9f89c8de9db9..0d74db9f1792 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -2,7 +2,7 @@
2 * arch/sh/boards/renesas/r7780rp/setup.c 2 * arch/sh/boards/renesas/r7780rp/setup.c
3 * 3 *
4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd. 4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
5 * Copyright (C) 2005, 2006 Paul Mundt 5 * Copyright (C) 2005 - 2007 Paul Mundt
6 * 6 *
7 * Renesas Solutions Highlander R7780RP-1 Support. 7 * Renesas Solutions Highlander R7780RP-1 Support.
8 * 8 *
@@ -12,12 +12,12 @@
12 */ 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/pata_platform.h>
15#include <asm/machvec.h> 16#include <asm/machvec.h>
16#include <asm/r7780rp.h> 17#include <asm/r7780rp.h>
17#include <asm/clock.h> 18#include <asm/clock.h>
18#include <asm/io.h> 19#include <asm/io.h>
19 20
20extern void heartbeat_r7780rp(void);
21extern void init_r7780rp_IRQ(void); 21extern void init_r7780rp_IRQ(void);
22 22
23static struct resource m66596_usb_host_resources[] = { 23static struct resource m66596_usb_host_resources[] = {
@@ -46,14 +46,14 @@ static struct platform_device m66596_usb_host_device = {
46 46
47static struct resource cf_ide_resources[] = { 47static struct resource cf_ide_resources[] = {
48 [0] = { 48 [0] = {
49 .start = 0x1f0, 49 .start = PA_AREA5_IO + 0x1000,
50 .end = 0x1f0 + 8, 50 .end = PA_AREA5_IO + 0x1000 + 0x08 - 1,
51 .flags = IORESOURCE_IO, 51 .flags = IORESOURCE_MEM,
52 }, 52 },
53 [1] = { 53 [1] = {
54 .start = 0x1f0 + 0x206, 54 .start = PA_AREA5_IO + 0x80c,
55 .end = 0x1f0 + 8 + 0x206 + 8, 55 .end = PA_AREA5_IO + 0x80c + 0x16 - 1,
56 .flags = IORESOURCE_IO, 56 .flags = IORESOURCE_MEM,
57 }, 57 },
58 [2] = { 58 [2] = {
59#ifdef CONFIG_SH_R7780MP 59#ifdef CONFIG_SH_R7780MP
@@ -65,16 +65,44 @@ static struct resource cf_ide_resources[] = {
65 }, 65 },
66}; 66};
67 67
68static struct pata_platform_info pata_info = {
69 .ioport_shift = 1,
70};
71
68static struct platform_device cf_ide_device = { 72static struct platform_device cf_ide_device = {
69 .name = "pata_platform", 73 .name = "pata_platform",
70 .id = -1, 74 .id = -1,
71 .num_resources = ARRAY_SIZE(cf_ide_resources), 75 .num_resources = ARRAY_SIZE(cf_ide_resources),
72 .resource = cf_ide_resources, 76 .resource = cf_ide_resources,
77 .dev = {
78 .platform_data = &pata_info,
79 },
80};
81
82static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 };
83
84static struct resource heartbeat_resources[] = {
85 [0] = {
86 .start = PA_OBLED,
87 .end = PA_OBLED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
88 .flags = IORESOURCE_MEM,
89 },
90};
91
92static struct platform_device heartbeat_device = {
93 .name = "heartbeat",
94 .id = -1,
95 .dev = {
96 .platform_data = heartbeat_bit_pos,
97 },
98 .num_resources = ARRAY_SIZE(heartbeat_resources),
99 .resource = heartbeat_resources,
73}; 100};
74 101
75static struct platform_device *r7780rp_devices[] __initdata = { 102static struct platform_device *r7780rp_devices[] __initdata = {
76 &m66596_usb_host_device, 103 &m66596_usb_host_device,
77 &cf_ide_device, 104 &cf_ide_device,
105 &heartbeat_device,
78}; 106};
79 107
80static int __init r7780rp_devices_setup(void) 108static int __init r7780rp_devices_setup(void)
@@ -148,7 +176,7 @@ static void __init r7780rp_setup(char **cmdline_p)
148#ifndef CONFIG_SH_R7780MP 176#ifndef CONFIG_SH_R7780MP
149 ctrl_outw(0x0001, PA_SDPOW); /* SD Power ON */ 177 ctrl_outw(0x0001, PA_SDPOW); /* SD Power ON */
150#endif 178#endif
151 ctrl_outw(ctrl_inw(PA_IVDRCTL) | 0x0100, PA_IVDRCTL); /* Si13112 */ 179 ctrl_outw(ctrl_inw(PA_IVDRCTL) | 0x01, PA_IVDRCTL); /* Si13112 */
152 180
153 pm_power_off = r7780rp_power_off; 181 pm_power_off = r7780rp_power_off;
154} 182}
@@ -185,8 +213,5 @@ struct sh_machine_vector mv_r7780rp __initmv = {
185 213
186 .mv_ioport_map = r7780rp_ioport_map, 214 .mv_ioport_map = r7780rp_ioport_map,
187 .mv_init_irq = init_r7780rp_IRQ, 215 .mv_init_irq = init_r7780rp_IRQ,
188#ifdef CONFIG_HEARTBEAT
189 .mv_heartbeat = heartbeat_r7780rp,
190#endif
191}; 216};
192ALIAS_MV(r7780rp) 217ALIAS_MV(r7780rp)
diff --git a/arch/sh/boards/renesas/rts7751r2d/Makefile b/arch/sh/boards/renesas/rts7751r2d/Makefile
index 686fc9ea5989..0d4c75a72be0 100644
--- a/arch/sh/boards/renesas/rts7751r2d/Makefile
+++ b/arch/sh/boards/renesas/rts7751r2d/Makefile
@@ -2,5 +2,4 @@
2# Makefile for the RTS7751R2D specific parts of the kernel 2# Makefile for the RTS7751R2D specific parts of the kernel
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o irq.o
6obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/renesas/rts7751r2d/io.c b/arch/sh/boards/renesas/rts7751r2d/io.c
deleted file mode 100644
index f2507a804979..000000000000
--- a/arch/sh/boards/renesas/rts7751r2d/io.c
+++ /dev/null
@@ -1,302 +0,0 @@
1/*
2 * Copyright (C) 2001 Ian da Silva, Jeremy Siegel
3 * Based largely on io_se.c.
4 *
5 * I/O routine for Renesas Technology sales RTS7751R2D.
6 *
7 * Initial version only to support LAN access; some
8 * placeholder code from io_rts7751r2d.c left in with the
9 * expectation of later SuperIO and PCMCIA access.
10 */
11#include <linux/kernel.h>
12#include <linux/types.h>
13#include <linux/pci.h>
14#include <linux/io.h>
15#include <asm/rts7751r2d.h>
16#include <asm/addrspace.h>
17
18/*
19 * The 7751R RTS7751R2D uses the built-in PCI controller (PCIC)
20 * of the 7751R processor, and has a SuperIO accessible via the PCI.
21 * The board also includes a PCMCIA controller on its memory bus,
22 * like the other Solution Engine boards.
23 */
24
25static inline unsigned long port2adr(unsigned int port)
26{
27 if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
28 if (port == 0x3f6)
29 return (PA_AREA5_IO + 0x80c);
30 else
31 return (PA_AREA5_IO + 0x1000 + ((port-0x1f0) << 1));
32 else
33 maybebadio((unsigned long)port);
34
35 return port;
36}
37
38static inline unsigned long port88796l(unsigned int port, int flag)
39{
40 unsigned long addr;
41
42 if (flag)
43 addr = PA_AX88796L + ((port - AX88796L_IO_BASE) << 1);
44 else
45 addr = PA_AX88796L + ((port - AX88796L_IO_BASE) << 1) + 0x1000;
46
47 return addr;
48}
49
50/* The 7751R RTS7751R2D seems to have everything hooked */
51/* up pretty normally (nothing on high-bytes only...) so this */
52/* shouldn't be needed */
53static inline int shifted_port(unsigned long port)
54{
55 /* For IDE registers, value is not shifted */
56 if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
57 return 0;
58 else
59 return 1;
60}
61
62#if defined(CONFIG_NE2000) || defined(CONFIG_NE2000_MODULE)
63#define CHECK_AX88796L_PORT(port) \
64 ((port >= AX88796L_IO_BASE) && (port < (AX88796L_IO_BASE+0x20)))
65#else
66#define CHECK_AX88796L_PORT(port) (0)
67#endif
68
69/*
70 * General outline: remap really low stuff [eventually] to SuperIO,
71 * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
72 * is mapped through the PCI IO window. Stuff with high bits (PXSEG)
73 * should be way beyond the window, and is used w/o translation for
74 * compatibility.
75 */
76unsigned char rts7751r2d_inb(unsigned long port)
77{
78 if (CHECK_AX88796L_PORT(port))
79 return (*(volatile unsigned short *)port88796l(port, 0)) & 0xff;
80 else if (PXSEG(port))
81 return *(volatile unsigned char *)port;
82 else if (is_pci_ioaddr(port) || shifted_port(port))
83 return *(volatile unsigned char *)pci_ioaddr(port);
84 else
85 return (*(volatile unsigned short *)port2adr(port) & 0xff);
86}
87
88unsigned char rts7751r2d_inb_p(unsigned long port)
89{
90 unsigned char v;
91
92 if (CHECK_AX88796L_PORT(port))
93 v = (*(volatile unsigned short *)port88796l(port, 0)) & 0xff;
94 else if (PXSEG(port))
95 v = *(volatile unsigned char *)port;
96 else if (is_pci_ioaddr(port) || shifted_port(port))
97 v = *(volatile unsigned char *)pci_ioaddr(port);
98 else
99 v = (*(volatile unsigned short *)port2adr(port) & 0xff);
100
101 ctrl_delay();
102
103 return v;
104}
105
106unsigned short rts7751r2d_inw(unsigned long port)
107{
108 if (CHECK_AX88796L_PORT(port))
109 maybebadio(port);
110 else if (PXSEG(port))
111 return *(volatile unsigned short *)port;
112 else if (is_pci_ioaddr(port) || shifted_port(port))
113 return *(volatile unsigned short *)pci_ioaddr(port);
114 else
115 maybebadio(port);
116
117 return 0;
118}
119
120unsigned int rts7751r2d_inl(unsigned long port)
121{
122 if (CHECK_AX88796L_PORT(port))
123 maybebadio(port);
124 else if (PXSEG(port))
125 return *(volatile unsigned long *)port;
126 else if (is_pci_ioaddr(port) || shifted_port(port))
127 return *(volatile unsigned long *)pci_ioaddr(port);
128 else
129 maybebadio(port);
130
131 return 0;
132}
133
134void rts7751r2d_outb(unsigned char value, unsigned long port)
135{
136 if (CHECK_AX88796L_PORT(port))
137 *((volatile unsigned short *)port88796l(port, 0)) = value;
138 else if (PXSEG(port))
139 *(volatile unsigned char *)port = value;
140 else if (is_pci_ioaddr(port) || shifted_port(port))
141 *(volatile unsigned char *)pci_ioaddr(port) = value;
142 else
143 *(volatile unsigned short *)port2adr(port) = value;
144}
145
146void rts7751r2d_outb_p(unsigned char value, unsigned long port)
147{
148 if (CHECK_AX88796L_PORT(port))
149 *((volatile unsigned short *)port88796l(port, 0)) = value;
150 else if (PXSEG(port))
151 *(volatile unsigned char *)port = value;
152 else if (is_pci_ioaddr(port) || shifted_port(port))
153 *(volatile unsigned char *)pci_ioaddr(port) = value;
154 else
155 *(volatile unsigned short *)port2adr(port) = value;
156
157 ctrl_delay();
158}
159
160void rts7751r2d_outw(unsigned short value, unsigned long port)
161{
162 if (CHECK_AX88796L_PORT(port))
163 maybebadio(port);
164 else if (PXSEG(port))
165 *(volatile unsigned short *)port = value;
166 else if (is_pci_ioaddr(port) || shifted_port(port))
167 *(volatile unsigned short *)pci_ioaddr(port) = value;
168 else
169 maybebadio(port);
170}
171
172void rts7751r2d_outl(unsigned int value, unsigned long port)
173{
174 if (CHECK_AX88796L_PORT(port))
175 maybebadio(port);
176 else if (PXSEG(port))
177 *(volatile unsigned long *)port = value;
178 else if (is_pci_ioaddr(port) || shifted_port(port))
179 *(volatile unsigned long *)pci_ioaddr(port) = value;
180 else
181 maybebadio(port);
182}
183
184void rts7751r2d_insb(unsigned long port, void *addr, unsigned long count)
185{
186 unsigned long a = (unsigned long)addr;
187 volatile __u8 *bp;
188 volatile __u16 *p;
189
190 if (CHECK_AX88796L_PORT(port)) {
191 p = (volatile unsigned short *)port88796l(port, 0);
192 while (count--)
193 ctrl_outb(*p & 0xff, a++);
194 } else if (PXSEG(port))
195 while (count--)
196 ctrl_outb(ctrl_inb(port), a++);
197 else if (is_pci_ioaddr(port) || shifted_port(port)) {
198 bp = (__u8 *)pci_ioaddr(port);
199 while (count--)
200 ctrl_outb(*bp, a++);
201 } else {
202 p = (volatile unsigned short *)port2adr(port);
203 while (count--)
204 ctrl_outb(*p & 0xff, a++);
205 }
206}
207
208void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count)
209{
210 unsigned long a = (unsigned long)addr;
211 volatile __u16 *p;
212
213 if (CHECK_AX88796L_PORT(port))
214 p = (volatile unsigned short *)port88796l(port, 1);
215 else if (PXSEG(port))
216 p = (volatile unsigned short *)port;
217 else if (is_pci_ioaddr(port) || shifted_port(port))
218 p = (volatile unsigned short *)pci_ioaddr(port);
219 else
220 p = (volatile unsigned short *)port2adr(port);
221 while (count--)
222 ctrl_outw(*p, a++);
223}
224
225void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count)
226{
227 if (CHECK_AX88796L_PORT(port))
228 maybebadio(port);
229 else if (is_pci_ioaddr(port) || shifted_port(port)) {
230 unsigned long a = (unsigned long)addr;
231
232 while (count--) {
233 ctrl_outl(ctrl_inl(pci_ioaddr(port)), a);
234 a += 4;
235 }
236 } else
237 maybebadio(port);
238}
239
240void rts7751r2d_outsb(unsigned long port, const void *addr, unsigned long count)
241{
242 unsigned long a = (unsigned long)addr;
243 volatile __u8 *bp;
244 volatile __u16 *p;
245
246 if (CHECK_AX88796L_PORT(port)) {
247 p = (volatile unsigned short *)port88796l(port, 0);
248 while (count--)
249 *p = ctrl_inb(a++);
250 } else if (PXSEG(port))
251 while (count--)
252 ctrl_outb(a++, port);
253 else if (is_pci_ioaddr(port) || shifted_port(port)) {
254 bp = (__u8 *)pci_ioaddr(port);
255 while (count--)
256 *bp = ctrl_inb(a++);
257 } else {
258 p = (volatile unsigned short *)port2adr(port);
259 while (count--)
260 *p = ctrl_inb(a++);
261 }
262}
263
264void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count)
265{
266 unsigned long a = (unsigned long)addr;
267 volatile __u16 *p;
268
269 if (CHECK_AX88796L_PORT(port))
270 p = (volatile unsigned short *)port88796l(port, 1);
271 else if (PXSEG(port))
272 p = (volatile unsigned short *)port;
273 else if (is_pci_ioaddr(port) || shifted_port(port))
274 p = (volatile unsigned short *)pci_ioaddr(port);
275 else
276 p = (volatile unsigned short *)port2adr(port);
277
278 while (count--) {
279 ctrl_outw(*p, a);
280 a += 2;
281 }
282}
283
284void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count)
285{
286 if (CHECK_AX88796L_PORT(port))
287 maybebadio(port);
288 else if (is_pci_ioaddr(port) || shifted_port(port)) {
289 unsigned long a = (unsigned long)addr;
290
291 while (count--) {
292 ctrl_outl(ctrl_inl(a), pci_ioaddr(port));
293 a += 4;
294 }
295 } else
296 maybebadio(port);
297}
298
299unsigned long rts7751r2d_isa_port2addr(unsigned long offset)
300{
301 return port2adr(offset);
302}
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c
index cb0eb20d1b43..0bae9041aceb 100644
--- a/arch/sh/boards/renesas/rts7751r2d/irq.c
+++ b/arch/sh/boards/renesas/rts7751r2d/irq.c
@@ -9,7 +9,9 @@
9 * Atom Create Engineering Co., Ltd. 2002. 9 * Atom Create Engineering Co., Ltd. 2002.
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/interrupt.h>
12#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/interrupt.h>
13#include <linux/io.h> 15#include <linux/io.h>
14#include <asm/rts7751r2d.h> 16#include <asm/rts7751r2d.h>
15 17
@@ -22,79 +24,31 @@ static int mask_pos[] = {6, 11, 9, 8, 12, 10, 5, 4, 7, 14, 13, 0, 0, 0, 0};
22extern int voyagergx_irq_demux(int irq); 24extern int voyagergx_irq_demux(int irq);
23extern void setup_voyagergx_irq(void); 25extern void setup_voyagergx_irq(void);
24 26
25static void enable_rts7751r2d_irq(unsigned int irq); 27static void enable_rts7751r2d_irq(unsigned int irq)
26static void disable_rts7751r2d_irq(unsigned int irq);
27
28/* shutdown is same as "disable" */
29#define shutdown_rts7751r2d_irq disable_rts7751r2d_irq
30
31static void ack_rts7751r2d_irq(unsigned int irq);
32static void end_rts7751r2d_irq(unsigned int irq);
33
34static unsigned int startup_rts7751r2d_irq(unsigned int irq)
35{ 28{
36 enable_rts7751r2d_irq(irq); 29 /* Set priority in IPR back to original value */
37 return 0; /* never anything pending */ 30 ctrl_outw(ctrl_inw(IRLCNTR1) | (1 << mask_pos[irq]), IRLCNTR1);
38} 31}
39 32
40static void disable_rts7751r2d_irq(unsigned int irq) 33static void disable_rts7751r2d_irq(unsigned int irq)
41{ 34{
42 unsigned short val;
43 unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);
44
45 /* Set the priority in IPR to 0 */ 35 /* Set the priority in IPR to 0 */
46 val = ctrl_inw(IRLCNTR1); 36 ctrl_outw(ctrl_inw(IRLCNTR1) & (0xffff ^ (1 << mask_pos[irq])),
47 val &= mask; 37 IRLCNTR1);
48 ctrl_outw(val, IRLCNTR1);
49}
50
51static void enable_rts7751r2d_irq(unsigned int irq)
52{
53 unsigned short val;
54 unsigned short value = (0x0001 << mask_pos[irq]);
55
56 /* Set priority in IPR back to original value */
57 val = ctrl_inw(IRLCNTR1);
58 val |= value;
59 ctrl_outw(val, IRLCNTR1);
60} 38}
61 39
62int rts7751r2d_irq_demux(int irq) 40int rts7751r2d_irq_demux(int irq)
63{ 41{
64 int demux_irq; 42 return voyagergx_irq_demux(irq);
65
66 demux_irq = voyagergx_irq_demux(irq);
67 return demux_irq;
68}
69
70static void ack_rts7751r2d_irq(unsigned int irq)
71{
72 disable_rts7751r2d_irq(irq);
73} 43}
74 44
75static void end_rts7751r2d_irq(unsigned int irq) 45static struct irq_chip rts7751r2d_irq_chip __read_mostly = {
76{ 46 .name = "rts7751r2d",
77 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 47 .mask = disable_rts7751r2d_irq,
78 enable_rts7751r2d_irq(irq); 48 .unmask = enable_rts7751r2d_irq,
79} 49 .mask_ack = disable_rts7751r2d_irq,
80
81static struct hw_interrupt_type rts7751r2d_irq_type = {
82 .typename = "RTS7751R2D IRQ",
83 .startup = startup_rts7751r2d_irq,
84 .shutdown = shutdown_rts7751r2d_irq,
85 .enable = enable_rts7751r2d_irq,
86 .disable = disable_rts7751r2d_irq,
87 .ack = ack_rts7751r2d_irq,
88 .end = end_rts7751r2d_irq,
89}; 50};
90 51
91static void make_rts7751r2d_irq(unsigned int irq)
92{
93 disable_irq_nosync(irq);
94 irq_desc[irq].chip = &rts7751r2d_irq_type;
95 disable_rts7751r2d_irq(irq);
96}
97
98/* 52/*
99 * Initialize IRQ setting 53 * Initialize IRQ setting
100 */ 54 */
@@ -119,8 +73,12 @@ void __init init_rts7751r2d_IRQ(void)
119 * IRL14=Extention #3 73 * IRL14=Extention #3
120 */ 74 */
121 75
122 for (i=0; i<15; i++) 76 for (i=0; i<15; i++) {
123 make_rts7751r2d_irq(i); 77 disable_irq_nosync(i);
78 set_irq_chip_and_handler_name(i, &rts7751r2d_irq_chip,
79 handle_level_irq, "level");
80 enable_rts7751r2d_irq(i);
81 }
124 82
125 setup_voyagergx_irq(); 83 setup_voyagergx_irq();
126} 84}
diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c
deleted file mode 100644
index 509f548bdce0..000000000000
--- a/arch/sh/boards/renesas/rts7751r2d/led.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * linux/arch/sh/boards/renesas/rts7751r2d/led.c
3 *
4 * Copyright (C) Atom Create Engineering Co., Ltd.
5 *
6 * May be copied or modified under the terms of GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * This file contains Renesas Technology Sales RTS7751R2D specific LED code.
10 */
11#include <linux/io.h>
12#include <linux/sched.h>
13#include <asm/rts7751r2d.h>
14
15/* Cycle the LED's in the clasic Knightriger/Sun pattern */
16void heartbeat_rts7751r2d(void)
17{
18 static unsigned int cnt = 0, period = 0;
19 volatile unsigned short *p = (volatile unsigned short *)PA_OUTPORT;
20 static unsigned bit = 0, up = 1;
21
22 cnt += 1;
23 if (cnt < period)
24 return;
25
26 cnt = 0;
27
28 /* Go through the points (roughly!):
29 * f(0)=10, f(1)=16, f(2)=20, f(5)=35, f(int)->110
30 */
31 period = 110 - ((300 << FSHIFT)/((avenrun[0]/5) + (3<<FSHIFT)));
32
33 *p = 1 << bit;
34 if (up)
35 if (bit == 7) {
36 bit--;
37 up = 0;
38 } else
39 bit++;
40 else if (bit == 0)
41 up = 1;
42 else
43 bit--;
44}
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 5c042d35ec91..44b42082a0af 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * Renesas Technology Sales RTS7751R2D Support. 2 * Renesas Technology Sales RTS7751R2D Support.
3 * 3 *
4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd. 4 * Copyright (C) 2002 - 2006 Atom Create Engineering Co., Ltd.
5 * Copyright (C) 2004 - 2006 Paul Mundt 5 * Copyright (C) 2004 - 2007 Paul Mundt
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
@@ -10,33 +10,13 @@
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/pata_platform.h>
13#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
14#include <linux/pm.h> 15#include <linux/pm.h>
15#include <asm/machvec.h> 16#include <asm/machvec.h>
16#include <asm/mach/rts7751r2d.h> 17#include <asm/rts7751r2d.h>
17#include <asm/io.h>
18#include <asm/voyagergx.h> 18#include <asm/voyagergx.h>
19 19#include <asm/io.h>
20extern void heartbeat_rts7751r2d(void);
21extern void init_rts7751r2d_IRQ(void);
22extern int rts7751r2d_irq_demux(int irq);
23
24extern void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t);
25extern int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t);
26
27static struct plat_serial8250_port uart_platform_data[] = {
28 {
29 .membase = (void *)VOYAGER_UART_BASE,
30 .mapbase = VOYAGER_UART_BASE,
31 .iotype = UPIO_MEM,
32 .irq = VOYAGER_UART0_IRQ,
33 .flags = UPF_BOOT_AUTOCONF,
34 .regshift = 2,
35 .uartclk = (9600 * 16),
36 }, {
37 .flags = 0,
38 },
39};
40 20
41static void __init voyagergx_serial_init(void) 21static void __init voyagergx_serial_init(void)
42{ 22{
@@ -45,32 +25,96 @@ static void __init voyagergx_serial_init(void)
45 /* 25 /*
46 * GPIO Control 26 * GPIO Control
47 */ 27 */
48 val = inl(GPIO_MUX_HIGH); 28 val = readl((void __iomem *)GPIO_MUX_HIGH);
49 val |= 0x00001fe0; 29 val |= 0x00001fe0;
50 outl(val, GPIO_MUX_HIGH); 30 writel(val, (void __iomem *)GPIO_MUX_HIGH);
51 31
52 /* 32 /*
53 * Power Mode Gate 33 * Power Mode Gate
54 */ 34 */
55 val = inl(POWER_MODE0_GATE); 35 val = readl((void __iomem *)POWER_MODE0_GATE);
56 val |= (POWER_MODE0_GATE_U0 | POWER_MODE0_GATE_U1); 36 val |= (POWER_MODE0_GATE_U0 | POWER_MODE0_GATE_U1);
57 outl(val, POWER_MODE0_GATE); 37 writel(val, (void __iomem *)POWER_MODE0_GATE);
58 38
59 val = inl(POWER_MODE1_GATE); 39 val = readl((void __iomem *)POWER_MODE1_GATE);
60 val |= (POWER_MODE1_GATE_U0 | POWER_MODE1_GATE_U1); 40 val |= (POWER_MODE1_GATE_U0 | POWER_MODE1_GATE_U1);
61 outl(val, POWER_MODE1_GATE); 41 writel(val, (void __iomem *)POWER_MODE1_GATE);
62} 42}
63 43
44static struct resource cf_ide_resources[] = {
45 [0] = {
46 .start = PA_AREA5_IO + 0x1000,
47 .end = PA_AREA5_IO + 0x1000 + 0x08 - 1,
48 .flags = IORESOURCE_MEM,
49 },
50 [1] = {
51 .start = PA_AREA5_IO + 0x80c,
52 .end = PA_AREA5_IO + 0x80c + 0x16 - 1,
53 .flags = IORESOURCE_MEM,
54 },
55 [2] = {
56#ifdef CONFIG_RTS7751R2D_REV11
57 .start = 1,
58#else
59 .start = 2,
60#endif
61 .flags = IORESOURCE_IRQ,
62 },
63};
64
65static struct pata_platform_info pata_info = {
66 .ioport_shift = 1,
67};
68
69static struct platform_device cf_ide_device = {
70 .name = "pata_platform",
71 .id = -1,
72 .num_resources = ARRAY_SIZE(cf_ide_resources),
73 .resource = cf_ide_resources,
74 .dev = {
75 .platform_data = &pata_info,
76 },
77};
78
79static struct plat_serial8250_port uart_platform_data[] = {
80 {
81 .membase = (void __iomem *)VOYAGER_UART_BASE,
82 .mapbase = VOYAGER_UART_BASE,
83 .iotype = UPIO_MEM,
84 .irq = VOYAGER_UART0_IRQ,
85 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
86 .regshift = 2,
87 .uartclk = (9600 * 16),
88 }
89};
90
64static struct platform_device uart_device = { 91static struct platform_device uart_device = {
65 .name = "serial8250", 92 .name = "serial8250",
66 .id = -1, 93 .id = PLAT8250_DEV_PLATFORM,
67 .dev = { 94 .dev = {
68 .platform_data = uart_platform_data, 95 .platform_data = uart_platform_data,
69 }, 96 },
70}; 97};
71 98
99static struct resource heartbeat_resources[] = {
100 [0] = {
101 .start = PA_OUTPORT,
102 .end = PA_OUTPORT + 8 - 1,
103 .flags = IORESOURCE_MEM,
104 },
105};
106
107static struct platform_device heartbeat_device = {
108 .name = "heartbeat",
109 .id = -1,
110 .num_resources = ARRAY_SIZE(heartbeat_resources),
111 .resource = heartbeat_resources,
112};
113
72static struct platform_device *rts7751r2d_devices[] __initdata = { 114static struct platform_device *rts7751r2d_devices[] __initdata = {
73 &uart_device, 115 &uart_device,
116 &heartbeat_device,
117 &cf_ide_device,
74}; 118};
75 119
76static int __init rts7751r2d_devices_setup(void) 120static int __init rts7751r2d_devices_setup(void)
@@ -78,6 +122,7 @@ static int __init rts7751r2d_devices_setup(void)
78 return platform_add_devices(rts7751r2d_devices, 122 return platform_add_devices(rts7751r2d_devices,
79 ARRAY_SIZE(rts7751r2d_devices)); 123 ARRAY_SIZE(rts7751r2d_devices));
80} 124}
125__initcall(rts7751r2d_devices_setup);
81 126
82static void rts7751r2d_power_off(void) 127static void rts7751r2d_power_off(void)
83{ 128{
@@ -89,14 +134,17 @@ static void rts7751r2d_power_off(void)
89 */ 134 */
90static void __init rts7751r2d_setup(char **cmdline_p) 135static void __init rts7751r2d_setup(char **cmdline_p)
91{ 136{
92 device_initcall(rts7751r2d_devices_setup); 137 u16 ver = ctrl_inw(PA_VERREG);
138
139 printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
140
141 printk(KERN_INFO "FPGA version:%d (revision:%d)\n",
142 (ver >> 4) & 0xf, ver & 0xf);
93 143
94 ctrl_outw(0x0000, PA_OUTPORT); 144 ctrl_outw(0x0000, PA_OUTPORT);
95 pm_power_off = rts7751r2d_power_off; 145 pm_power_off = rts7751r2d_power_off;
96 146
97 voyagergx_serial_init(); 147 voyagergx_serial_init();
98
99 printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
100} 148}
101 149
102/* 150/*
@@ -107,31 +155,7 @@ struct sh_machine_vector mv_rts7751r2d __initmv = {
107 .mv_setup = rts7751r2d_setup, 155 .mv_setup = rts7751r2d_setup,
108 .mv_nr_irqs = 72, 156 .mv_nr_irqs = 72,
109 157
110 .mv_inb = rts7751r2d_inb,
111 .mv_inw = rts7751r2d_inw,
112 .mv_inl = rts7751r2d_inl,
113 .mv_outb = rts7751r2d_outb,
114 .mv_outw = rts7751r2d_outw,
115 .mv_outl = rts7751r2d_outl,
116
117 .mv_inb_p = rts7751r2d_inb_p,
118 .mv_inw_p = rts7751r2d_inw,
119 .mv_inl_p = rts7751r2d_inl,
120 .mv_outb_p = rts7751r2d_outb_p,
121 .mv_outw_p = rts7751r2d_outw,
122 .mv_outl_p = rts7751r2d_outl,
123
124 .mv_insb = rts7751r2d_insb,
125 .mv_insw = rts7751r2d_insw,
126 .mv_insl = rts7751r2d_insl,
127 .mv_outsb = rts7751r2d_outsb,
128 .mv_outsw = rts7751r2d_outsw,
129 .mv_outsl = rts7751r2d_outsl,
130
131 .mv_init_irq = init_rts7751r2d_IRQ, 158 .mv_init_irq = init_rts7751r2d_IRQ,
132#ifdef CONFIG_HEARTBEAT
133 .mv_heartbeat = heartbeat_rts7751r2d,
134#endif
135 .mv_irq_demux = rts7751r2d_irq_demux, 159 .mv_irq_demux = rts7751r2d_irq_demux,
136 160
137#ifdef CONFIG_USB_SM501 161#ifdef CONFIG_USB_SM501
diff --git a/arch/sh/boards/se/7206/Makefile b/arch/sh/boards/se/7206/Makefile
index 63950f4f2453..63e7ed699f39 100644
--- a/arch/sh/boards/se/7206/Makefile
+++ b/arch/sh/boards/se/7206/Makefile
@@ -3,5 +3,3 @@
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6obj-$(CONFIG_HEARTBEAT) += led.o
7
diff --git a/arch/sh/boards/se/7206/led.c b/arch/sh/boards/se/7206/led.c
deleted file mode 100644
index ef794601ab86..000000000000
--- a/arch/sh/boards/se/7206/led.c
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * linux/arch/sh/kernel/led_se.c
3 *
4 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * This file contains Solution Engine specific LED code.
10 */
11
12#include <linux/config.h>
13#include <asm/se7206.h>
14
15#ifdef CONFIG_HEARTBEAT
16
17#include <linux/sched.h>
18
19/* Cycle the LED's in the clasic Knightrider/Sun pattern */
20void heartbeat_se(void)
21{
22 static unsigned int cnt = 0, period = 0;
23 volatile unsigned short* p = (volatile unsigned short*)PA_LED;
24 static unsigned bit = 0, up = 1;
25
26 cnt += 1;
27 if (cnt < period) {
28 return;
29 }
30
31 cnt = 0;
32
33 /* Go through the points (roughly!):
34 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
35 */
36 period = 110 - ( (300<<FSHIFT)/
37 ((avenrun[0]/5) + (3<<FSHIFT)) );
38
39 if (up) {
40 if (bit == 7) {
41 bit--;
42 up=0;
43 } else {
44 bit ++;
45 }
46 } else {
47 if (bit == 0) {
48 bit++;
49 up=1;
50 } else {
51 bit--;
52 }
53 }
54 *p = 1<<(bit+8);
55
56}
57#endif /* CONFIG_HEARTBEAT */
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c
index 0f42e91a3238..ca714879f559 100644
--- a/arch/sh/boards/se/7206/setup.c
+++ b/arch/sh/boards/se/7206/setup.c
@@ -3,6 +3,7 @@
3 * linux/arch/sh/boards/se/7206/setup.c 3 * linux/arch/sh/boards/se/7206/setup.c
4 * 4 *
5 * Copyright (C) 2006 Yoshinori Sato 5 * Copyright (C) 2006 Yoshinori Sato
6 * Copyright (C) 2007 Paul Mundt
6 * 7 *
7 * Hitachi 7206 SolutionEngine Support. 8 * Hitachi 7206 SolutionEngine Support.
8 * 9 *
@@ -34,15 +35,37 @@ static struct platform_device smc91x_device = {
34 .resource = smc91x_resources, 35 .resource = smc91x_resources,
35}; 36};
36 37
38static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
39
40static struct resource heartbeat_resources[] = {
41 [0] = {
42 .start = PA_LED,
43 .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
44 .flags = IORESOURCE_MEM,
45 },
46};
47
48static struct platform_device heartbeat_device = {
49 .name = "heartbeat",
50 .id = -1,
51 .dev = {
52 .platform_data = heartbeat_bit_pos,
53 },
54 .num_resources = ARRAY_SIZE(heartbeat_resources),
55 .resource = heartbeat_resources,
56};
57
58static struct platform_device *se7206_devices[] __initdata = {
59 &smc91x_device,
60 &heartbeat_device,
61};
62
37static int __init se7206_devices_setup(void) 63static int __init se7206_devices_setup(void)
38{ 64{
39 return platform_device_register(&smc91x_device); 65 return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices));
40} 66}
41
42__initcall(se7206_devices_setup); 67__initcall(se7206_devices_setup);
43 68
44void heartbeat_se(void);
45
46/* 69/*
47 * The Machine Vector 70 * The Machine Vector
48 */ 71 */
@@ -72,8 +95,5 @@ struct sh_machine_vector mv_se __initmv = {
72 .mv_outsl = se7206_outsl, 95 .mv_outsl = se7206_outsl,
73 96
74 .mv_init_irq = init_se7206_IRQ, 97 .mv_init_irq = init_se7206_IRQ,
75#ifdef CONFIG_HEARTBEAT
76 .mv_heartbeat = heartbeat_se,
77#endif
78}; 98};
79ALIAS_MV(se) 99ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7300/Makefile b/arch/sh/boards/se/7300/Makefile
index 0fbd4f47815c..46247368f14b 100644
--- a/arch/sh/boards/se/7300/Makefile
+++ b/arch/sh/boards/se/7300/Makefile
@@ -3,5 +3,3 @@
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/se/7300/led.c b/arch/sh/boards/se/7300/led.c
deleted file mode 100644
index 4d03bb7774be..000000000000
--- a/arch/sh/boards/se/7300/led.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * linux/arch/sh/boards/se/7300/led.c
3 *
4 * Derived from linux/arch/sh/boards/se/770x/led.c
5 *
6 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
7 *
8 * May be copied or modified under the terms of the GNU General Public
9 * License. See linux/COPYING for more information.
10 *
11 * This file contains Solution Engine specific LED code.
12 */
13
14#include <linux/sched.h>
15#include <asm/se7300.h>
16
17/* Cycle the LED's in the clasic Knightrider/Sun pattern */
18void heartbeat_7300se(void)
19{
20 static unsigned int cnt = 0, period = 0;
21 volatile unsigned short *p = (volatile unsigned short *) PA_LED;
22 static unsigned bit = 0, up = 1;
23
24 cnt += 1;
25 if (cnt < period) {
26 return;
27 }
28
29 cnt = 0;
30
31 /* Go through the points (roughly!):
32 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
33 */
34 period = 110 - ((300 << FSHIFT) / ((avenrun[0] / 5) + (3 << FSHIFT)));
35
36 if (up) {
37 if (bit == 7) {
38 bit--;
39 up = 0;
40 } else {
41 bit++;
42 }
43 } else {
44 if (bit == 0) {
45 bit++;
46 up = 1;
47 } else {
48 bit--;
49 }
50 }
51 *p = 1 << (bit + 8);
52
53}
54
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index 6f082a722d42..f1960956bad0 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -6,14 +6,43 @@
6 * SH-Mobile SolutionEngine 7300 Support. 6 * SH-Mobile SolutionEngine 7300 Support.
7 * 7 *
8 */ 8 */
9
10#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/platform_device.h>
11#include <asm/machvec.h> 11#include <asm/machvec.h>
12#include <asm/se7300.h> 12#include <asm/se7300.h>
13 13
14void heartbeat_7300se(void);
15void init_7300se_IRQ(void); 14void init_7300se_IRQ(void);
16 15
16static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
17
18static struct resource heartbeat_resources[] = {
19 [0] = {
20 .start = PA_LED,
21 .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
22 .flags = IORESOURCE_MEM,
23 },
24};
25
26static struct platform_device heartbeat_device = {
27 .name = "heartbeat",
28 .id = -1,
29 .dev = {
30 .platform_data = heartbeat_bit_pos,
31 },
32 .num_resources = ARRAY_SIZE(heartbeat_resources),
33 .resource = heartbeat_resources,
34};
35
36static struct platform_device *se7300_devices[] __initdata = {
37 &heartbeat_device,
38};
39
40static int __init se7300_devices_setup(void)
41{
42 return platform_add_devices(se7300_devices, ARRAY_SIZE(se7300_devices));
43}
44__initcall(se7300_devices_setup);
45
17/* 46/*
18 * The Machine Vector 47 * The Machine Vector
19 */ 48 */
@@ -42,8 +71,5 @@ struct sh_machine_vector mv_7300se __initmv = {
42 .mv_outsl = sh7300se_outsl, 71 .mv_outsl = sh7300se_outsl,
43 72
44 .mv_init_irq = init_7300se_IRQ, 73 .mv_init_irq = init_7300se_IRQ,
45#ifdef CONFIG_HEARTBEAT
46 .mv_heartbeat = heartbeat_7300se,
47#endif
48}; 74};
49ALIAS_MV(7300se) 75ALIAS_MV(7300se)
diff --git a/arch/sh/boards/se/73180/Makefile b/arch/sh/boards/se/73180/Makefile
index 8f63886a0f3f..e7c09967c529 100644
--- a/arch/sh/boards/se/73180/Makefile
+++ b/arch/sh/boards/se/73180/Makefile
@@ -3,5 +3,3 @@
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/se/73180/led.c b/arch/sh/boards/se/73180/led.c
deleted file mode 100644
index 4b72e9a3ead9..000000000000
--- a/arch/sh/boards/se/73180/led.c
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * arch/sh/boards/se/73180/led.c
3 *
4 * Derived from arch/sh/boards/se/770x/led.c
5 *
6 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
7 *
8 * May be copied or modified under the terms of the GNU General Public
9 * License. See linux/COPYING for more information.
10 *
11 * This file contains Solution Engine specific LED code.
12 */
13
14#include <linux/sched.h>
15#include <asm/mach/se73180.h>
16
17/* Cycle the LED's in the clasic Knightrider/Sun pattern */
18void heartbeat_73180se(void)
19{
20 static unsigned int cnt = 0, period = 0;
21 volatile unsigned short *p = (volatile unsigned short *) PA_LED;
22 static unsigned bit = 0, up = 1;
23
24 cnt += 1;
25 if (cnt < period) {
26 return;
27 }
28
29 cnt = 0;
30
31 /* Go through the points (roughly!):
32 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
33 */
34 period = 110 - ((300 << FSHIFT) / ((avenrun[0] / 5) + (3 << FSHIFT)));
35
36 if (up) {
37 if (bit == 7) {
38 bit--;
39 up = 0;
40 } else {
41 bit++;
42 }
43 } else {
44 if (bit == 0) {
45 bit++;
46 up = 1;
47 } else {
48 bit--;
49 }
50 }
51 *p = 1 << (bit + LED_SHIFT);
52
53}
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index b38ef50a160a..911ce1cdbd7f 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -10,13 +10,39 @@
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/platform_device.h>
13#include <asm/machvec.h> 14#include <asm/machvec.h>
14#include <asm/se73180.h> 15#include <asm/se73180.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
16 17
17void heartbeat_73180se(void);
18void init_73180se_IRQ(void); 18void init_73180se_IRQ(void);
19 19
20static struct resource heartbeat_resources[] = {
21 [0] = {
22 .start = PA_LED,
23 .end = PA_LED + 8 - 1,
24 .flags = IORESOURCE_MEM,
25 },
26};
27
28static struct platform_device heartbeat_device = {
29 .name = "heartbeat",
30 .id = -1,
31 .num_resources = ARRAY_SIZE(heartbeat_resources),
32 .resource = heartbeat_resources,
33};
34
35static struct platform_device *se73180_devices[] __initdata = {
36 &heartbeat_device,
37};
38
39static int __init se73180_devices_setup(void)
40{
41 return platform_add_devices(sh7343se_platform_devices,
42 ARRAY_SIZE(sh7343se_platform_devices));
43}
44__initcall(se73180_devices_setup);
45
20/* 46/*
21 * The Machine Vector 47 * The Machine Vector
22 */ 48 */
@@ -46,8 +72,5 @@ struct sh_machine_vector mv_73180se __initmv = {
46 72
47 .mv_init_irq = init_73180se_IRQ, 73 .mv_init_irq = init_73180se_IRQ,
48 .mv_irq_demux = shmse_irq_demux, 74 .mv_irq_demux = shmse_irq_demux,
49#ifdef CONFIG_HEARTBEAT
50 .mv_heartbeat = heartbeat_73180se,
51#endif
52}; 75};
53ALIAS_MV(73180se) 76ALIAS_MV(73180se)
diff --git a/arch/sh/boards/se/7343/Makefile b/arch/sh/boards/se/7343/Makefile
index 4291069c0b4f..3024796c6203 100644
--- a/arch/sh/boards/se/7343/Makefile
+++ b/arch/sh/boards/se/7343/Makefile
@@ -3,5 +3,3 @@
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/se/7343/led.c b/arch/sh/boards/se/7343/led.c
deleted file mode 100644
index 6b39e191c420..000000000000
--- a/arch/sh/boards/se/7343/led.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * arch/sh/boards/se/7343/led.c
3 *
4 */
5#include <linux/sched.h>
6#include <asm/mach/se7343.h>
7
8/* Cycle the LED's in the clasic Knightrider/Sun pattern */
9void heartbeat_7343se(void)
10{
11 static unsigned int cnt = 0, period = 0;
12 volatile unsigned short *p = (volatile unsigned short *) PA_LED;
13 static unsigned bit = 0, up = 1;
14
15 cnt += 1;
16 if (cnt < period) {
17 return;
18 }
19
20 cnt = 0;
21
22 /* Go through the points (roughly!):
23 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
24 */
25 period = 110 - ((300 << FSHIFT) / ((avenrun[0] / 5) + (3 << FSHIFT)));
26
27 if (up) {
28 if (bit == 7) {
29 bit--;
30 up = 0;
31 } else {
32 bit++;
33 }
34 } else {
35 if (bit == 0) {
36 bit++;
37 up = 1;
38 } else {
39 bit--;
40 }
41 }
42 *p = 1 << (bit + LED_SHIFT);
43
44}
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c
index c7d17fe7764e..3fdb16f2cef1 100644
--- a/arch/sh/boards/se/7343/setup.c
+++ b/arch/sh/boards/se/7343/setup.c
@@ -4,7 +4,6 @@
4#include <asm/mach/se7343.h> 4#include <asm/mach/se7343.h>
5#include <asm/irq.h> 5#include <asm/irq.h>
6 6
7void heartbeat_7343se(void);
8void init_7343se_IRQ(void); 7void init_7343se_IRQ(void);
9 8
10static struct resource smc91x_resources[] = { 9static struct resource smc91x_resources[] = {
@@ -31,14 +30,30 @@ static struct platform_device smc91x_device = {
31 .resource = smc91x_resources, 30 .resource = smc91x_resources,
32}; 31};
33 32
34static struct platform_device *smc91x_platform_devices[] __initdata = { 33static struct resource heartbeat_resources[] = {
34 [0] = {
35 .start = PA_LED,
36 .end = PA_LED + 8 - 1,
37 .flags = IORESOURCE_MEM,
38 },
39};
40
41static struct platform_device heartbeat_device = {
42 .name = "heartbeat",
43 .id = -1,
44 .num_resources = ARRAY_SIZE(heartbeat_resources),
45 .resource = heartbeat_resources,
46};
47
48static struct platform_device *sh7343se_platform_devices[] __initdata = {
35 &smc91x_device, 49 &smc91x_device,
50 &heartbeat_device,
36}; 51};
37 52
38static int __init sh7343se_devices_setup(void) 53static int __init sh7343se_devices_setup(void)
39{ 54{
40 return platform_add_devices(smc91x_platform_devices, 55 return platform_add_devices(sh7343se_platform_devices,
41 ARRAY_SIZE(smc91x_platform_devices)); 56 ARRAY_SIZE(sh7343se_platform_devices));
42} 57}
43 58
44static void __init sh7343se_setup(char **cmdline_p) 59static void __init sh7343se_setup(char **cmdline_p)
@@ -76,8 +91,5 @@ struct sh_machine_vector mv_7343se __initmv = {
76 91
77 .mv_init_irq = init_7343se_IRQ, 92 .mv_init_irq = init_7343se_IRQ,
78 .mv_irq_demux = shmse_irq_demux, 93 .mv_irq_demux = shmse_irq_demux,
79#ifdef CONFIG_HEARTBEAT
80 .mv_heartbeat = heartbeat_7343se,
81#endif
82}; 94};
83ALIAS_MV(7343se) 95ALIAS_MV(7343se)
diff --git a/arch/sh/boards/se/770x/Makefile b/arch/sh/boards/se/770x/Makefile
index 9a5035f80ec0..8e624b06d5ea 100644
--- a/arch/sh/boards/se/770x/Makefile
+++ b/arch/sh/boards/se/770x/Makefile
@@ -3,4 +3,3 @@
3# 3#
4 4
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c
index fcd7cd7fa05f..307ca5da6232 100644
--- a/arch/sh/boards/se/770x/irq.c
+++ b/arch/sh/boards/se/770x/irq.c
@@ -2,56 +2,96 @@
2 * linux/arch/sh/boards/se/770x/irq.c 2 * linux/arch/sh/boards/se/770x/irq.c
3 * 3 *
4 * Copyright (C) 2000 Kazumoto Kojima 4 * Copyright (C) 2000 Kazumoto Kojima
5 * Copyright (C) 2006 Nobuhiro Iwamatsu
5 * 6 *
6 * Hitachi SolutionEngine Support. 7 * Hitachi SolutionEngine Support.
7 * 8 *
8 */ 9 */
9 10
10#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/interrupt.h>
11#include <linux/irq.h> 13#include <linux/irq.h>
12#include <asm/irq.h> 14#include <asm/irq.h>
13#include <asm/io.h> 15#include <asm/io.h>
14#include <asm/se.h> 16#include <asm/se.h>
15 17
18/*
19 * If the problem of make_ipr_irq is solved,
20 * this code will become unnecessary. :-)
21 */
22static void se770x_disable_ipr_irq(unsigned int irq)
23{
24 struct ipr_data *p = get_irq_chip_data(irq);
25
26 ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << p->shift)), p->addr);
27}
28
29static void se770x_enable_ipr_irq(unsigned int irq)
30{
31 struct ipr_data *p = get_irq_chip_data(irq);
32
33 ctrl_outw(ctrl_inw(p->addr) | (p->priority << p->shift), p->addr);
34}
35
36static struct irq_chip se770x_irq_chip = {
37 .name = "MS770xSE-FPGA",
38 .mask = se770x_disable_ipr_irq,
39 .unmask = se770x_enable_ipr_irq,
40 .mask_ack = se770x_disable_ipr_irq,
41};
42
43void make_se770x_irq(struct ipr_data *table, unsigned int nr_irqs)
44{
45 int i;
46
47 for (i = 0; i < nr_irqs; i++) {
48 unsigned int irq = table[i].irq;
49 disable_irq_nosync(irq);
50 set_irq_chip_and_handler_name(irq, &se770x_irq_chip,
51 handle_level_irq, "level");
52 set_irq_chip_data(irq, &table[i]);
53 se770x_enable_ipr_irq(irq);
54 }
55}
56
16static struct ipr_data se770x_ipr_map[] = { 57static struct ipr_data se770x_ipr_map[] = {
17#if defined(CONFIG_CPU_SUBTYPE_SH7705) 58#if defined(CONFIG_CPU_SUBTYPE_SH7705)
18 /* This is default value */ 59 /* This is default value */
19 { 0xf-0x2, BCR_ILCRA, 2, 0x2 }, 60 { 0xf-0x2, 0, 8, 0x2 , BCR_ILCRA},
20 { 0xf-0xa, BCR_ILCRA, 1, 0xa }, 61 { 0xf-0xa, 0, 4, 0xa , BCR_ILCRA},
21 { 0xf-0x5, BCR_ILCRB, 0, 0x5 }, 62 { 0xf-0x5, 0, 0, 0x5 , BCR_ILCRB},
22 { 0xf-0x8, BCR_ILCRC, 1, 0x8 }, 63 { 0xf-0x8, 0, 4, 0x8 , BCR_ILCRC},
23 { 0xf-0xc, BCR_ILCRC, 0, 0xc }, 64 { 0xf-0xc, 0, 0, 0xc , BCR_ILCRC},
24 { 0xf-0xe, BCR_ILCRD, 3, 0xe }, 65 { 0xf-0xe, 0, 12, 0xe , BCR_ILCRD},
25 { 0xf-0x3, BCR_ILCRD, 1, 0x3 }, /* LAN */ 66 { 0xf-0x3, 0, 4, 0x3 , BCR_ILCRD}, /* LAN */
26 { 0xf-0xd, BCR_ILCRE, 2, 0xd }, 67 { 0xf-0xd, 0, 8, 0xd , BCR_ILCRE},
27 { 0xf-0x9, BCR_ILCRE, 1, 0x9 }, 68 { 0xf-0x9, 0, 4, 0x9 , BCR_ILCRE},
28 { 0xf-0x1, BCR_ILCRE, 0, 0x1 }, 69 { 0xf-0x1, 0, 0, 0x1 , BCR_ILCRE},
29 { 0xf-0xf, BCR_ILCRF, 3, 0xf }, 70 { 0xf-0xf, 0, 12, 0xf , BCR_ILCRF},
30 { 0xf-0xb, BCR_ILCRF, 1, 0xb }, 71 { 0xf-0xb, 0, 4, 0xb , BCR_ILCRF},
31 { 0xf-0x7, BCR_ILCRG, 3, 0x7 }, 72 { 0xf-0x7, 0, 12, 0x7 , BCR_ILCRG},
32 { 0xf-0x6, BCR_ILCRG, 2, 0x6 }, 73 { 0xf-0x6, 0, 8, 0x6 , BCR_ILCRG},
33 { 0xf-0x4, BCR_ILCRG, 1, 0x4 }, 74 { 0xf-0x4, 0, 4, 0x4 , BCR_ILCRG},
34#else 75#else
35 { 14, BCR_ILCRA, 2, 0x0f-14 }, 76 { 14, 0, 8, 0x0f-14 ,BCR_ILCRA},
36 { 12, BCR_ILCRA, 1, 0x0f-12 }, 77 { 12, 0, 4, 0x0f-12 ,BCR_ILCRA},
37 { 8, BCR_ILCRB, 1, 0x0f- 8 }, 78 { 8, 0, 4, 0x0f- 8 ,BCR_ILCRB},
38 { 6, BCR_ILCRC, 3, 0x0f- 6 }, 79 { 6, 0, 12, 0x0f- 6 ,BCR_ILCRC},
39 { 5, BCR_ILCRC, 2, 0x0f- 5 }, 80 { 5, 0, 8, 0x0f- 5 ,BCR_ILCRC},
40 { 4, BCR_ILCRC, 1, 0x0f- 4 }, 81 { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC},
41 { 3, BCR_ILCRC, 0, 0x0f- 3 }, 82 { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC},
42 { 1, BCR_ILCRD, 3, 0x0f- 1 }, 83 { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD},
43 84 /* ST NIC */
44 { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ 85 { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */
45 86 /* MRSHPC IRQs setting */
46 { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ 87 { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */
47 { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ 88 { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */
48 { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ 89 { 9, 0, 4, 0x0f- 9 ,BCR_ILCRE}, /* PCIRQ1 */
49 { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ 90 { 7, 0, 0, 0x0f- 7 ,BCR_ILCRE}, /* PCIRQ0 */
50
51 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ 91 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
52 /* NOTE: #2 and #13 are not used on PC */ 92 /* NOTE: #2 and #13 are not used on PC */
53 { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ 93 { 13, 0, 4, 0x0f-13 ,BCR_ILCRG}, /* SLOTIRQ2 */
54 { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ 94 { 2, 0, 0, 0x0f- 2 ,BCR_ILCRG}, /* SLOTIRQ1 */
55#endif 95#endif
56}; 96};
57 97
@@ -81,5 +121,5 @@ void __init init_se_IRQ(void)
81 ctrl_outw(0, BCR_ILCRF); 121 ctrl_outw(0, BCR_ILCRF);
82 ctrl_outw(0, BCR_ILCRG); 122 ctrl_outw(0, BCR_ILCRG);
83#endif 123#endif
84 make_ipr_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); 124 make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map));
85} 125}
diff --git a/arch/sh/boards/se/770x/led.c b/arch/sh/boards/se/770x/led.c
deleted file mode 100644
index d93dd831b2ad..000000000000
--- a/arch/sh/boards/se/770x/led.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * linux/arch/sh/boards/se/770x/led.c
3 *
4 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * This file contains Solution Engine specific LED code.
10 */
11
12#include <linux/sched.h>
13#include <asm/se.h>
14
15/* Cycle the LED's in the clasic Knightrider/Sun pattern */
16void heartbeat_se(void)
17{
18 static unsigned int cnt = 0, period = 0;
19 volatile unsigned short* p = (volatile unsigned short*)PA_LED;
20 static unsigned bit = 0, up = 1;
21
22 cnt += 1;
23 if (cnt < period) {
24 return;
25 }
26
27 cnt = 0;
28
29 /* Go through the points (roughly!):
30 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
31 */
32 period = 110 - ( (300<<FSHIFT)/
33 ((avenrun[0]/5) + (3<<FSHIFT)) );
34
35 if (up) {
36 if (bit == 7) {
37 bit--;
38 up=0;
39 } else {
40 bit ++;
41 }
42 } else {
43 if (bit == 0) {
44 bit++;
45 up=1;
46 } else {
47 bit--;
48 }
49 }
50 *p = 1<<(bit+8);
51
52}
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index a1d51d5fa925..45cbc36b9fb7 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -1,5 +1,4 @@
1/* $Id: setup.c,v 1.1.2.4 2002/03/02 21:57:07 lethal Exp $ 1/*
2 *
3 * linux/arch/sh/boards/se/770x/setup.c 2 * linux/arch/sh/boards/se/770x/setup.c
4 * 3 *
5 * Copyright (C) 2000 Kazumoto Kojima 4 * Copyright (C) 2000 Kazumoto Kojima
@@ -8,12 +7,12 @@
8 * 7 *
9 */ 8 */
10#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/platform_device.h>
11#include <asm/machvec.h> 11#include <asm/machvec.h>
12#include <asm/se.h> 12#include <asm/se.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/smc37c93x.h> 14#include <asm/smc37c93x.h>
15 15
16void heartbeat_se(void);
17void init_se_IRQ(void); 16void init_se_IRQ(void);
18 17
19/* 18/*
@@ -36,11 +35,6 @@ static void __init smsc_setup(char **cmdline_p)
36 smsc_config(ACTIVATE_INDEX, 0x01); 35 smsc_config(ACTIVATE_INDEX, 0x01);
37 smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */ 36 smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */
38 37
39 /* IDE1 */
40 smsc_config(CURRENT_LDN_INDEX, LDN_IDE1);
41 smsc_config(ACTIVATE_INDEX, 0x01);
42 smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */
43
44 /* AUXIO (GPIO): to use IDE1 */ 38 /* AUXIO (GPIO): to use IDE1 */
45 smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO); 39 smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO);
46 smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */ 40 smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */
@@ -69,6 +63,36 @@ static void __init smsc_setup(char **cmdline_p)
69 outb_p(CONFIG_EXIT, CONFIG_PORT); 63 outb_p(CONFIG_EXIT, CONFIG_PORT);
70} 64}
71 65
66static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
67
68static struct resource heartbeat_resources[] = {
69 [0] = {
70 .start = PA_LED,
71 .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
72 .flags = IORESOURCE_MEM,
73 },
74};
75
76static struct platform_device heartbeat_device = {
77 .name = "heartbeat",
78 .id = -1,
79 .dev = {
80 .platform_data = heartbeat_bit_pos,
81 },
82 .num_resources = ARRAY_SIZE(heartbeat_resources),
83 .resource = heartbeat_resources,
84};
85
86static struct platform_device *se_devices[] __initdata = {
87 &heartbeat_device,
88};
89
90static int __init se_devices_setup(void)
91{
92 return platform_add_devices(se_devices, ARRAY_SIZE(se_devices));
93}
94__initcall(se_devices_setup);
95
72/* 96/*
73 * The Machine Vector 97 * The Machine Vector
74 */ 98 */
@@ -107,8 +131,5 @@ struct sh_machine_vector mv_se __initmv = {
107 .mv_outsl = se_outsl, 131 .mv_outsl = se_outsl,
108 132
109 .mv_init_irq = init_se_IRQ, 133 .mv_init_irq = init_se_IRQ,
110#ifdef CONFIG_HEARTBEAT
111 .mv_heartbeat = heartbeat_se,
112#endif
113}; 134};
114ALIAS_MV(se) 135ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7751/Makefile b/arch/sh/boards/se/7751/Makefile
index 188900c48321..dbc29f3a9de5 100644
--- a/arch/sh/boards/se/7751/Makefile
+++ b/arch/sh/boards/se/7751/Makefile
@@ -5,4 +5,3 @@
5obj-y := setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6 6
7obj-$(CONFIG_PCI) += pci.o 7obj-$(CONFIG_PCI) += pci.o
8obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/se/7751/led.c b/arch/sh/boards/se/7751/led.c
deleted file mode 100644
index de4194d97c88..000000000000
--- a/arch/sh/boards/se/7751/led.c
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * linux/arch/sh/boards/se/7751/led.c
3 *
4 * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * This file contains Solution Engine specific LED code.
10 */
11#include <linux/sched.h>
12#include <asm/se7751.h>
13
14/* Cycle the LED's in the clasic Knightrider/Sun pattern */
15void heartbeat_7751se(void)
16{
17 static unsigned int cnt = 0, period = 0;
18 volatile unsigned short* p = (volatile unsigned short*)PA_LED;
19 static unsigned bit = 0, up = 1;
20
21 cnt += 1;
22 if (cnt < period) {
23 return;
24 }
25
26 cnt = 0;
27
28 /* Go through the points (roughly!):
29 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
30 */
31 period = 110 - ( (300<<FSHIFT)/
32 ((avenrun[0]/5) + (3<<FSHIFT)) );
33
34 if (up) {
35 if (bit == 7) {
36 bit--;
37 up=0;
38 } else {
39 bit ++;
40 }
41 } else {
42 if (bit == 0) {
43 bit++;
44 up=1;
45 } else {
46 bit--;
47 }
48 }
49 *p = 1<<(bit+8);
50
51}
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index f7e1dd39c836..e3feae6ec0bf 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -9,11 +9,11 @@
9 * Ian da Silva and Jeremy Siegel, 2001. 9 * Ian da Silva and Jeremy Siegel, 2001.
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h>
12#include <asm/machvec.h> 13#include <asm/machvec.h>
13#include <asm/se7751.h> 14#include <asm/se7751.h>
14#include <asm/io.h> 15#include <asm/io.h>
15 16
16void heartbeat_7751se(void);
17void init_7751se_IRQ(void); 17void init_7751se_IRQ(void);
18 18
19#ifdef CONFIG_SH_KGDB 19#ifdef CONFIG_SH_KGDB
@@ -161,11 +161,40 @@ static int kgdb_uart_setup(void)
161} 161}
162#endif /* CONFIG_SH_KGDB */ 162#endif /* CONFIG_SH_KGDB */
163 163
164static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
165
166static struct resource heartbeat_resources[] = {
167 [0] = {
168 .start = PA_LED,
169 .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
170 .flags = IORESOURCE_MEM,
171 },
172};
173
174static struct platform_device heartbeat_device = {
175 .name = "heartbeat",
176 .id = -1,
177 .dev = {
178 .platform_data = heartbeat_bit_pos,
179 },
180 .num_resources = ARRAY_SIZE(heartbeat_resources),
181 .resource = heartbeat_resources,
182};
183
184static struct platform_device *se7751_devices[] __initdata = {
185 &smc91x_device,
186 &heartbeat_device,
187};
188
189static int __init se7751_devices_setup(void)
190{
191 return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
192}
193__initcall(se7751_devices_setup);
164 194
165/* 195/*
166 * The Machine Vector 196 * The Machine Vector
167 */ 197 */
168
169struct sh_machine_vector mv_7751se __initmv = { 198struct sh_machine_vector mv_7751se __initmv = {
170 .mv_name = "7751 SolutionEngine", 199 .mv_name = "7751 SolutionEngine",
171 .mv_setup = sh7751se_setup, 200 .mv_setup = sh7751se_setup,
@@ -189,8 +218,5 @@ struct sh_machine_vector mv_7751se __initmv = {
189 .mv_outsl = sh7751se_outsl, 218 .mv_outsl = sh7751se_outsl,
190 219
191 .mv_init_irq = init_7751se_IRQ, 220 .mv_init_irq = init_7751se_IRQ,
192#ifdef CONFIG_HEARTBEAT
193 .mv_heartbeat = heartbeat_7751se,
194#endif
195}; 221};
196ALIAS_MV(7751se) 222ALIAS_MV(7751se)
diff --git a/arch/sh/boards/sh03/Makefile b/arch/sh/boards/sh03/Makefile
index 321be50e36a5..400306a796ec 100644
--- a/arch/sh/boards/sh03/Makefile
+++ b/arch/sh/boards/sh03/Makefile
@@ -3,4 +3,3 @@
3# 3#
4 4
5obj-y := setup.o rtc.o 5obj-y := setup.o rtc.o
6obj-$(CONFIG_HEARTBEAT) += led.o
diff --git a/arch/sh/boards/sh03/led.c b/arch/sh/boards/sh03/led.c
deleted file mode 100644
index d38562ad6be8..000000000000
--- a/arch/sh/boards/sh03/led.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * linux/arch/sh/boards/sh03/led.c
3 *
4 * Copyright (C) 2004 Saito.K Interface Corporation.
5 *
6 * This file contains Interface CTP/PCI-SH03 specific LED code.
7 */
8
9#include <linux/sched.h>
10
11/* Cycle the LED's in the clasic Knightrider/Sun pattern */
12void heartbeat_sh03(void)
13{
14 static unsigned int cnt = 0, period = 0;
15 volatile unsigned char* p = (volatile unsigned char*)0xa0800000;
16 static unsigned bit = 0, up = 1;
17
18 cnt += 1;
19 if (cnt < period) {
20 return;
21 }
22
23 cnt = 0;
24
25 /* Go through the points (roughly!):
26 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
27 */
28 period = 110 - ( (300<<FSHIFT)/
29 ((avenrun[0]/5) + (3<<FSHIFT)) );
30
31 if (up) {
32 if (bit == 7) {
33 bit--;
34 up=0;
35 } else {
36 bit ++;
37 }
38 } else {
39 if (bit == 0) {
40 bit++;
41 up=1;
42 } else {
43 bit--;
44 }
45 }
46 *p = 1<<bit;
47
48}
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index 5ad1e19771be..c069c444b4ec 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -8,6 +8,7 @@
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/irq.h> 9#include <linux/irq.h>
10#include <linux/pci.h> 10#include <linux/pci.h>
11#include <linux/platform_device.h>
11#include <asm/io.h> 12#include <asm/io.h>
12#include <asm/rtc.h> 13#include <asm/rtc.h>
13#include <asm/sh03/io.h> 14#include <asm/sh03/io.h>
@@ -48,15 +49,36 @@ static void __init sh03_setup(char **cmdline_p)
48 board_time_init = sh03_time_init; 49 board_time_init = sh03_time_init;
49} 50}
50 51
52static struct resource heartbeat_resources[] = {
53 [0] = {
54 .start = 0xa0800000,
55 .end = 0xa0800000 + 8 - 1,
56 .flags = IORESOURCE_MEM,
57 },
58};
59
60static struct platform_device heartbeat_device = {
61 .name = "heartbeat",
62 .id = -1,
63 .num_resources = ARRAY_SIZE(heartbeat_resources),
64 .resource = heartbeat_resources,
65};
66
67static struct platform_device *sh03_devices[] __initdata = {
68 &heartbeat_device,
69};
70
71static int __init sh03_devices_setup(void)
72{
73 return platform_add_devices(sh03_devices, ARRAY_SIZE(sh03_devices));
74}
75__initcall(sh03_devices_setup);
76
51struct sh_machine_vector mv_sh03 __initmv = { 77struct sh_machine_vector mv_sh03 __initmv = {
52 .mv_name = "Interface (CTP/PCI-SH03)", 78 .mv_name = "Interface (CTP/PCI-SH03)",
53 .mv_setup = sh03_setup, 79 .mv_setup = sh03_setup,
54 .mv_nr_irqs = 48, 80 .mv_nr_irqs = 48,
55 .mv_ioport_map = sh03_ioport_map, 81 .mv_ioport_map = sh03_ioport_map,
56 .mv_init_irq = init_sh03_IRQ, 82 .mv_init_irq = init_sh03_IRQ,
57
58#ifdef CONFIG_HEARTBEAT
59 .mv_heartbeat = heartbeat_sh03,
60#endif
61}; 83};
62ALIAS_MV(sh03) 84ALIAS_MV(sh03)
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c
index a31a1d1e2681..4a9df4a6b034 100644
--- a/arch/sh/boards/shmin/setup.c
+++ b/arch/sh/boards/shmin/setup.c
@@ -12,12 +12,22 @@
12#include <asm/irq.h> 12#include <asm/irq.h>
13#include <asm/io.h> 13#include <asm/io.h>
14 14
15#define PFC_PHCR 0xa400010e 15#define PFC_PHCR 0xa400010eUL
16#define INTC_ICR1 0xa4000010UL
17#define INTC_IPRC 0xa4000016UL
18
19static struct ipr_data shmin_ipr_map[] = {
20 { .irq=32, .addr=INTC_IPRC, .shift= 0, .priority=0 },
21 { .irq=33, .addr=INTC_IPRC, .shift= 4, .priority=0 },
22 { .irq=34, .addr=INTC_IPRC, .shift= 8, .priority=8 },
23 { .irq=35, .addr=INTC_IPRC, .shift=12, .priority=0 },
24};
16 25
17static void __init init_shmin_irq(void) 26static void __init init_shmin_irq(void)
18{ 27{
19 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ 28 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ
20 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. 29 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active.
30 make_ipr_irq(shmin_ipr_map, ARRAY_SIZE(shmin_ipr_map));
21} 31}
22 32
23static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) 33static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c
index f7ea700d05ae..70f12907647f 100644
--- a/arch/sh/cchips/voyagergx/irq.c
+++ b/arch/sh/cchips/voyagergx/irq.c
@@ -28,21 +28,21 @@ static void disable_voyagergx_irq(unsigned int irq)
28 unsigned long val; 28 unsigned long val;
29 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 29 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
30 30
31 pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); 31 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
32 val = inl(VOYAGER_INT_MASK); 32 val = readl((void __iomem *)VOYAGER_INT_MASK);
33 val &= ~mask; 33 val &= ~mask;
34 outl(val, VOYAGER_INT_MASK); 34 writel(val, (void __iomem *)VOYAGER_INT_MASK);
35} 35}
36 36
37static void enable_voyagergx_irq(unsigned int irq) 37static void enable_voyagergx_irq(unsigned int irq)
38{ 38{
39 unsigned long val; 39 unsigned long val;
40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
41 41
42 pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); 42 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
43 val = inl(VOYAGER_INT_MASK); 43 val = readl((void __iomem *)VOYAGER_INT_MASK);
44 val |= mask; 44 val |= mask;
45 outl(val, VOYAGER_INT_MASK); 45 writel(val, (void __iomem *)VOYAGER_INT_MASK);
46} 46}
47 47
48static void mask_and_ack_voyagergx(unsigned int irq) 48static void mask_and_ack_voyagergx(unsigned int irq)
@@ -68,20 +68,20 @@ static void shutdown_voyagergx_irq(unsigned int irq)
68} 68}
69 69
70static struct hw_interrupt_type voyagergx_irq_type = { 70static struct hw_interrupt_type voyagergx_irq_type = {
71 .typename = "VOYAGERGX-IRQ", 71 .typename = "VOYAGERGX-IRQ",
72 .startup = startup_voyagergx_irq, 72 .startup = startup_voyagergx_irq,
73 .shutdown = shutdown_voyagergx_irq, 73 .shutdown = shutdown_voyagergx_irq,
74 .enable = enable_voyagergx_irq, 74 .enable = enable_voyagergx_irq,
75 .disable = disable_voyagergx_irq, 75 .disable = disable_voyagergx_irq,
76 .ack = mask_and_ack_voyagergx, 76 .ack = mask_and_ack_voyagergx,
77 .end = end_voyagergx_irq, 77 .end = end_voyagergx_irq,
78}; 78};
79 79
80static irqreturn_t voyagergx_interrupt(int irq, void *dev_id) 80static irqreturn_t voyagergx_interrupt(int irq, void *dev_id)
81{ 81{
82 printk(KERN_INFO 82 printk(KERN_INFO
83 "VoyagerGX: spurious interrupt, status: 0x%x\n", 83 "VoyagerGX: spurious interrupt, status: 0x%x\n",
84 inl(INT_STATUS)); 84 (unsigned int)readl((void __iomem *)INT_STATUS));
85 return IRQ_HANDLED; 85 return IRQ_HANDLED;
86} 86}
87 87
@@ -93,13 +93,13 @@ static struct {
93void voyagergx_register_irq_demux(int irq, 93void voyagergx_register_irq_demux(int irq,
94 int (*demux)(int irq, void *dev), void *dev) 94 int (*demux)(int irq, void *dev), void *dev)
95{ 95{
96 voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = demux; 96 voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = demux;
97 voyagergx_demux[irq - VOYAGER_IRQ_BASE].dev = dev; 97 voyagergx_demux[irq - VOYAGER_IRQ_BASE].dev = dev;
98} 98}
99 99
100void voyagergx_unregister_irq_demux(int irq) 100void voyagergx_unregister_irq_demux(int irq)
101{ 101{
102 voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = 0; 102 voyagergx_demux[irq - VOYAGER_IRQ_BASE].func = 0;
103} 103}
104 104
105int voyagergx_irq_demux(int irq) 105int voyagergx_irq_demux(int irq)
@@ -107,31 +107,25 @@ int voyagergx_irq_demux(int irq)
107 107
108 if (irq == IRQ_VOYAGER ) { 108 if (irq == IRQ_VOYAGER ) {
109 unsigned long i = 0, bit __attribute__ ((unused)); 109 unsigned long i = 0, bit __attribute__ ((unused));
110 unsigned long val = inl(INT_STATUS); 110 unsigned long val = readl((void __iomem *)INT_STATUS);
111#if 1 111
112 if ( val & ( 1 << 1 )){ 112 if (val & (1 << 1))
113 i = 1; 113 i = 1;
114 } else if ( val & ( 1 << 2 )){ 114 else if (val & (1 << 2))
115 i = 2; 115 i = 2;
116 } else if ( val & ( 1 << 6 )){ 116 else if (val & (1 << 6))
117 i = 6; 117 i = 6;
118 } else if( val & ( 1 << 10 )){ 118 else if (val & (1 << 10))
119 i = 10; 119 i = 10;
120 } else if( val & ( 1 << 11 )){ 120 else if (val & (1 << 11))
121 i = 11; 121 i = 11;
122 } else if( val & ( 1 << 12 )){ 122 else if (val & (1 << 12))
123 i = 12; 123 i = 12;
124 } else if( val & ( 1 << 17 )){ 124 else if (val & (1 << 17))
125 i = 17; 125 i = 17;
126 } else { 126 else
127 printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val); 127 printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val);
128 } 128 pr_debug("voyagergx_irq_demux %d \n", i);
129 pr_debug("voyagergx_irq_demux %ld\n", i);
130#else
131 for (bit = 1, i = 0 ; i < VOYAGER_IRQ_NUM ; bit <<= 1, i++)
132 if (val & bit)
133 break;
134#endif
135 if (i < VOYAGER_IRQ_NUM) { 129 if (i < VOYAGER_IRQ_NUM) {
136 irq = VOYAGER_IRQ_BASE + i; 130 irq = VOYAGER_IRQ_BASE + i;
137 if (voyagergx_demux[i].func != 0) 131 if (voyagergx_demux[i].func != 0)
diff --git a/arch/sh/cchips/voyagergx/setup.c b/arch/sh/cchips/voyagergx/setup.c
index 66b2fedd7ad9..33f03027c193 100644
--- a/arch/sh/cchips/voyagergx/setup.c
+++ b/arch/sh/cchips/voyagergx/setup.c
@@ -19,7 +19,7 @@ static int __init setup_voyagergx(void)
19{ 19{
20 unsigned long val; 20 unsigned long val;
21 21
22 val = inl(DRAM_CTRL); 22 val = readl((void __iomem *)DRAM_CTRL);
23 val |= (DRAM_CTRL_CPU_COLUMN_SIZE_256 | 23 val |= (DRAM_CTRL_CPU_COLUMN_SIZE_256 |
24 DRAM_CTRL_CPU_ACTIVE_PRECHARGE | 24 DRAM_CTRL_CPU_ACTIVE_PRECHARGE |
25 DRAM_CTRL_CPU_RESET | 25 DRAM_CTRL_CPU_RESET |
@@ -29,7 +29,7 @@ static int __init setup_voyagergx(void)
29 DRAM_CTRL_ACTIVE_PRECHARGE | 29 DRAM_CTRL_ACTIVE_PRECHARGE |
30 DRAM_CTRL_RESET | 30 DRAM_CTRL_RESET |
31 DRAM_CTRL_REMAIN_ACTIVE); 31 DRAM_CTRL_REMAIN_ACTIVE);
32 outl(val, DRAM_CTRL); 32 writel(val, (void __iomem *)DRAM_CTRL);
33 33
34 return 0; 34 return 0;
35} 35}
diff --git a/arch/sh/configs/rts7751r2d_defconfig b/arch/sh/configs/rts7751r2d_defconfig
index 099e98f14729..db6a02df5af6 100644
--- a/arch/sh/configs/rts7751r2d_defconfig
+++ b/arch/sh/configs/rts7751r2d_defconfig
@@ -1,15 +1,21 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18 3# Linux kernel version: 2.6.20
4# Tue Oct 3 11:38:36 2006 4# Thu Feb 15 17:17:29 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_FIND_NEXT_BIT=y 8CONFIG_GENERIC_FIND_NEXT_BIT=y
9CONFIG_GENERIC_HWEIGHT=y 9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
11CONFIG_GENERIC_IRQ_PROBE=y 12CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14# CONFIG_GENERIC_TIME is not set
15CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14 20
15# 21#
@@ -33,8 +39,8 @@ CONFIG_SYSVIPC=y
33# CONFIG_UTS_NS is not set 39# CONFIG_UTS_NS is not set
34# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
35# CONFIG_IKCONFIG is not set 41# CONFIG_IKCONFIG is not set
42CONFIG_SYSFS_DEPRECATED=y
36# CONFIG_RELAY is not set 43# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39CONFIG_SYSCTL=y 45CONFIG_SYSCTL=y
40CONFIG_EMBEDDED=y 46CONFIG_EMBEDDED=y
@@ -97,10 +103,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
97# CONFIG_SH_73180_SOLUTION_ENGINE is not set 103# CONFIG_SH_73180_SOLUTION_ENGINE is not set
98# CONFIG_SH_7751_SYSTEMH is not set 104# CONFIG_SH_7751_SYSTEMH is not set
99# CONFIG_SH_HP6XX is not set 105# CONFIG_SH_HP6XX is not set
100# CONFIG_SH_EC3104 is not set
101# CONFIG_SH_SATURN is not set 106# CONFIG_SH_SATURN is not set
102# CONFIG_SH_DREAMCAST is not set 107# CONFIG_SH_DREAMCAST is not set
103# CONFIG_SH_BIGSUR is not set
104# CONFIG_SH_MPC1211 is not set 108# CONFIG_SH_MPC1211 is not set
105# CONFIG_SH_SH03 is not set 109# CONFIG_SH_SH03 is not set
106# CONFIG_SH_SECUREEDGE5410 is not set 110# CONFIG_SH_SECUREEDGE5410 is not set
@@ -113,6 +117,9 @@ CONFIG_SH_RTS7751R2D=y
113# CONFIG_SH_LANDISK is not set 117# CONFIG_SH_LANDISK is not set
114# CONFIG_SH_TITAN is not set 118# CONFIG_SH_TITAN is not set
115# CONFIG_SH_SHMIN is not set 119# CONFIG_SH_SHMIN is not set
120# CONFIG_SH_7206_SOLUTION_ENGINE is not set
121# CONFIG_SH_7619_SOLUTION_ENGINE is not set
122# CONFIG_SH_ASDAP310 is not set
116# CONFIG_SH_UNKNOWN is not set 123# CONFIG_SH_UNKNOWN is not set
117 124
118# 125#
@@ -124,6 +131,12 @@ CONFIG_CPU_SH4=y
124# SH-2 Processor Support 131# SH-2 Processor Support
125# 132#
126# CONFIG_CPU_SUBTYPE_SH7604 is not set 133# CONFIG_CPU_SUBTYPE_SH7604 is not set
134# CONFIG_CPU_SUBTYPE_SH7619 is not set
135
136#
137# SH-2A Processor Support
138#
139# CONFIG_CPU_SUBTYPE_SH7206 is not set
127 140
128# 141#
129# SH-3 Processor Support 142# SH-3 Processor Support
@@ -159,12 +172,14 @@ CONFIG_CPU_SUBTYPE_SH7751R=y
159# 172#
160# CONFIG_CPU_SUBTYPE_SH7770 is not set 173# CONFIG_CPU_SUBTYPE_SH7770 is not set
161# CONFIG_CPU_SUBTYPE_SH7780 is not set 174# CONFIG_CPU_SUBTYPE_SH7780 is not set
175# CONFIG_CPU_SUBTYPE_SH7785 is not set
162 176
163# 177#
164# SH4AL-DSP Processor Support 178# SH4AL-DSP Processor Support
165# 179#
166# CONFIG_CPU_SUBTYPE_SH73180 is not set 180# CONFIG_CPU_SUBTYPE_SH73180 is not set
167# CONFIG_CPU_SUBTYPE_SH7343 is not set 181# CONFIG_CPU_SUBTYPE_SH7343 is not set
182# CONFIG_CPU_SUBTYPE_SH7722 is not set
168 183
169# 184#
170# Memory management options 185# Memory management options
@@ -174,6 +189,9 @@ CONFIG_PAGE_OFFSET=0x80000000
174CONFIG_MEMORY_START=0x0c000000 189CONFIG_MEMORY_START=0x0c000000
175CONFIG_MEMORY_SIZE=0x04000000 190CONFIG_MEMORY_SIZE=0x04000000
176CONFIG_VSYSCALL=y 191CONFIG_VSYSCALL=y
192CONFIG_PAGE_SIZE_4KB=y
193# CONFIG_PAGE_SIZE_8KB is not set
194# CONFIG_PAGE_SIZE_64KB is not set
177CONFIG_SELECT_MEMORY_MODEL=y 195CONFIG_SELECT_MEMORY_MODEL=y
178CONFIG_FLATMEM_MANUAL=y 196CONFIG_FLATMEM_MANUAL=y
179# CONFIG_DISCONTIGMEM_MANUAL is not set 197# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -183,6 +201,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
183# CONFIG_SPARSEMEM_STATIC is not set 201# CONFIG_SPARSEMEM_STATIC is not set
184CONFIG_SPLIT_PTLOCK_CPUS=4 202CONFIG_SPLIT_PTLOCK_CPUS=4
185# CONFIG_RESOURCES_64BIT is not set 203# CONFIG_RESOURCES_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=0
186 205
187# 206#
188# Cache configuration 207# Cache configuration
@@ -195,11 +214,14 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
195# Processor features 214# Processor features
196# 215#
197CONFIG_CPU_LITTLE_ENDIAN=y 216CONFIG_CPU_LITTLE_ENDIAN=y
217# CONFIG_CPU_BIG_ENDIAN is not set
198CONFIG_SH_FPU=y 218CONFIG_SH_FPU=y
199# CONFIG_SH_DSP is not set 219# CONFIG_SH_DSP is not set
200# CONFIG_SH_STORE_QUEUES is not set 220# CONFIG_SH_STORE_QUEUES is not set
201CONFIG_CPU_HAS_INTEVT=y 221CONFIG_CPU_HAS_INTEVT=y
222CONFIG_CPU_HAS_IPR_IRQ=y
202CONFIG_CPU_HAS_SR_RB=y 223CONFIG_CPU_HAS_SR_RB=y
224CONFIG_CPU_HAS_PTEA=y
203 225
204# 226#
205# Timer support 227# Timer support
@@ -210,6 +232,8 @@ CONFIG_SH_TMU=y
210# RTS7751R2D options 232# RTS7751R2D options
211# 233#
212CONFIG_RTS7751R2D_REV11=y 234CONFIG_RTS7751R2D_REV11=y
235CONFIG_SH_TIMER_IRQ=16
236# CONFIG_NO_IDLE_HZ is not set
213CONFIG_SH_PCLK_FREQ=60000000 237CONFIG_SH_PCLK_FREQ=60000000
214 238
215# 239#
@@ -232,10 +256,16 @@ CONFIG_VOYAGERGX=y
232CONFIG_HEARTBEAT=y 256CONFIG_HEARTBEAT=y
233 257
234# 258#
259# Additional SuperH Device Drivers
260#
261# CONFIG_PUSH_SWITCH is not set
262
263#
235# Kernel features 264# Kernel features
236# 265#
237# CONFIG_HZ_100 is not set 266# CONFIG_HZ_100 is not set
238CONFIG_HZ_250=y 267CONFIG_HZ_250=y
268# CONFIG_HZ_300 is not set
239# CONFIG_HZ_1000 is not set 269# CONFIG_HZ_1000 is not set
240CONFIG_HZ=250 270CONFIG_HZ=250
241# CONFIG_KEXEC is not set 271# CONFIG_KEXEC is not set
@@ -251,7 +281,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
251CONFIG_BOOT_LINK_OFFSET=0x00800000 281CONFIG_BOOT_LINK_OFFSET=0x00800000
252# CONFIG_UBC_WAKEUP is not set 282# CONFIG_UBC_WAKEUP is not set
253CONFIG_CMDLINE_BOOL=y 283CONFIG_CMDLINE_BOOL=y
254CONFIG_CMDLINE="mem=64M console=ttySC0,115200 root=/dev/hda1" 284CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
255 285
256# 286#
257# Bus options 287# Bus options
@@ -260,7 +290,6 @@ CONFIG_PCI=y
260CONFIG_SH_PCIDMA_NONCOHERENT=y 290CONFIG_SH_PCIDMA_NONCOHERENT=y
261CONFIG_PCI_AUTO=y 291CONFIG_PCI_AUTO=y
262CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 292CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
263# CONFIG_PCI_MULTITHREAD_PROBE is not set
264 293
265# 294#
266# PCCARD (PCMCIA/CardBus) support 295# PCCARD (PCMCIA/CardBus) support
@@ -302,6 +331,7 @@ CONFIG_UNIX=y
302CONFIG_XFRM=y 331CONFIG_XFRM=y
303# CONFIG_XFRM_USER is not set 332# CONFIG_XFRM_USER is not set
304# CONFIG_XFRM_SUB_POLICY is not set 333# CONFIG_XFRM_SUB_POLICY is not set
334# CONFIG_XFRM_MIGRATE is not set
305# CONFIG_NET_KEY is not set 335# CONFIG_NET_KEY is not set
306CONFIG_INET=y 336CONFIG_INET=y
307# CONFIG_IP_MULTICAST is not set 337# CONFIG_IP_MULTICAST is not set
@@ -319,11 +349,13 @@ CONFIG_IP_FIB_HASH=y
319# CONFIG_INET_TUNNEL is not set 349# CONFIG_INET_TUNNEL is not set
320CONFIG_INET_XFRM_MODE_TRANSPORT=y 350CONFIG_INET_XFRM_MODE_TRANSPORT=y
321CONFIG_INET_XFRM_MODE_TUNNEL=y 351CONFIG_INET_XFRM_MODE_TUNNEL=y
352CONFIG_INET_XFRM_MODE_BEET=y
322CONFIG_INET_DIAG=y 353CONFIG_INET_DIAG=y
323CONFIG_INET_TCP_DIAG=y 354CONFIG_INET_TCP_DIAG=y
324# CONFIG_TCP_CONG_ADVANCED is not set 355# CONFIG_TCP_CONG_ADVANCED is not set
325CONFIG_TCP_CONG_CUBIC=y 356CONFIG_TCP_CONG_CUBIC=y
326CONFIG_DEFAULT_TCP_CONG="cubic" 357CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_TCP_MD5SIG is not set
327# CONFIG_IPV6 is not set 359# CONFIG_IPV6 is not set
328# CONFIG_INET6_XFRM_TUNNEL is not set 360# CONFIG_INET6_XFRM_TUNNEL is not set
329# CONFIG_INET6_TUNNEL is not set 361# CONFIG_INET6_TUNNEL is not set
@@ -380,7 +412,7 @@ CONFIG_WIRELESS_EXT=y
380# 412#
381CONFIG_STANDALONE=y 413CONFIG_STANDALONE=y
382CONFIG_PREVENT_FIRMWARE_BUILD=y 414CONFIG_PREVENT_FIRMWARE_BUILD=y
383# CONFIG_FW_LOADER is not set 415CONFIG_FW_LOADER=m
384# CONFIG_SYS_HYPERVISOR is not set 416# CONFIG_SYS_HYPERVISOR is not set
385 417
386# 418#
@@ -422,44 +454,145 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
422# CONFIG_ATA_OVER_ETH is not set 454# CONFIG_ATA_OVER_ETH is not set
423 455
424# 456#
425# ATA/ATAPI/MFM/RLL support 457# Misc devices
426#
427CONFIG_IDE=y
428CONFIG_IDE_MAX_HWIFS=4
429CONFIG_BLK_DEV_IDE=y
430
431#
432# Please see Documentation/ide.txt for help/info on IDE drives
433# 458#
434# CONFIG_BLK_DEV_IDE_SATA is not set 459# CONFIG_SGI_IOC4 is not set
435CONFIG_BLK_DEV_IDEDISK=y 460# CONFIG_TIFM_CORE is not set
436# CONFIG_IDEDISK_MULTI_MODE is not set
437# CONFIG_BLK_DEV_IDECD is not set
438# CONFIG_BLK_DEV_IDETAPE is not set
439# CONFIG_BLK_DEV_IDEFLOPPY is not set
440# CONFIG_IDE_TASK_IOCTL is not set
441 461
442# 462#
443# IDE chipset support/bugfixes 463# ATA/ATAPI/MFM/RLL support
444# 464#
445CONFIG_IDE_GENERIC=y 465# CONFIG_IDE is not set
446# CONFIG_BLK_DEV_IDEPCI is not set
447# CONFIG_IDE_ARM is not set
448# CONFIG_BLK_DEV_IDEDMA is not set
449# CONFIG_IDEDMA_AUTO is not set
450# CONFIG_BLK_DEV_HD is not set
451 466
452# 467#
453# SCSI device support 468# SCSI device support
454# 469#
455# CONFIG_RAID_ATTRS is not set 470# CONFIG_RAID_ATTRS is not set
456# CONFIG_SCSI is not set 471CONFIG_SCSI=y
472# CONFIG_SCSI_TGT is not set
457# CONFIG_SCSI_NETLINK is not set 473# CONFIG_SCSI_NETLINK is not set
474CONFIG_SCSI_PROC_FS=y
475
476#
477# SCSI support type (disk, tape, CD-ROM)
478#
479CONFIG_BLK_DEV_SD=y
480# CONFIG_CHR_DEV_ST is not set
481# CONFIG_CHR_DEV_OSST is not set
482# CONFIG_BLK_DEV_SR is not set
483# CONFIG_CHR_DEV_SG is not set
484# CONFIG_CHR_DEV_SCH is not set
485
486#
487# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
488#
489# CONFIG_SCSI_MULTI_LUN is not set
490# CONFIG_SCSI_CONSTANTS is not set
491# CONFIG_SCSI_LOGGING is not set
492# CONFIG_SCSI_SCAN_ASYNC is not set
493
494#
495# SCSI Transports
496#
497# CONFIG_SCSI_SPI_ATTRS is not set
498# CONFIG_SCSI_FC_ATTRS is not set
499# CONFIG_SCSI_ISCSI_ATTRS is not set
500# CONFIG_SCSI_SAS_ATTRS is not set
501# CONFIG_SCSI_SAS_LIBSAS is not set
502
503#
504# SCSI low-level drivers
505#
506# CONFIG_ISCSI_TCP is not set
507# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
508# CONFIG_SCSI_3W_9XXX is not set
509# CONFIG_SCSI_ACARD is not set
510# CONFIG_SCSI_AACRAID is not set
511# CONFIG_SCSI_AIC7XXX is not set
512# CONFIG_SCSI_AIC7XXX_OLD is not set
513# CONFIG_SCSI_AIC79XX is not set
514# CONFIG_SCSI_AIC94XX is not set
515# CONFIG_SCSI_DPT_I2O is not set
516# CONFIG_SCSI_ARCMSR is not set
517# CONFIG_MEGARAID_NEWGEN is not set
518# CONFIG_MEGARAID_LEGACY is not set
519# CONFIG_MEGARAID_SAS is not set
520# CONFIG_SCSI_HPTIOP is not set
521# CONFIG_SCSI_DMX3191D is not set
522# CONFIG_SCSI_FUTURE_DOMAIN is not set
523# CONFIG_SCSI_IPS is not set
524# CONFIG_SCSI_INITIO is not set
525# CONFIG_SCSI_INIA100 is not set
526# CONFIG_SCSI_STEX is not set
527# CONFIG_SCSI_SYM53C8XX_2 is not set
528# CONFIG_SCSI_IPR is not set
529# CONFIG_SCSI_QLOGIC_1280 is not set
530# CONFIG_SCSI_QLA_FC is not set
531# CONFIG_SCSI_QLA_ISCSI is not set
532# CONFIG_SCSI_LPFC is not set
533# CONFIG_SCSI_DC395x is not set
534# CONFIG_SCSI_DC390T is not set
535# CONFIG_SCSI_NSP32 is not set
536# CONFIG_SCSI_DEBUG is not set
537# CONFIG_SCSI_SRP is not set
458 538
459# 539#
460# Serial ATA (prod) and Parallel ATA (experimental) drivers 540# Serial ATA (prod) and Parallel ATA (experimental) drivers
461# 541#
462# CONFIG_ATA is not set 542CONFIG_ATA=y
543# CONFIG_ATA_NONSTANDARD is not set
544# CONFIG_SATA_AHCI is not set
545# CONFIG_SATA_SVW is not set
546# CONFIG_ATA_PIIX is not set
547# CONFIG_SATA_MV is not set
548# CONFIG_SATA_NV is not set
549# CONFIG_PDC_ADMA is not set
550# CONFIG_SATA_QSTOR is not set
551# CONFIG_SATA_PROMISE is not set
552# CONFIG_SATA_SX4 is not set
553# CONFIG_SATA_SIL is not set
554# CONFIG_SATA_SIL24 is not set
555# CONFIG_SATA_SIS is not set
556# CONFIG_SATA_ULI is not set
557# CONFIG_SATA_VIA is not set
558# CONFIG_SATA_VITESSE is not set
559# CONFIG_SATA_INIC162X is not set
560# CONFIG_PATA_ALI is not set
561# CONFIG_PATA_AMD is not set
562# CONFIG_PATA_ARTOP is not set
563# CONFIG_PATA_ATIIXP is not set
564# CONFIG_PATA_CMD64X is not set
565# CONFIG_PATA_CS5520 is not set
566# CONFIG_PATA_CS5530 is not set
567# CONFIG_PATA_CYPRESS is not set
568# CONFIG_PATA_EFAR is not set
569# CONFIG_ATA_GENERIC is not set
570# CONFIG_PATA_HPT366 is not set
571# CONFIG_PATA_HPT37X is not set
572# CONFIG_PATA_HPT3X2N is not set
573# CONFIG_PATA_HPT3X3 is not set
574# CONFIG_PATA_IT821X is not set
575# CONFIG_PATA_IT8213 is not set
576# CONFIG_PATA_JMICRON is not set
577# CONFIG_PATA_TRIFLEX is not set
578# CONFIG_PATA_MARVELL is not set
579# CONFIG_PATA_MPIIX is not set
580# CONFIG_PATA_OLDPIIX is not set
581# CONFIG_PATA_NETCELL is not set
582# CONFIG_PATA_NS87410 is not set
583# CONFIG_PATA_OPTI is not set
584# CONFIG_PATA_OPTIDMA is not set
585# CONFIG_PATA_PDC_OLD is not set
586# CONFIG_PATA_RADISYS is not set
587# CONFIG_PATA_RZ1000 is not set
588# CONFIG_PATA_SC1200 is not set
589# CONFIG_PATA_SERVERWORKS is not set
590# CONFIG_PATA_PDC2027X is not set
591# CONFIG_PATA_SIL680 is not set
592# CONFIG_PATA_SIS is not set
593# CONFIG_PATA_VIA is not set
594# CONFIG_PATA_WINBOND is not set
595CONFIG_PATA_PLATFORM=y
463 596
464# 597#
465# Multi-device support (RAID and LVM) 598# Multi-device support (RAID and LVM)
@@ -470,6 +603,9 @@ CONFIG_IDE_GENERIC=y
470# Fusion MPT device support 603# Fusion MPT device support
471# 604#
472# CONFIG_FUSION is not set 605# CONFIG_FUSION is not set
606# CONFIG_FUSION_SPI is not set
607# CONFIG_FUSION_FC is not set
608# CONFIG_FUSION_SAS is not set
473 609
474# 610#
475# IEEE 1394 (FireWire) support 611# IEEE 1394 (FireWire) support
@@ -540,6 +676,7 @@ CONFIG_8139TOO=y
540# CONFIG_SUNDANCE is not set 676# CONFIG_SUNDANCE is not set
541# CONFIG_TLAN is not set 677# CONFIG_TLAN is not set
542# CONFIG_VIA_RHINE is not set 678# CONFIG_VIA_RHINE is not set
679# CONFIG_SC92031 is not set
543 680
544# 681#
545# Ethernet (1000 Mbit) 682# Ethernet (1000 Mbit)
@@ -559,14 +696,17 @@ CONFIG_8139TOO=y
559# CONFIG_TIGON3 is not set 696# CONFIG_TIGON3 is not set
560# CONFIG_BNX2 is not set 697# CONFIG_BNX2 is not set
561# CONFIG_QLA3XXX is not set 698# CONFIG_QLA3XXX is not set
699# CONFIG_ATL1 is not set
562 700
563# 701#
564# Ethernet (10000 Mbit) 702# Ethernet (10000 Mbit)
565# 703#
566# CONFIG_CHELSIO_T1 is not set 704# CONFIG_CHELSIO_T1 is not set
705# CONFIG_CHELSIO_T3 is not set
567# CONFIG_IXGB is not set 706# CONFIG_IXGB is not set
568# CONFIG_S2IO is not set 707# CONFIG_S2IO is not set
569# CONFIG_MYRI10GE is not set 708# CONFIG_MYRI10GE is not set
709# CONFIG_NETXEN_NIC is not set
570 710
571# 711#
572# Token Ring devices 712# Token Ring devices
@@ -611,6 +751,7 @@ CONFIG_NET_WIRELESS=y
611# CONFIG_HIPPI is not set 751# CONFIG_HIPPI is not set
612# CONFIG_PPP is not set 752# CONFIG_PPP is not set
613# CONFIG_SLIP is not set 753# CONFIG_SLIP is not set
754# CONFIG_NET_FC is not set
614# CONFIG_SHAPER is not set 755# CONFIG_SHAPER is not set
615# CONFIG_NETCONSOLE is not set 756# CONFIG_NETCONSOLE is not set
616# CONFIG_NETPOLL is not set 757# CONFIG_NETPOLL is not set
@@ -646,14 +787,23 @@ CONFIG_NET_WIRELESS=y
646# 787#
647# Serial drivers 788# Serial drivers
648# 789#
649# CONFIG_SERIAL_8250 is not set 790CONFIG_SERIAL_8250=y
791# CONFIG_SERIAL_8250_CONSOLE is not set
792CONFIG_SERIAL_8250_PCI=y
793CONFIG_SERIAL_8250_NR_UARTS=4
794CONFIG_SERIAL_8250_RUNTIME_UARTS=4
795# CONFIG_SERIAL_8250_EXTENDED is not set
650 796
651# 797#
652# Non-8250 serial port support 798# Non-8250 serial port support
653# 799#
654# CONFIG_SERIAL_SH_SCI is not set 800CONFIG_SERIAL_SH_SCI=y
801CONFIG_SERIAL_SH_SCI_NR_UARTS=1
802CONFIG_SERIAL_SH_SCI_CONSOLE=y
803CONFIG_SERIAL_CORE=y
804CONFIG_SERIAL_CORE_CONSOLE=y
655# CONFIG_SERIAL_JSM is not set 805# CONFIG_SERIAL_JSM is not set
656# CONFIG_UNIX98_PTYS is not set 806CONFIG_UNIX98_PTYS=y
657CONFIG_LEGACY_PTYS=y 807CONFIG_LEGACY_PTYS=y
658CONFIG_LEGACY_PTY_COUNT=256 808CONFIG_LEGACY_PTY_COUNT=256
659 809
@@ -671,10 +821,6 @@ CONFIG_HW_RANDOM=y
671# CONFIG_DTLK is not set 821# CONFIG_DTLK is not set
672# CONFIG_R3964 is not set 822# CONFIG_R3964 is not set
673# CONFIG_APPLICOM is not set 823# CONFIG_APPLICOM is not set
674
675#
676# Ftape, the floppy tape device driver
677#
678# CONFIG_DRM is not set 824# CONFIG_DRM is not set
679# CONFIG_RAW_DRIVER is not set 825# CONFIG_RAW_DRIVER is not set
680 826
@@ -682,7 +828,6 @@ CONFIG_HW_RANDOM=y
682# TPM devices 828# TPM devices
683# 829#
684# CONFIG_TCG_TPM is not set 830# CONFIG_TCG_TPM is not set
685# CONFIG_TELCLOCK is not set
686 831
687# 832#
688# I2C support 833# I2C support
@@ -698,6 +843,7 @@ CONFIG_HW_RANDOM=y
698# 843#
699# Dallas's 1-wire bus 844# Dallas's 1-wire bus
700# 845#
846# CONFIG_W1 is not set
701 847
702# 848#
703# Hardware Monitoring support 849# Hardware Monitoring support
@@ -706,18 +852,14 @@ CONFIG_HWMON=y
706# CONFIG_HWMON_VID is not set 852# CONFIG_HWMON_VID is not set
707# CONFIG_SENSORS_ABITUGURU is not set 853# CONFIG_SENSORS_ABITUGURU is not set
708# CONFIG_SENSORS_F71805F is not set 854# CONFIG_SENSORS_F71805F is not set
855# CONFIG_SENSORS_PC87427 is not set
709# CONFIG_SENSORS_VT1211 is not set 856# CONFIG_SENSORS_VT1211 is not set
710# CONFIG_HWMON_DEBUG_CHIP is not set 857# CONFIG_HWMON_DEBUG_CHIP is not set
711 858
712# 859#
713# Misc devices
714#
715
716#
717# Multimedia devices 860# Multimedia devices
718# 861#
719# CONFIG_VIDEO_DEV is not set 862# CONFIG_VIDEO_DEV is not set
720CONFIG_VIDEO_V4L2=y
721 863
722# 864#
723# Digital Video Broadcasting Devices 865# Digital Video Broadcasting Devices
@@ -759,7 +901,6 @@ CONFIG_SND_VERBOSE_PROCFS=y
759CONFIG_SND_MPU401_UART=m 901CONFIG_SND_MPU401_UART=m
760CONFIG_SND_OPL3_LIB=m 902CONFIG_SND_OPL3_LIB=m
761CONFIG_SND_AC97_CODEC=m 903CONFIG_SND_AC97_CODEC=m
762CONFIG_SND_AC97_BUS=m
763# CONFIG_SND_DUMMY is not set 904# CONFIG_SND_DUMMY is not set
764# CONFIG_SND_MTPAV is not set 905# CONFIG_SND_MTPAV is not set
765# CONFIG_SND_SERIAL_U16550 is not set 906# CONFIG_SND_SERIAL_U16550 is not set
@@ -782,6 +923,18 @@ CONFIG_SND_AC97_BUS=m
782# CONFIG_SND_CMIPCI is not set 923# CONFIG_SND_CMIPCI is not set
783# CONFIG_SND_CS4281 is not set 924# CONFIG_SND_CS4281 is not set
784# CONFIG_SND_CS46XX is not set 925# CONFIG_SND_CS46XX is not set
926# CONFIG_SND_DARLA20 is not set
927# CONFIG_SND_GINA20 is not set
928# CONFIG_SND_LAYLA20 is not set
929# CONFIG_SND_DARLA24 is not set
930# CONFIG_SND_GINA24 is not set
931# CONFIG_SND_LAYLA24 is not set
932# CONFIG_SND_MONA is not set
933# CONFIG_SND_MIA is not set
934# CONFIG_SND_ECHO3G is not set
935# CONFIG_SND_INDIGO is not set
936# CONFIG_SND_INDIGOIO is not set
937# CONFIG_SND_INDIGODJ is not set
785# CONFIG_SND_EMU10K1 is not set 938# CONFIG_SND_EMU10K1 is not set
786# CONFIG_SND_EMU10K1X is not set 939# CONFIG_SND_EMU10K1X is not set
787# CONFIG_SND_ENS1370 is not set 940# CONFIG_SND_ENS1370 is not set
@@ -801,6 +954,7 @@ CONFIG_SND_AC97_BUS=m
801# CONFIG_SND_MIXART is not set 954# CONFIG_SND_MIXART is not set
802# CONFIG_SND_NM256 is not set 955# CONFIG_SND_NM256 is not set
803# CONFIG_SND_PCXHR is not set 956# CONFIG_SND_PCXHR is not set
957# CONFIG_SND_RIPTIDE is not set
804# CONFIG_SND_RME32 is not set 958# CONFIG_SND_RME32 is not set
805# CONFIG_SND_RME96 is not set 959# CONFIG_SND_RME96 is not set
806# CONFIG_SND_RME9652 is not set 960# CONFIG_SND_RME9652 is not set
@@ -813,17 +967,22 @@ CONFIG_SND_YMFPCI=m
813# CONFIG_SND_AC97_POWER_SAVE is not set 967# CONFIG_SND_AC97_POWER_SAVE is not set
814 968
815# 969#
970# SoC audio support
971#
972# CONFIG_SND_SOC is not set
973
974#
816# Open Sound System 975# Open Sound System
817# 976#
818CONFIG_SOUND_PRIME=m 977CONFIG_SOUND_PRIME=m
819# CONFIG_OSS_OBSOLETE_DRIVER is not set 978# CONFIG_OBSOLETE_OSS is not set
820# CONFIG_SOUND_BT878 is not set 979# CONFIG_SOUND_BT878 is not set
821# CONFIG_SOUND_ES1371 is not set
822# CONFIG_SOUND_ICH is not set 980# CONFIG_SOUND_ICH is not set
823# CONFIG_SOUND_TRIDENT is not set 981# CONFIG_SOUND_TRIDENT is not set
824# CONFIG_SOUND_MSNDCLAS is not set 982# CONFIG_SOUND_MSNDCLAS is not set
825# CONFIG_SOUND_MSNDPIN is not set 983# CONFIG_SOUND_MSNDPIN is not set
826# CONFIG_SOUND_VIA82CXXX is not set 984# CONFIG_SOUND_VIA82CXXX is not set
985CONFIG_AC97_BUS=m
827 986
828# 987#
829# USB support 988# USB support
@@ -872,7 +1031,29 @@ CONFIG_USB_ARCH_HAS_EHCI=y
872# 1031#
873# Real Time Clock 1032# Real Time Clock
874# 1033#
875# CONFIG_RTC_CLASS is not set 1034CONFIG_RTC_LIB=y
1035CONFIG_RTC_CLASS=y
1036CONFIG_RTC_HCTOSYS=y
1037CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1038# CONFIG_RTC_DEBUG is not set
1039
1040#
1041# RTC interfaces
1042#
1043CONFIG_RTC_INTF_SYSFS=y
1044CONFIG_RTC_INTF_PROC=y
1045CONFIG_RTC_INTF_DEV=y
1046# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1047
1048#
1049# RTC drivers
1050#
1051# CONFIG_RTC_DRV_DS1553 is not set
1052# CONFIG_RTC_DRV_DS1742 is not set
1053# CONFIG_RTC_DRV_M48T86 is not set
1054CONFIG_RTC_DRV_SH=y
1055# CONFIG_RTC_DRV_TEST is not set
1056# CONFIG_RTC_DRV_V3020 is not set
876 1057
877# 1058#
878# DMA Engine support 1059# DMA Engine support
@@ -888,16 +1069,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
888# 1069#
889 1070
890# 1071#
1072# Auxiliary Display support
1073#
1074
1075#
1076# Virtualization
1077#
1078
1079#
891# File systems 1080# File systems
892# 1081#
893CONFIG_EXT2_FS=y 1082CONFIG_EXT2_FS=y
894# CONFIG_EXT2_FS_XATTR is not set 1083# CONFIG_EXT2_FS_XATTR is not set
895# CONFIG_EXT2_FS_XIP is not set 1084# CONFIG_EXT2_FS_XIP is not set
896# CONFIG_EXT3_FS is not set 1085# CONFIG_EXT3_FS is not set
1086# CONFIG_EXT4DEV_FS is not set
897# CONFIG_REISERFS_FS is not set 1087# CONFIG_REISERFS_FS is not set
898# CONFIG_JFS_FS is not set 1088# CONFIG_JFS_FS is not set
899# CONFIG_FS_POSIX_ACL is not set 1089# CONFIG_FS_POSIX_ACL is not set
900# CONFIG_XFS_FS is not set 1090# CONFIG_XFS_FS is not set
1091# CONFIG_GFS2_FS is not set
901# CONFIG_OCFS2_FS is not set 1092# CONFIG_OCFS2_FS is not set
902CONFIG_MINIX_FS=y 1093CONFIG_MINIX_FS=y
903# CONFIG_ROMFS_FS is not set 1094# CONFIG_ROMFS_FS is not set
@@ -932,7 +1123,8 @@ CONFIG_PROC_FS=y
932CONFIG_PROC_KCORE=y 1123CONFIG_PROC_KCORE=y
933CONFIG_PROC_SYSCTL=y 1124CONFIG_PROC_SYSCTL=y
934CONFIG_SYSFS=y 1125CONFIG_SYSFS=y
935# CONFIG_TMPFS is not set 1126CONFIG_TMPFS=y
1127# CONFIG_TMPFS_POSIX_ACL is not set
936# CONFIG_HUGETLBFS is not set 1128# CONFIG_HUGETLBFS is not set
937# CONFIG_HUGETLB_PAGE is not set 1129# CONFIG_HUGETLB_PAGE is not set
938CONFIG_RAMFS=y 1130CONFIG_RAMFS=y
@@ -1018,6 +1210,11 @@ CONFIG_NLS_CODEPAGE_932=y
1018# CONFIG_NLS_UTF8 is not set 1210# CONFIG_NLS_UTF8 is not set
1019 1211
1020# 1212#
1213# Distributed Lock Manager
1214#
1215# CONFIG_DLM is not set
1216
1217#
1021# Profiling support 1218# Profiling support
1022# 1219#
1023CONFIG_PROFILING=y 1220CONFIG_PROFILING=y
@@ -1026,16 +1223,20 @@ CONFIG_OPROFILE=y
1026# 1223#
1027# Kernel hacking 1224# Kernel hacking
1028# 1225#
1226CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1029# CONFIG_PRINTK_TIME is not set 1227# CONFIG_PRINTK_TIME is not set
1030CONFIG_ENABLE_MUST_CHECK=y 1228CONFIG_ENABLE_MUST_CHECK=y
1031# CONFIG_MAGIC_SYSRQ is not set 1229# CONFIG_MAGIC_SYSRQ is not set
1032# CONFIG_UNUSED_SYMBOLS is not set 1230# CONFIG_UNUSED_SYMBOLS is not set
1231# CONFIG_DEBUG_FS is not set
1232# CONFIG_HEADERS_CHECK is not set
1033# CONFIG_DEBUG_KERNEL is not set 1233# CONFIG_DEBUG_KERNEL is not set
1034CONFIG_LOG_BUF_SHIFT=14 1234CONFIG_LOG_BUF_SHIFT=14
1035# CONFIG_DEBUG_BUGVERBOSE is not set 1235# CONFIG_DEBUG_BUGVERBOSE is not set
1036# CONFIG_DEBUG_FS is not set
1037# CONFIG_SH_STANDARD_BIOS is not set 1236# CONFIG_SH_STANDARD_BIOS is not set
1038# CONFIG_EARLY_SCIF_CONSOLE is not set 1237CONFIG_EARLY_SCIF_CONSOLE=y
1238CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
1239CONFIG_EARLY_PRINTK=y
1039# CONFIG_KGDB is not set 1240# CONFIG_KGDB is not set
1040 1241
1041# 1242#
@@ -1052,8 +1253,11 @@ CONFIG_LOG_BUF_SHIFT=14
1052# 1253#
1053# Library routines 1254# Library routines
1054# 1255#
1256CONFIG_BITREVERSE=y
1055# CONFIG_CRC_CCITT is not set 1257# CONFIG_CRC_CCITT is not set
1056# CONFIG_CRC16 is not set 1258# CONFIG_CRC16 is not set
1057CONFIG_CRC32=y 1259CONFIG_CRC32=y
1058# CONFIG_LIBCRC32C is not set 1260# CONFIG_LIBCRC32C is not set
1059CONFIG_PLIST=y 1261CONFIG_PLIST=y
1262CONFIG_HAS_IOMEM=y
1263CONFIG_HAS_IOPORT=y
diff --git a/arch/sh/configs/se7750_defconfig b/arch/sh/configs/se7750_defconfig
index 5d357d68b234..4e6e77fa4ce7 100644
--- a/arch/sh/configs/se7750_defconfig
+++ b/arch/sh/configs/se7750_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.18 3# Linux kernel version: 2.6.20-rc2
4# Tue Oct 3 11:49:01 2006 4# Thu Dec 28 23:15:49 2006
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -10,6 +10,11 @@ CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_GENERIC_IRQ_PROBE=y 11CONFIG_GENERIC_IRQ_PROBE=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 12CONFIG_GENERIC_CALIBRATE_DELAY=y
13# CONFIG_GENERIC_TIME is not set
14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16# CONFIG_ARCH_HAS_ILOG2_U32 is not set
17# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 18CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14 19
15# 20#
@@ -35,6 +40,7 @@ CONFIG_BSD_PROCESS_ACCT=y
35# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
36CONFIG_IKCONFIG=y 41CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 42CONFIG_IKCONFIG_PROC=y
43CONFIG_SYSFS_DEPRECATED=y
38# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
39CONFIG_INITRAMFS_SOURCE="" 45CONFIG_INITRAMFS_SOURCE=""
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -116,6 +122,8 @@ CONFIG_SH_SOLUTION_ENGINE=y
116# CONFIG_SH_LANDISK is not set 122# CONFIG_SH_LANDISK is not set
117# CONFIG_SH_TITAN is not set 123# CONFIG_SH_TITAN is not set
118# CONFIG_SH_SHMIN is not set 124# CONFIG_SH_SHMIN is not set
125# CONFIG_SH_7206_SOLUTION_ENGINE is not set
126# CONFIG_SH_7619_SOLUTION_ENGINE is not set
119# CONFIG_SH_UNKNOWN is not set 127# CONFIG_SH_UNKNOWN is not set
120 128
121# 129#
@@ -127,6 +135,12 @@ CONFIG_CPU_SH4=y
127# SH-2 Processor Support 135# SH-2 Processor Support
128# 136#
129# CONFIG_CPU_SUBTYPE_SH7604 is not set 137# CONFIG_CPU_SUBTYPE_SH7604 is not set
138# CONFIG_CPU_SUBTYPE_SH7619 is not set
139
140#
141# SH-2A Processor Support
142#
143# CONFIG_CPU_SUBTYPE_SH7206 is not set
130 144
131# 145#
132# SH-3 Processor Support 146# SH-3 Processor Support
@@ -162,12 +176,14 @@ CONFIG_CPU_SUBTYPE_SH7750=y
162# 176#
163# CONFIG_CPU_SUBTYPE_SH7770 is not set 177# CONFIG_CPU_SUBTYPE_SH7770 is not set
164# CONFIG_CPU_SUBTYPE_SH7780 is not set 178# CONFIG_CPU_SUBTYPE_SH7780 is not set
179# CONFIG_CPU_SUBTYPE_SH7785 is not set
165 180
166# 181#
167# SH4AL-DSP Processor Support 182# SH4AL-DSP Processor Support
168# 183#
169# CONFIG_CPU_SUBTYPE_SH73180 is not set 184# CONFIG_CPU_SUBTYPE_SH73180 is not set
170# CONFIG_CPU_SUBTYPE_SH7343 is not set 185# CONFIG_CPU_SUBTYPE_SH7343 is not set
186# CONFIG_CPU_SUBTYPE_SH7722 is not set
171 187
172# 188#
173# Memory management options 189# Memory management options
@@ -177,6 +193,9 @@ CONFIG_PAGE_OFFSET=0x80000000
177CONFIG_MEMORY_START=0x0c000000 193CONFIG_MEMORY_START=0x0c000000
178CONFIG_MEMORY_SIZE=0x02000000 194CONFIG_MEMORY_SIZE=0x02000000
179CONFIG_VSYSCALL=y 195CONFIG_VSYSCALL=y
196CONFIG_PAGE_SIZE_4KB=y
197# CONFIG_PAGE_SIZE_8KB is not set
198# CONFIG_PAGE_SIZE_64KB is not set
180CONFIG_SELECT_MEMORY_MODEL=y 199CONFIG_SELECT_MEMORY_MODEL=y
181CONFIG_FLATMEM_MANUAL=y 200CONFIG_FLATMEM_MANUAL=y
182# CONFIG_DISCONTIGMEM_MANUAL is not set 201# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -202,17 +221,22 @@ CONFIG_CF_BASE_ADDR=0xb8000000
202# Processor features 221# Processor features
203# 222#
204CONFIG_CPU_LITTLE_ENDIAN=y 223CONFIG_CPU_LITTLE_ENDIAN=y
224# CONFIG_CPU_BIG_ENDIAN is not set
205CONFIG_SH_FPU=y 225CONFIG_SH_FPU=y
206# CONFIG_SH_DSP is not set 226# CONFIG_SH_DSP is not set
207# CONFIG_SH_STORE_QUEUES is not set 227# CONFIG_SH_STORE_QUEUES is not set
208CONFIG_CPU_HAS_INTEVT=y 228CONFIG_CPU_HAS_INTEVT=y
229CONFIG_CPU_HAS_IPR_IRQ=y
209CONFIG_CPU_HAS_SR_RB=y 230CONFIG_CPU_HAS_SR_RB=y
231CONFIG_CPU_HAS_PTEA=y
210 232
211# 233#
212# Timer support 234# Timer support
213# 235#
214CONFIG_SH_TMU=y 236CONFIG_SH_TMU=y
215CONFIG_SH_PCLK_FREQ=50000000 237CONFIG_SH_TIMER_IRQ=16
238# CONFIG_NO_IDLE_HZ is not set
239CONFIG_SH_PCLK_FREQ=33333333
216 240
217# 241#
218# CPU Frequency scaling 242# CPU Frequency scaling
@@ -231,10 +255,16 @@ CONFIG_SH_PCLK_FREQ=50000000
231CONFIG_HEARTBEAT=y 255CONFIG_HEARTBEAT=y
232 256
233# 257#
258# Additional SuperH Device Drivers
259#
260# CONFIG_PUSH_SWITCH is not set
261
262#
234# Kernel features 263# Kernel features
235# 264#
236# CONFIG_HZ_100 is not set 265# CONFIG_HZ_100 is not set
237CONFIG_HZ_250=y 266CONFIG_HZ_250=y
267# CONFIG_HZ_300 is not set
238# CONFIG_HZ_1000 is not set 268# CONFIG_HZ_1000 is not set
239CONFIG_HZ=250 269CONFIG_HZ=250
240# CONFIG_KEXEC is not set 270# CONFIG_KEXEC is not set
@@ -249,8 +279,7 @@ CONFIG_PREEMPT_NONE=y
249CONFIG_ZERO_PAGE_OFFSET=0x00001000 279CONFIG_ZERO_PAGE_OFFSET=0x00001000
250CONFIG_BOOT_LINK_OFFSET=0x00800000 280CONFIG_BOOT_LINK_OFFSET=0x00800000
251# CONFIG_UBC_WAKEUP is not set 281# CONFIG_UBC_WAKEUP is not set
252CONFIG_CMDLINE_BOOL=y 282# CONFIG_CMDLINE_BOOL is not set
253CONFIG_CMDLINE="console=ttySC1,38400 root=/dev/nfs ip=bootp"
254 283
255# 284#
256# Bus options 285# Bus options
@@ -313,11 +342,13 @@ CONFIG_IP_PNP_BOOTP=y
313# CONFIG_INET_TUNNEL is not set 342# CONFIG_INET_TUNNEL is not set
314CONFIG_INET_XFRM_MODE_TRANSPORT=y 343CONFIG_INET_XFRM_MODE_TRANSPORT=y
315CONFIG_INET_XFRM_MODE_TUNNEL=y 344CONFIG_INET_XFRM_MODE_TUNNEL=y
345CONFIG_INET_XFRM_MODE_BEET=y
316CONFIG_INET_DIAG=y 346CONFIG_INET_DIAG=y
317CONFIG_INET_TCP_DIAG=y 347CONFIG_INET_TCP_DIAG=y
318# CONFIG_TCP_CONG_ADVANCED is not set 348# CONFIG_TCP_CONG_ADVANCED is not set
319CONFIG_TCP_CONG_CUBIC=y 349CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic" 350CONFIG_DEFAULT_TCP_CONG="cubic"
351# CONFIG_TCP_MD5SIG is not set
321# CONFIG_IPV6 is not set 352# CONFIG_IPV6 is not set
322# CONFIG_INET6_XFRM_TUNNEL is not set 353# CONFIG_INET6_XFRM_TUNNEL is not set
323# CONFIG_INET6_TUNNEL is not set 354# CONFIG_INET6_TUNNEL is not set
@@ -480,16 +511,79 @@ CONFIG_MTD_ROM=y
480# CONFIG_ATA_OVER_ETH is not set 511# CONFIG_ATA_OVER_ETH is not set
481 512
482# 513#
514# Misc devices
515#
516# CONFIG_TIFM_CORE is not set
517
518#
483# ATA/ATAPI/MFM/RLL support 519# ATA/ATAPI/MFM/RLL support
484# 520#
485# CONFIG_IDE is not set 521CONFIG_IDE=y
522CONFIG_IDE_MAX_HWIFS=4
523CONFIG_BLK_DEV_IDE=y
524
525#
526# Please see Documentation/ide.txt for help/info on IDE drives
527#
528# CONFIG_BLK_DEV_IDE_SATA is not set
529CONFIG_BLK_DEV_IDEDISK=y
530# CONFIG_IDEDISK_MULTI_MODE is not set
531# CONFIG_BLK_DEV_IDECD is not set
532# CONFIG_BLK_DEV_IDETAPE is not set
533# CONFIG_BLK_DEV_IDEFLOPPY is not set
534# CONFIG_BLK_DEV_IDESCSI is not set
535# CONFIG_IDE_TASK_IOCTL is not set
536
537#
538# IDE chipset support/bugfixes
539#
540# CONFIG_IDE_GENERIC is not set
541# CONFIG_IDE_ARM is not set
542# CONFIG_BLK_DEV_IDEDMA is not set
543# CONFIG_IDEDMA_AUTO is not set
544# CONFIG_BLK_DEV_HD is not set
486 545
487# 546#
488# SCSI device support 547# SCSI device support
489# 548#
490# CONFIG_RAID_ATTRS is not set 549# CONFIG_RAID_ATTRS is not set
491# CONFIG_SCSI is not set 550CONFIG_SCSI=y
551# CONFIG_SCSI_TGT is not set
492# CONFIG_SCSI_NETLINK is not set 552# CONFIG_SCSI_NETLINK is not set
553CONFIG_SCSI_PROC_FS=y
554
555#
556# SCSI support type (disk, tape, CD-ROM)
557#
558# CONFIG_BLK_DEV_SD is not set
559# CONFIG_CHR_DEV_ST is not set
560# CONFIG_CHR_DEV_OSST is not set
561# CONFIG_BLK_DEV_SR is not set
562# CONFIG_CHR_DEV_SG is not set
563# CONFIG_CHR_DEV_SCH is not set
564
565#
566# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
567#
568# CONFIG_SCSI_MULTI_LUN is not set
569# CONFIG_SCSI_CONSTANTS is not set
570# CONFIG_SCSI_LOGGING is not set
571# CONFIG_SCSI_SCAN_ASYNC is not set
572
573#
574# SCSI Transports
575#
576# CONFIG_SCSI_SPI_ATTRS is not set
577# CONFIG_SCSI_FC_ATTRS is not set
578# CONFIG_SCSI_ISCSI_ATTRS is not set
579# CONFIG_SCSI_SAS_ATTRS is not set
580# CONFIG_SCSI_SAS_LIBSAS is not set
581
582#
583# SCSI low-level drivers
584#
585# CONFIG_ISCSI_TCP is not set
586# CONFIG_SCSI_DEBUG is not set
493 587
494# 588#
495# Serial ATA (prod) and Parallel ATA (experimental) drivers 589# Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -633,17 +727,12 @@ CONFIG_HW_RANDOM=y
633# CONFIG_GEN_RTC is not set 727# CONFIG_GEN_RTC is not set
634# CONFIG_DTLK is not set 728# CONFIG_DTLK is not set
635# CONFIG_R3964 is not set 729# CONFIG_R3964 is not set
636
637#
638# Ftape, the floppy tape device driver
639#
640# CONFIG_RAW_DRIVER is not set 730# CONFIG_RAW_DRIVER is not set
641 731
642# 732#
643# TPM devices 733# TPM devices
644# 734#
645# CONFIG_TCG_TPM is not set 735# CONFIG_TCG_TPM is not set
646# CONFIG_TELCLOCK is not set
647 736
648# 737#
649# I2C support 738# I2C support
@@ -659,6 +748,7 @@ CONFIG_HW_RANDOM=y
659# 748#
660# Dallas's 1-wire bus 749# Dallas's 1-wire bus
661# 750#
751# CONFIG_W1 is not set
662 752
663# 753#
664# Hardware Monitoring support 754# Hardware Monitoring support
@@ -667,18 +757,14 @@ CONFIG_HWMON=y
667# CONFIG_HWMON_VID is not set 757# CONFIG_HWMON_VID is not set
668# CONFIG_SENSORS_ABITUGURU is not set 758# CONFIG_SENSORS_ABITUGURU is not set
669# CONFIG_SENSORS_F71805F is not set 759# CONFIG_SENSORS_F71805F is not set
760# CONFIG_SENSORS_PC87427 is not set
670# CONFIG_SENSORS_VT1211 is not set 761# CONFIG_SENSORS_VT1211 is not set
671# CONFIG_HWMON_DEBUG_CHIP is not set 762# CONFIG_HWMON_DEBUG_CHIP is not set
672 763
673# 764#
674# Misc devices
675#
676
677#
678# Multimedia devices 765# Multimedia devices
679# 766#
680# CONFIG_VIDEO_DEV is not set 767# CONFIG_VIDEO_DEV is not set
681CONFIG_VIDEO_V4L2=y
682 768
683# 769#
684# Digital Video Broadcasting Devices 770# Digital Video Broadcasting Devices
@@ -758,14 +844,20 @@ CONFIG_FIRMWARE_EDID=y
758# 844#
759 845
760# 846#
847# Virtualization
848#
849
850#
761# File systems 851# File systems
762# 852#
763# CONFIG_EXT2_FS is not set 853# CONFIG_EXT2_FS is not set
764# CONFIG_EXT3_FS is not set 854# CONFIG_EXT3_FS is not set
855# CONFIG_EXT4DEV_FS is not set
765# CONFIG_REISERFS_FS is not set 856# CONFIG_REISERFS_FS is not set
766# CONFIG_JFS_FS is not set 857# CONFIG_JFS_FS is not set
767# CONFIG_FS_POSIX_ACL is not set 858# CONFIG_FS_POSIX_ACL is not set
768# CONFIG_XFS_FS is not set 859# CONFIG_XFS_FS is not set
860# CONFIG_GFS2_FS is not set
769# CONFIG_OCFS2_FS is not set 861# CONFIG_OCFS2_FS is not set
770# CONFIG_MINIX_FS is not set 862# CONFIG_MINIX_FS is not set
771# CONFIG_ROMFS_FS is not set 863# CONFIG_ROMFS_FS is not set
@@ -814,7 +906,6 @@ CONFIG_RAMFS=y
814# CONFIG_BEFS_FS is not set 906# CONFIG_BEFS_FS is not set
815# CONFIG_BFS_FS is not set 907# CONFIG_BFS_FS is not set
816# CONFIG_EFS_FS is not set 908# CONFIG_EFS_FS is not set
817# CONFIG_JFFS_FS is not set
818CONFIG_JFFS2_FS=y 909CONFIG_JFFS2_FS=y
819CONFIG_JFFS2_FS_DEBUG=0 910CONFIG_JFFS2_FS_DEBUG=0
820CONFIG_JFFS2_FS_WRITEBUFFER=y 911CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -875,6 +966,11 @@ CONFIG_PARTITION_ADVANCED=y
875# CONFIG_NLS is not set 966# CONFIG_NLS is not set
876 967
877# 968#
969# Distributed Lock Manager
970#
971# CONFIG_DLM is not set
972
973#
878# Profiling support 974# Profiling support
879# 975#
880# CONFIG_PROFILING is not set 976# CONFIG_PROFILING is not set
@@ -882,14 +978,16 @@ CONFIG_PARTITION_ADVANCED=y
882# 978#
883# Kernel hacking 979# Kernel hacking
884# 980#
981CONFIG_TRACE_IRQFLAGS_SUPPORT=y
885# CONFIG_PRINTK_TIME is not set 982# CONFIG_PRINTK_TIME is not set
886CONFIG_ENABLE_MUST_CHECK=y 983# CONFIG_ENABLE_MUST_CHECK is not set
887# CONFIG_MAGIC_SYSRQ is not set 984# CONFIG_MAGIC_SYSRQ is not set
888# CONFIG_UNUSED_SYMBOLS is not set 985# CONFIG_UNUSED_SYMBOLS is not set
986# CONFIG_DEBUG_FS is not set
987# CONFIG_HEADERS_CHECK is not set
889# CONFIG_DEBUG_KERNEL is not set 988# CONFIG_DEBUG_KERNEL is not set
890CONFIG_LOG_BUF_SHIFT=14 989CONFIG_LOG_BUF_SHIFT=14
891# CONFIG_DEBUG_BUGVERBOSE is not set 990# CONFIG_DEBUG_BUGVERBOSE is not set
892# CONFIG_DEBUG_FS is not set
893# CONFIG_SH_STANDARD_BIOS is not set 991# CONFIG_SH_STANDARD_BIOS is not set
894# CONFIG_EARLY_SCIF_CONSOLE is not set 992# CONFIG_EARLY_SCIF_CONSOLE is not set
895# CONFIG_KGDB is not set 993# CONFIG_KGDB is not set
@@ -908,6 +1006,7 @@ CONFIG_LOG_BUF_SHIFT=14
908# 1006#
909# Library routines 1007# Library routines
910# 1008#
1009CONFIG_BITREVERSE=y
911# CONFIG_CRC_CCITT is not set 1010# CONFIG_CRC_CCITT is not set
912# CONFIG_CRC16 is not set 1011# CONFIG_CRC16 is not set
913CONFIG_CRC32=y 1012CONFIG_CRC32=y
@@ -915,3 +1014,4 @@ CONFIG_CRC32=y
915CONFIG_ZLIB_INFLATE=y 1014CONFIG_ZLIB_INFLATE=y
916CONFIG_ZLIB_DEFLATE=y 1015CONFIG_ZLIB_DEFLATE=y
917CONFIG_PLIST=y 1016CONFIG_PLIST=y
1017CONFIG_IOMAP_COPY=y
diff --git a/arch/sh/drivers/Makefile b/arch/sh/drivers/Makefile
index bf18dbfb6787..6cb92676c5fc 100644
--- a/arch/sh/drivers/Makefile
+++ b/arch/sh/drivers/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_PCI) += pci/
6obj-$(CONFIG_SH_DMA) += dma/ 6obj-$(CONFIG_SH_DMA) += dma/
7obj-$(CONFIG_SUPERHYWAY) += superhyway/ 7obj-$(CONFIG_SUPERHYWAY) += superhyway/
8obj-$(CONFIG_PUSH_SWITCH) += push-switch.o 8obj-$(CONFIG_PUSH_SWITCH) += push-switch.o
9obj-$(CONFIG_HEARTBEAT) += heartbeat.o
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index f63721ed86c2..06ed0609a95d 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -19,34 +19,26 @@
19#include <asm/io.h> 19#include <asm/io.h>
20#include "dma-sh.h" 20#include "dma-sh.h"
21 21
22 22static int dmte_irq_map[] = {
23 23 DMTE0_IRQ,
24#ifdef CONFIG_CPU_SH4 24 DMTE1_IRQ,
25static struct ipr_data dmae_ipr_map[] = { 25 DMTE2_IRQ,
26 { DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, 26 DMTE3_IRQ,
27}; 27#if defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
28 defined(CONFIG_CPU_SUBTYPE_SH7760) || \
29 defined(CONFIG_CPU_SUBTYPE_SH7780)
30 DMTE4_IRQ,
31 DMTE5_IRQ,
32 DMTE6_IRQ,
33 DMTE7_IRQ,
28#endif 34#endif
29static struct ipr_data dmte_ipr_map[] = {
30 /*
31 * Normally we could just do DMTE0_IRQ + chan outright, though in the
32 * case of the 7751R, the DMTE IRQs for channels > 4 start right above
33 * the SCIF
34 */
35 { DMTE0_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
36 { DMTE0_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
37 { DMTE0_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
38 { DMTE0_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
39 { DMTE4_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
40 { DMTE4_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
41 { DMTE4_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
42 { DMTE4_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
43}; 35};
44 36
45static inline unsigned int get_dmte_irq(unsigned int chan) 37static inline unsigned int get_dmte_irq(unsigned int chan)
46{ 38{
47 unsigned int irq = 0; 39 unsigned int irq = 0;
48 if (chan < ARRAY_SIZE(dmte_ipr_map)) 40 if (chan < ARRAY_SIZE(dmte_irq_map))
49 irq = dmte_ipr_map[chan].irq; 41 irq = dmte_irq_map[chan];
50 return irq; 42 return irq;
51} 43}
52 44
@@ -103,7 +95,7 @@ static void sh_dmac_free_dma(struct dma_channel *chan)
103 free_irq(get_dmte_irq(chan->chan), chan); 95 free_irq(get_dmte_irq(chan->chan), chan);
104} 96}
105 97
106static void 98static int
107sh_dmac_configure_channel(struct dma_channel *chan, unsigned long chcr) 99sh_dmac_configure_channel(struct dma_channel *chan, unsigned long chcr)
108{ 100{
109 if (!chcr) 101 if (!chcr)
@@ -119,6 +111,7 @@ sh_dmac_configure_channel(struct dma_channel *chan, unsigned long chcr)
119 ctrl_outl(chcr, CHCR[chan->chan]); 111 ctrl_outl(chcr, CHCR[chan->chan]);
120 112
121 chan->flags |= DMA_CONFIGURED; 113 chan->flags |= DMA_CONFIGURED;
114 return 0;
122} 115}
123 116
124static void sh_dmac_enable_dma(struct dma_channel *chan) 117static void sh_dmac_enable_dma(struct dma_channel *chan)
@@ -262,17 +255,11 @@ static int __init sh_dmac_init(void)
262 int i; 255 int i;
263 256
264#ifdef CONFIG_CPU_SH4 257#ifdef CONFIG_CPU_SH4
265 make_ipr_irq(dmae_ipr_map, ARRAY_SIZE(dmae_ipr_map));
266 i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); 258 i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0);
267 if (unlikely(i < 0)) 259 if (unlikely(i < 0))
268 return i; 260 return i;
269#endif 261#endif
270 262
271 i = info->nr_channels;
272 if (i > ARRAY_SIZE(dmte_ipr_map))
273 i = ARRAY_SIZE(dmte_ipr_map);
274 make_ipr_irq(dmte_ipr_map, i);
275
276 /* 263 /*
277 * Initialize DMAOR, and clean up any error flags that may have 264 * Initialize DMAOR, and clean up any error flags that may have
278 * been set. 265 * been set.
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
new file mode 100644
index 000000000000..bc59cb6cd78b
--- /dev/null
+++ b/arch/sh/drivers/heartbeat.c
@@ -0,0 +1,132 @@
1/*
2 * Generic heartbeat driver for regular LED banks
3 *
4 * Copyright (C) 2007 Paul Mundt
5 *
6 * Most SH reference boards include a number of individual LEDs that can
7 * be independently controlled (either via a pre-defined hardware
8 * function or via the LED class, if desired -- the hardware tends to
9 * encapsulate some of the same "triggers" that the LED class supports,
10 * so there's not too much value in it).
11 *
12 * Additionally, most of these boards also have a LED bank that we've
13 * traditionally used for strobing the load average. This use case is
14 * handled by this driver, rather than giving each LED bit position its
15 * own struct device.
16 *
17 * This file is subject to the terms and conditions of the GNU General Public
18 * License. See the file "COPYING" in the main directory of this archive
19 * for more details.
20 */
21#include <linux/init.h>
22#include <linux/module.h>
23#include <linux/platform_device.h>
24#include <linux/sched.h>
25#include <linux/timer.h>
26#include <linux/io.h>
27
28#define DRV_NAME "heartbeat"
29#define DRV_VERSION "0.1.0"
30
31struct heartbeat_data {
32 void __iomem *base;
33 unsigned char bit_pos[8];
34 struct timer_list timer;
35};
36
37static void heartbeat_timer(unsigned long data)
38{
39 struct heartbeat_data *hd = (struct heartbeat_data *)data;
40 static unsigned bit = 0, up = 1;
41
42 ctrl_outw(1 << hd->bit_pos[bit], (unsigned long)hd->base);
43 if (up)
44 if (bit == (ARRAY_SIZE(hd->bit_pos) - 1)) {
45 bit--;
46 up = 0;
47 } else
48 bit++;
49 else if (bit == 0)
50 up = 1;
51 else
52 bit--;
53
54 mod_timer(&hd->timer, jiffies + (110 - ((300 << FSHIFT) /
55 ((avenrun[0] / 5) + (3 << FSHIFT)))));
56}
57
58static int heartbeat_drv_probe(struct platform_device *pdev)
59{
60 struct resource *res;
61 struct heartbeat_data *hd;
62
63 if (unlikely(pdev->num_resources != 1)) {
64 dev_err(&pdev->dev, "invalid number of resources\n");
65 return -EINVAL;
66 }
67
68 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
69 if (unlikely(res == NULL)) {
70 dev_err(&pdev->dev, "invalid resource\n");
71 return -EINVAL;
72 }
73
74 hd = kmalloc(sizeof(struct heartbeat_data), GFP_KERNEL);
75 if (unlikely(!hd))
76 return -ENOMEM;
77
78 if (pdev->dev.platform_data) {
79 memcpy(hd->bit_pos, pdev->dev.platform_data,
80 ARRAY_SIZE(hd->bit_pos));
81 } else {
82 int i;
83
84 for (i = 0; i < ARRAY_SIZE(hd->bit_pos); i++)
85 hd->bit_pos[i] = i;
86 }
87
88 hd->base = (void __iomem *)res->start;
89
90 setup_timer(&hd->timer, heartbeat_timer, (unsigned long)hd);
91 platform_set_drvdata(pdev, hd);
92
93 return mod_timer(&hd->timer, jiffies + 1);
94}
95
96static int heartbeat_drv_remove(struct platform_device *pdev)
97{
98 struct heartbeat_data *hd = platform_get_drvdata(pdev);
99
100 del_timer_sync(&hd->timer);
101
102 platform_set_drvdata(pdev, NULL);
103
104 kfree(hd);
105
106 return 0;
107}
108
109static struct platform_driver heartbeat_driver = {
110 .probe = heartbeat_drv_probe,
111 .remove = heartbeat_drv_remove,
112 .driver = {
113 .name = DRV_NAME,
114 },
115};
116
117static int __init heartbeat_init(void)
118{
119 printk(KERN_NOTICE DRV_NAME ": version %s loaded\n", DRV_VERSION);
120 return platform_driver_register(&heartbeat_driver);
121}
122
123static void __exit heartbeat_exit(void)
124{
125 platform_driver_unregister(&heartbeat_driver);
126}
127module_init(heartbeat_init);
128module_exit(heartbeat_exit);
129
130MODULE_VERSION(DRV_VERSION);
131MODULE_AUTHOR("Paul Mundt");
132MODULE_LICENSE("GPLv2");
diff --git a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile
index 9e00cb8a39e9..cc8d0d0b1427 100644
--- a/arch/sh/drivers/pci/Makefile
+++ b/arch/sh/drivers/pci/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7780) += pci-sh7780.o ops-sh4.o
12obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \ 12obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \
13 dma-dreamcast.o 13 dma-dreamcast.o
14obj-$(CONFIG_SH_SECUREEDGE5410) += ops-snapgear.o 14obj-$(CONFIG_SH_SECUREEDGE5410) += ops-snapgear.o
15obj-$(CONFIG_SH_BIGSUR) += ops-bigsur.o
16obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o 15obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o
17obj-$(CONFIG_SH_SH03) += ops-sh03.o fixups-sh03.o 16obj-$(CONFIG_SH_SH03) += ops-sh03.o fixups-sh03.o
18obj-$(CONFIG_SH_R7780RP) += ops-r7780rp.o fixups-r7780rp.o 17obj-$(CONFIG_SH_R7780RP) += ops-r7780rp.o fixups-r7780rp.o
diff --git a/arch/sh/drivers/pci/ops-bigsur.c b/arch/sh/drivers/pci/ops-bigsur.c
deleted file mode 100644
index eb31be751524..000000000000
--- a/arch/sh/drivers/pci/ops-bigsur.c
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * linux/arch/sh/drivers/pci/ops-bigsur.c
3 *
4 * By Dustin McIntire (dustin@sensoria.com) (c)2001
5 *
6 * Ported to new API by Paul Mundt <lethal@linux-sh.org>.
7 *
8 * May be copied or modified under the terms of the GNU General Public
9 * License. See linux/COPYING for more information.
10 *
11 * PCI initialization for the Hitachi Big Sur Evaluation Board
12 */
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/init.h>
16#include <linux/pci.h>
17#include <asm/io.h>
18#include "pci-sh4.h"
19#include <asm/bigsur/bigsur.h>
20
21#define BIGSUR_PCI_IO 0x4000
22#define BIGSUR_PCI_MEM 0xfd000000
23
24static struct resource sh7751_io_resource = {
25 .name = "SH7751 IO",
26 .start = BIGSUR_PCI_IO,
27 .end = BIGSUR_PCI_IO + (64*1024) - 1,
28 .flags = IORESOURCE_IO,
29};
30
31static struct resource sh7751_mem_resource = {
32 .name = "SH7751 mem",
33 .start = BIGSUR_PCI_MEM,
34 .end = BIGSUR_PCI_MEM + (64*1024*1024) - 1,
35 .flags = IORESOURCE_MEM,
36};
37
38extern struct pci_ops sh7751_pci_ops;
39
40struct pci_channel board_pci_channels[] = {
41 { &sh4_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff },
42 { 0, }
43};
44
45static struct sh4_pci_address_map sh7751_pci_map = {
46 .window0 = {
47 .base = SH7751_CS3_BASE_ADDR,
48 .size = BIGSUR_LSR0_SIZE,
49 },
50
51 .window1 = {
52 .base = SH7751_CS3_BASE_ADDR,
53 .size = BIGSUR_LSR1_SIZE,
54 },
55};
56
57/*
58 * Initialize the Big Sur PCI interface
59 * Setup hardware to be Central Funtion
60 * Copy the BSR regs to the PCI interface
61 * Setup PCI windows into local RAM
62 */
63int __init pcibios_init_platform(void)
64{
65 return sh7751_pcic_init(&sh7751_pci_map);
66}
67
68int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
69{
70 /*
71 * The Big Sur can be used in a CPCI chassis, but the SH7751 PCI
72 * interface is on the wrong end of the board so that it can also
73 * support a V320 CPI interface chip... Therefor the IRQ mapping is
74 * somewhat use dependent... I'l assume a linear map for now, i.e.
75 * INTA=slot0,pin0... INTD=slot3,pin0...
76 */
77 int irq = (slot + pin-1) % 4 + BIGSUR_SH7751_PCI_IRQ_BASE;
78
79 PCIDBG(2, "PCI: Mapping Big Sur IRQ for slot %d, pin %c to irq %d\n",
80 slot, pin-1+'A', irq);
81
82 return irq;
83}
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index 85e1ee2e2e7b..9ddff760d3c6 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -157,15 +157,6 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map)
157 PCIBIOS_MIN_IO, (64 << 10), 157 PCIBIOS_MIN_IO, (64 << 10),
158 SH7751_PCI_IO_BASE + PCIBIOS_MIN_IO); 158 SH7751_PCI_IO_BASE + PCIBIOS_MIN_IO);
159 159
160 /*
161 * XXX: For now, leave this board-specific. In the event we have other
162 * boards that need to do similar work, this can be wrapped.
163 */
164#ifdef CONFIG_SH_BIGSUR
165 bigsur_port_map(PCIBIOS_MIN_IO, (64 << 10),
166 SH7751_PCI_IO_BASE + PCIBIOS_MIN_IO, 0);
167#endif
168
169 /* Make sure the MSB's of IO window are set to access PCI space 160 /* Make sure the MSB's of IO window are set to access PCI space
170 * correctly */ 161 * correctly */
171 word = PCIBIOS_MIN_IO & SH4_PCIIOBR_MASK; 162 word = PCIBIOS_MIN_IO & SH4_PCIIOBR_MASK;
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index 99c7e5249f7a..ff30d7f58043 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -6,7 +6,8 @@ extra-y := head.o init_task.o vmlinux.lds
6 6
7obj-y := process.o signal.o traps.o irq.o \ 7obj-y := process.o signal.o traps.o irq.o \
8 ptrace.o setup.o time.o sys_sh.o semaphore.o \ 8 ptrace.o setup.o time.o sys_sh.o semaphore.o \
9 io.o io_generic.o sh_ksyms.o syscalls.o 9 io.o io_generic.o sh_ksyms.o syscalls.o \
10 debugtraps.o
10 11
11obj-y += cpu/ timers/ 12obj-y += cpu/ timers/
12obj-$(CONFIG_VSYSCALL) += vsyscall/ 13obj-$(CONFIG_VSYSCALL) += vsyscall/
@@ -19,6 +20,5 @@ obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
19obj-$(CONFIG_MODULES) += module.o 20obj-$(CONFIG_MODULES) += module.o
20obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 21obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
21obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 22obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
22obj-$(CONFIG_APM) += apm.o
23obj-$(CONFIG_PM) += pm.o 23obj-$(CONFIG_PM) += pm.o
24obj-$(CONFIG_STACKTRACE) += stacktrace.o 24obj-$(CONFIG_STACKTRACE) += stacktrace.o
diff --git a/arch/sh/kernel/apm.c b/arch/sh/kernel/apm.c
deleted file mode 100644
index 4f66f91b1006..000000000000
--- a/arch/sh/kernel/apm.c
+++ /dev/null
@@ -1,538 +0,0 @@
1/*
2 * bios-less APM driver for hp680
3 *
4 * Copyright 2005 (c) Andriy Skulysh <askulysh@gmail.com>
5 *
6 * based on ARM APM driver by
7 * Jamey Hicks <jamey@crl.dec.com>
8 *
9 * adapted from the APM BIOS driver for Linux by
10 * Stephen Rothwell (sfr@linuxcare.com)
11 *
12 * APM 1.2 Reference:
13 * Intel Corporation, Microsoft Corporation. Advanced Power Management
14 * (APM) BIOS Interface Specification, Revision 1.2, February 1996.
15 *
16 * [This document is available from Microsoft at:
17 * http://www.microsoft.com/hwdev/busbios/amp_12.htm]
18 */
19#include <linux/module.h>
20#include <linux/poll.h>
21#include <linux/timer.h>
22#include <linux/slab.h>
23#include <linux/proc_fs.h>
24#include <linux/miscdevice.h>
25#include <linux/apm_bios.h>
26#include <linux/pm.h>
27#include <linux/pm_legacy.h>
28#include <asm/apm.h>
29
30#define MODNAME "apm"
31
32/*
33 * The apm_bios device is one of the misc char devices.
34 * This is its minor number.
35 */
36#define APM_MINOR_DEV 134
37
38/*
39 * Maximum number of events stored
40 */
41#define APM_MAX_EVENTS 16
42
43struct apm_queue {
44 unsigned int event_head;
45 unsigned int event_tail;
46 apm_event_t events[APM_MAX_EVENTS];
47};
48
49/*
50 * The per-file APM data
51 */
52struct apm_user {
53 struct list_head list;
54
55 unsigned int suser: 1;
56 unsigned int writer: 1;
57 unsigned int reader: 1;
58
59 int suspend_result;
60 unsigned int suspend_state;
61#define SUSPEND_NONE 0 /* no suspend pending */
62#define SUSPEND_PENDING 1 /* suspend pending read */
63#define SUSPEND_READ 2 /* suspend read, pending ack */
64#define SUSPEND_ACKED 3 /* suspend acked */
65#define SUSPEND_DONE 4 /* suspend completed */
66
67 struct apm_queue queue;
68};
69
70/*
71 * Local variables
72 */
73static int suspends_pending;
74
75static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
76static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
77
78/*
79 * This is a list of everyone who has opened /dev/apm_bios
80 */
81static DECLARE_RWSEM(user_list_lock);
82static LIST_HEAD(apm_user_list);
83
84/*
85 * kapmd info. kapmd provides us a process context to handle
86 * "APM" events within - specifically necessary if we're going
87 * to be suspending the system.
88 */
89static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
90static DECLARE_COMPLETION(kapmd_exit);
91static DEFINE_SPINLOCK(kapmd_queue_lock);
92static struct apm_queue kapmd_queue;
93
94int apm_suspended;
95EXPORT_SYMBOL(apm_suspended);
96
97/* Platform-specific apm_read_proc(). */
98int (*apm_get_info)(char *buf, char **start, off_t fpos, int length);
99EXPORT_SYMBOL(apm_get_info);
100
101/*
102 * APM event queue management.
103 */
104static inline int queue_empty(struct apm_queue *q)
105{
106 return q->event_head == q->event_tail;
107}
108
109static inline apm_event_t queue_get_event(struct apm_queue *q)
110{
111 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
112 return q->events[q->event_tail];
113}
114
115static void queue_add_event(struct apm_queue *q, apm_event_t event)
116{
117 q->event_head = (q->event_head + 1) % APM_MAX_EVENTS;
118 if (q->event_head == q->event_tail) {
119 static int notified;
120
121 if (notified++ == 0)
122 printk(KERN_ERR "apm: an event queue overflowed\n");
123
124 q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS;
125 }
126 q->events[q->event_head] = event;
127}
128
129static void queue_event_one_user(struct apm_user *as, apm_event_t event)
130{
131 if (as->suser && as->writer) {
132 switch (event) {
133 case APM_SYS_SUSPEND:
134 case APM_USER_SUSPEND:
135 /*
136 * If this user already has a suspend pending,
137 * don't queue another one.
138 */
139 if (as->suspend_state != SUSPEND_NONE)
140 return;
141
142 as->suspend_state = SUSPEND_PENDING;
143 suspends_pending++;
144 break;
145 }
146 }
147 queue_add_event(&as->queue, event);
148}
149
150static void queue_event(apm_event_t event, struct apm_user *sender)
151{
152 struct apm_user *as;
153
154 down_read(&user_list_lock);
155
156 list_for_each_entry(as, &apm_user_list, list)
157 if (as != sender && as->reader)
158 queue_event_one_user(as, event);
159
160 up_read(&user_list_lock);
161 wake_up_interruptible(&apm_waitqueue);
162}
163
164/**
165 * apm_queue_event - queue an APM event for kapmd
166 * @event: APM event
167 *
168 * Queue an APM event for kapmd to process and ultimately take the
169 * appropriate action. Only a subset of events are handled:
170 * %APM_LOW_BATTERY
171 * %APM_POWER_STATUS_CHANGE
172 * %APM_USER_SUSPEND
173 * %APM_SYS_SUSPEND
174 * %APM_CRITICAL_SUSPEND
175 */
176void apm_queue_event(apm_event_t event)
177{
178 spin_lock_irq(&kapmd_queue_lock);
179 queue_add_event(&kapmd_queue, event);
180 spin_unlock_irq(&kapmd_queue_lock);
181
182 wake_up_interruptible(&kapmd_wait);
183}
184EXPORT_SYMBOL(apm_queue_event);
185
186static void apm_suspend(void)
187{
188 struct apm_user *as;
189 int err;
190
191 apm_suspended = 1;
192 err = pm_suspend(PM_SUSPEND_MEM);
193
194 /*
195 * Anyone on the APM queues will think we're still suspended.
196 * Send a message so everyone knows we're now awake again.
197 */
198 queue_event(APM_NORMAL_RESUME, NULL);
199
200 /*
201 * Finally, wake up anyone who is sleeping on the suspend.
202 */
203 down_read(&user_list_lock);
204 list_for_each_entry(as, &apm_user_list, list) {
205 as->suspend_result = err;
206 as->suspend_state = SUSPEND_DONE;
207 }
208 up_read(&user_list_lock);
209
210 wake_up(&apm_suspend_waitqueue);
211 apm_suspended = 0;
212}
213
214static ssize_t apm_read(struct file *fp, char __user *buf,
215 size_t count, loff_t *ppos)
216{
217 struct apm_user *as = fp->private_data;
218 apm_event_t event;
219 int i = count, ret = 0;
220
221 if (count < sizeof(apm_event_t))
222 return -EINVAL;
223
224 if (queue_empty(&as->queue) && fp->f_flags & O_NONBLOCK)
225 return -EAGAIN;
226
227 wait_event_interruptible(apm_waitqueue, !queue_empty(&as->queue));
228
229 while ((i >= sizeof(event)) && !queue_empty(&as->queue)) {
230 event = queue_get_event(&as->queue);
231
232 ret = -EFAULT;
233 if (copy_to_user(buf, &event, sizeof(event)))
234 break;
235
236 if (event == APM_SYS_SUSPEND || event == APM_USER_SUSPEND)
237 as->suspend_state = SUSPEND_READ;
238
239 buf += sizeof(event);
240 i -= sizeof(event);
241 }
242
243 if (i < count)
244 ret = count - i;
245
246 return ret;
247}
248
249static unsigned int apm_poll(struct file *fp, poll_table * wait)
250{
251 struct apm_user *as = fp->private_data;
252
253 poll_wait(fp, &apm_waitqueue, wait);
254 return queue_empty(&as->queue) ? 0 : POLLIN | POLLRDNORM;
255}
256
257/*
258 * apm_ioctl - handle APM ioctl
259 *
260 * APM_IOC_SUSPEND
261 * This IOCTL is overloaded, and performs two functions. It is used to:
262 * - initiate a suspend
263 * - acknowledge a suspend read from /dev/apm_bios.
264 * Only when everyone who has opened /dev/apm_bios with write permission
265 * has acknowledge does the actual suspend happen.
266 */
267static int
268apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
269{
270 struct apm_user *as = filp->private_data;
271 unsigned long flags;
272 int err = -EINVAL;
273
274 if (!as->suser || !as->writer)
275 return -EPERM;
276
277 switch (cmd) {
278 case APM_IOC_SUSPEND:
279 as->suspend_result = -EINTR;
280
281 if (as->suspend_state == SUSPEND_READ) {
282 /*
283 * If we read a suspend command from /dev/apm_bios,
284 * then the corresponding APM_IOC_SUSPEND ioctl is
285 * interpreted as an acknowledge.
286 */
287 as->suspend_state = SUSPEND_ACKED;
288 suspends_pending--;
289 } else {
290 /*
291 * Otherwise it is a request to suspend the system.
292 * Queue an event for all readers, and expect an
293 * acknowledge from all writers who haven't already
294 * acknowledged.
295 */
296 queue_event(APM_USER_SUSPEND, as);
297 }
298
299 /*
300 * If there are no further acknowledges required, suspend
301 * the system.
302 */
303 if (suspends_pending == 0)
304 apm_suspend();
305
306 /*
307 * Wait for the suspend/resume to complete. If there are
308 * pending acknowledges, we wait here for them.
309 *
310 * Note that we need to ensure that the PM subsystem does
311 * not kick us out of the wait when it suspends the threads.
312 */
313 flags = current->flags;
314 current->flags |= PF_NOFREEZE;
315
316 /*
317 * Note: do not allow a thread which is acking the suspend
318 * to escape until the resume is complete.
319 */
320 if (as->suspend_state == SUSPEND_ACKED)
321 wait_event(apm_suspend_waitqueue,
322 as->suspend_state == SUSPEND_DONE);
323 else
324 wait_event_interruptible(apm_suspend_waitqueue,
325 as->suspend_state == SUSPEND_DONE);
326
327 current->flags = flags;
328 err = as->suspend_result;
329 as->suspend_state = SUSPEND_NONE;
330 break;
331 }
332
333 return err;
334}
335
336static int apm_release(struct inode * inode, struct file * filp)
337{
338 struct apm_user *as = filp->private_data;
339 filp->private_data = NULL;
340
341 down_write(&user_list_lock);
342 list_del(&as->list);
343 up_write(&user_list_lock);
344
345 /*
346 * We are now unhooked from the chain. As far as new
347 * events are concerned, we no longer exist. However, we
348 * need to balance suspends_pending, which means the
349 * possibility of sleeping.
350 */
351 if (as->suspend_state != SUSPEND_NONE) {
352 suspends_pending -= 1;
353 if (suspends_pending == 0)
354 apm_suspend();
355 }
356
357 kfree(as);
358 return 0;
359}
360
361static int apm_open(struct inode * inode, struct file * filp)
362{
363 struct apm_user *as;
364
365 as = kzalloc(sizeof(*as), GFP_KERNEL);
366 if (as) {
367 /*
368 * XXX - this is a tiny bit broken, when we consider BSD
369 * process accounting. If the device is opened by root, we
370 * instantly flag that we used superuser privs. Who knows,
371 * we might close the device immediately without doing a
372 * privileged operation -- cevans
373 */
374 as->suser = capable(CAP_SYS_ADMIN);
375 as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE;
376 as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ;
377
378 down_write(&user_list_lock);
379 list_add(&as->list, &apm_user_list);
380 up_write(&user_list_lock);
381
382 filp->private_data = as;
383 }
384
385 return as ? 0 : -ENOMEM;
386}
387
388static struct file_operations apm_bios_fops = {
389 .owner = THIS_MODULE,
390 .read = apm_read,
391 .poll = apm_poll,
392 .ioctl = apm_ioctl,
393 .open = apm_open,
394 .release = apm_release,
395};
396
397static struct miscdevice apm_device = {
398 .minor = APM_MINOR_DEV,
399 .name = "apm_bios",
400 .fops = &apm_bios_fops
401};
402
403
404#ifdef CONFIG_PROC_FS
405/*
406 * Arguments, with symbols from linux/apm_bios.h.
407 *
408 * 0) Linux driver version (this will change if format changes)
409 * 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2.
410 * 2) APM flags from APM Installation Check (0x00):
411 * bit 0: APM_16_BIT_SUPPORT
412 * bit 1: APM_32_BIT_SUPPORT
413 * bit 2: APM_IDLE_SLOWS_CLOCK
414 * bit 3: APM_BIOS_DISABLED
415 * bit 4: APM_BIOS_DISENGAGED
416 * 3) AC line status
417 * 0x00: Off-line
418 * 0x01: On-line
419 * 0x02: On backup power (BIOS >= 1.1 only)
420 * 0xff: Unknown
421 * 4) Battery status
422 * 0x00: High
423 * 0x01: Low
424 * 0x02: Critical
425 * 0x03: Charging
426 * 0x04: Selected battery not present (BIOS >= 1.2 only)
427 * 0xff: Unknown
428 * 5) Battery flag
429 * bit 0: High
430 * bit 1: Low
431 * bit 2: Critical
432 * bit 3: Charging
433 * bit 7: No system battery
434 * 0xff: Unknown
435 * 6) Remaining battery life (percentage of charge):
436 * 0-100: valid
437 * -1: Unknown
438 * 7) Remaining battery life (time units):
439 * Number of remaining minutes or seconds
440 * -1: Unknown
441 * 8) min = minutes; sec = seconds
442 */
443static int apm_read_proc(char *buf, char **start, off_t fpos, int length)
444{
445 if (likely(apm_get_info))
446 return apm_get_info(buf, start, fpos, length);
447
448 return -EINVAL;
449}
450#endif
451
452static int kapmd(void *arg)
453{
454 daemonize("kapmd");
455 current->flags |= PF_NOFREEZE;
456
457 do {
458 apm_event_t event;
459
460 wait_event_interruptible(kapmd_wait,
461 !queue_empty(&kapmd_queue) || !pm_active);
462
463 if (!pm_active)
464 break;
465
466 spin_lock_irq(&kapmd_queue_lock);
467 event = 0;
468 if (!queue_empty(&kapmd_queue))
469 event = queue_get_event(&kapmd_queue);
470 spin_unlock_irq(&kapmd_queue_lock);
471
472 switch (event) {
473 case 0:
474 break;
475
476 case APM_LOW_BATTERY:
477 case APM_POWER_STATUS_CHANGE:
478 queue_event(event, NULL);
479 break;
480
481 case APM_USER_SUSPEND:
482 case APM_SYS_SUSPEND:
483 queue_event(event, NULL);
484 if (suspends_pending == 0)
485 apm_suspend();
486 break;
487
488 case APM_CRITICAL_SUSPEND:
489 apm_suspend();
490 break;
491 }
492 } while (1);
493
494 complete_and_exit(&kapmd_exit, 0);
495}
496
497static int __init apm_init(void)
498{
499 int ret;
500
501 pm_active = 1;
502
503 ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
504 if (unlikely(ret < 0)) {
505 pm_active = 0;
506 return ret;
507 }
508
509 create_proc_info_entry("apm", 0, NULL, apm_read_proc);
510
511 ret = misc_register(&apm_device);
512 if (unlikely(ret != 0)) {
513 remove_proc_entry("apm", NULL);
514
515 pm_active = 0;
516 wake_up(&kapmd_wait);
517 wait_for_completion(&kapmd_exit);
518 }
519
520 return ret;
521}
522
523static void __exit apm_exit(void)
524{
525 misc_deregister(&apm_device);
526 remove_proc_entry("apm", NULL);
527
528 pm_active = 0;
529 wake_up(&kapmd_wait);
530 wait_for_completion(&kapmd_exit);
531}
532
533module_init(apm_init);
534module_exit(apm_exit);
535
536MODULE_AUTHOR("Stephen Rothwell, Andriy Skulysh");
537MODULE_DESCRIPTION("Advanced Power Management");
538MODULE_LICENSE("GPL");
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 48121766e8d2..4b339a640b13 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * CPU init code 4 * CPU init code
5 * 5 *
6 * Copyright (C) 2002, 2003 Paul Mundt 6 * Copyright (C) 2002 - 2006 Paul Mundt
7 * Copyright (C) 2003 Richard Curnow 7 * Copyright (C) 2003 Richard Curnow
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
@@ -12,6 +12,8 @@
12 */ 12 */
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/mm.h>
16#include <asm/mmu_context.h>
15#include <asm/processor.h> 17#include <asm/processor.h>
16#include <asm/uaccess.h> 18#include <asm/uaccess.h>
17#include <asm/page.h> 19#include <asm/page.h>
@@ -46,7 +48,7 @@ static void __init cache_init(void)
46{ 48{
47 unsigned long ccr, flags; 49 unsigned long ccr, flags;
48 50
49 if (cpu_data->type == CPU_SH_NONE) 51 if (current_cpu_data.type == CPU_SH_NONE)
50 panic("Unknown CPU"); 52 panic("Unknown CPU");
51 53
52 jump_to_P2(); 54 jump_to_P2();
@@ -66,7 +68,7 @@ static void __init cache_init(void)
66 if (ccr & CCR_CACHE_ENABLE) { 68 if (ccr & CCR_CACHE_ENABLE) {
67 unsigned long ways, waysize, addrstart; 69 unsigned long ways, waysize, addrstart;
68 70
69 waysize = cpu_data->dcache.sets; 71 waysize = current_cpu_data.dcache.sets;
70 72
71#ifdef CCR_CACHE_ORA 73#ifdef CCR_CACHE_ORA
72 /* 74 /*
@@ -77,7 +79,7 @@ static void __init cache_init(void)
77 waysize >>= 1; 79 waysize >>= 1;
78#endif 80#endif
79 81
80 waysize <<= cpu_data->dcache.entry_shift; 82 waysize <<= current_cpu_data.dcache.entry_shift;
81 83
82#ifdef CCR_CACHE_EMODE 84#ifdef CCR_CACHE_EMODE
83 /* If EMODE is not set, we only have 1 way to flush. */ 85 /* If EMODE is not set, we only have 1 way to flush. */
@@ -85,7 +87,7 @@ static void __init cache_init(void)
85 ways = 1; 87 ways = 1;
86 else 88 else
87#endif 89#endif
88 ways = cpu_data->dcache.ways; 90 ways = current_cpu_data.dcache.ways;
89 91
90 addrstart = CACHE_OC_ADDRESS_ARRAY; 92 addrstart = CACHE_OC_ADDRESS_ARRAY;
91 do { 93 do {
@@ -93,10 +95,10 @@ static void __init cache_init(void)
93 95
94 for (addr = addrstart; 96 for (addr = addrstart;
95 addr < addrstart + waysize; 97 addr < addrstart + waysize;
96 addr += cpu_data->dcache.linesz) 98 addr += current_cpu_data.dcache.linesz)
97 ctrl_outl(0, addr); 99 ctrl_outl(0, addr);
98 100
99 addrstart += cpu_data->dcache.way_incr; 101 addrstart += current_cpu_data.dcache.way_incr;
100 } while (--ways); 102 } while (--ways);
101 } 103 }
102 104
@@ -108,7 +110,7 @@ static void __init cache_init(void)
108 110
109#ifdef CCR_CACHE_EMODE 111#ifdef CCR_CACHE_EMODE
110 /* Force EMODE if possible */ 112 /* Force EMODE if possible */
111 if (cpu_data->dcache.ways > 1) 113 if (current_cpu_data.dcache.ways > 1)
112 flags |= CCR_CACHE_EMODE; 114 flags |= CCR_CACHE_EMODE;
113 else 115 else
114 flags &= ~CCR_CACHE_EMODE; 116 flags &= ~CCR_CACHE_EMODE;
@@ -125,10 +127,10 @@ static void __init cache_init(void)
125#ifdef CONFIG_SH_OCRAM 127#ifdef CONFIG_SH_OCRAM
126 /* Turn on OCRAM -- halve the OC */ 128 /* Turn on OCRAM -- halve the OC */
127 flags |= CCR_CACHE_ORA; 129 flags |= CCR_CACHE_ORA;
128 cpu_data->dcache.sets >>= 1; 130 current_cpu_data.dcache.sets >>= 1;
129 131
130 cpu_data->dcache.way_size = cpu_data->dcache.sets * 132 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
131 cpu_data->dcache.linesz; 133 current_cpu_data.dcache.linesz;
132#endif 134#endif
133 135
134 ctrl_outl(flags, CCR); 136 ctrl_outl(flags, CCR);
@@ -170,7 +172,7 @@ static void __init dsp_init(void)
170 172
171 /* If the DSP bit is still set, this CPU has a DSP */ 173 /* If the DSP bit is still set, this CPU has a DSP */
172 if (sr & SR_DSP) 174 if (sr & SR_DSP)
173 cpu_data->flags |= CPU_HAS_DSP; 175 current_cpu_data.flags |= CPU_HAS_DSP;
174 176
175 /* Now that we've determined the DSP status, clear the DSP bit. */ 177 /* Now that we've determined the DSP status, clear the DSP bit. */
176 release_dsp(); 178 release_dsp();
@@ -202,22 +204,28 @@ asmlinkage void __init sh_cpu_init(void)
202 cache_init(); 204 cache_init();
203 205
204 shm_align_mask = max_t(unsigned long, 206 shm_align_mask = max_t(unsigned long,
205 cpu_data->dcache.way_size - 1, 207 current_cpu_data.dcache.way_size - 1,
206 PAGE_SIZE - 1); 208 PAGE_SIZE - 1);
207 209
208 /* Disable the FPU */ 210 /* Disable the FPU */
209 if (fpu_disabled) { 211 if (fpu_disabled) {
210 printk("FPU Disabled\n"); 212 printk("FPU Disabled\n");
211 cpu_data->flags &= ~CPU_HAS_FPU; 213 current_cpu_data.flags &= ~CPU_HAS_FPU;
212 disable_fpu(); 214 disable_fpu();
213 } 215 }
214 216
215 /* FPU initialization */ 217 /* FPU initialization */
216 if ((cpu_data->flags & CPU_HAS_FPU)) { 218 if ((current_cpu_data.flags & CPU_HAS_FPU)) {
217 clear_thread_flag(TIF_USEDFPU); 219 clear_thread_flag(TIF_USEDFPU);
218 clear_used_math(); 220 clear_used_math();
219 } 221 }
220 222
223 /*
224 * Initialize the per-CPU ASID cache very early, since the
225 * TLB flushing routines depend on this being setup.
226 */
227 current_cpu_data.asid_cache = NO_CONTEXT;
228
221#ifdef CONFIG_SH_DSP 229#ifdef CONFIG_SH_DSP
222 /* Probe for DSP */ 230 /* Probe for DSP */
223 dsp_init(); 231 dsp_init();
@@ -225,7 +233,7 @@ asmlinkage void __init sh_cpu_init(void)
225 /* Disable the DSP */ 233 /* Disable the DSP */
226 if (dsp_disabled) { 234 if (dsp_disabled) {
227 printk("DSP Disabled\n"); 235 printk("DSP Disabled\n");
228 cpu_data->flags &= ~CPU_HAS_DSP; 236 current_cpu_data.flags &= ~CPU_HAS_DSP;
229 release_dsp(); 237 release_dsp();
230 } 238 }
231#endif 239#endif
@@ -240,4 +248,3 @@ asmlinkage void __init sh_cpu_init(void)
240 ubc_wakeup(); 248 ubc_wakeup();
241#endif 249#endif
242} 250}
243
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 35eb5751a3aa..210280b6fddf 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -43,16 +43,29 @@ static struct irq_chip ipr_irq_chip = {
43 .mask_ack = disable_ipr_irq, 43 .mask_ack = disable_ipr_irq,
44}; 44};
45 45
46unsigned int map_ipridx_to_addr(int idx) __attribute__ ((weak));
47unsigned int map_ipridx_to_addr(int idx)
48{
49 return 0;
50}
51
46void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) 52void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs)
47{ 53{
48 int i; 54 int i;
49 55
50 for (i = 0; i < nr_irqs; i++) { 56 for (i = 0; i < nr_irqs; i++) {
51 unsigned int irq = table[i].irq; 57 unsigned int irq = table[i].irq;
52 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx); 58
59 if (!irq)
60 irq = table[i].irq = i;
61
53 /* could the IPR index be mapped, if not we ignore this */ 62 /* could the IPR index be mapped, if not we ignore this */
54 if (table[i].addr == 0) 63 if (!table[i].addr) {
55 continue; 64 table[i].addr = map_ipridx_to_addr(table[i].ipr_idx);
65 if (!table[i].addr)
66 continue;
67 }
68
56 disable_irq_nosync(irq); 69 disable_irq_nosync(irq);
57 set_irq_chip_and_handler_name(irq, &ipr_irq_chip, 70 set_irq_chip_and_handler_name(irq, &ipr_irq_chip,
58 handle_level_irq, "level"); 71 handle_level_irq, "level");
diff --git a/arch/sh/kernel/cpu/sh2/clock-sh7619.c b/arch/sh/kernel/cpu/sh2/clock-sh7619.c
index d0440b269702..d2c157917999 100644
--- a/arch/sh/kernel/cpu/sh2/clock-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/clock-sh7619.c
@@ -18,8 +18,8 @@
18#include <asm/freq.h> 18#include <asm/freq.h>
19#include <asm/io.h> 19#include <asm/io.h>
20 20
21const static int pll1rate[]={1,2}; 21static const int pll1rate[] = {1,2};
22const static int pfc_divisors[]={1,2,0,4}; 22static const int pfc_divisors[] = {1,2,0,4};
23 23
24#if (CONFIG_SH_CLK_MD == 1) || (CONFIG_SH_CLK_MD == 2) 24#if (CONFIG_SH_CLK_MD == 1) || (CONFIG_SH_CLK_MD == 2)
25#define PLL2 (4) 25#define PLL2 (4)
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index d51fa5e9904a..7f7d292f36ec 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -178,12 +178,10 @@ interrupt_entry:
1788: .long do_exception_error 1788: .long do_exception_error
179 179
180trap_entry: 180trap_entry:
181 /* verbose BUG trapa entry check */ 181 mov #0x30,r8
182 mov #0x3e,r8 182 cmp/ge r8,r9 ! vector 0x20-0x2f is systemcall
183 cmp/ge r8,r9 183 bt 1f
184 bf/s 1f 184 add #-0x10,r9 ! convert SH2 to SH3/4 ABI
185 add #-0x10,r9
186 add #0x10,r9
1871: 1851:
188 shll2 r9 ! TRA 186 shll2 r9 ! TRA
189 mov #OFF_TRA,r8 187 mov #OFF_TRA,r8
@@ -206,7 +204,7 @@ trap_entry:
206 204
207#if defined(CONFIG_SH_STANDARD_BIOS) 205#if defined(CONFIG_SH_STANDARD_BIOS)
208 /* Unwind the stack and jmp to the debug entry */ 206 /* Unwind the stack and jmp to the debug entry */
209debug_kernel_fw: 207ENTRY(sh_bios_handler)
210 mov r15,r0 208 mov r15,r0
211 add #(22-4)*4-4,r0 209 add #(22-4)*4-4,r0
212 ldc.l @r0+,gbr 210 ldc.l @r0+,gbr
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index ba527d9b5024..108e81b682ed 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -18,27 +18,27 @@
18int __init detect_cpu_and_cache_system(void) 18int __init detect_cpu_and_cache_system(void)
19{ 19{
20#if defined(CONFIG_CPU_SUBTYPE_SH7604) 20#if defined(CONFIG_CPU_SUBTYPE_SH7604)
21 cpu_data->type = CPU_SH7604; 21 current_cpu_data.type = CPU_SH7604;
22 cpu_data->dcache.ways = 4; 22 current_cpu_data.dcache.ways = 4;
23 cpu_data->dcache.way_incr = (1<<10); 23 current_cpu_data.dcache.way_incr = (1<<10);
24 cpu_data->dcache.sets = 64; 24 current_cpu_data.dcache.sets = 64;
25 cpu_data->dcache.entry_shift = 4; 25 current_cpu_data.dcache.entry_shift = 4;
26 cpu_data->dcache.linesz = L1_CACHE_BYTES; 26 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
27 cpu_data->dcache.flags = 0; 27 current_cpu_data.dcache.flags = 0;
28#elif defined(CONFIG_CPU_SUBTYPE_SH7619) 28#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
29 cpu_data->type = CPU_SH7619; 29 current_cpu_data.type = CPU_SH7619;
30 cpu_data->dcache.ways = 4; 30 current_cpu_data.dcache.ways = 4;
31 cpu_data->dcache.way_incr = (1<<12); 31 current_cpu_data.dcache.way_incr = (1<<12);
32 cpu_data->dcache.sets = 256; 32 current_cpu_data.dcache.sets = 256;
33 cpu_data->dcache.entry_shift = 4; 33 current_cpu_data.dcache.entry_shift = 4;
34 cpu_data->dcache.linesz = L1_CACHE_BYTES; 34 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
35 cpu_data->dcache.flags = 0; 35 current_cpu_data.dcache.flags = 0;
36#endif 36#endif
37 /* 37 /*
38 * SH-2 doesn't have separate caches 38 * SH-2 doesn't have separate caches
39 */ 39 */
40 cpu_data->dcache.flags |= SH_CACHE_COMBINED; 40 current_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
41 cpu_data->icache = cpu_data->dcache; 41 current_cpu_data.icache = current_cpu_data.dcache;
42 42
43 return 0; 43 return 0;
44} 44}
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index 79283e6c1d8f..f83ff8a68f35 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -52,42 +52,38 @@ static int __init sh7619_devices_setup(void)
52} 52}
53__initcall(sh7619_devices_setup); 53__initcall(sh7619_devices_setup);
54 54
55#define INTC_IPRC 0xf8080000UL
56#define INTC_IPRD 0xf8080002UL
57
58#define CMI0_IRQ 86
59
60#define SCIF0_ERI_IRQ 88
61#define SCIF0_RXI_IRQ 89
62#define SCIF0_BRI_IRQ 90
63#define SCIF0_TXI_IRQ 91
64
65#define SCIF1_ERI_IRQ 92
66#define SCIF1_RXI_IRQ 93
67#define SCIF1_BRI_IRQ 94
68#define SCIF1_TXI_IRQ 95
69
70#define SCIF2_BRI_IRQ 96
71#define SCIF2_ERI_IRQ 97
72#define SCIF2_RXI_IRQ 98
73#define SCIF2_TXI_IRQ 99
74
75static struct ipr_data sh7619_ipr_map[] = { 55static struct ipr_data sh7619_ipr_map[] = {
76 { CMI0_IRQ, INTC_IPRC, 1, 2 }, 56 { 86, 0, 4, 2 }, /* CMI0 */
77 { SCIF0_ERI_IRQ, INTC_IPRD, 3, 3 }, 57 { 88, 1, 12, 3 }, /* SCIF0_ERI */
78 { SCIF0_RXI_IRQ, INTC_IPRD, 3, 3 }, 58 { 89, 1, 12, 3 }, /* SCIF0_RXI */
79 { SCIF0_BRI_IRQ, INTC_IPRD, 3, 3 }, 59 { 90, 1, 12, 3 }, /* SCIF0_BRI */
80 { SCIF0_TXI_IRQ, INTC_IPRD, 3, 3 }, 60 { 91, 1, 12, 3 }, /* SCIF0_TXI */
81 { SCIF1_ERI_IRQ, INTC_IPRD, 2, 3 }, 61 { 92, 1, 8, 3 }, /* SCIF1_ERI */
82 { SCIF1_RXI_IRQ, INTC_IPRD, 2, 3 }, 62 { 93, 1, 8, 3 }, /* SCIF1_RXI */
83 { SCIF1_BRI_IRQ, INTC_IPRD, 2, 3 }, 63 { 94, 1, 8, 3 }, /* SCIF1_BRI */
84 { SCIF1_TXI_IRQ, INTC_IPRD, 2, 3 }, 64 { 95, 1, 8, 3 }, /* SCIF1_TXI */
85 { SCIF2_ERI_IRQ, INTC_IPRD, 1, 3 }, 65 { 96, 1, 4, 3 }, /* SCIF2_ERI */
86 { SCIF2_RXI_IRQ, INTC_IPRD, 1, 3 }, 66 { 97, 1, 4, 3 }, /* SCIF2_RXI */
87 { SCIF2_BRI_IRQ, INTC_IPRD, 1, 3 }, 67 { 98, 1, 4, 3 }, /* SCIF2_BRI */
88 { SCIF2_TXI_IRQ, INTC_IPRD, 1, 3 }, 68 { 99, 1, 4, 3 }, /* SCIF2_TXI */
89}; 69};
90 70
71static unsigned int ipr_offsets[] = {
72 0xf8080000, /* IPRC */
73 0xf8080002, /* IPRD */
74 0xf8080004, /* IPRE */
75 0xf8080006, /* IPRF */
76 0xf8080008, /* IPRG */
77};
78
79/* given the IPR index return the address of the IPR register */
80unsigned int map_ipridx_to_addr(int idx)
81{
82 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets)))
83 return 0;
84 return ipr_offsets[idx];
85}
86
91void __init init_IRQ_ipr(void) 87void __init init_IRQ_ipr(void)
92{ 88{
93 make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); 89 make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map));
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
index a9ad309c6a33..82d7f991ef6b 100644
--- a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c
@@ -18,8 +18,8 @@
18#include <asm/freq.h> 18#include <asm/freq.h>
19#include <asm/io.h> 19#include <asm/io.h>
20 20
21const static int pll1rate[]={1,2,3,4,6,8}; 21static const int pll1rate[]={1,2,3,4,6,8};
22const static int pfc_divisors[]={1,2,3,4,6,8,12}; 22static const int pfc_divisors[]={1,2,3,4,6,8,12};
23#define ifc_divisors pfc_divisors 23#define ifc_divisors pfc_divisors
24 24
25#if (CONFIG_SH_CLK_MD == 2) 25#if (CONFIG_SH_CLK_MD == 2)
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c
index 87c6c0542089..426f6db01fc6 100644
--- a/arch/sh/kernel/cpu/sh2a/probe.c
+++ b/arch/sh/kernel/cpu/sh2a/probe.c
@@ -17,14 +17,14 @@
17int __init detect_cpu_and_cache_system(void) 17int __init detect_cpu_and_cache_system(void)
18{ 18{
19 /* Just SH7206 for now .. */ 19 /* Just SH7206 for now .. */
20 cpu_data->type = CPU_SH7206; 20 current_cpu_data.type = CPU_SH7206;
21 21
22 cpu_data->dcache.ways = 4; 22 current_cpu_data.dcache.ways = 4;
23 cpu_data->dcache.way_incr = (1 << 11); 23 current_cpu_data.dcache.way_incr = (1 << 11);
24 cpu_data->dcache.sets = 128; 24 current_cpu_data.dcache.sets = 128;
25 cpu_data->dcache.entry_shift = 4; 25 current_cpu_data.dcache.entry_shift = 4;
26 cpu_data->dcache.linesz = L1_CACHE_BYTES; 26 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
27 cpu_data->dcache.flags = 0; 27 current_cpu_data.dcache.flags = 0;
28 28
29 /* 29 /*
30 * The icache is the same as the dcache as far as this setup is 30 * The icache is the same as the dcache as far as this setup is
@@ -32,7 +32,7 @@ int __init detect_cpu_and_cache_system(void)
32 * lacks the U bit that the dcache has, none of this has any bearing 32 * lacks the U bit that the dcache has, none of this has any bearing
33 * on the cache info. 33 * on the cache info.
34 */ 34 */
35 cpu_data->icache = cpu_data->dcache; 35 current_cpu_data.icache = current_cpu_data.dcache;
36 36
37 return 0; 37 return 0;
38} 38}
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index 4b60fcc7d667..4ed9110632bc 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -57,55 +57,52 @@ static int __init sh7206_devices_setup(void)
57} 57}
58__initcall(sh7206_devices_setup); 58__initcall(sh7206_devices_setup);
59 59
60#define INTC_IPR08 0xfffe0c04UL
61#define INTC_IPR09 0xfffe0c06UL
62#define INTC_IPR14 0xfffe0c10UL
63
64#define CMI0_IRQ 140
65
66#define MTU1_TGI1A 164
67
68#define SCIF0_BRI_IRQ 240
69#define SCIF0_ERI_IRQ 241
70#define SCIF0_RXI_IRQ 242
71#define SCIF0_TXI_IRQ 243
72
73#define SCIF1_BRI_IRQ 244
74#define SCIF1_ERI_IRQ 245
75#define SCIF1_RXI_IRQ 246
76#define SCIF1_TXI_IRQ 247
77
78#define SCIF2_BRI_IRQ 248
79#define SCIF2_ERI_IRQ 249
80#define SCIF2_RXI_IRQ 250
81#define SCIF2_TXI_IRQ 251
82
83#define SCIF3_BRI_IRQ 252
84#define SCIF3_ERI_IRQ 253
85#define SCIF3_RXI_IRQ 254
86#define SCIF3_TXI_IRQ 255
87
88static struct ipr_data sh7206_ipr_map[] = { 60static struct ipr_data sh7206_ipr_map[] = {
89 { CMI0_IRQ, INTC_IPR08, 3, 2 }, 61 { 140, 7, 12, 2 }, /* CMI0 */
90 { MTU2_TGI1A, INTC_IPR09, 1, 2 }, 62 { 164, 8, 4, 2 }, /* MTU2_TGI1A */
91 { SCIF0_ERI_IRQ, INTC_IPR14, 3, 3 }, 63 { 240, 13, 12, 3 }, /* SCIF0_BRI */
92 { SCIF0_RXI_IRQ, INTC_IPR14, 3, 3 }, 64 { 241, 13, 12, 3 }, /* SCIF0_ERI */
93 { SCIF0_BRI_IRQ, INTC_IPR14, 3, 3 }, 65 { 242, 13, 12, 3 }, /* SCIF0_RXI */
94 { SCIF0_TXI_IRQ, INTC_IPR14, 3, 3 }, 66 { 243, 13, 12, 3 }, /* SCIF0_TXI */
95 { SCIF1_ERI_IRQ, INTC_IPR14, 2, 3 }, 67 { 244, 13, 8, 3 }, /* SCIF1_BRI */
96 { SCIF1_RXI_IRQ, INTC_IPR14, 2, 3 }, 68 { 245, 13, 8, 3 }, /* SCIF1_ERI */
97 { SCIF1_BRI_IRQ, INTC_IPR14, 2, 3 }, 69 { 246, 13, 8, 3 }, /* SCIF1_RXI */
98 { SCIF1_TXI_IRQ, INTC_IPR14, 2, 3 }, 70 { 247, 13, 8, 3 }, /* SCIF1_TXI */
99 { SCIF2_ERI_IRQ, INTC_IPR14, 1, 3 }, 71 { 248, 13, 4, 3 }, /* SCIF2_BRI */
100 { SCIF2_RXI_IRQ, INTC_IPR14, 1, 3 }, 72 { 249, 13, 4, 3 }, /* SCIF2_ERI */
101 { SCIF2_BRI_IRQ, INTC_IPR14, 1, 3 }, 73 { 250, 13, 4, 3 }, /* SCIF2_RXI */
102 { SCIF2_TXI_IRQ, INTC_IPR14, 1, 3 }, 74 { 251, 13, 4, 3 }, /* SCIF2_TXI */
103 { SCIF3_ERI_IRQ, INTC_IPR14, 0, 3 }, 75 { 252, 13, 0, 3 }, /* SCIF3_BRI */
104 { SCIF3_RXI_IRQ, INTC_IPR14, 0, 3 }, 76 { 253, 13, 0, 3 }, /* SCIF3_ERI */
105 { SCIF3_BRI_IRQ, INTC_IPR14, 0, 3 }, 77 { 254, 13, 0, 3 }, /* SCIF3_RXI */
106 { SCIF3_TXI_IRQ, INTC_IPR14, 0, 3 }, 78 { 255, 13, 0, 3 }, /* SCIF3_TXI */
79};
80
81static unsigned int ipr_offsets[] = {
82 0xfffe0818, /* IPR01 */
83 0xfffe081a, /* IPR02 */
84 0, /* unused */
85 0, /* unused */
86 0xfffe0820, /* IPR05 */
87 0xfffe0c00, /* IPR06 */
88 0xfffe0c02, /* IPR07 */
89 0xfffe0c04, /* IPR08 */
90 0xfffe0c06, /* IPR09 */
91 0xfffe0c08, /* IPR10 */
92 0xfffe0c0a, /* IPR11 */
93 0xfffe0c0c, /* IPR12 */
94 0xfffe0c0e, /* IPR13 */
95 0xfffe0c10, /* IPR14 */
107}; 96};
108 97
98/* given the IPR index return the address of the IPR register */
99unsigned int map_ipridx_to_addr(int idx)
100{
101 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets)))
102 return 0;
103 return ipr_offsets[idx];
104}
105
109void __init init_IRQ_ipr(void) 106void __init init_IRQ_ipr(void)
110{ 107{
111 make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); 108 make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map));
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index 8c0dc2700c69..c19205b0f2c0 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -13,10 +13,8 @@
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/thread_info.h> 15#include <asm/thread_info.h>
16#include <asm/unistd.h>
17#include <asm/cpu/mmu_context.h> 16#include <asm/cpu/mmu_context.h>
18#include <asm/pgtable.h> 17#include <asm/unistd.h>
19#include <asm/page.h>
20 18
21! NOTE: 19! NOTE:
22! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address 20! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address
@@ -138,14 +136,29 @@ ENTRY(tlb_protection_violation_store)
138 136
139call_dpf: 137call_dpf:
140 mov.l 1f, r0 138 mov.l 1f, r0
141 mov.l @r0, r6 ! address 139 mov r5, r8
140 mov.l @r0, r6
141 mov r6, r9
142 mov.l 2f, r0
143 sts pr, r10
144 jsr @r0
145 mov r15, r4
146 !
147 tst r0, r0
148 bf/s 0f
149 lds r10, pr
150 rts
151 nop
1520: sti
142 mov.l 3f, r0 153 mov.l 3f, r0
143 154 mov r9, r6
155 mov r8, r5
144 jmp @r0 156 jmp @r0
145 mov r15, r4 ! regs 157 mov r15, r4
146 158
147 .align 2 159 .align 2
1481: .long MMU_TEA 1601: .long MMU_TEA
1612: .long __do_page_fault
1493: .long do_page_fault 1623: .long do_page_fault
150 163
151 .align 2 164 .align 2
@@ -173,7 +186,7 @@ call_dae:
173 186
174#if defined(CONFIG_SH_STANDARD_BIOS) 187#if defined(CONFIG_SH_STANDARD_BIOS)
175 /* Unwind the stack and jmp to the debug entry */ 188 /* Unwind the stack and jmp to the debug entry */
176debug_kernel_fw: 189ENTRY(sh_bios_handler)
177 mov.l @r15+, r0 190 mov.l @r15+, r0
178 mov.l @r15+, r1 191 mov.l @r15+, r1
179 mov.l @r15+, r2 192 mov.l @r15+, r2
@@ -332,175 +345,9 @@ general_exception:
332! 345!
333! 346!
334 347
335/* This code makes some assumptions to improve performance.
336 * Make sure they are stil true. */
337#if PTRS_PER_PGD != PTRS_PER_PTE
338#error PGD and PTE sizes don't match
339#endif
340
341/* gas doesn't flag impossible values for mov #immediate as an error */
342#if (_PAGE_PRESENT >> 2) > 0x7f
343#error cannot load PAGE_PRESENT as an immediate
344#endif
345#if _PAGE_DIRTY > 0x7f
346#error cannot load PAGE_DIRTY as an immediate
347#endif
348#if (_PAGE_PRESENT << 2) != _PAGE_ACCESSED
349#error cannot derive PAGE_ACCESSED from PAGE_PRESENT
350#endif
351
352#if defined(CONFIG_CPU_SH4)
353#define ldmmupteh(r) mov.l 8f, r
354#else
355#define ldmmupteh(r) mov #MMU_PTEH, r
356#endif
357
358 .balign 1024,0,1024 348 .balign 1024,0,1024
359tlb_miss: 349tlb_miss:
360#ifdef COUNT_EXCEPTIONS 350 mov.l 1f, k2
361 ! Increment the counts
362 mov.l 9f, k1
363 mov.l @k1, k2
364 add #1, k2
365 mov.l k2, @k1
366#endif
367
368 ! k0 scratch
369 ! k1 pgd and pte pointers
370 ! k2 faulting address
371 ! k3 pgd and pte index masks
372 ! k4 shift
373
374 ! Load up the pgd entry (k1)
375
376 ldmmupteh(k0) ! 9 LS (latency=2) MMU_PTEH
377
378 mov.w 4f, k3 ! 8 LS (latency=2) (PTRS_PER_PGD-1) << 2
379 mov #-(PGDIR_SHIFT-2), k4 ! 6 EX
380
381 mov.l @(MMU_TEA-MMU_PTEH,k0), k2 ! 18 LS (latency=2)
382
383 mov.l @(MMU_TTB-MMU_PTEH,k0), k1 ! 18 LS (latency=2)
384
385 mov k2, k0 ! 5 MT (latency=0)
386 shld k4, k0 ! 99 EX
387
388 and k3, k0 ! 78 EX
389
390 mov.l @(k0, k1), k1 ! 21 LS (latency=2)
391 mov #-(PAGE_SHIFT-2), k4 ! 6 EX
392
393 ! Load up the pte entry (k2)
394
395 mov k2, k0 ! 5 MT (latency=0)
396 shld k4, k0 ! 99 EX
397
398 tst k1, k1 ! 86 MT
399
400 bt 20f ! 110 BR
401
402 and k3, k0 ! 78 EX
403 mov.w 5f, k4 ! 8 LS (latency=2) _PAGE_PRESENT
404
405 mov.l @(k0, k1), k2 ! 21 LS (latency=2)
406 add k0, k1 ! 49 EX
407
408#ifdef CONFIG_CPU_HAS_PTEA
409 ! Test the entry for present and _PAGE_ACCESSED
410
411 mov #-28, k3 ! 6 EX
412 mov k2, k0 ! 5 MT (latency=0)
413
414 tst k4, k2 ! 68 MT
415 shld k3, k0 ! 99 EX
416
417 bt 20f ! 110 BR
418
419 ! Set PTEA register
420 ! MMU_PTEA = ((pteval >> 28) & 0xe) | (pteval & 0x1)
421 !
422 ! k0=pte>>28, k1=pte*, k2=pte, k3=<unused>, k4=_PAGE_PRESENT
423
424 and #0xe, k0 ! 79 EX
425
426 mov k0, k3 ! 5 MT (latency=0)
427 mov k2, k0 ! 5 MT (latency=0)
428
429 and #1, k0 ! 79 EX
430
431 or k0, k3 ! 82 EX
432
433 ldmmupteh(k0) ! 9 LS (latency=2)
434 shll2 k4 ! 101 EX _PAGE_ACCESSED
435
436 tst k4, k2 ! 68 MT
437
438 mov.l k3, @(MMU_PTEA-MMU_PTEH,k0) ! 27 LS
439
440 mov.l 7f, k3 ! 9 LS (latency=2) _PAGE_FLAGS_HARDWARE_MASK
441
442 ! k0=MMU_PTEH, k1=pte*, k2=pte, k3=_PAGE_FLAGS_HARDWARE, k4=_PAGE_ACCESSED
443#else
444
445 ! Test the entry for present and _PAGE_ACCESSED
446
447 mov.l 7f, k3 ! 9 LS (latency=2) _PAGE_FLAGS_HARDWARE_MASK
448 tst k4, k2 ! 68 MT
449
450 shll2 k4 ! 101 EX _PAGE_ACCESSED
451 ldmmupteh(k0) ! 9 LS (latency=2)
452
453 bt 20f ! 110 BR
454 tst k4, k2 ! 68 MT
455
456 ! k0=MMU_PTEH, k1=pte*, k2=pte, k3=_PAGE_FLAGS_HARDWARE, k4=_PAGE_ACCESSED
457
458#endif
459
460 ! Set up the entry
461
462 and k2, k3 ! 78 EX
463 bt/s 10f ! 108 BR
464
465 mov.l k3, @(MMU_PTEL-MMU_PTEH,k0) ! 27 LS
466
467 ldtlb ! 128 CO
468
469 ! At least one instruction between ldtlb and rte
470 nop ! 119 NOP
471
472 rte ! 126 CO
473
474 nop ! 119 NOP
475
476
47710: or k4, k2 ! 82 EX
478
479 ldtlb ! 128 CO
480
481 ! At least one instruction between ldtlb and rte
482 mov.l k2, @k1 ! 27 LS
483
484 rte ! 126 CO
485
486 ! Note we cannot execute mov here, because it is executed after
487 ! restoring SSR, so would be executed in user space.
488 nop ! 119 NOP
489
490
491 .align 5
492 ! Once cache line if possible...
4931: .long swapper_pg_dir
4944: .short (PTRS_PER_PGD-1) << 2
4955: .short _PAGE_PRESENT
4967: .long _PAGE_FLAGS_HARDWARE_MASK
4978: .long MMU_PTEH
498#ifdef COUNT_EXCEPTIONS
4999: .long exception_count_miss
500#endif
501
502 ! Either pgd or pte not present
50320: mov.l 1f, k2
504 mov.l 4f, k3 351 mov.l 4f, k3
505 bra handle_exception 352 bra handle_exception
506 mov.l @k2, k2 353 mov.l @k2, k2
@@ -651,15 +498,6 @@ skip_save:
651 bf interrupt_exception 498 bf interrupt_exception
652 shlr2 r8 499 shlr2 r8
653 shlr r8 500 shlr r8
654
655#ifdef COUNT_EXCEPTIONS
656 mov.l 5f, r9
657 add r8, r9
658 mov.l @r9, r10
659 add #1, r10
660 mov.l r10, @r9
661#endif
662
663 mov.l 4f, r9 501 mov.l 4f, r9
664 add r8, r9 502 add r8, r9
665 mov.l @r9, r9 503 mov.l @r9, r9
@@ -673,9 +511,6 @@ skip_save:
6732: .long 0x000080f0 ! FD=1, IMASK=15 5112: .long 0x000080f0 ! FD=1, IMASK=15
6743: .long 0xcfffffff ! RB=0, BL=0 5123: .long 0xcfffffff ! RB=0, BL=0
6754: .long exception_handling_table 5134: .long exception_handling_table
676#ifdef COUNT_EXCEPTIONS
6775: .long exception_count_table
678#endif
679 514
680interrupt_exception: 515interrupt_exception:
681 mov.l 1f, r9 516 mov.l 1f, r9
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c
index e67098836290..821b0ab7b528 100644
--- a/arch/sh/kernel/cpu/sh3/probe.c
+++ b/arch/sh/kernel/cpu/sh3/probe.c
@@ -50,41 +50,41 @@ int __init detect_cpu_and_cache_system(void)
50 50
51 back_to_P1(); 51 back_to_P1();
52 52
53 cpu_data->dcache.ways = 4; 53 current_cpu_data.dcache.ways = 4;
54 cpu_data->dcache.entry_shift = 4; 54 current_cpu_data.dcache.entry_shift = 4;
55 cpu_data->dcache.linesz = L1_CACHE_BYTES; 55 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
56 cpu_data->dcache.flags = 0; 56 current_cpu_data.dcache.flags = 0;
57 57
58 /* 58 /*
59 * 7709A/7729 has 16K cache (256-entry), while 7702 has only 59 * 7709A/7729 has 16K cache (256-entry), while 7702 has only
60 * 2K(direct) 7702 is not supported (yet) 60 * 2K(direct) 7702 is not supported (yet)
61 */ 61 */
62 if (data0 == data1 && data2 == data3) { /* Shadow */ 62 if (data0 == data1 && data2 == data3) { /* Shadow */
63 cpu_data->dcache.way_incr = (1 << 11); 63 current_cpu_data.dcache.way_incr = (1 << 11);
64 cpu_data->dcache.entry_mask = 0x7f0; 64 current_cpu_data.dcache.entry_mask = 0x7f0;
65 cpu_data->dcache.sets = 128; 65 current_cpu_data.dcache.sets = 128;
66 cpu_data->type = CPU_SH7708; 66 current_cpu_data.type = CPU_SH7708;
67 67
68 cpu_data->flags |= CPU_HAS_MMU_PAGE_ASSOC; 68 current_cpu_data.flags |= CPU_HAS_MMU_PAGE_ASSOC;
69 } else { /* 7709A or 7729 */ 69 } else { /* 7709A or 7729 */
70 cpu_data->dcache.way_incr = (1 << 12); 70 current_cpu_data.dcache.way_incr = (1 << 12);
71 cpu_data->dcache.entry_mask = 0xff0; 71 current_cpu_data.dcache.entry_mask = 0xff0;
72 cpu_data->dcache.sets = 256; 72 current_cpu_data.dcache.sets = 256;
73 cpu_data->type = CPU_SH7729; 73 current_cpu_data.type = CPU_SH7729;
74 74
75#if defined(CONFIG_CPU_SUBTYPE_SH7706) 75#if defined(CONFIG_CPU_SUBTYPE_SH7706)
76 cpu_data->type = CPU_SH7706; 76 current_cpu_data.type = CPU_SH7706;
77#endif 77#endif
78#if defined(CONFIG_CPU_SUBTYPE_SH7710) 78#if defined(CONFIG_CPU_SUBTYPE_SH7710)
79 cpu_data->type = CPU_SH7710; 79 current_cpu_data.type = CPU_SH7710;
80#endif 80#endif
81#if defined(CONFIG_CPU_SUBTYPE_SH7705) 81#if defined(CONFIG_CPU_SUBTYPE_SH7705)
82 cpu_data->type = CPU_SH7705; 82 current_cpu_data.type = CPU_SH7705;
83 83
84#if defined(CONFIG_SH7705_CACHE_32KB) 84#if defined(CONFIG_SH7705_CACHE_32KB)
85 cpu_data->dcache.way_incr = (1 << 13); 85 current_cpu_data.dcache.way_incr = (1 << 13);
86 cpu_data->dcache.entry_mask = 0x1ff0; 86 current_cpu_data.dcache.entry_mask = 0x1ff0;
87 cpu_data->dcache.sets = 512; 87 current_cpu_data.dcache.sets = 512;
88 ctrl_outl(CCR_CACHE_32KB, CCR3); 88 ctrl_outl(CCR_CACHE_32KB, CCR3);
89#else 89#else
90 ctrl_outl(CCR_CACHE_16KB, CCR3); 90 ctrl_outl(CCR_CACHE_16KB, CCR3);
@@ -95,8 +95,8 @@ int __init detect_cpu_and_cache_system(void)
95 /* 95 /*
96 * SH-3 doesn't have separate caches 96 * SH-3 doesn't have separate caches
97 */ 97 */
98 cpu_data->dcache.flags |= SH_CACHE_COMBINED; 98 current_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
99 cpu_data->icache = cpu_data->dcache; 99 current_cpu_data.icache = current_cpu_data.dcache;
100 100
101 return 0; 101 return 0;
102} 102}
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7709.c b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
index ff43ef2a1f0c..dc9b211cf87f 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7709.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7709.c
@@ -51,3 +51,24 @@ static int __init sh7709_devices_setup(void)
51 ARRAY_SIZE(sh7709_devices)); 51 ARRAY_SIZE(sh7709_devices));
52} 52}
53__initcall(sh7709_devices_setup); 53__initcall(sh7709_devices_setup);
54
55#define IPRx(A,N) .addr=A, .shift=0*N*-1
56#define IPRA(N) IPRx(0xfffffee2UL,N)
57#define IPRB(N) IPRx(0xfffffee4UL,N)
58#define IPRE(N) IPRx(0xa400001aUL,N)
59
60static struct ipr_data sh7709_ipr_map[] = {
61 [16] = { IPRA(15-12), 2 }, /* TMU TUNI0 */
62 [17] = { IPRA(11-8), 4 }, /* TMU TUNI1 */
63 [22] = { IPRA(3-0), 2 }, /* RTC CUI */
64 [23 ... 26] = { IPRB(7-4), 3 }, /* SCI */
65 [27] = { IPRB(15-12), 2 }, /* WDT ITI */
66 [48 ... 51] = { IPRE(15-12), 7 }, /* DMA */
67 [52 ... 55] = { IPRE(11-8), 3 }, /* IRDA */
68 [56 ... 59] = { IPRE(7-4), 3 }, /* SCIF */
69};
70
71void __init init_IRQ_ipr()
72{
73 make_ipr_irq(sh7709_ipr_map, ARRAY_SIZE(sh7709_ipr_map));
74}
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 9031a22a2ce7..9d28c88d2f9d 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -10,11 +10,10 @@
10 * License. See the file "COPYING" in the main directory of this archive 10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details. 11 * for more details.
12 */ 12 */
13
14#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/io.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16#include <asm/cache.h> 16#include <asm/cache.h>
17#include <asm/io.h>
18 17
19int __init detect_cpu_and_cache_system(void) 18int __init detect_cpu_and_cache_system(void)
20{ 19{
@@ -36,20 +35,20 @@ int __init detect_cpu_and_cache_system(void)
36 /* 35 /*
37 * Setup some sane SH-4 defaults for the icache 36 * Setup some sane SH-4 defaults for the icache
38 */ 37 */
39 cpu_data->icache.way_incr = (1 << 13); 38 current_cpu_data.icache.way_incr = (1 << 13);
40 cpu_data->icache.entry_shift = 5; 39 current_cpu_data.icache.entry_shift = 5;
41 cpu_data->icache.sets = 256; 40 current_cpu_data.icache.sets = 256;
42 cpu_data->icache.ways = 1; 41 current_cpu_data.icache.ways = 1;
43 cpu_data->icache.linesz = L1_CACHE_BYTES; 42 current_cpu_data.icache.linesz = L1_CACHE_BYTES;
44 43
45 /* 44 /*
46 * And again for the dcache .. 45 * And again for the dcache ..
47 */ 46 */
48 cpu_data->dcache.way_incr = (1 << 14); 47 current_cpu_data.dcache.way_incr = (1 << 14);
49 cpu_data->dcache.entry_shift = 5; 48 current_cpu_data.dcache.entry_shift = 5;
50 cpu_data->dcache.sets = 512; 49 current_cpu_data.dcache.sets = 512;
51 cpu_data->dcache.ways = 1; 50 current_cpu_data.dcache.ways = 1;
52 cpu_data->dcache.linesz = L1_CACHE_BYTES; 51 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
53 52
54 /* 53 /*
55 * Setup some generic flags we can probe 54 * Setup some generic flags we can probe
@@ -57,16 +56,16 @@ int __init detect_cpu_and_cache_system(void)
57 */ 56 */
58 if (((pvr >> 16) & 0xff) == 0x10) { 57 if (((pvr >> 16) & 0xff) == 0x10) {
59 if ((cvr & 0x02000000) == 0) 58 if ((cvr & 0x02000000) == 0)
60 cpu_data->flags |= CPU_HAS_L2_CACHE; 59 current_cpu_data.flags |= CPU_HAS_L2_CACHE;
61 if ((cvr & 0x10000000) == 0) 60 if ((cvr & 0x10000000) == 0)
62 cpu_data->flags |= CPU_HAS_DSP; 61 current_cpu_data.flags |= CPU_HAS_DSP;
63 62
64 cpu_data->flags |= CPU_HAS_LLSC; 63 current_cpu_data.flags |= CPU_HAS_LLSC;
65 } 64 }
66 65
67 /* FPU detection works for everyone */ 66 /* FPU detection works for everyone */
68 if ((cvr & 0x20000000) == 1) 67 if ((cvr & 0x20000000) == 1)
69 cpu_data->flags |= CPU_HAS_FPU; 68 current_cpu_data.flags |= CPU_HAS_FPU;
70 69
71 /* Mask off the upper chip ID */ 70 /* Mask off the upper chip ID */
72 pvr &= 0xffff; 71 pvr &= 0xffff;
@@ -77,151 +76,151 @@ int __init detect_cpu_and_cache_system(void)
77 */ 76 */
78 switch (pvr) { 77 switch (pvr) {
79 case 0x205: 78 case 0x205:
80 cpu_data->type = CPU_SH7750; 79 current_cpu_data.type = CPU_SH7750;
81 cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | 80 current_cpu_data.flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU |
82 CPU_HAS_PERF_COUNTER; 81 CPU_HAS_PERF_COUNTER;
83 break; 82 break;
84 case 0x206: 83 case 0x206:
85 cpu_data->type = CPU_SH7750S; 84 current_cpu_data.type = CPU_SH7750S;
86 cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | 85 current_cpu_data.flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU |
87 CPU_HAS_PERF_COUNTER; 86 CPU_HAS_PERF_COUNTER;
88 break; 87 break;
89 case 0x1100: 88 case 0x1100:
90 cpu_data->type = CPU_SH7751; 89 current_cpu_data.type = CPU_SH7751;
91 cpu_data->flags |= CPU_HAS_FPU; 90 current_cpu_data.flags |= CPU_HAS_FPU;
92 break; 91 break;
93 case 0x2000: 92 case 0x2000:
94 cpu_data->type = CPU_SH73180; 93 current_cpu_data.type = CPU_SH73180;
95 cpu_data->icache.ways = 4; 94 current_cpu_data.icache.ways = 4;
96 cpu_data->dcache.ways = 4; 95 current_cpu_data.dcache.ways = 4;
97 cpu_data->flags |= CPU_HAS_LLSC; 96 current_cpu_data.flags |= CPU_HAS_LLSC;
98 break; 97 break;
99 case 0x2001: 98 case 0x2001:
100 case 0x2004: 99 case 0x2004:
101 cpu_data->type = CPU_SH7770; 100 current_cpu_data.type = CPU_SH7770;
102 cpu_data->icache.ways = 4; 101 current_cpu_data.icache.ways = 4;
103 cpu_data->dcache.ways = 4; 102 current_cpu_data.dcache.ways = 4;
104 103
105 cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_LLSC; 104 current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_LLSC;
106 break; 105 break;
107 case 0x2006: 106 case 0x2006:
108 case 0x200A: 107 case 0x200A:
109 if (prr == 0x61) 108 if (prr == 0x61)
110 cpu_data->type = CPU_SH7781; 109 current_cpu_data.type = CPU_SH7781;
111 else 110 else
112 cpu_data->type = CPU_SH7780; 111 current_cpu_data.type = CPU_SH7780;
113 112
114 cpu_data->icache.ways = 4; 113 current_cpu_data.icache.ways = 4;
115 cpu_data->dcache.ways = 4; 114 current_cpu_data.dcache.ways = 4;
116 115
117 cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER | 116 current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
118 CPU_HAS_LLSC; 117 CPU_HAS_LLSC;
119 break; 118 break;
120 case 0x3000: 119 case 0x3000:
121 case 0x3003: 120 case 0x3003:
122 case 0x3009: 121 case 0x3009:
123 cpu_data->type = CPU_SH7343; 122 current_cpu_data.type = CPU_SH7343;
124 cpu_data->icache.ways = 4; 123 current_cpu_data.icache.ways = 4;
125 cpu_data->dcache.ways = 4; 124 current_cpu_data.dcache.ways = 4;
126 cpu_data->flags |= CPU_HAS_LLSC; 125 current_cpu_data.flags |= CPU_HAS_LLSC;
127 break; 126 break;
128 case 0x3008: 127 case 0x3008:
129 if (prr == 0xa0) { 128 if (prr == 0xa0) {
130 cpu_data->type = CPU_SH7722; 129 current_cpu_data.type = CPU_SH7722;
131 cpu_data->icache.ways = 4; 130 current_cpu_data.icache.ways = 4;
132 cpu_data->dcache.ways = 4; 131 current_cpu_data.dcache.ways = 4;
133 cpu_data->flags |= CPU_HAS_LLSC; 132 current_cpu_data.flags |= CPU_HAS_LLSC;
134 } 133 }
135 break; 134 break;
136 case 0x8000: 135 case 0x8000:
137 cpu_data->type = CPU_ST40RA; 136 current_cpu_data.type = CPU_ST40RA;
138 cpu_data->flags |= CPU_HAS_FPU; 137 current_cpu_data.flags |= CPU_HAS_FPU;
139 break; 138 break;
140 case 0x8100: 139 case 0x8100:
141 cpu_data->type = CPU_ST40GX1; 140 current_cpu_data.type = CPU_ST40GX1;
142 cpu_data->flags |= CPU_HAS_FPU; 141 current_cpu_data.flags |= CPU_HAS_FPU;
143 break; 142 break;
144 case 0x700: 143 case 0x700:
145 cpu_data->type = CPU_SH4_501; 144 current_cpu_data.type = CPU_SH4_501;
146 cpu_data->icache.ways = 2; 145 current_cpu_data.icache.ways = 2;
147 cpu_data->dcache.ways = 2; 146 current_cpu_data.dcache.ways = 2;
148 break; 147 break;
149 case 0x600: 148 case 0x600:
150 cpu_data->type = CPU_SH4_202; 149 current_cpu_data.type = CPU_SH4_202;
151 cpu_data->icache.ways = 2; 150 current_cpu_data.icache.ways = 2;
152 cpu_data->dcache.ways = 2; 151 current_cpu_data.dcache.ways = 2;
153 cpu_data->flags |= CPU_HAS_FPU; 152 current_cpu_data.flags |= CPU_HAS_FPU;
154 break; 153 break;
155 case 0x500 ... 0x501: 154 case 0x500 ... 0x501:
156 switch (prr) { 155 switch (prr) {
157 case 0x10: 156 case 0x10:
158 cpu_data->type = CPU_SH7750R; 157 current_cpu_data.type = CPU_SH7750R;
159 break; 158 break;
160 case 0x11: 159 case 0x11:
161 cpu_data->type = CPU_SH7751R; 160 current_cpu_data.type = CPU_SH7751R;
162 break; 161 break;
163 case 0x50 ... 0x5f: 162 case 0x50 ... 0x5f:
164 cpu_data->type = CPU_SH7760; 163 current_cpu_data.type = CPU_SH7760;
165 break; 164 break;
166 } 165 }
167 166
168 cpu_data->icache.ways = 2; 167 current_cpu_data.icache.ways = 2;
169 cpu_data->dcache.ways = 2; 168 current_cpu_data.dcache.ways = 2;
170 169
171 cpu_data->flags |= CPU_HAS_FPU; 170 current_cpu_data.flags |= CPU_HAS_FPU;
172 171
173 break; 172 break;
174 default: 173 default:
175 cpu_data->type = CPU_SH_NONE; 174 current_cpu_data.type = CPU_SH_NONE;
176 break; 175 break;
177 } 176 }
178 177
179#ifdef CONFIG_SH_DIRECT_MAPPED 178#ifdef CONFIG_SH_DIRECT_MAPPED
180 cpu_data->icache.ways = 1; 179 current_cpu_data.icache.ways = 1;
181 cpu_data->dcache.ways = 1; 180 current_cpu_data.dcache.ways = 1;
182#endif 181#endif
183 182
184#ifdef CONFIG_CPU_HAS_PTEA 183#ifdef CONFIG_CPU_HAS_PTEA
185 cpu_data->flags |= CPU_HAS_PTEA; 184 current_cpu_data.flags |= CPU_HAS_PTEA;
186#endif 185#endif
187 186
188 /* 187 /*
189 * On anything that's not a direct-mapped cache, look to the CVR 188 * On anything that's not a direct-mapped cache, look to the CVR
190 * for I/D-cache specifics. 189 * for I/D-cache specifics.
191 */ 190 */
192 if (cpu_data->icache.ways > 1) { 191 if (current_cpu_data.icache.ways > 1) {
193 size = sizes[(cvr >> 20) & 0xf]; 192 size = sizes[(cvr >> 20) & 0xf];
194 cpu_data->icache.way_incr = (size >> 1); 193 current_cpu_data.icache.way_incr = (size >> 1);
195 cpu_data->icache.sets = (size >> 6); 194 current_cpu_data.icache.sets = (size >> 6);
196 195
197 } 196 }
198 197
199 /* Setup the rest of the I-cache info */ 198 /* Setup the rest of the I-cache info */
200 cpu_data->icache.entry_mask = cpu_data->icache.way_incr - 199 current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
201 cpu_data->icache.linesz; 200 current_cpu_data.icache.linesz;
202 201
203 cpu_data->icache.way_size = cpu_data->icache.sets * 202 current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
204 cpu_data->icache.linesz; 203 current_cpu_data.icache.linesz;
205 204
206 /* And the rest of the D-cache */ 205 /* And the rest of the D-cache */
207 if (cpu_data->dcache.ways > 1) { 206 if (current_cpu_data.dcache.ways > 1) {
208 size = sizes[(cvr >> 16) & 0xf]; 207 size = sizes[(cvr >> 16) & 0xf];
209 cpu_data->dcache.way_incr = (size >> 1); 208 current_cpu_data.dcache.way_incr = (size >> 1);
210 cpu_data->dcache.sets = (size >> 6); 209 current_cpu_data.dcache.sets = (size >> 6);
211 } 210 }
212 211
213 cpu_data->dcache.entry_mask = cpu_data->dcache.way_incr - 212 current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
214 cpu_data->dcache.linesz; 213 current_cpu_data.dcache.linesz;
215 214
216 cpu_data->dcache.way_size = cpu_data->dcache.sets * 215 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
217 cpu_data->dcache.linesz; 216 current_cpu_data.dcache.linesz;
218 217
219 /* 218 /*
220 * Setup the L2 cache desc 219 * Setup the L2 cache desc
221 * 220 *
222 * SH-4A's have an optional PIPT L2. 221 * SH-4A's have an optional PIPT L2.
223 */ 222 */
224 if (cpu_data->flags & CPU_HAS_L2_CACHE) { 223 if (current_cpu_data.flags & CPU_HAS_L2_CACHE) {
225 /* 224 /*
226 * Size calculation is much more sensible 225 * Size calculation is much more sensible
227 * than it is for the L1. 226 * than it is for the L1.
@@ -232,16 +231,22 @@ int __init detect_cpu_and_cache_system(void)
232 231
233 BUG_ON(!size); 232 BUG_ON(!size);
234 233
235 cpu_data->scache.way_incr = (1 << 16); 234 current_cpu_data.scache.way_incr = (1 << 16);
236 cpu_data->scache.entry_shift = 5; 235 current_cpu_data.scache.entry_shift = 5;
237 cpu_data->scache.ways = 4; 236 current_cpu_data.scache.ways = 4;
238 cpu_data->scache.linesz = L1_CACHE_BYTES; 237 current_cpu_data.scache.linesz = L1_CACHE_BYTES;
239 cpu_data->scache.entry_mask = 238
240 (cpu_data->scache.way_incr - cpu_data->scache.linesz); 239 current_cpu_data.scache.entry_mask =
241 cpu_data->scache.sets = size / 240 (current_cpu_data.scache.way_incr -
242 (cpu_data->scache.linesz * cpu_data->scache.ways); 241 current_cpu_data.scache.linesz);
243 cpu_data->scache.way_size = 242
244 (cpu_data->scache.sets * cpu_data->scache.linesz); 243 current_cpu_data.scache.sets = size /
244 (current_cpu_data.scache.linesz *
245 current_cpu_data.scache.ways);
246
247 current_cpu_data.scache.way_size =
248 (current_cpu_data.scache.sets *
249 current_cpu_data.scache.linesz);
245 } 250 }
246 251
247 return 0; 252 return 0;
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index cbac27634c0b..6f8f458912c7 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -46,11 +46,13 @@ static struct platform_device rtc_device = {
46 46
47static struct plat_sci_port sci_platform_data[] = { 47static struct plat_sci_port sci_platform_data[] = {
48 { 48 {
49#ifndef CONFIG_SH_RTS7751R2D
49 .mapbase = 0xffe00000, 50 .mapbase = 0xffe00000,
50 .flags = UPF_BOOT_AUTOCONF, 51 .flags = UPF_BOOT_AUTOCONF,
51 .type = PORT_SCI, 52 .type = PORT_SCI,
52 .irqs = { 23, 24, 25, 0 }, 53 .irqs = { 23, 24, 25, 0 },
53 }, { 54 }, {
55#endif
54 .mapbase = 0xffe80000, 56 .mapbase = 0xffe80000,
55 .flags = UPF_BOOT_AUTOCONF, 57 .flags = UPF_BOOT_AUTOCONF,
56 .type = PORT_SCIF, 58 .type = PORT_SCIF,
@@ -101,7 +103,7 @@ static struct ipr_data sh7750_ipr_map[] = {
101 { 35, 2, 8, 7 }, /* DMAC DMTE1 */ 103 { 35, 2, 8, 7 }, /* DMAC DMTE1 */
102 { 36, 2, 8, 7 }, /* DMAC DMTE2 */ 104 { 36, 2, 8, 7 }, /* DMAC DMTE2 */
103 { 37, 2, 8, 7 }, /* DMAC DMTE3 */ 105 { 37, 2, 8, 7 }, /* DMAC DMTE3 */
104 { 28, 2, 8, 7 }, /* DMAC DMAE */ 106 { 38, 2, 8, 7 }, /* DMAC DMAE */
105}; 107};
106 108
107static struct ipr_data sh7751_ipr_map[] = { 109static struct ipr_data sh7751_ipr_map[] = {
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 07e5377bf550..b7c702821e6f 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -52,17 +52,11 @@ static int __init sh7760_devices_setup(void)
52} 52}
53__initcall(sh7760_devices_setup); 53__initcall(sh7760_devices_setup);
54 54
55/*
56 * SH7760 INTC2-Style interrupts, vectors IRQ48-111 INTEVT 0x800-0xFE0
57 */
58static struct intc2_data intc2_irq_table[] = { 55static struct intc2_data intc2_irq_table[] = {
59 /* INTPRIO0 | INTMSK0 */
60 {48, 0, 28, 0, 31, 3}, /* IRQ 4 */ 56 {48, 0, 28, 0, 31, 3}, /* IRQ 4 */
61 {49, 0, 24, 0, 30, 3}, /* IRQ 3 */ 57 {49, 0, 24, 0, 30, 3}, /* IRQ 3 */
62 {50, 0, 20, 0, 29, 3}, /* IRQ 2 */ 58 {50, 0, 20, 0, 29, 3}, /* IRQ 2 */
63 {51, 0, 16, 0, 28, 3}, /* IRQ 1 */ 59 {51, 0, 16, 0, 28, 3}, /* IRQ 1 */
64 /* 52-55 (INTEVT 0x880-0x8E0) unused/reserved */
65 /* INTPRIO4 | INTMSK0 */
66 {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */ 60 {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */
67 {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */ 61 {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */
68 {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */ 62 {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */
@@ -71,18 +65,15 @@ static struct intc2_data intc2_irq_table[] = {
71 {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */ 65 {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */
72 {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */ 66 {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */
73 {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */ 67 {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */
74 /* INTPRIO8 | INTMSK0 */
75 {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */ 68 {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */
76 {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */ 69 {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */
77 {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */ 70 {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */
78 {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */ 71 {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */
79 {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */ 72 {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */
80 {65, 8, 24, 0, 16, 3}, /* LCDC */ 73 {65, 8, 24, 0, 16, 3}, /* LCDC */
81 /* 66, 67 unused */
82 {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */ 74 {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */
83 {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */ 75 {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */
84 {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */ 76 {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */
85 /* 71 unused */
86 {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */ 77 {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */
87 {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */ 78 {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */
88 {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */ 79 {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */
@@ -91,26 +82,71 @@ static struct intc2_data intc2_irq_table[] = {
91 {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */ 82 {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */
92 {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */ 83 {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */
93 {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */ 84 {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */
94 /* | INTMSK4 */
95 {80, 8, 4, 4, 23, 3}, /* SIM_ERI */ 85 {80, 8, 4, 4, 23, 3}, /* SIM_ERI */
96 {81, 8, 4, 4, 22, 3}, /* SIM_RXI */ 86 {81, 8, 4, 4, 22, 3}, /* SIM_RXI */
97 {82, 8, 4, 4, 21, 3}, /* SIM_TXI */ 87 {82, 8, 4, 4, 21, 3}, /* SIM_TXI */
98 {83, 8, 4, 4, 20, 3}, /* SIM_TEI */ 88 {83, 8, 4, 4, 20, 3}, /* SIM_TEI */
99 {84, 8, 0, 4, 19, 3}, /* HSPII */ 89 {84, 8, 0, 4, 19, 3}, /* HSPII */
100 /* INTPRIOC | INTMSK4 */
101 /* 85-87 unused/reserved */
102 {88, 12, 20, 4, 18, 3}, /* MMCI0 */ 90 {88, 12, 20, 4, 18, 3}, /* MMCI0 */
103 {89, 12, 20, 4, 17, 3}, /* MMCI1 */ 91 {89, 12, 20, 4, 17, 3}, /* MMCI1 */
104 {90, 12, 20, 4, 16, 3}, /* MMCI2 */ 92 {90, 12, 20, 4, 16, 3}, /* MMCI2 */
105 {91, 12, 20, 4, 15, 3}, /* MMCI3 */ 93 {91, 12, 20, 4, 15, 3}, /* MMCI3 */
106 {92, 12, 12, 4, 6, 3}, /* MFI (unsure, bug? in my 7760 manual*/ 94 {92, 12, 12, 4, 6, 3}, /* MFI */
107 /* 93-107 reserved/undocumented */
108 {108,12, 4, 4, 1, 3}, /* ADC */ 95 {108,12, 4, 4, 1, 3}, /* ADC */
109 {109,12, 0, 4, 0, 3}, /* CMTI */ 96 {109,12, 0, 4, 0, 3}, /* CMTI */
110 /* 110-111 reserved/unused */
111}; 97};
112 98
99static struct ipr_data sh7760_ipr_map[] = {
100 /* IRQ, IPR-idx, shift, priority */
101 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
102 { 17, 0, 8, 2 }, /* TMU1 TUNI */
103 { 18, 0, 4, 2 }, /* TMU2 TUNI */
104 { 19, 0, 4, 2 }, /* TMU2 TIPCI */
105 { 27, 1, 12, 2 }, /* WDT ITI */
106 { 28, 1, 8, 2 }, /* REF RCMI */
107 { 29, 1, 8, 2 }, /* REF ROVI */
108 { 32, 2, 0, 7 }, /* HUDI */
109 { 33, 2, 12, 7 }, /* GPIOI */
110 { 34, 2, 8, 7 }, /* DMAC DMTE0 */
111 { 35, 2, 8, 7 }, /* DMAC DMTE1 */
112 { 36, 2, 8, 7 }, /* DMAC DMTE2 */
113 { 37, 2, 8, 7 }, /* DMAC DMTE3 */
114 { 38, 2, 8, 7 }, /* DMAC DMAE */
115 { 44, 2, 8, 7 }, /* DMAC DMTE4 */
116 { 45, 2, 8, 7 }, /* DMAC DMTE5 */
117 { 46, 2, 8, 7 }, /* DMAC DMTE6 */
118 { 47, 2, 8, 7 }, /* DMAC DMTE7 */
119/* these here are only valid if INTC_ICR bit 7 is set to 1!
120 * XXX: maybe CONFIG_SH_IRLMODE symbol? SH7751 could use it too */
121#if 0
122 { 2, 3, 12, 3 }, /* IRL0 */
123 { 5, 3, 8, 3 }, /* IRL1 */
124 { 8, 3, 4, 3 }, /* IRL2 */
125 { 11, 3, 0, 3 }, /* IRL3 */
126#endif
127};
128
129static unsigned long ipr_offsets[] = {
130 0xffd00004UL, /* 0: IPRA */
131 0xffd00008UL, /* 1: IPRB */
132 0xffd0000cUL, /* 2: IPRC */
133 0xffd00010UL, /* 3: IPRD */
134};
135
136/* given the IPR index return the address of the IPR register */
137unsigned int map_ipridx_to_addr(int idx)
138{
139 if (idx >= ARRAY_SIZE(ipr_offsets))
140 return 0;
141 return ipr_offsets[idx];
142}
143
113void __init init_IRQ_intc2(void) 144void __init init_IRQ_intc2(void)
114{ 145{
115 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); 146 make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table));
116} 147}
148
149void __init init_IRQ_ipr(void)
150{
151 make_ipr_irq(sh7760_ipr_map, ARRAY_SIZE(sh7760_ipr_map));
152}
diff --git a/arch/sh/kernel/debugtraps.S b/arch/sh/kernel/debugtraps.S
new file mode 100644
index 000000000000..13b66746410a
--- /dev/null
+++ b/arch/sh/kernel/debugtraps.S
@@ -0,0 +1,41 @@
1/*
2 * arch/sh/kernel/debugtraps.S
3 *
4 * Debug trap jump tables for SuperH
5 *
6 * Copyright (C) 2006 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/sys.h>
13#include <linux/linkage.h>
14
15#if !defined(CONFIG_SH_KGDB)
16#define kgdb_handle_exception debug_trap_handler
17#endif
18
19#if !defined(CONFIG_SH_STANDARD_BIOS)
20#define sh_bios_handler debug_trap_handler
21#endif
22
23 .data
24
25ENTRY(debug_trap_table)
26 .long debug_trap_handler /* 0x30 */
27 .long debug_trap_handler /* 0x31 */
28 .long debug_trap_handler /* 0x32 */
29 .long debug_trap_handler /* 0x33 */
30 .long debug_trap_handler /* 0x34 */
31 .long debug_trap_handler /* 0x35 */
32 .long debug_trap_handler /* 0x36 */
33 .long debug_trap_handler /* 0x37 */
34 .long debug_trap_handler /* 0x38 */
35 .long debug_trap_handler /* 0x39 */
36 .long debug_trap_handler /* 0x3a */
37 .long debug_trap_handler /* 0x3b */
38 .long kgdb_handle_exception /* 0x3c */
39 .long debug_trap_handler /* 0x3d */
40 .long bug_trap_handler /* 0x3e */
41 .long sh_bios_handler /* 0x3f */
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c
index 560b91cdd15c..9048c0326d87 100644
--- a/arch/sh/kernel/early_printk.c
+++ b/arch/sh/kernel/early_printk.c
@@ -106,12 +106,32 @@ static struct console scif_console = {
106}; 106};
107 107
108#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) 108#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS)
109#define DEFAULT_BAUD 115200
109/* 110/*
110 * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4 111 * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4
111 * devices that aren't using sh-ipl+g. 112 * devices that aren't using sh-ipl+g.
112 */ 113 */
113static void scif_sercon_init(int baud) 114static void scif_sercon_init(char *s)
114{ 115{
116 unsigned baud = DEFAULT_BAUD;
117 char *e;
118
119 if (*s == ',')
120 ++s;
121
122 if (*s) {
123 /* ignore ioport/device name */
124 s += strcspn(s, ",");
125 if (*s == ',')
126 s++;
127 }
128
129 if (*s) {
130 baud = simple_strtoul(s, &e, 0);
131 if (baud == 0 || s == e)
132 baud = DEFAULT_BAUD;
133 }
134
115 ctrl_outw(0, scif_port.mapbase + 8); 135 ctrl_outw(0, scif_port.mapbase + 8);
116 ctrl_outw(0, scif_port.mapbase); 136 ctrl_outw(0, scif_port.mapbase);
117 137
@@ -167,7 +187,7 @@ int __init setup_early_printk(char *buf)
167 early_console = &scif_console; 187 early_console = &scif_console;
168 188
169#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) 189#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS)
170 scif_sercon_init(115200); 190 scif_sercon_init(buf + 6);
171#endif 191#endif
172 } 192 }
173#endif 193#endif
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index fc279aeb73ab..ab4ebb856c2a 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -54,79 +54,24 @@
54# define resume_kernel __restore_all 54# define resume_kernel __restore_all
55#endif 55#endif
56 56
57#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB)
58! Handle kernel debug if either kgdb (SW) or gdb-stub (FW) is present.
59! If both are configured, handle the debug traps (breakpoints) in SW,
60! but still allow BIOS traps to FW.
61
62 .align 2
63debug_kernel:
64#if defined(CONFIG_SH_STANDARD_BIOS) && defined(CONFIG_SH_KGDB)
65 /* Force BIOS call to FW (debug_trap put TRA in r8) */
66 mov r8,r0
67 shlr2 r0
68 cmp/eq #0x3f,r0
69 bt debug_kernel_fw
70#endif /* CONFIG_SH_STANDARD_BIOS && CONFIG_SH_KGDB */
71
72debug_enter:
73#if defined(CONFIG_SH_KGDB)
74 /* Jump to kgdb, pass stacked regs as arg */
75debug_kernel_sw:
76 mov.l 3f, r0
77 jmp @r0
78 mov r15, r4
79 .align 2
803: .long kgdb_handle_exception
81#endif /* CONFIG_SH_KGDB */
82#ifdef CONFIG_SH_STANDARD_BIOS
83 bra debug_kernel_fw
84 nop
85#endif
86#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */
87
88 .align 2
89debug_trap:
90#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB)
91 mov r8, r0
92 shlr2 r0
93 cmp/eq #0x3f, r0 ! sh_bios() trap
94 bf 1f
95#ifdef CONFIG_SH_KGDB
96 cmp/eq #0xff, r0 ! XXX: KGDB trap, fix for SH-2.
97 bf 1f
98#endif
99 mov #OFF_SR, r0
100 mov.l @(r0,r15), r0 ! get status register
101 shll r0
102 shll r0 ! kernel space?
103 bt/s debug_kernel
1041:
105#endif
106 mov.l @r15, r0 ! Restore R0 value
107 mov.l 1f, r8
108 jmp @r8
109 nop
110 57
111 .align 2 58 .align 2
112ENTRY(exception_error) 59ENTRY(exception_error)
113 ! 60 !
114#ifdef CONFIG_TRACE_IRQFLAGS 61#ifdef CONFIG_TRACE_IRQFLAGS
115 mov.l 3f, r0 62 mov.l 2f, r0
116 jsr @r0 63 jsr @r0
117 nop 64 nop
118#endif 65#endif
119 sti 66 sti
120 mov.l 2f, r0 67 mov.l 1f, r0
121 jmp @r0 68 jmp @r0
122 nop 69 nop
123 70
124!
125 .align 2 71 .align 2
1261: .long break_point_trap_software 721: .long do_exception_error
1272: .long do_exception_error
128#ifdef CONFIG_TRACE_IRQFLAGS 73#ifdef CONFIG_TRACE_IRQFLAGS
1293: .long trace_hardirqs_on 742: .long trace_hardirqs_on
130#endif 75#endif
131 76
132 .align 2 77 .align 2
@@ -331,16 +276,31 @@ __restore_all:
3311: .long restore_all 2761: .long restore_all
332 277
333 .align 2 278 .align 2
334not_syscall_tra:
335 bra debug_trap
336 nop
337
338 .align 2
339syscall_badsys: ! Bad syscall number 279syscall_badsys: ! Bad syscall number
340 mov #-ENOSYS, r0 280 mov #-ENOSYS, r0
341 bra resume_userspace 281 bra resume_userspace
342 mov.l r0, @(OFF_R0,r15) ! Return value 282 mov.l r0, @(OFF_R0,r15) ! Return value
343 283
284/*
285 * The main debug trap handler.
286 *
287 * r8=TRA (not the trap number!)
288 *
289 * Note: This assumes that the trapa value is left in its original
290 * form (without the shlr2 shift) so the calculation for the jump
291 * call table offset remains a simple in place mask.
292 */
293debug_trap:
294 mov r8, r0
295 and #(0xf << 2), r0
296 mov.l 1f, r8
297 add r0, r8
298 mov.l @r8, r8
299 jmp @r8
300 nop
301
302 .align 2
3031: .long debug_trap_table
344 304
345/* 305/*
346 * Syscall interface: 306 * Syscall interface:
@@ -348,17 +308,19 @@ syscall_badsys: ! Bad syscall number
348 * Syscall #: R3 308 * Syscall #: R3
349 * Arguments #0 to #3: R4--R7 309 * Arguments #0 to #3: R4--R7
350 * Arguments #4 to #6: R0, R1, R2 310 * Arguments #4 to #6: R0, R1, R2
351 * TRA: (number of arguments + 0x10) x 4 311 * TRA: (number of arguments + ABI revision) x 4
352 * 312 *
353 * This code also handles delegating other traps to the BIOS/gdb stub 313 * This code also handles delegating other traps to the BIOS/gdb stub
354 * according to: 314 * according to:
355 * 315 *
356 * Trap number 316 * Trap number
357 * (TRA>>2) Purpose 317 * (TRA>>2) Purpose
358 * -------- ------- 318 * -------- -------
359 * 0x0-0xf old syscall ABI 319 * 0x00-0x0f original SH-3/4 syscall ABI (not in general use).
360 * 0x10-0x1f new syscall ABI 320 * 0x10-0x1f general SH-3/4 syscall ABI.
361 * 0x20-0xff delegated through debug_trap to BIOS/gdb stub. 321 * 0x20-0x2f syscall ABI for SH-2 parts.
322 * 0x30-0x3f debug traps used by the kernel.
323 * 0x40-0xff Not supported by all parts, so left unhandled.
362 * 324 *
363 * Note: When we're first called, the TRA value must be shifted 325 * Note: When we're first called, the TRA value must be shifted
364 * right 2 bits in order to get the value that was used as the "trapa" 326 * right 2 bits in order to get the value that was used as the "trapa"
@@ -375,17 +337,22 @@ ret_from_fork:
375 nop 337 nop
376 .align 2 338 .align 2
3771: .long schedule_tail 3391: .long schedule_tail
378 ! 340
341/*
342 * The poorly named main trapa decode and dispatch routine, for
343 * system calls and debug traps through their respective jump tables.
344 */
379ENTRY(system_call) 345ENTRY(system_call)
380#if !defined(CONFIG_CPU_SH2) 346#if !defined(CONFIG_CPU_SH2)
381 mov.l 1f, r9 347 mov.l 1f, r9
382 mov.l @r9, r8 ! Read from TRA (Trap Address) Register 348 mov.l @r9, r8 ! Read from TRA (Trap Address) Register
383#endif 349#endif
384 ! 350 /*
385 ! Is the trap argument >= 0x20? (TRA will be >= 0x80) 351 * Check the trap type
386 mov #0x7f, r9 352 */
353 mov #((0x20 << 2) - 1), r9
387 cmp/hi r9, r8 354 cmp/hi r9, r8
388 bt/s not_syscall_tra 355 bt/s debug_trap ! it's a debug trap..
389 mov #OFF_TRA, r9 356 mov #OFF_TRA, r9
390 add r15, r9 357 add r15, r9
391 mov.l r8, @r9 ! set TRA value to tra 358 mov.l r8, @r9 ! set TRA value to tra
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c
index 28ec7487de8c..66626c03e1ee 100644
--- a/arch/sh/kernel/io_generic.c
+++ b/arch/sh/kernel/io_generic.c
@@ -1,9 +1,8 @@
1/* $Id: io_generic.c,v 1.2 2003/05/04 19:29:53 lethal Exp $ 1/*
2 * 2 * arch/sh/kernel/io_generic.c
3 * linux/arch/sh/kernel/io_generic.c
4 * 3 *
5 * Copyright (C) 2000 Niibe Yutaka 4 * Copyright (C) 2000 Niibe Yutaka
6 * Copyright (C) 2005 Paul Mundt 5 * Copyright (C) 2005 - 2007 Paul Mundt
7 * 6 *
8 * Generic I/O routine. These can be used where a machine specific version 7 * Generic I/O routine. These can be used where a machine specific version
9 * is not required. 8 * is not required.
@@ -13,8 +12,9 @@
13 * for more details. 12 * for more details.
14 */ 13 */
15#include <linux/module.h> 14#include <linux/module.h>
16#include <asm/io.h> 15#include <linux/io.h>
17#include <asm/machvec.h> 16#include <asm/machvec.h>
17#include <asm/cacheflush.h>
18 18
19#ifdef CONFIG_CPU_SH3 19#ifdef CONFIG_CPU_SH3
20/* SH3 has a PCMCIA bug that needs a dummy read from area 6 for a 20/* SH3 has a PCMCIA bug that needs a dummy read from area 6 for a
@@ -96,6 +96,7 @@ void generic_insw(unsigned long port, void *dst, unsigned long count)
96 while (count--) 96 while (count--)
97 *buf++ = *port_addr; 97 *buf++ = *port_addr;
98 98
99 flush_dcache_all();
99 dummy_read(); 100 dummy_read();
100} 101}
101 102
@@ -170,6 +171,7 @@ void generic_outsw(unsigned long port, const void *src, unsigned long count)
170 while (count--) 171 while (count--)
171 *port_addr = *buf++; 172 *port_addr = *buf++;
172 173
174 flush_dcache_all();
173 dummy_read(); 175 dummy_read();
174} 176}
175 177
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c
index 9c6315f0335d..d8927d85492e 100644
--- a/arch/sh/kernel/kgdb_stub.c
+++ b/arch/sh/kernel/kgdb_stub.c
@@ -1323,8 +1323,11 @@ static void kgdb_command_loop(const int excep_code, const int trapa_value)
1323} 1323}
1324 1324
1325/* There has been an exception, most likely a breakpoint. */ 1325/* There has been an exception, most likely a breakpoint. */
1326void kgdb_handle_exception(struct pt_regs *regs) 1326asmlinkage void kgdb_handle_exception(unsigned long r4, unsigned long r5,
1327 unsigned long r6, unsigned long r7,
1328 struct pt_regs __regs)
1327{ 1329{
1330 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
1328 int excep_code, vbr_val; 1331 int excep_code, vbr_val;
1329 int count; 1332 int count;
1330 int trapa_value = ctrl_inl(TRA); 1333 int trapa_value = ctrl_inl(TRA);
@@ -1368,8 +1371,6 @@ void kgdb_handle_exception(struct pt_regs *regs)
1368 1371
1369 vbr_val = trap_registers.vbr; 1372 vbr_val = trap_registers.vbr;
1370 asm("ldc %0, vbr": :"r"(vbr_val)); 1373 asm("ldc %0, vbr": :"r"(vbr_val));
1371
1372 return;
1373} 1374}
1374 1375
1375/* Trigger a breakpoint by function */ 1376/* Trigger a breakpoint by function */
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 486c06e18033..9d6a438b3eaf 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -1,42 +1,30 @@
1/* $Id: process.c,v 1.28 2004/05/05 16:54:23 lethal Exp $ 1/*
2 * arch/sh/kernel/process.c
2 * 3 *
3 * linux/arch/sh/kernel/process.c 4 * This file handles the architecture-dependent parts of process handling..
4 * 5 *
5 * Copyright (C) 1995 Linus Torvalds 6 * Copyright (C) 1995 Linus Torvalds
6 * 7 *
7 * SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima 8 * SuperH version: Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima
8 * Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC 9 * Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC
10 * Copyright (C) 2002 - 2006 Paul Mundt
9 */ 11 */
10
11/*
12 * This file handles the architecture-dependent parts of process handling..
13 */
14
15#include <linux/module.h> 12#include <linux/module.h>
16#include <linux/unistd.h>
17#include <linux/mm.h> 13#include <linux/mm.h>
18#include <linux/elfcore.h> 14#include <linux/elfcore.h>
19#include <linux/a.out.h>
20#include <linux/slab.h>
21#include <linux/pm.h> 15#include <linux/pm.h>
22#include <linux/ptrace.h>
23#include <linux/kallsyms.h> 16#include <linux/kallsyms.h>
24#include <linux/kexec.h> 17#include <linux/kexec.h>
25
26#include <asm/io.h>
27#include <asm/uaccess.h> 18#include <asm/uaccess.h>
28#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
29#include <asm/elf.h>
30#include <asm/ubc.h> 20#include <asm/ubc.h>
31 21
32static int hlt_counter=0; 22static int hlt_counter;
33
34int ubc_usercnt = 0; 23int ubc_usercnt = 0;
35 24
36#define HARD_IDLE_TIMEOUT (HZ / 3) 25#define HARD_IDLE_TIMEOUT (HZ / 3)
37 26
38void (*pm_idle)(void); 27void (*pm_idle)(void);
39
40void (*pm_power_off)(void); 28void (*pm_power_off)(void);
41EXPORT_SYMBOL(pm_power_off); 29EXPORT_SYMBOL(pm_power_off);
42 30
@@ -44,14 +32,12 @@ void disable_hlt(void)
44{ 32{
45 hlt_counter++; 33 hlt_counter++;
46} 34}
47
48EXPORT_SYMBOL(disable_hlt); 35EXPORT_SYMBOL(disable_hlt);
49 36
50void enable_hlt(void) 37void enable_hlt(void)
51{ 38{
52 hlt_counter--; 39 hlt_counter--;
53} 40}
54
55EXPORT_SYMBOL(enable_hlt); 41EXPORT_SYMBOL(enable_hlt);
56 42
57void default_idle(void) 43void default_idle(void)
@@ -152,19 +138,21 @@ __asm__(".align 5\n"
152 ".align 2\n\t" 138 ".align 2\n\t"
153 "1:.long do_exit"); 139 "1:.long do_exit");
154 140
141/* Don't use this in BL=1(cli). Or else, CPU resets! */
155int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 142int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
156{ /* Don't use this in BL=1(cli). Or else, CPU resets! */ 143{
157 struct pt_regs regs; 144 struct pt_regs regs;
158 145
159 memset(&regs, 0, sizeof(regs)); 146 memset(&regs, 0, sizeof(regs));
160 regs.regs[4] = (unsigned long) arg; 147 regs.regs[4] = (unsigned long)arg;
161 regs.regs[5] = (unsigned long) fn; 148 regs.regs[5] = (unsigned long)fn;
162 149
163 regs.pc = (unsigned long) kernel_thread_helper; 150 regs.pc = (unsigned long)kernel_thread_helper;
164 regs.sr = (1 << 30); 151 regs.sr = (1 << 30);
165 152
166 /* Ok, create the new process.. */ 153 /* Ok, create the new process.. */
167 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); 154 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
155 &regs, 0, NULL, NULL);
168} 156}
169 157
170/* 158/*
@@ -211,21 +199,20 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
211 return fpvalid; 199 return fpvalid;
212} 200}
213 201
214/* 202/*
215 * Capture the user space registers if the task is not running (in user space) 203 * Capture the user space registers if the task is not running (in user space)
216 */ 204 */
217int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) 205int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
218{ 206{
219 struct pt_regs ptregs; 207 struct pt_regs ptregs;
220 208
221 ptregs = *task_pt_regs(tsk); 209 ptregs = *task_pt_regs(tsk);
222 elf_core_copy_regs(regs, &ptregs); 210 elf_core_copy_regs(regs, &ptregs);
223 211
224 return 1; 212 return 1;
225} 213}
226 214
227int 215int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu)
228dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *fpu)
229{ 216{
230 int fpvalid = 0; 217 int fpvalid = 0;
231 218
@@ -263,12 +250,14 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
263 childregs->regs[15] = usp; 250 childregs->regs[15] = usp;
264 ti->addr_limit = USER_DS; 251 ti->addr_limit = USER_DS;
265 } else { 252 } else {
266 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; 253 childregs->regs[15] = (unsigned long)task_stack_page(p) +
254 THREAD_SIZE;
267 ti->addr_limit = KERNEL_DS; 255 ti->addr_limit = KERNEL_DS;
268 } 256 }
269 if (clone_flags & CLONE_SETTLS) { 257
258 if (clone_flags & CLONE_SETTLS)
270 childregs->gbr = childregs->regs[0]; 259 childregs->gbr = childregs->regs[0];
271 } 260
272 childregs->regs[0] = 0; /* Set return value for child */ 261 childregs->regs[0] = 0; /* Set return value for child */
273 262
274 p->thread.sp = (unsigned long) childregs; 263 p->thread.sp = (unsigned long) childregs;
@@ -280,8 +269,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
280} 269}
281 270
282/* Tracing by user break controller. */ 271/* Tracing by user break controller. */
283static void 272static void ubc_set_tracing(int asid, unsigned long pc)
284ubc_set_tracing(int asid, unsigned long pc)
285{ 273{
286#if defined(CONFIG_CPU_SH4A) 274#if defined(CONFIG_CPU_SH4A)
287 unsigned long val; 275 unsigned long val;
@@ -297,7 +285,7 @@ ubc_set_tracing(int asid, unsigned long pc)
297 val = (UBC_CRR_RES | UBC_CRR_PCB | UBC_CRR_BIE); 285 val = (UBC_CRR_RES | UBC_CRR_PCB | UBC_CRR_BIE);
298 ctrl_outl(val, UBC_CRR0); 286 ctrl_outl(val, UBC_CRR0);
299 287
300 /* Read UBC register that we writed last. For chekking UBC Register changed */ 288 /* Read UBC register that we wrote last, for checking update */
301 val = ctrl_inl(UBC_CRR0); 289 val = ctrl_inl(UBC_CRR0);
302 290
303#else /* CONFIG_CPU_SH4A */ 291#else /* CONFIG_CPU_SH4A */
@@ -305,13 +293,14 @@ ubc_set_tracing(int asid, unsigned long pc)
305 293
306#ifdef CONFIG_MMU 294#ifdef CONFIG_MMU
307 /* We don't have any ASID settings for the SH-2! */ 295 /* We don't have any ASID settings for the SH-2! */
308 if (cpu_data->type != CPU_SH7604) 296 if (current_cpu_data.type != CPU_SH7604)
309 ctrl_outb(asid, UBC_BASRA); 297 ctrl_outb(asid, UBC_BASRA);
310#endif 298#endif
311 299
312 ctrl_outl(0, UBC_BAMRA); 300 ctrl_outl(0, UBC_BAMRA);
313 301
314 if (cpu_data->type == CPU_SH7729 || cpu_data->type == CPU_SH7710) { 302 if (current_cpu_data.type == CPU_SH7729 ||
303 current_cpu_data.type == CPU_SH7710) {
315 ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA); 304 ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA);
316 ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR); 305 ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR);
317 } else { 306 } else {
@@ -325,7 +314,8 @@ ubc_set_tracing(int asid, unsigned long pc)
325 * switch_to(x,y) should switch tasks from x to y. 314 * switch_to(x,y) should switch tasks from x to y.
326 * 315 *
327 */ 316 */
328struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *next) 317struct task_struct *__switch_to(struct task_struct *prev,
318 struct task_struct *next)
329{ 319{
330#if defined(CONFIG_SH_FPU) 320#if defined(CONFIG_SH_FPU)
331 unlazy_fpu(prev, task_pt_regs(prev)); 321 unlazy_fpu(prev, task_pt_regs(prev));
@@ -354,7 +344,7 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne
354#ifdef CONFIG_MMU 344#ifdef CONFIG_MMU
355 /* 345 /*
356 * Restore the kernel mode register 346 * Restore the kernel mode register
357 * k7 (r7_bank1) 347 * k7 (r7_bank1)
358 */ 348 */
359 asm volatile("ldc %0, r7_bank" 349 asm volatile("ldc %0, r7_bank"
360 : /* no output */ 350 : /* no output */
@@ -367,7 +357,7 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne
367 else if (next->thread.ubc_pc && next->mm) { 357 else if (next->thread.ubc_pc && next->mm) {
368 int asid = 0; 358 int asid = 0;
369#ifdef CONFIG_MMU 359#ifdef CONFIG_MMU
370 asid |= next->mm->context.id & MMU_CONTEXT_ASID_MASK; 360 asid |= cpu_asid(smp_processor_id(), next->mm);
371#endif 361#endif
372 ubc_set_tracing(asid, next->thread.ubc_pc); 362 ubc_set_tracing(asid, next->thread.ubc_pc);
373 } else { 363 } else {
@@ -405,7 +395,8 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
405 if (!newsp) 395 if (!newsp)
406 newsp = regs->regs[15]; 396 newsp = regs->regs[15];
407 return do_fork(clone_flags, newsp, regs, 0, 397 return do_fork(clone_flags, newsp, regs, 0,
408 (int __user *)parent_tidptr, (int __user *)child_tidptr); 398 (int __user *)parent_tidptr,
399 (int __user *)child_tidptr);
409} 400}
410 401
411/* 402/*
@@ -493,9 +484,27 @@ asmlinkage void break_point_trap(void)
493 force_sig(SIGTRAP, current); 484 force_sig(SIGTRAP, current);
494} 485}
495 486
496asmlinkage void break_point_trap_software(unsigned long r4, unsigned long r5, 487/*
497 unsigned long r6, unsigned long r7, 488 * Generic trap handler.
498 struct pt_regs __regs) 489 */
490asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5,
491 unsigned long r6, unsigned long r7,
492 struct pt_regs __regs)
493{
494 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
495
496 /* Rewind */
497 regs->pc -= 2;
498
499 force_sig(SIGTRAP, current);
500}
501
502/*
503 * Special handler for BUG() traps.
504 */
505asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5,
506 unsigned long r6, unsigned long r7,
507 struct pt_regs __regs)
499{ 508{
500 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 509 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
501 510
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 225f9ea5cdd7..98802ab28211 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -1,14 +1,11 @@
1/* 1/*
2 * linux/arch/sh/kernel/setup.c 2 * arch/sh/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2002, 2003 Paul Mundt
6 */
7
8/*
9 * This file handles the architecture-dependent parts of initialization 4 * This file handles the architecture-dependent parts of initialization
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 - 2006 Paul Mundt
10 */ 8 */
11
12#include <linux/screen_info.h> 9#include <linux/screen_info.h>
13#include <linux/ioport.h> 10#include <linux/ioport.h>
14#include <linux/init.h> 11#include <linux/init.h>
@@ -75,7 +72,7 @@ static struct sh_machine_vector* __init get_mv_byname(const char* name);
75#define RAMDISK_PROMPT_FLAG 0x8000 72#define RAMDISK_PROMPT_FLAG 0x8000
76#define RAMDISK_LOAD_FLAG 0x4000 73#define RAMDISK_LOAD_FLAG 0x4000
77 74
78static char command_line[COMMAND_LINE_SIZE] = { 0, }; 75static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
79 76
80static struct resource code_resource = { .name = "Kernel code", }; 77static struct resource code_resource = { .name = "Kernel code", };
81static struct resource data_resource = { .name = "Kernel data", }; 78static struct resource data_resource = { .name = "Kernel data", };
@@ -90,8 +87,8 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
90 int len = 0; 87 int len = 0;
91 88
92 /* Save unparsed command line copy for /proc/cmdline */ 89 /* Save unparsed command line copy for /proc/cmdline */
93 memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); 90 memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
94 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 91 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
95 92
96 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; 93 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
97 memory_end = memory_start + __MEMORY_SIZE; 94 memory_end = memory_start + __MEMORY_SIZE;
@@ -395,9 +392,9 @@ static const char *cpu_name[] = {
395 [CPU_SH_NONE] = "Unknown" 392 [CPU_SH_NONE] = "Unknown"
396}; 393};
397 394
398const char *get_cpu_subtype(void) 395const char *get_cpu_subtype(struct sh_cpuinfo *c)
399{ 396{
400 return cpu_name[boot_cpu_data.type]; 397 return cpu_name[c->type];
401} 398}
402 399
403#ifdef CONFIG_PROC_FS 400#ifdef CONFIG_PROC_FS
@@ -407,19 +404,19 @@ static const char *cpu_flags[] = {
407 "ptea", "llsc", "l2", NULL 404 "ptea", "llsc", "l2", NULL
408}; 405};
409 406
410static void show_cpuflags(struct seq_file *m) 407static void show_cpuflags(struct seq_file *m, struct sh_cpuinfo *c)
411{ 408{
412 unsigned long i; 409 unsigned long i;
413 410
414 seq_printf(m, "cpu flags\t:"); 411 seq_printf(m, "cpu flags\t:");
415 412
416 if (!cpu_data->flags) { 413 if (!c->flags) {
417 seq_printf(m, " %s\n", cpu_flags[0]); 414 seq_printf(m, " %s\n", cpu_flags[0]);
418 return; 415 return;
419 } 416 }
420 417
421 for (i = 0; cpu_flags[i]; i++) 418 for (i = 0; cpu_flags[i]; i++)
422 if ((cpu_data->flags & (1 << i))) 419 if ((c->flags & (1 << i)))
423 seq_printf(m, " %s", cpu_flags[i+1]); 420 seq_printf(m, " %s", cpu_flags[i+1]);
424 421
425 seq_printf(m, "\n"); 422 seq_printf(m, "\n");
@@ -441,16 +438,20 @@ static void show_cacheinfo(struct seq_file *m, const char *type,
441 */ 438 */
442static int show_cpuinfo(struct seq_file *m, void *v) 439static int show_cpuinfo(struct seq_file *m, void *v)
443{ 440{
444 unsigned int cpu = smp_processor_id(); 441 struct sh_cpuinfo *c = v;
442 unsigned int cpu = c - cpu_data;
443
444 if (!cpu_online(cpu))
445 return 0;
445 446
446 if (!cpu && cpu_online(cpu)) 447 if (cpu == 0)
447 seq_printf(m, "machine\t\t: %s\n", get_system_type()); 448 seq_printf(m, "machine\t\t: %s\n", get_system_type());
448 449
449 seq_printf(m, "processor\t: %d\n", cpu); 450 seq_printf(m, "processor\t: %d\n", cpu);
450 seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine); 451 seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine);
451 seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype()); 452 seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype(c));
452 453
453 show_cpuflags(m); 454 show_cpuflags(m, c);
454 455
455 seq_printf(m, "cache type\t: "); 456 seq_printf(m, "cache type\t: ");
456 457
@@ -459,22 +460,22 @@ static int show_cpuinfo(struct seq_file *m, void *v)
459 * unified cache on the SH-2 and SH-3, as well as the harvard 460 * unified cache on the SH-2 and SH-3, as well as the harvard
460 * style cache on the SH-4. 461 * style cache on the SH-4.
461 */ 462 */
462 if (boot_cpu_data.icache.flags & SH_CACHE_COMBINED) { 463 if (c->icache.flags & SH_CACHE_COMBINED) {
463 seq_printf(m, "unified\n"); 464 seq_printf(m, "unified\n");
464 show_cacheinfo(m, "cache", boot_cpu_data.icache); 465 show_cacheinfo(m, "cache", c->icache);
465 } else { 466 } else {
466 seq_printf(m, "split (harvard)\n"); 467 seq_printf(m, "split (harvard)\n");
467 show_cacheinfo(m, "icache", boot_cpu_data.icache); 468 show_cacheinfo(m, "icache", c->icache);
468 show_cacheinfo(m, "dcache", boot_cpu_data.dcache); 469 show_cacheinfo(m, "dcache", c->dcache);
469 } 470 }
470 471
471 /* Optional secondary cache */ 472 /* Optional secondary cache */
472 if (boot_cpu_data.flags & CPU_HAS_L2_CACHE) 473 if (c->flags & CPU_HAS_L2_CACHE)
473 show_cacheinfo(m, "scache", boot_cpu_data.scache); 474 show_cacheinfo(m, "scache", c->scache);
474 475
475 seq_printf(m, "bogomips\t: %lu.%02lu\n", 476 seq_printf(m, "bogomips\t: %lu.%02lu\n",
476 boot_cpu_data.loops_per_jiffy/(500000/HZ), 477 c->loops_per_jiffy/(500000/HZ),
477 (boot_cpu_data.loops_per_jiffy/(5000/HZ)) % 100); 478 (c->loops_per_jiffy/(5000/HZ)) % 100);
478 479
479 return show_clocks(m); 480 return show_clocks(m);
480} 481}
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index e6106239a0fe..fe1b276c97c6 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -105,7 +105,6 @@ EXPORT_SYMBOL(__flush_purge_region);
105EXPORT_SYMBOL(clear_user_page); 105EXPORT_SYMBOL(clear_user_page);
106#endif 106#endif
107 107
108EXPORT_SYMBOL(flush_tlb_page);
109EXPORT_SYMBOL(__down_trylock); 108EXPORT_SYMBOL(__down_trylock);
110 109
111#ifdef CONFIG_SMP 110#ifdef CONFIG_SMP
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c
index 379c88bf5d9a..32f10a03fbb5 100644
--- a/arch/sh/kernel/signal.c
+++ b/arch/sh/kernel/signal.c
@@ -127,7 +127,7 @@ static inline int restore_sigcontext_fpu(struct sigcontext __user *sc)
127{ 127{
128 struct task_struct *tsk = current; 128 struct task_struct *tsk = current;
129 129
130 if (!(cpu_data->flags & CPU_HAS_FPU)) 130 if (!(current_cpu_data.flags & CPU_HAS_FPU))
131 return 0; 131 return 0;
132 132
133 set_used_math(); 133 set_used_math();
@@ -140,7 +140,7 @@ static inline int save_sigcontext_fpu(struct sigcontext __user *sc,
140{ 140{
141 struct task_struct *tsk = current; 141 struct task_struct *tsk = current;
142 142
143 if (!(cpu_data->flags & CPU_HAS_FPU)) 143 if (!(current_cpu_data.flags & CPU_HAS_FPU))
144 return 0; 144 return 0;
145 145
146 if (!used_math()) { 146 if (!used_math()) {
@@ -181,7 +181,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
181#undef COPY 181#undef COPY
182 182
183#ifdef CONFIG_SH_FPU 183#ifdef CONFIG_SH_FPU
184 if (cpu_data->flags & CPU_HAS_FPU) { 184 if (current_cpu_data.flags & CPU_HAS_FPU) {
185 int owned_fp; 185 int owned_fp;
186 struct task_struct *tsk = current; 186 struct task_struct *tsk = current;
187 187
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S
index ca81976e9e34..38fc8cd3ea3a 100644
--- a/arch/sh/kernel/syscalls.S
+++ b/arch/sh/kernel/syscalls.S
@@ -319,15 +319,15 @@ ENTRY(sys_call_table)
319 .long sys_mq_getsetattr 319 .long sys_mq_getsetattr
320 .long sys_kexec_load 320 .long sys_kexec_load
321 .long sys_waitid 321 .long sys_waitid
322 .long sys_ni_syscall /* 285 */ 322 .long sys_add_key /* 285 */
323 .long sys_add_key
324 .long sys_request_key 323 .long sys_request_key
325 .long sys_keyctl 324 .long sys_keyctl
326 .long sys_ioprio_set 325 .long sys_ioprio_set
327 .long sys_ioprio_get /* 290 */ 326 .long sys_ioprio_get
328 .long sys_inotify_init 327 .long sys_inotify_init /* 290 */
329 .long sys_inotify_add_watch 328 .long sys_inotify_add_watch
330 .long sys_inotify_rm_watch 329 .long sys_inotify_rm_watch
330 .long sys_ni_syscall
331 .long sys_migrate_pages 331 .long sys_migrate_pages
332 .long sys_openat /* 295 */ 332 .long sys_openat /* 295 */
333 .long sys_mkdirat 333 .long sys_mkdirat
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index c206c9504c4b..d47e775962e9 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -41,14 +41,6 @@ static int null_rtc_set_time(const time_t secs)
41void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; 41void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
42int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; 42int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
43 43
44/*
45 * Scheduler clock - returns current time in nanosec units.
46 */
47unsigned long long __attribute__ ((weak)) sched_clock(void)
48{
49 return (unsigned long long)jiffies * (1000000000 / HZ);
50}
51
52#ifndef CONFIG_GENERIC_TIME 44#ifndef CONFIG_GENERIC_TIME
53void do_gettimeofday(struct timeval *tv) 45void do_gettimeofday(struct timeval *tv)
54{ 46{
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index ec110157992d..e9f168f60f95 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -156,13 +156,13 @@ static inline void do_bug_verbose(struct pt_regs *regs)
156{ 156{
157} 157}
158#endif /* CONFIG_DEBUG_BUGVERBOSE */ 158#endif /* CONFIG_DEBUG_BUGVERBOSE */
159#endif /* CONFIG_BUG */
160 159
161void handle_BUG(struct pt_regs *regs) 160void handle_BUG(struct pt_regs *regs)
162{ 161{
163 do_bug_verbose(regs); 162 do_bug_verbose(regs);
164 die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); 163 die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff);
165} 164}
165#endif /* CONFIG_BUG */
166 166
167/* 167/*
168 * handle an instruction that does an unaligned memory access by emulating the 168 * handle an instruction that does an unaligned memory access by emulating the
@@ -641,7 +641,7 @@ int is_dsp_inst(struct pt_regs *regs)
641 * Safe guard if DSP mode is already enabled or we're lacking 641 * Safe guard if DSP mode is already enabled or we're lacking
642 * the DSP altogether. 642 * the DSP altogether.
643 */ 643 */
644 if (!(cpu_data->flags & CPU_HAS_DSP) || (regs->sr & SR_DSP)) 644 if (!(current_cpu_data.flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
645 return 0; 645 return 0;
646 646
647 get_user(inst, ((unsigned short *) regs->pc)); 647 get_user(inst, ((unsigned short *) regs->pc));
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index f34bdcc33a7d..75de165867a0 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -83,9 +83,13 @@ SECTIONS
83 .con_initcall.init : { *(.con_initcall.init) } 83 .con_initcall.init : { *(.con_initcall.init) }
84 __con_initcall_end = .; 84 __con_initcall_end = .;
85 SECURITY_INIT 85 SECURITY_INIT
86
87#ifdef CONFIG_BLK_DEV_INITRD
86 __initramfs_start = .; 88 __initramfs_start = .;
87 .init.ramfs : { *(.init.ramfs) } 89 .init.ramfs : { *(.init.ramfs) }
88 __initramfs_end = .; 90 __initramfs_end = .;
91#endif
92
89 __machvec_start = .; 93 __machvec_start = .;
90 .init.machvec : { *(.init.machvec) } 94 .init.machvec : { *(.init.machvec) }
91 __machvec_end = .; 95 __machvec_end = .;
diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c
index deb46941f315..7b0f66f03319 100644
--- a/arch/sh/kernel/vsyscall/vsyscall.c
+++ b/arch/sh/kernel/vsyscall/vsyscall.c
@@ -37,11 +37,12 @@ __setup("vdso=", vdso_setup);
37 * of the ELF DSO images included therein. 37 * of the ELF DSO images included therein.
38 */ 38 */
39extern const char vsyscall_trapa_start, vsyscall_trapa_end; 39extern const char vsyscall_trapa_start, vsyscall_trapa_end;
40static void *syscall_page; 40static struct page *syscall_pages[1];
41 41
42int __init vsyscall_init(void) 42int __init vsyscall_init(void)
43{ 43{
44 syscall_page = (void *)get_zeroed_page(GFP_ATOMIC); 44 void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
45 syscall_pages[0] = virt_to_page(syscall_page);
45 46
46 /* 47 /*
47 * XXX: Map this page to a fixmap entry if we get around 48 * XXX: Map this page to a fixmap entry if we get around
@@ -55,37 +56,10 @@ int __init vsyscall_init(void)
55 return 0; 56 return 0;
56} 57}
57 58
58static struct page *syscall_vma_nopage(struct vm_area_struct *vma,
59 unsigned long address, int *type)
60{
61 unsigned long offset = address - vma->vm_start;
62 struct page *page;
63
64 if (address < vma->vm_start || address > vma->vm_end)
65 return NOPAGE_SIGBUS;
66
67 page = virt_to_page(syscall_page + offset);
68
69 get_page(page);
70
71 return page;
72}
73
74/* Prevent VMA merging */
75static void syscall_vma_close(struct vm_area_struct *vma)
76{
77}
78
79static struct vm_operations_struct syscall_vm_ops = {
80 .nopage = syscall_vma_nopage,
81 .close = syscall_vma_close,
82};
83
84/* Setup a VMA at program startup for the vsyscall page */ 59/* Setup a VMA at program startup for the vsyscall page */
85int arch_setup_additional_pages(struct linux_binprm *bprm, 60int arch_setup_additional_pages(struct linux_binprm *bprm,
86 int executable_stack) 61 int executable_stack)
87{ 62{
88 struct vm_area_struct *vma;
89 struct mm_struct *mm = current->mm; 63 struct mm_struct *mm = current->mm;
90 unsigned long addr; 64 unsigned long addr;
91 int ret; 65 int ret;
@@ -97,30 +71,16 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
97 goto up_fail; 71 goto up_fail;
98 } 72 }
99 73
100 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); 74 ret = install_special_mapping(mm, addr, PAGE_SIZE,
101 if (!vma) { 75 VM_READ | VM_EXEC |
102 ret = -ENOMEM; 76 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC |
77 VM_ALWAYSDUMP,
78 syscall_pages);
79 if (unlikely(ret))
103 goto up_fail; 80 goto up_fail;
104 }
105
106 vma->vm_start = addr;
107 vma->vm_end = addr + PAGE_SIZE;
108 /* MAYWRITE to allow gdb to COW and set breakpoints */
109 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
110 vma->vm_flags |= mm->def_flags;
111 vma->vm_page_prot = protection_map[vma->vm_flags & 7];
112 vma->vm_ops = &syscall_vm_ops;
113 vma->vm_mm = mm;
114
115 ret = insert_vm_struct(mm, vma);
116 if (unlikely(ret)) {
117 kmem_cache_free(vm_area_cachep, vma);
118 goto up_fail;
119 }
120 81
121 current->mm->context.vdso = (void *)addr; 82 current->mm->context.vdso = (void *)addr;
122 83
123 mm->total_vm++;
124up_fail: 84up_fail:
125 up_write(&mm->mmap_sem); 85 up_write(&mm->mmap_sem);
126 return ret; 86 return ret;
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 29f4ee35c6dc..6b0d28ac9241 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -20,7 +20,7 @@ config CPU_SH4
20 bool 20 bool
21 select CPU_HAS_INTEVT 21 select CPU_HAS_INTEVT
22 select CPU_HAS_SR_RB 22 select CPU_HAS_SR_RB
23 select CPU_HAS_PTEA if !CPU_SUBTYPE_ST40 23 select CPU_HAS_PTEA if (!CPU_SUBTYPE_ST40 && !CPU_SH4A) || CPU_SHX2
24 24
25config CPU_SH4A 25config CPU_SH4A
26 bool 26 bool
@@ -72,6 +72,7 @@ config CPU_SUBTYPE_SH7705
72config CPU_SUBTYPE_SH7706 72config CPU_SUBTYPE_SH7706
73 bool "Support SH7706 processor" 73 bool "Support SH7706 processor"
74 select CPU_SH3 74 select CPU_SH3
75 select CPU_HAS_IPR_IRQ
75 help 76 help
76 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU. 77 Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU.
77 78
@@ -92,6 +93,7 @@ config CPU_SUBTYPE_SH7708
92config CPU_SUBTYPE_SH7709 93config CPU_SUBTYPE_SH7709
93 bool "Support SH7709 processor" 94 bool "Support SH7709 processor"
94 select CPU_SH3 95 select CPU_SH3
96 select CPU_HAS_IPR_IRQ
95 select CPU_HAS_PINT_IRQ 97 select CPU_HAS_PINT_IRQ
96 help 98 help
97 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU. 99 Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU.
@@ -149,6 +151,7 @@ config CPU_SUBTYPE_SH7760
149 bool "Support SH7760 processor" 151 bool "Support SH7760 processor"
150 select CPU_SH4 152 select CPU_SH4
151 select CPU_HAS_INTC2_IRQ 153 select CPU_HAS_INTC2_IRQ
154 select CPU_HAS_IPR_IRQ
152 155
153config CPU_SUBTYPE_SH4_202 156config CPU_SUBTYPE_SH4_202
154 bool "Support SH4-202 processor" 157 bool "Support SH4-202 processor"
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index e0122bd33ddb..de6d2c9aa477 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -46,10 +46,10 @@ static int cache_seq_show(struct seq_file *file, void *iter)
46 46
47 if (cache_type == CACHE_TYPE_DCACHE) { 47 if (cache_type == CACHE_TYPE_DCACHE) {
48 base = CACHE_OC_ADDRESS_ARRAY; 48 base = CACHE_OC_ADDRESS_ARRAY;
49 cache = &cpu_data->dcache; 49 cache = &current_cpu_data.dcache;
50 } else { 50 } else {
51 base = CACHE_IC_ADDRESS_ARRAY; 51 base = CACHE_IC_ADDRESS_ARRAY;
52 cache = &cpu_data->icache; 52 cache = &current_cpu_data.icache;
53 } 53 }
54 54
55 /* 55 /*
@@ -114,7 +114,7 @@ static int cache_debugfs_open(struct inode *inode, struct file *file)
114 return single_open(file, cache_seq_show, inode->i_private); 114 return single_open(file, cache_seq_show, inode->i_private);
115} 115}
116 116
117static struct file_operations cache_debugfs_fops = { 117static const struct file_operations cache_debugfs_fops = {
118 .owner = THIS_MODULE, 118 .owner = THIS_MODULE,
119 .open = cache_debugfs_open, 119 .open = cache_debugfs_open,
120 .read = seq_read, 120 .read = seq_read,
diff --git a/arch/sh/mm/cache-sh3.c b/arch/sh/mm/cache-sh3.c
index 838731fc608d..6d1dbec08ad4 100644
--- a/arch/sh/mm/cache-sh3.c
+++ b/arch/sh/mm/cache-sh3.c
@@ -44,11 +44,11 @@ void __flush_wback_region(void *start, int size)
44 44
45 for (v = begin; v < end; v+=L1_CACHE_BYTES) { 45 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
46 unsigned long addrstart = CACHE_OC_ADDRESS_ARRAY; 46 unsigned long addrstart = CACHE_OC_ADDRESS_ARRAY;
47 for (j = 0; j < cpu_data->dcache.ways; j++) { 47 for (j = 0; j < current_cpu_data.dcache.ways; j++) {
48 unsigned long data, addr, p; 48 unsigned long data, addr, p;
49 49
50 p = __pa(v); 50 p = __pa(v);
51 addr = addrstart | (v & cpu_data->dcache.entry_mask); 51 addr = addrstart | (v & current_cpu_data.dcache.entry_mask);
52 local_irq_save(flags); 52 local_irq_save(flags);
53 data = ctrl_inl(addr); 53 data = ctrl_inl(addr);
54 54
@@ -60,7 +60,7 @@ void __flush_wback_region(void *start, int size)
60 break; 60 break;
61 } 61 }
62 local_irq_restore(flags); 62 local_irq_restore(flags);
63 addrstart += cpu_data->dcache.way_incr; 63 addrstart += current_cpu_data.dcache.way_incr;
64 } 64 }
65 } 65 }
66} 66}
@@ -85,7 +85,7 @@ void __flush_purge_region(void *start, int size)
85 85
86 data = (v & 0xfffffc00); /* _Virtual_ address, ~U, ~V */ 86 data = (v & 0xfffffc00); /* _Virtual_ address, ~U, ~V */
87 addr = CACHE_OC_ADDRESS_ARRAY | 87 addr = CACHE_OC_ADDRESS_ARRAY |
88 (v & cpu_data->dcache.entry_mask) | SH_CACHE_ASSOC; 88 (v & current_cpu_data.dcache.entry_mask) | SH_CACHE_ASSOC;
89 ctrl_outl(data, addr); 89 ctrl_outl(data, addr);
90 } 90 }
91} 91}
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index c6955157c989..e0cd4b7f4aeb 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -54,21 +54,21 @@ static void __init emit_cache_params(void)
54 ctrl_inl(CCN_CVR), 54 ctrl_inl(CCN_CVR),
55 ctrl_inl(CCN_PRR)); 55 ctrl_inl(CCN_PRR));
56 printk("I-cache : n_ways=%d n_sets=%d way_incr=%d\n", 56 printk("I-cache : n_ways=%d n_sets=%d way_incr=%d\n",
57 cpu_data->icache.ways, 57 current_cpu_data.icache.ways,
58 cpu_data->icache.sets, 58 current_cpu_data.icache.sets,
59 cpu_data->icache.way_incr); 59 current_cpu_data.icache.way_incr);
60 printk("I-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n", 60 printk("I-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
61 cpu_data->icache.entry_mask, 61 current_cpu_data.icache.entry_mask,
62 cpu_data->icache.alias_mask, 62 current_cpu_data.icache.alias_mask,
63 cpu_data->icache.n_aliases); 63 current_cpu_data.icache.n_aliases);
64 printk("D-cache : n_ways=%d n_sets=%d way_incr=%d\n", 64 printk("D-cache : n_ways=%d n_sets=%d way_incr=%d\n",
65 cpu_data->dcache.ways, 65 current_cpu_data.dcache.ways,
66 cpu_data->dcache.sets, 66 current_cpu_data.dcache.sets,
67 cpu_data->dcache.way_incr); 67 current_cpu_data.dcache.way_incr);
68 printk("D-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n", 68 printk("D-cache : entry_mask=0x%08x alias_mask=0x%08x n_aliases=%d\n",
69 cpu_data->dcache.entry_mask, 69 current_cpu_data.dcache.entry_mask,
70 cpu_data->dcache.alias_mask, 70 current_cpu_data.dcache.alias_mask,
71 cpu_data->dcache.n_aliases); 71 current_cpu_data.dcache.n_aliases);
72 72
73 if (!__flush_dcache_segment_fn) 73 if (!__flush_dcache_segment_fn)
74 panic("unknown number of cache ways\n"); 74 panic("unknown number of cache ways\n");
@@ -87,10 +87,10 @@ void __init p3_cache_init(void)
87{ 87{
88 int i; 88 int i;
89 89
90 compute_alias(&cpu_data->icache); 90 compute_alias(&current_cpu_data.icache);
91 compute_alias(&cpu_data->dcache); 91 compute_alias(&current_cpu_data.dcache);
92 92
93 switch (cpu_data->dcache.ways) { 93 switch (current_cpu_data.dcache.ways) {
94 case 1: 94 case 1:
95 __flush_dcache_segment_fn = __flush_dcache_segment_1way; 95 __flush_dcache_segment_fn = __flush_dcache_segment_1way;
96 break; 96 break;
@@ -110,7 +110,7 @@ void __init p3_cache_init(void)
110 if (ioremap_page_range(P3SEG, P3SEG + (PAGE_SIZE * 4), 0, PAGE_KERNEL)) 110 if (ioremap_page_range(P3SEG, P3SEG + (PAGE_SIZE * 4), 0, PAGE_KERNEL))
111 panic("%s failed.", __FUNCTION__); 111 panic("%s failed.", __FUNCTION__);
112 112
113 for (i = 0; i < cpu_data->dcache.n_aliases; i++) 113 for (i = 0; i < current_cpu_data.dcache.n_aliases; i++)
114 mutex_init(&p3map_mutex[i]); 114 mutex_init(&p3map_mutex[i]);
115} 115}
116 116
@@ -200,13 +200,14 @@ void flush_cache_sigtramp(unsigned long addr)
200 : /* no output */ 200 : /* no output */
201 : "m" (__m(v))); 201 : "m" (__m(v)));
202 202
203 index = CACHE_IC_ADDRESS_ARRAY | (v & cpu_data->icache.entry_mask); 203 index = CACHE_IC_ADDRESS_ARRAY |
204 (v & current_cpu_data.icache.entry_mask);
204 205
205 local_irq_save(flags); 206 local_irq_save(flags);
206 jump_to_P2(); 207 jump_to_P2();
207 208
208 for (i = 0; i < cpu_data->icache.ways; 209 for (i = 0; i < current_cpu_data.icache.ways;
209 i++, index += cpu_data->icache.way_incr) 210 i++, index += current_cpu_data.icache.way_incr)
210 ctrl_outl(0, index); /* Clear out Valid-bit */ 211 ctrl_outl(0, index); /* Clear out Valid-bit */
211 212
212 back_to_P1(); 213 back_to_P1();
@@ -223,7 +224,7 @@ static inline void flush_cache_4096(unsigned long start,
223 * All types of SH-4 require PC to be in P2 to operate on the I-cache. 224 * All types of SH-4 require PC to be in P2 to operate on the I-cache.
224 * Some types of SH-4 require PC to be in P2 to operate on the D-cache. 225 * Some types of SH-4 require PC to be in P2 to operate on the D-cache.
225 */ 226 */
226 if ((cpu_data->flags & CPU_HAS_P2_FLUSH_BUG) || 227 if ((current_cpu_data.flags & CPU_HAS_P2_FLUSH_BUG) ||
227 (start < CACHE_OC_ADDRESS_ARRAY)) 228 (start < CACHE_OC_ADDRESS_ARRAY))
228 exec_offset = 0x20000000; 229 exec_offset = 0x20000000;
229 230
@@ -236,16 +237,26 @@ static inline void flush_cache_4096(unsigned long start,
236/* 237/*
237 * Write back & invalidate the D-cache of the page. 238 * Write back & invalidate the D-cache of the page.
238 * (To avoid "alias" issues) 239 * (To avoid "alias" issues)
240 *
241 * This uses a lazy write-back on UP, which is explicitly
242 * disabled on SMP.
239 */ 243 */
240void flush_dcache_page(struct page *page) 244void flush_dcache_page(struct page *page)
241{ 245{
242 if (test_bit(PG_mapped, &page->flags)) { 246#ifndef CONFIG_SMP
247 struct address_space *mapping = page_mapping(page);
248
249 if (mapping && !mapping_mapped(mapping))
250 set_bit(PG_dcache_dirty, &page->flags);
251 else
252#endif
253 {
243 unsigned long phys = PHYSADDR(page_address(page)); 254 unsigned long phys = PHYSADDR(page_address(page));
244 unsigned long addr = CACHE_OC_ADDRESS_ARRAY; 255 unsigned long addr = CACHE_OC_ADDRESS_ARRAY;
245 int i, n; 256 int i, n;
246 257
247 /* Loop all the D-cache */ 258 /* Loop all the D-cache */
248 n = cpu_data->dcache.n_aliases; 259 n = current_cpu_data.dcache.n_aliases;
249 for (i = 0; i < n; i++, addr += 4096) 260 for (i = 0; i < n; i++, addr += 4096)
250 flush_cache_4096(addr, phys); 261 flush_cache_4096(addr, phys);
251 } 262 }
@@ -277,7 +288,7 @@ static inline void flush_icache_all(void)
277 288
278void flush_dcache_all(void) 289void flush_dcache_all(void)
279{ 290{
280 (*__flush_dcache_segment_fn)(0UL, cpu_data->dcache.way_size); 291 (*__flush_dcache_segment_fn)(0UL, current_cpu_data.dcache.way_size);
281 wmb(); 292 wmb();
282} 293}
283 294
@@ -291,8 +302,8 @@ static void __flush_cache_mm(struct mm_struct *mm, unsigned long start,
291 unsigned long end) 302 unsigned long end)
292{ 303{
293 unsigned long d = 0, p = start & PAGE_MASK; 304 unsigned long d = 0, p = start & PAGE_MASK;
294 unsigned long alias_mask = cpu_data->dcache.alias_mask; 305 unsigned long alias_mask = current_cpu_data.dcache.alias_mask;
295 unsigned long n_aliases = cpu_data->dcache.n_aliases; 306 unsigned long n_aliases = current_cpu_data.dcache.n_aliases;
296 unsigned long select_bit; 307 unsigned long select_bit;
297 unsigned long all_aliases_mask; 308 unsigned long all_aliases_mask;
298 unsigned long addr_offset; 309 unsigned long addr_offset;
@@ -379,7 +390,7 @@ void flush_cache_mm(struct mm_struct *mm)
379 * If cache is only 4k-per-way, there are never any 'aliases'. Since 390 * If cache is only 4k-per-way, there are never any 'aliases'. Since
380 * the cache is physically tagged, the data can just be left in there. 391 * the cache is physically tagged, the data can just be left in there.
381 */ 392 */
382 if (cpu_data->dcache.n_aliases == 0) 393 if (current_cpu_data.dcache.n_aliases == 0)
383 return; 394 return;
384 395
385 /* 396 /*
@@ -416,7 +427,7 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
416 unsigned long phys = pfn << PAGE_SHIFT; 427 unsigned long phys = pfn << PAGE_SHIFT;
417 unsigned int alias_mask; 428 unsigned int alias_mask;
418 429
419 alias_mask = cpu_data->dcache.alias_mask; 430 alias_mask = current_cpu_data.dcache.alias_mask;
420 431
421 /* We only need to flush D-cache when we have alias */ 432 /* We only need to flush D-cache when we have alias */
422 if ((address^phys) & alias_mask) { 433 if ((address^phys) & alias_mask) {
@@ -430,7 +441,7 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
430 phys); 441 phys);
431 } 442 }
432 443
433 alias_mask = cpu_data->icache.alias_mask; 444 alias_mask = current_cpu_data.icache.alias_mask;
434 if (vma->vm_flags & VM_EXEC) { 445 if (vma->vm_flags & VM_EXEC) {
435 /* 446 /*
436 * Evict entries from the portion of the cache from which code 447 * Evict entries from the portion of the cache from which code
@@ -462,7 +473,7 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
462 * If cache is only 4k-per-way, there are never any 'aliases'. Since 473 * If cache is only 4k-per-way, there are never any 'aliases'. Since
463 * the cache is physically tagged, the data can just be left in there. 474 * the cache is physically tagged, the data can just be left in there.
464 */ 475 */
465 if (cpu_data->dcache.n_aliases == 0) 476 if (current_cpu_data.dcache.n_aliases == 0)
466 return; 477 return;
467 478
468 /* 479 /*
@@ -523,7 +534,7 @@ static void __flush_cache_4096(unsigned long addr, unsigned long phys,
523 unsigned long a, ea, p; 534 unsigned long a, ea, p;
524 unsigned long temp_pc; 535 unsigned long temp_pc;
525 536
526 dcache = &cpu_data->dcache; 537 dcache = &current_cpu_data.dcache;
527 /* Write this way for better assembly. */ 538 /* Write this way for better assembly. */
528 way_count = dcache->ways; 539 way_count = dcache->ways;
529 way_incr = dcache->way_incr; 540 way_incr = dcache->way_incr;
@@ -598,7 +609,7 @@ static void __flush_dcache_segment_1way(unsigned long start,
598 base_addr = ((base_addr >> 16) << 16); 609 base_addr = ((base_addr >> 16) << 16);
599 base_addr |= start; 610 base_addr |= start;
600 611
601 dcache = &cpu_data->dcache; 612 dcache = &current_cpu_data.dcache;
602 linesz = dcache->linesz; 613 linesz = dcache->linesz;
603 way_incr = dcache->way_incr; 614 way_incr = dcache->way_incr;
604 way_size = dcache->way_size; 615 way_size = dcache->way_size;
@@ -640,7 +651,7 @@ static void __flush_dcache_segment_2way(unsigned long start,
640 base_addr = ((base_addr >> 16) << 16); 651 base_addr = ((base_addr >> 16) << 16);
641 base_addr |= start; 652 base_addr |= start;
642 653
643 dcache = &cpu_data->dcache; 654 dcache = &current_cpu_data.dcache;
644 linesz = dcache->linesz; 655 linesz = dcache->linesz;
645 way_incr = dcache->way_incr; 656 way_incr = dcache->way_incr;
646 way_size = dcache->way_size; 657 way_size = dcache->way_size;
@@ -699,7 +710,7 @@ static void __flush_dcache_segment_4way(unsigned long start,
699 base_addr = ((base_addr >> 16) << 16); 710 base_addr = ((base_addr >> 16) << 16);
700 base_addr |= start; 711 base_addr |= start;
701 712
702 dcache = &cpu_data->dcache; 713 dcache = &current_cpu_data.dcache;
703 linesz = dcache->linesz; 714 linesz = dcache->linesz;
704 way_incr = dcache->way_incr; 715 way_incr = dcache->way_incr;
705 way_size = dcache->way_size; 716 way_size = dcache->way_size;
diff --git a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c
index 045abdf078f5..31f8deb7a158 100644
--- a/arch/sh/mm/cache-sh7705.c
+++ b/arch/sh/mm/cache-sh7705.c
@@ -3,11 +3,11 @@
3 * 3 *
4 * Copyright (C) 1999, 2000 Niibe Yutaka 4 * Copyright (C) 1999, 2000 Niibe Yutaka
5 * Copyright (C) 2004 Alex Song 5 * Copyright (C) 2004 Alex Song
6 * Copyright (C) 2006 Paul Mundt
6 * 7 *
7 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 10 * for more details.
10 *
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mman.h> 13#include <linux/mman.h>
@@ -32,9 +32,9 @@ static inline void cache_wback_all(void)
32{ 32{
33 unsigned long ways, waysize, addrstart; 33 unsigned long ways, waysize, addrstart;
34 34
35 ways = cpu_data->dcache.ways; 35 ways = current_cpu_data.dcache.ways;
36 waysize = cpu_data->dcache.sets; 36 waysize = current_cpu_data.dcache.sets;
37 waysize <<= cpu_data->dcache.entry_shift; 37 waysize <<= current_cpu_data.dcache.entry_shift;
38 38
39 addrstart = CACHE_OC_ADDRESS_ARRAY; 39 addrstart = CACHE_OC_ADDRESS_ARRAY;
40 40
@@ -43,7 +43,7 @@ static inline void cache_wback_all(void)
43 43
44 for (addr = addrstart; 44 for (addr = addrstart;
45 addr < addrstart + waysize; 45 addr < addrstart + waysize;
46 addr += cpu_data->dcache.linesz) { 46 addr += current_cpu_data.dcache.linesz) {
47 unsigned long data; 47 unsigned long data;
48 int v = SH_CACHE_UPDATED | SH_CACHE_VALID; 48 int v = SH_CACHE_UPDATED | SH_CACHE_VALID;
49 49
@@ -51,10 +51,9 @@ static inline void cache_wback_all(void)
51 51
52 if ((data & v) == v) 52 if ((data & v) == v)
53 ctrl_outl(data & ~v, addr); 53 ctrl_outl(data & ~v, addr);
54
55 } 54 }
56 55
57 addrstart += cpu_data->dcache.way_incr; 56 addrstart += current_cpu_data.dcache.way_incr;
58 } while (--ways); 57 } while (--ways);
59} 58}
60 59
@@ -94,9 +93,9 @@ static void __flush_dcache_page(unsigned long phys)
94 local_irq_save(flags); 93 local_irq_save(flags);
95 jump_to_P2(); 94 jump_to_P2();
96 95
97 ways = cpu_data->dcache.ways; 96 ways = current_cpu_data.dcache.ways;
98 waysize = cpu_data->dcache.sets; 97 waysize = current_cpu_data.dcache.sets;
99 waysize <<= cpu_data->dcache.entry_shift; 98 waysize <<= current_cpu_data.dcache.entry_shift;
100 99
101 addrstart = CACHE_OC_ADDRESS_ARRAY; 100 addrstart = CACHE_OC_ADDRESS_ARRAY;
102 101
@@ -105,7 +104,7 @@ static void __flush_dcache_page(unsigned long phys)
105 104
106 for (addr = addrstart; 105 for (addr = addrstart;
107 addr < addrstart + waysize; 106 addr < addrstart + waysize;
108 addr += cpu_data->dcache.linesz) { 107 addr += current_cpu_data.dcache.linesz) {
109 unsigned long data; 108 unsigned long data;
110 109
111 data = ctrl_inl(addr) & (0x1ffffC00 | SH_CACHE_VALID); 110 data = ctrl_inl(addr) & (0x1ffffC00 | SH_CACHE_VALID);
@@ -115,7 +114,7 @@ static void __flush_dcache_page(unsigned long phys)
115 } 114 }
116 } 115 }
117 116
118 addrstart += cpu_data->dcache.way_incr; 117 addrstart += current_cpu_data.dcache.way_incr;
119 } while (--ways); 118 } while (--ways);
120 119
121 back_to_P1(); 120 back_to_P1();
@@ -128,7 +127,11 @@ static void __flush_dcache_page(unsigned long phys)
128 */ 127 */
129void flush_dcache_page(struct page *page) 128void flush_dcache_page(struct page *page)
130{ 129{
131 if (test_bit(PG_mapped, &page->flags)) 130 struct address_space *mapping = page_mapping(page);
131
132 if (mapping && !mapping_mapped(mapping))
133 set_bit(PG_dcache_dirty, &page->flags);
134 else
132 __flush_dcache_page(PHYSADDR(page_address(page))); 135 __flush_dcache_page(PHYSADDR(page_address(page)));
133} 136}
134 137
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 716ebf568af2..fa5d7f0b9f18 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -17,6 +17,7 @@
17#include <linux/kprobes.h> 17#include <linux/kprobes.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
20#include <asm/tlbflush.h>
20#include <asm/kgdb.h> 21#include <asm/kgdb.h>
21 22
22extern void die(const char *,struct pt_regs *,long); 23extern void die(const char *,struct pt_regs *,long);
@@ -224,3 +225,89 @@ do_sigbus:
224 if (!user_mode(regs)) 225 if (!user_mode(regs))
225 goto no_context; 226 goto no_context;
226} 227}
228
229#ifdef CONFIG_SH_STORE_QUEUES
230/*
231 * This is a special case for the SH-4 store queues, as pages for this
232 * space still need to be faulted in before it's possible to flush the
233 * store queue cache for writeout to the remapped region.
234 */
235#define P3_ADDR_MAX (P4SEG_STORE_QUE + 0x04000000)
236#else
237#define P3_ADDR_MAX P4SEG
238#endif
239
240/*
241 * Called with interrupts disabled.
242 */
243asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
244 unsigned long writeaccess,
245 unsigned long address)
246{
247 pgd_t *pgd;
248 pud_t *pud;
249 pmd_t *pmd;
250 pte_t *pte;
251 pte_t entry;
252 struct mm_struct *mm = current->mm;
253 spinlock_t *ptl;
254 int ret = 1;
255
256#ifdef CONFIG_SH_KGDB
257 if (kgdb_nofault && kgdb_bus_err_hook)
258 kgdb_bus_err_hook();
259#endif
260
261 /*
262 * We don't take page faults for P1, P2, and parts of P4, these
263 * are always mapped, whether it be due to legacy behaviour in
264 * 29-bit mode, or due to PMB configuration in 32-bit mode.
265 */
266 if (address >= P3SEG && address < P3_ADDR_MAX) {
267 pgd = pgd_offset_k(address);
268 mm = NULL;
269 } else {
270 if (unlikely(address >= TASK_SIZE || !mm))
271 return 1;
272
273 pgd = pgd_offset(mm, address);
274 }
275
276 pud = pud_offset(pgd, address);
277 if (pud_none_or_clear_bad(pud))
278 return 1;
279 pmd = pmd_offset(pud, address);
280 if (pmd_none_or_clear_bad(pmd))
281 return 1;
282
283 if (mm)
284 pte = pte_offset_map_lock(mm, pmd, address, &ptl);
285 else
286 pte = pte_offset_kernel(pmd, address);
287
288 entry = *pte;
289 if (unlikely(pte_none(entry) || pte_not_present(entry)))
290 goto unlock;
291 if (unlikely(writeaccess && !pte_write(entry)))
292 goto unlock;
293
294 if (writeaccess)
295 entry = pte_mkdirty(entry);
296 entry = pte_mkyoung(entry);
297
298#ifdef CONFIG_CPU_SH4
299 /*
300 * ITLB is not affected by "ldtlb" instruction.
301 * So, we need to flush the entry by ourselves.
302 */
303 local_flush_tlb_one(get_asid(), address & PAGE_MASK);
304#endif
305
306 set_pte(pte, entry);
307 update_mmu_cache(NULL, address, entry);
308 ret = 0;
309unlock:
310 if (mm)
311 pte_unmap_unlock(pte, ptl);
312 return ret;
313}
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 29bd37b1488e..ae957a932375 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -39,11 +39,6 @@
39DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 39DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
40pgd_t swapper_pg_dir[PTRS_PER_PGD]; 40pgd_t swapper_pg_dir[PTRS_PER_PGD];
41 41
42/*
43 * Cache of MMU context last used.
44 */
45unsigned long mmu_context_cache = NO_CONTEXT;
46
47#ifdef CONFIG_MMU 42#ifdef CONFIG_MMU
48/* It'd be good if these lines were in the standard header file. */ 43/* It'd be good if these lines were in the standard header file. */
49#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT) 44#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
@@ -111,7 +106,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
111 106
112 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot)); 107 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
113 108
114 __flush_tlb_page(get_asid(), addr); 109 flush_tlb_one(get_asid(), addr);
115} 110}
116 111
117/* 112/*
@@ -158,7 +153,6 @@ void __init paging_init(void)
158 * Setup some defaults for the zone sizes.. these should be safe 153 * Setup some defaults for the zone sizes.. these should be safe
159 * regardless of distcontiguous memory or MMU settings. 154 * regardless of distcontiguous memory or MMU settings.
160 */ 155 */
161 zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT;
162 zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT; 156 zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT;
163#ifdef CONFIG_HIGHMEM 157#ifdef CONFIG_HIGHMEM
164 zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT; 158 zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT;
@@ -170,8 +164,6 @@ void __init paging_init(void)
170 * the zone sizes accordingly, in addition to turning it on. 164 * the zone sizes accordingly, in addition to turning it on.
171 */ 165 */
172 { 166 {
173 unsigned long max_dma, low, start_pfn;
174
175 /* We don't need to map the kernel through the TLB, as 167 /* We don't need to map the kernel through the TLB, as
176 * it is permanatly mapped using P1. So clear the 168 * it is permanatly mapped using P1. So clear the
177 * entire pgd. */ 169 * entire pgd. */
@@ -179,19 +171,7 @@ void __init paging_init(void)
179 171
180 /* Turn on the MMU */ 172 /* Turn on the MMU */
181 enable_mmu(); 173 enable_mmu();
182 174 zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN;
183 /* Fixup the zone sizes */
184 start_pfn = START_PFN;
185 max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
186 low = MAX_LOW_PFN;
187
188 if (low < max_dma) {
189 zones_size[ZONE_DMA] = low - start_pfn;
190 zones_size[ZONE_NORMAL] = 0;
191 } else {
192 zones_size[ZONE_DMA] = max_dma - start_pfn;
193 zones_size[ZONE_NORMAL] = low - max_dma;
194 }
195 } 175 }
196 176
197 /* Set an initial value for the MMU.TTB so we don't have to 177 /* Set an initial value for the MMU.TTB so we don't have to
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c
index 90b494a0cf45..be03d74e99cb 100644
--- a/arch/sh/mm/ioremap.c
+++ b/arch/sh/mm/ioremap.c
@@ -45,12 +45,6 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
45 return NULL; 45 return NULL;
46 46
47 /* 47 /*
48 * Don't remap the low PCI/ISA area, it's always mapped..
49 */
50 if (phys_addr >= 0xA0000 && last_addr < 0x100000)
51 return (void __iomem *)phys_to_virt(phys_addr);
52
53 /*
54 * If we're on an SH7751 or SH7780 PCI controller, PCI memory is 48 * If we're on an SH7751 or SH7780 PCI controller, PCI memory is
55 * mapped at the end of the address space (typically 0xfd000000) 49 * mapped at the end of the address space (typically 0xfd000000)
56 * in a non-translatable area, so mapping through page tables for 50 * in a non-translatable area, so mapping through page tables for
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c
index 3f98d2a4f936..969efeceb928 100644
--- a/arch/sh/mm/pg-sh4.c
+++ b/arch/sh/mm/pg-sh4.c
@@ -13,7 +13,7 @@
13 13
14extern struct mutex p3map_mutex[]; 14extern struct mutex p3map_mutex[];
15 15
16#define CACHE_ALIAS (cpu_data->dcache.alias_mask) 16#define CACHE_ALIAS (current_cpu_data.dcache.alias_mask)
17 17
18/* 18/*
19 * clear_user_page 19 * clear_user_page
@@ -23,7 +23,6 @@ extern struct mutex p3map_mutex[];
23 */ 23 */
24void clear_user_page(void *to, unsigned long address, struct page *page) 24void clear_user_page(void *to, unsigned long address, struct page *page)
25{ 25{
26 __set_bit(PG_mapped, &page->flags);
27 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) 26 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0)
28 clear_page(to); 27 clear_page(to);
29 else { 28 else {
@@ -40,7 +39,7 @@ void clear_user_page(void *to, unsigned long address, struct page *page)
40 mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); 39 mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]);
41 set_pte(pte, entry); 40 set_pte(pte, entry);
42 local_irq_save(flags); 41 local_irq_save(flags);
43 __flush_tlb_page(get_asid(), p3_addr); 42 flush_tlb_one(get_asid(), p3_addr);
44 local_irq_restore(flags); 43 local_irq_restore(flags);
45 update_mmu_cache(NULL, p3_addr, entry); 44 update_mmu_cache(NULL, p3_addr, entry);
46 __clear_user_page((void *)p3_addr, to); 45 __clear_user_page((void *)p3_addr, to);
@@ -59,7 +58,6 @@ void clear_user_page(void *to, unsigned long address, struct page *page)
59void copy_user_page(void *to, void *from, unsigned long address, 58void copy_user_page(void *to, void *from, unsigned long address,
60 struct page *page) 59 struct page *page)
61{ 60{
62 __set_bit(PG_mapped, &page->flags);
63 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) 61 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0)
64 copy_page(to, from); 62 copy_page(to, from);
65 else { 63 else {
@@ -76,7 +74,7 @@ void copy_user_page(void *to, void *from, unsigned long address,
76 mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); 74 mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]);
77 set_pte(pte, entry); 75 set_pte(pte, entry);
78 local_irq_save(flags); 76 local_irq_save(flags);
79 __flush_tlb_page(get_asid(), p3_addr); 77 flush_tlb_one(get_asid(), p3_addr);
80 local_irq_restore(flags); 78 local_irq_restore(flags);
81 update_mmu_cache(NULL, p3_addr, entry); 79 update_mmu_cache(NULL, p3_addr, entry);
82 __copy_user_page((void *)p3_addr, from, to); 80 __copy_user_page((void *)p3_addr, from, to);
@@ -84,23 +82,3 @@ void copy_user_page(void *to, void *from, unsigned long address,
84 mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); 82 mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]);
85 } 83 }
86} 84}
87
88/*
89 * For SH-4, we have our own implementation for ptep_get_and_clear
90 */
91inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
92{
93 pte_t pte = *ptep;
94
95 pte_clear(mm, addr, ptep);
96 if (!pte_not_present(pte)) {
97 unsigned long pfn = pte_pfn(pte);
98 if (pfn_valid(pfn)) {
99 struct page *page = pfn_to_page(pfn);
100 struct address_space *mapping = page_mapping(page);
101 if (!mapping || !mapping_writably_mapped(mapping))
102 __clear_bit(PG_mapped, &page->flags);
103 }
104 }
105 return pte;
106}
diff --git a/arch/sh/mm/pg-sh7705.c b/arch/sh/mm/pg-sh7705.c
index ff9ece986cbc..887ab9d18ccd 100644
--- a/arch/sh/mm/pg-sh7705.c
+++ b/arch/sh/mm/pg-sh7705.c
@@ -7,9 +7,7 @@
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 *
11 */ 10 */
12
13#include <linux/init.h> 11#include <linux/init.h>
14#include <linux/mman.h> 12#include <linux/mman.h>
15#include <linux/mm.h> 13#include <linux/mm.h>
@@ -45,13 +43,13 @@ static inline void __flush_purge_virtual_region(void *p1, void *virt, int size)
45 43
46 p = __pa(p1_begin); 44 p = __pa(p1_begin);
47 45
48 ways = cpu_data->dcache.ways; 46 ways = current_cpu_data.dcache.ways;
49 addr = CACHE_OC_ADDRESS_ARRAY; 47 addr = CACHE_OC_ADDRESS_ARRAY;
50 48
51 do { 49 do {
52 unsigned long data; 50 unsigned long data;
53 51
54 addr |= (v & cpu_data->dcache.entry_mask); 52 addr |= (v & current_cpu_data.dcache.entry_mask);
55 53
56 data = ctrl_inl(addr); 54 data = ctrl_inl(addr);
57 if ((data & CACHE_PHYSADDR_MASK) == 55 if ((data & CACHE_PHYSADDR_MASK) ==
@@ -60,7 +58,7 @@ static inline void __flush_purge_virtual_region(void *p1, void *virt, int size)
60 ctrl_outl(data, addr); 58 ctrl_outl(data, addr);
61 } 59 }
62 60
63 addr += cpu_data->dcache.way_incr; 61 addr += current_cpu_data.dcache.way_incr;
64 } while (--ways); 62 } while (--ways);
65 63
66 p1_begin += L1_CACHE_BYTES; 64 p1_begin += L1_CACHE_BYTES;
@@ -76,7 +74,6 @@ void clear_user_page(void *to, unsigned long address, struct page *pg)
76{ 74{
77 struct page *page = virt_to_page(to); 75 struct page *page = virt_to_page(to);
78 76
79 __set_bit(PG_mapped, &page->flags);
80 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) { 77 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) {
81 clear_page(to); 78 clear_page(to);
82 __flush_wback_region(to, PAGE_SIZE); 79 __flush_wback_region(to, PAGE_SIZE);
@@ -95,12 +92,11 @@ void clear_user_page(void *to, unsigned long address, struct page *pg)
95 * @from: P1 address 92 * @from: P1 address
96 * @address: U0 address to be mapped 93 * @address: U0 address to be mapped
97 */ 94 */
98void copy_user_page(void *to, void *from, unsigned long address, struct page *pg) 95void copy_user_page(void *to, void *from, unsigned long address,
96 struct page *pg)
99{ 97{
100 struct page *page = virt_to_page(to); 98 struct page *page = virt_to_page(to);
101 99
102
103 __set_bit(PG_mapped, &page->flags);
104 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) { 100 if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) {
105 copy_page(to, from); 101 copy_page(to, from);
106 __flush_wback_region(to, PAGE_SIZE); 102 __flush_wback_region(to, PAGE_SIZE);
@@ -112,26 +108,3 @@ void copy_user_page(void *to, void *from, unsigned long address, struct page *pg
112 __flush_wback_region(to, PAGE_SIZE); 108 __flush_wback_region(to, PAGE_SIZE);
113 } 109 }
114} 110}
115
116/*
117 * For SH7705, we have our own implementation for ptep_get_and_clear
118 * Copied from pg-sh4.c
119 */
120inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
121{
122 pte_t pte = *ptep;
123
124 pte_clear(mm, addr, ptep);
125 if (!pte_not_present(pte)) {
126 unsigned long pfn = pte_pfn(pte);
127 if (pfn_valid(pfn)) {
128 struct page *page = pfn_to_page(pfn);
129 struct address_space *mapping = page_mapping(page);
130 if (!mapping || !mapping_writably_mapped(mapping))
131 __clear_bit(PG_mapped, &page->flags);
132 }
133 }
134
135 return pte;
136}
137
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index b60ad83a7635..d0d45e2e0ab3 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -378,7 +378,7 @@ static int pmb_debugfs_open(struct inode *inode, struct file *file)
378 return single_open(file, pmb_seq_show, NULL); 378 return single_open(file, pmb_seq_show, NULL);
379} 379}
380 380
381static struct file_operations pmb_debugfs_fops = { 381static const struct file_operations pmb_debugfs_fops = {
382 .owner = THIS_MODULE, 382 .owner = THIS_MODULE,
383 .open = pmb_debugfs_open, 383 .open = pmb_debugfs_open,
384 .read = seq_read, 384 .read = seq_read,
diff --git a/arch/sh/mm/tlb-flush.c b/arch/sh/mm/tlb-flush.c
index 73ec7f6084fa..d2f7b4a2eb05 100644
--- a/arch/sh/mm/tlb-flush.c
+++ b/arch/sh/mm/tlb-flush.c
@@ -2,24 +2,28 @@
2 * TLB flushing operations for SH with an MMU. 2 * TLB flushing operations for SH with an MMU.
3 * 3 *
4 * Copyright (C) 1999 Niibe Yutaka 4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2003 Paul Mundt 5 * Copyright (C) 2003 - 2006 Paul Mundt
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 */ 10 */
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/io.h>
12#include <asm/mmu_context.h> 13#include <asm/mmu_context.h>
13#include <asm/tlbflush.h> 14#include <asm/tlbflush.h>
15#include <asm/cacheflush.h>
14 16
15void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) 17void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
16{ 18{
17 if (vma->vm_mm && vma->vm_mm->context.id != NO_CONTEXT) { 19 unsigned int cpu = smp_processor_id();
20
21 if (vma->vm_mm && cpu_context(cpu, vma->vm_mm) != NO_CONTEXT) {
18 unsigned long flags; 22 unsigned long flags;
19 unsigned long asid; 23 unsigned long asid;
20 unsigned long saved_asid = MMU_NO_ASID; 24 unsigned long saved_asid = MMU_NO_ASID;
21 25
22 asid = vma->vm_mm->context.id & MMU_CONTEXT_ASID_MASK; 26 asid = cpu_asid(cpu, vma->vm_mm);
23 page &= PAGE_MASK; 27 page &= PAGE_MASK;
24 28
25 local_irq_save(flags); 29 local_irq_save(flags);
@@ -27,33 +31,34 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
27 saved_asid = get_asid(); 31 saved_asid = get_asid();
28 set_asid(asid); 32 set_asid(asid);
29 } 33 }
30 __flush_tlb_page(asid, page); 34 local_flush_tlb_one(asid, page);
31 if (saved_asid != MMU_NO_ASID) 35 if (saved_asid != MMU_NO_ASID)
32 set_asid(saved_asid); 36 set_asid(saved_asid);
33 local_irq_restore(flags); 37 local_irq_restore(flags);
34 } 38 }
35} 39}
36 40
37void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 41void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
38 unsigned long end) 42 unsigned long end)
39{ 43{
40 struct mm_struct *mm = vma->vm_mm; 44 struct mm_struct *mm = vma->vm_mm;
45 unsigned int cpu = smp_processor_id();
41 46
42 if (mm->context.id != NO_CONTEXT) { 47 if (cpu_context(cpu, mm) != NO_CONTEXT) {
43 unsigned long flags; 48 unsigned long flags;
44 int size; 49 int size;
45 50
46 local_irq_save(flags); 51 local_irq_save(flags);
47 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; 52 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
48 if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */ 53 if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */
49 mm->context.id = NO_CONTEXT; 54 cpu_context(cpu, mm) = NO_CONTEXT;
50 if (mm == current->mm) 55 if (mm == current->mm)
51 activate_context(mm); 56 activate_context(mm, cpu);
52 } else { 57 } else {
53 unsigned long asid; 58 unsigned long asid;
54 unsigned long saved_asid = MMU_NO_ASID; 59 unsigned long saved_asid = MMU_NO_ASID;
55 60
56 asid = mm->context.id & MMU_CONTEXT_ASID_MASK; 61 asid = cpu_asid(cpu, mm);
57 start &= PAGE_MASK; 62 start &= PAGE_MASK;
58 end += (PAGE_SIZE - 1); 63 end += (PAGE_SIZE - 1);
59 end &= PAGE_MASK; 64 end &= PAGE_MASK;
@@ -62,7 +67,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
62 set_asid(asid); 67 set_asid(asid);
63 } 68 }
64 while (start < end) { 69 while (start < end) {
65 __flush_tlb_page(asid, start); 70 local_flush_tlb_one(asid, start);
66 start += PAGE_SIZE; 71 start += PAGE_SIZE;
67 } 72 }
68 if (saved_asid != MMU_NO_ASID) 73 if (saved_asid != MMU_NO_ASID)
@@ -72,26 +77,27 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
72 } 77 }
73} 78}
74 79
75void flush_tlb_kernel_range(unsigned long start, unsigned long end) 80void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
76{ 81{
82 unsigned int cpu = smp_processor_id();
77 unsigned long flags; 83 unsigned long flags;
78 int size; 84 int size;
79 85
80 local_irq_save(flags); 86 local_irq_save(flags);
81 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; 87 size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
82 if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */ 88 if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */
83 flush_tlb_all(); 89 local_flush_tlb_all();
84 } else { 90 } else {
85 unsigned long asid; 91 unsigned long asid;
86 unsigned long saved_asid = get_asid(); 92 unsigned long saved_asid = get_asid();
87 93
88 asid = init_mm.context.id & MMU_CONTEXT_ASID_MASK; 94 asid = cpu_asid(cpu, &init_mm);
89 start &= PAGE_MASK; 95 start &= PAGE_MASK;
90 end += (PAGE_SIZE - 1); 96 end += (PAGE_SIZE - 1);
91 end &= PAGE_MASK; 97 end &= PAGE_MASK;
92 set_asid(asid); 98 set_asid(asid);
93 while (start < end) { 99 while (start < end) {
94 __flush_tlb_page(asid, start); 100 local_flush_tlb_one(asid, start);
95 start += PAGE_SIZE; 101 start += PAGE_SIZE;
96 } 102 }
97 set_asid(saved_asid); 103 set_asid(saved_asid);
@@ -99,22 +105,24 @@ void flush_tlb_kernel_range(unsigned long start, unsigned long end)
99 local_irq_restore(flags); 105 local_irq_restore(flags);
100} 106}
101 107
102void flush_tlb_mm(struct mm_struct *mm) 108void local_flush_tlb_mm(struct mm_struct *mm)
103{ 109{
110 unsigned int cpu = smp_processor_id();
111
104 /* Invalidate all TLB of this process. */ 112 /* Invalidate all TLB of this process. */
105 /* Instead of invalidating each TLB, we get new MMU context. */ 113 /* Instead of invalidating each TLB, we get new MMU context. */
106 if (mm->context.id != NO_CONTEXT) { 114 if (cpu_context(cpu, mm) != NO_CONTEXT) {
107 unsigned long flags; 115 unsigned long flags;
108 116
109 local_irq_save(flags); 117 local_irq_save(flags);
110 mm->context.id = NO_CONTEXT; 118 cpu_context(cpu, mm) = NO_CONTEXT;
111 if (mm == current->mm) 119 if (mm == current->mm)
112 activate_context(mm); 120 activate_context(mm, cpu);
113 local_irq_restore(flags); 121 local_irq_restore(flags);
114 } 122 }
115} 123}
116 124
117void flush_tlb_all(void) 125void local_flush_tlb_all(void)
118{ 126{
119 unsigned long flags, status; 127 unsigned long flags, status;
120 128
@@ -132,3 +140,54 @@ void flush_tlb_all(void)
132 ctrl_barrier(); 140 ctrl_barrier();
133 local_irq_restore(flags); 141 local_irq_restore(flags);
134} 142}
143
144void update_mmu_cache(struct vm_area_struct *vma,
145 unsigned long address, pte_t pte)
146{
147 unsigned long flags;
148 unsigned long pteval;
149 unsigned long vpn;
150 struct page *page;
151 unsigned long pfn = pte_pfn(pte);
152 struct address_space *mapping;
153
154 if (!pfn_valid(pfn))
155 return;
156
157 page = pfn_to_page(pfn);
158 mapping = page_mapping(page);
159 if (mapping) {
160 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
161 int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags);
162
163 if (dirty)
164 __flush_wback_region((void *)P1SEGADDR(phys),
165 PAGE_SIZE);
166 }
167
168 local_irq_save(flags);
169
170 /* Set PTEH register */
171 vpn = (address & MMU_VPN_MASK) | get_asid();
172 ctrl_outl(vpn, MMU_PTEH);
173
174 pteval = pte_val(pte);
175
176#ifdef CONFIG_CPU_HAS_PTEA
177 /* Set PTEA register */
178 /* TODO: make this look less hacky */
179 ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA);
180#endif
181
182 /* Set PTEL register */
183 pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */
184#if defined(CONFIG_SH_WRITETHROUGH) && defined(CONFIG_CPU_SH4)
185 pteval |= _PAGE_WT;
186#endif
187 /* conveniently, we want all the software flags to be 0 anyway */
188 ctrl_outl(pteval, MMU_PTEL);
189
190 /* Load the TLB */
191 asm volatile("ldtlb": /* no output */ : /* no input */ : "memory");
192 local_irq_restore(flags);
193}
diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/tlb-nommu.c
index e55cfea01092..1ccca7c0532e 100644
--- a/arch/sh/mm/tlb-nommu.c
+++ b/arch/sh/mm/tlb-nommu.c
@@ -13,39 +13,33 @@
13/* 13/*
14 * Nothing too terribly exciting here .. 14 * Nothing too terribly exciting here ..
15 */ 15 */
16 16void local_flush_tlb_all(void)
17void flush_tlb(void)
18{
19 BUG();
20}
21
22void flush_tlb_all(void)
23{ 17{
24 BUG(); 18 BUG();
25} 19}
26 20
27void flush_tlb_mm(struct mm_struct *mm) 21void local_flush_tlb_mm(struct mm_struct *mm)
28{ 22{
29 BUG(); 23 BUG();
30} 24}
31 25
32void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 26void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
33 unsigned long end) 27 unsigned long end)
34{ 28{
35 BUG(); 29 BUG();
36} 30}
37 31
38void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) 32void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
39{ 33{
40 BUG(); 34 BUG();
41} 35}
42 36
43void __flush_tlb_page(unsigned long asid, unsigned long page) 37void local_flush_tlb_one(unsigned long asid, unsigned long page)
44{ 38{
45 BUG(); 39 BUG();
46} 40}
47 41
48void flush_tlb_kernel_range(unsigned long start, unsigned long end) 42void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
49{ 43{
50 BUG(); 44 BUG();
51} 45}
@@ -55,4 +49,3 @@ void update_mmu_cache(struct vm_area_struct * vma,
55{ 49{
56 BUG(); 50 BUG();
57} 51}
58
diff --git a/arch/sh/mm/tlb-sh3.c b/arch/sh/mm/tlb-sh3.c
index 46b09e26e082..e5e76eb7ee09 100644
--- a/arch/sh/mm/tlb-sh3.c
+++ b/arch/sh/mm/tlb-sh3.c
@@ -8,71 +8,11 @@
8 * 8 *
9 * Released under the terms of the GNU GPL v2.0. 9 * Released under the terms of the GNU GPL v2.0.
10 */ 10 */
11#include <linux/signal.h> 11#include <linux/io.h>
12#include <linux/sched.h>
13#include <linux/kernel.h>
14#include <linux/errno.h>
15#include <linux/string.h>
16#include <linux/types.h>
17#include <linux/ptrace.h>
18#include <linux/mman.h>
19#include <linux/mm.h>
20#include <linux/smp.h>
21#include <linux/smp_lock.h>
22#include <linux/interrupt.h>
23
24#include <asm/system.h> 12#include <asm/system.h>
25#include <asm/io.h>
26#include <asm/uaccess.h>
27#include <asm/pgalloc.h>
28#include <asm/mmu_context.h> 13#include <asm/mmu_context.h>
29#include <asm/cacheflush.h>
30 14
31void update_mmu_cache(struct vm_area_struct * vma, 15void local_flush_tlb_one(unsigned long asid, unsigned long page)
32 unsigned long address, pte_t pte)
33{
34 unsigned long flags;
35 unsigned long pteval;
36 unsigned long vpn;
37
38 /* Ptrace may call this routine. */
39 if (vma && current->active_mm != vma->vm_mm)
40 return;
41
42#if defined(CONFIG_SH7705_CACHE_32KB)
43 {
44 struct page *page = pte_page(pte);
45 unsigned long pfn = pte_pfn(pte);
46
47 if (pfn_valid(pfn) && !test_bit(PG_mapped, &page->flags)) {
48 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
49
50 __flush_wback_region((void *)P1SEGADDR(phys),
51 PAGE_SIZE);
52 __set_bit(PG_mapped, &page->flags);
53 }
54 }
55#endif
56
57 local_irq_save(flags);
58
59 /* Set PTEH register */
60 vpn = (address & MMU_VPN_MASK) | get_asid();
61 ctrl_outl(vpn, MMU_PTEH);
62
63 pteval = pte_val(pte);
64
65 /* Set PTEL register */
66 pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */
67 /* conveniently, we want all the software flags to be 0 anyway */
68 ctrl_outl(pteval, MMU_PTEL);
69
70 /* Load the TLB */
71 asm volatile("ldtlb": /* no output */ : /* no input */ : "memory");
72 local_irq_restore(flags);
73}
74
75void __flush_tlb_page(unsigned long asid, unsigned long page)
76{ 16{
77 unsigned long addr, data; 17 unsigned long addr, data;
78 int i, ways = MMU_NTLB_WAYS; 18 int i, ways = MMU_NTLB_WAYS;
@@ -86,7 +26,7 @@ void __flush_tlb_page(unsigned long asid, unsigned long page)
86 addr = MMU_TLB_ADDRESS_ARRAY | (page & 0x1F000); 26 addr = MMU_TLB_ADDRESS_ARRAY | (page & 0x1F000);
87 data = (page & 0xfffe0000) | asid; /* VALID bit is off */ 27 data = (page & 0xfffe0000) | asid; /* VALID bit is off */
88 28
89 if ((cpu_data->flags & CPU_HAS_MMU_PAGE_ASSOC)) { 29 if ((current_cpu_data.flags & CPU_HAS_MMU_PAGE_ASSOC)) {
90 addr |= MMU_PAGE_ASSOC_BIT; 30 addr |= MMU_PAGE_ASSOC_BIT;
91 ways = 1; /* we already know the way .. */ 31 ways = 1; /* we already know the way .. */
92 } 32 }
@@ -94,4 +34,3 @@ void __flush_tlb_page(unsigned long asid, unsigned long page)
94 for (i = 0; i < ways; i++) 34 for (i = 0; i < ways; i++)
95 ctrl_outl(data, addr + (i << 8)); 35 ctrl_outl(data, addr + (i << 8));
96} 36}
97
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c
index 812b2d567de2..221e7095473d 100644
--- a/arch/sh/mm/tlb-sh4.c
+++ b/arch/sh/mm/tlb-sh4.c
@@ -8,76 +8,11 @@
8 * 8 *
9 * Released under the terms of the GNU GPL v2.0. 9 * Released under the terms of the GNU GPL v2.0.
10 */ 10 */
11#include <linux/signal.h> 11#include <linux/io.h>
12#include <linux/sched.h>
13#include <linux/kernel.h>
14#include <linux/errno.h>
15#include <linux/string.h>
16#include <linux/types.h>
17#include <linux/ptrace.h>
18#include <linux/mman.h>
19#include <linux/mm.h>
20#include <linux/smp.h>
21#include <linux/smp_lock.h>
22#include <linux/interrupt.h>
23
24#include <asm/system.h> 12#include <asm/system.h>
25#include <asm/io.h>
26#include <asm/uaccess.h>
27#include <asm/pgalloc.h>
28#include <asm/mmu_context.h> 13#include <asm/mmu_context.h>
29#include <asm/cacheflush.h>
30 14
31void update_mmu_cache(struct vm_area_struct * vma, 15void local_flush_tlb_one(unsigned long asid, unsigned long page)
32 unsigned long address, pte_t pte)
33{
34 unsigned long flags;
35 unsigned long pteval;
36 unsigned long vpn;
37 struct page *page;
38 unsigned long pfn;
39
40 /* Ptrace may call this routine. */
41 if (vma && current->active_mm != vma->vm_mm)
42 return;
43
44 pfn = pte_pfn(pte);
45 if (pfn_valid(pfn)) {
46 page = pfn_to_page(pfn);
47 if (!test_bit(PG_mapped, &page->flags)) {
48 unsigned long phys = pte_val(pte) & PTE_PHYS_MASK;
49 __flush_wback_region((void *)P1SEGADDR(phys), PAGE_SIZE);
50 __set_bit(PG_mapped, &page->flags);
51 }
52 }
53
54 local_irq_save(flags);
55
56 /* Set PTEH register */
57 vpn = (address & MMU_VPN_MASK) | get_asid();
58 ctrl_outl(vpn, MMU_PTEH);
59
60 pteval = pte_val(pte);
61
62 /* Set PTEA register */
63 if (cpu_data->flags & CPU_HAS_PTEA)
64 /* TODO: make this look less hacky */
65 ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA);
66
67 /* Set PTEL register */
68 pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */
69#ifdef CONFIG_SH_WRITETHROUGH
70 pteval |= _PAGE_WT;
71#endif
72 /* conveniently, we want all the software flags to be 0 anyway */
73 ctrl_outl(pteval, MMU_PTEL);
74
75 /* Load the TLB */
76 asm volatile("ldtlb": /* no output */ : /* no input */ : "memory");
77 local_irq_restore(flags);
78}
79
80void __flush_tlb_page(unsigned long asid, unsigned long page)
81{ 16{
82 unsigned long addr, data; 17 unsigned long addr, data;
83 18
@@ -93,4 +28,3 @@ void __flush_tlb_page(unsigned long asid, unsigned long page)
93 ctrl_outl(data, addr); 28 ctrl_outl(data, addr);
94 back_to_P1(); 29 back_to_P1();
95} 30}
96
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c
index 60402eec4b4d..ebee7e24ede9 100644
--- a/arch/sh/oprofile/op_model_sh7750.c
+++ b/arch/sh/oprofile/op_model_sh7750.c
@@ -187,7 +187,7 @@ static ssize_t sh7750_write_count(struct file *file, const char __user *buf,
187 return count; 187 return count;
188} 188}
189 189
190static struct file_operations count_fops = { 190static const struct file_operations count_fops = {
191 .read = sh7750_read_count, 191 .read = sh7750_read_count,
192 .write = sh7750_write_count, 192 .write = sh7750_write_count,
193}; 193};
@@ -259,7 +259,7 @@ static struct oprofile_operations sh7750_perf_counter_ops = {
259 259
260int __init oprofile_arch_init(struct oprofile_operations **ops) 260int __init oprofile_arch_init(struct oprofile_operations **ops)
261{ 261{
262 if (!(cpu_data->flags & CPU_HAS_PERF_COUNTER)) 262 if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER))
263 return -ENODEV; 263 return -ENODEV;
264 264
265 sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype(); 265 sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype();
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 0571755e9a84..4fe0f94cbf42 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -16,7 +16,6 @@ HD64461 HD64461
16HD64465 HD64465 16HD64465 HD64465
17SATURN SH_SATURN 17SATURN SH_SATURN
18DREAMCAST SH_DREAMCAST 18DREAMCAST SH_DREAMCAST
19BIGSUR SH_BIGSUR
20MPC1211 SH_MPC1211 19MPC1211 SH_MPC1211
21SNAPGEAR SH_SECUREEDGE5410 20SNAPGEAR SH_SECUREEDGE5410
22HS7751RVOIP SH_HS7751RVOIP 21HS7751RVOIP SH_HS7751RVOIP
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig
index 7bc0744b7ab6..e14b533558c8 100644
--- a/arch/sh64/Kconfig
+++ b/arch/sh64/Kconfig
@@ -36,9 +36,6 @@ config GENERIC_CALIBRATE_DELAY
36config RWSEM_XCHGADD_ALGORITHM 36config RWSEM_XCHGADD_ALGORITHM
37 bool 37 bool
38 38
39config GENERIC_ISA_DMA
40 bool
41
42config ARCH_HAS_ILOG2_U32 39config ARCH_HAS_ILOG2_U32
43 bool 40 bool
44 default n 41 default n
diff --git a/arch/sh64/kernel/setup.c b/arch/sh64/kernel/setup.c
index b9e7d54d7b85..53e9d20a874a 100644
--- a/arch/sh64/kernel/setup.c
+++ b/arch/sh64/kernel/setup.c
@@ -83,7 +83,7 @@ extern int sh64_tlb_init(void);
83#define RAMDISK_PROMPT_FLAG 0x8000 83#define RAMDISK_PROMPT_FLAG 0x8000
84#define RAMDISK_LOAD_FLAG 0x4000 84#define RAMDISK_LOAD_FLAG 0x4000
85 85
86static char command_line[COMMAND_LINE_SIZE] = { 0, }; 86static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
87unsigned long long memory_start = CONFIG_MEMORY_START; 87unsigned long long memory_start = CONFIG_MEMORY_START;
88unsigned long long memory_end = CONFIG_MEMORY_START + (CONFIG_MEMORY_SIZE_IN_MB * 1024 * 1024); 88unsigned long long memory_end = CONFIG_MEMORY_START + (CONFIG_MEMORY_SIZE_IN_MB * 1024 * 1024);
89 89
@@ -95,8 +95,8 @@ static inline void parse_mem_cmdline (char ** cmdline_p)
95 int len = 0; 95 int len = 0;
96 96
97 /* Save unparsed command line copy for /proc/cmdline */ 97 /* Save unparsed command line copy for /proc/cmdline */
98 memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); 98 memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
99 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 99 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
100 100
101 for (;;) { 101 for (;;) {
102 /* 102 /*
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c
index 9c4a38a8698c..390b40de7cef 100644
--- a/arch/sh64/kernel/time.c
+++ b/arch/sh64/kernel/time.c
@@ -579,12 +579,3 @@ void enter_deep_standby(void)
579 asm __volatile__ ("nop"); 579 asm __volatile__ ("nop");
580 panic("Unexpected wakeup!\n"); 580 panic("Unexpected wakeup!\n");
581} 581}
582
583/*
584 * Scheduler clock - returns current time in nanosec units.
585 */
586unsigned long long sched_clock(void)
587{
588 return (unsigned long long)jiffies * (1000000000 / HZ);
589}
590
diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c
index 224b7f5b9224..c346d7ef9280 100644
--- a/arch/sh64/kernel/traps.c
+++ b/arch/sh64/kernel/traps.c
@@ -910,30 +910,57 @@ static int misaligned_fixup(struct pt_regs *regs)
910} 910}
911 911
912static ctl_table unaligned_table[] = { 912static ctl_table unaligned_table[] = {
913 {1, "kernel_reports", &kernel_mode_unaligned_fixup_count, 913 {
914 sizeof(int), 0644, NULL, &proc_dointvec}, 914 .ctl_name = CTL_UNNUMBERED,
915 .procname = "kernel_reports",
916 .data = &kernel_mode_unaligned_fixup_count,
917 .maxlen = sizeof(int),
918 .mode = 0644,
919 .proc_handler = &proc_dointvec
920 },
915#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) 921#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP)
916 {2, "user_reports", &user_mode_unaligned_fixup_count, 922 {
917 sizeof(int), 0644, NULL, &proc_dointvec}, 923 .ctl_name = CTL_UNNUMBERED,
918 {3, "user_enable", &user_mode_unaligned_fixup_enable, 924 .procname = "user_reports",
919 sizeof(int), 0644, NULL, &proc_dointvec}, 925 .data = &user_mode_unaligned_fixup_count,
926 .maxlen = sizeof(int),
927 .mode = 0644,
928 .proc_handler = &proc_dointvec
929 },
930 {
931 .ctl_name = CTL_UNNUMBERED,
932 .procname = "user_enable",
933 .data = &user_mode_unaligned_fixup_enable,
934 .maxlen = sizeof(int),
935 .mode = 0644,
936 .proc_handler = &proc_dointvec},
920#endif 937#endif
921 {0} 938 {}
922}; 939};
923 940
924static ctl_table unaligned_root[] = { 941static ctl_table unaligned_root[] = {
925 {1, "unaligned_fixup", NULL, 0, 0555, unaligned_table}, 942 {
926 {0} 943 .ctl_name = CTL_UNNUMBERED,
944 .procname = "unaligned_fixup",
945 .mode = 0555,
946 unaligned_table
947 },
948 {}
927}; 949};
928 950
929static ctl_table sh64_root[] = { 951static ctl_table sh64_root[] = {
930 {1, "sh64", NULL, 0, 0555, unaligned_root}, 952 {
931 {0} 953 .ctl_name = CTL_UNNUMBERED,
954 .procname = "sh64",
955 .mode = 0555,
956 .child = unaligned_root
957 },
958 {}
932}; 959};
933static struct ctl_table_header *sysctl_header; 960static struct ctl_table_header *sysctl_header;
934static int __init init_sysctl(void) 961static int __init init_sysctl(void)
935{ 962{
936 sysctl_header = register_sysctl_table(sh64_root, 0); 963 sysctl_header = register_sysctl_table(sh64_root);
937 return 0; 964 return 0;
938} 965}
939 966
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
index 95c4d753e357..a59c5e998131 100644
--- a/arch/sh64/kernel/vmlinux.lds.S
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -115,9 +115,13 @@ SECTIONS
115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } 115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
116 __con_initcall_end = .; 116 __con_initcall_end = .;
117 SECURITY_INIT 117 SECURITY_INIT
118
119#ifdef CONFIG_BLK_DEV_INITRD
118 __initramfs_start = .; 120 __initramfs_start = .;
119 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } 121 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
120 __initramfs_end = .; 122 __initramfs_end = .;
123#endif
124
121 . = ALIGN(PAGE_SIZE); 125 . = ALIGN(PAGE_SIZE);
122 __init_end = .; 126 __init_end = .;
123 127
diff --git a/arch/sh64/mm/init.c b/arch/sh64/mm/init.c
index 83295bd21aa7..5dc08787259c 100644
--- a/arch/sh64/mm/init.c
+++ b/arch/sh64/mm/init.c
@@ -118,10 +118,7 @@ void __init paging_init(void)
118 118
119 mmu_context_cache = MMU_CONTEXT_FIRST_VERSION; 119 mmu_context_cache = MMU_CONTEXT_FIRST_VERSION;
120 120
121 /* 121 zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN;
122 * All memory is good as ZONE_NORMAL (fall-through) and ZONE_DMA.
123 */
124 zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN;
125 NODE_DATA(0)->node_mem_map = NULL; 122 NODE_DATA(0)->node_mem_map = NULL;
126 free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); 123 free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
127} 124}
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d0dec1ea2eed..bd992c0048f0 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -13,6 +13,10 @@ config HIGHMEM
13 bool 13 bool
14 default y 14 default y
15 15
16config ZONE_DMA
17 bool
18 default y
19
16config GENERIC_ISA_DMA 20config GENERIC_ISA_DMA
17 bool 21 bool
18 default y 22 default y
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 6616ee05c313..e795f282dece 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -12,7 +12,9 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
12 sys_sparc.o sunos_asm.o systbls.o \ 12 sys_sparc.o sunos_asm.o systbls.o \
13 time.o windows.o cpu.o devices.o sclow.o \ 13 time.o windows.o cpu.o devices.o sclow.o \
14 tadpole.o tick14.o ptrace.o sys_solaris.o \ 14 tadpole.o tick14.o ptrace.o sys_solaris.o \
15 unaligned.o muldiv.o semaphore.o prom.o of_device.o 15 unaligned.o muldiv.o semaphore.o prom.o of_device.o devres.o
16
17devres-y = ../../../kernel/irq/devres.o
16 18
17obj-$(CONFIG_PCI) += pcic.o 19obj-$(CONFIG_PCI) += pcic.o
18obj-$(CONFIG_SUN4) += sun4setup.o 20obj-$(CONFIG_SUN4) += sun4setup.o
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 406dd94afb45..d06a405ca718 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -127,7 +127,7 @@ static int apc_ioctl(struct inode *inode, struct file *f,
127 return 0; 127 return 0;
128} 128}
129 129
130static struct file_operations apc_fops = { 130static const struct file_operations apc_fops = {
131 .ioctl = apc_ioctl, 131 .ioctl = apc_ioctl,
132 .open = apc_open, 132 .open = apc_open,
133 .release = apc_release, 133 .release = apc_release,
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 383526ad94fc..eccd8e87f529 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -246,7 +246,7 @@ void __init setup_arch(char **cmdline_p)
246 246
247 /* Initialize PROM console and command line. */ 247 /* Initialize PROM console and command line. */
248 *cmdline_p = prom_getbootargs(); 248 *cmdline_p = prom_getbootargs();
249 strcpy(saved_command_line, *cmdline_p); 249 strcpy(boot_command_line, *cmdline_p);
250 250
251 /* Set sparc_cpu_model */ 251 /* Set sparc_cpu_model */
252 sparc_cpu_model = sun_unknown; 252 sparc_cpu_model = sun_unknown;
diff --git a/arch/sparc/kernel/sunos_ioctl.c b/arch/sparc/kernel/sunos_ioctl.c
index a6ba3d26222c..32e8274e4357 100644
--- a/arch/sparc/kernel/sunos_ioctl.c
+++ b/arch/sparc/kernel/sunos_ioctl.c
@@ -11,6 +11,7 @@
11#include <linux/errno.h> 11#include <linux/errno.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/termios.h> 13#include <linux/termios.h>
14#include <linux/tty.h>
14#include <linux/ioctl.h> 15#include <linux/ioctl.h>
15#include <linux/route.h> 16#include <linux/route.h>
16#include <linux/sockios.h> 17#include <linux/sockios.h>
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index 0bf8c165fc92..da6606f0cffc 100644
--- a/arch/sparc/kernel/sys_sunos.c
+++ b/arch/sparc/kernel/sys_sunos.c
@@ -859,14 +859,16 @@ asmlinkage int sunos_wait4(pid_t pid, unsigned int __user *stat_addr,
859 return ret; 859 return ret;
860} 860}
861 861
862extern int kill_pg(int, int, int);
863asmlinkage int sunos_killpg(int pgrp, int sig) 862asmlinkage int sunos_killpg(int pgrp, int sig)
864{ 863{
865 int ret; 864 int ret;
866 865
867 lock_kernel(); 866 rcu_read_lock();
868 ret = kill_pg(pgrp, sig, 0); 867 ret = -EINVAL;
869 unlock_kernel(); 868 if (pgrp > 0)
869 ret = kill_pgrp(find_pid(pgrp), sig, 0);
870 rcu_read_unlock();
871
870 return ret; 872 return ret;
871} 873}
872 874
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 2fcce000d877..9bb1240aaf8a 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -436,15 +436,6 @@ static inline unsigned long do_gettimeoffset(void)
436 return (*master_l10_counter >> 10) & 0x1fffff; 436 return (*master_l10_counter >> 10) & 0x1fffff;
437} 437}
438 438
439/*
440 * Returns nanoseconds
441 * XXX This is a suboptimal implementation.
442 */
443unsigned long long sched_clock(void)
444{
445 return (unsigned long long)jiffies * (1000000000 / HZ);
446}
447
448/* Ok, my cute asm atomicity trick doesn't work anymore. 439/* Ok, my cute asm atomicity trick doesn't work anymore.
449 * There are just too many variables that need to be protected 440 * There are just too many variables that need to be protected
450 * now (both members of xtime, et al.) 441 * now (both members of xtime, et al.)
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index b73e6b9067ed..e5c24e0521de 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -57,10 +57,14 @@ SECTIONS
57 .con_initcall.init : { *(.con_initcall.init) } 57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .; 58 __con_initcall_end = .;
59 SECURITY_INIT 59 SECURITY_INIT
60
61#ifdef CONFIG_BLK_DEV_INITRD
60 . = ALIGN(4096); 62 . = ALIGN(4096);
61 __initramfs_start = .; 63 __initramfs_start = .;
62 .init.ramfs : { *(.init.ramfs) } 64 .init.ramfs : { *(.init.ramfs) }
63 __initramfs_end = .; 65 __initramfs_end = .;
66#endif
67
64 . = ALIGN(32); 68 . = ALIGN(32);
65 __per_cpu_start = .; 69 __per_cpu_start = .;
66 .data.percpu : { *(.data.percpu) } 70 .data.percpu : { *(.data.percpu) }
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index d41f66ac7fff..f75a686ba644 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -232,10 +232,6 @@ config LARGE_ALLOCS
232 232
233source "mm/Kconfig" 233source "mm/Kconfig"
234 234
235config GENERIC_ISA_DMA
236 bool
237 default y
238
239config ISA 235config ISA
240 bool 236 bool
241 help 237 help
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 5a9e68b13e60..59eef403c60a 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/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.20-rc2 3# Linux kernel version: 2.6.21-rc1
4# Thu Dec 28 15:09:49 2006 4# Mon Feb 26 10:45:21 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -41,6 +41,7 @@ CONFIG_LOCALVERSION=""
41CONFIG_SWAP=y 41CONFIG_SWAP=y
42CONFIG_SYSVIPC=y 42CONFIG_SYSVIPC=y
43# CONFIG_IPC_NS is not set 43# CONFIG_IPC_NS is not set
44CONFIG_SYSVIPC_SYSCTL=y
44CONFIG_POSIX_MQUEUE=y 45CONFIG_POSIX_MQUEUE=y
45# CONFIG_BSD_PROCESS_ACCT is not set 46# CONFIG_BSD_PROCESS_ACCT is not set
46# CONFIG_TASKSTATS is not set 47# CONFIG_TASKSTATS is not set
@@ -49,7 +50,6 @@ CONFIG_POSIX_MQUEUE=y
49# CONFIG_IKCONFIG is not set 50# CONFIG_IKCONFIG is not set
50CONFIG_SYSFS_DEPRECATED=y 51CONFIG_SYSFS_DEPRECATED=y
51CONFIG_RELAY=y 52CONFIG_RELAY=y
52CONFIG_INITRAMFS_SOURCE=""
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y 53CONFIG_CC_OPTIMIZE_FOR_SIZE=y
54CONFIG_SYSCTL=y 54CONFIG_SYSCTL=y
55# CONFIG_EMBEDDED is not set 55# CONFIG_EMBEDDED is not set
@@ -144,14 +144,14 @@ CONFIG_HAVE_MEMORY_PRESENT=y
144CONFIG_SPARSEMEM_EXTREME=y 144CONFIG_SPARSEMEM_EXTREME=y
145CONFIG_SPLIT_PTLOCK_CPUS=4 145CONFIG_SPLIT_PTLOCK_CPUS=4
146CONFIG_RESOURCES_64BIT=y 146CONFIG_RESOURCES_64BIT=y
147CONFIG_GENERIC_ISA_DMA=y 147CONFIG_ZONE_DMA_FLAG=0
148CONFIG_SBUS=y 148CONFIG_SBUS=y
149CONFIG_SBUSCHAR=y 149CONFIG_SBUSCHAR=y
150CONFIG_SUN_AUXIO=y 150CONFIG_SUN_AUXIO=y
151CONFIG_SUN_IO=y 151CONFIG_SUN_IO=y
152CONFIG_PCI=y 152CONFIG_PCI=y
153CONFIG_PCI_DOMAINS=y 153CONFIG_PCI_DOMAINS=y
154# CONFIG_PCI_MULTITHREAD_PROBE is not set 154CONFIG_PCI_MSI=y
155# CONFIG_PCI_DEBUG is not set 155# CONFIG_PCI_DEBUG is not set
156CONFIG_SUN_OPENPROMFS=m 156CONFIG_SUN_OPENPROMFS=m
157CONFIG_SPARC32_COMPAT=y 157CONFIG_SPARC32_COMPAT=y
@@ -182,7 +182,9 @@ CONFIG_UNIX=y
182CONFIG_XFRM=y 182CONFIG_XFRM=y
183CONFIG_XFRM_USER=m 183CONFIG_XFRM_USER=m
184# CONFIG_XFRM_SUB_POLICY is not set 184# CONFIG_XFRM_SUB_POLICY is not set
185CONFIG_XFRM_MIGRATE=y
185CONFIG_NET_KEY=m 186CONFIG_NET_KEY=m
187CONFIG_NET_KEY_MIGRATE=y
186CONFIG_INET=y 188CONFIG_INET=y
187CONFIG_IP_MULTICAST=y 189CONFIG_IP_MULTICAST=y
188# CONFIG_IP_ADVANCED_ROUTER is not set 190# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -300,6 +302,7 @@ CONFIG_STANDALONE=y
300# CONFIG_PREVENT_FIRMWARE_BUILD is not set 302# CONFIG_PREVENT_FIRMWARE_BUILD is not set
301CONFIG_FW_LOADER=y 303CONFIG_FW_LOADER=y
302# CONFIG_DEBUG_DRIVER is not set 304# CONFIG_DEBUG_DRIVER is not set
305# CONFIG_DEBUG_DEVRES is not set
303# CONFIG_SYS_HYPERVISOR is not set 306# CONFIG_SYS_HYPERVISOR is not set
304 307
305# 308#
@@ -320,6 +323,7 @@ CONFIG_CONNECTOR=m
320# 323#
321# Plug and Play support 324# Plug and Play support
322# 325#
326# CONFIG_PNPACPI is not set
323 327
324# 328#
325# Block devices 329# Block devices
@@ -393,6 +397,7 @@ CONFIG_BLK_DEV_ALI15X3=y
393# CONFIG_BLK_DEV_JMICRON is not set 397# CONFIG_BLK_DEV_JMICRON is not set
394# CONFIG_BLK_DEV_SC1200 is not set 398# CONFIG_BLK_DEV_SC1200 is not set
395# CONFIG_BLK_DEV_PIIX is not set 399# CONFIG_BLK_DEV_PIIX is not set
400# CONFIG_BLK_DEV_IT8213 is not set
396# CONFIG_BLK_DEV_IT821X is not set 401# CONFIG_BLK_DEV_IT821X is not set
397# CONFIG_BLK_DEV_NS87415 is not set 402# CONFIG_BLK_DEV_NS87415 is not set
398# CONFIG_BLK_DEV_PDC202XX_OLD is not set 403# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -402,6 +407,7 @@ CONFIG_BLK_DEV_ALI15X3=y
402# CONFIG_BLK_DEV_SLC90E66 is not set 407# CONFIG_BLK_DEV_SLC90E66 is not set
403# CONFIG_BLK_DEV_TRM290 is not set 408# CONFIG_BLK_DEV_TRM290 is not set
404# CONFIG_BLK_DEV_VIA82CXXX is not set 409# CONFIG_BLK_DEV_VIA82CXXX is not set
410# CONFIG_BLK_DEV_TC86C001 is not set
405# CONFIG_IDE_ARM is not set 411# CONFIG_IDE_ARM is not set
406CONFIG_BLK_DEV_IDEDMA=y 412CONFIG_BLK_DEV_IDEDMA=y
407# CONFIG_IDEDMA_IVB is not set 413# CONFIG_IDEDMA_IVB is not set
@@ -579,6 +585,7 @@ CONFIG_NET_PCI=y
579# CONFIG_EPIC100 is not set 585# CONFIG_EPIC100 is not set
580# CONFIG_SUNDANCE is not set 586# CONFIG_SUNDANCE is not set
581# CONFIG_VIA_RHINE is not set 587# CONFIG_VIA_RHINE is not set
588# CONFIG_SC92031 is not set
582 589
583# 590#
584# Ethernet (1000 Mbit) 591# Ethernet (1000 Mbit)
@@ -601,11 +608,13 @@ CONFIG_E1000_NAPI=y
601CONFIG_TIGON3=m 608CONFIG_TIGON3=m
602CONFIG_BNX2=m 609CONFIG_BNX2=m
603# CONFIG_QLA3XXX is not set 610# CONFIG_QLA3XXX is not set
611# CONFIG_ATL1 is not set
604 612
605# 613#
606# Ethernet (10000 Mbit) 614# Ethernet (10000 Mbit)
607# 615#
608# CONFIG_CHELSIO_T1 is not set 616# CONFIG_CHELSIO_T1 is not set
617# CONFIG_CHELSIO_T3 is not set
609# CONFIG_IXGB is not set 618# CONFIG_IXGB is not set
610# CONFIG_S2IO is not set 619# CONFIG_S2IO is not set
611# CONFIG_MYRI10GE is not set 620# CONFIG_MYRI10GE is not set
@@ -627,8 +636,17 @@ CONFIG_BNX2=m
627# CONFIG_WAN is not set 636# CONFIG_WAN is not set
628# CONFIG_FDDI is not set 637# CONFIG_FDDI is not set
629# CONFIG_HIPPI is not set 638# CONFIG_HIPPI is not set
630# CONFIG_PPP is not set 639CONFIG_PPP=m
640CONFIG_PPP_MULTILINK=y
641CONFIG_PPP_FILTER=y
642CONFIG_PPP_ASYNC=m
643CONFIG_PPP_SYNC_TTY=m
644CONFIG_PPP_DEFLATE=m
645CONFIG_PPP_BSDCOMP=m
646CONFIG_PPP_MPPE=m
647CONFIG_PPPOE=m
631# CONFIG_SLIP is not set 648# CONFIG_SLIP is not set
649CONFIG_SLHC=m
632# CONFIG_NET_FC is not set 650# CONFIG_NET_FC is not set
633# CONFIG_SHAPER is not set 651# CONFIG_SHAPER is not set
634# CONFIG_NETCONSOLE is not set 652# CONFIG_NETCONSOLE is not set
@@ -771,6 +789,7 @@ CONFIG_I2C_ALGOBIT=y
771# CONFIG_I2C_NFORCE2 is not set 789# CONFIG_I2C_NFORCE2 is not set
772# CONFIG_I2C_OCORES is not set 790# CONFIG_I2C_OCORES is not set
773# CONFIG_I2C_PARPORT_LIGHT is not set 791# CONFIG_I2C_PARPORT_LIGHT is not set
792# CONFIG_I2C_PASEMI is not set
774# CONFIG_I2C_PROSAVAGE is not set 793# CONFIG_I2C_PROSAVAGE is not set
775# CONFIG_I2C_SAVAGE4 is not set 794# CONFIG_I2C_SAVAGE4 is not set
776# CONFIG_I2C_SIS5595 is not set 795# CONFIG_I2C_SIS5595 is not set
@@ -817,6 +836,7 @@ CONFIG_HWMON=y
817# CONFIG_SENSORS_ADM1021 is not set 836# CONFIG_SENSORS_ADM1021 is not set
818# CONFIG_SENSORS_ADM1025 is not set 837# CONFIG_SENSORS_ADM1025 is not set
819# CONFIG_SENSORS_ADM1026 is not set 838# CONFIG_SENSORS_ADM1026 is not set
839# CONFIG_SENSORS_ADM1029 is not set
820# CONFIG_SENSORS_ADM1031 is not set 840# CONFIG_SENSORS_ADM1031 is not set
821# CONFIG_SENSORS_ADM9240 is not set 841# CONFIG_SENSORS_ADM9240 is not set
822# CONFIG_SENSORS_ASB100 is not set 842# CONFIG_SENSORS_ASB100 is not set
@@ -858,6 +878,11 @@ CONFIG_HWMON=y
858# CONFIG_HWMON_DEBUG_CHIP is not set 878# CONFIG_HWMON_DEBUG_CHIP is not set
859 879
860# 880#
881# Multifunction device drivers
882#
883# CONFIG_MFD_SM501 is not set
884
885#
861# Multimedia devices 886# Multimedia devices
862# 887#
863# CONFIG_VIDEO_DEV is not set 888# CONFIG_VIDEO_DEV is not set
@@ -871,16 +896,22 @@ CONFIG_HWMON=y
871# 896#
872# Graphics support 897# Graphics support
873# 898#
874# CONFIG_FIRMWARE_EDID is not set 899# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
875CONFIG_FB=y 900CONFIG_FB=y
901# CONFIG_FIRMWARE_EDID is not set
876CONFIG_FB_DDC=y 902CONFIG_FB_DDC=y
877CONFIG_FB_CFB_FILLRECT=y 903CONFIG_FB_CFB_FILLRECT=y
878CONFIG_FB_CFB_COPYAREA=y 904CONFIG_FB_CFB_COPYAREA=y
879CONFIG_FB_CFB_IMAGEBLIT=y 905CONFIG_FB_CFB_IMAGEBLIT=y
906# CONFIG_FB_SVGALIB is not set
880# CONFIG_FB_MACMODES is not set 907# CONFIG_FB_MACMODES is not set
881# CONFIG_FB_BACKLIGHT is not set 908# CONFIG_FB_BACKLIGHT is not set
882CONFIG_FB_MODE_HELPERS=y 909CONFIG_FB_MODE_HELPERS=y
883CONFIG_FB_TILEBLITTING=y 910CONFIG_FB_TILEBLITTING=y
911
912#
913# Frambuffer hardware drivers
914#
884# CONFIG_FB_CIRRUS is not set 915# CONFIG_FB_CIRRUS is not set
885# CONFIG_FB_PM2 is not set 916# CONFIG_FB_PM2 is not set
886# CONFIG_FB_ASILIANT is not set 917# CONFIG_FB_ASILIANT is not set
@@ -892,9 +923,11 @@ CONFIG_FB_TILEBLITTING=y
892# CONFIG_FB_MATROX is not set 923# CONFIG_FB_MATROX is not set
893CONFIG_FB_RADEON=y 924CONFIG_FB_RADEON=y
894CONFIG_FB_RADEON_I2C=y 925CONFIG_FB_RADEON_I2C=y
926# CONFIG_FB_RADEON_BACKLIGHT is not set
895# CONFIG_FB_RADEON_DEBUG is not set 927# CONFIG_FB_RADEON_DEBUG is not set
896# CONFIG_FB_ATY128 is not set 928# CONFIG_FB_ATY128 is not set
897# CONFIG_FB_ATY is not set 929# CONFIG_FB_ATY is not set
930# CONFIG_FB_S3 is not set
898# CONFIG_FB_SAVAGE is not set 931# CONFIG_FB_SAVAGE is not set
899# CONFIG_FB_SIS is not set 932# CONFIG_FB_SIS is not set
900# CONFIG_FB_NEOMAGIC is not set 933# CONFIG_FB_NEOMAGIC is not set
@@ -931,7 +964,6 @@ CONFIG_LOGO=y
931# CONFIG_LOGO_LINUX_VGA16 is not set 964# CONFIG_LOGO_LINUX_VGA16 is not set
932# CONFIG_LOGO_LINUX_CLUT224 is not set 965# CONFIG_LOGO_LINUX_CLUT224 is not set
933CONFIG_LOGO_SUN_CLUT224=y 966CONFIG_LOGO_SUN_CLUT224=y
934# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
935 967
936# 968#
937# Sound 969# Sound
@@ -1043,6 +1075,11 @@ CONFIG_SND_SUN_CS4231=m
1043# CONFIG_SND_SUN_DBRI is not set 1075# CONFIG_SND_SUN_DBRI is not set
1044 1076
1045# 1077#
1078# SoC audio support
1079#
1080# CONFIG_SND_SOC is not set
1081
1082#
1046# Open Sound System 1083# Open Sound System
1047# 1084#
1048# CONFIG_SOUND_PRIME is not set 1085# CONFIG_SOUND_PRIME is not set
@@ -1052,6 +1089,7 @@ CONFIG_AC97_BUS=m
1052# HID Devices 1089# HID Devices
1053# 1090#
1054CONFIG_HID=y 1091CONFIG_HID=y
1092# CONFIG_HID_DEBUG is not set
1055 1093
1056# 1094#
1057# USB support 1095# USB support
@@ -1066,9 +1104,7 @@ CONFIG_USB=y
1066# Miscellaneous USB options 1104# Miscellaneous USB options
1067# 1105#
1068CONFIG_USB_DEVICEFS=y 1106CONFIG_USB_DEVICEFS=y
1069# CONFIG_USB_BANDWIDTH is not set
1070# CONFIG_USB_DYNAMIC_MINORS is not set 1107# CONFIG_USB_DYNAMIC_MINORS is not set
1071# CONFIG_USB_MULTITHREAD_PROBE is not set
1072# CONFIG_USB_OTG is not set 1108# CONFIG_USB_OTG is not set
1073 1109
1074# 1110#
@@ -1078,9 +1114,11 @@ CONFIG_USB_EHCI_HCD=m
1078# CONFIG_USB_EHCI_SPLIT_ISO is not set 1114# CONFIG_USB_EHCI_SPLIT_ISO is not set
1079# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1115# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1080# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1116# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1117# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1081# CONFIG_USB_ISP116X_HCD is not set 1118# CONFIG_USB_ISP116X_HCD is not set
1082CONFIG_USB_OHCI_HCD=y 1119CONFIG_USB_OHCI_HCD=y
1083# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1120# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1121# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1084CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1122CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1085CONFIG_USB_UHCI_HCD=m 1123CONFIG_USB_UHCI_HCD=m
1086# CONFIG_USB_SL811_HCD is not set 1124# CONFIG_USB_SL811_HCD is not set
@@ -1132,6 +1170,7 @@ CONFIG_USB_HIDDEV=y
1132# CONFIG_USB_ATI_REMOTE2 is not set 1170# CONFIG_USB_ATI_REMOTE2 is not set
1133# CONFIG_USB_KEYSPAN_REMOTE is not set 1171# CONFIG_USB_KEYSPAN_REMOTE is not set
1134# CONFIG_USB_APPLETOUCH is not set 1172# CONFIG_USB_APPLETOUCH is not set
1173# CONFIG_USB_GTCO is not set
1135 1174
1136# 1175#
1137# USB Imaging devices 1176# USB Imaging devices
@@ -1169,6 +1208,7 @@ CONFIG_USB_HIDDEV=y
1169# CONFIG_USB_RIO500 is not set 1208# CONFIG_USB_RIO500 is not set
1170# CONFIG_USB_LEGOTOWER is not set 1209# CONFIG_USB_LEGOTOWER is not set
1171# CONFIG_USB_LCD is not set 1210# CONFIG_USB_LCD is not set
1211# CONFIG_USB_BERRY_CHARGE is not set
1172# CONFIG_USB_LED is not set 1212# CONFIG_USB_LED is not set
1173# CONFIG_USB_CYPRESS_CY7C63 is not set 1213# CONFIG_USB_CYPRESS_CY7C63 is not set
1174# CONFIG_USB_CYTHERM is not set 1214# CONFIG_USB_CYTHERM is not set
@@ -1236,6 +1276,10 @@ CONFIG_USB_HIDDEV=y
1236# 1276#
1237 1277
1238# 1278#
1279# Auxiliary Display support
1280#
1281
1282#
1239# Virtualization 1283# Virtualization
1240# 1284#
1241 1285
@@ -1418,15 +1462,16 @@ CONFIG_MAGIC_SYSRQ=y
1418CONFIG_DEBUG_FS=y 1462CONFIG_DEBUG_FS=y
1419# CONFIG_HEADERS_CHECK is not set 1463# CONFIG_HEADERS_CHECK is not set
1420CONFIG_DEBUG_KERNEL=y 1464CONFIG_DEBUG_KERNEL=y
1465# CONFIG_DEBUG_SHIRQ is not set
1421CONFIG_LOG_BUF_SHIFT=18 1466CONFIG_LOG_BUF_SHIFT=18
1422CONFIG_DETECT_SOFTLOCKUP=y 1467CONFIG_DETECT_SOFTLOCKUP=y
1423CONFIG_SCHEDSTATS=y 1468CONFIG_SCHEDSTATS=y
1469# CONFIG_TIMER_STATS is not set
1424# CONFIG_DEBUG_SLAB is not set 1470# CONFIG_DEBUG_SLAB is not set
1425# CONFIG_DEBUG_RT_MUTEXES is not set 1471# CONFIG_DEBUG_RT_MUTEXES is not set
1426# CONFIG_RT_MUTEX_TESTER is not set 1472# CONFIG_RT_MUTEX_TESTER is not set
1427# CONFIG_DEBUG_SPINLOCK is not set 1473# CONFIG_DEBUG_SPINLOCK is not set
1428# CONFIG_DEBUG_MUTEXES is not set 1474# CONFIG_DEBUG_MUTEXES is not set
1429# CONFIG_DEBUG_RWSEMS is not set
1430# CONFIG_DEBUG_LOCK_ALLOC is not set 1475# CONFIG_DEBUG_LOCK_ALLOC is not set
1431# CONFIG_PROVE_LOCKING is not set 1476# CONFIG_PROVE_LOCKING is not set
1432# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1477# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
@@ -1439,6 +1484,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1439CONFIG_FORCED_INLINING=y 1484CONFIG_FORCED_INLINING=y
1440# CONFIG_RCU_TORTURE_TEST is not set 1485# CONFIG_RCU_TORTURE_TEST is not set
1441# CONFIG_LKDTM is not set 1486# CONFIG_LKDTM is not set
1487# CONFIG_FAULT_INJECTION is not set
1442# CONFIG_DEBUG_STACK_USAGE is not set 1488# CONFIG_DEBUG_STACK_USAGE is not set
1443# CONFIG_DEBUG_DCFLUSH is not set 1489# CONFIG_DEBUG_DCFLUSH is not set
1444# CONFIG_STACK_DEBUG is not set 1490# CONFIG_STACK_DEBUG is not set
@@ -1473,8 +1519,10 @@ CONFIG_CRYPTO_TGR192=m
1473CONFIG_CRYPTO_GF128MUL=m 1519CONFIG_CRYPTO_GF128MUL=m
1474CONFIG_CRYPTO_ECB=m 1520CONFIG_CRYPTO_ECB=m
1475CONFIG_CRYPTO_CBC=y 1521CONFIG_CRYPTO_CBC=y
1522CONFIG_CRYPTO_PCBC=m
1476CONFIG_CRYPTO_LRW=m 1523CONFIG_CRYPTO_LRW=m
1477CONFIG_CRYPTO_DES=y 1524CONFIG_CRYPTO_DES=y
1525CONFIG_CRYPTO_FCRYPT=m
1478CONFIG_CRYPTO_BLOWFISH=m 1526CONFIG_CRYPTO_BLOWFISH=m
1479CONFIG_CRYPTO_TWOFISH=m 1527CONFIG_CRYPTO_TWOFISH=m
1480CONFIG_CRYPTO_TWOFISH_COMMON=m 1528CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1489,6 +1537,7 @@ CONFIG_CRYPTO_ANUBIS=m
1489CONFIG_CRYPTO_DEFLATE=y 1537CONFIG_CRYPTO_DEFLATE=y
1490CONFIG_CRYPTO_MICHAEL_MIC=m 1538CONFIG_CRYPTO_MICHAEL_MIC=m
1491CONFIG_CRYPTO_CRC32C=m 1539CONFIG_CRYPTO_CRC32C=m
1540CONFIG_CRYPTO_CAMELLIA=m
1492CONFIG_CRYPTO_TEST=m 1541CONFIG_CRYPTO_TEST=m
1493 1542
1494# 1543#
@@ -1506,4 +1555,5 @@ CONFIG_LIBCRC32C=m
1506CONFIG_ZLIB_INFLATE=y 1555CONFIG_ZLIB_INFLATE=y
1507CONFIG_ZLIB_DEFLATE=y 1556CONFIG_ZLIB_DEFLATE=y
1508CONFIG_PLIST=y 1557CONFIG_PLIST=y
1509CONFIG_IOMAP_COPY=y 1558CONFIG_HAS_IOMEM=y
1559CONFIG_HAS_IOPORT=y
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index c3d068c7a412..c443db184371 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -22,6 +22,7 @@
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/msi.h>
25 26
26#include <asm/ptrace.h> 27#include <asm/ptrace.h>
27#include <asm/processor.h> 28#include <asm/processor.h>
@@ -87,7 +88,6 @@ struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BY
87#define irq_work(__cpu) &(trap_block[(__cpu)].irq_worklist) 88#define irq_work(__cpu) &(trap_block[(__cpu)].irq_worklist)
88 89
89static unsigned int virt_to_real_irq_table[NR_IRQS]; 90static unsigned int virt_to_real_irq_table[NR_IRQS];
90static unsigned char virt_irq_cur = 1;
91 91
92static unsigned char virt_irq_alloc(unsigned int real_irq) 92static unsigned char virt_irq_alloc(unsigned int real_irq)
93{ 93{
@@ -95,24 +95,32 @@ static unsigned char virt_irq_alloc(unsigned int real_irq)
95 95
96 BUILD_BUG_ON(NR_IRQS >= 256); 96 BUILD_BUG_ON(NR_IRQS >= 256);
97 97
98 ent = virt_irq_cur; 98 for (ent = 1; ent < NR_IRQS; ent++) {
99 if (!virt_to_real_irq_table[ent])
100 break;
101 }
99 if (ent >= NR_IRQS) { 102 if (ent >= NR_IRQS) {
100 printk(KERN_ERR "IRQ: Out of virtual IRQs.\n"); 103 printk(KERN_ERR "IRQ: Out of virtual IRQs.\n");
101 return 0; 104 return 0;
102 } 105 }
103 106
104 virt_irq_cur = ent + 1;
105 virt_to_real_irq_table[ent] = real_irq; 107 virt_to_real_irq_table[ent] = real_irq;
106 108
107 return ent; 109 return ent;
108} 110}
109 111
110#if 0 /* Currently unused. */ 112#ifdef CONFIG_PCI_MSI
111static unsigned char real_to_virt_irq(unsigned int real_irq) 113static void virt_irq_free(unsigned int virt_irq)
112{ 114{
113 struct ino_bucket *bucket = __bucket(real_irq); 115 unsigned int real_irq;
114 116
115 return bucket->virt_irq; 117 if (virt_irq >= NR_IRQS)
118 return;
119
120 real_irq = virt_to_real_irq_table[virt_irq];
121 virt_to_real_irq_table[virt_irq] = 0;
122
123 __bucket(real_irq)->virt_irq = 0;
116} 124}
117#endif 125#endif
118 126
@@ -268,8 +276,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
268 276
269static void sun4u_irq_enable(unsigned int virt_irq) 277static void sun4u_irq_enable(unsigned int virt_irq)
270{ 278{
271 irq_desc_t *desc = irq_desc + virt_irq; 279 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
272 struct irq_handler_data *data = desc->handler_data;
273 280
274 if (likely(data)) { 281 if (likely(data)) {
275 unsigned long cpuid, imap; 282 unsigned long cpuid, imap;
@@ -286,8 +293,7 @@ static void sun4u_irq_enable(unsigned int virt_irq)
286 293
287static void sun4u_irq_disable(unsigned int virt_irq) 294static void sun4u_irq_disable(unsigned int virt_irq)
288{ 295{
289 irq_desc_t *desc = irq_desc + virt_irq; 296 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
290 struct irq_handler_data *data = desc->handler_data;
291 297
292 if (likely(data)) { 298 if (likely(data)) {
293 unsigned long imap = data->imap; 299 unsigned long imap = data->imap;
@@ -300,8 +306,7 @@ static void sun4u_irq_disable(unsigned int virt_irq)
300 306
301static void sun4u_irq_end(unsigned int virt_irq) 307static void sun4u_irq_end(unsigned int virt_irq)
302{ 308{
303 irq_desc_t *desc = irq_desc + virt_irq; 309 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
304 struct irq_handler_data *data = desc->handler_data;
305 310
306 if (likely(data)) 311 if (likely(data))
307 upa_writel(ICLR_IDLE, data->iclr); 312 upa_writel(ICLR_IDLE, data->iclr);
@@ -344,6 +349,20 @@ static void sun4v_irq_disable(unsigned int virt_irq)
344 } 349 }
345} 350}
346 351
352#ifdef CONFIG_PCI_MSI
353static void sun4v_msi_enable(unsigned int virt_irq)
354{
355 sun4v_irq_enable(virt_irq);
356 unmask_msi_irq(virt_irq);
357}
358
359static void sun4v_msi_disable(unsigned int virt_irq)
360{
361 mask_msi_irq(virt_irq);
362 sun4v_irq_disable(virt_irq);
363}
364#endif
365
347static void sun4v_irq_end(unsigned int virt_irq) 366static void sun4v_irq_end(unsigned int virt_irq)
348{ 367{
349 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 368 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -362,8 +381,7 @@ static void sun4v_irq_end(unsigned int virt_irq)
362static void run_pre_handler(unsigned int virt_irq) 381static void run_pre_handler(unsigned int virt_irq)
363{ 382{
364 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 383 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
365 irq_desc_t *desc = irq_desc + virt_irq; 384 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
366 struct irq_handler_data *data = desc->handler_data;
367 385
368 if (likely(data->pre_handler)) { 386 if (likely(data->pre_handler)) {
369 data->pre_handler(__irq_ino(__irq(bucket)), 387 data->pre_handler(__irq_ino(__irq(bucket)),
@@ -402,30 +420,47 @@ static struct irq_chip sun4v_irq_ack = {
402 .end = sun4v_irq_end, 420 .end = sun4v_irq_end,
403}; 421};
404 422
423#ifdef CONFIG_PCI_MSI
424static struct irq_chip sun4v_msi = {
425 .typename = "sun4v+msi",
426 .mask = mask_msi_irq,
427 .unmask = unmask_msi_irq,
428 .enable = sun4v_msi_enable,
429 .disable = sun4v_msi_disable,
430 .ack = run_pre_handler,
431 .end = sun4v_irq_end,
432};
433#endif
434
405void irq_install_pre_handler(int virt_irq, 435void irq_install_pre_handler(int virt_irq,
406 void (*func)(unsigned int, void *, void *), 436 void (*func)(unsigned int, void *, void *),
407 void *arg1, void *arg2) 437 void *arg1, void *arg2)
408{ 438{
409 irq_desc_t *desc = irq_desc + virt_irq; 439 struct irq_handler_data *data = get_irq_chip_data(virt_irq);
410 struct irq_handler_data *data = desc->handler_data; 440 struct irq_chip *chip;
411 441
412 data->pre_handler = func; 442 data->pre_handler = func;
413 data->pre_handler_arg1 = arg1; 443 data->pre_handler_arg1 = arg1;
414 data->pre_handler_arg2 = arg2; 444 data->pre_handler_arg2 = arg2;
415 445
416 if (desc->chip == &sun4u_irq_ack || 446 chip = get_irq_chip(virt_irq);
417 desc->chip == &sun4v_irq_ack) 447 if (chip == &sun4u_irq_ack ||
448 chip == &sun4v_irq_ack
449#ifdef CONFIG_PCI_MSI
450 || chip == &sun4v_msi
451#endif
452 )
418 return; 453 return;
419 454
420 desc->chip = (desc->chip == &sun4u_irq ? 455 chip = (chip == &sun4u_irq ?
421 &sun4u_irq_ack : &sun4v_irq_ack); 456 &sun4u_irq_ack : &sun4v_irq_ack);
457 set_irq_chip(virt_irq, chip);
422} 458}
423 459
424unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) 460unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
425{ 461{
426 struct ino_bucket *bucket; 462 struct ino_bucket *bucket;
427 struct irq_handler_data *data; 463 struct irq_handler_data *data;
428 irq_desc_t *desc;
429 int ino; 464 int ino;
430 465
431 BUG_ON(tlb_type == hypervisor); 466 BUG_ON(tlb_type == hypervisor);
@@ -434,11 +469,11 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
434 bucket = &ivector_table[ino]; 469 bucket = &ivector_table[ino];
435 if (!bucket->virt_irq) { 470 if (!bucket->virt_irq) {
436 bucket->virt_irq = virt_irq_alloc(__irq(bucket)); 471 bucket->virt_irq = virt_irq_alloc(__irq(bucket));
437 irq_desc[bucket->virt_irq].chip = &sun4u_irq; 472 set_irq_chip(bucket->virt_irq, &sun4u_irq);
438 } 473 }
439 474
440 desc = irq_desc + bucket->virt_irq; 475 data = get_irq_chip_data(bucket->virt_irq);
441 if (unlikely(desc->handler_data)) 476 if (unlikely(data))
442 goto out; 477 goto out;
443 478
444 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); 479 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
@@ -446,7 +481,7 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
446 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); 481 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
447 prom_halt(); 482 prom_halt();
448 } 483 }
449 desc->handler_data = data; 484 set_irq_chip_data(bucket->virt_irq, data);
450 485
451 data->imap = imap; 486 data->imap = imap;
452 data->iclr = iclr; 487 data->iclr = iclr;
@@ -460,7 +495,6 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
460 struct ino_bucket *bucket; 495 struct ino_bucket *bucket;
461 struct irq_handler_data *data; 496 struct irq_handler_data *data;
462 unsigned long sysino; 497 unsigned long sysino;
463 irq_desc_t *desc;
464 498
465 BUG_ON(tlb_type != hypervisor); 499 BUG_ON(tlb_type != hypervisor);
466 500
@@ -468,11 +502,11 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
468 bucket = &ivector_table[sysino]; 502 bucket = &ivector_table[sysino];
469 if (!bucket->virt_irq) { 503 if (!bucket->virt_irq) {
470 bucket->virt_irq = virt_irq_alloc(__irq(bucket)); 504 bucket->virt_irq = virt_irq_alloc(__irq(bucket));
471 irq_desc[bucket->virt_irq].chip = &sun4v_irq; 505 set_irq_chip(bucket->virt_irq, &sun4v_irq);
472 } 506 }
473 507
474 desc = irq_desc + bucket->virt_irq; 508 data = get_irq_chip_data(bucket->virt_irq);
475 if (unlikely(desc->handler_data)) 509 if (unlikely(data))
476 goto out; 510 goto out;
477 511
478 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); 512 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
@@ -480,7 +514,7 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
480 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); 514 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
481 prom_halt(); 515 prom_halt();
482 } 516 }
483 desc->handler_data = data; 517 set_irq_chip_data(bucket->virt_irq, data);
484 518
485 /* Catch accidental accesses to these things. IMAP/ICLR handling 519 /* Catch accidental accesses to these things. IMAP/ICLR handling
486 * is done by hypervisor calls on sun4v platforms, not by direct 520 * is done by hypervisor calls on sun4v platforms, not by direct
@@ -493,6 +527,56 @@ out:
493 return bucket->virt_irq; 527 return bucket->virt_irq;
494} 528}
495 529
530#ifdef CONFIG_PCI_MSI
531unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
532 unsigned int msi_start, unsigned int msi_end)
533{
534 struct ino_bucket *bucket;
535 struct irq_handler_data *data;
536 unsigned long sysino;
537 unsigned int devino;
538
539 BUG_ON(tlb_type != hypervisor);
540
541 /* Find a free devino in the given range. */
542 for (devino = msi_start; devino < msi_end; devino++) {
543 sysino = sun4v_devino_to_sysino(devhandle, devino);
544 bucket = &ivector_table[sysino];
545 if (!bucket->virt_irq)
546 break;
547 }
548 if (devino >= msi_end)
549 return 0;
550
551 sysino = sun4v_devino_to_sysino(devhandle, devino);
552 bucket = &ivector_table[sysino];
553 bucket->virt_irq = virt_irq_alloc(__irq(bucket));
554 *virt_irq_p = bucket->virt_irq;
555 set_irq_chip(bucket->virt_irq, &sun4v_msi);
556
557 data = get_irq_chip_data(bucket->virt_irq);
558 if (unlikely(data))
559 return devino;
560
561 data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
562 if (unlikely(!data)) {
563 prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
564 prom_halt();
565 }
566 set_irq_chip_data(bucket->virt_irq, data);
567
568 data->imap = ~0UL;
569 data->iclr = ~0UL;
570
571 return devino;
572}
573
574void sun4v_destroy_msi(unsigned int virt_irq)
575{
576 virt_irq_free(virt_irq);
577}
578#endif
579
496void ack_bad_irq(unsigned int virt_irq) 580void ack_bad_irq(unsigned int virt_irq)
497{ 581{
498 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); 582 struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index dfc41cd4bb5d..6fedfb98f8b0 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -13,6 +13,8 @@
13#include <linux/capability.h> 13#include <linux/capability.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
16#include <linux/msi.h>
17#include <linux/irq.h>
16#include <linux/init.h> 18#include <linux/init.h>
17 19
18#include <asm/uaccess.h> 20#include <asm/uaccess.h>
@@ -646,4 +648,37 @@ int pci_domain_nr(struct pci_bus *pbus)
646} 648}
647EXPORT_SYMBOL(pci_domain_nr); 649EXPORT_SYMBOL(pci_domain_nr);
648 650
651#ifdef CONFIG_PCI_MSI
652int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
653{
654 struct pcidev_cookie *pcp = pdev->sysdata;
655 struct pci_pbm_info *pbm = pcp->pbm;
656 struct pci_controller_info *p = pbm->parent;
657 int virt_irq, err;
658
659 if (!pbm->msi_num || !p->setup_msi_irq)
660 return -EINVAL;
661
662 err = p->setup_msi_irq(&virt_irq, pdev, desc);
663 if (err < 0)
664 return err;
665
666 return virt_irq;
667}
668
669void arch_teardown_msi_irq(unsigned int virt_irq)
670{
671 struct msi_desc *entry = get_irq_msi(virt_irq);
672 struct pci_dev *pdev = entry->dev;
673 struct pcidev_cookie *pcp = pdev->sysdata;
674 struct pci_pbm_info *pbm = pcp->pbm;
675 struct pci_controller_info *p = pbm->parent;
676
677 if (!pbm->msi_num || !p->setup_msi_irq)
678 return;
679
680 return p->teardown_msi_irq(virt_irq, pdev);
681}
682#endif /* !(CONFIG_PCI_MSI) */
683
649#endif /* !(CONFIG_PCI) */ 684#endif /* !(CONFIG_PCI) */
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 827ae30aa497..5a92cb90ebe0 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -7,6 +7,8 @@
7#include <linux/string.h> 7#include <linux/string.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/pci.h>
11#include <linux/device.h>
10 12
11#include <asm/pbm.h> 13#include <asm/pbm.h>
12#include <asm/prom.h> 14#include <asm/prom.h>
@@ -129,6 +131,20 @@ static void __init fixup_obp_assignments(struct pci_dev *pdev,
129 } 131 }
130} 132}
131 133
134static ssize_t
135show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char * buf)
136{
137 struct pci_dev *pdev;
138 struct pcidev_cookie *sysdata;
139
140 pdev = to_pci_dev(dev);
141 sysdata = pdev->sysdata;
142
143 return snprintf (buf, PAGE_SIZE, "%s\n", sysdata->prom_node->full_name);
144}
145
146static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
147
132/* Fill in the PCI device cookie sysdata for the given 148/* Fill in the PCI device cookie sysdata for the given
133 * PCI device. This cookie is the means by which one 149 * PCI device. This cookie is the means by which one
134 * can get to OBP and PCI controller specific information 150 * can get to OBP and PCI controller specific information
@@ -142,7 +158,7 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm,
142 struct pcidev_cookie *pcp; 158 struct pcidev_cookie *pcp;
143 struct device_node *dp; 159 struct device_node *dp;
144 struct property *prop; 160 struct property *prop;
145 int nregs, len; 161 int nregs, len, err;
146 162
147 dp = find_device_prom_node(pbm, pdev, bus_node, 163 dp = find_device_prom_node(pbm, pdev, bus_node,
148 &pregs, &nregs); 164 &pregs, &nregs);
@@ -215,6 +231,13 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm,
215 fixup_obp_assignments(pdev, pcp); 231 fixup_obp_assignments(pdev, pcp);
216 232
217 pdev->sysdata = pcp; 233 pdev->sysdata = pcp;
234
235 /* we don't really care if we can create this file or not,
236 * but we need to assign the result of the call or the world will fall
237 * under alien invasion and everybody will be frozen on a spaceship
238 * ready to be eaten on alpha centauri by some green and jelly humanoid.
239 */
240 err = sysfs_create_file(&pdev->dev.kobj, &dev_attr_obppath.attr);
218} 241}
219 242
220void __init pci_fill_in_pbm_cookies(struct pci_bus *pbus, 243void __init pci_fill_in_pbm_cookies(struct pci_bus *pbus,
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 6b04794b7a97..ec22cd61ec8c 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -10,6 +10,8 @@
10#include <linux/slab.h> 10#include <linux/slab.h>
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <linux/percpu.h> 12#include <linux/percpu.h>
13#include <linux/irq.h>
14#include <linux/msi.h>
13 15
14#include <asm/pbm.h> 16#include <asm/pbm.h>
15#include <asm/iommu.h> 17#include <asm/iommu.h>
@@ -1074,6 +1076,443 @@ static void pci_sun4v_get_bus_range(struct pci_pbm_info *pbm)
1074 1076
1075} 1077}
1076 1078
1079#ifdef CONFIG_PCI_MSI
1080struct pci_sun4v_msiq_entry {
1081 u64 version_type;
1082#define MSIQ_VERSION_MASK 0xffffffff00000000UL
1083#define MSIQ_VERSION_SHIFT 32
1084#define MSIQ_TYPE_MASK 0x00000000000000ffUL
1085#define MSIQ_TYPE_SHIFT 0
1086#define MSIQ_TYPE_NONE 0x00
1087#define MSIQ_TYPE_MSG 0x01
1088#define MSIQ_TYPE_MSI32 0x02
1089#define MSIQ_TYPE_MSI64 0x03
1090#define MSIQ_TYPE_INTX 0x08
1091#define MSIQ_TYPE_NONE2 0xff
1092
1093 u64 intx_sysino;
1094 u64 reserved1;
1095 u64 stick;
1096 u64 req_id; /* bus/device/func */
1097#define MSIQ_REQID_BUS_MASK 0xff00UL
1098#define MSIQ_REQID_BUS_SHIFT 8
1099#define MSIQ_REQID_DEVICE_MASK 0x00f8UL
1100#define MSIQ_REQID_DEVICE_SHIFT 3
1101#define MSIQ_REQID_FUNC_MASK 0x0007UL
1102#define MSIQ_REQID_FUNC_SHIFT 0
1103
1104 u64 msi_address;
1105
1106 /* The format of this value is message type dependant.
1107 * For MSI bits 15:0 are the data from the MSI packet.
1108 * For MSI-X bits 31:0 are the data from the MSI packet.
1109 * For MSG, the message code and message routing code where:
1110 * bits 39:32 is the bus/device/fn of the msg target-id
1111 * bits 18:16 is the message routing code
1112 * bits 7:0 is the message code
1113 * For INTx the low order 2-bits are:
1114 * 00 - INTA
1115 * 01 - INTB
1116 * 10 - INTC
1117 * 11 - INTD
1118 */
1119 u64 msi_data;
1120
1121 u64 reserved2;
1122};
1123
1124/* For now this just runs as a pre-handler for the real interrupt handler.
1125 * So we just walk through the queue and ACK all the entries, update the
1126 * head pointer, and return.
1127 *
1128 * In the longer term it would be nice to do something more integrated
1129 * wherein we can pass in some of this MSI info to the drivers. This
1130 * would be most useful for PCIe fabric error messages, although we could
1131 * invoke those directly from the loop here in order to pass the info around.
1132 */
1133static void pci_sun4v_msi_prehandler(unsigned int ino, void *data1, void *data2)
1134{
1135 struct pci_pbm_info *pbm = data1;
1136 struct pci_sun4v_msiq_entry *base, *ep;
1137 unsigned long msiqid, orig_head, head, type, err;
1138
1139 msiqid = (unsigned long) data2;
1140
1141 head = 0xdeadbeef;
1142 err = pci_sun4v_msiq_gethead(pbm->devhandle, msiqid, &head);
1143 if (unlikely(err))
1144 goto hv_error_get;
1145
1146 if (unlikely(head >= (pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry))))
1147 goto bad_offset;
1148
1149 head /= sizeof(struct pci_sun4v_msiq_entry);
1150 orig_head = head;
1151 base = (pbm->msi_queues + ((msiqid - pbm->msiq_first) *
1152 (pbm->msiq_ent_count *
1153 sizeof(struct pci_sun4v_msiq_entry))));
1154 ep = &base[head];
1155 while ((ep->version_type & MSIQ_TYPE_MASK) != 0) {
1156 type = (ep->version_type & MSIQ_TYPE_MASK) >> MSIQ_TYPE_SHIFT;
1157 if (unlikely(type != MSIQ_TYPE_MSI32 &&
1158 type != MSIQ_TYPE_MSI64))
1159 goto bad_type;
1160
1161 pci_sun4v_msi_setstate(pbm->devhandle,
1162 ep->msi_data /* msi_num */,
1163 HV_MSISTATE_IDLE);
1164
1165 /* Clear the entry. */
1166 ep->version_type &= ~MSIQ_TYPE_MASK;
1167
1168 /* Go to next entry in ring. */
1169 head++;
1170 if (head >= pbm->msiq_ent_count)
1171 head = 0;
1172 ep = &base[head];
1173 }
1174
1175 if (likely(head != orig_head)) {
1176 /* ACK entries by updating head pointer. */
1177 head *= sizeof(struct pci_sun4v_msiq_entry);
1178 err = pci_sun4v_msiq_sethead(pbm->devhandle, msiqid, head);
1179 if (unlikely(err))
1180 goto hv_error_set;
1181 }
1182 return;
1183
1184hv_error_set:
1185 printk(KERN_EMERG "MSI: Hypervisor set head gives error %lu\n", err);
1186 goto hv_error_cont;
1187
1188hv_error_get:
1189 printk(KERN_EMERG "MSI: Hypervisor get head gives error %lu\n", err);
1190
1191hv_error_cont:
1192 printk(KERN_EMERG "MSI: devhandle[%x] msiqid[%lx] head[%lu]\n",
1193 pbm->devhandle, msiqid, head);
1194 return;
1195
1196bad_offset:
1197 printk(KERN_EMERG "MSI: Hypervisor gives bad offset %lx max(%lx)\n",
1198 head, pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry));
1199 return;
1200
1201bad_type:
1202 printk(KERN_EMERG "MSI: Entry has bad type %lx\n", type);
1203 return;
1204}
1205
1206static int msi_bitmap_alloc(struct pci_pbm_info *pbm)
1207{
1208 unsigned long size, bits_per_ulong;
1209
1210 bits_per_ulong = sizeof(unsigned long) * 8;
1211 size = (pbm->msi_num + (bits_per_ulong - 1)) & ~(bits_per_ulong - 1);
1212 size /= 8;
1213 BUG_ON(size % sizeof(unsigned long));
1214
1215 pbm->msi_bitmap = kzalloc(size, GFP_KERNEL);
1216 if (!pbm->msi_bitmap)
1217 return -ENOMEM;
1218
1219 return 0;
1220}
1221
1222static void msi_bitmap_free(struct pci_pbm_info *pbm)
1223{
1224 kfree(pbm->msi_bitmap);
1225 pbm->msi_bitmap = NULL;
1226}
1227
1228static int msi_queue_alloc(struct pci_pbm_info *pbm)
1229{
1230 unsigned long q_size, alloc_size, pages, order;
1231 int i;
1232
1233 q_size = pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry);
1234 alloc_size = (pbm->msiq_num * q_size);
1235 order = get_order(alloc_size);
1236 pages = __get_free_pages(GFP_KERNEL | __GFP_COMP, order);
1237 if (pages == 0UL) {
1238 printk(KERN_ERR "MSI: Cannot allocate MSI queues (o=%lu).\n",
1239 order);
1240 return -ENOMEM;
1241 }
1242 memset((char *)pages, 0, PAGE_SIZE << order);
1243 pbm->msi_queues = (void *) pages;
1244
1245 for (i = 0; i < pbm->msiq_num; i++) {
1246 unsigned long err, base = __pa(pages + (i * q_size));
1247 unsigned long ret1, ret2;
1248
1249 err = pci_sun4v_msiq_conf(pbm->devhandle,
1250 pbm->msiq_first + i,
1251 base, pbm->msiq_ent_count);
1252 if (err) {
1253 printk(KERN_ERR "MSI: msiq register fails (err=%lu)\n",
1254 err);
1255 goto h_error;
1256 }
1257
1258 err = pci_sun4v_msiq_info(pbm->devhandle,
1259 pbm->msiq_first + i,
1260 &ret1, &ret2);
1261 if (err) {
1262 printk(KERN_ERR "MSI: Cannot read msiq (err=%lu)\n",
1263 err);
1264 goto h_error;
1265 }
1266 if (ret1 != base || ret2 != pbm->msiq_ent_count) {
1267 printk(KERN_ERR "MSI: Bogus qconf "
1268 "expected[%lx:%x] got[%lx:%lx]\n",
1269 base, pbm->msiq_ent_count,
1270 ret1, ret2);
1271 goto h_error;
1272 }
1273 }
1274
1275 return 0;
1276
1277h_error:
1278 free_pages(pages, order);
1279 return -EINVAL;
1280}
1281
1282static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
1283{
1284 u32 *val;
1285 int len;
1286
1287 val = of_get_property(pbm->prom_node, "#msi-eqs", &len);
1288 if (!val || len != 4)
1289 goto no_msi;
1290 pbm->msiq_num = *val;
1291 if (pbm->msiq_num) {
1292 struct msiq_prop {
1293 u32 first_msiq;
1294 u32 num_msiq;
1295 u32 first_devino;
1296 } *mqp;
1297 struct msi_range_prop {
1298 u32 first_msi;
1299 u32 num_msi;
1300 } *mrng;
1301 struct addr_range_prop {
1302 u32 msi32_high;
1303 u32 msi32_low;
1304 u32 msi32_len;
1305 u32 msi64_high;
1306 u32 msi64_low;
1307 u32 msi64_len;
1308 } *arng;
1309
1310 val = of_get_property(pbm->prom_node, "msi-eq-size", &len);
1311 if (!val || len != 4)
1312 goto no_msi;
1313
1314 pbm->msiq_ent_count = *val;
1315
1316 mqp = of_get_property(pbm->prom_node,
1317 "msi-eq-to-devino", &len);
1318 if (!mqp || len != sizeof(struct msiq_prop))
1319 goto no_msi;
1320
1321 pbm->msiq_first = mqp->first_msiq;
1322 pbm->msiq_first_devino = mqp->first_devino;
1323
1324 val = of_get_property(pbm->prom_node, "#msi", &len);
1325 if (!val || len != 4)
1326 goto no_msi;
1327 pbm->msi_num = *val;
1328
1329 mrng = of_get_property(pbm->prom_node, "msi-ranges", &len);
1330 if (!mrng || len != sizeof(struct msi_range_prop))
1331 goto no_msi;
1332 pbm->msi_first = mrng->first_msi;
1333
1334 val = of_get_property(pbm->prom_node, "msi-data-mask", &len);
1335 if (!val || len != 4)
1336 goto no_msi;
1337 pbm->msi_data_mask = *val;
1338
1339 val = of_get_property(pbm->prom_node, "msix-data-width", &len);
1340 if (!val || len != 4)
1341 goto no_msi;
1342 pbm->msix_data_width = *val;
1343
1344 arng = of_get_property(pbm->prom_node, "msi-address-ranges",
1345 &len);
1346 if (!arng || len != sizeof(struct addr_range_prop))
1347 goto no_msi;
1348 pbm->msi32_start = ((u64)arng->msi32_high << 32) |
1349 (u64) arng->msi32_low;
1350 pbm->msi64_start = ((u64)arng->msi64_high << 32) |
1351 (u64) arng->msi64_low;
1352 pbm->msi32_len = arng->msi32_len;
1353 pbm->msi64_len = arng->msi64_len;
1354
1355 if (msi_bitmap_alloc(pbm))
1356 goto no_msi;
1357
1358 if (msi_queue_alloc(pbm)) {
1359 msi_bitmap_free(pbm);
1360 goto no_msi;
1361 }
1362
1363 printk(KERN_INFO "%s: MSI Queue first[%u] num[%u] count[%u] "
1364 "devino[0x%x]\n",
1365 pbm->name,
1366 pbm->msiq_first, pbm->msiq_num,
1367 pbm->msiq_ent_count,
1368 pbm->msiq_first_devino);
1369 printk(KERN_INFO "%s: MSI first[%u] num[%u] mask[0x%x] "
1370 "width[%u]\n",
1371 pbm->name,
1372 pbm->msi_first, pbm->msi_num, pbm->msi_data_mask,
1373 pbm->msix_data_width);
1374 printk(KERN_INFO "%s: MSI addr32[0x%lx:0x%x] "
1375 "addr64[0x%lx:0x%x]\n",
1376 pbm->name,
1377 pbm->msi32_start, pbm->msi32_len,
1378 pbm->msi64_start, pbm->msi64_len);
1379 printk(KERN_INFO "%s: MSI queues at RA [%p]\n",
1380 pbm->name,
1381 pbm->msi_queues);
1382 }
1383
1384 return;
1385
1386no_msi:
1387 pbm->msiq_num = 0;
1388 printk(KERN_INFO "%s: No MSI support.\n", pbm->name);
1389}
1390
1391static int alloc_msi(struct pci_pbm_info *pbm)
1392{
1393 int i;
1394
1395 for (i = 0; i < pbm->msi_num; i++) {
1396 if (!test_and_set_bit(i, pbm->msi_bitmap))
1397 return i + pbm->msi_first;
1398 }
1399
1400 return -ENOENT;
1401}
1402
1403static void free_msi(struct pci_pbm_info *pbm, int msi_num)
1404{
1405 msi_num -= pbm->msi_first;
1406 clear_bit(msi_num, pbm->msi_bitmap);
1407}
1408
1409static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
1410 struct pci_dev *pdev,
1411 struct msi_desc *entry)
1412{
1413 struct pcidev_cookie *pcp = pdev->sysdata;
1414 struct pci_pbm_info *pbm = pcp->pbm;
1415 unsigned long devino, msiqid;
1416 struct msi_msg msg;
1417 int msi_num, err;
1418
1419 *virt_irq_p = 0;
1420
1421 msi_num = alloc_msi(pbm);
1422 if (msi_num < 0)
1423 return msi_num;
1424
1425 devino = sun4v_build_msi(pbm->devhandle, virt_irq_p,
1426 pbm->msiq_first_devino,
1427 (pbm->msiq_first_devino +
1428 pbm->msiq_num));
1429 err = -ENOMEM;
1430 if (!devino)
1431 goto out_err;
1432
1433 set_irq_msi(*virt_irq_p, entry);
1434
1435 msiqid = ((devino - pbm->msiq_first_devino) +
1436 pbm->msiq_first);
1437
1438 err = -EINVAL;
1439 if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE))
1440 if (err)
1441 goto out_err;
1442
1443 if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID))
1444 goto out_err;
1445
1446 if (pci_sun4v_msi_setmsiq(pbm->devhandle,
1447 msi_num, msiqid,
1448 (entry->msi_attrib.is_64 ?
1449 HV_MSITYPE_MSI64 : HV_MSITYPE_MSI32)))
1450 goto out_err;
1451
1452 if (pci_sun4v_msi_setstate(pbm->devhandle, msi_num, HV_MSISTATE_IDLE))
1453 goto out_err;
1454
1455 if (pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_VALID))
1456 goto out_err;
1457
1458 pcp->msi_num = msi_num;
1459
1460 if (entry->msi_attrib.is_64) {
1461 msg.address_hi = pbm->msi64_start >> 32;
1462 msg.address_lo = pbm->msi64_start & 0xffffffff;
1463 } else {
1464 msg.address_hi = 0;
1465 msg.address_lo = pbm->msi32_start;
1466 }
1467 msg.data = msi_num;
1468 write_msi_msg(*virt_irq_p, &msg);
1469
1470 irq_install_pre_handler(*virt_irq_p,
1471 pci_sun4v_msi_prehandler,
1472 pbm, (void *) msiqid);
1473
1474 return 0;
1475
1476out_err:
1477 free_msi(pbm, msi_num);
1478 sun4v_destroy_msi(*virt_irq_p);
1479 *virt_irq_p = 0;
1480 return err;
1481
1482}
1483
1484static void pci_sun4v_teardown_msi_irq(unsigned int virt_irq,
1485 struct pci_dev *pdev)
1486{
1487 struct pcidev_cookie *pcp = pdev->sysdata;
1488 struct pci_pbm_info *pbm = pcp->pbm;
1489 unsigned long msiqid, err;
1490 unsigned int msi_num;
1491
1492 msi_num = pcp->msi_num;
1493 err = pci_sun4v_msi_getmsiq(pbm->devhandle, msi_num, &msiqid);
1494 if (err) {
1495 printk(KERN_ERR "%s: getmsiq gives error %lu\n",
1496 pbm->name, err);
1497 return;
1498 }
1499
1500 pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_INVALID);
1501 pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_INVALID);
1502
1503 free_msi(pbm, msi_num);
1504
1505 /* The sun4v_destroy_msi() will liberate the devino and thus the MSIQ
1506 * allocation.
1507 */
1508 sun4v_destroy_msi(virt_irq);
1509}
1510#else /* CONFIG_PCI_MSI */
1511static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
1512{
1513}
1514#endif /* !(CONFIG_PCI_MSI) */
1515
1077static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle) 1516static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle)
1078{ 1517{
1079 struct pci_pbm_info *pbm; 1518 struct pci_pbm_info *pbm;
@@ -1119,6 +1558,7 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node
1119 1558
1120 pci_sun4v_get_bus_range(pbm); 1559 pci_sun4v_get_bus_range(pbm);
1121 pci_sun4v_iommu_init(pbm); 1560 pci_sun4v_iommu_init(pbm);
1561 pci_sun4v_msi_init(pbm);
1122 1562
1123 pdev_htab_populate(pbm); 1563 pdev_htab_populate(pbm);
1124} 1564}
@@ -1187,6 +1627,10 @@ void sun4v_pci_init(struct device_node *dp, char *model_name)
1187 p->scan_bus = pci_sun4v_scan_bus; 1627 p->scan_bus = pci_sun4v_scan_bus;
1188 p->base_address_update = pci_sun4v_base_address_update; 1628 p->base_address_update = pci_sun4v_base_address_update;
1189 p->resource_adjust = pci_sun4v_resource_adjust; 1629 p->resource_adjust = pci_sun4v_resource_adjust;
1630#ifdef CONFIG_PCI_MSI
1631 p->setup_msi_irq = pci_sun4v_setup_msi_irq;
1632 p->teardown_msi_irq = pci_sun4v_teardown_msi_irq;
1633#endif
1190 p->pci_ops = &pci_sun4v_ops; 1634 p->pci_ops = &pci_sun4v_ops;
1191 1635
1192 /* Like PSYCHO and SCHIZO we have a 2GB aligned area 1636 /* Like PSYCHO and SCHIZO we have a 2GB aligned area
diff --git a/arch/sparc64/kernel/pci_sun4v.h b/arch/sparc64/kernel/pci_sun4v.h
index 884d25f6158d..8e9fc3a5b4f5 100644
--- a/arch/sparc64/kernel/pci_sun4v.h
+++ b/arch/sparc64/kernel/pci_sun4v.h
@@ -28,4 +28,65 @@ extern int pci_sun4v_config_put(unsigned long devhandle,
28 unsigned long size, 28 unsigned long size,
29 unsigned long data); 29 unsigned long data);
30 30
31extern unsigned long pci_sun4v_msiq_conf(unsigned long devhandle,
32 unsigned long msiqid,
33 unsigned long msiq_paddr,
34 unsigned long num_entries);
35extern unsigned long pci_sun4v_msiq_info(unsigned long devhandle,
36 unsigned long msiqid,
37 unsigned long *msiq_paddr,
38 unsigned long *num_entries);
39extern unsigned long pci_sun4v_msiq_getvalid(unsigned long devhandle,
40 unsigned long msiqid,
41 unsigned long *valid);
42extern unsigned long pci_sun4v_msiq_setvalid(unsigned long devhandle,
43 unsigned long msiqid,
44 unsigned long valid);
45extern unsigned long pci_sun4v_msiq_getstate(unsigned long devhandle,
46 unsigned long msiqid,
47 unsigned long *state);
48extern unsigned long pci_sun4v_msiq_setstate(unsigned long devhandle,
49 unsigned long msiqid,
50 unsigned long state);
51extern unsigned long pci_sun4v_msiq_gethead(unsigned long devhandle,
52 unsigned long msiqid,
53 unsigned long *head);
54extern unsigned long pci_sun4v_msiq_sethead(unsigned long devhandle,
55 unsigned long msiqid,
56 unsigned long head);
57extern unsigned long pci_sun4v_msiq_gettail(unsigned long devhandle,
58 unsigned long msiqid,
59 unsigned long *head);
60extern unsigned long pci_sun4v_msi_getvalid(unsigned long devhandle,
61 unsigned long msinum,
62 unsigned long *valid);
63extern unsigned long pci_sun4v_msi_setvalid(unsigned long devhandle,
64 unsigned long msinum,
65 unsigned long valid);
66extern unsigned long pci_sun4v_msi_getmsiq(unsigned long devhandle,
67 unsigned long msinum,
68 unsigned long *msiq);
69extern unsigned long pci_sun4v_msi_setmsiq(unsigned long devhandle,
70 unsigned long msinum,
71 unsigned long msiq,
72 unsigned long msitype);
73extern unsigned long pci_sun4v_msi_getstate(unsigned long devhandle,
74 unsigned long msinum,
75 unsigned long *state);
76extern unsigned long pci_sun4v_msi_setstate(unsigned long devhandle,
77 unsigned long msinum,
78 unsigned long state);
79extern unsigned long pci_sun4v_msg_getmsiq(unsigned long devhandle,
80 unsigned long msinum,
81 unsigned long *msiq);
82extern unsigned long pci_sun4v_msg_setmsiq(unsigned long devhandle,
83 unsigned long msinum,
84 unsigned long msiq);
85extern unsigned long pci_sun4v_msg_getvalid(unsigned long devhandle,
86 unsigned long msinum,
87 unsigned long *valid);
88extern unsigned long pci_sun4v_msg_setvalid(unsigned long devhandle,
89 unsigned long msinum,
90 unsigned long valid);
91
31#endif /* !(_PCI_SUN4V_H) */ 92#endif /* !(_PCI_SUN4V_H) */
diff --git a/arch/sparc64/kernel/pci_sun4v_asm.S b/arch/sparc64/kernel/pci_sun4v_asm.S
index 6604fdbf746c..ecb81f389b06 100644
--- a/arch/sparc64/kernel/pci_sun4v_asm.S
+++ b/arch/sparc64/kernel/pci_sun4v_asm.S
@@ -93,3 +93,269 @@ pci_sun4v_config_put:
93 mov -1, %o1 93 mov -1, %o1
941: retl 941: retl
95 mov %o1, %o0 95 mov %o1, %o0
96
97 /* %o0: devhandle
98 * %o1: msiqid
99 * %o2: msiq phys address
100 * %o3: num entries
101 *
102 * returns %o0: status
103 *
104 * status will be zero if the operation completed
105 * successfully, else -1 if not
106 */
107 .globl pci_sun4v_msiq_conf
108pci_sun4v_msiq_conf:
109 mov HV_FAST_PCI_MSIQ_CONF, %o5
110 ta HV_FAST_TRAP
111 retl
112 mov %o0, %o0
113
114 /* %o0: devhandle
115 * %o1: msiqid
116 * %o2: &msiq_phys_addr
117 * %o3: &msiq_num_entries
118 *
119 * returns %o0: status
120 */
121 .globl pci_sun4v_msiq_info
122pci_sun4v_msiq_info:
123 mov %o2, %o4
124 mov HV_FAST_PCI_MSIQ_INFO, %o5
125 ta HV_FAST_TRAP
126 stx %o1, [%o4]
127 stx %o2, [%o3]
128 retl
129 mov %o0, %o0
130
131 /* %o0: devhandle
132 * %o1: msiqid
133 * %o2: &valid
134 *
135 * returns %o0: status
136 */
137 .globl pci_sun4v_msiq_getvalid
138pci_sun4v_msiq_getvalid:
139 mov HV_FAST_PCI_MSIQ_GETVALID, %o5
140 ta HV_FAST_TRAP
141 stx %o1, [%o2]
142 retl
143 mov %o0, %o0
144
145 /* %o0: devhandle
146 * %o1: msiqid
147 * %o2: valid
148 *
149 * returns %o0: status
150 */
151 .globl pci_sun4v_msiq_setvalid
152pci_sun4v_msiq_setvalid:
153 mov HV_FAST_PCI_MSIQ_SETVALID, %o5
154 ta HV_FAST_TRAP
155 retl
156 mov %o0, %o0
157
158 /* %o0: devhandle
159 * %o1: msiqid
160 * %o2: &state
161 *
162 * returns %o0: status
163 */
164 .globl pci_sun4v_msiq_getstate
165pci_sun4v_msiq_getstate:
166 mov HV_FAST_PCI_MSIQ_GETSTATE, %o5
167 ta HV_FAST_TRAP
168 stx %o1, [%o2]
169 retl
170 mov %o0, %o0
171
172 /* %o0: devhandle
173 * %o1: msiqid
174 * %o2: state
175 *
176 * returns %o0: status
177 */
178 .globl pci_sun4v_msiq_setstate
179pci_sun4v_msiq_setstate:
180 mov HV_FAST_PCI_MSIQ_SETSTATE, %o5
181 ta HV_FAST_TRAP
182 retl
183 mov %o0, %o0
184
185 /* %o0: devhandle
186 * %o1: msiqid
187 * %o2: &head
188 *
189 * returns %o0: status
190 */
191 .globl pci_sun4v_msiq_gethead
192pci_sun4v_msiq_gethead:
193 mov HV_FAST_PCI_MSIQ_GETHEAD, %o5
194 ta HV_FAST_TRAP
195 stx %o1, [%o2]
196 retl
197 mov %o0, %o0
198
199 /* %o0: devhandle
200 * %o1: msiqid
201 * %o2: head
202 *
203 * returns %o0: status
204 */
205 .globl pci_sun4v_msiq_sethead
206pci_sun4v_msiq_sethead:
207 mov HV_FAST_PCI_MSIQ_SETHEAD, %o5
208 ta HV_FAST_TRAP
209 retl
210 mov %o0, %o0
211
212 /* %o0: devhandle
213 * %o1: msiqid
214 * %o2: &tail
215 *
216 * returns %o0: status
217 */
218 .globl pci_sun4v_msiq_gettail
219pci_sun4v_msiq_gettail:
220 mov HV_FAST_PCI_MSIQ_GETTAIL, %o5
221 ta HV_FAST_TRAP
222 stx %o1, [%o2]
223 retl
224 mov %o0, %o0
225
226 /* %o0: devhandle
227 * %o1: msinum
228 * %o2: &valid
229 *
230 * returns %o0: status
231 */
232 .globl pci_sun4v_msi_getvalid
233pci_sun4v_msi_getvalid:
234 mov HV_FAST_PCI_MSI_GETVALID, %o5
235 ta HV_FAST_TRAP
236 stx %o1, [%o2]
237 retl
238 mov %o0, %o0
239
240 /* %o0: devhandle
241 * %o1: msinum
242 * %o2: valid
243 *
244 * returns %o0: status
245 */
246 .globl pci_sun4v_msi_setvalid
247pci_sun4v_msi_setvalid:
248 mov HV_FAST_PCI_MSI_SETVALID, %o5
249 ta HV_FAST_TRAP
250 retl
251 mov %o0, %o0
252
253 /* %o0: devhandle
254 * %o1: msinum
255 * %o2: &msiq
256 *
257 * returns %o0: status
258 */
259 .globl pci_sun4v_msi_getmsiq
260pci_sun4v_msi_getmsiq:
261 mov HV_FAST_PCI_MSI_GETMSIQ, %o5
262 ta HV_FAST_TRAP
263 stx %o1, [%o2]
264 retl
265 mov %o0, %o0
266
267 /* %o0: devhandle
268 * %o1: msinum
269 * %o2: msitype
270 * %o3: msiq
271 *
272 * returns %o0: status
273 */
274 .globl pci_sun4v_msi_setmsiq
275pci_sun4v_msi_setmsiq:
276 mov HV_FAST_PCI_MSI_SETMSIQ, %o5
277 ta HV_FAST_TRAP
278 retl
279 mov %o0, %o0
280
281 /* %o0: devhandle
282 * %o1: msinum
283 * %o2: &state
284 *
285 * returns %o0: status
286 */
287 .globl pci_sun4v_msi_getstate
288pci_sun4v_msi_getstate:
289 mov HV_FAST_PCI_MSI_GETSTATE, %o5
290 ta HV_FAST_TRAP
291 stx %o1, [%o2]
292 retl
293 mov %o0, %o0
294
295 /* %o0: devhandle
296 * %o1: msinum
297 * %o2: state
298 *
299 * returns %o0: status
300 */
301 .globl pci_sun4v_msi_setstate
302pci_sun4v_msi_setstate:
303 mov HV_FAST_PCI_MSI_SETSTATE, %o5
304 ta HV_FAST_TRAP
305 retl
306 mov %o0, %o0
307
308 /* %o0: devhandle
309 * %o1: msinum
310 * %o2: &msiq
311 *
312 * returns %o0: status
313 */
314 .globl pci_sun4v_msg_getmsiq
315pci_sun4v_msg_getmsiq:
316 mov HV_FAST_PCI_MSG_GETMSIQ, %o5
317 ta HV_FAST_TRAP
318 stx %o1, [%o2]
319 retl
320 mov %o0, %o0
321
322 /* %o0: devhandle
323 * %o1: msinum
324 * %o2: msiq
325 *
326 * returns %o0: status
327 */
328 .globl pci_sun4v_msg_setmsiq
329pci_sun4v_msg_setmsiq:
330 mov HV_FAST_PCI_MSG_SETMSIQ, %o5
331 ta HV_FAST_TRAP
332 retl
333 mov %o0, %o0
334
335 /* %o0: devhandle
336 * %o1: msinum
337 * %o2: &valid
338 *
339 * returns %o0: status
340 */
341 .globl pci_sun4v_msg_getvalid
342pci_sun4v_msg_getvalid:
343 mov HV_FAST_PCI_MSG_GETVALID, %o5
344 ta HV_FAST_TRAP
345 stx %o1, [%o2]
346 retl
347 mov %o0, %o0
348
349 /* %o0: devhandle
350 * %o1: msinum
351 * %o2: valid
352 *
353 * returns %o0: status
354 */
355 .globl pci_sun4v_msg_setvalid
356pci_sun4v_msg_setvalid:
357 mov HV_FAST_PCI_MSG_SETVALID, %o5
358 ta HV_FAST_TRAP
359 retl
360 mov %o0, %o0
361
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index bf033b31d437..451028341c75 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -315,7 +315,7 @@ void __init setup_arch(char **cmdline_p)
315{ 315{
316 /* Initialize PROM console and command line. */ 316 /* Initialize PROM console and command line. */
317 *cmdline_p = prom_getbootargs(); 317 *cmdline_p = prom_getbootargs();
318 strcpy(saved_command_line, *cmdline_p); 318 strcpy(boot_command_line, *cmdline_p);
319 319
320 if (tlb_type == hypervisor) 320 if (tlb_type == hypervisor)
321 printk("ARCH: SUN4V\n"); 321 printk("ARCH: SUN4V\n");
diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c
index 3f619ead22cc..a05e43d51755 100644
--- a/arch/sparc64/kernel/sunos_ioctl32.c
+++ b/arch/sparc64/kernel/sunos_ioctl32.c
@@ -11,6 +11,7 @@
11#include <linux/errno.h> 11#include <linux/errno.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/termios.h> 13#include <linux/termios.h>
14#include <linux/tty.h>
14#include <linux/ioctl.h> 15#include <linux/ioctl.h>
15#include <linux/route.h> 16#include <linux/route.h>
16#include <linux/sockios.h> 17#include <linux/sockios.h>
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index e27cb71bd8e2..7876a0226285 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -459,70 +459,6 @@ asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
459 return sys_sysfs(option, arg1, arg2); 459 return sys_sysfs(option, arg1, arg2);
460} 460}
461 461
462struct sysinfo32 {
463 s32 uptime;
464 u32 loads[3];
465 u32 totalram;
466 u32 freeram;
467 u32 sharedram;
468 u32 bufferram;
469 u32 totalswap;
470 u32 freeswap;
471 unsigned short procs;
472 unsigned short pad;
473 u32 totalhigh;
474 u32 freehigh;
475 u32 mem_unit;
476 char _f[20-2*sizeof(int)-sizeof(int)];
477};
478
479asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
480{
481 struct sysinfo s;
482 int ret, err;
483 int bitcount = 0;
484 mm_segment_t old_fs = get_fs ();
485
486 set_fs(KERNEL_DS);
487 ret = sys_sysinfo((struct sysinfo __user *) &s);
488 set_fs(old_fs);
489 /* Check to see if any memory value is too large for 32-bit and
490 * scale down if needed.
491 */
492 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
493 while (s.mem_unit < PAGE_SIZE) {
494 s.mem_unit <<= 1;
495 bitcount++;
496 }
497 s.totalram >>= bitcount;
498 s.freeram >>= bitcount;
499 s.sharedram >>= bitcount;
500 s.bufferram >>= bitcount;
501 s.totalswap >>= bitcount;
502 s.freeswap >>= bitcount;
503 s.totalhigh >>= bitcount;
504 s.freehigh >>= bitcount;
505 }
506
507 err = put_user (s.uptime, &info->uptime);
508 err |= __put_user (s.loads[0], &info->loads[0]);
509 err |= __put_user (s.loads[1], &info->loads[1]);
510 err |= __put_user (s.loads[2], &info->loads[2]);
511 err |= __put_user (s.totalram, &info->totalram);
512 err |= __put_user (s.freeram, &info->freeram);
513 err |= __put_user (s.sharedram, &info->sharedram);
514 err |= __put_user (s.bufferram, &info->bufferram);
515 err |= __put_user (s.totalswap, &info->totalswap);
516 err |= __put_user (s.freeswap, &info->freeswap);
517 err |= __put_user (s.procs, &info->procs);
518 err |= __put_user (s.totalhigh, &info->totalhigh);
519 err |= __put_user (s.freehigh, &info->freehigh);
520 err |= __put_user (s.mem_unit, &info->mem_unit);
521 if (err)
522 return -EFAULT;
523 return ret;
524}
525
526asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) 462asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval)
527{ 463{
528 struct timespec t; 464 struct timespec t;
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 2ebc2c051383..4cff95b7b3a4 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -824,10 +824,17 @@ asmlinkage int sunos_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, in
824 return ret; 824 return ret;
825} 825}
826 826
827extern int kill_pg(int, int, int);
828asmlinkage int sunos_killpg(int pgrp, int sig) 827asmlinkage int sunos_killpg(int pgrp, int sig)
829{ 828{
830 return kill_pg(pgrp, sig, 0); 829 int ret;
830
831 rcu_read_lock();
832 ret = -EINVAL;
833 if (pgrp > 0)
834 ret = kill_pgrp(find_pid(pgrp), sig, 0);
835 rcu_read_unlock();
836
837 return ret;
831} 838}
832 839
833asmlinkage int sunos_audit(void) 840asmlinkage int sunos_audit(void)
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 9a8026797ac0..948b7d2d5874 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -61,7 +61,7 @@ sys_call_table32:
61 .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask 61 .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask
62/*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir 62/*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
63 .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64 63 .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
64/*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, sys32_sysinfo 64/*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo
65 .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex 65 .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
66/*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid 66/*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
67 .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 67 .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 061e1b1fa583..f84da4f1b706 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -1327,7 +1327,7 @@ static int mini_rtc_release(struct inode *inode, struct file *file)
1327} 1327}
1328 1328
1329 1329
1330static struct file_operations mini_rtc_fops = { 1330static const struct file_operations mini_rtc_fops = {
1331 .owner = THIS_MODULE, 1331 .owner = THIS_MODULE,
1332 .ioctl = mini_rtc_ioctl, 1332 .ioctl = mini_rtc_ioctl,
1333 .open = mini_rtc_open, 1333 .open = mini_rtc_open,
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index 4a6063f33e7a..13fa2a2e4513 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -81,10 +81,14 @@ SECTIONS
81 __sun4v_2insn_patch = .; 81 __sun4v_2insn_patch = .;
82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) } 82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) }
83 __sun4v_2insn_patch_end = .; 83 __sun4v_2insn_patch_end = .;
84
85#ifdef CONFIG_BLK_DEV_INITRD
84 . = ALIGN(8192); 86 . = ALIGN(8192);
85 __initramfs_start = .; 87 __initramfs_start = .;
86 .init.ramfs : { *(.init.ramfs) } 88 .init.ramfs : { *(.init.ramfs) }
87 __initramfs_end = .; 89 __initramfs_end = .;
90#endif
91
88 . = ALIGN(8192); 92 . = ALIGN(8192);
89 __per_cpu_start = .; 93 __per_cpu_start = .;
90 .data.percpu : { *(.data.percpu) } 94 .data.percpu : { *(.data.percpu) }
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 054822a3e05e..b1a1ee0cc6bd 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -416,7 +416,7 @@ void show_mem(void)
416 printk("Free swap: %6ldkB\n", 416 printk("Free swap: %6ldkB\n",
417 nr_swap_pages << (PAGE_SHIFT-10)); 417 nr_swap_pages << (PAGE_SHIFT-10));
418 printk("%ld pages of RAM\n", num_physpages); 418 printk("%ld pages of RAM\n", num_physpages);
419 printk("%d free pages\n", nr_free_pages()); 419 printk("%lu free pages\n", nr_free_pages());
420} 420}
421 421
422void mmu_info(struct seq_file *m) 422void mmu_info(struct seq_file *m)
@@ -1467,8 +1467,8 @@ void __init paging_init(void)
1467 for (znum = 0; znum < MAX_NR_ZONES; znum++) 1467 for (znum = 0; znum < MAX_NR_ZONES; znum++)
1468 zones_size[znum] = zholes_size[znum] = 0; 1468 zones_size[znum] = zholes_size[znum] = 0;
1469 1469
1470 zones_size[ZONE_DMA] = end_pfn; 1470 zones_size[ZONE_NORMAL] = end_pfn;
1471 zholes_size[ZONE_DMA] = end_pfn - pages_avail; 1471 zholes_size[ZONE_NORMAL] = end_pfn - pages_avail;
1472 1472
1473 free_area_init_node(0, &contig_page_data, zones_size, 1473 free_area_init_node(0, &contig_page_data, zones_size,
1474 __pa(PAGE_OFFSET) >> PAGE_SHIFT, 1474 __pa(PAGE_OFFSET) >> PAGE_SHIFT,
@@ -1593,7 +1593,7 @@ void __init mem_init(void)
1593 initpages = (((unsigned long) __init_end) - ((unsigned long) __init_begin)); 1593 initpages = (((unsigned long) __init_end) - ((unsigned long) __init_begin));
1594 initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; 1594 initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT;
1595 1595
1596 printk("Memory: %uk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n", 1596 printk("Memory: %luk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n",
1597 nr_free_pages() << (PAGE_SHIFT-10), 1597 nr_free_pages() << (PAGE_SHIFT-10),
1598 codepages << (PAGE_SHIFT-10), 1598 codepages << (PAGE_SHIFT-10),
1599 datapages << (PAGE_SHIFT-10), 1599 datapages << (PAGE_SHIFT-10),
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index 89a4757f192f..c2864447de82 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -163,7 +163,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait)
163 return mask; 163 return mask;
164} 164}
165 165
166static struct file_operations socksys_fops = { 166static const struct file_operations socksys_fops = {
167 .open = socksys_open, 167 .open = socksys_open,
168 .release = socksys_release, 168 .release = socksys_release,
169}; 169};
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index d32a80e6668c..b3a21ba77cd2 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -16,6 +16,9 @@ config MMU
16 bool 16 bool
17 default y 17 default y
18 18
19config NO_IOMEM
20 def_bool y
21
19mainmenu "Linux/Usermode Kernel Configuration" 22mainmenu "Linux/Usermode Kernel Configuration"
20 23
21config ISA 24config ISA
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 7d4190e55654..7b8baf146acc 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -19,44 +19,11 @@
19#include "line.h" 19#include "line.h"
20#include "os.h" 20#include "os.h"
21 21
22/* XXX: could well be moved to somewhere else, if needed. */
23static int my_printf(const char * fmt, ...)
24 __attribute__ ((format (printf, 1, 2)));
25
26static int my_printf(const char * fmt, ...)
27{
28 /* Yes, can be called on atomic context.*/
29 char *buf = kmalloc(4096, GFP_ATOMIC);
30 va_list args;
31 int r;
32
33 if (!buf) {
34 /* We print directly fmt.
35 * Yes, yes, yes, feel free to complain. */
36 r = strlen(fmt);
37 } else {
38 va_start(args, fmt);
39 r = vsprintf(buf, fmt, args);
40 va_end(args);
41 fmt = buf;
42 }
43
44 if (r)
45 r = os_write_file(1, fmt, r);
46 return r;
47
48}
49
50#ifdef CONFIG_NOCONFIG_CHAN 22#ifdef CONFIG_NOCONFIG_CHAN
51/* Despite its name, there's no added trailing newline. */ 23static void *not_configged_init(char *str, int device,
52static int my_puts(const char * buf) 24 const struct chan_opts *opts)
53{
54 return os_write_file(1, buf, strlen(buf));
55}
56
57static void *not_configged_init(char *str, int device, struct chan_opts *opts)
58{ 25{
59 my_puts("Using a channel type which is configured out of " 26 printk("Using a channel type which is configured out of "
60 "UML\n"); 27 "UML\n");
61 return NULL; 28 return NULL;
62} 29}
@@ -64,34 +31,34 @@ static void *not_configged_init(char *str, int device, struct chan_opts *opts)
64static int not_configged_open(int input, int output, int primary, void *data, 31static int not_configged_open(int input, int output, int primary, void *data,
65 char **dev_out) 32 char **dev_out)
66{ 33{
67 my_puts("Using a channel type which is configured out of " 34 printk("Using a channel type which is configured out of "
68 "UML\n"); 35 "UML\n");
69 return -ENODEV; 36 return -ENODEV;
70} 37}
71 38
72static void not_configged_close(int fd, void *data) 39static void not_configged_close(int fd, void *data)
73{ 40{
74 my_puts("Using a channel type which is configured out of " 41 printk("Using a channel type which is configured out of "
75 "UML\n"); 42 "UML\n");
76} 43}
77 44
78static int not_configged_read(int fd, char *c_out, void *data) 45static int not_configged_read(int fd, char *c_out, void *data)
79{ 46{
80 my_puts("Using a channel type which is configured out of " 47 printk("Using a channel type which is configured out of "
81 "UML\n"); 48 "UML\n");
82 return -EIO; 49 return -EIO;
83} 50}
84 51
85static int not_configged_write(int fd, const char *buf, int len, void *data) 52static int not_configged_write(int fd, const char *buf, int len, void *data)
86{ 53{
87 my_puts("Using a channel type which is configured out of " 54 printk("Using a channel type which is configured out of "
88 "UML\n"); 55 "UML\n");
89 return -EIO; 56 return -EIO;
90} 57}
91 58
92static int not_configged_console_write(int fd, const char *buf, int len) 59static int not_configged_console_write(int fd, const char *buf, int len)
93{ 60{
94 my_puts("Using a channel type which is configured out of " 61 printk("Using a channel type which is configured out of "
95 "UML\n"); 62 "UML\n");
96 return -EIO; 63 return -EIO;
97} 64}
@@ -99,14 +66,14 @@ static int not_configged_console_write(int fd, const char *buf, int len)
99static int not_configged_window_size(int fd, void *data, unsigned short *rows, 66static int not_configged_window_size(int fd, void *data, unsigned short *rows,
100 unsigned short *cols) 67 unsigned short *cols)
101{ 68{
102 my_puts("Using a channel type which is configured out of " 69 printk("Using a channel type which is configured out of "
103 "UML\n"); 70 "UML\n");
104 return -ENODEV; 71 return -ENODEV;
105} 72}
106 73
107static void not_configged_free(void *data) 74static void not_configged_free(void *data)
108{ 75{
109 my_puts("Using a channel type which is configured out of " 76 printk("Using a channel type which is configured out of "
110 "UML\n"); 77 "UML\n");
111} 78}
112 79
@@ -255,15 +222,28 @@ void enable_chan(struct line *line)
255 } 222 }
256} 223}
257 224
225/* Items are added in IRQ context, when free_irq can't be called, and
226 * removed in process context, when it can.
227 * This handles interrupt sources which disappear, and which need to
228 * be permanently disabled. This is discovered in IRQ context, but
229 * the freeing of the IRQ must be done later.
230 */
231static DEFINE_SPINLOCK(irqs_to_free_lock);
258static LIST_HEAD(irqs_to_free); 232static LIST_HEAD(irqs_to_free);
259 233
260void free_irqs(void) 234void free_irqs(void)
261{ 235{
262 struct chan *chan; 236 struct chan *chan;
237 LIST_HEAD(list);
238 struct list_head *ele;
263 239
264 while(!list_empty(&irqs_to_free)){ 240 spin_lock_irq(&irqs_to_free_lock);
265 chan = list_entry(irqs_to_free.next, struct chan, free_list); 241 list_splice_init(&irqs_to_free, &list);
266 list_del(&chan->free_list); 242 INIT_LIST_HEAD(&irqs_to_free);
243 spin_unlock_irq(&irqs_to_free_lock);
244
245 list_for_each(ele, &list){
246 chan = list_entry(ele, struct chan, free_list);
267 247
268 if(chan->input) 248 if(chan->input)
269 free_irq(chan->line->driver->read_irq, chan); 249 free_irq(chan->line->driver->read_irq, chan);
@@ -279,7 +259,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq)
279 return; 259 return;
280 260
281 if(delay_free_irq){ 261 if(delay_free_irq){
262 spin_lock_irq(&irqs_to_free_lock);
282 list_add(&chan->free_list, &irqs_to_free); 263 list_add(&chan->free_list, &irqs_to_free);
264 spin_unlock_irq(&irqs_to_free_lock);
283 } 265 }
284 else { 266 else {
285 if(chan->input) 267 if(chan->input)
@@ -372,8 +354,7 @@ int console_write_chan(struct list_head *chans, const char *buf, int len)
372 return ret; 354 return ret;
373} 355}
374 356
375int console_open_chan(struct line *line, struct console *co, 357int console_open_chan(struct line *line, struct console *co)
376 const struct chan_opts *opts)
377{ 358{
378 int err; 359 int err;
379 360
@@ -381,7 +362,7 @@ int console_open_chan(struct line *line, struct console *co,
381 if(err) 362 if(err)
382 return err; 363 return err;
383 364
384 printk("Console initialized on /dev/%s%d\n",co->name,co->index); 365 printk("Console initialized on /dev/%s%d\n", co->name, co->index);
385 return 0; 366 return 0;
386} 367}
387 368
@@ -534,7 +515,7 @@ static const struct chan_type chan_table[] = {
534}; 515};
535 516
536static struct chan *parse_chan(struct line *line, char *str, int device, 517static struct chan *parse_chan(struct line *line, char *str, int device,
537 const struct chan_opts *opts) 518 const struct chan_opts *opts, char **error_out)
538{ 519{
539 const struct chan_type *entry; 520 const struct chan_type *entry;
540 const struct chan_ops *ops; 521 const struct chan_ops *ops;
@@ -553,19 +534,21 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
553 } 534 }
554 } 535 }
555 if(ops == NULL){ 536 if(ops == NULL){
556 my_printf("parse_chan couldn't parse \"%s\"\n", 537 *error_out = "No match for configured backends";
557 str);
558 return NULL; 538 return NULL;
559 } 539 }
560 if(ops->init == NULL) 540
561 return NULL;
562 data = (*ops->init)(str, device, opts); 541 data = (*ops->init)(str, device, opts);
563 if(data == NULL) 542 if(data == NULL){
543 *error_out = "Configuration failed";
564 return NULL; 544 return NULL;
545 }
565 546
566 chan = kmalloc(sizeof(*chan), GFP_ATOMIC); 547 chan = kmalloc(sizeof(*chan), GFP_ATOMIC);
567 if(chan == NULL) 548 if(chan == NULL){
549 *error_out = "Memory allocation failed";
568 return NULL; 550 return NULL;
551 }
569 *chan = ((struct chan) { .list = LIST_HEAD_INIT(chan->list), 552 *chan = ((struct chan) { .list = LIST_HEAD_INIT(chan->list),
570 .free_list = 553 .free_list =
571 LIST_HEAD_INIT(chan->free_list), 554 LIST_HEAD_INIT(chan->free_list),
@@ -582,7 +565,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
582} 565}
583 566
584int parse_chan_pair(char *str, struct line *line, int device, 567int parse_chan_pair(char *str, struct line *line, int device,
585 const struct chan_opts *opts) 568 const struct chan_opts *opts, char **error_out)
586{ 569{
587 struct list_head *chans = &line->chan_list; 570 struct list_head *chans = &line->chan_list;
588 struct chan *new, *chan; 571 struct chan *new, *chan;
@@ -599,14 +582,14 @@ int parse_chan_pair(char *str, struct line *line, int device,
599 in = str; 582 in = str;
600 *out = '\0'; 583 *out = '\0';
601 out++; 584 out++;
602 new = parse_chan(line, in, device, opts); 585 new = parse_chan(line, in, device, opts, error_out);
603 if(new == NULL) 586 if(new == NULL)
604 return -1; 587 return -1;
605 588
606 new->input = 1; 589 new->input = 1;
607 list_add(&new->list, chans); 590 list_add(&new->list, chans);
608 591
609 new = parse_chan(line, out, device, opts); 592 new = parse_chan(line, out, device, opts, error_out);
610 if(new == NULL) 593 if(new == NULL)
611 return -1; 594 return -1;
612 595
@@ -614,7 +597,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
614 new->output = 1; 597 new->output = 1;
615 } 598 }
616 else { 599 else {
617 new = parse_chan(line, str, device, opts); 600 new = parse_chan(line, str, device, opts, error_out);
618 if(new == NULL) 601 if(new == NULL)
619 return -1; 602 return -1;
620 603
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c
index 64ff22aa077b..55601687b3bc 100644
--- a/arch/um/drivers/harddog_kern.c
+++ b/arch/um/drivers/harddog_kern.c
@@ -9,10 +9,10 @@
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 * 12 *
13 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 13 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
14 * warranty for any of this software. This material is provided 14 * warranty for any of this software. This material is provided
15 * "AS-IS" and at no charge. 15 * "AS-IS" and at no charge.
16 * 16 *
17 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> 17 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
18 * 18 *
@@ -29,11 +29,11 @@
29 * Made SMP safe for 2.3.x 29 * Made SMP safe for 2.3.x
30 * 30 *
31 * 20011127 Joel Becker (jlbec@evilplan.org> 31 * 20011127 Joel Becker (jlbec@evilplan.org>
32 * Added soft_noboot; Allows testing the softdog trigger without 32 * Added soft_noboot; Allows testing the softdog trigger without
33 * requiring a recompile. 33 * requiring a recompile.
34 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT. 34 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT.
35 */ 35 */
36 36
37#include <linux/module.h> 37#include <linux/module.h>
38#include <linux/types.h> 38#include <linux/types.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
@@ -44,12 +44,13 @@
44#include <linux/reboot.h> 44#include <linux/reboot.h>
45#include <linux/smp_lock.h> 45#include <linux/smp_lock.h>
46#include <linux/init.h> 46#include <linux/init.h>
47#include <linux/spinlock.h>
47#include <asm/uaccess.h> 48#include <asm/uaccess.h>
48#include "mconsole.h" 49#include "mconsole.h"
49 50
50MODULE_LICENSE("GPL"); 51MODULE_LICENSE("GPL");
51 52
52/* Locked by the BKL in harddog_open and harddog_release */ 53static DEFINE_SPINLOCK(lock);
53static int timer_alive; 54static int timer_alive;
54static int harddog_in_fd = -1; 55static int harddog_in_fd = -1;
55static int harddog_out_fd = -1; 56static int harddog_out_fd = -1;
@@ -57,18 +58,18 @@ static int harddog_out_fd = -1;
57/* 58/*
58 * Allow only one person to hold it open 59 * Allow only one person to hold it open
59 */ 60 */
60 61
61extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock); 62extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock);
62 63
63static int harddog_open(struct inode *inode, struct file *file) 64static int harddog_open(struct inode *inode, struct file *file)
64{ 65{
65 int err; 66 int err = -EBUSY;
66 char *sock = NULL; 67 char *sock = NULL;
67 68
68 lock_kernel(); 69 spin_lock(&lock);
69 if(timer_alive) 70 if(timer_alive)
70 return -EBUSY; 71 goto err;
71#ifdef CONFIG_HARDDOG_NOWAYOUT 72#ifdef CONFIG_HARDDOG_NOWAYOUT
72 __module_get(THIS_MODULE); 73 __module_get(THIS_MODULE);
73#endif 74#endif
74 75
@@ -76,11 +77,15 @@ static int harddog_open(struct inode *inode, struct file *file)
76 sock = mconsole_notify_socket(); 77 sock = mconsole_notify_socket();
77#endif 78#endif
78 err = start_watchdog(&harddog_in_fd, &harddog_out_fd, sock); 79 err = start_watchdog(&harddog_in_fd, &harddog_out_fd, sock);
79 if(err) return(err); 80 if(err)
81 goto err;
80 82
81 timer_alive = 1; 83 timer_alive = 1;
82 unlock_kernel(); 84 spin_unlock(&lock);
83 return nonseekable_open(inode, file); 85 return nonseekable_open(inode, file);
86err:
87 spin_unlock(&lock);
88 return err;
84} 89}
85 90
86extern void stop_watchdog(int in_fd, int out_fd); 91extern void stop_watchdog(int in_fd, int out_fd);
@@ -90,14 +95,16 @@ static int harddog_release(struct inode *inode, struct file *file)
90 /* 95 /*
91 * Shut off the timer. 96 * Shut off the timer.
92 */ 97 */
93 lock_kernel(); 98
99 spin_lock(&lock);
94 100
95 stop_watchdog(harddog_in_fd, harddog_out_fd); 101 stop_watchdog(harddog_in_fd, harddog_out_fd);
96 harddog_in_fd = -1; 102 harddog_in_fd = -1;
97 harddog_out_fd = -1; 103 harddog_out_fd = -1;
98 104
99 timer_alive=0; 105 timer_alive=0;
100 unlock_kernel(); 106 spin_unlock(&lock);
107
101 return 0; 108 return 0;
102} 109}
103 110
@@ -110,7 +117,7 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t
110 * Refresh the timer. 117 * Refresh the timer.
111 */ 118 */
112 if(len) 119 if(len)
113 return(ping_watchdog(harddog_out_fd)); 120 return ping_watchdog(harddog_out_fd);
114 return 0; 121 return 0;
115} 122}
116 123
@@ -134,11 +141,11 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
134 case WDIOC_GETBOOTSTATUS: 141 case WDIOC_GETBOOTSTATUS:
135 return put_user(0,(int __user *)argp); 142 return put_user(0,(int __user *)argp);
136 case WDIOC_KEEPALIVE: 143 case WDIOC_KEEPALIVE:
137 return(ping_watchdog(harddog_out_fd)); 144 return ping_watchdog(harddog_out_fd);
138 } 145 }
139} 146}
140 147
141static struct file_operations harddog_fops = { 148static const struct file_operations harddog_fops = {
142 .owner = THIS_MODULE, 149 .owner = THIS_MODULE,
143 .write = harddog_write, 150 .write = harddog_write,
144 .ioctl = harddog_ioctl, 151 .ioctl = harddog_ioctl,
@@ -165,7 +172,7 @@ static int __init harddog_init(void)
165 172
166 printk(banner); 173 printk(banner);
167 174
168 return(0); 175 return 0;
169} 176}
170 177
171static void __exit harddog_exit(void) 178static void __exit harddog_exit(void)
@@ -175,14 +182,3 @@ static void __exit harddog_exit(void)
175 182
176module_init(harddog_init); 183module_init(harddog_init);
177module_exit(harddog_exit); 184module_exit(harddog_exit);
178
179/*
180 * Overrides for Emacs so that we follow Linus's tabbing style.
181 * Emacs will notice this stuff at the end of the file and automatically
182 * adjust the settings for this buffer only. This must remain at the end
183 * of the file.
184 * ---------------------------------------------------------------------------
185 * Local variables:
186 * c-file-style: "linux"
187 * End:
188 */
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index def013b5a3c7..c495ecf263b1 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -38,7 +38,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
38 int in_fds[2], out_fds[2], pid, n, err; 38 int in_fds[2], out_fds[2], pid, n, err;
39 char pid_buf[sizeof("nnnnn\0")], c; 39 char pid_buf[sizeof("nnnnn\0")], c;
40 char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL }; 40 char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL };
41 char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, 41 char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL,
42 NULL }; 42 NULL };
43 char **args = NULL; 43 char **args = NULL;
44 44
@@ -96,7 +96,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
96 } 96 }
97 *in_fd_ret = in_fds[0]; 97 *in_fd_ret = in_fds[0];
98 *out_fd_ret = out_fds[1]; 98 *out_fd_ret = out_fds[1];
99 return(0); 99 return 0;
100 100
101 out_close_in: 101 out_close_in:
102 os_close_file(in_fds[0]); 102 os_close_file(in_fds[0]);
@@ -105,7 +105,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
105 os_close_file(out_fds[0]); 105 os_close_file(out_fds[0]);
106 os_close_file(out_fds[1]); 106 os_close_file(out_fds[1]);
107 out: 107 out:
108 return(err); 108 return err;
109} 109}
110 110
111void stop_watchdog(int in_fd, int out_fd) 111void stop_watchdog(int in_fd, int out_fd)
@@ -123,20 +123,9 @@ int ping_watchdog(int fd)
123 if(n != sizeof(c)){ 123 if(n != sizeof(c)){
124 printk("ping_watchdog - write failed, err = %d\n", -n); 124 printk("ping_watchdog - write failed, err = %d\n", -n);
125 if(n < 0) 125 if(n < 0)
126 return(n); 126 return n;
127 return(-EIO); 127 return -EIO;
128 } 128 }
129 return 1; 129 return 1;
130 130
131} 131}
132
133/*
134 * Overrides for Emacs so that we follow Linus's tabbing style.
135 * Emacs will notice this stuff at the end of the file and automatically
136 * adjust the settings for this buffer only. This must remain at the end
137 * of the file.
138 * ---------------------------------------------------------------------------
139 * Local variables:
140 * c-file-style: "linux"
141 * End:
142 */
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index a0d148ea63d6..10e08a8c17c3 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -15,19 +15,22 @@
15#include "os.h" 15#include "os.h"
16 16
17struct hostaudio_state { 17struct hostaudio_state {
18 int fd; 18 int fd;
19}; 19};
20 20
21struct hostmixer_state { 21struct hostmixer_state {
22 int fd; 22 int fd;
23}; 23};
24 24
25#define HOSTAUDIO_DEV_DSP "/dev/sound/dsp" 25#define HOSTAUDIO_DEV_DSP "/dev/sound/dsp"
26#define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer" 26#define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer"
27 27
28/* Only changed from linux_main at boot time */ 28/* Changed either at boot time or module load time. At boot, this is
29char *dsp = HOSTAUDIO_DEV_DSP; 29 * single-threaded; at module load, multiple modules would each have
30char *mixer = HOSTAUDIO_DEV_MIXER; 30 * their own copy of these variables.
31 */
32static char *dsp = HOSTAUDIO_DEV_DSP;
33static char *mixer = HOSTAUDIO_DEV_MIXER;
31 34
32#define DSP_HELP \ 35#define DSP_HELP \
33" This is used to specify the host dsp device to the hostaudio driver.\n" \ 36" This is used to specify the host dsp device to the hostaudio driver.\n" \
@@ -69,12 +72,12 @@ MODULE_PARM_DESC(mixer, MIXER_HELP);
69static ssize_t hostaudio_read(struct file *file, char __user *buffer, 72static ssize_t hostaudio_read(struct file *file, char __user *buffer,
70 size_t count, loff_t *ppos) 73 size_t count, loff_t *ppos)
71{ 74{
72 struct hostaudio_state *state = file->private_data; 75 struct hostaudio_state *state = file->private_data;
73 void *kbuf; 76 void *kbuf;
74 int err; 77 int err;
75 78
76#ifdef DEBUG 79#ifdef DEBUG
77 printk("hostaudio: read called, count = %d\n", count); 80 printk("hostaudio: read called, count = %d\n", count);
78#endif 81#endif
79 82
80 kbuf = kmalloc(count, GFP_KERNEL); 83 kbuf = kmalloc(count, GFP_KERNEL);
@@ -88,7 +91,7 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer,
88 if(copy_to_user(buffer, kbuf, err)) 91 if(copy_to_user(buffer, kbuf, err))
89 err = -EFAULT; 92 err = -EFAULT;
90 93
91 out: 94out:
92 kfree(kbuf); 95 kfree(kbuf);
93 return(err); 96 return(err);
94} 97}
@@ -96,12 +99,12 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer,
96static ssize_t hostaudio_write(struct file *file, const char __user *buffer, 99static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
97 size_t count, loff_t *ppos) 100 size_t count, loff_t *ppos)
98{ 101{
99 struct hostaudio_state *state = file->private_data; 102 struct hostaudio_state *state = file->private_data;
100 void *kbuf; 103 void *kbuf;
101 int err; 104 int err;
102 105
103#ifdef DEBUG 106#ifdef DEBUG
104 printk("hostaudio: write called, count = %d\n", count); 107 printk("hostaudio: write called, count = %d\n", count);
105#endif 108#endif
106 109
107 kbuf = kmalloc(count, GFP_KERNEL); 110 kbuf = kmalloc(count, GFP_KERNEL);
@@ -125,24 +128,24 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
125static unsigned int hostaudio_poll(struct file *file, 128static unsigned int hostaudio_poll(struct file *file,
126 struct poll_table_struct *wait) 129 struct poll_table_struct *wait)
127{ 130{
128 unsigned int mask = 0; 131 unsigned int mask = 0;
129 132
130#ifdef DEBUG 133#ifdef DEBUG
131 printk("hostaudio: poll called (unimplemented)\n"); 134 printk("hostaudio: poll called (unimplemented)\n");
132#endif 135#endif
133 136
134 return(mask); 137 return(mask);
135} 138}
136 139
137static int hostaudio_ioctl(struct inode *inode, struct file *file, 140static int hostaudio_ioctl(struct inode *inode, struct file *file,
138 unsigned int cmd, unsigned long arg) 141 unsigned int cmd, unsigned long arg)
139{ 142{
140 struct hostaudio_state *state = file->private_data; 143 struct hostaudio_state *state = file->private_data;
141 unsigned long data = 0; 144 unsigned long data = 0;
142 int err; 145 int err;
143 146
144#ifdef DEBUG 147#ifdef DEBUG
145 printk("hostaudio: ioctl called, cmd = %u\n", cmd); 148 printk("hostaudio: ioctl called, cmd = %u\n", cmd);
146#endif 149#endif
147 switch(cmd){ 150 switch(cmd){
148 case SNDCTL_DSP_SPEED: 151 case SNDCTL_DSP_SPEED:
@@ -179,42 +182,40 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
179 182
180static int hostaudio_open(struct inode *inode, struct file *file) 183static int hostaudio_open(struct inode *inode, struct file *file)
181{ 184{
182 struct hostaudio_state *state; 185 struct hostaudio_state *state;
183 int r = 0, w = 0; 186 int r = 0, w = 0;
184 int ret; 187 int ret;
185 188
186#ifdef DEBUG 189#ifdef DEBUG
187 printk("hostaudio: open called (host: %s)\n", dsp); 190 printk("hostaudio: open called (host: %s)\n", dsp);
188#endif 191#endif
189 192
190 state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); 193 state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
191 if(state == NULL) 194 if(state == NULL)
192 return(-ENOMEM); 195 return(-ENOMEM);
193 196
194 if(file->f_mode & FMODE_READ) r = 1; 197 if(file->f_mode & FMODE_READ) r = 1;
195 if(file->f_mode & FMODE_WRITE) w = 1; 198 if(file->f_mode & FMODE_WRITE) w = 1;
196 199
197 ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); 200 ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
198 if(ret < 0){ 201 if(ret < 0){
199 kfree(state); 202 kfree(state);
200 return(ret); 203 return(ret);
201 } 204 }
202
203 state->fd = ret; 205 state->fd = ret;
204 file->private_data = state; 206 file->private_data = state;
205 return(0); 207 return(0);
206} 208}
207 209
208static int hostaudio_release(struct inode *inode, struct file *file) 210static int hostaudio_release(struct inode *inode, struct file *file)
209{ 211{
210 struct hostaudio_state *state = file->private_data; 212 struct hostaudio_state *state = file->private_data;
211 213
212#ifdef DEBUG 214#ifdef DEBUG
213 printk("hostaudio: release called\n"); 215 printk("hostaudio: release called\n");
214#endif 216#endif
215 217 os_close_file(state->fd);
216 os_close_file(state->fd); 218 kfree(state);
217 kfree(state);
218 219
219 return(0); 220 return(0);
220} 221}
@@ -224,10 +225,10 @@ static int hostaudio_release(struct inode *inode, struct file *file)
224static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, 225static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file,
225 unsigned int cmd, unsigned long arg) 226 unsigned int cmd, unsigned long arg)
226{ 227{
227 struct hostmixer_state *state = file->private_data; 228 struct hostmixer_state *state = file->private_data;
228 229
229#ifdef DEBUG 230#ifdef DEBUG
230 printk("hostmixer: ioctl called\n"); 231 printk("hostmixer: ioctl called\n");
231#endif 232#endif
232 233
233 return(os_ioctl_generic(state->fd, cmd, arg)); 234 return(os_ioctl_generic(state->fd, cmd, arg));
@@ -235,68 +236,67 @@ static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file,
235 236
236static int hostmixer_open_mixdev(struct inode *inode, struct file *file) 237static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
237{ 238{
238 struct hostmixer_state *state; 239 struct hostmixer_state *state;
239 int r = 0, w = 0; 240 int r = 0, w = 0;
240 int ret; 241 int ret;
241 242
242#ifdef DEBUG 243#ifdef DEBUG
243 printk("hostmixer: open called (host: %s)\n", mixer); 244 printk("hostmixer: open called (host: %s)\n", mixer);
244#endif 245#endif
245 246
246 state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL); 247 state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL);
247 if(state == NULL) return(-ENOMEM); 248 if(state == NULL) return(-ENOMEM);
248 249
249 if(file->f_mode & FMODE_READ) r = 1; 250 if(file->f_mode & FMODE_READ) r = 1;
250 if(file->f_mode & FMODE_WRITE) w = 1; 251 if(file->f_mode & FMODE_WRITE) w = 1;
251 252
252 ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); 253 ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
253 254
254 if(ret < 0){ 255 if(ret < 0){
255 printk("hostaudio_open_mixdev failed to open '%s', err = %d\n", 256 printk("hostaudio_open_mixdev failed to open '%s', err = %d\n",
256 dsp, -ret); 257 dsp, -ret);
257 kfree(state); 258 kfree(state);
258 return(ret); 259 return(ret);
259 } 260 }
260 261
261 file->private_data = state; 262 file->private_data = state;
262 return(0); 263 return(0);
263} 264}
264 265
265static int hostmixer_release(struct inode *inode, struct file *file) 266static int hostmixer_release(struct inode *inode, struct file *file)
266{ 267{
267 struct hostmixer_state *state = file->private_data; 268 struct hostmixer_state *state = file->private_data;
268 269
269#ifdef DEBUG 270#ifdef DEBUG
270 printk("hostmixer: release called\n"); 271 printk("hostmixer: release called\n");
271#endif 272#endif
272 273
273 os_close_file(state->fd); 274 os_close_file(state->fd);
274 kfree(state); 275 kfree(state);
275 276
276 return(0); 277 return(0);
277} 278}
278 279
279
280/* kernel module operations */ 280/* kernel module operations */
281 281
282static const struct file_operations hostaudio_fops = { 282static const struct file_operations hostaudio_fops = {
283 .owner = THIS_MODULE, 283 .owner = THIS_MODULE,
284 .llseek = no_llseek, 284 .llseek = no_llseek,
285 .read = hostaudio_read, 285 .read = hostaudio_read,
286 .write = hostaudio_write, 286 .write = hostaudio_write,
287 .poll = hostaudio_poll, 287 .poll = hostaudio_poll,
288 .ioctl = hostaudio_ioctl, 288 .ioctl = hostaudio_ioctl,
289 .mmap = NULL, 289 .mmap = NULL,
290 .open = hostaudio_open, 290 .open = hostaudio_open,
291 .release = hostaudio_release, 291 .release = hostaudio_release,
292}; 292};
293 293
294static const struct file_operations hostmixer_fops = { 294static const struct file_operations hostmixer_fops = {
295 .owner = THIS_MODULE, 295 .owner = THIS_MODULE,
296 .llseek = no_llseek, 296 .llseek = no_llseek,
297 .ioctl = hostmixer_ioctl_mixdev, 297 .ioctl = hostmixer_ioctl_mixdev,
298 .open = hostmixer_open_mixdev, 298 .open = hostmixer_open_mixdev,
299 .release = hostmixer_release, 299 .release = hostmixer_release,
300}; 300};
301 301
302struct { 302struct {
@@ -310,42 +310,31 @@ MODULE_LICENSE("GPL");
310 310
311static int __init hostaudio_init_module(void) 311static int __init hostaudio_init_module(void)
312{ 312{
313 printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", 313 printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
314 dsp, mixer); 314 dsp, mixer);
315 315
316 module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); 316 module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1);
317 if(module_data.dev_audio < 0){ 317 if(module_data.dev_audio < 0){
318 printk(KERN_ERR "hostaudio: couldn't register DSP device!\n"); 318 printk(KERN_ERR "hostaudio: couldn't register DSP device!\n");
319 return -ENODEV; 319 return -ENODEV;
320 } 320 }
321 321
322 module_data.dev_mixer = register_sound_mixer(&hostmixer_fops, -1); 322 module_data.dev_mixer = register_sound_mixer(&hostmixer_fops, -1);
323 if(module_data.dev_mixer < 0){ 323 if(module_data.dev_mixer < 0){
324 printk(KERN_ERR "hostmixer: couldn't register mixer " 324 printk(KERN_ERR "hostmixer: couldn't register mixer "
325 "device!\n"); 325 "device!\n");
326 unregister_sound_dsp(module_data.dev_audio); 326 unregister_sound_dsp(module_data.dev_audio);
327 return -ENODEV; 327 return -ENODEV;
328 } 328 }
329 329
330 return 0; 330 return 0;
331} 331}
332 332
333static void __exit hostaudio_cleanup_module (void) 333static void __exit hostaudio_cleanup_module (void)
334{ 334{
335 unregister_sound_mixer(module_data.dev_mixer); 335 unregister_sound_mixer(module_data.dev_mixer);
336 unregister_sound_dsp(module_data.dev_audio); 336 unregister_sound_dsp(module_data.dev_audio);
337} 337}
338 338
339module_init(hostaudio_init_module); 339module_init(hostaudio_init_module);
340module_exit(hostaudio_cleanup_module); 340module_exit(hostaudio_cleanup_module);
341
342/*
343 * Overrides for Emacs so that we follow Linus's tabbing style.
344 * Emacs will notice this stuff at the end of the file and automatically
345 * adjust the settings for this buffer only. This must remain at the end
346 * of the file.
347 * ---------------------------------------------------------------------------
348 * Local variables:
349 * c-file-style: "linux"
350 * End:
351 */
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 83301e1ef67c..01d4ab6b0ef1 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -191,7 +191,6 @@ void line_flush_buffer(struct tty_struct *tty)
191 /*XXX: copied from line_write, verify if it is correct!*/ 191 /*XXX: copied from line_write, verify if it is correct!*/
192 if(tty->stopped) 192 if(tty->stopped)
193 return; 193 return;
194 //return 0;
195 194
196 spin_lock_irqsave(&line->lock, flags); 195 spin_lock_irqsave(&line->lock, flags);
197 err = flush_buffer(line); 196 err = flush_buffer(line);
@@ -421,42 +420,55 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
421 return err; 420 return err;
422} 421}
423 422
423/* Normally, a driver like this can rely mostly on the tty layer
424 * locking, particularly when it comes to the driver structure.
425 * However, in this case, mconsole requests can come in "from the
426 * side", and race with opens and closes.
427 *
428 * mconsole config requests will want to be sure the device isn't in
429 * use, and get_config, open, and close will want a stable
430 * configuration. The checking and modification of the configuration
431 * is done under a spinlock. Checking whether the device is in use is
432 * line->tty->count > 1, also under the spinlock.
433 *
434 * tty->count serves to decide whether the device should be enabled or
435 * disabled on the host. If it's equal to 1, then we are doing the
436 * first open or last close. Otherwise, open and close just return.
437 */
438
424int line_open(struct line *lines, struct tty_struct *tty) 439int line_open(struct line *lines, struct tty_struct *tty)
425{ 440{
426 struct line *line; 441 struct line *line = &lines[tty->index];
427 int err = -ENODEV; 442 int err = -ENODEV;
428 443
429 line = &lines[tty->index]; 444 spin_lock(&line->count_lock);
430 tty->driver_data = line; 445 if(!line->valid)
446 goto out_unlock;
431 447
432 /* The IRQ which takes this lock is not yet enabled and won't be run 448 err = 0;
433 * before the end, so we don't need to use spin_lock_irq.*/ 449 if(tty->count > 1)
434 spin_lock(&line->lock); 450 goto out_unlock;
451
452 spin_unlock(&line->count_lock);
435 453
436 tty->driver_data = line; 454 tty->driver_data = line;
437 line->tty = tty; 455 line->tty = tty;
438 if(!line->valid)
439 goto out;
440 456
441 if(tty->count == 1){ 457 enable_chan(line);
442 /* Here the device is opened, if necessary, and interrupt 458 INIT_DELAYED_WORK(&line->task, line_timer_cb);
443 * is registered.
444 */
445 enable_chan(line);
446 INIT_DELAYED_WORK(&line->task, line_timer_cb);
447 459
448 if(!line->sigio){ 460 if(!line->sigio){
449 chan_enable_winch(&line->chan_list, tty); 461 chan_enable_winch(&line->chan_list, tty);
450 line->sigio = 1; 462 line->sigio = 1;
451 }
452
453 chan_window_size(&line->chan_list, &tty->winsize.ws_row,
454 &tty->winsize.ws_col);
455 } 463 }
456 464
457 err = 0; 465 chan_window_size(&line->chan_list, &tty->winsize.ws_row,
458out: 466 &tty->winsize.ws_col);
459 spin_unlock(&line->lock); 467
468 return err;
469
470out_unlock:
471 spin_unlock(&line->count_lock);
460 return err; 472 return err;
461} 473}
462 474
@@ -466,25 +478,36 @@ void line_close(struct tty_struct *tty, struct file * filp)
466{ 478{
467 struct line *line = tty->driver_data; 479 struct line *line = tty->driver_data;
468 480
469 /* XXX: I assume this should be called in process context, not with 481 /* If line_open fails (and tty->driver_data is never set),
470 * interrupts disabled! 482 * tty_open will call line_close. So just return in this case.
471 */ 483 */
472 spin_lock_irq(&line->lock); 484 if(line == NULL)
485 return;
473 486
474 /* We ignore the error anyway! */ 487 /* We ignore the error anyway! */
475 flush_buffer(line); 488 flush_buffer(line);
476 489
477 if(tty->count == 1){ 490 spin_lock(&line->count_lock);
478 line->tty = NULL; 491 if(!line->valid)
479 tty->driver_data = NULL; 492 goto out_unlock;
480 493
481 if(line->sigio){ 494 if(tty->count > 1)
482 unregister_winch(tty); 495 goto out_unlock;
483 line->sigio = 0; 496
484 } 497 spin_unlock(&line->count_lock);
498
499 line->tty = NULL;
500 tty->driver_data = NULL;
501
502 if(line->sigio){
503 unregister_winch(tty);
504 line->sigio = 0;
485 } 505 }
486 506
487 spin_unlock_irq(&line->lock); 507 return;
508
509out_unlock:
510 spin_unlock(&line->count_lock);
488} 511}
489 512
490void close_lines(struct line *lines, int nlines) 513void close_lines(struct line *lines, int nlines)
@@ -495,14 +518,44 @@ void close_lines(struct line *lines, int nlines)
495 close_chan(&lines[i].chan_list, 0); 518 close_chan(&lines[i].chan_list, 0);
496} 519}
497 520
521static int setup_one_line(struct line *lines, int n, char *init, int init_prio,
522 char **error_out)
523{
524 struct line *line = &lines[n];
525 int err = -EINVAL;
526
527 spin_lock(&line->count_lock);
528
529 if(line->tty != NULL){
530 *error_out = "Device is already open";
531 goto out;
532 }
533
534 if (line->init_pri <= init_prio){
535 line->init_pri = init_prio;
536 if (!strcmp(init, "none"))
537 line->valid = 0;
538 else {
539 line->init_str = init;
540 line->valid = 1;
541 }
542 }
543 err = 0;
544out:
545 spin_unlock(&line->count_lock);
546 return err;
547}
548
498/* Common setup code for both startup command line and mconsole initialization. 549/* Common setup code for both startup command line and mconsole initialization.
499 * @lines contains the array (of size @num) to modify; 550 * @lines contains the array (of size @num) to modify;
500 * @init is the setup string; 551 * @init is the setup string;
552 * @error_out is an error string in the case of failure;
501 */ 553 */
502 554
503int line_setup(struct line *lines, unsigned int num, char *init) 555int line_setup(struct line *lines, unsigned int num, char *init,
556 char **error_out)
504{ 557{
505 int i, n; 558 int i, n, err;
506 char *end; 559 char *end;
507 560
508 if(*init == '=') { 561 if(*init == '=') {
@@ -513,73 +566,56 @@ int line_setup(struct line *lines, unsigned int num, char *init)
513 else { 566 else {
514 n = simple_strtoul(init, &end, 0); 567 n = simple_strtoul(init, &end, 0);
515 if(*end != '='){ 568 if(*end != '='){
516 printk(KERN_ERR "line_setup failed to parse \"%s\"\n", 569 *error_out = "Couldn't parse device number";
517 init); 570 return -EINVAL;
518 return 0;
519 } 571 }
520 init = end; 572 init = end;
521 } 573 }
522 init++; 574 init++;
523 575
524 if (n >= (signed int) num) { 576 if (n >= (signed int) num) {
525 printk("line_setup - %d out of range ((0 ... %d) allowed)\n", 577 *error_out = "Device number out of range";
526 n, num - 1); 578 return -EINVAL;
527 return 0;
528 } 579 }
529 else if (n >= 0){ 580 else if (n >= 0){
530 if (lines[n].tty != NULL) { 581 err = setup_one_line(lines, n, init, INIT_ONE, error_out);
531 printk("line_setup - device %d is open\n", n); 582 if(err)
532 return 0; 583 return err;
533 }
534 if (lines[n].init_pri <= INIT_ONE){
535 lines[n].init_pri = INIT_ONE;
536 if (!strcmp(init, "none"))
537 lines[n].valid = 0;
538 else {
539 lines[n].init_str = init;
540 lines[n].valid = 1;
541 }
542 }
543 } 584 }
544 else { 585 else {
545 for(i = 0; i < num; i++){ 586 for(i = 0; i < num; i++){
546 if(lines[i].init_pri <= INIT_ALL){ 587 err = setup_one_line(lines, i, init, INIT_ALL,
547 lines[i].init_pri = INIT_ALL; 588 error_out);
548 if(!strcmp(init, "none")) lines[i].valid = 0; 589 if(err)
549 else { 590 return err;
550 lines[i].init_str = init;
551 lines[i].valid = 1;
552 }
553 }
554 } 591 }
555 } 592 }
556 return n == -1 ? num : n; 593 return n == -1 ? num : n;
557} 594}
558 595
559int line_config(struct line *lines, unsigned int num, char *str, 596int line_config(struct line *lines, unsigned int num, char *str,
560 const struct chan_opts *opts) 597 const struct chan_opts *opts, char **error_out)
561{ 598{
562 struct line *line; 599 struct line *line;
563 char *new; 600 char *new;
564 int n; 601 int n;
565 602
566 if(*str == '='){ 603 if(*str == '='){
567 printk("line_config - can't configure all devices from " 604 *error_out = "Can't configure all devices from mconsole";
568 "mconsole\n"); 605 return -EINVAL;
569 return 1;
570 } 606 }
571 607
572 new = kstrdup(str, GFP_KERNEL); 608 new = kstrdup(str, GFP_KERNEL);
573 if(new == NULL){ 609 if(new == NULL){
574 printk("line_config - kstrdup failed\n"); 610 *error_out = "Failed to allocate memory";
575 return 1; 611 return -ENOMEM;
576 } 612 }
577 n = line_setup(lines, num, new); 613 n = line_setup(lines, num, new, error_out);
578 if(n < 0) 614 if(n < 0)
579 return 1; 615 return n;
580 616
581 line = &lines[n]; 617 line = &lines[n];
582 return parse_chan_pair(line->init_str, line, n, opts); 618 return parse_chan_pair(line->init_str, line, n, opts, error_out);
583} 619}
584 620
585int line_get_config(char *name, struct line *lines, unsigned int num, char *str, 621int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
@@ -602,13 +638,13 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
602 638
603 line = &lines[dev]; 639 line = &lines[dev];
604 640
605 spin_lock(&line->lock); 641 spin_lock(&line->count_lock);
606 if(!line->valid) 642 if(!line->valid)
607 CONFIG_CHUNK(str, size, n, "none", 1); 643 CONFIG_CHUNK(str, size, n, "none", 1);
608 else if(line->tty == NULL) 644 else if(line->tty == NULL)
609 CONFIG_CHUNK(str, size, n, line->init_str, 1); 645 CONFIG_CHUNK(str, size, n, line->init_str, 1);
610 else n = chan_config_string(&line->chan_list, str, size, error_out); 646 else n = chan_config_string(&line->chan_list, str, size, error_out);
611 spin_unlock(&line->lock); 647 spin_unlock(&line->count_lock);
612 648
613 return n; 649 return n;
614} 650}
@@ -628,22 +664,21 @@ int line_id(char **str, int *start_out, int *end_out)
628 return n; 664 return n;
629} 665}
630 666
631int line_remove(struct line *lines, unsigned int num, int n) 667int line_remove(struct line *lines, unsigned int num, int n, char **error_out)
632{ 668{
633 int err; 669 int err;
634 char config[sizeof("conxxxx=none\0")]; 670 char config[sizeof("conxxxx=none\0")];
635 671
636 sprintf(config, "%d=none", n); 672 sprintf(config, "%d=none", n);
637 err = line_setup(lines, num, config); 673 err = line_setup(lines, num, config, error_out);
638 if(err >= 0) 674 if(err >= 0)
639 err = 0; 675 err = 0;
640 return err; 676 return err;
641} 677}
642 678
643struct tty_driver *line_register_devfs(struct lines *set, 679struct tty_driver *register_lines(struct line_driver *line_driver,
644 struct line_driver *line_driver, 680 const struct tty_operations *ops,
645 const struct tty_operations *ops, 681 struct line *lines, int nlines)
646 struct line *lines, int nlines)
647{ 682{
648 int i; 683 int i;
649 struct tty_driver *driver = alloc_tty_driver(nlines); 684 struct tty_driver *driver = alloc_tty_driver(nlines);
@@ -683,6 +718,7 @@ static LIST_HEAD(winch_handlers);
683void lines_init(struct line *lines, int nlines, struct chan_opts *opts) 718void lines_init(struct line *lines, int nlines, struct chan_opts *opts)
684{ 719{
685 struct line *line; 720 struct line *line;
721 char *error;
686 int i; 722 int i;
687 723
688 for(i = 0; i < nlines; i++){ 724 for(i = 0; i < nlines; i++){
@@ -696,8 +732,9 @@ void lines_init(struct line *lines, int nlines, struct chan_opts *opts)
696 if(line->init_str == NULL) 732 if(line->init_str == NULL)
697 printk("lines_init - kstrdup returned NULL\n"); 733 printk("lines_init - kstrdup returned NULL\n");
698 734
699 if(parse_chan_pair(line->init_str, line, i, opts)){ 735 if(parse_chan_pair(line->init_str, line, i, opts, &error)){
700 printk("parse_chan_pair failed for device %d\n", i); 736 printk("parse_chan_pair failed for device %d : %s\n",
737 i, error);
701 line->valid = 0; 738 line->valid = 0;
702 } 739 }
703 } 740 }
@@ -737,7 +774,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
737 line = tty->driver_data; 774 line = tty->driver_data;
738 chan_window_size(&line->chan_list, &tty->winsize.ws_row, 775 chan_window_size(&line->chan_list, &tty->winsize.ws_row,
739 &tty->winsize.ws_col); 776 &tty->winsize.ws_col);
740 kill_pg(tty->pgrp, SIGWINCH, 1); 777 kill_pgrp(tty->pgrp, SIGWINCH, 1);
741 } 778 }
742 out: 779 out:
743 if(winch->fd != -1) 780 if(winch->fd != -1)
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 96f0189327af..178b2eff4a8c 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -33,7 +33,6 @@
33#include "irq_user.h" 33#include "irq_user.h"
34#include "init.h" 34#include "init.h"
35#include "os.h" 35#include "os.h"
36#include "umid.h"
37#include "irq_kern.h" 36#include "irq_kern.h"
38#include "choose-mode.h" 37#include "choose-mode.h"
39 38
@@ -337,13 +336,15 @@ void mconsole_stop(struct mc_request *req)
337 mconsole_reply(req, "", 0, 0); 336 mconsole_reply(req, "", 0, 0);
338} 337}
339 338
340/* This list is populated by __initcall routines. */ 339static DEFINE_SPINLOCK(mc_devices_lock);
341
342static LIST_HEAD(mconsole_devices); 340static LIST_HEAD(mconsole_devices);
343 341
344void mconsole_register_dev(struct mc_device *new) 342void mconsole_register_dev(struct mc_device *new)
345{ 343{
344 spin_lock(&mc_devices_lock);
345 BUG_ON(!list_empty(&new->list));
346 list_add(&new->list, &mconsole_devices); 346 list_add(&new->list, &mconsole_devices);
347 spin_unlock(&mc_devices_lock);
347} 348}
348 349
349static struct mc_device *mconsole_find_dev(char *name) 350static struct mc_device *mconsole_find_dev(char *name)
@@ -367,18 +368,21 @@ struct unplugged_pages {
367 void *pages[UNPLUGGED_PER_PAGE]; 368 void *pages[UNPLUGGED_PER_PAGE];
368}; 369};
369 370
371static DECLARE_MUTEX(plug_mem_mutex);
370static unsigned long long unplugged_pages_count = 0; 372static unsigned long long unplugged_pages_count = 0;
371static struct list_head unplugged_pages = LIST_HEAD_INIT(unplugged_pages); 373static LIST_HEAD(unplugged_pages);
372static int unplug_index = UNPLUGGED_PER_PAGE; 374static int unplug_index = UNPLUGGED_PER_PAGE;
373 375
374static int mem_config(char *str) 376static int mem_config(char *str, char **error_out)
375{ 377{
376 unsigned long long diff; 378 unsigned long long diff;
377 int err = -EINVAL, i, add; 379 int err = -EINVAL, i, add;
378 char *ret; 380 char *ret;
379 381
380 if(str[0] != '=') 382 if(str[0] != '='){
383 *error_out = "Expected '=' after 'mem'";
381 goto out; 384 goto out;
385 }
382 386
383 str++; 387 str++;
384 if(str[0] == '-') 388 if(str[0] == '-')
@@ -386,15 +390,21 @@ static int mem_config(char *str)
386 else if(str[0] == '+'){ 390 else if(str[0] == '+'){
387 add = 1; 391 add = 1;
388 } 392 }
389 else goto out; 393 else {
394 *error_out = "Expected increment to start with '-' or '+'";
395 goto out;
396 }
390 397
391 str++; 398 str++;
392 diff = memparse(str, &ret); 399 diff = memparse(str, &ret);
393 if(*ret != '\0') 400 if(*ret != '\0'){
401 *error_out = "Failed to parse memory increment";
394 goto out; 402 goto out;
403 }
395 404
396 diff /= PAGE_SIZE; 405 diff /= PAGE_SIZE;
397 406
407 down(&plug_mem_mutex);
398 for(i = 0; i < diff; i++){ 408 for(i = 0; i < diff; i++){
399 struct unplugged_pages *unplugged; 409 struct unplugged_pages *unplugged;
400 void *addr; 410 void *addr;
@@ -435,11 +445,14 @@ static int mem_config(char *str)
435 unplugged = list_entry(entry, 445 unplugged = list_entry(entry,
436 struct unplugged_pages, 446 struct unplugged_pages,
437 list); 447 list);
438 unplugged->pages[unplug_index++] = addr;
439 err = os_drop_memory(addr, PAGE_SIZE); 448 err = os_drop_memory(addr, PAGE_SIZE);
440 if(err) 449 if(err){
441 printk("Failed to release memory - " 450 printk("Failed to release memory - "
442 "errno = %d\n", err); 451 "errno = %d\n", err);
452 *error_out = "Failed to release memory";
453 goto out_unlock;
454 }
455 unplugged->pages[unplug_index++] = addr;
443 } 456 }
444 457
445 unplugged_pages_count++; 458 unplugged_pages_count++;
@@ -447,6 +460,8 @@ static int mem_config(char *str)
447 } 460 }
448 461
449 err = 0; 462 err = 0;
463out_unlock:
464 up(&plug_mem_mutex);
450out: 465out:
451 return err; 466 return err;
452} 467}
@@ -470,12 +485,14 @@ static int mem_id(char **str, int *start_out, int *end_out)
470 return 0; 485 return 0;
471} 486}
472 487
473static int mem_remove(int n) 488static int mem_remove(int n, char **error_out)
474{ 489{
490 *error_out = "Memory doesn't support the remove operation";
475 return -EBUSY; 491 return -EBUSY;
476} 492}
477 493
478static struct mc_device mem_mc = { 494static struct mc_device mem_mc = {
495 .list = LIST_HEAD_INIT(mem_mc.list),
479 .name = "mem", 496 .name = "mem",
480 .config = mem_config, 497 .config = mem_config,
481 .get_config = mem_get_config, 498 .get_config = mem_get_config,
@@ -542,7 +559,7 @@ static void mconsole_get_config(int (*get_config)(char *, char *, int,
542void mconsole_config(struct mc_request *req) 559void mconsole_config(struct mc_request *req)
543{ 560{
544 struct mc_device *dev; 561 struct mc_device *dev;
545 char *ptr = req->request.data, *name; 562 char *ptr = req->request.data, *name, *error_string = "";
546 int err; 563 int err;
547 564
548 ptr += strlen("config"); 565 ptr += strlen("config");
@@ -559,8 +576,8 @@ void mconsole_config(struct mc_request *req)
559 ptr++; 576 ptr++;
560 577
561 if(*ptr == '='){ 578 if(*ptr == '='){
562 err = (*dev->config)(name); 579 err = (*dev->config)(name, &error_string);
563 mconsole_reply(req, "", err, 0); 580 mconsole_reply(req, error_string, err, 0);
564 } 581 }
565 else mconsole_get_config(dev->get_config, req, name); 582 else mconsole_get_config(dev->get_config, req, name);
566} 583}
@@ -595,13 +612,16 @@ void mconsole_remove(struct mc_request *req)
595 goto out; 612 goto out;
596 } 613 }
597 614
598 err = (*dev->remove)(n); 615 err_msg = NULL;
616 err = (*dev->remove)(n, &err_msg);
599 switch(err){ 617 switch(err){
600 case -ENODEV: 618 case -ENODEV:
601 err_msg = "Device doesn't exist"; 619 if(err_msg == NULL)
620 err_msg = "Device doesn't exist";
602 break; 621 break;
603 case -EBUSY: 622 case -EBUSY:
604 err_msg = "Device is currently open"; 623 if(err_msg == NULL)
624 err_msg = "Device is currently open";
605 break; 625 break;
606 default: 626 default:
607 break; 627 break;
@@ -615,7 +635,7 @@ struct mconsole_output {
615 struct mc_request *req; 635 struct mc_request *req;
616}; 636};
617 637
618static DEFINE_SPINLOCK(console_lock); 638static DEFINE_SPINLOCK(client_lock);
619static LIST_HEAD(clients); 639static LIST_HEAD(clients);
620static char console_buf[MCONSOLE_MAX_DATA]; 640static char console_buf[MCONSOLE_MAX_DATA];
621static int console_index = 0; 641static int console_index = 0;
@@ -670,16 +690,18 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
670 unsigned long flags; 690 unsigned long flags;
671 691
672 entry.req = req; 692 entry.req = req;
693 spin_lock_irqsave(&client_lock, flags);
673 list_add(&entry.list, &clients); 694 list_add(&entry.list, &clients);
674 spin_lock_irqsave(&console_lock, flags); 695 spin_unlock_irqrestore(&client_lock, flags);
675 696
676 (*proc)(arg); 697 (*proc)(arg);
677 698
678 mconsole_reply_len(req, console_buf, console_index, 0, 0); 699 mconsole_reply_len(req, console_buf, console_index, 0, 0);
679 console_index = 0; 700 console_index = 0;
680 701
681 spin_unlock_irqrestore(&console_lock, flags); 702 spin_lock_irqsave(&client_lock, flags);
682 list_del(&entry.list); 703 list_del(&entry.list);
704 spin_unlock_irqrestore(&client_lock, flags);
683} 705}
684 706
685#ifdef CONFIG_MAGIC_SYSRQ 707#ifdef CONFIG_MAGIC_SYSRQ
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index 75aef6f7ef6e..f02634fbf32a 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -16,7 +16,7 @@
16#include "user.h" 16#include "user.h"
17#include "sysdep/ptrace.h" 17#include "sysdep/ptrace.h"
18#include "mconsole.h" 18#include "mconsole.h"
19#include "umid.h" 19#include "os.h"
20#include "user_util.h" 20#include "user_util.h"
21 21
22static struct mconsole_command commands[] = { 22static struct mconsole_command commands[] = {
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index afe3d427ddfa..04e31f86c10a 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and 2 * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
3 * James Leu (jleu@mindspring.net). 3 * James Leu (jleu@mindspring.net).
4 * Copyright (C) 2001 by various other people who didn't put their name here. 4 * Copyright (C) 2001 by various other people who didn't put their name here.
5 * Licensed under the GPL. 5 * Licensed under the GPL.
@@ -91,8 +91,8 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id)
91 spin_lock(&lp->lock); 91 spin_lock(&lp->lock);
92 while((err = uml_net_rx(dev)) > 0) ; 92 while((err = uml_net_rx(dev)) > 0) ;
93 if(err < 0) { 93 if(err < 0) {
94 printk(KERN_ERR 94 printk(KERN_ERR
95 "Device '%s' read returned %d, shutting it down\n", 95 "Device '%s' read returned %d, shutting it down\n",
96 dev->name, err); 96 dev->name, err);
97 /* dev_close can't be called in interrupt context, and takes 97 /* dev_close can't be called in interrupt context, and takes
98 * again lp->lock. 98 * again lp->lock.
@@ -108,7 +108,7 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id)
108 108
109out: 109out:
110 spin_unlock(&lp->lock); 110 spin_unlock(&lp->lock);
111 return(IRQ_HANDLED); 111 return IRQ_HANDLED;
112} 112}
113 113
114static int uml_net_open(struct net_device *dev) 114static int uml_net_open(struct net_device *dev)
@@ -159,7 +159,7 @@ out:
159static int uml_net_close(struct net_device *dev) 159static int uml_net_close(struct net_device *dev)
160{ 160{
161 struct uml_net_private *lp = dev->priv; 161 struct uml_net_private *lp = dev->priv;
162 162
163 netif_stop_queue(dev); 163 netif_stop_queue(dev);
164 164
165 free_irq(dev->irq, dev); 165 free_irq(dev->irq, dev);
@@ -194,7 +194,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
194 194
195 /* this is normally done in the interrupt when tx finishes */ 195 /* this is normally done in the interrupt when tx finishes */
196 netif_wake_queue(dev); 196 netif_wake_queue(dev);
197 } 197 }
198 else if(len == 0){ 198 else if(len == 0){
199 netif_start_queue(dev); 199 netif_start_queue(dev);
200 lp->stats.tx_dropped++; 200 lp->stats.tx_dropped++;
@@ -239,7 +239,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr)
239 set_ether_mac(dev, hwaddr->sa_data); 239 set_ether_mac(dev, hwaddr->sa_data);
240 spin_unlock_irq(&lp->lock); 240 spin_unlock_irq(&lp->lock);
241 241
242 return(0); 242 return 0;
243} 243}
244 244
245static int uml_net_change_mtu(struct net_device *dev, int new_mtu) 245static int uml_net_change_mtu(struct net_device *dev, int new_mtu)
@@ -333,7 +333,7 @@ static int eth_configure(int n, void *init, char *mac,
333 struct uml_net_private *lp; 333 struct uml_net_private *lp;
334 int save, err, size; 334 int save, err, size;
335 335
336 size = transport->private_size + sizeof(struct uml_net_private) + 336 size = transport->private_size + sizeof(struct uml_net_private) +
337 sizeof(((struct uml_net_private *) 0)->user); 337 sizeof(((struct uml_net_private *) 0)->user);
338 338
339 device = kzalloc(sizeof(*device), GFP_KERNEL); 339 device = kzalloc(sizeof(*device), GFP_KERNEL);
@@ -438,7 +438,7 @@ static int eth_configure(int n, void *init, char *mac,
438 lp->tl.function = uml_net_user_timer_expire; 438 lp->tl.function = uml_net_user_timer_expire;
439 memcpy(lp->mac, device->mac, sizeof(lp->mac)); 439 memcpy(lp->mac, device->mac, sizeof(lp->mac));
440 440
441 if (transport->user->init) 441 if (transport->user->init)
442 (*transport->user->init)(&lp->user, dev); 442 (*transport->user->init)(&lp->user, dev);
443 443
444 set_ether_mac(dev, device->mac); 444 set_ether_mac(dev, device->mac);
@@ -460,38 +460,36 @@ static struct uml_net *find_device(int n)
460 device = NULL; 460 device = NULL;
461 out: 461 out:
462 spin_unlock(&devices_lock); 462 spin_unlock(&devices_lock);
463 return(device); 463 return device;
464} 464}
465 465
466static int eth_parse(char *str, int *index_out, char **str_out) 466static int eth_parse(char *str, int *index_out, char **str_out,
467 char **error_out)
467{ 468{
468 char *end; 469 char *end;
469 int n; 470 int n, err = -EINVAL;;
470 471
471 n = simple_strtoul(str, &end, 0); 472 n = simple_strtoul(str, &end, 0);
472 if(end == str){ 473 if(end == str){
473 printk(KERN_ERR "eth_setup: Failed to parse '%s'\n", str); 474 *error_out = "Bad device number";
474 return(1); 475 return err;
475 }
476 if(n < 0){
477 printk(KERN_ERR "eth_setup: device %d is negative\n", n);
478 return(1);
479 } 476 }
477
480 str = end; 478 str = end;
481 if(*str != '='){ 479 if(*str != '='){
482 printk(KERN_ERR 480 *error_out = "Expected '=' after device number";
483 "eth_setup: expected '=' after device number\n"); 481 return err;
484 return(1);
485 } 482 }
483
486 str++; 484 str++;
487 if(find_device(n)){ 485 if(find_device(n)){
488 printk(KERN_ERR "eth_setup: Device %d already configured\n", 486 *error_out = "Device already configured";
489 n); 487 return err;
490 return(1);
491 } 488 }
492 if(index_out) *index_out = n; 489
490 *index_out = n;
493 *str_out = str; 491 *str_out = str;
494 return(0); 492 return 0;
495} 493}
496 494
497struct eth_init { 495struct eth_init {
@@ -500,13 +498,11 @@ struct eth_init {
500 int index; 498 int index;
501}; 499};
502 500
503/* Filled in at boot time. Will need locking if the transports become 501static DEFINE_SPINLOCK(transports_lock);
504 * modular. 502static LIST_HEAD(transports);
505 */
506struct list_head transports = LIST_HEAD_INIT(transports);
507 503
508/* Filled in during early boot */ 504/* Filled in during early boot */
509struct list_head eth_cmd_line = LIST_HEAD_INIT(eth_cmd_line); 505static LIST_HEAD(eth_cmd_line);
510 506
511static int check_transport(struct transport *transport, char *eth, int n, 507static int check_transport(struct transport *transport, char *eth, int n,
512 void **init_out, char **mac_out) 508 void **init_out, char **mac_out)
@@ -515,23 +511,23 @@ static int check_transport(struct transport *transport, char *eth, int n,
515 511
516 len = strlen(transport->name); 512 len = strlen(transport->name);
517 if(strncmp(eth, transport->name, len)) 513 if(strncmp(eth, transport->name, len))
518 return(0); 514 return 0;
519 515
520 eth += len; 516 eth += len;
521 if(*eth == ',') 517 if(*eth == ',')
522 eth++; 518 eth++;
523 else if(*eth != '\0') 519 else if(*eth != '\0')
524 return(0); 520 return 0;
525 521
526 *init_out = kmalloc(transport->setup_size, GFP_KERNEL); 522 *init_out = kmalloc(transport->setup_size, GFP_KERNEL);
527 if(*init_out == NULL) 523 if(*init_out == NULL)
528 return(1); 524 return 1;
529 525
530 if(!transport->setup(eth, mac_out, *init_out)){ 526 if(!transport->setup(eth, mac_out, *init_out)){
531 kfree(*init_out); 527 kfree(*init_out);
532 *init_out = NULL; 528 *init_out = NULL;
533 } 529 }
534 return(1); 530 return 1;
535} 531}
536 532
537void register_transport(struct transport *new) 533void register_transport(struct transport *new)
@@ -542,7 +538,10 @@ void register_transport(struct transport *new)
542 char *mac = NULL; 538 char *mac = NULL;
543 int match; 539 int match;
544 540
541 spin_lock(&transports_lock);
542 BUG_ON(!list_empty(&new->list));
545 list_add(&new->list, &transports); 543 list_add(&new->list, &transports);
544 spin_unlock(&transports_lock);
546 545
547 list_for_each_safe(ele, next, &eth_cmd_line){ 546 list_for_each_safe(ele, next, &eth_cmd_line){
548 eth = list_entry(ele, struct eth_init, list); 547 eth = list_entry(ele, struct eth_init, list);
@@ -564,7 +563,9 @@ static int eth_setup_common(char *str, int index)
564 struct transport *transport; 563 struct transport *transport;
565 void *init; 564 void *init;
566 char *mac = NULL; 565 char *mac = NULL;
566 int found = 0;
567 567
568 spin_lock(&transports_lock);
568 list_for_each(ele, &transports){ 569 list_for_each(ele, &transports){
569 transport = list_entry(ele, struct transport, list); 570 transport = list_entry(ele, struct transport, list);
570 if(!check_transport(transport, str, index, &init, &mac)) 571 if(!check_transport(transport, str, index, &init, &mac))
@@ -573,19 +574,26 @@ static int eth_setup_common(char *str, int index)
573 eth_configure(index, init, mac, transport); 574 eth_configure(index, init, mac, transport);
574 kfree(init); 575 kfree(init);
575 } 576 }
576 return(1); 577 found = 1;
578 break;
577 } 579 }
578 return(0); 580
581 spin_unlock(&transports_lock);
582 return found;
579} 583}
580 584
581static int eth_setup(char *str) 585static int eth_setup(char *str)
582{ 586{
583 struct eth_init *new; 587 struct eth_init *new;
588 char *error;
584 int n, err; 589 int n, err;
585 590
586 err = eth_parse(str, &n, &str); 591 err = eth_parse(str, &n, &str, &error);
587 if(err) 592 if(err){
593 printk(KERN_ERR "eth_setup - Couldn't parse '%s' : %s\n",
594 str, error);
588 return 1; 595 return 1;
596 }
589 597
590 new = alloc_bootmem(sizeof(*new)); 598 new = alloc_bootmem(sizeof(*new));
591 if (new == NULL){ 599 if (new == NULL){
@@ -607,38 +615,24 @@ __uml_help(eth_setup,
607" Configure a network device.\n\n" 615" Configure a network device.\n\n"
608); 616);
609 617
610#if 0 618static int net_config(char *str, char **error_out)
611static int eth_init(void)
612{
613 struct list_head *ele, *next;
614 struct eth_init *eth;
615
616 list_for_each_safe(ele, next, &eth_cmd_line){
617 eth = list_entry(ele, struct eth_init, list);
618
619 if(eth_setup_common(eth->init, eth->index))
620 list_del(&eth->list);
621 }
622
623 return(1);
624}
625__initcall(eth_init);
626#endif
627
628static int net_config(char *str)
629{ 619{
630 int n, err; 620 int n, err;
631 621
632 err = eth_parse(str, &n, &str); 622 err = eth_parse(str, &n, &str, error_out);
633 if(err) return(err); 623 if(err)
624 return err;
634 625
626 /* This string is broken up and the pieces used by the underlying
627 * driver. So, it is freed only if eth_setup_common fails.
628 */
635 str = kstrdup(str, GFP_KERNEL); 629 str = kstrdup(str, GFP_KERNEL);
636 if(str == NULL){ 630 if(str == NULL){
637 printk(KERN_ERR "net_config failed to strdup string\n"); 631 *error_out = "net_config failed to strdup string";
638 return(-1); 632 return -ENOMEM;
639 } 633 }
640 err = !eth_setup_common(str, n); 634 err = !eth_setup_common(str, n);
641 if(err) 635 if(err)
642 kfree(str); 636 kfree(str);
643 return(err); 637 return(err);
644} 638}
@@ -658,7 +652,7 @@ static int net_id(char **str, int *start_out, int *end_out)
658 return n; 652 return n;
659} 653}
660 654
661static int net_remove(int n) 655static int net_remove(int n, char **error_out)
662{ 656{
663 struct uml_net *device; 657 struct uml_net *device;
664 struct net_device *dev; 658 struct net_device *dev;
@@ -671,7 +665,7 @@ static int net_remove(int n)
671 dev = device->dev; 665 dev = device->dev;
672 lp = dev->priv; 666 lp = dev->priv;
673 if(lp->fd > 0) 667 if(lp->fd > 0)
674 return -EBUSY; 668 return -EBUSY;
675 if(lp->remove != NULL) (*lp->remove)(&lp->user); 669 if(lp->remove != NULL) (*lp->remove)(&lp->user);
676 unregister_netdev(dev); 670 unregister_netdev(dev);
677 platform_device_unregister(&device->pdev); 671 platform_device_unregister(&device->pdev);
@@ -683,10 +677,11 @@ static int net_remove(int n)
683} 677}
684 678
685static struct mc_device net_mc = { 679static struct mc_device net_mc = {
680 .list = LIST_HEAD_INIT(net_mc.list),
686 .name = "eth", 681 .name = "eth",
687 .config = net_config, 682 .config = net_config,
688 .get_config = NULL, 683 .get_config = NULL,
689 .id = net_id, 684 .id = net_id,
690 .remove = net_remove, 685 .remove = net_remove,
691}; 686};
692 687
@@ -699,7 +694,8 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
699 void (*proc)(unsigned char *, unsigned char *, void *); 694 void (*proc)(unsigned char *, unsigned char *, void *);
700 unsigned char addr_buf[4], netmask_buf[4]; 695 unsigned char addr_buf[4], netmask_buf[4];
701 696
702 if(dev->open != uml_net_open) return(NOTIFY_DONE); 697 if(dev->open != uml_net_open)
698 return NOTIFY_DONE;
703 699
704 lp = dev->priv; 700 lp = dev->priv;
705 701
@@ -717,9 +713,10 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
717 memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); 713 memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf));
718 (*proc)(addr_buf, netmask_buf, &lp->user); 714 (*proc)(addr_buf, netmask_buf, &lp->user);
719 } 715 }
720 return(NOTIFY_DONE); 716 return NOTIFY_DONE;
721} 717}
722 718
719/* uml_net_init shouldn't be called twice on two CPUs at the same time */
723struct notifier_block uml_inetaddr_notifier = { 720struct notifier_block uml_inetaddr_notifier = {
724 .notifier_call = uml_inetaddr_event, 721 .notifier_call = uml_inetaddr_event,
725}; 722};
@@ -727,7 +724,7 @@ struct notifier_block uml_inetaddr_notifier = {
727static int uml_net_init(void) 724static int uml_net_init(void)
728{ 725{
729 struct list_head *ele; 726 struct list_head *ele;
730 struct uml_net_private *lp; 727 struct uml_net_private *lp;
731 struct in_device *ip; 728 struct in_device *ip;
732 struct in_ifaddr *in; 729 struct in_ifaddr *in;
733 730
@@ -738,18 +735,21 @@ static int uml_net_init(void)
738 * didn't get a chance to run for them. This fakes it so that 735 * didn't get a chance to run for them. This fakes it so that
739 * addresses which have already been set up get handled properly. 736 * addresses which have already been set up get handled properly.
740 */ 737 */
738 spin_lock(&opened_lock);
741 list_for_each(ele, &opened){ 739 list_for_each(ele, &opened){
742 lp = list_entry(ele, struct uml_net_private, list); 740 lp = list_entry(ele, struct uml_net_private, list);
743 ip = lp->dev->ip_ptr; 741 ip = lp->dev->ip_ptr;
744 if(ip == NULL) continue; 742 if(ip == NULL)
743 continue;
745 in = ip->ifa_list; 744 in = ip->ifa_list;
746 while(in != NULL){ 745 while(in != NULL){
747 uml_inetaddr_event(NULL, NETDEV_UP, in); 746 uml_inetaddr_event(NULL, NETDEV_UP, in);
748 in = in->ifa_next; 747 in = in->ifa_next;
749 } 748 }
750 } 749 }
750 spin_unlock(&opened_lock);
751 751
752 return(0); 752 return 0;
753} 753}
754 754
755__initcall(uml_net_init); 755__initcall(uml_net_init);
@@ -759,13 +759,16 @@ static void close_devices(void)
759 struct list_head *ele; 759 struct list_head *ele;
760 struct uml_net_private *lp; 760 struct uml_net_private *lp;
761 761
762 spin_lock(&opened_lock);
762 list_for_each(ele, &opened){ 763 list_for_each(ele, &opened){
763 lp = list_entry(ele, struct uml_net_private, list); 764 lp = list_entry(ele, struct uml_net_private, list);
764 free_irq(lp->dev->irq, lp->dev); 765 free_irq(lp->dev->irq, lp->dev);
765 if((lp->close != NULL) && (lp->fd >= 0)) 766 if((lp->close != NULL) && (lp->fd >= 0))
766 (*lp->close)(lp->fd, &lp->user); 767 (*lp->close)(lp->fd, &lp->user);
767 if(lp->remove != NULL) (*lp->remove)(&lp->user); 768 if(lp->remove != NULL)
769 (*lp->remove)(&lp->user);
768 } 770 }
771 spin_unlock(&opened_lock);
769} 772}
770 773
771__uml_exitcall(close_devices); 774__uml_exitcall(close_devices);
@@ -783,8 +786,8 @@ struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra)
783 return(skb); 786 return(skb);
784} 787}
785 788
786void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *, 789void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *,
787 void *), 790 void *),
788 void *arg) 791 void *arg)
789{ 792{
790 struct net_device *dev = d; 793 struct net_device *dev = d;
@@ -809,11 +812,11 @@ int dev_netmask(void *d, void *m)
809 struct in_ifaddr *in; 812 struct in_ifaddr *in;
810 __be32 *mask_out = m; 813 __be32 *mask_out = m;
811 814
812 if(ip == NULL) 815 if(ip == NULL)
813 return(1); 816 return(1);
814 817
815 in = ip->ifa_list; 818 in = ip->ifa_list;
816 if(in == NULL) 819 if(in == NULL)
817 return(1); 820 return(1);
818 821
819 *mask_out = in->ifa_mask; 822 *mask_out = in->ifa_mask;
@@ -827,7 +830,7 @@ void *get_output_buffer(int *len_out)
827 ret = (void *) __get_free_pages(GFP_KERNEL, 0); 830 ret = (void *) __get_free_pages(GFP_KERNEL, 0);
828 if(ret) *len_out = PAGE_SIZE; 831 if(ret) *len_out = PAGE_SIZE;
829 else *len_out = 0; 832 else *len_out = 0;
830 return(ret); 833 return ret;
831} 834}
832 835
833void free_output_buffer(void *buffer) 836void free_output_buffer(void *buffer)
@@ -835,7 +838,7 @@ void free_output_buffer(void *buffer)
835 free_pages((unsigned long) buffer, 0); 838 free_pages((unsigned long) buffer, 0);
836} 839}
837 840
838int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out, 841int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out,
839 char **gate_addr) 842 char **gate_addr)
840{ 843{
841 char *remain; 844 char *remain;
@@ -854,14 +857,3 @@ unsigned short eth_protocol(struct sk_buff *skb)
854{ 857{
855 return(eth_type_trans(skb, skb->dev)); 858 return(eth_type_trans(skb, skb->dev));
856} 859}
857
858/*
859 * Overrides for Emacs so that we follow Linus's tabbing style.
860 * Emacs will notice this stuff at the end of the file and automatically
861 * adjust the settings for this buffer only. This must remain at the end
862 * of the file.
863 * ---------------------------------------------------------------------------
864 * Local variables:
865 * c-file-style: "linux"
866 * End:
867 */
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index 6dfe632f1c14..1c8efd95c421 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -55,9 +55,9 @@ static irqreturn_t pipe_interrupt(int irq, void *data)
55 fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); 55 fd = os_rcv_fd(conn->socket[0], &conn->helper_pid);
56 if(fd < 0){ 56 if(fd < 0){
57 if(fd == -EAGAIN) 57 if(fd == -EAGAIN)
58 return(IRQ_NONE); 58 return IRQ_NONE;
59 59
60 printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", 60 printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n",
61 -fd); 61 -fd);
62 os_close_file(conn->fd); 62 os_close_file(conn->fd);
63 } 63 }
@@ -68,7 +68,7 @@ static irqreturn_t pipe_interrupt(int irq, void *data)
68 list_add(&conn->list, &conn->port->connections); 68 list_add(&conn->list, &conn->port->connections);
69 69
70 complete(&conn->port->done); 70 complete(&conn->port->done);
71 return(IRQ_HANDLED); 71 return IRQ_HANDLED;
72} 72}
73 73
74#define NO_WAITER_MSG \ 74#define NO_WAITER_MSG \
@@ -97,14 +97,14 @@ static int port_accept(struct port_list *port)
97 "connection\n"); 97 "connection\n");
98 goto out_close; 98 goto out_close;
99 } 99 }
100 *conn = ((struct connection) 100 *conn = ((struct connection)
101 { .list = LIST_HEAD_INIT(conn->list), 101 { .list = LIST_HEAD_INIT(conn->list),
102 .fd = fd, 102 .fd = fd,
103 .socket = { socket[0], socket[1] }, 103 .socket = { socket[0], socket[1] },
104 .telnetd_pid = pid, 104 .telnetd_pid = pid,
105 .port = port }); 105 .port = port });
106 106
107 if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, 107 if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
108 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, 108 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
109 "telnetd", conn)){ 109 "telnetd", conn)){
110 printk(KERN_ERR "port_accept : failed to get IRQ for " 110 printk(KERN_ERR "port_accept : failed to get IRQ for "
@@ -117,20 +117,20 @@ static int port_accept(struct port_list *port)
117 printk("No one waiting for port\n"); 117 printk("No one waiting for port\n");
118 } 118 }
119 list_add(&conn->list, &port->pending); 119 list_add(&conn->list, &port->pending);
120 return(1); 120 return 1;
121 121
122 out_free: 122 out_free:
123 kfree(conn); 123 kfree(conn);
124 out_close: 124 out_close:
125 os_close_file(fd); 125 os_close_file(fd);
126 if(pid != -1) 126 if(pid != -1)
127 os_kill_process(pid, 1); 127 os_kill_process(pid, 1);
128 out: 128 out:
129 return(ret); 129 return ret;
130} 130}
131 131
132DECLARE_MUTEX(ports_sem); 132static DECLARE_MUTEX(ports_sem);
133struct list_head ports = LIST_HEAD_INIT(ports); 133static LIST_HEAD(ports);
134 134
135void port_work_proc(struct work_struct *unused) 135void port_work_proc(struct work_struct *unused)
136{ 136{
@@ -158,8 +158,8 @@ static irqreturn_t port_interrupt(int irq, void *data)
158 158
159 port->has_connection = 1; 159 port->has_connection = 1;
160 schedule_work(&port_work); 160 schedule_work(&port_work);
161 return(IRQ_HANDLED); 161 return IRQ_HANDLED;
162} 162}
163 163
164void *port_data(int port_num) 164void *port_data(int port_num)
165{ 165{
@@ -185,14 +185,14 @@ void *port_data(int port_num)
185 port_num, -fd); 185 port_num, -fd);
186 goto out_free; 186 goto out_free;
187 } 187 }
188 if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, 188 if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
189 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port", 189 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
190 port)){ 190 "port", port)){
191 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); 191 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
192 goto out_close; 192 goto out_close;
193 } 193 }
194 194
195 *port = ((struct port_list) 195 *port = ((struct port_list)
196 { .list = LIST_HEAD_INIT(port->list), 196 { .list = LIST_HEAD_INIT(port->list),
197 .wait_count = ATOMIC_INIT(0), 197 .wait_count = ATOMIC_INIT(0),
198 .has_connection = 0, 198 .has_connection = 0,
@@ -222,7 +222,7 @@ void *port_data(int port_num)
222 os_close_file(fd); 222 os_close_file(fd);
223 out: 223 out:
224 up(&ports_sem); 224 up(&ports_sem);
225 return(dev); 225 return dev;
226} 226}
227 227
228int port_wait(void *data) 228int port_wait(void *data)
@@ -232,15 +232,15 @@ int port_wait(void *data)
232 struct port_list *port = dev->port; 232 struct port_list *port = dev->port;
233 int fd; 233 int fd;
234 234
235 atomic_inc(&port->wait_count); 235 atomic_inc(&port->wait_count);
236 while(1){ 236 while(1){
237 fd = -ERESTARTSYS; 237 fd = -ERESTARTSYS;
238 if(wait_for_completion_interruptible(&port->done)) 238 if(wait_for_completion_interruptible(&port->done))
239 goto out; 239 goto out;
240 240
241 spin_lock(&port->lock); 241 spin_lock(&port->lock);
242 242
243 conn = list_entry(port->connections.next, struct connection, 243 conn = list_entry(port->connections.next, struct connection,
244 list); 244 list);
245 list_del(&conn->list); 245 list_del(&conn->list);
246 spin_unlock(&port->lock); 246 spin_unlock(&port->lock);
@@ -248,12 +248,12 @@ int port_wait(void *data)
248 os_shutdown_socket(conn->socket[0], 1, 1); 248 os_shutdown_socket(conn->socket[0], 1, 1);
249 os_close_file(conn->socket[0]); 249 os_close_file(conn->socket[0]);
250 os_shutdown_socket(conn->socket[1], 1, 1); 250 os_shutdown_socket(conn->socket[1], 1, 1);
251 os_close_file(conn->socket[1]); 251 os_close_file(conn->socket[1]);
252 252
253 /* This is done here because freeing an IRQ can't be done 253 /* This is done here because freeing an IRQ can't be done
254 * within the IRQ handler. So, pipe_interrupt always ups 254 * within the IRQ handler. So, pipe_interrupt always ups
255 * the semaphore regardless of whether it got a successful 255 * the semaphore regardless of whether it got a successful
256 * connection. Then we loop here throwing out failed 256 * connection. Then we loop here throwing out failed
257 * connections until a good one is found. 257 * connections until a good one is found.
258 */ 258 */
259 free_irq(TELNETD_IRQ, conn); 259 free_irq(TELNETD_IRQ, conn);
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index bc6afaf74c1a..80508023054f 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -38,18 +38,18 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
38 if(*str != ':'){ 38 if(*str != ':'){
39 printk("port_init : channel type 'port' must specify a " 39 printk("port_init : channel type 'port' must specify a "
40 "port number\n"); 40 "port number\n");
41 return(NULL); 41 return NULL;
42 } 42 }
43 str++; 43 str++;
44 port = strtoul(str, &end, 0); 44 port = strtoul(str, &end, 0);
45 if((*end != '\0') || (end == str)){ 45 if((*end != '\0') || (end == str)){
46 printk("port_init : couldn't parse port '%s'\n", str); 46 printk("port_init : couldn't parse port '%s'\n", str);
47 return(NULL); 47 return NULL;
48 } 48 }
49 49
50 kern_data = port_data(port); 50 kern_data = port_data(port);
51 if(kern_data == NULL) 51 if(kern_data == NULL)
52 return(NULL); 52 return NULL;
53 53
54 data = um_kmalloc(sizeof(*data)); 54 data = um_kmalloc(sizeof(*data));
55 if(data == NULL) 55 if(data == NULL)
@@ -59,10 +59,10 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
59 .kernel_data = kern_data }); 59 .kernel_data = kern_data });
60 sprintf(data->dev, "%d", port); 60 sprintf(data->dev, "%d", port);
61 61
62 return(data); 62 return data;
63 err: 63 err:
64 port_kern_free(kern_data); 64 port_kern_free(kern_data);
65 return(NULL); 65 return NULL;
66} 66}
67 67
68static void port_free(void *d) 68static void port_free(void *d)
@@ -83,14 +83,14 @@ static int port_open(int input, int output, int primary, void *d,
83 if((fd >= 0) && data->raw){ 83 if((fd >= 0) && data->raw){
84 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); 84 CATCH_EINTR(err = tcgetattr(fd, &data->tt));
85 if(err) 85 if(err)
86 return(err); 86 return err;
87 87
88 err = raw(fd); 88 err = raw(fd);
89 if(err) 89 if(err)
90 return(err); 90 return err;
91 } 91 }
92 *dev_out = data->dev; 92 *dev_out = data->dev;
93 return(fd); 93 return fd;
94} 94}
95 95
96static void port_close(int fd, void *d) 96static void port_close(int fd, void *d)
@@ -120,8 +120,8 @@ int port_listen_fd(int port)
120 int fd, err, arg; 120 int fd, err, arg;
121 121
122 fd = socket(PF_INET, SOCK_STREAM, 0); 122 fd = socket(PF_INET, SOCK_STREAM, 0);
123 if(fd == -1) 123 if(fd == -1)
124 return(-errno); 124 return -errno;
125 125
126 arg = 1; 126 arg = 1;
127 if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){ 127 if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){
@@ -136,7 +136,7 @@ int port_listen_fd(int port)
136 err = -errno; 136 err = -errno;
137 goto out; 137 goto out;
138 } 138 }
139 139
140 if(listen(fd, 1) < 0){ 140 if(listen(fd, 1) < 0){
141 err = -errno; 141 err = -errno;
142 goto out; 142 goto out;
@@ -146,10 +146,10 @@ int port_listen_fd(int port)
146 if(err < 0) 146 if(err < 0)
147 goto out; 147 goto out;
148 148
149 return(fd); 149 return fd;
150 out: 150 out:
151 os_close_file(fd); 151 os_close_file(fd);
152 return(err); 152 return err;
153} 153}
154 154
155struct port_pre_exec_data { 155struct port_pre_exec_data {
@@ -173,13 +173,13 @@ void port_pre_exec(void *arg)
173int port_connection(int fd, int *socket, int *pid_out) 173int port_connection(int fd, int *socket, int *pid_out)
174{ 174{
175 int new, err; 175 int new, err;
176 char *argv[] = { "/usr/sbin/in.telnetd", "-L", 176 char *argv[] = { "/usr/sbin/in.telnetd", "-L",
177 "/usr/lib/uml/port-helper", NULL }; 177 "/usr/lib/uml/port-helper", NULL };
178 struct port_pre_exec_data data; 178 struct port_pre_exec_data data;
179 179
180 new = os_accept_connection(fd); 180 new = os_accept_connection(fd);
181 if(new < 0) 181 if(new < 0)
182 return(new); 182 return new;
183 183
184 err = os_pipe(socket, 0, 0); 184 err = os_pipe(socket, 0, 0);
185 if(err < 0) 185 if(err < 0)
@@ -190,29 +190,18 @@ int port_connection(int fd, int *socket, int *pid_out)
190 .pipe_fd = socket[1] }); 190 .pipe_fd = socket[1] });
191 191
192 err = run_helper(port_pre_exec, &data, argv, NULL); 192 err = run_helper(port_pre_exec, &data, argv, NULL);
193 if(err < 0) 193 if(err < 0)
194 goto out_shutdown; 194 goto out_shutdown;
195 195
196 *pid_out = err; 196 *pid_out = err;
197 return(new); 197 return new;
198 198
199 out_shutdown: 199 out_shutdown:
200 os_shutdown_socket(socket[0], 1, 1); 200 os_shutdown_socket(socket[0], 1, 1);
201 os_close_file(socket[0]); 201 os_close_file(socket[0]);
202 os_shutdown_socket(socket[1], 1, 1); 202 os_shutdown_socket(socket[1], 1, 1);
203 os_close_file(socket[1]); 203 os_close_file(socket[1]);
204 out_close: 204 out_close:
205 os_close_file(new); 205 os_close_file(new);
206 return(err); 206 return err;
207} 207}
208
209/*
210 * Overrides for Emacs so that we follow Linus's tabbing style.
211 * Emacs will notice this stuff at the end of the file and automatically
212 * adjust the settings for this buffer only. This must remain at the end
213 * of the file.
214 * ---------------------------------------------------------------------------
215 * Local variables:
216 * c-file-style: "linux"
217 * End:
218 */
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 73b2bdd6d2d3..e942e836f995 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -78,6 +78,7 @@ static const struct file_operations rng_chrdev_ops = {
78 .read = rng_dev_read, 78 .read = rng_dev_read,
79}; 79};
80 80
81/* rng_init shouldn't be called more than once at boot time */
81static struct miscdevice rng_miscdev = { 82static struct miscdevice rng_miscdev = {
82 RNG_MISCDEV_MINOR, 83 RNG_MISCDEV_MINOR,
83 RNG_MODULE_NAME, 84 RNG_MODULE_NAME,
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index ed9c59082d0d..fc22b9bd9153 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -38,6 +38,7 @@ static void ssl_announce(char *dev_name, int dev)
38 dev_name); 38 dev_name);
39} 39}
40 40
41/* Almost const, except that xterm_title may be changed in an initcall */
41static struct chan_opts opts = { 42static struct chan_opts opts = {
42 .announce = ssl_announce, 43 .announce = ssl_announce,
43 .xterm_title = "Serial Line #%d", 44 .xterm_title = "Serial Line #%d",
@@ -46,10 +47,12 @@ static struct chan_opts opts = {
46 .in_kernel = 1, 47 .in_kernel = 1,
47}; 48};
48 49
49static int ssl_config(char *str); 50static int ssl_config(char *str, char **error_out);
50static int ssl_get_config(char *dev, char *str, int size, char **error_out); 51static int ssl_get_config(char *dev, char *str, int size, char **error_out);
51static int ssl_remove(int n); 52static int ssl_remove(int n, char **error_out);
52 53
54
55/* Const, except for .mc.list */
53static struct line_driver driver = { 56static struct line_driver driver = {
54 .name = "UML serial line", 57 .name = "UML serial line",
55 .device_name = "ttyS", 58 .device_name = "ttyS",
@@ -61,9 +64,8 @@ static struct line_driver driver = {
61 .read_irq_name = "ssl", 64 .read_irq_name = "ssl",
62 .write_irq = SSL_WRITE_IRQ, 65 .write_irq = SSL_WRITE_IRQ,
63 .write_irq_name = "ssl-write", 66 .write_irq_name = "ssl-write",
64 .symlink_from = "serial",
65 .symlink_to = "tts",
66 .mc = { 67 .mc = {
68 .list = LIST_HEAD_INIT(driver.mc.list),
67 .name = "ssl", 69 .name = "ssl",
68 .config = ssl_config, 70 .config = ssl_config,
69 .get_config = ssl_get_config, 71 .get_config = ssl_get_config,
@@ -72,17 +74,16 @@ static struct line_driver driver = {
72 }, 74 },
73}; 75};
74 76
75/* The array is initialized by line_init, which is an initcall. The 77/* The array is initialized by line_init, at initcall time. The
76 * individual elements are protected by individual semaphores. 78 * elements are locked individually as needed.
77 */ 79 */
78static struct line serial_lines[NR_PORTS] = 80static struct line serial_lines[NR_PORTS] =
79 { [0 ... NR_PORTS - 1] = LINE_INIT(CONFIG_SSL_CHAN, &driver) }; 81 { [0 ... NR_PORTS - 1] = LINE_INIT(CONFIG_SSL_CHAN, &driver) };
80 82
81static struct lines lines = LINES_INIT(NR_PORTS); 83static int ssl_config(char *str, char **error_out)
82
83static int ssl_config(char *str)
84{ 84{
85 return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts); 85 return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts,
86 error_out);
86} 87}
87 88
88static int ssl_get_config(char *dev, char *str, int size, char **error_out) 89static int ssl_get_config(char *dev, char *str, int size, char **error_out)
@@ -91,9 +92,10 @@ static int ssl_get_config(char *dev, char *str, int size, char **error_out)
91 size, error_out); 92 size, error_out);
92} 93}
93 94
94static int ssl_remove(int n) 95static int ssl_remove(int n, char **error_out)
95{ 96{
96 return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); 97 return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n,
98 error_out);
97} 99}
98 100
99static int ssl_open(struct tty_struct *tty, struct file *filp) 101static int ssl_open(struct tty_struct *tty, struct file *filp)
@@ -168,9 +170,10 @@ static int ssl_console_setup(struct console *co, char *options)
168{ 170{
169 struct line *line = &serial_lines[co->index]; 171 struct line *line = &serial_lines[co->index];
170 172
171 return console_open_chan(line, co, &opts); 173 return console_open_chan(line, co);
172} 174}
173 175
176/* No locking for register_console call - relies on single-threaded initcalls */
174static struct console ssl_cons = { 177static struct console ssl_cons = {
175 .name = "ttyS", 178 .name = "ttyS",
176 .write = ssl_console_write, 179 .write = ssl_console_write,
@@ -186,9 +189,8 @@ static int ssl_init(void)
186 189
187 printk(KERN_INFO "Initializing software serial port version %d\n", 190 printk(KERN_INFO "Initializing software serial port version %d\n",
188 ssl_version); 191 ssl_version);
189 ssl_driver = line_register_devfs(&lines, &driver, &ssl_ops, 192 ssl_driver = register_lines(&driver, &ssl_ops, serial_lines,
190 serial_lines, 193 ARRAY_SIZE(serial_lines));
191 ARRAY_SIZE(serial_lines));
192 194
193 lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts); 195 lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts);
194 196
@@ -212,7 +214,15 @@ __uml_exitcall(ssl_exit);
212 214
213static int ssl_chan_setup(char *str) 215static int ssl_chan_setup(char *str)
214{ 216{
215 return line_setup(serial_lines, ARRAY_SIZE(serial_lines), str); 217 char *error;
218 int ret;
219
220 ret = line_setup(serial_lines, ARRAY_SIZE(serial_lines), str, &error);
221 if(ret < 0)
222 printk(KERN_ERR "Failed to set up serial line with "
223 "configuration string \"%s\" : %s\n", str, error);
224
225 return 1;
216} 226}
217 227
218__setup("ssl", ssl_chan_setup); 228__setup("ssl", ssl_chan_setup);
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 7a4897e27f42..7ff0b0fc37e7 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -30,8 +30,6 @@
30 30
31#define MAX_TTYS (16) 31#define MAX_TTYS (16)
32 32
33/* ----------------------------------------------------------------------------- */
34
35/* Referenced only by tty_driver below - presumably it's locked correctly 33/* Referenced only by tty_driver below - presumably it's locked correctly
36 * by the tty driver. 34 * by the tty driver.
37 */ 35 */
@@ -44,6 +42,7 @@ void stdio_announce(char *dev_name, int dev)
44 dev_name); 42 dev_name);
45} 43}
46 44
45/* Almost const, except that xterm_title may be changed in an initcall */
47static struct chan_opts opts = { 46static struct chan_opts opts = {
48 .announce = stdio_announce, 47 .announce = stdio_announce,
49 .xterm_title = "Virtual Console #%d", 48 .xterm_title = "Virtual Console #%d",
@@ -52,10 +51,12 @@ static struct chan_opts opts = {
52 .in_kernel = 1, 51 .in_kernel = 1,
53}; 52};
54 53
55static int con_config(char *str); 54static int con_config(char *str, char **error_out);
56static int con_get_config(char *dev, char *str, int size, char **error_out); 55static int con_get_config(char *dev, char *str, int size, char **error_out);
57static int con_remove(int n); 56static int con_remove(int n, char **con_remove);
57
58 58
59/* Const, except for .mc.list */
59static struct line_driver driver = { 60static struct line_driver driver = {
60 .name = "UML console", 61 .name = "UML console",
61 .device_name = "tty", 62 .device_name = "tty",
@@ -67,9 +68,8 @@ static struct line_driver driver = {
67 .read_irq_name = "console", 68 .read_irq_name = "console",
68 .write_irq = CONSOLE_WRITE_IRQ, 69 .write_irq = CONSOLE_WRITE_IRQ,
69 .write_irq_name = "console-write", 70 .write_irq_name = "console-write",
70 .symlink_from = "ttys",
71 .symlink_to = "vc",
72 .mc = { 71 .mc = {
72 .list = LIST_HEAD_INIT(driver.mc.list),
73 .name = "con", 73 .name = "con",
74 .config = con_config, 74 .config = con_config,
75 .get_config = con_get_config, 75 .get_config = con_get_config,
@@ -78,18 +78,16 @@ static struct line_driver driver = {
78 }, 78 },
79}; 79};
80 80
81static struct lines console_lines = LINES_INIT(MAX_TTYS); 81/* The array is initialized by line_init, at initcall time. The
82 82 * elements are locked individually as needed.
83/* The array is initialized by line_init, which is an initcall. The
84 * individual elements are protected by individual semaphores.
85 */ 83 */
86struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver), 84static struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver),
87 [ 1 ... MAX_TTYS - 1 ] = 85 [ 1 ... MAX_TTYS - 1 ] =
88 LINE_INIT(CONFIG_CON_CHAN, &driver) }; 86 LINE_INIT(CONFIG_CON_CHAN, &driver) };
89 87
90static int con_config(char *str) 88static int con_config(char *str, char **error_out)
91{ 89{
92 return line_config(vts, ARRAY_SIZE(vts), str, &opts); 90 return line_config(vts, ARRAY_SIZE(vts), str, &opts, error_out);
93} 91}
94 92
95static int con_get_config(char *dev, char *str, int size, char **error_out) 93static int con_get_config(char *dev, char *str, int size, char **error_out)
@@ -97,9 +95,9 @@ static int con_get_config(char *dev, char *str, int size, char **error_out)
97 return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out); 95 return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out);
98} 96}
99 97
100static int con_remove(int n) 98static int con_remove(int n, char **error_out)
101{ 99{
102 return line_remove(vts, ARRAY_SIZE(vts), n); 100 return line_remove(vts, ARRAY_SIZE(vts), n, error_out);
103} 101}
104 102
105static int con_open(struct tty_struct *tty, struct file *filp) 103static int con_open(struct tty_struct *tty, struct file *filp)
@@ -146,9 +144,10 @@ static int uml_console_setup(struct console *co, char *options)
146{ 144{
147 struct line *line = &vts[co->index]; 145 struct line *line = &vts[co->index];
148 146
149 return console_open_chan(line, co, &opts); 147 return console_open_chan(line, co);
150} 148}
151 149
150/* No locking for register_console call - relies on single-threaded initcalls */
152static struct console stdiocons = { 151static struct console stdiocons = {
153 .name = "tty", 152 .name = "tty",
154 .write = uml_console_write, 153 .write = uml_console_write,
@@ -156,16 +155,14 @@ static struct console stdiocons = {
156 .setup = uml_console_setup, 155 .setup = uml_console_setup,
157 .flags = CON_PRINTBUFFER, 156 .flags = CON_PRINTBUFFER,
158 .index = -1, 157 .index = -1,
159 .data = &vts,
160}; 158};
161 159
162int stdio_init(void) 160int stdio_init(void)
163{ 161{
164 char *new_title; 162 char *new_title;
165 163
166 console_driver = line_register_devfs(&console_lines, &driver, 164 console_driver = register_lines(&driver, &console_ops, vts,
167 &console_ops, vts, 165 ARRAY_SIZE(vts));
168 ARRAY_SIZE(vts));
169 if (console_driver == NULL) 166 if (console_driver == NULL)
170 return -1; 167 return -1;
171 printk(KERN_INFO "Initialized stdio console driver\n"); 168 printk(KERN_INFO "Initialized stdio console driver\n");
@@ -192,7 +189,15 @@ __uml_exitcall(console_exit);
192 189
193static int console_chan_setup(char *str) 190static int console_chan_setup(char *str)
194{ 191{
195 return line_setup(vts, ARRAY_SIZE(vts), str); 192 char *error;
193 int ret;
194
195 ret = line_setup(vts, ARRAY_SIZE(vts), str, &error);
196 if(ret < 0)
197 printk(KERN_ERR "Failed to set up console with "
198 "configuration string \"%s\" : %s\n", str, error);
199
200 return 1;
196} 201}
197__setup("con", console_chan_setup); 202__setup("con", console_chan_setup);
198__channel_help(console_chan_setup, "con"); 203__channel_help(console_chan_setup, "con");
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 49c047b75cc5..f98d26e51381 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -56,6 +56,7 @@
56enum ubd_req { UBD_READ, UBD_WRITE }; 56enum ubd_req { UBD_READ, UBD_WRITE };
57 57
58struct io_thread_req { 58struct io_thread_req {
59 struct request *req;
59 enum ubd_req op; 60 enum ubd_req op;
60 int fds[2]; 61 int fds[2];
61 unsigned long offsets[2]; 62 unsigned long offsets[2];
@@ -106,10 +107,6 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
106 107
107#define DRIVER_NAME "uml-blkdev" 108#define DRIVER_NAME "uml-blkdev"
108 109
109/* Can be taken in interrupt context, and is passed to the block layer to lock
110 * the request queue. Kernel side code knows that. */
111static DEFINE_SPINLOCK(ubd_io_lock);
112
113static DEFINE_MUTEX(ubd_lock); 110static DEFINE_MUTEX(ubd_lock);
114 111
115/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and 112/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
@@ -132,12 +129,8 @@ static struct block_device_operations ubd_blops = {
132 .getgeo = ubd_getgeo, 129 .getgeo = ubd_getgeo,
133}; 130};
134 131
135/* Protected by the queue_lock */
136static request_queue_t *ubd_queue;
137
138/* Protected by ubd_lock */ 132/* Protected by ubd_lock */
139static int fake_major = MAJOR_NR; 133static int fake_major = MAJOR_NR;
140
141static struct gendisk *ubd_gendisk[MAX_DEV]; 134static struct gendisk *ubd_gendisk[MAX_DEV];
142static struct gendisk *fake_gendisk[MAX_DEV]; 135static struct gendisk *fake_gendisk[MAX_DEV];
143 136
@@ -148,10 +141,6 @@ static struct gendisk *fake_gendisk[MAX_DEV];
148#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \ 141#define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \
149 .cl = 1 }) 142 .cl = 1 })
150#endif 143#endif
151
152/* Not protected - changed only in ubd_setup_common and then only to
153 * to enable O_SYNC.
154 */
155static struct openflags global_openflags = OPEN_FLAGS; 144static struct openflags global_openflags = OPEN_FLAGS;
156 145
157struct cow { 146struct cow {
@@ -178,6 +167,8 @@ struct ubd {
178 unsigned no_cow:1; 167 unsigned no_cow:1;
179 struct cow cow; 168 struct cow cow;
180 struct platform_device pdev; 169 struct platform_device pdev;
170 struct request_queue *queue;
171 spinlock_t lock;
181}; 172};
182 173
183#define DEFAULT_COW { \ 174#define DEFAULT_COW { \
@@ -198,8 +189,10 @@ struct ubd {
198 .no_cow = 0, \ 189 .no_cow = 0, \
199 .shared = 0, \ 190 .shared = 0, \
200 .cow = DEFAULT_COW, \ 191 .cow = DEFAULT_COW, \
192 .lock = SPIN_LOCK_UNLOCKED, \
201} 193}
202 194
195/* Protected by ubd_lock */
203struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; 196struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD };
204 197
205/* Only changed by fake_ide_setup which is a setup */ 198/* Only changed by fake_ide_setup which is a setup */
@@ -242,7 +235,6 @@ static void make_ide_entries(char *dev_name)
242 235
243 ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir); 236 ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir);
244 if(!ent) return; 237 if(!ent) return;
245 ent->nlink = 1;
246 ent->data = NULL; 238 ent->data = NULL;
247 ent->read_proc = proc_ide_read_media; 239 ent->read_proc = proc_ide_read_media;
248 ent->write_proc = NULL; 240 ent->write_proc = NULL;
@@ -286,12 +278,12 @@ static int parse_unit(char **ptr)
286 * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it 278 * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it
287 * should not be freed on exit. 279 * should not be freed on exit.
288 */ 280 */
289static int ubd_setup_common(char *str, int *index_out) 281static int ubd_setup_common(char *str, int *index_out, char **error_out)
290{ 282{
291 struct ubd *ubd_dev; 283 struct ubd *ubd_dev;
292 struct openflags flags = global_openflags; 284 struct openflags flags = global_openflags;
293 char *backing_file; 285 char *backing_file;
294 int n, err, i; 286 int n, err = 0, i;
295 287
296 if(index_out) *index_out = -1; 288 if(index_out) *index_out = -1;
297 n = *str; 289 n = *str;
@@ -302,56 +294,55 @@ static int ubd_setup_common(char *str, int *index_out)
302 str++; 294 str++;
303 if(!strcmp(str, "sync")){ 295 if(!strcmp(str, "sync")){
304 global_openflags = of_sync(global_openflags); 296 global_openflags = of_sync(global_openflags);
305 return(0); 297 goto out1;
306 } 298 }
299
300 err = -EINVAL;
307 major = simple_strtoul(str, &end, 0); 301 major = simple_strtoul(str, &end, 0);
308 if((*end != '\0') || (end == str)){ 302 if((*end != '\0') || (end == str)){
309 printk(KERN_ERR 303 *error_out = "Didn't parse major number";
310 "ubd_setup : didn't parse major number\n"); 304 goto out1;
311 return(1);
312 } 305 }
313 306
314 err = 1; 307 mutex_lock(&ubd_lock);
315 mutex_lock(&ubd_lock); 308 if(fake_major != MAJOR_NR){
316 if(fake_major != MAJOR_NR){ 309 *error_out = "Can't assign a fake major twice";
317 printk(KERN_ERR "Can't assign a fake major twice\n"); 310 goto out1;
318 goto out1; 311 }
319 }
320 312
321 fake_major = major; 313 fake_major = major;
322 314
323 printk(KERN_INFO "Setting extra ubd major number to %d\n", 315 printk(KERN_INFO "Setting extra ubd major number to %d\n",
324 major); 316 major);
325 err = 0; 317 err = 0;
326 out1: 318 out1:
327 mutex_unlock(&ubd_lock); 319 mutex_unlock(&ubd_lock);
328 return(err); 320 return err;
329 } 321 }
330 322
331 n = parse_unit(&str); 323 n = parse_unit(&str);
332 if(n < 0){ 324 if(n < 0){
333 printk(KERN_ERR "ubd_setup : couldn't parse unit number " 325 *error_out = "Couldn't parse device number";
334 "'%s'\n", str); 326 return -EINVAL;
335 return(1);
336 } 327 }
337 if(n >= MAX_DEV){ 328 if(n >= MAX_DEV){
338 printk(KERN_ERR "ubd_setup : index %d out of range " 329 *error_out = "Device number out of range";
339 "(%d devices, from 0 to %d)\n", n, MAX_DEV, MAX_DEV - 1); 330 return 1;
340 return(1);
341 } 331 }
342 332
343 err = 1; 333 err = -EBUSY;
344 mutex_lock(&ubd_lock); 334 mutex_lock(&ubd_lock);
345 335
346 ubd_dev = &ubd_devs[n]; 336 ubd_dev = &ubd_devs[n];
347 if(ubd_dev->file != NULL){ 337 if(ubd_dev->file != NULL){
348 printk(KERN_ERR "ubd_setup : device already configured\n"); 338 *error_out = "Device is already configured";
349 goto out; 339 goto out;
350 } 340 }
351 341
352 if (index_out) 342 if (index_out)
353 *index_out = n; 343 *index_out = n;
354 344
345 err = -EINVAL;
355 for (i = 0; i < sizeof("rscd="); i++) { 346 for (i = 0; i < sizeof("rscd="); i++) {
356 switch (*str) { 347 switch (*str) {
357 case 'r': 348 case 'r':
@@ -370,47 +361,54 @@ static int ubd_setup_common(char *str, int *index_out)
370 str++; 361 str++;
371 goto break_loop; 362 goto break_loop;
372 default: 363 default:
373 printk(KERN_ERR "ubd_setup : Expected '=' or flag letter (r, s, c, or d)\n"); 364 *error_out = "Expected '=' or flag letter "
365 "(r, s, c, or d)";
374 goto out; 366 goto out;
375 } 367 }
376 str++; 368 str++;
377 } 369 }
378 370
379 if (*str == '=') 371 if (*str == '=')
380 printk(KERN_ERR "ubd_setup : Too many flags specified\n"); 372 *error_out = "Too many flags specified";
381 else 373 else
382 printk(KERN_ERR "ubd_setup : Expected '='\n"); 374 *error_out = "Missing '='";
383 goto out; 375 goto out;
384 376
385break_loop: 377break_loop:
386 err = 0;
387 backing_file = strchr(str, ','); 378 backing_file = strchr(str, ',');
388 379
389 if (!backing_file) { 380 if (backing_file == NULL)
390 backing_file = strchr(str, ':'); 381 backing_file = strchr(str, ':');
391 }
392 382
393 if(backing_file){ 383 if(backing_file != NULL){
394 if(ubd_dev->no_cow) 384 if(ubd_dev->no_cow){
395 printk(KERN_ERR "Can't specify both 'd' and a " 385 *error_out = "Can't specify both 'd' and a cow file";
396 "cow file\n"); 386 goto out;
387 }
397 else { 388 else {
398 *backing_file = '\0'; 389 *backing_file = '\0';
399 backing_file++; 390 backing_file++;
400 } 391 }
401 } 392 }
393 err = 0;
402 ubd_dev->file = str; 394 ubd_dev->file = str;
403 ubd_dev->cow.file = backing_file; 395 ubd_dev->cow.file = backing_file;
404 ubd_dev->boot_openflags = flags; 396 ubd_dev->boot_openflags = flags;
405out: 397out:
406 mutex_unlock(&ubd_lock); 398 mutex_unlock(&ubd_lock);
407 return(err); 399 return err;
408} 400}
409 401
410static int ubd_setup(char *str) 402static int ubd_setup(char *str)
411{ 403{
412 ubd_setup_common(str, NULL); 404 char *error;
413 return(1); 405 int err;
406
407 err = ubd_setup_common(str, NULL, &error);
408 if(err)
409 printk(KERN_ERR "Failed to initialize device with \"%s\" : "
410 "%s\n", str, error);
411 return 1;
414} 412}
415 413
416__setup("ubd", ubd_setup); 414__setup("ubd", ubd_setup);
@@ -422,7 +420,7 @@ __uml_help(ubd_setup,
422" use either a ':' or a ',': the first one allows writing things like;\n" 420" use either a ':' or a ',': the first one allows writing things like;\n"
423" ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n" 421" ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n"
424" while with a ',' the shell would not expand the 2nd '~'.\n" 422" while with a ',' the shell would not expand the 2nd '~'.\n"
425" When using only one filename, UML will detect whether to thread it like\n" 423" When using only one filename, UML will detect whether to treat it like\n"
426" a COW file or a backing file. To override this detection, add the 'd'\n" 424" a COW file or a backing file. To override this detection, add the 'd'\n"
427" flag:\n" 425" flag:\n"
428" ubd0d=BackingFile\n" 426" ubd0d=BackingFile\n"
@@ -471,12 +469,6 @@ static void do_ubd_request(request_queue_t * q);
471/* Only changed by ubd_init, which is an initcall. */ 469/* Only changed by ubd_init, which is an initcall. */
472int thread_fd = -1; 470int thread_fd = -1;
473 471
474/* Changed by ubd_handler, which is serialized because interrupts only
475 * happen on CPU 0.
476 * XXX: currently unused.
477 */
478static int intr_count = 0;
479
480/* call ubd_finish if you need to serialize */ 472/* call ubd_finish if you need to serialize */
481static void __ubd_finish(struct request *req, int error) 473static void __ubd_finish(struct request *req, int error)
482{ 474{
@@ -499,36 +491,38 @@ static void __ubd_finish(struct request *req, int error)
499 * spin_lock_irq()/spin_lock_irqsave() */ 491 * spin_lock_irq()/spin_lock_irqsave() */
500static inline void ubd_finish(struct request *req, int error) 492static inline void ubd_finish(struct request *req, int error)
501{ 493{
502 spin_lock(&ubd_io_lock); 494 struct ubd *dev = req->rq_disk->private_data;
495
496 spin_lock(&dev->lock);
503 __ubd_finish(req, error); 497 __ubd_finish(req, error);
504 spin_unlock(&ubd_io_lock); 498 spin_unlock(&dev->lock);
505} 499}
506 500
507/* XXX - move this inside ubd_intr. */ 501/* XXX - move this inside ubd_intr. */
508/* Called without ubd_io_lock held, and only in interrupt context. */ 502/* Called without dev->lock held, and only in interrupt context. */
509static void ubd_handler(void) 503static void ubd_handler(void)
510{ 504{
511 struct io_thread_req req; 505 struct io_thread_req req;
512 struct request *rq = elv_next_request(ubd_queue); 506 struct request *rq;
507 struct ubd *dev;
513 int n; 508 int n;
514 509
515 do_ubd = 0; 510 do_ubd = 0;
516 intr_count++;
517 n = os_read_file(thread_fd, &req, sizeof(req)); 511 n = os_read_file(thread_fd, &req, sizeof(req));
518 if(n != sizeof(req)){ 512 if(n != sizeof(req)){
519 printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, " 513 printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, "
520 "err = %d\n", os_getpid(), -n); 514 "err = %d\n", os_getpid(), -n);
521 spin_lock(&ubd_io_lock);
522 end_request(rq, 0);
523 spin_unlock(&ubd_io_lock);
524 return; 515 return;
525 } 516 }
526 517
518 rq = req.req;
519 dev = rq->rq_disk->private_data;
520
527 ubd_finish(rq, req.error); 521 ubd_finish(rq, req.error);
528 reactivate_fd(thread_fd, UBD_IRQ); 522 reactivate_fd(thread_fd, UBD_IRQ);
529 spin_lock(&ubd_io_lock); 523 spin_lock(&dev->lock);
530 do_ubd_request(ubd_queue); 524 do_ubd_request(dev->queue);
531 spin_unlock(&ubd_io_lock); 525 spin_unlock(&dev->lock);
532} 526}
533 527
534static irqreturn_t ubd_intr(int irq, void *dev) 528static irqreturn_t ubd_intr(int irq, void *dev)
@@ -632,8 +626,7 @@ static int ubd_open_dev(struct ubd *ubd_dev)
632} 626}
633 627
634static int ubd_disk_register(int major, u64 size, int unit, 628static int ubd_disk_register(int major, u64 size, int unit,
635 struct gendisk **disk_out) 629 struct gendisk **disk_out)
636
637{ 630{
638 struct gendisk *disk; 631 struct gendisk *disk;
639 632
@@ -659,7 +652,7 @@ static int ubd_disk_register(int major, u64 size, int unit,
659 } 652 }
660 653
661 disk->private_data = &ubd_devs[unit]; 654 disk->private_data = &ubd_devs[unit];
662 disk->queue = ubd_queue; 655 disk->queue = ubd_devs[unit].queue;
663 add_disk(disk); 656 add_disk(disk);
664 657
665 *disk_out = disk; 658 *disk_out = disk;
@@ -668,28 +661,39 @@ static int ubd_disk_register(int major, u64 size, int unit,
668 661
669#define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9)) 662#define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9))
670 663
671static int ubd_add(int n) 664static int ubd_add(int n, char **error_out)
672{ 665{
673 struct ubd *ubd_dev = &ubd_devs[n]; 666 struct ubd *ubd_dev = &ubd_devs[n];
674 int err; 667 int err = 0;
675 668
676 err = -ENODEV;
677 if(ubd_dev->file == NULL) 669 if(ubd_dev->file == NULL)
678 goto out; 670 goto out;
679 671
680 err = ubd_file_size(ubd_dev, &ubd_dev->size); 672 err = ubd_file_size(ubd_dev, &ubd_dev->size);
681 if(err < 0) 673 if(err < 0){
674 *error_out = "Couldn't determine size of device's file";
682 goto out; 675 goto out;
676 }
683 677
684 ubd_dev->size = ROUND_BLOCK(ubd_dev->size); 678 ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
685 679
686 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); 680 err = -ENOMEM;
687 if(err) 681 ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock);
682 if (ubd_dev->queue == NULL) {
683 *error_out = "Failed to initialize device queue";
688 goto out; 684 goto out;
685 }
686 ubd_dev->queue->queuedata = ubd_dev;
687
688 err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]);
689 if(err){
690 *error_out = "Failed to register device";
691 goto out_cleanup;
692 }
689 693
690 if(fake_major != MAJOR_NR) 694 if(fake_major != MAJOR_NR)
691 ubd_disk_register(fake_major, ubd_dev->size, n, 695 ubd_disk_register(fake_major, ubd_dev->size, n,
692 &fake_gendisk[n]); 696 &fake_gendisk[n]);
693 697
694 /* perhaps this should also be under the "if (fake_major)" above */ 698 /* perhaps this should also be under the "if (fake_major)" above */
695 /* using the fake_disk->disk_name and also the fakehd_set name */ 699 /* using the fake_disk->disk_name and also the fakehd_set name */
@@ -699,30 +703,37 @@ static int ubd_add(int n)
699 err = 0; 703 err = 0;
700out: 704out:
701 return err; 705 return err;
706
707out_cleanup:
708 blk_cleanup_queue(ubd_dev->queue);
709 goto out;
702} 710}
703 711
704static int ubd_config(char *str) 712static int ubd_config(char *str, char **error_out)
705{ 713{
706 int n, ret; 714 int n, ret;
707 715
716 /* This string is possibly broken up and stored, so it's only
717 * freed if ubd_setup_common fails, or if only general options
718 * were set.
719 */
708 str = kstrdup(str, GFP_KERNEL); 720 str = kstrdup(str, GFP_KERNEL);
709 if (str == NULL) { 721 if (str == NULL) {
710 printk(KERN_ERR "ubd_config failed to strdup string\n"); 722 *error_out = "Failed to allocate memory";
711 ret = 1; 723 return -ENOMEM;
712 goto out;
713 } 724 }
714 ret = ubd_setup_common(str, &n); 725
715 if (ret) { 726 ret = ubd_setup_common(str, &n, error_out);
716 ret = -1; 727 if (ret)
717 goto err_free; 728 goto err_free;
718 } 729
719 if (n == -1) { 730 if (n == -1) {
720 ret = 0; 731 ret = 0;
721 goto err_free; 732 goto err_free;
722 } 733 }
723 734
724 mutex_lock(&ubd_lock); 735 mutex_lock(&ubd_lock);
725 ret = ubd_add(n); 736 ret = ubd_add(n, error_out);
726 if (ret) 737 if (ret)
727 ubd_devs[n].file = NULL; 738 ubd_devs[n].file = NULL;
728 mutex_unlock(&ubd_lock); 739 mutex_unlock(&ubd_lock);
@@ -777,7 +788,7 @@ static int ubd_id(char **str, int *start_out, int *end_out)
777 return n; 788 return n;
778} 789}
779 790
780static int ubd_remove(int n) 791static int ubd_remove(int n, char **error_out)
781{ 792{
782 struct ubd *ubd_dev; 793 struct ubd *ubd_dev;
783 int err = -ENODEV; 794 int err = -ENODEV;
@@ -807,6 +818,7 @@ static int ubd_remove(int n)
807 fake_gendisk[n] = NULL; 818 fake_gendisk[n] = NULL;
808 } 819 }
809 820
821 blk_cleanup_queue(ubd_dev->queue);
810 platform_device_unregister(&ubd_dev->pdev); 822 platform_device_unregister(&ubd_dev->pdev);
811 *ubd_dev = ((struct ubd) DEFAULT_UBD); 823 *ubd_dev = ((struct ubd) DEFAULT_UBD);
812 err = 0; 824 err = 0;
@@ -815,8 +827,11 @@ out:
815 return err; 827 return err;
816} 828}
817 829
818/* All these are called by mconsole in process context and without ubd-specific locks. */ 830/* All these are called by mconsole in process context and without
831 * ubd-specific locks. The structure itself is const except for .list.
832 */
819static struct mc_device ubd_mc = { 833static struct mc_device ubd_mc = {
834 .list = LIST_HEAD_INIT(ubd_mc.list),
820 .name = "ubd", 835 .name = "ubd",
821 .config = ubd_config, 836 .config = ubd_config,
822 .get_config = ubd_get_config, 837 .get_config = ubd_get_config,
@@ -836,13 +851,17 @@ static int __init ubd0_init(void)
836{ 851{
837 struct ubd *ubd_dev = &ubd_devs[0]; 852 struct ubd *ubd_dev = &ubd_devs[0];
838 853
854 mutex_lock(&ubd_lock);
839 if(ubd_dev->file == NULL) 855 if(ubd_dev->file == NULL)
840 ubd_dev->file = "root_fs"; 856 ubd_dev->file = "root_fs";
857 mutex_unlock(&ubd_lock);
858
841 return(0); 859 return(0);
842} 860}
843 861
844__initcall(ubd0_init); 862__initcall(ubd0_init);
845 863
864/* Used in ubd_init, which is an initcall */
846static struct platform_driver ubd_driver = { 865static struct platform_driver ubd_driver = {
847 .driver = { 866 .driver = {
848 .name = DRIVER_NAME, 867 .name = DRIVER_NAME,
@@ -851,17 +870,12 @@ static struct platform_driver ubd_driver = {
851 870
852static int __init ubd_init(void) 871static int __init ubd_init(void)
853{ 872{
854 int i; 873 char *error;
874 int i, err;
855 875
856 if (register_blkdev(MAJOR_NR, "ubd")) 876 if (register_blkdev(MAJOR_NR, "ubd"))
857 return -1; 877 return -1;
858 878
859 ubd_queue = blk_init_queue(do_ubd_request, &ubd_io_lock);
860 if (!ubd_queue) {
861 unregister_blkdev(MAJOR_NR, "ubd");
862 return -1;
863 }
864
865 if (fake_major != MAJOR_NR) { 879 if (fake_major != MAJOR_NR) {
866 char name[sizeof("ubd_nnn\0")]; 880 char name[sizeof("ubd_nnn\0")];
867 881
@@ -870,8 +884,14 @@ static int __init ubd_init(void)
870 return -1; 884 return -1;
871 } 885 }
872 platform_driver_register(&ubd_driver); 886 platform_driver_register(&ubd_driver);
873 for (i = 0; i < MAX_DEV; i++) 887 mutex_lock(&ubd_lock);
874 ubd_add(i); 888 for (i = 0; i < MAX_DEV; i++){
889 err = ubd_add(i, &error);
890 if(err)
891 printk(KERN_ERR "Failed to initialize ubd device %d :"
892 "%s\n", i, error);
893 }
894 mutex_unlock(&ubd_lock);
875 return 0; 895 return 0;
876} 896}
877 897
@@ -1003,7 +1023,7 @@ static void cowify_req(struct io_thread_req *req, unsigned long *bitmap,
1003 req->bitmap_words, bitmap_len); 1023 req->bitmap_words, bitmap_len);
1004} 1024}
1005 1025
1006/* Called with ubd_io_lock held */ 1026/* Called with dev->lock held */
1007static int prepare_request(struct request *req, struct io_thread_req *io_req) 1027static int prepare_request(struct request *req, struct io_thread_req *io_req)
1008{ 1028{
1009 struct gendisk *disk = req->rq_disk; 1029 struct gendisk *disk = req->rq_disk;
@@ -1022,6 +1042,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
1022 offset = ((__u64) req->sector) << 9; 1042 offset = ((__u64) req->sector) << 9;
1023 len = req->current_nr_sectors << 9; 1043 len = req->current_nr_sectors << 9;
1024 1044
1045 io_req->req = req;
1025 io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd; 1046 io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd;
1026 io_req->fds[1] = ubd_dev->fd; 1047 io_req->fds[1] = ubd_dev->fd;
1027 io_req->cow_offset = -1; 1048 io_req->cow_offset = -1;
@@ -1043,7 +1064,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
1043 return(0); 1064 return(0);
1044} 1065}
1045 1066
1046/* Called with ubd_io_lock held */ 1067/* Called with dev->lock held */
1047static void do_ubd_request(request_queue_t *q) 1068static void do_ubd_request(request_queue_t *q)
1048{ 1069{
1049 struct io_thread_req io_req; 1070 struct io_thread_req io_req;
@@ -1102,7 +1123,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
1102 sizeof(ubd_id))) 1123 sizeof(ubd_id)))
1103 return(-EFAULT); 1124 return(-EFAULT);
1104 return(0); 1125 return(0);
1105 1126
1106 case CDROMVOLREAD: 1127 case CDROMVOLREAD:
1107 if(copy_from_user(&volume, (char __user *) arg, sizeof(volume))) 1128 if(copy_from_user(&volume, (char __user *) arg, sizeof(volume)))
1108 return(-EFAULT); 1129 return(-EFAULT);
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index 9003a343e148..c4b41bb1035f 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -30,14 +30,13 @@ struct chan {
30extern void chan_interrupt(struct list_head *chans, struct delayed_work *task, 30extern void chan_interrupt(struct list_head *chans, struct delayed_work *task,
31 struct tty_struct *tty, int irq); 31 struct tty_struct *tty, int irq);
32extern int parse_chan_pair(char *str, struct line *line, int device, 32extern int parse_chan_pair(char *str, struct line *line, int device,
33 const struct chan_opts *opts); 33 const struct chan_opts *opts, char **error_out);
34extern int open_chan(struct list_head *chans); 34extern int open_chan(struct list_head *chans);
35extern int write_chan(struct list_head *chans, const char *buf, int len, 35extern int write_chan(struct list_head *chans, const char *buf, int len,
36 int write_irq); 36 int write_irq);
37extern int console_write_chan(struct list_head *chans, const char *buf, 37extern int console_write_chan(struct list_head *chans, const char *buf,
38 int len); 38 int len);
39extern int console_open_chan(struct line *line, struct console *co, 39extern int console_open_chan(struct line *line, struct console *co);
40 const struct chan_opts *opts);
41extern void deactivate_chan(struct list_head *chans, int irq); 40extern void deactivate_chan(struct list_head *chans, int irq);
42extern void reactivate_chan(struct list_head *chans, int irq); 41extern void reactivate_chan(struct list_head *chans, int irq);
43extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); 42extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
diff --git a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h
index a795547a1dbd..38f16d812e7c 100644
--- a/arch/um/include/chan_user.h
+++ b/arch/um/include/chan_user.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -9,11 +9,11 @@
9#include "init.h" 9#include "init.h"
10 10
11struct chan_opts { 11struct chan_opts {
12 void (*announce)(char *dev_name, int dev); 12 void (*const announce)(char *dev_name, int dev);
13 char *xterm_title; 13 char *xterm_title;
14 int raw; 14 const int raw;
15 unsigned long tramp_stack; 15 const unsigned long tramp_stack;
16 int in_kernel; 16 const int in_kernel;
17}; 17};
18 18
19enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE }; 19enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };
@@ -54,14 +54,3 @@ __uml_help(fn, prefix "[0-9]*=<channel description>\n" \
54); 54);
55 55
56#endif 56#endif
57
58/*
59 * Overrides for Emacs so that we follow Linus's tabbing style.
60 * Emacs will notice this stuff at the end of the file and automatically
61 * adjust the settings for this buffer only. This must remain at the end
62 * of the file.
63 * ---------------------------------------------------------------------------
64 * Local variables:
65 * c-file-style: "linux"
66 * End:
67 */
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index cec9fcc57bf5..173af029d12b 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -61,7 +61,6 @@ extern int set_signals(int enable);
61extern void force_sigbus(void); 61extern void force_sigbus(void);
62extern int pid_to_processor_id(int pid); 62extern int pid_to_processor_id(int pid);
63extern void deliver_signals(void *t); 63extern void deliver_signals(void *t);
64extern int next_syscall_index(int max);
65extern int next_trap_index(int max); 64extern int next_trap_index(int max);
66extern void default_idle(void); 65extern void default_idle(void);
67extern void finish_fork(void); 66extern void finish_fork(void);
@@ -88,7 +87,6 @@ extern void timer_irq(union uml_pt_regs *regs);
88extern void unprotect_stack(unsigned long stack); 87extern void unprotect_stack(unsigned long stack);
89extern void do_uml_exitcalls(void); 88extern void do_uml_exitcalls(void);
90extern int attach_debugger(int idle_pid, int pid, int stop); 89extern int attach_debugger(int idle_pid, int pid, int stop);
91extern void bad_segv(struct faultinfo fi, unsigned long ip);
92extern int config_gdb(char *str); 90extern int config_gdb(char *str);
93extern int remove_gdb(void); 91extern int remove_gdb(void);
94extern char *uml_strdup(char *string); 92extern char *uml_strdup(char *string);
@@ -104,8 +102,6 @@ extern int clear_user_proc(void *buf, int size);
104extern int copy_to_user_proc(void *to, void *from, int size); 102extern int copy_to_user_proc(void *to, void *from, int size);
105extern int copy_from_user_proc(void *to, void *from, int size); 103extern int copy_from_user_proc(void *to, void *from, int size);
106extern int strlen_user_proc(char *str); 104extern int strlen_user_proc(char *str);
107extern void bus_handler(int sig, union uml_pt_regs *regs);
108extern void winch(int sig, union uml_pt_regs *regs);
109extern long execute_syscall(void *r); 105extern long execute_syscall(void *r);
110extern int smp_sigio_handler(void); 106extern int smp_sigio_handler(void);
111extern void *get_current(void); 107extern void *get_current(void);
@@ -120,7 +116,6 @@ extern void time_init_kern(void);
120 116
121/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ 117/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
122extern int __cant_sleep(void); 118extern int __cant_sleep(void);
123extern void segv_handler(int sig, union uml_pt_regs *regs);
124extern void sigio_handler(int sig, union uml_pt_regs *regs); 119extern void sigio_handler(int sig, union uml_pt_regs *regs);
125 120
126#endif 121#endif
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 5f232ae89fbb..1223f2c844b4 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -11,36 +11,37 @@
11#include "linux/tty.h" 11#include "linux/tty.h"
12#include "linux/interrupt.h" 12#include "linux/interrupt.h"
13#include "linux/spinlock.h" 13#include "linux/spinlock.h"
14#include "linux/mutex.h"
14#include "chan_user.h" 15#include "chan_user.h"
15#include "mconsole_kern.h" 16#include "mconsole_kern.h"
16 17
18/* There's only one modifiable field in this - .mc.list */
17struct line_driver { 19struct line_driver {
18 char *name; 20 const char *name;
19 char *device_name; 21 const char *device_name;
20 short major; 22 const short major;
21 short minor_start; 23 const short minor_start;
22 short type; 24 const short type;
23 short subtype; 25 const short subtype;
24 int read_irq; 26 const int read_irq;
25 char *read_irq_name; 27 const char *read_irq_name;
26 int write_irq; 28 const int write_irq;
27 char *write_irq_name; 29 const char *write_irq_name;
28 char *symlink_from;
29 char *symlink_to;
30 struct mc_device mc; 30 struct mc_device mc;
31}; 31};
32 32
33struct line { 33struct line {
34 struct tty_struct *tty; 34 struct tty_struct *tty;
35 spinlock_t count_lock;
36 int valid;
37
35 char *init_str; 38 char *init_str;
36 int init_pri; 39 int init_pri;
37 struct list_head chan_list; 40 struct list_head chan_list;
38 int valid; 41
39 int count;
40 int throttled;
41 /*This lock is actually, mostly, local to*/ 42 /*This lock is actually, mostly, local to*/
42 spinlock_t lock; 43 spinlock_t lock;
43 44 int throttled;
44 /* Yes, this is a real circular buffer. 45 /* Yes, this is a real circular buffer.
45 * XXX: And this should become a struct kfifo! 46 * XXX: And this should become a struct kfifo!
46 * 47 *
@@ -57,22 +58,17 @@ struct line {
57}; 58};
58 59
59#define LINE_INIT(str, d) \ 60#define LINE_INIT(str, d) \
60 { .init_str = str, \ 61 { .count_lock = SPIN_LOCK_UNLOCKED, \
62 .init_str = str, \
61 .init_pri = INIT_STATIC, \ 63 .init_pri = INIT_STATIC, \
62 .valid = 1, \ 64 .valid = 1, \
63 .lock = SPIN_LOCK_UNLOCKED, \ 65 .lock = SPIN_LOCK_UNLOCKED, \
64 .driver = d } 66 .driver = d }
65 67
66struct lines {
67 int num;
68};
69
70#define LINES_INIT(n) { .num = n }
71
72extern void line_close(struct tty_struct *tty, struct file * filp); 68extern void line_close(struct tty_struct *tty, struct file * filp);
73extern int line_open(struct line *lines, struct tty_struct *tty); 69extern int line_open(struct line *lines, struct tty_struct *tty);
74extern int line_setup(struct line *lines, unsigned int sizeof_lines, 70extern int line_setup(struct line *lines, unsigned int sizeof_lines,
75 char *init); 71 char *init, char **error_out);
76extern int line_write(struct tty_struct *tty, const unsigned char *buf, 72extern int line_write(struct tty_struct *tty, const unsigned char *buf,
77 int len); 73 int len);
78extern void line_put_char(struct tty_struct *tty, unsigned char ch); 74extern void line_put_char(struct tty_struct *tty, unsigned char ch);
@@ -90,17 +86,18 @@ extern char *add_xterm_umid(char *base);
90extern int line_setup_irq(int fd, int input, int output, struct line *line, 86extern int line_setup_irq(int fd, int input, int output, struct line *line,
91 void *data); 87 void *data);
92extern void line_close_chan(struct line *line); 88extern void line_close_chan(struct line *line);
93extern struct tty_driver * line_register_devfs(struct lines *set, 89extern struct tty_driver *register_lines(struct line_driver *line_driver,
94 struct line_driver *line_driver, 90 const struct tty_operations *driver,
95 const struct tty_operations *driver, 91 struct line *lines, int nlines);
96 struct line *lines, int nlines);
97extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); 92extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
98extern void close_lines(struct line *lines, int nlines); 93extern void close_lines(struct line *lines, int nlines);
99 94
100extern int line_config(struct line *lines, unsigned int sizeof_lines, 95extern int line_config(struct line *lines, unsigned int sizeof_lines,
101 char *str, const struct chan_opts *opts); 96 char *str, const struct chan_opts *opts,
97 char **error_out);
102extern int line_id(char **str, int *start_out, int *end_out); 98extern int line_id(char **str, int *start_out, int *end_out);
103extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); 99extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n,
100 char **error_out);
104extern int line_get_config(char *dev, struct line *lines, 101extern int line_get_config(char *dev, struct line *lines,
105 unsigned int sizeof_lines, char *str, 102 unsigned int sizeof_lines, char *str,
106 int size, char **error_out); 103 int size, char **error_out);
diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h
index 1ea6d928e1cd..d2fe07e78958 100644
--- a/arch/um/include/mconsole_kern.h
+++ b/arch/um/include/mconsole_kern.h
@@ -18,10 +18,10 @@ struct mconsole_entry {
18struct mc_device { 18struct mc_device {
19 struct list_head list; 19 struct list_head list;
20 char *name; 20 char *name;
21 int (*config)(char *); 21 int (*config)(char *, char **);
22 int (*get_config)(char *, char *, int, char **); 22 int (*get_config)(char *, char *, int, char **);
23 int (*id)(char **, int *, int *); 23 int (*id)(char **, int *, int *);
24 int (*remove)(int); 24 int (*remove)(int, char **);
25}; 25};
26 26
27#define CONFIG_CHUNK(str, size, current, chunk, end) \ 27#define CONFIG_CHUNK(str, size, current, chunk, end) \
@@ -50,14 +50,3 @@ static inline void mconsole_register_dev(struct mc_device *new)
50#endif 50#endif
51 51
52#endif 52#endif
53
54/*
55 * Overrides for Emacs so that we follow Linus's tabbing style.
56 * Emacs will notice this stuff at the end of the file and automatically
57 * adjust the settings for this buffer only. This must remain at the end
58 * of the file.
59 * ---------------------------------------------------------------------------
60 * Local variables:
61 * c-file-style: "linux"
62 * End:
63 */
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h
index 218f8b47fdcd..125ab42df18a 100644
--- a/arch/um/include/net_kern.h
+++ b/arch/um/include/net_kern.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -36,7 +36,7 @@ struct uml_net_private {
36 void (*remove)(void *); 36 void (*remove)(void *);
37 int (*read)(int, struct sk_buff **skb, struct uml_net_private *); 37 int (*read)(int, struct sk_buff **skb, struct uml_net_private *);
38 int (*write)(int, struct sk_buff **skb, struct uml_net_private *); 38 int (*write)(int, struct sk_buff **skb, struct uml_net_private *);
39 39
40 void (*add_address)(unsigned char *, unsigned char *, void *); 40 void (*add_address)(unsigned char *, unsigned char *, void *);
41 void (*delete_address)(unsigned char *, unsigned char *, void *); 41 void (*delete_address)(unsigned char *, unsigned char *, void *);
42 int (*set_mtu)(int mtu, void *); 42 int (*set_mtu)(int mtu, void *);
@@ -52,18 +52,18 @@ struct net_kern_info {
52 52
53struct transport { 53struct transport {
54 struct list_head list; 54 struct list_head list;
55 char *name; 55 const char *name;
56 int (*setup)(char *, char **, void *); 56 int (* const setup)(char *, char **, void *);
57 const struct net_user_info *user; 57 const struct net_user_info *user;
58 const struct net_kern_info *kern; 58 const struct net_kern_info *kern;
59 int private_size; 59 const int private_size;
60 int setup_size; 60 const int setup_size;
61}; 61};
62 62
63extern struct net_device *ether_init(int); 63extern struct net_device *ether_init(int);
64extern unsigned short ether_protocol(struct sk_buff *); 64extern unsigned short ether_protocol(struct sk_buff *);
65extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); 65extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra);
66extern int tap_setup_common(char *str, char *type, char **dev_name, 66extern int tap_setup_common(char *str, char *type, char **dev_name,
67 char **mac_out, char **gate_addr); 67 char **mac_out, char **gate_addr);
68extern void register_transport(struct transport *new); 68extern void register_transport(struct transport *new);
69extern unsigned short eth_protocol(struct sk_buff *skb); 69extern unsigned short eth_protocol(struct sk_buff *skb);
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 13a86bd383d3..8629bd191492 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -137,7 +137,6 @@ extern int os_new_tty_pgrp(int fd, int pid);
137extern int os_get_ifname(int fd, char *namebuf); 137extern int os_get_ifname(int fd, char *namebuf);
138extern int os_set_slip(int fd); 138extern int os_set_slip(int fd);
139extern int os_set_owner(int fd, int pid); 139extern int os_set_owner(int fd, int pid);
140extern int os_sigio_async(int master, int slave);
141extern int os_mode_fd(int fd, int mode); 140extern int os_mode_fd(int fd, int mode);
142 141
143extern int os_seek_file(int fd, __u64 offset); 142extern int os_seek_file(int fd, __u64 offset);
@@ -341,4 +340,6 @@ extern void maybe_sigio_broken(int fd, int read);
341extern void sig_handler_common_skas(int sig, void *sc_ptr); 340extern void sig_handler_common_skas(int sig, void *sc_ptr);
342extern void user_signal(int sig, union uml_pt_regs *regs, int pid); 341extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
343 342
343extern int os_arch_prctl(int pid, int code, unsigned long *addr);
344
344#endif 345#endif
diff --git a/arch/um/include/sigio.h b/arch/um/include/sigio.h
index fe99ea163c2e..434f1a9ae4b3 100644
--- a/arch/um/include/sigio.h
+++ b/arch/um/include/sigio.h
@@ -12,14 +12,3 @@ extern void sigio_lock(void);
12extern void sigio_unlock(void); 12extern void sigio_unlock(void);
13 13
14#endif 14#endif
15
16/*
17 * Overrides for Emacs so that we follow Linus's tabbing style.
18 * Emacs will notice this stuff at the end of the file and automatically
19 * adjust the settings for this buffer only. This must remain at the end
20 * of the file.
21 * ---------------------------------------------------------------------------
22 * Local variables:
23 * c-file-style: "linux"
24 * End:
25 */
diff --git a/arch/um/include/tempfile.h b/arch/um/include/tempfile.h
index e36d9e0f5105..d441eac936b9 100644
--- a/arch/um/include/tempfile.h
+++ b/arch/um/include/tempfile.h
@@ -9,13 +9,3 @@
9extern int make_tempfile(const char *template, char **tempname, int do_unlink); 9extern int make_tempfile(const char *template, char **tempname, int do_unlink);
10 10
11#endif 11#endif
12/*
13 * Overrides for Emacs so that we follow Linus's tabbing style.
14 * Emacs will notice this stuff at the end of the file and automatically
15 * adjust the settings for this buffer only. This must remain at the end
16 * of the file.
17 * ---------------------------------------------------------------------------
18 * Local variables:
19 * c-file-style: "linux"
20 * End:
21 */
diff --git a/arch/um/include/umid.h b/arch/um/include/umid.h
deleted file mode 100644
index 11373c851f15..000000000000
--- a/arch/um/include/umid.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UMID_H__
7#define __UMID_H__
8
9extern int umid_file_name(char *name, char *buf, int len);
10
11#endif
12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index 06625fefef33..023575f67343 100644
--- a/arch/um/include/user_util.h
+++ b/arch/um/include/user_util.h
@@ -38,8 +38,6 @@ extern unsigned long long highmem;
38 38
39extern char host_info[]; 39extern char host_info[];
40 40
41extern char saved_command_line[];
42
43extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; 41extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
44extern unsigned long _unprotected_end; 42extern unsigned long _unprotected_end;
45extern unsigned long brk_start; 43extern unsigned long brk_start;
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 6fa63a2a89e3..c5cf4a0827b0 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
7clean-files := 7clean-files :=
8 8
9obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \ 9obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
10 physmem.o process.o ptrace.o reboot.o resource.o sigio.o \ 10 physmem.o process.o ptrace.o reboot.o sigio.o \
11 signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \ 11 signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \
12 um_arch.o umid.o 12 um_arch.o umid.o
13 13
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 8d56ec6cca79..121166400e25 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -39,9 +39,9 @@ static long execve1(char *file, char __user * __user *argv,
39 char __user *__user *env) 39 char __user *__user *env)
40{ 40{
41 long error; 41 long error;
42#ifdef CONFIG_TTY_LOG
42 struct tty_struct *tty; 43 struct tty_struct *tty;
43 44
44#ifdef CONFIG_TTY_LOG
45 mutex_lock(&tty_mutex); 45 mutex_lock(&tty_mutex);
46 tty = get_current_tty(); 46 tty = get_current_tty();
47 if (tty) 47 if (tty)
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 5c1e611f628d..50a288bb875a 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -79,7 +79,7 @@ skip:
79 return 0; 79 return 0;
80} 80}
81 81
82struct irq_fd *active_fds = NULL; 82static struct irq_fd *active_fds = NULL;
83static struct irq_fd **last_irq_ptr = &active_fds; 83static struct irq_fd **last_irq_ptr = &active_fds;
84 84
85extern void free_irqs(void); 85extern void free_irqs(void);
@@ -124,8 +124,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
124 if (err < 0) 124 if (err < 0)
125 goto out; 125 goto out;
126 126
127 new_fd = um_kmalloc(sizeof(*new_fd));
128 err = -ENOMEM; 127 err = -ENOMEM;
128 new_fd = kmalloc(sizeof(struct irq_fd), GFP_KERNEL);
129 if (new_fd == NULL) 129 if (new_fd == NULL)
130 goto out; 130 goto out;
131 131
@@ -176,9 +176,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
176 */ 176 */
177 spin_unlock_irqrestore(&irq_lock, flags); 177 spin_unlock_irqrestore(&irq_lock, flags);
178 kfree(tmp_pfd); 178 kfree(tmp_pfd);
179 tmp_pfd = NULL;
180 179
181 tmp_pfd = um_kmalloc(n); 180 tmp_pfd = kmalloc(n, GFP_KERNEL);
182 if (tmp_pfd == NULL) 181 if (tmp_pfd == NULL)
183 goto out_kfree; 182 goto out_kfree;
184 183
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index c95855ba6ab5..e85d65deea0d 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -24,8 +24,9 @@
24#include "init.h" 24#include "init.h"
25#include "kern_constants.h" 25#include "kern_constants.h"
26 26
27/* Changed during early boot */ 27/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
28unsigned long *empty_zero_page = NULL; 28unsigned long *empty_zero_page = NULL;
29/* allocated in paging_init and unchanged thereafter */
29unsigned long *empty_bad_page = NULL; 30unsigned long *empty_bad_page = NULL;
30pgd_t swapper_pg_dir[PTRS_PER_PGD]; 31pgd_t swapper_pg_dir[PTRS_PER_PGD];
31unsigned long long highmem; 32unsigned long long highmem;
@@ -65,8 +66,8 @@ void mem_init(void)
65{ 66{
66 max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT; 67 max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
67 68
68 /* clear the zero-page */ 69 /* clear the zero-page */
69 memset((void *) empty_zero_page, 0, PAGE_SIZE); 70 memset((void *) empty_zero_page, 0, PAGE_SIZE);
70 71
71 /* Map in the area just after the brk now that kmalloc is about 72 /* Map in the area just after the brk now that kmalloc is about
72 * to be turned on. 73 * to be turned on.
@@ -253,8 +254,10 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order)
253 int i; 254 int i;
254 255
255 again: 256 again:
256 if(page == NULL) return(page); 257 if(page == NULL)
257 if(PageHighMem(page)) return(page); 258 return page;
259 if(PageHighMem(page))
260 return page;
258 261
259 addr = (unsigned long) page_address(page); 262 addr = (unsigned long) page_address(page);
260 for(i = 0; i < (1 << order); i++){ 263 for(i = 0; i < (1 << order); i++){
@@ -263,13 +266,15 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order)
263 sizeof(zero), 266 sizeof(zero),
264 &current->thread.fault_addr, 267 &current->thread.fault_addr,
265 &current->thread.fault_catcher)){ 268 &current->thread.fault_catcher)){
266 if(!(mask & __GFP_WAIT)) return(NULL); 269 if(!(mask & __GFP_WAIT))
270 return NULL;
267 else break; 271 else break;
268 } 272 }
269 addr += PAGE_SIZE; 273 addr += PAGE_SIZE;
270 } 274 }
271 275
272 if(i == (1 << order)) return(page); 276 if(i == (1 << order))
277 return page;
273 page = alloc_pages(mask, order); 278 page = alloc_pages(mask, order);
274 goto again; 279 goto again;
275} 280}
@@ -283,7 +288,6 @@ void free_initmem(void)
283} 288}
284 289
285#ifdef CONFIG_BLK_DEV_INITRD 290#ifdef CONFIG_BLK_DEV_INITRD
286
287void free_initrd_mem(unsigned long start, unsigned long end) 291void free_initrd_mem(unsigned long start, unsigned long end)
288{ 292{
289 if (start < end) 293 if (start < end)
@@ -296,37 +300,36 @@ void free_initrd_mem(unsigned long start, unsigned long end)
296 totalram_pages++; 300 totalram_pages++;
297 } 301 }
298} 302}
299
300#endif 303#endif
301 304
302void show_mem(void) 305void show_mem(void)
303{ 306{
304 int pfn, total = 0, reserved = 0; 307 int pfn, total = 0, reserved = 0;
305 int shared = 0, cached = 0; 308 int shared = 0, cached = 0;
306 int highmem = 0; 309 int highmem = 0;
307 struct page *page; 310 struct page *page;
308 311
309 printk("Mem-info:\n"); 312 printk("Mem-info:\n");
310 show_free_areas(); 313 show_free_areas();
311 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 314 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
312 pfn = max_mapnr; 315 pfn = max_mapnr;
313 while(pfn-- > 0) { 316 while(pfn-- > 0) {
314 page = pfn_to_page(pfn); 317 page = pfn_to_page(pfn);
315 total++; 318 total++;
316 if(PageHighMem(page)) 319 if(PageHighMem(page))
317 highmem++; 320 highmem++;
318 if(PageReserved(page)) 321 if(PageReserved(page))
319 reserved++; 322 reserved++;
320 else if(PageSwapCache(page)) 323 else if(PageSwapCache(page))
321 cached++; 324 cached++;
322 else if(page_count(page)) 325 else if(page_count(page))
323 shared += page_count(page) - 1; 326 shared += page_count(page) - 1;
324 } 327 }
325 printk("%d pages of RAM\n", total); 328 printk("%d pages of RAM\n", total);
326 printk("%d pages of HIGHMEM\n", highmem); 329 printk("%d pages of HIGHMEM\n", highmem);
327 printk("%d reserved pages\n", reserved); 330 printk("%d reserved pages\n", reserved);
328 printk("%d pages shared\n", shared); 331 printk("%d pages shared\n", shared);
329 printk("%d pages swap cached\n", cached); 332 printk("%d pages swap cached\n", cached);
330} 333}
331 334
332/* 335/*
@@ -362,28 +365,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
362struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) 365struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
363{ 366{
364 struct page *pte; 367 struct page *pte;
365 368
366 pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); 369 pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
367 return pte; 370 return pte;
368} 371}
369
370struct iomem_region *iomem_regions = NULL;
371int iomem_size = 0;
372
373extern int parse_iomem(char *str, int *add) __init;
374
375__uml_setup("iomem=", parse_iomem,
376"iomem=<name>,<file>\n"
377" Configure <file> as an IO memory region named <name>.\n\n"
378);
379
380/*
381 * Overrides for Emacs so that we follow Linus's tabbing style.
382 * Emacs will notice this stuff at the end of the file and automatically
383 * adjust the settings for this buffer only. This must remain at the end
384 * of the file.
385 * ---------------------------------------------------------------------------
386 * Local variables:
387 * c-file-style: "linux"
388 * End:
389 */
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index abafa64b8727..638f3b5f6094 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -40,7 +40,7 @@ static struct rb_node **find_rb(void *virt)
40 while(*n != NULL){ 40 while(*n != NULL){
41 d = rb_entry(*n, struct phys_desc, rb); 41 d = rb_entry(*n, struct phys_desc, rb);
42 if(d->virt == virt) 42 if(d->virt == virt)
43 return(n); 43 return n;
44 44
45 if(d->virt > virt) 45 if(d->virt > virt)
46 n = &(*n)->rb_left; 46 n = &(*n)->rb_left;
@@ -48,7 +48,7 @@ static struct rb_node **find_rb(void *virt)
48 n = &(*n)->rb_right; 48 n = &(*n)->rb_right;
49 } 49 }
50 50
51 return(n); 51 return n;
52} 52}
53 53
54static struct phys_desc *find_phys_mapping(void *virt) 54static struct phys_desc *find_phys_mapping(void *virt)
@@ -56,9 +56,9 @@ static struct phys_desc *find_phys_mapping(void *virt)
56 struct rb_node **n = find_rb(virt); 56 struct rb_node **n = find_rb(virt);
57 57
58 if(*n == NULL) 58 if(*n == NULL)
59 return(NULL); 59 return NULL;
60 60
61 return(rb_entry(*n, struct phys_desc, rb)); 61 return rb_entry(*n, struct phys_desc, rb);
62} 62}
63 63
64static void insert_phys_mapping(struct phys_desc *desc) 64static void insert_phys_mapping(struct phys_desc *desc)
@@ -89,10 +89,10 @@ static struct desc_mapping *find_mapping(int fd)
89 list_for_each(ele, &descriptor_mappings){ 89 list_for_each(ele, &descriptor_mappings){
90 desc = list_entry(ele, struct desc_mapping, list); 90 desc = list_entry(ele, struct desc_mapping, list);
91 if(desc->fd == fd) 91 if(desc->fd == fd)
92 return(desc); 92 return desc;
93 } 93 }
94 94
95 return(NULL); 95 return NULL;
96} 96}
97 97
98static struct desc_mapping *descriptor_mapping(int fd) 98static struct desc_mapping *descriptor_mapping(int fd)
@@ -101,11 +101,11 @@ static struct desc_mapping *descriptor_mapping(int fd)
101 101
102 desc = find_mapping(fd); 102 desc = find_mapping(fd);
103 if(desc != NULL) 103 if(desc != NULL)
104 return(desc); 104 return desc;
105 105
106 desc = kmalloc(sizeof(*desc), GFP_ATOMIC); 106 desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
107 if(desc == NULL) 107 if(desc == NULL)
108 return(NULL); 108 return NULL;
109 109
110 *desc = ((struct desc_mapping) 110 *desc = ((struct desc_mapping)
111 { .fd = fd, 111 { .fd = fd,
@@ -113,7 +113,7 @@ static struct desc_mapping *descriptor_mapping(int fd)
113 .pages = LIST_HEAD_INIT(desc->pages) }); 113 .pages = LIST_HEAD_INIT(desc->pages) });
114 list_add(&desc->list, &descriptor_mappings); 114 list_add(&desc->list, &descriptor_mappings);
115 115
116 return(desc); 116 return desc;
117} 117}
118 118
119int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) 119int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
@@ -125,11 +125,11 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
125 125
126 fd_maps = descriptor_mapping(fd); 126 fd_maps = descriptor_mapping(fd);
127 if(fd_maps == NULL) 127 if(fd_maps == NULL)
128 return(-ENOMEM); 128 return -ENOMEM;
129 129
130 phys = __pa(virt); 130 phys = __pa(virt);
131 desc = find_phys_mapping(virt); 131 desc = find_phys_mapping(virt);
132 if(desc != NULL) 132 if(desc != NULL)
133 panic("Address 0x%p is already substituted\n", virt); 133 panic("Address 0x%p is already substituted\n", virt);
134 134
135 err = -ENOMEM; 135 err = -ENOMEM;
@@ -155,7 +155,7 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
155 rb_erase(&desc->rb, &phys_mappings); 155 rb_erase(&desc->rb, &phys_mappings);
156 kfree(desc); 156 kfree(desc);
157 out: 157 out:
158 return(err); 158 return err;
159} 159}
160 160
161static int physmem_fd = -1; 161static int physmem_fd = -1;
@@ -182,10 +182,10 @@ int physmem_remove_mapping(void *virt)
182 virt = (void *) ((unsigned long) virt & PAGE_MASK); 182 virt = (void *) ((unsigned long) virt & PAGE_MASK);
183 desc = find_phys_mapping(virt); 183 desc = find_phys_mapping(virt);
184 if(desc == NULL) 184 if(desc == NULL)
185 return(0); 185 return 0;
186 186
187 remove_mapping(desc); 187 remove_mapping(desc);
188 return(1); 188 return 1;
189} 189}
190 190
191void physmem_forget_descriptor(int fd) 191void physmem_forget_descriptor(int fd)
@@ -239,9 +239,9 @@ void arch_free_page(struct page *page, int order)
239 239
240int is_remapped(void *virt) 240int is_remapped(void *virt)
241{ 241{
242 struct phys_desc *desc = find_phys_mapping(virt); 242 struct phys_desc *desc = find_phys_mapping(virt);
243 243
244 return(desc != NULL); 244 return desc != NULL;
245} 245}
246 246
247/* Changed during early boot */ 247/* Changed during early boot */
@@ -276,7 +276,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
276 else map = alloc_bootmem_low_pages(total_len); 276 else map = alloc_bootmem_low_pages(total_len);
277 277
278 if(map == NULL) 278 if(map == NULL)
279 return(-ENOMEM); 279 return -ENOMEM;
280 280
281 for(i = 0; i < total_pages; i++){ 281 for(i = 0; i < total_pages; i++){
282 p = &map[i]; 282 p = &map[i];
@@ -286,7 +286,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
286 } 286 }
287 287
288 max_mapnr = total_pages; 288 max_mapnr = total_pages;
289 return(0); 289 return 0;
290} 290}
291 291
292/* Changed during early boot */ 292/* Changed during early boot */
@@ -296,7 +296,7 @@ unsigned long get_kmem_end(void)
296{ 296{
297 if(kmem_top == 0) 297 if(kmem_top == 0)
298 kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas); 298 kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas);
299 return(kmem_top); 299 return kmem_top;
300} 300}
301 301
302void map_memory(unsigned long virt, unsigned long phys, unsigned long len, 302void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
@@ -379,7 +379,7 @@ int phys_mapping(unsigned long phys, __u64 *offset_out)
379 *offset_out = phys - iomem_size; 379 *offset_out = phys - iomem_size;
380 } 380 }
381 381
382 return(fd); 382 return fd;
383} 383}
384 384
385static int __init uml_mem_setup(char *line, int *add) 385static int __init uml_mem_setup(char *line, int *add)
@@ -398,6 +398,23 @@ __uml_setup("mem=", uml_mem_setup,
398" Example: mem=64M\n\n" 398" Example: mem=64M\n\n"
399); 399);
400 400
401extern int __init parse_iomem(char *str, int *add);
402
403__uml_setup("iomem=", parse_iomem,
404"iomem=<name>,<file>\n"
405" Configure <file> as an IO memory region named <name>.\n\n"
406);
407
408/*
409 * This list is constructed in parse_iomem and addresses filled in in
410 * setup_iomem, both of which run during early boot. Afterwards, it's
411 * unchanged.
412 */
413struct iomem_region *iomem_regions = NULL;
414
415/* Initialized in parse_iomem */
416int iomem_size = 0;
417
401unsigned long find_iomem(char *driver, unsigned long *len_out) 418unsigned long find_iomem(char *driver, unsigned long *len_out)
402{ 419{
403 struct iomem_region *region = iomem_regions; 420 struct iomem_region *region = iomem_regions;
@@ -405,13 +422,13 @@ unsigned long find_iomem(char *driver, unsigned long *len_out)
405 while(region != NULL){ 422 while(region != NULL){
406 if(!strcmp(region->driver, driver)){ 423 if(!strcmp(region->driver, driver)){
407 *len_out = region->size; 424 *len_out = region->size;
408 return(region->virt); 425 return region->virt;
409 } 426 }
410 427
411 region = region->next; 428 region = region->next;
412 } 429 }
413 430
414 return(0); 431 return 0;
415} 432}
416 433
417int setup_iomem(void) 434int setup_iomem(void)
@@ -435,18 +452,7 @@ int setup_iomem(void)
435 region = region->next; 452 region = region->next;
436 } 453 }
437 454
438 return(0); 455 return 0;
439} 456}
440 457
441__initcall(setup_iomem); 458__initcall(setup_iomem);
442
443/*
444 * Overrides for Emacs so that we follow Linus's tabbing style.
445 * Emacs will notice this stuff at the end of the file and automatically
446 * adjust the settings for this buffer only. This must remain at the end
447 * of the file.
448 * ---------------------------------------------------------------------------
449 * Local variables:
450 * c-file-style: "linux"
451 * End:
452 */
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 9a77fb3c269d..627742d89434 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -18,6 +18,7 @@
18#include "kern_util.h" 18#include "kern_util.h"
19#include "skas_ptrace.h" 19#include "skas_ptrace.h"
20#include "sysdep/ptrace.h" 20#include "sysdep/ptrace.h"
21#include "os.h"
21 22
22static inline void set_singlestepping(struct task_struct *child, int on) 23static inline void set_singlestepping(struct task_struct *child, int on)
23{ 24{
@@ -241,6 +242,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
241 break; 242 break;
242 } 243 }
243#endif 244#endif
245#ifdef PTRACE_ARCH_PRCTL
246 case PTRACE_ARCH_PRCTL:
247 /* XXX Calls ptrace on the host - needs some SMP thinking */
248 ret = arch_prctl_skas(child, data, (void *) addr);
249 break;
250#endif
244 default: 251 default:
245 ret = ptrace_request(child, request, addr, data); 252 ret = ptrace_request(child, request, addr, data);
246 break; 253 break;
diff --git a/arch/um/kernel/resource.c b/arch/um/kernel/resource.c
deleted file mode 100644
index 32188e12e8af..000000000000
--- a/arch/um/kernel/resource.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#include "linux/pci.h"
7
8unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
9 unsigned long start, unsigned long size)
10{
11 return start;
12}
13
14/*
15 * Overrides for Emacs so that we follow Linus's tabbing style.
16 * Emacs will notice this stuff at the end of the file and automatically
17 * adjust the settings for this buffer only. This must remain at the end
18 * of the file.
19 * ---------------------------------------------------------------------------
20 * Local variables:
21 * c-file-style: "linux"
22 * End:
23 */
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c
index 2b0ab438301c..89f9866a1354 100644
--- a/arch/um/kernel/sigio.c
+++ b/arch/um/kernel/sigio.c
@@ -23,7 +23,7 @@ static irqreturn_t sigio_interrupt(int irq, void *data)
23 23
24 os_read_file(sigio_irq_fd, &c, sizeof(c)); 24 os_read_file(sigio_irq_fd, &c, sizeof(c));
25 reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); 25 reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
26 return(IRQ_HANDLED); 26 return IRQ_HANDLED;
27} 27}
28 28
29int write_sigio_irq(int fd) 29int write_sigio_irq(int fd)
@@ -36,12 +36,13 @@ int write_sigio_irq(int fd)
36 if(err){ 36 if(err){
37 printk("write_sigio_irq : um_request_irq failed, err = %d\n", 37 printk("write_sigio_irq : um_request_irq failed, err = %d\n",
38 err); 38 err);
39 return(-1); 39 return -1;
40 } 40 }
41 sigio_irq_fd = fd; 41 sigio_irq_fd = fd;
42 return(0); 42 return 0;
43} 43}
44 44
45/* These are called from os-Linux/sigio.c to protect its pollfds arrays. */
45static DEFINE_SPINLOCK(sigio_spinlock); 46static DEFINE_SPINLOCK(sigio_spinlock);
46 47
47void sigio_lock(void) 48void sigio_lock(void)
diff --git a/arch/um/kernel/skas/mem.c b/arch/um/kernel/skas/mem.c
index 0d2cce621134..7c18dfcd7d8e 100644
--- a/arch/um/kernel/skas/mem.c
+++ b/arch/um/kernel/skas/mem.c
@@ -14,13 +14,9 @@ unsigned long set_task_sizes_skas(unsigned long *task_size_out)
14 unsigned long host_task_size = ROUND_4M((unsigned long) 14 unsigned long host_task_size = ROUND_4M((unsigned long)
15 &host_task_size); 15 &host_task_size);
16 16
17#ifdef CONFIG_HOST_TASK_SIZE
18 *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE);
19 *task_size_out = CONFIG_HOST_TASK_SIZE;
20#else
21 if (!skas_needs_stub) 17 if (!skas_needs_stub)
22 *task_size_out = host_task_size; 18 *task_size_out = host_task_size;
23 else *task_size_out = CONFIG_STUB_START & PGDIR_MASK; 19 else *task_size_out = CONFIG_STUB_START & PGDIR_MASK;
24#endif 20
25 return host_task_size; 21 return host_task_size;
26} 22}
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index f5ed8624648b..2828c5283227 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -149,22 +149,6 @@ long sys_olduname(struct oldold_utsname __user * name)
149 return error; 149 return error;
150} 150}
151 151
152DEFINE_SPINLOCK(syscall_lock);
153
154static int syscall_index = 0;
155
156int next_syscall_index(int limit)
157{
158 int ret;
159
160 spin_lock(&syscall_lock);
161 ret = syscall_index;
162 if(++syscall_index == limit)
163 syscall_index = 0;
164 spin_unlock(&syscall_lock);
165 return(ret);
166}
167
168int kernel_execve(const char *filename, char *const argv[], char *const envp[]) 152int kernel_execve(const char *filename, char *const argv[], char *const envp[])
169{ 153{
170 mm_segment_t fs; 154 mm_segment_t fs;
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
index 239c98054dec..f9e02b31a97a 100644
--- a/arch/um/kernel/sysrq.c
+++ b/arch/um/kernel/sysrq.c
@@ -50,7 +50,7 @@ void dump_stack(void)
50EXPORT_SYMBOL(dump_stack); 50EXPORT_SYMBOL(dump_stack);
51 51
52/*Stolen from arch/i386/kernel/traps.c */ 52/*Stolen from arch/i386/kernel/traps.c */
53static int kstack_depth_to_print = 24; 53static const int kstack_depth_to_print = 24;
54 54
55/* This recently started being used in arch-independent code too, as in 55/* This recently started being used in arch-independent code too, as in
56 * kernel/sched.c.*/ 56 * kernel/sched.c.*/
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 2e354b3ca060..b1f8b0752419 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -35,31 +35,31 @@ unsigned long long sched_clock(void)
35 return (unsigned long long)jiffies_64 * (1000000000 / HZ); 35 return (unsigned long long)jiffies_64 * (1000000000 / HZ);
36} 36}
37 37
38static unsigned long long prev_nsecs; 38static unsigned long long prev_nsecs[NR_CPUS];
39#ifdef CONFIG_UML_REAL_TIME_CLOCK 39#ifdef CONFIG_UML_REAL_TIME_CLOCK
40static long long delta; /* Deviation per interval */ 40static long long delta[NR_CPUS]; /* Deviation per interval */
41#endif 41#endif
42 42
43void timer_irq(union uml_pt_regs *regs) 43void timer_irq(union uml_pt_regs *regs)
44{ 44{
45 unsigned long long ticks = 0; 45 unsigned long long ticks = 0;
46
47#ifdef CONFIG_UML_REAL_TIME_CLOCK 46#ifdef CONFIG_UML_REAL_TIME_CLOCK
48 if(prev_nsecs){ 47 int c = cpu();
48 if(prev_nsecs[c]){
49 /* We've had 1 tick */ 49 /* We've had 1 tick */
50 unsigned long long nsecs = os_nsecs(); 50 unsigned long long nsecs = os_nsecs();
51 51
52 delta += nsecs - prev_nsecs; 52 delta[c] += nsecs - prev_nsecs[c];
53 prev_nsecs = nsecs; 53 prev_nsecs[c] = nsecs;
54 54
55 /* Protect against the host clock being set backwards */ 55 /* Protect against the host clock being set backwards */
56 if(delta < 0) 56 if(delta[c] < 0)
57 delta = 0; 57 delta[c] = 0;
58 58
59 ticks += (delta * HZ) / BILLION; 59 ticks += (delta[c] * HZ) / BILLION;
60 delta -= (ticks * BILLION) / HZ; 60 delta[c] -= (ticks * BILLION) / HZ;
61 } 61 }
62 else prev_nsecs = os_nsecs(); 62 else prev_nsecs[c] = os_nsecs();
63#else 63#else
64 ticks = 1; 64 ticks = 1;
65#endif 65#endif
@@ -69,8 +69,8 @@ void timer_irq(union uml_pt_regs *regs)
69 } 69 }
70} 70}
71 71
72/* Protects local_offset */
72static DEFINE_SPINLOCK(timer_spinlock); 73static DEFINE_SPINLOCK(timer_spinlock);
73
74static unsigned long long local_offset = 0; 74static unsigned long long local_offset = 0;
75 75
76static inline unsigned long long get_time(void) 76static inline unsigned long long get_time(void)
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index b5f124a2f6ae..26f15c458574 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -128,7 +128,18 @@ out_of_memory:
128 goto out; 128 goto out;
129} 129}
130 130
131void segv_handler(int sig, union uml_pt_regs *regs) 131static void bad_segv(struct faultinfo fi, unsigned long ip)
132{
133 struct siginfo si;
134
135 si.si_signo = SIGSEGV;
136 si.si_code = SEGV_ACCERR;
137 si.si_addr = (void __user *) FAULT_ADDRESS(fi);
138 current->thread.arch.faultinfo = fi;
139 force_sig_info(SIGSEGV, &si, current);
140}
141
142static void segv_handler(int sig, union uml_pt_regs *regs)
132{ 143{
133 struct faultinfo * fi = UPT_FAULTINFO(regs); 144 struct faultinfo * fi = UPT_FAULTINFO(regs);
134 145
@@ -205,17 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
205 return(0); 216 return(0);
206} 217}
207 218
208void bad_segv(struct faultinfo fi, unsigned long ip)
209{
210 struct siginfo si;
211
212 si.si_signo = SIGSEGV;
213 si.si_code = SEGV_ACCERR;
214 si.si_addr = (void __user *) FAULT_ADDRESS(fi);
215 current->thread.arch.faultinfo = fi;
216 force_sig_info(SIGSEGV, &si, current);
217}
218
219void relay_signal(int sig, union uml_pt_regs *regs) 219void relay_signal(int sig, union uml_pt_regs *regs)
220{ 220{
221 if(arch_handle_signal(sig, regs)) 221 if(arch_handle_signal(sig, regs))
@@ -232,14 +232,14 @@ void relay_signal(int sig, union uml_pt_regs *regs)
232 force_sig(sig, current); 232 force_sig(sig, current);
233} 233}
234 234
235void bus_handler(int sig, union uml_pt_regs *regs) 235static void bus_handler(int sig, union uml_pt_regs *regs)
236{ 236{
237 if(current->thread.fault_catcher != NULL) 237 if(current->thread.fault_catcher != NULL)
238 do_longjmp(current->thread.fault_catcher, 1); 238 do_longjmp(current->thread.fault_catcher, 1);
239 else relay_signal(sig, regs); 239 else relay_signal(sig, regs);
240} 240}
241 241
242void winch(int sig, union uml_pt_regs *regs) 242static void winch(int sig, union uml_pt_regs *regs)
243{ 243{
244 do_IRQ(WINCH_IRQ, regs); 244 do_IRQ(WINCH_IRQ, regs);
245} 245}
diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c
index 786e4edd86c5..8eba8f7dca68 100644
--- a/arch/um/kernel/tt/gdb.c
+++ b/arch/um/kernel/tt/gdb.c
@@ -139,7 +139,7 @@ static void config_gdb_cb(void *arg)
139 init_proxy(debugger_pid, 0, 0); 139 init_proxy(debugger_pid, 0, 0);
140} 140}
141 141
142int gdb_config(char *str) 142int gdb_config(char *str, char **error_out)
143{ 143{
144 struct gdb_data data; 144 struct gdb_data data;
145 145
@@ -154,7 +154,7 @@ void remove_gdb_cb(void *unused)
154 exit_debugger_cb(NULL); 154 exit_debugger_cb(NULL);
155} 155}
156 156
157int gdb_remove(int unused) 157int gdb_remove(int unused, char **error_out)
158{ 158{
159 initial_thread_cb(remove_gdb_cb, NULL); 159 initial_thread_cb(remove_gdb_cb, NULL);
160 return 0; 160 return 0;
diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c
index 68e1bf63cd0a..03b06bc00771 100644
--- a/arch/um/kernel/tt/gdb_kern.c
+++ b/arch/um/kernel/tt/gdb_kern.c
@@ -8,10 +8,11 @@
8 8
9#ifdef CONFIG_MCONSOLE 9#ifdef CONFIG_MCONSOLE
10 10
11extern int gdb_config(char *str); 11extern int gdb_config(char *str, char **error_out);
12extern int gdb_remove(int n); 12extern int gdb_remove(int n, char **error_out);
13 13
14static struct mc_device gdb_mc = { 14static struct mc_device gdb_mc = {
15 .list = INIT_LIST_HEAD(gdb_mc.list),
15 .name = "gdb", 16 .name = "gdb",
16 .config = gdb_config, 17 .config = gdb_config,
17 .remove = gdb_remove, 18 .remove = gdb_remove,
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 66f43c906821..89c6dba731f8 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -30,7 +30,6 @@
30#include "kern.h" 30#include "kern.h"
31#include "mem_user.h" 31#include "mem_user.h"
32#include "mem.h" 32#include "mem.h"
33#include "umid.h"
34#include "initrd.h" 33#include "initrd.h"
35#include "init.h" 34#include "init.h"
36#include "os.h" 35#include "os.h"
@@ -44,9 +43,9 @@
44#define DEFAULT_COMMAND_LINE "root=98:0" 43#define DEFAULT_COMMAND_LINE "root=98:0"
45 44
46/* Changed in linux_main and setup_arch, which run before SMP is started */ 45/* Changed in linux_main and setup_arch, which run before SMP is started */
47static char command_line[COMMAND_LINE_SIZE] = { 0 }; 46static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
48 47
49static void add_arg(char *arg) 48static void __init add_arg(char *arg)
50{ 49{
51 if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) { 50 if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) {
52 printf("add_arg: Too many command line arguments!\n"); 51 printf("add_arg: Too many command line arguments!\n");
@@ -331,7 +330,7 @@ EXPORT_SYMBOL(end_iomem);
331 330
332extern char __binary_start; 331extern char __binary_start;
333 332
334int linux_main(int argc, char **argv) 333int __init linux_main(int argc, char **argv)
335{ 334{
336 unsigned long avail, diff; 335 unsigned long avail, diff;
337 unsigned long virtmem_size, max_physmem; 336 unsigned long virtmem_size, max_physmem;
@@ -482,7 +481,7 @@ void __init setup_arch(char **cmdline_p)
482 atomic_notifier_chain_register(&panic_notifier_list, 481 atomic_notifier_chain_register(&panic_notifier_list,
483 &panic_exit_notifier); 482 &panic_exit_notifier);
484 paging_init(); 483 paging_init();
485 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 484 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
486 *cmdline_p = command_line; 485 *cmdline_p = command_line;
487 setup_hostinfo(); 486 setup_hostinfo();
488} 487}
diff --git a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c
index 4eaee823bfd2..039e16efcd55 100644
--- a/arch/um/kernel/umid.c
+++ b/arch/um/kernel/umid.c
@@ -16,8 +16,10 @@ static int __init set_umid_arg(char *name, int *add)
16{ 16{
17 int err; 17 int err;
18 18
19 if(umid_inited) 19 if(umid_inited){
20 printf("umid already set\n");
20 return 0; 21 return 0;
22 }
21 23
22 *add = 0; 24 *add = 0;
23 err = set_umid(name); 25 err = set_umid(name);
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index f897140cc4ae..6ff12743a0bd 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -24,9 +24,6 @@ struct aio_thread_req {
24 struct aio_context *aio; 24 struct aio_context *aio;
25}; 25};
26 26
27static int aio_req_fd_r = -1;
28static int aio_req_fd_w = -1;
29
30#if defined(HAVE_AIO_ABI) 27#if defined(HAVE_AIO_ABI)
31#include <linux/aio_abi.h> 28#include <linux/aio_abi.h>
32 29
@@ -111,6 +108,7 @@ static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf,
111 return err; 108 return err;
112} 109}
113 110
111/* Initialized in an initcall and unchanged thereafter */
114static aio_context_t ctx = 0; 112static aio_context_t ctx = 0;
115 113
116static int aio_thread(void *arg) 114static int aio_thread(void *arg)
@@ -137,7 +135,7 @@ static int aio_thread(void *arg)
137 err = os_write_file(reply_fd, &reply, sizeof(reply)); 135 err = os_write_file(reply_fd, &reply, sizeof(reply));
138 if(err != sizeof(reply)) 136 if(err != sizeof(reply))
139 printk("aio_thread - write failed, fd = %d, " 137 printk("aio_thread - write failed, fd = %d, "
140 "err = %d\n", aio_req_fd_r, -err); 138 "err = %d\n", reply_fd, -err);
141 } 139 }
142 } 140 }
143 return 0; 141 return 0;
@@ -182,6 +180,11 @@ out:
182 return err; 180 return err;
183} 181}
184 182
183/* These are initialized in initcalls and not changed */
184static int aio_req_fd_r = -1;
185static int aio_req_fd_w = -1;
186static int aio_pid = -1;
187
185static int not_aio_thread(void *arg) 188static int not_aio_thread(void *arg)
186{ 189{
187 struct aio_thread_req req; 190 struct aio_thread_req req;
@@ -208,14 +211,12 @@ static int not_aio_thread(void *arg)
208 err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply)); 211 err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply));
209 if(err != sizeof(reply)) 212 if(err != sizeof(reply))
210 printk("not_aio_thread - write failed, fd = %d, " 213 printk("not_aio_thread - write failed, fd = %d, "
211 "err = %d\n", aio_req_fd_r, -err); 214 "err = %d\n", req.aio->reply_fd, -err);
212 } 215 }
213 216
214 return 0; 217 return 0;
215} 218}
216 219
217static int aio_pid = -1;
218
219static int init_aio_24(void) 220static int init_aio_24(void)
220{ 221{
221 unsigned long stack; 222 unsigned long stack;
@@ -308,6 +309,7 @@ static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
308} 309}
309#endif 310#endif
310 311
312/* Initialized in an initcall and unchanged thereafter */
311static int aio_24 = DEFAULT_24_AIO; 313static int aio_24 = DEFAULT_24_AIO;
312 314
313static int __init set_aio_24(char *name, int *add) 315static int __init set_aio_24(char *name, int *add)
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index 5a99dd3fbed0..3a8d7e3aae0a 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -21,12 +21,11 @@ typedef Elf32_auxv_t elf_auxv_t;
21typedef Elf64_auxv_t elf_auxv_t; 21typedef Elf64_auxv_t elf_auxv_t;
22#endif 22#endif
23 23
24/* These are initialized very early in boot and never changed */
24char * elf_aux_platform; 25char * elf_aux_platform;
25long elf_aux_hwcap; 26long elf_aux_hwcap;
26
27unsigned long vsyscall_ehdr; 27unsigned long vsyscall_ehdr;
28unsigned long vsyscall_end; 28unsigned long vsyscall_end;
29
30unsigned long __kernel_vsyscall; 29unsigned long __kernel_vsyscall;
31 30
32__init void scan_elf_aux( char **envp) 31__init void scan_elf_aux( char **envp)
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index 189fa677085a..371b4335f46d 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -162,25 +162,6 @@ int os_set_owner(int fd, int pid)
162 return 0; 162 return 0;
163} 163}
164 164
165/* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */
166int os_sigio_async(int master, int slave)
167{
168 int flags;
169
170 flags = fcntl(master, F_GETFL);
171 if(flags < 0)
172 return -errno;
173
174 if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
175 (fcntl(master, F_SETOWN, os_getpid()) < 0))
176 return -errno;
177
178 if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
179 return -errno;
180
181 return(0);
182}
183
184int os_mode_fd(int fd, int mode) 165int os_mode_fd(int fd, int mode)
185{ 166{
186 int err; 167 int err;
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c
index d46b818c1311..d1b61d474e0a 100644
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -20,6 +20,10 @@
20#include "os.h" 20#include "os.h"
21#include "um_malloc.h" 21#include "um_malloc.h"
22 22
23/*
24 * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd
25 * and os_free_irq_by_cb, which are called under irq_lock.
26 */
23static struct pollfd *pollfds = NULL; 27static struct pollfd *pollfds = NULL;
24static int pollfds_num = 0; 28static int pollfds_num = 0;
25static int pollfds_size = 0; 29static int pollfds_size = 0;
@@ -58,7 +62,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds)
58 if (pollfds_num == pollfds_size) { 62 if (pollfds_num == pollfds_size) {
59 if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) { 63 if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) {
60 /* return min size needed for new pollfds area */ 64 /* return min size needed for new pollfds area */
61 return((pollfds_size + 1) * sizeof(pollfds[0])); 65 return (pollfds_size + 1) * sizeof(pollfds[0]);
62 } 66 }
63 67
64 if (pollfds != NULL) { 68 if (pollfds != NULL) {
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
index 4203681e508d..f1ea169db85e 100644
--- a/arch/um/os-Linux/mem.c
+++ b/arch/um/os-Linux/mem.c
@@ -20,7 +20,13 @@
20 20
21#include <sys/param.h> 21#include <sys/param.h>
22 22
23/* Modified by which_tmpdir, which is called during early boot */
23static char *default_tmpdir = "/tmp"; 24static char *default_tmpdir = "/tmp";
25
26/*
27 * Modified when creating the physical memory file and when checking
28 * the tmp filesystem for usability, both happening during early boot.
29 */
24static char *tempdir = NULL; 30static char *tempdir = NULL;
25 31
26static void __init find_tempdir(void) 32static void __init find_tempdir(void)
@@ -29,7 +35,8 @@ static void __init find_tempdir(void)
29 int i; 35 int i;
30 char *dir = NULL; 36 char *dir = NULL;
31 37
32 if(tempdir != NULL) return; /* We've already been called */ 38 if(tempdir != NULL) /* We've already been called */
39 return;
33 for(i = 0; dirs[i]; i++){ 40 for(i = 0; dirs[i]; i++){
34 dir = getenv(dirs[i]); 41 dir = getenv(dirs[i]);
35 if((dir != NULL) && (*dir != '\0')) 42 if((dir != NULL) && (*dir != '\0'))
@@ -83,6 +90,7 @@ static int next(int fd, char *buf, int size, char c)
83 return 1; 90 return 1;
84} 91}
85 92
93/* which_tmpdir is called only during early boot */
86static int checked_tmpdir = 0; 94static int checked_tmpdir = 0;
87 95
88/* Look for a tmpfs mounted at /dev/shm. I couldn't find a cleaner 96/* Look for a tmpfs mounted at /dev/shm. I couldn't find a cleaner
@@ -186,7 +194,7 @@ int make_tempfile(const char *template, char **out_tempname, int do_unlink)
186 } else { 194 } else {
187 free(tempname); 195 free(tempname);
188 } 196 }
189 return(fd); 197 return fd;
190out: 198out:
191 free(tempname); 199 free(tempname);
192 return -1; 200 return -1;
@@ -231,7 +239,7 @@ int create_tmp_file(unsigned long long len)
231 exit(1); 239 exit(1);
232 } 240 }
233 241
234 return(fd); 242 return fd;
235} 243}
236 244
237int create_mem_file(unsigned long long len) 245int create_mem_file(unsigned long long len)
@@ -245,7 +253,7 @@ int create_mem_file(unsigned long long len)
245 errno = -err; 253 errno = -err;
246 perror("exec_close"); 254 perror("exec_close");
247 } 255 }
248 return(fd); 256 return fd;
249} 257}
250 258
251 259
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 925a65240cfe..b2e1fd8e3571 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -97,20 +97,22 @@ static int write_sigio_thread(void *unused)
97 97
98static int need_poll(struct pollfds *polls, int n) 98static int need_poll(struct pollfds *polls, int n)
99{ 99{
100 if(n <= polls->size){ 100 struct pollfd *new;
101 polls->used = n; 101
102 if(n <= polls->size)
102 return 0; 103 return 0;
103 } 104
104 kfree(polls->poll); 105 new = um_kmalloc_atomic(n * sizeof(struct pollfd));
105 polls->poll = um_kmalloc_atomic(n * sizeof(struct pollfd)); 106 if(new == NULL){
106 if(polls->poll == NULL){
107 printk("need_poll : failed to allocate new pollfds\n"); 107 printk("need_poll : failed to allocate new pollfds\n");
108 polls->size = 0;
109 polls->used = 0;
110 return -ENOMEM; 108 return -ENOMEM;
111 } 109 }
110
111 memcpy(new, polls->poll, polls->used * sizeof(struct pollfd));
112 kfree(polls->poll);
113
114 polls->poll = new;
112 polls->size = n; 115 polls->size = n;
113 polls->used = n;
114 return 0; 116 return 0;
115} 117}
116 118
@@ -171,15 +173,15 @@ int add_sigio_fd(int fd)
171 goto out; 173 goto out;
172 } 174 }
173 175
174 n = current_poll.used + 1; 176 n = current_poll.used;
175 err = need_poll(&next_poll, n); 177 err = need_poll(&next_poll, n + 1);
176 if(err) 178 if(err)
177 goto out; 179 goto out;
178 180
179 for(i = 0; i < current_poll.used; i++) 181 memcpy(next_poll.poll, current_poll.poll,
180 next_poll.poll[i] = current_poll.poll[i]; 182 current_poll.used * sizeof(struct pollfd));
181 183 next_poll.poll[n] = *p;
182 next_poll.poll[n - 1] = *p; 184 next_poll.used = n + 1;
183 update_thread(); 185 update_thread();
184 out: 186 out:
185 sigio_unlock(); 187 sigio_unlock();
@@ -214,6 +216,7 @@ int ignore_sigio_fd(int fd)
214 if(p->fd != fd) 216 if(p->fd != fd)
215 next_poll.poll[n++] = *p; 217 next_poll.poll[n++] = *p;
216 } 218 }
219 next_poll.used = current_poll.used - 1;
217 220
218 update_thread(); 221 update_thread();
219 out: 222 out:
@@ -331,10 +334,9 @@ void maybe_sigio_broken(int fd, int read)
331 334
332 sigio_lock(); 335 sigio_lock();
333 err = need_poll(&all_sigio_fds, all_sigio_fds.used + 1); 336 err = need_poll(&all_sigio_fds, all_sigio_fds.used + 1);
334 if(err){ 337 if(err)
335 printk("maybe_sigio_broken - failed to add pollfd\n");
336 goto out; 338 goto out;
337 } 339
338 all_sigio_fds.poll[all_sigio_fds.used++] = 340 all_sigio_fds.poll[all_sigio_fds.used++] =
339 ((struct pollfd) { .fd = fd, 341 ((struct pollfd) { .fd = fd,
340 .events = read ? POLLIN : POLLOUT, 342 .events = read ? POLLIN : POLLOUT,
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 7fe92680c7dd..5178eba9afa5 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -54,7 +54,7 @@ static int ptrace_child(void *arg)
54 perror("ptrace"); 54 perror("ptrace");
55 os_kill_process(pid, 0); 55 os_kill_process(pid, 0);
56 } 56 }
57 os_stop_process(pid); 57 kill(pid, SIGSTOP);
58 58
59 /*This syscall will be intercepted by the parent. Don't call more than 59 /*This syscall will be intercepted by the parent. Don't call more than
60 * once, please.*/ 60 * once, please.*/
@@ -73,6 +73,34 @@ static int ptrace_child(void *arg)
73 _exit(ret); 73 _exit(ret);
74} 74}
75 75
76static void fatal_perror(char *str)
77{
78 perror(str);
79 exit(1);
80}
81
82static void fatal(char *fmt, ...)
83{
84 va_list list;
85
86 va_start(list, fmt);
87 vprintf(fmt, list);
88 va_end(list);
89 fflush(stdout);
90
91 exit(1);
92}
93
94static void non_fatal(char *fmt, ...)
95{
96 va_list list;
97
98 va_start(list, fmt);
99 vprintf(fmt, list);
100 va_end(list);
101 fflush(stdout);
102}
103
76static int start_ptraced_child(void **stack_out) 104static int start_ptraced_child(void **stack_out)
77{ 105{
78 void *stack; 106 void *stack;
@@ -82,20 +110,20 @@ static int start_ptraced_child(void **stack_out)
82 stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 110 stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
83 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 111 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
84 if(stack == MAP_FAILED) 112 if(stack == MAP_FAILED)
85 panic("check_ptrace : mmap failed, errno = %d", errno); 113 fatal_perror("check_ptrace : mmap failed");
86 sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); 114 sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
87 pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); 115 pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
88 if(pid < 0) 116 if(pid < 0)
89 panic("start_ptraced_child : clone failed, errno = %d", errno); 117 fatal_perror("start_ptraced_child : clone failed");
90 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 118 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
91 if(n < 0) 119 if(n < 0)
92 panic("check_ptrace : clone failed, errno = %d", errno); 120 fatal_perror("check_ptrace : clone failed");
93 if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) 121 if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP))
94 panic("check_ptrace : expected SIGSTOP, got status = %d", 122 fatal("check_ptrace : expected SIGSTOP, got status = %d",
95 status); 123 status);
96 124
97 *stack_out = stack; 125 *stack_out = stack;
98 return(pid); 126 return pid;
99} 127}
100 128
101/* When testing for SYSEMU support, if it is one of the broken versions, we 129/* When testing for SYSEMU support, if it is one of the broken versions, we
@@ -105,34 +133,34 @@ static int start_ptraced_child(void **stack_out)
105 * must work anyway! 133 * must work anyway!
106 */ 134 */
107static int stop_ptraced_child(int pid, void *stack, int exitcode, 135static int stop_ptraced_child(int pid, void *stack, int exitcode,
108 int mustpanic) 136 int mustexit)
109{ 137{
110 int status, n, ret = 0; 138 int status, n, ret = 0;
111 139
112 if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) 140 if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
113 panic("check_ptrace : ptrace failed, errno = %d", errno); 141 fatal_perror("stop_ptraced_child : ptrace failed");
114 CATCH_EINTR(n = waitpid(pid, &status, 0)); 142 CATCH_EINTR(n = waitpid(pid, &status, 0));
115 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 143 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
116 int exit_with = WEXITSTATUS(status); 144 int exit_with = WEXITSTATUS(status);
117 if (exit_with == 2) 145 if (exit_with == 2)
118 printf("check_ptrace : child exited with status 2. " 146 non_fatal("check_ptrace : child exited with status 2. "
119 "Serious trouble happening! Try updating your " 147 "Serious trouble happening! Try updating "
120 "host skas patch!\nDisabling SYSEMU support."); 148 "your host skas patch!\nDisabling SYSEMU "
121 printf("check_ptrace : child exited with exitcode %d, while " 149 "support.");
122 "expecting %d; status 0x%x", exit_with, 150 non_fatal("check_ptrace : child exited with exitcode %d, while "
123 exitcode, status); 151 "expecting %d; status 0x%x\n", exit_with,
124 if (mustpanic) 152 exitcode, status);
125 panic("\n"); 153 if (mustexit)
126 else 154 exit(1);
127 printf("\n");
128 ret = -1; 155 ret = -1;
129 } 156 }
130 157
131 if(munmap(stack, PAGE_SIZE) < 0) 158 if(munmap(stack, PAGE_SIZE) < 0)
132 panic("check_ptrace : munmap failed, errno = %d", errno); 159 fatal_perror("check_ptrace : munmap failed");
133 return ret; 160 return ret;
134} 161}
135 162
163/* Changed only during early boot */
136int ptrace_faultinfo = 1; 164int ptrace_faultinfo = 1;
137int ptrace_ldt = 1; 165int ptrace_ldt = 1;
138int proc_mm = 1; 166int proc_mm = 1;
@@ -160,6 +188,7 @@ __uml_setup("mode=skas0", mode_skas0_cmd_param,
160 " specify mode=tt. Note that this was recently added - on \n" 188 " specify mode=tt. Note that this was recently added - on \n"
161 " older kernels you must use simply \"skas0\".\n\n"); 189 " older kernels you must use simply \"skas0\".\n\n");
162 190
191/* Changed only during early boot */
163static int force_sysemu_disabled = 0; 192static int force_sysemu_disabled = 0;
164 193
165static int __init nosysemu_cmd_param(char *str, int* add) 194static int __init nosysemu_cmd_param(char *str, int* add)
@@ -180,9 +209,9 @@ __uml_setup("nosysemu", nosysemu_cmd_param,
180static void __init check_sysemu(void) 209static void __init check_sysemu(void)
181{ 210{
182 void *stack; 211 void *stack;
183 int pid, n, status, count=0; 212 int pid, n, status, count=0;
184 213
185 printf("Checking syscall emulation patch for ptrace..."); 214 non_fatal("Checking syscall emulation patch for ptrace...");
186 sysemu_supported = 0; 215 sysemu_supported = 0;
187 pid = start_ptraced_child(&stack); 216 pid = start_ptraced_child(&stack);
188 217
@@ -191,31 +220,30 @@ static void __init check_sysemu(void)
191 220
192 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 221 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
193 if (n < 0) 222 if (n < 0)
194 panic("check_sysemu : wait failed, errno = %d", errno); 223 fatal_perror("check_sysemu : wait failed");
195 if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) 224 if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
196 panic("check_sysemu : expected SIGTRAP, " 225 fatal("check_sysemu : expected SIGTRAP, got status = %d",
197 "got status = %d", status); 226 status);
198 227
199 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, 228 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
200 os_getpid()); 229 os_getpid());
201 if(n < 0) 230 if(n < 0)
202 panic("check_sysemu : failed to modify system " 231 fatal_perror("check_sysemu : failed to modify system call "
203 "call return, errno = %d", errno); 232 "return");
204 233
205 if (stop_ptraced_child(pid, stack, 0, 0) < 0) 234 if (stop_ptraced_child(pid, stack, 0, 0) < 0)
206 goto fail_stopped; 235 goto fail_stopped;
207 236
208 sysemu_supported = 1; 237 sysemu_supported = 1;
209 printf("OK\n"); 238 non_fatal("OK\n");
210 set_using_sysemu(!force_sysemu_disabled); 239 set_using_sysemu(!force_sysemu_disabled);
211 240
212 printf("Checking advanced syscall emulation patch for ptrace..."); 241 non_fatal("Checking advanced syscall emulation patch for ptrace...");
213 pid = start_ptraced_child(&stack); 242 pid = start_ptraced_child(&stack);
214 243
215 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, 244 if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
216 (void *) PTRACE_O_TRACESYSGOOD) < 0) 245 (void *) PTRACE_O_TRACESYSGOOD) < 0))
217 panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", 246 fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed");
218 errno);
219 247
220 while(1){ 248 while(1){
221 count++; 249 count++;
@@ -223,29 +251,30 @@ static void __init check_sysemu(void)
223 goto fail; 251 goto fail;
224 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 252 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
225 if(n < 0) 253 if(n < 0)
226 panic("check_ptrace : wait failed, errno = %d", errno); 254 fatal_perror("check_ptrace : wait failed");
255
227 if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){ 256 if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){
228 if (!count) 257 if (!count)
229 panic("check_ptrace : SYSEMU_SINGLESTEP " 258 fatal("check_ptrace : SYSEMU_SINGLESTEP "
230 "doesn't singlestep"); 259 "doesn't singlestep");
231 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, 260 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
232 os_getpid()); 261 os_getpid());
233 if(n < 0) 262 if(n < 0)
234 panic("check_sysemu : failed to modify system " 263 fatal_perror("check_sysemu : failed to modify "
235 "call return, errno = %d", errno); 264 "system call return");
236 break; 265 break;
237 } 266 }
238 else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) 267 else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP))
239 count++; 268 count++;
240 else 269 else
241 panic("check_ptrace : expected SIGTRAP or " 270 fatal("check_ptrace : expected SIGTRAP or "
242 "(SIGTRAP|0x80), got status = %d", status); 271 "(SIGTRAP | 0x80), got status = %d", status);
243 } 272 }
244 if (stop_ptraced_child(pid, stack, 0, 0) < 0) 273 if (stop_ptraced_child(pid, stack, 0, 0) < 0)
245 goto fail_stopped; 274 goto fail_stopped;
246 275
247 sysemu_supported = 2; 276 sysemu_supported = 2;
248 printf("OK\n"); 277 non_fatal("OK\n");
249 278
250 if ( !force_sysemu_disabled ) 279 if ( !force_sysemu_disabled )
251 set_using_sysemu(sysemu_supported); 280 set_using_sysemu(sysemu_supported);
@@ -254,7 +283,7 @@ static void __init check_sysemu(void)
254fail: 283fail:
255 stop_ptraced_child(pid, stack, 1, 0); 284 stop_ptraced_child(pid, stack, 1, 0);
256fail_stopped: 285fail_stopped:
257 printf("missing\n"); 286 non_fatal("missing\n");
258} 287}
259 288
260static void __init check_ptrace(void) 289static void __init check_ptrace(void)
@@ -262,22 +291,25 @@ static void __init check_ptrace(void)
262 void *stack; 291 void *stack;
263 int pid, syscall, n, status; 292 int pid, syscall, n, status;
264 293
265 printf("Checking that ptrace can change system call numbers..."); 294 non_fatal("Checking that ptrace can change system call numbers...");
266 pid = start_ptraced_child(&stack); 295 pid = start_ptraced_child(&stack);
267 296
268 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) 297 if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
269 panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", errno); 298 (void *) PTRACE_O_TRACESYSGOOD) < 0))
299 fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed");
270 300
271 while(1){ 301 while(1){
272 if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) 302 if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
273 panic("check_ptrace : ptrace failed, errno = %d", 303 fatal_perror("check_ptrace : ptrace failed");
274 errno); 304
275 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 305 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
276 if(n < 0) 306 if(n < 0)
277 panic("check_ptrace : wait failed, errno = %d", errno); 307 fatal_perror("check_ptrace : wait failed");
278 if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|0x80))) 308
279 panic("check_ptrace : expected (SIGTRAP|0x80), " 309 if(!WIFSTOPPED(status) ||
280 "got status = %d", status); 310 (WSTOPSIG(status) != (SIGTRAP | 0x80)))
311 fatal("check_ptrace : expected (SIGTRAP|0x80), "
312 "got status = %d", status);
281 313
282 syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, 314 syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET,
283 0); 315 0);
@@ -285,13 +317,13 @@ static void __init check_ptrace(void)
285 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET, 317 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET,
286 __NR_getppid); 318 __NR_getppid);
287 if(n < 0) 319 if(n < 0)
288 panic("check_ptrace : failed to modify system " 320 fatal_perror("check_ptrace : failed to modify "
289 "call, errno = %d", errno); 321 "system call");
290 break; 322 break;
291 } 323 }
292 } 324 }
293 stop_ptraced_child(pid, stack, 0, 1); 325 stop_ptraced_child(pid, stack, 0, 1);
294 printf("OK\n"); 326 non_fatal("OK\n");
295 check_sysemu(); 327 check_sysemu();
296} 328}
297 329
@@ -350,22 +382,22 @@ static inline void check_skas3_ptrace_faultinfo(void)
350 void *stack; 382 void *stack;
351 int pid, n; 383 int pid, n;
352 384
353 printf(" - PTRACE_FAULTINFO..."); 385 non_fatal(" - PTRACE_FAULTINFO...");
354 pid = start_ptraced_child(&stack); 386 pid = start_ptraced_child(&stack);
355 387
356 n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); 388 n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
357 if (n < 0) { 389 if (n < 0) {
358 ptrace_faultinfo = 0; 390 ptrace_faultinfo = 0;
359 if(errno == EIO) 391 if(errno == EIO)
360 printf("not found\n"); 392 non_fatal("not found\n");
361 else 393 else
362 perror("not found"); 394 perror("not found");
363 } 395 }
364 else { 396 else {
365 if (!ptrace_faultinfo) 397 if (!ptrace_faultinfo)
366 printf("found but disabled on command line\n"); 398 non_fatal("found but disabled on command line\n");
367 else 399 else
368 printf("found\n"); 400 non_fatal("found\n");
369 } 401 }
370 402
371 init_registers(pid); 403 init_registers(pid);
@@ -383,13 +415,13 @@ static inline void check_skas3_ptrace_ldt(void)
383 .ptr = ldtbuf, 415 .ptr = ldtbuf,
384 .bytecount = sizeof(ldtbuf)}; 416 .bytecount = sizeof(ldtbuf)};
385 417
386 printf(" - PTRACE_LDT..."); 418 non_fatal(" - PTRACE_LDT...");
387 pid = start_ptraced_child(&stack); 419 pid = start_ptraced_child(&stack);
388 420
389 n = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op); 421 n = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op);
390 if (n < 0) { 422 if (n < 0) {
391 if(errno == EIO) 423 if(errno == EIO)
392 printf("not found\n"); 424 non_fatal("not found\n");
393 else { 425 else {
394 perror("not found"); 426 perror("not found");
395 } 427 }
@@ -397,9 +429,9 @@ static inline void check_skas3_ptrace_ldt(void)
397 } 429 }
398 else { 430 else {
399 if(ptrace_ldt) 431 if(ptrace_ldt)
400 printf("found\n"); 432 non_fatal("found\n");
401 else 433 else
402 printf("found, but use is disabled\n"); 434 non_fatal("found, but use is disabled\n");
403 } 435 }
404 436
405 stop_ptraced_child(pid, stack, 1, 1); 437 stop_ptraced_child(pid, stack, 1, 1);
@@ -414,22 +446,22 @@ static inline void check_skas3_ptrace_ldt(void)
414 446
415static inline void check_skas3_proc_mm(void) 447static inline void check_skas3_proc_mm(void)
416{ 448{
417 printf(" - /proc/mm..."); 449 non_fatal(" - /proc/mm...");
418 if (os_access("/proc/mm", OS_ACC_W_OK) < 0) { 450 if (access("/proc/mm", W_OK) < 0) {
419 proc_mm = 0; 451 proc_mm = 0;
420 printf("not found\n"); 452 perror("not found");
421 } 453 }
422 else { 454 else {
423 if (!proc_mm) 455 if (!proc_mm)
424 printf("found but disabled on command line\n"); 456 non_fatal("found but disabled on command line\n");
425 else 457 else
426 printf("found\n"); 458 non_fatal("found\n");
427 } 459 }
428} 460}
429 461
430int can_do_skas(void) 462int can_do_skas(void)
431{ 463{
432 printf("Checking for the skas3 patch in the host:\n"); 464 non_fatal("Checking for the skas3 patch in the host:\n");
433 465
434 check_skas3_proc_mm(); 466 check_skas3_proc_mm();
435 check_skas3_ptrace_faultinfo(); 467 check_skas3_ptrace_faultinfo();
@@ -443,16 +475,16 @@ int can_do_skas(void)
443#else 475#else
444int can_do_skas(void) 476int can_do_skas(void)
445{ 477{
446 return(0); 478 return 0;
447} 479}
448#endif 480#endif
449 481
450int __init parse_iomem(char *str, int *add) 482int __init parse_iomem(char *str, int *add)
451{ 483{
452 struct iomem_region *new; 484 struct iomem_region *new;
453 struct uml_stat buf; 485 struct stat64 buf;
454 char *file, *driver; 486 char *file, *driver;
455 int fd, err, size; 487 int fd, size;
456 488
457 driver = str; 489 driver = str;
458 file = strchr(str,','); 490 file = strchr(str,',');
@@ -462,15 +494,14 @@ int __init parse_iomem(char *str, int *add)
462 } 494 }
463 *file = '\0'; 495 *file = '\0';
464 file++; 496 file++;
465 fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0); 497 fd = open(file, O_RDWR, 0);
466 if(fd < 0){ 498 if(fd < 0){
467 os_print_error(fd, "parse_iomem - Couldn't open io file"); 499 os_print_error(fd, "parse_iomem - Couldn't open io file");
468 goto out; 500 goto out;
469 } 501 }
470 502
471 err = os_stat_fd(fd, &buf); 503 if(fstat64(fd, &buf) < 0){
472 if(err < 0){ 504 perror("parse_iomem - cannot stat_fd file");
473 os_print_error(err, "parse_iomem - cannot stat_fd file");
474 goto out_close; 505 goto out_close;
475 } 506 }
476 507
@@ -480,7 +511,7 @@ int __init parse_iomem(char *str, int *add)
480 goto out_close; 511 goto out_close;
481 } 512 }
482 513
483 size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); 514 size = (buf.st_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
484 515
485 *new = ((struct iomem_region) { .next = iomem_regions, 516 *new = ((struct iomem_region) { .next = iomem_regions,
486 .driver = driver, 517 .driver = driver,
@@ -491,11 +522,11 @@ int __init parse_iomem(char *str, int *add)
491 iomem_regions = new; 522 iomem_regions = new;
492 iomem_size += new->size + UM_KERN_PAGE_SIZE; 523 iomem_size += new->size + UM_KERN_PAGE_SIZE;
493 524
494 return(0); 525 return 0;
495 out_close: 526 out_close:
496 os_close_file(fd); 527 close(fd);
497 out: 528 out:
498 return(1); 529 return 1;
499} 530}
500 531
501 532
@@ -526,6 +557,24 @@ static void openpty_cb(void *arg)
526 info->err = -errno; 557 info->err = -errno;
527} 558}
528 559
560static int async_pty(int master, int slave)
561{
562 int flags;
563
564 flags = fcntl(master, F_GETFL);
565 if(flags < 0)
566 return -errno;
567
568 if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
569 (fcntl(master, F_SETOWN, os_getpid()) < 0))
570 return -errno;
571
572 if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
573 return -errno;
574
575 return(0);
576}
577
529static void __init check_one_sigio(void (*proc)(int, int)) 578static void __init check_one_sigio(void (*proc)(int, int))
530{ 579{
531 struct sigaction old, new; 580 struct sigaction old, new;
@@ -551,7 +600,7 @@ static void __init check_one_sigio(void (*proc)(int, int))
551 if (err < 0) 600 if (err < 0)
552 panic("check_sigio : __raw failed, errno = %d\n", -err); 601 panic("check_sigio : __raw failed, errno = %d\n", -err);
553 602
554 err = os_sigio_async(master, slave); 603 err = async_pty(master, slave);
555 if(err < 0) 604 if(err < 0)
556 panic("tty_fds : sigio_async failed, err = %d\n", -err); 605 panic("tty_fds : sigio_async failed, err = %d\n", -err);
557 606
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index 7cd0369e02b3..79cd93c8c5ed 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -34,27 +34,27 @@ void init_thread_registers(union uml_pt_regs *to)
34int save_fp_registers(int pid, unsigned long *fp_regs) 34int save_fp_registers(int pid, unsigned long *fp_regs)
35{ 35{
36 if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) 36 if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
37 return(-errno); 37 return -errno;
38 return(0); 38 return 0;
39} 39}
40 40
41int restore_fp_registers(int pid, unsigned long *fp_regs) 41int restore_fp_registers(int pid, unsigned long *fp_regs)
42{ 42{
43 if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) 43 if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
44 return(-errno); 44 return -errno;
45 return(0); 45 return 0;
46} 46}
47 47
48static int move_registers(int pid, int int_op, union uml_pt_regs *regs, 48static int move_registers(int pid, int int_op, union uml_pt_regs *regs,
49 int fp_op, unsigned long *fp_regs) 49 int fp_op, unsigned long *fp_regs)
50{ 50{
51 if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) 51 if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
52 return(-errno); 52 return -errno;
53 53
54 if(ptrace(fp_op, pid, 0, fp_regs) < 0) 54 if(ptrace(fp_op, pid, 0, fp_regs) < 0)
55 return(-errno); 55 return -errno;
56 56
57 return(0); 57 return 0;
58} 58}
59 59
60void save_registers(int pid, union uml_pt_regs *regs) 60void save_registers(int pid, union uml_pt_regs *regs)
diff --git a/arch/um/os-Linux/sys-x86_64/Makefile b/arch/um/os-Linux/sys-x86_64/Makefile
index f67842a7735b..7955e061a678 100644
--- a/arch/um/os-Linux/sys-x86_64/Makefile
+++ b/arch/um/os-Linux/sys-x86_64/Makefile
@@ -3,7 +3,7 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6obj-$(CONFIG_MODE_SKAS) = registers.o signal.o 6obj-$(CONFIG_MODE_SKAS) = registers.o prctl.o signal.o
7 7
8USER_OBJS := $(obj-y) 8USER_OBJS := $(obj-y)
9 9
diff --git a/arch/um/os-Linux/sys-x86_64/prctl.c b/arch/um/os-Linux/sys-x86_64/prctl.c
new file mode 100644
index 000000000000..9d34eddb517f
--- /dev/null
+++ b/arch/um/os-Linux/sys-x86_64/prctl.c
@@ -0,0 +1,12 @@
1/*
2 * Copyright (C) 2007 Jeff Dike (jdike@{addtoit.com,linux.intel.com})
3 * Licensed under the GPL
4 */
5
6#include <sys/ptrace.h>
7#include <linux/ptrace.h>
8
9int os_arch_prctl(int pid, int code, unsigned long *addr)
10{
11 return ptrace(PTRACE_ARCH_PRCTL, pid, (unsigned long) addr, code);
12}
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c
index cb8e8a263280..a2d7e0c603f7 100644
--- a/arch/um/os-Linux/sys-x86_64/registers.c
+++ b/arch/um/os-Linux/sys-x86_64/registers.c
@@ -27,12 +27,12 @@ static int move_registers(int pid, int int_op, int fp_op,
27 union uml_pt_regs *regs) 27 union uml_pt_regs *regs)
28{ 28{
29 if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) 29 if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
30 return(-errno); 30 return -errno;
31 31
32 if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0) 32 if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0)
33 return(-errno); 33 return -errno;
34 34
35 return(0); 35 return 0;
36} 36}
37 37
38void save_registers(int pid, union uml_pt_regs *regs) 38void save_registers(int pid, union uml_pt_regs *regs)
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index 48092b95c8ab..b462863f7172 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -18,7 +18,7 @@
18#define UMID_LEN 64 18#define UMID_LEN 64
19 19
20/* Changed by set_umid, which is run early in boot */ 20/* Changed by set_umid, which is run early in boot */
21char umid[UMID_LEN] = { 0 }; 21static char umid[UMID_LEN] = { 0 };
22 22
23/* Changed by set_uml_dir and make_uml_dir, which are run early in boot */ 23/* Changed by set_uml_dir and make_uml_dir, which are run early in boot */
24static char *uml_dir = UML_DIR; 24static char *uml_dir = UML_DIR;
@@ -235,6 +235,7 @@ int __init set_umid(char *name)
235 return 0; 235 return 0;
236} 236}
237 237
238/* Changed in make_umid, which is called during early boot */
238static int umid_setup = 0; 239static int umid_setup = 0;
239 240
240int __init make_umid(void) 241int __init make_umid(void)
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c
index 147bbf05cbc2..55b66e09a98c 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86_64/ptrace.c
@@ -71,8 +71,6 @@ int poke_user(struct task_struct *child, long addr, long data)
71 71
72 if (addr < MAX_REG_OFFSET) 72 if (addr < MAX_REG_OFFSET)
73 return putreg(child, addr, data); 73 return putreg(child, addr, data);
74
75#if 0 /* Need x86_64 debugregs handling */
76 else if((addr >= offsetof(struct user, u_debugreg[0])) && 74 else if((addr >= offsetof(struct user, u_debugreg[0])) &&
77 (addr <= offsetof(struct user, u_debugreg[7]))){ 75 (addr <= offsetof(struct user, u_debugreg[7]))){
78 addr -= offsetof(struct user, u_debugreg[0]); 76 addr -= offsetof(struct user, u_debugreg[0]);
@@ -81,7 +79,6 @@ int poke_user(struct task_struct *child, long addr, long data)
81 child->thread.arch.debugregs[addr] = data; 79 child->thread.arch.debugregs[addr] = data;
82 return 0; 80 return 0;
83 } 81 }
84#endif
85 return -EIO; 82 return -EIO;
86} 83}
87 84
@@ -119,14 +116,12 @@ int peek_user(struct task_struct *child, long addr, long data)
119 if(addr < MAX_REG_OFFSET){ 116 if(addr < MAX_REG_OFFSET){
120 tmp = getreg(child, addr); 117 tmp = getreg(child, addr);
121 } 118 }
122#if 0 /* Need x86_64 debugregs handling */
123 else if((addr >= offsetof(struct user, u_debugreg[0])) && 119 else if((addr >= offsetof(struct user, u_debugreg[0])) &&
124 (addr <= offsetof(struct user, u_debugreg[7]))){ 120 (addr <= offsetof(struct user, u_debugreg[7]))){
125 addr -= offsetof(struct user, u_debugreg[0]); 121 addr -= offsetof(struct user, u_debugreg[0]);
126 addr = addr >> 2; 122 addr = addr >> 2;
127 tmp = child->thread.arch.debugregs[addr]; 123 tmp = child->thread.arch.debugregs[addr];
128 } 124 }
129#endif
130 return put_user(tmp, (unsigned long *) data); 125 return put_user(tmp, (unsigned long *) data);
131} 126}
132 127
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index 73ce4463f70c..01b91f9fa789 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -16,6 +16,7 @@
16#include "asm/prctl.h" /* XXX This should get the constants from libc */ 16#include "asm/prctl.h" /* XXX This should get the constants from libc */
17#include "choose-mode.h" 17#include "choose-mode.h"
18#include "kern.h" 18#include "kern.h"
19#include "os.h"
19 20
20asmlinkage long sys_uname64(struct new_utsname __user * name) 21asmlinkage long sys_uname64(struct new_utsname __user * name)
21{ 22{
@@ -58,40 +59,69 @@ static long arch_prctl_tt(int code, unsigned long addr)
58 59
59#ifdef CONFIG_MODE_SKAS 60#ifdef CONFIG_MODE_SKAS
60 61
61/* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */ 62long arch_prctl_skas(struct task_struct *task, int code,
62static long arch_prctl_skas(int code, unsigned long addr) 63 unsigned long __user *addr)
63{ 64{
64 long ret = 0; 65 unsigned long *ptr = addr, tmp;
66 long ret;
67 int pid = task->mm->context.skas.id.u.pid;
65 68
69 /*
70 * With ARCH_SET_FS (and ARCH_SET_GS is treated similarly to
71 * be safe), we need to call arch_prctl on the host because
72 * setting %fs may result in something else happening (like a
73 * GDT or thread.fs being set instead). So, we let the host
74 * fiddle the registers and thread struct and restore the
75 * registers afterwards.
76 *
77 * So, the saved registers are stored to the process (this
78 * needed because a stub may have been the last thing to run),
79 * arch_prctl is run on the host, then the registers are read
80 * back.
81 */
66 switch(code){ 82 switch(code){
67 case ARCH_SET_FS: 83 case ARCH_SET_FS:
68 current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr;
69 break;
70 case ARCH_SET_GS: 84 case ARCH_SET_GS:
71 current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; 85 restore_registers(pid, &current->thread.regs.regs);
86 break;
87 case ARCH_GET_FS:
88 case ARCH_GET_GS:
89 /*
90 * With these two, we read to a local pointer and
91 * put_user it to the userspace pointer that we were
92 * given. If addr isn't valid (because it hasn't been
93 * faulted in or is just bogus), we want put_user to
94 * fault it in (or return -EFAULT) instead of having
95 * the host return -EFAULT.
96 */
97 ptr = &tmp;
98 }
99
100 ret = os_arch_prctl(pid, code, ptr);
101 if(ret)
102 return ret;
103
104 switch(code){
105 case ARCH_SET_FS:
106 case ARCH_SET_GS:
107 save_registers(pid, &current->thread.regs.regs);
72 break; 108 break;
73 case ARCH_GET_FS: 109 case ARCH_GET_FS:
74 ret = put_user(current->thread.regs.regs.skas. 110 ret = put_user(tmp, addr);
75 regs[FS_BASE / sizeof(unsigned long)],
76 (unsigned long __user *)addr);
77 break; 111 break;
78 case ARCH_GET_GS: 112 case ARCH_GET_GS:
79 ret = put_user(current->thread.regs.regs.skas. 113 ret = put_user(tmp, addr);
80 regs[GS_BASE / sizeof(unsigned long)],
81 (unsigned long __user *)addr);
82 break; 114 break;
83 default:
84 ret = -EINVAL;
85 break;
86 } 115 }
87 116
88 return(ret); 117 return ret;
89} 118}
90#endif 119#endif
91 120
92long sys_arch_prctl(int code, unsigned long addr) 121long sys_arch_prctl(int code, unsigned long addr)
93{ 122{
94 return(CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, code, addr)); 123 return CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, current, code,
124 (unsigned long __user *) addr);
95} 125}
96 126
97long sys_clone(unsigned long clone_flags, unsigned long newsp, 127long sys_clone(unsigned long clone_flags, unsigned long newsp,
@@ -105,5 +135,14 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
105 ret = do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid, 135 ret = do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid,
106 child_tid); 136 child_tid);
107 current->thread.forking = 0; 137 current->thread.forking = 0;
108 return(ret); 138 return ret;
139}
140
141void arch_switch_to_skas(struct task_struct *from, struct task_struct *to)
142{
143 if(to->thread.arch.fs == 0)
144 return;
145
146 arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
109} 147}
148
diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86_64/tls.c
index ce1bf1b81c43..febbc94be25f 100644
--- a/arch/um/sys-x86_64/tls.c
+++ b/arch/um/sys-x86_64/tls.c
@@ -1,14 +1,17 @@
1#include "linux/sched.h" 1#include "linux/sched.h"
2 2
3void debug_arch_force_load_TLS(void)
4{
5}
6
7void clear_flushed_tls(struct task_struct *task) 3void clear_flushed_tls(struct task_struct *task)
8{ 4{
9} 5}
10 6
11int arch_copy_tls(struct task_struct *t) 7int arch_copy_tls(struct task_struct *t)
12{ 8{
9 /*
10 * If CLONE_SETTLS is set, we need to save the thread id
11 * (which is argument 5, child_tid, of clone) so it can be set
12 * during context switches.
13 */
14 t->thread.arch.fs = t->thread.regs.regs.skas.regs[R8 / sizeof(long)];
15
13 return 0; 16 return 0;
14} 17}
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
index f0d4d72e560f..50ccc7f57cd0 100644
--- a/arch/v850/Kconfig
+++ b/arch/v850/Kconfig
@@ -10,6 +10,9 @@ mainmenu "uClinux/v850 (w/o MMU) Kernel Configuration"
10config MMU 10config MMU
11 bool 11 bool
12 default n 12 default n
13config ZONE_DMA
14 bool
15 default y
13config RWSEM_GENERIC_SPINLOCK 16config RWSEM_GENERIC_SPINLOCK
14 bool 17 bool
15 default y 18 default y
@@ -214,7 +217,7 @@ menu "Processor type and features"
214 # Some platforms pre-zero memory, in which case the kernel doesn't need to 217 # Some platforms pre-zero memory, in which case the kernel doesn't need to
215 config ZERO_BSS 218 config ZERO_BSS
216 bool 219 bool
217 depends !V850E2_SIM85E2C 220 depends on !V850E2_SIM85E2C
218 default y 221 default y
219 222
220 # The crappy-ass zone allocator requires that the start of allocatable 223 # The crappy-ass zone allocator requires that the start of allocatable
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c
index 40892d3e3c24..0e429041a117 100644
--- a/arch/v850/kernel/anna.c
+++ b/arch/v850/kernel/anna.c
@@ -114,7 +114,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
114 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, 114 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
115 { 0 } 115 { 0 }
116}; 116};
117#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 117#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
118 118
119static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 119static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
120 120
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c
index 5352f8a5aa07..18437bc5c3ad 100644
--- a/arch/v850/kernel/as85ep1.c
+++ b/arch/v850/kernel/as85ep1.c
@@ -142,7 +142,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
142 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, 142 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
143 { 0 } 143 { 0 }
144}; 144};
145#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 145#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
146 146
147static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 147static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
148 148
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
index cb04a6954ccb..5c4923558a75 100644
--- a/arch/v850/kernel/fpga85e2c.c
+++ b/arch/v850/kernel/fpga85e2c.c
@@ -138,7 +138,7 @@ struct v850e_intc_irq_init irq_inits[] = {
138 { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 }, 138 { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 },
139 { 0 } 139 { 0 }
140}; 140};
141#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 141#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
142 142
143struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 143struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
144 144
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c
index 25d636e79e6a..b2bcc251f65b 100644
--- a/arch/v850/kernel/gbus_int.c
+++ b/arch/v850/kernel/gbus_int.c
@@ -16,6 +16,7 @@
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/signal.h> 18#include <linux/signal.h>
19#include <linux/kernel.h>
19 20
20#include <asm/machdep.h> 21#include <asm/machdep.h>
21 22
@@ -36,7 +37,7 @@ struct used_gint {
36 { 1, GBUS_INT_PRIORITY_HIGH }, 37 { 1, GBUS_INT_PRIORITY_HIGH },
37 { 3, GBUS_INT_PRIORITY_LOW } 38 { 3, GBUS_INT_PRIORITY_LOW }
38}; 39};
39#define NUM_USED_GINTS (sizeof used_gint / sizeof used_gint[0]) 40#define NUM_USED_GINTS ARRAY_SIZE(used_gint)
40 41
41/* A table of which GINT is used by each GBUS interrupts (they are 42/* A table of which GINT is used by each GBUS interrupts (they are
42 assigned based on priority). */ 43 assigned based on priority). */
@@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
231 { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, 232 { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
232 { 0 } 233 { 0 }
233}; 234};
234#define NUM_GBUS_IRQ_INITS \ 235#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
235 ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
236 236
237static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; 237static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
238 238
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c
index 2aa8ab0f7edc..143774de75e1 100644
--- a/arch/v850/kernel/ma.c
+++ b/arch/v850/kernel/ma.c
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 }, 43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 },
44 { 0 } 44 { 0 }
45}; 45};
46#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 46#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
47 47
48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
49 49
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c
index 14b0c8858aa4..38be5c194f6b 100644
--- a/arch/v850/kernel/me2.c
+++ b/arch/v850/kernel/me2.c
@@ -44,7 +44,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
44 { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 }, 44 { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 },
45 { 0 } 45 { 0 }
46}; 46};
47#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 47#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
48 48
49static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 49static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
50 50
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c
index 0f7f6cd705a2..43018e1edebd 100644
--- a/arch/v850/kernel/rte_cb.c
+++ b/arch/v850/kernel/rte_cb.c
@@ -15,6 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/kernel.h>
18 19
19#include <asm/machdep.h> 20#include <asm/machdep.h>
20#include <asm/v850e_uart.h> 21#include <asm/v850e_uart.h>
@@ -176,8 +177,7 @@ static struct gbus_int_irq_init gbus_irq_inits[] = {
176#endif 177#endif
177 { 0 } 178 { 0 }
178}; 179};
179#define NUM_GBUS_IRQ_INITS \ 180#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
180 ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
181 181
182static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; 182static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
183 183
diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c
index 996bd4f33ecb..aa47ab1dcd87 100644
--- a/arch/v850/kernel/rte_cb_leds.c
+++ b/arch/v850/kernel/rte_cb_leds.c
@@ -117,7 +117,7 @@ static loff_t leds_dev_lseek (struct file *file, loff_t offs, int whence)
117 return 0; 117 return 0;
118} 118}
119 119
120static struct file_operations leds_fops = { 120static const struct file_operations leds_fops = {
121 .read = leds_dev_read, 121 .read = leds_dev_read,
122 .write = leds_dev_write, 122 .write = leds_dev_write,
123 .llseek = leds_dev_lseek 123 .llseek = leds_dev_lseek
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c
index 35213fa9f7d8..35a4bd5515cb 100644
--- a/arch/v850/kernel/rte_mb_a_pci.c
+++ b/arch/v850/kernel/rte_mb_a_pci.c
@@ -70,8 +70,7 @@ static struct mb_pci_dev_irq mb_pci_dev_irqs[] = {
70 /* PCI slot 2 */ 70 /* PCI slot 2 */
71 { 9, IRQ_MB_A_PCI2(0), 1 } 71 { 9, IRQ_MB_A_PCI2(0), 1 }
72}; 72};
73#define NUM_MB_PCI_DEV_IRQS \ 73#define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs)
74 (sizeof mb_pci_dev_irqs / sizeof mb_pci_dev_irqs[0])
75 74
76 75
77/* PCI configuration primitives. */ 76/* PCI configuration primitives. */
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c
index 3be355a029e2..46803d48dffe 100644
--- a/arch/v850/kernel/rte_me2_cb.c
+++ b/arch/v850/kernel/rte_me2_cb.c
@@ -170,8 +170,7 @@ static struct cb_pic_irq_init cb_pic_irq_inits[] = {
170 { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 }, 170 { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 },
171 { 0 } 171 { 0 }
172}; 172};
173#define NUM_CB_PIC_IRQ_INITS \ 173#define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1)
174 ((sizeof cb_pic_irq_inits / sizeof cb_pic_irq_inits[0]) - 1)
175 174
176static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS]; 175static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS];
177static unsigned char cb_pic_active_irqs = 0; 176static unsigned char cb_pic_active_irqs = 0;
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c
index 1bf672a25692..a914f244f494 100644
--- a/arch/v850/kernel/setup.c
+++ b/arch/v850/kernel/setup.c
@@ -42,7 +42,7 @@ extern char _root_fs_image_start __attribute__ ((__weak__));
42extern char _root_fs_image_end __attribute__ ((__weak__)); 42extern char _root_fs_image_end __attribute__ ((__weak__));
43 43
44 44
45char command_line[COMMAND_LINE_SIZE]; 45char __initdata command_line[COMMAND_LINE_SIZE];
46 46
47/* Memory not used by the kernel. */ 47/* Memory not used by the kernel. */
48static unsigned long total_ram_pages; 48static unsigned long total_ram_pages;
@@ -64,8 +64,8 @@ void __init setup_arch (char **cmdline)
64{ 64{
65 /* Keep a copy of command line */ 65 /* Keep a copy of command line */
66 *cmdline = command_line; 66 *cmdline = command_line;
67 memcpy (saved_command_line, command_line, COMMAND_LINE_SIZE); 67 memcpy (boot_command_line, command_line, COMMAND_LINE_SIZE);
68 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0'; 68 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
69 69
70 console_verbose (); 70 console_verbose ();
71 71
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c
index 290d50665016..699248f92aae 100644
--- a/arch/v850/kernel/teg.c
+++ b/arch/v850/kernel/teg.c
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 }, 43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 },
44 { 0 } 44 { 0 }
45}; 45};
46#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) 46#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
47 47
48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; 48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
49 49
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c
index cd06f47c0ea7..486e3a441c86 100644
--- a/arch/v850/kernel/time.c
+++ b/arch/v850/kernel/time.c
@@ -28,14 +28,6 @@
28#define TICK_SIZE (tick_nsec / 1000) 28#define TICK_SIZE (tick_nsec / 1000)
29 29
30/* 30/*
31 * Scheduler clock - returns current time in nanosec units.
32 */
33unsigned long long sched_clock(void)
34{
35 return (unsigned long long)jiffies * (1000000000 / HZ);
36}
37
38/*
39 * timer_interrupt() needs to keep up the real-time clock, 31 * timer_interrupt() needs to keep up the real-time clock,
40 * as well as call the "do_timer()" routine every clocktick 32 * as well as call the "do_timer()" routine every clocktick
41 */ 33 */
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S
index 3a5fd07fe064..356308221251 100644
--- a/arch/v850/kernel/vmlinux.lds.S
+++ b/arch/v850/kernel/vmlinux.lds.S
@@ -190,12 +190,16 @@
190 __root_fs_image_start = . ; \ 190 __root_fs_image_start = . ; \
191 *(.root) \ 191 *(.root) \
192 __root_fs_image_end = . ; 192 __root_fs_image_end = . ;
193
194#ifdef CONFIG_BLK_DEV_INITRD
193/* The initramfs archive. */ 195/* The initramfs archive. */
194#define INITRAMFS_CONTENTS \ 196#define INITRAMFS_CONTENTS \
195 . = ALIGN (4) ; \ 197 . = ALIGN (4) ; \
196 ___initramfs_start = . ; \ 198 ___initramfs_start = . ; \
197 *(.init.ramfs) \ 199 *(.init.ramfs) \
198 ___initramfs_end = . ; 200 ___initramfs_end = . ;
201#endif
202
199/* Where the initial bootmap (bitmap for the boot-time memory allocator) 203/* Where the initial bootmap (bitmap for the boot-time memory allocator)
200 should be place. */ 204 should be place. */
201#define BOOTMAP_CONTENTS \ 205#define BOOTMAP_CONTENTS \
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index d4275537b25b..56eb14c98475 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -24,6 +24,14 @@ config X86
24 bool 24 bool
25 default y 25 default y
26 26
27config GENERIC_TIME
28 bool
29 default y
30
31config GENERIC_TIME_VSYSCALL
32 bool
33 default y
34
27config ZONE_DMA32 35config ZONE_DMA32
28 bool 36 bool
29 default y 37 default y
@@ -44,6 +52,10 @@ config MMU
44 bool 52 bool
45 default y 53 default y
46 54
55config ZONE_DMA
56 bool
57 default y
58
47config ISA 59config ISA
48 bool 60 bool
49 61
@@ -148,18 +160,18 @@ config MPSC
148 Optimize for Intel Pentium 4 and older Nocona/Dempsey Xeon CPUs 160 Optimize for Intel Pentium 4 and older Nocona/Dempsey Xeon CPUs
149 with Intel Extended Memory 64 Technology(EM64T). For details see 161 with Intel Extended Memory 64 Technology(EM64T). For details see
150 <http://www.intel.com/technology/64bitextensions/>. 162 <http://www.intel.com/technology/64bitextensions/>.
151 Note the the latest Xeons (Xeon 51xx and 53xx) are not based on the 163 Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
152 Netburst core and shouldn't use this option. You can distingush them 164 Netburst core and shouldn't use this option. You can distinguish them
153 using the cpu family field 165 using the cpu family field
154 in /proc/cpuinfo. Family 15 is a older Xeon, Family 6 a newer one 166 in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one
155 (this rule only applies to system that support EM64T) 167 (this rule only applies to systems that support EM64T)
156 168
157config MCORE2 169config MCORE2
158 bool "Intel Core2 / newer Xeon" 170 bool "Intel Core2 / newer Xeon"
159 help 171 help
160 Optimize for Intel Core2 and newer Xeons (51xx) 172 Optimize for Intel Core2 and newer Xeons (51xx)
161 You can distingush the newer Xeons from the older ones using 173 You can distinguish the newer Xeons from the older ones using
162 the cpu family field in /proc/cpuinfo. 15 is a older Xeon 174 the cpu family field in /proc/cpuinfo. 15 is an older Xeon
163 (use CONFIG_MPSC then), 6 is a newer one. This rule only 175 (use CONFIG_MPSC then), 6 is a newer one. This rule only
164 applies to CPUs that support EM64T. 176 applies to CPUs that support EM64T.
165 177
@@ -454,8 +466,8 @@ config IOMMU
454 on systems with more than 3GB. This is usually needed for USB, 466 on systems with more than 3GB. This is usually needed for USB,
455 sound, many IDE/SATA chipsets and some other devices. 467 sound, many IDE/SATA chipsets and some other devices.
456 Provides a driver for the AMD Athlon64/Opteron/Turion/Sempron GART 468 Provides a driver for the AMD Athlon64/Opteron/Turion/Sempron GART
457 based IOMMU and a software bounce buffer based IOMMU used on Intel 469 based hardware IOMMU and a software bounce buffer based IOMMU used
458 systems and as fallback. 470 on Intel systems and as fallback.
459 The code is only active when needed (enough memory and limited 471 The code is only active when needed (enough memory and limited
460 device) unless CONFIG_IOMMU_DEBUG or iommu=force is specified 472 device) unless CONFIG_IOMMU_DEBUG or iommu=force is specified
461 too. 473 too.
@@ -492,6 +504,12 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
492# need this always selected by IOMMU for the VIA workaround 504# need this always selected by IOMMU for the VIA workaround
493config SWIOTLB 505config SWIOTLB
494 bool 506 bool
507 help
508 Support for software bounce buffers used on x86-64 systems
509 which don't have a hardware IOMMU (e.g. the current generation
510 of Intel's x86-64 CPUs). Using this PCI devices which can only
511 access 32-bits of memory can be used on systems with more than
512 3 GB of memory. If unsure, say Y.
495 513
496config X86_MCE 514config X86_MCE
497 bool "Machine check support" if EMBEDDED 515 bool "Machine check support" if EMBEDDED
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index 69584c295305..293a4a4c609e 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/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.20-rc3 3# Linux kernel version: 2.6.20-git8
4# Fri Jan 5 11:54:41 2007 4# Tue Feb 13 11:25:16 2007
5# 5#
6CONFIG_X86_64=y 6CONFIG_X86_64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -11,6 +11,7 @@ CONFIG_LOCKDEP_SUPPORT=y
11CONFIG_STACKTRACE_SUPPORT=y 11CONFIG_STACKTRACE_SUPPORT=y
12CONFIG_SEMAPHORE_SLEEPERS=y 12CONFIG_SEMAPHORE_SLEEPERS=y
13CONFIG_MMU=y 13CONFIG_MMU=y
14CONFIG_ZONE_DMA=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y 15CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_HWEIGHT=y 16CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y 17CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -153,6 +154,7 @@ CONFIG_NEED_MULTIPLE_NODES=y
153CONFIG_SPLIT_PTLOCK_CPUS=4 154CONFIG_SPLIT_PTLOCK_CPUS=4
154CONFIG_MIGRATION=y 155CONFIG_MIGRATION=y
155CONFIG_RESOURCES_64BIT=y 156CONFIG_RESOURCES_64BIT=y
157CONFIG_ZONE_DMA_FLAG=1
156CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 158CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
157CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y 159CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y
158CONFIG_NR_CPUS=32 160CONFIG_NR_CPUS=32
@@ -201,13 +203,14 @@ CONFIG_ACPI=y
201CONFIG_ACPI_SLEEP=y 203CONFIG_ACPI_SLEEP=y
202CONFIG_ACPI_SLEEP_PROC_FS=y 204CONFIG_ACPI_SLEEP_PROC_FS=y
203CONFIG_ACPI_SLEEP_PROC_SLEEP=y 205CONFIG_ACPI_SLEEP_PROC_SLEEP=y
206CONFIG_ACPI_PROCFS=y
204CONFIG_ACPI_AC=y 207CONFIG_ACPI_AC=y
205CONFIG_ACPI_BATTERY=y 208CONFIG_ACPI_BATTERY=y
206CONFIG_ACPI_BUTTON=y 209CONFIG_ACPI_BUTTON=y
207# CONFIG_ACPI_VIDEO is not set
208# CONFIG_ACPI_HOTKEY is not set 210# CONFIG_ACPI_HOTKEY is not set
209CONFIG_ACPI_FAN=y 211CONFIG_ACPI_FAN=y
210# CONFIG_ACPI_DOCK is not set 212# CONFIG_ACPI_DOCK is not set
213# CONFIG_ACPI_BAY is not set
211CONFIG_ACPI_PROCESSOR=y 214CONFIG_ACPI_PROCESSOR=y
212CONFIG_ACPI_HOTPLUG_CPU=y 215CONFIG_ACPI_HOTPLUG_CPU=y
213CONFIG_ACPI_THERMAL=y 216CONFIG_ACPI_THERMAL=y
@@ -263,7 +266,6 @@ CONFIG_PCI_MMCONFIG=y
263CONFIG_PCIEPORTBUS=y 266CONFIG_PCIEPORTBUS=y
264CONFIG_PCIEAER=y 267CONFIG_PCIEAER=y
265CONFIG_PCI_MSI=y 268CONFIG_PCI_MSI=y
266# CONFIG_PCI_MULTITHREAD_PROBE is not set
267# CONFIG_PCI_DEBUG is not set 269# CONFIG_PCI_DEBUG is not set
268# CONFIG_HT_IRQ is not set 270# CONFIG_HT_IRQ is not set
269 271
@@ -398,6 +400,7 @@ CONFIG_STANDALONE=y
398CONFIG_PREVENT_FIRMWARE_BUILD=y 400CONFIG_PREVENT_FIRMWARE_BUILD=y
399CONFIG_FW_LOADER=y 401CONFIG_FW_LOADER=y
400# CONFIG_DEBUG_DRIVER is not set 402# CONFIG_DEBUG_DRIVER is not set
403# CONFIG_DEBUG_DEVRES is not set
401# CONFIG_SYS_HYPERVISOR is not set 404# CONFIG_SYS_HYPERVISOR is not set
402 405
403# 406#
@@ -466,6 +469,7 @@ CONFIG_BLK_DEV_IDECD=y
466# CONFIG_BLK_DEV_IDETAPE is not set 469# CONFIG_BLK_DEV_IDETAPE is not set
467# CONFIG_BLK_DEV_IDEFLOPPY is not set 470# CONFIG_BLK_DEV_IDEFLOPPY is not set
468# CONFIG_BLK_DEV_IDESCSI is not set 471# CONFIG_BLK_DEV_IDESCSI is not set
472CONFIG_BLK_DEV_IDEACPI=y
469# CONFIG_IDE_TASK_IOCTL is not set 473# CONFIG_IDE_TASK_IOCTL is not set
470 474
471# 475#
@@ -497,6 +501,7 @@ CONFIG_BLK_DEV_ATIIXP=y
497# CONFIG_BLK_DEV_JMICRON is not set 501# CONFIG_BLK_DEV_JMICRON is not set
498# CONFIG_BLK_DEV_SC1200 is not set 502# CONFIG_BLK_DEV_SC1200 is not set
499CONFIG_BLK_DEV_PIIX=y 503CONFIG_BLK_DEV_PIIX=y
504# CONFIG_BLK_DEV_IT8213 is not set
500# CONFIG_BLK_DEV_IT821X is not set 505# CONFIG_BLK_DEV_IT821X is not set
501# CONFIG_BLK_DEV_NS87415 is not set 506# CONFIG_BLK_DEV_NS87415 is not set
502# CONFIG_BLK_DEV_PDC202XX_OLD is not set 507# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -507,6 +512,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y
507# CONFIG_BLK_DEV_SLC90E66 is not set 512# CONFIG_BLK_DEV_SLC90E66 is not set
508# CONFIG_BLK_DEV_TRM290 is not set 513# CONFIG_BLK_DEV_TRM290 is not set
509# CONFIG_BLK_DEV_VIA82CXXX is not set 514# CONFIG_BLK_DEV_VIA82CXXX is not set
515# CONFIG_BLK_DEV_TC86C001 is not set
510# CONFIG_IDE_ARM is not set 516# CONFIG_IDE_ARM is not set
511CONFIG_BLK_DEV_IDEDMA=y 517CONFIG_BLK_DEV_IDEDMA=y
512# CONFIG_IDEDMA_IVB is not set 518# CONFIG_IDEDMA_IVB is not set
@@ -599,6 +605,7 @@ CONFIG_MEGARAID_SAS=y
599# Serial ATA (prod) and Parallel ATA (experimental) drivers 605# Serial ATA (prod) and Parallel ATA (experimental) drivers
600# 606#
601CONFIG_ATA=y 607CONFIG_ATA=y
608# CONFIG_ATA_NONSTANDARD is not set
602CONFIG_SATA_AHCI=y 609CONFIG_SATA_AHCI=y
603CONFIG_SATA_SVW=y 610CONFIG_SATA_SVW=y
604CONFIG_ATA_PIIX=y 611CONFIG_ATA_PIIX=y
@@ -614,6 +621,7 @@ CONFIG_SATA_SIL=y
614# CONFIG_SATA_ULI is not set 621# CONFIG_SATA_ULI is not set
615CONFIG_SATA_VIA=y 622CONFIG_SATA_VIA=y
616# CONFIG_SATA_VITESSE is not set 623# CONFIG_SATA_VITESSE is not set
624# CONFIG_SATA_INIC162X is not set
617CONFIG_SATA_INTEL_COMBINED=y 625CONFIG_SATA_INTEL_COMBINED=y
618# CONFIG_PATA_ALI is not set 626# CONFIG_PATA_ALI is not set
619# CONFIG_PATA_AMD is not set 627# CONFIG_PATA_AMD is not set
@@ -630,6 +638,7 @@ CONFIG_SATA_INTEL_COMBINED=y
630# CONFIG_PATA_HPT3X2N is not set 638# CONFIG_PATA_HPT3X2N is not set
631# CONFIG_PATA_HPT3X3 is not set 639# CONFIG_PATA_HPT3X3 is not set
632# CONFIG_PATA_IT821X is not set 640# CONFIG_PATA_IT821X is not set
641# CONFIG_PATA_IT8213 is not set
633# CONFIG_PATA_JMICRON is not set 642# CONFIG_PATA_JMICRON is not set
634# CONFIG_PATA_TRIFLEX is not set 643# CONFIG_PATA_TRIFLEX is not set
635# CONFIG_PATA_MARVELL is not set 644# CONFIG_PATA_MARVELL is not set
@@ -682,9 +691,7 @@ CONFIG_IEEE1394=y
682# Subsystem Options 691# Subsystem Options
683# 692#
684# CONFIG_IEEE1394_VERBOSEDEBUG is not set 693# CONFIG_IEEE1394_VERBOSEDEBUG is not set
685# CONFIG_IEEE1394_OUI_DB is not set
686# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set 694# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
687# CONFIG_IEEE1394_EXPORT_FULL_API is not set
688 695
689# 696#
690# Device Drivers 697# Device Drivers
@@ -707,6 +714,11 @@ CONFIG_IEEE1394_RAWIO=y
707# CONFIG_I2O is not set 714# CONFIG_I2O is not set
708 715
709# 716#
717# Macintosh device drivers
718#
719# CONFIG_MAC_EMUMOUSEBTN is not set
720
721#
710# Network device support 722# Network device support
711# 723#
712CONFIG_NETDEVICES=y 724CONFIG_NETDEVICES=y
@@ -774,6 +786,7 @@ CONFIG_8139TOO=y
774# CONFIG_EPIC100 is not set 786# CONFIG_EPIC100 is not set
775# CONFIG_SUNDANCE is not set 787# CONFIG_SUNDANCE is not set
776# CONFIG_VIA_RHINE is not set 788# CONFIG_VIA_RHINE is not set
789# CONFIG_SC92031 is not set
777 790
778# 791#
779# Ethernet (1000 Mbit) 792# Ethernet (1000 Mbit)
@@ -795,11 +808,13 @@ CONFIG_E1000=y
795CONFIG_TIGON3=y 808CONFIG_TIGON3=y
796CONFIG_BNX2=y 809CONFIG_BNX2=y
797# CONFIG_QLA3XXX is not set 810# CONFIG_QLA3XXX is not set
811# CONFIG_ATL1 is not set
798 812
799# 813#
800# Ethernet (10000 Mbit) 814# Ethernet (10000 Mbit)
801# 815#
802# CONFIG_CHELSIO_T1 is not set 816# CONFIG_CHELSIO_T1 is not set
817# CONFIG_CHELSIO_T3 is not set
803# CONFIG_IXGB is not set 818# CONFIG_IXGB is not set
804CONFIG_S2IO=m 819CONFIG_S2IO=m
805# CONFIG_S2IO_NAPI is not set 820# CONFIG_S2IO_NAPI is not set
@@ -1115,6 +1130,7 @@ CONFIG_SOUND=y
1115# Open Sound System 1130# Open Sound System
1116# 1131#
1117CONFIG_SOUND_PRIME=y 1132CONFIG_SOUND_PRIME=y
1133CONFIG_OBSOLETE_OSS=y
1118# CONFIG_SOUND_BT878 is not set 1134# CONFIG_SOUND_BT878 is not set
1119# CONFIG_SOUND_ES1371 is not set 1135# CONFIG_SOUND_ES1371 is not set
1120CONFIG_SOUND_ICH=y 1136CONFIG_SOUND_ICH=y
@@ -1128,6 +1144,7 @@ CONFIG_SOUND_ICH=y
1128# HID Devices 1144# HID Devices
1129# 1145#
1130CONFIG_HID=y 1146CONFIG_HID=y
1147# CONFIG_HID_DEBUG is not set
1131 1148
1132# 1149#
1133# USB support 1150# USB support
@@ -1142,10 +1159,8 @@ CONFIG_USB=y
1142# Miscellaneous USB options 1159# Miscellaneous USB options
1143# 1160#
1144CONFIG_USB_DEVICEFS=y 1161CONFIG_USB_DEVICEFS=y
1145# CONFIG_USB_BANDWIDTH is not set
1146# CONFIG_USB_DYNAMIC_MINORS is not set 1162# CONFIG_USB_DYNAMIC_MINORS is not set
1147# CONFIG_USB_SUSPEND is not set 1163# CONFIG_USB_SUSPEND is not set
1148# CONFIG_USB_MULTITHREAD_PROBE is not set
1149# CONFIG_USB_OTG is not set 1164# CONFIG_USB_OTG is not set
1150 1165
1151# 1166#
@@ -1155,9 +1170,11 @@ CONFIG_USB_EHCI_HCD=y
1155# CONFIG_USB_EHCI_SPLIT_ISO is not set 1170# CONFIG_USB_EHCI_SPLIT_ISO is not set
1156# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1171# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1157# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1172# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1173# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
1158# CONFIG_USB_ISP116X_HCD is not set 1174# CONFIG_USB_ISP116X_HCD is not set
1159CONFIG_USB_OHCI_HCD=y 1175CONFIG_USB_OHCI_HCD=y
1160# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1176# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1177# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1161CONFIG_USB_OHCI_LITTLE_ENDIAN=y 1178CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1162CONFIG_USB_UHCI_HCD=y 1179CONFIG_USB_UHCI_HCD=y
1163# CONFIG_USB_SL811_HCD is not set 1180# CONFIG_USB_SL811_HCD is not set
@@ -1208,6 +1225,7 @@ CONFIG_USB_HID=y
1208# CONFIG_USB_ATI_REMOTE2 is not set 1225# CONFIG_USB_ATI_REMOTE2 is not set
1209# CONFIG_USB_KEYSPAN_REMOTE is not set 1226# CONFIG_USB_KEYSPAN_REMOTE is not set
1210# CONFIG_USB_APPLETOUCH is not set 1227# CONFIG_USB_APPLETOUCH is not set
1228# CONFIG_USB_GTCO is not set
1211 1229
1212# 1230#
1213# USB Imaging devices 1231# USB Imaging devices
@@ -1313,6 +1331,10 @@ CONFIG_USB_MON=y
1313# 1331#
1314 1332
1315# 1333#
1334# Auxiliary Display support
1335#
1336
1337#
1316# Virtualization 1338# Virtualization
1317# 1339#
1318# CONFIG_KVM is not set 1340# CONFIG_KVM is not set
@@ -1512,6 +1534,7 @@ CONFIG_UNUSED_SYMBOLS=y
1512CONFIG_DEBUG_FS=y 1534CONFIG_DEBUG_FS=y
1513# CONFIG_HEADERS_CHECK is not set 1535# CONFIG_HEADERS_CHECK is not set
1514CONFIG_DEBUG_KERNEL=y 1536CONFIG_DEBUG_KERNEL=y
1537# CONFIG_DEBUG_SHIRQ is not set
1515CONFIG_LOG_BUF_SHIFT=18 1538CONFIG_LOG_BUF_SHIFT=18
1516CONFIG_DETECT_SOFTLOCKUP=y 1539CONFIG_DETECT_SOFTLOCKUP=y
1517# CONFIG_SCHEDSTATS is not set 1540# CONFIG_SCHEDSTATS is not set
@@ -1520,7 +1543,6 @@ CONFIG_DETECT_SOFTLOCKUP=y
1520# CONFIG_RT_MUTEX_TESTER is not set 1543# CONFIG_RT_MUTEX_TESTER is not set
1521# CONFIG_DEBUG_SPINLOCK is not set 1544# CONFIG_DEBUG_SPINLOCK is not set
1522# CONFIG_DEBUG_MUTEXES is not set 1545# CONFIG_DEBUG_MUTEXES is not set
1523# CONFIG_DEBUG_RWSEMS is not set
1524# CONFIG_DEBUG_LOCK_ALLOC is not set 1546# CONFIG_DEBUG_LOCK_ALLOC is not set
1525# CONFIG_PROVE_LOCKING is not set 1547# CONFIG_PROVE_LOCKING is not set
1526# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1548# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
@@ -1560,4 +1582,5 @@ CONFIG_CRC32=y
1560# CONFIG_LIBCRC32C is not set 1582# CONFIG_LIBCRC32C is not set
1561CONFIG_ZLIB_INFLATE=y 1583CONFIG_ZLIB_INFLATE=y
1562CONFIG_PLIST=y 1584CONFIG_PLIST=y
1563CONFIG_IOMAP_COPY=y 1585CONFIG_HAS_IOMEM=y
1586CONFIG_HAS_IOPORT=y
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 5ce0bd486bbf..071100ea1251 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -300,12 +300,10 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
300 bprm->loader += stack_base; 300 bprm->loader += stack_base;
301 bprm->exec += stack_base; 301 bprm->exec += stack_base;
302 302
303 mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 303 mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
304 if (!mpnt) 304 if (!mpnt)
305 return -ENOMEM; 305 return -ENOMEM;
306 306
307 memset(mpnt, 0, sizeof(*mpnt));
308
309 down_write(&mm->mmap_sem); 307 down_write(&mm->mmap_sem);
310 { 308 {
311 mpnt->vm_mm = mm; 309 mpnt->vm_mm = mm;
@@ -346,20 +344,30 @@ EXPORT_SYMBOL(ia32_setup_arg_pages);
346#include <linux/sysctl.h> 344#include <linux/sysctl.h>
347 345
348static ctl_table abi_table2[] = { 346static ctl_table abi_table2[] = {
349 { 99, "vsyscall32", &sysctl_vsyscall32, sizeof(int), 0644, NULL, 347 {
350 proc_dointvec }, 348 .ctl_name = 99,
351 { 0, } 349 .procname = "vsyscall32",
352}; 350 .data = &sysctl_vsyscall32,
351 .maxlen = sizeof(int),
352 .mode = 0644,
353 .proc_handler = proc_dointvec
354 },
355 {}
356};
353 357
354static ctl_table abi_root_table2[] = { 358static ctl_table abi_root_table2[] = {
355 { .ctl_name = CTL_ABI, .procname = "abi", .mode = 0555, 359 {
356 .child = abi_table2 }, 360 .ctl_name = CTL_ABI,
357 { 0 }, 361 .procname = "abi",
358}; 362 .mode = 0555,
363 .child = abi_table2
364 },
365 {}
366};
359 367
360static __init int ia32_binfmt_init(void) 368static __init int ia32_binfmt_init(void)
361{ 369{
362 register_sysctl_table(abi_root_table2, 1); 370 register_sysctl_table(abi_root_table2);
363 return 0; 371 return 0;
364} 372}
365__initcall(ia32_binfmt_init); 373__initcall(ia32_binfmt_init);
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c
index ff499ef2a1ba..359eacc38509 100644
--- a/arch/x86_64/ia32/ia32_signal.c
+++ b/arch/x86_64/ia32/ia32_signal.c
@@ -21,6 +21,7 @@
21#include <linux/stddef.h> 21#include <linux/stddef.h>
22#include <linux/personality.h> 22#include <linux/personality.h>
23#include <linux/compat.h> 23#include <linux/compat.h>
24#include <linux/binfmts.h>
24#include <asm/ucontext.h> 25#include <asm/ucontext.h>
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26#include <asm/i387.h> 27#include <asm/i387.h>
@@ -449,7 +450,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
449 450
450 /* Return stub is in 32bit vsyscall page */ 451 /* Return stub is in 32bit vsyscall page */
451 { 452 {
452 void __user *restorer = VSYSCALL32_SIGRETURN; 453 void __user *restorer;
454 if (current->binfmt->hasvdso)
455 restorer = VSYSCALL32_SIGRETURN;
456 else
457 restorer = (void *)&frame->retcode;
453 if (ka->sa.sa_flags & SA_RESTORER) 458 if (ka->sa.sa_flags & SA_RESTORER)
454 restorer = ka->sa.sa_restorer; 459 restorer = ka->sa.sa_restorer;
455 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); 460 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
@@ -495,7 +500,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
495 ptrace_notify(SIGTRAP); 500 ptrace_notify(SIGTRAP);
496 501
497#if DEBUG_SIG 502#if DEBUG_SIG
498 printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n", 503 printk("SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\n",
499 current->comm, current->pid, frame, regs->rip, frame->pretcode); 504 current->comm, current->pid, frame, regs->rip, frame->pretcode);
500#endif 505#endif
501 506
@@ -601,7 +606,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
601 ptrace_notify(SIGTRAP); 606 ptrace_notify(SIGTRAP);
602 607
603#if DEBUG_SIG 608#if DEBUG_SIG
604 printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n", 609 printk("SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\n",
605 current->comm, current->pid, frame, regs->rip, frame->pretcode); 610 current->comm, current->pid, frame, regs->rip, frame->pretcode);
606#endif 611#endif
607 612
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index b4aa875e175b..eda7a0d4dc15 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -515,7 +515,7 @@ ia32_sys_call_table:
515 .quad sys32_vm86_warning /* vm86old */ 515 .quad sys32_vm86_warning /* vm86old */
516 .quad compat_sys_wait4 516 .quad compat_sys_wait4
517 .quad sys_swapoff /* 115 */ 517 .quad sys_swapoff /* 115 */
518 .quad sys32_sysinfo 518 .quad compat_sys_sysinfo
519 .quad sys32_ipc 519 .quad sys32_ipc
520 .quad sys_fsync 520 .quad sys_fsync
521 .quad stub32_sigreturn 521 .quad stub32_sigreturn
@@ -718,4 +718,5 @@ ia32_sys_call_table:
718 .quad compat_sys_vmsplice 718 .quad compat_sys_vmsplice
719 .quad compat_sys_move_pages 719 .quad compat_sys_move_pages
720 .quad sys_getcpu 720 .quad sys_getcpu
721 .quad sys_epoll_pwait
721ia32_syscall_end: 722ia32_syscall_end:
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index c9bac3af29d6..200fdde18d96 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -523,72 +523,6 @@ sys32_sysfs(int option, u32 arg1, u32 arg2)
523 return sys_sysfs(option, arg1, arg2); 523 return sys_sysfs(option, arg1, arg2);
524} 524}
525 525
526struct sysinfo32 {
527 s32 uptime;
528 u32 loads[3];
529 u32 totalram;
530 u32 freeram;
531 u32 sharedram;
532 u32 bufferram;
533 u32 totalswap;
534 u32 freeswap;
535 unsigned short procs;
536 unsigned short pad;
537 u32 totalhigh;
538 u32 freehigh;
539 u32 mem_unit;
540 char _f[20-2*sizeof(u32)-sizeof(int)];
541};
542
543asmlinkage long
544sys32_sysinfo(struct sysinfo32 __user *info)
545{
546 struct sysinfo s;
547 int ret;
548 mm_segment_t old_fs = get_fs ();
549 int bitcount = 0;
550
551 set_fs (KERNEL_DS);
552 ret = sys_sysinfo((struct sysinfo __user *)&s);
553 set_fs (old_fs);
554
555 /* Check to see if any memory value is too large for 32-bit and scale
556 * down if needed
557 */
558 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
559 while (s.mem_unit < PAGE_SIZE) {
560 s.mem_unit <<= 1;
561 bitcount++;
562 }
563 s.totalram >>= bitcount;
564 s.freeram >>= bitcount;
565 s.sharedram >>= bitcount;
566 s.bufferram >>= bitcount;
567 s.totalswap >>= bitcount;
568 s.freeswap >>= bitcount;
569 s.totalhigh >>= bitcount;
570 s.freehigh >>= bitcount;
571 }
572
573 if (!access_ok(VERIFY_WRITE, info, sizeof(struct sysinfo32)) ||
574 __put_user (s.uptime, &info->uptime) ||
575 __put_user (s.loads[0], &info->loads[0]) ||
576 __put_user (s.loads[1], &info->loads[1]) ||
577 __put_user (s.loads[2], &info->loads[2]) ||
578 __put_user (s.totalram, &info->totalram) ||
579 __put_user (s.freeram, &info->freeram) ||
580 __put_user (s.sharedram, &info->sharedram) ||
581 __put_user (s.bufferram, &info->bufferram) ||
582 __put_user (s.totalswap, &info->totalswap) ||
583 __put_user (s.freeswap, &info->freeswap) ||
584 __put_user (s.procs, &info->procs) ||
585 __put_user (s.totalhigh, &info->totalhigh) ||
586 __put_user (s.freehigh, &info->freehigh) ||
587 __put_user (s.mem_unit, &info->mem_unit))
588 return -EFAULT;
589 return 0;
590}
591
592asmlinkage long 526asmlinkage long
593sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) 527sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval)
594{ 528{
diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c
index 59f1fa155915..568ff0df89e7 100644
--- a/arch/x86_64/ia32/syscall32.c
+++ b/arch/x86_64/ia32/syscall32.c
@@ -18,68 +18,34 @@ extern unsigned char syscall32_syscall[], syscall32_syscall_end[];
18extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[]; 18extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[];
19extern int sysctl_vsyscall32; 19extern int sysctl_vsyscall32;
20 20
21char *syscall32_page; 21static struct page *syscall32_pages[1];
22static int use_sysenter = -1; 22static int use_sysenter = -1;
23 23
24static struct page *
25syscall32_nopage(struct vm_area_struct *vma, unsigned long adr, int *type)
26{
27 struct page *p = virt_to_page(adr - vma->vm_start + syscall32_page);
28 get_page(p);
29 return p;
30}
31
32/* Prevent VMA merging */
33static void syscall32_vma_close(struct vm_area_struct *vma)
34{
35}
36
37static struct vm_operations_struct syscall32_vm_ops = {
38 .close = syscall32_vma_close,
39 .nopage = syscall32_nopage,
40};
41
42struct linux_binprm; 24struct linux_binprm;
43 25
44/* Setup a VMA at program startup for the vsyscall page */ 26/* Setup a VMA at program startup for the vsyscall page */
45int syscall32_setup_pages(struct linux_binprm *bprm, int exstack) 27int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
46{ 28{
47 int npages = (VSYSCALL32_END - VSYSCALL32_BASE) >> PAGE_SHIFT;
48 struct vm_area_struct *vma;
49 struct mm_struct *mm = current->mm; 29 struct mm_struct *mm = current->mm;
50 int ret; 30 int ret;
51 31
52 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 32 down_write(&mm->mmap_sem);
53 if (!vma)
54 return -ENOMEM;
55
56 memset(vma, 0, sizeof(struct vm_area_struct));
57 /* Could randomize here */
58 vma->vm_start = VSYSCALL32_BASE;
59 vma->vm_end = VSYSCALL32_END;
60 /* MAYWRITE to allow gdb to COW and set breakpoints */
61 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
62 /* 33 /*
34 * MAYWRITE to allow gdb to COW and set breakpoints
35 *
63 * Make sure the vDSO gets into every core dump. 36 * Make sure the vDSO gets into every core dump.
64 * Dumping its contents makes post-mortem fully interpretable later 37 * Dumping its contents makes post-mortem fully interpretable later
65 * without matching up the same kernel and hardware config to see 38 * without matching up the same kernel and hardware config to see
66 * what PC values meant. 39 * what PC values meant.
67 */ 40 */
68 vma->vm_flags |= VM_ALWAYSDUMP; 41 /* Could randomize here */
69 vma->vm_flags |= mm->def_flags; 42 ret = install_special_mapping(mm, VSYSCALL32_BASE, PAGE_SIZE,
70 vma->vm_page_prot = protection_map[vma->vm_flags & 7]; 43 VM_READ|VM_EXEC|
71 vma->vm_ops = &syscall32_vm_ops; 44 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
72 vma->vm_mm = mm; 45 VM_ALWAYSDUMP,
73 46 syscall32_pages);
74 down_write(&mm->mmap_sem);
75 if ((ret = insert_vm_struct(mm, vma))) {
76 up_write(&mm->mmap_sem);
77 kmem_cache_free(vm_area_cachep, vma);
78 return ret;
79 }
80 mm->total_vm += npages;
81 up_write(&mm->mmap_sem); 47 up_write(&mm->mmap_sem);
82 return 0; 48 return ret;
83} 49}
84 50
85const char *arch_vma_name(struct vm_area_struct *vma) 51const char *arch_vma_name(struct vm_area_struct *vma)
@@ -92,9 +58,10 @@ const char *arch_vma_name(struct vm_area_struct *vma)
92 58
93static int __init init_syscall32(void) 59static int __init init_syscall32(void)
94{ 60{
95 syscall32_page = (void *)get_zeroed_page(GFP_KERNEL); 61 char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL);
96 if (!syscall32_page) 62 if (!syscall32_page)
97 panic("Cannot allocate syscall32 page"); 63 panic("Cannot allocate syscall32 page");
64 syscall32_pages[0] = virt_to_page(syscall32_page);
98 if (use_sysenter > 0) { 65 if (use_sysenter > 0) {
99 memcpy(syscall32_page, syscall32_sysenter, 66 memcpy(syscall32_page, syscall32_sysenter,
100 syscall32_sysenter_end - syscall32_sysenter); 67 syscall32_sysenter_end - syscall32_sysenter);
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index 3c7cbff04d3d..bb47e86f3d02 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -8,7 +8,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \
8 ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \ 8 ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
9 x8664_ksyms.o i387.o syscall.o vsyscall.o \ 9 x8664_ksyms.o i387.o syscall.o vsyscall.o \
10 setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \ 10 setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
11 pci-dma.o pci-nommu.o alternative.o 11 pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o
12 12
13obj-$(CONFIG_STACKTRACE) += stacktrace.o 13obj-$(CONFIG_STACKTRACE) += stacktrace.o
14obj-$(CONFIG_X86_MCE) += mce.o therm_throt.o 14obj-$(CONFIG_X86_MCE) += mce.o therm_throt.o
@@ -19,7 +19,7 @@ obj-$(CONFIG_ACPI) += acpi/
19obj-$(CONFIG_X86_MSR) += msr.o 19obj-$(CONFIG_X86_MSR) += msr.o
20obj-$(CONFIG_MICROCODE) += microcode.o 20obj-$(CONFIG_MICROCODE) += microcode.o
21obj-$(CONFIG_X86_CPUID) += cpuid.o 21obj-$(CONFIG_X86_CPUID) += cpuid.o
22obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o 22obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o tsc_sync.o
23obj-y += apic.o nmi.o 23obj-y += apic.o nmi.o
24obj-y += io_apic.o mpparse.o \ 24obj-y += io_apic.o mpparse.o \
25 genapic.o genapic_cluster.o genapic_flat.o 25 genapic.o genapic_cluster.o genapic_flat.o
@@ -43,6 +43,7 @@ obj-$(CONFIG_PCI) += early-quirks.o
43 43
44obj-y += topology.o 44obj-y += topology.o
45obj-y += intel_cacheinfo.o 45obj-y += intel_cacheinfo.o
46obj-y += pcspeaker.o
46 47
47CFLAGS_vsyscall.o := $(PROFILING) -g0 48CFLAGS_vsyscall.o := $(PROFILING) -g0
48 49
@@ -56,3 +57,4 @@ quirks-y += ../../i386/kernel/quirks.o
56i8237-y += ../../i386/kernel/i8237.o 57i8237-y += ../../i386/kernel/i8237.o
57msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o 58msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o
58alternative-y += ../../i386/kernel/alternative.o 59alternative-y += ../../i386/kernel/alternative.o
60pcspeaker-y += ../../i386/kernel/pcspeaker.o
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
index 5ebf62c7a3d2..23178ce6c783 100644
--- a/arch/x86_64/kernel/acpi/sleep.c
+++ b/arch/x86_64/kernel/acpi/sleep.c
@@ -58,7 +58,7 @@ unsigned long acpi_wakeup_address = 0;
58unsigned long acpi_video_flags; 58unsigned long acpi_video_flags;
59extern char wakeup_start, wakeup_end; 59extern char wakeup_start, wakeup_end;
60 60
61extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); 61extern unsigned long acpi_copy_wakeup_routine(unsigned long);
62 62
63static pgd_t low_ptr; 63static pgd_t low_ptr;
64 64
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 124b2d27b4ac..723417d924c0 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -37,6 +37,7 @@
37#include <asm/idle.h> 37#include <asm/idle.h>
38#include <asm/proto.h> 38#include <asm/proto.h>
39#include <asm/timex.h> 39#include <asm/timex.h>
40#include <asm/hpet.h>
40#include <asm/apic.h> 41#include <asm/apic.h>
41 42
42int apic_mapped; 43int apic_mapped;
@@ -763,7 +764,7 @@ static void setup_APIC_timer(unsigned int clocks)
763 local_irq_save(flags); 764 local_irq_save(flags);
764 765
765 /* wait for irq slice */ 766 /* wait for irq slice */
766 if (vxtime.hpet_address && hpet_use_timer) { 767 if (hpet_address && hpet_use_timer) {
767 int trigger = hpet_readl(HPET_T0_CMP); 768 int trigger = hpet_readl(HPET_T0_CMP);
768 while (hpet_readl(HPET_COUNTER) >= trigger) 769 while (hpet_readl(HPET_COUNTER) >= trigger)
769 /* do nothing */ ; 770 /* do nothing */ ;
@@ -785,7 +786,7 @@ static void setup_APIC_timer(unsigned int clocks)
785 /* Turn off PIT interrupt if we use APIC timer as main timer. 786 /* Turn off PIT interrupt if we use APIC timer as main timer.
786 Only works with the PM timer right now 787 Only works with the PM timer right now
787 TBD fix it for HPET too. */ 788 TBD fix it for HPET too. */
788 if (vxtime.mode == VXTIME_PMTMR && 789 if ((pmtmr_ioport != 0) &&
789 smp_processor_id() == boot_cpu_id && 790 smp_processor_id() == boot_cpu_id &&
790 apic_runs_main_timer == 1 && 791 apic_runs_main_timer == 1 &&
791 !cpu_isset(boot_cpu_id, timer_interrupt_broadcast_ipi_mask)) { 792 !cpu_isset(boot_cpu_id, timer_interrupt_broadcast_ipi_mask)) {
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 6fe191c58084..4651fd22b213 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -83,6 +83,13 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
83 return 1; 83 return 1;
84 } 84 }
85 85
86#ifdef CONFIG_NUMA
87 /* NUMA memory to node map */
88 if (last >= nodemap_addr && addr < nodemap_addr + nodemap_size) {
89 *addrp = nodemap_addr + nodemap_size;
90 return 1;
91 }
92#endif
86 /* XXX ramdisk image here? */ 93 /* XXX ramdisk image here? */
87 return 0; 94 return 0;
88} 95}
@@ -184,6 +191,37 @@ unsigned long __init e820_end_of_ram(void)
184} 191}
185 192
186/* 193/*
194 * Find the hole size in the range.
195 */
196unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
197{
198 unsigned long ram = 0;
199 int i;
200
201 for (i = 0; i < e820.nr_map; i++) {
202 struct e820entry *ei = &e820.map[i];
203 unsigned long last, addr;
204
205 if (ei->type != E820_RAM ||
206 ei->addr+ei->size <= start ||
207 ei->addr >= end)
208 continue;
209
210 addr = round_up(ei->addr, PAGE_SIZE);
211 if (addr < start)
212 addr = start;
213
214 last = round_down(ei->addr + ei->size, PAGE_SIZE);
215 if (last >= end)
216 last = end;
217
218 if (last > addr)
219 ram += last - addr;
220 }
221 return ((end - start) - ram);
222}
223
224/*
187 * Mark e820 reserved areas as busy for the resource manager. 225 * Mark e820 reserved areas as busy for the resource manager.
188 */ 226 */
189void __init e820_reserve_resources(void) 227void __init e820_reserve_resources(void)
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c
index 49802f1bee94..8047ea8c2ab2 100644
--- a/arch/x86_64/kernel/early-quirks.c
+++ b/arch/x86_64/kernel/early-quirks.c
@@ -32,7 +32,7 @@ static void via_bugs(void)
32 32
33static int nvidia_hpet_detected __initdata; 33static int nvidia_hpet_detected __initdata;
34 34
35static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) 35static int __init nvidia_hpet_check(struct acpi_table_header *header)
36{ 36{
37 nvidia_hpet_detected = 1; 37 nvidia_hpet_detected = 1;
38 return 0; 38 return 0;
@@ -53,7 +53,9 @@ static void nvidia_bugs(void)
53 return; 53 return;
54 54
55 nvidia_hpet_detected = 0; 55 nvidia_hpet_detected = 0;
56 acpi_table_parse(ACPI_HPET, nvidia_hpet_check); 56 if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check))
57 return;
58
57 if (nvidia_hpet_detected == 0) { 59 if (nvidia_hpet_detected == 0) {
58 acpi_skip_timer_override = 1; 60 acpi_skip_timer_override = 1;
59 printk(KERN_INFO "Nvidia board " 61 printk(KERN_INFO "Nvidia board "
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 9f5dac64aa8f..ed4350ced3d0 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -675,6 +675,9 @@ END(invalidate_interrupt\num)
675ENTRY(call_function_interrupt) 675ENTRY(call_function_interrupt)
676 apicinterrupt CALL_FUNCTION_VECTOR,smp_call_function_interrupt 676 apicinterrupt CALL_FUNCTION_VECTOR,smp_call_function_interrupt
677END(call_function_interrupt) 677END(call_function_interrupt)
678ENTRY(irq_move_cleanup_interrupt)
679 apicinterrupt IRQ_MOVE_CLEANUP_VECTOR,smp_irq_move_cleanup_interrupt
680END(irq_move_cleanup_interrupt)
678#endif 681#endif
679 682
680ENTRY(apic_timer_interrupt) 683ENTRY(apic_timer_interrupt)
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c
index b007433f96bb..0b3603adf56d 100644
--- a/arch/x86_64/kernel/genapic.c
+++ b/arch/x86_64/kernel/genapic.c
@@ -58,8 +58,8 @@ void __init clustered_apic_check(void)
58 * Some x86_64 machines use physical APIC mode regardless of how many 58 * Some x86_64 machines use physical APIC mode regardless of how many
59 * procs/clusters are present (x86_64 ES7000 is an example). 59 * procs/clusters are present (x86_64 ES7000 is an example).
60 */ 60 */
61 if (acpi_fadt.revision > FADT2_REVISION_ID) 61 if (acpi_gbl_FADT.header.revision > FADT2_REVISION_ID)
62 if (acpi_fadt.force_apic_physical_destination_mode) { 62 if (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) {
63 genapic = &apic_cluster; 63 genapic = &apic_cluster;
64 goto print; 64 goto print;
65 } 65 }
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 1e6f80870679..598a4d0351fc 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -163,6 +163,20 @@ startup_64:
163 */ 163 */
164 lgdt cpu_gdt_descr 164 lgdt cpu_gdt_descr
165 165
166 /* set up data segments. actually 0 would do too */
167 movl $__KERNEL_DS,%eax
168 movl %eax,%ds
169 movl %eax,%ss
170 movl %eax,%es
171
172 /*
173 * We don't really need to load %fs or %gs, but load them anyway
174 * to kill any stale realmode selectors. This allows execution
175 * under VT hardware.
176 */
177 movl %eax,%fs
178 movl %eax,%gs
179
166 /* 180 /*
167 * Setup up a dummy PDA. this is just for some early bootup code 181 * Setup up a dummy PDA. this is just for some early bootup code
168 * that does in_interrupt() 182 * that does in_interrupt()
@@ -173,12 +187,6 @@ startup_64:
173 shrq $32,%rdx 187 shrq $32,%rdx
174 wrmsr 188 wrmsr
175 189
176 /* set up data segments. actually 0 would do too */
177 movl $__KERNEL_DS,%eax
178 movl %eax,%ds
179 movl %eax,%ss
180 movl %eax,%es
181
182 /* esi is pointer to real mode structure with interesting info. 190 /* esi is pointer to real mode structure with interesting info.
183 pass it to C */ 191 pass it to C */
184 movl %esi, %edi 192 movl %esi, %edi
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c
index cc230b93cd1c..5f197b0a330a 100644
--- a/arch/x86_64/kernel/head64.c
+++ b/arch/x86_64/kernel/head64.c
@@ -34,8 +34,6 @@ static void __init clear_bss(void)
34#define OLD_CL_BASE_ADDR 0x90000 34#define OLD_CL_BASE_ADDR 0x90000
35#define OLD_CL_OFFSET 0x90022 35#define OLD_CL_OFFSET 0x90022
36 36
37extern char saved_command_line[];
38
39static void __init copy_bootdata(char *real_mode_data) 37static void __init copy_bootdata(char *real_mode_data)
40{ 38{
41 int new_data; 39 int new_data;
@@ -50,7 +48,7 @@ static void __init copy_bootdata(char *real_mode_data)
50 new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET; 48 new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET;
51 } 49 }
52 command_line = (char *) ((u64)(new_data)); 50 command_line = (char *) ((u64)(new_data));
53 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 51 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
54} 52}
55 53
56void __init x86_64_start_kernel(char * real_mode_data) 54void __init x86_64_start_kernel(char * real_mode_data)
diff --git a/arch/i386/kernel/time_hpet.c b/arch/x86_64/kernel/hpet.c
index 1e4702dfcd01..65a0edd71a17 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/x86_64/kernel/hpet.c
@@ -1,224 +1,138 @@
1/*
2 * linux/arch/i386/kernel/time_hpet.c
3 * This code largely copied from arch/x86_64/kernel/time.c
4 * See that file for credits.
5 *
6 * 2003-06-30 Venkatesh Pallipadi - Additional changes for HPET support
7 */
8
9#include <linux/errno.h>
10#include <linux/kernel.h> 1#include <linux/kernel.h>
11#include <linux/param.h> 2#include <linux/sched.h>
12#include <linux/string.h>
13#include <linux/init.h> 3#include <linux/init.h>
14#include <linux/smp.h> 4#include <linux/mc146818rtc.h>
5#include <linux/time.h>
6#include <linux/clocksource.h>
7#include <linux/ioport.h>
8#include <linux/acpi.h>
9#include <linux/hpet.h>
10#include <asm/pgtable.h>
11#include <asm/vsyscall.h>
12#include <asm/timex.h>
13#include <asm/hpet.h>
15 14
16#include <asm/timer.h> 15int nohpet __initdata;
17#include <asm/fixmap.h>
18#include <asm/apic.h>
19 16
20#include <linux/timex.h> 17unsigned long hpet_address;
18unsigned long hpet_period; /* fsecs / HPET clock */
19unsigned long hpet_tick; /* HPET clocks / interrupt */
21 20
22#include <asm/hpet.h> 21int hpet_use_timer; /* Use counter of hpet for time keeping,
23#include <linux/hpet.h> 22 * otherwise PIT
23 */
24 24
25static unsigned long hpet_period; /* fsecs / HPET clock */ 25#ifdef CONFIG_HPET
26unsigned long hpet_tick; /* hpet clks count per tick */ 26static __init int late_hpet_init(void)
27unsigned long hpet_address; /* hpet memory map physical address */ 27{
28int hpet_use_timer; 28 struct hpet_data hd;
29 unsigned int ntimer;
29 30
30static int use_hpet; /* can be used for runtime check of hpet */ 31 if (!hpet_address)
31static int boot_hpet_disable; /* boottime override for HPET timer */ 32 return 0;
32static void __iomem * hpet_virt_address; /* hpet kernel virtual address */
33 33
34#define FSEC_TO_USEC (1000000000UL) 34 memset(&hd, 0, sizeof(hd));
35 35
36int hpet_readl(unsigned long a) 36 ntimer = hpet_readl(HPET_ID);
37{ 37 ntimer = (ntimer & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
38 return readl(hpet_virt_address + a); 38 ntimer++;
39}
40 39
41static void hpet_writel(unsigned long d, unsigned long a) 40 /*
42{ 41 * Register with driver.
43 writel(d, hpet_virt_address + a); 42 * Timer0 and Timer1 is used by platform.
44} 43 */
44 hd.hd_phys_address = hpet_address;
45 hd.hd_address = (void __iomem *)fix_to_virt(FIX_HPET_BASE);
46 hd.hd_nirqs = ntimer;
47 hd.hd_flags = HPET_DATA_PLATFORM;
48 hpet_reserve_timer(&hd, 0);
49#ifdef CONFIG_HPET_EMULATE_RTC
50 hpet_reserve_timer(&hd, 1);
51#endif
52 hd.hd_irq[0] = HPET_LEGACY_8254;
53 hd.hd_irq[1] = HPET_LEGACY_RTC;
54 if (ntimer > 2) {
55 struct hpet *hpet;
56 struct hpet_timer *timer;
57 int i;
58
59 hpet = (struct hpet *) fix_to_virt(FIX_HPET_BASE);
60 timer = &hpet->hpet_timers[2];
61 for (i = 2; i < ntimer; timer++, i++)
62 hd.hd_irq[i] = (timer->hpet_config &
63 Tn_INT_ROUTE_CNF_MASK) >>
64 Tn_INT_ROUTE_CNF_SHIFT;
45 65
46#ifdef CONFIG_X86_LOCAL_APIC 66 }
47/*
48 * HPET counters dont wrap around on every tick. They just change the
49 * comparator value and continue. Next tick can be caught by checking
50 * for a change in the comparator value. Used in apic.c.
51 */
52static void __devinit wait_hpet_tick(void)
53{
54 unsigned int start_cmp_val, end_cmp_val;
55 67
56 start_cmp_val = hpet_readl(HPET_T0_CMP); 68 hpet_alloc(&hd);
57 do { 69 return 0;
58 end_cmp_val = hpet_readl(HPET_T0_CMP);
59 } while (start_cmp_val == end_cmp_val);
60} 70}
71fs_initcall(late_hpet_init);
61#endif 72#endif
62 73
63static int hpet_timer_stop_set_go(unsigned long tick) 74int hpet_timer_stop_set_go(unsigned long tick)
64{ 75{
65 unsigned int cfg; 76 unsigned int cfg;
66 77
67 /* 78/*
68 * Stop the timers and reset the main counter. 79 * Stop the timers and reset the main counter.
69 */ 80 */
81
70 cfg = hpet_readl(HPET_CFG); 82 cfg = hpet_readl(HPET_CFG);
71 cfg &= ~HPET_CFG_ENABLE; 83 cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
72 hpet_writel(cfg, HPET_CFG); 84 hpet_writel(cfg, HPET_CFG);
73 hpet_writel(0, HPET_COUNTER); 85 hpet_writel(0, HPET_COUNTER);
74 hpet_writel(0, HPET_COUNTER + 4); 86 hpet_writel(0, HPET_COUNTER + 4);
75 87
88/*
89 * Set up timer 0, as periodic with first interrupt to happen at hpet_tick,
90 * and period also hpet_tick.
91 */
76 if (hpet_use_timer) { 92 if (hpet_use_timer) {
77 /* 93 hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
78 * Set up timer 0, as periodic with first interrupt to happen at 94 HPET_TN_32BIT, HPET_T0_CFG);
79 * hpet_tick, and period also hpet_tick. 95 hpet_writel(hpet_tick, HPET_T0_CMP); /* next interrupt */
80 */ 96 hpet_writel(hpet_tick, HPET_T0_CMP); /* period */
81 cfg = hpet_readl(HPET_T0_CFG);
82 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
83 HPET_TN_SETVAL | HPET_TN_32BIT;
84 hpet_writel(cfg, HPET_T0_CFG);
85
86 /*
87 * The first write after writing TN_SETVAL to the config register sets
88 * the counter value, the second write sets the threshold.
89 */
90 hpet_writel(tick, HPET_T0_CMP);
91 hpet_writel(tick, HPET_T0_CMP);
92 }
93 /*
94 * Go!
95 */
96 cfg = hpet_readl(HPET_CFG);
97 if (hpet_use_timer)
98 cfg |= HPET_CFG_LEGACY; 97 cfg |= HPET_CFG_LEGACY;
98 }
99/*
100 * Go!
101 */
102
99 cfg |= HPET_CFG_ENABLE; 103 cfg |= HPET_CFG_ENABLE;
100 hpet_writel(cfg, HPET_CFG); 104 hpet_writel(cfg, HPET_CFG);
101 105
102 return 0; 106 return 0;
103} 107}
104 108
105/* 109int hpet_arch_init(void)
106 * Check whether HPET was found by ACPI boot parse. If yes setup HPET
107 * counter 0 for kernel base timer.
108 */
109int __init hpet_enable(void)
110{ 110{
111 unsigned int id; 111 unsigned int id;
112 unsigned long tick_fsec_low, tick_fsec_high; /* tick in femto sec */
113 unsigned long hpet_tick_rem;
114 112
115 if (boot_hpet_disable) 113 if (!hpet_address)
116 return -1; 114 return -1;
115 set_fixmap_nocache(FIX_HPET_BASE, hpet_address);
116 __set_fixmap(VSYSCALL_HPET, hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
117
118/*
119 * Read the period, compute tick and quotient.
120 */
117 121
118 if (!hpet_address) {
119 return -1;
120 }
121 hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
122 /*
123 * Read the period, compute tick and quotient.
124 */
125 id = hpet_readl(HPET_ID); 122 id = hpet_readl(HPET_ID);
126 123
127 /* 124 if (!(id & HPET_ID_VENDOR) || !(id & HPET_ID_NUMBER))
128 * We are checking for value '1' or more in number field if
129 * CONFIG_HPET_EMULATE_RTC is set because we will need an
130 * additional timer for RTC emulation.
131 * However, we can do with one timer otherwise using the
132 * the single HPET timer for system time.
133 */
134#ifdef CONFIG_HPET_EMULATE_RTC
135 if (!(id & HPET_ID_NUMBER)) {
136 iounmap(hpet_virt_address);
137 hpet_virt_address = NULL;
138 return -1; 125 return -1;
139 }
140#endif
141
142 126
143 hpet_period = hpet_readl(HPET_PERIOD); 127 hpet_period = hpet_readl(HPET_PERIOD);
144 if ((hpet_period < HPET_MIN_PERIOD) || (hpet_period > HPET_MAX_PERIOD)) { 128 if (hpet_period < 100000 || hpet_period > 100000000)
145 iounmap(hpet_virt_address);
146 hpet_virt_address = NULL;
147 return -1; 129 return -1;
148 }
149 130
150 /* 131 hpet_tick = (FSEC_PER_TICK + hpet_period / 2) / hpet_period;
151 * 64 bit math
152 * First changing tick into fsec
153 * Then 64 bit div to find number of hpet clk per tick
154 */
155 ASM_MUL64_REG(tick_fsec_low, tick_fsec_high,
156 KERNEL_TICK_USEC, FSEC_TO_USEC);
157 ASM_DIV64_REG(hpet_tick, hpet_tick_rem,
158 hpet_period, tick_fsec_low, tick_fsec_high);
159
160 if (hpet_tick_rem > (hpet_period >> 1))
161 hpet_tick++; /* rounding the result */
162
163 hpet_use_timer = id & HPET_ID_LEGSUP;
164
165 if (hpet_timer_stop_set_go(hpet_tick)) {
166 iounmap(hpet_virt_address);
167 hpet_virt_address = NULL;
168 return -1;
169 }
170 132
171 use_hpet = 1; 133 hpet_use_timer = (id & HPET_ID_LEGSUP);
172 134
173#ifdef CONFIG_HPET 135 return hpet_timer_stop_set_go(hpet_tick);
174 {
175 struct hpet_data hd;
176 unsigned int ntimer;
177
178 memset(&hd, 0, sizeof (hd));
179
180 ntimer = hpet_readl(HPET_ID);
181 ntimer = (ntimer & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
182 ntimer++;
183
184 /*
185 * Register with driver.
186 * Timer0 and Timer1 is used by platform.
187 */
188 hd.hd_phys_address = hpet_address;
189 hd.hd_address = hpet_virt_address;
190 hd.hd_nirqs = ntimer;
191 hd.hd_flags = HPET_DATA_PLATFORM;
192 hpet_reserve_timer(&hd, 0);
193#ifdef CONFIG_HPET_EMULATE_RTC
194 hpet_reserve_timer(&hd, 1);
195#endif
196 hd.hd_irq[0] = HPET_LEGACY_8254;
197 hd.hd_irq[1] = HPET_LEGACY_RTC;
198 if (ntimer > 2) {
199 struct hpet __iomem *hpet;
200 struct hpet_timer __iomem *timer;
201 int i;
202
203 hpet = hpet_virt_address;
204
205 for (i = 2, timer = &hpet->hpet_timers[2]; i < ntimer;
206 timer++, i++)
207 hd.hd_irq[i] = (timer->hpet_config &
208 Tn_INT_ROUTE_CNF_MASK) >>
209 Tn_INT_ROUTE_CNF_SHIFT;
210
211 }
212
213 hpet_alloc(&hd);
214 }
215#endif
216
217#ifdef CONFIG_X86_LOCAL_APIC
218 if (hpet_use_timer)
219 wait_timer_tick = wait_hpet_tick;
220#endif
221 return 0;
222} 136}
223 137
224int hpet_reenable(void) 138int hpet_reenable(void)
@@ -226,28 +140,51 @@ int hpet_reenable(void)
226 return hpet_timer_stop_set_go(hpet_tick); 140 return hpet_timer_stop_set_go(hpet_tick);
227} 141}
228 142
229int is_hpet_enabled(void) 143/*
230{ 144 * calibrate_tsc() calibrates the processor TSC in a very simple way, comparing
231 return use_hpet; 145 * it to the HPET timer of known frequency.
232} 146 */
233 147
234int is_hpet_capable(void) 148#define TICK_COUNT 100000000
149#define TICK_MIN 5000
150
151/*
152 * Some platforms take periodic SMI interrupts with 5ms duration. Make sure none
153 * occurs between the reads of the hpet & TSC.
154 */
155static void __init read_hpet_tsc(int *hpet, int *tsc)
235{ 156{
236 if (!boot_hpet_disable && hpet_address) 157 int tsc1, tsc2, hpet1;
237 return 1; 158
238 return 0; 159 do {
160 tsc1 = get_cycles_sync();
161 hpet1 = hpet_readl(HPET_COUNTER);
162 tsc2 = get_cycles_sync();
163 } while (tsc2 - tsc1 > TICK_MIN);
164 *hpet = hpet1;
165 *tsc = tsc2;
239} 166}
240 167
241static int __init hpet_setup(char* str) 168unsigned int __init hpet_calibrate_tsc(void)
242{ 169{
243 if (str) { 170 int tsc_start, hpet_start;
244 if (!strncmp("disable", str, 7)) 171 int tsc_now, hpet_now;
245 boot_hpet_disable = 1; 172 unsigned long flags;
246 } 173
247 return 1; 174 local_irq_save(flags);
248} 175
176 read_hpet_tsc(&hpet_start, &tsc_start);
249 177
250__setup("hpet=", hpet_setup); 178 do {
179 local_irq_disable();
180 read_hpet_tsc(&hpet_now, &tsc_now);
181 local_irq_restore(flags);
182 } while ((tsc_now - tsc_start) < TICK_COUNT &&
183 (hpet_now - hpet_start) < TICK_COUNT);
184
185 return (tsc_now - tsc_start) * 1000000000L
186 / ((hpet_now - hpet_start) * hpet_period / 1000);
187}
251 188
252#ifdef CONFIG_HPET_EMULATE_RTC 189#ifdef CONFIG_HPET_EMULATE_RTC
253/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET 190/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
@@ -264,7 +201,6 @@ __setup("hpet=", hpet_setup);
264 * For (3), we use interrupts at 64Hz or user specified periodic 201 * For (3), we use interrupts at 64Hz or user specified periodic
265 * frequency, whichever is higher. 202 * frequency, whichever is higher.
266 */ 203 */
267#include <linux/mc146818rtc.h>
268#include <linux/rtc.h> 204#include <linux/rtc.h>
269 205
270#define DEFAULT_RTC_INT_FREQ 64 206#define DEFAULT_RTC_INT_FREQ 64
@@ -283,6 +219,11 @@ static unsigned long PIE_count;
283static unsigned long hpet_rtc_int_freq; /* RTC interrupt frequency */ 219static unsigned long hpet_rtc_int_freq; /* RTC interrupt frequency */
284static unsigned int hpet_t1_cmp; /* cached comparator register */ 220static unsigned int hpet_t1_cmp; /* cached comparator register */
285 221
222int is_hpet_enabled(void)
223{
224 return hpet_address != 0;
225}
226
286/* 227/*
287 * Timer 1 for RTC, we do not use periodic interrupt feature, 228 * Timer 1 for RTC, we do not use periodic interrupt feature,
288 * even if HPET supports periodic interrupts on Timer 1. 229 * even if HPET supports periodic interrupts on Timer 1.
@@ -367,8 +308,9 @@ static void hpet_rtc_timer_reinit(void)
367 if (PIE_on) 308 if (PIE_on)
368 PIE_count += lost_ints; 309 PIE_count += lost_ints;
369 310
370 printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", 311 if (printk_ratelimit())
371 hpet_rtc_int_freq); 312 printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n",
313 hpet_rtc_int_freq);
372 } 314 }
373} 315}
374 316
@@ -450,7 +392,7 @@ int hpet_rtc_dropped_irq(void)
450 return 1; 392 return 1;
451} 393}
452 394
453irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) 395irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
454{ 396{
455 struct rtc_time curr_time; 397 struct rtc_time curr_time;
456 unsigned long rtc_int_flag = 0; 398 unsigned long rtc_int_flag = 0;
@@ -495,3 +437,75 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
495} 437}
496#endif 438#endif
497 439
440static int __init nohpet_setup(char *s)
441{
442 nohpet = 1;
443 return 1;
444}
445
446__setup("nohpet", nohpet_setup);
447
448#define HPET_MASK 0xFFFFFFFF
449#define HPET_SHIFT 22
450
451/* FSEC = 10^-15 NSEC = 10^-9 */
452#define FSEC_PER_NSEC 1000000
453
454static void *hpet_ptr;
455
456static cycle_t read_hpet(void)
457{
458 return (cycle_t)readl(hpet_ptr);
459}
460
461static cycle_t __vsyscall_fn vread_hpet(void)
462{
463 return readl((void __iomem *)fix_to_virt(VSYSCALL_HPET) + 0xf0);
464}
465
466struct clocksource clocksource_hpet = {
467 .name = "hpet",
468 .rating = 250,
469 .read = read_hpet,
470 .mask = (cycle_t)HPET_MASK,
471 .mult = 0, /* set below */
472 .shift = HPET_SHIFT,
473 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
474 .vread = vread_hpet,
475};
476
477static int __init init_hpet_clocksource(void)
478{
479 unsigned long hpet_period;
480 void __iomem *hpet_base;
481 u64 tmp;
482
483 if (!hpet_address)
484 return -ENODEV;
485
486 /* calculate the hpet address: */
487 hpet_base = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
488 hpet_ptr = hpet_base + HPET_COUNTER;
489
490 /* calculate the frequency: */
491 hpet_period = readl(hpet_base + HPET_PERIOD);
492
493 /*
494 * hpet period is in femto seconds per cycle
495 * so we need to convert this to ns/cyc units
496 * aproximated by mult/2^shift
497 *
498 * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift
499 * fsec/cyc * 1ns/1000000fsec * 2^shift = mult
500 * fsec/cyc * 2^shift * 1nsec/1000000fsec = mult
501 * (fsec/cyc << shift)/1000000 = mult
502 * (hpet_period << shift)/FSEC_PER_NSEC = mult
503 */
504 tmp = (u64)hpet_period << HPET_SHIFT;
505 do_div(tmp, FSEC_PER_NSEC);
506 clocksource_hpet.mult = (u32)tmp;
507
508 return clocksource_register(&clocksource_hpet);
509}
510
511module_init(init_hpet_clocksource);
diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c
index d73c79e821f1..21d95b747437 100644
--- a/arch/x86_64/kernel/i8259.c
+++ b/arch/x86_64/kernel/i8259.c
@@ -103,6 +103,7 @@ static void mask_and_ack_8259A(unsigned int);
103static struct irq_chip i8259A_chip = { 103static struct irq_chip i8259A_chip = {
104 .name = "XT-PIC", 104 .name = "XT-PIC",
105 .mask = disable_8259A_irq, 105 .mask = disable_8259A_irq,
106 .disable = disable_8259A_irq,
106 .unmask = enable_8259A_irq, 107 .unmask = enable_8259A_irq,
107 .mask_ack = mask_and_ack_8259A, 108 .mask_ack = mask_and_ack_8259A,
108}; 109};
@@ -298,7 +299,7 @@ void init_8259A(int auto_eoi)
298 * outb_p - this has to work on a wide range of PC hardware. 299 * outb_p - this has to work on a wide range of PC hardware.
299 */ 300 */
300 outb_p(0x11, 0x20); /* ICW1: select 8259A-1 init */ 301 outb_p(0x11, 0x20); /* ICW1: select 8259A-1 init */
301 outb_p(0x20 + 0, 0x21); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */ 302 outb_p(IRQ0_VECTOR, 0x21); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */
302 outb_p(0x04, 0x21); /* 8259A-1 (the master) has a slave on IR2 */ 303 outb_p(0x04, 0x21); /* 8259A-1 (the master) has a slave on IR2 */
303 if (auto_eoi) 304 if (auto_eoi)
304 outb_p(0x03, 0x21); /* master does Auto EOI */ 305 outb_p(0x03, 0x21); /* master does Auto EOI */
@@ -306,7 +307,7 @@ void init_8259A(int auto_eoi)
306 outb_p(0x01, 0x21); /* master expects normal EOI */ 307 outb_p(0x01, 0x21); /* master expects normal EOI */
307 308
308 outb_p(0x11, 0xA0); /* ICW1: select 8259A-2 init */ 309 outb_p(0x11, 0xA0); /* ICW1: select 8259A-2 init */
309 outb_p(0x20 + 8, 0xA1); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */ 310 outb_p(IRQ8_VECTOR, 0xA1); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */
310 outb_p(0x02, 0xA1); /* 8259A-2 is a slave on master's IR2 */ 311 outb_p(0x02, 0xA1); /* 8259A-2 is a slave on master's IR2 */
311 outb_p(0x01, 0xA1); /* (slave's support for AEOI in flat mode 312 outb_p(0x01, 0xA1); /* (slave's support for AEOI in flat mode
312 is to be investigated) */ 313 is to be investigated) */
@@ -397,24 +398,24 @@ device_initcall(i8259A_init_sysfs);
397 398
398static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; 399static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
399DEFINE_PER_CPU(vector_irq_t, vector_irq) = { 400DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
400 [0 ... FIRST_EXTERNAL_VECTOR - 1] = -1, 401 [0 ... IRQ0_VECTOR - 1] = -1,
401 [FIRST_EXTERNAL_VECTOR + 0] = 0, 402 [IRQ0_VECTOR] = 0,
402 [FIRST_EXTERNAL_VECTOR + 1] = 1, 403 [IRQ1_VECTOR] = 1,
403 [FIRST_EXTERNAL_VECTOR + 2] = 2, 404 [IRQ2_VECTOR] = 2,
404 [FIRST_EXTERNAL_VECTOR + 3] = 3, 405 [IRQ3_VECTOR] = 3,
405 [FIRST_EXTERNAL_VECTOR + 4] = 4, 406 [IRQ4_VECTOR] = 4,
406 [FIRST_EXTERNAL_VECTOR + 5] = 5, 407 [IRQ5_VECTOR] = 5,
407 [FIRST_EXTERNAL_VECTOR + 6] = 6, 408 [IRQ6_VECTOR] = 6,
408 [FIRST_EXTERNAL_VECTOR + 7] = 7, 409 [IRQ7_VECTOR] = 7,
409 [FIRST_EXTERNAL_VECTOR + 8] = 8, 410 [IRQ8_VECTOR] = 8,
410 [FIRST_EXTERNAL_VECTOR + 9] = 9, 411 [IRQ9_VECTOR] = 9,
411 [FIRST_EXTERNAL_VECTOR + 10] = 10, 412 [IRQ10_VECTOR] = 10,
412 [FIRST_EXTERNAL_VECTOR + 11] = 11, 413 [IRQ11_VECTOR] = 11,
413 [FIRST_EXTERNAL_VECTOR + 12] = 12, 414 [IRQ12_VECTOR] = 12,
414 [FIRST_EXTERNAL_VECTOR + 13] = 13, 415 [IRQ13_VECTOR] = 13,
415 [FIRST_EXTERNAL_VECTOR + 14] = 14, 416 [IRQ14_VECTOR] = 14,
416 [FIRST_EXTERNAL_VECTOR + 15] = 15, 417 [IRQ15_VECTOR] = 15,
417 [FIRST_EXTERNAL_VECTOR + 16 ... NR_VECTORS - 1] = -1 418 [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1
418}; 419};
419 420
420void __init init_ISA_irqs (void) 421void __init init_ISA_irqs (void)
@@ -449,6 +450,7 @@ void spurious_interrupt(void);
449void error_interrupt(void); 450void error_interrupt(void);
450void reschedule_interrupt(void); 451void reschedule_interrupt(void);
451void call_function_interrupt(void); 452void call_function_interrupt(void);
453void irq_move_cleanup_interrupt(void);
452void invalidate_interrupt0(void); 454void invalidate_interrupt0(void);
453void invalidate_interrupt1(void); 455void invalidate_interrupt1(void);
454void invalidate_interrupt2(void); 456void invalidate_interrupt2(void);
@@ -519,12 +521,6 @@ void __init init_IRQ(void)
519 521
520#ifdef CONFIG_SMP 522#ifdef CONFIG_SMP
521 /* 523 /*
522 * IRQ0 must be given a fixed assignment and initialized,
523 * because it's used before the IO-APIC is set up.
524 */
525 __get_cpu_var(vector_irq)[FIRST_DEVICE_VECTOR] = 0;
526
527 /*
528 * The reschedule interrupt is a CPU-to-CPU reschedule-helper 524 * The reschedule interrupt is a CPU-to-CPU reschedule-helper
529 * IPI, driven by wakeup. 525 * IPI, driven by wakeup.
530 */ 526 */
@@ -542,7 +538,10 @@ void __init init_IRQ(void)
542 538
543 /* IPI for generic function call */ 539 /* IPI for generic function call */
544 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt); 540 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
545#endif 541
542 /* Low priority IPI to cleanup after moving an irq */
543 set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
544#endif
546 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 545 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
547 set_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 546 set_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
548 547
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index d7bad90a5ad8..48593f6b708f 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -36,6 +36,7 @@
36#include <acpi/acpi_bus.h> 36#include <acpi/acpi_bus.h>
37#endif 37#endif
38 38
39#include <asm/idle.h>
39#include <asm/io.h> 40#include <asm/io.h>
40#include <asm/smp.h> 41#include <asm/smp.h>
41#include <asm/desc.h> 42#include <asm/desc.h>
@@ -47,7 +48,35 @@
47#include <asm/msidef.h> 48#include <asm/msidef.h>
48#include <asm/hypertransport.h> 49#include <asm/hypertransport.h>
49 50
50static int assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result); 51struct irq_cfg {
52 cpumask_t domain;
53 cpumask_t old_domain;
54 unsigned move_cleanup_count;
55 u8 vector;
56 u8 move_in_progress : 1;
57};
58
59/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
60struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
61 [0] = { .domain = CPU_MASK_ALL, .vector = IRQ0_VECTOR, },
62 [1] = { .domain = CPU_MASK_ALL, .vector = IRQ1_VECTOR, },
63 [2] = { .domain = CPU_MASK_ALL, .vector = IRQ2_VECTOR, },
64 [3] = { .domain = CPU_MASK_ALL, .vector = IRQ3_VECTOR, },
65 [4] = { .domain = CPU_MASK_ALL, .vector = IRQ4_VECTOR, },
66 [5] = { .domain = CPU_MASK_ALL, .vector = IRQ5_VECTOR, },
67 [6] = { .domain = CPU_MASK_ALL, .vector = IRQ6_VECTOR, },
68 [7] = { .domain = CPU_MASK_ALL, .vector = IRQ7_VECTOR, },
69 [8] = { .domain = CPU_MASK_ALL, .vector = IRQ8_VECTOR, },
70 [9] = { .domain = CPU_MASK_ALL, .vector = IRQ9_VECTOR, },
71 [10] = { .domain = CPU_MASK_ALL, .vector = IRQ10_VECTOR, },
72 [11] = { .domain = CPU_MASK_ALL, .vector = IRQ11_VECTOR, },
73 [12] = { .domain = CPU_MASK_ALL, .vector = IRQ12_VECTOR, },
74 [13] = { .domain = CPU_MASK_ALL, .vector = IRQ13_VECTOR, },
75 [14] = { .domain = CPU_MASK_ALL, .vector = IRQ14_VECTOR, },
76 [15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
77};
78
79static int assign_irq_vector(int irq, cpumask_t mask);
51 80
52#define __apicdebuginit __init 81#define __apicdebuginit __init
53 82
@@ -74,7 +103,7 @@ int nr_ioapic_registers[MAX_IO_APICS];
74 * Rough estimation of how many shared IRQs there are, can 103 * Rough estimation of how many shared IRQs there are, can
75 * be changed anytime. 104 * be changed anytime.
76 */ 105 */
77#define MAX_PLUS_SHARED_IRQS NR_IRQ_VECTORS 106#define MAX_PLUS_SHARED_IRQS NR_IRQS
78#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS) 107#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS)
79 108
80/* 109/*
@@ -149,11 +178,11 @@ static inline void io_apic_sync(unsigned int apic)
149 reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \ 178 reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
150 reg ACTION; \ 179 reg ACTION; \
151 io_apic_modify(entry->apic, reg); \ 180 io_apic_modify(entry->apic, reg); \
181 FINAL; \
152 if (!entry->next) \ 182 if (!entry->next) \
153 break; \ 183 break; \
154 entry = irq_2_pin + entry->next; \ 184 entry = irq_2_pin + entry->next; \
155 } \ 185 } \
156 FINAL; \
157} 186}
158 187
159union entry_union { 188union entry_union {
@@ -237,21 +266,19 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
237 266
238static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) 267static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
239{ 268{
269 struct irq_cfg *cfg = irq_cfg + irq;
240 unsigned long flags; 270 unsigned long flags;
241 unsigned int dest; 271 unsigned int dest;
242 cpumask_t tmp; 272 cpumask_t tmp;
243 int vector;
244 273
245 cpus_and(tmp, mask, cpu_online_map); 274 cpus_and(tmp, mask, cpu_online_map);
246 if (cpus_empty(tmp)) 275 if (cpus_empty(tmp))
247 tmp = TARGET_CPUS; 276 return;
248
249 cpus_and(mask, tmp, CPU_MASK_ALL);
250 277
251 vector = assign_irq_vector(irq, mask, &tmp); 278 if (assign_irq_vector(irq, mask))
252 if (vector < 0)
253 return; 279 return;
254 280
281 cpus_and(tmp, cfg->domain, mask);
255 dest = cpu_mask_to_apicid(tmp); 282 dest = cpu_mask_to_apicid(tmp);
256 283
257 /* 284 /*
@@ -260,8 +287,8 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
260 dest = SET_APIC_LOGICAL_ID(dest); 287 dest = SET_APIC_LOGICAL_ID(dest);
261 288
262 spin_lock_irqsave(&ioapic_lock, flags); 289 spin_lock_irqsave(&ioapic_lock, flags);
263 __target_IO_APIC_irq(irq, dest, vector); 290 __target_IO_APIC_irq(irq, dest, cfg->vector);
264 set_native_irq_info(irq, mask); 291 irq_desc[irq].affinity = mask;
265 spin_unlock_irqrestore(&ioapic_lock, flags); 292 spin_unlock_irqrestore(&ioapic_lock, flags);
266} 293}
267#endif 294#endif
@@ -615,63 +642,7 @@ static int pin_2_irq(int idx, int apic, int pin)
615 return irq; 642 return irq;
616} 643}
617 644
618static inline int IO_APIC_irq_trigger(int irq) 645static int __assign_irq_vector(int irq, cpumask_t mask)
619{
620 int apic, idx, pin;
621
622 for (apic = 0; apic < nr_ioapics; apic++) {
623 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
624 idx = find_irq_entry(apic,pin,mp_INT);
625 if ((idx != -1) && (irq == pin_2_irq(idx,apic,pin)))
626 return irq_trigger(idx);
627 }
628 }
629 /*
630 * nonexistent IRQs are edge default
631 */
632 return 0;
633}
634
635/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
636static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = {
637 [0] = FIRST_EXTERNAL_VECTOR + 0,
638 [1] = FIRST_EXTERNAL_VECTOR + 1,
639 [2] = FIRST_EXTERNAL_VECTOR + 2,
640 [3] = FIRST_EXTERNAL_VECTOR + 3,
641 [4] = FIRST_EXTERNAL_VECTOR + 4,
642 [5] = FIRST_EXTERNAL_VECTOR + 5,
643 [6] = FIRST_EXTERNAL_VECTOR + 6,
644 [7] = FIRST_EXTERNAL_VECTOR + 7,
645 [8] = FIRST_EXTERNAL_VECTOR + 8,
646 [9] = FIRST_EXTERNAL_VECTOR + 9,
647 [10] = FIRST_EXTERNAL_VECTOR + 10,
648 [11] = FIRST_EXTERNAL_VECTOR + 11,
649 [12] = FIRST_EXTERNAL_VECTOR + 12,
650 [13] = FIRST_EXTERNAL_VECTOR + 13,
651 [14] = FIRST_EXTERNAL_VECTOR + 14,
652 [15] = FIRST_EXTERNAL_VECTOR + 15,
653};
654
655static cpumask_t irq_domain[NR_IRQ_VECTORS] __read_mostly = {
656 [0] = CPU_MASK_ALL,
657 [1] = CPU_MASK_ALL,
658 [2] = CPU_MASK_ALL,
659 [3] = CPU_MASK_ALL,
660 [4] = CPU_MASK_ALL,
661 [5] = CPU_MASK_ALL,
662 [6] = CPU_MASK_ALL,
663 [7] = CPU_MASK_ALL,
664 [8] = CPU_MASK_ALL,
665 [9] = CPU_MASK_ALL,
666 [10] = CPU_MASK_ALL,
667 [11] = CPU_MASK_ALL,
668 [12] = CPU_MASK_ALL,
669 [13] = CPU_MASK_ALL,
670 [14] = CPU_MASK_ALL,
671 [15] = CPU_MASK_ALL,
672};
673
674static int __assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result)
675{ 646{
676 /* 647 /*
677 * NOTE! The local APIC isn't very good at handling 648 * NOTE! The local APIC isn't very good at handling
@@ -685,20 +656,25 @@ static int __assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result)
685 * 0x80, because int 0x80 is hm, kind of importantish. ;) 656 * 0x80, because int 0x80 is hm, kind of importantish. ;)
686 */ 657 */
687 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; 658 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0;
688 int old_vector = -1; 659 unsigned int old_vector;
689 int cpu; 660 int cpu;
661 struct irq_cfg *cfg;
690 662
691 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 663 BUG_ON((unsigned)irq >= NR_IRQS);
664 cfg = &irq_cfg[irq];
692 665
693 /* Only try and allocate irqs on cpus that are present */ 666 /* Only try and allocate irqs on cpus that are present */
694 cpus_and(mask, mask, cpu_online_map); 667 cpus_and(mask, mask, cpu_online_map);
695 668
696 if (irq_vector[irq] > 0) 669 if ((cfg->move_in_progress) || cfg->move_cleanup_count)
697 old_vector = irq_vector[irq]; 670 return -EBUSY;
698 if (old_vector > 0) { 671
699 cpus_and(*result, irq_domain[irq], mask); 672 old_vector = cfg->vector;
700 if (!cpus_empty(*result)) 673 if (old_vector) {
701 return old_vector; 674 cpumask_t tmp;
675 cpus_and(tmp, cfg->domain, mask);
676 if (!cpus_empty(tmp))
677 return 0;
702 } 678 }
703 679
704 for_each_cpu_mask(cpu, mask) { 680 for_each_cpu_mask(cpu, mask) {
@@ -728,48 +704,47 @@ next:
728 /* Found one! */ 704 /* Found one! */
729 current_vector = vector; 705 current_vector = vector;
730 current_offset = offset; 706 current_offset = offset;
731 if (old_vector >= 0) { 707 if (old_vector) {
732 cpumask_t old_mask; 708 cfg->move_in_progress = 1;
733 int old_cpu; 709 cfg->old_domain = cfg->domain;
734 cpus_and(old_mask, irq_domain[irq], cpu_online_map);
735 for_each_cpu_mask(old_cpu, old_mask)
736 per_cpu(vector_irq, old_cpu)[old_vector] = -1;
737 } 710 }
738 for_each_cpu_mask(new_cpu, new_mask) 711 for_each_cpu_mask(new_cpu, new_mask)
739 per_cpu(vector_irq, new_cpu)[vector] = irq; 712 per_cpu(vector_irq, new_cpu)[vector] = irq;
740 irq_vector[irq] = vector; 713 cfg->vector = vector;
741 irq_domain[irq] = domain; 714 cfg->domain = domain;
742 cpus_and(*result, domain, mask); 715 return 0;
743 return vector;
744 } 716 }
745 return -ENOSPC; 717 return -ENOSPC;
746} 718}
747 719
748static int assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result) 720static int assign_irq_vector(int irq, cpumask_t mask)
749{ 721{
750 int vector; 722 int err;
751 unsigned long flags; 723 unsigned long flags;
752 724
753 spin_lock_irqsave(&vector_lock, flags); 725 spin_lock_irqsave(&vector_lock, flags);
754 vector = __assign_irq_vector(irq, mask, result); 726 err = __assign_irq_vector(irq, mask);
755 spin_unlock_irqrestore(&vector_lock, flags); 727 spin_unlock_irqrestore(&vector_lock, flags);
756 return vector; 728 return err;
757} 729}
758 730
759static void __clear_irq_vector(int irq) 731static void __clear_irq_vector(int irq)
760{ 732{
733 struct irq_cfg *cfg;
761 cpumask_t mask; 734 cpumask_t mask;
762 int cpu, vector; 735 int cpu, vector;
763 736
764 BUG_ON(!irq_vector[irq]); 737 BUG_ON((unsigned)irq >= NR_IRQS);
738 cfg = &irq_cfg[irq];
739 BUG_ON(!cfg->vector);
765 740
766 vector = irq_vector[irq]; 741 vector = cfg->vector;
767 cpus_and(mask, irq_domain[irq], cpu_online_map); 742 cpus_and(mask, cfg->domain, cpu_online_map);
768 for_each_cpu_mask(cpu, mask) 743 for_each_cpu_mask(cpu, mask)
769 per_cpu(vector_irq, cpu)[vector] = -1; 744 per_cpu(vector_irq, cpu)[vector] = -1;
770 745
771 irq_vector[irq] = 0; 746 cfg->vector = 0;
772 irq_domain[irq] = CPU_MASK_NONE; 747 cfg->domain = CPU_MASK_NONE;
773} 748}
774 749
775void __setup_vector_irq(int cpu) 750void __setup_vector_irq(int cpu)
@@ -779,10 +754,10 @@ void __setup_vector_irq(int cpu)
779 int irq, vector; 754 int irq, vector;
780 755
781 /* Mark the inuse vectors */ 756 /* Mark the inuse vectors */
782 for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { 757 for (irq = 0; irq < NR_IRQS; ++irq) {
783 if (!cpu_isset(cpu, irq_domain[irq])) 758 if (!cpu_isset(cpu, irq_cfg[irq].domain))
784 continue; 759 continue;
785 vector = irq_vector[irq]; 760 vector = irq_cfg[irq].vector;
786 per_cpu(vector_irq, cpu)[vector] = irq; 761 per_cpu(vector_irq, cpu)[vector] = irq;
787 } 762 }
788 /* Mark the free vectors */ 763 /* Mark the free vectors */
@@ -790,38 +765,46 @@ void __setup_vector_irq(int cpu)
790 irq = per_cpu(vector_irq, cpu)[vector]; 765 irq = per_cpu(vector_irq, cpu)[vector];
791 if (irq < 0) 766 if (irq < 0)
792 continue; 767 continue;
793 if (!cpu_isset(cpu, irq_domain[irq])) 768 if (!cpu_isset(cpu, irq_cfg[irq].domain))
794 per_cpu(vector_irq, cpu)[vector] = -1; 769 per_cpu(vector_irq, cpu)[vector] = -1;
795 } 770 }
796} 771}
797 772
798 773
799extern void (*interrupt[NR_IRQS])(void);
800
801static struct irq_chip ioapic_chip; 774static struct irq_chip ioapic_chip;
802 775
803#define IOAPIC_AUTO -1 776static void ioapic_register_intr(int irq, unsigned long trigger)
804#define IOAPIC_EDGE 0
805#define IOAPIC_LEVEL 1
806
807static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
808{ 777{
809 if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || 778 if (trigger)
810 trigger == IOAPIC_LEVEL)
811 set_irq_chip_and_handler_name(irq, &ioapic_chip, 779 set_irq_chip_and_handler_name(irq, &ioapic_chip,
812 handle_fasteoi_irq, "fasteoi"); 780 handle_fasteoi_irq, "fasteoi");
813 else { 781 else
814 irq_desc[irq].status |= IRQ_DELAYED_DISABLE;
815 set_irq_chip_and_handler_name(irq, &ioapic_chip, 782 set_irq_chip_and_handler_name(irq, &ioapic_chip,
816 handle_edge_irq, "edge"); 783 handle_edge_irq, "edge");
817 }
818} 784}
819static void __init setup_IO_APIC_irq(int apic, int pin, int idx, int irq) 785
786static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
787 int trigger, int polarity)
820{ 788{
789 struct irq_cfg *cfg = irq_cfg + irq;
821 struct IO_APIC_route_entry entry; 790 struct IO_APIC_route_entry entry;
822 int vector; 791 cpumask_t mask;
823 unsigned long flags; 792 unsigned long flags;
824 793
794 if (!IO_APIC_IRQ(irq))
795 return;
796
797 mask = TARGET_CPUS;
798 if (assign_irq_vector(irq, mask))
799 return;
800
801 cpus_and(mask, cfg->domain, mask);
802
803 apic_printk(APIC_VERBOSE,KERN_DEBUG
804 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> "
805 "IRQ %d Mode:%i Active:%i)\n",
806 apic, mp_ioapics[apic].mpc_apicid, pin, cfg->vector,
807 irq, trigger, polarity);
825 808
826 /* 809 /*
827 * add it to the IO-APIC irq-routing table: 810 * add it to the IO-APIC irq-routing table:
@@ -830,41 +813,27 @@ static void __init setup_IO_APIC_irq(int apic, int pin, int idx, int irq)
830 813
831 entry.delivery_mode = INT_DELIVERY_MODE; 814 entry.delivery_mode = INT_DELIVERY_MODE;
832 entry.dest_mode = INT_DEST_MODE; 815 entry.dest_mode = INT_DEST_MODE;
816 entry.dest = cpu_mask_to_apicid(mask);
833 entry.mask = 0; /* enable IRQ */ 817 entry.mask = 0; /* enable IRQ */
834 entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); 818 entry.trigger = trigger;
835 819 entry.polarity = polarity;
836 entry.trigger = irq_trigger(idx); 820 entry.vector = cfg->vector;
837 entry.polarity = irq_polarity(idx);
838 821
839 if (irq_trigger(idx)) { 822 /* Mask level triggered irqs.
840 entry.trigger = 1; 823 * Use IRQ_DELAYED_DISABLE for edge triggered irqs.
824 */
825 if (trigger)
841 entry.mask = 1; 826 entry.mask = 1;
842 entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
843 }
844 827
845 if (!apic && !IO_APIC_IRQ(irq)) 828 ioapic_register_intr(irq, trigger);
846 return; 829 if (irq < 16)
847 830 disable_8259A_irq(irq);
848 if (IO_APIC_IRQ(irq)) {
849 cpumask_t mask;
850 vector = assign_irq_vector(irq, TARGET_CPUS, &mask);
851 if (vector < 0)
852 return;
853
854 entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask);
855 entry.vector = vector;
856
857 ioapic_register_intr(irq, vector, IOAPIC_AUTO);
858 if (!apic && (irq < 16))
859 disable_8259A_irq(irq);
860 }
861 831
862 ioapic_write_entry(apic, pin, entry); 832 ioapic_write_entry(apic, pin, entry);
863 833
864 spin_lock_irqsave(&ioapic_lock, flags); 834 spin_lock_irqsave(&ioapic_lock, flags);
865 set_native_irq_info(irq, TARGET_CPUS); 835 irq_desc[irq].affinity = TARGET_CPUS;
866 spin_unlock_irqrestore(&ioapic_lock, flags); 836 spin_unlock_irqrestore(&ioapic_lock, flags);
867
868} 837}
869 838
870static void __init setup_IO_APIC_irqs(void) 839static void __init setup_IO_APIC_irqs(void)
@@ -889,8 +858,8 @@ static void __init setup_IO_APIC_irqs(void)
889 irq = pin_2_irq(idx, apic, pin); 858 irq = pin_2_irq(idx, apic, pin);
890 add_pin_to_irq(irq, apic, pin); 859 add_pin_to_irq(irq, apic, pin);
891 860
892 setup_IO_APIC_irq(apic, pin, idx, irq); 861 setup_IO_APIC_irq(apic, pin, irq,
893 862 irq_trigger(idx), irq_polarity(idx));
894 } 863 }
895 } 864 }
896 865
@@ -920,7 +889,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
920 */ 889 */
921 entry.dest_mode = INT_DEST_MODE; 890 entry.dest_mode = INT_DEST_MODE;
922 entry.mask = 0; /* unmask IRQ now */ 891 entry.mask = 0; /* unmask IRQ now */
923 entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); 892 entry.dest = cpu_mask_to_apicid(TARGET_CPUS);
924 entry.delivery_mode = INT_DELIVERY_MODE; 893 entry.delivery_mode = INT_DELIVERY_MODE;
925 entry.polarity = 0; 894 entry.polarity = 0;
926 entry.trigger = 0; 895 entry.trigger = 0;
@@ -1020,18 +989,17 @@ void __apicdebuginit print_IO_APIC(void)
1020 989
1021 printk(KERN_DEBUG ".... IRQ redirection table:\n"); 990 printk(KERN_DEBUG ".... IRQ redirection table:\n");
1022 991
1023 printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol" 992 printk(KERN_DEBUG " NR Dst Mask Trig IRR Pol"
1024 " Stat Dest Deli Vect: \n"); 993 " Stat Dmod Deli Vect: \n");
1025 994
1026 for (i = 0; i <= reg_01.bits.entries; i++) { 995 for (i = 0; i <= reg_01.bits.entries; i++) {
1027 struct IO_APIC_route_entry entry; 996 struct IO_APIC_route_entry entry;
1028 997
1029 entry = ioapic_read_entry(apic, i); 998 entry = ioapic_read_entry(apic, i);
1030 999
1031 printk(KERN_DEBUG " %02x %03X %02X ", 1000 printk(KERN_DEBUG " %02x %03X ",
1032 i, 1001 i,
1033 entry.dest.logical.logical_dest, 1002 entry.dest
1034 entry.dest.physical.physical_dest
1035 ); 1003 );
1036 1004
1037 printk("%1d %1d %1d %1d %1d %1d %1d %02X\n", 1005 printk("%1d %1d %1d %1d %1d %1d %1d %02X\n",
@@ -1293,8 +1261,7 @@ void disable_IO_APIC(void)
1293 entry.dest_mode = 0; /* Physical */ 1261 entry.dest_mode = 0; /* Physical */
1294 entry.delivery_mode = dest_ExtINT; /* ExtInt */ 1262 entry.delivery_mode = dest_ExtINT; /* ExtInt */
1295 entry.vector = 0; 1263 entry.vector = 0;
1296 entry.dest.physical.physical_dest = 1264 entry.dest = GET_APIC_ID(apic_read(APIC_ID));
1297 GET_APIC_ID(apic_read(APIC_ID));
1298 1265
1299 /* 1266 /*
1300 * Add it to the IO-APIC irq-routing table: 1267 * Add it to the IO-APIC irq-routing table:
@@ -1377,16 +1344,15 @@ static unsigned int startup_ioapic_irq(unsigned int irq)
1377 1344
1378static int ioapic_retrigger_irq(unsigned int irq) 1345static int ioapic_retrigger_irq(unsigned int irq)
1379{ 1346{
1347 struct irq_cfg *cfg = &irq_cfg[irq];
1380 cpumask_t mask; 1348 cpumask_t mask;
1381 unsigned vector;
1382 unsigned long flags; 1349 unsigned long flags;
1383 1350
1384 spin_lock_irqsave(&vector_lock, flags); 1351 spin_lock_irqsave(&vector_lock, flags);
1385 vector = irq_vector[irq];
1386 cpus_clear(mask); 1352 cpus_clear(mask);
1387 cpu_set(first_cpu(irq_domain[irq]), mask); 1353 cpu_set(first_cpu(cfg->domain), mask);
1388 1354
1389 send_IPI_mask(mask, vector); 1355 send_IPI_mask(mask, cfg->vector);
1390 spin_unlock_irqrestore(&vector_lock, flags); 1356 spin_unlock_irqrestore(&vector_lock, flags);
1391 1357
1392 return 1; 1358 return 1;
@@ -1401,8 +1367,68 @@ static int ioapic_retrigger_irq(unsigned int irq)
1401 * races. 1367 * races.
1402 */ 1368 */
1403 1369
1370#ifdef CONFIG_SMP
1371asmlinkage void smp_irq_move_cleanup_interrupt(void)
1372{
1373 unsigned vector, me;
1374 ack_APIC_irq();
1375 exit_idle();
1376 irq_enter();
1377
1378 me = smp_processor_id();
1379 for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
1380 unsigned int irq;
1381 struct irq_desc *desc;
1382 struct irq_cfg *cfg;
1383 irq = __get_cpu_var(vector_irq)[vector];
1384 if (irq >= NR_IRQS)
1385 continue;
1386
1387 desc = irq_desc + irq;
1388 cfg = irq_cfg + irq;
1389 spin_lock(&desc->lock);
1390 if (!cfg->move_cleanup_count)
1391 goto unlock;
1392
1393 if ((vector == cfg->vector) && cpu_isset(me, cfg->domain))
1394 goto unlock;
1395
1396 __get_cpu_var(vector_irq)[vector] = -1;
1397 cfg->move_cleanup_count--;
1398unlock:
1399 spin_unlock(&desc->lock);
1400 }
1401
1402 irq_exit();
1403}
1404
1405static void irq_complete_move(unsigned int irq)
1406{
1407 struct irq_cfg *cfg = irq_cfg + irq;
1408 unsigned vector, me;
1409
1410 if (likely(!cfg->move_in_progress))
1411 return;
1412
1413 vector = ~get_irq_regs()->orig_rax;
1414 me = smp_processor_id();
1415 if ((vector == cfg->vector) &&
1416 cpu_isset(smp_processor_id(), cfg->domain)) {
1417 cpumask_t cleanup_mask;
1418
1419 cpus_and(cleanup_mask, cfg->old_domain, cpu_online_map);
1420 cfg->move_cleanup_count = cpus_weight(cleanup_mask);
1421 send_IPI_mask(cleanup_mask, IRQ_MOVE_CLEANUP_VECTOR);
1422 cfg->move_in_progress = 0;
1423 }
1424}
1425#else
1426static inline void irq_complete_move(unsigned int irq) {}
1427#endif
1428
1404static void ack_apic_edge(unsigned int irq) 1429static void ack_apic_edge(unsigned int irq)
1405{ 1430{
1431 irq_complete_move(irq);
1406 move_native_irq(irq); 1432 move_native_irq(irq);
1407 ack_APIC_irq(); 1433 ack_APIC_irq();
1408} 1434}
@@ -1411,6 +1437,7 @@ static void ack_apic_level(unsigned int irq)
1411{ 1437{
1412 int do_unmask_irq = 0; 1438 int do_unmask_irq = 0;
1413 1439
1440 irq_complete_move(irq);
1414#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) 1441#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
1415 /* If we are moving the irq we need to mask it */ 1442 /* If we are moving the irq we need to mask it */
1416 if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) { 1443 if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) {
@@ -1461,7 +1488,7 @@ static inline void init_IO_APIC_traps(void)
1461 */ 1488 */
1462 for (irq = 0; irq < NR_IRQS ; irq++) { 1489 for (irq = 0; irq < NR_IRQS ; irq++) {
1463 int tmp = irq; 1490 int tmp = irq;
1464 if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) { 1491 if (IO_APIC_IRQ(tmp) && !irq_cfg[tmp].vector) {
1465 /* 1492 /*
1466 * Hmm.. We don't have an entry for this, 1493 * Hmm.. We don't have an entry for this,
1467 * so default to an old-fashioned 8259 1494 * so default to an old-fashioned 8259
@@ -1556,7 +1583,7 @@ static inline void unlock_ExtINT_logic(void)
1556 1583
1557 entry1.dest_mode = 0; /* physical delivery */ 1584 entry1.dest_mode = 0; /* physical delivery */
1558 entry1.mask = 0; /* unmask IRQ now */ 1585 entry1.mask = 0; /* unmask IRQ now */
1559 entry1.dest.physical.physical_dest = hard_smp_processor_id(); 1586 entry1.dest = hard_smp_processor_id();
1560 entry1.delivery_mode = dest_ExtINT; 1587 entry1.delivery_mode = dest_ExtINT;
1561 entry1.polarity = entry0.polarity; 1588 entry1.polarity = entry0.polarity;
1562 entry1.trigger = 0; 1589 entry1.trigger = 0;
@@ -1600,15 +1627,14 @@ static inline void unlock_ExtINT_logic(void)
1600 */ 1627 */
1601static inline void check_timer(void) 1628static inline void check_timer(void)
1602{ 1629{
1630 struct irq_cfg *cfg = irq_cfg + 0;
1603 int apic1, pin1, apic2, pin2; 1631 int apic1, pin1, apic2, pin2;
1604 int vector;
1605 cpumask_t mask;
1606 1632
1607 /* 1633 /*
1608 * get/set the timer IRQ vector: 1634 * get/set the timer IRQ vector:
1609 */ 1635 */
1610 disable_8259A_irq(0); 1636 disable_8259A_irq(0);
1611 vector = assign_irq_vector(0, TARGET_CPUS, &mask); 1637 assign_irq_vector(0, TARGET_CPUS);
1612 1638
1613 /* 1639 /*
1614 * Subtle, code in do_timer_interrupt() expects an AEOI 1640 * Subtle, code in do_timer_interrupt() expects an AEOI
@@ -1628,7 +1654,7 @@ static inline void check_timer(void)
1628 apic2 = ioapic_i8259.apic; 1654 apic2 = ioapic_i8259.apic;
1629 1655
1630 apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", 1656 apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
1631 vector, apic1, pin1, apic2, pin2); 1657 cfg->vector, apic1, pin1, apic2, pin2);
1632 1658
1633 if (pin1 != -1) { 1659 if (pin1 != -1) {
1634 /* 1660 /*
@@ -1659,7 +1685,7 @@ static inline void check_timer(void)
1659 /* 1685 /*
1660 * legacy devices should be connected to IO APIC #0 1686 * legacy devices should be connected to IO APIC #0
1661 */ 1687 */
1662 setup_ExtINT_IRQ0_pin(apic2, pin2, vector); 1688 setup_ExtINT_IRQ0_pin(apic2, pin2, cfg->vector);
1663 if (timer_irq_works()) { 1689 if (timer_irq_works()) {
1664 apic_printk(APIC_VERBOSE," works.\n"); 1690 apic_printk(APIC_VERBOSE," works.\n");
1665 nmi_watchdog_default(); 1691 nmi_watchdog_default();
@@ -1684,14 +1710,14 @@ static inline void check_timer(void)
1684 1710
1685 disable_8259A_irq(0); 1711 disable_8259A_irq(0);
1686 irq_desc[0].chip = &lapic_irq_type; 1712 irq_desc[0].chip = &lapic_irq_type;
1687 apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ 1713 apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */
1688 enable_8259A_irq(0); 1714 enable_8259A_irq(0);
1689 1715
1690 if (timer_irq_works()) { 1716 if (timer_irq_works()) {
1691 apic_printk(APIC_VERBOSE," works.\n"); 1717 apic_printk(APIC_VERBOSE," works.\n");
1692 return; 1718 return;
1693 } 1719 }
1694 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); 1720 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector);
1695 apic_printk(APIC_VERBOSE," failed.\n"); 1721 apic_printk(APIC_VERBOSE," failed.\n");
1696 1722
1697 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as ExtINT IRQ..."); 1723 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as ExtINT IRQ...");
@@ -1838,19 +1864,16 @@ int create_irq(void)
1838 /* Allocate an unused irq */ 1864 /* Allocate an unused irq */
1839 int irq; 1865 int irq;
1840 int new; 1866 int new;
1841 int vector = 0;
1842 unsigned long flags; 1867 unsigned long flags;
1843 cpumask_t mask;
1844 1868
1845 irq = -ENOSPC; 1869 irq = -ENOSPC;
1846 spin_lock_irqsave(&vector_lock, flags); 1870 spin_lock_irqsave(&vector_lock, flags);
1847 for (new = (NR_IRQS - 1); new >= 0; new--) { 1871 for (new = (NR_IRQS - 1); new >= 0; new--) {
1848 if (platform_legacy_irq(new)) 1872 if (platform_legacy_irq(new))
1849 continue; 1873 continue;
1850 if (irq_vector[new] != 0) 1874 if (irq_cfg[new].vector != 0)
1851 continue; 1875 continue;
1852 vector = __assign_irq_vector(new, TARGET_CPUS, &mask); 1876 if (__assign_irq_vector(new, TARGET_CPUS) == 0)
1853 if (likely(vector > 0))
1854 irq = new; 1877 irq = new;
1855 break; 1878 break;
1856 } 1879 }
@@ -1879,12 +1902,15 @@ void destroy_irq(unsigned int irq)
1879#ifdef CONFIG_PCI_MSI 1902#ifdef CONFIG_PCI_MSI
1880static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) 1903static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg)
1881{ 1904{
1882 int vector; 1905 struct irq_cfg *cfg = irq_cfg + irq;
1906 int err;
1883 unsigned dest; 1907 unsigned dest;
1884 cpumask_t tmp; 1908 cpumask_t tmp;
1885 1909
1886 vector = assign_irq_vector(irq, TARGET_CPUS, &tmp); 1910 tmp = TARGET_CPUS;
1887 if (vector >= 0) { 1911 err = assign_irq_vector(irq, tmp);
1912 if (!err) {
1913 cpus_and(tmp, cfg->domain, tmp);
1888 dest = cpu_mask_to_apicid(tmp); 1914 dest = cpu_mask_to_apicid(tmp);
1889 1915
1890 msg->address_hi = MSI_ADDR_BASE_HI; 1916 msg->address_hi = MSI_ADDR_BASE_HI;
@@ -1904,40 +1930,38 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
1904 ((INT_DELIVERY_MODE != dest_LowestPrio) ? 1930 ((INT_DELIVERY_MODE != dest_LowestPrio) ?
1905 MSI_DATA_DELIVERY_FIXED: 1931 MSI_DATA_DELIVERY_FIXED:
1906 MSI_DATA_DELIVERY_LOWPRI) | 1932 MSI_DATA_DELIVERY_LOWPRI) |
1907 MSI_DATA_VECTOR(vector); 1933 MSI_DATA_VECTOR(cfg->vector);
1908 } 1934 }
1909 return vector; 1935 return err;
1910} 1936}
1911 1937
1912#ifdef CONFIG_SMP 1938#ifdef CONFIG_SMP
1913static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask) 1939static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
1914{ 1940{
1941 struct irq_cfg *cfg = irq_cfg + irq;
1915 struct msi_msg msg; 1942 struct msi_msg msg;
1916 unsigned int dest; 1943 unsigned int dest;
1917 cpumask_t tmp; 1944 cpumask_t tmp;
1918 int vector;
1919 1945
1920 cpus_and(tmp, mask, cpu_online_map); 1946 cpus_and(tmp, mask, cpu_online_map);
1921 if (cpus_empty(tmp)) 1947 if (cpus_empty(tmp))
1922 tmp = TARGET_CPUS; 1948 return;
1923
1924 cpus_and(mask, tmp, CPU_MASK_ALL);
1925 1949
1926 vector = assign_irq_vector(irq, mask, &tmp); 1950 if (assign_irq_vector(irq, mask))
1927 if (vector < 0)
1928 return; 1951 return;
1929 1952
1953 cpus_and(tmp, cfg->domain, mask);
1930 dest = cpu_mask_to_apicid(tmp); 1954 dest = cpu_mask_to_apicid(tmp);
1931 1955
1932 read_msi_msg(irq, &msg); 1956 read_msi_msg(irq, &msg);
1933 1957
1934 msg.data &= ~MSI_DATA_VECTOR_MASK; 1958 msg.data &= ~MSI_DATA_VECTOR_MASK;
1935 msg.data |= MSI_DATA_VECTOR(vector); 1959 msg.data |= MSI_DATA_VECTOR(cfg->vector);
1936 msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK; 1960 msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
1937 msg.address_lo |= MSI_ADDR_DEST_ID(dest); 1961 msg.address_lo |= MSI_ADDR_DEST_ID(dest);
1938 1962
1939 write_msi_msg(irq, &msg); 1963 write_msi_msg(irq, &msg);
1940 set_native_irq_info(irq, mask); 1964 irq_desc[irq].affinity = mask;
1941} 1965}
1942#endif /* CONFIG_SMP */ 1966#endif /* CONFIG_SMP */
1943 1967
@@ -1956,24 +1980,31 @@ static struct irq_chip msi_chip = {
1956 .retrigger = ioapic_retrigger_irq, 1980 .retrigger = ioapic_retrigger_irq,
1957}; 1981};
1958 1982
1959int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev) 1983int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
1960{ 1984{
1961 struct msi_msg msg; 1985 struct msi_msg msg;
1962 int ret; 1986 int irq, ret;
1987 irq = create_irq();
1988 if (irq < 0)
1989 return irq;
1990
1991 set_irq_msi(irq, desc);
1963 ret = msi_compose_msg(dev, irq, &msg); 1992 ret = msi_compose_msg(dev, irq, &msg);
1964 if (ret < 0) 1993 if (ret < 0) {
1994 destroy_irq(irq);
1965 return ret; 1995 return ret;
1996 }
1966 1997
1967 write_msi_msg(irq, &msg); 1998 write_msi_msg(irq, &msg);
1968 1999
1969 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); 2000 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge");
1970 2001
1971 return 0; 2002 return irq;
1972} 2003}
1973 2004
1974void arch_teardown_msi_irq(unsigned int irq) 2005void arch_teardown_msi_irq(unsigned int irq)
1975{ 2006{
1976 return; 2007 destroy_irq(irq);
1977} 2008}
1978 2009
1979#endif /* CONFIG_PCI_MSI */ 2010#endif /* CONFIG_PCI_MSI */
@@ -2001,24 +2032,22 @@ static void target_ht_irq(unsigned int irq, unsigned int dest, u8 vector)
2001 2032
2002static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) 2033static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
2003{ 2034{
2035 struct irq_cfg *cfg = irq_cfg + irq;
2004 unsigned int dest; 2036 unsigned int dest;
2005 cpumask_t tmp; 2037 cpumask_t tmp;
2006 int vector;
2007 2038
2008 cpus_and(tmp, mask, cpu_online_map); 2039 cpus_and(tmp, mask, cpu_online_map);
2009 if (cpus_empty(tmp)) 2040 if (cpus_empty(tmp))
2010 tmp = TARGET_CPUS; 2041 return;
2011
2012 cpus_and(mask, tmp, CPU_MASK_ALL);
2013 2042
2014 vector = assign_irq_vector(irq, mask, &tmp); 2043 if (assign_irq_vector(irq, mask))
2015 if (vector < 0)
2016 return; 2044 return;
2017 2045
2046 cpus_and(tmp, cfg->domain, mask);
2018 dest = cpu_mask_to_apicid(tmp); 2047 dest = cpu_mask_to_apicid(tmp);
2019 2048
2020 target_ht_irq(irq, dest, vector); 2049 target_ht_irq(irq, dest, cfg->vector);
2021 set_native_irq_info(irq, mask); 2050 irq_desc[irq].affinity = mask;
2022} 2051}
2023#endif 2052#endif
2024 2053
@@ -2035,14 +2064,17 @@ static struct irq_chip ht_irq_chip = {
2035 2064
2036int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) 2065int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2037{ 2066{
2038 int vector; 2067 struct irq_cfg *cfg = irq_cfg + irq;
2068 int err;
2039 cpumask_t tmp; 2069 cpumask_t tmp;
2040 2070
2041 vector = assign_irq_vector(irq, TARGET_CPUS, &tmp); 2071 tmp = TARGET_CPUS;
2042 if (vector >= 0) { 2072 err = assign_irq_vector(irq, tmp);
2073 if (!err) {
2043 struct ht_irq_msg msg; 2074 struct ht_irq_msg msg;
2044 unsigned dest; 2075 unsigned dest;
2045 2076
2077 cpus_and(tmp, cfg->domain, tmp);
2046 dest = cpu_mask_to_apicid(tmp); 2078 dest = cpu_mask_to_apicid(tmp);
2047 2079
2048 msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); 2080 msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
@@ -2050,7 +2082,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2050 msg.address_lo = 2082 msg.address_lo =
2051 HT_IRQ_LOW_BASE | 2083 HT_IRQ_LOW_BASE |
2052 HT_IRQ_LOW_DEST_ID(dest) | 2084 HT_IRQ_LOW_DEST_ID(dest) |
2053 HT_IRQ_LOW_VECTOR(vector) | 2085 HT_IRQ_LOW_VECTOR(cfg->vector) |
2054 ((INT_DEST_MODE == 0) ? 2086 ((INT_DEST_MODE == 0) ?
2055 HT_IRQ_LOW_DM_PHYSICAL : 2087 HT_IRQ_LOW_DM_PHYSICAL :
2056 HT_IRQ_LOW_DM_LOGICAL) | 2088 HT_IRQ_LOW_DM_LOGICAL) |
@@ -2065,7 +2097,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2065 set_irq_chip_and_handler_name(irq, &ht_irq_chip, 2097 set_irq_chip_and_handler_name(irq, &ht_irq_chip,
2066 handle_edge_irq, "edge"); 2098 handle_edge_irq, "edge");
2067 } 2099 }
2068 return vector; 2100 return err;
2069} 2101}
2070#endif /* CONFIG_HT_IRQ */ 2102#endif /* CONFIG_HT_IRQ */
2071 2103
@@ -2092,11 +2124,6 @@ int __init io_apic_get_redir_entries (int ioapic)
2092 2124
2093int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int polarity) 2125int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int polarity)
2094{ 2126{
2095 struct IO_APIC_route_entry entry;
2096 unsigned long flags;
2097 int vector;
2098 cpumask_t mask;
2099
2100 if (!IO_APIC_IRQ(irq)) { 2127 if (!IO_APIC_IRQ(irq)) {
2101 apic_printk(APIC_QUIET,KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n", 2128 apic_printk(APIC_QUIET,KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n",
2102 ioapic); 2129 ioapic);
@@ -2109,42 +2136,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
2109 if (irq >= 16) 2136 if (irq >= 16)
2110 add_pin_to_irq(irq, ioapic, pin); 2137 add_pin_to_irq(irq, ioapic, pin);
2111 2138
2112 2139 setup_IO_APIC_irq(ioapic, pin, irq, triggering, polarity);
2113 vector = assign_irq_vector(irq, TARGET_CPUS, &mask);
2114 if (vector < 0)
2115 return vector;
2116
2117 /*
2118 * Generate a PCI IRQ routing entry and program the IOAPIC accordingly.
2119 * Note that we mask (disable) IRQs now -- these get enabled when the
2120 * corresponding device driver registers for this IRQ.
2121 */
2122
2123 memset(&entry,0,sizeof(entry));
2124
2125 entry.delivery_mode = INT_DELIVERY_MODE;
2126 entry.dest_mode = INT_DEST_MODE;
2127 entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask);
2128 entry.trigger = triggering;
2129 entry.polarity = polarity;
2130 entry.mask = 1; /* Disabled (masked) */
2131 entry.vector = vector & 0xff;
2132
2133 apic_printk(APIC_VERBOSE,KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
2134 "IRQ %d Mode:%i Active:%i)\n", ioapic,
2135 mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq,
2136 triggering, polarity);
2137
2138 ioapic_register_intr(irq, entry.vector, triggering);
2139
2140 if (!ioapic && (irq < 16))
2141 disable_8259A_irq(irq);
2142
2143 ioapic_write_entry(ioapic, pin, entry);
2144
2145 spin_lock_irqsave(&ioapic_lock, flags);
2146 set_native_irq_info(irq, TARGET_CPUS);
2147 spin_unlock_irqrestore(&ioapic_lock, flags);
2148 2140
2149 return 0; 2141 return 0;
2150} 2142}
@@ -2176,8 +2168,10 @@ void __init setup_ioapic_dest(void)
2176 * when you have too many devices, because at that time only boot 2168 * when you have too many devices, because at that time only boot
2177 * cpu is online. 2169 * cpu is online.
2178 */ 2170 */
2179 if(!irq_vector[irq]) 2171 if (!irq_cfg[irq].vector)
2180 setup_IO_APIC_irq(ioapic, pin, irq_entry, irq); 2172 setup_IO_APIC_irq(ioapic, pin, irq,
2173 irq_trigger(irq_entry),
2174 irq_polarity(irq_entry));
2181 else 2175 else
2182 set_ioapic_affinity_irq(irq, TARGET_CPUS); 2176 set_ioapic_affinity_irq(irq, TARGET_CPUS);
2183 } 2177 }
diff --git a/arch/x86_64/kernel/ioport.c b/arch/x86_64/kernel/ioport.c
index fe063d3cfe42..745b1f0f494e 100644
--- a/arch/x86_64/kernel/ioport.c
+++ b/arch/x86_64/kernel/ioport.c
@@ -114,6 +114,6 @@ asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs)
114 if (!capable(CAP_SYS_RAWIO)) 114 if (!capable(CAP_SYS_RAWIO))
115 return -EPERM; 115 return -EPERM;
116 } 116 }
117 regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12); 117 regs->eflags = (regs->eflags &~ X86_EFLAGS_IOPL) | (level << 12);
118 return 0; 118 return 0;
119} 119}
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 0c06af6c13bc..3bc30d2c13d3 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -18,6 +18,7 @@
18#include <asm/uaccess.h> 18#include <asm/uaccess.h>
19#include <asm/io_apic.h> 19#include <asm/io_apic.h>
20#include <asm/idle.h> 20#include <asm/idle.h>
21#include <asm/smp.h>
21 22
22atomic_t irq_err_count; 23atomic_t irq_err_count;
23 24
@@ -120,9 +121,14 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
120 121
121 if (likely(irq < NR_IRQS)) 122 if (likely(irq < NR_IRQS))
122 generic_handle_irq(irq); 123 generic_handle_irq(irq);
123 else if (printk_ratelimit()) 124 else {
124 printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n", 125 if (!disable_apic)
125 __func__, smp_processor_id(), vector); 126 ack_APIC_irq();
127
128 if (printk_ratelimit())
129 printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n",
130 __func__, smp_processor_id(), vector);
131 }
126 132
127 irq_exit(); 133 irq_exit();
128 134
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index ac085038af29..8011a8e1c7d4 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -19,6 +19,7 @@
19#include <linux/cpu.h> 19#include <linux/cpu.h>
20#include <linux/percpu.h> 20#include <linux/percpu.h>
21#include <linux/ctype.h> 21#include <linux/ctype.h>
22#include <linux/kmod.h>
22#include <asm/processor.h> 23#include <asm/processor.h>
23#include <asm/msr.h> 24#include <asm/msr.h>
24#include <asm/mce.h> 25#include <asm/mce.h>
@@ -42,6 +43,10 @@ static unsigned long console_logged;
42static int notify_user; 43static int notify_user;
43static int rip_msr; 44static int rip_msr;
44static int mce_bootlog = 1; 45static int mce_bootlog = 1;
46static atomic_t mce_events;
47
48static char trigger[128];
49static char *trigger_argv[2] = { trigger, NULL };
45 50
46/* 51/*
47 * Lockless MCE logging infrastructure. 52 * Lockless MCE logging infrastructure.
@@ -57,6 +62,7 @@ struct mce_log mcelog = {
57void mce_log(struct mce *mce) 62void mce_log(struct mce *mce)
58{ 63{
59 unsigned next, entry; 64 unsigned next, entry;
65 atomic_inc(&mce_events);
60 mce->finished = 0; 66 mce->finished = 0;
61 wmb(); 67 wmb();
62 for (;;) { 68 for (;;) {
@@ -161,6 +167,17 @@ static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
161 } 167 }
162} 168}
163 169
170static void do_mce_trigger(void)
171{
172 static atomic_t mce_logged;
173 int events = atomic_read(&mce_events);
174 if (events != atomic_read(&mce_logged) && trigger[0]) {
175 /* Small race window, but should be harmless. */
176 atomic_set(&mce_logged, events);
177 call_usermodehelper(trigger, trigger_argv, NULL, -1);
178 }
179}
180
164/* 181/*
165 * The actual machine check handler 182 * The actual machine check handler
166 */ 183 */
@@ -234,8 +251,12 @@ void do_machine_check(struct pt_regs * regs, long error_code)
234 } 251 }
235 252
236 /* Never do anything final in the polling timer */ 253 /* Never do anything final in the polling timer */
237 if (!regs) 254 if (!regs) {
255 /* Normal interrupt context here. Call trigger for any new
256 events. */
257 do_mce_trigger();
238 goto out; 258 goto out;
259 }
239 260
240 /* If we didn't find an uncorrectable error, pick 261 /* If we didn't find an uncorrectable error, pick
241 the last one (shouldn't happen, just being safe). */ 262 the last one (shouldn't happen, just being safe). */
@@ -516,7 +537,7 @@ static int mce_ioctl(struct inode *i, struct file *f,unsigned int cmd, unsigned
516 } 537 }
517} 538}
518 539
519static struct file_operations mce_chrdev_ops = { 540static const struct file_operations mce_chrdev_ops = {
520 .read = mce_read, 541 .read = mce_read,
521 .ioctl = mce_ioctl, 542 .ioctl = mce_ioctl,
522}; 543};
@@ -606,17 +627,42 @@ DEFINE_PER_CPU(struct sys_device, device_mce);
606 } \ 627 } \
607 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name); 628 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name);
608 629
630/* TBD should generate these dynamically based on number of available banks */
609ACCESSOR(bank0ctl,bank[0],mce_restart()) 631ACCESSOR(bank0ctl,bank[0],mce_restart())
610ACCESSOR(bank1ctl,bank[1],mce_restart()) 632ACCESSOR(bank1ctl,bank[1],mce_restart())
611ACCESSOR(bank2ctl,bank[2],mce_restart()) 633ACCESSOR(bank2ctl,bank[2],mce_restart())
612ACCESSOR(bank3ctl,bank[3],mce_restart()) 634ACCESSOR(bank3ctl,bank[3],mce_restart())
613ACCESSOR(bank4ctl,bank[4],mce_restart()) 635ACCESSOR(bank4ctl,bank[4],mce_restart())
614ACCESSOR(bank5ctl,bank[5],mce_restart()) 636ACCESSOR(bank5ctl,bank[5],mce_restart())
615static struct sysdev_attribute * bank_attributes[NR_BANKS] = { 637
616 &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl, 638static ssize_t show_trigger(struct sys_device *s, char *buf)
617 &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl}; 639{
640 strcpy(buf, trigger);
641 strcat(buf, "\n");
642 return strlen(trigger) + 1;
643}
644
645static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz)
646{
647 char *p;
648 int len;
649 strncpy(trigger, buf, sizeof(trigger));
650 trigger[sizeof(trigger)-1] = 0;
651 len = strlen(trigger);
652 p = strchr(trigger, '\n');
653 if (*p) *p = 0;
654 return len;
655}
656
657static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger);
618ACCESSOR(tolerant,tolerant,) 658ACCESSOR(tolerant,tolerant,)
619ACCESSOR(check_interval,check_interval,mce_restart()) 659ACCESSOR(check_interval,check_interval,mce_restart())
660static struct sysdev_attribute *mce_attributes[] = {
661 &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl,
662 &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl,
663 &attr_tolerant, &attr_check_interval, &attr_trigger,
664 NULL
665};
620 666
621/* Per cpu sysdev init. All of the cpus still share the same ctl bank */ 667/* Per cpu sysdev init. All of the cpus still share the same ctl bank */
622static __cpuinit int mce_create_device(unsigned int cpu) 668static __cpuinit int mce_create_device(unsigned int cpu)
@@ -632,11 +678,9 @@ static __cpuinit int mce_create_device(unsigned int cpu)
632 err = sysdev_register(&per_cpu(device_mce,cpu)); 678 err = sysdev_register(&per_cpu(device_mce,cpu));
633 679
634 if (!err) { 680 if (!err) {
635 for (i = 0; i < banks; i++) 681 for (i = 0; mce_attributes[i]; i++)
636 sysdev_create_file(&per_cpu(device_mce,cpu), 682 sysdev_create_file(&per_cpu(device_mce,cpu),
637 bank_attributes[i]); 683 mce_attributes[i]);
638 sysdev_create_file(&per_cpu(device_mce,cpu), &attr_tolerant);
639 sysdev_create_file(&per_cpu(device_mce,cpu), &attr_check_interval);
640 } 684 }
641 return err; 685 return err;
642} 686}
@@ -645,11 +689,9 @@ static void mce_remove_device(unsigned int cpu)
645{ 689{
646 int i; 690 int i;
647 691
648 for (i = 0; i < banks; i++) 692 for (i = 0; mce_attributes[i]; i++)
649 sysdev_remove_file(&per_cpu(device_mce,cpu), 693 sysdev_remove_file(&per_cpu(device_mce,cpu),
650 bank_attributes[i]); 694 mce_attributes[i]);
651 sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_tolerant);
652 sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
653 sysdev_unregister(&per_cpu(device_mce,cpu)); 695 sysdev_unregister(&per_cpu(device_mce,cpu));
654 memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); 696 memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject));
655} 697}
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c
index fa09debad4b7..d0bd5d66e103 100644
--- a/arch/x86_64/kernel/mce_amd.c
+++ b/arch/x86_64/kernel/mce_amd.c
@@ -37,6 +37,8 @@
37#define THRESHOLD_MAX 0xFFF 37#define THRESHOLD_MAX 0xFFF
38#define INT_TYPE_APIC 0x00020000 38#define INT_TYPE_APIC 0x00020000
39#define MASK_VALID_HI 0x80000000 39#define MASK_VALID_HI 0x80000000
40#define MASK_CNTP_HI 0x40000000
41#define MASK_LOCKED_HI 0x20000000
40#define MASK_LVTOFF_HI 0x00F00000 42#define MASK_LVTOFF_HI 0x00F00000
41#define MASK_COUNT_EN_HI 0x00080000 43#define MASK_COUNT_EN_HI 0x00080000
42#define MASK_INT_TYPE_HI 0x00060000 44#define MASK_INT_TYPE_HI 0x00060000
@@ -122,14 +124,17 @@ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)
122 for (block = 0; block < NR_BLOCKS; ++block) { 124 for (block = 0; block < NR_BLOCKS; ++block) {
123 if (block == 0) 125 if (block == 0)
124 address = MSR_IA32_MC0_MISC + bank * 4; 126 address = MSR_IA32_MC0_MISC + bank * 4;
125 else if (block == 1) 127 else if (block == 1) {
126 address = MCG_XBLK_ADDR 128 address = (low & MASK_BLKPTR_LO) >> 21;
127 + ((low & MASK_BLKPTR_LO) >> 21); 129 if (!address)
130 break;
131 address += MCG_XBLK_ADDR;
132 }
128 else 133 else
129 ++address; 134 ++address;
130 135
131 if (rdmsr_safe(address, &low, &high)) 136 if (rdmsr_safe(address, &low, &high))
132 continue; 137 break;
133 138
134 if (!(high & MASK_VALID_HI)) { 139 if (!(high & MASK_VALID_HI)) {
135 if (block) 140 if (block)
@@ -138,8 +143,8 @@ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)
138 break; 143 break;
139 } 144 }
140 145
141 if (!(high & MASK_VALID_HI >> 1) || 146 if (!(high & MASK_CNTP_HI) ||
142 (high & MASK_VALID_HI >> 2)) 147 (high & MASK_LOCKED_HI))
143 continue; 148 continue;
144 149
145 if (!block) 150 if (!block)
@@ -187,17 +192,22 @@ asmlinkage void mce_threshold_interrupt(void)
187 192
188 /* assume first bank caused it */ 193 /* assume first bank caused it */
189 for (bank = 0; bank < NR_BANKS; ++bank) { 194 for (bank = 0; bank < NR_BANKS; ++bank) {
195 if (!(per_cpu(bank_map, m.cpu) & (1 << bank)))
196 continue;
190 for (block = 0; block < NR_BLOCKS; ++block) { 197 for (block = 0; block < NR_BLOCKS; ++block) {
191 if (block == 0) 198 if (block == 0)
192 address = MSR_IA32_MC0_MISC + bank * 4; 199 address = MSR_IA32_MC0_MISC + bank * 4;
193 else if (block == 1) 200 else if (block == 1) {
194 address = MCG_XBLK_ADDR 201 address = (low & MASK_BLKPTR_LO) >> 21;
195 + ((low & MASK_BLKPTR_LO) >> 21); 202 if (!address)
203 break;
204 address += MCG_XBLK_ADDR;
205 }
196 else 206 else
197 ++address; 207 ++address;
198 208
199 if (rdmsr_safe(address, &low, &high)) 209 if (rdmsr_safe(address, &low, &high))
200 continue; 210 break;
201 211
202 if (!(high & MASK_VALID_HI)) { 212 if (!(high & MASK_VALID_HI)) {
203 if (block) 213 if (block)
@@ -206,10 +216,14 @@ asmlinkage void mce_threshold_interrupt(void)
206 break; 216 break;
207 } 217 }
208 218
209 if (!(high & MASK_VALID_HI >> 1) || 219 if (!(high & MASK_CNTP_HI) ||
210 (high & MASK_VALID_HI >> 2)) 220 (high & MASK_LOCKED_HI))
211 continue; 221 continue;
212 222
223 /* Log the machine check that caused the threshold
224 event. */
225 do_machine_check(NULL, 0);
226
213 if (high & MASK_OVERFLOW_HI) { 227 if (high & MASK_OVERFLOW_HI) {
214 rdmsrl(address, m.misc); 228 rdmsrl(address, m.misc);
215 rdmsrl(MSR_IA32_MC0_STATUS + bank * 4, 229 rdmsrl(MSR_IA32_MC0_STATUS + bank * 4,
@@ -385,7 +399,7 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
385 return 0; 399 return 0;
386 400
387 if (rdmsr_safe(address, &low, &high)) 401 if (rdmsr_safe(address, &low, &high))
388 goto recurse; 402 return 0;
389 403
390 if (!(high & MASK_VALID_HI)) { 404 if (!(high & MASK_VALID_HI)) {
391 if (block) 405 if (block)
@@ -394,14 +408,13 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
394 return 0; 408 return 0;
395 } 409 }
396 410
397 if (!(high & MASK_VALID_HI >> 1) || 411 if (!(high & MASK_CNTP_HI) ||
398 (high & MASK_VALID_HI >> 2)) 412 (high & MASK_LOCKED_HI))
399 goto recurse; 413 goto recurse;
400 414
401 b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL); 415 b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL);
402 if (!b) 416 if (!b)
403 return -ENOMEM; 417 return -ENOMEM;
404 memset(b, 0, sizeof(struct threshold_block));
405 418
406 b->block = block; 419 b->block = block;
407 b->bank = bank; 420 b->bank = bank;
@@ -490,7 +503,6 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
490 err = -ENOMEM; 503 err = -ENOMEM;
491 goto out; 504 goto out;
492 } 505 }
493 memset(b, 0, sizeof(struct threshold_bank));
494 506
495 kobject_set_name(&b->kobj, "threshold_bank%i", bank); 507 kobject_set_name(&b->kobj, "threshold_bank%i", bank);
496 b->kobj.parent = &per_cpu(device_mce, cpu).kobj; 508 b->kobj.parent = &per_cpu(device_mce, cpu).kobj;
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 08072568847d..50dd8bef850e 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -798,7 +798,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
798 return gsi; 798 return gsi;
799 799
800 /* Don't set up the ACPI SCI because it's already set up */ 800 /* Don't set up the ACPI SCI because it's already set up */
801 if (acpi_fadt.sci_int == gsi) 801 if (acpi_gbl_FADT.sci_interrupt == gsi)
802 return gsi; 802 return gsi;
803 803
804 ioapic = mp_find_ioapic(gsi); 804 ioapic = mp_find_ioapic(gsi);
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 9cb42ecb7f89..486f4c61a948 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -172,7 +172,7 @@ static __cpuinit inline int nmi_known_cpu(void)
172{ 172{
173 switch (boot_cpu_data.x86_vendor) { 173 switch (boot_cpu_data.x86_vendor) {
174 case X86_VENDOR_AMD: 174 case X86_VENDOR_AMD:
175 return boot_cpu_data.x86 == 15; 175 return boot_cpu_data.x86 == 15 || boot_cpu_data.x86 == 16;
176 case X86_VENDOR_INTEL: 176 case X86_VENDOR_INTEL:
177 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) 177 if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON))
178 return 1; 178 return 1;
@@ -214,6 +214,23 @@ static __init void nmi_cpu_busy(void *data)
214} 214}
215#endif 215#endif
216 216
217static unsigned int adjust_for_32bit_ctr(unsigned int hz)
218{
219 unsigned int retval = hz;
220
221 /*
222 * On Intel CPUs with ARCH_PERFMON only 32 bits in the counter
223 * are writable, with higher bits sign extending from bit 31.
224 * So, we can only program the counter with 31 bit values and
225 * 32nd bit should be 1, for 33.. to be 1.
226 * Find the appropriate nmi_hz
227 */
228 if ((((u64)cpu_khz * 1000) / retval) > 0x7fffffffULL) {
229 retval = ((u64)cpu_khz * 1000) / 0x7fffffffUL + 1;
230 }
231 return retval;
232}
233
217int __init check_nmi_watchdog (void) 234int __init check_nmi_watchdog (void)
218{ 235{
219 int *counts; 236 int *counts;
@@ -268,17 +285,8 @@ int __init check_nmi_watchdog (void)
268 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 285 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
269 286
270 nmi_hz = 1; 287 nmi_hz = 1;
271 /* 288 if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0)
272 * On Intel CPUs with ARCH_PERFMON only 32 bits in the counter 289 nmi_hz = adjust_for_32bit_ctr(nmi_hz);
273 * are writable, with higher bits sign extending from bit 31.
274 * So, we can only program the counter with 31 bit values and
275 * 32nd bit should be 1, for 33.. to be 1.
276 * Find the appropriate nmi_hz
277 */
278 if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0 &&
279 ((u64)cpu_khz * 1000) > 0x7fffffffULL) {
280 nmi_hz = ((u64)cpu_khz * 1000) / 0x7fffffffUL + 1;
281 }
282 } 290 }
283 291
284 kfree(counts); 292 kfree(counts);
@@ -360,6 +368,33 @@ void enable_timer_nmi_watchdog(void)
360 } 368 }
361} 369}
362 370
371static void __acpi_nmi_disable(void *__unused)
372{
373 apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
374}
375
376/*
377 * Disable timer based NMIs on all CPUs:
378 */
379void acpi_nmi_disable(void)
380{
381 if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC)
382 on_each_cpu(__acpi_nmi_disable, NULL, 0, 1);
383}
384
385static void __acpi_nmi_enable(void *__unused)
386{
387 apic_write(APIC_LVT0, APIC_DM_NMI);
388}
389
390/*
391 * Enable timer based NMIs on all CPUs:
392 */
393void acpi_nmi_enable(void)
394{
395 if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC)
396 on_each_cpu(__acpi_nmi_enable, NULL, 0, 1);
397}
363#ifdef CONFIG_PM 398#ifdef CONFIG_PM
364 399
365static int nmi_pm_active; /* nmi_active before suspend */ 400static int nmi_pm_active; /* nmi_active before suspend */
@@ -634,7 +669,9 @@ static int setup_intel_arch_watchdog(void)
634 669
635 /* setup the timer */ 670 /* setup the timer */
636 wrmsr(evntsel_msr, evntsel, 0); 671 wrmsr(evntsel_msr, evntsel, 0);
637 wrmsrl(perfctr_msr, -((u64)cpu_khz * 1000 / nmi_hz)); 672
673 nmi_hz = adjust_for_32bit_ctr(nmi_hz);
674 wrmsr(perfctr_msr, (u32)(-((u64)cpu_khz * 1000 / nmi_hz)), 0);
638 675
639 apic_write(APIC_LVTPC, APIC_DM_NMI); 676 apic_write(APIC_LVTPC, APIC_DM_NMI);
640 evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE; 677 evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE;
@@ -855,15 +892,23 @@ int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
855 dummy &= ~P4_CCCR_OVF; 892 dummy &= ~P4_CCCR_OVF;
856 wrmsrl(wd->cccr_msr, dummy); 893 wrmsrl(wd->cccr_msr, dummy);
857 apic_write(APIC_LVTPC, APIC_DM_NMI); 894 apic_write(APIC_LVTPC, APIC_DM_NMI);
895 /* start the cycle over again */
896 wrmsrl(wd->perfctr_msr,
897 -((u64)cpu_khz * 1000 / nmi_hz));
858 } else if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { 898 } else if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) {
859 /* 899 /*
860 * ArchPerfom/Core Duo needs to re-unmask 900 * ArchPerfom/Core Duo needs to re-unmask
861 * the apic vector 901 * the apic vector
862 */ 902 */
863 apic_write(APIC_LVTPC, APIC_DM_NMI); 903 apic_write(APIC_LVTPC, APIC_DM_NMI);
904 /* ARCH_PERFMON has 32 bit counter writes */
905 wrmsr(wd->perfctr_msr,
906 (u32)(-((u64)cpu_khz * 1000 / nmi_hz)), 0);
907 } else {
908 /* start the cycle over again */
909 wrmsrl(wd->perfctr_msr,
910 -((u64)cpu_khz * 1000 / nmi_hz));
864 } 911 }
865 /* start the cycle over again */
866 wrmsrl(wd->perfctr_msr, -((u64)cpu_khz * 1000 / nmi_hz));
867 rc = 1; 912 rc = 1;
868 } else if (nmi_watchdog == NMI_IO_APIC) { 913 } else if (nmi_watchdog == NMI_IO_APIC) {
869 /* don't know how to accurately check for this. 914 /* don't know how to accurately check for this.
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c
index 3d65b1d4c2b3..04480c3b68f5 100644
--- a/arch/x86_64/kernel/pci-calgary.c
+++ b/arch/x86_64/kernel/pci-calgary.c
@@ -138,6 +138,8 @@ static const unsigned long phb_debug_offsets[] = {
138 138
139#define PHB_DEBUG_STUFF_OFFSET 0x0020 139#define PHB_DEBUG_STUFF_OFFSET 0x0020
140 140
141#define EMERGENCY_PAGES 32 /* = 128KB */
142
141unsigned int specified_table_size = TCE_TABLE_SIZE_UNSPECIFIED; 143unsigned int specified_table_size = TCE_TABLE_SIZE_UNSPECIFIED;
142static int translate_empty_slots __read_mostly = 0; 144static int translate_empty_slots __read_mostly = 0;
143static int calgary_detected __read_mostly = 0; 145static int calgary_detected __read_mostly = 0;
@@ -296,6 +298,16 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
296{ 298{
297 unsigned long entry; 299 unsigned long entry;
298 unsigned long badbit; 300 unsigned long badbit;
301 unsigned long badend;
302
303 /* were we called with bad_dma_address? */
304 badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE);
305 if (unlikely((dma_addr >= bad_dma_address) && (dma_addr < badend))) {
306 printk(KERN_ERR "Calgary: driver tried unmapping bad DMA "
307 "address 0x%Lx\n", dma_addr);
308 WARN_ON(1);
309 return;
310 }
299 311
300 entry = dma_addr >> PAGE_SHIFT; 312 entry = dma_addr >> PAGE_SHIFT;
301 313
@@ -656,8 +668,8 @@ static void __init calgary_reserve_regions(struct pci_dev *dev)
656 u64 start; 668 u64 start;
657 struct iommu_table *tbl = dev->sysdata; 669 struct iommu_table *tbl = dev->sysdata;
658 670
659 /* reserve bad_dma_address in case it's a legal address */ 671 /* reserve EMERGENCY_PAGES from bad_dma_address and up */
660 iommu_range_reserve(tbl, bad_dma_address, 1); 672 iommu_range_reserve(tbl, bad_dma_address, EMERGENCY_PAGES);
661 673
662 /* avoid the BIOS/VGA first 640KB-1MB region */ 674 /* avoid the BIOS/VGA first 640KB-1MB region */
663 start = (640 * 1024); 675 start = (640 * 1024);
@@ -1176,6 +1188,7 @@ int __init calgary_iommu_init(void)
1176 } 1188 }
1177 1189
1178 force_iommu = 1; 1190 force_iommu = 1;
1191 bad_dma_address = 0x0;
1179 dma_ops = &calgary_dma_ops; 1192 dma_ops = &calgary_dma_ops;
1180 1193
1181 return 0; 1194 return 0;
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 683b7a5c1ab3..651ccfb06697 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -223,30 +223,10 @@ int dma_set_mask(struct device *dev, u64 mask)
223} 223}
224EXPORT_SYMBOL(dma_set_mask); 224EXPORT_SYMBOL(dma_set_mask);
225 225
226/* iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge] 226/*
227 [,forcesac][,fullflush][,nomerge][,biomerge] 227 * See <Documentation/x86_64/boot-options.txt> for the iommu kernel parameter
228 size set size of iommu (in bytes) 228 * documentation.
229 noagp don't initialize the AGP driver and use full aperture. 229 */
230 off don't use the IOMMU
231 leak turn on simple iommu leak tracing (only when CONFIG_IOMMU_LEAK is on)
232 memaper[=order] allocate an own aperture over RAM with size 32MB^order.
233 noforce don't force IOMMU usage. Default.
234 force Force IOMMU.
235 merge Do lazy merging. This may improve performance on some block devices.
236 Implies force (experimental)
237 biomerge Do merging at the BIO layer. This is more efficient than merge,
238 but should be only done with very big IOMMUs. Implies merge,force.
239 nomerge Don't do SG merging.
240 forcesac For SAC mode for masks <40bits (experimental)
241 fullflush Flush IOMMU on each allocation (default)
242 nofullflush Don't use IOMMU fullflush
243 allowed overwrite iommu off workarounds for specific chipsets.
244 soft Use software bounce buffering (default for Intel machines)
245 noaperture Don't touch the aperture for AGP.
246 allowdac Allow DMA >4GB
247 nodac Forbid DMA >4GB
248 panic Force panic when IOMMU overflows
249*/
250__init int iommu_setup(char *p) 230__init int iommu_setup(char *p)
251{ 231{
252 iommu_merge = 1; 232 iommu_merge = 1;
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index fc1960f1f243..030eb3753358 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -185,7 +185,7 @@ static void iommu_full(struct device *dev, size_t size, int dir)
185static inline int need_iommu(struct device *dev, unsigned long addr, size_t size) 185static inline int need_iommu(struct device *dev, unsigned long addr, size_t size)
186{ 186{
187 u64 mask = *dev->dma_mask; 187 u64 mask = *dev->dma_mask;
188 int high = addr + size >= mask; 188 int high = addr + size > mask;
189 int mmu = high; 189 int mmu = high;
190 if (force_iommu) 190 if (force_iommu)
191 mmu = 1; 191 mmu = 1;
@@ -195,7 +195,7 @@ static inline int need_iommu(struct device *dev, unsigned long addr, size_t size
195static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t size) 195static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t size)
196{ 196{
197 u64 mask = *dev->dma_mask; 197 u64 mask = *dev->dma_mask;
198 int high = addr + size >= mask; 198 int high = addr + size > mask;
199 int mmu = high; 199 int mmu = high;
200 return mmu; 200 return mmu;
201} 201}
diff --git a/arch/x86_64/kernel/pci-swiotlb.c b/arch/x86_64/kernel/pci-swiotlb.c
index 697f0aa794b9..eb18be5a6569 100644
--- a/arch/x86_64/kernel/pci-swiotlb.c
+++ b/arch/x86_64/kernel/pci-swiotlb.c
@@ -29,7 +29,7 @@ struct dma_mapping_ops swiotlb_dma_ops = {
29 .dma_supported = NULL, 29 .dma_supported = NULL,
30}; 30};
31 31
32void pci_swiotlb_init(void) 32void __init pci_swiotlb_init(void)
33{ 33{
34 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 34 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
35 if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) 35 if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN)
diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c
index 7554458dc9cb..ae8f91214f15 100644
--- a/arch/x86_64/kernel/pmtimer.c
+++ b/arch/x86_64/kernel/pmtimer.c
@@ -24,15 +24,6 @@
24#include <asm/msr.h> 24#include <asm/msr.h>
25#include <asm/vsyscall.h> 25#include <asm/vsyscall.h>
26 26
27/* The I/O port the PMTMR resides at.
28 * The location is detected during setup_arch(),
29 * in arch/i386/kernel/acpi/boot.c */
30u32 pmtmr_ioport __read_mostly;
31
32/* value of the Power timer at last timer interrupt */
33static u32 offset_delay;
34static u32 last_pmtmr_tick;
35
36#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */ 27#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */
37 28
38static inline u32 cyc2us(u32 cycles) 29static inline u32 cyc2us(u32 cycles)
@@ -48,38 +39,6 @@ static inline u32 cyc2us(u32 cycles)
48 return (cycles >> 10); 39 return (cycles >> 10);
49} 40}
50 41
51int pmtimer_mark_offset(void)
52{
53 static int first_run = 1;
54 unsigned long tsc;
55 u32 lost;
56
57 u32 tick = inl(pmtmr_ioport);
58 u32 delta;
59
60 delta = cyc2us((tick - last_pmtmr_tick) & ACPI_PM_MASK);
61
62 last_pmtmr_tick = tick;
63 monotonic_base += delta * NSEC_PER_USEC;
64
65 delta += offset_delay;
66
67 lost = delta / (USEC_PER_SEC / HZ);
68 offset_delay = delta % (USEC_PER_SEC / HZ);
69
70 rdtscll(tsc);
71 vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000;
72
73 /* don't calculate delay for first run,
74 or if we've got less then a tick */
75 if (first_run || (lost < 1)) {
76 first_run = 0;
77 offset_delay = 0;
78 }
79
80 return lost - 1;
81}
82
83static unsigned pmtimer_wait_tick(void) 42static unsigned pmtimer_wait_tick(void)
84{ 43{
85 u32 a, b; 44 u32 a, b;
@@ -101,23 +60,6 @@ void pmtimer_wait(unsigned us)
101 } while (cyc2us(b - a) < us); 60 } while (cyc2us(b - a) < us);
102} 61}
103 62
104void pmtimer_resume(void)
105{
106 last_pmtmr_tick = inl(pmtmr_ioport);
107}
108
109unsigned int do_gettimeoffset_pm(void)
110{
111 u32 now, offset, delta = 0;
112
113 offset = last_pmtmr_tick;
114 now = inl(pmtmr_ioport);
115 delta = (now - offset) & ACPI_PM_MASK;
116
117 return offset_delay + cyc2us(delta);
118}
119
120
121static int __init nopmtimer_setup(char *s) 63static int __init nopmtimer_setup(char *s)
122{ 64{
123 pmtmr_ioport = 0; 65 pmtmr_ioport = 0;
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c
index addc14af0c56..4326a690a509 100644
--- a/arch/x86_64/kernel/ptrace.c
+++ b/arch/x86_64/kernel/ptrace.c
@@ -536,8 +536,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
536 } 536 }
537 ret = 0; 537 ret = 0;
538 for (ui = 0; ui < sizeof(struct user_regs_struct); ui += sizeof(long)) { 538 for (ui = 0; ui < sizeof(struct user_regs_struct); ui += sizeof(long)) {
539 ret |= __get_user(tmp, (unsigned long __user *) data); 539 ret = __get_user(tmp, (unsigned long __user *) data);
540 putreg(child, ui, tmp); 540 if (ret)
541 break;
542 ret = putreg(child, ui, tmp);
543 if (ret)
544 break;
541 data += sizeof(long); 545 data += sizeof(long);
542 } 546 }
543 break; 547 break;
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index af425a8049fb..3d98b696881d 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -100,7 +100,7 @@ EXPORT_SYMBOL_GPL(edid_info);
100 100
101extern int root_mountflags; 101extern int root_mountflags;
102 102
103char command_line[COMMAND_LINE_SIZE]; 103char __initdata command_line[COMMAND_LINE_SIZE];
104 104
105struct resource standard_io_resources[] = { 105struct resource standard_io_resources[] = {
106 { .name = "dma1", .start = 0x00, .end = 0x1f, 106 { .name = "dma1", .start = 0x00, .end = 0x1f,
@@ -138,128 +138,6 @@ struct resource code_resource = {
138 .flags = IORESOURCE_RAM, 138 .flags = IORESOURCE_RAM,
139}; 139};
140 140
141#define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
142
143static struct resource system_rom_resource = {
144 .name = "System ROM",
145 .start = 0xf0000,
146 .end = 0xfffff,
147 .flags = IORESOURCE_ROM,
148};
149
150static struct resource extension_rom_resource = {
151 .name = "Extension ROM",
152 .start = 0xe0000,
153 .end = 0xeffff,
154 .flags = IORESOURCE_ROM,
155};
156
157static struct resource adapter_rom_resources[] = {
158 { .name = "Adapter ROM", .start = 0xc8000, .end = 0,
159 .flags = IORESOURCE_ROM },
160 { .name = "Adapter ROM", .start = 0, .end = 0,
161 .flags = IORESOURCE_ROM },
162 { .name = "Adapter ROM", .start = 0, .end = 0,
163 .flags = IORESOURCE_ROM },
164 { .name = "Adapter ROM", .start = 0, .end = 0,
165 .flags = IORESOURCE_ROM },
166 { .name = "Adapter ROM", .start = 0, .end = 0,
167 .flags = IORESOURCE_ROM },
168 { .name = "Adapter ROM", .start = 0, .end = 0,
169 .flags = IORESOURCE_ROM }
170};
171
172static struct resource video_rom_resource = {
173 .name = "Video ROM",
174 .start = 0xc0000,
175 .end = 0xc7fff,
176 .flags = IORESOURCE_ROM,
177};
178
179static struct resource video_ram_resource = {
180 .name = "Video RAM area",
181 .start = 0xa0000,
182 .end = 0xbffff,
183 .flags = IORESOURCE_RAM,
184};
185
186#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
187
188static int __init romchecksum(unsigned char *rom, unsigned long length)
189{
190 unsigned char *p, sum = 0;
191
192 for (p = rom; p < rom + length; p++)
193 sum += *p;
194 return sum == 0;
195}
196
197static void __init probe_roms(void)
198{
199 unsigned long start, length, upper;
200 unsigned char *rom;
201 int i;
202
203 /* video rom */
204 upper = adapter_rom_resources[0].start;
205 for (start = video_rom_resource.start; start < upper; start += 2048) {
206 rom = isa_bus_to_virt(start);
207 if (!romsignature(rom))
208 continue;
209
210 video_rom_resource.start = start;
211
212 /* 0 < length <= 0x7f * 512, historically */
213 length = rom[2] * 512;
214
215 /* if checksum okay, trust length byte */
216 if (length && romchecksum(rom, length))
217 video_rom_resource.end = start + length - 1;
218
219 request_resource(&iomem_resource, &video_rom_resource);
220 break;
221 }
222
223 start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
224 if (start < upper)
225 start = upper;
226
227 /* system rom */
228 request_resource(&iomem_resource, &system_rom_resource);
229 upper = system_rom_resource.start;
230
231 /* check for extension rom (ignore length byte!) */
232 rom = isa_bus_to_virt(extension_rom_resource.start);
233 if (romsignature(rom)) {
234 length = extension_rom_resource.end - extension_rom_resource.start + 1;
235 if (romchecksum(rom, length)) {
236 request_resource(&iomem_resource, &extension_rom_resource);
237 upper = extension_rom_resource.start;
238 }
239 }
240
241 /* check for adapter roms on 2k boundaries */
242 for (i = 0; i < ARRAY_SIZE(adapter_rom_resources) && start < upper;
243 start += 2048) {
244 rom = isa_bus_to_virt(start);
245 if (!romsignature(rom))
246 continue;
247
248 /* 0 < length <= 0x7f * 512, historically */
249 length = rom[2] * 512;
250
251 /* but accept any length that fits if checksum okay */
252 if (!length || start + length > upper || !romchecksum(rom, length))
253 continue;
254
255 adapter_rom_resources[i].start = start;
256 adapter_rom_resources[i].end = start + length - 1;
257 request_resource(&iomem_resource, &adapter_rom_resources[i]);
258
259 start = adapter_rom_resources[i++].end & ~2047UL;
260 }
261}
262
263#ifdef CONFIG_PROC_VMCORE 141#ifdef CONFIG_PROC_VMCORE
264/* elfcorehdr= specifies the location of elf core header 142/* elfcorehdr= specifies the location of elf core header
265 * stored by the crashed kernel. This option will be passed 143 * stored by the crashed kernel. This option will be passed
@@ -343,7 +221,7 @@ static void discover_ebda(void)
343 221
344void __init setup_arch(char **cmdline_p) 222void __init setup_arch(char **cmdline_p)
345{ 223{
346 printk(KERN_INFO "Command line: %s\n", saved_command_line); 224 printk(KERN_INFO "Command line: %s\n", boot_command_line);
347 225
348 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 226 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
349 screen_info = SCREEN_INFO; 227 screen_info = SCREEN_INFO;
@@ -373,7 +251,7 @@ void __init setup_arch(char **cmdline_p)
373 251
374 early_identify_cpu(&boot_cpu_data); 252 early_identify_cpu(&boot_cpu_data);
375 253
376 strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE); 254 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
377 *cmdline_p = command_line; 255 *cmdline_p = command_line;
378 256
379 parse_early_param(); 257 parse_early_param();
@@ -444,6 +322,11 @@ void __init setup_arch(char **cmdline_p)
444 /* reserve ebda region */ 322 /* reserve ebda region */
445 if (ebda_addr) 323 if (ebda_addr)
446 reserve_bootmem_generic(ebda_addr, ebda_size); 324 reserve_bootmem_generic(ebda_addr, ebda_size);
325#ifdef CONFIG_NUMA
326 /* reserve nodemap region */
327 if (nodemap_addr)
328 reserve_bootmem_generic(nodemap_addr, nodemap_size);
329#endif
447 330
448#ifdef CONFIG_SMP 331#ifdef CONFIG_SMP
449 /* 332 /*
@@ -519,15 +402,11 @@ void __init setup_arch(char **cmdline_p)
519 init_apic_mappings(); 402 init_apic_mappings();
520 403
521 /* 404 /*
522 * Request address space for all standard RAM and ROM resources 405 * We trust e820 completely. No explicit ROM probing in memory.
523 * and also for regions reported as reserved by the e820. 406 */
524 */
525 probe_roms();
526 e820_reserve_resources(); 407 e820_reserve_resources();
527 e820_mark_nosave_regions(); 408 e820_mark_nosave_regions();
528 409
529 request_resource(&iomem_resource, &video_ram_resource);
530
531 { 410 {
532 unsigned i; 411 unsigned i;
533 /* request I/O space for devices used on all i[345]86 PCs */ 412 /* request I/O space for devices used on all i[345]86 PCs */
@@ -1063,7 +942,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1063 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 942 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1064 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, 943 NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
1065 NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL, 944 NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL,
1066 NULL, "fxsr_opt", NULL, "rdtscp", NULL, "lm", "3dnowext", "3dnow", 945 NULL, "fxsr_opt", "pdpe1gb", "rdtscp", NULL, "lm",
946 "3dnowext", "3dnow",
1067 947
1068 /* Transmeta-defined */ 948 /* Transmeta-defined */
1069 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, 949 "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -1081,7 +961,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1081 /* Intel-defined (#2) */ 961 /* Intel-defined (#2) */
1082 "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est", 962 "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
1083 "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL, 963 "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
1084 NULL, NULL, "dca", NULL, NULL, NULL, NULL, NULL, 964 NULL, NULL, "dca", NULL, NULL, NULL, NULL, "popcnt",
1085 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 965 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1086 966
1087 /* VIA/Cyrix/Centaur-defined */ 967 /* VIA/Cyrix/Centaur-defined */
@@ -1091,8 +971,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1091 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 971 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1092 972
1093 /* AMD-defined (#2) */ 973 /* AMD-defined (#2) */
1094 "lahf_lm", "cmp_legacy", "svm", NULL, "cr8_legacy", NULL, NULL, NULL, 974 "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
1095 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 975 "altmovcr8", "abm", "sse4a",
976 "misalignsse", "3dnowprefetch",
977 "osvw", "ibs", NULL, NULL, NULL, NULL,
1096 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 978 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1097 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 979 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1098 }; 980 };
@@ -1103,6 +985,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1103 "ttp", /* thermal trip */ 985 "ttp", /* thermal trip */
1104 "tm", 986 "tm",
1105 "stc", 987 "stc",
988 "100mhzsteps",
989 "hwpstate",
990 NULL, /* tsc invariant mapped to constant_tsc */
1106 NULL, 991 NULL,
1107 /* nothing */ /* constant_tsc - moved to flags */ 992 /* nothing */ /* constant_tsc - moved to flags */
1108 }; 993 };
@@ -1219,23 +1104,3 @@ struct seq_operations cpuinfo_op = {
1219 .stop = c_stop, 1104 .stop = c_stop,
1220 .show = show_cpuinfo, 1105 .show = show_cpuinfo,
1221}; 1106};
1222
1223#if defined(CONFIG_INPUT_PCSPKR) || defined(CONFIG_INPUT_PCSPKR_MODULE)
1224#include <linux/platform_device.h>
1225static __init int add_pcspkr(void)
1226{
1227 struct platform_device *pd;
1228 int ret;
1229
1230 pd = platform_device_alloc("pcspkr", -1);
1231 if (!pd)
1232 return -ENOMEM;
1233
1234 ret = platform_device_add(pd);
1235 if (ret)
1236 platform_device_put(pd);
1237
1238 return ret;
1239}
1240device_initcall(add_pcspkr);
1241#endif
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
index 8c4b80fe71a1..6a70b55f719d 100644
--- a/arch/x86_64/kernel/setup64.c
+++ b/arch/x86_64/kernel/setup64.c
@@ -37,7 +37,6 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
37char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); 37char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
38 38
39unsigned long __supported_pte_mask __read_mostly = ~0UL; 39unsigned long __supported_pte_mask __read_mostly = ~0UL;
40EXPORT_SYMBOL(__supported_pte_mask);
41static int do_not_nx __cpuinitdata = 0; 40static int do_not_nx __cpuinitdata = 0;
42 41
43/* noexec=on|off 42/* noexec=on|off
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index daf19332f0dd..35443729aad8 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -148,217 +148,6 @@ static void __cpuinit smp_store_cpu_info(int id)
148 print_cpu_info(c); 148 print_cpu_info(c);
149} 149}
150 150
151/*
152 * New Funky TSC sync algorithm borrowed from IA64.
153 * Main advantage is that it doesn't reset the TSCs fully and
154 * in general looks more robust and it works better than my earlier
155 * attempts. I believe it was written by David Mosberger. Some minor
156 * adjustments for x86-64 by me -AK
157 *
158 * Original comment reproduced below.
159 *
160 * Synchronize TSC of the current (slave) CPU with the TSC of the
161 * MASTER CPU (normally the time-keeper CPU). We use a closed loop to
162 * eliminate the possibility of unaccounted-for errors (such as
163 * getting a machine check in the middle of a calibration step). The
164 * basic idea is for the slave to ask the master what itc value it has
165 * and to read its own itc before and after the master responds. Each
166 * iteration gives us three timestamps:
167 *
168 * slave master
169 *
170 * t0 ---\
171 * ---\
172 * --->
173 * tm
174 * /---
175 * /---
176 * t1 <---
177 *
178 *
179 * The goal is to adjust the slave's TSC such that tm falls exactly
180 * half-way between t0 and t1. If we achieve this, the clocks are
181 * synchronized provided the interconnect between the slave and the
182 * master is symmetric. Even if the interconnect were asymmetric, we
183 * would still know that the synchronization error is smaller than the
184 * roundtrip latency (t0 - t1).
185 *
186 * When the interconnect is quiet and symmetric, this lets us
187 * synchronize the TSC to within one or two cycles. However, we can
188 * only *guarantee* that the synchronization is accurate to within a
189 * round-trip time, which is typically in the range of several hundred
190 * cycles (e.g., ~500 cycles). In practice, this means that the TSCs
191 * are usually almost perfectly synchronized, but we shouldn't assume
192 * that the accuracy is much better than half a micro second or so.
193 *
194 * [there are other errors like the latency of RDTSC and of the
195 * WRMSR. These can also account to hundreds of cycles. So it's
196 * probably worse. It claims 153 cycles error on a dual Opteron,
197 * but I suspect the numbers are actually somewhat worse -AK]
198 */
199
200#define MASTER 0
201#define SLAVE (SMP_CACHE_BYTES/8)
202
203/* Intentionally don't use cpu_relax() while TSC synchronization
204 because we don't want to go into funky power save modi or cause
205 hypervisors to schedule us away. Going to sleep would likely affect
206 latency and low latency is the primary objective here. -AK */
207#define no_cpu_relax() barrier()
208
209static __cpuinitdata DEFINE_SPINLOCK(tsc_sync_lock);
210static volatile __cpuinitdata unsigned long go[SLAVE + 1];
211static int notscsync __cpuinitdata;
212
213#undef DEBUG_TSC_SYNC
214
215#define NUM_ROUNDS 64 /* magic value */
216#define NUM_ITERS 5 /* likewise */
217
218/* Callback on boot CPU */
219static __cpuinit void sync_master(void *arg)
220{
221 unsigned long flags, i;
222
223 go[MASTER] = 0;
224
225 local_irq_save(flags);
226 {
227 for (i = 0; i < NUM_ROUNDS*NUM_ITERS; ++i) {
228 while (!go[MASTER])
229 no_cpu_relax();
230 go[MASTER] = 0;
231 rdtscll(go[SLAVE]);
232 }
233 }
234 local_irq_restore(flags);
235}
236
237/*
238 * Return the number of cycles by which our tsc differs from the tsc
239 * on the master (time-keeper) CPU. A positive number indicates our
240 * tsc is ahead of the master, negative that it is behind.
241 */
242static inline long
243get_delta(long *rt, long *master)
244{
245 unsigned long best_t0 = 0, best_t1 = ~0UL, best_tm = 0;
246 unsigned long tcenter, t0, t1, tm;
247 int i;
248
249 for (i = 0; i < NUM_ITERS; ++i) {
250 rdtscll(t0);
251 go[MASTER] = 1;
252 while (!(tm = go[SLAVE]))
253 no_cpu_relax();
254 go[SLAVE] = 0;
255 rdtscll(t1);
256
257 if (t1 - t0 < best_t1 - best_t0)
258 best_t0 = t0, best_t1 = t1, best_tm = tm;
259 }
260
261 *rt = best_t1 - best_t0;
262 *master = best_tm - best_t0;
263
264 /* average best_t0 and best_t1 without overflow: */
265 tcenter = (best_t0/2 + best_t1/2);
266 if (best_t0 % 2 + best_t1 % 2 == 2)
267 ++tcenter;
268 return tcenter - best_tm;
269}
270
271static __cpuinit void sync_tsc(unsigned int master)
272{
273 int i, done = 0;
274 long delta, adj, adjust_latency = 0;
275 unsigned long flags, rt, master_time_stamp, bound;
276#ifdef DEBUG_TSC_SYNC
277 static struct syncdebug {
278 long rt; /* roundtrip time */
279 long master; /* master's timestamp */
280 long diff; /* difference between midpoint and master's timestamp */
281 long lat; /* estimate of tsc adjustment latency */
282 } t[NUM_ROUNDS] __cpuinitdata;
283#endif
284
285 printk(KERN_INFO "CPU %d: Syncing TSC to CPU %u.\n",
286 smp_processor_id(), master);
287
288 go[MASTER] = 1;
289
290 /* It is dangerous to broadcast IPI as cpus are coming up,
291 * as they may not be ready to accept them. So since
292 * we only need to send the ipi to the boot cpu direct
293 * the message, and avoid the race.
294 */
295 smp_call_function_single(master, sync_master, NULL, 1, 0);
296
297 while (go[MASTER]) /* wait for master to be ready */
298 no_cpu_relax();
299
300 spin_lock_irqsave(&tsc_sync_lock, flags);
301 {
302 for (i = 0; i < NUM_ROUNDS; ++i) {
303 delta = get_delta(&rt, &master_time_stamp);
304 if (delta == 0) {
305 done = 1; /* let's lock on to this... */
306 bound = rt;
307 }
308
309 if (!done) {
310 unsigned long t;
311 if (i > 0) {
312 adjust_latency += -delta;
313 adj = -delta + adjust_latency/4;
314 } else
315 adj = -delta;
316
317 rdtscll(t);
318 wrmsrl(MSR_IA32_TSC, t + adj);
319 }
320#ifdef DEBUG_TSC_SYNC
321 t[i].rt = rt;
322 t[i].master = master_time_stamp;
323 t[i].diff = delta;
324 t[i].lat = adjust_latency/4;
325#endif
326 }
327 }
328 spin_unlock_irqrestore(&tsc_sync_lock, flags);
329
330#ifdef DEBUG_TSC_SYNC
331 for (i = 0; i < NUM_ROUNDS; ++i)
332 printk("rt=%5ld master=%5ld diff=%5ld adjlat=%5ld\n",
333 t[i].rt, t[i].master, t[i].diff, t[i].lat);
334#endif
335
336 printk(KERN_INFO
337 "CPU %d: synchronized TSC with CPU %u (last diff %ld cycles, "
338 "maxerr %lu cycles)\n",
339 smp_processor_id(), master, delta, rt);
340}
341
342static void __cpuinit tsc_sync_wait(void)
343{
344 /*
345 * When the CPU has synchronized TSCs assume the BIOS
346 * or the hardware already synced. Otherwise we could
347 * mess up a possible perfect synchronization with a
348 * not-quite-perfect algorithm.
349 */
350 if (notscsync || !cpu_has_tsc || !unsynchronized_tsc())
351 return;
352 sync_tsc(0);
353}
354
355static __init int notscsync_setup(char *s)
356{
357 notscsync = 1;
358 return 1;
359}
360__setup("notscsync", notscsync_setup);
361
362static atomic_t init_deasserted __cpuinitdata; 151static atomic_t init_deasserted __cpuinitdata;
363 152
364/* 153/*
@@ -546,6 +335,11 @@ void __cpuinit start_secondary(void)
546 /* otherwise gcc will move up the smp_processor_id before the cpu_init */ 335 /* otherwise gcc will move up the smp_processor_id before the cpu_init */
547 barrier(); 336 barrier();
548 337
338 /*
339 * Check TSC sync first:
340 */
341 check_tsc_sync_target();
342
549 Dprintk("cpu %d: setting up apic clock\n", smp_processor_id()); 343 Dprintk("cpu %d: setting up apic clock\n", smp_processor_id());
550 setup_secondary_APIC_clock(); 344 setup_secondary_APIC_clock();
551 345
@@ -565,14 +359,6 @@ void __cpuinit start_secondary(void)
565 */ 359 */
566 set_cpu_sibling_map(smp_processor_id()); 360 set_cpu_sibling_map(smp_processor_id());
567 361
568 /*
569 * Wait for TSC sync to not schedule things before.
570 * We still process interrupts, which could see an inconsistent
571 * time in that window unfortunately.
572 * Do this here because TSC sync has global unprotected state.
573 */
574 tsc_sync_wait();
575
576 /* 362 /*
577 * We need to hold call_lock, so there is no inconsistency 363 * We need to hold call_lock, so there is no inconsistency
578 * between the time smp_call_function() determines number of 364 * between the time smp_call_function() determines number of
@@ -592,6 +378,7 @@ void __cpuinit start_secondary(void)
592 cpu_set(smp_processor_id(), cpu_online_map); 378 cpu_set(smp_processor_id(), cpu_online_map);
593 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 379 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
594 spin_unlock(&vector_lock); 380 spin_unlock(&vector_lock);
381
595 unlock_ipi_call_lock(); 382 unlock_ipi_call_lock();
596 383
597 cpu_idle(); 384 cpu_idle();
@@ -1168,6 +955,11 @@ int __cpuinit __cpu_up(unsigned int cpu)
1168 /* Unleash the CPU! */ 955 /* Unleash the CPU! */
1169 Dprintk("waiting for cpu %d\n", cpu); 956 Dprintk("waiting for cpu %d\n", cpu);
1170 957
958 /*
959 * Make sure and check TSC sync:
960 */
961 check_tsc_sync_source(cpu);
962
1171 while (!cpu_isset(cpu, cpu_online_map)) 963 while (!cpu_isset(cpu, cpu_online_map))
1172 cpu_relax(); 964 cpu_relax();
1173 965
@@ -1190,7 +982,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
1190 smp_cleanup_boot(); 982 smp_cleanup_boot();
1191 setup_ioapic_dest(); 983 setup_ioapic_dest();
1192 check_nmi_watchdog(); 984 check_nmi_watchdog();
1193 time_init_gtod();
1194} 985}
1195 986
1196#ifdef CONFIG_HOTPLUG_CPU 987#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86_64/kernel/stacktrace.c
index 6026b31d037e..65ac2c6b34a6 100644
--- a/arch/x86_64/kernel/stacktrace.c
+++ b/arch/x86_64/kernel/stacktrace.c
@@ -32,7 +32,7 @@ static void save_stack_address(void *data, unsigned long addr)
32 trace->skip--; 32 trace->skip--;
33 return; 33 return;
34 } 34 }
35 if (trace->nr_entries < trace->max_entries - 1) 35 if (trace->nr_entries < trace->max_entries)
36 trace->entries[trace->nr_entries++] = addr; 36 trace->entries[trace->nr_entries++] = addr;
37} 37}
38 38
@@ -49,7 +49,8 @@ static struct stacktrace_ops save_stack_ops = {
49void save_stack_trace(struct stack_trace *trace, struct task_struct *task) 49void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
50{ 50{
51 dump_trace(task, NULL, NULL, &save_stack_ops, trace); 51 dump_trace(task, NULL, NULL, &save_stack_ops, trace);
52 trace->entries[trace->nr_entries++] = ULONG_MAX; 52 if (trace->nr_entries < trace->max_entries)
53 trace->entries[trace->nr_entries++] = ULONG_MAX;
53} 54}
54EXPORT_SYMBOL(save_stack_trace); 55EXPORT_SYMBOL(save_stack_trace);
55 56
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 5cc76d0d331f..c9addcfb96dc 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -42,10 +42,8 @@
42#include <linux/cpufreq.h> 42#include <linux/cpufreq.h>
43#include <linux/hpet.h> 43#include <linux/hpet.h>
44#include <asm/apic.h> 44#include <asm/apic.h>
45#include <asm/hpet.h>
45 46
46#ifdef CONFIG_CPU_FREQ
47static void cpufreq_delayed_get(void);
48#endif
49extern void i8254_timer_resume(void); 47extern void i8254_timer_resume(void);
50extern int using_apic_timer; 48extern int using_apic_timer;
51 49
@@ -55,128 +53,7 @@ DEFINE_SPINLOCK(rtc_lock);
55EXPORT_SYMBOL(rtc_lock); 53EXPORT_SYMBOL(rtc_lock);
56DEFINE_SPINLOCK(i8253_lock); 54DEFINE_SPINLOCK(i8253_lock);
57 55
58int nohpet __initdata = 0;
59static int notsc __initdata = 0;
60
61#define USEC_PER_TICK (USEC_PER_SEC / HZ)
62#define NSEC_PER_TICK (NSEC_PER_SEC / HZ)
63#define FSEC_PER_TICK (FSEC_PER_SEC / HZ)
64
65#define NS_SCALE 10 /* 2^10, carefully chosen */
66#define US_SCALE 32 /* 2^32, arbitralrily chosen */
67
68unsigned int cpu_khz; /* TSC clocks / usec, not used here */
69EXPORT_SYMBOL(cpu_khz);
70static unsigned long hpet_period; /* fsecs / HPET clock */
71unsigned long hpet_tick; /* HPET clocks / interrupt */
72int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */
73unsigned long vxtime_hz = PIT_TICK_RATE;
74int report_lost_ticks; /* command line option */
75unsigned long long monotonic_base;
76
77struct vxtime_data __vxtime __section_vxtime; /* for vsyscalls */
78
79volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES; 56volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
80struct timespec __xtime __section_xtime;
81struct timezone __sys_tz __section_sys_tz;
82
83/*
84 * do_gettimeoffset() returns microseconds since last timer interrupt was
85 * triggered by hardware. A memory read of HPET is slower than a register read
86 * of TSC, but much more reliable. It's also synchronized to the timer
87 * interrupt. Note that do_gettimeoffset() may return more than hpet_tick, if a
88 * timer interrupt has happened already, but vxtime.trigger wasn't updated yet.
89 * This is not a problem, because jiffies hasn't updated either. They are bound
90 * together by xtime_lock.
91 */
92
93static inline unsigned int do_gettimeoffset_tsc(void)
94{
95 unsigned long t;
96 unsigned long x;
97 t = get_cycles_sync();
98 if (t < vxtime.last_tsc)
99 t = vxtime.last_tsc; /* hack */
100 x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> US_SCALE;
101 return x;
102}
103
104static inline unsigned int do_gettimeoffset_hpet(void)
105{
106 /* cap counter read to one tick to avoid inconsistencies */
107 unsigned long counter = hpet_readl(HPET_COUNTER) - vxtime.last;
108 return (min(counter,hpet_tick) * vxtime.quot) >> US_SCALE;
109}
110
111unsigned int (*do_gettimeoffset)(void) = do_gettimeoffset_tsc;
112
113/*
114 * This version of gettimeofday() has microsecond resolution and better than
115 * microsecond precision, as we're using at least a 10 MHz (usually 14.31818
116 * MHz) HPET timer.
117 */
118
119void do_gettimeofday(struct timeval *tv)
120{
121 unsigned long seq;
122 unsigned int sec, usec;
123
124 do {
125 seq = read_seqbegin(&xtime_lock);
126
127 sec = xtime.tv_sec;
128 usec = xtime.tv_nsec / NSEC_PER_USEC;
129
130 /* i386 does some correction here to keep the clock
131 monotonous even when ntpd is fixing drift.
132 But they didn't work for me, there is a non monotonic
133 clock anyways with ntp.
134 I dropped all corrections now until a real solution can
135 be found. Note when you fix it here you need to do the same
136 in arch/x86_64/kernel/vsyscall.c and export all needed
137 variables in vmlinux.lds. -AK */
138 usec += do_gettimeoffset();
139
140 } while (read_seqretry(&xtime_lock, seq));
141
142 tv->tv_sec = sec + usec / USEC_PER_SEC;
143 tv->tv_usec = usec % USEC_PER_SEC;
144}
145
146EXPORT_SYMBOL(do_gettimeofday);
147
148/*
149 * settimeofday() first undoes the correction that gettimeofday would do
150 * on the time, and then saves it. This is ugly, but has been like this for
151 * ages already.
152 */
153
154int do_settimeofday(struct timespec *tv)
155{
156 time_t wtm_sec, sec = tv->tv_sec;
157 long wtm_nsec, nsec = tv->tv_nsec;
158
159 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
160 return -EINVAL;
161
162 write_seqlock_irq(&xtime_lock);
163
164 nsec -= do_gettimeoffset() * NSEC_PER_USEC;
165
166 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
167 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
168
169 set_normalized_timespec(&xtime, sec, nsec);
170 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
171
172 ntp_clear();
173
174 write_sequnlock_irq(&xtime_lock);
175 clock_was_set();
176 return 0;
177}
178
179EXPORT_SYMBOL(do_settimeofday);
180 57
181unsigned long profile_pc(struct pt_regs *regs) 58unsigned long profile_pc(struct pt_regs *regs)
182{ 59{
@@ -267,84 +144,9 @@ static void set_rtc_mmss(unsigned long nowtime)
267} 144}
268 145
269 146
270/* monotonic_clock(): returns # of nanoseconds passed since time_init()
271 * Note: This function is required to return accurate
272 * time even in the absence of multiple timer ticks.
273 */
274static inline unsigned long long cycles_2_ns(unsigned long long cyc);
275unsigned long long monotonic_clock(void)
276{
277 unsigned long seq;
278 u32 last_offset, this_offset, offset;
279 unsigned long long base;
280
281 if (vxtime.mode == VXTIME_HPET) {
282 do {
283 seq = read_seqbegin(&xtime_lock);
284
285 last_offset = vxtime.last;
286 base = monotonic_base;
287 this_offset = hpet_readl(HPET_COUNTER);
288 } while (read_seqretry(&xtime_lock, seq));
289 offset = (this_offset - last_offset);
290 offset *= NSEC_PER_TICK / hpet_tick;
291 } else {
292 do {
293 seq = read_seqbegin(&xtime_lock);
294
295 last_offset = vxtime.last_tsc;
296 base = monotonic_base;
297 } while (read_seqretry(&xtime_lock, seq));
298 this_offset = get_cycles_sync();
299 offset = cycles_2_ns(this_offset - last_offset);
300 }
301 return base + offset;
302}
303EXPORT_SYMBOL(monotonic_clock);
304
305static noinline void handle_lost_ticks(int lost)
306{
307 static long lost_count;
308 static int warned;
309 if (report_lost_ticks) {
310 printk(KERN_WARNING "time.c: Lost %d timer tick(s)! ", lost);
311 print_symbol("rip %s)\n", get_irq_regs()->rip);
312 }
313
314 if (lost_count == 1000 && !warned) {
315 printk(KERN_WARNING "warning: many lost ticks.\n"
316 KERN_WARNING "Your time source seems to be instable or "
317 "some driver is hogging interupts\n");
318 print_symbol("rip %s\n", get_irq_regs()->rip);
319 if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) {
320 printk(KERN_WARNING "Falling back to HPET\n");
321 if (hpet_use_timer)
322 vxtime.last = hpet_readl(HPET_T0_CMP) -
323 hpet_tick;
324 else
325 vxtime.last = hpet_readl(HPET_COUNTER);
326 vxtime.mode = VXTIME_HPET;
327 do_gettimeoffset = do_gettimeoffset_hpet;
328 }
329 /* else should fall back to PIT, but code missing. */
330 warned = 1;
331 } else
332 lost_count++;
333
334#ifdef CONFIG_CPU_FREQ
335 /* In some cases the CPU can change frequency without us noticing
336 Give cpufreq a change to catch up. */
337 if ((lost_count+1) % 25 == 0)
338 cpufreq_delayed_get();
339#endif
340}
341
342void main_timer_handler(void) 147void main_timer_handler(void)
343{ 148{
344 static unsigned long rtc_update = 0; 149 static unsigned long rtc_update = 0;
345 unsigned long tsc;
346 int delay = 0, offset = 0, lost = 0;
347
348/* 150/*
349 * Here we are in the timer irq handler. We have irqs locally disabled (so we 151 * Here we are in the timer irq handler. We have irqs locally disabled (so we
350 * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running 152 * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running
@@ -354,72 +156,11 @@ void main_timer_handler(void)
354 156
355 write_seqlock(&xtime_lock); 157 write_seqlock(&xtime_lock);
356 158
357 if (vxtime.hpet_address)
358 offset = hpet_readl(HPET_COUNTER);
359
360 if (hpet_use_timer) {
361 /* if we're using the hpet timer functionality,
362 * we can more accurately know the counter value
363 * when the timer interrupt occured.
364 */
365 offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
366 delay = hpet_readl(HPET_COUNTER) - offset;
367 } else if (!pmtmr_ioport) {
368 spin_lock(&i8253_lock);
369 outb_p(0x00, 0x43);
370 delay = inb_p(0x40);
371 delay |= inb(0x40) << 8;
372 spin_unlock(&i8253_lock);
373 delay = LATCH - 1 - delay;
374 }
375
376 tsc = get_cycles_sync();
377
378 if (vxtime.mode == VXTIME_HPET) {
379 if (offset - vxtime.last > hpet_tick) {
380 lost = (offset - vxtime.last) / hpet_tick - 1;
381 }
382
383 monotonic_base +=
384 (offset - vxtime.last) * NSEC_PER_TICK / hpet_tick;
385
386 vxtime.last = offset;
387#ifdef CONFIG_X86_PM_TIMER
388 } else if (vxtime.mode == VXTIME_PMTMR) {
389 lost = pmtimer_mark_offset();
390#endif
391 } else {
392 offset = (((tsc - vxtime.last_tsc) *
393 vxtime.tsc_quot) >> US_SCALE) - USEC_PER_TICK;
394
395 if (offset < 0)
396 offset = 0;
397
398 if (offset > USEC_PER_TICK) {
399 lost = offset / USEC_PER_TICK;
400 offset %= USEC_PER_TICK;
401 }
402
403 monotonic_base += cycles_2_ns(tsc - vxtime.last_tsc);
404
405 vxtime.last_tsc = tsc - vxtime.quot * delay / vxtime.tsc_quot;
406
407 if ((((tsc - vxtime.last_tsc) *
408 vxtime.tsc_quot) >> US_SCALE) < offset)
409 vxtime.last_tsc = tsc -
410 (((long) offset << US_SCALE) / vxtime.tsc_quot) - 1;
411 }
412
413 if (lost > 0)
414 handle_lost_ticks(lost);
415 else
416 lost = 0;
417
418/* 159/*
419 * Do the timer stuff. 160 * Do the timer stuff.
420 */ 161 */
421 162
422 do_timer(lost + 1); 163 do_timer(1);
423#ifndef CONFIG_SMP 164#ifndef CONFIG_SMP
424 update_process_times(user_mode(get_irq_regs())); 165 update_process_times(user_mode(get_irq_regs()));
425#endif 166#endif
@@ -460,45 +201,11 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
460 return IRQ_HANDLED; 201 return IRQ_HANDLED;
461} 202}
462 203
463static unsigned int cyc2ns_scale __read_mostly;
464
465static inline void set_cyc2ns_scale(unsigned long cpu_khz)
466{
467 cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / cpu_khz;
468}
469
470static inline unsigned long long cycles_2_ns(unsigned long long cyc)
471{
472 return (cyc * cyc2ns_scale) >> NS_SCALE;
473}
474
475unsigned long long sched_clock(void)
476{
477 unsigned long a = 0;
478
479#if 0
480 /* Don't do a HPET read here. Using TSC always is much faster
481 and HPET may not be mapped yet when the scheduler first runs.
482 Disadvantage is a small drift between CPUs in some configurations,
483 but that should be tolerable. */
484 if (__vxtime.mode == VXTIME_HPET)
485 return (hpet_readl(HPET_COUNTER) * vxtime.quot) >> US_SCALE;
486#endif
487
488 /* Could do CPU core sync here. Opteron can execute rdtsc speculatively,
489 which means it is not completely exact and may not be monotonous between
490 CPUs. But the errors should be too small to matter for scheduling
491 purposes. */
492
493 rdtscll(a);
494 return cycles_2_ns(a);
495}
496
497static unsigned long get_cmos_time(void) 204static unsigned long get_cmos_time(void)
498{ 205{
499 unsigned int year, mon, day, hour, min, sec; 206 unsigned int year, mon, day, hour, min, sec;
500 unsigned long flags; 207 unsigned long flags;
501 unsigned extyear = 0; 208 unsigned century = 0;
502 209
503 spin_lock_irqsave(&rtc_lock, flags); 210 spin_lock_irqsave(&rtc_lock, flags);
504 211
@@ -510,9 +217,9 @@ static unsigned long get_cmos_time(void)
510 mon = CMOS_READ(RTC_MONTH); 217 mon = CMOS_READ(RTC_MONTH);
511 year = CMOS_READ(RTC_YEAR); 218 year = CMOS_READ(RTC_YEAR);
512#ifdef CONFIG_ACPI 219#ifdef CONFIG_ACPI
513 if (acpi_fadt.revision >= FADT2_REVISION_ID && 220 if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
514 acpi_fadt.century) 221 acpi_gbl_FADT.century)
515 extyear = CMOS_READ(acpi_fadt.century); 222 century = CMOS_READ(acpi_gbl_FADT.century);
516#endif 223#endif
517 } while (sec != CMOS_READ(RTC_SECONDS)); 224 } while (sec != CMOS_READ(RTC_SECONDS));
518 225
@@ -530,10 +237,10 @@ static unsigned long get_cmos_time(void)
530 BCD_TO_BIN(mon); 237 BCD_TO_BIN(mon);
531 BCD_TO_BIN(year); 238 BCD_TO_BIN(year);
532 239
533 if (extyear) { 240 if (century) {
534 BCD_TO_BIN(extyear); 241 BCD_TO_BIN(century);
535 year += extyear; 242 year += century * 100;
536 printk(KERN_INFO "Extended CMOS year: %d\n", extyear); 243 printk(KERN_INFO "Extended CMOS year: %d\n", century * 100);
537 } else { 244 } else {
538 /* 245 /*
539 * x86-64 systems only exists since 2002. 246 * x86-64 systems only exists since 2002.
@@ -545,159 +252,6 @@ static unsigned long get_cmos_time(void)
545 return mktime(year, mon, day, hour, min, sec); 252 return mktime(year, mon, day, hour, min, sec);
546} 253}
547 254
548#ifdef CONFIG_CPU_FREQ
549
550/* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
551 changes.
552
553 RED-PEN: On SMP we assume all CPUs run with the same frequency. It's
554 not that important because current Opteron setups do not support
555 scaling on SMP anyroads.
556
557 Should fix up last_tsc too. Currently gettimeofday in the
558 first tick after the change will be slightly wrong. */
559
560#include <linux/workqueue.h>
561
562static unsigned int cpufreq_delayed_issched = 0;
563static unsigned int cpufreq_init = 0;
564static struct work_struct cpufreq_delayed_get_work;
565
566static void handle_cpufreq_delayed_get(struct work_struct *v)
567{
568 unsigned int cpu;
569 for_each_online_cpu(cpu) {
570 cpufreq_get(cpu);
571 }
572 cpufreq_delayed_issched = 0;
573}
574
575/* if we notice lost ticks, schedule a call to cpufreq_get() as it tries
576 * to verify the CPU frequency the timing core thinks the CPU is running
577 * at is still correct.
578 */
579static void cpufreq_delayed_get(void)
580{
581 static int warned;
582 if (cpufreq_init && !cpufreq_delayed_issched) {
583 cpufreq_delayed_issched = 1;
584 if (!warned) {
585 warned = 1;
586 printk(KERN_DEBUG
587 "Losing some ticks... checking if CPU frequency changed.\n");
588 }
589 schedule_work(&cpufreq_delayed_get_work);
590 }
591}
592
593static unsigned int ref_freq = 0;
594static unsigned long loops_per_jiffy_ref = 0;
595
596static unsigned long cpu_khz_ref = 0;
597
598static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
599 void *data)
600{
601 struct cpufreq_freqs *freq = data;
602 unsigned long *lpj, dummy;
603
604 if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
605 return 0;
606
607 lpj = &dummy;
608 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
609#ifdef CONFIG_SMP
610 lpj = &cpu_data[freq->cpu].loops_per_jiffy;
611#else
612 lpj = &boot_cpu_data.loops_per_jiffy;
613#endif
614
615 if (!ref_freq) {
616 ref_freq = freq->old;
617 loops_per_jiffy_ref = *lpj;
618 cpu_khz_ref = cpu_khz;
619 }
620 if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
621 (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
622 (val == CPUFREQ_RESUMECHANGE)) {
623 *lpj =
624 cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
625
626 cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
627 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
628 vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz;
629 }
630
631 set_cyc2ns_scale(cpu_khz_ref);
632
633 return 0;
634}
635
636static struct notifier_block time_cpufreq_notifier_block = {
637 .notifier_call = time_cpufreq_notifier
638};
639
640static int __init cpufreq_tsc(void)
641{
642 INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get);
643 if (!cpufreq_register_notifier(&time_cpufreq_notifier_block,
644 CPUFREQ_TRANSITION_NOTIFIER))
645 cpufreq_init = 1;
646 return 0;
647}
648
649core_initcall(cpufreq_tsc);
650
651#endif
652
653/*
654 * calibrate_tsc() calibrates the processor TSC in a very simple way, comparing
655 * it to the HPET timer of known frequency.
656 */
657
658#define TICK_COUNT 100000000
659#define TICK_MIN 5000
660
661/*
662 * Some platforms take periodic SMI interrupts with 5ms duration. Make sure none
663 * occurs between the reads of the hpet & TSC.
664 */
665static void __init read_hpet_tsc(int *hpet, int *tsc)
666{
667 int tsc1, tsc2, hpet1;
668
669 do {
670 tsc1 = get_cycles_sync();
671 hpet1 = hpet_readl(HPET_COUNTER);
672 tsc2 = get_cycles_sync();
673 } while (tsc2 - tsc1 > TICK_MIN);
674 *hpet = hpet1;
675 *tsc = tsc2;
676}
677
678
679static unsigned int __init hpet_calibrate_tsc(void)
680{
681 int tsc_start, hpet_start;
682 int tsc_now, hpet_now;
683 unsigned long flags;
684
685 local_irq_save(flags);
686 local_irq_disable();
687
688 read_hpet_tsc(&hpet_start, &tsc_start);
689
690 do {
691 local_irq_disable();
692 read_hpet_tsc(&hpet_now, &tsc_now);
693 local_irq_restore(flags);
694 } while ((tsc_now - tsc_start) < TICK_COUNT &&
695 (hpet_now - hpet_start) < TICK_COUNT);
696
697 return (tsc_now - tsc_start) * 1000000000L
698 / ((hpet_now - hpet_start) * hpet_period / 1000);
699}
700
701 255
702/* 256/*
703 * pit_calibrate_tsc() uses the speaker output (channel 2) of 257 * pit_calibrate_tsc() uses the speaker output (channel 2) of
@@ -728,124 +282,6 @@ static unsigned int __init pit_calibrate_tsc(void)
728 return (end - start) / 50; 282 return (end - start) / 50;
729} 283}
730 284
731#ifdef CONFIG_HPET
732static __init int late_hpet_init(void)
733{
734 struct hpet_data hd;
735 unsigned int ntimer;
736
737 if (!vxtime.hpet_address)
738 return 0;
739
740 memset(&hd, 0, sizeof (hd));
741
742 ntimer = hpet_readl(HPET_ID);
743 ntimer = (ntimer & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
744 ntimer++;
745
746 /*
747 * Register with driver.
748 * Timer0 and Timer1 is used by platform.
749 */
750 hd.hd_phys_address = vxtime.hpet_address;
751 hd.hd_address = (void __iomem *)fix_to_virt(FIX_HPET_BASE);
752 hd.hd_nirqs = ntimer;
753 hd.hd_flags = HPET_DATA_PLATFORM;
754 hpet_reserve_timer(&hd, 0);
755#ifdef CONFIG_HPET_EMULATE_RTC
756 hpet_reserve_timer(&hd, 1);
757#endif
758 hd.hd_irq[0] = HPET_LEGACY_8254;
759 hd.hd_irq[1] = HPET_LEGACY_RTC;
760 if (ntimer > 2) {
761 struct hpet *hpet;
762 struct hpet_timer *timer;
763 int i;
764
765 hpet = (struct hpet *) fix_to_virt(FIX_HPET_BASE);
766 timer = &hpet->hpet_timers[2];
767 for (i = 2; i < ntimer; timer++, i++)
768 hd.hd_irq[i] = (timer->hpet_config &
769 Tn_INT_ROUTE_CNF_MASK) >>
770 Tn_INT_ROUTE_CNF_SHIFT;
771
772 }
773
774 hpet_alloc(&hd);
775 return 0;
776}
777fs_initcall(late_hpet_init);
778#endif
779
780static int hpet_timer_stop_set_go(unsigned long tick)
781{
782 unsigned int cfg;
783
784/*
785 * Stop the timers and reset the main counter.
786 */
787
788 cfg = hpet_readl(HPET_CFG);
789 cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
790 hpet_writel(cfg, HPET_CFG);
791 hpet_writel(0, HPET_COUNTER);
792 hpet_writel(0, HPET_COUNTER + 4);
793
794/*
795 * Set up timer 0, as periodic with first interrupt to happen at hpet_tick,
796 * and period also hpet_tick.
797 */
798 if (hpet_use_timer) {
799 hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
800 HPET_TN_32BIT, HPET_T0_CFG);
801 hpet_writel(hpet_tick, HPET_T0_CMP); /* next interrupt */
802 hpet_writel(hpet_tick, HPET_T0_CMP); /* period */
803 cfg |= HPET_CFG_LEGACY;
804 }
805/*
806 * Go!
807 */
808
809 cfg |= HPET_CFG_ENABLE;
810 hpet_writel(cfg, HPET_CFG);
811
812 return 0;
813}
814
815static int hpet_init(void)
816{
817 unsigned int id;
818
819 if (!vxtime.hpet_address)
820 return -1;
821 set_fixmap_nocache(FIX_HPET_BASE, vxtime.hpet_address);
822 __set_fixmap(VSYSCALL_HPET, vxtime.hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
823
824/*
825 * Read the period, compute tick and quotient.
826 */
827
828 id = hpet_readl(HPET_ID);
829
830 if (!(id & HPET_ID_VENDOR) || !(id & HPET_ID_NUMBER))
831 return -1;
832
833 hpet_period = hpet_readl(HPET_PERIOD);
834 if (hpet_period < 100000 || hpet_period > 100000000)
835 return -1;
836
837 hpet_tick = (FSEC_PER_TICK + hpet_period / 2) / hpet_period;
838
839 hpet_use_timer = (id & HPET_ID_LEGSUP);
840
841 return hpet_timer_stop_set_go(hpet_tick);
842}
843
844static int hpet_reenable(void)
845{
846 return hpet_timer_stop_set_go(hpet_tick);
847}
848
849#define PIT_MODE 0x43 285#define PIT_MODE 0x43
850#define PIT_CH0 0x40 286#define PIT_CH0 0x40
851 287
@@ -873,7 +309,7 @@ void __init pit_stop_interrupt(void)
873void __init stop_timer_interrupt(void) 309void __init stop_timer_interrupt(void)
874{ 310{
875 char *name; 311 char *name;
876 if (vxtime.hpet_address) { 312 if (hpet_address) {
877 name = "HPET"; 313 name = "HPET";
878 hpet_timer_stop_set_go(0); 314 hpet_timer_stop_set_go(0);
879 } else { 315 } else {
@@ -883,12 +319,6 @@ void __init stop_timer_interrupt(void)
883 printk(KERN_INFO "timer: %s interrupt stopped.\n", name); 319 printk(KERN_INFO "timer: %s interrupt stopped.\n", name);
884} 320}
885 321
886int __init time_setup(char *str)
887{
888 report_lost_ticks = 1;
889 return 1;
890}
891
892static struct irqaction irq0 = { 322static struct irqaction irq0 = {
893 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL 323 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
894}; 324};
@@ -896,124 +326,41 @@ static struct irqaction irq0 = {
896void __init time_init(void) 326void __init time_init(void)
897{ 327{
898 if (nohpet) 328 if (nohpet)
899 vxtime.hpet_address = 0; 329 hpet_address = 0;
900
901 xtime.tv_sec = get_cmos_time(); 330 xtime.tv_sec = get_cmos_time();
902 xtime.tv_nsec = 0; 331 xtime.tv_nsec = 0;
903 332
904 set_normalized_timespec(&wall_to_monotonic, 333 set_normalized_timespec(&wall_to_monotonic,
905 -xtime.tv_sec, -xtime.tv_nsec); 334 -xtime.tv_sec, -xtime.tv_nsec);
906 335
907 if (!hpet_init()) 336 if (hpet_arch_init())
908 vxtime_hz = (FSEC_PER_SEC + hpet_period / 2) / hpet_period; 337 hpet_address = 0;
909 else
910 vxtime.hpet_address = 0;
911 338
912 if (hpet_use_timer) { 339 if (hpet_use_timer) {
913 /* set tick_nsec to use the proper rate for HPET */ 340 /* set tick_nsec to use the proper rate for HPET */
914 tick_nsec = TICK_NSEC_HPET; 341 tick_nsec = TICK_NSEC_HPET;
915 cpu_khz = hpet_calibrate_tsc(); 342 cpu_khz = hpet_calibrate_tsc();
916 timename = "HPET"; 343 timename = "HPET";
917#ifdef CONFIG_X86_PM_TIMER
918 } else if (pmtmr_ioport && !vxtime.hpet_address) {
919 vxtime_hz = PM_TIMER_FREQUENCY;
920 timename = "PM";
921 pit_init();
922 cpu_khz = pit_calibrate_tsc();
923#endif
924 } else { 344 } else {
925 pit_init(); 345 pit_init();
926 cpu_khz = pit_calibrate_tsc(); 346 cpu_khz = pit_calibrate_tsc();
927 timename = "PIT"; 347 timename = "PIT";
928 } 348 }
929 349
930 vxtime.mode = VXTIME_TSC;
931 vxtime.quot = (USEC_PER_SEC << US_SCALE) / vxtime_hz;
932 vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz;
933 vxtime.last_tsc = get_cycles_sync();
934 set_cyc2ns_scale(cpu_khz);
935 setup_irq(0, &irq0);
936
937#ifndef CONFIG_SMP
938 time_init_gtod();
939#endif
940}
941
942/*
943 * Make an educated guess if the TSC is trustworthy and synchronized
944 * over all CPUs.
945 */
946__cpuinit int unsynchronized_tsc(void)
947{
948#ifdef CONFIG_SMP
949 if (apic_is_clustered_box())
950 return 1;
951#endif
952 /* Most intel systems have synchronized TSCs except for
953 multi node systems */
954 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) {
955#ifdef CONFIG_ACPI
956 /* But TSC doesn't tick in C3 so don't use it there */
957 if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 1000)
958 return 1;
959#endif
960 return 0;
961 }
962
963 /* Assume multi socket systems are not synchronized */
964 return num_present_cpus() > 1;
965}
966
967/*
968 * Decide what mode gettimeofday should use.
969 */
970void time_init_gtod(void)
971{
972 char *timetype;
973
974 if (unsynchronized_tsc()) 350 if (unsynchronized_tsc())
975 notsc = 1; 351 mark_tsc_unstable();
976 352
977 if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) 353 if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP))
978 vgetcpu_mode = VGETCPU_RDTSCP; 354 vgetcpu_mode = VGETCPU_RDTSCP;
979 else 355 else
980 vgetcpu_mode = VGETCPU_LSL; 356 vgetcpu_mode = VGETCPU_LSL;
981 357
982 if (vxtime.hpet_address && notsc) { 358 set_cyc2ns_scale(cpu_khz);
983 timetype = hpet_use_timer ? "HPET" : "PIT/HPET";
984 if (hpet_use_timer)
985 vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
986 else
987 vxtime.last = hpet_readl(HPET_COUNTER);
988 vxtime.mode = VXTIME_HPET;
989 do_gettimeoffset = do_gettimeoffset_hpet;
990#ifdef CONFIG_X86_PM_TIMER
991 /* Using PM for gettimeofday is quite slow, but we have no other
992 choice because the TSC is too unreliable on some systems. */
993 } else if (pmtmr_ioport && !vxtime.hpet_address && notsc) {
994 timetype = "PM";
995 do_gettimeoffset = do_gettimeoffset_pm;
996 vxtime.mode = VXTIME_PMTMR;
997 sysctl_vsyscall = 0;
998 printk(KERN_INFO "Disabling vsyscall due to use of PM timer\n");
999#endif
1000 } else {
1001 timetype = hpet_use_timer ? "HPET/TSC" : "PIT/TSC";
1002 vxtime.mode = VXTIME_TSC;
1003 }
1004
1005 printk(KERN_INFO "time.c: Using %ld.%06ld MHz WALL %s GTOD %s timer.\n",
1006 vxtime_hz / 1000000, vxtime_hz % 1000000, timename, timetype);
1007 printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", 359 printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n",
1008 cpu_khz / 1000, cpu_khz % 1000); 360 cpu_khz / 1000, cpu_khz % 1000);
1009 vxtime.quot = (USEC_PER_SEC << US_SCALE) / vxtime_hz; 361 setup_irq(0, &irq0);
1010 vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz;
1011 vxtime.last_tsc = get_cycles_sync();
1012
1013 set_cyc2ns_scale(cpu_khz);
1014} 362}
1015 363
1016__setup("report_lost_ticks", time_setup);
1017 364
1018static long clock_cmos_diff; 365static long clock_cmos_diff;
1019static unsigned long sleep_start; 366static unsigned long sleep_start;
@@ -1050,7 +397,7 @@ static int timer_resume(struct sys_device *dev)
1050 sleep_length = 0; 397 sleep_length = 0;
1051 ctime = sleep_start; 398 ctime = sleep_start;
1052 } 399 }
1053 if (vxtime.hpet_address) 400 if (hpet_address)
1054 hpet_reenable(); 401 hpet_reenable();
1055 else 402 else
1056 i8254_timer_resume(); 403 i8254_timer_resume();
@@ -1059,20 +406,8 @@ static int timer_resume(struct sys_device *dev)
1059 write_seqlock_irqsave(&xtime_lock,flags); 406 write_seqlock_irqsave(&xtime_lock,flags);
1060 xtime.tv_sec = sec; 407 xtime.tv_sec = sec;
1061 xtime.tv_nsec = 0; 408 xtime.tv_nsec = 0;
1062 if (vxtime.mode == VXTIME_HPET) {
1063 if (hpet_use_timer)
1064 vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
1065 else
1066 vxtime.last = hpet_readl(HPET_COUNTER);
1067#ifdef CONFIG_X86_PM_TIMER
1068 } else if (vxtime.mode == VXTIME_PMTMR) {
1069 pmtimer_resume();
1070#endif
1071 } else
1072 vxtime.last_tsc = get_cycles_sync();
1073 write_sequnlock_irqrestore(&xtime_lock,flags);
1074 jiffies += sleep_length; 409 jiffies += sleep_length;
1075 monotonic_base += sleep_length * (NSEC_PER_SEC/HZ); 410 write_sequnlock_irqrestore(&xtime_lock,flags);
1076 touch_softlockup_watchdog(); 411 touch_softlockup_watchdog();
1077 return 0; 412 return 0;
1078} 413}
@@ -1083,7 +418,7 @@ static struct sysdev_class timer_sysclass = {
1083 set_kset_name("timer"), 418 set_kset_name("timer"),
1084}; 419};
1085 420
1086/* XXX this driverfs stuff should probably go elsewhere later -john */ 421/* XXX this sysfs stuff should probably go elsewhere later -john */
1087static struct sys_device device_timer = { 422static struct sys_device device_timer = {
1088 .id = 0, 423 .id = 0,
1089 .cls = &timer_sysclass, 424 .cls = &timer_sysclass,
@@ -1098,269 +433,3 @@ static int time_init_device(void)
1098} 433}
1099 434
1100device_initcall(time_init_device); 435device_initcall(time_init_device);
1101
1102#ifdef CONFIG_HPET_EMULATE_RTC
1103/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
1104 * is enabled, we support RTC interrupt functionality in software.
1105 * RTC has 3 kinds of interrupts:
1106 * 1) Update Interrupt - generate an interrupt, every sec, when RTC clock
1107 * is updated
1108 * 2) Alarm Interrupt - generate an interrupt at a specific time of day
1109 * 3) Periodic Interrupt - generate periodic interrupt, with frequencies
1110 * 2Hz-8192Hz (2Hz-64Hz for non-root user) (all freqs in powers of 2)
1111 * (1) and (2) above are implemented using polling at a frequency of
1112 * 64 Hz. The exact frequency is a tradeoff between accuracy and interrupt
1113 * overhead. (DEFAULT_RTC_INT_FREQ)
1114 * For (3), we use interrupts at 64Hz or user specified periodic
1115 * frequency, whichever is higher.
1116 */
1117#include <linux/rtc.h>
1118
1119#define DEFAULT_RTC_INT_FREQ 64
1120#define RTC_NUM_INTS 1
1121
1122static unsigned long UIE_on;
1123static unsigned long prev_update_sec;
1124
1125static unsigned long AIE_on;
1126static struct rtc_time alarm_time;
1127
1128static unsigned long PIE_on;
1129static unsigned long PIE_freq = DEFAULT_RTC_INT_FREQ;
1130static unsigned long PIE_count;
1131
1132static unsigned long hpet_rtc_int_freq; /* RTC interrupt frequency */
1133static unsigned int hpet_t1_cmp; /* cached comparator register */
1134
1135int is_hpet_enabled(void)
1136{
1137 return vxtime.hpet_address != 0;
1138}
1139
1140/*
1141 * Timer 1 for RTC, we do not use periodic interrupt feature,
1142 * even if HPET supports periodic interrupts on Timer 1.
1143 * The reason being, to set up a periodic interrupt in HPET, we need to
1144 * stop the main counter. And if we do that everytime someone diables/enables
1145 * RTC, we will have adverse effect on main kernel timer running on Timer 0.
1146 * So, for the time being, simulate the periodic interrupt in software.
1147 *
1148 * hpet_rtc_timer_init() is called for the first time and during subsequent
1149 * interuppts reinit happens through hpet_rtc_timer_reinit().
1150 */
1151int hpet_rtc_timer_init(void)
1152{
1153 unsigned int cfg, cnt;
1154 unsigned long flags;
1155
1156 if (!is_hpet_enabled())
1157 return 0;
1158 /*
1159 * Set the counter 1 and enable the interrupts.
1160 */
1161 if (PIE_on && (PIE_freq > DEFAULT_RTC_INT_FREQ))
1162 hpet_rtc_int_freq = PIE_freq;
1163 else
1164 hpet_rtc_int_freq = DEFAULT_RTC_INT_FREQ;
1165
1166 local_irq_save(flags);
1167
1168 cnt = hpet_readl(HPET_COUNTER);
1169 cnt += ((hpet_tick*HZ)/hpet_rtc_int_freq);
1170 hpet_writel(cnt, HPET_T1_CMP);
1171 hpet_t1_cmp = cnt;
1172
1173 cfg = hpet_readl(HPET_T1_CFG);
1174 cfg &= ~HPET_TN_PERIODIC;
1175 cfg |= HPET_TN_ENABLE | HPET_TN_32BIT;
1176 hpet_writel(cfg, HPET_T1_CFG);
1177
1178 local_irq_restore(flags);
1179
1180 return 1;
1181}
1182
1183static void hpet_rtc_timer_reinit(void)
1184{
1185 unsigned int cfg, cnt, ticks_per_int, lost_ints;
1186
1187 if (unlikely(!(PIE_on | AIE_on | UIE_on))) {
1188 cfg = hpet_readl(HPET_T1_CFG);
1189 cfg &= ~HPET_TN_ENABLE;
1190 hpet_writel(cfg, HPET_T1_CFG);
1191 return;
1192 }
1193
1194 if (PIE_on && (PIE_freq > DEFAULT_RTC_INT_FREQ))
1195 hpet_rtc_int_freq = PIE_freq;
1196 else
1197 hpet_rtc_int_freq = DEFAULT_RTC_INT_FREQ;
1198
1199 /* It is more accurate to use the comparator value than current count.*/
1200 ticks_per_int = hpet_tick * HZ / hpet_rtc_int_freq;
1201 hpet_t1_cmp += ticks_per_int;
1202 hpet_writel(hpet_t1_cmp, HPET_T1_CMP);
1203
1204 /*
1205 * If the interrupt handler was delayed too long, the write above tries
1206 * to schedule the next interrupt in the past and the hardware would
1207 * not interrupt until the counter had wrapped around.
1208 * So we have to check that the comparator wasn't set to a past time.
1209 */
1210 cnt = hpet_readl(HPET_COUNTER);
1211 if (unlikely((int)(cnt - hpet_t1_cmp) > 0)) {
1212 lost_ints = (cnt - hpet_t1_cmp) / ticks_per_int + 1;
1213 /* Make sure that, even with the time needed to execute
1214 * this code, the next scheduled interrupt has been moved
1215 * back to the future: */
1216 lost_ints++;
1217
1218 hpet_t1_cmp += lost_ints * ticks_per_int;
1219 hpet_writel(hpet_t1_cmp, HPET_T1_CMP);
1220
1221 if (PIE_on)
1222 PIE_count += lost_ints;
1223
1224 printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n",
1225 hpet_rtc_int_freq);
1226 }
1227}
1228
1229/*
1230 * The functions below are called from rtc driver.
1231 * Return 0 if HPET is not being used.
1232 * Otherwise do the necessary changes and return 1.
1233 */
1234int hpet_mask_rtc_irq_bit(unsigned long bit_mask)
1235{
1236 if (!is_hpet_enabled())
1237 return 0;
1238
1239 if (bit_mask & RTC_UIE)
1240 UIE_on = 0;
1241 if (bit_mask & RTC_PIE)
1242 PIE_on = 0;
1243 if (bit_mask & RTC_AIE)
1244 AIE_on = 0;
1245
1246 return 1;
1247}
1248
1249int hpet_set_rtc_irq_bit(unsigned long bit_mask)
1250{
1251 int timer_init_reqd = 0;
1252
1253 if (!is_hpet_enabled())
1254 return 0;
1255
1256 if (!(PIE_on | AIE_on | UIE_on))
1257 timer_init_reqd = 1;
1258
1259 if (bit_mask & RTC_UIE) {
1260 UIE_on = 1;
1261 }
1262 if (bit_mask & RTC_PIE) {
1263 PIE_on = 1;
1264 PIE_count = 0;
1265 }
1266 if (bit_mask & RTC_AIE) {
1267 AIE_on = 1;
1268 }
1269
1270 if (timer_init_reqd)
1271 hpet_rtc_timer_init();
1272
1273 return 1;
1274}
1275
1276int hpet_set_alarm_time(unsigned char hrs, unsigned char min, unsigned char sec)
1277{
1278 if (!is_hpet_enabled())
1279 return 0;
1280
1281 alarm_time.tm_hour = hrs;
1282 alarm_time.tm_min = min;
1283 alarm_time.tm_sec = sec;
1284
1285 return 1;
1286}
1287
1288int hpet_set_periodic_freq(unsigned long freq)
1289{
1290 if (!is_hpet_enabled())
1291 return 0;
1292
1293 PIE_freq = freq;
1294 PIE_count = 0;
1295
1296 return 1;
1297}
1298
1299int hpet_rtc_dropped_irq(void)
1300{
1301 if (!is_hpet_enabled())
1302 return 0;
1303
1304 return 1;
1305}
1306
1307irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1308{
1309 struct rtc_time curr_time;
1310 unsigned long rtc_int_flag = 0;
1311 int call_rtc_interrupt = 0;
1312
1313 hpet_rtc_timer_reinit();
1314
1315 if (UIE_on | AIE_on) {
1316 rtc_get_rtc_time(&curr_time);
1317 }
1318 if (UIE_on) {
1319 if (curr_time.tm_sec != prev_update_sec) {
1320 /* Set update int info, call real rtc int routine */
1321 call_rtc_interrupt = 1;
1322 rtc_int_flag = RTC_UF;
1323 prev_update_sec = curr_time.tm_sec;
1324 }
1325 }
1326 if (PIE_on) {
1327 PIE_count++;
1328 if (PIE_count >= hpet_rtc_int_freq/PIE_freq) {
1329 /* Set periodic int info, call real rtc int routine */
1330 call_rtc_interrupt = 1;
1331 rtc_int_flag |= RTC_PF;
1332 PIE_count = 0;
1333 }
1334 }
1335 if (AIE_on) {
1336 if ((curr_time.tm_sec == alarm_time.tm_sec) &&
1337 (curr_time.tm_min == alarm_time.tm_min) &&
1338 (curr_time.tm_hour == alarm_time.tm_hour)) {
1339 /* Set alarm int info, call real rtc int routine */
1340 call_rtc_interrupt = 1;
1341 rtc_int_flag |= RTC_AF;
1342 }
1343 }
1344 if (call_rtc_interrupt) {
1345 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
1346 rtc_interrupt(rtc_int_flag, dev_id);
1347 }
1348 return IRQ_HANDLED;
1349}
1350#endif
1351
1352static int __init nohpet_setup(char *s)
1353{
1354 nohpet = 1;
1355 return 1;
1356}
1357
1358__setup("nohpet", nohpet_setup);
1359
1360int __init notsc_setup(char *s)
1361{
1362 notsc = 1;
1363 return 1;
1364}
1365
1366__setup("notsc", notsc_setup);
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
new file mode 100644
index 000000000000..895831865019
--- /dev/null
+++ b/arch/x86_64/kernel/tsc.c
@@ -0,0 +1,226 @@
1#include <linux/kernel.h>
2#include <linux/sched.h>
3#include <linux/interrupt.h>
4#include <linux/init.h>
5#include <linux/clocksource.h>
6#include <linux/time.h>
7#include <linux/acpi.h>
8#include <linux/cpufreq.h>
9
10#include <asm/timex.h>
11
12static int notsc __initdata = 0;
13
14unsigned int cpu_khz; /* TSC clocks / usec, not used here */
15EXPORT_SYMBOL(cpu_khz);
16
17static unsigned int cyc2ns_scale __read_mostly;
18
19void set_cyc2ns_scale(unsigned long khz)
20{
21 cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / khz;
22}
23
24static unsigned long long cycles_2_ns(unsigned long long cyc)
25{
26 return (cyc * cyc2ns_scale) >> NS_SCALE;
27}
28
29unsigned long long sched_clock(void)
30{
31 unsigned long a = 0;
32
33 /* Could do CPU core sync here. Opteron can execute rdtsc speculatively,
34 * which means it is not completely exact and may not be monotonous
35 * between CPUs. But the errors should be too small to matter for
36 * scheduling purposes.
37 */
38
39 rdtscll(a);
40 return cycles_2_ns(a);
41}
42
43static int tsc_unstable;
44
45static inline int check_tsc_unstable(void)
46{
47 return tsc_unstable;
48}
49#ifdef CONFIG_CPU_FREQ
50
51/* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
52 * changes.
53 *
54 * RED-PEN: On SMP we assume all CPUs run with the same frequency. It's
55 * not that important because current Opteron setups do not support
56 * scaling on SMP anyroads.
57 *
58 * Should fix up last_tsc too. Currently gettimeofday in the
59 * first tick after the change will be slightly wrong.
60 */
61
62#include <linux/workqueue.h>
63
64static unsigned int cpufreq_delayed_issched = 0;
65static unsigned int cpufreq_init = 0;
66static struct work_struct cpufreq_delayed_get_work;
67
68static void handle_cpufreq_delayed_get(struct work_struct *v)
69{
70 unsigned int cpu;
71 for_each_online_cpu(cpu) {
72 cpufreq_get(cpu);
73 }
74 cpufreq_delayed_issched = 0;
75}
76
77static unsigned int ref_freq = 0;
78static unsigned long loops_per_jiffy_ref = 0;
79
80static unsigned long cpu_khz_ref = 0;
81
82static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
83 void *data)
84{
85 struct cpufreq_freqs *freq = data;
86 unsigned long *lpj, dummy;
87
88 if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
89 return 0;
90
91 lpj = &dummy;
92 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
93#ifdef CONFIG_SMP
94 lpj = &cpu_data[freq->cpu].loops_per_jiffy;
95#else
96 lpj = &boot_cpu_data.loops_per_jiffy;
97#endif
98
99 if (!ref_freq) {
100 ref_freq = freq->old;
101 loops_per_jiffy_ref = *lpj;
102 cpu_khz_ref = cpu_khz;
103 }
104 if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
105 (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
106 (val == CPUFREQ_RESUMECHANGE)) {
107 *lpj =
108 cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
109
110 cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
111 if (!(freq->flags & CPUFREQ_CONST_LOOPS))
112 mark_tsc_unstable();
113 }
114
115 set_cyc2ns_scale(cpu_khz_ref);
116
117 return 0;
118}
119
120static struct notifier_block time_cpufreq_notifier_block = {
121 .notifier_call = time_cpufreq_notifier
122};
123
124static int __init cpufreq_tsc(void)
125{
126 INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get);
127 if (!cpufreq_register_notifier(&time_cpufreq_notifier_block,
128 CPUFREQ_TRANSITION_NOTIFIER))
129 cpufreq_init = 1;
130 return 0;
131}
132
133core_initcall(cpufreq_tsc);
134
135#endif
136
137static int tsc_unstable = 0;
138
139/*
140 * Make an educated guess if the TSC is trustworthy and synchronized
141 * over all CPUs.
142 */
143__cpuinit int unsynchronized_tsc(void)
144{
145 if (tsc_unstable)
146 return 1;
147
148#ifdef CONFIG_SMP
149 if (apic_is_clustered_box())
150 return 1;
151#endif
152 /* Most intel systems have synchronized TSCs except for
153 multi node systems */
154 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) {
155#ifdef CONFIG_ACPI
156 /* But TSC doesn't tick in C3 so don't use it there */
157 if (acpi_gbl_FADT.header.length > 0 && acpi_gbl_FADT.C3latency < 1000)
158 return 1;
159#endif
160 return 0;
161 }
162
163 /* Assume multi socket systems are not synchronized */
164 return num_present_cpus() > 1;
165}
166
167int __init notsc_setup(char *s)
168{
169 notsc = 1;
170 return 1;
171}
172
173__setup("notsc", notsc_setup);
174
175
176/* clock source code: */
177static cycle_t read_tsc(void)
178{
179 cycle_t ret = (cycle_t)get_cycles_sync();
180 return ret;
181}
182
183static cycle_t __vsyscall_fn vread_tsc(void)
184{
185 cycle_t ret = (cycle_t)get_cycles_sync();
186 return ret;
187}
188
189static struct clocksource clocksource_tsc = {
190 .name = "tsc",
191 .rating = 300,
192 .read = read_tsc,
193 .mask = CLOCKSOURCE_MASK(64),
194 .shift = 22,
195 .flags = CLOCK_SOURCE_IS_CONTINUOUS |
196 CLOCK_SOURCE_MUST_VERIFY,
197 .vread = vread_tsc,
198};
199
200void mark_tsc_unstable(void)
201{
202 if (!tsc_unstable) {
203 tsc_unstable = 1;
204 /* Change only the rating, when not registered */
205 if (clocksource_tsc.mult)
206 clocksource_change_rating(&clocksource_tsc, 0);
207 else
208 clocksource_tsc.rating = 0;
209 }
210}
211EXPORT_SYMBOL_GPL(mark_tsc_unstable);
212
213static int __init init_tsc_clocksource(void)
214{
215 if (!notsc) {
216 clocksource_tsc.mult = clocksource_khz2mult(cpu_khz,
217 clocksource_tsc.shift);
218 if (check_tsc_unstable())
219 clocksource_tsc.rating = 0;
220
221 return clocksource_register(&clocksource_tsc);
222 }
223 return 0;
224}
225
226module_init(init_tsc_clocksource);
diff --git a/arch/x86_64/kernel/tsc_sync.c b/arch/x86_64/kernel/tsc_sync.c
new file mode 100644
index 000000000000..014f0db45dfa
--- /dev/null
+++ b/arch/x86_64/kernel/tsc_sync.c
@@ -0,0 +1,187 @@
1/*
2 * arch/x86_64/kernel/tsc_sync.c: check TSC synchronization.
3 *
4 * Copyright (C) 2006, Red Hat, Inc., Ingo Molnar
5 *
6 * We check whether all boot CPUs have their TSC's synchronized,
7 * print a warning if not and turn off the TSC clock-source.
8 *
9 * The warp-check is point-to-point between two CPUs, the CPU
10 * initiating the bootup is the 'source CPU', the freshly booting
11 * CPU is the 'target CPU'.
12 *
13 * Only two CPUs may participate - they can enter in any order.
14 * ( The serial nature of the boot logic and the CPU hotplug lock
15 * protects against more than 2 CPUs entering this code. )
16 */
17#include <linux/spinlock.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/smp.h>
21#include <linux/nmi.h>
22#include <asm/tsc.h>
23
24/*
25 * Entry/exit counters that make sure that both CPUs
26 * run the measurement code at once:
27 */
28static __cpuinitdata atomic_t start_count;
29static __cpuinitdata atomic_t stop_count;
30
31/*
32 * We use a raw spinlock in this exceptional case, because
33 * we want to have the fastest, inlined, non-debug version
34 * of a critical section, to be able to prove TSC time-warps:
35 */
36static __cpuinitdata raw_spinlock_t sync_lock = __RAW_SPIN_LOCK_UNLOCKED;
37static __cpuinitdata cycles_t last_tsc;
38static __cpuinitdata cycles_t max_warp;
39static __cpuinitdata int nr_warps;
40
41/*
42 * TSC-warp measurement loop running on both CPUs:
43 */
44static __cpuinit void check_tsc_warp(void)
45{
46 cycles_t start, now, prev, end;
47 int i;
48
49 start = get_cycles_sync();
50 /*
51 * The measurement runs for 20 msecs:
52 */
53 end = start + cpu_khz * 20ULL;
54 now = start;
55
56 for (i = 0; ; i++) {
57 /*
58 * We take the global lock, measure TSC, save the
59 * previous TSC that was measured (possibly on
60 * another CPU) and update the previous TSC timestamp.
61 */
62 __raw_spin_lock(&sync_lock);
63 prev = last_tsc;
64 now = get_cycles_sync();
65 last_tsc = now;
66 __raw_spin_unlock(&sync_lock);
67
68 /*
69 * Be nice every now and then (and also check whether
70 * measurement is done [we also insert a 100 million
71 * loops safety exit, so we dont lock up in case the
72 * TSC readout is totally broken]):
73 */
74 if (unlikely(!(i & 7))) {
75 if (now > end || i > 100000000)
76 break;
77 cpu_relax();
78 touch_nmi_watchdog();
79 }
80 /*
81 * Outside the critical section we can now see whether
82 * we saw a time-warp of the TSC going backwards:
83 */
84 if (unlikely(prev > now)) {
85 __raw_spin_lock(&sync_lock);
86 max_warp = max(max_warp, prev - now);
87 nr_warps++;
88 __raw_spin_unlock(&sync_lock);
89 }
90
91 }
92}
93
94/*
95 * Source CPU calls into this - it waits for the freshly booted
96 * target CPU to arrive and then starts the measurement:
97 */
98void __cpuinit check_tsc_sync_source(int cpu)
99{
100 int cpus = 2;
101
102 /*
103 * No need to check if we already know that the TSC is not
104 * synchronized:
105 */
106 if (unsynchronized_tsc())
107 return;
108
109 printk(KERN_INFO "checking TSC synchronization [CPU#%d -> CPU#%d]:",
110 smp_processor_id(), cpu);
111
112 /*
113 * Reset it - in case this is a second bootup:
114 */
115 atomic_set(&stop_count, 0);
116
117 /*
118 * Wait for the target to arrive:
119 */
120 while (atomic_read(&start_count) != cpus-1)
121 cpu_relax();
122 /*
123 * Trigger the target to continue into the measurement too:
124 */
125 atomic_inc(&start_count);
126
127 check_tsc_warp();
128
129 while (atomic_read(&stop_count) != cpus-1)
130 cpu_relax();
131
132 /*
133 * Reset it - just in case we boot another CPU later:
134 */
135 atomic_set(&start_count, 0);
136
137 if (nr_warps) {
138 printk("\n");
139 printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs,"
140 " turning off TSC clock.\n", max_warp);
141 mark_tsc_unstable();
142 nr_warps = 0;
143 max_warp = 0;
144 last_tsc = 0;
145 } else {
146 printk(" passed.\n");
147 }
148
149 /*
150 * Let the target continue with the bootup:
151 */
152 atomic_inc(&stop_count);
153}
154
155/*
156 * Freshly booted CPUs call into this:
157 */
158void __cpuinit check_tsc_sync_target(void)
159{
160 int cpus = 2;
161
162 if (unsynchronized_tsc())
163 return;
164
165 /*
166 * Register this CPU's participation and wait for the
167 * source CPU to start the measurement:
168 */
169 atomic_inc(&start_count);
170 while (atomic_read(&start_count) != cpus)
171 cpu_relax();
172
173 check_tsc_warp();
174
175 /*
176 * Ok, we are done:
177 */
178 atomic_inc(&stop_count);
179
180 /*
181 * Wait for the source CPU to print stuff:
182 */
183 while (atomic_read(&stop_count) != cpus)
184 cpu_relax();
185}
186#undef NR_LOOPS
187
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index 1e54ddf2338d..b73212c0a550 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -88,31 +88,25 @@ SECTIONS
88 __vsyscall_0 = VSYSCALL_VIRT_ADDR; 88 __vsyscall_0 = VSYSCALL_VIRT_ADDR;
89 89
90 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 90 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
91 .xtime_lock : AT(VLOAD(.xtime_lock)) { *(.xtime_lock) } 91 .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) { *(.vsyscall_fn) }
92 xtime_lock = VVIRT(.xtime_lock); 92 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
93 93 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data))
94 .vxtime : AT(VLOAD(.vxtime)) { *(.vxtime) } 94 { *(.vsyscall_gtod_data) }
95 vxtime = VVIRT(.vxtime); 95 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data);
96 96
97 .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) } 97 .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) }
98 vgetcpu_mode = VVIRT(.vgetcpu_mode); 98 vgetcpu_mode = VVIRT(.vgetcpu_mode);
99 99
100 .sys_tz : AT(VLOAD(.sys_tz)) { *(.sys_tz) }
101 sys_tz = VVIRT(.sys_tz);
102
103 .sysctl_vsyscall : AT(VLOAD(.sysctl_vsyscall)) { *(.sysctl_vsyscall) }
104 sysctl_vsyscall = VVIRT(.sysctl_vsyscall);
105
106 .xtime : AT(VLOAD(.xtime)) { *(.xtime) }
107 xtime = VVIRT(.xtime);
108
109 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 100 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
110 .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) } 101 .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) }
111 jiffies = VVIRT(.jiffies); 102 jiffies = VVIRT(.jiffies);
112 103
113 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) { *(.vsyscall_1) } 104 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1))
114 .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) { *(.vsyscall_2) } 105 { *(.vsyscall_1) }
115 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) { *(.vsyscall_3) } 106 .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2))
107 { *(.vsyscall_2) }
108 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3))
109 { *(.vsyscall_3) }
116 110
117 . = VSYSCALL_VIRT_ADDR + 4096; 111 . = VSYSCALL_VIRT_ADDR + 4096;
118 112
@@ -192,10 +186,14 @@ SECTIONS
192 from .altinstructions and .eh_frame */ 186 from .altinstructions and .eh_frame */
193 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 187 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
194 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 188 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
189
190#ifdef CONFIG_BLK_DEV_INITRD
195 . = ALIGN(4096); 191 . = ALIGN(4096);
196 __initramfs_start = .; 192 __initramfs_start = .;
197 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } 193 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
198 __initramfs_end = .; 194 __initramfs_end = .;
195#endif
196
199 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 197 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
200 __per_cpu_start = .; 198 __per_cpu_start = .;
201 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } 199 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index 2433d6fc68b1..180ff919eaf9 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -26,6 +26,7 @@
26#include <linux/seqlock.h> 26#include <linux/seqlock.h>
27#include <linux/jiffies.h> 27#include <linux/jiffies.h>
28#include <linux/sysctl.h> 28#include <linux/sysctl.h>
29#include <linux/clocksource.h>
29#include <linux/getcpu.h> 30#include <linux/getcpu.h>
30#include <linux/cpu.h> 31#include <linux/cpu.h>
31#include <linux/smp.h> 32#include <linux/smp.h>
@@ -34,6 +35,7 @@
34#include <asm/vsyscall.h> 35#include <asm/vsyscall.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
36#include <asm/page.h> 37#include <asm/page.h>
38#include <asm/unistd.h>
37#include <asm/fixmap.h> 39#include <asm/fixmap.h>
38#include <asm/errno.h> 40#include <asm/errno.h>
39#include <asm/io.h> 41#include <asm/io.h>
@@ -44,56 +46,41 @@
44#define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr))) 46#define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr)))
45#define __syscall_clobber "r11","rcx","memory" 47#define __syscall_clobber "r11","rcx","memory"
46 48
47int __sysctl_vsyscall __section_sysctl_vsyscall = 1; 49struct vsyscall_gtod_data_t {
48seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED; 50 seqlock_t lock;
51 int sysctl_enabled;
52 struct timeval wall_time_tv;
53 struct timezone sys_tz;
54 cycle_t offset_base;
55 struct clocksource clock;
56};
49int __vgetcpu_mode __section_vgetcpu_mode; 57int __vgetcpu_mode __section_vgetcpu_mode;
50 58
51#include <asm/unistd.h> 59struct vsyscall_gtod_data_t __vsyscall_gtod_data __section_vsyscall_gtod_data =
52
53static __always_inline void timeval_normalize(struct timeval * tv)
54{ 60{
55 time_t __sec; 61 .lock = SEQLOCK_UNLOCKED,
56 62 .sysctl_enabled = 1,
57 __sec = tv->tv_usec / 1000000; 63};
58 if (__sec) {
59 tv->tv_usec %= 1000000;
60 tv->tv_sec += __sec;
61 }
62}
63 64
64static __always_inline void do_vgettimeofday(struct timeval * tv) 65void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
65{ 66{
66 long sequence, t; 67 unsigned long flags;
67 unsigned long sec, usec; 68
68 69 write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
69 do { 70 /* copy vsyscall data */
70 sequence = read_seqbegin(&__xtime_lock); 71 vsyscall_gtod_data.clock = *clock;
71 72 vsyscall_gtod_data.wall_time_tv.tv_sec = wall_time->tv_sec;
72 sec = __xtime.tv_sec; 73 vsyscall_gtod_data.wall_time_tv.tv_usec = wall_time->tv_nsec/1000;
73 usec = __xtime.tv_nsec / 1000; 74 vsyscall_gtod_data.sys_tz = sys_tz;
74 75 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
75 if (__vxtime.mode != VXTIME_HPET) {
76 t = get_cycles_sync();
77 if (t < __vxtime.last_tsc)
78 t = __vxtime.last_tsc;
79 usec += ((t - __vxtime.last_tsc) *
80 __vxtime.tsc_quot) >> 32;
81 /* See comment in x86_64 do_gettimeofday. */
82 } else {
83 usec += ((readl((void __iomem *)
84 fix_to_virt(VSYSCALL_HPET) + 0xf0) -
85 __vxtime.last) * __vxtime.quot) >> 32;
86 }
87 } while (read_seqretry(&__xtime_lock, sequence));
88
89 tv->tv_sec = sec + usec / 1000000;
90 tv->tv_usec = usec % 1000000;
91} 76}
92 77
93/* RED-PEN may want to readd seq locking, but then the variable should be write-once. */ 78/* RED-PEN may want to readd seq locking, but then the variable should be
79 * write-once.
80 */
94static __always_inline void do_get_tz(struct timezone * tz) 81static __always_inline void do_get_tz(struct timezone * tz)
95{ 82{
96 *tz = __sys_tz; 83 *tz = __vsyscall_gtod_data.sys_tz;
97} 84}
98 85
99static __always_inline int gettimeofday(struct timeval *tv, struct timezone *tz) 86static __always_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
@@ -101,7 +88,8 @@ static __always_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
101 int ret; 88 int ret;
102 asm volatile("vsysc2: syscall" 89 asm volatile("vsysc2: syscall"
103 : "=a" (ret) 90 : "=a" (ret)
104 : "0" (__NR_gettimeofday),"D" (tv),"S" (tz) : __syscall_clobber ); 91 : "0" (__NR_gettimeofday),"D" (tv),"S" (tz)
92 : __syscall_clobber );
105 return ret; 93 return ret;
106} 94}
107 95
@@ -114,10 +102,44 @@ static __always_inline long time_syscall(long *t)
114 return secs; 102 return secs;
115} 103}
116 104
105static __always_inline void do_vgettimeofday(struct timeval * tv)
106{
107 cycle_t now, base, mask, cycle_delta;
108 unsigned long seq, mult, shift, nsec_delta;
109 cycle_t (*vread)(void);
110 do {
111 seq = read_seqbegin(&__vsyscall_gtod_data.lock);
112
113 vread = __vsyscall_gtod_data.clock.vread;
114 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled || !vread)) {
115 gettimeofday(tv,0);
116 return;
117 }
118 now = vread();
119 base = __vsyscall_gtod_data.clock.cycle_last;
120 mask = __vsyscall_gtod_data.clock.mask;
121 mult = __vsyscall_gtod_data.clock.mult;
122 shift = __vsyscall_gtod_data.clock.shift;
123
124 *tv = __vsyscall_gtod_data.wall_time_tv;
125
126 } while (read_seqretry(&__vsyscall_gtod_data.lock, seq));
127
128 /* calculate interval: */
129 cycle_delta = (now - base) & mask;
130 /* convert to nsecs: */
131 nsec_delta = (cycle_delta * mult) >> shift;
132
133 /* convert to usecs and add to timespec: */
134 tv->tv_usec += nsec_delta / NSEC_PER_USEC;
135 while (tv->tv_usec > USEC_PER_SEC) {
136 tv->tv_sec += 1;
137 tv->tv_usec -= USEC_PER_SEC;
138 }
139}
140
117int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) 141int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
118{ 142{
119 if (!__sysctl_vsyscall)
120 return gettimeofday(tv,tz);
121 if (tv) 143 if (tv)
122 do_vgettimeofday(tv); 144 do_vgettimeofday(tv);
123 if (tz) 145 if (tz)
@@ -129,11 +151,11 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
129 * unlikely */ 151 * unlikely */
130time_t __vsyscall(1) vtime(time_t *t) 152time_t __vsyscall(1) vtime(time_t *t)
131{ 153{
132 if (!__sysctl_vsyscall) 154 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled))
133 return time_syscall(t); 155 return time_syscall(t);
134 else if (t) 156 else if (t)
135 *t = __xtime.tv_sec; 157 *t = __vsyscall_gtod_data.wall_time_tv.tv_sec;
136 return __xtime.tv_sec; 158 return __vsyscall_gtod_data.wall_time_tv.tv_sec;
137} 159}
138 160
139/* Fast way to get current CPU and node. 161/* Fast way to get current CPU and node.
@@ -210,7 +232,7 @@ static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
210 ret = -ENOMEM; 232 ret = -ENOMEM;
211 goto out; 233 goto out;
212 } 234 }
213 if (!sysctl_vsyscall) { 235 if (!vsyscall_gtod_data.sysctl_enabled) {
214 writew(SYSCALL, map1); 236 writew(SYSCALL, map1);
215 writew(SYSCALL, map2); 237 writew(SYSCALL, map2);
216 } else { 238 } else {
@@ -232,16 +254,17 @@ static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen,
232 254
233static ctl_table kernel_table2[] = { 255static ctl_table kernel_table2[] = {
234 { .ctl_name = 99, .procname = "vsyscall64", 256 { .ctl_name = 99, .procname = "vsyscall64",
235 .data = &sysctl_vsyscall, .maxlen = sizeof(int), .mode = 0644, 257 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int),
258 .mode = 0644,
236 .strategy = vsyscall_sysctl_nostrat, 259 .strategy = vsyscall_sysctl_nostrat,
237 .proc_handler = vsyscall_sysctl_change }, 260 .proc_handler = vsyscall_sysctl_change },
238 { 0, } 261 {}
239}; 262};
240 263
241static ctl_table kernel_root_table2[] = { 264static ctl_table kernel_root_table2[] = {
242 { .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555, 265 { .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555,
243 .child = kernel_table2 }, 266 .child = kernel_table2 },
244 { 0 }, 267 {}
245}; 268};
246 269
247#endif 270#endif
@@ -301,7 +324,7 @@ static int __init vsyscall_init(void)
301 BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu)); 324 BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu));
302 map_vsyscall(); 325 map_vsyscall();
303#ifdef CONFIG_SYSCTL 326#ifdef CONFIG_SYSCTL
304 register_sysctl_table(kernel_root_table2, 0); 327 register_sysctl_table(kernel_root_table2);
305#endif 328#endif
306 on_each_cpu(cpu_vsyscall_init, NULL, 0, 1); 329 on_each_cpu(cpu_vsyscall_init, NULL, 0, 1);
307 hotcpu_notifier(cpu_vsyscall_notifier, 0); 330 hotcpu_notifier(cpu_vsyscall_notifier, 0);
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c
index 6d77e4797a47..0dffae69f4ad 100644
--- a/arch/x86_64/kernel/x8664_ksyms.c
+++ b/arch/x86_64/kernel/x8664_ksyms.c
@@ -26,6 +26,7 @@ EXPORT_SYMBOL(__put_user_4);
26EXPORT_SYMBOL(__put_user_8); 26EXPORT_SYMBOL(__put_user_8);
27 27
28EXPORT_SYMBOL(copy_user_generic); 28EXPORT_SYMBOL(copy_user_generic);
29EXPORT_SYMBOL(__copy_user_nocache);
29EXPORT_SYMBOL(copy_from_user); 30EXPORT_SYMBOL(copy_from_user);
30EXPORT_SYMBOL(copy_to_user); 31EXPORT_SYMBOL(copy_to_user);
31EXPORT_SYMBOL(__copy_from_user_inatomic); 32EXPORT_SYMBOL(__copy_from_user_inatomic);
@@ -34,8 +35,8 @@ EXPORT_SYMBOL(copy_page);
34EXPORT_SYMBOL(clear_page); 35EXPORT_SYMBOL(clear_page);
35 36
36#ifdef CONFIG_SMP 37#ifdef CONFIG_SMP
37extern void FASTCALL( __write_lock_failed(rwlock_t *rw)); 38extern void __write_lock_failed(rwlock_t *rw);
38extern void FASTCALL( __read_lock_failed(rwlock_t *rw)); 39extern void __read_lock_failed(rwlock_t *rw);
39EXPORT_SYMBOL(__write_lock_failed); 40EXPORT_SYMBOL(__write_lock_failed);
40EXPORT_SYMBOL(__read_lock_failed); 41EXPORT_SYMBOL(__read_lock_failed);
41#endif 42#endif
diff --git a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile
index b78d4170fce2..8d5f835af481 100644
--- a/arch/x86_64/lib/Makefile
+++ b/arch/x86_64/lib/Makefile
@@ -9,4 +9,4 @@ obj-y := io.o iomap_copy.o
9lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ 9lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \
10 usercopy.o getuser.o putuser.o \ 10 usercopy.o getuser.o putuser.o \
11 thunk.o clear_page.o copy_page.o bitstr.o bitops.o 11 thunk.o clear_page.o copy_page.o bitstr.o bitops.o
12lib-y += memcpy.o memmove.o memset.o copy_user.o rwlock.o 12lib-y += memcpy.o memmove.o memset.o copy_user.o rwlock.o copy_user_nocache.o
diff --git a/arch/x86_64/lib/copy_user_nocache.S b/arch/x86_64/lib/copy_user_nocache.S
new file mode 100644
index 000000000000..4620efb12f13
--- /dev/null
+++ b/arch/x86_64/lib/copy_user_nocache.S
@@ -0,0 +1,217 @@
1/* Copyright 2002 Andi Kleen, SuSE Labs.
2 * Subject to the GNU Public License v2.
3 *
4 * Functions to copy from and to user space.
5 */
6
7#include <linux/linkage.h>
8#include <asm/dwarf2.h>
9
10#define FIX_ALIGNMENT 1
11
12#include <asm/current.h>
13#include <asm/asm-offsets.h>
14#include <asm/thread_info.h>
15#include <asm/cpufeature.h>
16
17/*
18 * copy_user_nocache - Uncached memory copy with exception handling
19 * This will force destination/source out of cache for more performance.
20 *
21 * Input:
22 * rdi destination
23 * rsi source
24 * rdx count
25 * rcx zero flag when 1 zero on exception
26 *
27 * Output:
28 * eax uncopied bytes or 0 if successful.
29 */
30ENTRY(__copy_user_nocache)
31 CFI_STARTPROC
32 pushq %rbx
33 CFI_ADJUST_CFA_OFFSET 8
34 CFI_REL_OFFSET rbx, 0
35 pushq %rcx /* save zero flag */
36 CFI_ADJUST_CFA_OFFSET 8
37 CFI_REL_OFFSET rcx, 0
38
39 xorl %eax,%eax /* zero for the exception handler */
40
41#ifdef FIX_ALIGNMENT
42 /* check for bad alignment of destination */
43 movl %edi,%ecx
44 andl $7,%ecx
45 jnz .Lbad_alignment
46.Lafter_bad_alignment:
47#endif
48
49 movq %rdx,%rcx
50
51 movl $64,%ebx
52 shrq $6,%rdx
53 decq %rdx
54 js .Lhandle_tail
55
56 .p2align 4
57.Lloop:
58.Ls1: movq (%rsi),%r11
59.Ls2: movq 1*8(%rsi),%r8
60.Ls3: movq 2*8(%rsi),%r9
61.Ls4: movq 3*8(%rsi),%r10
62.Ld1: movnti %r11,(%rdi)
63.Ld2: movnti %r8,1*8(%rdi)
64.Ld3: movnti %r9,2*8(%rdi)
65.Ld4: movnti %r10,3*8(%rdi)
66
67.Ls5: movq 4*8(%rsi),%r11
68.Ls6: movq 5*8(%rsi),%r8
69.Ls7: movq 6*8(%rsi),%r9
70.Ls8: movq 7*8(%rsi),%r10
71.Ld5: movnti %r11,4*8(%rdi)
72.Ld6: movnti %r8,5*8(%rdi)
73.Ld7: movnti %r9,6*8(%rdi)
74.Ld8: movnti %r10,7*8(%rdi)
75
76 dec %rdx
77
78 leaq 64(%rsi),%rsi
79 leaq 64(%rdi),%rdi
80
81 jns .Lloop
82
83 .p2align 4
84.Lhandle_tail:
85 movl %ecx,%edx
86 andl $63,%ecx
87 shrl $3,%ecx
88 jz .Lhandle_7
89 movl $8,%ebx
90 .p2align 4
91.Lloop_8:
92.Ls9: movq (%rsi),%r8
93.Ld9: movnti %r8,(%rdi)
94 decl %ecx
95 leaq 8(%rdi),%rdi
96 leaq 8(%rsi),%rsi
97 jnz .Lloop_8
98
99.Lhandle_7:
100 movl %edx,%ecx
101 andl $7,%ecx
102 jz .Lende
103 .p2align 4
104.Lloop_1:
105.Ls10: movb (%rsi),%bl
106.Ld10: movb %bl,(%rdi)
107 incq %rdi
108 incq %rsi
109 decl %ecx
110 jnz .Lloop_1
111
112 CFI_REMEMBER_STATE
113.Lende:
114 popq %rcx
115 CFI_ADJUST_CFA_OFFSET -8
116 CFI_RESTORE %rcx
117 popq %rbx
118 CFI_ADJUST_CFA_OFFSET -8
119 CFI_RESTORE rbx
120 ret
121 CFI_RESTORE_STATE
122
123#ifdef FIX_ALIGNMENT
124 /* align destination */
125 .p2align 4
126.Lbad_alignment:
127 movl $8,%r9d
128 subl %ecx,%r9d
129 movl %r9d,%ecx
130 cmpq %r9,%rdx
131 jz .Lhandle_7
132 js .Lhandle_7
133.Lalign_1:
134.Ls11: movb (%rsi),%bl
135.Ld11: movb %bl,(%rdi)
136 incq %rsi
137 incq %rdi
138 decl %ecx
139 jnz .Lalign_1
140 subq %r9,%rdx
141 jmp .Lafter_bad_alignment
142#endif
143
144 /* table sorted by exception address */
145 .section __ex_table,"a"
146 .align 8
147 .quad .Ls1,.Ls1e
148 .quad .Ls2,.Ls2e
149 .quad .Ls3,.Ls3e
150 .quad .Ls4,.Ls4e
151 .quad .Ld1,.Ls1e
152 .quad .Ld2,.Ls2e
153 .quad .Ld3,.Ls3e
154 .quad .Ld4,.Ls4e
155 .quad .Ls5,.Ls5e
156 .quad .Ls6,.Ls6e
157 .quad .Ls7,.Ls7e
158 .quad .Ls8,.Ls8e
159 .quad .Ld5,.Ls5e
160 .quad .Ld6,.Ls6e
161 .quad .Ld7,.Ls7e
162 .quad .Ld8,.Ls8e
163 .quad .Ls9,.Le_quad
164 .quad .Ld9,.Le_quad
165 .quad .Ls10,.Le_byte
166 .quad .Ld10,.Le_byte
167#ifdef FIX_ALIGNMENT
168 .quad .Ls11,.Lzero_rest
169 .quad .Ld11,.Lzero_rest
170#endif
171 .quad .Le5,.Le_zero
172 .previous
173
174 /* compute 64-offset for main loop. 8 bytes accuracy with error on the
175 pessimistic side. this is gross. it would be better to fix the
176 interface. */
177 /* eax: zero, ebx: 64 */
178.Ls1e: addl $8,%eax
179.Ls2e: addl $8,%eax
180.Ls3e: addl $8,%eax
181.Ls4e: addl $8,%eax
182.Ls5e: addl $8,%eax
183.Ls6e: addl $8,%eax
184.Ls7e: addl $8,%eax
185.Ls8e: addl $8,%eax
186 addq %rbx,%rdi /* +64 */
187 subq %rax,%rdi /* correct destination with computed offset */
188
189 shlq $6,%rdx /* loop counter * 64 (stride length) */
190 addq %rax,%rdx /* add offset to loopcnt */
191 andl $63,%ecx /* remaining bytes */
192 addq %rcx,%rdx /* add them */
193 jmp .Lzero_rest
194
195 /* exception on quad word loop in tail handling */
196 /* ecx: loopcnt/8, %edx: length, rdi: correct */
197.Le_quad:
198 shll $3,%ecx
199 andl $7,%edx
200 addl %ecx,%edx
201 /* edx: bytes to zero, rdi: dest, eax:zero */
202.Lzero_rest:
203 cmpl $0,(%rsp) /* zero flag set? */
204 jz .Le_zero
205 movq %rdx,%rcx
206.Le_byte:
207 xorl %eax,%eax
208.Le5: rep
209 stosb
210 /* when there is another exception while zeroing the rest just return */
211.Le_zero:
212 movq %rdx,%rax
213 jmp .Lende
214 CFI_ENDPROC
215ENDPROC(__copy_user_nocache)
216
217
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index a65fc6f1dcaf..6ada7231f3ab 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -56,38 +56,17 @@ int unregister_page_fault_notifier(struct notifier_block *nb)
56} 56}
57EXPORT_SYMBOL_GPL(unregister_page_fault_notifier); 57EXPORT_SYMBOL_GPL(unregister_page_fault_notifier);
58 58
59static inline int notify_page_fault(enum die_val val, const char *str, 59static inline int notify_page_fault(struct pt_regs *regs, long err)
60 struct pt_regs *regs, long err, int trap, int sig)
61{ 60{
62 struct die_args args = { 61 struct die_args args = {
63 .regs = regs, 62 .regs = regs,
64 .str = str, 63 .str = "page fault",
65 .err = err, 64 .err = err,
66 .trapnr = trap, 65 .trapnr = 14,
67 .signr = sig 66 .signr = SIGSEGV
68 }; 67 };
69 return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args); 68 return atomic_notifier_call_chain(&notify_page_fault_chain,
70} 69 DIE_PAGE_FAULT, &args);
71
72void bust_spinlocks(int yes)
73{
74 int loglevel_save = console_loglevel;
75 if (yes) {
76 oops_in_progress = 1;
77 } else {
78#ifdef CONFIG_VT
79 unblank_screen();
80#endif
81 oops_in_progress = 0;
82 /*
83 * OK, the message is on the console. Now we call printk()
84 * without oops_in_progress set so that printk will give klogd
85 * a poke. Hold onto your hats...
86 */
87 console_loglevel = 15; /* NMI oopser may have shut the console up */
88 printk(" ");
89 console_loglevel = loglevel_save;
90 }
91} 70}
92 71
93/* Sometimes the CPU reports invalid exceptions on prefetch. 72/* Sometimes the CPU reports invalid exceptions on prefetch.
@@ -376,8 +355,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
376 if (vmalloc_fault(address) >= 0) 355 if (vmalloc_fault(address) >= 0)
377 return; 356 return;
378 } 357 }
379 if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 358 if (notify_page_fault(regs, error_code) == NOTIFY_STOP)
380 SIGSEGV) == NOTIFY_STOP)
381 return; 359 return;
382 /* 360 /*
383 * Don't take the mm semaphore here. If we fixup a prefetch 361 * Don't take the mm semaphore here. If we fixup a prefetch
@@ -386,8 +364,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
386 goto bad_area_nosemaphore; 364 goto bad_area_nosemaphore;
387 } 365 }
388 366
389 if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 367 if (notify_page_fault(regs, error_code) == NOTIFY_STOP)
390 SIGSEGV) == NOTIFY_STOP)
391 return; 368 return;
392 369
393 if (likely(regs->eflags & X86_EFLAGS_IF)) 370 if (likely(regs->eflags & X86_EFLAGS_IF))
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 2968b90ef8ad..ec31534eb104 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -711,20 +711,30 @@ int kern_addr_valid(unsigned long addr)
711extern int exception_trace, page_fault_trace; 711extern int exception_trace, page_fault_trace;
712 712
713static ctl_table debug_table2[] = { 713static ctl_table debug_table2[] = {
714 { 99, "exception-trace", &exception_trace, sizeof(int), 0644, NULL, 714 {
715 proc_dointvec }, 715 .ctl_name = 99,
716 { 0, } 716 .procname = "exception-trace",
717 .data = &exception_trace,
718 .maxlen = sizeof(int),
719 .mode = 0644,
720 .proc_handler = proc_dointvec
721 },
722 {}
717}; 723};
718 724
719static ctl_table debug_root_table2[] = { 725static ctl_table debug_root_table2[] = {
720 { .ctl_name = CTL_DEBUG, .procname = "debug", .mode = 0555, 726 {
721 .child = debug_table2 }, 727 .ctl_name = CTL_DEBUG,
722 { 0 }, 728 .procname = "debug",
729 .mode = 0555,
730 .child = debug_table2
731 },
732 {}
723}; 733};
724 734
725static __init int x8664_sysctl_init(void) 735static __init int x8664_sysctl_init(void)
726{ 736{
727 register_sysctl_table(debug_root_table2, 1); 737 register_sysctl_table(debug_root_table2);
728 return 0; 738 return 0;
729} 739}
730__initcall(x8664_sysctl_init); 740__initcall(x8664_sysctl_init);
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 2ee2e003606c..41b8fb069924 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -36,6 +36,8 @@ unsigned char apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
36cpumask_t node_to_cpumask[MAX_NUMNODES] __read_mostly; 36cpumask_t node_to_cpumask[MAX_NUMNODES] __read_mostly;
37 37
38int numa_off __initdata; 38int numa_off __initdata;
39unsigned long __initdata nodemap_addr;
40unsigned long __initdata nodemap_size;
39 41
40 42
41/* 43/*
@@ -52,34 +54,88 @@ populate_memnodemap(const struct bootnode *nodes, int numnodes, int shift)
52 int res = -1; 54 int res = -1;
53 unsigned long addr, end; 55 unsigned long addr, end;
54 56
55 if (shift >= 64) 57 memset(memnodemap, 0xff, memnodemapsize);
56 return -1;
57 memset(memnodemap, 0xff, sizeof(memnodemap));
58 for (i = 0; i < numnodes; i++) { 58 for (i = 0; i < numnodes; i++) {
59 addr = nodes[i].start; 59 addr = nodes[i].start;
60 end = nodes[i].end; 60 end = nodes[i].end;
61 if (addr >= end) 61 if (addr >= end)
62 continue; 62 continue;
63 if ((end >> shift) >= NODEMAPSIZE) 63 if ((end >> shift) >= memnodemapsize)
64 return 0; 64 return 0;
65 do { 65 do {
66 if (memnodemap[addr >> shift] != 0xff) 66 if (memnodemap[addr >> shift] != 0xff)
67 return -1; 67 return -1;
68 memnodemap[addr >> shift] = i; 68 memnodemap[addr >> shift] = i;
69 addr += (1UL << shift); 69 addr += (1UL << shift);
70 } while (addr < end); 70 } while (addr < end);
71 res = 1; 71 res = 1;
72 } 72 }
73 return res; 73 return res;
74} 74}
75 75
76int __init compute_hash_shift(struct bootnode *nodes, int numnodes) 76static int __init allocate_cachealigned_memnodemap(void)
77{ 77{
78 int shift = 20; 78 unsigned long pad, pad_addr;
79
80 memnodemap = memnode.embedded_map;
81 if (memnodemapsize <= 48)
82 return 0;
83
84 pad = L1_CACHE_BYTES - 1;
85 pad_addr = 0x8000;
86 nodemap_size = pad + memnodemapsize;
87 nodemap_addr = find_e820_area(pad_addr, end_pfn<<PAGE_SHIFT,
88 nodemap_size);
89 if (nodemap_addr == -1UL) {
90 printk(KERN_ERR
91 "NUMA: Unable to allocate Memory to Node hash map\n");
92 nodemap_addr = nodemap_size = 0;
93 return -1;
94 }
95 pad_addr = (nodemap_addr + pad) & ~pad;
96 memnodemap = phys_to_virt(pad_addr);
97
98 printk(KERN_DEBUG "NUMA: Allocated memnodemap from %lx - %lx\n",
99 nodemap_addr, nodemap_addr + nodemap_size);
100 return 0;
101}
79 102
80 while (populate_memnodemap(nodes, numnodes, shift + 1) >= 0) 103/*
81 shift++; 104 * The LSB of all start and end addresses in the node map is the value of the
105 * maximum possible shift.
106 */
107static int __init
108extract_lsb_from_nodes (const struct bootnode *nodes, int numnodes)
109{
110 int i, nodes_used = 0;
111 unsigned long start, end;
112 unsigned long bitfield = 0, memtop = 0;
113
114 for (i = 0; i < numnodes; i++) {
115 start = nodes[i].start;
116 end = nodes[i].end;
117 if (start >= end)
118 continue;
119 bitfield |= start;
120 nodes_used++;
121 if (end > memtop)
122 memtop = end;
123 }
124 if (nodes_used <= 1)
125 i = 63;
126 else
127 i = find_first_bit(&bitfield, sizeof(unsigned long)*8);
128 memnodemapsize = (memtop >> i)+1;
129 return i;
130}
131
132int __init compute_hash_shift(struct bootnode *nodes, int numnodes)
133{
134 int shift;
82 135
136 shift = extract_lsb_from_nodes(nodes, numnodes);
137 if (allocate_cachealigned_memnodemap())
138 return -1;
83 printk(KERN_DEBUG "NUMA: Using %d for the hash shift.\n", 139 printk(KERN_DEBUG "NUMA: Using %d for the hash shift.\n",
84 shift); 140 shift);
85 141
@@ -216,31 +272,113 @@ void __init numa_init_array(void)
216} 272}
217 273
218#ifdef CONFIG_NUMA_EMU 274#ifdef CONFIG_NUMA_EMU
275/* Numa emulation */
219int numa_fake __initdata = 0; 276int numa_fake __initdata = 0;
220 277
221/* Numa emulation */ 278/*
279 * This function is used to find out if the start and end correspond to
280 * different zones.
281 */
282int zone_cross_over(unsigned long start, unsigned long end)
283{
284 if ((start < (MAX_DMA32_PFN << PAGE_SHIFT)) &&
285 (end >= (MAX_DMA32_PFN << PAGE_SHIFT)))
286 return 1;
287 return 0;
288}
289
222static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn) 290static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
223{ 291{
224 int i; 292 int i, big;
225 struct bootnode nodes[MAX_NUMNODES]; 293 struct bootnode nodes[MAX_NUMNODES];
226 unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake; 294 unsigned long sz, old_sz;
295 unsigned long hole_size;
296 unsigned long start, end;
297 unsigned long max_addr = (end_pfn << PAGE_SHIFT);
298
299 start = (start_pfn << PAGE_SHIFT);
300 hole_size = e820_hole_size(start, max_addr);
301 sz = (max_addr - start - hole_size) / numa_fake;
227 302
228 /* Kludge needed for the hash function */ 303 /* Kludge needed for the hash function */
229 if (hweight64(sz) > 1) {
230 unsigned long x = 1;
231 while ((x << 1) < sz)
232 x <<= 1;
233 if (x < sz/2)
234 printk(KERN_ERR "Numa emulation unbalanced. Complain to maintainer\n");
235 sz = x;
236 }
237 304
305 old_sz = sz;
306 /*
307 * Round down to the nearest FAKE_NODE_MIN_SIZE.
308 */
309 sz &= FAKE_NODE_MIN_HASH_MASK;
310
311 /*
312 * We ensure that each node is at least 64MB big. Smaller than this
313 * size can cause VM hiccups.
314 */
315 if (sz == 0) {
316 printk(KERN_INFO "Not enough memory for %d nodes. Reducing "
317 "the number of nodes\n", numa_fake);
318 numa_fake = (max_addr - start - hole_size) / FAKE_NODE_MIN_SIZE;
319 printk(KERN_INFO "Number of fake nodes will be = %d\n",
320 numa_fake);
321 sz = FAKE_NODE_MIN_SIZE;
322 }
323 /*
324 * Find out how many nodes can get an extra NODE_MIN_SIZE granule.
325 * This logic ensures the extra memory gets distributed among as many
326 * nodes as possible (as compared to one single node getting all that
327 * extra memory.
328 */
329 big = ((old_sz - sz) * numa_fake) / FAKE_NODE_MIN_SIZE;
330 printk(KERN_INFO "Fake node Size: %luMB hole_size: %luMB big nodes: "
331 "%d\n",
332 (sz >> 20), (hole_size >> 20), big);
238 memset(&nodes,0,sizeof(nodes)); 333 memset(&nodes,0,sizeof(nodes));
334 end = start;
239 for (i = 0; i < numa_fake; i++) { 335 for (i = 0; i < numa_fake; i++) {
240 nodes[i].start = (start_pfn<<PAGE_SHIFT) + i*sz; 336 /*
337 * In case we are not able to allocate enough memory for all
338 * the nodes, we reduce the number of fake nodes.
339 */
340 if (end >= max_addr) {
341 numa_fake = i - 1;
342 break;
343 }
344 start = nodes[i].start = end;
345 /*
346 * Final node can have all the remaining memory.
347 */
241 if (i == numa_fake-1) 348 if (i == numa_fake-1)
242 sz = (end_pfn<<PAGE_SHIFT) - nodes[i].start; 349 sz = max_addr - start;
243 nodes[i].end = nodes[i].start + sz; 350 end = nodes[i].start + sz;
351 /*
352 * Fir "big" number of nodes get extra granule.
353 */
354 if (i < big)
355 end += FAKE_NODE_MIN_SIZE;
356 /*
357 * Iterate over the range to ensure that this node gets at
358 * least sz amount of RAM (excluding holes)
359 */
360 while ((end - start - e820_hole_size(start, end)) < sz) {
361 end += FAKE_NODE_MIN_SIZE;
362 if (end >= max_addr)
363 break;
364 }
365 /*
366 * Look at the next node to make sure there is some real memory
367 * to map. Bad things happen when the only memory present
368 * in a zone on a fake node is IO hole.
369 */
370 while (e820_hole_size(end, end + FAKE_NODE_MIN_SIZE) > 0) {
371 if (zone_cross_over(start, end + sz)) {
372 end = (MAX_DMA32_PFN << PAGE_SHIFT);
373 break;
374 }
375 if (end >= max_addr)
376 break;
377 end += FAKE_NODE_MIN_SIZE;
378 }
379 if (end > max_addr)
380 end = max_addr;
381 nodes[i].end = end;
244 printk(KERN_INFO "Faking node %d at %016Lx-%016Lx (%LuMB)\n", 382 printk(KERN_INFO "Faking node %d at %016Lx-%016Lx (%LuMB)\n",
245 i, 383 i,
246 nodes[i].start, nodes[i].end, 384 nodes[i].start, nodes[i].end,
@@ -290,6 +428,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
290 end_pfn << PAGE_SHIFT); 428 end_pfn << PAGE_SHIFT);
291 /* setup dummy node covering all memory */ 429 /* setup dummy node covering all memory */
292 memnode_shift = 63; 430 memnode_shift = 63;
431 memnodemap = memnode.embedded_map;
293 memnodemap[0] = 0; 432 memnodemap[0] = 0;
294 nodes_clear(node_online_map); 433 nodes_clear(node_online_map);
295 node_set_online(0); 434 node_set_online(0);
@@ -321,20 +460,6 @@ unsigned long __init numa_free_all_bootmem(void)
321 return pages; 460 return pages;
322} 461}
323 462
324#ifdef CONFIG_SPARSEMEM
325static void __init arch_sparse_init(void)
326{
327 int i;
328
329 for_each_online_node(i)
330 memory_present(i, node_start_pfn(i), node_end_pfn(i));
331
332 sparse_init();
333}
334#else
335#define arch_sparse_init() do {} while (0)
336#endif
337
338void __init paging_init(void) 463void __init paging_init(void)
339{ 464{
340 int i; 465 int i;
@@ -344,7 +469,8 @@ void __init paging_init(void)
344 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; 469 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
345 max_zone_pfns[ZONE_NORMAL] = end_pfn; 470 max_zone_pfns[ZONE_NORMAL] = end_pfn;
346 471
347 arch_sparse_init(); 472 sparse_memory_present_with_active_regions(MAX_NUMNODES);
473 sparse_init();
348 474
349 for_each_online_node(i) { 475 for_each_online_node(i) {
350 setup_node_zones(i); 476 setup_node_zones(i);
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index ccb91dd996a9..65c5eaa59905 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -107,6 +107,7 @@ static void revert_page(unsigned long address, pgprot_t ref_prot)
107 pud_t *pud; 107 pud_t *pud;
108 pmd_t *pmd; 108 pmd_t *pmd;
109 pte_t large_pte; 109 pte_t large_pte;
110 unsigned long pfn;
110 111
111 pgd = pgd_offset_k(address); 112 pgd = pgd_offset_k(address);
112 BUG_ON(pgd_none(*pgd)); 113 BUG_ON(pgd_none(*pgd));
@@ -114,7 +115,8 @@ static void revert_page(unsigned long address, pgprot_t ref_prot)
114 BUG_ON(pud_none(*pud)); 115 BUG_ON(pud_none(*pud));
115 pmd = pmd_offset(pud, address); 116 pmd = pmd_offset(pud, address);
116 BUG_ON(pmd_val(*pmd) & _PAGE_PSE); 117 BUG_ON(pmd_val(*pmd) & _PAGE_PSE);
117 large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot); 118 pfn = (__pa(address) & LARGE_PAGE_MASK) >> PAGE_SHIFT;
119 large_pte = pfn_pte(pfn, ref_prot);
118 large_pte = pte_mkhuge(large_pte); 120 large_pte = pte_mkhuge(large_pte);
119 set_pte((pte_t *)pmd, large_pte); 121 set_pte((pte_t *)pmd, large_pte);
120} 122}
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 1087e150a218..2efe215fc76a 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -101,7 +101,7 @@ static __init inline int srat_disabled(void)
101static __init int slit_valid(struct acpi_table_slit *slit) 101static __init int slit_valid(struct acpi_table_slit *slit)
102{ 102{
103 int i, j; 103 int i, j;
104 int d = slit->localities; 104 int d = slit->locality_count;
105 for (i = 0; i < d; i++) { 105 for (i = 0; i < d; i++) {
106 for (j = 0; j < d; j++) { 106 for (j = 0; j < d; j++) {
107 u8 val = slit->entry[d*i + j]; 107 u8 val = slit->entry[d*i + j];
@@ -127,18 +127,18 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
127 127
128/* Callback for Proximity Domain -> LAPIC mapping */ 128/* Callback for Proximity Domain -> LAPIC mapping */
129void __init 129void __init
130acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) 130acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
131{ 131{
132 int pxm, node; 132 int pxm, node;
133 if (srat_disabled()) 133 if (srat_disabled())
134 return; 134 return;
135 if (pa->header.length != sizeof(struct acpi_table_processor_affinity)) { 135 if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) {
136 bad_srat(); 136 bad_srat();
137 return; 137 return;
138 } 138 }
139 if (pa->flags.enabled == 0) 139 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
140 return; 140 return;
141 pxm = pa->proximity_domain; 141 pxm = pa->proximity_domain_lo;
142 node = setup_node(pxm); 142 node = setup_node(pxm);
143 if (node < 0) { 143 if (node < 0) {
144 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); 144 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@ -254,21 +254,21 @@ static int reserve_hotadd(int node, unsigned long start, unsigned long end)
254 /* Looks good */ 254 /* Looks good */
255 255
256 if (nd->start == nd->end) { 256 if (nd->start == nd->end) {
257 nd->start = start; 257 nd->start = start;
258 nd->end = end; 258 nd->end = end;
259 changed = 1; 259 changed = 1;
260 } else { 260 } else {
261 if (nd->start == end) { 261 if (nd->start == end) {
262 nd->start = start; 262 nd->start = start;
263 changed = 1; 263 changed = 1;
264 } 264 }
265 if (nd->end == start) { 265 if (nd->end == start) {
266 nd->end = end; 266 nd->end = end;
267 changed = 1; 267 changed = 1;
268 } 268 }
269 if (!changed) 269 if (!changed)
270 printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n"); 270 printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n");
271 } 271 }
272 272
273 ret = update_end_of_memory(nd->end); 273 ret = update_end_of_memory(nd->end);
274 274
@@ -279,7 +279,7 @@ static int reserve_hotadd(int node, unsigned long start, unsigned long end)
279 279
280/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ 280/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
281void __init 281void __init
282acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) 282acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
283{ 283{
284 struct bootnode *nd, oldnode; 284 struct bootnode *nd, oldnode;
285 unsigned long start, end; 285 unsigned long start, end;
@@ -288,16 +288,17 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
288 288
289 if (srat_disabled()) 289 if (srat_disabled())
290 return; 290 return;
291 if (ma->header.length != sizeof(struct acpi_table_memory_affinity)) { 291 if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) {
292 bad_srat(); 292 bad_srat();
293 return; 293 return;
294 } 294 }
295 if (ma->flags.enabled == 0) 295 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0)
296 return; 296 return;
297 if (ma->flags.hot_pluggable && !save_add_info()) 297
298 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info())
298 return; 299 return;
299 start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); 300 start = ma->base_address;
300 end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); 301 end = start + ma->length;
301 pxm = ma->proximity_domain; 302 pxm = ma->proximity_domain;
302 node = setup_node(pxm); 303 node = setup_node(pxm);
303 if (node < 0) { 304 if (node < 0) {
@@ -337,7 +338,8 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
337 push_node_boundaries(node, nd->start >> PAGE_SHIFT, 338 push_node_boundaries(node, nd->start >> PAGE_SHIFT,
338 nd->end >> PAGE_SHIFT); 339 nd->end >> PAGE_SHIFT);
339 340
340 if (ma->flags.hot_pluggable && (reserve_hotadd(node, start, end) < 0)) { 341 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) &&
342 (reserve_hotadd(node, start, end) < 0)) {
341 /* Ignore hotadd region. Undo damage */ 343 /* Ignore hotadd region. Undo damage */
342 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n"); 344 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n");
343 *nd = oldnode; 345 *nd = oldnode;
@@ -394,7 +396,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
394 396
395 /* First clean up the node list */ 397 /* First clean up the node list */
396 for (i = 0; i < MAX_NUMNODES; i++) { 398 for (i = 0; i < MAX_NUMNODES; i++) {
397 cutoff_node(i, start, end); 399 cutoff_node(i, start, end);
398 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { 400 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
399 unparse_node(i); 401 unparse_node(i);
400 node_set_offline(i); 402 node_set_offline(i);
@@ -426,7 +428,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
426 if (!node_online(i)) 428 if (!node_online(i))
427 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 429 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
428 430
429 for (i = 0; i < NR_CPUS; i++) { 431 for (i = 0; i < NR_CPUS; i++) {
430 if (cpu_to_node[i] == NUMA_NO_NODE) 432 if (cpu_to_node[i] == NUMA_NO_NODE)
431 continue; 433 continue;
432 if (!node_isset(cpu_to_node[i], nodes_parsed)) 434 if (!node_isset(cpu_to_node[i], nodes_parsed))
@@ -461,7 +463,7 @@ int __node_distance(int a, int b)
461 463
462 if (!acpi_slit) 464 if (!acpi_slit)
463 return a == b ? 10 : 20; 465 return a == b ? 10 : 20;
464 index = acpi_slit->localities * node_to_pxm(a); 466 index = acpi_slit->locality_count * node_to_pxm(a);
465 return acpi_slit->entry[index + node_to_pxm(b)]; 467 return acpi_slit->entry[index + node_to_pxm(b)];
466} 468}
467 469
diff --git a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile
index 149aba05a5b8..c9eddc8859c0 100644
--- a/arch/x86_64/pci/Makefile
+++ b/arch/x86_64/pci/Makefile
@@ -11,7 +11,7 @@ obj-y += fixup.o init.o
11obj-$(CONFIG_ACPI) += acpi.o 11obj-$(CONFIG_ACPI) += acpi.o
12obj-y += legacy.o irq.o common.o early.o 12obj-y += legacy.o irq.o common.o early.o
13# mmconfig has a 64bit special 13# mmconfig has a 64bit special
14obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 14obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o mmconfig-shared.o
15 15
16obj-$(CONFIG_NUMA) += k8-bus.o 16obj-$(CONFIG_NUMA) += k8-bus.o
17 17
@@ -24,3 +24,4 @@ fixup-y += ../../i386/pci/fixup.o
24i386-y += ../../i386/pci/i386.o 24i386-y += ../../i386/pci/i386.o
25init-y += ../../i386/pci/init.o 25init-y += ../../i386/pci/init.o
26early-y += ../../i386/pci/early.o 26early-y += ../../i386/pci/early.o
27mmconfig-shared-y += ../../i386/pci/mmconfig-shared.o
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
index f8b6b2800a62..65d82736987e 100644
--- a/arch/x86_64/pci/mmconfig.c
+++ b/arch/x86_64/pci/mmconfig.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 2 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG
3 * 3 *
4 * This is an 64bit optimized version that always keeps the full mmconfig 4 * This is an 64bit optimized version that always keeps the full mmconfig
5 * space mapped. This allows lockless config space operation. 5 * space mapped. This allows lockless config space operation.
6 */ 6 */
@@ -13,49 +13,26 @@
13 13
14#include "pci.h" 14#include "pci.h"
15 15
16/* aperture is up to 256MB but BIOS may reserve less */
17#define MMCONFIG_APER_MIN (2 * 1024*1024)
18#define MMCONFIG_APER_MAX (256 * 1024*1024)
19
20/* Verify the first 16 busses. We assume that systems with more busses
21 get MCFG right. */
22#define MAX_CHECK_BUS 16
23
24static DECLARE_BITMAP(fallback_slots, 32*MAX_CHECK_BUS);
25
26/* Static virtual mapping of the MMCONFIG aperture */ 16/* Static virtual mapping of the MMCONFIG aperture */
27struct mmcfg_virt { 17struct mmcfg_virt {
28 struct acpi_table_mcfg_config *cfg; 18 struct acpi_mcfg_allocation *cfg;
29 char __iomem *virt; 19 char __iomem *virt;
30}; 20};
31static struct mmcfg_virt *pci_mmcfg_virt; 21static struct mmcfg_virt *pci_mmcfg_virt;
32 22
33static char __iomem *get_virt(unsigned int seg, unsigned bus) 23static char __iomem *get_virt(unsigned int seg, unsigned bus)
34{ 24{
35 int cfg_num = -1; 25 struct acpi_mcfg_allocation *cfg;
36 struct acpi_table_mcfg_config *cfg; 26 int cfg_num;
37 27
38 while (1) { 28 for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
39 ++cfg_num;
40 if (cfg_num >= pci_mmcfg_config_num)
41 break;
42 cfg = pci_mmcfg_virt[cfg_num].cfg; 29 cfg = pci_mmcfg_virt[cfg_num].cfg;
43 if (cfg->pci_segment_group_number != seg) 30 if (cfg->pci_segment == seg &&
44 continue; 31 (cfg->start_bus_number <= bus) &&
45 if ((cfg->start_bus_number <= bus) &&
46 (cfg->end_bus_number >= bus)) 32 (cfg->end_bus_number >= bus))
47 return pci_mmcfg_virt[cfg_num].virt; 33 return pci_mmcfg_virt[cfg_num].virt;
48 } 34 }
49 35
50 /* Handle more broken MCFG tables on Asus etc.
51 They only contain a single entry for bus 0-0. Assume
52 this applies to all busses. */
53 cfg = &pci_mmcfg_config[0];
54 if (pci_mmcfg_config_num == 1 &&
55 cfg->pci_segment_group_number == 0 &&
56 (cfg->start_bus_number | cfg->end_bus_number) == 0)
57 return pci_mmcfg_virt[0].virt;
58
59 /* Fall back to type 0 */ 36 /* Fall back to type 0 */
60 return NULL; 37 return NULL;
61} 38}
@@ -63,8 +40,8 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
63static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) 40static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
64{ 41{
65 char __iomem *addr; 42 char __iomem *addr;
66 if (seg == 0 && bus < MAX_CHECK_BUS && 43 if (seg == 0 && bus < PCI_MMCFG_MAX_CHECK_BUS &&
67 test_bit(32*bus + PCI_SLOT(devfn), fallback_slots)) 44 test_bit(32*bus + PCI_SLOT(devfn), pci_mmcfg_fallback_slots))
68 return NULL; 45 return NULL;
69 addr = get_virt(seg, bus); 46 addr = get_virt(seg, bus);
70 if (!addr) 47 if (!addr)
@@ -135,78 +112,46 @@ static struct pci_raw_ops pci_mmcfg = {
135 .write = pci_mmcfg_write, 112 .write = pci_mmcfg_write,
136}; 113};
137 114
138/* K8 systems have some devices (typically in the builtin northbridge) 115static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg)
139 that are only accessible using type1
140 Normally this can be expressed in the MCFG by not listing them
141 and assigning suitable _SEGs, but this isn't implemented in some BIOS.
142 Instead try to discover all devices on bus 0 that are unreachable using MM
143 and fallback for them. */
144static __init void unreachable_devices(void)
145{ 116{
146 int i, k; 117 void __iomem *addr;
147 /* Use the max bus number from ACPI here? */ 118 u32 size;
148 for (k = 0; k < MAX_CHECK_BUS; k++) { 119
149 for (i = 0; i < 32; i++) { 120 size = (cfg->end_bus_number + 1) << 20;
150 u32 val1; 121 addr = ioremap_nocache(cfg->address, size);
151 char __iomem *addr; 122 if (addr) {
152 123 printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n",
153 pci_conf1_read(0, k, PCI_DEVFN(i,0), 0, 4, &val1); 124 cfg->address, cfg->address + size - 1);
154 if (val1 == 0xffffffff)
155 continue;
156 addr = pci_dev_base(0, k, PCI_DEVFN(i, 0));
157 if (addr == NULL|| readl(addr) != val1) {
158 set_bit(i + 32*k, fallback_slots);
159 printk(KERN_NOTICE "PCI: No mmconfig possible"
160 " on device %02x:%02x\n", k, i);
161 }
162 }
163 } 125 }
126 return addr;
164} 127}
165 128
166void __init pci_mmcfg_init(int type) 129int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
130 unsigned int devfn)
167{ 131{
168 int i; 132 return pci_dev_base(seg, bus, devfn) != NULL;
169 133}
170 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
171 return;
172
173 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
174 if ((pci_mmcfg_config_num == 0) ||
175 (pci_mmcfg_config == NULL) ||
176 (pci_mmcfg_config[0].base_address == 0))
177 return;
178
179 /* Only do this check when type 1 works. If it doesn't work
180 assume we run on a Mac and always use MCFG */
181 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
182 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
183 E820_RESERVED)) {
184 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
185 pci_mmcfg_config[0].base_address);
186 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
187 return;
188 }
189 134
190 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); 135int __init pci_mmcfg_arch_init(void)
136{
137 int i;
138 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) *
139 pci_mmcfg_config_num, GFP_KERNEL);
191 if (pci_mmcfg_virt == NULL) { 140 if (pci_mmcfg_virt == NULL) {
192 printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n"); 141 printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n");
193 return; 142 return 0;
194 } 143 }
144
195 for (i = 0; i < pci_mmcfg_config_num; ++i) { 145 for (i = 0; i < pci_mmcfg_config_num; ++i) {
196 pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; 146 pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i];
197 pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, 147 pci_mmcfg_virt[i].virt = mcfg_ioremap(&pci_mmcfg_config[i]);
198 MMCONFIG_APER_MAX);
199 if (!pci_mmcfg_virt[i].virt) { 148 if (!pci_mmcfg_virt[i].virt) {
200 printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " 149 printk(KERN_ERR "PCI: Cannot map mmconfig aperture for "
201 "segment %d\n", 150 "segment %d\n",
202 pci_mmcfg_config[i].pci_segment_group_number); 151 pci_mmcfg_config[i].pci_segment);
203 return; 152 return 0;
204 } 153 }
205 printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
206 } 154 }
207
208 unreachable_devices();
209
210 raw_pci_ops = &pci_mmcfg; 155 raw_pci_ops = &pci_mmcfg;
211 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 156 return 1;
212} 157}
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 2e74cb0b7807..7fbb44bea37f 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -7,6 +7,10 @@ config FRAME_POINTER
7 bool 7 bool
8 default n 8 default n
9 9
10config ZONE_DMA
11 bool
12 default y
13
10config XTENSA 14config XTENSA
11 bool 15 bool
12 default y 16 default y
@@ -42,6 +46,9 @@ config ARCH_HAS_ILOG2_U64
42 bool 46 bool
43 default n 47 default n
44 48
49config NO_IOPORT
50 def_bool y
51
45source "init/Kconfig" 52source "init/Kconfig"
46 53
47menu "Processor type and features" 54menu "Processor type and features"
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index b6374c09de20..1ecf6716c327 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -78,7 +78,7 @@ extern unsigned long loops_per_jiffy;
78 78
79/* Command line specified as configuration option. */ 79/* Command line specified as configuration option. */
80 80
81static char command_line[COMMAND_LINE_SIZE]; 81static char __initdata command_line[COMMAND_LINE_SIZE];
82 82
83#ifdef CONFIG_CMDLINE_BOOL 83#ifdef CONFIG_CMDLINE_BOOL
84static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; 84static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
@@ -253,8 +253,8 @@ void __init setup_arch(char **cmdline_p)
253 extern int mem_reserve(unsigned long, unsigned long, int); 253 extern int mem_reserve(unsigned long, unsigned long, int);
254 extern void bootmem_init(void); 254 extern void bootmem_init(void);
255 255
256 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 256 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
257 saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 257 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
258 *cmdline_p = command_line; 258 *cmdline_p = command_line;
259 259
260 /* Reserve some memory regions */ 260 /* Reserve some memory regions */
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index a350431363a0..22949be4a5d8 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -38,15 +38,6 @@ unsigned long ccount_nsec; /* nsec per ccount increment */
38unsigned int last_ccount_stamp; 38unsigned int last_ccount_stamp;
39static long last_rtc_update = 0; 39static long last_rtc_update = 0;
40 40
41/*
42 * Scheduler clock - returns current tim in nanosec units.
43 */
44
45unsigned long long sched_clock(void)
46{
47 return (unsigned long long)jiffies * (1000000000 / HZ);
48}
49
50static irqreturn_t timer_interrupt(int irq, void *dev_id); 41static irqreturn_t timer_interrupt(int irq, void *dev_id);
51static struct irqaction timer_irqaction = { 42static struct irqaction timer_irqaction = {
52 .handler = timer_interrupt, 43 .handler = timer_interrupt,
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index a36c104c3a52..ab6370054cee 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -203,10 +203,12 @@ SECTIONS
203 .data.percpu : { *(.data.percpu) } 203 .data.percpu : { *(.data.percpu) }
204 __per_cpu_end = .; 204 __per_cpu_end = .;
205 205
206#ifdef CONFIG_BLK_DEV_INITRD
206 . = ALIGN(4096); 207 . = ALIGN(4096);
207 __initramfs_start =.; 208 __initramfs_start =.;
208 .init.ramfs : { *(.init.ramfs) } 209 .init.ramfs : { *(.init.ramfs) }
209 __initramfs_end = .; 210 __initramfs_end = .;
211#endif
210 212
211 /* We need this dummy segment here */ 213 /* We need this dummy segment here */
212 214